diff --git a/ws2011/BP/Folien Projektbegleitung/1 - Einführung.PDF b/ws2011/BP/Folien Projektbegleitung/1 - Einführung.PDF new file mode 100644 index 00000000..375c5826 Binary files /dev/null and b/ws2011/BP/Folien Projektbegleitung/1 - Einführung.PDF differ diff --git a/ws2011/BP/Folien Projektbegleitung/4 - Jenkins.PDF b/ws2011/BP/Folien Projektbegleitung/4 - Jenkins.PDF new file mode 100644 index 00000000..482a0730 Binary files /dev/null and b/ws2011/BP/Folien Projektbegleitung/4 - Jenkins.PDF differ diff --git a/ws2011/BP/Folien Projektbegleitung/4 - Maven.PDF b/ws2011/BP/Folien Projektbegleitung/4 - Maven.PDF new file mode 100644 index 00000000..f1629c7c Binary files /dev/null and b/ws2011/BP/Folien Projektbegleitung/4 - Maven.PDF differ diff --git a/ws2011/BP/Folien Projektbegleitung/4 - Organisatorisches.PDF b/ws2011/BP/Folien Projektbegleitung/4 - Organisatorisches.PDF new file mode 100644 index 00000000..17b8d964 Binary files /dev/null and b/ws2011/BP/Folien Projektbegleitung/4 - Organisatorisches.PDF differ diff --git a/ws2011/BP/Folien Projektbegleitung/5 - Foundations-of-Testing.pdf b/ws2011/BP/Folien Projektbegleitung/5 - Foundations-of-Testing.pdf new file mode 100644 index 00000000..6c6c552a Binary files /dev/null and b/ws2011/BP/Folien Projektbegleitung/5 - Foundations-of-Testing.pdf differ diff --git a/ws2011/BP/QS-Dokument/QS-Dokument.pdf b/ws2011/BP/QS-Dokument/QS-Dokument.pdf index 9714c4e0..2e68fbfe 100644 Binary files a/ws2011/BP/QS-Dokument/QS-Dokument.pdf and b/ws2011/BP/QS-Dokument/QS-Dokument.pdf differ diff --git a/ws2011/BP/QS-Dokument/QS-Dokument.tex b/ws2011/BP/QS-Dokument/QS-Dokument.tex index 4475cb5c..f33162e1 100644 --- a/ws2011/BP/QS-Dokument/QS-Dokument.tex +++ b/ws2011/BP/QS-Dokument/QS-Dokument.tex @@ -16,6 +16,7 @@ \makeglossaries %\newglossaryentry{}{name={},description={}} +\newglossaryentry{Agile Softwareentwicklung}{{name=Agile Softwareentwicklung},plural={Agilen Softwareentwicklung},description={Softwareentwicklungsprozess, welcher auf sich ndernde Anforderungen flexibel eingeht.}} \newglossaryentry{API}{name={API},description={Application Programming Interface: Programmteil, durch den andere Programme die Funktionalitt des eigentlichen Programmes nutzen knnen}} \newglossaryentry{User-Front-End}{name={User-Front-End},description={Fr den Benutzer sichtbarer Teil der Anwendung}} \newglossaryentry{CO}{name={CO},description={Kohlenstoffmonoxid (chemische Verbindung)}} @@ -39,14 +40,14 @@ \begin{document} \title{Qualittssicherungsdokument\\ -da\_sense \\ +da-sense \\ Wintersemester 2011/2012} \subtitle{Auftraggeber: Immanuel Schweizer (Telecooperation Group TU Darmstadt) \\ Gruppe 1b: Murat Batu, Ulf Gebhardt, Lulzim Murati, Michael Scholz\\ Teamleiter: Dominik Fischer } -\subsubtitle{Verison: 0.0.1} +\subsubtitle{Verison: 0.0.9} \author{Murat Batu, Ulf Gebhardt, Lulzim Murati, Michael Scholz} @@ -65,22 +66,25 @@ In diesem Dokument werden Tests und Prozesse beschrieben, dokumentiert und ausge \subsection{Das Projekt} -Das Projekt da-sense ist ein groflchiges Sensornetzwerk in Darmstadt. Es besteht aus einer Webapplikation, die dem Nutzer in Zukunft erlauben soll verschiedene Naturerscheinungen wie z.B. Lautstrkepegel (\gls{dB}), \gls{CO}- und \gls{CO2}-Konzentration einzusehen. Die Daten hierfr stammen aus verschiedenen Quellen (Smartphones und Sensoren) und werden in eine Datenbank transferiert, die schlielich ber die Webapplikation visualisiert abgerufen werden knnen. Bisher konnten die Datenbank und die Webapplikation nur mit den von Smartphones gesendeten Daten umgehen. Im Rahmen des Bachelorpraktikums im Wintersemester 2011/2012 sollen folgende Funktionalitten hinzukommen: +Das Projekt da-sense ist ein groflchiges Sensornetzwerk in Darmstadt. Es besteht aus einer Webapplikation, die dem Nutzer in Zukunft erlauben soll verschiedene Naturerscheinungen wie z.B. Lautstrkepegel (\gls{dB}), \gls{CO}- und \gls{CO2}-Konzentration einzusehen. Die Daten hierfr stammen aus verschiedenen Quellen (Smartphones und \gls{Waspmotes Sensoren}) und werden in eine Datenbank transferiert, die schlielich ber die Webapplikation visualisiert abgerufen werden knnen. Bisher konnten die Datenbank und die Webapplikation nur mit den von Smartphones gesendeten Daten umgehen. Im Rahmen des Bachelorpraktikums im Wintersemester 2011/2012 sollen folgende Funktionalitten hinzukommen: \begin{itemize} -\item Datenbank fr neue Sensortypen umstrukturieren +\item Umstrukturierung der Datenbank fr neue Sensortypen \item Installation von \gls{Waspmotes Sensoren} auf Straenbahnen -\item \gls{API} auf neue Datenbank anpassen und neue Visualisierung des \gls{User-Front-End} erstellen +\item Anpassung der \gls{API} auf neue Datenbank und Erstellung einer neue Visualisierung des \gls{User-Front-End} \item Android-App \end{itemize} -Da das Projekt auf insgesamt drei Gruppen aufgeteilt wurde, werden in diesem Dokument ausschlielich die Bereiche der Gruppe 1b behandelt. Der Themenbereich umfasst die Umstellung der \gls{API} auf eine neue Datenbank und die Erstellung einer neuen Visualisierung des \gls{User-Front-End}. +Das Projekt wurde auf insgesamt drei Gruppen aufgeteilt. In diesem Dokument werden ausschlielich die Bereiche der Gruppe 1b behandelt. +Der Themenbereich umfasst die Umstellung der \gls{API} auf eine neue Datenbank und die Erstellung einer neuen Visualisierung des \gls{User-Front-End}. % % % % % % % % % % % % % % % %% % % % % % % % % % % QUALITTSZIELE % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % \section{Qualittsziele} -In diesem Abschnitt werden die zu testenden Qualittsziele genauer spezifiziert. Dabei werden die Qualittsmerkmale Funktionalitt und Benutzbarkeit besonderst hevorgehoben, da sie fr unser Projekt von hchster Prioritt sind. Das Merkmal der Funktionalitt wird von unserem Auftraggeber gefordert. Die Benutzbarkeit ist unabdingbar, da die neue Visualisierung des \gls{User-Front-End} nach erfolgreichen Abschluss des Projekts einer groen Personengruppe zur Verfgung stehen soll. -%Hier ein zitat mit verweis: >>Damit nur hochwertiges Wissen erzeugt und als Grundlage fr weitere Arbeiten nutzbar gemacht wird, gibt es internationale Standards fr wissenschaftliche Qualitt<< \cite{bss+:2008} +%Als Qualittziele haben die Merkmale Funktionalitt, Benutzbarkeit und Codequalitt die hchste Prioritt. +%In diesem Abschnitt werden die zu testenden Qualittsziele genauer spezifiziert. Dabei werden die Qualittsmerkmale Funktionalitt und Benutzbarkeit besonderst hevorgehoben, da sie fr unser Projekt von hchster Prioritt sind. Das Merkmal der Codequalitt soll den nachfolgenden Gruppen, die sich mit dem Projekt da-sense beschftigen werden, einen besseren Einstieg gewhrleisten. + +%Die Merkmale sind fr ein erfolgreiches Projekt unabdingbar.Das Merkmal der Funktionalitt wird von unserem Auftraggeber gefordert. Die %Benutzbarkeit ist unabdingbar, da die neue Visualisierung des \gls{User-Front-End} nach erfolgreichen Abschluss des Projekts einer %groen Personengruppe zur Verfgung stehen soll. \subsection{Funktionalitt} @@ -102,12 +106,12 @@ Die Funktionalit \subsection{Benutzbarkeit} \label{subsec:zielBenutzbarkeit} -Als Benutzbarkeit wird der Aufwand definiert, der zum Einsatz der Software von dem Benutzer aufgebracht werden muss. Zudem bedarf es einer individuellen Beurteilung der Benutzung durch eine vorher bestimmte Benutzergruppe.\cite{ISO/IEC 9126}. \\ +Als Benutzbarkeit wird der Aufwand definiert, der zum Einsatz der Software von dem Benutzer aufgebracht werden muss. Zudem bedarf es einer individuellen Beurteilung der Benutzung durch eine vorher bestimmte Benutzergruppe \cite{ISO/IEC 9126}. \\ Die Benutzbarkeit lsst sich in die folgenden Punkte gliedern: \begin{itemize} \item Verstndlichkeit: \\ \textit{Aufzubringender Aufwand des Benutzers, damit sich dieser auf der Weboberflche zurechtfindet, z.B. verstndliche Menfhrung.} - \item Erlenbarkeit: \\ + \item Erlernbarkeit: \\ \textit{Aufzubringender Aufwand des Benutzers um die Anwendung korrekt zu nutzen.} \item Bedienbarkeit: \\ \textit{Aufzubringender Aufwand des Benutzers die Anwendung zu bedienen.} @@ -121,7 +125,8 @@ Die Benutzbarkeit l \subsection{Codequalitt} >>Any fool can write code that a computer can understand. Good programmers write code that humans can understand.<< \cite{fowler}. \\ -Die folgenden Anforderungen und Vereinbarungen sollen einen gut lesbaren und gut strukturierten Code zur Folge haben. +Der Quellcode, der im Rahmen des Projekt erstellt wird, soll offen fr Erweiterungen sein und wird von weiteren Gruppen genutzt. Daher muss darauf geachtet werden, dass smtliche Codebausteine auch fr Auenstehende lesbar und verstndlich sind. +Die folgenden Anforderungen und Vereinbarungen sollen diese Merkmale erfllen: \begin{itemize} \item Kommentare: \\ Jede von uns geschriebene, nicht triviale Funktion muss einen Kommentarkopf der folgenden Form besitzen:\\ @@ -131,7 +136,7 @@ Die folgenden Anforderungen und Vereinbarungen sollen einen gut lesbaren und gut * @return \textit{returntype} \\ * @tested \textit{boolean} \\ **/ \\ - Wobei \textit{Description} durch einen funktionsbeschreibenden Text, \textit{paramtype} durch den Parametertyp, \textit{returntype} durch den Rckgabewert und \textit{boolean} durch den Wahrheitswert ''true'' bzw. ''false'' zu ersetzen sind. + Wobei \textit{Description} durch einen funktionsbeschreibenden Text, \textit{paramtype} durch den Parametertyp, \textit{returntype} durch den Rckgabewert und \textit{boolean} durch den Wahrheitswert \glqq true\grqq bzw. \glqq false\grqq zu ersetzen sind. \item Struktur: \\ Der Code soll folgenden Standards gerecht werden: \\ \begin{itemize} @@ -146,7 +151,8 @@ Die folgenden Anforderungen und Vereinbarungen sollen einen gut lesbaren und gut % % % % % % % % % % % % % % % %% MANAHMEN ZUM ERREICHEN DER QUALITTSZIELE % % % % % % % % % % % % % % % %% % % % % % % % % % \section{Manahmen zum Erreichen der Qualittsziele} -Im folgenden Abschnitt werden die Manahmen zum Erreichen der oben genannten Qualittsziele und die von uns dafr verwendeten Werkzeuge genauer beschrieben. Auch hier werden die Manahmen zur Sicherung von Funktionalitt und Benutzbarkeit in den Vordergrund gestellt. +Im folgenden Abschnitt werden die Manahmen zum Erreichen der oben genannten Qualittsziele und die von uns dafr verwendeten Werkzeuge genauer beschrieben. +% Auch hier werden die Manahmen zur Sicherung von Funktionalitt und Benutzbarkeit in den Vordergrund gestellt. \subsection{Qualittswerkzeuge} \begin{itemize} @@ -155,7 +161,7 @@ Dient der Fehlersuche, Bearbeitung und Monitoring des \gls{Webinterface}. \item Git: \\ Als Versionsverwaltung dient Git. Hierdurch ist ein einfacher Codeaustausch mit den brigen Gruppen von da-sense mglich, wodurch jede Person stets ber den aktuellen Code verfgt. \item Netbeans:\\ -Als integrierte Entwicklungsumgebung (IDE) wird Netbeans verwendet, wodurch Syntxfehler vermieden werden. +Als integrierte Entwicklungsumgebung (IDE) wird Netbeans verwendet, wodurch Syntaxfehler vermieden werden. \item PHPUnit:\\ Testframework fr PHP. Es beinhaltet eine Testumgebung fr Datenbankinteraktionen, was fr unser Projekt von Vorteil ist. Zudem arbeitet es mit XDebug zusammen und ermglicht die Erstellung von CodeCoverage Analysen. \item soapUI:\\ @@ -182,9 +188,9 @@ Nach R \subsection{Benutzbarkeit} \label{subsec:aktionBenutzbarkeit} -Eine von uns durchgefhrte Benutzerstudie stellt das Qualittsmerkmal der Benutzbarkeit des neuen \glspl{Webinterface} sicher. Dieser Teil des Projekts wird erst am Ende des Projektzeitraums fertig, weshalb auch die Benutzerstudie erst am Ende von uns durchgefhrt werden kann. \\ +Eine von uns durchgefhrte Benutzerstudie stellt das Qualittsmerkmal der Benutzbarkeit des neuen \glspl{Webinterface} sicher. Dieser Teil des Projekts wird erst am Ende des Projektzeitraums fertig. Aus diesem Grund kann auch die Benutzerstudie erst am Ende von uns durchgefhrt werden. \\ Zur Benutzerstudie werden freiwilligen Probanten Bgen ausgeteilt, welche der Bewertung der einzelnen Kriterien (aus Abschnitt \ref{subsec:zielBenutzbarkeit}) der Benutzbarkeit des \glspl{Webinterface} dienen. Zudem werden einzelne Aktionen aller User auf der Webseite protokolliert, um im Anschluss durch eine Logdaten Analyse die Benutzerinteraktionen auswerten zu knnen. Durch die Benutzerstudie knnen somit Defizite des \glspl{Webinterface} aufgesprt und beseitigt werden. \\ -Das Ziel der Benutzerstudie ist es eine Rckmeldung zu erhalten ob und wie sich der Benutzer auf der Website zurechtfindet. Es gilt herauszufinden ob der User in einer fr ihn angemessenen Zeit die gewnschten Informationen abrufen kann. Da das fertige Projekt eine breite Masse an Personen erreichen soll, ist es wichtig, dass die Benutzerstudie mglichst viele verschiedene Personengruppen umfasst. Das heit es werden Personen mit wenig bis viel Interneterfahrung bzw. junge bis ltere Personen als Probanten gesucht. Zudem knnen durch die Studie unvorhersehbare Probleme entdeckt werden, da ein Benutzer anders mit der Website umgeht als wir. \newline \\ +Das Ziel der Benutzerstudie ist es eine Rckmeldung zu erhalten ob und wie sich der Benutzer auf der Website zurechtfindet. Es gilt herauszufinden, ob der User in einer fr ihn angemessenen Zeit die gewnschten Informationen abrufen kann. Da das fertige Projekt eine breite Masse an Personen erreichen soll, ist es wichtig, dass die Benutzerstudie mglichst viele verschiedene Personengruppen umfasst. Das heit, es werden Personen mit wenig bis viel Interneterfahrung bzw. junge bis ltere Personen als Probanten gesucht. Zudem knnen durch die Studie unvorhersehbare Probleme entdeckt werden, da ein Benutzer anders mit der Website umgeht als wir. \newline \\ \textbf{Was wollen wir wissen?} \begin{itemize} \item Ist die Visualisierung einfach zu verstehen und ansprechend? @@ -195,11 +201,24 @@ Das Ziel der Benutzerstudie ist es eine R Die Benutzerstudie setzt sich aus den drei Teilen \textit{Beobachtung}, \textit{Fragebogen} und \textit{Logdaten Analyse} zusammen. Somit erhalten wir drei unterschiedliche Informationsquellen, welche in Korrelation zueinander stehen sollten. \subsubsection{Beobachtung} -Die Beobachtung des Probanden beim Bedienen der Website ist die einfachste Methode zur Evaluation. Hierbei bleibt der Entwickler in der Position des Beobachters und protokoliert. Der Proband surft frei nach seinem Willen durch die Website oder bekommt konkrete Aufgaben gestellt, die er lsen muss. +Die Beobachtung des Probanden beim Bedienen der Website ist die einfachste Methode zur Evaluation. Hierbei bleibt der Entwickler in der Position des Beobachters und protokolliert. Der Proband surft frei nach seinem Willen durch die Website oder bekommt konkrete Aufgaben gestellt, die er lsen muss. \\ +Bei der Beobachtung gilt es folgende Stichpunkte zu beachten: +\begin{itemize} +\item Unerwartete Fehler +\item Probleme mit der Bedienung +\item vergangene Zeit bis zum Erhalt der gewnschten Informationen +\item ... +\end{itemize} \subsubsection{Fragebogen} -\textit{Der folgende Fragebogen kann sich im Laufe des Projekts ndern. Es knnen neue Fragen hinzukommen oder aber bereits vorhandene gendert bzw. herausgenommen werden.} - +Der Fragebogen wird von uns Anfang Mrz 2012 an die teilnehmenden Probanden ausgeteilt. Der genaue Termin wird sich an der Fertigstellung der neuen Visualisierung orientieren. Mit Hilfe des Fragebogens wollen wir Informationen von den verschiedensten Personengruppen aus Sicht eines Nutzers erhalten. Somit ist es mglich auf nutzerspezifische Anforderungen in der letzten Iteration des Projekts einzugehen. Die Fragen sind in drei Kategorien aufteilbar: +\begin{itemize} +\item Informationen ber den Nutzer +\item Bewertung der aktuellen Website +\item Verbesserungsvorschlge +\end{itemize} +Durch Punkt eins und zwei knnen wir nach der Auswertung verschiedene Personengruppen identifizieren und bei ihnen aufgetauchte Probleme analysieren und beseitigen. Punkt drei erlaubt die Anpassung der Website an die nutzerspezifischen Anforderungen. \\ +\textit{Der folgende Fragebogen kann sich whrend des gesamten Projekts ndern, da wir uns fr den Prozess der \glspl{Agile Softwareentwicklung} entschieden haben. Es knnen neue Fragen hinzukommen oder aber bereits vorhandene gendert bzw. herausgenommen werden. Die Entscheidung ber die zu stellenden Fragen obliegt dem gesamten Team. Hierdurch erhoffen wir uns, dass wir mglichst viele Bereiche des Projekts abfragen knnen.} \begin{enumerate} \item Wie alt sind Sie? @@ -261,23 +280,37 @@ Die Beobachtung des Probanden beim Bedienen der Website ist die einfachste Metho \end{enumerate} \subsubsection{Logdaten Analyse} -Zur Analyse der Logdaten wird das Tool Google Analytics verwendet. Hiermit ist es mglich verschiedenste Statistiken zu erhalten. \\ +Zur Analyse der Logdaten wird das kostenlose Tool Google Analytics verwendet, welches uns mit seiner Vielseitigkeit und Flexibilitt berzeugt hat. Zudem erfolgt die Bedienung intuitiv, weshalb eine unter Umstnden lngere Einarbeitungszeit in andere Tools entfllt. +GoogleAnalytics erlaubt es verschiedenste Statistiken zu erhalten, mit deren Hilfe wir die Qualitt des \glspl{User-Front-End} weiter erhhen knnen. \\ Fr uns sind die folgenden Statistiken von groer Bedeutung: \begin{itemize} \item Besucherzahlen \item am meisten aufgerufene Seiten \item Pfad der besuchten Seiten \item Ausstiegsseiten - \item ''Absprungsrate'' + \item \glqq Absprungsrate\grqq \item Besuchszeit der einzelnen Seiten \item ... \end{itemize} -Hierdurch erlangen wir einen berblick wie das \gls{Webinterface} von den Nutzern bedient wird und knnen daraus schlieen welche Funtionalitten intutiv und welche weniger intuitiv sind. - +Hierdurch erlangen wir einen berblick wie das \gls{Webinterface} von den Nutzern bedient wird und knnen daraus schlieen welche Funtionalitten intutiv und welche weniger intuitiv sind. +\parindent 0pt +\paragraph{Datenschutz} +Um eine datenschutzkonforme Nutzung von Google Analytics zu gewhrleisten, mssen folgende Vorgaben erfllt werden \cite{DBA}: +\begin{itemize} +\item Vertrag zur Auftragsdatenverarbeitung mit Google ( 11 BDSG - Vertrag) +\item Anonymisierung der IP-Adressen +\item Widerspruchsrecht der Betroffenen +\item angepasster Datenschutzhinweis +\item Lschung von Altdaten (bestehende Google Analytics Profile) +\end{itemize} +Punkt eins wird in den kommenden Wochen bearbeitet. Die Anonymisierung der IP-Adressen erfolgt durch Abschneiden der letzten 8 Bit der IP-Adresse. Das Widerspruchsrecht der Nutzer wird durch Google gewhrleistet. Hierzu wird ein Add-on fr den Webbrowser angeboten, welches Google Analytics deaktiviert. Da bisher keine Daten gesammelt wurden, mssen von uns auch keine Altdaten gelscht werden.\\ +Der anpasste Datenschutzhinweis findet sich im Impressum durch folgende Vorlage: \\ +>> Diese Website benutzt Google Analytics, einen Webanalysedienst der Google Inc. (\glqq Google\grqq). Google Analytics verwendet sog. \glqq Cookies\grqq, Textdateien, die auf Ihrem Computer gespeichert werden und die eine Analyse der Benutzung der Website durch Sie ermglichen. Die durch den Cookie erzeugten Informationen ber Ihre Benutzung dieser Website werden in der Regel an einen Server von Google in den USA bertragen und dort gespeichert. Im Falle der Aktivierung der IP-Anonymisierung auf dieser Webseite, wird Ihre IP-Adresse von Google jedoch innerhalb von Mitgliedstaaten der Europischen Union oder in anderen Vertragsstaaten des Abkommens ber den Europischen Wirtschaftsraum zuvor gekrzt. Nur in Ausnahmefllen wird die volle IP-Adresse an einen Server von Google in den USA bertragen und dort gekrzt. Im Auftrag des Betreibers dieser Website wird Google diese Informationen benutzen, um Ihre Nutzung der Website auszuwerten, um Reports ber die Websiteaktivitten zusammenzustellen und um weitere mit der Websitenutzung und der Internetnutzung verbundene Dienstleistungen gegenber dem Websitebetreiber zu erbringen. Die im Rahmen von Google Analytics von Ihrem Browser bermittelte IP-Adresse wird nicht mit anderen Daten von Google zusammengefhrt. Sie knnen die Speicherung der Cookies durch eine entsprechende Einstellung Ihrer Browser-Software verhindern; wir weisen Sie jedoch darauf hin, dass Sie in diesem Fall gegebenenfalls nicht smtliche Funktionen dieser Website vollumfnglich werden nutzen knnen. Sie knnen darber hinaus die Erfassung der durch das Cookie erzeugten und auf Ihre Nutzung der Website bezogenen Daten (inkl. Ihrer IP-Adresse) an Google sowie die Verarbeitung dieser Daten durch Google verhindern, indem sie das unter dem folgenden Link (\href{http://tools.google.com/dlpage/gaoptout?hl=de}{http://tools.google.com/dlpage/gaoptout?hl=de}) verfgbare Browser-Plugin herunterladen und installieren. Nhere Informationen hierzu finden Sie unter \href{http://tools.google.com/dlpage/gaoptout?hl=de}{http://tools.google.com/dlpage/gaoptout?hl=de} bzw. unter +\href{http://www.google.com/intl/de/analytics/privacyoverview.html}{http://www.google.com/intl/de/analytics/privacyoverview.html} (allgemeine Informationen zu Google Analytics und Datenschutz). Wir weisen Sie darauf hin, dass auf dieser Webseite Google Analytics um den Code \glqq gat.\_anonymizeIp();\grqq erweitert wurde, um eine anonymisierte Erfassung von IP-Adressen (sog. IP-Masking) zu gewhrleisten. << \cite{DBA} \subsection{Codequalitt} \textbf{Noch nicht fertig!!} \\ -manahmen zur sicherung der codequalitt.... +Manahmen zur Sicherung der Codequalitt.... @@ -292,19 +325,18 @@ Auf den folgenden Seiten findet sich die Dokumentation \subsubsection{Funktionalitt} -\newpage \subsubsection{Benutzerstudie} Wie in Abschnitt \ref{subsec:aktionBenutzbarkeit} beschrieben, wird die Benutzerstudie erst am Ende des Projekts durchgefhrt, da das Webinterface zum jetzigen Zeitpunkt noch nicht fertiggestellt ist. Die Testdokumentation erfolgt somit im Anschluss und wird sich in der finalen Version dieses Dokuments (Abgabedatum 31.03.2012) befinden. -\newpage + \subsubsection{Logdaten Analyse} Die Logdaten Analyse steht in Zusammenhang mit der Benutzerstudie und wird somit auch erst am Ende des Projekts durchgefhrt. Die Testdokumentation erfolgt somit im Anschluss und wird sich in der finalen Version dieses Dokuments (Abgabedatum 31.03.2012) befinden. -\newpage + \subsubsection{Codequalitt} -\newpage + \subsection{User-Stories} @@ -318,9 +350,10 @@ F \begin{tabbing} \begin{tabular}{||p{5.4cm}||p{11cm}||} %\hline \rule[-2ex]{0pt}{5.5ex} Noch eine version & test \\ -\hline \rule[-2ex]{0pt}{5.5ex} v. 0.0.9 - 14.12.2011 - MS & Benutzerstudie \\ -\hline \rule[-2ex]{0pt}{5.5ex} v. 0.0.1 - 09.12.2011 - MS & Einleitung, Qualittsziele (Codequalitt, Funktionalitt), Qualittswerkzeuge\\ \hline \rule[-2ex]{0pt}{5.5ex} v. 0.0.0 - 01.12.2011 - MS & Dokument angelegt\\ +\hline \rule[-2ex]{0pt}{5.5ex} v. 0.0.1 - 09.12.2011 - MS & Einleitung, Qualittsziele (Codequalitt, Funktionalitt), Qualittswerkzeuge\\ +\hline \rule[-2ex]{0pt}{5.5ex} v. 0.0.9 - 14.12.2011 - MS & Benutzerstudie \\ +%\hline \rule[-2ex]{0pt}{5.5ex} ... - .... & ... \\ \hline \end{tabular} \end{tabbing} @@ -339,6 +372,7 @@ F \addcontentsline{toc}{section}{Literatur} \begin{thebibliography}{------} % \bibitem[BSS+2008]{bss+:2008} Helmut Balzert, Christian Schfer, Marion Schrder, Uwe Kern: \emph{Wissenschaftliches Arbeiten - Wissenschaft, Quellen, Artefakte, Organisation, Prsentation}, Witten: W3L, 2008 + \bibitem[DBA]{DBA} \href{http://www.datenschutzbeauftragter-info.de/fachbeitraege/google-analytics-datenschutzkonform-einsetzen/}{http://www.datenschutzbeauftragter-info.de/fachbeitraege/google-analytics-datenschutzkonform-einsetzen/} \bibitem[ISO/IEC 9126]{ISO/IEC 9126} International Organization for Standardization \emph{ISO/IEC 9126} \\Auszug: Wikipedia, \href{http://de.wikipedia.org/wiki/ISO/IEC_9126}{http://de.wikipedia.org/wiki/ISO/IEC\_9126} diff --git a/ws2011/CE/Folien/gms-09-col.pdf b/ws2011/CE/Folien/gms-09-col.pdf new file mode 100644 index 00000000..da127388 Binary files /dev/null and b/ws2011/CE/Folien/gms-09-col.pdf differ diff --git a/ws2011/CE/Uebungen/loesungsvorschlag_07.pdf b/ws2011/CE/Uebungen/loesungsvorschlag_07.pdf new file mode 100644 index 00000000..392d0a40 Binary files /dev/null and b/ws2011/CE/Uebungen/loesungsvorschlag_07.pdf differ diff --git a/ws2011/CE/Uebungen/uebung_8.pdf b/ws2011/CE/Uebungen/uebung_8.pdf new file mode 100644 index 00000000..b383ac2a Binary files /dev/null and b/ws2011/CE/Uebungen/uebung_8.pdf differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/.DS_Store b/ws2011/Compiler I/Triangle-2.1-esa3/.DS_Store new file mode 100644 index 00000000..f1d2adba Binary files /dev/null and b/ws2011/Compiler I/Triangle-2.1-esa3/.DS_Store differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/.svnignore b/ws2011/Compiler I/Triangle-2.1-esa3/.svnignore new file mode 100644 index 00000000..528b9d20 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/.svnignore @@ -0,0 +1,3 @@ +*.tam +*.iml +classes diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/.svnignore b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/.svnignore new file mode 100644 index 00000000..b35dca9c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/.svnignore @@ -0,0 +1 @@ +obj.tam diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.readme new file mode 100644 index 00000000..abd0f208 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.readme @@ -0,0 +1,17 @@ +Optimierende Compiler +Aufgabe 1: Triangle + +Acht-Damen-Problem + +Dateien: + - AchtDamen.README + - AchtDamen.tam + - AchtDamen.tri + +Autor: +Peer Rexroth + + +Deterministische Lsung des Acht-Damen-Problems +Eine Beschreibung des Problems befindet sich unter: +http://de.wikipedia.org/wiki/Acht-Damen-Problem \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.tri new file mode 100644 index 00000000..4244eba0 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/AchtDamen.tri @@ -0,0 +1,178 @@ +! Acht-Damen-Problem +! Peer Rexroth +! Deterministische Lsung des Acht-Damen-Problems +! Eine Beschreibung des Problems befindet sich unter: +! http://de.wikipedia.org/wiki/Acht-Damen-Problem + +let + var position: array 8 of Integer; + var anzahl: Integer; + var topic: Boolean; + + +! Ausgabe des Schachfeldes. "X" stellt eine Dame dar, "-" ein leeres Feld +proc drucke() ~ + let + var i: Integer; + var j: Integer + in + begin + puteol(); + if (topic = true) + then + begin + put('A'); + put('C'); + put('H'); + put('T'); + put('-'); + put('D'); + put('A'); + put('M'); + put('E'); + put('N'); + puteol(); + end + else + begin + anzahl := anzahl + 1; + put('L'); + put('o'); + put('e'); + put('s'); + put('u'); + put('n'); + put('g'); + put(':'); + put(' '); + put('N'); + put('r'); + put('.'); + putint(anzahl); + puteol(); + end; + i := 0; + while i < 8 + do + begin + j := 0; + while j < position[i] + do + begin + put('-'); + j := j + 1 + end; + put('X'); + j := position[i] + 1; + while j < 8 + do + begin + put('-'); + j := j + 1 + end; + puteol(); + i := i + 1; + end + end; + + +! Pruefe ob die zu setzende Dame von den bereits gesetzten Damen +! geschlagen wird +proc schlaegt(zeile: Integer, spalte: Integer, var stat: Boolean) ~ + let + var i: Integer + in + begin + i := 0; + stat := false; + while ((i < zeile) /\ (stat = false)) + do + begin + if ((spalte = position[i]) \/ ((spalte - zeile) = (position[i] - i)) \/ ((spalte + zeile) = (position[i] + i))) + then + begin + stat := true + end + else + begin + stat := false + end; + i := i + 1 + end; + end; + + +! Setze die Damen +proc platziere(zeile: Integer) ~ + let + var i: Integer; + var moeglich: array 8 of Boolean; + var status: Boolean + in + begin + i := 0; + while i < 8 + do + begin + moeglich[i] := false; + i := i + 1 + end; + i := 0; + while i < 8 + do + begin + schlaegt(zeile, i, var status); + if (status = false) + then + begin + moeglich[i] := true; + end + else + begin + end; + i := i + 1 + end; + + i := 0; + while i < 8 + do + begin + if (moeglich[i] = true) + then + begin + position[zeile] := i; + if (zeile <= 6) + then + begin + platziere(zeile + 1) + end + else + begin + drucke(); + end + end + else + begin + end; + i := i + 1; + end; + end; + + +proc loeseDeterm() ~ + let + var i: Integer + in + begin + platziere(0) + end + + +in +begin + topic := true; + drucke(); + topic := false; + anzahl := 0; + loeseDeterm(); +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.readme new file mode 100644 index 00000000..1557c3d1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.readme @@ -0,0 +1,33 @@ +Autor: +Clayton Hoss + +Beschreibung: +Dieses Programm implementiert den RSA-Algorithmus. Er verschlsselt und +entschlsselt eine Zahl mit der RSA Methode. Es werden 2 verschiendene +Exponentiationsalgorithmen verwendet. Einmal mittels schneller Exponentiation +und einer mittels einer simplen Schleife. Des weiteren werden auch 2 +verschiedene gngigen Anstze zur Entschlsselung verwendet. Einmal den +Chinesischen Restsatz (CRT) und ein anderes mal die normale RSA Methode. Der +Entschlsselungsexponent wird mittels Erweitertem Euclid berechnet. + +Zur nderung des Kryptoschlssels muss man im Programm die Konstanten "p", "q" +und "e" ndern. "p" und "q" drfen beliebige Primzahlen sein. "e" hingegen muss +teilerfremd zum Produkt von p-1 mal q-1 sein (ggt von (p-1)*(q-1) und e ist 1). + + +Eingaben und Ausgaben: +Nach start des Programms, kann man eine ganze Zahl eingeben. Sie sollte kleiner +als p*q sein. Als Ausgabe zeigt einem das Programm die Verschlsselte Zahl, +sowie das Ergebnis der Entschlsselungen, mittels der beiden implementierten +Methoden, der verschlsselten Zahl an. + +Beispieleingaben und Ausgaben: +(gilt nur fr p = 13, q = 11 und e = 23) + +Eingabe: +54 + +Ausgabe: +Encrypted Number : 98 +Decrypted normally : 54 +Decrypted with CRT : 54 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.tri new file mode 100644 index 00000000..ff52ac2a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RSA1.tri @@ -0,0 +1,209 @@ +! Encrypts an Integer with the RSA Algorithm. Algorithm took from +! "J. Buchmann - Einfuerung in die Kryptographie" +! +! Input: an integer Smaller than n +! +! +! Author: Clayton Hoss +! Version: very very beta +! + +let + + const p ~ 13; ! prime 1 + const q ~ 11; ! prime 2 + const e ~ 23; ! public exponent, gcd((p-1)*(q-1), e) must be 1 + const n ~ p * q; ! public modulo + + var d: Integer; ! private exponent: calculated with Xeuclid + + ! Maxint is 32k! + ! n must be smaller or equal to floor(sqrt(32k)) : 181 + ! p times q must be smaller or equal to floor(sqrt(181)) : 13 + ! otherwise the fast power function (power()) will not work + + proc putInput() ~ + begin + put('N'); put('u'); put('m'); put('b'); put('e'); put('r'); + put(' '); put('t'); put('o'); put(' '); put('e'); put('n'); + put('c'); put('r'); put('y'); put('p'); put('t'); put(' '); + put('('); put(' '); put('<'); put(' '); putint(n);put(' '); + put(')'); put(' '); put(':'); put(' '); + end; + + proc putEncryptMsg() ~ + begin + put('E'); put('n'); put('c'); put('r'); put('y'); put('p'); + put('t'); put('e'); put('d'); put(' '); put('N'); put('u'); + put('m'); put('b'); put('e'); put('r'); put(' '); put(':'); + put(' '); + end; + + proc putDecrypt1() ~ + begin + put('D'); put('e'); put('c'); put('r'); put('y'); put('p'); + put('t'); put('e'); put('d'); put(' '); put('n'); put('o'); + put('r'); put('m'); put('a'); put('l'); put('l'); put('y'); + put(' '); put(':'); put(' '); + end; + + proc putDecrypt2() ~ + begin + put('D'); put('e'); put('c'); put('r'); put('y'); put('p'); + put('t'); put('e'); put('d'); put(' '); put('w'); put('i'); + put('t'); put('h'); put(' '); put('C'); put('R'); put('T'); + put(' '); put(':'); put(' '); + end; + + ! base may not be bigger than 181 since base * base will produce an overflow + proc power(base: Integer, exponent: Integer, modulo: Integer, var result: Integer) ~ + let + var lbase: Integer; + var lexponent: Integer; + var lresult: Integer + in begin + lbase := base // modulo; + lexponent := exponent; + lresult := 1; + while lexponent > 0 do + begin + if (1 = (lexponent // 2)) then begin + lresult := ((lresult * lbase) // modulo); + lexponent := lexponent - 1; + end + else begin + lbase := ((lbase * lbase) // modulo); + lexponent := lexponent / 2; + end + + end; + result := lresult + end; + + proc power2(base: Integer, exponent: Integer, modulo: Integer, var result: Integer) ~ + let + var i: Integer + in begin + result := 1; + i := 0; + while i < exponent do + begin + result := (result * base) // modulo; + i:= i + 1; + end; + end; + + + proc Xgcd(pa: Integer, pb: Integer, var gcd: Integer, var x:Integer, var y:Integer) ~ + let + var a:Integer; + var b:Integer; + var q: Integer; + var r:Integer; + var xx: Integer; + var yy: Integer; + var sign: Integer; + var xs: array 2 of Integer; + var ys: array 2 of Integer + in begin + a := pa; + b := pb; + + xs[0] := 1; xs[1] := 0; + ys[0] := 0; ys[1] := 1; + sign := 1; + while b \= 0 do + begin + r := a // b; + q := a / b; + a := b; + b := r; + xx := xs[1]; + yy := ys[1]; + xs[1] := q * xs[1] + xs[0]; + ys[1] := q * ys[1] + ys[0]; + xs[0] := xx; + ys[0] := yy; + sign := sign * (0 - 1); + + end; + x := sign * xs[0]; + y := (0 - sign) * ys[0]; + + gcd := a; + + end; + + + proc encrypt(m: Integer, var c: Integer) ~ + begin + power(m, e, n, var c); + end; + + + proc decrypt(c: Integer, var m: Integer) ~ + begin + power2(c, d, n, var m); + end; + + + proc decryptWithCRT(c: Integer, var m: Integer) ~ + let + var mp: Integer; + var mq: Integer; + var tempd: Integer; + var gcd: Integer; + var yp: Integer; + var yq: Integer + in begin + tempd := (d // (p-1)); + power2(c, d, p, var mp); + tempd := (d // (q-1)); + power(c, d, q, var mq); + + Xgcd(p, q, var gcd, var yp, var yq); + + m := ((mp * yq * q) + (mq * yp * p)) // n; + + if m < 0 then begin + m := n + m; + end + else begin end; + end; + + + proc setDecryptionExponentViaXEuclid() ~ + let + var gcd:Integer; + var x: Integer; + var y: Integer + in begin + Xgcd((p-1)*(q-1), e, var gcd, var x, var y); + if y < 0 then begin + y := (p-1)*(q-1) + y; + end + else begin end; + d := y; + + end; + + var i: Integer; ! Message Text + var k: Integer ! Encrypted Text + +in begin + setDecryptionExponentViaXEuclid(); + putInput(); + getint(var i); + encrypt(i, var k); + putEncryptMsg(); + putint(k); + puteol(); + decrypt(k, var i); + putDecrypt1(); + putint(i); + puteol(); + decryptWithCRT(k, var i); + putDecrypt2(); + putint(i); + puteol(); +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.readme new file mode 100644 index 00000000..d496f4fe --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.readme @@ -0,0 +1,65 @@ +Optimierende Compiler +Aufgabe 1: Triangle + +Roboter-Programm + +Dateien: + - Robot.README + - Robot.tam + - Robot.tri + - RobotRun.tam + - RobotRun.tri + +Autor: +Benjamin Schiller + + +Es handelt sich hierbei um eine kleine Simulation eines Roboters, der sich in einer kleinen Welt, begrenzt durch Wnde / Hindernisse bewegt. +Er kann Htchen platzieren und aufsammeln. +Die Idee bzw. das Prinzip stammt aus dem Grundstudium, wo wir einen Interpreter fr KarelJRobot geschrieben haben, der die genannten Eigenschaften hatte. +Damit das ganze nicht zu komplex wurde, sind einige Dinge stark vereinfacht: +- An einer Stelle kann immer nur ein Htchen stehen, weitere knnen aber darauf platziert werden. +- Der Roboter kann beliebig viele Htchen aufstellen und auch aufsammeln. +- Die "globalen" Befehle berschreiben bereits vorhandenes, also Htchen oder Wnde + +Die "Welt" +x - Wand / Hinderniss +o - Htchen +R - Roboter +B - Roboter, der auf einem Feld mit Htchen steht + +ACHTUNG: +Damit das Programm korrekt luft, mssen in der Datei TAM.machine folgende nderungen vorgenommen werden: +TAM.Machine +- Zeile 59: new Instruction[1024] -> new Instruction[2048] +- Zeile 66: PB = 1024, -> PB = 2048, +- Zeile 67: PT = 1052; -> PT = 2076; +Diese nderungen erhhen die Anzahl der maximal mglichen Befehle in der Triangle-Datei und sollten allgemein verwendet werden knnen (also fr alle Programm zu empfehlen). +Leider war aufgrund der vielen Status-Meldungen und Test-Lufe (in RobotRun.) eine hohe Anzahl an Befehlen nicht zu vermeiden. + +In Robot.tri und Robot.tam befindet sich das eigendliche Programm. Hier kann der Benutzer einige Befehle ausfhren, um die Welt zu verndern und den Roboter zu steuern. +Diese sind im folgenden erlutert: +# i beenden +# Roboter-Befehle +# w: nach Norden bewegen +# s: nach Sden bewegen +# a: nach Westen bewegen +# d: nach Osten bewegen +# q: Htchen aufnehmen +# e: Htchen setzen +# globale Befehle +# m: Wand / Hinernis setzen +# n: Htchen setzen +Die Gre der Welt muss zwischen 3 und 16 liegen (inklusive). +Je nach Konsole / Betriebssystem haben sich in den Tests die Eingaben von der Konsole als problematisch erwiesen. +Daher muss man manchmal ENTER drcken, bis man "Command:" sieht, dann kann man den Befehl eingeben. + +In RobotRun.tri und RobotRun.tam befindet sich eine abgenderte Version des Programms, in der keine Eingaben des Benutzers notwendig sind. +Es werden einfach einige Beispiel-Aktionen durchgefhrt, um ein selbststndig durchlaufendes Programm zu erhalten. +In der Variable session kann zwischen den Beispieln umgeschaltet werden. + + +Ein- und Ausgaben +Die Eingaben von Robot. wurden oben bereits beschrieben. +Bei RobotRun. sind keine Eingaben mglich / ntig. Natrlich kann in RobotRun.tri ein weiteres Beispiel eingefgt werden. +Die Ausgabe beider Programm besteht aus Status-Meldungen, welche Aktion durchgefhrt wurde, evtl. Fehlermeldungen, wenn man z.B. versucht, den Roboter durch eine Wand zu steuern und der Ausgabe der Welt, die oben beschrieben wurde. \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.tri new file mode 100644 index 00000000..62b58993 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/Robot.tri @@ -0,0 +1,386 @@ +!Folgende nderung sind notwendig, damit das Programm luft +!(maximale Anzahl der Operationen) +!TAM.Machine +!Zeile 59: new Instruction[1024] -> new Instruction[2048] +!Zeile 66: PB = 1024, -> PB = 2048, +!Zeile 67: PT = 1052; -> PT = 2076; + +!Roboter-Simulation +!in dem Programm wird ein Roboter simuliert, der Htchen aufstellen und wegnehmen kann +!Wnde / Hindernisse werden durch x markiert und knnen nicht berlaufen werden +!Ein Htchen wird durch o markiert +!Der Roboter wird durch R markiert +!Steht der Roboter auf einem Htchen, wird das mit B markiert + +!Befehle: +!i beenden +!Roboter-Befehle +! w: nach Norden bewegen +! s: nach Sden bewegen +! a: nach Westen bewegen +! d: nach Osten bewegen +! q: Htchen aufnehmen +! e: Htchen setzen +!globale Befehle +! m: Wand / Hinernis setzen +! n: Htchen setzen + +!Die globalen Befehle sind berschreibend, d.h. dass man eine Wand mit einem Htchen berschreiben kann etc. +!Die Auenbegrenzung bzw. -wand kann nicht berschrieben werden. +!Es kann immer nur ein Htchen auf einer Stelle sein, doppeltes Belegen wird aber nicht als Fehler ausgegeben. +!Der Roboter kann unendlich viele Htchen setzen und aufnehmen. + +!Der Befehl kann eingegeben werden, wenn man Command: sieht. +!Sollte man dies nicht sehen, einfach ENTER drcken, bis es kommt +!(hngt wohl der der Konsole / Betribssystem ab) + + +let + +!Deklaration der Variable errorOccurred + var errorOccurred : Boolean; + +!Gibt den Fehler mit der Kennung x aus + proc printError (x : Integer) ~ + begin + if (x = 0) !World too small + then begin + put('W'); put('o'); put('r'); put('l'); put('d'); put(' '); + put('t'); put('o'); put('o'); put(' '); + put('s'); put('m'); put('a'); put('l'); put('l'); + end + else if (x = 1) !World too big + then begin + put('W'); put('o'); put('r'); put('l'); put('d'); put(' '); + put('t'); put('o'); put('o'); put(' '); + put('b'); put('i'); put('g'); + end + else if (x = 2) !Koord. out of World + then begin + put('K'); put('o'); put('o'); put('r'); put('d'); put(' '); + put('o'); put('u'); put('t'); put(' '); + put('o'); put('f'); put(' '); + put('W'); put('o'); put('r'); put('l'); put('d'); + end + else if (x = 3) !Koord. in Wall + then begin + put('K'); put('o'); put('o'); put('r'); put('d'); put(' '); + put('i'); put('n'); put(' '); + put('W'); put('a'); put('l'); put('l'); + end + else if (x = 4) !Error(s) occurred EXITING!! + then begin + put('E'); put('r'); put('r'); put('o'); put('r'); put(' '); + put('o'); put('c'); put('c'); put('u'); put('r'); put('r'); put('e'); put('d'); put(' '); + put('E'); put('X'); put('I'); put('T'); put('I'); put('N'); put('G'); + end + else if (x = 5) !Wrong Direction + then begin + put('W'); put('r'); put('o'); put('n'); put('g'); put(' '); + put('D'); put('i'); put('r'); put('e'); put('c'); put('t'); put('i'); put('o'); put('n'); + end + else if (x = 6) !Unknown Command + then begin + put('U'); put('n'); put('k'); put('n'); put('o'); put('w'); put('n'); put(' '); + put('C'); put('o'); put('m'); put('m'); put('a'); put('n'); put('d'); + end + else if (x = 7) !No Cone at curr. Pos. + then begin + put('N'); put('o'); put(' '); + put('C'); put('o'); put('n'); put('e'); put(' '); + put('a'); put('t'); put(' '); + put('c'); put('u'); put('r'); put('r'); put(' '); + put('P'); put('o'); put('s'); + end + else + begin + end; + + put('!'); + puteol(); + errorOccurred := true; + end; + + +!Deklaration des Typs World + type Row ~ record + y : array 16 of Char, + length : Integer + end; + type World ~ record + x : array 16 of Row, + length : Integer + end; + +!Deklaration des Typs Robot + type Robot ~ record + cones : Integer, + x : Integer, + y : Integer + end; + + +!Deklaration der bentigten Variablen + var size : Integer; + var world : World; + var robot : Robot; + var befehl : Char; + var counter : Integer; + var inX : Integer; + var inY : Integer; + +!Initialisierung der Welt +!Am Rand werden Mauern / Hindernisse gesetzt + proc initWorld () ~ + let + var x : Integer; + var y : Integer + in begin + x := 0; + while (x < size) do + begin + y := 0; + while (y < size) do + begin + if((x = (size - 1)) \/ (x = 0) \/ (y = (size - 1)) \/ (y = 0)) + then + world.x[x].y[y] := 'x' + else + world.x[x].y[y] := ' '; + y := y + 1; + end; + x := x + 1; + end; + end; + +!Initialisierung des Roboters +!Die Position des Roboters wird mit 1/1 initialisiert + proc initRobot () ~ + begin + robot.cones := 0; + robot.x := 1; + robot.y := 1; + end; + +!Ausgabe der Welt +!Roboter: R +!Wand / Hinderniss: x +!Htchen: o +!Roboter + Htchen: B + proc printWorld () ~ + let + var x : Integer; + var y : Integer + in begin + x := 0; + while(x < size) do + begin + y := 0; + while(y < size) do + begin + if ((robot.x = x) /\ (robot.y = y)) + then + if (world.x[x].y[y] = 'o') + then + put('B') + else + put('R') + else + put(world.x[x].y[y]); + put(' '); + y := y + 1; + end; + puteol(); + x := x + 1; + end; + puteol(); + end; + +!Setze ein Htchen + proc putCone (x : Integer, y : Integer) ~ + begin + if((x >= size) \/ (x <= 0) \/ (y >= size) \/ (y <= 0)) + then + printError(2) + else + if(world.x[x].y[y] = 'x') + then + printError(3) + else + world.x[x].y[y] := 'o'; + end; + +!Setze Wand / Hinderniss + proc putWall (x : Integer, y : Integer) ~ + begin + if((x >= (size - 1)) \/ (x <= 0) \/ (y >= (size - 1)) \/ (y <= 0)) + then + printError(2) + else + world.x[x].y[y] := 'x'; + end; + +!Roboter setzt ein Htchen an seiner Position + proc putConeRobot () ~ + begin + world.x[robot.x].y[robot.y] := 'o'; +! put('R'); put('o'); put('b'); put('o'); put('t'); put(':'); put(' '); + put('S'); put('e'); put('t'); put(' '); put('C'); + put('o'); put('n'); put('e'); put(' '); + put('a');put('t');put(' ');putint(robot.x);put('/');putint(robot.y);puteol(); + end; + +!Roboter nimmt ein Htchen an seiner Position auf + proc pickUpCone () ~ + begin + if(world.x[robot.x].y[robot.y] = 'o') + then + begin + world.x[robot.x].y[robot.y] := ' '; +! put('R');put('o');put('b');put('o');put('t');put(':');put(' '); + put('P');put('i');put('c');put('k');put(' ');put('u');put('p');put(' ');put('C');put('o');put('n');put('e');put(' '); + put('a');put('t');put(' ');putint(robot.x);put('/');putint(robot.y);puteol(); + end + else + printError(7); + end; + +!Bewege Roboter + proc moveRobot (c : Char) ~ + let + var newX : Integer; + var newY : Integer + in begin + newX := robot.x; + newY := robot.y; + if (c = 'w') + then + newX := newX - 1 + else if (c = 's') + then + newX := newX + 1 + else if (c = 'a') + then + newY := newY - 1 + else if (c = 'd') + then + newY := newY + 1 + else + begin + printError(5) + end; + if(world.x[newX].y[newY] = 'x') + then + printError(3) + else + begin + robot.x := newX; + robot.y := newY; +! put('R');put('o');put('b');put('o');put('t');put(':');put(' '); + put('M'); put('o'); put('v'); put('e'); put(':'); put(' '); put(c); + put(' ');put('t');put('o');put(' ');putint(robot.x);put('/'); putint(robot.y); puteol() + end; + end + +in begin + errorOccurred := false; + put('W'); put('o'); put('r'); put('l'); put('d'); put('-'); put('S'); put('i'); put('z'); put('e'); put(':'); put(' '); + getint(var size); + puteol(); + if(size <= 2) + then + printError(0) + else if(size > 16) + then + printError(1) + else + begin + initWorld(); + initRobot(); + printWorld() + end; + + if(errorOccurred) + then + printError(4) + else + begin + befehl := ' '; + counter := 0; + while(befehl \= 'i') do + begin + if (counter = 1) + then begin + put('C'); put('o'); put('m'); put('m'); put('a'); put('n'); put('d'); put(':'); put(' '); + end + else begin end; + + get(var befehl); + + if (counter = 1) + then + begin + puteol(); puteol(); puteol(); + put('B'); put('e'); put('f'); put('e'); put('h'); put('l'); put(':'); put(' '); put('"'); + put(befehl); put('"'); + puteol(); + + if ((befehl = 'w') \/ (befehl = 'a') \/ (befehl = 's') \/ (befehl = 'd')) !R: bewegen + then + begin + moveRobot(befehl); + printWorld(); + end + else if (befehl = 'q') !R: aufnehmen + then + begin + pickUpCone(); + printWorld(); + end + else if (befehl = 'e') !R: setzen + then + begin + putConeRobot(); + printWorld(); + end + else if (befehl = 'n') !htchen setzen + then + begin + put('C'); put('o'); put('n'); put('e'); put(' '); put('X'); put(':'); put(' '); + getint(var inX); + put('C'); put('o'); put('n'); put('e'); put(' '); put('Y'); put(':'); put(' '); + getint(var inY); + putCone(inX, inY); + printWorld(); + end + else if (befehl = 'm') !wand setzen + then + begin + put('W'); put('a'); put('l'); put('l'); put(' '); put('X'); put(':'); put(' '); + getint(var inX); + put('W'); put('a'); put('l'); put('l'); put(' '); put('Y'); put(':'); put(' '); + getint(var inY); + putWall(inX, inY); + printWorld(); + end + else if (befehl = 'i') + then + begin + put('T'); put('s'); put('c'); put('h'); put('u'); put('e'); put('s'); put('s'); + put('.'); put('.'); put('.'); put('.'); + puteol(); + end + else + begin + printError(6); + end; + + end + else + begin + end; + + counter := (counter + 1) // 2; + end; + end; +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RobotRun.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RobotRun.tri new file mode 100644 index 00000000..a3e8b81f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/RobotRun.tri @@ -0,0 +1,626 @@ +!Folgende nderung sind notwendig, damit das Programm luft +!(maximale Anzahl der Operationen) +!TAM.Machine +!Zeile 59: new Instruction[1024] -> new Instruction[2048] +!Zeile 66: PB = 1024, -> PB = 2048, +!Zeile 67: PT = 1052; -> PT = 2076; + +!Roboter-Simulation +!in dem Programm wird ein Roboter simuliert, der Htchen aufstellen und wegnehmen kann +!Wnde / Hindernisse werden durch x markiert und knnen nicht berlaufen werden +!Ein Htchen wird durch o markiert +!Der Roboter wird durch R markiert +!Steht der Roboter auf einem Htchen, wird das mit B markiert + +!Dieser Teil dient nur als Beispiel, dass ohne Benutzereingaben "durchluft". +!weiter unten kann "session" auf einen anderen Wert gestellt werden, um so ein anderes Beispiel zu betrachten. + + +let + +!Deklaration der Variable errorOccurred + var errorOccurred : Boolean; + +!Gibt den Fehler mit der Kennung x aus + proc printError (x : Integer) ~ + begin + if (x = 0) !World too small + then begin + put('W'); put('o'); put('r'); put('l'); put('d'); put(' '); + put('t'); put('o'); put('o'); put(' '); + put('s'); put('m'); put('a'); put('l'); put('l'); + end + else if (x = 1) !World too big + then begin + put('W'); put('o'); put('r'); put('l'); put('d'); put(' '); + put('t'); put('o'); put('o'); put(' '); + put('b'); put('i'); put('g'); + end + else if (x = 2) !Koord. out of World + then begin + put('K'); put('o'); put('o'); put('r'); put('d'); put(' '); + put('o'); put('u'); put('t'); put(' '); + put('o'); put('f'); put(' '); + put('W'); put('o'); put('r'); put('l'); put('d'); + end + else if (x = 3) !Koord. in Wall + then begin + put('K'); put('o'); put('o'); put('r'); put('d'); put(' '); + put('i'); put('n'); put(' '); + put('W'); put('a'); put('l'); put('l'); + end + else if (x = 4) !Error(s) occurred EXITING!! + then begin + put('E'); put('r'); put('r'); put('o'); put('r'); put(' '); + put('o'); put('c'); put('c'); put('u'); put('r'); put('r'); put('e'); put('d'); put(' '); + put('E'); put('X'); put('I'); put('T'); put('I'); put('N'); put('G'); + end + else if (x = 5) !Wrong Direction + then begin + put('W'); put('r'); put('o'); put('n'); put('g'); put(' '); + put('D'); put('i'); put('r'); put('e'); put('c'); put('t'); put('i'); put('o'); put('n'); + end + else if (x = 6) !Unknown Command + then begin + put('U'); put('n'); put('k'); put('n'); put('o'); put('w'); put('n'); put(' '); + put('C'); put('o'); put('m'); put('m'); put('a'); put('n'); put('d'); + end + else if (x = 7) !No Cone at curr. Pos. + then begin + put('N'); put('o'); put(' '); + put('C'); put('o'); put('n'); put('e'); put(' '); + put('a'); put('t'); put(' '); + put('c'); put('u'); put('r'); put('r'); put(' '); + put('P'); put('o'); put('s'); + end + else + begin + end; + + put('!'); + puteol(); + errorOccurred := true; + end; + + +!Deklaration des Typs World + type Row ~ record + y : array 16 of Char, + length : Integer + end; + type World ~ record + x : array 16 of Row, + length : Integer + end; + +!Deklaration des Typs Robot + type Robot ~ record + cones : Integer, + x : Integer, + y : Integer + end; + + +!Deklaration der bentigten Variablen + var size : Integer; + var world : World; + var robot : Robot; + var befehl : Char; + var counter : Integer; + var inX : Integer; + var inY : Integer; + var session : Integer; + +!Initialisierung der Welt +!Am Rand werden Mauern / Hindernisse gesetzt + proc initWorld () ~ + let + var x : Integer; + var y : Integer + in begin + x := 0; + while (x < size) do + begin + y := 0; + while (y < size) do + begin + if((x = (size - 1)) \/ (x = 0) \/ (y = (size - 1)) \/ (y = 0)) + then + world.x[x].y[y] := 'x' + else + world.x[x].y[y] := ' '; + y := y + 1; + end; + x := x + 1; + end; + end; + +!Initialisierung des Roboters +!Die Position des Roboters wird mit 1/1 initialisiert + proc initRobot () ~ + begin + robot.cones := 0; + robot.x := 1; + robot.y := 1; + end; + +!Ausgabe der Welt +!Roboter: R +!Wand / Hinderniss: x +!Htchen: o +!Roboter + Htchen: B + proc printWorld () ~ + let + var x : Integer; + var y : Integer + in begin + x := 0; + while(x < size) do + begin + y := 0; + while(y < size) do + begin + if ((robot.x = x) /\ (robot.y = y)) + then + if (world.x[x].y[y] = 'o') + then + put('B') + else + put('R') + else + put(world.x[x].y[y]); + put(' '); + y := y + 1; + end; + puteol(); + x := x + 1; + end; + puteol(); + end; + +!Setze ein Htchen + proc putCone (x : Integer, y : Integer) ~ + begin + if((x >= size) \/ (x <= 0) \/ (y >= size) \/ (y <= 0)) + then + printError(2) + else + if(world.x[x].y[y] = 'x') + then + printError(3) + else + world.x[x].y[y] := 'o'; + end; + +!Setze Wand / Hinderniss + proc putWall (x : Integer, y : Integer) ~ + begin + if((x >= (size - 1)) \/ (x <= 0) \/ (y >= (size - 1)) \/ (y <= 0)) + then + printError(2) + else + world.x[x].y[y] := 'x'; + end; + +!Roboter setzt ein Htchen an seiner Position + proc putConeRobot () ~ + begin + world.x[robot.x].y[robot.y] := 'o'; +! put('R'); put('o'); put('b'); put('o'); put('t'); put(':'); put(' '); + put('S'); put('e'); put('t'); put(' '); put('C'); + put('o'); put('n'); put('e'); put(' '); + put('a');put('t');put(' ');putint(robot.x);put('/');putint(robot.y);puteol(); + end; + +!Roboter nimmt ein Htchen an seiner Position auf + proc pickUpCone () ~ + begin + if(world.x[robot.x].y[robot.y] = 'o') + then + begin + world.x[robot.x].y[robot.y] := ' '; +! put('R');put('o');put('b');put('o');put('t');put(':');put(' '); + put('P');put('i');put('c');put('k');put(' ');put('u');put('p');put(' ');put('C');put('o');put('n');put('e');put(' '); + put('a');put('t');put(' ');putint(robot.x);put('/');putint(robot.y);puteol(); + end + else + printError(7); + end; + +!Bewege Roboter + proc moveRobot (c : Char) ~ + let + var newX : Integer; + var newY : Integer + in begin + newX := robot.x; + newY := robot.y; + if (c = 'w') + then + newX := newX - 1 + else if (c = 's') + then + newX := newX + 1 + else if (c = 'a') + then + newY := newY - 1 + else if (c = 'd') + then + newY := newY + 1 + else + begin + printError(5) + end; + if(world.x[newX].y[newY] = 'x') + then + printError(3) + else + begin + robot.x := newX; + robot.y := newY; +! put('R');put('o');put('b');put('o');put('t');put(':');put(' '); + put('M'); put('o'); put('v'); put('e'); put(':'); put(' '); put(c); + put(' ');put('t');put('o');put(' ');putint(robot.x);put('/'); putint(robot.y); puteol() + end; + end + +in begin + + session := 1; !bisher belegte Beispiel sind session = 0 und session = 1 + + if (session = 0) + then begin + !Beispiel-Simulation 1 + put('B'); put('s'); put('p'); put('.'); put('1'); puteol(); puteol(); + size := 16; + initWorld(); + initRobot(); + printWorld(); + + putWall(2,2); + printWorld(); + putWall(3,3); + printWorld(); + putWall(4,4); + printWorld(); + putWall(5,5); + printWorld(); + putWall(6,6); + printWorld(); + putWall(7,7); + printWorld(); + putWall(8,8); + printWorld(); + putWall(9,9); + printWorld(); + putWall(10,10); + printWorld(); + putWall(11,11); + printWorld(); + putWall(12,12); + printWorld(); + putWall(13,13); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + + end + else if (session = 1) + then begin + !Beispiel-Simulation 2 + put('B'); put('s'); put('p'); put('.'); put('2'); puteol(); puteol(); + size := 10; + initWorld(); + initRobot(); + printWorld(); + + putWall(2,2); + printWorld(); + putWall(2,3); + printWorld(); + putWall(3,3); + printWorld(); + putWall(4,3); + printWorld(); + putWall(4,4); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('d'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('d'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('d'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('s'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('s'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('d'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('s'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('s'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('a'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('a'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('a'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('w'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('w'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('a'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('w'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + putConeRobot(); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('a'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('a'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('a'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('a'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('a'); + printWorld(); + moveRobot('w'); + printWorld(); + moveRobot('w'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('w'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('w'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('d'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('d'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('d'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('s'); + printWorld(); + pickUpCone(); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('s'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + moveRobot('d'); + printWorld(); + pickUpCone(); + printWorld(); + + + end + else if(session = 2) + then begin + !Beispiel-Simulation 3 + put('B'); put('s'); put('p'); put('.'); put('3'); puteol(); puteol(); + size := 16; + initWorld(); + initRobot(); + printWorld(); + + + end + else begin + !Beispiel-Simulation 4 + put('B'); put('s'); put('p'); put('.'); put('4'); puteol(); puteol(); + size := 16; + initWorld(); + initRobot(); + printWorld(); + + end; +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.readme new file mode 100644 index 00000000..4ecf73b2 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.readme @@ -0,0 +1,38 @@ +Autor: +Benjamin Otto + +Funktion: +Das Programm lst das Diskrete Logarithmus Problem g^x=a mod n +mittels Shank's Baby-Step-Giant-Step Algorithmus + +Hilfsfunktion fr Wurzel ziehen und erweiterten Euklid fr Inversion inklusive + +Bedienung: +Nach Start gibt man die Gruppenordnung n, die Basis g und das gewnschte Ergebnis a mod n ein. Das Programm berechnet nun x. +Falls es kein solches x gibt(kann passieren, wenn g keine Primitivwurzel ist) gibt das Programm -1 als Ergebnis an. + +Beispiele +Gruppenordnung : 14 +g : 3 +a : 5 +Loesung : 5 + +also 3^5=5 mod 14 + + +Gruppenordnung : 181 +g : 179 +a : 2 +Loesung : 91 + +also 179^91 = 2 mod 181 + + +Gruppenordnung : 9 +g : 3 +a : 4 +Loesung : -1 + +nicht lsbar (3 ist teiler von 9) + + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.tri new file mode 100644 index 00000000..62e37e96 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/babystepgiantstep.tri @@ -0,0 +1,193 @@ +! +! Gruppe: +! Jan Sinschek +! Benjamin Otto +! Anselm Foehr +! +! +! Autor: Benjamin Otto +! +! Programm zur Loesung des Diskreten Logarithmus-Problems g^x = a mod n +! mittels Shanks BabyStep-Giantstep-Verfahren. +! Funktioniert für Körper bis Ordnung 181, sonst Integer-Overflow +! +! Eingabe: Gruppenordnung n, Basis g, Potenz a +! + +let + ! Berechnet das Inverse von g modulo n mittels Euklid und gibts in x zurück + proc invertmodulo(g : Integer, n : Integer, var x: Integer) ~ + let + var a : Integer; + var b : Integer; + var x0 : Integer; + var x1 : Integer; + var y0 : Integer; + var y1 : Integer; + var xx : Integer; + var yy : Integer; + var q : Integer; + var r : Integer; + var sign : Integer + + in begin + + !Parameter übergeben + a := g; + b := n; + + ! Extended Euklid + x0 := 1; x1 := 0; + y0 := 0; y1 := 1; + sign := 1; + while b \= 0 do begin + r := a // b; + q := a / b; + a := b; + b := r; + xx := x1; + yy := y1; + x1 := q * x1 + x0; + y1 := q * y1 + y0; + x0 := xx; + y0 := yy; + sign := 0 - sign + + end; + + if (x0 * g) // n = 1 then + ! x0 ist das gesuchte inverse + x := x0 + else begin + x := n - x0; + + end + + end; + + ! Hilfsfunktion zum Wurzelziehen; zieht wurzel und rundet auf (ziemlich primitiv:)) + proc sqrtroundup(n : Integer, var x : Integer) ~ + begin + x := 0; + while x * x < n do x:= x + 1 + end; + + ! Hilfsfunktion zum potenzieren in endlichen Körpern + proc potmodulo(base :Integer, exp : Integer, n : Integer, var x : Integer) ~ + let + var i : Integer !countervariable + in begin + i := 1; + x := 1; + while i <= exp do begin + x := x * base; + x := x // n; + i := i + 1 + end + end; + + + proc babystepgiantstep(n : Integer, g : Integer, a : Integer, var x : Integer) ~ + let + var babysteps : array 100 of Integer; ! Speicherplatz für bis zu hundert Babysteps + var m : Integer; + var ginvert : Integer; + var atemp : Integer; !Babysteps-Dummy + var d : Integer; !Giantstep-Basis + var dtemp : Integer; !Giantsteps-Dummy + var r : Integer; !BabyStepzähler + var q : Integer; !GiantStep-Zähler + var foundtrivial : Boolean; ! flag, ob eine direkte lösung in den babysteps gefunden wurde + var found : Boolean ! flag, ob eine Lösung in den Giantsteps gefunden wurde + in begin + + ! m berechnen + sqrtroundup(n, var m); + + ! g^-1 mod n berechnen + invertmodulo(g, n, var ginvert); + + !Zunächst die Babysteps berechnen + r := 0; + atemp := a; + foundtrivial := false; + while (r < m) /\ \foundtrivial /\ \found do begin + + !r-ten babystep speichern + babysteps [r] := atemp; + + + !sonderfall babystep == 1 checken + if atemp = 1 then begin + foundtrivial := true; !flag setzen + x := r; ! lösung ist in diesem Fall r + end + else begin end; + + !naechsten BS berechnen + atemp := (atemp * ginvert) // n; + + !weiterzaehlen + r := r + 1 + + end; + + !Jetzt die GiantSteps durchgehen falls noch nicht gefunden + q := 1; + potmodulo(g, m, n, var d); + dtemp := d; + if \foundtrivial then begin + + while \ found do begin + + ! die Babysteps nach einem Match mit aktuellem d durchsuchen + r := 0; + found := false; + while r < m /\ \found do begin + if dtemp = babysteps[r] then begin + found := true; + x := q * m + r; + end + else begin end; + r := r + 1 + end; + + dtemp:= (dtemp * d) // n; + + !Test ob keine Lösung da + if q > (2 * m) then begin + found := true; + x := 0 - 1; + end + else begin end; + + q := q + 1 + end + + end + else begin end; + end; + + var n : Integer; + var g : Integer; + var a : Integer; + var solution : Integer + +in begin ! Hauptprogramm + + put('G');put('r');put('u');put('p');put('p');put('e');put('n');put('o');put('r'); + put('d');put('n');put('u');put('n');put('g');put(' ');put(':');put(' '); + getint(var n); + put('g');put(' ');put(':');put(' '); + getint(var g); + put('a');put(' ');put(':');put(' '); + getint(var a); + + !BSGS ausführen + babystepgiantstep(n, g, a, var solution); + + !Ausgabe des Ergebnisses + put('L');put('o');put('e');put('s');put('u');put('n');put('g');put(' ');put(':');put(' '); + putint(solution) + +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.readme new file mode 100644 index 00000000..698111a4 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.readme @@ -0,0 +1,442 @@ +Optimierende Compiler +Aufgabe 1: Triangle + +Backtracking-Lsung eines Solitaire-Spieles + +Dateien: + - backtracking_solitaire.README + - backtracking_solitaire.tam + - backtracking_solitaire.tri + +Autor: +Joachim Fritschi + +Funktion: +In diesem Programm wird ein Solitr-Spiel mittels eines Backtracking-Algorithmus gelst und die Lsung fr den Benutzer grafisch ausgegeben. +Nheres zum Spiel selber gibt es z.B. auf der Seite: http://de.wikipedia.org/wiki/Solit%C3%A4r_%28Brettspiel%29 + +Bedienung: +Einfach ohne Parameter aufrufen. + + +Ausgabe: + +********** TAM Interpreter (Java Version 2.1) ********** + +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XXOOOOOOOXX +XXOOO OOOXX +XXOOOOOOOXX +XXXXOOOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +1 [3,5] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XXOOOOOOOXX +XXO OOOOXX +XXOOOOOOOXX +XXXXOOOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +2 [4,3] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XXOOOOOOOXX +XXO OOOOOXX +XXOO OOOOXX +XXXX OOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +3 [2,4] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XXOOOOOOOXX +XXO OOOOOXX +XX OOOOOXX +XXXX OOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +4 [2,6] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XX OOOOOOXX +XX OOOOOXX +XXO OOOOOXX +XXXX OOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +5 [4,5] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XX OOOOOOXX +XX OOOOXX +XXO OOOOXX +XXXXOOOXXXX +XXXXOOOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +6 [4,2] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XX OOOOOOXX +XX OOOOXX +XXO OOOOOXX +XXXX OOXXXX +XXXX OOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +7 [4,6] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXXOOOXXXX +XXXXOOOXXXX +XXO OOOOXX +XX OOOOXX +XXO OOOOOXX +XXXX OOXXXX +XXXX OOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +8 [4,8] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO OOOOOXX +XX OOOOXX +XXO OOOOOXX +XXXX OOXXXX +XXXX OOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +9 [5,4] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO OOOOOXX +XX OOOOXX +XXOO OOOXX +XXXX OOXXXX +XXXX OOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +10 [2,4] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO OOOOOXX +XX OOOOXX +XX O OOOXX +XXXX OOXXXX +XXXX OOXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +11 [5,2] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO OOOOOXX +XX OOOOXX +XX OOOOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +12 [5,4] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO OOOOOXX +XX OOOOXX +XX O OOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +13 [5,6] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OOXXXX +XXXX OOXXXX +XXO O OOOXX +XX OOOXX +XX O OOOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +14 [5,8] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XXO OOOOOXX +XX OOOXX +XX O OOOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +15 [5,6] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XXOO OOOXX +XX OOOXX +XX O OOOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +16 [2,6] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX O OOOXX +XX OOOXX +XX O OOOOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +17 [6,4] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX O OOOXX +XX OOOXX +XX OO OOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +18 [3,4] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX O OOOXX +XX OOOXX +XX O OOXX +XXXX OXXXX +XXXX OXXXX +XXXXXXXXXXX +XXXXXXXXXXX + +19 [6,2] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX O OOOXX +XX OOOXX +XX OOOOXX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +20 [6,5] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX O OOOXX +XX OOXX +XX O OOXX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +21 [7,6] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX OXXXX +XXXX OXXXX +XX OO OXX +XX OOXX +XX O OOXX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +22 [6,8] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO OXX +XX OOXX +XX O OOXX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +23 [8,4] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO OXX +XX OOXX +XX OO XX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +24 [5,4] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO OXX +XX OOXX +XX O XX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +25 [8,6] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO XX +XX O XX +XX OOXX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +26 [8,4] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO XX +XX O XX +XX O XX +XXXX OXXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +27 [6,3] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX OOO XX +XX OO XX +XX XX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +28 [6,5] NORTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX OXXXX +XX OO XX +XX O XX +XX XX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +29 [4,6] EAST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX OXXXX +XX O XX +XX O XX +XX XX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +30 [6,7] SOUTH +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX XX +XX OO XX +XX XX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + +31 [7,5] WEST +XXXXXXXXXXX +XXXXXXXXXXX +XXXX XXXX +XXXX XXXX +XX XX +XX O XX +XX XX +XXXX XXXX +XXXX XXXX +XXXXXXXXXXX +XXXXXXXXXXX + + +Program has halted normally. diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.tri new file mode 100644 index 00000000..f6818dfd --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/backtracking_solitaire.tri @@ -0,0 +1,371 @@ +! Backtracking Algorithm for solving a Solitaire game +! Author Joachim Fritschi + +let +!game table constants + const INVALID ~ 2; + const OCCUPIED ~ 1; + const FREE ~ 0; + const free ~ ' '; + const occupied ~ 'O'; + const invalid ~ 'X'; +!solution constants + const NORTH ~ 0; + const EAST ~ 1; + const SOUTH ~ 2; + const WEST ~ 3; +!Array representation of the game table + type row ~ record + column: array 11 of Integer, + length: Integer + end; + var table: array 11 of row; + var foundSolution: Boolean; + +!Array representation of the game solution +!The Records a steps containing the position x,y of the stone to move and the direction + type step ~ record + column: array 3 of Integer, + length: Integer + end; + var solution: array 32 of row; + + + proc initTable() ~ + let + var x: Integer; + var y: Integer + in begin + x := 0; + while( x < 11) do + begin +! putint(x); + y := 0; + while( y < 11) do + begin +! putint(y); + table[y].column[x] := INVALID; + y := y + 1 + end; + x := x + 1; + end; + + x := 2; + while(x < 9) do + begin + table[4].column[x] := OCCUPIED; + table[5].column[x] := OCCUPIED; + table[6].column[x] := OCCUPIED; + table[x].column[4] := OCCUPIED; + table[x].column[5] := OCCUPIED; + table[x].column[6] := OCCUPIED; + x := x + 1; + end; + table[5].column[5] := FREE; + end; + +! Intitalize the solution Array + proc initSolution() ~ + let + var x: Integer; + var y: Integer + in begin + x := 0; + y := 0; + while( x < 32) do + begin + y := 0; + while( y < 3) do + begin + solution[x].column[y] := 0; + y := y + 1 + end; + x := x + 1; + end; + end; + +! Print the game table + proc printTable() ~ + let + var x: Integer; + var y: Integer + in begin + y := 10; + while( y >= 0) do + begin + x := 0; + while( x < 11) do + begin + if table[y].column[x] = INVALID then + put(invalid) + else + if table[y].column[x] = FREE then + put(free) + else + put(occupied); + + x := x + 1; + end; + puteol(); + y := y - 1; + end; + puteol(); + + end; + +! execute a Move on the game table + proc makeMove(x: Integer,y : Integer,dir : Integer) ~ + begin + if dir = NORTH then + begin + table[y].column[x] := FREE; + table[y + 1].column[x] := FREE; + table[y + 2].column[x] := OCCUPIED; + end + else + begin + if dir = EAST then + begin + table[y].column[x] := FREE; + table[y].column[x+1] := FREE; + table[y].column[x+2] := OCCUPIED; + end + else + begin + if dir = SOUTH then + begin + table[y].column[x] := FREE; + table[y - 1].column[x] := FREE; + table[y - 2].column[x] := OCCUPIED; + end + else + begin + if dir = WEST then + begin + table[y].column[x] := FREE; + table[y].column[x-1] := FREE; + table[y].column[x-2] := OCCUPIED; + end + else + begin + end + end + end + end; + end; + +! undo a move on the game table + proc undoMove(x: Integer,y : Integer,dir : Integer) ~ + begin + if dir = NORTH then + begin + table[y].column[x] := OCCUPIED; + table[y + 1].column[x] := OCCUPIED; + table[y + 2].column[x] := FREE; + end + else + begin + if dir = EAST then + begin + table[y].column[x] := OCCUPIED; + table[y].column[x+1] := OCCUPIED; + table[y].column[x+2] := FREE; + end + else + begin + if dir = SOUTH then + begin + table[y].column[x] := OCCUPIED; + table[y - 1].column[x] := OCCUPIED; + table[y - 2].column[x] := FREE; + end + else + begin + if dir = WEST then + begin + table[y].column[x] := OCCUPIED; + table[y].column[x-1] := OCCUPIED; + table[y].column[x-2] := FREE; + end + else + begin + end + end + end + end + end; + +!save a move in the solution array + proc saveSolution(stepNr: Integer,x : Integer,y : Integer, dir : Integer) ~ + begin + solution[stepNr].column[0] := x; + solution[stepNr].column[1] := y; + solution[stepNr].column[2] := dir; + end; + +!rekursive solution of the game with a backtracking algorithm + proc calcSolution(stepNr: Integer,var status: Boolean)~ + begin + if (stepNr = 31) /\ (table[5].column[5] = OCCUPIED) then + status := true + else + let + var x: Integer; + var y: Integer + in begin + x := 2; + while ( x < 9) do + begin + y := 2; + while ( y < 9) do + begin + if(table[y].column[x] = OCCUPIED) /\ (table[y+1].column[x] = OCCUPIED ) /\ (table[y + 2].column[x] = FREE ) /\ \status then + begin + makeMove(x,y,NORTH); + calcSolution(stepNr + 1, var status); + if status = true then + begin + saveSolution(stepNr,x,y,NORTH); + end + else + begin + undoMove(x,y,NORTH); + end + end + else + begin + end; + + + if(table[y].column[x] = OCCUPIED) /\ (table[y-1].column[x] = OCCUPIED ) /\ (table[y - 2].column[x] = FREE ) /\ \status then + begin + makeMove(x,y,SOUTH); + calcSolution(stepNr + 1, var status); + if status = true then + begin + saveSolution(stepNr,x,y,SOUTH); + end + else + begin + undoMove(x,y,SOUTH); + end + end + else + begin + end; + + if(table[y].column[x] = OCCUPIED) /\ (table[y].column[x+1] = OCCUPIED ) /\ (table[y].column[x + 2] = FREE ) /\ \status then + begin + makeMove(x,y,EAST); + calcSolution(stepNr + 1, var status); + if status = true then + begin + saveSolution(stepNr,x,y,EAST); + end + else + begin + undoMove(x,y,EAST); + end + end + else + begin + end; + + if(table[y].column[x] = OCCUPIED) /\ (table[y].column[x-1] = OCCUPIED ) /\ (table[y].column[x - 2] = FREE ) /\ \status then + begin + makeMove(x,y,WEST); + calcSolution(stepNr + 1, var status); + if status = true then + begin + saveSolution(stepNr,x,y,WEST); + end + else + begin + undoMove(x,y,WEST); + end + end + else + begin + end; + y := y + 1 + end; + x := x + 1 + end; + end; + end; + +!little helper funktion to write the directions human readable + proc writeDirection(dir: Integer) ~ + begin + if dir = NORTH then + begin + put('N'); + put('O'); + put('R'); + put('T'); + put('H'); + end + else + if dir = EAST then + begin + put('E'); + put('A'); + put('S'); + put('T'); + end + else + if dir = SOUTH then + begin + put('S'); + put('O'); + put('U'); + put('T'); + put('H'); + end + else + if dir = WEST then + begin + put('W'); + put('E'); + put('S'); + put('T'); + end + else + end; + +!print the solution on the stout + proc printSolution() ~ + let + var count: Integer + in begin + initTable(); + puteol(); + printTable(); + count := 0; + while count < 31 do + begin + putint(count + 1); + put(' '); + put('['); + putint(solution[count].column[0]); + put(','); + putint(solution[count].column[1]); + put(']'); + put(' '); + writeDirection(solution[count].column[2]); + puteol(); + makeMove(solution[count].column[0],solution[count].column[1],solution[count].column[2]); + printTable(); + count := count + 1 + end + end + + +in begin + foundSolution := false; + initTable(); + initSolution(); + calcSolution(0,var foundSolution); + printSolution(); + +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/bar.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/bar.tri new file mode 100644 index 00000000..f8f9b5c3 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/bar.tri @@ -0,0 +1,6 @@ +let + var x : Integer; + const n ~ 42; + const m ~ n + 1 +in + x := x + n * m; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.readme new file mode 100644 index 00000000..85a371d1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.readme @@ -0,0 +1,26 @@ +! +! Implementation of a simple calculator in Triangle by +! - Alexander Constantin constant@rbg.informatik.tu-darmstadt.de +! - Nico Rottstädt rottstae@rbg.informatik.tu-darmstadt.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html +! + +Erlaubte 1-stellige Operationen: - (Negation) +Erlaubte 2-stellige Operationen: + (Addition) + - (Subtraktion) + * (Multiplikation) + / (Division) + +Jede 2-stellige Operation muss mit Klammern umschlossen sein. + +Ein vernüftiger Fehlerzustand wurde noch nicht implementiert. +Zum Beispiel wird bei einer unbekannten Operation 0 zurückgegeben. + +Beispiel: +--------- +Term: ((1+2)*(-1+3)) + +((1+2)*(-1+3)) = 6 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.tri new file mode 100644 index 00000000..d918e2ec --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/calculator.tri @@ -0,0 +1,210 @@ +! +! Implementation of a simple calculator in Triangle by +! - Alexander Constantin constant@rbg.informatik.tu-darmstadt.de +! - Nico Rottstdt rottstae@rbg.informatik.tu-darmstadt.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html +! + +let + + ! -------------- + ! String support + ! -------------- + + type String ~ record + Str: array 80 of Char + end; + + ! Fill a string + proc readstring(var strg: String) ~ + let + var chint: Char; + var length: Integer; + var testeol : Boolean; + var testeof : Boolean + in begin + length := 0; + eol(var testeol); + eof(var testeof); + while \ testeol /\ \ testeof do begin + get(var chint); + strg.Str[length] := chint; + length := length + 1; + eol(var testeol); + eof(var testeof); + end; + + strg.Str[length-2] := '\'; + end; + + ! Print a string + proc putstring(var strg: String) ~ + let + var i: Integer + in begin + i := 0; + while \ (strg.Str[i] = '\') do begin + put(strg.Str[i]); + i := i + 1; + end; + end; + + ! Eliminate spaces in a string + proc removeSpacesFromString(var strg: String) ~ + let + var counter : Integer; + var tmpArray : array 80 of Char; + var tmpCounter : Integer + in begin + counter := 0; + tmpCounter := 0; + + while (strg.Str[counter] \= '\') do begin + if (strg.Str[counter] \= ' ') then + begin + tmpArray[tmpCounter] := strg.Str[counter]; + tmpCounter := tmpCounter + 1; + end + else; + counter := counter + 1; + end; + tmpArray[tmpCounter] := strg.Str[counter]; ! copy \ + strg.Str := tmpArray + end; + + ! --------------- + ! Integer support + ! --------------- + + func isDigit(c:Char) : Boolean ~ + (c = '0') \/ (c = '1') \/ (c = '2') \/ (c = '3') \/ (c = '4') \/ + (c = '5') \/ (c = '6') \/ (c = '7') \/ (c = '8') \/ (c = '9'); + + ! ord('0') = 48 + ! ... + ! ord('9') = 57 + func convertCharToInt(c:Char) : Integer ~ + ord(c) - 48; + + ! maxInt = 32767 + ! bei char arrays die einen geoesseren Wert darstellen kommt es zum overflow + proc readInteger(term: array 80 of Char, var i: Integer, var result: Integer) ~ + let + var isNegative : Boolean + in begin + result := 0; + + isNegative := false; + if (term[i] = '-') then + begin + isNegative := true; + i := i + 1; + end + else; + + while (isDigit(term[i])) do begin + result := result * 10; + result := result + convertCharToInt(term[i]); + i := i + 1; + end; + + if (isNegative) then + result := 0 - result + else + + end; + + ! ---------------- + ! Calculator stuff + ! ---------------- + + ! allowed two digit operations: +, -, *, / + func doOperation(op1 : Integer, op2 : Integer, operator : Char) : Integer ~ + if operator = '+' then + op1 + op2 + else if operator = '-' then + op1 - op2 + else if operator = '*' then + op1 * op2 + else if operator = '/' then + op1 / op2 + else + 0; + + ! rekursives Parsen + proc parse(term: array 80 of Char, var i: Integer, var result: Integer) ~ + let + var operand1: Integer; + var operand2: Integer; + var operator: Char + in begin + if (term[i] = '(') then + begin + + i := i + 1; + parse(term, var i, var operand1); + + operator := term[i]; + + i := i + 1; + parse(term, var i, var operand2); + + if (term[i] \= ')') then + begin + put('E'); + put('R'); + put('R'); + put('O'); + put('R'); + puteol() + end + else + ! do operation here + i := i + 1; + result := doOperation(operand1, operand2, operator); + end + else + begin + readInteger(term, var i, var result) + end; + end; + + + ! Main Program - "Calculator" + ! --------------------------- + + var term : String; + var result : Integer; + var i : Integer + +in begin + i := 0; + + ! Prompt ausgeben + put('T'); + put('e'); + put('r'); + put('m'); + put(':'); + put(' '); + + ! Einlesen des Terms + readstring(var term); + removeSpacesFromString(var term); + + ! start parsing + parse(term.Str, var i, var result); + + ! output result + puteol(); + putstring(var term); + put(' '); + put('='); + put(' '); + putint(result); + + puteol() +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-digit.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-digit.tri new file mode 100644 index 00000000..7579fa0e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-digit.tri @@ -0,0 +1,22 @@ +! [file: case-digit.tri, started: 22-Apr-2004] +! Testing new case statement. +! Print character representation of a digit. + +let + var n: Integer +in begin + getint(var n); + case n of + 7: begin put('z'); put('e'); put('v'); put('e'); put('n'); end; + 9: begin put('n'); put('e'); put('g'); put('e'); put('n'); end; + 2: begin put('t'); put('w'); put('e'); put('e'); end; + 3: begin put('d'); put('r'); put('i'); put('e'); end; + 4: begin put('v'); put('i'); put('e'); put('r'); end; + 5: begin put('v'); put('i'); put('j'); put('f'); end; + 8: begin put('a'); put('c'); put('h'); put('t'); end; + 6: begin put('z'); put('e'); put('s'); end; + 0: begin put('n'); put('u'); put('l'); end; + 1: begin put('e'); put('e'); put('n'); end; + else: begin put('f'); put('o'); put('u'); put('t'); end; + puteol(); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err1.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err1.tri new file mode 100644 index 00000000..1527af02 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err1.tri @@ -0,0 +1,14 @@ +! [file: case-digit.tri, started: 23-Apr-2004] +! Testing new case-statement. +! error: expression is not a boolean + +let + var n: Integer +in begin + getint(var n); + case n>0 of + 0: put('0'); + 1: put('1'); + else: put('?'); + puteol(); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err2.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err2.tri new file mode 100644 index 00000000..2e10dfe8 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/case-err2.tri @@ -0,0 +1,15 @@ +! [file: case-digit.tri, started: 23-Apr-2004] +! Testing new case-statement. +! error: integer constants should be different + +let + var n: Integer +in begin + getint(var n); + case n of + 0: put('0'); + 1: put('1'); + 0: put('0'); + else: put('?'); + puteol(); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.readme new file mode 100644 index 00000000..40f24eaf --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.readme @@ -0,0 +1,57 @@ +Author: Simon Kulessa +Version: 1.0 + +Reads a nondirected graph from the command line and colors the graph +with the minimum number of colors. + + +Number of Nodes: - A number between 0 and 14 +Complete? - Whether the graph is complete or not +Another Edge? - 'y' or 'Y' for another edge, + anything else to continue +Node 1: - A existing node id +Node 2: - A different existing node id + +A node id is a number between 0 and the number of nodes - 1. + + +Minimum number of colors +NodeId ColorId Number of Neighbours List of Neighbours + + +Number of nodes: 5 +Complete? y + +Graph succesfull colored with 5 color(s). +0 1 4 [1, 2, 3, 4] +1 4 4 [0, 2, 3, 4] +2 3 4 [0, 1, 3, 4] +3 5 4 [0, 1, 2, 4] +4 2 4 [0, 1, 2, 3] + + +Number of nodes: 5 +Complete? n +Another edge? y +Node 1: 0 +Node 2: 1 +Another edge? y +Node 1: 0 +Node 2: 2 +Another edge? y +Node 1: 1 +Node 2: 2 +Another edge? y +Node 1: 2 +Node 2: 3 +Another edge? y +Node 1: 2 +Node 2: 4 +Another edge? n + +Graph succesfull colored with 3 color(s). +0 1 2 [1, 2] +1 3 2 [0, 2] +2 2 4 [0, 1, 3, 4] +3 1 1 [2] +4 1 1 [2] diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.tri new file mode 100644 index 00000000..8a0e47f5 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/coloring.tri @@ -0,0 +1,434 @@ +! Reads a nondirected graph from the command line and colors the graph +! with the minimum number of colors. +! +! +! Number of Nodes: - A number between 0 and 14 +! Complete? - Whether the graph is complete or not +! Another Edge? - 'y' or 'Y' for another edge, +! anything else to continue +! Node 1: - A existing node id +! Node 2: - A different existing node id +! +! A node id is a number between 0 and the number of nodes - 1. +! +! +! Minimum number of colors +! NodeId ColorId Number of Neighbours List of Neighbours +! +! +! Number of nodes: 5 +! Complete? y +! +! Graph succesfull colored with 5 color(s). +! 0 1 4 [1, 2, 3, 4] +! 1 4 4 [0, 2, 3, 4] +! 2 3 4 [0, 1, 3, 4] +! 3 5 4 [0, 1, 2, 4] +! 4 2 4 [0, 1, 2, 3] +! +! +! Number of nodes: 5 +! Complete? n +! Another edge? y +! Node 1: 0 +! Node 2: 1 +! Another edge? y +! Node 1: 0 +! Node 2: 2 +! Another edge? y +! Node 1: 1 +! Node 2: 2 +! Another edge? y +! Node 1: 2 +! Node 2: 3 +! Another edge? y +! Node 1: 2 +! Node 2: 4 +! Another edge? n +! +! Graph succesfull colored with 3 color(s). +! 0 1 2 [1, 2] +! 1 3 2 [0, 2] +! 2 2 4 [0, 1, 3, 4] +! 3 1 1 [2] +! 4 1 1 [2] +! +! +! Author: Simon Kulessa +! Version: 1.0 + +let + ! node type + type Node ~ record + tag: Integer, + color: Integer, + size: Integer, + neighbours: array 13 of Integer + end; + + ! graph type + type Graph ~ record + size: Integer, + nodes: array 14 of Node + end; + + ! reads a single number from the command line + proc readNumber(var number: Integer) ~ + let + var c: Char; + var testeol : Boolean; + var testeof : Boolean + in begin + getint(var number); + eol(var testeol); + eof(var testeof); + while \ testeol /\ \ testeof do begin + get(var c); + eol(var testeol); + eof(var testeof); + end; + end; + + ! reads a single char from the command line + proc readChar(var c: Char) ~ + let + var x: Char; + var testeol : Boolean; + var testeof : Boolean + in begin + get(var c); + eol(var testeol); + eof(var testeof); + while \ testeol /\ \ testeof do begin + get(var x); + eol(var testeol); + eof(var testeof); + end; + end; + + ! prints a error message + proc printError() ~ + begin + put('i'); put('l'); put('l'); put('e'); put('g'); put('a'); put('l'); + put(' '); put('i'); put('n'); put('p'); put('u'); put('t'); puteol(); + end; + + ! prints the output message + proc printOutput(result: Integer) ~ + begin + puteol(); + put('G'); put('r'); put('a'); put('p'); put('h'); put(' '); put('s'); + put('u'); put('c'); put('c'); put('e'); put('s'); put('f'); put('u'); + put('l'); put('l'); put(' '); put('c'); put('o'); put('l'); put('o'); + put('r'); put('e'); put('d'); put(' '); put('w'); put('i'); put('t'); + put('h'); put(' '); putint(result); put(' '); put('c'); put('o'); + put('l'); put('o'); put('r'); put('('); put('s'); put(')'); put('.'); + puteol(); + end; + + ! prints the first input information + proc printInputInfo1() ~ + begin + put('N'); put('u'); put('m'); put('b'); put('e'); put('r'); put(' '); + put('o'); put('f'); put(' '); put('n'); put('o'); put('d'); put('e'); + put('s'); put(':'); put(' '); + end; + + ! prints the second input information + proc printInputInfo2() ~ + begin + put('A'); put('n'); put('o'); put('t'); put('h'); put('e'); put('r'); + put(' '); put('e'); put('d'); put('g'); put('e'); put('?'); put(' '); + end; + + ! prints the third input information + proc printInputInfo3() ~ + begin + put('N'); put('o'); put('d'); put('e'); put(' '); put('1'); put(':'); + put(' '); + end; + + ! prints the fourth input information + proc printInputInfo4() ~ + begin + put('N'); put('o'); put('d'); put('e'); put(' '); put('2'); put(':'); + put(' '); + end; + + ! prints the fifth input information + proc printInputInfo5() ~ + begin + put('C'); put('o'); put('m'); put('p'); put('l'); put('e'); put('t'); + put('e'); put('?'); put(' '); + end; + + ! prints the graphdata + proc printGraph(g: Graph) ~ + let + var i: Integer; + var j: Integer + + in begin + + i := 0; + while(i < g.size) do begin + putint(g.nodes[i].tag); + put(' '); + putint(g.nodes[i].color); + put(' '); + putint(g.nodes[i].size); + put(' '); + put('['); + + j := 0; + while(j < g.nodes[i].size) do begin + putint(g.nodes[i].neighbours[j]); + + j := j + 1; + if (j < g.nodes[i].size) then begin + put(','); + put(' '); + end else + end; + + put(']'); + puteol(); + + i := i + 1; + end; + end; + + ! creates a node + proc createNode(var g: Graph, id: Integer) ~ + let + var n: Node + in begin + n.tag := id; + n.size := 0; + n.color := 0; + g.nodes[id] := n; + end; + + ! creates a connection + proc createConnection(var g: Graph, s: Node, t: Node) ~ + let + var i: Integer; + var f: Integer + in begin + if ((\(s.tag = t.tag)) /\ (s.size < 13) /\ (t.size < 13)) then begin + + i := 0; + f := 0; + while ((i < s.size) /\ (f = 0)) do begin + if (s.neighbours[i] = t.tag) then begin + f := 1; + end else begin + i := i + 1; + end; + end; + + if (f = 1) then begin + printError(); + end else begin + + g.nodes[s.tag].neighbours[s.size] := t.tag; + g.nodes[s.tag].size := s.size + 1; + + g.nodes[t.tag].neighbours[t.size] := s.tag; + g.nodes[t.tag].size := t.size + 1; + end; + + end else begin + printError(); + end; + end; + + ! reads a graph from the commando line + proc createGraph(var g: Graph) ~ + let + var i: Integer; + var j: Integer; + var s: Node; + var t: Node; + var c: Char + + in begin + + ! Read graphsize + printInputInfo1(); + readNumber(var i); + g.size := i; + + if ((i < 0) \/ (i > 14)) then begin + + g.size := 0; + printError(); + + end else begin + + while i > 0 do begin + i := i-1; + createNode(var g, i); + end; + + ! Generate complete graph? + printInputInfo5(); + readChar(var c); + + if ((c = 'y') \/ (c = 'Y')) then begin + + i := 0; + while (i < g.size) do begin + + j := i + 1; + while (j < g.size) do begin + s := g.nodes[i]; + t := g.nodes[j]; + createConnection(var g, s, t); + + j := j + 1; + end; + + i := i + 1; + end; + end else begin + + ! Read another edge? + printInputInfo2(); + readChar(var c); + + while ((c = 'y') \/ (c = 'Y')) do begin + + ! Read start node + printInputInfo3(); + readNumber(var i); + + if ((i < 0) \/ (i >= g.size)) then begin + printError(); + end else begin + s := g.nodes[i]; + + ! Read target node + printInputInfo4(); + readNumber(var i); + + if ((i < 0) \/ (i >= g.size)) then begin + printError(); + end else begin + t := g.nodes[i]; + + ! Create the edge + createConnection(var g, s, t); + end; + end; + + ! Read another edge? + printInputInfo2(); + readChar(var c); + end; + end; + end; + end; + + ! checks the color recursivly + proc checkColor(var g: Graph, n: Node, lastColor: Integer, maxColor: Integer, var found: Integer) ~ + let + var color: Integer; + var m: Node; + var i: Integer; + var b: Integer; + var e: Integer + + in begin + if (n.color = lastColor) then begin + found := 0; + end else begin + if (\(n.color = 0)) then begin + found := 1; + end else begin + + color := 1; + b := 0; + + while ((b = 0) /\ (color <= maxColor)) do begin + + if (\(lastColor = color)) then begin + + g.nodes[n.tag].color := color; + b := 1; + i := n.size; + + while((i > 0) /\ (b = 1)) do begin + i := i - 1; + m := g.nodes[n.neighbours[i]]; + checkColor(var g, m, color, maxColor, var b); + end; + if (b = 0) then begin + g.nodes[n.tag].color := 0; + color := color + 1; + end else + + end else begin + color := color + 1; + end; + end; + + found := b; + end; + end; + end; + + ! trys to color the graph with the given number of colors + proc tryColoring(var g: Graph, maxColor: Integer, var found: Integer) ~ + let + var i: Integer; + var n: Node + in begin + + ! Init color labels + i := g.size; + while (i > 0) do begin + i := i -1; + g.nodes[i].color := 0; + end; + + ! Start coloring + n := g.nodes[i]; + checkColor(var g, n, 0 - 1, maxColor, var found); + + if (found = 1) then begin + + i := 0; + while((i < g.size) /\ (found = 1)) do begin + n := g.nodes[i]; + if (n.color = 0) then begin + checkColor(var g, n, 0 - 1, maxColor, var found); + end else + + i := i + 1; + end; + end else + end; + + ! global values + var g: Graph; + var i: Integer; + var b: Integer + +in begin + ! reads a graph from the command line + createGraph(var g); + + ! solve the coloring problem + i := 0; + b := 0; + + while((b = 0) /\ (i < g.size)) do begin + i := i + 1; + tryColoring(var g, i, var b); + end; + + ! print results + printOutput(i); + printGraph(g); +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/copyfile.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/copyfile.tri new file mode 100644 index 00000000..363245ea --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/copyfile.tri @@ -0,0 +1,53 @@ +! +! Simple File I/O example +! Copies from file `infile' to file `outfile' +! +let + const INNAME ~ + [ 'i', 'n', 'f', 'i', 'l', 'e', chr(0), chr(0), chr(0), chr(0), + chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0)]; + const OUTNAME ~ + [ 'o', 'u', 't', 'f', 'i', 'l', 'e', chr(0), chr(0), chr(0), + chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0)]; + var infile : Integer; + var outfile : Integer; + var c : Char; + var eof : Boolean +in begin + + fopen(var infile, INNAME, false); + + if (infile < 0) then begin + + ! error opening input file, message 'I!' + put('I'); + put('!'); + puteol() + + end else begin + + fopen(var outfile, OUTNAME, true); + + if (outfile < 0) then begin + + ! error opening output file, message 'O!' + put('O'); + put('!'); + puteol() + + end else begin + + ! both files open, begin copying + feof(infile, var eof); + while (\ eof) do begin + fget(infile, var c); + fput(outfile, c); + feof(infile, var eof) + end; + fclose(outfile) + + end; + + fclose(infile) + end +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/count.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/count.tri new file mode 100644 index 00000000..d61abda6 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/count.tri @@ -0,0 +1,12 @@ +let + const MAX ~ 10; + var n: Integer +in begin + getint(var n); + if (n>0) /\ (n<=MAX) then + while n > 0 do begin + putint(n); puteol(); + n := n - 1; + end + else +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.readme new file mode 100644 index 00000000..1447a19b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.readme @@ -0,0 +1,46 @@ +CRC-Berechnung auf Basis von CRC-12 +=================================== + +Autor: Tomislav Greguric + +weitere Gruppenmitglieder: Elif Tekes, Nabil Sayegh + + +Programmbeschreibung: +--------------------- + + Das vorliegende Programm "crc.tri" bzw. "crc.tam" berechnet zu + gegebenen Eingabedaten auf STDIN eine Checksumme. + + Dazu werden jeweils nacheinander drei Bytes eingelesen und ber + diese eine Checksumme nach dem CRC-12-Verfahren berechnet. Bei + weniger als drei Bytes werden die restlichen Bits mit Nullen + aufgefllt. Als Ausgabe liefert das Programm eine kummulierte + Checksumme und (in Anlehnung an sum(1) und cksum(1)) die nach oben + gerundete Anzahl der 1k-Blcke. + + Derzeit werden die einzelnen CRC-12-Summen geXORt, so da schnell + die grtmgliche Checksumme von 2^12-1=4095 entsteht. Eine Addition + wrde auch nicht viel bringen, da dann Triangles "maxint" die + nchsthhere Hrde wre. + + Da auch keine Bitoperationen mglich sind, wurden intern die Bits + als Array von Integer realisiert, natrlich mit der + stillschweigenden Bedingung, da dabei nur Nullen und Einsen benutzt + werden drfen. + + +Beispiele: +---------- + + tg@penguin1:~/crc-4/Triangle$ echo He | java TAM.Interpreter crc.tam + ********** TAM Interpreter (Java Version 2.1) ********** + 2032 1 + + Program has halted normally. + tg@penguin1:~/crc-4/Triangle$ echo Hello | java TAM.Interpreter crc.tam + ********** TAM Interpreter (Java Version 2.1) ********** + 4095 1 + + Program has halted normally. + tg@penguin1:~/crc-4/Triangle$ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.tri new file mode 100644 index 00000000..9244bd47 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/crc.tri @@ -0,0 +1,291 @@ +! CRC-12 Pruefsummenberechnung +! +! Verwendetes Generatorpolynom: G(x)=x^12+x^11+x^3+x^2+x+1 (== 1100000001111) + +let + ! Diverse Register + var r24 : array 24 of Integer; ! 3 zu checkende bytes + var r36 : array 36 of Integer; ! r24 mit angehaengten Nullen + var r13 : array 13 of Integer; ! Generatorpolynom + var rcs : array 13 of Integer; ! Gesamtchecksumme + + ! Generator in Bitschreibweise und als Integersumme + const G ~ [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]; + var g : Integer; + + ! Potenzen schlagen wir nach + const pot8 ~ [128, 64, 32, 16, 8, 4, 2, 1]; + const pot13 ~ [4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]; + + ! Drei einzulesende Bytes -> r24 + var chr1 : Char; + var chr2 : Char; + var chr3 : Char; + + ! Triangle ist gut im "hinter der Datei lesen", also doch selber machen + var readbehindeof : Boolean; + + ! "counter" zaehlt die 1024-Byte-Blocks in "blocks" + var counter : Integer; + var blocks : Integer; + + ! "i" wie Integer-Hilfsvariable + var i : Integer; + + ! Gesamtchecksumme als Int + var checksum : Integer; + + ! Debug + proc showr13() ~ + begin + i := 0; + while (i<13) do + begin + putint(r13[i]); + i := i+1; + end; + puteol(); + end; + + ! Debug + proc showr24() ~ + begin + i := 0; + while (i<24) do + begin + putint(r24[i]); + i := i+1; + end; + puteol(); + end; + + ! Debug + proc showr36() ~ + begin + i := 0; + while (i<36) do + begin + putint(r36[i]); + i := i+1; + end; + puteol(); + end; + + + ! XOR zweier Bits + func xor(val1: Integer, val2: Integer) : Integer ~ + if (val1 \= val2) then + 1 + else + 0 + ; + + ! CRC-12 auf 3 Bytes berechnen + proc crc() ~ + let + var i : Integer; + var j : Integer; + var k : Integer + in + begin + ! r36 von links auffllen, Rest nullen + i := 0; + while (i < 24) do + begin + r36[i] := r24[i]; + i := i + 1; + end; + while (i < 36) do + begin + r36[i] := 0; + i := i + 1; + end; + + ! Division Modulo 2 (eigentlich XOR) + j := 0; + while (j < 22) do + begin + i := 0; + k := 0; + while (i < 13) do + begin + k := r36[i+j] * pot13[i] + k; + i := i + 1; + end; + + if (k >= g) then + begin + i := 0; + while (i < 13) do + begin + r36[i+j] := xor(r36[i+j], r13[i]); + i := i + 1; + end; + end + else + begin + i := 0; + while (i < 13) do + begin + r36[i+j] := xor(r36[i+j], 0); ! sprich: einfach weitergehen und nix machen + i := i + 1; + end; + end; + j := j + 1; + end; + + ! Leider noch unbefriedigend... + ! Gesamtchecksumme erreicht schnell 2^12-1, + ! evtl. faellt mir noch was besseres ein + ! (Triangle gibt bei Zahlen > maxint einfach 0 aus, hmmm....) + i := 0; + while (i < 13) do + begin +! r13[i] := r36[i+24]; + rcs[i] := xor(r13[i], rcs[i]); + i := i + 1; + end; + end; + + ! Lese Wert nach r24, wobei place=1=linkesByte=MSB, place=2=mittleresByte, und place=3=rechtesByte=LSB + proc load(place: Integer, val: Integer) ~ + let + var i : Integer; + var j : Integer; + var v : Integer; + + ! Ist Bit mit Wertigkeit div gesetzt? + func bitset(val: Integer, div: Integer) : Integer ~ + if (div = 0) then + 0 + else + if ((val / div) > 0) then + 1 + else + 0 + in + begin + v := val; + i := (place-1)*8; + j := 0; + + ! ganzes Byte in r24 einsetzen + while (j < 8) do + begin + r24[i] := bitset(v, pot8[j]); + if (r24[i] = 1) then + v := v - pot8[j] + else + ; + i := i + 1; + j := j + 1; + end; + end; + + ! 24 bits einlesen, falls mglich + proc readin() ~ + let + var n1 : Integer; + var n2 : Integer; + var n3 : Integer; + var i : Integer; + var testeof : Boolean + in + begin + counter := 0; + blocks := 1; + readbehindeof := false; + + eof(var testeof); + while \testeof do + begin + chr1 := ' '; + chr2 := ' '; + chr3 := ' '; + get(var chr1); + get(var chr2); + get(var chr3); + n1 := ord(chr1); + n2 := ord(chr2); + n3 := ord(chr3); + ! Falls wir ueber das Dateiende hinausgelesen haben, + ! dann von hinten den "Muell" wegmachen und fuer uns + ! in "readbehindoef" klarstellen, dass wir definitiv + ! fertig sind + if (n3 < 0) then + begin + counter := counter-1; + n3 := 0; + if (n2 < 0) then + begin + counter := counter-1; + n2 := 0; + if (n1 < 0) then + begin + readbehindeof := true; + counter := counter-1; + n1 := 0; + end + else + ; + end + else + ; + end + else + ; + ! nun die Bytes ins Register r24 schieben und die CRC darueber berechnen + if (\ readbehindeof) then + begin + load(1, n1); + load(2, n2); + load(3, n3); + crc(); + end + else + ; + ! und als Bonus die Anzahl der 1k-Bloecke bestimmen + counter := counter+3; + if (counter >= 1024) then + begin + counter := 0; + blocks := blocks + 1; + end + else + ; + + eof(var testeof); + end; + end + +in +begin + ! Initalisierungen, Generatorpolynom -> r13 und als Integer + i := 0; + g := 0; + checksum := 0; + while (i < 13) do + begin + rcs[i] := 1; + r13[i] := G[i]; + g := (r13[i] * pot13[i]) + g; + i := i + 1; + end; + + ! von STDIN lesen und CRC-12 berechnen + readin(); + + ! Checksumme aus der Bitschreibweise errechnen + i := 0; + while (i < 12) do + begin + checksum := rcs[i+1] * pot13[i+1] + checksum; + i := i + 1; + end; + + ! Checksumme und Blocks ausgeben + putint(checksum); + put(' '); + putint(blocks); + puteol(); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.readme new file mode 100644 index 00000000..614b1367 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.readme @@ -0,0 +1,67 @@ +! +! Implementation of several data types in Triangle by Boris Nickel, boris-nickel@web.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html + +While for adding a for...next-loop a compiler modification is necessary, I thought +adding some abstract datatypes and a few operations might me usefull for later use. + +The file datatypes.tri includes all the methods/functions/datatypes described below +as well as a short main programm, representing a little test suite. +For design I choosed mostly to use proc, because func allows to return expressions only. + + +Here is a list of what I added so far: +-------------------------------------- + + +- Datatype String very basic string implementation: Triangle doesn't support variabe arrays, + so this a simple fixed array of 80 chars, directly accessible with String.Str + Note: Each string must be terminated with a backslash \ by definition + +- Method proc readstring(var strg: String) reads a String from the keyboard into strg and terminates it correctly + +- Method proc strcat(var str1: String, var str2: String) Concatenate two strings: Add content of str2 to str1 -> str1 = str1str2 + +- Method proc putstring(var strg: String) prints a string without the terminating \ to the std output + +- Method proc strlen(strg: String, var length: Integer) determines the length of a string and gives an integer output of the length + +- Method proc strrev(var strg: String) Reverses a string, strg = gtrs + +- Datatype Date Represents a date. It's a record including Integers day, month and year, + format ddmmyyyy is used + +- Datatype Time Represents a time. It's a record including Integers hours, minutes and seconds, + 24hr format hh:mm:ss is used + +- Constructor func createDate (day: Integer, month: Integer, year: Integer) : Date - use this constructor to ensure a date has the corect format, + is a real date (and not 53th of May 2006 i.e.). If a wrong date is given, the date + 1.1.1000 is created instead. In later versions an error throwing and handling + system should replace this behavior + +- Constructor func createTime (hours: Integer, minutes: Integer, seconds: Integer) : Time - uns this constructor to ensure a time has the correct + format, is a real time (and not 54:26:99 i.e.). If a wrong time is given, the time + 00:00:00 is created instead. See note at createDate. + +- Method proc putdate (inDate: Date) Prints a formatted date to std out in format dd/mm/yyyy and adds leading zeros if + day or month has just one digit + +- Method proc puttime (inTime: Time, outtype: Integer) Prints a formatted time to std out. Outtype specifies the format: + If outtype = 1, an output in 24hr format is generated (hh:mm:ss), including leading + zeroes if any of the values has just one digit. + If outtype is != 1, an output in am/pm format is generated (hh:mm:ss am/pm), adding + leading zeros to minute and second only if necessary + +- Method proc diffdays(date1: Date, date2: Date, var output: Integer) - counts the number of days between to given dates. Output is + |date1 - date2| = output, so output will always be a positive number of days, + regardless if date1 or date2 is the bigger one. This function does not take care + of leapyears (maybe added in the future) + + + + + +[EOF] \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.tri new file mode 100644 index 00000000..307b0487 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/datatypes.tri @@ -0,0 +1,264 @@ +! +! Implementation of several data types in Triangle by Boris Nickel, boris-nickel@web.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html +! + +let +! Strings +!-------- +! The easy way - Triangle knows constant sized arrays only, so I add a fixed string type, +! the string terminator is always a backslash \ + type String ~ record + Str: array 80 of Char + end; + + ! Fill a string + proc readstring(var strg: String) ~ + let + var chint: Char; + var length: Integer; + var testeof : Boolean; + var testeol : Boolean + in begin + length := 0; + eof(var testeof); + eol(var testeol); + while \ testeol /\ \ testeof do begin + get(var chint); + strg.Str[length] := chint; + length := length + 1; + eof(var testeof); + eol(var testeol); + end; + strg.Str[length-2] := '\'; + end; + + ! Concatenate two strings: Add content of str2 to str1 + proc strcat(var str1: String, var str2: String) ~ + let + var ix: Integer; + var jx: Integer + in begin + ! search for terminator in first string... + ix := 0; + while str1.Str[ix] \= '\' do begin + ix := ix + 1; + end; + + ! now start copying.... + jx := 0; + while str2.Str[jx] \= '\' do begin + str1.Str[ix+jx] := str2.Str[jx]; + jx := jx + 1; + end; + str1.Str[ix+jx] := '\'; + end; + + ! Print a string + proc putstring(var strg: String) ~ + let + var i: Integer + in begin + i := 0; + while \ (strg.Str[i] = '\') do begin + put(strg.Str[i]); + i := i + 1; + end; + end; + + ! length of a string + proc strlen(strg: String, var length: Integer) ~ + begin + length := 0; + while \ (strg.Str[length] = '\') do begin + length := length + 1; + end; + end; + + ! Reverse a string + proc strrev(var strg: String) ~ + let + var i: Integer; + var j: Integer; + var tempstr: String + in begin + strlen(strg, var i); + i:= i - 1; j := 0; + while i >= 0 do begin + tempstr.Str[j] := strg.Str[i]; + i := i - 1; + j := j + 1; + end; + tempstr.Str[j] := '\'; + strg := tempstr; + end; + + + +! Date / Time types and operations +!--------------------------------- + + ! Standard date in ddmmyyyy format + type Date ~ record + day: Integer, + month: Integer, + year: Integer + end; + + ! Standard time in hh:mm:ss format + type Time ~ record + hours: Integer, + minutes: Integer, + seconds: Integer + end; + + ! Date Constructor to ensure correct format on creation (dd/mm/yyyy) + func createDate (day: Integer, month: Integer, year: Integer) : Date ~ + let + var datum: Date + in + if ( (day > 0) /\ (day <= 31) /\ (month > 0) /\ (month <=12) /\ (year <= 9999) ) then + {day ~ day, month ~ month, year ~ year} + else + {day ~ 1, month ~ 1, year ~ 1000 }; + + ! Time Constructor to ensure correct format on creation (hh:mm:ss) + func createTime (hours: Integer, minutes: Integer, seconds: Integer) : Time ~ + let + var zeit: Time + in + if ( (hours > 0) /\ (hours <= 23) /\ (minutes > 0) /\ (minutes <=59) /\ (seconds > 0) /\ (seconds <= 59) ) then + {hours ~ hours, minutes ~ minutes, seconds ~ seconds} + else + {hours ~ 0, minutes ~ 0, seconds ~ 0}; + + ! ToString methods: + proc putdate (inDate: Date) ~ + begin + if (inDate.day <= 9) then put('0') else; putint(inDate.day); put('/'); + if (inDate.month <= 9) then put('0') else; putint(inDate.month); put('/'); + if (inDate.year <= 999) then + begin + put('1'); put('0'); put('0'); put('0'); + end + else putint(inDate.year); + end; + + ! type = 1 means 24hr format hh:mm:ss, type = 2 am / pm format + proc puttime (inTime: Time, outtype: Integer) ~ + begin + if outtype = 1 then + begin + if (inTime.hours <= 9) then put('0') else; putint(inTime.hours); put(':'); + if (inTime.minutes <= 9) then put('0') else; putint(inTime.minutes); put(':'); + if (inTime.seconds <= 9) then put('0') else; putint(inTime.seconds); + end + else + begin + if inTime.hours > 12 then + putint(inTime.hours - 12) + else + putint(inTime.hours); put(':'); + + if (inTime.minutes <= 9) then put('0') else; putint(inTime.minutes); put(':'); + if (inTime.seconds <= 9) then put('0') else; putint(inTime.seconds); + + if inTime.hours <12 then + begin put(' '); put('a'); put('m') end + else + begin put(' '); put('p'); put('m'); end + end + end; + + ! how many days are between two dates ? I'm not taking care of leapyears. + proc diffdays(date1: Date, date2: Date, var output: Integer) ~ + let + var diffd: Integer; + var total: Integer; + var months: array 13 of Integer; + var tmpdate: Date; + var tmpdate1: Date; + var tmpdate2: Date + in begin + diffd := 0; total:= 0; output := 0; + months := [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + !check if date1 is > than date2: + if (date1.year < date2.year) \/ ((date1.year = date2.year) /\ (date1.month < date2.month)) \/ ((date1.year = date2.year) /\ (date1.month = date2.month) /\ (date1.day < date2.day)) then + begin + tmpdate1 := date2; + tmpdate2 := date1; + end + else + begin + tmpdate1 := date1; + tmpdate2 := date2; + end; + + !now count all the remaining days: + tmpdate := tmpdate2; + while \ ( (tmpdate1.day = tmpdate.day) /\ (tmpdate1.month = tmpdate.month) /\ (tmpdate1.year = tmpdate.year) ) do begin + output := output + 1; + + if tmpdate.day < months[tmpdate.month] then + tmpdate.day := tmpdate.day + 1 + else + begin + tmpdate.day := 1; + if tmpdate.month < 12 then + tmpdate.month := tmpdate.month + 1 + else + begin + tmpdate.month := 1; + tmpdate.year := tmpdate.year + 1 + end + end + + end; + end; + + + + ! Main Program - Test "class" + ! --------------------------- + + var str1: String; + var str2: String; + var x: Integer; + var datum : Date; + var datum2 : Date; + var zeit: Time + + in begin + + ! Test Date creator + datum := createDate(14, 5, 1977); + putdate(datum); puteol(); + + ! Test Time creator + zeit := createTime(4, 8, 33); + puttime(zeit, 1); puteol(); + puttime(zeit, 2); puteol(); + + ! String tests + readstring(var str2); + !str2.Str[0] := 'y'; str2.Str[1] := 'y'; str2.Str[2] := 'y'; str2.Str[3] := '\'; + str1.Str[0] := 'x'; str1.Str[1] := 'x'; str1.Str[2] := 'x'; str1.Str[3] := '\'; + + strcat(var str2, var str1); + putstring(var str2); puteol(); + + strlen(str2, var x); + putint(x); puteol(); + + strrev(var str2); + putstring(var str2); puteol(); + + datum2 := createDate(14, 5, 2006); + diffdays(datum, datum2, var x); + putint(x); + + end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.readme new file mode 100644 index 00000000..a8ff246e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.readme @@ -0,0 +1,12 @@ +Autor: +Matthus Martynus + +Funktion des Programms: +Mehrfache Anwendung des Djikstra-Algorithmus um alle krzesten Wege zwischen +jeweils zwei Knoten zu berechnen. + +Bedienung des Programms: +Eingabe des Graphen wie in den drei Beispiel-Files (testgraph[1-3].txt). Die +Anzahl der Knoten ist auf 40 beschrnkt. Von jedem Knoten drfen maximal 10 +Kanten ausgehen. Als Ausgabe kommt eine Tabelle wie sie in den drei Ausgabe- +Files (Result[1-3].txt) zu sehen ist. \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.tri new file mode 100644 index 00000000..d05f1333 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra.tri @@ -0,0 +1,167 @@ +let + + ! record for storing a directed edge + type Edge ~ record + endNodeID: Integer, + distance: Integer + end; + + ! record for storing all outgoing edges of a node + type EdgeArray ~ record + content: array 10 of Edge, + length: Integer + end; + + ! record for storing a node with his current state and his edges + type Node ~ record + label: Integer, + permanent: Boolean, + edges: EdgeArray + end; + + ! record for storing all nodes + type NodeArray ~ record + content: array 40 of Node, + length: Integer + end; + + ! procedure for initiating the nodes for Djikstra-phase + proc iniNodes(var nodes: NodeArray) ~ + let + + var i: Integer + + in begin + i := 0; + while i < nodes.length do begin + nodes.content[i].label := maxint; + nodes.content[i].permanent := false; + i := i + 1; + end; + end; + + ! procedure for reading the graph from the standard input + proc readGraph(var nodes: NodeArray) ~ + let + + ! procedure for adding an edge to the array + proc addEdge(var edges: EdgeArray, e: Edge) ~ + begin + edges.content[edges.length].endNodeID := e.endNodeID; + edges.content[edges.length].distance := e.distance; + edges.length := edges.length + 1; + end; + + var i: Integer; + var startID: Integer; + var endID: Integer; + var distance: Integer; + var edge: Edge; + + var testeof : Boolean + in begin + ! reading nodecount + getint(var nodes.length); + ! initiating edge-arrays + i := 0; + while i < nodes.length do begin + nodes.content[i].edges.length := 0; + i := i + 1; + end; + ! reading edges + eof(var testeof); + while \ testeof do begin + ! reading an edge + getint(var startID); + getint(var endID); + getint(var distance); + edge.endNodeID := endID; + edge.distance := distance; + ! adding the Edge to the array + addEdge(var nodes.content[startID].edges, edge); + eof(var testeof); + end; + end; + + ! procedure for writing the results of a Djikstra-phase to the standard output + proc outputResults(var nodes: NodeArray, startID: Integer) ~ + let + + var i: Integer + + in begin + i := 0; + putint(startID); + while i < nodes.length do begin + put(chr(9)); + ! write only the value if the node has been reached + if nodes.content[i].label < maxint then + putint(nodes.content[i].label) + else; + i := i + 1; + end; + puteol(); + end; + + var nodes: NodeArray; + var actID: Integer; + var destID: Integer; + var newLabel: Integer; + var n: Integer; + var i: Integer + +in begin + readGraph(var nodes); + ! output of the headline with the node-IDs + n := 0; + while n < nodes.length do begin + put(chr(9)); + putint(n); + n := n + 1 + end; + puteol(); + ! selection and initiation of the startNode + n := 0; + while n < nodes.length do begin + iniNodes(var nodes); + nodes.content[n].label := 0; + actID := n; + ! one Djikstra-phase + while (\ nodes.content[actID].permanent) do begin + ! setting node-label as permanent + nodes.content[actID].permanent := true; + i := 0; + ! actualizing the labels of all neighbours + while i < nodes.content[actID].edges.length do begin + newLabel := nodes.content[actID].label + nodes.content[actID].edges.content[i].distance; + destID := nodes.content[actID].edges.content[i].endNodeID; + ! path about current row is shorter, then actualize label + if nodes.content[destID].label > newLabel then + nodes.content[destID].label := newLabel + else; + i := i + 1; + end; + i := 0; + ! selecting the next node + while i < nodes.length do begin + ! select only nodes that are not labeled permanently + if \ nodes.content[i].permanent then + ! select only nodes that already has been reached + if nodes.content[i].label < maxint then + ! select the first node, that is not labeled permanently + if nodes.content[actID].permanent then + actID := i + else + ! select the node with the minimal label + if nodes.content[actID].label > nodes.content[i].label then + actID := i + else + else + else; + i := i + 1; + end; + end; + outputResults(var nodes, n); + n := n + 1 + end +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra1.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra1.indata new file mode 100644 index 00000000..1dd9afa6 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra1.indata @@ -0,0 +1,101 @@ +40 +0 19 10 +1 33 48 +1 38 57 +1 6 52 +2 27 48 +2 4 52 +2 30 61 +3 31 81 +3 16 62 +3 37 31 +4 10 14 +4 8 57 +4 38 55 +5 36 61 +5 2 84 +6 28 37 +7 31 26 +8 38 71 +8 22 37 +8 3 95 +8 12 30 +8 36 47 +10 13 94 +10 11 39 +11 6 83 +12 33 53 +12 9 50 +12 0 15 +13 10 94 +13 19 45 +13 28 58 +13 34 82 +14 11 36 +14 20 33 +14 29 73 +14 3 37 +14 1 70 +14 17 22 +15 9 8 +15 5 48 +15 19 48 +16 5 61 +16 13 62 +17 23 35 +17 4 48 +19 27 41 +19 36 30 +20 32 58 +20 33 54 +20 6 35 +21 9 75 +21 32 94 +22 13 37 +22 5 57 +22 33 65 +22 18 71 +23 32 67 +23 4 69 +23 38 23 +24 4 61 +24 17 17 +24 36 58 +25 9 85 +25 38 71 +25 39 79 +26 34 34 +26 11 59 +26 6 37 +26 23 51 +27 23 33 +27 12 44 +28 36 18 +29 25 65 +29 30 85 +29 33 91 +30 25 35 +31 18 49 +31 38 66 +32 28 59 +32 2 38 +33 15 74 +33 26 51 +33 11 18 +33 23 61 +33 35 62 +34 23 85 +35 8 37 +35 10 42 +36 2 42 +36 21 24 +36 30 21 +36 38 47 +37 39 89 +38 27 52 +38 7 71 +38 11 30 +38 37 43 +38 23 23 +39 11 85 +39 1 72 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra2.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra2.indata new file mode 100644 index 00000000..be0f1d17 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra2.indata @@ -0,0 +1,101 @@ +40 +0 28 50 +0 11 97 +0 30 73 +0 19 79 +0 16 73 +2 18 73 +2 9 26 +4 27 88 +4 36 86 +4 23 55 +4 26 39 +5 20 72 +6 24 69 +7 9 15 +7 22 65 +7 16 50 +8 13 87 +8 22 78 +9 6 15 +9 25 67 +9 35 38 +10 35 14 +10 23 19 +10 8 66 +10 7 52 +10 9 50 +10 19 37 +11 29 61 +11 23 41 +12 5 16 +12 33 59 +12 11 32 +12 14 55 +12 32 28 +12 25 37 +12 30 36 +13 7 73 +13 5 40 +13 32 59 +14 24 68 +14 27 62 +15 19 84 +16 18 85 +16 37 31 +16 33 53 +17 25 94 +18 38 97 +18 1 30 +18 31 99 +18 2 73 +19 38 56 +19 10 37 +20 30 88 +20 36 34 +20 26 55 +21 25 29 +22 2 81 +22 36 106 +22 31 61 +22 1 76 +22 10 22 +23 17 57 +24 17 55 +24 31 79 +25 7 73 +25 27 20 +26 3 69 +26 18 77 +26 10 34 +26 0 72 +26 19 70 +26 33 29 +27 38 27 +27 34 28 +27 4 88 +27 15 91 +28 38 78 +29 14 43 +29 22 51 +30 7 77 +30 29 65 +30 35 47 +30 5 21 +30 19 8 +30 32 32 +31 1 73 +31 33 13 +32 28 67 +32 29 40 +32 34 31 +32 31 85 +32 38 55 +34 10 10 +36 6 82 +36 16 86 +37 3 29 +37 1 31 +37 2 69 +38 21 37 +39 13 64 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra3.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra3.indata new file mode 100644 index 00000000..960d41c1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/dijkstra3.indata @@ -0,0 +1,101 @@ +40 +0 15 62 +0 18 65 +0 9 70 +0 30 32 +0 14 75 +1 30 50 +1 36 97 +2 30 76 +2 6 91 +2 27 8 +2 0 84 +3 7 76 +3 37 33 +3 20 75 +5 25 32 +5 8 63 +5 31 37 +5 13 29 +5 35 47 +6 7 39 +6 17 42 +6 11 78 +7 22 5 +8 0 85 +8 12 68 +8 5 63 +10 16 87 +11 21 19 +12 19 44 +12 6 17 +12 17 52 +12 20 46 +13 25 60 +13 24 85 +13 16 70 +14 8 35 +14 33 41 +14 39 43 +14 28 54 +15 13 22 +15 14 95 +16 10 87 +16 12 62 +16 21 42 +17 37 100 +18 15 81 +18 30 59 +18 38 51 +19 4 37 +19 2 43 +19 11 37 +19 28 9 +20 33 36 +20 1 12 +21 13 91 +21 14 11 +22 10 6 +22 20 12 +22 30 53 +22 0 84 +23 30 45 +23 33 19 +23 34 25 +23 39 16 +24 26 52 +24 37 37 +24 34 72 +24 3 69 +25 35 35 +26 23 30 +26 19 43 +26 12 31 +28 21 48 +28 38 60 +28 14 54 +28 31 63 +29 26 5 +30 3 22 +30 22 53 +31 35 28 +32 10 60 +34 19 27 +35 28 45 +35 39 28 +35 18 5 +35 38 47 +35 24 51 +35 34 22 +36 14 60 +36 8 87 +36 37 39 +36 30 72 +37 0 11 +37 16 35 +37 26 26 +37 22 87 +38 24 49 +38 15 53 +39 7 56 +39 19 26 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.readme new file mode 100644 index 00000000..d3dc201a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.readme @@ -0,0 +1,8 @@ +Autor: Nicolas Weber + +Implementiert den Bresenham-Linien-Zeichnen-Algorithmus. Trickst ein bisschen, +um mit Triangles kleinem Speicher zurechtzukommen. Gibt ein Bild im .pgm-Format +auf stdin aus. + +Das Programm erzeugt immer die selbe Ausgabe, die in der Datei out.pgm +beiliegt. \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.tri new file mode 100644 index 00000000..96bee892 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/drawing3.tri @@ -0,0 +1,323 @@ +! Creates a simple 54x50 image and writes to stdout (it pgm format). +! usage: +! java TAM.Interpreter obj.tam | grep -v "\*" > out.pgm +! xv out.pgm + +let + + type PackedPixel ~ Integer; !three pixels packed into an int + type Byte ~ Integer; !one pixel + + ! The Triangle code emitter is a bit strange: A single record + ! may not be larger than 255 words. Thus, if we would define + ! an Image record consisting of an Integer for width and + ! height and a data array, the data array could contain 254 elements + ! at most -- barely enough for a 15x15 image. + ! Because of this, the following records are needed to support + ! images with somewhat larger dimensions. + ! [For even larget images, some more records could be used (a Tile + ! is an array of Scanlines, an Image is an array of Tiles), but + ! the stupid Triangle interpreter has a maximal data store size of + ! 1024 words (!!) anyways and segfaults if our image data is larger + ! than that.] + ! To leave room for 32 local variables, the image data + ! size is maximal 4*225 = 900 bytes -- 30x30 pixels, not *that* much better... + ! (this has at least the benefit that we don't have to fear overflow + ! in expressions like y*width + x :-P ) + ! A Triangle integer is 16 bit - because they are signed, using only + ! the lower 15 bits is easier (this way, they are always non-negative). + ! To increase the maximal image size a bit more, we store three 5bit pixels + ! in one Integer (this gives us only 32 gray levels, but that's worth it). + ! This way we get 900*3 = 2700 pixels - a 54x50 image. + + const BUFFERSIZE ~ 225; + const PIXSIZE ~ 3*BUFFERSIZE; !3 values in one "pixel" + + type Buffer ~ record + ! size should match BUFFERSIZE (Triangle needs an integer literal, + ! I can't use BUFFERSIZE here :-( ) + data : array 225 of PackedPixel + end; + + type Image ~ record + ! grayscale image + + buffer : array 4 of Buffer, + width : Integer, + height: Integer + end; + + proc createImage(var image : Image, w : Integer, h : Integer) ~ + begin + !check if it fits into mem, halt program if not + if w*h > (4*PIXSIZE) then + let + var bla : Integer + in begin + put('x'); puteol(); + bla := 30000; + bla := 30000*bla; !integer overflow will halt program + end else ; + + image.width := w; + image.height := h; + end; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! bit fiddling stuff + func pow2(v : Integer) : Integer ~ + if v = 0 then 1 else 2*pow2(v - 1); + + ! g is 0, 1 or 2 to select one of the three pixels + func getGroup(p : PackedPixel, g : Integer) : Byte ~ + (p / pow2(g*5)) // 32; + + ! v has to be < 32 + !func setGroup(p : Pixel, v : Byte, g : Integer) : Pixel ~ + ! ! don't factor pow2(g*5) to prevent negative numbers + ! (p - getGroup(p, g)*pow2(g*5)) + v*pow2(g*5); + + !for whatever reasons the above code gives an overflow all the time. + !it works with a local variable, though. Triangle rocks. + + proc setGroup(var p : PackedPixel, v : Byte, g : Integer) ~ + let + ! required to work around some Triangle bug... + var tmp : Integer + in begin + ! clear old bits + tmp := getGroup(p, g)*pow2(g*5); + p := p - tmp; + + ! set new bits + if v < 31 then tmp := v else tmp := 31; + tmp := tmp*pow2(g*5); + p := p + tmp + end; + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! set/get a single pixel + +! proc setPixel(var image : Image, x : Integer, y : Integer, value : Integer) ~ +! let +! var address : Integer +! in begin +! address := y*image.width + x; +! image.buffer[address / BUFFERSIZE].data[address // BUFFERSIZE] := value; +! end; +! +! func getPixel(image : Image, x : Integer, y : Integer) : Pixel ~ +! image.buffer[ (y*image.width + x) / BUFFERSIZE ]. +! data[ (y*image.width + x) // BUFFERSIZE ]; + + ! MIST: das da oben geht nicht, weil Triangle nicht will, das einzelne + ! Argumente groesser als 255 Woerter sind. Also so: + + proc setPixel(x : Integer, y : Integer, w : Integer, + var buff0 : Buffer, var buff1 : Buffer, + var buff2 : Buffer, var buff3 : Buffer, value : Byte) ~ + let + var address : Integer + in begin + address := y*w + x; + if address / PIXSIZE = 0 then + setGroup(var buff0.data[(address // PIXSIZE) / 3], value, + (address // PIXSIZE) // 3) + else if address / PIXSIZE = 1 then + setGroup(var buff1.data[(address // PIXSIZE) / 3], value, + (address // PIXSIZE) // 3) + else if address / PIXSIZE = 2 then + setGroup(var buff2.data[(address // PIXSIZE) / 3], value, + (address // PIXSIZE) // 3) + else if address / PIXSIZE = 3 then + setGroup(var buff3.data[(address // PIXSIZE) / 3], value, + (address // PIXSIZE) // 3) + else + end; + + ! the buffn's aren't changed, but if we don't pass them by reference, + ! Triangle tries to copy them before passing them to the function. + ! This overflows the data store, so we pass by reference to avoid + ! the copy + func getPixel(x : Integer, y : Integer, w : Integer, + var buff0 : Buffer, var buff1 : Buffer, + var buff2 : Buffer, var buff3 : Buffer) : Byte ~ + if (y*w + x) / PIXSIZE = 0 then + getGroup(buff0.data[((y*w + x) // PIXSIZE) / 3], + ((y*w + x) // PIXSIZE) // 3) + else if (y*w + x) / PIXSIZE = 1 then + getGroup(buff1.data[((y*w + x) // PIXSIZE) / 3], + ((y*w + x) // PIXSIZE) // 3) + else if (y*w + x) / PIXSIZE = 2 then + getGroup(buff2.data[((y*w + x) // PIXSIZE) / 3], + ((y*w + x) // PIXSIZE) // 3) + else if (y*w + x) / PIXSIZE = 3 then + getGroup(buff3.data[((y*w + x) // PIXSIZE) / 3], + ((y*w + x) // PIXSIZE) // 3) + else + 0; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! save image + + proc writePbmAscii(w : Integer, h : Integer, + var buff0 : Buffer, var buff1 : Buffer, + var buff2 : Buffer, var buff3 : Buffer) ~ + let + var x : Integer; + var y : Integer + in begin + !write header + put('P'); put('2'); puteol(); !format id + putint(w); put(' '); putint(h); puteol(); !size + putint(31); puteol(); !maximum gray value + + !write data + y := 0; + while y < h do begin + + x := 0; + while x < w do begin + putint(getPixel(x, y, w, var buff0, var buff1, var buff2, var buff3)); + put(' '); + x := x + 1 + end; + + puteol(); + y := y + 1 + end; + end; + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! line drawing + + proc incPixel(x : Integer, y : Integer, w : Integer, + var buff0 : Buffer, var buff1 : Buffer, + var buff2 : Buffer, var buff3 : Buffer) ~ + setPixel(x, y, w, var buff0, var buff1, var buff2, var buff3, + getPixel(x, y, w, var buff0, var buff1, var buff2, var buff3) + 9); + + ! draws a line with the bresenham algorithm. increments pixels drawn. + ! doesn't clip the line, so pass only valid coords! + ! start and end points are both inclusive. + proc drawLine(x1 : Integer, y1 : Integer, x2 : Integer, y2 : Integer, + w : Integer, var buff0 : Buffer, var buff1 : Buffer, + var buff2 : Buffer, var buff3 : Buffer) ~ + let + var xLength : Integer; + var yLength : Integer; + var dx : Integer; + var dy : Integer; + var error : Integer; + var i : Integer; + var xCoord : Integer; + var yCoord : Integer + in begin + + xCoord := x1; + yCoord := y1; + error := 0; + xLength := x2 - x1; + if xLength < 0 then + begin + xLength := 0 - xLength; + dx := 0 - 1; + end + else + dx := 1; + + yLength := y2 - y1; + if yLength < 0 then + begin + yLength := 0 - yLength; + dy := 0 - 1; + end + else + dy := 1; + + if xLength < yLength then !m > 1 + begin + i := 0; + while i <= yLength do + begin + incPixel(xCoord, yCoord, w, var buff0, var buff1, var buff2, var buff3); + yCoord := yCoord + dy; + error := error + xLength; + if error >= yLength then + begin + xCoord := xCoord + dx; + error := error - yLength; + end else; + i := i + 1 + end; + end + else !m <= 1 + begin + i := 0; + while i <= xLength do + begin + incPixel(xCoord, yCoord, w, var buff0, var buff1, var buff2, var buff3); + xCoord := xCoord + dx; + error := error + yLength; + if error >= xLength then + begin + yCoord := yCoord + dy; + error := error - xLength; + end else; + i := i + 1 + end; + end; + end; + + const STEPS ~ 10; + var image : Image; + var i : Integer; + var j : Integer + +in begin + + + ! draw a fancy image + createImage(var image, 54, 50); + i := 0; + while i < STEPS do begin + drawLine((i*image.width)/STEPS, 0, + 0, image.height - 1 - ((i*image.height)/STEPS), + image.width, + var image.buffer[0], var image.buffer[1], + var image.buffer[2], var image.buffer[3]); + drawLine((i*image.width)/STEPS, 0, + image.width - 1, (i*image.height)/STEPS, + image.width, + var image.buffer[0], var image.buffer[1], + var image.buffer[2], var image.buffer[3]); + + drawLine((i*image.width)/STEPS, image.height - 1, + image.width - 1, image.height - 1 - ((i*image.height)/STEPS), + image.width, + var image.buffer[0], var image.buffer[1], + var image.buffer[2], var image.buffer[3]); + drawLine((i*image.width)/STEPS, image.height - 1, + 0, (i*image.height)/STEPS, + image.width, + var image.buffer[0], var image.buffer[1], + var image.buffer[2], var image.buffer[3]); + i := i + 1 + end; + + writePbmAscii(image.width, image.height, + var image.buffer[0], var image.buffer[1], + var image.buffer[2], var image.buffer[3]) + + ! testing code: + !setPixel(50, 48, image.width, var image.buffer[0], var image.buffer[1], var image.buffer[2], var image.buffer[3], 15); + !putint(getPixel(50, 48, image.width, var image.buffer[0], var image.buffer[1], var image.buffer[2], var image.buffer[3])); + +! i := 30000; +! setGroup(var i, 31, 2); +! putint(getGroup(i, 2)); + +end + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/entpacken.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/entpacken.tri new file mode 100644 index 00000000..600b8062 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/entpacken.tri @@ -0,0 +1,191 @@ +let + var code : array 16 of Integer; + + var bits : array 8 of Boolean; + var bitP : Integer; + var iseof : Boolean; + var i : Integer; + var tmpbool : Boolean; + var tmpchar : Char; + var tmpcode : array 16 of Integer; + + ! Realisiert das bitweise Einlesen von der Eingabe. + ! Hierzu wird immer ein Char gelesen, dieses als Integer dargestellt + ! und schlielich in die Bitdarstellung befhrt und im Boolean-Array Bits abgelegt. + ! Nacheinander wird nun ein Bit gelesen, bis der Pointer nicht mehr im Bits-Array steht. + ! Nun wird das nchste Char von der Eingabe gelesen. + ! Wird das Dateinde erreicht wird das mittels iseof markiert. + proc getBit(var b : Boolean) ~ + let + var tmpchar : Char; + var tmpint : Integer; + var j : Integer + in begin +!put('g'); + if bitP = 8 then + begin + get(var tmpchar); + tmpint := ord(tmpchar); + + if tmpint = (0 - 1) then iseof := true + else begin + j := 0; + while j < 8 + do begin + if tmpint // 2 = 1 then + begin + bits[7 - j] := true; + tmpint := tmpint - 1; + end else + bits[7 - j] := false; + tmpint := tmpint / 8; + j := j + 1; + end; + end; + bitP := 0; + end + else ; + + b := bits[bitP]; + bitP := bitP + 1 + end; + + ! Realisiert das Schreiben von 4-Bit-Wrtern in die Ausgabe. + ! Wurden 2 4-Bit-Wrter geschrieben, wird beides als 8-Bit-Char ausgegeben. + var writeHigh : Boolean; + var writeByte : Integer; + proc write(x : Integer) ~ + begin +!put('w'); + if writeHigh = true then + begin + writeByte := x * 16; + writeHigh := false; + end + else begin + writeByte := writeByte + x; + put(chr(writeByte)); + writeByte := 0; + writeHigh := true; + end; + end + +in begin + ! Initalisierungen + bitP := 8; + writeHigh := true; + writeByte := 0; + + ! Zunchst die Codierung einlesen + i := 0; + while i < 16 + do begin + get(var tmpchar); + tmpcode[i] := ord(tmpchar); +!putint(tmpcode[i]); +!put(','); + i := i + 1; + end; + + ! Nun Code richtig rum sortieren + i := 0; + while i < 16 + do begin + code[tmpcode[i]] := i; + i := i + 1 + end; + + + getBit(var tmpbool); + + while \iseof + do begin +!put('a'); + + ! Fallunterscheidungen fr Codierung + + if tmpbool = true then !1 + begin + getBit(var tmpbool); + if tmpbool = true then !11 + begin + getBit(var tmpbool); + if tmpbool = true then !111 + begin + getBit(var tmpbool); + if tmpbool = true then !1111 + begin + getBit(var tmpbool); + if tmpbool = true then !11111 + begin + getBit(var tmpbool); + if tmpbool = true then !111111 + begin + getBit(var tmpbool); + if tmpbool = true then !1111111 + i := 0 + else !1111110 + i := 1 + end else !111110 + i := 2 + end else !11110 + i := 7 + end else !1110 + i := 12 + end else !110 + begin + getBit(var tmpbool); + if tmpbool = true then !1101 + i := 10 + else !1100 + i := 11 + end + end else !10 + begin + getBit(var tmpbool); + if tmpbool = true then !101 + begin + getBit(var tmpbool); + if tmpbool = true then !1011 + begin + getBit(var tmpbool); + if tmpbool = true then !10111 + i := 5 + else !10110 + i := 6 + end else !1010 + i := 9 + end else !100 + i := 14 + end + end else !0 + begin + getBit(var tmpbool); + if tmpbool = true then !01 + begin + getBit(var tmpbool); + if tmpbool = true then !010 + i := 13 + else !011 + begin + getBit(var tmpbool); + if tmpbool = true then !0110 + i := 8 + else !0111 + begin + getBit(var tmpbool); + if tmpbool = true then !01110 + i := 4 + else !01111 + i := 3 + end + + end + end else !00 + i := 15 + end; + + write(code[i]); + getBit(var tmpbool); + end +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eqtest.tasm b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eqtest.tasm new file mode 100644 index 00000000..4f6b67cd --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eqtest.tasm @@ -0,0 +1,22 @@ +; [file: eqtest.tasm, started: 13-Apr-2003, version: 16-Apr-2004] +; TAM Assembler program which reads two numbers and prints 'Y' if +; the two numbers are equal and prints 'N' if the numbers are not equal. + + PUSH 2 ; reserve space for the 2 numbers + LOADA 0[SB] ; address of n0: 0[SB] + CALL getint ; read number into n0 + LOADA 1[SB] ; address of n1: 1[SB] + CALL getint ; read number into n1 + LOAD(1) 0[SB] ; load number n0 + LOAD(1) 1[SB] ; load number n1 + LOADL 1 ; size of the arguments is 1 + CALL eq ; n0 == n1 ? + JUMPIF(0) L1[CB] ; if !(n0 == n1) then goto L1 + LOADL 89 ; load 'Y' on the stack + CALL put ; print 'Y' + JUMP L2[CB] ; jump over 'N' part. +L1: LOADL 78 ; load 'N' on the stack + CALL put ; print 'N' +L2: POP(0) 2 ; pops the 2 numbers + HALT + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.readme new file mode 100644 index 00000000..2e1f3ffe --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.readme @@ -0,0 +1,21 @@ +Titel: Das Sieb von Eratosthenes + +Autor: Stefan Kropp + +Funktion: + +Dieses Triangle Programm implementiert eine Variante des Siebs von Eratosthenes +zum Finden von Primzahlen bis zu einer oberen Schranke n. +Es wurde eine Variante verwendet, die immmer nur einen Zahlenabschnitt der Gre +UPPERBOUND (die Gre des Boolschen Arrays) bearbeitet. Dies war ntig, um die +Restriktionen der Parametergre zu umgehen. (bergebene Parameter drfen nicht +grer als 255 words gro sein) Jeder bearbeitete Abschnitt wird dann in die +Datei geschrieben. Dies wird solange wiederholt, bis die obere Schranke n +schlielich erreicht wurde. + +Bedienung: + +Es sind keine Eingaben ntig. Das Programm luft selbststndig ab und schreibt +alle gefundenen Primzahlen bis zur oberen Schranke MAXPRIM in die Datei prim.txt. +Alle Parameter sind im Programm als Konstanten hardcodiert und knnen dort nach +Belieben verndert werden. Es wird die Triangle Version mit File Support bentigt. \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.tri new file mode 100644 index 00000000..2899c926 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/eratosthenes.tri @@ -0,0 +1,113 @@ +! @author: Stefan Kropp +let + const MAXPRIM ~ 32750; ! Obere Grenze der Primzahlsuche + + const UPPERBOUND ~ 250; ! Gre des BoolArrays + type BoolArray ~ array 250 of Boolean; + var numbers : BoolArray; + + ! Setzt das Element mit dem Index index des Arrays Array auf den Wert bool + proc setArrayElement(var Array : BoolArray, index : Integer, bool : Boolean) ~ + begin + if (index >= 0) \/ (index < UPPERBOUND) + then + Array[index] := bool + else + end; + + ! Setzt alle Werte des Arrays auf true + proc initArray(var Array : BoolArray) ~ + let + var count : Integer + in begin + count := 0; + while count < UPPERBOUND + do begin + setArrayElement(var Array, count, true); + count := count + 1 + end + end; + + ! Streicht Vielfache der Zahl number aus dem Array, indem der jeweilige + ! Index auf false gesetzt wird. Dabei wird erst beim start-Wert angefangen + ! zu streichen, um auch grere Werte als 255 zu bearbeiten. + proc eraseMultiples(var Array : BoolArray, number : Integer, start : Integer) ~ + let + var multiples : Integer + in begin + ! Mit number^2 anfangen, kleinere Werte sind bereits gestrichen worden + multiples := number * number; + + while multiples < (start + UPPERBOUND) + do begin + ! Erst einmal die Vielfachen erhhen, bis sie berhaupt den start-Wert erreicht haben + if multiples > (start - 1) + then + setArrayElement(var Array, multiples - start, false) + else ; + multiples := multiples + number + end + end; + + type String ~ array 20 of Char; + var filename : String; + + ! Initialisiert den Dateinamen fr die Ausgabedatei auf 'prim.txt' + proc initFilename(var file : String) ~ + begin + file[0] := 'p'; file[1] := 'r'; file[2] := 'i'; + file[3] := 'm'; file[4] := '.'; file[5] := 't'; + file[6] := 'x'; file[7] := 't'; file[8] := chr(0); + end; + + ! Schreibt das bergebene Array in die Datei mit dem bergebenen Filehandle. + ! Dabei wird der start-Wert auf den Array-Index aufaddiert + proc printPrimToFile(numbers : BoolArray, filehandle : Integer, start : Integer) ~ + let + var count : Integer + in begin + count := 0; + if filehandle > (0 - 1) + then + while count < UPPERBOUND + do begin + if (numbers[count] = true) + then + begin + fputint(filehandle, count + start); + fputeol(filehandle) + end + else ; + count := count + 1 + end + else ; + end; + + var filehandle : Integer; + var maxNumber : Integer; + var actualNumber : Integer + +in begin + initFilename(var filename); + fopen(var filehandle, filename, true); + maxNumber := UPPERBOUND; + + while maxNumber < MAXPRIM + do begin + ! Mit 2 anfangen, Vielfache von 1 sind nicht interessant + actualNumber := 2; + initArray(var numbers); + + ! Nur so lange streichen, wie actualNumber^2 kleiner als die maxNumber ist + while (actualNumber * actualNumber) < maxNumber + do begin + eraseMultiples(var numbers, actualNumber, maxNumber - UPPERBOUND + 1); + actualNumber := actualNumber + 1 + end; + + printPrimToFile(numbers, filehandle, maxNumber - UPPERBOUND + 1); + maxNumber := maxNumber + UPPERBOUND + end; + + fclose(filehandle) +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/expr.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/expr.tri new file mode 100644 index 00000000..005d20d0 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/expr.tri @@ -0,0 +1,9 @@ +let + const MAX ~ 10; + var n: Integer +in begin + putint(4*5+2); + puteol(); + putint(2+4*5); + puteol(); +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.readme new file mode 100644 index 00000000..2aa580c0 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.readme @@ -0,0 +1,167 @@ +Beschreibung des Programmes "Faktorisierung" + +Autor: Alexander Stolfik + + +Funktion des Programmes: + +Das Programm zerlegt eine natrliche Zahl n, die zwischen 0 und 10^16 liegt, +in Faktoren mit der folgenden Eigenschaft: + +1. Besitzt die Zahl n Primfaktoren, die kleiner als 200 sind, werden diese Primfaktoren + mit Ihren entsprechenden Exponenten in der Struktur Fz gespeichert. + +2. Falls diese Zahl noch Primfaktoren besitzt die grer zweihundert sind, werden + diese nicht mehr gepeichert, sondern nur der sogenannte Restfaktor. + Der Restfakor ist der Faktor der brigbleibt, wenn mann alle Primfaktoren, + die kleiner 200 sind, von n dividiert. + +Anmerkung: Der Algorithmus der die Faktoriesierung berechnet ist ein sehr primitiver + Algorithmus, aber ich denke fr die Zwecke dieser Vorlesung ist er + gut geeignet. + + Dies wird mit einer neuen Datenstruktur BigInt realsiert, auf der ich folgende Operationen + implementiert habe: + + + + proc convertBI(a: Integer, var biga: BigInt)~ + + Eingabe: a: Integer, biga:BigInt + Der Integer a wird in den BigInt biga geschrieben + + + + proc convertBI2(a: Integer, b: Integer, c: Integer, d: Integer, var biga: BigInt)~ + + Eingabe: a,b,c,d: Integer, biga:BigInt + + Die Integer a,b,c,d werden in einen BigInt nach folgender Vorschrift + convertiert: + + biga=(a mod 10000)*10^12 + (b mod 10000)*10^8 + (c mod 10000)*10^4 + (d mod 10000) + + + + proc zeigeBI(a: BigInt)~ + + Ausgabe des BigInts a auf dem Bildschirm + + + + proc addBI(a: BigInt, b: BigInt,var erg: BigInt)~ + + erg:=a+b; + + + proc copyBI(a: BigInt, var erg: BigInt)~ + + erg:=a; + + + + proc modBI(a: BigInt, mod: Integer, var erg: Integer)~ + + erg:=a // mod; + + + proc divBI(a: BigInt, div: Integer, var erg: BigInt)~ + + erg:=a / div; + + + + + Bedienung des Programmes: + + Nach Start des Programmes, werden von dem Programm vier Zahlen gefragt, die zwischen + 0 und 9999 liegen knnen. Diese Vier Zahlen werden dann konkateniert und in einen BigInt + konvertiert. + + Falls grsser Zahlen eingegeben werden, werden sie trotzdem Modulo 10000 gerechent, d.h. + solange man nicht den Wertebreich eines Integers berschreitet wird es keine Fehlermeldung + geben. + + Als Ausgabe erhlt man dann die Faktorzerlegung der Primzahlen unter 200, den Restfaktor + und die Eingabe angezeigt. + + + + Beispieleingaben und erwartete Ausgaben: + + 1. Beipspiel + + Eingabe: + 1. :0 + 2. :7 + 3. :5891 + 4. :2000 + + Ausgabe: + + Faktorisierung: + p e + 2 10 + 5 3 + 7 2 + 11 2 + + Restfaktor: + 1 + + Eingabe: + 7.5891.2000 + + + + 2. Beipspiel + + Eingabe: + 1. :0 + 2. :0 + 3. :2398 + 4. :37895642 + + Ausgabe: + + Faktorisierung: + p e + 2 1 + 3 1 + 23 1 + 179 1 + + Restfaktor: + 971 + + Eingabe: + 2398.5642 + + + + 3. Beipspiel + + Eingabe: + 1. :0 + 2. :1 + 3. :0 + 4. :0 + + Ausgabe: + + Faktorisierung: + p e + 2 8 + 5 8 + + + Restfaktor: + 1 + + Eingabe: + 1.0000.0000 + + + + + \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.tri new file mode 100644 index 00000000..8fb4eb24 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/faktorisierung.tri @@ -0,0 +1,498 @@ +let + + type BigInt ~ record + length: Integer, + zahl: array 30 of Integer + end; + + ! Realisierung einer Primzahlzerlegung + ! length = Lnge des Array + ! prim: Array der die Primzahlen speichert + ! exp: Der Exponent der Primzahlen + ! Beispiel fr 14625=3^2 * 5^3 * 13 + ! length = 3 + ! Index 0 1 2 + ! prim 3 5 13 + ! exp 2 3 1 + type Fz ~ record + length: Integer, + zahl: BigInt, + rest: BigInt, + prim: array 80 of Integer, + exp: array 80 of Integer + end; + + + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! max + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! max(a: Integer,b: Integer): Integer gibt das Maximum von a oder b zurck + func max(a: Integer,b: Integer): Integer ~ + if a>b + then a + else b; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! min + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! min(a: Integer,b: Integer): Integer gibt das Minimum von a oder b zurck + func min(a: Integer,b: Integer): Integer ~ + if a>b + then b + else a; + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! convertBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! convertBI(a: Integer, var biga: BigInt) + proc convertBI(a: Integer, var biga: BigInt)~ + let + var i: Integer; + var acopy: Integer + in begin + acopy:=a; + i:=0; + + while acopy > 0 do begin + biga.zahl[i]:=acopy//100; + acopy:=acopy/100; + i:=i+1; + end; + biga.length:=i; + + while i<30 do begin + biga.zahl[i]:=0; + i:=i+1; + end + end; + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! convertBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! convertBI(a: Integer, var biga: BigInt) + proc convertBI2(a: Integer, b: Integer, c: Integer, d: Integer, var biga: BigInt)~ + let + var i: Integer; + var lange: Integer; + var copy: Integer + + in begin + lange:=0; + copy:=d; + convertBI(0,var biga); + + biga.zahl[0]:=copy//100; + biga.zahl[1]:=(copy/100)//100; + copy:=c; + biga.zahl[2]:=copy//100; + biga.zahl[3]:=(copy/100)//100; + copy:=b; + biga.zahl[4]:=copy//100; + biga.zahl[5]:=(copy/100)//100; + copy:=a; + biga.zahl[6]:=copy//100; + biga.zahl[7]:=(copy/100)//100; + + i:=7; + while i>0 do begin + if biga.zahl[i-1]>0 + then begin + biga.length:=i; + i:=0 + end + else i:=i-1 + end + end; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! zeigeBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! zeigeBI(a: BigInt) + proc zeigeBI(a: BigInt)~ + let + var i: Integer; + var kleiner: Integer + in begin + i:=a.length; + if i=0 + then putint(0) + else; + kleiner:=0; + while i>0 do begin + if (i//2)=0 /\ (i < a.length) + then put('.') + else; + if (a.zahl[i-1]<10) /\ (i < a.length) + then putint(0) + else; + putint(a.zahl[i-1]); + + i:=i-1 + end; + puteol() + end; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! addBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! addBI(a: BigInt, b: BigInt, erg: BigInt) + proc addBI(a: BigInt, b: BigInt,var erg: BigInt)~ + let + var length: Integer; + var i: Integer + in begin + + length:=max(a.length,b.length); + + i:=0; + convertBI(0,var erg); + + while i0 + then erg.length:=i+1 + else erg.length:=i; + + end; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! minBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! minBI(a: BigInt, b: BigInt, erg: BigInt) + proc minBI(a: BigInt, b: BigInt,var erg: BigInt)~ + let + var length: Integer; + var i: Integer; + var uber: Integer + in begin + convertBI(0,var erg); + uber:=0; + + i:=0; + + if a.length < b.length + then + else begin + while i0 do begin + if erg.zahl[i-1]>0 + then begin + erg.length:=i; + i:=0 + end + else i:=i-1 + end + end + end; + + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! copyBI + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! copyBI(a: BigInt, b: BigInt, erg: BigInt) + proc copyBI(a: BigInt, var erg: BigInt)~ + let + var i:Integer + in begin + i:=0; + erg.length:=a.length; + + while i0 do begin + divisor:=(divisor*100)+a.zahl[i-1]; + erg.zahl[i-1]:=divisor/div; + divisor:=divisor//div; + i:=i-1 + end; + i:=a.length; + while i>0 do begin + if erg.zahl[i-1]>0 + then begin + erg.length:=i; + i:=0 + end + else i:=i-1 + end + end; + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! istPrim + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !nach istprim(p:int,prim:int) prim=1 , falls p eine Primzahl ist + !nach istPrim(p:int,prim:int) prim=0 , falls p keine Primzahl ist + proc istPrim(x: Integer, var prim: Integer) ~ + let + var i: Integer + in begin + i:=2; + prim:=1; + + while (i 1) \/ (pcopy.length > 1)) /\ (zahl < 200) do begin + + istPrim(zahl,var prim); + + if prim=1 + then begin + + modBI(pcopy,zahl,var rest); + if rest = 0 + then begin + faktor.prim[index]:=zahl; + faktor.exp[index]:=0; + + + while rest = 0 do begin + faktor.exp[index]:=faktor.exp[index]+1; + divBI(pcopy,zahl,var temp); + copyBI(temp,var pcopy); + modBI(pcopy,zahl,var rest); + end; + index:=index+1 + end + else zahl:=zahl+1 + end + else zahl:=zahl+1 + end; + faktor.length:=index; + if zahl=200 + then copyBI(pcopy,var faktor.rest) + else convertBI(0,var faktor.rest) + end; + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! zeigeFZ + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! zeigeFZ(faktor:Fz) zeigt die Faktorzelegung an prim*10000+exp + proc zeigeFZ(faktor: Fz) ~ + let + var i: Integer; + var j: Integer; + var t: Integer; + var leer: Char + in begin + i:=0; + t:=faktor.length; + leer:=' '; + put('F'); + put('a'); + put('k'); + put('t'); + put('o'); + put('r'); + put('i'); + put('s'); + put('i'); + put('e'); + put('r'); + put('u'); + put('n'); + put('g'); + put(':'); + puteol(); + put('p'); + put(leer); + put(leer); + put(leer); + put('e'); + puteol(); + while i Knotenzahl Kantenzahl Kanten +Kanten-> Startpunkt Flussmenge Endpunkt +{alle nicht-Terminale nur auf rechten Seiten} -> int + +z.B. gut lesbar so zu schreiben, da Triangle auf Zeilenumbrche "wartet" +4 3 +0 3 1 +1 2 2 +1 2 3 + +Arrays in Triangle- auch der neuen Version- knnen leider mit allen Verschachtelungen nur eine Gre von 225 Feldern haben, daher sind die Netzwerke auf 15 Knoten, also eine 15x15- Flussmatrix beschrnkt. + +Ausgabe ist einfach der Maxflow. + +Hier der C-Quellcode von +http://www.aduni.org/courses/algorithms/courseware/handouts/Reciation_09.html + +(unten weiter) + +// The Ford-Fulkerson Algorithm in C + +#include +Basic Definitions + +#define WHITE 0 +#define GRAY 1 +#define BLACK 2 +#define MAX_NODES 1000 +#define oo 1000000000 + + + +// Declarations + +int n; // number of nodes +int e; // number of edges +int capacity[MAX_NODES][MAX_NODES]; // capacity matrix +int flow[MAX_NODES][MAX_NODES]; // flow matrix +int color[MAX_NODES]; // needed for breadth-first search +int pred[MAX_NODES]; // array to store augmenting path + +int min (int x, int y) { + return x0) { +enqueue(v); +pred[v] = u; + } +} + } + // If the color of the target node is black now, + // it means that we reached it. + return color[target]==BLACK; +} + + +// Ford-Fulkerson Algorithm + +int max_flow (int source, int sink) { + int i,j,u; + // Initialize empty flow. + int max_flow = 0; + for (i=0; i=0; u=pred[u]) { + increment = min(increment,capacity[pred[u]][u]-flow[pred[u]][u]); +} + // Now increment the flow. +for (u=n-1; pred[u]>=0; u=pred[u]) { + flow[pred[u]][u] += increment; + flow[u][pred[u]] -= increment; +} +max_flow += increment; + } + // No augmenting path anymore. We are done. + return max_flow; +} + + + +// Reading the input file and the main program + +void read_input_file() { + int a,b,c,i,j; + FILE* input = fopen("mf.in","r"); + // read number of nodes and edges + fscanf(input,"%d %d",&n,&e); + // initialize empty capacity matrix + for (i=0; i 0 do begin + dequeue(var queue, var color, var queueLength, var u); + v := 0; + while (v < actualNodes) do begin + if color[v]= WHITE /\ (capacity[u][v] - flow[u][v] > 0) then begin + enqueue(v, var queue, var color, var queueLength); + pred[v] := u + end + else; !? + v := v + 1 ; + end; + end; + bfsReturn := color[target]= BLACK; +end; + +proc maxFlow (actualNodes: Integer, capacity: array 15 of array 15 of Integer, var maxFlow: Integer) ~ + +let + + var flow: array 15 of array 15 of Integer; + var color: array 15 of Integer; + var pred: array 15 of Integer; + + var i: Integer; + var j: Integer; + var u: Integer; + var increased: Integer; + var increment: Integer; + var bfsReturn: Boolean +in begin + + !initialization + maxFlow := 0; + i := 0; + while i < actualNodes do begin + color[i] := BLACK; + pred[i] := 0; + j := 0; + while j < actualNodes do begin + flow[i][j] := 0; + j := j + 1 + end; + i := i + 1; + end; + + bfs(0, actualNodes - 1, actualNodes, capacity, var flow, var color, var pred, var bfsReturn); + while bfsReturn do begin + + !very big value + increment := 31500; + + u := actualNodes - 1; + while pred[u] >= 0 do begin + if capacity[pred[u]][u] - flow[pred[u]][u] < increment + then + increment := capacity[pred[u]][u] - flow[pred[u]][u] + else; + u := pred[u] + end; + + u := actualNodes - 1; + while pred[u] >= 0 do begin + flow[pred[u]][u] := flow[pred[u]][u] + increment; + flow[u][pred[u]] := flow[u][pred[u]] - increment; + u := pred[u] + end; + + maxFlow := maxFlow + increment; + + bfs(0, actualNodes - 1, actualNodes, capacity, var flow, var color, var pred, var bfsReturn); + end; + +end; + + + +proc readInput(var actualNodes: Integer, var capacity: array 15 of array 15 of Integer) ~ +let + var counter: Integer; + var subcounter: Integer; + var edgecount: Integer; + var from: Integer; + var with: Integer; + var to: Integer +in +begin + + counter := 0; + while counter < 15 do begin + subcounter := 0; + while subcounter < 15 do begin + capacity[counter][subcounter] := 0; + subcounter := subcounter +1 + end; + capacity[counter][counter] := 0; + counter := counter +1 + end; + + getint(var actualNodes); + getint(var edgecount); + counter := 0; + while counter < edgecount do begin + getint(var from); + getint(var with); + getint(var to); + capacity[from][to] := with; + counter := counter + 1 + end; + + ! for debugging purposes, print matrix + counter := 0; + while counter < actualNodes do begin + subcounter := 0; + while subcounter < actualNodes do begin + putint(capacity[counter][subcounter]); + subcounter := subcounter +1 + end; + puteol(); + counter := counter +1; + end; +end; + +! +! +! +! +! +! +! MAIN PROGRAM +! +! +! +! +! +! +! + + + + +var actualNodes: Integer; +var capacity: array 15 of array 15 of Integer; +var source: Integer; +var sink: Integer; +var max: Integer + +in begin + readInput(var actualNodes, var capacity); + maxFlow(actualNodes, capacity, var max); + putint(max); +end; \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.readme new file mode 100644 index 00000000..56c8167e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.readme @@ -0,0 +1,14 @@ +Autor: Adrian Krion + +gauss.tri implementiert die Gauss-Elimination mit Spaltenpivotsuche +fr nicht-singulre quadratische rationale Matrizen A der Gre n x n +und lst ein Gleichungs- system der Form Ax=b. Eingabe von A und b +spaltenweise durch einzelne Eingabe von jeweils Zhler und Nenner. +Ausgabe von als Zeilenvektor. n ist im Programm als Konstante +definiert, in der vorkompilierten .tam-Datei ist n auf 4 gesetzt. +Deshalb geht mit dieser auch nur Beispiel axb3.txt. + +Beispieldateien: +axb1.txt : A 3x3-Einheitsmatrix, b Einsvektor +axb2.txt : 3x3-Beispiel +axb3.txt : 4x4-Beispiel diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.tri new file mode 100644 index 00000000..2a99bd2b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss.tri @@ -0,0 +1,288 @@ +! gauss.tri implementiert die Gauss-Elimination +! fr nicht-singulre quadratische rationale +! Matrizen A der Gre n x n und lst ein Gleichungs- +! system der Form Ax=b. + +let + + const n ~ 4; + !Record zur Behandlung rationaler Zahlen + type Rational ~ record + p: Integer, + q: Integer + end; + + !bei nderung von n sollte hier die Dimension + !mit verndert werden + type Column ~ record + r: array 4 of Rational + end; + + type Matrix ~ record + c: array 4 of Column + end; + + !Methode zur GGT-Bestimmung + func ggt(a: Integer, b: Integer) : Integer ~ + if b = 0 then a + else ggt(b, a // b); + + !Krzt einen Rational + proc reduce(var x: Rational) ~ + let + var i : Integer + in begin + i := ggt(x.p,x.q); + if i = 0 then begin i := 1; end else ; + x.p := x.p / i; + x.q := x.q / i; + end; + + !Methode zur Addition zweier Rationals + proc add(x: Rational, y: Rational, var temp: Rational) ~ + let + var b: Integer + in begin + temp.q := x.q*y.q; + temp.p := (x.p*y.q) + (y.p*x.q); + reduce(var temp); + end; + + !Methode zur Subtraktion zweier Rationals + proc sub(x: Rational, y: Rational, var temp: Rational) ~ + let + var b: Integer + in begin + temp.q := y.q; + temp.p := 0 - y.p; + add(x, temp, var temp); + end; + + !Multiplikation zweier Rationals + proc mul(x: Rational, y: Rational, var temp: Rational) ~ + let + var b: Integer + in begin + temp.p := x.p*y.p; + temp.q := x.q*y.q; + reduce(var temp); + end; + + !Teilt x durch y + proc div(x: Rational, y: Rational, var temp: Rational) ~ + let + var b: Integer + in begin + temp.q := y.p; + temp.p := y.q; + mul(x,temp,var temp) + end; + + !Lst Ax=b fr eine nxn-Dreiecksmatrix + proc solve(a: Matrix, b: Column, var x: Column) ~ + let + var i: Integer; + var j: Integer; + var temp : Rational + in begin + i := n-1; + while i >= 0 do begin + j := n-1; + x.r[i] := b.r[i]; + while j > i do begin + mul(a.c[j].r[i],x.r[j],var temp); + sub(x.r[i],temp,var x.r[i]); + j := j - 1; + end; + div(x.r[i],a.c[i].r[i],var x.r[i]); + i := i - 1; + end; + end; + + !Invertiert ein Rational + proc inv(var x: Rational) ~ + let + var temp: Rational + in begin + temp.q := x.p; + temp.p := x.q; + x := temp; + end; + + !Vertauscht die Zeilen i und j von A und b + proc switch(var a:Matrix, var b: Column, i: Integer, j: Integer) ~ + let + var temp: Rational; + var k: Integer + in begin + k := 0; + !Vertausche die Zeilen der Matrix + while k < n do begin + temp := a.c[k].r[i]; + a.c[k].r[i] := a.c[k].r[j]; + a.c[k].r[j] := temp; + k := k + 1; + end; + !Vertausche die Zeilen des Vektors + temp := b.r[i]; + b.r[i] := b.r[j]; + b.r[j] := temp; + end; + + !Vergleicht zwei Rationals a und b + func greater(a: Rational, b: Rational): Boolean ~ + if (a.p*b.q) > (a.q*b.p) then true else false; + + + !Implementiert Spaltenpivotwahl fr Gauss. Liefert das Inverse des Pivot-Elements sowie + !die Matrix nach Vertauschung + proc getPivot(line: Integer, var a: Matrix, var b: Column, var pivot: Rational) ~ + let + var i: Integer; + var max: Rational; + var temp: Integer + in begin + i := line + 1; + max := a.c[line].r[line]; + temp := line; + while i < n do begin + if greater(a.c[line].r[i],max) then begin + max := a.c[line].r[i]; + temp := i; + end else ; + i := i + 1; + end; + if \ (temp = line) then begin + switch(var a, var b,temp,line); + end + else ; + pivot := max; + inv(var pivot); + end; + + !Subtrahiert von der j-ten Zeile die i-te mal z + proc linesub(var a: Matrix, var b: Column, i: Integer, j: Integer, z: Rational) ~ + let + var k: Integer; + var temp: Rational + in begin + k := 0; + while k < n do begin + mul(a.c[k].r[i],z,var temp); + sub(a.c[k].r[j],temp,var a.c[k].r[j]); + k := k + 1; + end; + mul(b.r[i],z,var temp); + sub(b.r[j],temp,var b.r[j]); + end; + + !Berechnet aus einer nxn-Matrix eine nxn-obere Dreiecksmatrix mit Spaltenpivotwahl + proc gauss(var a:Matrix, var b: Column) ~ + let + var pivot: Rational; + var temp: Rational; + var i: Integer; + var j: Integer + in begin + i := 0; + while i < n do begin + getPivot(i,var a, var b, var pivot); + j := (i+1); + + !subtrahiere von den restlichen Zeilen Vielfache der Pivot-Zeile + while j < n do begin + temp := a.c[i].r[j]; + if \(temp.p = 0) then begin + mul(temp,pivot,var temp); + linesub(var a, var b, i, j, temp); + end else ; + j := j + 1; + end; + i := i + 1; + end; + end; + + !Liest eine Matrix ein + proc readMatrix(var a: Matrix) ~ + let + var i: Integer; + var j: Integer; + var col: Column; + var rat: Rational + in begin + i := 0; + while i < n do begin + j := 0; + while j < n do begin + getint(var rat.p); + getint(var rat.q); + col.r[j] := rat; + j := j + 1; + end; + a.c[i] := col; + i := i + 1; + end + end; + + !Liest den Vektor b ein + proc readVector(var b: Column) ~ + let + var i: Integer; + var rat: Rational + in begin + i := 0; + while i < n do begin + getint(var rat.p); + getint(var rat.q); + b.r[i] := rat; + i := i + 1; + end; + end; + + var i: Integer; + var a: Matrix; + var b: Column; + var x: Column; + var temp: Rational; + var j: Integer +in begin + readMatrix(var a); + readVector(var b); + gauss(var a, var b); + +!Ausgabe von A und b nach Ausfhrung der +!Gauss-Elimination + +! i := 0; +! while i < n do begin +! j := 0; +! while j < n do begin +! putint(a.c[i].r[j].p); +! put(chr(47)); +! putint(a.c[i].r[j].q); +! put(chr(9)); +! j := j + 1; +! end; +! i := i + 1; +! end; +! i := 0; +! while i < 3 do begin +! putint(b.r[i].p); +! put(chr(47)); +! putint(b.r[i].q); +! put(chr(9)); +! i := i + 1; +! end; + +!Ausgabe von x + + solve(a,b,var x); + i := 0; + while i < n do begin + putint(x.r[i].p); + put(chr(47)); + putint(x.r[i].q); + put(chr(9)); + i := i + 1; + end; +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss1.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss1.indata new file mode 100644 index 00000000..9b52e2b2 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss1.indata @@ -0,0 +1,24 @@ +1 +1 +0 +1 +0 +1 +0 +1 +1 +1 +0 +1 +0 +1 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss2.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss2.indata new file mode 100644 index 00000000..950a7504 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss2.indata @@ -0,0 +1,24 @@ +3 +1 +0 +1 +2 +1 +1 +1 +1 +1 +2 +1 +0 +1 +1 +1 +1 +1 +3 +1 +3 +1 +4 +1 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss3.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss3.indata new file mode 100644 index 00000000..5056ebb1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/gauss3.indata @@ -0,0 +1,41 @@ +0 +1 +2 +1 +4 +1 +6 +1 +2 +1 +2 +1 +-3 +1 +1 +1 +0 +1 +3 +1 +0 +1 +-6 +1 +1 +1 +2 +1 +1 +1 +-5 +1 + +0 +1 +-2 +1 +-7 +1 +6 +1 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/hanoi.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/hanoi.tri new file mode 100644 index 00000000..4582ecb6 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/hanoi.tri @@ -0,0 +1,46 @@ +let + var a : Integer; + var b : Integer; + var c : Integer; + var ringzahl : Integer; + + proc tausche(var x : Integer, var y : Integer) ~ + let + var tmp : Integer + in begin + tmp := x; + x := y; + y:= tmp; + end; + + proc setze1() ~ + begin + putint(a); + put(' '); + put('-'); + put('>'); + put(' '); + putint(b); + puteol(); + end; + + proc setzen(n : Integer) ~ + if n = 1 then + setze1() + else begin + tausche(var b, var c); + setzen(n - 1); + tausche(var b, var c); + setze1(); + tausche(var a, var c); + setzen(n - 1); + tausche(var a, var c) + end + +in begin + a := 1; + b := 2; + c := 3; + getint(var ringzahl); + setzen(ringzahl); +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.readme new file mode 100644 index 00000000..63180617 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.readme @@ -0,0 +1,49 @@ +Autor: +Patrick Sona + +Dieses Programm implementiert einen Heapsort-Algorithmus. +Dieser wird auch einem Array ausgefhrt, welches wegen +mangelnder Ressourcen nur 16 breit sein kann. +Diese Implementierung des sortieralgorithmus ist so geschrieben, +dass diese mit minimalen nderungen jegliche "Objekte" sortieren +kann (Im beispiel wird ein String Nach dem ersten Buchstaben +sortiert). +Es mssen folgende Felder und Methoden angepat werden: + +Arrayfeld des SortObj-type: Anstatt String den gewnschten Typ + einsetzen +Funktion getCompValue: mu einen Integer-Wert zurckgeben, anhand + verglichen werden kann +Prozedur exchange: Temp-Varible "t" mu den entsprechenden + Typ bekommen + +Der Sortiert-Algorithmus wird ber die Methode sort() angestoen. +Ihr muss eine Variable vom Typ SortObj bergeben werden, in welcher +die zu sortierenden Elemente abgelegt sind. + + +Das beispielprogramm Arbeitet mit Strings. +Zu beginn werden bis zu 16 Strings abgefragt, welche anschliessend +Sortiert und ausgegeben werden. Die Eingabe kann durch wiederholtes +"Eingabe" drcken abgebrochen werden. + +Beispiel Eingabe: +koch +huss +buchmann +eckert +may +ostermann +steinmetz +weihe + +Ausgabe: +Sortierte Strings: + +buchmann +eckert +huss +koch +may +ostermann +steinmetz \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.tri new file mode 100644 index 00000000..ac7769cc --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/heapsort.tri @@ -0,0 +1,263 @@ +! Dieses Programm implementiert einen Heapsort-Algorithmus. +! Dieser wird auch einem Array ausgefhrt, welches wegen +! mangelnder Ressourcen nur 16 breit sein kann. +! Diese Implementierung des sortieralgorithmus ist so geschrieben, +! dass diese mit minimalen nderungen jegliche "Objekte" sortieren +! kann (Im beispiel wird ein String Nach dem ersten Buchstaben +! sortiert). +! Es mssen folgende Felder und Methoden angepat werden: +! +! Arrayfeld des SortObj-type: Anstatt String den gewnschten Typ +! einsetzen +! Funktion getCompValue: mu einen Integer-Wert zurckgeben, anhand +! verglichen werden kann +! Prozedur exchange: Temp-Varible "t" mu den entsprechenden +! Typ bekommen +! +! Der Sortiert-Algorithmus wird ber die Methode sort() angestoen. +! Ihr muss eine Variable vom Typ SortObj bergeben werden, in welcher +! die zu sortierenden Elemente abgelegt sind. +! +! +! Das beispielprogramm Arbeitet mit Strings. +! Zu beginn werden bis zu 16 Strings abgefragt, welche anschliessend +! Sortiert und ausgegeben werden. Die Eingabe kann durch wiederholtes +! "Eingabe" drcken abgebrochen werden. + +let + ! Zu Sortierender Typ + type String ~ record + c: array 12 of Char, + length: Integer + end; + + ! Zu Sortierendes Array + ! (enthlt zu sortierende Typen) + type SortObj ~ record + c: array 16 of String, + length: Integer + end; + + ! Gobale Variable, auf der Sortiert wird + var sortObj: SortObj; + + ! Gibt einen Vergleichswert zurck, anhand sortiert wird + ! + ! i: Position der zu Vergleichenden Objektes + ! return Vergleichswert + func getCompValue(i: Integer): Integer~ + ord(sortObj.c[i].c[0]); + + ! Tauscht zwei Werte innerhalb des zu Sortierenden Arrays + ! + ! i: erster Wert + ! j: zweiter Wert-> wird mit erstem wert getauscht + proc exchange(i: Integer, j: Integer) ~ + let + var t: String + in begin + t := sortObj.c[i]; + sortObj.c[i] := sortObj.c[j]; + sortObj.c[j] := t; + end; + + ! Korrigiert die Groesse des zu sortierenden Arrays. + ! Damit der Heap-Algorithmus richtig funktioniert, + ! muss die Gre einem vollstndigem Baum entsprechen: + ! Groesse: 2^n+1 + ! + ! sO: zu korrigierendes Sortier-Array + proc setCorrectSize(var sO: SortObj) ~ + if sO.length <= 2 then + sO.length := 2 + else + if sO.length <= 4 then + sO.length := 4 + else + if sO.length <= 8 then + sO.length := 8 + else + if sO.length <= 16 then + sO.length := 16 + else + sO.length := 32; + + proc nop() ~ + begin + end; + + ! Stellt die Heap-Eigenschaft des Teilbaumes her + ! + ! v: Semi-Heap mit Wurzel v + proc downheap(v: Integer) ~ + let + var w: Integer; + var x: Integer; + var break: Boolean + in begin + break := false; + x := v; + w := 2 * x + 1; + while w < sortObj.length /\ \ break do begin + if w + 1 < sortObj.length then + if getCompValue(w+1) > getCompValue(w) then + w := w + 1 + else + nop() + else + nop(); + if getCompValue(x) >= getCompValue(w) then + break := true + else begin + exchange(x, w); + x := w; + w := 2 * x + 1; + end; + end; + end; + + ! stellt mittels downHeap im Bottom-up-verfahren Heaps her + proc buildheap() ~ + let + var v: Integer + in begin + v := (sortObj.length/2)-1; + while v >= 0 do begin + downheap(v); + v := v - 1; + end; + end; + + ! Der eingentliche Heap-Sortier-Algorithmus + proc heapsort() ~ + let + var length: Integer + in begin + buildheap(); + length := sortObj.length; + while sortObj.length > 1 do begin + sortObj.length := sortObj.length - 1; + exchange(0, sortObj.length); + downheap(0); + end; + sortObj.length := length - 1; + end; + + ! Startert den Sortier-Algorithmus + ! + ! sO: Zu sortierendes Array + proc sort(var sO: SortObj) ~ + begin + sortObj := sO; + putint(sortObj.length); + setCorrectSize(var sortObj); + putint(sortObj.length); + heapsort(); + sO := sortObj; + end; + +!---------------------------------------------------------- +! Ab Hier ist das Beispiel-programm implementiert, welches den +! Heapsort nutzt. + + proc printInText() ~ + begin + put('B'); put('i'); put('t'); put('t'); put('e'); put(' '); put('z'); + put('u'); put(' '); put('s'); put('o'); put('r'); put('t'); put('i'); + put('e'); put('r'); put('e'); put('n'); put('d'); put('e'); put(' '); + put('S'); put('t'); put('r'); put('i'); put('n'); put('g'); put('s'); + put(' '); put('e'); put('i'); put('n'); put('g'); put('e'); put('b'); + put('e'); put('n'); put(' '); put('('); put('E'); put('n'); put('d'); + put('e'); put(' '); put('m'); put('i'); put('t'); put(' '); + put('e'); put('i'); put('n'); put('g'); put('a'); put('b'); put('e'); + put('!'); put(')'); puteol(); + end; + + proc printOutText() ~ + begin + puteol(); + put('S'); put('o'); put('r'); put('t'); put('i'); put('e'); put('r'); + put('t'); put('e'); put(' '); put('S'); put('t'); put('r'); put('i'); + put('n'); put('g'); put('s'); put(':'); puteol(); + end; + + + ! message: "stored!" + proc printInputInfo() ~ + begin + put('s'); put('t'); put('o'); put('r'); put('e'); put('d'); put('!'); puteol(); + end; + + ! Gibt einen bergebenen String auf die konsole aus + ! + ! s: Auszugebender String + proc print(s: String) ~ + let + var i: Integer + in begin + i := 0; + while i < s.length do begin + put(s.c[i]); + i := i + 1; + end; + end; + + ! Liesst die Strings von der Konsole ein und speichert + ! sie in dem bergebenen Feld data + ! + ! data: Feld, in welchem die eingelesenen Strings abgelegt werden + proc getData(var data: SortObj) ~ + let + var ch: Char; + var i: Integer; + var line: String; + var testeof : Boolean; + var testeol : Boolean + in begin + printInText(); + i := 0; + line.length := 2; + while line.length > 1 do begin + line.length := 0; + get(var ch); + eol(var testeol); + eof(var testeof); + while \ testeol /\ \ testeof do begin + line.c[line.length] := ch; + line.length := line.length + 1; + get(var ch); + eol(var testeol); + eof(var testeof); + end; + printInputInfo(); + data.c[i] := line; + i := i + 1; + end; + data.length := i; + end; + + ! Gibt die Strings aus dem Sortier-Objekt auf die Konsole aus + ! + ! data: auszugebende Daten + proc printData(data: SortObj)~ + let + var i: Integer + in begin + printOutText(); + i := 0; + while i < data.length do begin + print(data.c[i]); + i := i + 1; + end; + end; + + + var data: SortObj + +! Programm liesst Strings ein, sortiert diese und gibt sie wieder aus +in begin + getData(var data); + sort(var data); + printData(data); +end; + \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/in.txt b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/in.txt new file mode 100644 index 00000000..e5d67ddc --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/in.txt @@ -0,0 +1 @@ +CBEDAGHFJILK \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.readme new file mode 100644 index 00000000..99d9d9ef --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.readme @@ -0,0 +1,13 @@ +Titel: Karp-Rabin Algorithmus + +Autor: Sven Mitlehner + + +Funktion: + +Dieses Triangle Programm fhrt den Karp-Rabin Algorithmus aus. Karp-Rabin ist ein Algorithmus zum String-Matching. Die Aufgabe besteht darin, in einem lngeren Text einen bestimmten Suchtext zu finden. Der Karp-Rabin spielt seine Performancevorteile vor allem bei der Suche nach mehreren verschiedenen Suchtexten aus. Daher kann im Programmcode die Anzahl der zu suchenden Fragmente variiert werden. In dieser Version ist der Karp-Rabin Algorithmus zum Finden von DNA-Sequenzen implementiert worden. Daher kommen im Suchtext nur die Zeichen A, C, G und T (stehen fr die 4 Basen der DNA) vor. +Das Programm erzeugt zuerst eine Datei (Base.txt) mit einer zuflligen Basenfolge der Lnge 1.000.000. Danach liest es diese Datei wieder ein und sucht nach bereinstimmungen zwischen Fragmenten und Text. Fr jede gefundene bereinstimmung wird eine Zeile der Art "Found Pattern #1 (AGAATG) at 1 666" auf der Kommandozeile ausgegeben + +Bedienung: + +Eingaben sind nicht ntig, der zufllige Textfile wird automatisch erzeugt. Alle Parameter sind im Programm hardcodiert und knnen dort gendert werden. Zum Kompilieren und Ausfhren wird die Triangle-Version mit File-Support bentigt. diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.tri new file mode 100644 index 00000000..a82e5eb9 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/karprabin.tri @@ -0,0 +1,260 @@ +let + ! Lnge des zu suchenden Patterns. Bei nderung der Lnge mssen + ! ausschlielich die nchsten beiden Zeilen editiert werden + const searchPatLen ~ 6; + ! Pattern als array of Char + type Pattern ~ array 6 of Char; + + ! Anzahl der zu suchenden Patterns. Der Karp-Rabin Algorithmus spielt seine + ! Performance besonders beim Suchen mehrerer verschiedener Patterns aus + const numPatterns ~ 4; + + ! Anzahl Zeilen und Spalten in der Datei + const numRows ~ 1000; + const numCols ~ 1000; + + ! Zwischenvariablen fr den Randomizer. Je nach Startwert dieser beiden + ! Variablen entstehen verschiedene Zufallsfolgen + var randomSeed1 : Integer; + var randomSeed2 : Integer; + + ! Liefert eine zufllige Base (A, C, G oder T) + proc getRandomBase(var result : Char) ~ + let + var i : Integer + in begin + randomSeed1 := (randomSeed1 * 7 + 167) // 1847; + randomSeed2 := (randomSeed2 * 9 + 521) // 1451; + i := (randomSeed1 + randomSeed2) // 4; + if i = 0 then begin + result := 'A'; + end else; + if i = 1 then begin + result := 'C'; + end else; + if i = 2 then begin + result := 'G'; + end else; + if i = 3 then begin + result := 'T'; + end else; + end; + + ! Konvertiert die Base aus dem Parameter base in eine Integer + ! Reprsentation. Dies knnte zwar auch mit ord(base) erledigt werden + ! dabei kommen allerdings zu groe Zahlen als Ergebnis heraus, so dass + ! bei den folgenden Berechnungen Overflows auftreten + proc baseToInt(base : Char, var result : Integer) ~ + begin + if base = 'A' then begin + result := 0; + end else; + if base = 'C' then begin + result := 1; + end else; + if base = 'G' then begin + result := 2; + end else; + if base = 'T' then begin + result := 3; + end else; + end; + + ! Berechnet den initialen Hashwert eines Patterns Nach der Formel + ! Pattern[0] * 4^n-1 + Pattern[1] * 4^n-2 + ... + Pattern[n-1] * 4^0 + proc makeHash(pattern : Pattern, var result : Integer) ~ + let + var i : Integer; + var exp : Integer; + var baseInt : Integer + in begin + result := 0; + exp := 1; + i := searchPatLen - 1; + while i >= 0 do begin + baseToInt(pattern[i], var baseInt); + result := result + (baseInt * exp); + exp := exp * 4; + i := i - 1; + end; + end; + + ! Berechnet den neuen Hashwert fr das nchste Pattern. Dieses nchste + ! Pattern entsteht aus dem alten Pattern, durch Entfernen des ersten + ! Zeichens, Shiftens der restlichen Zeichen um eine Stelle nach links und + ! anschlieendem Einfgen des nchsten Zeichens an der Stelle ganz rechts. + ! Damit ist das rehashen mit konstantem Aufwand verbunden, nicht mit + ! linearem Aufwand wie bei komplett neuem Hashing.Die Formel dafr lautet: + ! 4 * (hash - (linkesZeichen * 4^n-1) + neuesZeichen + proc rehash(oldHash : Integer, removeChar : Char, addChar : Char, var newHash : Integer) ~ + let + var multi : Integer; + var i : Integer; + var remInt : Integer; + var addInt : Integer + in begin + baseToInt(removeChar, var remInt); + baseToInt(addChar, var addInt); + + i := 0; + multi := 1; + while i < (searchPatLen - 1) do begin + multi := multi * 4; + i := i + 1; + end; + + newHash := (4 * (oldHash - (remInt * multi))) + addInt; + end; + + var filehandle : Integer; + var filename : array 20 of Char; + var i : Integer; + var j : Integer; + var k : Integer; + var l : Integer; + var searchPats : array 5 of Pattern; + var patternHashes : array 5 of Integer; + var actualPattern : Pattern; + var oldPattern : Pattern; + var actualHash : Integer; + var row : Integer; + var col : Integer; + var base : Char + + + in begin + randomSeed1 := 254; + randomSeed2 := 982; + + ! Zu suchende Pattern + searchPats[0][0] := 'G'; searchPats[0][1] := 'C'; searchPats[0][2] := 'C'; + searchPats[0][3] := 'A'; searchPats[0][4] := 'T'; searchPats[0][5] := 'A'; + + searchPats[1][0] := 'A'; searchPats[1][1] := 'G'; searchPats[1][2] := 'A'; + searchPats[1][3] := 'A'; searchPats[1][4] := 'T'; searchPats[1][5] := 'G'; + + searchPats[2][0] := 'T'; searchPats[2][1] := 'T'; searchPats[2][2] := 'A'; + searchPats[2][3] := 'T'; searchPats[2][4] := 'T'; searchPats[2][5] := 'A'; + + searchPats[3][0] := 'C'; searchPats[3][1] := 'C'; searchPats[3][2] := 'T'; + searchPats[3][3] := 'G'; searchPats[3][4] := 'A'; searchPats[3][5] := 'G'; + + ! Name der Datei, in der die zufllige DNA Sequenz abgespeichert wird + filename[0] := 'B'; + filename[1] := 'a'; + filename[2] := 's'; + filename[3] := 'e'; + filename[4] := '.'; + filename[5] := 't'; + filename[6] := 'x'; + filename[7] := 't'; + filename[8] := chr(0); + + ! Datei mit Schreibzugriff ffnen + fopen(var filehandle, filename, true); + + ! Da in Triangle Integer nur bis ~16000 gehen, werden zwei geschachtelte + ! Schleifen verwendet um 1 Mio. Zeichen in die Datei zu schreiben + i := 0; + j := 0; + while i < numRows do begin + while j < numCols do begin + ! Zufllige Base erzeugen und in die Datei schreiben + getRandomBase(var base); + fput(filehandle, base); + j := j + 1; + end; + ! Nach jeweils 1000 Zeichen wird ein Zeilenumbruch ausgegeben + fputeol(filehandle); + i := i + 1; + j := 0; + end; + + fclose(filehandle); + + ! Einmaliges Berechnen der Hashwerte der zu suchenden Basenfolgen + i := 0; + while i < numPatterns do begin + makeHash(searchPats[i], var patternHashes[i]); + i := i + 1; + end; + + ! Datei mit Lesezugriff ffnen + fopen(var filehandle, filename, false); + + ! ActualPattern erstellen, indem die ersten n Zeichen aus der Datei + ! gelesen werden + i := 0; + while i < searchPatLen do begin + fget(filehandle, var actualPattern[i]); + i := i + 1; + end; + + ! Hashwert von ActualPattern berechnen + makeHash(actualPattern, var actualHash); + + i := 0; + j := searchPatLen; + while i < numRows do begin + while j < numCols do begin + ! Prfen ob der Hashwert eines der zu suchenden Patterns mit + ! demjenigen des aktuellen Patterns bereinstimmt + k := 0; + while k < numPatterns do begin + if actualHash = patternHashes[k] then begin + ! Nur wenn dies tatschlich der Fall ist, wird geprft, + ! ob die beiden Zeichenketten auch tatschlich identisch + ! sind + if searchPats[k] = actualPattern then begin + ! Berechnen der aktuellen Zeilen- und Spaltennummer + row := i; + col := j - searchPatLen; + if col < 0 then begin + col := col + 1000; + row := row - 1; + end else; + + ! Ausgabe Fundstelle + put('F'); put('o'); put('u'); put('n'); put('d'); + put(' '); put('P'); put('a'); put('t'); put('t'); + put('e'); put('r'); put('n'); put(' '); put('#'); + putint(k); put(' '); put('('); + + l := 0; + while l < searchPatLen do begin + put(searchPats[k][l]); + l := l + 1; + end; + + put(')'); put(' '); put('a'); put('t'); put(' '); + putint(row + 1); put(' '); putint(col + 1); puteol(); + end else; + end else; + k := k + 1; + end; + + oldPattern := actualPattern; + k := 0; + ! Das vorherige Pattern wird um eine Position nach links + ! verschoben. Dabei fllt das linke Zeichen weg und an die + ! Position ganz rechts rckt das nchste gelesene Zeichen + while k < (searchPatLen - 1) do begin + actualPattern[k] := oldPattern[k + 1]; + k := k + 1; + end; + fget(filehandle, var actualPattern[searchPatLen - 1]); + + ! Berechnen des neuen Hashwertes + rehash(actualHash, oldPattern[0], actualPattern[searchPatLen - 1], var actualHash); + + j := j + 1; + end; + + ! Nchste Zeile + fgeteol(filehandle); + i := i + 1; + j := 0; + end; + + fclose(filehandle); + end; \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.indata new file mode 100644 index 00000000..568dbb8f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.indata @@ -0,0 +1,5001 @@ +1000 + -8.6675 17.786 6.012 + -51.1695 41.09 38.732 + 50.0535 2.538 29.223 + -8.2675 15.767 7.779 + -5.7645 16.521 8.693 + 14.5535 19.996 24.757 + -27.9385 18.733 3.442 + -20.2805 17.295 3.333 +-20.098932 2.414 38.214 + -7.6905 2.482 38.884 + 44.2435 11.406 22.758 + -46.0555 48.265 -16.05 + 56.9215 -5.952 23.705 + 61.9935 -16.957 12.697 + -15.6565 64.077 -0.853 + -55.6535 15.868 54.439 + 24.8385 21.14 18.438 + 56.8675 -3.144 9.702 + 54.0065 -10.437 -8.276 + -73.7565 30.475 23.706 + -67.5015 -1.15 25.897 + -52.0305 46.104 16.308 + -67.6375 42.13 28.521 + 22.2075 15.623 33.329 + 25.7725 14.239 34.612 + -14.7005 15.624 5.412 + -32.8335 31.518 13.926 + -61.6425 25.697 52.182 + 12.5815 17.881 29.871 + -28.6385 13.277 26.658 + -6.6985 2.526 39.535 + -62.1795 -16.593 -9.059 + 40.4145 14.058 24.179 + -73.3725 12.51 6.823 + 57.2145 -8.801 -1.291 + 58.0645 -8.765 0.723 + -69.1365 6.89 1.765 + -33.0645 31.527 14.936 + -15.6615 66.951 -2.897 + -60.6545 36.874 43.228 + 40.8715 14.046 22.919 + -5.6795 2.527 40.016 + -3.3615 66.984 -21.244 + -21.3505 58.014 -11.245 + -4.6585 2.511 40.351 + -15.3965 16.143 8.075 + -13.5325 15.625 8.763 + 27.2625 17.694 29.384 + -29.5265 22.904 17.562 + -9.4675 15.518 7.337 + -7.0155 16.138 8.236 + 34.3075 12.662 31.967 + 35.2515 12.37 32.296 + 33.4785 13.148 31.669 + 50.6065 1.535 29.43 + 48.8885 4.496 28.778 + -23.6635 56.584 5.077 + -72.2985 19.349 5.768 + -36.9145 32.98 27.939 + 59.8165 -11.436 19.704 + 59.4785 -8.666 12.697 + 57.7855 -14.403 29.701 + -38.2355 44.072 18.256 + -7.8515 46.417 -2.545 + -51.6695 36.847 42.822 + -54.6935 31.257 47.969 + -53.1935 -47.007 21.594 + -73.5975 9.812 6.834 + -58.6535 17.287 54.577 + -23.6805 55.096 5.33 + -47.6495 51.384 -16.961 + -17.4705 16.5 4.364 + -29.1985 22.603 16.217 + -51.4345 45.068 6.347 + -75.3015 5.969 39.847 + 23.1405 15.355 33.658 + 24.0155 14.985 33.983 + 24.8965 14.613 34.297 + -15.5925 15.955 5.091 + -46.5165 45.754 13.922 + 48.2825 5.385 28.551 + 47.6895 6.278 28.329 + 56.4895 -13.127 -5.239 + -54.6835 54.947 -15.201 + -55.7235 55.019 -15.507 + 9.3475 12.251 36.77 + 8.3415 12.276 36.554 + 45.7505 -17.234 45.24 + 3.3395 53.473 -10.285 + -26.6555 56.561 5.453 + -13.4065 15.099 4.44 + -25.8905 59.655 2.417 + -3.6685 2.542 40.511 + -73.6925 24.963 22.748 + -59.6575 17.288 54.753 + -2.6505 2.521 40.83 + -69.6495 -6.595 6.941 + -33.2235 31.519 15.933 + 49.1075 -8.031 37.822 + -17.6535 61.092 0.758 + -59.6405 31.245 48.709 + -59.6345 36.814 43.675 + -22.6355 60.956 2.138 + 56.0175 -3.176 21.705 + -68.2805 -1.227 6.9 + 62.1305 -23.975 21.7 + 34.0655 17.166 23.263 + 16.3235 -71.53 48.369 + 17.3395 -71.56 48.173 + 18.3255 -71.569 47.969 + 1.0775 17.836 5.394 + -55.6795 31.267 48.235 + -33.6585 46.258 11.729 + -73.9035 24.953 21.747 + -58.6555 31.269 48.734 + -18.6735 66.572 -6.427 + 57.5065 -4.517 6.7 + -75.1955 16.789 34.79 + 54.3325 -11.848 -8.235 + 57.3315 -11.627 -3.29 + 58.6835 -11.55 -0.272 + 47.4955 -8.059 39.015 + 62.5925 -23.947 14.701 + -13.6925 68.501 -4.117 + -11.5745 68.599 -4.412 + -54.6525 11.648 55.059 + -55.6635 36.827 43.923 + -44.1605 19.567 41.433 + 59.4495 -17.112 27.709 + 7.9815 20.156 16.589 + -0.4935 18.214 13.514 + -14.4675 15.864 8.422 + -53.2305 45.488 8.61 + 28.9975 13.39 34.37 + 7.5085 17.125 29.511 + -48.8825 43.773 33.469 + -54.9385 44.531 31.346 + 36.1435 10.876 34.049 + -25.6755 61.716 -1.784 + -27.3775 60.661 -2.377 + -40.6215 -70.159 48.219 + -39.6505 -70.128 48.414 + -38.6465 -70.121 48.508 + -37.6585 -70.121 48.503 + -1.6645 2.56 41.008 + -33.6555 47.711 10.973 + -58.6455 36.841 43.819 + 3.1165 51.996 -10.295 + -56.7205 53.566 -13.461 + 55.5085 -3.211 24.701 + 55.8765 -1.773 15.703 + 59.0365 -17.199 -3.261 + -28.6595 53.595 7.09 + -26.6825 53.592 6.78 + -25.6465 -70.489 44.93 + -24.6655 -70.529 44.596 + -53.5255 56.626 -19.135 + -8.5755 -19.641 50.548 + -18.3655 16.833 4.044 + -70.4345 28.973 8.73 + 2.1045 14.733 30.546 + -19.1615 63.926 -10.359 + -72.3235 -17.259 12.98 + -16.5445 16.22 4.71 + 36.1205 12.011 32.627 + -47.7665 47.386 -9.781 + -47.2625 46.207 -9.59 + -46.7515 45.096 -9.403 + -54.1265 28.294 -6.012 + -53.7065 31.246 47.585 + -58.7315 55.011 -18.618 + -59.8715 55.093 -21.405 + 46.4605 6.852 29.3 + 47.0945 4.848 30.971 + 57.4375 -8.75 25.711 + 57.2825 -4.519 16.703 + -0.6545 2.547 41.105 + -56.6555 36.86 43.958 + -56.6245 5.816 53.479 + 30.3335 3.862 39.536 + 29.3295 3.874 39.783 + -65.7895 0.105 29.937 + 58.5625 -10.146 0.725 + -60.6505 25.695 52.296 + 0.3505 2.55 41.34 + 1.3405 2.582 41.625 + -18.6595 61.076 1.711 + -19.6145 61.083 2.18 + -20.6655 61.054 2.355 + -21.6595 61.008 2.304 + -45.0695 7.933 -8.739 + -54.1305 56.455 -46.475 + -74.6255 35.976 25.687 + 2.3515 2.583 41.971 + 3.3545 2.587 42.209 + 4.3415 2.624 42.387 + 20.3195 -70.209 47.514 + -4.6695 3.889 39.232 + -73.4725 16.613 6.821 + 27.3315 3.911 40.312 + 44.4805 8.064 29.98 + 47.8225 -7.67 -12.996 + 59.3315 -8.682 6.71 + 17.3385 4.042 42.956 + -50.6765 36.837 42.44 + 59.2465 -8.671 5.703 + 57.3905 -10.234 -2.257 + -55.6495 17.276 53.967 + -24.7585 59.78 2.829 + 2.2515 18.745 10.174 + 21.1645 21.599 12.822 + -46.6695 40.998 37.724 + 51.4315 3.703 24.032 + 38.1555 -70.764 42.658 + 34.3705 -17.47 49.849 + 23.8605 21.31 18.081 + 5.3605 2.599 42.688 + 55.0285 -0.374 14.705 + -62.5585 -13.861 -7.977 + 58.1335 -8.73 22.697 + 58.7675 -8.692 18.696 + -61.9575 3.183 -1.667 + -61.1275 25.258 -3.717 + 22.9715 -4.269 -19.354 + 25.9765 -4.283 -18.866 + 27.9605 19.581 23.874 + 21.2155 20.991 21.412 + 14.8235 20.971 19.076 + -19.5115 16.569 19.837 + 0.7635 18.578 13.971 + -16.2835 16.479 7.755 + 26.3785 18.032 29.045 + -5.2915 12.842 27.948 + -54.0935 52.635 -10.689 + -45.2195 45.457 10.028 + -29.9985 22.705 21.807 + -24.1865 62.417 -1.285 + -21.7185 63.03 -0.373 + 2.7325 18.768 8.904 + -39.6335 -68.787 47.961 + -38.6495 -68.756 48.052 + -37.6355 -68.823 48.109 + -36.6555 -68.762 47.925 + -35.7635 -68.699 47.634 + -24.6945 53.607 5.984 + 12.1045 20.606 9.472 + -73.0365 24.993 26.754 + 8.2165 11.884 -9.792 + -30.6725 -68.979 45.968 + -29.6535 -68.984 45.783 + -28.6445 -68.997 45.579 + -25.6455 -69.099 44.674 + -24.6535 -69.129 44.389 + -48.2545 52.288 -17.183 + -16.8065 15.584 20.829 + -63.7865 40.638 35.92 + -48.2555 44.958 7.499 + 14.6995 17.573 30.68 + -72.9075 -17.209 16.973 + 37.7085 10.97 33.214 + 36.9445 11.544 32.933 + -48.4215 48.185 -10.022 + -15.0945 15.071 2.338 + -16.0035 15.401 1.977 + -16.8855 15.749 1.657 + -17.8105 16.043 1.304 + -18.7475 16.3 0.96 + -67.0345 -4.036 1.933 + 0.3435 3.932 40.473 + 59.0765 -8.648 16.706 + 56.2735 -8.83 28.704 + 57.0755 -8.768 26.719 + 56.4195 -3.142 18.705 + -35.6585 47.738 11.003 + -32.6495 47.721 10.755 + -31.6595 47.7 10.582 + 6.3525 2.624 42.845 + -20.6495 62.499 0.96 + 58.6235 -8.708 19.693 + 61.6665 -22.608 23.7 + -13.2445 68.865 -4.359 + -6.7345 47.607 -1.86 + 40.3045 12.406 28.423 + 9.0495 20.369 14.1 + 57.7005 -8.731 24.713 + 55.0815 -1.727 22.596 + -10.6625 5.107 35.297 + -8.6795 5.14 35.452 + -4.6775 5.262 38.102 + -3.6595 5.258 38.567 + -58.6585 5.561 53.061 + 16.3165 -68.721 48.326 + 17.3275 -68.742 48.116 + 18.3215 -68.754 47.933 + 19.3235 -68.78 47.698 + 20.3285 -68.79 47.557 + 21.3425 -68.817 47.402 + 22.3365 -68.828 47.241 + 23.3245 -68.831 47.122 + 24.3265 -68.852 47.013 + 25.3355 -68.869 46.853 + -33.6575 49.168 10.056 + -31.6435 49.203 9.865 + -29.6515 49.179 9.332 + 7.3525 2.633 43.087 + 8.3465 2.649 43.117 + -58.6615 21.515 54.031 + 43.8145 11.451 24.02 + -44.0865 45.695 23.482 + -0.6635 3.942 40.251 + 47.1445 8.732 23.843 + 54.8695 -4.729 -0.26 + -65.5665 26.055 -0.166 + 54.8585 -8.926 -6.329 + 9.3465 2.634 43.09 + -19.6645 59.577 2.518 + -58.6575 13.035 54.665 + 52.2925 -3.401 -5.414 + -54.6535 15.865 54.321 + 54.5875 -6.102 -3.304 + 58.2865 -8.711 21.7 + 62.7745 -23.935 11.707 + -54.0105 -16.453 -14.393 + -52.9925 -16.431 -14.733 + -56.9705 -16.558 -13.144 + -54.9745 -16.49 -14.044 + -55.9835 -16.523 -13.554 + -10.5995 70.15 -5.62 + -8.5905 70.06 -7.169 + 27.0805 19.936 23.544 + -38.6035 48.387 9.489 + -42.9015 46.18 7.948 + -45.6185 44.917 6.999 + -51.8105 45.255 7.667 + -18.6305 16.188 20.154 + -6.7225 16.467 11.253 + -17.1605 16.851 7.431 + -56.0105 38.804 41.669 + -55.0975 52.826 -11.033 + -30.0685 23.912 17.342 + -52.9005 44.298 32.054 + -60.3695 -14.723 38.392 + -22.9045 62.798 -0.81 + -40.6575 -67.455 46.908 + -39.6475 -67.44 47.25 + -38.6545 -67.425 47.383 + -37.6565 -67.417 47.393 + -36.6585 -67.415 47.394 + -35.6795 -67.461 47.197 + -20.4095 16.282 -1.111 + 55.9175 -10.31 -5.281 + -70.7385 24.807 4.785 + -31.6585 -67.576 45.762 + -30.6605 -67.607 45.496 + -29.6655 -67.631 45.341 + -28.6585 -67.628 45.25 + -27.6675 -67.655 44.98 + -25.6505 -67.721 44.279 + -24.6565 -67.739 44.13 + -23.6425 -67.797 43.531 + -22.6505 -67.854 43.166 + -53.4025 53.078 -11.875 + -52.5255 52.706 -11.554 + -51.7565 52.129 -11.266 + -51.0365 51.446 -10.999 + -50.3805 50.646 -10.755 + -49.7125 49.859 -10.505 + -49.0785 48.988 -10.266 + -14.2495 14.69 2.623 + -13.5765 -74.096 53.255 + -11.6755 -66.818 52.853 + -10.6115 -66.842 53.448 + -9.4885 -66.662 54.223 + -8.6395 -66.661 54.697 + -7.6605 -66.611 54.974 + -6.6465 -66.617 55.139 + -5.6525 -66.6 55.102 + 26.2725 20.7 20.39 + -26.6675 55.073 6.241 + -27.6605 55.06 6.369 + 38.7705 13.562 27.851 + -6.9205 46.561 -3.767 + 10.1955 20.546 14.521 + 2.3085 -66.875 52.609 + 3.3195 -66.906 52.273 + 4.3015 -66.946 51.975 + 5.3225 -66.977 51.56 + 6.3025 -67.021 51.255 + 7.3165 -67.049 50.939 + 8.3095 -67.092 50.551 + 9.3005 -67.123 50.282 + 10.2935 -67.154 50.011 + 11.2935 -67.191 49.65 + 12.2945 -67.21 49.411 + 13.2985 -67.245 49.027 + 14.3075 -67.271 48.673 + 16.3165 -67.327 48.043 + 17.3965 -67.356 47.75 + 18.3245 -67.362 47.603 + 19.3355 -67.379 47.436 + 20.3355 -67.411 47.22 + 21.3405 -67.415 47.155 + 22.3605 -67.435 47.067 + 23.3355 -67.434 46.973 + 24.3275 -67.445 46.814 + 25.3285 -67.462 46.684 + 26.3345 -67.484 46.566 + -14.4305 15.219 4.047 + 35.3515 3.85 38.606 + 0.1685 17.86 21.035 + 7.3505 4.013 42.34 + 5.3615 3.974 41.929 + 3.3515 3.966 41.337 + -8.6865 3.808 36.863 + -36.2135 34.536 23.936 + -45.4995 62.355 -52.076 + -21.2955 61.049 -10.307 + -37.0475 20.99 35.898 + -48.9565 22.408 45.067 + 59.4005 -8.652 13.7 + 43.7645 8.749 29.719 + -21.6575 59.58 3.339 + -77.0165 9.982 25.829 + 62.4025 -21.155 5.713 + 10.3505 2.609 43.04 + 11.3525 2.617 43.162 + -60.0035 3.267 -3.055 + -29.3245 51.974 -6.524 + -24.3055 52.019 -9.824 + -33.8295 -42.078 39.048 + -18.9855 -17.224 -22.266 + -19.9855 -17.24 -22.132 + 12.3465 2.651 43.34 + 56.6565 -3.135 15.704 + -54.6875 29.876 48.761 + -67.7355 41.001 31.347 + 13.3495 2.652 43.452 + 26.1515 20.197 23.204 + -44.3485 45.315 7.436 + -51.8315 55.051 -51.457 + -48.9425 48.075 -8.766 + -47.7635 46.178 -8.325 + 15.7105 15.217 33.892 + -7.9755 16.1 10.798 + -21.9775 17.958 5.647 + -57.9555 39.177 40.943 + 28.1345 17.303 29.697 + -53.9065 51.825 -9.172 + 35.2795 11.269 33.756 + -50.9145 44.014 32.764 + -47.8925 43.616 33.819 + -40.6555 -66.135 46.013 + -39.6495 -66.114 46.371 + -38.6405 -66.135 46.569 + -37.6545 -66.142 46.567 + -36.6625 -66.119 46.478 + -34.6855 -66.198 46.054 + -33.7165 -66.241 45.669 + -32.6605 -66.209 45.366 + -31.6775 -66.274 45.059 + -30.6715 -66.297 44.798 + -29.6725 -66.314 44.658 + -28.6615 -66.291 44.589 + -27.6645 -66.306 44.456 + -26.6635 -66.33 44.004 + -25.6595 -66.383 43.591 + -24.6485 -66.361 43.656 + -23.6585 -66.403 43.355 + -22.6565 -66.455 42.85 + -21.6485 -66.503 42.533 + 2.5205 18.283 21.879 + -6.0985 16.033 5.661 + -7.3455 15.635 5.202 + -8.6615 15.197 4.716 + -9.8545 14.923 4.276 + -11.0545 14.674 3.831 + -12.0405 14.73 3.488 + -13.2305 14.585 3.021 + -12.6385 -65.546 51.936 + -11.6185 -65.537 52.249 + -10.6395 -65.508 52.304 + -9.6515 -65.452 52.692 + -8.6355 -65.387 53.489 + -7.6425 -65.305 54.219 + -6.6425 -65.272 54.566 + -5.6525 -65.259 54.59 + -3.6815 -65.298 54.399 + -49.6585 36.838 41.709 + -0.6475 -65.469 53.298 + 0.3315 -65.481 52.871 + 1.3005 -65.492 52.586 + 2.3175 -65.523 52.147 + 3.2885 -65.585 51.823 + 4.2905 -65.617 51.462 + 5.2955 -65.651 51.11 + 6.3015 -65.685 50.759 + 7.3055 -65.712 50.402 + 8.3045 -65.75 50.033 + 9.3145 -65.771 49.688 + 10.3105 -65.792 49.412 + 11.3205 -65.818 49.08 + 12.3195 -65.835 48.81 + 13.3245 -65.871 48.457 + 14.3245 -65.89 48.19 + 15.3335 -65.926 47.919 + 16.3345 -65.939 47.735 + 17.3355 -65.945 47.593 + 18.3415 -65.97 47.509 + 19.3425 -65.964 47.494 + 20.3435 -65.989 47.408 + 21.3405 -65.97 47.517 + 22.3465 -66.016 47.323 + 23.3435 -66.002 47.279 + 24.3585 -66.066 46.983 + 25.3305 -66.041 46.727 + 26.3385 -66.091 46.383 + 36.3315 3.808 38.403 + 16.4045 12.309 37.164 + 24.3245 3.966 41.432 + 6.3475 4.013 42.107 + 4.3545 3.974 41.587 + -6.7055 3.882 38.142 + -7.7105 3.861 37.397 + -2.6675 5.306 38.874 + -62.6645 38.251 40.448 + -61.6575 38.252 41.073 + -60.6615 38.274 41.464 + -27.6205 19.206 19.795 + -63.6265 21.483 53.731 + -34.6515 44.822 12.637 + -22.6605 59.556 3.435 + 55.3725 -10.357 -6.258 + 54.7435 -10.397 -7.26 + 62.0385 -21.173 18.704 + 16.9775 -5.659 -20.615 + -56.9705 -19.429 -13.533 + -55.9755 -19.396 -13.929 + -54.9785 -19.362 -14.322 + -53.9585 -19.332 -14.784 + -51.9725 -19.299 -15.075 + -52.9765 -19.31 -14.96 + -16.2665 15.83 3.34 + 42.4025 10.271 29.202 + -22.6725 56.588 4.667 + -21.6055 56.625 3.931 + 12.0185 20.815 16.621 + -56.6785 25.694 51.59 + 25.1295 20.318 22.842 + 0.8935 14.478 30.126 + -49.3525 44.938 7.101 + -48.2925 47.269 -8.526 + -50.2775 49.66 -9.26 + -5.3865 -19.513 54.409 + -18.0915 17.131 7.085 + -22.9675 18.117 5.283 + -75.1685 5.982 40.847 + 12.8175 -12.601 54.197 + -50.1405 48.746 -7.76 + 4.0645 16.622 28.271 + 2.9115 16.468 27.863 + 64.0255 -40.869 25.765 + -40.6335 -64.866 45.07 + -39.6205 -64.917 45.259 + -38.6395 -64.88 45.296 + -35.6755 -64.919 45.148 + -34.6725 -64.876 44.948 + -33.6695 -64.907 44.457 + -32.6775 -64.968 44.168 + -31.6625 -64.942 43.964 + -30.6585 -64.973 43.702 + -29.6575 -64.984 43.465 + -28.6575 -64.972 43.586 + -27.6555 -64.96 43.497 + -26.6515 -64.96 43.187 + -25.6535 -65.021 42.875 + -24.6565 -65.022 42.977 + -23.6545 -65.013 43.001 + -22.6615 -65.098 42.645 + -21.6555 -65.108 42.185 + -52.6865 46.065 1.5 + -55.7475 45.319 28.121 + -58.9745 45.219 26.997 + 10.8225 -11.113 52 + 46.4495 4.789 -4.302 + -75.0425 5.952 34.853 + -12.5965 -64.28 51.033 + -11.6295 -64.188 51.56 + -10.6215 -64.166 51.896 + -9.6065 -64.164 52.102 + -8.6255 -64.089 52.521 + -7.6455 -64.008 53.147 + -6.6475 -63.951 53.739 + -5.6485 -63.949 53.841 + -4.6565 -63.957 53.831 + -3.6695 -63.969 53.707 + -2.6955 -64.033 53.405 + -1.7045 -64.069 53.045 + -0.7035 -64.117 52.576 + 0.3015 -64.156 52.112 + 1.3055 -64.189 51.753 + 2.3085 -64.227 51.396 + 3.3115 -64.263 50.896 + 4.3075 -64.307 50.516 + 5.3015 -64.325 50.208 + 6.3075 -64.355 49.889 + 7.3195 -64.365 49.553 + 8.3325 -64.389 49.236 + 9.3345 -64.413 48.995 + 10.3425 -64.438 48.81 + 11.3455 -64.454 48.693 + 12.3465 -64.474 48.594 + 13.3435 -64.482 48.523 + 14.3515 -64.504 48.499 + 15.3435 -64.473 48.566 + 16.3415 -64.474 48.576 + 17.3415 -64.424 48.791 + 18.3495 -64.325 49.238 + 19.3565 -64.248 49.593 + 20.3525 -64.218 49.837 + 21.3425 -64.209 49.957 + 22.3305 -64.199 50.076 + 23.3175 -64.193 49.938 + 24.3125 -64.289 49.348 + 25.2955 -64.384 48.458 + 26.3725 -64.592 47.72 + -18.6575 5.081 34.325 + -16.6765 5.149 34.523 + -17.6605 5.069 34.425 + -31.6505 5.124 34.957 + 14.3505 2.645 43.533 + 59.7885 -25.576 -4.254 + 9.3475 4.02 42.466 + 10.3535 3.984 42.399 + -17.5325 17.073 8.753 + -50.6725 35.441 43.342 + -51.6785 35.446 43.962 + -59.6445 38.231 41.926 + -22.5335 63.98 -3.51 + 57.9085 -8.734 23.703 + -34.6525 46.278 12.009 + 37.1305 14.522 27.246 + 1.7125 18.649 11.424 + 15.3475 2.651 43.654 + -5.9705 13.807 24.749 + 57.3975 -5.935 20.702 + 48.3535 -66.193 31.45 + 49.3505 -66.247 30.952 + -32.2555 45.968 -4.677 + -10.3535 64.004 -16.809 + -13.8855 -18.582 -23.21 + -14.9945 -18.592 -22.907 + -13.0275 -18.507 -23.692 + -32.6515 50.621 9.016 + -15.4005 15.435 3.67 + -72.0095 41.655 16.722 + 51.1495 2.878 26.777 + 54.4385 -1.814 25.724 + -8.5865 71.683 -7.386 + 44.9295 -17.237 45.811 + 16.3415 2.651 43.656 + 20.1305 20.983 21.022 + 13.6705 20.858 18.661 + 23.6475 18.978 28.057 + 24.5765 18.693 28.394 + -27.6675 18.05 21.278 + -11.9945 15.463 10.787 + -23.9565 18.272 4.922 + -71.9855 12.471 3.833 + 13.5785 -10.716 51.489 + -25.8385 58.574 3.886 + -48.8685 47.048 -7.29 + -47.7545 45.042 -6.866 + -46.7055 42.925 -6.472 + -6.8045 -19.548 53.009 + -39.6535 -63.562 43.589 + -38.6595 -63.523 43.732 + -36.6575 -63.577 43.578 + -35.6605 -63.581 43.576 + -34.6595 -63.596 43.328 + -33.6565 -63.606 42.966 + -32.6605 -63.67 42.679 + -31.6565 -63.665 42.452 + -30.6575 -63.666 42.338 + -29.6555 -63.678 42.322 + -28.6595 -63.665 42.338 + -27.6585 -63.653 42.466 + -26.6625 -63.648 42.266 + -25.6555 -63.701 42.167 + -24.6555 -63.661 42.352 + -23.6555 -63.663 42.351 + -22.6535 -63.678 42.033 + -21.6535 -63.709 41.757 + -20.6595 -63.717 41.633 + -19.6665 -63.711 41.738 + -8.6715 -16.534 -27.838 + -12.9595 14.186 1.654 + -13.9835 14.276 1.256 + -14.9055 14.549 0.907 + -15.7915 14.865 0.596 + -16.6695 15.235 0.267 + -17.5985 15.509 -0.083 + -11.6155 -62.928 50.345 + -10.6205 -62.852 51.06 + -9.6365 -62.787 51.45 + -8.6015 -62.786 51.854 + -7.6215 -62.72 52.262 + -6.6505 -62.658 52.552 + -5.6445 -62.691 52.63 + -4.6545 -62.697 52.516 + -3.6675 -62.712 52.392 + -2.6745 -62.743 52.149 + -1.6725 -62.768 51.797 + -0.6945 -62.86 51.377 + 0.3175 -62.866 51.031 + 1.3375 -62.879 50.563 + 2.3435 -62.919 49.984 + 3.3445 -62.945 49.631 + 4.3425 -62.953 49.518 + 5.3415 -62.963 49.398 + 6.3455 -62.982 49.328 + 7.3435 -62.984 49.34 + 8.3215 -63.031 49.2 + 9.3355 -63.04 49.366 + 10.3395 -62.94 49.821 + 11.3445 -62.858 50.131 + 12.3465 -62.819 50.487 + 13.3485 -62.797 50.599 + 14.3475 -62.746 50.696 + 15.3615 -62.701 50.912 + 16.3545 -62.713 51.058 + 17.3475 -62.733 51.208 + 18.3505 -62.705 51.438 + 19.3475 -62.71 51.442 + 20.3425 -62.714 51.576 + 21.3405 -62.677 51.666 + 22.3345 -62.683 51.542 + 23.3265 -62.713 51.301 + 24.3175 -62.743 50.933 + 25.3325 -62.851 50.385 + 26.3045 -62.861 49.868 + 27.2765 -62.91 49.093 + -59.6585 27.096 51.457 + -60.6505 27.093 51.454 + -15.6765 5.155 34.76 + 51.7105 1.95 26.985 + 11.3445 4.031 42.477 + -58.6645 27.101 51.344 + -57.6635 27.115 51.133 + -56.6685 27.108 50.89 + -54.6705 35.45 44.954 + -55.6665 35.435 45.187 + -50.6745 38.232 41.413 + -49.5555 38.122 40.915 + -64.1835 -16.471 -7.032 + 60.1205 -10.032 10.701 + -30.6735 46.231 10.687 + 57.1265 -4.544 18.7 + -60.6445 32.684 47.391 + -58.0725 41.209 37.843 + -11.6365 67.058 -4.54 + 49.3495 -64.721 31.83 + 50.3485 -64.765 31.613 + 51.3425 -64.741 31.721 + 52.3365 -64.746 31.881 + 53.3345 -64.732 32.005 + 54.3415 -64.693 32.227 + 55.3435 -64.658 32.315 + 1.3415 3.955 40.739 + -30.6645 50.636 8.898 + -26.6015 50.679 7.267 + 4.0725 53.435 -11.144 + 49.1625 6.423 24.601 + -24.6585 58.052 4.5 + 56.2115 -5.978 26.724 + 46.8015 -8.051 39.767 + -8.7495 72.609 -8.972 + -7.7105 72.993 -8.887 + 6.8325 20.003 16.173 + -1.7495 17.853 13.057 + 17.2225 18.715 28.634 + 26.4555 12.347 36.344 + -52.1585 40.157 39.941 + -57.4375 51.485 -10.358 + -53.0745 51.387 -8.846 + -26.9255 58.562 3.499 + 13.4605 19.941 24.362 + -46.9145 42.296 -3.635 + -50.6215 47.569 -5.046 + -52.7675 49.628 -5.847 + -39.6545 -62.388 41.055 + -38.6535 -62.356 41.432 + -37.6315 -62.279 41.755 + -36.6555 -62.327 41.567 + -35.6575 -62.376 41.302 + -34.6595 -62.425 41.149 + -33.6545 -62.423 41.259 + -32.6575 -62.384 41.05 + -31.6525 -62.393 41.042 + -30.6565 -62.361 41.19 + -29.6575 -62.36 41.191 + -28.6625 -62.349 41.21 + -27.6615 -62.324 41.466 + -26.6615 -62.312 41.596 + -25.6645 -62.294 41.644 + -24.6595 -62.298 41.654 + -23.6555 -62.311 41.61 + -22.6495 -62.324 41.409 + -21.6515 -62.336 41.368 + -20.6525 -62.339 41.256 + -19.6635 -62.346 41.126 + -18.6875 -62.304 41.177 + -52.9025 54.319 -14.582 + -52.0775 53.849 -14.273 + -51.3005 53.271 -13.988 + -50.5535 52.661 -13.716 + -49.8525 51.921 -13.447 + -49.2475 51.013 -13.222 + -48.6545 50.101 -13.007 + -10.6135 -61.624 49.498 + -9.6335 -61.534 50.12 + -8.6535 -61.461 50.506 + -7.6385 -61.47 50.83 + -6.6475 -61.452 50.846 + -5.6505 -61.474 50.725 + -4.6575 -61.49 50.599 + -3.6625 -61.506 50.474 + -2.6455 -61.498 50.039 + -1.6555 -61.537 49.767 + -0.6565 -61.56 49.419 + 0.3435 -61.58 49.171 + 1.3415 -61.579 49.177 + 2.3435 -61.555 49.417 + 3.3345 -61.538 49.721 + 4.3385 -61.475 50.303 + 5.3415 -61.468 50.544 + 6.3495 -61.368 50.827 + 7.3545 -61.319 51.173 + 8.3635 -61.242 51.622 + 9.3565 -61.257 51.78 + 10.3445 -61.321 51.718 + 11.3495 -61.269 51.798 + 12.3455 -61.286 51.948 + 13.3545 -61.215 52.143 + 14.3435 -61.278 52.074 + 15.3545 -61.212 52.274 + 16.3425 -61.249 52.44 + 17.3475 -61.179 52.764 + 18.3475 -61.151 52.864 + 19.3445 -61.166 52.881 + 20.3435 -61.198 52.918 + 21.3425 -61.204 52.791 + 22.3355 -61.194 52.639 + 23.3345 -61.225 52.407 + 24.3285 -61.26 52.042 + 25.3405 -61.333 51.598 + 26.3325 -61.385 50.983 + 27.2855 -61.338 50.245 + -55.6565 13.051 55.048 + 7.3455 12.251 36.411 + 61.8375 -16.979 5.719 + -72.5245 1.778 18.863 + 17.3385 2.669 43.598 + -57.6565 13.042 54.894 + -40.8315 45.503 14.494 + 22.8335 21.401 17.708 + -59.6565 13.025 54.303 + -56.6605 35.433 45.31 + -57.6525 35.442 45.323 + -58.6485 35.46 45.222 + -59.6435 35.453 45.09 + -48.6235 38.138 40.354 + -47.6795 38.131 39.857 + -46.7255 38.135 39.391 + -45.6275 38.218 38.854 + -44.7885 38.137 38.608 + 16.4435 21.179 18.239 + 15.3495 21.104 17.838 + 49.3615 -63.229 32.618 + 50.3475 -63.255 32.218 + 51.3445 -63.269 32.256 + 52.3395 -63.231 32.481 + 53.3245 -63.244 32.684 + 54.3305 -63.208 32.906 + 55.3355 -63.199 33.027 + 57.3435 -63.161 33.089 + -72.4825 31.876 33.695 + 18.3355 2.658 43.459 + -60.6555 21.522 54.267 + 14.1705 21.12 14.539 + -45.6815 40.975 37.444 + 61.2635 -18.408 22.694 + 19.3305 2.643 43.204 + 60.1355 -11.439 17.695 + -18.6235 62.564 1.194 + -5.6195 73.072 -9.975 + 59.9285 -17.08 26.696 + -9.2375 15.778 10.34 + -18.9825 17.464 6.764 + -24.9465 18.392 4.559 + -56.0165 52.002 -9.896 + -52.2655 50.877 -8.564 + -51.5385 50.203 -8.288 + -47.5085 43.205 -3.866 + -51.3245 48.275 -5.303 + -53.6405 50.046 -6.149 + -55.6675 50.455 -6.819 + -38.6595 -61.274 37.761 + 20.3265 2.626 42.945 + -36.6285 -60.994 38.909 + -35.6795 -61.142 39.509 + -34.6675 -61.118 39.181 + -33.7145 -61.067 38.847 + -32.6665 -61.11 39.298 + -31.6645 -61.074 39.679 + -30.6725 -61.025 40.089 + -29.6705 -61.01 40.333 + -28.6525 -61.007 40.54 + -27.6665 -60.966 40.842 + -26.6635 -60.945 41.091 + -25.6615 -60.933 41.217 + -24.6605 -60.935 41.218 + -23.6565 -60.937 41.134 + -22.6535 -60.946 41.091 + -21.6455 -60.95 41.022 + -20.6455 -60.955 40.918 + -19.6375 -60.982 40.657 + -18.6575 -61.004 40.453 + 12.8085 -11.442 52.702 + -18.9695 16.686 18.554 + 10.0445 -9.303 47.187 + -26.4555 18.689 15.812 + -41.3215 45.488 15.775 + -56.2055 47.937 -2.657 + -9.6625 -60.3 47.655 + -8.6495 -60.291 48.14 + -7.6595 -60.252 48.164 + -6.6565 -60.256 48.402 + -5.6565 -60.269 48.033 + -4.6565 -60.27 48.153 + -3.6675 -60.283 47.923 + -2.6535 -60.269 48.149 + -1.6705 -60.248 48.321 + -0.6595 -60.232 48.543 + 0.3375 -60.196 48.927 + 1.3605 -60.126 49.503 + 2.3465 -60.06 50.27 + 3.3425 -59.975 51.116 + 4.3075 -59.916 51.738 + 5.3525 -59.878 51.933 + 6.3465 -59.872 52.066 + 7.3455 -59.845 52.303 + 8.3445 -59.826 52.55 + 9.3475 -59.799 52.783 + 10.3505 -59.775 52.892 + 11.3435 -59.772 53.16 + 12.3405 -59.742 53.526 + 13.3445 -59.694 53.871 + 14.3465 -59.645 54.22 + 15.3445 -59.601 54.447 + 16.3425 -59.636 54.475 + 17.3515 -59.772 53.975 + 18.3425 -59.714 53.765 + 19.3425 -59.669 53.83 + 20.3395 -59.641 54.062 + 21.3425 -59.68 53.989 + 22.3525 -59.745 53.678 + 23.3465 -59.766 53.291 + 24.3315 -59.777 52.888 + 25.3115 -59.791 52.483 + 26.3595 -59.751 51.98 + -45.7115 37.383 -10.035 + -73.9635 12.529 7.814 + -45.7605 49.847 -19.048 + -9.7645 -18.476 -30.069 + -53.5105 60.682 -50.497 + -57.6495 18.698 54.2 + -44.8905 32.773 -4.122 + -77.7315 12.658 19.81 + 49.6015 3.676 -1.082 + 7.3645 20.111 14.925 + -36.0075 29.928 26.956 + 10.3505 12.251 37.015 + 3.8215 19.395 13.633 + -44.8745 45.148 -24.045 + -68.4975 -2.471 22.877 + -60.6535 35.482 44.749 + 20.0765 21.575 12.419 + -72.7945 30.505 31.718 + -9.9225 14.56 20.356 + -12.4655 14.921 4.771 + 50.3775 -61.803 32.786 + 51.3475 -61.788 32.609 + 52.3385 -61.778 32.757 + 53.3335 -61.749 33.004 + 54.3325 -61.721 33.254 + 55.3295 -61.703 33.533 + 56.3345 -61.701 33.685 + 57.3425 -61.678 33.758 + -22.6465 5.151 35.119 + -71.2995 12.45 1.84 + 56.5145 -3.152 17.703 + 56.6985 -8.792 27.719 + -57.6515 36.837 43.937 + -25.6565 55.097 6.036 + -53.6335 11.648 54.882 + 43.5915 -8.038 42.139 + -70.9605 9.731 1.822 + -72.9565 19.361 6.784 + -10.1005 71.3 -12.492 + -13.9085 15.819 10.084 + -57.8755 45.272 27.377 + -45.5715 38.737 -3.06 + -47.2505 43.935 -6.676 + -46.2255 41.72 -6.292 + -59.0375 -14.678 39.888 + 33.7575 17.744 21.717 + 11.3155 19.98 23.595 + 1.9545 -11.651 48.913 + 7.9785 19.711 22.383 + -21.5815 15.294 23.523 + -33.6175 -59.89 37.838 + -32.6735 -59.792 38.163 + -31.6675 -59.742 38.79 + -30.6685 -59.691 39.305 + -29.6805 -59.649 39.711 + -28.6745 -59.618 40.086 + -27.6735 -59.583 40.464 + -26.6875 -59.553 40.758 + -25.6615 -59.542 40.955 + -24.6605 -59.543 40.965 + -23.6565 -59.548 40.909 + -22.6495 -59.549 40.884 + -21.6485 -59.551 40.876 + -20.6495 -59.562 40.725 + -19.6435 -59.593 40.37 + -18.6515 -59.622 40.077 + -17.6495 -59.623 39.874 + -16.6485 -59.615 39.78 + 46.8115 9.244 22.29 + 47.5175 8.55 22.558 + 48.2085 7.8 22.816 + 48.8735 7.023 23.067 + 49.5335 6.24 23.317 + -9.6405 -59.251 44.453 + -8.6285 -59.215 44.945 + -7.6565 -59.185 44.729 + -6.6435 -59.154 45.096 + -5.5665 -59.141 45.636 + -4.5695 -59.053 46.392 + -3.6705 -58.948 47.155 + -2.6665 -58.879 47.911 + -1.6555 -58.795 48.78 + -0.6355 -58.71 49.504 + 0.3585 -58.65 50.121 + 1.3465 -58.626 50.508 + 2.3775 -58.539 51.05 + 3.4035 -58.467 51.746 + 4.3615 -58.419 52.391 + 5.3345 -58.421 52.696 + 6.3425 -58.399 52.791 + 7.3415 -58.377 53.037 + 8.3425 -58.339 53.395 + 9.3485 -58.305 53.614 + 10.3355 -58.3 53.897 + 11.3555 -58.21 54.434 + 12.3255 -58.228 54.73 + 13.3475 -58.169 55.065 + 14.3425 -58.14 55.441 + 15.3405 -58.124 55.702 + 16.3435 -58.12 55.689 + 17.3415 -58.181 54.946 + 18.3395 -58.22 54.448 + 19.3445 -58.211 54.579 + 20.3375 -58.181 54.788 + 21.3385 -58.187 54.808 + 22.3465 -58.223 54.607 + 23.3605 -58.29 54.039 + 24.3485 -58.323 53.519 + 25.3245 -58.328 53.224 + 26.3435 -58.388 52.912 + -56.6575 18.682 53.821 + -55.6775 18.652 53.512 + 59.7055 -14.308 0.727 + 61.4015 -16.989 19.696 + 61.2765 -16.997 20.698 + -58.6515 18.705 54.564 + 23.3175 3.976 41.787 + -59.6665 15.855 54.404 + -59.6595 18.705 54.759 + -68.0805 4.234 48.402 + -75.0545 7.165 9.851 + -56.6805 24.289 52.19 + -57.6675 24.307 52.571 + -58.6575 24.326 52.844 + -59.6585 24.318 53.053 + 50.3595 3.121 -0.496 + -75.4075 7.176 10.843 + 21.3185 2.613 42.788 + 12.3505 12.248 37.374 + 12.4145 18.584 28.346 + 32.9995 18.62 18.581 + 59.5635 -10.084 4.719 + 32.4645 18.214 22.67 + 50.3625 -60.251 33.742 + 51.3635 -60.335 33.031 + 52.3465 -60.323 33.026 + 53.3365 -60.303 33.152 + 54.3335 -60.272 33.38 + 55.3305 -60.248 33.636 + 56.3285 -60.242 33.807 + 57.3385 -60.214 34.011 + 58.3465 -60.225 34.046 + 59.3455 -60.213 33.975 + -53.6455 5.957 53.631 + 40.1035 14.627 22.632 + 37.6445 16.086 21.723 + 13.5125 18.619 28.731 + 56.8935 -3.127 11.701 + -62.5695 31.274 47.92 + 38.9325 12.706 29.355 + 1.0685 50.561 -8.043 + -60.7155 38.5 -3.349 + -70.7125 11.076 0.844 + -9.0365 15.403 6.036 + 38.8575 15.183 23.597 + -48.1295 44.09 -4.099 + 29.0065 16.921 30.015 + 1.6995 16.219 27.444 + -23.7275 60.894 1.764 + -24.8625 60.772 1.354 + -55.0825 45.638 26.886 + -24.2445 12.917 27.046 + -53.5625 46.442 1.181 + 32.7195 13.832 31.387 + -32.5625 -58.527 37.156 + -31.6305 -58.404 38.105 + -30.6405 -58.323 38.873 + -29.6735 -58.271 39.313 + -28.6675 -58.228 39.806 + -27.6535 -58.185 40.284 + -26.6795 -58.157 40.617 + -25.6685 -58.134 40.853 + -24.6705 -58.135 40.928 + -23.6575 -58.134 40.937 + -22.6485 -58.137 40.894 + -21.6455 -58.148 40.746 + -20.6455 -58.171 40.493 + -19.6385 -58.192 40.234 + -18.6335 -58.227 39.86 + -17.6425 -58.243 39.599 + -16.6175 -58.257 39.261 + -15.6555 -58.312 38.908 + -47.5265 49.252 -14.028 + -46.9295 48.409 -13.812 + -19.3825 10.879 30.368 + -18.5135 10.456 30.64 + -17.7335 9.904 30.953 + -8.6095 -57.933 41.875 + -7.6085 -57.967 42.908 + -6.5885 -57.866 43.906 + -5.6165 -57.741 45.068 + -4.6565 -57.624 46.246 + -3.6405 -57.502 47.495 + -2.5995 -57.368 48.718 + -1.6235 -57.272 49.746 + -0.6285 -57.176 50.707 + 0.3575 -57.123 51.322 + 1.3535 -57.104 51.567 + 2.3575 -57.089 51.677 + 3.3565 -57.053 52.036 + 4.3645 -56.978 52.738 + 5.3495 -56.95 53.138 + 6.3305 -56.956 53.303 + 7.3455 -56.908 53.62 + 8.3445 -56.874 53.988 + 9.3465 -56.847 54.221 + 10.3405 -56.817 54.598 + 11.3455 -56.764 55.062 + 12.3295 -56.753 55.35 + 13.3485 -56.704 55.656 + 14.3475 -56.668 56.013 + 15.3425 -56.652 56.285 + 16.3425 -56.647 56.272 + 17.3375 -56.696 55.653 + 18.3425 -56.753 55.045 + 19.3595 -56.794 55.018 + 20.3445 -56.769 55.083 + 21.3415 -56.766 55.051 + 22.3445 -56.792 54.837 + 23.3435 -56.839 54.35 + 24.3435 -56.896 53.751 + 25.3265 -56.878 53.683 + 26.3535 -56.922 53.666 + 27.3595 -56.809 53.444 + 4.3425 12.22 35.531 + 53.5205 -4.778 -4.285 + -57.6725 21.503 53.654 + -45.3195 60.799 -51.065 + 22.3215 3.986 42.04 + 21.3225 3.996 42.293 + -26.6605 5.103 35.054 + -61.6625 18.71 54.81 + -62.6635 18.705 54.678 + 53.4975 -13.314 -9.277 + -9.4265 69.807 -15.432 + -5.6795 3.884 38.869 + -60.6535 24.308 53.039 + -61.6375 24.285 52.997 + -62.6515 24.319 52.713 + -63.6145 24.272 52.402 + 16.7475 21.313 11.188 + -64.0915 31.928 46.319 + 45.7175 10.098 23.307 + -12.9765 15.575 10.426 + 56.7395 -3.155 14.701 + 52.3825 -58.894 33.121 + 53.3435 -58.869 33.156 + 54.3355 -58.851 33.276 + 55.3295 -58.823 33.521 + 56.3275 -58.799 33.777 + 57.3355 -58.777 34.003 + 58.3395 -58.769 34.136 + 59.3455 -58.773 34.152 + 60.3545 -58.79 34.04 + -9.6755 5.133 35.203 + -41.8135 41.983 34.569 + -48.7265 39.532 39.511 + 45.3035 -8.027 41.104 + 51.9325 -8.069 34.886 + 47.7135 3.968 31.21 + 59.4805 -8.667 8.703 + -15.0485 14.824 21.474 + 56.6815 -4.542 21.709 + -52.0345 48.979 -5.562 + 29.8705 16.511 30.312 + -12.6305 7.382 32.836 + -27.9755 19.406 21.117 + 30.6775 16.011 30.601 + 30.7105 14.926 32.059 + -56.0865 40.929 38.562 + -44.6125 43.964 32.047 + -56.4635 45.402 7.455 + -54.2285 46.038 15.532 + -31.5875 -57.05 37.559 + -30.6935 -56.924 38.481 + -29.6535 -56.884 39.149 + -27.6785 -56.79 40.214 + -26.6605 -56.742 40.684 + -25.6785 -56.735 40.889 + -24.6655 -56.724 41.01 + -23.6565 -56.726 41.012 + -22.6515 -56.736 40.914 + -21.6345 -56.763 40.684 + -20.6495 -56.755 40.579 + -19.6355 -56.793 40.24 + -18.6555 -56.813 39.907 + -17.6575 -56.849 39.533 + -16.6265 -56.902 39.11 + -15.6335 -56.919 38.74 + -14.6335 -56.965 38.474 + -13.6465 -56.948 38.29 + -43.1865 45.658 4.957 + -48.1185 50.227 -14.252 + -46.4195 47.233 -13.624 + -71.5415 13.814 2.82 + -50.8425 45.502 28.369 + -7.6715 -56.516 42.45 + -6.5815 -56.405 44.036 + -5.5775 -56.284 45.555 + -4.6045 -56.156 46.838 + -3.5735 -56.025 48.076 + -2.6065 -55.923 49.24 + -1.6395 -55.835 50.25 + -0.6155 -55.717 51.293 + 0.3475 -55.678 51.944 + 1.3635 -55.627 52.261 + 2.3355 -55.663 52.213 + 3.3635 -55.616 52.371 + 4.3825 -55.555 52.959 + 5.3655 -55.514 53.464 + 6.3395 -55.507 53.765 + 7.3445 -55.466 54.107 + 8.3445 -55.443 54.349 + 9.3465 -55.418 54.577 + 10.3375 -55.393 54.974 + 11.3365 -55.358 55.34 + 12.3465 -55.326 55.542 + 13.3525 -55.303 55.758 + 14.3555 -55.267 56.095 + 15.3425 -55.252 56.391 + 16.3445 -55.246 56.412 + 17.3765 -55.288 56.045 + 18.3585 -55.358 55.353 + 19.3425 -55.362 55.192 + 20.3465 -55.377 55.098 + 21.3465 -55.389 54.97 + 22.3375 -55.394 54.801 + 23.3445 -55.434 54.483 + 24.3355 -55.463 54.072 + 25.3475 -55.485 54.014 + 26.3435 -55.469 54.114 + -63.6775 15.836 54.112 + -62.6695 15.848 54.344 + -61.6685 15.849 54.493 + -60.6725 15.846 54.397 + -32.6555 5.092 35.278 + 20.3285 4.011 42.432 + -27.6625 5.116 34.944 + -25.6595 5.112 35.184 + -16.6695 65.521 -1.616 + -63.6615 18.699 54.426 + -64.6365 18.681 54.016 + 51.9955 2.707 24.241 + -19.8255 64.984 -2.538 + -45.1665 45.159 -16.045 + 7.2605 67.043 -25.289 + 61.0965 -12.801 10.697 + 55.4715 -3.219 2.699 + -60.7795 61.13 -35.353 + -13.6335 67.127 -2.819 + -72.7825 -11.819 14.948 + 18.3365 4.032 42.718 + -57.6635 31.287 48.632 + 53.3595 -57.474 33.047 + 54.3425 -57.453 33.143 + 55.3375 -57.425 33.375 + 56.3335 -57.4 33.623 + 57.3245 -57.38 33.801 + 58.3375 -57.364 34.015 + 59.3395 -57.356 34.152 + 60.3495 -57.371 34.087 + 61.3215 -57.505 33.996 + 34.3485 3.858 38.847 + 42.3205 12.704 23.462 + 41.1775 13.467 24.464 + -11.3745 14.962 5.177 + 14.2005 20.973 17.419 + -45.6405 39.638 38.321 + -44.6335 39.63 37.945 + -71.1075 -7.866 9.937 + -28.6435 55.046 6.353 + 35.4345 15.394 26.627 + -57.7245 52.037 -11.715 + -3.1905 17.338 9.631 + -55.1285 37.208 43.443 + -54.5495 50.413 -6.477 + -49.5115 44.858 30.305 + -51.6285 43.589 34.015 + 31.3985 15.352 30.878 + 10.2205 19.93 23.193 + -45.6535 45.549 11.329 + -48.5295 41.079 38.152 + -57.6715 45.153 7.029 + -5.6365 13.333 26.346 + -54.2795 53.422 -12.211 + 1.4765 18.389 8.442 + -40.6545 43.555 30.556 + -6.9675 15.432 3.885 + -27.6885 -55.377 40.352 + -26.6625 -55.326 40.816 + -25.6665 -55.305 41.09 + -24.6635 -55.296 41.231 + -23.6575 -55.294 41.201 + -22.6535 -55.314 41.131 + -21.6455 -55.324 41.005 + -20.6395 -55.349 40.755 + -19.6455 -55.367 40.457 + -18.6285 -55.427 39.991 + -17.6515 -55.434 39.677 + -16.6375 -55.481 39.208 + -15.6315 -55.516 38.856 + -14.6405 -55.531 38.56 + -13.6565 -55.572 38.142 + -12.6645 -55.597 37.833 + -11.6635 -55.591 37.913 + 6.1365 19.067 23.17 + 7.2875 19.228 23.583 + -10.7765 15.317 17.126 + -55.7025 43.996 32.582 + -61.8225 45.333 21.632 + -62.4865 59.199 -37.489 + -60.0035 -12.616 -10.048 + 4.0065 18.502 5.03 + 14.8735 20.934 9.063 + 19.4035 21.447 10.744 + 30.2755 19.818 14.727 + 0.3115 -54.267 52.377 + 1.3505 -54.209 52.654 + 2.3485 -54.21 52.66 + 3.3615 -54.188 52.746 + 4.3505 -54.148 53.271 + 5.3505 -54.096 53.867 + 6.3105 -54.092 54.289 + 7.3605 -54.01 54.55 + 8.3345 -54.027 54.741 + 9.3335 -54.011 55.002 + 10.3395 -53.964 55.331 + 11.3365 -53.955 55.471 + 12.3385 -53.952 55.473 + 13.3445 -53.935 55.547 + 14.3355 -53.914 55.831 + 15.3455 -53.878 56.145 + 16.3435 -53.87 56.303 + 17.3435 -53.879 56.153 + 18.3505 -53.932 55.703 + 19.3655 -53.993 55.253 + 20.3575 -54.008 55.025 + 21.3535 -54.016 54.884 + 22.3475 -54.024 54.74 + 23.3535 -54.051 54.53 + 24.3455 -54.054 54.368 + 25.3415 -54.051 54.354 + 26.3525 -54.07 54.28 + 27.3365 -54.061 54.216 + 21.3425 12.245 36.4 + 20.3385 12.291 36.337 + 19.1845 12.224 36.555 + 57.5965 -25.751 -9.232 + 27.2125 20.724 17.881 + -16.6635 3.705 35.681 + 19.3255 4.004 42.539 + -20.6465 5.101 34.468 + -64.6785 15.83 53.742 + 13.1065 20.897 17.018 + 62.0695 -16.963 11.696 + 22.3155 2.603 42.547 + 23.3065 2.586 42.27 + 39.7275 12.187 29.635 + 48.4945 7.2 24.353 + -37.8675 43.707 19.946 + -3.9635 15.82 22.498 + 21.0145 17.74 29.998 + 13.0235 20.981 14.119 + 25.2955 20.88 20.033 + -12.1795 15.291 7.799 + -3.7305 17.238 10.889 + -10.7045 68.555 -5.204 + -61.6265 31.249 48.354 + 54.3615 -56.063 32.97 + 55.3395 -56.036 33.149 + 56.3335 -56.01 33.382 + 57.3315 -55.986 33.631 + 58.3305 -55.971 33.777 + 59.3335 -55.958 33.912 + 60.3425 -55.953 34.029 + 61.3505 -55.958 34.025 + 62.3785 -56.089 33.914 + -59.6575 28.486 50.597 + -10.5015 -17.01 -26.053 + -14.7725 9.397 -8.906 + -30.5765 47.751 10.216 + -3.6145 -22.156 57 + 36.5845 15.808 24.183 + -66.6965 40.98 32.594 + 56.0105 -8.905 -4.264 + -60.7105 62.584 -38.001 + 48.3225 4.277 29.997 + 45.8165 6.512 30.481 + -44.1175 32.773 -3.044 + -56.9175 50.025 -7.304 + -0.7385 17.999 10.528 + -49.2005 46.134 21.667 + -58.9615 43.979 31.469 + 9.1245 19.862 22.799 + -44.5525 45.623 11.718 + 7.7935 19.055 25.22 + 43.9225 3.864 -7.217 + -19.7555 17.46 15.308 + 0.2855 18.098 8.002 + 18.2105 18.531 28.981 + -4.4675 16.204 4.802 + -53.7765 54.705 -14.899 + -27.6605 -53.944 40.555 + -26.6805 -53.914 40.992 + -25.6675 -53.875 41.339 + -24.6635 -53.867 41.474 + -23.6605 -53.874 41.512 + -22.6555 -53.871 41.486 + -21.6525 -53.877 41.334 + -20.6495 -53.903 41.09 + -19.6555 -53.922 40.809 + -18.6415 -53.975 40.338 + -17.6355 -54.022 39.839 + -16.6445 -54.052 39.437 + -15.6475 -54.089 39.052 + -14.6555 -54.12 38.652 + -13.6495 -54.169 38.186 + -12.6585 -54.191 37.958 + -11.6725 -54.19 37.953 + -10.6715 -54.131 38.546 + -7.9225 12.974 25.516 + 31.7625 17.48 26.7 + -64.9785 44.051 24.967 + -77.4235 16.767 22.793 + -60.9275 -12.574 -9.019 + 5.3305 18.919 5.526 + 13.7285 20.773 8.636 + 20.4965 21.492 11.145 + 29.3955 20.164 14.404 + 36.3735 17.136 16.973 + 0.2995 -52.819 52.708 + 1.3445 -52.797 52.916 + 2.3665 -52.764 52.979 + -19.5325 65.917 -5.299 + 5.3345 -52.643 54.611 + 6.3615 -52.579 54.924 + 7.3275 -52.6 55.242 + 8.3465 -52.519 55.787 + 9.3435 -52.511 55.916 + 10.3455 -52.496 55.874 + 11.3435 -52.538 55.699 + 12.3485 -52.587 55.428 + 13.3415 -52.568 55.323 + 14.3255 -52.557 55.54 + 15.3235 -52.533 55.766 + 16.3325 -52.522 56.014 + 17.3415 -52.48 56.126 + 18.3415 -52.505 55.904 + 19.3435 -52.545 55.558 + 20.3525 -52.583 55.36 + 21.3425 -52.578 55.196 + 22.3445 -52.605 54.97 + 23.3485 -52.62 54.863 + 24.3515 -52.645 54.636 + 25.3495 -52.653 54.503 + 26.3625 -52.678 54.304 + 27.3525 -52.683 54.141 + -14.6725 5.141 34.979 + -0.6535 12.084 32.729 + 0.3635 12.081 33.468 + -51.4545 52.221 -52.436 + -7.3215 15.724 18.354 + -17.6655 3.72 35.465 + -18.6585 3.694 35.432 + -13.6655 5.117 35.07 + 22.3455 12.243 36.517 + 50.8085 4.582 23.801 + -17.4885 65.337 -1.667 + -47.3965 48.401 -12.539 + -48.0365 49.149 -12.772 + -2.6505 10.707 33.994 + -74.7125 5.182 40.822 + -46.9735 45.036 -38.074 + 56.9375 -4.588 3.718 + -35.0085 37.645 18.948 + 42.7545 -8.055 42.685 + -20.6095 17.594 4.681 + -0.6525 10.763 34.764 + -44.6765 40.986 37.088 + 57.6385 -4.508 10.701 + -75.5605 15.41 31.799 + -61.6625 17.289 54.819 + 54.3845 -54.661 32.967 + 55.3715 -54.656 32.905 + 56.3405 -54.621 33.146 + 57.3345 -54.596 33.383 + 58.3365 -54.58 33.6 + 59.3305 -54.569 33.655 + 60.3365 -54.561 33.777 + 61.3435 -54.554 33.887 + 62.3495 -54.56 33.867 + 63.4135 -54.695 33.629 + -60.6575 22.934 53.697 + -61.6495 22.911 53.646 + -62.6575 22.924 53.444 + -60.7055 -41.349 13.322 + -58.7805 56.575 -21.841 + -21.5505 17.829 4.342 + 35.7055 16.193 23.868 + 26.3085 2.524 41.126 + 59.2555 -8.668 15.696 + 7.3815 65.554 -24.21 + -5.7245 74.574 -10.763 + -58.2525 49.387 -7.826 + 9.6635 -10.172 50.064 + -57.5485 -22.732 41.452 + 9.7205 16.125 31.785 + -49.6815 46.101 22.945 + 14.4475 -10.148 50.265 + -43.3575 42.021 35.482 + -1.0275 17.63 7.521 + 22.9345 17.289 30.683 + -3.0075 16.725 5.32 + -4.6895 17.192 13.443 + -63.7345 44.45 25.389 + -26.6665 -52.483 41.205 + -25.6635 -52.448 41.586 + -24.6655 -52.44 41.734 + -23.6555 -52.421 41.818 + -22.6565 -52.442 41.74 + -21.6545 -52.452 41.589 + -20.6465 -52.481 41.36 + -19.6565 -52.491 41.061 + -18.6495 -52.534 40.686 + -17.6405 -52.584 40.209 + -16.6555 -52.607 39.791 + -15.6725 -52.635 39.366 + -14.6505 -52.693 38.921 + -13.6475 -52.729 38.553 + -12.6575 -52.746 38.259 + -11.6605 -52.759 38.147 + -10.6765 -52.718 38.686 + -6.3275 14.84 1.203 + -7.3915 14.64 0.836 + -14.0305 68.361 -11.464 + -61.7805 -12.519 -8.031 + 6.5775 19.313 5.987 + 12.5235 20.54 8.192 + 21.5845 21.534 11.549 + 28.5125 20.52 14.084 + 37.2385 16.733 17.293 + 0.3405 -51.39 53.043 + 1.3495 -51.367 53.271 + 2.3315 -51.365 53.422 + 4.3255 -51.225 54.992 + 5.3625 -51.155 55.288 + 6.3265 -51.162 55.721 + 7.3345 -51.075 56.379 + 8.3475 -51.045 56.623 + 9.3395 -51.081 56.555 + 10.3465 -51.104 56.469 + 11.3455 -51.086 56.429 + 12.3435 -51.151 55.86 + 13.3365 -51.196 55.555 + 14.3455 -51.14 55.667 + 15.3335 -51.138 55.988 + 16.3405 -51.082 56.42 + 17.3425 -51.063 56.515 + 18.3415 -51.041 56.614 + 19.3435 -51.056 56.646 + 20.3455 -51.07 56.53 + 21.3385 -51.076 56.26 + 22.3255 -51.068 56.096 + 23.3345 -51.139 55.529 + 24.3405 -51.197 55.066 + 26.4865 -51.253 54.239 + 27.4965 -51.236 53.984 + 4.3525 10.844 37.03 + 3.3485 10.835 36.658 + 2.3555 10.807 36.267 + 1.3395 10.811 35.664 + 0.3405 10.81 35.174 + -19.6505 3.735 35.366 + -20.6405 3.739 35.607 + -2.6545 12.044 31.844 + 23.3435 12.272 36.554 + 24.3395 12.25 36.643 + 25.3365 12.238 36.629 + 2.3345 3.978 41.01 + 50.4245 4.757 25.082 + -18.5335 15.774 -0.426 + -23.2135 17.882 15.532 + -49.2615 45.573 27.465 + 15.2605 21.203 14.939 + 22.3115 21.3 18.946 + -9.8955 15.601 8.64 + 6.2195 19.951 14.508 + 5.0215 19.67 14.069 + 56.4065 -10.285 -4.271 + 27.1995 20.434 20.73 + -18.5815 65.296 -2.092 + -20.6405 59.594 3.108 + 55.4025 -53.266 32.735 + 56.3605 -53.251 32.677 + 57.3375 -53.215 32.94 + 58.3255 -53.186 33.19 + 59.3345 -53.184 33.369 + 60.3335 -53.17 33.513 + 61.3395 -53.163 33.635 + 62.3475 -53.161 33.658 + 63.4025 -53.308 33.615 + 64.3595 -53.314 33.229 + 61.1565 -14.188 15.699 + 61.3345 -14.198 6.716 + -63.6485 22.907 53.065 + -64.6115 22.866 52.649 + -62.6815 12.957 52.796 + -69.2375 0.201 8.889 + 56.3045 -3.143 19.708 + -45.1655 43.584 -25.047 + -57.6535 17.282 54.328 + 31.4295 14.259 32.334 + 12.4165 19.991 23.985 + -62.6855 -14.76 36.465 + -59.9825 -17.384 39.504 + -11.5615 9.692 30.208 + 8.6835 16.148 31.393 + -37.7415 42.313 27.27 + -54.4355 43.295 34.551 + -44.1785 42.515 35.195 + -2.2215 17.349 7.082 + -53.2695 45.858 2.758 + -5.7195 15.828 4.342 + 29.1275 14.799 32.934 + -60.1285 45.06 26.601 + -26.6835 -51.066 41.364 + -25.6655 -51.032 41.714 + -24.6665 -51.026 41.858 + -23.6595 -51.008 41.96 + -22.6565 -50.991 42.054 + -21.6505 -51.025 42.018 + -20.6555 -51.02 41.82 + -19.6575 -51.05 41.435 + -18.6415 -51.097 41.096 + -17.6375 -51.131 40.721 + -16.6305 -51.182 40.23 + -15.6605 -51.199 39.782 + -14.6995 -51.248 39.305 + -13.6625 -51.281 38.886 + -12.6575 -51.33 38.414 + -11.6645 -51.347 38.304 + -10.6755 -51.3 38.813 + -9.7785 -51.231 39.789 + 2.7665 18.077 4.575 + -62.7295 -12.466 -7.024 + 7.7735 19.594 6.429 + 11.3805 20.364 7.766 + 22.6115 21.482 11.922 + 27.5845 20.782 13.744 + 38.0615 16.253 17.599 + 45.7365 10.402 20.462 + 0.3505 -49.936 53.631 + 1.3425 -49.906 54.002 + 4.3425 -49.757 55.689 + 5.3475 -49.721 56.036 + 6.3505 -49.656 56.618 + 7.3395 -49.634 57.019 + 8.3225 -49.655 57.086 + 9.3465 -49.594 57.196 + 10.3445 -49.62 57.275 + 11.3445 -49.625 57.136 + 12.3425 -49.668 56.653 + 13.3495 -49.625 56.256 + 14.3915 -49.568 56.902 + 15.3575 -49.547 57.395 + 16.3485 -49.564 57.578 + 17.3475 -49.558 57.558 + 18.3435 -49.57 57.588 + 19.3445 -49.582 57.621 + 20.3395 -49.581 57.471 + 21.3365 -49.599 57.215 + 22.3715 -49.754 56.946 + 1.2315 18.62 12.696 + 1.3385 9.465 37.314 + 17.3335 9.498 39.63 + -77.3805 9.963 21.827 + -6.6505 10.593 31.581 + -5.6485 10.623 32.216 + -4.6575 10.664 32.734 + -28.6615 5.087 34.914 + -30.6525 5.138 34.727 + -21.6495 3.739 35.967 + -22.6435 3.777 36.133 + -3.6275 11.951 31.299 + -4.6365 11.948 30.679 + -5.6205 11.876 30.023 + -57.6605 32.641 47.696 + -36.7895 34.523 25.934 + 38.5075 15.68 22.042 + -64.8485 44.727 19.122 + 29.4845 20.082 17.288 + 54.1755 -1.835 26.724 + -45.1705 45.126 -30.051 + -28.7205 15.151 -6.924 + 58.4485 -8.736 1.719 + 59.5175 -8.649 11.699 + -53.1405 26.834 -6.422 + -67.5275 4.145 1.822 + -6.6895 49.042 -0.738 + 56.4085 -51.881 32.237 + 57.3625 -51.869 32.288 + 58.3395 -51.828 32.657 + 59.3335 -51.807 32.886 + 60.3295 -51.784 33.142 + 61.3385 -51.773 33.367 + 62.3415 -51.768 33.475 + 63.3485 -51.781 33.363 + 64.3605 -51.802 33.132 + 65.3245 -51.939 32.702 + -69.1465 30.33 5.716 + 61.0495 -17.009 22.697 + -46.3975 60.827 -48.045 + -56.8595 46.115 16.051 + -65.4985 1.397 45.913 + -27.6485 56.562 5.333 + -72.7655 16.597 5.832 + -45.5135 41.995 -24.047 + -56.6925 55.022 -16.191 + -75.5955 8.59 27.853 + 27.3415 2.528 40.722 + 28.3385 2.505 40.447 + -40.6595 -51.327 22.797 + 29.3375 2.494 40.31 + 30.3375 2.481 40.288 + -18.5275 12.714 27.63 + -54.2285 44.944 30.111 + 6.7655 19.453 21.955 + -37.3035 41.183 27.461 + 38.4195 10.29 33.474 + -63.2995 44.233 10.894 + -3.5335 16.874 6.602 + 8.6085 17.174 29.901 + -8.2835 14.998 3.395 + -60.0435 45.49 23.702 + -33.4475 23.642 29.377 + -26.6635 -49.636 41.579 + -25.6615 -49.602 41.958 + -24.6665 -49.584 42.237 + -23.6655 -49.578 42.382 + -22.6565 -49.54 42.564 + -21.6525 -49.569 42.515 + -20.6525 -49.574 42.352 + -19.6565 -49.59 42.076 + -18.6595 -49.622 41.69 + -17.6435 -49.689 41.09 + -16.6505 -49.74 40.436 + -15.6625 -49.769 40.031 + -14.6575 -49.816 39.537 + -13.6585 -49.851 39.149 + -12.6565 -49.891 38.798 + -11.6525 -49.895 38.632 + -10.6515 -49.863 39.02 + -9.7455 -49.787 40.132 + 8.9755 19.856 6.874 + 10.1765 20.123 7.32 + 16.0215 21.08 9.489 + 24.6665 21.333 12.671 + 33.8185 18.385 16.035 + 38.8845 15.778 17.905 + 45.0045 11.064 20.188 + 49.2125 6.804 21.776 + 10.3815 18.799 27.614 + 0.3775 -48.487 54.075 + 1.3765 -48.431 54.668 + 3.3285 -48.366 55.715 + 4.3485 -48.311 56.158 + 5.3575 -48.279 56.498 + 6.3505 -48.238 56.986 + 7.3475 -48.204 57.349 + 8.3365 -48.201 57.511 + 9.3385 -48.191 57.638 + 10.3435 -48.198 57.662 + 11.3435 -48.208 57.526 + 12.3455 -48.191 57.309 + 13.3445 -48.213 57.222 + 14.3475 -48.176 57.573 + 15.3465 -48.148 57.949 + 16.3435 -48.141 58.076 + 17.3415 -48.147 58.107 + 18.3435 -48.157 58.149 + 19.3425 -48.129 58.198 + 20.3465 -48.157 57.987 + 21.3525 -48.183 57.765 + 22.3675 -48.193 57.495 + 23.4455 -48.375 56.857 + 50.5885 -8.058 36.472 + 2.3455 9.469 37.68 + 16.3405 9.551 39.692 + 15.3455 9.537 39.672 + 14.3465 9.524 39.536 + 13.3465 9.542 39.439 + 12.3495 9.525 39.414 + 11.3575 9.495 39.378 + 10.3535 9.503 39.269 + 9.3445 9.535 39.075 + -49.0795 12.229 -7.432 + -23.9855 -18.732 -21.625 + -77.5055 11.331 24.824 + 5.3485 10.862 37.289 + 6.3605 10.829 37.615 + 7.3485 10.871 37.661 + 8.3555 10.853 37.876 + -77.2675 9.971 23.83 + -77.3705 9.969 22.83 + -36.0765 -53.513 20.674 + -45.7405 40.493 -8.04 + -45.9705 40.43 -23.043 + 60.7755 -14.214 19.696 + -61.6335 29.878 49.392 + 53.7305 -0.184 24.881 + -71.5575 -11.83 23.924 + 53.9295 -3.319 -1.294 + -18.0115 -12.944 -21.453 + 58.7855 -12.927 26.694 + 58.2875 -12.955 27.697 + 57.7975 -12.982 28.705 + 57.3895 -50.508 31.682 + 58.3515 -50.483 31.887 + 59.3395 -50.442 32.172 + 60.3335 -50.435 32.488 + 61.3285 -50.404 32.751 + 62.3405 -50.405 32.964 + 63.3445 -50.404 32.968 + 64.3515 -50.411 32.866 + 65.3565 -50.441 32.581 + 66.3585 -50.475 32.224 + 67.2375 -50.583 31.895 + 57.5495 -14.459 -4.271 + 46.4415 9.428 23.577 + 44.9855 10.756 23.032 + 58.0055 -21.513 -8.242 + 28.1265 20.162 21.071 + -8.0665 -18.499 -32.011 + 57.6375 -4.511 11.702 + 28.3515 3.922 39.999 + 58.9785 -8.693 3.709 + 31.3335 2.476 40.283 + 32.3455 2.481 40.078 + -59.2235 45.708 15.226 + 32.1105 18.698 21.107 + -45.9865 40.046 -3.231 + -48.7355 44.992 -4.331 + -41.7145 -49.677 25.033 + -40.5775 -49.304 26.226 + 33.3335 2.451 39.785 + 34.3265 2.435 39.418 + -36.5155 -49.179 29.561 + 32.0975 14.651 31.124 + -15.8775 15.29 21.165 + 30.5745 12.31 34.93 + -4.8465 16.421 6.117 + -9.4755 14.673 2.964 + 17.5085 -11.649 52.86 + 32.7165 11.405 34.303 + 43.1635 12.535 20.921 + -26.6535 -48.207 41.814 + -25.6545 -48.163 42.324 + -24.6655 -48.148 42.609 + -23.6515 -48.111 42.801 + -22.6585 -48.123 42.867 + -21.6565 -48.121 42.854 + -20.6525 -48.135 42.739 + -19.6455 -48.158 42.494 + -18.6585 -48.184 42.069 + -17.6835 -48.217 41.506 + -16.6595 -48.295 40.801 + -15.6605 -48.353 40.163 + -14.6545 -48.389 39.797 + -13.6645 -48.406 39.514 + -12.6545 -48.451 39.189 + -11.6625 -48.472 38.924 + -10.6415 -48.43 39.258 + -9.7265 -48.369 40.251 + 18.3185 21.347 10.339 + 17.1675 21.231 9.911 + 23.6405 21.435 12.295 + 32.9065 18.698 15.696 + 39.7005 15.29 18.209 + 44.2735 11.724 19.917 + 49.8685 6.02 22.027 + 23.0105 16.29 32.178 + -43.6525 45.641 22.191 + 0.3865 -47.072 54.299 + 1.3265 -47.048 54.872 + -21.0835 64.999 -5.86 + 4.3665 -46.903 56.352 + 5.3535 -46.871 56.743 + 6.3285 -46.852 57.044 + 7.3465 -46.818 57.357 + 8.3395 -46.796 57.617 + 9.3345 -46.789 57.781 + 10.3375 -46.791 57.793 + 11.3435 -46.786 57.723 + 12.3445 -46.782 57.696 + 13.3435 -46.778 57.849 + 14.3375 -46.774 58.016 + 15.3415 -46.745 58.225 + 16.3385 -46.749 58.269 + 17.3395 -46.748 58.267 + 18.3425 -46.733 58.329 + 19.3495 -46.742 58.275 + 20.3555 -46.753 58.166 + 21.3535 -46.765 58.009 + 22.3645 -46.794 57.682 + 23.3635 -46.833 57.305 + 24.3755 -46.877 56.969 + 29.3275 8.027 37.744 + -69.9125 11.038 -0.182 + 3.3365 9.506 37.962 + 4.3505 9.485 38.294 + 5.3545 9.478 38.526 + 6.3485 9.507 38.679 + 7.3515 9.493 38.781 + -70.7315 40.865 27.013 + -53.6855 32.661 46.733 + -58.6615 29.887 49.637 + 0.3835 9.396 36.89 + 18.3375 9.531 39.309 + 60.9915 -14.207 17.691 + -44.8675 46.688 -30.056 + 59.8205 -18.544 -2.269 + 59.4485 -18.568 -3.274 + 9.3365 10.926 37.842 + 10.3435 10.91 37.94 + 11.3505 10.879 38.147 + 12.3475 10.895 38.283 + 13.3535 10.874 38.491 + 15.3425 10.893 38.644 + 17.3405 10.916 38.311 + -62.6005 29.834 49.095 + -18.7315 17.082 5.368 + 2.3605 13.504 32.962 + 1.3675 13.459 32.318 + 8.3405 15.002 32.995 + 9.3425 14.997 33.238 + 60.4335 -14.268 2.732 + 60.0835 -14.283 1.725 + 57.3845 -49.132 31.374 + 58.3795 -49.13 31.057 + 59.3465 -49.111 31.26 + 60.3355 -49.087 31.723 + 61.3335 -49.063 31.973 + 62.3375 -49.043 32.23 + 63.3415 -49.035 32.36 + 64.3465 -49.038 32.36 + 65.3525 -49.053 32.229 + 66.3695 -49.07 32.011 + 67.3545 -49.108 31.707 + 68.3825 -49.145 31.256 + 13.8255 16.88 31.754 + 35.3395 2.426 39.059 + 33.3565 16.432 27.288 + -16.6265 64.114 -0.241 + 52.9045 -1.963 -2.289 + 55.8395 -1.798 16.701 + 36.3365 2.416 38.925 + -12.6365 67.106 -3.522 + 37.4325 2.433 38.649 + -10.3175 15.665 9.944 + -19.9615 17.652 6.397 + -25.9825 18.456 4.175 + -50.6255 44.779 3.728 + 16.4335 -10.492 50.957 + 31.2725 19.144 20.8 + -49.3475 45.884 -4.564 + -21.2845 52.042 -11.448 + -26.2125 43.083 -5.788 + -39.6345 -47.709 30.622 + -38.6605 -47.779 30.915 + -37.6335 -47.672 31.52 + -36.6145 -47.621 32.018 + -35.5455 -47.537 32.943 + -34.5765 -47.412 34.267 + -33.6225 -47.375 35.407 + -52.3915 45.497 3.079 + -10.6195 14.497 2.546 + 22.8585 18.323 29.208 + 17.6135 15.927 33.122 + 43.9065 11.916 21.204 + -1.4995 16.451 23.372 + -26.6375 -46.777 42.04 + -25.6305 -46.728 42.518 + -24.6405 -46.707 42.784 + -23.6565 -46.7 42.959 + -22.6555 -46.687 43.065 + -21.6575 -46.684 43.044 + -20.6605 -46.699 42.938 + -19.6495 -46.729 42.744 + -18.6565 -46.745 42.454 + -17.6805 -46.782 41.892 + -16.6375 -46.878 41.089 + -15.6675 -46.913 40.528 + -14.6645 -46.956 40.033 + -13.6585 -46.992 39.659 + -12.6535 -47.035 39.318 + -11.6585 -47.039 39.157 + -10.6585 -47.006 39.538 + -9.6895 -46.922 40.587 + 26.6185 20.999 13.384 + 25.6465 21.183 13.028 + 34.6665 17.965 16.344 + 41.2945 14.239 18.8 + 43.5445 12.391 19.646 + 51.1505 4.311 22.5 + 24.8775 15.735 32.837 + -29.2965 22.596 13.229 + 27.7095 20.508 19.488 + 0.3645 -45.663 54.571 + 1.3605 -45.625 55.053 + 2.3625 -45.626 55.04 + 3.3805 -45.581 55.515 + 4.3795 -45.533 56.089 + 5.3595 -45.501 56.611 + 6.3315 -45.469 56.921 + 7.3265 -45.444 57.183 + 8.3255 -45.425 57.429 + 9.3405 -45.412 57.62 + 10.3445 -45.4 57.741 + 11.3375 -45.398 57.781 + 12.3355 -45.391 57.907 + 13.3425 -45.366 58.091 + 14.3385 -45.359 58.245 + 15.3365 -45.359 58.28 + 16.3425 -45.356 58.24 + 17.3435 -45.364 58.139 + 18.3415 -45.355 58.204 + 19.3515 -45.356 58.179 + 20.3485 -45.361 58.133 + 21.3525 -45.382 57.901 + 22.3475 -45.407 57.633 + 23.3535 -45.439 57.285 + 24.3505 -45.461 57.03 + 25.3685 -45.493 56.711 + 30.3445 8.059 37.696 + -59.8735 44.064 -3.36 + -56.8705 45.324 -25.37 + -67.5215 -10.806 -1.055 + 59.2805 -10.112 2.733 + -58.6545 32.682 47.628 + -60.6675 64.844 -47.486 + 17.0305 21.373 17.016 + -0.6605 9.405 36.386 + 19.3385 9.522 39.06 + 20.3315 9.476 38.885 + 21.3315 9.494 38.546 + 22.3405 9.483 38.291 + 23.3395 9.484 38.406 + 24.3375 9.488 38.409 + -3.6715 3.912 39.499 + -1.2875 77.098 -17.315 + 58.4785 -25.673 -7.234 + -29.6445 10.516 29.326 + -28.6585 10.483 29.044 + 14.3475 10.91 38.538 + 16.3395 10.901 38.537 + -57.6685 29.891 49.516 + -75.3745 5.986 38.848 + 3.3535 13.535 33.475 + 6.3525 14.925 32.453 + -34.1295 11.91 -9.461 + 36.8075 -2.316 -14.724 + -77.2405 12.635 16.815 + 57.4365 -47.735 31.268 + 58.3645 -47.793 30.571 + 59.3715 -47.783 30.292 + 60.3095 -47.726 30.627 + 61.3255 -47.718 30.99 + 62.3285 -47.691 31.359 + 63.3315 -47.676 31.506 + 64.3425 -47.674 31.622 + 65.3485 -47.682 31.618 + 66.3595 -47.694 31.5 + 67.3815 -47.703 31.294 + 68.3745 -47.746 30.996 + 53.4095 -1.105 27.621 + 10.8095 20.59 16.183 + -25.6585 56.586 5.353 + -30.7245 56.808 -3.388 + -30.2905 22.337 6.95 + -75.8465 8.542 11.843 + -70.1645 -14.715 3.965 + -61.6595 52.328 -24.407 + -61.6505 11.584 53.095 + 19.0875 21.038 20.642 + 12.5775 20.77 18.262 + 5.6875 19.827 15.755 + -2.9495 17.573 12.621 + -11.5155 15.433 9.504 + -24.2475 17.906 1.879 + -25.2905 17.929 1.501 + 9.7095 17.203 30.28 + 15.5965 19.944 25.139 + -8.4425 -34.966 49.479 + -46.4105 41.196 -3.439 + -50.0185 46.688 -4.818 + -44.0475 -6.125 -16.748 + -43.0425 -6.115 -16.886 + -57.0765 3.35 -5.3 + -45.9655 -20.553 -17.488 + -14.0535 -20.01 -23.362 + -35.6215 -45.923 35.172 + -34.5975 -45.833 35.897 + -33.5225 -45.888 36.504 + -32.6315 -45.85 37.2 + -6.0105 16.747 12.969 + -4.7565 14.057 25.173 + 44.6375 11.256 21.475 + 11.4245 18.725 27.982 + -49.3145 52.046 -14.692 + -26.6315 -45.36 42.157 + -25.6455 -45.328 42.559 + -24.6565 -45.31 42.834 + -23.6515 -45.285 43.068 + -22.6565 -45.274 43.195 + -21.6575 -45.292 43.163 + -20.6645 -45.271 43.166 + -19.6495 -45.302 42.998 + -18.6515 -45.334 42.601 + -17.6615 -45.374 42.065 + -16.6685 -45.428 41.422 + -15.6795 -45.467 40.883 + -14.6465 -45.537 40.324 + -13.6535 -45.568 39.93 + -12.6555 -45.607 39.577 + -11.6645 -45.608 39.583 + -10.6455 -45.551 40.026 + 31.1535 19.447 15.085 + 32.0365 19.087 15.373 + 40.4925 14.747 18.497 + 42.7965 12.999 19.36 + 51.7765 3.428 22.73 + 7.8405 20.146 13.66 + -29.8925 23.498 12.992 + 64.0435 -42.013 27.232 + 0.3735 -44.22 55.026 + 1.3435 -44.217 55.331 + 2.3325 -44.231 55.241 + 3.3455 -44.217 55.324 + 4.3555 -44.177 55.775 + 5.3475 -44.134 56.276 + 6.3505 -44.093 56.749 + 7.3355 -44.071 57.035 + 8.3465 -44.052 57.24 + 9.3355 -44.039 57.407 + 10.3395 -44.021 57.625 + 11.3375 -44.01 57.762 + 12.3345 -44 57.901 + 13.3435 -43.98 58.091 + 14.3405 -43.969 58.246 + 15.3425 -43.967 58.261 + 16.3425 -43.977 58.136 + 17.3405 -43.991 57.945 + 18.3455 -43.996 57.868 + 19.3515 -43.996 57.828 + 20.3545 -43.998 57.814 + 21.3605 -44.017 57.593 + 22.3575 -44.042 57.343 + 23.3525 -44.07 57.048 + 24.3455 -44.091 56.781 + 25.3545 -44.114 56.563 + 31.3385 8.036 37.538 + 32.3385 8.02 37.282 + 33.3435 8.021 37.052 + 34.3525 8.033 36.833 + 35.3435 8.005 36.673 + -21.8855 17.407 1.271 + -7.6935 7.928 34.064 + 26.3385 8.096 38.685 + 19.6895 21.505 16.563 + -1.6605 9.38 36.008 + -2.6665 9.391 35.543 + -3.6545 9.341 35.014 + -5.7075 9.371 33.701 + -4.6705 9.338 34.402 + 25.3395 9.497 38.305 + 26.3415 9.49 38.062 + -19.9535 16.989 1.982 + 29.3285 9.422 37.127 + 29.0025 19.794 21.393 + 33.2855 17.731 22.972 + -55.6945 29.861 49.099 + 31.6305 18.671 22.359 + 4.3475 13.568 33.865 + -77.7735 12.672 22.816 + -32.9995 12.089 -9.667 + 59.9795 -11.456 4.712 + 61.1025 -14.204 16.692 + 57.5015 -46.331 31.285 + 58.4585 -46.392 30.178 + 59.3905 -46.432 29.63 + 60.3605 -46.411 29.643 + 61.3345 -46.388 29.991 + 62.3205 -46.356 30.361 + 63.3335 -46.344 30.71 + 64.3375 -46.34 30.832 + 65.3435 -46.349 30.926 + 66.3495 -46.34 30.841 + 67.3515 -46.364 30.692 + -51.8995 46.195 19.257 + 32.9405 18.236 21.417 + -4.2715 72.811 -19.476 + 47.1035 6.052 29.535 + 54.8005 -1.862 2.714 + 55.5955 -1.797 5.701 + -44.5585 -38.264 40.469 + -10.2335 15.125 5.596 + -44.6355 48.275 -27.05 + 30.5855 18.436 24.835 + 24.2005 20.564 22.494 + 17.9915 20.993 20.243 + 11.4275 20.63 17.843 + 4.4835 19.566 15.317 + -4.2085 17.215 12.164 + -12.5545 15.443 9.125 + -21.2225 17.532 2.992 + -26.9605 18.6 3.81 + -44.1655 45.795 20.554 + -50.8295 49.504 -8.027 + -49.5295 47.845 -7.531 + -48.3025 46.051 -7.072 + -48.9785 -20.613 -16.741 + -46.9795 -20.56 -17.406 + -54.0745 3.47 -7.213 + -44.9705 -20.546 -17.507 + -14.9555 -20.052 -23.283 + -19.3145 56.533 -12.732 + -28.2305 43.031 -5.206 + -37.9745 -21.76 -20.495 + -24.9655 -21.707 -20.486 + -33.6895 -44.379 37.642 + -32.5445 -44.365 38.369 + -28.1945 20.942 10.752 + 45.3765 10.601 21.752 + 21.0895 16.738 31.498 + -28.6485 -44.054 41.05 + -26.6555 -43.96 42.204 + -25.6625 -43.928 42.602 + -24.6515 -43.891 42.945 + -23.6535 -43.87 43.197 + -22.6565 -43.858 43.316 + -21.6565 -43.861 43.343 + -20.6575 -43.87 43.225 + -19.6505 -43.894 42.992 + -18.6665 -43.913 42.679 + -17.6495 -43.963 42.234 + -16.6615 -43.991 41.812 + -15.6575 -44.049 41.188 + -14.6515 -44.096 40.693 + -13.6605 -44.123 40.286 + -12.6555 -44.145 40.028 + -11.6475 -44.139 40.006 + -10.6875 -44.144 40.355 + -9.7645 -44.084 41.293 + 35.5315 17.57 16.664 + 42.0565 13.646 19.088 + 46.4575 9.726 20.731 + 52.9585 1.54 23.16 + 54.6655 -1.448 23.785 + -57.3195 45.384 2.804 + 62.0455 -41.7 26.382 + 41.7105 10.984 28.956 + -63.3365 44.892 15.259 + 0.3645 -42.79 55.518 + 1.3555 -42.764 55.89 + 2.3515 -42.773 55.763 + 3.3295 -42.831 55.393 + 4.3375 -42.806 55.59 + 5.3225 -42.767 56.108 + 6.3375 -42.724 56.547 + 7.3515 -42.693 56.872 + 8.3465 -42.673 57.122 + 9.3495 -42.65 57.345 + 10.3345 -42.644 57.532 + 11.3435 -42.621 57.733 + 12.3395 -42.612 57.873 + 13.3395 -42.603 58.009 + 14.3395 -42.596 58.162 + 15.3445 -42.594 58.193 + 16.3435 -42.591 58.088 + 17.3455 -42.609 57.885 + 18.3495 -42.628 57.659 + 19.3535 -42.643 57.451 + 20.3515 -42.645 57.44 + 21.3515 -42.657 57.326 + 22.3605 -42.679 57.142 + 23.3595 -42.694 56.831 + 24.3465 -42.713 56.671 + 25.3485 -42.723 56.546 + 26.3605 -42.758 56.225 + 38.4195 2.466 38.303 + -60.6565 18.707 54.867 + -74.6935 30.448 19.719 + 52.4565 -0.534 -1.311 + 25.3395 8.1 38.929 + -56.1095 46.105 20.684 + -38.6655 43.732 25.451 + 21.9235 18.577 28.862 + -60.8435 44.658 27.837 + -6.7065 9.345 33.191 + -7.6745 9.268 32.76 + -8.6685 9.24 32.371 + -17.6585 9.181 31.712 + -18.6535 9.215 31.871 + 30.3475 9.446 36.935 + -33.5755 34.58 13.914 + -52.6265 -46.618 23.147 + -33.2675 34.592 12.919 + -60.9635 46.773 -15.376 + -56.4785 43.508 33.836 + 5.3555 13.554 34.226 + 60.6135 -12.824 17.692 + 60.6705 -12.804 16.699 + -70.6945 0.318 17.876 + -71.1205 -6.498 11.924 + 44.5815 10.867 24.306 + -53.2385 44.787 30.464 + 42.7615 12.681 22.203 + 60.3715 -45.089 28.847 + 61.3445 -45.069 29.078 + 62.3325 -45.039 29.441 + 63.3255 -44.999 29.719 + 64.3345 -45.004 29.937 + 65.3415 -44.995 30.065 + 66.3445 -44.999 30.062 + 67.3505 -45.006 29.943 + 68.3615 -45.016 29.714 + 69.3775 -45.037 29.475 + 70.4125 -45.059 29.019 + -24.6575 56.595 5.232 + 58.9665 -10.112 1.717 + -70.7095 17.896 1.815 + 61.2745 -24.038 25.692 + 61.6255 -19.794 21.694 + 30.3675 19.726 17.61 + -60.6595 46.794 -12.368 + 33.8715 16.527 26.047 + 29.7085 18.812 24.51 + 23.2135 20.725 22.132 + 17.0105 21.104 19.876 + 10.2795 20.48 17.426 + 3.2135 19.241 14.861 + -5.4655 16.844 11.71 + -23.2035 17.844 2.263 + -22.2135 17.703 2.626 + 34.3585 11.541 33.429 + -54.9035 52.038 -9.5 + -60.4385 44.241 29.439 + -64.0635 43.68 28.26 + -63.0995 22.279 -3.016 + -24.0245 -5.929 -19.012 + -43.9745 -20.524 -17.764 + -42.9685 -20.469 -18.505 + -15.9885 -20.024 -23.043 + -65.9965 6.047 -0.636 + 7.0085 -20.506 -35.128 + 10.0115 -20.521 -34.645 + -55.0675 -45.505 21.668 + -44.0885 2.381 -13.216 + 29.9725 -2.904 -17.462 + 12.9675 -5.649 -21.312 + 46.0965 9.922 22.021 + -20.1625 16.239 21.083 + -29.6295 -42.623 41.142 + -28.6325 -42.583 41.652 + -26.6545 -42.532 42.451 + -25.6535 -42.498 42.833 + -24.6605 -42.482 43.115 + -23.6495 -42.454 43.288 + -22.6545 -42.454 43.304 + -21.6575 -42.47 43.263 + -20.6555 -42.467 43.219 + -19.6595 -42.478 43.077 + -18.6685 -42.485 42.92 + -17.6705 -42.508 42.68 + -16.6685 -42.551 42.177 + -15.6615 -42.607 41.559 + -14.6675 -42.648 41.034 + -13.6595 -42.697 40.55 + -12.6575 -42.706 40.407 + -11.6535 -42.707 40.417 + -10.7275 -42.724 40.797 + -9.6295 -42.478 42.359 + 47.8675 8.343 21.269 + 47.1775 9.052 21.002 + 52.3755 2.523 22.95 + 1.0185 17.192 24.265 + 17.3845 13.177 36.002 + -2.2265 17.816 14.334 + -49.5575 53.951 -17.667 + -50.9025 54.317 -16.719 + -0.6485 -41.42 55.441 + 0.3735 -41.349 55.963 + 1.3515 -41.343 56.254 + 2.3435 -41.363 56.176 + 3.3395 -41.407 55.714 + 4.3305 -41.403 55.866 + 5.3355 -41.346 56.434 + 6.3585 -41.306 56.733 + 7.3175 -41.316 56.966 + 8.3315 -41.283 57.293 + 9.3395 -41.256 57.509 + 10.3195 -41.271 57.714 + 11.3325 -41.239 57.91 + 12.3335 -41.236 58.056 + 13.3375 -41.221 58.177 + 14.3445 -41.203 58.27 + 15.3435 -41.194 58.218 + 16.3545 -41.221 58.052 + 17.3505 -41.225 57.901 + 18.3635 -41.256 57.606 + 19.3465 -41.262 57.397 + 20.3495 -41.273 57.306 + 21.3455 -41.272 57.262 + 22.3495 -41.296 57.085 + 23.3445 -41.294 57.032 + 24.3505 -41.307 56.94 + 25.3475 -41.316 56.794 + 26.3415 -41.331 56.531 + 53.8015 -4.745 -3.294 + 55.8485 -4.615 1.698 + 18.6515 21.538 16.181 + 21.2835 21.385 18.575 + -43.6825 45.341 25.086 + 36.8075 16.53 21.412 + 58.4365 -8.693 20.705 + 24.3425 8.118 39.197 + 23.3285 8.085 39.381 + 22.3295 8.074 39.371 + 21.3365 8.118 39.673 + -47.0725 50.394 -16.75 + -17.2475 67.318 -5.906 + -65.7565 -6.826 -2.07 + -76.4695 16.702 14.79 + -19.6575 9.204 31.979 + 1.0605 18.444 9.735 + -46.8385 47.329 -12.329 + 51.6005 2.879 25.521 + -57.5535 47.298 -3.171 + 6.3685 13.529 34.575 + 60.4435 -12.812 18.703 + 60.7755 -12.803 15.697 + -74.9835 18.153 33.78 + -52.6385 13.044 54.599 + 38.0325 15.656 23.292 + 58.5255 -10.117 23.697 + 59.7155 -10.066 5.71 + 59.4335 -43.695 28.862 + 60.3675 -43.75 28.062 + 61.3705 -43.736 27.969 + 62.3115 -43.694 28.213 + 63.3315 -43.689 28.68 + 64.3305 -43.657 28.942 + 65.3385 -43.667 29.16 + 66.3425 -43.66 29.171 + 67.3525 -43.652 29.073 + 68.3575 -43.666 28.943 + 69.3685 -43.68 28.706 + 53.1655 -4.784 -5.296 + 56.8745 -3.141 12.702 + -73.1975 24.885 11.751 + 61.5655 -24.014 24.704 + -61.4995 64.843 -46.475 + 60.8985 -24.066 26.69 + 15.8795 21.243 16.598 + 32.2885 17.605 25.465 + 33.1195 17.132 25.77 + 22.1925 20.835 21.768 + 15.9155 21.034 19.477 + 9.1295 20.314 17.008 + 14.7225 15.424 33.574 + 25.5025 18.411 28.727 + -52.3925 51.8 -10.054 + -53.2155 52.273 -10.359 + 6.3075 16.859 29.085 + 5.2085 16.802 28.69 + -42.1875 45.458 21.262 + -43.0865 12.219 -7.142 + -5.0295 -5.716 -21.432 + -16.9865 -20.046 -22.801 + -17.9865 -20.062 -22.67 + -18.9835 -20.084 -22.528 + -65.9855 4.566 -0.087 + -43.8415 -73.911 46.553 + 13.0265 -20.524 -34.199 + 11.0115 -20.533 -34.505 + 28.9765 -2.889 -17.736 + 11.9715 -5.645 -21.356 + 25.9735 -5.724 -19.059 + -54.0275 47.86 -1.92 + -48.7135 51.139 -14.467 + -29.6605 -41.186 41.834 + -28.6495 -41.134 42.317 + -27.6495 -41.101 42.695 + -26.6375 -41.056 43.026 + -25.6525 -41.059 43.199 + -24.6595 -41.066 43.25 + -23.6605 -41.066 43.252 + -22.6575 -41.065 43.258 + -21.6585 -41.05 43.315 + -20.6595 -41.049 43.314 + -19.6635 -41.048 43.288 + -18.6555 -41.073 43.097 + -17.6635 -41.084 42.948 + -16.6535 -41.131 42.471 + -15.6475 -41.185 41.835 + -14.6645 -41.224 41.299 + -13.6625 -41.254 40.915 + -12.6595 -41.291 40.713 + -11.6495 -41.256 40.919 + -10.7145 -41.254 41.397 + -9.6555 -41.075 43.097 + 48.5415 7.579 21.523 + 50.5135 5.172 22.266 + -12.0045 14.727 19.62 + -62.5575 40.894 36.32 + -39.8705 42.978 30.854 + -4.9485 12.34 29.537 + -51.6855 54.877 -17.012 + -50.1305 53.737 -16.433 + -0.6555 -40.002 55.816 + 0.3435 -39.962 56.294 + 1.3495 -39.936 56.506 + 2.3445 -39.984 56.275 + 3.3435 -39.99 55.932 + 4.3575 -39.955 56.397 + 5.3305 -39.924 56.933 + 6.3705 -39.855 57.313 + 7.3575 -39.831 57.696 + 8.3445 -39.814 58.092 + 9.3305 -39.813 58.362 + 10.3425 -39.765 58.7 + 11.3405 -39.762 58.833 + 12.3375 -39.782 58.884 + 13.3435 -39.754 58.961 + 14.3515 -39.775 58.861 + 15.3505 -39.789 58.624 + 16.3565 -39.806 58.385 + 17.3565 -39.825 58.146 + 18.3545 -39.839 57.902 + 19.3545 -39.872 57.579 + 20.3465 -39.877 57.419 + 21.3475 -39.893 57.33 + 22.3435 -39.876 57.395 + 23.3475 -39.88 57.416 + 24.3475 -39.889 57.288 + 25.3605 -39.913 57.069 + 26.3615 -39.939 56.705 + 35.4325 6.535 37.463 + 34.3365 6.614 37.654 + 32.3405 6.632 37.915 + 31.3365 6.637 38.152 + 33.3425 6.633 37.803 + 30.3495 6.675 38.225 + 29.3395 6.651 38.298 + 21.3345 5.393 41.58 + -61.2975 -7.077 -7.032 + -29.6485 7.815 32.018 + -28.6605 7.824 32.142 + -27.6595 7.804 32.365 + -26.6605 7.813 32.493 + 20.3335 8.134 40.048 + 10.3415 8.177 39.993 + 11.3545 8.147 40.293 + -72.1435 -10.463 20.928 + -20.6555 9.23 32.01 + -73.1545 24.86 10.758 + 3.5155 19.09 10.634 + 2.3455 5.333 40.214 + -36.6065 36.074 24.945 + -46.4855 49.477 -16.536 + 8.3615 13.571 35.339 + 7.3625 13.556 34.959 + -71.7995 -7.79 18.914 + -72.5905 27.775 38.715 + 56.9525 -4.519 19.709 + -53.6355 13.047 54.894 + -52.1045 19.531 -7.461 + -57.6785 25.692 51.935 + -59.6465 34.074 46.369 + 60.4195 -42.373 27.699 + 61.4105 -42.386 26.979 + 62.3705 -42.379 26.96 + 63.3385 -42.377 27.297 + 65.3375 -42.346 28.018 + 66.3385 -42.313 28.054 + 67.3475 -42.312 28.059 + 68.3495 -42.353 28.016 + 69.3765 -42.317 27.72 + 70.3565 -42.392 27.516 + -71.0235 27.603 8.737 + 48.2695 -8.047 38.371 + 61.8185 -23.995 23.708 + -40.5835 -48.808 27.558 + -75.2025 16.804 37.79 + -72.7065 -13.154 17.95 + 57.6695 -8.791 -0.27 + 59.3665 -8.668 7.704 + 31.4605 18.069 25.157 + 28.8795 19.273 24.2 + -41.3495 47.227 8.516 + 15.5645 17.288 30.94 + 33.4645 11.943 33.128 + -50.9545 50.428 -9.519 + -51.6215 51.216 -9.771 + -69.2775 42.019 26.559 + -59.2305 42.15 35.904 + -48.8885 53.167 -17.415 + -23.0255 -5.939 -18.86 + -51.1055 18.082 -7.525 + -40.1935 34.065 -0.315 + -62.0105 6.178 -3.343 + -4.0295 -5.71 -21.327 + -56.0395 6.297 -5.865 + -19.3495 58.029 -12.519 + -55.0685 -2.235 -9.234 + -25.9575 -21.71 -20.279 + 12.0145 -20.534 -34.391 + 8.0165 -20.496 -35.039 + 9.0115 -20.51 -34.892 + 10.9735 -5.643 -21.377 + 14.0245 -20.541 -34.04 + -51.1195 22.447 -6.978 + -28.6425 -39.658 43.052 + -27.6455 -39.626 43.434 + -26.6535 -39.623 43.589 + -25.6645 -39.653 43.552 + -24.6555 -39.634 43.445 + -23.6565 -39.648 43.358 + -22.6565 -39.649 43.351 + -21.6565 -39.636 43.445 + -20.6565 -39.638 43.471 + -19.6585 -39.639 43.465 + -18.6655 -39.647 43.317 + -17.6655 -39.668 43.073 + -16.6585 -39.714 42.582 + -15.6775 -39.751 42.03 + -14.6595 -39.8 41.566 + -13.6565 -39.832 41.196 + -12.6595 -39.848 41.087 + -11.6585 -39.822 41.322 + -10.7295 -39.692 41.958 + 54.0945 -0.453 23.576 + 53.5265 0.609 23.379 + 2.2805 17.552 24.706 + -41.2905 45.348 18.691 + 61.0095 -39.494 26.098 + 11.6065 17.932 29.517 + -54.2075 56.218 -17.938 + -49.4155 53.049 -16.171 + -38.8715 44.934 15.227 + -0.6355 -38.561 56.25 + 0.3205 -38.563 56.572 + 1.3395 -38.546 56.671 + 2.3545 -38.577 56.462 + 3.2455 -38.523 56.341 + 4.3815 -38.477 56.945 + 5.3345 -38.494 57.404 + 6.3435 -38.445 57.857 + 7.3675 -38.381 58.398 + 8.3555 -38.349 58.908 + 9.3345 -38.343 59.199 + 10.3495 -38.305 59.515 + 11.3405 -38.304 59.674 + 12.3385 -38.316 59.708 + 13.3465 -38.32 59.714 + 14.3495 -38.329 59.578 + 15.3585 -38.346 59.343 + 16.3795 -38.404 58.925 + 17.3555 -38.395 58.61 + 18.3665 -38.439 58.174 + 19.3675 -38.482 57.722 + 20.3465 -38.48 57.527 + 21.3415 -38.468 57.632 + 22.3445 -38.459 57.759 + 23.3465 -38.459 57.762 + 24.3415 -38.464 57.612 + 25.3605 -38.5 57.312 + 27.3175 6.664 39.013 + -45.1625 62.374 -53.06 + -56.6475 17.285 54.127 + 12.3505 6.785 41.311 + 13.3525 6.776 41.419 + 14.3495 6.791 41.437 + 15.3455 6.799 41.568 + 26.3305 6.695 39.298 + -35.1495 51.234 7.819 + -30.6525 53.594 6.965 + -71.7215 19.339 4.776 + -25.5225 11.164 -10.773 + -56.6665 8.817 54.729 + -25.6635 7.828 32.753 + -23.6605 7.849 33.018 + 9.3405 8.161 39.847 + -55.6595 10.237 55.122 + -21.6605 9.235 31.896 + -36.4445 42.538 17.583 + 4.3415 5.37 40.737 + -37.0525 36.066 25.938 + 50.1775 5.445 23.565 + 41.8995 12.792 24.733 + 57.4595 -5.961 2.713 + 54.9845 -6.187 -2.336 + -67.7925 -1.232 5.905 + -11.0505 -19.813 -30.071 + 14.4395 18.383 29.088 + 59.3145 -8.64 14.702 + -57.6545 34.03 46.559 + -58.6505 34.067 46.482 + -75.6405 15.439 38.797 + 61.3925 -41.006 26.188 + 7.3995 57.981 -18.2 + 58.9745 -7.283 9.701 + -45.8595 40.495 -7.036 + 65.3365 -41.047 26.615 + -76.6585 12.608 13.818 + 69.3595 -41.027 26.647 + -28.1495 56.776 -6.317 + -34.5565 51.05 -2.281 + -7.1115 13.619 24.327 + 58.6275 -21.462 -7.24 + -46.5805 57.655 -41.058 + 44.4365 -8.012 41.606 + 43.0785 9.504 29.453 + 41.0315 11.747 28.698 + 34.6595 15.97 26.342 + 22.6745 19.159 27.707 + -37.5145 48.469 9.91 + -46.7575 43.956 -7.944 + -47.2545 45.065 -8.133 + -49.6135 48.861 -9.017 + -73.1295 40.796 16.327 + -15.7555 14.367 22.693 + 6.4525 19.734 10.268 + 5.1875 19.403 9.805 + 3.9895 19.115 9.365 + -22.0235 -5.945 -18.823 + 22.0215 -19.275 -31.374 + -2.3885 68.465 -22.03 + -11.2855 55.089 -14.87 + -34.2535 45.947 -3.32 + -58.1035 19.48 -6.429 + -59.8735 -39.476 26 + -39.5835 -38.347 41.523 + -26.9635 -21.72 -20.364 + 6.9705 -5.646 -21.715 + 26.9665 -2.878 -18.215 + -36.2445 41.487 -1.606 + -54.1145 23.898 -6.639 + 9.9695 -5.648 -21.466 + 14.9765 -5.65 -20.984 + -30.6585 -38.313 42.597 + -29.6455 -38.254 43.062 + -28.6505 -38.229 43.457 + -27.6595 -38.216 43.749 + -26.6565 -38.203 43.87 + -25.6615 -38.221 43.779 + -24.6575 -38.227 43.64 + -23.6565 -38.236 43.49 + -22.6575 -38.233 43.466 + -21.6555 -38.236 43.511 + -20.6575 -38.225 43.606 + -19.6595 -38.223 43.58 + -18.6505 -38.248 43.387 + -17.6535 -38.267 43.12 + -16.6555 -38.299 42.724 + -15.6555 -38.343 42.214 + -14.6625 -38.371 41.803 + -13.6565 -38.41 41.46 + -12.6525 -38.402 41.433 + -11.6855 -38.404 41.76 + -10.8055 -38.399 42.494 + -9.7505 13.79 21.915 + -3.4865 17.461 13.877 + -30.4615 54.276 6.508 + -52.4685 55.439 -17.303 + -48.1795 51.265 -15.716 + -49.9455 46.027 17.052 + -0.6385 -37.141 56.618 + 0.3545 -37.126 56.87 + 1.3475 -37.131 56.891 + 2.3335 -37.144 56.943 + 3.3585 -37.076 57.313 + 4.3365 -37.093 57.522 + 5.3375 -37.071 57.755 + 6.3455 -37.037 58.095 + 7.3475 -36.998 58.565 + 8.3435 -36.962 59.061 + 9.3245 -36.939 59.467 + 10.3515 -36.892 59.87 + 11.3205 -36.912 60.01 + 12.3415 -36.879 60.158 + 13.3435 -36.884 60.186 + 14.3485 -36.897 60.075 + 15.3565 -36.916 59.831 + 16.3655 -36.947 59.48 + 17.3805 -36.989 59.024 + 18.3665 -37.031 58.4 + 19.3605 -37.076 57.817 + 20.3415 -37.067 57.74 + 21.3425 -37.062 57.917 + 22.3445 -37.05 58.022 + 23.3475 -37.051 58.017 + 24.3605 -37.073 57.821 + 25.3605 -37.091 57.551 + -3.6635 6.636 37.572 + 3.3275 6.763 39.759 + -0.6595 5.3 39.455 + 3.3485 12.185 35.135 + -54.3065 64.916 -52.49 + 1.3075 6.697 38.783 + 2.3255 6.744 39.381 + 4.3535 6.736 40.068 + 19.3315 5.391 41.922 + -1.2115 17.95 11.801 + -55.6575 11.653 55.206 + 31.2335 19.34 17.934 + -51.6685 38.237 41.795 + -57.6685 8.813 54.463 + -24.6595 7.831 32.999 + 8.3365 8.186 39.761 + -54.6535 10.243 55.068 + -22.6645 9.231 31.767 + -76.1345 8.606 26.845 + -8.7445 -17.105 -29.069 + 3.3425 5.356 40.479 + -71.9075 -7.791 17.916 + -64.7075 14.337 53.147 + 59.3805 -11.487 1.705 + 57.0785 -5.985 1.714 + -45.8575 38.879 -15.049 + 58.3445 -5.908 9.702 + -64.6255 20.08 53.746 + -58.6685 22.904 53.513 + 61.6255 -18.387 19.695 + -60.6285 34.029 46.202 + -66.9765 -2.518 26.887 + 58.4955 -20.069 -7.235 + -41.9765 13.09 -6.632 + -36.0765 34.539 22.935 + -77.6105 12.654 18.806 + 59.6965 -12.856 23.705 + 59.9255 -12.849 22.7 + 61.0375 -12.785 11.701 + 15.9725 -5.659 -20.839 + 61.8545 -15.567 9.702 + 61.7365 -15.571 11.698 + 61.7135 -15.577 12.695 + -56.7075 52.055 -10.634 + -22.5405 17.977 3.98 + 50.5645 3.856 26.556 + -77.6625 15.393 21.795 + 21.2715 15.87 32.979 + -28.6575 21.526 16.419 + -16.5875 14.83 22.381 + 16.3035 -9.814 49.022 + 47.7145 5.169 29.769 + 48.8985 3.296 30.218 + 49.4475 2.294 30.421 + -27.1175 19.456 15.552 + -46.3005 42.742 -7.777 + -56.3785 44.943 29.365 + 6.5855 68.85 -28.058 + -54.9715 39.806 40.442 + 8.7895 20.202 11.13 + 7.6555 19.99 10.712 + -37.5255 43.214 21.531 + -48.5815 46.17 23.331 + 21.0255 -19.271 -31.396 + 20.0145 -19.274 -31.612 + -45.0985 -45.377 32.446 + -36.9645 -21.743 -20.579 + -35.9605 -21.749 -20.447 + -34.9575 -21.751 -20.349 + -41.6605 -36.915 42.608 + -40.6535 -36.878 42.695 + -39.6575 -36.897 42.581 + -38.5505 -36.921 42.451 + -37.6555 -36.9 42.443 + -36.6565 -36.9 42.584 + -35.5135 -36.863 43.01 + -34.5125 -36.846 43.226 + -33.6555 -36.829 43.337 + -32.6635 -36.901 43.162 + -31.6605 -36.877 43.129 + -30.6675 -36.884 43.159 + -29.6535 -36.838 43.344 + -28.6565 -36.82 43.609 + -27.6475 -36.78 43.942 + -26.6535 -36.772 44.08 + -25.6555 -36.772 44.082 + -24.6595 -36.783 43.952 + -23.6545 -36.815 43.776 + -22.6615 -36.804 43.683 + -21.6585 -36.817 43.577 + -20.6535 -36.821 43.584 + -19.6585 -36.819 43.594 + -18.6545 -36.831 43.501 + -17.6525 -36.853 43.242 + -16.6995 -36.867 42.873 + -15.6665 -36.923 42.315 + -14.6805 -36.93 41.968 + -13.6525 -36.956 41.767 + -12.6385 -36.945 41.911 + -11.7395 -36.984 42.332 + -0.8775 15.38 26.54 + -48.1795 44.211 32.244 + 28.5975 20.175 19.814 + -29.2585 22.227 19.134 + -53.3275 55.84 -17.618 + -47.5785 50.356 -15.495 + 21.2425 14.676 34.449 + -71.8775 13.823 3.823 + -1.6485 -35.777 56.404 + -0.6575 -35.742 56.899 + 0.3475 -35.721 57.131 + 1.3495 -35.697 57.355 + 2.3565 -35.666 57.69 + 3.3445 -35.657 57.976 + 4.3415 -35.652 58.112 + 5.3475 -35.638 58.207 + 6.3365 -35.645 58.242 + 7.3245 -35.63 58.52 + 8.3455 -35.575 59.054 + 9.3215 -35.549 59.489 + 10.3255 -35.519 59.842 + 11.3215 -35.501 60.115 + 12.3395 -35.481 60.29 + 13.3405 -35.483 60.331 + 14.3465 -35.484 60.296 + 15.3475 -35.493 60.167 + 16.3675 -35.525 59.846 + 17.3705 -35.563 59.364 + 18.3685 -35.617 58.637 + 19.3555 -35.672 57.904 + 20.3495 -35.67 57.911 + 21.3425 -35.649 58.114 + 22.3425 -35.648 58.143 + 23.3455 -35.649 58.121 + 24.3415 -35.659 57.982 + 25.3395 -35.678 57.729 + -11.6655 6.487 33.926 + -2.6635 6.656 37.952 + 22.3365 5.384 41.336 + -1.6795 5.339 39.157 + 0.3505 5.29 39.563 + -1.6645 6.675 38.214 + -0.6685 6.691 38.356 + 0.3335 6.686 38.468 + 18.3335 5.394 42.045 + 17.3395 5.419 42.203 + 19.2175 21.481 17.818 + 17.3395 6.793 41.444 + 18.3365 6.78 41.309 + -49.4675 40.187 39.308 + -58.6815 8.806 54.362 + 7.3445 8.141 39.702 + -53.6435 10.234 54.864 + -23.6555 9.173 31.703 + -44.9655 62.378 -54.05 + -24.5715 18.182 3.232 + -10.8385 45.077 -1.861 + -44.2355 57.582 -58.267 + -63.6885 14.383 53.535 + 24.3425 13.642 35.51 + -70.1955 31.748 10.728 + -76.8725 16.709 16.799 + 47.8205 7.968 24.098 + -21.1215 64.579 -2.999 + -59.6575 22.926 53.678 + -56.6715 32.652 47.583 + -61.5985 33.979 45.912 + 58.9245 -20.023 -6.265 + 41.9815 -8.064 43.33 + 30.5585 -17.46 53.129 + -45.9675 56.108 -40.054 + -46.5535 49.724 -48.052 + 60.4295 -18.46 25.698 + 53.9415 -0.474 2.704 + -72.9165 30.498 30.719 + -9.4795 -17.09 -28.049 + -57.6175 34.232 -6.358 + 60.9095 -12.793 13.701 + 60.8665 -12.808 14.695 + 61.0045 -12.795 12.698 + 53.5375 -3.347 -2.29 + 11.3465 20.684 14.941 + -55.5735 46.638 0.393 + -6.7355 74.249 -10.825 + -77.1805 9.968 24.837 + -50.3985 44.958 6.728 + -58.7355 45.697 13.94 + -38.2405 43.639 24.154 + 45.1335 8.445 28.775 + -22.6965 62.009 0.7 + -41.0665 42.515 33.349 + -58.3785 45.445 25.739 + 26.6025 16.097 31.999 + -28.5485 20.483 20.911 + 12.3495 20.841 12.436 + 11.2025 20.676 12.015 + 9.9975 20.445 11.571 + -18.5175 64.255 -0.583 + 7.5745 -10.081 49.321 + -0.5975 17.527 6.23 + -1.8485 17.149 5.77 + -63.0695 -39.505 14.762 + -45.6535 -35.517 42.332 + -44.6465 -35.475 42.695 + -43.6355 -35.424 43.037 + -42.6545 -35.435 43.349 + -41.6485 -35.396 43.571 + -40.6545 -35.406 43.593 + -39.6575 -35.434 43.496 + -38.6595 -35.454 43.387 + -37.6575 -35.44 43.36 + -36.6525 -35.398 43.581 + -35.6545 -35.386 43.847 + -34.6465 -35.319 44.155 + -33.6555 -35.362 44.241 + -32.6585 -35.401 44.177 + -31.6535 -35.43 43.953 + -30.6575 -35.424 43.796 + -29.6565 -35.416 43.612 + -28.6525 -35.403 43.702 + -27.6565 -35.384 43.99 + -26.6525 -35.36 44.202 + -25.6535 -35.347 44.327 + -24.6575 -35.346 44.313 + -23.6545 -35.378 44.147 + -22.6515 -35.4 43.904 + -21.6585 -35.416 43.615 + -20.6585 -35.427 43.475 + -19.6545 -35.428 43.509 + -18.6585 -35.427 43.482 + -17.6625 -35.437 43.335 + -16.6625 -35.471 42.957 + -15.6515 -35.514 42.489 + -14.6565 -35.531 42.199 + -13.6395 -35.507 42.102 + -12.7055 -35.58 42.213 + -11.8905 -35.635 42.758 + -52.2525 46.174 23.49 + -40.1445 43.647 29.279 + -21.9845 12.027 29.358 + -46.2815 45.949 16.901 + 0.2315 18.448 15.224 + -50.9875 46.071 16.679 + 1.3825 18.092 21.46 + -2.6405 -34.39 56.272 + -1.6615 -34.366 56.795 + -0.6615 -34.338 57.157 + 0.3465 -34.313 57.372 + 1.3525 -34.284 57.712 + 2.3585 -34.252 58.045 + 3.3445 -34.242 58.337 + 4.3305 -34.243 58.516 + 5.3485 -34.212 58.676 + 6.3395 -34.216 58.712 + 7.3365 -34.218 58.729 + 8.3245 -34.211 58.896 + 9.3285 -34.169 59.36 + 10.3275 -34.139 59.721 + 11.3375 -34.112 60.051 + 12.3285 -34.096 60.235 + 13.3395 -34.088 60.337 + 14.3475 -34.091 60.328 + 15.3515 -34.102 60.188 + 16.3625 -34.123 59.954 + 17.3565 -34.151 59.625 + 18.3635 -34.206 58.872 + 19.3695 -34.277 57.949 + 20.3455 -34.269 57.912 + 21.3495 -34.272 57.952 + 22.3425 -34.266 58.036 + 23.3465 -34.266 58.023 + 24.3475 -34.278 57.892 + 25.3575 -34.293 57.667 + 26.3455 -34.327 57.268 + 15.3455 5.44 42.361 + 13.3525 5.411 42.189 + -9.6575 3.735 36.668 + 11.3445 5.407 41.727 + -12.6605 6.465 33.903 + -13.6605 6.464 33.781 + -15.6625 6.491 33.699 + -16.6595 6.463 33.672 + 23.3175 5.344 41.146 + 5.3425 6.763 40.226 + 7.3635 6.74 40.785 + 16.3415 6.796 41.566 + -69.7775 40.963 28.439 + -72.6735 25.027 40.722 + -13.6575 7.78 32.344 + 3.3285 8.144 38.996 + -52.6455 10.233 54.696 + -24.6645 9.208 31.494 + -0.0235 18.261 12.238 + -46.7215 63.955 -51.049 + 29.6235 -17.458 53.54 + -46.6765 49.708 -50.049 + -62.6915 14.385 53.678 + 56.2375 -20.239 -10.24 + -53.9905 -15.015 -14.334 + -8.3475 10.861 29.846 + 13.2445 20.792 9.894 + -57.6685 22.906 53.177 + -0.2545 16.852 23.826 + -45.4905 -74.371 44.916 + 57.7735 -20.117 -8.254 + -38.7925 11.003 -8.429 + -25.6545 58.064 4.396 + -76.6275 9.962 26.849 + 58.2545 -5.896 12.699 + -72.0425 -11.812 21.938 + -68.7295 28.91 3.759 + -44.8785 45.144 -25.045 + -58.0515 53.626 -34.462 + -77.1445 16.732 18.791 + -32.2545 29.995 12.931 + -31.8825 56.834 0.556 + -31.6525 52.091 7.989 + -2.6695 3.935 39.887 + 57.3745 -4.532 15.7 + -54.5335 52.255 -42.419 + -46.8075 45.436 10.917 + -0.4075 13.976 29.652 + 42.9905 10.5 27.995 + -21.6215 62.062 1.116 + 0.5605 17.491 22.646 + -9.9365 12.05 26.279 + -58.9515 44.847 6.575 + 14.6465 21.141 13.279 + 13.4985 20.996 12.858 + -21.9895 63.749 -1.891 + -20.7495 64.06 -1.446 + -19.6105 64.183 -1.031 + 1.9635 18.376 7.174 + 0.6465 17.934 6.687 + -57.7835 56.658 -20.696 + -45.9675 -21.992 -17.509 + -46.6405 -34.064 42.68 + -45.6575 -34.065 42.981 + -44.6415 -34.017 43.315 + -43.6575 -34.013 43.613 + -42.6525 -33.976 43.981 + -41.6565 -33.959 44.243 + -40.6575 -33.948 44.373 + -39.6565 -33.942 44.357 + -38.6585 -33.969 44.268 + -37.6585 -33.985 44.151 + -36.6585 -33.979 44.139 + -35.6515 -33.934 44.336 + -34.6515 -33.916 44.597 + -33.6595 -33.925 44.778 + -32.6575 -33.906 44.88 + -31.6585 -33.917 44.755 + -30.6565 -33.955 44.403 + -29.6555 -33.995 43.889 + -28.6565 -33.999 43.721 + -27.6535 -33.981 43.967 + -26.6425 -33.948 44.287 + -25.6445 -33.927 44.53 + -24.6555 -33.926 44.577 + -23.6625 -33.919 44.532 + -22.6595 -33.959 44.228 + -21.6755 -33.967 43.876 + -20.6605 -34 43.722 + -19.6625 -34.012 43.574 + -18.6645 -34.023 43.441 + -17.6685 -34.033 43.308 + -16.6655 -34.055 43.074 + -15.6655 -34.073 42.811 + -14.6555 -34.106 42.446 + -13.6685 -34.127 42.38 + -12.7845 -34.177 42.677 + -55.2225 56.44 -18.269 + -56.2465 56.436 -18.686 + -57.5565 55.978 -19.162 + -1.0255 18.086 14.77 + -47.0065 49.365 -15.283 + -16.7365 67.138 -4.281 + -64.2385 44.781 20.803 + -2.6485 -32.958 56.89 + -1.6465 -32.928 57.244 + -0.6595 -32.923 57.514 + 0.3305 -32.923 57.679 + 1.3465 -32.881 57.973 + 2.3435 -32.874 58.102 + 3.3465 -32.846 58.454 + 4.3325 -32.834 58.744 + 5.3215 -32.796 58.986 + 6.3375 -32.794 59.206 + 7.3365 -32.795 59.218 + 8.3415 -32.791 59.189 + 9.3415 -32.792 59.196 + 10.3305 -32.767 59.491 + 11.3335 -32.737 59.846 + 12.3265 -32.713 60.032 + 13.3385 -32.712 60.107 + 14.3455 -32.714 60.094 + 15.3485 -32.725 60.052 + 16.3655 -32.737 59.859 + 17.3745 -32.765 59.509 + 18.3615 -32.807 58.99 + 19.3455 -32.874 58.116 + 20.3605 -32.903 57.713 + 21.3465 -32.905 57.669 + 22.3415 -32.902 57.742 + 23.3495 -32.893 57.714 + 24.3485 -32.903 57.663 + 25.3465 -32.916 57.519 + 26.3455 -32.946 57.15 + -22.6535 6.508 34.082 + 14.3535 5.398 42.28 + -10.6605 3.742 36.558 + -11.6615 3.748 36.444 + 12.3415 5.437 42.009 + -21.6385 6.525 33.756 + -20.6525 6.462 33.557 + -19.6555 6.475 33.459 + -14.6585 6.455 33.771 + -8.6835 6.524 34.449 + 6.3615 6.731 40.529 + 19.3365 6.78 41.19 + 59.4245 -10.099 3.723 + -8.7295 11.785 -5.445 + 54.6945 -3.274 0.705 + 2.3165 8.151 38.646 + -26.6565 9.147 31.075 + 18.1245 21.43 17.418 + -44.7495 45.158 -20.046 + 56.3145 -7.399 27.72 + -67.0775 2.744 2.808 + -61.6875 14.399 53.799 + 22.3445 13.613 35.481 + -67.8795 0.861 35.106 + -77.5955 11.33 23.821 + -63.6295 20.094 54.222 + 39.6355 14.621 23.888 + -58.6635 28.492 50.487 + -56.6755 28.495 50.136 + 32.1225 18.984 18.256 + -52.8535 47.99 -48.399 + -53.9825 45.715 27.271 + -69.2775 -14.773 1.979 + -45.1275 49.844 -35.08 + -21.2235 63.964 -8.419 + 48.8325 4.263 -1.733 + 53.2725 -1.949 -1.283 + 53.6695 -1.917 -0.29 + -68.7205 1.59 27.882 + 12.8535 15.941 32.89 + 13.7885 15.68 33.231 + -1.6965 13.661 29.228 + 41.6055 11.96 27.478 + 27.3665 13.2 35.209 + -42.2665 45.503 18.339 + 22.2765 21.498 16.079 + 21.2495 21.541 15.704 + -24.9345 62.387 -2.928 + -23.3445 63.238 -2.378 + 5.6695 19.41 8.539 + 4.4085 19.056 8.073 + 3.2175 18.761 7.636 + -55.4965 46.151 22.356 + -46.1975 43.895 32.947 + 4.6595 -11.725 51.346 + -46.6555 -32.637 43.228 + -45.6525 -32.613 43.472 + -44.6425 -32.585 43.695 + -43.6295 -32.543 44.036 + -42.6345 -32.517 44.428 + -41.6455 -32.505 44.721 + -40.6575 -32.505 44.887 + -39.6575 -32.495 45.013 + -38.6565 -32.494 45.015 + -37.6585 -32.536 44.807 + -36.6575 -32.538 44.665 + -35.6535 -32.501 44.714 + -34.6565 -32.491 45.001 + -33.6585 -32.48 45.293 + -32.6565 -32.464 45.404 + -31.6525 -32.48 45.296 + -30.6575 -32.505 44.879 + -29.6685 -32.54 44.323 + -28.6565 -32.6 43.747 + -27.6445 -32.577 43.881 + -26.6455 -32.55 44.285 + -25.6445 -32.529 44.552 + -24.6535 -32.517 44.71 + -23.6575 -32.514 44.714 + -22.6645 -32.517 44.533 + -21.6695 -32.534 44.288 + -20.6665 -32.57 43.942 + -19.6725 -32.587 43.668 + -18.6695 -32.614 43.437 + -17.6685 -32.636 43.191 + -16.6625 -32.659 42.953 + -15.6525 -32.684 42.755 + -14.6395 -32.665 42.623 + -13.7205 -32.74 42.633 + -54.6565 46.129 16.829 + -52.0245 -24.075 44.457 + -49.8515 45.346 28.718 + -62.9115 44.826 13.947 + -48.7875 52.17 -15.938 + -15.4475 67.537 -3.824 + -76.1575 19.458 16.773 + -74.5035 5.916 32.847 + -3.6355 -31.531 57.23 + -2.6465 -31.512 57.603 + -1.6645 -31.513 57.894 + -0.6525 -31.471 58.208 + 0.3495 -31.458 58.306 + 1.3395 -31.481 58.246 + 2.3435 -31.477 58.226 + 3.3405 -31.459 58.482 + 4.3425 -31.432 58.83 + 5.3395 -31.407 59.202 + 6.3165 -31.383 59.461 + 7.3425 -31.378 59.546 + 8.3405 -31.387 59.452 + 9.3385 -31.402 59.247 + 10.3325 -31.392 59.288 + 11.3335 -31.369 59.521 + 12.3295 -31.348 59.669 + 13.3395 -31.349 59.748 + 14.3425 -31.357 59.805 + 15.3465 -31.366 59.687 + 16.3575 -31.376 59.492 + 17.3645 -31.401 59.244 + 18.3765 -31.437 58.805 + 19.3655 -31.475 58.3 + 20.3605 -31.519 57.715 + 21.3535 -31.533 57.468 + 22.3465 -31.537 57.412 + 23.3505 -31.539 57.339 + 24.3485 -31.543 57.302 + 25.3485 -31.554 57.17 + 26.3475 -31.573 56.928 + 34.3415 5.236 38.309 + 30.3485 5.271 38.719 + -12.6645 3.75 36.331 + -15.6715 3.752 35.857 + 20.3285 5.385 41.8 + 9.3475 5.398 41.826 + -26.6645 6.475 33.911 + -18.6575 6.482 33.467 + -17.6565 6.46 33.552 + -7.7125 6.585 35.12 + 11.3535 6.75 41.008 + 20.3305 6.761 41.046 + 54.4825 -0.422 4.695 + -68.5575 -1.115 22.887 + -8.6785 7.889 33.534 + 4.3515 8.117 39.311 + -59.6445 32.665 47.61 + -27.6555 9.139 30.947 + 21.8005 21.472 17.335 + -60.5325 46.799 -11.366 + 55.4445 -1.759 20.713 + -28.6615 11.851 27.648 + -60.6805 14.415 53.901 + 21.3435 13.635 35.383 + -32.9295 29.991 16.936 + -71.5755 -7.833 11.928 + -62.6685 20.12 54.437 + 24.3175 21.041 19.676 + -57.6735 28.48 50.352 + 18.9855 21.511 12.017 + -0.3585 17.279 4.858 + -16.8015 65.429 -11.419 + -34.6555 47.7 11.08 + -55.4855 66.327 -52.472 + -64.1775 -13.741 -6.033 + 45.1625 7.301 30.242 + -9.7135 70.207 -6.173 + -51.1455 45.408 9.359 + -50.7725 45.168 8.047 + 40.1285 13.231 26.933 + -47.6745 45.706 26.569 + -69.7105 42.773 16.012 + 23.3055 21.437 16.454 + -61.2905 -9.377 36.324 + -26.6505 61.191 -3.499 + 8.0705 19.938 9.422 + 6.8705 19.674 8.98 + -62.3735 45.37 19.972 + -60.0585 45.677 20.773 + -58.9055 45.812 21.169 + -76.6555 7.247 18.84 + -38.2255 43.919 21.261 + -64.6035 43.719 10.445 + -8.9735 -20.72 -33.293 + -47.6545 -31.193 43.74 + -46.6475 -31.161 43.966 + -45.6575 -31.175 43.999 + -44.6665 -31.188 44.04 + -43.6455 -31.132 44.331 + -42.6395 -31.099 44.695 + -41.6635 -31.096 45.036 + -40.6325 -31.029 45.432 + -39.6445 -31.012 45.714 + -38.6555 -31.024 45.757 + -37.6565 -31.031 45.622 + -36.6565 -31.063 45.401 + -35.6565 -31.068 45.253 + -34.6565 -31.049 45.345 + -33.6585 -31.053 45.536 + -32.6595 -31.034 45.616 + -31.6465 -31.072 45.464 + -30.6785 -31.06 45.193 + -29.6945 -31.104 44.682 + -28.6465 -31.192 43.926 + -27.6575 -31.196 43.711 + -26.6525 -31.167 44.059 + -25.6535 -31.146 44.353 + -24.6505 -31.127 44.584 + -23.6495 -31.112 44.685 + -22.6875 -31.121 44.502 + -21.6575 -31.143 44.373 + -20.6685 -31.138 44.171 + -19.6595 -31.161 44.118 + -18.6705 -31.177 43.826 + -17.6515 -31.231 43.377 + -16.6635 -31.244 43.07 + -15.6575 -31.265 42.811 + -14.6735 -31.298 42.666 + -13.7355 -31.285 43.119 + -12.7535 -31.183 44.333 + -58.5285 44.98 28.627 + -42.7485 45.077 25.422 + -18.0295 66.724 -4.751 + -14.3205 67.769 -3.306 + -6.1905 -19.502 53.835 + 8.4925 19.481 24.014 + -67.9225 -1.122 24.877 + -71.7755 -9.187 10.946 + -3.6445 -30.106 57.843 + -2.6725 -30.102 58.261 + -1.6485 -30.045 58.673 + -0.6475 -30.02 58.875 + 0.3395 -30.063 58.756 + 1.3385 -30.078 58.51 + 2.3515 -30.066 58.408 + 3.3405 -30.064 58.605 + 4.3485 -30.027 59.04 + 5.3335 -30.01 59.347 + 6.3455 -29.992 59.541 + 7.3375 -29.991 59.619 + 8.3425 -29.993 59.557 + 9.3425 -30.008 59.349 + 10.3425 -30.016 59.159 + 11.3375 -30.014 59.148 + 12.3365 -30.003 59.26 + 13.3405 -30.002 59.344 + 14.3435 -30.004 59.266 + 15.3465 -30.012 59.226 + 16.3525 -30.02 59.127 + 17.3625 -30.039 58.906 + 18.3475 -30.054 58.724 + 19.3675 -30.096 58.316 + 20.3565 -30.124 57.922 + 21.3595 -30.148 57.591 + 22.3565 -30.161 57.352 + 23.3605 -30.174 57.139 + 24.3595 -30.18 56.981 + 25.3525 -30.192 56.818 + 26.3585 -30.204 56.604 + 32.3355 5.233 38.646 + 31.3435 5.262 38.701 + -13.6695 3.761 36.225 + -14.6675 3.739 36.081 + 10.3515 5.379 41.674 + 6.3505 5.379 41.331 + 5.3365 5.397 41.011 + -24.6625 6.521 34.086 + -9.6725 6.485 34.048 + -6.7115 6.611 35.865 + 10.3495 6.77 40.821 + 23.3275 6.726 40.287 + 55.9425 -3.218 3.713 + -15.7875 68.005 -5.392 + -9.6885 7.906 33.077 + 5.3475 8.128 39.446 + -24.6685 55.098 5.748 + -25.6685 9.213 31.254 + -60.5995 45.544 22.046 + -56.6715 29.901 49.286 + -5.7405 49.023 -1.487 + -29.6235 11.927 28.588 + -59.6615 14.436 54.195 + 20.3425 13.62 35.369 + -69.0935 -2.522 8.906 + -25.6085 15.023 -6.809 + -61.6595 20.129 54.571 + -12.6645 5.126 35.197 + -75.8975 12.579 10.808 + 28.5615 20.374 16.949 + -63.6565 39.603 37.77 + 61.7625 -19.799 2.713 + 39.5425 12.993 28.14 + -10.1755 45.487 -2.061 + -9.4735 72.505 -9.021 + 32.7425 12.634 32.86 + -57.0795 41.069 38.2 + -26.7715 15.585 21.68 + 36.8845 15.229 25.727 + 39.3595 13.81 26.641 + -24.9395 16.163 20.836 + 13.6525 17.813 30.243 + 25.3085 21.166 17.183 + -12.7605 10.559 28.279 + 18.4545 21.436 13.248 + 17.4215 21.43 12.868 + -63.6385 45.005 19.539 + -66.4755 -4.063 0.911 + -64.9975 6.082 -1.302 + -75.1655 5.956 35.849 + 41.6735 13.79 20.365 + 42.4325 13.195 20.65 + -49.6985 -29.7 43.761 + -48.6705 -29.776 44.16 + -47.6435 -29.696 44.581 + -46.6555 -29.704 44.75 + -45.6505 -29.694 44.717 + -44.6635 -29.742 44.553 + -43.6535 -29.716 44.622 + -42.6455 -29.691 44.84 + -41.6415 -29.662 45.226 + -40.6465 -29.634 45.622 + -39.6575 -29.609 46.037 + -38.6435 -29.557 46.32 + -37.6565 -29.565 46.37 + -36.6635 -29.588 46.158 + -35.6605 -29.602 45.848 + -34.6515 -29.663 45.596 + -33.6665 -29.636 45.598 + -32.6525 -29.658 45.576 + -31.6575 -29.649 45.533 + -30.6525 -29.672 45.293 + -29.6825 -29.675 44.931 + -28.6585 -29.739 44.212 + -27.6485 -29.79 43.759 + -26.6575 -29.791 43.79 + -25.6605 -29.779 43.891 + -24.6625 -29.759 44.153 + -23.6675 -29.75 44.314 + -22.6475 -29.727 44.444 + -21.6545 -29.701 44.7 + -20.6615 -29.687 44.82 + -19.6735 -29.691 44.673 + -18.6745 -29.739 44.194 + -17.6525 -29.805 43.631 + -16.6535 -29.846 43.121 + -15.6505 -29.827 42.99 + -14.6835 -29.887 42.828 + -13.7585 -29.851 43.513 + -12.7065 -29.688 45.175 + -43.1775 45.629 20.908 + -70.3845 42.325 23.233 + -68.9475 42.838 23.672 + 4.9315 18.8 22.742 + -9.6785 15.336 17.518 + -68.2075 -1.128 23.889 + -11.8775 11.829 -5.47 + -5.9665 74.311 -15.53 + -3.6385 -28.696 58.193 + -2.6525 -28.666 58.705 + -1.6495 -28.638 59.041 + -0.6545 -28.628 59.167 + 0.3445 -28.639 59.052 + 1.3545 -28.679 58.654 + 2.3435 -28.683 58.473 + 3.3415 -28.659 58.838 + 4.3315 -28.64 59.129 + 5.3315 -28.622 59.373 + 6.3435 -28.608 59.548 + 7.3425 -28.606 59.568 + 8.3435 -28.609 59.489 + 9.3415 -28.626 59.295 + 10.3425 -28.655 58.861 + 11.3405 -28.653 58.869 + 12.3355 -28.642 58.933 + 13.3395 -28.641 59.007 + 14.3415 -28.639 59.033 + 15.3435 -28.644 58.986 + 16.3495 -28.656 58.891 + 17.3515 -28.659 58.884 + 18.3535 -28.67 58.759 + 19.3555 -28.692 58.53 + 20.3535 -28.709 58.272 + 21.3535 -28.726 58.042 + 22.3665 -28.758 57.724 + 23.3485 -28.762 57.412 + 24.3615 -28.791 57.097 + 25.3715 -28.816 56.759 + 51.0335 3.808 25.308 + -5.6945 5.259 37.621 + -6.7255 5.261 36.904 + 7.3495 5.393 41.587 + -7.7255 5.239 36.158 + 13.3485 4.04 42.84 + -19.6535 5.07 34.31 + -10.6765 6.508 33.948 + -5.7055 6.634 36.487 + 9.3565 6.732 40.882 + 25.3175 6.69 39.632 + -61.3075 -2.971 -5.055 + -59.6785 8.871 53.961 + 58.9045 -18.621 -5.258 + 6.3565 8.112 39.659 + 2.3405 52.033 -8.768 + -28.6545 9.157 30.596 + 4.4705 15.143 31.372 + -55.6745 32.669 47.359 + 17.8395 21.363 11.593 + 42.0155 13.29 21.922 + -58.6535 14.449 54.521 + 19.3145 13.727 35.273 + -67.0565 -5.39 0.926 + -71.2025 15.175 1.816 + -60.6565 20.125 54.66 + -76.4165 11.394 39.816 + -62.6545 11.556 52.264 + -72.6745 41.405 19.655 + -64.6635 39.59 36.888 + -59.8165 1.99 48.514 + -60.6585 17.288 54.823 + 31.3395 3.866 39.432 + -20.6935 58.078 3.29 + -59.8425 38.475 -6.33 + -50.0795 47.71 -6.291 + -57.0245 40.06 39.757 + -59.6765 44.784 28.222 + 34.3545 16.556 24.8 + -45.5505 44.228 31.71 + -55.5305 45.884 25.262 + 3.2965 15.014 30.976 + 26.2835 20.978 17.541 + -50.4425 51.681 -12.221 + 19.6015 21.563 13.675 + -68.8925 43.271 17.76 + -67.4855 43.775 18.227 + -19.2065 15.592 -2.131 + -57.4095 50.874 -31.418 + 39.2975 15.408 19.483 + 40.1205 14.931 19.786 + 40.9295 14.428 20.09 + -11.0195 14.564 19.981 + -8.8145 14.547 20.816 + -49.6615 -28.34 44.391 + -48.6525 -28.291 44.879 + -47.6655 -28.287 45.179 + -46.6515 -28.242 45.359 + -45.6595 -28.276 45.305 + -44.6595 -28.272 45.135 + -43.6505 -28.274 44.954 + -42.6495 -28.281 44.981 + -41.6515 -28.263 45.254 + -40.6335 -28.218 45.706 + -39.6395 -28.179 46.226 + -38.6365 -28.144 46.575 + -37.6505 -28.134 46.731 + -36.6595 -28.14 46.597 + -35.6705 -28.176 46.251 + -34.6545 -28.232 45.809 + -33.6555 -28.24 45.675 + -32.6545 -28.241 45.683 + -31.6575 -28.235 45.651 + -30.6435 -28.267 45.449 + -29.6585 -28.273 45.138 + -28.6555 -28.325 44.638 + -27.6545 -28.369 44.008 + -26.6545 -28.392 43.803 + -25.6575 -28.398 43.624 + -24.6415 -28.367 43.921 + -23.6435 -28.326 44.449 + -22.6355 -28.278 44.921 + -21.6445 -28.254 45.178 + -20.6585 -28.253 45.191 + -19.6625 -28.281 44.994 + -18.6855 -28.295 44.68 + -17.6815 -28.347 44.061 + -16.6535 -28.409 43.499 + -15.6505 -28.42 43.178 + -14.6675 -28.443 43.14 + -13.8205 -28.456 43.586 + -12.7055 -28.241 45.681 + -69.4835 -3.871 8.901 + -69.2605 -3.88 7.897 + -73.8745 5.939 30.859 + -68.9075 -1.105 21.886 + -69.6735 -3.865 9.913 + -69.0225 -3.896 6.898 + -69.5515 -10.686 3.955 + 17.5885 21.167 8.634 + -3.6405 -27.307 58.321 + -2.6585 -27.272 58.827 + -1.6475 -27.246 59.151 + -0.6605 -27.245 59.221 + 0.3425 -27.263 58.951 + 1.3615 -27.312 58.53 + 2.3435 -27.289 58.572 + 3.3395 -27.27 58.852 + 4.3445 -27.255 59.071 + 5.3365 -27.241 59.234 + 6.3385 -27.23 59.38 + 7.3455 -27.228 59.381 + 8.3445 -27.234 59.333 + 9.3325 -27.26 59.038 + 10.3995 -27.301 58.621 + 11.3425 -27.287 58.557 + 12.3335 -27.269 58.813 + 13.3395 -27.258 58.983 + 14.3415 -27.253 59.086 + 15.3425 -27.256 59.032 + 16.3435 -27.262 58.999 + 17.3475 -27.263 59.004 + 18.3525 -27.274 58.914 + 19.3535 -27.287 58.781 + 20.3535 -27.293 58.639 + 21.3655 -27.316 58.446 + 22.3585 -27.33 58.169 + 23.3535 -27.353 57.784 + -51.4085 42.899 35.603 + 29.3425 5.269 38.944 + -70.6075 15.153 0.818 + 13.6395 21.01 15.778 + -63.6905 12.934 52.454 + 8.3435 5.412 41.732 + 58.3155 -5.923 8.703 + 33.3455 5.254 38.458 + 15.3435 4.052 43.087 + 14.3575 4.018 43.019 + -23.6575 6.529 34.103 + -4.6655 6.611 37.064 + 8.3465 6.777 40.837 + 24.3265 6.713 40.029 + -32.6515 44.805 11.878 + -7.8975 14.75 2.086 + -11.6645 7.836 32.515 + -0.6405 7.999 37.261 + -29.6575 53.614 6.989 + -29.6285 9.191 30.518 + -63.9885 28.831 -1.275 + -54.6815 32.664 47.107 + -64.2335 33.001 0.709 + 8.0635 59.493 -22.211 + -57.6565 14.454 54.773 + 58.0205 -25.722 -8.255 + 26.0375 14.428 -6.705 + 61.4645 -14.187 7.708 + -59.6565 20.117 54.53 + -53.6765 36.822 43.54 + -56.6665 11.647 55.102 + 56.4075 -8.873 -3.272 + 61.0225 -15.606 20.696 + -25.6585 3.752 36.214 + 58.1675 -11.547 26.702 + 55.7605 -1.774 17.703 + -21.6475 58.092 3.906 + 59.1765 -8.699 4.717 + -16.7925 16.629 6.109 + -51.4115 49.286 -6.791 + -50.7315 48.514 -6.532 + -46.0685 45.99 22.775 + 31.9845 18.182 23.922 + -47.5295 44.543 31.006 + -21.2835 17.487 16.228 + -44.3095 43.431 33.651 + 29.9455 19.818 18.885 + -51.1215 52.456 -12.48 + 20.6925 21.612 14.076 + -70.2725 42.682 17.296 + -49.6745 56.456 -56.489 + -12.6905 13.792 0.283 + 37.6795 16.41 18.884 + 38.5035 15.941 19.189 + -55.7525 45.757 3.25 + -54.8495 45.783 3.648 + 12.7855 -9.077 46.67 + -50.7195 53.503 -15.213 + -49.9855 52.839 -14.937 + -49.6395 -26.871 44.98 + -48.6595 -26.856 45.408 + -47.6495 -26.825 45.623 + -46.6505 -26.806 45.721 + -45.6565 -26.834 45.655 + -44.6585 -26.832 45.478 + -43.6575 -26.864 45.273 + -42.6525 -26.857 45.231 + -41.6455 -26.847 45.351 + -40.6425 -26.821 45.736 + -39.6385 -26.779 46.227 + -38.6455 -26.751 46.621 + -37.6525 -26.74 46.777 + -36.6585 -26.768 46.586 + -35.6565 -26.775 46.436 + -34.6545 -26.788 46.313 + -33.6565 -26.783 46.299 + -32.6515 -26.806 46.217 + -31.6505 -26.815 46.083 + -30.6575 -26.814 45.917 + -29.6555 -26.824 45.787 + -28.6635 -26.855 45.247 + -27.6685 -26.907 44.6 + -26.6625 -26.94 44.213 + -25.6505 -26.975 43.826 + -24.6505 -26.953 44.089 + -23.6385 -26.901 44.7 + -22.6375 -26.871 45.08 + -21.6435 -26.849 45.321 + -20.6575 -26.85 45.362 + -19.6645 -26.862 45.238 + -18.6875 -26.889 44.811 + -17.6675 -26.951 44.099 + -16.6565 -27.007 43.494 + -15.6565 -27.026 43.239 + -14.6785 -27.034 43.302 + -13.7875 -27.01 43.912 + -12.6025 -26.748 46.268 + -71.1325 -9.219 8.936 + -71.5405 -9.206 9.953 + -68.7205 -6.653 3.93 + -68.7035 -3.909 6.005 + -72.3555 -10.461 19.926 + -72.4765 -10.458 18.931 + 16.4425 21.003 8.209 + -3.6435 -25.93 58.208 + -2.6535 -25.893 58.706 + -1.6525 -25.877 58.938 + -0.6605 -25.863 59.111 + 0.3765 -25.879 58.767 + 1.3385 -25.917 58.389 + 2.3405 -25.905 58.519 + 3.3345 -25.888 58.767 + 4.3425 -25.876 58.956 + 5.3445 -25.869 59.068 + 6.3405 -25.861 59.126 + 7.3445 -25.856 59.143 + 8.3465 -25.86 59.075 + 9.3475 -25.885 58.835 + 10.3405 -25.911 58.446 + 11.3415 -25.906 58.514 + 12.3325 -25.88 58.823 + 13.3385 -25.873 58.998 + 14.3365 -25.855 59.077 + 15.3405 -25.866 59.04 + 16.3425 -25.867 59.046 + 17.3445 -25.869 59.053 + 18.3445 -25.868 59.08 + 19.3455 -25.876 58.985 + 20.3495 -25.884 58.873 + 21.3615 -25.903 58.683 + 22.3595 -25.92 58.419 + 23.3575 -25.946 58.045 + 23.3385 21.212 19.321 + -68.2575 -3.959 4.914 + 55.7355 -1.79 18.701 + 55.9985 -1.767 13.702 + -52.6535 7.406 54.07 + -57.6635 7.407 54.199 + -71.1285 2.938 7.826 + -32.6395 6.467 33.926 + 44.9935 9.309 27.321 + 56.8775 -3.137 10.702 + 28.3155 5.267 39.513 + 22.3345 6.751 40.444 + 53.1595 -3.37 -3.291 + 21.7185 21.549 14.449 + -10.6735 7.859 32.783 + 0.3385 8.053 37.683 + -2.7575 16.077 22.923 + 27.6735 20.702 16.626 + -14.5605 68.369 -4.914 + -45.9225 38.888 -16.042 + 59.5625 -8.678 9.702 + -56.6575 14.461 54.816 + -44.0675 59.209 -58.156 + -71.8685 -11.822 22.919 + 61.4945 -14.179 8.703 + -58.6465 20.121 54.338 + -44.8875 49.84 -33.057 + -53.8615 45.653 4.008 + 15.3415 12.297 37.302 + 60.8965 -15.615 21.695 + 54.3175 -3.295 -0.296 + 13.3505 12.235 37.484 + -22.6345 58.082 4.312 + -23.6595 58.076 4.404 + -57.7775 55.118 -17.626 + -52.9415 50.486 -7.342 + -52.1595 49.912 -7.051 + -41.0255 44.015 28.957 + 29.3655 19.329 22.956 + -48.4675 44.804 30.674 + -22.2225 17.704 15.884 + 30.8245 19.447 19.206 + -53.5895 53.885 -13.39 + 23.8245 21.487 15.219 + -54.4995 46.685 0.798 + -66.4985 -12.23 -3.072 + 35.9835 17.273 18.258 + 36.8175 16.815 18.564 + 12.7645 14.641 34.359 + -64.2285 42.055 32.737 + -53.0145 55.076 -16.052 + -52.2655 54.648 -15.791 + -51.4485 54.161 -15.489 + -6.2035 -22.202 55.309 + -62.1995 8.894 52.199 + -49.7665 -25.461 45.305 + -48.6435 -25.412 45.744 + -47.6555 -25.409 45.899 + -46.6575 -25.414 45.922 + -45.6575 -25.407 45.899 + -44.6575 -25.421 45.792 + -43.6575 -25.426 45.64 + -42.6595 -25.461 45.463 + -41.6535 -25.437 45.506 + -40.6495 -25.419 45.746 + -39.6305 -25.378 46.188 + -38.6395 -25.35 46.599 + -37.6555 -25.342 46.791 + -36.6525 -25.33 46.883 + -35.6555 -25.328 46.907 + -34.6575 -25.329 46.927 + -33.6565 -25.331 46.932 + -32.6645 -25.317 46.858 + -31.6585 -25.351 46.668 + -30.6595 -25.359 46.534 + -29.6605 -25.394 46.169 + -28.6195 -25.456 45.63 + -27.6435 -25.481 44.957 + -26.6725 -25.499 44.71 + -25.6475 -25.554 44.167 + -24.6595 -25.551 44.146 + -23.6455 -25.5 44.727 + -22.6485 -25.472 45.117 + -21.6455 -25.452 45.333 + -20.6585 -25.444 45.472 + -19.6725 -25.451 45.323 + -18.6875 -25.479 44.914 + -17.6825 -25.522 44.292 + -16.6575 -25.577 43.72 + -15.6515 -25.593 43.452 + -14.6485 -25.577 43.727 + -13.7165 -25.557 44.333 + -12.6165 -25.363 46.131 + 5.6975 18.74 4.216 + 6.9465 19.128 4.68 + -48.4925 67.673 -59.162 + -69.8845 -10.668 4.964 + -76.1095 18.061 13.789 + 14.1515 20.692 7.356 + 15.3565 20.909 7.808 + -3.6565 -24.563 57.877 + -2.6485 -24.537 58.332 + -1.6475 -24.517 58.673 + -0.6485 -24.509 58.789 + 0.3405 -24.51 58.618 + 1.3385 -24.523 58.418 + 2.3435 -24.512 58.607 + 3.3405 -24.503 58.735 + 4.3375 -24.499 58.773 + 5.3415 -24.499 58.829 + 6.3435 -24.497 58.832 + 7.3425 -24.488 58.966 + 8.3415 -24.484 58.991 + 9.3555 -24.502 58.755 + 10.3435 -24.52 58.493 + 11.3415 -24.512 58.628 + 12.3385 -24.498 58.814 + 13.3405 -24.485 58.83 + 14.3395 -24.489 58.819 + 15.3425 -24.489 58.863 + 16.3435 -24.491 58.871 + 17.3445 -24.484 58.916 + 18.3455 -24.484 58.919 + 19.3445 -24.492 58.864 + 20.3505 -24.496 58.778 + 21.3545 -24.507 58.663 + 22.3535 -24.525 58.402 + 23.3465 -24.546 58.13 + 24.3615 -24.567 57.81 + -8.7545 15.779 9.057 + 10.3805 -18.289 -33.918 + 47.5775 7.251 26.856 + -8.5225 16.023 12.06 + -59.6565 7.39 53.584 + 62.1785 -23.97 20.708 + -30.6535 6.432 33.511 + -27.6595 6.448 33.763 + -25.6625 6.486 34.046 + 35.3135 -24.98 52.045 + 36.3155 -25.002 51.793 + 21.3365 6.766 40.705 + -26.6495 18.276 2.467 + -58.5915 45.242 9.619 + 56.4795 -3.166 5.702 + 1.3225 8.11 38.118 + 61.8825 -16.962 14.699 + 44.6665 5.47 -5.063 + -56.5625 57.079 -20.211 + 14.3455 12.222 37.474 + -21.6455 5.131 34.861 + 1.3435 12.149 34.002 + -55.6425 14.465 54.748 + 57.2665 -18.745 -8.251 + 59.1755 -12.895 25.699 + 61.4565 -14.189 10.698 + 62.8615 -23.928 10.709 + -11.0905 15.352 8.201 + -64.7545 12.927 51.95 + 58.6745 -15.755 28.703 + -75.2825 16.799 38.786 + 32.3405 3.866 39.315 + -59.6575 25.702 52.305 + -7.6045 71.682 -8.074 + -61.6875 12.969 53.169 + -53.7775 50.943 -7.654 + -54.7155 51.238 -7.982 + 25.7045 20.53 21.618 + -40.3885 45.262 16.115 + 50.0045 3.646 27.775 + 31.6925 19.101 19.554 + -54.4695 54.229 -13.727 + 24.8025 21.34 15.572 + -7.2005 16.443 12.537 + -6.6475 15.142 2.543 + 35.1535 17.733 17.952 + 0.3725 15.772 26.993 + -53.1575 47.457 -1.612 + -54.8985 55.771 -16.759 + -53.8985 55.467 -16.38 + -18.8985 65.911 -3.62 + -20.2525 65.401 -4.119 + -21.7775 64.617 -4.68 + -71.5365 15.19 2.817 + -50.6345 -24.054 45.232 + -49.6505 -24.027 45.648 + -48.6375 -23.991 45.987 + -47.6535 -23.987 46.154 + -46.6505 -23.969 46.244 + -45.6555 -23.971 46.255 + -44.6575 -23.973 46.267 + -43.6555 -23.992 46.188 + -42.6565 -23.997 46.038 + -41.6555 -24.004 45.887 + -40.6445 -23.992 45.955 + -39.6525 -23.989 46.149 + -38.6425 -23.96 46.5 + -37.6495 -23.942 46.761 + -36.6485 -23.92 46.994 + -35.6575 -23.92 47.076 + -34.6565 -23.91 47.15 + -33.6555 -23.921 47.109 + -32.6615 -23.909 47.137 + -31.6545 -23.93 46.949 + -30.6565 -23.948 46.68 + -29.6355 -23.991 46.217 + -28.6415 -24.028 45.693 + -27.6525 -24.058 45.292 + -26.6615 -24.098 44.757 + -25.6495 -24.138 44.227 + -24.6575 -24.148 44.135 + -23.6605 -24.107 44.645 + -22.6305 -24.074 45.072 + -21.6465 -24.054 45.328 + -20.6575 -24.044 45.456 + -19.6715 -24.06 45.165 + -18.6235 -24.112 44.676 + -17.6585 -24.129 44.212 + -16.6565 -24.168 43.878 + -15.6565 -24.168 43.884 + -14.6635 -24.154 44.159 + -13.6345 -24.079 44.856 + -12.5845 -23.979 46.019 + 11.8045 20.276 6.483 + 10.5975 20.042 6.035 + 9.4045 19.752 5.594 + 8.1435 19.405 5.124 + 19.8265 21.357 9.468 + 18.7345 21.305 9.064 + 13.0045 20.517 6.931 + 20.9175 21.402 9.875 + -2.6445 -23.185 57.85 + -1.6565 -23.158 58.117 + -0.6635 -23.145 58.267 + 0.3555 -23.154 58.299 + 1.3455 -23.138 58.374 + 2.3405 -23.13 58.501 + 3.3365 -23.12 58.643 + 4.3465 -23.129 58.571 + 5.3435 -23.142 58.362 + 6.3395 -23.129 58.518 + 7.3395 -23.111 58.768 + 8.3385 -23.11 58.798 + 9.3515 -23.116 58.672 + 10.3435 -23.123 58.624 + 11.3395 -23.121 58.671 + 12.3425 -23.118 58.664 + 13.3435 -23.116 58.582 + 14.3425 -23.126 58.516 + 15.3465 -23.124 58.44 + 16.3455 -23.118 58.451 + 17.3435 -23.124 58.512 + 18.3465 -23.106 58.468 + 19.3455 -23.12 58.523 + 20.3465 -23.126 58.509 + 21.3455 -23.138 58.377 + 22.3505 -23.148 58.157 + 23.3595 -23.158 57.943 + 24.3545 -23.187 57.669 + -12.6405 69.805 -5.726 + 56.6805 -3.192 6.711 + 46.9295 8.043 26.613 + -58.6665 7.396 53.963 + -31.6355 6.477 33.57 + -29.6545 6.465 33.421 + -28.6605 6.467 33.542 + 34.3215 -23.58 51.849 + 35.3335 -23.609 51.386 + 36.3015 -23.653 51.267 + 37.3345 -23.634 51.018 + 2.4925 18.993 13.152 + -67.8995 -3.976 3.919 + -53.4845 -29.594 41.86 + -1.6515 8.006 37.033 + 46.0695 -8.023 40.456 + -11.0885 -17.018 -25.011 + 7.0105 14.594 -6.674 + 35.3525 5.243 38.095 + -23.6515 5.156 35.242 + 45.7015 8.618 27.583 + -54.6515 14.452 54.666 + -12.5255 -19.74 -27.037 + 59.5145 -12.89 24.687 + 61.4815 -14.181 9.701 + -15.9145 16.257 6.434 + 53.1745 -0.517 0.707 + -60.7575 12.983 53.659 + -14.6285 65.61 -1.873 + 59.2025 -15.715 27.711 + 56.2305 -3.179 4.703 + 55.5155 -8.929 -5.27 + -54.6275 45.328 28.506 + 21.7875 21.184 20.187 + -62.7525 -9.427 34.964 + -47.6845 44.019 -5.386 + 24.7755 20.781 21.273 + -69.0405 -17.497 2.992 + 49.4015 4.605 27.544 + 32.5795 18.707 19.854 + 41.1405 10.78 30.176 + 25.7765 21.157 15.927 + -68.3405 43.371 16.475 + -72.7955 -13.161 15.952 + 27.1295 20.826 14.998 + -52.4155 46.859 -1.34 + -57.2835 55.414 -17.593 + -56.0015 55.752 -17.143 + -16.4625 66.455 -2.725 + -17.6015 66.295 -3.178 + -77.1985 16.775 24.799 + -49.1715 44.368 31.895 + -70.5215 0.327 12.893 + -60.7945 46.776 -17.368 + -50.6785 -22.656 45.32 + -49.6345 -22.606 45.867 + -48.6525 -22.587 46.159 + -47.6515 -22.566 46.406 + -46.6425 -22.541 46.591 + -45.6565 -22.546 46.683 + -44.6565 -22.532 46.769 + -43.6555 -22.551 46.698 + -42.6625 -22.525 46.557 + -41.6565 -22.587 46.165 + -40.6525 -22.592 45.987 + -39.6515 -22.585 46.128 + -38.6485 -22.567 46.378 + -37.6515 -22.549 46.638 + -36.6565 -22.537 46.813 + -35.6555 -22.531 46.913 + -34.6555 -22.52 47.047 + -33.6555 -22.518 47.067 + -32.6595 -22.521 47.039 + -31.6635 -22.532 46.911 + -30.6725 -22.554 46.635 + -29.6505 -22.584 46.19 + -28.6415 -22.622 45.697 + -27.6395 -22.66 45.197 + -26.6915 -22.733 44.541 + -25.6565 -22.753 44.017 + -24.6585 -22.751 44.034 + -23.6495 -22.718 44.479 + -22.6495 -22.69 44.864 + -21.6515 -22.659 45.248 + -20.6645 -22.669 45.215 + -19.6595 -22.698 44.633 + -18.6305 -22.701 44.506 + -17.6625 -22.69 44.398 + -16.6555 -22.689 44.584 + -15.6495 -22.661 44.968 + -14.6435 -22.64 45.211 + -13.6295 -22.636 45.355 + -12.5435 -22.584 46.019 + 24.0585 21.341 11.022 + 25.0835 21.226 11.402 + 26.0655 21.083 11.758 + 27.0385 20.891 12.114 + 28.8975 20.381 12.794 + 27.9595 20.619 12.453 + 22.0035 21.422 10.279 + 23.0315 21.382 10.65 + 31.5725 19.359 13.778 + -2.6465 -21.834 57.26 + -1.6695 -21.797 57.556 + -0.6435 -21.801 57.833 + 0.3435 -21.776 58.004 + 1.3485 -21.766 58.215 + 2.3415 -21.753 58.373 + 3.3415 -21.744 58.503 + 4.3315 -21.755 58.33 + 5.3425 -21.778 57.998 + 6.3345 -21.752 58.324 + 7.3395 -21.732 58.647 + 8.3415 -21.731 58.736 + 9.3415 -21.729 58.673 + 10.3445 -21.737 58.627 + 11.3475 -21.737 58.576 + 12.3465 -21.742 58.445 + 13.3515 -21.742 58.34 + 14.3445 -21.755 58.274 + 15.3475 -21.756 58.18 + 16.3435 -21.77 58.12 + 17.3475 -21.763 58.049 + 18.3495 -21.754 57.974 + 19.3475 -21.764 57.94 + 20.3445 -21.778 57.901 + 21.3445 -21.787 57.781 + 22.3415 -21.802 57.639 + 23.3445 -21.809 57.416 + 24.3535 -21.816 57.202 + 25.3455 -21.844 56.931 + 27.3445 5.323 39.726 + -27.6615 53.599 6.96 + 22.7475 21.504 14.823 + -27.6675 52.122 7.513 + -26.6925 52.115 7.199 + -33.6495 5.109 35.307 + -71.6585 -7.8 19.905 + -55.3385 49.456 -37.395 + 36.3185 -22.272 50.73 + 37.3355 -22.271 50.633 + 38.3125 -22.287 50.564 + -46.7625 45.974 18.18 + -58.6635 11.633 54.678 + -3.6805 8.027 36.333 + 58.1955 -10.166 -0.278 + -70.7055 0.298 15.877 + 56.5315 -4.628 2.73 + -11.6715 70.057 -5.392 + -4.5115 16.904 9.149 + -75.6415 15.29 10.81 + 60.0615 -12.839 21.702 + 55.6985 -13.152 -6.303 + 7.3765 59.5 -19.206 + 11.3575 12.22 37.229 + -1.6675 10.77 34.278 + -45.0145 43.591 -22.043 + 56.8085 -8.839 -2.281 + -47.1055 43.103 -5.164 + -70.0765 6.949 2.79 + -49.7575 45.665 12.77 + 18.5735 21.216 19.021 + 22.8165 21.114 20.561 + -23.9725 17.518 0.501 + 48.8005 5.496 27.321 + 33.4485 18.315 20.173 + 8.8895 19.11 25.614 + 26.7075 20.905 16.27 + -4.9915 14.752 23.616 + -72.7855 -13.155 16.948 + 26.1975 21.078 14.657 + -51.6755 46.3 -1.099 + -12.9515 -1.281 -17.735 + -55.8135 46.056 16.422 + -38.6785 42.299 29.842 + -65.9195 -4.067 -0.11 + -75.4295 15.413 33.795 + -53.6635 -21.388 43.393 + -12.4975 13.4 -1.113 + -13.4525 13.453 -1.481 + -50.6525 -21.244 45.272 + -49.6615 -21.203 45.8 + -48.6495 -21.176 46.155 + -47.6595 -21.157 46.436 + -46.6425 -21.13 46.751 + -45.6545 -21.118 46.917 + -44.6505 -21.103 46.992 + -43.6555 -21.112 46.862 + -42.6675 -21.15 46.571 + -41.6435 -21.185 46.213 + -40.6585 -21.18 46.206 + -39.6585 -21.169 46.357 + -38.6575 -21.156 46.431 + -37.6565 -21.158 46.419 + -36.6555 -21.149 46.534 + -35.6555 -21.142 46.649 + -34.6565 -21.134 46.775 + -33.6575 -21.133 46.787 + -32.6545 -21.13 46.701 + -31.6575 -21.146 46.557 + -30.6565 -21.167 46.297 + -29.6675 -21.2 45.894 + -28.6755 -21.241 45.366 + -27.6305 -21.281 44.72 + -26.6295 -21.318 44.238 + -25.6605 -21.343 43.996 + -24.6605 -21.33 44.13 + -23.6475 -21.315 44.343 + -22.6525 -21.284 44.749 + -21.6665 -21.259 45.087 + -20.6575 -21.272 44.911 + -19.6525 -21.277 44.71 + -18.6505 -21.245 44.761 + -17.6545 -21.253 44.989 + -16.6485 -21.199 45.445 + -15.6555 -21.219 45.522 + -14.6415 -21.205 45.441 + -13.6655 -21.221 45.377 + -12.6535 -21.204 45.789 + -11.6475 -21.121 46.929 + 35.9375 17.448 15.395 + 35.0745 17.853 15.071 + 34.2005 18.23 14.746 + 33.3275 18.61 14.423 + 32.4905 19.053 14.116 + 30.6975 19.721 13.454 + 29.8115 20.074 13.133 + 36.7735 17 15.697 + -55.3885 57.206 -19.806 + -1.6435 -20.446 57.129 + -0.6585 -20.418 57.412 + 0.3485 -20.403 57.742 + 1.3385 -20.375 58.022 + 2.3465 -20.369 58.224 + 3.3435 -20.358 58.361 + 4.3305 -20.37 58.214 + 5.3475 -20.391 57.953 + 6.3445 -20.369 58.227 + 7.3415 -20.348 58.492 + 8.3435 -20.343 58.599 + 9.3425 -20.34 58.615 + 10.3445 -20.34 58.532 + 11.3465 -20.349 58.421 + 12.3535 -20.351 58.238 + 13.3445 -20.372 58.131 + 14.3525 -20.367 57.979 + 15.3385 -20.393 57.948 + 16.3455 -20.39 57.791 + 17.3485 -20.39 57.692 + 18.3485 -20.399 57.564 + 19.3415 -20.42 57.402 + 20.3505 -20.416 57.212 + 21.3505 -20.424 57.086 + 22.3475 -20.44 56.943 + 23.3545 -20.442 56.73 + 24.3405 -20.478 56.552 + 25.3475 -20.481 56.341 + 26.3435 -20.504 56.087 + 27.3385 -20.521 55.836 + 18.0305 -20.63 -32.641 + -29.6625 52.102 7.987 + 54.6835 -1.804 24.717 + 23.7935 20.926 20.914 + -60.6335 29.861 49.607 + 35.3405 -20.877 50.21 + 36.3235 -20.9 50.136 + 37.3415 -20.908 50.201 + 38.3275 -20.902 50.205 + -53.5805 45.276 28.871 + -59.6505 29.883 49.633 + -2.6625 8.021 36.81 + -52.6725 35.455 44.342 + 52.8015 -0.532 -0.296 + -61.1145 53.745 -23.409 + 6.3495 12.226 36.146 + -29.6585 5.089 34.794 + -14.1415 15.59 7.075 + -53.6575 14.447 54.54 + 13.3455 13.584 35.837 + 60.1815 -12.832 20.701 + 60.7315 -12.824 5.713 + -72.6905 -11.799 18.938 + 59.2925 -14.304 26.694 + 52.1725 1.89 25.733 + -59.1855 41.192 37.488 + 42.8545 8.058 -3.845 + -75.2895 5.966 37.847 + -74.6775 30.455 20.715 + 56.1465 -4.587 24.702 + -50.9715 -19.27 -15.449 + -64.3065 44.855 17.846 + 39.1535 14.585 25.136 + -22.9265 17.48 0.882 + 48.1985 6.381 27.094 + 35.1005 17.369 20.783 + -45.0175 42.977 34.867 + 38.9215 15.578 20.768 + 10.5665 17.982 29.14 + 3.6395 18.671 6.344 + 23.2205 21.487 13.57 + 24.2005 21.364 13.925 + -50.8865 45.642 -0.754 + -58.0135 45.956 15.648 + 11.0855 -9.354 47.556 + -65.4075 -4.111 -1.086 + -69.8095 -3.85 10.909 + -55.6885 -20.013 42.928 + -54.6645 -19.981 43.267 + -53.6635 -19.971 43.391 + -52.6545 -19.95 43.762 + -51.6515 -19.899 44.379 + -70.4205 27.58 6.741 + -49.6675 -19.807 45.564 + -48.6605 -19.781 45.927 + -47.6525 -19.754 46.286 + -46.6445 -19.732 46.637 + -45.6545 -19.716 46.808 + -44.6565 -19.707 46.938 + -43.6565 -19.716 46.81 + -42.6575 -19.716 46.722 + -41.6565 -19.715 46.769 + -40.6555 -19.715 46.814 + -39.6575 -19.717 46.802 + -38.6555 -19.724 46.706 + -37.6665 -19.738 46.517 + -36.6565 -19.756 46.293 + -35.6585 -19.767 46.24 + -34.6585 -19.768 46.239 + -33.6565 -19.758 46.198 + -32.6575 -19.761 46.186 + -31.6545 -19.769 46.068 + -30.6675 -19.799 45.756 + -29.6335 -19.821 45.227 + -28.6155 -19.856 44.77 + -27.6205 -19.885 44.387 + -26.6415 -19.905 44.217 + -25.6525 -19.909 44.186 + -24.6555 -19.919 44.106 + -23.6655 -19.912 44.183 + -22.6565 -19.878 44.649 + -21.6515 -19.848 45.001 + -20.6415 -19.834 45.08 + -19.6565 -19.84 45.153 + -18.6465 -19.806 45.325 + -17.6515 -19.784 45.756 + -16.6505 -19.753 45.944 + -15.6525 -19.767 45.815 + -14.6545 -19.786 45.733 + -13.6415 -19.795 45.576 + -12.6515 -19.8 45.648 + -11.6045 -19.768 46.385 + 37.6055 16.543 16.003 + 38.4355 16.079 16.311 + 39.2625 15.607 16.615 + 40.0695 15.103 16.921 + 40.8565 14.55 17.208 + 41.6505 14.037 17.514 + 42.4255 13.46 17.8 + 43.9125 12.205 18.357 + 43.1655 12.812 18.073 + -0.6435 -19.058 57.011 + 0.3555 -19.037 57.366 + 1.3455 -19.013 57.629 + 2.3565 -19 57.844 + 3.3415 -18.979 58.018 + 4.3545 -18.998 58.064 + 5.3485 -18.998 57.948 + 6.3415 -18.98 58.019 + 7.3425 -18.967 58.169 + 8.3415 -18.963 58.264 + 9.3445 -18.955 58.291 + 10.3445 -18.953 58.299 + 11.3445 -18.968 58.25 + 12.3495 -18.97 58.06 + 13.3465 -18.983 57.919 + 14.3485 -18.992 57.788 + 15.3445 -19 57.663 + 16.3465 -19.009 57.548 + 17.3455 -19.019 57.409 + 18.3485 -19.024 57.205 + 19.3515 -19.035 56.978 + 20.3375 -19.058 56.793 + 21.3495 -19.064 56.588 + 22.3485 -19.077 56.348 + 23.3405 -19.108 56.073 + 24.3325 -19.139 55.808 + 25.3375 -19.143 55.586 + 26.3445 -19.146 55.371 + 27.3385 -19.165 55.227 + 28.3435 -19.169 55.008 + 29.3395 -19.194 54.642 + 16.4115 21.34 15.362 + -53.6525 7.408 54.323 + -54.6525 7.398 54.484 + -55.6585 7.404 54.468 + -56.6605 7.405 54.335 + 35.3315 -19.507 49.71 + 36.3335 -19.511 49.69 + 37.3295 -19.522 49.752 + 38.3325 -19.512 49.773 + 39.3295 -19.517 49.665 + -24.6575 5.111 35.303 + 14.5615 9.834 -11.655 + -6.6945 7.957 34.695 + -53.6695 35.459 44.716 + -43.2005 45.37 23.809 + -49.7385 53.614 -56.448 + 52.8495 -4.838 -6.268 + 58.9225 -8.671 17.702 + 2.3465 12.171 34.634 + 60.3625 -12.842 19.69 + 61.1095 -12.796 9.702 + 7.5825 67.097 -26.194 + 5.3425 12.236 35.786 + -31.6545 46.252 11.115 + 6.2895 54.937 -16.212 + -74.1415 5.916 31.855 + -31.0225 15.798 -5.561 + 33.3305 3.837 39.147 + 54.9725 -0.42 16.702 + -15.3275 10.634 28.831 + 38.3325 15.069 24.831 + 7.1135 19.918 11.953 + 46.2555 8.808 26.359 + 34.2435 17.79 20.468 + -42.6245 41.34 35.773 + 40.5255 14.543 21.364 + -53.9105 46.211 21.454 + 2.3945 18.275 5.885 + 4.8955 19.043 6.808 + 22.1895 21.557 13.195 + -47.9525 43.036 0.374 + -50.1785 44.941 -0.487 + -20.1655 11.425 30.045 + -42.3525 45.571 15.407 + -63.0035 9.095 -3.461 + -76.5665 7.231 17.838 + -55.6875 -18.593 42.927 + -54.6795 -18.565 43.303 + -53.6915 -18.564 43.472 + -52.6595 -18.538 43.639 + -51.6795 -18.512 43.939 + -50.7455 -18.594 44.531 + -49.6535 -18.429 45.154 + -48.6515 -18.4 45.528 + -47.6445 -18.377 45.892 + -46.6615 -18.34 46.315 + -45.6595 -18.321 46.569 + -44.6485 -18.314 46.754 + -43.6565 -18.305 46.806 + -42.6555 -18.296 46.922 + -41.6565 -18.295 46.936 + -40.6575 -18.295 46.936 + -39.6575 -18.297 46.923 + -38.6625 -18.307 46.788 + -37.6635 -18.337 46.419 + -36.6625 -18.37 46.013 + -35.6575 -18.383 45.695 + -34.6575 -18.385 45.688 + -33.6585 -18.376 45.774 + -32.6515 -18.378 45.744 + -31.6335 -18.389 45.566 + -30.6385 -18.407 45.356 + -29.6385 -18.436 44.963 + -28.6325 -18.453 44.724 + -27.6455 -18.466 44.566 + -26.6395 -18.438 44.426 + -25.6535 -18.494 44.197 + -24.6565 -18.509 44.017 + -23.6565 -18.503 44.133 + -22.6585 -18.474 44.525 + -21.6355 -18.437 44.969 + -20.6495 -18.416 45.265 + -19.6355 -18.384 45.575 + -18.6525 -18.367 45.888 + -17.6475 -18.346 46.103 + -16.6485 -18.34 46.054 + -15.6565 -18.361 45.839 + -14.6555 -18.375 45.762 + -13.6565 -18.389 45.654 + -12.6505 -18.386 45.631 + -11.6495 -18.369 45.916 + -10.6905 -18.317 46.47 + 50.2185 5.816 20.737 + 49.5655 6.603 20.485 + 48.9065 7.384 20.235 + 48.2235 8.096 19.966 + 47.5325 8.849 19.712 + 46.0995 10.207 19.169 + 44.6455 11.541 18.63 + 45.3755 10.879 18.901 + 46.8205 9.532 19.443 + -0.6365 -17.715 56.283 + 0.3865 -17.67 56.8 + 1.3455 -17.644 57.043 + 2.3455 -17.656 57.146 + 3.3445 -17.628 57.397 + 4.3455 -17.612 57.633 + 5.3405 -17.601 57.659 + 6.3415 -17.604 57.656 + 7.3395 -17.595 57.675 + 8.3465 -17.602 57.762 + 9.3415 -17.585 57.807 + 10.3415 -17.595 57.879 + 11.3445 -17.588 57.799 + 12.3455 -17.594 57.681 + 13.3465 -17.604 57.557 + 14.3465 -17.603 57.458 + 15.3395 -17.629 57.389 + 16.3475 -17.628 57.196 + 17.3465 -17.639 57.062 + 18.3495 -17.644 56.851 + 19.3475 -17.659 56.705 + 20.3555 -17.663 56.492 + 21.3435 -17.693 56.213 + 22.3395 -17.724 55.831 + 23.3395 -17.745 55.371 + 24.3315 -17.792 54.965 + 25.3335 -17.805 54.735 + 26.3315 -17.822 54.599 + 27.3335 -17.832 54.476 + 28.3375 -17.825 54.27 + 17.5045 21.387 15.762 + 50.6295 2.763 28.012 + -72.8485 27.765 33.734 + -52.8655 46.155 21.826 + 35.3245 -18.13 49.308 + 36.3365 -18.128 49.32 + 37.3385 -18.13 49.455 + 38.3245 -18.131 49.48 + 39.3175 -18.134 49.377 + 35.9305 16.908 21.09 + -58.6695 25.692 52.169 + -5.6935 7.988 35.327 + -49.6125 35.323 42.546 + -56.3775 62.053 -47.506 + 16.3415 4.037 43.057 + 33.4935 10.824 34.59 + -61.6405 27.086 51.328 + -32.5515 34.611 10.92 + -19.4565 16.078 -0.784 + 9.3585 13.584 35.469 + 60.2235 -11.444 5.713 + 61.1055 -12.8 8.706 + -36.6775 43.246 16.042 + 9.5245 20.406 12.835 + -60.6465 28.5 50.504 + -56.6625 34.062 46.471 + 39.3165 15.183 22.344 + -14.2875 58.11 -5.009 + -20.9035 17.2 1.649 + -37.4685 43.538 18.642 + -36.3075 51.087 7.413 + -50.7255 46.154 22.576 + 37.5025 15.523 24.522 + 8.3165 20.172 12.394 + -72.3175 -17.205 22.953 + 52.8675 -0.092 27.419 + -68.4495 42.69 25.344 + 41.2885 13.96 21.652 + 25.7285 16.475 31.68 + 53.8655 -1.084 26.367 + 6.1525 19.399 7.275 + 52.5755 1.723 24.452 + -70.0385 -17.429 4.958 + -75.6335 15.434 37.798 + -53.3485 46.131 23.106 + -59.3315 44.247 3.526 + -74.8155 5.942 33.854 + -54.6705 -17.143 43.283 + -53.6725 -17.129 43.551 + -52.6505 -17.117 43.739 + -51.6745 -17.106 43.821 + -50.6555 -17.086 44.139 + -49.6705 -17.05 44.558 + -48.6615 -17.018 45.045 + -47.6435 -16.998 45.509 + -46.6595 -16.957 45.929 + -45.6325 -16.946 46.348 + -44.6485 -16.926 46.515 + -43.6545 -16.911 46.651 + -42.6585 -16.897 46.711 + -41.6555 -16.894 46.807 + -40.6545 -16.889 46.73 + -39.6585 -16.906 46.665 + -38.6525 -16.916 46.455 + -37.6545 -16.942 46.074 + -36.6555 -16.971 45.688 + -35.6575 -16.986 45.469 + -34.6575 -16.982 45.561 + -33.6595 -16.964 45.824 + -32.6565 -16.95 46.039 + -31.6465 -16.972 45.757 + -30.6445 -17.002 45.343 + -29.6445 -17.019 45.072 + -28.6445 -17.029 44.94 + -27.6605 -17.048 44.646 + -26.6535 -17.076 44.276 + -25.6675 -17.123 44.027 + -24.6595 -17.103 43.896 + -23.6595 -17.095 44.029 + -22.6685 -17.066 44.423 + -21.6265 -17.03 44.952 + -20.6455 -16.997 45.383 + -19.6405 -16.971 45.737 + -18.6375 -16.954 45.955 + -17.6375 -16.943 46.049 + -16.6505 -16.948 45.992 + -15.6525 -16.944 45.969 + -14.6525 -16.94 45.966 + -13.6515 -16.948 45.842 + -12.6525 -16.955 45.882 + -11.6505 -16.948 46.022 + -10.6575 -16.929 46.301 + -9.7875 -16.89 46.71 + 2.6855 19.098 16.112 + 50.8695 4.973 20.974 + 51.4985 4.1 21.207 + 52.1035 3.201 21.43 + 53.3005 1.327 21.862 + 54.4765 -0.57 22.294 + 1.4295 18.737 15.658 + 53.8925 0.348 22.071 + 52.7125 2.239 21.643 + 0.3405 -16.323 55.73 + 1.3575 -16.332 56.165 + 2.3485 -16.313 56.19 + 3.2985 -16.281 56.283 + 4.3405 -16.259 56.701 + 5.3475 -16.269 57.01 + 6.3445 -16.25 57.041 + 7.3445 -16.258 57.03 + 8.3445 -16.252 57.037 + 9.3425 -16.247 57.156 + 10.3425 -16.226 57.187 + 11.3415 -16.235 57.175 + 12.3435 -16.248 57.148 + 13.3425 -16.258 57.024 + 14.3425 -16.25 56.936 + 15.3405 -16.267 56.897 + 16.3385 -16.282 56.761 + 17.3385 -16.284 56.652 + 18.3425 -16.28 56.556 + 19.3405 -16.291 56.322 + 20.3545 -16.292 56.009 + 21.3415 -16.332 55.61 + 22.3375 -16.37 55.116 + 23.3405 -16.394 54.642 + 24.3215 -16.429 54.253 + 25.3215 -16.471 53.982 + 26.3325 -16.466 53.773 + 27.3285 -16.485 53.637 + 28.3235 -16.507 53.387 + 29.3275 -16.515 53.046 + 30.3115 -16.553 52.665 + 55.2885 -1.784 21.709 + 57.5065 -4.52 13.701 + -33.6545 44.814 12.255 + 35.3125 -16.73 49.168 + 36.3295 -16.737 49.156 + 37.3275 -16.739 49.23 + 38.3265 -16.735 49.25 + 39.3155 -16.755 49.004 + -55.6605 8.826 54.971 + -15.6555 7.833 32.516 + -4.6825 7.997 35.82 + -56.6685 10.238 55.098 + -44.9725 65.542 -57.07 + 7.6705 57.969 -19.185 + 21.9985 17.554 30.34 + -62.5765 27.082 51.115 + -13.6275 65.595 -2.701 + -52.8765 45.469 4.363 + 10.3525 13.614 35.616 + 60.3895 -11.421 6.705 + 60.8765 -12.808 6.708 + -7.7405 14.708 21.156 + -56.6495 13.052 55.079 + -61.6235 28.451 50.439 + -55.6715 34.049 46.333 + -16.1045 11.184 28.529 + -41.8395 38.083 36.091 + -64.6215 21.476 53.265 + -63.6595 17.28 54.422 + -56.3955 66.257 -51.552 + -51.7075 46.275 22.223 + 39.9245 14.006 25.422 + 5.9745 19.717 11.535 + -21.6195 16.97 -0.093 + 52.2835 0.891 27.199 + -52.3445 45.878 26.382 + 39.7125 15.041 21.061 + 38.0935 16.046 20.464 + 53.3175 -0.093 26.155 + 7.3485 19.689 7.715 + 53.1565 0.736 24.663 + -49.4315 44.322 -0.203 + -48.7145 43.634 0.076 + 27.4425 14.476 33.738 + -66.8815 43.987 16.964 + 6.9215 -11.531 52.116 + 28.1735 13.86 34.061 + -29.0405 -4.514 -18.643 + -53.6515 -15.711 43.617 + -52.6415 -15.696 43.831 + -51.6535 -15.693 43.872 + -50.6515 -15.695 43.868 + -49.6695 -15.671 44.056 + -48.6445 -15.654 44.496 + -47.6745 -15.601 44.949 + -46.6615 -15.578 45.424 + -45.6405 -15.563 45.879 + -44.6445 -15.552 46.119 + -43.6455 -15.55 46.228 + -42.6565 -15.522 46.294 + -41.6555 -15.535 46.364 + -40.6555 -15.516 46.311 + -39.6615 -15.533 46.267 + -38.6655 -15.554 46 + -37.6595 -15.571 45.646 + -36.6565 -15.588 45.39 + -35.6565 -15.581 45.409 + -34.6555 -15.565 45.648 + -33.6485 -15.533 46.073 + -32.6565 -15.52 46.28 + -31.6605 -15.527 46.153 + -30.6345 -15.582 45.601 + -29.6115 -15.597 45.172 + -28.6545 -15.616 44.916 + -27.6245 -15.649 44.487 + -26.6445 -15.667 44.186 + -25.6455 -15.684 43.86 + -24.6595 -15.701 43.685 + -23.6635 -15.692 43.805 + -22.6505 -15.665 44.247 + -21.6385 -15.637 44.727 + -20.6215 -15.608 45.19 + -19.6385 -15.586 45.48 + -18.6425 -15.564 45.736 + -17.6555 -15.545 45.917 + -16.6525 -15.539 46.023 + -15.6445 -15.529 46.065 + -14.6535 -15.527 46.143 + -13.6545 -15.508 46.389 + -12.6495 -15.489 46.591 + -11.6555 -15.491 46.64 + -10.6465 -15.499 46.634 + -9.6655 -15.487 46.199 + -8.6585 -15.605 46.175 + -49.6915 44.513 4.066 + -28.6825 21.768 13.485 + -14.7385 15.637 18.617 + -12.9385 14.978 19.278 + 3.4815 17.824 25.139 + 17.3525 17.775 30.125 + 23.9435 16.015 32.51 + 22.0775 16.55 31.835 + 18.2895 17.525 30.475 + 1.3395 -14.963 54.901 + 2.3545 -14.999 55.093 + 3.3505 -14.988 54.99 + 4.3225 -14.916 55.168 + 5.3505 -14.975 55.815 + 6.3475 -14.924 56.064 + 7.3505 -14.947 56.15 + 8.3425 -14.902 56.093 + 9.3455 -14.92 56.291 + 10.3415 -14.887 56.33 + 11.3435 -14.892 56.326 + 12.3425 -14.911 56.3 + 13.3415 -14.943 56.252 + 14.3425 -14.924 56.169 + 15.3425 -14.927 56.162 + 16.3405 -14.924 56.056 + 17.3305 -14.952 56.014 + 18.3205 -14.893 55.778 + 19.3365 -14.947 55.583 + 20.3195 -14.992 55.303 + 21.3225 -15.011 54.836 + 22.3355 -15.016 54.392 + 23.3275 -15.052 54.012 + 24.3345 -15.066 53.552 + 25.3265 -15.107 53.167 + 26.3255 -15.131 52.804 + 27.3175 -15.176 52.531 + 28.3105 -15.212 52.263 + 29.3215 -15.194 51.95 + -40.8755 44.55 26.1 + 41.6235 13.442 23.202 + 42.6125 12.098 24.999 + 34.3035 -15.325 49.394 + 35.3295 -15.333 49.052 + 36.3345 -15.34 48.92 + 37.3245 -15.347 48.975 + 38.3255 -15.35 48.894 + 39.3155 -15.373 48.632 + -16.6535 7.866 32.682 + 12.3545 8.141 40.526 + -57.6565 10.242 54.9 + -70.4105 -3.801 14.901 + -51.3335 -35.175 39.867 + -15.6275 65.563 -1.381 + 26.3375 10.869 37.405 + 55.1585 -3.275 1.723 + -6.1545 12.089 29.124 + 11.3525 13.592 35.846 + 59.0815 -11.478 23.708 + 52.6025 -13.377 -10.272 + -50.5035 45.015 29.953 + -54.6545 13.06 54.95 + -62.6225 28.471 50.12 + -54.6915 34.011 46.157 + 25.8145 20.968 18.795 + 53.1885 -8.101 33.176 + -62.6485 21.51 54.013 \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.readme new file mode 100644 index 00000000..efe3672a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.readme @@ -0,0 +1,69 @@ +############################################################################### +########################## README Datei zu kdtree.tri ############################ +############################################################################### + +Inhalt +====== + +1. Autor des Programmes + +2. Funktion des Programmes + +3. Bedienung und Ablauf des Programmes + +4. Beispieleingaben und erwartete Ausgaben + +############################################################################### + +1. Autor: Stephan Unkels + +############################################################################### + +2. Funktion des Programmes + + Das Programm erwartet eine Menge von 3D Punktdaten und erzeugt daraus eine + rumliche Datenstruktur, nmlich einen KD-Baum. Da die Daten als Float vorliegen, + werden sie mit 10000 multipliziert und der Rest einfach abgeschnitten. Da bei Triangle + der maximale Integer Wert bei 32767 liegt, war es ntig, eine "Klasse" Long zu + implementieren, die auch von Karsten Bamber (Gruppenmitglied) verwendet wird. + Allerdings in etwas abgewandelter Form. + Die Punktdaten werden dann je nach SplitAxis in zwei gleichgroe Teile unterteilt. + Dabei werden zuerst alle Punkte an der X-Achse geteilt, danach werden in jedem der + zwei neuen Teile alle Punkte an der Y-Achse geteilt usw.. + Das Programm ist beendet, wenn die Punktmengen soweit unterteilt sind, dass in jedem Knoten + nur noch 5 Punkte liegen. Dies sind dann also die Bltter des Baumes. + + + Da das Programm mehr als 1024 Instructions und mehr als 1024Bytes auf dem + Stack bentigt, muss der Compiler an folgenden Stellen gendert werden: + + TAM.Interpreter: + Zeile 31: static int[] data = new int[262144]; + Zeile 39: HB = 262144; // = upper bound of data array + 1 + + + TAM.Machine: + Zeile 59: public static Instruction[] code = new Instruction[32768]; + Zeile 66: PB = 32768, // = upper bound of code array + 1 + Zeile 67: PT = 32796; // = PB + 28 + + +############################################################################### + +3. Bedienung und Ablauf des Programmes + + Das Programm wird mit "java blafasel < bunny.off" gestartet, damit die Punkte aus der + Datei eingelesen werden knnen. Weitere Eingaben vom Benutzer sind dann nicht + mehr ntig. + + Im geschickten Archiv befindet sich schon eine genderte Compiler version. + Starten mit: run.bat kdtree.tri < bunny.off + + +############################################################################### + +4. Beispieleingaben und erwartete Ausgaben + + Eingabe aus der angegebenen Textdatei. + Ausgabe ist die sortierte Punktmenge. + \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.tri new file mode 100644 index 00000000..6b970538 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/kdtree.tri @@ -0,0 +1,538 @@ +let + +const maxLeaveSize ~ 5; + +type Float ~ record + vorKomma : Integer, + nachKomma : Integer +end; + +type Long ~ record + hi : Integer, + lo : Integer +end; + + +type Vertex ~ record + position : array 3 of Long +end; + +type KDTree ~ record + start : Integer, + stop : Integer, + splitAxis : Integer, + index : Integer +end; + + +var vertices : array 1000 of Vertex; +var anzVert : Integer; +var kdtree : array 511 of KDTree; + + +proc inkrement(var counter : Integer) ~ +begin + counter := counter + 1 +end; + + +!negiert eine Long Zahl +proc negLong(var l1 : Long) ~ +begin + l1.hi := (0 - 1) * l1.hi; + l1.lo := (0 - 1) * l1.lo +end; !netLong + +func isNeg(l1 : Long) : Boolean ~ + if l1.hi < 0 then + true + else + if l1.lo < 0 then + true + else + false; + + + +func lt(l1 : Long, l2 : Long) : Boolean ~ + if (l1.hi > l2.hi) then + false + else + + if (l1.hi < l2.hi) then + true + else + if (l1.lo < l2.lo) then + true + else + false; + + +func eq(l1 : Long, l2 : Long) : Boolean ~ + if (l1.hi = l2.hi) /\ (l1.lo = l2.lo) then + true + else + false; + + +proc magnitude(l1 : Long, var result : Long) ~ +begin + result := l1; + if isNeg(l1) then + negLong(var result) + else; + +end; + + +proc addLong(l1 : Long, l2 : Long, var result : Long) ~ +let + var tmp : Integer; + var sign : Boolean +in begin + if (isNeg(l2) /\ \ isNeg(l1)) \/ ( \ isNeg(l2) /\ isNeg(l1)) then begin + !sign wechsel + result.lo := l1.lo + l2.lo; + result.hi := l1.hi + l2.hi; + if (result.hi > 0) /\ (result.lo < 0) then + begin + result.lo := maxint + result.lo; + result.hi := result.hi - 1 + end + + else; + if (result.hi < 0) /\ (result.lo > 0) then + begin + result.lo := (maxint * (0 - 1)) + result.lo; + result.hi := result.hi + 1 + end + else; + end + else; + + if (isNeg(l1) /\ isNeg(l2)) then + if (((0 - 1) * maxint) - l1.lo) > l2.lo then + !ueberlauf + begin + result.hi := l2.hi + l1.hi; + result.hi := result.hi - 1; + result.lo := maxint + l1.lo + l2.lo + 1 + end + else + begin + result.hi := l2.hi + l1.hi; + result.lo := l2.lo + l1.lo + end + else; + + if ( \ isNeg(l1) /\ \ isNeg(l2)) then + if ( maxint - l1.lo) < l2.lo then + !ueberlauf + begin + result.hi := l2.hi + l1.hi; + result.hi := result.hi + 1; + result.lo := 0 - maxint + l1.lo + l2.lo - 1 + end + else + begin + result.hi := l2.hi + l1.hi; + result.lo := l2.lo + l1.lo + end + else; + +end; !addLong + + +proc subLong(l1 : Long, l2 : Long, var result : Long) ~ +let + var negierung : Long +in begin + negierung := l2; + !l2 negieren + negLong(var negierung); + addLong(l1, negierung, var result) +end; !subLong + +proc addLongInt(long : Long, int : Integer, var result : Long) ~ +let + var tmp : Long +in begin + + tmp.lo := int; + tmp.hi := 0; + addLong(long, tmp ,var result); + +end; !addLongInt + + +proc mulLong(l1 : Long, l2 : Long, var result : Long) ~ +let + var neg1 : Long; + var neg2 : Long; + var betrag : Long; + var count : Long; + + var tmp3 : Long +in begin + + neg1 := l1; + neg2 := l2; + result.lo := 0; + result.hi := 0; + negLong(var neg1); + negLong(var neg2); + if (isNeg(l1) /\ isNeg(l2)) then + mulLong(neg1, neg2, var result) + else; + + if ( \ isNeg(l1) /\ \ isNeg(l2)) then + begin + if lt(l1, l2) then + begin + count := l1; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, l2, var result) + end + end + else + begin + count := l2; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, l1, var result) + + end + end; + end + + else; + + if (isNeg(l2) /\ \ isNeg(l1)) \/ ( \ isNeg(l2) /\ isNeg(l1)) then + begin + if isNeg(l1) then + begin + magnitude(l1, var betrag); + if lt(betrag, l2) then + begin + count := neg1; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, neg2, var result) + + end + end + else + begin + count := l2; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, l1, var result) + + end + end + + end + else + begin + magnitude(l2, var betrag); + if lt(betrag, l1) then + begin + count := neg2; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, neg1, var result) + + end + + end + else + + begin + count := l1; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + addLongInt(count, 0 - 1, var count); + addLong(result, l2, var result) + end + + end + end + end + else; +end; !mulLong + +proc mulLongInt(long : Long, int : Integer, var result : Long) ~ +let + var tmp : Long +in begin + + tmp.lo := int; + tmp.hi := 0; + mulLong(long, tmp ,var result); + +end; !mulLongInt + + + + +!Teilt ein Long durch ein Integer und liefert ein Long als Ergebnis +!proc divLong(d1: Long, d2: Integer, var result: Long) ~ +!begin +! result.neg := false; +! result.hi := d1.hi / d2; +! result.lo := d1.lo / d2; +! if ((d1.neg) /\ (d2 > 0)) \/ ((\d1.neg) /\ (d2 < 0)) then +! result.neg := true +! else; +!end; !divLong + + + +proc showLong(zahl : Long) ~ +begin + putint(zahl.hi); + put(chr(27)); + putint(zahl.lo) +end; !showLong + + + + +proc pow(bias : Integer, exp : Integer, var result : Integer)~ +let + var count : Integer +in begin + count := exp; + result := 1; + while count > 0 do begin + result := result * bias; + count := count - 1 + end +end; + + +proc getIntFromChar(ch : Char, var result : Integer) ~ +begin + if (ord(ch) > 47) /\ (ord(ch) < 58) then + result := ord(ch) - 48 + else + result := 0 - 1; +end; + + + + +proc floatToLong(float : Float, var result : Long) ~ +begin + + result.lo := float.vorKomma; + result.hi := 0; + + mulLongInt(result, 10000, var result); + if float.vorKomma < 0 then + addLongInt(result, 0 - float.nachKomma, var result) + else + addLongInt(result, float.nachKomma, var result); + + + + +end; !floatToLong + + + + +proc readFloat(var result : Float) ~ +let + var ch : Char; + var foo : Integer; + var tmp : Integer; + var exp : Integer; + var count : Integer +in begin + count := 4; + foo := 0; + tmp := 0; + getint(var result.vorKomma); + + if result.vorKomma < maxint then + begin + while (foo >= 0) /\ (count > 0) do begin + count := count - 1; + get(var ch); + getIntFromChar(ch, var foo); + if foo >= 0 then begin + pow(10, count, var exp); + tmp := tmp + (foo * exp) + end + else; + end + end + else; + + result.nachKomma := tmp; + !float fertig lesen + while (foo >= 0) do begin + get(var ch); + getIntFromChar(ch, var foo) + end + +end; !readFloat + + +proc readVertex(var vert : Vertex) ~ +let + var f1 : Float; + var count : Integer; + var long : Long + +in begin + count := 0; + while count < 3 do begin + readFloat(var f1); + floatToLong(f1, var long); + vert.position[count] := long; + inkrement(var count) + end +end; + +proc showVertices() ~ +let + var count : Integer +in begin + count := 0; + while count < anzVert do begin + showLong(vertices[count].position[0]); + put(' '); + put(' '); + put(' '); + put(' '); + put(' '); + showLong(vertices[count].position[1]); + put(' '); + put(' '); + put(' '); + put(' '); + put(' '); + showLong(vertices[count].position[2]); + puteol(); + inkrement(var count) + end; +end; + +proc readOffFile() ~ +let + var vert : Vertex; + var count : Integer; + var long: Long +in begin + getint(var anzVert); + while count < anzVert do begin + readVertex(var vert); + vertices[count] := vert; + inkrement(var count) + end; + +end; !readOffFile + + +proc tauscheVertices(pos1 : Integer, pos2 : Integer) ~ +let + var tmp : Vertex +in begin + tmp := vertices[pos1]; + vertices[pos1] := vertices[pos2]; + vertices[pos2] := tmp +end; !TAUSCHEVERTICES() + + +proc findMedian(startPos : Integer, stopPos : Integer, rang : Integer, splitAxis : Integer) ~ +let + var tmp : Long; + var pMiddle : Integer; + var pBig : Integer; + var pNotyet : Integer; + var median : Long +in begin + pMiddle := startPos; + pBig := startPos; + pNotyet := startPos; + median := vertices[startPos].position[splitAxis]; + + + while pNotyet <= stopPos do begin + + if lt(vertices[pNotyet].position[splitAxis], median) then + begin + tauscheVertices(pMiddle, pNotyet); + tauscheVertices(pBig, pNotyet); + inkrement(var pMiddle); + inkrement(var pBig) + end + else + + if eq(median, vertices[pNotyet].position[splitAxis]) then + begin + tauscheVertices(pBig, pNotyet); + inkrement(var pBig) + end + else; + pNotyet := pNotyet + 1; + end; + + + + if (pBig - 1) < rang then begin + findMedian(pBig, stopPos, rang, splitAxis); + end + else + + if pMiddle > rang then + begin + findMedian(startPos, pMiddle - 1, rang, splitAxis) + end + else; + + +end; !FINDMEDIAN() + + + + +proc buildTree(start : Integer, stop : Integer, index : Integer, splitAxis : Integer) ~ +let + var median : Integer; + var tree : KDTree + +in begin + tree.start := start; + tree.stop := stop; + tree.splitAxis := splitAxis // 3; + median := ((stop - start) / 2 ) + start; + + + if (stop - start) > maxLeaveSize then + !SPLITTEN + begin + findMedian(start, stop, median , tree.splitAxis); + !LINKES KIND + buildTree(start, median, 2 * index + 1, tree.splitAxis + 1); + !RECHTES KIND + buildTree(median+1, stop, 2 * index + 2, tree.splitAxis + 1); + end + else + tree.splitAxis := 0-1; + + !BAUM IN ARRAY SPEICHERN + kdtree[index] := tree; + +end + + +in begin + + readOffFile(); + !showVertices(); + buildTree(0, anzVert - 1, 0, 0); + showVertices(); +end; \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/let.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/let.tri new file mode 100644 index 00000000..af89b1ca --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/let.tri @@ -0,0 +1,15 @@ +let + const MAX ~ 10; + const MIN ~ 4; + var n, m: Integer +in begin + n := 2 * MAX; + let + var q: Integer; + const MIN ~ MIN - 1 + in + q := 3 * n; + putint(n); + putint(MAX); + putint(MIN); +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.readme new file mode 100644 index 00000000..dad432bb --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.readme @@ -0,0 +1,83 @@ +Floating Point Library For Triangle +=================================== + +Author: Matthias Georgi +Mail: matti.georgi@gmail.com + +This library provides routines for floating point calculation. +For that purpose a Float record type is defined, which stores the mantisse +and the exponent of a floating point number as integers. The sign of +the number is recognized by the sign of the mantisse. + +type Float ~ + record + mnt: Integer, + exp: Integer + end; + +As integers are represented by JAVA shorts, we have to store the mantisse +in 15 bits. The exponent is calculated on the base of 2. So the value +of a floating point number may be expressed like + +mantisse * 2 ^ exponent + +We define 4 public procedures for Floats, which do fundamental +aritmetics: + + proc float(var x: Float, mnt: Integer, exp: Integer) + proc add(x: Float, y: Float, var result: Float) + proc sub(x: Float, y: Float, var result: Float) + proc mul(x: Float, y: Float, var result: Float) + proc div(x: Float, y: Float, var result: Float) + +These procedures perform normalization before and after processing. +There is still some inaccuracy in the division algorithm. +This can be fixed by rightshifting while testing +the last bit for zero. I tried to satisfy the parser with no success +(no language spec, just source code here). + + +Mandelbrot Printer +================== + +The program prints out a graphical representation of the mandelbrot set. +The calculation is somewhat limited as we +may overflow the Integer variables for large iterations. +The parameters may be changed in source code. + +The algorithm was adopted from Wikipedia: + +For each pixel on the screen do: +{ + x = x0 = x co-ordinate of pixel + y = y0 = y co-ordinate of pixel + + x2 = x*x + y2 = y*y + + iteration = 0 + maxiteration = 1000 + + while ( x2 + y2 < (2*2) AND iteration < maxiteration ) { + + y = 2*x*y + y0 + x = x2 - y2 + x0 + + x2 = x*x + y2 = y*y + + iteration = iteration + 1 + } + + if ( iteration == maxiteration ) + colour = black + else + colour = iteration +} + + +Compilation: +javac Triangle.Compiler mandelbrot.tri + +Run program: +java TAM.Interpreter diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.tri new file mode 100644 index 00000000..4c9fc4ec --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mandelbrot.tri @@ -0,0 +1,236 @@ +let + ! Stores the mantisse and exponent in base 2 + type Float ~ + record + mnt: Integer, + exp: Integer + end; + + ! ============== + ! Private procedures + ! ============== + + ! Print out in scientific notation. + proc print(x: Float) ~ + begin + putint(x.mnt); + put(' '); + put('*'); + put(' '); + put('2'); + put('^'); + putint(x.exp); + end; + + ! Compare two Floats and return true if x is greater than y. + func gt(x: Float, y: Float) : Boolean ~ + if x.exp > y.exp then true + else if x.exp = y.exp then x.mnt > y.mnt + else false; + + ! Compare two Floats and return true if x is less than y. + func lt(x: Float, y: Float) : Boolean ~ + if x.exp < y.exp then true + else if x.exp = y.exp then x.mnt < y.mnt + else false; + + ! Shift the mantisse to the right. + proc shr(var x: Float) ~ + begin + x.mnt := x.mnt / 2; + x.exp := x.exp + 1; + end; + + ! Shift the mantisse to the left. + proc shl(var x: Float) ~ + begin + x.mnt := x.mnt * 2; + x.exp := x.exp - 1; + end; + + ! Normalize float number. + ! Shift mantisse until it exceeds given limit. + proc normalizel(var x: Float, limit: Integer) ~ + if x.mnt = 0 then else + if x.mnt < 0 then + begin + x.mnt := 0 - x.mnt; + normalizel(var x, limit); + x.mnt := 0 - x.mnt + end + else while x.mnt < limit do shl(var x); + + proc normalizer(var x: Float, limit: Integer) ~ + if x.mnt = 0 then else + if x.mnt < 0 then + begin + x.mnt := 0 - x.mnt; + normalizer(var x, limit); + x.mnt := 0 - x.mnt + end + else while x.mnt > limit do shr(var x); + + ! Shift mantisse until both exponents have the same value. + proc adjust(var x: Float, var y: Float) ~ + begin + if x.exp < y.exp then + adjust(var y, var x) + else + while x.exp > y.exp do shr(var y); + end; + + ! ============== + ! Public procedures + ! ============== + + proc float(var x: Float, mnt: Integer, exp: Integer) ~ + begin + x.mnt := mnt; + x.exp := exp; + normalizel(var x, 16384); + end; + + ! Add x and y. Store result in given parameter. + proc add(a: Float, b: Float, var result: Float) ~ + let + var x: Float; + var y: Float + in + begin + x := a; + y := b; + normalizer(var x, 8192); + normalizer(var y, 8192); + adjust(var x, var y); + result.exp := x.exp; + result.mnt := x.mnt + y.mnt; + normalizel(var result, 16384); + end; + + ! Subtract x by y. Store result in given parameter. + proc sub(a: Float, b: Float, var result: Float) ~ + let + var x: Float; + var y: Float + in + begin + x := a; + y := b; + normalizer(var x, 8192); + normalizer(var y, 8192); + adjust(var x, var y); + result.exp := x.exp; + result.mnt := x.mnt - y.mnt; + normalizel(var result, 16384); + end; + + ! Multiply x by y. Store result in given parameter. + proc mul(a: Float, b: Float, var result: Float) ~ + let + var x: Float; + var y: Float + in + begin + x := a; + y := b; + normalizer(var x, 128); + normalizer(var y, 128); + result.exp := x.exp + y.exp; + result.mnt := x.mnt * y.mnt; + normalizel(var result, 16384); + end; + + ! Divide x by y. Store result in given parameter. + proc div(a: Float, b: Float, var result: Float) ~ + let + var x: Float; + var y: Float + in + begin + x := a; + y := b; + normalizel(var x, 16384); + normalizer(var y, 16384); + !Why doesn't the parser swallow this? + !while ((y.mnt & 1) = 0) do shr(var y); + result.exp := x.exp - y.exp; + result.mnt := x.mnt / y.mnt; + normalizel(var x, 16384); + end; + + var x1: Float; + var y1: Float; + var x: Float; + var y: Float; + var x0: Float; + var y0: Float; + var x2: Float; + var y2: Float; + var dx: Float; + var dy: Float; + var t: Float; + var c: Float; + var i: Integer; + var max: Integer; + var r: Float +in +begin + + float(var dx, 1, 0-5); + float(var dy, 1, 0-5); + + float(var y0, 0-1, 0); + float(var y1, 1, 0); + + while lt(y0, y1) do + begin + float(var x0, 0-1, 0); + float(var x1, 1, 0); + + while lt(x0, x1) do + begin + x := x0; + y := y0; + + mul(x, x, var x2); + mul(y, y, var y2); + + i := 0; + max := 10; + + add(x2, y2, var c); + + while (i < max) /\ (c.exp < 1) do + begin + mul(x, y, var y); + float(var t, 2, 0); + mul(y, t, var y); + add(y, y0, var y); + + sub(x2, y2, var x); + add(x, x0, var x); + + mul(x, x, var x2); + mul(y, y, var y2); + + i := i + 1; + + add(x2, y2, var c); + end; + + if i = max then + put(' ') + else + put('.'); + + add(x0, dx, var x0); + + end; + + puteol(); + + add(y0, dy, var y0); + end; + +end + \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.readme new file mode 100644 index 00000000..4239e8ac --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.readme @@ -0,0 +1,17 @@ +Autorin: + Elif Tekes + +Wunschgruppe: + Tomislav Greguric + Nabil Sayegh + +Erklrungen zum Programm: + +Eingabe: Ein Array aus Integer-Werten mit maximaler Lnge 80. + Im Eingabefenster wird pro Zeile ein Element eingegeben. + WICHTIG: Beenden der Eingabe mit 0 (0 ist nicht Element des Arrays) + +Das Array wird mit Hilfe vom MergeSort-Algorithmus sortiert und anschlieend ausgegeben. + + + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.tri new file mode 100644 index 00000000..0084dc47 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/mergesort.tri @@ -0,0 +1,134 @@ +let + + type IntArray ~ record + content: array 80 of Integer, + length: Integer + end; + + ! Liest Eingabe und speichert es in intarray + proc readArray(var intarray: IntArray) ~ + let + var i: Integer; + var testeof : Boolean + in begin + intarray.length := 0; + getint(var i); + eof(var testeof); + while i \= 0 /\ \ testeof do begin + intarray.content[intarray.length] := i; + intarray.length := intarray.length + 1; + getint(var i); + eof(var testeof); + end; + end; + + ! gibt Inhalt des Arrays auf den Bildschirm + proc writeArray(var intarray: IntArray) ~ + let + var i: Integer + + in begin + i := 0; + while i < intarray.length do begin + putint(intarray.content[i]); + i := i+1; + puteol() + end; + end; + + ! Teilt intarray in zwei Teile auf + ! intarray.length muss grer als 1 sein! + proc splitArray(var intarray: IntArray, var ia1: IntArray, var ia2: IntArray) ~ + let + var i: Integer; + var j: Integer + + in begin + i := 0; + j := intarray.length / 2; + + while i= 2 then begin + splitArray(var intarray, var ia1, var ia2); + mergesort(var ia1); + mergesort(var ia2); + mergeArray(var intarray, var ia1, var ia2) + end + else; + end; + + var intarray: IntArray + +in begin + readArray(var intarray); + puteol(); + mergesort(var intarray); + writeArray(var intarray); +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.indata new file mode 100644 index 00000000..9b0a9105 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.indata @@ -0,0 +1,4 @@ +a +b +cd +efg diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.outdata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.outdata new file mode 100644 index 00000000..cc4b38cf Binary files /dev/null and b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.outdata differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.readme new file mode 100644 index 00000000..dea81e39 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.readme @@ -0,0 +1,72 @@ +############################################################################### +########################## README Datei zu packen.tri ############################ +############################################################################### + +Inhalt +====== + +1. Autor des Programmes + +2. Funktion des Programmes + +3. Bedienung des Programmes + +4. Ablauf des Programmes + +############################################################################### + +1. Autor: Fabian Marx + +############################################################################### + +2. Funktion des Programms + +Meine Idee war es ein kleines Packprogramm zu schreiben. Dies war allerdings +schwieriger als gedacht. Insbesondere musste ich in Triangle nicht vorhandene +Funktionen nachbauen (z.B. Bitstrme). Herausgekommen ist ein Programm, +dass eine beliebig lange Datei (blockweise) einlesen kann, diese verarbeitet +und das Ergebnis in die Ausgabe schreibt. + +############################################################################### + +3. Bedienung des Programms + +java TAM.Interpreter packen.tri < readme.txt > out.txt + + +################################################################################ + +4. Ablauf des Programms + +Fr die Eingabe-Datei steht ein Char-Array zur Verfgung, +in das 245 Byte eingelesen werden. Die Berechnung basiert auf 4-Bit-Codewrtern, +die aus den Chars mit low und high extrahiert werden. + +Nur fr den ersten Block wird dann folgendes ausgefhrt: +1. Es werden alle 4-Bit-Codewrter gezhlt. Dies war ursprnglich fr die Berechnung +eines optimalen Huffmann-Codes gedacht. Der autmoatische Aufbau dieses Codes erwies +sich allerdings als zu kompliziert, so dass ich nun einen statischen Code benutze. +Diesen habe ich auf einem Blatt Papier erzeugt und die hier gezhlten Hufigkeiten +der Codewrter (fr verschiedene Dateien) als Basis genommen. + +2. Um dennoch eine Optimierung in der Ausgabe zu erreichen, werden die Hufigkeiten +sortiert und es entsteht eine Abbildung eines Codewortes auf den statischen +Huffmann-Code (schlielich im array code). So wird ein optimaler Huffmann-Code +approximiert. + +3. Diese Abbildung wird nun als erstes in die Ausgabe geschrieben. + +Nun beginnt die Verarbeitung jedes Eingabeblocks, indem die Code-Wrter jedes Chars +mit low und high ausgelesen werden und mit writeBits der entsprechende Huffmann-code +geschrieben wird. Zu bemerken ist dabei, dass die Prozedur putBit wie ein Bit-Buffer +aggiert und ein char mittels put schreibt, sobald sich 8 Bit angesammelt haben. + +Mittels einer while-Schleife wird der Vorgang wiederholt, bis eof erreicht ist. +Die gesamte Eingabe-Datei wurde so blockweise verarbeitet. + +Das Ergebniss der ganzen Prozedur hngt aber sehr stark von der Eingabedatei ab. +Am besten funktionieren natrlich Textdateien. + +Nhere Beschreibungen finden sich in den Kommentierungen des Quelltextes. + +########################################################################## \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.tri new file mode 100644 index 00000000..df32823c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/packen.tri @@ -0,0 +1,306 @@ +let + ! Array, in dem der aktuelle Eingabeblock gespeichert wird + var input : array 245 of Char; + ! Gibt den Fllstand des Eingabeblocks an. Besonders wichtig fr den letzten Block, der das Array nicht vollstndig ausfllt. + var iSize : Integer; + ! Eine Zeigervariable, die auf die aktuelle Position in input zeigt. + var iP : Integer; + + ! Diverse temporre Variablen + var tmpchar : Char; + var tmpint : Integer; + var i : Integer; + var j : Integer; + + ! Code wird benutzt um die Anzahl der Codewrter zu zhlen. + ! Mittels Vertauschung in sortiert wird die Abbildung von Huffmann-Code auf Code-Wort erzeugt + ! und schlielich wird mittels sortiert ein Code-Wort auf den Huffmann-Code abgebildet. + var code : array 16 of Integer; + var sortiert : array 16 of Integer; + + ! Liefert die unteren 4 Bits einer Integerzahl als Integer-Wert + ! z.B. 37 wird binr zu 0010.0101 unc low liefert dann integer(0101) = 5 + proc low(c : Integer, var l : Integer) ~ + l := c // 16; + + ! Analog zu low, nur dass die oberen 4 Bit als Integer-Wert zurck gegeben werden + proc high(c : Integer, var h : Integer) ~ + begin + h := c; + i := 0; + while i < 4 + do begin + if (h // 2) = 1 then + h := h - 1 + else ; + h := h / 2; + i := i + 1; + end; + end; + + + ! Um die Hufigkeiten der Code-Wrter zu sortieren benutze ich Bubble-Sort. + ! Dies ist die Tauschefunktion, die in dem Array die Werte der Position x und x + 1 vertauscht. + proc tausche(var a : array 16 of Integer, x : Integer) ~ + let + var t : Integer + in begin + t := a[x]; + a[x] := a[x + 1]; + a[x + 1] := t; + end; + + + ! Es ist ein Bitweises schreiben ntig. Um dies zu realisieren mssen solange Bits + ! zwischengespeichert werden, bis 8 Bits geschrieben wurden. Diese knnen dann + ! mit put auf die Ausgabe gelegt werde. + + ! Speichert die bisher geschriebenen Bits + var bitBuffer : Integer; + ! Gibt an, wie viel Bits schon geschrieben wurden + var bitBufP : Integer; + + ! Sammelt die zu schreibenden Bits in bitBuffer (mittels Shift-Operationen) + ! und schreibt schlielich das char (wenn 8 Bits gesammelt) + proc putBit(b : Boolean) ~ + begin + ! Um eine Stelle nach links shiften + bitBuffer := bitBuffer * 2; + + ! Mit einer 1 rechts auffllen, falls true geschrieben werden soll + if b = true then + bitBuffer := bitBuffer + 1 + else ; + + ! Fllstand im BitBuffer anpassen + bitBufP := bitBufP + 1; + + ! Wenn der BitBuffer voll ist, mittels put Zeichen schreiben und Buffer zurcksetzen + if bitBufP = 8 then + begin + put(chr(bitBuffer)); + bitBufP := 0; + bitBuffer := 0; + end else; + end; + + ! BitBuffer flushen, also char schreiben, auch wenn noch nicht 8 Bits gesammelt sind. + proc flushbitBuffer() ~ + begin + while bitBufP < 8 do + bitBuffer := bitBuffer * 2; + put(chr(bitBuffer)); + bitBufP := 0; + bitBuffer := 0; + end; + + + ! hcode ist die Darstellung eines einzelnen Huffmann-Code-Worts + type hcode ~ record + ! Gibt von links nach rechts die Bits an + bits : array 7 of Boolean, + ! Gibt an, wie viele Bits das H-Code-Wort hat. + valid : Integer + end; + + ! Alle 16 mglichen H-Code-Wrter werden in diesem Array gespeichert. + var huffmann : array 16 of hcode; + + + + ! HuffmannCode mit dem Index hc in Ausgabe (mittels BitBuffer) schreiben + proc writeBits(hc : Integer) ~ + let + var k : Integer + in begin + k := 0; + ! So lange Bit schreiben, bis alle gltigen Bits eines HF-Code-Worts geschrieben wurden + while k < huffmann[hc].valid + do begin + putBit(huffmann[hc].bits[k]); + k := k + 1; + end; + end; + + ! Gibt an, ob es sich um den ersten gelesenen Block handelt oder nicht. Wird nach dem ersten Durchlauf auf true gesetzt. + var firstRun : Boolean; + + ! Die Ermittlte Zuordnung Code-Wort -> Huffmann-Code wird in die Ausgabe geschrieben. + proc writeCodierung() ~ + begin + i := 0; + while i < 16 + do begin + put(chr(code[i])); + i := i + 1; + end + end; + + var testeof : Boolean + +in begin + ! Initalisierungen + iSize := 0; + iP := 0; + + bitBuffer := 0; + bitBufP := 0; + + firstRun := false; + + ! Array sortiert vorbereiten, um Permutation zu erreichen + i := 0; + while i < 16 + do begin + sortiert[i] := i; + i := i + 1; + end; + + ! Darstellung des verwendetetn statischen Huffmann-Code + ! Aus Beispieldokumenten habe ich folgende Hufigkeiten erhalten: + ! 0: 128, 1: 62, 2: 236, 3: 153, 4: 214, 5: 144, 6: 372, 7: 195, 8: 27, 9: 54, 10: 33, 11: 19, 12: 95, 13: 63, 14: 77, 15: 88 + ! Aus diesen Werte habe ich diese Codierung erzeugt (nach Huffmann) + ! In diesem Array steht die Codierung nach Hufigkeit der Code-Wrter aufsteigend sortiert. + huffmann := [ + { bits ~ [true,true,true,true,true,true,true], valid ~ 7}, ! CodeWort fr 11 + { bits ~ [true,true,true,true,true,true,false], valid ~ 7}, ! CodeWort fr 8 + { bits ~ [true,true,true,true,true,false,false], valid ~ 6}, ! CodeWort fr 10 + { bits ~ [false,true,true,true,true,false,false], valid ~ 5}, ! CodeWort fr 9 + { bits ~ [false,true,true,true,false,false,false], valid ~ 5}, ! CodeWort fr 1 + { bits ~ [true,false,true,true,true,false,false], valid ~ 5}, ! CodeWort fr 13 + { bits ~ [true,false,true,true,false,false,false], valid ~ 5}, ! CodeWort fr 14 + { bits ~ [true,true,true,true,false,false,false], valid ~ 5}, ! CodeWort fr 15 + { bits ~ [false,true,true,false,false,false,false], valid ~ 4}, ! CodeWort fr 12 + { bits ~ [true,false,true,false,false,false,false], valid ~ 4}, ! CodeWort fr 0 + { bits ~ [true,true,false,true,false,false,false], valid ~ 4}, ! CodeWort fr 5 + { bits ~ [true,true,false,false,false,false,false], valid ~ 4}, ! CodeWort fr 3 + { bits ~ [true,true,true,false,false,false,false], valid ~ 4}, ! CodeWort fr 7 + { bits ~ [false,true,false,false,false,false,false], valid ~ 3},! CodeWort fr 4 + { bits ~ [true,false,false,false,false,false,false], valid ~ 3},! CodeWort fr 2 + { bits ~ [false,false,true,false,false,false,false], valid ~ 2} ! CodeWort fr 6 + ]; + + + ! Solange weitermachen, bis Dateiende erreicht wurde + eof(var testeof); + while \testeof + do begin + ! Der Eingabeblock wird gelesen und in input gespeichert + iP := 0; + eof(var testeof); + while (iP < 245) /\ \testeof + do begin + get(var input[iP]); + iP := iP + 1; + eof(var testeof); + end; + + ! Fllmenge des Buffers setzen + iSize := iP; + + ! Dieser Teil wird nur beim ersten Block ausgefhrt + ! Es wird die Hufigkeit der einzelnen Code-Wrter gezhlt und aufsteigend sortiert + ! Es entsteht dadurch eine Zuordnung von aktuellem Code-Wort zu dem obigen Huffman-Code + ! Ich versuche so einen optimalen Huffman-Code zu approximieren. + if \firstRun then + begin + ! Codeanzahl zhlen und in code speichern + iP := 0; + tmpint := 0; + while iP < iSize + do begin + low(ord(input[iP]),var tmpint); + code[tmpint] := code[tmpint] + 1; + high(ord(input[iP]),var tmpint); + code[tmpint] := code[tmpint] + 1; + iP := iP + 1; + end; + + ! Codeanzahlen ausgeben +! i := 0; +! while i < 16 +! do begin +! puteol(); +! putint(i); +! put(':'); +! putint(code[i]); +! i := i + 1; +! end; +! puteol(); + + ! Code-Array sortieren mit Bubblesort + i := 0; + while i < 16 + do begin + j := 0; + while j < 15 + do begin + if code[j] > code[j+1] then + begin + tausche(var code, j); + tausche(var sortiert, j); + end + else; + j := j + 1; + end; + i := i + 1; + end; + + + ! Abbildung: Code Wort in Quelltext -> Huffman-Codewort erstellen (Abbildungsrichtung von sortiert wird umgedreht) + i := 0; + while i < 16 + do begin + code[sortiert[i]] := i; + i := i + 1 + end; + + ! Sortierten Code ausgeben (z.B. fr Debugging) +! i := 0; +! while i < 16 +! do begin +! puteol(); +! put('c'); +! putint(i); +! put(':'); +! putint(code[i]); +! i := i + 1 +! end; + + writeCodierung(); + + ! Den vorangegangenen Teil fr die nchsten Blcke nicht mehr ausfhren + firstRun := true; + end else ; + + ! Ausgabe schreiben, indem fr jedes Char im input-Array zunchst + ! high ermittelt wird und mittels writeBits der zugehrige H-Code geschrieben wird + ! und das gleiche fr low getan wird. + iP := 0; + while iP < iSize + do begin + high(ord(input[iP]), var tmpint); +! Debugging-Ausgaben +!puteol(); +!put('h'); +!putint(ord(input[iP])); +!put(','); +!putint(tmpint); +!put(','); +!putint(code[tmpint]); + writeBits(code[tmpint]); + low(ord(input[iP]), var tmpint); +! Debugging-Ausgaben +!put(','); +!put('l'); +!putint(ord(input[iP])); +!put(','); +!putint(tmpint); +!put(','); +!putint(code[tmpint]); + writeBits(code[tmpint]); + iP := iP + 1; + end; + eof(var testeof); + end; +end; \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/pre.txt b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/pre.txt new file mode 100644 index 00000000..102f4c3e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/pre.txt @@ -0,0 +1 @@ +ABCDEFGHIJKL \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.readme new file mode 100644 index 00000000..f3532ce0 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.readme @@ -0,0 +1,28 @@ +Gruppe: Jan Sinschek + Benjamin Otto + Anselm Foehr + + +* Programm "prime": + + Autor: Anselm Foehr + + Beschreibung: Das Programm findet einen Faktor der Eingabe (nicht zwingend prim) + mit Hilfe des einfachen Pollard-Rho-Verfahrens. + Gerechnet wird auf dem Datentyp BigInt, dieser kann 32 Ziffern lang + werden. + + Benutzung: + java Triangle/Compiler prime.tri + java TAM/Interpreter obj.tam + < Eingabe der zu faktorisierenden Zahl + > Ausgabe des ersten Primfaktors + + Beispiel Eingabe: 177777 + Beispiel Ausgabe: 9 + + Beispiel Eingabe: 6667 + Beispiel Ausgabe: 59 + + Beispiel Eingabe: 123451 + Beispiel Ausgabe: 41 (dauert) diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.tri new file mode 100644 index 00000000..66b52203 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/prime.tri @@ -0,0 +1,360 @@ +! +! Abgabe Gruppe: +! Jan Sinschek +! Benjamin Otto +! Anselm Foehr +! +! Programm: +! Autor: Anselm Foehr +! Beschreibung: +! Das Programm berechnet eine Primfaktorzerlegung nach dem einfachen +! Pollard-Rho-Verfahren. +! Gerechnet wird auf dem Datentyp BigInt, dieser kann 32 Ziffern lang +! werden. +! +! Benutzung: +! java Triangle/Compiler prime.tri +! java TAM/Interpreter obj.tam +! < Eingabe der zu faktorisierenden Zahl +! > Ausgabe des ersten Primfaktors +! +! WARNUNG: Extrem langsam fuer groessere Zahlen! +! +let +const MAXLENGTH ~ 32; + +! big (unsigned) integer +type BigInt ~ record + digit : array 32 of Integer, + length : Integer +end; + +! print a bigint to stdout +proc putbigint(x : BigInt) ~ +let + var i : Integer +in begin + i := x.length - 1; + while i >= 0 do begin + putint(x.digit[i]); + i := i - 1; + end +end; + +! return the absolute value of Integer x +func abs(x : Integer) : Integer ~ + if x < 0 then 0-x + else x; + +! create a BigInt from an Integer +proc int2bigint(i : Integer, var result : BigInt) ~ +let + var tmp : Integer; + var j : Integer +in begin + j := 0; + tmp := abs(i); + result.length := 1; + + if i = 0 then + result.digit[0] := 0 + else; + + while tmp > 0 do begin + result.digit[j] := tmp // 10; + tmp := tmp / 10; + j := j + 1; + end; + result.length := j; +end; + +! result = x == 1 +func beq1(x : BigInt) : Boolean ~ + (x.length = 1) /\ (x.digit[0] = 1); + +! result = x > 1 +func bgt1(x : BigInt) : Boolean ~ + (x.length > 1) \/ (x.digit[0] > 1); + +! result = x > 0 +func bgt0(x : BigInt) : Boolean ~ + (x.length > 1) \/ (x.digit[0] \= 0); + +! result = x == y +proc beq(x : BigInt, y : BigInt, var result : Boolean) ~ +let + var i : Integer +in begin + if x.length \= y.length then + result := false + else begin + result := true; + i := x.length - 1; + while i >= 0 /\ result do begin + if x.digit[i] \= y.digit[i] then begin + result := false; + end else ; + i := i - 1; + end + end +end; + +! result = x > y +proc bgt(x : BigInt, y : BigInt, var result : Boolean) ~ +let + var i : Integer; + var check : Boolean +in begin + i := x.length - 1; + result := false; + + if x.length > y.length then + result := true + else if x.length = y.length then begin + check := true; + while i >= 0 /\ check do begin + if x.digit[i] < y.digit[i] then begin + result := false; + check := false; + end else if x.digit[i] > y.digit[i] then begin + result := true; + check := false; + end else + i := i - 1; + end + end else result := false +end; + +! result = x + y +proc badd(x : BigInt, y : BigInt, var result : BigInt) ~ +let + var carry : Integer; + var t1: BigInt; + var t2: BigInt; + var i : Integer +in begin + carry := 0; + if x.length < y.length then begin + t2 := x; + t1 := y; + end else begin + t1 := x; + t2 := y; + end; + i := 0; + while i < t1.length do begin + result.digit[i] := (t1.digit[i] + t2.digit[i] + carry) // 10; + carry := (t1.digit[i] + t2.digit[i] + carry) / 10; + i := i + 1; + end; + if carry = 1 then begin + result.digit[i] := 1; + result.length := i + 1; + end else + result.length := i; +end; + +! result = x + y * 10 ^ z +proc badd10(x : BigInt, y : BigInt, z : Integer, var result : BigInt) ~ +let + var t1: BigInt; + var i : Integer +in begin + i := MAXLENGTH - 1; + t1 := y; + while (i - z) >= 0 do begin + t1.digit[i] := t1.digit[i - z]; + i := i - 1; + end; + while i >= 0 do begin + t1.digit[i] := 0; + i := i - 1; + end; + t1.length := y.length + z; + badd(x, t1, var result); +end; + +! result = |x - y| +proc bsub(x : BigInt, y : BigInt, var result : BigInt) ~ +let + var carry : Integer; + var lastCarry : Integer; + var length: Integer; + var bool: Boolean; + var t1: BigInt; + var t2: BigInt; + var i : Integer +in begin + bgt(x, y, var bool); + if bool then begin + t1 := x; + t2 := y; + end else begin + t2 := x; + t1 := y; + end; + + carry := 0; + if t1.length > t2.length then + length := t1.length + else + length := t2.length; + + i := 0; + while i < length do begin + lastCarry := carry; + if t1.digit[i] < (t2.digit[i] + carry) then + carry := 1 + else + carry := 0; + result.digit[i] := (10 * carry + t1.digit[i]) + - (t2.digit[i] + lastCarry); + i := i + 1; + end; + while result.digit[i - 1] = 0 do + i := i - 1; + result.length := i; +end; + + +! result = x * (int)y +proc bimul(x : BigInt, y : Integer, var result : BigInt) ~ +let + var tmp: BigInt; + var i : Integer +in begin + i := y; + result.length := 1; + result.digit[0] := 0; + while i > 0 do begin + badd(result, x, var tmp); + result := tmp; + i := i - 1; + end +end; + +! result = x * y +proc bmul(x : BigInt, y : BigInt, var result : BigInt) ~ +let + var tmp: BigInt; + var tmp2: BigInt; + var i : Integer +in begin + i := 0; + result.digit[0] := 0; + result.length := 1; + while i < y.length do begin + bimul(x, y.digit[i], var tmp); + badd10(x, tmp, i, var result); + i := i + 1; + end +end; + + +! result = x % y +proc bmod(x : BigInt, y : BigInt, var result : BigInt) ~ +let + var tmp : BigInt; + var tmp2 : BigInt; + var bool : Boolean +in begin + result := x; + bgt(result, y, var bool); + while bool do begin + if result.length > (y.length + 1) then begin + bimul(y, 10, var tmp); + bsub(result, tmp, var tmp2); + result := tmp2; + end else begin + bsub(result, y, var tmp); + result := tmp; + end; + bgt(result, y, var bool); + end +end; + +! result = gcd(x, y) +proc bgcd(x : BigInt, y : BigInt, var result : BigInt) ~ +let + var bool : Boolean; + var a : BigInt; + var b : BigInt; + var tmp : BigInt +in begin + a := x; b := y; + beq(x, y, var bool); + while \ bool do begin + bgt(a, b, var bool); + if bool then begin + bsub(a, b, var tmp); + a := tmp; + end else begin + bsub(b, a, var tmp); + b := tmp; + end; + beq(a, b, var bool); + end; + result := a; +end; + +! ireduzibles polynom fuer pollard-rho +proc f(x : BigInt, a : BigInt, n : BigInt, var result : BigInt) ~ +let + var tmp : BigInt +in begin + bmul(x, x, var result); + badd(result, a, var tmp); + bmod(tmp, n, var result); +end; + +! pollardrho verfahren +proc pollardrho(n : BigInt) ~ +let + var x : BigInt; + var y : BigInt; + var d : BigInt; + var a : BigInt; + var tmp : BigInt; + var bool : Boolean; + var run : Boolean +in begin + int2bigint(1, var a); + int2bigint(2, var x); + int2bigint(2, var y); + int2bigint(1, var d); + run := true; + while beq1(d) /\ run do begin + f(x, a, n, var tmp); + x := tmp; + f(y, a, n, var tmp); + y := tmp; + f(y, a, n, var tmp); + y := tmp; + + bsub(x, y, var tmp); + bgcd(tmp, n, var d); + + put('.'); + + bgt(n, d, var bool); + if bgt1(d) /\ bool then begin + putbigint(d); + run := false + end else ; + beq(d, n, var bool); + if bool then begin + put('f'); + run := false + end else ; + end +end; + + +var n : Integer; +var b1: BigInt +in begin + put('f');put('a');put('c');put('t');put('o');put('r');put(':'); + getint(var n); + int2bigint(n,var b1); + pollardrho(b1); +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/proc.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/proc.tri new file mode 100644 index 00000000..92276129 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/proc.tri @@ -0,0 +1,13 @@ +let + var f : Integer; + var g : Integer; + var n : Integer; + proc p() ~ begin f := 2*g; g := g+1 end +in begin + n := 1; f := 2; g := 3; + while n < 10 do begin + p(); + n := n + 1 + end; + putint(f); puteol(); putint(g) +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.readme new file mode 100644 index 00000000..4bf2ee15 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.readme @@ -0,0 +1,41 @@ +Autor: + Sayegh, Nabil + +Wunschgruppe: + Greguric, Tomislav + Tekes, Elif + +Funktion: + Es handelt sich um einen minimalst raytracer. + Es gibt eine Kugel, ein Fenster und einen Beobachter. + Reflektionen sind noch nicht implementiert und Leuchtquellen gibt es auch keine. + + Der Raytracer wird wiederholt aufgerufen, gewissermassen als Animation. + Das Fenster entfernt sich vom Beobachter, dadurch sieht das Objekt groesser aus. + +Hilfsfunktionen: + Quadratwurzelberechnung (ganzzahlig) + Loesung quadratischer Gleichungen + +Bedienung: + Alle Parameter sind hardcoded, zwichen + !START EDITING HERE + und + !END EDITING HERE + +Beispieleingaben: + siehe Code + +Erwartete Ausgabe: + 3-Dimensionale Darstellungen der Kugel als (Pseudo-)Animation + Die Zahlenwerte geben die z-Koordinate an. + Bei einer Kugel erwarten wir, dass das Zentrum naeher am Beobachter ist, als die aeussen Bereiche, + d.h. in der Mitte muessen kleinere Zahlen sein als aussen. + + Interessanterweise veraendert sich die Zahl im Mittelpunkt nicht, + das ist aber korrekt, schliesslich verschieben wir das Fenster, und nicht die Kugel! + +Bemerkung: + Da maxint leider nur 32768 betraegt, und Quadrierungen vorkommen, + koennen die Werte nur begrenzt vergroessert werden. Das laesst leider + auch keinen echten Spielraum fuer Fixpunkt schiebereien. diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.tri new file mode 100644 index 00000000..0b3c595a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/raytracer.tri @@ -0,0 +1,235 @@ +let + type Vektor ~ record + x: Integer, + y: Integer, + z: Integer + end; + + ! _ _ + ! (x - m)^2 = r^2 + ! + type Kugel ~ record + m: Vektor, ! Mittelpunkt + r: Integer ! Radius + end; + + ! _ _ + ! o + lambda * p + ! + type Gerade ~ record + o: Vektor, ! Ort + p: Vektor ! Richtung + + end; + + ! Subtraktion von Vektoren + proc sub(a: Vektor, b: Vektor, var ret: Vektor) ~ + begin + ret.x := a.x - b.x; + ret.y := a.y - b.y; + ret.z := a.z - b.z; + end; + + ! skalen in gerade Einsetzen um Koordinaten rauszubekommen + proc geradeEinsetzen(g: Gerade, lambda: array 2 of Integer, var ret: array 2 of Vektor) ~ + let + var i: Integer + in + begin + i:=0; + while (i<2) do + begin + ret[i].x := g.o.x + (lambda[i] * g.p.x); + ret[i].y := g.o.y + (lambda[i] * g.p.y); + ret[i].z := g.o.z + (lambda[i] * g.p.z); + i:=i+1; + end + end; + + ! print padded + proc putintPadded(value: Integer) ~ + begin +! if (value <= 99) then +! putint(0) +! else +! ; + if (value <= 9) then + putint(0) + else + ; + putint(value); + end; + + ! Quadratwurzel + proc sqrt(x: Integer, var ret: Integer) ~ + let + var tmp: Integer + in + begin + tmp:=(x+1) / 2; + ret:=0; + while (tmp>ret) do + begin + tmp:=tmp-ret; + ret:=ret+1 + end + end; + + ! Loesung quadratischer Gleichungen der Form ax^2 + bx + c = 0 + ! max 2 Loesungen + proc solvesq(a: Integer, b:Integer, c: Integer, var ret: array 2 of Integer, var success: Boolean) ~ + let + var p: Integer; + var q: Integer; + var d: Integer + in + begin + p:=b/a; + q:=c/a; + + if (((p/2)*(p/2))-q < 0) then + success:=false + else + begin + success:=true; + sqrt(((p/2)*(p/2))-q, var d); + ret[0]:=0-(p/2)-d; + ret[1]:=0-(p/2)+d; + + ! putint(ret[0]); + ! put(' '); + ! putint(ret[1]); + ! put(' '); + ! put(' '); + end + ; + end; + + var a: Integer; + var b: Integer; + var c: Integer; + + var tmp: Vektor; + var success: Boolean; + var lambda: array 2 of Integer; + var schnittpunkte: array 2 of Vektor; + +! START EDITING HERE +! START EDITING HERE +! START EDITING HERE +! START EDITING HERE + + !Dimensionen des Fensters, Position und Richtung sind erstmal nicht aenderbar + !Die Mitte des Fensters befindet sich bei 0/0 + const WIDTH ~ 15; + const HEIGHT ~ 15; + + var k: Kugel; + var g: Gerade; + + var frame: Integer + +in begin + frame:=0; + while (frame<7) do + begin + frame:=frame+1; + + k.m.x:=0; + k.m.y:=0; + + g.o.x:=0; + g.o.y:=0; + + k.r:=75; !Kugelradius + + k.m.z:=150; !Entfernung der Kugel vom Fenster + tmp.z:=frame; !Entfernung des Fensters (Animation, die Distanz Beobachter<->Fenster wird groesser, dadurch sieht das Objekt groesser aus) + g.o.z:=0; !Entfernung des Betrachters vom Fenster + + !Beobachter und Sicht + + +! STOP EDITING HERE +! STOP EDITING HERE +! STOP EDITING HERE +! STOP EDITING HERE + + + !erst Zeilen, dann Spalten + tmp.y:=(HEIGHT/2+1); + while tmp.y > (0-(HEIGHT/2)) do begin + tmp.x:=0-(WIDTH/2); + while tmp.x < (WIDTH/2+1) do begin + ! Berechne den Richtungsvektor des Beobachters durchs Fenster + sub(tmp, g.o, var g.p); + + ! Kugel mit Strahl schneiden und quadratische Gleichung bestimmen + a:= (g.p.x * g.p.x) + + (g.p.y * g.p.y) + + (g.p.z * g.p.z); + + b:= ((g.o.x+(0-k.m.x))*2*g.p.x) + + ((g.o.y+(0-k.m.y))*2*g.p.y) + + ((g.o.z+(0-k.m.z))*2*g.p.z); + + c:= (g.o.x * g.o.x ) + + (g.o.x *(0-k.m.x)) + + (g.o.x *(0-k.m.x)) + + ((0-k.m.x)*(0-k.m.x)) + + + (g.o.y * g.o.y ) + + (g.o.y *(0-k.m.y)) + + (g.o.y *(0-k.m.y)) + + ((0-k.m.y)*(0-k.m.y)) + + + (g.o.z * g.o.z ) + + (g.o.z *(0-k.m.z)) + + (g.o.z *(0-k.m.z)) + + ((0-k.m.z)*(0-k.m.z)) - + + (k.r*k.r); + + solvesq(a,b,c, var lambda, var success); + geradeEinsetzen(g, lambda, var schnittpunkte); + + ! Wir wollen nur Schnittpunkte sehen, die jenseits des Fensters liegen + + if (success) then + if ((schnittpunkte[0].z > tmp.z) /\ + (schnittpunkte[1].z > tmp.z)) then + if (schnittpunkte[0].z < + schnittpunkte[1].z) then + putintPadded(schnittpunkte[0].z/10) + else + putintPadded(schnittpunkte[1].z/10) + else + if (schnittpunkte[0].z > tmp.z) then + putintPadded(schnittpunkte[0].z/10) + else + if (schnittpunkte[1].z > tmp.z) then + putintPadded(schnittpunkte[1].z/10) + else + begin + put(' '); + put(' '); +! put(' '); + end + else + begin + put(' '); + put(' '); +! put(' '); + end + ; + + put(' '); + tmp.x:=tmp.x+1; + end; + + ! Zeilenende, weiter mit naechster Zeile + puteol(); + tmp.y:=tmp.y-1; + end; + end +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-err1.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-err1.tri new file mode 100644 index 00000000..ddda245b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-err1.tri @@ -0,0 +1,12 @@ +! [file: repeat-err1.tri, started: 23-Apr-2004] +! Testing repeat/until-statement. +! error: repeat's expression is not a boolean. + +let + var i: Integer +in begin + repeat + i := i+1 + until i; + putint(i); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-sum.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-sum.tri new file mode 100644 index 00000000..b95f33fb --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/repeat-sum.tri @@ -0,0 +1,20 @@ +! [file: repeat-sum.tri, started: 22-Apr-2004] +! Testing repeat/until-statement. +! Compute the sum(1+...+n) for an integer n. + +let + var n: Integer; + var i: Integer; + var sum: Integer +in begin + getint(var n); + i := 0; + sum := 0; + repeat + begin + i := i+1; + sum := sum+i; + end + until (i>=n); + putint(sum); +end; diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/reverseline.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/reverseline.tri new file mode 100644 index 00000000..c912cd53 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/reverseline.tri @@ -0,0 +1,42 @@ +let + + type Line ~ record + content: array 80 of Char, + length: Integer + end; + + ! reads a line from the standard input + proc readLine(var line: Line) ~ + let + var ch: Char + in begin + line.length := 0; + get(var ch); + while \ eol() /\ \ eof() do begin + line.content[line.length] := ch; + line.length := line.length + 1; + get(var ch); + end; + end; + + ! writes the reversed line to the standard output + proc putReversedLine(line: Line) ~ + let + var i: Integer + in begin + i := line.length; + while i > 0 do begin + i := i-1; + put(line.content[i]) + end; + puteol(); + end; + + var line: Line + +in begin + while \ eof () do begin + readLine(var line); + putReversedLine(line); + end; +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.readme new file mode 100644 index 00000000..7aead77e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.readme @@ -0,0 +1,134 @@ +############################################################################### +########################## README Datei zu rsa.tri ############################ +############################################################################### + +Inhalt +====== + +1. Autor des Programmes + +2. Funktion des Programmes + +3. Bedienung und Ablauf des Programmes + +4. Beispieleingaben und erwartete Ausgaben + +############################################################################### + +1. Autor: Karsten Bamberg + +############################################################################### + +2. Funktion des Programmes + + Das Programm "rsa.tri" ist eine Implementierung des Public Key Verschls- + selungsverfahrens RSA. Es verschlsselt Texte von bis zu 60 Zeichen Lnge + in einer Art Blockchiffre, wobei immer 3 Zeichen des Klartextes in einen + Schlsseltextblock der Lnge 4 kodiert werden. Das Eingabealphabet besteht + aus den 26 Kleinbuchstaben des deutschen Alphabets und dem Leerzeichen. + Wird ein ungltiges Zeichen eingegeben, so ignoriert das Programm darauf + folgende Eingaben. Nachdem die Verschlsselung abgeschlossen ist besteht + die Mglichkeit einen geheimen Schlssel einzugeben, mit dem der gerade + verschlsselte Text wieder entschlsselt wird. + + Das Programm verwendet eine Long-Datenstruktur, die aus 2 Integer-Werten, + einem low- und einem high-Teil, besteht. Diese Implementierung war ntig, + um mit Zahlen rechnen zu knnen die grer als 32767 sind. Stephan Unkels + verwendet in seinem Programm "kdtree.tri" ebenfalls die Long-Datenstruktur + in "voller" Form. In diesem Programm musste sie wegen der, durch den + Compiler begrenzten Anzahl an Instruktionen auf die ntigsten Funktionen + und Operationen reduziert werden und untersttzt nur noch positve Zahlen. + +############################################################################### + +3. Bedienung und Ablauf des Programmes + + Nach dem Start erwartet das Programm die Eingabe des ffentlichen Schls- + sels, mit dem verschlsselt werden soll. Der Schlssel wird im Form von + zwei, durch ein Leerzeichen getrennten, Integer-Werten eingegeben. Die + erste dieser Zahlen ist das Produkt n zweier Primzahlen p und q. Dieses + sollte fr "rsa.tri" im Bereich von 20000 bis 32767 liegen. Die zweite Zahl + des Tupels ist der Verschlsselungsexponent e. Fr ihn muss gelten + 1 < e < (p - 1) * (q - 1) und gcd(e, (p - 1) * (q - 1)) = 1, wobei gcd der + grte gemeinsame Teiler ist. Nach einem weiteren Leerzeichen folgt die + Eingabe des zu verschlsselnden Textes. Dieser kann bis zu 60 Zeichen lang + sein. Die Eingabe wird mit "Return" oder "Enter" besttigt. Das Programm + berechnet nun den Schlsseltext und gibt diesen auf der Konsole aus. Danach + wird die nchste Eingabe vom Benutzer erwartet. Es muss wieder ein Tupel + von zwei Integer-Werten eingegeben werden, nmlich noch einmal das Prim- + zahlenprodukt n, gefolgt vom geheimen Schlssel d, mit dessen Hilfe der + verschlsselte Text wieder entschlsselt werden soll. Auch fr d muss gel- + ten 1 < d < (p - 1) * (q - 1). Berechnen kann man d aus der Gleichung + d * e = 1 mod (p - 1) * (q - 1). Wenn man nur den ffentlichen Schlssel + (n, e) kennt, kann man das nur dann, wenn man n faktorisieren kann. + Nach Besttigung der Eingabe mit "Return" oder "Enter" startet die Ent- + schlsselung, der entschlsselte Text wird auf der Konsole ausgegeben und + das Programm wird beendet. + +############################################################################### + +4. Beispieleingaben und erwartete Ausgaben + + Man whlt die Primzahlen p = 211 und q = 151. Es ergibt sich n = 31861. Als + Verschlsselungsexponent wird e = 101 gewhlt. Der zugehrige geheime + Schlssel ist d = 18401. Die Eingabe und Ausgabe auf der Konsole sieht + folgendermaen aus: + + ============================================ + 31861 101 der erste mai ist frei (n e Klartext) + + abrxa wo zgl nitamli ykm hlc d u (Schlsseltext) + + 31861 18401 (n d) + der erste mai ist frei (entschlsselter Klartext) + ============================================ + + Mit falschem geheimen Schlssel wird der Klartext nicht richtig dekodiert: + + ============================================ + 31861 101 der erste mai ist frei + + abrxa wo zgl nitamli ykm hlc d u + + 31861 15333 + ?abbxpcbo?vh~yu?vgeozlb + ============================================ + ########################################################################### + + Ein Beispiel mit ffentlichem Schlssel (n, e) = (20651, 10519) und + geheimem Schlssel d = 20263: + + ============================================ + 20651 10519 compiler optimieren macht spass + + wdk aqn ubt xbm efc tgq eii sjp lt acy wuj + + 20651 20263 + compiler optimieren macht spass + ============================================ + + Mit falschem Schlssel: + + ============================================ + 20651 10519 compiler optimieren macht spass + + wdk aqn ubt xbm efc tgq eii sjp lt acy wuj + + 20651 12345 + gcdrittfn{ggtec{ncp dvutgquostens + ============================================ + ########################################################################### + + Weitere Beispiele fr mgliche Schlssel sind: + + (n, e) = (27317, 17), d = 6305 + (n, e) = (29719, 73), d = 14873 + (n, e) = (23183, 521), d = 2105 + + Es knnen auch beliebige eigene Schlssel verwendet werden, sofern sie die + in Abschnitt 3 genannten Bedingungen fr den ffentlichen und geheimen + Schlssel erfllen. + +############################################################################### +##################### Ende der README Datei zu rsa.tri ######################## +############################################################################### \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.tri new file mode 100644 index 00000000..3f285a54 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rsa2.tri @@ -0,0 +1,357 @@ +let + +!############################################################################## +!############## Datenstruktur "Long" mit Grundrechenoperationen ############### +!############################################################################## + +type Long ~ record + hi: Integer, + lo: Integer +end; + +!Funktion "less than" +func lt(l1: Long, l2: Long): Boolean ~ + if (l1.hi <= l2.hi) /\ (l1.lo < l2.lo) then + true + else + false; + +!Inkrementiert eine POSITIVE Long-Zahl +proc incrLong(var nr: Long) ~ +begin + if nr.lo < maxint then + nr.lo := nr.lo + 1 + else begin + nr.hi := nr.hi + 1; + nr.lo := 0 + end +end; !incrLong + +!Dekrementiert eine POSITIVE Long-Zahl wenn sie grer 0 ist +proc decrLong(var nr: Long) ~ +begin + if nr.lo > 0 then + nr.lo := nr.lo - 1 + else if nr.hi > 0 then begin + nr.hi := nr.hi - 1; + nr.lo := maxint + end else; +end; !decrLong + +!Addition zweier POSITIVER Long-Zahlen +proc addLong(l1: Long, l2: Long, var result: Long) ~ +begin + result.lo := 0; + result.hi := 0; + if ( maxint - l1.lo) < l2.lo then + !ueberlauf + begin + result.hi := l2.hi + l1.hi; + result.hi := result.hi + 1; + result.lo := 0 - maxint + l1.lo + l2.lo - 1 + end + else + begin + result.hi := l2.hi + l1.hi; + result.lo := l2.lo + l1.lo + end +end; !addLong + +!Multiplikation zweier POSITIVER Long-Zahlen +proc mulLong(l1: Long, l2: Long, var result: Long) ~ +let + var count: Long +in begin + result.lo := 0; + result.hi := 0; + if lt(l1, l2) then + begin + count := l1; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + decrLong(var count); + addLong(result, l2, var result) + end + end + else + begin + count := l2; + while ((count.hi > 0) \/ (count.lo > 0)) do begin + decrLong(var count); + addLong(result, l1, var result) + end + end +end; !mulLong + +!Berechnet den Rest der Division eines Long durch einen Integer +proc modLong(d1: Long, d2: Integer, var result: Long) ~ +let + var temp: Long +in begin + temp := d1; + result.lo := 0; + result.hi := 0; + while temp.hi > 0 do begin + result.lo := result.lo - d2; + if result.lo < 0 then begin + temp.hi := temp.hi - 1; + result.lo := (result.lo + maxint) + 1 + end else; + end; + result.lo := result.lo // d2; + temp.lo := temp.lo // d2; + if result.lo <= (maxint - temp.lo) then + result.lo := (result.lo + temp.lo) // d2 + else + result.lo := ((result.lo - d2) + temp.lo) // d2; +end; !modLong + +!Gibt eine Long Zahl aus +proc showLong(zahl: Long) ~ +begin + putint(zahl.hi); + put(chr(44)); + putint(zahl.lo); +end; !showLong + +!############################################################################## +!####################### Ende der "Long" Datenstruktur ######################## +!############################################################################## + + type CharMsg ~ record + content: array 60 of Char, + length: Integer + end; + + type IntMsg ~ record + content: array 80 of Integer, + length: Integer + end; + + var msg: CharMsg; + var crypt: CharMsg; + var exp: Integer; + var n: Integer; + var d: Integer; + + var testeof : Boolean; + var testeol : Boolean; + + ! reads a line from the standard input + proc readLine(var line: CharMsg) ~ + let + var ch: Char + in begin + line.length := 0; + get(var ch); + eol(var testeol); + eof(var testeof); + while (\ testeol /\ \ testeof) /\ \(ord(ch) = 13) do begin + line.content[line.length] := ch; + line.length := line.length + 1; + get(var ch); + eol(var testeol); + eof(var testeof); + end; + end; + + !Konvertiert eine Zeile bis zum ersten "ungltigen" Zeichen in interne Reprsentation + proc convertLine(line: CharMsg, var conline: IntMsg) ~ + let + var i: Integer; + var tmp: Integer + in begin + conline.length := line.length; + i := 0; + tmp := ord(line.content[i]); + !Solange "Leerzeichen" oder "a - z" gelesen wird konvertieren + while ((tmp = 32) \/ ((96 < tmp) /\ (tmp < 123))) /\ (i < 60) do begin + if tmp = 32 then + conline.content[i] := 0 + else + conline.content[i] := tmp - 96; + i := i + 1; + tmp := ord(line.content[i]) + end + end; + + !bersetzt eine Int-Zeile in Char-Reprsentation zurck + proc reconvertLine(line: IntMsg, var conline: CharMsg) ~ + let + var i: Integer; + var tmp: Integer + in begin + i := 0; + tmp := line.content[i]; + while i < line.length do begin + if tmp = 0 then + conline.content[i] := chr(32) + else + conline.content[i] := chr(tmp + 96); + i := i + 1; + tmp := line.content[i] + end; + conline.length := line.length + end; + + !Gibt eine CharMsg-Zeile auf der Konsole aus + proc writeCharLine(line: CharMsg) ~ + let + var i: Integer + in begin + i := 0; + while i < line.length do begin + put(line.content[i]); + i := i + 1; + end; + puteol() + end; + + !Exponentiation mit Modulo-Berechnung + proc powmod(var base: Long, var exp: Integer, mod: Integer, var result: Long) ~ + begin + result.lo := 1; + result.hi := 0; + while exp > 0 do begin + !Wenn aktueller Exponent ungerade ist Basis * aktuelles Ergebisnis berechnen + if exp // 2 = 1 then begin + mulLong(result, base, var result); + modLong(result, mod, var result); + end else; + !Basis quadrieren und Exponent halbieren + mulLong(base, base, var base); + modLong(base, mod, var base); + exp := exp / 2 + end + end; + + !RSA-Verschlsselung in Blcken + !Jeweils 3 Zeichen Klartext werden zu 4 Zeichen Schlsseltext kodiert + proc encrypt(plain: CharMsg, var crypt: CharMsg) ~ + let + var plainint: IntMsg; + var cryptint: IntMsg; + var i: Integer; + var j: Integer; + var tmpexp: Integer; + var value: Long; + var result: Long + in begin + + !Zhler initialisieren + i := 0; + j := 0; + + !Zeile von Char in Int-Reprsentation konvertieren + convertLine(plain, var plainint); + + !Lngenattribute setzen + plainint.length := plainint.length + (3 - (plainint.length // 3)); + cryptint.length := (plainint.length / 3) * 4; + + !Solange es noch Zeichen zu kodieren gibt nchsten Block verschlsseln + while i < plainint.length do begin + tmpexp := exp; + + !Jeweils 3 Zahlen als eine der Basis 27 interpretieren + value.hi := 0; + value.lo := ((plainint.content[i] * 27) * 27) + + (plainint.content[i + 1] * 27) + + plainint.content[i + 2]; + + !Value verschlsseln + powmod(var value, var tmpexp, n, var result); + + !Verschlsselte Zahl wieder zur Basis 27 in cryptint schreiben + cryptint.content[j] := result.lo / ((27 * 27) * 27); + cryptint.content[j + 1] := (result.lo // ((27 * 27) * 27)) / (27 * 27); + cryptint.content[j + 2] := (result.lo // (27 * 27)) / 27; + cryptint.content[j + 3] := result.lo // 27; + + !Zhler erhhen + i := i + 3; + j := j + 4 + end; + + !Verschlsselte Nachricht wieder in Char-Reprsentation schreiben + reconvertLine(cryptint, var crypt); + end; + + !RSA-Entschlsselung + !Schlsseltextblcke werden wieder entschlsselt + proc decrypt(crypt: CharMsg, var plain: CharMsg) ~ + let + var plainint: IntMsg; + var cryptint: IntMsg; + var i: Integer; + var j: Integer; + var tmpexp: Integer; + var value: Long; + var result: Long + in begin + + !Zhler initialisieren + i := 0; + j := 0; + + !Zeile von Char in Int-Reprsentation konvertieren + convertLine(crypt, var cryptint); + + !Lngenattribut setzen + plainint.length := (cryptint.length / 4) * 3; + + !Solange noch nicht alles dekodiert ist weiter entschlsseln + while i < cryptint.length do begin + tmpexp := d; + + !Jeweils 4 Zahlen als eine der Basis 27 interpretieren + value.hi := 0; + value.lo := (((cryptint.content[i] * 27) * 27) * 27) + + ((cryptint.content[i + 1] * 27) * 27) + + (cryptint.content[i + 2] * 27) + + cryptint.content[i + 3]; + + !Value entschlsseln + powmod(var value, var tmpexp, n, var result); + + !Entschlsselte Zahl wieder zur Basis 27 in plainint schreiben + plainint.content[j] := result.lo / (27 * 27); + plainint.content[j + 1] := (result.lo // (27 * 27)) / 27; + plainint.content[j + 2] := result.lo // 27; + + !Zhler erhhen + i := i + 4; + j := j + 3 + end; + + !Entschlsselte Nachricht wieder in Char-Reprsentation schreiben + reconvertLine(plainint, var plain) + end + +in begin + + !Einlesen des ffentlichen Schlssels + getint(var n); + getint(var exp); + + !Einlesen der zu verschlsselnden Nachricht + readLine(var msg); + puteol(); + + !Verschlsseln + encrypt(msg, var crypt); + + !Verschlsselten Text ausgeben + writeCharLine(crypt); + puteol(); + + !Geheimen Schlssel einlesen + getint(var n); + getint(var d); + + !Entschlsseln + decrypt(crypt, var msg); + + !Entschlsselte Nachricht ausgeben + writeCharLine(msg) + +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rwset.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rwset.tri new file mode 100644 index 00000000..9288b96e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/rwset.tri @@ -0,0 +1,42 @@ +let + ! genrwset: decl {x.0} + var x : Integer; + ! genrwset: decl {y.1} + var y : Integer; + + ! genrwset: decl {k.2, l.3} read {k.2,l.3,y.1} write {k.2,y.1} + proc foo (var k : Integer, l : Integer) ~ + let + ! genrwset: decl {o.4} + var o : Integer; + + ! genrwset: decl {k.5,l.6} read {k.5,l.6,y.1} write {k.5,y.1} + proc bar (var k : Integer, l : Integer) ~ + let + ! genrwset: decl {dummy.7} + var dummy : Integer + in begin + ! genrwset: read {l.6,y.1} write {k.5} + k := l * y; + ! genrwset: read {k.5} write {y.1} + y := k + 1 + end + + in begin + ! genrwset: read {l.3} write {o.3} + o := l * 2; + ! genrwset: read (k.2,o.3,y.1} write {k.2,y.1} + bar(var k, o) + end + + +in begin + ! genrwset: write {x.0} + x := 42; + ! genrwset: read {x.0,y.1} write {x.0,y.1} + foo(var x, 3); + ! genrwset: read {x.0} + putint(x); + ! genrwset: read {y.1} + putint(y) +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.readme new file mode 100644 index 00000000..d4622dd9 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.readme @@ -0,0 +1,178 @@ +SAT-Solver von Patrick Frankenberger + +sat.tri lst das Erfllbarkeitsproblem fr beliebige Klauselmengen in konjunktiver Normalform mit dem Davis-Putnam Algorithmus und gibt eine Belegung der Variablen aus die die Klauselmenge erfllt. + +Die Eingabedaten orientieren sich dabei am Format das in http://www.intellektik.informatik.tu-darmstadt.de/SATLIB/ verwendet wird, Kommentarzeilen werden nicht untersttzt, statt der Beschreibungszeile wird nur die Zahl der Variablen gelesen und als letzter Unterschied muss nach der letzten Klausel eof folgen. + +Wegen mangelnder Freispeicherverwaltung in Triangle sind die Obergrenzen der Anzahl der Variablen, Klauseln und Klausellngen im Programmtext fest eingetragen. +Variablen: max 104 +Klauseln: max 550 +Klausellnge: max 4 + +Weiterhin bentigt sat.tri eine Modifikation von TAM.Interpreter, da eine Speicherobergrenze von 1024 viel zu gering fr sinnvolle Problemgren ist. Mit 15.000 funktioniert es, die angefgte Interpreter.java Version hat aber 63*1024 als Obergrenze. + +Je nach Eingabegre und Schwierigkeit der Eingabe variiert die Laufzeit zwischen "sofort fertig" und "viele Minuten". + +Beispieleingabe (20 Variablen, 91 Klauseln): +20 +-14 -9 1 0 +6 11 -15 0 +13 12 -4 0 +-17 16 -3 0 +2 17 7 0 +5 -1 11 0 +9 20 19 0 +-17 13 16 0 +-12 -19 -18 0 +-6 19 14 0 +14 -12 -2 0 +-13 5 -16 0 +-16 4 9 0 +-13 15 9 0 +8 16 -5 0 +3 1 4 0 +-20 17 -6 0 +-12 -3 -16 0 +-10 -6 14 0 +4 18 -8 0 +-8 6 3 0 +12 -7 9 0 +-19 -18 -16 0 +-8 -17 5 0 +-16 -9 1 0 +18 -20 -8 0 +10 -19 9 0 +-5 15 -17 0 +-7 -6 5 0 +-5 10 2 0 +16 2 10 0 +17 12 -20 0 +11 -6 -7 0 +11 -18 5 0 +12 1 -7 0 +5 7 9 0 +-9 2 -5 0 +7 12 8 0 +-11 17 -2 0 +2 1 15 0 +-17 15 -6 0 +19 8 15 0 +18 -11 -8 0 +11 -15 13 0 +-10 18 19 0 +-14 20 6 0 +-9 -10 -16 0 +13 4 19 0 +-16 17 -14 0 +-17 -3 -15 0 +3 -7 17 0 +-18 11 20 0 +-18 -15 1 0 +15 -13 -7 0 +-19 8 -15 0 +8 7 -18 0 +10 8 4 0 +-12 -19 -1 0 +1 13 11 0 +-19 -20 -10 0 +4 2 1 0 +15 -17 18 0 +15 -17 4 0 +-7 8 -13 0 +12 9 -4 0 +9 4 18 0 +5 3 2 0 +1 -20 9 0 +13 2 -3 0 +18 19 -1 0 +12 -4 16 0 +6 -14 7 0 +12 20 9 0 +-10 19 -4 0 +9 3 -12 0 +7 -17 15 0 +-5 3 -20 0 +1 20 -9 0 +12 4 15 0 +-12 -11 -19 0 +6 -12 -7 0 +-11 -12 3 0 +1 -10 12 0 +-13 18 17 0 +8 -16 -3 0 +-12 -2 -19 0 +-11 1 -2 0 +17 -2 -8 0 +-17 -14 -7 0 +20 15 14 0 +-18 -8 -6 + +Beispielausgabe: +91 clauses +Testing 1 +Testing 2 +Testing 3 +Testing 4 +Testing 5 +Testing 6 +Testing 7 +Testing 8 +Testing 9 +Testing 7 +Testing 8 +Testing 9 +Testing 10 +Testing 8 +Testing 9 +Testing 10 +Testing 6 +Testing 5 +Testing 6 +Testing 7 +Testing 8 +Testing 7 +Testing 8 +Testing 9 +Testing 10 +Testing 8 +Testing 9 +Testing 4 +Testing 5 +Testing 6 +Testing 7 +Testing 8 +Testing 8 +Testing 9 +Testing 10 +Testing 11 +Testing 12 +Testing 13 +Testing 14 +Testing 15 +Testing 16 +Testing 17 +Testing 18 +Testing 19 +Testing 20 +Testing 21 +solution: +1=T +2=T +3=F +4=T +5=T +6=T +7=F +8=T +9=T +10=F +11=F +12=F +13=T +14=T +15=T +16=T +17=T +18=F +19=T +20=F \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.tri new file mode 100644 index 00000000..05cf5296 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat.tri @@ -0,0 +1,161 @@ +let + proc inc(var x : Integer) ~ + x:=x+1; + + func abs(a : Integer) : Integer ~ + if a<0 then 0-a else a; + + type Clause ~ + record + length : Integer, + content : array 4 of Integer + end; + + type CList ~ + record + length : Integer, + content : array 550 of Clause + end; + + type asgn ~ array 105 of Char; ! can be _T_rue, _F_alse, _U_ndefined or X=free + + var numvars : Integer; + var A : asgn; + var P : CList; + var state : Char; !can be _R_unning, _D_one or _C_onflict + + proc printit (Asn: asgn) ~ + let var i:Integer + in begin + i:=1; + while i<=numvars do + begin + putint(i);put('=');put(Asn[i]);put(' ');puteol(); + inc(var i) + end + end; + + proc initA() ~ + let var i : Integer + in begin + getint(var numvars); + while i<105 do + begin + if(i<=numvars) then + A[i]:='X' + else + A[i]:='U'; + inc(var i) + end + end; + + ! reads one clause + proc readclause() ~ + let var literal : Integer + in begin + getint(var literal); + while \ (literal = 0) do + begin + P.content[P.length].content[P.content[P.length].length] := literal; ! buffer overflow here !!! + inc(var P.content[P.length].length); + getint(var literal) + end + end; + + ! boolean clause propagation, finds implied values of variables or conflicts + proc bcpi(var A : asgn) ~ + let var i : Integer; var j:Integer; var sat : Boolean; + var ind: Integer;var aind:Integer; + var cl : Clause; var numfree : Integer + in begin + i:=0; + while (state='R') /\ (i0) /\ (A[aind]='T')) then + sat:=true + else; + inc(var j) + end; + if numfree=1 /\ (\sat) then begin + !putint(6666);put(' ');putint(i);puteol(); + j:=0; + while j < cl.length do + begin + ind := cl.content[j]; + aind := abs(ind); + if (A[aind]='X') /\ (ind>0) then A[aind]:='T' else; + if (A[aind]='X') /\ (ind<0) then A[aind]:='F' else; + inc(var j) + end; + end else; + if (numfree=0) /\ (\sat) then + begin + !putint(7777); put(' ');putint(i);puteol(); + state:='C' end + else; + inc(var i) + end + end; + + ! lets set some variables to some values and look what happens ;) + ! backtrack if conflicts arise + proc deci(var A :asgn, i : Integer) ~ + let proc decir(var A : asgn, i : Integer) ~ + let var pa : asgn + in begin + !putint(8800); putint(i); puteol(); + if i=(numvars+1) then begin + put('s');put('o');put('l');put('u');put('t');put('i');put('o');put('n');put(':'); puteol(); + printit(A); state:='D' end + else begin + !putint(8810); putint(i); puteol(); + pa := A; + state:='R'; + pa[i]:='T'; bcpi(var pa); + if state='R' then deci(var pa,i+1) else; + if \(state='D') then begin + !putint(8820); putint(i); puteol(); + pa := A; + state:='R'; + pa[i]:='F'; bcpi(var pa); + if state='R' then deci(var pa,i+1) else + end + else + end + end + in begin + put('T');put('e');put('s');put('t');put('i');put('n');put('g'); put(' '); putint(i); puteol(); + if \(state='D') then + if (\(A[i]='X')) /\ (i<=numvars) then deci(var A,i+1) + else decir(var A,i) + else; + end; + + proc solveit () ~ + begin + state:='R'; + deci(var A,1); + end; + + var testeof : Boolean +in + begin + initA(); + eof(var testeof); + while \ testeof do + begin + readclause(); + inc(var P.length); + eof(var testeof); + end; + putint(P.length);put(' ');put('c');put('l');put('a');put('u');put('s');put('e');put('s');puteol(); + solveit(); + end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat0.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat0.indata new file mode 100644 index 00000000..fceb1b75 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat0.indata @@ -0,0 +1,4 @@ +3 +1 -2 3 0 +-1 -2 3 0 +-1 -2 -3 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat1.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat1.indata new file mode 100644 index 00000000..a9cdf028 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat1.indata @@ -0,0 +1,430 @@ +100 +33 -47 -53 0 +75 -76 -83 0 +43 -75 -92 0 +1 47 91 0 +-1 16 67 0 +-19 -20 -35 0 +-11 51 52 0 +-12 -64 -91 0 +-8 17 -21 0 +2 -13 80 0 +-41 -64 -85 0 +42 67 -89 0 +-6 81 -94 0 +2 8 88 0 +-18 74 -98 0 +-27 37 -46 0 +32 34 -41 0 +1 70 -75 0 +27 -62 94 0 +74 -83 86 0 +24 73 94 0 +21 -70 -87 0 +5 -19 -71 0 +-62 -74 91 0 +-11 55 -75 0 +44 -61 -95 0 +-35 -47 74 0 +-69 -91 96 0 +10 -65 66 0 +9 -59 100 0 +36 -44 51 0 +-16 59 -75 0 +-1 -69 90 0 +-8 38 -71 0 +-13 22 -99 0 +-50 -51 84 0 +-5 72 83 0 +30 33 -38 0 +-12 -39 -60 0 +27 62 -98 0 +28 48 58 0 +-33 -59 99 0 +-27 -33 -60 0 +-32 72 97 0 +61 -64 -78 0 +1 61 85 0 +9 46 -57 0 +-13 -29 81 0 +20 78 -91 0 +21 83 -94 0 +4 32 -51 0 +-33 61 -69 0 +44 -64 -98 0 +7 -73 99 0 +-18 -27 -57 0 +39 -74 -91 0 +59 73 87 0 +14 21 75 0 +44 -45 -88 0 +-26 -73 -97 0 +34 -38 94 0 +23 -37 -91 0 +49 -72 -98 0 +23 26 86 0 +-24 -41 -78 0 +-19 -85 95 0 +37 61 92 0 +5 56 85 0 +-22 -65 92 0 +-25 -26 40 0 +-6 -11 60 0 +3 -41 100 0 +22 -25 35 0 +25 63 91 0 +-23 87 92 0 +-44 -50 72 0 +26 77 -91 0 +2 14 -43 0 +37 -82 87 0 +36 64 73 0 +31 82 89 0 +-52 -69 89 0 +22 -37 52 0 +3 49 89 0 +-34 -47 -74 0 +-5 -25 -42 0 +7 -23 -82 0 +25 -66 69 0 +-19 -72 87 0 +19 29 51 0 +11 16 59 0 +-2 51 -90 0 +-19 -76 -89 0 +54 71 -100 0 +4 9 -38 0 +30 -42 58 0 +61 69 89 0 +5 -13 -66 0 +48 52 67 0 +-2 -8 87 0 +-13 -67 -91 0 +-71 75 78 0 +-2 -26 96 0 +1 65 99 0 +-11 59 71 0 +19 -20 -41 0 +-21 -22 43 0 +-20 32 -43 0 +1 -9 39 0 +3 24 -73 0 +-22 80 -97 0 +-11 -60 93 0 +41 42 78 0 +-12 19 67 0 +31 37 -47 0 +-23 25 27 0 +-45 72 -92 0 +-18 -23 -63 0 +22 -33 -100 0 +-30 -39 -91 0 +29 60 69 0 +6 -33 65 0 +42 52 -69 0 +-43 -54 -86 0 +-20 24 41 0 +-42 56 -82 0 +-10 69 72 0 +20 -47 -59 0 +20 -25 77 0 +27 -39 55 0 +-36 41 67 0 +72 -73 76 0 +-20 -77 -86 0 +34 -41 74 0 +-13 -73 77 0 +24 74 -92 0 +-21 -39 80 0 +-22 -49 -60 0 +3 26 -55 0 +40 44 58 0 +-49 -57 -80 0 +25 55 73 0 +19 -38 -99 0 +-28 35 43 0 +28 -75 -91 0 +-34 -45 71 0 +41 -79 -93 0 +56 -87 -91 0 +-25 -46 83 0 +-37 -76 -89 0 +-4 -15 41 0 +-6 -61 -64 0 +32 62 -98 0 +-10 97 -98 0 +-8 55 68 0 +28 32 42 0 +-26 -73 -75 0 +-15 -55 -61 0 +33 -75 -95 0 +-48 -76 98 0 +-78 -85 -93 0 +9 78 96 0 +14 78 -96 0 +15 -26 42 0 +38 -79 -87 0 +-14 -74 -95 0 +-1 40 47 0 +-4 17 26 0 +-25 51 -71 0 +-26 -74 -99 0 +-70 -82 -96 0 +31 -73 81 0 +5 -62 85 0 +10 23 -75 0 +-45 -66 69 0 +9 70 84 0 +82 91 95 0 +27 -62 91 0 +40 -45 58 0 +27 -29 45 0 +52 -57 -100 0 +44 55 -69 0 +-18 53 82 0 +-47 -51 83 0 +-48 -87 95 0 +22 43 100 0 +42 82 89 0 +-19 22 39 0 +6 16 -69 0 +24 -55 62 0 +-9 48 -86 0 +-26 32 74 0 +25 -52 91 0 +59 -91 93 0 +-91 92 -95 0 +-3 -55 85 0 +35 64 71 0 +26 -28 -87 0 +12 -27 75 0 +-11 39 97 0 +-7 20 -50 0 +-8 -40 -61 0 +-10 -18 24 0 +-59 62 75 0 +30 40 -52 0 +8 16 -53 0 +-29 -47 -95 0 +-83 97 -99 0 +-38 -42 83 0 +42 -66 -76 0 +10 13 -67 0 +-9 44 69 0 +-28 34 -69 0 +-1 -46 -84 0 +-45 -80 -92 0 +23 -66 -98 0 +17 40 47 0 +32 45 -85 0 +20 -36 -94 0 +6 -30 45 0 +32 74 -96 0 +15 73 100 0 +11 21 -99 0 +20 40 -43 0 +47 52 -53 0 +11 58 85 0 +47 -54 -59 0 +68 91 -93 0 +-40 65 81 0 +17 50 97 0 +-58 71 93 0 +-4 45 53 0 +4 80 -82 0 +36 -46 84 0 +22 -54 96 0 +9 -18 66 0 +-39 44 49 0 +17 58 100 0 +17 54 62 0 +27 62 -90 0 +8 -79 -91 0 +2 -29 -59 0 +67 71 -89 0 +46 -49 -71 0 +27 74 -97 0 +62 69 73 0 +76 82 90 0 +4 43 -65 0 +38 43 53 0 +13 44 -98 0 +32 59 68 0 +-26 87 100 0 +-16 -83 90 0 +-10 -20 -35 0 +-2 3 7 0 +59 75 89 0 +-5 44 95 0 +-56 73 -91 0 +34 45 -77 0 +6 73 -92 0 +15 17 -86 0 +-21 24 50 0 +-11 41 -70 0 +-38 70 96 0 +-37 -61 100 0 +-31 -41 -72 0 +31 -33 52 0 +67 -90 99 0 +27 57 97 0 +39 -77 -81 0 +-4 -88 89 0 +-41 -52 53 0 +23 25 -58 0 +-20 -29 77 0 +52 -70 90 0 +4 61 70 0 +-43 58 79 0 +6 -63 -93 0 +44 84 89 0 +31 -42 53 0 +-32 54 -65 0 +-55 71 84 0 +-34 -45 48 0 +2 57 76 0 +28 -44 48 0 +-13 -24 73 0 +-19 48 -69 0 +19 -63 -97 0 +-33 90 -96 0 +-55 -87 -92 0 +19 -56 -84 0 +-7 70 80 0 +-18 -42 -100 0 +18 -92 -96 0 +-28 38 96 0 +18 44 -100 0 +4 72 -100 0 +-40 -79 -100 0 +-39 64 -91 0 +-9 40 71 0 +-21 24 25 0 +-26 45 82 0 +-23 65 -80 0 +31 -52 -59 0 +-9 -42 59 0 +13 -18 -60 0 +-33 35 49 0 +-57 -58 -67 0 +13 -51 83 0 +7 74 -96 0 +12 57 83 0 +-33 -55 -95 0 +-5 10 84 0 +-1 -18 -80 0 +-33 -76 -87 0 +-23 58 65 0 +-20 -74 81 0 +-6 10 33 0 +-14 21 39 0 +9 50 56 0 +85 -91 96 0 +36 -50 -71 0 +33 -36 85 0 +23 37 99 0 +-30 39 -53 0 +-32 -41 -53 0 +-76 -81 87 0 +1 -14 -34 0 +35 51 65 0 +48 -87 93 0 +-39 48 79 0 +-41 61 89 0 +52 -68 -74 0 +20 40 54 0 +-61 -96 -100 0 +27 30 75 0 +21 -73 81 0 +30 92 -99 0 +35 -37 -98 0 +-23 -37 62 0 +4 14 -39 0 +58 -65 -86 0 +1 -3 90 0 +-11 46 62 0 +64 -67 -93 0 +24 73 85 0 +28 -60 -97 0 +47 50 -77 0 +41 -68 89 0 +-43 -83 90 0 +53 -78 -89 0 +-10 40 59 0 +14 78 94 0 +81 -84 98 0 +-45 75 98 0 +-15 -40 82 0 +9 28 35 0 +1 17 79 0 +-38 44 -78 0 +7 27 93 0 +9 -11 90 0 +39 55 95 0 +-59 69 79 0 +1 -7 58 0 +18 -23 38 0 +-13 49 87 0 +1 -21 -53 0 +65 79 -89 0 +-18 -25 -87 0 +35 46 50 0 +8 37 -79 0 +-49 -94 98 0 +11 -42 77 0 +-54 65 67 0 +-8 52 -71 0 +9 -40 52 0 +1 -5 -32 0 +16 -70 91 0 +-13 -64 94 0 +22 -42 98 0 +73 78 -92 0 +-16 -91 98 0 +28 40 -70 0 +8 35 -49 0 +17 -52 62 0 +9 36 -39 0 +-34 -72 -84 0 +51 -65 -94 0 +25 -53 -90 0 +-14 21 -28 0 +4 -33 -83 0 +-21 39 67 0 +-16 -56 -63 0 +-79 -85 99 0 +55 79 86 0 +-50 -88 95 0 +61 94 100 0 +-28 29 62 0 +25 -66 -75 0 +24 46 -60 0 +-16 -48 93 0 +-14 -74 91 0 +18 37 75 0 +-42 55 -88 0 +21 55 -88 0 +-20 -25 90 0 +28 -50 71 0 +46 52 88 0 +8 29 86 0 +7 -52 99 0 +15 -74 -79 0 +12 -18 95 0 +44 -57 93 0 +-47 71 -87 0 +34 -58 -68 0 +-23 40 -87 0 +-4 -41 -99 0 +-4 9 -80 0 +15 -34 80 0 +-73 -75 86 0 +42 -43 -97 0 +-51 68 77 0 +22 54 -85 0 +3 73 91 0 +-3 -13 -26 0 +28 -76 91 0 +3 22 -64 0 +-49 75 91 0 +69 -77 100 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat2.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat2.indata new file mode 100644 index 00000000..1d3c1e75 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat2.indata @@ -0,0 +1,101 @@ +50 +-9 17 50 0 +17 20 -50 0 +17 -20 -50 0 +-9 -17 39 0 +-9 -17 -39 0 +9 29 43 0 +9 -29 43 0 +9 10 -43 0 +-10 -27 -43 0 +4 -10 -43 0 +-4 -6 -10 0 +-4 11 -16 0 +6 -11 -16 0 +-4 6 26 0 +11 -26 39 0 +6 -11 39 0 +-26 32 38 0 +32 -38 -39 0 +12 -26 -32 0 +-12 25 -39 0 +-13 -25 -32 0 +7 -12 -25 0 +-7 28 49 0 +-7 -25 49 0 +-7 33 -49 0 +8 -33 -49 0 +1 -8 -49 0 +-1 -8 21 0 +-1 5 36 0 +-5 -8 36 0 +-1 -14 -36 0 +-21 -36 -50 0 +14 24 -36 0 +14 -24 -38 0 +-23 34 50 0 +-23 -24 -34 0 +23 -24 -34 0 +23 34 -42 0 +28 34 42 0 +-11 -28 42 0 +15 -28 42 0 +23 35 45 0 +-23 -28 45 0 +-15 -35 45 0 +-15 -17 -45 0 +12 -15 30 0 +-12 30 -45 0 +22 -30 -45 0 +-22 -30 -37 0 +-3 -22 -30 0 +3 -22 -47 0 +37 40 44 0 +-31 40 44 0 +4 13 37 0 +13 37 -40 0 +-13 33 -40 0 +-13 -33 44 0 +2 3 -44 0 +-2 -40 -44 0 +27 43 47 0 +-2 16 41 0 +-16 27 47 0 +-27 41 47 0 +41 -44 -47 0 +-18 38 -41 0 +-2 -18 -38 0 +40 -41 46 0 +-20 33 -46 0 +-20 -33 -41 0 +18 19 28 0 +14 18 19 0 +-14 18 19 0 +-5 -19 -46 0 +-5 -18 -46 0 +20 21 -35 0 +-19 20 -35 0 +3 35 -48 0 +-3 -19 -48 0 +29 35 48 0 +-29 31 38 0 +27 31 48 0 +-29 31 48 0 +4 12 16 0 +25 26 -42 0 +-6 13 -37 0 +11 25 -37 0 +8 16 -47 0 +1 15 -31 0 +1 10 -21 0 +-14 22 -42 0 +32 -32 36 0 +2 10 -21 0 +-3 5 8 0 +15 21 22 0 +5 7 29 0 +26 -27 50 0 +30 -31 -48 0 +7 -34 46 0 +-6 24 49 0 +2 24 46 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat3.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat3.indata new file mode 100644 index 00000000..a914b70f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sat3.indata @@ -0,0 +1,301 @@ +90 +-1 -2 0 +-1 -3 0 +-2 -3 0 +1 2 3 0 +-4 -5 0 +-4 -6 0 +-5 -6 0 +4 5 6 0 +-7 -8 0 +-7 -9 0 +-8 -9 0 +7 8 9 0 +-10 -11 0 +-10 -12 0 +-11 -12 0 +10 11 12 0 +-13 -14 0 +-13 -15 0 +-14 -15 0 +13 14 15 0 +-16 -17 0 +-16 -18 0 +-17 -18 0 +16 17 18 0 +-19 -20 0 +-19 -21 0 +-20 -21 0 +19 20 21 0 +-22 -23 0 +-22 -24 0 +-23 -24 0 +22 23 24 0 +-25 -26 0 +-25 -27 0 +-26 -27 0 +25 26 27 0 +-28 -29 0 +-28 -30 0 +-29 -30 0 +28 29 30 0 +-31 -32 0 +-31 -33 0 +-32 -33 0 +31 32 33 0 +-34 -35 0 +-34 -36 0 +-35 -36 0 +34 35 36 0 +-37 -38 0 +-37 -39 0 +-38 -39 0 +37 38 39 0 +-40 -41 0 +-40 -42 0 +-41 -42 0 +40 41 42 0 +-43 -44 0 +-43 -45 0 +-44 -45 0 +43 44 45 0 +-46 -47 0 +-46 -48 0 +-47 -48 0 +46 47 48 0 +-49 -50 0 +-49 -51 0 +-50 -51 0 +49 50 51 0 +-52 -53 0 +-52 -54 0 +-53 -54 0 +52 53 54 0 +-55 -56 0 +-55 -57 0 +-56 -57 0 +55 56 57 0 +-58 -59 0 +-58 -60 0 +-59 -60 0 +58 59 60 0 +-61 -62 0 +-61 -63 0 +-62 -63 0 +61 62 63 0 +-64 -65 0 +-64 -66 0 +-65 -66 0 +64 65 66 0 +-67 -68 0 +-67 -69 0 +-68 -69 0 +67 68 69 0 +-70 -71 0 +-70 -72 0 +-71 -72 0 +70 71 72 0 +-73 -74 0 +-73 -75 0 +-74 -75 0 +73 74 75 0 +-76 -77 0 +-76 -78 0 +-77 -78 0 +76 77 78 0 +-79 -80 0 +-79 -81 0 +-80 -81 0 +79 80 81 0 +-82 -83 0 +-82 -84 0 +-83 -84 0 +82 83 84 0 +-85 -86 0 +-85 -87 0 +-86 -87 0 +85 86 87 0 +-88 -89 0 +-88 -90 0 +-89 -90 0 +88 89 90 0 +-52 -1 0 +-53 -2 0 +-54 -3 0 +-82 -1 0 +-83 -2 0 +-84 -3 0 +-85 -1 0 +-86 -2 0 +-87 -3 0 +-37 -4 0 +-38 -5 0 +-39 -6 0 +-55 -4 0 +-56 -5 0 +-57 -6 0 +-67 -7 0 +-68 -8 0 +-69 -9 0 +-79 -7 0 +-80 -8 0 +-81 -9 0 +-85 -7 0 +-86 -8 0 +-87 -9 0 +-46 -10 0 +-47 -11 0 +-48 -12 0 +-55 -10 0 +-56 -11 0 +-57 -12 0 +-58 -10 0 +-59 -11 0 +-60 -12 0 +-70 -10 0 +-71 -11 0 +-72 -12 0 +-52 -13 0 +-53 -14 0 +-54 -15 0 +-55 -13 0 +-56 -14 0 +-57 -15 0 +-58 -13 0 +-59 -14 0 +-60 -15 0 +-73 -13 0 +-74 -14 0 +-75 -15 0 +-82 -13 0 +-83 -14 0 +-84 -15 0 +-88 -13 0 +-89 -14 0 +-90 -15 0 +-37 -16 0 +-38 -17 0 +-39 -18 0 +-67 -16 0 +-68 -17 0 +-69 -18 0 +-76 -16 0 +-77 -17 0 +-78 -18 0 +-37 -19 0 +-38 -20 0 +-39 -21 0 +-40 -19 0 +-41 -20 0 +-42 -21 0 +-49 -19 0 +-50 -20 0 +-51 -21 0 +-61 -19 0 +-62 -20 0 +-63 -21 0 +-73 -19 0 +-74 -20 0 +-75 -21 0 +-85 -19 0 +-86 -20 0 +-87 -21 0 +-34 -22 0 +-35 -23 0 +-36 -24 0 +-46 -22 0 +-47 -23 0 +-48 -24 0 +-58 -22 0 +-59 -23 0 +-60 -24 0 +-61 -22 0 +-62 -23 0 +-63 -24 0 +-73 -22 0 +-74 -23 0 +-75 -24 0 +-76 -22 0 +-77 -23 0 +-78 -24 0 +-31 -25 0 +-32 -26 0 +-33 -27 0 +-52 -25 0 +-53 -26 0 +-54 -27 0 +-67 -25 0 +-68 -26 0 +-69 -27 0 +-76 -25 0 +-77 -26 0 +-78 -27 0 +-34 -28 0 +-35 -29 0 +-36 -30 0 +-40 -28 0 +-41 -29 0 +-42 -30 0 +-64 -28 0 +-65 -29 0 +-66 -30 0 +-64 -31 0 +-65 -32 0 +-66 -33 0 +-79 -31 0 +-80 -32 0 +-81 -33 0 +-82 -31 0 +-83 -32 0 +-84 -33 0 +-73 -34 0 +-74 -35 0 +-75 -36 0 +-79 -34 0 +-80 -35 0 +-81 -36 0 +-61 -37 0 +-62 -38 0 +-63 -39 0 +-70 -40 0 +-71 -41 0 +-72 -42 0 +-73 -40 0 +-74 -41 0 +-75 -42 0 +-76 -43 0 +-77 -44 0 +-78 -45 0 +-64 -46 0 +-65 -47 0 +-66 -48 0 +-70 -46 0 +-71 -47 0 +-72 -48 0 +-73 -49 0 +-74 -50 0 +-75 -51 0 +-76 -49 0 +-77 -50 0 +-78 -51 0 +-85 -49 0 +-86 -50 0 +-87 -51 0 +-88 -52 0 +-89 -53 0 +-90 -54 0 +-70 -55 0 +-71 -56 0 +-72 -57 0 +-79 -55 0 +-80 -56 0 +-81 -57 0 +-76 -58 0 +-77 -59 0 +-78 -60 0 +-85 -58 0 +-86 -59 0 +-87 -60 0 +-88 -58 0 +-89 -59 0 +-90 -60 diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.readme new file mode 100644 index 00000000..529eb6d1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.readme @@ -0,0 +1,21 @@ +Autor: Jens Huthmann + +Das Programm sucht nach den Stellen an denen der Suchstring im zu durchsuchenden Text auftaucht. Dies geschieht mit Hilfe des Karb-Rabin Algorithmus welcher mit Hashing arbeitet. (siehe http://zuseex.algo.informatik.tu-darmstadt.de/lehre/2006ss/bioinf/mat/lecture2-p4.pdf Folien 43-49) + +Die Länge des Suchstrings ist auf 500 Zeichen beschränkt und die Menge der Zeichen ist wiederum beschränkt auf {A-Z,a-z}. Der Suchstring wird als erstes eingegeben und mit Enter bestätigt. + +Der zu durchsuchende String darf unendlich lang sein ist + + + +Die Ausgabe gibt den Anfang an, an dem der Suchstring gefunden wurde. Die erste Stelle im String ist dabei 0. +Bei einer Stelle größer 32767 (maxint) wird die Stelle in Form von Stelle div maxint*maxint+Stelle mod maxint ausgegeben. Hierdurch wird die Größe des Suchstrings auf 32767 * 32767 beschränkt. Dies sollte aber für alle unseren Zwecke genügen. + + +Beispieleingabe + +bb (Suchstring) +aabbaabbaa (Zu durchsuchender String) + +Ausgabe +2,6, \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.tri new file mode 100644 index 00000000..877b0c4a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch.tri @@ -0,0 +1,187 @@ +let + const k ~ 28; + const q ~ 1000; + type Buffer ~ record + content: array 512 of Char, + first : Integer, + last : Integer + end; + type CharBuffer ~ array 28 of Integer; + +proc inc(var i:Integer) ~ +begin + i := i+1; +end; + +proc initBuffer(var c : CharBuffer) ~ +let + var i : Integer +in begin + i := 0; + while i < k do begin + c[i] := 0; + inc(var i); + end; +end; + +proc compareBuffer(a : CharBuffer, b : CharBuffer, var x : Boolean) ~ +let + var i : Integer +in begin + i := 1; + x := true; + while i < k do begin + if(a[i] \= b[i]) then x := false else; + inc(var i); + end; +end; + +! Converts a Char to a Integer representation, ignoring case +proc charToInt(c : Char, var i : Integer) ~ +let + var x : Integer +in begin + i := 0; + if(ord(c) >= ord('a')) /\ (ord(c) <= ord('z')) then i := ord(c)-ord('a')+1 else; + if(ord(c) >= ord('A')) /\ (ord(c) <= ord('Z')) then i := ord(c)-ord('A')+1 else; +end; + +!computes n^m mod q +proc modpot(n : Integer, m : Integer, q : Integer, var result : Integer) ~ +let + var i : Integer +in begin + i := 0; + result := 1; + while i < m do begin + result := (result * n) // q; + inc(var i); + end; +end; + +proc rehash(oldHash : Integer, cRemove : Char, cAdd : Char, n : Integer, var newHash : Integer) ~ +let + var x : Integer; + var y : Integer; + var res : Integer +in begin + !putint(oldHash);put('<');put(cRemove);put(' ');put('>');put(cAdd); + res := oldHash; + charToInt(cRemove,var x); + !putint(x);puteol(); + modpot(k,n-1,q,var y); + !putint(res);put('-');putint(x);put('*');putint(y);puteol(); + res := ((res - ( (x * y) // q))*k); + while res < 0 do res := res + q; + !put('n');putint(res);puteol(); + charToInt(cAdd, var x); + !put('x');putint(x);puteol(); + newHash := (res + x) // q; + !putint(newHash);puteol(); +end; + +proc search(var b : Buffer, sCBuffer : CharBuffer, var sbCBuffer : CharBuffer, var i : Integer, sHash : Integer, sbHash : Integer, n : Integer) ~ +let + var ch : Char; + var cRemove : Char; + var cAdd : Char; + var hash : Integer; + var x : Integer; + var comp : Boolean; + var xi : Integer; + var testeol : Boolean; + var testeof : Boolean +in +begin + hash := sbHash; + xi := 0; + get(var ch); + eol(var testeol); + eof(var testeof); + while \testeol /\ \testeof do begin + if( ((i+1) // maxint) = 0 ) then inc(var xi) else; + i := i+1 // maxint; + cRemove := b.content[b.first]; + charToInt(cRemove, var x); + sbCBuffer[x] := sbCBuffer[x] -1; + cAdd := ch; + charToInt(cAdd, var x); + sbCBuffer[x] := sbCBuffer[x] +1; + b.first := b.first + 1 // 512; + b.content[b.last] := cAdd; + b.last := b.first + n // 512; + rehash(hash,cRemove,cAdd,n,var hash); + if(hash = sHash) then + begin + compareBuffer(sCBuffer,sbCBuffer, var comp); + if comp then + begin + if(xi > 0) then + begin putint(xi);put('*');putint(maxint);put('+');end else; + putint(i);put(','); + end else; + end else; + !putint(sHash);put(cRemove);put('<');put('>');put(cAdd);putint(hash);puteol(); + get(var ch); + eol(var testeol); + eof(var testeof); + end; +end; + +proc hash(var b : Buffer,var c : CharBuffer, n : Integer, var hash : Integer) ~ +let + var bla : array 2 of Integer; + var ch: Char; + var i : Integer; + var x : Integer; + var testeol : Boolean; + var testeof : Boolean +in begin + i := 0; + hash :=0; + get(var ch); + eol(var testeol); + eof(var testeof); + while (\ testeol) /\ (\testeof) /\ (i < 512) /\ ( (n < 0)\/(i<=n))do begin + hash := ((hash * k) // q); + charToInt(ch,var x); + b.content[i] := ch; + if(x > 0) /\ (x <= 26) then c[x] := c[x] +1 else; + b.first := 0; + b.last := i+1; + hash := hash + x; + bla[i//2] := hash; + inc(var i); + if (n >= 0) /\ ( i > n) then else get(var ch); + eol(var testeol); + eof(var testeof); + end; + ! stupid hack start + ! loop body gets executed one time to much, because eol doesn't work quite right + if(n<0)then begin + b.last := b.last -1; + !hash := hash -x; + !hash := (((hash) / k) // q); + hash := bla[i//2]; + end else; + ! stupid hack end + hash := hash // q +end; + + var i : Integer; + var sHash : Integer; + var sCBuffer : CharBuffer; + var sbHash : Integer; + var sbCBuffer : CharBuffer; + var buffer : Buffer +in begin + i := 0; + initBuffer(var sCBuffer); + initBuffer(var sbCBuffer); + hash(var buffer, var sCBuffer, 0-1, var sHash); + !putint(sHash);puteol(); + hash(var buffer, var sbCBuffer, buffer.last-1,var sbHash); + !putint(sbHash);puteol(); + if(sHash = sbHash) then begin putint(i);put(','); end else; + search(var buffer, sCBuffer, var sbCBuffer, var i, sHash, sbHash, buffer.last); +end diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch1.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch1.indata new file mode 100644 index 00000000..cae54411 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch1.indata @@ -0,0 +1,2 @@ +aaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch2.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch2.indata new file mode 100644 index 00000000..74961002 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch2.indata @@ -0,0 +1,2 @@ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch3.indata b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch3.indata new file mode 100644 index 00000000..e633d87d --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/smatch3.indata @@ -0,0 +1,2 @@ +hsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsd +sdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsdiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuihdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwsdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegervhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghiuvshuigshgsvhgsvvszuvruiveiuiwvueguivweguevwguevwruevwesdjhvtrvtjhueviuhervuihervuhuervhuirvgehuiervghuiervguiervguevrguveguveguvegerviugervugervugevruvergverjvegrjkvregveuerwvgiuvgeuvwguwveguiwvegwiuvgwviugewjhwvegjwegviuwvegweiuwveguiwvegvweuigwuiuwvegwevuweguiwvguwvegewwuegwevuigwetuiwegjgwgsjhjsdhvjvgjgvjhdvhjkhsjvsbjvsbjsdbjkvhgdjhsdkjhvrsjhveruiervghisasgabvsbsbgsbzzzzzsbsd diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.readme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.readme new file mode 100644 index 00000000..7e2d7b22 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.readme @@ -0,0 +1,73 @@ +! +! Implementation of several sorting functions in Triangle by +! - Alexander Constantin constant@rbg.informatik.tu-darmstadt.de +! - Nico Rottstädt rottstae@rbg.informatik.tu-darmstadt.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html + +Wir haben uns dafür entschieden einige Implementationen von Sortieralgorithmen beizusteuern. +Genommen haben wir BubbleSort, QuickSort und HeapSort, die uns deutlich an unsere +Grundzüge der Informatik III Vorlesung bei Prof. Waldschmit erinnern. + +1) Liste der implementierten Funktionen/Prozeduren +-------------------------------------------------- + + ! Prodcedure which plots the array to standard out + ! ------------------------------------------------ + proc putArray(arr: array 100 of Integer) + + ! Heap Sort Implementation + ! ------------------------ + proc swap(var arr: array 100 of Integer, x : Integer, y : Integer) + proc sift(var arr: array 100 of Integer, start : Integer, count : Integer) + proc heapsort(var arr: array 100 of Integer, count : Integer) + + ! Quick Sort Implementation + ! ------------------------- + proc quicksort(var arr : array 100 of Integer, l : Integer, r : Integer) + + ! Bubble Sort Implementation + ! -------------------------- + proc bubblesort(var arr: array 100 of Integer, count : Integer) + + ! Check validity of array sorting and plot result to standard out + ! --------------------------------------------------------------- + proc checkArraySorting(arr: array 100 of Integer, count : Integer, var valid : Boolean) + + ! Array Entries (Randoms generated in Java) + ! ----------------------------------------- + proc buildTestArray1(var arr: array 100 of Integer) ~ + +2) Eingabe +---------- + im Programm + +3) Ausgabe des Programms +------------------------ + + bubble + [10690, 21584, 24270, 3653, 1307, 17096, 10992, 9183, 11046, 13206, 28037, 7567, 22399, 10778, 11956, 23117, 11576, 6163, 16207, 12336, 2700, 6146, 2338, 18116, 15568, 12391, 26919, 25563, 17520, 27064, 23250, 9326, 11345, 3436, 10496, 20940, 8102, 25909, 23299, 28153, 25820, 17943, 10678, 12475, 13277, 7064, 29208, 354, 405, 1038, 22731, 32, 21053, 24448, 8994, 27712, 28553, 30560, 12371, 9016, 32653, 7631, 30419, 5939, 27820, 20465, 30613, 29277, 22185, 1873, 14971, 9918, 24685, 31488, 7415, 26915, 7637, 6607, 1389, 2114, 10343, 874, 27532, 14268, 31086, 14099, 6000, 16760, 5041, 4867, 32507, 7729, 18035, 6220, 17051, 14586, 26429, 13230, 30718, 6103] + sorting: invalid + [32, 354, 405, 874, 1038, 1307, 1389, 1873, 2114, 2338, 2700, 3436, 3653, 4867, 5041, 5939, 6000, 6103, 6146, 6163, 6220, 6607, 7064, 7415, 7567, 7631, 7637, 7729, 8102, 8994, 9016, 9183, 9326, 9918, 10343, 10496, 10678, 10690, 10778, 10992, 11046, 11345, 11576, 11956, 12336, 12371, 12391, 12475, 13206, 13230, 13277, 14099, 14268, 14586, 14971, 15568, 16207, 16760, 17051, 17096, 17520, 17943, 18035, 18116, 20465, 20940, 21053, 21584, 22185, 22399, 22731, 23117, 23250, 23299, 24270, 24448, 24685, 25563, 25820, 25909, 26429, 26915, 26919, 27064, 27532, 27712, 27820, 28037, 28153, 28553, 29208, 29277, 30419, 30560, 30613, 30718, 31086, 31488, 32507, 32653] + sorting: OK + quick + [10690, 21584, 24270, 3653, 1307, 17096, 10992, 9183, 11046, 13206, 28037, 7567, 22399, 10778, 11956, 23117, 11576, 6163, 16207, 12336, 2700, 6146, 2338, 18116, 15568, 12391, 26919, 25563, 17520, 27064, 23250, 9326, 11345, 3436, 10496, 20940, 8102, 25909, 23299, 28153, 25820, 17943, 10678, 12475, 13277, 7064, 29208, 354, 405, 1038, 22731, 32, 21053, 24448, 8994, 27712, 28553, 30560, 12371, 9016, 32653, 7631, 30419, 5939, 27820, 20465, 30613, 29277, 22185, 1873, 14971, 9918, 24685, 31488, 7415, 26915, 7637, 6607, 1389, 2114, 10343, 874, 27532, 14268, 31086, 14099, 6000, 16760, 5041, 4867, 32507, 7729, 18035, 6220, 17051, 14586, 26429, 13230, 30718, 6103] + sorting: invalid + [32, 354, 405, 874, 1038, 1307, 1389, 1873, 2114, 2338, 2700, 3436, 3653, 4867, 5041, 5939, 6000, 6103, 6146, 6163, 6220, 6607, 7064, 7415, 7567, 7631, 7637, 7729, 8102, 8994, 9016, 9183, 9326, 9918, 10343, 10496, 10678, 10690, 10778, 10992, 11046, 11345, 11576, 11956, 12336, 12371, 12391, 12475, 13206, 13230, 13277, 14099, 14268, 14586, 14971, 15568, 16207, 16760, 17051, 17096, 17520, 17943, 18035, 18116, 20465, 20940, 21053, 21584, 22185, 22399, 22731, 23117, 23250, 23299, 24270, 24448, 24685, 25563, 25820, 25909, 26429, 26915, 26919, 27064, 27532, 27712, 27820, 28037, 28153, 28553, 29208, 29277, 30419, 30560, 30613, 30718, 31086, 31488, 32507, 32653] + sorting: OK + heap + [10690, 21584, 24270, 3653, 1307, 17096, 10992, 9183, 11046, 13206, 28037, 7567, 22399, 10778, 11956, 23117, 11576, 6163, 16207, 12336, 2700, 6146, 2338, 18116, 15568, 12391, 26919, 25563, 17520, 27064, 23250, 9326, 11345, 3436, 10496, 20940, 8102, 25909, 23299, 28153, 25820, 17943, 10678, 12475, 13277, 7064, 29208, 354, 405, 1038, 22731, 32, 21053, 24448, 8994, 27712, 28553, 30560, 12371, 9016, 32653, 7631, 30419, 5939, 27820, 20465, 30613, 29277, 22185, 1873, 14971, 9918, 24685, 31488, 7415, 26915, 7637, 6607, 1389, 2114, 10343, 874, 27532, 14268, 31086, 14099, 6000, 16760, 5041, 4867, 32507, 7729, 18035, 6220, 17051, 14586, 26429, 13230, 30718, 6103] + sorting: invalid + [32, 354, 405, 874, 1038, 1307, 1389, 1873, 2114, 2338, 2700, 3436, 3653, 4867, 5041, 5939, 6000, 6103, 6146, 6163, 6220, 6607, 7064, 7415, 7567, 7631, 7637, 7729, 8102, 8994, 9016, 9183, 9326, 9918, 10343, 10496, 10678, 10690, 10778, 10992, 11046, 11345, 11576, 11956, 12336, 12371, 12391, 12475, 13206, 13230, 13277, 14099, 14268, 14586, 14971, 15568, 16207, 16760, 17051, 17096, 17520, 17943, 18035, 18116, 20465, 20940, 21053, 21584, 22185, 22399, 22731, 23117, 23250, 23299, 24270, 24448, 24685, 25563, 25820, 25909, 26429, 26915, 26919, 27064, 27532, 27712, 27820, 28037, 28153, 28553, 29208, 29277, 30419, 30560, 30613, 30718, 31086, 31488, 32507, 32653] + sorting: OK + +4) Variationen +-------------- + + In der Procedure wird das Test Array definiert, da wir aber an die Limitation des Compiler für die + maximale Anweisungsanzahl gestossen sind, konnten wir nicht mehrere Test Arrays nutzen. + Es sind aber noch weitere Test Arrays in dieser Prozedur auskommentiert vorhanden. + +[EOF] \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.tri new file mode 100644 index 00000000..26a2abe7 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sorting.tri @@ -0,0 +1,288 @@ +! +! Implementation of several sorting function in Triangle by +! - Alexander Constantin constant@rbg.informatik.tu-darmstadt.de +! - Nico Rottstädt rottstae@rbg.informatik.tu-darmstadt.de +! +! This is an excercise from A. Koch's Lecture "Optimierende Compiler", +! summer term 2006 at TU Darmstadt / Germany, course homepage (German): +! http://www.esa.informatik.tu-darmstadt.de/twiki/bin/view/Lectures/OptimierendeCompilerDe.html + +let + ! Test Array + var testArray: array 100 of Integer; + + ! Boolean used for validity check + var validityOfSorting : Boolean; + + ! Prodcedure which plots the array to standard out + ! ------------------------------------------------ + proc putArray(arr: array 100 of Integer) ~ + let + var i : Integer + in begin + i := 0; + put('['); + while (i < 100) do begin + putint(arr[i]); + if ( i < 99) then + begin + put(','); + put(' '); + end + else; + i := i + 1; + end; + put(']'); + puteol(); + end; + + +! Heap Sort Implementation +! ------------------------ + + ! swap array entries + proc swap(var arr: array 100 of Integer, x : Integer, y : Integer) ~ + let + var temp : Integer + in begin + temp := arr[x]; + arr[x] := arr[y]; + arr[y] := temp + end; + + proc sift(var arr: array 100 of Integer, start : Integer, count : Integer) ~ + let + var root : Integer; + var child : Integer; + var stayInLoop : Boolean; + var bool1 : Boolean; + var bool2 : Boolean + in begin + root := start; + child := 0; + stayInLoop := true; + + + while ((((root * 2) + 1) < count) /\ stayInLoop) do begin + child := (root * 2) + 1; + bool1 := child < (count - 1); + bool2 := arr[child] < arr[child + 1]; + if (bool1 /\ bool2) then + child := child + 1 + else; + + if (arr[root] < arr[child]) then + begin + swap(var arr, root, child); + root := child + end + else + stayInLoop := false; + + end + + end; + + + proc heapsort(var arr: array 100 of Integer, count : Integer) ~ + let + var start : Integer; + var ende : Integer + in begin + start := count / 2; + start := start - 1; + ende := count - 1; + + while (start >= 0) do begin + sift(var arr, start, count); + start := start - 1 + end; + + while (ende > 0) do begin + swap(var arr, ende, 0); + sift(var arr, 0, ende); + ende := ende - 1 + end + end; + + + +! Quick Sort Implementation +! ------------------------- + proc quicksort(var arr : array 100 of Integer, l : Integer, r : Integer) ~ + let + var lpos : Integer; + var rpos : Integer; + var tmp : Integer; + var pivot : Integer + in begin + pivot := arr[(l+r)/2]; + lpos := l; + rpos := r; + + while (lpos <= rpos) do begin + while (arr[lpos] < pivot) do lpos := lpos + 1; + while (arr[rpos] > pivot) do rpos := rpos - 1; + if lpos < rpos then begin + tmp := arr[lpos]; + arr[lpos] := arr[rpos]; + arr[rpos] := tmp + end + else; + if lpos <= rpos then begin + lpos := lpos + 1; + rpos := rpos - 1 + end + else; + end; + + if l < rpos then quicksort(var arr, l, rpos) else; + if lpos < r then quicksort(var arr, lpos, r) else + + end; + +! Bubble Sort Implementation +! -------------------------- + proc bubblesort(var arr: array 100 of Integer, count : Integer) ~ + let + var i: Integer; + var j: Integer; + var tmp : Integer; + var foo : Integer + in begin + i := 0; + + + while (i < count) do begin + foo := count - i - 2; + j := 0; + while (j <= foo) do begin + if (arr[j] > arr[j+1]) then + begin + tmp := arr[j]; + arr[j] := arr[j+1]; + arr[j+1] := tmp; + end + else; + j := j + 1; + end; + i := i + 1; + end + + end; + +! Check validity of array sorting and plot result to standard out +! --------------------------------------------------------------- + + proc checkArraySorting(arr: array 100 of Integer, count : Integer, var valid : Boolean) ~ + let + var i : Integer + in begin + i := 0; + valid := true; + while (i < (count - 1) /\ valid) do begin + valid := arr[i] <= arr[i+1]; + i := i + 1; + end; + + put('s');put('o');put('r');put('t');put('i');put('n');put('g');put(':');put(' '); + if (valid) then + begin + put('O');put('K'); + end + else + begin + put('i');put('n');put('v');put('a');put('l');put('i');;put('d'); + end; + puteol() + end; + + ! Array Entries (Randoms generated in Java) + ! ----------------------------------------- + proc buildTestArray1(var arr: array 100 of Integer) ~ + let + var foo: Integer ! dummy var + in begin + arr[0] := 10690; arr[1] := 21584; arr[2] := 24270; arr[3] := 3653; arr[4] := 1307; arr[5] := 17096; arr[6] := 10992; arr[7] := 9183; arr[8] := 11046; arr[9] := 13206; + arr[10] := 28037; arr[11] := 7567; arr[12] := 22399; arr[13] := 10778; arr[14] := 11956; arr[15] := 23117; arr[16] := 11576; arr[17] := 6163; arr[18] := 16207; arr[19] := 12336; + arr[20] := 2700; arr[21] := 6146; arr[22] := 2338; arr[23] := 18116; arr[24] := 15568; arr[25] := 12391; arr[26] := 26919; arr[27] := 25563; arr[28] := 17520; arr[29] := 27064; + arr[30] := 23250; arr[31] := 9326; arr[32] := 11345; arr[33] := 3436; arr[34] := 10496; arr[35] := 20940; arr[36] := 8102; arr[37] := 25909; arr[38] := 23299; arr[39] := 28153; + arr[40] := 25820; arr[41] := 17943; arr[42] := 10678; arr[43] := 12475; arr[44] := 13277; arr[45] := 7064; arr[46] := 29208; arr[47] := 354; arr[48] := 405; arr[49] := 1038; + arr[50] := 22731; arr[51] := 32; arr[52] := 21053; arr[53] := 24448; arr[54] := 8994; arr[55] := 27712; arr[56] := 28553; arr[57] := 30560; arr[58] := 12371; arr[59] := 9016; + arr[60] := 32653; arr[61] := 7631; arr[62] := 30419; arr[63] := 5939; arr[64] := 27820; arr[65] := 20465; arr[66] := 30613; arr[67] := 29277; arr[68] := 22185; arr[69] := 1873; + arr[70] := 14971; arr[71] := 9918; arr[72] := 24685; arr[73] := 31488; arr[74] := 7415; arr[75] := 26915; arr[76] := 7637; arr[77] := 6607; arr[78] := 1389; arr[79] := 2114; + arr[80] := 10343; arr[81] := 874; arr[82] := 27532; arr[83] := 14268; arr[84] := 31086; arr[85] := 14099; arr[86] := 6000; arr[87] := 16760; arr[88] := 5041; arr[89] := 4867; + arr[90] := 32507; arr[91] := 7729; arr[92] := 18035; arr[93] := 6220; arr[94] := 17051; arr[95] := 14586; arr[96] := 26429; arr[97] := 13230; arr[98] := 30718; arr[99] := 6103 + + ! additional arrays for testing purpose + ! ------------------------------------- + ! arr[0] := 26636; arr[1] := 1280; arr[2] := 2751; arr[3] := 30869; arr[4] := 11802; arr[5] := 23990; arr[6] := 26539; arr[7] := 13626; arr[8] := 32267; arr[9] := 7996; + ! arr[10] := 26462; arr[11] := 6796; arr[12] := 11817; arr[13] := 11426; arr[14] := 13255; arr[15] := 15511; arr[16] := 17282; arr[17] := 14632; arr[18] := 19452; arr[19] := 7270; + ! arr[20] := 7034; arr[21] := 23014; arr[22] := 5481; arr[23] := 4578; arr[24] := 17910; arr[25] := 31445; arr[26] := 11807; arr[27] := 3176; arr[28] := 25858; arr[29] := 11003; + ! arr[30] := 12607; arr[31] := 113; arr[32] := 20450; arr[33] := 4491; arr[34] := 31070; arr[35] := 30877; arr[36] := 9361; arr[37] := 24575; arr[38] := 3111; arr[39] := 17608; + ! arr[40] := 25581; arr[41] := 15156; arr[42] := 15699; arr[43] := 10670; arr[44] := 10727; arr[45] := 24519; arr[46] := 16011; arr[47] := 16399; arr[48] := 3082; arr[49] := 13338; + ! arr[50] := 15490; arr[51] := 25111; arr[52] := 9741; arr[53] := 3165; arr[54] := 22798; arr[55] := 6702; arr[56] := 23824; arr[57] := 6998; arr[58] := 17643; arr[59] := 32327; + ! arr[60] := 26447; arr[61] := 25733; arr[62] := 29456; arr[63] := 16136; arr[64] := 12108; arr[65] := 654; arr[66] := 23200; arr[67] := 29213; arr[68] := 13938; arr[69] := 14035; + ! arr[70] := 31616; arr[71] := 17243; arr[72] := 11377; arr[73] := 32109; arr[74] := 23795; arr[75] := 16452; arr[76] := 1428; arr[77] := 19113; arr[78] := 1153; arr[79] := 23999; + ! arr[80] := 29581; arr[81] := 9571; arr[82] := 28340; arr[83] := 10230; arr[84] := 16711; arr[85] := 974; arr[86] := 25180; arr[87] := 16457; arr[88] := 13159; arr[89] := 9758; + ! arr[90] := 2557; arr[91] := 26016; arr[92] := 13400; arr[93] := 9463; arr[94] := 5719; arr[95] := 16204; arr[96] := 15309; arr[97] := 1872; arr[98] := 18456; arr[99] := 745 + ! + ! arr[0] := 3785; arr[1] := 30177; arr[2] := 7613; arr[3] := 20935; arr[4] := 9822; arr[5] := 2096; arr[6] := 1524; arr[7] := 21137; arr[8] := 16509; arr[9] := 12639; + ! arr[10] := 24028; arr[11] := 6116; arr[12] := 22329; arr[13] := 318; arr[14] := 11688; arr[15] := 21704; arr[16] := 30746; arr[17] := 16365; arr[18] := 1338; arr[19] := 13352; + ! arr[20] := 13867; arr[21] := 24778; arr[22] := 3467; arr[23] := 24652; arr[24] := 13973; arr[25] := 25424; arr[26] := 23209; arr[27] := 25536; arr[28] := 8384; arr[29] := 30402; + ! arr[30] := 17762; arr[31] := 3326; arr[32] := 2039; arr[33] := 6059; arr[34] := 4779; arr[35] := 25194; arr[36] := 13784; arr[37] := 25650; arr[38] := 29206; arr[39] := 31822; + ! arr[40] := 4561; arr[41] := 3736; arr[42] := 25509; arr[43] := 18061; arr[44] := 15134; arr[45] := 8986; arr[46] := 24712; arr[47] := 15375; arr[48] := 18402; arr[49] := 18637; + ! arr[50] := 12647; arr[51] := 8673; arr[52] := 31994; arr[53] := 15098; arr[54] := 12270; arr[55] := 8233; arr[56] := 14194; arr[57] := 29366; arr[58] := 18566; arr[59] := 21325; + ! arr[60] := 10612; arr[61] := 22176; arr[62] := 27713; arr[63] := 4010; arr[64] := 31192; arr[65] := 18586; arr[66] := 16902; arr[67] := 5722; arr[68] := 18048; arr[69] := 4033; + ! arr[70] := 18765; arr[71] := 25030; arr[72] := 32445; arr[73] := 26298; arr[74] := 18389; arr[75] := 31942; arr[76] := 1105; arr[77] := 25798; arr[78] := 18106; arr[79] := 1834; + ! arr[80] := 32386; arr[81] := 2559; arr[82] := 4769; arr[83] := 7881; arr[84] := 19459; arr[85] := 28011; arr[86] := 9657; arr[87] := 23607; arr[88] := 1386; arr[89] := 26008; + ! arr[90] := 6510; arr[91] := 28262; arr[92] := 2892; arr[93] := 657; arr[94] := 14530; arr[95] := 8356; arr[96] := 10212; arr[97] := 21036; arr[98] := 2963; arr[99] := 14964 + ! + ! arr[0] := 23958; arr[1] := 11737; arr[2] := 13787; arr[3] := 12537; arr[4] := 4244; arr[5] := 15107; arr[6] := 19835; arr[7] := 3507; arr[8] := 21260; arr[9] := 21897; + ! arr[10] := 21493; arr[11] := 15985; arr[12] := 14474; arr[13] := 19888; arr[14] := 20669; arr[15] := 13974; arr[16] := 13852; arr[17] := 14626; arr[18] := 7140; arr[19] := 25022; + ! arr[20] := 14890; arr[21] := 4295; arr[22] := 16385; arr[23] := 25639; arr[24] := 20450; arr[25] := 29505; arr[26] := 30037; arr[27] := 1330; arr[28] := 20293; arr[29] := 9739; + ! arr[30] := 5955; arr[31] := 25740; arr[32] := 19476; arr[33] := 21834; arr[34] := 6255; arr[35] := 17083; arr[36] := 10981; arr[37] := 7330; arr[38] := 24790; arr[39] := 12716; + ! arr[40] := 31952; arr[41] := 4420; arr[42] := 11373; arr[43] := 29274; arr[44] := 32590; arr[45] := 22476; arr[46] := 28622; arr[47] := 6270; arr[48] := 24300; arr[49] := 18049; + ! arr[50] := 31711; arr[51] := 17768; arr[52] := 8369; arr[53] := 11932; arr[54] := 4137; arr[55] := 26482; arr[56] := 24357; arr[57] := 9615; arr[58] := 18163; arr[59] := 27456; + ! arr[60] := 21764; arr[61] := 2349; arr[62] := 17745; arr[63] := 12420; arr[64] := 211; arr[65] := 32725; arr[66] := 23624; arr[67] := 23508; arr[68] := 420; arr[69] := 24544; + ! arr[70] := 20347; arr[71] := 19302; arr[72] := 9859; arr[73] := 14224; arr[74] := 16616; arr[75] := 1179; arr[76] := 1809; arr[77] := 8480; arr[78] := 20547; arr[79] := 25686; + ! arr[80] := 23815; arr[81] := 9329; arr[82] := 20418; arr[83] := 13411; arr[84] := 15213; arr[85] := 8727; arr[86] := 1836; arr[87] := 1043; arr[88] := 10616; arr[89] := 8603; + + end + + + +in begin + + + ! check Bubble Sort + ! ----------------- + put('b'); put('u');put('b');put('b');put('l');put('e');puteol(); + buildTestArray1(var testArray); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting); + bubblesort(var testArray, 100); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting); + + ! check quick Sort + ! ----------------- + put('q'); put('u');put('i'); put('c');put('k');puteol(); + buildTestArray1(var testArray); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting); + quicksort(var testArray, 0, 99); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting); + + ! check heap Sort + ! ----------------- + put('h');put('e');put('a');put('p');puteol(); + buildTestArray1(var testArray); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting); + heapsort(var testArray, 100); + putArray(testArray); + checkArraySorting(testArray, 100, var validityOfSorting) + +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sudoku.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sudoku.tri new file mode 100644 index 00000000..55209b09 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/sudoku.tri @@ -0,0 +1,330 @@ +let + var matrix : array 9 of array 9 of Integer; + var set : array 9 of array 9 of array 10 of Boolean; + var ready : Boolean; + var i : Integer; + var j : Integer; + var k : Integer; + var l : Integer; + var x : Integer; + var y : Integer; + var z : Integer; + var tmp : Integer; + var count : Integer; + var pos : Integer; + var pos1 : Integer; + var pos2 : Integer +in begin + ! Initalisierungen + + matrix := [ [0,5,7, 0,0,2, 3,0,6], + [1,0,2, 7,0,0, 5,0,8], + [3,8,0, 5,0,9, 7,0,2], + + [0,0,5, 1,0,0, 8,0,4], + [8,1,3, 0,5,0, 2,0,9], + [7,0,0, 0,0,8, 1,0,5], + + [6,3,1, 2,4,5, 9,8,7], + [5,7,9, 0,0,6, 4,2,1], + [0,0,8, 9,7,1, 6,5,3]]; + + i := 0; + while i < 9 do + begin + j := 0; + while j < 9 do + begin + k := 1; + while k < 10 do + begin + if matrix[i][j] = 0 then + set[i][j][k] := true +! else if matrix[i][j] = k then +! set[i][j][k] := true + else + set[i][j][k] := false; + + + k := k + 1; + end; + j := j + 1; + end; + i := i + 1; + end; + + while \ready do + begin +!put('a'); + + ready := true; + + !! Mgliche Inhalte der Felder feststellen + + ! Zeilen durchgehen + i := 0; + while i < 9 do + begin +!put('e'); + ! Spalten durchgehen + j := 0; + while j < 9 do + begin +!put('f'); + if matrix[i][j] = 0 then + begin +!put('g'); + ! Vorhandene Zahlen in Zeile/Spalte streichen + k := 0; + while k < 9 do + begin +!put('h'); + tmp := matrix[i][k]; + if tmp \= 0 then + set[i][j][tmp] := false + else ; + tmp := matrix[k][j]; + if tmp \= 0 then + set[i][j][tmp] := false + else ; + k := k + 1; + end; + + + + ! Vorhandene Zahlen in Kstchen streichen + if (0 <= i) /\ (i <= 2) then x := 0 + else if (3 <= i) /\ (i <= 5) then x := 1 + else if (6 <= i) /\ (i <= 8) then x := 2 else; + if (0 <= j) /\ (j <= 2) then y := 0 + else if (3 <= j) /\ (j <= 5) then y := 1 + else if (6 <= j) /\ (j <= 8) then y := 2 else; + + k := 0; + l := 0; + while k < 3 do + begin +!put('i'); + while l < 3 do + begin +!put('j'); + tmp := matrix[k + (x * 3)][l + (y * 3)]; + if tmp \= 0 then + set[i][j][tmp] := false + else; + l := l + 1; + end; + k := k + 1; + end + end + else begin ! Bei belegtem Feld set auf false setzen + k := 1; + while k < 10 do + begin +! if k = matrix[i][j] then +! set[i][j][k] := true +! else + set[i][j][k] := false; + k := k + 1; + end + end; + j := j + 1; + end; + i := i + 1; + end; + + !! Felder berechnen + + ! check Feld alleine + i := 0; + while i < 9 do + begin + j := 0; + while j < 9 do + begin + if matrix[i][j] = 0 then + begin + count := 0; + k := 1; + while k < 10 do + begin + if set[i][j][k] = true then + begin + count := count + 1; + pos := k; + end else; + k := k + 1; + end; + + if (count = 1) /\ (matrix[i][j] = 0) then + begin +!put('c'); +!putint(i); put(','); putint(j); put(','); putint(pos); + matrix[i][j] := pos; + ready := false; + end else; + end else; + j := j + 1; + end; + i := i + 1; + end; + + + + z := 1; + while z < 10 do + begin + +!put('k'); + ! check row + i := 0; + while i < 9 do + begin +!put('l'); + count := 0; + j := 0; + while j < 9 do + begin +!put('m'); + if set[i][j][z] = true then + begin + count := count + 1; + pos := j; + end else; + j := j + 1; + end; + + if (count = 1) /\ (matrix[i][pos] = 0) then + begin + +!put('n'); +!putint(i); put(','); putint(pos); put(','); putint(z); + + matrix[i][pos] := z; + ready := false; + end else; + + i := i + 1; + end; + + ! check column + j := 0; + while j < 9 do + begin +!put('o'); + count := 0; + i := 0; + while i < 9 do + begin + if set[i][j][z] = true then + begin + count := count + 1; + pos := i; + end else; + i := i + 1; + end; + + if (count = 1) /\ (matrix[pos][j] = 0) then + begin +!put('p'); +!putint(pos); put(','); putint(j); put(','); putint(z); + + matrix[pos][j] := z; + ready := false; + end else; + + j := j + 1; + end; + + ! check rc + x := 0; + while x < 3 do + begin +!put('q'); + y := 0; + while y < 3 do + begin +!put('r'); + count := 0; + i := 0; + while i < 3 do + begin +!put('s'); + j := 0; + while j < 3 do + begin + if set[i + (x * 3)][j + (y * 3)][z] = true then + begin + count := count + 1; + pos1 := i; + pos2 := j; + end else; + j := j + 1; + end; + i := i + 1; + end; + + pos1 := pos1 + (x * 3); + pos2 := pos2 + (y * 3); + + if (count = 1) /\ (matrix[pos1][pos2] = 0) then + begin +!put('t'); +!putint(i+(x*3)); put(','); putint(j+(y*3)); put(','); putint(z); + matrix[pos1][pos2] := z; + ready := false; + end else; + y := y + 1; + + end; + x := x + 1; + end; + z := z + 1; + end; + + + ! Ergebniss ausdrucken + puteol(); + i := 0; + while i < 9 do + begin + j := 0; + while j < 9 do + begin + putint(matrix[i][j]); + put(' '); + j := j + 1; + end; + puteol(); + i := i + 1; + end; + puteol(); + + + + end; + + ! Mgliche Belegungen der Felder ausgeben + i := 0; + while i < 9 do + begin + j := 0; + while j < 9 do + begin + puteol(); putint(i); put(','); putint(j); put(':'); put(' '); + k := 1; + while k < 10 do + begin + if set[i][j][k] = true then + begin + putint(k); + put(' '); + end else; + k := k + 1; + end; + j := j + 1; + end; + i := i + 1; + end; + +end \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.treadme b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.treadme new file mode 100644 index 00000000..7c92f8ce --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.treadme @@ -0,0 +1,21 @@ +REAMDE fr treeFromInPre.tri v1.0 + +Author: Thomas Heidenreich (c) 2006 +thh@rbg.informatik.tu-darmstadt.de +---------------------------------- + +Das Programm baut rekrusiv aus einer inorder und einer preorder +Traversierung einen korrekten Binrbaum auf. + +Der Baum wir in einem Array gehalten, wobei [1] die Wurzel ist. +[(i*2)] ist das linke Kind, [(i*2)+1] das rechte. + +Die inorder und preorder werden aus den Dateien in.txt und pre.txt +eingelesen, wobei jeweils ein Char fr eine Knotenbezeichnung steht. +Diese drfen nicht doppelt vergeben sein!! +Daraus folgt, dass es maximal so viele Knoten wie verschiedene Chars +geben kann. Der Baum an sich ist auf 7 Ebenen (inklusive Wurzel) +beschrnkt. + +Die Ausgabe erfolgt ebenenweise in ASCII mit _X_ fr jeden Knoten +wobei X die Knotenbezeichnung aus den Dateien ist. diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.tri b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.tri new file mode 100644 index 00000000..cfe32f82 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Examples/treeFromInPre.tri @@ -0,0 +1,290 @@ +! thh build tree from inorder preorder v1.0 + +let + const Arraylength ~ 128; + type Tree ~ array 128 of Char; + + type String ~ array 20 of Char; + + var loop: Char; + + var newLevel : array 7 of Integer; + + proc initLevel() ~ + begin + newLevel[0] := 2; + newLevel[1] := 4; + newLevel[2] := 8; + newLevel[3] := 16; + newLevel[4] := 32; + newLevel[5] := 64; + newLevel[6] := 128; + end; + + var inorder : Tree; + var preorder: Tree; + var realtree: Tree; + + ! set all entries to '_' + proc initTree(var tree : Tree) ~ + let + var count : Integer + in begin + count := 1; + while count < Arraylength do begin + tree[count] := '_'; + count := count + 1; + end; + end; + + ! print complete tree to console + proc printTree(tree : Tree) ~ + let + var count : Integer; + var levelCount : Integer + in begin + count := 1; + levelCount := 0; + while count < Arraylength do begin + if newLevel[levelCount] = count then + begin + puteol(); + levelCount := levelCount + 1 + end + + else; + + put('_');put(tree[count]);put('_');put(' '); + count := count + 1; + end + end; + + + !inits preorder filename to read + proc initFileStringP(var filenameP : String) ~ + begin + filenameP[0] := 'p'; + filenameP[1] := 'r'; + filenameP[2] := 'e'; + filenameP[3] := '.'; + filenameP[4] := 't'; + filenameP[5] := 'x'; + filenameP[6] := 't'; + filenameP[7] := chr(0); + end; + + !inits inorder filename to read + proc initFileStringI(var filenameI : String) ~ + begin + filenameI[0] := 'i'; + filenameI[1] := 'n'; + filenameI[2] := '.'; + filenameI[3] := 't'; + filenameI[4] := 'x'; + filenameI[5] := 't'; + filenameI[6] := chr(0); + end; + + var filenameP : String; + var filenameI : String; + var filehandle : Integer; + var testeof : Boolean; + var testeol : Boolean; + var testint : Integer; + var testchar : Char; + + ! reads file and puts each char the tree array + proc putFileToTree(filename : String, var tree : Tree) ~ + let + var count : Integer; + var newchar : Char + in begin + count := 1; + fopen(var filehandle, filename, false); + feof(filehandle, var testeof); + while \ testeof + do begin + + feol(filehandle, var testeol); + feof(filehandle, var testeof); + while \ testeol /\ \ testeof + do begin + fget(filehandle, var newchar); + tree[count] := newchar ; + count := count + 1; + feol(filehandle, var testeol); + feof(filehandle, var testeof); + end; + + feol(filehandle, var testeol); + while testeol + do begin + fgeteol(filehandle); + feol(filehandle, var testeol); + end; + + feof(filehandle, var testeof); + end; + fclose(filehandle) + end; + + ! search index of char in array + proc getIndexInTree(tree: Tree, wanted: Char, var position: Integer) ~ + begin + position := 1; + while \ (tree[position] = wanted) /\ (position <= (Arraylength + 1)) + do position := position + 1; + + if position = (Arraylength + 1) then + position := 0 + else; + end; + + + + + ! the REAL work + proc setNodeFromPI(var preorder : Tree , var inorder : Tree, var realtree: Tree, node : Integer, countPre: Integer) ~ + let + var countP : Integer; + var countI : Integer; + var posThis : Integer; + var posNext : Integer; + var posParent: Integer; + var leftChildIndex: Integer; + var rightChildIndex: Integer + in begin + + + ! if current node is not set + ! set it and calculate next node + if preorder[countPre] \= '_' then + + begin + countP := node; + countI := node; + leftChildIndex := (2*node); + rightChildIndex := (2*node)+1; + + puteol();put('-');put('-');put(preorder[countPre]);put('-');put('>');putint(node);puteol(); + !putint(node);put('<');put('-');putint(countPre);puteol(); + !put(realtree[node]);put('<');put('-');put(preorder[countPre]);puteol(); + + + ! put current preorder value to right place in real tree + realtree[node] := preorder[countPre]; + + ! find node and preorder successor in inorder + getIndexInTree(inorder, preorder[countPre], var posThis ); + getIndexInTree(inorder, preorder[countPre+1], var posNext ); + + ! if next element is left of current + if posNext < posThis then + ! posNext is in left subtree + begin + !realtree[leftChildIndex] := preorder[(node+1)]; + ! go down the tree on the left side + setNodeFromPI(var preorder, var inorder, var realtree, leftChildIndex, (countPre+1) ) + end + + else + begin + + ! otherwise calculate next position + !if posParent < posNext then + let + var helper : Integer; + var posReal: Integer; + var once: Integer + in begin + ! look whether element is left of parent + getIndexInTree(inorder, preorder[countPre-1], var posParent ); + !puteol();put('*');puteol();puteol(); + helper := 0; + once:=1; + + !find element of which current is left of + while (posParent < posNext) \/ (once = 1) do + begin + helper := helper + 1; + !putint(helper);put(':');putint(countPre-helper);put(preorder[countPre-helper]);puteol(); + getIndexInTree(inorder, preorder[countPre-helper], var posParent ); + once:= 0 + end; + !helper := helper - 1; + !puteol();put(':');putint(countPre-helper);put(':');put(preorder[(countPre-helper)]);puteol();puteol(); + + + if (countPre-helper) = 0 then begin + ! if gone above root - take root + helper := 1; + end else + begin + ! find position of element of which current is left in real tree + getIndexInTree(realtree, preorder[countPre-helper], var posReal ); + helper := (((posReal)*2)*2)+1 + end; + + + + + ! get empty place from there + while realtree[helper] \= '_' do + begin + helper := (helper*2)+1 + end; + + !puteol();put('!');putint(helper);put('!');put('!');putint(countPre);puteol(); + + ! put current element there + setNodeFromPI(var preorder, var inorder, var realtree, helper, (countPre+1) ) + end + !else + !begin + !puteol();put('#');puteol(); + !setNodeFromPI(var preorder, var inorder, var realtree, rightChildIndex, node ) + !realtree[rightChildIndex] := preorder[node]; + !end; + !realtree[rightChildIndex] := preorder[node]; + !setNodeFromPI(var preorder, var inorder, var realtree, , node) + end ; + end + else; + + end + + +in begin + ! initialisings + initLevel(); + initTree(var inorder); + initTree(var preorder); + initTree(var realtree); + + ! read files + initFileStringP(var filenameP); + initFileStringI(var filenameI); + + ! put file content in arrays + putFileToTree(filenameP, var preorder); + putFileToTree(filenameI, var inorder); + + !puteol();puteol();puteol();puteol(); + !put(':');put(preorder[1]);puteol(); + + ! start constructing real tree from node 1 + setNodeFromPI(var preorder , var inorder , var realtree, 1, 1); + + ! do output + put('I');put(':');puteol(); + printTree(inorder); + puteol();puteol(); + put('P');put(':');puteol(); + printTree(preorder); + !puteol();puteol();puteol();puteol();puteol(); + puteol();puteol(); + put('R');put(':');puteol(); + printTree(realtree); + +end; + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.odt b/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.odt new file mode 100644 index 00000000..840bd71e Binary files /dev/null and b/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.odt differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.pdf b/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.pdf new file mode 100644 index 00000000..24430b35 Binary files /dev/null and b/ws2011/Compiler I/Triangle-2.1-esa3/ExtraDocs/FileSupport.pdf differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/README b/ws2011/Compiler I/Triangle-2.1-esa3/README new file mode 100644 index 00000000..039ba090 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/README @@ -0,0 +1,33 @@ +Compile sources with + + javac Triangle/Compiler.java + javac TAM/Interpreter.java + javac TAM/Disassembler.java + javac TAM/Assembler.java + +Use compiler as follows: + + java Triangle.Compiler Examples/count.tri + + (this generates a TAM object file named Examples/count.tam) + +Run the executable as follows: + + java TAM.Interpreter + + , this will execute the file obj.tam, or + + java TAM.Interpreter Examples/count.tam + + to execute an arbitrary file. + +The TAM.Disassembler is used analogously. + +This is an expanded version of the both the compiler and the abstract machine. + +The compiler has been expanded with file I/O, see the documentation in +the ExtraDocs directory. + +Some of the initial memory limits were also increased: Programs may +now have up to 32729 instructions and address 32768 words of memory (shared +between heap and stack). diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Assembler.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Assembler.java new file mode 100644 index 00000000..37941dca --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Assembler.java @@ -0,0 +1,403 @@ +package TAM; + +/** + * TAM Assembler. + * + * (C) Univerity of Twente, + * Department of Computer Science, + * Formal Methods & Tools Group, + * Enschede, The Netherlands. + * + * contact: Theo C. Ruys (email: ruys@cs.utwente.nl) + * + * @author Matthijs Bomhoff (initial design and implementation) + * Theo Ruys (minor tweaking) + * @version 2003.04.13 + */ + +/* CHANGES + * o 2003.04.07 bomhoff Initial version. + * o 2003.04.13 ruys - Changed package name from triangle.assembler + * to TAM. + * - Relative addresses can be negative: + * added -? in the front of group 6 (d). + * - Added optional line-comments to a label and + * assembler line. + * - Added toString() to class Instruction for + * debugging the Assembler. + */ + +import java.util.*; +import java.io.*; +import java.util.regex.*; + +public class Assembler { + + protected static final Matcher commandMatcher = Pattern.compile( + "^\\s*" + //whitespace + "(([A-Za-z0-9_]+):)?" + //optional line number or label (group 2) + "\\s*" + //whitespace + "([A-Z]+)" + //opcode mnemonic (group 3) + "\\s*" + //whitespace + "(\\(([a-zA-Z0-9]+)\\))?" + //n (group 5) + "\\s*" + //whitespace + "(-?[a-zA-Z0-9]+)?" + //d (group 6) + "\\s*" + //whitespace + "(\\[([a-zA-Z0-9]+)\\])?" + //r (group 8) + "\\s*" + //whitespace + "(;.*)?" + // optional comment (group 10) + "\\s*$" //whitespace + ).matcher(""); + + protected static final Matcher labelMatcher = Pattern.compile( + "^\\s*" + //whitespace + "([A-Za-z0-9_]+)" + //labels (group 1) + ":" + //colon + "\\s*" + //whitespace + "(;.*)?" + // optional comment (group 2) + "\\s*$" //whitespace + ).matcher(""); + + protected static final Map labelMap = new HashMap(); + + public static void main(String[] args) throws Exception { + InputStream in = null; + OutputStream out = null; + if (args.length == 0) { + in = System.in; + out = System.out; + } + else if (args.length == 2) { + in = new FileInputStream(args[0]); + out = new FileOutputStream(args[1]); + } + else { + System.err.println("usage: Assemble [infile outfile]"); + System.exit(1); + } + assemble(in, out); + in.close(); + out.close(); + System.exit(0); + } + + public static void assemble(InputStream in, OutputStream out) throws IOException { + final BufferedReader buf = new BufferedReader(new InputStreamReader(in)); + final DataOutputStream dataOut = new DataOutputStream(out); + final List lines = new ArrayList(); + String line = null; + //read file into buffer + while ( (line = buf.readLine()) != null) { + lines.add(line); + } + final int totalLineCount = lines.size(); + + int labelLineCount = 0; + //first pass, extract labels + int codeLineNumber = 0; + Iterator iter = lines.iterator(); + while ( iter.hasNext() ) { + line = (String) iter.next(); + labelMatcher.reset(line); + commandMatcher.reset(line); + + if (labelMatcher.matches()) { + labelMap.put(labelMatcher.group(1), new Integer(codeLineNumber)); + labelLineCount++; + iter.remove(); //remove labels after adding them to the label map + } + else if (commandMatcher.matches()) { + if (commandMatcher.group(2) != null) { + labelMap.put(commandMatcher.group(2), new Integer(codeLineNumber)); + } + codeLineNumber++; + } + else { + //neither label, nor code, simply remove the line + iter.remove(); + } + } + //only _real_ code lines should be left in lines now + final int codeLineCount = lines.size(); + + //second pass, emit code + iter = lines.iterator(); + while ( iter.hasNext() ) { + line = (String) iter.next(); + Instruction instruction = instructionFromString(line); + if (instruction != null) { + instruction.write(dataOut); + } + } + System.err.println("Assembly results:\n" + + "lines in file: " + totalLineCount + "\n" + + "lines of code: " + codeLineCount + "\n" + + "label lines : " + labelLineCount + "\n" + + "lines ignored: " + (totalLineCount - codeLineCount - labelLineCount) + "\n" + ); + } + + public static Instruction instructionFromString(String str) { + Instruction result = null; + commandMatcher.reset(str); + //process command + if (commandMatcher.matches()) { + try { + final String opString = commandMatcher.group(3); + final String nString = commandMatcher.group(5); + final String dString = commandMatcher.group(6); + final String rString = commandMatcher.group(8); + + final int op = getOpcode(opString); + int n = 0; + int d = 0; + int r = 0; + switch (op) { + case 0: //LOAD + n = Integer.parseInt(nString); + d = Integer.parseInt(dString); + r = getRegister(rString); + result = new Instruction(op, r, n, d); + break; + case 1: //LOADA + d = Integer.parseInt(dString); + r = getRegister(rString); + result = new Instruction(op, r, n, d); + break; + case 2: //LOADI + n = Integer.parseInt(nString); + result = new Instruction(op, r, n, d); + break; + case 3: //LOADL + d = Integer.parseInt(dString); + result = new Instruction(op, r, n, d); + break; + case 4: //STORE + n = Integer.parseInt(nString); + d = Integer.parseInt(dString); + r = getRegister(rString); + result = new Instruction(op, r, n, d); + break; + case 5: //STOREI + n = Integer.parseInt(nString); + result = new Instruction(op, r, n, d); + break; + case 6: //CALL + if (isSubroutine(dString)) { + n = getRegister("SB"); + d = getSubroutine(dString); + r = getRegister("PB"); + } + else { + n = getRegister(nString); + final Integer labelLocation = (Integer) labelMap.get(dString); + if (labelLocation != null) { + d = labelLocation.intValue(); + } + else { + d = Integer.parseInt(dString); + } + r = getRegister(rString); + } + result = new Instruction(op, r, n, d); + break; + case 7: //CALLI + result = new Instruction(op, r, n, d); + break; + case 8: //RETURN + n = Integer.parseInt(nString); + d = Integer.parseInt(dString); + result = new Instruction(op, r, n, d); + break; + case 10: //PUSH + d = Integer.parseInt(dString); + result = new Instruction(op, r, n, d); + break; + case 11: //POP + n = Integer.parseInt(nString); + d = Integer.parseInt(dString); + result = new Instruction(op, r, n, d); + break; + case 12: //JUMP + { + final Integer labelLocation = (Integer) labelMap.get(dString); + if (labelLocation != null) { + d = labelLocation.intValue(); + } + else { + d = Integer.parseInt(dString); + } + } + r = getRegister(rString); + result = new Instruction(op, r, n, d); + break; + case 13: //JUMPI + result = new Instruction(op, r, n, d); + break; + case 14: //JUMPIF + n = Integer.parseInt(nString); + { + final Integer labelLocation = (Integer) labelMap.get(dString); + if (labelLocation != null) { + d = labelLocation.intValue(); + } + else { + d = Integer.parseInt(dString); + } + } + r = getRegister(rString); + result = new Instruction(op, r, n, d); + break; + case 15: //HALT + result = new Instruction(op, r, n, d); + break; + + default: + System.err.println("ERROR: opcode number " + op + "(\"" + opString + "\") unknown"); break; + } + } + catch (Exception e) { + System.err.println("ERROR: an " + e.getClass().toString().substring(6) + " occured, while parsing the line \"" + str + "\"... skipping..."); + } + } + else { + System.err.println("ERROR: line \"" + str + "\" does not match the (dis)assembler format... skipping..."); + } + return result; + } + + /** + * An inner class used to represent a single opcode + */ + public static final class Instruction { + public int op; + public int r; + public int n; + public int d; + + public Instruction(int op, int r, int n, int d) { + this.op = op; + this.r = r; + this.n = n; + this.d = d; + } + + public void write(DataOutputStream out) throws IOException { + out.writeInt(op); + out.writeInt(r); + out.writeInt(n); + out.writeInt(d); + } + + public String toString() { + return "" + op + "(" + n + ") " + d + "[" + r + "]"; + } + } + + /* + * Some functions to map strings to numbers + */ + + public static int getOpcode(String mnemonic) throws IllegalArgumentException { + Integer integer = (Integer) opcodeMap.get(mnemonic); + if (integer == null) throw new IllegalArgumentException("Opcode \"" + mnemonic + "\" unknown"); + return integer.intValue(); + } + + public static int getRegister(String name) throws IllegalArgumentException { + Integer integer = (Integer) registerMap.get(name); + if (integer == null) throw new IllegalArgumentException("Register \"" + name + "\" unknown"); + return integer.intValue(); + } + + public static boolean isSubroutine(String identifier) { + return subroutineMap.containsKey(identifier); + } + + public static int getSubroutine(String identifier) throws IllegalArgumentException { + Integer integer = (Integer) subroutineMap.get(identifier); + if (integer == null) throw new IllegalArgumentException("Subroutine \"" + identifier + "\" unknown"); + return integer.intValue(); + } + + /* + * Here comes the ugly part: + */ + private static final Map opcodeMap = new LinkedHashMap(); + private static final Map registerMap = new LinkedHashMap(); + private static final Map subroutineMap = new LinkedHashMap(); + + static { + opcodeMap.put("LOAD", new Integer(0)); + opcodeMap.put("LOADA", new Integer(1)); + opcodeMap.put("LOADI", new Integer(2)); + opcodeMap.put("LOADL", new Integer(3)); + opcodeMap.put("STORE", new Integer(4)); + opcodeMap.put("STOREI", new Integer(5)); + opcodeMap.put("CALL", new Integer(6)); + opcodeMap.put("CALLI", new Integer(7)); + opcodeMap.put("RETURN", new Integer(8)); + opcodeMap.put("PUSH", new Integer(10)); + opcodeMap.put("POP", new Integer(11)); + opcodeMap.put("JUMP", new Integer(12)); + opcodeMap.put("JUMPI", new Integer(13)); + opcodeMap.put("JUMPIF", new Integer(14)); + opcodeMap.put("HALT", new Integer(15)); + + registerMap.put("CB", new Integer(0)); + registerMap.put("CT", new Integer(1)); + registerMap.put("PB", new Integer(2)); + registerMap.put("PT", new Integer(3)); + registerMap.put("SB", new Integer(4)); + registerMap.put("ST", new Integer(5)); + registerMap.put("HB", new Integer(6)); + registerMap.put("HT", new Integer(7)); + registerMap.put("LB", new Integer(8)); + registerMap.put("L1", new Integer(8 + 1)); + registerMap.put("L2", new Integer(8 + 2)); + registerMap.put("L3", new Integer(8 + 3)); + registerMap.put("L4", new Integer(8 + 4)); + registerMap.put("L5", new Integer(8 + 5)); + registerMap.put("L6", new Integer(8 + 6)); + registerMap.put("CP", new Integer(15)); + + subroutineMap.put("id", new Integer(1)); + subroutineMap.put("not", new Integer(2)); + subroutineMap.put("and", new Integer(3)); + subroutineMap.put("or", new Integer(4)); + subroutineMap.put("succ", new Integer(5)); + subroutineMap.put("pred", new Integer(6)); + subroutineMap.put("neg", new Integer(7)); + subroutineMap.put("add", new Integer(8)); + subroutineMap.put("sub", new Integer(9)); + subroutineMap.put("mult", new Integer(10)); + subroutineMap.put("div", new Integer(11)); + subroutineMap.put("mod", new Integer(12)); + subroutineMap.put("lt", new Integer(13)); + subroutineMap.put("le", new Integer(14)); + subroutineMap.put("ge", new Integer(15)); + subroutineMap.put("gt", new Integer(16)); + subroutineMap.put("eq", new Integer(17)); + subroutineMap.put("ne", new Integer(18)); + subroutineMap.put("eol", new Integer(19)); + subroutineMap.put("eof", new Integer(20)); + subroutineMap.put("get", new Integer(21)); + subroutineMap.put("put", new Integer(22)); + subroutineMap.put("geteol", new Integer(23)); + subroutineMap.put("puteol", new Integer(24)); + subroutineMap.put("getint", new Integer(25)); + subroutineMap.put("putint", new Integer(26)); + subroutineMap.put("new", new Integer(27)); + subroutineMap.put("dispose", new Integer(28)); + subroutineMap.put("fopen", new Integer(29)); + subroutineMap.put("fgetint", new Integer(30)); + subroutineMap.put("fputint", new Integer(31)); + subroutineMap.put("fget", new Integer(32)); + subroutineMap.put("fput", new Integer(33)); + subroutineMap.put("fgeteol", new Integer(34)); + subroutineMap.put("fputeol", new Integer(35)); + subroutineMap.put("feol", new Integer(36)); + subroutineMap.put("feof", new Integer(37)); + subroutineMap.put("fclose", new Integer(38)); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Disassembler.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Disassembler.java new file mode 100644 index 00000000..a119068c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Disassembler.java @@ -0,0 +1,423 @@ +/* + * @(#)Disassembler.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package TAM; + +import java.io.DataInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +/** + * Disassembles the TAM code in the given file, and displays the + * instructions on standard output. + * + * For example: + *
+ *   java TAM.Disassembler obj.tam
+ * 
+ * + *

+ * Copyright 1991 David A. Watt, University of Glasgow
+ * Copyright 1998 Deryck F. Brown, The Robert Gordon University
+ *

+ * + */ + +public class Disassembler { + + static String objectName; + + static int CT; + + /** + * Writes the r-field of an instruction in the form "lregr", where + * l and r are the bracket characters to use. + * @param leftbracket the character to print before the register. + * @param r the number of the register. + * @param rightbracket the character to print after the register. + */ + private static void writeR (char leftbracket, int r, char rightbracket) { + + System.out.print(leftbracket); + switch (r) { + case Machine.CBr: + System.out.print ("CB"); + break; + case Machine.CTr: + System.out.print ("CT"); + break; + case Machine.PBr: + System.out.print ("PB"); + break; + case Machine.PTr: + System.out.print ("PT"); + break; + case Machine.SBr: + System.out.print ("SB"); + break; + case Machine.STr: + System.out.print ("ST"); + break; + case Machine.HBr: + System.out.print ("HB"); + break; + case Machine.HTr: + System.out.print ("HT"); + break; + case Machine.LBr: + System.out.print ("LB"); + break; + case Machine.L1r: + System.out.print ("L1"); + break; + case Machine.L2r: + System.out.print ("L2"); + break; + case Machine.L3r: + System.out.print ("L3"); + break; + case Machine.L4r: + System.out.print ("L4"); + break; + case Machine.L5r: + System.out.print ("L5"); + break; + case Machine.L6r: + System.out.print ("L6"); + break; + case Machine.CPr: + System.out.print ("CP"); + break; + } + System.out.print (rightbracket); + } + + /** + * Writes a void n-field of an instruction. + */ + private static void blankN() { + System.out.print (" "); + } + + // Writes the n-field of an instruction. + /** + * Writes the n-field of an instruction in the form "(n)". + * @param n the integer to write. + */ + private static void writeN (int n) { + System.out.print ("(" + n + ") "); + if (n < 10) + System.out.print (" "); + else if (n < 100) + System.out.print (" "); + } + + /** + * Writes the d-field of an instruction. + * @param d the integer to write. + */ + private static void writeD (int d) { + System.out.print (d); + } + + /** + * Writes the name of primitive routine with relative address d. + * @param d the displacment of the primitive routine. + */ + private static void writePrimitive (int d) { + switch (d) { + case Machine.idDisplacement: + System.out.print ("id "); + break; + case Machine.notDisplacement: + System.out.print ("not "); + break; + case Machine.andDisplacement: + System.out.print ("and "); + break; + case Machine.orDisplacement: + System.out.print ("or "); + break; + case Machine.succDisplacement: + System.out.print ("succ "); + break; + case Machine.predDisplacement: + System.out.print ("pred "); + break; + case Machine.negDisplacement: + System.out.print ("neg "); + break; + case Machine.addDisplacement: + System.out.print ("add "); + break; + case Machine.subDisplacement: + System.out.print ("sub "); + break; + case Machine.multDisplacement: + System.out.print ("mult "); + break; + case Machine.divDisplacement: + System.out.print ("div "); + break; + case Machine.modDisplacement: + System.out.print ("mod "); + break; + case Machine.ltDisplacement: + System.out.print ("lt "); + break; + case Machine.leDisplacement: + System.out.print ("le "); + break; + case Machine.geDisplacement: + System.out.print ("ge "); + break; + case Machine.gtDisplacement: + System.out.print ("gt "); + break; + case Machine.eqDisplacement: + System.out.print ("eq "); + break; + case Machine.neDisplacement: + System.out.print ("ne "); + break; + case Machine.eolDisplacement: + System.out.print ("eol "); + break; + case Machine.eofDisplacement: + System.out.print ("eof "); + break; + case Machine.getDisplacement: + System.out.print ("get "); + break; + case Machine.putDisplacement: + System.out.print ("put "); + break; + case Machine.geteolDisplacement: + System.out.print ("geteol "); + break; + case Machine.puteolDisplacement: + System.out.print ("puteol "); + break; + case Machine.getintDisplacement: + System.out.print ("getint "); + break; + case Machine.putintDisplacement: + System.out.print ("putint "); + break; + case Machine.newDisplacement: + System.out.print ("new "); + break; + case Machine.disposeDisplacement: + System.out.print ("dispose "); + break; + case Machine.fopenDisplacement: + System.out.print ("fopen "); + break; + case Machine.fgetintDisplacement: + System.out.print ("fgetint "); + break; + case Machine.fputintDisplacement: + System.out.print ("fputint "); + break; + case Machine.fgetDisplacement: + System.out.print ("fget "); + break; + case Machine.fputDisplacement: + System.out.print ("fput "); + break; + case Machine.fgeteolDisplacement: + System.out.print ("fgeteol "); + break; + case Machine.fputeolDisplacement: + System.out.print ("fputeol "); + break; + case Machine.feolDisplacement: + System.out.print ("feol "); + break; + case Machine.feofDisplacement: + System.out.print ("feof "); + break; + case Machine.fcloseDisplacement: + System.out.print ("fclose "); + break; + } + } + + /** + * Writes the given instruction in assembly-code format. + * @param instr the instruction to display. + */ + private static void writeInstruction (Instruction instr) { + + switch (instr.op) { + case Machine.LOADop: + System.out.print ("LOAD "); + writeN(instr.n); + writeD(instr.d); + writeR('[', instr.r, ']'); + break; + + case Machine.LOADAop: + System.out.print ("LOADA "); + blankN(); + writeD(instr.d); + writeR('[', instr.r, ']'); + break; + + case Machine.LOADIop: + System.out.print ("LOADI "); + writeN(instr.n); + break; + + case Machine.LOADLop: + System.out.print ("LOADL "); + blankN(); + writeD(instr.d); + break; + + case Machine.STOREop: + System.out.print ("STORE "); + writeN(instr.n); + writeD(instr.d); + writeR('[', instr.r, ']'); + break; + + case Machine.STOREIop: + System.out.print ("STOREI"); + writeN(instr.n); + break; + + case Machine.CALLop: + System.out.print ("CALL "); + if (instr.r == Machine.PBr) { + blankN(); + writePrimitive(instr.d); + } else { + writeR('(', instr.n, ')'); + System.out.print (" "); + writeD(instr.d); + writeR('[', instr.r, ']'); + } + break; + + case Machine.CALLIop: + System.out.print ("CALLI "); + break; + + case Machine.RETURNop: + System.out.print ("RETURN"); + writeN(instr.n); + writeD(instr.d); + break; + + case Machine.PUSHop: + System.out.print ("PUSH "); + blankN(); + writeD(instr.d); + break; + + case Machine.POPop: + System.out.print ("POP "); + writeN(instr.n); + writeD(instr.d); + break; + + case Machine.JUMPop: + System.out.print ("JUMP "); + blankN(); + writeD(instr.d); + writeR('[', instr.r, ']'); + break; + + case Machine.JUMPIop: + System.out.print ("JUMPI "); + break; + + case Machine.JUMPIFop: + System.out.print ("JUMPIF"); + writeN(instr.n); + writeD(instr.d); + writeR('[', instr.r, ']'); + break; + + case Machine.HALTop: + System.out.print ("HALT "); + } + } + + /** + * Writes all instructions of the program in code store. + */ + private static void disassembleProgram() { + for (int addr = Machine.CB; addr < CT; addr++) { + System.out.print (addr + ": "); + writeInstruction(Machine.code[addr]); + System.out.println(); + } + } + + +// LOADING + + /** + * Loads the TAM object program into code store from the named file. + * @param objectName the name of the file containing the program. + */ + static void loadObjectProgram (String objectName) { + + FileInputStream objectFile = null; + DataInputStream objectStream = null; + + int addr; + boolean finished = false; + + try { + objectFile = new FileInputStream (objectName); + objectStream = new DataInputStream (objectFile); + + addr = Machine.CB; + while (!finished) { + Machine.code[addr] = Instruction.read(objectStream); + if (Machine.code[addr] == null) + finished = true; + else + addr = addr + 1; + } + CT = addr; + objectFile.close(); + } catch (FileNotFoundException s) { + CT = Machine.CB; + System.err.println ("Error opening object file: " + s); + } catch (IOException s) { + CT = Machine.CB; + System.err.println ("Error reading object file: " + s); + } + } + + +// DISASSEMBLE + + public static void main(String[] args) { + System.out.println ("********** TAM Disassembler (Sun Version 2.1) **********"); + + if (args.length == 1) + objectName = args[0]; + else + objectName = "obj.tam"; + + loadObjectProgram(objectName); + disassembleProgram(); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/FileAccess.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/FileAccess.java new file mode 100644 index 00000000..02236f33 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/FileAccess.java @@ -0,0 +1,125 @@ +/** + * + */ +package TAM; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; + +/** + * @author Stefan Kropp + * + */ +public class FileAccess { + + private FileReader fr; + private BufferedReader br; + private FileWriter fw; + private BufferedWriter bw; + + private String filename; + private int filehandle; + + /** + * @param fr + * @param br + */ + public FileAccess(final FileReader fr, final BufferedReader br, + final String filename, final int filehandle) { + this.fr = fr; + this.br = br; + this.filename = filename; + this.filehandle = filehandle; + fw = null; + bw = null; + } + + /** + * @param fw + * @param bw + */ + public FileAccess(final FileWriter fw, final BufferedWriter bw, + final String filename, final int filehandle) { + this.fw = fw; + this.bw = bw; + this.filename = filename; + this.filehandle = filehandle; + fr = null; + br = null; + } + + public void closeAll() throws IOException { + if (br != null && fr != null) { + br.close(); + fr.close(); + } + if (bw != null && fw != null) { + bw.close(); + fw.close(); + } + } + + public boolean forReading() { + return fr != null; + } + + public boolean forWriting() { + return fw != null; + } + + /** + * @return Returns the filename. + */ + public String getFilename() { + return filename; + } + + /** + * @return Returns the br. + */ + public BufferedReader getBr() { + return br; + } + + /** + * @return Returns the bw. + */ + public BufferedWriter getBw() { + return bw; + } + + /** + * @return Returns the fr. + */ + public FileReader getFr() { + return fr; + } + + /** + * @return Returns the fw. + */ + public FileWriter getFw() { + return fw; + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object arg0) { + return filehandle == ((FileAccess)arg0).filehandle; + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return filehandle; + } + + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Instruction.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Instruction.java new file mode 100644 index 00000000..05cfa3fa --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Instruction.java @@ -0,0 +1,64 @@ +/* + * @(#)Instruction.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package TAM; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.EOFException; +import java.io.IOException; + +public class Instruction { + + public Instruction() { + op = 0; + r = 0; + n = 0; + d = 0; + } + + // Java has no type synonyms, so the following representations are + // assumed: + // + // type + // OpCode = 0..15; {4 bits unsigned} + // Length = 0..255; {8 bits unsigned} + // Operand = -32767..+32767; {16 bits signed} + + // Represents TAM instructions. + public int op; // OpCode + public int r; // RegisterNumber + public int n; // Length + public int d; // Operand + + public void write(DataOutputStream output) throws IOException { + output.writeInt (op); + output.writeInt (r); + output.writeInt (n); + output.writeInt (d); + } + + public static Instruction read(DataInputStream input) throws IOException { + Instruction inst = new Instruction(); + try { + inst.op = input.readInt(); + inst.r = input.readInt(); + inst.n = input.readInt(); + inst.d = input.readInt(); + return inst; + } catch (EOFException s) { + return null; + } + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Interpreter.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Interpreter.java new file mode 100644 index 00000000..0fa1a0bc --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Interpreter.java @@ -0,0 +1,945 @@ +/* + * @(#)Interpreter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package TAM; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.DataInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Hashtable; + +public class Interpreter { + + static String objectName; + + // DATA STORE + + final static int maxDataSize = 32768; // max 16b words in user data space (stack+heap) + static int[] data = new int[maxDataSize]; + + // DATA STORE REGISTERS AND OTHER REGISTERS + + final static int CB = 0, SB = 0, HB = maxDataSize; // = upper bound of data array + 1 + + static int CT, CP, ST, HT, LB, status; + + // status values + final static int running = 0, halted = 1, failedDataStoreFull = 2, + failedInvalidCodeAddress = 3, failedInvalidInstruction = 4, + failedOverflow = 5, failedZeroDivide = 6, failedIOError = 7; + + static long accumulator; + + // FILE MANAGEMENT VALUES + + private static int actualFilehandle = 10; + + private static Hashtable fileAccess = new Hashtable(); + + private static HashSet filesActive = new HashSet(); + + static int content(int r) { + // Returns the current content of register r, + // even if r is one of the pseudo-registers L1..L6. + + switch (r) { + case Machine.CBr: + return CB; + case Machine.CTr: + return CT; + case Machine.PBr: + return Machine.PB; + case Machine.PTr: + return Machine.PT; + case Machine.SBr: + return SB; + case Machine.STr: + return ST; + case Machine.HBr: + return HB; + case Machine.HTr: + return HT; + case Machine.LBr: + return LB; + case Machine.L1r: + return data[LB]; + case Machine.L2r: + return data[data[LB]]; + case Machine.L3r: + return data[data[data[LB]]]; + case Machine.L4r: + return data[data[data[data[LB]]]]; + case Machine.L5r: + return data[data[data[data[data[LB]]]]]; + case Machine.L6r: + return data[data[data[data[data[data[LB]]]]]]; + case Machine.CPr: + return CP; + default: + return 0; + } + } + + // PROGRAM STATUS + + static void dump() { + // Writes a summary of the machine state. + int addr, staticLink, dynamicLink, localRegNum; + + System.out.println(""); + System.out.println("State of data store and registers:"); + System.out.println(""); + if (HT == HB) + System.out + .println(" |--------| (heap is empty)"); + else { + System.out.println(" HB-->"); + System.out.println(" |--------|"); + for (addr = HB - 1; addr >= HT; addr--) { + System.out.print(addr + ":"); + if (addr == HT) + System.out.print(" HT-->"); + else + System.out.print(" "); + System.out.println("|" + data[addr] + "|"); + } + System.out.println(" |--------|"); + } + System.out.println(" |////////|"); + System.out.println(" |////////|"); + if (ST == SB) + System.out + .println(" |--------| (stack is empty)"); + else { + dynamicLink = LB; + staticLink = LB; + localRegNum = Machine.LBr; + System.out.println(" ST--> |////////|"); + System.out.println(" |--------|"); + for (addr = ST - 1; addr >= SB; addr--) { + System.out.print(addr + ":"); + if (addr == SB) + System.out.print(" SB-->"); + else if (addr == staticLink) { + switch (localRegNum) { + case Machine.LBr: + System.out.print(" LB-->"); + break; + case Machine.L1r: + System.out.print(" L1-->"); + break; + case Machine.L2r: + System.out.print(" L2-->"); + break; + case Machine.L3r: + System.out.print(" L3-->"); + break; + case Machine.L4r: + System.out.print(" L4-->"); + break; + case Machine.L5r: + System.out.print(" L5-->"); + break; + case Machine.L6r: + System.out.print(" L6-->"); + break; + } + staticLink = data[addr]; + localRegNum = localRegNum + 1; + } else + System.out.print(" "); + if ((addr == dynamicLink) && (dynamicLink != SB)) + System.out.print("|SL=" + data[addr] + "|"); + else if ((addr == dynamicLink + 1) && (dynamicLink != SB)) + System.out.print("|DL=" + data[addr] + "|"); + else if ((addr == dynamicLink + 2) && (dynamicLink != SB)) + System.out.print("|RA=" + data[addr] + "|"); + else + System.out.print("|" + data[addr] + "|"); + System.out.println(""); + if (addr == dynamicLink) { + System.out.println(" |--------|"); + dynamicLink = data[addr + 1]; + } + } + } + System.out.println(""); + } + + static void showStatus() { + // Writes an indication of whether and why the program has terminated. + System.out.println(""); + switch (status) { + case running: + System.out.println("Program is running."); + break; + case halted: + System.out.println("Program has halted normally."); + break; + case failedDataStoreFull: + System.out + .println("Program has failed due to exhaustion of Data Store."); + break; + case failedInvalidCodeAddress: + System.out + .println("Program has failed due to an invalid code address."); + break; + case failedInvalidInstruction: + System.out + .println("Program has failed due to an invalid instruction."); + break; + case failedOverflow: + System.out.println("Program has failed due to overflow."); + break; + case failedZeroDivide: + System.out.println("Program has failed due to division by zero."); + break; + case failedIOError: + System.out.println("Program has failed due to an IO error."); + break; + } + if (status != halted) + dump(); + } + + // INTERPRETATION + + static void checkSpace(int spaceNeeded) { + // Signals failure if there is not enough space to expand the stack or + // heap by spaceNeeded. + + if (HT - ST < spaceNeeded) + status = failedDataStoreFull; + } + + static boolean isTrue(int datum) { + // Tests whether the given datum represents true. + return (datum == Machine.trueRep); + } + + static boolean equal(int size, int addr1, int addr2) { + // Tests whether two multi-word objects are equal, given their common + // size and their base addresses. + + boolean eq; + int index; + + eq = true; + index = 0; + while (eq && (index < size)) + if (data[addr1 + index] == data[addr2 + index]) + index = index + 1; + else + eq = false; + return eq; + } + + static int overflowChecked(long datum) { + // Signals failure if the datum is too large to fit into a single word, + // otherwise returns the datum as a single word. + + if ((-Machine.maxintRep <= datum) && (datum <= Machine.maxintRep)) + return (int) datum; + else { + status = failedOverflow; + return 0; + } + } + + static int toInt(boolean b) { + return b ? Machine.trueRep : Machine.falseRep; + } + + static int currentChar; + + static int readInt() throws java.io.IOException { + int temp = 0; + int sign = 1; + + do { + currentChar = System.in.read(); + } while (Character.isWhitespace((char) currentChar)); + + if ((currentChar == '-') || (currentChar == '+')) + do { + sign = (currentChar == '-') ? -1 : 1; + currentChar = System.in.read(); + } while ((currentChar == '-') || currentChar == '+'); + + if (Character.isDigit((char) currentChar)) + do { + temp = temp * 10 + (currentChar - '0'); + currentChar = System.in.read(); + } while (Character.isDigit((char) currentChar)); + + return sign * temp; + } + + static void callPrimitive(int primitiveDisplacement) { + // Invokes the given primitive routine. + + int addr, size, filehandle; + char ch; + + // for dynamic profiling of primitives + ++Machine.primProfile[primitiveDisplacement]; + + switch (primitiveDisplacement) { + case Machine.idDisplacement: + break; // nothing to be done + case Machine.notDisplacement: + data[ST - 1] = toInt(!isTrue(data[ST - 1])); + break; + case Machine.andDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(isTrue(data[ST - 1]) & isTrue(data[ST])); + break; + case Machine.orDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(isTrue(data[ST - 1]) | isTrue(data[ST])); + break; + case Machine.succDisplacement: + data[ST - 1] = overflowChecked(data[ST - 1] + 1); + break; + case Machine.predDisplacement: + data[ST - 1] = overflowChecked(data[ST - 1] - 1); + break; + case Machine.negDisplacement: + data[ST - 1] = -data[ST - 1]; + break; + case Machine.addDisplacement: + ST = ST - 1; + accumulator = data[ST - 1]; + data[ST - 1] = overflowChecked(accumulator + data[ST]); + break; + case Machine.subDisplacement: + ST = ST - 1; + accumulator = data[ST - 1]; + data[ST - 1] = overflowChecked(accumulator - data[ST]); + break; + case Machine.multDisplacement: + ST = ST - 1; + accumulator = data[ST - 1]; + data[ST - 1] = overflowChecked(accumulator * data[ST]); + break; + case Machine.divDisplacement: + ST = ST - 1; + accumulator = data[ST - 1]; + if (data[ST] != 0) + data[ST - 1] = (int) (accumulator / data[ST]); + else + status = failedZeroDivide; + break; + case Machine.modDisplacement: + ST = ST - 1; + accumulator = data[ST - 1]; + if (data[ST] != 0) + data[ST - 1] = (int) (accumulator % data[ST]); + else + status = failedZeroDivide; + break; + case Machine.ltDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(data[ST - 1] < data[ST]); + break; + case Machine.leDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(data[ST - 1] <= data[ST]); + break; + case Machine.geDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(data[ST - 1] >= data[ST]); + break; + case Machine.gtDisplacement: + ST = ST - 1; + data[ST - 1] = toInt(data[ST - 1] > data[ST]); + break; + case Machine.eqDisplacement: + size = data[ST - 1]; // size of each comparand + ST = ST - 2 * size; + data[ST - 1] = toInt(equal(size, ST - 1, ST - 1 + size)); + break; + case Machine.neDisplacement: + size = data[ST - 1]; // size of each comparand + ST = ST - 2 * size; + data[ST - 1] = toInt(!equal(size, ST - 1, ST - 1 + size)); + break; + case Machine.eolDisplacement: + addr = data[ST - 1]; + data[addr] = toInt(currentChar == '\n'); + ST = ST - 1; + break; + case Machine.eofDisplacement: + addr = data[ST - 1]; + data[addr] = toInt(currentChar == -1); + ST = ST - 1; + break; + case Machine.getDisplacement: + ST = ST - 1; + addr = data[ST]; + try { + currentChar = System.in.read(); + } catch (java.io.IOException s) { + status = failedIOError; + } + data[addr] = (int) currentChar; + break; + case Machine.putDisplacement: + ST = ST - 1; + ch = (char) data[ST]; + System.out.print(ch); + break; + case Machine.geteolDisplacement: + try { + while ((currentChar = System.in.read()) != '\n') + ; + } catch (java.io.IOException s) { + status = failedIOError; + } + break; + case Machine.puteolDisplacement: + System.out.println(""); + break; + case Machine.getintDisplacement: + ST = ST - 1; + addr = data[ST]; + try { + accumulator = readInt(); + } catch (java.io.IOException s) { + status = failedIOError; + } + data[addr] = (int) accumulator; + break; + case Machine.putintDisplacement: + ST = ST - 1; + accumulator = data[ST]; + System.out.print(accumulator); + break; + case Machine.newDisplacement: + size = data[ST - 1]; + checkSpace(size); + HT = HT - size; + data[ST - 1] = HT; + break; + case Machine.disposeDisplacement: + ST = ST - 2; // no action taken at present + break; + case Machine.fopenDisplacement: + boolean writeAccess = isTrue(data[ST - 1]); + StringBuffer filename = new StringBuffer(); + for (int i = Machine.fileNameLength; i > 0; i--) { + if (data[ST - 1 - i] != 0) + filename.append((char) data[ST - 1 - i]); + } + int handleAddr = data[ST - Machine.fileNameLength - 2]; + data[handleAddr] = actualFilehandle; + ST = ST - 1 - Machine.fileNameLength - 1; + + if (filesActive.contains(filename.toString())) { + System.err.println("File is already open!"); + data[handleAddr] = -1; + break; + } + + if (!writeAccess) { + //read + try { + FileReader fr = new FileReader(filename.toString()); + BufferedReader br = new BufferedReader(fr); + FileAccess fa = new FileAccess(fr, br, filename.toString(), + actualFilehandle); + fileAccess.put(actualFilehandle++, fa); + filesActive.add(filename.toString()); + } catch (FileNotFoundException e) { + data[handleAddr] = -1; + } + } else { + //write + try { + try { + FileWriter fw = new FileWriter(filename.toString()); + BufferedWriter bw = new BufferedWriter(fw); + FileAccess fa = new FileAccess(fw, bw, filename + .toString(), actualFilehandle); + fileAccess.put(actualFilehandle++, fa); + filesActive.add(filename.toString()); + } catch (FileNotFoundException e) { + data[handleAddr] = -1; + } + } catch (IOException e) { + status = failedIOError; + } + } + break; + case Machine.fgetintDisplacement: + ST = ST - 1; + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + FileAccess fa = fileAccess.get(filehandle); + if (fa.forReading()) { + StringBuffer buf = new StringBuffer(""); + try { + while (true) { + fa.getBr().mark(2); + char c = (char) fa.getBr().read(); + if (c < '0' || c > '9') { + fa.getBr().reset(); + break; + } + buf.append(c); + } + + data[data[ST]] = Integer.parseInt(buf.toString()); + + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is write-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST -1; + break; + case Machine.fputintDisplacement: + ST = ST - 1; + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forWriting()) { + try { + String intValue = String.valueOf(data[ST]); + fileAccess.get(filehandle).getBw().write(intValue, 0, + intValue.length()); + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is read-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST -1; + break; + case Machine.fgetDisplacement: + ST = ST - 1; + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forReading()) { + try { + int dummy = fileAccess.get(filehandle).getBr().read(); + data[data[ST]] = dummy; + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is write-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST -1; + break; + case Machine.fputDisplacement: + ST = ST - 1; + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forWriting()) { + try { + fileAccess.get(filehandle).getBw().write(data[ST]); + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is read-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST -1; + break; + case Machine.fgeteolDisplacement: + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forReading()) { + try { + int dummy = fileAccess.get(filehandle).getBr().read(); + if (dummy != 10 && dummy != 13) { + System.err.println("Filehandling: wrong file format. Line feed expected!"); + status = failedIOError; + } + if (dummy == 13) { + fileAccess.get(filehandle).getBr().mark(2); + dummy = fileAccess.get(filehandle).getBr().read(); + if (dummy != 10) { + fileAccess.get(filehandle).getBr().reset(); + } + } + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is write-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST - 1; + break; + case Machine.fputeolDisplacement: + filehandle = data[ST - 1]; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forWriting()) { + try { + fileAccess.get(filehandle).getBw().newLine(); + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is read-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + ST = ST - 1; + break; + case Machine.feolDisplacement: + addr = data[ST - 1]; + filehandle = data[ST - 2]; + ST = ST - 2; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forReading()) { + try { + fileAccess.get(filehandle).getBr().mark(2); + int dummy = fileAccess.get(filehandle).getBr().read(); + if (dummy == 10 || dummy == 13) { + data[addr] = Machine.trueRep; + } else { + data[addr] = Machine.falseRep; + } + fileAccess.get(filehandle).getBr().reset(); + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is write-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + break; + case Machine.feofDisplacement: + addr = data[ST - 1]; + filehandle = data[ST - 2]; + ST = ST - 2; + + if (fileAccess.containsKey(filehandle)) { + if (fileAccess.get(filehandle).forReading()) { + try { + fileAccess.get(filehandle).getBr().mark(2); + int dummy = fileAccess.get(filehandle).getBr().read(); + if (dummy == -1) { + data[addr] = Machine.trueRep; + } else { + data[addr] = Machine.falseRep; + } + fileAccess.get(filehandle).getBr().reset(); + } catch (IOException e) { + status = failedIOError; + } + } else { + System.err.println("This file is write-only!"); + status = failedIOError; + } + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + break; + case Machine.fcloseDisplacement: + ST = ST - 1; + filehandle = data[ST]; + + if (fileAccess.containsKey(filehandle)) { + try { + fileAccess.get(filehandle).closeAll(); + } catch (IOException e) { + status = failedIOError; + } + filesActive.remove(fileAccess.get(filehandle).getFilename()); + } else { + System.err.println("This file is not open!"); + status = failedIOError; + } + break; + } + } + + static void interpretProgram() { + // Runs the program in code store. + + Instruction currentInstr; + int op, r, n, d, addr, index; + + // Initialize registers ... + ST = SB; + HT = HB; + LB = SB; + CP = CB; + status = running; + do { + // Fetch instruction ... + currentInstr = Machine.code[CP]; + // Decode instruction ... + op = currentInstr.op; + r = currentInstr.r; + n = currentInstr.n; + d = currentInstr.d; + + // dynamic profiling + ++Machine.execProfile[op]; + + // Execute instruction ... + switch (op) { + case Machine.LOADop: + addr = d + content(r); + checkSpace(n); + for (index = 0; index < n; index++) + data[ST + index] = data[addr + index]; + ST = ST + n; + CP = CP + 1; + break; + case Machine.LOADAop: + addr = d + content(r); + checkSpace(1); + data[ST] = addr; + ST = ST + 1; + CP = CP + 1; + break; + case Machine.LOADIop: + ST = ST - 1; + addr = data[ST]; + checkSpace(n); + for (index = 0; index < n; index++) + data[ST + index] = data[addr + index]; + ST = ST + n; + CP = CP + 1; + break; + case Machine.LOADLop: + checkSpace(1); + data[ST] = d; + ST = ST + 1; + CP = CP + 1; + break; + case Machine.STOREop: + addr = d + content(r); + ST = ST - n; + for (index = 0; index < n; index++) + data[addr + index] = data[ST + index]; + CP = CP + 1; + break; + case Machine.STOREIop: + ST = ST - 1; + addr = data[ST]; + ST = ST - n; + for (index = 0; index < n; index++) + data[addr + index] = data[ST + index]; + CP = CP + 1; + break; + case Machine.CALLop: + addr = d + content(r); + if (addr >= Machine.PB) { + callPrimitive(addr - Machine.PB); + CP = CP + 1; + } else { + checkSpace(3); + if ((0 <= n) && (n <= 15)) + data[ST] = content(n); // static link + else + status = failedInvalidInstruction; + data[ST + 1] = LB; // dynamic link + data[ST + 2] = CP + 1; // return address + LB = ST; + ST = ST + 3; + CP = addr; + } + break; + case Machine.CALLIop: + ST = ST - 2; + addr = data[ST + 1]; + if (addr >= Machine.PB) { + callPrimitive(addr - Machine.PB); + CP = CP + 1; + } else { + // data[ST] = static link already + data[ST + 1] = LB; // dynamic link + data[ST + 2] = CP + 1; // return address + LB = ST; + ST = ST + 3; + CP = addr; + } + break; + case Machine.RETURNop: + addr = LB - d; + CP = data[LB + 2]; + LB = data[LB + 1]; + ST = ST - n; + for (index = 0; index < n; index++) + data[addr + index] = data[ST + index]; + ST = addr + n; + break; + case Machine.PUSHop: + checkSpace(d); + ST = ST + d; + CP = CP + 1; + break; + case Machine.POPop: + addr = ST - n - d; + ST = ST - n; + for (index = 0; index < n; index++) + data[addr + index] = data[ST + index]; + ST = addr + n; + CP = CP + 1; + break; + case Machine.JUMPop: + CP = d + content(r); + break; + case Machine.JUMPIop: + ST = ST - 1; + CP = data[ST]; + break; + case Machine.JUMPIFop: + ST = ST - 1; + if (data[ST] == n) + CP = d + content(r); + else + CP = CP + 1; + break; + case Machine.HALTop: + status = halted; + break; + } + if ((CP < CB) || (CP >= CT)) + status = failedInvalidCodeAddress; + } while (status == running); + } + + // LOADING + + static void loadObjectProgram(String objectName) { + // Loads the TAM object program into code store from the named file. + + FileInputStream objectFile = null; + DataInputStream objectStream = null; + + int addr; + boolean finished = false; + + try { + objectFile = new FileInputStream(objectName); + objectStream = new DataInputStream(objectFile); + + addr = Machine.CB; + while (!finished) { + Machine.code[addr] = Instruction.read(objectStream); + if (Machine.code[addr] == null) + finished = true; + else + addr = addr + 1; + } + CT = addr; + objectFile.close(); + } catch (FileNotFoundException s) { + CT = CB; + System.err.println("Error opening object file: " + s); + } catch (IOException s) { + CT = CB; + System.err.println("Error reading object file: " + s); + } + } + + // DUMP PROFILE + + static void dumpProfile() { + System.err.println("\n"); + System.err.println("=== Dynamic Execution Profile ==="); + System.err.println(); + System.err.println("Instructions\n"); + int instrs=0, prims=0; + for (int i=0; i <= Machine.LASTop; ++i) { + System.err.format("%1$8s: %2$8d", Machine.mnemonics[i], Machine.execProfile[i]); + instrs += Machine.execProfile[i]; + if ((i+1) % 4 == 0) + System.err.println(); + } + System.err.println("\nIntrinsic Functions\n"); + for (int i=0; i <= Machine.maxPrimitives; ++i) { + System.err.format("%1$8s: %2$8d", Machine.primnames[i], Machine.primProfile[i]); + prims += Machine.primProfile[i]; + if ((i+1) % 4 == 0) + System.err.println(); + } + System.err.format("\n\nTotal instructions: %1$7d primitives: %2$7d\n", instrs, prims); + } + + // RUNNING + + public static void main(String[] args) { + System.out + .println("********** TAM Interpreter (Java Version 2.1esa3) **********"); + + if (args.length == 1) + objectName = args[0]; + else + objectName = "obj.tam"; + + loadObjectProgram(objectName); + if (CT != CB) { + interpretProgram(); + showStatus(); + + dumpProfile(); + + System.exit(status == halted ? 0 : 1 ); + } + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Machine.java b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Machine.java new file mode 100644 index 00000000..cd0fd98b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/TAM/Machine.java @@ -0,0 +1,167 @@ +/* + * @(#)Machine.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package TAM; + +public final class Machine { + + public final static int fileNameLength = 20; // all filenames are array fileNameLength of Char, chr(0) to indicate end-of-string + + public final static int + maxRoutineLevel = 7; + +// WORDS AND ADDRESSES + +// Java has no type synonyms, so the following representations are +// assumed: +// +// type +// Word = -32767..+32767; {16 bits signed} +// DoubleWord = -2147483648..+2147483647; {32 bits signed} +// CodeAddress = 0..+32767; {15 bits unsigned} +// DataAddress = 0..+32767; {15 bits unsigned} + + +// INSTRUCTIONS + + // Operation codes + public final static int + LOADop = 0, + LOADAop = 1, + LOADIop = 2, + LOADLop = 3, + STOREop = 4, + STOREIop = 5, + CALLop = 6, + CALLIop = 7, + RETURNop = 8, + PUSHop = 10, + POPop = 11, + JUMPop = 12, + JUMPIop = 13, + JUMPIFop = 14, + HALTop = 15, + LASTop = HALTop; + + public final static String[] mnemonics = { + "LOAD", "LOADA", "LOADI", "LOADL", "STORE", "STOREI", "CALL", "CALLI", "RETURN", "ILL", "PUSH", "POP", "JUMP", "JUMPI", + "JUMPIF", "HALT" +}; + +// CODE STORE + public final static int maxPrimitives = 38; // number of user defined primitives + + public final static int maxCodeSize = 32767-maxPrimitives; // max size of user code store in words + + public static Instruction[] code = new Instruction[maxCodeSize]; + + +// CODE STORE REGISTERS + + public final static int + CB = 0, + PB = maxCodeSize, // = upper bound of code array + 1 + PT = PB+maxPrimitives; + +// REGISTER NUMBERS + + public final static int + CBr = 0, + CTr = 1, + PBr = 2, + PTr = 3, + SBr = 4, + STr = 5, + HBr = 6, + HTr = 7, + LBr = 8, + L1r = LBr + 1, + L2r = LBr + 2, + L3r = LBr + 3, + L4r = LBr + 4, + L5r = LBr + 5, + L6r = LBr + 6, + CPr = 15; + + +// DATA REPRESENTATION + + public final static int + booleanSize = 1, + characterSize = 1, + integerSize = 1, + addressSize = 1, + closureSize = 2 * addressSize, + + linkDataSize = 3 * addressSize, + + falseRep = 0, + trueRep = 1, + maxintRep = 32767; + + +// ADDRESSES OF PRIMITIVE ROUTINES + + public final static int + idDisplacement = 1, + notDisplacement = 2, + andDisplacement = 3, + orDisplacement = 4, + succDisplacement = 5, + predDisplacement = 6, + negDisplacement = 7, + addDisplacement = 8, + subDisplacement = 9, + multDisplacement = 10, + divDisplacement = 11, + modDisplacement = 12, + ltDisplacement = 13, + leDisplacement = 14, + geDisplacement = 15, + gtDisplacement = 16, + eqDisplacement = 17, + neDisplacement = 18, + eolDisplacement = 19, + eofDisplacement = 20, + getDisplacement = 21, + putDisplacement = 22, + geteolDisplacement = 23, + puteolDisplacement = 24, + getintDisplacement = 25, + putintDisplacement = 26, + newDisplacement = 27, + disposeDisplacement = 28, + fopenDisplacement = 29, + fgetintDisplacement = 30, + fputintDisplacement = 31, + fgetDisplacement = 32, + fputDisplacement = 33, + fgeteolDisplacement = 34, + fputeolDisplacement = 35, + feolDisplacement = 36, + feofDisplacement = 37, + fcloseDisplacement = maxPrimitives; // 38 + + + public static final String[] primnames = { + "err", "id", "not", "and", "or", "succ", "pred", "neg", "add", "sub", "mult", "div", "mod", "lt", "le", "ge", + "gt", "eq", "ne", "eol", "eof", "get", "put", "geteol", "puteol", "getint", "putint", "new", "dispose", + "fopen", "fgetint", "fputint", "fget", "fput", "fgeteol", "fputeol", "feol", "feof", "fclose" + }; + + // for dynamic profiling + public final static int[] execProfile=new int[LASTop+1]; + public final static int[] primProfile=new int[maxPrimitives+2]; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/.DS_Store b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/.DS_Store new file mode 100644 index 00000000..3ebba5a1 Binary files /dev/null and b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/.DS_Store differ diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AST.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AST.java new file mode 100644 index 00000000..68540c46 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AST.java @@ -0,0 +1,35 @@ +/* + * @(#)AST.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.CodeGenerator.RuntimeEntity; +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class AST { + + public AST (SourcePosition thePosition) { + position = thePosition; + entity = null; + } + + public SourcePosition getPosition() { + return position; + } + + public abstract Object visit(Visitor v, Object o); + + public SourcePosition position; + public RuntimeEntity entity; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameter.java new file mode 100644 index 00000000..92631f68 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameter.java @@ -0,0 +1,24 @@ +/* + * @(#)ActualParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class ActualParameter extends AST { + + public ActualParameter (SourcePosition thePosition) { + super (thePosition); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameterSequence.java new file mode 100644 index 00000000..956ebd06 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ActualParameterSequence.java @@ -0,0 +1,24 @@ +/* + * @(#)ActualParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class ActualParameterSequence extends AST { + + public ActualParameterSequence (SourcePosition thePosition) { + super (thePosition); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AnyTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AnyTypeDenoter.java new file mode 100644 index 00000000..3114d071 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AnyTypeDenoter.java @@ -0,0 +1,32 @@ +/* + * @(#)AnyTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class AnyTypeDenoter extends TypeDenoter { + + public AnyTypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitAnyTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + return false; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayAggregate.java new file mode 100644 index 00000000..8a7936d7 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayAggregate.java @@ -0,0 +1,27 @@ +/* + * @(#)ArrayAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class ArrayAggregate extends AST { + + public ArrayAggregate (SourcePosition thePosition) { + super (thePosition); + elemCount = 0; + } + + public int elemCount; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayExpression.java new file mode 100644 index 00000000..786214bf --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayExpression.java @@ -0,0 +1,32 @@ +/* + * @(#)ArrayExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ArrayExpression extends Expression { + + public ArrayExpression (ArrayAggregate aaAST, + SourcePosition thePosition) { + super (thePosition); + AA = aaAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitArrayExpression(this, o); + } + + public ArrayAggregate AA; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayTypeDenoter.java new file mode 100644 index 00000000..dffbce72 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ArrayTypeDenoter.java @@ -0,0 +1,44 @@ +/* + * @(#)ArrayTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ArrayTypeDenoter extends TypeDenoter { + + public ArrayTypeDenoter (IntegerLiteral ilAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + IL = ilAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitArrayTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof ErrorTypeDenoter) + return true; + else if (obj != null && obj instanceof ArrayTypeDenoter) + return this.IL.spelling.compareTo(((ArrayTypeDenoter) obj).IL.spelling) == 0 && + this.T.equals(((ArrayTypeDenoter) obj).T); + else + return false; + } + + public IntegerLiteral IL; + public TypeDenoter T; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AssignCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AssignCommand.java new file mode 100644 index 00000000..be9bb34c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/AssignCommand.java @@ -0,0 +1,33 @@ +/* + * @(#)AssignCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class AssignCommand extends Command { + + public AssignCommand (Vname vAST, Expression eAST, SourcePosition thePosition) { + super (thePosition); + V = vAST; + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitAssignCommand(this, o); + } + + public Vname V; + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryExpression.java new file mode 100644 index 00000000..838f9e07 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryExpression.java @@ -0,0 +1,35 @@ +/* + * @(#)BinaryExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class BinaryExpression extends Expression { + + public BinaryExpression (Expression e1AST, Operator oAST, Expression e2AST, + SourcePosition thePosition) { + super (thePosition); + O = oAST; + E1 = e1AST; + E2 = e2AST; + } + + public Object visit(Visitor v, Object o) { + return v.visitBinaryExpression(this, o); + } + + public Expression E1, E2; + public Operator O; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryOperatorDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryOperatorDeclaration.java new file mode 100644 index 00000000..29adba02 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BinaryOperatorDeclaration.java @@ -0,0 +1,37 @@ +/* + * @(#)BinaryOperatorDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class BinaryOperatorDeclaration extends Declaration { + + public BinaryOperatorDeclaration (Operator oAST, TypeDenoter arg1AST, + TypeDenoter arg2AST, TypeDenoter resultAST, + SourcePosition thePosition) { + super (thePosition); + O = oAST; + ARG1 = arg1AST; + ARG2 = arg2AST; + RES = resultAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitBinaryOperatorDeclaration(this, o); + } + + public Operator O; + public TypeDenoter ARG1, ARG2, RES; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BoolTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BoolTypeDenoter.java new file mode 100644 index 00000000..3ce8c88a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/BoolTypeDenoter.java @@ -0,0 +1,35 @@ +/* + * @(#)BoolTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class BoolTypeDenoter extends TypeDenoter { + + public BoolTypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitBoolTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if ((obj != null) && (obj instanceof ErrorTypeDenoter)) + return true; + else + return ((obj != null) && (obj instanceof BoolTypeDenoter)); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallCommand.java new file mode 100644 index 00000000..f933875e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallCommand.java @@ -0,0 +1,34 @@ +/* + * @(#)CallCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class CallCommand extends Command { + + public CallCommand (Identifier iAST, ActualParameterSequence apsAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + APS = apsAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitCallCommand(this, o); + } + + public Identifier I; + public ActualParameterSequence APS; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallExpression.java new file mode 100644 index 00000000..619af78f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CallExpression.java @@ -0,0 +1,34 @@ +/* + * @(#)CallExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class CallExpression extends Expression { + + public CallExpression (Identifier iAST, ActualParameterSequence apsAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + APS = apsAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitCallExpression(this, o); + } + + public Identifier I; + public ActualParameterSequence APS; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharTypeDenoter.java new file mode 100644 index 00000000..a71306c6 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharTypeDenoter.java @@ -0,0 +1,35 @@ +/* + * @(#)CharTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class CharTypeDenoter extends TypeDenoter { + + public CharTypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitCharTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof ErrorTypeDenoter) + return true; + else + return (obj != null && obj instanceof CharTypeDenoter); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterExpression.java new file mode 100644 index 00000000..9a2f26b1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterExpression.java @@ -0,0 +1,31 @@ +/* + * @(#)CharacterExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class CharacterExpression extends Expression { + + public CharacterExpression (CharacterLiteral clAST, SourcePosition thePosition) { + super (thePosition); + CL = clAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitCharacterExpression(this, o); + } + + public CharacterLiteral CL; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterLiteral.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterLiteral.java new file mode 100644 index 00000000..96715b54 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/CharacterLiteral.java @@ -0,0 +1,29 @@ +/* + * @(#)CharacterLiteral.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class CharacterLiteral extends Terminal { + + public CharacterLiteral (String theSpelling, SourcePosition thePosition) { + super (theSpelling, thePosition); + } + + public Object visit (Visitor v, Object o) { + return v.visitCharacterLiteral(this, o); + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Command.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Command.java new file mode 100644 index 00000000..e2b5a8be --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Command.java @@ -0,0 +1,24 @@ +/* + * @(#)Command.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class Command extends AST { + + public Command (SourcePosition thePosition) { + super (thePosition); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstActualParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstActualParameter.java new file mode 100644 index 00000000..543bd2de --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstActualParameter.java @@ -0,0 +1,31 @@ +/* + * @(#)ConstActualParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ConstActualParameter extends ActualParameter { + + public ConstActualParameter (Expression eAST, SourcePosition thePosition) { + super (thePosition); + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitConstActualParameter(this, o); + } + + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstDeclaration.java new file mode 100644 index 00000000..82cb7c4c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstDeclaration.java @@ -0,0 +1,34 @@ +/* + * @(#)ConstDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ConstDeclaration extends Declaration { + + public ConstDeclaration (Identifier iAST, Expression eAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitConstDeclaration(this, o); + } + + public Identifier I; + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstFormalParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstFormalParameter.java new file mode 100644 index 00000000..8d4fd395 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ConstFormalParameter.java @@ -0,0 +1,42 @@ +/* + * @(#)ConstFormalParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ConstFormalParameter extends FormalParameter { + + public ConstFormalParameter (Identifier iAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitConstFormalParameter(this, o); + } + + public Identifier I; + public TypeDenoter T; + + public boolean equals (Object fpAST) { + if (fpAST instanceof ConstFormalParameter) { + ConstFormalParameter cfpAST = (ConstFormalParameter) fpAST; + return T.equals(cfpAST.T); + } else + return false; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Declaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Declaration.java new file mode 100644 index 00000000..c03901d5 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Declaration.java @@ -0,0 +1,28 @@ +/* + * @(#)Declaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class Declaration extends AST { + + public Declaration (SourcePosition thePosition) { + super (thePosition); + duplicated = false; + } + + public boolean duplicated; +} + \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/DotVname.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/DotVname.java new file mode 100644 index 00000000..b40f9f74 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/DotVname.java @@ -0,0 +1,33 @@ +/* + * @(#)DotVname.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class DotVname extends Vname { + + public DotVname (Vname vAST, Identifier iAST, SourcePosition thePosition) { + super (thePosition); + V = vAST; + I = iAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitDotVname(this, o); + } + + public Identifier I; + public Vname V; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyActualParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyActualParameterSequence.java new file mode 100644 index 00000000..0c23ce99 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyActualParameterSequence.java @@ -0,0 +1,28 @@ +/* + * @(#)EmptyActualParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class EmptyActualParameterSequence extends ActualParameterSequence { + + public EmptyActualParameterSequence (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitEmptyActualParameterSequence(this, o); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyCommand.java new file mode 100644 index 00000000..8f5f2688 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyCommand.java @@ -0,0 +1,28 @@ +/* + * @(#)EmptyCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class EmptyCommand extends Command { + + public EmptyCommand (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitEmptyCommand(this, o); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyExpression.java new file mode 100644 index 00000000..cc80091f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyExpression.java @@ -0,0 +1,28 @@ +/* + * @(#)EmptyExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class EmptyExpression extends Expression { + + public EmptyExpression (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitEmptyExpression(this, o); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyFormalParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyFormalParameterSequence.java new file mode 100644 index 00000000..21c67bcd --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/EmptyFormalParameterSequence.java @@ -0,0 +1,32 @@ +/* + * @(#)EmptyFormalParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class EmptyFormalParameterSequence extends FormalParameterSequence { + + public EmptyFormalParameterSequence (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitEmptyFormalParameterSequence(this, o); + } + + public boolean equals(Object fpsAST) { + return (fpsAST instanceof EmptyFormalParameterSequence); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ErrorTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ErrorTypeDenoter.java new file mode 100644 index 00000000..32a8f2a3 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ErrorTypeDenoter.java @@ -0,0 +1,32 @@ +/* + * @(#)ErrorTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ErrorTypeDenoter extends TypeDenoter { + + public ErrorTypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit (Visitor v, Object o) { + return v.visitErrorTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + return true; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Expression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Expression.java new file mode 100644 index 00000000..c4d3adf7 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Expression.java @@ -0,0 +1,27 @@ +/* + * @(#)Expression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class Expression extends AST { + + public Expression (SourcePosition thePosition) { + super (thePosition); + type = null; + } + + public TypeDenoter type; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FieldTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FieldTypeDenoter.java new file mode 100644 index 00000000..3cf84fad --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FieldTypeDenoter.java @@ -0,0 +1,26 @@ +/* + * @(#)FieldTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class FieldTypeDenoter extends TypeDenoter { + + public FieldTypeDenoter(SourcePosition thePosition) { + super (thePosition); + } + + public abstract boolean equals (Object obj); +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameter.java new file mode 100644 index 00000000..7dd3e4cd --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameter.java @@ -0,0 +1,27 @@ +/* + * @(#)FormalParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class FormalParameter extends Declaration { + + public FormalParameter (SourcePosition thePosition) { + super (thePosition); + } + + public abstract boolean equals (Object fpAST); + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameterSequence.java new file mode 100644 index 00000000..6ff45554 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FormalParameterSequence.java @@ -0,0 +1,26 @@ +/* + * @(#)FormalParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class FormalParameterSequence extends AST { + + public FormalParameterSequence (SourcePosition thePosition) { + super (thePosition); + } + + public abstract boolean equals(Object fpsAST); +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncActualParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncActualParameter.java new file mode 100644 index 00000000..78208f3b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncActualParameter.java @@ -0,0 +1,31 @@ +/* + * @(#)FuncActualParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class FuncActualParameter extends ActualParameter { + + public FuncActualParameter (Identifier iAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitFuncActualParameter(this, o); + } + + public Identifier I; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncDeclaration.java new file mode 100644 index 00000000..eece36cc --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncDeclaration.java @@ -0,0 +1,39 @@ +/* + * @(#)FuncDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class FuncDeclaration extends Declaration { + + public FuncDeclaration (Identifier iAST, FormalParameterSequence fpsAST, + TypeDenoter tAST, Expression eAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + FPS = fpsAST; + T = tAST; + E = eAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitFuncDeclaration(this, o); + } + + public Identifier I; + public FormalParameterSequence FPS; + public TypeDenoter T; + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncFormalParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncFormalParameter.java new file mode 100644 index 00000000..c1cfc113 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/FuncFormalParameter.java @@ -0,0 +1,44 @@ +/* + * @(#)FuncFormalParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class FuncFormalParameter extends FormalParameter { + + public FuncFormalParameter (Identifier iAST, FormalParameterSequence fpsAST, + TypeDenoter tAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + FPS = fpsAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitFuncFormalParameter(this, o); + } + + public boolean equals (Object fpAST) { + if (fpAST instanceof FuncFormalParameter) { + FuncFormalParameter ffpAST = (FuncFormalParameter) fpAST; + return FPS.equals(ffpAST.FPS) && T.equals(ffpAST.T); + } else + return false; + } + + public Identifier I; + public FormalParameterSequence FPS; + public TypeDenoter T; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Identifier.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Identifier.java new file mode 100644 index 00000000..91b4e0ae --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Identifier.java @@ -0,0 +1,33 @@ +/* + * @(#)Identifier.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class Identifier extends Terminal { + + public Identifier (String theSpelling, SourcePosition thePosition) { + super (theSpelling, thePosition); + type = null; + decl = null; + } + + public Object visit(Visitor v, Object o) { + return v.visitIdentifier(this, o); + } + + public TypeDenoter type; + public AST decl; // Either a Declaration or a FieldTypeDenoter +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfCommand.java new file mode 100644 index 00000000..6b194c90 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfCommand.java @@ -0,0 +1,35 @@ +/* + * @(#)IfCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class IfCommand extends Command { + + public IfCommand (Expression eAST, Command c1AST, Command c2AST, + SourcePosition thePosition) { + super (thePosition); + E = eAST; + C1 = c1AST; + C2 = c2AST; + } + + public Object visit(Visitor v, Object o) { + return v.visitIfCommand(this, o); + } + + public Expression E; + public Command C1, C2; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfExpression.java new file mode 100644 index 00000000..49a3f90b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IfExpression.java @@ -0,0 +1,34 @@ +/* + * @(#)IfExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class IfExpression extends Expression { + + public IfExpression (Expression e1AST, Expression e2AST, Expression e3AST, + SourcePosition thePosition) { + super (thePosition); + E1 = e1AST; + E2 = e2AST; + E3 = e3AST; + } + + public Object visit(Visitor v, Object o) { + return v.visitIfExpression(this, o); + } + + public Expression E1, E2, E3; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntTypeDenoter.java new file mode 100644 index 00000000..8667add3 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntTypeDenoter.java @@ -0,0 +1,35 @@ +/* + * @(#)IntTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class IntTypeDenoter extends TypeDenoter { + + public IntTypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public Object visit (Visitor v, Object o) { + return v.visitIntTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof ErrorTypeDenoter) + return true; + else + return (obj != null && obj instanceof IntTypeDenoter); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerExpression.java new file mode 100644 index 00000000..2c93852f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerExpression.java @@ -0,0 +1,31 @@ +/* + * @(#)IntegerExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class IntegerExpression extends Expression { + + public IntegerExpression (IntegerLiteral ilAST, SourcePosition thePosition) { + super (thePosition); + IL = ilAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitIntegerExpression(this, o); + } + + public IntegerLiteral IL; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerLiteral.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerLiteral.java new file mode 100644 index 00000000..2a9dede1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/IntegerLiteral.java @@ -0,0 +1,29 @@ +/* + * @(#)IntegerLiteral.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class IntegerLiteral extends Terminal { + + public IntegerLiteral (String theSpelling, SourcePosition thePosition) { + super (theSpelling, thePosition); + } + + public Object visit(Visitor v, Object o) { + return v.visitIntegerLiteral(this, o); + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetCommand.java new file mode 100644 index 00000000..887285b4 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetCommand.java @@ -0,0 +1,33 @@ +/* + * @(#)LetCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class LetCommand extends Command { + + public LetCommand (Declaration dAST, Command cAST, SourcePosition thePosition) { + super (thePosition); + D = dAST; + C = cAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitLetCommand(this, o); + } + + public Declaration D; + public Command C; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetExpression.java new file mode 100644 index 00000000..0d1fbaee --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/LetExpression.java @@ -0,0 +1,33 @@ +/* + * @(#)LetExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class LetExpression extends Expression { + + public LetExpression (Declaration dAST, Expression eAST, SourcePosition thePosition) { + super (thePosition); + D = dAST; + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitLetExpression(this, o); + } + + public Declaration D; + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleActualParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleActualParameterSequence.java new file mode 100644 index 00000000..4963ff50 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleActualParameterSequence.java @@ -0,0 +1,34 @@ +/* + * @(#)MultipleActualParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class MultipleActualParameterSequence extends ActualParameterSequence { + + public MultipleActualParameterSequence (ActualParameter apAST, ActualParameterSequence apsAST, + SourcePosition thePosition) { + super (thePosition); + AP = apAST; + APS = apsAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitMultipleActualParameterSequence(this, o); + } + + public ActualParameter AP; + public ActualParameterSequence APS; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleArrayAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleArrayAggregate.java new file mode 100644 index 00000000..f2f49a4c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleArrayAggregate.java @@ -0,0 +1,34 @@ +/* + * @(#)MultipleArrayAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class MultipleArrayAggregate extends ArrayAggregate { + + public MultipleArrayAggregate (Expression eAST, ArrayAggregate aaAST, + SourcePosition thePosition) { + super (thePosition); + E = eAST; + AA = aaAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitMultipleArrayAggregate(this, o); + } + + public Expression E; + public ArrayAggregate AA; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFieldTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFieldTypeDenoter.java new file mode 100644 index 00000000..4ec6a68a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFieldTypeDenoter.java @@ -0,0 +1,46 @@ +/* + * @(#)MultipleFieldTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class MultipleFieldTypeDenoter extends FieldTypeDenoter { + + public MultipleFieldTypeDenoter (Identifier iAST, TypeDenoter tAST, FieldTypeDenoter ftAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + FT = ftAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitMultipleFieldTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof MultipleFieldTypeDenoter) { + MultipleFieldTypeDenoter ft = (MultipleFieldTypeDenoter) obj; + return (this.I.spelling.compareTo(ft.I.spelling) == 0) && + this.T.equals(ft.T) && + this.FT.equals(ft.FT); + } else + return false; + } + + public Identifier I; + public TypeDenoter T; + public FieldTypeDenoter FT; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFormalParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFormalParameterSequence.java new file mode 100644 index 00000000..8e3062b1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleFormalParameterSequence.java @@ -0,0 +1,43 @@ +/* + * @(#)MultipleFormalParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class MultipleFormalParameterSequence extends FormalParameterSequence { + + public MultipleFormalParameterSequence (FormalParameter fpAST, FormalParameterSequence fpsAST, + SourcePosition thePosition) { + super (thePosition); + FP = fpAST; + FPS = fpsAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitMultipleFormalParameterSequence(this, o); + } + + public boolean equals(Object fpsAST) { + if (fpsAST instanceof MultipleFormalParameterSequence) { + MultipleFormalParameterSequence mfpsAST = + (MultipleFormalParameterSequence) fpsAST; + return FP.equals(mfpsAST.FP) && FPS.equals(mfpsAST.FPS); + } else + return false; + } + + public FormalParameter FP; + public FormalParameterSequence FPS; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleRecordAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleRecordAggregate.java new file mode 100644 index 00000000..7ca8ac29 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/MultipleRecordAggregate.java @@ -0,0 +1,36 @@ +/* + * @(#)MultipleRecordAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class MultipleRecordAggregate extends RecordAggregate { + + public MultipleRecordAggregate (Identifier iAST, Expression eAST, RecordAggregate raAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + E = eAST; + RA = raAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitMultipleRecordAggregate(this, o); + } + + public Identifier I; + public Expression E; + public RecordAggregate RA; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Operator.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Operator.java new file mode 100644 index 00000000..2061de52 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Operator.java @@ -0,0 +1,31 @@ +/* + * @(#)Operator.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class Operator extends Terminal { + + public Operator (String theSpelling, SourcePosition thePosition) { + super (theSpelling, thePosition); + decl = null; + } + + public Object visit(Visitor v, Object o) { + return v.visitOperator(this, o); + } + + public Declaration decl; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcActualParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcActualParameter.java new file mode 100644 index 00000000..c97f04b4 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcActualParameter.java @@ -0,0 +1,31 @@ +/* + * @(#)ProcActualParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ProcActualParameter extends ActualParameter { + + public ProcActualParameter (Identifier iAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitProcActualParameter(this, o); + } + + public Identifier I; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcDeclaration.java new file mode 100644 index 00000000..d8151167 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcDeclaration.java @@ -0,0 +1,36 @@ +/* + * @(#)ProcDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ProcDeclaration extends Declaration { + + public ProcDeclaration (Identifier iAST, FormalParameterSequence fpsAST, + Command cAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + FPS = fpsAST; + C = cAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitProcDeclaration(this, o); + } + + public Identifier I; + public FormalParameterSequence FPS; + public Command C; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcFormalParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcFormalParameter.java new file mode 100644 index 00000000..4ed04c99 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/ProcFormalParameter.java @@ -0,0 +1,42 @@ +/* + * @(#)ProcFormalParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ProcFormalParameter extends FormalParameter { + + public ProcFormalParameter (Identifier iAST, FormalParameterSequence fpsAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + FPS = fpsAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitProcFormalParameter(this, o); + } + + public Identifier I; + public FormalParameterSequence FPS; + + public boolean equals (Object fpAST) { + if (fpAST instanceof ProcFormalParameter) { + ProcFormalParameter pfpAST = (ProcFormalParameter) fpAST; + return FPS.equals(pfpAST.FPS); + } else + return false; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Program.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Program.java new file mode 100644 index 00000000..b76e3e3f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Program.java @@ -0,0 +1,31 @@ +/* + * @(#)Program.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class Program extends AST { + + public Program (Command cAST, SourcePosition thePosition) { + super (thePosition); + C = cAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitProgram(this, o); + } + + public Command C; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordAggregate.java new file mode 100644 index 00000000..abc08d32 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordAggregate.java @@ -0,0 +1,27 @@ +/* + * @(#)RecordAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class RecordAggregate extends AST { + + public RecordAggregate (SourcePosition thePosition) { + super (thePosition); + type = null; + } + + public FieldTypeDenoter type; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordExpression.java new file mode 100644 index 00000000..b8d107b5 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordExpression.java @@ -0,0 +1,31 @@ +/* + * @(#)RecordExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class RecordExpression extends Expression { + + public RecordExpression (RecordAggregate raAST, SourcePosition thePosition) { + super (thePosition); + RA = raAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitRecordExpression(this, o); + } + + public RecordAggregate RA; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordTypeDenoter.java new file mode 100644 index 00000000..83dad6e9 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/RecordTypeDenoter.java @@ -0,0 +1,40 @@ +/* + * @(#)RecordTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class RecordTypeDenoter extends TypeDenoter { + + public RecordTypeDenoter (FieldTypeDenoter ftAST, SourcePosition thePosition) { + super (thePosition); + FT = ftAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitRecordTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof ErrorTypeDenoter) + return true; + else if (obj != null && obj instanceof RecordTypeDenoter) + return this.FT.equals(((RecordTypeDenoter) obj).FT); + else + return false; + } + + public FieldTypeDenoter FT; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialCommand.java new file mode 100644 index 00000000..9663f3bb --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialCommand.java @@ -0,0 +1,32 @@ +/* + * @(#)SequentialCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SequentialCommand extends Command { + + public SequentialCommand (Command c1AST, Command c2AST, SourcePosition thePosition) { + super (thePosition); + C1 = c1AST; + C2 = c2AST; + } + + public Object visit(Visitor v, Object o) { + return v.visitSequentialCommand(this, o); + } + + public Command C1, C2; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialDeclaration.java new file mode 100644 index 00000000..12741e82 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SequentialDeclaration.java @@ -0,0 +1,33 @@ +/* + * @(#)SequentialDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SequentialDeclaration extends Declaration { + + public SequentialDeclaration (Declaration d1AST, Declaration d2AST, + SourcePosition thePosition) { + super (thePosition); + D1 = d1AST; + D2 = d2AST; + } + + public Object visit(Visitor v, Object o) { + return v.visitSequentialDeclaration(this, o); + } + + public Declaration D1, D2; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleTypeDenoter.java new file mode 100644 index 00000000..fe98db10 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleTypeDenoter.java @@ -0,0 +1,35 @@ +/* + * @(#)SimpleTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SimpleTypeDenoter extends TypeDenoter { + + public SimpleTypeDenoter (Identifier iAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitSimpleTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + return false; // should not happen + } + + public Identifier I; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleVname.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleVname.java new file mode 100644 index 00000000..f1a3d8ba --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SimpleVname.java @@ -0,0 +1,31 @@ +/* + * @(#)SimpleVname.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SimpleVname extends Vname { + + public SimpleVname (Identifier iAST, SourcePosition thePosition) { + super (thePosition); + I = iAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitSimpleVname(this, o); + } + + public Identifier I; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleActualParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleActualParameterSequence.java new file mode 100644 index 00000000..d2a3e403 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleActualParameterSequence.java @@ -0,0 +1,32 @@ +/* + * @(#)SingleActualParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SingleActualParameterSequence extends ActualParameterSequence { + + public SingleActualParameterSequence (ActualParameter apAST, + SourcePosition thePosition) { + super (thePosition); + AP = apAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitSingleActualParameterSequence(this, o); + } + + public ActualParameter AP; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleArrayAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleArrayAggregate.java new file mode 100644 index 00000000..3177a8b3 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleArrayAggregate.java @@ -0,0 +1,32 @@ +/* + * @(#)SingleArrayAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SingleArrayAggregate extends ArrayAggregate { + + public SingleArrayAggregate (Expression eAST, + SourcePosition thePosition) { + super (thePosition); + E = eAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitSingleArrayAggregate(this, o); + } + + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFieldTypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFieldTypeDenoter.java new file mode 100644 index 00000000..3209d84f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFieldTypeDenoter.java @@ -0,0 +1,43 @@ +/* + * @(#)SingleFieldTypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SingleFieldTypeDenoter extends FieldTypeDenoter { + + public SingleFieldTypeDenoter (Identifier iAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitSingleFieldTypeDenoter(this, o); + } + + public boolean equals (Object obj) { + if (obj != null && obj instanceof SingleFieldTypeDenoter) { + SingleFieldTypeDenoter ft = (SingleFieldTypeDenoter) obj; + return (this.I.spelling.compareTo(ft.I.spelling) == 0) && + this.T.equals(ft.T); + } else + return false; + } + + public Identifier I; + public TypeDenoter T; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFormalParameterSequence.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFormalParameterSequence.java new file mode 100644 index 00000000..ec40482e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleFormalParameterSequence.java @@ -0,0 +1,41 @@ +/* + * @(#)SingleFormalParameterSequence.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SingleFormalParameterSequence extends FormalParameterSequence { + + public SingleFormalParameterSequence (FormalParameter fpAST, + SourcePosition thePosition) { + super (thePosition); + FP = fpAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitSingleFormalParameterSequence(this, o); + } + + public boolean equals(Object fpsAST) { + if (fpsAST instanceof SingleFormalParameterSequence) { + SingleFormalParameterSequence sfpsAST = + (SingleFormalParameterSequence) fpsAST; + return FP.equals(sfpsAST.FP); + } else + return false; + } + + public FormalParameter FP; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleRecordAggregate.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleRecordAggregate.java new file mode 100644 index 00000000..3c846e55 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SingleRecordAggregate.java @@ -0,0 +1,34 @@ +/* + * @(#)SingleRecordAggregate.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SingleRecordAggregate extends RecordAggregate { + + public SingleRecordAggregate (Identifier iAST, Expression eAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitSingleRecordAggregate(this, o); + } + + public Identifier I; + public Expression E; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SubscriptVname.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SubscriptVname.java new file mode 100644 index 00000000..fe145d14 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/SubscriptVname.java @@ -0,0 +1,33 @@ +/* + * @(#)SubscriptVname.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class SubscriptVname extends Vname { + + public SubscriptVname (Vname vAST, Expression eAST, SourcePosition thePosition) { + super (thePosition); + V = vAST; + E = eAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitSubscriptVname(this, o); + } + + public Expression E; + public Vname V; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Terminal.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Terminal.java new file mode 100644 index 00000000..41495768 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Terminal.java @@ -0,0 +1,27 @@ +/* + * @(#)Terminal.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +abstract public class Terminal extends AST { + + public Terminal (String theSpelling, SourcePosition thePosition) { + super (thePosition); + spelling = theSpelling; + } + + public String spelling; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDeclaration.java new file mode 100644 index 00000000..0b0df2c6 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDeclaration.java @@ -0,0 +1,34 @@ +/* + * @(#)TypeDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class TypeDeclaration extends Declaration { + + public TypeDeclaration(Identifier iAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitTypeDeclaration(this, o); + } + + public Identifier I; + public TypeDenoter T; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDenoter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDenoter.java new file mode 100644 index 00000000..b00b4158 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/TypeDenoter.java @@ -0,0 +1,27 @@ +/* + * @(#)TypeDenoter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class TypeDenoter extends AST { + + public TypeDenoter (SourcePosition thePosition) { + super (thePosition); + } + + public abstract boolean equals(Object obj); + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryExpression.java new file mode 100644 index 00000000..6d5e0cd2 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryExpression.java @@ -0,0 +1,34 @@ +/* + * @(#)UnaryExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class UnaryExpression extends Expression { + + public UnaryExpression (Operator oAST, Expression eAST, + SourcePosition thePosition) { + super (thePosition); + O = oAST; + E = eAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitUnaryExpression(this, o); + } + + public Expression E; + public Operator O; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryOperatorDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryOperatorDeclaration.java new file mode 100644 index 00000000..c9d4e1b9 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/UnaryOperatorDeclaration.java @@ -0,0 +1,35 @@ +/* + * @(#)UnaryOperatorDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class UnaryOperatorDeclaration extends Declaration { + + public UnaryOperatorDeclaration (Operator oAST, TypeDenoter argAST, + TypeDenoter resultAST, SourcePosition thePosition) { + super (thePosition); + O = oAST; + ARG = argAST; + RES = resultAST; + } + + public Object visit (Visitor v, Object o) { + return v.visitUnaryOperatorDeclaration(this, o); + } + + public Operator O; + public TypeDenoter ARG, RES; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarActualParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarActualParameter.java new file mode 100644 index 00000000..b2d3c07f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarActualParameter.java @@ -0,0 +1,31 @@ +/* + * @(#)VarActualParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class VarActualParameter extends ActualParameter { + + public VarActualParameter (Vname vAST, SourcePosition thePosition) { + super (thePosition); + V = vAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitVarActualParameter(this, o); + } + + public Vname V; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarDeclaration.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarDeclaration.java new file mode 100644 index 00000000..381df8bb --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarDeclaration.java @@ -0,0 +1,34 @@ +/* + * @(#)VarDeclaration.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class VarDeclaration extends Declaration { + + public VarDeclaration (Identifier iAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitVarDeclaration(this, o); + } + + public Identifier I; + public TypeDenoter T; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarFormalParameter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarFormalParameter.java new file mode 100644 index 00000000..c6f13662 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VarFormalParameter.java @@ -0,0 +1,42 @@ +/* + * @(#)ValFormalParameter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class VarFormalParameter extends FormalParameter { + + public VarFormalParameter (Identifier iAST, TypeDenoter tAST, + SourcePosition thePosition) { + super (thePosition); + I = iAST; + T = tAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitVarFormalParameter(this, o); + } + + public Identifier I; + public TypeDenoter T; + + public boolean equals (Object fpAST) { + if (fpAST instanceof VarFormalParameter) { + VarFormalParameter vfpAST = (VarFormalParameter) fpAST; + return T.equals(vfpAST.T); + } else + return false; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Visitor.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Visitor.java new file mode 100644 index 00000000..11d97b7f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Visitor.java @@ -0,0 +1,107 @@ +/* + * @(#)Visitor.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +public interface Visitor { + + // Commands + public abstract Object visitAssignCommand(AssignCommand ast, Object o); + public abstract Object visitCallCommand(CallCommand ast, Object o); + public abstract Object visitEmptyCommand(EmptyCommand ast, Object o); + public abstract Object visitIfCommand(IfCommand ast, Object o); + public abstract Object visitLetCommand(LetCommand ast, Object o); + public abstract Object visitSequentialCommand(SequentialCommand ast, Object o); + public abstract Object visitWhileCommand(WhileCommand ast, Object o); + + + // Expressions + public abstract Object visitArrayExpression(ArrayExpression ast, Object o); + public abstract Object visitBinaryExpression(BinaryExpression ast, Object o); + public abstract Object visitCallExpression(CallExpression ast, Object o); + public abstract Object visitCharacterExpression(CharacterExpression ast, Object o); + public abstract Object visitEmptyExpression(EmptyExpression ast, Object o); + public abstract Object visitIfExpression(IfExpression ast, Object o); + public abstract Object visitIntegerExpression(IntegerExpression ast, Object o); + public abstract Object visitLetExpression(LetExpression ast, Object o); + public abstract Object visitRecordExpression(RecordExpression ast, Object o); + public abstract Object visitUnaryExpression(UnaryExpression ast, Object o); + public abstract Object visitVnameExpression(VnameExpression ast, Object o); + + // Declarations + public abstract Object visitBinaryOperatorDeclaration(BinaryOperatorDeclaration ast, Object o); + public abstract Object visitConstDeclaration(ConstDeclaration ast, Object o); + public abstract Object visitFuncDeclaration(FuncDeclaration ast, Object o); + public abstract Object visitProcDeclaration(ProcDeclaration ast, Object o); + public abstract Object visitSequentialDeclaration(SequentialDeclaration ast, Object o); + public abstract Object visitTypeDeclaration(TypeDeclaration ast, Object o); + public abstract Object visitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Object o); + public abstract Object visitVarDeclaration(VarDeclaration ast, Object o); + + // Array Aggregates + public abstract Object visitMultipleArrayAggregate(MultipleArrayAggregate ast, Object o); + public abstract Object visitSingleArrayAggregate(SingleArrayAggregate ast, Object o); + + // Record Aggregates + public abstract Object visitMultipleRecordAggregate(MultipleRecordAggregate ast, Object o); + public abstract Object visitSingleRecordAggregate(SingleRecordAggregate ast, Object o); + + // Formal Parameters + public abstract Object visitConstFormalParameter(ConstFormalParameter ast, Object o); + public abstract Object visitFuncFormalParameter(FuncFormalParameter ast, Object o); + public abstract Object visitProcFormalParameter(ProcFormalParameter ast, Object o); + public abstract Object visitVarFormalParameter(VarFormalParameter ast, Object o); + + public abstract Object visitEmptyFormalParameterSequence(EmptyFormalParameterSequence ast, Object o); + public abstract Object visitMultipleFormalParameterSequence(MultipleFormalParameterSequence ast, Object o); + public abstract Object visitSingleFormalParameterSequence(SingleFormalParameterSequence ast, Object o); + + // Actual Parameters + public abstract Object visitConstActualParameter(ConstActualParameter ast, Object o); + public abstract Object visitFuncActualParameter(FuncActualParameter ast, Object o); + public abstract Object visitProcActualParameter(ProcActualParameter ast, Object o); + public abstract Object visitVarActualParameter(VarActualParameter ast, Object o); + + public abstract Object visitEmptyActualParameterSequence(EmptyActualParameterSequence ast, Object o); + public abstract Object visitMultipleActualParameterSequence(MultipleActualParameterSequence ast, Object o); + public abstract Object visitSingleActualParameterSequence(SingleActualParameterSequence ast, Object o); + + // Type Denoters + public abstract Object visitAnyTypeDenoter(AnyTypeDenoter ast, Object o); + public abstract Object visitArrayTypeDenoter(ArrayTypeDenoter ast, Object o); + public abstract Object visitBoolTypeDenoter(BoolTypeDenoter ast, Object o); + public abstract Object visitCharTypeDenoter(CharTypeDenoter ast, Object o); + public abstract Object visitErrorTypeDenoter(ErrorTypeDenoter ast, Object o); + public abstract Object visitSimpleTypeDenoter(SimpleTypeDenoter ast, Object o); + public abstract Object visitIntTypeDenoter(IntTypeDenoter ast, Object o); + public abstract Object visitRecordTypeDenoter(RecordTypeDenoter ast, Object o); + + public abstract Object visitMultipleFieldTypeDenoter(MultipleFieldTypeDenoter ast, Object o); + public abstract Object visitSingleFieldTypeDenoter(SingleFieldTypeDenoter ast, Object o); + + // Literals, Identifiers and Operators + public abstract Object visitCharacterLiteral(CharacterLiteral ast, Object o); + public abstract Object visitIdentifier(Identifier ast, Object o); + public abstract Object visitIntegerLiteral(IntegerLiteral ast, Object o); + public abstract Object visitOperator(Operator ast, Object o); + + // Value-or-variable names + public abstract Object visitDotVname(DotVname ast, Object o); + public abstract Object visitSimpleVname(SimpleVname ast, Object o); + public abstract Object visitSubscriptVname(SubscriptVname ast, Object o); + + // Programs + public abstract Object visitProgram(Program ast, Object o); + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Vname.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Vname.java new file mode 100644 index 00000000..3be37ff7 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/Vname.java @@ -0,0 +1,30 @@ +/* + * @(#)Vname.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public abstract class Vname extends AST { + + public Vname (SourcePosition thePosition) { + super (thePosition); + variable = false; + type = null; + } + + public boolean variable, indexed; + public int offset; + public TypeDenoter type; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VnameExpression.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VnameExpression.java new file mode 100644 index 00000000..739dc2bd --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/VnameExpression.java @@ -0,0 +1,31 @@ +/* + * @(#)VnameExpression.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class VnameExpression extends Expression { + + public VnameExpression (Vname vAST, SourcePosition thePosition) { + super (thePosition); + V = vAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitVnameExpression(this, o); + } + + public Vname V; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/WhileCommand.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/WhileCommand.java new file mode 100644 index 00000000..622d167d --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/AbstractSyntaxTrees/WhileCommand.java @@ -0,0 +1,33 @@ +/* + * @(#)WhileCommand.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.AbstractSyntaxTrees; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class WhileCommand extends Command { + + public WhileCommand (Expression eAST, Command cAST, SourcePosition thePosition) { + super (thePosition); + E = eAST; + C = cAST; + } + + public Object visit(Visitor v, Object o) { + return v.visitWhileCommand(this, o); + } + + public Expression E; + public Command C; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Encoder.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Encoder.java new file mode 100644 index 00000000..000bf016 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Encoder.java @@ -0,0 +1,1008 @@ +/* + * @(#)Encoder.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +import java.io.DataOutputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import TAM.Instruction; +import TAM.Machine; +import Triangle.ErrorReporter; +import Triangle.StdEnvironment; +import Triangle.AbstractSyntaxTrees.AST; +import Triangle.AbstractSyntaxTrees.AnyTypeDenoter; +import Triangle.AbstractSyntaxTrees.ArrayExpression; +import Triangle.AbstractSyntaxTrees.ArrayTypeDenoter; +import Triangle.AbstractSyntaxTrees.AssignCommand; +import Triangle.AbstractSyntaxTrees.BinaryExpression; +import Triangle.AbstractSyntaxTrees.BinaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.BoolTypeDenoter; +import Triangle.AbstractSyntaxTrees.CallCommand; +import Triangle.AbstractSyntaxTrees.CallExpression; +import Triangle.AbstractSyntaxTrees.CharTypeDenoter; +import Triangle.AbstractSyntaxTrees.CharacterExpression; +import Triangle.AbstractSyntaxTrees.CharacterLiteral; +import Triangle.AbstractSyntaxTrees.ConstActualParameter; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.ConstFormalParameter; +import Triangle.AbstractSyntaxTrees.Declaration; +import Triangle.AbstractSyntaxTrees.DotVname; +import Triangle.AbstractSyntaxTrees.EmptyActualParameterSequence; +import Triangle.AbstractSyntaxTrees.EmptyCommand; +import Triangle.AbstractSyntaxTrees.EmptyExpression; +import Triangle.AbstractSyntaxTrees.EmptyFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.ErrorTypeDenoter; +import Triangle.AbstractSyntaxTrees.FuncActualParameter; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.FuncFormalParameter; +import Triangle.AbstractSyntaxTrees.Identifier; +import Triangle.AbstractSyntaxTrees.IfCommand; +import Triangle.AbstractSyntaxTrees.IfExpression; +import Triangle.AbstractSyntaxTrees.IntTypeDenoter; +import Triangle.AbstractSyntaxTrees.IntegerExpression; +import Triangle.AbstractSyntaxTrees.IntegerLiteral; +import Triangle.AbstractSyntaxTrees.LetCommand; +import Triangle.AbstractSyntaxTrees.LetExpression; +import Triangle.AbstractSyntaxTrees.MultipleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleArrayAggregate; +import Triangle.AbstractSyntaxTrees.MultipleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.MultipleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleRecordAggregate; +import Triangle.AbstractSyntaxTrees.Operator; +import Triangle.AbstractSyntaxTrees.ProcActualParameter; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.ProcFormalParameter; +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.AbstractSyntaxTrees.RecordExpression; +import Triangle.AbstractSyntaxTrees.RecordTypeDenoter; +import Triangle.AbstractSyntaxTrees.SequentialCommand; +import Triangle.AbstractSyntaxTrees.SequentialDeclaration; +import Triangle.AbstractSyntaxTrees.SimpleTypeDenoter; +import Triangle.AbstractSyntaxTrees.SimpleVname; +import Triangle.AbstractSyntaxTrees.SingleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleArrayAggregate; +import Triangle.AbstractSyntaxTrees.SingleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.SingleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleRecordAggregate; +import Triangle.AbstractSyntaxTrees.SubscriptVname; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.UnaryExpression; +import Triangle.AbstractSyntaxTrees.UnaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.VarActualParameter; +import Triangle.AbstractSyntaxTrees.VarDeclaration; +import Triangle.AbstractSyntaxTrees.VarFormalParameter; +import Triangle.AbstractSyntaxTrees.Visitor; +import Triangle.AbstractSyntaxTrees.Vname; +import Triangle.AbstractSyntaxTrees.VnameExpression; +import Triangle.AbstractSyntaxTrees.WhileCommand; + +public final class Encoder implements Visitor { + + + // Commands + public Object visitAssignCommand(AssignCommand ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.E.visit(this, frame); + encodeStore(ast.V, new Frame (frame, valSize.intValue()), + valSize.intValue()); + return null; + } + + public Object visitCallCommand(CallCommand ast, Object o) { + Frame frame = (Frame) o; + Integer argsSize = (Integer) ast.APS.visit(this, frame); + ast.I.visit(this, new Frame(frame.level, argsSize)); + return null; + } + + public Object visitEmptyCommand(EmptyCommand ast, Object o) { + return null; + } + + public Object visitIfCommand(IfCommand ast, Object o) { + Frame frame = (Frame) o; + int jumpifAddr, jumpAddr; + + Integer valSize = (Integer) ast.E.visit(this, frame); + jumpifAddr = nextInstrAddr; + emit(Machine.JUMPIFop, Machine.falseRep, Machine.CBr, 0); + ast.C1.visit(this, frame); + jumpAddr = nextInstrAddr; + emit(Machine.JUMPop, 0, Machine.CBr, 0); + patch(jumpifAddr, nextInstrAddr); + ast.C2.visit(this, frame); + patch(jumpAddr, nextInstrAddr); + return null; + } + + public Object visitLetCommand(LetCommand ast, Object o) { + Frame frame = (Frame) o; + int extraSize = ((Integer) ast.D.visit(this, frame)).intValue(); + ast.C.visit(this, new Frame(frame, extraSize)); + if (extraSize > 0) + emit(Machine.POPop, 0, 0, extraSize); + return null; + } + + public Object visitSequentialCommand(SequentialCommand ast, Object o) { + ast.C1.visit(this, o); + ast.C2.visit(this, o); + return null; + } + + public Object visitWhileCommand(WhileCommand ast, Object o) { + Frame frame = (Frame) o; + int jumpAddr, loopAddr; + + jumpAddr = nextInstrAddr; + emit(Machine.JUMPop, 0, Machine.CBr, 0); + loopAddr = nextInstrAddr; + ast.C.visit(this, frame); + patch(jumpAddr, nextInstrAddr); + ast.E.visit(this, frame); + emit(Machine.JUMPIFop, Machine.trueRep, Machine.CBr, loopAddr); + return null; + } + + + // Expressions + public Object visitArrayExpression(ArrayExpression ast, Object o) { + ast.type.visit(this, null); + return ast.AA.visit(this, o); + } + + public Object visitBinaryExpression(BinaryExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + int valSize1 = ((Integer) ast.E1.visit(this, frame)).intValue(); + Frame frame1 = new Frame(frame, valSize1); + int valSize2 = ((Integer) ast.E2.visit(this, frame1)).intValue(); + Frame frame2 = new Frame(frame.level, valSize1 + valSize2); + ast.O.visit(this, frame2); + return valSize; + } + + public Object visitCallExpression(CallExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + Integer argsSize = (Integer) ast.APS.visit(this, frame); + ast.I.visit(this, new Frame(frame.level, argsSize)); + return valSize; + } + + public Object visitCharacterExpression(CharacterExpression ast, + Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + emit(Machine.LOADLop, 0, 0, ast.CL.spelling.charAt(1)); + return valSize; + } + + public Object visitEmptyExpression(EmptyExpression ast, Object o) { + return new Integer(0); + } + + public Object visitIfExpression(IfExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize; + int jumpifAddr, jumpAddr; + + ast.type.visit(this, null); + ast.E1.visit(this, frame); + jumpifAddr = nextInstrAddr; + emit(Machine.JUMPIFop, Machine.falseRep, Machine.CBr, 0); + valSize = (Integer) ast.E2.visit(this, frame); + jumpAddr = nextInstrAddr; + emit(Machine.JUMPop, 0, Machine.CBr, 0); + patch(jumpifAddr, nextInstrAddr); + valSize = (Integer) ast.E3.visit(this, frame); + patch(jumpAddr, nextInstrAddr); + return valSize; + } + + public Object visitIntegerExpression(IntegerExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + emit(Machine.LOADLop, 0, 0, Integer.parseInt(ast.IL.spelling)); + return valSize; + } + + public Object visitLetExpression(LetExpression ast, Object o) { + Frame frame = (Frame) o; + ast.type.visit(this, null); + int extraSize = ((Integer) ast.D.visit(this, frame)).intValue(); + Frame frame1 = new Frame(frame, extraSize); + Integer valSize = (Integer) ast.E.visit(this, frame1); + if (extraSize > 0) + emit(Machine.POPop, valSize.intValue(), 0, extraSize); + return valSize; + } + + public Object visitRecordExpression(RecordExpression ast, Object o){ + ast.type.visit(this, null); + return ast.RA.visit(this, o); + } + + public Object visitUnaryExpression(UnaryExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + ast.E.visit(this, frame); + ast.O.visit(this, new Frame(frame.level, valSize.intValue())); + return valSize; + } + + public Object visitVnameExpression(VnameExpression ast, Object o) { + Frame frame = (Frame) o; + Integer valSize = (Integer) ast.type.visit(this, null); + encodeFetch(ast.V, frame, valSize.intValue()); + return valSize; + } + + + // Declarations + public Object visitBinaryOperatorDeclaration(BinaryOperatorDeclaration ast, + Object o){ + return new Integer(0); + } + + public Object visitConstDeclaration(ConstDeclaration ast, Object o) { + Frame frame = (Frame) o; + int extraSize = 0; + + if (ast.E instanceof CharacterExpression) { + CharacterLiteral CL = ((CharacterExpression) ast.E).CL; + ast.entity = new KnownValue(Machine.characterSize, + characterValuation(CL.spelling)); + } else if (ast.E instanceof IntegerExpression) { + IntegerLiteral IL = ((IntegerExpression) ast.E).IL; + ast.entity = new KnownValue(Machine.integerSize, + Integer.parseInt(IL.spelling)); + } else { + int valSize = ((Integer) ast.E.visit(this, frame)).intValue(); + ast.entity = new UnknownValue(valSize, frame.level, frame.size); + extraSize = valSize; + } + writeTableDetails(ast); + return new Integer(extraSize); + } + + public Object visitFuncDeclaration(FuncDeclaration ast, Object o) { + Frame frame = (Frame) o; + int jumpAddr = nextInstrAddr; + int argsSize = 0, valSize = 0; + + emit(Machine.JUMPop, 0, Machine.CBr, 0); + ast.entity = new KnownRoutine(Machine.closureSize, frame.level, nextInstrAddr); + writeTableDetails(ast); + if (frame.level == Machine.maxRoutineLevel) + reporter.reportRestriction("can't nest routines more than 7 deep"); + else { + Frame frame1 = new Frame(frame.level + 1, 0); + argsSize = ((Integer) ast.FPS.visit(this, frame1)).intValue(); + Frame frame2 = new Frame(frame.level + 1, Machine.linkDataSize); + valSize = ((Integer) ast.E.visit(this, frame2)).intValue(); + } + emit(Machine.RETURNop, valSize, 0, argsSize); + patch(jumpAddr, nextInstrAddr); + return new Integer(0); + } + + public Object visitProcDeclaration(ProcDeclaration ast, Object o) { + Frame frame = (Frame) o; + int jumpAddr = nextInstrAddr; + int argsSize = 0; + + emit(Machine.JUMPop, 0, Machine.CBr, 0); + ast.entity = new KnownRoutine (Machine.closureSize, frame.level, + nextInstrAddr); + writeTableDetails(ast); + if (frame.level == Machine.maxRoutineLevel) + reporter.reportRestriction("can't nest routines so deeply"); + else { + Frame frame1 = new Frame(frame.level + 1, 0); + argsSize = ((Integer) ast.FPS.visit(this, frame1)).intValue(); + Frame frame2 = new Frame(frame.level + 1, Machine.linkDataSize); + ast.C.visit(this, frame2); + } + emit(Machine.RETURNop, 0, 0, argsSize); + patch(jumpAddr, nextInstrAddr); + return new Integer(0); + } + + public Object visitSequentialDeclaration(SequentialDeclaration ast, Object o) { + Frame frame = (Frame) o; + int extraSize1, extraSize2; + + extraSize1 = ((Integer) ast.D1.visit(this, frame)).intValue(); + Frame frame1 = new Frame (frame, extraSize1); + extraSize2 = ((Integer) ast.D2.visit(this, frame1)).intValue(); + return new Integer(extraSize1 + extraSize2); + } + + public Object visitTypeDeclaration(TypeDeclaration ast, Object o) { + // just to ensure the type's representation is decided + ast.T.visit(this, null); + return new Integer(0); + } + + public Object visitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, + Object o) { + return new Integer(0); + } + + public Object visitVarDeclaration(VarDeclaration ast, Object o) { + Frame frame = (Frame) o; + int extraSize; + + extraSize = ((Integer) ast.T.visit(this, null)).intValue(); + emit(Machine.PUSHop, 0, 0, extraSize); + ast.entity = new KnownAddress(Machine.addressSize, frame.level, frame.size); + writeTableDetails(ast); + return new Integer(extraSize); + } + + + // Array Aggregates + public Object visitMultipleArrayAggregate(MultipleArrayAggregate ast, + Object o) { + Frame frame = (Frame) o; + int elemSize = ((Integer) ast.E.visit(this, frame)).intValue(); + Frame frame1 = new Frame(frame, elemSize); + int arraySize = ((Integer) ast.AA.visit(this, frame1)).intValue(); + return new Integer(elemSize + arraySize); + } + + public Object visitSingleArrayAggregate(SingleArrayAggregate ast, Object o) { + return ast.E.visit(this, o); + } + + + // Record Aggregates + public Object visitMultipleRecordAggregate(MultipleRecordAggregate ast, + Object o) { + Frame frame = (Frame) o; + int fieldSize = ((Integer) ast.E.visit(this, frame)).intValue(); + Frame frame1 = new Frame (frame, fieldSize); + int recordSize = ((Integer) ast.RA.visit(this, frame1)).intValue(); + return new Integer(fieldSize + recordSize); + } + + public Object visitSingleRecordAggregate(SingleRecordAggregate ast, + Object o) { + return ast.E.visit(this, o); + } + + + // Formal Parameters + public Object visitConstFormalParameter(ConstFormalParameter ast, Object o) { + Frame frame = (Frame) o; + int valSize = ((Integer) ast.T.visit(this, null)).intValue(); + ast.entity = new UnknownValue (valSize, frame.level, -frame.size - valSize); + writeTableDetails(ast); + return new Integer(valSize); + } + + public Object visitFuncFormalParameter(FuncFormalParameter ast, Object o) { + Frame frame = (Frame) o; + int argsSize = Machine.closureSize; + ast.entity = new UnknownRoutine (Machine.closureSize, frame.level, + -frame.size - argsSize); + writeTableDetails(ast); + return new Integer(argsSize); + } + + public Object visitProcFormalParameter(ProcFormalParameter ast, Object o) { + Frame frame = (Frame) o; + int argsSize = Machine.closureSize; + ast.entity = new UnknownRoutine (Machine.closureSize, frame.level, + -frame.size - argsSize); + writeTableDetails(ast); + return new Integer(argsSize); + } + + public Object visitVarFormalParameter(VarFormalParameter ast, Object o) { + Frame frame = (Frame) o; + ast.T.visit(this, null); + ast.entity = new UnknownAddress (Machine.addressSize, frame.level, + -frame.size - Machine.addressSize); + writeTableDetails(ast); + return new Integer(Machine.addressSize); + } + + + public Object visitEmptyFormalParameterSequence( + EmptyFormalParameterSequence ast, Object o) { + return new Integer(0); + } + + public Object visitMultipleFormalParameterSequence( + MultipleFormalParameterSequence ast, Object o) { + Frame frame = (Frame) o; + int argsSize1 = ((Integer) ast.FPS.visit(this, frame)).intValue(); + Frame frame1 = new Frame(frame, argsSize1); + int argsSize2 = ((Integer) ast.FP.visit(this, frame1)).intValue(); + return new Integer(argsSize1 + argsSize2); + } + + public Object visitSingleFormalParameterSequence( + SingleFormalParameterSequence ast, Object o) { + return ast.FP.visit (this, o); + } + + + // Actual Parameters + public Object visitConstActualParameter(ConstActualParameter ast, Object o) { + return ast.E.visit (this, o); + } + + public Object visitFuncActualParameter(FuncActualParameter ast, Object o) { + Frame frame = (Frame) o; + if (ast.I.decl.entity instanceof KnownRoutine) { + ObjectAddress address = ((KnownRoutine) ast.I.decl.entity).address; + // static link, code address + emit(Machine.LOADAop, 0, displayRegister(frame.level, address.level), 0); + emit(Machine.LOADAop, 0, Machine.CBr, address.displacement); + } else if (ast.I.decl.entity instanceof UnknownRoutine) { + ObjectAddress address = ((UnknownRoutine) ast.I.decl.entity).address; + emit(Machine.LOADop, Machine.closureSize, displayRegister(frame.level, + address.level), address.displacement); + } else if (ast.I.decl.entity instanceof PrimitiveRoutine) { + int displacement = ((PrimitiveRoutine) ast.I.decl.entity).displacement; + // static link, code address + emit(Machine.LOADAop, 0, Machine.SBr, 0); + emit(Machine.LOADAop, 0, Machine.PBr, displacement); + } + return new Integer(Machine.closureSize); + } + + public Object visitProcActualParameter(ProcActualParameter ast, Object o) { + Frame frame = (Frame) o; + if (ast.I.decl.entity instanceof KnownRoutine) { + ObjectAddress address = ((KnownRoutine) ast.I.decl.entity).address; + // static link, code address + emit(Machine.LOADAop, 0, displayRegister(frame.level, address.level), 0); + emit(Machine.LOADAop, 0, Machine.CBr, address.displacement); + } else if (ast.I.decl.entity instanceof UnknownRoutine) { + ObjectAddress address = ((UnknownRoutine) ast.I.decl.entity).address; + emit(Machine.LOADop, Machine.closureSize, displayRegister(frame.level, + address.level), address.displacement); + } else if (ast.I.decl.entity instanceof PrimitiveRoutine) { + int displacement = ((PrimitiveRoutine) ast.I.decl.entity).displacement; + // static link, code address + emit(Machine.LOADAop, 0, Machine.SBr, 0); + emit(Machine.LOADAop, 0, Machine.PBr, displacement); + } + return new Integer(Machine.closureSize); + } + + public Object visitVarActualParameter(VarActualParameter ast, Object o) { + encodeFetchAddress(ast.V, (Frame) o); + return new Integer(Machine.addressSize); + } + + + public Object visitEmptyActualParameterSequence( + EmptyActualParameterSequence ast, Object o) { + return new Integer(0); + } + + public Object visitMultipleActualParameterSequence( + MultipleActualParameterSequence ast, Object o) { + Frame frame = (Frame) o; + int argsSize1 = ((Integer) ast.AP.visit(this, frame)).intValue(); + Frame frame1 = new Frame (frame, argsSize1); + int argsSize2 = ((Integer) ast.APS.visit(this, frame1)).intValue(); + return new Integer(argsSize1 + argsSize2); + } + + public Object visitSingleActualParameterSequence( + SingleActualParameterSequence ast, Object o) { + return ast.AP.visit (this, o); + } + + + // Type Denoters + public Object visitAnyTypeDenoter(AnyTypeDenoter ast, Object o) { + return new Integer(0); + } + + public Object visitArrayTypeDenoter(ArrayTypeDenoter ast, Object o) { + int typeSize; + if (ast.entity == null) { + int elemSize = ((Integer) ast.T.visit(this, null)).intValue(); + typeSize = Integer.parseInt(ast.IL.spelling) * elemSize; + ast.entity = new TypeRepresentation(typeSize); + writeTableDetails(ast); + } else + typeSize = ast.entity.size; + return new Integer(typeSize); + } + + public Object visitBoolTypeDenoter(BoolTypeDenoter ast, Object o) { + if (ast.entity == null) { + ast.entity = new TypeRepresentation(Machine.booleanSize); + writeTableDetails(ast); + } + return new Integer(Machine.booleanSize); + } + + public Object visitCharTypeDenoter(CharTypeDenoter ast, Object o) { + if (ast.entity == null) { + ast.entity = new TypeRepresentation(Machine.characterSize); + writeTableDetails(ast); + } + return new Integer(Machine.characterSize); + } + + public Object visitErrorTypeDenoter(ErrorTypeDenoter ast, Object o) { + return new Integer(0); + } + + public Object visitSimpleTypeDenoter(SimpleTypeDenoter ast, + Object o) { + return new Integer(0); + } + + public Object visitIntTypeDenoter(IntTypeDenoter ast, Object o) { + if (ast.entity == null) { + ast.entity = new TypeRepresentation(Machine.integerSize); + writeTableDetails(ast); + } + return new Integer(Machine.integerSize); + } + + public Object visitRecordTypeDenoter(RecordTypeDenoter ast, Object o) { + int typeSize; + if (ast.entity == null) { + typeSize = ((Integer) ast.FT.visit(this, new Integer(0))).intValue(); + ast.entity = new TypeRepresentation(typeSize); + writeTableDetails(ast); + } else + typeSize = ast.entity.size; + return new Integer(typeSize); + } + + + public Object visitMultipleFieldTypeDenoter(MultipleFieldTypeDenoter ast, + Object o) { + int offset = ((Integer) o).intValue(); + int fieldSize; + + if (ast.entity == null) { + fieldSize = ((Integer) ast.T.visit(this, null)).intValue(); + ast.entity = new Field (fieldSize, offset); + writeTableDetails(ast); + } else + fieldSize = ast.entity.size; + + Integer offset1 = new Integer(offset + fieldSize); + int recSize = ((Integer) ast.FT.visit(this, offset1)).intValue(); + return new Integer(fieldSize + recSize); + } + + public Object visitSingleFieldTypeDenoter(SingleFieldTypeDenoter ast, + Object o) { + int offset = ((Integer) o).intValue(); + int fieldSize; + + if (ast.entity == null) { + fieldSize = ((Integer) ast.T.visit(this, null)).intValue(); + ast.entity = new Field (fieldSize, offset); + writeTableDetails(ast); + } else + fieldSize = ast.entity.size; + + return new Integer(fieldSize); + } + + + // Literals, Identifiers and Operators + public Object visitCharacterLiteral(CharacterLiteral ast, Object o) { + return null; + } + + public Object visitIdentifier(Identifier ast, Object o) { + Frame frame = (Frame) o; + if (ast.decl.entity instanceof KnownRoutine) { + ObjectAddress address = ((KnownRoutine) ast.decl.entity).address; + emit(Machine.CALLop, displayRegister(frame.level, address.level), + Machine.CBr, address.displacement); + } else if (ast.decl.entity instanceof UnknownRoutine) { + ObjectAddress address = ((UnknownRoutine) ast.decl.entity).address; + emit(Machine.LOADop, Machine.closureSize, displayRegister(frame.level, + address.level), address.displacement); + emit(Machine.CALLIop, 0, 0, 0); + } else if (ast.decl.entity instanceof PrimitiveRoutine) { + int displacement = ((PrimitiveRoutine) ast.decl.entity).displacement; + if (displacement != Machine.idDisplacement) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, displacement); + } else if (ast.decl.entity instanceof EqualityRoutine) { // "=" or "\=" + int displacement = ((EqualityRoutine) ast.decl.entity).displacement; + emit(Machine.LOADLop, 0, 0, frame.size / 2); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, displacement); + } + return null; + } + + public Object visitIntegerLiteral(IntegerLiteral ast, Object o) { + return null; + } + + public Object visitOperator(Operator ast, Object o) { + Frame frame = (Frame) o; + if (ast.decl.entity instanceof KnownRoutine) { + ObjectAddress address = ((KnownRoutine) ast.decl.entity).address; + emit(Machine.CALLop, displayRegister (frame.level, address.level), + Machine.CBr, address.displacement); + } else if (ast.decl.entity instanceof UnknownRoutine) { + ObjectAddress address = ((UnknownRoutine) ast.decl.entity).address; + emit(Machine.LOADop, Machine.closureSize, displayRegister(frame.level, + address.level), address.displacement); + emit(Machine.CALLIop, 0, 0, 0); + } else if (ast.decl.entity instanceof PrimitiveRoutine) { + int displacement = ((PrimitiveRoutine) ast.decl.entity).displacement; + if (displacement != Machine.idDisplacement) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, displacement); + } else if (ast.decl.entity instanceof EqualityRoutine) { // "=" or "\=" + int displacement = ((EqualityRoutine) ast.decl.entity).displacement; + emit(Machine.LOADLop, 0, 0, frame.size / 2); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, displacement); + } + return null; + } + + + // Value-or-variable names + public Object visitDotVname(DotVname ast, Object o) { + Frame frame = (Frame) o; + RuntimeEntity baseObject = (RuntimeEntity) ast.V.visit(this, frame); + ast.offset = ast.V.offset + ((Field) ast.I.decl.entity).fieldOffset; + // I.decl points to the appropriate record field + ast.indexed = ast.V.indexed; + return baseObject; + } + + public Object visitSimpleVname(SimpleVname ast, Object o) { + ast.offset = 0; + ast.indexed = false; + return ast.I.decl.entity; + } + + public Object visitSubscriptVname(SubscriptVname ast, Object o) { + Frame frame = (Frame) o; + RuntimeEntity baseObject; + int elemSize, indexSize; + + baseObject = (RuntimeEntity) ast.V.visit(this, frame); + ast.offset = ast.V.offset; + ast.indexed = ast.V.indexed; + elemSize = ((Integer) ast.type.visit(this, null)).intValue(); + if (ast.E instanceof IntegerExpression) { + IntegerLiteral IL = ((IntegerExpression) ast.E).IL; + ast.offset = ast.offset + Integer.parseInt(IL.spelling) * elemSize; + } else { + // v-name is indexed by a proper expression, not a literal + if (ast.indexed) + frame.size = frame.size + Machine.integerSize; + indexSize = ((Integer) ast.E.visit(this, frame)).intValue(); + if (elemSize != 1) { + emit(Machine.LOADLop, 0, 0, elemSize); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, + Machine.multDisplacement); + } + if (ast.indexed) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + else + ast.indexed = true; + } + return baseObject; + } + + + // Programs + public Object visitProgram(Program ast, Object o) { + return ast.C.visit(this, o); + } + + public Encoder (ErrorReporter reporter) { + this.reporter = reporter; + nextInstrAddr = Machine.CB; + elaborateStdEnvironment(); + } + + private ErrorReporter reporter; + + // Generates code to run a program. + // showingTable is true iff entity description details + // are to be displayed. + public final void encodeRun (Program theAST, boolean showingTable) { + tableDetailsReqd = showingTable; + //startCodeGeneration(); + theAST.visit(this, new Frame (0, 0)); + emit(Machine.HALTop, 0, 0, 0); + } + + // Decides run-time representation of a standard constant. + private final void elaborateStdConst (Declaration constDeclaration, + int value) { + + if (constDeclaration instanceof ConstDeclaration) { + ConstDeclaration decl = (ConstDeclaration) constDeclaration; + int typeSize = ((Integer) decl.E.type.visit(this, null)).intValue(); + decl.entity = new KnownValue(typeSize, value); + writeTableDetails(constDeclaration); + } + } + + // Decides run-time representation of a standard routine. + private final void elaborateStdPrimRoutine (Declaration routineDeclaration, + int routineOffset) { + routineDeclaration.entity = new PrimitiveRoutine (Machine.closureSize, routineOffset); + writeTableDetails(routineDeclaration); + } + + private final void elaborateStdEqRoutine (Declaration routineDeclaration, + int routineOffset) { + routineDeclaration.entity = new EqualityRoutine (Machine.closureSize, routineOffset); + writeTableDetails(routineDeclaration); + } + + private final void elaborateStdRoutine (Declaration routineDeclaration, + int routineOffset) { + routineDeclaration.entity = new KnownRoutine (Machine.closureSize, 0, routineOffset); + writeTableDetails(routineDeclaration); + } + + private final void elaborateStdEnvironment() { + tableDetailsReqd = false; + elaborateStdConst(StdEnvironment.falseDecl, Machine.falseRep); + elaborateStdConst(StdEnvironment.trueDecl, Machine.trueRep); + elaborateStdPrimRoutine(StdEnvironment.notDecl, Machine.notDisplacement); + elaborateStdPrimRoutine(StdEnvironment.andDecl, Machine.andDisplacement); + elaborateStdPrimRoutine(StdEnvironment.orDecl, Machine.orDisplacement); + elaborateStdConst(StdEnvironment.maxintDecl, Machine.maxintRep); + elaborateStdPrimRoutine(StdEnvironment.addDecl, Machine.addDisplacement); + elaborateStdPrimRoutine(StdEnvironment.subtractDecl, Machine.subDisplacement); + elaborateStdPrimRoutine(StdEnvironment.multiplyDecl, Machine.multDisplacement); + elaborateStdPrimRoutine(StdEnvironment.divideDecl, Machine.divDisplacement); + elaborateStdPrimRoutine(StdEnvironment.moduloDecl, Machine.modDisplacement); + elaborateStdPrimRoutine(StdEnvironment.lessDecl, Machine.ltDisplacement); + elaborateStdPrimRoutine(StdEnvironment.notgreaterDecl, Machine.leDisplacement); + elaborateStdPrimRoutine(StdEnvironment.greaterDecl, Machine.gtDisplacement); + elaborateStdPrimRoutine(StdEnvironment.notlessDecl, Machine.geDisplacement); + elaborateStdPrimRoutine(StdEnvironment.chrDecl, Machine.idDisplacement); + elaborateStdPrimRoutine(StdEnvironment.ordDecl, Machine.idDisplacement); + elaborateStdPrimRoutine(StdEnvironment.eolDecl, Machine.eolDisplacement); + elaborateStdPrimRoutine(StdEnvironment.eofDecl, Machine.eofDisplacement); + elaborateStdPrimRoutine(StdEnvironment.getDecl, Machine.getDisplacement); + elaborateStdPrimRoutine(StdEnvironment.putDecl, Machine.putDisplacement); + elaborateStdPrimRoutine(StdEnvironment.getintDecl, Machine.getintDisplacement); + elaborateStdPrimRoutine(StdEnvironment.putintDecl, Machine.putintDisplacement); + elaborateStdPrimRoutine(StdEnvironment.geteolDecl, Machine.geteolDisplacement); + elaborateStdPrimRoutine(StdEnvironment.puteolDecl, Machine.puteolDisplacement); + elaborateStdEqRoutine(StdEnvironment.equalDecl, Machine.eqDisplacement); + elaborateStdEqRoutine(StdEnvironment.unequalDecl, Machine.neDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fopenDecl, Machine.fopenDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fgetintDecl, Machine.fgetintDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fputintDecl, Machine.fputintDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fgetDecl, Machine.fgetDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fputDecl, Machine.fputDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fgeteolDecl, Machine.fgeteolDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fputeolDecl, Machine.fputeolDisplacement); + elaborateStdPrimRoutine(StdEnvironment.feolDecl, Machine.feolDisplacement); + elaborateStdPrimRoutine(StdEnvironment.feofDecl, Machine.feofDisplacement); + elaborateStdPrimRoutine(StdEnvironment.fcloseDecl, Machine.fcloseDisplacement); + } + + // Saves the object program in the named file. + + public void saveObjectProgram(String objectName) { + FileOutputStream objectFile = null; + DataOutputStream objectStream = null; + + int addr; + + try { + objectFile = new FileOutputStream (objectName); + objectStream = new DataOutputStream (objectFile); + + addr = Machine.CB; + for (addr = Machine.CB; addr < nextInstrAddr; addr++) + Machine.code[addr].write(objectStream); + objectFile.close(); + } catch (FileNotFoundException s) { + System.err.println ("Error opening object file: " + s); + } catch (IOException s) { + System.err.println ("Error writing object file: " + s); + } + } + + boolean tableDetailsReqd; + + public static void writeTableDetails(AST ast) { + } + + // OBJECT CODE + + // Implementation notes: + // Object code is generated directly into the TAM Code Store, starting at CB. + // The address of the next instruction is held in nextInstrAddr. + + private int nextInstrAddr; + + // Appends an instruction, with the given fields, to the object code. + private void emit (int op, int n, int r, int d) { + Instruction nextInstr = new Instruction(); + if (n > 255) { + reporter.reportRestriction("length of operand can't exceed 255 words"); + n = 255; // to allow code generation to continue + } + nextInstr.op = op; + nextInstr.n = n; + nextInstr.r = r; + nextInstr.d = d; + if (nextInstrAddr == Machine.PB) + reporter.reportRestriction("too many instructions for code segment"); + else { + Machine.code[nextInstrAddr] = nextInstr; + nextInstrAddr = nextInstrAddr + 1; + } + } + + // Patches the d-field of the instruction at address addr. + private void patch (int addr, int d) { + Machine.code[addr].d = d; + } + + // DATA REPRESENTATION + + public int characterValuation (String spelling) { + // Returns the machine representation of the given character literal. + return spelling.charAt(1); + // since the character literal is of the form 'x'} + } + + // REGISTERS + + // Returns the register number appropriate for object code at currentLevel + // to address a data object at objectLevel. + private int displayRegister (int currentLevel, int objectLevel) { + if (objectLevel == 0) + return Machine.SBr; + else if (currentLevel - objectLevel <= 6) + return Machine.LBr + currentLevel - objectLevel; // LBr|L1r|...|L6r + else { + reporter.reportRestriction("can't access data more than 6 levels out"); + return Machine.L6r; // to allow code generation to continue + } + } + + // Generates code to store the value of a named constant or variable + // and pop it from the stack. + // currentLevel is the routine level where the vname occurs. + // frameSize is the anticipated size of the local stack frame when + // the constant or variable is fetched at run-time. + // valSize is the size of the constant or variable's value. + + private void encodeStore(Vname V, Frame frame, int valSize) { + + RuntimeEntity baseObject = (RuntimeEntity) V.visit(this, frame); + // If indexed = true, code will have been generated to load an index value. + if (valSize > 255) { + reporter.reportRestriction("can't store values larger than 255 words"); + valSize = 255; // to allow code generation to continue + } + if (baseObject instanceof KnownAddress) { + ObjectAddress address = ((KnownAddress) baseObject).address; + if (V.indexed) { + emit(Machine.LOADAop, 0, displayRegister(frame.level, address.level), + address.displacement + V.offset); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + emit(Machine.STOREIop, valSize, 0, 0); + } else { + emit(Machine.STOREop, valSize, displayRegister(frame.level, + address.level), address.displacement + V.offset); + } + } else if (baseObject instanceof UnknownAddress) { + ObjectAddress address = ((UnknownAddress) baseObject).address; + emit(Machine.LOADop, Machine.addressSize, displayRegister(frame.level, + address.level), address.displacement); + if (V.indexed) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + if (V.offset != 0) { + emit(Machine.LOADLop, 0, 0, V.offset); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + } + emit(Machine.STOREIop, valSize, 0, 0); + } + } + + // Generates code to fetch the value of a named constant or variable + // and push it on to the stack. + // currentLevel is the routine level where the vname occurs. + // frameSize is the anticipated size of the local stack frame when + // the constant or variable is fetched at run-time. + // valSize is the size of the constant or variable's value. + + private void encodeFetch(Vname V, Frame frame, int valSize) { + + RuntimeEntity baseObject = (RuntimeEntity) V.visit(this, frame); + // If indexed = true, code will have been generated to load an index value. + if (valSize > 255) { + reporter.reportRestriction("can't load values larger than 255 words"); + valSize = 255; // to allow code generation to continue + } + if (baseObject instanceof KnownValue) { + // presumably offset = 0 and indexed = false + int value = ((KnownValue) baseObject).value; + emit(Machine.LOADLop, 0, 0, value); + } else if ((baseObject instanceof UnknownValue) || + (baseObject instanceof KnownAddress)) { + ObjectAddress address = (baseObject instanceof UnknownValue) ? + ((UnknownValue) baseObject).address : + ((KnownAddress) baseObject).address; + if (V.indexed) { + emit(Machine.LOADAop, 0, displayRegister(frame.level, address.level), + address.displacement + V.offset); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + emit(Machine.LOADIop, valSize, 0, 0); + } else + emit(Machine.LOADop, valSize, displayRegister(frame.level, + address.level), address.displacement + V.offset); + } else if (baseObject instanceof UnknownAddress) { + ObjectAddress address = ((UnknownAddress) baseObject).address; + emit(Machine.LOADop, Machine.addressSize, displayRegister(frame.level, + address.level), address.displacement); + if (V.indexed) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + if (V.offset != 0) { + emit(Machine.LOADLop, 0, 0, V.offset); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + } + emit(Machine.LOADIop, valSize, 0, 0); + } + } + + // Generates code to compute and push the address of a named variable. + // vname is the program phrase that names this variable. + // currentLevel is the routine level where the vname occurs. + // frameSize is the anticipated size of the local stack frame when + // the variable is addressed at run-time. + + private void encodeFetchAddress (Vname V, Frame frame) { + + RuntimeEntity baseObject = (RuntimeEntity) V.visit(this, frame); + // If indexed = true, code will have been generated to load an index value. + if (baseObject instanceof KnownAddress) { + ObjectAddress address = ((KnownAddress) baseObject).address; + emit(Machine.LOADAop, 0, displayRegister(frame.level, address.level), + address.displacement + V.offset); + if (V.indexed) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + } else if (baseObject instanceof UnknownAddress) { + ObjectAddress address = ((UnknownAddress) baseObject).address; + emit(Machine.LOADop, Machine.addressSize,displayRegister(frame.level, + address.level), address.displacement); + if (V.indexed) + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + if (V.offset != 0) { + emit(Machine.LOADLop, 0, 0, V.offset); + emit(Machine.CALLop, Machine.SBr, Machine.PBr, Machine.addDisplacement); + } + } + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/EqualityRoutine.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/EqualityRoutine.java new file mode 100644 index 00000000..d993e519 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/EqualityRoutine.java @@ -0,0 +1,30 @@ +/* + * @(#)EqualityRoutine.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class EqualityRoutine extends RuntimeEntity { + + public EqualityRoutine () { + super(); + } + + public EqualityRoutine (int size, int displacement) { + super (size); + this.displacement = displacement; + } + + public int displacement; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Field.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Field.java new file mode 100644 index 00000000..bba90095 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Field.java @@ -0,0 +1,31 @@ +/* + * @(#)Field.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class Field extends RuntimeEntity { + + public Field () { + super (); + fieldOffset = 0; + } + + public Field (int size, int fieldOffset) { + super (size); + this.fieldOffset = fieldOffset; + } + + public int fieldOffset; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Frame.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Frame.java new file mode 100644 index 00000000..7b8066fb --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/Frame.java @@ -0,0 +1,46 @@ +/* + * @(#)Frame.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class Frame { + + public Frame() { + this.level = 0; + this.size = 0; + } + + public Frame(int level, Integer size) { + this.level = level; + this.size = size.intValue(); + } + + public Frame(int level, int size) { + this.level = level; + this.size = size; + } + + public Frame(Frame frame, int sizeIncrement) { + this.level = frame.level; + this.size = frame.size + sizeIncrement; + } + + public Frame(Frame frame, Integer sizeIncrement) { + this.level = frame.level; + this.size = frame.size + sizeIncrement.intValue(); + } + + protected int level; + protected int size; +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownAddress.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownAddress.java new file mode 100644 index 00000000..b2e5552d --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownAddress.java @@ -0,0 +1,31 @@ +/* + * @(#)KnownAddress.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class KnownAddress extends RuntimeEntity { + + public KnownAddress () { + super(); + address = null; + } + + public KnownAddress (int size, int level, int displacement) { + super(size); + address = new ObjectAddress(level, displacement); + } + + public ObjectAddress address; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownRoutine.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownRoutine.java new file mode 100644 index 00000000..d2c747e1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownRoutine.java @@ -0,0 +1,31 @@ +/* + * @(#)KnownRoutine.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class KnownRoutine extends RuntimeEntity { + + public KnownRoutine () { + super(); + address = null; + } + + public KnownRoutine (int size, int level, int displacement) { + super(size); + address = new ObjectAddress(level, displacement); + } + + public ObjectAddress address; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownValue.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownValue.java new file mode 100644 index 00000000..36d26465 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/KnownValue.java @@ -0,0 +1,31 @@ +/* + * @(#)KnownValue.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class KnownValue extends RuntimeEntity { + + public KnownValue () { + super(); + value = 0; + } + + public KnownValue (int size, int value) { + super(size); + this.value = value; + } + + public int value; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/ObjectAddress.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/ObjectAddress.java new file mode 100644 index 00000000..ae4edf83 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/ObjectAddress.java @@ -0,0 +1,26 @@ +/* + * @(#)ObjectAddress.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public final class ObjectAddress { + + public ObjectAddress (int level, int displacement) { + this.level = level; + this.displacement = displacement; + } + + public int level, displacement; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/PrimitiveRoutine.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/PrimitiveRoutine.java new file mode 100644 index 00000000..cc58a47c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/PrimitiveRoutine.java @@ -0,0 +1,31 @@ +/* + * @(#)PrimitiveRoutine.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class PrimitiveRoutine extends RuntimeEntity { + + public PrimitiveRoutine () { + super(); + displacement = 0; + } + + public PrimitiveRoutine (int size, int displacement) { + super (size); + this.displacement = displacement; + } + + public int displacement; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/RuntimeEntity.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/RuntimeEntity.java new file mode 100644 index 00000000..e8bab01f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/RuntimeEntity.java @@ -0,0 +1,33 @@ +/* + * @(#)RuntimeEntity.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +// Run-time object + +public abstract class RuntimeEntity { + + public final static int maxRoutineLevel = 7; + + public RuntimeEntity () { + size = 0; + } + + public RuntimeEntity (int size) { + this.size = size; + } + + public int size; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/TypeRepresentation.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/TypeRepresentation.java new file mode 100644 index 00000000..e8f70929 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/TypeRepresentation.java @@ -0,0 +1,23 @@ +/* + * @(#)TypeRepresentation.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class TypeRepresentation extends RuntimeEntity { + + public TypeRepresentation (int size) { + super(size); + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownAddress.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownAddress.java new file mode 100644 index 00000000..78667e5e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownAddress.java @@ -0,0 +1,31 @@ +/* + * @(#)UnknownAddress.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class UnknownAddress extends RuntimeEntity { + + public UnknownAddress () { + super(); + address = null; + } + + public UnknownAddress (int size, int level, int displacement) { + super (size); + address = new ObjectAddress (level, displacement); + } + + public ObjectAddress address; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownRoutine.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownRoutine.java new file mode 100644 index 00000000..f20addb0 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownRoutine.java @@ -0,0 +1,31 @@ +/* + * @(#)UnknownRoutine.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class UnknownRoutine extends RuntimeEntity { + + public UnknownRoutine () { + super(); + address = null; + } + + public UnknownRoutine (int size, int level, int displacement) { + super(size); + address = new ObjectAddress (level, displacement); + } + + public ObjectAddress address; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownValue.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownValue.java new file mode 100644 index 00000000..a938b0c1 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/CodeGenerator/UnknownValue.java @@ -0,0 +1,31 @@ +/* + * @(#)UnknownValue.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.CodeGenerator; + +public class UnknownValue extends RuntimeEntity { + + public UnknownValue () { + super(); + address = null; + } + + public UnknownValue (int size, int level, int displacement) { + super(size); + address = new ObjectAddress(level, displacement); + } + + public ObjectAddress address; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/Compiler.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/Compiler.java new file mode 100644 index 00000000..984e6885 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/Compiler.java @@ -0,0 +1,130 @@ +/* + * @(#)Compiler.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle; + +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.CodeGenerator.Encoder; +import Triangle.ContextualAnalyzer.Checker; +import Triangle.SyntacticAnalyzer.Parser; +import Triangle.SyntacticAnalyzer.Scanner; +import Triangle.SyntacticAnalyzer.SourceFile; +import Triangle.TreeDrawer.Drawer; + +/** + * The main driver class for the Triangle compiler. + * + * @version 2.1 7 Oct 2003 + * @author Deryck F. Brown + */ +public class Compiler { + + /** The filename for the object program, normally obj.tam. */ + static String objectName = "obj.tam"; + + private static Scanner scanner; + private static Parser parser; + private static Checker checker; + private static Encoder encoder; + private static ErrorReporter reporter; + private static Drawer drawer; + + /** The AST representing the source program. */ + private static Program theAST; + + /** + * Compile the source program to TAM machine code. + * + * @param sourceName the name of the file containing the + * source program. + * @param objectName the name of the file containing the + * object program. + * @param showingAST true iff the AST is to be displayed after + * contextual analysis (not currently implemented). + * @param showingTable true iff the object description details are to + * be displayed during code generation (not + * currently implemented). + * @return true iff the source program is free of compile-time errors, + * otherwise false. + */ + static boolean compileProgram (String sourceName, String objectName, + boolean showingAST, boolean showingTable) { + + System.out.println("********** " + + "Triangle Compiler (Java Version 2.1)" + + " **********"); + + System.out.println("Syntactic Analysis ..."); + SourceFile source = new SourceFile(sourceName); + + if (source.getCurrentLine() == 0) { + System.out.println("Can't access source file " + sourceName); + System.exit(1); + } + + scanner = new Scanner(source); + reporter = new ErrorReporter(); + parser = new Parser(scanner, reporter); + checker = new Checker(reporter); + encoder = new Encoder(reporter); + drawer = new Drawer(); + + // scanner.enableDebugging(); + theAST = parser.parseProgram(); // 1st pass + if (reporter.numErrors == 0) { + //if (showingAST) { + // drawer.draw(theAST); + //} + System.out.println ("Contextual Analysis ..."); + checker.check(theAST); // 2nd pass + if (showingAST) { + drawer.draw(theAST); + } + if (reporter.numErrors == 0) { + System.out.println("Code Generation ..."); + encoder.encodeRun(theAST, showingTable); // 3rd pass + } + } + + boolean successful = (reporter.numErrors == 0); + if (successful) { + encoder.saveObjectProgram(objectName); + System.out.println("Compilation was successful."); + } else { + System.out.println("Compilation was unsuccessful."); + } + return successful; + } + + /** + * Triangle compiler main program. + * + * @param args the only command-line argument to the program specifies + * the source filename. + */ + public static void main(String[] args) { + boolean compiledOK; + + if (args.length != 1) { + System.out.println("Usage: tc filename"); + System.exit(1); + } + + String sourceName = args[0]; + objectName = sourceName.replace(".tri", ""); + objectName = objectName + ".tam"; + compiledOK = compileProgram(sourceName, objectName, false, false); + System.exit(compiledOK ? 0 : -1); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/Checker.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/Checker.java new file mode 100644 index 00000000..005ff2c3 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/Checker.java @@ -0,0 +1,981 @@ +/* + * @(#)Checker.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.ContextualAnalyzer; + +import Triangle.ErrorReporter; +import Triangle.StdEnvironment; +import Triangle.AbstractSyntaxTrees.AnyTypeDenoter; +import Triangle.AbstractSyntaxTrees.ArrayExpression; +import Triangle.AbstractSyntaxTrees.ArrayTypeDenoter; +import Triangle.AbstractSyntaxTrees.AssignCommand; +import Triangle.AbstractSyntaxTrees.BinaryExpression; +import Triangle.AbstractSyntaxTrees.BinaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.BoolTypeDenoter; +import Triangle.AbstractSyntaxTrees.CallCommand; +import Triangle.AbstractSyntaxTrees.CallExpression; +import Triangle.AbstractSyntaxTrees.CharTypeDenoter; +import Triangle.AbstractSyntaxTrees.CharacterExpression; +import Triangle.AbstractSyntaxTrees.CharacterLiteral; +import Triangle.AbstractSyntaxTrees.ConstActualParameter; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.ConstFormalParameter; +import Triangle.AbstractSyntaxTrees.Declaration; +import Triangle.AbstractSyntaxTrees.DotVname; +import Triangle.AbstractSyntaxTrees.EmptyActualParameterSequence; +import Triangle.AbstractSyntaxTrees.EmptyCommand; +import Triangle.AbstractSyntaxTrees.EmptyExpression; +import Triangle.AbstractSyntaxTrees.EmptyFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.ErrorTypeDenoter; +import Triangle.AbstractSyntaxTrees.FieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.FormalParameter; +import Triangle.AbstractSyntaxTrees.FormalParameterSequence; +import Triangle.AbstractSyntaxTrees.FuncActualParameter; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.FuncFormalParameter; +import Triangle.AbstractSyntaxTrees.Identifier; +import Triangle.AbstractSyntaxTrees.IfCommand; +import Triangle.AbstractSyntaxTrees.IfExpression; +import Triangle.AbstractSyntaxTrees.IntTypeDenoter; +import Triangle.AbstractSyntaxTrees.IntegerExpression; +import Triangle.AbstractSyntaxTrees.IntegerLiteral; +import Triangle.AbstractSyntaxTrees.LetCommand; +import Triangle.AbstractSyntaxTrees.LetExpression; +import Triangle.AbstractSyntaxTrees.MultipleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleArrayAggregate; +import Triangle.AbstractSyntaxTrees.MultipleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.MultipleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleRecordAggregate; +import Triangle.AbstractSyntaxTrees.Operator; +import Triangle.AbstractSyntaxTrees.ProcActualParameter; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.ProcFormalParameter; +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.AbstractSyntaxTrees.RecordExpression; +import Triangle.AbstractSyntaxTrees.RecordTypeDenoter; +import Triangle.AbstractSyntaxTrees.SequentialCommand; +import Triangle.AbstractSyntaxTrees.SequentialDeclaration; +import Triangle.AbstractSyntaxTrees.SimpleTypeDenoter; +import Triangle.AbstractSyntaxTrees.SimpleVname; +import Triangle.AbstractSyntaxTrees.SingleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleArrayAggregate; +import Triangle.AbstractSyntaxTrees.SingleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.SingleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleRecordAggregate; +import Triangle.AbstractSyntaxTrees.SubscriptVname; +import Triangle.AbstractSyntaxTrees.Terminal; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.TypeDenoter; +import Triangle.AbstractSyntaxTrees.UnaryExpression; +import Triangle.AbstractSyntaxTrees.UnaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.VarActualParameter; +import Triangle.AbstractSyntaxTrees.VarDeclaration; +import Triangle.AbstractSyntaxTrees.VarFormalParameter; +import Triangle.AbstractSyntaxTrees.Visitor; +import Triangle.AbstractSyntaxTrees.VnameExpression; +import Triangle.AbstractSyntaxTrees.WhileCommand; +import Triangle.SyntacticAnalyzer.SourcePosition; + +public final class Checker implements Visitor { + + // Commands + + // Always returns null. Does not use the given object. + + public Object visitAssignCommand(AssignCommand ast, Object o) { + TypeDenoter vType = (TypeDenoter) ast.V.visit(this, null); + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + if (!ast.V.variable) + reporter.reportError ("LHS of assignment is not a variable", "", ast.V.position); + if (! eType.equals(vType)) + reporter.reportError ("assignment incompatibilty", "", ast.position); + return null; + } + + + public Object visitCallCommand(CallCommand ast, Object o) { + + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) + reportUndeclared(ast.I); + else if (binding instanceof ProcDeclaration) { + ast.APS.visit(this, ((ProcDeclaration) binding).FPS); + } else if (binding instanceof ProcFormalParameter) { + ast.APS.visit(this, ((ProcFormalParameter) binding).FPS); + } else + reporter.reportError("\"%\" is not a procedure identifier", + ast.I.spelling, ast.I.position); + return null; + } + + public Object visitEmptyCommand(EmptyCommand ast, Object o) { + return null; + } + + public Object visitIfCommand(IfCommand ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + if (! eType.equals(StdEnvironment.booleanType)) + reporter.reportError("Boolean expression expected here", "", ast.E.position); + ast.C1.visit(this, null); + ast.C2.visit(this, null); + return null; + } + + public Object visitLetCommand(LetCommand ast, Object o) { + idTable.openScope(); + ast.D.visit(this, null); + ast.C.visit(this, null); + idTable.closeScope(); + return null; + } + + public Object visitSequentialCommand(SequentialCommand ast, Object o) { + ast.C1.visit(this, null); + ast.C2.visit(this, null); + return null; + } + + public Object visitWhileCommand(WhileCommand ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + if (! eType.equals(StdEnvironment.booleanType)) + reporter.reportError("Boolean expression expected here", "", ast.E.position); + ast.C.visit(this, null); + return null; + } + + // Expressions + + // Returns the TypeDenoter denoting the type of the expression. Does + // not use the given object. + + public Object visitArrayExpression(ArrayExpression ast, Object o) { + TypeDenoter elemType = (TypeDenoter) ast.AA.visit(this, null); + IntegerLiteral il = new IntegerLiteral(new Integer(ast.AA.elemCount).toString(), + ast.position); + ast.type = new ArrayTypeDenoter(il, elemType, ast.position); + return ast.type; + } + + public Object visitBinaryExpression(BinaryExpression ast, Object o) { + + TypeDenoter e1Type = (TypeDenoter) ast.E1.visit(this, null); + TypeDenoter e2Type = (TypeDenoter) ast.E2.visit(this, null); + Declaration binding = (Declaration) ast.O.visit(this, null); + + if (binding == null) + reportUndeclared(ast.O); + else { + if (! (binding instanceof BinaryOperatorDeclaration)) + reporter.reportError ("\"%\" is not a binary operator", + ast.O.spelling, ast.O.position); + BinaryOperatorDeclaration bbinding = (BinaryOperatorDeclaration) binding; + if (bbinding.ARG1 == StdEnvironment.anyType) { + // this operator must be "=" or "\=" + if (! e1Type.equals(e2Type)) + reporter.reportError ("incompatible argument types for \"%\"", + ast.O.spelling, ast.position); + } else if (! e1Type.equals(bbinding.ARG1)) + reporter.reportError ("wrong argument type for \"%\"", + ast.O.spelling, ast.E1.position); + else if (! e2Type.equals(bbinding.ARG2)) + reporter.reportError ("wrong argument type for \"%\"", + ast.O.spelling, ast.E2.position); + ast.type = bbinding.RES; + } + return ast.type; + } + + public Object visitCallExpression(CallExpression ast, Object o) { + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) { + reportUndeclared(ast.I); + ast.type = StdEnvironment.errorType; + } else if (binding instanceof FuncDeclaration) { + ast.APS.visit(this, ((FuncDeclaration) binding).FPS); + ast.type = ((FuncDeclaration) binding).T; + } else if (binding instanceof FuncFormalParameter) { + ast.APS.visit(this, ((FuncFormalParameter) binding).FPS); + ast.type = ((FuncFormalParameter) binding).T; + } else + reporter.reportError("\"%\" is not a function identifier", + ast.I.spelling, ast.I.position); + return ast.type; + } + + public Object visitCharacterExpression(CharacterExpression ast, Object o) { + ast.type = StdEnvironment.charType; + return ast.type; + } + + public Object visitEmptyExpression(EmptyExpression ast, Object o) { + ast.type = null; + return ast.type; + } + + public Object visitIfExpression(IfExpression ast, Object o) { + TypeDenoter e1Type = (TypeDenoter) ast.E1.visit(this, null); + if (! e1Type.equals(StdEnvironment.booleanType)) + reporter.reportError ("Boolean expression expected here", "", + ast.E1.position); + TypeDenoter e2Type = (TypeDenoter) ast.E2.visit(this, null); + TypeDenoter e3Type = (TypeDenoter) ast.E3.visit(this, null); + if (! e2Type.equals(e3Type)) + reporter.reportError ("incompatible limbs in if-expression", "", ast.position); + ast.type = e2Type; + return ast.type; + } + + public Object visitIntegerExpression(IntegerExpression ast, Object o) { + ast.type = StdEnvironment.integerType; + return ast.type; + } + + public Object visitLetExpression(LetExpression ast, Object o) { + idTable.openScope(); + ast.D.visit(this, null); + ast.type = (TypeDenoter) ast.E.visit(this, null); + idTable.closeScope(); + return ast.type; + } + + public Object visitRecordExpression(RecordExpression ast, Object o) { + FieldTypeDenoter rType = (FieldTypeDenoter) ast.RA.visit(this, null); + ast.type = new RecordTypeDenoter(rType, ast.position); + return ast.type; + } + + public Object visitUnaryExpression(UnaryExpression ast, Object o) { + + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + Declaration binding = (Declaration) ast.O.visit(this, null); + if (binding == null) { + reportUndeclared(ast.O); + ast.type = StdEnvironment.errorType; + } else if (! (binding instanceof UnaryOperatorDeclaration)) + reporter.reportError ("\"%\" is not a unary operator", + ast.O.spelling, ast.O.position); + else { + UnaryOperatorDeclaration ubinding = (UnaryOperatorDeclaration) binding; + if (! eType.equals(ubinding.ARG)) + reporter.reportError ("wrong argument type for \"%\"", + ast.O.spelling, ast.O.position); + ast.type = ubinding.RES; + } + return ast.type; + } + + public Object visitVnameExpression(VnameExpression ast, Object o) { + ast.type = (TypeDenoter) ast.V.visit(this, null); + return ast.type; + } + + // Declarations + + // Always returns null. Does not use the given object. + public Object visitBinaryOperatorDeclaration(BinaryOperatorDeclaration ast, Object o) { + return null; + } + + public Object visitConstDeclaration(ConstDeclaration ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + idTable.enter(ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("identifier \"%\" already declared", + ast.I.spelling, ast.position); + return null; + } + + public Object visitFuncDeclaration(FuncDeclaration ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter (ast.I.spelling, ast); // permits recursion + if (ast.duplicated) + reporter.reportError ("identifier \"%\" already declared", + ast.I.spelling, ast.position); + idTable.openScope(); + ast.FPS.visit(this, null); + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + idTable.closeScope(); + if (! ast.T.equals(eType)) + reporter.reportError ("body of function \"%\" has wrong type", + ast.I.spelling, ast.E.position); + return null; + } + + public Object visitProcDeclaration(ProcDeclaration ast, Object o) { + idTable.enter (ast.I.spelling, ast); // permits recursion + if (ast.duplicated) + reporter.reportError ("identifier \"%\" already declared", + ast.I.spelling, ast.position); + idTable.openScope(); + ast.FPS.visit(this, null); + ast.C.visit(this, null); + idTable.closeScope(); + return null; + } + + public Object visitSequentialDeclaration(SequentialDeclaration ast, Object o) { + ast.D1.visit(this, null); + ast.D2.visit(this, null); + return null; + } + + public Object visitTypeDeclaration(TypeDeclaration ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter (ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("identifier \"%\" already declared", + ast.I.spelling, ast.position); + return null; + } + + public Object visitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Object o) { + return null; + } + + public Object visitVarDeclaration(VarDeclaration ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter (ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("identifier \"%\" already declared", + ast.I.spelling, ast.position); + + return null; + } + + // Array Aggregates + + // Returns the TypeDenoter for the Array Aggregate. Does not use the + // given object. + + public Object visitMultipleArrayAggregate(MultipleArrayAggregate ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + TypeDenoter elemType = (TypeDenoter) ast.AA.visit(this, null); + ast.elemCount = ast.AA.elemCount + 1; + if (! eType.equals(elemType)) + reporter.reportError ("incompatible array-aggregate element", "", ast.E.position); + return elemType; + } + + public Object visitSingleArrayAggregate(SingleArrayAggregate ast, Object o) { + TypeDenoter elemType = (TypeDenoter) ast.E.visit(this, null); + ast.elemCount = 1; + return elemType; + } + + // Record Aggregates + + // Returns the TypeDenoter for the Record Aggregate. Does not use the + // given object. + + public Object visitMultipleRecordAggregate(MultipleRecordAggregate ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + FieldTypeDenoter rType = (FieldTypeDenoter) ast.RA.visit(this, null); + TypeDenoter fType = checkFieldIdentifier(rType, ast.I); + if (fType != StdEnvironment.errorType) + reporter.reportError ("duplicate field \"%\" in record", + ast.I.spelling, ast.I.position); + ast.type = new MultipleFieldTypeDenoter(ast.I, eType, rType, ast.position); + return ast.type; + } + + public Object visitSingleRecordAggregate(SingleRecordAggregate ast, Object o) { + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + ast.type = new SingleFieldTypeDenoter(ast.I, eType, ast.position); + return ast.type; + } + + // Formal Parameters + + // Always returns null. Does not use the given object. + + public Object visitConstFormalParameter(ConstFormalParameter ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter(ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("duplicated formal parameter \"%\"", + ast.I.spelling, ast.position); + return null; + } + + public Object visitFuncFormalParameter(FuncFormalParameter ast, Object o) { + idTable.openScope(); + ast.FPS.visit(this, null); + idTable.closeScope(); + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter (ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("duplicated formal parameter \"%\"", + ast.I.spelling, ast.position); + return null; + } + + public Object visitProcFormalParameter(ProcFormalParameter ast, Object o) { + idTable.openScope(); + ast.FPS.visit(this, null); + idTable.closeScope(); + idTable.enter (ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("duplicated formal parameter \"%\"", + ast.I.spelling, ast.position); + return null; + } + + public Object visitVarFormalParameter(VarFormalParameter ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + idTable.enter (ast.I.spelling, ast); + if (ast.duplicated) + reporter.reportError ("duplicated formal parameter \"%\"", + ast.I.spelling, ast.position); + return null; + } + + public Object visitEmptyFormalParameterSequence(EmptyFormalParameterSequence ast, Object o) { + return null; + } + + public Object visitMultipleFormalParameterSequence(MultipleFormalParameterSequence ast, Object o) { + ast.FP.visit(this, null); + ast.FPS.visit(this, null); + return null; + } + + public Object visitSingleFormalParameterSequence(SingleFormalParameterSequence ast, Object o) { + ast.FP.visit(this, null); + return null; + } + + // Actual Parameters + + // Always returns null. Uses the given FormalParameter. + + public Object visitConstActualParameter(ConstActualParameter ast, Object o) { + FormalParameter fp = (FormalParameter) o; + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + + if (! (fp instanceof ConstFormalParameter)) + reporter.reportError ("const actual parameter not expected here", "", + ast.position); + else if (! eType.equals(((ConstFormalParameter) fp).T)) { + System.out.println(eType); + System.out.println(((ConstFormalParameter) fp).T); + reporter.reportError ("wrong type for const actual parameter", "", + ast.E.position); + } + return null; + } + + public Object visitFuncActualParameter(FuncActualParameter ast, Object o) { + FormalParameter fp = (FormalParameter) o; + + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) + reportUndeclared (ast.I); + else if (! (binding instanceof FuncDeclaration || + binding instanceof FuncFormalParameter)) + reporter.reportError ("\"%\" is not a function identifier", + ast.I.spelling, ast.I.position); + else if (! (fp instanceof FuncFormalParameter)) + reporter.reportError ("func actual parameter not expected here", "", + ast.position); + else { + FormalParameterSequence FPS = null; + TypeDenoter T = null; + if (binding instanceof FuncDeclaration) { + FPS = ((FuncDeclaration) binding).FPS; + T = ((FuncDeclaration) binding).T; + } else { + FPS = ((FuncFormalParameter) binding).FPS; + T = ((FuncFormalParameter) binding).T; + } + if (! FPS.equals(((FuncFormalParameter) fp).FPS)) + reporter.reportError ("wrong signature for function \"%\"", + ast.I.spelling, ast.I.position); + else if (! T.equals(((FuncFormalParameter) fp).T)) + reporter.reportError ("wrong type for function \"%\"", + ast.I.spelling, ast.I.position); + } + return null; + } + + public Object visitProcActualParameter(ProcActualParameter ast, Object o) { + FormalParameter fp = (FormalParameter) o; + + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) + reportUndeclared (ast.I); + else if (! (binding instanceof ProcDeclaration || + binding instanceof ProcFormalParameter)) + reporter.reportError ("\"%\" is not a procedure identifier", + ast.I.spelling, ast.I.position); + else if (! (fp instanceof ProcFormalParameter)) + reporter.reportError ("proc actual parameter not expected here", "", + ast.position); + else { + FormalParameterSequence FPS = null; + if (binding instanceof ProcDeclaration) + FPS = ((ProcDeclaration) binding).FPS; + else + FPS = ((ProcFormalParameter) binding).FPS; + if (! FPS.equals(((ProcFormalParameter) fp).FPS)) + reporter.reportError ("wrong signature for procedure \"%\"", + ast.I.spelling, ast.I.position); + } + return null; + } + + public Object visitVarActualParameter(VarActualParameter ast, Object o) { + FormalParameter fp = (FormalParameter) o; + + TypeDenoter vType = (TypeDenoter) ast.V.visit(this, null); + if (! ast.V.variable) + reporter.reportError ("actual parameter is not a variable", "", + ast.V.position); + else if (! (fp instanceof VarFormalParameter)) + reporter.reportError ("var actual parameter not expected here", "", + ast.V.position); + else if (! vType.equals(((VarFormalParameter) fp).T)) + reporter.reportError ("wrong type for var actual parameter", "", + ast.V.position); + return null; + } + + public Object visitEmptyActualParameterSequence(EmptyActualParameterSequence ast, Object o) { + FormalParameterSequence fps = (FormalParameterSequence) o; + if (! (fps instanceof EmptyFormalParameterSequence)) + reporter.reportError ("too few actual parameters", "", ast.position); + return null; + } + + public Object visitMultipleActualParameterSequence(MultipleActualParameterSequence ast, Object o) { + FormalParameterSequence fps = (FormalParameterSequence) o; + if (! (fps instanceof MultipleFormalParameterSequence)) + reporter.reportError ("too many actual parameters", "", ast.position); + else { + ast.AP.visit(this, ((MultipleFormalParameterSequence) fps).FP); + ast.APS.visit(this, ((MultipleFormalParameterSequence) fps).FPS); + } + return null; + } + + public Object visitSingleActualParameterSequence(SingleActualParameterSequence ast, Object o) { + FormalParameterSequence fps = (FormalParameterSequence) o; + if (! (fps instanceof SingleFormalParameterSequence)) + reporter.reportError ("incorrect number of actual parameters", "", ast.position); + else { + ast.AP.visit(this, ((SingleFormalParameterSequence) fps).FP); + } + return null; + } + + // Type Denoters + + // Returns the expanded version of the TypeDenoter. Does not + // use the given object. + + public Object visitAnyTypeDenoter(AnyTypeDenoter ast, Object o) { + return StdEnvironment.anyType; + } + + public Object visitArrayTypeDenoter(ArrayTypeDenoter ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + if ((Integer.valueOf(ast.IL.spelling).intValue()) == 0) + reporter.reportError ("arrays must not be empty", "", ast.IL.position); + return ast; + } + + public Object visitBoolTypeDenoter(BoolTypeDenoter ast, Object o) { + return StdEnvironment.booleanType; + } + + public Object visitCharTypeDenoter(CharTypeDenoter ast, Object o) { + return StdEnvironment.charType; + } + + public Object visitErrorTypeDenoter(ErrorTypeDenoter ast, Object o) { + return StdEnvironment.errorType; + } + + public Object visitSimpleTypeDenoter(SimpleTypeDenoter ast, Object o) { + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) { + reportUndeclared (ast.I); + return StdEnvironment.errorType; + } else if (! (binding instanceof TypeDeclaration)) { + reporter.reportError ("\"%\" is not a type identifier", + ast.I.spelling, ast.I.position); + return StdEnvironment.errorType; + } + return ((TypeDeclaration) binding).T; + } + + public Object visitIntTypeDenoter(IntTypeDenoter ast, Object o) { + return StdEnvironment.integerType; + } + + public Object visitRecordTypeDenoter(RecordTypeDenoter ast, Object o) { + ast.FT = (FieldTypeDenoter) ast.FT.visit(this, null); + return ast; + } + + public Object visitMultipleFieldTypeDenoter(MultipleFieldTypeDenoter ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + ast.FT.visit(this, null); + return ast; + } + + public Object visitSingleFieldTypeDenoter(SingleFieldTypeDenoter ast, Object o) { + ast.T = (TypeDenoter) ast.T.visit(this, null); + return ast; + } + + // Literals, Identifiers and Operators + public Object visitCharacterLiteral(CharacterLiteral CL, Object o) { + return StdEnvironment.charType; + } + + public Object visitIdentifier(Identifier I, Object o) { + Declaration binding = idTable.retrieve(I.spelling); + if (binding != null) + I.decl = binding; + return binding; + } + + public Object visitIntegerLiteral(IntegerLiteral IL, Object o) { + return StdEnvironment.integerType; + } + + public Object visitOperator(Operator O, Object o) { + Declaration binding = idTable.retrieve(O.spelling); + if (binding != null) + O.decl = binding; + return binding; + } + + // Value-or-variable names + + // Determines the address of a named object (constant or variable). + // This consists of a base object, to which 0 or more field-selection + // or array-indexing operations may be applied (if it is a record or + // array). As much as possible of the address computation is done at + // compile-time. Code is generated only when necessary to evaluate + // index expressions at run-time. + // currentLevel is the routine level where the v-name occurs. + // frameSize is the anticipated size of the local stack frame when + // the object is addressed at run-time. + // It returns the description of the base object. + // offset is set to the total of any field offsets (plus any offsets + // due to index expressions that happen to be literals). + // indexed is set to true iff there are any index expressions (other + // than literals). In that case code is generated to compute the + // offset due to these indexing operations at run-time. + + // Returns the TypeDenoter of the Vname. Does not use the + // given object. + + public Object visitDotVname(DotVname ast, Object o) { + ast.type = null; + TypeDenoter vType = (TypeDenoter) ast.V.visit(this, null); + ast.variable = ast.V.variable; + if (! (vType instanceof RecordTypeDenoter)) + reporter.reportError ("record expected here", "", ast.V.position); + else { + ast.type = checkFieldIdentifier(((RecordTypeDenoter) vType).FT, ast.I); + if (ast.type == StdEnvironment.errorType) + reporter.reportError ("no field \"%\" in this record type", + ast.I.spelling, ast.I.position); + } + return ast.type; + } + + public Object visitSimpleVname(SimpleVname ast, Object o) { + ast.variable = false; + ast.type = StdEnvironment.errorType; + Declaration binding = (Declaration) ast.I.visit(this, null); + if (binding == null) + reportUndeclared(ast.I); + else + if (binding instanceof ConstDeclaration) { + ast.type = ((ConstDeclaration) binding).E.type; + ast.variable = false; + } else if (binding instanceof VarDeclaration) { + ast.type = ((VarDeclaration) binding).T; + ast.variable = true; + } else if (binding instanceof ConstFormalParameter) { + ast.type = ((ConstFormalParameter) binding).T; + ast.variable = false; + } else if (binding instanceof VarFormalParameter) { + ast.type = ((VarFormalParameter) binding).T; + ast.variable = true; + } else + reporter.reportError ("\"%\" is not a const or var identifier", + ast.I.spelling, ast.I.position); + return ast.type; + } + + public Object visitSubscriptVname(SubscriptVname ast, Object o) { + TypeDenoter vType = (TypeDenoter) ast.V.visit(this, null); + ast.variable = ast.V.variable; + TypeDenoter eType = (TypeDenoter) ast.E.visit(this, null); + if (vType != StdEnvironment.errorType) { + if (! (vType instanceof ArrayTypeDenoter)) + reporter.reportError ("array expected here", "", ast.V.position); + else { + if (! eType.equals(StdEnvironment.integerType)) + reporter.reportError ("Integer expression expected here", "", + ast.E.position); + ast.type = ((ArrayTypeDenoter) vType).T; + } + } + return ast.type; + } + + // Programs + + public Object visitProgram(Program ast, Object o) { + ast.C.visit(this, null); + return null; + } + + // Checks whether the source program, represented by its AST, satisfies the + // language's scope rules and type rules. + // Also decorates the AST as follows: + // (a) Each applied occurrence of an identifier or operator is linked to + // the corresponding declaration of that identifier or operator. + // (b) Each expression and value-or-variable-name is decorated by its type. + // (c) Each type identifier is replaced by the type it denotes. + // Types are represented by small ASTs. + + public void check(Program ast) { + ast.visit(this, null); + } + + ///////////////////////////////////////////////////////////////////////////// + + public Checker (ErrorReporter reporter) { + this.reporter = reporter; + this.idTable = new IdentificationTable (); + establishStdEnvironment(); + } + + private IdentificationTable idTable; + private static SourcePosition dummyPos = new SourcePosition(); + private ErrorReporter reporter; + + // Reports that the identifier or operator used at a leaf of the AST + // has not been declared. + + private void reportUndeclared (Terminal leaf) { + reporter.reportError("\"%\" is not declared", leaf.spelling, leaf.position); + } + + + private static TypeDenoter checkFieldIdentifier(FieldTypeDenoter ast, Identifier I) { + if (ast instanceof MultipleFieldTypeDenoter) { + MultipleFieldTypeDenoter ft = (MultipleFieldTypeDenoter) ast; + if (ft.I.spelling.compareTo(I.spelling) == 0) { + I.decl = ast; + return ft.T; + } else { + return checkFieldIdentifier (ft.FT, I); + } + } else if (ast instanceof SingleFieldTypeDenoter) { + SingleFieldTypeDenoter ft = (SingleFieldTypeDenoter) ast; + if (ft.I.spelling.compareTo(I.spelling) == 0) { + I.decl = ast; + return ft.T; + } + } + return StdEnvironment.errorType; + } + + + // Creates a small AST to represent the "declaration" of a standard + // type, and enters it in the identification table. + + private TypeDeclaration declareStdType (String id, TypeDenoter typedenoter) { + + TypeDeclaration binding; + + binding = new TypeDeclaration(new Identifier(id, dummyPos), typedenoter, dummyPos); + idTable.enter(id, binding); + return binding; + } + + // Creates a small AST to represent the "declaration" of a standard + // type, and enters it in the identification table. + + private ConstDeclaration declareStdConst (String id, TypeDenoter constType) { + + IntegerExpression constExpr; + ConstDeclaration binding; + + // constExpr used only as a placeholder for constType + constExpr = new IntegerExpression(null, dummyPos); + constExpr.type = constType; + binding = new ConstDeclaration(new Identifier(id, dummyPos), constExpr, dummyPos); + idTable.enter(id, binding); + return binding; + } + + // Creates a small AST to represent the "declaration" of a standard + // type, and enters it in the identification table. + + private ProcDeclaration declareStdProc (String id, FormalParameterSequence fps) { + + ProcDeclaration binding; + + binding = new ProcDeclaration(new Identifier(id, dummyPos), fps, + new EmptyCommand(dummyPos), dummyPos); + idTable.enter(id, binding); + return binding; + } + + // Creates a small AST to represent the "declaration" of a standard + // type, and enters it in the identification table. + + private FuncDeclaration declareStdFunc (String id, FormalParameterSequence fps, + TypeDenoter resultType) { + + FuncDeclaration binding; + + binding = new FuncDeclaration(new Identifier(id, dummyPos), fps, resultType, + new EmptyExpression(dummyPos), dummyPos); + idTable.enter(id, binding); + return binding; + } + + // Creates a small AST to represent the "declaration" of a + // unary operator, and enters it in the identification table. + // This "declaration" summarises the operator's type info. + + private UnaryOperatorDeclaration declareStdUnaryOp + (String op, TypeDenoter argType, TypeDenoter resultType) { + + UnaryOperatorDeclaration binding; + + binding = new UnaryOperatorDeclaration (new Operator(op, dummyPos), + argType, resultType, dummyPos); + idTable.enter(op, binding); + return binding; + } + + // Creates a small AST to represent the "declaration" of a + // binary operator, and enters it in the identification table. + // This "declaration" summarises the operator's type info. + + private BinaryOperatorDeclaration declareStdBinaryOp + (String op, TypeDenoter arg1Type, TypeDenoter arg2type, TypeDenoter resultType) { + + BinaryOperatorDeclaration binding; + + binding = new BinaryOperatorDeclaration (new Operator(op, dummyPos), + arg1Type, arg2type, resultType, dummyPos); + idTable.enter(op, binding); + return binding; + } + + // Creates small ASTs to represent the standard types. + // Creates small ASTs to represent "declarations" of standard types, + // constants, procedures, functions, and operators. + // Enters these "declarations" in the identification table. + + private final static Identifier dummyI = new Identifier("", dummyPos); + + private void establishStdEnvironment () { + + // idTable.startIdentification(); + StdEnvironment.booleanType = new BoolTypeDenoter(dummyPos); + StdEnvironment.integerType = new IntTypeDenoter(dummyPos); + StdEnvironment.charType = new CharTypeDenoter(dummyPos); + StdEnvironment.anyType = new AnyTypeDenoter(dummyPos); + StdEnvironment.errorType = new ErrorTypeDenoter(dummyPos); + StdEnvironment.fileNameType = new ArrayTypeDenoter(new IntegerLiteral("20",dummyPos), StdEnvironment.charType,dummyPos); + + StdEnvironment.booleanDecl = declareStdType("Boolean", StdEnvironment.booleanType); + StdEnvironment.falseDecl = declareStdConst("false", StdEnvironment.booleanType); + StdEnvironment.trueDecl = declareStdConst("true", StdEnvironment.booleanType); + StdEnvironment.notDecl = declareStdUnaryOp("\\", StdEnvironment.booleanType, StdEnvironment.booleanType); + StdEnvironment.andDecl = declareStdBinaryOp("/\\", StdEnvironment.booleanType, StdEnvironment.booleanType, StdEnvironment.booleanType); + StdEnvironment.orDecl = declareStdBinaryOp("\\/", StdEnvironment.booleanType, StdEnvironment.booleanType, StdEnvironment.booleanType); + + StdEnvironment.integerDecl = declareStdType("Integer", StdEnvironment.integerType); + StdEnvironment.maxintDecl = declareStdConst("maxint", StdEnvironment.integerType); + StdEnvironment.addDecl = declareStdBinaryOp("+", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.integerType); + StdEnvironment.subtractDecl = declareStdBinaryOp("-", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.integerType); + StdEnvironment.multiplyDecl = declareStdBinaryOp("*", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.integerType); + StdEnvironment.divideDecl = declareStdBinaryOp("/", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.integerType); + StdEnvironment.moduloDecl = declareStdBinaryOp("//", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.integerType); + StdEnvironment.lessDecl = declareStdBinaryOp("<", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.booleanType); + StdEnvironment.notgreaterDecl = declareStdBinaryOp("<=", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.booleanType); + StdEnvironment.greaterDecl = declareStdBinaryOp(">", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.booleanType); + StdEnvironment.notlessDecl = declareStdBinaryOp(">=", StdEnvironment.integerType, StdEnvironment.integerType, StdEnvironment.booleanType); + + StdEnvironment.charDecl = declareStdType("Char", StdEnvironment.charType); + StdEnvironment.chrDecl = declareStdFunc("chr", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), dummyPos), StdEnvironment.charType); + StdEnvironment.ordDecl = declareStdFunc("ord", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.charType, dummyPos), dummyPos), StdEnvironment.integerType); + StdEnvironment.eofDecl = declareStdProc("eof", new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.booleanType, dummyPos), dummyPos)); + StdEnvironment.eolDecl = declareStdProc("eol", new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.booleanType, dummyPos), dummyPos)); + StdEnvironment.getDecl = declareStdProc("get", new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.charType, dummyPos), dummyPos)); + StdEnvironment.putDecl = declareStdProc("put", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.charType, dummyPos), dummyPos)); + StdEnvironment.getintDecl = declareStdProc("getint", new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), dummyPos)); + StdEnvironment.putintDecl = declareStdProc("putint", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), dummyPos)); + StdEnvironment.geteolDecl = declareStdProc("geteol", new EmptyFormalParameterSequence(dummyPos)); + StdEnvironment.puteolDecl = declareStdProc("puteol", new EmptyFormalParameterSequence(dummyPos)); + StdEnvironment.equalDecl = declareStdBinaryOp("=", StdEnvironment.anyType, StdEnvironment.anyType, StdEnvironment.booleanType); + StdEnvironment.unequalDecl = declareStdBinaryOp("\\=", StdEnvironment.anyType, StdEnvironment.anyType, StdEnvironment.booleanType); + + StdEnvironment.fopenDecl = declareStdProc("fopen", new MultipleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), + new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.fileNameType, dummyPos), + new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.booleanType, dummyPos), dummyPos),dummyPos),dummyPos)); + StdEnvironment.fgetintDecl = declareStdProc("fgetint", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), + new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.integerType, dummyPos),dummyPos),dummyPos)); + StdEnvironment.fputintDecl = declareStdProc("fputint", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), + new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos),dummyPos),dummyPos)); + StdEnvironment.fgetDecl = declareStdProc("fget", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), + new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.charType, dummyPos),dummyPos),dummyPos)); + StdEnvironment.fputDecl = declareStdProc("fput", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), + new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.charType, dummyPos),dummyPos),dummyPos)); + StdEnvironment.fgeteolDecl = declareStdProc("fgeteol", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos),dummyPos)); + StdEnvironment.fputeolDecl = declareStdProc("fputeol", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos),dummyPos)); + StdEnvironment.feolDecl = declareStdProc("feol", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.booleanType, dummyPos), dummyPos), dummyPos)); + StdEnvironment.feofDecl = declareStdProc("feof", new MultipleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos), new SingleFormalParameterSequence( + new VarFormalParameter(dummyI, StdEnvironment.booleanType, dummyPos), dummyPos), dummyPos)); + StdEnvironment.fcloseDecl = declareStdProc("fclose", new SingleFormalParameterSequence( + new ConstFormalParameter(dummyI, StdEnvironment.integerType, dummyPos),dummyPos)); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdEntry.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdEntry.java new file mode 100644 index 00000000..e2993f1b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdEntry.java @@ -0,0 +1,33 @@ +/* + * @(#)IdEntry.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.ContextualAnalyzer; + +import Triangle.AbstractSyntaxTrees.Declaration; + +public class IdEntry { + + protected String id; + protected Declaration attr; + protected int level; + protected IdEntry previous; + + IdEntry (String id, Declaration attr, int level, IdEntry previous) { + this.id = id; + this.attr = attr; + this.level = level; + this.previous = previous; + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdentificationTable.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdentificationTable.java new file mode 100644 index 00000000..0de51ef9 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/IdentificationTable.java @@ -0,0 +1,108 @@ +/* + * @(#)IdentificationTable.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.ContextualAnalyzer; + +import Triangle.AbstractSyntaxTrees.Declaration; + +public final class IdentificationTable { + + private int level; + private IdEntry latest; + + public IdentificationTable () { + level = 0; + latest = null; + } + + // Opens a new level in the identification table, 1 higher than the + // current topmost level. + + public void openScope () { + + level ++; + } + + // Closes the topmost level in the identification table, discarding + // all entries belonging to that level. + + public void closeScope () { + + IdEntry entry, local; + + // Presumably, idTable.level > 0. + entry = this.latest; + while (entry.level == this.level) { + local = entry; + entry = local.previous; + } + this.level--; + this.latest = entry; + } + + // Makes a new entry in the identification table for the given identifier + // and attribute. The new entry belongs to the current level. + // duplicated is set to to true iff there is already an entry for the + // same identifier at the current level. + + public void enter (String id, Declaration attr) { + + IdEntry entry = this.latest; + boolean present = false, searching = true; + + // Check for duplicate entry ... + while (searching) { + if (entry == null || entry.level < this.level) + searching = false; + else if (entry.id.equals(id)) { + present = true; + searching = false; + } else + entry = entry.previous; + } + + attr.duplicated = present; + // Add new entry ... + entry = new IdEntry(id, attr, this.level, this.latest); + this.latest = entry; + } + + // Finds an entry for the given identifier in the identification table, + // if any. If there are several entries for that identifier, finds the + // entry at the highest level, in accordance with the scope rules. + // Returns null iff no entry is found. + // otherwise returns the attribute field of the entry found. + + public Declaration retrieve (String id) { + + IdEntry entry; + Declaration attr = null; + boolean present = false, searching = true; + + entry = this.latest; + while (searching) { + if (entry == null) + searching = false; + else if (entry.id.equals(id)) { + present = true; + searching = false; + attr = entry.attr; + } else + entry = entry.previous; + } + + return attr; + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/SymbolTable.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/SymbolTable.java new file mode 100644 index 00000000..daeeeb51 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ContextualAnalyzer/SymbolTable.java @@ -0,0 +1,43 @@ +package Triangle.ContextualAnalyzer; + +import java.util.List; +import java.util.Map; +import java.util.Stack; + +import Triangle.AbstractSyntaxTrees.Declaration; + +public final class SymbolTable { + + private Map> symtab; + private List> scopeStack; + + public SymbolTable () { + } + + // Opens a new level in the identification table, 1 higher than the + // current topmost level. + public void openScope () { + } + + // Closes the topmost level in the identification table, discarding + // all entries belonging to that level. + public void closeScope () { + } + + // Makes a new entry in the identification table for the given identifier + // and attribute. The new entry belongs to the current level. + // duplicated is set to to true if there is already an entry for the + // same identifier at the current level. + public void enter (String id, Declaration attr) { + } + + // Finds an entry for the given identifier in the identification table, + // if any. If there are several entries for that identifier, finds the + // entry at the highest level, in accordance with the scope rules. + // Returns null if no entry is found. + // otherwise returns the attribute field of the entry found. + public Declaration retrieve (String id) { + return null; + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ErrorReporter.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ErrorReporter.java new file mode 100644 index 00000000..8b569bc4 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/ErrorReporter.java @@ -0,0 +1,42 @@ +/* + * @(#)ErrorReporter.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle; + +import Triangle.SyntacticAnalyzer.SourcePosition; + +public class ErrorReporter { + + int numErrors; + + ErrorReporter() { + numErrors = 0; + } + + public void reportError(String message, String tokenName, SourcePosition pos) { + System.out.print ("ERROR: "); + + for (int p = 0; p < message.length(); p++) + if (message.charAt(p) == '%') + System.out.print(tokenName); + else + System.out.print(message.charAt(p)); + System.out.println(" " + pos.start + ".." + pos.finish); + numErrors++; + } + + public void reportRestriction(String message) { + System.out.println("RESTRICTION: " + message); + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/StdEnvironment.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/StdEnvironment.java new file mode 100644 index 00000000..b4117c0b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/StdEnvironment.java @@ -0,0 +1,56 @@ +/* + * @(#)StdEnvironment.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle; + +import Triangle.AbstractSyntaxTrees.BinaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.TypeDenoter; +import Triangle.AbstractSyntaxTrees.UnaryOperatorDeclaration; + +public final class StdEnvironment { + + // These are small ASTs representing standard types. + + public static TypeDenoter + booleanType, charType, integerType, anyType, errorType, fileNameType; + + public static TypeDeclaration + booleanDecl, charDecl, integerDecl; + + // These are small ASTs representing "declarations" of standard entities. + + public static ConstDeclaration + falseDecl, trueDecl, maxintDecl; + + public static UnaryOperatorDeclaration + notDecl; + + public static BinaryOperatorDeclaration + andDecl, orDecl, + addDecl, subtractDecl, multiplyDecl, divideDecl, moduloDecl, + equalDecl, unequalDecl, lessDecl, notlessDecl, greaterDecl, notgreaterDecl; + + public static ProcDeclaration + getDecl, putDecl, getintDecl, putintDecl, geteolDecl, puteolDecl, + fgetintDecl, fputintDecl, fgetDecl, fputDecl, fgeteolDecl, fputeolDecl, + fcloseDecl, fopenDecl, eolDecl, eofDecl, feolDecl, feofDecl; + + public static FuncDeclaration + chrDecl, ordDecl; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Parser.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Parser.java new file mode 100644 index 00000000..4c28e79a --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Parser.java @@ -0,0 +1,961 @@ +/* + * @(#)Parser.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + +import Triangle.ErrorReporter; +import Triangle.AbstractSyntaxTrees.ActualParameter; +import Triangle.AbstractSyntaxTrees.ActualParameterSequence; +import Triangle.AbstractSyntaxTrees.ArrayAggregate; +import Triangle.AbstractSyntaxTrees.ArrayExpression; +import Triangle.AbstractSyntaxTrees.ArrayTypeDenoter; +import Triangle.AbstractSyntaxTrees.AssignCommand; +import Triangle.AbstractSyntaxTrees.BinaryExpression; +import Triangle.AbstractSyntaxTrees.CallCommand; +import Triangle.AbstractSyntaxTrees.CallExpression; +import Triangle.AbstractSyntaxTrees.CharacterExpression; +import Triangle.AbstractSyntaxTrees.CharacterLiteral; +import Triangle.AbstractSyntaxTrees.Command; +import Triangle.AbstractSyntaxTrees.ConstActualParameter; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.ConstFormalParameter; +import Triangle.AbstractSyntaxTrees.Declaration; +import Triangle.AbstractSyntaxTrees.DotVname; +import Triangle.AbstractSyntaxTrees.EmptyActualParameterSequence; +import Triangle.AbstractSyntaxTrees.EmptyCommand; +import Triangle.AbstractSyntaxTrees.EmptyFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.Expression; +import Triangle.AbstractSyntaxTrees.FieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.FormalParameter; +import Triangle.AbstractSyntaxTrees.FormalParameterSequence; +import Triangle.AbstractSyntaxTrees.FuncActualParameter; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.FuncFormalParameter; +import Triangle.AbstractSyntaxTrees.Identifier; +import Triangle.AbstractSyntaxTrees.IfCommand; +import Triangle.AbstractSyntaxTrees.IfExpression; +import Triangle.AbstractSyntaxTrees.IntegerExpression; +import Triangle.AbstractSyntaxTrees.IntegerLiteral; +import Triangle.AbstractSyntaxTrees.LetCommand; +import Triangle.AbstractSyntaxTrees.LetExpression; +import Triangle.AbstractSyntaxTrees.MultipleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleArrayAggregate; +import Triangle.AbstractSyntaxTrees.MultipleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.MultipleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleRecordAggregate; +import Triangle.AbstractSyntaxTrees.Operator; +import Triangle.AbstractSyntaxTrees.ProcActualParameter; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.ProcFormalParameter; +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.AbstractSyntaxTrees.RecordAggregate; +import Triangle.AbstractSyntaxTrees.RecordExpression; +import Triangle.AbstractSyntaxTrees.RecordTypeDenoter; +import Triangle.AbstractSyntaxTrees.SequentialCommand; +import Triangle.AbstractSyntaxTrees.SequentialDeclaration; +import Triangle.AbstractSyntaxTrees.SimpleTypeDenoter; +import Triangle.AbstractSyntaxTrees.SimpleVname; +import Triangle.AbstractSyntaxTrees.SingleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleArrayAggregate; +import Triangle.AbstractSyntaxTrees.SingleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.SingleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleRecordAggregate; +import Triangle.AbstractSyntaxTrees.SubscriptVname; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.TypeDenoter; +import Triangle.AbstractSyntaxTrees.UnaryExpression; +import Triangle.AbstractSyntaxTrees.VarActualParameter; +import Triangle.AbstractSyntaxTrees.VarDeclaration; +import Triangle.AbstractSyntaxTrees.VarFormalParameter; +import Triangle.AbstractSyntaxTrees.Vname; +import Triangle.AbstractSyntaxTrees.VnameExpression; +import Triangle.AbstractSyntaxTrees.WhileCommand; + +public class Parser { + + private Scanner lexicalAnalyser; + private ErrorReporter errorReporter; + private Token currentToken; + private SourcePosition previousTokenPosition; + + public Parser(Scanner lexer, ErrorReporter reporter) { + lexicalAnalyser = lexer; + errorReporter = reporter; + previousTokenPosition = new SourcePosition(); + } + +// accept checks whether the current token matches tokenExpected. +// If so, fetches the next token. +// If not, reports a syntactic error. + + void accept (int tokenExpected) throws SyntaxError { + if (currentToken.kind == tokenExpected) { + previousTokenPosition = currentToken.position; + currentToken = lexicalAnalyser.scan(); + } else { + syntacticError("\"%\" expected here", Token.spell(tokenExpected)); + } + } + + void acceptIt() { + previousTokenPosition = currentToken.position; + currentToken = lexicalAnalyser.scan(); + } + +// start records the position of the start of a phrase. +// This is defined to be the position of the first +// character of the first token of the phrase. + + void start(SourcePosition position) { + position.start = currentToken.position.start; + } + +// finish records the position of the end of a phrase. +// This is defined to be the position of the last +// character of the last token of the phrase. + + void finish(SourcePosition position) { + position.finish = previousTokenPosition.finish; + } + + void syntacticError(String messageTemplate, String tokenQuoted) throws SyntaxError { + SourcePosition pos = currentToken.position; + errorReporter.reportError(messageTemplate, tokenQuoted, pos); + throw(new SyntaxError()); + } + +/////////////////////////////////////////////////////////////////////////////// +// +// PROGRAMS +// +/////////////////////////////////////////////////////////////////////////////// + + public Program parseProgram() { + + Program programAST = null; + + previousTokenPosition.start = 0; + previousTokenPosition.finish = 0; + currentToken = lexicalAnalyser.scan(); + + try { + Command cAST = parseCommand(); + programAST = new Program(cAST, previousTokenPosition); + if (currentToken.kind != Token.EOT) { + syntacticError("\"%\" not expected after end of program", + currentToken.spelling); + } + } + catch (SyntaxError s) { return null; } + return programAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// LITERALS +// +/////////////////////////////////////////////////////////////////////////////// + +// parseIntegerLiteral parses an integer-literal, and constructs +// a leaf AST to represent it. + + IntegerLiteral parseIntegerLiteral() throws SyntaxError { + IntegerLiteral IL = null; + + if (currentToken.kind == Token.INTLITERAL) { + previousTokenPosition = currentToken.position; + String spelling = currentToken.spelling; + IL = new IntegerLiteral(spelling, previousTokenPosition); + currentToken = lexicalAnalyser.scan(); + } else { + IL = null; + syntacticError("integer literal expected here", ""); + } + return IL; + } + +// parseCharacterLiteral parses a character-literal, and constructs a leaf +// AST to represent it. + + CharacterLiteral parseCharacterLiteral() throws SyntaxError { + CharacterLiteral CL = null; + + if (currentToken.kind == Token.CHARLITERAL) { + previousTokenPosition = currentToken.position; + String spelling = currentToken.spelling; + CL = new CharacterLiteral(spelling, previousTokenPosition); + currentToken = lexicalAnalyser.scan(); + } else { + CL = null; + syntacticError("character literal expected here", ""); + } + return CL; + } + +// parseIdentifier parses an identifier, and constructs a leaf AST to +// represent it. + + Identifier parseIdentifier() throws SyntaxError { + Identifier I = null; + + if (currentToken.kind == Token.IDENTIFIER) { + previousTokenPosition = currentToken.position; + String spelling = currentToken.spelling; + I = new Identifier(spelling, previousTokenPosition); + currentToken = lexicalAnalyser.scan(); + } else { + I = null; + syntacticError("identifier expected here", ""); + } + return I; + } + +// parseOperator parses an operator, and constructs a leaf AST to +// represent it. + + Operator parseOperator() throws SyntaxError { + Operator O = null; + + if (currentToken.kind == Token.OPERATOR) { + previousTokenPosition = currentToken.position; + String spelling = currentToken.spelling; + O = new Operator(spelling, previousTokenPosition); + currentToken = lexicalAnalyser.scan(); + } else { + O = null; + syntacticError("operator expected here", ""); + } + return O; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// COMMANDS +// +/////////////////////////////////////////////////////////////////////////////// + +// parseCommand parses the command, and constructs an AST +// to represent its phrase structure. + + Command parseCommand() throws SyntaxError { + Command commandAST = null; // in case there's a syntactic error + + SourcePosition commandPos = new SourcePosition(); + + start(commandPos); + commandAST = parseSingleCommand(); + while (currentToken.kind == Token.SEMICOLON) { + acceptIt(); + Command c2AST = parseSingleCommand(); + finish(commandPos); + commandAST = new SequentialCommand(commandAST, c2AST, commandPos); + } + return commandAST; + } + + Command parseSingleCommand() throws SyntaxError { + Command commandAST = null; // in case there's a syntactic error + + SourcePosition commandPos = new SourcePosition(); + start(commandPos); + + switch (currentToken.kind) { + + case Token.IDENTIFIER: + { + Identifier iAST = parseIdentifier(); + if (currentToken.kind == Token.LPAREN) { + acceptIt(); + ActualParameterSequence apsAST = parseActualParameterSequence(); + accept(Token.RPAREN); + finish(commandPos); + commandAST = new CallCommand(iAST, apsAST, commandPos); + + } else { + + Vname vAST = parseRestOfVname(iAST); + accept(Token.BECOMES); + Expression eAST = parseExpression(); + finish(commandPos); + commandAST = new AssignCommand(vAST, eAST, commandPos); + } + } + break; + + case Token.BEGIN: + acceptIt(); + commandAST = parseCommand(); + accept(Token.END); + break; + + case Token.LET: + { + acceptIt(); + Declaration dAST = parseDeclaration(); + accept(Token.IN); + Command cAST = parseSingleCommand(); + finish(commandPos); + commandAST = new LetCommand(dAST, cAST, commandPos); + } + break; + + case Token.IF: + { + acceptIt(); + Expression eAST = parseExpression(); + accept(Token.THEN); + Command c1AST = parseSingleCommand(); + accept(Token.ELSE); + Command c2AST = parseSingleCommand(); + finish(commandPos); + commandAST = new IfCommand(eAST, c1AST, c2AST, commandPos); + } + break; + + case Token.WHILE: + { + acceptIt(); + Expression eAST = parseExpression(); + accept(Token.DO); + Command cAST = parseSingleCommand(); + finish(commandPos); + commandAST = new WhileCommand(eAST, cAST, commandPos); + } + break; + + case Token.SEMICOLON: + case Token.END: + case Token.ELSE: + case Token.IN: + case Token.EOT: + + finish(commandPos); + commandAST = new EmptyCommand(commandPos); + break; + + default: + syntacticError("\"%\" cannot start a command", + currentToken.spelling); + break; + + } + + return commandAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// EXPRESSIONS +// +/////////////////////////////////////////////////////////////////////////////// + + Expression parseExpression() throws SyntaxError { + Expression expressionAST = null; // in case there's a syntactic error + + SourcePosition expressionPos = new SourcePosition(); + + start (expressionPos); + + switch (currentToken.kind) { + + case Token.LET: + { + acceptIt(); + Declaration dAST = parseDeclaration(); + accept(Token.IN); + Expression eAST = parseExpression(); + finish(expressionPos); + expressionAST = new LetExpression(dAST, eAST, expressionPos); + } + break; + + case Token.IF: + { + acceptIt(); + Expression e1AST = parseExpression(); + accept(Token.THEN); + Expression e2AST = parseExpression(); + accept(Token.ELSE); + Expression e3AST = parseExpression(); + finish(expressionPos); + expressionAST = new IfExpression(e1AST, e2AST, e3AST, expressionPos); + } + break; + + default: + expressionAST = parseSecondaryExpression(); + break; + } + return expressionAST; + } + + Expression parseSecondaryExpression() throws SyntaxError { + Expression expressionAST = null; // in case there's a syntactic error + + SourcePosition expressionPos = new SourcePosition(); + start(expressionPos); + + expressionAST = parsePrimaryExpression(); + while (currentToken.kind == Token.OPERATOR) { + Operator opAST = parseOperator(); + Expression e2AST = parsePrimaryExpression(); + expressionAST = new BinaryExpression (expressionAST, opAST, e2AST, + expressionPos); + } + return expressionAST; + } + + Expression parsePrimaryExpression() throws SyntaxError { + Expression expressionAST = null; // in case there's a syntactic error + + SourcePosition expressionPos = new SourcePosition(); + start(expressionPos); + + switch (currentToken.kind) { + + case Token.INTLITERAL: + { + IntegerLiteral ilAST = parseIntegerLiteral(); + finish(expressionPos); + expressionAST = new IntegerExpression(ilAST, expressionPos); + } + break; + + case Token.CHARLITERAL: + { + CharacterLiteral clAST= parseCharacterLiteral(); + finish(expressionPos); + expressionAST = new CharacterExpression(clAST, expressionPos); + } + break; + + case Token.LBRACKET: + { + acceptIt(); + ArrayAggregate aaAST = parseArrayAggregate(); + accept(Token.RBRACKET); + finish(expressionPos); + expressionAST = new ArrayExpression(aaAST, expressionPos); + } + break; + + case Token.LCURLY: + { + acceptIt(); + RecordAggregate raAST = parseRecordAggregate(); + accept(Token.RCURLY); + finish(expressionPos); + expressionAST = new RecordExpression(raAST, expressionPos); + } + break; + + case Token.IDENTIFIER: + { + Identifier iAST= parseIdentifier(); + if (currentToken.kind == Token.LPAREN) { + acceptIt(); + ActualParameterSequence apsAST = parseActualParameterSequence(); + accept(Token.RPAREN); + finish(expressionPos); + expressionAST = new CallExpression(iAST, apsAST, expressionPos); + + } else { + Vname vAST = parseRestOfVname(iAST); + finish(expressionPos); + expressionAST = new VnameExpression(vAST, expressionPos); + } + } + break; + + case Token.OPERATOR: + { + Operator opAST = parseOperator(); + Expression eAST = parsePrimaryExpression(); + finish(expressionPos); + expressionAST = new UnaryExpression(opAST, eAST, expressionPos); + } + break; + + case Token.LPAREN: + acceptIt(); + expressionAST = parseExpression(); + accept(Token.RPAREN); + break; + + default: + syntacticError("\"%\" cannot start an expression", + currentToken.spelling); + break; + + } + return expressionAST; + } + + RecordAggregate parseRecordAggregate() throws SyntaxError { + RecordAggregate aggregateAST = null; // in case there's a syntactic error + + SourcePosition aggregatePos = new SourcePosition(); + start(aggregatePos); + + Identifier iAST = parseIdentifier(); + accept(Token.IS); + Expression eAST = parseExpression(); + + if (currentToken.kind == Token.COMMA) { + acceptIt(); + RecordAggregate aAST = parseRecordAggregate(); + finish(aggregatePos); + aggregateAST = new MultipleRecordAggregate(iAST, eAST, aAST, aggregatePos); + } else { + finish(aggregatePos); + aggregateAST = new SingleRecordAggregate(iAST, eAST, aggregatePos); + } + return aggregateAST; + } + + ArrayAggregate parseArrayAggregate() throws SyntaxError { + ArrayAggregate aggregateAST = null; // in case there's a syntactic error + + SourcePosition aggregatePos = new SourcePosition(); + start(aggregatePos); + + Expression eAST = parseExpression(); + if (currentToken.kind == Token.COMMA) { + acceptIt(); + ArrayAggregate aAST = parseArrayAggregate(); + finish(aggregatePos); + aggregateAST = new MultipleArrayAggregate(eAST, aAST, aggregatePos); + } else { + finish(aggregatePos); + aggregateAST = new SingleArrayAggregate(eAST, aggregatePos); + } + return aggregateAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// VALUE-OR-VARIABLE NAMES +// +/////////////////////////////////////////////////////////////////////////////// + + Vname parseVname () throws SyntaxError { + Vname vnameAST = null; // in case there's a syntactic error + Identifier iAST = parseIdentifier(); + vnameAST = parseRestOfVname(iAST); + return vnameAST; + } + + Vname parseRestOfVname(Identifier identifierAST) throws SyntaxError { + SourcePosition vnamePos = new SourcePosition(); + vnamePos = identifierAST.position; + Vname vAST = new SimpleVname(identifierAST, vnamePos); + + while (currentToken.kind == Token.DOT || + currentToken.kind == Token.LBRACKET) { + + if (currentToken.kind == Token.DOT) { + acceptIt(); + Identifier iAST = parseIdentifier(); + vAST = new DotVname(vAST, iAST, vnamePos); + } else { + acceptIt(); + Expression eAST = parseExpression(); + accept(Token.RBRACKET); + finish(vnamePos); + vAST = new SubscriptVname(vAST, eAST, vnamePos); + } + } + return vAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// DECLARATIONS +// +/////////////////////////////////////////////////////////////////////////////// + + Declaration parseDeclaration() throws SyntaxError { + Declaration declarationAST = null; // in case there's a syntactic error + + SourcePosition declarationPos = new SourcePosition(); + start(declarationPos); + declarationAST = parseSingleDeclaration(); + while (currentToken.kind == Token.SEMICOLON) { + acceptIt(); + Declaration d2AST = parseSingleDeclaration(); + finish(declarationPos); + declarationAST = new SequentialDeclaration(declarationAST, d2AST, + declarationPos); + } + return declarationAST; + } + + Declaration parseSingleDeclaration() throws SyntaxError { + Declaration declarationAST = null; // in case there's a syntactic error + + SourcePosition declarationPos = new SourcePosition(); + start(declarationPos); + + switch (currentToken.kind) { + + case Token.CONST: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.IS); + Expression eAST = parseExpression(); + finish(declarationPos); + declarationAST = new ConstDeclaration(iAST, eAST, declarationPos); + } + break; + + case Token.VAR: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + finish(declarationPos); + declarationAST = new VarDeclaration(iAST, tAST, declarationPos); + } + break; + + case Token.PROC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.LPAREN); + FormalParameterSequence fpsAST = parseFormalParameterSequence(); + accept(Token.RPAREN); + accept(Token.IS); + Command cAST = parseSingleCommand(); + finish(declarationPos); + declarationAST = new ProcDeclaration(iAST, fpsAST, cAST, declarationPos); + } + break; + + case Token.FUNC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.LPAREN); + FormalParameterSequence fpsAST = parseFormalParameterSequence(); + accept(Token.RPAREN); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + accept(Token.IS); + Expression eAST = parseExpression(); + finish(declarationPos); + declarationAST = new FuncDeclaration(iAST, fpsAST, tAST, eAST, + declarationPos); + } + break; + + case Token.TYPE: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.IS); + TypeDenoter tAST = parseTypeDenoter(); + finish(declarationPos); + declarationAST = new TypeDeclaration(iAST, tAST, declarationPos); + } + break; + + default: + syntacticError("\"%\" cannot start a declaration", + currentToken.spelling); + break; + + } + return declarationAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// PARAMETERS +// +/////////////////////////////////////////////////////////////////////////////// + + FormalParameterSequence parseFormalParameterSequence() throws SyntaxError { + FormalParameterSequence formalsAST; + + SourcePosition formalsPos = new SourcePosition(); + + start(formalsPos); + if (currentToken.kind == Token.RPAREN) { + finish(formalsPos); + formalsAST = new EmptyFormalParameterSequence(formalsPos); + + } else { + formalsAST = parseProperFormalParameterSequence(); + } + return formalsAST; + } + + FormalParameterSequence parseProperFormalParameterSequence() throws SyntaxError { + FormalParameterSequence formalsAST = null; // in case there's a syntactic error; + + SourcePosition formalsPos = new SourcePosition(); + start(formalsPos); + FormalParameter fpAST = parseFormalParameter(); + if (currentToken.kind == Token.COMMA) { + acceptIt(); + FormalParameterSequence fpsAST = parseProperFormalParameterSequence(); + finish(formalsPos); + formalsAST = new MultipleFormalParameterSequence(fpAST, fpsAST, + formalsPos); + + } else { + finish(formalsPos); + formalsAST = new SingleFormalParameterSequence(fpAST, formalsPos); + } + return formalsAST; + } + + FormalParameter parseFormalParameter() throws SyntaxError { + FormalParameter formalAST = null; // in case there's a syntactic error; + + SourcePosition formalPos = new SourcePosition(); + start(formalPos); + + switch (currentToken.kind) { + + case Token.IDENTIFIER: + { + Identifier iAST = parseIdentifier(); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + finish(formalPos); + formalAST = new ConstFormalParameter(iAST, tAST, formalPos); + } + break; + + case Token.VAR: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + finish(formalPos); + formalAST = new VarFormalParameter(iAST, tAST, formalPos); + } + break; + + case Token.PROC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.LPAREN); + FormalParameterSequence fpsAST = parseFormalParameterSequence(); + accept(Token.RPAREN); + finish(formalPos); + formalAST = new ProcFormalParameter(iAST, fpsAST, formalPos); + } + break; + + case Token.FUNC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + accept(Token.LPAREN); + FormalParameterSequence fpsAST = parseFormalParameterSequence(); + accept(Token.RPAREN); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + finish(formalPos); + formalAST = new FuncFormalParameter(iAST, fpsAST, tAST, formalPos); + } + break; + + default: + syntacticError("\"%\" cannot start a formal parameter", + currentToken.spelling); + break; + + } + return formalAST; + } + + + ActualParameterSequence parseActualParameterSequence() throws SyntaxError { + ActualParameterSequence actualsAST; + + SourcePosition actualsPos = new SourcePosition(); + + start(actualsPos); + if (currentToken.kind == Token.RPAREN) { + finish(actualsPos); + actualsAST = new EmptyActualParameterSequence(actualsPos); + + } else { + actualsAST = parseProperActualParameterSequence(); + } + return actualsAST; + } + + ActualParameterSequence parseProperActualParameterSequence() throws SyntaxError { + ActualParameterSequence actualsAST = null; // in case there's a syntactic error + + SourcePosition actualsPos = new SourcePosition(); + + start(actualsPos); + ActualParameter apAST = parseActualParameter(); + if (currentToken.kind == Token.COMMA) { + acceptIt(); + ActualParameterSequence apsAST = parseProperActualParameterSequence(); + finish(actualsPos); + actualsAST = new MultipleActualParameterSequence(apAST, apsAST, + actualsPos); + } else { + finish(actualsPos); + actualsAST = new SingleActualParameterSequence(apAST, actualsPos); + } + return actualsAST; + } + + ActualParameter parseActualParameter() throws SyntaxError { + ActualParameter actualAST = null; // in case there's a syntactic error + + SourcePosition actualPos = new SourcePosition(); + + start(actualPos); + + switch (currentToken.kind) { + + case Token.IDENTIFIER: + case Token.INTLITERAL: + case Token.CHARLITERAL: + case Token.OPERATOR: + case Token.LET: + case Token.IF: + case Token.LPAREN: + case Token.LBRACKET: + case Token.LCURLY: + { + Expression eAST = parseExpression(); + finish(actualPos); + actualAST = new ConstActualParameter(eAST, actualPos); + } + break; + + case Token.VAR: + { + acceptIt(); + Vname vAST = parseVname(); + finish(actualPos); + actualAST = new VarActualParameter(vAST, actualPos); + } + break; + + case Token.PROC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + finish(actualPos); + actualAST = new ProcActualParameter(iAST, actualPos); + } + break; + + case Token.FUNC: + { + acceptIt(); + Identifier iAST = parseIdentifier(); + finish(actualPos); + actualAST = new FuncActualParameter(iAST, actualPos); + } + break; + + default: + syntacticError("\"%\" cannot start an actual parameter", + currentToken.spelling); + break; + + } + return actualAST; + } + +/////////////////////////////////////////////////////////////////////////////// +// +// TYPE-DENOTERS +// +/////////////////////////////////////////////////////////////////////////////// + + TypeDenoter parseTypeDenoter() throws SyntaxError { + TypeDenoter typeAST = null; // in case there's a syntactic error + SourcePosition typePos = new SourcePosition(); + + start(typePos); + + switch (currentToken.kind) { + + case Token.IDENTIFIER: + { + Identifier iAST = parseIdentifier(); + finish(typePos); + typeAST = new SimpleTypeDenoter(iAST, typePos); + } + break; + + case Token.ARRAY: + { + acceptIt(); + IntegerLiteral ilAST = parseIntegerLiteral(); + accept(Token.OF); + TypeDenoter tAST = parseTypeDenoter(); + finish(typePos); + typeAST = new ArrayTypeDenoter(ilAST, tAST, typePos); + } + break; + + case Token.RECORD: + { + acceptIt(); + FieldTypeDenoter fAST = parseFieldTypeDenoter(); + accept(Token.END); + finish(typePos); + typeAST = new RecordTypeDenoter(fAST, typePos); + } + break; + + default: + syntacticError("\"%\" cannot start a type denoter", + currentToken.spelling); + break; + + } + return typeAST; + } + + FieldTypeDenoter parseFieldTypeDenoter() throws SyntaxError { + FieldTypeDenoter fieldAST = null; // in case there's a syntactic error + + SourcePosition fieldPos = new SourcePosition(); + + start(fieldPos); + Identifier iAST = parseIdentifier(); + accept(Token.COLON); + TypeDenoter tAST = parseTypeDenoter(); + if (currentToken.kind == Token.COMMA) { + acceptIt(); + FieldTypeDenoter fAST = parseFieldTypeDenoter(); + finish(fieldPos); + fieldAST = new MultipleFieldTypeDenoter(iAST, tAST, fAST, fieldPos); + } else { + finish(fieldPos); + fieldAST = new SingleFieldTypeDenoter(iAST, tAST, fieldPos); + } + return fieldAST; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Scanner.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Scanner.java new file mode 100644 index 00000000..4718caae --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Scanner.java @@ -0,0 +1,215 @@ +/* + * @(#)Scanner.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + + +public final class Scanner { + + private SourceFile sourceFile; + private boolean debug; + + private char currentChar; + private StringBuffer currentSpelling; + private boolean currentlyScanningToken; + + private boolean isLetter(char c) { + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + } + + private boolean isDigit(char c) { + return (c >= '0' && c <= '9'); + } + +// isOperator returns true iff the given character is an operator character. + + private boolean isOperator(char c) { + return (c == '+' || c == '-' || c == '*' || c == '/' || + c == '=' || c == '<' || c == '>' || c == '\\' || + c == '&' || c == '@' || c == '%' || c == '^' || + c == '?'); + } + + +/////////////////////////////////////////////////////////////////////////////// + + public Scanner(SourceFile source) { + sourceFile = source; + currentChar = sourceFile.getSource(); + debug = false; + } + + public void enableDebugging() { + debug = true; + } + + // takeIt appends the current character to the current token, and gets + // the next character from the source program. + + private void takeIt() { + if (currentlyScanningToken) + currentSpelling.append(currentChar); + currentChar = sourceFile.getSource(); + } + + // scanSeparator skips a single separator. + + private void scanSeparator() { + switch (currentChar) { + case '!': + { + takeIt(); + while ((currentChar != SourceFile.EOL) && (currentChar != SourceFile.EOT)) + takeIt(); + if (currentChar == SourceFile.EOL) + takeIt(); + } + break; + + case ' ': case '\n': case '\r': case '\t': + takeIt(); + break; + } + } + + private int scanToken() { + + switch (currentChar) { + + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + takeIt(); + while (isLetter(currentChar) || isDigit(currentChar)) + takeIt(); + return Token.IDENTIFIER; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + takeIt(); + while (isDigit(currentChar)) + takeIt(); + return Token.INTLITERAL; + + case '+': case '-': case '*': case '/': case '=': + case '<': case '>': case '\\': case '&': case '@': + case '%': case '^': case '?': + takeIt(); + while (isOperator(currentChar)) + takeIt(); + return Token.OPERATOR; + + case '\'': + takeIt(); + takeIt(); // the quoted character + if (currentChar == '\'') { + takeIt(); + return Token.CHARLITERAL; + } else + return Token.ERROR; + + case '.': + takeIt(); + return Token.DOT; + + case ':': + takeIt(); + if (currentChar == '=') { + takeIt(); + return Token.BECOMES; + } else + return Token.COLON; + + case ';': + takeIt(); + return Token.SEMICOLON; + + case ',': + takeIt(); + return Token.COMMA; + + case '~': + takeIt(); + return Token.IS; + + case '(': + takeIt(); + return Token.LPAREN; + + case ')': + takeIt(); + return Token.RPAREN; + + case '[': + takeIt(); + return Token.LBRACKET; + + case ']': + takeIt(); + return Token.RBRACKET; + + case '{': + takeIt(); + return Token.LCURLY; + + case '}': + takeIt(); + return Token.RCURLY; + + case SourceFile.EOT: + return Token.EOT; + + default: + takeIt(); + return Token.ERROR; + } + } + + public Token scan () { + Token tok; + SourcePosition pos; + int kind; + + currentlyScanningToken = false; + while (currentChar == '!' + || currentChar == ' ' + || currentChar == '\n' + || currentChar == '\r' + || currentChar == '\t') + scanSeparator(); + + currentlyScanningToken = true; + currentSpelling = new StringBuffer(""); + pos = new SourcePosition(); + pos.start = sourceFile.getCurrentLine(); + + kind = scanToken(); + + pos.finish = sourceFile.getCurrentLine(); + tok = new Token(kind, currentSpelling.toString(), pos); + if (debug) + System.out.println(tok); + return tok; + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourceFile.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourceFile.java new file mode 100644 index 00000000..469f4f0c --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourceFile.java @@ -0,0 +1,58 @@ +/* + * @(#)SourceFile.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + +public class SourceFile { + + public static final char EOL = '\n'; + public static final char EOT = '\u0000'; + + java.io.File sourceFile; + java.io.FileInputStream source; + int currentLine; + + public SourceFile(String filename) { + try { + sourceFile = new java.io.File(filename); + source = new java.io.FileInputStream(sourceFile); + currentLine = 1; + } + catch (java.io.IOException s) { + sourceFile = null; + source = null; + currentLine = 0; + } + } + + char getSource() { + try { + int c = source.read(); + + if (c == -1) { + c = EOT; + } else if (c == EOL) { + currentLine++; + } + return (char) c; + } + catch (java.io.IOException s) { + return EOT; + } + } + + public int getCurrentLine() { + return currentLine; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourcePosition.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourcePosition.java new file mode 100644 index 00000000..46f0b996 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SourcePosition.java @@ -0,0 +1,34 @@ +/* + * @(#)SourcePosition.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + +public class SourcePosition { + + public int start, finish; + + public SourcePosition () { + start = 0; + finish = 0; + } + + public SourcePosition (int s, int f) { + start = s; + finish = f; + } + + public String toString() { + return "(" + start + ", " + finish + ")"; + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SyntaxError.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SyntaxError.java new file mode 100644 index 00000000..33178c9b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/SyntaxError.java @@ -0,0 +1,27 @@ +/* + * @(#)SyntaxError.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + +class SyntaxError extends Exception { + + SyntaxError() { + super(); + }; + + SyntaxError (String s) { + super(s); + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Token.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Token.java new file mode 100644 index 00000000..55c40e71 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/SyntacticAnalyzer/Token.java @@ -0,0 +1,149 @@ +/* + * @(#)Token.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.SyntacticAnalyzer; + + +final class Token extends Object { + + protected int kind; + protected String spelling; + protected SourcePosition position; + + public Token(int kind, String spelling, SourcePosition position) { + + if (kind == Token.IDENTIFIER) { + int currentKind = firstReservedWord; + boolean searching = true; + + while (searching) { + int comparison = tokenTable[currentKind].compareTo(spelling); + if (comparison == 0) { + this.kind = currentKind; + searching = false; + } else if (comparison > 0 || currentKind == lastReservedWord) { + this.kind = Token.IDENTIFIER; + searching = false; + } else { + currentKind ++; + } + } + } else + this.kind = kind; + + this.spelling = spelling; + this.position = position; + + } + + public static String spell (int kind) { + return tokenTable[kind]; + } + + public String toString() { + return "Kind=" + kind + ", spelling=" + spelling + + ", position=" + position; + } + + // Token classes... + + public static final int + + // literals, identifiers, operators... + INTLITERAL = 0, + CHARLITERAL = 1, + IDENTIFIER = 2, + OPERATOR = 3, + + // reserved words - must be in alphabetical order... + ARRAY = 4, + BEGIN = 5, + CONST = 6, + DO = 7, + ELSE = 8, + END = 9, + FUNC = 10, + IF = 11, + IN = 12, + LET = 13, + OF = 14, + PROC = 15, + RECORD = 16, + THEN = 17, + TYPE = 18, + VAR = 19, + WHILE = 20, + + // punctuation... + DOT = 21, + COLON = 22, + SEMICOLON = 23, + COMMA = 24, + BECOMES = 25, + IS = 26, + + // brackets... + LPAREN = 27, + RPAREN = 28, + LBRACKET = 29, + RBRACKET = 30, + LCURLY = 31, + RCURLY = 32, + + // special tokens... + EOT = 33, + ERROR = 34; + + private static String[] tokenTable = new String[] { + "", + "", + "", + "", + "array", + "begin", + "const", + "do", + "else", + "end", + "func", + "if", + "in", + "let", + "of", + "proc", + "record", + "then", + "type", + "var", + "while", + ".", + ":", + ";", + ",", + ":=", + "~", + "(", + ")", + "[", + "]", + "{", + "}", + "", + "" + }; + + private final static int firstReservedWord = Token.ARRAY, + lastReservedWord = Token.WHILE; + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Drawer.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Drawer.java new file mode 100644 index 00000000..2ce261e7 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Drawer.java @@ -0,0 +1,61 @@ +/* + * @(#)Drawer.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Point; + +import Triangle.AbstractSyntaxTrees.Program; + +public class Drawer { + + private DrawerFrame frame; + private DrawerPanel panel; + + private Program theAST; + private DrawingTree theDrawing; + + // Draw the AST representing a complete program. + + public void draw(Program ast) { + theAST = ast; + panel = new DrawerPanel(this); + frame = new DrawerFrame(panel); + + Font font = new Font("SansSerif", Font.PLAIN, 12); + frame.setFont(font); + + FontMetrics fontMetrics = frame.getFontMetrics(font); + + LayoutVisitor layout = new LayoutVisitor(fontMetrics); + theDrawing = (DrawingTree) theAST.visit(layout, null); + theDrawing.position(new Point(2048, 10)); + + frame.show(); + } + + public void paintAST (Graphics g) { + g.setColor(panel.getBackground()); + Dimension d = panel.getSize(); + g.fillRect(0, 0, d.width, d.height); + + if (theDrawing != null) { + theDrawing.paint(g); + } + } +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerFrame.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerFrame.java new file mode 100644 index 00000000..3fc8d08b --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerFrame.java @@ -0,0 +1,50 @@ +/* + * @(#)DrawerFrame.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Toolkit; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JScrollPane; + +class DrawerFrame extends JFrame { + public DrawerFrame (JPanel panel) { + setSize(300, 200); + Toolkit tk = Toolkit.getDefaultToolkit(); + Dimension d = tk.getScreenSize(); + int screenHeight = d.height; + int screenWidth = d.width; + setTitle("Triangle Compiler Abstract Syntax Tree"); + setSize(screenWidth / 2, screenHeight / 2); + setLocation(screenWidth / 4, screenHeight / 4); + // Image img = tk.getImage("icon.gif"); + // setIconImage(img); + + addWindowListener( + new WindowAdapter() { + public void windowClosing (WindowEvent e) { + System.exit(0); + } + } + ); + Container contentPane = getContentPane(); + contentPane.add(new JScrollPane(panel)); + } +} \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerPanel.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerPanel.java new file mode 100644 index 00000000..cdc3a317 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawerPanel.java @@ -0,0 +1,34 @@ +/* + * @(#)DrawerPanel.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +import java.awt.Dimension; +import java.awt.Graphics; + +import javax.swing.JPanel; + +class DrawerPanel extends JPanel { + private Drawer drawer; + + public DrawerPanel (Drawer drawer) { + setPreferredSize(new Dimension(4096, 4096)); + this.drawer = drawer; + } + + public void paintComponent (Graphics g) { + super.paintComponent(g); + drawer.paintAST(g); + } +} \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawingTree.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawingTree.java new file mode 100644 index 00000000..801b8f10 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/DrawingTree.java @@ -0,0 +1,88 @@ +/* + * @(#)DrawingTree.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Point; + +public class DrawingTree { + + String caption; + int width, height; + Point pos, offset; + Triangle.TreeDrawer.Polygon contour; + DrawingTree parent; + DrawingTree[] children; + + public DrawingTree (String caption, int width, int height) { + this.caption = caption; + this.width = width; + this.height = height; + this.parent = null; + this.children = null; + this.pos = new Point(0, 0); + this.offset = new Point(0, 0); + this.contour = new Triangle.TreeDrawer.Polygon(); + } + + public void setChildren(DrawingTree[] children) { + this.children = children; + for (int i = 0; i < children.length; i++) + children[i].parent = this; + } + + private final int FIXED_FONT_HEIGHT = 10; + private final int FIXED_FONT_ASCENT = 3; + private final Color nodeColor = new Color(250, 220, 100); + + public void paint (Graphics graphics) { + graphics.setColor(nodeColor); + graphics.fillRect(pos.x, pos.y, width, height); + graphics.setColor(Color.black); + graphics.drawRect(pos.x, pos.y, width - 1, height - 1); + graphics.drawString(caption, pos.x + 2, + pos.y + (height + FIXED_FONT_HEIGHT) / 2); + + if (children != null) { + for (int i = 0; i < children.length; i++) { + children[i].paint(graphics); + } + } + + if (parent != null) { + graphics.drawLine(pos.x + width / 2, pos.y, + parent.pos.x + parent.width / 2, + parent.pos.y + parent.height); + } + } + + public void position (Point pos) { + + this.pos.x = pos.x + this.offset.x; + this.pos.y = pos.y + this.offset.y; + + Point temp = new Point(this.pos.x, this.pos.y); + + if (children != null) { + for (int i = 0; i < children.length; i++) { + children[i].position(temp); + temp.x += children[i].offset.x; + temp.y = this.pos.y + children[0].offset.y; + } + } + } + +} \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/LayoutVisitor.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/LayoutVisitor.java new file mode 100644 index 00000000..ed25e206 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/LayoutVisitor.java @@ -0,0 +1,546 @@ +/* + * @(#)LayoutVisitor.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +import java.awt.FontMetrics; + +import Triangle.AbstractSyntaxTrees.AST; +import Triangle.AbstractSyntaxTrees.AnyTypeDenoter; +import Triangle.AbstractSyntaxTrees.ArrayExpression; +import Triangle.AbstractSyntaxTrees.ArrayTypeDenoter; +import Triangle.AbstractSyntaxTrees.AssignCommand; +import Triangle.AbstractSyntaxTrees.BinaryExpression; +import Triangle.AbstractSyntaxTrees.BinaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.BoolTypeDenoter; +import Triangle.AbstractSyntaxTrees.CallCommand; +import Triangle.AbstractSyntaxTrees.CallExpression; +import Triangle.AbstractSyntaxTrees.CharTypeDenoter; +import Triangle.AbstractSyntaxTrees.CharacterExpression; +import Triangle.AbstractSyntaxTrees.CharacterLiteral; +import Triangle.AbstractSyntaxTrees.ConstActualParameter; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.ConstFormalParameter; +import Triangle.AbstractSyntaxTrees.DotVname; +import Triangle.AbstractSyntaxTrees.EmptyActualParameterSequence; +import Triangle.AbstractSyntaxTrees.EmptyCommand; +import Triangle.AbstractSyntaxTrees.EmptyExpression; +import Triangle.AbstractSyntaxTrees.EmptyFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.ErrorTypeDenoter; +import Triangle.AbstractSyntaxTrees.FuncActualParameter; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.FuncFormalParameter; +import Triangle.AbstractSyntaxTrees.Identifier; +import Triangle.AbstractSyntaxTrees.IfCommand; +import Triangle.AbstractSyntaxTrees.IfExpression; +import Triangle.AbstractSyntaxTrees.IntTypeDenoter; +import Triangle.AbstractSyntaxTrees.IntegerExpression; +import Triangle.AbstractSyntaxTrees.IntegerLiteral; +import Triangle.AbstractSyntaxTrees.LetCommand; +import Triangle.AbstractSyntaxTrees.LetExpression; +import Triangle.AbstractSyntaxTrees.MultipleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleArrayAggregate; +import Triangle.AbstractSyntaxTrees.MultipleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.MultipleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleRecordAggregate; +import Triangle.AbstractSyntaxTrees.Operator; +import Triangle.AbstractSyntaxTrees.ProcActualParameter; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.ProcFormalParameter; +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.AbstractSyntaxTrees.RecordExpression; +import Triangle.AbstractSyntaxTrees.RecordTypeDenoter; +import Triangle.AbstractSyntaxTrees.SequentialCommand; +import Triangle.AbstractSyntaxTrees.SequentialDeclaration; +import Triangle.AbstractSyntaxTrees.SimpleTypeDenoter; +import Triangle.AbstractSyntaxTrees.SimpleVname; +import Triangle.AbstractSyntaxTrees.SingleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleArrayAggregate; +import Triangle.AbstractSyntaxTrees.SingleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.SingleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleRecordAggregate; +import Triangle.AbstractSyntaxTrees.SubscriptVname; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.UnaryExpression; +import Triangle.AbstractSyntaxTrees.UnaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.VarActualParameter; +import Triangle.AbstractSyntaxTrees.VarDeclaration; +import Triangle.AbstractSyntaxTrees.VarFormalParameter; +import Triangle.AbstractSyntaxTrees.Visitor; +import Triangle.AbstractSyntaxTrees.VnameExpression; +import Triangle.AbstractSyntaxTrees.WhileCommand; + +public class LayoutVisitor implements Visitor { + + private final int BORDER = 5; + private final int PARENT_SEP = 30; + + private FontMetrics fontMetrics; + + public LayoutVisitor (FontMetrics fontMetrics) { + this.fontMetrics = fontMetrics; + } + + // Commands + public Object visitAssignCommand(AssignCommand ast, Object obj) { + return layoutBinary("AssignCom.", ast.V, ast.E); + } + + public Object visitCallCommand(CallCommand ast, Object obj) { + return layoutBinary("CallCom.", ast.I, ast.APS); + } + + public Object visitEmptyCommand(EmptyCommand ast, Object obj) { + return layoutNullary("EmptyCom."); + } + + public Object visitIfCommand(IfCommand ast, Object obj) { + return layoutTernary("IfCom.", ast.E, ast.C1, ast.C2); + } + + public Object visitLetCommand(LetCommand ast, Object obj) { + return layoutBinary("LetCom.", ast.D, ast.C); + } + + public Object visitSequentialCommand(SequentialCommand ast, Object obj) { + return layoutBinary("Seq.Com.", ast.C1, ast.C2); + } + + public Object visitWhileCommand(WhileCommand ast, Object obj) { + return layoutBinary("WhileCom.", ast.E, ast.C); + } + + + // Expressions + public Object visitArrayExpression(ArrayExpression ast, Object obj) { + return layoutUnary("ArrayExpr.", ast.AA); + } + + public Object visitBinaryExpression(BinaryExpression ast, Object obj) { + return layoutTernary("Bin.Expr.", ast.E1, ast.O, ast.E2); + } + + public Object visitCallExpression(CallExpression ast, Object obj) { + return layoutBinary("CallExpr.", ast.I, ast.APS); + } + + public Object visitCharacterExpression(CharacterExpression ast, Object obj) { + return layoutUnary("Char.Expr.", ast.CL); + } + + public Object visitEmptyExpression(EmptyExpression ast, Object obj) { + return layoutNullary("EmptyExpr."); + } + + public Object visitIfExpression(IfExpression ast, Object obj) { + return layoutTernary("IfExpr.", ast.E1, ast.E2, ast.E3); + } + + public Object visitIntegerExpression(IntegerExpression ast, Object obj) { + return layoutUnary("Int.Expr.", ast.IL); + } + + public Object visitLetExpression(LetExpression ast, Object obj) { + return layoutBinary("LetExpr.", ast.D, ast.E); + } + + public Object visitRecordExpression(RecordExpression ast, Object obj) { + return layoutUnary("Rec.Expr.", ast.RA); + } + + public Object visitUnaryExpression(UnaryExpression ast, Object obj) { + return layoutBinary("UnaryExpr.", ast.O, ast.E); + } + + public Object visitVnameExpression(VnameExpression ast, Object obj) { + return layoutUnary("VnameExpr.", ast.V); + } + + + // Declarations + public Object visitBinaryOperatorDeclaration(BinaryOperatorDeclaration ast, Object obj) { + return layoutQuaternary("Bin.Op.Decl.", ast.O, ast.ARG1, ast.ARG2, ast.RES); + } + + public Object visitConstDeclaration(ConstDeclaration ast, Object obj) { + return layoutBinary("ConstDecl.", ast.I, ast.E); + } + + public Object visitFuncDeclaration(FuncDeclaration ast, Object obj) { + return layoutQuaternary("FuncDecl.", ast.I, ast.FPS, ast.T, ast.E); + } + + public Object visitProcDeclaration(ProcDeclaration ast, Object obj) { + return layoutTernary("ProcDecl.", ast.I, ast.FPS, ast.C); + } + + public Object visitSequentialDeclaration(SequentialDeclaration ast, Object obj) { + return layoutBinary("Seq.Decl.", ast.D1, ast.D2); + } + + public Object visitTypeDeclaration(TypeDeclaration ast, Object obj) { + return layoutBinary("TypeDecl.", ast.I, ast.T); + } + + public Object visitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Object obj) { + return layoutTernary("UnaryOp.Decl.", ast.O, ast.ARG, ast.RES); + } + + public Object visitVarDeclaration(VarDeclaration ast, Object obj) { + return layoutBinary("VarDecl.", ast.I, ast.T); + } + + + // Array Aggregates + public Object visitMultipleArrayAggregate(MultipleArrayAggregate ast, Object obj) { + return layoutBinary("Mult.ArrayAgg.", ast.E, ast.AA); + } + + public Object visitSingleArrayAggregate(SingleArrayAggregate ast, Object obj) { + return layoutUnary("Sing.ArrayAgg.", ast.E); + } + + + // Record Aggregates + public Object visitMultipleRecordAggregate(MultipleRecordAggregate ast, Object obj) { + return layoutTernary("Mult.Rec.Agg.", ast.I, ast.E, ast.RA); + } + + public Object visitSingleRecordAggregate(SingleRecordAggregate ast, Object obj) { + return layoutBinary("Sing.Rec.Agg.", ast.I, ast.E); + } + + + // Formal Parameters + public Object visitConstFormalParameter(ConstFormalParameter ast, Object obj) { + return layoutBinary("ConstF.P.", ast.I, ast.T); + } + + public Object visitFuncFormalParameter(FuncFormalParameter ast, Object obj) { + return layoutTernary("FuncF.P.", ast.I, ast.FPS, ast.T); + } + + public Object visitProcFormalParameter(ProcFormalParameter ast, Object obj) { + return layoutBinary("ProcF.P.", ast.I, ast.FPS); + } + + public Object visitVarFormalParameter(VarFormalParameter ast, Object obj) { + return layoutBinary("VarF.P.", ast.I, ast.T); + } + + + public Object visitEmptyFormalParameterSequence(EmptyFormalParameterSequence ast, Object obj) { + return layoutNullary("EmptyF.P.S."); + } + + public Object visitMultipleFormalParameterSequence(MultipleFormalParameterSequence ast, Object obj) { + return layoutBinary("Mult.F.P.S.", ast.FP, ast.FPS); + } + + public Object visitSingleFormalParameterSequence(SingleFormalParameterSequence ast, Object obj) { + return layoutUnary("Sing.F.P.S.", ast.FP); + } + + + // Actual Parameters + public Object visitConstActualParameter(ConstActualParameter ast, Object obj) { + return layoutUnary("ConstA.P.", ast.E); + } + + public Object visitFuncActualParameter(FuncActualParameter ast, Object obj) { + return layoutUnary("FuncA.P.", ast.I); + } + + public Object visitProcActualParameter(ProcActualParameter ast, Object obj) { + return layoutUnary("ProcA.P.", ast.I); + } + + public Object visitVarActualParameter(VarActualParameter ast, Object obj) { + return layoutUnary("VarA.P.", ast.V); + } + + + public Object visitEmptyActualParameterSequence(EmptyActualParameterSequence ast, Object obj) { + return layoutNullary("EmptyA.P.S."); + } + + public Object visitMultipleActualParameterSequence(MultipleActualParameterSequence ast, Object obj) { + return layoutBinary("Mult.A.P.S.", ast.AP, ast.APS); + } + + public Object visitSingleActualParameterSequence(SingleActualParameterSequence ast, Object obj) { + return layoutUnary("Sing.A.P.S.", ast.AP); + } + + + // Type Denoters + public Object visitAnyTypeDenoter(AnyTypeDenoter ast, Object obj) { + return layoutNullary("any"); + } + + public Object visitArrayTypeDenoter(ArrayTypeDenoter ast, Object obj) { + return layoutBinary("ArrayTypeD.", ast.IL, ast.T); + } + + public Object visitBoolTypeDenoter(BoolTypeDenoter ast, Object obj) { + return layoutNullary("bool"); + } + + public Object visitCharTypeDenoter(CharTypeDenoter ast, Object obj) { + return layoutNullary("char"); + } + + public Object visitErrorTypeDenoter(ErrorTypeDenoter ast, Object obj) { + return layoutNullary("error"); + } + + public Object visitSimpleTypeDenoter(SimpleTypeDenoter ast, Object obj) { + return layoutUnary("Sim.TypeD.", ast.I); + } + + public Object visitIntTypeDenoter(IntTypeDenoter ast, Object obj) { + return layoutNullary("int"); + } + + public Object visitRecordTypeDenoter(RecordTypeDenoter ast, Object obj) { + return layoutUnary("Rec.TypeD.", ast.FT); + } + + + public Object visitMultipleFieldTypeDenoter(MultipleFieldTypeDenoter ast, Object obj) { + return layoutTernary("Mult.F.TypeD.", ast.I, ast.T, ast.FT); + } + + public Object visitSingleFieldTypeDenoter(SingleFieldTypeDenoter ast, Object obj) { + return layoutBinary("Sing.F.TypeD.", ast.I, ast.T); + } + + + // Literals, Identifiers and Operators + public Object visitCharacterLiteral(CharacterLiteral ast, Object obj) { + return layoutNullary(ast.spelling); + } + + public Object visitIdentifier(Identifier ast, Object obj) { + return layoutNullary(ast.spelling); + } + + public Object visitIntegerLiteral(IntegerLiteral ast, Object obj) { + return layoutNullary(ast.spelling); + } + + public Object visitOperator(Operator ast, Object obj) { + return layoutNullary(ast.spelling); + } + + + // Value-or-variable names + public Object visitDotVname(DotVname ast, Object obj) { + return layoutBinary("DotVname", ast.I, ast.V); + } + + public Object visitSimpleVname(SimpleVname ast, Object obj) { + return layoutUnary("Sim.Vname", ast.I); + } + + public Object visitSubscriptVname(SubscriptVname ast, Object obj) { + return layoutBinary("Sub.Vname", + ast.V, ast.E); + } + + + // Programs + public Object visitProgram(Program ast, Object obj) { + return layoutUnary("Program", ast.C); + } + + private DrawingTree layoutCaption (String name) { + int w = fontMetrics.stringWidth(name) + 4; + int h = fontMetrics.getHeight() + 4; + return new DrawingTree(name, w, h); + } + + private DrawingTree layoutNullary (String name) { + DrawingTree dt = layoutCaption(name); + dt.contour.upper_tail = new Polyline(0, dt.height + 2 * BORDER, null); + dt.contour.upper_head = dt.contour.upper_tail; + dt.contour.lower_tail = new Polyline(-dt.width - 2 * BORDER, 0, null); + dt.contour.lower_head = new Polyline(0, dt.height + 2 * BORDER, dt.contour.lower_tail); + return dt; + } + + private DrawingTree layoutUnary (String name, AST child1) { + DrawingTree dt = layoutCaption(name); + DrawingTree d1 = (DrawingTree) child1.visit(this, null); + dt.setChildren(new DrawingTree[] {d1}); + attachParent(dt, join(dt)); + return dt; + } + + private DrawingTree layoutBinary (String name, AST child1, AST child2) { + DrawingTree dt = layoutCaption(name); + DrawingTree d1 = (DrawingTree) child1.visit(this, null); + DrawingTree d2 = (DrawingTree) child2.visit(this, null); + dt.setChildren(new DrawingTree[] {d1, d2}); + attachParent(dt, join(dt)); + return dt; + } + + private DrawingTree layoutTernary (String name, AST child1, AST child2, + AST child3) { + DrawingTree dt = layoutCaption(name); + DrawingTree d1 = (DrawingTree) child1.visit(this, null); + DrawingTree d2 = (DrawingTree) child2.visit(this, null); + DrawingTree d3 = (DrawingTree) child3.visit(this, null); + dt.setChildren(new DrawingTree[] {d1, d2, d3}); + attachParent(dt, join(dt)); + return dt; + } + + private DrawingTree layoutQuaternary (String name, AST child1, AST child2, + AST child3, AST child4) { + DrawingTree dt = layoutCaption(name); + DrawingTree d1 = (DrawingTree) child1.visit(this, null); + DrawingTree d2 = (DrawingTree) child2.visit(this, null); + DrawingTree d3 = (DrawingTree) child3.visit(this, null); + DrawingTree d4 = (DrawingTree) child4.visit(this, null); + dt.setChildren(new DrawingTree[] {d1, d2, d3, d4}); + attachParent(dt, join(dt)); + return dt; + } + + private void attachParent(DrawingTree dt, int w) { + int y = PARENT_SEP; + int x2 = (w - dt.width) / 2 - BORDER; + int x1 = x2 + dt.width + 2 * BORDER - w; + + dt.children[0].offset.y = y + dt.height; + dt.children[0].offset.x = x1; + dt.contour.upper_head = new Polyline(0, dt.height, + new Polyline(x1, y, dt.contour.upper_head)); + dt.contour.lower_head = new Polyline(0, dt.height, + new Polyline(x2, y, dt.contour.lower_head)); + } + + private int join (DrawingTree dt) { + int w, sum; + + dt.contour = dt.children[0].contour; + sum = w = dt.children[0].width + 2 * BORDER; + + for (int i = 1; i < dt.children.length; i++) { + int d = merge(dt.contour, dt.children[i].contour); + dt.children[i].offset.x = d + w; + dt.children[i].offset.y = 0; + w = dt.children[i].width + 2 * BORDER; + sum += d + w; + } + return sum; + } + + private int merge(Polygon c1, Polygon c2) { + int x, y, total, d; + Polyline lower, upper, b; + + x = y = total = 0; + upper = c1.lower_head; + lower = c2.upper_head; + + while (lower != null && upper != null) { + d = offset(x, y, lower.dx, lower.dy, upper.dx, upper.dy); + x += d; + total += d; + + if (y + lower.dy <= upper.dy) { + x += lower.dx; + y += lower.dy; + lower = lower.link; + } else { + x -= upper.dx; + y -= upper.dy; + upper = upper.link; + } + } + + if (lower != null) { + b = bridge(c1.upper_tail, 0, 0, lower, x, y); + c1.upper_tail = (b.link != null) ? c2.upper_tail : b; + c1.lower_tail = c2.lower_tail; + } else { + b = bridge(c2.lower_tail, x, y, upper, 0, 0); + if (b.link == null) { + c1.lower_tail = b; + } + } + + c1.lower_head = c2.lower_head; + + return total; + } + + private int offset (int p1, int p2, int a1, int a2, int b1, int b2) { + int d, s, t; + + if (b2 <= p2 || p2 + a2 <= 0) { + return 0; + } + + t = b2 * a1 - a2 * b1; + if (t > 0) { + if (p2 < 0) { + s = p2 * a1; + d = s / a2 - p1; + } else if (p2 > 0) { + s = p2 * b1; + d = s / b2 - p1; + } else { + d = -p1; + } + } else if (b2 < p2 + a2) { + s = (b2 - p2) * a1; + d = b1 - (p1 + s / a2); + } else if (b2 > p2 + a2) { + s = (a2 + p2) * b1; + d = s / b2 - (p1 + a1); + } else { + d = b1 - (p1 + a1); + } + + if (d > 0) { + return d; + } else { + return 0; + } + } + + private Polyline bridge (Polyline line1, int x1, int y1, + Polyline line2, int x2, int y2) { + int dy, dx, s; + Polyline r; + + dy = y2 + line2.dy - y1; + if (line2.dy == 0) { + dx = line2.dx; + } else { + s = dy * line2.dx; + dx = s / line2.dy; + } + + r = new Polyline(dx, dy, line2.link); + line1.link = new Polyline(x2 + line2.dx - dx - x1, 0, r); + + return r; + } + +} \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polygon.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polygon.java new file mode 100644 index 00000000..37f93f4f --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polygon.java @@ -0,0 +1,20 @@ +/* + * @(#)Polygon.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +class Polygon { + Polyline lower_head, lower_tail; + Polyline upper_head, upper_tail; +} \ No newline at end of file diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polyline.java b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polyline.java new file mode 100644 index 00000000..67af32a4 --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/Triangle/TreeDrawer/Polyline.java @@ -0,0 +1,27 @@ +/* + * @(#)Polyline.java 2.1 2003/10/07 + * + * Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown + * Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland + * and School of Computer and Math Sciences, The Robert Gordon University, + * St. Andrew Street, Aberdeen AB25 1HG, Scotland. + * All rights reserved. + * + * This software is provided free for educational use only. It may + * not be used for commercial purposes without the prior written permission + * of the authors. + */ + +package Triangle.TreeDrawer; + +class Polyline { + int dx, dy; + Polyline link; + + Polyline(int dx, int dy, Polyline link) { + this.dx = dx; + this.dy = dy; + this.link = link; + } +}; + diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/solution/ConstantFolding.java b/ws2011/Compiler I/Triangle-2.1-esa3/solution/ConstantFolding.java new file mode 100644 index 00000000..7d561fef --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/solution/ConstantFolding.java @@ -0,0 +1,445 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package solution; +import Triangle.AbstractSyntaxTrees.AnyTypeDenoter; +import Triangle.AbstractSyntaxTrees.ArrayExpression; +import Triangle.AbstractSyntaxTrees.ArrayTypeDenoter; +import Triangle.AbstractSyntaxTrees.AssignCommand; +import Triangle.AbstractSyntaxTrees.BinaryExpression; +import Triangle.AbstractSyntaxTrees.BinaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.BoolTypeDenoter; +import Triangle.AbstractSyntaxTrees.CallCommand; +import Triangle.AbstractSyntaxTrees.CallExpression; +import Triangle.AbstractSyntaxTrees.CharTypeDenoter; +import Triangle.AbstractSyntaxTrees.CharacterExpression; +import Triangle.AbstractSyntaxTrees.CharacterLiteral; +import Triangle.AbstractSyntaxTrees.ConstActualParameter; +import Triangle.AbstractSyntaxTrees.ConstDeclaration; +import Triangle.AbstractSyntaxTrees.ConstFormalParameter; +import Triangle.AbstractSyntaxTrees.DotVname; +import Triangle.AbstractSyntaxTrees.EmptyActualParameterSequence; +import Triangle.AbstractSyntaxTrees.EmptyCommand; +import Triangle.AbstractSyntaxTrees.EmptyExpression; +import Triangle.AbstractSyntaxTrees.EmptyFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.ErrorTypeDenoter; +import Triangle.AbstractSyntaxTrees.Expression; +import Triangle.AbstractSyntaxTrees.FuncActualParameter; +import Triangle.AbstractSyntaxTrees.FuncDeclaration; +import Triangle.AbstractSyntaxTrees.FuncFormalParameter; +import Triangle.AbstractSyntaxTrees.Identifier; +import Triangle.AbstractSyntaxTrees.IfCommand; +import Triangle.AbstractSyntaxTrees.IfExpression; +import Triangle.AbstractSyntaxTrees.IntTypeDenoter; +import Triangle.AbstractSyntaxTrees.IntegerExpression; +import Triangle.AbstractSyntaxTrees.IntegerLiteral; +import Triangle.AbstractSyntaxTrees.LetCommand; +import Triangle.AbstractSyntaxTrees.LetExpression; +import Triangle.AbstractSyntaxTrees.MultipleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleArrayAggregate; +import Triangle.AbstractSyntaxTrees.MultipleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.MultipleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.MultipleRecordAggregate; +import Triangle.AbstractSyntaxTrees.Operator; +import Triangle.AbstractSyntaxTrees.ProcActualParameter; +import Triangle.AbstractSyntaxTrees.ProcDeclaration; +import Triangle.AbstractSyntaxTrees.ProcFormalParameter; +import Triangle.AbstractSyntaxTrees.Program; +import Triangle.AbstractSyntaxTrees.RecordExpression; +import Triangle.AbstractSyntaxTrees.RecordTypeDenoter; +import Triangle.AbstractSyntaxTrees.SequentialCommand; +import Triangle.AbstractSyntaxTrees.SequentialDeclaration; +import Triangle.AbstractSyntaxTrees.SimpleTypeDenoter; +import Triangle.AbstractSyntaxTrees.SimpleVname; +import Triangle.AbstractSyntaxTrees.SingleActualParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleArrayAggregate; +import Triangle.AbstractSyntaxTrees.SingleFieldTypeDenoter; +import Triangle.AbstractSyntaxTrees.SingleFormalParameterSequence; +import Triangle.AbstractSyntaxTrees.SingleRecordAggregate; +import Triangle.AbstractSyntaxTrees.SubscriptVname; +import Triangle.AbstractSyntaxTrees.TypeDeclaration; +import Triangle.AbstractSyntaxTrees.UnaryExpression; +import Triangle.AbstractSyntaxTrees.UnaryOperatorDeclaration; +import Triangle.AbstractSyntaxTrees.VarActualParameter; +import Triangle.AbstractSyntaxTrees.VarDeclaration; +import Triangle.AbstractSyntaxTrees.VarFormalParameter; +import Triangle.AbstractSyntaxTrees.Visitor; +import Triangle.AbstractSyntaxTrees.VnameExpression; +import Triangle.AbstractSyntaxTrees.WhileCommand; +import Triangle.StdEnvironment; +import Triangle.SyntacticAnalyzer.SourcePosition; + +/** + * + * @author Michael + */ +public class ConstantFolding implements Visitor{ + + + + /** + * Returns true if the given expression represents constant value. + * This value can be a boolean or integer. + * @param e the expression to test + * @return true if the given expression represents constant value + */ + private boolean isConstant(Expression e) { + if(e instanceof IntegerExpression) + return true; + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling) + || ((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return true; + } + return false; + } + + /** + * Returns the boolean value of the given expression that represents a boolean value. + * @param e a boolean value + * @return the boolean value of the given expression that represents a boolean value + */ + private boolean parseBoolean(Expression e) { + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling)) + return true; + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return false; + } + throw new RuntimeException(); + } + + /** + * Returns an expression representing the given boolean value. + * @param val the boolean value that will be represented by the returned expression + * @return an expression representing the given boolean value + */ + private Expression createBoolean(boolean val) { + Identifier iAST = new Identifier(val ? "true" : "false", new SourcePosition()); + iAST.decl = val ? StdEnvironment.trueDecl : StdEnvironment.falseDecl; + SimpleVname vAST = new SimpleVname(iAST, new SourcePosition()); + vAST.type = StdEnvironment.booleanType; + VnameExpression boolExpression = new VnameExpression(vAST, new SourcePosition()); + return boolExpression; + } + + + + + + @Override + public Object visitAssignCommand(AssignCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitCallCommand(CallCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitEmptyCommand(EmptyCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIfCommand(IfCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitLetCommand(LetCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSequentialCommand(SequentialCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitWhileCommand(WhileCommand ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitArrayExpression(ArrayExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitBinaryExpression(BinaryExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitCallExpression(CallExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitCharacterExpression(CharacterExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitEmptyExpression(EmptyExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIfExpression(IfExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIntegerExpression(IntegerExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitLetExpression(LetExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitRecordExpression(RecordExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitUnaryExpression(UnaryExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitVnameExpression(VnameExpression ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitBinaryOperatorDeclaration(BinaryOperatorDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitConstDeclaration(ConstDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitFuncDeclaration(FuncDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitProcDeclaration(ProcDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSequentialDeclaration(SequentialDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitTypeDeclaration(TypeDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitVarDeclaration(VarDeclaration ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitMultipleArrayAggregate(MultipleArrayAggregate ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSingleArrayAggregate(SingleArrayAggregate ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitMultipleRecordAggregate(MultipleRecordAggregate ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSingleRecordAggregate(SingleRecordAggregate ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitConstFormalParameter(ConstFormalParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitFuncFormalParameter(FuncFormalParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitProcFormalParameter(ProcFormalParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitVarFormalParameter(VarFormalParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitEmptyFormalParameterSequence(EmptyFormalParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitMultipleFormalParameterSequence(MultipleFormalParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSingleFormalParameterSequence(SingleFormalParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitConstActualParameter(ConstActualParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitFuncActualParameter(FuncActualParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitProcActualParameter(ProcActualParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitVarActualParameter(VarActualParameter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitEmptyActualParameterSequence(EmptyActualParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitMultipleActualParameterSequence(MultipleActualParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSingleActualParameterSequence(SingleActualParameterSequence ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitAnyTypeDenoter(AnyTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitArrayTypeDenoter(ArrayTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitBoolTypeDenoter(BoolTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitCharTypeDenoter(CharTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitErrorTypeDenoter(ErrorTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSimpleTypeDenoter(SimpleTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIntTypeDenoter(IntTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitRecordTypeDenoter(RecordTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitMultipleFieldTypeDenoter(MultipleFieldTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSingleFieldTypeDenoter(SingleFieldTypeDenoter ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitCharacterLiteral(CharacterLiteral ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIdentifier(Identifier ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitIntegerLiteral(IntegerLiteral ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitOperator(Operator ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitDotVname(DotVname ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSimpleVname(SimpleVname ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitSubscriptVname(SubscriptVname ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Object visitProgram(Program ast, Object o) { + throw new UnsupportedOperationException("Not supported yet."); + } + +} diff --git a/ws2011/Compiler I/Triangle-2.1-esa3/solution/constant_folding_helper_functions.java b/ws2011/Compiler I/Triangle-2.1-esa3/solution/constant_folding_helper_functions.java new file mode 100644 index 00000000..5db56e5e --- /dev/null +++ b/ws2011/Compiler I/Triangle-2.1-esa3/solution/constant_folding_helper_functions.java @@ -0,0 +1,49 @@ + /** + * Returns true if the given expression represents constant value. + * This value can be a boolean or integer. + * @param e the expression to test + * @return true if the given expression represents constant value + */ + private boolean isConstant(Expression e) { + if(e instanceof IntegerExpression) + return true; + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling) + || ((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return true; + } + return false; + } + + /** + * Returns the boolean value of the given expression that represents a boolean value. + * @param e a boolean value + * @return the boolean value of the given expression that represents a boolean value + */ + private boolean parseBoolean(Expression e) { + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling)) + return true; + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return false; + } + throw new RuntimeException(); + } + + /** + * Returns an expression representing the given boolean value. + * @param val the boolean value that will be represented by the returned expression + * @return an expression representing the given boolean value + */ + private Expression createBoolean(boolean val) { + Identifier iAST = new Identifier(val ? "true" : "false", new SourcePosition()); + iAST.decl = val ? StdEnvironment.trueDecl : StdEnvironment.falseDecl; + SimpleVname vAST = new SimpleVname(iAST, new SourcePosition()); + vAST.type = StdEnvironment.booleanType; + VnameExpression boolExpression = new VnameExpression(vAST, new SourcePosition()); + return boolExpression; + } diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/.DS_Store b/ws2011/Compiler I/Uebungen/2. Uebung/.DS_Store new file mode 100644 index 00000000..11b06023 Binary files /dev/null and b/ws2011/Compiler I/Uebungen/2. Uebung/.DS_Store differ diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02.zip b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02.zip new file mode 100644 index 00000000..34ef20d4 Binary files /dev/null and b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02.zip differ diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/SymbolTable.java b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/SymbolTable.java new file mode 100644 index 00000000..daeeeb51 --- /dev/null +++ b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/SymbolTable.java @@ -0,0 +1,43 @@ +package Triangle.ContextualAnalyzer; + +import java.util.List; +import java.util.Map; +import java.util.Stack; + +import Triangle.AbstractSyntaxTrees.Declaration; + +public final class SymbolTable { + + private Map> symtab; + private List> scopeStack; + + public SymbolTable () { + } + + // Opens a new level in the identification table, 1 higher than the + // current topmost level. + public void openScope () { + } + + // Closes the topmost level in the identification table, discarding + // all entries belonging to that level. + public void closeScope () { + } + + // Makes a new entry in the identification table for the given identifier + // and attribute. The new entry belongs to the current level. + // duplicated is set to to true if there is already an entry for the + // same identifier at the current level. + public void enter (String id, Declaration attr) { + } + + // Finds an entry for the given identifier in the identification table, + // if any. If there are several entries for that identifier, finds the + // entry at the highest level, in accordance with the scope rules. + // Returns null if no entry is found. + // otherwise returns the attribute field of the entry found. + public Declaration retrieve (String id) { + return null; + } + +} diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/c1-ex02_no_lsg.pdf b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/c1-ex02_no_lsg.pdf new file mode 100644 index 00000000..5983fd7c Binary files /dev/null and b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/c1-ex02_no_lsg.pdf differ diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/constant_folding_helper_functions.java b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/constant_folding_helper_functions.java new file mode 100644 index 00000000..5db56e5e --- /dev/null +++ b/ws2011/Compiler I/Uebungen/2. Uebung/c1-ex02/constant_folding_helper_functions.java @@ -0,0 +1,49 @@ + /** + * Returns true if the given expression represents constant value. + * This value can be a boolean or integer. + * @param e the expression to test + * @return true if the given expression represents constant value + */ + private boolean isConstant(Expression e) { + if(e instanceof IntegerExpression) + return true; + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling) + || ((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return true; + } + return false; + } + + /** + * Returns the boolean value of the given expression that represents a boolean value. + * @param e a boolean value + * @return the boolean value of the given expression that represents a boolean value + */ + private boolean parseBoolean(Expression e) { + if(e instanceof VnameExpression) { + VnameExpression vname = (VnameExpression)e; + if(vname.V instanceof SimpleVname) + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.trueDecl.I.spelling)) + return true; + if(((SimpleVname)vname.V).I.spelling.equals(StdEnvironment.falseDecl.I.spelling)) + return false; + } + throw new RuntimeException(); + } + + /** + * Returns an expression representing the given boolean value. + * @param val the boolean value that will be represented by the returned expression + * @return an expression representing the given boolean value + */ + private Expression createBoolean(boolean val) { + Identifier iAST = new Identifier(val ? "true" : "false", new SourcePosition()); + iAST.decl = val ? StdEnvironment.trueDecl : StdEnvironment.falseDecl; + SimpleVname vAST = new SimpleVname(iAST, new SourcePosition()); + vAST.type = StdEnvironment.booleanType; + VnameExpression boolExpression = new VnameExpression(vAST, new SourcePosition()); + return boolExpression; + } diff --git a/ws2011/Compiler I/Uebungen/2. Uebung/solution.odt b/ws2011/Compiler I/Uebungen/2. Uebung/solution.odt new file mode 100644 index 00000000..bf83a2c8 Binary files /dev/null and b/ws2011/Compiler I/Uebungen/2. Uebung/solution.odt differ diff --git a/ws2011/FOC/Folien/Module08-Programmiersprachen4-v1.0.pdf b/ws2011/FOC/Folien/Module08-Programmiersprachen4-v1.0.pdf new file mode 100644 index 00000000..2a6bde53 Binary files /dev/null and b/ws2011/FOC/Folien/Module08-Programmiersprachen4-v1.0.pdf differ diff --git a/ws2011/FOC/Uebungen/Loesung06-v1.0.pdf b/ws2011/FOC/Uebungen/Loesung06-v1.0.pdf new file mode 100644 index 00000000..1cac12f7 Binary files /dev/null and b/ws2011/FOC/Uebungen/Loesung06-v1.0.pdf differ diff --git a/ws2011/FOC/Uebungen/Uebung08-v1.0.pdf b/ws2011/FOC/Uebungen/Uebung08-v1.0.pdf new file mode 100644 index 00000000..7a821c26 Binary files /dev/null and b/ws2011/FOC/Uebungen/Uebung08-v1.0.pdf differ diff --git a/ws2011/Semantic Web/Folien/07_OWL_Teil2.pdf b/ws2011/Semantic Web/Folien/07_OWL_Teil2.pdf new file mode 100644 index 00000000..a92de540 Binary files /dev/null and b/ws2011/Semantic Web/Folien/07_OWL_Teil2.pdf differ diff --git a/ws2011/Semantic Web/Folien/08_Reasoning.pdf b/ws2011/Semantic Web/Folien/08_Reasoning.pdf new file mode 100644 index 00000000..6ab09eca Binary files /dev/null and b/ws2011/Semantic Web/Folien/08_Reasoning.pdf differ diff --git a/ws2011/Semantic Web/Folien/09-Ontology-Matching.pdf b/ws2011/Semantic Web/Folien/09-Ontology-Matching.pdf new file mode 100644 index 00000000..d7df66b4 Binary files /dev/null and b/ws2011/Semantic Web/Folien/09-Ontology-Matching.pdf differ diff --git a/ws2011/Semantic Web/Folien/10_Top-Level_Ontologien.pdf b/ws2011/Semantic Web/Folien/10_Top-Level_Ontologien.pdf new file mode 100644 index 00000000..8b16c253 Binary files /dev/null and b/ws2011/Semantic Web/Folien/10_Top-Level_Ontologien.pdf differ diff --git a/ws2011/Semantic Web/Uebungen/.DS_Store b/ws2011/Semantic Web/Uebungen/.DS_Store index 7eac02b0..6a8e4ca2 100644 Binary files a/ws2011/Semantic Web/Uebungen/.DS_Store and b/ws2011/Semantic Web/Uebungen/.DS_Store differ diff --git a/ws2011/Semantic Web/Uebungen/02_RDFS_und_LOD_Loesung.pdf b/ws2011/Semantic Web/Uebungen/02_RDFS_und_LOD_Loesung.pdf new file mode 100644 index 00000000..f3bb66aa Binary files /dev/null and b/ws2011/Semantic Web/Uebungen/02_RDFS_und_LOD_Loesung.pdf differ diff --git a/ws2011/Semantic Web/Uebungen/04-reasoning-und-matching.pdf b/ws2011/Semantic Web/Uebungen/04-reasoning-und-matching.pdf new file mode 100644 index 00000000..e7e659b2 Binary files /dev/null and b/ws2011/Semantic Web/Uebungen/04-reasoning-und-matching.pdf differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/.DS_Store b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/.DS_Store index c730f9aa..2e326c57 100644 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/.DS_Store and b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/.DS_Store differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/index.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/index.php index d8c04bea..ce722855 100644 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/index.php +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/index.php @@ -23,19 +23,36 @@ if(isset($_POST['buttonPressed'])){ + + $movieTitleByUser =$_POST['movieTitleByUser']; echo "

Getting Infos for: " . $movieTitleByUser; - echo '
searching . . .

'; - - + echo '
searching . . .

'; + + $mainController = new controller(); $mainController->getData($movieTitleByUser); - } + + + + } ?> + + +

linkedmdb.org diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/controller.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/controller.php index e386ebe6..c6ff86cd 100644 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/controller.php +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/controller.php @@ -8,16 +8,19 @@ include_once './rdfLib/sparqllib.php'; - +include_once 'mdbController.php'; +include_once 'freebaseController.php'; +include_once 'dbpediaController.php'; class controller { - - - static $resultsReady = false; - - - private function buildNamespaces(){ + + + + + + + public function buildNamespaces(){ sparql_ns("owl", "http://www.w3.org/2002/07/owl#"); sparql_ns("xsd", "http://www.w3.org/2001/XMLSchema#"); sparql_ns("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); @@ -37,82 +40,67 @@ class controller { * * */ - public function getData($userInput){ + public function getData($movieTitle){ + + + $resultsReady = false; - //$mdbC = new mdbController(); - - - - //$db = sparql_connect( "http://dbpedia.org/sparql" ); //connect to dbpedia's sparql service - $db = sparql_connect("http://data.linkedmdb.org/sparql"); - $this->buildNamespaces(); - - - if( !$db ) { print sparql_errno() . ": " . sparql_error(). "\n"; exit; } - - sparql_ns("prop", "http://dbpedia.org/property/"); - sparql_ns("type", "http://dbpedia.org/class/yago/"); - - - sparql_ns("test1", "http://dbpedia.org/ontology/"); - sparql_ns("test2", "http://www.w3.org/2000/01/"); - // sparql_ns("test3", ""); - - //folgende Abfragen funktionieren: -// $sparql = "SELECT ?country_name ?population WHERE { -// ?country a type:LandlockedCountries ; -// rdfs:label ?country_name ; -// prop:populationEstimate ?population . -// FILTER (?population > 15000000) . -// }"; -// - //$sparql = "select DISTINCT ?label2 WHERE { ?country ?city . ?country ?label1 . ?city ?label2 . FILTER (str(?label1) = \"".$userInput."\" && LANG(?label2) = \"en\") }"; - - - //$sparql = "SELECT ?movie WHERE { ?arni linkedmdbRes:actor_name \"Arnold Schwarzeneger\" . ?movie linkedmdbRes:actor ?arni . "; - - - $sparql = "SELECT ?actorName WHERE { ?woody linkedmdbRes:director_name \"Woody Allen\" . - ?movie ?woody; - ?actor. - ?actor ?actorName . - }"; - - $result = $db->query( $sparql ); + $mdbC = new mdbController(); + $freebaseC = new freebaseController(); + $dbpediaC = new dbpediaController; + $result = $mdbC->getMovieData($movieTitle); + $resultsReady = true; + //$this->printData($result); + + + //return resultsReady; + //$result = $freebaseC->getData($movieTitle); + + // $result = $dbpediaC->getPersonData($movieTitle); + + //$resultsReady = true; + + + + if( !$result ) { print sparql_errno() . ": " . sparql_error(). "\n"; exit; } - $fields = $result->field_array( $result ); - - -// if($userInput == "Test"){ -// echo "No way! I won't search infos about " . $userInput; -// }else{ - print "

Found: ".sparql_num_rows( $result )." entries.

"; - print ""; - print ""; + + foreach($result as $result){ + + + + $fields = $result->field_array( $result ); + + + print("
"); + foreach( $fields as $field ) { - print "
"; + print "
$field:
"; } - print ""; + //print ""; while( $row = sparql_fetch_array( $result ) ) { - print ""; + //print ""; foreach( $fields as $field ) { - print ""; + if($field == "links"){ + print "$row[$field]
"; + }else + { + print "$row[$field], "; + } + } - print ""; - } - print "
$field
$row[$field]
"; - // } - + } + } } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/dbpediaController.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/dbpediaController.php new file mode 100644 index 00000000..1f8d4ca4 --- /dev/null +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/dbpediaController.php @@ -0,0 +1,39 @@ +buildNamespaces(); + + + $sparql = "SELECT ?actors WHERE { ?film rdfs:label \"". $personName . "\" . + ?film linkedmdbRes:actor ?actor . + ?actor linkedmdbRes:actor_name ?actors} + "; + + return $result = $db->query( $sparql ); + + + + + } + + + +} + +?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/freebaseController.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/freebaseController.php index f0281657..28e3090a 100644 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/freebaseController.php +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/freebaseController.php @@ -10,12 +10,19 @@ * * @author Michael */ -class freebaseController { +class freebaseController extends controller{ //put your code here - public function getPersonData(){ + public function getPersonData($personName){ + $db = sparql_connect(""); + $this->buildNamespaces(); + + + $sparql = ""; + + return $result = $db->query( $sparql ); } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/mdbController.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/mdbController.php index 7afda6f9..292c299c 100644 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/mdbController.php +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/logic/mdbController.php @@ -10,12 +10,81 @@ * * @author Michael */ -class mdbController { - //put your code here +class mdbController extends controller{ - public function getMovieData(){ + + + public function getMovieData($movieTitle){ + + $result = array(); + + $db = sparql_connect("http://data.linkedmdb.org/sparql"); + $this->buildNamespaces(); + //runtime + $sparql = "SELECT ?runtime WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:runtime ?runtime . }"; + + $result[0] = $db->query( $sparql ); + + + + //writers + $sparql = "SELECT ?writers WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:writer ?writerL . + ?writerL linkedmdbRes:writer_name ?writers . }"; + + $result[1] = $db->query( $sparql ); + + + + //actors + $sparql = "SELECT ?actors WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:actor ?actor . + ?actor linkedmdbRes:actor_name ?actors} + + + ORDER BY ?actors"; + + $result[2] = $db->query( $sparql ); + + + + //date + $sparql = "SELECT ?date WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:initial_release_date ?date .}"; + + $result[3] = $db->query( $sparql ); + + + + //director + $sparql = "SELECT ?director WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:director ?directorL . + ?directorL linkedmdbRes:director_name ?director . }"; + + $result[4] = $db->query( $sparql ); + + + + //editors + $sparql = "SELECT DISTINCT ?editor WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film linkedmdbRes:editor ?editorL . + ?editorL linkedmdbRes:editor_name ?editor . }"; + + $result[5] = $db->query( $sparql ); + + + + //Links + $sparql = "SELECT ?links WHERE { ?film rdfs:label \"". $movieTitle . "\" . + ?film foaf:page ?links . }"; + + $result[6] = $db->query( $sparql ); + + + return $result; } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml index 7d386c35..c1f155a7 100644 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml @@ -1,9 +1,4 @@ - - - logic/controller.php - 15 - - + diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml.1.nblh~ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml.1.nblh~ new file mode 100644 index 00000000..c1f155a7 --- /dev/null +++ b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/SemanticWebApp/nbproject/private/private.xml.1.nblh~ @@ -0,0 +1,4 @@ + + + + diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/.DS_Store b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/.DS_Store deleted file mode 100644 index 55554a8a..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/.DS_Store and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/index.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/index.php deleted file mode 100644 index 28666ba9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/index.php +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -
- - This Page is only a small Semantic Web Application which allows you to find information - about movies using "Linked Movie Data Base" and "Freebase". -

- In which Movie are you interested? -
- - -
- - Getting Infos for: " . $movieTitleByUser; - - echo '
searching . . .'; - - $mainController = new controller(); - $mainController->getData($movieTitleByUser); - - - } - ?> - -

- linkedmdb.org -
- freebase.com - -
- - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/controller.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/controller.php deleted file mode 100644 index 0b6aabd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/controller.php +++ /dev/null @@ -1,48 +0,0 @@ - ?city . ?country ?label1 . ?city ?label2 . FILTER (str(?label1) = \"" . $userInput . "\" && LANG(?label2) = \"en\") "; - $result = $dbModell->sparqlQuery($querystring, 'xml'); - - echo $dbModell->sparqlQuery($querystring, 'xml'); - - - } - - - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/freebaseController.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/freebaseController.php deleted file mode 100644 index 55034e58..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/freebaseController.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/mdbController.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/mdbController.php deleted file mode 100644 index 72eb94d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/logic/mdbController.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/private/private.properties b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/private/private.properties deleted file mode 100644 index 99071af8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/private/private.properties +++ /dev/null @@ -1,5 +0,0 @@ -copy.src.files=false -copy.src.target= -index.file=index.php -run.as=LOCAL -url=http://localhost/solution/ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.properties b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.properties deleted file mode 100644 index 94429c9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.properties +++ /dev/null @@ -1,7 +0,0 @@ -include.path=${php.global.include.path} -php.version=PHP_53 -source.encoding=UTF-8 -src.dir=. -tags.asp=false -tags.short=true -web.root=. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.xml deleted file mode 100644 index 81dca232..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/nbproject/project.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - org.netbeans.modules.php.project - - - SemanticWebApp - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/all-wcprops deleted file mode 100755 index 08fbcfee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 49 -/svnroot/rdfapi-php/!svn/ver/556/trunk/rdfapi-php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/entries deleted file mode 100755 index 565ee966..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/entries +++ /dev/null @@ -1,46 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-01-22T10:52:48.041272Z -556 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -test -dir - -netapi -dir - -tools -dir - -rap-pubby -dir - -doc -dir - -api -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/all-wcprops deleted file mode 100755 index c18bf46f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 53 -/svnroot/rdfapi-php/!svn/ver/556/trunk/rdfapi-php/api -END -constants.php -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/558/trunk/rdfapi-php/api/constants.php -END -RdfAPI.php -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/RdfAPI.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/entries deleted file mode 100755 index 56077c99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/entries +++ /dev/null @@ -1,84 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-01-22T10:52:48.041272Z -556 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -model -dir - -ontModel -dir - -rdql -dir - -sparql -dir - -constants.php -file -558 - - - -2008-02-29T15:14:07.085157Z -f305fb172543bc44201542efebec39a9 -2008-02-29T15:14:04.958076Z -558 -cax -has-props - -dataset -dir - -syntax -dir - -vocabulary -dir - -resModel -dir - -RdfAPI.php -file - - - - -2008-02-29T14:57:56.956719Z -3162507773a5651a21e2224bb9c957b5 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -infModel -dir - -util -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/RdfAPI.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/RdfAPI.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/RdfAPI.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/constants.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/constants.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/prop-base/constants.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/RdfAPI.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/RdfAPI.php.svn-base deleted file mode 100755 index 19010894..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/RdfAPI.php.svn-base +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/constants.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/constants.php.svn-base deleted file mode 100755 index d06b4a58..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/.svn/text-base/constants.php.svn-base +++ /dev/null @@ -1,418 +0,0 @@ -. -define('SER_XML_DECLARATION', TRUE ); - -// N3 Serializer: Set to TRUE, if the N3 serializer should try to compress the blank node -// syntax using [] whereever possible. -define('N3SER_BNODE_SHORT', FALSE); - -// RDF Serializer: Set to TRUE, if the serializer should write text values always as -// escaped CDATA. -define('USE_CDATA', FALSE); - -define('USE_ANY_QUOTE', FALSE); -define('GENERAL_PREFIX_BASE','ns'); -define('MAX_ALLOWED_ABBREVIATED_LENGTH',60); - -// ---------------------------------------------------------------------------------- -// Util -// ---------------------------------------------------------------------------------- - -// Definition of the colors used by the method RDFUtil:writeHTMLTable -define('HTML_TABLE_HEADER_COLOR', '#FFFFFF'); -define('HTML_TABLE_RESOURCE_COLOR', '#FFFFCC'); -define('HTML_TABLE_LITERAL_COLOR', '#E7E7EF'); -define('HTML_TABLE_BNODE_COLOR', '#FFCCFF'); -define('HTML_TABLE_RDF_NS_COLOR', '#CCFFCC'); -define('HTML_TABLE_NS_ROW_COLOR1', '#FFFFFF'); -define('HTML_TABLE_NS_ROW_COLOR0', '#E7E7EF'); - -// ---------------------------------------------------------------------------------- -// RDF -// ---------------------------------------------------------------------------------- - -define('RDF_NAMESPACE_URI','http://www.w3.org/1999/02/22-rdf-syntax-ns#' ); -define('RDF_NAMESPACE_PREFIX','rdf' ); -define('RDF_RDF','RDF'); -define('RDF_DESCRIPTION','Description'); -define('RDF_ID','ID'); -define('RDF_ABOUT','about'); -define('RDF_ABOUT_EACH','aboutEach'); -define('RDF_ABOUT_EACH_PREFIX','aboutEachPrefix'); -define('RDF_BAG_ID','bagID'); -define('RDF_RESOURCE','resource'); -define('RDF_VALUE','value'); -define('RDF_PARSE_TYPE','parseType'); -define('RDF_PARSE_TYPE_LITERAL','Literal'); -define('RDF_PARSE_TYPE_RESOURCE','Resource'); -define('RDF_PARSE_TYPE_COLLECTION', 'Collection'); -define('RDF_TYPE','type'); -define('RDF_BAG','Bag'); -define('RDF_SEQ','Seq'); -define('RDF_ALT','Alt'); -define('RDF_LI','li'); -define('RDF_STATEMENT','Statement'); -define('RDF_SUBJECT','subject'); -define('RDF_PREDICATE','predicate'); -define('RDF_OBJECT','object'); -define('RDF_NODEID','nodeID'); -define('RDF_DATATYPE','datatype'); -define('RDF_SEEALSO','seeAlso'); -define('RDF_PROPERTY','Property'); -define('RDF_LIST','List'); -define('RDF_NIL','nil'); -define('RDF_REST','rest'); -define('RDF_FIRST','first'); -define('RDF_XMLLITERAL', 'XMLLiteral'); - -// ---------------------------------------------------------------------------------- -// RDF Schema -// ---------------------------------------------------------------------------------- - -define('RDF_SCHEMA_URI','http://www.w3.org/2000/01/rdf-schema#' ); -define('RDF_DATATYPE_SCHEMA_URI','http://www.w3.org/TR/xmlschema-2' ); -define('RDF_SCHEMA_PREFIX', 'rdfs'); -define('RDFS_SUBCLASSOF','subClassOf'); -define('RDFS_SUBPROPERTYOF','subPropertyOf'); -define('RDFS_RANGE','range'); -define('RDFS_DOMAIN','domain'); -define('RDFS_CLASS','Class'); -define('RDFS_RESOURCE','Resource'); -define('RDFS_DATATYPE','Datatype'); -define('RDFS_LITERAL','Literal'); -define('RDFS_SEE_ALSO','seeAlso'); -define('RDFS_IS_DEFINED_BY','isDefinedBy'); -define('RDFS_LABEL','label'); -define('RDFS_COMMENT','comment'); - - -// ---------------------------------------------------------------------------------- -// OWL -// ---------------------------------------------------------------------------------- - -define('OWL_URI','http://www.w3.org/2002/07/owl#' ); -define('OWL_PREFIX', 'owl'); -define('OWL_SAME_AS','sameAs'); -define('OWL_INVERSE_OF','inverseOf'); - - -// ---------------------------------------------------------------------------------- -// XML -// ---------------------------------------------------------------------------------- - -define('XML_NAMESPACE_PREFIX', 'xml'); -define('XML_NAMESPACE_DECLARATION_PREFIX', 'xmlns'); -define('XML_NAMESPACE_URI','http://www.w3.org/XML/1998/namespace' ); -define('XML_LANG','lang'); -define('DATATYPE_SHORTCUT_PREFIX','datatype:'); -define('XML_SCHEMA','http://www.w3.org/2001/XMLSchema#'); - -// ---------------------------------------------------------------------------------- -// RDF DATATYPE SHORTCUTS (extends datatype shortcuts to the full XML datatype URIs) -// ---------------------------------------------------------------------------------- - -$short_datatype = array( - 'STRING' => RDF_DATATYPE_SCHEMA_URI . '#string', - 'DECIMAL' => RDF_DATATYPE_SCHEMA_URI . '#decimal', - 'INTEGER' => RDF_DATATYPE_SCHEMA_URI . '#integer', - 'INT' => RDF_DATATYPE_SCHEMA_URI . '#int', - 'SHORT' => RDF_DATATYPE_SCHEMA_URI . '#short', - 'BYTE' => RDF_DATATYPE_SCHEMA_URI . '#byte', - 'LONG' => RDF_DATATYPE_SCHEMA_URI . '#long', - 'LANGUAGE' => RDF_DATATYPE_SCHEMA_URI . '#language', - 'NAME' => RDF_DATATYPE_SCHEMA_URI . '#name' -); - -// ---------------------------------------------------------------------------------- -// Database -// ---------------------------------------------------------------------------------- - -if (!defined('ADODB_DB_DRIVER')) { - if (isset($GLOBALS['dbConf'])) { - define('ADODB_DB_DRIVER', $GLOBALS['dbConf']['type']); - define('ADODB_DB_HOST' , $GLOBALS['dbConf']['host']); - define('ADODB_DB_NAME' , $GLOBALS['dbConf']['database']); - define('ADODB_DB_USER' , $GLOBALS['dbConf']['user']); - define('ADODB_DB_PASSWORD', $GLOBALS['dbConf']['password']); - } else { - define('ADODB_DB_DRIVER', 'mysql'); - define('ADODB_DB_HOST' , 'localhost'); - define('ADODB_DB_NAME' , 'kbrdfdb'); - define('ADODB_DB_USER' , 'kbrdf'); - define('ADODB_DB_PASSWORD', 'db1'); - } -} -if (!defined('ADODB_DEBUG_MODE')) { - define('ADODB_DEBUG_MODE', '0'); -} - - -// ---------------------------------------------------------------------------------- -// RDQL Error Messages -// ---------------------------------------------------------------------------------- - -define('RDQL_ERR','RDQL error '); -define('RDQL_SYN_ERR','RDQL syntax error '); -define('RDQL_SEL_ERR', RDQL_ERR .'in the SELECT clause: '); -define('RDQL_SRC_ERR', RDQL_ERR .'in the SOURCE clause: '); -define('RDQL_WHR_ERR', RDQL_ERR .'in the WHERE clause: '); -define('RDQL_AND_ERR', RDQL_ERR .'in the AND clause: '); -define('RDQL_USG_ERR', RDQL_ERR .'in the USING clause: '); - - -// ---------------------------------------------------------------------------------- -// Vocabulary -// ---------------------------------------------------------------------------------- -// namespace declarations -define('ATOM_NS' , 'http://purl.org/atom/ns#'); -define('DC_NS' , 'http://purl.org/dc/elements/1.1/'); -define('DCTERM_NS' , 'http://purl.org/dc/terms/'); -define('DCMITYPE_NS', 'http://purl.org/dc/dcmitype/'); -define('FOAF_NS' , 'http://xmlns.com/foaf/0.1/'); -define('OWL_NS' , 'http://www.w3.org/2002/07/owl#'); -define('RSS_NS' , 'http://purl.org/rss/1.0/'); -define('VCARD_NS' , 'http://www.w3.org/2001/vcard-rdf/3.0#'); - - - -// ---------------------------------------------------------------------------------- -// RDQL, SPARQL and parser default namespace prefixes -// ---------------------------------------------------------------------------------- - -global $default_prefixes; -$default_prefixes = array( - RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI, - RDF_SCHEMA_PREFIX => RDF_SCHEMA_URI, - 'xsd' => 'http://www.w3.org/2001/XMLSchema#', - OWL_PREFIX => OWL_URI, - 'dc' => 'http://purl.org/dc/elements/1.1/', - 'dcterms' => 'http://purl.org/dc/terms/', - 'vcard' => 'http://www.w3.org/2001/vcard-rdf/3.0#' -); - - - -// ---------------------------------------------------------------------------------- -// InfModel -// ---------------------------------------------------------------------------------- - -//activate / deactivate reasoning for the following schema constructs -//rdfs:subclass -define('INF_RES_SUBCLASSOF',true); -//rdfs:subproperty -define('INF_RES_SUBPROPERTYOF',true); -//rdfs:range -define('INF_RES_RANGE',true); -//rdfs:domain -define('INF_RES_DOMAIN',true); -//owl:sameAs -define('INF_RES_OWL_SAMEAS',true); -//owl:inverseOf -define('INF_RES_OWL_INVERSEOF',true); - -//generic RDFS Rules from the RDF Schema doc: -//see: http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules -define('INF_RES_RULE_RDFS12',false); -define('INF_RES_RULE_RDFS6',false); -define('INF_RES_RULE_RDFS8',false); -define('INF_RES_RULE_RDFS10',false); -define('INF_RES_RULE_RDFS13',false); - -// ---------------------------------------------------------------------------------- -// GRAPHVIZ -// ---------------------------------------------------------------------------------- - -// path to the dot binary -define('GRAPHVIZ_PATH', 'C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe'); - -// directory for temporary files -// Attention: must be write-/readable by the webserver -define('GRAPHVIZ_TEMP', 'C:\/'); - -// display statistical data in generated images -// currently only number of statements drawn -define('GRAPHVIZ_STAT', TRUE); - -// allowed file formats -// for security reasons (to prevent code injection) -define('GRAPHVIZ_FORMAT', 'svg, dot, jpg, png, gif, vrml'); - -// enable clickable URIs -// only supported by certain formats (e.g. SVG) -define('GRAPHVIZ_URI', FALSE); - -// define parameters for the graphical output -// if a paramter is undefined, the default value of graphviz is used -// for further information see: http://www.graphviz.org/Documentation.php -$graphviz_param = array( - 'GRAPH_STYLE' => 'rankdir="TB"', - 'RESOURCE_STYLE' => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"', - 'LITERAL_STYLE' => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"', - 'PREDICATE_STYLE' => 'fontname="Courier",fontsize="10"', - 'INFERRED_STYLE' => 'style="dotted",fontname="Courier",fontsize="10"', - 'BLANKNODE_STYLE' => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"', - 'BOX_STYLE' => 'fontname="Courier",fontsize="8",color="#BBBBBB"' -); - - -// ---------------------------------------------------------------------------------- -// SPARQL -// ---------------------------------------------------------------------------------- - -// Attribute lists for describing Resources. ['resource type'] = array(att1, att2, att3, ...). -// - -$sparql_describe = array( - FOAF_NS.'person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox') -); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/RdfAPI.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/RdfAPI.php deleted file mode 100755 index 729aecdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/RdfAPI.php +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/constants.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/constants.php deleted file mode 100755 index a9f53aea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/constants.php +++ /dev/null @@ -1,418 +0,0 @@ -. -define('SER_XML_DECLARATION', TRUE ); - -// N3 Serializer: Set to TRUE, if the N3 serializer should try to compress the blank node -// syntax using [] whereever possible. -define('N3SER_BNODE_SHORT', FALSE); - -// RDF Serializer: Set to TRUE, if the serializer should write text values always as -// escaped CDATA. -define('USE_CDATA', FALSE); - -define('USE_ANY_QUOTE', FALSE); -define('GENERAL_PREFIX_BASE','ns'); -define('MAX_ALLOWED_ABBREVIATED_LENGTH',60); - -// ---------------------------------------------------------------------------------- -// Util -// ---------------------------------------------------------------------------------- - -// Definition of the colors used by the method RDFUtil:writeHTMLTable -define('HTML_TABLE_HEADER_COLOR', '#FFFFFF'); -define('HTML_TABLE_RESOURCE_COLOR', '#FFFFCC'); -define('HTML_TABLE_LITERAL_COLOR', '#E7E7EF'); -define('HTML_TABLE_BNODE_COLOR', '#FFCCFF'); -define('HTML_TABLE_RDF_NS_COLOR', '#CCFFCC'); -define('HTML_TABLE_NS_ROW_COLOR1', '#FFFFFF'); -define('HTML_TABLE_NS_ROW_COLOR0', '#E7E7EF'); - -// ---------------------------------------------------------------------------------- -// RDF -// ---------------------------------------------------------------------------------- - -define('RDF_NAMESPACE_URI','http://www.w3.org/1999/02/22-rdf-syntax-ns#' ); -define('RDF_NAMESPACE_PREFIX','rdf' ); -define('RDF_RDF','RDF'); -define('RDF_DESCRIPTION','Description'); -define('RDF_ID','ID'); -define('RDF_ABOUT','about'); -define('RDF_ABOUT_EACH','aboutEach'); -define('RDF_ABOUT_EACH_PREFIX','aboutEachPrefix'); -define('RDF_BAG_ID','bagID'); -define('RDF_RESOURCE','resource'); -define('RDF_VALUE','value'); -define('RDF_PARSE_TYPE','parseType'); -define('RDF_PARSE_TYPE_LITERAL','Literal'); -define('RDF_PARSE_TYPE_RESOURCE','Resource'); -define('RDF_PARSE_TYPE_COLLECTION', 'Collection'); -define('RDF_TYPE','type'); -define('RDF_BAG','Bag'); -define('RDF_SEQ','Seq'); -define('RDF_ALT','Alt'); -define('RDF_LI','li'); -define('RDF_STATEMENT','Statement'); -define('RDF_SUBJECT','subject'); -define('RDF_PREDICATE','predicate'); -define('RDF_OBJECT','object'); -define('RDF_NODEID','nodeID'); -define('RDF_DATATYPE','datatype'); -define('RDF_SEEALSO','seeAlso'); -define('RDF_PROPERTY','Property'); -define('RDF_LIST','List'); -define('RDF_NIL','nil'); -define('RDF_REST','rest'); -define('RDF_FIRST','first'); -define('RDF_XMLLITERAL', 'XMLLiteral'); - -// ---------------------------------------------------------------------------------- -// RDF Schema -// ---------------------------------------------------------------------------------- - -define('RDF_SCHEMA_URI','http://www.w3.org/2000/01/rdf-schema#' ); -define('RDF_DATATYPE_SCHEMA_URI','http://www.w3.org/TR/xmlschema-2' ); -define('RDF_SCHEMA_PREFIX', 'rdfs'); -define('RDFS_SUBCLASSOF','subClassOf'); -define('RDFS_SUBPROPERTYOF','subPropertyOf'); -define('RDFS_RANGE','range'); -define('RDFS_DOMAIN','domain'); -define('RDFS_CLASS','Class'); -define('RDFS_RESOURCE','Resource'); -define('RDFS_DATATYPE','Datatype'); -define('RDFS_LITERAL','Literal'); -define('RDFS_SEE_ALSO','seeAlso'); -define('RDFS_IS_DEFINED_BY','isDefinedBy'); -define('RDFS_LABEL','label'); -define('RDFS_COMMENT','comment'); - - -// ---------------------------------------------------------------------------------- -// OWL -// ---------------------------------------------------------------------------------- - -define('OWL_URI','http://www.w3.org/2002/07/owl#' ); -define('OWL_PREFIX', 'owl'); -define('OWL_SAME_AS','sameAs'); -define('OWL_INVERSE_OF','inverseOf'); - - -// ---------------------------------------------------------------------------------- -// XML -// ---------------------------------------------------------------------------------- - -define('XML_NAMESPACE_PREFIX', 'xml'); -define('XML_NAMESPACE_DECLARATION_PREFIX', 'xmlns'); -define('XML_NAMESPACE_URI','http://www.w3.org/XML/1998/namespace' ); -define('XML_LANG','lang'); -define('DATATYPE_SHORTCUT_PREFIX','datatype:'); -define('XML_SCHEMA','http://www.w3.org/2001/XMLSchema#'); - -// ---------------------------------------------------------------------------------- -// RDF DATATYPE SHORTCUTS (extends datatype shortcuts to the full XML datatype URIs) -// ---------------------------------------------------------------------------------- - -$short_datatype = array( - 'STRING' => RDF_DATATYPE_SCHEMA_URI . '#string', - 'DECIMAL' => RDF_DATATYPE_SCHEMA_URI . '#decimal', - 'INTEGER' => RDF_DATATYPE_SCHEMA_URI . '#integer', - 'INT' => RDF_DATATYPE_SCHEMA_URI . '#int', - 'SHORT' => RDF_DATATYPE_SCHEMA_URI . '#short', - 'BYTE' => RDF_DATATYPE_SCHEMA_URI . '#byte', - 'LONG' => RDF_DATATYPE_SCHEMA_URI . '#long', - 'LANGUAGE' => RDF_DATATYPE_SCHEMA_URI . '#language', - 'NAME' => RDF_DATATYPE_SCHEMA_URI . '#name' -); - -// ---------------------------------------------------------------------------------- -// Database -// ---------------------------------------------------------------------------------- - -if (!defined('ADODB_DB_DRIVER')) { - if (isset($GLOBALS['dbConf'])) { - define('ADODB_DB_DRIVER', $GLOBALS['dbConf']['type']); - define('ADODB_DB_HOST' , $GLOBALS['dbConf']['host']); - define('ADODB_DB_NAME' , $GLOBALS['dbConf']['database']); - define('ADODB_DB_USER' , $GLOBALS['dbConf']['user']); - define('ADODB_DB_PASSWORD', $GLOBALS['dbConf']['password']); - } else { - define('ADODB_DB_DRIVER', 'mysql'); - define('ADODB_DB_HOST' , 'localhost'); - define('ADODB_DB_NAME' , 'kbrdfdb'); - define('ADODB_DB_USER' , 'kbrdf'); - define('ADODB_DB_PASSWORD', 'db1'); - } -} -if (!defined('ADODB_DEBUG_MODE')) { - define('ADODB_DEBUG_MODE', '0'); -} - - -// ---------------------------------------------------------------------------------- -// RDQL Error Messages -// ---------------------------------------------------------------------------------- - -define('RDQL_ERR','RDQL error '); -define('RDQL_SYN_ERR','RDQL syntax error '); -define('RDQL_SEL_ERR', RDQL_ERR .'in the SELECT clause: '); -define('RDQL_SRC_ERR', RDQL_ERR .'in the SOURCE clause: '); -define('RDQL_WHR_ERR', RDQL_ERR .'in the WHERE clause: '); -define('RDQL_AND_ERR', RDQL_ERR .'in the AND clause: '); -define('RDQL_USG_ERR', RDQL_ERR .'in the USING clause: '); - - -// ---------------------------------------------------------------------------------- -// Vocabulary -// ---------------------------------------------------------------------------------- -// namespace declarations -define('ATOM_NS' , 'http://purl.org/atom/ns#'); -define('DC_NS' , 'http://purl.org/dc/elements/1.1/'); -define('DCTERM_NS' , 'http://purl.org/dc/terms/'); -define('DCMITYPE_NS', 'http://purl.org/dc/dcmitype/'); -define('FOAF_NS' , 'http://xmlns.com/foaf/0.1/'); -define('OWL_NS' , 'http://www.w3.org/2002/07/owl#'); -define('RSS_NS' , 'http://purl.org/rss/1.0/'); -define('VCARD_NS' , 'http://www.w3.org/2001/vcard-rdf/3.0#'); - - - -// ---------------------------------------------------------------------------------- -// RDQL, SPARQL and parser default namespace prefixes -// ---------------------------------------------------------------------------------- - -global $default_prefixes; -$default_prefixes = array( - RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI, - RDF_SCHEMA_PREFIX => RDF_SCHEMA_URI, - 'xsd' => 'http://www.w3.org/2001/XMLSchema#', - OWL_PREFIX => OWL_URI, - 'dc' => 'http://purl.org/dc/elements/1.1/', - 'dcterms' => 'http://purl.org/dc/terms/', - 'vcard' => 'http://www.w3.org/2001/vcard-rdf/3.0#' -); - - - -// ---------------------------------------------------------------------------------- -// InfModel -// ---------------------------------------------------------------------------------- - -//activate / deactivate reasoning for the following schema constructs -//rdfs:subclass -define('INF_RES_SUBCLASSOF',true); -//rdfs:subproperty -define('INF_RES_SUBPROPERTYOF',true); -//rdfs:range -define('INF_RES_RANGE',true); -//rdfs:domain -define('INF_RES_DOMAIN',true); -//owl:sameAs -define('INF_RES_OWL_SAMEAS',true); -//owl:inverseOf -define('INF_RES_OWL_INVERSEOF',true); - -//generic RDFS Rules from the RDF Schema doc: -//see: http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules -define('INF_RES_RULE_RDFS12',false); -define('INF_RES_RULE_RDFS6',false); -define('INF_RES_RULE_RDFS8',false); -define('INF_RES_RULE_RDFS10',false); -define('INF_RES_RULE_RDFS13',false); - -// ---------------------------------------------------------------------------------- -// GRAPHVIZ -// ---------------------------------------------------------------------------------- - -// path to the dot binary -define('GRAPHVIZ_PATH', 'C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe'); - -// directory for temporary files -// Attention: must be write-/readable by the webserver -define('GRAPHVIZ_TEMP', 'C:\/'); - -// display statistical data in generated images -// currently only number of statements drawn -define('GRAPHVIZ_STAT', TRUE); - -// allowed file formats -// for security reasons (to prevent code injection) -define('GRAPHVIZ_FORMAT', 'svg, dot, jpg, png, gif, vrml'); - -// enable clickable URIs -// only supported by certain formats (e.g. SVG) -define('GRAPHVIZ_URI', FALSE); - -// define parameters for the graphical output -// if a paramter is undefined, the default value of graphviz is used -// for further information see: http://www.graphviz.org/Documentation.php -$graphviz_param = array( - 'GRAPH_STYLE' => 'rankdir="TB"', - 'RESOURCE_STYLE' => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"', - 'LITERAL_STYLE' => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"', - 'PREDICATE_STYLE' => 'fontname="Courier",fontsize="10"', - 'INFERRED_STYLE' => 'style="dotted",fontname="Courier",fontsize="10"', - 'BLANKNODE_STYLE' => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"', - 'BOX_STYLE' => 'fontname="Courier",fontsize="8",color="#BBBBBB"' -); - - -// ---------------------------------------------------------------------------------- -// SPARQL -// ---------------------------------------------------------------------------------- - -// Attribute lists for describing Resources. ['resource type'] = array(att1, att2, att3, ...). -// - -$sparql_describe = array( - FOAF_NS.'person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox') -); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/all-wcprops deleted file mode 100755 index 5912e8c1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 61 -/svnroot/rdfapi-php/!svn/ver/486/trunk/rdfapi-php/api/dataset -END -Quad.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/dataset/Quad.php -END -DatasetDb.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/486/trunk/rdfapi-php/api/dataset/DatasetDb.php -END -NamedGraphDb.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/dataset/NamedGraphDb.php -END -IteratorAllGraphsDb.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/dataset/IteratorAllGraphsDb.php -END -IteratorFindQuadsDb.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/dataset/IteratorFindQuadsDb.php -END -DatasetMem.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/432/trunk/rdfapi-php/api/dataset/DatasetMem.php -END -Dataset.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/344/trunk/rdfapi-php/api/dataset/Dataset.php -END -DatasetP.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/340/trunk/rdfapi-php/api/dataset/DatasetP.php -END -NamedGraphMem.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/425/trunk/rdfapi-php/api/dataset/NamedGraphMem.php -END -IteratorAllGraphsMem.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/dataset/IteratorAllGraphsMem.php -END -IteratorFindQuadsMem.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/432/trunk/rdfapi-php/api/dataset/IteratorFindQuadsMem.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/entries deleted file mode 100755 index 928f6968..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/entries +++ /dev/null @@ -1,171 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/dataset -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-08-12T11:59:54.054541Z -486 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Quad.php -file - - - - -2008-02-29T14:57:47.506256Z -82f6dad7f83ff7bd38e727dc9fa21e40 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -DatasetDb.php -file - - - - -2008-02-29T14:57:47.521877Z -b8eb44f5819b99805c42748686f4577d -2007-08-12T11:59:54.054541Z -486 -cweiske -has-props - -NamedGraphDb.php -file - - - - -2008-02-29T14:57:47.521877Z -56e8ddd0d8aa0251664cda4114355b8c -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -IteratorAllGraphsDb.php -file - - - - -2008-02-29T14:57:47.537498Z -59240fdfee65743297fc65a81f1f6f5a -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -IteratorFindQuadsDb.php -file - - - - -2008-02-29T14:57:47.537498Z -ad64d93ddc73d832608fcbd14dd35e21 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -DatasetMem.php -file - - - - -2008-02-29T14:57:47.553118Z -d396a0892728aa6223f01b1aecc96133 -2007-05-01T15:58:57.000000Z -432 -cweiske -has-props - -Dataset.php -file - - - - -2008-02-29T14:57:47.553118Z -bf5304281853bf6676c4b6dc082700fe -2007-02-07T08:24:32.000000Z -344 -cweiske -has-props - -DatasetP.php -file - - - - -2008-02-29T14:57:47.568739Z -ca230297a71d4eaa77755fdacbee0704 -2007-01-23T12:20:51.000000Z -340 -cweiske -has-props - -NamedGraphMem.php -file - - - - -2008-02-29T14:57:47.568739Z -c74e213a48c35e2a8d3301edd5ad8ded -2007-05-01T12:59:18.000000Z -425 -cweiske -has-props - -IteratorAllGraphsMem.php -file - - - - -2008-02-29T14:57:47.584359Z -f8e8a5f81b38bc833b72c24e7f23237a -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -IteratorFindQuadsMem.php -file - - - - -2008-02-29T14:57:47.584359Z -705c6e4de4b5bc4c05baffb10a77e02e -2007-05-01T15:58:57.000000Z -432 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Dataset.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Dataset.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Dataset.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetDb.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetDb.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetMem.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetMem.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetP.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/DatasetP.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsDb.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsDb.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsMem.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorAllGraphsMem.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsDb.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsDb.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsMem.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/IteratorFindQuadsMem.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphDb.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphDb.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphMem.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/NamedGraphMem.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Quad.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Quad.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/prop-base/Quad.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Dataset.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Dataset.php.svn-base deleted file mode 100755 index 15daff1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Dataset.php.svn-base +++ /dev/null @@ -1,89 +0,0 @@ - -* -* @package dataset -* @access public -**/ - -class Dataset -{ - /** - * Load a Dataset from a File - * - * @param string - * @access public - */ - function loadFromFile($file) - { - $parser= new TriXParser($this); - $parser->parseFile($file); - } - - /** - * Load a Datset from a string - * - * @param string - * @access public - */ - function loadFromString($string) - { - $parser= new TriXParser($this); - $parser->parseString($string); - } - - /** - * Serialize the Dataset to File - * - * @param string - * @access public - */ - function serializeToFile($fileName) - { - $serializer= new TriXSerializer($this); - $serializer->serializeToFile($fileName); - } - - /** - * Serialize the Dataset to string - * - * @return string - * @access public - */ - function serializeToString() - { - $serializer= new TriXSerializer($this); - return $serializer->serializeToString(); - } - - /** - * Performs a SPARQL query against an RDF Dataset. - * The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param String $query the sparql query string - * @param String $resultform the result form ('xml' for SPARQL Query Results XML Format) - * @return String/array - */ - function sparqlQuery($query,$resultform = false){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SPARQL); - $parser = new SparqlParser(); - $q = $parser->parse($query); - - $eng = SparqlEngine::factory(); - return $eng->queryModel($this,$q,$resultform); - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetDb.php.svn-base deleted file mode 100755 index 3091f8f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetDb.php.svn-base +++ /dev/null @@ -1,451 +0,0 @@ - -* -* @package dataset -* @access public -**/ -require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE); - -class DatasetDb extends Dataset -{ - - /** - * Reference to databse connection. - * - * @var resource dbConnection - * @access private - */ - var $dbConnection; - - /** - * Reference to the dbStore Object. - * - * @var $dbStore dbStore - * @access private - */ - var $dbStore; - - - /** - * Name of the Dataset - * - * @var string - * @access private - */ - var $setName; - - - /** - * Constructor - * You can supply a Dataset name. - * - * @param ADODBConnection - * @param DbStore - * @param string - * @access public - */ - function DatasetDb(&$dbConnection,&$dbStore,$datasetName) - { - $this->dbConnection=& $dbConnection; - $this->dbStore=&$dbStore; - $this->setName= $datasetName; - $this->_initialize(); - } - - /** - * Initialize - * Read all needed data into the set. - * - * - * @access private - */ - function _initialize() - { - $recordSet =& $this->dbConnection->execute("SELECT defaultModelUri - FROM datasets where datasetName='".$this->setName."'"); - - $this->defaultGraph=& $this->dbStore->getModel($recordSet->fields[0]); - } - - - -// === Graph level methods ======================== - - /** - * Sets the Dataset name. Return true on success, false otherwise. - * - * @param string - * @access public - */ - function setDatasetName($datasetName) - { - if ($this->dbStore->datasetExists($datasetName)) - return false; - - $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."' - where datasetName='".$this->setName."'"); - - $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."' - where datasetName='".$this->setName."'"); - $this->setName=$datasetName; - return true; - } - - /** - * Returns the Datasets name. - * - * @return string - * @access public - */ - function getDatasetName() - { - return $this->setName; - } - - /** - * Adds a NamedGraph to the set. - * - * @param NamedGraphDb - */ - function addNamedGraph(&$graph) - { - $graphNameURI=$graph->getGraphName(); - $this->removeNamedGraph($graphNameURI); - $this->dbConnection->execute('INSERT INTO dataset_model VALUES(' - . $this->dbConnection->qstr($this->setName) . ',' - . $this->dbConnection->qstr($graph->modelID) . ',' - . $this->dbConnection->qstr($graphNameURI) .')'); - } - - - /** - * Overwrites the existting default graph. - * - * @param DbModel - */ - function setDefaultGraph(&$graph) - { - $this->dbConnection->execute('UPDATE datasets SET defaultModelUri =' - . $this->dbConnection->qstr($graph->modelURI) . ' WHERE datasetName =' - . $this->dbConnection->qstr($this->setName)); - } - - /** - * Returns a reference to the defaultGraph. - * - * @return NamedGraphDb - */ - function & getDefaultGraph() - { - $defaultGraphURI = $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'"); - return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName)); - } - - /** - * Returns true, if a defaultGraph exists. False otherwise. - * - * @return boolean - */ - function hasDefaultGraph() - { - return true; - } - - /** - * Removes a NamedGraph from the set. Nothing happens - * if no graph with that name is contained in the set. - * - * @param string - */ - function removeNamedGraph($graphName) - { - $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="' - . $this->dbConnection->qstr($this->setName) . '" AND graphURI ="' - . $this->dbConnection->qstr($graphName) . '"'); - } - - /** - * Tells wether the Dataset contains a NamedGraph. - * - * @param string - * @return boolean - */ - function containsNamedGraph($graphName) - { - $count= $this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'" AND graphURI ="'.$graphName.'"'); - return ($count>0); - } - - /** - * Returns the NamedGraph with a specific name from the Dataset. - * Changes to the graph will be reflected in the set. - * - * @param string - * @return NamedGraphDb or null - */ - function &getNamedGraph($graphName) - { - if(!$this->containsNamedGraph($graphName)) - return null; - - $modelVars =& $this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI - FROM models, dataset_model - WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID"); - - return new NamedGraphDb($this->dbConnection, $modelVars->fields[0], - $modelVars->fields[1], $graphName ,$modelVars->fields[2]); - } - - /** - * Returns the names of the namedGraphs in this set as strings in an array. - * - * @return Array - */ - function listGraphNames() - { - $recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'"); - - $return=array(); - while (!$recordSet->EOF) - { - $return[] = $recordSet->fields[0]; - $recordSet->moveNext(); - } - return $return; - } - - /** - * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database. - * - * @param string - * @param string - * @return NamedGraphDb - */ - function &createGraph($graphName,$baseURI = null) - { - $graph =& $this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI); - $this->addNamedGraph($graph); - - return $graph; - } - - /** - * Deletes all NamedGraphs from the set. - */ - function clear() - { - $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'"); - } - - /** - * Returns the number of NamedGraphs in the set. Empty graphs are counted. - * - * @return int - */ - function countGraphs() - { - return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'")); - } - - /** - * Returns an iterator over all {@link NamedGraph}s in the set. - * - * @return IteratorAllGraphsDb - */ - function &listNamedGraphs() - { - $recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'"); - $it = new IteratorAllGraphsDb($recordSet, $this); - return $it; - } - - /** - * Tells wether the set contains any NamedGraphs. - * - * @return boolean - */ - function isEmpty() - { - return ($this->countGraphs()==0); - } - - /** - * Add all named graphs of the other dataset to this dataset. - * - * @param Dataset - */ - function addAll($otherDataset) - { - for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next()) - { - $this->addNamedGraph($iterator->current()); - }; - - if ($otherDataset->hasDefaultGraph()) - { - $this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph()); - } - } - -// === Quad level methods ======================== - - /** - * Adds a quad to the Dataset. The argument must not contain any - * wildcards. If the quad is already present, nothing happens. A new - * named graph will automatically be created if necessary. - * - * @param Quad - */ - function addQuad(&$quad) - { - $graphName=$quad->getGraphName(); - $graphName=$graphName->getLabel(); - - $graph=& $this->getNamedGraph($graphName); - - if ($graph===null) - $graph=& $this->createGraph($graphName); - - $statement=$quad->getStatement(); - $graph->add($statement); - } - - /** - * Tells wether the Dataset contains a quad or - * quads matching a pattern. - * - * @param Resource - * @param Resource - * @param Resource - * @param Resource - * @return boolean - */ - function containsQuad($graphName,$subject,$predicate,$object) - { - // static part of the sql statement - $sql = "SELECT count(*) - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - if($graphName!=null) - { - $sql.= " AND graphURI ='".$graphName->getLabel()."'"; - } - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - return (($this->dbConnection->GetOne($sql))>0); - } - - /** - * Deletes a Quad from the RDF dataset. - * - * @param Quad - */ - function removeQuad($quad) - { - $graphName=$quad->getGraphName();$graphName=$graphName->getLabel(); - //find namedGraph IDs - $graphID = $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'"); - - // static part of the sql statement - $sql = "DELETE FROM statements WHERE modelID = $graphID"; - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject(), $quad->getPredicate(), $quad->getObject()); - - // execute the query - if($graphID) - $recordSet =& $this->dbConnection->execute($sql); - } - - /** - * Counts the Quads in the RDF dataset. Identical Triples in - * different NamedGraphs are counted individually. - * - * @return int - */ - function countQuads() - { - $sql = "SELECT count(*) - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - return ((int)$this->dbConnection->GetOne($sql)); - } - - /** - * Finds Statements that match a quad pattern. The argument may contain - * wildcards. - * - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @return IteratorFindQuadsDb - */ - function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false ) - { - // static part of the sql statement - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - if($graphName!=null) - { - $sql.= " AND graphURI ='".$graphName->getLabel()."'"; - } - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConnection->execute($sql); - - - $it = new IteratorFindQuadsDb($recordSet, $this, $returnAsTriples); - return $it; - } - - /** - * Finds Statements that match a pattern in the default Graph. The argument may contain - * wildcards. - * - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @return IteratorFindQuadsDb - */ - function &findInDefaultGraph($subject,$predicate,$object) - { - $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI"); - // static part of the sql statement - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID ='$defaultGraphID'"; - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConnection->execute($sql); - - $it = new IteratorFindQuadsDb($recordSet, $this, true); - return $it; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetMem.php.svn-base deleted file mode 100755 index 5ecf8699..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetMem.php.svn-base +++ /dev/null @@ -1,394 +0,0 @@ - -* -* @package dataset -* @access public -**/ - -class DatasetMem extends Dataset -{ - - /** - * Reference to a Memmodel that holds the default graph. - * - * @var resource Memmodel - * @access private - */ - var $defaultGraph; - - - /** - * Name of the DatasetMem. - * - * @var string - * @access private - */ - var $setName; - - /** - * List of all NamedGraphs. - * - * @var array - * @access private - */ - var $graphs=array(); - - /** - * Constructor. - * You can supply a Dataset name. - * - * @param string - * @access public - */ - function DatasetMem($datasetName = null) - { - $this->setDatasetName($datasetName); - $this->defaultGraph=new MemModel(); - } - -// === Graph level methods ======================== - - /** - * Sets the Datasets name. - * - * @param string - * @access public - */ - function setDatasetName($datasetName) - { - $this->setName=$datasetName; - } - - /** - * Returns the Datasets name. - * - * @return string - * @access public - */ - function getDatasetName() - { - return $this->setName; - } - - /** - * Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set. - * - * @param NamedGraphMem - */ - function addNamedGraph(&$graph) - { - $graphNameURI=$graph->getGraphName(); - $this->graphs[$graphNameURI]=&$graph; - } - - /** - * Overwrites the existting default graph. - * - * @param MemModel - */ - function setDefaultGraph(&$graph) - { - $this->defaultGraph=&$graph; - } - - /** - * Returns a reference to the defaultGraph - * @return Model - */ - function &getDefaultGraph() - { - return $this->defaultGraph; - } - - /** - * Returns true, if an defaultGraph exists. False otherwise . - * - * @return boolean - */ - function hasDefaultGraph() - { - return $this->defaultGraph != null; - } - - /** - * Removes a NamedGraph from the set. Nothing happens - * if no graph with that name is contained in the set. - * - * @param string - */ - function removeNamedGraph($graphName) - { - unset($this->graphs[$graphName]); - } - - /** - * Tells wether the Dataset contains a NamedGraph. - * - * @param string - * @return boolean - */ - function containsNamedGraph($graphName) - { - return isset($this->graphs[$graphName]) === true; - } - - /** - * Returns the NamedGraph with a specific name from the Dataset. - * Changes to the graph will be reflected in the set. - * - * @param string - * @return NamedGraphMem or NULL - */ - function &getNamedGraph($graphName) - { - if (!isset($this->graphs[$graphName])) return NULL; - return $this->graphs[$graphName]; - } - - /** - * Returns the names of the namedGraphs in this set as strings in an array. - * - * @return Array - */ - function listGraphNames() - { - return array_keys($this->graphs); - } - - /** - * Creates a new NamedGraph and adds it to the set. An existing - * graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI - * - * @param string - * @param string - * @return NamedGraphMem - */ - function &createGraph($graphName,$baseURI = null) - { - $this->graphs[$graphName]=new NamedGraphMem($graphName,$baseURI); - return $this->getNamedGraph($graphName); - } - - /** - * Deletes all NamedGraphs from the set. - */ - function clear() - { - $this->graphs = array(); - } - - /** - * Returns the number of NamedGraphs in the set. Empty graphs - * are counted. - * - * @return int - */ - function countGraphs() - { - return count($this->graphs); - } - - /** - * Returns the NamedGraph with a specific offset in the dataset. - * Changes to the graph will be reflected in the set. - * - * @param int - * @return NamedGraphMem or null - * @access private - */ - function &getGraphWithOffset($offset) - { - $i=0; - foreach ($this->graphs as $graph) - { - if (($i++)==$offset) - return $graph; - } - $n = null; - return $n; - } - - /** - * Returns an iterator over all {@link NamedGraph}s in the set. - * - * @return IteratorAllGraphsMem - */ - function &listNamedGraphs() - { - require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php'; - $m = new IteratorAllGraphsMem($this); - return $m; - } - - /** - * Tells wether the set contains any NamedGraphs. - * - * @return boolean - */ - function isEmpty() - { - return $this->countGraphs() == 0; - } - - /** - * Adds all named graphs of the other dataset to this dataset. - * - * @param Dataset - */ - function addAll($otherDataset) - { - for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next()) - { - $current=$iterator->current(); - $this->graphs[$current->getGraphName()]=$current; - } - - if ($otherDataset->hasDefaultGraph()) - { - $this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph()); - } - } - -// === Quad level methods ======================== - - /** - * Adds a quad to the Dataset. The argument must not contain any - * wildcards. If the quad is already present, nothing happens. A new - * named graph will automatically be created if necessary. - * - * @param Quad - */ - function addQuad(&$quad) - { - $graphName=$quad->getGraphName(); - if ($this->containsNamedGraph($graphName->getLabel())===false) - $this->createGraph($graphName->getLabel()); - - $this->graphs[$graphName->getLabel()]->add($quad->getStatement()); - } - - - /** - * Tells wether the Dataset contains a quad or - * quads matching a pattern. - * - * @param Resource $graphName - * @param Resource $subject - * @param Resource $predicate - * @param Resource $object - * @return boolean - */ - function containsQuad($graphName,$subject,$predicate,$object) - { - if($graphName!=null) - { - if ($this->containsNamedGraph($graphName->getLabel())!==true) - return false; - - return ($this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject,$predicate,$object)!=null); - } - - foreach ($this->graphs as $graph) - { - if ($graph->findFirstMatchingStatement($subject,$predicate,$object)!=null) - return true; - }; - - return false; - } - - /** - * Deletes a Quad from the RDF dataset. - * - * @param Quad - */ - function removeQuad($quad) - { - $graphName=$quad->getGraphName(); - - if($graphName!=null) - { - if ($this->containsNamedGraph($graphName->getLabel())!==true) - return; - - return ($this->graphs[$graphName->getLabel()]->remove($quad->getStatement())!=null); - - } - foreach ($this->graphs as $graph) - { - $graph->remove($quad->getStatement()); - }; - } - - /** - * Counts the Quads in the RDF dataset. Identical Triples in - * different NamedGraphs are counted individually. - * - * @return int - */ - function countQuads() - { - $count=0; - foreach ($this->graphs as $graph) - { - $count+=$graph->size(); - } - return $count; - } - - /** - * Finds Statements that match a quad pattern. The argument may contain - * wildcards. - * - * @param Resource or Null - * @param Resourceor Null - * @param Resource or Null - * @param Resource or Null - * @return Iterator - */ - function &findInNamedGraphs($graph,$subject,$predicate,$object,$returnAsTriples = false) - { - - if ($graph!=null) - { - $findGraph=&$this->getNamedGraph($graph->getLabel()); - if($findGraph==null) - $findGraph=new MemModel(); - - return $findGraph->iterFind($subject,$predicate,$object); - } - - - require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php'; - $m = new IteratorFindQuadsMem($subject,$predicate,$object,$this->listNamedGraphs(),$returnAsTriples); - return $m; - } - - /** - * Finds Statements that match a pattern in the default Graph. The argument may contain - * wildcards. - * - * @param Resource or Null - * @param Resource or Null - * @param Resource or Null - * @return Iterator - */ - function &findInDefaultGraph($subject,$predicate,$object) - { - return $this->defaultGraph->iterFind($subject,$predicate,$object); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetP.php.svn-base deleted file mode 100755 index 8ac9763b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/DatasetP.php.svn-base +++ /dev/null @@ -1,25 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include ResModel classes -require_once( RDFAPI_INCLUDE_DIR . 'dataset/Dataset.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/Quad.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXParser.php'); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXSerializer.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsDb.php.svn-base deleted file mode 100755 index e0a5f3b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsDb.php.svn-base +++ /dev/null @@ -1,127 +0,0 @@ -listGraphs(); $iterator->valid(); $iterator->next()) -* { -* $currentResource=$iterator->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal -* -* -* @package dataset -* @access public -**/ -class IteratorAllGraphsDb -{ - /** - * Holds a reference to the associated DB resultSet - * @var $dbResultSets ADODB result - * @access private - */ - var $dbResultSet; - - /** - * Holds a reference to the associated datasetDb - * @var datasetDb - * @access private - */ - var $datasetDb; - - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - - /** - * The current NamedGraph - * @var obejct NamedGraph - * @access private - */ - var $current; - - - - /** - * Constructor. - * - * - * @param ADODBResultSet - * @param DatasetDb - * @access public - */ - function IteratorAllGraphsDb(&$dbResultSet,&$datasetDb) - { - $this->dbResultSet=& $dbResultSet; - $this->datasetDb=& $datasetDb; - $this->current = $this->dbResultSet->fields[0]; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - //not supported - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return (!$this->dbResultSet->EOF); - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->dbResultSet->moveNext(); - $this->current = $this->dbResultSet->fields[0]; - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function ¤t() - { - return ($this->datasetDb->getNamedGraph($this->current)); - } - - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->dbResultSet->_currentRow; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsMem.php.svn-base deleted file mode 100755 index 06002ee1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorAllGraphsMem.php.svn-base +++ /dev/null @@ -1,125 +0,0 @@ -listGraphs(); $iterator->valid(); $iterator->next()) -* { -* $currentResource=$it->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal -* -* -* @package dataset -* @access public -**/ -class IteratorAllGraphsMem -{ - /** - * Holds a reference to the associated RDF dataset - * - * @var object dataset - * @access private - */ - var $associatedGraphSet; - - /** - * The current position - * - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid - * - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph - * - * @var obejct NamedGraph - * @access private - */ - var $current; - - - /** - * Constructor. - * - * @param dataset - * @access public - */ - function IteratorAllGraphsMem(&$namedGraphSet) - { - $this->associatedGraphSet=&$namedGraphSet; - $this->rewind(); - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - $this->current = &$this->associatedGraphSet->getGraphWithOffset(++$this->key); - $this->valid=($this->current!=NULL); - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function ¤t() - { - return $this->current; - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsDb.php.svn-base deleted file mode 100755 index 957851db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsDb.php.svn-base +++ /dev/null @@ -1,145 +0,0 @@ -findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $currentQuad=$iterator->current(); -* }; -* -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* -* @package dataset -* @access public -**/ -class IteratorFindQuadsDb -{ - /** - * Holds a reference to the associated DB resultSet. - * - * @var $dbResultSets ADODB result - * @access private - */ - var $dbResultSet; - - /** - * Holds a reference to the associated datasetDb. - * - * @var $datasetDb datasetDb - * @access private - */ - var $datasetDb; - - /** - * boolean value, if the results should be returned as triples. - * - * @var boolean - * @access private - */ - var $returnAsTriples; - - /** - * Constructor. - * - * @param dataset - * @access public - */ - function IteratorFindQuadsDb(&$dbResultSet,&$datasetDb,$returnAsTriples=false) - { - $this->dbResultSet=& $dbResultSet; - $this->datasetDb=& $datasetDb; - $this->returnAsTriples=$returnAsTriples; - } - - /** - * Resets iterator list to start. - * - * @access public - */ - function rewind() - { - //not supported - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - if (($this->dbResultSet ===false) OR ($this->dbResultSet->EOF) ) - return false; - - return true; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - if ($this->dbResultSet!==false) - $this->dbResultSet->moveNext(); - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function ¤t() - { - if ($this->dbResultSet===false) - return null; - // subject - if ($this->dbResultSet->fields[5] == 'r') - $sub = new Resource($this->dbResultSet->fields[0]); - else - $sub = new BlankNode($this->dbResultSet->fields[0]); - - // predicate - $pred = new Resource($this->dbResultSet->fields[1]); - - // object - if ($this->dbResultSet->fields[6] == 'r') - $obj = new Resource($this->dbResultSet->fields[2]); - elseif ($this->dbResultSet->fields[6] == 'b') - $obj = new BlankNode($this->dbResultSet->fields[2]); - else { - $obj = new Literal($this->dbResultSet->fields[2], $this->dbResultSet->fields[3]); - if ($this->dbResultSet->fields[4]) - $obj->setDatatype($this->dbResultSet->fields[4]); - } - - if($this->returnAsTriples) - return (new Statement($sub, $pred, $obj)); - - return (new Quad(new Resource($this->dbResultSet->fields[7]),$sub,$pred,$obj)); - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->dbResultSet->_currentRow; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsMem.php.svn-base deleted file mode 100755 index 33c29302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/IteratorFindQuadsMem.php.svn-base +++ /dev/null @@ -1,217 +0,0 @@ -findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $currentQuad=$it->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal (http://d-westphal.de) -* -* -* @package dataset -* @access public -**/ -class IteratorFindQuadsMem -{ - /** - * key value in the current graph. - * - * @var dataset - * @access private - */ - var $graphKey; - - /** - * boolean value, if the results should be returned as triples. - * - * @var boolean - * @access private - */ - var $returnAsTriples; - - /** - * The current position. - * - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid. - * - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph. - * - * @var NamedGraph - * @access private - */ - var $current; - - /** - * The graphName Resource to search for. - * - * @var string - * @access private - */ - var $findGraphName; - - /** - * The subject Resource to search for. - * - * @var string - * @access private - */ - var $findSubject; - - /** - * The predicate Resource to search for. - * - * @var string - * @access private - */ - var $findPredicate; - - /** - * The object Resource to search for. - * - * @var string - * @access private - */ - var $findObject; - - /** - * Iterator over all graphs of the RDF dataset. - * - * @var string - * @access private - */ - var $graphIterator; - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like find(). - * $getSPO supports the strings 's', 'p', and 'o' to return - * either the subject, predicate, or object of the result statements. - * - * - * @param Resource - * @param Resource - * @param Resource - * @param dataset - * @param Boolean - * @access public - */ - function IteratorFindQuadsMem($subject,$predicate,$object,&$graphIterator, $returnAsTriples=false) - { - $this->findSubject=$subject; - $this->findPredicate=$predicate; - $this->findObject=$object; - $this->graphIterator=&$graphIterator; - $this->rewind(); - $this->returnAsTriples=$returnAsTriples; - } - - /** - * Resets iterator list to start. - * - * @access public - */ - function rewind() - { - $this->graphIterator->rewind(); - $this->key = -1; - $this->graphKey=-1; - $this->next(); - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - if($this->graphIterator->valid()===false) - { - $this->valid=false; - return; - } - - $currentGraph=&$this->graphIterator->current(); - $this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey); - if($this->current==null) - { - do - { - $this->graphIterator->next(); - if($this->graphIterator->valid()===false) - { - $this->valid=false; - return; - } - $currentGraph=&$this->graphIterator->current(); - $this->graphKey=-1; - $this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey); - - } while ($this->current==null); - } - $this->key++; - $this->valid=true; - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function current() - { - if($this->returnAsTriples) return $this->current; - - $currentGraph=&$this->graphIterator->current(); - return new Quad(new Resource($currentGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject()); - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphDb.php.svn-base deleted file mode 100755 index 5574970a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphDb.php.svn-base +++ /dev/null @@ -1,70 +0,0 @@ -dbConn =& $dbConnection; - $this->modelURI = $modelURI; - $this->modelID = $modelID; - $this->baseURI = $this->_checkBaseURI($baseURI); - $this->graphName = $graphName; - } - - /** - * Sets the graph name. - * - * @param string - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return string - * @access public - */ - function getGraphName() - { - return $this->graphName; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphMem.php.svn-base deleted file mode 100755 index 7dccd9f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/NamedGraphMem.php.svn-base +++ /dev/null @@ -1,66 +0,0 @@ - -* -* @package dataset -* @access public -**/ -class NamedGraphMem extends MemModel -{ - - /** - * Name of the NamedGraphMem. - * - * @var string - * @access private - */ - var $graphName; - - - /** - * Constructor - * You have to supply a graph name. You can supply a URI. - * - * @param string - * @param string - * @access public - */ - function NamedGraphMem($graphName,$baseURI = null) - { - $this->setBaseURI($baseURI); - $this->indexed = INDEX_TYPE; - $this->setGraphName($graphName); - } - - /** - * Sets the graph name. - * - * @param string - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return string - * @access public - */ - function getGraphName() - { - return $this->graphName; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Quad.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Quad.php.svn-base deleted file mode 100755 index fa4e8bca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/.svn/text-base/Quad.php.svn-base +++ /dev/null @@ -1,147 +0,0 @@ -statement=new Statement($subject,$predicate,$object); - $this->graphName=$graphName; - } - - /** - * Sets the graph name. - * - * @param Resource - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return Resource - * @access public - */ - function getGraphName() - { - return $this->graphName; - } - - /** - * Return a human-readable (sort of) string "graphname { s p o . }" - * describing the quad. - * - * @return string - */ - function toString() - { - return 'GraphName('.$this->graphName->getLabel().') '.$this->statement->toString(); - } - - /** - * Returns the subject. - * - * @return Resource - * @access public - */ - function getSubject() - { - return $this->statement->getSubject(); - } - - /** - * Returns the predicate. - * - * @return Resource - * @access public - */ - function getPredicate() - { - return $this->statement->getPredicate(); - } - - /** - * Returns the object. - * - * @return Resource - * @access public - */ - function getObject() - { - return $this->statement->getObject(); - } - - /** - * Returns the statement(subject,predicate,object). - * - * @return statement - * @access public - */ - function getStatement() - { - return $this->statement; - } - - /** - * Checks if two quads are equal. - * - * @param Quad - * @return boolean - * @access public - */ - function equals($quad) - { - return ($this->graphName->equals($quad->getGraphName()) && $this->statement->equals($quad->getStatement())); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Dataset.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Dataset.php deleted file mode 100755 index 4fc56a6e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Dataset.php +++ /dev/null @@ -1,89 +0,0 @@ - -* -* @package dataset -* @access public -**/ - -class Dataset -{ - /** - * Load a Dataset from a File - * - * @param string - * @access public - */ - function loadFromFile($file) - { - $parser= new TriXParser($this); - $parser->parseFile($file); - } - - /** - * Load a Datset from a string - * - * @param string - * @access public - */ - function loadFromString($string) - { - $parser= new TriXParser($this); - $parser->parseString($string); - } - - /** - * Serialize the Dataset to File - * - * @param string - * @access public - */ - function serializeToFile($fileName) - { - $serializer= new TriXSerializer($this); - $serializer->serializeToFile($fileName); - } - - /** - * Serialize the Dataset to string - * - * @return string - * @access public - */ - function serializeToString() - { - $serializer= new TriXSerializer($this); - return $serializer->serializeToString(); - } - - /** - * Performs a SPARQL query against an RDF Dataset. - * The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param String $query the sparql query string - * @param String $resultform the result form ('xml' for SPARQL Query Results XML Format) - * @return String/array - */ - function sparqlQuery($query,$resultform = false){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SPARQL); - $parser = new SparqlParser(); - $q = $parser->parse($query); - - $eng = SparqlEngine::factory(); - return $eng->queryModel($this,$q,$resultform); - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetDb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetDb.php deleted file mode 100755 index cb480a7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetDb.php +++ /dev/null @@ -1,451 +0,0 @@ - -* -* @package dataset -* @access public -**/ -require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE); - -class DatasetDb extends Dataset -{ - - /** - * Reference to databse connection. - * - * @var resource dbConnection - * @access private - */ - var $dbConnection; - - /** - * Reference to the dbStore Object. - * - * @var $dbStore dbStore - * @access private - */ - var $dbStore; - - - /** - * Name of the Dataset - * - * @var string - * @access private - */ - var $setName; - - - /** - * Constructor - * You can supply a Dataset name. - * - * @param ADODBConnection - * @param DbStore - * @param string - * @access public - */ - function DatasetDb(&$dbConnection,&$dbStore,$datasetName) - { - $this->dbConnection=& $dbConnection; - $this->dbStore=&$dbStore; - $this->setName= $datasetName; - $this->_initialize(); - } - - /** - * Initialize - * Read all needed data into the set. - * - * - * @access private - */ - function _initialize() - { - $recordSet =& $this->dbConnection->execute("SELECT defaultModelUri - FROM datasets where datasetName='".$this->setName."'"); - - $this->defaultGraph=& $this->dbStore->getModel($recordSet->fields[0]); - } - - - -// === Graph level methods ======================== - - /** - * Sets the Dataset name. Return true on success, false otherwise. - * - * @param string - * @access public - */ - function setDatasetName($datasetName) - { - if ($this->dbStore->datasetExists($datasetName)) - return false; - - $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."' - where datasetName='".$this->setName."'"); - - $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."' - where datasetName='".$this->setName."'"); - $this->setName=$datasetName; - return true; - } - - /** - * Returns the Datasets name. - * - * @return string - * @access public - */ - function getDatasetName() - { - return $this->setName; - } - - /** - * Adds a NamedGraph to the set. - * - * @param NamedGraphDb - */ - function addNamedGraph(&$graph) - { - $graphNameURI=$graph->getGraphName(); - $this->removeNamedGraph($graphNameURI); - $this->dbConnection->execute('INSERT INTO dataset_model VALUES(' - . $this->dbConnection->qstr($this->setName) . ',' - . $this->dbConnection->qstr($graph->modelID) . ',' - . $this->dbConnection->qstr($graphNameURI) .')'); - } - - - /** - * Overwrites the existting default graph. - * - * @param DbModel - */ - function setDefaultGraph(&$graph) - { - $this->dbConnection->execute('UPDATE datasets SET defaultModelUri =' - . $this->dbConnection->qstr($graph->modelURI) . ' WHERE datasetName =' - . $this->dbConnection->qstr($this->setName)); - } - - /** - * Returns a reference to the defaultGraph. - * - * @return NamedGraphDb - */ - function & getDefaultGraph() - { - $defaultGraphURI = $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'"); - return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName)); - } - - /** - * Returns true, if a defaultGraph exists. False otherwise. - * - * @return boolean - */ - function hasDefaultGraph() - { - return true; - } - - /** - * Removes a NamedGraph from the set. Nothing happens - * if no graph with that name is contained in the set. - * - * @param string - */ - function removeNamedGraph($graphName) - { - $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="' - . $this->dbConnection->qstr($this->setName) . '" AND graphURI ="' - . $this->dbConnection->qstr($graphName) . '"'); - } - - /** - * Tells wether the Dataset contains a NamedGraph. - * - * @param string - * @return boolean - */ - function containsNamedGraph($graphName) - { - $count= $this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'" AND graphURI ="'.$graphName.'"'); - return ($count>0); - } - - /** - * Returns the NamedGraph with a specific name from the Dataset. - * Changes to the graph will be reflected in the set. - * - * @param string - * @return NamedGraphDb or null - */ - function &getNamedGraph($graphName) - { - if(!$this->containsNamedGraph($graphName)) - return null; - - $modelVars =& $this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI - FROM models, dataset_model - WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID"); - - return new NamedGraphDb($this->dbConnection, $modelVars->fields[0], - $modelVars->fields[1], $graphName ,$modelVars->fields[2]); - } - - /** - * Returns the names of the namedGraphs in this set as strings in an array. - * - * @return Array - */ - function listGraphNames() - { - $recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'"); - - $return=array(); - while (!$recordSet->EOF) - { - $return[] = $recordSet->fields[0]; - $recordSet->moveNext(); - } - return $return; - } - - /** - * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database. - * - * @param string - * @param string - * @return NamedGraphDb - */ - function &createGraph($graphName,$baseURI = null) - { - $graph =& $this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI); - $this->addNamedGraph($graph); - - return $graph; - } - - /** - * Deletes all NamedGraphs from the set. - */ - function clear() - { - $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'"); - } - - /** - * Returns the number of NamedGraphs in the set. Empty graphs are counted. - * - * @return int - */ - function countGraphs() - { - return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'")); - } - - /** - * Returns an iterator over all {@link NamedGraph}s in the set. - * - * @return IteratorAllGraphsDb - */ - function &listNamedGraphs() - { - $recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'"); - $it = new IteratorAllGraphsDb($recordSet, $this); - return $it; - } - - /** - * Tells wether the set contains any NamedGraphs. - * - * @return boolean - */ - function isEmpty() - { - return ($this->countGraphs()==0); - } - - /** - * Add all named graphs of the other dataset to this dataset. - * - * @param Dataset - */ - function addAll($otherDataset) - { - for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next()) - { - $this->addNamedGraph($iterator->current()); - }; - - if ($otherDataset->hasDefaultGraph()) - { - $this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph()); - } - } - -// === Quad level methods ======================== - - /** - * Adds a quad to the Dataset. The argument must not contain any - * wildcards. If the quad is already present, nothing happens. A new - * named graph will automatically be created if necessary. - * - * @param Quad - */ - function addQuad(&$quad) - { - $graphName=$quad->getGraphName(); - $graphName=$graphName->getLabel(); - - $graph=& $this->getNamedGraph($graphName); - - if ($graph===null) - $graph=& $this->createGraph($graphName); - - $statement=$quad->getStatement(); - $graph->add($statement); - } - - /** - * Tells wether the Dataset contains a quad or - * quads matching a pattern. - * - * @param Resource - * @param Resource - * @param Resource - * @param Resource - * @return boolean - */ - function containsQuad($graphName,$subject,$predicate,$object) - { - // static part of the sql statement - $sql = "SELECT count(*) - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - if($graphName!=null) - { - $sql.= " AND graphURI ='".$graphName->getLabel()."'"; - } - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - return (($this->dbConnection->GetOne($sql))>0); - } - - /** - * Deletes a Quad from the RDF dataset. - * - * @param Quad - */ - function removeQuad($quad) - { - $graphName=$quad->getGraphName();$graphName=$graphName->getLabel(); - //find namedGraph IDs - $graphID = $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'"); - - // static part of the sql statement - $sql = "DELETE FROM statements WHERE modelID = $graphID"; - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject(), $quad->getPredicate(), $quad->getObject()); - - // execute the query - if($graphID) - $recordSet =& $this->dbConnection->execute($sql); - } - - /** - * Counts the Quads in the RDF dataset. Identical Triples in - * different NamedGraphs are counted individually. - * - * @return int - */ - function countQuads() - { - $sql = "SELECT count(*) - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - return ((int)$this->dbConnection->GetOne($sql)); - } - - /** - * Finds Statements that match a quad pattern. The argument may contain - * wildcards. - * - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @return IteratorFindQuadsDb - */ - function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false ) - { - // static part of the sql statement - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI - FROM statements, dataset_model - WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId "; - - if($graphName!=null) - { - $sql.= " AND graphURI ='".$graphName->getLabel()."'"; - } - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConnection->execute($sql); - - - $it = new IteratorFindQuadsDb($recordSet, $this, $returnAsTriples); - return $it; - } - - /** - * Finds Statements that match a pattern in the default Graph. The argument may contain - * wildcards. - * - * @param Resource or null - * @param Resource or null - * @param Resource or null - * @return IteratorFindQuadsDb - */ - function &findInDefaultGraph($subject,$predicate,$object) - { - $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI"); - // static part of the sql statement - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID ='$defaultGraphID'"; - - // dynamic part of the sql statement - $sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConnection->execute($sql); - - $it = new IteratorFindQuadsDb($recordSet, $this, true); - return $it; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetMem.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetMem.php deleted file mode 100755 index 9cdb7aa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetMem.php +++ /dev/null @@ -1,394 +0,0 @@ - -* -* @package dataset -* @access public -**/ - -class DatasetMem extends Dataset -{ - - /** - * Reference to a Memmodel that holds the default graph. - * - * @var resource Memmodel - * @access private - */ - var $defaultGraph; - - - /** - * Name of the DatasetMem. - * - * @var string - * @access private - */ - var $setName; - - /** - * List of all NamedGraphs. - * - * @var array - * @access private - */ - var $graphs=array(); - - /** - * Constructor. - * You can supply a Dataset name. - * - * @param string - * @access public - */ - function DatasetMem($datasetName = null) - { - $this->setDatasetName($datasetName); - $this->defaultGraph=new MemModel(); - } - -// === Graph level methods ======================== - - /** - * Sets the Datasets name. - * - * @param string - * @access public - */ - function setDatasetName($datasetName) - { - $this->setName=$datasetName; - } - - /** - * Returns the Datasets name. - * - * @return string - * @access public - */ - function getDatasetName() - { - return $this->setName; - } - - /** - * Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set. - * - * @param NamedGraphMem - */ - function addNamedGraph(&$graph) - { - $graphNameURI=$graph->getGraphName(); - $this->graphs[$graphNameURI]=&$graph; - } - - /** - * Overwrites the existting default graph. - * - * @param MemModel - */ - function setDefaultGraph(&$graph) - { - $this->defaultGraph=&$graph; - } - - /** - * Returns a reference to the defaultGraph - * @return Model - */ - function &getDefaultGraph() - { - return $this->defaultGraph; - } - - /** - * Returns true, if an defaultGraph exists. False otherwise . - * - * @return boolean - */ - function hasDefaultGraph() - { - return $this->defaultGraph != null; - } - - /** - * Removes a NamedGraph from the set. Nothing happens - * if no graph with that name is contained in the set. - * - * @param string - */ - function removeNamedGraph($graphName) - { - unset($this->graphs[$graphName]); - } - - /** - * Tells wether the Dataset contains a NamedGraph. - * - * @param string - * @return boolean - */ - function containsNamedGraph($graphName) - { - return isset($this->graphs[$graphName]) === true; - } - - /** - * Returns the NamedGraph with a specific name from the Dataset. - * Changes to the graph will be reflected in the set. - * - * @param string - * @return NamedGraphMem or NULL - */ - function &getNamedGraph($graphName) - { - if (!isset($this->graphs[$graphName])) return NULL; - return $this->graphs[$graphName]; - } - - /** - * Returns the names of the namedGraphs in this set as strings in an array. - * - * @return Array - */ - function listGraphNames() - { - return array_keys($this->graphs); - } - - /** - * Creates a new NamedGraph and adds it to the set. An existing - * graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI - * - * @param string - * @param string - * @return NamedGraphMem - */ - function &createGraph($graphName,$baseURI = null) - { - $this->graphs[$graphName]=new NamedGraphMem($graphName,$baseURI); - return $this->getNamedGraph($graphName); - } - - /** - * Deletes all NamedGraphs from the set. - */ - function clear() - { - $this->graphs = array(); - } - - /** - * Returns the number of NamedGraphs in the set. Empty graphs - * are counted. - * - * @return int - */ - function countGraphs() - { - return count($this->graphs); - } - - /** - * Returns the NamedGraph with a specific offset in the dataset. - * Changes to the graph will be reflected in the set. - * - * @param int - * @return NamedGraphMem or null - * @access private - */ - function &getGraphWithOffset($offset) - { - $i=0; - foreach ($this->graphs as $graph) - { - if (($i++)==$offset) - return $graph; - } - $n = null; - return $n; - } - - /** - * Returns an iterator over all {@link NamedGraph}s in the set. - * - * @return IteratorAllGraphsMem - */ - function &listNamedGraphs() - { - require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php'; - $m = new IteratorAllGraphsMem($this); - return $m; - } - - /** - * Tells wether the set contains any NamedGraphs. - * - * @return boolean - */ - function isEmpty() - { - return $this->countGraphs() == 0; - } - - /** - * Adds all named graphs of the other dataset to this dataset. - * - * @param Dataset - */ - function addAll($otherDataset) - { - for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next()) - { - $current=$iterator->current(); - $this->graphs[$current->getGraphName()]=$current; - } - - if ($otherDataset->hasDefaultGraph()) - { - $this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph()); - } - } - -// === Quad level methods ======================== - - /** - * Adds a quad to the Dataset. The argument must not contain any - * wildcards. If the quad is already present, nothing happens. A new - * named graph will automatically be created if necessary. - * - * @param Quad - */ - function addQuad(&$quad) - { - $graphName=$quad->getGraphName(); - if ($this->containsNamedGraph($graphName->getLabel())===false) - $this->createGraph($graphName->getLabel()); - - $this->graphs[$graphName->getLabel()]->add($quad->getStatement()); - } - - - /** - * Tells wether the Dataset contains a quad or - * quads matching a pattern. - * - * @param Resource $graphName - * @param Resource $subject - * @param Resource $predicate - * @param Resource $object - * @return boolean - */ - function containsQuad($graphName,$subject,$predicate,$object) - { - if($graphName!=null) - { - if ($this->containsNamedGraph($graphName->getLabel())!==true) - return false; - - return ($this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject,$predicate,$object)!=null); - } - - foreach ($this->graphs as $graph) - { - if ($graph->findFirstMatchingStatement($subject,$predicate,$object)!=null) - return true; - }; - - return false; - } - - /** - * Deletes a Quad from the RDF dataset. - * - * @param Quad - */ - function removeQuad($quad) - { - $graphName=$quad->getGraphName(); - - if($graphName!=null) - { - if ($this->containsNamedGraph($graphName->getLabel())!==true) - return; - - return ($this->graphs[$graphName->getLabel()]->remove($quad->getStatement())!=null); - - } - foreach ($this->graphs as $graph) - { - $graph->remove($quad->getStatement()); - }; - } - - /** - * Counts the Quads in the RDF dataset. Identical Triples in - * different NamedGraphs are counted individually. - * - * @return int - */ - function countQuads() - { - $count=0; - foreach ($this->graphs as $graph) - { - $count+=$graph->size(); - } - return $count; - } - - /** - * Finds Statements that match a quad pattern. The argument may contain - * wildcards. - * - * @param Resource or Null - * @param Resourceor Null - * @param Resource or Null - * @param Resource or Null - * @return Iterator - */ - function &findInNamedGraphs($graph,$subject,$predicate,$object,$returnAsTriples = false) - { - - if ($graph!=null) - { - $findGraph=&$this->getNamedGraph($graph->getLabel()); - if($findGraph==null) - $findGraph=new MemModel(); - - return $findGraph->iterFind($subject,$predicate,$object); - } - - - require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php'; - $m = new IteratorFindQuadsMem($subject,$predicate,$object,$this->listNamedGraphs(),$returnAsTriples); - return $m; - } - - /** - * Finds Statements that match a pattern in the default Graph. The argument may contain - * wildcards. - * - * @param Resource or Null - * @param Resource or Null - * @param Resource or Null - * @return Iterator - */ - function &findInDefaultGraph($subject,$predicate,$object) - { - return $this->defaultGraph->iterFind($subject,$predicate,$object); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetP.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetP.php deleted file mode 100755 index 584c123d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/DatasetP.php +++ /dev/null @@ -1,25 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include ResModel classes -require_once( RDFAPI_INCLUDE_DIR . 'dataset/Dataset.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/Quad.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php'); -require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsDb.php'); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXParser.php'); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXSerializer.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsDb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsDb.php deleted file mode 100755 index 57d5d067..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsDb.php +++ /dev/null @@ -1,127 +0,0 @@ -listGraphs(); $iterator->valid(); $iterator->next()) -* { -* $currentResource=$iterator->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal -* -* -* @package dataset -* @access public -**/ -class IteratorAllGraphsDb -{ - /** - * Holds a reference to the associated DB resultSet - * @var $dbResultSets ADODB result - * @access private - */ - var $dbResultSet; - - /** - * Holds a reference to the associated datasetDb - * @var datasetDb - * @access private - */ - var $datasetDb; - - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - - /** - * The current NamedGraph - * @var obejct NamedGraph - * @access private - */ - var $current; - - - - /** - * Constructor. - * - * - * @param ADODBResultSet - * @param DatasetDb - * @access public - */ - function IteratorAllGraphsDb(&$dbResultSet,&$datasetDb) - { - $this->dbResultSet=& $dbResultSet; - $this->datasetDb=& $datasetDb; - $this->current = $this->dbResultSet->fields[0]; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - //not supported - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return (!$this->dbResultSet->EOF); - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->dbResultSet->moveNext(); - $this->current = $this->dbResultSet->fields[0]; - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function ¤t() - { - return ($this->datasetDb->getNamedGraph($this->current)); - } - - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->dbResultSet->_currentRow; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsMem.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsMem.php deleted file mode 100755 index 498d8f2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorAllGraphsMem.php +++ /dev/null @@ -1,125 +0,0 @@ -listGraphs(); $iterator->valid(); $iterator->next()) -* { -* $currentResource=$it->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal -* -* -* @package dataset -* @access public -**/ -class IteratorAllGraphsMem -{ - /** - * Holds a reference to the associated RDF dataset - * - * @var object dataset - * @access private - */ - var $associatedGraphSet; - - /** - * The current position - * - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid - * - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph - * - * @var obejct NamedGraph - * @access private - */ - var $current; - - - /** - * Constructor. - * - * @param dataset - * @access public - */ - function IteratorAllGraphsMem(&$namedGraphSet) - { - $this->associatedGraphSet=&$namedGraphSet; - $this->rewind(); - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - $this->current = &$this->associatedGraphSet->getGraphWithOffset(++$this->key); - $this->valid=($this->current!=NULL); - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function ¤t() - { - return $this->current; - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsDb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsDb.php deleted file mode 100755 index 0ab53a9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsDb.php +++ /dev/null @@ -1,145 +0,0 @@ -findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $currentQuad=$iterator->current(); -* }; -* -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* -* @package dataset -* @access public -**/ -class IteratorFindQuadsDb -{ - /** - * Holds a reference to the associated DB resultSet. - * - * @var $dbResultSets ADODB result - * @access private - */ - var $dbResultSet; - - /** - * Holds a reference to the associated datasetDb. - * - * @var $datasetDb datasetDb - * @access private - */ - var $datasetDb; - - /** - * boolean value, if the results should be returned as triples. - * - * @var boolean - * @access private - */ - var $returnAsTriples; - - /** - * Constructor. - * - * @param dataset - * @access public - */ - function IteratorFindQuadsDb(&$dbResultSet,&$datasetDb,$returnAsTriples=false) - { - $this->dbResultSet=& $dbResultSet; - $this->datasetDb=& $datasetDb; - $this->returnAsTriples=$returnAsTriples; - } - - /** - * Resets iterator list to start. - * - * @access public - */ - function rewind() - { - //not supported - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - if (($this->dbResultSet ===false) OR ($this->dbResultSet->EOF) ) - return false; - - return true; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - if ($this->dbResultSet!==false) - $this->dbResultSet->moveNext(); - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function ¤t() - { - if ($this->dbResultSet===false) - return null; - // subject - if ($this->dbResultSet->fields[5] == 'r') - $sub = new Resource($this->dbResultSet->fields[0]); - else - $sub = new BlankNode($this->dbResultSet->fields[0]); - - // predicate - $pred = new Resource($this->dbResultSet->fields[1]); - - // object - if ($this->dbResultSet->fields[6] == 'r') - $obj = new Resource($this->dbResultSet->fields[2]); - elseif ($this->dbResultSet->fields[6] == 'b') - $obj = new BlankNode($this->dbResultSet->fields[2]); - else { - $obj = new Literal($this->dbResultSet->fields[2], $this->dbResultSet->fields[3]); - if ($this->dbResultSet->fields[4]) - $obj->setDatatype($this->dbResultSet->fields[4]); - } - - if($this->returnAsTriples) - return (new Statement($sub, $pred, $obj)); - - return (new Quad(new Resource($this->dbResultSet->fields[7]),$sub,$pred,$obj)); - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->dbResultSet->_currentRow; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsMem.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsMem.php deleted file mode 100755 index 531ea2ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/IteratorFindQuadsMem.php +++ /dev/null @@ -1,217 +0,0 @@ -findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $currentQuad=$it->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal (http://d-westphal.de) -* -* -* @package dataset -* @access public -**/ -class IteratorFindQuadsMem -{ - /** - * key value in the current graph. - * - * @var dataset - * @access private - */ - var $graphKey; - - /** - * boolean value, if the results should be returned as triples. - * - * @var boolean - * @access private - */ - var $returnAsTriples; - - /** - * The current position. - * - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid. - * - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph. - * - * @var NamedGraph - * @access private - */ - var $current; - - /** - * The graphName Resource to search for. - * - * @var string - * @access private - */ - var $findGraphName; - - /** - * The subject Resource to search for. - * - * @var string - * @access private - */ - var $findSubject; - - /** - * The predicate Resource to search for. - * - * @var string - * @access private - */ - var $findPredicate; - - /** - * The object Resource to search for. - * - * @var string - * @access private - */ - var $findObject; - - /** - * Iterator over all graphs of the RDF dataset. - * - * @var string - * @access private - */ - var $graphIterator; - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like find(). - * $getSPO supports the strings 's', 'p', and 'o' to return - * either the subject, predicate, or object of the result statements. - * - * - * @param Resource - * @param Resource - * @param Resource - * @param dataset - * @param Boolean - * @access public - */ - function IteratorFindQuadsMem($subject,$predicate,$object,&$graphIterator, $returnAsTriples=false) - { - $this->findSubject=$subject; - $this->findPredicate=$predicate; - $this->findObject=$object; - $this->graphIterator=&$graphIterator; - $this->rewind(); - $this->returnAsTriples=$returnAsTriples; - } - - /** - * Resets iterator list to start. - * - * @access public - */ - function rewind() - { - $this->graphIterator->rewind(); - $this->key = -1; - $this->graphKey=-1; - $this->next(); - } - - /** - * Says if there are additional items left in the list. - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list. - * - * @access public - */ - function next() - { - if($this->graphIterator->valid()===false) - { - $this->valid=false; - return; - } - - $currentGraph=&$this->graphIterator->current(); - $this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey); - if($this->current==null) - { - do - { - $this->graphIterator->next(); - if($this->graphIterator->valid()===false) - { - $this->valid=false; - return; - } - $currentGraph=&$this->graphIterator->current(); - $this->graphKey=-1; - $this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey); - - } while ($this->current==null); - } - $this->key++; - $this->valid=true; - } - - /** - * Returns the current item. - * - * @return mixed - * @access public - */ - function current() - { - if($this->returnAsTriples) return $this->current; - - $currentGraph=&$this->graphIterator->current(); - return new Quad(new Resource($currentGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject()); - } - - /** - * Returns the key of the current item. - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphDb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphDb.php deleted file mode 100755 index 722d7655..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphDb.php +++ /dev/null @@ -1,70 +0,0 @@ -dbConn =& $dbConnection; - $this->modelURI = $modelURI; - $this->modelID = $modelID; - $this->baseURI = $this->_checkBaseURI($baseURI); - $this->graphName = $graphName; - } - - /** - * Sets the graph name. - * - * @param string - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return string - * @access public - */ - function getGraphName() - { - return $this->graphName; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphMem.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphMem.php deleted file mode 100755 index c639048a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/NamedGraphMem.php +++ /dev/null @@ -1,66 +0,0 @@ - -* -* @package dataset -* @access public -**/ -class NamedGraphMem extends MemModel -{ - - /** - * Name of the NamedGraphMem. - * - * @var string - * @access private - */ - var $graphName; - - - /** - * Constructor - * You have to supply a graph name. You can supply a URI. - * - * @param string - * @param string - * @access public - */ - function NamedGraphMem($graphName,$baseURI = null) - { - $this->setBaseURI($baseURI); - $this->indexed = INDEX_TYPE; - $this->setGraphName($graphName); - } - - /** - * Sets the graph name. - * - * @param string - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return string - * @access public - */ - function getGraphName() - { - return $this->graphName; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Quad.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Quad.php deleted file mode 100755 index ae5ff51d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/dataset/Quad.php +++ /dev/null @@ -1,147 +0,0 @@ -statement=new Statement($subject,$predicate,$object); - $this->graphName=$graphName; - } - - /** - * Sets the graph name. - * - * @param Resource - * @access public - */ - function setGraphName($graphName) - { - $this->graphName=$graphName; - } - - /** - * Returns the graph name. - * - * @return Resource - * @access public - */ - function getGraphName() - { - return $this->graphName; - } - - /** - * Return a human-readable (sort of) string "graphname { s p o . }" - * describing the quad. - * - * @return string - */ - function toString() - { - return 'GraphName('.$this->graphName->getLabel().') '.$this->statement->toString(); - } - - /** - * Returns the subject. - * - * @return Resource - * @access public - */ - function getSubject() - { - return $this->statement->getSubject(); - } - - /** - * Returns the predicate. - * - * @return Resource - * @access public - */ - function getPredicate() - { - return $this->statement->getPredicate(); - } - - /** - * Returns the object. - * - * @return Resource - * @access public - */ - function getObject() - { - return $this->statement->getObject(); - } - - /** - * Returns the statement(subject,predicate,object). - * - * @return statement - * @access public - */ - function getStatement() - { - return $this->statement; - } - - /** - * Checks if two quads are equal. - * - * @param Quad - * @return boolean - * @access public - */ - function equals($quad) - { - return ($this->graphName->equals($quad->getGraphName()) && $this->statement->equals($quad->getStatement())); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/all-wcprops deleted file mode 100755 index 93e72ac1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/all-wcprops +++ /dev/null @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 62 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/infModel -END -InfModel.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/infModel/InfModel.php -END -InfModelP.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/infModel/InfModelP.php -END -InfModelB.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/infModel/InfModelB.php -END -InfStatement.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/infModel/InfStatement.php -END -InfModelF.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/infModel/InfModelF.php -END -InfRule.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/api/infModel/InfRule.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/entries deleted file mode 100755 index 7f9fa42a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/entries +++ /dev/null @@ -1,106 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/infModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:38:51.000000Z -320 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -InfModel.php -file - - - - -2008-02-29T14:57:49.005834Z -26bcd3c49686d1c8a402b9b1ff0e128e -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -InfModelP.php -file - - - - -2008-02-29T14:57:49.005834Z -e4eb63f504856523cd9460c7cdb887b1 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -InfModelB.php -file - - - - -2008-02-29T14:57:49.021455Z -554810af03fa02dfef1b3fcbb9d36fa8 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -InfStatement.php -file - - - - -2008-02-29T14:57:49.021455Z -b3b8db445eadddd525f88944aec533f4 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -InfModelF.php -file - - - - -2008-02-29T14:57:49.037075Z -20031867ebe5ea70c133653f9651138b -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -InfRule.php -file - - - - -2008-02-29T14:57:49.037075Z -caccf06491e8ba11a7f213807c311046 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelB.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelB.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelB.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelF.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelF.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelP.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfModelP.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfRule.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfRule.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfRule.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfStatement.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/prop-base/InfStatement.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModel.php.svn-base deleted file mode 100755 index 9fccbfe7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModel.php.svn-base +++ /dev/null @@ -1,678 +0,0 @@ - - * - * @package infModel - * @access public - */ - -class InfModel extends MemModel -{ - /** - * Array that holds the objects of the class Infrule, - * which were assigned by the _addToInference() function - * - * @var array - * @access private - */ - var $infRules; - - /** - * Array of URI-Strings that produces Infrules. - * - * @var array - * @access private - */ - var $supportedInference; - - /** - * Array of the connection between the infrules and the statement - * that assigned those rules. - * array[2][3]=true;array[2][5]=true means, that statement 2 - * assigned rule 3 & 5 to the model. - * - * @var array - * @access private - */ - var $statementRuleIndex; - - /** - * Array of the infRule triggers and the matching infrules. - * $this->infRulesTriggerIndex['s'] for subject index, ['p'] for predicates, - * and ['o'] for objects. - * - * @var array - * @access private - */ - var $infRulesTriggerIndex; - - /** - * Array of the infRule entailments and the matching infrules. - * $this->infRulesEntailIndex['s'] for subject index, ['p'] for predicates, - * and ['o'] for objects. - * - * @var array - * @access private - */ - var $infRulesEntailIndex; - - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function InfModel ($baseURI = NULL) - { - //call the memmodel constructor method - parent::MemModel($baseURI); - //initialise vars - $this->infRulesTriggerIndex['s']=array(); - $this->infRulesTriggerIndex['p']=array(); - $this->infRulesTriggerIndex['o']=array(); - $this->infRulesEntailIndex['s']=array(); - $this->infRulesEntailIndex['p']=array(); - $this->infRulesEntailIndex['o']=array(); - $this->infRules=array(); - $this->statementRuleIndex = array(); - //arraylist of predicate labels that shall add inference rules - //to the model - //The constants, wich statements will create rules can be configured in constants.php - if (INF_RES_SUBCLASSOF) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBCLASSOF; - - if (INF_RES_SUBPROPERTYOF) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF; - - if (INF_RES_RANGE) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_RANGE; - - if (INF_RES_DOMAIN) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_DOMAIN; - - if (INF_RES_OWL_SAMEAS) - $this->supportedInference[] = OWL_URI.OWL_SAME_AS; - - if (INF_RES_OWL_INVERSEOF) - $this->supportedInference[] = OWL_URI.OWL_INVERSE_OF; - - //Rule: rdfs12 - if (INF_RES_RULE_RDFS12) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.'ContainerMembershipProperty')); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),new Resource(RDF_SCHEMA_URI.'member')); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs6 - if (INF_RES_RULE_RDFS6) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_NAMESPACE_URI.RDF_PROPERTY)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),''); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs8 - if (INF_RES_RULE_RDFS8) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_RESOURCE)); - $this->_addInfRule($infRule,'base'); - - } - - //Rule: rdfs10 - if (INF_RES_RULE_RDFS10) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),''); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs13 - if (INF_RES_RULE_RDFS13) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_DATATYPE)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_LITERAL)); - $this->_addInfRule($infRule,'base'); - } - - } - - /** - * Adds a new triple to the Model without checking if the statement - * is already in the Model. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() - * function (which is slower then add()) - * If the statement's predicate label is supported by the inference, - * the matching rules are added. - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - parent::add($statement); - //if the predicate is supported by the inference - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - $this->_addToInference($statement); - }; - } - - /** - * This function analyses the statement's predicate and adds the - * matching infrule to the model. - * - * @param object Statement $statement - * @access private - */ - function _addToInference($statement) - { - $predicateLabel=$statement->getLabelPredicate(); - //get the position of the the statement in the model - end($this->triples); - $statementPosition=key($this->triples); - - switch ($predicateLabel) - { - case RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF : - //create a new rule - $infRule=new InfRule(); - //set the trigger to match all statements, having a - //predicate, that matches the subject of the statement that - //created this rule. - $infRule->setTrigger(null,$statement->getSubject(),null); - //set the infrule to return a statement, having the same - //subject and object as the statement, that asked for an - //entailment, and having the object of the statement, - //that created this rule as predicate. - $infRule->setEntailment('',$statement->getObject(),''); - //add the infule to Model, Statement/Rule-Index, - //and Rule/Trigger (or Rule/Entailment) index - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_SUBCLASSOF : - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getSubject()); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_DOMAIN : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_RANGE : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case OWL_URI.OWL_INVERSE_OF : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',$statement->getObject(),''); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getObject(),null); - $infRule->setEntailment('',$statement->getSubject(),''); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case OWL_URI.OWL_SAME_AS : - $infRule=new InfRule(); - $infRule->setTrigger($statement->getSubject(),null,null); - $infRule->setEntailment($statement->getObject(),'

',''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger($statement->getObject(),null,null); - $infRule->setEntailment($statement->getSubject(),'

',''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',$statement->getObject(),''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getObject(),null); - $infRule->setEntailment('',$statement->getSubject(),''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,null,$statement->getSubject()); - $infRule->setEntailment('','

',$statement->getObject()); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,null,$statement->getObject()); - $infRule->setEntailment('','

',$statement->getSubject()); - $this->_addInfRule($infRule,$statementPosition); - break; - }; - } - - /** - * This function checks, which infrules were added by the statement and - * removes those. - * - * @param object Statement $statement - * @return integer - * @access private - */ - function _removeFromInference($statement) - { - $return= array(); - $statementPosition=-1; - do - { - //get the position of the statement that should be removed - $statementPosition=$this->findFirstMatchOff($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - $statementPosition+1); - if ($statementPosition!=-1) - { - //if it added any rules - if (isset ($this->statementRuleIndex[$statementPosition])) - { - //remove all rules - foreach ($this->statementRuleIndex[$statementPosition] as $key => $value) - { - //remove from Rule-Trigger Index - if (is_a($this,'InfModelF')) - { - $trigger=$this->infRules[$key]->getTrigger(); - - if(is_a($trigger['s'],'Node')) - { - $subjectLabel=$trigger['s']->getLabel(); - } else - { - $subjectLabel='null'; - } - unset ($this->infRulesTriggerIndex['s'][$subjectLabel][array_search($key,$this->infRulesTriggerIndex['s'][$subjectLabel])]); - - if(is_a($trigger['p'],'Node')) - { - $predicateLabel=$trigger['p']->getLabel(); - } else - { - $predicateLabel='null'; - } - unset ($this->infRulesTriggerIndex['p'][$predicateLabel][array_search($key,$this->infRulesTriggerIndex['p'][$predicateLabel])]); - - if(is_a($trigger['o'],'Node')) - { - $objectLabel=$trigger['o']->getLabel(); - } else - { - $objectLabel='null'; - } - unset ($this->infRulesTriggerIndex['o'][$objectLabel][array_search($key,$this->infRulesTriggerIndex['o'][$objectLabel])]); - } else - //remove from Rule-Entailment Index - { - $entailment=$this->infRules[$key]->getEntailment(); - - if(is_a($entailment['s'],'Node')) - { - $subjectLabel=$entailment['s']->getLabel(); - } else - { - $subjectLabel='null'; - } - unset ($this->infRulesEntailIndex['s'][$subjectLabel][array_search($key,$this->infRulesEntailIndex['s'][$subjectLabel])]); - - - if(is_a($entailment['p'],'Node')) - { - $predicateLabel=$entailment['p']->getLabel(); - } else - { - $predicateLabel='null'; - } - unset ($this->infRulesEntailIndex['p'][$predicateLabel][array_search($key,$this->infRulesEntailIndex['p'][$predicateLabel])]); - - if(is_a($entailment['o'],'Node')) - { - $objectLabel=$entailment['o']->getLabel(); - } else - { - $objectLabel='null'; - } - unset ($this->infRulesEntailIndex['o'][$objectLabel][array_search($key,$this->infRulesEntailIndex['o'][$objectLabel])]); - } - //remove from statement-Rule Index - unset ($this->infRules[$key]); - } - unset($this->statementRuleIndex[$statementPosition]); - $return[]=$statementPosition; - }; - } - - } while($statementPosition!=-1); - - //return the positions of the statements to be removed OR emty array - //if nothing was found. - return $return; - } - - /** - * Returns a model, containing all Statements, having a Predicate, that - * is supported by the inference. - * - * @return object Model - * @access public - */ - function getSchema() - { - $res=new MemModel(); - //Search the base-model for all statements, having a Predicate, that - //is supported by the inference. - foreach ($this->supportedInference as $inferencePredicateLabel) - { - $res->addModel($this->find(null, new Resource($inferencePredicateLabel), null)); - } - return $res; - } - - /** - * General method to replace nodes of a MemModel. - * This function is disabled in the Inference Model. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object Node $replacement - * @access public - * @throws PhpError - */ - function replace($subject, $predicate, $object, $replacement) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: replace): This function is disabled in the Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches the regular - * expression. - * Returns an empty MemModel if nothing is found. - * - * This function is disabled in the Inference Model - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: findRegex): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Returns all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at - * the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Returns an empty MemModel if nothing is found. - * - * This function is disabled in the Inference Model. - * - * @param string $vocabulary - * @return object MemModel - * @access public - */ - function findVocabulary($vocabulary) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: findVocabulary): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Adds the URI or NULL to the Infrule trigger or entailment index. - * - * - * @param object infrule $infRule - * @param integer $infRulePosition - * @access private - */ - function _addInfruleToIndex(& $infRule,& $infRulePosition) - { - //Add the rule only to the trigger index, if it is a InfFModel - if (is_a($this,'InfModelF')) - { - //get the trigger - $trigger = $infRule->getTrigger(); - //evaluate and set the index - if ($trigger['s'] == null) - { - $this->infRulesTriggerIndex['s']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['s'][$trigger['s']->getLabel()][]=$infRulePosition; - }; - - if ($trigger['p'] == null) - { - $this->infRulesTriggerIndex['p']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['p'][$trigger['p']->getLabel()][]=$infRulePosition; - }; - - if ($trigger['o'] == null) - { - $this->infRulesTriggerIndex['o']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['o'][$trigger['o']->getLabel()][]=$infRulePosition; - }; - } else - //add to entailment Index if it is a BModel - { - //get the entailment - $entailment = $infRule->getEntailment(); - //evaluate the entailment and add to index - if (!is_a($entailment['s'],'Node')) - { - $this->infRulesEntailIndex['s']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['s'][$entailment['s']->getLabel()][]=$infRulePosition; - }; - - if (!is_a($entailment['p'],'Node')) - { - $this->infRulesEntailIndex['p']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['p'][$entailment['p']->getLabel()][]=$infRulePosition; - }; - - if (!is_a($entailment['o'],'Node')) - { - $this->infRulesEntailIndex['o']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['o'][$entailment['o']->getLabel()][]=$infRulePosition; - }; - }; - } - - /** - * Searches the trigger-index for a matching trigger and returns an - * array of infRule positions. - * - * - * @param object infrule $infRule - * @return array integer - * @access private - */ - function _findRuleTriggerInIndex($statement) - { - $return=array(); - //a statement's subject matches all triggers with null and the same URI - $subjectLabel=$statement->getLabelSubject(); - $inIndexS=array(); - if (isset($this->infRulesTriggerIndex['s']['null'])) - $inIndexS=array_values($this->infRulesTriggerIndex['s']['null']); - if (isset($this->infRulesTriggerIndex['s'][$subjectLabel])) - $inIndexS= array_merge($inIndexS,array_values($this->infRulesTriggerIndex['s'][$subjectLabel])); - - //a statement's predicate matches all triggers with null and the same URI - $predicateLabel=$statement->getLabelPredicate(); - $inIndexP=array(); - if (isset($this->infRulesTriggerIndex['p']['null'])) - $inIndexP=array_values($this->infRulesTriggerIndex['p']['null']); - if (isset($this->infRulesTriggerIndex['p'][$predicateLabel])) - $inIndexP= array_merge($inIndexP,array_values($this->infRulesTriggerIndex['p'][$predicateLabel])); - - //a statement's object matches all triggers with null and the same URI - $objectLabel=$statement->getLabelObject(); - $inIndexO=array(); - if (isset($this->infRulesTriggerIndex['o']['null'])) - $inIndexO=array_values($this->infRulesTriggerIndex['o']['null']); - if (isset($this->infRulesTriggerIndex['o'][$objectLabel])) - $inIndexO= array_merge($inIndexO,array_values($this->infRulesTriggerIndex['o'][$objectLabel])); - - //if an infrule position occurs in subject, predicate, and object index, add to result array. - foreach ($inIndexP as $positionP) - { - if (in_array($positionP,$inIndexO)) - if (in_array($positionP,$inIndexS)) - $return[]=$positionP; - } - return $return; - } - - /** - * Searches the Entailment-index for a matching Entailment and returns an - * array of infRule positions. - * - * - * @param node or null $subject - * @param node or null $predicate - * @param node or null $object - * @return array integer - * @access private - */ - function _findRuleEntailmentInIndex($subject,$predicate,$object) - { - $return=array(); - //a node matches all entailments with NULL or a matching URI - if(is_a($subject,'Node')) - { - $subjectLabel=$subject->getLabel(); - $inIndexS=array(); - if (isset($this->infRulesEntailIndex['s']['null'])) $inIndexS=array_values($this->infRulesEntailIndex['s']['null']); - if (isset($this->infRulesEntailIndex['s'][$subjectLabel])) $inIndexS= array_merge($inIndexS,array_values($this->infRulesEntailIndex['s'][$subjectLabel])); - } else - //if the subject search pattern is NULL, every rule will match the subject search patter - { - $inIndexS=array_keys($this->infRules); - } - - if(is_a($predicate,'Node')) - { - $predicateLabel=$predicate->getLabel(); - $inIndexP=array(); - if (isset($this->infRulesEntailIndex['p']['null'])) $inIndexP=array_values($this->infRulesEntailIndex['p']['null']); - if (isset($this->infRulesEntailIndex['p'][$predicateLabel])) $inIndexP= array_merge($inIndexP,array_values($this->infRulesEntailIndex['p'][$predicateLabel])); - } else - { - $inIndexP=array_keys($this->infRules); - } - - if(is_a($object,'Node')) - { - $objectLabel=$object->getLabel(); - $inIndexO=array(); - if (isset($this->infRulesEntailIndex['o']['null'])) $inIndexO=array_values($this->infRulesEntailIndex['o']['null']); - if (isset($this->infRulesEntailIndex['o'][$objectLabel])) $inIndexO= array_merge($inIndexO,array_values($this->infRulesEntailIndex['o'][$objectLabel])); - } else - { - $inIndexO=array_keys($this->infRules); - } - - //if an infrule position occurs in subject, predicate, and object index, add to result array. - foreach ($inIndexP as $positionP) - { - if (in_array($positionP,$inIndexO)) - if (in_array($positionP,$inIndexS)) - $return[]=$positionP; - } - return $return; - } - - /** - * Adds an InfRule to the InfModel. - * $statementPosition states the positiion of the statement, that created - * this rule, in the model->triples array. - * - * - * @param object Infrule $infRule - * @param integer $statementPosition - * @access private - */ - function _addInfRule($infRule, $statementPosition) - { - //add the rule - $this->infRules[]=$infRule; - //get the position of the added rule in the model - end($this->infRules); - $rulePosition=key($this->infRules); - //add the information to the index, that this statement - //added this rule. - $this->statementRuleIndex[$statementPosition][$rulePosition]=true; - //add informations to index over trigger & entailment - $this->_addInfruleToIndex($infRule,$rulePosition); - } - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelB.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelB.php.svn-base deleted file mode 100755 index 1abaa989..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelB.php.svn-base +++ /dev/null @@ -1,515 +0,0 @@ - - -* -* @package infModel -* @access public -**/ - -class InfModelB extends InfModel -{ - - /** - * Array that holds combinations of inference rules with distinct - * find-querys, that don't lead to any inference. - * - * @var array - * @access private - */ - var $findDeadEnds; - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function InfModelB($baseURI = null) - { - parent::InfModel($baseURI); - $this->findDeadEnds=array(); - } - - /** - * Adds a new triple to the Model without checking, if the statement - * is already in the Model. So if you want a duplicate free Model use - * the addWithoutDuplicates() function (which is slower then add()) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - parent::add($statement); - //Reset the found dead-ends. - $this->findDeadEnds=array(); - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * Returns an empty MemModel if nothing is found. - * To improve the search speed with big Models, call index(INDEX_TYPE) - * before seaching. - * - * It recursively searches in the statements and rules to find - * matching statements. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return object MemModel - * @access public - * @throws PhpError - */ - function find($subject,$predicate,$object) - { - $searchStringIndex=array(); - $resultModel=new MemModel(); - - //add all infered statements without duplicates to the result model - foreach ($this->_infFind($subject,$predicate,$object,array())as $statement) - { - $resultModel->addWithoutDuplicates($statement); - }; - return $resultModel; - } - - /** - * This is the main inference method of the InfModelB - * The algorithm works as follows: - * Find all statements in the base model, that matches the current - * find-query. - * Check all rules, if they are able to deliver infered statements, - * that match the current find-query. Don't use rules with queries, - * that lead to dead-ends and don't use a rule-query-combination that - * was used before in this branch (ontology loops). - * If a rule is possible do deliver such statements, get a new - * find-query, that is possible to find those statements, that are able - * to trigger this rule. - * Call this _infFind method wirh the new find-query and entail the - * resulting statements. - * If this rule, wasn't able to return any statements with this distinct - * query, add this combination to the dead-ends. - * Return the statements from the base triples and those, which were infered. - * - * If $findOnlyFirstMatching is set to true, only the first match in - * the base-statements is entailed an returned (used in contains() and - * findFirstMatchingStatement() methods). - * - * You can set an offset to look for the first matching statement by setting the - * $offset var. - * - * It recursively searches in the statements and rules to find matching - * statements - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param array $searchStringIndex - * @param boolean $findOnlyFirstMatching - * @param integer $offset - * @param integer $resultCount - * @return object array Statements - * @access private - */ - function _infFind ($subject,$predicate,$object, $searchStringIndex, $findOnlyFirstMatching = false, $offset = 0,$resultCount = 0 ) - { - $return=array(); - //Find all matching statements in the base statements - $findResult=parent::find($subject,$predicate,$object); - //For all found statements - foreach ($findResult->triples as $statement) - { - $return[]=$statement; - $resultCount++; - - //Return, if only the firstMatchingStatement was wanted - if ($findOnlyFirstMatching && $resultCount > $offset) - return $return; - }; - - //Don't infer statements about the schema (rdfs:subClass, etc..) - //is false - if ($predicate == null || - (is_a($predicate,'Node') && - !in_array($predicate->getLabel(),$this->supportedInference)) - ) - //Check only Rules, that the EntailmentIndex returned. - foreach ($this->_findRuleEntailmentInIndex($subject,$predicate,$object) as $ruleKey) - { - $infRule=$this->infRules[$ruleKey]; - $serializedRuleStatement=$ruleKey.serialize($subject).serialize($predicate).serialize($object); - //If it is to ontology loop and no dead-end - if (!in_array($serializedRuleStatement, $searchStringIndex) && - !in_array($serializedRuleStatement, $this->findDeadEnds)) - { - //Keep this distinct rule query cobination for - //this branch to detect loops - $searchStringIndex[]=$serializedRuleStatement; - - //If the rule is able to deliver statements that match - //this query - if ($infRule->checkEntailment($subject,$predicate,$object)) - { - //Get a modified find-query, that matches statements, - //that trigger this rule - $modefiedFind=$infRule->getModifiedFind($subject,$predicate,$object); - //Call this method with the new find-query - $infFindResult=$this->_infFind($modefiedFind['s'], - $modefiedFind['p'], - $modefiedFind['o'], - $searchStringIndex, - $findOnlyFirstMatching, - $offset, - $resultCount) ; - //If it deliverd statements that matches the trigger - if (isset($infFindResult[0])) - { - foreach ($infFindResult as $statement) - { - //Entail the statements and check, if they are not about the - //ontology - $newStatement=$infRule->entail($statement); - if (!in_array($newStatement->getLabelPredicate(),$this->supportedInference)) - //Check if, the entailed statements are, what we are looking for - if($this->_nodeEqualsFind($subject,$newStatement->getSubject()) && - $this->_nodeEqualsFind($predicate,$newStatement->getPredicate()) && - $this->_nodeEqualsFind($object,$newStatement->getObject() ) ) - { - //Add to results - $return[]=$newStatement; - $resultCount++; - - //or return at once - if ($findOnlyFirstMatching && $resultCount > $offset) - return $return; - } - } - } else - { - //If there were no results of the rule-query-combination, - //mark this combination as a dead-end. - $this->findDeadEnds[]=$serializedRuleStatement; - } - } - } - } - //Return the array of the found statements - return $return; - } - - /** - * Tests if the Model contains the given triple. - * TRUE if the triple belongs to the Model; - * FALSE otherwise. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) - { - //throws an error, if $statement is not of class Statement - if(!is_a($statement,'Statement')) - trigger_error(RDFAPI_ERROR . '(class: InfModelB; method: contains): - $statement has to be object of class Statement', E_USER_ERROR); - - //Call the _infFind method, but let it stop, if it finds the first match. - if (count( $this->_infFind($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - array(),true) ) >0) - { - return true; - } else - { - return false; - }; - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement of the MemModel where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search for. Default = 0 - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) - { - //Call the _infFind method, but let it stop, if it finds the - //first match. - $res= $this->_infFind($subject,$predicate,$object,array(),true,$offset); - - if (isset($res[$offset])) - { - return $res[$offset]; - } else - { - return NULL; - }; - } - - /** - * Returns a StatementIterator for traversing the Model. - * - * @access public - * @return object StatementIterator - */ - function & getStatementIterator() - { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - // Gets a MemModel by executing a find(null,null,null) to get a - //inferable statements. - // WARNING: might be slow - return new StatementIterator($this->getMemModel()); - } - - /** - * Number of all inferable triples in the Model. - * WARNING: uses a find(null,null,null) to find all statements! (might take a while) - * - * @param boolean - * @return integer - * @access public - */ - function size() - { - // Gets a MemModel by executing a find(null,null,null) to get a - //inferable statements. - // WARNING: might be slow - $res = $this->getMemModel(); - return $res->size(); - } - - /** - * Create a MemModel containing all the triples (including inferred - * statements) of the current InfModelB. - * - * @return object MemModel - * @access public - */ - function & getMemModel() - { - - $return=$this->find(null,null,null); - $return->setBaseURI($this->baseURI); - $return->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Create a MemModel containing only the base triples (without inferred - * statements) of the current InfModelB. - * - * @return object MemModel - * @access public - */ - function & getBaseMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $statement) - $return->add($statement); - - $retun->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Short Dump of the InfModelB. - * - * @access public - * @return string - */ - function toString() - { - return 'InfModelB[baseURI=' . $this->getBaseURI() . '; size=' . $this->size(true) . ']'; - } - - /** - * Dumps of the InfModelB including ALL inferable triples. - * - * @access public - * @return string - */ - function toStringIncludingTriples() - { - $dump = $this->toString() . chr(13); - $stateIt=new StatementIterator($this->find(null,null,null)); - while($statement=$stateIt->next()) - { - $dump .= $statement->toString() . chr(13); - } - return $dump; - } - - /** - * Saves the RDF,N3 or N-Triple serialization of the full InfModelB - * (including inferred triples) to a file. - * You can decide to which format the model should be serialized by - * using a corresponding suffix-string as $type parameter. If no $type - * parameter is placed this method will serialize the model to XML/RDF - * format. - * Returns FALSE if the InfModelB couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') - { - - $memmodel=$this->getMemModel(); - return $memmodel->saveAs($filename, $type); - } - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples as HTML. - * - * @access public - */ - function writeAsHtml() - { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this->getMemModel()); - $rdf = htmlspecialchars($rdf, ENT_QUOTES); - $rdf = str_replace(' ', ' ', $rdf); - $rdf = nl2br($rdf); - echo $rdf; - } - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples as HTML table. - * - * @access public - */ - function writeAsHtmlTable() - { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - RDFUtil::writeHTMLTable($this->getMemModel()); - } - - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples. - * - * @access public - * @return string - */ - function writeRdfToString() - { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this->getMemModel()); - return $rdf; - } - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - if (parent::contains($statement)) - { - if (in_array($statement->getLabelPredicate(),$this->supportedInference)); - while (count($this->_removeFromInference($statement))>0); - - $this->findDeadEnds=array(); - return parent::remove($statement); - } else - { - return false; - } - } - - /** - * Checks, if a single node matches a single find pattern. - * TRUE if the node matches. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model. - * - * @param object Statement $statement - * @return boolean - * @access private - */ - function _nodeEqualsFind(& $find, $node) - { - //If the find pattern is a node, use the nodes equal-method and - //return the result. - if (is_a($find,'Node')) - return $node->equals($find); - - //Null-pattern matches anything. - if ($find == null) - { - return true; - } else - { - return false; - } - } - - /** - * Returns a FindIterator for traversing the MemModel. - * Disabled in InfModelB. - * - * @access public - * @return object FindIterator - */ - function & findAsIterator($sub=null,$pred=null,$obj=null) { - $errmsg = RDFAPI_ERROR . '(class: InfModelB; method: findAsIterator): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelF.php.svn-base deleted file mode 100755 index fe74c85e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelF.php.svn-base +++ /dev/null @@ -1,406 +0,0 @@ - - -* -* @package infModel -* @access public -**/ - -class InfModelF extends InfModel -{ - - /** - * Array that holds the position of the infered statements in the model. - * - * @var array - * @access private - */ - var $infPos; - - - /** - * Variable that influences the habbit when adding statements. - * Used by the loadModel method to increase performance. - * - * @var boolean - * @access private - */ - var $inferenceEnabled; - - - /** - * Constructor - * You can supply a base_uri. - * - * @param string $baseURI - * @access public - */ - function InfModelF($baseURI = NULL) - { - parent::InfModel($baseURI); - $this->infPos=array(); - $this->inferenceEnabled=true; - } - - /** - * Adds a new triple to the MemModel without checking if the statement - * is already in the MemModel. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() - * function (which is slower then add()) - * The statement is infered and all entailed statements are added. - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add ($statement) - { - parent::add($statement); - if ($this->inferenceEnabled) - { - foreach ($this->entailStatement($statement) as $state) - { - //a addWithoutDublicates construct - if(!$this->contains($state)) - { - - parent::add($state); - //save the position of the infered statements - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - //apply the complete inference to the model, if the added statement was able to add a rule - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - $this->applyInference(); - } - } - - - /** - * Checks if a new statement is already in the MemModel and adds - * the statement, if it is not in the MemModel. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * The statement is infered and all entailed statements are added. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates(& $statement) - { - if(!$this->contains($statement)) - { - parent::add($statement); - if ($this->inferenceEnabled) - { - foreach ($this->entailStatement($statement) as $statement) - { - if(!$this->contains($statement)) - { - parent::add($statement); - //save the position of the infered statements - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - $this->applyInference(); - } - return true; - } - return false; - } - - - - /** - * Entails every statement and adds the entailments if not already - * in the model. - * - * @access private - */ - function applyInference() - { - //check every statement in the model - foreach ($this->triples as $statement) - { - //gat all statements, that it recursively entails - foreach ($this->entailStatement($statement) as $statement) - { - if (!$this->contains($statement)) - { - parent::add($statement); - //add the InfStatement position to the index - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - }; - } - - - /** - * Entails a statement by recursively using the _entailStatementRec - * method. - * - * @param object Statement $statement - * @return array of statements - * @access public - */ - function entailStatement (& $statement) - { - $infStatementsIndex=array(); - return $this->_entailStatementRec($statement,$infStatementsIndex); - } - - /** - * Recursive method, that checks the statement with the trigger of - * every rule. If the trigger matches and entails new statements, - * those statements are recursively infered too. - * The $infStatementsIndex array holds lready infered statements - * to prevent infinite loops. - * - * - * @param object Statement $statement - * @param array $infStatementsIndex - * @return array of statements - * @access private - */ - function _entailStatementRec ( $statement,& $infStatementsIndex) - { - $infStatements = array(); - $return = array(); - - //dont entail statements about the supported inference-schema - if (!in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - //check only the rules, that were returned by the index - foreach ($this->_findRuleTriggerInIndex($statement) as $key ) - { - $infRule=$this->infRules[$key]; - - $stateString=$key.serialize($statement); - //If the statement wasn't infered before - if (!in_array($stateString,$infStatementsIndex)) - { - $infStatementsIndex[]=$stateString; - //Check, if the Statements triggers this rule - if($infRule->checkTrigger($statement)) - { - $infStatement=$infRule->entail($statement); - #if(!$this->contains($infStatement)) - { - $return[]=$infStatement; - $return=array_merge($return, - $this->_entailStatementRec($infStatement, - $infStatementsIndex)); - }; - - }; - }; - }; - }; - return $return; - } - - /** - * Removes all infered statements from the model but keeps the - * infernece rules. - * - * @access public - */ - function removeInfered() - { - $indexTmp=$this->indexed; - $this->index(-1); - foreach ($this->infPos as $key) - { - unset($this->triples[$key]); - }; - $this->infPos=array(); - $this->index($indexTmp); - } - - - /** - * Load a model from a file containing RDF, N3 or N-Triples. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string - * ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to - * this DbModel. - * - * While loading the model, the inference entailing is disabled, but - * new inference rules are added to increase performance. - * - * @param string $filename - * @param string $type - * @access public - */ - function load($filename, $type = NULL) - { - //Disable entailing to increase performance - $this->inferenceEnabled=false; - parent::load($filename, $type); - //Enable entailing - $this->inferenceEnabled=true; - //Entail all statements - $this->applyInference(); - } - - /** - * Short Dump of the InfModelF. - * - * @access public - * @return string - */ - function toString() { - return 'InfModelF[baseURI=' . $this->getBaseURI() . '; - size=' . $this->size(true) . ']'; - } - - /** - * Create a MemModel containing all the triples (including inferred - * statements) of the current InfModelF. - * - * @return object MemModel - * @access public - */ - function & getMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $statement) - $return->add($statement); - - $return->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Create a MemModel containing only the base triples - * (without inferred statements) of the current InfModelF. - * - * @return object MemModel - * @access public - */ - function getBaseMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $key => $statement) - if (!in_array($key,$this->infPos)) - $return->add($statement); - $retun->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - //If the statement is in the model - if($this->contains($statement)) - { - $inferenceRulesWereTouched=false; - //If the statement was able to add inference rules - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - $statementPositions=$this->_removeFromInference($statement); - $inferenceRulesWereTouched=true; - } else - //get the position of all matching statements - { - $statementPositions=array(); - //find the positions of the statements - $statementPosition=-1; - do - { - - $statementPosition = - $this->findFirstMatchOff($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - $statementPosition+1); - - if ($statementPosition!=-1) - $statementPositions[]=$statementPosition; - - } while ($statementPosition != -1); - } - - //remove matching statements - parent::remove($statement); - foreach ($statementPositions as $statementPosition) - { - //if the statement was infered, remove it from the index of the infered statements. - if (in_array($statementPosition,$this->infPos)) - unset ($this->infPos[$statementPosition]); - } - if ($inferenceRulesWereTouched) - { - //remove the statement and re-entail the model - $this->removeInfered(); - $this->applyInference(); - } - return true; - } else - { - return false; - } - } - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) - { - //Disable entailing to increase performance - $this->inferenceEnabled=false; - parent::addModel($model); - //Enable entailing - $this->inferenceEnabled=true; - //Entail all statements - $this->applyInference(); - } -}; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelP.php.svn-base deleted file mode 100755 index 7fefd7f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfModelP.php.svn-base +++ /dev/null @@ -1,19 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include InfModel classes -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfRule.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfStatement.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfRule.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfRule.php.svn-base deleted file mode 100755 index eac153b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfRule.php.svn-base +++ /dev/null @@ -1,343 +0,0 @@ - - - * - * @package infModel - * @access public - **/ - -class InfRule -{ - - /** - * Array, that hold the trigger subject in key ['s'], the trigger - * predicate in ['p'], and the trigger object in ['o']. - * The array values can be NULL to match anything or be a node that - * has to be matched. - * - * @var array - * @access private - */ - var $trigger; - - /** - * Array, that hold the entailment subject in key ['s'], the - * entailment predicate in ['p'], and the entailment object in ['o']. - * The array values can be a node that will be inserted in the - * returning statement, or '' to insert the subject,'

' to insert - * the predicate, or '' to insert the object of the checked statement - * to this position in the new returned statement. - * - * @var array - * @access private - */ - var $entailment; - - - /** - * Constructor - * - * - * @access public - */ - function infRule() - { - //initialising vars - $this->trigger=array(); - $this->entailment=array(); - } - - /** - * Sets the trigger of this rule - * The values can be NULL to match anything or be a node that has to - * be matched. - * - * @param object Node OR NULL $subject - * @param object Node OR NULL $predicate - * @param object Node OR NULL $object - * @access public - * @throws PhpError - */ - function setTrigger ($subject, $predicate, $object) - { - //throw an error if subject, predicate, or object are neither - //node, nor null. - if(!is_a($subject,'Node') && $subject != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $subject has to be null or of class Node' - , E_USER_ERROR); - if(!is_a($predicate,'Node') && $predicate != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $predicate has to be null or of class Node' - , E_USER_ERROR); - if(!is_a($object,'Node') && $object != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $object has to be null or of class Node' - , E_USER_ERROR); - - //set the trigger - $this->trigger['s']=$subject; - $this->trigger['p']=$predicate; - $this->trigger['o']=$object; - } - - /** - * Sets the entailment of this rule - * The values can be NULL to match anything or be a node that has to - * be matched. - * - * @param object Node OR NULL $subject - * @param object Node OR NULL $predicate - * @param object Node OR NULL $object - * @access public - * @throws PhpError - */ - function setEntailment($subject,$predicate,$object) - { - //throw an error if subject, predicate, or object are neither node, - //nor ,

,. - if(!is_a($subject,'Node') && !ereg('<[spo]>', $subject)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $subject has to be ,

,or or of class Node' - , E_USER_ERROR); - if(!is_a($predicate,'Node') && !ereg('<[spo]>', $predicate)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $predicate has to be ,

,or or of class Node' - , E_USER_ERROR); - if(!is_a($object,'Node') && !ereg('<[spo]>', $object)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $object has to be ,

,or or of class Node' - , E_USER_ERROR); - - $this->entailment['s']=$subject; - $this->entailment['p']=$predicate; - $this->entailment['o']=$object; - } - - /** - * Checks, if the statement satisfies the trigger. - * - * @param object Statement - * @return boolean - * @access public - * @throws PhpError - */ - function checkTrigger(& $statement) - { - //is true, if the trigger is null to match anything - //or equals the statement's subject - $shouldFireS = $this->trigger['s'] == null || - $this->trigger['s']->equals($statement->getSubject()); - - //is true, if the trigger is null to match anything - //or equals the statement's predicate - $shouldFireP = $this->trigger['p'] == null || - $this->trigger['p']->equals($statement->getPredicate()); - - //is true, if the trigger is null to match anything - //or equals the statement's object - $shouldFireO = $this->trigger['o'] == null || - $this->trigger['o']->equals($statement->getObject()); - - //returns true, if ALL are true - return $shouldFireS && $shouldFireP && $shouldFireO; - } - - /** - * Checks, if this rule could entail a statement that matches - * a find of $subject,$predicate,$object. - * - * @param object Statement - * @return boolean - * @access public - * @throws PhpError - */ - function checkEntailment ($subject, $predicate, $object) - { - //true, if $subject is null, the entailment's subject matches - //anything, or the $subject equals the entailment-subject. - $matchesS= $subject == null || - !is_a($this->entailment['s'],'Node') || - $this->entailment['s']->equals($subject); - - //true, if $predicate is null, the entailment's predicate matches - //anything, or the $predicate equals the entailment-predicate. - $matchesP= $predicate == null || - !is_a($this->entailment['p'],'Node') || - $this->entailment['p']->equals($predicate); - - //true, if $object is null, the entailment's object matches - //anything, or the $object equals the entailment-object. - $matchesO= $object == null || - !is_a($this->entailment['o'],'Node') || - $this->entailment['o']->equals($object); - - //returns true, if ALL are true - return $matchesS && $matchesP && $matchesO; - } - - /** - * Returns a infered InfStatement by evaluating the statement with - * the entailment rule. - * - * @param object Statement - * @return object InfStatement - * @access public - * @throws PhpError - */ - function entail(& $statement) - { - //if the entailment's subject is ,

,or , put the statements - //subject,predicate,or object into the subject of the - //entailed statement. If the entailment's subject is a node, - //add that node to the statement. - switch ($this->entailment['s']) - { - case '': - $entailedSubject=$statement->getSubject(); - break; - case '

': - $entailedSubject=$statement->getPredicate(); - break; - case '': - $entailedSubject=$statement->getObject(); - break; - default: - $entailedSubject=$this->entailment['s']; - }; - - //if the entailment's predicate is ,

,or , put the - //statements subject,predicate,or object into the predicate of - //the entailed statement. If the entailment's predicate is a node, - //add that node to the statement. - switch ($this->entailment['p']) - { - case '': - $entailedPredicate=$statement->getSubject(); - break; - case '

': - $entailedPredicate=$statement->getPredicate(); - break; - case '': - $entailedPredicate=$statement->getObject(); - break; - default: - $entailedPredicate=$this->entailment['p']; - }; - - //if the entailment's object is ,

,or , put the - //statements subject,predicate,or object into the object of - //the entailed statement. If the entailment's object is a node, - //add that node to the statement. - switch ($this->entailment['o']) - { - case '': - $entailedObject=$statement->getSubject(); - break; - case '

': - $entailedObject=$statement->getPredicate(); - break; - case '': - $entailedObject=$statement->getObject(); - break; - default: - $entailedObject=$this->entailment['o']; - }; - - //return the infered statement - return (new InfStatement($entailedSubject,$entailedPredicate,$entailedObject)); - } - - /** - * Returns a find-query that matches statements, whose entailed - * statements would match the supplied find query. - * - * @param Node OR null $subject - * @param Node OR null $predicate - * @param Node OR null $object - * @return array - * @access public - * @throws PhpError - */ - function getModifiedFind( $subject, $predicate, $object) - { - $findSubject=$this->trigger['s']; - $findPredicate=$this->trigger['p']; - $findObject=$this->trigger['o']; - - switch ($this->entailment['s']) - { - case '': - $findSubject=$subject; - break; - case '

': - $findPredicate=$subject; - break; - case '': - $findObject=$subject; - break; - }; - - switch ($this->entailment['p']) - { - case '': - $findSubject=$predicate; - break; - case '

': - $findPredicate=$predicate; - break; - case '': - $findObject=$predicate; - break; - }; - - switch ($this->entailment['o']) - { - case '': - $findSubject=$object; - break; - case '

': - $findPredicate=$object; - break; - case '': - $findObject=$object; - break; - }; - - return array('s' => $findSubject, - 'p' => $findPredicate, - 'o' => $findObject ); - } - - function getTrigger() - { - return array ( 's' => $this->trigger['s'], - 'p' => $this->trigger['p'], - 'o' => $this->trigger['o'], - ); - } - - function getEntailment() - { - return array ( 's' => $this->entailment['s'], - 'p' => $this->entailment['p'], - 'o' => $this->entailment['o'], - ); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfStatement.php.svn-base deleted file mode 100755 index 7ea84ad7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/.svn/text-base/InfStatement.php.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - - * @version $Id$ - * @package infModel - */ -class InfStatement extends Statement { - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModel.php deleted file mode 100755 index bc1576ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModel.php +++ /dev/null @@ -1,678 +0,0 @@ - - * - * @package infModel - * @access public - */ - -class InfModel extends MemModel -{ - /** - * Array that holds the objects of the class Infrule, - * which were assigned by the _addToInference() function - * - * @var array - * @access private - */ - var $infRules; - - /** - * Array of URI-Strings that produces Infrules. - * - * @var array - * @access private - */ - var $supportedInference; - - /** - * Array of the connection between the infrules and the statement - * that assigned those rules. - * array[2][3]=true;array[2][5]=true means, that statement 2 - * assigned rule 3 & 5 to the model. - * - * @var array - * @access private - */ - var $statementRuleIndex; - - /** - * Array of the infRule triggers and the matching infrules. - * $this->infRulesTriggerIndex['s'] for subject index, ['p'] for predicates, - * and ['o'] for objects. - * - * @var array - * @access private - */ - var $infRulesTriggerIndex; - - /** - * Array of the infRule entailments and the matching infrules. - * $this->infRulesEntailIndex['s'] for subject index, ['p'] for predicates, - * and ['o'] for objects. - * - * @var array - * @access private - */ - var $infRulesEntailIndex; - - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function InfModel ($baseURI = NULL) - { - //call the memmodel constructor method - parent::MemModel($baseURI); - //initialise vars - $this->infRulesTriggerIndex['s']=array(); - $this->infRulesTriggerIndex['p']=array(); - $this->infRulesTriggerIndex['o']=array(); - $this->infRulesEntailIndex['s']=array(); - $this->infRulesEntailIndex['p']=array(); - $this->infRulesEntailIndex['o']=array(); - $this->infRules=array(); - $this->statementRuleIndex = array(); - //arraylist of predicate labels that shall add inference rules - //to the model - //The constants, wich statements will create rules can be configured in constants.php - if (INF_RES_SUBCLASSOF) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBCLASSOF; - - if (INF_RES_SUBPROPERTYOF) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF; - - if (INF_RES_RANGE) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_RANGE; - - if (INF_RES_DOMAIN) - $this->supportedInference[] = RDF_SCHEMA_URI.RDFS_DOMAIN; - - if (INF_RES_OWL_SAMEAS) - $this->supportedInference[] = OWL_URI.OWL_SAME_AS; - - if (INF_RES_OWL_INVERSEOF) - $this->supportedInference[] = OWL_URI.OWL_INVERSE_OF; - - //Rule: rdfs12 - if (INF_RES_RULE_RDFS12) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.'ContainerMembershipProperty')); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),new Resource(RDF_SCHEMA_URI.'member')); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs6 - if (INF_RES_RULE_RDFS6) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_NAMESPACE_URI.RDF_PROPERTY)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),''); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs8 - if (INF_RES_RULE_RDFS8) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_RESOURCE)); - $this->_addInfRule($infRule,'base'); - - } - - //Rule: rdfs10 - if (INF_RES_RULE_RDFS10) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),''); - $this->_addInfRule($infRule,'base'); - } - - //Rule: rdfs13 - if (INF_RES_RULE_RDFS13) - { - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_DATATYPE)); - $infRule->setEntailment('',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_LITERAL)); - $this->_addInfRule($infRule,'base'); - } - - } - - /** - * Adds a new triple to the Model without checking if the statement - * is already in the Model. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() - * function (which is slower then add()) - * If the statement's predicate label is supported by the inference, - * the matching rules are added. - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - parent::add($statement); - //if the predicate is supported by the inference - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - $this->_addToInference($statement); - }; - } - - /** - * This function analyses the statement's predicate and adds the - * matching infrule to the model. - * - * @param object Statement $statement - * @access private - */ - function _addToInference($statement) - { - $predicateLabel=$statement->getLabelPredicate(); - //get the position of the the statement in the model - end($this->triples); - $statementPosition=key($this->triples); - - switch ($predicateLabel) - { - case RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF : - //create a new rule - $infRule=new InfRule(); - //set the trigger to match all statements, having a - //predicate, that matches the subject of the statement that - //created this rule. - $infRule->setTrigger(null,$statement->getSubject(),null); - //set the infrule to return a statement, having the same - //subject and object as the statement, that asked for an - //entailment, and having the object of the statement, - //that created this rule as predicate. - $infRule->setEntailment('',$statement->getObject(),''); - //add the infule to Model, Statement/Rule-Index, - //and Rule/Trigger (or Rule/Entailment) index - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_SUBCLASSOF : - $infRule=new InfRule(); - $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getSubject()); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_DOMAIN : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case RDF_SCHEMA_URI.RDFS_RANGE : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject()); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case OWL_URI.OWL_INVERSE_OF : - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',$statement->getObject(),''); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getObject(),null); - $infRule->setEntailment('',$statement->getSubject(),''); - $this->infRules[]=$infRule; - $this->_addInfRule($infRule,$statementPosition); - break; - - case OWL_URI.OWL_SAME_AS : - $infRule=new InfRule(); - $infRule->setTrigger($statement->getSubject(),null,null); - $infRule->setEntailment($statement->getObject(),'

',''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger($statement->getObject(),null,null); - $infRule->setEntailment($statement->getSubject(),'

',''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getSubject(),null); - $infRule->setEntailment('',$statement->getObject(),''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,$statement->getObject(),null); - $infRule->setEntailment('',$statement->getSubject(),''); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,null,$statement->getSubject()); - $infRule->setEntailment('','

',$statement->getObject()); - $this->_addInfRule($infRule,$statementPosition); - - $infRule=new InfRule(); - $infRule->setTrigger(null,null,$statement->getObject()); - $infRule->setEntailment('','

',$statement->getSubject()); - $this->_addInfRule($infRule,$statementPosition); - break; - }; - } - - /** - * This function checks, which infrules were added by the statement and - * removes those. - * - * @param object Statement $statement - * @return integer - * @access private - */ - function _removeFromInference($statement) - { - $return= array(); - $statementPosition=-1; - do - { - //get the position of the statement that should be removed - $statementPosition=$this->findFirstMatchOff($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - $statementPosition+1); - if ($statementPosition!=-1) - { - //if it added any rules - if (isset ($this->statementRuleIndex[$statementPosition])) - { - //remove all rules - foreach ($this->statementRuleIndex[$statementPosition] as $key => $value) - { - //remove from Rule-Trigger Index - if (is_a($this,'InfModelF')) - { - $trigger=$this->infRules[$key]->getTrigger(); - - if(is_a($trigger['s'],'Node')) - { - $subjectLabel=$trigger['s']->getLabel(); - } else - { - $subjectLabel='null'; - } - unset ($this->infRulesTriggerIndex['s'][$subjectLabel][array_search($key,$this->infRulesTriggerIndex['s'][$subjectLabel])]); - - if(is_a($trigger['p'],'Node')) - { - $predicateLabel=$trigger['p']->getLabel(); - } else - { - $predicateLabel='null'; - } - unset ($this->infRulesTriggerIndex['p'][$predicateLabel][array_search($key,$this->infRulesTriggerIndex['p'][$predicateLabel])]); - - if(is_a($trigger['o'],'Node')) - { - $objectLabel=$trigger['o']->getLabel(); - } else - { - $objectLabel='null'; - } - unset ($this->infRulesTriggerIndex['o'][$objectLabel][array_search($key,$this->infRulesTriggerIndex['o'][$objectLabel])]); - } else - //remove from Rule-Entailment Index - { - $entailment=$this->infRules[$key]->getEntailment(); - - if(is_a($entailment['s'],'Node')) - { - $subjectLabel=$entailment['s']->getLabel(); - } else - { - $subjectLabel='null'; - } - unset ($this->infRulesEntailIndex['s'][$subjectLabel][array_search($key,$this->infRulesEntailIndex['s'][$subjectLabel])]); - - - if(is_a($entailment['p'],'Node')) - { - $predicateLabel=$entailment['p']->getLabel(); - } else - { - $predicateLabel='null'; - } - unset ($this->infRulesEntailIndex['p'][$predicateLabel][array_search($key,$this->infRulesEntailIndex['p'][$predicateLabel])]); - - if(is_a($entailment['o'],'Node')) - { - $objectLabel=$entailment['o']->getLabel(); - } else - { - $objectLabel='null'; - } - unset ($this->infRulesEntailIndex['o'][$objectLabel][array_search($key,$this->infRulesEntailIndex['o'][$objectLabel])]); - } - //remove from statement-Rule Index - unset ($this->infRules[$key]); - } - unset($this->statementRuleIndex[$statementPosition]); - $return[]=$statementPosition; - }; - } - - } while($statementPosition!=-1); - - //return the positions of the statements to be removed OR emty array - //if nothing was found. - return $return; - } - - /** - * Returns a model, containing all Statements, having a Predicate, that - * is supported by the inference. - * - * @return object Model - * @access public - */ - function getSchema() - { - $res=new MemModel(); - //Search the base-model for all statements, having a Predicate, that - //is supported by the inference. - foreach ($this->supportedInference as $inferencePredicateLabel) - { - $res->addModel($this->find(null, new Resource($inferencePredicateLabel), null)); - } - return $res; - } - - /** - * General method to replace nodes of a MemModel. - * This function is disabled in the Inference Model. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object Node $replacement - * @access public - * @throws PhpError - */ - function replace($subject, $predicate, $object, $replacement) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: replace): This function is disabled in the Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches the regular - * expression. - * Returns an empty MemModel if nothing is found. - * - * This function is disabled in the Inference Model - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: findRegex): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Returns all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at - * the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Returns an empty MemModel if nothing is found. - * - * This function is disabled in the Inference Model. - * - * @param string $vocabulary - * @return object MemModel - * @access public - */ - function findVocabulary($vocabulary) - { - - $errmsg = RDFAPI_ERROR . '(class: InfModel; method: findVocabulary): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Adds the URI or NULL to the Infrule trigger or entailment index. - * - * - * @param object infrule $infRule - * @param integer $infRulePosition - * @access private - */ - function _addInfruleToIndex(& $infRule,& $infRulePosition) - { - //Add the rule only to the trigger index, if it is a InfFModel - if (is_a($this,'InfModelF')) - { - //get the trigger - $trigger = $infRule->getTrigger(); - //evaluate and set the index - if ($trigger['s'] == null) - { - $this->infRulesTriggerIndex['s']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['s'][$trigger['s']->getLabel()][]=$infRulePosition; - }; - - if ($trigger['p'] == null) - { - $this->infRulesTriggerIndex['p']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['p'][$trigger['p']->getLabel()][]=$infRulePosition; - }; - - if ($trigger['o'] == null) - { - $this->infRulesTriggerIndex['o']['null'][]=$infRulePosition; - } else - { - $this->infRulesTriggerIndex['o'][$trigger['o']->getLabel()][]=$infRulePosition; - }; - } else - //add to entailment Index if it is a BModel - { - //get the entailment - $entailment = $infRule->getEntailment(); - //evaluate the entailment and add to index - if (!is_a($entailment['s'],'Node')) - { - $this->infRulesEntailIndex['s']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['s'][$entailment['s']->getLabel()][]=$infRulePosition; - }; - - if (!is_a($entailment['p'],'Node')) - { - $this->infRulesEntailIndex['p']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['p'][$entailment['p']->getLabel()][]=$infRulePosition; - }; - - if (!is_a($entailment['o'],'Node')) - { - $this->infRulesEntailIndex['o']['null'][]=$infRulePosition; - } else - { - $this->infRulesEntailIndex['o'][$entailment['o']->getLabel()][]=$infRulePosition; - }; - }; - } - - /** - * Searches the trigger-index for a matching trigger and returns an - * array of infRule positions. - * - * - * @param object infrule $infRule - * @return array integer - * @access private - */ - function _findRuleTriggerInIndex($statement) - { - $return=array(); - //a statement's subject matches all triggers with null and the same URI - $subjectLabel=$statement->getLabelSubject(); - $inIndexS=array(); - if (isset($this->infRulesTriggerIndex['s']['null'])) - $inIndexS=array_values($this->infRulesTriggerIndex['s']['null']); - if (isset($this->infRulesTriggerIndex['s'][$subjectLabel])) - $inIndexS= array_merge($inIndexS,array_values($this->infRulesTriggerIndex['s'][$subjectLabel])); - - //a statement's predicate matches all triggers with null and the same URI - $predicateLabel=$statement->getLabelPredicate(); - $inIndexP=array(); - if (isset($this->infRulesTriggerIndex['p']['null'])) - $inIndexP=array_values($this->infRulesTriggerIndex['p']['null']); - if (isset($this->infRulesTriggerIndex['p'][$predicateLabel])) - $inIndexP= array_merge($inIndexP,array_values($this->infRulesTriggerIndex['p'][$predicateLabel])); - - //a statement's object matches all triggers with null and the same URI - $objectLabel=$statement->getLabelObject(); - $inIndexO=array(); - if (isset($this->infRulesTriggerIndex['o']['null'])) - $inIndexO=array_values($this->infRulesTriggerIndex['o']['null']); - if (isset($this->infRulesTriggerIndex['o'][$objectLabel])) - $inIndexO= array_merge($inIndexO,array_values($this->infRulesTriggerIndex['o'][$objectLabel])); - - //if an infrule position occurs in subject, predicate, and object index, add to result array. - foreach ($inIndexP as $positionP) - { - if (in_array($positionP,$inIndexO)) - if (in_array($positionP,$inIndexS)) - $return[]=$positionP; - } - return $return; - } - - /** - * Searches the Entailment-index for a matching Entailment and returns an - * array of infRule positions. - * - * - * @param node or null $subject - * @param node or null $predicate - * @param node or null $object - * @return array integer - * @access private - */ - function _findRuleEntailmentInIndex($subject,$predicate,$object) - { - $return=array(); - //a node matches all entailments with NULL or a matching URI - if(is_a($subject,'Node')) - { - $subjectLabel=$subject->getLabel(); - $inIndexS=array(); - if (isset($this->infRulesEntailIndex['s']['null'])) $inIndexS=array_values($this->infRulesEntailIndex['s']['null']); - if (isset($this->infRulesEntailIndex['s'][$subjectLabel])) $inIndexS= array_merge($inIndexS,array_values($this->infRulesEntailIndex['s'][$subjectLabel])); - } else - //if the subject search pattern is NULL, every rule will match the subject search patter - { - $inIndexS=array_keys($this->infRules); - } - - if(is_a($predicate,'Node')) - { - $predicateLabel=$predicate->getLabel(); - $inIndexP=array(); - if (isset($this->infRulesEntailIndex['p']['null'])) $inIndexP=array_values($this->infRulesEntailIndex['p']['null']); - if (isset($this->infRulesEntailIndex['p'][$predicateLabel])) $inIndexP= array_merge($inIndexP,array_values($this->infRulesEntailIndex['p'][$predicateLabel])); - } else - { - $inIndexP=array_keys($this->infRules); - } - - if(is_a($object,'Node')) - { - $objectLabel=$object->getLabel(); - $inIndexO=array(); - if (isset($this->infRulesEntailIndex['o']['null'])) $inIndexO=array_values($this->infRulesEntailIndex['o']['null']); - if (isset($this->infRulesEntailIndex['o'][$objectLabel])) $inIndexO= array_merge($inIndexO,array_values($this->infRulesEntailIndex['o'][$objectLabel])); - } else - { - $inIndexO=array_keys($this->infRules); - } - - //if an infrule position occurs in subject, predicate, and object index, add to result array. - foreach ($inIndexP as $positionP) - { - if (in_array($positionP,$inIndexO)) - if (in_array($positionP,$inIndexS)) - $return[]=$positionP; - } - return $return; - } - - /** - * Adds an InfRule to the InfModel. - * $statementPosition states the positiion of the statement, that created - * this rule, in the model->triples array. - * - * - * @param object Infrule $infRule - * @param integer $statementPosition - * @access private - */ - function _addInfRule($infRule, $statementPosition) - { - //add the rule - $this->infRules[]=$infRule; - //get the position of the added rule in the model - end($this->infRules); - $rulePosition=key($this->infRules); - //add the information to the index, that this statement - //added this rule. - $this->statementRuleIndex[$statementPosition][$rulePosition]=true; - //add informations to index over trigger & entailment - $this->_addInfruleToIndex($infRule,$rulePosition); - } - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelB.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelB.php deleted file mode 100755 index f4a36614..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelB.php +++ /dev/null @@ -1,515 +0,0 @@ - - -* -* @package infModel -* @access public -**/ - -class InfModelB extends InfModel -{ - - /** - * Array that holds combinations of inference rules with distinct - * find-querys, that don't lead to any inference. - * - * @var array - * @access private - */ - var $findDeadEnds; - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function InfModelB($baseURI = null) - { - parent::InfModel($baseURI); - $this->findDeadEnds=array(); - } - - /** - * Adds a new triple to the Model without checking, if the statement - * is already in the Model. So if you want a duplicate free Model use - * the addWithoutDuplicates() function (which is slower then add()) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - parent::add($statement); - //Reset the found dead-ends. - $this->findDeadEnds=array(); - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * Returns an empty MemModel if nothing is found. - * To improve the search speed with big Models, call index(INDEX_TYPE) - * before seaching. - * - * It recursively searches in the statements and rules to find - * matching statements. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return object MemModel - * @access public - * @throws PhpError - */ - function find($subject,$predicate,$object) - { - $searchStringIndex=array(); - $resultModel=new MemModel(); - - //add all infered statements without duplicates to the result model - foreach ($this->_infFind($subject,$predicate,$object,array())as $statement) - { - $resultModel->addWithoutDuplicates($statement); - }; - return $resultModel; - } - - /** - * This is the main inference method of the InfModelB - * The algorithm works as follows: - * Find all statements in the base model, that matches the current - * find-query. - * Check all rules, if they are able to deliver infered statements, - * that match the current find-query. Don't use rules with queries, - * that lead to dead-ends and don't use a rule-query-combination that - * was used before in this branch (ontology loops). - * If a rule is possible do deliver such statements, get a new - * find-query, that is possible to find those statements, that are able - * to trigger this rule. - * Call this _infFind method wirh the new find-query and entail the - * resulting statements. - * If this rule, wasn't able to return any statements with this distinct - * query, add this combination to the dead-ends. - * Return the statements from the base triples and those, which were infered. - * - * If $findOnlyFirstMatching is set to true, only the first match in - * the base-statements is entailed an returned (used in contains() and - * findFirstMatchingStatement() methods). - * - * You can set an offset to look for the first matching statement by setting the - * $offset var. - * - * It recursively searches in the statements and rules to find matching - * statements - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param array $searchStringIndex - * @param boolean $findOnlyFirstMatching - * @param integer $offset - * @param integer $resultCount - * @return object array Statements - * @access private - */ - function _infFind ($subject,$predicate,$object, $searchStringIndex, $findOnlyFirstMatching = false, $offset = 0,$resultCount = 0 ) - { - $return=array(); - //Find all matching statements in the base statements - $findResult=parent::find($subject,$predicate,$object); - //For all found statements - foreach ($findResult->triples as $statement) - { - $return[]=$statement; - $resultCount++; - - //Return, if only the firstMatchingStatement was wanted - if ($findOnlyFirstMatching && $resultCount > $offset) - return $return; - }; - - //Don't infer statements about the schema (rdfs:subClass, etc..) - //is false - if ($predicate == null || - (is_a($predicate,'Node') && - !in_array($predicate->getLabel(),$this->supportedInference)) - ) - //Check only Rules, that the EntailmentIndex returned. - foreach ($this->_findRuleEntailmentInIndex($subject,$predicate,$object) as $ruleKey) - { - $infRule=$this->infRules[$ruleKey]; - $serializedRuleStatement=$ruleKey.serialize($subject).serialize($predicate).serialize($object); - //If it is to ontology loop and no dead-end - if (!in_array($serializedRuleStatement, $searchStringIndex) && - !in_array($serializedRuleStatement, $this->findDeadEnds)) - { - //Keep this distinct rule query cobination for - //this branch to detect loops - $searchStringIndex[]=$serializedRuleStatement; - - //If the rule is able to deliver statements that match - //this query - if ($infRule->checkEntailment($subject,$predicate,$object)) - { - //Get a modified find-query, that matches statements, - //that trigger this rule - $modefiedFind=$infRule->getModifiedFind($subject,$predicate,$object); - //Call this method with the new find-query - $infFindResult=$this->_infFind($modefiedFind['s'], - $modefiedFind['p'], - $modefiedFind['o'], - $searchStringIndex, - $findOnlyFirstMatching, - $offset, - $resultCount) ; - //If it deliverd statements that matches the trigger - if (isset($infFindResult[0])) - { - foreach ($infFindResult as $statement) - { - //Entail the statements and check, if they are not about the - //ontology - $newStatement=$infRule->entail($statement); - if (!in_array($newStatement->getLabelPredicate(),$this->supportedInference)) - //Check if, the entailed statements are, what we are looking for - if($this->_nodeEqualsFind($subject,$newStatement->getSubject()) && - $this->_nodeEqualsFind($predicate,$newStatement->getPredicate()) && - $this->_nodeEqualsFind($object,$newStatement->getObject() ) ) - { - //Add to results - $return[]=$newStatement; - $resultCount++; - - //or return at once - if ($findOnlyFirstMatching && $resultCount > $offset) - return $return; - } - } - } else - { - //If there were no results of the rule-query-combination, - //mark this combination as a dead-end. - $this->findDeadEnds[]=$serializedRuleStatement; - } - } - } - } - //Return the array of the found statements - return $return; - } - - /** - * Tests if the Model contains the given triple. - * TRUE if the triple belongs to the Model; - * FALSE otherwise. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) - { - //throws an error, if $statement is not of class Statement - if(!is_a($statement,'Statement')) - trigger_error(RDFAPI_ERROR . '(class: InfModelB; method: contains): - $statement has to be object of class Statement', E_USER_ERROR); - - //Call the _infFind method, but let it stop, if it finds the first match. - if (count( $this->_infFind($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - array(),true) ) >0) - { - return true; - } else - { - return false; - }; - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement of the MemModel where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search for. Default = 0 - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) - { - //Call the _infFind method, but let it stop, if it finds the - //first match. - $res= $this->_infFind($subject,$predicate,$object,array(),true,$offset); - - if (isset($res[$offset])) - { - return $res[$offset]; - } else - { - return NULL; - }; - } - - /** - * Returns a StatementIterator for traversing the Model. - * - * @access public - * @return object StatementIterator - */ - function & getStatementIterator() - { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - // Gets a MemModel by executing a find(null,null,null) to get a - //inferable statements. - // WARNING: might be slow - return new StatementIterator($this->getMemModel()); - } - - /** - * Number of all inferable triples in the Model. - * WARNING: uses a find(null,null,null) to find all statements! (might take a while) - * - * @param boolean - * @return integer - * @access public - */ - function size() - { - // Gets a MemModel by executing a find(null,null,null) to get a - //inferable statements. - // WARNING: might be slow - $res = $this->getMemModel(); - return $res->size(); - } - - /** - * Create a MemModel containing all the triples (including inferred - * statements) of the current InfModelB. - * - * @return object MemModel - * @access public - */ - function & getMemModel() - { - - $return=$this->find(null,null,null); - $return->setBaseURI($this->baseURI); - $return->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Create a MemModel containing only the base triples (without inferred - * statements) of the current InfModelB. - * - * @return object MemModel - * @access public - */ - function & getBaseMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $statement) - $return->add($statement); - - $retun->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Short Dump of the InfModelB. - * - * @access public - * @return string - */ - function toString() - { - return 'InfModelB[baseURI=' . $this->getBaseURI() . '; size=' . $this->size(true) . ']'; - } - - /** - * Dumps of the InfModelB including ALL inferable triples. - * - * @access public - * @return string - */ - function toStringIncludingTriples() - { - $dump = $this->toString() . chr(13); - $stateIt=new StatementIterator($this->find(null,null,null)); - while($statement=$stateIt->next()) - { - $dump .= $statement->toString() . chr(13); - } - return $dump; - } - - /** - * Saves the RDF,N3 or N-Triple serialization of the full InfModelB - * (including inferred triples) to a file. - * You can decide to which format the model should be serialized by - * using a corresponding suffix-string as $type parameter. If no $type - * parameter is placed this method will serialize the model to XML/RDF - * format. - * Returns FALSE if the InfModelB couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') - { - - $memmodel=$this->getMemModel(); - return $memmodel->saveAs($filename, $type); - } - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples as HTML. - * - * @access public - */ - function writeAsHtml() - { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this->getMemModel()); - $rdf = htmlspecialchars($rdf, ENT_QUOTES); - $rdf = str_replace(' ', ' ', $rdf); - $rdf = nl2br($rdf); - echo $rdf; - } - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples as HTML table. - * - * @access public - */ - function writeAsHtmlTable() - { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - RDFUtil::writeHTMLTable($this->getMemModel()); - } - - - /** - * Writes the RDF serialization of the Model including ALL inferable - * triples. - * - * @access public - * @return string - */ - function writeRdfToString() - { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this->getMemModel()); - return $rdf; - } - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - if (parent::contains($statement)) - { - if (in_array($statement->getLabelPredicate(),$this->supportedInference)); - while (count($this->_removeFromInference($statement))>0); - - $this->findDeadEnds=array(); - return parent::remove($statement); - } else - { - return false; - } - } - - /** - * Checks, if a single node matches a single find pattern. - * TRUE if the node matches. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model. - * - * @param object Statement $statement - * @return boolean - * @access private - */ - function _nodeEqualsFind(& $find, $node) - { - //If the find pattern is a node, use the nodes equal-method and - //return the result. - if (is_a($find,'Node')) - return $node->equals($find); - - //Null-pattern matches anything. - if ($find == null) - { - return true; - } else - { - return false; - } - } - - /** - * Returns a FindIterator for traversing the MemModel. - * Disabled in InfModelB. - * - * @access public - * @return object FindIterator - */ - function & findAsIterator($sub=null,$pred=null,$obj=null) { - $errmsg = RDFAPI_ERROR . '(class: InfModelB; method: findAsIterator): - This function is disabled in the - Inference Model'; - trigger_error($errmsg, E_USER_ERROR); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelF.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelF.php deleted file mode 100755 index d338c1cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelF.php +++ /dev/null @@ -1,406 +0,0 @@ - - -* -* @package infModel -* @access public -**/ - -class InfModelF extends InfModel -{ - - /** - * Array that holds the position of the infered statements in the model. - * - * @var array - * @access private - */ - var $infPos; - - - /** - * Variable that influences the habbit when adding statements. - * Used by the loadModel method to increase performance. - * - * @var boolean - * @access private - */ - var $inferenceEnabled; - - - /** - * Constructor - * You can supply a base_uri. - * - * @param string $baseURI - * @access public - */ - function InfModelF($baseURI = NULL) - { - parent::InfModel($baseURI); - $this->infPos=array(); - $this->inferenceEnabled=true; - } - - /** - * Adds a new triple to the MemModel without checking if the statement - * is already in the MemModel. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() - * function (which is slower then add()) - * The statement is infered and all entailed statements are added. - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add ($statement) - { - parent::add($statement); - if ($this->inferenceEnabled) - { - foreach ($this->entailStatement($statement) as $state) - { - //a addWithoutDublicates construct - if(!$this->contains($state)) - { - - parent::add($state); - //save the position of the infered statements - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - //apply the complete inference to the model, if the added statement was able to add a rule - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - $this->applyInference(); - } - } - - - /** - * Checks if a new statement is already in the MemModel and adds - * the statement, if it is not in the MemModel. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * The statement is infered and all entailed statements are added. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates(& $statement) - { - if(!$this->contains($statement)) - { - parent::add($statement); - if ($this->inferenceEnabled) - { - foreach ($this->entailStatement($statement) as $statement) - { - if(!$this->contains($statement)) - { - parent::add($statement); - //save the position of the infered statements - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - $this->applyInference(); - } - return true; - } - return false; - } - - - - /** - * Entails every statement and adds the entailments if not already - * in the model. - * - * @access private - */ - function applyInference() - { - //check every statement in the model - foreach ($this->triples as $statement) - { - //gat all statements, that it recursively entails - foreach ($this->entailStatement($statement) as $statement) - { - if (!$this->contains($statement)) - { - parent::add($statement); - //add the InfStatement position to the index - end($this->triples); - $this->infPos[]=key($this->triples); - }; - }; - }; - } - - - /** - * Entails a statement by recursively using the _entailStatementRec - * method. - * - * @param object Statement $statement - * @return array of statements - * @access public - */ - function entailStatement (& $statement) - { - $infStatementsIndex=array(); - return $this->_entailStatementRec($statement,$infStatementsIndex); - } - - /** - * Recursive method, that checks the statement with the trigger of - * every rule. If the trigger matches and entails new statements, - * those statements are recursively infered too. - * The $infStatementsIndex array holds lready infered statements - * to prevent infinite loops. - * - * - * @param object Statement $statement - * @param array $infStatementsIndex - * @return array of statements - * @access private - */ - function _entailStatementRec ( $statement,& $infStatementsIndex) - { - $infStatements = array(); - $return = array(); - - //dont entail statements about the supported inference-schema - if (!in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - //check only the rules, that were returned by the index - foreach ($this->_findRuleTriggerInIndex($statement) as $key ) - { - $infRule=$this->infRules[$key]; - - $stateString=$key.serialize($statement); - //If the statement wasn't infered before - if (!in_array($stateString,$infStatementsIndex)) - { - $infStatementsIndex[]=$stateString; - //Check, if the Statements triggers this rule - if($infRule->checkTrigger($statement)) - { - $infStatement=$infRule->entail($statement); - #if(!$this->contains($infStatement)) - { - $return[]=$infStatement; - $return=array_merge($return, - $this->_entailStatementRec($infStatement, - $infStatementsIndex)); - }; - - }; - }; - }; - }; - return $return; - } - - /** - * Removes all infered statements from the model but keeps the - * infernece rules. - * - * @access public - */ - function removeInfered() - { - $indexTmp=$this->indexed; - $this->index(-1); - foreach ($this->infPos as $key) - { - unset($this->triples[$key]); - }; - $this->infPos=array(); - $this->index($indexTmp); - } - - - /** - * Load a model from a file containing RDF, N3 or N-Triples. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string - * ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to - * this DbModel. - * - * While loading the model, the inference entailing is disabled, but - * new inference rules are added to increase performance. - * - * @param string $filename - * @param string $type - * @access public - */ - function load($filename, $type = NULL) - { - //Disable entailing to increase performance - $this->inferenceEnabled=false; - parent::load($filename, $type); - //Enable entailing - $this->inferenceEnabled=true; - //Entail all statements - $this->applyInference(); - } - - /** - * Short Dump of the InfModelF. - * - * @access public - * @return string - */ - function toString() { - return 'InfModelF[baseURI=' . $this->getBaseURI() . '; - size=' . $this->size(true) . ']'; - } - - /** - * Create a MemModel containing all the triples (including inferred - * statements) of the current InfModelF. - * - * @return object MemModel - * @access public - */ - function & getMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $statement) - $return->add($statement); - - $return->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - /** - * Create a MemModel containing only the base triples - * (without inferred statements) of the current InfModelF. - * - * @return object MemModel - * @access public - */ - function getBaseMemModel() - { - $return= new MemModel(); - $return->setBaseURI($this->baseURI); - foreach ($this->triples as $key => $statement) - if (!in_array($key,$this->infPos)) - $return->add($statement); - $retun->addParsedNamespaces($this->getParsedNamespaces()); - return $return; - } - - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * Checks, if it touches any statements, that added inference rules - * to the model - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - //If the statement is in the model - if($this->contains($statement)) - { - $inferenceRulesWereTouched=false; - //If the statement was able to add inference rules - if (in_array($statement->getLabelPredicate(),$this->supportedInference)) - { - $statementPositions=$this->_removeFromInference($statement); - $inferenceRulesWereTouched=true; - } else - //get the position of all matching statements - { - $statementPositions=array(); - //find the positions of the statements - $statementPosition=-1; - do - { - - $statementPosition = - $this->findFirstMatchOff($statement->getSubject(), - $statement->getPredicate(), - $statement->getObject(), - $statementPosition+1); - - if ($statementPosition!=-1) - $statementPositions[]=$statementPosition; - - } while ($statementPosition != -1); - } - - //remove matching statements - parent::remove($statement); - foreach ($statementPositions as $statementPosition) - { - //if the statement was infered, remove it from the index of the infered statements. - if (in_array($statementPosition,$this->infPos)) - unset ($this->infPos[$statementPosition]); - } - if ($inferenceRulesWereTouched) - { - //remove the statement and re-entail the model - $this->removeInfered(); - $this->applyInference(); - } - return true; - } else - { - return false; - } - } - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) - { - //Disable entailing to increase performance - $this->inferenceEnabled=false; - parent::addModel($model); - //Enable entailing - $this->inferenceEnabled=true; - //Entail all statements - $this->applyInference(); - } -}; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelP.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelP.php deleted file mode 100755 index 20dc1d40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfModelP.php +++ /dev/null @@ -1,19 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include InfModel classes -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfRule.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfStatement.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php'); -require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfRule.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfRule.php deleted file mode 100755 index 8bde1e88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfRule.php +++ /dev/null @@ -1,343 +0,0 @@ - - - * - * @package infModel - * @access public - **/ - -class InfRule -{ - - /** - * Array, that hold the trigger subject in key ['s'], the trigger - * predicate in ['p'], and the trigger object in ['o']. - * The array values can be NULL to match anything or be a node that - * has to be matched. - * - * @var array - * @access private - */ - var $trigger; - - /** - * Array, that hold the entailment subject in key ['s'], the - * entailment predicate in ['p'], and the entailment object in ['o']. - * The array values can be a node that will be inserted in the - * returning statement, or '' to insert the subject,'

' to insert - * the predicate, or '' to insert the object of the checked statement - * to this position in the new returned statement. - * - * @var array - * @access private - */ - var $entailment; - - - /** - * Constructor - * - * - * @access public - */ - function infRule() - { - //initialising vars - $this->trigger=array(); - $this->entailment=array(); - } - - /** - * Sets the trigger of this rule - * The values can be NULL to match anything or be a node that has to - * be matched. - * - * @param object Node OR NULL $subject - * @param object Node OR NULL $predicate - * @param object Node OR NULL $object - * @access public - * @throws PhpError - */ - function setTrigger ($subject, $predicate, $object) - { - //throw an error if subject, predicate, or object are neither - //node, nor null. - if(!is_a($subject,'Node') && $subject != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $subject has to be null or of class Node' - , E_USER_ERROR); - if(!is_a($predicate,'Node') && $predicate != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $predicate has to be null or of class Node' - , E_USER_ERROR); - if(!is_a($object,'Node') && $object != null) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setTrigger): $object has to be null or of class Node' - , E_USER_ERROR); - - //set the trigger - $this->trigger['s']=$subject; - $this->trigger['p']=$predicate; - $this->trigger['o']=$object; - } - - /** - * Sets the entailment of this rule - * The values can be NULL to match anything or be a node that has to - * be matched. - * - * @param object Node OR NULL $subject - * @param object Node OR NULL $predicate - * @param object Node OR NULL $object - * @access public - * @throws PhpError - */ - function setEntailment($subject,$predicate,$object) - { - //throw an error if subject, predicate, or object are neither node, - //nor ,

,. - if(!is_a($subject,'Node') && !ereg('<[spo]>', $subject)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $subject has to be ,

,or or of class Node' - , E_USER_ERROR); - if(!is_a($predicate,'Node') && !ereg('<[spo]>', $predicate)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $predicate has to be ,

,or or of class Node' - , E_USER_ERROR); - if(!is_a($object,'Node') && !ereg('<[spo]>', $object)) - trigger_error(RDFAPI_ERROR . '(class: Infrule; method: - setEntailment): $object has to be ,

,or or of class Node' - , E_USER_ERROR); - - $this->entailment['s']=$subject; - $this->entailment['p']=$predicate; - $this->entailment['o']=$object; - } - - /** - * Checks, if the statement satisfies the trigger. - * - * @param object Statement - * @return boolean - * @access public - * @throws PhpError - */ - function checkTrigger(& $statement) - { - //is true, if the trigger is null to match anything - //or equals the statement's subject - $shouldFireS = $this->trigger['s'] == null || - $this->trigger['s']->equals($statement->getSubject()); - - //is true, if the trigger is null to match anything - //or equals the statement's predicate - $shouldFireP = $this->trigger['p'] == null || - $this->trigger['p']->equals($statement->getPredicate()); - - //is true, if the trigger is null to match anything - //or equals the statement's object - $shouldFireO = $this->trigger['o'] == null || - $this->trigger['o']->equals($statement->getObject()); - - //returns true, if ALL are true - return $shouldFireS && $shouldFireP && $shouldFireO; - } - - /** - * Checks, if this rule could entail a statement that matches - * a find of $subject,$predicate,$object. - * - * @param object Statement - * @return boolean - * @access public - * @throws PhpError - */ - function checkEntailment ($subject, $predicate, $object) - { - //true, if $subject is null, the entailment's subject matches - //anything, or the $subject equals the entailment-subject. - $matchesS= $subject == null || - !is_a($this->entailment['s'],'Node') || - $this->entailment['s']->equals($subject); - - //true, if $predicate is null, the entailment's predicate matches - //anything, or the $predicate equals the entailment-predicate. - $matchesP= $predicate == null || - !is_a($this->entailment['p'],'Node') || - $this->entailment['p']->equals($predicate); - - //true, if $object is null, the entailment's object matches - //anything, or the $object equals the entailment-object. - $matchesO= $object == null || - !is_a($this->entailment['o'],'Node') || - $this->entailment['o']->equals($object); - - //returns true, if ALL are true - return $matchesS && $matchesP && $matchesO; - } - - /** - * Returns a infered InfStatement by evaluating the statement with - * the entailment rule. - * - * @param object Statement - * @return object InfStatement - * @access public - * @throws PhpError - */ - function entail(& $statement) - { - //if the entailment's subject is ,

,or , put the statements - //subject,predicate,or object into the subject of the - //entailed statement. If the entailment's subject is a node, - //add that node to the statement. - switch ($this->entailment['s']) - { - case '': - $entailedSubject=$statement->getSubject(); - break; - case '

': - $entailedSubject=$statement->getPredicate(); - break; - case '': - $entailedSubject=$statement->getObject(); - break; - default: - $entailedSubject=$this->entailment['s']; - }; - - //if the entailment's predicate is ,

,or , put the - //statements subject,predicate,or object into the predicate of - //the entailed statement. If the entailment's predicate is a node, - //add that node to the statement. - switch ($this->entailment['p']) - { - case '': - $entailedPredicate=$statement->getSubject(); - break; - case '

': - $entailedPredicate=$statement->getPredicate(); - break; - case '': - $entailedPredicate=$statement->getObject(); - break; - default: - $entailedPredicate=$this->entailment['p']; - }; - - //if the entailment's object is ,

,or , put the - //statements subject,predicate,or object into the object of - //the entailed statement. If the entailment's object is a node, - //add that node to the statement. - switch ($this->entailment['o']) - { - case '': - $entailedObject=$statement->getSubject(); - break; - case '

': - $entailedObject=$statement->getPredicate(); - break; - case '': - $entailedObject=$statement->getObject(); - break; - default: - $entailedObject=$this->entailment['o']; - }; - - //return the infered statement - return (new InfStatement($entailedSubject,$entailedPredicate,$entailedObject)); - } - - /** - * Returns a find-query that matches statements, whose entailed - * statements would match the supplied find query. - * - * @param Node OR null $subject - * @param Node OR null $predicate - * @param Node OR null $object - * @return array - * @access public - * @throws PhpError - */ - function getModifiedFind( $subject, $predicate, $object) - { - $findSubject=$this->trigger['s']; - $findPredicate=$this->trigger['p']; - $findObject=$this->trigger['o']; - - switch ($this->entailment['s']) - { - case '': - $findSubject=$subject; - break; - case '

': - $findPredicate=$subject; - break; - case '': - $findObject=$subject; - break; - }; - - switch ($this->entailment['p']) - { - case '': - $findSubject=$predicate; - break; - case '

': - $findPredicate=$predicate; - break; - case '': - $findObject=$predicate; - break; - }; - - switch ($this->entailment['o']) - { - case '': - $findSubject=$object; - break; - case '

': - $findPredicate=$object; - break; - case '': - $findObject=$object; - break; - }; - - return array('s' => $findSubject, - 'p' => $findPredicate, - 'o' => $findObject ); - } - - function getTrigger() - { - return array ( 's' => $this->trigger['s'], - 'p' => $this->trigger['p'], - 'o' => $this->trigger['o'], - ); - } - - function getEntailment() - { - return array ( 's' => $this->entailment['s'], - 'p' => $this->entailment['p'], - 'o' => $this->entailment['o'], - ); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfStatement.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfStatement.php deleted file mode 100755 index 336504f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/infModel/InfStatement.php +++ /dev/null @@ -1,18 +0,0 @@ - - * @version $Id: InfStatement.php 268 2006-05-15 05:28:09Z tgauss $ - * @package infModel - */ -class InfStatement extends Statement { - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/all-wcprops deleted file mode 100755 index 56e0a96f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/all-wcprops +++ /dev/null @@ -1,77 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/rdfapi-php/!svn/ver/551/trunk/rdfapi-php/api/model -END -Literal.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/497/trunk/rdfapi-php/api/model/Literal.php -END -Blanknode.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/453/trunk/rdfapi-php/api/model/Blanknode.php -END -DBase.php -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/model/DBase.php -END -MemModel.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/425/trunk/rdfapi-php/api/model/MemModel.php -END -Model.php -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/551/trunk/rdfapi-php/api/model/Model.php -END -ModelP.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/287/trunk/rdfapi-php/api/model/ModelP.php -END -DbStore.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/560/trunk/rdfapi-php/api/model/DbStore.php -END -Statement.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/model/Statement.php -END -Node.php -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/348/trunk/rdfapi-php/api/model/Node.php -END -DbModel.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/533/trunk/rdfapi-php/api/model/DbModel.php -END -Resource.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/453/trunk/rdfapi-php/api/model/Resource.php -END -ModelFactory.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/524/trunk/rdfapi-php/api/model/ModelFactory.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/entries deleted file mode 100755 index cb957eb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/entries +++ /dev/null @@ -1,184 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/model -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-11-22T19:58:35.873076Z -551 -p_frischmuth - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Literal.php -file - - - - -2008-02-29T14:57:44.694548Z -07e50d371bf51f08cc393559420f7bb5 -2007-08-13T05:14:26.997510Z -497 -cweiske -has-props - -Blanknode.php -file - - - - -2008-02-29T14:57:44.694548Z -b9a94ec8fba94a8b9596d97d933c5676 -2007-06-20T21:19:09.683124Z -453 -cweiske -has-props - -DBase.php -file - - - - -2008-02-29T14:57:44.710169Z -5cf7f369325355185a56e9436afd7196 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -MemModel.php -file - - - - -2008-02-29T14:57:44.710169Z -d8987f4e712da3112f962e79de1560ea -2007-05-01T12:59:18.000000Z -425 -cweiske -has-props - -Model.php -file - - - - -2008-02-29T14:57:44.725790Z -1a0d324b20bd41b98669cb1018ff1cb2 -2007-11-22T19:58:35.873076Z -551 -p_frischmuth -has-props - -ModelP.php -file - - - - -2008-02-29T14:57:44.725790Z -f6593f708c9e11d2fd2f2314700b5eea -2006-06-19T13:43:55.000000Z -287 -tgauss -has-props - -DbStore.php -file -560 - - - -2008-02-29T15:24:22.033780Z -fc9caada11993be6f5fe8acdbab57800 -2008-02-29T15:24:20.914639Z -560 -cax -has-props - -Statement.php -file - - - - -2008-02-29T14:57:44.757031Z -5442af9a529c84b26046c997d47f69c1 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -Node.php -file - - - - -2008-02-29T14:57:44.757031Z -f5692caf43b4025c782916c6ae049afe -2007-03-12T10:04:10.000000Z -348 -cweiske -has-props - -DbModel.php -file - - - - -2008-02-29T14:57:44.772651Z -6d1d6724938773fb6310250e4f61f8cb -2007-08-16T09:32:03.808912Z -533 -cweiske -has-props - -Resource.php -file - - - - -2008-02-29T14:57:44.772651Z -e139b4ff0d1251ab7166c8c76cfafe84 -2007-06-20T21:19:09.683124Z -453 -cweiske -has-props - -ModelFactory.php -file - - - - -2008-02-29T14:57:44.788272Z -e686d0efe0faf4d3635079b922953960 -2007-08-14T11:12:45.341905Z -524 -kobasoft -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Blanknode.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Blanknode.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Blanknode.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DBase.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DBase.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DBase.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbStore.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbStore.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/DbStore.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Literal.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Literal.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Literal.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/MemModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/MemModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/MemModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Model.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Model.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Model.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelFactory.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelFactory.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelFactory.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelP.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/ModelP.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Node.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Node.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Node.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Resource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Resource.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Resource.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Statement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Statement.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/prop-base/Statement.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Blanknode.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Blanknode.php.svn-base deleted file mode 100755 index 5afcad7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Blanknode.php.svn-base +++ /dev/null @@ -1,120 +0,0 @@ -, - * Radoslaw Oldakowski - * - * @package model - * @access public - * - */ - class BlankNode extends Resource { - - /** - * Constructor - * You can supply a label or You supply a model and a unique ID is gernerated. - * - * @param mixed $namespace_or_uri_or_model - * @param string $localName - * @access public - */ - function BlankNode($namespace_or_uri_or_model , $localName = NULL) { - - if (is_a($namespace_or_uri_or_model, 'Model')) { - // generate identifier - $id = $namespace_or_uri_or_model->getUniqueResourceURI(BNODE_PREFIX); - - $this->uri = $id; - - } else { - // set identifier - if ($localName == NULL) { - $this->uri = $namespace_or_uri_or_model; - } else { - $this->uri = $namespace_or_uri_or_model . $localName; - } - } - } - - /** - * Returns the ID of the blank node. - * - * @return string - * @access public - */ - function getID() { - return $this->uri; - } - - /** - * Returns the ID of the blank node. - * - * @return string - * @access public - */ - function getLabel() { - return $this->uri; - } - - /** - * Dumps bNode. - * - * @access public - * @return string - */ - function toString() { - - return 'bNode("' . $this->uri . '")'; - } - - /** - * Checks if two blank nodes are equal. - * Two blank nodes are equal, if they have the same temporary ID. - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) { - - if ($this == $that) { - return true; - } - if (($that == NULL) or !(is_a($that, 'BlankNode'))) { - return false; - } - - if ($this->getURI() == $that->getURI()) { - return true; - } - - return false; - } - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Blank Node - */ - function __toString() - { - return $this->toString(); - } - -} // end: BlankNode - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DBase.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DBase.php.svn-base deleted file mode 100755 index 7f0376b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DBase.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include DBase class -require_once( RDFAPI_INCLUDE_DIR . 'model/DbModel.php' ); -// include adodb classes -require_once(RDFAPI_INCLUDE_DIR .'util/adodb/adodb.inc.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbModel.php.svn-base deleted file mode 100755 index d3ddf3dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbModel.php.svn-base +++ /dev/null @@ -1,1318 +0,0 @@ - -* -* @package model -* @access public -*/ - - -class DbModel extends Model{ - - /** - * Database connection object. - * - * @var object ADOConnection - * @access private - */ - var $dbConn; - - /** - * Unique model URI. - * Used to identify the DbModel. - * - * @var string - * @access private - */ - var $modelURI; - - - /** - * Database internal modelID. - * Used to avoid JOINs. - * - * @var string - * @access private - */ - var $modelID; - - - - - /** - * Constructor - * Do not call this directly. - * Use the method getModel,getNewModel or putModel of the Class DbStore instead. - * - * @param object ADOConnection &$dbConnection - * @param string $modelURI - * @param string $modelID - * @param string $baseURI - * @access public - */ - function DbModel(&$dbConnection, $modelURI, $modelID, $baseURI=NULL) { - - $this->dbConn =& $dbConnection; - $this->modelURI = $modelURI; - $this->modelID = $modelID; - $this->baseURI = $this->_checkBaseURI($baseURI); - } - - - /** - * Set a base URI for the DbModel. - * Affects creating of new resources and serialization syntax. - * - * @param string $uri - * @throws SqlError - * @access public - */ - function setBaseURI($uri) { - - $this->baseURI = $this->_checkBaseURI($uri); - - $rs = $this->dbConn->execute("UPDATE models SET baseURI='" .$this->baseURI ."' - WHERE modelID=" .$this->modelID); - if (!$rs) - $this->dbConn->errorMsg(); - } - - - /** - * Return the number of statements in this DbModel. - * - * @return integer - * @access public - */ - function size() { - - $count =& $this->dbConn->getOne('SELECT COUNT(modelID) FROM statements - WHERE modelID = ' .$this->modelID); - return $count; - } - - - /** - * Check if this DbModel is empty. - * - * @return boolean - * @access public - */ - function isEmpty() { - - if ($this->size() == 0) - return TRUE; - return FALSE; - } - - - /** - * Add a new triple to this DbModel. - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - * @return mixed true on success, false if the statement is already in the model, - * error message (string) on failure - */ - function add(&$statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: add): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!$this->contains($statement)) { - - $subject_is = $this->_getNodeFlag($statement->subject()); - $sql = "INSERT INTO statements - (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is) - VALUES - (" .$this->modelID ."," - . $this->dbConn->qstr($statement->getLabelSubject()) ."," - . $this->dbConn->qstr($statement->getLabelPredicate()) .","; - - if (is_a($statement->object(), 'Literal')) { - $quotedLiteral = $this->dbConn->qstr($statement->obj->getLabel()); - $sql .= $quotedLiteral ."," - ."'" .$statement->obj->getLanguage() ."'," - ."'" .$statement->obj->getDatatype() ."'," - ."'" .$subject_is ."'," - ."'l')"; - }else{ - $object_is = $this->_getNodeFlag($statement->object()); - $sql .= $this->dbConn->qstr($statement->obj->getLabel()) ."," - ."''," - ."''," - ."'" .$subject_is ."'," - ."'" .$object_is ."')"; - } - $rs =& $this->dbConn->execute($sql); - if (!$rs) { - return $this->dbConn->errorMsg(); - } else { - return true; - } - } else { - return false; - } - } - - - /** - * Alias for the method add(). - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function addWithoutDuplicates(&$statement) { - - $this->add($statement); - } - - - /** - * Remove the given triple from this DbModel. - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function remove(&$statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: remove): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $sql = 'DELETE FROM statements - WHERE modelID=' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO ($statement->subj, $statement->pred, $statement->obj); - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - - - /** - * Short dump of the DbModel. - * - * @return string - * @access public - */ - function toString() { - - return 'DbModel[modelURI=' .$this->modelURI .'; baseURI=' .$this->getBaseURI() .'; size=' .$this->size() .']'; - } - - - /** - * Dump of the DbModel including all triples. - * - * @return string - * @access public - */ - function toStringIncludingTriples() { - - $memModel =& $this->getMemModel(); - return $memModel->toStringIncludingTriples(); - } - - - - /** - * Create a MemModel containing all the triples of the current DbModel. - * - * @return object MemModel - * @access public - */ - function & getMemModel() { - - $recordSet = $this->_getRecordSet($this); - $m = $this->_convertRecordSetToMemModel($recordSet); - return $m; - } - - - - /** - * Returns the model id - * - * @return int Model id number - * @access public - */ - function getModelID() - { - return $this->modelID; - } - - - - /** - * Returns the database connection object - * - * @return ADOdb Database object - * @access public - */ - function &getDbConn() - { - return $this->dbConn; - } - - - - /** - * Write the RDF serialization of the _DbModel as HTML. - * - * @access public - */ - function writeAsHtml() { - - $memModel =& $this->getMemModel(); - $memModel->writeAsHtml(); - } - - - /** - * Write the RDF serialization of the DbModel as HTML table. - * - * @access public - */ - function writeAsHtmlTable() { - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - $memModel =& $this->getMemModel(); - RDFUtil::writeHTMLTable($memModel); - } - - - /** - * Write the RDF serialization of the DbModel to string. - * - * @return string - * @access public - */ - function writeRdfToString() { - - $memModel =& $this->getMemModel(); - return $memModel->writeRdfToString(); - } - - - /** - * Saves the RDF,N3 or N-Triple serialization of the DbModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the DbModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') { - - $memModel = $this->getMemModel(); - $memModel->saveAs($filename, $type); - - } - - - /** - * Check if the DbModel contains the given statement. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) { - - $sql = 'SELECT modelID FROM statements - WHERE modelID = ' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO($statement->subj, $statement->pred, $statement->obj); - - $res =& $this->dbConn->getOne($sql); - - if (!$res) - return FALSE; - return TRUE; - } - - - /** - * Determine if all of the statements in the given model are also contained in this DbModel. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if(!$this->contains($statement)) - return FALSE; - return TRUE; - } - - elseif (is_a($model, 'DbModel')) { - - $recordSet =& $this->_getRecordSet($model); - while (!$recordSet->EOF) { - if (!$this->_containsRow($recordSet->fields)) - return FALSE; - $recordSet->moveNext(); - } - return TRUE; - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Determine if any of the statements in the given model are also contained in this DbModel. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if($this->contains($statement)) - return TRUE; - return FALSE; - } - - elseif (is_a($model, 'DbModel')) { - - $recordSet =& $this->_getRecordSet($model); - while (!$recordSet->EOF) { - if ($this->_containsRow($recordSet->fields)) - return TRUE; - $recordSet->moveNext(); - } - return FALSE; - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAny): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * General method to search for triples in the DbModel. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function find($subject, $predicate, $object) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - - // write the recordSet into memory Model - else - return $this->_convertRecordSetToMemModel($recordSet); - } - - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches - *the regular expression. - * Return an empty MemModel if nothing is found. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: Mhis method loads a DbModel into memory and performs the search - * on a MemModel, which can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) { - - $mm =& $this->getMemModel(); - - return $mm->findRegex($subject_regex, $predicate_regex, $object_regex); - } - - - /** - * Return all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Return an empty model if nothing is found. - * - * @param string $vocabulary - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function findVocabulary($vocabulary) { - - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = " .$this->modelID ." - AND predicate LIKE '" .$vocabulary ."%'"; - - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - - // write the recordSet into memory Model - else - return $this->_convertRecordSetToMemModel($recordSet); - } - - - /** - * Search for triples and return the first matching statement. - * NULL input for any parameter will match anything. - * Return an NULL if nothing is found. - * You can set an search offset with $offset. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = -1) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->selectLimit($sql,1,($offset)); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else { - if (!$recordSet->fields) - return NULL; - else { - $memModel = $this->_convertRecordSetToMemModel($recordSet); - return $memModel->triples[0]; - } - } - } - - - /** - * Search for triples and return the number of matches. - * NULL input for any parameter will match anything. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return integer - * @throws PhpError - * @throws SqlError - * @access public - */ - function findCount($subject, $predicate, $object) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT COUNT(*) - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else - return $recordSet->fields[0]; - } - - - /** - * Perform an RDQL query on this DbModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function rdqlQuery($queryString, $returnNodes = TRUE) { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // this method can only query this DbModel - // if another model was specified in the from clause throw an error - if (isset($parsedQuery['sources'][0])) - if($parsedQuery['sources'][0] != $this->modelURI) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: rdqlQuery):'; - $errmsg .= ' this method can only query this DbModel'; - trigger_error($errmsg, E_USER_ERROR); - } - - $engine = new RdqlDbEngine(); - $res =& $engine->queryModel($this, $parsedQuery, $returnNodes); - - return $res; - } - - - /** - * Perform an RDQL query on this DBModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes)); - } - - /** - * General method to replace nodes of a DbModel. - * NULL input for any parameter will match nothing. - * Example: $m->replace($resource, NULL, $node, $replacement); - * Replaces all $node objects beeing subject or object in - * any triple of the model with the $replacement node. - * Throw an error in case of a paramter mismatch. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @param object Node $replacement - * @throws PhpError - * @throws SqlError - * @access public - */ - function replace($subject, $predicate, $object, $replacement) { - - // check the correctness of the passed parameters - if ( ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) || - (($subject != NULL && is_a($replacement, 'Literal')) || - ($predicate != NULL && (is_a($replacement, 'Literal') || - is_a($replacement, 'BlankNode')))) ) - { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameter mismatch'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!(!$subject && !$predicate && !$object)) { - - // create an update sql statement - $comma = ''; - $sql = 'UPDATE statements - SET '; - if ($subject) { - $sql .= " subject ='" .$replacement->getLabel() ."', " - ." subject_is='" .$this->_getNodeFlag($replacement) ."' "; - $comma = ','; - } - if ($predicate) { - $sql .= $comma ." predicate='" .$replacement->getLabel() ."' "; - $comma = ','; - } - if ($object) { - $quotedObject = $this->dbConn->qstr($replacement->getLabel()); - $sql .= $comma .' object=' .$quotedObject - .", object_is='" .$this->_getNodeFlag($replacement) ."' "; - if (is_a($replacement, 'Literal')) { - $sql .= ", l_language='" .$replacement->getLanguage() ."' " - .", l_datatype='" .$replacement->getDataType() ."' "; - } - } - $sql .= 'WHERE modelID = ' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $rs =& $this->dbConn->execute($sql); - - if (!$rs) - echo $this->dbConn->errorMsg(); - } - } - - - /** - * Check if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * Warning: This method doesn't work correct with models where the same blank node has different - * identifiers in the two models. We will correct this in a future version. - * - * @param object model &$that - * @return boolean - * @throws PhpError - * @access public - */ - - function equals(&$that) { - - if (!is_a($that, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: equals): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if ($this->size() != $that->size()) - return FALSE; - - include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php"); - return ModelComparator::compare($this,$that); - } - - - /** - * Return a new MemModel that is the set-union the model with another model. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - * - */ - function & unite(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: unite): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->unite($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->unite($thatModel); - } - } - - - /** - * Return a new MemModel that is the subtraction of another model from this DbModel. - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - */ - - function & subtract(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: subtract): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->subtract($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->subtract($thatModel); - } - } - - - /** - * Return a new MemModel containing all the statements which are in both - * this model and the given model. - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - */ - function & intersect(&$model) { - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->intersect($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->intersect($thatModel); - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: intersect: Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Add the given model to this DbModel. - * This function monitors for SQL errors, and will commit if no errors have occured, - * otherwise it will rollback. - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @throws PhpError - * @access public - */ - function addModel(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: addModel): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $blankNodes_tmp = array(); - - if (is_a($model, 'MemModel')) { - - $this->dbConn->startTrans(); - foreach ($model->triples as $statement) - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - $this->addParsedNamespaces($model->getParsedNamespaces()); - - $this->dbConn->completeTrans(); - } - - elseif (is_a($model, 'DbModel')) { - - $this->dbConn->startTrans(); - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $statement) - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - $this->addParsedNamespaces($model->getParsedNamespaces()); - $this->dbConn->completeTrans(); - } - } - - - /** - * Reify the DbModel. - * Return a new MemModel that contains the reifications of all statements of this DbModel. - * - * @return object MemModel - * @access public - */ - function & reify() { - - $memModel =& $this->getMemModel(); - return $memModel->reify(); - } - - /** - * Remove this DbModel from database and clean up. - * This function monitors for SQL errors, and will commit if no errors have occured, - * otherwise it will rollback. - * - * @throws SqlError - * @access public - */ - function delete() { - - $this->dbConn->startTrans(); - $this->dbConn->execute('DELETE FROM models - WHERE modelID=' .$this->modelID); - $this->dbConn->execute('DELETE FROM statements - WHERE modelID=' .$this->modelID); - $this->dbConn->execute('DELETE FROM namespaces - WHERE modelID=' .$this->modelID); - - if (!$this->dbConn->completeTrans()) - echo $this->dbConn->errorMsg(); - else - $this->close(); - } - - - /** - * Close this DbModel - * - * @access public - */ - function close() { - - unset($this); - } - - - // ============================================================================= - // **************************** private methods ******************************** - // ============================================================================= - - - - - - /** - * If the URI doesn't end with # : or /, then a # is added to the URI. - * Used at setting the baseURI of this DbModel. - * - * @param string $uri - * @return string - * @access private - */ - function _checkBaseURI($uri) { - - if ($uri != NULL) { - $c = substr($uri, strlen($uri)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $uri .= '#'; - } - return $uri; - } - - - /**' - * Return the flag of the Node object. - * r - Resource, b - BlankNode, l - Literal - * - * @param object Node $object - * @return string - * @access private - */ - function _getNodeFlag($object) { - - return is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l'); - } - - - /** - * Convert an ADORecordSet to a memory Model. - * - * Every successful database query returns an ADORecordSet object which is actually - * a cursor that holds the current row in the array fields[]. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!! This method can only be applied to a RecordSet with array fields[] - * !!! containing a representation of the database table: statements, - * !!! with an index corresponding to following table columns: - * !!! [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * !!! [4] - l_datatype, [5] - subject_is, [6] - object_is - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @param object ADORecordSet - * @return object MemModel - * @access private - */ - function _convertRecordSetToMemModel(&$recordSet) { - - $res = new MemModel($this->baseURI); - while (!$recordSet->EOF) { - - // subject - if ($recordSet->fields[5] == 'r') - $sub = new Resource($recordSet->fields[0]); - else - $sub = new BlankNode($recordSet->fields[0]); - - // predicate - $pred = new Resource($recordSet->fields[1]); - - // object - if ($recordSet->fields[6] == 'r') - $obj = new Resource($recordSet->fields[2]); - elseif ($recordSet->fields[6] == 'b') - $obj = new BlankNode($recordSet->fields[2]); - else { - $obj = new Literal($recordSet->fields[2], $recordSet->fields[3]); - if ($recordSet->fields[4]) - $obj->setDatatype($recordSet->fields[4]); - } - - $statement = new Statement($sub, $pred, $obj); - $res->add($statement); - - $recordSet->moveNext(); - } - $res->addParsedNamespaces($this->getParsedNamespaces()); - return $res; - } - - - /** - * Create the dynamic part of an sql statement selecting triples with the - * given parameters ($subject, $predicate, $object). - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return string - * @access private - */ - function _createDynSqlPart_SPO($subject, $predicate, $object) { - - // conditions derived from the parameters passed to the function - - $subject_is=is_a($subject,'BlankNode')?'b':(is_a($subject,'Resource')?'r':'l'); - $sql=''; - if ($subject != NULL) - $sql .= " AND subject='" .$subject->getLabel() ."' - AND subject_is='" .$subject_is ."'"; - if ($predicate != NULL) - $sql .= " AND predicate='" .$predicate->getLabel() ."'"; - if ($object != NULL) { - $object_is = is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l'); - if (is_a($object, 'Resource')) - $sql .= " AND object='" .$object->getLabel() ."' - AND object_is ='" .$object_is ."'"; - else { - $quotedLiteral = $this->dbConn->qstr($object->getLabel()); - $sql .= " AND object=" .$quotedLiteral ." - AND l_language='" .$object->getLanguage() ."' - AND l_datatype='" .$object->getDataType() ."' - AND object_is ='" .$object_is ."'"; - } - } - return $sql; - } - - - /** - * Get an ADORecordSet with array fields[] containing a representation of - * the given DbModel stored in the table: statements, with an index corresponding - * to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * (This method operates on data from a DbModel without loading it into a memory model - * in order to save resources and improve speed). - * - * @param object DbModel $DbModel - * @return object ADORecordSet - * @access private - */ - function _getRecordSet (&$dbModel) { - - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$dbModel->modelID; - - return $recordSet =& $this->dbConn->execute($sql); - } - - - /** - * Check if this DbModel contains the given row from the array fields[] of an ADORecordSet - * The array index corresponds to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * - * @param array $row - * @return boolean - * @access private - */ - function _containsRow ($row) { - - $sql = "SELECT modelID FROM statements - WHERE modelID = " .$this->modelID ." - AND subject =" .$this->dbConn->qstr($row[0]) ." - AND predicate =" .$this->dbConn->qstr($row[1]) ." - AND object =" .$this->dbConn->qstr($row[2]) ." - AND l_language=" .$this->dbConn->qstr($row[3]) ." - AND l_datatype=" .$this->dbConn->qstr($row[4]) ." - AND subject_is=" .$this->dbConn->qstr($row[5]) ." - AND object_is=" .$this->dbConn->qstr($row[6]); - - $res =& $this->dbConn->getOne($sql); - - if (!$res) - return FALSE; - return TRUE; - } - - - - - - /** - * Returns the models namespaces. - * - * @author Tobias Gauss - * @return mixed Array of key-value pairs. Namespace is the key, - * prefix the value. If no namespaces are found, - * boolean false is returned. - * - * @access public - */ - function getParsedNamespaces(){ - $sql = "SELECT * FROM namespaces - WHERE modelID = " .$this->modelID; - $temp = false; - $res = $this->dbConn->execute($sql); - if($res){ - while (!$res->EOF) { - $temp[$res->fields[1]]=$res->fields[2]; - $res->moveNext(); - } - } - return $temp; - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gauss - * @param array $newNs Array of namespace => prefix assignments - * - * @access public - */ - function addParsedNamespaces($newNs){ - if($newNs) - foreach($newNs as $namespace => $prefix){ - $this->addNamespace($prefix, $namespace); - } - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gauss - * @param string $prefix Prefix - * @param string $nmsp Namespace URI - * - * @access public - */ - function addNamespace($prefix,$nmsp){ - - if($nmsp != '' && $prefix !=''){ - if($this->_checkNamespace($nmsp)){ - $sql = "UPDATE namespaces SET prefix=".$this->dbConn->qstr($prefix)." WHERE - modelID=".$this->modelID." AND namespace=".$this->dbConn->qstr($nmsp); - }else{ - $sql = "INSERT INTO namespaces - (modelID, namespace, prefix) - VALUES - (" .$this->modelID .',' - . $this->dbConn->qstr($nmsp) . ',' - . $this->dbConn->qstr($prefix) . ')'; - } - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - } - - /** - * checks if a namespace is already in the model. - * - * @author Tobias Gau� - * @access private - * @param Array $newNs - */ - function _checkNamespace($nmsp){ - $res = true; - $sql = "SELECT * FROM namespaces - WHERE modelID = " .$this->modelID." AND - namespace=" . $this->dbConn->qstr($nmsp); - $rs =& $this->dbConn->execute($sql); - if (!$rs){ - $this->dbConn->errorMsg(); - }else{ - if($rs->fields == false) - $res = false; - } - return $res; - - - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & iterFind($sub=null,$pred=null,$obj=null) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - $if = new IterFind($this,$sub,$pred,$obj); - return $if; - } - - /** - * Removes a single namespace from the model - * - * @author Tobias Gauss - * @param string $nmsp Namespace URI - * - * @return mixed True if all went well, error message otherwise - * - * @access public - */ - function removeNamespace($nmsp){ - - $sql = 'DELETE FROM namespaces - WHERE modelID=' .$this->modelID." AND namespace=". $this->dbConn->qstr($nmsp); - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - return $this->dbConn->errorMsg(); - else { - return true; - } - } - - - - - /** - * Add the given row from the array fields[] of an ADORecordSet to this DbModel - * The array index corresponds to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * - * @param array $row - * @throws SqlError - * @access private - * - function _insertRow ($row) { - - $quotedObject = $this->dbConn->qstr($row[2]); - $sql = "INSERT INTO statements VALUES - (" .$this->modelID ."," - ."'" .$row[0] ."'," - ."'" .$row[1] ."'," - ."" .$quotedObject ."," - ."'" .$row[3] ."'," - ."'" .$row[4] ."'," - ."'" .$row[5] ."'," - ."'" .$row[6] ."')"; - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - */ - -} // end: Class DbModel -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbStore.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbStore.php.svn-base deleted file mode 100755 index a065097b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/DbStore.php.svn-base +++ /dev/null @@ -1,917 +0,0 @@ - - * @author Daniel Westphal (http://www.d-westphal.de) - * - * @package model - * @access public - */ - - -class DbStore extends Object -{ - /** - * Array with all supported database types - * - * @var array - */ - public static $arSupportedDbTypes = array( - "MySQL", - "MySQLi", - "MSSQL", - 'MsAccess' - ); - - /** - * Database connection object - * - * @var object ADOConnection - * @access private - */ - var $dbConn; - - /** - * Database driver name - * - * @var string - */ - protected $driver = null; - - /** - * SparqlParser so we can re-use it - * @var Parser - */ - var $queryParser = null; - - -/** - * Constructor: - * Set the database connection with the given parameters. - * - * @param string $dbDriver - * @param string $host - * @param string $dbName - * @param string $user - * @param string $password - * @access public - */ - function DbStore ($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME, - $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) { - - // include DBase Package - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE); - - // create a new connection object - $this->dbConn =& ADONewConnection($dbDriver); - $this->driver = $dbDriver; - - //activate the ADOdb DEBUG mode - if (ADODB_DEBUG_MODE == '1') - $this->dbConn->debug = true; - - // connect to database - $r = $this->dbConn->NConnect($host, $user, $password, $dbName); - if ($r !== true) { - throw new Exception('Could not connect to database'); - } - - // optimized for speed - $this->dbConn->setFetchMode(ADODB_FETCH_NUM); - //$ADODB_COUNTRECS = FALSE; - } - - - -/** - * List all DbModels stored in the database. - * - * @return array - * @throws SqlError - * @access public - */ - function listModels() { - - $recordSet =& $this->dbConn->execute("SELECT modelURI, baseURI - FROM models"); - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else { - $models = array(); - $i=0; - while (!$recordSet->EOF) { - - $models[$i]['modelURI'] = $recordSet->fields[0]; - $models[$i]['baseURI'] = $recordSet->fields[1]; - - ++$i; - $recordSet->moveNext(); - } - return $models; - } - } - - -/** - * Check if the DbModel with the given modelURI is already stored in the database - * - * @param string $modelURI - * @return boolean - * @throws SqlError - * @access public - */ - function modelExists($modelURI) { - - $res =& $this->dbConn->execute("SELECT COUNT(*) FROM models - WHERE modelURI = '" .$modelURI ."'"); - if (!$res) - echo $this->dbConn->errorMsg(); - else { - if (!$res->fields[0]) { - $res->Close(); - return FALSE; - } else { - $res->Close(); - return TRUE; - } - } - } - - - - /** - * Returns the database connection object - * - * @return ADOdb Database object - * @access public - */ - function &getDbConn() - { - return $this->dbConn; - } - - -/** - * Create a new instance of DbModel with the given $modelURI and - * load the corresponding values of modelID and baseURI from the database. - * Return FALSE if the DbModel does not exist. - * - * @param string $modelURI - * @return object DbModel - * @access public - */ - function getModel($modelURI) { - - if (!$this->modelExists($modelURI)) - return FALSE; - else { - $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI - FROM models - WHERE modelURI='" .$modelURI ."'"); - - return new DbModel($this->dbConn, $modelVars->fields[0], - $modelVars->fields[1], $modelVars->fields[2]); - } - } - - -/** - * Create a new instance of DbModel with the given $modelURI - * and insert the DbModel variables into the database. - * Return FALSE if there is already a model with the given URI. - * - * @param string $modelURI - * @param string $baseURI - * @return object DbModel - * @throws SqlError - * @access public - */ - function getNewModel($modelURI, $baseURI=NULL) { - - if ($this->modelExists($modelURI)) - return FALSE; - else { - $modelID = $this->_createUniqueModelID(); - - $rs =& $this->dbConn->execute("INSERT INTO models - (modelID, modelURI, baseURI) - VALUES (" .$modelID .", - " .$this->dbConn->qstr($modelURI) .", - " .$this->dbConn->qstr($baseURI) .")"); - - if (!$rs) - return $this->dbConn->errorMsg(); - else - return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI); - } - } - - -/** - * Store a MemModel or another DbModel from a different DbStore in the database. - * Return FALSE if there is already a model with modelURI matching the modelURI - * of the given model. - * - * @param object Model &$model - * @param string $modelURI - * @return boolean - * @access public - */ - function putModel(&$model, $modelURI=NULL) { - - if (!$modelURI) { - if (is_a($model, 'MemModel')) - $modelURI = 'DbModel-' .$this->_createUniqueModelID(); - else - $modelURI = $model->modelURI; - }else - if ($this->modelExists($modelURI)) - return FALSE; - - - $newDbModel = $this->getNewModel($modelURI, $model->getBaseURI()); - $newDbModel->addModel($model); - } - - -/** - * Close the DbStore. - * !!! Warning: If you close the DbStore all active instances of DbModel from this - * !!! DbStore will lose their database connection !!! - * - * @access public - */ - function close() { - - $this->dbConn->close(); - unset($this); - } - - -// ============================================================================= -// **************************** private methods ******************************** -// ============================================================================= - - -/** - * Create a unique ID for the DbModel to be insert into the models table. - * This method was implemented because some databases do not support auto-increment. - * - * @return integer - * @access private - */ - function _createUniqueModelID() { - - $maxModelID =& $this->dbConn->GetOne('SELECT MAX(modelID) FROM models'); - return ++$maxModelID; - } - - /** - * Create a unique ID for the dataset to be insert into the datasets table. - * This method was implemented because some databases do not support auto-increment. - * - * @return integer - * @access private - */ - function _createUniqueDatasetID() { - - $maxDatasetID =& $this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets'); - return ++$maxDatasetID; - } - - - - /** - * Sets up tables for RAP. - * DOES NOT CHECK IF TABLES ALREADY EXIST - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @throws Exception If database type is unsupported - * @access public - **/ - public function createTables($databaseType = null) - { - $driver = $this->getDriver($databaseType); - self::assertDriverSupported($driver); - - $createFunc = '_createTables_' . $driver; - return $this->$createFunc(); - }//public function createTables($databaseType="MySQL") - - - - /** - * Create tables and indexes for MsAccess database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - protected function _createTables_MsAccess() - { - $this->dbConn->startTrans(); - - $this->dbConn->execute('CREATE TABLE models - (modelID long primary key, - modelURI varchar not null, - baseURI varchar)'); - - $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'); - - $this->dbConn->execute('CREATE TABLE statements - (modelID long, - subject varchar, - predicate varchar, - object Memo, - l_language varchar, - l_datatype varchar, - subject_is varchar(1), - object_is varchar(1), - primary key (modelID, subject, predicate, object, - l_language, l_datatype))'); - - $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)'); - $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)'); - $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)'); - $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)'); - - $this->dbConn->execute('CREATE TABLE namespaces - (modelID long, - namespace varchar, - prefix varchar, - primary key (modelID, namespace, prefix))'); - - $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)'); - $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)'); - - $this->dbConn->execute("CREATE TABLE datasets - (datasetName varchar, - defaultModelUri varchar, - primary key (datasetName))"); - - $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)'); - - - $this->dbConn->execute("CREATE TABLE `dataset_model` ( - datasetName varchar, - modelId long, - graphURI varchar, - PRIMARY KEY (modelId,datasetName))"); - - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Create tables and indexes for MySQL database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - function _createTables_MySQL() - { - - $this->dbConn->startTrans(); - - $this->dbConn->execute("CREATE TABLE models - (modelID bigint NOT NULL, - modelURI varchar(255) NOT NULL, - baseURI varchar(255) DEFAULT '', - primary key (modelID))"); - - $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'); - - $this->dbConn->execute("CREATE TABLE statements - (modelID bigint NOT NULL, - subject varchar(255) NOT NULL, - predicate varchar(255) NOT NULL, - object text, - l_language varchar(255) DEFAULT '', - l_datatype varchar(255) DEFAULT '', - subject_is varchar(1) NOT NULL, - object_is varchar(1) NOT NULL)"); - - $this->dbConn->execute("CREATE TABLE namespaces - (modelID bigint NOT NULL, - namespace varchar(255) NOT NULL, - prefix varchar(255) NOT NULL, - primary key (modelID,namespace))"); - - $this->dbConn->execute("CREATE TABLE `dataset_model` ( - `datasetName` varchar(255) NOT NULL default '0', - `modelId` bigint(20) NOT NULL default '0', - `graphURI` varchar(255) NOT NULL default '', - PRIMARY KEY (`modelId`,`datasetName`))"); - - $this->dbConn->execute("CREATE TABLE `datasets` ( - `datasetName` varchar(255) NOT NULL default '', - `defaultModelUri` varchar(255) NOT NULL default '0', - PRIMARY KEY (`datasetName`), - KEY `datasetName` (`datasetName`))"); - - $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)'); - $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)'); - - $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements - (subject(200),predicate(200))'); - - $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject(200))'); - $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate(200))'); - $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))'); - - $this->dbConn->execute('CREATE FULLTEXT INDEX s_obj_ftidx ON statements (object)'); - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Creates tables on a MySQLi database - */ - function _createTables_MySQLi() - { - return $this->_createTables_MySQL(); - }//function _createTables_MySQLi() - - - - /** - * Create tables and indexes for MSSQL database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - function _createTables_MSSQL() - { - $this->dbConn->startTrans(); - - $this->dbConn->execute("CREATE TABLE [dbo].[models] ( - [modelID] [int] NOT NULL , - [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL - ) ON [PRIMARY]"); - - $this->dbConn->execute("CREATE TABLE [dbo].[statements] ( - [modelID] [int] NOT NULL , - [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL - ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]"); - - - $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] ( - [modelID] [int] NOT NULL , - [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - ) ON [PRIMARY]"); - - $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD - CONSTRAINT [PK_models] PRIMARY KEY CLUSTERED - ( - [modelID] - ) ON [PRIMARY] "); - $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD - CONSTRAINT [PK_namespaces] PRIMARY KEY CLUSTERED - ( - [modelID],[namespace] - ) ON [PRIMARY] "); - - $this->dbConn->execute("CREATE INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]"); - - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Checks if tables are setup for RAP - * - * @param string $databaseType - * @throws Exception If database type is unsupported - * @access public - **/ - public function isSetup($databaseType = null) - { - $driver = $this->getDriver($databaseType); - self::assertDriverSupported($driver); - - $issetupFunc = '_isSetup_' . $driver; - return $this->$issetupFunc(); - }//public function isSetup($databaseType="MySQL") - - - - /** - * Returns the driver for the database type. - * You can pass NULL or omit the parameter to - * use the parameter from the dbstore constructor - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @return string Database driver string (e.g. MySQL) - */ - public function getDriver($databaseType = null) - { - if ($databaseType === null) { - if ($this->driver === null) { - //backward compatibility - $databaseType = 'MySQL'; - } else { - $databaseType = $this->driver; - } - } - if (!self::isDriverSupported($databaseType)) { - //check if it is a known driver in wrong case - $arLowercases = array_map('strtolower', self::$arSupportedDbTypes); - $arMapping = array_combine($arLowercases, self::$arSupportedDbTypes); - if (isset($arMapping[strtolower($databaseType)])) { - $databaseType = $arMapping[strtolower($databaseType)]; - } - } - return $databaseType; - }//public function getDriver($databaseType = null) - - - - /** - * Returns if the given driver is supported - * - * @return boolean True if it supported, false if not - */ - public static function isDriverSupported($databaseType) - { - return in_array($databaseType, self::$arSupportedDbTypes); - }//public static function isDriverSupported($databaseType) - - - - /** - * Checks if the given driver is supported and throws an - * Exception if not. - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @return true If it does not fail - * - * @throws Exception If the driver is not supported - */ - public static function assertDriverSupported($databaseType) - { - if (!self::isDriverSupported($databaseType)) { - throw new Exception( - 'Unsupported database type, only supported: ' - . implode(', ', self::$arSupportedDbTypes) - ); - } - return true; - }//public static function assertDriverSupported($databaseType) - - - - /** - * Checks if tables are setup for RAP (MySql) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MySQL() - { - $recordSet =& $this->dbConn->execute("SHOW TABLES"); - if (!$recordSet) { - throw new Exception($this->dbConn->errorMsg()); - } else { - $tables = array(); - while (!$recordSet->EOF) { - $tables[]= $recordSet->fields[0]; - if (isset($i)) { - ++$i; - } - $recordSet->moveNext(); - } - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)) { - return true; - } - } - return false; - }//function _isSetup_MySQL() - - - - /** - * Checks if tables are setup for RAP (MySQLi) - * - * @see _isSetup_MySQL() - */ - function _isSetup_MySQLi() - { - return $this->_isSetup_MySQL(); - }//function _isSetup_MySQLi() - - - - /** - * Checks if tables are setup for RAP (MsAccess) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MsAccess() - { - $tables =& $this->dbConn->MetaTables(); - if (!$tables) { - throw new Exception($this->dbConn->errorMsg()); - } - if (count($tables) == 0) { - return false; - } else { - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)) { - return true; - } else { - return false; - } - } - }//function _isSetup_MsAccess() - - - - /** - * Checks if tables are setup for RAP (MSSQL) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MSSQL() - { - $tables =& $this->dbConn->MetaTables(); - if (!$tables) { - throw new Exception($this->dbConn->errorMsg()); - } - if (count($tables) == 0) { - return false; - } else { - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)){ - return true; - } else { - return false; - } - } - }//function _isSetup_MSSQL() - - - /** - * Create a new instance of DatasetDb with the given $datasetName - * and insert the DatasetDb variables into the database. - * Return FALSE if there is already a model with the given URI. - * - * @param $datasetName string - * @return object DatasetDB - * @throws SqlError - * @access public - */ - function & getNewDatasetDb($datasetName) - { - - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if ($this->datasetExists($datasetName)) - return FALSE; - else - { - $defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_'); - $defaultModel=$this->getNewModel($defaultModelUri); - - $rs =& $this->dbConn->execute("INSERT INTO datasets - VALUES ('" .$this->dbConn->qstr($datasetName) ."', - '" .$this->dbConn->qstr($defaultModelUri)."')"); - - if (!$rs) - $this->dbConn->errorMsg(); - else - $return=new DatasetDb($this->dbConn, $this, $datasetName); - return ($return); - } - } - - /** - * Check if the Dataset with the given $datasetName is already stored in the database - * - * @param $datasetName string - * @return boolean - * @throws SqlError - * @access public - */ -function datasetExists($datasetName) { - - $res =& $this->dbConn->execute("SELECT COUNT(*) FROM datasets - WHERE datasetName = '" .$datasetName ."'"); - if (!$res) - echo $this->dbConn->errorMsg(); - else { - if (!$res->fields[0]) - return FALSE; - return TRUE; - } - } - - - /** - * Create a new instance of DatasetDb with the given $datasetName and - * load the corresponding values from the database. - * Return FALSE if the DbModel does not exist. - * - * @param $datasetId string - * @return object DatasetDb - * @access public - */ - function &getDatasetDb($datasetName) { - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if (!$this->datasetExists($datasetName)) { - return FALSE; - } else { - $return = new DatasetDb($this->dbConn, $this, $datasetName); - return ($return); - } - } - - /** - * Create a new instance of namedGraphDb with the given $modelURI and graphName and - * load the corresponding values of modelID and baseURI from the database. - * Return FALSE if the DbModel does not exist. - * - * @param $modelURI string - * @param $graphName string - * @return object NamedGraphMem - * @access public - */ - function getNamedGraphDb($modelURI, $graphName) - { - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if (!$this->modelExists($modelURI)) - return FALSE; - else { - $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI - FROM models - WHERE modelURI='" .$modelURI ."'"); - - return new NamedGraphDb($this->dbConn, $modelVars->fields[0], - $modelVars->fields[1], $graphName ,$modelVars->fields[2]); - } - } - - /** - * Create a new instance of namedGraphDb with the given $modelURI and graphName - * and insert the DbModel variables into the database (not the graphName. This - * is only stored persistently, when added to dataset). - * Return FALSE if there is already a model with the given URI. - * - * @param $modelURI string - * @param $graphName string - * @param $baseURI string - * @return object namedGraphDb - * @throws SqlError - * @access public - */ - function getNewNamedGraphDb($modelURI, $graphName, $baseURI=NULL) { - - if ($this->modelExists($modelURI)) - return FALSE; - else { - $modelID = $this->_createUniqueModelID(); - - $rs =& $this->dbConn->execute("INSERT INTO models - (modelID, modelURI, baseURI) - VALUES (" .$modelID ."', - " .$this->dbConn->qstr($modelURI) ."', - " .$this->dbConn->qstr($baseURI) .")"); - if (!$rs) - $this->dbConn->errorMsg(); - else - return new NamedGraphDb($this->dbConn, $modelURI, $modelID, $graphName, $baseURI); - } - } - - /** - * Removes the graph with all statements from the database. - * Warning: A single namedGraph can be added to several datasets. So it'll be - * removed from all datasets. - * - * @param $modelURI string - * @return boolean - * @throws SqlError - * @access public - */ - function removeNamedGraphDb($modelURI) - { - if (!$this->modelExists($modelURI)) - return FALSE; - - $modelID = $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'"); - - $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID); - $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID); - $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID); - - return true; - } - - - - /** - * Performs a SPARQL query against a model. The model is converted to - * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param string $query Sparql query string - * @param mixed $arModelIds Array of modelIDs, or NULL to use all models - * @param string $resultform Result form ('xml' for SPARQL Query Results XML Format) - * @return string/array - */ - function sparqlQuery($query, $arModelIds = null, $resultform = false) - { - $engine = $this->_prepareSparql($arModelIds); - return $engine->queryModel( - null, - $this->_parseSparqlQuery($query), - $resultform - ); - }//function sparqlQuery($query,$resultform = false) - - - - /** - * Prepares everything for SparqlEngine-usage - * Loads the files, creates instances for SparqlEngine and - * Dataset... - * - * @return SparqlEngineDb - */ - function _prepareSparql($arModelIds) - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php'; - return new SparqlEngineDb($this, $arModelIds); - }//function _prepareSparql() - - - - /** - * Parses an query and returns the parsed form. - * If the query is not a string but a Query object, - * it will just be returned. - * - * @param $query mixed String or Query object - * @return Query query object - * @throws Exception If $query is no string and no Query object - */ - function _parseSparqlQuery($query) - { - if ($this->queryParser === null) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php'; - $this->queryParser = new SparqlParser(); - } - return $this->queryParser->parse($query); - }//function _parseSparqlQuery($query) - -} // end: Class DbStore -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Literal.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Literal.php.svn-base deleted file mode 100755 index cc9b6365..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Literal.php.svn-base +++ /dev/null @@ -1,188 +0,0 @@ - - * @author Daniel Westphal - * - * @package model - * @access public - * - */ - class Literal extends Node { - - /** - * Label of the literal - * @var string - * @access private - */ - var $label; - /** - * Language of the literal - * @var string - * @access private - */ - var $lang; - - /** - * Datatype of the literal - * @var string - * @access private - */ - var $dtype; - - - /** - * Constructor - * - * @param string $str label of the literal - * @param string $language optional language identifier - * @param string $datatype optional datatype - * - */ - function Literal($str, $language = NULL, $datatype = null) - { - $this->label = $str; - - if ($language != NULL) { - $this->lang = $language; - } else { - $this->lang = NULL; - } - - if ($datatype != null) { - $this->dtype = $datatype; - } else { - $this->dtype = NULL; - } - } - - /** - * Returns the string value of the literal. - * - * @access public - * @return string value of the literal - */ - function getLabel() { - - return $this->label; - } - - /** - * Returns the language of the literal. - * - * @access public - * @return string language of the literal - */ - function getLanguage() { - - return $this->lang; - } - - /** - * Sets the language of the literal. - * - * @access public - * @param string $lang - */ - function setLanguage($lang) { - - $this->lang = $lang; - } - - /** - * Returns the datatype of the literal. - * - * @access public - * @return string datatype of the literal - */ - function getDatatype() { - - return $this->dtype; - } - - /** - * Sets the datatype of the literal. - * Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER. - * The array $short_datatype with the possible shortcuts is definded in ../constants.php - * - * @access public - * @param string URI of XML datatype or datatype shortcut - * - */ - function setDatatype($datatype) { - GLOBAL $short_datatype; - if (stristr($datatype,DATATYPE_SHORTCUT_PREFIX)) { - $this->dtype = $short_datatype[substr($datatype,strlen(DATATYPE_SHORTCUT_PREFIX)) ];} - else - $this->dtype = $datatype; - } - - /** - * Checks if ihe literal equals another literal. - * Two literals are equal, if they have the same label and they - * have the same language/datatype or both have no language/datatype property set. - * - * @access public - * @param object literal $that - * @return boolean - */ - function equals ($that) { - - if (($that == NULL) or !(is_a($that, 'Literal'))) { - return false; - } - - if ( ($this->label == $that->getLabel()) && ( ( ($this->lang == $that->getLanguage()) || - ($this->lang == NULL && $that->getLanguage() == NULL) ) && - - ( - ($this->dtype == $that->getDatatype() || - ($this->dtype == NULL && $that->getDatatype() == NULL)) ) ) ) - { - return true; - } - - return false; - } - - /** - * Dumps literal. - * - * @access public - * @return string - */ - function toString() { - $dump = 'Literal("' . $this->label .'"'; - if ($this->lang != NULL) - $dump .= ', lang="' . $this->lang .'"'; - if ($this->dtype != NULL) - $dump .= ', datatype="' . $this->dtype .'"'; - $dump .= ')'; - return $dump; - } - - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Literal - */ - function __toString() - { - return $this->toString(); - } - - -} // end: Literal - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/MemModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/MemModel.php.svn-base deleted file mode 100755 index 17faaa45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/MemModel.php.svn-base +++ /dev/null @@ -1,1460 +0,0 @@ - -* @author Gunnar AAstrand Grimnes -* @author Radoslaw Oldakowski -* @author Daniel Westphal -* @author Tobias Gauß -* -* @package model -* @access public -*/ - -class MemModel extends Model { - - /** - * Triples of the MemModel - * @var array - * @access private - */ - var $triples = array(); - - /** - * Array containing the search indices - * @var array['INDEX_TYPE'][]['label'][]['PosInModel'] - * - * @access private - */ - var $indexArr ; - - - /** - * depending on which index is used this variable is -1,0,1,2 or 3 - * - * -1 : no index - * 0 : default indices over subject, predicate, object separate - * 1 : index over subject+predicate+object - * 2 : index over subject+predicate - * 3 : index over subject+object - * - * @var int - * @access private - */ - var $indexed; - - - - /** - * Array of namespaces - * - * @var array - * @access private - */ - var $parsedNamespaces=array(); - - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function MemModel($baseURI = NULL) { - $this->setBaseURI($baseURI); - $this->indexed = INDEX_TYPE; - } - - /** - * Set a base URI for the MemModel. - * Affects creating of new resources and serialization syntax. - * If the URI doesn't end with # : or /, then a # is added to the URI. - * @param string $uri - * @access public - */ - function setBaseURI($uri) { - - if ($uri != NULL) { - $c = substr($uri, strlen($uri)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $uri .= '#'; - } - $this->baseURI = $uri; - } - - - /** - * Number of triples in the MemModel - * - * @return integer - * @access public - */ - function size() { - return count($this->triples); - } - - /** - * Checks if MemModel is empty - * - * @return boolean - * @access public - */ - function isEmpty() { - if (count($this->triples) == 0) { - return TRUE; - } else { - return FALSE; - }; - } - - - /** - * Adds a new triple to the MemModel without checking if the statement is already in the MemModel. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) { - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: add): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if($this->indexed != -1){ - $this->triples[] = $statement; - end($this->triples); - $k=key($this->triples); - if($this->indexed==0){ - // index over S - $this->_indexOpr($statement,$k,4,1); - // index over P - $this->_indexOpr($statement,$k,5,1); - // index over O - $this->_indexOpr($statement,$k,6,1); - }else{ - $this->_indexOpr($statement,$k,$this->indexed,1); - } - - }else{ - $this->triples[] = $statement; - } - } - - - - /** - * Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates($statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: addWithoutDuplicates): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!$this->contains($statement)) { - $this->add($statement); - return true; - }else{ - return false; - } - } - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: remove): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - if($this->indexed==-1){ - $pass=false; - foreach($this->triples as $key => $value) { - if ($this->matchStatement($value, $statement->subject(), $statement->predicate(), $statement->object())) { - unset($this->triples[$key]); - $pass= true; - } - } - return $pass; - }else{ - $k= null; - if($this->indexed==0){ - $pass=false; - $del=false; - while($del!=-1){ - // index over S - $del=$this->_indexOpr($statement,$k,4,0); - // index over P - $this->_indexOpr($statement,$k,5,0); - // index over O - $this->_indexOpr($statement,$k,6,0); - if($del!=-1){ - unset($this->triples[$del]); - $pass=true; - } - } - return $pass; - }else{ - $pass=false; - $del=false; - while($del!=-1){ - $del=$this->_indexOpr($statement,$k,$this->indexed,0); - if($del!=-1){ - unset($this->triples[$del]); - $pass=true; - } - } - return $pass; - } - } - } - - /** - * Short Dump of the MemModel. - * - * @access public - * @return string - */ - function toString() { - return 'MemModel[baseURI=' . $this->getBaseURI() . '; size=' . $this->size() . ']'; - } - - /** - * Dumps of the MemModel including all triples. - * - * @access public - * @return string - */ - function toStringIncludingTriples() { - $dump = $this->toString() . chr(13); - foreach($this->triples as $value) { - $dump .= $value->toString() . chr(13); - } - return $dump; - } - - - - - /** - * Writes the RDF serialization of the MemModel as HTML. - * - * @access public - */ - function writeAsHtml() { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this); - $rdf = htmlspecialchars($rdf, ENT_QUOTES); - $rdf = str_replace(' ', ' ', $rdf); - $rdf = nl2br($rdf); - echo $rdf; - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - */ - function writeAsHtmlTable() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - RDFUtil::writeHTMLTable($this); - } - - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - * @return string - */ - function writeRdfToString() { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this); - return $rdf; - } - - - /** - * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the MemModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') { - - - // get suffix and create a corresponding serializer - if ($type=='rdf') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser=new RdfSerializer(); - }elseif ($type=='nt') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $ser=new NTripleSerializer(); - }elseif ($type=='n3') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $ser=new N3Serializer(); - }else { - print ('Serializer type not properly defined. Use the strings "rdf","n3" or "nt".'); - return false; - }; - - return $ser->saveAs($this, $filename); - } - - - /** - * Tests if the MemModel contains the given triple. - * TRUE if the triple belongs to the MemModel; - * FALSE otherwise. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) { - - // no index ->linear contains - if ($this->indexed==-1){ - foreach($this->triples as $value) { - if ($value->equals($statement)){ - return TRUE; } - } - return false; - } - if ($this->indexed==0){ - $res = $this->_containsIndex($statement,4); - return $res; - }else{ - return $this->_containsIndex($statement,$this->indexed); - } - } - - - /** - * Determine if all of the statements in a model are also contained in this MemModel. - * True if all of the statements in $model are also contained in this MemModel and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if(!$this->contains($statement)) - return FALSE; - return TRUE; - - }elseif (is_a($model, 'DbModel')) - - return $model->containsAll($this); - - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Determine if any of the statements in a model are also contained in this MemModel. - * True if any of the statements in $model are also contained in this MemModel and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $modelStatement) - if($this->contains($modelStatement)) - return TRUE; - return FALSE; - - }elseif (is_a($model, 'DbModel')) - - return $model->containsAny($this); - - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Builds a search index for the statements in the MemModel. - * The index is used by the find(),contains(),add() and remove() functions. - * Performance example using a model with 43000 statements on a Linux machine: - * Find without index takes 1.7 seconds. - * Indexing takes 1.8 seconds. - * Find with index takes 0.001 seconds. - * So if you want to query a model more then once, build a index first. - * The defaultindex is indices over subject, predicate, object seperate. - * - * mode = 0 : indices over subject,predicate,object (default) - * mode = 1 : index over subject+predicate+object - * mode = 2 : index over subject+predicate - * mode = 3 : index over subject+object - * - * @param int $mode - * @access public - */ - function index($mode) { - - unset($this->indexArr); - $this->indexArr=array(); - switch($mode){ - // unset indices - case -1: - $this->indexed=-1; - unset($this->indexArr); - break; - // index over SPO - case 0: - $this->indexed=0; - foreach($this->triples as $k => $t) { - // index over S - $this->_indexOpr($t,$k,4,1); - // index over P - $this->_indexOpr($t,$k,5,1); - // index over O - $this->_indexOpr($t,$k,6,1); - } - break; - default: - $this->indexed=$mode; - foreach($this->triples as $k => $t) { - $this->_indexOpr($t,$k,$this->indexed,1); - } - break; - } - } - - - /** - * Returns true if there is an index, false if not. - * - * @return boolean - * @access public - */ - function isIndexed() { - if($this->indexed!=-1){ - return TRUE; - }else{ - return FALSE; - } - } - - /** - * Returns the indextype: - * -1 if there is no index, 0 if there are indices over S,P,O(separate), - * 1 if there is an index over SPO, 2 if there is an index over SP and 3 if - * there is an index over SO. - * - * @return int - * @access public - * - */ - function getIndexType(){ - return $this->indexed; - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * Returns an empty MemModel if nothing is found. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return object MemModel - * @access public - * @throws PhpError - */ - - function find($subject,$predicate,$object) { - - if ( - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = new MemModel($this->getBaseURI()); - $res->indexed=-1; - - if($this->isEmpty()) - return $res; - - if($subject == NULL && $predicate == NULL && $object == NULL) - return $this; - - switch($this->indexed){ - case 1: - if($subject!=NULL && $predicate != NULL && $object != NULL){ - $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,1); - }else{ - break; - } - - case 2: - if($subject!=NULL && $predicate != NULL){ - $pos=$subject->getLabel().$predicate->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,2); - }else{ - break; - } - - case 3: - if($subject!=NULL && $object != NULL){ - $pos=$subject->getLabel().$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,3); - }else{ - break; - } - case 0: - if($subject!= null){ - $pos=$subject->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,4); - } - if($predicate!= null){ - $pos=$predicate->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,5); - } - if($object!= null){ - $pos=$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,6); - } - } - // if no index: linear search - foreach($this->triples as $value) { - if ($this->matchStatement($value, $subject, $predicate, $object)) - $res->add($value); - } - return $res; - - } - - - - - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches the regular expression. - * Returns an empty MemModel if nothing is found. - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) { - - $res = new MemModel($this->getBaseURI()); - - if($this->size() == 0) - return $res; - - if($subject_regex == NULL && $predicate_regex == NULL && $object_regex == NULL) - return $this; - - foreach($this->triples as $value) { - if ( - ($subject_regex == NULL || preg_match($subject_regex, $value->subj->getLabel())) && - ($predicate_regex == NULL || preg_match($predicate_regex, $value->pred->getLabel())) && - ($object_regex == NULL || preg_match($object_regex, $value->obj->getLabel())) - ) $res->add($value); - } - - return $res; - - } - - /** - * Returns all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Returns an empty MemModel if nothing is found. - * - * @param string $vocabulary - * @return object MemModel - * @access public - */ - function findVocabulary($vocabulary) { - - if($this->size() == 0) - return new MemModel(); - if($vocabulary == NULL || $vocabulary == '') - return $this; - - $res = new MemModel($this->getBaseURI()); - if($this->indexed==0){ - foreach($this->indexArr[5] as $key => $value){ - $pos=strpos($key,'#')+1; - if(substr($key,0,$pos)==$vocabulary){ - for($i=1;$i<=$value[0];$i++){ - $res->add($this->triples[$value[$i]]); - } - } - } - return $res; - }else{ - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - foreach($this->triples as $value) { - if (RDFUtil::getNamespace($value->getPredicate()) == $vocabulary) - $res->add($value); - } - return $res; - } - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement of the MemModel where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search for. Default = 0 - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) { - - $currentOffset = 0; - for($i=0;$i<=$offset;$i++) - { - $res = $this->findFirstMatchOff($subject, $predicate, $object, $currentOffset); - $currentOffset=$res+1; - } - if ($res != -1) { - return $this->triples[$res]; - } else { - return NULL; - } - } - - - - - /** - * Searches for triples and returns the first matching statement from a given offset. - * This method is used by the util/findIterator. NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node, $off ); - * Returns the position of the first statement of the MemModel where the object equals $node from the given - * offset. - * Returns an -1 if nothing is found. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param int $off - * @return int - * @access private - */ - function findFirstMatchOff($subject,$predicate, $object,$off) { - - if ( - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - $match=-1; - $ind=$this->indexed; - if($subject == NULL && $predicate == NULL && $object == NULL) - { - foreach ($this->triples as $key => $statement) - { - if ($key >= $off) - return $key; - } - return -1; - } - - switch($ind){ - case 1: - if($subject!=NULL && $predicate != NULL && $object != NULL){ - $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,1,$off); - }else{ - break; - } - - case 2: - if($subject!=NULL && $predicate != NULL){ - $pos=$subject->getLabel().$predicate->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,2,$off); - }else{ - break; - } - - case 3: - if($subject!=NULL && $object != NULL){ - $pos=$subject->getLabel().$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,3,$off); - }else{ - break; - } - case 0: - if($subject!= null){ - $pos=$subject->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,4,$off); - } - if($predicate!= null){ - $pos=$predicate->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,5,$off); - } - if($object!= null){ - $pos=$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,6,$off); - } - break; - } - // if no index: linear search - foreach($this->triples as $key => $value){ - if ($this->matchStatement($value, $subject, $predicate, $object)){ - if($off<=$key){ - $match=$key; - break; - } - } - } - return $match; - } - - - /** - * Searches for triples and returns the number of matches. - * NULL input for any parameter will match anything. - * Example: $result = $m->findCount( NULL, NULL, $node ); - * Finds all triples with $node as object. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return integer - * @access public - */ - function findCount($subject, $predicate, $object) { - - $res = $this->find($subject, $predicate, $object); - return $res->size(); - - } - - - /** - * Perform an RDQL query on this MemModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function rdqlQuery($queryString, $returnNodes = TRUE) { - - // Import RDQL Package - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // this method can only query this MemModel - // if another model was specified in the from clause throw an error - if (isset($parsedQuery['sources'][1])) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: rdqlQuery):'; - $errmsg .= ' this method can only query this MemModel'; - trigger_error($errmsg, E_USER_ERROR); - } - - $engine = new RdqlMemEngine(); - $res =& $engine->queryModel($this, $parsedQuery, $returnNodes); - - return $res; - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) { - // Import RDQL Package - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes)); - } - - /** - * General method to replace nodes of a MemModel. - * NULL input for any parameter will match nothing. - * Example: $m->replace($node, NULL, $node, $replacement); - * Replaces all $node objects beeing subject or object in - * any triple of the MemModel with the $needle node. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object Node $replacement - * @access public - * @throws PhpError - */ - function replace($subject, $predicate, $object, $replacement) { - - if ( - (!is_a($replacement, 'Node')) || - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: replace): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - if($this->size() == 0) - break; - foreach($this->triples as $key => $value) { - if ($this->triples[$key]->subj->equals($subject)) { - $this->triples[$key]->subj = $replacement; - } - if ($this->triples[$key]->pred->equals($predicate)) - $this->triples[$key]->pred = $replacement; - if ($this->triples[$key]->obj->equals($object)) - $this->triples[$key]->obj = $replacement; - - } - $this->index($this->indexed); - } - - - /** - * Internal method that checks, if a statement matches a S, P, O or NULL combination. - * NULL input for any parameter will match anything. - * - * @param object Statement $statement - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return boolean - * @access private - */ - function matchStatement($statement, $subject, $predicate, $object) { - - if(($subject != NULL) AND !($statement->subj->equals($subject))) - return false; - - if($predicate != NULL && !($statement->pred->equals($predicate))) - return false; - - if($object != NULL && !($statement->obj->equals($object))) - return false; - - return true; - } - - - - - /** - * Checks if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * @access public - * @param object model &$that - * @throws phpErrpr - * @return boolean - */ - - function equals(&$that) { - - if (!is_a($that, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: equals): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if ($this->size() != $that->size()) - return FALSE; - /* - if (!$this->containsAll($that)) - return FALSE; - return TRUE; - */ - include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php"); - return ModelComparator::compare($this,$that); - } - - /** - * Returns a new MemModel that is the set-union of the MemModel with another model. - * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - * - */ - function & unite(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: unite): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = $this; - - if (is_a($model, 'MemModel')) { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $res->addWithoutDuplicates($statement); - } - } - - elseif (is_a($model, 'DbModel')) { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $res->addWithoutDuplicates($value); - } - - return $res; - } - - /** - * Returns a new MemModel that is the subtraction of another model from this MemModel. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - - function & subtract(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: subtract): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = $this; - - - if (is_a($model, 'MemModel')) - { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $res->remove($statement); - } - } - elseif (is_a($model, 'DbModel')) - { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $res->remove($value); - } - - - return $res; - } - - /** - * Returns a new MemModel containing all the statements which are in both this MemModel and another. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function & intersect(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: intersect: Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = new MemModel($this->getBaseURI()); - - if (is_a($model, 'DbModel') || is_a($model, 'RDFSBModel')) - { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) { - if ($this->contains($value)) - $res->add($value); - } - } - - elseif (is_a($model, 'MemModel')) - { - foreach($model->triples as $value) { - if ($this->contains($value)) - $res->add($value); - } - } - - - - return $res; - } - - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: addModel): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $blankNodes_tmp = array(); - - if (is_a($model, 'MemModel')) { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - }; - $this->addParsedNamespaces($model->getParsedNamespaces()); - } - - elseif (is_a($model, 'DbModel')) { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $this->_addStatementFromAnotherModel($value, $blankNodes_tmp); - } - $this->index($this->indexed); - } - - - /** - * Reifies the MemModel. - * Returns a new MemModel that contains the reifications of all statements of this MemModel. - * - * @access public - * @return object MemModel - */ - function & reify() { - $res = new MemModel($this->getBaseURI()); - - $stateIt=$this->getStatementIterator(); - while($statement=$stateIt->next()) - { - $pointer =& $statement->reify($res); - $res->addModel($pointer); - }; - - return $res; - } - - /** - * Returns a StatementIterator for traversing the MemModel. - * @access public - * @return object StatementIterator - */ - function & getStatementIterator() { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - - $si = new StatementIterator($this); - return $si; - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & findAsIterator($sub=null,$pred=null,$obj=null) { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/FindIterator.php'; - - $if = new FindIterator($this,$sub,$pred,$obj); - return $if; - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & iterFind($sub=null,$pred=null,$obj=null) { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/IterFind.php'; - - $if = new IterFind($this,$sub,$pred,$obj); - return $if; - } - - - /** - * Returns the models namespaces. - * - * @author Tobias Gau� - * @access public - * @return Array - */ - function getParsedNamespaces(){ - if(count($this->parsedNamespaces)!=0){ - return $this->parsedNamespaces; - }else{ - return false; - } - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gau� - * @access public - * @param Array $newNs - */ - function addParsedNamespaces($newNs){ - if($newNs) - $this->parsedNamespaces = $this->parsedNamespaces + $newNs; - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gau� - * @access public - * @param String - * @param String - */ - function addNamespace($prefix, $nmsp){ - $this->parsedNamespaces[$nmsp]=$prefix; - } - - /** - * removes a single namespace from the model - * - * @author Tobias Gau� - * @access public - * @param String $nmsp - */ - function removeNamespace($nmsp){ - if(isset($this->parsedNamespaces[$nmsp])){ - unset($this->parsedNamespaces[$nmsp]); - return true; - }else{ - return false; - } - } - - - - /** - * Close the MemModel and free up resources held. - * - * @access public - */ - function close() { - unset( $this->baseURI ); - unset( $this->triples ); - } - - // ============================================================================= - // *************************** helper functions ******************************** - // ============================================================================= - /** - * Checks if $statement is in index - * - * @param int $ind - * @param Statement &$statement - * @return boolean - * @access private - */ - function _containsIndex(&$statement,$ind){ - switch($ind){ - case 4: - $sub=$statement->getSubject(); - $pos=$sub->getLabel(); - break; - case 1: - $sub=$statement->getSubject(); - $pred=$statement->getPredicate(); - $obj=$statement->getObject(); - $pos=$sub->getLabel().$pred->getLabel().$obj->getLabel(); - break; - case 2: - $sub=$statement->getSubject(); - $pred=$statement->getPredicate(); - $pos=$sub->getLabel().$pred->getLabel(); - break; - case 3: - $sub=$statement->getSubject(); - $obj=$statement->getObject(); - $pos=$sub->getLabel().$obj->getLabel(); - break; - } - - if (!isset($this->indexArr[$ind][$pos])) - return FALSE; - foreach ($this->indexArr[$ind][$pos] as $key => $value) { - $t=$this->triples[$value]; - if ($t->equals($statement)) - return TRUE; - } - return FALSE; - } - - - - - - /** - * finds a statement in an index. $pos is the Position in the index - * and $ind the adequate searchindex - * - * @param String $pos - * @param Object Subject &$subject - * @param Object Predicate &$predicate - * @param Object Object &$object - * @param int &ind - * @return MemModel $res - * @access private - */ - function _findInIndex($pos,&$subject,&$predicate,&$object,$ind){ - $res = new MemModel($this->getBaseURI()); - $res->indexed=-1; - if (!isset($this->indexArr[$ind][$pos])) - return $res; - foreach($this->indexArr[$ind][$pos] as $key =>$value){ - $t=$this->triples[$value]; - if ($this->matchStatement($t,$subject,$predicate,$object)) - $res->add($t); - } - return $res; - } - /** - * adds/removes a statement into/from an index. - * mode=0 removes the statement from the index; - * mode=1 adds the statement into the index. - * returns the statements position. - * - * @param Object Statement &$statement - * @param int $k - * @param int $ind - * @param int $mode - * @return int $k - * @access private - */ - function _indexOpr(&$statement,$k,$ind,$mode){ - // determine position in adequate index - switch($ind){ - case 1: - $s=$statement->getSubject(); - $p=$statement->getPredicate(); - $o=$statement->getObject(); - $pos=$s->getLabel().$p->getLabel().$o->getLabel(); - break; - case 2: - $s=$statement->getSubject(); - $p=$statement->getPredicate(); - $pos=$s->getLabel().$p->getLabel(); - break; - case 3: - $s=$statement->getSubject(); - $o=$statement->getObject(); - $pos=$s->getLabel().$o->getLabel(); - break; - case 4: - $s=$statement->getSubject(); - $pos=$s->getLabel(); - break; - case 5: - $p=$statement->getPredicate(); - $pos=$p->getLabel(); - break; - case 6: - $o=$statement->getObject(); - $pos=$o->getLabel(); - break; - } - switch($mode){ - // add in Index - case 1: - if(isset($this->indexArr[$ind][$pos])){ - $this->indexArr[$ind][$pos][] = $k; - }else{ - $this->indexArr[$ind][$pos][0] = $k; - } - break; - // remove from Index - case 0: - $subject=$statement->getSubject(); - $predicate=$statement->getPredicate(); - $object=$statement->getObject(); - $k=-1; - if(!isset($this->indexArr[$ind][$pos])){ - return -1; - } - $num=count($this->indexArr[$ind][$pos]); - foreach($this->indexArr[$ind][$pos] as $key => $value){ - $t=$this->triples[$value]; - if($this->matchStatement($t,$subject,$predicate,$object)){ - $k=$value; - if($num==1){ - unset($this->indexArr[$ind][$pos]); - }else{ - unset($this->indexArr[$ind][$pos][$key]); - } - return $k; - } - } - break; - } - return $k; - } - - - /** - * finds next or previous matching statement. - * Returns Position in model or -1 if there is no match. - * - * - * @param String - * @param object Subject - * @param object Predicate - * @param object Object - * @param integer - * @param integer - * @return integer - * @access private - */ - function _findMatchIndex($pos,&$s,&$p,&$o,$ind,$off){ - $match=-1; - if (!isset($this->indexArr[$ind][$pos])) { - return $match;} - foreach($this->indexArr[$ind][$pos] as $key =>$value){ - $t=$this->triples[$value]; - if ($this->matchStatement($t,$s,$p,$o)){ - if($off <= $value){ - $match= $value; - return $match; - } - } - } - - return $match; - - } - - - - -} // end: MemModel - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Model.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Model.php.svn-base deleted file mode 100755 index f61e31a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Model.php.svn-base +++ /dev/null @@ -1,566 +0,0 @@ - triples, where P is a uriref, S is either - * a uriref or a blank node, and O is either a uriref, a blank node, or a literal. - * - * - * @version $Id$ - * @author Radoslaw Oldakowski - * @author Daniel Westphal - * - * @package model - * @access public - */ -class Model extends Object -{ - /** - * Base URI of the Model. - * Affects creating of new resources and serialization syntax. - * - * @var string - * @access private - */ - var $baseURI; - - /** - * Number of the last assigned bNode. - * - * @var integer - * @access private - */ - var $bNodeCount; - - /** - * SparqlParser so we can re-use it - * @var Parser - */ - var $queryParser = null; - - - - /** - * Notice for people who are used to work with older versions of RAP. - * - * @throws PHPError - * @access public - */ - function Model() - { - - $errmsg = 'Since RAP 0.6 the class for manipulating memory models has been renamed to MemModel.'; - $errmsg .= '
Sorry for this inconvenience.
'; - - trigger_error($errmsg, E_USER_ERROR); - } - - - - /** - * Return current baseURI. - * - * @return string - * @access public - */ - function getBaseURI() - { - return $this->baseURI; - } - - - - /** - * Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to this DbModel. - * - * @param string $filename - * @param string $type - * @param boolean $stream - * @access public - */ - function load($filename, $type = NULL, $stream=false) - { - if ((isset($type)) && ($type =='n3') OR ($type =='nt')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - }elseif ((isset($type)) && ($type =='rdf')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - }elseif ((isset($type)) && ($type =='grddl')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - }elseif ((isset($type)) && ($type =='rss')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS); - $parser = new RssParser(); - }else { - // create a parser according to the suffix of the filename - // if there is no suffix assume the file to be XML/RDF - preg_match("/\.([a-zA-Z0-9_]+)$/", $filename, $suffix); - if (isset($suffix[1]) && (strtolower($suffix[1]) == 'n3' OR strtolower($suffix[1]) == 'nt')){ - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - }elseif (isset($suffix[1]) && (strtolower($suffix[1]) == 'htm' OR strtolower($suffix[1]) == 'html' OR strtolower($suffix[1]) == 'xhtml')){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - }else{ - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - } - }; - - if (($stream && $type=='rdf')||($stream && $type=='n3')) { - $temp=&$parser->generateModel($filename,false,$this); - } else{ - $temp=&$parser->generateModel($filename); - } - $this->addModel($temp); - if($this->getBaseURI()== null) - $this->setBaseURI($temp->getBaseURI()); - } - - /** - * This method takes a string conatining data and adds the parsed data to this model. - * - * @param string $str The string containing the data to be parsed and loaded. - * @param type $type The type of the string, currently only 'json' is supported. - */ - function loadFromString($str, $type) { - - switch ($type) { - case 'json': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_JSON); - $parser = new JsonParser(); - break; - case 'n3': - case 'nt': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - break; - case 'rdf': - case 'rdfxml': - case 'xml': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - break; - case 'grddl': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - break; - case 'rss': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS); - $parser = new RssParser(); - break; - default: - trigger_error('(class: Model; method: loadFromString): type ' . $type . 'is currently not supported', - E_USER_ERROR); - } - - if ($parser instanceof JsonParser) { - $parser->generateModelFromString($str, $this); - } else { - $parser->generateModel($str, false, $this); - } - } - - /** - * Adds a statement from another model to this model. - * If the statement to be added contains a blankNode with an identifier - * already existing in this model, a new blankNode is generated. - * - * @param Object Statement $statement - * @access private - */ - function _addStatementFromAnotherModel($statement, &$blankNodes_tmp) - { - $subject = $statement->getSubject(); - $object = $statement->getObject(); - - if (is_a($subject, "BlankNode")) { - $label = $subject->getLabel(); - if (!array_key_exists($label, $blankNodes_tmp)) - { - if ($this->findFirstMatchingStatement($subject, NULL, NULL) - || $this->findFirstMatchingStatement(NULL, NULL, $subject)) - { - $blankNodes_tmp[$label] = new BlankNode($this); - $statement->subj = $blankNodes_tmp[$label]; - } else { - $blankNodes_tmp[$label] = $subject; - } - } else - $statement->subj = $blankNodes_tmp[$label]; - } - - if (is_a($object, "BlankNode")) { - $label = $object->getLabel(); - if (!array_key_exists($label, $blankNodes_tmp)) - { - if ($this->findFirstMatchingStatement($object, NULL, NULL) - || $this->findFirstMatchingStatement(NULL, NULL, $object)) - { - $blankNodes_tmp[$label] = new BlankNode($this); - $statement->obj = $blankNodes_tmp[$label]; - } else { - $blankNodes_tmp[$label] = $object; - } - } else - $statement->obj = $blankNodes_tmp[$label]; - } - $this->add($statement); - } - - - - /** - * Internal method, that returns a resource URI that is unique for the Model. - * URIs are generated using the base_uri of the DbModel, the prefix and a unique number. - * If no prefix is defined, the bNode prefix, defined in constants.php, is used. - * - * @param string $prefix - * @return string - * @access private - */ - function getUniqueResourceURI($prefix = false) - { - static $bNodeCount; - if(!$bNodeCount) - $bNodeCount = 0; - - if(!$prefix) - $prefix=BNODE_PREFIX; - - return $prefix.++$bNodeCount; - } - - - - /** - * Returns a ResModel with this model as baseModel. This is the same as - * ModelFactory::getResModelForBaseModel($this). - * - * @return object ResModel - * @access public - */ - function & getResModel() - { - return ModelFactory::getResModelForBaseModel($this); - } - - - - /** - * Returns an OntModel with this model as baseModel. - * $vocabulary has to be one of the following constants (currently only one is supported): - * RDFS_VOCABULARY to select a RDFS Vocabulary. - * - * This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary). - * - * @param constant $vocabulary - * @return object OntModel - * @access public - */ - function & getOntModel($vocabulary) - { - return ModelFactory::getOntModelForBaseModel($this, $vocabulary); - } - - - - /** - * Searches for triples using find() and tracks forward blank nodes - * until the final objects in the retrieved subgraphs are all named resources. - * The method calls itself recursivly until the result is complete. - * NULL input for subject, predicate or object will match anything. - * Inputparameters are ignored for recursivly found statements. - * Returns a new MemModel or adds (without checking for duplicates) - * the found statements to a given MemModel. - * Returns an empty MemModel, if nothing is found. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: This method can be slow with large models. - * NOTE: Blank nodes are not renamed, they keep the same nodeIDs - * as in the queried model! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton Koestlbacher - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object MemModel $object - * @return object MemModel - * @access public - * @throws PhpError - */ - function findForward($subject, $predicate, $object, &$newModel = NULL) - { - if (!is_a($newModel, "MemModel")) - { - $newModel = New MemModel; - } - - if (is_a($this, "DbModel")) - { - $model = $this; - $res = $model->find($subject, $predicate, $object); - $it = $res->getStatementIterator(); - } - elseif (is_a($this, "MemModel")) { - $model = $this; - $it = $model->findAsIterator($subject, $predicate, $object); - } - elseif (is_a($this, "ResModel")) { - $model = $this->model; - $it = $model->findAsIterator($subject, $predicate, $object); - } - - while ($it->hasNext()) - { - $statement = $it->next(); - $newModel->add($statement); - if (is_a($statement->object(),'BlankNode')) - { - $model->findForward($statement->object(), NULL, NULL, $newModel); - } - } - return $newModel; - } - - - - /** - * Perform an RDQL query on this Model. Should work with all types of models. - * This method returns a MemModel containing the result statements. - * If $closure is set to TRUE, the result will additionally contain - * statements found by the findForward-method for blank nodes. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: If called with $closure = TRUE this method - * can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton K�tlbacher - * @author code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer - * @access public - * @param string $queryString - * @param boolean $closure - * @return object MemModel - * - */ - function & getMemModelByRDQL($queryString, $closure = FALSE) - { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // If there are variables used in the pattern but not - // in the select clause, add them to the select clause - foreach ($parsedQuery['patterns'] as $n => $pattern) - { - foreach ($pattern as $key => $val_1) - { - if ($val_1['value']{0}=='?') - { - if (!in_array($val_1['value'],$parsedQuery['selectVars'])) - { - array_push($parsedQuery['selectVars'],$val_1['value']); - } - } - } - } - - if (is_a($this, "DbModel")) - { - $engine = new RdqlDbEngine(); - $model = $this; - } - elseif (is_a($this, "MemModel")) - { - $engine = new RdqlMemEngine(); - $model = $this; - } - elseif (is_a($this, "ResModel")) - { - $engine = new RdqlMemEngine(); - $model = $this->model; - } - - $res = $engine->queryModel($model,$parsedQuery,TRUE); - $rdqlIter = new RdqlResultIterator($res); - $newModel = new MemModel(); - - // Build statements from RdqlResultIterator - while ($rdqlIter->hasNext()) { - $result = $rdqlIter->next(); - foreach ($parsedQuery['patterns'] as $n => $pattern) - { - if (substr($pattern['subject']['value'], 0, 1) == '?') - { - $subj = $result[$pattern['subject']['value']]; - } - else - { - $subj = new Resource($pattern['subject']['value']); - } - if (substr($pattern['predicate']['value'], 0, 1) == '?') - { - $pred = $result[$pattern['predicate']['value']]; - } - else - { - $pred = new Resource($pattern['predicate']['value']); - } - - if (substr($pattern['object']['value'], 0, 1) == '?') - { - $obj = $result[$pattern['object']['value']]; - } - else - { - if (isset($pattern['object']['is_literal'])) - { - $obj = new Literal($pattern['object']['value']); - $obj->setDatatype($pattern['object']['l_dtype']); - $obj->setLanguage($pattern['object']['l_lang']); - } - else - { - $obj = new Resource($pattern['object']['value']); - } - } - - $statement = new Statement($subj,$pred,$obj); - $newModel->add($statement); - - // findForward() Statements containing an eventually given blank node - // and add them to the result, if closure = true - if (is_a($statement->object(),'BlankNode') && $closure == True) - { - $newModel = $model->findForward($statement->object(),NULL,NULL, $newModel); - } - if (is_a($statement->subject(),'BlankNode') && $closure == True) - { - $newModel = $model->findForward($statement->subject(),NULL,NULL, $newModel); - } - } - } - return $newModel; - } - - - - /** - * Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix) - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * Note: See RDFUtil for further Information. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton K�tlbacher - * @param string $format - * @param boolean $short_prefix - * @return string, binary - * @access public - * @throws PhpError - */ - function visualize($format = "dot", $short_prefix = TRUE) - { - return RDFUtil::visualizeGraph($this, $format, $short_prefix); - } - - - /** - * Performs a SPARQL query against a model. The model is converted to - * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param string $query the sparql query string - * @param string $resultform the result form ('xml' for SPARQL Query Results XML Format) - * @return string/array - */ - function sparqlQuery($query, $resultform = false) - { - list($engine, $dataset) = $this->_prepareSparql(); - return $engine->queryModel( - $dataset, - $this->_parseSparqlQuery($query), - $resultform - ); - }//function sparqlQuery($query,$resultform = false) - - - - /** - * Prepares a sparql query and returns a prepared statement - * that can be executed with data later on. - * - * @param string $query Sparql query to prepare. - * @return SparqlEngine_PreparedStatement prepared statement object - */ - function sparqlPrepare($query) - { - list($engine, $dataset) = $this->_prepareSparql(); - return $engine->prepare( - $dataset, - $this->_parseSparqlQuery($query) - ); - }//function sparqlPrepare($query) - - - - /** - * Prepares everything for SparqlEngine-usage - * Loads the files, creates instances for SparqlEngine and - * Dataset... - * - * @return array First value is the sparql engine, second the dataset - */ - function _prepareSparql() - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php'; - require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'; - - $dataset = new DatasetMem(); - $dataset->setDefaultGraph($this); - - return array( - SparqlEngine::factory($this), - $dataset - ); - }//function _prepareSparql() - - - - /** - * Parses an query and returns the parsed form. - * If the query is not a string but a Query object, - * it will just be returned. - * - * @param $query mixed String or Query object - * @return Query query object - * @throws Exception If $query is no string and no Query object - */ - function _parseSparqlQuery($query) - { - if ($this->queryParser === null) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php'; - $this->queryParser = new SparqlParser(); - } - return $this->queryParser->parse($query); - }//function _parseSparqlQuery($query) - -} // end: Model - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelFactory.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelFactory.php.svn-base deleted file mode 100755 index b3dd1601..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelFactory.php.svn-base +++ /dev/null @@ -1,288 +0,0 @@ - -* @author Richard Cyganiak -* -* -* @package model -* @access public -**/ -class ModelFactory -{ - /** - * Returns a MemModel. - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getDefaultModel($baseURI = null) - { - return ModelFactory::getMemModel($baseURI); - } - - /** - * Returns a NamedGraphSetMem. - * You can supply a GraphSet name. - * - * @param string $graphSetId - * @param string $uri - * @access public - */ - function & getDatasetMem($graphSetId = null) - { - require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'; - $m = new DatasetMem($graphSetId); - return $m; - } - - /** - * Returns a MemModel. - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getMemModel($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php'; - $m = new MemModel($baseURI); - return $m; - } - - /** - * Returns a DbModel with the database connection - * defined in constants.php. - * You can supply a base URI. If a model with the given base - * URI exists in the DbStore, it'll be opened. - * If not, a new model will be created. - * - * @param string $baseURI - * @return object DbModel - * @access public - */ - function & getDefaultDbModel($baseURI = null) - { - $dbStore = ModelFactory::getDbStore(); - $m = ModelFactory::getDbModel($dbStore,$baseURI); - return $m; - } - - /** - * Returns a new DbModel using the database connection - * supplied by $dbStore. - * You can supply a base URI. If a model with the given base - * URI exists in the DbStore, it'll be opened. - * If not, a new model will be created. - * - * @param object DbStore $dbStore - * @param string $baseURI - * @return object DbModel - * @access public - */ - function & getDbModel($dbStore, $baseURI = null) - { - if ($dbStore->modelExists($baseURI)) { - return $dbStore->getModel($baseURI); - } - - return $dbStore->getNewModel($baseURI); - } - - /** - * Returns a database connection with the given parameters. - * Paramters, which are not defined are taken from the constants.php - * - * @param string $dbDriver - * @param string $host - * @param string $dbName - * @param string $user - * @param string $password - * @return object DbStore - * @access public - */ - function & getDbStore($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME, - $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) - { - $dbs = new DbStore($dbDriver, $host, $dbName,$user, $password); - return $dbs; - } - - /** - * Returns a InfModelF. - * (MemModel with forward chaining inference engine) - * Configurations can be done in constants.php - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getInfModelF($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php'; - $mod = new InfModelF($baseURI); - return $mod; - } - - /** - * Returns a InfModelB. - * (MemModel with backward chaining inference engine) - * Configurations can be done in constants.php - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getInfModelB($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php'; - $mod = new InfModelB($baseURI); - return $mod; - } - - /** - * Returns a ResModel. - * $modelType has to be one of the following constants: - * MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new - * model from defined type. - * You can supply a base URI - * - * @param constant $modelType - * @param string $baseURI - * @return object ResModel - * @access public - */ - function & getResModel($modelType, $baseURI = null) - { - switch ($modelType) { - case DBMODEL: - $baseModel = ModelFactory::getDefaultDbModel($baseURI); - break; - - case INFMODELF: - $baseModel = ModelFactory::getInfModelF($baseURI); - break; - - case INFMODELB: - $baseModel = ModelFactory::getInfModelB($baseURI); - break; - - default: - $baseModel = ModelFactory::getMemModel($baseURI); - break; - } - return ModelFactory::getResModelForBaseModel($baseModel); - } - - /** - * Creates a ResModel that wraps an existing base model. - * - * @param object Model $baseModel - * @return object ResModel - * @access public - */ - function &getResModelForBaseModel(&$baseModel) { - require_once RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php'; - $mod = new ResModel($baseModel); - return $mod; - } - - /** - * Returns an OntModel. - * $modelType has to be one of the following constants: - * MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel - * with a new model from defined type. - * $vocabulary defines the ontology language. Currently only - * RDFS_VOCABULARY is supported. You can supply a model base URI. - * - * @param constant $modelType - * @param constant $vocabulary - * @param string $baseURI - * @return object OntModel - * @access public - */ - function & getOntModel($modelType,$vocabulary, $baseURI = null) - { - switch ($modelType) - { - case DBMODEL: - $baseModel = ModelFactory::getDefaultDbModel($baseURI); - break; - - case INFMODELF: - $baseModel = ModelFactory::getInfModelF($baseURI); - break; - - case INFMODELB: - $baseModel = ModelFactory::getInfModelB($baseURI); - break; - - default: - $baseModel = ModelFactory::getMemModel($baseURI);; - } - - $mod = ModelFactory::getOntModelForBaseModel($baseModel, $vocabulary); - return $mod; - } - - /** - * Creates an OntModel that wraps an existing base model. - * $vocabulary defines the ontology language. Currently only - * RDFS_VOCABULARY is supported. - * - * @param object Model $baseModel - * @param constant $vocabulary - * @return object OntModel - * @access public - */ - function &getOntModelForBaseModel(&$baseModel, $vocabulary) - { - require_once RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php'; - - switch ($vocabulary) - { - case RDFS_VOCABULARY: - require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.RDFS_VOCABULARY); - $vocab_object = new RdfsVocabulary(); - break; - default: - trigger_error("Unknown vocabulary constant '$vocabulary'; only RDFS_VOCABULARY is supported", E_USER_WARNING); - $vocab_object = null; - break; - } - $mod = new OntModel($baseModel, $vocab_object); - return $mod; - } - - - - /** - * Creates a SparqlClient. - * - * @param String $server Link to a SPARQL endpoint. - * @return SparqlClient the SparqlClient object. - * @access public - */ - function & getSparqlClient($server){ - $cl = new SparqlClient($server); - return $cl; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelP.php.svn-base deleted file mode 100755 index ff3067f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/ModelP.php.svn-base +++ /dev/null @@ -1,27 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include Model classes -require_once( RDFAPI_INCLUDE_DIR . 'model/Node.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Literal.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Resource.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Blanknode.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Statement.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Model.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/MemModel.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/DbStore.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/ModelFactory.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlClient.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'sparql/ClientQuery.php' ); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Node.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Node.php.svn-base deleted file mode 100755 index 94ee9b5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Node.php.svn-base +++ /dev/null @@ -1,25 +0,0 @@ - - * @package model - * @abstract - * - */ - class Node extends Object { - } // end:RDFNode - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Resource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Resource.php.svn-base deleted file mode 100755 index a9a0d403..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Resource.php.svn-base +++ /dev/null @@ -1,142 +0,0 @@ - - * - * @package model - * @access public - * - */ - class Resource extends Node { - - /** - * URIref to the resource - * @var string - * @access private - */ - var $uri; - - - /** - * Constructor - * Takes an URI or a namespace/localname combination - * - * @param string $namespace_or_uri - * @param string $localName - * @access public - */ - function Resource($namespace_or_uri , $localName = NULL) { - if ($localName == NULL) { - $this->uri = $namespace_or_uri; - } else { - $this->uri = $namespace_or_uri . $localName; - } - } - - - /** - * Returns the URI of the resource. - * @return string - * @access public - */ - function getURI() { - return $this->uri; - } - - /** - * Returns the label of the resource, which is the URI of the resource. - * @access public - * @return string - */ - function getLabel() { - return $this->getURI(); - } - - /** - * Returns the namespace of the resource. May return null. - * @access public - * @return string - */ - function getNamespace() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - return RDFUtil::guessNamespace($this->uri); - } - - /** - * Returns the local name of the resource. - * @access public - * @return string - */ - function getLocalName() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - return RDFUtil::guessName($this->uri); - } - - /** - * Dumps resource. - * @access public - * @return string - */ - function toString() { - return 'Resource("' . $this->uri .'")'; - } - - /** - * Checks if the resource equals another resource. - * Two resources are equal, if they have the same URI - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) { - - if ($this == $that) { - return true; - } - - if (($that == NULL) or !(is_a($that, 'Resource')) or (is_a($that, 'BlankNode'))) { - return false; - } - - if ($this->getURI() == $that->getURI()) { - return true; - } - - return false; - } - - - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Resource - */ - function __toString() - { - return $this->toString(); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Statement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Statement.php.svn-base deleted file mode 100755 index f788bec8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/.svn/text-base/Statement.php.svn-base +++ /dev/null @@ -1,313 +0,0 @@ - - * @version $Id$ - * @package model - */ -class Statement extends Object { - - /** - * Subject of the statement - * - * @var object resource - * @access private - */ - var $subj; - - /** - * Predicate of the statement - * - * @var object resource - * @access private - */ - var $pred; - - /** - * Object of the statement - * - * @var object node - * @access private - */ - var $obj; - - /** - * The parameters to constructor are instances of classes and not just strings - * - * @param object node $subj - * @param object node $pred - * @param object node $obj - * @throws PhpError - */ - function Statement($subj, $pred, $obj) { - - if (!is_a($subj, 'Resource')) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource expected as subject.'; - trigger_error($errmsg, E_USER_ERROR); - } - if (!is_a($pred, 'Resource') || is_a($pred, 'BlankNode')) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource expected as predicate, no blank node allowed.'; - trigger_error($errmsg, E_USER_ERROR); - } - if (!(is_a($obj, 'Resource') or is_a($obj, 'Literal'))) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource or Literal expected as object.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $this->pred = $pred; - $this->subj = $subj; - $this->obj = $obj; - } - - /** - * Returns the subject of the triple. - * @access public - * @return object node - */ - function getSubject() { - return $this->subj; - } - - /** - * Returns the predicate of the triple. - * @access public - * @return object node - */ - function getPredicate() { - return $this->pred; - } - - /** - * Returns the object of the triple. - * @access public - * @return object node - */ - function getObject() { - return $this->obj; - } - - /** - * Alias for getSubject() - * @access public - * @return object node - */ - function subject() { - return $this->subj; - } - - /** - * Alias for getPredicate() - * @access public - * @return object node - */ - function predicate() { - return $this->pred; - } - - /** - * Alias for getObject() - * @access public - * @return object node - */ - function object() { - return $this->obj; - } - /** - * Retruns the hash code of the triple. - * @access public - * @return string - */ - function hashCode() { - return md5($this->subj->getLabel() . $this->pred->getLabel() . $this->obj->getLabel()); - } - - /** - * Dumps the triple. - * @access public - * @return string - */ - - function toString() { - return 'Triple(' . $this->subj->toString() . ', ' . $this->pred->toString() . ', ' . $this->obj->toString() . ')'; - - } - - /** - * Returns a toString() serialization of the statements's subject. - * - * @access public - * @return string - */ - function toStringSubject() { - return $this->subj->toString(); - } - - /** - * Returns a toString() serialization of the statements's predicate. - * - * @access public - * @return string - */ - function toStringPredicate() { - return $this->pred->toString(); - } - - /** - * Reurns a toString() serialization of the statements's object. - * - * @access public - * @return string - */ - function toStringObject() { - return $this->obj->toString(); - } - - /** - * Returns the URI or bNode identifier of the statements's subject. - * - * @access public - * @return string - */ - function getLabelSubject() { - return $this->subj->getLabel(); - } - - /** - * Returns the URI of the statements's predicate. - * - * @access public - * @return string - */ - function getLabelPredicate() { - return $this->pred->getLabel(); - } - - /** - * Reurns the URI, text or bNode identifier of the statements's object. - * - * @access public - * @return string - */ - function getLabelObject() { - return $this->obj->getLabel(); - } - - /** - * Checks if two statements are equal. - * Two statements are considered to be equal if they have the - * same subject, predicate and object. A statement can only be equal - * to another statement object. - * @access public - * @param object statement $that - * @return boolean - */ - - function equals ($that) { - - if ($this == $that) { - return true; - } - if ($that == NULL || !(is_a($that, 'Statement'))) { - return false; - } - - return - $this->subj->equals($that->subject()) && - $this->pred->equals($that->predicate()) && - $this->obj->equals($that->object()); - } - - /** - * Compares two statements and returns integer less than, equal to, or greater than zero. - * Can be used for writing sorting function for models or with the PHP function usort(). - * - * @access public - * @param object statement &$that - * @return boolean - */ - - function compare(&$that) { - return statementsorter($this, $that); - // statementsorter function see below - } - - - /** - * Reifies a statement. - * Returns a new MemModel that is the reification of the statement. - * For naming the statement's bNode a Model or bNodeID must be passed to the method. - * - * @access public - * @param mixed &$model_or_bNodeID - * @return object model - */ - - function & reify(&$model_or_bNodeID) { - - if (is_a($model_or_bNodeID, 'MemModel')) { - // parameter is model - $statementModel = new MemModel($model_or_bNodeID->getBaseURI()); - $thisStatement = new BlankNode($model_or_bNodeID); - } else { - // parameter is bNodeID - $statementModel = new MemModel(); - $thisStatement = &$model_or_bNodeID; - } - - $RDFstatement = new Resource(RDF_NAMESPACE_URI . RDF_STATEMENT); - $RDFtype = new Resource(RDF_NAMESPACE_URI . RDF_TYPE); - $RDFsubject = new Resource(RDF_NAMESPACE_URI . RDF_SUBJECT); - $RDFpredicate = new Resource(RDF_NAMESPACE_URI . RDF_PREDICATE); - $RDFobject = new Resource(RDF_NAMESPACE_URI . RDF_OBJECT); - - $statementModel->add(new Statement($thisStatement, $RDFtype, $RDFstatement)); - $statementModel->add(new Statement($thisStatement, $RDFsubject, $this->getSubject())); - $statementModel->add(new Statement($thisStatement, $RDFpredicate, $this->getPredicate())); - $statementModel->add(new Statement($thisStatement, $RDFobject, $this->Object())); - - return $statementModel; - } - -} // end: Statement - - -/** -* Comparison function for comparing two statements. -* statementsorter() is used by the PHP function usort ( array array, callback cmp_function) -* -* @access private -* @param object Statement $a -* @param object Statement $b -* @return integer less than, equal to, or greater than zero -* @throws phpErrpr -*/ -function statementsorter($a,$b) { - //Compare subjects - $x=$a->getSubject(); - $y=$b->getSubject(); - $r=strcmp($x->getLabel(),$y->getLabel()); - if ($r!=0) return $r; - //Compare predicates - $x=$a->getPredicate(); - $y=$b->getPredicate(); - $r=strcmp($x->getURI(),$y->getURI()); - if ($r!=0) return $r; - //Final resort, compare objects - $x=$a->getObject(); - $y=$b->getObject(); - return strcmp($x->toString(),$y->toString()); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Blanknode.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Blanknode.php deleted file mode 100755 index 9ea26f19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Blanknode.php +++ /dev/null @@ -1,120 +0,0 @@ -, - * Radoslaw Oldakowski - * - * @package model - * @access public - * - */ - class BlankNode extends Resource { - - /** - * Constructor - * You can supply a label or You supply a model and a unique ID is gernerated. - * - * @param mixed $namespace_or_uri_or_model - * @param string $localName - * @access public - */ - function BlankNode($namespace_or_uri_or_model , $localName = NULL) { - - if (is_a($namespace_or_uri_or_model, 'Model')) { - // generate identifier - $id = $namespace_or_uri_or_model->getUniqueResourceURI(BNODE_PREFIX); - - $this->uri = $id; - - } else { - // set identifier - if ($localName == NULL) { - $this->uri = $namespace_or_uri_or_model; - } else { - $this->uri = $namespace_or_uri_or_model . $localName; - } - } - } - - /** - * Returns the ID of the blank node. - * - * @return string - * @access public - */ - function getID() { - return $this->uri; - } - - /** - * Returns the ID of the blank node. - * - * @return string - * @access public - */ - function getLabel() { - return $this->uri; - } - - /** - * Dumps bNode. - * - * @access public - * @return string - */ - function toString() { - - return 'bNode("' . $this->uri . '")'; - } - - /** - * Checks if two blank nodes are equal. - * Two blank nodes are equal, if they have the same temporary ID. - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) { - - if ($this == $that) { - return true; - } - if (($that == NULL) or !(is_a($that, 'BlankNode'))) { - return false; - } - - if ($this->getURI() == $that->getURI()) { - return true; - } - - return false; - } - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Blank Node - */ - function __toString() - { - return $this->toString(); - } - -} // end: BlankNode - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DBase.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DBase.php deleted file mode 100755 index 87d9b474..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DBase.php +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include DBase class -require_once( RDFAPI_INCLUDE_DIR . 'model/DbModel.php' ); -// include adodb classes -require_once(RDFAPI_INCLUDE_DIR .'util/adodb/adodb.inc.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbModel.php deleted file mode 100755 index 3f199719..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbModel.php +++ /dev/null @@ -1,1318 +0,0 @@ - -* -* @package model -* @access public -*/ - - -class DbModel extends Model{ - - /** - * Database connection object. - * - * @var object ADOConnection - * @access private - */ - var $dbConn; - - /** - * Unique model URI. - * Used to identify the DbModel. - * - * @var string - * @access private - */ - var $modelURI; - - - /** - * Database internal modelID. - * Used to avoid JOINs. - * - * @var string - * @access private - */ - var $modelID; - - - - - /** - * Constructor - * Do not call this directly. - * Use the method getModel,getNewModel or putModel of the Class DbStore instead. - * - * @param object ADOConnection &$dbConnection - * @param string $modelURI - * @param string $modelID - * @param string $baseURI - * @access public - */ - function DbModel(&$dbConnection, $modelURI, $modelID, $baseURI=NULL) { - - $this->dbConn =& $dbConnection; - $this->modelURI = $modelURI; - $this->modelID = $modelID; - $this->baseURI = $this->_checkBaseURI($baseURI); - } - - - /** - * Set a base URI for the DbModel. - * Affects creating of new resources and serialization syntax. - * - * @param string $uri - * @throws SqlError - * @access public - */ - function setBaseURI($uri) { - - $this->baseURI = $this->_checkBaseURI($uri); - - $rs = $this->dbConn->execute("UPDATE models SET baseURI='" .$this->baseURI ."' - WHERE modelID=" .$this->modelID); - if (!$rs) - $this->dbConn->errorMsg(); - } - - - /** - * Return the number of statements in this DbModel. - * - * @return integer - * @access public - */ - function size() { - - $count =& $this->dbConn->getOne('SELECT COUNT(modelID) FROM statements - WHERE modelID = ' .$this->modelID); - return $count; - } - - - /** - * Check if this DbModel is empty. - * - * @return boolean - * @access public - */ - function isEmpty() { - - if ($this->size() == 0) - return TRUE; - return FALSE; - } - - - /** - * Add a new triple to this DbModel. - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - * @return mixed true on success, false if the statement is already in the model, - * error message (string) on failure - */ - function add(&$statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: add): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!$this->contains($statement)) { - - $subject_is = $this->_getNodeFlag($statement->subject()); - $sql = "INSERT INTO statements - (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is) - VALUES - (" .$this->modelID ."," - . $this->dbConn->qstr($statement->getLabelSubject()) ."," - . $this->dbConn->qstr($statement->getLabelPredicate()) .","; - - if (is_a($statement->object(), 'Literal')) { - $quotedLiteral = $this->dbConn->qstr($statement->obj->getLabel()); - $sql .= $quotedLiteral ."," - ."'" .$statement->obj->getLanguage() ."'," - ."'" .$statement->obj->getDatatype() ."'," - ."'" .$subject_is ."'," - ."'l')"; - }else{ - $object_is = $this->_getNodeFlag($statement->object()); - $sql .= $this->dbConn->qstr($statement->obj->getLabel()) ."," - ."''," - ."''," - ."'" .$subject_is ."'," - ."'" .$object_is ."')"; - } - $rs =& $this->dbConn->execute($sql); - if (!$rs) { - return $this->dbConn->errorMsg(); - } else { - return true; - } - } else { - return false; - } - } - - - /** - * Alias for the method add(). - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function addWithoutDuplicates(&$statement) { - - $this->add($statement); - } - - - /** - * Remove the given triple from this DbModel. - * - * @param object Statement &$statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function remove(&$statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: remove): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $sql = 'DELETE FROM statements - WHERE modelID=' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO ($statement->subj, $statement->pred, $statement->obj); - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - - - /** - * Short dump of the DbModel. - * - * @return string - * @access public - */ - function toString() { - - return 'DbModel[modelURI=' .$this->modelURI .'; baseURI=' .$this->getBaseURI() .'; size=' .$this->size() .']'; - } - - - /** - * Dump of the DbModel including all triples. - * - * @return string - * @access public - */ - function toStringIncludingTriples() { - - $memModel =& $this->getMemModel(); - return $memModel->toStringIncludingTriples(); - } - - - - /** - * Create a MemModel containing all the triples of the current DbModel. - * - * @return object MemModel - * @access public - */ - function & getMemModel() { - - $recordSet = $this->_getRecordSet($this); - $m = $this->_convertRecordSetToMemModel($recordSet); - return $m; - } - - - - /** - * Returns the model id - * - * @return int Model id number - * @access public - */ - function getModelID() - { - return $this->modelID; - } - - - - /** - * Returns the database connection object - * - * @return ADOdb Database object - * @access public - */ - function &getDbConn() - { - return $this->dbConn; - } - - - - /** - * Write the RDF serialization of the _DbModel as HTML. - * - * @access public - */ - function writeAsHtml() { - - $memModel =& $this->getMemModel(); - $memModel->writeAsHtml(); - } - - - /** - * Write the RDF serialization of the DbModel as HTML table. - * - * @access public - */ - function writeAsHtmlTable() { - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - $memModel =& $this->getMemModel(); - RDFUtil::writeHTMLTable($memModel); - } - - - /** - * Write the RDF serialization of the DbModel to string. - * - * @return string - * @access public - */ - function writeRdfToString() { - - $memModel =& $this->getMemModel(); - return $memModel->writeRdfToString(); - } - - - /** - * Saves the RDF,N3 or N-Triple serialization of the DbModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the DbModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') { - - $memModel = $this->getMemModel(); - $memModel->saveAs($filename, $type); - - } - - - /** - * Check if the DbModel contains the given statement. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) { - - $sql = 'SELECT modelID FROM statements - WHERE modelID = ' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO($statement->subj, $statement->pred, $statement->obj); - - $res =& $this->dbConn->getOne($sql); - - if (!$res) - return FALSE; - return TRUE; - } - - - /** - * Determine if all of the statements in the given model are also contained in this DbModel. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if(!$this->contains($statement)) - return FALSE; - return TRUE; - } - - elseif (is_a($model, 'DbModel')) { - - $recordSet =& $this->_getRecordSet($model); - while (!$recordSet->EOF) { - if (!$this->_containsRow($recordSet->fields)) - return FALSE; - $recordSet->moveNext(); - } - return TRUE; - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Determine if any of the statements in the given model are also contained in this DbModel. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if($this->contains($statement)) - return TRUE; - return FALSE; - } - - elseif (is_a($model, 'DbModel')) { - - $recordSet =& $this->_getRecordSet($model); - while (!$recordSet->EOF) { - if ($this->_containsRow($recordSet->fields)) - return TRUE; - $recordSet->moveNext(); - } - return FALSE; - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAny): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * General method to search for triples in the DbModel. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function find($subject, $predicate, $object) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - - // write the recordSet into memory Model - else - return $this->_convertRecordSetToMemModel($recordSet); - } - - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches - *the regular expression. - * Return an empty MemModel if nothing is found. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: Mhis method loads a DbModel into memory and performs the search - * on a MemModel, which can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) { - - $mm =& $this->getMemModel(); - - return $mm->findRegex($subject_regex, $predicate_regex, $object_regex); - } - - - /** - * Return all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Return an empty model if nothing is found. - * - * @param string $vocabulary - * @return object MemModel - * @throws PhpError - * @throws SqlError - * @access public - */ - function findVocabulary($vocabulary) { - - $sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = " .$this->modelID ." - AND predicate LIKE '" .$vocabulary ."%'"; - - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - - // write the recordSet into memory Model - else - return $this->_convertRecordSetToMemModel($recordSet); - } - - - /** - * Search for triples and return the first matching statement. - * NULL input for any parameter will match anything. - * Return an NULL if nothing is found. - * You can set an search offset with $offset. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @throws PhpError - * @throws SqlError - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = -1) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->selectLimit($sql,1,($offset)); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else { - if (!$recordSet->fields) - return NULL; - else { - $memModel = $this->_convertRecordSetToMemModel($recordSet); - return $memModel->triples[0]; - } - } - } - - - /** - * Search for triples and return the number of matches. - * NULL input for any parameter will match anything. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return integer - * @throws PhpError - * @throws SqlError - * @access public - */ - function findCount($subject, $predicate, $object) { - - if ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) { - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - // static part of the sql statement - $sql = 'SELECT COUNT(*) - FROM statements - WHERE modelID = ' .$this->modelID; - - // dynamic part of the sql statement - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $recordSet =& $this->dbConn->execute($sql); - - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else - return $recordSet->fields[0]; - } - - - /** - * Perform an RDQL query on this DbModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function rdqlQuery($queryString, $returnNodes = TRUE) { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // this method can only query this DbModel - // if another model was specified in the from clause throw an error - if (isset($parsedQuery['sources'][0])) - if($parsedQuery['sources'][0] != $this->modelURI) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: rdqlQuery):'; - $errmsg .= ' this method can only query this DbModel'; - trigger_error($errmsg, E_USER_ERROR); - } - - $engine = new RdqlDbEngine(); - $res =& $engine->queryModel($this, $parsedQuery, $returnNodes); - - return $res; - } - - - /** - * Perform an RDQL query on this DBModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes)); - } - - /** - * General method to replace nodes of a DbModel. - * NULL input for any parameter will match nothing. - * Example: $m->replace($resource, NULL, $node, $replacement); - * Replaces all $node objects beeing subject or object in - * any triple of the model with the $replacement node. - * Throw an error in case of a paramter mismatch. - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @param object Node $replacement - * @throws PhpError - * @throws SqlError - * @access public - */ - function replace($subject, $predicate, $object, $replacement) { - - // check the correctness of the passed parameters - if ( ((!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL)) || - (($subject != NULL && is_a($replacement, 'Literal')) || - ($predicate != NULL && (is_a($replacement, 'Literal') || - is_a($replacement, 'BlankNode')))) ) - { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameter mismatch'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!(!$subject && !$predicate && !$object)) { - - // create an update sql statement - $comma = ''; - $sql = 'UPDATE statements - SET '; - if ($subject) { - $sql .= " subject ='" .$replacement->getLabel() ."', " - ." subject_is='" .$this->_getNodeFlag($replacement) ."' "; - $comma = ','; - } - if ($predicate) { - $sql .= $comma ." predicate='" .$replacement->getLabel() ."' "; - $comma = ','; - } - if ($object) { - $quotedObject = $this->dbConn->qstr($replacement->getLabel()); - $sql .= $comma .' object=' .$quotedObject - .", object_is='" .$this->_getNodeFlag($replacement) ."' "; - if (is_a($replacement, 'Literal')) { - $sql .= ", l_language='" .$replacement->getLanguage() ."' " - .", l_datatype='" .$replacement->getDataType() ."' "; - } - } - $sql .= 'WHERE modelID = ' .$this->modelID; - $sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object); - - // execute the query - $rs =& $this->dbConn->execute($sql); - - if (!$rs) - echo $this->dbConn->errorMsg(); - } - } - - - /** - * Check if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * Warning: This method doesn't work correct with models where the same blank node has different - * identifiers in the two models. We will correct this in a future version. - * - * @param object model &$that - * @return boolean - * @throws PhpError - * @access public - */ - - function equals(&$that) { - - if (!is_a($that, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: equals): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if ($this->size() != $that->size()) - return FALSE; - - include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php"); - return ModelComparator::compare($this,$that); - } - - - /** - * Return a new MemModel that is the set-union the model with another model. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - * - */ - function & unite(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: unite): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->unite($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->unite($thatModel); - } - } - - - /** - * Return a new MemModel that is the subtraction of another model from this DbModel. - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - */ - - function & subtract(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: subtract): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->subtract($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->subtract($thatModel); - } - } - - - /** - * Return a new MemModel containing all the statements which are in both - * this model and the given model. - * - * @param object Model $model - * @return object MemModel - * @throws PhpError - * @access public - */ - function & intersect(&$model) { - - if (is_a($model, 'MemModel')) { - - $thisModel =& $this->getMemModel(); - return $thisModel->intersect($model); - } - - elseif (is_a($model, 'DbModel')) { - - $thisModel =& $this->getMemModel(); - $thatModel =& $model->getMemModel(); - return $thisModel->intersect($thatModel); - } - - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: intersect: Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Add the given model to this DbModel. - * This function monitors for SQL errors, and will commit if no errors have occured, - * otherwise it will rollback. - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @throws PhpError - * @access public - */ - function addModel(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: DbModel; method: addModel): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $blankNodes_tmp = array(); - - if (is_a($model, 'MemModel')) { - - $this->dbConn->startTrans(); - foreach ($model->triples as $statement) - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - $this->addParsedNamespaces($model->getParsedNamespaces()); - - $this->dbConn->completeTrans(); - } - - elseif (is_a($model, 'DbModel')) { - - $this->dbConn->startTrans(); - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $statement) - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - $this->addParsedNamespaces($model->getParsedNamespaces()); - $this->dbConn->completeTrans(); - } - } - - - /** - * Reify the DbModel. - * Return a new MemModel that contains the reifications of all statements of this DbModel. - * - * @return object MemModel - * @access public - */ - function & reify() { - - $memModel =& $this->getMemModel(); - return $memModel->reify(); - } - - /** - * Remove this DbModel from database and clean up. - * This function monitors for SQL errors, and will commit if no errors have occured, - * otherwise it will rollback. - * - * @throws SqlError - * @access public - */ - function delete() { - - $this->dbConn->startTrans(); - $this->dbConn->execute('DELETE FROM models - WHERE modelID=' .$this->modelID); - $this->dbConn->execute('DELETE FROM statements - WHERE modelID=' .$this->modelID); - $this->dbConn->execute('DELETE FROM namespaces - WHERE modelID=' .$this->modelID); - - if (!$this->dbConn->completeTrans()) - echo $this->dbConn->errorMsg(); - else - $this->close(); - } - - - /** - * Close this DbModel - * - * @access public - */ - function close() { - - unset($this); - } - - - // ============================================================================= - // **************************** private methods ******************************** - // ============================================================================= - - - - - - /** - * If the URI doesn't end with # : or /, then a # is added to the URI. - * Used at setting the baseURI of this DbModel. - * - * @param string $uri - * @return string - * @access private - */ - function _checkBaseURI($uri) { - - if ($uri != NULL) { - $c = substr($uri, strlen($uri)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $uri .= '#'; - } - return $uri; - } - - - /**' - * Return the flag of the Node object. - * r - Resource, b - BlankNode, l - Literal - * - * @param object Node $object - * @return string - * @access private - */ - function _getNodeFlag($object) { - - return is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l'); - } - - - /** - * Convert an ADORecordSet to a memory Model. - * - * Every successful database query returns an ADORecordSet object which is actually - * a cursor that holds the current row in the array fields[]. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !!! This method can only be applied to a RecordSet with array fields[] - * !!! containing a representation of the database table: statements, - * !!! with an index corresponding to following table columns: - * !!! [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * !!! [4] - l_datatype, [5] - subject_is, [6] - object_is - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @param object ADORecordSet - * @return object MemModel - * @access private - */ - function _convertRecordSetToMemModel(&$recordSet) { - - $res = new MemModel($this->baseURI); - while (!$recordSet->EOF) { - - // subject - if ($recordSet->fields[5] == 'r') - $sub = new Resource($recordSet->fields[0]); - else - $sub = new BlankNode($recordSet->fields[0]); - - // predicate - $pred = new Resource($recordSet->fields[1]); - - // object - if ($recordSet->fields[6] == 'r') - $obj = new Resource($recordSet->fields[2]); - elseif ($recordSet->fields[6] == 'b') - $obj = new BlankNode($recordSet->fields[2]); - else { - $obj = new Literal($recordSet->fields[2], $recordSet->fields[3]); - if ($recordSet->fields[4]) - $obj->setDatatype($recordSet->fields[4]); - } - - $statement = new Statement($sub, $pred, $obj); - $res->add($statement); - - $recordSet->moveNext(); - } - $res->addParsedNamespaces($this->getParsedNamespaces()); - return $res; - } - - - /** - * Create the dynamic part of an sql statement selecting triples with the - * given parameters ($subject, $predicate, $object). - * - * @param object Resource $subject - * @param object Resource $predicate - * @param object Node $object - * @return string - * @access private - */ - function _createDynSqlPart_SPO($subject, $predicate, $object) { - - // conditions derived from the parameters passed to the function - - $subject_is=is_a($subject,'BlankNode')?'b':(is_a($subject,'Resource')?'r':'l'); - $sql=''; - if ($subject != NULL) - $sql .= " AND subject='" .$subject->getLabel() ."' - AND subject_is='" .$subject_is ."'"; - if ($predicate != NULL) - $sql .= " AND predicate='" .$predicate->getLabel() ."'"; - if ($object != NULL) { - $object_is = is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l'); - if (is_a($object, 'Resource')) - $sql .= " AND object='" .$object->getLabel() ."' - AND object_is ='" .$object_is ."'"; - else { - $quotedLiteral = $this->dbConn->qstr($object->getLabel()); - $sql .= " AND object=" .$quotedLiteral ." - AND l_language='" .$object->getLanguage() ."' - AND l_datatype='" .$object->getDataType() ."' - AND object_is ='" .$object_is ."'"; - } - } - return $sql; - } - - - /** - * Get an ADORecordSet with array fields[] containing a representation of - * the given DbModel stored in the table: statements, with an index corresponding - * to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * (This method operates on data from a DbModel without loading it into a memory model - * in order to save resources and improve speed). - * - * @param object DbModel $DbModel - * @return object ADORecordSet - * @access private - */ - function _getRecordSet (&$dbModel) { - - $sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is - FROM statements - WHERE modelID = ' .$dbModel->modelID; - - return $recordSet =& $this->dbConn->execute($sql); - } - - - /** - * Check if this DbModel contains the given row from the array fields[] of an ADORecordSet - * The array index corresponds to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * - * @param array $row - * @return boolean - * @access private - */ - function _containsRow ($row) { - - $sql = "SELECT modelID FROM statements - WHERE modelID = " .$this->modelID ." - AND subject =" .$this->dbConn->qstr($row[0]) ." - AND predicate =" .$this->dbConn->qstr($row[1]) ." - AND object =" .$this->dbConn->qstr($row[2]) ." - AND l_language=" .$this->dbConn->qstr($row[3]) ." - AND l_datatype=" .$this->dbConn->qstr($row[4]) ." - AND subject_is=" .$this->dbConn->qstr($row[5]) ." - AND object_is=" .$this->dbConn->qstr($row[6]); - - $res =& $this->dbConn->getOne($sql); - - if (!$res) - return FALSE; - return TRUE; - } - - - - - - /** - * Returns the models namespaces. - * - * @author Tobias Gauss - * @return mixed Array of key-value pairs. Namespace is the key, - * prefix the value. If no namespaces are found, - * boolean false is returned. - * - * @access public - */ - function getParsedNamespaces(){ - $sql = "SELECT * FROM namespaces - WHERE modelID = " .$this->modelID; - $temp = false; - $res = $this->dbConn->execute($sql); - if($res){ - while (!$res->EOF) { - $temp[$res->fields[1]]=$res->fields[2]; - $res->moveNext(); - } - } - return $temp; - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gauss - * @param array $newNs Array of namespace => prefix assignments - * - * @access public - */ - function addParsedNamespaces($newNs){ - if($newNs) - foreach($newNs as $namespace => $prefix){ - $this->addNamespace($prefix, $namespace); - } - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gauss - * @param string $prefix Prefix - * @param string $nmsp Namespace URI - * - * @access public - */ - function addNamespace($prefix,$nmsp){ - - if($nmsp != '' && $prefix !=''){ - if($this->_checkNamespace($nmsp)){ - $sql = "UPDATE namespaces SET prefix=".$this->dbConn->qstr($prefix)." WHERE - modelID=".$this->modelID." AND namespace=".$this->dbConn->qstr($nmsp); - }else{ - $sql = "INSERT INTO namespaces - (modelID, namespace, prefix) - VALUES - (" .$this->modelID .',' - . $this->dbConn->qstr($nmsp) . ',' - . $this->dbConn->qstr($prefix) . ')'; - } - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - } - - /** - * checks if a namespace is already in the model. - * - * @author Tobias Gau� - * @access private - * @param Array $newNs - */ - function _checkNamespace($nmsp){ - $res = true; - $sql = "SELECT * FROM namespaces - WHERE modelID = " .$this->modelID." AND - namespace=" . $this->dbConn->qstr($nmsp); - $rs =& $this->dbConn->execute($sql); - if (!$rs){ - $this->dbConn->errorMsg(); - }else{ - if($rs->fields == false) - $res = false; - } - return $res; - - - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & iterFind($sub=null,$pred=null,$obj=null) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - $if = new IterFind($this,$sub,$pred,$obj); - return $if; - } - - /** - * Removes a single namespace from the model - * - * @author Tobias Gauss - * @param string $nmsp Namespace URI - * - * @return mixed True if all went well, error message otherwise - * - * @access public - */ - function removeNamespace($nmsp){ - - $sql = 'DELETE FROM namespaces - WHERE modelID=' .$this->modelID." AND namespace=". $this->dbConn->qstr($nmsp); - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - return $this->dbConn->errorMsg(); - else { - return true; - } - } - - - - - /** - * Add the given row from the array fields[] of an ADORecordSet to this DbModel - * The array index corresponds to following table columns: - * [0] - subject, [1] - predicate, [2] - object, [3] - l_language, - * [4] - l_datatype, [5] - subject_is, [6] - object_is - * - * @param array $row - * @throws SqlError - * @access private - * - function _insertRow ($row) { - - $quotedObject = $this->dbConn->qstr($row[2]); - $sql = "INSERT INTO statements VALUES - (" .$this->modelID ."," - ."'" .$row[0] ."'," - ."'" .$row[1] ."'," - ."" .$quotedObject ."," - ."'" .$row[3] ."'," - ."'" .$row[4] ."'," - ."'" .$row[5] ."'," - ."'" .$row[6] ."')"; - - $rs =& $this->dbConn->execute($sql); - if (!$rs) - $this->dbConn->errorMsg(); - } - */ - -} // end: Class DbModel -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbStore.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbStore.php deleted file mode 100755 index a845d308..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/DbStore.php +++ /dev/null @@ -1,917 +0,0 @@ - - * @author Daniel Westphal (http://www.d-westphal.de) - * - * @package model - * @access public - */ - - -class DbStore extends Object -{ - /** - * Array with all supported database types - * - * @var array - */ - public static $arSupportedDbTypes = array( - "MySQL", - "MySQLi", - "MSSQL", - 'MsAccess' - ); - - /** - * Database connection object - * - * @var object ADOConnection - * @access private - */ - var $dbConn; - - /** - * Database driver name - * - * @var string - */ - protected $driver = null; - - /** - * SparqlParser so we can re-use it - * @var Parser - */ - var $queryParser = null; - - -/** - * Constructor: - * Set the database connection with the given parameters. - * - * @param string $dbDriver - * @param string $host - * @param string $dbName - * @param string $user - * @param string $password - * @access public - */ - function DbStore ($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME, - $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) { - - // include DBase Package - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE); - - // create a new connection object - $this->dbConn =& ADONewConnection($dbDriver); - $this->driver = $dbDriver; - - //activate the ADOdb DEBUG mode - if (ADODB_DEBUG_MODE == '1') - $this->dbConn->debug = true; - - // connect to database - $r = $this->dbConn->NConnect($host, $user, $password, $dbName); - if ($r !== true) { - throw new Exception('Could not connect to database'); - } - - // optimized for speed - $this->dbConn->setFetchMode(ADODB_FETCH_NUM); - //$ADODB_COUNTRECS = FALSE; - } - - - -/** - * List all DbModels stored in the database. - * - * @return array - * @throws SqlError - * @access public - */ - function listModels() { - - $recordSet =& $this->dbConn->execute("SELECT modelURI, baseURI - FROM models"); - if (!$recordSet) - echo $this->dbConn->errorMsg(); - else { - $models = array(); - $i=0; - while (!$recordSet->EOF) { - - $models[$i]['modelURI'] = $recordSet->fields[0]; - $models[$i]['baseURI'] = $recordSet->fields[1]; - - ++$i; - $recordSet->moveNext(); - } - return $models; - } - } - - -/** - * Check if the DbModel with the given modelURI is already stored in the database - * - * @param string $modelURI - * @return boolean - * @throws SqlError - * @access public - */ - function modelExists($modelURI) { - - $res =& $this->dbConn->execute("SELECT COUNT(*) FROM models - WHERE modelURI = '" .$modelURI ."'"); - if (!$res) - echo $this->dbConn->errorMsg(); - else { - if (!$res->fields[0]) { - $res->Close(); - return FALSE; - } else { - $res->Close(); - return TRUE; - } - } - } - - - - /** - * Returns the database connection object - * - * @return ADOdb Database object - * @access public - */ - function &getDbConn() - { - return $this->dbConn; - } - - -/** - * Create a new instance of DbModel with the given $modelURI and - * load the corresponding values of modelID and baseURI from the database. - * Return FALSE if the DbModel does not exist. - * - * @param string $modelURI - * @return object DbModel - * @access public - */ - function getModel($modelURI) { - - if (!$this->modelExists($modelURI)) - return FALSE; - else { - $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI - FROM models - WHERE modelURI='" .$modelURI ."'"); - - return new DbModel($this->dbConn, $modelVars->fields[0], - $modelVars->fields[1], $modelVars->fields[2]); - } - } - - -/** - * Create a new instance of DbModel with the given $modelURI - * and insert the DbModel variables into the database. - * Return FALSE if there is already a model with the given URI. - * - * @param string $modelURI - * @param string $baseURI - * @return object DbModel - * @throws SqlError - * @access public - */ - function getNewModel($modelURI, $baseURI=NULL) { - - if ($this->modelExists($modelURI)) - return FALSE; - else { - $modelID = $this->_createUniqueModelID(); - - $rs =& $this->dbConn->execute("INSERT INTO models - (modelID, modelURI, baseURI) - VALUES (" .$modelID .", - " .$this->dbConn->qstr($modelURI) .", - " .$this->dbConn->qstr($baseURI) .")"); - - if (!$rs) - return $this->dbConn->errorMsg(); - else - return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI); - } - } - - -/** - * Store a MemModel or another DbModel from a different DbStore in the database. - * Return FALSE if there is already a model with modelURI matching the modelURI - * of the given model. - * - * @param object Model &$model - * @param string $modelURI - * @return boolean - * @access public - */ - function putModel(&$model, $modelURI=NULL) { - - if (!$modelURI) { - if (is_a($model, 'MemModel')) - $modelURI = 'DbModel-' .$this->_createUniqueModelID(); - else - $modelURI = $model->modelURI; - }else - if ($this->modelExists($modelURI)) - return FALSE; - - - $newDbModel = $this->getNewModel($modelURI, $model->getBaseURI()); - $newDbModel->addModel($model); - } - - -/** - * Close the DbStore. - * !!! Warning: If you close the DbStore all active instances of DbModel from this - * !!! DbStore will lose their database connection !!! - * - * @access public - */ - function close() { - - $this->dbConn->close(); - unset($this); - } - - -// ============================================================================= -// **************************** private methods ******************************** -// ============================================================================= - - -/** - * Create a unique ID for the DbModel to be insert into the models table. - * This method was implemented because some databases do not support auto-increment. - * - * @return integer - * @access private - */ - function _createUniqueModelID() { - - $maxModelID =& $this->dbConn->GetOne('SELECT MAX(modelID) FROM models'); - return ++$maxModelID; - } - - /** - * Create a unique ID for the dataset to be insert into the datasets table. - * This method was implemented because some databases do not support auto-increment. - * - * @return integer - * @access private - */ - function _createUniqueDatasetID() { - - $maxDatasetID =& $this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets'); - return ++$maxDatasetID; - } - - - - /** - * Sets up tables for RAP. - * DOES NOT CHECK IF TABLES ALREADY EXIST - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @throws Exception If database type is unsupported - * @access public - **/ - public function createTables($databaseType = null) - { - $driver = $this->getDriver($databaseType); - self::assertDriverSupported($driver); - - $createFunc = '_createTables_' . $driver; - return $this->$createFunc(); - }//public function createTables($databaseType="MySQL") - - - - /** - * Create tables and indexes for MsAccess database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - protected function _createTables_MsAccess() - { - $this->dbConn->startTrans(); - - $this->dbConn->execute('CREATE TABLE models - (modelID long primary key, - modelURI varchar not null, - baseURI varchar)'); - - $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'); - - $this->dbConn->execute('CREATE TABLE statements - (modelID long, - subject varchar, - predicate varchar, - object Memo, - l_language varchar, - l_datatype varchar, - subject_is varchar(1), - object_is varchar(1), - primary key (modelID, subject, predicate, object, - l_language, l_datatype))'); - - $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)'); - $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)'); - $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)'); - $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)'); - - $this->dbConn->execute('CREATE TABLE namespaces - (modelID long, - namespace varchar, - prefix varchar, - primary key (modelID, namespace, prefix))'); - - $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)'); - $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)'); - - $this->dbConn->execute("CREATE TABLE datasets - (datasetName varchar, - defaultModelUri varchar, - primary key (datasetName))"); - - $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)'); - - - $this->dbConn->execute("CREATE TABLE `dataset_model` ( - datasetName varchar, - modelId long, - graphURI varchar, - PRIMARY KEY (modelId,datasetName))"); - - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Create tables and indexes for MySQL database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - function _createTables_MySQL() - { - - $this->dbConn->startTrans(); - - $this->dbConn->execute("CREATE TABLE models - (modelID bigint NOT NULL, - modelURI varchar(255) NOT NULL, - baseURI varchar(255) DEFAULT '', - primary key (modelID))"); - - $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)'); - - $this->dbConn->execute("CREATE TABLE statements - (modelID bigint NOT NULL, - subject varchar(255) NOT NULL, - predicate varchar(255) NOT NULL, - object text, - l_language varchar(255) DEFAULT '', - l_datatype varchar(255) DEFAULT '', - subject_is varchar(1) NOT NULL, - object_is varchar(1) NOT NULL)"); - - $this->dbConn->execute("CREATE TABLE namespaces - (modelID bigint NOT NULL, - namespace varchar(255) NOT NULL, - prefix varchar(255) NOT NULL, - primary key (modelID,namespace))"); - - $this->dbConn->execute("CREATE TABLE `dataset_model` ( - `datasetName` varchar(255) NOT NULL default '0', - `modelId` bigint(20) NOT NULL default '0', - `graphURI` varchar(255) NOT NULL default '', - PRIMARY KEY (`modelId`,`datasetName`))"); - - $this->dbConn->execute("CREATE TABLE `datasets` ( - `datasetName` varchar(255) NOT NULL default '', - `defaultModelUri` varchar(255) NOT NULL default '0', - PRIMARY KEY (`datasetName`), - KEY `datasetName` (`datasetName`))"); - - $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)'); - $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)'); - - $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements - (subject(200),predicate(200))'); - - $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject(200))'); - $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate(200))'); - $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))'); - - $this->dbConn->execute('CREATE FULLTEXT INDEX s_obj_ftidx ON statements (object)'); - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Creates tables on a MySQLi database - */ - function _createTables_MySQLi() - { - return $this->_createTables_MySQL(); - }//function _createTables_MySQLi() - - - - /** - * Create tables and indexes for MSSQL database - * - * @return boolean true If all is ok - * - * @throws Exception - */ - function _createTables_MSSQL() - { - $this->dbConn->startTrans(); - - $this->dbConn->execute("CREATE TABLE [dbo].[models] ( - [modelID] [int] NOT NULL , - [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL - ) ON [PRIMARY]"); - - $this->dbConn->execute("CREATE TABLE [dbo].[statements] ( - [modelID] [int] NOT NULL , - [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL - ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]"); - - - $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] ( - [modelID] [int] NOT NULL , - [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - ) ON [PRIMARY]"); - - $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD - CONSTRAINT [PK_models] PRIMARY KEY CLUSTERED - ( - [modelID] - ) ON [PRIMARY] "); - $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD - CONSTRAINT [PK_namespaces] PRIMARY KEY CLUSTERED - ( - [modelID],[namespace] - ) ON [PRIMARY] "); - - $this->dbConn->execute("CREATE INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]"); - - - if (!$this->dbConn->completeTrans()) { - throw new Exception($this->dbConn->errorMsg()); - } - return true; - } - - - - /** - * Checks if tables are setup for RAP - * - * @param string $databaseType - * @throws Exception If database type is unsupported - * @access public - **/ - public function isSetup($databaseType = null) - { - $driver = $this->getDriver($databaseType); - self::assertDriverSupported($driver); - - $issetupFunc = '_isSetup_' . $driver; - return $this->$issetupFunc(); - }//public function isSetup($databaseType="MySQL") - - - - /** - * Returns the driver for the database type. - * You can pass NULL or omit the parameter to - * use the parameter from the dbstore constructor - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @return string Database driver string (e.g. MySQL) - */ - public function getDriver($databaseType = null) - { - if ($databaseType === null) { - if ($this->driver === null) { - //backward compatibility - $databaseType = 'MySQL'; - } else { - $databaseType = $this->driver; - } - } - if (!self::isDriverSupported($databaseType)) { - //check if it is a known driver in wrong case - $arLowercases = array_map('strtolower', self::$arSupportedDbTypes); - $arMapping = array_combine($arLowercases, self::$arSupportedDbTypes); - if (isset($arMapping[strtolower($databaseType)])) { - $databaseType = $arMapping[strtolower($databaseType)]; - } - } - return $databaseType; - }//public function getDriver($databaseType = null) - - - - /** - * Returns if the given driver is supported - * - * @return boolean True if it supported, false if not - */ - public static function isDriverSupported($databaseType) - { - return in_array($databaseType, self::$arSupportedDbTypes); - }//public static function isDriverSupported($databaseType) - - - - /** - * Checks if the given driver is supported and throws an - * Exception if not. - * - * @param string $databaseType Database driver name (e.g. MySQL) - * - * @return true If it does not fail - * - * @throws Exception If the driver is not supported - */ - public static function assertDriverSupported($databaseType) - { - if (!self::isDriverSupported($databaseType)) { - throw new Exception( - 'Unsupported database type, only supported: ' - . implode(', ', self::$arSupportedDbTypes) - ); - } - return true; - }//public static function assertDriverSupported($databaseType) - - - - /** - * Checks if tables are setup for RAP (MySql) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MySQL() - { - $recordSet =& $this->dbConn->execute("SHOW TABLES"); - if (!$recordSet) { - throw new Exception($this->dbConn->errorMsg()); - } else { - $tables = array(); - while (!$recordSet->EOF) { - $tables[]= $recordSet->fields[0]; - if (isset($i)) { - ++$i; - } - $recordSet->moveNext(); - } - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)) { - return true; - } - } - return false; - }//function _isSetup_MySQL() - - - - /** - * Checks if tables are setup for RAP (MySQLi) - * - * @see _isSetup_MySQL() - */ - function _isSetup_MySQLi() - { - return $this->_isSetup_MySQL(); - }//function _isSetup_MySQLi() - - - - /** - * Checks if tables are setup for RAP (MsAccess) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MsAccess() - { - $tables =& $this->dbConn->MetaTables(); - if (!$tables) { - throw new Exception($this->dbConn->errorMsg()); - } - if (count($tables) == 0) { - return false; - } else { - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)) { - return true; - } else { - return false; - } - } - }//function _isSetup_MsAccess() - - - - /** - * Checks if tables are setup for RAP (MSSQL) - * - * @throws SqlError - * @access private - **/ - function _isSetup_MSSQL() - { - $tables =& $this->dbConn->MetaTables(); - if (!$tables) { - throw new Exception($this->dbConn->errorMsg()); - } - if (count($tables) == 0) { - return false; - } else { - if (in_array("models",$tables) && in_array("statements",$tables) - && in_array("namespaces",$tables)){ - return true; - } else { - return false; - } - } - }//function _isSetup_MSSQL() - - - /** - * Create a new instance of DatasetDb with the given $datasetName - * and insert the DatasetDb variables into the database. - * Return FALSE if there is already a model with the given URI. - * - * @param $datasetName string - * @return object DatasetDB - * @throws SqlError - * @access public - */ - function & getNewDatasetDb($datasetName) - { - - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if ($this->datasetExists($datasetName)) - return FALSE; - else - { - $defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_'); - $defaultModel=$this->getNewModel($defaultModelUri); - - $rs =& $this->dbConn->execute("INSERT INTO datasets - VALUES ('" .$this->dbConn->qstr($datasetName) ."', - '" .$this->dbConn->qstr($defaultModelUri)."')"); - - if (!$rs) - $this->dbConn->errorMsg(); - else - $return=new DatasetDb($this->dbConn, $this, $datasetName); - return ($return); - } - } - - /** - * Check if the Dataset with the given $datasetName is already stored in the database - * - * @param $datasetName string - * @return boolean - * @throws SqlError - * @access public - */ -function datasetExists($datasetName) { - - $res =& $this->dbConn->execute("SELECT COUNT(*) FROM datasets - WHERE datasetName = '" .$datasetName ."'"); - if (!$res) - echo $this->dbConn->errorMsg(); - else { - if (!$res->fields[0]) - return FALSE; - return TRUE; - } - } - - - /** - * Create a new instance of DatasetDb with the given $datasetName and - * load the corresponding values from the database. - * Return FALSE if the DbModel does not exist. - * - * @param $datasetId string - * @return object DatasetDb - * @access public - */ - function &getDatasetDb($datasetName) { - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if (!$this->datasetExists($datasetName)) { - return FALSE; - } else { - $return = new DatasetDb($this->dbConn, $this, $datasetName); - return ($return); - } - } - - /** - * Create a new instance of namedGraphDb with the given $modelURI and graphName and - * load the corresponding values of modelID and baseURI from the database. - * Return FALSE if the DbModel does not exist. - * - * @param $modelURI string - * @param $graphName string - * @return object NamedGraphMem - * @access public - */ - function getNamedGraphDb($modelURI, $graphName) - { - require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET); - - if (!$this->modelExists($modelURI)) - return FALSE; - else { - $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI - FROM models - WHERE modelURI='" .$modelURI ."'"); - - return new NamedGraphDb($this->dbConn, $modelVars->fields[0], - $modelVars->fields[1], $graphName ,$modelVars->fields[2]); - } - } - - /** - * Create a new instance of namedGraphDb with the given $modelURI and graphName - * and insert the DbModel variables into the database (not the graphName. This - * is only stored persistently, when added to dataset). - * Return FALSE if there is already a model with the given URI. - * - * @param $modelURI string - * @param $graphName string - * @param $baseURI string - * @return object namedGraphDb - * @throws SqlError - * @access public - */ - function getNewNamedGraphDb($modelURI, $graphName, $baseURI=NULL) { - - if ($this->modelExists($modelURI)) - return FALSE; - else { - $modelID = $this->_createUniqueModelID(); - - $rs =& $this->dbConn->execute("INSERT INTO models - (modelID, modelURI, baseURI) - VALUES (" .$modelID ."', - " .$this->dbConn->qstr($modelURI) ."', - " .$this->dbConn->qstr($baseURI) .")"); - if (!$rs) - $this->dbConn->errorMsg(); - else - return new NamedGraphDb($this->dbConn, $modelURI, $modelID, $graphName, $baseURI); - } - } - - /** - * Removes the graph with all statements from the database. - * Warning: A single namedGraph can be added to several datasets. So it'll be - * removed from all datasets. - * - * @param $modelURI string - * @return boolean - * @throws SqlError - * @access public - */ - function removeNamedGraphDb($modelURI) - { - if (!$this->modelExists($modelURI)) - return FALSE; - - $modelID = $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'"); - - $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID); - $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID); - $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID); - - return true; - } - - - - /** - * Performs a SPARQL query against a model. The model is converted to - * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param string $query Sparql query string - * @param mixed $arModelIds Array of modelIDs, or NULL to use all models - * @param string $resultform Result form ('xml' for SPARQL Query Results XML Format) - * @return string/array - */ - function sparqlQuery($query, $arModelIds = null, $resultform = false) - { - $engine = $this->_prepareSparql($arModelIds); - return $engine->queryModel( - null, - $this->_parseSparqlQuery($query), - $resultform - ); - }//function sparqlQuery($query,$resultform = false) - - - - /** - * Prepares everything for SparqlEngine-usage - * Loads the files, creates instances for SparqlEngine and - * Dataset... - * - * @return SparqlEngineDb - */ - function _prepareSparql($arModelIds) - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php'; - return new SparqlEngineDb($this, $arModelIds); - }//function _prepareSparql() - - - - /** - * Parses an query and returns the parsed form. - * If the query is not a string but a Query object, - * it will just be returned. - * - * @param $query mixed String or Query object - * @return Query query object - * @throws Exception If $query is no string and no Query object - */ - function _parseSparqlQuery($query) - { - if ($this->queryParser === null) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php'; - $this->queryParser = new SparqlParser(); - } - return $this->queryParser->parse($query); - }//function _parseSparqlQuery($query) - -} // end: Class DbStore -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Literal.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Literal.php deleted file mode 100755 index 4f31a427..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Literal.php +++ /dev/null @@ -1,188 +0,0 @@ - - * @author Daniel Westphal - * - * @package model - * @access public - * - */ - class Literal extends Node { - - /** - * Label of the literal - * @var string - * @access private - */ - var $label; - /** - * Language of the literal - * @var string - * @access private - */ - var $lang; - - /** - * Datatype of the literal - * @var string - * @access private - */ - var $dtype; - - - /** - * Constructor - * - * @param string $str label of the literal - * @param string $language optional language identifier - * @param string $datatype optional datatype - * - */ - function Literal($str, $language = NULL, $datatype = null) - { - $this->label = $str; - - if ($language != NULL) { - $this->lang = $language; - } else { - $this->lang = NULL; - } - - if ($datatype != null) { - $this->dtype = $datatype; - } else { - $this->dtype = NULL; - } - } - - /** - * Returns the string value of the literal. - * - * @access public - * @return string value of the literal - */ - function getLabel() { - - return $this->label; - } - - /** - * Returns the language of the literal. - * - * @access public - * @return string language of the literal - */ - function getLanguage() { - - return $this->lang; - } - - /** - * Sets the language of the literal. - * - * @access public - * @param string $lang - */ - function setLanguage($lang) { - - $this->lang = $lang; - } - - /** - * Returns the datatype of the literal. - * - * @access public - * @return string datatype of the literal - */ - function getDatatype() { - - return $this->dtype; - } - - /** - * Sets the datatype of the literal. - * Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER. - * The array $short_datatype with the possible shortcuts is definded in ../constants.php - * - * @access public - * @param string URI of XML datatype or datatype shortcut - * - */ - function setDatatype($datatype) { - GLOBAL $short_datatype; - if (stristr($datatype,DATATYPE_SHORTCUT_PREFIX)) { - $this->dtype = $short_datatype[substr($datatype,strlen(DATATYPE_SHORTCUT_PREFIX)) ];} - else - $this->dtype = $datatype; - } - - /** - * Checks if ihe literal equals another literal. - * Two literals are equal, if they have the same label and they - * have the same language/datatype or both have no language/datatype property set. - * - * @access public - * @param object literal $that - * @return boolean - */ - function equals ($that) { - - if (($that == NULL) or !(is_a($that, 'Literal'))) { - return false; - } - - if ( ($this->label == $that->getLabel()) && ( ( ($this->lang == $that->getLanguage()) || - ($this->lang == NULL && $that->getLanguage() == NULL) ) && - - ( - ($this->dtype == $that->getDatatype() || - ($this->dtype == NULL && $that->getDatatype() == NULL)) ) ) ) - { - return true; - } - - return false; - } - - /** - * Dumps literal. - * - * @access public - * @return string - */ - function toString() { - $dump = 'Literal("' . $this->label .'"'; - if ($this->lang != NULL) - $dump .= ', lang="' . $this->lang .'"'; - if ($this->dtype != NULL) - $dump .= ', datatype="' . $this->dtype .'"'; - $dump .= ')'; - return $dump; - } - - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Literal - */ - function __toString() - { - return $this->toString(); - } - - -} // end: Literal - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/MemModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/MemModel.php deleted file mode 100755 index 1545785c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/MemModel.php +++ /dev/null @@ -1,1460 +0,0 @@ - -* @author Gunnar AAstrand Grimnes -* @author Radoslaw Oldakowski -* @author Daniel Westphal -* @author Tobias Gauß -* -* @package model -* @access public -*/ - -class MemModel extends Model { - - /** - * Triples of the MemModel - * @var array - * @access private - */ - var $triples = array(); - - /** - * Array containing the search indices - * @var array['INDEX_TYPE'][]['label'][]['PosInModel'] - * - * @access private - */ - var $indexArr ; - - - /** - * depending on which index is used this variable is -1,0,1,2 or 3 - * - * -1 : no index - * 0 : default indices over subject, predicate, object separate - * 1 : index over subject+predicate+object - * 2 : index over subject+predicate - * 3 : index over subject+object - * - * @var int - * @access private - */ - var $indexed; - - - - /** - * Array of namespaces - * - * @var array - * @access private - */ - var $parsedNamespaces=array(); - - - - /** - * Constructor - * You can supply a base_uri - * - * @param string $baseURI - * @access public - */ - function MemModel($baseURI = NULL) { - $this->setBaseURI($baseURI); - $this->indexed = INDEX_TYPE; - } - - /** - * Set a base URI for the MemModel. - * Affects creating of new resources and serialization syntax. - * If the URI doesn't end with # : or /, then a # is added to the URI. - * @param string $uri - * @access public - */ - function setBaseURI($uri) { - - if ($uri != NULL) { - $c = substr($uri, strlen($uri)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $uri .= '#'; - } - $this->baseURI = $uri; - } - - - /** - * Number of triples in the MemModel - * - * @return integer - * @access public - */ - function size() { - return count($this->triples); - } - - /** - * Checks if MemModel is empty - * - * @return boolean - * @access public - */ - function isEmpty() { - if (count($this->triples) == 0) { - return TRUE; - } else { - return FALSE; - }; - } - - - /** - * Adds a new triple to the MemModel without checking if the statement is already in the MemModel. - * So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) { - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: add): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if($this->indexed != -1){ - $this->triples[] = $statement; - end($this->triples); - $k=key($this->triples); - if($this->indexed==0){ - // index over S - $this->_indexOpr($statement,$k,4,1); - // index over P - $this->_indexOpr($statement,$k,5,1); - // index over O - $this->_indexOpr($statement,$k,6,1); - }else{ - $this->_indexOpr($statement,$k,$this->indexed,1); - } - - }else{ - $this->triples[] = $statement; - } - } - - - - /** - * Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates($statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: addWithoutDuplicates): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if (!$this->contains($statement)) { - $this->add($statement); - return true; - }else{ - return false; - } - } - - /** - * Removes the triple from the MemModel. - * TRUE if the triple is removed. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) { - - if (!is_a($statement, 'Statement')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: remove): Statement expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - if($this->indexed==-1){ - $pass=false; - foreach($this->triples as $key => $value) { - if ($this->matchStatement($value, $statement->subject(), $statement->predicate(), $statement->object())) { - unset($this->triples[$key]); - $pass= true; - } - } - return $pass; - }else{ - $k= null; - if($this->indexed==0){ - $pass=false; - $del=false; - while($del!=-1){ - // index over S - $del=$this->_indexOpr($statement,$k,4,0); - // index over P - $this->_indexOpr($statement,$k,5,0); - // index over O - $this->_indexOpr($statement,$k,6,0); - if($del!=-1){ - unset($this->triples[$del]); - $pass=true; - } - } - return $pass; - }else{ - $pass=false; - $del=false; - while($del!=-1){ - $del=$this->_indexOpr($statement,$k,$this->indexed,0); - if($del!=-1){ - unset($this->triples[$del]); - $pass=true; - } - } - return $pass; - } - } - } - - /** - * Short Dump of the MemModel. - * - * @access public - * @return string - */ - function toString() { - return 'MemModel[baseURI=' . $this->getBaseURI() . '; size=' . $this->size() . ']'; - } - - /** - * Dumps of the MemModel including all triples. - * - * @access public - * @return string - */ - function toStringIncludingTriples() { - $dump = $this->toString() . chr(13); - foreach($this->triples as $value) { - $dump .= $value->toString() . chr(13); - } - return $dump; - } - - - - - /** - * Writes the RDF serialization of the MemModel as HTML. - * - * @access public - */ - function writeAsHtml() { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this); - $rdf = htmlspecialchars($rdf, ENT_QUOTES); - $rdf = str_replace(' ', ' ', $rdf); - $rdf = nl2br($rdf); - echo $rdf; - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - */ - function writeAsHtmlTable() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - RDFUtil::writeHTMLTable($this); - } - - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - * @return string - */ - function writeRdfToString() { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser = new RdfSerializer(); - $rdf =& $ser->serialize($this); - return $rdf; - } - - - /** - * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the MemModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') { - - - // get suffix and create a corresponding serializer - if ($type=='rdf') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $ser=new RdfSerializer(); - }elseif ($type=='nt') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $ser=new NTripleSerializer(); - }elseif ($type=='n3') { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $ser=new N3Serializer(); - }else { - print ('Serializer type not properly defined. Use the strings "rdf","n3" or "nt".'); - return false; - }; - - return $ser->saveAs($this, $filename); - } - - - /** - * Tests if the MemModel contains the given triple. - * TRUE if the triple belongs to the MemModel; - * FALSE otherwise. - * - * @param object Statement &$statement - * @return boolean - * @access public - */ - function contains(&$statement) { - - // no index ->linear contains - if ($this->indexed==-1){ - foreach($this->triples as $value) { - if ($value->equals($statement)){ - return TRUE; } - } - return false; - } - if ($this->indexed==0){ - $res = $this->_containsIndex($statement,4); - return $res; - }else{ - return $this->_containsIndex($statement,$this->indexed); - } - } - - - /** - * Determine if all of the statements in a model are also contained in this MemModel. - * True if all of the statements in $model are also contained in this MemModel and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $statement) - if(!$this->contains($statement)) - return FALSE; - return TRUE; - - }elseif (is_a($model, 'DbModel')) - - return $model->containsAll($this); - - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - /** - * Determine if any of the statements in a model are also contained in this MemModel. - * True if any of the statements in $model are also contained in this MemModel and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(&$model) { - - if (is_a($model, 'MemModel')) { - - foreach($model->triples as $modelStatement) - if($this->contains($modelStatement)) - return TRUE; - return FALSE; - - }elseif (is_a($model, 'DbModel')) - - return $model->containsAny($this); - - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - - /** - * Builds a search index for the statements in the MemModel. - * The index is used by the find(),contains(),add() and remove() functions. - * Performance example using a model with 43000 statements on a Linux machine: - * Find without index takes 1.7 seconds. - * Indexing takes 1.8 seconds. - * Find with index takes 0.001 seconds. - * So if you want to query a model more then once, build a index first. - * The defaultindex is indices over subject, predicate, object seperate. - * - * mode = 0 : indices over subject,predicate,object (default) - * mode = 1 : index over subject+predicate+object - * mode = 2 : index over subject+predicate - * mode = 3 : index over subject+object - * - * @param int $mode - * @access public - */ - function index($mode) { - - unset($this->indexArr); - $this->indexArr=array(); - switch($mode){ - // unset indices - case -1: - $this->indexed=-1; - unset($this->indexArr); - break; - // index over SPO - case 0: - $this->indexed=0; - foreach($this->triples as $k => $t) { - // index over S - $this->_indexOpr($t,$k,4,1); - // index over P - $this->_indexOpr($t,$k,5,1); - // index over O - $this->_indexOpr($t,$k,6,1); - } - break; - default: - $this->indexed=$mode; - foreach($this->triples as $k => $t) { - $this->_indexOpr($t,$k,$this->indexed,1); - } - break; - } - } - - - /** - * Returns true if there is an index, false if not. - * - * @return boolean - * @access public - */ - function isIndexed() { - if($this->indexed!=-1){ - return TRUE; - }else{ - return FALSE; - } - } - - /** - * Returns the indextype: - * -1 if there is no index, 0 if there are indices over S,P,O(separate), - * 1 if there is an index over SPO, 2 if there is an index over SP and 3 if - * there is an index over SO. - * - * @return int - * @access public - * - */ - function getIndexType(){ - return $this->indexed; - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all triples with $node as object. - * Returns an empty MemModel if nothing is found. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return object MemModel - * @access public - * @throws PhpError - */ - - function find($subject,$predicate,$object) { - - if ( - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = new MemModel($this->getBaseURI()); - $res->indexed=-1; - - if($this->isEmpty()) - return $res; - - if($subject == NULL && $predicate == NULL && $object == NULL) - return $this; - - switch($this->indexed){ - case 1: - if($subject!=NULL && $predicate != NULL && $object != NULL){ - $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,1); - }else{ - break; - } - - case 2: - if($subject!=NULL && $predicate != NULL){ - $pos=$subject->getLabel().$predicate->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,2); - }else{ - break; - } - - case 3: - if($subject!=NULL && $object != NULL){ - $pos=$subject->getLabel().$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,3); - }else{ - break; - } - case 0: - if($subject!= null){ - $pos=$subject->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,4); - } - if($predicate!= null){ - $pos=$predicate->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,5); - } - if($object!= null){ - $pos=$object->getLabel(); - return $this->_findInIndex($pos,$subject,$predicate,$object,6); - } - } - // if no index: linear search - foreach($this->triples as $value) { - if ($this->matchStatement($value, $subject, $predicate, $object)) - $res->add($value); - } - return $res; - - } - - - - - - /** - * Method to search for triples using Perl-style regular expressions. - * NULL input for any parameter will match anything. - * Example: $result = $m->find_regex( NULL, NULL, $regex ); - * Finds all triples where the label of the object node matches the regular expression. - * Returns an empty MemModel if nothing is found. - * - * @param string $subject_regex - * @param string $predicate_regex - * @param string $object_regex - * @return object MemModel - * @access public - */ - function findRegex($subject_regex, $predicate_regex, $object_regex) { - - $res = new MemModel($this->getBaseURI()); - - if($this->size() == 0) - return $res; - - if($subject_regex == NULL && $predicate_regex == NULL && $object_regex == NULL) - return $this; - - foreach($this->triples as $value) { - if ( - ($subject_regex == NULL || preg_match($subject_regex, $value->subj->getLabel())) && - ($predicate_regex == NULL || preg_match($predicate_regex, $value->pred->getLabel())) && - ($object_regex == NULL || preg_match($object_regex, $value->obj->getLabel())) - ) $res->add($value); - } - - return $res; - - } - - /** - * Returns all tripels of a certain vocabulary. - * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. - * e.g. http://www.w3.org/2000/01/rdf-schema# - * Returns an empty MemModel if nothing is found. - * - * @param string $vocabulary - * @return object MemModel - * @access public - */ - function findVocabulary($vocabulary) { - - if($this->size() == 0) - return new MemModel(); - if($vocabulary == NULL || $vocabulary == '') - return $this; - - $res = new MemModel($this->getBaseURI()); - if($this->indexed==0){ - foreach($this->indexArr[5] as $key => $value){ - $pos=strpos($key,'#')+1; - if(substr($key,0,$pos)==$vocabulary){ - for($i=1;$i<=$value[0];$i++){ - $res->add($this->triples[$value[$i]]); - } - } - } - return $res; - }else{ - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - foreach($this->triples as $value) { - if (RDFUtil::getNamespace($value->getPredicate()) == $vocabulary) - $res->add($value); - } - return $res; - } - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement of the MemModel where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search for. Default = 0 - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) { - - $currentOffset = 0; - for($i=0;$i<=$offset;$i++) - { - $res = $this->findFirstMatchOff($subject, $predicate, $object, $currentOffset); - $currentOffset=$res+1; - } - if ($res != -1) { - return $this->triples[$res]; - } else { - return NULL; - } - } - - - - - /** - * Searches for triples and returns the first matching statement from a given offset. - * This method is used by the util/findIterator. NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node, $off ); - * Returns the position of the first statement of the MemModel where the object equals $node from the given - * offset. - * Returns an -1 if nothing is found. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param int $off - * @return int - * @access private - */ - function findFirstMatchOff($subject,$predicate, $object,$off) { - - if ( - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - $match=-1; - $ind=$this->indexed; - if($subject == NULL && $predicate == NULL && $object == NULL) - { - foreach ($this->triples as $key => $statement) - { - if ($key >= $off) - return $key; - } - return -1; - } - - switch($ind){ - case 1: - if($subject!=NULL && $predicate != NULL && $object != NULL){ - $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,1,$off); - }else{ - break; - } - - case 2: - if($subject!=NULL && $predicate != NULL){ - $pos=$subject->getLabel().$predicate->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,2,$off); - }else{ - break; - } - - case 3: - if($subject!=NULL && $object != NULL){ - $pos=$subject->getLabel().$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,3,$off); - }else{ - break; - } - case 0: - if($subject!= null){ - $pos=$subject->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,4,$off); - } - if($predicate!= null){ - $pos=$predicate->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,5,$off); - } - if($object!= null){ - $pos=$object->getLabel(); - return $this->_findMatchIndex($pos,$subject,$predicate,$object,6,$off); - } - break; - } - // if no index: linear search - foreach($this->triples as $key => $value){ - if ($this->matchStatement($value, $subject, $predicate, $object)){ - if($off<=$key){ - $match=$key; - break; - } - } - } - return $match; - } - - - /** - * Searches for triples and returns the number of matches. - * NULL input for any parameter will match anything. - * Example: $result = $m->findCount( NULL, NULL, $node ); - * Finds all triples with $node as object. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return integer - * @access public - */ - function findCount($subject, $predicate, $object) { - - $res = $this->find($subject, $predicate, $object); - return $res->size(); - - } - - - /** - * Perform an RDQL query on this MemModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function rdqlQuery($queryString, $returnNodes = TRUE) { - - // Import RDQL Package - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // this method can only query this MemModel - // if another model was specified in the from clause throw an error - if (isset($parsedQuery['sources'][1])) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: rdqlQuery):'; - $errmsg .= ' this method can only query this MemModel'; - trigger_error($errmsg, E_USER_ERROR); - } - - $engine = new RdqlMemEngine(); - $res =& $engine->queryModel($this, $parsedQuery, $returnNodes); - - return $res; - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) { - // Import RDQL Package - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes)); - } - - /** - * General method to replace nodes of a MemModel. - * NULL input for any parameter will match nothing. - * Example: $m->replace($node, NULL, $node, $replacement); - * Replaces all $node objects beeing subject or object in - * any triple of the MemModel with the $needle node. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object Node $replacement - * @access public - * @throws PhpError - */ - function replace($subject, $predicate, $object, $replacement) { - - if ( - (!is_a($replacement, 'Node')) || - (!is_a($subject, 'Resource') && $subject != NULL) || - (!is_a($predicate, 'Resource') && $predicate != NULL) || - (!is_a($object, 'Node') && $object != NULL) - ) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: replace): Parameters must be subclasses of Node or NULL'; - trigger_error($errmsg, E_USER_ERROR); - } - - if($this->size() == 0) - break; - foreach($this->triples as $key => $value) { - if ($this->triples[$key]->subj->equals($subject)) { - $this->triples[$key]->subj = $replacement; - } - if ($this->triples[$key]->pred->equals($predicate)) - $this->triples[$key]->pred = $replacement; - if ($this->triples[$key]->obj->equals($object)) - $this->triples[$key]->obj = $replacement; - - } - $this->index($this->indexed); - } - - - /** - * Internal method that checks, if a statement matches a S, P, O or NULL combination. - * NULL input for any parameter will match anything. - * - * @param object Statement $statement - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @return boolean - * @access private - */ - function matchStatement($statement, $subject, $predicate, $object) { - - if(($subject != NULL) AND !($statement->subj->equals($subject))) - return false; - - if($predicate != NULL && !($statement->pred->equals($predicate))) - return false; - - if($object != NULL && !($statement->obj->equals($object))) - return false; - - return true; - } - - - - - /** - * Checks if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * @access public - * @param object model &$that - * @throws phpErrpr - * @return boolean - */ - - function equals(&$that) { - - if (!is_a($that, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: equals): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - if ($this->size() != $that->size()) - return FALSE; - /* - if (!$this->containsAll($that)) - return FALSE; - return TRUE; - */ - include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php"); - return ModelComparator::compare($this,$that); - } - - /** - * Returns a new MemModel that is the set-union of the MemModel with another model. - * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - * - */ - function & unite(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: unite): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = $this; - - if (is_a($model, 'MemModel')) { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $res->addWithoutDuplicates($statement); - } - } - - elseif (is_a($model, 'DbModel')) { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $res->addWithoutDuplicates($value); - } - - return $res; - } - - /** - * Returns a new MemModel that is the subtraction of another model from this MemModel. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - - function & subtract(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: subtract): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = $this; - - - if (is_a($model, 'MemModel')) - { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $res->remove($statement); - } - } - elseif (is_a($model, 'DbModel')) - { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $res->remove($value); - } - - - return $res; - } - - /** - * Returns a new MemModel containing all the statements which are in both this MemModel and another. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function & intersect(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: intersect: Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $res = new MemModel($this->getBaseURI()); - - if (is_a($model, 'DbModel') || is_a($model, 'RDFSBModel')) - { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) { - if ($this->contains($value)) - $res->add($value); - } - } - - elseif (is_a($model, 'MemModel')) - { - foreach($model->triples as $value) { - if ($this->contains($value)) - $res->add($value); - } - } - - - - return $res; - } - - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) { - - if (!is_a($model, 'Model')) { - $errmsg = RDFAPI_ERROR . '(class: MemModel; method: addModel): Model expected.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $blankNodes_tmp = array(); - - if (is_a($model, 'MemModel')) { - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - $stateIt=new StatementIterator($model); - while($statement=$stateIt->next()) - { - $this->_addStatementFromAnotherModel($statement, $blankNodes_tmp); - }; - $this->addParsedNamespaces($model->getParsedNamespaces()); - } - - elseif (is_a($model, 'DbModel')) { - $memModel =& $model->getMemModel(); - foreach($memModel->triples as $value) - $this->_addStatementFromAnotherModel($value, $blankNodes_tmp); - } - $this->index($this->indexed); - } - - - /** - * Reifies the MemModel. - * Returns a new MemModel that contains the reifications of all statements of this MemModel. - * - * @access public - * @return object MemModel - */ - function & reify() { - $res = new MemModel($this->getBaseURI()); - - $stateIt=$this->getStatementIterator(); - while($statement=$stateIt->next()) - { - $pointer =& $statement->reify($res); - $res->addModel($pointer); - }; - - return $res; - } - - /** - * Returns a StatementIterator for traversing the MemModel. - * @access public - * @return object StatementIterator - */ - function & getStatementIterator() { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php'; - - $si = new StatementIterator($this); - return $si; - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & findAsIterator($sub=null,$pred=null,$obj=null) { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/FindIterator.php'; - - $if = new FindIterator($this,$sub,$pred,$obj); - return $if; - } - - /** - * Returns a FindIterator for traversing the MemModel. - * @access public - * @return object FindIterator - */ - function & iterFind($sub=null,$pred=null,$obj=null) { - // Import Package Utility - require_once RDFAPI_INCLUDE_DIR . 'util/IterFind.php'; - - $if = new IterFind($this,$sub,$pred,$obj); - return $if; - } - - - /** - * Returns the models namespaces. - * - * @author Tobias Gau� - * @access public - * @return Array - */ - function getParsedNamespaces(){ - if(count($this->parsedNamespaces)!=0){ - return $this->parsedNamespaces; - }else{ - return false; - } - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gau� - * @access public - * @param Array $newNs - */ - function addParsedNamespaces($newNs){ - if($newNs) - $this->parsedNamespaces = $this->parsedNamespaces + $newNs; - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gau� - * @access public - * @param String - * @param String - */ - function addNamespace($prefix, $nmsp){ - $this->parsedNamespaces[$nmsp]=$prefix; - } - - /** - * removes a single namespace from the model - * - * @author Tobias Gau� - * @access public - * @param String $nmsp - */ - function removeNamespace($nmsp){ - if(isset($this->parsedNamespaces[$nmsp])){ - unset($this->parsedNamespaces[$nmsp]); - return true; - }else{ - return false; - } - } - - - - /** - * Close the MemModel and free up resources held. - * - * @access public - */ - function close() { - unset( $this->baseURI ); - unset( $this->triples ); - } - - // ============================================================================= - // *************************** helper functions ******************************** - // ============================================================================= - /** - * Checks if $statement is in index - * - * @param int $ind - * @param Statement &$statement - * @return boolean - * @access private - */ - function _containsIndex(&$statement,$ind){ - switch($ind){ - case 4: - $sub=$statement->getSubject(); - $pos=$sub->getLabel(); - break; - case 1: - $sub=$statement->getSubject(); - $pred=$statement->getPredicate(); - $obj=$statement->getObject(); - $pos=$sub->getLabel().$pred->getLabel().$obj->getLabel(); - break; - case 2: - $sub=$statement->getSubject(); - $pred=$statement->getPredicate(); - $pos=$sub->getLabel().$pred->getLabel(); - break; - case 3: - $sub=$statement->getSubject(); - $obj=$statement->getObject(); - $pos=$sub->getLabel().$obj->getLabel(); - break; - } - - if (!isset($this->indexArr[$ind][$pos])) - return FALSE; - foreach ($this->indexArr[$ind][$pos] as $key => $value) { - $t=$this->triples[$value]; - if ($t->equals($statement)) - return TRUE; - } - return FALSE; - } - - - - - - /** - * finds a statement in an index. $pos is the Position in the index - * and $ind the adequate searchindex - * - * @param String $pos - * @param Object Subject &$subject - * @param Object Predicate &$predicate - * @param Object Object &$object - * @param int &ind - * @return MemModel $res - * @access private - */ - function _findInIndex($pos,&$subject,&$predicate,&$object,$ind){ - $res = new MemModel($this->getBaseURI()); - $res->indexed=-1; - if (!isset($this->indexArr[$ind][$pos])) - return $res; - foreach($this->indexArr[$ind][$pos] as $key =>$value){ - $t=$this->triples[$value]; - if ($this->matchStatement($t,$subject,$predicate,$object)) - $res->add($t); - } - return $res; - } - /** - * adds/removes a statement into/from an index. - * mode=0 removes the statement from the index; - * mode=1 adds the statement into the index. - * returns the statements position. - * - * @param Object Statement &$statement - * @param int $k - * @param int $ind - * @param int $mode - * @return int $k - * @access private - */ - function _indexOpr(&$statement,$k,$ind,$mode){ - // determine position in adequate index - switch($ind){ - case 1: - $s=$statement->getSubject(); - $p=$statement->getPredicate(); - $o=$statement->getObject(); - $pos=$s->getLabel().$p->getLabel().$o->getLabel(); - break; - case 2: - $s=$statement->getSubject(); - $p=$statement->getPredicate(); - $pos=$s->getLabel().$p->getLabel(); - break; - case 3: - $s=$statement->getSubject(); - $o=$statement->getObject(); - $pos=$s->getLabel().$o->getLabel(); - break; - case 4: - $s=$statement->getSubject(); - $pos=$s->getLabel(); - break; - case 5: - $p=$statement->getPredicate(); - $pos=$p->getLabel(); - break; - case 6: - $o=$statement->getObject(); - $pos=$o->getLabel(); - break; - } - switch($mode){ - // add in Index - case 1: - if(isset($this->indexArr[$ind][$pos])){ - $this->indexArr[$ind][$pos][] = $k; - }else{ - $this->indexArr[$ind][$pos][0] = $k; - } - break; - // remove from Index - case 0: - $subject=$statement->getSubject(); - $predicate=$statement->getPredicate(); - $object=$statement->getObject(); - $k=-1; - if(!isset($this->indexArr[$ind][$pos])){ - return -1; - } - $num=count($this->indexArr[$ind][$pos]); - foreach($this->indexArr[$ind][$pos] as $key => $value){ - $t=$this->triples[$value]; - if($this->matchStatement($t,$subject,$predicate,$object)){ - $k=$value; - if($num==1){ - unset($this->indexArr[$ind][$pos]); - }else{ - unset($this->indexArr[$ind][$pos][$key]); - } - return $k; - } - } - break; - } - return $k; - } - - - /** - * finds next or previous matching statement. - * Returns Position in model or -1 if there is no match. - * - * - * @param String - * @param object Subject - * @param object Predicate - * @param object Object - * @param integer - * @param integer - * @return integer - * @access private - */ - function _findMatchIndex($pos,&$s,&$p,&$o,$ind,$off){ - $match=-1; - if (!isset($this->indexArr[$ind][$pos])) { - return $match;} - foreach($this->indexArr[$ind][$pos] as $key =>$value){ - $t=$this->triples[$value]; - if ($this->matchStatement($t,$s,$p,$o)){ - if($off <= $value){ - $match= $value; - return $match; - } - } - } - - return $match; - - } - - - - -} // end: MemModel - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Model.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Model.php deleted file mode 100755 index 1c086b54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Model.php +++ /dev/null @@ -1,566 +0,0 @@ - triples, where P is a uriref, S is either - * a uriref or a blank node, and O is either a uriref, a blank node, or a literal. - * - * - * @version $Id: Model.php 551 2007-11-22 19:58:35Z p_frischmuth $ - * @author Radoslaw Oldakowski - * @author Daniel Westphal - * - * @package model - * @access public - */ -class Model extends Object -{ - /** - * Base URI of the Model. - * Affects creating of new resources and serialization syntax. - * - * @var string - * @access private - */ - var $baseURI; - - /** - * Number of the last assigned bNode. - * - * @var integer - * @access private - */ - var $bNodeCount; - - /** - * SparqlParser so we can re-use it - * @var Parser - */ - var $queryParser = null; - - - - /** - * Notice for people who are used to work with older versions of RAP. - * - * @throws PHPError - * @access public - */ - function Model() - { - - $errmsg = 'Since RAP 0.6 the class for manipulating memory models has been renamed to MemModel.'; - $errmsg .= '
Sorry for this inconvenience.
'; - - trigger_error($errmsg, E_USER_ERROR); - } - - - - /** - * Return current baseURI. - * - * @return string - * @access public - */ - function getBaseURI() - { - return $this->baseURI; - } - - - - /** - * Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to this DbModel. - * - * @param string $filename - * @param string $type - * @param boolean $stream - * @access public - */ - function load($filename, $type = NULL, $stream=false) - { - if ((isset($type)) && ($type =='n3') OR ($type =='nt')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - }elseif ((isset($type)) && ($type =='rdf')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - }elseif ((isset($type)) && ($type =='grddl')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - }elseif ((isset($type)) && ($type =='rss')) { - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS); - $parser = new RssParser(); - }else { - // create a parser according to the suffix of the filename - // if there is no suffix assume the file to be XML/RDF - preg_match("/\.([a-zA-Z0-9_]+)$/", $filename, $suffix); - if (isset($suffix[1]) && (strtolower($suffix[1]) == 'n3' OR strtolower($suffix[1]) == 'nt')){ - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - }elseif (isset($suffix[1]) && (strtolower($suffix[1]) == 'htm' OR strtolower($suffix[1]) == 'html' OR strtolower($suffix[1]) == 'xhtml')){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - }else{ - // Import Package Syntax - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - } - }; - - if (($stream && $type=='rdf')||($stream && $type=='n3')) { - $temp=&$parser->generateModel($filename,false,$this); - } else{ - $temp=&$parser->generateModel($filename); - } - $this->addModel($temp); - if($this->getBaseURI()== null) - $this->setBaseURI($temp->getBaseURI()); - } - - /** - * This method takes a string conatining data and adds the parsed data to this model. - * - * @param string $str The string containing the data to be parsed and loaded. - * @param type $type The type of the string, currently only 'json' is supported. - */ - function loadFromString($str, $type) { - - switch ($type) { - case 'json': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_JSON); - $parser = new JsonParser(); - break; - case 'n3': - case 'nt': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $parser = new N3Parser(); - break; - case 'rdf': - case 'rdfxml': - case 'xml': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $parser = new RdfParser(); - break; - case 'grddl': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL); - $parser = new GRDDLParser(); - break; - case 'rss': - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS); - $parser = new RssParser(); - break; - default: - trigger_error('(class: Model; method: loadFromString): type ' . $type . 'is currently not supported', - E_USER_ERROR); - } - - if ($parser instanceof JsonParser) { - $parser->generateModelFromString($str, $this); - } else { - $parser->generateModel($str, false, $this); - } - } - - /** - * Adds a statement from another model to this model. - * If the statement to be added contains a blankNode with an identifier - * already existing in this model, a new blankNode is generated. - * - * @param Object Statement $statement - * @access private - */ - function _addStatementFromAnotherModel($statement, &$blankNodes_tmp) - { - $subject = $statement->getSubject(); - $object = $statement->getObject(); - - if (is_a($subject, "BlankNode")) { - $label = $subject->getLabel(); - if (!array_key_exists($label, $blankNodes_tmp)) - { - if ($this->findFirstMatchingStatement($subject, NULL, NULL) - || $this->findFirstMatchingStatement(NULL, NULL, $subject)) - { - $blankNodes_tmp[$label] = new BlankNode($this); - $statement->subj = $blankNodes_tmp[$label]; - } else { - $blankNodes_tmp[$label] = $subject; - } - } else - $statement->subj = $blankNodes_tmp[$label]; - } - - if (is_a($object, "BlankNode")) { - $label = $object->getLabel(); - if (!array_key_exists($label, $blankNodes_tmp)) - { - if ($this->findFirstMatchingStatement($object, NULL, NULL) - || $this->findFirstMatchingStatement(NULL, NULL, $object)) - { - $blankNodes_tmp[$label] = new BlankNode($this); - $statement->obj = $blankNodes_tmp[$label]; - } else { - $blankNodes_tmp[$label] = $object; - } - } else - $statement->obj = $blankNodes_tmp[$label]; - } - $this->add($statement); - } - - - - /** - * Internal method, that returns a resource URI that is unique for the Model. - * URIs are generated using the base_uri of the DbModel, the prefix and a unique number. - * If no prefix is defined, the bNode prefix, defined in constants.php, is used. - * - * @param string $prefix - * @return string - * @access private - */ - function getUniqueResourceURI($prefix = false) - { - static $bNodeCount; - if(!$bNodeCount) - $bNodeCount = 0; - - if(!$prefix) - $prefix=BNODE_PREFIX; - - return $prefix.++$bNodeCount; - } - - - - /** - * Returns a ResModel with this model as baseModel. This is the same as - * ModelFactory::getResModelForBaseModel($this). - * - * @return object ResModel - * @access public - */ - function & getResModel() - { - return ModelFactory::getResModelForBaseModel($this); - } - - - - /** - * Returns an OntModel with this model as baseModel. - * $vocabulary has to be one of the following constants (currently only one is supported): - * RDFS_VOCABULARY to select a RDFS Vocabulary. - * - * This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary). - * - * @param constant $vocabulary - * @return object OntModel - * @access public - */ - function & getOntModel($vocabulary) - { - return ModelFactory::getOntModelForBaseModel($this, $vocabulary); - } - - - - /** - * Searches for triples using find() and tracks forward blank nodes - * until the final objects in the retrieved subgraphs are all named resources. - * The method calls itself recursivly until the result is complete. - * NULL input for subject, predicate or object will match anything. - * Inputparameters are ignored for recursivly found statements. - * Returns a new MemModel or adds (without checking for duplicates) - * the found statements to a given MemModel. - * Returns an empty MemModel, if nothing is found. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: This method can be slow with large models. - * NOTE: Blank nodes are not renamed, they keep the same nodeIDs - * as in the queried model! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton Koestlbacher - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param object MemModel $object - * @return object MemModel - * @access public - * @throws PhpError - */ - function findForward($subject, $predicate, $object, &$newModel = NULL) - { - if (!is_a($newModel, "MemModel")) - { - $newModel = New MemModel; - } - - if (is_a($this, "DbModel")) - { - $model = $this; - $res = $model->find($subject, $predicate, $object); - $it = $res->getStatementIterator(); - } - elseif (is_a($this, "MemModel")) { - $model = $this; - $it = $model->findAsIterator($subject, $predicate, $object); - } - elseif (is_a($this, "ResModel")) { - $model = $this->model; - $it = $model->findAsIterator($subject, $predicate, $object); - } - - while ($it->hasNext()) - { - $statement = $it->next(); - $newModel->add($statement); - if (is_a($statement->object(),'BlankNode')) - { - $model->findForward($statement->object(), NULL, NULL, $newModel); - } - } - return $newModel; - } - - - - /** - * Perform an RDQL query on this Model. Should work with all types of models. - * This method returns a MemModel containing the result statements. - * If $closure is set to TRUE, the result will additionally contain - * statements found by the findForward-method for blank nodes. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: If called with $closure = TRUE this method - * can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton K�tlbacher - * @author code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer - * @access public - * @param string $queryString - * @param boolean $closure - * @return object MemModel - * - */ - function & getMemModelByRDQL($queryString, $closure = FALSE) - { - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL); - $parser = new RdqlParser(); - $parsedQuery =& $parser->parseQuery($queryString); - - // If there are variables used in the pattern but not - // in the select clause, add them to the select clause - foreach ($parsedQuery['patterns'] as $n => $pattern) - { - foreach ($pattern as $key => $val_1) - { - if ($val_1['value']{0}=='?') - { - if (!in_array($val_1['value'],$parsedQuery['selectVars'])) - { - array_push($parsedQuery['selectVars'],$val_1['value']); - } - } - } - } - - if (is_a($this, "DbModel")) - { - $engine = new RdqlDbEngine(); - $model = $this; - } - elseif (is_a($this, "MemModel")) - { - $engine = new RdqlMemEngine(); - $model = $this; - } - elseif (is_a($this, "ResModel")) - { - $engine = new RdqlMemEngine(); - $model = $this->model; - } - - $res = $engine->queryModel($model,$parsedQuery,TRUE); - $rdqlIter = new RdqlResultIterator($res); - $newModel = new MemModel(); - - // Build statements from RdqlResultIterator - while ($rdqlIter->hasNext()) { - $result = $rdqlIter->next(); - foreach ($parsedQuery['patterns'] as $n => $pattern) - { - if (substr($pattern['subject']['value'], 0, 1) == '?') - { - $subj = $result[$pattern['subject']['value']]; - } - else - { - $subj = new Resource($pattern['subject']['value']); - } - if (substr($pattern['predicate']['value'], 0, 1) == '?') - { - $pred = $result[$pattern['predicate']['value']]; - } - else - { - $pred = new Resource($pattern['predicate']['value']); - } - - if (substr($pattern['object']['value'], 0, 1) == '?') - { - $obj = $result[$pattern['object']['value']]; - } - else - { - if (isset($pattern['object']['is_literal'])) - { - $obj = new Literal($pattern['object']['value']); - $obj->setDatatype($pattern['object']['l_dtype']); - $obj->setLanguage($pattern['object']['l_lang']); - } - else - { - $obj = new Resource($pattern['object']['value']); - } - } - - $statement = new Statement($subj,$pred,$obj); - $newModel->add($statement); - - // findForward() Statements containing an eventually given blank node - // and add them to the result, if closure = true - if (is_a($statement->object(),'BlankNode') && $closure == True) - { - $newModel = $model->findForward($statement->object(),NULL,NULL, $newModel); - } - if (is_a($statement->subject(),'BlankNode') && $closure == True) - { - $newModel = $model->findForward($statement->subject(),NULL,NULL, $newModel); - } - } - } - return $newModel; - } - - - - /** - * Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix) - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * Note: See RDFUtil for further Information. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton K�tlbacher - * @param string $format - * @param boolean $short_prefix - * @return string, binary - * @access public - * @throws PhpError - */ - function visualize($format = "dot", $short_prefix = TRUE) - { - return RDFUtil::visualizeGraph($this, $format, $short_prefix); - } - - - /** - * Performs a SPARQL query against a model. The model is converted to - * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or - * as an array containing the variables an their bindings. - * - * @param string $query the sparql query string - * @param string $resultform the result form ('xml' for SPARQL Query Results XML Format) - * @return string/array - */ - function sparqlQuery($query, $resultform = false) - { - list($engine, $dataset) = $this->_prepareSparql(); - return $engine->queryModel( - $dataset, - $this->_parseSparqlQuery($query), - $resultform - ); - }//function sparqlQuery($query,$resultform = false) - - - - /** - * Prepares a sparql query and returns a prepared statement - * that can be executed with data later on. - * - * @param string $query Sparql query to prepare. - * @return SparqlEngine_PreparedStatement prepared statement object - */ - function sparqlPrepare($query) - { - list($engine, $dataset) = $this->_prepareSparql(); - return $engine->prepare( - $dataset, - $this->_parseSparqlQuery($query) - ); - }//function sparqlPrepare($query) - - - - /** - * Prepares everything for SparqlEngine-usage - * Loads the files, creates instances for SparqlEngine and - * Dataset... - * - * @return array First value is the sparql engine, second the dataset - */ - function _prepareSparql() - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php'; - require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'; - - $dataset = new DatasetMem(); - $dataset->setDefaultGraph($this); - - return array( - SparqlEngine::factory($this), - $dataset - ); - }//function _prepareSparql() - - - - /** - * Parses an query and returns the parsed form. - * If the query is not a string but a Query object, - * it will just be returned. - * - * @param $query mixed String or Query object - * @return Query query object - * @throws Exception If $query is no string and no Query object - */ - function _parseSparqlQuery($query) - { - if ($this->queryParser === null) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php'; - $this->queryParser = new SparqlParser(); - } - return $this->queryParser->parse($query); - }//function _parseSparqlQuery($query) - -} // end: Model - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelFactory.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelFactory.php deleted file mode 100755 index b62bfc52..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelFactory.php +++ /dev/null @@ -1,288 +0,0 @@ - -* @author Richard Cyganiak -* -* -* @package model -* @access public -**/ -class ModelFactory -{ - /** - * Returns a MemModel. - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getDefaultModel($baseURI = null) - { - return ModelFactory::getMemModel($baseURI); - } - - /** - * Returns a NamedGraphSetMem. - * You can supply a GraphSet name. - * - * @param string $graphSetId - * @param string $uri - * @access public - */ - function & getDatasetMem($graphSetId = null) - { - require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php'; - $m = new DatasetMem($graphSetId); - return $m; - } - - /** - * Returns a MemModel. - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getMemModel($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php'; - $m = new MemModel($baseURI); - return $m; - } - - /** - * Returns a DbModel with the database connection - * defined in constants.php. - * You can supply a base URI. If a model with the given base - * URI exists in the DbStore, it'll be opened. - * If not, a new model will be created. - * - * @param string $baseURI - * @return object DbModel - * @access public - */ - function & getDefaultDbModel($baseURI = null) - { - $dbStore = ModelFactory::getDbStore(); - $m = ModelFactory::getDbModel($dbStore,$baseURI); - return $m; - } - - /** - * Returns a new DbModel using the database connection - * supplied by $dbStore. - * You can supply a base URI. If a model with the given base - * URI exists in the DbStore, it'll be opened. - * If not, a new model will be created. - * - * @param object DbStore $dbStore - * @param string $baseURI - * @return object DbModel - * @access public - */ - function & getDbModel($dbStore, $baseURI = null) - { - if ($dbStore->modelExists($baseURI)) { - return $dbStore->getModel($baseURI); - } - - return $dbStore->getNewModel($baseURI); - } - - /** - * Returns a database connection with the given parameters. - * Paramters, which are not defined are taken from the constants.php - * - * @param string $dbDriver - * @param string $host - * @param string $dbName - * @param string $user - * @param string $password - * @return object DbStore - * @access public - */ - function & getDbStore($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME, - $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) - { - $dbs = new DbStore($dbDriver, $host, $dbName,$user, $password); - return $dbs; - } - - /** - * Returns a InfModelF. - * (MemModel with forward chaining inference engine) - * Configurations can be done in constants.php - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getInfModelF($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php'; - $mod = new InfModelF($baseURI); - return $mod; - } - - /** - * Returns a InfModelB. - * (MemModel with backward chaining inference engine) - * Configurations can be done in constants.php - * You can supply a base URI - * - * @param string $baseURI - * @return object MemModel - * @access public - */ - function & getInfModelB($baseURI = null) - { - require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php'; - $mod = new InfModelB($baseURI); - return $mod; - } - - /** - * Returns a ResModel. - * $modelType has to be one of the following constants: - * MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new - * model from defined type. - * You can supply a base URI - * - * @param constant $modelType - * @param string $baseURI - * @return object ResModel - * @access public - */ - function & getResModel($modelType, $baseURI = null) - { - switch ($modelType) { - case DBMODEL: - $baseModel = ModelFactory::getDefaultDbModel($baseURI); - break; - - case INFMODELF: - $baseModel = ModelFactory::getInfModelF($baseURI); - break; - - case INFMODELB: - $baseModel = ModelFactory::getInfModelB($baseURI); - break; - - default: - $baseModel = ModelFactory::getMemModel($baseURI); - break; - } - return ModelFactory::getResModelForBaseModel($baseModel); - } - - /** - * Creates a ResModel that wraps an existing base model. - * - * @param object Model $baseModel - * @return object ResModel - * @access public - */ - function &getResModelForBaseModel(&$baseModel) { - require_once RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php'; - $mod = new ResModel($baseModel); - return $mod; - } - - /** - * Returns an OntModel. - * $modelType has to be one of the following constants: - * MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel - * with a new model from defined type. - * $vocabulary defines the ontology language. Currently only - * RDFS_VOCABULARY is supported. You can supply a model base URI. - * - * @param constant $modelType - * @param constant $vocabulary - * @param string $baseURI - * @return object OntModel - * @access public - */ - function & getOntModel($modelType,$vocabulary, $baseURI = null) - { - switch ($modelType) - { - case DBMODEL: - $baseModel = ModelFactory::getDefaultDbModel($baseURI); - break; - - case INFMODELF: - $baseModel = ModelFactory::getInfModelF($baseURI); - break; - - case INFMODELB: - $baseModel = ModelFactory::getInfModelB($baseURI); - break; - - default: - $baseModel = ModelFactory::getMemModel($baseURI);; - } - - $mod = ModelFactory::getOntModelForBaseModel($baseModel, $vocabulary); - return $mod; - } - - /** - * Creates an OntModel that wraps an existing base model. - * $vocabulary defines the ontology language. Currently only - * RDFS_VOCABULARY is supported. - * - * @param object Model $baseModel - * @param constant $vocabulary - * @return object OntModel - * @access public - */ - function &getOntModelForBaseModel(&$baseModel, $vocabulary) - { - require_once RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php'; - - switch ($vocabulary) - { - case RDFS_VOCABULARY: - require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.RDFS_VOCABULARY); - $vocab_object = new RdfsVocabulary(); - break; - default: - trigger_error("Unknown vocabulary constant '$vocabulary'; only RDFS_VOCABULARY is supported", E_USER_WARNING); - $vocab_object = null; - break; - } - $mod = new OntModel($baseModel, $vocab_object); - return $mod; - } - - - - /** - * Creates a SparqlClient. - * - * @param String $server Link to a SPARQL endpoint. - * @return SparqlClient the SparqlClient object. - * @access public - */ - function & getSparqlClient($server){ - $cl = new SparqlClient($server); - return $cl; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelP.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelP.php deleted file mode 100755 index 15a5cf08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/ModelP.php +++ /dev/null @@ -1,27 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include Model classes -require_once( RDFAPI_INCLUDE_DIR . 'model/Node.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Literal.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Resource.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Blanknode.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Statement.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/Model.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/MemModel.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/DbStore.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'model/ModelFactory.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlClient.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'sparql/ClientQuery.php' ); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Node.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Node.php deleted file mode 100755 index 16d11445..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Node.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @package model - * @abstract - * - */ - class Node extends Object { - } // end:RDFNode - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Resource.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Resource.php deleted file mode 100755 index 4a1b4869..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Resource.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * @package model - * @access public - * - */ - class Resource extends Node { - - /** - * URIref to the resource - * @var string - * @access private - */ - var $uri; - - - /** - * Constructor - * Takes an URI or a namespace/localname combination - * - * @param string $namespace_or_uri - * @param string $localName - * @access public - */ - function Resource($namespace_or_uri , $localName = NULL) { - if ($localName == NULL) { - $this->uri = $namespace_or_uri; - } else { - $this->uri = $namespace_or_uri . $localName; - } - } - - - /** - * Returns the URI of the resource. - * @return string - * @access public - */ - function getURI() { - return $this->uri; - } - - /** - * Returns the label of the resource, which is the URI of the resource. - * @access public - * @return string - */ - function getLabel() { - return $this->getURI(); - } - - /** - * Returns the namespace of the resource. May return null. - * @access public - * @return string - */ - function getNamespace() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - return RDFUtil::guessNamespace($this->uri); - } - - /** - * Returns the local name of the resource. - * @access public - * @return string - */ - function getLocalName() { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - return RDFUtil::guessName($this->uri); - } - - /** - * Dumps resource. - * @access public - * @return string - */ - function toString() { - return 'Resource("' . $this->uri .'")'; - } - - /** - * Checks if the resource equals another resource. - * Two resources are equal, if they have the same URI - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) { - - if ($this == $that) { - return true; - } - - if (($that == NULL) or !(is_a($that, 'Resource')) or (is_a($that, 'BlankNode'))) { - return false; - } - - if ($this->getURI() == $that->getURI()) { - return true; - } - - return false; - } - - - - - /** - * Doing string magic in PHP5 - * @return string String representation of this Resource - */ - function __toString() - { - return $this->toString(); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Statement.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Statement.php deleted file mode 100755 index a7b24627..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/model/Statement.php +++ /dev/null @@ -1,313 +0,0 @@ - - * @version $Id: Statement.php 268 2006-05-15 05:28:09Z tgauss $ - * @package model - */ -class Statement extends Object { - - /** - * Subject of the statement - * - * @var object resource - * @access private - */ - var $subj; - - /** - * Predicate of the statement - * - * @var object resource - * @access private - */ - var $pred; - - /** - * Object of the statement - * - * @var object node - * @access private - */ - var $obj; - - /** - * The parameters to constructor are instances of classes and not just strings - * - * @param object node $subj - * @param object node $pred - * @param object node $obj - * @throws PhpError - */ - function Statement($subj, $pred, $obj) { - - if (!is_a($subj, 'Resource')) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource expected as subject.'; - trigger_error($errmsg, E_USER_ERROR); - } - if (!is_a($pred, 'Resource') || is_a($pred, 'BlankNode')) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource expected as predicate, no blank node allowed.'; - trigger_error($errmsg, E_USER_ERROR); - } - if (!(is_a($obj, 'Resource') or is_a($obj, 'Literal'))) { - $errmsg = RDFAPI_ERROR . - '(class: Statement; method: new): Resource or Literal expected as object.'; - trigger_error($errmsg, E_USER_ERROR); - } - - $this->pred = $pred; - $this->subj = $subj; - $this->obj = $obj; - } - - /** - * Returns the subject of the triple. - * @access public - * @return object node - */ - function getSubject() { - return $this->subj; - } - - /** - * Returns the predicate of the triple. - * @access public - * @return object node - */ - function getPredicate() { - return $this->pred; - } - - /** - * Returns the object of the triple. - * @access public - * @return object node - */ - function getObject() { - return $this->obj; - } - - /** - * Alias for getSubject() - * @access public - * @return object node - */ - function subject() { - return $this->subj; - } - - /** - * Alias for getPredicate() - * @access public - * @return object node - */ - function predicate() { - return $this->pred; - } - - /** - * Alias for getObject() - * @access public - * @return object node - */ - function object() { - return $this->obj; - } - /** - * Retruns the hash code of the triple. - * @access public - * @return string - */ - function hashCode() { - return md5($this->subj->getLabel() . $this->pred->getLabel() . $this->obj->getLabel()); - } - - /** - * Dumps the triple. - * @access public - * @return string - */ - - function toString() { - return 'Triple(' . $this->subj->toString() . ', ' . $this->pred->toString() . ', ' . $this->obj->toString() . ')'; - - } - - /** - * Returns a toString() serialization of the statements's subject. - * - * @access public - * @return string - */ - function toStringSubject() { - return $this->subj->toString(); - } - - /** - * Returns a toString() serialization of the statements's predicate. - * - * @access public - * @return string - */ - function toStringPredicate() { - return $this->pred->toString(); - } - - /** - * Reurns a toString() serialization of the statements's object. - * - * @access public - * @return string - */ - function toStringObject() { - return $this->obj->toString(); - } - - /** - * Returns the URI or bNode identifier of the statements's subject. - * - * @access public - * @return string - */ - function getLabelSubject() { - return $this->subj->getLabel(); - } - - /** - * Returns the URI of the statements's predicate. - * - * @access public - * @return string - */ - function getLabelPredicate() { - return $this->pred->getLabel(); - } - - /** - * Reurns the URI, text or bNode identifier of the statements's object. - * - * @access public - * @return string - */ - function getLabelObject() { - return $this->obj->getLabel(); - } - - /** - * Checks if two statements are equal. - * Two statements are considered to be equal if they have the - * same subject, predicate and object. A statement can only be equal - * to another statement object. - * @access public - * @param object statement $that - * @return boolean - */ - - function equals ($that) { - - if ($this == $that) { - return true; - } - if ($that == NULL || !(is_a($that, 'Statement'))) { - return false; - } - - return - $this->subj->equals($that->subject()) && - $this->pred->equals($that->predicate()) && - $this->obj->equals($that->object()); - } - - /** - * Compares two statements and returns integer less than, equal to, or greater than zero. - * Can be used for writing sorting function for models or with the PHP function usort(). - * - * @access public - * @param object statement &$that - * @return boolean - */ - - function compare(&$that) { - return statementsorter($this, $that); - // statementsorter function see below - } - - - /** - * Reifies a statement. - * Returns a new MemModel that is the reification of the statement. - * For naming the statement's bNode a Model or bNodeID must be passed to the method. - * - * @access public - * @param mixed &$model_or_bNodeID - * @return object model - */ - - function & reify(&$model_or_bNodeID) { - - if (is_a($model_or_bNodeID, 'MemModel')) { - // parameter is model - $statementModel = new MemModel($model_or_bNodeID->getBaseURI()); - $thisStatement = new BlankNode($model_or_bNodeID); - } else { - // parameter is bNodeID - $statementModel = new MemModel(); - $thisStatement = &$model_or_bNodeID; - } - - $RDFstatement = new Resource(RDF_NAMESPACE_URI . RDF_STATEMENT); - $RDFtype = new Resource(RDF_NAMESPACE_URI . RDF_TYPE); - $RDFsubject = new Resource(RDF_NAMESPACE_URI . RDF_SUBJECT); - $RDFpredicate = new Resource(RDF_NAMESPACE_URI . RDF_PREDICATE); - $RDFobject = new Resource(RDF_NAMESPACE_URI . RDF_OBJECT); - - $statementModel->add(new Statement($thisStatement, $RDFtype, $RDFstatement)); - $statementModel->add(new Statement($thisStatement, $RDFsubject, $this->getSubject())); - $statementModel->add(new Statement($thisStatement, $RDFpredicate, $this->getPredicate())); - $statementModel->add(new Statement($thisStatement, $RDFobject, $this->Object())); - - return $statementModel; - } - -} // end: Statement - - -/** -* Comparison function for comparing two statements. -* statementsorter() is used by the PHP function usort ( array array, callback cmp_function) -* -* @access private -* @param object Statement $a -* @param object Statement $b -* @return integer less than, equal to, or greater than zero -* @throws phpErrpr -*/ -function statementsorter($a,$b) { - //Compare subjects - $x=$a->getSubject(); - $y=$b->getSubject(); - $r=strcmp($x->getLabel(),$y->getLabel()); - if ($r!=0) return $r; - //Compare predicates - $x=$a->getPredicate(); - $y=$b->getPredicate(); - $r=strcmp($x->getURI(),$y->getURI()); - if ($r!=0) return $r; - //Final resort, compare objects - $x=$a->getObject(); - $y=$b->getObject(); - return strcmp($x->toString(),$y->toString()); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/all-wcprops deleted file mode 100755 index e6f8e819..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/all-wcprops +++ /dev/null @@ -1,59 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 62 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel -END -OWLVocabulary.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OWLVocabulary.php -END -OntModel.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OntModel.php -END -OntModelP.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OntModelP.php -END -OntProperty.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OntProperty.php -END -OntClass.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OntClass.php -END -RdfsVocabulary.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/RdfsVocabulary.php -END -Individual.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/Individual.php -END -OntResource.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/ontModel/OntResource.php -END -OntVocabulary.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/ontModel/OntVocabulary.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/entries deleted file mode 100755 index 50afc937..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/entries +++ /dev/null @@ -1,145 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/ontModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:38:51.000000Z -320 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -OWLVocabulary.php -file - - - - -2008-02-29T14:57:44.944478Z -1aa171d09b4c8b94c8a7ba91b6308485 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -OntModel.php -file - - - - -2008-02-29T14:57:44.960099Z -4ffe80bd79ce8743d44ea9340504ace5 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -OntModelP.php -file - - - - -2008-02-29T14:57:44.960099Z -c3d6da8305a6cefb7508123ba7653aaf -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -OntProperty.php -file - - - - -2008-02-29T14:57:44.975719Z -d8382a3da93dbe2c74459b04f81ba394 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -OntClass.php -file - - - - -2008-02-29T14:57:44.975719Z -8d5625f702080b2f019076977af48091 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -RdfsVocabulary.php -file - - - - -2008-02-29T14:57:44.991340Z -0ab4fcefc17f5191a6dd8eb3de8006f9 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -Individual.php -file - - - - -2008-02-29T14:57:45.006960Z -bdc7c8bba4d51aaee0a8ad81f2880ba7 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -OntResource.php -file - - - - -2008-02-29T14:57:45.006960Z -58899fb5c36b0212ab7e282b8398ef04 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -OntVocabulary.php -file - - - - -2008-02-29T14:57:45.022581Z -08eeba057d70b745eb6bf206eb7b6ddb -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/Individual.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/Individual.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/Individual.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OWLVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OWLVocabulary.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OWLVocabulary.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntClass.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntClass.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntClass.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModelP.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntModelP.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntProperty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntProperty.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntProperty.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntResource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntResource.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntResource.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntVocabulary.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/OntVocabulary.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/RdfsVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/RdfsVocabulary.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/prop-base/RdfsVocabulary.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/Individual.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/Individual.php.svn-base deleted file mode 100755 index f12ee60e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/Individual.php.svn-base +++ /dev/null @@ -1,39 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ - -class Individual extends OntResource -{ - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function Individual($uri = null) - { - parent::OntResource($uri); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OWLVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OWLVocabulary.php.svn-base deleted file mode 100755 index 6dd1c4c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OWLVocabulary.php.svn-base +++ /dev/null @@ -1,369 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OWLVocabulary extends OntVocabulary -{ - - /** - * Answer the resource that represents the class 'class' in this vocabulary. - * - * @return object ResResource - * @access public - */ - function ONTCLASS() - { - return new ResResource(OWL_NS.'Class'); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function DOMAIN() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN); - } - - - /** - * Answer the predicate that denotes comment annotation on an ontology element. - * - * @return object ResProperty - * @access public - */ - function COMMENT() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT); - } - - /** - * Answer the predicate that denotes isDefinedBy annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function IS_DEFINED_BY() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY); - } - - /** - * Answer the predicate that denotes label annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function LABEL() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function RANGE() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE); - } - - /** - * Answer the predicate that denotes seeAlso annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function SEE_ALSO() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO); - } - - /** - * Answer the predicate that denotes that one class is a sub-class of another. - * - * @return object ResProperty - * @access public - */ - function SUB_CLASS_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF); - } - - /** - * Answer the predicate that denotes that one property is a sub-property of another. - * - * @return object ResProperty - * @access public - */ - function SUB_PROPERTY_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF); - } - - - - function ANNOTATION_PROPERTY() - { - return new ResProperty(OWL_NS . 'AnnotationProperty'); - } - - function ALL_DIFFERENT() - { - return new ResProperty(OWL_NS . 'AllDifferent'); - } - - function ALL_VALUES_FROM() - { - return new ResProperty(OWL_NS . 'allValuesFrom'); - } - - function BACKWARD_COMPATIBLE_WITH() - { - return new ResProperty(OWL_NS . 'backwardCompatibleWith'); - } - - function CARDINALITY() - { - return new ResProperty(OWL_NS . 'cardinality'); - } - - function COMPLEMENT_OF() - { - return new ResProperty(OWL_NS . 'complementOf'); - } - - function DATATYPE() - { - return new ResProperty(OWL_NS . 'Datatype'); - } - - function DATATYPE_PROPERTY() - { - return new ResProperty(OWL_NS . 'DatatypeProperty'); - } - - function DATA_RANGE() - { - return new ResProperty(OWL_NS . 'DataRange'); - } - - function DATATYPE_RESTRICTION() - { - return new ResProperty(OWL_NS . 'DatatypeRestriction'); - } - - function DEPRECATED_CLASS() - { - return new ResProperty(OWL_NS . 'DeprecatedClass'); - } - - function DEPRECATED_PROPERTY() - { - return new ResProperty(OWL_NS . 'DeprecatedProperty'); - } - - function DISTINCT_MEMBERS() - { - return new ResProperty(OWL_NS . 'distinctMembers'); - } - - function DIFFERENT_FROM() - { - return new ResProperty(OWL_NS . 'differentFrom'); - } - - function DISJOINT_WITH() - { - return new ResProperty(OWL_NS . 'disjointWith'); - } - - function EQUIVALENT_CLASS() - { - return new ResProperty(OWL_NS . 'equivalentClass'); - } - - function EQUIVALENT_PROPERTY() - { - return new ResProperty(OWL_NS . 'equivalentProperty'); - } - - function FUNCTIONAL_PROPERTY() - { - return new ResProperty(OWL_NS . 'FunctionalProperty'); - } - - function HAS_VALUE() - { - return new ResProperty(OWL_NS . 'hasValue'); - } - - function INCOMPATIBLE_WITH() - { - return new ResProperty(OWL_NS . 'incompatibleWith'); - } - - function IMPORTS() - { - return new ResProperty(OWL_NS . 'imports'); - } - - function INTERSECTION_OF() - { - return new ResProperty(OWL_NS . 'intersectionOf'); - } - - function INVERSE_FUNCTIONAL_PROPERTY() - { - return new ResProperty(OWL_NS . 'InverseFunctionalProperty'); - } - - function INVERSE_OF() - { - return new ResProperty(OWL_NS . 'inverseOf'); - } - - function MAX_CARDINALITY() - { - return new ResProperty(OWL_NS . 'maxCardinality'); - } - - function MIN_CARDINALITY() - { - return new ResProperty(OWL_NS . 'minCardinality'); - } - - function NOTHING() - { - return new ResProperty(OWL_NS . 'Nothing'); - } - - function OBJECT_CLASS() - { - return new ResProperty(OWL_NS . 'ObjectClass'); - } - - function OBJECT_PROPERTY() - { - return new ResProperty(OWL_NS . 'ObjectProperty'); - } - - function OBJECT_RESTRICTION() - { - return new ResProperty(OWL_NS . 'ObjectRestriction'); - } - - function ONE_OF() - { - return new ResProperty(OWL_NS . 'oneOf'); - } - - function ON_PROPERTY() - { - return new ResProperty(OWL_NS . 'onProperty'); - } - - function ONTOLOGY() - { - return new ResProperty(OWL_NS . 'Ontology'); - - } - - function PRIOR_VERSION() - { - return new ResProperty(OWL_NS . 'priorVersion'); - } - - function PROPERTY() - { - return new ResProperty(OWL_NS . 'Property'); - } - - function RESTRICTION() - { - return new ResProperty(OWL_NS . 'Restriction'); - } - - function SAME_AS() - { - return new ResProperty(OWL_NS . 'sameAs'); - } - - function SAME_CLASS_AS() - { - return new ResProperty(OWL_NS . 'sameClassAs'); - } - - function SAME_INDIVIDUAL_AS() - { - return new ResProperty(OWL_NS . 'sameIndividualAs'); - } - - function SAME_PROPERTY_AS() - { - return new ResProperty(OWL_NS . 'samePropertyAs'); - } - - function SOME_VALUES_FROM() - { - return new ResProperty(OWL_NS . 'someValuesFrom'); - } - - function SYMMETRIC_PROPERTY() - { - return new ResProperty(OWL_NS . 'SymmetricProperty'); - } - - function THING() - { - return new ResProperty(OWL_NS . 'Thing'); - } - - function TRANSITIVE_PROPERTY() - { - return new ResProperty(OWL_NS . 'TransitiveProperty'); - } - - function UNION_OF() - { - return new ResProperty(OWL_NS . 'unionOf'); - } - - function VERSION_INFO() - { - return new ResProperty(OWL_NS . 'versionInfo'); - } - - function NAMESPACE() - { - return OWL_NS; - } - - /** - * Answer the predicate that denotes the rdf:type property. - * - * @return object ResProperty - * @access public - */ - function TYPE() - { - return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntClass.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntClass.php.svn-base deleted file mode 100755 index 2be5d196..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntClass.php.svn-base +++ /dev/null @@ -1,285 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntClass extends OntResource -{ - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function OntClass($uri = null) - { - parent::OntResource($uri); - } - - /** - * Add a sub-class of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSubClass($resResource) - { - return $resResource->addProperty($this->vocabulary->SUB_CLASS_OF(),$this); - } - - /** - * Add a super-class of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSuperClass($resResource) - { - return $this->addProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Answer a class that is the sub-class of this class. - * If there is more than one such class, an arbitrary selection is made. - * - * @return object OntClass or NULL - * @access public - */ - function getSubClass() - { - $statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_CLASS_OF(),$this); - if ($statement !== null) - return $this->model->createOntClass($statement->getLabelSubject()); - - return null; - } - - /** - * Answer a class that is the super-class of this class. - * If there is more than one such class, an arbitrary selection is made. - * - * @return object OntClass or NULL - * @access public - */ - function getSuperClass() - { - return $this->getPropertyValue($this->vocabulary->SUB_CLASS_OF(),'OntClass'); - } - - /** - * Answer true if the given class is a sub-class of this class. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param object ResResource $resResource - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSubclass($resResource, $direct = true) - { - if ($direct) - return $resResource->hasProperty($this->vocabulary->SUB_CLASS_OF(),$this); - - $index=array(); - return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true); - } - - /** - * Answer true if the given class is a super-class of this class. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param object ResResource $resResource - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSuperClass($resResource, $direct = true) - { - if ($direct) - return $this->hasProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - - $index=array(); - return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true); - } - - /** - * Answer an ResIterator over the individuals in the model that have this class - * among their types. - * - * @return object ResIterator - * @access public - */ - function listInstances() - { - /* - $statements= $this->model->find(null,$this->vocabulary->TYPE(),$this); - $return = array(); - $returnIndex=array(); - foreach ($statements as $statement) - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$statement->getSubject(); - } - } - return $return; - */ - return new ResIterator(null,$this->vocabulary->TYPE(),$this,'s',$this->model,'Individual'); - - } - - /** - * Answer an array over the classes that are declared to be sub-classes of this class. - * Each element of the array will be an OntClass. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param boolean $direct - * @return array - * @access public - */ - function listSubClasses($direct = true) - { - $return = array(); - if ($direct) - { - $statements = $this->model->find(null,$this->vocabulary->SUB_CLASS_OF(),$this); - } else - { - $index = array(); - $statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index); - } - - $returnIndex=array(); - foreach ($statements as $statement) - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$this->model->createOntClass($subjectLabel); - } - } - return $return; - } - - /** - * Answer an array over the classes that are declared to be super-classes of this class. - * Each element of the array will be an OntClass. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param boolean $direct - * @return array - * @access public - */ - function listSuperClasses($direct = true) - { - $return = array(); - if ($direct) - return $this->listProperty($this->vocabulary->SUB_CLASS_OF(),'OntClass'); - - $index=array(); - $statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$this->model->createOntClass($objectLabel); - } - } - return $return; - } - - /** - * Remove the given class from the sub-classes of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSubClass($resResource) - { - return $this->model->remove(new Statement($resResource,$this->vocabulary->SUB_CLASS_OF(),$this)); - } - - /** - * Remove the given class from the super-classes of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSuperClass($resResource) - { - return $this->removeProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Assert that this class is super-class of the given class. - * Any existing statements for subClassOf on prop will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setSubClass($resResource) - { - foreach ($this->listSubClasses() as $oldRes) - { - $this->removeSubClass($oldRes); - } - $this->addSubClass($resResource); - } - - /** - * Assert that this class is sub-class of the given class. - * Any existing statements for subClassOf on prop will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setSuperClass($resResource) - { - $this->setPropertyValue($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Answer a resource that represents an instance of this OntClass and Individual - * node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object Individual - * @access public - */ - function createInstance($uri = null) - { - $instance = $this->model->createIndividual($uri); - $instance->setInstanceRdfType($this); - return $instance; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModel.php.svn-base deleted file mode 100755 index 8741d5fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModel.php.svn-base +++ /dev/null @@ -1,169 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntModel extends ResModel -{ - /** - * Holds a reference to the assoiated vocabulary. - * @var object - * @access private - */ - var $vocabulary; - - - /** - * Constructor. - * You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary - * - * @param object Model $model - * @access public - */ - function OntModel(& $model,& $vocabulary) - { - parent::ResModel($model); - $this->vocabulary = & $vocabulary; - } - - /** - * Answer a resource that represents a class description node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object OntClass - * @access public - */ - function createOntClass($uri = null) - { - $class = new OntClass($uri); - $class->setAssociatedModel($this); - $class->setVocabulary($this->vocabulary); - $class->setInstanceRdfType($this->vocabulary->ONTCLASS()); - return $class; - } - - /** - * Answer a resource that represents an Individual node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object Individual - * @access public - */ - function createIndividual($uri = null) - { - $individual = new Individual($uri); - $individual->setAssociatedModel($this); - $individual->setVocabulary($this->vocabulary); - return $individual; - } - - /** - * Answer a resource that represents an OntProperty node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object OntProperty - * @access public - */ - function createOntProperty($uri = null) - { - $ontProperty = new OntProperty($uri); - $ontProperty->setAssociatedModel($this); - $ontProperty->setVocabulary($this->vocabulary); - $ontProperty->setInstanceRdfType($this->createResource(RDF_NAMESPACE_URI.RDF_PROPERTY)); - return $ontProperty; - } - - /** - * Answer an array that ranges over all of the various forms of class - * description resource in this model. - * Class descriptions include domain/range definitions, named classes and subClass constructs. - * - * @return array of object ResResource - * @access public - */ - function listClasses() - { - //get all statements, with an rdf:type as property - $statements= $this->find(null,$this->vocabulary->TYPE(),null); - $return = array(); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - //if it's about a typed Individual - if ($objectLabel!=RDF_SCHEMA_URI.RDFS_CLASS) - { - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getObject(); - } - } else - //if it's a "class1 rdf:type rdf:class" construct - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$statement->getSubject(); - } - } - } - //find all statements about SubClassConstructs - $statements= $this->find(null,$this->vocabulary->SUB_CLASS_OF(),null); - foreach ($statements as $statement) - { - //add the statements object to the result - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getObject(); - } - } - foreach ($statements as $statement) - { - //add the statements subject to the result - $objectLabel=$statement->getLabelSubject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getSubject(); - } - } - return $return; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModelP.php.svn-base deleted file mode 100755 index 03883ac3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntModelP.php.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - -* @package ontModel -* -* ---------------------------------------------------------------------------------- -*/ -// Include OntModel classes -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntVocabulary.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/RdfsVocabulary.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntResource.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntProperty.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntClass.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/Individual.php'); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntProperty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntProperty.php.svn-base deleted file mode 100755 index 38cf309f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntProperty.php.svn-base +++ /dev/null @@ -1,390 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ - -class OntProperty extends OntResource -{ - /** - * Constructor. - * You can supply a URI. - * - * @param string $uri - * @access public - */ - function OntProperty($uri = null) - { - parent::OntResource($uri); - } - - /** - * Add a resource representing the domain of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addDomain($resResource) - { - return $this->addProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Add a resource representing the range of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addRange($resResource) - { - return $this->addProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Add a sub-property of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function addSubProperty($resProperty) - { - return $resProperty->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$this); - } - - /** - * Add a super-property of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function addSuperProperty($resProperty) - { - return $this->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } - - /** - * Answer a OntClass that represents the domain class of this property. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object OntClass - * @access public - */ - function getDomain() - { - return $this->getPropertyValue($this->vocabulary->DOMAIN(),'OntClass'); - } - - /** - * Answer a OntClass that represents the range class of this property. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object OntClass - * @access public - */ - function getRange() - { - return $this->getPropertyValue($this->vocabulary->RANGE(),'OntClass'); - } - - /** - * Answer a property that is the sub-property of this property. - * If there is more than one such property, an arbitrary selection is made. - * - * @return object OntProperty - * @access public - */ - function getSubProperty() - { - $statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_PROPERTY_OF(),$this); - if ($statement !== null) - return new OntProperty($statement->getLabelSubject()); - - return null; - } - - /** - * Answer a property that is the super-property of this property. - * If there is more than one such property, an arbitrary selection is made. - * - * @return object OntProperty - * @access public - */ - function getSuperProperty() - { - return $this->getPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty'); - } - - /** - * Answer true if the given resource a class specifying the domain of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasDomain($resResource) - { - return $this->hasProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Answer true if the given resource a class specifying the range of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasRange($resResource) - { - return $this->hasProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Answer true if the given property is a sub-property of this property. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param object ResResource $resProperty - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSubProperty($resProperty, $direct = true) - { - if ($direct) - return $resProperty->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$this); - - $index=array(); - return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true); - } - - /** - * Answer true if the given property is a super-property of this property. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param object ResResource $resProperty - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSuperProperty($resProperty, $direct = true) - { - if ($direct) - return $this->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - - $index=array(); - return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true); - } - - /** - * Answer an array of all of the declared domain classes of this property. - * Each element of the iterator will be an OntClass. - * - * @return array of OntClasses - * @access public - */ - function listDomain() - { - return $this->listProperty($this->vocabulary->DOMAIN(),'OntClass'); - } - - /** - * Answer an array of all of the declared range classes of this property. - * Each element of the iterator will be an OntClass. - * - * @return array of OntClasses - * @access public - */ - function listRange() - { - return $this->listProperty($this->vocabulary->RANGE(),'OntClass'); - } - - /** - * Answer an array of all the properties that are declared to be - * sub-properties of this property. Each element of the iterator will be an - * OntProperty. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param boolean $direct - * @return array of OntProperties - * @access public - */ - function listSubProperties($direct = true) - { - $return = array(); - if ($direct) - { - $statements = $this->model->find(null,$this->vocabulary->SUB_PROPERTY_OF(),$this); - } else - { - $index = array(); - $statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index); - } - - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelSubject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=new OntProperty($statement->getLabelSubject()); - } - } - return $return; - } - - /** - * Answer an array of all the properties that are declared to be - * super-properties of this property. Each element of the iterator will be an - * OntProperty. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param boolean $direct - * @return array of OntProperties - * @access public - */ - function listSuperProperties($direct = true) - { - $return = array(); - if ($direct) - return $this->listProperty($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty'); - - $index=array(); - $statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=new OntProperty($statement->getLabelObject()); - } - } - return $return; - } - - /** - * Remove the given class from the stated domain(s) of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeDomain($resResource) - { - return $this->removeProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Remove the given class from the stated range(es) of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeRange($resResource) - { - return $this->removeProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Remove the given property from the sub-properties of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function removeSubProperty($resProperty) - { - return $this->model->remove(new Statement($resProperty,$this->vocabulary->SUB_PROPERTY_OF(),$this)); - } - - /** - * Remove the given property from the super-properties of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function removeSuperProperty($resProperty) - { - return $this->removeProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } - - /** - * Assert that the given resource represents the class of individuals - * that form the domain of this property. Any existing domain statements - * for this property are removed. - * - * @param object ResResource $resResource - * @access public - */ - function setDomain($resResource) - { - $this->setPropertyValue($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Assert that the given resource represents the class of individuals - * that form the range of this property. Any existing range statements - * for this property are removed. - * - * @param object ResResource $resResource - * @access public - */ - function setRange($resResource) - { - $this->setPropertyValue($this->vocabulary->RANGE(),$resResource); - } - - /** - * Assert that this property is super-property of the given property. - * Any existing statements for superPropertyOf on prop will be removed. - * - * @param object ResProperty $resProperty - * @access public - */ - function setSubProperty($resProperty) - { - foreach ($this->listSubProperties() as $oldResProperty) - { - $this->removeSubProperty($oldResProperty); - } - - $this->addSubProperty($resProperty); - } - - /** - * Assert that this property is sub-property of the given property. - * Any existing statements for subPropertyOf on prop will be removed. - * - * @param object ResProperty $resProperty - * @access public - */ - function setSuperProperty($resProperty) - { - $this->setPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntResource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntResource.php.svn-base deleted file mode 100755 index cc78df3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntResource.php.svn-base +++ /dev/null @@ -1,739 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntResource extends ResResource -{ - /** - * Holds a reference to the assoiated vocabulary - * @var object - * @access private - */ - var $vocabulary; - - /** - * Holds a resResource of the type, which is this ontResource of. - * If this value is set, the ontModel will add an additional - * statement about this resource and the fiven rdf:type - * @var object - * @access private - */ - var $rdfType; - - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function OntResource($uri = null) - { - $this->rdfType=false; - parent::ResResource($uri); - } - - /** - * Sets the reference to the assoiated vocabulary - * - * @param object OntVocabulary $vocabulary - * @access public - */ - function setVocabulary(& $vocabulary) - { - $this->vocabulary = & $vocabulary; - } - - /** - * Add the given comment to this resource. - * - * @param object ResLiteral $comment - * @return boolean - * @access public - */ - function addComment($comment) - { - return $this->addProperty($this->vocabulary->COMMENT(),$comment); - } - - /** - * Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made. - * - * @return object ResLiteral or NULL - * @access public - */ - function getComment() - { - return $this->getPropertyValue($this->vocabulary->COMMENT()); - } - - /** - * Add a resource that is declared to provide a definition of this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addIsDefinedBy($resResource) - { - return $this->addProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Answer a resource that is declared to provide a definition of this resource. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object ResResource - * @access public - */ - function getIsDefinedBy() - { - return $this->getPropertyValue($this->vocabulary->IS_DEFINED_BY()); - } - - /** - * Add the given Label to this resource - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function addLabelProperty($resLiteral) - { - return $this->addProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Answer the label ResLiteral for this object. - * If there is more than one such resource, an arbitrary selection is made. - * - * @param string $uri - * @return object ResResource - * @access public - */ - function getLabelProperty() - { - return $this->getPropertyValue($this->vocabulary->LABEL()); - } - - /** - * Add the given class as one of the rdf:type's for this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addRDFType($resResource) - { - return $this->addProperty($this->vocabulary->TYPE(),$resResource); - } - - /** - * Answer the rdf:type (ie the class) of this resource. - * If there is more than one type for this resource, the return value will - * be one of the values, but it is not specified which one - * (nor that it will consistently be the same one each time). - * - * @return object ResResource - * @access public - */ - function getRDFType() - { - return $this->getPropertyValue($this->vocabulary->TYPE()); - } - - /** - * Add a resource that is declared to provided additional - * information about the definition of this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSeeAlso($resResource) - { - return $this->addProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Answer a resource that provides additional information about this resource. - * If more than one such resource is defined, make an arbitrary choice. - * - * @return object ResResource - * @access public - */ - function getSeeAlso() - { - return $this->getPropertyValue($this->vocabulary->SEE_ALSO()); - } - - /** - * Answer a view of this resource as a class - * - * @return object OntClass - * @access public - */ - function asClass() - { - return $this->model->createOntClass($this->uri); - } - - /** - * Answer a view of this resource as an Individual - * - * @return object Individual - * @access public - */ - function asIndividual() - { - return $this->model->createIndividual($this->uri); - } - - /** - * Answer a view of this resource as a property - * - * @return object OntProperty - * @access public - */ - function asOntProperty() - { - return $this->model->createOntProperty($this->uri); - } - - /** - * Answer a reference to the ontology language profile that governs the - * ontology model to which this ontology resource is attached. - * - * @param string $uri - * @return object OntClass - * @access public - */ - function getVocabulary() - { - return $this->vocabulary ; - } - - /** - * Answer the value of a given RDF property for this resource as $returnType, or null - * if it doesn't have one. If there is more than one RDF statement with - * the given property for the current value, it is not defined which of - * the values will be returned. - * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' - * Default is 'ResResource' - * - * @param object ResResource $property - * @param string $returnType - * @return object OntClass - * @access public - */ - function getPropertyValue($property, $returnType = 'ResResource') - { - $statement=$this->getProperty($property); - if ($statement===null) - return null; - - switch ($returnType) - { - case 'OntClass': - return $this->model->createOntClass($statement->getLabelObject()); - break; - - case 'OntProperty': - return $this->model->createOntProperty($statement->getLabelObject()); - break; - - case 'Individual': - return $this->model->createIndividual($statement->getLabelObject()); - break; - - default: - return $statement->getObject(); - break; - } - } - - /** - * Answer true if this resource has the given comment. - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function hasComment($resLiteral) - { - return $this->hasProperty($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Answer true if this resource has the given label. - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function hasLabelProperty($resLiteral) - { - return $this->hasProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Answer true if this resource has the given rdf:type. - * - * @param object ResResource $ontClass - * @return boolean - * @access public - */ - function hasRDFType($ontClass) - { - return $this->hasProperty($this->vocabulary->TYPE(),$ontClass); - } - - /** - * Answer true if this resource has the given resource as a source - * of additional information. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasSeeAlso($resResource) - { - return $this->hasProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Answer true if this resource is defined by the given resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function isDefinedBy($resResource) - { - return $this->hasProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Answer an array of all of the comment literals for this resource. - * - * @param string $language - * @return array - * @access public - */ - function listComments($language) - { - $return=$this->listProperty($this->vocabulary->COMMENT()); - if ($language === false) - return $return; - - foreach ($return as $key => $resLiteral) - { - if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language) - unset ($return[$key]); - } - return $return; - } - - /** - * Answer an array of all of the resources that are declared to define this resource. - * - * @return array - * @access public - */ - function listIsDefinedBy() - { - return $this->listProperty($this->vocabulary->IS_DEFINED_BY()); - } - - /** - * Answer an array of all of the label literals for this resource, with the given - * language, if $language is set. - * - * @return array - * @access public - */ - function listLabelProperties($language = false) - { - $return=$this->listProperty($this->vocabulary->LABEL()); - if ($language === false) - return $return; - - foreach ($return as $key => $resLiteral) - { - if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language) - unset ($return[$key]); - } - return $return; - - } - - /** - * Answer an array of the RDF classes to which this resource belongs. - * If $direct is true, only answer those resources that are direct types of - * this resource, not the super-classes of the class etc. - * - * @param boolean $direct - * @return array Array of ResResources - * @access public - */ - function listRDFTypes($direct = true) - { - return $this->listProperty($this->vocabulary->TYPE()); - } - - /** - * Answer an array of all of the resources that are declared to - * provide addition information about this resource. - * - * @return array Array of ResResources - * @access public - */ - function listSeeAlso() - { - return $this->listProperty($this->vocabulary->SEE_ALSO()); - } - - /** - * Answer an array of values of a given RDF property for this resource as $returnType, or null - * if it doesn't have one. - * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' - * Default is 'ResResource' - * - * @param object ResResource $property - * @param string $returnType - * @return array of ResResources - * @access public - */ - function listProperty($property, $returnType = 'OntResource') - { - $return=array(); - $resArray = $this->listProperties($property); - foreach ($resArray as $statement) - { - switch ($returnType) - { - case 'OntClass': - $return[]=$this->model->createOntClass($statement->getLabelObject()); - break; - - case 'OntProperty': - $return[]=$this->model->createOntProperty($statement->getLabelObject()); - break; - - case 'Individual': - $return[]=$this->model->createIndividual($statement->getLabelObject()); - break; - - default: - $return[]=$statement->getObject(); - break; - } - } - return $return; - } - - /** - * Remove the statement that the given ResLiteral is a comment on this resource. - * Returns true, if a statement was removed - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function removeComment($resLiteral) - { - return $this->removeProperty($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Remove the statement that this resource is defined by the given resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeDefinedBy($resResource) - { - return $this->removeProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Remove the statement that the given ResLiteral is a label on this resource. - * Returns true, if a statement was removed - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function removeLabelProperty($resLiteral) - { - return $this->removeProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Remove the specific property-value pair from this resource. - * - * @param object ResResource $property - * @param object ResResource $value - * @return boolean - * @access public - */ - function removeProperty($property, $value) - { - return $this->model->remove(new Statement($this,$property,$value)); - } - - /** - * Remove the statement that this resource is of the given RDF type. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeRDFType($resResource) - { - return $this->removeProperty($this->vocabulary->TYPE(),$resResource); - } - - /** - * Remove the statement indicating the given resource as a source of - * additional information about this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSeeAlso($resResource) - { - return $this->removeProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Assert that the given string is the comment on this resource. - * Any existing statements for comment will be removed. - * - * @param object ResLiteral $resLiteral - * @access public - */ - function setComment($resLiteral) - { - $this->setPropertyValue($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Assert that the given resource provides a source of definitions about this resource. - * Any existing statements for isDefinedBy will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setIsDefinedBy($resResource) - { - $this->setPropertyValue($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Assert that the given string is the label on this resource. - * Any existing statements for comment will be removed. - * - * @param object ResLiteral $resLiteral - * @access public - */ - function setLabelProperty($resLiteral) - { - $this->setPropertyValue($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Set the value of the given property of this ontology resource to the given value. - * Maintains the invariant that there is at most one value of the property for a - * given resource, so existing property values are first removed. - * To add multiple properties, use addProperty. - * - * @param object ResResource $property - * @param object ResResource $value - * @access public - */ - function setPropertyValue($property, $value) - { - $this->removeAll($property); - $this->addProperty($property,$value); - } - - /** - * Set the RDF type (ie the class) for this resource, - * replacing any existing rdf:type property. Any existing statements - * for the RDF type will first be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setRDFType($resResource) - { - $this->setPropertyValue($this->vocabulary->TYPE(),$resResource); - } - - /** - * Add a resource that is declared to provided additional information - * about the definition of this resource - * - * @param object ResResource $resResource - * @access public - */ - function setSeeAlso($resResource) - { - $this->setPropertyValue($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Returns an array of ResResources that are recursively connected by $attribute - * in superProperty direction. - * If $onlyFindThisResResource is set to a ResResource, this function returns boolean - * if this distinct resource recursively is connected to the $startResource. - * - * @param object ResResource $startResource - * @param object ResResource $attribute - * @param array $attribute - * @param object ResResource $onlyFindThisResResource - * @return array OR boolean - * @access private - */ - function _getSuperAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false) - { - - $return = $startResource->listProperties($attribute); - - if ($onlyFindThisResResource) - { - foreach ($return as $statement) - { - if ($onlyFindThisResResource->equals($statement->getObject())) - return true; - } - } - - foreach ($return as $statement) - { - $attributeLabel=$statement->getLabelObject(); - if (!in_array($attributeLabel,$attributeIndex)) - { - $attributeIndex[]=$attributeLabel; - $subReturn = $this->_getSuperAttributeStatementsRec($statement->getObject(), $attribute, $attributeIndex, $onlyFindThisResResource); - } - } - if (isset($subReturn)) - { - if ($subReturn === true) - return true; - return array_merge($return,$subReturn); - } - - return $return; - } - - /** - * Returns an array of ResResources that are recursively connected by $attribute - * in subProperty direction. - * If $onlyFindThisResResource is set to a ResResource, this function returns boolean - * if this distinct resource recursively is connected to the $startResource. - * - * @param object ResResource $startResource - * @param object ResResource $attribute - * @param array $attribute - * @param object ResResource $onlyFindThisResResource - * @return array OR boolean - * @access private - */ - function _getSubAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false) - { - - $return = $this->model->find(null,$attribute,$startResource); - - if ($onlyFindThisResResource) - { - foreach ($return as $statement) - { - if ($onlyFindThisResResource->equals($statement->getSubject())) - return true; - } - } - - foreach ($return as $statement) - { - $attributeLabel=$statement->getLabelSubject(); - if (!in_array($attributeLabel,$attributeIndex)) - { - $attributeIndex[]=$attributeLabel; - $subReturn = $this->_getSubAttributeStatementsRec($statement->getSubject(), $attribute, $attributeIndex, $onlyFindThisResResource); - } - } - if (isset($subReturn)) - { - if ($subReturn === true) - return true; - return array_merge($return,$subReturn); - } - - return $return; - } - - /** - * Add a property to this resource. - * A statement with this resource as the subject, p as the predicate and o - * as the object is added to the model associated with this resource. - * If $this->rdfType is set, an additional statement about it's type - * is added. - * - * @param ResResource $property - * @param ResResource/ResLiteral $object - * @return object ResResource - * @access public - */ - function addProperty($property,$object) - { - if ($this->rdfType !== false) - if (!$this->hasRDFType($this->rdfType)) - $this->model->add(new Statement($this,$this->vocabulary->TYPE(),$this->rdfType)); - - return parent:: addProperty($property,$object); - } - - /** - * Sets the rdf:type, that this distinct resource is instance of. - * If this value is set, the ontModel will add an additional - * statement about this resource and the fiven rdf:type - * - * @param object ResResource $resResource - * @access public - */ - function setInstanceRdfType($resResource) - { - $this->rdfType = $resResource; - } - - /** - * returns the rdf:type, that this distinct resource is instance of. - * - * @return object ResResource $resResource - * @access public - */ - function getInstanceRdfType() - { - return $this->rdfType; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntVocabulary.php.svn-base deleted file mode 100755 index f6d29a08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/OntVocabulary.php.svn-base +++ /dev/null @@ -1,25 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntVocabulary -{ - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/RdfsVocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/RdfsVocabulary.php.svn-base deleted file mode 100755 index 310af9bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/.svn/text-base/RdfsVocabulary.php.svn-base +++ /dev/null @@ -1,143 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class RdfsVocabulary extends OntVocabulary -{ - - /** - * Answer the resource that represents the class 'class' in this vocabulary. - * - * @return object ResResource - * @access public - */ - function ONTCLASS() - { - return new ResResource(RDF_SCHEMA_URI.RDFS_CLASS); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function DOMAIN() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN); - } - - - /** - * Answer the predicate that denotes comment annotation on an ontology element. - * - * @return object ResProperty - * @access public - */ - function COMMENT() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT); - } - - /** - * Answer the predicate that denotes isDefinedBy annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function IS_DEFINED_BY() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY); - } - - /** - * Answer the predicate that denotes label annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function LABEL() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function RANGE() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE); - } - - /** - * Answer the predicate that denotes seeAlso annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function SEE_ALSO() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO); - } - - /** - * Answer the predicate that denotes that one class is a sub-class of another. - * - * @return object ResProperty - * @access public - */ - function SUB_CLASS_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF); - } - - /** - * Answer the predicate that denotes that one property is a sub-property of another. - * - * @return object ResProperty - * @access public - */ - function SUB_PROPERTY_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF); - } - - /** - * Answer the string that is the namespace prefix for this vocabulary - * - * @return string - * @access public - */ - function NAMESPACE() - { - return RDF_SCHEMA_URI; - } - - /** - * Answer the predicate that denotes the rdf:type property. - * - * @return object ResProperty - * @access public - */ - function TYPE() - { - return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/Individual.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/Individual.php deleted file mode 100755 index 6e5354a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/Individual.php +++ /dev/null @@ -1,39 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ - -class Individual extends OntResource -{ - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function Individual($uri = null) - { - parent::OntResource($uri); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OWLVocabulary.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OWLVocabulary.php deleted file mode 100755 index 8a398864..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OWLVocabulary.php +++ /dev/null @@ -1,369 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OWLVocabulary extends OntVocabulary -{ - - /** - * Answer the resource that represents the class 'class' in this vocabulary. - * - * @return object ResResource - * @access public - */ - function ONTCLASS() - { - return new ResResource(OWL_NS.'Class'); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function DOMAIN() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN); - } - - - /** - * Answer the predicate that denotes comment annotation on an ontology element. - * - * @return object ResProperty - * @access public - */ - function COMMENT() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT); - } - - /** - * Answer the predicate that denotes isDefinedBy annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function IS_DEFINED_BY() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY); - } - - /** - * Answer the predicate that denotes label annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function LABEL() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function RANGE() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE); - } - - /** - * Answer the predicate that denotes seeAlso annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function SEE_ALSO() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO); - } - - /** - * Answer the predicate that denotes that one class is a sub-class of another. - * - * @return object ResProperty - * @access public - */ - function SUB_CLASS_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF); - } - - /** - * Answer the predicate that denotes that one property is a sub-property of another. - * - * @return object ResProperty - * @access public - */ - function SUB_PROPERTY_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF); - } - - - - function ANNOTATION_PROPERTY() - { - return new ResProperty(OWL_NS . 'AnnotationProperty'); - } - - function ALL_DIFFERENT() - { - return new ResProperty(OWL_NS . 'AllDifferent'); - } - - function ALL_VALUES_FROM() - { - return new ResProperty(OWL_NS . 'allValuesFrom'); - } - - function BACKWARD_COMPATIBLE_WITH() - { - return new ResProperty(OWL_NS . 'backwardCompatibleWith'); - } - - function CARDINALITY() - { - return new ResProperty(OWL_NS . 'cardinality'); - } - - function COMPLEMENT_OF() - { - return new ResProperty(OWL_NS . 'complementOf'); - } - - function DATATYPE() - { - return new ResProperty(OWL_NS . 'Datatype'); - } - - function DATATYPE_PROPERTY() - { - return new ResProperty(OWL_NS . 'DatatypeProperty'); - } - - function DATA_RANGE() - { - return new ResProperty(OWL_NS . 'DataRange'); - } - - function DATATYPE_RESTRICTION() - { - return new ResProperty(OWL_NS . 'DatatypeRestriction'); - } - - function DEPRECATED_CLASS() - { - return new ResProperty(OWL_NS . 'DeprecatedClass'); - } - - function DEPRECATED_PROPERTY() - { - return new ResProperty(OWL_NS . 'DeprecatedProperty'); - } - - function DISTINCT_MEMBERS() - { - return new ResProperty(OWL_NS . 'distinctMembers'); - } - - function DIFFERENT_FROM() - { - return new ResProperty(OWL_NS . 'differentFrom'); - } - - function DISJOINT_WITH() - { - return new ResProperty(OWL_NS . 'disjointWith'); - } - - function EQUIVALENT_CLASS() - { - return new ResProperty(OWL_NS . 'equivalentClass'); - } - - function EQUIVALENT_PROPERTY() - { - return new ResProperty(OWL_NS . 'equivalentProperty'); - } - - function FUNCTIONAL_PROPERTY() - { - return new ResProperty(OWL_NS . 'FunctionalProperty'); - } - - function HAS_VALUE() - { - return new ResProperty(OWL_NS . 'hasValue'); - } - - function INCOMPATIBLE_WITH() - { - return new ResProperty(OWL_NS . 'incompatibleWith'); - } - - function IMPORTS() - { - return new ResProperty(OWL_NS . 'imports'); - } - - function INTERSECTION_OF() - { - return new ResProperty(OWL_NS . 'intersectionOf'); - } - - function INVERSE_FUNCTIONAL_PROPERTY() - { - return new ResProperty(OWL_NS . 'InverseFunctionalProperty'); - } - - function INVERSE_OF() - { - return new ResProperty(OWL_NS . 'inverseOf'); - } - - function MAX_CARDINALITY() - { - return new ResProperty(OWL_NS . 'maxCardinality'); - } - - function MIN_CARDINALITY() - { - return new ResProperty(OWL_NS . 'minCardinality'); - } - - function NOTHING() - { - return new ResProperty(OWL_NS . 'Nothing'); - } - - function OBJECT_CLASS() - { - return new ResProperty(OWL_NS . 'ObjectClass'); - } - - function OBJECT_PROPERTY() - { - return new ResProperty(OWL_NS . 'ObjectProperty'); - } - - function OBJECT_RESTRICTION() - { - return new ResProperty(OWL_NS . 'ObjectRestriction'); - } - - function ONE_OF() - { - return new ResProperty(OWL_NS . 'oneOf'); - } - - function ON_PROPERTY() - { - return new ResProperty(OWL_NS . 'onProperty'); - } - - function ONTOLOGY() - { - return new ResProperty(OWL_NS . 'Ontology'); - - } - - function PRIOR_VERSION() - { - return new ResProperty(OWL_NS . 'priorVersion'); - } - - function PROPERTY() - { - return new ResProperty(OWL_NS . 'Property'); - } - - function RESTRICTION() - { - return new ResProperty(OWL_NS . 'Restriction'); - } - - function SAME_AS() - { - return new ResProperty(OWL_NS . 'sameAs'); - } - - function SAME_CLASS_AS() - { - return new ResProperty(OWL_NS . 'sameClassAs'); - } - - function SAME_INDIVIDUAL_AS() - { - return new ResProperty(OWL_NS . 'sameIndividualAs'); - } - - function SAME_PROPERTY_AS() - { - return new ResProperty(OWL_NS . 'samePropertyAs'); - } - - function SOME_VALUES_FROM() - { - return new ResProperty(OWL_NS . 'someValuesFrom'); - } - - function SYMMETRIC_PROPERTY() - { - return new ResProperty(OWL_NS . 'SymmetricProperty'); - } - - function THING() - { - return new ResProperty(OWL_NS . 'Thing'); - } - - function TRANSITIVE_PROPERTY() - { - return new ResProperty(OWL_NS . 'TransitiveProperty'); - } - - function UNION_OF() - { - return new ResProperty(OWL_NS . 'unionOf'); - } - - function VERSION_INFO() - { - return new ResProperty(OWL_NS . 'versionInfo'); - } - - function NAMESPACE() - { - return OWL_NS; - } - - /** - * Answer the predicate that denotes the rdf:type property. - * - * @return object ResProperty - * @access public - */ - function TYPE() - { - return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntClass.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntClass.php deleted file mode 100755 index 02ec1121..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntClass.php +++ /dev/null @@ -1,285 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntClass extends OntResource -{ - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function OntClass($uri = null) - { - parent::OntResource($uri); - } - - /** - * Add a sub-class of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSubClass($resResource) - { - return $resResource->addProperty($this->vocabulary->SUB_CLASS_OF(),$this); - } - - /** - * Add a super-class of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSuperClass($resResource) - { - return $this->addProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Answer a class that is the sub-class of this class. - * If there is more than one such class, an arbitrary selection is made. - * - * @return object OntClass or NULL - * @access public - */ - function getSubClass() - { - $statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_CLASS_OF(),$this); - if ($statement !== null) - return $this->model->createOntClass($statement->getLabelSubject()); - - return null; - } - - /** - * Answer a class that is the super-class of this class. - * If there is more than one such class, an arbitrary selection is made. - * - * @return object OntClass or NULL - * @access public - */ - function getSuperClass() - { - return $this->getPropertyValue($this->vocabulary->SUB_CLASS_OF(),'OntClass'); - } - - /** - * Answer true if the given class is a sub-class of this class. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param object ResResource $resResource - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSubclass($resResource, $direct = true) - { - if ($direct) - return $resResource->hasProperty($this->vocabulary->SUB_CLASS_OF(),$this); - - $index=array(); - return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true); - } - - /** - * Answer true if the given class is a super-class of this class. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param object ResResource $resResource - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSuperClass($resResource, $direct = true) - { - if ($direct) - return $this->hasProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - - $index=array(); - return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true); - } - - /** - * Answer an ResIterator over the individuals in the model that have this class - * among their types. - * - * @return object ResIterator - * @access public - */ - function listInstances() - { - /* - $statements= $this->model->find(null,$this->vocabulary->TYPE(),$this); - $return = array(); - $returnIndex=array(); - foreach ($statements as $statement) - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$statement->getSubject(); - } - } - return $return; - */ - return new ResIterator(null,$this->vocabulary->TYPE(),$this,'s',$this->model,'Individual'); - - } - - /** - * Answer an array over the classes that are declared to be sub-classes of this class. - * Each element of the array will be an OntClass. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param boolean $direct - * @return array - * @access public - */ - function listSubClasses($direct = true) - { - $return = array(); - if ($direct) - { - $statements = $this->model->find(null,$this->vocabulary->SUB_CLASS_OF(),$this); - } else - { - $index = array(); - $statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index); - } - - $returnIndex=array(); - foreach ($statements as $statement) - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$this->model->createOntClass($subjectLabel); - } - } - return $return; - } - - /** - * Answer an array over the classes that are declared to be super-classes of this class. - * Each element of the array will be an OntClass. - * $direct - If true, only search the classes that are directly - * adjacent to this class in the class hierarchy. - * - * @param boolean $direct - * @return array - * @access public - */ - function listSuperClasses($direct = true) - { - $return = array(); - if ($direct) - return $this->listProperty($this->vocabulary->SUB_CLASS_OF(),'OntClass'); - - $index=array(); - $statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$this->model->createOntClass($objectLabel); - } - } - return $return; - } - - /** - * Remove the given class from the sub-classes of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSubClass($resResource) - { - return $this->model->remove(new Statement($resResource,$this->vocabulary->SUB_CLASS_OF(),$this)); - } - - /** - * Remove the given class from the super-classes of this class. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSuperClass($resResource) - { - return $this->removeProperty($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Assert that this class is super-class of the given class. - * Any existing statements for subClassOf on prop will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setSubClass($resResource) - { - foreach ($this->listSubClasses() as $oldRes) - { - $this->removeSubClass($oldRes); - } - $this->addSubClass($resResource); - } - - /** - * Assert that this class is sub-class of the given class. - * Any existing statements for subClassOf on prop will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setSuperClass($resResource) - { - $this->setPropertyValue($this->vocabulary->SUB_CLASS_OF(),$resResource); - } - - /** - * Answer a resource that represents an instance of this OntClass and Individual - * node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object Individual - * @access public - */ - function createInstance($uri = null) - { - $instance = $this->model->createIndividual($uri); - $instance->setInstanceRdfType($this); - return $instance; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModel.php deleted file mode 100755 index 8c1db9c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModel.php +++ /dev/null @@ -1,169 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntModel extends ResModel -{ - /** - * Holds a reference to the assoiated vocabulary. - * @var object - * @access private - */ - var $vocabulary; - - - /** - * Constructor. - * You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary - * - * @param object Model $model - * @access public - */ - function OntModel(& $model,& $vocabulary) - { - parent::ResModel($model); - $this->vocabulary = & $vocabulary; - } - - /** - * Answer a resource that represents a class description node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object OntClass - * @access public - */ - function createOntClass($uri = null) - { - $class = new OntClass($uri); - $class->setAssociatedModel($this); - $class->setVocabulary($this->vocabulary); - $class->setInstanceRdfType($this->vocabulary->ONTCLASS()); - return $class; - } - - /** - * Answer a resource that represents an Individual node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object Individual - * @access public - */ - function createIndividual($uri = null) - { - $individual = new Individual($uri); - $individual->setAssociatedModel($this); - $individual->setVocabulary($this->vocabulary); - return $individual; - } - - /** - * Answer a resource that represents an OntProperty node in this model. - * If a resource with the given uri exists in the model, it will be re-used. - * If not, a new one is created in the updateable sub-model of the ontology model. - * - * @param string $uri - * @return object OntProperty - * @access public - */ - function createOntProperty($uri = null) - { - $ontProperty = new OntProperty($uri); - $ontProperty->setAssociatedModel($this); - $ontProperty->setVocabulary($this->vocabulary); - $ontProperty->setInstanceRdfType($this->createResource(RDF_NAMESPACE_URI.RDF_PROPERTY)); - return $ontProperty; - } - - /** - * Answer an array that ranges over all of the various forms of class - * description resource in this model. - * Class descriptions include domain/range definitions, named classes and subClass constructs. - * - * @return array of object ResResource - * @access public - */ - function listClasses() - { - //get all statements, with an rdf:type as property - $statements= $this->find(null,$this->vocabulary->TYPE(),null); - $return = array(); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - //if it's about a typed Individual - if ($objectLabel!=RDF_SCHEMA_URI.RDFS_CLASS) - { - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getObject(); - } - } else - //if it's a "class1 rdf:type rdf:class" construct - { - $subjectLabel=$statement->getLabelSubject(); - if (!in_array($subjectLabel,$returnIndex)) - { - $returnIndex[]=$subjectLabel; - $return[]=$statement->getSubject(); - } - } - } - //find all statements about SubClassConstructs - $statements= $this->find(null,$this->vocabulary->SUB_CLASS_OF(),null); - foreach ($statements as $statement) - { - //add the statements object to the result - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getObject(); - } - } - foreach ($statements as $statement) - { - //add the statements subject to the result - $objectLabel=$statement->getLabelSubject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=$statement->getSubject(); - } - } - return $return; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModelP.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModelP.php deleted file mode 100755 index 8a7a11d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntModelP.php +++ /dev/null @@ -1,24 +0,0 @@ - -* @package ontModel -* -* ---------------------------------------------------------------------------------- -*/ -// Include OntModel classes -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntVocabulary.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/RdfsVocabulary.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntResource.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntProperty.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntClass.php'); -require_once( RDFAPI_INCLUDE_DIR . 'ontModel/Individual.php'); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntProperty.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntProperty.php deleted file mode 100755 index 787a91e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntProperty.php +++ /dev/null @@ -1,390 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ - -class OntProperty extends OntResource -{ - /** - * Constructor. - * You can supply a URI. - * - * @param string $uri - * @access public - */ - function OntProperty($uri = null) - { - parent::OntResource($uri); - } - - /** - * Add a resource representing the domain of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addDomain($resResource) - { - return $this->addProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Add a resource representing the range of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addRange($resResource) - { - return $this->addProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Add a sub-property of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function addSubProperty($resProperty) - { - return $resProperty->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$this); - } - - /** - * Add a super-property of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function addSuperProperty($resProperty) - { - return $this->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } - - /** - * Answer a OntClass that represents the domain class of this property. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object OntClass - * @access public - */ - function getDomain() - { - return $this->getPropertyValue($this->vocabulary->DOMAIN(),'OntClass'); - } - - /** - * Answer a OntClass that represents the range class of this property. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object OntClass - * @access public - */ - function getRange() - { - return $this->getPropertyValue($this->vocabulary->RANGE(),'OntClass'); - } - - /** - * Answer a property that is the sub-property of this property. - * If there is more than one such property, an arbitrary selection is made. - * - * @return object OntProperty - * @access public - */ - function getSubProperty() - { - $statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_PROPERTY_OF(),$this); - if ($statement !== null) - return new OntProperty($statement->getLabelSubject()); - - return null; - } - - /** - * Answer a property that is the super-property of this property. - * If there is more than one such property, an arbitrary selection is made. - * - * @return object OntProperty - * @access public - */ - function getSuperProperty() - { - return $this->getPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty'); - } - - /** - * Answer true if the given resource a class specifying the domain of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasDomain($resResource) - { - return $this->hasProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Answer true if the given resource a class specifying the range of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasRange($resResource) - { - return $this->hasProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Answer true if the given property is a sub-property of this property. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param object ResResource $resProperty - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSubProperty($resProperty, $direct = true) - { - if ($direct) - return $resProperty->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$this); - - $index=array(); - return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true); - } - - /** - * Answer true if the given property is a super-property of this property. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param object ResResource $resProperty - * @param boolean $direct - * @return boolean - * @access public - */ - function hasSuperProperty($resProperty, $direct = true) - { - if ($direct) - return $this->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - - $index=array(); - return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true); - } - - /** - * Answer an array of all of the declared domain classes of this property. - * Each element of the iterator will be an OntClass. - * - * @return array of OntClasses - * @access public - */ - function listDomain() - { - return $this->listProperty($this->vocabulary->DOMAIN(),'OntClass'); - } - - /** - * Answer an array of all of the declared range classes of this property. - * Each element of the iterator will be an OntClass. - * - * @return array of OntClasses - * @access public - */ - function listRange() - { - return $this->listProperty($this->vocabulary->RANGE(),'OntClass'); - } - - /** - * Answer an array of all the properties that are declared to be - * sub-properties of this property. Each element of the iterator will be an - * OntProperty. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param boolean $direct - * @return array of OntProperties - * @access public - */ - function listSubProperties($direct = true) - { - $return = array(); - if ($direct) - { - $statements = $this->model->find(null,$this->vocabulary->SUB_PROPERTY_OF(),$this); - } else - { - $index = array(); - $statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index); - } - - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelSubject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=new OntProperty($statement->getLabelSubject()); - } - } - return $return; - } - - /** - * Answer an array of all the properties that are declared to be - * super-properties of this property. Each element of the iterator will be an - * OntProperty. - * If $direct is set to true, only consider the direcly adjacent - * properties in the property hierarchy - * - * @param boolean $direct - * @return array of OntProperties - * @access public - */ - function listSuperProperties($direct = true) - { - $return = array(); - if ($direct) - return $this->listProperty($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty'); - - $index=array(); - $statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index); - $returnIndex=array(); - foreach ($statements as $statement) - { - $objectLabel=$statement->getLabelObject(); - if (!in_array($objectLabel,$returnIndex)) - { - $returnIndex[]=$objectLabel; - $return[]=new OntProperty($statement->getLabelObject()); - } - } - return $return; - } - - /** - * Remove the given class from the stated domain(s) of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeDomain($resResource) - { - return $this->removeProperty($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Remove the given class from the stated range(es) of this property. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeRange($resResource) - { - return $this->removeProperty($this->vocabulary->RANGE(),$resResource); - } - - /** - * Remove the given property from the sub-properties of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function removeSubProperty($resProperty) - { - return $this->model->remove(new Statement($resProperty,$this->vocabulary->SUB_PROPERTY_OF(),$this)); - } - - /** - * Remove the given property from the super-properties of this property. - * - * @param object ResProperty $resProperty - * @return boolean - * @access public - */ - function removeSuperProperty($resProperty) - { - return $this->removeProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } - - /** - * Assert that the given resource represents the class of individuals - * that form the domain of this property. Any existing domain statements - * for this property are removed. - * - * @param object ResResource $resResource - * @access public - */ - function setDomain($resResource) - { - $this->setPropertyValue($this->vocabulary->DOMAIN(),$resResource); - } - - /** - * Assert that the given resource represents the class of individuals - * that form the range of this property. Any existing range statements - * for this property are removed. - * - * @param object ResResource $resResource - * @access public - */ - function setRange($resResource) - { - $this->setPropertyValue($this->vocabulary->RANGE(),$resResource); - } - - /** - * Assert that this property is super-property of the given property. - * Any existing statements for superPropertyOf on prop will be removed. - * - * @param object ResProperty $resProperty - * @access public - */ - function setSubProperty($resProperty) - { - foreach ($this->listSubProperties() as $oldResProperty) - { - $this->removeSubProperty($oldResProperty); - } - - $this->addSubProperty($resProperty); - } - - /** - * Assert that this property is sub-property of the given property. - * Any existing statements for subPropertyOf on prop will be removed. - * - * @param object ResProperty $resProperty - * @access public - */ - function setSuperProperty($resProperty) - { - $this->setPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),$resProperty); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntResource.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntResource.php deleted file mode 100755 index c4ee58fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntResource.php +++ /dev/null @@ -1,739 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntResource extends ResResource -{ - /** - * Holds a reference to the assoiated vocabulary - * @var object - * @access private - */ - var $vocabulary; - - /** - * Holds a resResource of the type, which is this ontResource of. - * If this value is set, the ontModel will add an additional - * statement about this resource and the fiven rdf:type - * @var object - * @access private - */ - var $rdfType; - - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function OntResource($uri = null) - { - $this->rdfType=false; - parent::ResResource($uri); - } - - /** - * Sets the reference to the assoiated vocabulary - * - * @param object OntVocabulary $vocabulary - * @access public - */ - function setVocabulary(& $vocabulary) - { - $this->vocabulary = & $vocabulary; - } - - /** - * Add the given comment to this resource. - * - * @param object ResLiteral $comment - * @return boolean - * @access public - */ - function addComment($comment) - { - return $this->addProperty($this->vocabulary->COMMENT(),$comment); - } - - /** - * Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made. - * - * @return object ResLiteral or NULL - * @access public - */ - function getComment() - { - return $this->getPropertyValue($this->vocabulary->COMMENT()); - } - - /** - * Add a resource that is declared to provide a definition of this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addIsDefinedBy($resResource) - { - return $this->addProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Answer a resource that is declared to provide a definition of this resource. - * If there is more than one such resource, an arbitrary selection is made. - * - * @return object ResResource - * @access public - */ - function getIsDefinedBy() - { - return $this->getPropertyValue($this->vocabulary->IS_DEFINED_BY()); - } - - /** - * Add the given Label to this resource - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function addLabelProperty($resLiteral) - { - return $this->addProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Answer the label ResLiteral for this object. - * If there is more than one such resource, an arbitrary selection is made. - * - * @param string $uri - * @return object ResResource - * @access public - */ - function getLabelProperty() - { - return $this->getPropertyValue($this->vocabulary->LABEL()); - } - - /** - * Add the given class as one of the rdf:type's for this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addRDFType($resResource) - { - return $this->addProperty($this->vocabulary->TYPE(),$resResource); - } - - /** - * Answer the rdf:type (ie the class) of this resource. - * If there is more than one type for this resource, the return value will - * be one of the values, but it is not specified which one - * (nor that it will consistently be the same one each time). - * - * @return object ResResource - * @access public - */ - function getRDFType() - { - return $this->getPropertyValue($this->vocabulary->TYPE()); - } - - /** - * Add a resource that is declared to provided additional - * information about the definition of this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function addSeeAlso($resResource) - { - return $this->addProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Answer a resource that provides additional information about this resource. - * If more than one such resource is defined, make an arbitrary choice. - * - * @return object ResResource - * @access public - */ - function getSeeAlso() - { - return $this->getPropertyValue($this->vocabulary->SEE_ALSO()); - } - - /** - * Answer a view of this resource as a class - * - * @return object OntClass - * @access public - */ - function asClass() - { - return $this->model->createOntClass($this->uri); - } - - /** - * Answer a view of this resource as an Individual - * - * @return object Individual - * @access public - */ - function asIndividual() - { - return $this->model->createIndividual($this->uri); - } - - /** - * Answer a view of this resource as a property - * - * @return object OntProperty - * @access public - */ - function asOntProperty() - { - return $this->model->createOntProperty($this->uri); - } - - /** - * Answer a reference to the ontology language profile that governs the - * ontology model to which this ontology resource is attached. - * - * @param string $uri - * @return object OntClass - * @access public - */ - function getVocabulary() - { - return $this->vocabulary ; - } - - /** - * Answer the value of a given RDF property for this resource as $returnType, or null - * if it doesn't have one. If there is more than one RDF statement with - * the given property for the current value, it is not defined which of - * the values will be returned. - * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' - * Default is 'ResResource' - * - * @param object ResResource $property - * @param string $returnType - * @return object OntClass - * @access public - */ - function getPropertyValue($property, $returnType = 'ResResource') - { - $statement=$this->getProperty($property); - if ($statement===null) - return null; - - switch ($returnType) - { - case 'OntClass': - return $this->model->createOntClass($statement->getLabelObject()); - break; - - case 'OntProperty': - return $this->model->createOntProperty($statement->getLabelObject()); - break; - - case 'Individual': - return $this->model->createIndividual($statement->getLabelObject()); - break; - - default: - return $statement->getObject(); - break; - } - } - - /** - * Answer true if this resource has the given comment. - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function hasComment($resLiteral) - { - return $this->hasProperty($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Answer true if this resource has the given label. - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function hasLabelProperty($resLiteral) - { - return $this->hasProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Answer true if this resource has the given rdf:type. - * - * @param object ResResource $ontClass - * @return boolean - * @access public - */ - function hasRDFType($ontClass) - { - return $this->hasProperty($this->vocabulary->TYPE(),$ontClass); - } - - /** - * Answer true if this resource has the given resource as a source - * of additional information. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function hasSeeAlso($resResource) - { - return $this->hasProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Answer true if this resource is defined by the given resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function isDefinedBy($resResource) - { - return $this->hasProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Answer an array of all of the comment literals for this resource. - * - * @param string $language - * @return array - * @access public - */ - function listComments($language) - { - $return=$this->listProperty($this->vocabulary->COMMENT()); - if ($language === false) - return $return; - - foreach ($return as $key => $resLiteral) - { - if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language) - unset ($return[$key]); - } - return $return; - } - - /** - * Answer an array of all of the resources that are declared to define this resource. - * - * @return array - * @access public - */ - function listIsDefinedBy() - { - return $this->listProperty($this->vocabulary->IS_DEFINED_BY()); - } - - /** - * Answer an array of all of the label literals for this resource, with the given - * language, if $language is set. - * - * @return array - * @access public - */ - function listLabelProperties($language = false) - { - $return=$this->listProperty($this->vocabulary->LABEL()); - if ($language === false) - return $return; - - foreach ($return as $key => $resLiteral) - { - if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language) - unset ($return[$key]); - } - return $return; - - } - - /** - * Answer an array of the RDF classes to which this resource belongs. - * If $direct is true, only answer those resources that are direct types of - * this resource, not the super-classes of the class etc. - * - * @param boolean $direct - * @return array Array of ResResources - * @access public - */ - function listRDFTypes($direct = true) - { - return $this->listProperty($this->vocabulary->TYPE()); - } - - /** - * Answer an array of all of the resources that are declared to - * provide addition information about this resource. - * - * @return array Array of ResResources - * @access public - */ - function listSeeAlso() - { - return $this->listProperty($this->vocabulary->SEE_ALSO()); - } - - /** - * Answer an array of values of a given RDF property for this resource as $returnType, or null - * if it doesn't have one. - * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' - * Default is 'ResResource' - * - * @param object ResResource $property - * @param string $returnType - * @return array of ResResources - * @access public - */ - function listProperty($property, $returnType = 'OntResource') - { - $return=array(); - $resArray = $this->listProperties($property); - foreach ($resArray as $statement) - { - switch ($returnType) - { - case 'OntClass': - $return[]=$this->model->createOntClass($statement->getLabelObject()); - break; - - case 'OntProperty': - $return[]=$this->model->createOntProperty($statement->getLabelObject()); - break; - - case 'Individual': - $return[]=$this->model->createIndividual($statement->getLabelObject()); - break; - - default: - $return[]=$statement->getObject(); - break; - } - } - return $return; - } - - /** - * Remove the statement that the given ResLiteral is a comment on this resource. - * Returns true, if a statement was removed - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function removeComment($resLiteral) - { - return $this->removeProperty($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Remove the statement that this resource is defined by the given resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeDefinedBy($resResource) - { - return $this->removeProperty($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Remove the statement that the given ResLiteral is a label on this resource. - * Returns true, if a statement was removed - * - * @param object ResLiteral $resLiteral - * @return boolean - * @access public - */ - function removeLabelProperty($resLiteral) - { - return $this->removeProperty($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Remove the specific property-value pair from this resource. - * - * @param object ResResource $property - * @param object ResResource $value - * @return boolean - * @access public - */ - function removeProperty($property, $value) - { - return $this->model->remove(new Statement($this,$property,$value)); - } - - /** - * Remove the statement that this resource is of the given RDF type. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeRDFType($resResource) - { - return $this->removeProperty($this->vocabulary->TYPE(),$resResource); - } - - /** - * Remove the statement indicating the given resource as a source of - * additional information about this resource. - * - * @param object ResResource $resResource - * @return boolean - * @access public - */ - function removeSeeAlso($resResource) - { - return $this->removeProperty($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Assert that the given string is the comment on this resource. - * Any existing statements for comment will be removed. - * - * @param object ResLiteral $resLiteral - * @access public - */ - function setComment($resLiteral) - { - $this->setPropertyValue($this->vocabulary->COMMENT(),$resLiteral); - } - - /** - * Assert that the given resource provides a source of definitions about this resource. - * Any existing statements for isDefinedBy will be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setIsDefinedBy($resResource) - { - $this->setPropertyValue($this->vocabulary->IS_DEFINED_BY(),$resResource); - } - - /** - * Assert that the given string is the label on this resource. - * Any existing statements for comment will be removed. - * - * @param object ResLiteral $resLiteral - * @access public - */ - function setLabelProperty($resLiteral) - { - $this->setPropertyValue($this->vocabulary->LABEL(),$resLiteral); - } - - /** - * Set the value of the given property of this ontology resource to the given value. - * Maintains the invariant that there is at most one value of the property for a - * given resource, so existing property values are first removed. - * To add multiple properties, use addProperty. - * - * @param object ResResource $property - * @param object ResResource $value - * @access public - */ - function setPropertyValue($property, $value) - { - $this->removeAll($property); - $this->addProperty($property,$value); - } - - /** - * Set the RDF type (ie the class) for this resource, - * replacing any existing rdf:type property. Any existing statements - * for the RDF type will first be removed. - * - * @param object ResResource $resResource - * @access public - */ - function setRDFType($resResource) - { - $this->setPropertyValue($this->vocabulary->TYPE(),$resResource); - } - - /** - * Add a resource that is declared to provided additional information - * about the definition of this resource - * - * @param object ResResource $resResource - * @access public - */ - function setSeeAlso($resResource) - { - $this->setPropertyValue($this->vocabulary->SEE_ALSO(),$resResource); - } - - /** - * Returns an array of ResResources that are recursively connected by $attribute - * in superProperty direction. - * If $onlyFindThisResResource is set to a ResResource, this function returns boolean - * if this distinct resource recursively is connected to the $startResource. - * - * @param object ResResource $startResource - * @param object ResResource $attribute - * @param array $attribute - * @param object ResResource $onlyFindThisResResource - * @return array OR boolean - * @access private - */ - function _getSuperAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false) - { - - $return = $startResource->listProperties($attribute); - - if ($onlyFindThisResResource) - { - foreach ($return as $statement) - { - if ($onlyFindThisResResource->equals($statement->getObject())) - return true; - } - } - - foreach ($return as $statement) - { - $attributeLabel=$statement->getLabelObject(); - if (!in_array($attributeLabel,$attributeIndex)) - { - $attributeIndex[]=$attributeLabel; - $subReturn = $this->_getSuperAttributeStatementsRec($statement->getObject(), $attribute, $attributeIndex, $onlyFindThisResResource); - } - } - if (isset($subReturn)) - { - if ($subReturn === true) - return true; - return array_merge($return,$subReturn); - } - - return $return; - } - - /** - * Returns an array of ResResources that are recursively connected by $attribute - * in subProperty direction. - * If $onlyFindThisResResource is set to a ResResource, this function returns boolean - * if this distinct resource recursively is connected to the $startResource. - * - * @param object ResResource $startResource - * @param object ResResource $attribute - * @param array $attribute - * @param object ResResource $onlyFindThisResResource - * @return array OR boolean - * @access private - */ - function _getSubAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false) - { - - $return = $this->model->find(null,$attribute,$startResource); - - if ($onlyFindThisResResource) - { - foreach ($return as $statement) - { - if ($onlyFindThisResResource->equals($statement->getSubject())) - return true; - } - } - - foreach ($return as $statement) - { - $attributeLabel=$statement->getLabelSubject(); - if (!in_array($attributeLabel,$attributeIndex)) - { - $attributeIndex[]=$attributeLabel; - $subReturn = $this->_getSubAttributeStatementsRec($statement->getSubject(), $attribute, $attributeIndex, $onlyFindThisResResource); - } - } - if (isset($subReturn)) - { - if ($subReturn === true) - return true; - return array_merge($return,$subReturn); - } - - return $return; - } - - /** - * Add a property to this resource. - * A statement with this resource as the subject, p as the predicate and o - * as the object is added to the model associated with this resource. - * If $this->rdfType is set, an additional statement about it's type - * is added. - * - * @param ResResource $property - * @param ResResource/ResLiteral $object - * @return object ResResource - * @access public - */ - function addProperty($property,$object) - { - if ($this->rdfType !== false) - if (!$this->hasRDFType($this->rdfType)) - $this->model->add(new Statement($this,$this->vocabulary->TYPE(),$this->rdfType)); - - return parent:: addProperty($property,$object); - } - - /** - * Sets the rdf:type, that this distinct resource is instance of. - * If this value is set, the ontModel will add an additional - * statement about this resource and the fiven rdf:type - * - * @param object ResResource $resResource - * @access public - */ - function setInstanceRdfType($resResource) - { - $this->rdfType = $resResource; - } - - /** - * returns the rdf:type, that this distinct resource is instance of. - * - * @return object ResResource $resResource - * @access public - */ - function getInstanceRdfType() - { - return $this->rdfType; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntVocabulary.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntVocabulary.php deleted file mode 100755 index 22e8ac86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/OntVocabulary.php +++ /dev/null @@ -1,25 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class OntVocabulary -{ - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/RdfsVocabulary.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/RdfsVocabulary.php deleted file mode 100755 index b0c4ff3d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/ontModel/RdfsVocabulary.php +++ /dev/null @@ -1,143 +0,0 @@ - -* -* -* @package ontModel -* @access public -**/ -class RdfsVocabulary extends OntVocabulary -{ - - /** - * Answer the resource that represents the class 'class' in this vocabulary. - * - * @return object ResResource - * @access public - */ - function ONTCLASS() - { - return new ResResource(RDF_SCHEMA_URI.RDFS_CLASS); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function DOMAIN() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN); - } - - - /** - * Answer the predicate that denotes comment annotation on an ontology element. - * - * @return object ResProperty - * @access public - */ - function COMMENT() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT); - } - - /** - * Answer the predicate that denotes isDefinedBy annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function IS_DEFINED_BY() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY); - } - - /** - * Answer the predicate that denotes label annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function LABEL() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL); - } - - /** - * Answer the predicate that denotes the domain of a property. - * - * @return object ResProperty - * @access public - */ - function RANGE() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE); - } - - /** - * Answer the predicate that denotes seeAlso annotation on an ontology element - * - * @return object ResProperty - * @access public - */ - function SEE_ALSO() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO); - } - - /** - * Answer the predicate that denotes that one class is a sub-class of another. - * - * @return object ResProperty - * @access public - */ - function SUB_CLASS_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF); - } - - /** - * Answer the predicate that denotes that one property is a sub-property of another. - * - * @return object ResProperty - * @access public - */ - function SUB_PROPERTY_OF() - { - return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF); - } - - /** - * Answer the string that is the namespace prefix for this vocabulary - * - * @return string - * @access public - */ - function NAMESPACE() - { - return RDF_SCHEMA_URI; - } - - /** - * Answer the predicate that denotes the rdf:type property. - * - * @return object ResProperty - * @access public - */ - function TYPE() - { - return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/all-wcprops deleted file mode 100755 index d048a41e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/all-wcprops +++ /dev/null @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 58 -/svnroot/rdfapi-php/!svn/ver/436/trunk/rdfapi-php/api/rdql -END -RdqlResultIterator.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/rdql/RdqlResultIterator.php -END -RdqlDbEngine.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/559/trunk/rdfapi-php/api/rdql/RdqlDbEngine.php -END -RdqlParser.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/282/trunk/rdfapi-php/api/rdql/RdqlParser.php -END -RDQL.php -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/rdql/RDQL.php -END -RdqlMemEngine.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/rdql/RdqlMemEngine.php -END -RdqlEngine.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/rdql/RdqlEngine.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/entries deleted file mode 100755 index 4c36cd16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/entries +++ /dev/null @@ -1,106 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/rdql -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-05-14T14:02:56.000000Z -436 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -RdqlResultIterator.php -file - - - - -2008-02-29T14:57:45.147546Z -2082617ae1572e2c8743d02da7471197 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -RdqlDbEngine.php -file -559 - - - -2008-02-29T15:21:35.971116Z -ef48aab131905e1d659302007a72ba23 -2008-02-29T15:21:35.565210Z -559 -cax -has-props - -RdqlParser.php -file - - - - -2008-02-29T14:57:45.163166Z -8758bf7cb75eb3d0f34c5663fb818ee3 -2006-06-08T06:25:14.000000Z -282 -tgauss -has-props - -RDQL.php -file - - - - -2008-02-29T14:57:45.178787Z -23ff8280200454e7df2c77e474713d57 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -RdqlMemEngine.php -file - - - - -2008-02-29T14:57:45.178787Z -bed653582ea03b7e46ffa37e34685114 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -RdqlEngine.php -file - - - - -2008-02-29T14:57:45.194408Z -d53f77256d1b05acc670e5af1d7a1773 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RDQL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RDQL.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RDQL.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlDbEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlDbEngine.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlDbEngine.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlEngine.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlEngine.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlMemEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlMemEngine.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlMemEngine.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlParser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlParser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlResultIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlResultIterator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/prop-base/RdqlResultIterator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RDQL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RDQL.php.svn-base deleted file mode 100755 index ae136f10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RDQL.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlDbEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlDbEngine.php.svn-base deleted file mode 100755 index f09086fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlDbEngine.php.svn-base +++ /dev/null @@ -1,506 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlDbEngine extends RdqlEngine { - - -/** - * Parsed query variables and constraints. - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][] = URI - * ['patterns'][]['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['numExpr']['vars'][] = ?VARNAME - * ( [] stands for an integer index - 0..N ) - * @access private - */ - var $parsedQuery; - - -/** - * When an RDQL query is performed on a DbModel, in first step the engine searches - * in database for triples matching the Rdql-WHERE clause. A recordSet is returned. - * $rsIndexes maps select and filter variables to their corresponding indexes - * in the returned recordSet. - * - * @var array [?VARNAME]['value'] = integer - * ['nType'] = integer - * ['l_lang'] = integer - * ['l_dtype'] = integer - * @access private - */ - var $rsIndexes; - - - /** - * Perform an RDQL Query on the given DbModel. - * - * @param object DbModel $dbModel - * @param array &$parsedQuery (the same format as $this->parsedQuery) - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * @access public - */ - function & queryModel(&$dbModel, &$parsedQuery, $returnNodes = TRUE) { - - $this->parsedQuery = &$parsedQuery; - - $sql = $this->generateSql($dbModel->modelID); - $recordSet =& $dbModel->dbConn->execute($sql); - $queryResult = $this->filterQueryResult($recordSet); - - if ($returnNodes) - $ret = $this->toNodes($queryResult); - else - $ret = $this->toString($queryResult); - return $ret; - } - - - /** - * Generate an SQL string to query the database for tuples matching all patterns - * of $parsedQuery. - * - * @param integer $modelID - * @return string - * @access private - */ - function generateSql($modelID) { - - $sql = $this->generateSql_SelectClause(); - $sql .= $this->generateSql_FromClause(); - $sql .= $this->generateSql_WhereClause($modelID); - return $sql; - } - - -/** - * Generate SQL SELECT clause. - * - * @return string - * @throws PHPError - * @access private - */ - function generateSql_SelectClause() { - - $sql_select = 'SELECT'; - $index = 0; - $this->rsIndexes = array(); - - foreach ($this->parsedQuery['selectVars'] as $var) - $sql_select .= $this->_generateSql_SelectVar($var, $index); - - if (isset($this->parsedQuery['filters'])) { - foreach ($this->parsedQuery['filters'] as $n => $filter) { - - // variables from numeric expressions - foreach ($filter['numExprVars'] as $numVar) - $sql_select .= $this->_generateSql_SelectVar($numVar, $index); - - // variables from regex equality expressions - foreach ($filter['regexEqExprs'] as $regexEqExpr) - $sql_select .= $this->_generateSql_SelectVar($regexEqExpr['var'], $index); - - // variables from string equality expressions - foreach ($filter['strEqExprs'] as $strEqVar) - $sql_select .= $this->_generateSql_SelectVar($strEqVar['var'], $index); - } - } - - return rtrim($sql_select, " , "); - } - - -/** - * Generate SQL FROM clause - * - * @return string - * @access private - */ - function generateSql_FromClause() { - - $sql_from = ' FROM'; - foreach ($this->parsedQuery['patterns'] as $n => $v) - $sql_from .= ' statements s' .($n+1) .' , '; - - return rtrim($sql_from, ' , '); - } - - -/** - * Generate an SQL WHERE clause - * - * @param integer $modelID - * @return string - * @access private - */ - function generateSql_WhereClause($modelID) { - - $sql_where = ' WHERE'; - $count_patterns = count($this->parsedQuery['patterns']); - foreach ($this->parsedQuery['patterns'] as $n => $pattern) { - $sql_where .= ' s' .($n+1) .'.modelID=' .$modelID .' AND'; - foreach ($pattern as $key => $val_1) - if ($val_1['value'] && $val_1['value']{0}=='?') { - $sql_tmp = ' s' .($n+1) .'.' .$key .'='; - // find internal bindings - switch ($key) { - case 'subject': - if ($pattern['subject']['value'] == $pattern['predicate']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.predicate AND'; - elseif ($pattern['subject']['value'] == $pattern['object']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND'; - break; - case 'predicate': - if ($pattern['predicate']['value'] == $pattern['object']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND'; - } - // find external bindings - for ($i=$n+1; $i<$count_patterns; $i++) - foreach ($this->parsedQuery['patterns'][$i] as $key2 => $val_2) - if ($val_1['value']==$val_2['value']) { - $sql_where .= $sql_tmp .'s' .($i+1) .'.' .$key2 .' AND'; - break 2; - } - }else { - $sql_where .= ' s' .($n+1) .'.' .$key ."='" .$val_1['value'] ."' AND"; - if ($key == 'object' && isset($val_1['is_literal'])) { - $sql_where .= ' s' .($n+1) .".object_is='l' AND"; - $sql_where .= ' s' .($n+1) .".l_datatype='" .$val_1['l_dtype'] ."' AND"; - $sql_where .= ' s' .($n+1) .".l_language='" .$val_1['l_lang'] ."' AND"; - } - } - } - return rtrim($sql_where, ' AND'); - } - - -/** - * Filter tuples containing variables matching all patterns from the WHERE clause - * of an RDQL query. As a result of a database query using ADOdb these tuples - * are returned as an ADORecordSet object, which is then passed to this function. - * - * @param object ADORecordSet &$recordSet - * @return array [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @access private - */ - function filterQueryResult(&$recordSet) { - $queryResult=array(); - - if (isset($this->parsedQuery['filters'])) { - - while (!$recordSet->EOF) { - - foreach ($this->parsedQuery['filters'] as $filter) { - - $evalFilterStr = $filter['evalFilterStr']; - - // evaluate regex equality expressions of each filter - foreach ($filter['regexEqExprs'] as $i => $expr) { - preg_match($expr['regex'], $recordSet->fields[$this->rsIndexes[$expr['var']]['value']], $match); - $op = substr($expr['operator'], 0,1); - if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0]))) - $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr); - else - $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr); - } - - // evaluate string equality expressions - foreach ($filter['strEqExprs'] as $i => $expr) { - - $exprBoolVal = 'FALSE'; - - switch ($expr['value_type']) { - - case 'variable': - if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] == - $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] && - $expr['operator'] == 'eq') || - ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] != - $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] && - $expr['operator'] == 'ne')) - - $exprBoolVal = 'TRUE'; - break; - - case 'URI': - - if (isset($this->rsIndexes[$expr['var']]['nType']) && - $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] == 'l') { - - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] == - $expr['value'] && $expr['operator'] == 'eq') || - ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] != - $expr['value'] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'Literal': - - if (!isset($this->rsIndexes[$expr['var']]['nType']) || - $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] != 'l') { - - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - $filterLiteral= new Literal($expr['value'],$expr['value_lang']); - $filterLiteral->setDatatype($expr['value_dtype']); - - $resultLiteral=new Literal($recordSet->fields[$this->rsIndexes[$expr['var']]['value']]); - $resultLiteral->setDatatype($recordSet->fields[$this->rsIndexes[$expr['var']]['l_dtype']]); - $resultLiteral->setLanguage($recordSet->fields[$this->rsIndexes[$expr['var']]['l_lang']]); - - $equal=$resultLiteral->equals($filterLiteral); - - if (($equal && $expr['operator'] == 'eq') || - (!$equal && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - else - $exprBoolVal = 'FALSE'; - - } - - $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr); - } - - // evaluate numerical expressions - foreach ($filter['numExprVars'] as $varName) { - $varValue = "'" .$recordSet->fields[$this->rsIndexes[$varName]['value']] ."'"; - $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr); - } - - eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;"); - if (!isset($eval_filter_ok)) - trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR); - - if (!$filterBoolVal) { - $recordSet->MoveNext(); - continue 2; - } - - } - $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields); - $recordSet->MoveNext(); - } - - }else - while (!$recordSet->EOF) { - $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields); - $recordSet->MoveNext(); - } - return $queryResult; - } - - -/** - * Serialize variable values of $queryResult to string. - * - * @param array &$queryResult [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = string - * @access private - */ - function toString(&$queryResult) { - - // if a result set is empty return only variable sames - if (count($queryResult) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $res[0][$selectVar] = NULL; - return $res; - } - - $res = array(); - foreach ($queryResult as $n => $var) - foreach ($var as $varname => $varProperties) - if ($varProperties['nType'] == 'r' || $varProperties['nType'] == 'b') - $res[$n][$varname] = '<' .$varProperties['value'] .'>'; - else { - $res[$n][$varname] = '"' .$varProperties['value'] .'"'; - if ($varProperties['l_lang'] != NULL) - $res[$n][$varname] .= ' (xml:lang="' .$varProperties['l_lang'] .'")'; - if ($varProperties['l_dtype'] != NULL) - $res[$n][$varname] .= ' (rdf:datatype="' .$varProperties['l_dtype'] .'")'; - } - return $res; - } - - -/** - * Convert variable values of $queryResult to objects (Node). - * - * @param array &$queryResult [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = object Node - * @access private - */ - function toNodes(&$queryResult) { - - // if a result set is empty return only variable sames - if (count($queryResult) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $res[0][$selectVar] = NULL; - return $res; - } - - $res = array(); - foreach ($queryResult as $n => $var) - foreach ($var as $varname => $varProperties) - if ($varProperties['nType'] == 'r') - $res[$n][$varname] = new Resource($varProperties['value']); - elseif ($varProperties['nType'] == 'b') - $res[$n][$varname] = new BlankNode($varProperties['value']); - else { - $res[$n][$varname] = new Literal($varProperties['value'], $varProperties['l_lang']); - if ($varProperties['l_dtype'] != NULL) - $res[$n][$varname]->setDataType($varProperties['l_dtype']); - } - return $res; - } - - -/** - * Generate a piece of an sql select statement for a variable. - * Look first if the given variable is defined as a pattern object. - * (So you can select the node type, literal lang and dtype) - * If not found - look for subjects and select node label and type. - * If there is no result either go to predicates. - * Predicates are always resources therefore select only the node label. - * - * @param string $varName - * @return string - * @access private - */ -function _generateSql_SelectVar ($varName, &$index) { - - $sql_select = ''; - - if (array_key_exists($varName, $this->rsIndexes)) - return NULL; - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['object']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".object as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - // select the node type - $sql_select .= " s" .$n .".object_is , "; - $this->rsIndexes[$varName]['nType'] = $index++; - // select the object language - $sql_select .= " s" .$n .".l_language , "; - $this->rsIndexes[$varName]['l_lang'] = $index++; - // select the object dtype - $sql_select .= " s" .$n .".l_datatype , "; - $this->rsIndexes[$varName]['l_dtype'] = $index++; - - return $sql_select; - } - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['subject']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".subject as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - // select the node type - $sql_select .= " s" .$n .".subject_is , "; - $this->rsIndexes[$varName]['nType'] = $index++; - - return $sql_select; - } - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['predicate']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".predicate as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - - return $sql_select; - } - } - - -/** - * Converts a single row of ADORecordSet->fields array to the format of - * $queryResult array using pointers to indexes ($this->rsIndexes) in RecordSet->fields. - * - * @param array &$record [] = string - * @return array [?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @access private - */ - function _convertRsRowToQueryResultRow(&$record) { - - // return only select variables (without conditional variables from the AND clause) - foreach ($this->parsedQuery['selectVars'] as $selectVar) { - $resultRow[$selectVar]['value'] = $record[$this->rsIndexes[$selectVar]['value']]; - if (isset($this->rsIndexes[$selectVar]['nType'])) - $resultRow[$selectVar]['nType'] = $record[$this->rsIndexes[$selectVar]['nType']]; - // is a predicate then - else - $resultRow[$selectVar]['nType'] = 'r'; - - if ($resultRow[$selectVar]['nType'] == 'l') { - $resultRow[$selectVar]['l_lang'] = $record[$this->rsIndexes[$selectVar]['l_lang']]; - $resultRow[$selectVar]['l_dtype'] = $record[$this->rsIndexes[$selectVar]['l_dtype']]; - } - } - return $resultRow; - } - -} // end: Class RdqlDbEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlEngine.php.svn-base deleted file mode 100755 index 950238ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlEngine.php.svn-base +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlEngine extends Object{ - - - -/** - * Prints a query result as HTML table. - * You can change the colors in the configuration file. - * - * @param array $queryResult [][?VARNAME] = object Node - * @access private - */ - function writeQueryResultAsHtmlTable($queryResult) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - if (current($queryResult[0]) == NULL) { - echo 'no match
'; - return; - } - - echo ''; - foreach ($queryResult[0] as $varName => $value) - echo ""; - echo ''; - - foreach ($queryResult as $n => $var) { - - - echo ''; - foreach ($var as $varName => $value) { - echo INDENTATION . INDENTATION . ''; - } - echo '
No.$varName
' .($n + 1) .'.'; - echo '

'; - - $lang = NULL; - $dtype = NULL; - if (is_a($value, 'Literal')) { - if ($value->getLanguage() != NULL) - $lang = ' (xml:lang="' . $value->getLanguage() . '") '; - if ($value->getDatatype() != NULL) - $dtype = ' (rdf:datatype="' . $value->getDatatype() . '") '; - } - echo RDFUtil::getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'

'; - } - echo '
'; - } - -} // end: Class RdqlEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlMemEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlMemEngine.php.svn-base deleted file mode 100755 index b3b86201..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlMemEngine.php.svn-base +++ /dev/null @@ -1,555 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlMemEngine extends RdqlEngine { - - -/** - * Parsed query variables and constraints. - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][] = URI - * ['patterns'][]['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['numExpr']['vars'][] = ?VARNAME - * ( [] stands for an integer index - 0..N ) - * @access private - */ - var $parsedQuery; - - - /** - * Perform an RDQL Query on the given MemModel. - * - * @param object MemModel &$memModel - * @param array &$parsedQuery (the same format as $this->parsedQuery) - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - * @access public - */ - function & queryModel(&$memModel, &$parsedQuery, $returnNodes = TRUE) { - - $this->parsedQuery = $parsedQuery; - - // find tuples matching all patterns - $res = $this->findTuplesMatchingAllPatterns($memModel); - - // filter tuples - if (isset($parsedQuery['filters'])) - $res = $this->filterTuples($res); - - // select variables to be returned - $res = $this->selectVariables($res); - - if(!$returnNodes) - return $this->toString($res); - - return $res; - } - - - /** - * Find triples matching all patterns of an RDQL query and return an array - * with variables from all patterns and their corresponding values. - * The variable values returned are instances of object Node. - * - * @param object MemModel &$memModel - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function findTuplesMatchingAllPatterns(&$memModel) { - - $resultSet = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][0]); - for ($i=1; $iparsedQuery['patterns']); $i++) { - $rs = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][$i]); - $resultSet = $this->joinTuples($resultSet, $rs); - } - return $resultSet; - } - - -/** - * Find tuples matching one pattern and return an array with pattern - * variables and their corresponding values (instances of object Node). - * - * @param object MemModel &$memModel - * @param array &$pattern ['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function findTuplesMatchingOnePattern(&$memModel, &$pattern) { - - $resultSet = array(); - $i = 0; - // parameters to be passed to the method findTriplesMatchingPattern - foreach ($pattern as $key => $v) { - if ($v['value'] && $v['value']{0} == '?') { - if ($key == 'object') { - $param['object']['is_a'] = 'ANY'; - $param['object']['string'] = 'ANY'; - $param['object']['lang'] = NULL; - $param['object']['dtype'] = NULL; - } else - $param[$key] = 'ANY'; - $var[$i]['key'] = $key; - $var[$i++]['val'] = $v['value']; - }else - if (isset($v['is_literal'])) { - $param[$key]['is_a'] = 'Literal'; - $param[$key]['string'] = $v['value']; - $param[$key]['lang'] = $v['l_lang']; - $param[$key]['dtype'] = $v['l_dtype']; - }else{ - if ($key == 'object') { - $param[$key]['is_a'] = 'Resource'; - $param[$key]['string'] = $v['value']; - $param[$key]['lang'] = NULL; - $param[$key]['dtype'] = NULL; - }else - $param[$key] = $v['value']; - } - } - - // find pattern internal bindings e.g. (?x, ?z, ?x) - $intBindings = NULL; - for ($i=0; $i $v) - if ($i != $n && $var[$i]['val'] == $v['val']) - $intBindings[] = $var[$i]['key']; - - // find triples of the $memModel matching $pattern - $resModel = $this->findTriplesMatchingPattern($memModel, $param['subject'], - $param['predicate'], - $param['object']['is_a'], - $param['object']['string'], - $param['object']['lang'], - $param['object']['dtype'], - $intBindings); - - // set values of the pattern variables to be returned - if ($pattern['subject']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['subject']['value']] = $triple->subj; - } - if ($pattern['predicate']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['predicate']['value']] = $triple->pred; - } - if ($pattern['object']['value'] && $pattern['object']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['object']['value']] = $triple->obj; - } - return $resultSet; - } - - -/** - * Search in $memModel for triples matching one pattern from the WHERE clause. - * 'ANY' input for $subjLabel..$objLabel, $obj_is will match anything. - * NULL input for $objDtype will only match obj->dtype = NULL - * NULL input for $objLanguage will match obj->lang = NULL or anything if a - * literal is datatyped (except for XMLLiterals and plain literals) - * This method also checks internal bindings if provided. - * - * @param object MemModel $memModel - * @param string $subjLabel - * @param string $predLabel - * @param string $objLabel - * @param string $obj_is - * @param string $objLanguage - * @param string $objDtype - * @param array $intBindings [] = string - * @return object MemModel - * @access private - */ - function findTriplesMatchingPattern(&$memModel, $subjLabel, $predLabel, $obj_is, - $objLabel, $objLang, $objDtype, &$intBindings) { - - $res = new MemModel(); - - if($memModel->isEmpty()) - return $res; - - if ($subjLabel=='ANY') - { - $subj=NULL; - } else - { - $subj=new Resource($subjLabel); - }; - if ($predLabel=='ANY') - { - $pred=NULL; - } else - { - $pred=new Resource($predLabel); - }; - - if ($objLabel=='ANY') - { - $obj=NULL; - } else - { - if ($obj_is == 'Literal') - { - $obj=new Literal($objLabel); - $obj->setDatatype($objDtype); - $obj->setLanguage($objLang); - } else { - $obj=new Resource($objLabel); - } - }; - - $res=$memModel->find($subj,$pred,$obj); - - if ($intBindings) - foreach ($res->triples as $triple) - { - if (!$this->_checkIntBindings($triple, $intBindings)) - { - $res->remove($triple); - } - } - - return $res; -} - - -/** - * Perform an SQL-like inner join on two resultSets. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @param array &$res [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function joinTuples(&$finalRes, &$res) { - - if (count($finalRes) == 0 || count($res) == 0) - return array(); - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - foreach ($res[0] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])) - $jointVars[] = $varname; - else - $newVars[] = $varname; - } - - // eliminate rows of $finalRes in which the values of $jointVars do not have - // a corresponding row in $res. - foreach ($finalRes as $n => $fRes) { - foreach ($res as $i => $r) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) - break; - } - if (!$ok) - unset($finalRes[$n]); - } - - // join $res and $finalRes - $joinedRes = array(); - foreach ($res as $i => $r) { - foreach ($finalRes as $n => $fRes) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) { - $joinedRow = $finalRes[$n]; - foreach($newVars as $n_varname) - $joinedRow[$n_varname] = $r[$n_varname]; - $joinedRes[] = $joinedRow; - } - } - } - - return $joinedRes; - } - - -/** - * Filter the result-set of query variables by evaluating each filter from the - * AND clause of the RDQL query. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * @access private - */ - function filterTuples(&$finalRes) { - - foreach ($this->parsedQuery['filters'] as $filter) { - - foreach ($finalRes as $n => $fRes) { - $evalFilterStr = $filter['evalFilterStr']; - - // evaluate regex equality expressions of each filter - foreach ($filter['regexEqExprs'] as $i => $expr) { - - preg_match($expr['regex'], $fRes[$expr['var']]->getLabel(), $match); - $op = substr($expr['operator'], 0,1); - if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0]))) - $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr); - else - $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr); - - } - - // evaluate string equality expressions - foreach ($filter['strEqExprs'] as $i => $expr) { - - $exprBoolVal = 'FALSE'; - - switch ($expr['value_type']) { - - case 'variable': - if (($fRes[$expr['var']] == $fRes[$expr['value']] && $expr['operator'] == 'eq') || - ($fRes[$expr['var']] != $fRes[$expr['value']] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'URI': - - if (is_a($fRes[$expr['var']], 'Literal')) { - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - if (($fRes[$expr['var']]->getLabel() == $expr['value'] && $expr['operator'] == 'eq') || - ($fRes[$expr['var']]->getLabel() != $expr['value'] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'Literal': - - if (!is_a($fRes[$expr['var']], 'Literal')) { - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - $filterLiteral= new Literal($expr['value'],$expr['value_lang']); - $filterLiteral->setDatatype($expr['value_dtype']); - - $equal=$fRes[$expr['var']]->equals($filterLiteral); -/* if ($fRes[$expr['var']]->getLabel() == $expr['value'] && - $fRes[$expr['var']]->getDatatype() == $expr['value_dtype']) { - - $equal = TRUE; - - // Lang tags only differentiate literals in rdf:XMLLiterals and plain literals. - // Therefore if a literal is datatyped ignore the language tag. - if ((($expr['value_dtype'] == NULL) || - ($expr['value_dtype'] == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') || - ($expr['value_dtype'] == 'http://www.w3.org/2001/XMLSchema#string')) && - (($fRes[$expr['var']]->getLanguage() != $expr['value_lang']))) - - $equal = FALSE; - }else - $equal = FALSE; - */ - if (($equal && $expr['operator'] == 'eq') || - (!$equal && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - else - $exprBoolVal = 'FALSE'; - - } - $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr); - } - - // evaluate numerical expressions - foreach ($filter['numExprVars'] as $varName) { - $varValue = "'" .$fRes[$varName]->getLabel() ."'"; - $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr); - } - - eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;"); - if (!isset($eval_filter_ok)) - trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR); - - if (!$filterBoolVal) - unset($finalRes[$n]); - } - } - - return $finalRes; - } - - -/** - * Remove all conditional variables from the result-set and leave only variables - * specified in the SELECT clause of the RDQL query. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * @access private - */ - function selectVariables(&$finalRes) { - - // if nothing has been found return only one row of $finalRes - // with select variables having empty values - if (count($finalRes) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $finalRes[0][$selectVar] = NULL; - return $finalRes; - } - - // return only selectVars in the same order as given in the RDQL query - // and reindex $finalRes. - $n = 0; - foreach($finalRes as $key => $val) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $resultSet[$n][$selectVar] = $val[$selectVar]; - unset($finalRes[$key]); - ++$n; - } - - return $resultSet; - } - - -/** - * Convert the variable values of $finalRes from objects to their string serialization. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = string - * @access private - */ - function toString(&$finalRes) { - - foreach ($finalRes as $n => $tuple) - foreach ($tuple as $varname => $node) { - if (is_a($node, 'Resource')) - $res[$n][$varname] = '<' .$node->getLabel() .'>'; - elseif (is_a($node, 'Literal')) { - $res[$n][$varname] = '"' .$node->getLabel() .'"'; - if ($node->getLanguage()) - $res[$n][$varname] .= ' (xml:lang="' .$node->getLanguage() .'")'; - if ($node->getDatatype()) - $res[$n][$varname] .= ' (rdf:datatype="' .$node->getDatatype() .'")'; - }else - $res[$n][$varname] = $node; - } - return $res; - } - - -/** - * Check if the given triple meets pattern internal bindings - * e.g. (?x, ?z, ?x) ==> statement subject must be identical with the statement object - * - * @param object statement &$triple - * @param array &$intBindings [] = string - * @return boolean - * @access private - */ - function _checkIntBindings (&$triple, &$intBindings) { - - if (in_array('subject', $intBindings)) { - if (in_array('predicate', $intBindings)) - if ($triple->subj != $triple->pred) - return FALSE; - if (in_array('object', $intBindings)) { - if (is_a($triple->obj, 'Literal')) - return FALSE; - elseif ($triple->subj != $triple->obj) - return FALSE; - } - return TRUE; - } - if (in_array('predicate', $intBindings)) { - if (is_a($triple->obj, 'Literal')) - return FALSE; - elseif ($triple->pred != $triple->obj) - return FALSE; - return TRUE; - } - } - - -/** - * Check if the lang and dtype of the passed object Literal are equal $lang and $dtype - * !!! Language only differentiates literals in rdf:XMLLiterals and plain literals (xsd:string). - * !!! Therefore if a literal is datatyped ignore the language. - * - * @param object Literal $literal - * @param string $dtype1 - * @param string $dtype2 - * @return boolean - * @access private - */ - function _equalsLangDtype ($literal, $lang, $dtype) { - - if ($dtype == $literal->getDatatype()) { - if (($dtype == NULL || - $dtype == 'http://www.w3.org/2001/XMLSchema#string' || - $dtype == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') && - ($lang != $literal->getLanguage())) - return FALSE; - return TRUE; - } - return FALSE; - } - - -} // end: Class RdqlMemEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlParser.php.svn-base deleted file mode 100755 index 3403966a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlParser.php.svn-base +++ /dev/null @@ -1,1063 +0,0 @@ - - * - * @package rdql - * @access public - */ - - -Class RdqlParser extends Object{ - -/** - * Parsed query variables and constraints. - * { } are only used within the parser class and are not returned as parsed query. - * ( [] stands for an integer index - 0..N ) - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][]{['value']} = URI | QName - * {['is_qname'] = boolean} - * ['patterns'][]['subject']['value'] = VARorURI - * {['is_qname'] = boolean} - * ['predicate']['value'] = VARorURI - * {['is_qname'] = boolean} - * ['object']['value'] = VARorURIorLiterl - * {['is_qname'] = boolean} - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * {['l_dtype_is_qname'] = boolean} - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * {['value_dtype_is_qname'] = boolean} - * ['numExpr']['vars'][] = ?VARNAME - * {['ns'][PREFIX] = NAMESPACE} - * @access private - */ - var $parsedQuery; - - -/** - * Query string divided into a sequence of tokens. - * A token is either: ' ' or "\n" or "\r" or "\t" or ',' or '(' or ')' - * or a string containing any characters except from the above. - * - * @var array - * @access private - */ - var $tokens; - - -/** - * Parse the given RDQL query string and return an array with query variables and constraints. - * - * @param string $queryString - * @return array $this->parsedQuery - * @access public - */ - function & parseQuery($queryString) { - - $cleanQueryString = $this->removeComments($queryString); - $this->tokenize($cleanQueryString); - $this->startParsing(); - if ($this->parsedQuery['selectVars'][0] == '*') - $this->parsedQuery['selectVars'] = $this->findAllQueryVariables(); - else - $this->_checkSelectVars(); - $this->replaceNamespacePrefixes(); - - return $this->parsedQuery; - } - - -/** - * Remove comments from the passed query string. - * - * @param string $query - * @return string - * @throws PHPError - * @access private - */ - function removeComments($query) { - - $last = strlen($query)-1; - $query .= ' '; - $clean = ''; - for ($i=0; $i<=$last; $i++) { - // don't search for comments inside a 'literal'@lang^^dtype or "literal"@lang^^dtype - if ($query{$i} == "'" || $query{$i} == '"') { - $quotMark = $query{$i}; - do - $clean .= $query{$i++}; - while($i < $last && $query{$i} != $quotMark); - $clean .= $query{$i}; - // language - if ($query{$i+1} == '@') { - do{ - if ($query{$i+1} == '^' && $query{$i+2} == '^') - break; - $clean .= $query{++$i}; - }while ($i < $last && $query{$i} != ' ' && $query{$i} != "\t" - && $query{$i} != "\n" && $query{$i} != "\r"); - } - // datatype - if ($query{$i+1} == '^' && $query{$i+2} == '^') { - do - $clean .= $query{++$i}; - while ($i < $last && $query{$i} != ' ' && $query{$i} != "\t" - && $query{$i} != "\n" && $query{$i} != "\r" ); - } - // don't search for comments inside an either - }elseif ($query{$i} == '<') { - do{ - $clean .= $query{$i++}; - }while($i < $last && $query{$i} != '>'); - $clean .= $query{$i}; - }elseif ($query{$i} == '/') { - // clear: // comment - if ($i < $last && $query{$i+1} == '/') { - while($i < $last && $query{$i} != "\n" && $query{$i} != "\r") - ++$i; - $clean .= ' '; - // clear: /*comment*/ - }elseif ($i < $last-2 && $query{$i+1} == '*') { - $i += 2; - while($i < $last && ($query{$i} != '*' || $query{$i+1} != '/')) - ++$i; - if ($i >= $last && ($query{$last-1} != '*' || $query{$last} != '/')) - trigger_error(RDQL_SYN_ERR .": unterminated comment - '*/' missing", E_USER_ERROR); - ++$i; - }else - $clean .= $query{$i}; - }else - $clean .= $query{$i}; - } - return $clean; - } - - -/** - * Divide the query string into tokens. - * A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')' - * or a string containing any character except from the above. - * - * @param string $queryString - * @access private - */ - function tokenize($queryString) { - - $queryString = trim($queryString, " \r\n\t"); - $specialChars = array (" ", "\t", "\r", "\n", ",", "(", ")"); - $len = strlen($queryString); - $this->tokens[0]=''; - $n = 0; - - for ($i=0; $i<$len; ++$i) { - if (!in_array($queryString{$i}, $specialChars)) - $this->tokens[$n] .= $queryString{$i}; - else { - if ($this->tokens[$n] != '') - ++$n; - $this->tokens[$n] = $queryString{$i}; - $this->tokens[++$n] = ''; - } - } - } - - -/** - * Start parsing of the tokenized query string. - * - * @access private - */ - function startParsing() { - - $this->parseSelect(); - } - - -/** - * Parse the SELECT clause of an Rdql query. - * When the parsing of the SELECT clause is finished, this method will call - * a suitable method to parse the subsequent clause. - * - * @throws PhpError - * @access private - */ - function parseSelect() { - - $this->_clearWhiteSpaces(); - - // Check if the queryString contains a "SELECT" token - if (strcasecmp('SELECT', current($this->tokens))) - trigger_error(RDQL_SEL_ERR ."'" .current($this->tokens) - ."' - SELECT keyword expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - // Parse SELECT * - if (current($this->tokens) == '*') { - unset($this->tokens[key($this->tokens)]); - $this->parsedQuery['selectVars'][0] = '*'; - $this->_clearWhiteSpaces(); - if (strcasecmp('FROM', current($this->tokens)) - && strcasecmp('SOURCE', current($this->tokens)) - && strcasecmp('WHERE', current($this->tokens))) - trigger_error(RDQL_SYN_ERR .": '" .htmlspecialchars(current($this->tokens)) - ."' - SOURCE or WHERE clause expected", E_USER_ERROR); - } - - // Parse SELECT ?Var (, ?Var)* - $commaExpected = FALSE; - $comma = FALSE; - while (current($this->tokens) != NULL) { - $k = key($this->tokens); - $token = $this->tokens[$k]; - - switch ($token) { - case ',': if (!$commaExpected) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - $comma = TRUE; - $commaExpected = FALSE; - break; - case '(': - case ')': trigger_error(RDQL_SEL_ERR ." '$token' - illegal input", E_USER_ERROR); - break; - default : - if (!strcasecmp('FROM', $token) || !strcasecmp('SOURCE', $token)) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[$k]); - return $this->parseFrom(); - }elseif (!strcasecmp('WHERE', $token) && !$comma) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[$k]); - return $this->parseWhere(); - } - if ($token{0} == '?') { - $this->parsedQuery['selectVars'][] = $this->_validateVar($token, RDQL_SEL_ERR); - $commaExpected = TRUE; - $comma = FALSE; - }else - trigger_error(RDQL_SEL_ERR ." '$token' - '?' missing", E_USER_ERROR); - } - unset($this->tokens[$k]); - $this->_clearWhiteSpaces(); - } - trigger_error(RDQL_SYN_ERR . ': WHERE clause missing', E_USER_ERROR); - } - - -/** - * Parse the FROM/SOURCES clause of an Rdql query - * When the parsing of this clause is finished, parseWhere() will be called. - * - * @throws PhpError - * @access private - */ - function parseFrom() { - - $comma = FALSE; - $commaExpected = FALSE; - $i = -1; - while (current($this->tokens) != NULL) { - - $this->_clearWhiteSpaces(); - if (!strcasecmp('WHERE', current($this->tokens)) && count($this->parsedQuery['sources']) != 0) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseWhere(); - } - if (current($this->tokens) == ',') { - if ($commaExpected) { - $comma = TRUE; - $commaExpected = FALSE; - unset($this->tokens[key($this->tokens)]); - }else - trigger_error(RDQL_SRC_ERR ."',' - unecpected comma", E_USER_ERROR); - }else{ - $token = current($this->tokens); - $this->parsedQuery['sources'][++$i]['value'] = $this->_validateURI($token, RDQL_SRC_ERR); - if ($token{0} != '<') - $this->parsedQuery['sources'][$i]['is_qname'] = TRUE; - $commaExpected = TRUE; - $comma = FALSE; - } - } - trigger_error(RDQL_SYN_ERR .': WHERE clause missing', E_USER_ERROR); - } - - -/**' - * Parse the WHERE clause of an Rdql query. - * When the parsing of the WHERE clause is finished, this method will call - * a suitable method to parse the subsequent clause if provided. - * - * @throws PhpError - * @access private - */ - function parseWhere() { - - $comma = FALSE; - $commaExpected = FALSE; - $i=0; - - do { - $this->_clearWhiteSpaces(); - if (!strcasecmp('AND', current($this->tokens)) - && count($this->parsedQuery['patterns']) != 0){ - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseAnd(); - }elseif (!strcasecmp('USING', current($this->tokens)) - && count($this->parsedQuery['patterns']) != 0) { - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseUsing(); - } - - if (current($this->tokens) == ',') { - $comma = TRUE; - $this->_checkComma($commaExpected, RDQL_WHR_ERR); - - }else{ - - if (current($this->tokens) != '(') - trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens) - ."' - '(' expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - $this->parsedQuery['patterns'][$i]['subject'] = $this->_validateVarUri(current($this->tokens)); - $this->_checkComma(TRUE, RDQL_WHR_ERR); - $this->parsedQuery['patterns'][$i]['predicate'] = $this->_validateVarUri(current($this->tokens)); - $this->_checkComma(TRUE, RDQL_WHR_ERR); - $this->parsedQuery['patterns'][$i++]['object'] = $this->_validateVarUriLiteral(current($this->tokens)); - $this->_clearWhiteSpaces(); - - if (current($this->tokens) != ')') - trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens) ."' - ')' expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - $commaExpected = TRUE; - $comma = FALSE; - } - }while(current($this->tokens) != NULL); - - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - } - - -/** - * Parse the AND clause of an Rdql query - * - * @throws PhpError - * @access private - * @todo clear comments - */ - function parseAnd() { - - $this->_clearWhiteSpaces(); - $n = 0; - $filterStr = ''; - - while(current($this->tokens) != NULL) { - $k = key($this->tokens); - $token = $this->tokens[$k]; - - if (!strcasecmp('USING', $token)) { - $this->parseFilter($n, $filterStr); - unset($this->tokens[$k]); - return $this->parseUsing(); - }elseif ($token == ',') { - $this->parseFilter($n, $filterStr); - $filterStr = ''; - $token = ''; - ++$n; - } - $filterStr .= $token; - unset($this->tokens[$k]); - } - $this->parseFilter($n, $filterStr); - } - - -/** - * Parse the USING clause of an Rdql query - * - * @throws PhpError - * @access private - */ - function parseUsing() { - - $commaExpected = FALSE; - $comma = FALSE; - - do { - $this->_clearWhiteSpaces(); - if (current($this->tokens) == ',') { - $comma = TRUE; - $this->_checkComma($commaExpected, RDQL_USG_ERR); - }else{ - $prefix = $this->_validatePrefix(current($this->tokens)); - $this->_clearWhiteSpaces(); - - if (strcasecmp('FOR', current($this->tokens))) - trigger_error(RDQL_USG_ERR ." keyword: 'FOR' missing in the namespace declaration: '", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - $this->parsedQuery['ns'][$prefix] = $this->_validateUri(current($this->tokens), RDQL_USG_ERR); - $this->_clearWhiteSpaces(); - $commaExpected = TRUE; - $comma = FALSE; - } - }while(current($this->tokens) != NULL); - - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - } - - -/** - * Check if a filter from the AND clause contains an equal number of '(' and ')' - * and parse filter expressions. - * - * @param integer $n - * @param string $filter - * @throws PHPError - * @access private - */ - function parseFilter($n, $filter) { - - if ($filter == NULL) - trigger_error(RDQL_AND_ERR ." ',' - unexpected comma", E_USER_ERROR); - $paren = substr_count($filter, '(') - substr_count($filter, ')'); - if ($paren != 0) { - if ($paren > 0) - $errorMsg = "'" .htmlspecialchars($filter) ."' - ')' missing "; - elseif ($paren < 0) - $errorMsg = "'" .htmlspecialchars($filter) ."' - too many ')' "; - trigger_error(RDQL_AND_ERR .$errorMsg, E_USER_ERROR); - } - - $this->parsedQuery['filters'][$n] = $this->parseExpressions($filter); - } - - -/** - * Parse expressions inside the passed filter: - * 1) regex equality expressions: ?var [~~ | =~ | !~ ] REG_EX - * 2a) string equality expressions: ?var [eq | ne] "literal"@lang^^dtype. - * 2b) string equality expressions: ?var [eq | ne] or ?var [eq | ne] prefix:local_name - * 3) numerical expressions: e.q. (?var1 - ?var2)*4 >= 20 - * - * In cases 1-2 parse each expression of the given filter into an array of variables. - * For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr. - * The RDQLengine will then replace each place holder with the outcomming boolean value - * of the corresponding expression. - * The remaining filterStr contains only numerical expressions and place holders. - * - * @param string $filteStr - * @return array ['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'QName'| 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['value_dtype_is_qname'] = boolean - * ['numExpr']['vars'][] = ?VARNAME - * @access private - */ - function parseExpressions($filterStr) { - - $parsedFilter['string'] = $filterStr; - $parsedFilter['regexEqExprs'] = array(); - $parsedFilter['strEqExprs'] = array(); - $parsedFilter['numExprVars'] = array(); - - // parse regex string equality expressions, e.g. ?x ~~ !//foo.com/r!i - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+([~!=]~)\s+(['|\"])?([^\s'\"]+)(['|\"])?/"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $this->_checkRegExQuotation($filterStr, $eqExprs[3][$i], $eqExprs[5][$i]); - $parsedFilter['regexEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['regexEqExprs'][$i]['operator'] = $eqExprs[2][$i]; - $parsedFilter['regexEqExprs'][$i]['regex'] = $eqExprs[4][$i]; - - $filterStr = str_replace($eqExpr, " ##RegEx_$i## ", $filterStr); - } - - // parse ?var [eq | ne] "literal"@lang^^dtype - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\'[^\']*\'|\"[^\"]*\")"; - $reg_ex .= "(@[a-zA-Z]+)?(\^{2}\S+:?\S+)?/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]);# - $parsedFilter['strEqExprs'][$i]['operator'] = strtolower($eqExprs[2][$i]); - $parsedFilter['strEqExprs'][$i]['value'] = trim($eqExprs[3][$i],"'\""); - $parsedFilter['strEqExprs'][$i]['value_type'] = 'Literal'; - $parsedFilter['strEqExprs'][$i]['value_lang'] = substr($eqExprs[4][$i], 1); - $dtype = substr($eqExprs[5][$i], 2); - if ($dtype) { - $parsedFilter['strEqExprs'][$i]['value_dtype'] = $this->_validateUri($dtype, RDQL_AND_ERR); - if ($dtype{0} != '<') - $parsedFilter['strEqExprs'][$i]['value_dtype_is_qname'] = TRUE; - }else - $parsedFilter['strEqExprs'][$i]['value_dtype'] = ''; - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$i## ", $filterStr); - } - - // parse ?var [eq | ne] ?var - $ii = count($parsedFilter['strEqExprs']); - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\?[a-zA-Z0-9_]+)/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]); - $parsedFilter['strEqExprs'][$ii]['value'] = $this->_isDefined($eqExprs[3][$i]); - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'variable'; - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr); - $ii++; - } - - // parse ?var [eq | ne] or ?var [eq | ne] prefix:local_name - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+((<\S+>)|(\S+:\S*))/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]); - if ($eqExprs[4][$i]) { - $parsedFilter['strEqExprs'][$ii]['value'] = trim($eqExprs[4][$i], "<>"); - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'URI'; - }else if($eqExprs[5][$i]){ - $this->_validateQName($eqExprs[5][$i], RDQL_AND_ERR); - $parsedFilter['strEqExprs'][$ii]['value'] = $eqExprs[5][$i]; - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'QName'; - } - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr); - $ii++; - } - - $parsedFilter['evalFilterStr'] = $filterStr; - - // all that is left are numerical expressions and place holders for the above expressions - preg_match_all("/\?[a-zA-Z0-9_]+/", $filterStr, $vars); - foreach ($vars[0] as $var) { - $parsedFilter['numExprVars'][] = $this->_isDefined($var); - } - - return $parsedFilter; - } - - -/** - * Find all query variables used in the WHERE clause. - * - * @return array [] = ?VARNAME - * @access private - */ - function findAllQueryVariables() { - - $vars = array(); - foreach ($this->parsedQuery['patterns'] as $pattern) { - $count = 0; - foreach ($pattern as $v) { - if ($v['value'] && $v['value']{0} == '?') { - ++$count; - if (!in_array($v['value'], $vars)) - $vars[] = $v['value']; - } - } - if (!$count) - trigger_error(RDQL_WHR_ERR .'pattern contains no variables', E_USER_ERROR); - } - - return $vars; - } - - -/** - * Replace all namespace prefixes in the pattern and constraint clause of an rdql query - * with the namespaces declared in the USING clause and default namespaces. - * - * @access private - */ - function replaceNamespacePrefixes() { - - global $default_prefixes; - - if (!isset($this->parsedQuery['ns'])) - $this->parsedQuery['ns'] = array(); - - // add default namespaces - // if in an rdql query a reserved prefix (e.g. rdf: rdfs:) is used - // it will be overridden by the default namespace defined in constants.php - $this->parsedQuery['ns'] = array_merge($this->parsedQuery['ns'], $default_prefixes); - - // replace namespace prefixes in the FROM clause - if (isset($this->parsedQuery['sources'])) - foreach ($this->parsedQuery['sources'] as $n => $source) { - if (isset($source['is_qname'])) - $this->parsedQuery['sources'][$n] = $this->_replaceNamespacePrefix($source['value'], RDQL_SRC_ERR); - else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $source['value'] = eregi_replace("$prefix:", $uri, $source['value']); - $this->parsedQuery['sources'][$n] = $source['value']; - } - - } - - // replace namespace prefixes in the where clause - foreach ($this->parsedQuery['patterns'] as $n => $pattern) { - foreach ($pattern as $key => $v) - if ($v['value'] && $v['value']{0} != '?') { - if (isset($v['is_qname'])) { - $this->parsedQuery['patterns'][$n][$key]['value'] - = $this->_replaceNamespacePrefix($v['value'], RDQL_WHR_ERR); - unset($this->parsedQuery['patterns'][$n][$key]['is_qname']); - } else { // is quoted URI (== ) or Literal - if (isset($this->parsedQuery['patterns'][$n][$key]['is_literal'])) { - if (isset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname'])) { - $this->parsedQuery['patterns'][$n][$key]['l_dtype'] - = $this->_replaceNamespacePrefix($v['l_dtype'], RDQL_WHR_ERR); - unset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname']); - }else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['patterns'][$n][$key]['l_dtype'] - = eregi_replace("$prefix:", $uri, $this->parsedQuery['patterns'][$n][$key]['l_dtype']); - } - }else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['patterns'][$n][$key]['value'] - = eregi_replace("$prefix:", $uri, $this->parsedQuery['patterns'][$n][$key]['value']); - } - } - } - } - - // replace prefixes in the constraint clause - if (isset($this->parsedQuery['filters'])) - foreach ($this->parsedQuery['filters'] as $n => $filter) - foreach ($filter['strEqExprs'] as $i => $expr) { - if ($expr['value_type'] == 'QName') { - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value'] - = $this->_replaceNamespacePrefix($expr['value'], RDQL_AND_ERR); - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_type'] = 'URI'; - } - if ($expr['value_type'] == 'URI') - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value'] - = eregi_replace("$prefix:", $uri, - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']); - elseif ($expr['value_type'] == 'Literal') { - if (isset($expr['value_dtype_is_qname'])) { - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype'] - = $this->_replaceNamespacePrefix($expr['value_dtype'], RDQL_AND_ERR); - unset($this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype_is_qname']); - } else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype'] - = eregi_replace("$prefix:", $uri, - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']); - } - } - } - - unset($this->parsedQuery['ns']); - } - - -// ============================================================================= -// *************************** helper functions ******************************** -// ============================================================================= - - -/** - * Remove whitespace-tokens from the array $this->tokens - * - * @access private - */ - function _clearWhiteSpaces() { - - while (current($this->tokens) == ' ' || - current($this->tokens) == "\n" || - current($this->tokens) == "\t" || - current($this->tokens) == "\r") - - unset($this->tokens[key($this->tokens)]); - } - - -/** - * Check if the query string of the given clause contains an undesired ','. - * If a comma was correctly placed then remove it and clear all whitespaces. - * - * @param string $commaExpected - * @param string $clause_error - * @throws PHPError - * @access private - */ - function _checkComma($commaExpected, $clause_error) { - - $this->_clearWhiteSpaces(); - if (current($this->tokens) == ',') { - if (!$commaExpected) - trigger_error($clause_error ."',' - unexpected comma", E_USER_ERROR); - else { - unset($this->tokens[key($this->tokens)]); - $this->_checkComma(FALSE, $clause_error); - } - } - } - - -/** - * Check if the given token is either a variable (?var) or the first token of an URI (). - * In case of an URI this function returns the whole URI string. - * - * @param string $token - * @return array ['value'] = string - * @throws PHPError - * @access private - */ - function _validateVarUri($token) { - - if ($token{0} == '?') { - $token_res['value'] = $this->_validateVar($token, RDQL_WHR_ERR); - } else { - $token_res['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - if ($token{0} != '<') - $token_res['is_qname'] = TRUE; - } - return $token_res; - } - - -/** - * Check if the given token is either a variable (?var) or the first token - * of either an URI () or a literal ("Literal"). - * In case of a literal return an array with literal properties (value, language, datatype). - * In case of a variable or an URI return only ['value'] = string. - * - * @param string $token - * @return array ['value'] = string - * ['is_qname'] = boolean - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * @throws PHPError - * @access private - */ - function _validateVarUriLiteral($token) { - - if ($token{0} == '?') - $statement_object['value'] = $this->_validateVar($token, RDQL_WHR_ERR); - elseif ($token{0} == "'" || $token{0} == '"') - $statement_object = $this->_validateLiteral($token); - elseif ($token{0} == '<') - $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - elseif (ereg(':', $token)) { - $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - $statement_object['is_qname'] = TRUE; - }else - trigger_error(RDQL_WHR_ERR ." '$token' - ?Variable, <URI>, QName, or \"LITERAL\" expected", E_USER_ERROR); - return $statement_object; - } - - -/** - * Check if the given token is a valid variable name (?var). - * - * @param string $token - * @param string $clause_error - * @return string - * @throws PHPError - * @access private - */ - function _validateVar($token, $clause_error) { - - preg_match("/\?[a-zA-Z0-9_]+/", $token, $match); - if (!isset($match[0]) || $match[0] != $token) - trigger_error($clause_error ."'" .htmlspecialchars($token) - ."' - variable name contains illegal characters", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $token; - } - - -/** - * Check if $token is the first token of a valid URI () and return the whole URI string - * - * @param string $token - * @param string $clause_error - * @return string - * @throws PHPError - * @access private - */ - function _validateUri($token, $clause_error) { - - if ($token{0} != '<') { - if (strpos($token, ':') && $this->_validateQName($token, $clause_error)) { - unset($this->tokens[key($this->tokens)]); - return rtrim($token, ':'); - } - $errmsg = $clause_error .'\'' .htmlspecialchars($token) .'\' '; - if ($clause_error == RDQL_WHR_ERR) - $errmsg .= "- ?Variable or <URI> or QName expected"; - else - $errmsg .= "- <URI> or QName expected"; - trigger_error($errmsg, E_USER_ERROR); - }else{ - $token_res = $token; - while($token{strlen($token)-1} != '>' && $token != NULL) { - if ($token == '(' || $token == ')' || $token == ',' || - $token == ' ' || $token == "\n" || $token == "\r") { - trigger_error($clause_error .'\'' .htmlspecialchars($token_res) - ."' - illegal input: '$token' - '>' missing", E_USER_ERROR); - } - unset($this->tokens[key($this->tokens)]); - $token = current($this->tokens); - $token_res .= $token; - } - if ($token == NULL) - trigger_error($clause_error .'\'' .htmlspecialchars($token_res) ."' - '>' missing", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return trim($token_res, '<>'); - } - } - - -/** - * Check if $token is the first token of a valid literal ("LITERAL") and - * return an array with literal properties (value, language, datatype). - * - * @param string $token - * @return array ['value'] = string - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['l_dtype_is_qname'] = boolean - * @throws PHPError - * @access private - */ - function _validateLiteral($token) { - - $quotation_mark = $token{0}; - $statement_object = array ('value' => '', - 'is_literal' => TRUE, - 'l_lang' => '', - 'l_dtype' => ''); - $this->tokens[key($this->tokens)] = substr($token,1); - - $return = FALSE; - foreach ($this->tokens as $k => $token) { - - if ($token != NULL && $token{strlen($token)-1} == $quotation_mark) { - $token = rtrim($token, $quotation_mark); - $return = TRUE; - - // parse @language(^^datatype)? - }elseif (strpos($token, $quotation_mark .'@') || substr($token, 0, 2) == $quotation_mark .'@') { - $lang = substr($token, strpos($token, $quotation_mark .'@')+2); - if (strpos($lang, '^^') || substr($lang, 0,2) == '^^') { - $dtype = substr($lang, strpos($lang, '^^')+2); - if (!$dtype) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - datatype expected" ,E_USER_ERROR); - - $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR); - if ($dtype{0} != '<') - $statement_object['l_dtype_is_qname'] = TRUE; - - $lang = substr($lang, 0, strpos($lang, '^^')); - } - if (!$lang) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - language expected" ,E_USER_ERROR); - $statement_object['l_lang'] = $lang; - $token = substr($token, 0, strpos($token, $quotation_mark .'@')); - $return = TRUE; - - // parse ^^datatype - }elseif (strpos($token, $quotation_mark .'^^') || substr($token, 0, 3) == $quotation_mark .'^^') { - $dtype = substr($token, strpos($token, $quotation_mark .'^^')+3); - if (!$dtype) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - datatype expected" ,E_USER_ERROR); - - $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR); - if ($dtype{0} != '<') - $statement_object['l_dtype_is_qname'] = TRUE; - - $token = substr($token, 0, strpos($token, $quotation_mark .'^^')); - $return = TRUE; - }elseif (strpos($token, $quotation_mark)) - trigger_error(RDQL_WHR_ERR ."'$token' - illegal input", E_USER_ERROR); - $statement_object['value'] .= $token; - unset($this->tokens[$k]); - if ($return) - return $statement_object; - } - trigger_error(RDQL_WHR_ERR ."quotation end mark: $quotation_mark missing", E_USER_ERROR); - } - - -/** - * Check if the given token is a valid QName. - * - * @param string $token - * @param string $clause_error - * @return boolean - * @throws PHPError - * @access private - */ -function _validateQName($token, $clause_error) { - - $parts = explode(':', $token); - if (count($parts) > 2) - trigger_error($clause_error ."illegal QName: '$token'", E_USER_ERROR); - if (!$this->_validateNCName($parts[0])) - trigger_error($clause_error ."illegal prefix in QName: '$token'", E_USER_ERROR); - if ($parts[1] && !$this->_validateNCName($parts[1])) - trigger_error($clause_error ."illegal local part in QName: '$token'", E_USER_ERROR); - - return TRUE; -} - - -/** - * Check if the given token is a valid NCName. - * - * @param string $token - * @return boolean - * @access private - */ -function _validateNCName($token) { - - preg_match("/[a-zA-Z_]+[a-zA-Z_0-9.\-]*/", $token, $match); - if (isset($match[0]) && $match[0] == $token) - return TRUE; - return FALSE; -} - - -/** - * Check if the given token is a valid namespace prefix. - * - * @param string $token - * @return string - * @throws PHPError - * @access private - */ - function _validatePrefix($token) { - - if (!$this->_validateNCName($token)) - trigger_error(RDQL_USG_ERR ."'" .htmlspecialchars($token) - ."' - illegal input, namespace prefix expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $token; - } - -/** - * Replace a prefix in a given QName and return a full URI. - * - * @param string $qName - * @param string $clasue_error - * @return string - * @throws PHPError - * @access private - */ - function _replaceNamespacePrefix($qName, $clause_error) { - - $qName_parts = explode(':', $qName); - if (!array_key_exists($qName_parts[0], $this->parsedQuery['ns'])) - trigger_error($clause_error .'undefined prefix: \'' .$qName_parts[0] .'\' in: \'' .$qName .'\'', E_USER_ERROR); - return $this->parsedQuery['ns'][$qName_parts[0]] .$qName_parts[1]; - } - - -/** - * Check if all variables from the SELECT clause are defined in the WHERE clause - * - * @access private - */ - function _checkSelectVars() { - - foreach ($this->parsedQuery['selectVars'] as $var) - $this->_isDefined($var); - } - - -/** - * Check if the given variable is defined in the WHERE clause. - * - * @param $var string - * @return string - * @throws PHPError - * @access private - */ - function _isDefined($var) { - - $allQueryVars = $this->findAllQueryVariables(); - - if (!in_array($var, $allQueryVars)) - trigger_error(RDQL_SYN_ERR .": '$var' - variable must be defined in the WHERE clause", E_USER_ERROR); - return $var; - } - - -/** - * Throw an error if the regular expression from the AND clause is not quoted. - * - * @param string $filterString - * @param string $lQuotMark - * @param string $rQuotMark - * @throws PHPError - * @access private - */ - function _checkRegExQuotation($filterString, $lQuotMark, $rQuotMark) { - - if (!$lQuotMark) - trigger_error(RDQL_AND_ERR ."'$filterString' - regular expressions must be quoted", E_USER_ERROR); - - if ($lQuotMark != $rQuotMark) - trigger_error(RDQL_AND_ERR ."'$filterString' - quotation end mark in the regular expression missing", E_USER_ERROR); - } - -} // end: Class RdqlParser - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlResultIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlResultIterator.php.svn-base deleted file mode 100755 index f8ca8856..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/.svn/text-base/RdqlResultIterator.php.svn-base +++ /dev/null @@ -1,193 +0,0 @@ -, Chris Bizer - * - * @package rdql - * @access public - * - */ - class RdqlResultIterator extends Object { - - /** - * Reference to the Rdql result - * @var array RdqlResult - * @access private - */ - var $RdqlResult; - - /** - * Current position - * RdqlResultIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single Rdql result. - * @var integer - * @access private - */ - var $position; - - - /** - * Constructor - * - * @param object RdqlResult - * @access public - */ - function RdqlResultIterator(&$RdqlResult) { - - $noResult = TRUE; - foreach($RdqlResult[0] as $value) - if ($value != NULL) { - $noResult = FALSE; - break; - } - - if($noResult) - $this->RdqlResult = NULL; - else - $this->RdqlResult = $RdqlResult; - - $this->position = -1; - } - - /** - * Returns the labels of the result as array. - * @return array of strings with the result labels OR null if there are no results. - * @access public - */ - function getResultLabels() { - if(count($this->RdqlResult)>0) { - return array_keys($this->RdqlResult[0]); - } else return null; - } - - /** - * Returns the number of results. - * @return integer - * @access public - */ - function countResults() { - - return count($this->RdqlResult); - - } - /** - * Returns TRUE if there are more results. - * @return boolean - * @access public - */ - function hasNext() { - if ($this->position < count($this->RdqlResult) - 1 ) { - return TRUE; - } else { - return FALSE; - } - } - - /** - * Returns TRUE if the first result has not been reached. - * @return boolean - * @access public - */ - function hasPrevious() { - if ($this->position > 0) { - return TRUE; - } else { - return FALSE; - } } - - /** - * Returns the next result array. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function next($element = null) { - if ($this->position < count($this->RdqlResult) - 1) { - $this->position++; - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Returns the previous result. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function previous($element = null) { - if ($this->position > 0) { - $this->position--; - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Returns the current result. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function current($element = null) { - if (($this->position >= 0) && ($this->position < count($this->RdqlResult))) { - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Moves the pointer to the first result. - * @return void - * @access public - */ - function moveFirst() { - $this->position = 0; - } - - /** - * Moves the pointer to the last result. - * @return void - * @access public - */ - function moveLast() { - $this->position = count($this->RdqlResult) - 1; - } - - /** - * Moves the pointer to a specific result. - * If you set an off-bounds value, next(), previous() and current() will return NULL - * @return void - * @access public - */ - function moveTo($position) { - $this->position = $position; - } - - /** - * Returns the current position of the iterator. - * @return integer - * @access public - */ - function getCurrentPosition() { - return $this->position; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RDQL.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RDQL.php deleted file mode 100755 index 2761ca62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RDQL.php +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlDbEngine.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlDbEngine.php deleted file mode 100755 index 5e1899d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlDbEngine.php +++ /dev/null @@ -1,506 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlDbEngine extends RdqlEngine { - - -/** - * Parsed query variables and constraints. - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][] = URI - * ['patterns'][]['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['numExpr']['vars'][] = ?VARNAME - * ( [] stands for an integer index - 0..N ) - * @access private - */ - var $parsedQuery; - - -/** - * When an RDQL query is performed on a DbModel, in first step the engine searches - * in database for triples matching the Rdql-WHERE clause. A recordSet is returned. - * $rsIndexes maps select and filter variables to their corresponding indexes - * in the returned recordSet. - * - * @var array [?VARNAME]['value'] = integer - * ['nType'] = integer - * ['l_lang'] = integer - * ['l_dtype'] = integer - * @access private - */ - var $rsIndexes; - - - /** - * Perform an RDQL Query on the given DbModel. - * - * @param object DbModel $dbModel - * @param array &$parsedQuery (the same format as $this->parsedQuery) - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * @access public - */ - function & queryModel(&$dbModel, &$parsedQuery, $returnNodes = TRUE) { - - $this->parsedQuery = &$parsedQuery; - - $sql = $this->generateSql($dbModel->modelID); - $recordSet =& $dbModel->dbConn->execute($sql); - $queryResult = $this->filterQueryResult($recordSet); - - if ($returnNodes) - $ret = $this->toNodes($queryResult); - else - $ret = $this->toString($queryResult); - return $ret; - } - - - /** - * Generate an SQL string to query the database for tuples matching all patterns - * of $parsedQuery. - * - * @param integer $modelID - * @return string - * @access private - */ - function generateSql($modelID) { - - $sql = $this->generateSql_SelectClause(); - $sql .= $this->generateSql_FromClause(); - $sql .= $this->generateSql_WhereClause($modelID); - return $sql; - } - - -/** - * Generate SQL SELECT clause. - * - * @return string - * @throws PHPError - * @access private - */ - function generateSql_SelectClause() { - - $sql_select = 'SELECT'; - $index = 0; - $this->rsIndexes = array(); - - foreach ($this->parsedQuery['selectVars'] as $var) - $sql_select .= $this->_generateSql_SelectVar($var, $index); - - if (isset($this->parsedQuery['filters'])) { - foreach ($this->parsedQuery['filters'] as $n => $filter) { - - // variables from numeric expressions - foreach ($filter['numExprVars'] as $numVar) - $sql_select .= $this->_generateSql_SelectVar($numVar, $index); - - // variables from regex equality expressions - foreach ($filter['regexEqExprs'] as $regexEqExpr) - $sql_select .= $this->_generateSql_SelectVar($regexEqExpr['var'], $index); - - // variables from string equality expressions - foreach ($filter['strEqExprs'] as $strEqVar) - $sql_select .= $this->_generateSql_SelectVar($strEqVar['var'], $index); - } - } - - return rtrim($sql_select, " , "); - } - - -/** - * Generate SQL FROM clause - * - * @return string - * @access private - */ - function generateSql_FromClause() { - - $sql_from = ' FROM'; - foreach ($this->parsedQuery['patterns'] as $n => $v) - $sql_from .= ' statements s' .($n+1) .' , '; - - return rtrim($sql_from, ' , '); - } - - -/** - * Generate an SQL WHERE clause - * - * @param integer $modelID - * @return string - * @access private - */ - function generateSql_WhereClause($modelID) { - - $sql_where = ' WHERE'; - $count_patterns = count($this->parsedQuery['patterns']); - foreach ($this->parsedQuery['patterns'] as $n => $pattern) { - $sql_where .= ' s' .($n+1) .'.modelID=' .$modelID .' AND'; - foreach ($pattern as $key => $val_1) - if ($val_1['value'] && $val_1['value']{0}=='?') { - $sql_tmp = ' s' .($n+1) .'.' .$key .'='; - // find internal bindings - switch ($key) { - case 'subject': - if ($pattern['subject']['value'] == $pattern['predicate']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.predicate AND'; - elseif ($pattern['subject']['value'] == $pattern['object']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND'; - break; - case 'predicate': - if ($pattern['predicate']['value'] == $pattern['object']['value']) - $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND'; - } - // find external bindings - for ($i=$n+1; $i<$count_patterns; $i++) - foreach ($this->parsedQuery['patterns'][$i] as $key2 => $val_2) - if ($val_1['value']==$val_2['value']) { - $sql_where .= $sql_tmp .'s' .($i+1) .'.' .$key2 .' AND'; - break 2; - } - }else { - $sql_where .= ' s' .($n+1) .'.' .$key ."='" .$val_1['value'] ."' AND"; - if ($key == 'object' && isset($val_1['is_literal'])) { - $sql_where .= ' s' .($n+1) .".object_is='l' AND"; - $sql_where .= ' s' .($n+1) .".l_datatype='" .$val_1['l_dtype'] ."' AND"; - $sql_where .= ' s' .($n+1) .".l_language='" .$val_1['l_lang'] ."' AND"; - } - } - } - return rtrim($sql_where, ' AND'); - } - - -/** - * Filter tuples containing variables matching all patterns from the WHERE clause - * of an RDQL query. As a result of a database query using ADOdb these tuples - * are returned as an ADORecordSet object, which is then passed to this function. - * - * @param object ADORecordSet &$recordSet - * @return array [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @access private - */ - function filterQueryResult(&$recordSet) { - $queryResult=array(); - - if (isset($this->parsedQuery['filters'])) { - - while (!$recordSet->EOF) { - - foreach ($this->parsedQuery['filters'] as $filter) { - - $evalFilterStr = $filter['evalFilterStr']; - - // evaluate regex equality expressions of each filter - foreach ($filter['regexEqExprs'] as $i => $expr) { - preg_match($expr['regex'], $recordSet->fields[$this->rsIndexes[$expr['var']]['value']], $match); - $op = substr($expr['operator'], 0,1); - if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0]))) - $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr); - else - $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr); - } - - // evaluate string equality expressions - foreach ($filter['strEqExprs'] as $i => $expr) { - - $exprBoolVal = 'FALSE'; - - switch ($expr['value_type']) { - - case 'variable': - if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] == - $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] && - $expr['operator'] == 'eq') || - ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] != - $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] && - $expr['operator'] == 'ne')) - - $exprBoolVal = 'TRUE'; - break; - - case 'URI': - - if (isset($this->rsIndexes[$expr['var']]['nType']) && - $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] == 'l') { - - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] == - $expr['value'] && $expr['operator'] == 'eq') || - ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] != - $expr['value'] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'Literal': - - if (!isset($this->rsIndexes[$expr['var']]['nType']) || - $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] != 'l') { - - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - $filterLiteral= new Literal($expr['value'],$expr['value_lang']); - $filterLiteral->setDatatype($expr['value_dtype']); - - $resultLiteral=new Literal($recordSet->fields[$this->rsIndexes[$expr['var']]['value']]); - $resultLiteral->setDatatype($recordSet->fields[$this->rsIndexes[$expr['var']]['l_dtype']]); - $resultLiteral->setLanguage($recordSet->fields[$this->rsIndexes[$expr['var']]['l_lang']]); - - $equal=$resultLiteral->equals($filterLiteral); - - if (($equal && $expr['operator'] == 'eq') || - (!$equal && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - else - $exprBoolVal = 'FALSE'; - - } - - $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr); - } - - // evaluate numerical expressions - foreach ($filter['numExprVars'] as $varName) { - $varValue = "'" .$recordSet->fields[$this->rsIndexes[$varName]['value']] ."'"; - $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr); - } - - eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;"); - if (!isset($eval_filter_ok)) - trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR); - - if (!$filterBoolVal) { - $recordSet->MoveNext(); - continue 2; - } - - } - $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields); - $recordSet->MoveNext(); - } - - }else - while (!$recordSet->EOF) { - $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields); - $recordSet->MoveNext(); - } - return $queryResult; - } - - -/** - * Serialize variable values of $queryResult to string. - * - * @param array &$queryResult [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = string - * @access private - */ - function toString(&$queryResult) { - - // if a result set is empty return only variable sames - if (count($queryResult) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $res[0][$selectVar] = NULL; - return $res; - } - - $res = array(); - foreach ($queryResult as $n => $var) - foreach ($var as $varname => $varProperties) - if ($varProperties['nType'] == 'r' || $varProperties['nType'] == 'b') - $res[$n][$varname] = '<' .$varProperties['value'] .'>'; - else { - $res[$n][$varname] = '"' .$varProperties['value'] .'"'; - if ($varProperties['l_lang'] != NULL) - $res[$n][$varname] .= ' (xml:lang="' .$varProperties['l_lang'] .'")'; - if ($varProperties['l_dtype'] != NULL) - $res[$n][$varname] .= ' (rdf:datatype="' .$varProperties['l_dtype'] .'")'; - } - return $res; - } - - -/** - * Convert variable values of $queryResult to objects (Node). - * - * @param array &$queryResult [][?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = object Node - * @access private - */ - function toNodes(&$queryResult) { - - // if a result set is empty return only variable sames - if (count($queryResult) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $res[0][$selectVar] = NULL; - return $res; - } - - $res = array(); - foreach ($queryResult as $n => $var) - foreach ($var as $varname => $varProperties) - if ($varProperties['nType'] == 'r') - $res[$n][$varname] = new Resource($varProperties['value']); - elseif ($varProperties['nType'] == 'b') - $res[$n][$varname] = new BlankNode($varProperties['value']); - else { - $res[$n][$varname] = new Literal($varProperties['value'], $varProperties['l_lang']); - if ($varProperties['l_dtype'] != NULL) - $res[$n][$varname]->setDataType($varProperties['l_dtype']); - } - return $res; - } - - -/** - * Generate a piece of an sql select statement for a variable. - * Look first if the given variable is defined as a pattern object. - * (So you can select the node type, literal lang and dtype) - * If not found - look for subjects and select node label and type. - * If there is no result either go to predicates. - * Predicates are always resources therefore select only the node label. - * - * @param string $varName - * @return string - * @access private - */ -function _generateSql_SelectVar ($varName, &$index) { - - $sql_select = ''; - - if (array_key_exists($varName, $this->rsIndexes)) - return NULL; - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['object']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".object as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - // select the node type - $sql_select .= " s" .$n .".object_is , "; - $this->rsIndexes[$varName]['nType'] = $index++; - // select the object language - $sql_select .= " s" .$n .".l_language , "; - $this->rsIndexes[$varName]['l_lang'] = $index++; - // select the object dtype - $sql_select .= " s" .$n .".l_datatype , "; - $this->rsIndexes[$varName]['l_dtype'] = $index++; - - return $sql_select; - } - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['subject']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".subject as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - // select the node type - $sql_select .= " s" .$n .".subject_is , "; - $this->rsIndexes[$varName]['nType'] = $index++; - - return $sql_select; - } - - foreach ($this->parsedQuery['patterns'] as $n => $pattern) - if ($varName == $pattern['predicate']['value']) { - - // select the object label - $sql_select .= " s" .++$n .".predicate as _" .ltrim($varName, "?") ." , "; - $this->rsIndexes[$varName]['value'] = $index++; - - return $sql_select; - } - } - - -/** - * Converts a single row of ADORecordSet->fields array to the format of - * $queryResult array using pointers to indexes ($this->rsIndexes) in RecordSet->fields. - * - * @param array &$record [] = string - * @return array [?VARNAME]['value'] = string - * ['nType'] = string - * ['l_lang'] = string - * ['l_dtype'] = string - * @access private - */ - function _convertRsRowToQueryResultRow(&$record) { - - // return only select variables (without conditional variables from the AND clause) - foreach ($this->parsedQuery['selectVars'] as $selectVar) { - $resultRow[$selectVar]['value'] = $record[$this->rsIndexes[$selectVar]['value']]; - if (isset($this->rsIndexes[$selectVar]['nType'])) - $resultRow[$selectVar]['nType'] = $record[$this->rsIndexes[$selectVar]['nType']]; - // is a predicate then - else - $resultRow[$selectVar]['nType'] = 'r'; - - if ($resultRow[$selectVar]['nType'] == 'l') { - $resultRow[$selectVar]['l_lang'] = $record[$this->rsIndexes[$selectVar]['l_lang']]; - $resultRow[$selectVar]['l_dtype'] = $record[$this->rsIndexes[$selectVar]['l_dtype']]; - } - } - return $resultRow; - } - -} // end: Class RdqlDbEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlEngine.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlEngine.php deleted file mode 100755 index 117228cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlEngine.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlEngine extends Object{ - - - -/** - * Prints a query result as HTML table. - * You can change the colors in the configuration file. - * - * @param array $queryResult [][?VARNAME] = object Node - * @access private - */ - function writeQueryResultAsHtmlTable($queryResult) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - if (current($queryResult[0]) == NULL) { - echo 'no match
'; - return; - } - - echo ''; - foreach ($queryResult[0] as $varName => $value) - echo ""; - echo ''; - - foreach ($queryResult as $n => $var) { - - - echo ''; - foreach ($var as $varName => $value) { - echo INDENTATION . INDENTATION . ''; - } - echo '
No.$varName
' .($n + 1) .'.'; - echo '

'; - - $lang = NULL; - $dtype = NULL; - if (is_a($value, 'Literal')) { - if ($value->getLanguage() != NULL) - $lang = ' (xml:lang="' . $value->getLanguage() . '") '; - if ($value->getDatatype() != NULL) - $dtype = ' (rdf:datatype="' . $value->getDatatype() . '") '; - } - echo RDFUtil::getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'

'; - } - echo '
'; - } - -} // end: Class RdqlEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlMemEngine.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlMemEngine.php deleted file mode 100755 index bcaa02e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlMemEngine.php +++ /dev/null @@ -1,555 +0,0 @@ - - * - * @package rdql - * @access public - */ - -Class RdqlMemEngine extends RdqlEngine { - - -/** - * Parsed query variables and constraints. - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][] = URI - * ['patterns'][]['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['numExpr']['vars'][] = ?VARNAME - * ( [] stands for an integer index - 0..N ) - * @access private - */ - var $parsedQuery; - - - /** - * Perform an RDQL Query on the given MemModel. - * - * @param object MemModel &$memModel - * @param array &$parsedQuery (the same format as $this->parsedQuery) - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - * @access public - */ - function & queryModel(&$memModel, &$parsedQuery, $returnNodes = TRUE) { - - $this->parsedQuery = $parsedQuery; - - // find tuples matching all patterns - $res = $this->findTuplesMatchingAllPatterns($memModel); - - // filter tuples - if (isset($parsedQuery['filters'])) - $res = $this->filterTuples($res); - - // select variables to be returned - $res = $this->selectVariables($res); - - if(!$returnNodes) - return $this->toString($res); - - return $res; - } - - - /** - * Find triples matching all patterns of an RDQL query and return an array - * with variables from all patterns and their corresponding values. - * The variable values returned are instances of object Node. - * - * @param object MemModel &$memModel - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function findTuplesMatchingAllPatterns(&$memModel) { - - $resultSet = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][0]); - for ($i=1; $iparsedQuery['patterns']); $i++) { - $rs = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][$i]); - $resultSet = $this->joinTuples($resultSet, $rs); - } - return $resultSet; - } - - -/** - * Find tuples matching one pattern and return an array with pattern - * variables and their corresponding values (instances of object Node). - * - * @param object MemModel &$memModel - * @param array &$pattern ['subject']['value'] = VARorURI - * ['predicate']['value'] = VARorURI - * ['object']['value'] = VARorURIorLiterl - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function findTuplesMatchingOnePattern(&$memModel, &$pattern) { - - $resultSet = array(); - $i = 0; - // parameters to be passed to the method findTriplesMatchingPattern - foreach ($pattern as $key => $v) { - if ($v['value'] && $v['value']{0} == '?') { - if ($key == 'object') { - $param['object']['is_a'] = 'ANY'; - $param['object']['string'] = 'ANY'; - $param['object']['lang'] = NULL; - $param['object']['dtype'] = NULL; - } else - $param[$key] = 'ANY'; - $var[$i]['key'] = $key; - $var[$i++]['val'] = $v['value']; - }else - if (isset($v['is_literal'])) { - $param[$key]['is_a'] = 'Literal'; - $param[$key]['string'] = $v['value']; - $param[$key]['lang'] = $v['l_lang']; - $param[$key]['dtype'] = $v['l_dtype']; - }else{ - if ($key == 'object') { - $param[$key]['is_a'] = 'Resource'; - $param[$key]['string'] = $v['value']; - $param[$key]['lang'] = NULL; - $param[$key]['dtype'] = NULL; - }else - $param[$key] = $v['value']; - } - } - - // find pattern internal bindings e.g. (?x, ?z, ?x) - $intBindings = NULL; - for ($i=0; $i $v) - if ($i != $n && $var[$i]['val'] == $v['val']) - $intBindings[] = $var[$i]['key']; - - // find triples of the $memModel matching $pattern - $resModel = $this->findTriplesMatchingPattern($memModel, $param['subject'], - $param['predicate'], - $param['object']['is_a'], - $param['object']['string'], - $param['object']['lang'], - $param['object']['dtype'], - $intBindings); - - // set values of the pattern variables to be returned - if ($pattern['subject']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['subject']['value']] = $triple->subj; - } - if ($pattern['predicate']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['predicate']['value']] = $triple->pred; - } - if ($pattern['object']['value'] && $pattern['object']['value']{0} == '?') { - $n = 0; - foreach ($resModel->triples as $triple) - $resultSet[$n++][$pattern['object']['value']] = $triple->obj; - } - return $resultSet; - } - - -/** - * Search in $memModel for triples matching one pattern from the WHERE clause. - * 'ANY' input for $subjLabel..$objLabel, $obj_is will match anything. - * NULL input for $objDtype will only match obj->dtype = NULL - * NULL input for $objLanguage will match obj->lang = NULL or anything if a - * literal is datatyped (except for XMLLiterals and plain literals) - * This method also checks internal bindings if provided. - * - * @param object MemModel $memModel - * @param string $subjLabel - * @param string $predLabel - * @param string $objLabel - * @param string $obj_is - * @param string $objLanguage - * @param string $objDtype - * @param array $intBindings [] = string - * @return object MemModel - * @access private - */ - function findTriplesMatchingPattern(&$memModel, $subjLabel, $predLabel, $obj_is, - $objLabel, $objLang, $objDtype, &$intBindings) { - - $res = new MemModel(); - - if($memModel->isEmpty()) - return $res; - - if ($subjLabel=='ANY') - { - $subj=NULL; - } else - { - $subj=new Resource($subjLabel); - }; - if ($predLabel=='ANY') - { - $pred=NULL; - } else - { - $pred=new Resource($predLabel); - }; - - if ($objLabel=='ANY') - { - $obj=NULL; - } else - { - if ($obj_is == 'Literal') - { - $obj=new Literal($objLabel); - $obj->setDatatype($objDtype); - $obj->setLanguage($objLang); - } else { - $obj=new Resource($objLabel); - } - }; - - $res=$memModel->find($subj,$pred,$obj); - - if ($intBindings) - foreach ($res->triples as $triple) - { - if (!$this->_checkIntBindings($triple, $intBindings)) - { - $res->remove($triple); - } - } - - return $res; -} - - -/** - * Perform an SQL-like inner join on two resultSets. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @param array &$res [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * - * @access private - */ - function joinTuples(&$finalRes, &$res) { - - if (count($finalRes) == 0 || count($res) == 0) - return array(); - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - foreach ($res[0] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])) - $jointVars[] = $varname; - else - $newVars[] = $varname; - } - - // eliminate rows of $finalRes in which the values of $jointVars do not have - // a corresponding row in $res. - foreach ($finalRes as $n => $fRes) { - foreach ($res as $i => $r) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) - break; - } - if (!$ok) - unset($finalRes[$n]); - } - - // join $res and $finalRes - $joinedRes = array(); - foreach ($res as $i => $r) { - foreach ($finalRes as $n => $fRes) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) { - $joinedRow = $finalRes[$n]; - foreach($newVars as $n_varname) - $joinedRow[$n_varname] = $r[$n_varname]; - $joinedRes[] = $joinedRow; - } - } - } - - return $joinedRes; - } - - -/** - * Filter the result-set of query variables by evaluating each filter from the - * AND clause of the RDQL query. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * @access private - */ - function filterTuples(&$finalRes) { - - foreach ($this->parsedQuery['filters'] as $filter) { - - foreach ($finalRes as $n => $fRes) { - $evalFilterStr = $filter['evalFilterStr']; - - // evaluate regex equality expressions of each filter - foreach ($filter['regexEqExprs'] as $i => $expr) { - - preg_match($expr['regex'], $fRes[$expr['var']]->getLabel(), $match); - $op = substr($expr['operator'], 0,1); - if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0]))) - $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr); - else - $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr); - - } - - // evaluate string equality expressions - foreach ($filter['strEqExprs'] as $i => $expr) { - - $exprBoolVal = 'FALSE'; - - switch ($expr['value_type']) { - - case 'variable': - if (($fRes[$expr['var']] == $fRes[$expr['value']] && $expr['operator'] == 'eq') || - ($fRes[$expr['var']] != $fRes[$expr['value']] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'URI': - - if (is_a($fRes[$expr['var']], 'Literal')) { - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - if (($fRes[$expr['var']]->getLabel() == $expr['value'] && $expr['operator'] == 'eq') || - ($fRes[$expr['var']]->getLabel() != $expr['value'] && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - break; - - case 'Literal': - - if (!is_a($fRes[$expr['var']], 'Literal')) { - if ($expr['operator'] == 'ne') - $exprBoolVal = 'TRUE'; - break; - } - - $filterLiteral= new Literal($expr['value'],$expr['value_lang']); - $filterLiteral->setDatatype($expr['value_dtype']); - - $equal=$fRes[$expr['var']]->equals($filterLiteral); -/* if ($fRes[$expr['var']]->getLabel() == $expr['value'] && - $fRes[$expr['var']]->getDatatype() == $expr['value_dtype']) { - - $equal = TRUE; - - // Lang tags only differentiate literals in rdf:XMLLiterals and plain literals. - // Therefore if a literal is datatyped ignore the language tag. - if ((($expr['value_dtype'] == NULL) || - ($expr['value_dtype'] == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') || - ($expr['value_dtype'] == 'http://www.w3.org/2001/XMLSchema#string')) && - (($fRes[$expr['var']]->getLanguage() != $expr['value_lang']))) - - $equal = FALSE; - }else - $equal = FALSE; - */ - if (($equal && $expr['operator'] == 'eq') || - (!$equal && $expr['operator'] == 'ne')) - $exprBoolVal = 'TRUE'; - else - $exprBoolVal = 'FALSE'; - - } - $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr); - } - - // evaluate numerical expressions - foreach ($filter['numExprVars'] as $varName) { - $varValue = "'" .$fRes[$varName]->getLabel() ."'"; - $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr); - } - - eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;"); - if (!isset($eval_filter_ok)) - trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR); - - if (!$filterBoolVal) - unset($finalRes[$n]); - } - } - - return $finalRes; - } - - -/** - * Remove all conditional variables from the result-set and leave only variables - * specified in the SELECT clause of the RDQL query. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = object Node - * @access private - */ - function selectVariables(&$finalRes) { - - // if nothing has been found return only one row of $finalRes - // with select variables having empty values - if (count($finalRes) == 0) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $finalRes[0][$selectVar] = NULL; - return $finalRes; - } - - // return only selectVars in the same order as given in the RDQL query - // and reindex $finalRes. - $n = 0; - foreach($finalRes as $key => $val) { - foreach ($this->parsedQuery['selectVars'] as $selectVar) - $resultSet[$n][$selectVar] = $val[$selectVar]; - unset($finalRes[$key]); - ++$n; - } - - return $resultSet; - } - - -/** - * Convert the variable values of $finalRes from objects to their string serialization. - * - * @param array &$finalRes [][?VARNAME] = object Node - * @return array [][?VARNAME] = string - * @access private - */ - function toString(&$finalRes) { - - foreach ($finalRes as $n => $tuple) - foreach ($tuple as $varname => $node) { - if (is_a($node, 'Resource')) - $res[$n][$varname] = '<' .$node->getLabel() .'>'; - elseif (is_a($node, 'Literal')) { - $res[$n][$varname] = '"' .$node->getLabel() .'"'; - if ($node->getLanguage()) - $res[$n][$varname] .= ' (xml:lang="' .$node->getLanguage() .'")'; - if ($node->getDatatype()) - $res[$n][$varname] .= ' (rdf:datatype="' .$node->getDatatype() .'")'; - }else - $res[$n][$varname] = $node; - } - return $res; - } - - -/** - * Check if the given triple meets pattern internal bindings - * e.g. (?x, ?z, ?x) ==> statement subject must be identical with the statement object - * - * @param object statement &$triple - * @param array &$intBindings [] = string - * @return boolean - * @access private - */ - function _checkIntBindings (&$triple, &$intBindings) { - - if (in_array('subject', $intBindings)) { - if (in_array('predicate', $intBindings)) - if ($triple->subj != $triple->pred) - return FALSE; - if (in_array('object', $intBindings)) { - if (is_a($triple->obj, 'Literal')) - return FALSE; - elseif ($triple->subj != $triple->obj) - return FALSE; - } - return TRUE; - } - if (in_array('predicate', $intBindings)) { - if (is_a($triple->obj, 'Literal')) - return FALSE; - elseif ($triple->pred != $triple->obj) - return FALSE; - return TRUE; - } - } - - -/** - * Check if the lang and dtype of the passed object Literal are equal $lang and $dtype - * !!! Language only differentiates literals in rdf:XMLLiterals and plain literals (xsd:string). - * !!! Therefore if a literal is datatyped ignore the language. - * - * @param object Literal $literal - * @param string $dtype1 - * @param string $dtype2 - * @return boolean - * @access private - */ - function _equalsLangDtype ($literal, $lang, $dtype) { - - if ($dtype == $literal->getDatatype()) { - if (($dtype == NULL || - $dtype == 'http://www.w3.org/2001/XMLSchema#string' || - $dtype == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') && - ($lang != $literal->getLanguage())) - return FALSE; - return TRUE; - } - return FALSE; - } - - -} // end: Class RdqlMemEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlParser.php deleted file mode 100755 index 34c0fa56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlParser.php +++ /dev/null @@ -1,1063 +0,0 @@ - - * - * @package rdql - * @access public - */ - - -Class RdqlParser extends Object{ - -/** - * Parsed query variables and constraints. - * { } are only used within the parser class and are not returned as parsed query. - * ( [] stands for an integer index - 0..N ) - * - * @var array ['selectVars'][] = ?VARNAME - * ['sources'][]{['value']} = URI | QName - * {['is_qname'] = boolean} - * ['patterns'][]['subject']['value'] = VARorURI - * {['is_qname'] = boolean} - * ['predicate']['value'] = VARorURI - * {['is_qname'] = boolean} - * ['object']['value'] = VARorURIorLiterl - * {['is_qname'] = boolean} - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * {['l_dtype_is_qname'] = boolean} - * ['filters'][]['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * {['value_dtype_is_qname'] = boolean} - * ['numExpr']['vars'][] = ?VARNAME - * {['ns'][PREFIX] = NAMESPACE} - * @access private - */ - var $parsedQuery; - - -/** - * Query string divided into a sequence of tokens. - * A token is either: ' ' or "\n" or "\r" or "\t" or ',' or '(' or ')' - * or a string containing any characters except from the above. - * - * @var array - * @access private - */ - var $tokens; - - -/** - * Parse the given RDQL query string and return an array with query variables and constraints. - * - * @param string $queryString - * @return array $this->parsedQuery - * @access public - */ - function & parseQuery($queryString) { - - $cleanQueryString = $this->removeComments($queryString); - $this->tokenize($cleanQueryString); - $this->startParsing(); - if ($this->parsedQuery['selectVars'][0] == '*') - $this->parsedQuery['selectVars'] = $this->findAllQueryVariables(); - else - $this->_checkSelectVars(); - $this->replaceNamespacePrefixes(); - - return $this->parsedQuery; - } - - -/** - * Remove comments from the passed query string. - * - * @param string $query - * @return string - * @throws PHPError - * @access private - */ - function removeComments($query) { - - $last = strlen($query)-1; - $query .= ' '; - $clean = ''; - for ($i=0; $i<=$last; $i++) { - // don't search for comments inside a 'literal'@lang^^dtype or "literal"@lang^^dtype - if ($query{$i} == "'" || $query{$i} == '"') { - $quotMark = $query{$i}; - do - $clean .= $query{$i++}; - while($i < $last && $query{$i} != $quotMark); - $clean .= $query{$i}; - // language - if ($query{$i+1} == '@') { - do{ - if ($query{$i+1} == '^' && $query{$i+2} == '^') - break; - $clean .= $query{++$i}; - }while ($i < $last && $query{$i} != ' ' && $query{$i} != "\t" - && $query{$i} != "\n" && $query{$i} != "\r"); - } - // datatype - if ($query{$i+1} == '^' && $query{$i+2} == '^') { - do - $clean .= $query{++$i}; - while ($i < $last && $query{$i} != ' ' && $query{$i} != "\t" - && $query{$i} != "\n" && $query{$i} != "\r" ); - } - // don't search for comments inside an either - }elseif ($query{$i} == '<') { - do{ - $clean .= $query{$i++}; - }while($i < $last && $query{$i} != '>'); - $clean .= $query{$i}; - }elseif ($query{$i} == '/') { - // clear: // comment - if ($i < $last && $query{$i+1} == '/') { - while($i < $last && $query{$i} != "\n" && $query{$i} != "\r") - ++$i; - $clean .= ' '; - // clear: /*comment*/ - }elseif ($i < $last-2 && $query{$i+1} == '*') { - $i += 2; - while($i < $last && ($query{$i} != '*' || $query{$i+1} != '/')) - ++$i; - if ($i >= $last && ($query{$last-1} != '*' || $query{$last} != '/')) - trigger_error(RDQL_SYN_ERR .": unterminated comment - '*/' missing", E_USER_ERROR); - ++$i; - }else - $clean .= $query{$i}; - }else - $clean .= $query{$i}; - } - return $clean; - } - - -/** - * Divide the query string into tokens. - * A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')' - * or a string containing any character except from the above. - * - * @param string $queryString - * @access private - */ - function tokenize($queryString) { - - $queryString = trim($queryString, " \r\n\t"); - $specialChars = array (" ", "\t", "\r", "\n", ",", "(", ")"); - $len = strlen($queryString); - $this->tokens[0]=''; - $n = 0; - - for ($i=0; $i<$len; ++$i) { - if (!in_array($queryString{$i}, $specialChars)) - $this->tokens[$n] .= $queryString{$i}; - else { - if ($this->tokens[$n] != '') - ++$n; - $this->tokens[$n] = $queryString{$i}; - $this->tokens[++$n] = ''; - } - } - } - - -/** - * Start parsing of the tokenized query string. - * - * @access private - */ - function startParsing() { - - $this->parseSelect(); - } - - -/** - * Parse the SELECT clause of an Rdql query. - * When the parsing of the SELECT clause is finished, this method will call - * a suitable method to parse the subsequent clause. - * - * @throws PhpError - * @access private - */ - function parseSelect() { - - $this->_clearWhiteSpaces(); - - // Check if the queryString contains a "SELECT" token - if (strcasecmp('SELECT', current($this->tokens))) - trigger_error(RDQL_SEL_ERR ."'" .current($this->tokens) - ."' - SELECT keyword expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - // Parse SELECT * - if (current($this->tokens) == '*') { - unset($this->tokens[key($this->tokens)]); - $this->parsedQuery['selectVars'][0] = '*'; - $this->_clearWhiteSpaces(); - if (strcasecmp('FROM', current($this->tokens)) - && strcasecmp('SOURCE', current($this->tokens)) - && strcasecmp('WHERE', current($this->tokens))) - trigger_error(RDQL_SYN_ERR .": '" .htmlspecialchars(current($this->tokens)) - ."' - SOURCE or WHERE clause expected", E_USER_ERROR); - } - - // Parse SELECT ?Var (, ?Var)* - $commaExpected = FALSE; - $comma = FALSE; - while (current($this->tokens) != NULL) { - $k = key($this->tokens); - $token = $this->tokens[$k]; - - switch ($token) { - case ',': if (!$commaExpected) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - $comma = TRUE; - $commaExpected = FALSE; - break; - case '(': - case ')': trigger_error(RDQL_SEL_ERR ." '$token' - illegal input", E_USER_ERROR); - break; - default : - if (!strcasecmp('FROM', $token) || !strcasecmp('SOURCE', $token)) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[$k]); - return $this->parseFrom(); - }elseif (!strcasecmp('WHERE', $token) && !$comma) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[$k]); - return $this->parseWhere(); - } - if ($token{0} == '?') { - $this->parsedQuery['selectVars'][] = $this->_validateVar($token, RDQL_SEL_ERR); - $commaExpected = TRUE; - $comma = FALSE; - }else - trigger_error(RDQL_SEL_ERR ." '$token' - '?' missing", E_USER_ERROR); - } - unset($this->tokens[$k]); - $this->_clearWhiteSpaces(); - } - trigger_error(RDQL_SYN_ERR . ': WHERE clause missing', E_USER_ERROR); - } - - -/** - * Parse the FROM/SOURCES clause of an Rdql query - * When the parsing of this clause is finished, parseWhere() will be called. - * - * @throws PhpError - * @access private - */ - function parseFrom() { - - $comma = FALSE; - $commaExpected = FALSE; - $i = -1; - while (current($this->tokens) != NULL) { - - $this->_clearWhiteSpaces(); - if (!strcasecmp('WHERE', current($this->tokens)) && count($this->parsedQuery['sources']) != 0) { - if ($comma) - trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseWhere(); - } - if (current($this->tokens) == ',') { - if ($commaExpected) { - $comma = TRUE; - $commaExpected = FALSE; - unset($this->tokens[key($this->tokens)]); - }else - trigger_error(RDQL_SRC_ERR ."',' - unecpected comma", E_USER_ERROR); - }else{ - $token = current($this->tokens); - $this->parsedQuery['sources'][++$i]['value'] = $this->_validateURI($token, RDQL_SRC_ERR); - if ($token{0} != '<') - $this->parsedQuery['sources'][$i]['is_qname'] = TRUE; - $commaExpected = TRUE; - $comma = FALSE; - } - } - trigger_error(RDQL_SYN_ERR .': WHERE clause missing', E_USER_ERROR); - } - - -/**' - * Parse the WHERE clause of an Rdql query. - * When the parsing of the WHERE clause is finished, this method will call - * a suitable method to parse the subsequent clause if provided. - * - * @throws PhpError - * @access private - */ - function parseWhere() { - - $comma = FALSE; - $commaExpected = FALSE; - $i=0; - - do { - $this->_clearWhiteSpaces(); - if (!strcasecmp('AND', current($this->tokens)) - && count($this->parsedQuery['patterns']) != 0){ - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseAnd(); - }elseif (!strcasecmp('USING', current($this->tokens)) - && count($this->parsedQuery['patterns']) != 0) { - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $this->parseUsing(); - } - - if (current($this->tokens) == ',') { - $comma = TRUE; - $this->_checkComma($commaExpected, RDQL_WHR_ERR); - - }else{ - - if (current($this->tokens) != '(') - trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens) - ."' - '(' expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - $this->parsedQuery['patterns'][$i]['subject'] = $this->_validateVarUri(current($this->tokens)); - $this->_checkComma(TRUE, RDQL_WHR_ERR); - $this->parsedQuery['patterns'][$i]['predicate'] = $this->_validateVarUri(current($this->tokens)); - $this->_checkComma(TRUE, RDQL_WHR_ERR); - $this->parsedQuery['patterns'][$i++]['object'] = $this->_validateVarUriLiteral(current($this->tokens)); - $this->_clearWhiteSpaces(); - - if (current($this->tokens) != ')') - trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens) ."' - ')' expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - $commaExpected = TRUE; - $comma = FALSE; - } - }while(current($this->tokens) != NULL); - - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - } - - -/** - * Parse the AND clause of an Rdql query - * - * @throws PhpError - * @access private - * @todo clear comments - */ - function parseAnd() { - - $this->_clearWhiteSpaces(); - $n = 0; - $filterStr = ''; - - while(current($this->tokens) != NULL) { - $k = key($this->tokens); - $token = $this->tokens[$k]; - - if (!strcasecmp('USING', $token)) { - $this->parseFilter($n, $filterStr); - unset($this->tokens[$k]); - return $this->parseUsing(); - }elseif ($token == ',') { - $this->parseFilter($n, $filterStr); - $filterStr = ''; - $token = ''; - ++$n; - } - $filterStr .= $token; - unset($this->tokens[$k]); - } - $this->parseFilter($n, $filterStr); - } - - -/** - * Parse the USING clause of an Rdql query - * - * @throws PhpError - * @access private - */ - function parseUsing() { - - $commaExpected = FALSE; - $comma = FALSE; - - do { - $this->_clearWhiteSpaces(); - if (current($this->tokens) == ',') { - $comma = TRUE; - $this->_checkComma($commaExpected, RDQL_USG_ERR); - }else{ - $prefix = $this->_validatePrefix(current($this->tokens)); - $this->_clearWhiteSpaces(); - - if (strcasecmp('FOR', current($this->tokens))) - trigger_error(RDQL_USG_ERR ." keyword: 'FOR' missing in the namespace declaration: '", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - $this->_clearWhiteSpaces(); - - $this->parsedQuery['ns'][$prefix] = $this->_validateUri(current($this->tokens), RDQL_USG_ERR); - $this->_clearWhiteSpaces(); - $commaExpected = TRUE; - $comma = FALSE; - } - }while(current($this->tokens) != NULL); - - if ($comma) - trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR); - } - - -/** - * Check if a filter from the AND clause contains an equal number of '(' and ')' - * and parse filter expressions. - * - * @param integer $n - * @param string $filter - * @throws PHPError - * @access private - */ - function parseFilter($n, $filter) { - - if ($filter == NULL) - trigger_error(RDQL_AND_ERR ." ',' - unexpected comma", E_USER_ERROR); - $paren = substr_count($filter, '(') - substr_count($filter, ')'); - if ($paren != 0) { - if ($paren > 0) - $errorMsg = "'" .htmlspecialchars($filter) ."' - ')' missing "; - elseif ($paren < 0) - $errorMsg = "'" .htmlspecialchars($filter) ."' - too many ')' "; - trigger_error(RDQL_AND_ERR .$errorMsg, E_USER_ERROR); - } - - $this->parsedQuery['filters'][$n] = $this->parseExpressions($filter); - } - - -/** - * Parse expressions inside the passed filter: - * 1) regex equality expressions: ?var [~~ | =~ | !~ ] REG_EX - * 2a) string equality expressions: ?var [eq | ne] "literal"@lang^^dtype. - * 2b) string equality expressions: ?var [eq | ne] or ?var [eq | ne] prefix:local_name - * 3) numerical expressions: e.q. (?var1 - ?var2)*4 >= 20 - * - * In cases 1-2 parse each expression of the given filter into an array of variables. - * For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr. - * The RDQLengine will then replace each place holder with the outcomming boolean value - * of the corresponding expression. - * The remaining filterStr contains only numerical expressions and place holders. - * - * @param string $filteStr - * @return array ['string'] = string - * ['evalFilterStr'] = string - * ['reqexEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['regex'] = string - * ['strEqExprs'][]['var'] = ?VARNAME - * ['operator'] = (eq | ne) - * ['value'] = string - * ['value_type'] = ('variable' | 'URI' | 'QName'| 'Literal') - * ['value_lang'] = string - * ['value_dtype'] = string - * ['value_dtype_is_qname'] = boolean - * ['numExpr']['vars'][] = ?VARNAME - * @access private - */ - function parseExpressions($filterStr) { - - $parsedFilter['string'] = $filterStr; - $parsedFilter['regexEqExprs'] = array(); - $parsedFilter['strEqExprs'] = array(); - $parsedFilter['numExprVars'] = array(); - - // parse regex string equality expressions, e.g. ?x ~~ !//foo.com/r!i - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+([~!=]~)\s+(['|\"])?([^\s'\"]+)(['|\"])?/"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $this->_checkRegExQuotation($filterStr, $eqExprs[3][$i], $eqExprs[5][$i]); - $parsedFilter['regexEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['regexEqExprs'][$i]['operator'] = $eqExprs[2][$i]; - $parsedFilter['regexEqExprs'][$i]['regex'] = $eqExprs[4][$i]; - - $filterStr = str_replace($eqExpr, " ##RegEx_$i## ", $filterStr); - } - - // parse ?var [eq | ne] "literal"@lang^^dtype - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\'[^\']*\'|\"[^\"]*\")"; - $reg_ex .= "(@[a-zA-Z]+)?(\^{2}\S+:?\S+)?/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]);# - $parsedFilter['strEqExprs'][$i]['operator'] = strtolower($eqExprs[2][$i]); - $parsedFilter['strEqExprs'][$i]['value'] = trim($eqExprs[3][$i],"'\""); - $parsedFilter['strEqExprs'][$i]['value_type'] = 'Literal'; - $parsedFilter['strEqExprs'][$i]['value_lang'] = substr($eqExprs[4][$i], 1); - $dtype = substr($eqExprs[5][$i], 2); - if ($dtype) { - $parsedFilter['strEqExprs'][$i]['value_dtype'] = $this->_validateUri($dtype, RDQL_AND_ERR); - if ($dtype{0} != '<') - $parsedFilter['strEqExprs'][$i]['value_dtype_is_qname'] = TRUE; - }else - $parsedFilter['strEqExprs'][$i]['value_dtype'] = ''; - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$i## ", $filterStr); - } - - // parse ?var [eq | ne] ?var - $ii = count($parsedFilter['strEqExprs']); - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\?[a-zA-Z0-9_]+)/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]); - $parsedFilter['strEqExprs'][$ii]['value'] = $this->_isDefined($eqExprs[3][$i]); - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'variable'; - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr); - $ii++; - } - - // parse ?var [eq | ne] or ?var [eq | ne] prefix:local_name - $reg_ex = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+((<\S+>)|(\S+:\S*))/i"; - preg_match_all($reg_ex, $filterStr, $eqExprs); - foreach ($eqExprs[0] as $i => $eqExpr) { - $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]); - $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]); - if ($eqExprs[4][$i]) { - $parsedFilter['strEqExprs'][$ii]['value'] = trim($eqExprs[4][$i], "<>"); - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'URI'; - }else if($eqExprs[5][$i]){ - $this->_validateQName($eqExprs[5][$i], RDQL_AND_ERR); - $parsedFilter['strEqExprs'][$ii]['value'] = $eqExprs[5][$i]; - $parsedFilter['strEqExprs'][$ii]['value_type'] = 'QName'; - } - - $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr); - $ii++; - } - - $parsedFilter['evalFilterStr'] = $filterStr; - - // all that is left are numerical expressions and place holders for the above expressions - preg_match_all("/\?[a-zA-Z0-9_]+/", $filterStr, $vars); - foreach ($vars[0] as $var) { - $parsedFilter['numExprVars'][] = $this->_isDefined($var); - } - - return $parsedFilter; - } - - -/** - * Find all query variables used in the WHERE clause. - * - * @return array [] = ?VARNAME - * @access private - */ - function findAllQueryVariables() { - - $vars = array(); - foreach ($this->parsedQuery['patterns'] as $pattern) { - $count = 0; - foreach ($pattern as $v) { - if ($v['value'] && $v['value']{0} == '?') { - ++$count; - if (!in_array($v['value'], $vars)) - $vars[] = $v['value']; - } - } - if (!$count) - trigger_error(RDQL_WHR_ERR .'pattern contains no variables', E_USER_ERROR); - } - - return $vars; - } - - -/** - * Replace all namespace prefixes in the pattern and constraint clause of an rdql query - * with the namespaces declared in the USING clause and default namespaces. - * - * @access private - */ - function replaceNamespacePrefixes() { - - global $default_prefixes; - - if (!isset($this->parsedQuery['ns'])) - $this->parsedQuery['ns'] = array(); - - // add default namespaces - // if in an rdql query a reserved prefix (e.g. rdf: rdfs:) is used - // it will be overridden by the default namespace defined in constants.php - $this->parsedQuery['ns'] = array_merge($this->parsedQuery['ns'], $default_prefixes); - - // replace namespace prefixes in the FROM clause - if (isset($this->parsedQuery['sources'])) - foreach ($this->parsedQuery['sources'] as $n => $source) { - if (isset($source['is_qname'])) - $this->parsedQuery['sources'][$n] = $this->_replaceNamespacePrefix($source['value'], RDQL_SRC_ERR); - else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $source['value'] = eregi_replace("$prefix:", $uri, $source['value']); - $this->parsedQuery['sources'][$n] = $source['value']; - } - - } - - // replace namespace prefixes in the where clause - foreach ($this->parsedQuery['patterns'] as $n => $pattern) { - foreach ($pattern as $key => $v) - if ($v['value'] && $v['value']{0} != '?') { - if (isset($v['is_qname'])) { - $this->parsedQuery['patterns'][$n][$key]['value'] - = $this->_replaceNamespacePrefix($v['value'], RDQL_WHR_ERR); - unset($this->parsedQuery['patterns'][$n][$key]['is_qname']); - } else { // is quoted URI (== ) or Literal - if (isset($this->parsedQuery['patterns'][$n][$key]['is_literal'])) { - if (isset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname'])) { - $this->parsedQuery['patterns'][$n][$key]['l_dtype'] - = $this->_replaceNamespacePrefix($v['l_dtype'], RDQL_WHR_ERR); - unset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname']); - }else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['patterns'][$n][$key]['l_dtype'] - = eregi_replace("$prefix:", $uri, $this->parsedQuery['patterns'][$n][$key]['l_dtype']); - } - }else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['patterns'][$n][$key]['value'] - = eregi_replace("$prefix:", $uri, $this->parsedQuery['patterns'][$n][$key]['value']); - } - } - } - } - - // replace prefixes in the constraint clause - if (isset($this->parsedQuery['filters'])) - foreach ($this->parsedQuery['filters'] as $n => $filter) - foreach ($filter['strEqExprs'] as $i => $expr) { - if ($expr['value_type'] == 'QName') { - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value'] - = $this->_replaceNamespacePrefix($expr['value'], RDQL_AND_ERR); - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_type'] = 'URI'; - } - if ($expr['value_type'] == 'URI') - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value'] - = eregi_replace("$prefix:", $uri, - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']); - elseif ($expr['value_type'] == 'Literal') { - if (isset($expr['value_dtype_is_qname'])) { - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype'] - = $this->_replaceNamespacePrefix($expr['value_dtype'], RDQL_AND_ERR); - unset($this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype_is_qname']); - } else { - foreach ($this->parsedQuery['ns'] as $prefix => $uri) - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype'] - = eregi_replace("$prefix:", $uri, - $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']); - } - } - } - - unset($this->parsedQuery['ns']); - } - - -// ============================================================================= -// *************************** helper functions ******************************** -// ============================================================================= - - -/** - * Remove whitespace-tokens from the array $this->tokens - * - * @access private - */ - function _clearWhiteSpaces() { - - while (current($this->tokens) == ' ' || - current($this->tokens) == "\n" || - current($this->tokens) == "\t" || - current($this->tokens) == "\r") - - unset($this->tokens[key($this->tokens)]); - } - - -/** - * Check if the query string of the given clause contains an undesired ','. - * If a comma was correctly placed then remove it and clear all whitespaces. - * - * @param string $commaExpected - * @param string $clause_error - * @throws PHPError - * @access private - */ - function _checkComma($commaExpected, $clause_error) { - - $this->_clearWhiteSpaces(); - if (current($this->tokens) == ',') { - if (!$commaExpected) - trigger_error($clause_error ."',' - unexpected comma", E_USER_ERROR); - else { - unset($this->tokens[key($this->tokens)]); - $this->_checkComma(FALSE, $clause_error); - } - } - } - - -/** - * Check if the given token is either a variable (?var) or the first token of an URI (). - * In case of an URI this function returns the whole URI string. - * - * @param string $token - * @return array ['value'] = string - * @throws PHPError - * @access private - */ - function _validateVarUri($token) { - - if ($token{0} == '?') { - $token_res['value'] = $this->_validateVar($token, RDQL_WHR_ERR); - } else { - $token_res['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - if ($token{0} != '<') - $token_res['is_qname'] = TRUE; - } - return $token_res; - } - - -/** - * Check if the given token is either a variable (?var) or the first token - * of either an URI () or a literal ("Literal"). - * In case of a literal return an array with literal properties (value, language, datatype). - * In case of a variable or an URI return only ['value'] = string. - * - * @param string $token - * @return array ['value'] = string - * ['is_qname'] = boolean - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * @throws PHPError - * @access private - */ - function _validateVarUriLiteral($token) { - - if ($token{0} == '?') - $statement_object['value'] = $this->_validateVar($token, RDQL_WHR_ERR); - elseif ($token{0} == "'" || $token{0} == '"') - $statement_object = $this->_validateLiteral($token); - elseif ($token{0} == '<') - $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - elseif (ereg(':', $token)) { - $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR); - $statement_object['is_qname'] = TRUE; - }else - trigger_error(RDQL_WHR_ERR ." '$token' - ?Variable, <URI>, QName, or \"LITERAL\" expected", E_USER_ERROR); - return $statement_object; - } - - -/** - * Check if the given token is a valid variable name (?var). - * - * @param string $token - * @param string $clause_error - * @return string - * @throws PHPError - * @access private - */ - function _validateVar($token, $clause_error) { - - preg_match("/\?[a-zA-Z0-9_]+/", $token, $match); - if (!isset($match[0]) || $match[0] != $token) - trigger_error($clause_error ."'" .htmlspecialchars($token) - ."' - variable name contains illegal characters", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $token; - } - - -/** - * Check if $token is the first token of a valid URI () and return the whole URI string - * - * @param string $token - * @param string $clause_error - * @return string - * @throws PHPError - * @access private - */ - function _validateUri($token, $clause_error) { - - if ($token{0} != '<') { - if (strpos($token, ':') && $this->_validateQName($token, $clause_error)) { - unset($this->tokens[key($this->tokens)]); - return rtrim($token, ':'); - } - $errmsg = $clause_error .'\'' .htmlspecialchars($token) .'\' '; - if ($clause_error == RDQL_WHR_ERR) - $errmsg .= "- ?Variable or <URI> or QName expected"; - else - $errmsg .= "- <URI> or QName expected"; - trigger_error($errmsg, E_USER_ERROR); - }else{ - $token_res = $token; - while($token{strlen($token)-1} != '>' && $token != NULL) { - if ($token == '(' || $token == ')' || $token == ',' || - $token == ' ' || $token == "\n" || $token == "\r") { - trigger_error($clause_error .'\'' .htmlspecialchars($token_res) - ."' - illegal input: '$token' - '>' missing", E_USER_ERROR); - } - unset($this->tokens[key($this->tokens)]); - $token = current($this->tokens); - $token_res .= $token; - } - if ($token == NULL) - trigger_error($clause_error .'\'' .htmlspecialchars($token_res) ."' - '>' missing", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return trim($token_res, '<>'); - } - } - - -/** - * Check if $token is the first token of a valid literal ("LITERAL") and - * return an array with literal properties (value, language, datatype). - * - * @param string $token - * @return array ['value'] = string - * ['is_literal'] = boolean - * ['l_lang'] = string - * ['l_dtype'] = string - * ['l_dtype_is_qname'] = boolean - * @throws PHPError - * @access private - */ - function _validateLiteral($token) { - - $quotation_mark = $token{0}; - $statement_object = array ('value' => '', - 'is_literal' => TRUE, - 'l_lang' => '', - 'l_dtype' => ''); - $this->tokens[key($this->tokens)] = substr($token,1); - - $return = FALSE; - foreach ($this->tokens as $k => $token) { - - if ($token != NULL && $token{strlen($token)-1} == $quotation_mark) { - $token = rtrim($token, $quotation_mark); - $return = TRUE; - - // parse @language(^^datatype)? - }elseif (strpos($token, $quotation_mark .'@') || substr($token, 0, 2) == $quotation_mark .'@') { - $lang = substr($token, strpos($token, $quotation_mark .'@')+2); - if (strpos($lang, '^^') || substr($lang, 0,2) == '^^') { - $dtype = substr($lang, strpos($lang, '^^')+2); - if (!$dtype) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - datatype expected" ,E_USER_ERROR); - - $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR); - if ($dtype{0} != '<') - $statement_object['l_dtype_is_qname'] = TRUE; - - $lang = substr($lang, 0, strpos($lang, '^^')); - } - if (!$lang) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - language expected" ,E_USER_ERROR); - $statement_object['l_lang'] = $lang; - $token = substr($token, 0, strpos($token, $quotation_mark .'@')); - $return = TRUE; - - // parse ^^datatype - }elseif (strpos($token, $quotation_mark .'^^') || substr($token, 0, 3) == $quotation_mark .'^^') { - $dtype = substr($token, strpos($token, $quotation_mark .'^^')+3); - if (!$dtype) - trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value'] - .$token ." - datatype expected" ,E_USER_ERROR); - - $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR); - if ($dtype{0} != '<') - $statement_object['l_dtype_is_qname'] = TRUE; - - $token = substr($token, 0, strpos($token, $quotation_mark .'^^')); - $return = TRUE; - }elseif (strpos($token, $quotation_mark)) - trigger_error(RDQL_WHR_ERR ."'$token' - illegal input", E_USER_ERROR); - $statement_object['value'] .= $token; - unset($this->tokens[$k]); - if ($return) - return $statement_object; - } - trigger_error(RDQL_WHR_ERR ."quotation end mark: $quotation_mark missing", E_USER_ERROR); - } - - -/** - * Check if the given token is a valid QName. - * - * @param string $token - * @param string $clause_error - * @return boolean - * @throws PHPError - * @access private - */ -function _validateQName($token, $clause_error) { - - $parts = explode(':', $token); - if (count($parts) > 2) - trigger_error($clause_error ."illegal QName: '$token'", E_USER_ERROR); - if (!$this->_validateNCName($parts[0])) - trigger_error($clause_error ."illegal prefix in QName: '$token'", E_USER_ERROR); - if ($parts[1] && !$this->_validateNCName($parts[1])) - trigger_error($clause_error ."illegal local part in QName: '$token'", E_USER_ERROR); - - return TRUE; -} - - -/** - * Check if the given token is a valid NCName. - * - * @param string $token - * @return boolean - * @access private - */ -function _validateNCName($token) { - - preg_match("/[a-zA-Z_]+[a-zA-Z_0-9.\-]*/", $token, $match); - if (isset($match[0]) && $match[0] == $token) - return TRUE; - return FALSE; -} - - -/** - * Check if the given token is a valid namespace prefix. - * - * @param string $token - * @return string - * @throws PHPError - * @access private - */ - function _validatePrefix($token) { - - if (!$this->_validateNCName($token)) - trigger_error(RDQL_USG_ERR ."'" .htmlspecialchars($token) - ."' - illegal input, namespace prefix expected", E_USER_ERROR); - unset($this->tokens[key($this->tokens)]); - return $token; - } - -/** - * Replace a prefix in a given QName and return a full URI. - * - * @param string $qName - * @param string $clasue_error - * @return string - * @throws PHPError - * @access private - */ - function _replaceNamespacePrefix($qName, $clause_error) { - - $qName_parts = explode(':', $qName); - if (!array_key_exists($qName_parts[0], $this->parsedQuery['ns'])) - trigger_error($clause_error .'undefined prefix: \'' .$qName_parts[0] .'\' in: \'' .$qName .'\'', E_USER_ERROR); - return $this->parsedQuery['ns'][$qName_parts[0]] .$qName_parts[1]; - } - - -/** - * Check if all variables from the SELECT clause are defined in the WHERE clause - * - * @access private - */ - function _checkSelectVars() { - - foreach ($this->parsedQuery['selectVars'] as $var) - $this->_isDefined($var); - } - - -/** - * Check if the given variable is defined in the WHERE clause. - * - * @param $var string - * @return string - * @throws PHPError - * @access private - */ - function _isDefined($var) { - - $allQueryVars = $this->findAllQueryVariables(); - - if (!in_array($var, $allQueryVars)) - trigger_error(RDQL_SYN_ERR .": '$var' - variable must be defined in the WHERE clause", E_USER_ERROR); - return $var; - } - - -/** - * Throw an error if the regular expression from the AND clause is not quoted. - * - * @param string $filterString - * @param string $lQuotMark - * @param string $rQuotMark - * @throws PHPError - * @access private - */ - function _checkRegExQuotation($filterString, $lQuotMark, $rQuotMark) { - - if (!$lQuotMark) - trigger_error(RDQL_AND_ERR ."'$filterString' - regular expressions must be quoted", E_USER_ERROR); - - if ($lQuotMark != $rQuotMark) - trigger_error(RDQL_AND_ERR ."'$filterString' - quotation end mark in the regular expression missing", E_USER_ERROR); - } - -} // end: Class RdqlParser - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlResultIterator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlResultIterator.php deleted file mode 100755 index 8a662e12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/rdql/RdqlResultIterator.php +++ /dev/null @@ -1,193 +0,0 @@ -, Chris Bizer - * - * @package rdql - * @access public - * - */ - class RdqlResultIterator extends Object { - - /** - * Reference to the Rdql result - * @var array RdqlResult - * @access private - */ - var $RdqlResult; - - /** - * Current position - * RdqlResultIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single Rdql result. - * @var integer - * @access private - */ - var $position; - - - /** - * Constructor - * - * @param object RdqlResult - * @access public - */ - function RdqlResultIterator(&$RdqlResult) { - - $noResult = TRUE; - foreach($RdqlResult[0] as $value) - if ($value != NULL) { - $noResult = FALSE; - break; - } - - if($noResult) - $this->RdqlResult = NULL; - else - $this->RdqlResult = $RdqlResult; - - $this->position = -1; - } - - /** - * Returns the labels of the result as array. - * @return array of strings with the result labels OR null if there are no results. - * @access public - */ - function getResultLabels() { - if(count($this->RdqlResult)>0) { - return array_keys($this->RdqlResult[0]); - } else return null; - } - - /** - * Returns the number of results. - * @return integer - * @access public - */ - function countResults() { - - return count($this->RdqlResult); - - } - /** - * Returns TRUE if there are more results. - * @return boolean - * @access public - */ - function hasNext() { - if ($this->position < count($this->RdqlResult) - 1 ) { - return TRUE; - } else { - return FALSE; - } - } - - /** - * Returns TRUE if the first result has not been reached. - * @return boolean - * @access public - */ - function hasPrevious() { - if ($this->position > 0) { - return TRUE; - } else { - return FALSE; - } } - - /** - * Returns the next result array. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function next($element = null) { - if ($this->position < count($this->RdqlResult) - 1) { - $this->position++; - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Returns the previous result. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function previous($element = null) { - if ($this->position > 0) { - $this->position--; - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Returns the current result. - * @param integer $element - * @return result array OR single result if $element was specified OR NULL if there is no next result. - * @access public - */ - function current($element = null) { - if (($this->position >= 0) && ($this->position < count($this->RdqlResult))) { - if ($element) {return $this->RdqlResult[$this->position][$element];} - else return $this->RdqlResult[$this->position]; - } else { - return NULL; - } - } - - /** - * Moves the pointer to the first result. - * @return void - * @access public - */ - function moveFirst() { - $this->position = 0; - } - - /** - * Moves the pointer to the last result. - * @return void - * @access public - */ - function moveLast() { - $this->position = count($this->RdqlResult) - 1; - } - - /** - * Moves the pointer to a specific result. - * If you set an off-bounds value, next(), previous() and current() will return NULL - * @return void - * @access public - */ - function moveTo($position) { - $this->position = $position; - } - - /** - * Returns the current position of the iterator. - * @return integer - * @access public - */ - function getCurrentPosition() { - return $this->position; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/all-wcprops deleted file mode 100755 index cc5b3f60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 62 -/svnroot/rdfapi-php/!svn/ver/522/trunk/rdfapi-php/api/resModel -END -ResAlt.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResAlt.php -END -ResModel.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/562/trunk/rdfapi-php/api/resModel/ResModel.php -END -ResModelP.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResModelP.php -END -ResContainer.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResContainer.php -END -ResProperty.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResProperty.php -END -ResResource.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResResource.php -END -ResSeq.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResSeq.php -END -ResBag.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResBag.php -END -ResIterator.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/522/trunk/rdfapi-php/api/resModel/ResIterator.php -END -ResList.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResList.php -END -ResLiteral.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/resModel/ResLiteral.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/entries deleted file mode 100755 index 41c13a43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/entries +++ /dev/null @@ -1,171 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/resModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-08-14T09:22:22.680195Z -522 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ResAlt.php -file - - - - -2008-02-29T14:57:48.787146Z -e8801d9e4af46f7486692045db0f3caf -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResModel.php -file -562 - - - -2008-02-29T15:30:18.380615Z -6b8ab5cac9f16867ea0a8febd2a735c5 -2008-02-29T15:30:18.223618Z -562 -cax -has-props - -ResModelP.php -file - - - - -2008-02-29T14:57:48.802766Z -29b5e81c2303064f2003c4e8655ae527 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResContainer.php -file - - - - -2008-02-29T14:57:48.802766Z -553a34d72326fefa13710a3736ac5436 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResProperty.php -file - - - - -2008-02-29T14:57:48.818387Z -46856026754e0f2963d8b7e16851b683 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResResource.php -file - - - - -2008-02-29T14:57:48.818387Z -8bed519062c9cb629c21521e4261623b -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResSeq.php -file - - - - -2008-02-29T14:57:48.834007Z -11abc64933d31c26ec1baf469e4eb1a5 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResBag.php -file - - - - -2008-02-29T14:57:48.834007Z -12a922eb46b8c463b3871348a29bdc51 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResIterator.php -file - - - - -2008-02-29T14:57:48.849628Z -cc4dfa5b25a4806cf60d40b10cedec7b -2007-08-14T09:22:22.680195Z -522 -cweiske -has-props - -ResList.php -file - - - - -2008-02-29T14:57:48.849628Z -ea5928a8f2ba8bbefb7d38bd4182aa1a -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResLiteral.php -file - - - - -2008-02-29T14:57:48.865249Z -b0ce56aa73ea6d64d7e87b407bbe3739 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResAlt.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResAlt.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResAlt.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResBag.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResBag.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResBag.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResContainer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResContainer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResContainer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResIterator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResIterator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResList.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResList.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResList.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResLiteral.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResLiteral.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResLiteral.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModelP.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResModelP.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResProperty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResProperty.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResProperty.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResResource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResResource.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResResource.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResSeq.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResSeq.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/prop-base/ResSeq.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResAlt.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResAlt.php.svn-base deleted file mode 100755 index 9f6859bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResAlt.php.svn-base +++ /dev/null @@ -1,78 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResAlt extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResAlt($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_ALT); - } - - /** - * Return the default value for this resource - * - * @return object ResResource/ResLiteral - * @access public - */ - function getDefault() - { - //get the first memeber - $statements=$this->listProperties($this->_getMembershipPropertyWithIndex(1)); - if(isset($statements[0])) - { - //return the value - return $statements[0]->getObject(); - } else - { - return null; - } - } - - /** - * Set the default value of this container. - * - * @param object ResResource/ResLiteral $object - * @access public - */ - function setDefault($object) - { - //remember the old default value - $oldDefaultObject=$this->getDefault(); - //if there wasn't a default value before - if($oldDefaultObject === null) - { - //add the new value - $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object); - } else - { - //remove the old value - $this->removeAll($this->_getMembershipPropertyWithIndex(1)); - //set the new value - $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object); - //add the old default value at the end - $this->add($oldDefaultObject); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResBag.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResBag.php.svn-base deleted file mode 100755 index 563d2e2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResBag.php.svn-base +++ /dev/null @@ -1,32 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResBag extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResBag($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_BAG); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResContainer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResContainer.php.svn-base deleted file mode 100755 index e46f41f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResContainer.php.svn-base +++ /dev/null @@ -1,219 +0,0 @@ - -* -* @package resModel -* @access public -**/ - -class ResContainer extends ResResource -{ - /** - * Holds a ResResource of this container type rdf:Seq, rdf:Alt, or rdf:Bag - * @var ResResource - * @access private - */ - var $containerType; - - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResContainer($uri = null) - { - parent::ResResource($uri); - } - - /** - * Add a new value to a container. - * The new value is added as the last element of the container. - * - * @param object ResResource/ResLiteral $object - * @access public - */ - function add($object) - { - //type this container, if it isn't already typed - if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE))) - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType); - //get the current size - $actualSize=$this->size(); - //add the object to the last position - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.'_'.($actualSize+1)),$object); - } - - /** - * Determine whether the container contains a value - * - * @param obejct ResResource/ResLiteral $resResource - * @return boolean - * @access public - */ - function contains($resResource) - { - //get all container's properties - foreach ($this->listProperties() as $statement) - { - //if the property matches a container membership property - if ($this->_predicateLabelMatchesMembershipProperty($statement->getLabelPredicate())) - { - //check, if it's the value, we're looking for. - if ($resResource->equals($statement->getObject())) - return true; - } - } - return false; - } - - /** - * Returns true, if this resource is a container from type rdf:Alt - * - * @return boolean - * @access public - */ - function isAlt() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_ALT); - } - - /** - * Returns true, if this resource is a container from type rdf:Bag - * - * @return boolean - * @access public - */ - function isBag() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_BAG); - } - - /** - * Returns true, if this resource is a container from type rdf:Seq - * - * @return boolean - * @access public - */ - function isSeq() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_SEQ); - } - - /** - * Get an array of all resources that are values of this container - * - * @return array - * @access public - */ - function getMembers() - { - $return=array(); - foreach ($this->listProperties() as $statement) - { - $predicateLabel=$statement->getLabelPredicate(); - if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel)) - { - $return[$this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)] = $statement->getObject(); - } - } - return $return; - } - - /** - * Remove a value from the container. - * - * Once removed, the values in the container with a higher ordinal value are renumbered. - * The renumbering algorithm depends on the type of container. - * - * @param obejct ResResource/ResLiteral $resResource - * @access public - */ - function remove($object) - { - $deleteFromIndex=array(); - //get all container members - $memberIndex=$this->getMembers(); - - //check each container member if it equals the resoure to be removed - foreach ($memberIndex as $key => $value) - { - //save the statements positio in the container - if($object->equals($value)) - $deleteFromIndex[]=$key; - } - - //delete all found container members - foreach ($deleteFromIndex as $index) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - - //renumber all members with higher ordinal numbers than the deleted one - for ($i = $index;$i < count($memberIndex); $i++) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i+1)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]); - } - } - - } - - /** - * Returns the number values in the container. - * - * @return integer - * @access public - */ - function size() - { - return count($this->getMembers()); - } - - /** - * Checks, if a predicate label fits a container membership property rdf:_n - * - * @param string $predicateLabel - * @return boolean - * @access private - */ - function _predicateLabelMatchesMembershipProperty($predicateLabel) - { - return substr($predicateLabel,0,strlen(RDF_NAMESPACE_URI.'_')) == RDF_NAMESPACE_URI.'_'; - } - - /** - * Get the ordinal number from a membership property rdf:_n - * - * @param string $predicateLabel - * @return integer - * @access private - */ - function _getMemberIndexNrFromMembershipPropertyLabel($predicateLabel) - { - return (int)substr($predicateLabel,strlen(RDF_NAMESPACE_URI.'_')); - } - - /** - * Get a membership property rdf:_n with index $int - * - * @param intger $int - * @return string - * @access private - */ - function _getMembershipPropertyWithIndex($int) - { - return new ResResource(RDF_NAMESPACE_URI.'_'.$int); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResIterator.php.svn-base deleted file mode 100755 index b43bf2cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResIterator.php.svn-base +++ /dev/null @@ -1,298 +0,0 @@ -listInstances(); -* for ($it->rewind(); $it->valid(); $it->next()) -* { -* $currentResource=$it->current(); -* }; -* -* -* @version $Id$ -* @author Daniel Westphal -* -* -* @package resModel -* @access public -**/ -class ResIterator -{ - /** - * Holds a reference to the assoiated ResModel / OntModel - * @var object Model - * @access private - */ - var $associatedModel; - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid - * @var boolean - * @access private - */ - var $valid; - - /** - * The current resource - * @var obejct ResResource - * @access private - */ - var $currentResource; - - /** - * The subject to search for. - * @var object ResResource - * @access private - */ - var $searchSubject; - - /** - * The predicate to search for. - * @var object ResResource - * @access private - */ - var $searchPredicate; - - /** - * The object to search for. - * @var object ResResource - * @access private - */ - var $searchObject; - - /** - * If the resource, we're intrested in is the subject (s), predicate(p), - * or object (o) of the found statements - * - * @var string - * @access private - */ - var $getSPO; - - /** - * Defines the type of resource, we'd like to receive. - * - * @var string - * @access private - */ - var $returnType; - - /** - * If set, each resource will first be checked, if it's - * language fits. - * - * @var string - * @access private - */ - var $findLiteralWithLang; - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like inf find(). - * $getSPO supports the strings 's', 'p', and 'o' to return - * either the subject, predicate, or object of the result statements. - * $returnType supports the strings 'ResProperty', 'ResLiteral', - * 'OntProperty', 'OntClass', and 'Individual' and returns the resources - * as the matching type. - * - * @param object ResResource $subject - * @param object ResResource $predicate - * @param object ResResource $object - * @param string $getSPO - * @param object ResModel $associatedModel - * @param string $returnType - * @access public - */ - function ResIterator($subject,$predicate,$object,$getSPO,& $associatedModel,$returnType = false) - { - $this->searchSubject =& $subject; - $this->searchPredicate =& $predicate; - $this->searchObject =& $object; - $this->getSPO = $getSPO; - $this->returnType = $returnType; - $this->associatedModel =& $associatedModel; - $this->findLiteralWithLang = false; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->key++; - $this->valid=($this->_getNextResource()); - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function current() - { - return $this->currentResource; - } - - /** - * Returns the next Resource (subject, predicate, - * or object of the next matching statement). - * - * @return object resResource - * @access private - */ - function _getNextResource() - { - if ($this->findLiteralWithLang) - { - do - { - $nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key); - if ($nextStatement === null) - return false; - - $object = $nextStatement->getObject(); - if ($object->getLanguage() != $this->findLiteralWithLang) - { - $hasCorrectLanguage=false; - $this->key++; - } else - { - $hasCorrectLanguage=true; - } - - } while (!$hasCorrectLanguage); - } else - { - $nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key); - } - if ($nextStatement === null) - return false; - - switch ($this->getSPO) - { - case 's': - $this->currentResource = $this->_getResourceAs($nextStatement->getSubject()); - break; - - case 'p': - $this->currentResource = $this->_getResourceAs($nextStatement->getPredicate()); - break; - - case 'o': - $this->currentResource = $this->_getResourceAs($nextStatement->getObject()); - break; - } - return (true); - } - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } - - /** - * Sets that only Literals with the matching - * language should be returned - * - * @param string - * @access public - */ - function setFindLiteralWithLang($language) - { - $this->findLiteralWithLang = $language; - } - - /** - * Returns the $resource as an instance of the type - * specified in $this->returnType. - * - * @param object ResResource - * @return object ResResource - * @access private - */ - function _getResourceAs($resource) - { - if ($this->findLiteralWithLang && $resource->getLanguage() != $this->findLiteralWithLang) - $this->_getNextResource(); - - if($this->returnType) - switch ($this->returnType) { - - case 'ResProperty': - return $this->associatedModel->createProperty($resource->getLabel()); - break; - - case 'ResLiteral': - $newLiteral = $this->associatedModel->createLiteral($resource->getLabel(),$resource->getLanguage()); - $newLiteral->setDatatype($resource->getDatatype()); - return $newLiteral; - break; - - case 'OntProperty': - - return $this->associatedModel->createOntProperty($resource->getLabel()); - break; - - case 'OntClass': - return $this->associatedModel->createOntClass($resource->getLabel()); - break; - - case 'Individual': - return $this->associatedModel->createIndividual($resource->getLabel()); - break; - } - return $resource; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResList.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResList.php.svn-base deleted file mode 100755 index 3265470a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResList.php.svn-base +++ /dev/null @@ -1,635 +0,0 @@ - - -* -* @package resModel -* @access public -*/ -class ResList extends ResResource -{ - /** - * Holds a ResResource with the uri rdf:rest - * @var ResResource - * @access private - */ - var $rdfRestResource; - - /** - * Holds a ResResource with the uri rdf:first - * @var ResResource - * @access private - */ - var $rdfFirstResource; - - /** - * Holds a ResResource with the uri rdf:nil - * @var ResResource - * @access private - */ - var $rdfNilResource; - - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResList($uri = null) - { - //call the parent's constructor - parent::ResResource($uri); - //initialize vars - $this->rdfRestResource = new ResResource(RDF_NAMESPACE_URI.RDF_REST); - $this->rdfFirstResource = new ResResource(RDF_NAMESPACE_URI.RDF_FIRST); - $this->rdfNilResource = new ResResource(RDF_NAMESPACE_URI.RDF_NIL); - } - - /** - * Returns the value of the list element at the specified position or null. - * - * @param integer $position - * @return ResResource - * @access public - */ - function get($position) - { - //init - $listElement=$this; - //walk through the list until the position in the list is reached - for ($i=0;$i<$position;$i++) - { - $listElement=$this->_getRestElement($listElement); - if($listElement===null) - return null; - } - //return the associated value - return $this->_getValue($listElement); - } - - /** - * Add the given value to the end of the list. - * it is only defined if this is not the empty list. - * - * @param object ResResource $resource - * @return boolean - * @access public - */ - function add($resource) - { - //return false if this list is the empty list - if($this->uri==RDF_NAMESPACE_URI.RDF_NIL) - return false; - - //if this is the first value - if ($this->isEmpty()) - { - $newLastElement =& $this; - } else - //if there are other values in the list - { - //get the last list element - $lastElement=$this->_getListElement(); - //remove the rdf:rest property - $lastElement->removeAll($this->rdfRestResource); - //create a new list element - $newLastElement=$this->model->createResource(); - //concatenate the new list element with the list - $lastElement->addProperty($this->rdfRestResource,$newLastElement); - } - //add the value - $newLastElement->addProperty($this->rdfFirstResource,$resource); - //ad the rdf:nil property to the last list element - $newLastElement->addProperty($this->rdfRestResource,$this->rdfNilResource); - - return true; - } - - /** - * Update the head of the list to have the given value, - * and return the previous value. - * - * @param object ResResource $value - * @return ResResource - * @access public - */ - //todo: error handling, when empty list - function setHead($value) - { - //save the old value - $oldValue=$this->getHead(); - //remove the old value - $this->removeAll($this->rdfFirstResource); - //add the new value - $this->addProperty($this->rdfFirstResource,$value); - - //return the old value - return $oldValue; - } - - /** - * Get the value that is associated with the head of the list. - * - * @return ResResource - * @access public - */ - //todo: error handling, falls empty list - function getHead() - { - return $this->_getValue($this); - } - - /** - * Remove the head of the list. The tail of the list - * remains in the model. Note that no changes are made to - * list cells that point to this list cell as their tail. - * - * @return ResList - * @access public - */ - function removeHead() - { - //get the second list element - $rest=$this->_getRestElement($this); - //remove the first element - $this->removeAll($this->rdfFirstResource); - $this->removeAll($this->rdfRestResource); - //change this Resource URI to that of the second list element - //thus makin it the fist element - $this->uri=$rest->getURI(); - - //return the new list - return $this; - } - - /** - * Get the Position of the first occurrence of the given value in the list, - * or -1 if the value is not in the list. - * You can supply an offset to search for values. (First element has offset 0) - * Default is 0 - * - * @param object ResResource $resource - * @param integer $offset - * @return integer - * @access public - */ - function indexOf($resource, $offset = 0) - { - //init - $element=$this; - $actualIndex=0; - - //walk through the list until the value is found and the position is higher than - //the offset - while ($actualIndex < $offset || !$resource->equals($this->_getValue($element))) - { - //get next list element - $element=$this->_getRestElement($element); - $actualIndex++; - - //if the end of the list is reached and the value isn't found - if ($element===null) - return null; - } - //return the index value - return $actualIndex; - } - - /** - * Replace the value at the i'th position in the list with the given value - * - * @param integer $index - * @param object ResResource $resource - * @return object ResResource - * @access public - */ - function replace($index, $resource) - { - //get the list element at the $index position - $listElement=$this->_getListElement($index); - //get the old value - $oldValue=$this->_getValue($listElement); - //remove the old value - $listElement->removeAll($this->rdfFirstResource); - //add the new value - $listElement->addProperty($this->rdfFirstResource,$resource); - //return the old value - return $oldValue; - } - - /** - * Answer true if the given node appears as the value of a value - * of any of the cells of this list. - * - * @param object ResResource $value - * @return boolean - * @access public - */ - function contains($value) - { - //return true, if a position was found. - $result=$this->indexOf($value); - return ($result!==null); - } - - /** - * Get the list that is the tail of this list. - * - * @return object ResList - * @access public - */ - function getTail() - { - //get the second list element - $nextListElement= $this->_getRestElement($this); - //return the second element as new list - return $this->model->createList($nextListElement->getURI()); - } - - /** - * Remove all of the components of this list from the model. - * Note that this is operation is only removing the list cells - * themselves, not the resources referenced by the list - - * unless being the object of an rdf:first statement is the - * only mention of that resource in the model. - * - * @return boolean - * @access public - */ - function removeList() - { - $element=$this; - - while ($element!==null) - { - $nextElement=$this->_getRestElement($element); - - $element->removeAll($this->rdfFirstResource); - $element->removeAll($this->rdfRestResource); - - if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL)) - { - $element=$nextElement; - } else - { - return true; - } - } - return false; - } - - /** - * Returns true, if this list is empty - * - * @param object Statement $statement - * @return integer - * @access public - */ - function isEmpty() - { - return !$this->hasProperty($this->rdfFirstResource); - } - - /** - * Get all values in the list as an array of ResResources - * - * @return array - * @access public - */ - function getContentInArray() - { - $result=array(); - $element=$this; - - while ($element!==null) - { - //add the value of the current element to the result if is set. - $value=$this->_getValue($element); - if ($value!==null) - $result[]=$value; - - //walk through the list until it's end - $nextElement=$this->_getRestElement($element); - if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL)) - { - $element=$nextElement; - } else - { - break; - } - } - //return the result - return $result; - } - - /** - * Change the tail of this list to point to the given list, so that this list - * becomes the list of the concatenation of the elements of - * both lists. This is a side-effecting operation on this list; - * for a non side-effecting alternative, see append. - * - * - * @param object ResList $ResList - * @access public - */ - function concatenate($ResList) - { - //get the last list element - $lastElement=$this->_getListElement(); - //remove the old tail (rdf:nil) - $lastElement->removeAll($this->rdfRestResource); - //add the $ResList as new tail - $lastElement->addProperty($this->rdfRestResource,$ResList); - } - - /** - * Answer a new list that is formed by adding each element of - * this list to the head of the given list. This is a non - * side-effecting operation on either this list or the given - * list, but generates a copy of this list. For a more storage - * efficient alternative, see concatenate - * - * @param object ResList $ResList - * @return object ResList - * @access public - */ - function append($resList) - { - //get a copy of this list - $newList=$this->copy(); - - //add all values from the $resList to the new list - foreach ($resList->getContentInArray() as $value) - { - $newList->add($value); - } - //return the new list - return $newList; - } - - /** - * Answer a list that contains all of the elements of this - * list in the same order, but is a duplicate copy in the - * underlying model. - * - * @return object ResList - * @access public - */ - function copy() - { - //create a new list in the model - $newList=$this->model->createList(); - //add all values from this list to the new list - foreach ($this->getContentInArray() as $value) - { - $newList->add($value); - } - //return the new list - return $newList; - } - - /** - * Return a reference to a new list cell whose head is value - * and whose tail is this list. - * - * @param object ResResource $value - * @return object ResList - * @access public - */ - function cons($value) - { - //create a new list - $newList=$this->model->createList(); - //add the new value - $newList->add($value); - //set this list as the tail of the new list - $newList->setTail($this); - - //return the new list - return $newList; - } - - /** - * Update the list cell at the front of the list to have the - * given list as tail. The old tail is returned, and remains - * in the model. - * - * @param object ResList $resList - * @return object Reslist - * @access public - */ - function setTail($resList) - { - //save the old tail - $oldTail=$this->getTail(); - //remove the old tail - $this->removeAll($this->rdfRestResource); - //add the $resList as new Tail - $this->addProperty($this->rdfRestResource,$resList); - - //return the old tail - return $oldTail; - } - - /** - * Answer true if this list has the same elements in the - * same order as the given list. Note that the standard equals - * test just tests for equality of two given list cells. - * While such a test is sufficient for many purposes, this - * test provides a broader equality definition, but is - * correspondingly more expensive to test. - * - * @param object ResList $resList - * @return boolean - * @access public - */ - function sameListAs($resList) - { - //init - $indexPos=0; - do - { - //get the values for both lists at the actual position - $thisValue=$this->get($indexPos); - $thatValue=$resList->get($indexPos); - //if the values aren't equal, return false - if (($thisValue !== null) && !$thisValue->equals($thatValue)) - return false; - - $indexPos++; - //walk until this list reaches a null value (end) - } while ($thisValue!==null); - - //if the other list has a null value at this position too, return true - //else return false - return ($thatValue===null); - } - - /** - * Remove the given value from this list. - * If value does not occur in the list, no action is taken. Since removing the - * head of the list will invalidate the list head cell, in - * general the list must return the list that results from - * this operation. However, in many cases the return value - * will be the same as the object that this method is invoked - * on. - * - * @param object ResResource $value - * @return object ResList - * @access public - */ - function remove($value) - { - //if the value is the value of the first list element(head) - //call the remove head position and return the new head - if ($value->equals($this->_getValue($this))) - return $this->removeHead(); - - $element=$this; - do - { - $newElement=$this->_getRestElement($element); - - //if the value equals the value of the current list element - if ($newElement !== null && $value->equals($this->_getValue($newElement))) - { - //remove the link to the list element to be removed - $element->removeAll($this->rdfRestResource); - //add a link to the list element AFTER the element to be deleted - $element->addProperty($this->rdfRestResource,$this->_getRestElement($newElement)); - //remove the list element with values - $newElement->removeAll($this->rdfFirstResource); - $newElement->removeAll($this->rdfRestResource); - //return this ResList - return $this; - } - $element=$newElement; - } while ($element!==null); - //return this list - return $this; - } - - /** - * Answer true if the list is well-formed, by checking that each - * node is correctly typed, and has a head and tail pointer from - * the correct vocabulary - * - * @return boolean - * @access public - */ - function isValid() - { - $element=$this; - if ($this->_getValue($this)=== null && $this->_getRestElement($this) === null) - return true; - do - { - //return true if the last element is a rdf:nil - if ($element->getURI() == RDF_NAMESPACE_URI.RDF_NIL) - return true; - //return false, if the current element has no associated value - if ($this->_getValue($element) === null) - return false; - - $element=$this->_getRestElement($element); - } while ($element !== null); - //return false, if the current element has no rdf:rest property - return false; - } - - /** - * Get the associated rdf:rest Resource from the suplied ResList element - * - * @param object ResList $listElement - * @return object ResList - * @access private - */ - function _getRestElement($listElement) - { - //get the rdf:rest property - $statement= $this->model->getProperty($listElement,$this->rdfRestResource); - //return null, if this property isn't set - if ($statement === null) - return null; - - //return the value of the rdf:rest property - return $statement->getObject(); - } - - /** - * Returns the list element at the $index position. - * - * If to $index is suplied, the last list element will be returned - - * @param integer $index - * @return object ResResource - * @access private - */ - function _getListElement($index = null) - { - $element=$this; - $actualIndex=0; - - while ($element!=null) - { - //return the current element if index matches the current index - if ($actualIndex === $index) - return $element; - - //return the current element if it the last one - if ($element->hasProperty($this->rdfRestResource,$this->rdfNilResource)) - return $element; - - $nextElement=$this->_getRestElement($element); - - if ($nextElement!==null) - { - $element=$nextElement; - $actualIndex++; - } else - { - break; - } - } - return $element; - } - - /** - * Get the value associated to the $listResource by the rdf:first property - * - * @param object ResList $listResource - * @return object ResResource - * @access private - */ - function _getValue($listResource) - { - //Return the value of the rdf:first property or null, if it isn't set - $statement=$this->model->getProperty($listResource,$this->rdfFirstResource); - if ($statement===null) - return null; - - return $statement->getObject(); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResLiteral.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResLiteral.php.svn-base deleted file mode 100755 index 5e1c2a30..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResLiteral.php.svn-base +++ /dev/null @@ -1,65 +0,0 @@ - - -* -* @package resModel -* @access public -**/ - -class ResLiteral extends Literal -{ - /** - * Holds a reference to the associated model - * @var ResModel - * @access private - */ - var $model; - - - /** - * Constructor - * You have to supply a string. - * - * @param string $str label of the literal - * @param string $language optional language identifier - */ - function ResLiteral($str,$language = null) - { - parent::Literal($str,$language); - - } - - /** - * Sets the reference to the assocoated model. - * - * @param object model $model - * @access public - */ - function setAssociatedModel(& $model) - { - $this->model=& $model; - } - - /** - * Get the reference to the assocoated model. - * - * @return object model $model - * @access public - */ - function & getAssociatedModel() - { - return $this->model; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModel.php.svn-base deleted file mode 100755 index 20db06cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModel.php.svn-base +++ /dev/null @@ -1,876 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ - -class ResModel -{ - - /** - * Holds a reference to the assoiated memmodel/dbmodel/infmodel - * @var ResResource - * @access private - */ - var $model; - - - /** - * Constructor - * You have to supply a memmodel/dbmodel/infmodel to save the statements. - * - * @param object model $model - * @access public - */ - function ResModel(& $model) - { - if (!is_a($model,'Model')) - trigger_error(RDFAPI_ERROR . '(class: ResourceLayer; method: ResourceLayer): - $model has to be object of class Model', E_USER_ERROR); - - $this->model =& $model; - } - - /** - * Create a new resource associated with this model. - * If the uri string isn't set, this creates a bnode. - * Otherwise it creates a URI node. - * A URI resource is .equals() to any other URI Resource with the same URI - * (even in a different model - be warned). - * - * This method may return an existing Resource with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Operations on the result Resource may change this model. - * - * @param string $uri - * @return object ResResource - * @access public - */ - function createResource($uri = null) - { - $resResource = new ResResource($uri); - //associate the resource with this model, and get a unique identifier - //if it is bnode. - $resResource->setAssociatedModel($this); - - return $resResource; - } - - /** - * Create a new Property associated with this model. - * This method may return an existing property with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned property may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createProperty($uri = null) - { - $resProperty = new ResProperty($uri); - $resProperty->setAssociatedModel($this); - - return $resProperty; - } - - /** - * Create an untyped literal from a String value with a specified language. - * - * If you want to type this literal, you have to set a datatype before - * adding it to the model. - * - * - * @param string $label - * @param string $languageTag - * @return object ResLiteral - * @access public - */ - function createLiteral($label,$languageTag = null) - { - $resLiteral = new ResLiteral($label,$languageTag); - $resLiteral->setAssociatedModel($this); - - return $resLiteral; - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all Statements with $node as object. - * Returns an array of statements with ResResources. - * - * @param object ResResource $subject - * @param object ResResource $predicate - * @param object ResResource $object - * @return array - * @access public - * @throws PhpError - */ - function find($subject,$predicate, $object) - { - $result=array(); - //convert ResResources to Resources and Blanknodes - $resmodel=$this->model->find( $this->_resNode2Node($subject), - $this->_resNode2Node($predicate), - $this->_resNode2Node($object) - ); - //convert Resources, Blanknodes to ResResources - foreach ($resmodel->triples as $statement) - { - $result[]=new Statement($this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - }; - return $result; - - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement with ResResources of the Model where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject,$predicate,$object,$offset = 0) - { - - $statement = $this->model->findFirstMatchingStatement( $this->_resNode2Node($subject), - $this->_resNode2Node($predicate), - $this->_resNode2Node($object), - $offset - ); - if ($statement!==null) - { - return new Statement( $this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - } else - { - return null; - } - } - - /** - * Adds a new triple to the Model without checking if the statement is already in the Model. - * So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) - * Expects a statements with ResResources(ResLiterals) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - return $this->model->add(new Statement( $this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - /** - * Checks if a new statement is already in the Model and adds the statement, if it is not in the Model. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * Expects a statements with ResResources(ResLiterals) - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates($statement) - { - return $this->model->addWithoutDuplicates(new Statement($this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - - /** - * Tests if the Model contains the given statement. - * TRUE if the statement belongs to the model; - * FALSE otherwise. - * Expects a statement of ResResources(ResLiterals) - * - * @param object Statement $statement - * @return boolean - * @access public - */ - function contains(& $statement) - { - - return $this->model->contains(new Statement($this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - - /** - * Determine if all of the statements in a model are also contained in this model. - * True if all of the statements in $model are also contained in this model and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->containsAll($model->getModel()); - - return $this->model->containsAll($model); - } - - /** - * Determine if any of the statements in a model are also contained in this model. - * True if any of the statements in $model are also contained in this model and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->containsAny($model->getModel()); - return $this->model->containsAny($model); - } - - /** - * Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model. - * - * @param object Node &$node - * @return boolean - * @access public - */ - function containsResource(& $node) - { - if ($this->findFirstMatchingStatement($node,null,null) === null) - if ($this->findFirstMatchingStatement(null,$node,null) === null) - if ($this->findFirstMatchingStatement(null,null,$node) === null) - return false; - - return true; - } - - /** - * Create a literal from a String value with the $dtype Datatype - * An existing literal of the right value may be returned, or a fresh one created. - * - * @param string $value - * @param string $dtype - * @return object ResLiteral - * @access public - */ - function createTypedLiteral($value,$dtype) - { - $resLiteral = new ResLiteral($value); - $resLiteral->setDatatype($dtype); - $resLiteral->setAssociatedModel($this); - - return $resLiteral; - } - - /** - * Checks if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * Warning: This method doesn't work correct with models where the same blank node has different - * identifiers in the two models. We will correct this in a future version. - * - * @access public - * @param object model &$that - * @throws phpErrpr - * @return boolean - */ - function equals(& $that) - { - if (is_a($that,'ResModel')) - return $this->model->equals($that->getModel()); - return $this->model->equals($that); - } - - /** - * Returns a new model that is the subtraction of another model from this model. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function subtract($model) - { - if (is_a($model,'ResModel')) - return $this->model->subtract($model->getModel()); - return $this->model->subtract($model); - } - - /** - * Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model. - * If none exist, return null; if several exist, pick one arbitrarily. - * - * @param object ResResource $subject - * @param object ResResource $property - * @return object Statement - * @access public - * @throws phpErrpr - */ - function getProperty($subject,$property) - { - - $statement= $this->model->findFirstMatchingStatement( $this->_resNode2Node($subject), - $this->_resNode2Node($property), - null - ); - if ($statement === null) - return null; - - return new Statement($this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - - } - - /** - * Checks if MemModel is empty - * - * @return boolean - * @access public - */ - function isEmpty() - { - return $this->model->isEmpty(); - } - - /** - * Returns a ResIterator with all objects in a model. - * - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listObjects() - { - return $this->listObjectsOfProperty(null); - } - - /** - * Returns a ResIterator with all objects with a given property and property value. - * - * @param object ResResource $property - * @param object ResResource $value - * @return object ResIterator - * @access public - */ - function listObjectsOfProperty($property, $value = null) - { - return new ResIterator(null,$property,$value,'o',$this); - } - - - /** - * Returns a ResIterator with all subjects in a model. - * - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listSubjects() - { - return $this->listSubjectsWithProperty(null); - } - - /** - * Returns a ResIterator with all subjects with a given property and property value. - * - * @param object ResResource $property - * @param object ResResource $value - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listSubjectsWithProperty($property,$value = null) - { - return new ResIterator(null,$property,$value,'s',$this); - } - - /** - * Removes the statement of ResResources(ResTriples) from the MemModel. - * TRUE if the statement is removed. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - return $this->model->remove(new Statement( $this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject()) - )); - } - - /** - * Number of statements in the MemModel - * - * @return integer - * @access public - */ - function size() - { - return $this->model->size(); - } - - /** - * Returns a new Model that is the set-union of the model with another model. - * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - * - */ - function & unite(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->unite($model->getModel()); - return $this->model->unite($model); - } - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) - { - if (is_a($model,'ResModel')) - return $this->model->addModel($model->getModel()); - return $this->model->addModel($model); - } - - /** - * Create a new RDF Container from type rdf:Alt - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createAlt($uri = null) - { - $resAlt = new ResAlt($uri); - $resAlt->setAssociatedModel($this); - - return $resAlt; - } - - /** - * Create a new RDF Container from type rdf:Bag - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createBag($uri = null) - { - $resBag = new ResBag($uri); - $resBag->setAssociatedModel($this); - - return $resBag; - } - - /** - * Create a new RDF Container from type rdf:Seq - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createSeq($uri = null) - { - $resSeq = new ResSeq($uri); - $resSeq->setAssociatedModel($this); - - return $resSeq; - } - - /** - * Create a new RDF Collection from type rdf:List - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createList($uri = null) - { - $resList = new ResList($uri); - $resList->setAssociatedModel($this); - - return $resList; - } - - /** - * Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements - * - * - * @return object Model - * @access public - */ - function & getModel() - { - return $this->model; - } - - - /** - * Internal method, that returns a resource URI that is unique for the Model. - * URIs are generated using the base_uri of the Model, the prefix and a unique number. - * If no prefix is defined, the bNode prefix, defined in constants.php, is used. - * - * @param string $prefix - * @return string - * @access private - */ - function getUniqueResourceURI($bnodePrefix) - { - return $this->model->getUniqueResourceURI($bnodePrefix); - } - - /** - * Load a model from a file containing RDF, N3 or N-Triples. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to this DbModel. - * - * @param string $filename - * @param string $type - * @param boolean $stream - * @access public - */ - function load($filename, $type = NULL, $stream=false) - { - $this->model->load($filename, $type, $stream); - } - - /** - * Return current baseURI. - * - * @return string - * @access public - */ - function getBaseURI() - { - return $this->model->getBaseURI(); - } - - /** - * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the MemModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') - { - return $this->model->saveAs($filename, $type ='rdf'); - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - */ - function writeAsHTMLTable() - { - $this->model->writeAsHtmlTable(); - } - - /** - * Returns a new model containing all the statements which are in both this model and another. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function & intersect(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->intersect($model->getModel()); - return $this->model->intersect($model); - } - - /** - * converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral - * - * @param object Node $node - * @param boolean $isProperty - * @return object ResResource / ResProperty / ResLiteral - * @access private - * @throws phpErrpr - */ - function _node2ResNode($node, $isProperty = false) - { - if (is_a($node,'Literal')) - { - $return= new ResLiteral($node->getLabel(),$node->getLanguage()); - $return->setDatatype($node->getDatatype()); - $return->setAssociatedModel($this); - - return $return; - } - if (is_a($node,'Resource')) - { - if ($isProperty) - { - $res= new ResProperty($node->getLabel()); - } else - { - $res= new ResResource($node->getLabel()); - } - $res->setAssociatedModel($this); - if (is_a($node,'Blanknode')) - $res->setIsAnon(true); - - return $res; - } - } - - /** - * converts a ResResource, ResProperty, or ResLiteral into a Resource, Blanknode, or Literal - * - * @param object ResNode $resNode - * @return object Node - * @access private - * @throws phpErrpr - */ - function _resNode2Node($resNode) - { - if (is_a($resNode,'ResResource')) - { - if ($resNode->getIsAnon()) - { - $return=new BlankNode($resNode->getURI()); - } else - { - $return=new Resource($resNode->getURI()); - } - return $return; - } - - if (is_a($resNode,'ResLiteral')) - { - $literal=new Literal($resNode->getLabel(),$resNode->getLanguage()); - if ($resNode->getDatatype() != null) - $literal->setDatatype($resNode->getDatatype()); - return $literal; - } - } - - /** - * Set a base URI for the MemModel. - * Affects creating of new resources and serialization syntax. - * If the URI doesn't end with # : or /, then a # is added to the URI. - * @param string $uri - * @access public - */ - function setBaseURI($uri) - { - $this->model->setBaseURI($uri); - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - * @return string - */ - function writeRdfToString() - { - return $this->model->writeRdfToString(); - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function & rdqlQuery($queryString, $returnNodes = TRUE) - { - $ret = $this->model->rdqlQuery($queryString, $returnNodes); - return $ret; - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) - { - return $this->model->rdqlQueryAsIterator($queryString, $returnNodes); - } - - - /** - * Returns the models namespaces. - * - * @author Tobias Gau - * @access public - * @return Array - */ - function getParsedNamespaces(){ - return $this->model->getParsedNamespaces(); - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gau - * @access public - * @param Array $newNs - */ - function addParsedNamespaces($newNs){ - $this->model->addParsedNamespaces($newNs); - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gau - * @access public - * @param String $prefix, String $nmsp - */ - function addNamespace($prefix, $namespace){ - $this->model->addNamespace($prefix, $namespace); - } - - /** - * removes a single namespace from the model - * - * @author Tobias Gau - * @access public - * @param String $nmsp - */ - function removeNamespace($nmsp){ - return $this->model->removeNamespace($nmsp); - } - - - - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModelP.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModelP.php.svn-base deleted file mode 100755 index 91a7a0d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResModelP.php.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include ResModel classes -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResResource.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResContainer.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResAlt.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResBag.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResLiteral.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResProperty.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResSeq.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResIterator.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResList.php'); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResProperty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResProperty.php.svn-base deleted file mode 100755 index 188ad745..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResProperty.php.svn-base +++ /dev/null @@ -1,32 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ -class ResProperty extends ResResource -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResProperty($uri) - { - parent::ResResource($uri); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResResource.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResResource.php.svn-base deleted file mode 100755 index 54b38ef7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResResource.php.svn-base +++ /dev/null @@ -1,212 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ -class ResResource extends Resource -{ - /** - * Holds a reference to the associated model - * @var ResModel - * @access private - */ - var $model; - - /** - * Is true, if this resource is an anonymous node. - * @var boolean - * @access private - */ - var $isAnon; - - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function ResResource($uri) - { - parent::Resource($uri); - $this->isAnon = ($uri === null); - } - - /** - * Sets the reference to the assocoated model. - * - * @param object Model $model - * @access public - */ - function setAssociatedModel(& $model) - { - $this->model=& $model; - if ($this->isAnon) - $this->uri=$this->model->getUniqueResourceURI(BNODE_PREFIX); - } - - /** - * Get the reference to the assocoated model. - * - * @return object Model $model - * @access public - */ - function getAssociatedModel() - { - return $this->model; - } - - /** - * Sets the URI of this resource - * - * @param string $uri - * @access public - */ - function setURI($uri) - { - $this->uri = $uri; - } - - /** - * Add a property to this resource. - * A statement with this resource as the subject, p as the predicate and o - * as the object is added to the model associated with this resource. - * - * @param ResResource $property - * @param ResResource/ResLiteral $object - * @return object ResResource - * @access public - */ - function addProperty($property,$object) - { - $this->model->add(new Statement($this,$property,$object)); - - return $this; - } - - /** - * List all the values with the property p as statements in an array. - * - * @param ResResource $property - * @return ResIterator - * @access public - */ - function listProperties($property = null) - { - return $this->model->find($this,$property,null); - } - - /** - * Answer some statement (this, p, O) in the associated model. - * If there are several such statements, any one of them may be returned. - * If no such statements exist, null is returned. - * - * @param ResResource $property - * @return object ResResource - * @access public - */ - function getProperty($property) - { - return $this->model->getProperty($this,$property); - } - - /** - * Determine whether this resource has any values for a given property. - * - * @param ResResource $property - * @param ResResource $value - * @return object ResResource - * @access public - */ - function hasProperty($property, $value = null) - { - $ret= $this->model->findFirstMatchingStatement($this,$property,$value); - - return ($ret!==null); - } - - /** - * Determine whether this resource is an anonymous resource - * - * @return boolean - * @access public - */ - function getIsAnon() - { - return $this->isAnon; - } - - /** - * Set whether this resource is an anonymous resource - * - * @param boolean - * @access public - */ - function setIsAnon($isAnon) - { - $this->isAnon=$isAnon; - } - - /** - * Checks if the resource equals another resource. - * Two resources are equal, if they have the same URI - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) - { - if (is_a($that,'ResLiteral')) - return $that->equals($this); - - return ($that!==null && ($this->getURI() == $that->getURI())); - } - - /** - * Delete all the statements with predicate p for this resource from - * its associated model. - * - * @access public - * @param object resource $property - * @return object ResResource - */ - function removeAll($property = null) - { - foreach ($this->model->find($this,$property,null) as $statement) - { - $this->model->remove($statement); - } - return $this; - } - - /** - * Delete all the properties for this resource from the associated model. - * - * @access public - * @return object ResResource - */ - function removeProperties() - { - $this->removeAll(); - return $this; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResSeq.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResSeq.php.svn-base deleted file mode 100755 index a16bb582..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/.svn/text-base/ResSeq.php.svn-base +++ /dev/null @@ -1,153 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResSeq extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResSeq($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_SEQ); - } - - /** - * Insert a new member into the sequence at the specified position. - * The existing member at that position, and all others with higher indexes, - * have their index increased by one. - * - * @param integer $index - * @param object ResResource/ResLiteral $resResource - * @return boolean - * @access public - */ - function addAtIndex($index, $object) - { - //get a members index - $memberIndex= $this->getMembers(); - - //type this container, if it isn't already typed - if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE))) - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType); - - //renumber all higher members - for ($i = count($memberIndex);$i >= $index ; $i--) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i+1),$memberIndex[$i]); - } - //remove the old value at this position - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - //add the new value - $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object); - - return $this; - } - - /** - * Get the member at a given index - * - * @param integer $index - * @return object ResResource/ResLiteral - * @access public - */ - function getMember($index) - { - $result=$this->listProperties($this->_getMembershipPropertyWithIndex($index)); - if (isset($result[0])) - { - return $result[0]; - } - else - { - return null; - } - } - - /** - * Return the index of a given member of the sequence. - * If the same value appears more than once in the sequence, it is undefined - * which of the indexes will be returned. - * If the member is not found in this sequence, a value of 0 is returned. - * - * @param object ResResource/ResLiteral $object - * @return integer - * @access public - */ - function indexOf($object) - { - //check all members, until $object is found - foreach ($this->listProperties() as $statement) - { - $predicateLabel=$statement->getLabelPredicate(); - if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel)) - { - if($object->equals($statement->getObject())) - //analyze the container membership property and return the index - return $this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel); - } - } - //return 0 if $object wasn't found - return 0; - } - - /** - * Remove the member at the specified index. - * All other members with a higher index will have their index reduced by one. - * - * @param integer $index - * @access public - */ - function removeAtIndex($index) - { - $memberIndex= $this->getMembers(); - - - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - - for ($i = $index;$i < count($memberIndex); $i++) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i+1)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]); - } - return $this; - } - - /** - * Set the value at a given index in the sequence. - * - * If the index is not in the range of the sequence, false is returned - * - * @param integer $index - * @return boolean - * @access public - */ - function set($index, $object) - { - if (!$this->hasProperty($this->_getMembershipPropertyWithIndex($index))) - return false; - - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object); - return true; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResAlt.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResAlt.php deleted file mode 100755 index f4fed7c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResAlt.php +++ /dev/null @@ -1,78 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResAlt extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResAlt($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_ALT); - } - - /** - * Return the default value for this resource - * - * @return object ResResource/ResLiteral - * @access public - */ - function getDefault() - { - //get the first memeber - $statements=$this->listProperties($this->_getMembershipPropertyWithIndex(1)); - if(isset($statements[0])) - { - //return the value - return $statements[0]->getObject(); - } else - { - return null; - } - } - - /** - * Set the default value of this container. - * - * @param object ResResource/ResLiteral $object - * @access public - */ - function setDefault($object) - { - //remember the old default value - $oldDefaultObject=$this->getDefault(); - //if there wasn't a default value before - if($oldDefaultObject === null) - { - //add the new value - $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object); - } else - { - //remove the old value - $this->removeAll($this->_getMembershipPropertyWithIndex(1)); - //set the new value - $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object); - //add the old default value at the end - $this->add($oldDefaultObject); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResBag.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResBag.php deleted file mode 100755 index 98fa662a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResBag.php +++ /dev/null @@ -1,32 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResBag extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResBag($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_BAG); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResContainer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResContainer.php deleted file mode 100755 index 18c253f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResContainer.php +++ /dev/null @@ -1,219 +0,0 @@ - -* -* @package resModel -* @access public -**/ - -class ResContainer extends ResResource -{ - /** - * Holds a ResResource of this container type rdf:Seq, rdf:Alt, or rdf:Bag - * @var ResResource - * @access private - */ - var $containerType; - - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResContainer($uri = null) - { - parent::ResResource($uri); - } - - /** - * Add a new value to a container. - * The new value is added as the last element of the container. - * - * @param object ResResource/ResLiteral $object - * @access public - */ - function add($object) - { - //type this container, if it isn't already typed - if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE))) - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType); - //get the current size - $actualSize=$this->size(); - //add the object to the last position - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.'_'.($actualSize+1)),$object); - } - - /** - * Determine whether the container contains a value - * - * @param obejct ResResource/ResLiteral $resResource - * @return boolean - * @access public - */ - function contains($resResource) - { - //get all container's properties - foreach ($this->listProperties() as $statement) - { - //if the property matches a container membership property - if ($this->_predicateLabelMatchesMembershipProperty($statement->getLabelPredicate())) - { - //check, if it's the value, we're looking for. - if ($resResource->equals($statement->getObject())) - return true; - } - } - return false; - } - - /** - * Returns true, if this resource is a container from type rdf:Alt - * - * @return boolean - * @access public - */ - function isAlt() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_ALT); - } - - /** - * Returns true, if this resource is a container from type rdf:Bag - * - * @return boolean - * @access public - */ - function isBag() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_BAG); - } - - /** - * Returns true, if this resource is a container from type rdf:Seq - * - * @return boolean - * @access public - */ - function isSeq() - { - return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_SEQ); - } - - /** - * Get an array of all resources that are values of this container - * - * @return array - * @access public - */ - function getMembers() - { - $return=array(); - foreach ($this->listProperties() as $statement) - { - $predicateLabel=$statement->getLabelPredicate(); - if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel)) - { - $return[$this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)] = $statement->getObject(); - } - } - return $return; - } - - /** - * Remove a value from the container. - * - * Once removed, the values in the container with a higher ordinal value are renumbered. - * The renumbering algorithm depends on the type of container. - * - * @param obejct ResResource/ResLiteral $resResource - * @access public - */ - function remove($object) - { - $deleteFromIndex=array(); - //get all container members - $memberIndex=$this->getMembers(); - - //check each container member if it equals the resoure to be removed - foreach ($memberIndex as $key => $value) - { - //save the statements positio in the container - if($object->equals($value)) - $deleteFromIndex[]=$key; - } - - //delete all found container members - foreach ($deleteFromIndex as $index) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - - //renumber all members with higher ordinal numbers than the deleted one - for ($i = $index;$i < count($memberIndex); $i++) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i+1)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]); - } - } - - } - - /** - * Returns the number values in the container. - * - * @return integer - * @access public - */ - function size() - { - return count($this->getMembers()); - } - - /** - * Checks, if a predicate label fits a container membership property rdf:_n - * - * @param string $predicateLabel - * @return boolean - * @access private - */ - function _predicateLabelMatchesMembershipProperty($predicateLabel) - { - return substr($predicateLabel,0,strlen(RDF_NAMESPACE_URI.'_')) == RDF_NAMESPACE_URI.'_'; - } - - /** - * Get the ordinal number from a membership property rdf:_n - * - * @param string $predicateLabel - * @return integer - * @access private - */ - function _getMemberIndexNrFromMembershipPropertyLabel($predicateLabel) - { - return (int)substr($predicateLabel,strlen(RDF_NAMESPACE_URI.'_')); - } - - /** - * Get a membership property rdf:_n with index $int - * - * @param intger $int - * @return string - * @access private - */ - function _getMembershipPropertyWithIndex($int) - { - return new ResResource(RDF_NAMESPACE_URI.'_'.$int); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResIterator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResIterator.php deleted file mode 100755 index 3395dfe2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResIterator.php +++ /dev/null @@ -1,298 +0,0 @@ -listInstances(); -* for ($it->rewind(); $it->valid(); $it->next()) -* { -* $currentResource=$it->current(); -* }; -* -* -* @version $Id: ResIterator.php 522 2007-08-14 09:22:22Z cweiske $ -* @author Daniel Westphal -* -* -* @package resModel -* @access public -**/ -class ResIterator -{ - /** - * Holds a reference to the assoiated ResModel / OntModel - * @var object Model - * @access private - */ - var $associatedModel; - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - /** - * If the current resource is valid - * @var boolean - * @access private - */ - var $valid; - - /** - * The current resource - * @var obejct ResResource - * @access private - */ - var $currentResource; - - /** - * The subject to search for. - * @var object ResResource - * @access private - */ - var $searchSubject; - - /** - * The predicate to search for. - * @var object ResResource - * @access private - */ - var $searchPredicate; - - /** - * The object to search for. - * @var object ResResource - * @access private - */ - var $searchObject; - - /** - * If the resource, we're intrested in is the subject (s), predicate(p), - * or object (o) of the found statements - * - * @var string - * @access private - */ - var $getSPO; - - /** - * Defines the type of resource, we'd like to receive. - * - * @var string - * @access private - */ - var $returnType; - - /** - * If set, each resource will first be checked, if it's - * language fits. - * - * @var string - * @access private - */ - var $findLiteralWithLang; - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like inf find(). - * $getSPO supports the strings 's', 'p', and 'o' to return - * either the subject, predicate, or object of the result statements. - * $returnType supports the strings 'ResProperty', 'ResLiteral', - * 'OntProperty', 'OntClass', and 'Individual' and returns the resources - * as the matching type. - * - * @param object ResResource $subject - * @param object ResResource $predicate - * @param object ResResource $object - * @param string $getSPO - * @param object ResModel $associatedModel - * @param string $returnType - * @access public - */ - function ResIterator($subject,$predicate,$object,$getSPO,& $associatedModel,$returnType = false) - { - $this->searchSubject =& $subject; - $this->searchPredicate =& $predicate; - $this->searchObject =& $object; - $this->getSPO = $getSPO; - $this->returnType = $returnType; - $this->associatedModel =& $associatedModel; - $this->findLiteralWithLang = false; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->key++; - $this->valid=($this->_getNextResource()); - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function current() - { - return $this->currentResource; - } - - /** - * Returns the next Resource (subject, predicate, - * or object of the next matching statement). - * - * @return object resResource - * @access private - */ - function _getNextResource() - { - if ($this->findLiteralWithLang) - { - do - { - $nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key); - if ($nextStatement === null) - return false; - - $object = $nextStatement->getObject(); - if ($object->getLanguage() != $this->findLiteralWithLang) - { - $hasCorrectLanguage=false; - $this->key++; - } else - { - $hasCorrectLanguage=true; - } - - } while (!$hasCorrectLanguage); - } else - { - $nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key); - } - if ($nextStatement === null) - return false; - - switch ($this->getSPO) - { - case 's': - $this->currentResource = $this->_getResourceAs($nextStatement->getSubject()); - break; - - case 'p': - $this->currentResource = $this->_getResourceAs($nextStatement->getPredicate()); - break; - - case 'o': - $this->currentResource = $this->_getResourceAs($nextStatement->getObject()); - break; - } - return (true); - } - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } - - /** - * Sets that only Literals with the matching - * language should be returned - * - * @param string - * @access public - */ - function setFindLiteralWithLang($language) - { - $this->findLiteralWithLang = $language; - } - - /** - * Returns the $resource as an instance of the type - * specified in $this->returnType. - * - * @param object ResResource - * @return object ResResource - * @access private - */ - function _getResourceAs($resource) - { - if ($this->findLiteralWithLang && $resource->getLanguage() != $this->findLiteralWithLang) - $this->_getNextResource(); - - if($this->returnType) - switch ($this->returnType) { - - case 'ResProperty': - return $this->associatedModel->createProperty($resource->getLabel()); - break; - - case 'ResLiteral': - $newLiteral = $this->associatedModel->createLiteral($resource->getLabel(),$resource->getLanguage()); - $newLiteral->setDatatype($resource->getDatatype()); - return $newLiteral; - break; - - case 'OntProperty': - - return $this->associatedModel->createOntProperty($resource->getLabel()); - break; - - case 'OntClass': - return $this->associatedModel->createOntClass($resource->getLabel()); - break; - - case 'Individual': - return $this->associatedModel->createIndividual($resource->getLabel()); - break; - } - return $resource; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResList.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResList.php deleted file mode 100755 index feeb96f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResList.php +++ /dev/null @@ -1,635 +0,0 @@ - - -* -* @package resModel -* @access public -*/ -class ResList extends ResResource -{ - /** - * Holds a ResResource with the uri rdf:rest - * @var ResResource - * @access private - */ - var $rdfRestResource; - - /** - * Holds a ResResource with the uri rdf:first - * @var ResResource - * @access private - */ - var $rdfFirstResource; - - /** - * Holds a ResResource with the uri rdf:nil - * @var ResResource - * @access private - */ - var $rdfNilResource; - - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResList($uri = null) - { - //call the parent's constructor - parent::ResResource($uri); - //initialize vars - $this->rdfRestResource = new ResResource(RDF_NAMESPACE_URI.RDF_REST); - $this->rdfFirstResource = new ResResource(RDF_NAMESPACE_URI.RDF_FIRST); - $this->rdfNilResource = new ResResource(RDF_NAMESPACE_URI.RDF_NIL); - } - - /** - * Returns the value of the list element at the specified position or null. - * - * @param integer $position - * @return ResResource - * @access public - */ - function get($position) - { - //init - $listElement=$this; - //walk through the list until the position in the list is reached - for ($i=0;$i<$position;$i++) - { - $listElement=$this->_getRestElement($listElement); - if($listElement===null) - return null; - } - //return the associated value - return $this->_getValue($listElement); - } - - /** - * Add the given value to the end of the list. - * it is only defined if this is not the empty list. - * - * @param object ResResource $resource - * @return boolean - * @access public - */ - function add($resource) - { - //return false if this list is the empty list - if($this->uri==RDF_NAMESPACE_URI.RDF_NIL) - return false; - - //if this is the first value - if ($this->isEmpty()) - { - $newLastElement =& $this; - } else - //if there are other values in the list - { - //get the last list element - $lastElement=$this->_getListElement(); - //remove the rdf:rest property - $lastElement->removeAll($this->rdfRestResource); - //create a new list element - $newLastElement=$this->model->createResource(); - //concatenate the new list element with the list - $lastElement->addProperty($this->rdfRestResource,$newLastElement); - } - //add the value - $newLastElement->addProperty($this->rdfFirstResource,$resource); - //ad the rdf:nil property to the last list element - $newLastElement->addProperty($this->rdfRestResource,$this->rdfNilResource); - - return true; - } - - /** - * Update the head of the list to have the given value, - * and return the previous value. - * - * @param object ResResource $value - * @return ResResource - * @access public - */ - //todo: error handling, when empty list - function setHead($value) - { - //save the old value - $oldValue=$this->getHead(); - //remove the old value - $this->removeAll($this->rdfFirstResource); - //add the new value - $this->addProperty($this->rdfFirstResource,$value); - - //return the old value - return $oldValue; - } - - /** - * Get the value that is associated with the head of the list. - * - * @return ResResource - * @access public - */ - //todo: error handling, falls empty list - function getHead() - { - return $this->_getValue($this); - } - - /** - * Remove the head of the list. The tail of the list - * remains in the model. Note that no changes are made to - * list cells that point to this list cell as their tail. - * - * @return ResList - * @access public - */ - function removeHead() - { - //get the second list element - $rest=$this->_getRestElement($this); - //remove the first element - $this->removeAll($this->rdfFirstResource); - $this->removeAll($this->rdfRestResource); - //change this Resource URI to that of the second list element - //thus makin it the fist element - $this->uri=$rest->getURI(); - - //return the new list - return $this; - } - - /** - * Get the Position of the first occurrence of the given value in the list, - * or -1 if the value is not in the list. - * You can supply an offset to search for values. (First element has offset 0) - * Default is 0 - * - * @param object ResResource $resource - * @param integer $offset - * @return integer - * @access public - */ - function indexOf($resource, $offset = 0) - { - //init - $element=$this; - $actualIndex=0; - - //walk through the list until the value is found and the position is higher than - //the offset - while ($actualIndex < $offset || !$resource->equals($this->_getValue($element))) - { - //get next list element - $element=$this->_getRestElement($element); - $actualIndex++; - - //if the end of the list is reached and the value isn't found - if ($element===null) - return null; - } - //return the index value - return $actualIndex; - } - - /** - * Replace the value at the i'th position in the list with the given value - * - * @param integer $index - * @param object ResResource $resource - * @return object ResResource - * @access public - */ - function replace($index, $resource) - { - //get the list element at the $index position - $listElement=$this->_getListElement($index); - //get the old value - $oldValue=$this->_getValue($listElement); - //remove the old value - $listElement->removeAll($this->rdfFirstResource); - //add the new value - $listElement->addProperty($this->rdfFirstResource,$resource); - //return the old value - return $oldValue; - } - - /** - * Answer true if the given node appears as the value of a value - * of any of the cells of this list. - * - * @param object ResResource $value - * @return boolean - * @access public - */ - function contains($value) - { - //return true, if a position was found. - $result=$this->indexOf($value); - return ($result!==null); - } - - /** - * Get the list that is the tail of this list. - * - * @return object ResList - * @access public - */ - function getTail() - { - //get the second list element - $nextListElement= $this->_getRestElement($this); - //return the second element as new list - return $this->model->createList($nextListElement->getURI()); - } - - /** - * Remove all of the components of this list from the model. - * Note that this is operation is only removing the list cells - * themselves, not the resources referenced by the list - - * unless being the object of an rdf:first statement is the - * only mention of that resource in the model. - * - * @return boolean - * @access public - */ - function removeList() - { - $element=$this; - - while ($element!==null) - { - $nextElement=$this->_getRestElement($element); - - $element->removeAll($this->rdfFirstResource); - $element->removeAll($this->rdfRestResource); - - if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL)) - { - $element=$nextElement; - } else - { - return true; - } - } - return false; - } - - /** - * Returns true, if this list is empty - * - * @param object Statement $statement - * @return integer - * @access public - */ - function isEmpty() - { - return !$this->hasProperty($this->rdfFirstResource); - } - - /** - * Get all values in the list as an array of ResResources - * - * @return array - * @access public - */ - function getContentInArray() - { - $result=array(); - $element=$this; - - while ($element!==null) - { - //add the value of the current element to the result if is set. - $value=$this->_getValue($element); - if ($value!==null) - $result[]=$value; - - //walk through the list until it's end - $nextElement=$this->_getRestElement($element); - if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL)) - { - $element=$nextElement; - } else - { - break; - } - } - //return the result - return $result; - } - - /** - * Change the tail of this list to point to the given list, so that this list - * becomes the list of the concatenation of the elements of - * both lists. This is a side-effecting operation on this list; - * for a non side-effecting alternative, see append. - * - * - * @param object ResList $ResList - * @access public - */ - function concatenate($ResList) - { - //get the last list element - $lastElement=$this->_getListElement(); - //remove the old tail (rdf:nil) - $lastElement->removeAll($this->rdfRestResource); - //add the $ResList as new tail - $lastElement->addProperty($this->rdfRestResource,$ResList); - } - - /** - * Answer a new list that is formed by adding each element of - * this list to the head of the given list. This is a non - * side-effecting operation on either this list or the given - * list, but generates a copy of this list. For a more storage - * efficient alternative, see concatenate - * - * @param object ResList $ResList - * @return object ResList - * @access public - */ - function append($resList) - { - //get a copy of this list - $newList=$this->copy(); - - //add all values from the $resList to the new list - foreach ($resList->getContentInArray() as $value) - { - $newList->add($value); - } - //return the new list - return $newList; - } - - /** - * Answer a list that contains all of the elements of this - * list in the same order, but is a duplicate copy in the - * underlying model. - * - * @return object ResList - * @access public - */ - function copy() - { - //create a new list in the model - $newList=$this->model->createList(); - //add all values from this list to the new list - foreach ($this->getContentInArray() as $value) - { - $newList->add($value); - } - //return the new list - return $newList; - } - - /** - * Return a reference to a new list cell whose head is value - * and whose tail is this list. - * - * @param object ResResource $value - * @return object ResList - * @access public - */ - function cons($value) - { - //create a new list - $newList=$this->model->createList(); - //add the new value - $newList->add($value); - //set this list as the tail of the new list - $newList->setTail($this); - - //return the new list - return $newList; - } - - /** - * Update the list cell at the front of the list to have the - * given list as tail. The old tail is returned, and remains - * in the model. - * - * @param object ResList $resList - * @return object Reslist - * @access public - */ - function setTail($resList) - { - //save the old tail - $oldTail=$this->getTail(); - //remove the old tail - $this->removeAll($this->rdfRestResource); - //add the $resList as new Tail - $this->addProperty($this->rdfRestResource,$resList); - - //return the old tail - return $oldTail; - } - - /** - * Answer true if this list has the same elements in the - * same order as the given list. Note that the standard equals - * test just tests for equality of two given list cells. - * While such a test is sufficient for many purposes, this - * test provides a broader equality definition, but is - * correspondingly more expensive to test. - * - * @param object ResList $resList - * @return boolean - * @access public - */ - function sameListAs($resList) - { - //init - $indexPos=0; - do - { - //get the values for both lists at the actual position - $thisValue=$this->get($indexPos); - $thatValue=$resList->get($indexPos); - //if the values aren't equal, return false - if (($thisValue !== null) && !$thisValue->equals($thatValue)) - return false; - - $indexPos++; - //walk until this list reaches a null value (end) - } while ($thisValue!==null); - - //if the other list has a null value at this position too, return true - //else return false - return ($thatValue===null); - } - - /** - * Remove the given value from this list. - * If value does not occur in the list, no action is taken. Since removing the - * head of the list will invalidate the list head cell, in - * general the list must return the list that results from - * this operation. However, in many cases the return value - * will be the same as the object that this method is invoked - * on. - * - * @param object ResResource $value - * @return object ResList - * @access public - */ - function remove($value) - { - //if the value is the value of the first list element(head) - //call the remove head position and return the new head - if ($value->equals($this->_getValue($this))) - return $this->removeHead(); - - $element=$this; - do - { - $newElement=$this->_getRestElement($element); - - //if the value equals the value of the current list element - if ($newElement !== null && $value->equals($this->_getValue($newElement))) - { - //remove the link to the list element to be removed - $element->removeAll($this->rdfRestResource); - //add a link to the list element AFTER the element to be deleted - $element->addProperty($this->rdfRestResource,$this->_getRestElement($newElement)); - //remove the list element with values - $newElement->removeAll($this->rdfFirstResource); - $newElement->removeAll($this->rdfRestResource); - //return this ResList - return $this; - } - $element=$newElement; - } while ($element!==null); - //return this list - return $this; - } - - /** - * Answer true if the list is well-formed, by checking that each - * node is correctly typed, and has a head and tail pointer from - * the correct vocabulary - * - * @return boolean - * @access public - */ - function isValid() - { - $element=$this; - if ($this->_getValue($this)=== null && $this->_getRestElement($this) === null) - return true; - do - { - //return true if the last element is a rdf:nil - if ($element->getURI() == RDF_NAMESPACE_URI.RDF_NIL) - return true; - //return false, if the current element has no associated value - if ($this->_getValue($element) === null) - return false; - - $element=$this->_getRestElement($element); - } while ($element !== null); - //return false, if the current element has no rdf:rest property - return false; - } - - /** - * Get the associated rdf:rest Resource from the suplied ResList element - * - * @param object ResList $listElement - * @return object ResList - * @access private - */ - function _getRestElement($listElement) - { - //get the rdf:rest property - $statement= $this->model->getProperty($listElement,$this->rdfRestResource); - //return null, if this property isn't set - if ($statement === null) - return null; - - //return the value of the rdf:rest property - return $statement->getObject(); - } - - /** - * Returns the list element at the $index position. - * - * If to $index is suplied, the last list element will be returned - - * @param integer $index - * @return object ResResource - * @access private - */ - function _getListElement($index = null) - { - $element=$this; - $actualIndex=0; - - while ($element!=null) - { - //return the current element if index matches the current index - if ($actualIndex === $index) - return $element; - - //return the current element if it the last one - if ($element->hasProperty($this->rdfRestResource,$this->rdfNilResource)) - return $element; - - $nextElement=$this->_getRestElement($element); - - if ($nextElement!==null) - { - $element=$nextElement; - $actualIndex++; - } else - { - break; - } - } - return $element; - } - - /** - * Get the value associated to the $listResource by the rdf:first property - * - * @param object ResList $listResource - * @return object ResResource - * @access private - */ - function _getValue($listResource) - { - //Return the value of the rdf:first property or null, if it isn't set - $statement=$this->model->getProperty($listResource,$this->rdfFirstResource); - if ($statement===null) - return null; - - return $statement->getObject(); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResLiteral.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResLiteral.php deleted file mode 100755 index 2c059e8a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResLiteral.php +++ /dev/null @@ -1,65 +0,0 @@ - - -* -* @package resModel -* @access public -**/ - -class ResLiteral extends Literal -{ - /** - * Holds a reference to the associated model - * @var ResModel - * @access private - */ - var $model; - - - /** - * Constructor - * You have to supply a string. - * - * @param string $str label of the literal - * @param string $language optional language identifier - */ - function ResLiteral($str,$language = null) - { - parent::Literal($str,$language); - - } - - /** - * Sets the reference to the assocoated model. - * - * @param object model $model - * @access public - */ - function setAssociatedModel(& $model) - { - $this->model=& $model; - } - - /** - * Get the reference to the assocoated model. - * - * @return object model $model - * @access public - */ - function & getAssociatedModel() - { - return $this->model; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModel.php deleted file mode 100755 index 0aa16b43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModel.php +++ /dev/null @@ -1,876 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ - -class ResModel -{ - - /** - * Holds a reference to the assoiated memmodel/dbmodel/infmodel - * @var ResResource - * @access private - */ - var $model; - - - /** - * Constructor - * You have to supply a memmodel/dbmodel/infmodel to save the statements. - * - * @param object model $model - * @access public - */ - function ResModel(& $model) - { - if (!is_a($model,'Model')) - trigger_error(RDFAPI_ERROR . '(class: ResourceLayer; method: ResourceLayer): - $model has to be object of class Model', E_USER_ERROR); - - $this->model =& $model; - } - - /** - * Create a new resource associated with this model. - * If the uri string isn't set, this creates a bnode. - * Otherwise it creates a URI node. - * A URI resource is .equals() to any other URI Resource with the same URI - * (even in a different model - be warned). - * - * This method may return an existing Resource with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Operations on the result Resource may change this model. - * - * @param string $uri - * @return object ResResource - * @access public - */ - function createResource($uri = null) - { - $resResource = new ResResource($uri); - //associate the resource with this model, and get a unique identifier - //if it is bnode. - $resResource->setAssociatedModel($this); - - return $resResource; - } - - /** - * Create a new Property associated with this model. - * This method may return an existing property with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned property may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createProperty($uri = null) - { - $resProperty = new ResProperty($uri); - $resProperty->setAssociatedModel($this); - - return $resProperty; - } - - /** - * Create an untyped literal from a String value with a specified language. - * - * If you want to type this literal, you have to set a datatype before - * adding it to the model. - * - * - * @param string $label - * @param string $languageTag - * @return object ResLiteral - * @access public - */ - function createLiteral($label,$languageTag = null) - { - $resLiteral = new ResLiteral($label,$languageTag); - $resLiteral->setAssociatedModel($this); - - return $resLiteral; - } - - /** - * General method to search for triples. - * NULL input for any parameter will match anything. - * Example: $result = $m->find( NULL, NULL, $node ); - * Finds all Statements with $node as object. - * Returns an array of statements with ResResources. - * - * @param object ResResource $subject - * @param object ResResource $predicate - * @param object ResResource $object - * @return array - * @access public - * @throws PhpError - */ - function find($subject,$predicate, $object) - { - $result=array(); - //convert ResResources to Resources and Blanknodes - $resmodel=$this->model->find( $this->_resNode2Node($subject), - $this->_resNode2Node($predicate), - $this->_resNode2Node($object) - ); - //convert Resources, Blanknodes to ResResources - foreach ($resmodel->triples as $statement) - { - $result[]=new Statement($this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - }; - return $result; - - } - - /** - * Searches for triples and returns the first matching statement. - * NULL input for any parameter will match anything. - * Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); - * Returns the first statement with ResResources of the Model where the object equals $node. - * Returns an NULL if nothing is found. - * You can define an offset to search. - * - * @param object Node $subject - * @param object Node $predicate - * @param object Node $object - * @param integer $offset - * @return object Statement - * @access public - */ - function findFirstMatchingStatement($subject,$predicate,$object,$offset = 0) - { - - $statement = $this->model->findFirstMatchingStatement( $this->_resNode2Node($subject), - $this->_resNode2Node($predicate), - $this->_resNode2Node($object), - $offset - ); - if ($statement!==null) - { - return new Statement( $this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - } else - { - return null; - } - } - - /** - * Adds a new triple to the Model without checking if the statement is already in the Model. - * So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) - * Expects a statements with ResResources(ResLiterals) - * - * @param object Statement $statement - * @access public - * @throws PhpError - */ - function add($statement) - { - return $this->model->add(new Statement( $this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - /** - * Checks if a new statement is already in the Model and adds the statement, if it is not in the Model. - * addWithoutDuplicates() is significantly slower then add(). - * Retruns TRUE if the statement is added. - * FALSE otherwise. - * Expects a statements with ResResources(ResLiterals) - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function addWithoutDuplicates($statement) - { - return $this->model->addWithoutDuplicates(new Statement($this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - - /** - * Tests if the Model contains the given statement. - * TRUE if the statement belongs to the model; - * FALSE otherwise. - * Expects a statement of ResResources(ResLiterals) - * - * @param object Statement $statement - * @return boolean - * @access public - */ - function contains(& $statement) - { - - return $this->model->contains(new Statement($this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject())) - ); - } - - /** - * Determine if all of the statements in a model are also contained in this model. - * True if all of the statements in $model are also contained in this model and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAll(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->containsAll($model->getModel()); - - return $this->model->containsAll($model); - } - - /** - * Determine if any of the statements in a model are also contained in this model. - * True if any of the statements in $model are also contained in this model and false otherwise. - * - * @param object Model &$model - * @return boolean - * @access public - */ - function containsAny(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->containsAny($model->getModel()); - return $this->model->containsAny($model); - } - - /** - * Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model. - * - * @param object Node &$node - * @return boolean - * @access public - */ - function containsResource(& $node) - { - if ($this->findFirstMatchingStatement($node,null,null) === null) - if ($this->findFirstMatchingStatement(null,$node,null) === null) - if ($this->findFirstMatchingStatement(null,null,$node) === null) - return false; - - return true; - } - - /** - * Create a literal from a String value with the $dtype Datatype - * An existing literal of the right value may be returned, or a fresh one created. - * - * @param string $value - * @param string $dtype - * @return object ResLiteral - * @access public - */ - function createTypedLiteral($value,$dtype) - { - $resLiteral = new ResLiteral($value); - $resLiteral->setDatatype($dtype); - $resLiteral->setAssociatedModel($this); - - return $resLiteral; - } - - /** - * Checks if two models are equal. - * Two models are equal if and only if the two RDF graphs they represent are isomorphic. - * - * Warning: This method doesn't work correct with models where the same blank node has different - * identifiers in the two models. We will correct this in a future version. - * - * @access public - * @param object model &$that - * @throws phpErrpr - * @return boolean - */ - function equals(& $that) - { - if (is_a($that,'ResModel')) - return $this->model->equals($that->getModel()); - return $this->model->equals($that); - } - - /** - * Returns a new model that is the subtraction of another model from this model. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function subtract($model) - { - if (is_a($model,'ResModel')) - return $this->model->subtract($model->getModel()); - return $this->model->subtract($model); - } - - /** - * Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model. - * If none exist, return null; if several exist, pick one arbitrarily. - * - * @param object ResResource $subject - * @param object ResResource $property - * @return object Statement - * @access public - * @throws phpErrpr - */ - function getProperty($subject,$property) - { - - $statement= $this->model->findFirstMatchingStatement( $this->_resNode2Node($subject), - $this->_resNode2Node($property), - null - ); - if ($statement === null) - return null; - - return new Statement($this->_node2ResNode($statement->getSubject()), - $this->_node2ResNode($statement->getPredicate(),true), - $this->_node2ResNode($statement->getObject()) - ); - - } - - /** - * Checks if MemModel is empty - * - * @return boolean - * @access public - */ - function isEmpty() - { - return $this->model->isEmpty(); - } - - /** - * Returns a ResIterator with all objects in a model. - * - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listObjects() - { - return $this->listObjectsOfProperty(null); - } - - /** - * Returns a ResIterator with all objects with a given property and property value. - * - * @param object ResResource $property - * @param object ResResource $value - * @return object ResIterator - * @access public - */ - function listObjectsOfProperty($property, $value = null) - { - return new ResIterator(null,$property,$value,'o',$this); - } - - - /** - * Returns a ResIterator with all subjects in a model. - * - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listSubjects() - { - return $this->listSubjectsWithProperty(null); - } - - /** - * Returns a ResIterator with all subjects with a given property and property value. - * - * @param object ResResource $property - * @param object ResResource $value - * @return object ResIterator - * @access public - * @throws phpErrpr - */ - function listSubjectsWithProperty($property,$value = null) - { - return new ResIterator(null,$property,$value,'s',$this); - } - - /** - * Removes the statement of ResResources(ResTriples) from the MemModel. - * TRUE if the statement is removed. - * FALSE otherwise. - * - * @param object Statement $statement - * @return boolean - * @access public - * @throws PhpError - */ - function remove($statement) - { - return $this->model->remove(new Statement( $this->_resNode2Node($statement->getSubject()), - $this->_resNode2Node($statement->getPredicate()), - $this->_resNode2Node($statement->getObject()) - )); - } - - /** - * Number of statements in the MemModel - * - * @return integer - * @access public - */ - function size() - { - return $this->model->size(); - } - - /** - * Returns a new Model that is the set-union of the model with another model. - * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster. - * - * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) - * is another graph, which we will call the merge of the graphs. - * Each of the original graphs is a subgraph of the merged graph. Notice that when forming - * a merged graph, two occurrences of a given uriref or literal as nodes in two different - * graphs become a single node in the union graph (since by definition they are the same - * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course - * never merged. In particular, this means that every blank node in a merged graph can be - * identified as coming from one particular graph in the original set of graphs. - * - * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating - * their corresponding N-triples documents and constructing the graph described by the merged - * document, since if some of the documents use the same node identifiers, the merged document - * will describe a graph in which some of the blank nodes have been 'accidentally' merged. - * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or - * more documents, and to replace it with a distinct nodeID in each of them, before merging the - * documents. (Not implemented yet !!!!!!!!!!!) - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - * - */ - function & unite(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->unite($model->getModel()); - return $this->model->unite($model); - } - - /** - * Adds another model to this MemModel. - * Duplicate statements are not removed. - * If you don't want duplicates, use unite(). - * If any statement of the model to be added to this model contains a blankNode - * with an identifier already existing in this model, a new blankNode is generated. - * - * @param object Model $model - * @access public - * @throws phpErrpr - * - */ - function addModel(&$model) - { - if (is_a($model,'ResModel')) - return $this->model->addModel($model->getModel()); - return $this->model->addModel($model); - } - - /** - * Create a new RDF Container from type rdf:Alt - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createAlt($uri = null) - { - $resAlt = new ResAlt($uri); - $resAlt->setAssociatedModel($this); - - return $resAlt; - } - - /** - * Create a new RDF Container from type rdf:Bag - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createBag($uri = null) - { - $resBag = new ResBag($uri); - $resBag->setAssociatedModel($this); - - return $resBag; - } - - /** - * Create a new RDF Container from type rdf:Seq - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createSeq($uri = null) - { - $resSeq = new ResSeq($uri); - $resSeq->setAssociatedModel($this); - - return $resSeq; - } - - /** - * Create a new RDF Collection from type rdf:List - * This method may return an existing container with the correct URI and model, - * or it may construct a fresh one, as it sees fit. - * - * Subsequent operations on the returned Container may modify this model. - * - * - * @param string $uri - * @return object ResProperty - * @access public - */ - function createList($uri = null) - { - $resList = new ResList($uri); - $resList->setAssociatedModel($this); - - return $resList; - } - - /** - * Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements - * - * - * @return object Model - * @access public - */ - function & getModel() - { - return $this->model; - } - - - /** - * Internal method, that returns a resource URI that is unique for the Model. - * URIs are generated using the base_uri of the Model, the prefix and a unique number. - * If no prefix is defined, the bNode prefix, defined in constants.php, is used. - * - * @param string $prefix - * @return string - * @access private - */ - function getUniqueResourceURI($bnodePrefix) - { - return $this->model->getUniqueResourceURI($bnodePrefix); - } - - /** - * Load a model from a file containing RDF, N3 or N-Triples. - * This function recognizes the suffix of the filename (.n3 or .rdf) and - * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); - * If the model is not empty, the contents of the file is added to this DbModel. - * - * @param string $filename - * @param string $type - * @param boolean $stream - * @access public - */ - function load($filename, $type = NULL, $stream=false) - { - $this->model->load($filename, $type, $stream); - } - - /** - * Return current baseURI. - * - * @return string - * @access public - */ - function getBaseURI() - { - return $this->model->getBaseURI(); - } - - /** - * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file. - * You can decide to which format the model should be serialized by using a - * corresponding suffix-string as $type parameter. If no $type parameter - * is placed this method will serialize the model to XML/RDF format. - * Returns FALSE if the MemModel couldn't be saved to the file. - * - * @access public - * @param string $filename - * @param string $type - * @throws PhpError - * @return boolean - */ - function saveAs($filename, $type ='rdf') - { - return $this->model->saveAs($filename, $type ='rdf'); - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - */ - function writeAsHTMLTable() - { - $this->model->writeAsHtmlTable(); - } - - /** - * Returns a new model containing all the statements which are in both this model and another. - * - * @param object Model $model - * @return object MemModel - * @access public - * @throws phpErrpr - */ - function & intersect(& $model) - { - if (is_a($model,'ResModel')) - return $this->model->intersect($model->getModel()); - return $this->model->intersect($model); - } - - /** - * converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral - * - * @param object Node $node - * @param boolean $isProperty - * @return object ResResource / ResProperty / ResLiteral - * @access private - * @throws phpErrpr - */ - function _node2ResNode($node, $isProperty = false) - { - if (is_a($node,'Literal')) - { - $return= new ResLiteral($node->getLabel(),$node->getLanguage()); - $return->setDatatype($node->getDatatype()); - $return->setAssociatedModel($this); - - return $return; - } - if (is_a($node,'Resource')) - { - if ($isProperty) - { - $res= new ResProperty($node->getLabel()); - } else - { - $res= new ResResource($node->getLabel()); - } - $res->setAssociatedModel($this); - if (is_a($node,'Blanknode')) - $res->setIsAnon(true); - - return $res; - } - } - - /** - * converts a ResResource, ResProperty, or ResLiteral into a Resource, Blanknode, or Literal - * - * @param object ResNode $resNode - * @return object Node - * @access private - * @throws phpErrpr - */ - function _resNode2Node($resNode) - { - if (is_a($resNode,'ResResource')) - { - if ($resNode->getIsAnon()) - { - $return=new BlankNode($resNode->getURI()); - } else - { - $return=new Resource($resNode->getURI()); - } - return $return; - } - - if (is_a($resNode,'ResLiteral')) - { - $literal=new Literal($resNode->getLabel(),$resNode->getLanguage()); - if ($resNode->getDatatype() != null) - $literal->setDatatype($resNode->getDatatype()); - return $literal; - } - } - - /** - * Set a base URI for the MemModel. - * Affects creating of new resources and serialization syntax. - * If the URI doesn't end with # : or /, then a # is added to the URI. - * @param string $uri - * @access public - */ - function setBaseURI($uri) - { - $this->model->setBaseURI($uri); - } - - /** - * Writes the RDF serialization of the MemModel as HTML table. - * - * @access public - * @return string - */ - function writeRdfToString() - { - return $this->model->writeRdfToString(); - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an associative array of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return array [][?VARNAME] = object Node (if $returnNodes = TRUE) - * OR array [][?VARNAME] = string - * - */ - function & rdqlQuery($queryString, $returnNodes = TRUE) - { - $ret = $this->model->rdqlQuery($queryString, $returnNodes); - return $ret; - } - - /** - * Perform an RDQL query on this MemModel. - * This method returns an RdqlResultIterator of variable bindings. - * The values of the query variables can either be RAP's objects (instances of Node) - * if $returnNodes set to TRUE, or their string serialization. - * - * @access public - * @param string $queryString - * @param boolean $returnNodes - * @return object RdqlResultIterator = with values as object Node (if $returnNodes = TRUE) - * OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE) - * - */ - function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) - { - return $this->model->rdqlQueryAsIterator($queryString, $returnNodes); - } - - - /** - * Returns the models namespaces. - * - * @author Tobias Gau - * @access public - * @return Array - */ - function getParsedNamespaces(){ - return $this->model->getParsedNamespaces(); - } - - - - /** - * Adds the namespaces to the model. This method is called by - * the parser. !!!! addParsedNamespaces() not overwrites manual - * added namespaces in the model !!!! - * - * @author Tobias Gau - * @access public - * @param Array $newNs - */ - function addParsedNamespaces($newNs){ - $this->model->addParsedNamespaces($newNs); - } - - - /** - * Adds a namespace and prefix to the model. - * - * @author Tobias Gau - * @access public - * @param String $prefix, String $nmsp - */ - function addNamespace($prefix, $namespace){ - $this->model->addNamespace($prefix, $namespace); - } - - /** - * removes a single namespace from the model - * - * @author Tobias Gau - * @access public - * @param String $nmsp - */ - function removeNamespace($nmsp){ - return $this->model->removeNamespace($nmsp); - } - - - - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModelP.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModelP.php deleted file mode 100755 index 276ded65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResModelP.php +++ /dev/null @@ -1,24 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// Include ResModel classes -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResResource.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResContainer.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResAlt.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResBag.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResLiteral.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResProperty.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResSeq.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResIterator.php'); -require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResList.php'); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResProperty.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResProperty.php deleted file mode 100755 index 812b8f49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResProperty.php +++ /dev/null @@ -1,32 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ -class ResProperty extends ResResource -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResProperty($uri) - { - parent::ResResource($uri); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResResource.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResResource.php deleted file mode 100755 index e23ec1d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResResource.php +++ /dev/null @@ -1,212 +0,0 @@ - -* -* -* @package resModel -* @access public -**/ -class ResResource extends Resource -{ - /** - * Holds a reference to the associated model - * @var ResModel - * @access private - */ - var $model; - - /** - * Is true, if this resource is an anonymous node. - * @var boolean - * @access private - */ - var $isAnon; - - - /** - * Constructor - * You can supply a uri - * - * @param string $uri - * @access public - */ - function ResResource($uri) - { - parent::Resource($uri); - $this->isAnon = ($uri === null); - } - - /** - * Sets the reference to the assocoated model. - * - * @param object Model $model - * @access public - */ - function setAssociatedModel(& $model) - { - $this->model=& $model; - if ($this->isAnon) - $this->uri=$this->model->getUniqueResourceURI(BNODE_PREFIX); - } - - /** - * Get the reference to the assocoated model. - * - * @return object Model $model - * @access public - */ - function getAssociatedModel() - { - return $this->model; - } - - /** - * Sets the URI of this resource - * - * @param string $uri - * @access public - */ - function setURI($uri) - { - $this->uri = $uri; - } - - /** - * Add a property to this resource. - * A statement with this resource as the subject, p as the predicate and o - * as the object is added to the model associated with this resource. - * - * @param ResResource $property - * @param ResResource/ResLiteral $object - * @return object ResResource - * @access public - */ - function addProperty($property,$object) - { - $this->model->add(new Statement($this,$property,$object)); - - return $this; - } - - /** - * List all the values with the property p as statements in an array. - * - * @param ResResource $property - * @return ResIterator - * @access public - */ - function listProperties($property = null) - { - return $this->model->find($this,$property,null); - } - - /** - * Answer some statement (this, p, O) in the associated model. - * If there are several such statements, any one of them may be returned. - * If no such statements exist, null is returned. - * - * @param ResResource $property - * @return object ResResource - * @access public - */ - function getProperty($property) - { - return $this->model->getProperty($this,$property); - } - - /** - * Determine whether this resource has any values for a given property. - * - * @param ResResource $property - * @param ResResource $value - * @return object ResResource - * @access public - */ - function hasProperty($property, $value = null) - { - $ret= $this->model->findFirstMatchingStatement($this,$property,$value); - - return ($ret!==null); - } - - /** - * Determine whether this resource is an anonymous resource - * - * @return boolean - * @access public - */ - function getIsAnon() - { - return $this->isAnon; - } - - /** - * Set whether this resource is an anonymous resource - * - * @param boolean - * @access public - */ - function setIsAnon($isAnon) - { - $this->isAnon=$isAnon; - } - - /** - * Checks if the resource equals another resource. - * Two resources are equal, if they have the same URI - * - * @access public - * @param object resource $that - * @return boolean - */ - function equals ($that) - { - if (is_a($that,'ResLiteral')) - return $that->equals($this); - - return ($that!==null && ($this->getURI() == $that->getURI())); - } - - /** - * Delete all the statements with predicate p for this resource from - * its associated model. - * - * @access public - * @param object resource $property - * @return object ResResource - */ - function removeAll($property = null) - { - foreach ($this->model->find($this,$property,null) as $statement) - { - $this->model->remove($statement); - } - return $this; - } - - /** - * Delete all the properties for this resource from the associated model. - * - * @access public - * @return object ResResource - */ - function removeProperties() - { - $this->removeAll(); - return $this; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResSeq.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResSeq.php deleted file mode 100755 index 7623a68a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/resModel/ResSeq.php +++ /dev/null @@ -1,153 +0,0 @@ - -* -* @package resModel -* @access public -**/ -class ResSeq extends ResContainer -{ - - /** - * Constructor - * You can supply a URI - * - * @param string $uri - * @access public - */ - function ResSeq($uri = null) - { - parent::ResContainer($uri); - $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_SEQ); - } - - /** - * Insert a new member into the sequence at the specified position. - * The existing member at that position, and all others with higher indexes, - * have their index increased by one. - * - * @param integer $index - * @param object ResResource/ResLiteral $resResource - * @return boolean - * @access public - */ - function addAtIndex($index, $object) - { - //get a members index - $memberIndex= $this->getMembers(); - - //type this container, if it isn't already typed - if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE))) - $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType); - - //renumber all higher members - for ($i = count($memberIndex);$i >= $index ; $i--) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i+1),$memberIndex[$i]); - } - //remove the old value at this position - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - //add the new value - $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object); - - return $this; - } - - /** - * Get the member at a given index - * - * @param integer $index - * @return object ResResource/ResLiteral - * @access public - */ - function getMember($index) - { - $result=$this->listProperties($this->_getMembershipPropertyWithIndex($index)); - if (isset($result[0])) - { - return $result[0]; - } - else - { - return null; - } - } - - /** - * Return the index of a given member of the sequence. - * If the same value appears more than once in the sequence, it is undefined - * which of the indexes will be returned. - * If the member is not found in this sequence, a value of 0 is returned. - * - * @param object ResResource/ResLiteral $object - * @return integer - * @access public - */ - function indexOf($object) - { - //check all members, until $object is found - foreach ($this->listProperties() as $statement) - { - $predicateLabel=$statement->getLabelPredicate(); - if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel)) - { - if($object->equals($statement->getObject())) - //analyze the container membership property and return the index - return $this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel); - } - } - //return 0 if $object wasn't found - return 0; - } - - /** - * Remove the member at the specified index. - * All other members with a higher index will have their index reduced by one. - * - * @param integer $index - * @access public - */ - function removeAtIndex($index) - { - $memberIndex= $this->getMembers(); - - - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - - for ($i = $index;$i < count($memberIndex); $i++) - { - $this->removeAll($this->_getMembershipPropertyWithIndex($i+1)); - $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]); - } - return $this; - } - - /** - * Set the value at a given index in the sequence. - * - * If the index is not in the range of the sequence, false is returned - * - * @param integer $index - * @return boolean - * @access public - */ - function set($index, $object) - { - if (!$this->hasProperty($this->_getMembershipPropertyWithIndex($index))) - return false; - - $this->removeAll($this->_getMembershipPropertyWithIndex($index)); - $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object); - return true; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/all-wcprops deleted file mode 100755 index c66fd803..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/all-wcprops +++ /dev/null @@ -1,83 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svnroot/rdfapi-php/!svn/ver/554/trunk/rdfapi-php/api/sparql -END -FilterFunctions.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/FilterFunctions.php -END -SparqlEngineDb.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/537/trunk/rdfapi-php/api/sparql/SparqlEngineDb.php -END -SparqlParserException.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlParserException.php -END -GraphPattern.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/GraphPattern.php -END -SparqlParser.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/538/trunk/rdfapi-php/api/sparql/SparqlParser.php -END -SparqlClient.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlClient.php -END -SPARQL.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/425/trunk/rdfapi-php/api/sparql/SPARQL.php -END -ClientQuery.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/ClientQuery.php -END -Constraint.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/Constraint.php -END -Query.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/548/trunk/rdfapi-php/api/sparql/Query.php -END -QueryTriple.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/QueryTriple.php -END -SparqlEngine.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/466/trunk/rdfapi-php/api/sparql/SparqlEngine.php -END -SparqlVariable.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlVariable.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/entries deleted file mode 100755 index 1931791f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/entries +++ /dev/null @@ -1,202 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/sparql -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-05T08:18:50.037887Z -554 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -SparqlParserException.php -file - - - - -2008-02-29T14:57:47.256327Z -52fce867873fe06a401a23ebeeb2891d -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SparqlEngineDb.php -file - - - - -2008-02-29T14:57:47.240706Z -df70f3cbf964025d3bedc17278c18a3c -2007-09-18T17:55:11.280870Z -537 -cweiske -has-props - -GraphPattern.php -file - - - - -2008-02-29T14:57:47.256327Z -094e348604b15b3f74f4acc02c0865ed -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SparqlClient.php -file - - - - -2008-02-29T14:57:47.287568Z -22707c51f0712c6366f882a3b965ea0a -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SPARQL.php -file - - - - -2008-02-29T14:57:47.287568Z -ac9473fe66b517131684146b7dcb072e -2007-05-01T12:59:18.000000Z -425 -cweiske -has-props - -SparqlEngine -dir - -ClientQuery.php -file - - - - -2008-02-29T14:57:47.287568Z -042f95b0a1fb7f4f937d7311133884bb -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -Query.php -file - - - - -2008-02-29T14:57:47.303189Z -396c7fc3c8c8adec28fbd14fc1fee33a -2007-11-15T10:20:18.957776Z -548 -fusel2k -has-props - -SparqlVariable.php -file - - - - -2008-02-29T14:57:47.334430Z -5f6220f5b0ed69ebb33741ac05a0787f -2007-06-27T16:47:57.067358Z -465 -cweiske - -SparqlEngineDb -dir - -FilterFunctions.php -file - - - - -2008-02-29T14:57:47.240706Z -ecfc1b457940a4ae21743cfe6b1cecce -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SparqlParser.php -file - - - - -2008-02-29T14:57:47.271947Z -57096a9f23a7ce8081766061d20fc3ce -2007-09-19T19:35:23.227581Z -538 -cweiske -has-props - -Constraint.php -file - - - - -2008-02-29T14:57:47.303189Z -7b563e3c50f93af9169fb469344ceab4 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -QueryTriple.php -file - - - - -2008-02-29T14:57:47.318809Z -b2a8709f5397ebaa67b7fac97b32bfc0 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SparqlEngine.php -file - - - - -2008-02-29T14:57:47.318809Z -efddc5b74fa8beebf3213903c2ed30d6 -2007-07-04T08:44:01.466753Z -466 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/ClientQuery.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/ClientQuery.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/ClientQuery.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Constraint.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Constraint.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Constraint.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/FilterFunctions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/FilterFunctions.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/FilterFunctions.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/GraphPattern.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/GraphPattern.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/GraphPattern.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Query.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Query.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/Query.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/QueryTriple.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/QueryTriple.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/QueryTriple.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SPARQL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SPARQL.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SPARQL.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlClient.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlClient.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlClient.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngine.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngine.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngineDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngineDb.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlEngineDb.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParser.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParser.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParserException.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParserException.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/prop-base/SparqlParserException.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/ClientQuery.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/ClientQuery.php.svn-base deleted file mode 100755 index a3fb5322..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/ClientQuery.php.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class ClientQuery extends Object { - - var $default = array(); - var $named = array(); - var $prefixes = array(); - var $query; - - /** - * Adds a default graph to the query object. - * - * @param String $default default graph name - */ - function addDefaultGraph($default){ - if(!in_array($this->named,$this->default)) - $this->default[] = $default; - } - /** - * Adds a named graph to the query object. - * - * @param String $default named graph name - */ - function addNamedGraph($named){ - if(!in_array($named,$this->named)) - $this->named[] = $named; - } - /** - * Adds the SPARQL query string to the query object. - * - * @param String $query the query string - */ - function query($query){ - $this->query = $query; - } - -} - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Constraint.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Constraint.php.svn-base deleted file mode 100755 index 3d17430b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Constraint.php.svn-base +++ /dev/null @@ -1,95 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -Class Constraint extends Object{ - - /** - * The expression string. - * @var string - */ - protected $expression; - - /** - * True if it is an outer filter, false if not. - * @var boolean - */ - protected $outer; - - /** - * The expression tree - * @var array - */ - protected $tree = null; - - /** - * Adds an expression string. - * - * @param String $exp the expression String - * @return void - */ - public function addExpression($exp) - { - $this->expression = $exp; - } - - /** - * Returns the expression string. - * - * @return String the expression String - */ - public function getExpression() - { - return $this->expression; - } - - - /** - * Sets the filter type to outer or inner filter. - * True for outer false for inner. - * - * @param boolean $boolean - * @return void - */ - public function setOuterFilter($boolean) - { - $this->outer = $boolean; - } - - /** - * Returns true if this constraint is an outer filter- false if not. - * - * @return boolean - */ - public function isOuterFilter() - { - return $this->outer; - } - - - public function getTree() - { - return $this->tree; - }//public function getTree() - - public function setTree($tree) - { - $this->tree = $tree; - }//public function setTree($tree) - -} -// end class: Constraint.php -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/FilterFunctions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/FilterFunctions.php.svn-base deleted file mode 100755 index ccd2c6ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/FilterFunctions.php.svn-base +++ /dev/null @@ -1,137 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -*/ - - - - -/** -* Evaluates the regex() function. Returns true if the regex is matched false if not. -* -* @param String $string the string which has to be evaluated -* @param String $pattern the regex pattern -* @param String $flags additional flags like "i" -* @return boolean -*/ -function regex($string,$pattern,$flags = ''){ - $string = trim($string); - $pattern = trim($pattern); - if(strpos($string,"str_")===0){ - $string = substr($string,4); - $pattern = substr($pattern,4); - $flags = substr($flags,4); - }else{ - return false; - } - if(preg_match('/'.$pattern.'/'.$flags,$string)) - return true; - else - return false; -} - -/** -* Evaluates the dateTime() function.Tries to convert a date string into -* a unix timestamp. -* -* @param String $string the date string -* @return integer the corresponding unix timestamp -*/ -function dateTime($string){ - $string = trim($string); - if(strpos($string,"str_")===0) - $string = substr($string,4); - - $time = strtotime($string); - if($time == -1) - return $string; - else - return $time; -} - - -/** -* Evaluates the langMatches() function. Return true if the lang tag matches false if not. -* -* @param String $lang_range the string. -* @param String $lang_tag the regex pattern -* @return boolean -*/ -function langMatches($lang_range,$lang_tag){ - - if($lang_range == null) - return false; - - if(strpos($lang_range,"str_")===0) - $lang_range = substr($lang_range,4); - if(strpos($lang_tag,"str_")===0) - $lang_tag = substr($lang_tag,4); - - if(strtolower($lang_range) == strtolower($lang_tag)) - return true; - $tags = preg_match_all("/[^\-\s].[^\-\s]*/",$lang_range,$hits); - if($tags){ - if($lang_tag == '*') - return true; - foreach($hits[0] as $tag){ - if(strtolower($tag) == strtolower($lang_tag)) - return true; - } - return false; - }else{ - return false; - } -} - -/** -* Evaluates the str() function. Returns the string representation of a -* variable or RDF term. -* -* @param String $string the string -* @return boolean -*/ -function str($string){ - $str = preg_match("/\".[^\"]*\"|\'.[^\']*\'/",$string,$hits); - if($str != 0){ - return "str_".$hits[0]; - }else{ - if(strpos($string,"str_")===0){ - return $string; - }else{ - if(strpos($string,"uri_")===0) - return "str_".substr($string,4); - if(strpos($string,'<')==0) - return "str_".substr($string,1,-1); - } - } - return false; -} - -/** -* Evaluates the lang() function. Returns lang tag of a Literal. -* -* @param String $string the string. -* @return String the lang tag or false if there is no language tag. -*/ -function lang($string){ - $str = preg_match("/\".[^\"]*\"@(.[^\s]*)|\'.[^\']*\'@(.[^\s]*)/",$string,$hits); - if($str){ - if($hits[1] != null) - return $hits[1]; - else - return $hits[2]; - }else{ - return false; - } -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/GraphPattern.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/GraphPattern.php.svn-base deleted file mode 100755 index bdddf39e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/GraphPattern.php.svn-base +++ /dev/null @@ -1,295 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class GraphPattern extends Object{ - - /** - * Graphname. 0 if its in the default graph. - */ - protected $graphname = null; - - /** - * Array of QueryTriple objects - * @var array - */ - protected $triplePatterns = array(); - - /** - * A List of Constraint objects - * @var array - */ - protected $constraints = array(); - - /** - * @var int Pointer to optional pattern. - */ - protected $optional = null; - - /** - * @var int Pointer to union pattern. - */ - protected $union = null; - - /** - * ID of the pattern in the pattern list that - * this pattern is subpattern of. - * @var int - */ - protected $subpatternOf = null; - - /** - * @var boolean TRUE if the pattern is open- FALSE if closed. - */ - public $open = false; - - /** - * @var boolean TRUE if the GraphPattern is a construct pattern. - */ - public $isConstructPattern = false; - - - /** - * @var int The GraphPatterns id. - */ - public $patternId = null; - - - /** - * Constructor - */ - public function GraphPattern() { - $this->open = true; - $this->isConstructPattern = false; - $this->constraints = array(); - $this->triplePatterns = array(); - } - - /** - * Returns the graphname. - * - * @return String - */ - public function getGraphname(){ - return $this->graphname; - } - - /** - * Returns the triple pattern of the graph pattern. - * - * @return Array - */ - public function getTriplePatterns(){ - return $this->triplePatterns; - } - - /** - * Returns a constraint if there is one false if not. - * - * @return Constraint - */ - public function getConstraints() { - return $this->constraints; - } - - /** - * Returns a pointer to an optional graph pattern. - * - * @return integer - */ - public function getOptional() { - return $this->optional; - } - - /** - * Returns a pointer to the parent pattern this pattern - * is subpattern of. - * - * @return integer - */ - public function getSubpatternOf() { - return $this->subpatternOf; - } - - /** - * Returns a pointer to a union graph pattern. - * - * @return integer - */ - public function getUnion() { - return $this->union; - } - - /** - * Sets the graphname. - * - * @param String $name - * @return void - */ - public function setGraphname($name) { - $this->graphname = $name; - } - - /** - * Adds List of QueryTriples to the GraphPattern. - * - * @param array $trpP - * @return void - */ - public function addTriplePatterns($trpP) { - $this->triplePatterns = array_merge($this->triplePatterns, $trpP); - } - - /** - * Sets the List of QueryTriples to the GraphPattern. - * - * @param array $trpP - * @return void - */ - public function setTriplePatterns($trpP) { - $this->triplePatterns = $trpP; - } - - /** - * Adds a single Constraint to the GraphPattern. - * - * @param Constraint $cons - */ - public function addConstraint(&$cons) { - $this->constraints[] = $cons; - } - - /** - * Adds an array of Constraint objects to the GraphPattern. - * - * @param array $cons - */ - public function addConstraints(&$cons) { - $this->constraints = array_merge($this->constraints, $cons); - } - - /** - * Adds a pointer to an optional graphPattern. - * - * @param integer $patternId - * @return void - */ - public function setOptional($patternId) { - $this->optional = &$patternId; - } - - /** - * Adds a pointer to a union graphPattern. - * - * @param integer $patternId - * @return void - */ - public function setUnion($patternId) { - $this->union = &$patternId; - } - - /** - * Adds a pointer to a pattern that - * this one is subpattern of - * - * @param integer $patternId - */ - public function setSubpatternOf($patternId) { - $this->subpatternOf = $patternId; - } - - - /** - * Sets the GraphPatterns Id. - * - * @param integer $id - * @return void - */ - public function setId($id){ - $this->patternId = $id; - } - - /** - * Returns the GraphPatterns id. - * - * @return integer - */ - public function getId(){ - return $this->patternId; - } - - - - /** - * Returns an array of all variables used in this - * graph pattern. - * All variables are listed only once (unique). - * - * @return array Array of variable names - */ - public function getVariables() - { - $arVars = array(); - - foreach ($this->triplePatterns as $pattern) { - $arVars = array_merge($arVars, $pattern->getVariables()); - } - - return array_unique($arVars); - }//public function getVariables() - - - - /** - * Checks if the graph pattern is empty (contains no - * usable data). - * Occurs when using "{}" without pre- or suffixes - * WHERE - * { - * { ?person rdf:type foaf:Person } . - * } - * - * @return boolean True if the pattern is empty. - */ - public function isEmpty() - { - return - count($this->triplePatterns) == 0 - && count($this->constraints) == 0 - && $this->getGraphname() === null - ; - }//public function isEmpty() - - - - /** - * When cloning, we need to clone some subobjects, too - */ - public function __clone() - { - if (count($this->triplePatterns) > 0) { - foreach ($this->triplePatterns as $nId => $pattern) { - $this->triplePatterns[$nId] = clone $this->triplePatterns[$nId]; - } - } - if (count($this->constraints) > 0) { - foreach ($this->constraints as $nId => $constraint) { - $this->constraints[$nId] = clone $this->constraints[$nId]; - } - } - } - -}// end class: GraphPattern.php -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Query.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Query.php.svn-base deleted file mode 100755 index 2240a2f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/Query.php.svn-base +++ /dev/null @@ -1,685 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class Query extends Object -{ - /** - * The BASE part of the SPARQL query. - * @var string - */ - protected $base; - - /** - * Original SPARQL query string - * @var string - */ - protected $queryString = null; - - /** - * Array that contains used prefixes and namespaces. - * Key is the prefix, value the namespace. - * - * @example - * array(8) { - * ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#" - * ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#" - * } - * - * @var array - */ - public $prefixes = array(); - - /** - * Array of result variables that shall be returned. - * E.g. "?name", "?mbox" - * - * @var array - */ - protected $resultVars = array(); - - /** - * What form/type of result should be returned. - * - * One of: - * - "ask" - * - "count" - * - "construct" - * - "describe" - * - "select" - * - "select distinct" - * - * @var string - * @see http://www.w3.org/TR/rdf-sparql-query/#QueryForms - */ - protected $resultForm = null; - - /** - * Contains the result part of the SPARQL query. - * Array of GraphPattern - * - * @var array - */ - protected $resultPart = array(); - - /** - * Contains the FROM part of the SPARQL query. - * @var array - */ - protected $fromPart = array(); - - /** - * Contains the FROM NAMED part of the SPARQL query. - * @var array - */ - protected $fromNamedPart = array(); - - /** - * Optional solution modifier of the query. - * Array with three keys: - * "order by", "limit", "offset" - * If they are not set, their value is null - * - * "order by" can be an array with subarrays, each of those - * subarrays having two keys: "val" and "type". - * "val" determines the variable ("?mbox"), "type" is - * "asc" or "desc" - * - * @var array - */ - protected $solutionModifier = array(); - - /** - * Blanknode counter. - * How many blank nodes are in $resultPart - * - * @var int - */ - protected $bnodeCounter = 0; - - /** - * GraphPattern counter. - * How many GraphPattern are in $resultPart - * - * @var int - */ - public $graphPatternCounter = 0; - - /** - * List of all vars used in the query. - * Key is the variable (e.g. "?x"), value - * is boolean true - * - * @var array - */ - public $usedVars = array(); - - /** - * If the query type is CONSTRUCT this variable contains the - * CONSTRUCT graph pattern. - */ - protected $constructPattern = null; - - /** - * TRUE if the query is empty FALSE if not. - * - * @var boolean - */ - public $isEmpty = null; - - /** - * Language of variables. NULL if the variable has no - * language tag (e.g. @en) set. - * $varname => $language tag - * @var array - */ - public $varLanguages = array(); - - /** - * Datatype of variables. NULL if the variable has no - * data type (e.g. ^^xsd::integer) set. - * $varname => $datatype - * @var array - */ - public $varDatatypes = array(); - - - - /** - * Constructor - */ - public function Query(){ - $this->resultForm = null; - $this->solutionModifier['order by'] = null; - $this->solutionModifier['limit'] = null; - $this->solutionModifier['offset'] = null; - $this->bnodeCounter = 0; - $this->graphPatternCounter = 0; - - } - - /** - * Returns the BASE part of the query. - * - * @return String - */ - public function getBase(){ - return $this->base; - } - - /** - * Returns the prefix map of the query. - * - * @return Array - */ - public function getPrefixes(){ - return $this->prefixes; - } - - /** - * Returns a list containing the result vars. - * - * @return Array - */ - public function getResultVar($strName) { - foreach ($this->resultVars as $var) { - if ($var->getVariable() == $strName) { - return $var; - } - } - return false; - } - - /** - * Returns a list containing the result vars. - * - * @return Array - */ - public function getResultVars(){ - return $this->resultVars; - } - - /** - * Returns the type the result shall have. - * E.g. "select", "select distinct", "ask", ... - * - * @see $resultForm - * - * @return string - */ - public function getResultForm(){ - return $this->resultForm; - } - - /** - * Returns a list containing the graph patterns of the query. - * - * @return Array - */ - public function getResultPart(){ - return $this->resultPart; - } - - /** - * Returns the FROM clause of the query. - * - * @return String - */ - public function getFromPart(){ - return $this->fromPart; - } - - /** - * Returns the FROM NAMED clause of the query. - * - * @return Array - */ - public function getFromNamedPart(){ - return $this->fromNamedPart; - } - - /** - * Returns $isEmpty variable - * @return boolean - */ - public function isEmpty() { - return $this->isEmpty; - } - - /** - * Returns an unused Bnode label. - * - * @return String - */ - public function getBlanknodeLabel(){ - return "_:bN".$this->bnodeCounter++; - } - - - /** - * Sets the base part. - * - * @param String $base - * @return void - */ - public function setBase($base){ - $this->base = $base; - } - - - /** - * Adds a prefix to the list of prefixes. - * - * @param String $prefix - * @param String $label - * @return void - */ - public function addPrefix($prefix, $label){ - $this->prefixes[$prefix]= $label; - } - - /** - * Adds a variable to the list of result variables. - * - * @param String $var - * @return void - */ - public function addResultVar($var){ - $this->resultVars[] = $var; - $var->setDatatype($this->getDatatype($var)); - - $this->varLanguages[$var->getId()] = self::getLanguageTag($var); - $this->varDatatypes[$var->getId()] = $this->getDatatype($var); - } - - - /** - * Sets the result form. - * - * @param String $form - * @return void - */ - public function setResultForm($form){ - $this->resultForm = strtolower($form); - } - - - /** - * Sets the result part. - * - * @param array Array of graph patterns - */ - public function setResultPart($resultPart) { - $this->resultPart = $resultPart; - } - - /** - * Adds a graph pattern to the result part. - * - * @param GraphPattern $pattern - * @return void - */ - public function addGraphPattern($pattern){ - $pattern->setId($this->graphPatternCounter); - $this->resultPart[] = $pattern; - $this->graphPatternCounter++; - } - - /** - * Adds a construct graph pattern to the query. - * - * @param GraphPattern $pattern - * @return void - */ - public function addConstructGraphPattern($pattern){ - $this->constructPattern = $pattern; - } - - - /** - * Adds a graphuri to the from part. - * - * @param String $graphURI - * @return void - */ - public function addFrom($graphURI){ - $this->fromPart[] = $graphURI; - } - - /** - * Adds a graphuri to the from named part. - * - * @param String $graphURI - * @return void - */ - public function addFromNamed($graphURI){ - $this->fromNamedPart[] = $graphURI; - } - - /** - * Sets a solution modifier. - * - * @param String $name - * @param Value $value - * @return void - */ - public function setSolutionModifier($name, $value){ - $this->solutionModifier[$name] = $value; - } - - - /** - * Generates a new GraphPattern. If it is a CONSTRUCT graph pattern - * $constr has to set to TRUE, FALSE if not. - * - * @param boolean $constr - * @return GraphPattern - */ - public function getNewPattern($constr = false){ - $pattern = new GraphPattern(); - if ($constr) { - $this->addConstructGraphPattern($pattern); - } else { - $this->addGraphPattern($pattern); - } - return $pattern; - } - - /** - * Adds a new variable to the variable list. - * - * @param String $var - * @return void - */ - public function addUsedVar($var){ - $this->usedVars[$var]=true; - } - - /** - * Returns a list with all used variables. - * - * @return Array - */ - public function getAllVars(){ - return array_keys($this->usedVars); - } - - /** - * Gets the solution modifiers of the query. - * $solutionModifier['order by'] = value - * ['limit'] = vlaue - * ['offset'] = value - * - * - * @return Array - */ - public function getSolutionModifier(){ - return $this->solutionModifier; - } - - - /** - * Returns the construvtGraphPattern of the query if there is one. - * - * @return GraphPattern - */ - public function getConstructPattern(){ - return $this->constructPattern; - } - - - - /** - * Returns a list of variables used in the construct patterns. - * - * @return array Array of variable names, unique. - */ - public function getConstructPatternVariables() - { - $arVars = array(); -/* - if (count($this->resultPart) > 0) { - foreach ($this->resultPart as $pattern) { - $arVars = array_merge($arVars, $pattern->getVariables()); - } - } -*/ - if ($this->constructPattern) { - $arVars = array_merge($arVars, $this->constructPattern->getVariables()); - } - - return array_unique($arVars); - }//public function getConstructPatternVariables() - - - - /** - * Returns the language of a variable if the tag is set (e.g. @en) - * Returns NULL if no language is set. - * - * @param string Sparql variable name - * @return mixed NULL or language tag - */ - public static function getLanguageTag($var) - { - $nAt = strpos($var, '@'); - if ($nAt === false) { - return null; - } - //in case @ and ^^ are combined - $nHatHat = strpos($var, '^^', $nAt + 1); - if ($nHatHat === false) { - $tag = substr($var, $nAt + 1); - } else { - $tag = substr($var, $nAt + 1, $nHatHat - $nAt - 1); - } - return $tag; - }//public static function getLanguageTag($var) - - - - /** - * Returns the datatype of a variable if it is set. - * - * @param string Sparql variable name - * @return mixed NULL or datatype - */ - public function getDatatype($var) - { - $nHatHat = strpos($var, '^^'); - if ($nHatHat === false) { - return null; - } - $nAt = strpos($var, '@', $nHatHat + 2); - if ($nAt === false) { - $type = substr($var, $nHatHat + 2); - } else { - $type = substr($var, $nHatHat + 2, $nAt - $nHatHat - 2); - } - - $fullUri = $this->getFullUri($type); - if ($fullUri === false) { - $fullUri = $type; - if ($fullUri[0] == '<' && substr($fullUri, -1) == '>') { - $fullUri = substr($fullUri, 1, -1); - } - } - - return $fullUri; - }//public function getDatatype($var) - - - - /** - * Gets the full URI of a qname token. - * - * @param string $token - * @return string The complete URI of a given token, false if $token is not - * a qname or the prefix is not defined - */ - public function getFullUri($token) - { - $pattern="/^([^:]*):([^:]*)$/"; - if (preg_match($pattern, $token, $hits) > 0) { - - if (isset($this->prefixes{$hits{1}})) { - return substr($this->base, 1, -1) - . $this->prefixes{$hits{1}} - . $hits{2}; - } - if ($hits{1}=='_') { - return "_".$hits{2}; - } - } - - return false; - } - - - - /** - * Checks if the query is complete - * (so that querying is possible) - * - * @return boolean true if the query is complete - */ - public function isComplete() - { - if ($this->resultForm === null) { - return false; - } - //TODO: maybe check selected vars and construct pattern depending - // on the resultform - return true; - }//public function isIncomplete() - - - - /** - * Sets the orignal query string - * - * @param string $queryString SPARQL query string - */ - public function setQueryString($queryString) - { - $this->queryString = $queryString; - }//public function setQueryString($queryString) - - - - /** - * Returns the orignal query string - * - * @return string SPARQL query string - */ - public function getQueryString() - { - return $this->queryString; - }//public function getQueryString() - -}// end class: Query.php - - - -class Query_ResultVariable -{ - public $variable = null; - public $datatype = null; - public $language = null; - public $alias = null; - public $func = null; - - - public function __construct($variable) - { - $this->variable = $variable; - $this->language = Query::getLanguageTag($variable); - } - - - - public function setAlias($alias) - { - $this->alias = $alias; - } - - - - public function setFunc($func) - { - $this->func = $func; - } - - - - public function setDatatype($datatype) - { - $this->datatype = $datatype; - } - - - - public function getId() - { - //FIXME - return $this->variable; - } - - - - public function getFunc() - { - return $this->func; - } - - - - public function getLanguage() - { - return $this->language; - } - - - - public function getDatatype() - { - return $this->datatype; - } - - - - public function getName() - { - if ($this->alias !== null) { - return $this->alias; - } - //FIXME: support for nested(functions()) - return $this->variable; - } - - - - public function getVariable() - { - return $this->variable; - } - - - - public function __toString() - { - return $this->getName(); - } - -}//class Query_ResultVariable - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/QueryTriple.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/QueryTriple.php.svn-base deleted file mode 100755 index c3e486a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/QueryTriple.php.svn-base +++ /dev/null @@ -1,123 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class QueryTriple extends Object -{ - - /** - * The QueryTriples Subject. - * Can be a BlankNode or Resource, string in - * case of a variable - * @var Node/string - */ - protected $subject; - - /** - * The QueryTriples Predicate. - * Normally only a Resource, string in - * case of a variable - * @var Node/string - */ - protected $predicate; - - /** - * The QueryTriples Object. - * Can be BlankNode, Resource or Literal, string in - * case of a variable - * @var Node/string - */ - protected $object; - - - - /** - * Constructor - * - * @param Node $sub Subject - * @param Node $pred Predicate - * @param Node $ob Object - */ - public function QueryTriple($sub,$pred,$ob) - { - $this->subject = $sub; - $this->predicate = $pred; - $this->object = $ob; - } - - /** - * Returns the Triples Subject. - * - * @return Node - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Returns the Triples Predicate. - * - * @return Node - */ - public function getPredicate() - { - return $this->predicate; - } - - /** - * Returns the Triples Object. - * - * @return Node - */ - public function getObject() - { - return $this->object; - } - - - - /** - * Returns an array of all variables in this triple. - * - * @return array Array of variable names - */ - public function getVariables() - { - $arVars = array(); - - foreach (array('subject', 'predicate', 'object') as $strVar) { - if (SparqlVariable::isVariable($this->$strVar)) { - $arVars[] = $this->$strVar; - } - } - - return $arVars; - }//public function getVariables() - - - - public function __clone() - { - foreach (array('subject', 'predicate', 'object') as $strVar) { - if (is_object($this->$strVar)) { - $this->$strVar = clone $this->$strVar; - } - } - }//public function __clone() - -}//class QueryTriple extends Object - -// end class: QueryTriple.php -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SPARQL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SPARQL.php.svn-base deleted file mode 100755 index f1b99888..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SPARQL.php.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlClient.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlClient.php.svn-base deleted file mode 100755 index ce0a546c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlClient.php.svn-base +++ /dev/null @@ -1,160 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class SparqlClient extends Object { - - var $server; - var $output; - - /** - * Constructor of SparlClient. - * - * @param String $server server address. - */ - function SparqlClient($server){ - $this->server = $server; - $this->output = "array"; - } - - - /** - * Sets the output format for a SELECT or ASK query. Possible formats are "xml" for - * Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array - * for the format described in our SparqlEngine. - * - * @param String $format the format. - */ - function setOutputFormat($format){ - if(strtolower($format)=="xml") - $this->output = "xml"; - if(strtolower($format)=="array") - $this->output = "array"; - - } - - /** - * Main function of SparqlClient. - * - * @param ClientQuery $query the ClientQuery object. - * @return mixed returns an array that contains the variables an their bindings or a MemModel - * - */ - function query($query){ - if(!is_a($query,"ClientQuery")) - die;//ErrorHandling - - $url = $this->_buildurl($query); - $result = $this->_http_get($url); - return $this->returnResult($result); - - } - - - /** - * Helper function that builds the url. - * - * @param ClientQuery $query the ClientQuery Object. - */ - - function _buildurl($query){ - $url = ""; - $url = $this->server."?query=".urlencode($query->query); - foreach($query->default as $defaultg){ - $url = $url."&default-graph-uri=".$defaultg; - } - foreach($query->named as $namedg){ - $url = $url."&named-graph-uri=".$namedg; - } - - return $url; - - } - - /** - * Returns the query result. - * - * @param String $result the result. - * @return mixed - */ - function returnResult($result){ - - if(strpos($result,"generateModel(substr($result,strpos($result,"output == "xml"){ - $pos = strpos($result,"output == "array"){ - // $pos = strpos($buffer,"parseResult($result); - } - return $result; - } - - - function parseResult($buffer){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_SPARQLRES); - $parser = new SparqlResultParser(); - return $parser->parse($buffer); - } - - - /** - * Executes the GET Request. - * - * @param String $url the url. - * @return String result. - */ - function _http_get($url) - { - $url = parse_url($url); - $port = isset($url['port']) ? $url['port'] : 80; - - $fp = fsockopen($url['host'], $port); - - $replace = $url['path']; - - fputs($fp, "GET ".$replace."?".$url['query']." HTTP/1.0\n"); - fputs($fp, "Host:". $url['host']." \r\n"); - fputs($fp, "Accept: application/sparql-results+xml, application/rdf+xml\r\n"); - fputs($fp, "Connection: close\n\n"); - - $buffer = ""; - while ($tmp = fread($fp, 1024)) - { - $buffer .= $tmp; - } - - $pos1 = strpos($buffer,"\r\n\r\n"); - $pos2 = strpos($buffer,"\n\n"); - if ($pos1 === false) { - $pos = $pos2; - } else { - $pos = $pos1; - } - - return substr($buffer,$pos); - - } -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngine.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngine.php.svn-base deleted file mode 100755 index 574ebd23..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngine.php.svn-base +++ /dev/null @@ -1,1169 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -Class SparqlEngine extends Object{ - - - /** - * The query object. - * @var Query - */ - protected $query; - - /** - * The RDF Dataset. - * @var Dataset - */ - protected $dataset; - - - - /** - * Use SparqlEngine::factory() instead of this - * constructor. - */ - protected function __construct() - { - //protected to prevent direct instantiation - } - - - /** - * Creates a new instance of the SparqlEngine, depending on the - * given model. For example, if you pass a DbModel, you will - * get a SparqlEngine specialized on databases. - * - * @param Model $model RDF model that uses the engine - */ - public function factory($model = null) - { - if ($model !== null && $model instanceof DbModel) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php'; - return new SparqlEngineDb($model); - } else { - return new SparqlEngine(); - } - } - - - - /** - * The query engine's main method. - * - * @param Dataset $dataset the RDF Dataset - * @param mixed $query the parsed SPARQL query - * @param String $resultform the result form. If set to 'xml' the result will be - * SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ . - * @return Array/String Type of the result depends on $resultform. - */ - public function queryModel($dataset, Query $query, $resultform = false) - { - $this->query = $query; - $this->dataset = $dataset; - - if($this->query->isEmpty){ - $vartable[0]['patternResult'] = null; - return SparqlEngine_ResultConverter::convertFromResult( - $vartable, - $this, - $resultform - ); - } - - $graphlist = $this->preselectGraphs(); - /// match graph patterns against the RDF Dataset - $patternlist = $this->matchPatterns($graphlist); - // filter results- apply inner filters - $patternlist = $this->filterPatterns($patternlist,false); - // join pattern results - $vartable = $this->joinResults($patternlist); - // filter results- apply outer filters - $vartable = $this->filterPatterns($vartable,true); - - if ($vartable[0]['patternResult'] != null) { - // sort vars (ORDER BY, LIMIT, OFFSET) - $vartable = $this->sortVars($vartable[0]['patternResult']); - $qrf = $this->query->getResultForm(); - if ($qrf == 'select' || $qrf == 'select distinct') { - $vars = $this->query->getResultVars(); - $vartable = $this->selectVars($vartable, $vars); - if ($qrf == 'select distinct') { - $vartable = $this->distinct($vartable); - } - } - } else { - $vartable = null; - } - - return SparqlEngine_ResultConverter::convertFromResult( - $vartable, - $this, - $resultform - ); - }//public function queryModel($dataset, Query $query, $resultform = false) - - - - /** - * Matches all graph Patterns against the dataset and generates an array which - * contains the result sets for every given GraphPattern. - * - * @param Array $graphlist the graphlist which contains the names of the named - * graphs which has to be queried. - * @return Array - */ - protected function matchPatterns($graphlist){ - $patternlist = array(); - // get the result part from the query - $resultPart = $this->query->getResultPart(); - // for each GrapPattern in the result part - if($resultPart) - foreach($resultPart as $graphPattern){ - $this->matchPattern($patternlist, $graphlist, $graphPattern); - } - return $patternlist; - } - - - - /** - * Finds tuples that match one graph pattern. - * - * @param Array $patternlist list that contains the graphPatterns - * @param array $graphlist the graphlist - * @param GraphPattern $graphPattern the pattern which has to be matched - * @return void - */ - protected function matchPattern(&$patternlist, $graphlist, &$graphPattern) { - // generate an empty result set - $finalRes = null; - // if the GraphPattern has triple patterns - if (count($graphPattern->getTriplePatterns()) > 0) { - // check if the pattern has a GRAPH clause and if this Iri is in $graphlist - $newGraphList = $this->_checkGraphs($graphPattern,$graphlist); - if($newGraphList){ - $qt = $graphPattern->getTriplePatterns(); - $resultSet = $this->findTuplesMatchingOnePattern($qt[0], $newGraphList); - for ($i=1; $ifindTuplesMatchingOnePattern($qt[$i], $newGraphList); - $resultSet = $this->joinTuples($resultSet, $rs); - if(!$resultSet) - break; - } - if($finalRes != null){ - $finalRes = $this->joinTuples($finalRes,$resultSet); - }else{ - $finalRes = $resultSet; - } - } - } - // dependencies between pattern results - $patternlist[$graphPattern->getId()]['hasOptional'] = 0; - $patternlist[$graphPattern->getId()]['hasUnion'] = 0; - $patternlist[$graphPattern->getId()]['patternResult'] = $finalRes; - - $op = $graphPattern->getOptional(); - $un = $graphPattern->getUnion(); - - $patternlist[$graphPattern->getId()]['optionalTo'] = $op; - if(is_int($op)) - $patternlist[$op]['hasOptional']++; - - $patternlist[$graphPattern->getId()]['unionWith'] = $un; - if(is_int($un)) - $patternlist[$un]['hasUnion']++; - - $constraint = $graphPattern->getConstraints(); - if(count($constraint) > 0){ - foreach($constraint as $constr){ - if($constr->isOuterFilter()){ - $patternlist[$graphPattern->getId()]['outerFilter'][] = $constr; - $patternlist[$graphPattern->getId()]['innerFilter'][] = null; - }else{ - $patternlist[$graphPattern->getId()]['innerFilter'][] = $constr; - $patternlist[$graphPattern->getId()]['outerFilter'][] = null; - } - } - }else{ - $patternlist[$graphPattern->getId()]['innerFilter'] = null; - $patternlist[$graphPattern->getId()]['outerFilter'] = null; - } - } - - - /** - * Finds Tuples matching one TriplePattern. - * - * @param TriplePattern $pattern - * @param Array $graphlist - * @return Array - */ - protected function findTuplesMatchingOnePattern($pattern, $graphlist){ - $var = null; - $sub = $pattern->getSubject(); - $pred = $pattern->getPredicate(); - $obj = $pattern->getObject(); - - if(is_string($sub)||$sub instanceof BlankNode){ - if(is_string($sub)) - $var['sub'] = $sub; - $sub = null; - } - if(is_string($pred)||$pred instanceof BlankNode ){ - if(is_string($pred)) - $var['pred'] = $pred; - $pred = null; - } - if(is_string($obj)||$obj instanceof BlankNode){ - if(is_string($obj)) - $var['obj'] = $obj; - $obj = null; - } - $intBindings = $this->_buildIntBindings($var); - $k = 0; - - $key = 0; - // search in named graphs - if($graphlist['var'][0] != null||$graphlist['list'][0] != null){ - foreach($graphlist['list'] as $key => $graphnode){ - - // query the dataset - $it = $this->dataset->findInNamedGraphs($graphnode,$sub,$pred,$obj,false); - if($it->valid()){ - // add statements to the result list - while($it->valid()){ - if($graphnode == null){ - $element = $it->current()->getStatement(); - $grname = $it->current()->getGraphname(); - }else{ - if($it->current() instanceof Quad) - $element = $it->current()->getStatement(); - else - $element = $it->current(); - - $grname = $graphnode; - } - if($this->checkIntBindings($element,$intBindings)){ - $resmodel['trip'][$k] = $element; - $resmodel['graph'][$k] = $grname; - // $resmodel['graphvar'][$k] = $graphlist['var'][$key]; - $resmodel['graphvar'][$k] = $graphlist['var'][0]; - $k++; - - } - $it->next(); - } - } - - } - } - // search in the default graph - if($graphlist['list'][0] == null && $graphlist['var'][0] == null){ - - - $gr = $this->dataset->getDefaultGraph(); - - $res = $gr->find($sub,$pred,$obj); - - foreach($res->triples as $innerkey => $element){ - if($this->checkIntBindings($element,$intBindings)){ - $resmodel['trip'][$k] = $element; - $resmodel['graph'][$k] = null; - $resmodel['graphvar'][$k] = $graphlist['var'][$key]; - $k++; - } - } - } - if($k == 0) - return false; - return $this->_buildResultSet($pattern,$resmodel); - } - - /** - * Checks it there are internal bindings between variables. - * - * @param Triple $trip - * @param Array $intBindings - * @return boolean - */ - protected function checkIntBindings($trip, $intBindings){ - switch($intBindings){ - case -1: - return true; - break; - case 0: - if($trip->subj != $trip->pred) - return false; - break; - case 1: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->subj != $trip->obj) - return false; - break; - case 2: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->pred != $trip->obj) - return false; - break; - case 3: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->pred != $trip->obj || $trip->pred != $trip->subj ) - return false; - break; - } - return true; - } - - - /** - * Perform an SQL-like inner join on two resultSets. - * - * @param Array &$finalRes - * @param Array &$res - * @return Array - */ - protected function joinTuples(&$finalRes, &$res) { - - if (!$finalRes || !$res) - return array(); - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - $k = key($res); - - foreach ($res[$k] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])) - $jointVars[] = $varname; - else - $newVars[] = $varname; - } - - // eliminate rows of $finalRes in which the values of $jointVars do not have - // a corresponding row in $res. - foreach ($finalRes as $n => $fRes) { - foreach ($res as $i => $r) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) - break; - } - if (!$ok) - unset($finalRes[$n]); - } - - // join $res and $finalRes - $joinedRes = array(); - foreach ($res as $r) { - foreach ($finalRes as $n => $fRes) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) { - $joinedRow = $finalRes[$n]; - foreach($newVars as $n_varname) - $joinedRow[$n_varname] = $r[$n_varname]; - $joinedRes[] = $joinedRow; - } - } - } - return $joinedRes; - } - - - /** - * Joins OPTIONAL pattern results. - * - * @param Array &$finalRes - * @param Array &$res - * @return Array the joined Array - */ - protected function joinOptionalTuples(&$finalRes, &$res) { - - if(!$finalRes && !$res) - return array(); - - if(!$finalRes) - return $res; - - if(!$res) - return $finalRes; - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - $result = array(); - - $k = key($res); - - foreach ($res[$k] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])){ - $jointVars[] = $varname; - }else{ - $newVars[] = $varname; - } - } - $joined = array(); - $joinc = 0; - foreach($finalRes as $i =>$fRes){ - foreach($res as $n =>$r){ - $join = false; - foreach($jointVars as $j_varname){ - if($r[$j_varname]==$fRes[$j_varname]){ - $join = true; - //break; - }else{ - $join = false; - } - } - if($join){ - $result[$joinc] = $fRes; - foreach($newVars as $n_varname) - $result[$joinc][$n_varname] = $r[$n_varname]; - $joined[]=$n; - $joinc++; - } - - } - } - - $count = count($result); - foreach($res as $k =>$val){ - if(!in_array($k,$joined)){ - $result[$count] = $finalRes[0]; - foreach($result[$count] as $varname => $varVal){ - $result[$count][$varname]=''; - } - - foreach($val as $varname2 => $varVal2){ - $result[$count][$varname2]=$varVal2; - } - $count++; - } - } - return $result; - } - - - - /** - * Looks in from and from named part of the query and - * adds the graphs to the graphlist. - * - * @return Array - */ - protected function preselectGraphs(){ - $fromNamed = $this->query->getFromNamedPart(); - if($fromNamed == null) - $fromNamed[] = null; - return $fromNamed; - } - - - /** - * Evaluates the GRPAH clause if there is one. Checks if - * the GRAPH clause contains an IRI, variable or nothing. - * Returns an array which contains the graphs that has to be matched. - * - * @param GraphPattern $pattern - * @param Array $graphlist - * @return Array - */ - protected function _checkGraphs(&$pattern,$graphlist){ - - $gr = $pattern->getGraphname(); - if($gr instanceof Resource ){ - if($graphlist[0]==null || in_array($gr,$graphlist)){ - $newGraphList['list'][] = $gr; - $newGraphList['var'][] = null; - }else{ - return false; - } - }elseif (is_string($gr)){ - $newGraphList['list'] = $graphlist; - $newGraphList['var'][] = $gr; - }else{ - $newGraphList['list'] = $graphlist; - $newGraphList['var'][] = null; - } - return $newGraphList; - } - - /** - * Marks triples with internal bindings. - * int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj. - * - * @param Array $var - * @return Array - */ - protected function _buildIntBindings($var){ - $intBindings = -1; - if(!$var) - return $intBindings; - - if(isset($var['sub'])){ - if(isset($var['pred'])) - if($var['sub'] == $var['pred']) - $intBindings = 0; - if(isset($var['obj'])) - if($var['sub'] == $var['obj']){ - if( $intBindings == 0){ - $intBindings = 3; - }else{ - $intBindings = 1; - } - } - } - if(isset($var['pred'])){ - if(isset($var['obj'])) - if($var['pred']==$var['obj']&&$intBindings!=3) - $intBindings = 2; - } - return $intBindings; - } - - /** - * Builds the resultset. - * - * @param GraphPattern $pattern - * @param Array $resmodel - * @return Array - */ - protected function _buildResultSet($pattern,$resmodel){ - // determine variables and their corresponding values - $result = null; - if(is_string($pattern->getSubject())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getSubject()] = $triple->subj; - } - } - if(is_string($pattern->getPredicate())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getPredicate()] = $triple->pred; - } - } - if(is_string($pattern->getObject())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getObject()] = $triple->obj; - } - } - return $result; - } - - /** - * Selects the result variables and builds a result table. - * - * @param Array $table the result table - * @param Array $vars the result variables - * @return Array - */ - protected function selectVars($table,$vars){ - if($vars[0]=='*') - $vars = $this->query->getAllVars(); - $resTable = array(); - $hits = 0; - foreach($table as $val){ - foreach($vars as $var){ - if(isset($val[(string)$var])){ - $resTable[$hits][(string)$var]=$val[(string)$var]; - }else{ - $resTable[$hits][(string)$var]=""; - } - } - $hits++; - } - return $resTable; - } - - /** - * Joins the results of the different Graphpatterns. - * - * @param Array $patternlist - * @return Array - */ - protected function joinResults($patternlist){ - $joined[0]['patternResult'] = null; - $joined[0]['outerFilter'] = null; - - while(count($patternlist)>0){ - foreach($patternlist as $key => $pattern){ - if($pattern['hasOptional'] == 0 && $pattern['hasUnion'] == 0){ - if(is_int($pattern['optionalTo'])){ - $patternlist[$pattern['optionalTo']]['hasOptional']--; - $patternlist[$pattern['optionalTo']]['patternResult'] = $this->joinOptionalTuples($pattern['patternResult'],$patternlist[$pattern['optionalTo']]['patternResult']); - unset($patternlist[$key]); - break; - } - else if(is_int($pattern['unionWith'])){ - $patternlist[$pattern['unionWith']]['hasUnion']--; - foreach($pattern['patternResult'] as $value) - array_push($patternlist[$pattern['unionWith']]['patternResult'],$value); - unset($patternlist[$key]); - break; - }else{ - if($joined[0]['patternResult'] == null){ - $joined[0]['patternResult'] = $pattern['patternResult']; - if($joined[0]['outerFilter'] == null ) - $joined[0]['outerFilter'] = $pattern['outerFilter']; - unset($patternlist[$key]); - break; - } - // if($pattern['patternResult'] !=null ){ - $joined[0]['patternResult'] = $this->joinTuples($joined[0]['patternResult'],$pattern['patternResult']); - $joined[0]['outerFilter'] = $pattern['outerFilter']; - unset($patternlist[$key]); - break; - // } - } - } - } - } - return $joined; - } - - /** - * Filters the pattern results. - * - * @param Array $patternlist list containing the results of the GraphPatterns - * @param boolean $outer TRUE if its an outer filter FALSE if not - * @return Array the filtered patternlist - */ - protected function filterPatterns($patternlist,$outer){ - if($outer) - $filter = 'outerFilter'; - else - $filter = 'innerFilter'; - foreach($patternlist as $patkey => $pattern){ - // get constraints - $constraint = $pattern[$filter]; - - if(count($constraint)>0){ - foreach($constraint as $constr){ - if($constr != null){ - // extract Vars and function calls - $evalString = $constr->getExpression(); - preg_match_all("/\?.[^\s\)\,]*/",$evalString,$vars); - preg_match_all("/bound\((.[^\)]*)\)/i",$evalString,$boundcalls); - preg_match_all("/isuri\((.[^\)]*)\)/i",$evalString,$isUricalls); - preg_match_all("/isblank\((.[^\)]*)\)/i",$evalString,$isBlankcalls); - preg_match_all("/isLiteral\((.[^\)]*)\)/i",$evalString,$isLiteralcalls); - preg_match_all("/lang\((.[^\)]*)\)/i",$evalString,$langcalls); - preg_match_all("/datatype\((.[^\)]*)\)/i",$evalString,$datatypecalls); - preg_match_all("/str\((.[^\)]*)\)/i",$evalString,$stringcalls); - - // is Bound - if(count($boundcalls[1])>0) - $function['bound'] = $boundcalls[1]; - else - $function['bound'] = false; - - // is URI - if(count($isUricalls[1])>0) - $function['isUri'] = $isUricalls[1]; - else - $function['isUri'] = false; - - // is Blank - if(count($isBlankcalls[1])>0) - $function['isBlank'] = $isBlankcalls[1]; - else - $function['isBlank'] = false; - - // is Literal - if(count($isLiteralcalls[1])>0) - $function['isLiteral'] = $isLiteralcalls[1]; - else - $function['isLiteral'] = false; - - // lang - if(count($langcalls[1])>0) - $function['lang'] = $langcalls[1]; - else - $function['lang'] = false; - - // datatype - if(count($datatypecalls[1])>0) - $function['datatype'] = $datatypecalls[1]; - else - $function['datatype'] = false; - - // string - if(count($stringcalls[1])>0) - $function['string'] = $stringcalls[1]; - else - $function['string'] = false; - - - foreach($pattern['patternResult'] as $key => $res){ - $result = false; - $evalString = $this->fillConstraintString($vars,$res,$constr,$function); - $evalString = '$result =('.$evalString.');'; - // evaluate Constraint - @eval($evalString); - - if(!$result) - unset($patternlist[$patkey]['patternResult'][$key]); - - } - } - } - } - } - return $patternlist; - } - - /** - * Builds an evaluation string to determine wether the result passes - * the filter or not. This string is evaluatet by the php buildin eval() function - * - * @param Array $vars a list which contains the used variables - * @param Array $res the result part which have to be evaluated - * @param Constraint $constraint the Constrain object - * @param Array $function an Array which contains the used functions - * @return String - */ - - protected function fillConstraintString($vars,$res,$constraint,$function){ - - $boundExpr = false; - $evalString = $constraint->getExpression(); - - // extract Literals - $pattern1 = "/\".[^\"]*\"[^\^\@]/"; - $pattern2 = "/\'.[^\']*\'[^\^\@]/"; - preg_match_all($pattern1,$evalString,$hits1); - preg_match_all($pattern2,$evalString,$hits2); - - foreach($hits1[0] as $k => $val){ - $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED1_'.$k++,$evalString,1); - } - foreach($hits2[0] as $k => $val){ - $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED2_'.$k++,$evalString,1); - } - - // replace namespaces - $prefs = $this->query->getPrefixes(); - foreach($prefs as $key => $val){ - if($key == '') - $key = ' '; - $evalString = preg_replace("/^(".$key."\:)(.[^\s]*)|([\s\(]?[^\^])(".$key."\:)(.[^\s\)]*)([\s\)]?)/","$3'<".$val."$2$5>'$6",$evalString); - - $evalString = preg_replace("/(\^)(".$key."\:)(.[^\s]*)/","$1<".$val."$3>",$evalString); - } - - $xsd = "http\:\/\/www.w3.org\/2001\/XMLSchema\#"; - - // evaluate bound calls - if($function['bound']){ - $boundExpr = true; - foreach($function['bound'] as $var){ - if(isset($res[$var]) && $res[$var]!=="") - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/bound\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isBlank calls - if($function['isBlank']){ - foreach($function['isBlank'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof BlankNode ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isBlank\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isLiteral calls - if($function['isLiteral']){ - foreach($function['isLiteral'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isLiteral\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isUri calls - if($function['isUri']){ - foreach($function['isUri'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Resource && $res[$var]->getUri() && !$res[$var] instanceof BlankNode ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isUri\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate lang calls - if($function['lang']){ - foreach($function['lang'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getLanguage() ) - $replacement = '"'.$res[$var]->getLanguage().'"'; - else - $replacement = 'null'; - $evalString = preg_replace("/lang\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate datatype calls - if($function['datatype']){ - foreach($function['datatype'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getDatatype() ) - $replacement = '\'<'.$res[$var]->getDatatype().'>\''; - else - $replacement = 'false'; - $evalString = preg_replace("/datatype\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate string calls - if($function['string']){ - foreach($function['string'] as $var){ - if($var{0}=='?' || $var{0}=='$'){ - if(isset($res[$var]) && $res[$var]!==""){ - $replacement = "'str_".$res[$var]->getLabel()."'"; - if($res[$var] instanceof BlankNode) - $replacement = "''"; - }else{ - $replacement = 'false'; - } - $evalString = preg_replace("/str\(\\".$var."\)/i",$replacement,$evalString); - }else{ - if($var{0}=='<'){ - $evalString = preg_replace("/str\(\s*\<(.[^\>]*)\>\s*\)/i","'str_$1'",$evalString); - } - if($var{0}=='"'){ - $evalString = preg_replace("/str\(\s*\"(.[^\>]*)\"\@[a-z]*\s*\)/i","'str_$1'",$evalString); - } - } - - } - } - // evaluate VARS - foreach($vars[0] as $var){ - if(isset($res[$var])&&$res[$var]!== ""){ - //$replacement = "'".$res[$var]->getLabel()."'"; - $replacement = '" "'; - if($res[$var] instanceof Literal){ - if($res[$var]->getDatatype()!= null){ - if($res[$var]->getDatatype() == XML_SCHEMA.'boolean') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'double') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'integer') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'dateTime') - $replacement = strtotime($res[$var]->getLabel()); - }else{ - if($res[$var]->getLabel()=="") - $replacement = 'false'; - else - $replacement = "'str_".$res[$var]->getLabel()."'"; - } - }else{ - if($res[$var] instanceof Resource){ - $replacement = "'<".$res[$var]->getLabel().">'"; - } - } - $evalString = preg_replace("/\\".$var."/",$replacement,$evalString); - } - - // problem with PHP: false < 13 is true - if(isset($res[$var])){ - if($res[$var] === ""){ - if($boundExpr) - $evalString = preg_replace("/\\".$var."/","false",$evalString); - else - $evalString = 'false'; - } - }else{ - $evalString = preg_replace("/\\".$var."/","false",$evalString); - } - - } - - // replace '=' with '==' - $evalString = preg_replace("/(.[^\=])(\=)(.[^\=])/","$1==$3",$evalString); - - - // rewrite Literals - foreach($hits1[0] as $k => $val){ - $pattern = '/_REPLACED1_'.$k.'/'; - $evalString = preg_replace($pattern,$hits1[0][$k],$evalString,1); - } - - foreach($hits2[0] as $k => $val){ - $pattern = '/_REPLACED2_'.$k.'/'; - $evalString = preg_replace($pattern,$hits2[0][$k],$evalString,1); - } - - // replace xsd:boolean expressions - $pattern = $pattern = '/\"\s?true\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?true\s?\'\^\^xsd:boolean/'; - $evalString = preg_replace($pattern,"true",$evalString); - - $pattern = $pattern = '/\"\s?false\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?false\s?\'\^\^xsd:boolean/'; - $evalString = preg_replace($pattern,"false",$evalString); - - // replace xsd:date expressions - $pattern = "/\"(.[^\"]*)\"\^\^".$xsd."dateTime/"; - preg_match_all($pattern,$evalString,$hits); - - foreach($hits[1] as $dummy) - $evalString = preg_replace("/\".[^\"]*\"\^\^".$xsd."dateTime/",strtotime($dummy),$evalString,1); - - - $evalString = preg_replace("/(\'\<".$xsd."dateTime\()(.[^\)]*\))\>\'/","dateTime($2",$evalString); - - $evalString = preg_replace("/(\'\<".$xsd."integer\()(.[^\)]*\))\>\'/","integer($2",$evalString); - - // tag plain literals - $evalString = preg_replace("/\"(.[^\"]*)\"([^\^])|\"(.[^\"]*)\"$/","'str_$1$3'$2",$evalString); - - return $evalString; - } - - /** - * Sorts the results. - * - * @param Array $vartable List containing the unsorted result vars - * @return Array List containing the sorted result vars - */ - protected function sortVars($vartable) - { - $newTable = array(); - $mod = $this->query->getSolutionModifier(); - // if no ORDER BY solution modifier return vartable - if($mod['order by']!= null){ - $order = $mod['order by']; - $map = $this->buildVarmap($order,$vartable); - foreach($map as $val){ - $newTable[] = $vartable[$val]; - } - }else{ - $newTable = $vartable; - } - - if($mod['offset'] != null){ - $newTable = array_slice ($newTable, $mod['offset']); - } - if($mod['limit'] != null){ - $newTable = array_slice($newTable,0,$mod['limit']); - } - - return $newTable; - } - - /** - * Sorts the result table. - * - * @param String $order (ASC/DESC) - * @param Array $vartable the vartable - * @return Array A map that contains the new order of the result vars - */ - protected function buildVarmap($order, $vartable) - { - $n= 0; - $result = array(); - $num_var = array(); - foreach($order as $variable) - $num_var[$variable['val']] = 0; - - foreach($vartable as $k => $x){ - foreach($order as $value){ - // if the value is a typed Literal try to determine if it - // a numeric datatype - if($x[$value['val']] instanceof Literal){ - $dtype = $x[$value['val']]->getDatatype(); - if($dtype){ - switch($dtype){ - case XML_SCHEMA."integer": - $num_var[$value['val']]++; - break; - case XML_SCHEMA."double": - $num_var[$value['val']]++; - break; - - } - } - } - if($x[$value['val']]){ - if($x[$value['val']]instanceof Literal){ - $pref = "2"; - } - if($x[$value['val']]instanceof Resource){ - $pref = "1"; - } - if($x[$value['val']]instanceof BlankNode){ - $pref = "0"; - } - $result[$value['val']][$n] = $pref.$x[$value['val']]->getLabel(); - }else{ - $result[$value['val']][$n] = ""; - } - } - $result['oldKey'][$n] = $k; - $n++; - } - $sortString = ""; - foreach($order as $value){ - if($num_var[$value['val']] == $n) - $sort = SORT_NUMERIC; - else - $sort = SORT_STRING; - - if($value['type'] == 'asc') - $type = SORT_ASC; - else - $type = SORT_DESC; - - $sortString = $sortString.'$result["'.$value['val'].'"],'.$type.','.$sort.','; - } - $sortString = "array_multisort(".$sortString.'$result["oldKey"]);'; - - @eval($sortString); - return $result['oldKey']; - } - - - - /** - * Eliminates duplicate results. - * - * @param Array $vartable a table that contains the result vars and their bindings - * @return Array the result table without duplicate results - */ - protected function distinct($vartable) - { - $index = array(); - foreach($vartable as $key => $value){ - $key_index=""; - foreach($value as $k => $v) - if($v instanceof Object) - $key_index = $key_index.$k.$v->toString(); - if(isset($index[$key_index])) - unset($vartable[$key]); - else - $index[$key_index]= 1; - } - return $vartable; - } - - - /** - * Prints a query result as HTML table. - * You can change the colors in the configuration file. - * - * @param array $queryResult [][?VARNAME] = object Node - * @return void - */ - public function writeQueryResultAsHtmlTable($queryResult) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - if ( $queryResult[0] == null) { - echo 'no match
'; - return; - } - if ( $queryResult == 'false') { - echo 'boolean: false
'; - return; - } - if ( $queryResult == 'true') { - echo 'boolean: true
'; - return; - } - - - echo ''; - foreach ($queryResult[0] as $varName => $value) - echo ""; - echo ''; - - foreach ($queryResult as $n => $var) { - - - echo ''; - foreach ($var as $varName => $value) { - if($value !=''){ - echo INDENTATION . INDENTATION . ''; - } - echo '
No.$varName
' .($n + 1) .'.'; - echo '

'; - - $lang = NULL; - $dtype = NULL; - if (is_a($value, 'Literal')) { - if ($value->getLanguage() != NULL) - $lang = ' (xml:lang="' . $value->getLanguage() . '") '; - if ($value->getDatatype() != NULL) - $dtype = ' (rdf:datatype="' . $value->getDatatype() . '") '; - } - echo RDFUtil::getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'

'; - }else{ - echo "
unbound"; - } - } - echo '
'; - } - - - - /* - * Dumb getters - */ - - - - public function getQuery() - { - return $this->query; - }//public function getQuery() - - - - public function getDataset() - { - return $this->dataset; - }//public function getDataset() - -} // end: Class SparqlEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngineDb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngineDb.php.svn-base deleted file mode 100755 index 8579ea69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlEngineDb.php.svn-base +++ /dev/null @@ -1,391 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb -{ - /** - * Sparql Query object. - * - * @var Query - */ - protected $query; - - /** - * RDF dataset object. - * @var Dataset - */ - protected $dataset; - - /** - * Database connection object. - * @var ADOConnection - */ - protected $dbConn; - - /** - * Internal ID for our graph model. - * Stored in the database along the statements. - * Can be of different types: - * - array: array of modelIds - * - null: all models - * - * @var array OR null - */ - protected $arModelIds; - - /** - * Prepared SQL statements are stored in here. - * @var array - */ - protected $arPrepared = null; - - /** - * If the prepared statement is really prepared, or if we just emulate it. - * @var boolean - */ - protected $bRealPrepared = false; - - /** - * SQL generator instance - * @var SparqlEngineDb_SqlGenerator - */ - protected $sg = null; - - /** - * Type sorting instance - * @var SparqlEngineDb_TypeSorter - */ - protected $ts = null; - - /** - * Prepared statments preparator instance - * @var SparqlEngineDb_Preparator - */ - protected $pr = null; - - - - /** - * Use SparqlEngine::factory() to create the instance - * - * @param mixed $model DbModel or DbStore - * @param mixed $arModelIds Array of modelIds, or NULL to use all models - */ - public function __construct($model, $arModelIds = null) - { - //parent::__construct(); - if ($model instanceof DbModel) { - $this->dbConn = $model->getDbConn(); - $this->arModelIds = array($model->getModelID()); - } else if ($model instanceof DbStore) { - $this->dbConn = $model->getDbConn(); - $this->arModelIds = $arModelIds; - } - }//public function __construct(DbModel $model, $arModelIds = null) - - - - /** - * Query the database with the given SPARQL query. - * - * - * @param Dataset $dataset RDF Dataset - * @param Query $query Parsed SPARQL query - * @param string $resultform Result form. If set to 'xml' the result will be - * SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ . - * - * @return array/string array of triple arrays, or XML. Format depends on - * $resultform parameter. - */ - public function queryModel($dataset, Query $query, $resultform = false) - { - if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) { - echo "\n" . 'SPARQL query: ' . $query->getQueryString() . "\n"; - } - - $this->query = $query; - $this->dataset = $dataset; - - $qsimp = new SparqlEngineDb_QuerySimplifier(); - $qsimp->simplify($this->query); - - $this->sg = new SparqlEngineDb_SqlGenerator ($this->query, $this->dbConn, $this->arModelIds); - $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this); - $this->ts = new SparqlEngineDb_TypeSorter ($this->query, $this->dbConn); - - $this->setOptions(); - - if ($this->query->isEmpty()){ - $vartable[0]['patternResult'] = null; - return $this->returnResult($vartable, $resultform); - } - - - $arSqls = $this->sg->createSql(); - $this->ts->setData($this->sg); - - return - SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->queryMultiple( - $this->ts->getOrderifiedSqls( - $arSqls - ) - ), - $this, - $resultform - ); - }//public function queryModel($dataset, Query $query, $resultform = false) - - - - /** - * Create a prepared statement that can be executed later. - * - * @param Dataset $dataset RDF Dataset - * @param Query $query Parsed SPARQL query - * - * @return SparqlEngineDb_PreparedStatement Prepared statment that can - * be execute()d later. - */ - public function prepare(Dataset $dataset, Query $query) - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/PreparedStatement.php'; - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/Preparator.php'; - - $this->query = $query; - $this->dataset = $dataset; - $this->sg = new SparqlEngineDb_SqlGenerator ($this->query, $this->dbConn, $this->arModelIds); - $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this); - $this->ts = new SparqlEngineDb_TypeSorter ($this->query, $this->dbConn); - $this->pr = new SparqlEngineDb_Preparator ($this->query, $this->dbConn); - - $this->arPrepared = $this->sg->createSql(); - $this->ts->setData($this->sg); - - if ($this->ts->willBeDataDependent()) { - $this->bRealPrepared = false; - } else { - $this->bRealPrepared = true; - list($strSelect, $strFrom, $strWhere) = $this->arPrepared; - $this->arPreparedQueries = $this->ts->getOrderifiedSqls( - $strSelect, - $strFrom, - $strWhere - ); - $this->arDbStatements = $this->pr->prepareInDb( - $this->arPreparedQueries, - $this->sg->getPlaceholders() - ); - } - - - return new SparqlEngineDb_PreparedStatement( - $this - ); - }//public function prepare(Dataset $dataset, Query $query) - - - - /** - * Execute a prepared statement by filling it with variables - * - * @param array $arVariables Array with (variable name => value) pairs - * @param string $resultform Which form the result should have - * - * @return mixed Result according to $resultform - */ - public function execute($arVariables, $resultform = false) - { - if ($this->arPrepared === null) { - throw new Exception('You need to prepare() the query first.'); - } - - if ($this->bRealPrepared) { - return - SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->pr->execute( - $this->arDbStatements, - $arVariables - ), - $this, - $resultform - ); - } else { - list($strSelect, $strFrom, $strWhere) = $this->arPrepared; - - return SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->queryMultiple( - $this->ts->getOrderifiedSqls( - $strSelect, - $strFrom, - $this->pr->replacePlaceholdersWithVariables( - $strWhere, - $this->sg->getPlaceholders(), - $arVariables - ) - ) - ), - $this, - $resultform - ); - } - }//public function execute($arVariables, $resultform) - - - - /** - * Executes multiple SQL queries and returns an array - * of results. - * - * @param array $arSqls Array of SQL queries - * @return array Array of query results - */ - protected function queryMultiple($arSqls) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['limit'] === null && $arSM['offset'] === null) { - $nOffset = 0; - $nLimit = null; - $nSql = 0; - } else { - $offsetter = new SparqlEngineDb_Offsetter($this->dbConn, $this->query); - list($nSql, $nOffset) = $offsetter->determineOffset($arSqls); - $nLimit = $arSM['limit']; - } - - $nCount = 0; - $arResults = array(); - foreach ($arSqls as $nId => $arSql) { - if ($nId < $nSql) { continue; } - - if ($nLimit != null) { - $nCurrentLimit = $nLimit - $nCount; - } else { - $nCurrentLimit = null; - } - - $dbResult = $this->queryDb($arSql, $nOffset, $nCurrentLimit); - $nCount += $dbResult->RowCount(); - $arResults[] = $dbResult; - $nOffset = 0; - if ($nLimit !== null && $nCount >= $nLimit) { - break; - } - } - - return $arResults; - //return array_map(array($this, 'queryDb'), $arSql); - }//protected function queryMultiple($arSql) - - - - /** - * Sends the sql to the database and returns the results. - * - * @internal Switches between ADOConnection::Execute() and - * ADOConnection::SelectLimit() depending on the $query parameter's - * $solutionModifier "limit" and "offset" settings. - * Uses $query variable. - * - * @param array $arSql Array that gets a SQL query string once imploded - * - * @return mixed Anything ADOConnection::Execute() may return - * @throws Exception If Database query does not work - */ - function queryDb($arSql, $nOffset, $nLimit) - { - $strSql = SparqlEngineDb_SqlMerger::getSelect($this->query, $arSql); - - if ($strSql == '()') { - return new ADORecordSet(false); - } - - // I want associative arrays. - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - - if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) { - echo 'SQL query: ' . $strSql . "\n"; - } - - if ($nLimit === null && $nOffset == 0) { - $ret = $this->dbConn->execute($strSql); - } else if ($nLimit === null) { - $ret = $this->dbConn->SelectLimit($strSql, -1, $nOffset); - } else { - $ret = $this->dbConn->SelectLimit($strSql, $nLimit, $nOffset); - } - - //... but others maybe not - $this->dbConn->SetFetchMode($oldmode); - - if (!$ret) { - //Error occured - throw new Exception( - 'ADOdb error: ' . $this->dbConn->ErrorMsg() . "\n" - . $strSql - ); - } - - return $ret; - }//function queryDb($sql) - - - - /** - * Set options to subobjects like SqlGenerator - */ - protected function setOptions() - { - //allow changing the statements' table name - if (isset($GLOBALS['RAP']['conf']['database']['tblStatements'])) { - $this->sg->setStatementsTable( - $GLOBALS['RAP']['conf']['database']['tblStatements'] - ); - } - }//protected function setOptions() - - - - /* - * Dumb getters - */ - - - - public function getQuery() - { - return $this->query; - }//public function getQuery() - - - - public function getSqlGenerator() - { - return $this->sg; - }//public function getSqlGenerator() - - - - public function getTypeSorter() - { - return $this->ts; - }//public function getTypeSorter() - -}//class SparqlEngineDb -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParser.php.svn-base deleted file mode 100755 index ece547a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParser.php.svn-base +++ /dev/null @@ -1,1551 +0,0 @@ - -* @author Christian Weiske -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlParser extends Object -{ - - /** - * The query Object - * @var Query - */ - protected $query; - - /** - * The Querystring - * @var string - */ - protected $queryString; - - /** - * The tokenized Query - * @var array - */ - protected $tokens = array(); - - /** - * Last parsed graphPattern - * @var int - */ - protected $tmp; - - /** - * Operators introduced by sparql - * @var array - */ - protected static $sops = array( - 'regex', - 'bound', - 'isuri', - 'isblank', - 'isliteral', - 'str', - 'lang', - 'datatype', - 'langmatches' - ); - - /** - * Which order operators are to be treated. - * (11.3 Operator Mapping) - * @var array - */ - protected static $operatorPrecedence = array( - '||' => 0, - '&&' => 1, - '=' => 2, - '!=' => 3, - '<' => 4, - '>' => 5, - '<=' => 6, - '>=' => 7, - '*' => 0, - '/' => 0, - '+' => 0, - '-' => 0, - ); - - - - /** - * Constructor of SparqlParser - */ - public function SparqlParser() - { - } - - - - /** - * Main function of SparqlParser. Parses a query string. - * - * @param String $queryString The SPARQL query - * @return Query The query object - * @throws SparqlParserException - */ - public function parse($queryString = false) - { - $this->prepare(); - - if ($queryString) { - $this->query->setQueryString($queryString); - $uncommentedQuery = $this->uncomment($queryString); - $this->queryString = $uncommentedQuery; - $this->tokens = self::tokenize($uncommentedQuery); - $this->parseQuery(); - if (!$this->query->isComplete()) { - throw new SparqlParserException( - "Query is incomplete.", - null, - $queryString - ); - } - } else { - throw new SparqlParserException( - "Querystring is empty.", - null, - key($this->tokens) - ); - $this->query->isEmpty = true; - } - return $this->query; - }//public function parse($queryString = false) - - - - /** - * Set all internal variables to a clear state - * before we start parsing. - */ - protected function prepare() - { - $this->query = new Query(); - $this->queryString = null; - $this->tokens = array(); - $this->tmp = null; - // add the default prefixes defined in constants.php - global $default_prefixes; - $this->query->prefixes = $default_prefixes; - }//protected function prepare() - - - - /** - * Tokenizes the query string into $tokens. - * The query may not contain any comments. - * - * @param string $queryString Query to split into tokens - * - * @return array Tokens - */ - public static function tokenize($queryString) - { - $queryString = trim($queryString); - $specialChars = array(' ', "\t", "\r", "\n", ',', '\\', '(', ')','{','}','"',"'",';','[',']'); - $len = strlen($queryString); - $tokens = array(''); - $n = 0; - - for ($i = 0; $i < $len; ++$i) { - if (!in_array($queryString{$i}, $specialChars)) { - $tokens[$n] .= $queryString{$i}; - } else { - if ($tokens[$n] != '') { - ++$n; - if (!isset($tokens[$n])) { - $tokens[$n] = ''; - } - } - if ($queryString{$i} == "'" && $n > 1 - && $tokens[$n - 2] == "'" && $tokens[$n - 1] == "'" - ) { - //special ''' quotation - $tokens[$n - 2] = "'''"; - $tokens[$n - 1] = ''; - unset($tokens[$n]); - --$n; - continue; - } else if ($queryString{$i} == '"' && $n > 1 - && $tokens[$n - 2] == '"' && $tokens[$n - 1] == '"' - ) { - //special """ quotation - $tokens[$n - 2] = '"""'; - $tokens[$n - 1] = ''; - unset($tokens[$n]); - --$n; - continue; - } else if ($queryString{$i} == '\\') { - $tokens[$n] .= substr($queryString, $i, 2); - ++$i; - continue; - } - $tokens[$n] = $queryString{$i}; - $tokens[++$n] = ''; - } - } -//var_dump($tokens); - return $tokens; - }//public static function tokenize($queryString) - - - - /** - * Removes comments in the query string. Comments are - * indicated by '#'. - * - * @param String $queryString - * @return String The uncommented query string - */ - protected function uncomment($queryString) - { - $regex ="/((\"[^\"]*\")|(\'[^\']*\')|(\<[^\>]*\>))|(#.*)/"; - return preg_replace($regex,'\1',$queryString); - }//protected function uncomment($queryString) - - - - /** - * Starts parsing the tokenized SPARQL Query. - * - * @return void - */ - protected function parseQuery() - { - do { - switch (strtolower(current($this->tokens))) { - case "base": - $this->parseBase(); - break; - case "prefix": - $this->parsePrefix(); - break; - case "select": - $this->parseSelect(); - break; - case "describe": - $this->parseDescribe(); - break; - case "ask": - $this->parseAsk('ask'); - break; - case "count": - $this->parseAsk('count'); - break; - case "from": - $this->parseFrom(); - break; - case "construct": - $this->parseConstruct(); - break; - case "where": - $this->parseWhere(); - $this->parseModifier(); - break; - case "{": - prev($this->tokens); - $this->parseWhere(); - $this->parseModifier(); - break; - } - } while (next($this->tokens)); - - }//protected function parseQuery() - - - - /** - * Parses the BASE part of the query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseBase() - { - $this->_fastForward(); - if ($this->iriCheck(current($this->tokens))) { - $this->query->setBase(current($this->tokens)); - } else { - $msg = current($this->tokens); - $msg = preg_replace('/tokens) - ); - } - } - - - - /** - * Adds a new namespace prefix to the query object. - * - * @return void - * @throws SparqlParserException - */ - protected function parsePrefix() - { - $this->_fastForward(); - $prefix = substr(current($this->tokens), 0, -1); - $this->_fastForward(); - if ($this->iriCheck(current($this->tokens))) { - $uri = substr(current($this->tokens), 1, -1); - $this->query->addPrefix($prefix, $uri); - } else { - $msg = current($this->tokens); - $msg = preg_replace('/tokens) - ); - } - } - - - - /** - * Parses the SELECT part of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseSelect() - { - $this->_fastForward(); - $curLow = strtolower(current($this->tokens)); - prev($this->tokens); - if ($curLow == 'distinct') { - $this->query->setResultForm('select distinct'); - } else { - $this->query->setResultForm('select'); - } - - $currentVar = null; - $currentFunc = null; - $bWaitForRenaming = false; - while ($curLow != 'from' && $curLow != 'where' && - $curLow != "{" - ){ - $this->_fastForward(); - $curTok = current($this->tokens); - $curLow = strtolower($curTok); - - if ($this->varCheck($curTok) || $curLow == '*') { - if ($bWaitForRenaming) { - $bWaitForRenaming = false; - $currentVar->setAlias($curTok); - if ($currentFunc != null) { - $currentVar->setFunc($currentFunc); - } - $this->query->addResultVar($currentVar); - $currentVar = null; - } else { - if ($currentVar != null) { - $this->query->addResultVar($currentVar); - $currentVar = null; - } - $currentVar = new Query_ResultVariable($curTok); - if ($currentFunc != null) { - $currentVar->setFunc($currentFunc); - } - } - $currentFunc = null; - } else if ($curLow == 'as') { - if ($currentVar === null) { - throw new SparqlParserException( - 'AS requires a variable left and right', - null, - key($this->tokens) - ); - } - $bWaitForRenaming = true; - } else if (in_array($curLow, self::$sops)) { - $currentFunc = $curLow; - } - - if (!current($this->tokens)) { - throw new SparqlParserException( - "Unexpected end of File.", - null, - key($this->tokens) - ); - } - } - - if ($currentVar != null) { - $this->query->addResultVar($currentVar); - } - prev($this->tokens); - - if (count($this->query->getResultVars()) == 0) { - throw new SparqlParserException( - "Variable or '*' expected.", - null, - key($this->tokens) - ); - } - }//protected function parseSelect() - - - /** - * Adds a new variable to the query and sets result form to 'DESCRIBE'. - * - * @return void - */ - protected function parseDescribe() - { - while(strtolower(current($this->tokens))!='from'& strtolower(current($this->tokens))!='where'){ - $this->_fastForward(); - if($this->varCheck(current($this->tokens))|$this->iriCheck(current($this->tokens))){ - $this->query->addResultVar(current($this->tokens)); - if(!$this->query->getResultForm()) - $this->query->setResultForm('describe'); - } - if(!current($this->tokens)) - break; - } - prev($this->tokens); - } - - /** - * Sets result form to 'ASK' and 'COUNT'. - * - * @param string $form if it's an ASK or COUNT query - * @return void - */ - protected function parseAsk($form){ - $this->query->setResultForm($form); - $this->_fastForward(); - if(current($this->tokens)=="{") - $this->_rewind(); - $this->parseWhere(); - $this->parseModifier(); - } - - /** - * Parses the FROM clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseFrom(){ - $this->_fastForward(); - if(strtolower(current($this->tokens))!='named'){ - if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){ - $this->query->addFrom(new Resource(substr(current($this->tokens),1,-1))); - }else if($this->varCheck(current($this->tokens))){ - $this->query->addFrom(current($this->tokens)); - }else{ - throw new SparqlParserException("Variable, Iri or qname expected in FROM ",null,key($this->tokens)); - } - $this->query->addFrom(current($this->tokens)); - }else{ - $this->_fastForward(); - if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){ - $this->query->addFromNamed(new Resource(substr(current($this->tokens),1,-1))); - }else if($this->varCheck(current($this->tokens))){ - $this->query->addFromNamed(current($this->tokens)); - }else{ - throw new SparqlParserException("Variable, Iri or qname expected in FROM NAMED ",null,key($this->tokens)); - } - } - } - - - /** - * Parses the CONSTRUCT clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseConstruct(){ - $this->_fastForward(); - $this->query->setResultForm('construct'); - if(current($this->tokens)=="{"){ - $this->parseGraphPattern(false,false,false,true); - }else{ - throw new SparqlParserException("Unable to parse CONSTRUCT part. '{' expected. ",null,key($this->tokens)); - } - $this->parseWhere(); - $this->parseModifier(); - } - - - /** - * Parses the WHERE clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseWhere(){ - $this->_fastForward(); - if(current($this->tokens)=="{"){ - $this->parseGraphPattern(); - }else{ - throw new SparqlParserException("Unable to parse WHERE part. '{' expected in Query. ",null,key($this->tokens)); - } - } - - - - /** - * Checks if $token is a variable. - * - * @param String $token The token - * @return boolean TRUE if the token is a variable false if not - */ - protected function varCheck($token) - { - if (isset($token[0]) && ($token{0} == '$' || $token{0} == '?')) { - $this->query->addUsedVar($token); - return true; - } - return false; - } - - /** - * Checks if $token is an IRI. - * - * @param String $token The token - * @return boolean TRUE if the token is an IRI false if not - */ - protected function iriCheck($token){ - $pattern="/^<[^>]*>\.?$/"; - if(preg_match($pattern,$token)>0) - return true; - return false; - } - - - /** - * Checks if $token is a Blanknode. - * - * @param String $token The token - * @return boolean TRUE if the token is BNode false if not - */ - protected function bNodeCheck($token){ - if($token{0} == "_") - return true; - else - return false; - } - - - /** - * Checks if $token is a qname. - * - * @param String $token The token - * @return boolean TRUE if the token is a qname false if not - * @throws SparqlParserException - */ - protected function qnameCheck($token) - { - $pattern="/^([^:^\<]*):([^:]*)$/"; - if (preg_match($pattern,$token,$hits)>0) { - $prefs = $this->query->getPrefixes(); - if (isset($prefs{$hits{1}})) { - return true; - } - if ($hits{1} == "_") { - return true; - } - throw new SparqlParserException("Unbound Prefix: ".$hits{1}."",null,key($this->tokens)); - } else { - return false; - } - } - - - - /** - * Checks if $token is a Literal. - * - * @param string $token The token - * - * @return boolean TRUE if the token is a Literal false if not - */ - protected function literalCheck($token) - { - $pattern = "/^[\"\'].*$/"; - if (preg_match($pattern,$token) > 0) { - return true; - } - return false; - }//protected function literalCheck($token) - - - - /** - * FastForward until next token which is not blank. - * - * @return void - */ - protected function _fastForward() - { - next($this->tokens); - while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){ - next($this->tokens); - } - }//protected function _fastForward() - - - - /** - * Rewind until next token which is not blank. - * - * @return void - */ - protected function _rewind() - { - prev($this->tokens); - while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){ - prev($this->tokens); - } - return; - }//protected function _rewind() - - - - /** - * Parses a graph pattern. - * - * @param int $optional Optional graph pattern - * @param int $union Union graph pattern - * @param string $graph Graphname - * @param boolean $constr TRUE if the pattern is a construct pattern - * @param boolean $external If the parsed pattern shall be returned - * @param int $subpattern If the new pattern is subpattern of the - * pattern with the given id - * @return void - */ - protected function parseGraphPattern( - $optional = false, $union = false, $graph = false, - $constr = false, $external = false, $subpattern = false - ){ - $pattern = $this->query->getNewPattern($constr); - if (is_int($optional)) { - $pattern->setOptional($optional); - } else { - $this->tmp = $pattern->getId(); - } - if (is_int($union)) { - $pattern->setUnion($union); - } - if (is_int($subpattern)) { - $pattern->setSubpatternOf($subpattern); - } - if ($graph != false) { - $pattern->setGraphname($graph); - } - - $this->_fastForward(); - - do { - switch (strtolower(current($this->tokens))) { - case "graph": - $this->parseGraph(); - break; - case "union": - $this->_fastForward(); - $this->parseGraphPattern( - false, $this->tmp, false, false, false, $subpattern - ); - break; - case "optional": - $this->_fastForward(); - $this->parseGraphPattern( - $this->tmp, false, false, false, false, $subpattern - ); - break; - case "filter": - $this->parseConstraint( - $pattern, true, false, false, false, $subpattern - ); - $this->_fastForward(); - break; - case ".": - $this->_fastForward(); - break; - case "{": - if (!is_int($subpattern)) { - $subpattern = $pattern->getId(); - } - - $this->parseGraphPattern( - false, false, false, false, false, $subpattern - ); - break; - case "}": - $pattern->open = false; - break; - default: - $this->parseTriplePattern($pattern); - break; - } - } while ($pattern->open); - - if ($external) { - return $pattern; - } - $this->_fastForward(); - } - - /** - * Parses a triple pattern. - * - * @param GraphPattern $pattern - * @return void - */ - protected function parseTriplePattern(&$pattern) - { - $trp = array(); - $prev = false; - $prevPred = false; - $cont = true; - $sub = ""; - $pre = ""; - $tmp = ""; - $tmpPred = ""; - $obj = ""; - do { -//echo strtolower(current($this->tokens)) . "\n"; - switch (strtolower(current($this->tokens))) { - case false: - $cont = false; - $pattern->open = false; - break; - case "filter": - $this->parseConstraint($pattern,false); - $this->_fastForward(); - break; - case "optional": - $this->_fastForward(); - $this->parseGraphPattern($pattern->getId(),false); - $cont = false; - break; - case "union": - $this->_fastForward(); - $this->parseGraphPattern( - false, $this->tmp, false, false, false, $pattern->getId() - ); - break; - case ";": - $prev = true; - $this->_fastForward(); - break; - case ".": - $prev = false; - $this->_fastForward(); - break; - case "graph": - $this->parseGraph(); - break; - case ",": - $prev = true; - $prevPred = true; - $this->_fastForward(); - break; - case "}": - $prev = false; - $pattern->open = false; - $cont = false; - break; - case '{': - //subpatterns opens - $this->parseGraphPattern( - false, false, false, false, false, $pattern->getId() - ); - break; - case "[": - $prev = true; - $tmp = $this->parseNode($this->query->getBlanknodeLabel()); - $this->_fastForward(); - break; - case "]": - $prev = true; - $this->_fastForward(); - break; - case "(": - $prev = true; - $tmp = $this->parseCollection($trp); - $this->_fastForward(); - break; - case false: - $cont = false; - $pattern->open = false; - break; - default: - if ($prev) { - $sub = $tmp; - } else { - $sub = $this->parseNode(); - $this->_fastForward(); - $tmp = $sub; - } - if ($prevPred) { - $pre = $tmpPred; - } else { - $pre = $this->parseNode(); - $this->_fastForward(); - $tmpPred = $pre; - } - if (current($this->tokens)=="[") { - $tmp = $this->parseNode($this->query->getBlanknodeLabel()); - $prev = true; - $obj = $tmp; - } else if (current($this->tokens)=="(") { - $obj = $this->parseCollection($trp); - } else { - $obj = $this->parseNode(); - } - $trp[] = new QueryTriple($sub,$pre,$obj); - $this->_fastForward(); - break; - - } - } while ($cont); - - if (count($trp) > 0) { - $pattern->addTriplePatterns($trp); - } - } - - - - /** - * Parses a value constraint. - * - * @param GraphPattern $pattern - * @param boolean $outer If the constraint is an outer one. - * @return void - */ - protected function parseConstraint(&$pattern, $outer) - { - $constraint = new Constraint(); - $constraint->setOuterFilter($outer); - $this->_fastForward(); - $this->_rewind(); - $nBeginKey = key($this->tokens); - $constraint->setTree( - $t = $this->parseConstraintTree() - ); - - $nEndKey = key($this->tokens); - if (current($this->tokens) == '}') { - prev($this->tokens); - } - - //for backwards compatibility with the normal sparql engine - // which does not use the tree array currently - $expression = trim(implode( - '', - array_slice( - $this->tokens, - $nBeginKey + 1, - $nEndKey - $nBeginKey - 1 - ) - )); - if ($expression[0] == '(' && substr($expression, -1) == ')') { - $expression = trim(substr($expression, 1, -1)); - } - $constraint->addExpression($expression); - - $pattern->addConstraint($constraint); - }//protected function parseConstraint(&$pattern, $outer) - - - - /** - * Parses a constraint string recursively. - * - * The result array is one "element" which may contain subelements. - * All elements have one key "type" that determines which other - * array keys the element array has. Valid types are: - * - "value": - * Just a plain value with a value key, nothing else - * - "function" - * A function has a name and an array of parameter(s). Each parameter - * is an element. - * - "equation" - * An equation has an operator, and operand1 and operand2 which - * are elements themselves - * Any element may have the "negated" value set to true, which means - * that is is - negated (!). - * - * @internal The functionality of this method is being unit-tested - * in testSparqlParserTests::testParseFilter() - * "equation'-elements have another key "level" which is to be used - * internally only. - * - * @return array Nested tree array representing the filter - */ - protected function parseConstraintTree($nLevel = 0, $bParameter = false) - { - $tree = array(); - $part = array(); - $chQuotes = null; - $litQuotes = null; - $strQuoted = ''; - - while ($tok = next($this->tokens)) { -//var_dump(array($tok, $tok[strlen($tok) - 1])); - if ($chQuotes !== null && $tok != $chQuotes) { - $strQuoted .= $tok; - continue; - } else if ($litQuotes !== null) { - $strQuoted .= $tok; - if ($tok[strlen($tok) - 1] == '>') { - $tok = '>'; - } else { - continue; - } - } else if ($tok == ')' || $tok == '}' || $tok == '.') { - break; - } - - switch ($tok) { - case '"': - case '\'': - if ($chQuotes === null) { - $chQuotes = $tok; - $strQuoted = ''; - } else { - $chQuotes = null; - $part[] = array( - 'type' => 'value', - 'value' => $strQuoted, - 'quoted'=> true - ); - } - continue 2; - break; - - case '>': - $litQuotes = null; - $part[] = array( - 'type' => 'value', - 'value' => $strQuoted, - 'quoted'=> false - ); - continue 2; - break; - - case '(': - $bFunc1 = isset($part[0]['type']) && $part[0]['type'] == 'value'; - $bFunc2 = isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand2']) && isset($tree['operand2']['value']); - $part[] = $this->parseConstraintTree( - $nLevel + 1, - $bFunc1 || $bFunc2 - ); - - if ($bFunc1) { - $tree['type'] = 'function'; - $tree['name'] = $part[0]['value']; - self::fixNegationInFuncName($tree); - if (isset($part[1]['type'])) { - $part[1] = array($part[1]); - } - $tree['parameter'] = $part[1]; - $part = array(); - } else if ($bFunc2) { - $tree['operand2']['type'] = 'function'; - $tree['operand2']['name'] = $tree['operand2']['value']; - self::fixNegationInFuncName($tree['operand2']); - $tree['operand2']['parameter'] = $part[0]; - unset($tree['operand2']['value']); - unset($tree['operand2']['quoted']); - $part = array(); - } - continue 2; - break; - - case ' ': - case "\t": - continue 2; - - case '=': - case '>': - case '<': - case '<=': - case '>=': - case '!=': - case '&&': - case '||': - if (isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand2'])) { - //previous equation open - $part = array($tree); - } else if (isset($tree['type']) && $tree['type'] != 'equation') { - $part = array($tree); - $tree = array(); - } - $tree['type'] = 'equation'; - $tree['level'] = $nLevel; - $tree['operator'] = $tok; - $tree['operand1'] = $part[0]; - unset($tree['operand2']); - $part = array(); - continue 2; - break; - - case '!': - if ($tree != array()) { - throw new SparqlParserException( - 'Unexpected "!" negation in constraint.' - ); - } - $tree['negated'] = true; - continue 2; - - case ',': - //parameter separator - if (count($part) == 0 && !isset($tree['type'])) { - throw new SparqlParserException( - 'Unexpected comma' - ); - } - $bParameter = true; - if (count($part) == 0) { - $part[] = $tree; - $tree = array(); - } - continue 2; - - default: - break; - } - - if ($this->varCheck($tok)) { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } else if (substr($tok, 0, 2) == '^^') { - $part[count($part) - 1]['datatype'] - = $this->query->getFullUri(substr($tok, 2)); - } else if ($tok[0] == '@') { - $part[count($part) - 1]['language'] = substr($tok, 1); - } else if ($tok[0] == '<') { - if ($tok[strlen($tok) - 1] == '>') { - //single-tokenized <> uris - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } else { - //iris split over several tokens - $strQuoted = $tok; - $litQuotes = true; - } - } else if ($tok == 'true' || $tok == 'false') { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false, - 'datatype' => 'http://www.w3.org/2001/XMLSchema#boolean' - ); - } else { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } - - if (isset($tree['type']) && $tree['type'] == 'equation' && isset($part[0])) { - $tree['operand2'] = $part[0]; - self::balanceTree($tree); - $part = array(); - } - } - - if (!isset($tree['type']) && $bParameter) { - return $part; - } else if (isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand1']) && !isset($tree['operand2']) - && isset($part[0])) { - $tree['operand2'] = $part[0]; - self::balanceTree($tree); - } - - if (!isset($tree['type']) && isset($part[0])) { - if (isset($tree['negated'])) { - $part[0]['negated'] = true; - } - return $part[0]; - } - - return $tree; - }//protected function parseConstraintTree($nLevel = 0, $bParameter = false) - - - - /** - * "Balances" the filter tree in the way that operators on the same - * level are nested according to their precedence defined in - * $operatorPrecedence array. - * - * @param array $tree Tree to be modified - */ - protected static function balanceTree(&$tree) - { - if ( - isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand1']['type']) && $tree['operand1']['type'] == 'equation' - && $tree['level'] == $tree['operand1']['level'] - && self::$operatorPrecedence[$tree['operator']] > self::$operatorPrecedence[$tree['operand1']['operator']] - ) { - $op2 = array( - 'type' => 'equation', - 'level' => $tree['level'], - 'operator' => $tree['operator'], - 'operand1' => $tree['operand1']['operand2'], - 'operand2' => $tree['operand2'] - ); - $tree['operator'] = $tree['operand1']['operator']; - $tree['operand1'] = $tree['operand1']['operand1']; - $tree['operand2'] = $op2; - } - }//protected static function balanceTree(&$tree) - - - - protected static function fixNegationInFuncName(&$tree) - { - if ($tree['type'] == 'function' && $tree['name'][0] == '!') { - $tree['name'] = substr($tree['name'], 1); - if (!isset($tree['negated'])) { - $tree['negated'] = true; - } else { - unset($tree['negated']); - } - //perhaps more !! - self::fixNegationInFuncName($tree); - } - }//protected static function fixNegationInFuncName(&$tree) - - - - /** - * Parses a bracketted expression. - * - * @param Constraint $constraint - * @return void - * @throws SparqlParserException - */ - protected function parseBrackettedExpression(&$constraint) - { - $open = 1; - $exp = ""; - $this->_fastForward(); - while ($open != 0 && current($this->tokens)!= false) { - switch (current($this->tokens)) { - case "(": - $open++; - $exp = $exp . current($this->tokens); - break; - case ")": - $open--; - if($open != 0){ - $exp = $exp . current($this->tokens); - } - break; - case false: - throw new SparqlParserException( - "Unexpected end of query.", - null, - key($this->tokens) - ); - default: - $exp = $exp . current($this->tokens); - break; - } - next($this->tokens); - } - $constraint->addExpression($exp); - } - - - /** - * Parses an expression. - * - * @param Constraint $constrain - * @return void - * @throws SparqlParserException - */ - protected function parseExpression(&$constraint) - { - $exp = ""; - while (current($this->tokens) != false && current($this->tokens) != "}") { - switch (current($this->tokens)) { - case false: - throw new SparqlParserException( - "Unexpected end of query.", - null, - key($this->tokens) - ); - case ".": - break; - break; - default: - $exp = $exp . current($this->tokens); - break; - } - next($this->tokens); - } - $constraint->addExpression($exp); - } - - /** - * Parses a GRAPH clause. - * - * @param GraphPattern $pattern - * @return void - * @throws SparqlParserException - */ - protected function parseGraph(){ - $this->_fastForward(); - $name = current($this->tokens); - if(!$this->varCheck($name)&!$this->iriCheck($name)&&!$this->qnameCheck($name)){ - $msg = $name; - $msg = preg_replace('/tokens)); - } - $this->_fastForward(); - - if($this->iriCheck($name)){ - $name = new Resource(substr($name,1,-1)); - }else if($this->qnameCheck($name)){ - $name = new Resource($this->query->getFullUri($name)); - } - $this->parseGraphPattern(false,false,$name); - if(current($this->tokens)=='.') - $this->_fastForward(); - } - - /** - * Parses the solution modifiers of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseModifier(){ - do{ - switch(strtolower(current($this->tokens))){ - case "order": - $this->_fastForward(); - if(strtolower(current($this->tokens))=='by'){ - $this->_fastForward(); - $this->parseOrderCondition(); - }else{ - throw new SparqlParserException("'BY' expected.",null,key($this->tokens)); - } - break; - case "limit": - $this->_fastForward(); - $val = current($this->tokens); - $this->query->setSolutionModifier('limit',$val); - break; - case "offset": - $this->_fastForward(); - $val = current($this->tokens); - $this->query->setSolutionModifier('offset',$val); - break; - default: - break; - } - }while(next($this->tokens)); - } - - /** - * Parses order conditions of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseOrderCondition(){ - $valList = array(); - $val = array(); - while(strtolower(current($this->tokens))!='limit' - & strtolower(current($this->tokens))!= false - & strtolower(current($this->tokens))!= 'offset'){ - switch (strtolower(current($this->tokens))){ - case "desc": - $this->_fastForward(); - $this->_fastForward(); - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - if(current($this->tokens)!=')') - throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens)); - $val['type'] = 'desc'; - $this->_fastForward(); - break; - case "asc" : - $this->_fastForward(); - $this->_fastForward(); - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - if(current($this->tokens)!=')') - throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens)); - $val['type'] = 'asc'; - $this->_fastForward(); - break; - default: - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - $val['type'] = 'asc'; - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - break; - } - $valList[] = $val; - } - prev($this->tokens); - $this->query->setSolutionModifier('order by',$valList); - } - - /** - * Parses a String to an RDF node. - * - * @param String $node - * - * @return Node The parsed RDF node - * @throws SparqlParserException - */ - protected function parseNode($node = false) - { - //$eon = false; - if ($node) { - $node = $node; - } else { - $node = current($this->tokens); - } - if ($node{strlen($node)-1} == '.') { - $node = substr($node,0,-1); - } - if ($this->dtypeCheck($node)) { - return $node; - } - if ($this->bNodeCheck($node)) { - $node = '?'.$node; - $this->query->addUsedVar($node); - return $node; - } - if ($node == '[') { - $node = '?' . substr($this->query->getBlanknodeLabel(), 1); - $this->query->addUsedVar($node); - $this->_fastForward(); - if(current($this->tokens)!=']') { - prev($this->tokens); - } - return $node; - } - if ($this->iriCheck($node)){ - $base = $this->query->getBase(); - if ($base!=null) { - $node = new Resource(substr(substr($base,0,-1).substr($node,1),1,-1)); - } else { - $node = new Resource(substr($node,1,-1)); - } - return $node; - } else if ($this->qnameCheck($node)) { - $node = $this->query->getFullUri($node); - $node = new Resource($node); - return $node; - } else if ($this->literalCheck($node)) { - $ch = substr($node, 0, 1); - $chLong = str_repeat($ch, 3); - if (substr($node, 0, 3) == $chLong) { - $ch = $chLong; - } - $this->parseLiteral($node, $ch); - } else if ($this->varCheck($node)) { - $pos = strpos($node,'.'); - if ($pos) { - return substr($node,0,$pos); - } else { - return $node; - } - } else if ($node[0] == '<') { - //partial IRI? loop tokens until we find a closing > - while (next($this->tokens)) { - $node .= current($this->tokens); - if (substr($node, -1) == '>') { - break; - } - } - if (substr($node, -1) != '>') { - throw new SparqlParserException( - "Unclosed IRI: " . $node, - null, - key($this->tokens) - ); - } - return $this->parseNode($node); - } else { - throw new SparqlParserException( - '"' . $node . '" is neither a valid rdf- node nor a variable.', - null, - key($this->tokens) - ); - } - return $node; - }//protected function parseNode($node = false) - - - - /** - * Checks if there is a datatype given and appends it to the node. - * - * @param string $node Node to check - * - * @return void - */ - protected function checkDtypeLang(&$node, $nSubstrLength = 1) - { - $this->_fastForward(); - switch (substr(current($this->tokens), 0, 1)) { - case '^': - if (substr(current($this->tokens),0,2)=='^^') { - $node = new Literal(substr($node,1,-1)); - $node->setDatatype( - $this->query->getFullUri( - substr(current($this->tokens), 2) - ) - ); - } - break; - case '@': - $node = new Literal( - substr($node, $nSubstrLength, -$nSubstrLength), - substr(current($this->tokens), $nSubstrLength) - ); - break; - default: - prev($this->tokens); - $node = new Literal(substr($node, $nSubstrLength, -$nSubstrLength)); - break; - - } - }//protected function checkDtypeLang(&$node, $nSubstrLength = 1) - - - - /** - * Parses a literal. - * - * @param String $node - * @param String $sep used separator " or ' - * - * @return void - */ - protected function parseLiteral(&$node, $sep) - { - do { - next($this->tokens); - $node = $node.current($this->tokens); - } while (current($this->tokens) != $sep); - $this->checkDtypeLang($node, strlen($sep)); - }//protected function parseLiteral(&$node, $sep) - - - - /** - * Checks if the Node is a typed Literal. - * - * @param String $node - * - * @return boolean TRUE if typed FALSE if not - */ - protected function dtypeCheck(&$node) - { - $patternInt = "/^-?[0-9]+$/"; - $match = preg_match($patternInt,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'integer'); - return true; - } - $patternBool = "/^(true|false)$/"; - $match = preg_match($patternBool,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'boolean'); - return true; - } - $patternType = "/^a$/"; - $match = preg_match($patternType,$node,$hits); - if($match>0){ - $node = new Resource(RDF_NAMESPACE_URI.'type'); - return true; - } - $patternDouble = "/^-?[0-9]+.[0-9]+[e|E]?-?[0-9]*/"; - $match = preg_match($patternDouble,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'double'); - return true; - } - return false; - }//protected function dtypeCheck(&$node) - - - - /** - * Parses an RDF collection. - * - * @param TriplePattern $trp - * - * @return Node The first parsed label - */ - protected function parseCollection(&$trp) - { - $tmpLabel = $this->query->getBlanknodeLabel(); - $firstLabel = $this->parseNode($tmpLabel); - $this->_fastForward(); - $i = 0; - while (current($this->tokens)!=")") { - if($i>0) - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),$this->parseNode($tmpLabel = $this->query->getBlanknodeLabel())); - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),$this->parseNode()); - $this->_fastForward(); - $i++; - } - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")); - return $firstLabel; - }//protected function parseCollection(&$trp) - -}// end class: SparqlParser.php - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParserException.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParserException.php.svn-base deleted file mode 100755 index 2a62734f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlParserException.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -Class SparqlParserException extends Exception{ - - private $tokenPointer; - - public function __construct($message, $code = 0, $pointer){ - - $this->tokenPointer = $pointer; - parent::__construct($message, $code); - } - - /** - * Returns a pointer to the token which caused the exception. - * @return int - */ - public function getPointer(){ - return $this->tokenPointer; - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlVariable.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlVariable.php.svn-base deleted file mode 100755 index 5db6e665..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/.svn/text-base/SparqlVariable.php.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -name = $name; - } - - - - public function __toString() - { - return $this->name; - } - - - - /** - * Checks if the given subject/predicate/object - * is a variable name. - * - * @return boolean - */ - public static function isVariable($bject) - { - return is_string($bject) && strlen($bject) >= 2 - && ($bject[0] == '?' || $bject[0] == '$'); - }//public static function isVariable($bject) - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/ClientQuery.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/ClientQuery.php deleted file mode 100755 index 511bb22c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/ClientQuery.php +++ /dev/null @@ -1,56 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class ClientQuery extends Object { - - var $default = array(); - var $named = array(); - var $prefixes = array(); - var $query; - - /** - * Adds a default graph to the query object. - * - * @param String $default default graph name - */ - function addDefaultGraph($default){ - if(!in_array($this->named,$this->default)) - $this->default[] = $default; - } - /** - * Adds a named graph to the query object. - * - * @param String $default named graph name - */ - function addNamedGraph($named){ - if(!in_array($named,$this->named)) - $this->named[] = $named; - } - /** - * Adds the SPARQL query string to the query object. - * - * @param String $query the query string - */ - function query($query){ - $this->query = $query; - } - -} - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Constraint.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Constraint.php deleted file mode 100755 index 383446e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Constraint.php +++ /dev/null @@ -1,95 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -Class Constraint extends Object{ - - /** - * The expression string. - * @var string - */ - protected $expression; - - /** - * True if it is an outer filter, false if not. - * @var boolean - */ - protected $outer; - - /** - * The expression tree - * @var array - */ - protected $tree = null; - - /** - * Adds an expression string. - * - * @param String $exp the expression String - * @return void - */ - public function addExpression($exp) - { - $this->expression = $exp; - } - - /** - * Returns the expression string. - * - * @return String the expression String - */ - public function getExpression() - { - return $this->expression; - } - - - /** - * Sets the filter type to outer or inner filter. - * True for outer false for inner. - * - * @param boolean $boolean - * @return void - */ - public function setOuterFilter($boolean) - { - $this->outer = $boolean; - } - - /** - * Returns true if this constraint is an outer filter- false if not. - * - * @return boolean - */ - public function isOuterFilter() - { - return $this->outer; - } - - - public function getTree() - { - return $this->tree; - }//public function getTree() - - public function setTree($tree) - { - $this->tree = $tree; - }//public function setTree($tree) - -} -// end class: Constraint.php -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/FilterFunctions.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/FilterFunctions.php deleted file mode 100755 index 8c243c43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/FilterFunctions.php +++ /dev/null @@ -1,137 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -*/ - - - - -/** -* Evaluates the regex() function. Returns true if the regex is matched false if not. -* -* @param String $string the string which has to be evaluated -* @param String $pattern the regex pattern -* @param String $flags additional flags like "i" -* @return boolean -*/ -function regex($string,$pattern,$flags = ''){ - $string = trim($string); - $pattern = trim($pattern); - if(strpos($string,"str_")===0){ - $string = substr($string,4); - $pattern = substr($pattern,4); - $flags = substr($flags,4); - }else{ - return false; - } - if(preg_match('/'.$pattern.'/'.$flags,$string)) - return true; - else - return false; -} - -/** -* Evaluates the dateTime() function.Tries to convert a date string into -* a unix timestamp. -* -* @param String $string the date string -* @return integer the corresponding unix timestamp -*/ -function dateTime($string){ - $string = trim($string); - if(strpos($string,"str_")===0) - $string = substr($string,4); - - $time = strtotime($string); - if($time == -1) - return $string; - else - return $time; -} - - -/** -* Evaluates the langMatches() function. Return true if the lang tag matches false if not. -* -* @param String $lang_range the string. -* @param String $lang_tag the regex pattern -* @return boolean -*/ -function langMatches($lang_range,$lang_tag){ - - if($lang_range == null) - return false; - - if(strpos($lang_range,"str_")===0) - $lang_range = substr($lang_range,4); - if(strpos($lang_tag,"str_")===0) - $lang_tag = substr($lang_tag,4); - - if(strtolower($lang_range) == strtolower($lang_tag)) - return true; - $tags = preg_match_all("/[^\-\s].[^\-\s]*/",$lang_range,$hits); - if($tags){ - if($lang_tag == '*') - return true; - foreach($hits[0] as $tag){ - if(strtolower($tag) == strtolower($lang_tag)) - return true; - } - return false; - }else{ - return false; - } -} - -/** -* Evaluates the str() function. Returns the string representation of a -* variable or RDF term. -* -* @param String $string the string -* @return boolean -*/ -function str($string){ - $str = preg_match("/\".[^\"]*\"|\'.[^\']*\'/",$string,$hits); - if($str != 0){ - return "str_".$hits[0]; - }else{ - if(strpos($string,"str_")===0){ - return $string; - }else{ - if(strpos($string,"uri_")===0) - return "str_".substr($string,4); - if(strpos($string,'<')==0) - return "str_".substr($string,1,-1); - } - } - return false; -} - -/** -* Evaluates the lang() function. Returns lang tag of a Literal. -* -* @param String $string the string. -* @return String the lang tag or false if there is no language tag. -*/ -function lang($string){ - $str = preg_match("/\".[^\"]*\"@(.[^\s]*)|\'.[^\']*\'@(.[^\s]*)/",$string,$hits); - if($str){ - if($hits[1] != null) - return $hits[1]; - else - return $hits[2]; - }else{ - return false; - } -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/GraphPattern.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/GraphPattern.php deleted file mode 100755 index f768687c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/GraphPattern.php +++ /dev/null @@ -1,295 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class GraphPattern extends Object{ - - /** - * Graphname. 0 if its in the default graph. - */ - protected $graphname = null; - - /** - * Array of QueryTriple objects - * @var array - */ - protected $triplePatterns = array(); - - /** - * A List of Constraint objects - * @var array - */ - protected $constraints = array(); - - /** - * @var int Pointer to optional pattern. - */ - protected $optional = null; - - /** - * @var int Pointer to union pattern. - */ - protected $union = null; - - /** - * ID of the pattern in the pattern list that - * this pattern is subpattern of. - * @var int - */ - protected $subpatternOf = null; - - /** - * @var boolean TRUE if the pattern is open- FALSE if closed. - */ - public $open = false; - - /** - * @var boolean TRUE if the GraphPattern is a construct pattern. - */ - public $isConstructPattern = false; - - - /** - * @var int The GraphPatterns id. - */ - public $patternId = null; - - - /** - * Constructor - */ - public function GraphPattern() { - $this->open = true; - $this->isConstructPattern = false; - $this->constraints = array(); - $this->triplePatterns = array(); - } - - /** - * Returns the graphname. - * - * @return String - */ - public function getGraphname(){ - return $this->graphname; - } - - /** - * Returns the triple pattern of the graph pattern. - * - * @return Array - */ - public function getTriplePatterns(){ - return $this->triplePatterns; - } - - /** - * Returns a constraint if there is one false if not. - * - * @return Constraint - */ - public function getConstraints() { - return $this->constraints; - } - - /** - * Returns a pointer to an optional graph pattern. - * - * @return integer - */ - public function getOptional() { - return $this->optional; - } - - /** - * Returns a pointer to the parent pattern this pattern - * is subpattern of. - * - * @return integer - */ - public function getSubpatternOf() { - return $this->subpatternOf; - } - - /** - * Returns a pointer to a union graph pattern. - * - * @return integer - */ - public function getUnion() { - return $this->union; - } - - /** - * Sets the graphname. - * - * @param String $name - * @return void - */ - public function setGraphname($name) { - $this->graphname = $name; - } - - /** - * Adds List of QueryTriples to the GraphPattern. - * - * @param array $trpP - * @return void - */ - public function addTriplePatterns($trpP) { - $this->triplePatterns = array_merge($this->triplePatterns, $trpP); - } - - /** - * Sets the List of QueryTriples to the GraphPattern. - * - * @param array $trpP - * @return void - */ - public function setTriplePatterns($trpP) { - $this->triplePatterns = $trpP; - } - - /** - * Adds a single Constraint to the GraphPattern. - * - * @param Constraint $cons - */ - public function addConstraint(&$cons) { - $this->constraints[] = $cons; - } - - /** - * Adds an array of Constraint objects to the GraphPattern. - * - * @param array $cons - */ - public function addConstraints(&$cons) { - $this->constraints = array_merge($this->constraints, $cons); - } - - /** - * Adds a pointer to an optional graphPattern. - * - * @param integer $patternId - * @return void - */ - public function setOptional($patternId) { - $this->optional = &$patternId; - } - - /** - * Adds a pointer to a union graphPattern. - * - * @param integer $patternId - * @return void - */ - public function setUnion($patternId) { - $this->union = &$patternId; - } - - /** - * Adds a pointer to a pattern that - * this one is subpattern of - * - * @param integer $patternId - */ - public function setSubpatternOf($patternId) { - $this->subpatternOf = $patternId; - } - - - /** - * Sets the GraphPatterns Id. - * - * @param integer $id - * @return void - */ - public function setId($id){ - $this->patternId = $id; - } - - /** - * Returns the GraphPatterns id. - * - * @return integer - */ - public function getId(){ - return $this->patternId; - } - - - - /** - * Returns an array of all variables used in this - * graph pattern. - * All variables are listed only once (unique). - * - * @return array Array of variable names - */ - public function getVariables() - { - $arVars = array(); - - foreach ($this->triplePatterns as $pattern) { - $arVars = array_merge($arVars, $pattern->getVariables()); - } - - return array_unique($arVars); - }//public function getVariables() - - - - /** - * Checks if the graph pattern is empty (contains no - * usable data). - * Occurs when using "{}" without pre- or suffixes - * WHERE - * { - * { ?person rdf:type foaf:Person } . - * } - * - * @return boolean True if the pattern is empty. - */ - public function isEmpty() - { - return - count($this->triplePatterns) == 0 - && count($this->constraints) == 0 - && $this->getGraphname() === null - ; - }//public function isEmpty() - - - - /** - * When cloning, we need to clone some subobjects, too - */ - public function __clone() - { - if (count($this->triplePatterns) > 0) { - foreach ($this->triplePatterns as $nId => $pattern) { - $this->triplePatterns[$nId] = clone $this->triplePatterns[$nId]; - } - } - if (count($this->constraints) > 0) { - foreach ($this->constraints as $nId => $constraint) { - $this->constraints[$nId] = clone $this->constraints[$nId]; - } - } - } - -}// end class: GraphPattern.php -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Query.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Query.php deleted file mode 100755 index c85a60ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/Query.php +++ /dev/null @@ -1,685 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class Query extends Object -{ - /** - * The BASE part of the SPARQL query. - * @var string - */ - protected $base; - - /** - * Original SPARQL query string - * @var string - */ - protected $queryString = null; - - /** - * Array that contains used prefixes and namespaces. - * Key is the prefix, value the namespace. - * - * @example - * array(8) { - * ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#" - * ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#" - * } - * - * @var array - */ - public $prefixes = array(); - - /** - * Array of result variables that shall be returned. - * E.g. "?name", "?mbox" - * - * @var array - */ - protected $resultVars = array(); - - /** - * What form/type of result should be returned. - * - * One of: - * - "ask" - * - "count" - * - "construct" - * - "describe" - * - "select" - * - "select distinct" - * - * @var string - * @see http://www.w3.org/TR/rdf-sparql-query/#QueryForms - */ - protected $resultForm = null; - - /** - * Contains the result part of the SPARQL query. - * Array of GraphPattern - * - * @var array - */ - protected $resultPart = array(); - - /** - * Contains the FROM part of the SPARQL query. - * @var array - */ - protected $fromPart = array(); - - /** - * Contains the FROM NAMED part of the SPARQL query. - * @var array - */ - protected $fromNamedPart = array(); - - /** - * Optional solution modifier of the query. - * Array with three keys: - * "order by", "limit", "offset" - * If they are not set, their value is null - * - * "order by" can be an array with subarrays, each of those - * subarrays having two keys: "val" and "type". - * "val" determines the variable ("?mbox"), "type" is - * "asc" or "desc" - * - * @var array - */ - protected $solutionModifier = array(); - - /** - * Blanknode counter. - * How many blank nodes are in $resultPart - * - * @var int - */ - protected $bnodeCounter = 0; - - /** - * GraphPattern counter. - * How many GraphPattern are in $resultPart - * - * @var int - */ - public $graphPatternCounter = 0; - - /** - * List of all vars used in the query. - * Key is the variable (e.g. "?x"), value - * is boolean true - * - * @var array - */ - public $usedVars = array(); - - /** - * If the query type is CONSTRUCT this variable contains the - * CONSTRUCT graph pattern. - */ - protected $constructPattern = null; - - /** - * TRUE if the query is empty FALSE if not. - * - * @var boolean - */ - public $isEmpty = null; - - /** - * Language of variables. NULL if the variable has no - * language tag (e.g. @en) set. - * $varname => $language tag - * @var array - */ - public $varLanguages = array(); - - /** - * Datatype of variables. NULL if the variable has no - * data type (e.g. ^^xsd::integer) set. - * $varname => $datatype - * @var array - */ - public $varDatatypes = array(); - - - - /** - * Constructor - */ - public function Query(){ - $this->resultForm = null; - $this->solutionModifier['order by'] = null; - $this->solutionModifier['limit'] = null; - $this->solutionModifier['offset'] = null; - $this->bnodeCounter = 0; - $this->graphPatternCounter = 0; - - } - - /** - * Returns the BASE part of the query. - * - * @return String - */ - public function getBase(){ - return $this->base; - } - - /** - * Returns the prefix map of the query. - * - * @return Array - */ - public function getPrefixes(){ - return $this->prefixes; - } - - /** - * Returns a list containing the result vars. - * - * @return Array - */ - public function getResultVar($strName) { - foreach ($this->resultVars as $var) { - if ($var->getVariable() == $strName) { - return $var; - } - } - return false; - } - - /** - * Returns a list containing the result vars. - * - * @return Array - */ - public function getResultVars(){ - return $this->resultVars; - } - - /** - * Returns the type the result shall have. - * E.g. "select", "select distinct", "ask", ... - * - * @see $resultForm - * - * @return string - */ - public function getResultForm(){ - return $this->resultForm; - } - - /** - * Returns a list containing the graph patterns of the query. - * - * @return Array - */ - public function getResultPart(){ - return $this->resultPart; - } - - /** - * Returns the FROM clause of the query. - * - * @return String - */ - public function getFromPart(){ - return $this->fromPart; - } - - /** - * Returns the FROM NAMED clause of the query. - * - * @return Array - */ - public function getFromNamedPart(){ - return $this->fromNamedPart; - } - - /** - * Returns $isEmpty variable - * @return boolean - */ - public function isEmpty() { - return $this->isEmpty; - } - - /** - * Returns an unused Bnode label. - * - * @return String - */ - public function getBlanknodeLabel(){ - return "_:bN".$this->bnodeCounter++; - } - - - /** - * Sets the base part. - * - * @param String $base - * @return void - */ - public function setBase($base){ - $this->base = $base; - } - - - /** - * Adds a prefix to the list of prefixes. - * - * @param String $prefix - * @param String $label - * @return void - */ - public function addPrefix($prefix, $label){ - $this->prefixes[$prefix]= $label; - } - - /** - * Adds a variable to the list of result variables. - * - * @param String $var - * @return void - */ - public function addResultVar($var){ - $this->resultVars[] = $var; - $var->setDatatype($this->getDatatype($var)); - - $this->varLanguages[$var->getId()] = self::getLanguageTag($var); - $this->varDatatypes[$var->getId()] = $this->getDatatype($var); - } - - - /** - * Sets the result form. - * - * @param String $form - * @return void - */ - public function setResultForm($form){ - $this->resultForm = strtolower($form); - } - - - /** - * Sets the result part. - * - * @param array Array of graph patterns - */ - public function setResultPart($resultPart) { - $this->resultPart = $resultPart; - } - - /** - * Adds a graph pattern to the result part. - * - * @param GraphPattern $pattern - * @return void - */ - public function addGraphPattern($pattern){ - $pattern->setId($this->graphPatternCounter); - $this->resultPart[] = $pattern; - $this->graphPatternCounter++; - } - - /** - * Adds a construct graph pattern to the query. - * - * @param GraphPattern $pattern - * @return void - */ - public function addConstructGraphPattern($pattern){ - $this->constructPattern = $pattern; - } - - - /** - * Adds a graphuri to the from part. - * - * @param String $graphURI - * @return void - */ - public function addFrom($graphURI){ - $this->fromPart[] = $graphURI; - } - - /** - * Adds a graphuri to the from named part. - * - * @param String $graphURI - * @return void - */ - public function addFromNamed($graphURI){ - $this->fromNamedPart[] = $graphURI; - } - - /** - * Sets a solution modifier. - * - * @param String $name - * @param Value $value - * @return void - */ - public function setSolutionModifier($name, $value){ - $this->solutionModifier[$name] = $value; - } - - - /** - * Generates a new GraphPattern. If it is a CONSTRUCT graph pattern - * $constr has to set to TRUE, FALSE if not. - * - * @param boolean $constr - * @return GraphPattern - */ - public function getNewPattern($constr = false){ - $pattern = new GraphPattern(); - if ($constr) { - $this->addConstructGraphPattern($pattern); - } else { - $this->addGraphPattern($pattern); - } - return $pattern; - } - - /** - * Adds a new variable to the variable list. - * - * @param String $var - * @return void - */ - public function addUsedVar($var){ - $this->usedVars[$var]=true; - } - - /** - * Returns a list with all used variables. - * - * @return Array - */ - public function getAllVars(){ - return array_keys($this->usedVars); - } - - /** - * Gets the solution modifiers of the query. - * $solutionModifier['order by'] = value - * ['limit'] = vlaue - * ['offset'] = value - * - * - * @return Array - */ - public function getSolutionModifier(){ - return $this->solutionModifier; - } - - - /** - * Returns the construvtGraphPattern of the query if there is one. - * - * @return GraphPattern - */ - public function getConstructPattern(){ - return $this->constructPattern; - } - - - - /** - * Returns a list of variables used in the construct patterns. - * - * @return array Array of variable names, unique. - */ - public function getConstructPatternVariables() - { - $arVars = array(); -/* - if (count($this->resultPart) > 0) { - foreach ($this->resultPart as $pattern) { - $arVars = array_merge($arVars, $pattern->getVariables()); - } - } -*/ - if ($this->constructPattern) { - $arVars = array_merge($arVars, $this->constructPattern->getVariables()); - } - - return array_unique($arVars); - }//public function getConstructPatternVariables() - - - - /** - * Returns the language of a variable if the tag is set (e.g. @en) - * Returns NULL if no language is set. - * - * @param string Sparql variable name - * @return mixed NULL or language tag - */ - public static function getLanguageTag($var) - { - $nAt = strpos($var, '@'); - if ($nAt === false) { - return null; - } - //in case @ and ^^ are combined - $nHatHat = strpos($var, '^^', $nAt + 1); - if ($nHatHat === false) { - $tag = substr($var, $nAt + 1); - } else { - $tag = substr($var, $nAt + 1, $nHatHat - $nAt - 1); - } - return $tag; - }//public static function getLanguageTag($var) - - - - /** - * Returns the datatype of a variable if it is set. - * - * @param string Sparql variable name - * @return mixed NULL or datatype - */ - public function getDatatype($var) - { - $nHatHat = strpos($var, '^^'); - if ($nHatHat === false) { - return null; - } - $nAt = strpos($var, '@', $nHatHat + 2); - if ($nAt === false) { - $type = substr($var, $nHatHat + 2); - } else { - $type = substr($var, $nHatHat + 2, $nAt - $nHatHat - 2); - } - - $fullUri = $this->getFullUri($type); - if ($fullUri === false) { - $fullUri = $type; - if ($fullUri[0] == '<' && substr($fullUri, -1) == '>') { - $fullUri = substr($fullUri, 1, -1); - } - } - - return $fullUri; - }//public function getDatatype($var) - - - - /** - * Gets the full URI of a qname token. - * - * @param string $token - * @return string The complete URI of a given token, false if $token is not - * a qname or the prefix is not defined - */ - public function getFullUri($token) - { - $pattern="/^([^:]*):([^:]*)$/"; - if (preg_match($pattern, $token, $hits) > 0) { - - if (isset($this->prefixes{$hits{1}})) { - return substr($this->base, 1, -1) - . $this->prefixes{$hits{1}} - . $hits{2}; - } - if ($hits{1}=='_') { - return "_".$hits{2}; - } - } - - return false; - } - - - - /** - * Checks if the query is complete - * (so that querying is possible) - * - * @return boolean true if the query is complete - */ - public function isComplete() - { - if ($this->resultForm === null) { - return false; - } - //TODO: maybe check selected vars and construct pattern depending - // on the resultform - return true; - }//public function isIncomplete() - - - - /** - * Sets the orignal query string - * - * @param string $queryString SPARQL query string - */ - public function setQueryString($queryString) - { - $this->queryString = $queryString; - }//public function setQueryString($queryString) - - - - /** - * Returns the orignal query string - * - * @return string SPARQL query string - */ - public function getQueryString() - { - return $this->queryString; - }//public function getQueryString() - -}// end class: Query.php - - - -class Query_ResultVariable -{ - public $variable = null; - public $datatype = null; - public $language = null; - public $alias = null; - public $func = null; - - - public function __construct($variable) - { - $this->variable = $variable; - $this->language = Query::getLanguageTag($variable); - } - - - - public function setAlias($alias) - { - $this->alias = $alias; - } - - - - public function setFunc($func) - { - $this->func = $func; - } - - - - public function setDatatype($datatype) - { - $this->datatype = $datatype; - } - - - - public function getId() - { - //FIXME - return $this->variable; - } - - - - public function getFunc() - { - return $this->func; - } - - - - public function getLanguage() - { - return $this->language; - } - - - - public function getDatatype() - { - return $this->datatype; - } - - - - public function getName() - { - if ($this->alias !== null) { - return $this->alias; - } - //FIXME: support for nested(functions()) - return $this->variable; - } - - - - public function getVariable() - { - return $this->variable; - } - - - - public function __toString() - { - return $this->getName(); - } - -}//class Query_ResultVariable - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/QueryTriple.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/QueryTriple.php deleted file mode 100755 index 4f8dcca2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/QueryTriple.php +++ /dev/null @@ -1,123 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class QueryTriple extends Object -{ - - /** - * The QueryTriples Subject. - * Can be a BlankNode or Resource, string in - * case of a variable - * @var Node/string - */ - protected $subject; - - /** - * The QueryTriples Predicate. - * Normally only a Resource, string in - * case of a variable - * @var Node/string - */ - protected $predicate; - - /** - * The QueryTriples Object. - * Can be BlankNode, Resource or Literal, string in - * case of a variable - * @var Node/string - */ - protected $object; - - - - /** - * Constructor - * - * @param Node $sub Subject - * @param Node $pred Predicate - * @param Node $ob Object - */ - public function QueryTriple($sub,$pred,$ob) - { - $this->subject = $sub; - $this->predicate = $pred; - $this->object = $ob; - } - - /** - * Returns the Triples Subject. - * - * @return Node - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Returns the Triples Predicate. - * - * @return Node - */ - public function getPredicate() - { - return $this->predicate; - } - - /** - * Returns the Triples Object. - * - * @return Node - */ - public function getObject() - { - return $this->object; - } - - - - /** - * Returns an array of all variables in this triple. - * - * @return array Array of variable names - */ - public function getVariables() - { - $arVars = array(); - - foreach (array('subject', 'predicate', 'object') as $strVar) { - if (SparqlVariable::isVariable($this->$strVar)) { - $arVars[] = $this->$strVar; - } - } - - return $arVars; - }//public function getVariables() - - - - public function __clone() - { - foreach (array('subject', 'predicate', 'object') as $strVar) { - if (is_object($this->$strVar)) { - $this->$strVar = clone $this->$strVar; - } - } - }//public function __clone() - -}//class QueryTriple extends Object - -// end class: QueryTriple.php -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SPARQL.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SPARQL.php deleted file mode 100755 index b35f82ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SPARQL.php +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlClient.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlClient.php deleted file mode 100755 index 9db93c96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlClient.php +++ /dev/null @@ -1,160 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -class SparqlClient extends Object { - - var $server; - var $output; - - /** - * Constructor of SparlClient. - * - * @param String $server server address. - */ - function SparqlClient($server){ - $this->server = $server; - $this->output = "array"; - } - - - /** - * Sets the output format for a SELECT or ASK query. Possible formats are "xml" for - * Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array - * for the format described in our SparqlEngine. - * - * @param String $format the format. - */ - function setOutputFormat($format){ - if(strtolower($format)=="xml") - $this->output = "xml"; - if(strtolower($format)=="array") - $this->output = "array"; - - } - - /** - * Main function of SparqlClient. - * - * @param ClientQuery $query the ClientQuery object. - * @return mixed returns an array that contains the variables an their bindings or a MemModel - * - */ - function query($query){ - if(!is_a($query,"ClientQuery")) - die;//ErrorHandling - - $url = $this->_buildurl($query); - $result = $this->_http_get($url); - return $this->returnResult($result); - - } - - - /** - * Helper function that builds the url. - * - * @param ClientQuery $query the ClientQuery Object. - */ - - function _buildurl($query){ - $url = ""; - $url = $this->server."?query=".urlencode($query->query); - foreach($query->default as $defaultg){ - $url = $url."&default-graph-uri=".$defaultg; - } - foreach($query->named as $namedg){ - $url = $url."&named-graph-uri=".$namedg; - } - - return $url; - - } - - /** - * Returns the query result. - * - * @param String $result the result. - * @return mixed - */ - function returnResult($result){ - - if(strpos($result,"generateModel(substr($result,strpos($result,"output == "xml"){ - $pos = strpos($result,"output == "array"){ - // $pos = strpos($buffer,"parseResult($result); - } - return $result; - } - - - function parseResult($buffer){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_SPARQLRES); - $parser = new SparqlResultParser(); - return $parser->parse($buffer); - } - - - /** - * Executes the GET Request. - * - * @param String $url the url. - * @return String result. - */ - function _http_get($url) - { - $url = parse_url($url); - $port = isset($url['port']) ? $url['port'] : 80; - - $fp = fsockopen($url['host'], $port); - - $replace = $url['path']; - - fputs($fp, "GET ".$replace."?".$url['query']." HTTP/1.0\n"); - fputs($fp, "Host:". $url['host']." \r\n"); - fputs($fp, "Accept: application/sparql-results+xml, application/rdf+xml\r\n"); - fputs($fp, "Connection: close\n\n"); - - $buffer = ""; - while ($tmp = fread($fp, 1024)) - { - $buffer .= $tmp; - } - - $pos1 = strpos($buffer,"\r\n\r\n"); - $pos2 = strpos($buffer,"\n\n"); - if ($pos1 === false) { - $pos = $pos2; - } else { - $pos = $pos1; - } - - return substr($buffer,$pos); - - } -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine.php deleted file mode 100755 index 06f6c804..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine.php +++ /dev/null @@ -1,1169 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ - -Class SparqlEngine extends Object{ - - - /** - * The query object. - * @var Query - */ - protected $query; - - /** - * The RDF Dataset. - * @var Dataset - */ - protected $dataset; - - - - /** - * Use SparqlEngine::factory() instead of this - * constructor. - */ - protected function __construct() - { - //protected to prevent direct instantiation - } - - - /** - * Creates a new instance of the SparqlEngine, depending on the - * given model. For example, if you pass a DbModel, you will - * get a SparqlEngine specialized on databases. - * - * @param Model $model RDF model that uses the engine - */ - public function factory($model = null) - { - if ($model !== null && $model instanceof DbModel) { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php'; - return new SparqlEngineDb($model); - } else { - return new SparqlEngine(); - } - } - - - - /** - * The query engine's main method. - * - * @param Dataset $dataset the RDF Dataset - * @param mixed $query the parsed SPARQL query - * @param String $resultform the result form. If set to 'xml' the result will be - * SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ . - * @return Array/String Type of the result depends on $resultform. - */ - public function queryModel($dataset, Query $query, $resultform = false) - { - $this->query = $query; - $this->dataset = $dataset; - - if($this->query->isEmpty){ - $vartable[0]['patternResult'] = null; - return SparqlEngine_ResultConverter::convertFromResult( - $vartable, - $this, - $resultform - ); - } - - $graphlist = $this->preselectGraphs(); - /// match graph patterns against the RDF Dataset - $patternlist = $this->matchPatterns($graphlist); - // filter results- apply inner filters - $patternlist = $this->filterPatterns($patternlist,false); - // join pattern results - $vartable = $this->joinResults($patternlist); - // filter results- apply outer filters - $vartable = $this->filterPatterns($vartable,true); - - if ($vartable[0]['patternResult'] != null) { - // sort vars (ORDER BY, LIMIT, OFFSET) - $vartable = $this->sortVars($vartable[0]['patternResult']); - $qrf = $this->query->getResultForm(); - if ($qrf == 'select' || $qrf == 'select distinct') { - $vars = $this->query->getResultVars(); - $vartable = $this->selectVars($vartable, $vars); - if ($qrf == 'select distinct') { - $vartable = $this->distinct($vartable); - } - } - } else { - $vartable = null; - } - - return SparqlEngine_ResultConverter::convertFromResult( - $vartable, - $this, - $resultform - ); - }//public function queryModel($dataset, Query $query, $resultform = false) - - - - /** - * Matches all graph Patterns against the dataset and generates an array which - * contains the result sets for every given GraphPattern. - * - * @param Array $graphlist the graphlist which contains the names of the named - * graphs which has to be queried. - * @return Array - */ - protected function matchPatterns($graphlist){ - $patternlist = array(); - // get the result part from the query - $resultPart = $this->query->getResultPart(); - // for each GrapPattern in the result part - if($resultPart) - foreach($resultPart as $graphPattern){ - $this->matchPattern($patternlist, $graphlist, $graphPattern); - } - return $patternlist; - } - - - - /** - * Finds tuples that match one graph pattern. - * - * @param Array $patternlist list that contains the graphPatterns - * @param array $graphlist the graphlist - * @param GraphPattern $graphPattern the pattern which has to be matched - * @return void - */ - protected function matchPattern(&$patternlist, $graphlist, &$graphPattern) { - // generate an empty result set - $finalRes = null; - // if the GraphPattern has triple patterns - if (count($graphPattern->getTriplePatterns()) > 0) { - // check if the pattern has a GRAPH clause and if this Iri is in $graphlist - $newGraphList = $this->_checkGraphs($graphPattern,$graphlist); - if($newGraphList){ - $qt = $graphPattern->getTriplePatterns(); - $resultSet = $this->findTuplesMatchingOnePattern($qt[0], $newGraphList); - for ($i=1; $ifindTuplesMatchingOnePattern($qt[$i], $newGraphList); - $resultSet = $this->joinTuples($resultSet, $rs); - if(!$resultSet) - break; - } - if($finalRes != null){ - $finalRes = $this->joinTuples($finalRes,$resultSet); - }else{ - $finalRes = $resultSet; - } - } - } - // dependencies between pattern results - $patternlist[$graphPattern->getId()]['hasOptional'] = 0; - $patternlist[$graphPattern->getId()]['hasUnion'] = 0; - $patternlist[$graphPattern->getId()]['patternResult'] = $finalRes; - - $op = $graphPattern->getOptional(); - $un = $graphPattern->getUnion(); - - $patternlist[$graphPattern->getId()]['optionalTo'] = $op; - if(is_int($op)) - $patternlist[$op]['hasOptional']++; - - $patternlist[$graphPattern->getId()]['unionWith'] = $un; - if(is_int($un)) - $patternlist[$un]['hasUnion']++; - - $constraint = $graphPattern->getConstraints(); - if(count($constraint) > 0){ - foreach($constraint as $constr){ - if($constr->isOuterFilter()){ - $patternlist[$graphPattern->getId()]['outerFilter'][] = $constr; - $patternlist[$graphPattern->getId()]['innerFilter'][] = null; - }else{ - $patternlist[$graphPattern->getId()]['innerFilter'][] = $constr; - $patternlist[$graphPattern->getId()]['outerFilter'][] = null; - } - } - }else{ - $patternlist[$graphPattern->getId()]['innerFilter'] = null; - $patternlist[$graphPattern->getId()]['outerFilter'] = null; - } - } - - - /** - * Finds Tuples matching one TriplePattern. - * - * @param TriplePattern $pattern - * @param Array $graphlist - * @return Array - */ - protected function findTuplesMatchingOnePattern($pattern, $graphlist){ - $var = null; - $sub = $pattern->getSubject(); - $pred = $pattern->getPredicate(); - $obj = $pattern->getObject(); - - if(is_string($sub)||$sub instanceof BlankNode){ - if(is_string($sub)) - $var['sub'] = $sub; - $sub = null; - } - if(is_string($pred)||$pred instanceof BlankNode ){ - if(is_string($pred)) - $var['pred'] = $pred; - $pred = null; - } - if(is_string($obj)||$obj instanceof BlankNode){ - if(is_string($obj)) - $var['obj'] = $obj; - $obj = null; - } - $intBindings = $this->_buildIntBindings($var); - $k = 0; - - $key = 0; - // search in named graphs - if($graphlist['var'][0] != null||$graphlist['list'][0] != null){ - foreach($graphlist['list'] as $key => $graphnode){ - - // query the dataset - $it = $this->dataset->findInNamedGraphs($graphnode,$sub,$pred,$obj,false); - if($it->valid()){ - // add statements to the result list - while($it->valid()){ - if($graphnode == null){ - $element = $it->current()->getStatement(); - $grname = $it->current()->getGraphname(); - }else{ - if($it->current() instanceof Quad) - $element = $it->current()->getStatement(); - else - $element = $it->current(); - - $grname = $graphnode; - } - if($this->checkIntBindings($element,$intBindings)){ - $resmodel['trip'][$k] = $element; - $resmodel['graph'][$k] = $grname; - // $resmodel['graphvar'][$k] = $graphlist['var'][$key]; - $resmodel['graphvar'][$k] = $graphlist['var'][0]; - $k++; - - } - $it->next(); - } - } - - } - } - // search in the default graph - if($graphlist['list'][0] == null && $graphlist['var'][0] == null){ - - - $gr = $this->dataset->getDefaultGraph(); - - $res = $gr->find($sub,$pred,$obj); - - foreach($res->triples as $innerkey => $element){ - if($this->checkIntBindings($element,$intBindings)){ - $resmodel['trip'][$k] = $element; - $resmodel['graph'][$k] = null; - $resmodel['graphvar'][$k] = $graphlist['var'][$key]; - $k++; - } - } - } - if($k == 0) - return false; - return $this->_buildResultSet($pattern,$resmodel); - } - - /** - * Checks it there are internal bindings between variables. - * - * @param Triple $trip - * @param Array $intBindings - * @return boolean - */ - protected function checkIntBindings($trip, $intBindings){ - switch($intBindings){ - case -1: - return true; - break; - case 0: - if($trip->subj != $trip->pred) - return false; - break; - case 1: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->subj != $trip->obj) - return false; - break; - case 2: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->pred != $trip->obj) - return false; - break; - case 3: - if(is_a($trip->obj,'Literal')) - return false; - if($trip->pred != $trip->obj || $trip->pred != $trip->subj ) - return false; - break; - } - return true; - } - - - /** - * Perform an SQL-like inner join on two resultSets. - * - * @param Array &$finalRes - * @param Array &$res - * @return Array - */ - protected function joinTuples(&$finalRes, &$res) { - - if (!$finalRes || !$res) - return array(); - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - $k = key($res); - - foreach ($res[$k] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])) - $jointVars[] = $varname; - else - $newVars[] = $varname; - } - - // eliminate rows of $finalRes in which the values of $jointVars do not have - // a corresponding row in $res. - foreach ($finalRes as $n => $fRes) { - foreach ($res as $i => $r) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) - break; - } - if (!$ok) - unset($finalRes[$n]); - } - - // join $res and $finalRes - $joinedRes = array(); - foreach ($res as $r) { - foreach ($finalRes as $n => $fRes) { - $ok = TRUE; - foreach ($jointVars as $j_varname) - if ($r[$j_varname] != $fRes[$j_varname]) { - $ok = FALSE; - break; - } - if ($ok) { - $joinedRow = $finalRes[$n]; - foreach($newVars as $n_varname) - $joinedRow[$n_varname] = $r[$n_varname]; - $joinedRes[] = $joinedRow; - } - } - } - return $joinedRes; - } - - - /** - * Joins OPTIONAL pattern results. - * - * @param Array &$finalRes - * @param Array &$res - * @return Array the joined Array - */ - protected function joinOptionalTuples(&$finalRes, &$res) { - - if(!$finalRes && !$res) - return array(); - - if(!$finalRes) - return $res; - - if(!$res) - return $finalRes; - - // find joint variables and new variables to be added to $finalRes - $jointVars = array(); - $newVars = array(); - $result = array(); - - $k = key($res); - - foreach ($res[$k] as $varname => $node) { - if (array_key_exists($varname, $finalRes[0])){ - $jointVars[] = $varname; - }else{ - $newVars[] = $varname; - } - } - $joined = array(); - $joinc = 0; - foreach($finalRes as $i =>$fRes){ - foreach($res as $n =>$r){ - $join = false; - foreach($jointVars as $j_varname){ - if($r[$j_varname]==$fRes[$j_varname]){ - $join = true; - //break; - }else{ - $join = false; - } - } - if($join){ - $result[$joinc] = $fRes; - foreach($newVars as $n_varname) - $result[$joinc][$n_varname] = $r[$n_varname]; - $joined[]=$n; - $joinc++; - } - - } - } - - $count = count($result); - foreach($res as $k =>$val){ - if(!in_array($k,$joined)){ - $result[$count] = $finalRes[0]; - foreach($result[$count] as $varname => $varVal){ - $result[$count][$varname]=''; - } - - foreach($val as $varname2 => $varVal2){ - $result[$count][$varname2]=$varVal2; - } - $count++; - } - } - return $result; - } - - - - /** - * Looks in from and from named part of the query and - * adds the graphs to the graphlist. - * - * @return Array - */ - protected function preselectGraphs(){ - $fromNamed = $this->query->getFromNamedPart(); - if($fromNamed == null) - $fromNamed[] = null; - return $fromNamed; - } - - - /** - * Evaluates the GRPAH clause if there is one. Checks if - * the GRAPH clause contains an IRI, variable or nothing. - * Returns an array which contains the graphs that has to be matched. - * - * @param GraphPattern $pattern - * @param Array $graphlist - * @return Array - */ - protected function _checkGraphs(&$pattern,$graphlist){ - - $gr = $pattern->getGraphname(); - if($gr instanceof Resource ){ - if($graphlist[0]==null || in_array($gr,$graphlist)){ - $newGraphList['list'][] = $gr; - $newGraphList['var'][] = null; - }else{ - return false; - } - }elseif (is_string($gr)){ - $newGraphList['list'] = $graphlist; - $newGraphList['var'][] = $gr; - }else{ - $newGraphList['list'] = $graphlist; - $newGraphList['var'][] = null; - } - return $newGraphList; - } - - /** - * Marks triples with internal bindings. - * int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj. - * - * @param Array $var - * @return Array - */ - protected function _buildIntBindings($var){ - $intBindings = -1; - if(!$var) - return $intBindings; - - if(isset($var['sub'])){ - if(isset($var['pred'])) - if($var['sub'] == $var['pred']) - $intBindings = 0; - if(isset($var['obj'])) - if($var['sub'] == $var['obj']){ - if( $intBindings == 0){ - $intBindings = 3; - }else{ - $intBindings = 1; - } - } - } - if(isset($var['pred'])){ - if(isset($var['obj'])) - if($var['pred']==$var['obj']&&$intBindings!=3) - $intBindings = 2; - } - return $intBindings; - } - - /** - * Builds the resultset. - * - * @param GraphPattern $pattern - * @param Array $resmodel - * @return Array - */ - protected function _buildResultSet($pattern,$resmodel){ - // determine variables and their corresponding values - $result = null; - if(is_string($pattern->getSubject())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getSubject()] = $triple->subj; - } - } - if(is_string($pattern->getPredicate())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getPredicate()] = $triple->pred; - } - } - if(is_string($pattern->getObject())){ - $n = 0; - foreach($resmodel['trip'] as $key => $triple){ - if(isset($resmodel['graphvar'][$key])) - $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key]; - $result[$n++][$pattern->getObject()] = $triple->obj; - } - } - return $result; - } - - /** - * Selects the result variables and builds a result table. - * - * @param Array $table the result table - * @param Array $vars the result variables - * @return Array - */ - protected function selectVars($table,$vars){ - if($vars[0]=='*') - $vars = $this->query->getAllVars(); - $resTable = array(); - $hits = 0; - foreach($table as $val){ - foreach($vars as $var){ - if(isset($val[(string)$var])){ - $resTable[$hits][(string)$var]=$val[(string)$var]; - }else{ - $resTable[$hits][(string)$var]=""; - } - } - $hits++; - } - return $resTable; - } - - /** - * Joins the results of the different Graphpatterns. - * - * @param Array $patternlist - * @return Array - */ - protected function joinResults($patternlist){ - $joined[0]['patternResult'] = null; - $joined[0]['outerFilter'] = null; - - while(count($patternlist)>0){ - foreach($patternlist as $key => $pattern){ - if($pattern['hasOptional'] == 0 && $pattern['hasUnion'] == 0){ - if(is_int($pattern['optionalTo'])){ - $patternlist[$pattern['optionalTo']]['hasOptional']--; - $patternlist[$pattern['optionalTo']]['patternResult'] = $this->joinOptionalTuples($pattern['patternResult'],$patternlist[$pattern['optionalTo']]['patternResult']); - unset($patternlist[$key]); - break; - } - else if(is_int($pattern['unionWith'])){ - $patternlist[$pattern['unionWith']]['hasUnion']--; - foreach($pattern['patternResult'] as $value) - array_push($patternlist[$pattern['unionWith']]['patternResult'],$value); - unset($patternlist[$key]); - break; - }else{ - if($joined[0]['patternResult'] == null){ - $joined[0]['patternResult'] = $pattern['patternResult']; - if($joined[0]['outerFilter'] == null ) - $joined[0]['outerFilter'] = $pattern['outerFilter']; - unset($patternlist[$key]); - break; - } - // if($pattern['patternResult'] !=null ){ - $joined[0]['patternResult'] = $this->joinTuples($joined[0]['patternResult'],$pattern['patternResult']); - $joined[0]['outerFilter'] = $pattern['outerFilter']; - unset($patternlist[$key]); - break; - // } - } - } - } - } - return $joined; - } - - /** - * Filters the pattern results. - * - * @param Array $patternlist list containing the results of the GraphPatterns - * @param boolean $outer TRUE if its an outer filter FALSE if not - * @return Array the filtered patternlist - */ - protected function filterPatterns($patternlist,$outer){ - if($outer) - $filter = 'outerFilter'; - else - $filter = 'innerFilter'; - foreach($patternlist as $patkey => $pattern){ - // get constraints - $constraint = $pattern[$filter]; - - if(count($constraint)>0){ - foreach($constraint as $constr){ - if($constr != null){ - // extract Vars and function calls - $evalString = $constr->getExpression(); - preg_match_all("/\?.[^\s\)\,]*/",$evalString,$vars); - preg_match_all("/bound\((.[^\)]*)\)/i",$evalString,$boundcalls); - preg_match_all("/isuri\((.[^\)]*)\)/i",$evalString,$isUricalls); - preg_match_all("/isblank\((.[^\)]*)\)/i",$evalString,$isBlankcalls); - preg_match_all("/isLiteral\((.[^\)]*)\)/i",$evalString,$isLiteralcalls); - preg_match_all("/lang\((.[^\)]*)\)/i",$evalString,$langcalls); - preg_match_all("/datatype\((.[^\)]*)\)/i",$evalString,$datatypecalls); - preg_match_all("/str\((.[^\)]*)\)/i",$evalString,$stringcalls); - - // is Bound - if(count($boundcalls[1])>0) - $function['bound'] = $boundcalls[1]; - else - $function['bound'] = false; - - // is URI - if(count($isUricalls[1])>0) - $function['isUri'] = $isUricalls[1]; - else - $function['isUri'] = false; - - // is Blank - if(count($isBlankcalls[1])>0) - $function['isBlank'] = $isBlankcalls[1]; - else - $function['isBlank'] = false; - - // is Literal - if(count($isLiteralcalls[1])>0) - $function['isLiteral'] = $isLiteralcalls[1]; - else - $function['isLiteral'] = false; - - // lang - if(count($langcalls[1])>0) - $function['lang'] = $langcalls[1]; - else - $function['lang'] = false; - - // datatype - if(count($datatypecalls[1])>0) - $function['datatype'] = $datatypecalls[1]; - else - $function['datatype'] = false; - - // string - if(count($stringcalls[1])>0) - $function['string'] = $stringcalls[1]; - else - $function['string'] = false; - - - foreach($pattern['patternResult'] as $key => $res){ - $result = false; - $evalString = $this->fillConstraintString($vars,$res,$constr,$function); - $evalString = '$result =('.$evalString.');'; - // evaluate Constraint - @eval($evalString); - - if(!$result) - unset($patternlist[$patkey]['patternResult'][$key]); - - } - } - } - } - } - return $patternlist; - } - - /** - * Builds an evaluation string to determine wether the result passes - * the filter or not. This string is evaluatet by the php buildin eval() function - * - * @param Array $vars a list which contains the used variables - * @param Array $res the result part which have to be evaluated - * @param Constraint $constraint the Constrain object - * @param Array $function an Array which contains the used functions - * @return String - */ - - protected function fillConstraintString($vars,$res,$constraint,$function){ - - $boundExpr = false; - $evalString = $constraint->getExpression(); - - // extract Literals - $pattern1 = "/\".[^\"]*\"[^\^\@]/"; - $pattern2 = "/\'.[^\']*\'[^\^\@]/"; - preg_match_all($pattern1,$evalString,$hits1); - preg_match_all($pattern2,$evalString,$hits2); - - foreach($hits1[0] as $k => $val){ - $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED1_'.$k++,$evalString,1); - } - foreach($hits2[0] as $k => $val){ - $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED2_'.$k++,$evalString,1); - } - - // replace namespaces - $prefs = $this->query->getPrefixes(); - foreach($prefs as $key => $val){ - if($key == '') - $key = ' '; - $evalString = preg_replace("/^(".$key."\:)(.[^\s]*)|([\s\(]?[^\^])(".$key."\:)(.[^\s\)]*)([\s\)]?)/","$3'<".$val."$2$5>'$6",$evalString); - - $evalString = preg_replace("/(\^)(".$key."\:)(.[^\s]*)/","$1<".$val."$3>",$evalString); - } - - $xsd = "http\:\/\/www.w3.org\/2001\/XMLSchema\#"; - - // evaluate bound calls - if($function['bound']){ - $boundExpr = true; - foreach($function['bound'] as $var){ - if(isset($res[$var]) && $res[$var]!=="") - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/bound\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isBlank calls - if($function['isBlank']){ - foreach($function['isBlank'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof BlankNode ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isBlank\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isLiteral calls - if($function['isLiteral']){ - foreach($function['isLiteral'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isLiteral\(\\".$var."\)/i",$replacement,$evalString); - } - - } - // evaluate isUri calls - if($function['isUri']){ - foreach($function['isUri'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Resource && $res[$var]->getUri() && !$res[$var] instanceof BlankNode ) - $replacement = 'true'; - else - $replacement = 'false'; - $evalString = preg_replace("/isUri\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate lang calls - if($function['lang']){ - foreach($function['lang'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getLanguage() ) - $replacement = '"'.$res[$var]->getLanguage().'"'; - else - $replacement = 'null'; - $evalString = preg_replace("/lang\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate datatype calls - if($function['datatype']){ - foreach($function['datatype'] as $var){ - if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getDatatype() ) - $replacement = '\'<'.$res[$var]->getDatatype().'>\''; - else - $replacement = 'false'; - $evalString = preg_replace("/datatype\(\\".$var."\)/i",$replacement,$evalString); - } - } - // evaluate string calls - if($function['string']){ - foreach($function['string'] as $var){ - if($var{0}=='?' || $var{0}=='$'){ - if(isset($res[$var]) && $res[$var]!==""){ - $replacement = "'str_".$res[$var]->getLabel()."'"; - if($res[$var] instanceof BlankNode) - $replacement = "''"; - }else{ - $replacement = 'false'; - } - $evalString = preg_replace("/str\(\\".$var."\)/i",$replacement,$evalString); - }else{ - if($var{0}=='<'){ - $evalString = preg_replace("/str\(\s*\<(.[^\>]*)\>\s*\)/i","'str_$1'",$evalString); - } - if($var{0}=='"'){ - $evalString = preg_replace("/str\(\s*\"(.[^\>]*)\"\@[a-z]*\s*\)/i","'str_$1'",$evalString); - } - } - - } - } - // evaluate VARS - foreach($vars[0] as $var){ - if(isset($res[$var])&&$res[$var]!== ""){ - //$replacement = "'".$res[$var]->getLabel()."'"; - $replacement = '" "'; - if($res[$var] instanceof Literal){ - if($res[$var]->getDatatype()!= null){ - if($res[$var]->getDatatype() == XML_SCHEMA.'boolean') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'double') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'integer') - $replacement = $res[$var]->getLabel(); - if($res[$var]->getDatatype() == XML_SCHEMA.'dateTime') - $replacement = strtotime($res[$var]->getLabel()); - }else{ - if($res[$var]->getLabel()=="") - $replacement = 'false'; - else - $replacement = "'str_".$res[$var]->getLabel()."'"; - } - }else{ - if($res[$var] instanceof Resource){ - $replacement = "'<".$res[$var]->getLabel().">'"; - } - } - $evalString = preg_replace("/\\".$var."/",$replacement,$evalString); - } - - // problem with PHP: false < 13 is true - if(isset($res[$var])){ - if($res[$var] === ""){ - if($boundExpr) - $evalString = preg_replace("/\\".$var."/","false",$evalString); - else - $evalString = 'false'; - } - }else{ - $evalString = preg_replace("/\\".$var."/","false",$evalString); - } - - } - - // replace '=' with '==' - $evalString = preg_replace("/(.[^\=])(\=)(.[^\=])/","$1==$3",$evalString); - - - // rewrite Literals - foreach($hits1[0] as $k => $val){ - $pattern = '/_REPLACED1_'.$k.'/'; - $evalString = preg_replace($pattern,$hits1[0][$k],$evalString,1); - } - - foreach($hits2[0] as $k => $val){ - $pattern = '/_REPLACED2_'.$k.'/'; - $evalString = preg_replace($pattern,$hits2[0][$k],$evalString,1); - } - - // replace xsd:boolean expressions - $pattern = $pattern = '/\"\s?true\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?true\s?\'\^\^xsd:boolean/'; - $evalString = preg_replace($pattern,"true",$evalString); - - $pattern = $pattern = '/\"\s?false\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?false\s?\'\^\^xsd:boolean/'; - $evalString = preg_replace($pattern,"false",$evalString); - - // replace xsd:date expressions - $pattern = "/\"(.[^\"]*)\"\^\^".$xsd."dateTime/"; - preg_match_all($pattern,$evalString,$hits); - - foreach($hits[1] as $dummy) - $evalString = preg_replace("/\".[^\"]*\"\^\^".$xsd."dateTime/",strtotime($dummy),$evalString,1); - - - $evalString = preg_replace("/(\'\<".$xsd."dateTime\()(.[^\)]*\))\>\'/","dateTime($2",$evalString); - - $evalString = preg_replace("/(\'\<".$xsd."integer\()(.[^\)]*\))\>\'/","integer($2",$evalString); - - // tag plain literals - $evalString = preg_replace("/\"(.[^\"]*)\"([^\^])|\"(.[^\"]*)\"$/","'str_$1$3'$2",$evalString); - - return $evalString; - } - - /** - * Sorts the results. - * - * @param Array $vartable List containing the unsorted result vars - * @return Array List containing the sorted result vars - */ - protected function sortVars($vartable) - { - $newTable = array(); - $mod = $this->query->getSolutionModifier(); - // if no ORDER BY solution modifier return vartable - if($mod['order by']!= null){ - $order = $mod['order by']; - $map = $this->buildVarmap($order,$vartable); - foreach($map as $val){ - $newTable[] = $vartable[$val]; - } - }else{ - $newTable = $vartable; - } - - if($mod['offset'] != null){ - $newTable = array_slice ($newTable, $mod['offset']); - } - if($mod['limit'] != null){ - $newTable = array_slice($newTable,0,$mod['limit']); - } - - return $newTable; - } - - /** - * Sorts the result table. - * - * @param String $order (ASC/DESC) - * @param Array $vartable the vartable - * @return Array A map that contains the new order of the result vars - */ - protected function buildVarmap($order, $vartable) - { - $n= 0; - $result = array(); - $num_var = array(); - foreach($order as $variable) - $num_var[$variable['val']] = 0; - - foreach($vartable as $k => $x){ - foreach($order as $value){ - // if the value is a typed Literal try to determine if it - // a numeric datatype - if($x[$value['val']] instanceof Literal){ - $dtype = $x[$value['val']]->getDatatype(); - if($dtype){ - switch($dtype){ - case XML_SCHEMA."integer": - $num_var[$value['val']]++; - break; - case XML_SCHEMA."double": - $num_var[$value['val']]++; - break; - - } - } - } - if($x[$value['val']]){ - if($x[$value['val']]instanceof Literal){ - $pref = "2"; - } - if($x[$value['val']]instanceof Resource){ - $pref = "1"; - } - if($x[$value['val']]instanceof BlankNode){ - $pref = "0"; - } - $result[$value['val']][$n] = $pref.$x[$value['val']]->getLabel(); - }else{ - $result[$value['val']][$n] = ""; - } - } - $result['oldKey'][$n] = $k; - $n++; - } - $sortString = ""; - foreach($order as $value){ - if($num_var[$value['val']] == $n) - $sort = SORT_NUMERIC; - else - $sort = SORT_STRING; - - if($value['type'] == 'asc') - $type = SORT_ASC; - else - $type = SORT_DESC; - - $sortString = $sortString.'$result["'.$value['val'].'"],'.$type.','.$sort.','; - } - $sortString = "array_multisort(".$sortString.'$result["oldKey"]);'; - - @eval($sortString); - return $result['oldKey']; - } - - - - /** - * Eliminates duplicate results. - * - * @param Array $vartable a table that contains the result vars and their bindings - * @return Array the result table without duplicate results - */ - protected function distinct($vartable) - { - $index = array(); - foreach($vartable as $key => $value){ - $key_index=""; - foreach($value as $k => $v) - if($v instanceof Object) - $key_index = $key_index.$k.$v->toString(); - if(isset($index[$key_index])) - unset($vartable[$key]); - else - $index[$key_index]= 1; - } - return $vartable; - } - - - /** - * Prints a query result as HTML table. - * You can change the colors in the configuration file. - * - * @param array $queryResult [][?VARNAME] = object Node - * @return void - */ - public function writeQueryResultAsHtmlTable($queryResult) { - // Import Package Utility - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - if ( $queryResult[0] == null) { - echo 'no match
'; - return; - } - if ( $queryResult == 'false') { - echo 'boolean: false
'; - return; - } - if ( $queryResult == 'true') { - echo 'boolean: true
'; - return; - } - - - echo ''; - foreach ($queryResult[0] as $varName => $value) - echo ""; - echo ''; - - foreach ($queryResult as $n => $var) { - - - echo ''; - foreach ($var as $varName => $value) { - if($value !=''){ - echo INDENTATION . INDENTATION . ''; - } - echo '
No.$varName
' .($n + 1) .'.'; - echo '

'; - - $lang = NULL; - $dtype = NULL; - if (is_a($value, 'Literal')) { - if ($value->getLanguage() != NULL) - $lang = ' (xml:lang="' . $value->getLanguage() . '") '; - if ($value->getDatatype() != NULL) - $dtype = ' (rdf:datatype="' . $value->getDatatype() . '") '; - } - echo RDFUtil::getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'

'; - }else{ - echo "
unbound"; - } - } - echo '
'; - } - - - - /* - * Dumb getters - */ - - - - public function getQuery() - { - return $this->query; - }//public function getQuery() - - - - public function getDataset() - { - return $this->dataset; - }//public function getDataset() - -} // end: Class SparqlEngine - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/all-wcprops deleted file mode 100755 index 9e9e0117..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/484/trunk/rdfapi-php/api/sparql/SparqlEngine -END -ResultRenderer.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer.php -END -ResultConverter.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/484/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultConverter.php -END -PreparedStatement.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/PreparedStatement.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/entries deleted file mode 100755 index d1915baf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/entries +++ /dev/null @@ -1,70 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/sparql/SparqlEngine -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-08-12T11:33:13.029340Z -484 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ResultRenderer -dir - -ResultRenderer.php -file - - - - -2008-02-29T14:57:45.475578Z -3931687e275d501be758875979380b0f -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -ResultConverter.php -file - - - - -2008-02-29T14:57:45.475578Z -ad3a44eccfa94ffb613bc7274648b2ad -2007-08-12T11:33:13.029340Z -484 -cweiske -has-props - -PreparedStatement.php -file - - - - -2008-02-29T14:57:45.491199Z -4dd6460f65bfabc61f5af876f45fc164 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/PreparedStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/PreparedStatement.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/PreparedStatement.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultConverter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultConverter.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultConverter.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultRenderer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultRenderer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/prop-base/ResultRenderer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/PreparedStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/PreparedStatement.php.svn-base deleted file mode 100755 index eeac1b0c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/PreparedStatement.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultConverter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultConverter.php.svn-base deleted file mode 100755 index 42cdedf2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultConverter.php.svn-base +++ /dev/null @@ -1,115 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultConverter -{ - /** - * Determines the correct renderer and calls it. - * - * The $resultform may be: - * - false: The default renderer is taken then - * - an object that implements SparqlEngine_ResultRenderer interface - * - a string like "HTML" or "XML". The appropriate renderer is used then. - * - a full class name, e.g. SparqlEngine_ResultRenderer_XML - * - * @param array $arVartable Variable table - * @param SparqlEngine $engine Sparql database engine. - * @param mixed $resultform Which format the results shall be in (false or "xml") - * - * @return mixed Most likely an array or a boolean value, - * or anything else as determined by $resultform - */ - public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false) - { - if (is_object($resultform)) { - if ($resultform instanceof SparqlEngine_ResultRenderer) { - return $resultform->convertFromResult( - $arVartable, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer object needs to implement' - . ' SparqlEngine_ResultRenderer interface' - ); - } - } - - if ($resultform === false) { - $resultform = 'Default'; - } else if ($resultform == 'xml') { - //kept for BC reasons - $resultform = 'XML'; - } - - if ($strClass = self::loadClass($resultform)) { - $rrObj = new $strClass(); - if ($rrObj instanceof SparqlEngine_ResultRenderer) { - return $rrObj->convertFromResult( - $arVartable, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer class "' . $strClass . '" needs to implement' - . ' SparqlEngine_ResultRenderer interface' - ); - } - } else { - throw new Exception( - 'Result renderer class "' . $resultform . '" could not be loaded.' - ); - } - }//public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false) - - - - /** - * Tries to load a given class if it doesn't exist, - * and returns true if the class can be used. - * - * @param string $strClass Classname - * @return mixed Class name if the class is loaded and can be used, false if not. - */ - protected static function loadClass($strClass) - { - if (class_exists($strClass, false)) { - return $strClass; - } - - //RAP style, shortcut notation - $strFile = 'SparqlEngine/ResultRenderer/' . $strClass . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngine_ResultRenderer_' . $strClass, false)) { - return 'SparqlEngine_ResultRenderer_' . $strClass; - } - - //RAP style - $strFile = str_replace('_', '/', $strClass) . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - //PEAR style - @include_once $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - return false; - }//protected static function loadClass($strClass) - -}//class SparqlEngine_ResultConverter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultRenderer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultRenderer.php.svn-base deleted file mode 100755 index f22afd0c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/.svn/text-base/ResultRenderer.php.svn-base +++ /dev/null @@ -1,29 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -interface SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine); - -}//interface SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/PreparedStatement.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/PreparedStatement.php deleted file mode 100755 index 37a97a78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/PreparedStatement.php +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultConverter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultConverter.php deleted file mode 100755 index f08d3567..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultConverter.php +++ /dev/null @@ -1,115 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultConverter -{ - /** - * Determines the correct renderer and calls it. - * - * The $resultform may be: - * - false: The default renderer is taken then - * - an object that implements SparqlEngine_ResultRenderer interface - * - a string like "HTML" or "XML". The appropriate renderer is used then. - * - a full class name, e.g. SparqlEngine_ResultRenderer_XML - * - * @param array $arVartable Variable table - * @param SparqlEngine $engine Sparql database engine. - * @param mixed $resultform Which format the results shall be in (false or "xml") - * - * @return mixed Most likely an array or a boolean value, - * or anything else as determined by $resultform - */ - public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false) - { - if (is_object($resultform)) { - if ($resultform instanceof SparqlEngine_ResultRenderer) { - return $resultform->convertFromResult( - $arVartable, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer object needs to implement' - . ' SparqlEngine_ResultRenderer interface' - ); - } - } - - if ($resultform === false) { - $resultform = 'Default'; - } else if ($resultform == 'xml') { - //kept for BC reasons - $resultform = 'XML'; - } - - if ($strClass = self::loadClass($resultform)) { - $rrObj = new $strClass(); - if ($rrObj instanceof SparqlEngine_ResultRenderer) { - return $rrObj->convertFromResult( - $arVartable, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer class "' . $strClass . '" needs to implement' - . ' SparqlEngine_ResultRenderer interface' - ); - } - } else { - throw new Exception( - 'Result renderer class "' . $resultform . '" could not be loaded.' - ); - } - }//public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false) - - - - /** - * Tries to load a given class if it doesn't exist, - * and returns true if the class can be used. - * - * @param string $strClass Classname - * @return mixed Class name if the class is loaded and can be used, false if not. - */ - protected static function loadClass($strClass) - { - if (class_exists($strClass, false)) { - return $strClass; - } - - //RAP style, shortcut notation - $strFile = 'SparqlEngine/ResultRenderer/' . $strClass . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngine_ResultRenderer_' . $strClass, false)) { - return 'SparqlEngine_ResultRenderer_' . $strClass; - } - - //RAP style - $strFile = str_replace('_', '/', $strClass) . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - //PEAR style - @include_once $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - return false; - }//protected static function loadClass($strClass) - -}//class SparqlEngine_ResultConverter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer.php deleted file mode 100755 index 8d7efb6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer.php +++ /dev/null @@ -1,29 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -interface SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine); - -}//interface SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/all-wcprops deleted file mode 100755 index 4fa0b95a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer -END -XML.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer/XML.php -END -Default.php -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer/Default.php -END -HTML.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer/HTML.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/entries deleted file mode 100755 index 997b67a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/entries +++ /dev/null @@ -1,67 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/sparql/SparqlEngine/ResultRenderer -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-27T16:47:57.067358Z -465 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -XML.php -file - - - - -2008-02-29T14:57:45.397475Z -560f228f1283b4826f59cf509940fd35 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -Default.php -file - - - - -2008-02-29T14:57:45.397475Z -4eb871818f0a7e8db82d5e1977048119 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -HTML.php -file - - - - -2008-02-29T14:57:45.413096Z -3a8f82e43f05fbf5ba22ab4d48886248 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/Default.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/Default.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/Default.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/HTML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/HTML.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/HTML.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/XML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/XML.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/prop-base/XML.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/Default.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/Default.php.svn-base deleted file mode 100755 index 7f2860a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/Default.php.svn-base +++ /dev/null @@ -1,262 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return mixed Most likely an array - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - $result = false; - $qrf = $this->query->getResultForm(); - - if ($arVartable != null) { - switch ($qrf) { - case 'ask': - if (count($arVartable) > 0) { - $result = true; - } else { - $result = false; - } - break; - case 'count': - $result = count($arVartable); - break; - case 'construct': - $result = $this->constructGraph( - $arVartable, - $this->query->getConstructPattern() - ); - break; - case 'describe': - $result = $this->describeGraph($arVartable); - break; - default: - $result = $arVartable; - break; - } - } else if ($qrf == 'describe'){ - $result = $this->describeGraph(null); - } else if ($qrf == 'construct'){ - $result = $this->constructGraph( - false, - $this->query->getConstructPattern() - ); - } - - return $result; - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//function constructGraph($arVartable, $constructPattern) - - - - /** - * Builds a describing named graph. To define an attribute list for a - * several rdf:type look at constants.php - * - * @param array $arVartable - * @return MemModel - */ - function describeGraph($arVartable) - { - // build empty named graph - $resultGraph = new MemModel(); - // if no where clause fill $arVartable - $vars = $this->query->getResultVars(); - if ($arVartable == null) { - if ($vars) { - $arVartable[0] = array('?x' => new Resource(substr($vars[0],1,-1))); - $vars[0] = '?x'; - } - } - // fetch attribute list from constants.php - global $sparql_describe; - // for each resultset - foreach ($arVartable as $resultset) { - foreach ($vars as $varname) { - $varvalue = $resultset[$varname]; - // try to determine rdf:type of the variable - $type = $this->_determineType($varvalue, $resultGraph); - // search attribute list defined in constants.php - $list = null; - if ($type) { - $strLuri = strtolower($type->getUri()); - if (isset($sparql_describe[$strLuri])) { - $list = $sparql_describe[$strLuri] ; - } - } - // search in dataset - $this->_getAttributes($list, $resultGraph, $varvalue); - } - } - - return $resultGraph; - }//function describeGraph($arVartable) - - - - /** - * Tries to determine the rdf:type of the variable. - * - * @param Node $var The variable - * @param MemModel $resultGraph The result graph which describes the Resource - * @return String Uri of the rdf:type - */ - protected function _determineType($var, $resultGraph) - { - $type = null; - // find in namedGraphs - if (!$var instanceof Literal) { - $iter = $this->dataset->findInNamedGraphs( - null, - $var, - new Resource(RDF_NAMESPACE_URI.'type'), - null, - true - ); - while ($iter->valid()) { - $statement = $iter->current(); - $type = $statement->getObject(); - $resultGraph->add($iter->current()); - break; - } - } - // if no type information found find in default graph - if (!$type) { - if (!$var instanceof Literal) { - $iter1 = $this->dataset->findInDefaultGraph( - $var, - new Resource(RDF_NAMESPACE_URI.'type'), - null - ); - $type = null; - while ($iter1->valid()) { - $statement = $iter1->current(); - $type = $statement->getObject(); - $resultGraph->add($iter1->current()); - break; - } - } - } - return $type; - }//protected function _determineType($var, $resultGraph) - - - - /** - * Search the attributes listed in $list in the dataset. - * Modifies $resultGraph - * - * @param Array $list List containing the attributes - * @param MemModel $resultGraph The result graph which describes the Resource - * @return void - */ - protected function _getAttributes($list, $resultGraph, $varvalue) - { - if ($list){ - foreach ($list as $attribute) { - if (!$varvalue instanceof Literal) { - $iter2 = $this->dataset->findInNamedGraphs( - null, - $varvalue, - new Resource($attribute), - null, - true - ); - while ($iter2->valid()) { - $resultGraph->add($iter2->current()); - $iter2->next(); - } - $iter3 = $this->dataset->findInDefaultGraph( - $varvalue, - new Resource($attribute), - null - ); - while ($iter3->valid()) { - $resultGraph->add($iter3->current()); - $iter3->next(); - } - } - } - } - }//protected function _getAttributes($list, $resultGraph, $varvalue) - - -}//class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/HTML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/HTML.php.svn-base deleted file mode 100755 index ae5946a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/HTML.php.svn-base +++ /dev/null @@ -1,199 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer -{ - /** - * If the result HTML should be wrapped in a div - * @var boolean - */ - protected $bWrap = true; - - - - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return string HTML result - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createTableFromRecords($arVartable); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are currently not supported by the' - . ' HTML renderer' - ); - - case 'count': - case 'ask': - $nCount = count($arVartable); - - if ($strResultForm == 'ask') { - $strCode = 'There were results.'; - } else { - $strCode = 'There are ' . $nCount . ' results.'; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - protected function wrapCode($strCode) - { - if (!$this->bWrap) { - return $strCode; - } - - return - '

' . "\n" - . $strCode . "\n" - . "
\n"; - }//protected function wrapCode($strCode) - - - - protected function createTableFromRecords($arVartable) - { - if (count($arVartable) == 0) { - return 'No result rows.'; - } - - $arResult = array(); - foreach ($arVartable as $row) { - $arResultRow = array(); - foreach ($row as $strVarName => $value) { - $arResultRow[$strVarName] = $this->createValue($value); - } - $arResult[] = $arResultRow; - } - - //I always wanted to to this :) - return - "\n" - . " \n" - . " \n" - . " \n " - . implode( - "\n ", - array_map( - create_function( - '$ar', - 'return implode("", $ar);' - ), - $arResult - ) - ) - . "\n \n" - . "
SPARQL result with " . count($arResult) . " rows
" - . implode('', array_keys(reset($arResult))) - . "
\n"; - }//protected function createTableFromRecords($arRecordSets) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createValue($value) - { - if ($value === null) { - $strCode = $this->getHtmlNull(); - } - if ($value instanceof Literal) { - $strCode = $this->getHtmlLiteral( - $value->getLabel(), - $value->getLanguage(), - $value->getDatatype() - ); - } else if ($value instanceof Resource) { - $strCode = $this->getHtmlResource($value->getURI()); - } else { - $strCode = $this->getHtmlBlank(); - } - - return '' - . $strCode - . ''; - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - protected function getHtmlNull() - { - return '
NULL
'; - }//protected function getHtmlNull() - - - - protected function getHtmlBlank($value) - { - return 'Blank node'; - }//protected function getHtmlBlank($value) - - - - protected function getHtmlResource($value) - { - return htmlspecialchars($value); - }//protected function getHtmlResource($value) - - - - protected function getHtmlLiteral($value, $language, $datatype) - { - $strCode = htmlspecialchars($value); - if ($language) { - $strCode .= '
  xml:lang=' . $language; - } - if ($datatype) { - $strCode .= '
  rdf:type=' . $datatype; - } - return $strCode; - }//protected function getHtmlLiteral($value, $language, $datatype) - -}//class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/XML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/XML.php.svn-base deleted file mode 100755 index 4982367d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/.svn/text-base/XML.php.svn-base +++ /dev/null @@ -1,125 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return string XML result - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - if ($arVartable instanceof NamedGraphMem) { - return $arVartable->writeRdfToString(); - } - - $result = ''; - $header = ''; - - // build header - if (is_array($arVartable)) { - $vars = $this->query->getResultVars(); - $header = ''; - foreach ($vars as $value) { - $header = $header - . ''; - } - $header = $header . ''; - - // build results - $solm = $this->query->getSolutionModifier(); - $sel = $this->query->getResultForm(); - - $distinct = 'false'; - if ($sel == 'select distinct') { - $distinct = 'true'; - } - - $ordered = 'false'; - if ($solm['order by'] != 0) { - $ordered = 'true'; - } - - $results = ''; - foreach ($arVartable as $value) { - $results = $results.''; - foreach ($value as $varname => $varvalue) { - $results = $results - . $this->_getBindingString( - substr($varname, 1), - $varvalue - ); - } - $results = $results . ''; - } - $results = $results . ''; - } else { - $results = '' . $vartable . ''; - } - - $result = $result . $header . $results . ''; - $result = simplexml_load_string($result); - return $result->asXML(); - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - /** - * Helper Function for function buildXmlResult($vartable). Generates - * an xml string for a single variable an their corresponding value. - * - * @param String $varname The variables name - * @param Node $varvalue The value of the variable - * @return String The xml string - */ - protected function _getBindingString($varname, $varvalue) - { - $binding = ''; - $value = ''; - - if ($varvalue instanceof BlankNode) { - $value = '' . $varvalue->getLabel() . ''; - } else if ($varvalue instanceof Resource) { - $value = '' . $varvalue->getUri() . ''; - } else if ($varvalue instanceof Literal) { - $label = htmlspecialchars($varvalue->getLabel()); - $value = ''.$label.''; - if ($varvalue->getDatatype() != null) { - $value = '' - . $label - . ''; - } - if ($varvalue->getLanguage() != null) { - $value = '' - . $label - . ''; - } - } - $binding = $binding . $value . ''; - - return $binding; - }//protected function _getBindingString($varname, $varvalue) - -}//class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/Default.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/Default.php deleted file mode 100755 index 5ced9ccb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/Default.php +++ /dev/null @@ -1,262 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return mixed Most likely an array - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - $result = false; - $qrf = $this->query->getResultForm(); - - if ($arVartable != null) { - switch ($qrf) { - case 'ask': - if (count($arVartable) > 0) { - $result = true; - } else { - $result = false; - } - break; - case 'count': - $result = count($arVartable); - break; - case 'construct': - $result = $this->constructGraph( - $arVartable, - $this->query->getConstructPattern() - ); - break; - case 'describe': - $result = $this->describeGraph($arVartable); - break; - default: - $result = $arVartable; - break; - } - } else if ($qrf == 'describe'){ - $result = $this->describeGraph(null); - } else if ($qrf == 'construct'){ - $result = $this->constructGraph( - false, - $this->query->getConstructPattern() - ); - } - - return $result; - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//function constructGraph($arVartable, $constructPattern) - - - - /** - * Builds a describing named graph. To define an attribute list for a - * several rdf:type look at constants.php - * - * @param array $arVartable - * @return MemModel - */ - function describeGraph($arVartable) - { - // build empty named graph - $resultGraph = new MemModel(); - // if no where clause fill $arVartable - $vars = $this->query->getResultVars(); - if ($arVartable == null) { - if ($vars) { - $arVartable[0] = array('?x' => new Resource(substr($vars[0],1,-1))); - $vars[0] = '?x'; - } - } - // fetch attribute list from constants.php - global $sparql_describe; - // for each resultset - foreach ($arVartable as $resultset) { - foreach ($vars as $varname) { - $varvalue = $resultset[$varname]; - // try to determine rdf:type of the variable - $type = $this->_determineType($varvalue, $resultGraph); - // search attribute list defined in constants.php - $list = null; - if ($type) { - $strLuri = strtolower($type->getUri()); - if (isset($sparql_describe[$strLuri])) { - $list = $sparql_describe[$strLuri] ; - } - } - // search in dataset - $this->_getAttributes($list, $resultGraph, $varvalue); - } - } - - return $resultGraph; - }//function describeGraph($arVartable) - - - - /** - * Tries to determine the rdf:type of the variable. - * - * @param Node $var The variable - * @param MemModel $resultGraph The result graph which describes the Resource - * @return String Uri of the rdf:type - */ - protected function _determineType($var, $resultGraph) - { - $type = null; - // find in namedGraphs - if (!$var instanceof Literal) { - $iter = $this->dataset->findInNamedGraphs( - null, - $var, - new Resource(RDF_NAMESPACE_URI.'type'), - null, - true - ); - while ($iter->valid()) { - $statement = $iter->current(); - $type = $statement->getObject(); - $resultGraph->add($iter->current()); - break; - } - } - // if no type information found find in default graph - if (!$type) { - if (!$var instanceof Literal) { - $iter1 = $this->dataset->findInDefaultGraph( - $var, - new Resource(RDF_NAMESPACE_URI.'type'), - null - ); - $type = null; - while ($iter1->valid()) { - $statement = $iter1->current(); - $type = $statement->getObject(); - $resultGraph->add($iter1->current()); - break; - } - } - } - return $type; - }//protected function _determineType($var, $resultGraph) - - - - /** - * Search the attributes listed in $list in the dataset. - * Modifies $resultGraph - * - * @param Array $list List containing the attributes - * @param MemModel $resultGraph The result graph which describes the Resource - * @return void - */ - protected function _getAttributes($list, $resultGraph, $varvalue) - { - if ($list){ - foreach ($list as $attribute) { - if (!$varvalue instanceof Literal) { - $iter2 = $this->dataset->findInNamedGraphs( - null, - $varvalue, - new Resource($attribute), - null, - true - ); - while ($iter2->valid()) { - $resultGraph->add($iter2->current()); - $iter2->next(); - } - $iter3 = $this->dataset->findInDefaultGraph( - $varvalue, - new Resource($attribute), - null - ); - while ($iter3->valid()) { - $resultGraph->add($iter3->current()); - $iter3->next(); - } - } - } - } - }//protected function _getAttributes($list, $resultGraph, $varvalue) - - -}//class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/HTML.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/HTML.php deleted file mode 100755 index 2741f227..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/HTML.php +++ /dev/null @@ -1,199 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer -{ - /** - * If the result HTML should be wrapped in a div - * @var boolean - */ - protected $bWrap = true; - - - - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return string HTML result - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createTableFromRecords($arVartable); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are currently not supported by the' - . ' HTML renderer' - ); - - case 'count': - case 'ask': - $nCount = count($arVartable); - - if ($strResultForm == 'ask') { - $strCode = 'There were results.'; - } else { - $strCode = 'There are ' . $nCount . ' results.'; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - protected function wrapCode($strCode) - { - if (!$this->bWrap) { - return $strCode; - } - - return - '
' . "\n" - . $strCode . "\n" - . "
\n"; - }//protected function wrapCode($strCode) - - - - protected function createTableFromRecords($arVartable) - { - if (count($arVartable) == 0) { - return 'No result rows.'; - } - - $arResult = array(); - foreach ($arVartable as $row) { - $arResultRow = array(); - foreach ($row as $strVarName => $value) { - $arResultRow[$strVarName] = $this->createValue($value); - } - $arResult[] = $arResultRow; - } - - //I always wanted to to this :) - return - "\n" - . " \n" - . " \n" - . " \n " - . implode( - "\n ", - array_map( - create_function( - '$ar', - 'return implode("", $ar);' - ), - $arResult - ) - ) - . "\n \n" - . "
SPARQL result with " . count($arResult) . " rows
" - . implode('', array_keys(reset($arResult))) - . "
\n"; - }//protected function createTableFromRecords($arRecordSets) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createValue($value) - { - if ($value === null) { - $strCode = $this->getHtmlNull(); - } - if ($value instanceof Literal) { - $strCode = $this->getHtmlLiteral( - $value->getLabel(), - $value->getLanguage(), - $value->getDatatype() - ); - } else if ($value instanceof Resource) { - $strCode = $this->getHtmlResource($value->getURI()); - } else { - $strCode = $this->getHtmlBlank(); - } - - return '' - . $strCode - . ''; - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - protected function getHtmlNull() - { - return '
NULL
'; - }//protected function getHtmlNull() - - - - protected function getHtmlBlank($value) - { - return 'Blank node'; - }//protected function getHtmlBlank($value) - - - - protected function getHtmlResource($value) - { - return htmlspecialchars($value); - }//protected function getHtmlResource($value) - - - - protected function getHtmlLiteral($value, $language, $datatype) - { - $strCode = htmlspecialchars($value); - if ($language) { - $strCode .= '
  xml:lang=' . $language; - } - if ($datatype) { - $strCode .= '
  rdf:type=' . $datatype; - } - return $strCode; - }//protected function getHtmlLiteral($value, $language, $datatype) - -}//class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/XML.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/XML.php deleted file mode 100755 index 9bbef27b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngine/ResultRenderer/XML.php +++ /dev/null @@ -1,125 +0,0 @@ - -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer -{ - /** - * Converts the database results into the output format - * and returns the result. - * - * @param array $arVartable Variable table - * @param Query $query SPARQL query object - * @param SparqlEngine $engine Sparql Engine to query the database - * @return string XML result - */ - public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->dataset = $engine->getDataset(); - - if ($arVartable instanceof NamedGraphMem) { - return $arVartable->writeRdfToString(); - } - - $result = ''; - $header = ''; - - // build header - if (is_array($arVartable)) { - $vars = $this->query->getResultVars(); - $header = ''; - foreach ($vars as $value) { - $header = $header - . ''; - } - $header = $header . ''; - - // build results - $solm = $this->query->getSolutionModifier(); - $sel = $this->query->getResultForm(); - - $distinct = 'false'; - if ($sel == 'select distinct') { - $distinct = 'true'; - } - - $ordered = 'false'; - if ($solm['order by'] != 0) { - $ordered = 'true'; - } - - $results = ''; - foreach ($arVartable as $value) { - $results = $results.''; - foreach ($value as $varname => $varvalue) { - $results = $results - . $this->_getBindingString( - substr($varname, 1), - $varvalue - ); - } - $results = $results . ''; - } - $results = $results . ''; - } else { - $results = '' . $vartable . ''; - } - - $result = $result . $header . $results . ''; - $result = simplexml_load_string($result); - return $result->asXML(); - }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine) - - - - /** - * Helper Function for function buildXmlResult($vartable). Generates - * an xml string for a single variable an their corresponding value. - * - * @param String $varname The variables name - * @param Node $varvalue The value of the variable - * @return String The xml string - */ - protected function _getBindingString($varname, $varvalue) - { - $binding = ''; - $value = ''; - - if ($varvalue instanceof BlankNode) { - $value = '' . $varvalue->getLabel() . ''; - } else if ($varvalue instanceof Resource) { - $value = '' . $varvalue->getUri() . ''; - } else if ($varvalue instanceof Literal) { - $label = htmlspecialchars($varvalue->getLabel()); - $value = ''.$label.''; - if ($varvalue->getDatatype() != null) { - $value = '' - . $label - . ''; - } - if ($varvalue->getLanguage() != null) { - $value = '' - . $label - . ''; - } - } - $binding = $binding . $value . ''; - - return $binding; - }//protected function _getBindingString($varname, $varvalue) - -}//class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb.php deleted file mode 100755 index 4e7050d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb.php +++ /dev/null @@ -1,391 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb -{ - /** - * Sparql Query object. - * - * @var Query - */ - protected $query; - - /** - * RDF dataset object. - * @var Dataset - */ - protected $dataset; - - /** - * Database connection object. - * @var ADOConnection - */ - protected $dbConn; - - /** - * Internal ID for our graph model. - * Stored in the database along the statements. - * Can be of different types: - * - array: array of modelIds - * - null: all models - * - * @var array OR null - */ - protected $arModelIds; - - /** - * Prepared SQL statements are stored in here. - * @var array - */ - protected $arPrepared = null; - - /** - * If the prepared statement is really prepared, or if we just emulate it. - * @var boolean - */ - protected $bRealPrepared = false; - - /** - * SQL generator instance - * @var SparqlEngineDb_SqlGenerator - */ - protected $sg = null; - - /** - * Type sorting instance - * @var SparqlEngineDb_TypeSorter - */ - protected $ts = null; - - /** - * Prepared statments preparator instance - * @var SparqlEngineDb_Preparator - */ - protected $pr = null; - - - - /** - * Use SparqlEngine::factory() to create the instance - * - * @param mixed $model DbModel or DbStore - * @param mixed $arModelIds Array of modelIds, or NULL to use all models - */ - public function __construct($model, $arModelIds = null) - { - //parent::__construct(); - if ($model instanceof DbModel) { - $this->dbConn = $model->getDbConn(); - $this->arModelIds = array($model->getModelID()); - } else if ($model instanceof DbStore) { - $this->dbConn = $model->getDbConn(); - $this->arModelIds = $arModelIds; - } - }//public function __construct(DbModel $model, $arModelIds = null) - - - - /** - * Query the database with the given SPARQL query. - * - * - * @param Dataset $dataset RDF Dataset - * @param Query $query Parsed SPARQL query - * @param string $resultform Result form. If set to 'xml' the result will be - * SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ . - * - * @return array/string array of triple arrays, or XML. Format depends on - * $resultform parameter. - */ - public function queryModel($dataset, Query $query, $resultform = false) - { - if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) { - echo "\n" . 'SPARQL query: ' . $query->getQueryString() . "\n"; - } - - $this->query = $query; - $this->dataset = $dataset; - - $qsimp = new SparqlEngineDb_QuerySimplifier(); - $qsimp->simplify($this->query); - - $this->sg = new SparqlEngineDb_SqlGenerator ($this->query, $this->dbConn, $this->arModelIds); - $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this); - $this->ts = new SparqlEngineDb_TypeSorter ($this->query, $this->dbConn); - - $this->setOptions(); - - if ($this->query->isEmpty()){ - $vartable[0]['patternResult'] = null; - return $this->returnResult($vartable, $resultform); - } - - - $arSqls = $this->sg->createSql(); - $this->ts->setData($this->sg); - - return - SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->queryMultiple( - $this->ts->getOrderifiedSqls( - $arSqls - ) - ), - $this, - $resultform - ); - }//public function queryModel($dataset, Query $query, $resultform = false) - - - - /** - * Create a prepared statement that can be executed later. - * - * @param Dataset $dataset RDF Dataset - * @param Query $query Parsed SPARQL query - * - * @return SparqlEngineDb_PreparedStatement Prepared statment that can - * be execute()d later. - */ - public function prepare(Dataset $dataset, Query $query) - { - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/PreparedStatement.php'; - require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/Preparator.php'; - - $this->query = $query; - $this->dataset = $dataset; - $this->sg = new SparqlEngineDb_SqlGenerator ($this->query, $this->dbConn, $this->arModelIds); - $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this); - $this->ts = new SparqlEngineDb_TypeSorter ($this->query, $this->dbConn); - $this->pr = new SparqlEngineDb_Preparator ($this->query, $this->dbConn); - - $this->arPrepared = $this->sg->createSql(); - $this->ts->setData($this->sg); - - if ($this->ts->willBeDataDependent()) { - $this->bRealPrepared = false; - } else { - $this->bRealPrepared = true; - list($strSelect, $strFrom, $strWhere) = $this->arPrepared; - $this->arPreparedQueries = $this->ts->getOrderifiedSqls( - $strSelect, - $strFrom, - $strWhere - ); - $this->arDbStatements = $this->pr->prepareInDb( - $this->arPreparedQueries, - $this->sg->getPlaceholders() - ); - } - - - return new SparqlEngineDb_PreparedStatement( - $this - ); - }//public function prepare(Dataset $dataset, Query $query) - - - - /** - * Execute a prepared statement by filling it with variables - * - * @param array $arVariables Array with (variable name => value) pairs - * @param string $resultform Which form the result should have - * - * @return mixed Result according to $resultform - */ - public function execute($arVariables, $resultform = false) - { - if ($this->arPrepared === null) { - throw new Exception('You need to prepare() the query first.'); - } - - if ($this->bRealPrepared) { - return - SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->pr->execute( - $this->arDbStatements, - $arVariables - ), - $this, - $resultform - ); - } else { - list($strSelect, $strFrom, $strWhere) = $this->arPrepared; - - return SparqlEngineDb_ResultConverter::convertFromDbResults( - $this->queryMultiple( - $this->ts->getOrderifiedSqls( - $strSelect, - $strFrom, - $this->pr->replacePlaceholdersWithVariables( - $strWhere, - $this->sg->getPlaceholders(), - $arVariables - ) - ) - ), - $this, - $resultform - ); - } - }//public function execute($arVariables, $resultform) - - - - /** - * Executes multiple SQL queries and returns an array - * of results. - * - * @param array $arSqls Array of SQL queries - * @return array Array of query results - */ - protected function queryMultiple($arSqls) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['limit'] === null && $arSM['offset'] === null) { - $nOffset = 0; - $nLimit = null; - $nSql = 0; - } else { - $offsetter = new SparqlEngineDb_Offsetter($this->dbConn, $this->query); - list($nSql, $nOffset) = $offsetter->determineOffset($arSqls); - $nLimit = $arSM['limit']; - } - - $nCount = 0; - $arResults = array(); - foreach ($arSqls as $nId => $arSql) { - if ($nId < $nSql) { continue; } - - if ($nLimit != null) { - $nCurrentLimit = $nLimit - $nCount; - } else { - $nCurrentLimit = null; - } - - $dbResult = $this->queryDb($arSql, $nOffset, $nCurrentLimit); - $nCount += $dbResult->RowCount(); - $arResults[] = $dbResult; - $nOffset = 0; - if ($nLimit !== null && $nCount >= $nLimit) { - break; - } - } - - return $arResults; - //return array_map(array($this, 'queryDb'), $arSql); - }//protected function queryMultiple($arSql) - - - - /** - * Sends the sql to the database and returns the results. - * - * @internal Switches between ADOConnection::Execute() and - * ADOConnection::SelectLimit() depending on the $query parameter's - * $solutionModifier "limit" and "offset" settings. - * Uses $query variable. - * - * @param array $arSql Array that gets a SQL query string once imploded - * - * @return mixed Anything ADOConnection::Execute() may return - * @throws Exception If Database query does not work - */ - function queryDb($arSql, $nOffset, $nLimit) - { - $strSql = SparqlEngineDb_SqlMerger::getSelect($this->query, $arSql); - - if ($strSql == '()') { - return new ADORecordSet(false); - } - - // I want associative arrays. - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - - if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) { - echo 'SQL query: ' . $strSql . "\n"; - } - - if ($nLimit === null && $nOffset == 0) { - $ret = $this->dbConn->execute($strSql); - } else if ($nLimit === null) { - $ret = $this->dbConn->SelectLimit($strSql, -1, $nOffset); - } else { - $ret = $this->dbConn->SelectLimit($strSql, $nLimit, $nOffset); - } - - //... but others maybe not - $this->dbConn->SetFetchMode($oldmode); - - if (!$ret) { - //Error occured - throw new Exception( - 'ADOdb error: ' . $this->dbConn->ErrorMsg() . "\n" - . $strSql - ); - } - - return $ret; - }//function queryDb($sql) - - - - /** - * Set options to subobjects like SqlGenerator - */ - protected function setOptions() - { - //allow changing the statements' table name - if (isset($GLOBALS['RAP']['conf']['database']['tblStatements'])) { - $this->sg->setStatementsTable( - $GLOBALS['RAP']['conf']['database']['tblStatements'] - ); - } - }//protected function setOptions() - - - - /* - * Dumb getters - */ - - - - public function getQuery() - { - return $this->query; - }//public function getQuery() - - - - public function getSqlGenerator() - { - return $this->sg; - }//public function getSqlGenerator() - - - - public function getTypeSorter() - { - return $this->ts; - }//public function getTypeSorter() - -}//class SparqlEngineDb -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/all-wcprops deleted file mode 100755 index 470b7a26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/554/trunk/rdfapi-php/api/sparql/SparqlEngineDb -END -QuerySimplifier.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/QuerySimplifier.php -END -FilterGenerator.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/476/trunk/rdfapi-php/api/sparql/SparqlEngineDb/FilterGenerator.php -END -Preparator.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/Preparator.php -END -TypeSorter.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/536/trunk/rdfapi-php/api/sparql/SparqlEngineDb/TypeSorter.php -END -Offsetter.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/Offsetter.php -END -SqlMerger.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/SqlMerger.php -END -ResultRenderer.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer.php -END -SqlGeneratorException.php -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/SqlGeneratorException.php -END -ResultConverter.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/485/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php -END -SqlGenerator.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/472/trunk/rdfapi-php/api/sparql/SparqlEngineDb/SqlGenerator.php -END -PreparedStatement.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/465/trunk/rdfapi-php/api/sparql/SparqlEngineDb/PreparedStatement.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/entries deleted file mode 100755 index f511e2e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/entries +++ /dev/null @@ -1,173 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/sparql/SparqlEngineDb -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-05T08:18:50.037887Z -554 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -QuerySimplifier.php -file - - - - -2008-02-29T14:57:47.115741Z -3c0ba98e3c6ea3d594c3645c2f779917 -2007-06-27T16:47:57.067358Z -465 -cweiske - -FilterGenerator.php -file - - - - -2008-02-29T14:57:47.131362Z -f4ced98870e781243de014d5f6340364 -2007-08-08T13:48:22.439560Z -476 -cweiske -has-props - -ResultRenderer -dir - -Preparator.php -file - - - - -2008-02-29T14:57:47.131362Z -51f969eeaaaca65372f53ecd720dc9e6 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -TypeSorter.php -file - - - - -2008-02-29T14:57:47.146983Z -130848f8c0cc36f263774a7d3e711f2d -2007-08-20T17:21:35.303811Z -536 -cweiske -has-props - -Offsetter.php -file - - - - -2008-02-29T14:57:47.146983Z -73910f040f4deed2439301a2a1f9fc1a -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SqlMerger.php -file - - - - -2008-02-29T14:57:47.162603Z -f2ed9300171a830350ca217f11238649 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -ResultRenderer.php -file - - - - -2008-02-29T14:57:47.162603Z -f293569f66b31ebadf3b53e7c67467fe -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -SqlGeneratorException.php -file - - - - -2008-02-29T14:57:47.178224Z -f9e0b14e53c647017827ed143e481a0a -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - -ResultConverter.php -file - - - - -2008-02-29T14:57:47.178224Z -b996d6f54e8963884e3c5b0775b29f36 -2007-08-12T11:33:30.127896Z -485 -cweiske -has-props - -SqlGenerator.php -file - - - - -2008-02-29T14:57:47.193844Z -bb0e74447781677e82d9927b2b2f5cb5 -2007-08-02T21:19:57.083490Z -472 -cweiske -has-props - -PreparedStatement.php -file - - - - -2008-02-29T14:57:47.193844Z -4094f6cd26373a4ebbab87d395b6b806 -2007-06-27T16:47:57.067358Z -465 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/FilterGenerator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/FilterGenerator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/FilterGenerator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Offsetter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Offsetter.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Offsetter.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Preparator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Preparator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/Preparator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/PreparedStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/PreparedStatement.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/PreparedStatement.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultConverter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultConverter.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultConverter.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultRenderer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultRenderer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/ResultRenderer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGenerator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGenerator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGenerator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGeneratorException.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGeneratorException.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlGeneratorException.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlMerger.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlMerger.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/SqlMerger.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/TypeSorter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/TypeSorter.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/prop-base/TypeSorter.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/FilterGenerator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/FilterGenerator.php.svn-base deleted file mode 100755 index abc7cba3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/FilterGenerator.php.svn-base +++ /dev/null @@ -1,846 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_FilterGenerator -{ - /** - * SQL Generator - * @var SparqlEngineDb_SqlGenerator - */ - protected $sg = null; - - /** - * If the filter is in an optional statement - * @var boolean - */ - protected $bOptional = false; - - /** - * Number of parameters for the functions supported. - * First value is minimum, second is maximum. - * @var array - */ - protected static $arFuncParamNumbers = array( - 'bound' => array(1, 1), - 'datatype' => array(1, 1), - 'isblank' => array(1, 1), - 'isiri' => array(1, 1), - 'isliteral' => array(1, 1), - 'isuri' => array(1, 1), - 'lang' => array(1, 1), - 'langmatches' => array(2, 2), - 'regex' => array(2, 3), - 'sameterm' => array(2, 2), - 'str' => array(1, 1), - 'xsd:datetime' => array(1, 1), - ); - - /** - * List of operators and their counterpart if operands are switched. - * (a > b) => (b < a) - * @var array - */ - protected static $arOperatorSwitches = array( - '>' => '<', - '<' => '>', - '>=' => '<=', - '<=' => '>=', - ); - - protected static $arDumbOperators = array( - '&&', '||' - ); - - protected static $typeXsdBoolean = 'http://www.w3.org/2001/XMLSchema#boolean'; - protected static $typeXsdDateTime = 'http://www.w3.org/2001/XMLSchema#dateTime'; - protected static $typeXsdDouble = 'http://www.w3.org/2001/XMLSchema#double'; - protected static $typeXsdInteger = 'http://www.w3.org/2001/XMLSchema#integer'; - protected static $typeXsdString = 'http://www.w3.org/2001/XMLSchema#string'; - protected static $typeVariable = 'variable'; - - - - public function __construct(SparqlEngineDb_SqlGenerator $sg) - { - $this->sg = $sg; - }//public function __construct(SparqlEngineDb_SqlGenerator $sqlgen) - - - - /** - * Creates the SQL representing a Sparql FILTER. - * - * @param array $tree Filter element tree as returned by - * SparqlParser::parseConstraintTree() - * @param boolean $bOptional If the filter is in an optional statement - * @return string SQL WHERE part with prefixed AND - */ - public function createFilterSql($tree, $bOptional, $nUnionCount) - { - if (count($tree) == 0) { - //empty filter pattern? - return ''; - } - - $this->bOptional = $bOptional; - $this->nUnionCount = $nUnionCount; - - return ' AND ' . $this->createTreeSql($tree, null); - }//public function createFilterSql($tree) - - - - /** - * - */ - protected function createTreeSql($tree, $parent) - { - switch ($tree['type']) { - case 'equation': - $sql = $this->createEquation($tree); - break; - case 'value': - if ($parent != null) { - $bDumbParent = $parent['type'] == 'equation' - && in_array($parent['operator'], self::$arDumbOperators); - } else { - $bDumbParent = true; - } - $sql = $this->createValue($tree, $bDumbParent); - break; - case 'function': - $sql = $this->createFunction($tree); - break; - default: - //var_dump($tree); - throw new SparqlEngineDb_SqlGeneratorException('Unsupported tree type: ' . $tree['type']); - break; - } - - if (isset($tree['negated'])) { - $sql = '!(' . $sql . ')'; - } - - return $sql; - }//protected function createTreeSql($tree, $strParentType) - - - - /** - * Creates the sql for an element of type "value". - * - * @param array $tree Element - * @param boolean $bDumbParent True if the parent is a boolean equation or null. - */ - protected function createValue($tree, $bDumbParent) - { - $strValue = stripslashes($tree['value']); - if (SparqlVariable::isVariable($strValue)) { - if (!isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$strValue])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unknown variable in filter: ' . $strValue - ); - } - - if ($bDumbParent) { - return $this->createBooleanValue($tree); - } else if ($this->isObject($tree)) { - //convert datetime to datetime if necessary - return self::mkVal( - '(CASE' - . ' WHEN ' . $this->getDatatypeCol($tree) . ' = "' . self::$typeXsdBoolean . '"' - . ' THEN IF(LOWER(' . $this->getValueCol($tree) . ') = "true", TRUE, FALSE)' - . ' ELSE ' . $this->getValueCol($tree) - . ' END)', - self::$typeVariable - ); - } else { - return self::mkVal( - $this->getValueCol($tree), - self::$typeVariable - ); - } - } - - if ($this->isNumber($tree)) { - return $strValue; - } else if ($tree['quoted'] === false && - (!isset($tree['datatype']) || $tree['datatype'] != self::$typeXsdBoolean) - ) { - $strValueNew = $this->sg->query->getFullUri($strValue); - if ($strValueNew === false) { - if ($strValue[0] == '<' && substr($strValue, -1) == '>') { - $strValue = substr($strValue, 1, -1); - } else { -var_dump($tree); - throw new SparqlEngineDb_SqlGeneratorException( - 'Unexpected value "' . $strValue . '" (expected datatype)' - ); - } - } else { - $strValue = $strValueNew; - } - } else if (isset($tree['datatype'])) { - switch ($tree['datatype']) { - case self::$typeXsdBoolean: - if (strtolower($strValue) == 'false') { - //fix: (bool)"false" === true - $strValue = false; - } - return self::mkVal( - (bool)$strValue ? 'TRUE' : 'FALSE', - self::$typeXsdBoolean - ); - - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported datatype "' . $tree['datatype'] - ); - } - } - - return self::mkVal( - '"' . addslashes($strValue) . '"', - self::$typeXsdString - ); - }//protected function createValue($tree) - - - - protected function createBooleanValue($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - if (!$this->isObject($tree)) { - //Maybe needs a fix - $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType]['value']; - return self::mkVal( - $strTable . '.' . $strSqlCol . ' != ""', - self::$typeXsdBoolean - ); - } - - $cType = $strTable . '.l_datatype'; - $cValue = $strTable . '.object'; - $xsd = 'http://www.w3.org/2001/XMLSchema'; - - return self::mkVal( - '(' - . "(($cType = '' || $cType = '$xsd#string') AND $cValue != '')" - . " OR ($cType = '$xsd#boolean' AND $cValue != 'false')" - . " OR (($cType = '$xsd#integer' || $cType = '$xsd#double') AND CAST($cValue AS DECIMAL(15,10)) != 0)" - //plain check for all unknown datatypes - . " OR ($cType != '' AND $cType != '$xsd#string' AND $cType != '$xsd#boolean' AND $cType != '$xsd#integer' AND $cType != '$xsd#double' AND $cValue != '')" - . ')', - self::$typeXsdBoolean - ); - }//protected function createBooleanValue($tree) - - - - protected function createFunction($tree) - { - $strFuncName = strtolower($tree['name']); - if (!isset(self::$arFuncParamNumbers[$strFuncName])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported FILTER function: ' . $strFuncName - ); - } - - $nParams = count($tree['parameter']); - if ($nParams < self::$arFuncParamNumbers[$strFuncName][0] - || $nParams > self::$arFuncParamNumbers[$strFuncName][1] - ) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Wrong parameter count for FILTER function: ' . $strFuncName - . ' (got ' . $nParams . ', expected ' - . self::$arFuncParamNumbers[$strFuncName][0] - . '-' . self::$arFuncParamNumbers[$strFuncName][1] - ); - } - - $strThisFunc = 'createFunction_' . str_replace(':', '_', $strFuncName); - return $this->$strThisFunc($tree); - }//protected function createFunction($tree) - - - - protected function createEquation($tree) - { - $strExtra = ''; - $strIsNull = ''; - $strIsNullEnd = ''; - - if (($this->isNumber($tree['operand1']) || $this->isPlainString($tree['operand1'])) - && $this->isObject($tree['operand2']) - ) { - //switch operands and operator - $tmp = $tree['operand1']; - $tree['operand1'] = $tree['operand2']; - $tree['operand2'] = $tmp; - $tree['operator'] = self::switchOperator($tree['operator']); - } - - $val1 = $this->createTreeSql($tree['operand1'], $tree); - $val2 = $this->createTreeSql($tree['operand2'], $tree); - - if ($this->isObject($tree['operand1'])) { - if ($this->bOptional) { - $strIsNull = '('; - $strIsNullEnd = ' OR ' . $val1 . ' IS NULL)'; - } - if (isset($tree['operand2']['language'])) { - $strColLanguage = $this->getLangCol($tree['operand1']); - $strExtra .= ' AND ' . $strColLanguage . ' = "' - . addslashes($tree['operand2']['language']) - . '"'; - } - - if ($this->isNumber($tree['operand2'])) { - $strColDatatype = $this->getDatatypeCol($tree['operand1']); - $strExtra .= ' AND (' . $strColDatatype . ' = "' . self::$typeXsdDouble . '"' - . ' OR ' . $strColDatatype . ' = "' . self::$typeXsdInteger . '"' - . ')'; - return $strIsNull . '(' - . 'CAST(' . $val1 . ' AS DECIMAL(15,10))' - . ' ' . $tree['operator'] . ' ' - . $val2 - . $strExtra - . ')' . $strIsNullEnd; - } - } - - //I don't check the operator since it is already checked in the parser - return $strIsNull . '(' - . '(' - . $val1 - . ' ' . $tree['operator'] . ' ' - . $val2 - . $strExtra - . ')' - . $this->createTypeEquation( - $tree['operator'], $val1, $val2, - $tree['operand1'], $tree['operand2'] - ) - . ')' . $strIsNullEnd; - }//protected function createEquation($tree) - - - - /** - * Generates sql code to make sure the datatypes of the two operands match - */ - protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2) - { - if (in_array($operator, array('&&', '||'))) { - return ''; - } - - if ($val1->type != self::$typeVariable && $val2->type != self::$typeVariable) { - //both are not variables -> type needs to be the same - return $val1->type == $val2->type ? '' : ' AND FALSE'; - } - $so1 = $this->isObjectOrSubject($tree1); - $so2 = $this->isObjectOrSubject($tree2); - $o1 = $this->isObject($tree1); - $o2 = $this->isObject($tree2); - - if ($so1 && $so2) { - $sql = ' AND ' . $this->getIsCol($tree1) . ' = ' . $this->getIsCol($tree2); - if ($o1 && $o2) { - //maybe needs string fix - $sql .= ' AND ' . $this->getDatatypeCol($tree1) . ' = ' - . $this->getDatatypeCol($tree2); - } - return $sql; - } - - if ($o1 && $val2->type != self::$typeVariable) { - return $this->createSingleTypeCheck($val2, $tree1); - } else if ($o2 && $val1->type != self::$typeVariable) { - return $this->createSingleTypeCheck($val1, $tree2); - } - - //fixme - return ''; - }//protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2) - - - - /** - * Creates sql to ensure the type between $val and variable $tree - * is the same. - */ - protected function createSingleTypeCheck($val, $tree) - { - if ($val->type == self::$typeXsdString) { - //string can be empty type or xsd type - return ' AND (' - . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"' - . ' OR ' - . $this->getDatatypeCol($tree) . ' = ""' - . ')'; - } - return ' AND ' . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"'; - }//protected function createSingleTypeCheck($val, $tree) - - - - /* - * SQL generation functions - */ - - - - /** - * Creates an sql statement that returns if the element is a blank node - */ - protected function createFunction_bound($tree) - { - if ($this->isVariable($tree['parameter'][0])) { - return self::mkVal( - $this->getValueCol($tree['parameter'][0]) . ' IS NOT NULL', - self::$typeXsdBoolean - ); - } - - //We'll see which other cases occur here - return self::mkVal('TRUE', self::$typeXsdBoolean); - }//protected function createFunction_bound($tree) - - - - protected function createFunction_datatype($tree) - { - if (!$this->isObject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'datatype\'s first parameter needs to be an object' - ); - } - - return self::mkVal( - $this->getDatatypeCol($tree['parameter'][0]), - self::$typeXsdString - ); - }//protected function createFunction_datatype($tree) - - - - /** - * Creates an sql statement that returns if the element is a blank node - */ - protected function createFunction_isblank($tree) - { - if (!$this->isObjectOrSubject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'isBlank\'s first parameter needs to be an object or subject' - ); - } - - return self::mkVal( - $this->getIsCol($tree['parameter'][0]) . ' = "b"', - self::$typeXsdBoolean - ); - }//protected function createFunction_isblank($tree) - - - - protected function createFunction_isiri($tree) - { - return $this->createFunction_isuri($tree); - }//protected function createFunction_isiri($tree) - - - - /** - * Creates an sql statement that returns the language of the object - */ - protected function createFunction_isliteral($tree) - { - if ($this->isObjectOrSubject($tree['parameter'][0])) { - return $this->getIsCol($tree['parameter'][0]) . ' = "l"'; - } - - //This does not take combined functions into account (subfunctions) - return self::mkVal( - $this->isPlainString($tree) ? 'TRUE' : 'FALSE', - self::$typeXsdBoolean - ); - }//protected function createFunction_isliteral($tree) - - - - protected function createFunction_isuri($tree) - { - if ($this->isObjectOrSubject($tree['parameter'][0])) { - return self::mkVal( - $this->getIsCol($tree['parameter'][0]) . ' = "r"', - self::$typeXsdBoolean - ); - } else { - //predicates are iris - return self::mkVal('TRUE', self::$typeXsdBoolean); - } - }//protected function createFunction_isuri($tree) - - - - /** - * Creates an sql statement that returns the language of the object - */ - protected function createFunction_lang($tree) - { - if (!$this->isObject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'lang\'s first parameter needs to be an object' - ); - } - return self::mkVal( - $this->getLangCol($tree['parameter'][0]), - self::$typeXsdString - ); - }//protected function createFunction_lang($tree) - - - - /** - * Creates an sql statement that checks if the variable - * matches a given language - */ - protected function createFunction_langmatches($tree) - { - //those two restrictions are needed until we have a mysql-only - // langmatches function - if ($tree['parameter'][0]['type'] != 'function' - || $tree['parameter'][0]['name'] != 'lang' - ) { - throw new SparqlEngineDb_SqlGeneratorException( - 'langMatches\' first parameter needs to be a lang() function' - ); - } - - if (!$this->isPlainString($tree['parameter'][1])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'langMatches\' second parameter needs to be a string' - ); - } - - $lang = $tree['parameter'][1]['value']; - $col = $this->createTreeSql($tree['parameter'][0], $tree); - - switch ($lang) { - case '*': - //anything but nothing - $sql = $col . ' != ""'; - break; - case '': - //nothing - $sql = $col . ' = ""'; - break; - default: - //language, maybe with different subcode - // en -> en, en-US - $sql = '(' . $col . ' = "' . addslashes($lang) . '" OR ' - . $col . ' LIKE "' . addslashes($lang) . '-%")'; - break; - } - - return self::mkVal($sql, self::$typeXsdBoolean); - }//protected function createFunction_isuri($tree) - - - - /** - * Creates an sql statement that checks if the given part matches - * an regex - */ - protected function createFunction_regex($tree) - { - $strVar = $this->createTreeSql($tree['parameter'][0], $tree); - $strRegex = $this->createTreeSql($tree['parameter'][1], $tree); - - if (isset($tree['parameter'][2])) { - //is quoted - $strMod = $this->createTreeSql($tree['parameter'][2], $tree); - switch ($strMod) { - case '': - case '""': - $sql = $strVar . ' REGEXP ' . $strRegex; - break; - - case '"i"': - $sql = 'CAST(' . $strVar . ' AS CHAR) REGEXP ' . $strRegex; - break; - - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported regex modifier "' - . $strMod - . '"' - ); - } - } else { - $sql = $strVar . ' REGEXP ' . $strRegex; - } - - if ($this->isObject($tree['parameter'][0])) { - $col = $this->getIsCol($tree['parameter'][0]); - $sql = "($sql AND $col = 'l')"; - } - - return self::mkVal($sql, self::$typeXsdBoolean); - }//protected function createFunction_regex($tree) - - - - /** - * Creates an sql statement that checks if both terms are the same - */ - protected function createFunction_sameterm($tree) - { - //FIXME: dead simple implementation that does not cover all cases - return self::mkVal( - $this->createTreeSql($tree['parameter'][0], $tree) - . ' = ' - . $this->createTreeSql($tree['parameter'][1], $tree), - self::$typeXsdBoolean - ); - }//protected function createFunction_sameterm($tree) - - - - /** - * Creates an sql statement that returns the string representation - * of the given element - */ - protected function createFunction_str($tree) - { - if ($this->isObject($tree['parameter'][0])) { - return self::mkVal( - '(CASE ' . $this->getIsCol($tree['parameter'][0]) - . ' WHEN "b" THEN ""' - . ' ELSE ' . $this->getValueCol($tree['parameter'][0]) - . ' END)', - self::$typeXsdString - ); - } - - return $this->createTreeSql($tree['parameter'][0], $tree); - }//protected function createFunction_str($tree) - - - - /** - * Creates an sql statement that returns the datetime representation - * of the given element - */ - protected function createFunction_xsd_datetime($tree) - { - $val = $this->createTreeSql($tree['parameter'][0], $tree); - if ($val->type == self::$typeXsdDateTime - || $val->type == self::$typeVariable) { - //no need to cast again - return $val; - } - return self::mkVal( - $this->getDateConversionSql($val), - self::$typeXsdDateTime - ); - }//protected function createFunction_xsd_datetime($tree) - - - - - /* - * Helper methods - */ - - - - protected static function mkVal($value, $type = null) { - return new SparqlEngineDb_FilterGenerator_Value($value, $type); - } - - - - protected function getCol($tree, $type) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - if (!isset(SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type])) { - return false; - } - $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type]; - return $strTable . '.' . $strSqlCol; - } - - - - protected function getDatatypeCol($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - return $strTable . '.l_datatype'; - } - - - - protected function getDateConversionSql($strValue) - { - return 'STR_TO_DATE(' . $strValue . ', "%Y-%m-%dT%H:%i:%sZ")'; - }//protected function getDateConversionSql($strValue) - - - - protected function getIsCol($tree) - { - return $this->getCol($tree, 'is'); - } - - - - protected function getLangCol($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - return $strTable . '.l_language'; - } - - - - protected function getValueCol($tree) - { - return $this->getCol($tree, 'value'); - } - - - - protected function isNumber($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === false - && preg_match('#^[0-9.]+$#', $tree['value']) - && floatval($tree['value']) == $tree['value']; - }//protected function isNumber($tree) - - - - /** - * Checks if the given tree element is a variable - * and the variable is actually an object in the database. - * - * @param array $tree Tree element - * @return boolean True if the element is an object - */ - protected function isObject($tree) - { - return $this->isVariable($tree) - && $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o'; - }//protected function isVariable($tree) - - - - /** - * Checks if the given tree element is a variable - * and the variable is actually an object or a subject in the database. - * - * @param array $tree Tree element - * @return boolean True if the element is an object or an subject - */ - protected function isObjectOrSubject($tree) - { - return $this->isVariable($tree) - && ( - $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o' - || $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 's' - ); - }//protected function isObjectOrSubject($tree) - - - - /** - * Checks if the given tree element is a plain string (no variable) - * - * @param array $tree Tree element - * @return boolean True if the element is a string - */ - protected function isPlainString($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === true; - }//protected function isPlainString($tree) - - - - protected function isValueButNotVariableNorString($tree) - { - return $tree['type'] == 'value' - && $tree['type']['quoted'] === false - && !SparqlVariable::isVariable($tree['value']); - }//protected function isValueButNotVariableNorString($tree) - - - - /** - * Checks if the given tree element is a variable - * - * @param array $tree Tree element - * @return boolean True if the element is a variable - */ - protected function isVariable($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === false - && SparqlVariable::isVariable($tree['value']) - && isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]); - }//protected function isVariable($tree) - - - - protected static function switchOperator($op) - { - if (!isset(self::$arOperatorSwitches[$op])) { - return $op; - } else { - return self::$arOperatorSwitches[$op]; - } - }//protected static function switchOperator($op) - -}//class SparqlEngineDb_FilterGenerator - - - - -/** -* Value class that holds some arbitrary value -* and a datatype. -* Objects of this class can transparently be used in strings since -* its __toString() returns the value. -*/ -class SparqlEngineDb_FilterGenerator_Value -{ - public $value = null; - public $type = null; - - - - public function __construct($value, $type = null) - { - $this->value = $value; - $this->type = $type; - } - - - - public function __toString() - { - return $this->value; - } - -}//class SparqlEngineDb_FilterGenerator_Value - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Offsetter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Offsetter.php.svn-base deleted file mode 100755 index 5c2d1744..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Offsetter.php.svn-base +++ /dev/null @@ -1,102 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_Offsetter -{ - public function __construct(ADOConnection $dbConn, Query $query) - { - $this->dbConn = $dbConn; - $this->query = $query; - }//public function __construct(ADOConnection $dbConn, Query $query) - - - - /** - * Determines the offset in the sqls, the position to start form. - * - * @param array $arSqls Array of SQL query parts as returned by - * SparqlEngine_TypeSorter::getOrderifiedSqls() - * @return array Array of two values: The first determines the - * index of the sql query to begin with, the second - * is the row offset that should be used in the final - * SQL query. - */ - public function determineOffset($arSqls) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['offset'] === null) { - return array(0, 0); - } - - $nCount = 0; - foreach ($arSqls as $nId => $arSql) { - $nCurrentCount = $this->getCount($arSql); - if ($nCurrentCount + $nCount > $arSM['offset']) { - return array($nId, $arSM['offset'] - $nCount); - } - $nCount += $nCurrentCount; - } - //nothing found - no results for this offset - return array(count($arSqls), 0); - }//public function determineOffset($arSql) - - - - /** - * Returns the number of rows that the given query will return. - * - * @param array $arSql Array with sql parts and at least keys - * 'from' and 'where' set. - * @return int Number of rows returned. - */ - protected function getCount($arSql) - { - $sql = SparqlEngineDb_SqlMerger::getCount($this->query, $arSql); - $dbResult = $this->dbConn->execute($sql); - - $nCount = 0; - foreach ($dbResult as $row) { - $nCount = intval($row[0]); - break; - } - return $nCount; - }//protected function getCount($arSql) - - - - /** - * Creates a sql LIMIT statement if the sparql query needs one. - * This method is needed because AdoDb does not support limits with - * prepared statements. It's a pity. - * - * @return string SQL command to be appended to a query, to limit - * the number of result rows returned. - */ - public static function getLimitSql(Query $query, ADOConnection $dbConn) - { - $arSM = $query->getSolutionModifier(); - if ($arSM['limit'] === null && $arSM['offset'] === null) { - return ''; - } - //this here is mysql syntax. if anyone has problems, write it - //dependent on $dbConn's type - if ($arSM['offset'] === null) { - return ' LIMIT ' . $arSM['limit']; - } else if ($arSM['limit'] === null) { - return ' LIMIT ' . $arSM['offset'] . ', 18446744073709551615'; - } else { - return ' LIMIT ' . $arSM['offset'] . ', ' . $arSM['limit']; - } - }//public static function getLimitSql(Query $query, ADOConnection $dbConn) - -}//class SparqlEngineDb_Offsetter - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Preparator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Preparator.php.svn-base deleted file mode 100755 index f5f5016d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/Preparator.php.svn-base +++ /dev/null @@ -1,229 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_Preparator -{ - - - - public function __construct(Query $query, ADOConnection $dbConn) - { - $this->query = $query; - $this->dbConn = $dbConn; - $this->arPrefixes = $this->query->getPrefixes(); - }//public function __construct(Query $query, ADOConnection $dbConn) - - - - /** - * Converts the given queries into sql prepared statments, - * calls the prepare command in the database and returns - * an array consisting of subarrays. They contain - * the db's prepared statement as first value, and an array - * of variable positions as second value (key is the position, - * the sparql variable is the value). - * - * @param array $arQueries Array of sql queries part arrays - * @param array $arPlaceholders Array of sparql (variable name => - * placeholder name) pairs - * @return array Array of (prepared statment, variable positions) pairs - */ - public function prepareInDb($arQueries, $arPlaceholders) - { - $arDbStatements = array(); - - foreach ($arQueries as $arQuery) { - list($strPrepared, $arVariablePositions) = $this->replacePlaceholders( - implode('', $arQuery), - $arPlaceholders - ); - if (count($arQueries) == 1) { - //I currently haven't seens one case in which the count was > 1 - //if that happens, we will need to add a fix - $strPrepared .= SparqlEngineDb_Offsetter::getLimitSql( - $this->query, - $this->dbConn - ); - } - $stmt = $this->dbConn->Prepare($strPrepared); - $arDbStatements[] = array( - $stmt, - $arVariablePositions - ); - } - - return $arDbStatements; - }//public function prepareInDb($arQueries, $arPlaceholders) - - - - /** - * Replaces the placeholders in the given SQL statement with real - * SQL prepared statements placeholders. - * - * @param string $strQuery SQL query with placeholders - * @param array $arPlaceholders Array of sparql (variable name => - * placeholder name) pairs - * @return array (prepared sql query string, variable positions) pair - */ - protected function replacePlaceholders($strQuery, $arPlaceholders) - { - $arVariablePositions = array(); - $this->arTmpVariablePositions = array(); - $this->arTmpPlaceholders = $arPlaceholders; - $strQuery = preg_replace_callback( - '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/', - array($this, 'replacePlaceholdersCb'), - $strQuery - ); - return array($strQuery, $this->arTmpVariablePositions); - }//protected function replacePlaceholders($strQuery, $arPlaceholders) - - - - /** - * Callback method internally used by replacePlaceholders() method. - */ - protected function replacePlaceholdersCb($matches) - { - $strPlaceholder = $matches[0]; - $strSparqlVariable = array_search( - $strPlaceholder, - $this->arTmpPlaceholders - ); - $strDbPlaceholder = $this->dbConn->Param($strSparqlVariable); - $this->arTmpVariablePositions[] = $strSparqlVariable; - - return $strDbPlaceholder; - }//protected function replacePlaceholdersCb($matches) - - - - /** - * Executes the given prepared statments, filling the placeholders - * with the given values. - * - * @param array $arDbStatements Return value of prepareInDb() - * @param array $arVariableValues Array of (variable name, value) pairs - * - * @return array Array of database results as returned by Execute() - */ - public function execute($arDbStatements, $arVariableValues) - { - $arResults = array(); - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - - foreach ($arDbStatements as $arStatement) { - list($stmt, $arVariablePositions) = $arStatement; - $arVariables = $this->createVariableArray( - $arVariablePositions, - $arVariableValues - ); - $arResults[] = $this->dbConn->Execute($stmt, $arVariables); - } - - $this->dbConn->SetFetchMode($oldmode); - - return $arResults; - }//public function execute($arDbStatements, $arVariableValues) - - - - /** - * Creates an array full of variables to be passed to the Execute() method - * of the database connection object. - * Uses the variable positions array to get the positions of the variables - * in the result array, and the variable value array to get the actual - * values for the prepared statement. - * - * @param array $arVariablePositions Positions of the variables as returned - * by replacePlaceholders(). - * @param array $arVariableValues Array of (variable name, value) pairs - * - * @return array Array of variable values - */ - protected function createVariableArray($arVariablePositions, $arVariableValues) - { - $arVariables = array(); - - foreach ($arVariablePositions as $nPos => $strVariable) { - if (!isset($arVariableValues[$strVariable])) { - throw new Exception('No value for variable "' . $strVariable . '" in prepared statement'); - } - - $strValue = self::replacePrefix( - $arVariableValues[$strVariable], - $this->arPrefixes - ); - - $arVariables[$nPos] = $strValue; - } - - return $arVariables; - }//protected function createVariableArray($arVariablePositions, $arVariableValues) - - - - /** - * Replaces all placeholders with their actual values. - */ - public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues) - { - $this->arTmpPlaceholders = $arPlaceholders; - $this->arTmpVariableValues = $arVariableValues; - - $strQuery = preg_replace_callback( - '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/', - array($this, 'replacePlaceholdersWithVariablesCb'), - $strQuery - ); - - return $strQuery; - }//public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues) - - - - /** - * Callback method internally used by - * replacePlaceholdersWithVariables() method. - */ - protected function replacePlaceholdersWithVariablesCb($matches) - { - $strPlaceholder = $matches[0]; - $strSparqlVariable = array_search( - $strPlaceholder, - $this->arTmpPlaceholders - ); - return $this->dbConn->qstr( - self::replacePrefix( - $this->arTmpVariableValues[$strSparqlVariable], - $this->arPrefixes - ) - ); - }//protected function replacePlaceholdersWithVariablesCb($matches) - - - - protected static function replacePrefix($strValue, $arPrefixes) - { - //replace prefixes? - if (count($arParts = explode(':', $strValue, 2)) == 2) { - if (isset($arPrefixes[$arParts[0]])) { - $strValue = $arPrefixes[$arParts[0]] . $arParts[1]; - } - } - return $strValue; - }//protected static function replacePrefix($strValue, $arPrefixes) - -}//class SparqlEngineDb_Preparator - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/PreparedStatement.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/PreparedStatement.php.svn-base deleted file mode 100755 index c7c03413..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/PreparedStatement.php.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement -{ - protected $sparqlEngine = null; - - - public function __construct(SparqlEngineDb $sparqlEngine) - { - $this->sparqlEngine = $sparqlEngine; - }//public function __construct(SparqlEngineDb $sparqlEngine) - - - - /** - * Execute the prepared statement and returns the result. - * - * @param array $arVariables Array of sparql query variables => values - * @param string $resultform Which result form you need - * @return mixed Anything a sparql query can return - */ - public function execute($arVariables, $resultform = false) - { - return $this->sparqlEngine->execute($arVariables, $resultform); - }//public function execute($arVariables, $resultform) - -}//class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/QuerySimplifier.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/QuerySimplifier.php.svn-base deleted file mode 100755 index 2988fd98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/QuerySimplifier.php.svn-base +++ /dev/null @@ -1,169 +0,0 @@ - 'asd'} -* UNION -* {?person3 'three'} -* } -* is represented internally as three graph patterns, the latter -* two referencing the first to be their pattern (they are subpatternOf). -* Now this can be flattened to this which is the same: -* {?g ?h ?i . ?person 'asd'} -* UNION -* {?g ?h ?i .?person3 'three'} -* -* This class does this. -* -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -*/ -class SparqlEngineDb_QuerySimplifier -{ - - /** - * Simplify the query by flattening out subqueries. - * Modifies the passed query object directly. - */ - public function simplify(Query $query) - { - $arPatterns = $query->getResultPart(); - self::dropEmpty($arPatterns); - $arPlan = $this->createPlan($arPatterns); - if (count($arPlan) == 0) { - $query->setResultPart($arPatterns); - return 0; - } - - $this->executePlan($arPatterns, $arPlan); - $query->setResultPart($arPatterns); - }//public function simplify(Query $query) - - - - /** - * Creates a plan what to do. - * - * @return array Array of arrays. Key is the parent pattern id, - * value is an array of subpatterns that belong to - * that parental pattern. - */ - protected function createPlan(&$arPatterns) - { - $arNumbers = $this->getNumbers($arPatterns); - if (count($arNumbers) == 0) { - return array(); - } - - $arPlan = array(); - - foreach ($arNumbers as $nId => $nPatternCount) { - $nParent = $arPatterns[$nId]->getSubpatternOf(); - $arPlan[$nParent][$nId] = true; - } - - return $arPlan; - }//protected function createPlan(&$arPatterns) - - - - /** - * Executes the plan - * - * @param array $arPatterns Array of GraphPatterns - * @param array $arPlan Plan array as returned by createPlan() - */ - protected function executePlan(&$arPatterns, &$arPlan) - { - foreach ($arPlan as $nParent => $arChildren) { - $base = $arPatterns[$nParent]; - $grandParent = $base->getSubpatternOf(); - $nNextId = $nParent; - foreach ($arChildren as $nChild => $null) { - $new = clone $base; - $new->addTriplePatterns($arPatterns[$nChild]->getTriplePatterns()); - $new->addConstraints( $arPatterns[$nChild]->getConstraints()); - $new->setId($nNextId); - if ($nParent != $nNextId) { - $new->setUnion($nParent); - } - $arPatterns[$nNextId] = $new; - - if ($grandParent !== null) { - //dynamically adjust plan - $arPlan[$grandParent][$nNextId] = true; - } - - $nNextId = $nChild; - } - //last one is not not needed anymore - unset($arPatterns[$nNextId]); - } - }//protected function executePlan(&$arPatterns, &$arPlan) - - - - /** - * Returns an array of id-value pairs determining - * which pattern IDs (array id) are deepest nested - * (higher value). - * Array is sorted in reverse order, highest values - * first. - * - * @param array $arPatterns Array with GraphPatterns - * @return array Array with key-value pairs - */ - protected function getNumbers(&$arPatterns) - { - $arNumbers = array(); - foreach ($arPatterns as $nId => &$pattern) { - $nParent = $pattern->getSubpatternOf(); - if ($nParent !== null) { - $arNumbers[$nId] = $arNumbers[$nParent] + 1; - } else { - $arNumbers[$nId] = 0; - } - } - //remove the not so interesting ones - foreach ($arNumbers as $nId => $nNumber) { - if ($nNumber == 0) { - unset($arNumbers[$nId]); - } - } - - arsort($arNumbers); - - return $arNumbers; - }//protected function getNumbers(&$arPatterns) - - - - /** - * Removes all empty graph patterns from the array. - * Modifies it directly. - */ - protected static function dropEmpty(&$arPatterns) - { - foreach ($arPatterns as $nId => &$pattern) { - if ($pattern->isEmpty()) { - unset($arPatterns[$nId]); - } - } - - foreach ($arPatterns as $nId => &$pattern) { - $nParent = $pattern->getSubpatternOf(); - if (!isset($arPatterns[$nParent])) { - $arPatterns[$nId]->setSubpatternOf(null); - } - } - //FIXME: continued indexes? - }//protected static function dropEmpty(&$arPatterns) - -}//class SparqlEngineDb_QuerySimplifier - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultConverter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultConverter.php.svn-base deleted file mode 100755 index 875b47e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultConverter.php.svn-base +++ /dev/null @@ -1,115 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultConverter -{ - /** - * Determines the correct renderer and calls it. - * - * The $resultform may be: - * - false: The default renderer is taken then - * - an object that implements SparqlEngineDb_ResultRenderer interface - * - a string like "HTML" or "XML". The appropriate renderer is used then. - * - a full class name, e.g. SparqlEngineDb_ResultRenderer_XML - * - * @param array $arRecordSets Array of anything ADOConnection::Execute() can return - * @param SparqlEngineDb $engine Sparql database engine. - * @param mixed $resultform Which format the results shall be in (false or "xml") - * - * @return mixed Most likely an array or a boolean value, - * or anything else as determined by $resultform - */ - public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false) - { - if (is_object($resultform)) { - if ($resultform instanceof SparqlEngineDb_ResultRenderer) { - return $resultform->convertFromDbResults( - $arRecordSets, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer object needs to implement' - . ' SparqlEngineDb_ResultRenderer interface' - ); - } - } - - if ($resultform === false) { - $resultform = 'Default'; - } else if ($resultform == 'xml') { - //kept for BC reasons - $resultform = 'XML'; - } - - if ($strClass = self::loadClass($resultform)) { - $rrObj = new $strClass(); - if ($rrObj instanceof SparqlEngineDb_ResultRenderer) { - return $rrObj->convertFromDbResults( - $arRecordSets, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer class "' . $strClass . '" needs to implement' - . ' SparqlEngineDb_ResultRenderer interface' - ); - } - } else { - throw new Exception( - 'Result renderer class "' . $resultform . '" could not be loaded.' - ); - } - }//public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false) - - - - /** - * Tries to load a given class if it doesn't exist, - * and returns true if the class can be used. - * - * @param string $strClass Classname - * @return mixed Class name if the class is loaded and can be used, false if not. - */ - protected static function loadClass($strClass) - { - if (class_exists($strClass, false)) { - return $strClass; - } - - //RAP style, shortcut notation - $strFile = 'SparqlEngineDb/ResultRenderer/' . $strClass . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngineDb_ResultRenderer_' . $strClass, false)) { - return 'SparqlEngineDb_ResultRenderer_' . $strClass; - } - - //RAP style - $strFile = str_replace('_', '/', $strClass) . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - //PEAR style - @include_once $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - return false; - }//protected static function loadClass($strClass) - -}//class SparqlEngineDb_ResultConverter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultRenderer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultRenderer.php.svn-base deleted file mode 100755 index 7714b781..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/ResultRenderer.php.svn-base +++ /dev/null @@ -1,29 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -interface SparqlEngineDb_ResultRenderer -{ - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine); - -}//interface SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGenerator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGenerator.php.svn-base deleted file mode 100755 index 3794c110..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGenerator.php.svn-base +++ /dev/null @@ -1,999 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlGenerator -{ - public $query = null; - - /** - * Determines which variables can be found - * in which SQL result column. - * @example - * array( - * '?person' => array('t1', 's'), - ' '?p' => array('t1', 'p'), - * '?mbox' => array('t2', 'o') - * ) - * Would express that variable ?person is the subject - * in result table t1, and ?mbox is the object in - * table t2. - * - * @see $arCreationMethods - * - * @internal The array is created in createSql() - * and used in convertFromDbResult(). - * - * @var array - */ - public $arVarAssignments = array(); - - /** - * Array of variable name => table.col assignments - * for all variables used in the query not only - * the ones that shall be returned. - * - * @example - * array( - * '?person' => 't0.subject' - * ) - * - * @var array - */ - public $arUsedVarAssignments = array(); - - /** - * Array of arrays that contain all variable names - * which are to be found in the result of - * an sql statement in a union. - * - * @example - * array( - * 0 => array( - * '?person' => 's', - * '?p' => 'o' - * ), - * 1 => array( - * '?person' => 's', - * '?mbox' => 'o' - * ) - * ) - * - * @var array - */ - public $arUnionVarAssignments = array(); - - /** - * Which variables have been used as which type? - * key is variable name, value is an array of - * max. three keys (s, p, o) - * - * @example - * array( - * '?person' => array( - * 's' => true - * ), - * '?mbox' => array( - * 'o' => true - * ) - * ) - * - * @var array - */ - protected $arUsedVarTypes = array(); - - /** - * Array with placeholders of prepared statements variables. - * key is the variable name (without "??"), value is the - * placeholder. - * @var array - */ - protected $arPlaceholders = array(); - - /** - * Column names for subjects, predicates and - * objects for easy access via their character - * names (spo). - * - * @var array - */ - public static $arTableColumnNames = array( - 's' => array( - 'value' => 'subject', - 'is' => 'subject_is' - ), - 'p' => array( - 'value' => 'predicate' - ), - 'o' => array( - 'value' => 'object', - 'is' => 'object_is' - ) - ); - - /** - * Current UNION part number - * @var int - */ - protected $nUnionCount = 0; - - protected $nSqlVariableNameCount = 0; - - /** - * Name of the statements table - */ - protected $tblStatements = 'statements'; - - - - public function __construct(Query $query, ADOConnection $dbConn, $arModelIds) - { - $this->query = $query; - $this->dbConn = $dbConn; - $this->arModelIds = $arModelIds; - }//public function __construct(Query $query, ADOConnection $dbConn, $arModelIds) - - - - /** - * Creates an SQL query string from the given Sparql query object. - * - * @internal uses $query variable - * - * @return array Array of arrays of SQL query string parts: select, from and where - * - * @throws SparqlEngineDb_SqlGeneratorException If there is no variable in the result set. - */ - function createSql() - { -//var_dump($this->query); - $arSelect = array(); - $arFrom = array(); - $arWhere = array(); - - $strResultForm = $this->query->getResultForm(); - $filterGen = new SparqlEngineDb_FilterGenerator($this); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - $this->nTableId = 0; - $this->nGraphPatternCount = 0; - $this->nUnionCount = 0; - $this->nUnionTriplePatternCount = 0; - $this->arUnionVarAssignments[0] = array(); - - foreach ($this->query->getResultPart() as $graphPattern) { - if ($graphPattern->isEmpty()) { - continue; - } - if ($graphPattern->getUnion() !== null) { - ++$this->nUnionCount; - $this->nTableId = 0; - $this->nUnionTriplePatternCount = 0; - $this->nGraphPatternCount = 0; - $this->arUnionVarAssignments[$this->nUnionCount] = array(); - } - $this->nTriplePatternCount = 0; - $arTriplePattern = $graphPattern->getTriplePatterns(); - if ($arTriplePattern != null) { - foreach ($arTriplePattern as $triplePattern) { - list ( - $arSelect[$this->nUnionCount][], - $arFrom [$this->nUnionCount][], - $arWhere [$this->nUnionCount][] - ) = - $this->getTripleSql( - $triplePattern, - $graphPattern, - $arResultVars - ); - ++$this->nTableId; - ++$this->nTriplePatternCount; - ++$this->nUnionTriplePatternCount; - } - } - ++$this->nGraphPatternCount; - - } - - //constraints extra. needed, since OPTIONAL parts are put after - // the current pattern while the constraint already refers to variables - // defined in there - $this->nGraphPatternCount = 0; - $this->nUnionCount = 0; - foreach ($this->query->getResultPart() as $graphPattern) { - if ($graphPattern->getUnion() !== null) { - ++$this->nUnionCount; - } - $arConstraints = $graphPattern->getConstraints(); - if ($arConstraints != null) { - foreach ($arConstraints as $constraint) { - $arWhere[$this->nUnionCount][count($arWhere[$this->nUnionCount]) - 1] - .= $filterGen->createFilterSql( - $constraint->getTree(), - $graphPattern->getOptional() !== null, - $this->nUnionCount - ); - } - } - ++$this->nGraphPatternCount; - } - - $arSelect = $this->createEqualSelects($arSelect); - $arStrSelect = array(); - - switch ($strResultForm) { - case 'construct': - case 'describe': - $strSelectType = 'SELECT'; - case 'select': - case 'select distinct': - if (!isset($strSelectType)) { - $strSelectType = $strResultForm; - } - foreach ($arSelect as $nUnionCount => $arSelectPart) { - $arSelectPart = self::removeNull($arSelectPart); - if (count($arSelectPart) == 0 - || (count($arSelectPart) == 1 && $arSelectPart[0] == '')) { - //test "test-1-07" suggests we return no rows in this case - //throw new SparqlEngineDb_SqlGeneratorException('No variable that could be returned.'); - } else { - $arStrSelect[$nUnionCount] = strtoupper($strSelectType) . ' ' . implode(', ' , $arSelectPart); - } - } - break; - - case 'ask': - case 'count': - $arStrSelect = array('SELECT COUNT(*) as count'); - break; - - default: - throw new SparqlEngineDb_SqlGeneratorException('Unsupported query type "' . $strResultForm . '"'); - break; - } - - $arSqls = array(); - foreach ($arStrSelect as $nUnionCount => $arSelectPart) { - $arSqls[] = array( - 'select' => $arStrSelect[$nUnionCount], - 'from' => ' FROM ' . implode(' ' , self::removeNull($arFrom[$nUnionCount])), - 'where' => ' WHERE ' . self::fixWhere( - implode(' ' , self::removeNull($arWhere[$nUnionCount])) - ) - ); - } - return $arSqls; - }//function createSql() - - - - /** - * Creates some SQL statements from the given triple pattern - * array. - * - * @param QueryTriple $triple Array containing subject, predicate and object - * @param GraphPattern $graphPattern Graph pattern object - * - * @return array Array consisting of on array and two string values: - * SELECT, FROM and WHERE part - */ - function getTripleSql(QueryTriple $triple, GraphPattern $graphPattern, $arResultVars) - { - $arSelect = array(); - $strFrom = null; - $strWhere = null; - $strWhereEquality = ''; - $bWhereEqualitySubject = false; - $bWhereEqualityPredicate = false; - $bWhereEqualityObject = false; - - $subject = $triple->getSubject(); - $predicate = $triple->getPredicate(); - $object = $triple->getObject(); - - $arRefVars = array(); - $strTablePrefix = 't' . $this->nTableId; - - /** - * SELECT part - * We do select only the columns we need for variables - */ - if (SparqlVariable::isVariable($subject)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$subject])) { - //already selected -> add equality check - $bWhereEqualitySubject = true; - $this->arUsedVarTypes[$subject]['s'] = true; - } else { - if (isset($this->arVarAssignments[$subject][0])) { - $strTablePrefix = $this->arVarAssignments[$subject][0]; - } - $this->arVarAssignments[$subject] = array($strTablePrefix, 's'); - $this->arUnionVarAssignments[$this->nUnionCount][$subject] = array($strTablePrefix, 's'); - $this->arUsedVarTypes[$subject]['s'] = true; - if (self::isResultVar($subject, $arResultVars)) { - //new variable that needs to be selected - $arSelect[$subject] = $this->createVariableSelectArray( - 's', $subject, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$subject])) { - $arRefVars[$subject] = $strTablePrefix . '.subject'; - } else { - $this->arUsedVarAssignments[$subject] = $strTablePrefix . '.subject'; - } - } - } - } - - if (SparqlVariable::isVariable($predicate)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$predicate])) { - //already selected -> add equality check - $bWhereEqualityPredicate = true; - $this->arUsedVarTypes[$predicate]['p'] = true; - } else { - if (isset($this->arVarAssignments[$predicate][0])) { - $strTablePrefix = $this->arVarAssignments[$predicate][0]; - } - $this->arVarAssignments[$predicate] = array($strTablePrefix, 'p'); - $this->arUnionVarAssignments[$this->nUnionCount][$predicate] = array($strTablePrefix, 'p'); - $this->arUsedVarTypes[$predicate]['p'] = true; - if (self::isResultVar($predicate, $arResultVars)) { - $arSelect[$predicate] = $this->createVariableSelectArray( - 'p', $predicate, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$predicate])) { - $arRefVars[$predicate] = $strTablePrefix . '.predicate'; - } else { - $this->arUsedVarAssignments[$predicate] = $strTablePrefix . '.predicate'; - } - } - } - } - - if (SparqlVariable::isVariable($object)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$object])) { - //already selected -> add equality check - $bWhereEqualityObject = true; - $this->arUsedVarTypes[$object]['o'] = true; - } else { - if (isset($this->arVarAssignments[$object][0])) { - $strTablePrefix = $this->arVarAssignments[$object][0]; - } - $this->arVarAssignments[$object] = array($strTablePrefix, 'o'); - $this->arUnionVarAssignments[$this->nUnionCount][$object] = array($strTablePrefix, 'o'); - $this->arUsedVarTypes[$object]['o'] = true; - if (self::isResultVar($object, $arResultVars)) { - $arSelect[$object] = $this->createVariableSelectArray( - 'o', $object, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$object])) { - $arRefVars[$object] = $strTablePrefix . '.object'; - } else { - $this->arUsedVarAssignments[$object] = $strTablePrefix . '.object'; - } - } - if (isset($this->query->varLanguages[$object]) - && $this->query->varLanguages[$object] !== null - ) { - $strWhereEquality .= - ' AND ' . $strTablePrefix . '.l_language = "' - . addslashes($this->query->varLanguages[$object]) . '"'; - } - if (isset($this->query->varDatatypes[$object]) - && $this->query->varDatatypes[$object] !== null - ) { - $strWhereEquality .= - ' AND ' . $strTablePrefix . '.l_datatype = "' - . addslashes($this->query->varDatatypes[$object]) . '"'; - } - } - } - - /** - * WhereEquality - needs to be done now because strTablePrefix may change - */ - if ($bWhereEqualitySubject) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 's'), - $this->arVarAssignments[$subject] - ); - } - if ($bWhereEqualityPredicate) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 'p'), - $this->arVarAssignments[$predicate] - ); - } - if ($bWhereEqualityObject) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 'o'), - $this->arVarAssignments[$object] - ); - } - - - /** - * FROM part - */ - if ($this->nUnionTriplePatternCount == 0) { - //first FROM - $strFrom = $this->tblStatements . ' as ' . $strTablePrefix; - } else { - //normal join - if (count($this->arModelIds) == 1) { - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON t0.modelID = ' . $strTablePrefix . '.modelID'; - } else if (count($this->arModelIds) > 1) { - $arIDs = array(); - foreach ($this->arModelIds as $nId) { - $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId); - } - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON (' . implode(' OR ', $arIDs) . ')'; - } else { - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON t0.modelID = ' . $strTablePrefix . '.modelID'; - } - - foreach ($arRefVars as $strRefVar => $strSqlVar) { - $strFrom .= ' AND ' . $this->arUsedVarAssignments[$strRefVar] . ' = ' . $strSqlVar; - } - - if ($graphPattern->getOptional() !== null) { - $strFrom .= $this->getSqlCondition($subject , $strTablePrefix, 'subject') - . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate') - . $this->getSqlCondition($object , $strTablePrefix, 'object') - . $strWhereEquality; - } - } - - - /** - * WHERE part - */ - if ($this->nUnionTriplePatternCount == 0) { - if (count($this->arModelIds) == 1) { - $strWhere = $strTablePrefix . '.modelID = ' . intval(reset($this->arModelIds)); - } else if (count($this->arModelIds) > 1) { - $arIDs = array(); - foreach ($this->arModelIds as $nId) { - $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId); - } - $strWhere = '(' . implode(' OR ', $arIDs) . ')'; - } else { - //so that we can append an AND - $strWhere = '1'; - } - } - if ($graphPattern->getOptional() === null || $this->nGraphPatternCount == 0) { - $strWhere .= $this->getSqlCondition($subject , $strTablePrefix, 'subject') - . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate') - . $this->getSqlCondition($object , $strTablePrefix, 'object') - . $strWhereEquality; - } - - return array($arSelect, $strFrom, $strWhere); - }//function getTripleSql(QueryTriple $triple) - - - - - protected function createVariableSelectArray($chType, $varname, $strTablePrefix) - { - $var = $this->query->getResultVar($varname); - if ($var !== false) { - if ((string)$var != $varname) { - //copy over var assignments - $this->arVarAssignments[(string)$var] = $this->arVarAssignments[$varname]; - } - - //works on non-* only - $func = $var->getFunc(); - if ($func != null) { - if ($func == 'datatype') { - if ($chType != 'o') { - throw new SparqlEngineDb_SqlGeneratorException( - 'datatype() works on objects only' - ); - } - return array( - $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"', - '"r"' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"', - ); - } else if ($func == 'lang') { - if ($chType != 'o') { - throw new SparqlEngineDb_SqlGeneratorException( - 'lang() works on objects only' - ); - } - return array( - $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"', - '"l"' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"', - ); - } else { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported function for select "' . $func . '"' - ); - } - } - } - - switch ($chType) { - case 's': - return array( - $strTablePrefix . '.subject as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"', - $strTablePrefix . '.subject_is as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"' - ); - case 'p': - return array( - $strTablePrefix . '.predicate as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"' - ); - case 'o': - return array( - $strTablePrefix . '.object as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"', - $strTablePrefix . '.object_is as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"', - $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($varname) . '"', - $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($varname) . '"', - ); - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unknown sentence type "' . $chType . "', one of (s,p,o) expected" - ); - } - }//protected function createVariableSelectArray($chType, $value, $strTablePrefix) - - - - /** - * Creates SELECT statements that have the same number of columns. - * Needed for UNIONs. - * - * @param array $arSelect Array of arrays. - * array( - * //for each union part one - * 0 => array( - * //foreach triple pattern - * 0 => array( - * '?person' => array( - * 't0.subject as "t0.subject"' - * ) - * ) - * ) - * ) - * @return array Array of SELECT strings - */ - protected function createEqualSelects($arSelect) - { - $arNewSelect = array(); - if (count($arSelect) == 1) { - if ($arSelect[0] == array(array())) { - //ASK and COUNT - return array(array('')); - } - - foreach ($arSelect[0] as $arTripleVars) { - $ar = array(); - foreach ($arTripleVars as $arVarParts) { - $ar[] = implode(', ', $arVarParts); - } - if (count($ar) > 0) { - $arNewSelect[0][] = implode(', ', $ar); - } - } - return $arNewSelect; - } - - $arVars = array(); - foreach ($arSelect as $arUnionVars) { - foreach ($arUnionVars as $arTripleVars) { - $arVars = array_merge($arVars, array_keys($arTripleVars)); - } - } - $arVars = array_unique($arVars); - - foreach ($arSelect as $nUnionCount => $arUnionVars) { - $arSelectVars = array(); - foreach ($arUnionVars as $arTripleVars) { - foreach ($arTripleVars as $strVar => $arVarParts) { - $arSelectVars[$strVar] = $arVarParts; - } - } - - $ars = array(); - foreach ($arVars as $strVar) { - if (isset($arSelectVars[$strVar])) { - $ar = $arSelectVars[$strVar]; - $nCount = count($arSelectVars[$strVar]); - } else { - $ar = array(); - $nCount = 0; - } - - if ($nCount == 0) { - //nothing of this variable in this union part - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_value'] . '"'; - } - if (( - isset($this->arUsedVarTypes[$strVar]['o']) - || isset($this->arUsedVarTypes[$strVar]['s']) - ) && $nCount < 2 - ) { - //it's a subject or object, but we don't want the type - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_is'] . '"'; - } - if (isset($this->arUsedVarTypes[$strVar]['o']) && $nCount < 4) { - //it's a subject or object, but we don't want the type - if (isset($this->arVarAssignments[$strVar]['sql_lang'])) { - $strColLanguage = $this->arVarAssignments[$strVar]['sql_lang']; - } else { - $strColLanguage = 'dummyLang'; - } - if (isset($this->arVarAssignments[$strVar]['sql_type'])) { - $strColDatatype = $this->arVarAssignments[$strVar]['sql_type']; - } else { - $strColDatatype = 'dummyType'; - } - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColLanguage . '"'; - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColDatatype . '"'; - } - $ars[] = implode(', ', $ar); - } - $arNewSelect[$nUnionCount] = $ars; - } - - return $arNewSelect; - }//protected function createEqualSelects($arSelect) - - - - /** - * Creates an SQL statement that checks for the value - * of some subject/predicate/object - * - * @param mixed $bject subject|predicate|object - * @param string $strTablePrefix Table prefix (e.g. "t0") - * @param string $strType Type of $bject ('subject'|'predicate'|'object') - * @return string Part of the SQL query (prefixed with AND) - */ - function getSqlCondition($bject, $strTablePrefix, $strType) - { - if (is_string($bject)) { - if (SparqlVariable::isVariable($bject)) { - //variable? - if (self::isPreparedVariable($bject)) { - //no, not really - $value = $this->getPreparedVariablePlaceholder($bject); - } else { - //yes - return null; - } - } else { - $value = $this->dbConn->qstr($bject); - } - //literal - return ' AND ' . $strTablePrefix . '.' . $strType . ' = ' . $value; - } - - if ($bject instanceof BlankNode) { - //Blank node - throw new SparqlEngineDb_SqlGeneratorException( - 'FIXME: Querying for blank nodes not supported' - ); - - } else if ($bject instanceof Resource) { - //Resource - $r = ' AND ' . $strTablePrefix . '.' . $strType . ' = ' - . $this->dbConn->qstr($bject->getURI()); - if ($strType !== 'predicate') { - $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is =' - . ' "r"'; - } - return $r; - - } else if ($bject instanceof Literal) { - //Literal - //I'm doubling Filter code here, but what the hell - $strColDatatype = $strTablePrefix . '.l_datatype'; - if ($bject->dtype == 'http://www.w3.org/2001/XMLSchema#integer' - || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#double' - ) { - $strVariable = 'CAST(' . $strTablePrefix . '.' . $strType . ' AS DECIMAL(15,10))'; - $strValue = $bject->getLabel(); - } else { - $strVariable = $strTablePrefix . '.' . $strType; - $strValue = $this->dbConn->qstr($bject->getLabel()); - } - $r = ' AND ' . $strVariable . ' = ' . $strValue; - if ($strType !== 'predicate') { - $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is =' - . ' "l"'; - } - - if ($strType == 'object') { - if ($bject->dtype == '' || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#string') { - //string - $r .= ' AND (' - . $strColDatatype . ' = ""' - . ' OR ' . $strColDatatype . ' = "http://www.w3.org/2001/XMLSchema#string"' - . ')'; - } else { - $r .= ' AND ' . $strColDatatype . ' = "' - . $bject->dtype - . '"'; - } - } - - if ($bject->lang != '') { - $strColLanguage = $strTablePrefix . '.l_language'; - $r .= ' AND ' . $strColLanguage . ' = ' - . $this->dbConn->qstr($bject->lang); - } - return $r; - - } else { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported sentence part: ' . get_class($bject) - ); - } - }//function getSqlCondition($bject, $strTablePrefix, $strType) - - - - /** - * Checks if the sentence part (subject, predicate or object) in - * $arNew has the same content as $arOld. - * Required for queries like ":x ?a ?a" where predicate and object - * need to have the same value - * - * @param array $arNew array($strTablePrefix, $strType = s|p|o) - * @param array $arOld array($strTablePrefix, $strType = s|p|o) - * @return string - */ - protected static function getSqlEqualityCondition($arNew, $arOld) - { - $chTypeNew = $arNew[1]; $chTypeOld = $arOld[1]; - $strTablePrefixNew = $arNew[0]; $strTablePrefixOld = $arOld[0]; - - if ($chTypeNew == 'p' || $chTypeOld == 'p') { - //just check value - //FIXME: it might be I need to check for resource type in object and subject - return - $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value'] - ; - } else if ($chTypeNew == 's' || $chTypeOld == 's') { - //check value and type - return - $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value'] - . ' AND ' - . $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['is'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['is'] - ; - } else { - //two objects -> check everything - return - $strTablePrefixNew . '.object = ' . $strTablePrefixOld . '.object' - . ' AND ' - . $strTablePrefixNew . '.object_is = ' . $strTablePrefixOld . '.object_is' - . ' AND ' - . $strTablePrefixNew . '.l_language = ' . $strTablePrefixOld . '.l_language' - . ' AND ' - . $strTablePrefixNew . '.l_datatype = ' . $strTablePrefixOld . '.l_datatype' - ; - } - }//protected static function getSqlEqualityCondition($arNew, $arOld) - - - - /** - * Checks if the given variable name is part of the result - * variables list. - * Needed since $arResultVars may contain "*" that captures all variables. - * - * @param string $strVar Variable name (e.g. "?p") - * @param array $arResultVars Array with result variables - * @return boolean true if it is a result variable - */ - protected static function isResultVar($strVar, &$arResultVars) - { - foreach ($arResultVars as $var) { - if ($var == '*') { - return true; - } else if ((is_string($var) && $var == $strVar) - || (is_object($var) && $var->getVariable() == $strVar)) { - return true; - } - } - return false; - }//protected static function isResultVar($strVar, &$arResultVars) - - - - /** - * Checks if the given variable is a replacement - * for a prepared statement. - * - * @return boolean - */ - public static function isPreparedVariable($bject) - { - return is_string($bject) && strlen($bject) >= 3 - && ($bject[0] == '?' || $bject[0] == '$') - && ($bject[1] == '?' || $bject[1] == '$') - ; - }//public static function isPreparedVariable($bject) - - - - /** - * Returns a placeholder to be included in the sql statement. - * It will be replaced with a real prepared statement variable later on. - * Also adds it to the internal placeholder array. - * - * @param string $strVariable The variable to get a placeholder for - * @return string placeholder - */ - protected function getPreparedVariablePlaceholder($strVariable) - { - $strName = substr($strVariable, 2); - if (!isset($this->arPlaceholders[$strName])) { - $this->arPlaceholders[$strName] = '@$%_PLACEHOLDER_' - . count($this->arPlaceholders) . '_%$@'; - } - return $this->arPlaceholders[$strName]; - }//protected function getPreparedVariablePlaceholder($strVariable) - - - - public function getPlaceholders() - { - return $this->arPlaceholders; - }//public function getPlaceholders() - - - - public function getVarAssignments() - { - return $this->arVarAssignments; - }//public function getVarAssignments() - - - - public function getUsedVarAssignments() - { - return $this->arUsedVarAssignments; - }//public function getUsedVarAssignments() - - - - public function getUsedVarTypes() - { - return $this->arUsedVarTypes; - }//public function getUsedVarTypes() - - - - /** - * Removes all NULL values from an array and returns it. - * - * @param array $array Some array - * @return array $array without the NULL values. - */ - protected static function removeNull($array) - { - foreach ($array as $key => &$value) { - if ($value === null) { - unset($array[$key]); - } - } - return $array; - }//protected static function removeNull($array) - - - - /** - * Removes a leading AND from the where clause which would render - * the sql illegal. - */ - protected function fixWhere($strWhere) - { - $strWhere = ltrim($strWhere); - if (substr($strWhere, 0, 4) == 'AND ') { - $strWhere = substr($strWhere, 4); - } - return $strWhere; - }//protected function fixWhere($strWhere) - - - - protected function getSqlVariableName($var) - { - $strSparqlVar = (string)$var; - if (!isset($this->arVarAssignments[$strSparqlVar]['sqlname'])) { - if (preg_match('/[a-zA-Z0-9]+/', substr($strSparqlVar, 1))) { - $strName = 'v_' . substr($strSparqlVar, 1); - } else { - $strName = 'va_' . $this->nSqlVariableNameCount++; - } - $this->arVarAssignments[$strSparqlVar]['sqlname'] = $strName; - } - return $this->arVarAssignments[$strSparqlVar]['sqlname']; - }//protected function getSqlVariableName($var) - - - - protected function getSqlVariableNameValue($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_value'] = - 'value_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_value']; - }//protected function getSqlVariableNameValue($var) - - - - protected function getSqlVariableNameIs($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_is'] = - 'is_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_is']; - }//protected function getSqlVariableNameIs($var) - - - - protected function getSqlVariableNameLanguage($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_lang'] = - 'lang_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_lang']; - }//protected function getSqlVariableNameLanguage($var) - - - - protected function getSqlVariableNameDatatype($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_type'] = - 'type_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_type']; - }//protected function getSqlVariableNameDatatype($var) - - - - public function setStatementsTable($tblStatements) - { - $this->tblStatements = $tblStatements; - }//public function setStatementsTable($tblStatements) - -}//class SparqlEngineDb_SqlGenerator -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGeneratorException.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGeneratorException.php.svn-base deleted file mode 100755 index fd3d14f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlGeneratorException.php.svn-base +++ /dev/null @@ -1,14 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlGeneratorException extends Exception -{ -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlMerger.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlMerger.php.svn-base deleted file mode 100755 index 53e0685c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/SqlMerger.php.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlMerger -{ - public static function getSelect(Query $query, $arSqls, $strAdditional = '') - { - if (count($arSqls) == 1) { - return implode('', $arSqls[0]) . $strAdditional; - } - - //union - $strUnion = 'UNION' . - ($query->getResultForm() == 'select distinct' ? '' : ' ALL'); - $ar = array(); - foreach ($arSqls as $arSql) { - $ar[] = implode('', $arSql) . $strAdditional; - } - return '(' . implode(') ' . $strUnion . ' (', $ar) . ')'; - }//public static function getSelect(Query $query, $arSqls, $strAdditional = '') - - - - public static function getCount(Query $query, $arSqls, $strAdditional = '') - { - if (count($arSqls) == 1) { - return 'SELECT COUNT(*) as count ' . $arSqls[0]['from'] . $arSqls[0]['where'] . $strAdditional; - } - - $ar = array(); - foreach ($arSqls as $arSql) { - $ar[] = implode('', $arSql) . $strAdditional; - } - return 'SELECT (' . implode(') + (', $ar) . ') as count'; - }//public static function getCount(Query $query, $arSqls, $strAdditional = '') - -}//class SparqlEngineDb_SqlMerger - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/TypeSorter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/TypeSorter.php.svn-base deleted file mode 100755 index 8efc4ef4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/.svn/text-base/TypeSorter.php.svn-base +++ /dev/null @@ -1,450 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_TypeSorter -{ - /** - * Defines the sort order for value types in the database, - * so that they get sorted correctly as the specs want it. - * @var array - */ - public static $arTypeNumbers = array( - null => 0,//empty - 'b' => 1,//blank - 'r' => 2,//resource - 'l' => 3,//literal - ); - - /** - * SQL types to cast XSD schema types to, so that they will get - * sorted correctly. - * @var array - */ - public static $arCastTypes = array( - 'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER', - 'http://www.w3.org/2001/XMLSchema#decimal' => 'DECIMAL', - //yes, this does not work with multiple time zones. - 'http://www.w3.org/2001/XMLSchema#dateTime' => 'CHAR', - 'http://www.w3.org/2001/XMLSchema#date' => 'CHAR', - ); - - - - public function __construct(Query $query, ADOConnection $dbConn) - { - $this->dbConn = $dbConn; - $this->query = $query; - } - - - /** - * Needs to be executed before getOrderifiedSqls and willBeDataDependent - * - * @param SparqlEngineDb_SqlGenerator $sg SQL generator object - */ - public function setData(SparqlEngineDb_SqlGenerator $sg) - { - $this->arUsedVarTypes = $sg->getUsedVarTypes(); - $this->arUsedVarAssignments = $sg->getUsedVarAssignments(); - $this->arVarAssignments = $sg->getVarAssignments(); - }//public function setData(SparqlEngineDb_SqlGenerator $sg) - - - - /** - * Returns an array of sql statements that need to be executed - * and deliver the full result set when combined. - * - * Execute setData() before this. - * - * @internal It is not possible (ok, it is - but it would really complicate - * the queries and the code here) to use UNION to combine the sqls to - * a single one - UNION merges the results and does not keep the order - * of the rows. Citing the mysql manual: - * Use of ORDER BY for individual SELECT statements implies nothing - * about the order in which the rows appear in the final result because - * UNION by default produces an unordered set of rows. If ORDER BY - * appears with LIMIT, it is used to determine the subset of the - * selected rows to retrieve for the SELECT, but does not necessarily - * affect the order of those rows in the final UNION result. - * If ORDER BY appears without LIMIT in a SELECT, it is - * optimized away because it will have no effect anyway. - * - * @param string $strSelect SELECT clause - * @param string $strFrom FROM clause - * @param string $strWhere WHERE clause - * @return array Array of arrays. Imploding an array will give - * a complete sql statement. The array will have the keys - * select/from/where/order. - */ - public function getOrderifiedSqls($arSqls) - { - if (count($arSqls) == 0) { - return $arSqls; - } - - $strSelect = $arSqls[0]['select']; - $strFrom = $arSqls[0]['from']; - $strWhere = $arSqls[0]['where']; - - $strResultForm = $this->query->getResultForm(); - if ($strResultForm == 'ask' || $strResultForm == 'count') { - return array( - $arSqls - ); - } - - $arSpecial = $this->getSpecialOrderVariables(); - if (count($arSpecial) == 0) { - $strOrder = $this->getSqlOrderBy(); - foreach ($arSqls as &$arSql) { - $arSql['order'] = $strOrder; - } - return array( - $arSqls - ); - } - - $arTypeSets = $this->orderTypeSets( - $this->getTypeSets($arSpecial, $strFrom, $strWhere) - ); - - $arNewSqls = array(); - foreach ($arTypeSets as $arTypeSet) { - $arSqlParts = array(); - foreach ($arSqls as $arSql) { - $arSql['where'] .= $this->getTypesetWhereClause($arTypeSet); - $arSql['order'] = $this->getSqlOrderBy($arTypeSet); - $arSqlParts[] = $arSql; - } - $arNewSqls[] = $arSqlParts; - } - - return $arNewSqls; - }//public function getOrderifiedSqls($arUsedVarAssignments, $strSelect, $strFrom, $strWhere) - - - - /** - * Returns wether the returned queries will depend on the data or not. - * If the queries depend on the data, they cannot be prepare()d and - * thus won't be that fast when executing. - * - * Execute setData() before this. - * - * @return boolean - */ - public function willBeDataDependent() - { - $strResultForm = $this->query->getResultForm(); - return !( - $strResultForm == 'ask' || $strResultForm == 'count' - || count($this->getSpecialOrderVariables()) == 0 - ); - }//public function willBeDataDependent() - - - - /** - * Returns an array of variables that the result is going to be - * ordered by and that need to be sorted multiple times - * (because they may contain different data types) - * - * @return array Array of sparql variable names - */ - protected function getSpecialOrderVariables() - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] === null) { - return array(); - } - - $arSpecial = array(); - foreach ($arSM['order by'] as $arVar) { - if ($this->isSpecialOrderVariable($arVar['val'])) { - $arSpecial[] = $arVar['val']; - } - } - return $arSpecial; - }//protected function getSpecialOrderVariables() - - - - /** - * Checks if a given variable name is a variable that - * needs special care when used in ORDER BY statements. - * - * @param string $strVar SPARQL variable name - * @return boolean true if the variable needs special care - */ - protected function isSpecialOrderVariable($strVar) - { - return !isset($this->arUsedVarTypes[$strVar]['s']) - && !isset($this->arUsedVarTypes[$strVar]['p']); - }//protected function isSpecialOrderVariable($arVar) - - - - /** - * Determines the type sets in the query results. - * A type set is a distinct set of variables and their types, - * e.g. the variable and its type (r/b/l) and its datatype - * if its an object. - * - * @param array $arSpecialVars Special variables as returned by - * getSpecialOrderVariables() - * @param string $strFrom FROM part of the sql query - * @param string $strWhere WHERE part of the sql query - * - * @return array Key is the sparql variable name, value is an - * array. This one has one key 'type' with a - * value of b/l/r. It might have another key - * 'datatype' with the resource's datatype. - */ - protected function getTypeSets($arSpecialVars, $strFrom, $strWhere) - { - $arSel = array(); - foreach ($arSpecialVars as $strSparqlVar) { - if ($this->arVarAssignments[$strSparqlVar][1] == 'o') { - $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.l_datatype' - . ' as "' . $strSparqlVar . '-datatype"'; - } - $strTypeCol = $this->arVarAssignments[$strSparqlVar][1] == 'o' - ? 'object_is' : 'subject_is'; - $this->arVarAssignments[$strSparqlVar][2] = $strTypeCol; - $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.' . $strTypeCol - . ' as "' . $strSparqlVar . '-type"'; - } - - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - $sql = 'SELECT DISTINCT ' . implode(', ', $arSel) . ' ' . $strFrom . $strWhere; - $arResult = $this->dbConn->execute($sql); - $this->dbConn->SetFetchMode($oldmode); - - if ($arResult === false) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Error reading typesets: ' . $sql - ); - } - - $arTypes = array(); - foreach ($arResult as $arRow) { - $nLine = count($arTypes); - foreach ($arRow as $key => $value) { - list($strSparqlVar, $strType) = explode('-', $key); - $arTypes[$nLine][$strSparqlVar][$strType] = $value; - } - } - - return $arTypes; - }//protected function getTypeSets($arSpecialVars, $strFrom, $strWhere) - - - - /** - * Takes an array of type sets (as returned by getTypeSets()) and - * sorts the variables according to the SPARQL specs. - * - * @param array $arTypes Array of type sets - * @return array Ordered array of type sets - */ - protected function orderTypeSets($arTypes) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] !== null) { - $this->arDirection = array(); - foreach ($arSM['order by'] as $arVar) { - $this->arDirection[$arVar['val']] = - (strtoupper($arVar['type']) == 'ASC' ? 1 : -1); - } - } - - usort($arTypes, array($this, 'compareTypeSet')); - - return $arTypes; - }//protected function orderTypeSets($arTypes) - - - - /** - * Compares two type sets. Works like a normal comparision - * method that returns -1/0/1 for use in usort() - * - * @param array $arTs1 First typeset - * @param array $arTs2 Second typeset - * @return int Comparison value - */ - public function compareTypeSet($arTs1, $arTs2) - { - foreach ($arTs1 as $strSparqlVar => $arType1) { - //compare types - $n = self::$arTypeNumbers[$arType1['type']] - - self::$arTypeNumbers[$arTs2[$strSparqlVar]['type']]; - if ($n != 0) { - //and take ASC/DESC into account - return $n * $this->arDirection[$strSparqlVar]; - } - - //compare the datatypes - $n = self::compareXsdType( - $arType1['datatype'], - $arTs2[$strSparqlVar]['datatype'] - ); - //if they are not equal, return the value - if ($n != 0) { - //and take ASC/DESC into account - return $n * $this->arDirection[$strSparqlVar]; - } - } - - //they are equal - return 0; - }//public function compareTypeSet($arTs1, $arTs2) - - - - /** - * Compares two XSD data types and returns the comparison number. - * - * @param string $strType1 First data type - * @param string $strType2 Second data type - * @return int Comparison number (<0 if $strType1 is less than - * $strType2, 0 if equal, >0 if type2 is greater) - */ - public static function compareXsdType($strType1, $strType2) - { - return self::getXsdTypeNumber($strType1) - self::getXsdTypeNumber($strType2); - }//public static function compareXsdType($strType1, $strType2) - - - - /** - * Returns the type number for an xsd data type. - * - * @param string $strType XSD data type - * @return int Some integer to compare two types. - */ - public static function getXsdTypeNumber($strType) - { - if ($strType === null) { - return 0; - } else if ($strType == '') { - return 1; - } else { - return 2; - } - }//public static function getXsdTypeNumber($strType) - - - - /** - * Returns the ORDER BY sql query string - * if neccessary for the query. The returned string - * already has ORDER BY prefixed. - * - * @internal Also takes care of casting the data if the type - * is listed in $arCastTypes. See getCastMethod() for more info. - * - * @param arrray $arTypeSet Single typeset - * @return string ORDER BY ... string or empty string - */ - function getSqlOrderBy($arTypeSet = array()) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] === null) { - return ''; - } - - $sqlOrder = array(); - foreach ($arSM['order by'] as $arVar) { - $strSparqlVar = $arVar['val']; - if (isset($this->arUsedVarAssignments[$strSparqlVar])) { - if (!isset($arTypeSet[$strSparqlVar]['datatype']) - || $arTypeSet[$strSparqlVar]['datatype'] == '') { - $sqlOrder[] = $this->arUsedVarAssignments[$strSparqlVar] . ' ' . strtoupper($arVar['type']); - } else { - $sqlOrder[] = self::getCastMethod( - $arTypeSet[$strSparqlVar]['datatype'], - $this->arUsedVarAssignments[$strSparqlVar] - ) . ' ' . strtoupper($arVar['type']); - } - } - } - - return ' ORDER BY ' . implode(', ', $sqlOrder); - }//function getSqlOrderBy($arTypeSet = array()) - - - - /** - * Returns the SQL statement needed to case the given variable to - * the given type. - * - * @param string $strType XML data type - * @param string $strSqlVar SQL variable name - * @return string SQL command to cast the variable - */ - protected static function getCastMethod($strType, $strSqlVar) - { - if (isset(self::$arCastTypes[$strType])) { - return 'CAST(' . $strSqlVar . ' as ' . self::$arCastTypes[$strType] . ')'; - } else { - //unsupported type! - throw new Exception('Unsupported cast type in order by: ' . $strType); - return $strSqlVar; - } - }//protected static function getCastMethod($strType, $strSqlVar) - - - - /** - * Creates and returns the SQL WHERE clauses needed to get only - * data in the given typeset. - * - * @param array $arTypeSet Typeset - * @return string Clauses for the WHERE part in an SQL query - */ - protected function getTypesetWhereClause($arTypeSet) - { - $strWhereTypes = ''; - foreach ($arTypeSet as $strSparqlVar => $arType) { - //check type - $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0] - . '.' . $this->arVarAssignments[$strSparqlVar][2] - . $this->getStringNullComparison($arType['type']); - //check datatype - if (isset($arType['datatype'])) { - $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0] - . '.l_datatype ' - . $this->getStringNullComparison($arType['datatype']); - } - } - return $strWhereTypes; - }//protected function getTypesetWhereClause($arTypeSet) - - - - /** - * Returns the correct sql string comparison method. - * - * @internal If the string is NULL, an "IS NULL" sql statment - * will be returned, and a normal "= 'something'" if it is - * a normal string. - */ - protected function getStringNullComparison($str) - { - if ($str === null) { - return ' IS NULL'; - } else { - return ' = ' . $this->dbConn->qstr($str) . ''; - } - }//protected function getStringNullComparison($str) - -}//class SparqlEngineDb_TypeSorter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/FilterGenerator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/FilterGenerator.php deleted file mode 100755 index 501aeb5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/FilterGenerator.php +++ /dev/null @@ -1,846 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_FilterGenerator -{ - /** - * SQL Generator - * @var SparqlEngineDb_SqlGenerator - */ - protected $sg = null; - - /** - * If the filter is in an optional statement - * @var boolean - */ - protected $bOptional = false; - - /** - * Number of parameters for the functions supported. - * First value is minimum, second is maximum. - * @var array - */ - protected static $arFuncParamNumbers = array( - 'bound' => array(1, 1), - 'datatype' => array(1, 1), - 'isblank' => array(1, 1), - 'isiri' => array(1, 1), - 'isliteral' => array(1, 1), - 'isuri' => array(1, 1), - 'lang' => array(1, 1), - 'langmatches' => array(2, 2), - 'regex' => array(2, 3), - 'sameterm' => array(2, 2), - 'str' => array(1, 1), - 'xsd:datetime' => array(1, 1), - ); - - /** - * List of operators and their counterpart if operands are switched. - * (a > b) => (b < a) - * @var array - */ - protected static $arOperatorSwitches = array( - '>' => '<', - '<' => '>', - '>=' => '<=', - '<=' => '>=', - ); - - protected static $arDumbOperators = array( - '&&', '||' - ); - - protected static $typeXsdBoolean = 'http://www.w3.org/2001/XMLSchema#boolean'; - protected static $typeXsdDateTime = 'http://www.w3.org/2001/XMLSchema#dateTime'; - protected static $typeXsdDouble = 'http://www.w3.org/2001/XMLSchema#double'; - protected static $typeXsdInteger = 'http://www.w3.org/2001/XMLSchema#integer'; - protected static $typeXsdString = 'http://www.w3.org/2001/XMLSchema#string'; - protected static $typeVariable = 'variable'; - - - - public function __construct(SparqlEngineDb_SqlGenerator $sg) - { - $this->sg = $sg; - }//public function __construct(SparqlEngineDb_SqlGenerator $sqlgen) - - - - /** - * Creates the SQL representing a Sparql FILTER. - * - * @param array $tree Filter element tree as returned by - * SparqlParser::parseConstraintTree() - * @param boolean $bOptional If the filter is in an optional statement - * @return string SQL WHERE part with prefixed AND - */ - public function createFilterSql($tree, $bOptional, $nUnionCount) - { - if (count($tree) == 0) { - //empty filter pattern? - return ''; - } - - $this->bOptional = $bOptional; - $this->nUnionCount = $nUnionCount; - - return ' AND ' . $this->createTreeSql($tree, null); - }//public function createFilterSql($tree) - - - - /** - * - */ - protected function createTreeSql($tree, $parent) - { - switch ($tree['type']) { - case 'equation': - $sql = $this->createEquation($tree); - break; - case 'value': - if ($parent != null) { - $bDumbParent = $parent['type'] == 'equation' - && in_array($parent['operator'], self::$arDumbOperators); - } else { - $bDumbParent = true; - } - $sql = $this->createValue($tree, $bDumbParent); - break; - case 'function': - $sql = $this->createFunction($tree); - break; - default: - //var_dump($tree); - throw new SparqlEngineDb_SqlGeneratorException('Unsupported tree type: ' . $tree['type']); - break; - } - - if (isset($tree['negated'])) { - $sql = '!(' . $sql . ')'; - } - - return $sql; - }//protected function createTreeSql($tree, $strParentType) - - - - /** - * Creates the sql for an element of type "value". - * - * @param array $tree Element - * @param boolean $bDumbParent True if the parent is a boolean equation or null. - */ - protected function createValue($tree, $bDumbParent) - { - $strValue = stripslashes($tree['value']); - if (SparqlVariable::isVariable($strValue)) { - if (!isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$strValue])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unknown variable in filter: ' . $strValue - ); - } - - if ($bDumbParent) { - return $this->createBooleanValue($tree); - } else if ($this->isObject($tree)) { - //convert datetime to datetime if necessary - return self::mkVal( - '(CASE' - . ' WHEN ' . $this->getDatatypeCol($tree) . ' = "' . self::$typeXsdBoolean . '"' - . ' THEN IF(LOWER(' . $this->getValueCol($tree) . ') = "true", TRUE, FALSE)' - . ' ELSE ' . $this->getValueCol($tree) - . ' END)', - self::$typeVariable - ); - } else { - return self::mkVal( - $this->getValueCol($tree), - self::$typeVariable - ); - } - } - - if ($this->isNumber($tree)) { - return $strValue; - } else if ($tree['quoted'] === false && - (!isset($tree['datatype']) || $tree['datatype'] != self::$typeXsdBoolean) - ) { - $strValueNew = $this->sg->query->getFullUri($strValue); - if ($strValueNew === false) { - if ($strValue[0] == '<' && substr($strValue, -1) == '>') { - $strValue = substr($strValue, 1, -1); - } else { -var_dump($tree); - throw new SparqlEngineDb_SqlGeneratorException( - 'Unexpected value "' . $strValue . '" (expected datatype)' - ); - } - } else { - $strValue = $strValueNew; - } - } else if (isset($tree['datatype'])) { - switch ($tree['datatype']) { - case self::$typeXsdBoolean: - if (strtolower($strValue) == 'false') { - //fix: (bool)"false" === true - $strValue = false; - } - return self::mkVal( - (bool)$strValue ? 'TRUE' : 'FALSE', - self::$typeXsdBoolean - ); - - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported datatype "' . $tree['datatype'] - ); - } - } - - return self::mkVal( - '"' . addslashes($strValue) . '"', - self::$typeXsdString - ); - }//protected function createValue($tree) - - - - protected function createBooleanValue($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - if (!$this->isObject($tree)) { - //Maybe needs a fix - $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType]['value']; - return self::mkVal( - $strTable . '.' . $strSqlCol . ' != ""', - self::$typeXsdBoolean - ); - } - - $cType = $strTable . '.l_datatype'; - $cValue = $strTable . '.object'; - $xsd = 'http://www.w3.org/2001/XMLSchema'; - - return self::mkVal( - '(' - . "(($cType = '' || $cType = '$xsd#string') AND $cValue != '')" - . " OR ($cType = '$xsd#boolean' AND $cValue != 'false')" - . " OR (($cType = '$xsd#integer' || $cType = '$xsd#double') AND CAST($cValue AS DECIMAL(15,10)) != 0)" - //plain check for all unknown datatypes - . " OR ($cType != '' AND $cType != '$xsd#string' AND $cType != '$xsd#boolean' AND $cType != '$xsd#integer' AND $cType != '$xsd#double' AND $cValue != '')" - . ')', - self::$typeXsdBoolean - ); - }//protected function createBooleanValue($tree) - - - - protected function createFunction($tree) - { - $strFuncName = strtolower($tree['name']); - if (!isset(self::$arFuncParamNumbers[$strFuncName])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported FILTER function: ' . $strFuncName - ); - } - - $nParams = count($tree['parameter']); - if ($nParams < self::$arFuncParamNumbers[$strFuncName][0] - || $nParams > self::$arFuncParamNumbers[$strFuncName][1] - ) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Wrong parameter count for FILTER function: ' . $strFuncName - . ' (got ' . $nParams . ', expected ' - . self::$arFuncParamNumbers[$strFuncName][0] - . '-' . self::$arFuncParamNumbers[$strFuncName][1] - ); - } - - $strThisFunc = 'createFunction_' . str_replace(':', '_', $strFuncName); - return $this->$strThisFunc($tree); - }//protected function createFunction($tree) - - - - protected function createEquation($tree) - { - $strExtra = ''; - $strIsNull = ''; - $strIsNullEnd = ''; - - if (($this->isNumber($tree['operand1']) || $this->isPlainString($tree['operand1'])) - && $this->isObject($tree['operand2']) - ) { - //switch operands and operator - $tmp = $tree['operand1']; - $tree['operand1'] = $tree['operand2']; - $tree['operand2'] = $tmp; - $tree['operator'] = self::switchOperator($tree['operator']); - } - - $val1 = $this->createTreeSql($tree['operand1'], $tree); - $val2 = $this->createTreeSql($tree['operand2'], $tree); - - if ($this->isObject($tree['operand1'])) { - if ($this->bOptional) { - $strIsNull = '('; - $strIsNullEnd = ' OR ' . $val1 . ' IS NULL)'; - } - if (isset($tree['operand2']['language'])) { - $strColLanguage = $this->getLangCol($tree['operand1']); - $strExtra .= ' AND ' . $strColLanguage . ' = "' - . addslashes($tree['operand2']['language']) - . '"'; - } - - if ($this->isNumber($tree['operand2'])) { - $strColDatatype = $this->getDatatypeCol($tree['operand1']); - $strExtra .= ' AND (' . $strColDatatype . ' = "' . self::$typeXsdDouble . '"' - . ' OR ' . $strColDatatype . ' = "' . self::$typeXsdInteger . '"' - . ')'; - return $strIsNull . '(' - . 'CAST(' . $val1 . ' AS DECIMAL(15,10))' - . ' ' . $tree['operator'] . ' ' - . $val2 - . $strExtra - . ')' . $strIsNullEnd; - } - } - - //I don't check the operator since it is already checked in the parser - return $strIsNull . '(' - . '(' - . $val1 - . ' ' . $tree['operator'] . ' ' - . $val2 - . $strExtra - . ')' - . $this->createTypeEquation( - $tree['operator'], $val1, $val2, - $tree['operand1'], $tree['operand2'] - ) - . ')' . $strIsNullEnd; - }//protected function createEquation($tree) - - - - /** - * Generates sql code to make sure the datatypes of the two operands match - */ - protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2) - { - if (in_array($operator, array('&&', '||'))) { - return ''; - } - - if ($val1->type != self::$typeVariable && $val2->type != self::$typeVariable) { - //both are not variables -> type needs to be the same - return $val1->type == $val2->type ? '' : ' AND FALSE'; - } - $so1 = $this->isObjectOrSubject($tree1); - $so2 = $this->isObjectOrSubject($tree2); - $o1 = $this->isObject($tree1); - $o2 = $this->isObject($tree2); - - if ($so1 && $so2) { - $sql = ' AND ' . $this->getIsCol($tree1) . ' = ' . $this->getIsCol($tree2); - if ($o1 && $o2) { - //maybe needs string fix - $sql .= ' AND ' . $this->getDatatypeCol($tree1) . ' = ' - . $this->getDatatypeCol($tree2); - } - return $sql; - } - - if ($o1 && $val2->type != self::$typeVariable) { - return $this->createSingleTypeCheck($val2, $tree1); - } else if ($o2 && $val1->type != self::$typeVariable) { - return $this->createSingleTypeCheck($val1, $tree2); - } - - //fixme - return ''; - }//protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2) - - - - /** - * Creates sql to ensure the type between $val and variable $tree - * is the same. - */ - protected function createSingleTypeCheck($val, $tree) - { - if ($val->type == self::$typeXsdString) { - //string can be empty type or xsd type - return ' AND (' - . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"' - . ' OR ' - . $this->getDatatypeCol($tree) . ' = ""' - . ')'; - } - return ' AND ' . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"'; - }//protected function createSingleTypeCheck($val, $tree) - - - - /* - * SQL generation functions - */ - - - - /** - * Creates an sql statement that returns if the element is a blank node - */ - protected function createFunction_bound($tree) - { - if ($this->isVariable($tree['parameter'][0])) { - return self::mkVal( - $this->getValueCol($tree['parameter'][0]) . ' IS NOT NULL', - self::$typeXsdBoolean - ); - } - - //We'll see which other cases occur here - return self::mkVal('TRUE', self::$typeXsdBoolean); - }//protected function createFunction_bound($tree) - - - - protected function createFunction_datatype($tree) - { - if (!$this->isObject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'datatype\'s first parameter needs to be an object' - ); - } - - return self::mkVal( - $this->getDatatypeCol($tree['parameter'][0]), - self::$typeXsdString - ); - }//protected function createFunction_datatype($tree) - - - - /** - * Creates an sql statement that returns if the element is a blank node - */ - protected function createFunction_isblank($tree) - { - if (!$this->isObjectOrSubject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'isBlank\'s first parameter needs to be an object or subject' - ); - } - - return self::mkVal( - $this->getIsCol($tree['parameter'][0]) . ' = "b"', - self::$typeXsdBoolean - ); - }//protected function createFunction_isblank($tree) - - - - protected function createFunction_isiri($tree) - { - return $this->createFunction_isuri($tree); - }//protected function createFunction_isiri($tree) - - - - /** - * Creates an sql statement that returns the language of the object - */ - protected function createFunction_isliteral($tree) - { - if ($this->isObjectOrSubject($tree['parameter'][0])) { - return $this->getIsCol($tree['parameter'][0]) . ' = "l"'; - } - - //This does not take combined functions into account (subfunctions) - return self::mkVal( - $this->isPlainString($tree) ? 'TRUE' : 'FALSE', - self::$typeXsdBoolean - ); - }//protected function createFunction_isliteral($tree) - - - - protected function createFunction_isuri($tree) - { - if ($this->isObjectOrSubject($tree['parameter'][0])) { - return self::mkVal( - $this->getIsCol($tree['parameter'][0]) . ' = "r"', - self::$typeXsdBoolean - ); - } else { - //predicates are iris - return self::mkVal('TRUE', self::$typeXsdBoolean); - } - }//protected function createFunction_isuri($tree) - - - - /** - * Creates an sql statement that returns the language of the object - */ - protected function createFunction_lang($tree) - { - if (!$this->isObject($tree['parameter'][0])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'lang\'s first parameter needs to be an object' - ); - } - return self::mkVal( - $this->getLangCol($tree['parameter'][0]), - self::$typeXsdString - ); - }//protected function createFunction_lang($tree) - - - - /** - * Creates an sql statement that checks if the variable - * matches a given language - */ - protected function createFunction_langmatches($tree) - { - //those two restrictions are needed until we have a mysql-only - // langmatches function - if ($tree['parameter'][0]['type'] != 'function' - || $tree['parameter'][0]['name'] != 'lang' - ) { - throw new SparqlEngineDb_SqlGeneratorException( - 'langMatches\' first parameter needs to be a lang() function' - ); - } - - if (!$this->isPlainString($tree['parameter'][1])) { - throw new SparqlEngineDb_SqlGeneratorException( - 'langMatches\' second parameter needs to be a string' - ); - } - - $lang = $tree['parameter'][1]['value']; - $col = $this->createTreeSql($tree['parameter'][0], $tree); - - switch ($lang) { - case '*': - //anything but nothing - $sql = $col . ' != ""'; - break; - case '': - //nothing - $sql = $col . ' = ""'; - break; - default: - //language, maybe with different subcode - // en -> en, en-US - $sql = '(' . $col . ' = "' . addslashes($lang) . '" OR ' - . $col . ' LIKE "' . addslashes($lang) . '-%")'; - break; - } - - return self::mkVal($sql, self::$typeXsdBoolean); - }//protected function createFunction_isuri($tree) - - - - /** - * Creates an sql statement that checks if the given part matches - * an regex - */ - protected function createFunction_regex($tree) - { - $strVar = $this->createTreeSql($tree['parameter'][0], $tree); - $strRegex = $this->createTreeSql($tree['parameter'][1], $tree); - - if (isset($tree['parameter'][2])) { - //is quoted - $strMod = $this->createTreeSql($tree['parameter'][2], $tree); - switch ($strMod) { - case '': - case '""': - $sql = $strVar . ' REGEXP ' . $strRegex; - break; - - case '"i"': - $sql = 'CAST(' . $strVar . ' AS CHAR) REGEXP ' . $strRegex; - break; - - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported regex modifier "' - . $strMod - . '"' - ); - } - } else { - $sql = $strVar . ' REGEXP ' . $strRegex; - } - - if ($this->isObject($tree['parameter'][0])) { - $col = $this->getIsCol($tree['parameter'][0]); - $sql = "($sql AND $col = 'l')"; - } - - return self::mkVal($sql, self::$typeXsdBoolean); - }//protected function createFunction_regex($tree) - - - - /** - * Creates an sql statement that checks if both terms are the same - */ - protected function createFunction_sameterm($tree) - { - //FIXME: dead simple implementation that does not cover all cases - return self::mkVal( - $this->createTreeSql($tree['parameter'][0], $tree) - . ' = ' - . $this->createTreeSql($tree['parameter'][1], $tree), - self::$typeXsdBoolean - ); - }//protected function createFunction_sameterm($tree) - - - - /** - * Creates an sql statement that returns the string representation - * of the given element - */ - protected function createFunction_str($tree) - { - if ($this->isObject($tree['parameter'][0])) { - return self::mkVal( - '(CASE ' . $this->getIsCol($tree['parameter'][0]) - . ' WHEN "b" THEN ""' - . ' ELSE ' . $this->getValueCol($tree['parameter'][0]) - . ' END)', - self::$typeXsdString - ); - } - - return $this->createTreeSql($tree['parameter'][0], $tree); - }//protected function createFunction_str($tree) - - - - /** - * Creates an sql statement that returns the datetime representation - * of the given element - */ - protected function createFunction_xsd_datetime($tree) - { - $val = $this->createTreeSql($tree['parameter'][0], $tree); - if ($val->type == self::$typeXsdDateTime - || $val->type == self::$typeVariable) { - //no need to cast again - return $val; - } - return self::mkVal( - $this->getDateConversionSql($val), - self::$typeXsdDateTime - ); - }//protected function createFunction_xsd_datetime($tree) - - - - - /* - * Helper methods - */ - - - - protected static function mkVal($value, $type = null) { - return new SparqlEngineDb_FilterGenerator_Value($value, $type); - } - - - - protected function getCol($tree, $type) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - if (!isset(SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type])) { - return false; - } - $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type]; - return $strTable . '.' . $strSqlCol; - } - - - - protected function getDatatypeCol($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - return $strTable . '.l_datatype'; - } - - - - protected function getDateConversionSql($strValue) - { - return 'STR_TO_DATE(' . $strValue . ', "%Y-%m-%dT%H:%i:%sZ")'; - }//protected function getDateConversionSql($strValue) - - - - protected function getIsCol($tree) - { - return $this->getCol($tree, 'is'); - } - - - - protected function getLangCol($tree) - { - list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]; - return $strTable . '.l_language'; - } - - - - protected function getValueCol($tree) - { - return $this->getCol($tree, 'value'); - } - - - - protected function isNumber($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === false - && preg_match('#^[0-9.]+$#', $tree['value']) - && floatval($tree['value']) == $tree['value']; - }//protected function isNumber($tree) - - - - /** - * Checks if the given tree element is a variable - * and the variable is actually an object in the database. - * - * @param array $tree Tree element - * @return boolean True if the element is an object - */ - protected function isObject($tree) - { - return $this->isVariable($tree) - && $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o'; - }//protected function isVariable($tree) - - - - /** - * Checks if the given tree element is a variable - * and the variable is actually an object or a subject in the database. - * - * @param array $tree Tree element - * @return boolean True if the element is an object or an subject - */ - protected function isObjectOrSubject($tree) - { - return $this->isVariable($tree) - && ( - $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o' - || $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 's' - ); - }//protected function isObjectOrSubject($tree) - - - - /** - * Checks if the given tree element is a plain string (no variable) - * - * @param array $tree Tree element - * @return boolean True if the element is a string - */ - protected function isPlainString($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === true; - }//protected function isPlainString($tree) - - - - protected function isValueButNotVariableNorString($tree) - { - return $tree['type'] == 'value' - && $tree['type']['quoted'] === false - && !SparqlVariable::isVariable($tree['value']); - }//protected function isValueButNotVariableNorString($tree) - - - - /** - * Checks if the given tree element is a variable - * - * @param array $tree Tree element - * @return boolean True if the element is a variable - */ - protected function isVariable($tree) - { - return $tree['type'] == 'value' - && $tree['quoted'] === false - && SparqlVariable::isVariable($tree['value']) - && isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]); - }//protected function isVariable($tree) - - - - protected static function switchOperator($op) - { - if (!isset(self::$arOperatorSwitches[$op])) { - return $op; - } else { - return self::$arOperatorSwitches[$op]; - } - }//protected static function switchOperator($op) - -}//class SparqlEngineDb_FilterGenerator - - - - -/** -* Value class that holds some arbitrary value -* and a datatype. -* Objects of this class can transparently be used in strings since -* its __toString() returns the value. -*/ -class SparqlEngineDb_FilterGenerator_Value -{ - public $value = null; - public $type = null; - - - - public function __construct($value, $type = null) - { - $this->value = $value; - $this->type = $type; - } - - - - public function __toString() - { - return $this->value; - } - -}//class SparqlEngineDb_FilterGenerator_Value - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Offsetter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Offsetter.php deleted file mode 100755 index c4ff226a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Offsetter.php +++ /dev/null @@ -1,102 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_Offsetter -{ - public function __construct(ADOConnection $dbConn, Query $query) - { - $this->dbConn = $dbConn; - $this->query = $query; - }//public function __construct(ADOConnection $dbConn, Query $query) - - - - /** - * Determines the offset in the sqls, the position to start form. - * - * @param array $arSqls Array of SQL query parts as returned by - * SparqlEngine_TypeSorter::getOrderifiedSqls() - * @return array Array of two values: The first determines the - * index of the sql query to begin with, the second - * is the row offset that should be used in the final - * SQL query. - */ - public function determineOffset($arSqls) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['offset'] === null) { - return array(0, 0); - } - - $nCount = 0; - foreach ($arSqls as $nId => $arSql) { - $nCurrentCount = $this->getCount($arSql); - if ($nCurrentCount + $nCount > $arSM['offset']) { - return array($nId, $arSM['offset'] - $nCount); - } - $nCount += $nCurrentCount; - } - //nothing found - no results for this offset - return array(count($arSqls), 0); - }//public function determineOffset($arSql) - - - - /** - * Returns the number of rows that the given query will return. - * - * @param array $arSql Array with sql parts and at least keys - * 'from' and 'where' set. - * @return int Number of rows returned. - */ - protected function getCount($arSql) - { - $sql = SparqlEngineDb_SqlMerger::getCount($this->query, $arSql); - $dbResult = $this->dbConn->execute($sql); - - $nCount = 0; - foreach ($dbResult as $row) { - $nCount = intval($row[0]); - break; - } - return $nCount; - }//protected function getCount($arSql) - - - - /** - * Creates a sql LIMIT statement if the sparql query needs one. - * This method is needed because AdoDb does not support limits with - * prepared statements. It's a pity. - * - * @return string SQL command to be appended to a query, to limit - * the number of result rows returned. - */ - public static function getLimitSql(Query $query, ADOConnection $dbConn) - { - $arSM = $query->getSolutionModifier(); - if ($arSM['limit'] === null && $arSM['offset'] === null) { - return ''; - } - //this here is mysql syntax. if anyone has problems, write it - //dependent on $dbConn's type - if ($arSM['offset'] === null) { - return ' LIMIT ' . $arSM['limit']; - } else if ($arSM['limit'] === null) { - return ' LIMIT ' . $arSM['offset'] . ', 18446744073709551615'; - } else { - return ' LIMIT ' . $arSM['offset'] . ', ' . $arSM['limit']; - } - }//public static function getLimitSql(Query $query, ADOConnection $dbConn) - -}//class SparqlEngineDb_Offsetter - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Preparator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Preparator.php deleted file mode 100755 index bedd8b6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/Preparator.php +++ /dev/null @@ -1,229 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_Preparator -{ - - - - public function __construct(Query $query, ADOConnection $dbConn) - { - $this->query = $query; - $this->dbConn = $dbConn; - $this->arPrefixes = $this->query->getPrefixes(); - }//public function __construct(Query $query, ADOConnection $dbConn) - - - - /** - * Converts the given queries into sql prepared statments, - * calls the prepare command in the database and returns - * an array consisting of subarrays. They contain - * the db's prepared statement as first value, and an array - * of variable positions as second value (key is the position, - * the sparql variable is the value). - * - * @param array $arQueries Array of sql queries part arrays - * @param array $arPlaceholders Array of sparql (variable name => - * placeholder name) pairs - * @return array Array of (prepared statment, variable positions) pairs - */ - public function prepareInDb($arQueries, $arPlaceholders) - { - $arDbStatements = array(); - - foreach ($arQueries as $arQuery) { - list($strPrepared, $arVariablePositions) = $this->replacePlaceholders( - implode('', $arQuery), - $arPlaceholders - ); - if (count($arQueries) == 1) { - //I currently haven't seens one case in which the count was > 1 - //if that happens, we will need to add a fix - $strPrepared .= SparqlEngineDb_Offsetter::getLimitSql( - $this->query, - $this->dbConn - ); - } - $stmt = $this->dbConn->Prepare($strPrepared); - $arDbStatements[] = array( - $stmt, - $arVariablePositions - ); - } - - return $arDbStatements; - }//public function prepareInDb($arQueries, $arPlaceholders) - - - - /** - * Replaces the placeholders in the given SQL statement with real - * SQL prepared statements placeholders. - * - * @param string $strQuery SQL query with placeholders - * @param array $arPlaceholders Array of sparql (variable name => - * placeholder name) pairs - * @return array (prepared sql query string, variable positions) pair - */ - protected function replacePlaceholders($strQuery, $arPlaceholders) - { - $arVariablePositions = array(); - $this->arTmpVariablePositions = array(); - $this->arTmpPlaceholders = $arPlaceholders; - $strQuery = preg_replace_callback( - '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/', - array($this, 'replacePlaceholdersCb'), - $strQuery - ); - return array($strQuery, $this->arTmpVariablePositions); - }//protected function replacePlaceholders($strQuery, $arPlaceholders) - - - - /** - * Callback method internally used by replacePlaceholders() method. - */ - protected function replacePlaceholdersCb($matches) - { - $strPlaceholder = $matches[0]; - $strSparqlVariable = array_search( - $strPlaceholder, - $this->arTmpPlaceholders - ); - $strDbPlaceholder = $this->dbConn->Param($strSparqlVariable); - $this->arTmpVariablePositions[] = $strSparqlVariable; - - return $strDbPlaceholder; - }//protected function replacePlaceholdersCb($matches) - - - - /** - * Executes the given prepared statments, filling the placeholders - * with the given values. - * - * @param array $arDbStatements Return value of prepareInDb() - * @param array $arVariableValues Array of (variable name, value) pairs - * - * @return array Array of database results as returned by Execute() - */ - public function execute($arDbStatements, $arVariableValues) - { - $arResults = array(); - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - - foreach ($arDbStatements as $arStatement) { - list($stmt, $arVariablePositions) = $arStatement; - $arVariables = $this->createVariableArray( - $arVariablePositions, - $arVariableValues - ); - $arResults[] = $this->dbConn->Execute($stmt, $arVariables); - } - - $this->dbConn->SetFetchMode($oldmode); - - return $arResults; - }//public function execute($arDbStatements, $arVariableValues) - - - - /** - * Creates an array full of variables to be passed to the Execute() method - * of the database connection object. - * Uses the variable positions array to get the positions of the variables - * in the result array, and the variable value array to get the actual - * values for the prepared statement. - * - * @param array $arVariablePositions Positions of the variables as returned - * by replacePlaceholders(). - * @param array $arVariableValues Array of (variable name, value) pairs - * - * @return array Array of variable values - */ - protected function createVariableArray($arVariablePositions, $arVariableValues) - { - $arVariables = array(); - - foreach ($arVariablePositions as $nPos => $strVariable) { - if (!isset($arVariableValues[$strVariable])) { - throw new Exception('No value for variable "' . $strVariable . '" in prepared statement'); - } - - $strValue = self::replacePrefix( - $arVariableValues[$strVariable], - $this->arPrefixes - ); - - $arVariables[$nPos] = $strValue; - } - - return $arVariables; - }//protected function createVariableArray($arVariablePositions, $arVariableValues) - - - - /** - * Replaces all placeholders with their actual values. - */ - public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues) - { - $this->arTmpPlaceholders = $arPlaceholders; - $this->arTmpVariableValues = $arVariableValues; - - $strQuery = preg_replace_callback( - '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/', - array($this, 'replacePlaceholdersWithVariablesCb'), - $strQuery - ); - - return $strQuery; - }//public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues) - - - - /** - * Callback method internally used by - * replacePlaceholdersWithVariables() method. - */ - protected function replacePlaceholdersWithVariablesCb($matches) - { - $strPlaceholder = $matches[0]; - $strSparqlVariable = array_search( - $strPlaceholder, - $this->arTmpPlaceholders - ); - return $this->dbConn->qstr( - self::replacePrefix( - $this->arTmpVariableValues[$strSparqlVariable], - $this->arPrefixes - ) - ); - }//protected function replacePlaceholdersWithVariablesCb($matches) - - - - protected static function replacePrefix($strValue, $arPrefixes) - { - //replace prefixes? - if (count($arParts = explode(':', $strValue, 2)) == 2) { - if (isset($arPrefixes[$arParts[0]])) { - $strValue = $arPrefixes[$arParts[0]] . $arParts[1]; - } - } - return $strValue; - }//protected static function replacePrefix($strValue, $arPrefixes) - -}//class SparqlEngineDb_Preparator - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/PreparedStatement.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/PreparedStatement.php deleted file mode 100755 index e54af3c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/PreparedStatement.php +++ /dev/null @@ -1,38 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement -{ - protected $sparqlEngine = null; - - - public function __construct(SparqlEngineDb $sparqlEngine) - { - $this->sparqlEngine = $sparqlEngine; - }//public function __construct(SparqlEngineDb $sparqlEngine) - - - - /** - * Execute the prepared statement and returns the result. - * - * @param array $arVariables Array of sparql query variables => values - * @param string $resultform Which result form you need - * @return mixed Anything a sparql query can return - */ - public function execute($arVariables, $resultform = false) - { - return $this->sparqlEngine->execute($arVariables, $resultform); - }//public function execute($arVariables, $resultform) - -}//class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/QuerySimplifier.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/QuerySimplifier.php deleted file mode 100755 index 2988fd98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/QuerySimplifier.php +++ /dev/null @@ -1,169 +0,0 @@ - 'asd'} -* UNION -* {?person3 'three'} -* } -* is represented internally as three graph patterns, the latter -* two referencing the first to be their pattern (they are subpatternOf). -* Now this can be flattened to this which is the same: -* {?g ?h ?i . ?person 'asd'} -* UNION -* {?g ?h ?i .?person3 'three'} -* -* This class does this. -* -* @author Christian Weiske -* @license http://www.gnu.org/licenses/lgpl.html LGPL -*/ -class SparqlEngineDb_QuerySimplifier -{ - - /** - * Simplify the query by flattening out subqueries. - * Modifies the passed query object directly. - */ - public function simplify(Query $query) - { - $arPatterns = $query->getResultPart(); - self::dropEmpty($arPatterns); - $arPlan = $this->createPlan($arPatterns); - if (count($arPlan) == 0) { - $query->setResultPart($arPatterns); - return 0; - } - - $this->executePlan($arPatterns, $arPlan); - $query->setResultPart($arPatterns); - }//public function simplify(Query $query) - - - - /** - * Creates a plan what to do. - * - * @return array Array of arrays. Key is the parent pattern id, - * value is an array of subpatterns that belong to - * that parental pattern. - */ - protected function createPlan(&$arPatterns) - { - $arNumbers = $this->getNumbers($arPatterns); - if (count($arNumbers) == 0) { - return array(); - } - - $arPlan = array(); - - foreach ($arNumbers as $nId => $nPatternCount) { - $nParent = $arPatterns[$nId]->getSubpatternOf(); - $arPlan[$nParent][$nId] = true; - } - - return $arPlan; - }//protected function createPlan(&$arPatterns) - - - - /** - * Executes the plan - * - * @param array $arPatterns Array of GraphPatterns - * @param array $arPlan Plan array as returned by createPlan() - */ - protected function executePlan(&$arPatterns, &$arPlan) - { - foreach ($arPlan as $nParent => $arChildren) { - $base = $arPatterns[$nParent]; - $grandParent = $base->getSubpatternOf(); - $nNextId = $nParent; - foreach ($arChildren as $nChild => $null) { - $new = clone $base; - $new->addTriplePatterns($arPatterns[$nChild]->getTriplePatterns()); - $new->addConstraints( $arPatterns[$nChild]->getConstraints()); - $new->setId($nNextId); - if ($nParent != $nNextId) { - $new->setUnion($nParent); - } - $arPatterns[$nNextId] = $new; - - if ($grandParent !== null) { - //dynamically adjust plan - $arPlan[$grandParent][$nNextId] = true; - } - - $nNextId = $nChild; - } - //last one is not not needed anymore - unset($arPatterns[$nNextId]); - } - }//protected function executePlan(&$arPatterns, &$arPlan) - - - - /** - * Returns an array of id-value pairs determining - * which pattern IDs (array id) are deepest nested - * (higher value). - * Array is sorted in reverse order, highest values - * first. - * - * @param array $arPatterns Array with GraphPatterns - * @return array Array with key-value pairs - */ - protected function getNumbers(&$arPatterns) - { - $arNumbers = array(); - foreach ($arPatterns as $nId => &$pattern) { - $nParent = $pattern->getSubpatternOf(); - if ($nParent !== null) { - $arNumbers[$nId] = $arNumbers[$nParent] + 1; - } else { - $arNumbers[$nId] = 0; - } - } - //remove the not so interesting ones - foreach ($arNumbers as $nId => $nNumber) { - if ($nNumber == 0) { - unset($arNumbers[$nId]); - } - } - - arsort($arNumbers); - - return $arNumbers; - }//protected function getNumbers(&$arPatterns) - - - - /** - * Removes all empty graph patterns from the array. - * Modifies it directly. - */ - protected static function dropEmpty(&$arPatterns) - { - foreach ($arPatterns as $nId => &$pattern) { - if ($pattern->isEmpty()) { - unset($arPatterns[$nId]); - } - } - - foreach ($arPatterns as $nId => &$pattern) { - $nParent = $pattern->getSubpatternOf(); - if (!isset($arPatterns[$nParent])) { - $arPatterns[$nId]->setSubpatternOf(null); - } - } - //FIXME: continued indexes? - }//protected static function dropEmpty(&$arPatterns) - -}//class SparqlEngineDb_QuerySimplifier - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultConverter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultConverter.php deleted file mode 100755 index 93064098..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultConverter.php +++ /dev/null @@ -1,115 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultConverter -{ - /** - * Determines the correct renderer and calls it. - * - * The $resultform may be: - * - false: The default renderer is taken then - * - an object that implements SparqlEngineDb_ResultRenderer interface - * - a string like "HTML" or "XML". The appropriate renderer is used then. - * - a full class name, e.g. SparqlEngineDb_ResultRenderer_XML - * - * @param array $arRecordSets Array of anything ADOConnection::Execute() can return - * @param SparqlEngineDb $engine Sparql database engine. - * @param mixed $resultform Which format the results shall be in (false or "xml") - * - * @return mixed Most likely an array or a boolean value, - * or anything else as determined by $resultform - */ - public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false) - { - if (is_object($resultform)) { - if ($resultform instanceof SparqlEngineDb_ResultRenderer) { - return $resultform->convertFromDbResults( - $arRecordSets, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer object needs to implement' - . ' SparqlEngineDb_ResultRenderer interface' - ); - } - } - - if ($resultform === false) { - $resultform = 'Default'; - } else if ($resultform == 'xml') { - //kept for BC reasons - $resultform = 'XML'; - } - - if ($strClass = self::loadClass($resultform)) { - $rrObj = new $strClass(); - if ($rrObj instanceof SparqlEngineDb_ResultRenderer) { - return $rrObj->convertFromDbResults( - $arRecordSets, - $engine->getQuery(), - $engine - ); - } else { - throw new Exception( - 'Result renderer class "' . $strClass . '" needs to implement' - . ' SparqlEngineDb_ResultRenderer interface' - ); - } - } else { - throw new Exception( - 'Result renderer class "' . $resultform . '" could not be loaded.' - ); - } - }//public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false) - - - - /** - * Tries to load a given class if it doesn't exist, - * and returns true if the class can be used. - * - * @param string $strClass Classname - * @return mixed Class name if the class is loaded and can be used, false if not. - */ - protected static function loadClass($strClass) - { - if (class_exists($strClass, false)) { - return $strClass; - } - - //RAP style, shortcut notation - $strFile = 'SparqlEngineDb/ResultRenderer/' . $strClass . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngineDb_ResultRenderer_' . $strClass, false)) { - return 'SparqlEngineDb_ResultRenderer_' . $strClass; - } - - //RAP style - $strFile = str_replace('_', '/', $strClass) . '.php'; - @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - //PEAR style - @include_once $strFile; - if (class_exists($strClass, false)) { - return $strClass; - } - - return false; - }//protected static function loadClass($strClass) - -}//class SparqlEngineDb_ResultConverter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer.php deleted file mode 100755 index 2ff2c085..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer.php +++ /dev/null @@ -1,29 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -interface SparqlEngineDb_ResultRenderer -{ - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine); - -}//interface SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/all-wcprops deleted file mode 100755 index dafb0daa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/554/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer -END -JSON.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/553/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer/JSON.php -END -XML.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/554/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer/XML.php -END -Default.php -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/466/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer/Default.php -END -HTML.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/466/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer/HTML.php -END -PlainText.php -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/466/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer/PlainText.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/entries deleted file mode 100755 index 8683e18b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/entries +++ /dev/null @@ -1,91 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultRenderer -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-05T08:18:50.037887Z -554 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -JSON.php -file - - - - -2008-02-29T14:57:46.693985Z -1ba0b132006310544d994987ef33ccad -2007-11-27T13:06:14.820679Z -553 -fusel2k - -XML.php -file - - - - -2008-02-29T14:57:46.709606Z -cdaf2efc689c6109786fce0a55b6a635 -2007-12-05T08:18:50.037887Z -554 -fusel2k -has-props - -Default.php -file - - - - -2008-02-29T14:57:46.709606Z -90ed777e9c50889887f9a23ee8b37670 -2007-07-04T08:44:01.466753Z -466 -cweiske -has-props - -HTML.php -file - - - - -2008-02-29T14:57:46.725226Z -64816661ab11bf0bd18f686be7ce1ce2 -2007-07-04T08:44:01.466753Z -466 -cweiske -has-props - -PlainText.php -file - - - - -2008-02-29T14:57:46.725226Z -7834bfe4e0037e013adcd7f7db9a22f1 -2007-07-04T08:44:01.466753Z -466 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/Default.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/Default.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/Default.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/HTML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/HTML.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/HTML.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/XML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/XML.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/prop-base/XML.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/Default.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/Default.php.svn-base deleted file mode 100755 index b6916bb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/Default.php.svn-base +++ /dev/null @@ -1,339 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->sg = $engine->getSqlGenerator(); - - $strResultForm = $this->query->getResultForm(); - switch ($strResultForm) { - case 'construct': - case 'select': - case 'select distinct': - $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm); - - //some result forms need more modification - switch ($strResultForm) { - case 'construct'; - $arResult = $this->constructGraph( - $arResult, - $this->query->getConstructPattern() - ); - break; - case 'describe'; - $arResult = $this->describeGraph($arResult); - break; - } - - return $arResult; - break; - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - return $nCount > 0; - } else { - return $nCount; - } - break; - - case 'describe': - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - - protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - { - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - $arResult = array_merge( - $arResult, - $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm) - ); - } - return $arResult; - }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - - - - /** - * Converts a ADORecordSet object into an array of "rows" that - * are subarrays of variable => value pairs. - * - * @param ADORecordSet $dbRecordSet Anything ADOConnection::Execute() can return - * @return array - */ - protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm) - { - $arResult = array(); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - return $arResult; - }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet) - - - - /** - * Creates an RDF Statement object for one of the variables - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Statement RDF statement object - */ - protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - { - return new Statement( - $this->createSubjectFromDbRecordSetPart ($dbRecordSet, $strVarBase), - $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase), - $this->createObjectFromDbRecordSetPart ($dbRecordSet, $strVarBase) - ); - }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple subject resource object - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - $subject = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - $subject = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - return $subject; - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple predicate resource object - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - $predicate = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - return $predicate; - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple object resource object - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - $object = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - $object = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - $object = new Literal( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']] - ); - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]) { - $object->setDatatype($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]); - } - } - return $object; - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - protected function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//protected function constructGraph($arVartable, $constructPattern) - -}//class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/HTML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/HTML.php.svn-base deleted file mode 100755 index 2d29c893..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/HTML.php.svn-base +++ /dev/null @@ -1,297 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer -{ - /** - * If the result HTML should be wrapped in a div - * @var boolean - */ - protected $bWrap = true; - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into nice HTML. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed HTML code - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->sg = $engine->getSqlGenerator(); - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createTableFromRecords($arRecordSets); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are currently not supported by the' - . ' HTML renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strCode = 'There were results.'; - } else { - $strCode = 'There are ' . $nCount . ' results.'; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - protected function wrapCode($strCode) - { - if (!$this->bWrap) { - return $strCode; - } - - return - '
' . "\n" - . $strCode . "\n" - . "
\n"; - }//protected function wrapCode($strCode) - - - - protected function createTableFromRecords($arRecordSets) - { - $arResultVars = $this->query->getResultVars(); - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - list($strCode, $strColor) = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - $arResultRow[$strVarName] = '' . $strCode . ''; - } - } - $arResult[] = $arResultRow; - } - } - - //I always wanted to to this :) - return - "\n" - . " \n" - . " \n" - . " \n " - . implode( - "\n ", - array_map( - create_function( - '$ar', - 'return implode("", $ar);' - ), - $arResult - ) - ) - . "\n \n" - . "
SPARQL result with " . count($arResult) . " rows
" - . implode('', array_keys(reset($arResult))) - . "
\n"; - }//protected function createTableFromRecords($arRecordSets) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->getHtmlLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - protected function getHtmlNull() - { - return array('
NULL
', '#FFF'); - }//protected function getHtmlNull() - - - - protected function getHtmlBlank($value) - { - return array('Blank node', HTML_TABLE_BNODE_COLOR); - }//protected function getHtmlBlank($value) - - - - protected function getHtmlResource($value) - { - return array( - htmlspecialchars($value), - HTML_TABLE_RESOURCE_COLOR - ); - }//protected function getHtmlResource($value) - - - - protected function getHtmlLiteral($value, $language, $datatype) - { - $strCode = htmlspecialchars($value); - if ($language) { - $strCode . ' xml:lang=' . $language; - } - if ($datatype) { - $strCode . ' rdf:type=' . $datatype; - } - return array($strCode, HTML_TABLE_LITERAL_COLOR); - }//protected function getHtmlLiteral($value, $language, $datatype) - - -}//class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/JSON.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/JSON.php.svn-base deleted file mode 100755 index 16d6bea9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/JSON.php.svn-base +++ /dev/null @@ -1,174 +0,0 @@ -query = $query; - $this->sg = $engine->getSqlGenerator(); - $strResultForm = $query->getResultForm(); - - foreach ($this->getResultVars() as $var) - $ResultVarsTemp[] = substr($var,1); - - switch ($strResultForm) { - case 'select': - case 'select distinct': - $results = $this->createFromRecords($arRecordSets, $strResultForm); - $strCode = json_encode(array( - 'head' => array('vars'=>$ResultVarsTemp), - 'results'=>array('bindings'=>$results)) - ); - //$strCode = str_replace(',{',','.PHP_EOL.'{',$strCode); - break; - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are not supported by the' - . ' JSON renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query not supported by JSON Renderer' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strcode = json_encode(array('boolean' => ($nCount > 0))); - } else { - $strcode = json_encode(array('int' => $nCount )); - } - break; - default: - throw new Exception('Error'); - } - - return $strCode; - - - } - /** - * Method to create from record with specific resultform (not used yet) - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param unknown_type $strResultForm - * @return array ready for json conversion - */ - protected function createFromRecords($arRecordSets, $strResultForm) { - - $arVarAssignments = $this->sg->arVarAssignments; - $code = ''; - $arResultVars = $this ->getResultVars(); - $results = array(); - foreach ($arRecordSets[0] as $value) { - $node = array(); - foreach ($arResultVars as $ResultVar) { - $nodeType = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']]; - if ($nodeType == 'r') { - $node[substr($ResultVar,1)] = array('type'=> 'uri','value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]); - - } - - if ($value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']] == 'l') { - $literalType = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_type']]; - $literalLang = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_lang']]; - $literalValue = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_value']]; - $node[substr($ResultVar,1)] = $this->getLiteral($literalValue,$literalLang,$literalType); - } - - if ($nodeType === 'b') { - $literalValue = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]; - $node[substr($ResultVar,1)] = array ('type'=>'bnode' ,'value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]); - } - } - $results[]=$node; - - - } - return $results; - - } - - /** - * COnverting Literals to array ready for json - * - * @param unknown_type $value - * @param unknown_type $lang - * @param unknown_type $type - * @return unknown - */ - private function getLiteral($value, $lang , $type) { - - $ret = array(); - - $type = 'literal'; - - if ($value != 'literal') { - $ret['value'] = $value; - } - - if ($lang != '') { - $ret['lang'] = $lang; - } - - if ($type != '') { - $ret['type'] = $type; - } - - return $ret; - } - - /** - * Giving array of used Vars also resolves the all-quantifier * - * - * @return array of vars as strings - */ - protected function getResultVars() { - $arResultVars = $this->query->getResultVars(); - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } else { - $arResultVars = array(); - foreach ($this->query->getResultVars() as $Var) { - $arResultVars[] = (string) $Var; - } - } - - return $arResultVars; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/PlainText.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/PlainText.php.svn-base deleted file mode 100755 index d7d82315..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/PlainText.php.svn-base +++ /dev/null @@ -1,363 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->sg = $engine->getSqlGenerator(); - - $strResultForm = $this->query->getResultForm(); - switch ($strResultForm) { - case 'construct': - case 'select': - case 'select distinct': - $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm); - - //some result forms need more modification - switch ($strResultForm) { - case 'construct'; - $arResult = $this->constructGraph( - $arResult, - $this->query->getConstructPattern() - ); - break; - case 'describe'; - $arResult = $this->describeGraph($arResult); - break; - } - - return $arResult; - break; - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - return $nCount > 0; - } else { - return $nCount; - } - break; - - case 'describe': - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - - protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - { - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - $arResult = array_merge( - $arResult, - $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm) - ); - } - return $arResult; - }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - - - - /** - * Converts a ADORecordSet object into an array of "rows" that - * are subarrays of variable => value pairs. - * - * @param ADORecordSet $dbRecordSet Anything ADOConnection::Execute() can return - * @return array - */ - protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm) - { - $arResult = array(); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - return $arResult; - }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet) - - - - /** - * Creates an RDF Statement object for one of the variables - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Statement RDF statement object - */ - protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - { - return new Statement( - $this->createSubjectFromDbRecordSetPart ($dbRecordSet, $strVarBase), - $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase), - $this->createObjectFromDbRecordSetPart ($dbRecordSet, $strVarBase) - ); - }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple subject resource object - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - return $subject; - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple predicate resource object - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple object resource object - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->createLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - protected function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//protected function constructGraph($arVartable, $constructPattern) - - - - protected function createResource($uri) - { - return 'R<' . $uri . '>'; - }//protected function createResource($uri) - - - - protected function createBlankNode($id) - { - return 'B(' . $id . ')'; - }//protected function createBlankNode($id) - - - - protected function createLiteral($value, $language, $datatype) - { - $v = 'L(' . $value; - if ($language != null) { - $v .= '@' . $language; - } - if ($datatype != null) { - $v .= '^^' . $datatype; - } - return $v . ')'; - }//protected function createLiteral($value, $language, $datatype) - -}//class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/XML.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/XML.php.svn-base deleted file mode 100755 index 6c24bb67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/.svn/text-base/XML.php.svn-base +++ /dev/null @@ -1,336 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into nice HTML. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed HTML code - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->sg = $engine->getSqlGenerator(); - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createFromRecords($arRecordSets, $strResultForm); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are not supported by the' - . ' XML renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strCode = $this->getHead() - . ' ' - . self::getSpokenBoolean($nCount > 0) - . ''; - } else { - $strCode = $this->getHead() - . ' ' - . $nCount - . ''; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - protected function wrapCode($strCode) - { - return << - - -EOT - . $strCode . "\n" - . "\n"; - }//protected function wrapCode($strCode) - - - - protected function getHead($strXml = '') - { - return " \n" - . $strXml - . " \n"; - }//protected function getHead($strXml = '') - - - - protected function createFromRecords($arRecordSets, $strResultForm) - { - $arResultVars = $this->query->getResultVars(); - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - $strVarXML = ''; - foreach ($arResultVars as $var) { - $strVarXML .= " \n"; - } - - $strHeadXml = $this->getHead($strVarXML); - - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - - return - $strHeadXml - . ' ' . "\n" - . ' ' . PHP_EOL - . " \n"; - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - } - - - $arSM = $this->query->getSolutionModifier(); - - return - $strHeadXml - . ' ' . "\n" - . $this->getResultXml($arResult) - . " \n"; - }//protected function createFromRecords($arRecordSets) - - - - protected function getResultXml($arResult) - { - $strCode = ''; - foreach ($arResult as $arSet) { - $strCode .= " \n"; - foreach ($arSet as $strVarName => $strValue) { - if ($strValue !== null) { - $strCode .= ' ' - . $strValue - . "\n"; - } - } - $strCode .= " \n"; - } - return $strCode; - }//protected function getResultXml($arResult) - - - - protected static function getSpokenBoolean($b) - { - return $b ? 'true' : 'false'; - }//protected static function getSpokenBoolean($b) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->getXmlLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - protected function getXmlNull() - { - return null; - }//protected function getHtmlNull() - - - - protected function getXmlBlank($value) - { - return '' . $value . ''; - }//protected function getHtmlBlank($value) - - - - protected function getXmlResource($value) - { - return '' . htmlspecialchars($value) . ''; - }//protected function getHtmlResource($value) - - - - protected function getXmlLiteral($value, $language, $datatype) - { - $strCode = ''; - return $strCode; - }//protected function getHtmlLiteral($value, $language, $datatype) - -}//class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/Default.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/Default.php deleted file mode 100755 index 45276f36..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/Default.php +++ /dev/null @@ -1,339 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->sg = $engine->getSqlGenerator(); - - $strResultForm = $this->query->getResultForm(); - switch ($strResultForm) { - case 'construct': - case 'select': - case 'select distinct': - $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm); - - //some result forms need more modification - switch ($strResultForm) { - case 'construct'; - $arResult = $this->constructGraph( - $arResult, - $this->query->getConstructPattern() - ); - break; - case 'describe'; - $arResult = $this->describeGraph($arResult); - break; - } - - return $arResult; - break; - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - return $nCount > 0; - } else { - return $nCount; - } - break; - - case 'describe': - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - - protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - { - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - $arResult = array_merge( - $arResult, - $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm) - ); - } - return $arResult; - }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - - - - /** - * Converts a ADORecordSet object into an array of "rows" that - * are subarrays of variable => value pairs. - * - * @param ADORecordSet $dbRecordSet Anything ADOConnection::Execute() can return - * @return array - */ - protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm) - { - $arResult = array(); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - return $arResult; - }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet) - - - - /** - * Creates an RDF Statement object for one of the variables - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Statement RDF statement object - */ - protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - { - return new Statement( - $this->createSubjectFromDbRecordSetPart ($dbRecordSet, $strVarBase), - $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase), - $this->createObjectFromDbRecordSetPart ($dbRecordSet, $strVarBase) - ); - }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple subject resource object - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - $subject = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - $subject = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - return $subject; - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple predicate resource object - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - $predicate = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - return $predicate; - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple object resource object - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - $object = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - $object = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - $object = new Literal( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']] - ); - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]) { - $object->setDatatype($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]); - } - } - return $object; - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - protected function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//protected function constructGraph($arVartable, $constructPattern) - -}//class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/HTML.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/HTML.php deleted file mode 100755 index 34dce3b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/HTML.php +++ /dev/null @@ -1,297 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer -{ - /** - * If the result HTML should be wrapped in a div - * @var boolean - */ - protected $bWrap = true; - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into nice HTML. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed HTML code - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->sg = $engine->getSqlGenerator(); - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createTableFromRecords($arRecordSets); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are currently not supported by the' - . ' HTML renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strCode = 'There were results.'; - } else { - $strCode = 'There are ' . $nCount . ' results.'; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - protected function wrapCode($strCode) - { - if (!$this->bWrap) { - return $strCode; - } - - return - '
' . "\n" - . $strCode . "\n" - . "
\n"; - }//protected function wrapCode($strCode) - - - - protected function createTableFromRecords($arRecordSets) - { - $arResultVars = $this->query->getResultVars(); - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - list($strCode, $strColor) = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - $arResultRow[$strVarName] = '' . $strCode . ''; - } - } - $arResult[] = $arResultRow; - } - } - - //I always wanted to to this :) - return - "\n" - . " \n" - . " \n" - . " \n " - . implode( - "\n ", - array_map( - create_function( - '$ar', - 'return implode("", $ar);' - ), - $arResult - ) - ) - . "\n \n" - . "
SPARQL result with " . count($arResult) . " rows
" - . implode('', array_keys(reset($arResult))) - . "
\n"; - }//protected function createTableFromRecords($arRecordSets) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getHtmlNull(); - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->getHtmlLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - protected function getHtmlNull() - { - return array('
NULL
', '#FFF'); - }//protected function getHtmlNull() - - - - protected function getHtmlBlank($value) - { - return array('Blank node', HTML_TABLE_BNODE_COLOR); - }//protected function getHtmlBlank($value) - - - - protected function getHtmlResource($value) - { - return array( - htmlspecialchars($value), - HTML_TABLE_RESOURCE_COLOR - ); - }//protected function getHtmlResource($value) - - - - protected function getHtmlLiteral($value, $language, $datatype) - { - $strCode = htmlspecialchars($value); - if ($language) { - $strCode . ' xml:lang=' . $language; - } - if ($datatype) { - $strCode . ' rdf:type=' . $datatype; - } - return array($strCode, HTML_TABLE_LITERAL_COLOR); - }//protected function getHtmlLiteral($value, $language, $datatype) - - -}//class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/JSON.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/JSON.php deleted file mode 100755 index 16d6bea9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/JSON.php +++ /dev/null @@ -1,174 +0,0 @@ -query = $query; - $this->sg = $engine->getSqlGenerator(); - $strResultForm = $query->getResultForm(); - - foreach ($this->getResultVars() as $var) - $ResultVarsTemp[] = substr($var,1); - - switch ($strResultForm) { - case 'select': - case 'select distinct': - $results = $this->createFromRecords($arRecordSets, $strResultForm); - $strCode = json_encode(array( - 'head' => array('vars'=>$ResultVarsTemp), - 'results'=>array('bindings'=>$results)) - ); - //$strCode = str_replace(',{',','.PHP_EOL.'{',$strCode); - break; - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are not supported by the' - . ' JSON renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query not supported by JSON Renderer' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strcode = json_encode(array('boolean' => ($nCount > 0))); - } else { - $strcode = json_encode(array('int' => $nCount )); - } - break; - default: - throw new Exception('Error'); - } - - return $strCode; - - - } - /** - * Method to create from record with specific resultform (not used yet) - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param unknown_type $strResultForm - * @return array ready for json conversion - */ - protected function createFromRecords($arRecordSets, $strResultForm) { - - $arVarAssignments = $this->sg->arVarAssignments; - $code = ''; - $arResultVars = $this ->getResultVars(); - $results = array(); - foreach ($arRecordSets[0] as $value) { - $node = array(); - foreach ($arResultVars as $ResultVar) { - $nodeType = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']]; - if ($nodeType == 'r') { - $node[substr($ResultVar,1)] = array('type'=> 'uri','value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]); - - } - - if ($value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']] == 'l') { - $literalType = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_type']]; - $literalLang = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_lang']]; - $literalValue = $value[$arVarAssignments[$ResultVar][0] . - '.' . $arVarAssignments[$ResultVar]['sql_value']]; - $node[substr($ResultVar,1)] = $this->getLiteral($literalValue,$literalLang,$literalType); - } - - if ($nodeType === 'b') { - $literalValue = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]; - $node[substr($ResultVar,1)] = array ('type'=>'bnode' ,'value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]); - } - } - $results[]=$node; - - - } - return $results; - - } - - /** - * COnverting Literals to array ready for json - * - * @param unknown_type $value - * @param unknown_type $lang - * @param unknown_type $type - * @return unknown - */ - private function getLiteral($value, $lang , $type) { - - $ret = array(); - - $type = 'literal'; - - if ($value != 'literal') { - $ret['value'] = $value; - } - - if ($lang != '') { - $ret['lang'] = $lang; - } - - if ($type != '') { - $ret['type'] = $type; - } - - return $ret; - } - - /** - * Giving array of used Vars also resolves the all-quantifier * - * - * @return array of vars as strings - */ - protected function getResultVars() { - $arResultVars = $this->query->getResultVars(); - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } else { - $arResultVars = array(); - foreach ($this->query->getResultVars() as $Var) { - $arResultVars[] = (string) $Var; - } - } - - return $arResultVars; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/PlainText.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/PlainText.php deleted file mode 100755 index d7d82315..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/PlainText.php +++ /dev/null @@ -1,363 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into the desired output format - * and returns the result. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed The result as rendered by the result renderers. - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->engine = $engine; - $this->sg = $engine->getSqlGenerator(); - - $strResultForm = $this->query->getResultForm(); - switch ($strResultForm) { - case 'construct': - case 'select': - case 'select distinct': - $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm); - - //some result forms need more modification - switch ($strResultForm) { - case 'construct'; - $arResult = $this->constructGraph( - $arResult, - $this->query->getConstructPattern() - ); - break; - case 'describe'; - $arResult = $this->describeGraph($arResult); - break; - } - - return $arResult; - break; - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - return $nCount > 0; - } else { - return $nCount; - } - break; - - case 'describe': - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - - protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - { - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - $arResult = array_merge( - $arResult, - $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm) - ); - } - return $arResult; - }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm) - - - - /** - * Converts a ADORecordSet object into an array of "rows" that - * are subarrays of variable => value pairs. - * - * @param ADORecordSet $dbRecordSet Anything ADOConnection::Execute() can return - * @return array - */ - protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm) - { - $arResult = array(); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - return array(); - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - return $arResult; - }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet) - - - - /** - * Creates an RDF Statement object for one of the variables - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Statement RDF statement object - */ - protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - { - return new Statement( - $this->createSubjectFromDbRecordSetPart ($dbRecordSet, $strVarBase), - $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase), - $this->createObjectFromDbRecordSetPart ($dbRecordSet, $strVarBase) - ); - }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple subject resource object - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - return $subject; - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple predicate resource object - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return Resource RDF triple object resource object - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - //FIXME: should be NULL, but doesn't pass test - return ''; - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->createLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Constructs a result graph. - * - * @param array $arVartable A table containing the result vars and their bindings - * @param GraphPattern $constructPattern The CONSTRUCT pattern - * @return MemModel The result graph which matches the CONSTRUCT pattern - */ - protected function constructGraph($arVartable, $constructPattern) - { - $resultGraph = new MemModel(); - - if (!$arVartable) { - return $resultGraph; - } - - $tp = $constructPattern->getTriplePatterns(); - - $bnode = 0; - foreach ($arVartable as $value) { - foreach ($tp as $triple) { - $sub = $triple->getSubject(); - $pred = $triple->getPredicate(); - $obj = $triple->getObject(); - - if (is_string($sub) && $sub{1} == '_') { - $sub = new BlankNode("_bN".$bnode); - } - if (is_string($pred) && $pred{1} == '_') { - $pred = new BlankNode("_bN".$bnode); - } - if (is_string($obj) && $obj{1} == '_') { - $obj = new BlankNode("_bN".$bnode); - } - - - if (is_string($sub)) { - $sub = $value[$sub]; - } - if (is_string($pred)) { - $pred = $value[$pred]; - } - if (is_string($obj)) { - $obj = $value[$obj]; - } - - if ($sub !== "" && $pred !== "" && $obj !== "") { - $resultGraph->add(new Statement($sub,$pred,$obj)); - } - } - $bnode++; - } - return $resultGraph; - }//protected function constructGraph($arVartable, $constructPattern) - - - - protected function createResource($uri) - { - return 'R<' . $uri . '>'; - }//protected function createResource($uri) - - - - protected function createBlankNode($id) - { - return 'B(' . $id . ')'; - }//protected function createBlankNode($id) - - - - protected function createLiteral($value, $language, $datatype) - { - $v = 'L(' . $value; - if ($language != null) { - $v .= '@' . $language; - } - if ($datatype != null) { - $v .= '^^' . $datatype; - } - return $v . ')'; - }//protected function createLiteral($value, $language, $datatype) - -}//class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/XML.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/XML.php deleted file mode 100755 index d98714aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/ResultRenderer/XML.php +++ /dev/null @@ -1,336 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer -{ - - /** - * Defines the methods needed to create the types - * in $arVarAssignments. - * Key is the type (e.g. "s" for subject), and - * value the method's name. - * - * @see $arVarAssignments - * - * @var array - */ - protected $arCreationMethods = array( - 's' => 'createSubjectFromDbRecordSetPart', - 'p' => 'createPredicateFromDbRecordSetPart', - 'o' => 'createObjectFromDbRecordSetPart' - ); - - - - /** - * Converts the database results into nice HTML. - * - * @param array $arRecordSets Array of (possibly several) SQL query results. - * @param Query $query SPARQL query object - * @param SparqlEngineDb $engine Sparql Engine to query the database - * @return mixed HTML code - */ - public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - { - $this->query = $query; - $this->sg = $engine->getSqlGenerator(); - $strCode = ''; - - $strResultForm = $query->getResultForm(); - switch ($strResultForm) { - case 'select': - case 'select distinct': - $strCode = $this->createFromRecords($arRecordSets, $strResultForm); - break; - - case 'construct': - case 'describe': - throw new Exception( - 'Construct and describe are not supported by the' - . ' XML renderer' - ); - - case 'count': - case 'ask': - if (count($arRecordSets) > 1) { - throw new Exception( - 'More than one result set for a ' - . $strResultForm . ' query!' - ); - } - - $nCount = 0; - $dbRecordSet = reset($arRecordSets); - foreach ($dbRecordSet as $row) { - $nCount += intval($row['count']); - break; - } - - if ($strResultForm == 'ask') { - $strCode = $this->getHead() - . ' ' - . self::getSpokenBoolean($nCount > 0) - . ''; - } else { - $strCode = $this->getHead() - . ' ' - . $nCount - . ''; - } - break; - - default: - throw new Exception('Unsupported result form: ' . $strResultForm); - } - - return $this->wrapCode($strCode); - }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) - - - - protected function wrapCode($strCode) - { - return << - - -EOT - . $strCode . "\n" - . "\n"; - }//protected function wrapCode($strCode) - - - - protected function getHead($strXml = '') - { - return " \n" - . $strXml - . " \n"; - }//protected function getHead($strXml = '') - - - - protected function createFromRecords($arRecordSets, $strResultForm) - { - $arResultVars = $this->query->getResultVars(); - - if (in_array('*', $arResultVars)) { - $arResultVars = array_keys($this->sg->arVarAssignments); - } - - $strVarXML = ''; - foreach ($arResultVars as $var) { - $strVarXML .= " \n"; - } - - $strHeadXml = $this->getHead($strVarXML); - - $arResult = array(); - foreach ($arRecordSets as $dbRecordSet) { - //work around bug in adodb: - // ADORecordSet_empty does not implement php5 iterators - if ($dbRecordSet->RowCount() <= 0) { - - return - $strHeadXml - . ' ' . "\n" - . ' ' . PHP_EOL - . " \n"; - } - - foreach ($dbRecordSet as $row) { - $arResultRow = array(); - foreach ($arResultVars as $strVar) { - $strVarName = (string)$strVar; - if (!isset($this->sg->arVarAssignments[$strVarName])) { - //variable is in select, but not in result (test: q-select-2) - $arResultRow[$strVarName] = ''; - } else { - $arVarSettings = $this->sg->arVarAssignments[$strVarName]; - $strMethod = $this->arCreationMethods[$arVarSettings[1]]; - $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar); - } - } - $arResult[] = $arResultRow; - } - } - - - $arSM = $this->query->getSolutionModifier(); - - return - $strHeadXml - . ' ' . "\n" - . $this->getResultXml($arResult) - . " \n"; - }//protected function createFromRecords($arRecordSets) - - - - protected function getResultXml($arResult) - { - $strCode = ''; - foreach ($arResult as $arSet) { - $strCode .= " \n"; - foreach ($arSet as $strVarName => $strValue) { - if ($strValue !== null) { - $strCode .= ' ' - . $strValue - . "\n"; - } - } - $strCode .= " \n"; - } - return $strCode; - }//protected function getResultXml($arResult) - - - - protected static function getSpokenBoolean($b) - { - return $b ? 'true' : 'false'; - }//protected static function getSpokenBoolean($b) - - - - /** - * Creates an RDF subject object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r' - //null should be predicate which is always a resource - || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null - ) { - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } else { - return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - } - }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF predicate object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - /** - * Creates an RDF object object - * contained in the given $dbRecordSet object. - * - * @see convertFromDbResult() to understand $strVarBase necessity - * - * @param ADORecordSet $dbRecordSet Record set returned from ADOConnection::Execute() - * @param string $strVarBase Prefix of the columns the recordset fields have. - * - * @return string HTML code - */ - protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - { - $strVarName = (string)$strVar; - if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) { - return $this->getXmlNull(); - } - switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) { - case 'r': - return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - case 'b': - return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]); - break; - default: - return $this->getXmlLiteral( - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']], - $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']] - ); - } - }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar) - - - - protected function getXmlNull() - { - return null; - }//protected function getHtmlNull() - - - - protected function getXmlBlank($value) - { - return '' . $value . ''; - }//protected function getHtmlBlank($value) - - - - protected function getXmlResource($value) - { - return '' . htmlspecialchars($value) . ''; - }//protected function getHtmlResource($value) - - - - protected function getXmlLiteral($value, $language, $datatype) - { - $strCode = ''; - return $strCode; - }//protected function getHtmlLiteral($value, $language, $datatype) - -}//class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGenerator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGenerator.php deleted file mode 100755 index d8fc46c1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGenerator.php +++ /dev/null @@ -1,999 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlGenerator -{ - public $query = null; - - /** - * Determines which variables can be found - * in which SQL result column. - * @example - * array( - * '?person' => array('t1', 's'), - ' '?p' => array('t1', 'p'), - * '?mbox' => array('t2', 'o') - * ) - * Would express that variable ?person is the subject - * in result table t1, and ?mbox is the object in - * table t2. - * - * @see $arCreationMethods - * - * @internal The array is created in createSql() - * and used in convertFromDbResult(). - * - * @var array - */ - public $arVarAssignments = array(); - - /** - * Array of variable name => table.col assignments - * for all variables used in the query not only - * the ones that shall be returned. - * - * @example - * array( - * '?person' => 't0.subject' - * ) - * - * @var array - */ - public $arUsedVarAssignments = array(); - - /** - * Array of arrays that contain all variable names - * which are to be found in the result of - * an sql statement in a union. - * - * @example - * array( - * 0 => array( - * '?person' => 's', - * '?p' => 'o' - * ), - * 1 => array( - * '?person' => 's', - * '?mbox' => 'o' - * ) - * ) - * - * @var array - */ - public $arUnionVarAssignments = array(); - - /** - * Which variables have been used as which type? - * key is variable name, value is an array of - * max. three keys (s, p, o) - * - * @example - * array( - * '?person' => array( - * 's' => true - * ), - * '?mbox' => array( - * 'o' => true - * ) - * ) - * - * @var array - */ - protected $arUsedVarTypes = array(); - - /** - * Array with placeholders of prepared statements variables. - * key is the variable name (without "??"), value is the - * placeholder. - * @var array - */ - protected $arPlaceholders = array(); - - /** - * Column names for subjects, predicates and - * objects for easy access via their character - * names (spo). - * - * @var array - */ - public static $arTableColumnNames = array( - 's' => array( - 'value' => 'subject', - 'is' => 'subject_is' - ), - 'p' => array( - 'value' => 'predicate' - ), - 'o' => array( - 'value' => 'object', - 'is' => 'object_is' - ) - ); - - /** - * Current UNION part number - * @var int - */ - protected $nUnionCount = 0; - - protected $nSqlVariableNameCount = 0; - - /** - * Name of the statements table - */ - protected $tblStatements = 'statements'; - - - - public function __construct(Query $query, ADOConnection $dbConn, $arModelIds) - { - $this->query = $query; - $this->dbConn = $dbConn; - $this->arModelIds = $arModelIds; - }//public function __construct(Query $query, ADOConnection $dbConn, $arModelIds) - - - - /** - * Creates an SQL query string from the given Sparql query object. - * - * @internal uses $query variable - * - * @return array Array of arrays of SQL query string parts: select, from and where - * - * @throws SparqlEngineDb_SqlGeneratorException If there is no variable in the result set. - */ - function createSql() - { -//var_dump($this->query); - $arSelect = array(); - $arFrom = array(); - $arWhere = array(); - - $strResultForm = $this->query->getResultForm(); - $filterGen = new SparqlEngineDb_FilterGenerator($this); - switch ($strResultForm) { - case 'construct': - $arResultVars = $this->query->getConstructPatternVariables(); - break; - default: - $arResultVars = $this->query->getResultVars(); - break; - } - - $this->nTableId = 0; - $this->nGraphPatternCount = 0; - $this->nUnionCount = 0; - $this->nUnionTriplePatternCount = 0; - $this->arUnionVarAssignments[0] = array(); - - foreach ($this->query->getResultPart() as $graphPattern) { - if ($graphPattern->isEmpty()) { - continue; - } - if ($graphPattern->getUnion() !== null) { - ++$this->nUnionCount; - $this->nTableId = 0; - $this->nUnionTriplePatternCount = 0; - $this->nGraphPatternCount = 0; - $this->arUnionVarAssignments[$this->nUnionCount] = array(); - } - $this->nTriplePatternCount = 0; - $arTriplePattern = $graphPattern->getTriplePatterns(); - if ($arTriplePattern != null) { - foreach ($arTriplePattern as $triplePattern) { - list ( - $arSelect[$this->nUnionCount][], - $arFrom [$this->nUnionCount][], - $arWhere [$this->nUnionCount][] - ) = - $this->getTripleSql( - $triplePattern, - $graphPattern, - $arResultVars - ); - ++$this->nTableId; - ++$this->nTriplePatternCount; - ++$this->nUnionTriplePatternCount; - } - } - ++$this->nGraphPatternCount; - - } - - //constraints extra. needed, since OPTIONAL parts are put after - // the current pattern while the constraint already refers to variables - // defined in there - $this->nGraphPatternCount = 0; - $this->nUnionCount = 0; - foreach ($this->query->getResultPart() as $graphPattern) { - if ($graphPattern->getUnion() !== null) { - ++$this->nUnionCount; - } - $arConstraints = $graphPattern->getConstraints(); - if ($arConstraints != null) { - foreach ($arConstraints as $constraint) { - $arWhere[$this->nUnionCount][count($arWhere[$this->nUnionCount]) - 1] - .= $filterGen->createFilterSql( - $constraint->getTree(), - $graphPattern->getOptional() !== null, - $this->nUnionCount - ); - } - } - ++$this->nGraphPatternCount; - } - - $arSelect = $this->createEqualSelects($arSelect); - $arStrSelect = array(); - - switch ($strResultForm) { - case 'construct': - case 'describe': - $strSelectType = 'SELECT'; - case 'select': - case 'select distinct': - if (!isset($strSelectType)) { - $strSelectType = $strResultForm; - } - foreach ($arSelect as $nUnionCount => $arSelectPart) { - $arSelectPart = self::removeNull($arSelectPart); - if (count($arSelectPart) == 0 - || (count($arSelectPart) == 1 && $arSelectPart[0] == '')) { - //test "test-1-07" suggests we return no rows in this case - //throw new SparqlEngineDb_SqlGeneratorException('No variable that could be returned.'); - } else { - $arStrSelect[$nUnionCount] = strtoupper($strSelectType) . ' ' . implode(', ' , $arSelectPart); - } - } - break; - - case 'ask': - case 'count': - $arStrSelect = array('SELECT COUNT(*) as count'); - break; - - default: - throw new SparqlEngineDb_SqlGeneratorException('Unsupported query type "' . $strResultForm . '"'); - break; - } - - $arSqls = array(); - foreach ($arStrSelect as $nUnionCount => $arSelectPart) { - $arSqls[] = array( - 'select' => $arStrSelect[$nUnionCount], - 'from' => ' FROM ' . implode(' ' , self::removeNull($arFrom[$nUnionCount])), - 'where' => ' WHERE ' . self::fixWhere( - implode(' ' , self::removeNull($arWhere[$nUnionCount])) - ) - ); - } - return $arSqls; - }//function createSql() - - - - /** - * Creates some SQL statements from the given triple pattern - * array. - * - * @param QueryTriple $triple Array containing subject, predicate and object - * @param GraphPattern $graphPattern Graph pattern object - * - * @return array Array consisting of on array and two string values: - * SELECT, FROM and WHERE part - */ - function getTripleSql(QueryTriple $triple, GraphPattern $graphPattern, $arResultVars) - { - $arSelect = array(); - $strFrom = null; - $strWhere = null; - $strWhereEquality = ''; - $bWhereEqualitySubject = false; - $bWhereEqualityPredicate = false; - $bWhereEqualityObject = false; - - $subject = $triple->getSubject(); - $predicate = $triple->getPredicate(); - $object = $triple->getObject(); - - $arRefVars = array(); - $strTablePrefix = 't' . $this->nTableId; - - /** - * SELECT part - * We do select only the columns we need for variables - */ - if (SparqlVariable::isVariable($subject)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$subject])) { - //already selected -> add equality check - $bWhereEqualitySubject = true; - $this->arUsedVarTypes[$subject]['s'] = true; - } else { - if (isset($this->arVarAssignments[$subject][0])) { - $strTablePrefix = $this->arVarAssignments[$subject][0]; - } - $this->arVarAssignments[$subject] = array($strTablePrefix, 's'); - $this->arUnionVarAssignments[$this->nUnionCount][$subject] = array($strTablePrefix, 's'); - $this->arUsedVarTypes[$subject]['s'] = true; - if (self::isResultVar($subject, $arResultVars)) { - //new variable that needs to be selected - $arSelect[$subject] = $this->createVariableSelectArray( - 's', $subject, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$subject])) { - $arRefVars[$subject] = $strTablePrefix . '.subject'; - } else { - $this->arUsedVarAssignments[$subject] = $strTablePrefix . '.subject'; - } - } - } - } - - if (SparqlVariable::isVariable($predicate)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$predicate])) { - //already selected -> add equality check - $bWhereEqualityPredicate = true; - $this->arUsedVarTypes[$predicate]['p'] = true; - } else { - if (isset($this->arVarAssignments[$predicate][0])) { - $strTablePrefix = $this->arVarAssignments[$predicate][0]; - } - $this->arVarAssignments[$predicate] = array($strTablePrefix, 'p'); - $this->arUnionVarAssignments[$this->nUnionCount][$predicate] = array($strTablePrefix, 'p'); - $this->arUsedVarTypes[$predicate]['p'] = true; - if (self::isResultVar($predicate, $arResultVars)) { - $arSelect[$predicate] = $this->createVariableSelectArray( - 'p', $predicate, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$predicate])) { - $arRefVars[$predicate] = $strTablePrefix . '.predicate'; - } else { - $this->arUsedVarAssignments[$predicate] = $strTablePrefix . '.predicate'; - } - } - } - } - - if (SparqlVariable::isVariable($object)) { - if (isset($this->arUnionVarAssignments[$this->nUnionCount][$object])) { - //already selected -> add equality check - $bWhereEqualityObject = true; - $this->arUsedVarTypes[$object]['o'] = true; - } else { - if (isset($this->arVarAssignments[$object][0])) { - $strTablePrefix = $this->arVarAssignments[$object][0]; - } - $this->arVarAssignments[$object] = array($strTablePrefix, 'o'); - $this->arUnionVarAssignments[$this->nUnionCount][$object] = array($strTablePrefix, 'o'); - $this->arUsedVarTypes[$object]['o'] = true; - if (self::isResultVar($object, $arResultVars)) { - $arSelect[$object] = $this->createVariableSelectArray( - 'o', $object, $strTablePrefix - ); - if (isset($this->arUsedVarAssignments[$object])) { - $arRefVars[$object] = $strTablePrefix . '.object'; - } else { - $this->arUsedVarAssignments[$object] = $strTablePrefix . '.object'; - } - } - if (isset($this->query->varLanguages[$object]) - && $this->query->varLanguages[$object] !== null - ) { - $strWhereEquality .= - ' AND ' . $strTablePrefix . '.l_language = "' - . addslashes($this->query->varLanguages[$object]) . '"'; - } - if (isset($this->query->varDatatypes[$object]) - && $this->query->varDatatypes[$object] !== null - ) { - $strWhereEquality .= - ' AND ' . $strTablePrefix . '.l_datatype = "' - . addslashes($this->query->varDatatypes[$object]) . '"'; - } - } - } - - /** - * WhereEquality - needs to be done now because strTablePrefix may change - */ - if ($bWhereEqualitySubject) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 's'), - $this->arVarAssignments[$subject] - ); - } - if ($bWhereEqualityPredicate) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 'p'), - $this->arVarAssignments[$predicate] - ); - } - if ($bWhereEqualityObject) { - $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition( - array($strTablePrefix, 'o'), - $this->arVarAssignments[$object] - ); - } - - - /** - * FROM part - */ - if ($this->nUnionTriplePatternCount == 0) { - //first FROM - $strFrom = $this->tblStatements . ' as ' . $strTablePrefix; - } else { - //normal join - if (count($this->arModelIds) == 1) { - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON t0.modelID = ' . $strTablePrefix . '.modelID'; - } else if (count($this->arModelIds) > 1) { - $arIDs = array(); - foreach ($this->arModelIds as $nId) { - $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId); - } - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON (' . implode(' OR ', $arIDs) . ')'; - } else { - $strFrom = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix - . ' ON t0.modelID = ' . $strTablePrefix . '.modelID'; - } - - foreach ($arRefVars as $strRefVar => $strSqlVar) { - $strFrom .= ' AND ' . $this->arUsedVarAssignments[$strRefVar] . ' = ' . $strSqlVar; - } - - if ($graphPattern->getOptional() !== null) { - $strFrom .= $this->getSqlCondition($subject , $strTablePrefix, 'subject') - . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate') - . $this->getSqlCondition($object , $strTablePrefix, 'object') - . $strWhereEquality; - } - } - - - /** - * WHERE part - */ - if ($this->nUnionTriplePatternCount == 0) { - if (count($this->arModelIds) == 1) { - $strWhere = $strTablePrefix . '.modelID = ' . intval(reset($this->arModelIds)); - } else if (count($this->arModelIds) > 1) { - $arIDs = array(); - foreach ($this->arModelIds as $nId) { - $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId); - } - $strWhere = '(' . implode(' OR ', $arIDs) . ')'; - } else { - //so that we can append an AND - $strWhere = '1'; - } - } - if ($graphPattern->getOptional() === null || $this->nGraphPatternCount == 0) { - $strWhere .= $this->getSqlCondition($subject , $strTablePrefix, 'subject') - . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate') - . $this->getSqlCondition($object , $strTablePrefix, 'object') - . $strWhereEquality; - } - - return array($arSelect, $strFrom, $strWhere); - }//function getTripleSql(QueryTriple $triple) - - - - - protected function createVariableSelectArray($chType, $varname, $strTablePrefix) - { - $var = $this->query->getResultVar($varname); - if ($var !== false) { - if ((string)$var != $varname) { - //copy over var assignments - $this->arVarAssignments[(string)$var] = $this->arVarAssignments[$varname]; - } - - //works on non-* only - $func = $var->getFunc(); - if ($func != null) { - if ($func == 'datatype') { - if ($chType != 'o') { - throw new SparqlEngineDb_SqlGeneratorException( - 'datatype() works on objects only' - ); - } - return array( - $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"', - '"r"' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"', - ); - } else if ($func == 'lang') { - if ($chType != 'o') { - throw new SparqlEngineDb_SqlGeneratorException( - 'lang() works on objects only' - ); - } - return array( - $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"', - '"l"' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"', - '""' . ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"', - ); - } else { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported function for select "' . $func . '"' - ); - } - } - } - - switch ($chType) { - case 's': - return array( - $strTablePrefix . '.subject as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"', - $strTablePrefix . '.subject_is as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"' - ); - case 'p': - return array( - $strTablePrefix . '.predicate as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"' - ); - case 'o': - return array( - $strTablePrefix . '.object as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"', - $strTablePrefix . '.object_is as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"', - $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($varname) . '"', - $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($varname) . '"', - ); - default: - throw new SparqlEngineDb_SqlGeneratorException( - 'Unknown sentence type "' . $chType . "', one of (s,p,o) expected" - ); - } - }//protected function createVariableSelectArray($chType, $value, $strTablePrefix) - - - - /** - * Creates SELECT statements that have the same number of columns. - * Needed for UNIONs. - * - * @param array $arSelect Array of arrays. - * array( - * //for each union part one - * 0 => array( - * //foreach triple pattern - * 0 => array( - * '?person' => array( - * 't0.subject as "t0.subject"' - * ) - * ) - * ) - * ) - * @return array Array of SELECT strings - */ - protected function createEqualSelects($arSelect) - { - $arNewSelect = array(); - if (count($arSelect) == 1) { - if ($arSelect[0] == array(array())) { - //ASK and COUNT - return array(array('')); - } - - foreach ($arSelect[0] as $arTripleVars) { - $ar = array(); - foreach ($arTripleVars as $arVarParts) { - $ar[] = implode(', ', $arVarParts); - } - if (count($ar) > 0) { - $arNewSelect[0][] = implode(', ', $ar); - } - } - return $arNewSelect; - } - - $arVars = array(); - foreach ($arSelect as $arUnionVars) { - foreach ($arUnionVars as $arTripleVars) { - $arVars = array_merge($arVars, array_keys($arTripleVars)); - } - } - $arVars = array_unique($arVars); - - foreach ($arSelect as $nUnionCount => $arUnionVars) { - $arSelectVars = array(); - foreach ($arUnionVars as $arTripleVars) { - foreach ($arTripleVars as $strVar => $arVarParts) { - $arSelectVars[$strVar] = $arVarParts; - } - } - - $ars = array(); - foreach ($arVars as $strVar) { - if (isset($arSelectVars[$strVar])) { - $ar = $arSelectVars[$strVar]; - $nCount = count($arSelectVars[$strVar]); - } else { - $ar = array(); - $nCount = 0; - } - - if ($nCount == 0) { - //nothing of this variable in this union part - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_value'] . '"'; - } - if (( - isset($this->arUsedVarTypes[$strVar]['o']) - || isset($this->arUsedVarTypes[$strVar]['s']) - ) && $nCount < 2 - ) { - //it's a subject or object, but we don't want the type - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_is'] . '"'; - } - if (isset($this->arUsedVarTypes[$strVar]['o']) && $nCount < 4) { - //it's a subject or object, but we don't want the type - if (isset($this->arVarAssignments[$strVar]['sql_lang'])) { - $strColLanguage = $this->arVarAssignments[$strVar]['sql_lang']; - } else { - $strColLanguage = 'dummyLang'; - } - if (isset($this->arVarAssignments[$strVar]['sql_type'])) { - $strColDatatype = $this->arVarAssignments[$strVar]['sql_type']; - } else { - $strColDatatype = 'dummyType'; - } - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColLanguage . '"'; - $ar[] = 'NULL as ' - . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColDatatype . '"'; - } - $ars[] = implode(', ', $ar); - } - $arNewSelect[$nUnionCount] = $ars; - } - - return $arNewSelect; - }//protected function createEqualSelects($arSelect) - - - - /** - * Creates an SQL statement that checks for the value - * of some subject/predicate/object - * - * @param mixed $bject subject|predicate|object - * @param string $strTablePrefix Table prefix (e.g. "t0") - * @param string $strType Type of $bject ('subject'|'predicate'|'object') - * @return string Part of the SQL query (prefixed with AND) - */ - function getSqlCondition($bject, $strTablePrefix, $strType) - { - if (is_string($bject)) { - if (SparqlVariable::isVariable($bject)) { - //variable? - if (self::isPreparedVariable($bject)) { - //no, not really - $value = $this->getPreparedVariablePlaceholder($bject); - } else { - //yes - return null; - } - } else { - $value = $this->dbConn->qstr($bject); - } - //literal - return ' AND ' . $strTablePrefix . '.' . $strType . ' = ' . $value; - } - - if ($bject instanceof BlankNode) { - //Blank node - throw new SparqlEngineDb_SqlGeneratorException( - 'FIXME: Querying for blank nodes not supported' - ); - - } else if ($bject instanceof Resource) { - //Resource - $r = ' AND ' . $strTablePrefix . '.' . $strType . ' = ' - . $this->dbConn->qstr($bject->getURI()); - if ($strType !== 'predicate') { - $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is =' - . ' "r"'; - } - return $r; - - } else if ($bject instanceof Literal) { - //Literal - //I'm doubling Filter code here, but what the hell - $strColDatatype = $strTablePrefix . '.l_datatype'; - if ($bject->dtype == 'http://www.w3.org/2001/XMLSchema#integer' - || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#double' - ) { - $strVariable = 'CAST(' . $strTablePrefix . '.' . $strType . ' AS DECIMAL(15,10))'; - $strValue = $bject->getLabel(); - } else { - $strVariable = $strTablePrefix . '.' . $strType; - $strValue = $this->dbConn->qstr($bject->getLabel()); - } - $r = ' AND ' . $strVariable . ' = ' . $strValue; - if ($strType !== 'predicate') { - $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is =' - . ' "l"'; - } - - if ($strType == 'object') { - if ($bject->dtype == '' || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#string') { - //string - $r .= ' AND (' - . $strColDatatype . ' = ""' - . ' OR ' . $strColDatatype . ' = "http://www.w3.org/2001/XMLSchema#string"' - . ')'; - } else { - $r .= ' AND ' . $strColDatatype . ' = "' - . $bject->dtype - . '"'; - } - } - - if ($bject->lang != '') { - $strColLanguage = $strTablePrefix . '.l_language'; - $r .= ' AND ' . $strColLanguage . ' = ' - . $this->dbConn->qstr($bject->lang); - } - return $r; - - } else { - throw new SparqlEngineDb_SqlGeneratorException( - 'Unsupported sentence part: ' . get_class($bject) - ); - } - }//function getSqlCondition($bject, $strTablePrefix, $strType) - - - - /** - * Checks if the sentence part (subject, predicate or object) in - * $arNew has the same content as $arOld. - * Required for queries like ":x ?a ?a" where predicate and object - * need to have the same value - * - * @param array $arNew array($strTablePrefix, $strType = s|p|o) - * @param array $arOld array($strTablePrefix, $strType = s|p|o) - * @return string - */ - protected static function getSqlEqualityCondition($arNew, $arOld) - { - $chTypeNew = $arNew[1]; $chTypeOld = $arOld[1]; - $strTablePrefixNew = $arNew[0]; $strTablePrefixOld = $arOld[0]; - - if ($chTypeNew == 'p' || $chTypeOld == 'p') { - //just check value - //FIXME: it might be I need to check for resource type in object and subject - return - $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value'] - ; - } else if ($chTypeNew == 's' || $chTypeOld == 's') { - //check value and type - return - $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value'] - . ' AND ' - . $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['is'] - . ' = ' - . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['is'] - ; - } else { - //two objects -> check everything - return - $strTablePrefixNew . '.object = ' . $strTablePrefixOld . '.object' - . ' AND ' - . $strTablePrefixNew . '.object_is = ' . $strTablePrefixOld . '.object_is' - . ' AND ' - . $strTablePrefixNew . '.l_language = ' . $strTablePrefixOld . '.l_language' - . ' AND ' - . $strTablePrefixNew . '.l_datatype = ' . $strTablePrefixOld . '.l_datatype' - ; - } - }//protected static function getSqlEqualityCondition($arNew, $arOld) - - - - /** - * Checks if the given variable name is part of the result - * variables list. - * Needed since $arResultVars may contain "*" that captures all variables. - * - * @param string $strVar Variable name (e.g. "?p") - * @param array $arResultVars Array with result variables - * @return boolean true if it is a result variable - */ - protected static function isResultVar($strVar, &$arResultVars) - { - foreach ($arResultVars as $var) { - if ($var == '*') { - return true; - } else if ((is_string($var) && $var == $strVar) - || (is_object($var) && $var->getVariable() == $strVar)) { - return true; - } - } - return false; - }//protected static function isResultVar($strVar, &$arResultVars) - - - - /** - * Checks if the given variable is a replacement - * for a prepared statement. - * - * @return boolean - */ - public static function isPreparedVariable($bject) - { - return is_string($bject) && strlen($bject) >= 3 - && ($bject[0] == '?' || $bject[0] == '$') - && ($bject[1] == '?' || $bject[1] == '$') - ; - }//public static function isPreparedVariable($bject) - - - - /** - * Returns a placeholder to be included in the sql statement. - * It will be replaced with a real prepared statement variable later on. - * Also adds it to the internal placeholder array. - * - * @param string $strVariable The variable to get a placeholder for - * @return string placeholder - */ - protected function getPreparedVariablePlaceholder($strVariable) - { - $strName = substr($strVariable, 2); - if (!isset($this->arPlaceholders[$strName])) { - $this->arPlaceholders[$strName] = '@$%_PLACEHOLDER_' - . count($this->arPlaceholders) . '_%$@'; - } - return $this->arPlaceholders[$strName]; - }//protected function getPreparedVariablePlaceholder($strVariable) - - - - public function getPlaceholders() - { - return $this->arPlaceholders; - }//public function getPlaceholders() - - - - public function getVarAssignments() - { - return $this->arVarAssignments; - }//public function getVarAssignments() - - - - public function getUsedVarAssignments() - { - return $this->arUsedVarAssignments; - }//public function getUsedVarAssignments() - - - - public function getUsedVarTypes() - { - return $this->arUsedVarTypes; - }//public function getUsedVarTypes() - - - - /** - * Removes all NULL values from an array and returns it. - * - * @param array $array Some array - * @return array $array without the NULL values. - */ - protected static function removeNull($array) - { - foreach ($array as $key => &$value) { - if ($value === null) { - unset($array[$key]); - } - } - return $array; - }//protected static function removeNull($array) - - - - /** - * Removes a leading AND from the where clause which would render - * the sql illegal. - */ - protected function fixWhere($strWhere) - { - $strWhere = ltrim($strWhere); - if (substr($strWhere, 0, 4) == 'AND ') { - $strWhere = substr($strWhere, 4); - } - return $strWhere; - }//protected function fixWhere($strWhere) - - - - protected function getSqlVariableName($var) - { - $strSparqlVar = (string)$var; - if (!isset($this->arVarAssignments[$strSparqlVar]['sqlname'])) { - if (preg_match('/[a-zA-Z0-9]+/', substr($strSparqlVar, 1))) { - $strName = 'v_' . substr($strSparqlVar, 1); - } else { - $strName = 'va_' . $this->nSqlVariableNameCount++; - } - $this->arVarAssignments[$strSparqlVar]['sqlname'] = $strName; - } - return $this->arVarAssignments[$strSparqlVar]['sqlname']; - }//protected function getSqlVariableName($var) - - - - protected function getSqlVariableNameValue($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_value'] = - 'value_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_value']; - }//protected function getSqlVariableNameValue($var) - - - - protected function getSqlVariableNameIs($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_is'] = - 'is_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_is']; - }//protected function getSqlVariableNameIs($var) - - - - protected function getSqlVariableNameLanguage($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_lang'] = - 'lang_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_lang']; - }//protected function getSqlVariableNameLanguage($var) - - - - protected function getSqlVariableNameDatatype($var) - { - $strSparqlVar = (string)$var; - $this->arVarAssignments[$strSparqlVar]['sql_type'] = - 'type_' . $this->getSqlVariableName($var); - return $this->arVarAssignments[$strSparqlVar]['sql_type']; - }//protected function getSqlVariableNameDatatype($var) - - - - public function setStatementsTable($tblStatements) - { - $this->tblStatements = $tblStatements; - }//public function setStatementsTable($tblStatements) - -}//class SparqlEngineDb_SqlGenerator -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGeneratorException.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGeneratorException.php deleted file mode 100755 index 1d98a3b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlGeneratorException.php +++ /dev/null @@ -1,14 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlGeneratorException extends Exception -{ -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlMerger.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlMerger.php deleted file mode 100755 index d53137f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/SqlMerger.php +++ /dev/null @@ -1,46 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_SqlMerger -{ - public static function getSelect(Query $query, $arSqls, $strAdditional = '') - { - if (count($arSqls) == 1) { - return implode('', $arSqls[0]) . $strAdditional; - } - - //union - $strUnion = 'UNION' . - ($query->getResultForm() == 'select distinct' ? '' : ' ALL'); - $ar = array(); - foreach ($arSqls as $arSql) { - $ar[] = implode('', $arSql) . $strAdditional; - } - return '(' . implode(') ' . $strUnion . ' (', $ar) . ')'; - }//public static function getSelect(Query $query, $arSqls, $strAdditional = '') - - - - public static function getCount(Query $query, $arSqls, $strAdditional = '') - { - if (count($arSqls) == 1) { - return 'SELECT COUNT(*) as count ' . $arSqls[0]['from'] . $arSqls[0]['where'] . $strAdditional; - } - - $ar = array(); - foreach ($arSqls as $arSql) { - $ar[] = implode('', $arSql) . $strAdditional; - } - return 'SELECT (' . implode(') + (', $ar) . ') as count'; - }//public static function getCount(Query $query, $arSqls, $strAdditional = '') - -}//class SparqlEngineDb_SqlMerger - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/TypeSorter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/TypeSorter.php deleted file mode 100755 index 5b92d540..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlEngineDb/TypeSorter.php +++ /dev/null @@ -1,450 +0,0 @@ - -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlEngineDb_TypeSorter -{ - /** - * Defines the sort order for value types in the database, - * so that they get sorted correctly as the specs want it. - * @var array - */ - public static $arTypeNumbers = array( - null => 0,//empty - 'b' => 1,//blank - 'r' => 2,//resource - 'l' => 3,//literal - ); - - /** - * SQL types to cast XSD schema types to, so that they will get - * sorted correctly. - * @var array - */ - public static $arCastTypes = array( - 'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER', - 'http://www.w3.org/2001/XMLSchema#decimal' => 'DECIMAL', - //yes, this does not work with multiple time zones. - 'http://www.w3.org/2001/XMLSchema#dateTime' => 'CHAR', - 'http://www.w3.org/2001/XMLSchema#date' => 'CHAR', - ); - - - - public function __construct(Query $query, ADOConnection $dbConn) - { - $this->dbConn = $dbConn; - $this->query = $query; - } - - - /** - * Needs to be executed before getOrderifiedSqls and willBeDataDependent - * - * @param SparqlEngineDb_SqlGenerator $sg SQL generator object - */ - public function setData(SparqlEngineDb_SqlGenerator $sg) - { - $this->arUsedVarTypes = $sg->getUsedVarTypes(); - $this->arUsedVarAssignments = $sg->getUsedVarAssignments(); - $this->arVarAssignments = $sg->getVarAssignments(); - }//public function setData(SparqlEngineDb_SqlGenerator $sg) - - - - /** - * Returns an array of sql statements that need to be executed - * and deliver the full result set when combined. - * - * Execute setData() before this. - * - * @internal It is not possible (ok, it is - but it would really complicate - * the queries and the code here) to use UNION to combine the sqls to - * a single one - UNION merges the results and does not keep the order - * of the rows. Citing the mysql manual: - * Use of ORDER BY for individual SELECT statements implies nothing - * about the order in which the rows appear in the final result because - * UNION by default produces an unordered set of rows. If ORDER BY - * appears with LIMIT, it is used to determine the subset of the - * selected rows to retrieve for the SELECT, but does not necessarily - * affect the order of those rows in the final UNION result. - * If ORDER BY appears without LIMIT in a SELECT, it is - * optimized away because it will have no effect anyway. - * - * @param string $strSelect SELECT clause - * @param string $strFrom FROM clause - * @param string $strWhere WHERE clause - * @return array Array of arrays. Imploding an array will give - * a complete sql statement. The array will have the keys - * select/from/where/order. - */ - public function getOrderifiedSqls($arSqls) - { - if (count($arSqls) == 0) { - return $arSqls; - } - - $strSelect = $arSqls[0]['select']; - $strFrom = $arSqls[0]['from']; - $strWhere = $arSqls[0]['where']; - - $strResultForm = $this->query->getResultForm(); - if ($strResultForm == 'ask' || $strResultForm == 'count') { - return array( - $arSqls - ); - } - - $arSpecial = $this->getSpecialOrderVariables(); - if (count($arSpecial) == 0) { - $strOrder = $this->getSqlOrderBy(); - foreach ($arSqls as &$arSql) { - $arSql['order'] = $strOrder; - } - return array( - $arSqls - ); - } - - $arTypeSets = $this->orderTypeSets( - $this->getTypeSets($arSpecial, $strFrom, $strWhere) - ); - - $arNewSqls = array(); - foreach ($arTypeSets as $arTypeSet) { - $arSqlParts = array(); - foreach ($arSqls as $arSql) { - $arSql['where'] .= $this->getTypesetWhereClause($arTypeSet); - $arSql['order'] = $this->getSqlOrderBy($arTypeSet); - $arSqlParts[] = $arSql; - } - $arNewSqls[] = $arSqlParts; - } - - return $arNewSqls; - }//public function getOrderifiedSqls($arUsedVarAssignments, $strSelect, $strFrom, $strWhere) - - - - /** - * Returns wether the returned queries will depend on the data or not. - * If the queries depend on the data, they cannot be prepare()d and - * thus won't be that fast when executing. - * - * Execute setData() before this. - * - * @return boolean - */ - public function willBeDataDependent() - { - $strResultForm = $this->query->getResultForm(); - return !( - $strResultForm == 'ask' || $strResultForm == 'count' - || count($this->getSpecialOrderVariables()) == 0 - ); - }//public function willBeDataDependent() - - - - /** - * Returns an array of variables that the result is going to be - * ordered by and that need to be sorted multiple times - * (because they may contain different data types) - * - * @return array Array of sparql variable names - */ - protected function getSpecialOrderVariables() - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] === null) { - return array(); - } - - $arSpecial = array(); - foreach ($arSM['order by'] as $arVar) { - if ($this->isSpecialOrderVariable($arVar['val'])) { - $arSpecial[] = $arVar['val']; - } - } - return $arSpecial; - }//protected function getSpecialOrderVariables() - - - - /** - * Checks if a given variable name is a variable that - * needs special care when used in ORDER BY statements. - * - * @param string $strVar SPARQL variable name - * @return boolean true if the variable needs special care - */ - protected function isSpecialOrderVariable($strVar) - { - return !isset($this->arUsedVarTypes[$strVar]['s']) - && !isset($this->arUsedVarTypes[$strVar]['p']); - }//protected function isSpecialOrderVariable($arVar) - - - - /** - * Determines the type sets in the query results. - * A type set is a distinct set of variables and their types, - * e.g. the variable and its type (r/b/l) and its datatype - * if its an object. - * - * @param array $arSpecialVars Special variables as returned by - * getSpecialOrderVariables() - * @param string $strFrom FROM part of the sql query - * @param string $strWhere WHERE part of the sql query - * - * @return array Key is the sparql variable name, value is an - * array. This one has one key 'type' with a - * value of b/l/r. It might have another key - * 'datatype' with the resource's datatype. - */ - protected function getTypeSets($arSpecialVars, $strFrom, $strWhere) - { - $arSel = array(); - foreach ($arSpecialVars as $strSparqlVar) { - if ($this->arVarAssignments[$strSparqlVar][1] == 'o') { - $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.l_datatype' - . ' as "' . $strSparqlVar . '-datatype"'; - } - $strTypeCol = $this->arVarAssignments[$strSparqlVar][1] == 'o' - ? 'object_is' : 'subject_is'; - $this->arVarAssignments[$strSparqlVar][2] = $strTypeCol; - $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.' . $strTypeCol - . ' as "' . $strSparqlVar . '-type"'; - } - - $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC); - $sql = 'SELECT DISTINCT ' . implode(', ', $arSel) . ' ' . $strFrom . $strWhere; - $arResult = $this->dbConn->execute($sql); - $this->dbConn->SetFetchMode($oldmode); - - if ($arResult === false) { - throw new SparqlEngineDb_SqlGeneratorException( - 'Error reading typesets: ' . $sql - ); - } - - $arTypes = array(); - foreach ($arResult as $arRow) { - $nLine = count($arTypes); - foreach ($arRow as $key => $value) { - list($strSparqlVar, $strType) = explode('-', $key); - $arTypes[$nLine][$strSparqlVar][$strType] = $value; - } - } - - return $arTypes; - }//protected function getTypeSets($arSpecialVars, $strFrom, $strWhere) - - - - /** - * Takes an array of type sets (as returned by getTypeSets()) and - * sorts the variables according to the SPARQL specs. - * - * @param array $arTypes Array of type sets - * @return array Ordered array of type sets - */ - protected function orderTypeSets($arTypes) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] !== null) { - $this->arDirection = array(); - foreach ($arSM['order by'] as $arVar) { - $this->arDirection[$arVar['val']] = - (strtoupper($arVar['type']) == 'ASC' ? 1 : -1); - } - } - - usort($arTypes, array($this, 'compareTypeSet')); - - return $arTypes; - }//protected function orderTypeSets($arTypes) - - - - /** - * Compares two type sets. Works like a normal comparision - * method that returns -1/0/1 for use in usort() - * - * @param array $arTs1 First typeset - * @param array $arTs2 Second typeset - * @return int Comparison value - */ - public function compareTypeSet($arTs1, $arTs2) - { - foreach ($arTs1 as $strSparqlVar => $arType1) { - //compare types - $n = self::$arTypeNumbers[$arType1['type']] - - self::$arTypeNumbers[$arTs2[$strSparqlVar]['type']]; - if ($n != 0) { - //and take ASC/DESC into account - return $n * $this->arDirection[$strSparqlVar]; - } - - //compare the datatypes - $n = self::compareXsdType( - $arType1['datatype'], - $arTs2[$strSparqlVar]['datatype'] - ); - //if they are not equal, return the value - if ($n != 0) { - //and take ASC/DESC into account - return $n * $this->arDirection[$strSparqlVar]; - } - } - - //they are equal - return 0; - }//public function compareTypeSet($arTs1, $arTs2) - - - - /** - * Compares two XSD data types and returns the comparison number. - * - * @param string $strType1 First data type - * @param string $strType2 Second data type - * @return int Comparison number (<0 if $strType1 is less than - * $strType2, 0 if equal, >0 if type2 is greater) - */ - public static function compareXsdType($strType1, $strType2) - { - return self::getXsdTypeNumber($strType1) - self::getXsdTypeNumber($strType2); - }//public static function compareXsdType($strType1, $strType2) - - - - /** - * Returns the type number for an xsd data type. - * - * @param string $strType XSD data type - * @return int Some integer to compare two types. - */ - public static function getXsdTypeNumber($strType) - { - if ($strType === null) { - return 0; - } else if ($strType == '') { - return 1; - } else { - return 2; - } - }//public static function getXsdTypeNumber($strType) - - - - /** - * Returns the ORDER BY sql query string - * if neccessary for the query. The returned string - * already has ORDER BY prefixed. - * - * @internal Also takes care of casting the data if the type - * is listed in $arCastTypes. See getCastMethod() for more info. - * - * @param arrray $arTypeSet Single typeset - * @return string ORDER BY ... string or empty string - */ - function getSqlOrderBy($arTypeSet = array()) - { - $arSM = $this->query->getSolutionModifier(); - if ($arSM['order by'] === null) { - return ''; - } - - $sqlOrder = array(); - foreach ($arSM['order by'] as $arVar) { - $strSparqlVar = $arVar['val']; - if (isset($this->arUsedVarAssignments[$strSparqlVar])) { - if (!isset($arTypeSet[$strSparqlVar]['datatype']) - || $arTypeSet[$strSparqlVar]['datatype'] == '') { - $sqlOrder[] = $this->arUsedVarAssignments[$strSparqlVar] . ' ' . strtoupper($arVar['type']); - } else { - $sqlOrder[] = self::getCastMethod( - $arTypeSet[$strSparqlVar]['datatype'], - $this->arUsedVarAssignments[$strSparqlVar] - ) . ' ' . strtoupper($arVar['type']); - } - } - } - - return ' ORDER BY ' . implode(', ', $sqlOrder); - }//function getSqlOrderBy($arTypeSet = array()) - - - - /** - * Returns the SQL statement needed to case the given variable to - * the given type. - * - * @param string $strType XML data type - * @param string $strSqlVar SQL variable name - * @return string SQL command to cast the variable - */ - protected static function getCastMethod($strType, $strSqlVar) - { - if (isset(self::$arCastTypes[$strType])) { - return 'CAST(' . $strSqlVar . ' as ' . self::$arCastTypes[$strType] . ')'; - } else { - //unsupported type! - throw new Exception('Unsupported cast type in order by: ' . $strType); - return $strSqlVar; - } - }//protected static function getCastMethod($strType, $strSqlVar) - - - - /** - * Creates and returns the SQL WHERE clauses needed to get only - * data in the given typeset. - * - * @param array $arTypeSet Typeset - * @return string Clauses for the WHERE part in an SQL query - */ - protected function getTypesetWhereClause($arTypeSet) - { - $strWhereTypes = ''; - foreach ($arTypeSet as $strSparqlVar => $arType) { - //check type - $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0] - . '.' . $this->arVarAssignments[$strSparqlVar][2] - . $this->getStringNullComparison($arType['type']); - //check datatype - if (isset($arType['datatype'])) { - $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0] - . '.l_datatype ' - . $this->getStringNullComparison($arType['datatype']); - } - } - return $strWhereTypes; - }//protected function getTypesetWhereClause($arTypeSet) - - - - /** - * Returns the correct sql string comparison method. - * - * @internal If the string is NULL, an "IS NULL" sql statment - * will be returned, and a normal "= 'something'" if it is - * a normal string. - */ - protected function getStringNullComparison($str) - { - if ($str === null) { - return ' IS NULL'; - } else { - return ' = ' . $this->dbConn->qstr($str) . ''; - } - }//protected function getStringNullComparison($str) - -}//class SparqlEngineDb_TypeSorter -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParser.php deleted file mode 100755 index f0e2c8c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParser.php +++ /dev/null @@ -1,1551 +0,0 @@ - -* @author Christian Weiske -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -class SparqlParser extends Object -{ - - /** - * The query Object - * @var Query - */ - protected $query; - - /** - * The Querystring - * @var string - */ - protected $queryString; - - /** - * The tokenized Query - * @var array - */ - protected $tokens = array(); - - /** - * Last parsed graphPattern - * @var int - */ - protected $tmp; - - /** - * Operators introduced by sparql - * @var array - */ - protected static $sops = array( - 'regex', - 'bound', - 'isuri', - 'isblank', - 'isliteral', - 'str', - 'lang', - 'datatype', - 'langmatches' - ); - - /** - * Which order operators are to be treated. - * (11.3 Operator Mapping) - * @var array - */ - protected static $operatorPrecedence = array( - '||' => 0, - '&&' => 1, - '=' => 2, - '!=' => 3, - '<' => 4, - '>' => 5, - '<=' => 6, - '>=' => 7, - '*' => 0, - '/' => 0, - '+' => 0, - '-' => 0, - ); - - - - /** - * Constructor of SparqlParser - */ - public function SparqlParser() - { - } - - - - /** - * Main function of SparqlParser. Parses a query string. - * - * @param String $queryString The SPARQL query - * @return Query The query object - * @throws SparqlParserException - */ - public function parse($queryString = false) - { - $this->prepare(); - - if ($queryString) { - $this->query->setQueryString($queryString); - $uncommentedQuery = $this->uncomment($queryString); - $this->queryString = $uncommentedQuery; - $this->tokens = self::tokenize($uncommentedQuery); - $this->parseQuery(); - if (!$this->query->isComplete()) { - throw new SparqlParserException( - "Query is incomplete.", - null, - $queryString - ); - } - } else { - throw new SparqlParserException( - "Querystring is empty.", - null, - key($this->tokens) - ); - $this->query->isEmpty = true; - } - return $this->query; - }//public function parse($queryString = false) - - - - /** - * Set all internal variables to a clear state - * before we start parsing. - */ - protected function prepare() - { - $this->query = new Query(); - $this->queryString = null; - $this->tokens = array(); - $this->tmp = null; - // add the default prefixes defined in constants.php - global $default_prefixes; - $this->query->prefixes = $default_prefixes; - }//protected function prepare() - - - - /** - * Tokenizes the query string into $tokens. - * The query may not contain any comments. - * - * @param string $queryString Query to split into tokens - * - * @return array Tokens - */ - public static function tokenize($queryString) - { - $queryString = trim($queryString); - $specialChars = array(' ', "\t", "\r", "\n", ',', '\\', '(', ')','{','}','"',"'",';','[',']'); - $len = strlen($queryString); - $tokens = array(''); - $n = 0; - - for ($i = 0; $i < $len; ++$i) { - if (!in_array($queryString{$i}, $specialChars)) { - $tokens[$n] .= $queryString{$i}; - } else { - if ($tokens[$n] != '') { - ++$n; - if (!isset($tokens[$n])) { - $tokens[$n] = ''; - } - } - if ($queryString{$i} == "'" && $n > 1 - && $tokens[$n - 2] == "'" && $tokens[$n - 1] == "'" - ) { - //special ''' quotation - $tokens[$n - 2] = "'''"; - $tokens[$n - 1] = ''; - unset($tokens[$n]); - --$n; - continue; - } else if ($queryString{$i} == '"' && $n > 1 - && $tokens[$n - 2] == '"' && $tokens[$n - 1] == '"' - ) { - //special """ quotation - $tokens[$n - 2] = '"""'; - $tokens[$n - 1] = ''; - unset($tokens[$n]); - --$n; - continue; - } else if ($queryString{$i} == '\\') { - $tokens[$n] .= substr($queryString, $i, 2); - ++$i; - continue; - } - $tokens[$n] = $queryString{$i}; - $tokens[++$n] = ''; - } - } -//var_dump($tokens); - return $tokens; - }//public static function tokenize($queryString) - - - - /** - * Removes comments in the query string. Comments are - * indicated by '#'. - * - * @param String $queryString - * @return String The uncommented query string - */ - protected function uncomment($queryString) - { - $regex ="/((\"[^\"]*\")|(\'[^\']*\')|(\<[^\>]*\>))|(#.*)/"; - return preg_replace($regex,'\1',$queryString); - }//protected function uncomment($queryString) - - - - /** - * Starts parsing the tokenized SPARQL Query. - * - * @return void - */ - protected function parseQuery() - { - do { - switch (strtolower(current($this->tokens))) { - case "base": - $this->parseBase(); - break; - case "prefix": - $this->parsePrefix(); - break; - case "select": - $this->parseSelect(); - break; - case "describe": - $this->parseDescribe(); - break; - case "ask": - $this->parseAsk('ask'); - break; - case "count": - $this->parseAsk('count'); - break; - case "from": - $this->parseFrom(); - break; - case "construct": - $this->parseConstruct(); - break; - case "where": - $this->parseWhere(); - $this->parseModifier(); - break; - case "{": - prev($this->tokens); - $this->parseWhere(); - $this->parseModifier(); - break; - } - } while (next($this->tokens)); - - }//protected function parseQuery() - - - - /** - * Parses the BASE part of the query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseBase() - { - $this->_fastForward(); - if ($this->iriCheck(current($this->tokens))) { - $this->query->setBase(current($this->tokens)); - } else { - $msg = current($this->tokens); - $msg = preg_replace('/tokens) - ); - } - } - - - - /** - * Adds a new namespace prefix to the query object. - * - * @return void - * @throws SparqlParserException - */ - protected function parsePrefix() - { - $this->_fastForward(); - $prefix = substr(current($this->tokens), 0, -1); - $this->_fastForward(); - if ($this->iriCheck(current($this->tokens))) { - $uri = substr(current($this->tokens), 1, -1); - $this->query->addPrefix($prefix, $uri); - } else { - $msg = current($this->tokens); - $msg = preg_replace('/tokens) - ); - } - } - - - - /** - * Parses the SELECT part of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseSelect() - { - $this->_fastForward(); - $curLow = strtolower(current($this->tokens)); - prev($this->tokens); - if ($curLow == 'distinct') { - $this->query->setResultForm('select distinct'); - } else { - $this->query->setResultForm('select'); - } - - $currentVar = null; - $currentFunc = null; - $bWaitForRenaming = false; - while ($curLow != 'from' && $curLow != 'where' && - $curLow != "{" - ){ - $this->_fastForward(); - $curTok = current($this->tokens); - $curLow = strtolower($curTok); - - if ($this->varCheck($curTok) || $curLow == '*') { - if ($bWaitForRenaming) { - $bWaitForRenaming = false; - $currentVar->setAlias($curTok); - if ($currentFunc != null) { - $currentVar->setFunc($currentFunc); - } - $this->query->addResultVar($currentVar); - $currentVar = null; - } else { - if ($currentVar != null) { - $this->query->addResultVar($currentVar); - $currentVar = null; - } - $currentVar = new Query_ResultVariable($curTok); - if ($currentFunc != null) { - $currentVar->setFunc($currentFunc); - } - } - $currentFunc = null; - } else if ($curLow == 'as') { - if ($currentVar === null) { - throw new SparqlParserException( - 'AS requires a variable left and right', - null, - key($this->tokens) - ); - } - $bWaitForRenaming = true; - } else if (in_array($curLow, self::$sops)) { - $currentFunc = $curLow; - } - - if (!current($this->tokens)) { - throw new SparqlParserException( - "Unexpected end of File.", - null, - key($this->tokens) - ); - } - } - - if ($currentVar != null) { - $this->query->addResultVar($currentVar); - } - prev($this->tokens); - - if (count($this->query->getResultVars()) == 0) { - throw new SparqlParserException( - "Variable or '*' expected.", - null, - key($this->tokens) - ); - } - }//protected function parseSelect() - - - /** - * Adds a new variable to the query and sets result form to 'DESCRIBE'. - * - * @return void - */ - protected function parseDescribe() - { - while(strtolower(current($this->tokens))!='from'& strtolower(current($this->tokens))!='where'){ - $this->_fastForward(); - if($this->varCheck(current($this->tokens))|$this->iriCheck(current($this->tokens))){ - $this->query->addResultVar(current($this->tokens)); - if(!$this->query->getResultForm()) - $this->query->setResultForm('describe'); - } - if(!current($this->tokens)) - break; - } - prev($this->tokens); - } - - /** - * Sets result form to 'ASK' and 'COUNT'. - * - * @param string $form if it's an ASK or COUNT query - * @return void - */ - protected function parseAsk($form){ - $this->query->setResultForm($form); - $this->_fastForward(); - if(current($this->tokens)=="{") - $this->_rewind(); - $this->parseWhere(); - $this->parseModifier(); - } - - /** - * Parses the FROM clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseFrom(){ - $this->_fastForward(); - if(strtolower(current($this->tokens))!='named'){ - if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){ - $this->query->addFrom(new Resource(substr(current($this->tokens),1,-1))); - }else if($this->varCheck(current($this->tokens))){ - $this->query->addFrom(current($this->tokens)); - }else{ - throw new SparqlParserException("Variable, Iri or qname expected in FROM ",null,key($this->tokens)); - } - $this->query->addFrom(current($this->tokens)); - }else{ - $this->_fastForward(); - if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){ - $this->query->addFromNamed(new Resource(substr(current($this->tokens),1,-1))); - }else if($this->varCheck(current($this->tokens))){ - $this->query->addFromNamed(current($this->tokens)); - }else{ - throw new SparqlParserException("Variable, Iri or qname expected in FROM NAMED ",null,key($this->tokens)); - } - } - } - - - /** - * Parses the CONSTRUCT clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseConstruct(){ - $this->_fastForward(); - $this->query->setResultForm('construct'); - if(current($this->tokens)=="{"){ - $this->parseGraphPattern(false,false,false,true); - }else{ - throw new SparqlParserException("Unable to parse CONSTRUCT part. '{' expected. ",null,key($this->tokens)); - } - $this->parseWhere(); - $this->parseModifier(); - } - - - /** - * Parses the WHERE clause. - * - * @return void - * @throws SparqlParserException - */ - protected function parseWhere(){ - $this->_fastForward(); - if(current($this->tokens)=="{"){ - $this->parseGraphPattern(); - }else{ - throw new SparqlParserException("Unable to parse WHERE part. '{' expected in Query. ",null,key($this->tokens)); - } - } - - - - /** - * Checks if $token is a variable. - * - * @param String $token The token - * @return boolean TRUE if the token is a variable false if not - */ - protected function varCheck($token) - { - if (isset($token[0]) && ($token{0} == '$' || $token{0} == '?')) { - $this->query->addUsedVar($token); - return true; - } - return false; - } - - /** - * Checks if $token is an IRI. - * - * @param String $token The token - * @return boolean TRUE if the token is an IRI false if not - */ - protected function iriCheck($token){ - $pattern="/^<[^>]*>\.?$/"; - if(preg_match($pattern,$token)>0) - return true; - return false; - } - - - /** - * Checks if $token is a Blanknode. - * - * @param String $token The token - * @return boolean TRUE if the token is BNode false if not - */ - protected function bNodeCheck($token){ - if($token{0} == "_") - return true; - else - return false; - } - - - /** - * Checks if $token is a qname. - * - * @param String $token The token - * @return boolean TRUE if the token is a qname false if not - * @throws SparqlParserException - */ - protected function qnameCheck($token) - { - $pattern="/^([^:^\<]*):([^:]*)$/"; - if (preg_match($pattern,$token,$hits)>0) { - $prefs = $this->query->getPrefixes(); - if (isset($prefs{$hits{1}})) { - return true; - } - if ($hits{1} == "_") { - return true; - } - throw new SparqlParserException("Unbound Prefix: ".$hits{1}."",null,key($this->tokens)); - } else { - return false; - } - } - - - - /** - * Checks if $token is a Literal. - * - * @param string $token The token - * - * @return boolean TRUE if the token is a Literal false if not - */ - protected function literalCheck($token) - { - $pattern = "/^[\"\'].*$/"; - if (preg_match($pattern,$token) > 0) { - return true; - } - return false; - }//protected function literalCheck($token) - - - - /** - * FastForward until next token which is not blank. - * - * @return void - */ - protected function _fastForward() - { - next($this->tokens); - while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){ - next($this->tokens); - } - }//protected function _fastForward() - - - - /** - * Rewind until next token which is not blank. - * - * @return void - */ - protected function _rewind() - { - prev($this->tokens); - while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){ - prev($this->tokens); - } - return; - }//protected function _rewind() - - - - /** - * Parses a graph pattern. - * - * @param int $optional Optional graph pattern - * @param int $union Union graph pattern - * @param string $graph Graphname - * @param boolean $constr TRUE if the pattern is a construct pattern - * @param boolean $external If the parsed pattern shall be returned - * @param int $subpattern If the new pattern is subpattern of the - * pattern with the given id - * @return void - */ - protected function parseGraphPattern( - $optional = false, $union = false, $graph = false, - $constr = false, $external = false, $subpattern = false - ){ - $pattern = $this->query->getNewPattern($constr); - if (is_int($optional)) { - $pattern->setOptional($optional); - } else { - $this->tmp = $pattern->getId(); - } - if (is_int($union)) { - $pattern->setUnion($union); - } - if (is_int($subpattern)) { - $pattern->setSubpatternOf($subpattern); - } - if ($graph != false) { - $pattern->setGraphname($graph); - } - - $this->_fastForward(); - - do { - switch (strtolower(current($this->tokens))) { - case "graph": - $this->parseGraph(); - break; - case "union": - $this->_fastForward(); - $this->parseGraphPattern( - false, $this->tmp, false, false, false, $subpattern - ); - break; - case "optional": - $this->_fastForward(); - $this->parseGraphPattern( - $this->tmp, false, false, false, false, $subpattern - ); - break; - case "filter": - $this->parseConstraint( - $pattern, true, false, false, false, $subpattern - ); - $this->_fastForward(); - break; - case ".": - $this->_fastForward(); - break; - case "{": - if (!is_int($subpattern)) { - $subpattern = $pattern->getId(); - } - - $this->parseGraphPattern( - false, false, false, false, false, $subpattern - ); - break; - case "}": - $pattern->open = false; - break; - default: - $this->parseTriplePattern($pattern); - break; - } - } while ($pattern->open); - - if ($external) { - return $pattern; - } - $this->_fastForward(); - } - - /** - * Parses a triple pattern. - * - * @param GraphPattern $pattern - * @return void - */ - protected function parseTriplePattern(&$pattern) - { - $trp = array(); - $prev = false; - $prevPred = false; - $cont = true; - $sub = ""; - $pre = ""; - $tmp = ""; - $tmpPred = ""; - $obj = ""; - do { -//echo strtolower(current($this->tokens)) . "\n"; - switch (strtolower(current($this->tokens))) { - case false: - $cont = false; - $pattern->open = false; - break; - case "filter": - $this->parseConstraint($pattern,false); - $this->_fastForward(); - break; - case "optional": - $this->_fastForward(); - $this->parseGraphPattern($pattern->getId(),false); - $cont = false; - break; - case "union": - $this->_fastForward(); - $this->parseGraphPattern( - false, $this->tmp, false, false, false, $pattern->getId() - ); - break; - case ";": - $prev = true; - $this->_fastForward(); - break; - case ".": - $prev = false; - $this->_fastForward(); - break; - case "graph": - $this->parseGraph(); - break; - case ",": - $prev = true; - $prevPred = true; - $this->_fastForward(); - break; - case "}": - $prev = false; - $pattern->open = false; - $cont = false; - break; - case '{': - //subpatterns opens - $this->parseGraphPattern( - false, false, false, false, false, $pattern->getId() - ); - break; - case "[": - $prev = true; - $tmp = $this->parseNode($this->query->getBlanknodeLabel()); - $this->_fastForward(); - break; - case "]": - $prev = true; - $this->_fastForward(); - break; - case "(": - $prev = true; - $tmp = $this->parseCollection($trp); - $this->_fastForward(); - break; - case false: - $cont = false; - $pattern->open = false; - break; - default: - if ($prev) { - $sub = $tmp; - } else { - $sub = $this->parseNode(); - $this->_fastForward(); - $tmp = $sub; - } - if ($prevPred) { - $pre = $tmpPred; - } else { - $pre = $this->parseNode(); - $this->_fastForward(); - $tmpPred = $pre; - } - if (current($this->tokens)=="[") { - $tmp = $this->parseNode($this->query->getBlanknodeLabel()); - $prev = true; - $obj = $tmp; - } else if (current($this->tokens)=="(") { - $obj = $this->parseCollection($trp); - } else { - $obj = $this->parseNode(); - } - $trp[] = new QueryTriple($sub,$pre,$obj); - $this->_fastForward(); - break; - - } - } while ($cont); - - if (count($trp) > 0) { - $pattern->addTriplePatterns($trp); - } - } - - - - /** - * Parses a value constraint. - * - * @param GraphPattern $pattern - * @param boolean $outer If the constraint is an outer one. - * @return void - */ - protected function parseConstraint(&$pattern, $outer) - { - $constraint = new Constraint(); - $constraint->setOuterFilter($outer); - $this->_fastForward(); - $this->_rewind(); - $nBeginKey = key($this->tokens); - $constraint->setTree( - $t = $this->parseConstraintTree() - ); - - $nEndKey = key($this->tokens); - if (current($this->tokens) == '}') { - prev($this->tokens); - } - - //for backwards compatibility with the normal sparql engine - // which does not use the tree array currently - $expression = trim(implode( - '', - array_slice( - $this->tokens, - $nBeginKey + 1, - $nEndKey - $nBeginKey - 1 - ) - )); - if ($expression[0] == '(' && substr($expression, -1) == ')') { - $expression = trim(substr($expression, 1, -1)); - } - $constraint->addExpression($expression); - - $pattern->addConstraint($constraint); - }//protected function parseConstraint(&$pattern, $outer) - - - - /** - * Parses a constraint string recursively. - * - * The result array is one "element" which may contain subelements. - * All elements have one key "type" that determines which other - * array keys the element array has. Valid types are: - * - "value": - * Just a plain value with a value key, nothing else - * - "function" - * A function has a name and an array of parameter(s). Each parameter - * is an element. - * - "equation" - * An equation has an operator, and operand1 and operand2 which - * are elements themselves - * Any element may have the "negated" value set to true, which means - * that is is - negated (!). - * - * @internal The functionality of this method is being unit-tested - * in testSparqlParserTests::testParseFilter() - * "equation'-elements have another key "level" which is to be used - * internally only. - * - * @return array Nested tree array representing the filter - */ - protected function parseConstraintTree($nLevel = 0, $bParameter = false) - { - $tree = array(); - $part = array(); - $chQuotes = null; - $litQuotes = null; - $strQuoted = ''; - - while ($tok = next($this->tokens)) { -//var_dump(array($tok, $tok[strlen($tok) - 1])); - if ($chQuotes !== null && $tok != $chQuotes) { - $strQuoted .= $tok; - continue; - } else if ($litQuotes !== null) { - $strQuoted .= $tok; - if ($tok[strlen($tok) - 1] == '>') { - $tok = '>'; - } else { - continue; - } - } else if ($tok == ')' || $tok == '}' || $tok == '.') { - break; - } - - switch ($tok) { - case '"': - case '\'': - if ($chQuotes === null) { - $chQuotes = $tok; - $strQuoted = ''; - } else { - $chQuotes = null; - $part[] = array( - 'type' => 'value', - 'value' => $strQuoted, - 'quoted'=> true - ); - } - continue 2; - break; - - case '>': - $litQuotes = null; - $part[] = array( - 'type' => 'value', - 'value' => $strQuoted, - 'quoted'=> false - ); - continue 2; - break; - - case '(': - $bFunc1 = isset($part[0]['type']) && $part[0]['type'] == 'value'; - $bFunc2 = isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand2']) && isset($tree['operand2']['value']); - $part[] = $this->parseConstraintTree( - $nLevel + 1, - $bFunc1 || $bFunc2 - ); - - if ($bFunc1) { - $tree['type'] = 'function'; - $tree['name'] = $part[0]['value']; - self::fixNegationInFuncName($tree); - if (isset($part[1]['type'])) { - $part[1] = array($part[1]); - } - $tree['parameter'] = $part[1]; - $part = array(); - } else if ($bFunc2) { - $tree['operand2']['type'] = 'function'; - $tree['operand2']['name'] = $tree['operand2']['value']; - self::fixNegationInFuncName($tree['operand2']); - $tree['operand2']['parameter'] = $part[0]; - unset($tree['operand2']['value']); - unset($tree['operand2']['quoted']); - $part = array(); - } - continue 2; - break; - - case ' ': - case "\t": - continue 2; - - case '=': - case '>': - case '<': - case '<=': - case '>=': - case '!=': - case '&&': - case '||': - if (isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand2'])) { - //previous equation open - $part = array($tree); - } else if (isset($tree['type']) && $tree['type'] != 'equation') { - $part = array($tree); - $tree = array(); - } - $tree['type'] = 'equation'; - $tree['level'] = $nLevel; - $tree['operator'] = $tok; - $tree['operand1'] = $part[0]; - unset($tree['operand2']); - $part = array(); - continue 2; - break; - - case '!': - if ($tree != array()) { - throw new SparqlParserException( - 'Unexpected "!" negation in constraint.' - ); - } - $tree['negated'] = true; - continue 2; - - case ',': - //parameter separator - if (count($part) == 0 && !isset($tree['type'])) { - throw new SparqlParserException( - 'Unexpected comma' - ); - } - $bParameter = true; - if (count($part) == 0) { - $part[] = $tree; - $tree = array(); - } - continue 2; - - default: - break; - } - - if ($this->varCheck($tok)) { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } else if (substr($tok, 0, 2) == '^^') { - $part[count($part) - 1]['datatype'] - = $this->query->getFullUri(substr($tok, 2)); - } else if ($tok[0] == '@') { - $part[count($part) - 1]['language'] = substr($tok, 1); - } else if ($tok[0] == '<') { - if ($tok[strlen($tok) - 1] == '>') { - //single-tokenized <> uris - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } else { - //iris split over several tokens - $strQuoted = $tok; - $litQuotes = true; - } - } else if ($tok == 'true' || $tok == 'false') { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false, - 'datatype' => 'http://www.w3.org/2001/XMLSchema#boolean' - ); - } else { - $part[] = array( - 'type' => 'value', - 'value' => $tok, - 'quoted' => false - ); - } - - if (isset($tree['type']) && $tree['type'] == 'equation' && isset($part[0])) { - $tree['operand2'] = $part[0]; - self::balanceTree($tree); - $part = array(); - } - } - - if (!isset($tree['type']) && $bParameter) { - return $part; - } else if (isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand1']) && !isset($tree['operand2']) - && isset($part[0])) { - $tree['operand2'] = $part[0]; - self::balanceTree($tree); - } - - if (!isset($tree['type']) && isset($part[0])) { - if (isset($tree['negated'])) { - $part[0]['negated'] = true; - } - return $part[0]; - } - - return $tree; - }//protected function parseConstraintTree($nLevel = 0, $bParameter = false) - - - - /** - * "Balances" the filter tree in the way that operators on the same - * level are nested according to their precedence defined in - * $operatorPrecedence array. - * - * @param array $tree Tree to be modified - */ - protected static function balanceTree(&$tree) - { - if ( - isset($tree['type']) && $tree['type'] == 'equation' - && isset($tree['operand1']['type']) && $tree['operand1']['type'] == 'equation' - && $tree['level'] == $tree['operand1']['level'] - && self::$operatorPrecedence[$tree['operator']] > self::$operatorPrecedence[$tree['operand1']['operator']] - ) { - $op2 = array( - 'type' => 'equation', - 'level' => $tree['level'], - 'operator' => $tree['operator'], - 'operand1' => $tree['operand1']['operand2'], - 'operand2' => $tree['operand2'] - ); - $tree['operator'] = $tree['operand1']['operator']; - $tree['operand1'] = $tree['operand1']['operand1']; - $tree['operand2'] = $op2; - } - }//protected static function balanceTree(&$tree) - - - - protected static function fixNegationInFuncName(&$tree) - { - if ($tree['type'] == 'function' && $tree['name'][0] == '!') { - $tree['name'] = substr($tree['name'], 1); - if (!isset($tree['negated'])) { - $tree['negated'] = true; - } else { - unset($tree['negated']); - } - //perhaps more !! - self::fixNegationInFuncName($tree); - } - }//protected static function fixNegationInFuncName(&$tree) - - - - /** - * Parses a bracketted expression. - * - * @param Constraint $constraint - * @return void - * @throws SparqlParserException - */ - protected function parseBrackettedExpression(&$constraint) - { - $open = 1; - $exp = ""; - $this->_fastForward(); - while ($open != 0 && current($this->tokens)!= false) { - switch (current($this->tokens)) { - case "(": - $open++; - $exp = $exp . current($this->tokens); - break; - case ")": - $open--; - if($open != 0){ - $exp = $exp . current($this->tokens); - } - break; - case false: - throw new SparqlParserException( - "Unexpected end of query.", - null, - key($this->tokens) - ); - default: - $exp = $exp . current($this->tokens); - break; - } - next($this->tokens); - } - $constraint->addExpression($exp); - } - - - /** - * Parses an expression. - * - * @param Constraint $constrain - * @return void - * @throws SparqlParserException - */ - protected function parseExpression(&$constraint) - { - $exp = ""; - while (current($this->tokens) != false && current($this->tokens) != "}") { - switch (current($this->tokens)) { - case false: - throw new SparqlParserException( - "Unexpected end of query.", - null, - key($this->tokens) - ); - case ".": - break; - break; - default: - $exp = $exp . current($this->tokens); - break; - } - next($this->tokens); - } - $constraint->addExpression($exp); - } - - /** - * Parses a GRAPH clause. - * - * @param GraphPattern $pattern - * @return void - * @throws SparqlParserException - */ - protected function parseGraph(){ - $this->_fastForward(); - $name = current($this->tokens); - if(!$this->varCheck($name)&!$this->iriCheck($name)&&!$this->qnameCheck($name)){ - $msg = $name; - $msg = preg_replace('/tokens)); - } - $this->_fastForward(); - - if($this->iriCheck($name)){ - $name = new Resource(substr($name,1,-1)); - }else if($this->qnameCheck($name)){ - $name = new Resource($this->query->getFullUri($name)); - } - $this->parseGraphPattern(false,false,$name); - if(current($this->tokens)=='.') - $this->_fastForward(); - } - - /** - * Parses the solution modifiers of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseModifier(){ - do{ - switch(strtolower(current($this->tokens))){ - case "order": - $this->_fastForward(); - if(strtolower(current($this->tokens))=='by'){ - $this->_fastForward(); - $this->parseOrderCondition(); - }else{ - throw new SparqlParserException("'BY' expected.",null,key($this->tokens)); - } - break; - case "limit": - $this->_fastForward(); - $val = current($this->tokens); - $this->query->setSolutionModifier('limit',$val); - break; - case "offset": - $this->_fastForward(); - $val = current($this->tokens); - $this->query->setSolutionModifier('offset',$val); - break; - default: - break; - } - }while(next($this->tokens)); - } - - /** - * Parses order conditions of a query. - * - * @return void - * @throws SparqlParserException - */ - protected function parseOrderCondition(){ - $valList = array(); - $val = array(); - while(strtolower(current($this->tokens))!='limit' - & strtolower(current($this->tokens))!= false - & strtolower(current($this->tokens))!= 'offset'){ - switch (strtolower(current($this->tokens))){ - case "desc": - $this->_fastForward(); - $this->_fastForward(); - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - if(current($this->tokens)!=')') - throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens)); - $val['type'] = 'desc'; - $this->_fastForward(); - break; - case "asc" : - $this->_fastForward(); - $this->_fastForward(); - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - if(current($this->tokens)!=')') - throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens)); - $val['type'] = 'asc'; - $this->_fastForward(); - break; - default: - if($this->varCheck(current($this->tokens))){ - $val['val'] = current($this->tokens); - $val['type'] = 'asc'; - }else{ - throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens)); - } - $this->_fastForward(); - break; - } - $valList[] = $val; - } - prev($this->tokens); - $this->query->setSolutionModifier('order by',$valList); - } - - /** - * Parses a String to an RDF node. - * - * @param String $node - * - * @return Node The parsed RDF node - * @throws SparqlParserException - */ - protected function parseNode($node = false) - { - //$eon = false; - if ($node) { - $node = $node; - } else { - $node = current($this->tokens); - } - if ($node{strlen($node)-1} == '.') { - $node = substr($node,0,-1); - } - if ($this->dtypeCheck($node)) { - return $node; - } - if ($this->bNodeCheck($node)) { - $node = '?'.$node; - $this->query->addUsedVar($node); - return $node; - } - if ($node == '[') { - $node = '?' . substr($this->query->getBlanknodeLabel(), 1); - $this->query->addUsedVar($node); - $this->_fastForward(); - if(current($this->tokens)!=']') { - prev($this->tokens); - } - return $node; - } - if ($this->iriCheck($node)){ - $base = $this->query->getBase(); - if ($base!=null) { - $node = new Resource(substr(substr($base,0,-1).substr($node,1),1,-1)); - } else { - $node = new Resource(substr($node,1,-1)); - } - return $node; - } else if ($this->qnameCheck($node)) { - $node = $this->query->getFullUri($node); - $node = new Resource($node); - return $node; - } else if ($this->literalCheck($node)) { - $ch = substr($node, 0, 1); - $chLong = str_repeat($ch, 3); - if (substr($node, 0, 3) == $chLong) { - $ch = $chLong; - } - $this->parseLiteral($node, $ch); - } else if ($this->varCheck($node)) { - $pos = strpos($node,'.'); - if ($pos) { - return substr($node,0,$pos); - } else { - return $node; - } - } else if ($node[0] == '<') { - //partial IRI? loop tokens until we find a closing > - while (next($this->tokens)) { - $node .= current($this->tokens); - if (substr($node, -1) == '>') { - break; - } - } - if (substr($node, -1) != '>') { - throw new SparqlParserException( - "Unclosed IRI: " . $node, - null, - key($this->tokens) - ); - } - return $this->parseNode($node); - } else { - throw new SparqlParserException( - '"' . $node . '" is neither a valid rdf- node nor a variable.', - null, - key($this->tokens) - ); - } - return $node; - }//protected function parseNode($node = false) - - - - /** - * Checks if there is a datatype given and appends it to the node. - * - * @param string $node Node to check - * - * @return void - */ - protected function checkDtypeLang(&$node, $nSubstrLength = 1) - { - $this->_fastForward(); - switch (substr(current($this->tokens), 0, 1)) { - case '^': - if (substr(current($this->tokens),0,2)=='^^') { - $node = new Literal(substr($node,1,-1)); - $node->setDatatype( - $this->query->getFullUri( - substr(current($this->tokens), 2) - ) - ); - } - break; - case '@': - $node = new Literal( - substr($node, $nSubstrLength, -$nSubstrLength), - substr(current($this->tokens), $nSubstrLength) - ); - break; - default: - prev($this->tokens); - $node = new Literal(substr($node, $nSubstrLength, -$nSubstrLength)); - break; - - } - }//protected function checkDtypeLang(&$node, $nSubstrLength = 1) - - - - /** - * Parses a literal. - * - * @param String $node - * @param String $sep used separator " or ' - * - * @return void - */ - protected function parseLiteral(&$node, $sep) - { - do { - next($this->tokens); - $node = $node.current($this->tokens); - } while (current($this->tokens) != $sep); - $this->checkDtypeLang($node, strlen($sep)); - }//protected function parseLiteral(&$node, $sep) - - - - /** - * Checks if the Node is a typed Literal. - * - * @param String $node - * - * @return boolean TRUE if typed FALSE if not - */ - protected function dtypeCheck(&$node) - { - $patternInt = "/^-?[0-9]+$/"; - $match = preg_match($patternInt,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'integer'); - return true; - } - $patternBool = "/^(true|false)$/"; - $match = preg_match($patternBool,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'boolean'); - return true; - } - $patternType = "/^a$/"; - $match = preg_match($patternType,$node,$hits); - if($match>0){ - $node = new Resource(RDF_NAMESPACE_URI.'type'); - return true; - } - $patternDouble = "/^-?[0-9]+.[0-9]+[e|E]?-?[0-9]*/"; - $match = preg_match($patternDouble,$node,$hits); - if($match>0){ - $node = new Literal($hits[0]); - $node->setDatatype(XML_SCHEMA.'double'); - return true; - } - return false; - }//protected function dtypeCheck(&$node) - - - - /** - * Parses an RDF collection. - * - * @param TriplePattern $trp - * - * @return Node The first parsed label - */ - protected function parseCollection(&$trp) - { - $tmpLabel = $this->query->getBlanknodeLabel(); - $firstLabel = $this->parseNode($tmpLabel); - $this->_fastForward(); - $i = 0; - while (current($this->tokens)!=")") { - if($i>0) - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),$this->parseNode($tmpLabel = $this->query->getBlanknodeLabel())); - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),$this->parseNode()); - $this->_fastForward(); - $i++; - } - $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")); - return $firstLabel; - }//protected function parseCollection(&$trp) - -}// end class: SparqlParser.php - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParserException.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParserException.php deleted file mode 100755 index 9151ce84..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlParserException.php +++ /dev/null @@ -1,33 +0,0 @@ - -* @version $Id$ -* @license http://www.gnu.org/licenses/lgpl.html LGPL -* -* @package sparql -*/ -Class SparqlParserException extends Exception{ - - private $tokenPointer; - - public function __construct($message, $code = 0, $pointer){ - - $this->tokenPointer = $pointer; - parent::__construct($message, $code); - } - - /** - * Returns a pointer to the token which caused the exception. - * @return int - */ - public function getPointer(){ - return $this->tokenPointer; - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlVariable.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlVariable.php deleted file mode 100755 index 5db6e665..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/sparql/SparqlVariable.php +++ /dev/null @@ -1,40 +0,0 @@ -name = $name; - } - - - - public function __toString() - { - return $this->name; - } - - - - /** - * Checks if the given subject/predicate/object - * is a variable name. - * - * @return boolean - */ - public static function isVariable($bject) - { - return is_string($bject) && strlen($bject) >= 2 - && ($bject[0] == '?' || $bject[0] == '$'); - }//public static function isVariable($bject) - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/all-wcprops deleted file mode 100755 index 214ebffe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/all-wcprops +++ /dev/null @@ -1,113 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svnroot/rdfapi-php/!svn/ver/556/trunk/rdfapi-php/api/syntax -END -N3Parser.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/517/trunk/rdfapi-php/api/syntax/N3Parser.php -END -TriXParser.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/syntax/TriXParser.php -END -JsonSerializer.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/api/syntax/JsonSerializer.php -END -SyntaxGRDDL.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/SyntaxGRDDL.php -END -RdfSerializer.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/316/trunk/rdfapi-php/api/syntax/RdfSerializer.php -END -NTripleSerializer.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/syntax/NTripleSerializer.php -END -GRDDLParser.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/GRDDLParser.php -END -N3Serializer.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/556/trunk/rdfapi-php/api/syntax/N3Serializer.php -END -SparqlResultParser.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/api/syntax/SparqlResultParser.php -END -SyntaxRSS.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/SyntaxRSS.php -END -TriXSerializer.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/syntax/TriXSerializer.php -END -SyntaxJSON.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/552/trunk/rdfapi-php/api/syntax/SyntaxJSON.php -END -SyntaxRDF.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/SyntaxRDF.php -END -SyntaxSparqlRes.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/SyntaxSparqlRes.php -END -RssParser.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/301/trunk/rdfapi-php/api/syntax/RssParser.php -END -JsonParser.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/api/syntax/JsonParser.php -END -SyntaxN3.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/syntax/SyntaxN3.php -END -RdfParser.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/493/trunk/rdfapi-php/api/syntax/RdfParser.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/entries deleted file mode 100755 index 008b678a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/entries +++ /dev/null @@ -1,262 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/syntax -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-01-22T10:52:48.041272Z -556 -fusel2k - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -N3Parser.php -file - - - - -2008-02-29T14:57:47.865530Z -112f9ffb3eecb8f3889f1b7924f638b9 -2007-08-13T16:14:17.763656Z -517 -cweiske -has-props - -TriXParser.php -file - - - - -2008-02-29T14:57:47.896771Z -1eb40f115840fcd2c5067931dd90d9b3 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -JsonSerializer.php -file - - - - -2008-02-29T14:57:47.881151Z -7e382932ad24a6eb9fbfbd43a3bdf586 -2007-12-11T20:27:34.710933Z -555 -p_frischmuth -has-props - -SyntaxGRDDL.php -file - - - - -2008-02-29T14:57:47.881151Z -035b206f45692cb49acaf5211b43f4ff -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -RdfSerializer.php -file - - - - -2008-02-29T14:57:47.896771Z -8182d432e5d53187b4ed144b4e92a5b8 -2006-08-24T07:55:29.000000Z -316 -tgauss -has-props - -NTripleSerializer.php -file - - - - -2008-02-29T14:57:47.912392Z -d80d6ba00ff0cd324384a34a40c831ab -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -GRDDLParser.php -file - - - - -2008-02-29T14:57:47.912392Z -b3c7c8b3e0fa482c12f511683772c4ea -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -N3Serializer.php -file - - - - -2008-02-29T14:57:47.928013Z -30157ef08631eef25957a56e3542d284 -2008-01-22T10:52:48.041272Z -556 -fusel2k -has-props - -SparqlResultParser.php -file - - - - -2008-02-29T14:57:47.943633Z -5c7a1a5a7e925334256ce0b12354c20f -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -SyntaxRSS.php -file - - - - -2008-02-29T14:57:47.928013Z -8b422e251e0ba0658d541ecbc9541aea -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -TriXSerializer.php -file - - - - -2008-02-29T14:57:47.943633Z -adb9be4b413f8b2a9055bcfb4d2eff53 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -SyntaxJSON.php -file - - - - -2008-02-29T14:57:47.943633Z -754f114a67a5ba7da4deea1ab439c990 -2007-11-23T09:12:11.140388Z -552 -p_frischmuth -has-props - -SyntaxRDF.php -file - - - - -2008-02-29T14:57:47.959254Z -e7c898c17d52c5dc6308a71ea547ce6f -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -SyntaxSparqlRes.php -file - - - - -2008-02-29T14:57:47.959254Z -b2493bd4cee875db558b5d708181b2a7 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -RssParser.php -file - - - - -2008-02-29T14:57:47.974874Z -325cb7dcfb103295a7f5974384e312ab -2006-06-26T10:22:25.000000Z -301 -tgauss -has-props - -JsonParser.php -file - - - - -2008-02-29T14:57:47.974874Z -54244ff3c37bf47b4e9b914d2b50d1e0 -2007-12-11T20:27:34.710933Z -555 -p_frischmuth -has-props - -SyntaxN3.php -file - - - - -2008-02-29T14:57:47.990495Z -f31fb3eceb8ca23be83648f5e7b1909d -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -RdfParser.php -file - - - - -2008-02-29T14:57:47.990495Z -89eba3f0656c075f28c178b4a678dc05 -2007-08-12T17:43:07.694190Z -493 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/GRDDLParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/GRDDLParser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/GRDDLParser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonParser.php.svn-base deleted file mode 100755 index 92c8ad74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonParser.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonSerializer.php.svn-base deleted file mode 100755 index 92c8ad74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/JsonSerializer.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Parser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Parser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Parser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Serializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Serializer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/N3Serializer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/NTripleSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/NTripleSerializer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/NTripleSerializer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfParser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfParser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfSerializer.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RdfSerializer.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RssParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RssParser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/RssParser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SparqlResultParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SparqlResultParser.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SparqlResultParser.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxGRDDL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxGRDDL.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxGRDDL.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxJSON.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxJSON.php.svn-base deleted file mode 100755 index 92c8ad74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxJSON.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxN3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxN3.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxN3.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRDF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRDF.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRDF.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRSS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRSS.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxRSS.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxSparqlRes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxSparqlRes.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/SyntaxSparqlRes.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXParser.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXParser.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXSerializer.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/prop-base/TriXSerializer.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/GRDDLParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/GRDDLParser.php.svn-base deleted file mode 100755 index 988927d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/GRDDLParser.php.svn-base +++ /dev/null @@ -1,120 +0,0 @@ -, - * - * @package syntax - * @access public - * - */ -class GRDDLParser extends Object{ - - - /** - * Document link - * - * - * @var String - * @access private - */ - var $doclink; - - - /** - * Stylesheet link - * - * - * @var String[] - * @access private - */ - var $stylelinks; - - - /** - * DomDocument - * - * @var DomDocument - * @access private - */ - var $domdoc; - - - /** - * generates a MemModel and creates the DomDocument. - * - * @param String $doc - * @access public - * @return MemModel $model - */ - function generateModel($doc){ - $model = new MemModel(); - $this->doclink=$doc; - $this->domdoc = new DomDocument; - $this->domdoc->load($doc); - $this->_getStyles(); - $model = $this->_generateRDF(); - return $model; - } - - - /** - * gets the used xsl stylesheets. - * - * @access private - */ - function _getStyles(){ - $link=$this->domdoc->getElementsByTagName('link'); - $i=0; - while($link->item($i)!=''){ - $item = $link->item($i); - if($item->getAttributeNode('rel')->value=='transformation'){ - $temp = $item->getAttributeNode('href')->value; - if(substr($temp,0,1)=='/'){ - $pos = strrpos($this->doclink,'/'); - $part = substr($this->doclink,0,$pos); - $this->stylelink[]=$part.$temp; - }else{ - $this->stylelink[]=$temp; - } - } - $i++; - } - } - - /* - * uses the PHP build in xslt processor to - * generate the RDF statements and uses the - * RDF- Parser to generate the model - * - * @access private - * @return MemModel $model - */ - function _generateRDF(){ - $model=new MemModel(); - $model->setBaseURI($this->doclink); - $proc = new xsltprocessor; - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $pars=new RdfParser(); - foreach($this->stylelink as $key => $value){ - $xsl = new DomDocument; - $xsl->load($value); - $proc->importStyleSheet($xsl); - $model->addModel($pars->generateModel($proc->transformToXML($this->domdoc),$this->doclink)); - } - return $model; - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonParser.php.svn-base deleted file mode 100755 index 61dc2781..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonParser.php.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - * @version $Id$ - */ -class JsonParser extends Object { - - /** - * This method takes a json encoded rdf-model and a reference to aa (usually empty) MemModel, parses the json - * string and adds the statements to the given MemModel. - * - * @param string $jsonString The string that contains the rdf model, encoded as a json-string. - * @param MemModel $model A reference to the model, where to add the statements, usually an empty MemModel. - */ - public function generateModelFromString($jsonString, $model) { - - $jsonModel = array(); - $jsonModel = json_decode($jsonString, true); - - // throws an excpetion if json model was corrupt - if (!is_array($jsonModel)) { - throw new Exception('error in json string'); - } - - foreach ($jsonModel as $subject=>$remain) { - foreach ($remain as $predicate=>$object) { - $s = (strpos($subject, '_') === 0) ? new BlankNode(substr($subject, 2)) : new Resource($subject); - $p = new Resource($predicate); - - foreach ($object as $obj) { - if ($obj['type'] === 'uri') { - $o = new Resource($obj['value']); - } else if ($obj['type'] === 'bnode') { - $o = new BlankNode(substr($obj['value'], 2)); - } else { - $dtype = (isset($obj['datatype'])) ? $obj['datatype'] : ''; - $lang = (isset($obj['lang'])) ? $obj['lang'] : ''; - - $oVal = $obj['value']; - - $o = new Literal($oVal, $lang); - $o->setDatatype($dtype); - } - - $model->add(new Statement($s, $p, $o)); - } - } - } - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonSerializer.php.svn-base deleted file mode 100755 index 8e1c867e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/JsonSerializer.php.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - * @version $Id$ - */ -class JsonSerializer extends Object { - - /** - * This method takes a MemModel object ad parameter and serializes all contained triples to rdf/json format. - * - * @see http://n2.talis.com/wiki/RDF_JSON_Specification#rdf.2Fjson - * @param MemModel $model - * @return string Returns a string containing the serialized model. - */ - public function serialize(MemModel $model) { - - // create the root json object (root object) - $jsonString = '{'; - $subjects = array(); - - // sort triples by subject - foreach ($model->triples as $triple) { - $subjects[$triple->toStringSubject()][] = $triple; - } - - // sort alphabetically - ksort($subjects); - - // triples are sorted by subject now, each key is a subject uri, containing all triples with this subject uri - $i = 0; - foreach ($subjects as $predicatesArray) { - $predicates = array(); - - if ($i > 0) { - $jsonString .= ','; - } - $i++; - - $subj = $predicatesArray[0]->getSubject(); - - // add special _: sequence for blank node only - if ($subj instanceof BlankNode) { - $jsonString .= '"_:' . $this->_escapeValue($subj->getLabel()) . '":'; - } else { - $jsonString .= '"' . $this->_escapeValue($subj->getLabel()) . '":'; - } - - - - // create a json object for each subject (subject object) - $jsonString .= '{'; - - // sort triples with current subject by predicate - foreach ($predicatesArray as $triple) { - $predicates[$triple->toStringPredicate()][] = $triple; - } - - // sort alphabetically - ksort($predicates); - - $j = 0; - foreach ($predicates as $valueArray) { - - if ($j > 0) { - $jsonString .= ','; - } - $j++; - - $jsonString .= '"' . $this->_escapeValue($valueArray[0]->getLabelPredicate()) . '":'; - - // create a json array (value array) - $jsonString .= '['; - - $k = 0; - foreach ($valueArray as $triple) { - if ($k > 0) { - $jsonString .= ','; - } - $k++; - - // create json value object (value object) - $jsonString .= '{'; - - $obj = $triple->getObject(); - - // add special _: sequence for blank nodes only - if ($obj instanceof BlankNode) { - $jsonString .= '"value":"_:' . $this->_escapeValue($obj->getLabel()) . '",'; - } else if ($obj instanceof Literal) { - $jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",'; - } else { - $jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",'; - } - - // add type of object - if ($obj instanceof Literal) { - $jsonString .= '"type":"literal"'; - } else if ($obj instanceof BlankNode) { - $jsonString .= '"type":"bnode"'; - } else { - $jsonString .= '"type":"uri"'; - } - - if ($obj instanceof Literal) { - if ($obj->getLanguage() != '') { - $jsonString .= ',"lang":"' . $this->_escapeValue($obj->getLanguage()) . '"'; - } - if ($obj->getDatatype() != '') { - $jsonString .= ',"datatype":"' . $this->_escapeValue($obj->getDatatype()) . '"'; - } - - } - - // close value object - $jsonString .= '}'; - } - - // close the value array - $jsonString .= ']'; - } - - // close the json object (for the subject) (subject object) - $jsonString .= '}'; - } - - // close root json object (root object) - $jsonString .= '}'; - - return $jsonString; - } - - /* - * Escapes the following chars as specified at json.org: - * - * " -> \" - * \ -> \\ - * / -> \/ - * \b -> \\b - * \f -> \\f - * \n -> \\n - * \r -> \\r - * \t -> \\t - * \uXXXX -> \\uXXXX - */ - protected function _escapeValue($value) { - - - $value = str_replace("\\", '\\\\', $value); - #$value = str_replace("/", '\/', $value); - $value = str_replace("\n", '\\n', $value); - $value = str_replace("\t", '\\t', $value); - $value = str_replace("\r", '\\r', $value); - $value = str_replace("\b", '\\b', $value); - $value = str_replace("\f", '\\f', $value); - $value = str_replace('"', '\"', $value); - - return $value; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Parser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Parser.php.svn-base deleted file mode 100755 index bbbfe2a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Parser.php.svn-base +++ /dev/null @@ -1,1137 +0,0 @@ - - *
  • Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')
  • - *
  • @prefix mappings
  • - *
  • = maps to owl#sameAs
  • - *
  • a maps to rdf-syntax-ns#type
  • - *
  • Literal datytype- and xmlLanguageTag support - * - * Un-supported N3 Features include: - *
      - *
    • Reification using { }
    • - *
    • . and ^ operators for tree traversal
    • - *
    • Any log operators, like log:forAll etc.
    • - *
    - * - * This parser is based on n3.py from Epp released 2nd March, 2002. - * by Sean B. Palmer - * ( http://infomesh.net/2002/eep/20020302-013802/n3.py ) - * - * This parser is released under the GNU GPL license. - * ( http://www.gnu.org/licenses/gpl.txt ) - * - * - * - * @author Sean B. Palmer - * @author Gunnar AA. Grimnes - * @author Daniel Westphal - * @version $Id$ - * @license GPL http://www.gnu.org/licenses/gpl.txt - * @package syntax - * @access public - **/ - -class N3Parser extends Object { - - - /* ==================== Variables ==================== */ - - var $Tokens; - var $bNode; - var $RDF_NS, $DAML_NS, $OWL_NS; - var $debug; - var $parseError; - var $parsedNamespaces = array(); - - /* ==================== Public Methods ==================== */ - - /** - * Constructor - * @access public - **/ - function N3Parser() { - //Regular expressions: - $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*'; - $URI = '<[^> ]*>'; - $bNode = '_:'.$Name; - $Univar = '\?'.$Name; - $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; - $Literal = '(?:' - . '"(\\\"|[^"])*"' - . '|' - . "'(\\\'|[^'])*'" - . ')'; - # '"(?:\\"|[^"])*"' - $Number = '[-+]?[0-9]+(\\.[0-9]+)?([eE][-+]?[0-9]+)?'; - $Boolean = '@(?:true|false)'; -// $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' - $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; - $Datatype = '(\^\^)[^ ,\.;)]+'; - $Datatype_URI = '(\^\^)'.$URI; - // $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""'; - $LLiteral = '(?:' - . '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""' - . '|' - . "'''[^'\\\\]*(?:(?:\\\\.|'(?!''))[^\"\\\\]*)*'''" - . ')'; - // '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' - $Comment = '#.*$'; - $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; - $PrefixDecl = '@prefix'; - $WS = '[ \t]'; - $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword - $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'; # for '=' keyword - $this->OWL_NS = 'http://www.w3.org/2002/07/owl#'; - - // $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, - // $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment); - $t = array( - $Datatype_URI, $Datatype, $LLiteral, $URI, $Literal, - $PrefixDecl, $QName, $Number, $Boolean, $bNode, - $Prefix, $Univar, 'a','=', - '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', - $WS, $Comment,$LangTag - ); - $this->Tokens = "/(".join($t,"|").")/m"; - - $this->bNode = 0; - $this->debug = 0; - $this->bNodeMap = array(); - $this->FixBnodes = FIX_BLANKNODES; - $this->parseError =false; - } - - - /** - * Sets, if BlankNode labels should be replaced by the generic label from the constants.php file - * default is "false" -> the used label in n3 is parsed to the model - * @param boolean - * @access public - **/ - function setFixBnodes($set) { - - if (($set===true) OR ($set===false)) $this->FixBnodes = $set; - } - - - /** - * This parses a N3 string and prints out the triples - * @param string $s - * @access public - **/ - function parse($s) { - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - foreach ( $stat as $t) { - - if (count($t)>3) { - $object=$t[2]; - - for ($i = 3; $i < 5; $i++){ - if ($t[$i][0]=='@')$object.=$t[$i]; - if (substr($t[$i],0,2)=='^^')$object.=$t[$i]; - }; - } else {$object=$t[2];}; - - print '('.$t[0].', '.$t[1].', '.$object.")\n"; - - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - } - - - /** - * This parses a N3 string and calls func($subject, $predicate, $object) with each triple - * @param string $s - * @param string $func - * @access public - **/ - function uparse($s,$func) { - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - foreach ( $stat as $t) { - - if (count($t)>3) { - $object=$t[2]; - - for ($i = 3; $i < 5; $i++){ - if ($t[$i][0]=='@')$object.=$t[$i]; - if (substr($t[$i],0,2)=='^^')$object.=$t[$i]; - }; - } else {$object=$t[2];}; - // print "(".$t[0].", ".$t[1].", ".$t[2].")"; - - $func($t[0],$t[1],$object); - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - } - - - /** - * This parses a N3 string and returns a memmodel - * @param string $s - * @access public - * @return object Model - **/ - - function parse2model($s,$model = false) { - if($model == false){ - $m=new MemModel(); - }else{ - $m=$model; - } - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - - foreach ( $stat as $t) { - $s=$this->toRDFNode($t[0],$t); - $p=$this->toRDFNode($t[1],$t); - $o=$this->toRDFNode($t[2],$t); - - $new_statement= new Statement($s,$p,$o); - - $m->add($new_statement); - // print "(".$t[0].", ".$t[1].", ".$t[2].")"; - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - $m->addParsedNamespaces($this->parsedNamespaces); - return $m; - } - -/** - * Generate a new MemModel from an URI or file. - * - * @access public - * @param $path - * @throws PhpError - * @return object MemModel - */ - function & generateModel($path,$dummy=false,$model=false) { - - $handle = fopen($path,'r') or die("N3 Parser: Could not open File: '$path' - Stopped parsing."); - $done=false; - $input=""; - while(!$done) - { - $input .= fread( $handle, 512 ); - $done = feof($handle); - - }; - - - fclose($handle); - - $m = $this->parse2model($input,$model); - return $m; - } - - - /* ==================== Private Methods from here ==================== */ - - // General list processing functions - -/** - * Returns FALSE if argument is a whitespace character - * @access private - * @param string $s - **/ - function isWS($s) { - return !preg_match('/^(#.*|\s*)$/', $s); - } - - - - /** - * Returns true if the string is not a comment - * @access private - * @param string $s - * @returns boolean - **/ - function notComment($s) { - if ($s=="") return false; - $N3Comment = '^[ \t]*\#'; - - if (ereg($N3Comment,$s)) return false; - else return true; - } - - /** - * Removes all whitespace tokens from list - * @access private - * @param array $list - **/ - function filterWs($list) { - // var_dump($list); - // """Filter whitespace from a list.""" - - return array_filter($list, array($this,"isWS")); - } - -/** -* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH). -* -* @param String $str -* @return String -* @access private -* -*/ -function str2unicode_nfc($str=""){ - $result=""; - /* try to detect encoding */ - $tmp=str_replace("?", "", $str); - if(strpos(utf8_decode($tmp), "?")===false){ - $str=utf8_decode($str); - } - for($i=0,$i_max=strlen($str);$i<$i_max;$i++){ - $nr=0;/* unicode dec nr */ - /* char */ - $char=$str[$i]; - /* utf8 binary */ - $utf8_char=utf8_encode($char); - $bytes=strlen($utf8_char); - if($bytes==1){ - /* 0####### (0-127) */ - $nr=ord($utf8_char); - } - elseif($bytes==2){ - /* 110##### 10###### = 192+x 128+x */ - $nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128); - } - elseif($bytes==3){ - /* 1110#### 10###### 10###### = 224+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128); - } - elseif($bytes==4){ - /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128); - } - /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */ - if($nr<9){/* #x0-#x8 (0-8) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==9){/* #x9 (9) */ - $result.='\t'; - } - elseif($nr==10){/* #xA (10) */ - $result.='\n'; - } - elseif($nr<13){/* #xB-#xC (11-12) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==13){/* #xD (13) */ - $result.='\t'; - } - elseif($nr<32){/* #xE-#x1F (14-31) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<34){/* #x20-#x21 (32-33) */ - $result.=$char; - } - elseif($nr==34){/* #x22 (34) */ - $result.='\"'; - } - elseif($nr<92){/* #x23-#x5B (35-91) */ - $result.=$char; - } - elseif($nr==92){/* #x5C (92) */ - $result.='\\'; - } - elseif($nr<127){/* #x5D-#x7E (93-126) */ - $result.=$char; - } - elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */ - $result.="\\U".sprintf("%08X",$nr); - } - else{ - /* other chars are not defined => ignore */ - } - } - return $result; -} - - - - /** - * Gets a slice of an array. - * Returns the wanted slice, as well as the remainder of the array. - * e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r']) - * @return array - * @access private - * @param array $list - * @param integer $start - * @param integer $end - **/ - function getSpan($list, $start, $end) { - - $pre=array_slice($list, 0, $start); - $post=array_slice($list, $end); - - return array(array_slice($list, $start,$end-$start),$this->array_concat($pre,$post)); - } - - - /** - * Concatenates two arrays - * @param array $a - * @param array $b - * @returns array - * @access private - **/ - function array_concat($a, $b) { - array_splice($a,count($a),0,$b); - return $a; - } - - /** - * Returns an array with all indexes where item appears in list - * @param array $list - * @param string $item - * @returns array - * @access private - **/ - function posns($list, $item) { - $res=array(); - $i=0; - foreach ( $list as $k=>$v) { - if ($v === $item ) $res[]=$i; - $i++; - } - $res[]=$i; - return $res; - } - - - /* More N3 specific functions */ - - /** - * Returns a list of tokens - * @param string $s - * @returns array - * @access private - **/ - function toke($s) { - - // print "$s\n"; - // """Notation3 tokenizer. Takes in a string, returns a raw token list.""" - if (strlen($s) == 0) die('Document has no content!'); - - $s=str_replace("\r\n","\n",$s); - $s=str_replace("\r","\n",$s); - - - //$lines=explode("\n",$s); - - //$reallines=array_filter($lines, array($this, "notComment")); - // print "LINES: ".join($reallines, " ")." :LINES\n"; - //array_walk($reallines, array($this, "trimLine")); - //$res=array(); - - // foreach ($reallines as $l) { - //preg_match_all($this->Tokens, $l, $newres); - //$res=$this->array_concat($res,$newres[0]); - //} - - $res=array(); - preg_match_all($this->Tokens, $s, $newres); - $res=$this->array_concat($res, array_map('trim', $newres[0])); -//var_dump($newres[0]); - return $res; - } - - /** - * Returns a list with the elements between start and end as one quoted string - * e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"] - * @param array $list - * @param integer $start - * @param integer $end - * @returns array - * @access private - **/ - function listify($list, $start, $end) { - - //Re-form a list, merge elements start->end into one quoted element - //Start and end are offsets... - - $l=$end-$start; - - $s=array_slice($list, 0, $start); - $m=array_slice($list, $start,$l); - $e=array_slice($list, $end); - - // array_push($s,"\"".join($m," ")."\""); - array_push($s,$m); - - return $this->array_concat($s,$e); - } - - /** - * Returns an array with prefixes=>namespace mappings - * @param array $list - * @access private - * @returns array - **/ - function getPrefixes($list) { - - $prefixes=array(); - $ns=1; - $name=2; - foreach ($list as $l) { - if ($l=='@prefix') { - // while '@prefix' in list { - - $pos=current($list); - //pos = list.index('@prefix') - $r = $this->getSpan($list, $pos, ($pos+4)); # processes the prefix tokens - $binding=$r[0]; - $list=$r[1]; - $prefixes[$binding[$ns]] = substr($binding[$name],1,-1); - $this->parsedNamespaces[substr($binding[$name],1,-1)] = substr($binding[$ns],0,-1); - } - } - - if (count($prefixes)<1) $list= array_slice($list,0); - - return array($prefixes, $list); - } - - /** - * Callback function for replacing "a" elements with the right RDF uri. - * @param string $l - * @access private - **/ - function replace_a_type(&$l,$p) { - if ($l=='a') $l='<'.$this->RDF_NS.'type>'; - } - - /** - * Callback function for replacing "=" elements with the right DAML+OIL uri. - * @param string $l - * @access private - **/ - function replace_equal(&$l,$p) { - if ($l=='=') $l='<'.$this->OWL_NS.'sameAs>'; - } - - /** - * Callback function for replacing "this" elements with the right RDF uri. - * @param string $l - * @access private - **/ - function replace_this($l,$p) { - if ($l=='this') $l=''; - } - - /** - * Applies stuff :) - * Expands namespace prefixes etc. - * @param array $prefixes - * @param array $list - * @returns $list - * @access private - **/ - function applyStuff($prefixes, $list) - { - array_walk($list, array($this, 'replace_a_type')); - array_walk($list, array($this, 'replace_equal')); - array_walk($list, array($this, 'replace_this')); - - for ($i = 0; $i < count($list); $i++) { - - if ($list[$i]=='<>') { - if (!isset($path)) { - if (!isset($_SERVER['SERVER_ADDR'])) { - $_SERVER['SERVER_ADDR'] = 'localhost'; - } - if (!isset($_SERVER['REQUEST_URI'])) { - $_SERVER['REQUEST_URI'] = '/rdfapi-php'; - } - $list[$i] = ''; - } else { - $list[$i] = '<'.$path.'>'; - }; - }; - - - if (preg_match('/^[-+]?[0-9]+$/', $list[$i])) { - //integer - $list[$i] = intval($list[$i]); - } else if (is_numeric($list[$i])) { - //float or decimal - // After conversion we cannot distinguish between both - $list[$i] = floatval($list[$i]); - } else if ((!strstr('<_"\'?.;,{}[]()@', $list[$i]{0})) - && (substr($list[$i],0,3) != '^^<') - ) { - //prefix or unknown - $_r = explode(':', $list[$i]); - $ns = $_r[0] . ':'; - $name = $_r[1]; - - if (isset($prefixes[$ns])) { - $list[$i] = '<'.$prefixes[$ns].$name.'>'; - } else if (isset($prefixes[substr($ns, 2)])) { - $list[$i] = '^^' . $prefixes[substr($ns, 2)] . $name . ''; - } else { - //die('Prefix not declared:'.$ns); - $this->parseError = true; - trigger_error('Prefix not declared: '.$ns, E_USER_ERROR); - break; - } - - } else { - if ($list[$i]{0} == '"') { - $bLiteral = true; - $chBase = '"'; - } else if ($list[$i]{0} == '\'') { - $bLiteral = true; - $chBase = '\''; - } else { - $bLiteral = false; - } - if ($bLiteral) { - $tripleBase = $chBase . $chBase . $chBase; - // Congratulations - it's a literal! - if (substr($list[$i], 0, 3) == $tripleBase) { - if (substr($list[$i],-3,3) == $tripleBase) { - // A big literal... - $lit = substr($list[$i],3,-3); - // print "++$lit++"; - $lit=str_replace('\n', '\\n',$lit); - - //$lit=ereg_replace("[^\\]" . $chBase, "\\" . $chBase, $lit); - $lit = stripslashes($lit); - - $list[$i] = $chBase . $lit . $chBase; - } else { - die ('Incorrect string formatting: '.substr($list[$i],-3,3)); - } - } else { - if (strstr($list[$i],"\n")) { - die('Newline in literal: ' . $list[$i]); - } - $list[$i] = stripslashes($list[$i]); - } - } - } - - if (substr($list[$i],0,2)=='^^') { - if ($list[$i][2]!='<') { - $list[$i] = '^^<' . substr($list[$i], 2) . '>'; - } - }; - - }//foreach list item - - return $list; - }//function applyStuff($prefixes, $list) - - - - /** - * Returns an array of triples extracted from the list of n3 tokens - * @param array $list - * @returns array - * @access private - **/ - function getStatements($list) { - - - $statements = array(); - - while (in_array('.', $list)) { - // for($i=0;$igetSpan($list, 0, $pos+1); - - $statement=$r[0]; - $list = $r[1]; - - array_pop($statement); - $statements[]=$statement; - } - - return $statements; - } - - /** - * Gets a list of triples with same subject - * e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes. - * @param array $list - * @returns array - * @acces private - **/ - function getPovs($list) { - $povs = array(); - while (in_array(';', $list)) { - $r=$this->posns($list,';'); - $pos=array_slice($r,0,2); - $r = $this->getSpan($list, $pos[0], $pos[1]); - $pov=$r[0]; - $list=$r[1]; - - // skip lone semicolons, e.g. " ; ." - if (count($pov) == 1) continue; - - $povs[]=array_slice($pov,1); - } - - return array($list, $povs); - } - - /** - * Gets a list of triples with same predicate - * e.g. :Gunnar :likes "Cheese", "Wine". - * @access private - * @param array $list - * @returns array - **/ - function getObjs($list) { - - - $objs = array(); - while (in_array(",",$list)) { - $pos=array_search(",",$list); - // for($i=0;$igetSpan($list, $pos, ($pos+$get_array_fields)); - - $obj=$r[0]; - if (!isset($obj[2])) $obj[2]=' '; - if (!isset($obj[3])) $obj[3]=' '; - - $list=$r[1]; - - - $objs[]=$obj; - - - } - - return array($list, $objs); - } - - /** - * Does the real work, returns a list of subject, predicate, object triples. - * @param array $list - * @returns array - * @access private - **/ - function statementize($list) { - - if (count($list) == 1 && preg_match("/_".BNODE_PREFIX."[0-9]+_/",$list[0])) { - if ($this->debug) print "Ignored bNode exists statement. $list\n"; - return array(); - } - - - - if (count($list) == 3) return array($list); - if (count($list) < 3) { - throw new Exception( - 'N3 statement too short,' - . ' only ' . count($list) . ' elements instead of 3:' . "\n" - . implode("\n", $list) - ); - } - - //Get all ; - $r=$this->getPovs($list); - $spo=$r[0]; - $po=$r[1]; - $all=array(); - - - - // (spo, po), all = getPovs(list), [] - $subject = $spo[0]; - foreach ($po as $pop) { - // for pop in po { - $r=$this->getObjs($pop); - - $myPo=$r[0]; - $obj=$r[1]; - //myPo, obj = getObjs(pop) - - if (!isset($myPo[2])) $myPo[2]=' '; - if (!isset($myPo[3])) $myPo[3]=' '; - - - $predicate = $myPo[0]; - $all[]=array($subject,$predicate,$myPo[1],$myPo[2],$myPo[3]); - // all.append([subject, predicate, myPo[1]]) - - - - foreach ($obj as $o) $all[]=array($subject,$predicate, $o[1],$o[2],$o[3]); - // for x in obj: all.append([subject, predicate, x]) - - } - - - - $r = $this->getObjs($spo); - $spo=$r[0]; - - $objs=$r[1]; - - //spo, objs = getObjs(spo) - $subject=$spo[0]; - $predicate=$spo[1]; - - - if(!isset($spo[3])) $spo[3]=' '; - if(!isset($spo[4])) $spo[4]=' '; - - $all[]=array($subject, $predicate, $spo[2],$spo[3],$spo[4]); - - foreach ($objs as $obj) $all[]=array($subject, $predicate, $obj[1],$obj[2],$obj[3]); - - return $all; - } - - /** - * Makes lists of elements in list into a seperate array element. - * e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"] - * @param array $list - * @param string $schar - * @param string $echar - * @returns array - * @access private - **/ - function doLists($list, $schar, $echar) { - - while (in_array($schar, $list)) { - // while schar in list { - $ndict = array(); - $nestingLevel = 0; - $biggest = 0; - for ($i = 0; $i < count($list); $i++) { - if ($list[$i] == $schar) { - $nestingLevel += 1; - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel] = array(array($i)); - } else { - $ndict[$nestingLevel][]=array($i); - } - } - if ($list[$i] == $echar) { - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel]=array(array($i)); - } else { - $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i; - $nestingLevel-= 1; -# elif type(list[i]) == type([]) { -# list[i] = doLists(list[i], schar, echar) - } - } - } - foreach (array_keys($ndict) as $key) { - if ($key > $biggest) $biggest = $key; - } - - $tol = $ndict[$biggest][0]; - $list = $this->listify($list, $tol[0], ($tol[1]+1)); - } - return $list; - } - - /** - * Apply doLists for all different types of list. - * @param array - * @returns array - * @access private - **/ - function listStuff($list) { -# y, z = zip(['[', ']'], ['{', '}'], ['(', ')']) -# return map(doLists, [list, list, list], y, z).pop() - $list = $this->doLists($list, '[', ']'); - $list = $this->doLists($list, '{', '}'); - return $this->doLists($list, '(', ')'); - } - - /** - * Generates a new node id. - * @access private - * @returns string - **/ - function bnodeID() { - - $this->bNode++; - return "_".BNODE_PREFIX.$this->bNode."_"; - } - - /** - * This makes bNodes out of variables like _:a etc. - * @access private - * @param array $list - * @returns array - **/ - function fixAnon($list) { -// $map=array(); - for($i=0;$ibNodeMap[$l])) { - $a=$this->bnodeID(); - $this->bNodeMap[$l]=$a; - } else $a=$this->bNodeMap[$l]; - $list[$i]=$a; - } - } - return $list; - } - - /** - * This makes [ ] lists into bnodes. - * @access private - * @param array $list - * @return array - **/ - function expandLists($list) { - - for($i=0;$ibnodeID(); - $prop=$list[$i]; - $list[$i]=$bnode; - $list[]=$bnode; - $list=$this->array_concat($list, array_slice($prop,1,-1)); - $list[]='.'; - }elseif($list[$i][0]=='(') { - - $rdfNil = '<'. RDF_NAMESPACE_URI . RDF_NIL .'>'; - $rdfFirst = '<'. RDF_NAMESPACE_URI . RDF_FIRST .'>'; - $rdfRest = '<'. RDF_NAMESPACE_URI . RDF_REST .'>'; - - // local copy of list without "(" and ")" - $t_list = array_slice($list[$i], 1, -1); - - //prepare bnodes - $fromBnode = $this->bnodeID(); - $toBnode = $this->bnodeID(); - - //link first bnode into graph - $list[$i] = $fromBnode; - - $count = count($t_list); - - //loop through list, convert to RDF linked list - for ($idx = 0; $idx < $count; $idx++){ - - // set rdf:first - $list[] = $fromBnode; - $list[] = $rdfFirst; - $list[] = $t_list[$idx]; - $list[] = '.'; - - // set rdf:rest (nil or next bnode) - if ($idx == $count - 1) { - $list[] = $fromBnode; - $list[] = $rdfRest; - $list[] = $rdfNil; - $list[] = '.'; - } - else { - $list[] = $fromBnode; - $list[] = $rdfRest; - $list[] = $toBnode; - $list[] = '.'; - - $fromBnode = $toBnode; - $toBnode = $this->bnodeID(); - } - } - } - else { - die('Only [ ] and () lists are supported!'); - } - } - - - } - return $list; - } - - /** - * Main work-horse function. This converts a N3 string to a list of statements - * @param string $s - * @returns array - * @access private - **/ - function n3tolist($s) { - - // """Convert an N3 string into a list of triples as strings.""" - $result = array(); - - $t = $this->filterWs($this->toke($s)); # tokenize the stream, and filter whitespace tokens - - if ($this->debug) { - print "Filter WS:\n"; - var_dump($t); - } - $r=$this->getPrefixes($t); # get the prefix directives, and add to a dict - $prefixes=$r[0]; - $t=$r[1]; - if ($this->debug) { - print "Prefixes:\n"; - var_dump($prefixes); - print "***\n"; - var_dump($t); - } - $t=$this->applyStuff($prefixes, $t);#apply prefixes, keywords, and string formatting - if ($this->debug) { - print "Stuff applied:\n"; - var_dump($t); - } - - $t=$this->fixAnon($t); # fix _:a anons - if ($this->debug) { - print "Fix anon:\n"; - var_dump($t); - } - - $t = $this->listStuff($t); # apply list stuff: todo - if ($this->debug) { - print "Lists done:\n"; - var_dump($t); - } - $t=$this->expandLists($t); - if ($this->debug) { - print "Lists applied:\n"; - var_dump($t); - } - $t = $this->getStatements($t); # get all of the "statements" from the stream - - foreach ($t as $stat) { - $stats = $this->statementize($stat); - - foreach ($stats as $y) { - $result[]=$y; - } - } - - // for x in [statementize(stat) for stat in t] { - // for y in x: result.append(y) - return $result; - } - - - - /** - * Constructs a RAP RDFNode from URI/Literal/Bnode - * @access private - * @param string $s - * @returns object RDFNode - **/ - function toRDFNode($s, $state) - { - $ins = substr($s, 1, -1); - if ($s{0} == '"' || $s{0} == '\'') { - $lang = NULL; - - if (count($state)>3) { - for ($i = 3; $i < count($state); $i++) { - if ($state[$i][0]=='@') { - $lang = substr($state[3], 1); - } - if (substr($state[$i],0,2) == '^^') { - $dtype = substr($state[$i],2); - if ($dtype[0]=='<') { - $dtype = substr($dtype,1,-1); - } - } - } - } - - - if (UNIC_RDF) { - $ins = $this->str2unicode_nfc($ins); - } - $new_Literal = new Literal($ins, $lang); - if (isset($dtype)) { - $new_Literal->setDatatype($dtype); - } - return $new_Literal; - } else if (is_int($s)) { - $value = new Literal($s); - $value->setDatatype(XML_SCHEMA . 'integer'); - return $value; - } else if (is_float($s)) { - $value = new Literal($s); - $value->setDatatype(XML_SCHEMA . 'double'); - return $value; - } else if ($s == '@true') { - $value = new Literal(true); - $value->setDatatype(XML_SCHEMA . 'boolean'); - return $value; - } else if ($s == '@false') { - $value = new Literal(false); - $value->setDatatype(XML_SCHEMA . 'boolean'); - return $value; - } - - if (strstr($s, '_' . BNODE_PREFIX)) { - if (($this->FixBnodes) || (!array_search($s,$this->bNodeMap))) { - return new BlankNode($ins); - } else { - return new BlankNode( - trim( - substr( - array_search($s, $this->bNodeMap), - 2 - ) - ) - ); - }; - } - - return new Resource($ins); - }//function toRDFNode($s, $state) - - - - -} //end: N3Parser - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Serializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Serializer.php.svn-base deleted file mode 100755 index 91540d2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/N3Serializer.php.svn-base +++ /dev/null @@ -1,526 +0,0 @@ - - *
  • Using [ ] for blank nodes, or _: if necessary
  • - *
  • Literal datatype- and xmlLanguageTag support
  • - * - * - * Un-supported N3 Features include: - *
      - *
    • Reification
    • - *
    - * - * - * @author Gunnar AA. Grimnes - * @author Daniel Westphal - * @author Christian Weiske - * @version $Id$ - * @package syntax - * @access public - **/ - -define('MAGIC_STRING', '~~~'); - -class N3Serializer extends Object -{ - - var $debug = false; - - var $prefixes = array(); - var $noPrefixes = array(); - - var $done; // keeps track of already serialized resources - var $resourcetext; - var $resourcetext_taken; - var $model; - var $res; - var $anon; - - var $styleCompress = false; - var $stylePretty = false; - var $styleNest = false; - - /** - * Constructor - * - * @access public - */ - function N3Serializer() - { - $this->debug = false; - } - - - /** - * Adds a new namespace prefix to use. - * Unknown namespaces will become ns0, ns1 etc. - * @access public - * @param string $s - * @returns void - **/ - function addNSPrefix($ns, $prefix) - { - $this->prefixes[$ns] = $prefix; - } - - - - /** - * Clears all previously set namespace prefixes - */ - function clearNSPrefixes() - { - $this->prefixes = array(); - } - - - - /** - * Add a namespace that shall not get shortened by using a prefix. - * - * @param string $ns Namespace URI like "http://example.com/" - */ - function addNoNSPrefix($ns) - { - $this->noPrefixes[$ns] = true; - } - - - - /** - * Clears all previously set noNamespace prefixes - */ - function clearNoNSPrefixes() - { - $this->noPrefixes = array(); - } - - - - /** - * Serializes a model to N3 syntax. - * - * @param object Model $model - * @return string - * @access public - */ - function &serialize(&$m) - { - if (is_a($m, 'DbModel')) { - $m=$m->getMemModel(); - } - - $this->reset(); - $this->model = $m; - $this->res = ""; - - // copy default namespaces - global $default_prefixes; - foreach($default_prefixes as $prefix => $namespace) { - $this->addNSPrefix($namespace,$prefix); - } - - $nps= $this->model->getParsedNamespaces(); - if ($nps!=false) { - foreach ($nps as $uri => $prefix){ - $this->addNSPrefix($uri,$prefix); - } - } - - $namespaces = array(); - $count = array(); - $resources = array(); - foreach ($this->model->triples as $t) { - $s = $t->getSubject(); - if (is_a($s, 'Resource')) { - $namespaces[$s->getNamespace()] = 1; - } - $p = $t->getPredicate(); - if (is_a($p, 'Resource')) { - $namespaces[$p->getNamespace()] = 1; - } - $o = $t->getObject(); - if (is_a($o, 'Resource')) { - $namespaces[$o->getNamespace()] = 1; - } - $uri = $s->getURI(); - - if (isset($count[$uri])) { - $count[$uri]++; - } else { - $count[$uri] = 0; - $resources[$uri] = $s; - } - - if ($this->styleNest && is_a($s, 'BlankNode')) { - //make sure blank nodes are sorted *after* normal nodes - //so that they can be included - $count[$uri] -= 0.00001; - } - } - - if (!HIDE_ADVERTISE) { - $this->res .= '# Generated by N3Serializer.php from RDF RAP.'.LINEFEED - .'# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html' - .LINEFEED.LINEFEED; - } - - $this->doNamespaces($namespaces); - - $this->res .= LINEFEED.LINEFEED; - - arsort($count); - - foreach ( $count as $k => $v) { - $this->doResource($resources[$k]); - // $this->res.=" .\n"; - } - - //make all replacements - do { - $bReplacements = false; - foreach ($this->resourcetext as $r => $t) { - if (preg_match_all('/'.MAGIC_STRING.'([^ ]+)'.MAGIC_STRING.'/', $t, $ms, PREG_SET_ORDER)) { - foreach ($ms as $mseach) { - $rp = $this->resourcetext[$mseach[1]]; - $this->resourcetext[$r] = preg_replace('/'.MAGIC_STRING.$mseach[1].MAGIC_STRING.'/', $rp, $t); - $bReplacements = true; - } - } - - } - } while ($bReplacements); - - //after all replacements took place, put the lines out - $c = 0; - foreach ($this->resourcetext as $r => $t) { - if ($this->debug) { - $this->res .= $c . ': '; - } - if (!(isset($this->resourcetext_taken[$r]) && $this->resourcetext_taken[$r]>0)) { - $this->res .= $t . ' .' . LINEFEED; - if ($this->stylePretty) { - $this->res .= LINEFEED; - } - } else if ($this->debug ) { - $this->res.=' Skipping : '.$t.LINEFEED; - } - $c++; - } - - // $max=-1111; - // $maxkey=""; - // foreach ($count as $k=>$c) { - // if ( $c>$max) { $maxkey=$k; $max=$c; } - // } - - // if ($this->debug) { - // print "$maxkey is subject of most triples! ($max) \n"; - // } - - return $this->res; - }//function &serialize(&$m) - - - - /** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @param object MemModel $model - * @param string $filename - * @return boolean - * @access public - */ - function saveAs(&$model, $filename) - { - // serialize model - $n3 = $this->serialize($model); - - // write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $n3); - fclose($file_handle); - return true; - } else { - return false; - }; - } - - - - /** - * Set to true, if the N3 serializer should try to compress the blank node - * syntax using [] whereever possible. - */ - function setCompress($compress) - { - $this->styleCompress = $compress; - } - - - - /** - * Enables pretty printing in semicolon delimited sentences. - */ - function setPrettyPrint($prettyPrint) - { - $this->stylePretty = $prettyPrint; - } - - - - /** - * Enables nesting of blank nodes with [] if - * compression is activated via @see setCompress - */ - function setNest($nest) - { - $this->styleNest = $nest; - } - - /* ==================== Private Methods from here ==================== */ - - - /** - * Readies this object for serializing another model - * @access private - * @param void - * @returns void - **/ - function reset() - { - $this->anon = 0; - $this->done = array(); - $this->resourcetext_taken = array(); - $this->resourcetext = array(); - $this->res = ''; - $this->model = null; - } - - - - /** - * Makes ns0, ns1 etc. prefixes for unknown prefixes. - * Outputs @prefix lines. - * @access private - * @param array $n - * @returns void - **/ - function doNamespaces(&$n) - { - $c = 0; - foreach ($n as $ns => $nonsense) { - if (!$ns || isset($this->noPrefixes[$ns])) { - continue; - } - if (isset($this->prefixes[$ns])) { - $p = $this->prefixes[$ns]; - } else { - $p = 'ns' . $c; - $this->prefixes[$ns] = $p; - $c++; - } - $this->res .= "@prefix $p: <".$ns.'> .'.LINEFEED; - } - } - - - - /** - * Fill in $resourcetext for a single resource. - * Will recurse into Objects of triples, but should never look ? (really?) - * @param object Resource $r - * @returns boolean - * @access private - **/ - function doResource(&$r, $bEmbedded = false, $strIndent = ' ') - { - //var_dump($r->getURI()); - - $ts = $this->model->find($r, null, null); - if (count($ts->triples) == 0) { - if ($bEmbedded) { - $this->resourcetext[$r->getURI()] = '_:' . $r->getLabel(); - } - return; - } - - $out = ''; - - if (isset($this->done[$r->getURI()]) && $this->done[$r->getURI()]) { - if (!$this->styleNest && is_a($r, 'BlankNode')) { - if ($this->resourcetext_taken[$r->getURI()] == 1) { - //Oh bother, we must use the _:blah construct. - $a = $this->resourcetext[$r->getURI()]; - $this->resourcetext[$r->getURI()]='_:anon'.$this->anon; - $this->resourcetext['_:anon'.$this->anon]=$this->fixAnon($a, '_:anon'.$this->anon); - $this->resourcetext_taken[$r->getURI()]=2; - $this->anon++; - } - } - return false; - } - - $this->done[$r->getURI()] = true; - $compress = false; - - if (is_a($r, 'Resource')) { - if (is_a($r, 'BlankNode')) { - //test if this blanknode is referenced somewhere - $rbn = $this->model->find(null, null, $r); - $compress = (N3SER_BNODE_SHORT || $this->styleCompress) - && ( - count($rbn->triples) == 0 - || (count($rbn->triples) == 1 && $bEmbedded) - ); - if ($compress) { - $out.='['; - } else { - $out.='_:'.$r->getLabel(); - } - } else { - $this->doURI($r, $out); - } - } - - usort($ts->triples, 'statementsorter'); - $lastp = ''; - $out .= ' '; - - foreach ($ts->triples as $t) { - $p = $t->getPredicate(); - - if ($p === $lastp) { - $out .= ' , '; - } else { - if ($lastp!='') { - if ($this->stylePretty) { - $out .= ";\n" . $strIndent; - } else { - $out .= ' ; '; - } - } - $this->doURI($p, $out); - $lastp = $p; - } - - $out .= ' '; - - $o = $t->getObject(); - - if (is_a($o, 'Literal')) { - $l = $o->getLabel(); - if (strpos($l, LINEFEED) === false) { - $long = false; - } else { - $long = true; - } - - //try to be intelligent - $quoteSingle = strpos($l, '\'') !== false; - $quoteDouble = strpos($l, '"') !== false; - if ($quoteSingle && !$quoteDouble) { - $quoteChar = $long ? '"""' : '"'; - } else if ($quoteDouble && !$quoteSingle) { - $quoteChar = $long ? '\'\'\'' : '\''; - } else if ($quoteDouble && $quoteSingle) { - //both quotation chars inside - $quoteChar = $long ? '"""' : '"'; - $l = addslashes($l); - } else { - //no quotation chars - $quoteChar = $long ? '"""' : '"'; - } - $out .= $quoteChar . $l . $quoteChar; - - if ( $o->getLanguage()!='' ) { - $out.='@'.$o->getLanguage(); - } - if ( $o->getDatatype()!='' ) { - $out.='^^<'.$o->getDatatype().'>'; - } - } - - if (is_a($o, 'Resource')) { - if ($this->debug) { - print 'Doing object: '.$o->getURI().LINEFEED; - } - if (is_a($o, 'BlankNode')) { - if ($this->styleNest && $this->styleCompress - && !isset($this->done[$o->getURI()]) - ) { - $this->doResource($o, true, $strIndent . ' '); - $out .= MAGIC_STRING . $o->getURI() . MAGIC_STRING; - //$out .= $this->resourcetext[$o->getURI()]; - $this->resourcetext_taken[$o->getURI()] = 1; - } else { - $out .= '_:'.$o->getLabel(); - } - } else { - $this->doURI($o, $out); - } - } - } - - if ($compress) { - $out .= ' ]'; - }; - - $this->resourcetext[$r->getURI()]=$out; - - return true; - }//function doResource(&$r) - - - - /** - * Format a single URI - * @param string $s - * @return void - * @access private - **/ - function doURI(&$r, &$out) - { - if ($r->getURI() == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') { - $out .= 'a'; - return; - } - $ns = $r->getNamespace(); - if ($ns != '' && !isset($this->noPrefixes[$ns])) { - $out .= $this->prefixes[$ns].':'.$r->getLocalName(); - } else { - //Will this ever happen? It does, now. - $out .= '<' . $r->getURI() . '>'; - } - } - - - - /** - * Fix the resourcetext for a blanknode where the _: construct was used - * @param string $s - * @param string $a - * @access private - * @return void - **/ - function fixAnon($t,$a) - { - $t = preg_replace("/( \] $|^\[ )/", '', $t); - return $a . $t; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/NTripleSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/NTripleSerializer.php.svn-base deleted file mode 100755 index 1f4c7c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/NTripleSerializer.php.svn-base +++ /dev/null @@ -1,133 +0,0 @@ - - * @version $Id$ - * @package syntax - * @access public - **/ - - - -class NTripleSerializer extends Object { - - var $debug; - var $model; - var $res; - - - - - - /** - * Constructor - * - * @access public - */ - function NTripleSerializer() { - $this->debug=FALSE; - } - - /** - * Serializes a model to N Triple syntax. - * - * @param object Model $model - * @return string - * @access public - */ - function & serialize(&$m) { - - if (is_a($m, 'DbModel')) $m = $m->getMemModel(); - - $this->reset(); - if (!HIDE_ADVERTISE) { - $this->res .= '# Generated by NTripleSerializer.php from RDF RAP.' . - LINEFEED . '# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'. - LINEFEED . LINEFEED; - } - - foreach ($m->triples as $t) { - - $s=$t->getSubject(); - if (is_a($s, 'Blanknode')) { - $subject='_:'.$s->getURI(); - } else { - $subject = '<' . ereg_replace(' ', '', $s->getURI()) . '>'; - } - - $p=$t->getPredicate(); - $predicate='<'.ereg_replace(' ', '', $p->getURI()).'>'; - - $o=$t->getObject(); - if (is_a($o, 'literal')) { - $object='"'.$o->getLabel().'"'; - if ($o->getLanguage()!='') $object.='@'.$o->getLanguage(); - if ($o->getDatatype()!='') $object.='^^<'.$o->getDatatype().">"; - } elseif (is_a($o, 'Blanknode')) { - $object='_:'.$o->getURI(); - } else {$object='<'.ereg_replace(' ', '', $o->getURI()).'>';}; - - $this->res.=$subject.' '.$predicate.' '.$object.' .'; - $this->res.=LINEFEED.LINEFEED; - } - - return $this->res; - } - - -/** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @access public - * @param object MemModel $model - * @param string $filename - * @return boolean - * @access public - */ - function saveAs(&$model, $filename) { - - // serialize model - $n3 = $this->serialize($model); - - // write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $n3); - fclose($file_handle); - return TRUE; - }else{ - return FALSE; - }; - } - - - /* ==================== Private Methods from here ==================== */ - - -/** - * Readies this object for serializing another model - * @access private - * @param void - * @returns void - **/ - function reset() { - $this->res=""; - $this->model=NULL; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfParser.php.svn-base deleted file mode 100755 index 46008cac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfParser.php.svn-base +++ /dev/null @@ -1,2365 +0,0 @@ -, - * Chris Bizer , - * Radoslaw Oldakowski - * Daniel Westphal - * @package syntax - * @access public - * - */ - -class RdfParser extends Object { - -var $rdf_parser; -var $model; - -/* Private Methods */ - - -/** -* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH). -* -* @param String $str -* @return String -* @access private -* -*/ -function str2unicode_nfc($str=""){ - $result=""; - /* try to detect encoding */ - $tmp=str_replace("?", "", $str); - if(strpos(utf8_decode($tmp), "?")===false){ - $str=utf8_decode($str); - } - for($i=0,$i_max=strlen($str);$i<$i_max;$i++){ - $nr=0;/* unicode dec nr */ - /* char */ - $char=$str[$i]; - /* utf8 binary */ - $utf8_char=utf8_encode($char); - $bytes=strlen($utf8_char); - if($bytes==1){ - /* 0####### (0-127) */ - $nr=ord($utf8_char); - } - elseif($bytes==2){ - /* 110##### 10###### = 192+x 128+x */ - $nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128); - } - elseif($bytes==3){ - /* 1110#### 10###### 10###### = 224+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128); - } - elseif($bytes==4){ - /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128); - } - /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */ - if($nr<9){/* #x0-#x8 (0-8) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==9){/* #x9 (9) */ - $result.='\t'; - } - elseif($nr==10){/* #xA (10) */ - $result.='\n'; - } - elseif($nr<13){/* #xB-#xC (11-12) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==13){/* #xD (13) */ - $result.='\t'; - } - elseif($nr<32){/* #xE-#x1F (14-31) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<34){/* #x20-#x21 (32-33) */ - $result.=$char; - } - elseif($nr==34){/* #x22 (34) */ - $result.='\"'; - } - elseif($nr<92){/* #x23-#x5B (35-91) */ - $result.=$char; - } - elseif($nr==92){/* #x5C (92) */ - $result.='\\'; - } - elseif($nr<127){/* #x5D-#x7E (93-126) */ - $result.=$char; - } - elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */ - $result.="\\U".sprintf("%08X",$nr); - } - else{ - /* other chars are not defined => ignore */ - } - } - return $result; -} - - - - -/** - * @access private - */ -function _new_element() -{ - $e['parent']=Array(); // Parent is a blank Array - $e['state']=0; - $e['has_property_atributes']=0; - $e['has_member_attributes']=0; - $e['subject_type']=0; - $e['subject']=''; - $e['predicate']=''; - $e['ordinal']=0; - $e['members']=0; - $e['data']=''; - $e['xml_lang']=''; - $e['bag_id']=''; - $e['statements']=0; - $e['statement_id']=''; - $e['datatype']=''; - $e['element_base_uri'] = ''; - - return $e; -} - -/** - - * @param string $source - * @param string &$destination - * - * @access private - */ -function _copy_element($source, &$destination ) -{ - if( $source ) - { - $destination['parent'] = $source; - $destination['state'] = $source['state']; - $destination['xml_lang'] = $source['xml_lang']; - $destination['element_base_uri'] = $source['element_base_uri']; - } -} - - /** - * @param string &$e - * @access private - */ -function _clear_element(&$e) -{ - $e['subject']=''; - $e['predicate']=''; - $e['data']=''; - $e['bag_id']=''; - $e['statement_id']=''; - - if(isset($e['parent'])) { - if( $e['parent'] ) - { - if( $e['parent']['xml_lang'] != $e['xml_lang'] ) - { - $e['xml_lang']=''; - } - } - else - { - $e['xml_lang']=''; - } - } else { - $e['xml_lang']=''; - } - - $e['parent']=Array(); - $e['state']=0; - $e['has_property_attributes']=0; - $e['has_member_attributes']=0; - $e['subject_type']=0; - $e['subject']=''; - $e['predicate']=''; - $e['ordinal']=0; - $e['members']=0; - $e['data']=''; - $e['xml_lang']=''; - $e['bag_id']=''; - $e['statements']=0; - $e['statement_id']=''; - $e['datatype']=''; - $e['element_base_uri'] = ''; -} - - /** - * @access private - */ -function _push_element() -{ - if(!isset($this->rdf_parser['free'])) { - $this->rdf_parser['free']=Array(); - } - if(count($this->rdf_parser['free'])>0) - { - $e = $this->rdf_parser['free']; - if(isset($e['parent'])) { - $this->rdf_parser['free'] = $e['parent']; - } else { - $this->rdf_parser['free']=$this->_new_element(); - } - } - else - { - $e = $this->_new_element(); - } - if(!isset($this->rdf_parser['top'])) { - $this->rdf_parser['top']=Array(); - } - $this->_copy_element( $this->rdf_parser['top'], $e ); - $this->rdf_parser['top'] = $e; -} - - /** - * @access private - */ -function _pop_element() -{ - $e = $this->rdf_parser['top']; - $this->rdf_parser['top'] = $e['parent']; - $this->_clear_element( $e ); - $this->rdf_parser['free'] = $e; -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute_resource($local_name ) -{ - return ( $local_name == RDF_TYPE ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute_literal($local_name ) -{ - return ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_LIST ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_ordinal( $local_name ) -{ - $ordinal = -1; - - if( $local_name{0} == '_' ) - { - $ordinal = substr($local_name,1) + 1 ; - } - - return ( $ordinal > 0 ) ? $ordinal : 0; -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute( $local_name ) -{ - return $this->_is_rdf_property_attribute_resource( $local_name ) - || $this->_is_rdf_property_attribute_literal( $local_name ); -} - -function _is_forbidden_rdf_property_attribute($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_element( $local_name ) -{ - return ( $local_name == RDF_TYPE ) - || ( $local_name == RDF_SUBJECT ) - || ( $local_name == RDF_PREDICATE ) - || ( $local_name == RDF_OBJECT ) - || ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_SEEALSO ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) - || ( $local_name == RDF_REST ) - || ( $local_name{0} == '_' ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_forbidden_rdf_property_element ($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_node_element( $local_name ) -{ - return ( $local_name == RDF_DESCRIPTION ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_SUBJECT ) - || ( $local_name == RDF_PREDICATE ) - || ( $local_name == RDF_OBJECT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_TYPE ) - || ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_SEEALSO ) - || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) - || ( $local_name == RDF_REST ) - || ( $local_name == RDF_NIL ) - || ( $local_name{0} == '_' ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_forbidden_rdf_node_element ($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - /** - * @param string $val - * @access private - */ -function _istalnum($val) { - return ereg("[A-Za-z0-9]",$val); -} - /** - * @param string $val - * @access private - */ -function _istalpha($val) { - return ereg("[A-Za-z]",$val); -} - - /** - * @param string $uri - * @access private - */ -function _is_absolute_uri($uri ) -{ - $result = false; - $uri_p=0; - if( $uri && $this->_istalpha( $uri{$uri_p} ) ) - { - ++$uri_p; - - while( ($uri_p_istalnum( $uri{$uri_p} ) - || ( $uri{$uri_p} == '+' ) - || ( $uri{$uri_p} == '-' ) - || ( $uri{$uri_p} == '.' ) ) ) - { - ++$uri_p; - } - - $result = ( $uri{$uri_p} == ':' ); - } - return $result; -} - - -/* - * This function returns an associative array returning any of the various components of the URL that are present. This includes the - * $arr=parse_url($url) - * scheme - e.g. http - * host - * port - * user - * pass - * path - * query - after the question mark ? - * fragment - after the hashmark # - * - * @param string $uri - * @param string $buffer - * @param string &$scheme - * @param string &$authority - * @param string &$path - * @param string &$query - * @param string &$fragment - * @access private -*/ -function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment ) { - - $parsed=parse_url($uri); - if(isset($parsed['scheme'])) { - $scheme=$parsed['scheme']; - } else { - $scheme=''; - } - if(isset($parsed['host'])) { - $host=$parsed['host']; - } else { - $host=''; - } - if(isset($parsed['host'])) { - $authority=$parsed['host']; - } else { - $authority=''; - } - if(isset($parsed['path'])) { - $path=$parsed['path']; - } else { - $path=''; - } - if(isset($parsed['query'])) { - $query=$parsed['query']; - } else { - $query=''; - } - if(isset($parsed['fragment'])) { - $fragment=$parsed['fragment']; - } else { - $fragment=''; - } - -} - -/** - * @param string $base_uri - * @param string $reference_uri - * @param string &$buffer - * @access private -*/ -function _resolve_uri_reference($base_uri,$reference_uri,&$buffer ) -{ - if ($reference_uri == '') - return ($buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri)); - - $base_buffer=''; - $reference_buffer=''; - $path_buffer=''; - - $buffer = ''; - - $this->_parse_uri($reference_uri, - $reference_buffer, - $reference_scheme, - $reference_authority, - $reference_path, - $reference_query, - $reference_fragment ); - - $this->_parse_uri($base_uri, - $base_buffer, - $base_scheme, - $base_authority, - $base_path, - $base_query, - $base_fragment ); - - if( $reference_scheme == '' - && $reference_authority == '' - && $reference_path == '' - && $reference_query == '' ) - { - $buffer=$base_uri; - - if( $reference_fragment != '' ) - { - if ($base_path == '' || $base_path == '/' || $base_path == "\\") { - $buffer = $this->rdf_parser['document_base_uri']; - } - else - { - $buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri); - } - - // CB: Changed for base URI - $c = substr($buffer, strlen($buffer)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $buffer.= '#' ; - $buffer.=$reference_fragment; - - } - } - else if( $reference_scheme != '' ) - { - $buffer=$reference_uri; - } - else - { - $result_scheme = $base_scheme; - $result_path = ''; - - if( $reference_authority != '' ) - { - $result_authority = $reference_authority; - } - else - { - $result_authority = $base_authority; - - if ($reference_path != '') - { - if ($reference_path{0} == '/' || $reference_path{0} == "\\") - { - if ($reference_path{1} == '/' || $reference_path{1} == "\\") - { - $result_authority = ''; - $result_path = $reference_path; - } - else - $result_path = $reference_path; - } - elseif (substr($reference_path, 0, 3) == '../' || - substr($reference_path, 0, 3) == '..\\') - { - $slash = $reference_path{2}; - while($base_path != '' && ( substr($reference_path, 0, 3) == '../' - || substr($reference_path, 0, 3) == '..\\')) - { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); - if ($base_path != '') { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); - $reference_path = substr($reference_path, 3); - } - } - - $result_path = $base_path .$slash .$reference_path; - } - else - { - if ($base_path) - $result_path = preg_replace("/[^\/\\\]*$/", $reference_path, $base_path, 1); - else - $result_path = '/' .$reference_path; - } - } - - } - - if( $result_scheme != '' ) - { - $buffer=$result_scheme; - $buffer.=':'; - } - - if( $result_authority != '' ) - { - $buffer.="//"; - $buffer.=$result_authority; - } - - if( $result_path != '' ) - { - $buffer.=$result_path; - } - - if( $reference_query != '' ) - { - $buffer.='?'; - $buffer.=$reference_query; - } - - if( $reference_fragment != '' ) - { - $buffer.='#'; - $buffer.=$reference_fragment; - } - } -} - - -/** - * IDs which contain CombiningChars or Extenders - * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid. - * If you want to use IDs containing these characters you can turn off - * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php). - * - * @param string $id - * @access private -*/ -function is_valid_id($id ) -{ - if (!VALIDATE_IDS) - return TRUE; - - $result = FALSE; - - if( $id ) - { - if( $this->_istalpha($id{0}) || $id{0} == '_') - { - $result = TRUE; - $i=0; - $len = strlen($id); - while( $result != FALSE && ++$i < $len ) - { - if( !($this->_istalnum( $id{$i}) - || $id{$i} == '.' - || $id{$i} == '-' - || $id{$i} == '_')) - { - $result = FALSE; - } - } - } - } - - if (!$result) - $this->_report_error('illegal ID, nodeID or bagID attribute value'); - else - return TRUE; -} - -/** - * @param string $id - * @param string &$buffer - * @access private -*/ -function _resolve_id($id,&$buffer ) -{ - $id_buffer=''; - - if( $this->is_valid_id($id) ) - { - $id_buffer="#$id"; - } - - $this->_resolve_uri_reference( $this->rdf_get_base(), $id_buffer, $buffer ); - -} - -/** - * @param string $name - * @param string &$buffer - * @param string &$namespace_uri - * @param string &$local_name - * @access private -*/ -function _split_name($name, &$buffer, &$namespace_uri, &$local_name ) -{ - static $nul = 0; - $buffer=$name; - - if( strstr( $buffer, NAMESPACE_SEPARATOR_CHAR ) ) - { - $cosas=explode(NAMESPACE_SEPARATOR_CHAR,$buffer); - $namespace_uri = $cosas[0]; - $local_name = $cosas[1]; - } - else - { - if( ( $buffer{ 0 } == 'x' ) - && ( $buffer{ 1 } == 'm' ) - && ( $buffer{ 2 } == 'l' ) - && ( $buffer{ 3 } == ':' ) ) - { - $namespace_uri = XML_NAMESPACE_URI; - $local_name = substr($buffer,4); - } - else - { - $namespace_uri = ''; - $local_name = $buffer; - } - } -} -/** - * @param string &$buf - * @access private -*/ -function _generate_anonymous_uri(&$buf ) -{ - $id=''; - if(!isset($this->rdf_parser['anonymous_id'])) { - $this->rdf_parser['anonymous_id']=0; - } - $this->rdf_parser['anonymous_id']++; - - $buf= BNODE_PREFIX . $this->rdf_parser['anonymous_id']; - -} -/** - * @param string $subject_type - * @param string $subject - * @param string $predicate - * @param string $ordinal - * @param string $object_type - * @param string $object - * @param string $xml_lang - * @param string $bag_id - * @param string $statements - * @param string $statement_id - * @access private -*/ -function _report_statement( $subject_type, $subject, $predicate, $ordinal, $object_type, $object, $xml_lang, $bag_id, $statements, $statement_id, $datatype ) -{ - $statement_id_type = RDF_SUBJECT_TYPE_URI; - $statement_id_buffer=''; - $predicate_buffer=''; - if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang'])) - $xml_lang = $this->rdf_parser['document_xml_lang']; - - // call add statement - $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang, $datatype ); - - if( $bag_id ) - { - if( $statements == '' ) - { - $this->_report_statement(RDF_SUBJECT_TYPE_URI, - $bag_id, - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - RDF_NAMESPACE_URI.RDF_BAG, - '', - '', - '', - '', - $datatype ); - } - - if( ! $statement_id ) - { - $statement_id_type = RDF_SUBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri( $statement_id_buffer ); - $statement_id = $statement_id_buffer; - } - $statements++; - $predicate_buffer='RDF_NAMESPACE_URI_'.$statements; - - $this->_report_statement( - RDF_SUBJECT_TYPE_URI, - $bag_id, - $predicate_buffer, - $statements, - RDF_OBJECT_TYPE_BNODE, - $statement_id, - '', - '', - '', - '', - $datatype ); - } - - if( $statement_id ) - { - // rdf:type = rdf:Statement - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - RDF_NAMESPACE_URI.RDF_STATEMENT, - '', - '', - '', - '', - $datatype ); - - if ($subject_type == RDF_SUBJECT_TYPE_BNODE) - $obj_type = RDF_OBJECT_TYPE_BNODE; - else - $obj_type = RDF_OBJECT_TYPE_RESOURCE; - - - // rdf:subject - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_SUBJECT, - 0, - $obj_type, - $subject, - '', - '', - '', - '', - $datatype ); - - // rdf:predicate - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_PREDICATE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $predicate, - '', - '', - '', - '', - $datatype ); - - // rdf:object - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_OBJECT, - 0, - $object_type, - $object, - '', - '', - '', - '', - $datatype ); - } -} -/** - * @param string $subject_type - * @param string $subject - * @param string $attributes - * @param string $xml_lang - * @param string $bag_id - * @param string $statements - * @access private -*/ -function _handle_property_attributes($subject_type, $subject, $attributes, $xml_lang, $bag_id, $statements ) -{ - $i=0; - - $attribute=''; - $predicate=''; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value=''; - - $ordinal=0; - - for( $i = 0; isset($attributes[ $i ]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - $predicate=$attribute_namespace_uri; - $predicate.=$attribute_local_name; - - if( RDF_NAMESPACE_URI == $attribute_namespace_uri ) - { - if( $this->_is_rdf_property_attribute_literal( $attribute_local_name ) ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - ''); - } - else if( $this->_is_rdf_property_attribute_resource( $attribute_local_name ) ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $attribute_value, - '', - $bag_id, - $statements, - '', - ''); - } - else if( ( $ordinal = $this->_is_rdf_ordinal( $attribute_local_name ) ) != 0 ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - $ordinal, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - else if ( ($attribute_local_name != RDF_ABOUT) - && ($attribute_local_name != RDF_RDF) - && ($attribute_local_name != RDF_DESCRIPTION) - && ($attribute_local_name != RDF_ID) - && ($attribute_local_name != RDF_ABOUT_EACH) - && ($attribute_local_name != RDF_ABOUT_EACH_PREFIX) - && ($attribute_local_name != RDF_BAG_ID) - && ($attribute_local_name != RDF_RESOURCE) - && ($attribute_local_name != RDF_PARSE_TYPE) - && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL) - && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE) - && ($attribute_local_name != RDF_LI) - && ($attribute_local_name != RDF_SUBJECT) - && ($attribute_local_name != RDF_PREDICATE) - && ($attribute_local_name != RDF_OBJECT) - && ($attribute_local_name != RDF_NODEID) - && ($attribute_local_name != RDF_DATATYPE) - && ($attribute_local_name != RDF_SEEALSO) - && ($attribute_local_name != RDF_NIL) - && ($attribute_local_name != RDF_REST) - && ($attribute_local_name != RDF_FIRST) - ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - } - else if( XML_NAMESPACE_URI == $attribute_namespace_uri ) - { - if ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - // is it required that property attributes be in an explicit namespace? - - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - } -} - - - -/** - * @param string $warning - * @access private -*/ -function _report_warning($warning) -{ - $errmsg = RDFAPI_ERROR . '(class: parser): ' . $warning .'.'; - trigger_error($errmsg, E_USER_WARNING); -} - - -function _report_error($error) -{ - $errmsg = RDFAPI_ERROR . '(class: parser): ' . $error .'.'; - trigger_error($errmsg, E_USER_ERROR); -} - - -/** - * @param string $namespace_uri - * @param string $local_name - * @param string $attributes - * @param string $parent - * @access private -*/ -function _handle_resource_element( $namespace_uri, $local_name, $attributes, $parent ) -{ - $subjects_found = 0; - $aux=$attributes; - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - $id = ''; - $about = ''; - - $bag_id = ''; - $node_id = ''; - $datatype = ''; - - $i=0; - - $attribute=''; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value=''; - - $id_buffer=''; - - $type=''; - - $this->rdf_parser['top']['has_property_attributes'] = false; - $this->rdf_parser['top']['has_member_attributes'] = false; - - - if( $namespace_uri == RDF_NAMESPACE_URI ) - { - if( ! $this->_is_rdf_node_element( $local_name ) ) - { - $msg = 'unknown or out of context rdf node element: '.$local_name; - - if ($this->_is_forbidden_rdf_node_element($local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - } - - // examine each attribute for the standard RDF "keywords" - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - // if the attribute is not in any namespace - // or the attribute is in the RDF namespace - if( ( $attribute_namespace_uri == '' ) - || ( $attribute_namespace_uri == RDF_NAMESPACE_URI )) - { - if( $attribute_local_name == RDF_ID ) - { - $id = $attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_ABOUT ) { - $about = '_'.$attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_NODEID) { - $node_id = $attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_ABOUT_EACH ) { - $error = 'aboutEach has been removed from the RDF specifications'; - $this->_report_error($error); - } else if( $attribute_local_name == RDF_ABOUT_EACH_PREFIX ) { - $error = 'aboutEachPrefix has been removed from the RDF specifications'; - $this->_report_error($error); - } else if( $attribute_local_name == RDF_BAG_ID) { - $bag_id = $attribute_value; - } else if( $attribute_local_name == RDF_DATATYPE) { - $datatype = $attribute_value; - } else if( $this->_is_rdf_property_attribute( $attribute_local_name )) { - $this->rdf_parser['top']['has_property_attributes'] = true; - } else if( $this->_is_rdf_ordinal( $attribute_local_name )) { - $this->rdf_parser['top']['has_property_attributes'] = true; - $this->rdf_parser['top']['has_member_attributes'] = true; - } else { - $this->rdf_parser['top']['has_property_attributes'] = true; - $msg = 'unknown or out of context rdf attribute: '.$attribute_local_name; - - if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - } - else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) - { - if( $attribute_local_name == XML_LANG ) - { - $this->rdf_parser['top']['xml_lang'] = $attribute_value; - } - elseif ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - } - - // if no subjects were found, generate one. - if( $subjects_found == 0 ) - { - $this->_generate_anonymous_uri( $id_buffer ); - $this->rdf_parser['top']['subject']=$id_buffer; - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - } - else if( $subjects_found > 1 ) - { - $this->_report_error('ID, about and nodeID are mutually exclusive'); - } - else if( $id ) - { - $this->_resolve_id( $id, $id_buffer ); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI; - $this->rdf_parser['top']['subject']=$id_buffer; - } - else if( $about ) - { - $this->_resolve_uri_reference( $this->rdf_get_base(), substr($about,1), $id_buffer ); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI; - $this->rdf_parser['top']['subject']=$id_buffer; - } - else if( $node_id ) - { - $this->is_valid_id($node_id); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - $this->rdf_parser['top']['subject']=$node_id; - } - - // if the subject is empty, assign it the document uri - if( $this->rdf_parser['top']['subject'] == '' ) - { - $this->rdf_parser['top']['subject']=$this->rdf_get_base(); - } - - if( $bag_id ) - { - $this->_resolve_id( $bag_id, $id_buffer ); - $this->rdf_parser['top']['bag_id']=$id_buffer; - } - - // only report the type for non-rdf:Description elements. - if( ($local_name != RDF_DESCRIPTION ) - || ( $namespace_uri != RDF_NAMESPACE_URI ) ) - { - $type=$namespace_uri; - $type.=$local_name; - - $this->_report_statement( - $this->rdf_parser['top']['subject_type'], - $this->rdf_parser['top']['subject'], - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $type, - '', - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'], - '', - $datatype); - - } - - // if this element is the child of some property, - // report the appropriate statement. - if( $parent ) - { - if ($this->rdf_parser['top']['subject_type'] == RDF_SUBJECT_TYPE_BNODE) - $objtype = RDF_OBJECT_TYPE_BNODE; - else - $objtype = RDF_OBJECT_TYPE_RESOURCE; - - $this->_report_statement( - $parent['parent']['subject_type'], - $parent['parent']['subject'], - $parent['predicate'], - $parent['ordinal'], - $objtype, - $this->rdf_parser['top']['subject'], - '', - $parent['parent']['bag_id'], - $parent['parent']['statements'], - $parent['statement_id'], - $parent['datatype']); - - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_handle_property_attributes( - $this->rdf_parser['top']['subject_type'], - $this->rdf_parser['top']['subject'], - $attributes, - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'] ); - } -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_property_element( &$namespace_uri, &$local_name, &$attributes ) -{ - $buffer=''; - - $i=0; - - $aux=$attributes; - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value = ''; - - $resource = NULL; - $statement_id = ''; - $bag_id = ''; - $parse_type = ''; - $node_id = ''; - $datatype = ''; - - $this->rdf_parser['top']['ordinal'] = 0; - - if( $namespace_uri == RDF_NAMESPACE_URI ) - { - if( ! $this->_is_rdf_property_element( $local_name ) ) - { - $msg = 'unknown or out of context rdf property element: '.$local_name; - - if ($this->_is_forbidden_rdf_property_element($local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - - } - - $buffer=$namespace_uri; - - if( ( $namespace_uri == RDF_NAMESPACE_URI ) - && ( $local_name == RDF_LI ) ) - { - $this->rdf_parser['top']['parent']['members']++; - $this->rdf_parser['top']['ordinal'] = $this->rdf_parser['top']['parent']['members']; - - $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal']; - - $buffer.='_'.$this->rdf_parser['top']['ordinal']; - - } - else - { - $buffer.=$local_name; - } - - $this->rdf_parser['top']['predicate']=$buffer; - - $this->rdf_parser['top']['has_property_attributes'] = false; - $this->rdf_parser['top']['has_member_attributes'] = false; - - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[$i], - $buffer, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[$i + 1]; - - // if the attribute is not in any namespace - // or the attribute is in the RDF namespace - if( ( $attribute_namespace_uri == '' ) - || ( $attribute_namespace_uri == RDF_NAMESPACE_URI ) ) - { - if( ( $attribute_local_name == RDF_ID ) ) - { - $statement_id = $attribute_value; - } - else if( $attribute_local_name == RDF_PARSE_TYPE ) - { - $parse_type = $attribute_value; - } - else if( $attribute_local_name == RDF_RESOURCE ) - { - $resource = $attribute_value; - } - else if( $attribute_local_name == RDF_NODEID ) - { - $node_id = $attribute_value; - } - else if( $attribute_local_name == RDF_BAG_ID ) - { - $bag_id = $attribute_value; - } - else if( $attribute_local_name == RDF_DATATYPE ) - { - $datatype = $attribute_value; - $this->rdf_parser['top']['datatype'] = $attribute_value; - } - else if( $this->_is_rdf_property_attribute( $attribute_local_name ) ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - else - { - $this->_report_warning('unknown rdf attribute: '.$attribute_local_name ); - return; - } - } - else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) - { - if( $attribute_local_name == XML_LANG ) - { - $this->rdf_parser['top']['xml_lang'] = $attribute_value; - } - elseif ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - } - - if( $statement_id ) - { - $this->_resolve_id($statement_id, $buffer ); - $this->rdf_parser['top']['statement_id']=$buffer; - } - - if ($node_id) - { - $this->is_valid_id($node_id); - - if ($resource) - { - $this->_report_error('nodeID and resource are mutually exclusive'); - } - if ($statement_id) - { - // reify statement - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_BNODE, - $node_id, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - ''); - $statement_id = ''; - } - else - { - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_BNODE, - $node_id, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - '', - $datatype ); - } - - $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; - } - - if( $parse_type ) - { - if( $resource ) { - $this->_report_error('property elements with rdf:parseType do not allow rdf:resource' ); - } - - if( $bag_id ) { - $this->_report_warning('property elements with rdf:parseType do not allow rdf:bagID' ); - return; - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_report_error('property elements with rdf:parseType do not allow property attributes'); - return; - } - - if( $attribute_value == RDF_PARSE_TYPE_RESOURCE ) - { - $this->_generate_anonymous_uri( $buffer ); - // since we are sure that this is now a resource property we can report it - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_BNODE, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->_push_element( ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_RESOURCE; - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - $this->rdf_parser['top']['subject']=$buffer; - $this->rdf_parser['top']['bag_id']=''; - $this->rdf_parser['top']['datatype']= $datatype; - - } - elseif ( $attribute_value == RDF_PARSE_TYPE_LITERAL ) - { - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL; - $this->rdf_parser['top']['datatype']= RDF_NAMESPACE_URI .RDF_XMLLITERAL; - $this->rdf_parser['xml_literal']['buffer'] = ''; - $this->rdf_parser['xml_literal']['depth'] = 0; - } - elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION) - { - $this->_generate_anonymous_uri( $buffer ); - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_BNODE, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_COLLECTION; - $this->rdf_parser['top']['collection']['first_blank_node_id'] = $buffer; - } - - else - { - - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_XML, - '', - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL; - } - } - else if( $resource !== NULL || $bag_id || $this->rdf_parser['top']['has_property_attributes'] ) - { - if( $resource !== NULL ) - { - $subject_type = RDF_SUBJECT_TYPE_URI; - $this->_resolve_uri_reference( $this->rdf_get_base(), $resource, $buffer ); - $object_type=RDF_OBJECT_TYPE_RESOURCE; - } - else - { - $subject_type = RDF_SUBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri( $buffer ); - $object_type=RDF_OBJECT_TYPE_BNODE; - } - $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; - - // since we are sure that this is now a resource property we can report it. - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - $object_type, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); // should we allow IDs? - - if( $bag_id ) - { - $this->_resolve_id( $bag_id, $buffer ); - $this->rdf_parser['top']['bag_id']=$buffer; - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_handle_property_attributes( - $subject_type, - $buffer, - $attributes, - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'] ); - } - } -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_collection_element(&$namespace_uri, &$local_name, &$attributes) -{ - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; -/* collection construction site -// old: - if ( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') - && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ) - { - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) - { - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) - { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; - } - elseif ( $attribute_local_name == RDF_NODEID ) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; - } - $this->rdf_parser['top']['parent']['collection']['object_label'][] = $attribute_value; - } - } - } -*/ -// new - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) - { - $tmp_subject_type = RDF_SUBJECT_TYPE_URI; - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) - { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; - } - elseif ( $attribute_local_name == RDF_NODEID ) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; - $tmp_subject_type = RDF_SUBJECT_TYPE_BNODE; - } - $id_buffer = ''; - $this->_resolve_uri_reference( $this->rdf_get_base(), $attribute_value, $id_buffer ); - $this->rdf_parser['top']['parent']['collection']['object_label'][] = $id_buffer; - - if (!( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') - && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )) - { - $this->_report_statement( - $tmp_subject_type, - $id_buffer, - RDF_NAMESPACE_URI.RDF_TYPE, - '', - RDF_OBJECT_TYPE_RESOURCE, - $namespace_uri.$local_name, - '', - '', - '', - '', - ''); - } - } - } - - -// collection construction site -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_xml_start_element(&$namespace_uri, &$local_name, &$attributes) -{ - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - - $element = '<' .$this->_join_name_and_declare_prefix($namespace_uri, $local_name); - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - $element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri, $attribute_local_name); - $element .= '=\"' .$attribute_value .'\"'; - } - $element .= '>'; - - $this->rdf_parser['xml_literal']['buffer'] .= $element; -} - -/** - * @param string $name - * @access private -*/ -function _handle_xml_end_element($name) -{ - $buffer=''; - $namespace_uri=''; - $local_name=''; - - $this->_split_name( - $name, - $buffer, - $namespace_uri, - $local_name ); - - $element = 'rdf_parser['default_namespace']) - &&$namespace_uri != $this->rdf_parser['default_namespace']) - { - $element .= $this->rdf_parser['namespaces'][$namespace_uri] .':'; - } - - $element .= $local_name .'>'; - - $this->rdf_parser['xml_literal']['buffer'] .= $element; - $depth = $this->rdf_parser['xml_literal']['depth']--; - - if (isset($this->rdf_parser['xml_literal']['declared_ns'])) - foreach ($this->rdf_parser['xml_literal']['declared_ns'] as $prefix => $_depth) - { - if ($depth == $_depth) - unset($this->rdf_parser['xml_literal']['declared_ns'][$prefix]); - } -} - -/** - * @param string $namespace_uri - * @param string $local_name - * @access private -*/ -function _join_name_and_declare_prefix($namespace_uri, $local_name) { - - $name = ''; - - if ($namespace_uri) - { - if (isset($this->rdf_parser['default_namespace']) - && $namespace_uri == $this->rdf_parser['default_namespace']) - { - $name .= $local_name; - - if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_']) - && $namespace_uri != XML_NAMESPACE_URI) - { - $name .= ' xmlns=' . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'] - = $this->rdf_parser['xml_literal']['depth']; - } - } - else - { - $ns_prefix = $this->rdf_parser['namespaces'][$namespace_uri]; - $name .= $ns_prefix .':' .$local_name; - - if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix]) - && $namespace_uri != XML_NAMESPACE_URI) - { - $name .= " xmlns:$ns_prefix=" . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix] - = $this->rdf_parser['xml_literal']['depth']; - } - } - - } - else - $name .= $local_name; - - return $name; - -} - -/** - * @access private -*/ -function _end_collection() { - - if (isset($this->rdf_parser['top']['collection'])) - { - - $subject = $this->rdf_parser['top']['collection']['first_blank_node_id']; - - for ($i=0; isset($this->rdf_parser['top']['collection']['object_label'][$i]); $i++) - { - - $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, - $subject, - RDF_NAMESPACE_URI.RDF_FIRST, - '', - $this->rdf_parser['top']['collection']['object_type'][$i], - $this->rdf_parser['top']['collection']['object_label'][$i], - '', - '', - '', - '', - ''); - - if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1])) - { - $obj_type_2 = RDF_OBJECT_TYPE_RESOURCE; - $object_2 = RDF_NAMESPACE_URI.RDF_NIL; - } - else - { - $obj_type_2= RDF_OBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri($object_2); - } - - - $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, - $subject, - RDF_NAMESPACE_URI.RDF_REST, - '', - $obj_type_2, - $object_2, - '', - '', - '', - '', - ''); - - $subject = $object_2; - } - } -} - -/** - * @param string $parser - * @param string $name - * @param string $attributes - * @access private -*/ -function _start_element_handler($parser, $name, $attributes ) -{ - $buffer=''; - - $namespace_uri=''; - $local_name=''; - - $this->_push_element(); - - - $this->_split_name( - $name, - $buffer, - $namespace_uri, - $local_name ); - - switch( $this->rdf_parser['top']['state'] ) - { - case IN_TOP_LEVEL: - // set base_uri, if possible - foreach ($attributes as $key => $value) { - if($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR . 'base') { - $this->rdf_parser['base_uri'] = $value; - $this->rdf_parser['document_base_uri'] = $value; - - $c = substr($value, strlen($value)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $this->rdf_parser['normalized_base_uri'] = $value . '#'; - else - $this->rdf_parser['normalized_base_uri'] = $value; - - } - elseif ($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR .'lang') - $this->rdf_parser['document_xml_lang'] = $value; -echo ""; - } - - - if( RDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name ) - { - $this->rdf_parser['top']['state'] = IN_RDF; - - break; - } - case IN_RDF: - $this->rdf_parser['top']['state'] = IN_DESCRIPTION; - $this->_handle_resource_element( $namespace_uri, $local_name, $attributes, '' ); - break; - case IN_DESCRIPTION: - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - $this->rdf_parser['top']['state'] = IN_PROPERTY_UNKNOWN_OBJECT; - $this->_handle_property_element( $namespace_uri, $local_name, $attributes ); - break; - case IN_PROPERTY_PARSE_TYPE_COLLECTION: - $this->_handle_collection_element($namespace_uri, $local_name, $attributes); - break; - case IN_PROPERTY_UNKNOWN_OBJECT: - /* if we're in a property with an unknown object type and we encounter - an element, the object must be a resource, */ - $this->rdf_parser['top']['data']=''; - $this->rdf_parser['top']['parent']['state'] = IN_PROPERTY_RESOURCE; - $this->rdf_parser['top']['state'] = IN_DESCRIPTION; - $this->_handle_resource_element( - $namespace_uri, - $local_name, - $attributes, - $this->rdf_parser['top']['parent'] ); - break; - case IN_PROPERTY_LITERAL: - $this->_report_warning( 'no markup allowed in literals' ); - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: - $this->rdf_parser['top']['state'] = IN_XML; - /* fall through */ - case IN_XML: - $this->rdf_parser['xml_literal']['depth']++; - $this->_handle_xml_start_element($namespace_uri, $local_name, $attributes); - break; - case IN_PROPERTY_RESOURCE: - $this->_report_warning( - 'only one element allowed inside a property element' ); - break; - case IN_PROPERTY_EMPTY_RESOURCE: - $this->_report_warning( - 'no content allowed in property with rdf:resource, rdf:bagID, or property attributes' ); - break; - case IN_UNKNOWN: - break; - } -} - -/** - property elements with text only as content set the state to - IN_PROPERTY_LITERAL. as character data is received from expat, - it is saved in a buffer and reported when the end tag is - received. - * @access private -*/ -function _end_literal_property() -{ - if(!isset($this->rdf_parser['top']['statement_id'])) { - $this->rdf_parser['top']['statement_id']=''; - } - if(!isset($this->rdf_parser['top']['parent']['subject_type'])) { - $this->rdf_parser['top']['parent']['subject_type']=''; - } - if(!isset($this->rdf_parser['top']['parent']['subject'])) { - $this->rdf_parser['top']['parent']['subject']=''; - } - if(!isset($this->rdf_parser['top']['parent']['bag_id'])) { - $this->rdf_parser['top']['parent']['bag_id']=''; - } - if(!isset($this->rdf_parser['top']['parent']['statements'])) { - $this->rdf_parser['top']['parent']['statements']=0; - } - if(!isset($this->rdf_parser['top']['predicate'])) { - $this->rdf_parser['top']['predicate']=''; - } - if(!isset($this->rdf_parser['top']['datatype'])) { - $this->rdf_parser['top']['datatype']=''; - } - if(!isset($this->rdf_parser['top']['ordinal'])) { - $this->rdf_parser['top']['ordinal']=0; - } - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_LITERAL, - $this->rdf_parser['top']['data'], - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $this->rdf_parser['top']['datatype']); - -} - -/** - * @param string $parser - * @param string $name - * @access private -*/ -function _end_element_handler( $parser, $name ) -{ - switch( $this->rdf_parser['top']['state'] ) - { - case IN_TOP_LEVEL: - break; - case IN_XML: - $this->_handle_xml_end_element($name); - break; - case IN_PROPERTY_UNKNOWN_OBJECT: - case IN_PROPERTY_LITERAL: - $this->_end_literal_property( ); - break; - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - $this->_pop_element( ); - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: -// $search = array((0) => chr(10), (1) => chr(13), (2) => chr(9)); -// $replace = array((0) => '\n' , (1) => '\r' , (2) => '\t'); -// $this->rdf_parser["xml_literal"]["buffer"] -// = str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]); - - $this->rdf_parser['top']['data'] = $this->rdf_parser['xml_literal']['buffer']; - $this->_end_literal_property(); - $this->rdf_parser['xml_literal']['buffer'] = ''; - - break; - case IN_PROPERTY_PARSE_TYPE_COLLECTION: - $this->_end_collection(); - break; - case IN_RDF: - case IN_DESCRIPTION: - case IN_PROPERTY_RESOURCE: - case IN_PROPERTY_EMPTY_RESOURCE: - case IN_UNKNOWN: - break; - } - - $this->_pop_element(); -} - -/** - * @param string $parser - * @param string $s - * @access private -*/ -function _character_data_handler( $parser,$s) -{ - $len=strlen($s); - switch( $this->rdf_parser['top']['state'] ) - { - case IN_PROPERTY_LITERAL: - case IN_PROPERTY_UNKNOWN_OBJECT: - if( isset($this->rdf_parser['top']['data']) ) - { - $n = strlen( $this->rdf_parser['top']['data'] ); - $this->rdf_parser['top']['data'].= $s; - - } - else - { - $this->rdf_parser['top']['data']=$s; - } - - if( $this->rdf_parser['top']['state'] == IN_PROPERTY_UNKNOWN_OBJECT ) - { - /* look for non-whitespace */ - for( $i = 0; (( $i < $len ) && ( ereg(" |\n|\t",$s{ $i }) )); $i++ ); - /* if we found non-whitespace, this is a literal */ - if( $i < $len ) - { - $this->rdf_parser['top']['state'] = IN_PROPERTY_LITERAL; - } - } - - break; - case IN_TOP_LEVEL: - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: - case IN_XML: - $this->rdf_parser['xml_literal']['buffer'] .= $s; - break; - case IN_RDF: - case IN_DESCRIPTION: - case IN_PROPERTY_RESOURCE: - case IN_PROPERTY_EMPTY_RESOURCE: - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - case IN_UNKNOWN: - break; - } -} - - - /** - * Adds a new statement to the model - * This method is called by generateModel(). - * - * @access private - * @param string &$user_data - * @param string $subject_type - * @param string $subject - * @param string $predicate - * @param string $ordinal - * @param string $object_type - * @param string $object - * @param string $xml_lang ) - * @return object MemModel - */ -function add_statement_to_model( - &$user_data, - $subject_type, - $subject, - $predicate, - $ordinal, - $object_type, - $object, - $xml_lang, - $datatype ) -{ - - // ParseUnicode - if(UNIC_RDF){ - $subject=$this->str2unicode_nfc($subject); - $predicate=$this->str2unicode_nfc($predicate); - $object=$this->str2unicode_nfc($object); - } - - //create subject - if ($subject_type == RDF_SUBJECT_TYPE_BNODE) - $objsub = new BlankNode($subject); - else - $objsub = new Resource($subject); - - // create predicate - $objpred = new Resource($predicate); - - // create object - if (($object_type == RDF_OBJECT_TYPE_RESOURCE) || ($object_type == RDF_OBJECT_TYPE_BNODE)) { - if ($object_type == RDF_OBJECT_TYPE_BNODE) - $objobj = new BlankNode($object); - else - $objobj = new Resource($object); - } else { - - $objobj = new Literal($object); - if ($datatype != '') { - $objobj->setDatatype($datatype); - } - elseif ($xml_lang !='') { - $objobj->setLanguage($xml_lang); - } - } - - // create statement - $statement = new Statement($objsub, $objpred, $objobj); - - // add statement to model - if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){ - $this->model->addWithoutDuplicates($statement); - }else - $this->model->add($statement); - } - - -/* public functions */ - - /** - * Generates a new MemModel from a URI, a file or from memory. - * If you want to parse an RDF document, pass the URI or location in the filesystem - * of the RDF document. You can also pass RDF code direct to the function. If you pass - * RDF code directly to the parser and there is no xml:base included, you should set - * the base URI manually using the optional second parameter $rdfBaseURI. - * Make sure that here are proper namespace declarations in your input document. - * - * @access public - * @param string $base - * @param boolean $rdfBaseURI - * @return object MemModel - */ -function & generateModel($base,$rdfBaseURI = false, $model = false) { - - // Check if $base is a URI or filename or a string containing RDF code. - if (substr(ltrim($base),0 ,1) != '<') { - - // $base is URL or filename - $this->model = $model?$model:new MemModel($base); - - $input = fopen($base,'r') or die("RDF Parser: Could not open File: $base. Stopped parsing."); - $this->rdf_parser_create( NULL ); - $this->rdf_set_base($base); - $done=false; - while(!$done) - { - $buf = fread( $input, 512 ); - $done = feof($input); - - if ( ! $this->rdf_parse( $buf, feof($input) ) ) - { - $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); - $line = xml_get_current_line_number($this->rdf_get_xml_parser() ); - $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; - trigger_error($errmsg, E_USER_ERROR); - } - } - /* close file. */ - fclose( $input ); - - } else { - // $base is RDF string - $this->model = $model?$model:new MemModel($base); - - $this->rdf_parser_create( NULL ); - - if ($rdfBaseURI!==false) - { - $this->rdf_set_base($rdfBaseURI); - } else - { - $this->rdf_set_base( NULL ); - } - - if ( ! $this->rdf_parse( $base, TRUE ) ) - { - $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); - $line = xml_get_current_line_number($this->rdf_get_xml_parser() ); - $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; - trigger_error($errmsg, E_USER_ERROR); - } - } - // base_uri could have changed while parsing - $this->model->setBaseURI($this->rdf_parser['base_uri']); - - if(isset($this->rdf_parser['namespaces'])){ - $this->model->addParsedNamespaces($this->rdf_parser['namespaces']); - } - - $this->rdf_parser_free(); - - return $this->model; - -} - -/** - * @param string $encoding - - * @access private -*/ -function rdf_parser_create( $encoding ) -{ - - $parser = xml_parser_create_ns( $encoding, NAMESPACE_SEPARATOR_CHAR ); - - xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); - $this->rdf_parser['xml_parser'] = $parser; - - xml_set_object($this->rdf_parser['xml_parser'], $this); - xml_set_element_handler( $this->rdf_parser['xml_parser'], '_start_element_handler', '_end_element_handler' ); - xml_set_character_data_handler( $this->rdf_parser['xml_parser'], '_character_data_handler' ); - xml_set_start_namespace_decl_handler($this->rdf_parser['xml_parser'], '_start_ns_declaration_handler'); - - return $this->rdf_parser; -} - -/** - * @param resource &$parser - * @param string $ns_prefix - * @param string $ns_uri - * @access private -*/ -function _start_ns_declaration_handler(&$parser, $ns_prefix, $ns_uri) -{ - if (!$ns_prefix) - $this->rdf_parser['default_namespace'] = $ns_uri; - else - $this->rdf_parser['namespaces'][$ns_uri] = $ns_prefix; -} - - -/** - * @access private -*/ -function rdf_parser_free( ) -{ - $z=3; - - $this->rdf_parser['base_uri']=''; - $this->rdf_parser['document_base_uri'] = ''; - - unset( $this->rdf_parser ); -} - -/** - * @param string $s - * @param string $is_final - * @access private -*/ -function rdf_parse( $s, $is_final ) -{ - return XML_Parse( $this->rdf_parser['xml_parser'], $s, $is_final ); -} - -/** - * @access private -*/ -function rdf_get_xml_parser() -{ - return ( $this->rdf_parser['xml_parser']); -} - -/** - * @param string $base - * @access private -*/ -function rdf_set_base($base ) -{ - - $this->rdf_parser['base_uri']=$base; - - $c = substr($base, strlen($base)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $this->rdf_parser['normalized_base_uri'] = $base . '#'; - else - $this->rdf_parser['normalized_base_uri'] = $base; - - return 0; -} - -/** - * @access private -*/ -function rdf_get_base() -{ - if ($this->rdf_parser['top']['element_base_uri']) - return $this->rdf_parser['top']['element_base_uri']; - else - return $this->rdf_parser['base_uri']; -} - - -} // end: rdf_parser - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfSerializer.php.svn-base deleted file mode 100755 index 45333d9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RdfSerializer.php.svn-base +++ /dev/null @@ -1,719 +0,0 @@ -, Boris Motik , Daniel Westphal , Leandro Mariano Lopez -* -* @package syntax -* @access public -* -*/ -class RdfSerializer extends Object { - - // configuration - var $use_entities; - var $use_attributes; - var $sort_model; - var $rdf_qnames; - var $use_xml_declaration; - - // properties - var $m_defaultNamespaces = array(); - var $m_namespaces = array(); - var $m_nextAutomaticPrefixIndex; - var $m_out; - var $m_baseURI; - var $m_statements = array(); - var $m_currentSubject; - var $m_rdfIDElementText; - var $m_rdfAboutElementText; - var $m_rdfResourceElementText; - var $m_groupTypeStatement; - var $m_attributeStatements = array(); - var $m_contentStatements = array(); - var $rdf_qname_prefix; - - /** - * Constructor - * - * @access public - */ - function RdfSerializer() { - - // default serializer configuration - $this->use_entities = SER_USE_ENTITIES; - $this->use_attributes = SER_USE_ATTRIBUTES; - $this->sort_model = SER_SORT_MODEL; - $this->rdf_qnames = SER_RDF_QNAMES; - $this->use_xml_declaration = SER_XML_DECLARATION; - - global $default_prefixes; - foreach($default_prefixes as $key => $value){ - $this->addNamespacePrefix($key,$value); - } - - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - } - - /** - * Serializer congiguration: Sort Model - * Flag if the serializer should sort the model by subject before serializing. - * TRUE makes the RDF code more compact. - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configSortModel($bool) { - $this->sort_model = $bool; - } - - /** - * Serializer congiguration: Use Entities - * Flag if the serializer should use entities for URIs. - * TRUE makes the RDF code more compact. - * FALSE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseEntities($bool) { - $this->use_entities = $bool; - } - - /** - * Serializer congiguration: Use Attributes - * Flag if the serializer should serialize triples as XML attributes where possible. - * TRUE makes the RDF code more compact. - * FALSE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseAttributes($bool) { - $this->use_attributes = $bool; - } - - /** - * Serializer congiguration: Use Qnames - * Flag if the serializer should use qualified names for RDF reserved words. - * TRUE makes the RDF code more compact. - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseQnames($bool) { - $this->rdf_qnames = $bool; - } - - /** - * Serializer congiguration: Use XML Declaration - * Flag if the serializer should start documents with the xml declaration - * . - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseXmlDeclaration($bool) { - $this->use_xml_declaration = $bool; - } - - - /** - * Adds a new prefix/namespace combination. - * - * @param String $prefix - * @param String $namespace - * @access public - */ - function addNamespacePrefix($prefix, $namespace) { - $this->m_defaultNamespaces[$prefix] = $namespace; - } - - /** - * Serializes a model to RDF syntax. - * RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean), - * config_sort_model($boolean). - * NOTE: There is only one default namespace allowed within an XML document. - * Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass - * another $xml_default_namespace as parameter, the model will be serialized - * as if SER_RDF_QNAMES were set to TRUE. - * - * @param object MemModel $model - * @param String $encoding - * @return string - * @access public - */ - function & serialize(&$model, $xml_default_namespace = NULL, $encoding = DEFAULT_ENCODING) { - - if ($xml_default_namespace) { - - if ($xml_default_namespace == RDF_NAMESPACE_URI) { - $this->rdf_qnames = FALSE; - unset($this->m_defaultNamespaces[RDF_NAMESPACE_PREFIX]); - } - elseif ($xml_default_namespace == RDF_SCHEMA_URI) { - unset($this->m_defaultNamespaces[RDF_SCHEMA_PREFIX]); - } - elseif (!SER_RDF_QNAMES) - $this->rdf_qnames = TRUE; - - $this->addNamespacePrefix(NULL, $xml_default_namespace); - } - - //copy parsed namespaces - $nsps = array(); - $nsps = $model->getParsedNamespaces(); - foreach($this->m_defaultNamespaces as $prefix => $namespace){ - if(!isset ($nsps[$namespace])) - $nsps[$namespace] = $prefix; - } - - // define rdf prefix (qname or not) - if ($this->rdf_qnames){ - if(isset($nsps[RDF_NAMESPACE_URI])){ - $this->rdf_qname_prefix = $nsps[RDF_NAMESPACE_URI].':'; - }else{ - $this->rdf_qname_prefix = RDF_NAMESPACE_PREFIX . ':'; - } - - }else{ - $this->rdf_qname_prefix = ''; - } - // check if model is empty - if ($model->size() == 0) return "<". $this->rdf_qname_prefix . RDF_RDF ." xmlns:rdf='".RDF_NAMESPACE_URI."' />"; - - foreach($nsps as $ns => $pre){ - $this->m_namespaces[$pre] = $ns; - } - - - // set base URI - if ($model->getBaseURI()==NULL) - $this->m_baseURI="opaque:uri"; - else - $this->m_baseURI=$model->getBaseURI(); - - - if ($this->sort_model) { - // sort the array of statements - - foreach($model->triples as $key => $statement) { - $stmkey = $statement->subj->getURI() . - $statement->pred->getURI() . - (is_a($statement->obj,'Literal')?'"'.$statement->obj->getLabel().'"@'.$statement->obj->getLanguage().'^^'.$statement->obj->getDatatype():$statement->obj->getURI()); - $this->m_statements[$stmkey] = $statement; - } - ksort($this->m_statements); - - /* - // Sort using the PHP usort() function. Slower :-( - $this->m_statements = $model->triples; - usort($this->m_statements, "statementsorter"); - */ - } else { - $this->m_statements = $model->triples; - } - // collects namespaces - $this->m_nextAutomaticPrefixIndex=0; - $this->collectNamespaces($model); - - // start writing the contents - $this->m_out=""; - if ($this->use_xml_declaration) - $this->m_out .= '' . LINEFEED; - if (!HIDE_ADVERTISE) - $this->m_out.="".LINEFEED.LINEFEED ; - - // write entitie declarations - if($this->use_entities) { - $this->m_out .= 'rdf_qname_prefix . - RDF_RDF.' [' . LINEFEED; - $this->writeEntityDeclarations(); - $this->m_out .= LINEFEED . ']>' . LINEFEED; - } - - // start the RDF text - $this->m_out .= '<' . $this->rdf_qname_prefix . RDF_RDF; - - // write the xml:base - if ($model->getBaseURI() != NULL) - $this->m_out .= LINEFEED. INDENTATION .'xml:base="'.$model->getBaseURI().'"'; - - // write namespaces declarations - $this->writeNamespaceDeclarations(); - $this->m_out .='>'. LINEFEED; - - // write triples - $this->writeDescriptions(); - - $this->m_out .= LINEFEED; - $this->m_out .='rdf_qname_prefix . RDF_RDF .'>'; - - $this->m_namespaces=null; - $this->m_statements=null; - $this->m_currentSubject=null; - $this->m_groupTypeStatement=null; - $this->m_attributeStatements=null; - $this->m_contentStatements=null; - $this->m_rdfResourceElementText=null; - - return $this->m_out; - } - - /** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @param object MemModel $model - * @param String $encoding - * @return boolean - * @access public - */ - function saveAs(&$model, $filename, $encoding = DEFAULT_ENCODING) { - // serialize model - $RDF = $this->serialize($model, NULL, $encoding); - - //write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $RDF); - fclose($file_handle); - return TRUE; - } else { - return FALSE; - }; - } - - /** - * @access private - */ - function writeEntityDeclarations() { - foreach($this->m_namespaces as $prefix => $namespace) { - $this->m_out .= INDENTATION . '".LINEFEED; - } - } - - /** - * @access private - */ - function writeNamespaceDeclarations() { - foreach($this->m_namespaces as $prefix => $namespace) { - - if ($prefix == RDF_NAMESPACE_PREFIX && !$this->rdf_qnames) { - - if($this->use_entities) { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX . - '="&' . $prefix . ';"'; - } else { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX . - '="' . $namespace . '"'; - } - } else { - if ($prefix == NULL) - $colon_prefix = $prefix; - else - $colon_prefix = ":" .$prefix; - - if($this->use_entities) { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX - .$colon_prefix .'="&' . $prefix . ';"'; - } else { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX - .$colon_prefix .'="' . $namespace . '"'; - } - } - } - } - - /** - * @access private - */ - function writeDescriptions() { - - $this->m_groupTypeStatement = NULL; - $this->m_attributeStatements = array(); - $this->m_contentStatements = array(); - $this->m_currentSubject = NULL; - - foreach($this->m_statements as $key => $statement) { - $subject = $statement->getSubject(); - $predicate = $statement->getPredicate(); - $object = $statement->getobject(); - - // write Group and update current subject if nessesary - if ($this->m_currentSubject==NULL || !$this->m_currentSubject->equals($subject)) { - $this->writeGroup(); - $this->m_currentSubject=$subject; - } - - // classify the statement - if (($predicate->getURI() == RDF_NAMESPACE_URI.RDF_TYPE) && is_a($object, 'Resource') && !$this->m_groupTypeStatement) { - $this->writeGroup(); - $this->m_groupTypeStatement = $statement; - } - elseif ($this->canAbbreviateValue($object) && - $this->use_attributes && - $this->checkForDoubleAttributes($predicate)) - { - if (is_a($object, 'Literal')) { - if ($object->getDatatype() == NULL) { - $this->m_attributeStatements[] = $statement; - } else { - $this->m_contentStatements[] = $statement; - } - } else { - $this->m_attributeStatements[] = $statement; - } - } else { - $this->m_contentStatements[] = $statement; - } - } - $this->writeGroup(); - } - - /** - * @access private - */ - function writeGroup() { - if ($this->m_currentSubject==NULL || ($this->m_groupTypeStatement==NULL && (count($this->m_attributeStatements)==0) && (count($this->m_contentStatements)==0))) - return; - if ($this->m_groupTypeStatement!=NULL) - $outerElementName=$this->getElementText($this->m_groupTypeStatement->obj->getURI()); - else - $outerElementName = $this->rdf_qname_prefix . RDF_DESCRIPTION; - $this->m_out .= LINEFEED . '<'; - $this->m_out .= $outerElementName; - - $this->m_out .= ' '; - - - $this->writeSubjectURI($this->m_currentSubject); - - // attribute Statements - if ($this->use_attributes) - $this->writeAttributeStatements(); - - if (count($this->m_contentStatements)==0) - $this->m_out .= '/>' . LINEFEED; - else { - $this->m_out .= '>' . LINEFEED; - - // content statements - $this->writeContentStatements(); - - $this->m_out .= 'm_out .= $outerElementName; - $this->m_out .= '>'. LINEFEED; - } - $this->m_groupTypeStatement = NULL; - $this->m_attributeStatements = array(); - $this->m_contentStatements = array(); - } - - /** - * @param object Node $predicate - * @access private - */ - function checkForDoubleAttributes($predicate) { - foreach($this->m_attributeStatements as $key => $statement) { - if ($statement->pred->equals($predicate)) - return FALSE; - } - return TRUE; - } - - /** - * @param STRING $uri - * @access private - */ - function relativizeURI($uri) { - $uri_namespace = RDFUtil::guessNamespace($uri); - if ($uri_namespace == $this->m_baseURI) { - return RDFUtil::guessName($uri); - } else { - return $uri; - } - } - - /** - * @param object Node $subject_node - * - * @access private - */ - - function writeSubjectURI($subject_node) { - $currentSubjectURI = $subject_node->getURI(); - $relativizedURI = $this->relativizeURI($currentSubjectURI); - - // if submitted subject ist a blank node, use rdf:nodeID - if (is_a($this->m_currentSubject, 'BlankNode')) { - $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID; - $this->m_out .= '="'; - $this->m_out .= $relativizedURI; - } else { - - - if (!($relativizedURI == $currentSubjectURI)) { - $this->m_out .= $this->rdf_qname_prefix . RDF_ID; - $this->m_out .= '="'; - $this->m_out .= $relativizedURI; - } else { - $this->m_out .= $this->rdf_qname_prefix . RDF_ABOUT; - $this->m_out .= '="'; - $this->writeAbsoluteResourceReference($relativizedURI); - }; - }; - $this->m_out .= '"'; - } - - /** - * @access private - */ - function writeAttributeStatements() { - foreach($this->m_attributeStatements as $key => $statement) { - $this->m_out .= LINEFEED; - $this->m_out .= INDENTATION; - $this->m_out .= $this->getElementText($statement->pred->getURI()); - $this->m_out .= '='; - $value=$statement->obj->getLabel(); - $quote=$this->getValueQuoteType($value); - $this->m_out .= $quote; - $this->m_out .= $value; - $this->m_out .= $quote; - } - } - - /** - * @access private - */ - function writeContentStatements() { - foreach($this->m_contentStatements as $key => $statement) { - $this->m_out .= INDENTATION; - $this->m_out .= '<'; - $predicateElementText=$this->getElementText($statement->pred->getURI()); - $this->m_out .= $predicateElementText; - - if (is_a($statement->obj, 'Resource')) { - $this->writeResourceReference($statement->obj); - $this->m_out .= '/>' . LINEFEED; - } else { - if(is_a($statement->obj, 'Literal')) { - if ($statement->obj->getDatatype()!= NULL) - if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) { - $this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_PARSE_TYPE . '="' . RDF_PARSE_TYPE_LITERAL . '"'; - } else { - $this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_DATATYPE . '="' . $statement->obj->getDatatype() . '"'; - } - if ($statement->obj->getLanguage()!= NULL) - $this->m_out .= ' ' . XML_NAMESPACE_PREFIX . ':' . XML_LANG . '="' . $statement->obj->getLanguage() . '"'; - }; - $this->m_out .= '>'; - if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) { - $this->m_out .= $statement->obj->getLabel(); - } else { - $this->writeTextValue($statement->obj->getLabel()); - } - $this->m_out .= 'm_out .= $predicateElementText; - $this->m_out .= '>' . LINEFEED; - } - } - } - - /** - * @param Object $object_node - * @access private - */ - function writeResourceReference($object_node) { - $rebaseURI = $object_node->getURI(); - $this->m_out .= ' '; - if (is_a($object_node, 'BlankNode')) { - $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID; - } else { - $this->m_out .= $this->rdf_qname_prefix . RDF_RESOURCE; - }; - - $this->m_out .= '="'; - $relativizedURI = $this->relativizeURI($rebaseURI); - if (!($relativizedURI == $rebaseURI)) - if (!is_a($object_node, 'BlankNode')) - $this->m_out .= '#' . $relativizedURI; - else - $this->m_out .= $relativizedURI; - else - $this->writeAbsoluteResourceReference($rebaseURI); - $this->m_out .= '"'; - } - - - /** - * @param String $rebaseURI - * @access private - */ - function writeAbsoluteResourceReference($rebaseURI) { - $namespace=RDFUtil::guessNamespace($rebaseURI); - $localName=RDFUtil::guessName($rebaseURI); - $text=$rebaseURI; - if ($namespace!='' and $this->use_entities) { - $prefix= array_search($namespace, $this->m_namespaces); - $text='&'.$prefix.';'.$localName; - } else $text = RDFUtil::escapeValue($text); - $this->m_out .= $text; - } - - /** - * @param STRING $textValue - * @access private - */ - function writeTextValue($textValue) { - if ($this->getValueQuoteType($textValue)==USE_CDATA) - $this->writeEscapedCDATA($textValue); - else - $this->m_out .= $textValue; - } - - /** - * @param STRING $textValue - * @access private - */ - function writeEscapedCDATA($textValue) { - $this->m_out .= ''; - } - - /** - * @param STRING $textValue - * @access private - */ - function getValueQuoteType($textValue) { - $quote=USE_ANY_QUOTE; - $hasBreaks=FALSE; - $whiteSpaceOnly=TRUE; - for ($i=0; $i' || $c=='&') - return USE_CDATA; - if ($c==LINEFEED) - $hasBreaks=TRUE; - if ($c=='"' || $c=="\'") { - if ($quote==USE_ANY_QUOTE) - $quote=($c=='"') ? "\'" : "\""; - elseif ($c==$quote) - return USE_CDATA; - } - if (!($c == ' ')) - $whiteSpaceOnly = FALSE; - } - if ($whiteSpaceOnly || $hasBreaks) - return USE_CDATA; - return $quote==USE_ANY_QUOTE ? '"' : $quote; - } - - /** - * @param object Node $node - * @access private - */ - function canAbbreviateValue($node) { - if (is_a($node, 'Literal')) { - $value= $node->getLabel(); - if (strlen($value)getValueQuoteType($value); - return $c=='"' || $c=='\''; - } - } - return FALSE; - } - - /** - * @param STRING $elementName - * @access private - */ - function getElementText($elementName) { - $namespace=RDFUtil::guessNamespace($elementName); - $localName=RDFUtil::guessName($elementName); - if ($namespace=="") - return $localName; - $prefix=array_search($namespace, $this->m_namespaces); - - if ($prefix===FALSE) { - $errmsg = RDFAPI_ERROR . "(class: Serializer; method: getElementText): Prefix for element '" . $elementName . "' cannot be found."; - trigger_error($errmsg, E_USER_ERROR); - } - switch ($prefix) { - case RDF_NAMESPACE_PREFIX: - return $this->rdf_qname_prefix . $localName; - case NULL: - return $localName; - default: - return $prefix. ":" .$localName; - } - } - - /** - * @param object MemModel $model - * @access private - */ - function collectNamespaces($model) { - foreach($model->triples as $key => $value) { - - if ($this->use_entities) { - $this->collectNamespace($value->getSubject()); - if(!is_a($value->getObject(), 'Literal')) - $this->collectNamespace($value->getObject()); - - } else { - - if ($value->pred->getURI() == RDF_NAMESPACE_URI.RDF_TYPE) - $this->collectNamespace($value->getObject()); - elseif - (($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBCLASSOF) || - ($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBPROPERTYOF)) { - $this->collectNamespace($value->getSubject()); - $this->collectNamespace($value->getObject()); - } - } - - $this->collectNamespace($value->getPredicate()); - - } - } - - /** - * @param object Resource $resource - * @access private - */ - function collectNamespace($resource) { - - $namespace=RDFUtil::getNamespace($resource); - if (!in_array($namespace, $this->m_namespaces)&&$namespace!='') { - $prefix = array_search( $namespace, $this->m_defaultNamespaces); - if ($prefix===FALSE) - $prefix=$this->getNextNamespacePrefix(); - $this->m_namespaces[$prefix] = $namespace; - } - } - - /** - * @access private - */ - function getNextNamespacePrefix() { - $this->m_nextAutomaticPrefixIndex++; - return GENERAL_PREFIX_BASE . $this->m_nextAutomaticPrefixIndex; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RssParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RssParser.php.svn-base deleted file mode 100755 index bae1f2da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/RssParser.php.svn-base +++ /dev/null @@ -1,245 +0,0 @@ -. MagpieRSS is - * compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions). - * Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/) - * - * - * - * @author Tobias Gau - * @version $Id$ - * @package syntax - * @access public - **/ - -class RssParser extends Object { - var $type; - - /** - * Main function - * - * @param $url location of the document - * @return parsed model - */ - function generateModel($url){ - $rss = null; - if(substr($url,0,7)=="http://"){ - $rss = fetch_rss($url); - }else{ - $string = file_get_contents($url); - $rss = new MagpieRSS($string); - } - - $model = ModelFactory::getMemModel(); - $bn = new Resource($url); - - $this->type = $rss->feed_type; - $version = $rss->feed_version; - - $nmsp = null; - if($version == "1.0") - $nmsp = "http://purl.org/rss/1.0/"; - if($version == "0.91") - $nmsp = "http://my.netscape.com/publish/formats/rss-spec-0.91.html#"; - if($version == "2.0") - $nmsp = "http://purl.org/rss/1.0/"; - if($this->type == "Atom") - $nmsp = "http://www.w3.org/2005/Atom"; - - if($this->type == "Atom") - $this->channel($model,$rss,$bn,$nmsp,"feed"); - else - $this->channel($model,$rss,$bn,$nmsp,"channel"); - $this->image($model,$rss,$bn,$nmsp); - $this->items($model,$rss,$bn,$nmsp); - $model->addNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"); - if($nmsp!= null) - $model->addNamespace($this->type,$nmsp); - return $model; - } - - /** - * Parses the image if there is one. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $bnOrg the node which represents the channel - * @param $nmsp the - */ - function image(&$model,&$rss,&$bnOrg,&$nmsp){ - if(count($rss->image)>0){ - if(isset($rss->image['about'])){ - $bn = new Resource($rss->image['about']); - }else if(isset($rss->image['url'])){ - $bn = new Resource($rss->image['url']); - }else{ - $bn = new BlankNode("image"); - } - $model->add(new Statement($bnOrg,new Resource($nmsp."image"),$bn)); - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource($nmsp."image"))); - } - foreach($rss->image as $key => $value){ - $statement = null; - switch($key){ - case "dc": - $this->dc($bn,$model,$value); - break; - case "sy": - $this->sy($bn,$model,$value); - break; - default : - $statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } - - } - - /** - * Parses the rss items/ atom entries. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $bnOrg the node which represents the channel - * @param $nmsp the - */ - function items(&$model,&$rss,&$bnOrg,&$nmsp){ - $items = new BlankNode("items"); - $model->add(new Statement($bnOrg,new Resource($nmsp."items"),$items)); - $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"))); - $i = 1; - foreach($rss->items as $outerKey => $outerValue){ - if(isset($outerValue['about'])){ - $bn = new Resource($outerValue['about']); - }else if(isset($outerValue['guid'])){ - $bn = new Resource($outerValue['guid']); - }else if(isset($outerValue['id'])){ - $bn = new Resource($outerValue['id']); - }else{ - $bn = new Blanknode("item".$i); - } - $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#_".$i),$bn)); - if($this->type == "Atom"){ - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/2005/Atomentry"))); - }else{ - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://purl.org/rss/1.0/item"))); - } - foreach($outerValue as $key => $value){ - $statement = null; - switch($key){ - case "about": - break; - case "guid": - break; - case "dc": - $this->dc($bn,$model,$value); - break; - case "sy": - $this->sy($bn,$model,$value); - break; - default : - if($value != null) - $statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } - $i++; - } - - } - - /** - * Adds the dc namespace. - * - * @param $node the node - * @param $model the model - * @param $dc Array which contains the dc objects - */ - function dc(&$node,&$model,&$dc){ - $model->addNamespace("dc","http://purl.org/dc/elements/1.1/"); - foreach($dc as $key => $value){ - $statement = null; - $statement = new Statement($node,new Resource("http://purl.org/dc/elements/1.1/".$key), new Literal($value)); - if($statement != null){ - $model->add($statement); - } - } - } - - /** - * Adds the sy namespace. - * - * @param $node the node - * @param $model the model - * @param $sy Array which contains the sy objects - */ - function sy(&$node,&$model,&$sy){ - $model->addNamespace("sy","http://purl.org/rss/1.0/modules/syndication/"); - foreach($sy as $key => $value){ - $statement = null; - $statement = new Statement($node,new Resource("http://purl.org/rss/1.0/modules/syndication/".$key), new Literal($value)); - if($statement != null){ - $model->add($statement); - } - } - - } - - - /** - * Parses the rss channel/ atom feed. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $node the node which represents the channel - * @param $nmsp the - */ - function channel(&$model,&$rss,&$node,&$nmsp,$type){ - // Channel - $statement = new Statement($node,new Resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), new Resource($nmsp.$type)); - $model->add($statement); - - foreach($rss->channel as $key => $value){ - $statement = null; - switch($key){ - case "dc": - $this->dc($node,$model,$value); - break; - case "sy": - $this->sy($node,$model,$value); - break; - case "items": - break; - case "tagline": - break; - case "items_seq": - break; - default : - $statement = new Statement($node,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } -} - - - -} //end: RssParser - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SparqlResultParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SparqlResultParser.php.svn-base deleted file mode 100755 index 0b1c1e69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SparqlResultParser.php.svn-base +++ /dev/null @@ -1,164 +0,0 @@ - -* -* @package sparql -*/ - -class SparqlResultParser extends Object { - - - var $arrOutput = array(); - var $resParser; - var $strXmlData; - var $counter = -1; - var $mode = -1; - var $varname; - var $dtype; - var $lang; - var $varlist; - var $bncounter = 0; - var $current_literal; - - -/** -* Main function of SparqlResultParser -* -* @param String $strInputXML input document. -*/ - function parse($strInputXML) { - - $this->resParser = xml_parser_create (); - - xml_set_object($this->resParser,$this); - xml_set_element_handler($this->resParser, "tagOpen", "tagClosed"); - - xml_set_character_data_handler($this->resParser, "tagData"); - - $this->strXmlData = xml_parse($this->resParser,$strInputXML ); - if(!$this->strXmlData) { - echo "unable to parse result
    ". - "server returned:
    " - .$strInputXML; - - return "false"; - - } - - xml_parser_free($this->resParser); - - return $this->arrOutput; - } - -// private parser functions from here // - function tagOpen($parser, $name, $attrs) { - // $tag=array("name"=>$name,"attrs"=>$attrs); - // array_push($this->arrOutput,$tag); - if(strtolower($name)=="variable"){ - if(isset($attrs['name'])) - $this->varlist[]=$attrs['name']; - if(isset($attrs['NAME'])) - $this->varlist[]=$attrs['NAME']; - } - - if(strtolower($name)=="result"){ - $this->counter++; - if($this->counter > -1){ - foreach($this->varlist as $value){ - if(!isset($this->arrOutput[$this->counter][$value])) - $this->arrOutput[$this->counter]["?".$value]=''; - } - } - - } - if(strtolower($name)=="boolean"){ - $this->counter++; - $this->mode = 3; - } - if(strtolower($name)=="binding"){ - $this->varname = null; - $this->dtype = null; - $this->lang = null; - - if(isset($attrs['name'])){ - $this->varname = "?".$attrs['name']; - }else{ - $this->varname = "?".$attrs['NAME']; - } - } - if(strtolower($name)=="uri"){ - $this->mode = 0; - } - if(strtolower($name)=="literal"){ - $this->mode = 1; - $this->current_literal = ""; - if(isset($attrs['datatype'])){ - $this->dtype = $attrs['datatype']; - }else if(isset($attrs['DATATYPE'])){ - $this->dtype = $attrs['DATATYPE']; - } - if(isset($attrs['xml:lang'])){ - $this->lang = $attrs['datatype']; - }else if(isset($attrs['XML:lang'])){ - $this->lang = $attrs['XML:lang']; - }else if(isset($attrs['XML:LANG'])){ - $this->lang = $attrs['XML:LANG']; - }else if(isset($attrs['xml:LANG'])){ - $this->lang = $attrs['xml:LANG']; - } - } - if(strtolower($name)=="bnode"){ - $this->mode = 2; - } - } - - function tagData($parser, $tagData) { - switch($this->mode){ - case 0 : - $this->arrOutput[$this->counter][$this->varname] = new Resource($tagData); - $this->mode = -1; - break; - case 1: - $this->current_literal .= $tagData; - break; - case 2: - if($tagData=="/"){ - $bn = "bNode".$this->bncounter; - $this->bncounter++; - }else{ - $bn = $tagData; - } - $this->arrOutput[$this->counter][$this->varname] = new BlankNode($bn); - $this->mode = -1; - break; - case 3: - $this->arrOutput = $tagData; - $this->mode = -1; - break; - - } - - } - - function tagClosed($parser, $name) { - if ($this->mode == 1) { - $lit = new Literal($this->current_literal); - if($this->lang) - $lit->setLanguage($this->lang); - if($this->dtype) - $lit->setDatatype($this->dtype); - $this->arrOutput[$this->counter][$this->varname] = $lit ; - $this->mode = -1; - } - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxGRDDL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxGRDDL.php.svn-base deleted file mode 100755 index eef9cea9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxGRDDL.php.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/GRDDLParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxJSON.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxJSON.php.svn-base deleted file mode 100755 index 02550074..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxJSON.php.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxN3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxN3.php.svn-base deleted file mode 100755 index 77f119f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxN3.php.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Parser.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Serializer.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRDF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRDF.php.svn-base deleted file mode 100755 index dc77a60f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRDF.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfParser.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfSerializer.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRSS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRSS.php.svn-base deleted file mode 100755 index 6b557391..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxRSS.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_fetch.inc' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_parse.inc' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RssParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxSparqlRes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxSparqlRes.php.svn-base deleted file mode 100755 index 16fb6e60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/SyntaxSparqlRes.php.svn-base +++ /dev/null @@ -1,15 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/SparqlResultParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXParser.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXParser.php.svn-base deleted file mode 100755 index e22b3582..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXParser.php.svn-base +++ /dev/null @@ -1,135 +0,0 @@ - V5) -* Currently, it doesn't support any namespaces and has problems with typed literals. -* So this parser only works with TRIX documents where the default namespace is the TRIX namespace. -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* @package dataset -* @access public -**/ -class TriXParser -{ - /** - * Reference to the graphSet - * - * @var GraphSet - * @access private - */ - var $graphSet; - - /** - * Constructor - * Needs a reference to a graphSet - * - * @param GraphSet - * @access public - */ - function TriXParser(&$graphSet) - { - $this->graphSet=&$graphSet; - } - - /** - * Parse an XML string - * - * @param string - * @access public - */ - function parseString($string) - { - $this->_populateGraphSet(simplexml_load_string($string)); - } - - /** - * Parse from a file - * - * @param string - * @access public - */ - function parseFile($pathToFile) - { - $this->_populateGraphSet(simplexml_load_file($pathToFile)); - } - - /** - * Populates the graphSet with namedGraphs and triples. - * - * @param object simpleXMLModel $xmlModel - * @access private - */ - function _populateGraphSet(&$xmlModel) - { - $defaultGraphOccurred=false; - - foreach ($xmlModel->graph as $graph) - { - if (isset($graph->uri)) - { - $graphName=(string)$graph->uri; - $namedGraph=& $this->graphSet->getNamedGraph($graphName); - if ($namedGraph ==null) - $namedGraph=& $this->graphSet->createGraph($graphName); - } else - { - if ($defaultGraphOccurred) - trigger_error('Only one unnamed Graph per file allowed', E_USER_ERROR); - - $namedGraph=& $this->graphSet->getDefaultGraph(); - $defaultGraphOccurred=true; - } - - foreach ($graph->triple as $triple) - { - $tripleCount=0; - $tripleArray=array(); - foreach ($triple->children() as $tag => $value) - { - $tripleArray[$tripleCount++]=$this->_element2Resource((string)$tag,$value); - }; - $namedGraph->add(new Statement($tripleArray[0],$tripleArray[1],$tripleArray[2])); - }; - }; - } - - /** - * return a mathing resource tyoe - * - * @param string - * @param object simpleXMLNode $value - * @access private - */ - function _element2Resource($tag,$value) - { - switch ($tag) - { - case 'uri': - return new Resource((string)$value); - break; - - case 'id': - return new BlankNode((string)$value); - break; - - case 'typedLiteral': - $literal=new Literal((string)$value); - $literal->setDatatype((string)$value['datatype']); - return $literal; - break; - - case 'plainLiteral': - $literal=new Literal((string)$value); - if(isset($value['xml:lang'])) - $literal->setLanguage((string)$value['xml:lang']); - return $literal; - break; - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXSerializer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXSerializer.php.svn-base deleted file mode 100755 index 7bb5de77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/.svn/text-base/TriXSerializer.php.svn-base +++ /dev/null @@ -1,151 +0,0 @@ -graphSet=&$graphSet; - } - - /** - * Serialize the dataset to a TriX string - * - * @return string - * @access public - */ - function & serializeToString() - { - return $this->_serialize(); - } - - /** - * Serialize the dataset to a TriX string and save in file - * - * @param string - * @access public - */ - function serializeToFile($fileName) - { - $serializedString=&$this->_serialize(); - $handle = fopen($fileName, 'w'); - fwrite($handle, $serializedString); - fclose($handle); - } - - - /** - * Serialize the dataset to a TriX string - * - * @return string - * @access private - */ - function & _serialize() - { - //Trix header - $serializedString= - ''. - ''; - - //serialize defaultGraph if it is not empty - $defaultGraph=& $this->graphSet->getDefaultGraph(); - if ($defaultGraph->isEmpty()===false) - { - $serializedString.=''; - for($iterator = $this->graphSet->findInDefaultGraph(null,null,null); $iterator->valid(); $iterator->next()) - { - $serializedString.=''; - - $statement=$iterator->current(); - - $serializedString.=$this->_node2string($statement->getSubject()); - $serializedString.=$this->_node2string($statement->getPredicate()); - $serializedString.=$this->_node2string($statement->getObject()); - - $serializedString.=''; - }; - $serializedString.=''; - } - - //serialize namedGraphs - foreach ($this->graphSet->listGraphNames() as $graphName) - { - $serializedString.=''; - $serializedString.=''.$graphName.''; - for($iterator = $this->graphSet->findInNamedGraphs(new Resource($graphName),null,null,null); $iterator->valid(); $iterator->next()) - { - $serializedString.=''; - - $statement=$iterator->current(); - - $serializedString.=$this->_node2string($statement->getSubject()); - $serializedString.=$this->_node2string($statement->getPredicate()); - $serializedString.=$this->_node2string($statement->getObject()); - - $serializedString.=''; - }; - $serializedString.=''; - }; - //TriX footer - $serializedString.=''; - return $serializedString; - } - - /** - * Serialize node to a TriX string - * - * @param Node - * @return string - * @access private - */ - function _node2string($node) - { - switch ($node) - { - case (is_a($node,'BlankNode')): - return (''.$node->getLabel().''); - - case (is_a($node,'Resource')): - return (''.$node->getLabel().''); - - case (is_a($node,'Literal')): - - if ($node->dtype!=null) - return (''.$node->getLabel().''); - - if ($node->lang!=null) - return (''.$node->getLabel().''); - - return (''.htmlentities($node->getLabel()).''); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/GRDDLParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/GRDDLParser.php deleted file mode 100755 index 7a490dd7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/GRDDLParser.php +++ /dev/null @@ -1,120 +0,0 @@ -, - * - * @package syntax - * @access public - * - */ -class GRDDLParser extends Object{ - - - /** - * Document link - * - * - * @var String - * @access private - */ - var $doclink; - - - /** - * Stylesheet link - * - * - * @var String[] - * @access private - */ - var $stylelinks; - - - /** - * DomDocument - * - * @var DomDocument - * @access private - */ - var $domdoc; - - - /** - * generates a MemModel and creates the DomDocument. - * - * @param String $doc - * @access public - * @return MemModel $model - */ - function generateModel($doc){ - $model = new MemModel(); - $this->doclink=$doc; - $this->domdoc = new DomDocument; - $this->domdoc->load($doc); - $this->_getStyles(); - $model = $this->_generateRDF(); - return $model; - } - - - /** - * gets the used xsl stylesheets. - * - * @access private - */ - function _getStyles(){ - $link=$this->domdoc->getElementsByTagName('link'); - $i=0; - while($link->item($i)!=''){ - $item = $link->item($i); - if($item->getAttributeNode('rel')->value=='transformation'){ - $temp = $item->getAttributeNode('href')->value; - if(substr($temp,0,1)=='/'){ - $pos = strrpos($this->doclink,'/'); - $part = substr($this->doclink,0,$pos); - $this->stylelink[]=$part.$temp; - }else{ - $this->stylelink[]=$temp; - } - } - $i++; - } - } - - /* - * uses the PHP build in xslt processor to - * generate the RDF statements and uses the - * RDF- Parser to generate the model - * - * @access private - * @return MemModel $model - */ - function _generateRDF(){ - $model=new MemModel(); - $model->setBaseURI($this->doclink); - $proc = new xsltprocessor; - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $pars=new RdfParser(); - foreach($this->stylelink as $key => $value){ - $xsl = new DomDocument; - $xsl->load($value); - $proc->importStyleSheet($xsl); - $model->addModel($pars->generateModel($proc->transformToXML($this->domdoc),$this->doclink)); - } - return $model; - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonParser.php deleted file mode 100755 index 33fa9f40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonParser.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @version $Id: JsonParser.php 555 2007-12-11 20:27:34Z p_frischmuth $ - */ -class JsonParser extends Object { - - /** - * This method takes a json encoded rdf-model and a reference to aa (usually empty) MemModel, parses the json - * string and adds the statements to the given MemModel. - * - * @param string $jsonString The string that contains the rdf model, encoded as a json-string. - * @param MemModel $model A reference to the model, where to add the statements, usually an empty MemModel. - */ - public function generateModelFromString($jsonString, $model) { - - $jsonModel = array(); - $jsonModel = json_decode($jsonString, true); - - // throws an excpetion if json model was corrupt - if (!is_array($jsonModel)) { - throw new Exception('error in json string'); - } - - foreach ($jsonModel as $subject=>$remain) { - foreach ($remain as $predicate=>$object) { - $s = (strpos($subject, '_') === 0) ? new BlankNode(substr($subject, 2)) : new Resource($subject); - $p = new Resource($predicate); - - foreach ($object as $obj) { - if ($obj['type'] === 'uri') { - $o = new Resource($obj['value']); - } else if ($obj['type'] === 'bnode') { - $o = new BlankNode(substr($obj['value'], 2)); - } else { - $dtype = (isset($obj['datatype'])) ? $obj['datatype'] : ''; - $lang = (isset($obj['lang'])) ? $obj['lang'] : ''; - - $oVal = $obj['value']; - - $o = new Literal($oVal, $lang); - $o->setDatatype($dtype); - } - - $model->add(new Statement($s, $p, $o)); - } - } - } - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonSerializer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonSerializer.php deleted file mode 100755 index 30aa5b31..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/JsonSerializer.php +++ /dev/null @@ -1,163 +0,0 @@ - - * @version $Id: JsonSerializer.php 555 2007-12-11 20:27:34Z p_frischmuth $ - */ -class JsonSerializer extends Object { - - /** - * This method takes a MemModel object ad parameter and serializes all contained triples to rdf/json format. - * - * @see http://n2.talis.com/wiki/RDF_JSON_Specification#rdf.2Fjson - * @param MemModel $model - * @return string Returns a string containing the serialized model. - */ - public function serialize(MemModel $model) { - - // create the root json object (root object) - $jsonString = '{'; - $subjects = array(); - - // sort triples by subject - foreach ($model->triples as $triple) { - $subjects[$triple->toStringSubject()][] = $triple; - } - - // sort alphabetically - ksort($subjects); - - // triples are sorted by subject now, each key is a subject uri, containing all triples with this subject uri - $i = 0; - foreach ($subjects as $predicatesArray) { - $predicates = array(); - - if ($i > 0) { - $jsonString .= ','; - } - $i++; - - $subj = $predicatesArray[0]->getSubject(); - - // add special _: sequence for blank node only - if ($subj instanceof BlankNode) { - $jsonString .= '"_:' . $this->_escapeValue($subj->getLabel()) . '":'; - } else { - $jsonString .= '"' . $this->_escapeValue($subj->getLabel()) . '":'; - } - - - - // create a json object for each subject (subject object) - $jsonString .= '{'; - - // sort triples with current subject by predicate - foreach ($predicatesArray as $triple) { - $predicates[$triple->toStringPredicate()][] = $triple; - } - - // sort alphabetically - ksort($predicates); - - $j = 0; - foreach ($predicates as $valueArray) { - - if ($j > 0) { - $jsonString .= ','; - } - $j++; - - $jsonString .= '"' . $this->_escapeValue($valueArray[0]->getLabelPredicate()) . '":'; - - // create a json array (value array) - $jsonString .= '['; - - $k = 0; - foreach ($valueArray as $triple) { - if ($k > 0) { - $jsonString .= ','; - } - $k++; - - // create json value object (value object) - $jsonString .= '{'; - - $obj = $triple->getObject(); - - // add special _: sequence for blank nodes only - if ($obj instanceof BlankNode) { - $jsonString .= '"value":"_:' . $this->_escapeValue($obj->getLabel()) . '",'; - } else if ($obj instanceof Literal) { - $jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",'; - } else { - $jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",'; - } - - // add type of object - if ($obj instanceof Literal) { - $jsonString .= '"type":"literal"'; - } else if ($obj instanceof BlankNode) { - $jsonString .= '"type":"bnode"'; - } else { - $jsonString .= '"type":"uri"'; - } - - if ($obj instanceof Literal) { - if ($obj->getLanguage() != '') { - $jsonString .= ',"lang":"' . $this->_escapeValue($obj->getLanguage()) . '"'; - } - if ($obj->getDatatype() != '') { - $jsonString .= ',"datatype":"' . $this->_escapeValue($obj->getDatatype()) . '"'; - } - - } - - // close value object - $jsonString .= '}'; - } - - // close the value array - $jsonString .= ']'; - } - - // close the json object (for the subject) (subject object) - $jsonString .= '}'; - } - - // close root json object (root object) - $jsonString .= '}'; - - return $jsonString; - } - - /* - * Escapes the following chars as specified at json.org: - * - * " -> \" - * \ -> \\ - * / -> \/ - * \b -> \\b - * \f -> \\f - * \n -> \\n - * \r -> \\r - * \t -> \\t - * \uXXXX -> \\uXXXX - */ - protected function _escapeValue($value) { - - - $value = str_replace("\\", '\\\\', $value); - #$value = str_replace("/", '\/', $value); - $value = str_replace("\n", '\\n', $value); - $value = str_replace("\t", '\\t', $value); - $value = str_replace("\r", '\\r', $value); - $value = str_replace("\b", '\\b', $value); - $value = str_replace("\f", '\\f', $value); - $value = str_replace('"', '\"', $value); - - return $value; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Parser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Parser.php deleted file mode 100755 index 13fd3064..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Parser.php +++ /dev/null @@ -1,1137 +0,0 @@ - - *
  • Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')
  • - *
  • @prefix mappings
  • - *
  • = maps to owl#sameAs
  • - *
  • a maps to rdf-syntax-ns#type
  • - *
  • Using [ ] for blank nodes, or _: if necessary
  • - *
  • Literal datatype- and xmlLanguageTag support
  • - * - * - * Un-supported N3 Features include: - *
      - *
    • Reification
    • - *
    - * - * - * @author Gunnar AA. Grimnes - * @author Daniel Westphal - * @author Christian Weiske - * @version $Id: N3Serializer.php 556 2008-01-22 10:52:48Z fusel2k $ - * @package syntax - * @access public - **/ - -define('MAGIC_STRING', '~~~'); - -class N3Serializer extends Object -{ - - var $debug = false; - - var $prefixes = array(); - var $noPrefixes = array(); - - var $done; // keeps track of already serialized resources - var $resourcetext; - var $resourcetext_taken; - var $model; - var $res; - var $anon; - - var $styleCompress = false; - var $stylePretty = false; - var $styleNest = false; - - /** - * Constructor - * - * @access public - */ - function N3Serializer() - { - $this->debug = false; - } - - - /** - * Adds a new namespace prefix to use. - * Unknown namespaces will become ns0, ns1 etc. - * @access public - * @param string $s - * @returns void - **/ - function addNSPrefix($ns, $prefix) - { - $this->prefixes[$ns] = $prefix; - } - - - - /** - * Clears all previously set namespace prefixes - */ - function clearNSPrefixes() - { - $this->prefixes = array(); - } - - - - /** - * Add a namespace that shall not get shortened by using a prefix. - * - * @param string $ns Namespace URI like "http://example.com/" - */ - function addNoNSPrefix($ns) - { - $this->noPrefixes[$ns] = true; - } - - - - /** - * Clears all previously set noNamespace prefixes - */ - function clearNoNSPrefixes() - { - $this->noPrefixes = array(); - } - - - - /** - * Serializes a model to N3 syntax. - * - * @param object Model $model - * @return string - * @access public - */ - function &serialize(&$m) - { - if (is_a($m, 'DbModel')) { - $m=$m->getMemModel(); - } - - $this->reset(); - $this->model = $m; - $this->res = ""; - - // copy default namespaces - global $default_prefixes; - foreach($default_prefixes as $prefix => $namespace) { - $this->addNSPrefix($namespace,$prefix); - } - - $nps= $this->model->getParsedNamespaces(); - if ($nps!=false) { - foreach ($nps as $uri => $prefix){ - $this->addNSPrefix($uri,$prefix); - } - } - - $namespaces = array(); - $count = array(); - $resources = array(); - foreach ($this->model->triples as $t) { - $s = $t->getSubject(); - if (is_a($s, 'Resource')) { - $namespaces[$s->getNamespace()] = 1; - } - $p = $t->getPredicate(); - if (is_a($p, 'Resource')) { - $namespaces[$p->getNamespace()] = 1; - } - $o = $t->getObject(); - if (is_a($o, 'Resource')) { - $namespaces[$o->getNamespace()] = 1; - } - $uri = $s->getURI(); - - if (isset($count[$uri])) { - $count[$uri]++; - } else { - $count[$uri] = 0; - $resources[$uri] = $s; - } - - if ($this->styleNest && is_a($s, 'BlankNode')) { - //make sure blank nodes are sorted *after* normal nodes - //so that they can be included - $count[$uri] -= 0.00001; - } - } - - if (!HIDE_ADVERTISE) { - $this->res .= '# Generated by N3Serializer.php from RDF RAP.'.LINEFEED - .'# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html' - .LINEFEED.LINEFEED; - } - - $this->doNamespaces($namespaces); - - $this->res .= LINEFEED.LINEFEED; - - arsort($count); - - foreach ( $count as $k => $v) { - $this->doResource($resources[$k]); - // $this->res.=" .\n"; - } - - //make all replacements - do { - $bReplacements = false; - foreach ($this->resourcetext as $r => $t) { - if (preg_match_all('/'.MAGIC_STRING.'([^ ]+)'.MAGIC_STRING.'/', $t, $ms, PREG_SET_ORDER)) { - foreach ($ms as $mseach) { - $rp = $this->resourcetext[$mseach[1]]; - $this->resourcetext[$r] = preg_replace('/'.MAGIC_STRING.$mseach[1].MAGIC_STRING.'/', $rp, $t); - $bReplacements = true; - } - } - - } - } while ($bReplacements); - - //after all replacements took place, put the lines out - $c = 0; - foreach ($this->resourcetext as $r => $t) { - if ($this->debug) { - $this->res .= $c . ': '; - } - if (!(isset($this->resourcetext_taken[$r]) && $this->resourcetext_taken[$r]>0)) { - $this->res .= $t . ' .' . LINEFEED; - if ($this->stylePretty) { - $this->res .= LINEFEED; - } - } else if ($this->debug ) { - $this->res.=' Skipping : '.$t.LINEFEED; - } - $c++; - } - - // $max=-1111; - // $maxkey=""; - // foreach ($count as $k=>$c) { - // if ( $c>$max) { $maxkey=$k; $max=$c; } - // } - - // if ($this->debug) { - // print "$maxkey is subject of most triples! ($max) \n"; - // } - - return $this->res; - }//function &serialize(&$m) - - - - /** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @param object MemModel $model - * @param string $filename - * @return boolean - * @access public - */ - function saveAs(&$model, $filename) - { - // serialize model - $n3 = $this->serialize($model); - - // write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $n3); - fclose($file_handle); - return true; - } else { - return false; - }; - } - - - - /** - * Set to true, if the N3 serializer should try to compress the blank node - * syntax using [] whereever possible. - */ - function setCompress($compress) - { - $this->styleCompress = $compress; - } - - - - /** - * Enables pretty printing in semicolon delimited sentences. - */ - function setPrettyPrint($prettyPrint) - { - $this->stylePretty = $prettyPrint; - } - - - - /** - * Enables nesting of blank nodes with [] if - * compression is activated via @see setCompress - */ - function setNest($nest) - { - $this->styleNest = $nest; - } - - /* ==================== Private Methods from here ==================== */ - - - /** - * Readies this object for serializing another model - * @access private - * @param void - * @returns void - **/ - function reset() - { - $this->anon = 0; - $this->done = array(); - $this->resourcetext_taken = array(); - $this->resourcetext = array(); - $this->res = ''; - $this->model = null; - } - - - - /** - * Makes ns0, ns1 etc. prefixes for unknown prefixes. - * Outputs @prefix lines. - * @access private - * @param array $n - * @returns void - **/ - function doNamespaces(&$n) - { - $c = 0; - foreach ($n as $ns => $nonsense) { - if (!$ns || isset($this->noPrefixes[$ns])) { - continue; - } - if (isset($this->prefixes[$ns])) { - $p = $this->prefixes[$ns]; - } else { - $p = 'ns' . $c; - $this->prefixes[$ns] = $p; - $c++; - } - $this->res .= "@prefix $p: <".$ns.'> .'.LINEFEED; - } - } - - - - /** - * Fill in $resourcetext for a single resource. - * Will recurse into Objects of triples, but should never look ? (really?) - * @param object Resource $r - * @returns boolean - * @access private - **/ - function doResource(&$r, $bEmbedded = false, $strIndent = ' ') - { - //var_dump($r->getURI()); - - $ts = $this->model->find($r, null, null); - if (count($ts->triples) == 0) { - if ($bEmbedded) { - $this->resourcetext[$r->getURI()] = '_:' . $r->getLabel(); - } - return; - } - - $out = ''; - - if (isset($this->done[$r->getURI()]) && $this->done[$r->getURI()]) { - if (!$this->styleNest && is_a($r, 'BlankNode')) { - if ($this->resourcetext_taken[$r->getURI()] == 1) { - //Oh bother, we must use the _:blah construct. - $a = $this->resourcetext[$r->getURI()]; - $this->resourcetext[$r->getURI()]='_:anon'.$this->anon; - $this->resourcetext['_:anon'.$this->anon]=$this->fixAnon($a, '_:anon'.$this->anon); - $this->resourcetext_taken[$r->getURI()]=2; - $this->anon++; - } - } - return false; - } - - $this->done[$r->getURI()] = true; - $compress = false; - - if (is_a($r, 'Resource')) { - if (is_a($r, 'BlankNode')) { - //test if this blanknode is referenced somewhere - $rbn = $this->model->find(null, null, $r); - $compress = (N3SER_BNODE_SHORT || $this->styleCompress) - && ( - count($rbn->triples) == 0 - || (count($rbn->triples) == 1 && $bEmbedded) - ); - if ($compress) { - $out.='['; - } else { - $out.='_:'.$r->getLabel(); - } - } else { - $this->doURI($r, $out); - } - } - - usort($ts->triples, 'statementsorter'); - $lastp = ''; - $out .= ' '; - - foreach ($ts->triples as $t) { - $p = $t->getPredicate(); - - if ($p === $lastp) { - $out .= ' , '; - } else { - if ($lastp!='') { - if ($this->stylePretty) { - $out .= ";\n" . $strIndent; - } else { - $out .= ' ; '; - } - } - $this->doURI($p, $out); - $lastp = $p; - } - - $out .= ' '; - - $o = $t->getObject(); - - if (is_a($o, 'Literal')) { - $l = $o->getLabel(); - if (strpos($l, LINEFEED) === false) { - $long = false; - } else { - $long = true; - } - - //try to be intelligent - $quoteSingle = strpos($l, '\'') !== false; - $quoteDouble = strpos($l, '"') !== false; - if ($quoteSingle && !$quoteDouble) { - $quoteChar = $long ? '"""' : '"'; - } else if ($quoteDouble && !$quoteSingle) { - $quoteChar = $long ? '\'\'\'' : '\''; - } else if ($quoteDouble && $quoteSingle) { - //both quotation chars inside - $quoteChar = $long ? '"""' : '"'; - $l = addslashes($l); - } else { - //no quotation chars - $quoteChar = $long ? '"""' : '"'; - } - $out .= $quoteChar . $l . $quoteChar; - - if ( $o->getLanguage()!='' ) { - $out.='@'.$o->getLanguage(); - } - if ( $o->getDatatype()!='' ) { - $out.='^^<'.$o->getDatatype().'>'; - } - } - - if (is_a($o, 'Resource')) { - if ($this->debug) { - print 'Doing object: '.$o->getURI().LINEFEED; - } - if (is_a($o, 'BlankNode')) { - if ($this->styleNest && $this->styleCompress - && !isset($this->done[$o->getURI()]) - ) { - $this->doResource($o, true, $strIndent . ' '); - $out .= MAGIC_STRING . $o->getURI() . MAGIC_STRING; - //$out .= $this->resourcetext[$o->getURI()]; - $this->resourcetext_taken[$o->getURI()] = 1; - } else { - $out .= '_:'.$o->getLabel(); - } - } else { - $this->doURI($o, $out); - } - } - } - - if ($compress) { - $out .= ' ]'; - }; - - $this->resourcetext[$r->getURI()]=$out; - - return true; - }//function doResource(&$r) - - - - /** - * Format a single URI - * @param string $s - * @return void - * @access private - **/ - function doURI(&$r, &$out) - { - if ($r->getURI() == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') { - $out .= 'a'; - return; - } - $ns = $r->getNamespace(); - if ($ns != '' && !isset($this->noPrefixes[$ns])) { - $out .= $this->prefixes[$ns].':'.$r->getLocalName(); - } else { - //Will this ever happen? It does, now. - $out .= '<' . $r->getURI() . '>'; - } - } - - - - /** - * Fix the resourcetext for a blanknode where the _: construct was used - * @param string $s - * @param string $a - * @access private - * @return void - **/ - function fixAnon($t,$a) - { - $t = preg_replace("/( \] $|^\[ )/", '', $t); - return $a . $t; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/NTripleSerializer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/NTripleSerializer.php deleted file mode 100755 index 18c4f3e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/NTripleSerializer.php +++ /dev/null @@ -1,133 +0,0 @@ - - * @version $Id: NTripleSerializer.php 268 2006-05-15 05:28:09Z tgauss $ - * @package syntax - * @access public - **/ - - - -class NTripleSerializer extends Object { - - var $debug; - var $model; - var $res; - - - - - - /** - * Constructor - * - * @access public - */ - function NTripleSerializer() { - $this->debug=FALSE; - } - - /** - * Serializes a model to N Triple syntax. - * - * @param object Model $model - * @return string - * @access public - */ - function & serialize(&$m) { - - if (is_a($m, 'DbModel')) $m = $m->getMemModel(); - - $this->reset(); - if (!HIDE_ADVERTISE) { - $this->res .= '# Generated by NTripleSerializer.php from RDF RAP.' . - LINEFEED . '# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'. - LINEFEED . LINEFEED; - } - - foreach ($m->triples as $t) { - - $s=$t->getSubject(); - if (is_a($s, 'Blanknode')) { - $subject='_:'.$s->getURI(); - } else { - $subject = '<' . ereg_replace(' ', '', $s->getURI()) . '>'; - } - - $p=$t->getPredicate(); - $predicate='<'.ereg_replace(' ', '', $p->getURI()).'>'; - - $o=$t->getObject(); - if (is_a($o, 'literal')) { - $object='"'.$o->getLabel().'"'; - if ($o->getLanguage()!='') $object.='@'.$o->getLanguage(); - if ($o->getDatatype()!='') $object.='^^<'.$o->getDatatype().">"; - } elseif (is_a($o, 'Blanknode')) { - $object='_:'.$o->getURI(); - } else {$object='<'.ereg_replace(' ', '', $o->getURI()).'>';}; - - $this->res.=$subject.' '.$predicate.' '.$object.' .'; - $this->res.=LINEFEED.LINEFEED; - } - - return $this->res; - } - - -/** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @access public - * @param object MemModel $model - * @param string $filename - * @return boolean - * @access public - */ - function saveAs(&$model, $filename) { - - // serialize model - $n3 = $this->serialize($model); - - // write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $n3); - fclose($file_handle); - return TRUE; - }else{ - return FALSE; - }; - } - - - /* ==================== Private Methods from here ==================== */ - - -/** - * Readies this object for serializing another model - * @access private - * @param void - * @returns void - **/ - function reset() { - $this->res=""; - $this->model=NULL; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfParser.php deleted file mode 100755 index 41146bdd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfParser.php +++ /dev/null @@ -1,2365 +0,0 @@ -, - * Chris Bizer , - * Radoslaw Oldakowski - * Daniel Westphal - * @package syntax - * @access public - * - */ - -class RdfParser extends Object { - -var $rdf_parser; -var $model; - -/* Private Methods */ - - -/** -* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH). -* -* @param String $str -* @return String -* @access private -* -*/ -function str2unicode_nfc($str=""){ - $result=""; - /* try to detect encoding */ - $tmp=str_replace("?", "", $str); - if(strpos(utf8_decode($tmp), "?")===false){ - $str=utf8_decode($str); - } - for($i=0,$i_max=strlen($str);$i<$i_max;$i++){ - $nr=0;/* unicode dec nr */ - /* char */ - $char=$str[$i]; - /* utf8 binary */ - $utf8_char=utf8_encode($char); - $bytes=strlen($utf8_char); - if($bytes==1){ - /* 0####### (0-127) */ - $nr=ord($utf8_char); - } - elseif($bytes==2){ - /* 110##### 10###### = 192+x 128+x */ - $nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128); - } - elseif($bytes==3){ - /* 1110#### 10###### 10###### = 224+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128); - } - elseif($bytes==4){ - /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128); - } - /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */ - if($nr<9){/* #x0-#x8 (0-8) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==9){/* #x9 (9) */ - $result.='\t'; - } - elseif($nr==10){/* #xA (10) */ - $result.='\n'; - } - elseif($nr<13){/* #xB-#xC (11-12) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==13){/* #xD (13) */ - $result.='\t'; - } - elseif($nr<32){/* #xE-#x1F (14-31) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<34){/* #x20-#x21 (32-33) */ - $result.=$char; - } - elseif($nr==34){/* #x22 (34) */ - $result.='\"'; - } - elseif($nr<92){/* #x23-#x5B (35-91) */ - $result.=$char; - } - elseif($nr==92){/* #x5C (92) */ - $result.='\\'; - } - elseif($nr<127){/* #x5D-#x7E (93-126) */ - $result.=$char; - } - elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */ - $result.="\\U".sprintf("%08X",$nr); - } - else{ - /* other chars are not defined => ignore */ - } - } - return $result; -} - - - - -/** - * @access private - */ -function _new_element() -{ - $e['parent']=Array(); // Parent is a blank Array - $e['state']=0; - $e['has_property_atributes']=0; - $e['has_member_attributes']=0; - $e['subject_type']=0; - $e['subject']=''; - $e['predicate']=''; - $e['ordinal']=0; - $e['members']=0; - $e['data']=''; - $e['xml_lang']=''; - $e['bag_id']=''; - $e['statements']=0; - $e['statement_id']=''; - $e['datatype']=''; - $e['element_base_uri'] = ''; - - return $e; -} - -/** - - * @param string $source - * @param string &$destination - * - * @access private - */ -function _copy_element($source, &$destination ) -{ - if( $source ) - { - $destination['parent'] = $source; - $destination['state'] = $source['state']; - $destination['xml_lang'] = $source['xml_lang']; - $destination['element_base_uri'] = $source['element_base_uri']; - } -} - - /** - * @param string &$e - * @access private - */ -function _clear_element(&$e) -{ - $e['subject']=''; - $e['predicate']=''; - $e['data']=''; - $e['bag_id']=''; - $e['statement_id']=''; - - if(isset($e['parent'])) { - if( $e['parent'] ) - { - if( $e['parent']['xml_lang'] != $e['xml_lang'] ) - { - $e['xml_lang']=''; - } - } - else - { - $e['xml_lang']=''; - } - } else { - $e['xml_lang']=''; - } - - $e['parent']=Array(); - $e['state']=0; - $e['has_property_attributes']=0; - $e['has_member_attributes']=0; - $e['subject_type']=0; - $e['subject']=''; - $e['predicate']=''; - $e['ordinal']=0; - $e['members']=0; - $e['data']=''; - $e['xml_lang']=''; - $e['bag_id']=''; - $e['statements']=0; - $e['statement_id']=''; - $e['datatype']=''; - $e['element_base_uri'] = ''; -} - - /** - * @access private - */ -function _push_element() -{ - if(!isset($this->rdf_parser['free'])) { - $this->rdf_parser['free']=Array(); - } - if(count($this->rdf_parser['free'])>0) - { - $e = $this->rdf_parser['free']; - if(isset($e['parent'])) { - $this->rdf_parser['free'] = $e['parent']; - } else { - $this->rdf_parser['free']=$this->_new_element(); - } - } - else - { - $e = $this->_new_element(); - } - if(!isset($this->rdf_parser['top'])) { - $this->rdf_parser['top']=Array(); - } - $this->_copy_element( $this->rdf_parser['top'], $e ); - $this->rdf_parser['top'] = $e; -} - - /** - * @access private - */ -function _pop_element() -{ - $e = $this->rdf_parser['top']; - $this->rdf_parser['top'] = $e['parent']; - $this->_clear_element( $e ); - $this->rdf_parser['free'] = $e; -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute_resource($local_name ) -{ - return ( $local_name == RDF_TYPE ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute_literal($local_name ) -{ - return ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_LIST ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_ordinal( $local_name ) -{ - $ordinal = -1; - - if( $local_name{0} == '_' ) - { - $ordinal = substr($local_name,1) + 1 ; - } - - return ( $ordinal > 0 ) ? $ordinal : 0; -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_attribute( $local_name ) -{ - return $this->_is_rdf_property_attribute_resource( $local_name ) - || $this->_is_rdf_property_attribute_literal( $local_name ); -} - -function _is_forbidden_rdf_property_attribute($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_property_element( $local_name ) -{ - return ( $local_name == RDF_TYPE ) - || ( $local_name == RDF_SUBJECT ) - || ( $local_name == RDF_PREDICATE ) - || ( $local_name == RDF_OBJECT ) - || ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_SEEALSO ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) - || ( $local_name == RDF_REST ) - || ( $local_name{0} == '_' ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_forbidden_rdf_property_element ($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - - /** - * @param string $local_name - * @access private - */ -function _is_rdf_node_element( $local_name ) -{ - return ( $local_name == RDF_DESCRIPTION ) - || ( $local_name == RDF_STATEMENT ) - || ( $local_name == RDF_SUBJECT ) - || ( $local_name == RDF_PREDICATE ) - || ( $local_name == RDF_OBJECT ) - || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_TYPE ) - || ( $local_name == RDF_VALUE ) - || ( $local_name == RDF_BAG ) - || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_SEEALSO ) - || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) - || ( $local_name == RDF_REST ) - || ( $local_name == RDF_NIL ) - || ( $local_name{0} == '_' ); -} - - /** - * @param string $local_name - * @access private - */ -function _is_forbidden_rdf_node_element ($local_name) -{ - return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_ID) - || ( $local_name == RDF_ABOUT ) - || ( $local_name == RDF_BAG_ID ) - || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) - || ( $local_name == RDF_NODEID ) - || ( $local_name == RDF_LI ) - || ( $local_name == RDF_ABOUT_EACH ) - || ( $local_name == RDF_ABOUT_EACH_PREFIX ) - || ( $local_name == RDF_DATATYPE ); -} - - /** - * @param string $val - * @access private - */ -function _istalnum($val) { - return ereg("[A-Za-z0-9]",$val); -} - /** - * @param string $val - * @access private - */ -function _istalpha($val) { - return ereg("[A-Za-z]",$val); -} - - /** - * @param string $uri - * @access private - */ -function _is_absolute_uri($uri ) -{ - $result = false; - $uri_p=0; - if( $uri && $this->_istalpha( $uri{$uri_p} ) ) - { - ++$uri_p; - - while( ($uri_p_istalnum( $uri{$uri_p} ) - || ( $uri{$uri_p} == '+' ) - || ( $uri{$uri_p} == '-' ) - || ( $uri{$uri_p} == '.' ) ) ) - { - ++$uri_p; - } - - $result = ( $uri{$uri_p} == ':' ); - } - return $result; -} - - -/* - * This function returns an associative array returning any of the various components of the URL that are present. This includes the - * $arr=parse_url($url) - * scheme - e.g. http - * host - * port - * user - * pass - * path - * query - after the question mark ? - * fragment - after the hashmark # - * - * @param string $uri - * @param string $buffer - * @param string &$scheme - * @param string &$authority - * @param string &$path - * @param string &$query - * @param string &$fragment - * @access private -*/ -function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment ) { - - $parsed=parse_url($uri); - if(isset($parsed['scheme'])) { - $scheme=$parsed['scheme']; - } else { - $scheme=''; - } - if(isset($parsed['host'])) { - $host=$parsed['host']; - } else { - $host=''; - } - if(isset($parsed['host'])) { - $authority=$parsed['host']; - } else { - $authority=''; - } - if(isset($parsed['path'])) { - $path=$parsed['path']; - } else { - $path=''; - } - if(isset($parsed['query'])) { - $query=$parsed['query']; - } else { - $query=''; - } - if(isset($parsed['fragment'])) { - $fragment=$parsed['fragment']; - } else { - $fragment=''; - } - -} - -/** - * @param string $base_uri - * @param string $reference_uri - * @param string &$buffer - * @access private -*/ -function _resolve_uri_reference($base_uri,$reference_uri,&$buffer ) -{ - if ($reference_uri == '') - return ($buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri)); - - $base_buffer=''; - $reference_buffer=''; - $path_buffer=''; - - $buffer = ''; - - $this->_parse_uri($reference_uri, - $reference_buffer, - $reference_scheme, - $reference_authority, - $reference_path, - $reference_query, - $reference_fragment ); - - $this->_parse_uri($base_uri, - $base_buffer, - $base_scheme, - $base_authority, - $base_path, - $base_query, - $base_fragment ); - - if( $reference_scheme == '' - && $reference_authority == '' - && $reference_path == '' - && $reference_query == '' ) - { - $buffer=$base_uri; - - if( $reference_fragment != '' ) - { - if ($base_path == '' || $base_path == '/' || $base_path == "\\") { - $buffer = $this->rdf_parser['document_base_uri']; - } - else - { - $buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri); - } - - // CB: Changed for base URI - $c = substr($buffer, strlen($buffer)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $buffer.= '#' ; - $buffer.=$reference_fragment; - - } - } - else if( $reference_scheme != '' ) - { - $buffer=$reference_uri; - } - else - { - $result_scheme = $base_scheme; - $result_path = ''; - - if( $reference_authority != '' ) - { - $result_authority = $reference_authority; - } - else - { - $result_authority = $base_authority; - - if ($reference_path != '') - { - if ($reference_path{0} == '/' || $reference_path{0} == "\\") - { - if ($reference_path{1} == '/' || $reference_path{1} == "\\") - { - $result_authority = ''; - $result_path = $reference_path; - } - else - $result_path = $reference_path; - } - elseif (substr($reference_path, 0, 3) == '../' || - substr($reference_path, 0, 3) == '..\\') - { - $slash = $reference_path{2}; - while($base_path != '' && ( substr($reference_path, 0, 3) == '../' - || substr($reference_path, 0, 3) == '..\\')) - { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); - if ($base_path != '') { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); - $reference_path = substr($reference_path, 3); - } - } - - $result_path = $base_path .$slash .$reference_path; - } - else - { - if ($base_path) - $result_path = preg_replace("/[^\/\\\]*$/", $reference_path, $base_path, 1); - else - $result_path = '/' .$reference_path; - } - } - - } - - if( $result_scheme != '' ) - { - $buffer=$result_scheme; - $buffer.=':'; - } - - if( $result_authority != '' ) - { - $buffer.="//"; - $buffer.=$result_authority; - } - - if( $result_path != '' ) - { - $buffer.=$result_path; - } - - if( $reference_query != '' ) - { - $buffer.='?'; - $buffer.=$reference_query; - } - - if( $reference_fragment != '' ) - { - $buffer.='#'; - $buffer.=$reference_fragment; - } - } -} - - -/** - * IDs which contain CombiningChars or Extenders - * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid. - * If you want to use IDs containing these characters you can turn off - * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php). - * - * @param string $id - * @access private -*/ -function is_valid_id($id ) -{ - if (!VALIDATE_IDS) - return TRUE; - - $result = FALSE; - - if( $id ) - { - if( $this->_istalpha($id{0}) || $id{0} == '_') - { - $result = TRUE; - $i=0; - $len = strlen($id); - while( $result != FALSE && ++$i < $len ) - { - if( !($this->_istalnum( $id{$i}) - || $id{$i} == '.' - || $id{$i} == '-' - || $id{$i} == '_')) - { - $result = FALSE; - } - } - } - } - - if (!$result) - $this->_report_error('illegal ID, nodeID or bagID attribute value'); - else - return TRUE; -} - -/** - * @param string $id - * @param string &$buffer - * @access private -*/ -function _resolve_id($id,&$buffer ) -{ - $id_buffer=''; - - if( $this->is_valid_id($id) ) - { - $id_buffer="#$id"; - } - - $this->_resolve_uri_reference( $this->rdf_get_base(), $id_buffer, $buffer ); - -} - -/** - * @param string $name - * @param string &$buffer - * @param string &$namespace_uri - * @param string &$local_name - * @access private -*/ -function _split_name($name, &$buffer, &$namespace_uri, &$local_name ) -{ - static $nul = 0; - $buffer=$name; - - if( strstr( $buffer, NAMESPACE_SEPARATOR_CHAR ) ) - { - $cosas=explode(NAMESPACE_SEPARATOR_CHAR,$buffer); - $namespace_uri = $cosas[0]; - $local_name = $cosas[1]; - } - else - { - if( ( $buffer{ 0 } == 'x' ) - && ( $buffer{ 1 } == 'm' ) - && ( $buffer{ 2 } == 'l' ) - && ( $buffer{ 3 } == ':' ) ) - { - $namespace_uri = XML_NAMESPACE_URI; - $local_name = substr($buffer,4); - } - else - { - $namespace_uri = ''; - $local_name = $buffer; - } - } -} -/** - * @param string &$buf - * @access private -*/ -function _generate_anonymous_uri(&$buf ) -{ - $id=''; - if(!isset($this->rdf_parser['anonymous_id'])) { - $this->rdf_parser['anonymous_id']=0; - } - $this->rdf_parser['anonymous_id']++; - - $buf= BNODE_PREFIX . $this->rdf_parser['anonymous_id']; - -} -/** - * @param string $subject_type - * @param string $subject - * @param string $predicate - * @param string $ordinal - * @param string $object_type - * @param string $object - * @param string $xml_lang - * @param string $bag_id - * @param string $statements - * @param string $statement_id - * @access private -*/ -function _report_statement( $subject_type, $subject, $predicate, $ordinal, $object_type, $object, $xml_lang, $bag_id, $statements, $statement_id, $datatype ) -{ - $statement_id_type = RDF_SUBJECT_TYPE_URI; - $statement_id_buffer=''; - $predicate_buffer=''; - if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang'])) - $xml_lang = $this->rdf_parser['document_xml_lang']; - - // call add statement - $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang, $datatype ); - - if( $bag_id ) - { - if( $statements == '' ) - { - $this->_report_statement(RDF_SUBJECT_TYPE_URI, - $bag_id, - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - RDF_NAMESPACE_URI.RDF_BAG, - '', - '', - '', - '', - $datatype ); - } - - if( ! $statement_id ) - { - $statement_id_type = RDF_SUBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri( $statement_id_buffer ); - $statement_id = $statement_id_buffer; - } - $statements++; - $predicate_buffer='RDF_NAMESPACE_URI_'.$statements; - - $this->_report_statement( - RDF_SUBJECT_TYPE_URI, - $bag_id, - $predicate_buffer, - $statements, - RDF_OBJECT_TYPE_BNODE, - $statement_id, - '', - '', - '', - '', - $datatype ); - } - - if( $statement_id ) - { - // rdf:type = rdf:Statement - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - RDF_NAMESPACE_URI.RDF_STATEMENT, - '', - '', - '', - '', - $datatype ); - - if ($subject_type == RDF_SUBJECT_TYPE_BNODE) - $obj_type = RDF_OBJECT_TYPE_BNODE; - else - $obj_type = RDF_OBJECT_TYPE_RESOURCE; - - - // rdf:subject - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_SUBJECT, - 0, - $obj_type, - $subject, - '', - '', - '', - '', - $datatype ); - - // rdf:predicate - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_PREDICATE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $predicate, - '', - '', - '', - '', - $datatype ); - - // rdf:object - $this->_report_statement( - $statement_id_type, - $statement_id, - RDF_NAMESPACE_URI.RDF_OBJECT, - 0, - $object_type, - $object, - '', - '', - '', - '', - $datatype ); - } -} -/** - * @param string $subject_type - * @param string $subject - * @param string $attributes - * @param string $xml_lang - * @param string $bag_id - * @param string $statements - * @access private -*/ -function _handle_property_attributes($subject_type, $subject, $attributes, $xml_lang, $bag_id, $statements ) -{ - $i=0; - - $attribute=''; - $predicate=''; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value=''; - - $ordinal=0; - - for( $i = 0; isset($attributes[ $i ]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - $predicate=$attribute_namespace_uri; - $predicate.=$attribute_local_name; - - if( RDF_NAMESPACE_URI == $attribute_namespace_uri ) - { - if( $this->_is_rdf_property_attribute_literal( $attribute_local_name ) ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - ''); - } - else if( $this->_is_rdf_property_attribute_resource( $attribute_local_name ) ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $attribute_value, - '', - $bag_id, - $statements, - '', - ''); - } - else if( ( $ordinal = $this->_is_rdf_ordinal( $attribute_local_name ) ) != 0 ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - $ordinal, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - else if ( ($attribute_local_name != RDF_ABOUT) - && ($attribute_local_name != RDF_RDF) - && ($attribute_local_name != RDF_DESCRIPTION) - && ($attribute_local_name != RDF_ID) - && ($attribute_local_name != RDF_ABOUT_EACH) - && ($attribute_local_name != RDF_ABOUT_EACH_PREFIX) - && ($attribute_local_name != RDF_BAG_ID) - && ($attribute_local_name != RDF_RESOURCE) - && ($attribute_local_name != RDF_PARSE_TYPE) - && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL) - && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE) - && ($attribute_local_name != RDF_LI) - && ($attribute_local_name != RDF_SUBJECT) - && ($attribute_local_name != RDF_PREDICATE) - && ($attribute_local_name != RDF_OBJECT) - && ($attribute_local_name != RDF_NODEID) - && ($attribute_local_name != RDF_DATATYPE) - && ($attribute_local_name != RDF_SEEALSO) - && ($attribute_local_name != RDF_NIL) - && ($attribute_local_name != RDF_REST) - && ($attribute_local_name != RDF_FIRST) - ) - { - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - } - else if( XML_NAMESPACE_URI == $attribute_namespace_uri ) - { - if ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - // is it required that property attributes be in an explicit namespace? - - $this->_report_statement( - $subject_type, - $subject, - $predicate, - 0, - RDF_OBJECT_TYPE_LITERAL, - $attribute_value, - $xml_lang, - $bag_id, - $statements, - '', - '' ); - } - } -} - - - -/** - * @param string $warning - * @access private -*/ -function _report_warning($warning) -{ - $errmsg = RDFAPI_ERROR . '(class: parser): ' . $warning .'.'; - trigger_error($errmsg, E_USER_WARNING); -} - - -function _report_error($error) -{ - $errmsg = RDFAPI_ERROR . '(class: parser): ' . $error .'.'; - trigger_error($errmsg, E_USER_ERROR); -} - - -/** - * @param string $namespace_uri - * @param string $local_name - * @param string $attributes - * @param string $parent - * @access private -*/ -function _handle_resource_element( $namespace_uri, $local_name, $attributes, $parent ) -{ - $subjects_found = 0; - $aux=$attributes; - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - $id = ''; - $about = ''; - - $bag_id = ''; - $node_id = ''; - $datatype = ''; - - $i=0; - - $attribute=''; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value=''; - - $id_buffer=''; - - $type=''; - - $this->rdf_parser['top']['has_property_attributes'] = false; - $this->rdf_parser['top']['has_member_attributes'] = false; - - - if( $namespace_uri == RDF_NAMESPACE_URI ) - { - if( ! $this->_is_rdf_node_element( $local_name ) ) - { - $msg = 'unknown or out of context rdf node element: '.$local_name; - - if ($this->_is_forbidden_rdf_node_element($local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - } - - // examine each attribute for the standard RDF "keywords" - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - // if the attribute is not in any namespace - // or the attribute is in the RDF namespace - if( ( $attribute_namespace_uri == '' ) - || ( $attribute_namespace_uri == RDF_NAMESPACE_URI )) - { - if( $attribute_local_name == RDF_ID ) - { - $id = $attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_ABOUT ) { - $about = '_'.$attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_NODEID) { - $node_id = $attribute_value; - ++$subjects_found; - } else if( $attribute_local_name == RDF_ABOUT_EACH ) { - $error = 'aboutEach has been removed from the RDF specifications'; - $this->_report_error($error); - } else if( $attribute_local_name == RDF_ABOUT_EACH_PREFIX ) { - $error = 'aboutEachPrefix has been removed from the RDF specifications'; - $this->_report_error($error); - } else if( $attribute_local_name == RDF_BAG_ID) { - $bag_id = $attribute_value; - } else if( $attribute_local_name == RDF_DATATYPE) { - $datatype = $attribute_value; - } else if( $this->_is_rdf_property_attribute( $attribute_local_name )) { - $this->rdf_parser['top']['has_property_attributes'] = true; - } else if( $this->_is_rdf_ordinal( $attribute_local_name )) { - $this->rdf_parser['top']['has_property_attributes'] = true; - $this->rdf_parser['top']['has_member_attributes'] = true; - } else { - $this->rdf_parser['top']['has_property_attributes'] = true; - $msg = 'unknown or out of context rdf attribute: '.$attribute_local_name; - - if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - } - else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) - { - if( $attribute_local_name == XML_LANG ) - { - $this->rdf_parser['top']['xml_lang'] = $attribute_value; - } - elseif ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - } - - // if no subjects were found, generate one. - if( $subjects_found == 0 ) - { - $this->_generate_anonymous_uri( $id_buffer ); - $this->rdf_parser['top']['subject']=$id_buffer; - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - } - else if( $subjects_found > 1 ) - { - $this->_report_error('ID, about and nodeID are mutually exclusive'); - } - else if( $id ) - { - $this->_resolve_id( $id, $id_buffer ); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI; - $this->rdf_parser['top']['subject']=$id_buffer; - } - else if( $about ) - { - $this->_resolve_uri_reference( $this->rdf_get_base(), substr($about,1), $id_buffer ); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI; - $this->rdf_parser['top']['subject']=$id_buffer; - } - else if( $node_id ) - { - $this->is_valid_id($node_id); - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - $this->rdf_parser['top']['subject']=$node_id; - } - - // if the subject is empty, assign it the document uri - if( $this->rdf_parser['top']['subject'] == '' ) - { - $this->rdf_parser['top']['subject']=$this->rdf_get_base(); - } - - if( $bag_id ) - { - $this->_resolve_id( $bag_id, $id_buffer ); - $this->rdf_parser['top']['bag_id']=$id_buffer; - } - - // only report the type for non-rdf:Description elements. - if( ($local_name != RDF_DESCRIPTION ) - || ( $namespace_uri != RDF_NAMESPACE_URI ) ) - { - $type=$namespace_uri; - $type.=$local_name; - - $this->_report_statement( - $this->rdf_parser['top']['subject_type'], - $this->rdf_parser['top']['subject'], - RDF_NAMESPACE_URI.RDF_TYPE, - 0, - RDF_OBJECT_TYPE_RESOURCE, - $type, - '', - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'], - '', - $datatype); - - } - - // if this element is the child of some property, - // report the appropriate statement. - if( $parent ) - { - if ($this->rdf_parser['top']['subject_type'] == RDF_SUBJECT_TYPE_BNODE) - $objtype = RDF_OBJECT_TYPE_BNODE; - else - $objtype = RDF_OBJECT_TYPE_RESOURCE; - - $this->_report_statement( - $parent['parent']['subject_type'], - $parent['parent']['subject'], - $parent['predicate'], - $parent['ordinal'], - $objtype, - $this->rdf_parser['top']['subject'], - '', - $parent['parent']['bag_id'], - $parent['parent']['statements'], - $parent['statement_id'], - $parent['datatype']); - - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_handle_property_attributes( - $this->rdf_parser['top']['subject_type'], - $this->rdf_parser['top']['subject'], - $attributes, - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'] ); - } -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_property_element( &$namespace_uri, &$local_name, &$attributes ) -{ - $buffer=''; - - $i=0; - - $aux=$attributes; - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - - $attribute_namespace_uri=''; - $attribute_local_name=''; - $attribute_value = ''; - - $resource = NULL; - $statement_id = ''; - $bag_id = ''; - $parse_type = ''; - $node_id = ''; - $datatype = ''; - - $this->rdf_parser['top']['ordinal'] = 0; - - if( $namespace_uri == RDF_NAMESPACE_URI ) - { - if( ! $this->_is_rdf_property_element( $local_name ) ) - { - $msg = 'unknown or out of context rdf property element: '.$local_name; - - if ($this->_is_forbidden_rdf_property_element($local_name)) - $this->_report_error($msg); - else - $this->_report_warning($msg); - } - - } - - $buffer=$namespace_uri; - - if( ( $namespace_uri == RDF_NAMESPACE_URI ) - && ( $local_name == RDF_LI ) ) - { - $this->rdf_parser['top']['parent']['members']++; - $this->rdf_parser['top']['ordinal'] = $this->rdf_parser['top']['parent']['members']; - - $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal']; - - $buffer.='_'.$this->rdf_parser['top']['ordinal']; - - } - else - { - $buffer.=$local_name; - } - - $this->rdf_parser['top']['predicate']=$buffer; - - $this->rdf_parser['top']['has_property_attributes'] = false; - $this->rdf_parser['top']['has_member_attributes'] = false; - - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[$i], - $buffer, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[$i + 1]; - - // if the attribute is not in any namespace - // or the attribute is in the RDF namespace - if( ( $attribute_namespace_uri == '' ) - || ( $attribute_namespace_uri == RDF_NAMESPACE_URI ) ) - { - if( ( $attribute_local_name == RDF_ID ) ) - { - $statement_id = $attribute_value; - } - else if( $attribute_local_name == RDF_PARSE_TYPE ) - { - $parse_type = $attribute_value; - } - else if( $attribute_local_name == RDF_RESOURCE ) - { - $resource = $attribute_value; - } - else if( $attribute_local_name == RDF_NODEID ) - { - $node_id = $attribute_value; - } - else if( $attribute_local_name == RDF_BAG_ID ) - { - $bag_id = $attribute_value; - } - else if( $attribute_local_name == RDF_DATATYPE ) - { - $datatype = $attribute_value; - $this->rdf_parser['top']['datatype'] = $attribute_value; - } - else if( $this->_is_rdf_property_attribute( $attribute_local_name ) ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - else - { - $this->_report_warning('unknown rdf attribute: '.$attribute_local_name ); - return; - } - } - else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) - { - if( $attribute_local_name == XML_LANG ) - { - $this->rdf_parser['top']['xml_lang'] = $attribute_value; - } - elseif ($attribute_local_name == 'base') - { - $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } - } - else if( $attribute_namespace_uri ) - { - $this->rdf_parser['top']['has_property_attributes'] = true; - } - } - - if( $statement_id ) - { - $this->_resolve_id($statement_id, $buffer ); - $this->rdf_parser['top']['statement_id']=$buffer; - } - - if ($node_id) - { - $this->is_valid_id($node_id); - - if ($resource) - { - $this->_report_error('nodeID and resource are mutually exclusive'); - } - if ($statement_id) - { - // reify statement - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_BNODE, - $node_id, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - ''); - $statement_id = ''; - } - else - { - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_BNODE, - $node_id, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - '', - $datatype ); - } - - $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; - } - - if( $parse_type ) - { - if( $resource ) { - $this->_report_error('property elements with rdf:parseType do not allow rdf:resource' ); - } - - if( $bag_id ) { - $this->_report_warning('property elements with rdf:parseType do not allow rdf:bagID' ); - return; - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_report_error('property elements with rdf:parseType do not allow property attributes'); - return; - } - - if( $attribute_value == RDF_PARSE_TYPE_RESOURCE ) - { - $this->_generate_anonymous_uri( $buffer ); - // since we are sure that this is now a resource property we can report it - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_BNODE, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->_push_element( ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_RESOURCE; - $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; - $this->rdf_parser['top']['subject']=$buffer; - $this->rdf_parser['top']['bag_id']=''; - $this->rdf_parser['top']['datatype']= $datatype; - - } - elseif ( $attribute_value == RDF_PARSE_TYPE_LITERAL ) - { - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL; - $this->rdf_parser['top']['datatype']= RDF_NAMESPACE_URI .RDF_XMLLITERAL; - $this->rdf_parser['xml_literal']['buffer'] = ''; - $this->rdf_parser['xml_literal']['depth'] = 0; - } - elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION) - { - $this->_generate_anonymous_uri( $buffer ); - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_BNODE, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_COLLECTION; - $this->rdf_parser['top']['collection']['first_blank_node_id'] = $buffer; - } - - else - { - - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - 0, - RDF_OBJECT_TYPE_XML, - '', - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); - - $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL; - } - } - else if( $resource !== NULL || $bag_id || $this->rdf_parser['top']['has_property_attributes'] ) - { - if( $resource !== NULL ) - { - $subject_type = RDF_SUBJECT_TYPE_URI; - $this->_resolve_uri_reference( $this->rdf_get_base(), $resource, $buffer ); - $object_type=RDF_OBJECT_TYPE_RESOURCE; - } - else - { - $subject_type = RDF_SUBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri( $buffer ); - $object_type=RDF_OBJECT_TYPE_BNODE; - } - $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; - - // since we are sure that this is now a resource property we can report it. - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - $object_type, - $buffer, - '', - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $datatype ); // should we allow IDs? - - if( $bag_id ) - { - $this->_resolve_id( $bag_id, $buffer ); - $this->rdf_parser['top']['bag_id']=$buffer; - } - - if( $this->rdf_parser['top']['has_property_attributes'] ) - { - $this->_handle_property_attributes( - $subject_type, - $buffer, - $attributes, - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'] ); - } - } -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_collection_element(&$namespace_uri, &$local_name, &$attributes) -{ - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; -/* collection construction site -// old: - if ( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') - && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ) - { - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) - { - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) - { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; - } - elseif ( $attribute_local_name == RDF_NODEID ) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; - } - $this->rdf_parser['top']['parent']['collection']['object_label'][] = $attribute_value; - } - } - } -*/ -// new - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) - { - $tmp_subject_type = RDF_SUBJECT_TYPE_URI; - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) - { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; - } - elseif ( $attribute_local_name == RDF_NODEID ) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; - $tmp_subject_type = RDF_SUBJECT_TYPE_BNODE; - } - $id_buffer = ''; - $this->_resolve_uri_reference( $this->rdf_get_base(), $attribute_value, $id_buffer ); - $this->rdf_parser['top']['parent']['collection']['object_label'][] = $id_buffer; - - if (!( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') - && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )) - { - $this->_report_statement( - $tmp_subject_type, - $id_buffer, - RDF_NAMESPACE_URI.RDF_TYPE, - '', - RDF_OBJECT_TYPE_RESOURCE, - $namespace_uri.$local_name, - '', - '', - '', - '', - ''); - } - } - } - - -// collection construction site -} - -/** - * @param string &$namespace_uri - * @param string &$local_name - * @param string &$attributes - * @access private -*/ -function _handle_xml_start_element(&$namespace_uri, &$local_name, &$attributes) -{ - $aux2=Array(); - foreach($attributes as $atkey=>$atvalue) { - $aux2[]=$atkey; - $aux2[]=$atvalue; - } - $attributes=$aux2; - - $element = '<' .$this->_join_name_and_declare_prefix($namespace_uri, $local_name); - - for( $i = 0; isset($attributes[$i]); $i += 2 ) - { - $this->_split_name( - $attributes[ $i ], - $attribute, - $attribute_namespace_uri, - $attribute_local_name ); - - $attribute_value = $attributes[ $i + 1 ]; - - $element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri, $attribute_local_name); - $element .= '=\"' .$attribute_value .'\"'; - } - $element .= '>'; - - $this->rdf_parser['xml_literal']['buffer'] .= $element; -} - -/** - * @param string $name - * @access private -*/ -function _handle_xml_end_element($name) -{ - $buffer=''; - $namespace_uri=''; - $local_name=''; - - $this->_split_name( - $name, - $buffer, - $namespace_uri, - $local_name ); - - $element = 'rdf_parser['default_namespace']) - &&$namespace_uri != $this->rdf_parser['default_namespace']) - { - $element .= $this->rdf_parser['namespaces'][$namespace_uri] .':'; - } - - $element .= $local_name .'>'; - - $this->rdf_parser['xml_literal']['buffer'] .= $element; - $depth = $this->rdf_parser['xml_literal']['depth']--; - - if (isset($this->rdf_parser['xml_literal']['declared_ns'])) - foreach ($this->rdf_parser['xml_literal']['declared_ns'] as $prefix => $_depth) - { - if ($depth == $_depth) - unset($this->rdf_parser['xml_literal']['declared_ns'][$prefix]); - } -} - -/** - * @param string $namespace_uri - * @param string $local_name - * @access private -*/ -function _join_name_and_declare_prefix($namespace_uri, $local_name) { - - $name = ''; - - if ($namespace_uri) - { - if (isset($this->rdf_parser['default_namespace']) - && $namespace_uri == $this->rdf_parser['default_namespace']) - { - $name .= $local_name; - - if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_']) - && $namespace_uri != XML_NAMESPACE_URI) - { - $name .= ' xmlns=' . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'] - = $this->rdf_parser['xml_literal']['depth']; - } - } - else - { - $ns_prefix = $this->rdf_parser['namespaces'][$namespace_uri]; - $name .= $ns_prefix .':' .$local_name; - - if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix]) - && $namespace_uri != XML_NAMESPACE_URI) - { - $name .= " xmlns:$ns_prefix=" . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix] - = $this->rdf_parser['xml_literal']['depth']; - } - } - - } - else - $name .= $local_name; - - return $name; - -} - -/** - * @access private -*/ -function _end_collection() { - - if (isset($this->rdf_parser['top']['collection'])) - { - - $subject = $this->rdf_parser['top']['collection']['first_blank_node_id']; - - for ($i=0; isset($this->rdf_parser['top']['collection']['object_label'][$i]); $i++) - { - - $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, - $subject, - RDF_NAMESPACE_URI.RDF_FIRST, - '', - $this->rdf_parser['top']['collection']['object_type'][$i], - $this->rdf_parser['top']['collection']['object_label'][$i], - '', - '', - '', - '', - ''); - - if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1])) - { - $obj_type_2 = RDF_OBJECT_TYPE_RESOURCE; - $object_2 = RDF_NAMESPACE_URI.RDF_NIL; - } - else - { - $obj_type_2= RDF_OBJECT_TYPE_BNODE; - $this->_generate_anonymous_uri($object_2); - } - - - $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, - $subject, - RDF_NAMESPACE_URI.RDF_REST, - '', - $obj_type_2, - $object_2, - '', - '', - '', - '', - ''); - - $subject = $object_2; - } - } -} - -/** - * @param string $parser - * @param string $name - * @param string $attributes - * @access private -*/ -function _start_element_handler($parser, $name, $attributes ) -{ - $buffer=''; - - $namespace_uri=''; - $local_name=''; - - $this->_push_element(); - - - $this->_split_name( - $name, - $buffer, - $namespace_uri, - $local_name ); - - switch( $this->rdf_parser['top']['state'] ) - { - case IN_TOP_LEVEL: - // set base_uri, if possible - foreach ($attributes as $key => $value) { - if($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR . 'base') { - $this->rdf_parser['base_uri'] = $value; - $this->rdf_parser['document_base_uri'] = $value; - - $c = substr($value, strlen($value)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $this->rdf_parser['normalized_base_uri'] = $value . '#'; - else - $this->rdf_parser['normalized_base_uri'] = $value; - - } - elseif ($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR .'lang') - $this->rdf_parser['document_xml_lang'] = $value; -echo ""; - } - - - if( RDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name ) - { - $this->rdf_parser['top']['state'] = IN_RDF; - - break; - } - case IN_RDF: - $this->rdf_parser['top']['state'] = IN_DESCRIPTION; - $this->_handle_resource_element( $namespace_uri, $local_name, $attributes, '' ); - break; - case IN_DESCRIPTION: - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - $this->rdf_parser['top']['state'] = IN_PROPERTY_UNKNOWN_OBJECT; - $this->_handle_property_element( $namespace_uri, $local_name, $attributes ); - break; - case IN_PROPERTY_PARSE_TYPE_COLLECTION: - $this->_handle_collection_element($namespace_uri, $local_name, $attributes); - break; - case IN_PROPERTY_UNKNOWN_OBJECT: - /* if we're in a property with an unknown object type and we encounter - an element, the object must be a resource, */ - $this->rdf_parser['top']['data']=''; - $this->rdf_parser['top']['parent']['state'] = IN_PROPERTY_RESOURCE; - $this->rdf_parser['top']['state'] = IN_DESCRIPTION; - $this->_handle_resource_element( - $namespace_uri, - $local_name, - $attributes, - $this->rdf_parser['top']['parent'] ); - break; - case IN_PROPERTY_LITERAL: - $this->_report_warning( 'no markup allowed in literals' ); - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: - $this->rdf_parser['top']['state'] = IN_XML; - /* fall through */ - case IN_XML: - $this->rdf_parser['xml_literal']['depth']++; - $this->_handle_xml_start_element($namespace_uri, $local_name, $attributes); - break; - case IN_PROPERTY_RESOURCE: - $this->_report_warning( - 'only one element allowed inside a property element' ); - break; - case IN_PROPERTY_EMPTY_RESOURCE: - $this->_report_warning( - 'no content allowed in property with rdf:resource, rdf:bagID, or property attributes' ); - break; - case IN_UNKNOWN: - break; - } -} - -/** - property elements with text only as content set the state to - IN_PROPERTY_LITERAL. as character data is received from expat, - it is saved in a buffer and reported when the end tag is - received. - * @access private -*/ -function _end_literal_property() -{ - if(!isset($this->rdf_parser['top']['statement_id'])) { - $this->rdf_parser['top']['statement_id']=''; - } - if(!isset($this->rdf_parser['top']['parent']['subject_type'])) { - $this->rdf_parser['top']['parent']['subject_type']=''; - } - if(!isset($this->rdf_parser['top']['parent']['subject'])) { - $this->rdf_parser['top']['parent']['subject']=''; - } - if(!isset($this->rdf_parser['top']['parent']['bag_id'])) { - $this->rdf_parser['top']['parent']['bag_id']=''; - } - if(!isset($this->rdf_parser['top']['parent']['statements'])) { - $this->rdf_parser['top']['parent']['statements']=0; - } - if(!isset($this->rdf_parser['top']['predicate'])) { - $this->rdf_parser['top']['predicate']=''; - } - if(!isset($this->rdf_parser['top']['datatype'])) { - $this->rdf_parser['top']['datatype']=''; - } - if(!isset($this->rdf_parser['top']['ordinal'])) { - $this->rdf_parser['top']['ordinal']=0; - } - $this->_report_statement( - $this->rdf_parser['top']['parent']['subject_type'], - $this->rdf_parser['top']['parent']['subject'], - $this->rdf_parser['top']['predicate'], - $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_LITERAL, - $this->rdf_parser['top']['data'], - $this->rdf_parser['top']['xml_lang'], - $this->rdf_parser['top']['parent']['bag_id'], - $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - $this->rdf_parser['top']['datatype']); - -} - -/** - * @param string $parser - * @param string $name - * @access private -*/ -function _end_element_handler( $parser, $name ) -{ - switch( $this->rdf_parser['top']['state'] ) - { - case IN_TOP_LEVEL: - break; - case IN_XML: - $this->_handle_xml_end_element($name); - break; - case IN_PROPERTY_UNKNOWN_OBJECT: - case IN_PROPERTY_LITERAL: - $this->_end_literal_property( ); - break; - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - $this->_pop_element( ); - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: -// $search = array((0) => chr(10), (1) => chr(13), (2) => chr(9)); -// $replace = array((0) => '\n' , (1) => '\r' , (2) => '\t'); -// $this->rdf_parser["xml_literal"]["buffer"] -// = str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]); - - $this->rdf_parser['top']['data'] = $this->rdf_parser['xml_literal']['buffer']; - $this->_end_literal_property(); - $this->rdf_parser['xml_literal']['buffer'] = ''; - - break; - case IN_PROPERTY_PARSE_TYPE_COLLECTION: - $this->_end_collection(); - break; - case IN_RDF: - case IN_DESCRIPTION: - case IN_PROPERTY_RESOURCE: - case IN_PROPERTY_EMPTY_RESOURCE: - case IN_UNKNOWN: - break; - } - - $this->_pop_element(); -} - -/** - * @param string $parser - * @param string $s - * @access private -*/ -function _character_data_handler( $parser,$s) -{ - $len=strlen($s); - switch( $this->rdf_parser['top']['state'] ) - { - case IN_PROPERTY_LITERAL: - case IN_PROPERTY_UNKNOWN_OBJECT: - if( isset($this->rdf_parser['top']['data']) ) - { - $n = strlen( $this->rdf_parser['top']['data'] ); - $this->rdf_parser['top']['data'].= $s; - - } - else - { - $this->rdf_parser['top']['data']=$s; - } - - if( $this->rdf_parser['top']['state'] == IN_PROPERTY_UNKNOWN_OBJECT ) - { - /* look for non-whitespace */ - for( $i = 0; (( $i < $len ) && ( ereg(" |\n|\t",$s{ $i }) )); $i++ ); - /* if we found non-whitespace, this is a literal */ - if( $i < $len ) - { - $this->rdf_parser['top']['state'] = IN_PROPERTY_LITERAL; - } - } - - break; - case IN_TOP_LEVEL: - break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: - case IN_XML: - $this->rdf_parser['xml_literal']['buffer'] .= $s; - break; - case IN_RDF: - case IN_DESCRIPTION: - case IN_PROPERTY_RESOURCE: - case IN_PROPERTY_EMPTY_RESOURCE: - case IN_PROPERTY_PARSE_TYPE_RESOURCE: - case IN_UNKNOWN: - break; - } -} - - - /** - * Adds a new statement to the model - * This method is called by generateModel(). - * - * @access private - * @param string &$user_data - * @param string $subject_type - * @param string $subject - * @param string $predicate - * @param string $ordinal - * @param string $object_type - * @param string $object - * @param string $xml_lang ) - * @return object MemModel - */ -function add_statement_to_model( - &$user_data, - $subject_type, - $subject, - $predicate, - $ordinal, - $object_type, - $object, - $xml_lang, - $datatype ) -{ - - // ParseUnicode - if(UNIC_RDF){ - $subject=$this->str2unicode_nfc($subject); - $predicate=$this->str2unicode_nfc($predicate); - $object=$this->str2unicode_nfc($object); - } - - //create subject - if ($subject_type == RDF_SUBJECT_TYPE_BNODE) - $objsub = new BlankNode($subject); - else - $objsub = new Resource($subject); - - // create predicate - $objpred = new Resource($predicate); - - // create object - if (($object_type == RDF_OBJECT_TYPE_RESOURCE) || ($object_type == RDF_OBJECT_TYPE_BNODE)) { - if ($object_type == RDF_OBJECT_TYPE_BNODE) - $objobj = new BlankNode($object); - else - $objobj = new Resource($object); - } else { - - $objobj = new Literal($object); - if ($datatype != '') { - $objobj->setDatatype($datatype); - } - elseif ($xml_lang !='') { - $objobj->setLanguage($xml_lang); - } - } - - // create statement - $statement = new Statement($objsub, $objpred, $objobj); - - // add statement to model - if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){ - $this->model->addWithoutDuplicates($statement); - }else - $this->model->add($statement); - } - - -/* public functions */ - - /** - * Generates a new MemModel from a URI, a file or from memory. - * If you want to parse an RDF document, pass the URI or location in the filesystem - * of the RDF document. You can also pass RDF code direct to the function. If you pass - * RDF code directly to the parser and there is no xml:base included, you should set - * the base URI manually using the optional second parameter $rdfBaseURI. - * Make sure that here are proper namespace declarations in your input document. - * - * @access public - * @param string $base - * @param boolean $rdfBaseURI - * @return object MemModel - */ -function & generateModel($base,$rdfBaseURI = false, $model = false) { - - // Check if $base is a URI or filename or a string containing RDF code. - if (substr(ltrim($base),0 ,1) != '<') { - - // $base is URL or filename - $this->model = $model?$model:new MemModel($base); - - $input = fopen($base,'r') or die("RDF Parser: Could not open File: $base. Stopped parsing."); - $this->rdf_parser_create( NULL ); - $this->rdf_set_base($base); - $done=false; - while(!$done) - { - $buf = fread( $input, 512 ); - $done = feof($input); - - if ( ! $this->rdf_parse( $buf, feof($input) ) ) - { - $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); - $line = xml_get_current_line_number($this->rdf_get_xml_parser() ); - $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; - trigger_error($errmsg, E_USER_ERROR); - } - } - /* close file. */ - fclose( $input ); - - } else { - // $base is RDF string - $this->model = $model?$model:new MemModel($base); - - $this->rdf_parser_create( NULL ); - - if ($rdfBaseURI!==false) - { - $this->rdf_set_base($rdfBaseURI); - } else - { - $this->rdf_set_base( NULL ); - } - - if ( ! $this->rdf_parse( $base, TRUE ) ) - { - $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); - $line = xml_get_current_line_number($this->rdf_get_xml_parser() ); - $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; - trigger_error($errmsg, E_USER_ERROR); - } - } - // base_uri could have changed while parsing - $this->model->setBaseURI($this->rdf_parser['base_uri']); - - if(isset($this->rdf_parser['namespaces'])){ - $this->model->addParsedNamespaces($this->rdf_parser['namespaces']); - } - - $this->rdf_parser_free(); - - return $this->model; - -} - -/** - * @param string $encoding - - * @access private -*/ -function rdf_parser_create( $encoding ) -{ - - $parser = xml_parser_create_ns( $encoding, NAMESPACE_SEPARATOR_CHAR ); - - xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); - $this->rdf_parser['xml_parser'] = $parser; - - xml_set_object($this->rdf_parser['xml_parser'], $this); - xml_set_element_handler( $this->rdf_parser['xml_parser'], '_start_element_handler', '_end_element_handler' ); - xml_set_character_data_handler( $this->rdf_parser['xml_parser'], '_character_data_handler' ); - xml_set_start_namespace_decl_handler($this->rdf_parser['xml_parser'], '_start_ns_declaration_handler'); - - return $this->rdf_parser; -} - -/** - * @param resource &$parser - * @param string $ns_prefix - * @param string $ns_uri - * @access private -*/ -function _start_ns_declaration_handler(&$parser, $ns_prefix, $ns_uri) -{ - if (!$ns_prefix) - $this->rdf_parser['default_namespace'] = $ns_uri; - else - $this->rdf_parser['namespaces'][$ns_uri] = $ns_prefix; -} - - -/** - * @access private -*/ -function rdf_parser_free( ) -{ - $z=3; - - $this->rdf_parser['base_uri']=''; - $this->rdf_parser['document_base_uri'] = ''; - - unset( $this->rdf_parser ); -} - -/** - * @param string $s - * @param string $is_final - * @access private -*/ -function rdf_parse( $s, $is_final ) -{ - return XML_Parse( $this->rdf_parser['xml_parser'], $s, $is_final ); -} - -/** - * @access private -*/ -function rdf_get_xml_parser() -{ - return ( $this->rdf_parser['xml_parser']); -} - -/** - * @param string $base - * @access private -*/ -function rdf_set_base($base ) -{ - - $this->rdf_parser['base_uri']=$base; - - $c = substr($base, strlen($base)-1 ,1); - if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) - $this->rdf_parser['normalized_base_uri'] = $base . '#'; - else - $this->rdf_parser['normalized_base_uri'] = $base; - - return 0; -} - -/** - * @access private -*/ -function rdf_get_base() -{ - if ($this->rdf_parser['top']['element_base_uri']) - return $this->rdf_parser['top']['element_base_uri']; - else - return $this->rdf_parser['base_uri']; -} - - -} // end: rdf_parser - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfSerializer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfSerializer.php deleted file mode 100755 index 6b90cba2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RdfSerializer.php +++ /dev/null @@ -1,719 +0,0 @@ -, Boris Motik , Daniel Westphal , Leandro Mariano Lopez -* -* @package syntax -* @access public -* -*/ -class RdfSerializer extends Object { - - // configuration - var $use_entities; - var $use_attributes; - var $sort_model; - var $rdf_qnames; - var $use_xml_declaration; - - // properties - var $m_defaultNamespaces = array(); - var $m_namespaces = array(); - var $m_nextAutomaticPrefixIndex; - var $m_out; - var $m_baseURI; - var $m_statements = array(); - var $m_currentSubject; - var $m_rdfIDElementText; - var $m_rdfAboutElementText; - var $m_rdfResourceElementText; - var $m_groupTypeStatement; - var $m_attributeStatements = array(); - var $m_contentStatements = array(); - var $rdf_qname_prefix; - - /** - * Constructor - * - * @access public - */ - function RdfSerializer() { - - // default serializer configuration - $this->use_entities = SER_USE_ENTITIES; - $this->use_attributes = SER_USE_ATTRIBUTES; - $this->sort_model = SER_SORT_MODEL; - $this->rdf_qnames = SER_RDF_QNAMES; - $this->use_xml_declaration = SER_XML_DECLARATION; - - global $default_prefixes; - foreach($default_prefixes as $key => $value){ - $this->addNamespacePrefix($key,$value); - } - - require_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - } - - /** - * Serializer congiguration: Sort Model - * Flag if the serializer should sort the model by subject before serializing. - * TRUE makes the RDF code more compact. - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configSortModel($bool) { - $this->sort_model = $bool; - } - - /** - * Serializer congiguration: Use Entities - * Flag if the serializer should use entities for URIs. - * TRUE makes the RDF code more compact. - * FALSE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseEntities($bool) { - $this->use_entities = $bool; - } - - /** - * Serializer congiguration: Use Attributes - * Flag if the serializer should serialize triples as XML attributes where possible. - * TRUE makes the RDF code more compact. - * FALSE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseAttributes($bool) { - $this->use_attributes = $bool; - } - - /** - * Serializer congiguration: Use Qnames - * Flag if the serializer should use qualified names for RDF reserved words. - * TRUE makes the RDF code more compact. - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseQnames($bool) { - $this->rdf_qnames = $bool; - } - - /** - * Serializer congiguration: Use XML Declaration - * Flag if the serializer should start documents with the xml declaration - * . - * TRUE is default. Default can be changed in constants.php. - * - * @param boolean - * @access public - */ - function configUseXmlDeclaration($bool) { - $this->use_xml_declaration = $bool; - } - - - /** - * Adds a new prefix/namespace combination. - * - * @param String $prefix - * @param String $namespace - * @access public - */ - function addNamespacePrefix($prefix, $namespace) { - $this->m_defaultNamespaces[$prefix] = $namespace; - } - - /** - * Serializes a model to RDF syntax. - * RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean), - * config_sort_model($boolean). - * NOTE: There is only one default namespace allowed within an XML document. - * Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass - * another $xml_default_namespace as parameter, the model will be serialized - * as if SER_RDF_QNAMES were set to TRUE. - * - * @param object MemModel $model - * @param String $encoding - * @return string - * @access public - */ - function & serialize(&$model, $xml_default_namespace = NULL, $encoding = DEFAULT_ENCODING) { - - if ($xml_default_namespace) { - - if ($xml_default_namespace == RDF_NAMESPACE_URI) { - $this->rdf_qnames = FALSE; - unset($this->m_defaultNamespaces[RDF_NAMESPACE_PREFIX]); - } - elseif ($xml_default_namespace == RDF_SCHEMA_URI) { - unset($this->m_defaultNamespaces[RDF_SCHEMA_PREFIX]); - } - elseif (!SER_RDF_QNAMES) - $this->rdf_qnames = TRUE; - - $this->addNamespacePrefix(NULL, $xml_default_namespace); - } - - //copy parsed namespaces - $nsps = array(); - $nsps = $model->getParsedNamespaces(); - foreach($this->m_defaultNamespaces as $prefix => $namespace){ - if(!isset ($nsps[$namespace])) - $nsps[$namespace] = $prefix; - } - - // define rdf prefix (qname or not) - if ($this->rdf_qnames){ - if(isset($nsps[RDF_NAMESPACE_URI])){ - $this->rdf_qname_prefix = $nsps[RDF_NAMESPACE_URI].':'; - }else{ - $this->rdf_qname_prefix = RDF_NAMESPACE_PREFIX . ':'; - } - - }else{ - $this->rdf_qname_prefix = ''; - } - // check if model is empty - if ($model->size() == 0) return "<". $this->rdf_qname_prefix . RDF_RDF ." xmlns:rdf='".RDF_NAMESPACE_URI."' />"; - - foreach($nsps as $ns => $pre){ - $this->m_namespaces[$pre] = $ns; - } - - - // set base URI - if ($model->getBaseURI()==NULL) - $this->m_baseURI="opaque:uri"; - else - $this->m_baseURI=$model->getBaseURI(); - - - if ($this->sort_model) { - // sort the array of statements - - foreach($model->triples as $key => $statement) { - $stmkey = $statement->subj->getURI() . - $statement->pred->getURI() . - (is_a($statement->obj,'Literal')?'"'.$statement->obj->getLabel().'"@'.$statement->obj->getLanguage().'^^'.$statement->obj->getDatatype():$statement->obj->getURI()); - $this->m_statements[$stmkey] = $statement; - } - ksort($this->m_statements); - - /* - // Sort using the PHP usort() function. Slower :-( - $this->m_statements = $model->triples; - usort($this->m_statements, "statementsorter"); - */ - } else { - $this->m_statements = $model->triples; - } - // collects namespaces - $this->m_nextAutomaticPrefixIndex=0; - $this->collectNamespaces($model); - - // start writing the contents - $this->m_out=""; - if ($this->use_xml_declaration) - $this->m_out .= '' . LINEFEED; - if (!HIDE_ADVERTISE) - $this->m_out.="".LINEFEED.LINEFEED ; - - // write entitie declarations - if($this->use_entities) { - $this->m_out .= 'rdf_qname_prefix . - RDF_RDF.' [' . LINEFEED; - $this->writeEntityDeclarations(); - $this->m_out .= LINEFEED . ']>' . LINEFEED; - } - - // start the RDF text - $this->m_out .= '<' . $this->rdf_qname_prefix . RDF_RDF; - - // write the xml:base - if ($model->getBaseURI() != NULL) - $this->m_out .= LINEFEED. INDENTATION .'xml:base="'.$model->getBaseURI().'"'; - - // write namespaces declarations - $this->writeNamespaceDeclarations(); - $this->m_out .='>'. LINEFEED; - - // write triples - $this->writeDescriptions(); - - $this->m_out .= LINEFEED; - $this->m_out .='rdf_qname_prefix . RDF_RDF .'>'; - - $this->m_namespaces=null; - $this->m_statements=null; - $this->m_currentSubject=null; - $this->m_groupTypeStatement=null; - $this->m_attributeStatements=null; - $this->m_contentStatements=null; - $this->m_rdfResourceElementText=null; - - return $this->m_out; - } - - /** - * Serializes a model and saves it into a file. - * Returns FALSE if the model couldn't be saved to the file. - * - * @param object MemModel $model - * @param String $encoding - * @return boolean - * @access public - */ - function saveAs(&$model, $filename, $encoding = DEFAULT_ENCODING) { - // serialize model - $RDF = $this->serialize($model, NULL, $encoding); - - //write serialized model to file - $file_handle = @fopen($filename, 'w'); - if ($file_handle) { - fwrite($file_handle, $RDF); - fclose($file_handle); - return TRUE; - } else { - return FALSE; - }; - } - - /** - * @access private - */ - function writeEntityDeclarations() { - foreach($this->m_namespaces as $prefix => $namespace) { - $this->m_out .= INDENTATION . '".LINEFEED; - } - } - - /** - * @access private - */ - function writeNamespaceDeclarations() { - foreach($this->m_namespaces as $prefix => $namespace) { - - if ($prefix == RDF_NAMESPACE_PREFIX && !$this->rdf_qnames) { - - if($this->use_entities) { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX . - '="&' . $prefix . ';"'; - } else { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX . - '="' . $namespace . '"'; - } - } else { - if ($prefix == NULL) - $colon_prefix = $prefix; - else - $colon_prefix = ":" .$prefix; - - if($this->use_entities) { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX - .$colon_prefix .'="&' . $prefix . ';"'; - } else { - $this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX - .$colon_prefix .'="' . $namespace . '"'; - } - } - } - } - - /** - * @access private - */ - function writeDescriptions() { - - $this->m_groupTypeStatement = NULL; - $this->m_attributeStatements = array(); - $this->m_contentStatements = array(); - $this->m_currentSubject = NULL; - - foreach($this->m_statements as $key => $statement) { - $subject = $statement->getSubject(); - $predicate = $statement->getPredicate(); - $object = $statement->getobject(); - - // write Group and update current subject if nessesary - if ($this->m_currentSubject==NULL || !$this->m_currentSubject->equals($subject)) { - $this->writeGroup(); - $this->m_currentSubject=$subject; - } - - // classify the statement - if (($predicate->getURI() == RDF_NAMESPACE_URI.RDF_TYPE) && is_a($object, 'Resource') && !$this->m_groupTypeStatement) { - $this->writeGroup(); - $this->m_groupTypeStatement = $statement; - } - elseif ($this->canAbbreviateValue($object) && - $this->use_attributes && - $this->checkForDoubleAttributes($predicate)) - { - if (is_a($object, 'Literal')) { - if ($object->getDatatype() == NULL) { - $this->m_attributeStatements[] = $statement; - } else { - $this->m_contentStatements[] = $statement; - } - } else { - $this->m_attributeStatements[] = $statement; - } - } else { - $this->m_contentStatements[] = $statement; - } - } - $this->writeGroup(); - } - - /** - * @access private - */ - function writeGroup() { - if ($this->m_currentSubject==NULL || ($this->m_groupTypeStatement==NULL && (count($this->m_attributeStatements)==0) && (count($this->m_contentStatements)==0))) - return; - if ($this->m_groupTypeStatement!=NULL) - $outerElementName=$this->getElementText($this->m_groupTypeStatement->obj->getURI()); - else - $outerElementName = $this->rdf_qname_prefix . RDF_DESCRIPTION; - $this->m_out .= LINEFEED . '<'; - $this->m_out .= $outerElementName; - - $this->m_out .= ' '; - - - $this->writeSubjectURI($this->m_currentSubject); - - // attribute Statements - if ($this->use_attributes) - $this->writeAttributeStatements(); - - if (count($this->m_contentStatements)==0) - $this->m_out .= '/>' . LINEFEED; - else { - $this->m_out .= '>' . LINEFEED; - - // content statements - $this->writeContentStatements(); - - $this->m_out .= 'm_out .= $outerElementName; - $this->m_out .= '>'. LINEFEED; - } - $this->m_groupTypeStatement = NULL; - $this->m_attributeStatements = array(); - $this->m_contentStatements = array(); - } - - /** - * @param object Node $predicate - * @access private - */ - function checkForDoubleAttributes($predicate) { - foreach($this->m_attributeStatements as $key => $statement) { - if ($statement->pred->equals($predicate)) - return FALSE; - } - return TRUE; - } - - /** - * @param STRING $uri - * @access private - */ - function relativizeURI($uri) { - $uri_namespace = RDFUtil::guessNamespace($uri); - if ($uri_namespace == $this->m_baseURI) { - return RDFUtil::guessName($uri); - } else { - return $uri; - } - } - - /** - * @param object Node $subject_node - * - * @access private - */ - - function writeSubjectURI($subject_node) { - $currentSubjectURI = $subject_node->getURI(); - $relativizedURI = $this->relativizeURI($currentSubjectURI); - - // if submitted subject ist a blank node, use rdf:nodeID - if (is_a($this->m_currentSubject, 'BlankNode')) { - $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID; - $this->m_out .= '="'; - $this->m_out .= $relativizedURI; - } else { - - - if (!($relativizedURI == $currentSubjectURI)) { - $this->m_out .= $this->rdf_qname_prefix . RDF_ID; - $this->m_out .= '="'; - $this->m_out .= $relativizedURI; - } else { - $this->m_out .= $this->rdf_qname_prefix . RDF_ABOUT; - $this->m_out .= '="'; - $this->writeAbsoluteResourceReference($relativizedURI); - }; - }; - $this->m_out .= '"'; - } - - /** - * @access private - */ - function writeAttributeStatements() { - foreach($this->m_attributeStatements as $key => $statement) { - $this->m_out .= LINEFEED; - $this->m_out .= INDENTATION; - $this->m_out .= $this->getElementText($statement->pred->getURI()); - $this->m_out .= '='; - $value=$statement->obj->getLabel(); - $quote=$this->getValueQuoteType($value); - $this->m_out .= $quote; - $this->m_out .= $value; - $this->m_out .= $quote; - } - } - - /** - * @access private - */ - function writeContentStatements() { - foreach($this->m_contentStatements as $key => $statement) { - $this->m_out .= INDENTATION; - $this->m_out .= '<'; - $predicateElementText=$this->getElementText($statement->pred->getURI()); - $this->m_out .= $predicateElementText; - - if (is_a($statement->obj, 'Resource')) { - $this->writeResourceReference($statement->obj); - $this->m_out .= '/>' . LINEFEED; - } else { - if(is_a($statement->obj, 'Literal')) { - if ($statement->obj->getDatatype()!= NULL) - if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) { - $this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_PARSE_TYPE . '="' . RDF_PARSE_TYPE_LITERAL . '"'; - } else { - $this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_DATATYPE . '="' . $statement->obj->getDatatype() . '"'; - } - if ($statement->obj->getLanguage()!= NULL) - $this->m_out .= ' ' . XML_NAMESPACE_PREFIX . ':' . XML_LANG . '="' . $statement->obj->getLanguage() . '"'; - }; - $this->m_out .= '>'; - if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) { - $this->m_out .= $statement->obj->getLabel(); - } else { - $this->writeTextValue($statement->obj->getLabel()); - } - $this->m_out .= 'm_out .= $predicateElementText; - $this->m_out .= '>' . LINEFEED; - } - } - } - - /** - * @param Object $object_node - * @access private - */ - function writeResourceReference($object_node) { - $rebaseURI = $object_node->getURI(); - $this->m_out .= ' '; - if (is_a($object_node, 'BlankNode')) { - $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID; - } else { - $this->m_out .= $this->rdf_qname_prefix . RDF_RESOURCE; - }; - - $this->m_out .= '="'; - $relativizedURI = $this->relativizeURI($rebaseURI); - if (!($relativizedURI == $rebaseURI)) - if (!is_a($object_node, 'BlankNode')) - $this->m_out .= '#' . $relativizedURI; - else - $this->m_out .= $relativizedURI; - else - $this->writeAbsoluteResourceReference($rebaseURI); - $this->m_out .= '"'; - } - - - /** - * @param String $rebaseURI - * @access private - */ - function writeAbsoluteResourceReference($rebaseURI) { - $namespace=RDFUtil::guessNamespace($rebaseURI); - $localName=RDFUtil::guessName($rebaseURI); - $text=$rebaseURI; - if ($namespace!='' and $this->use_entities) { - $prefix= array_search($namespace, $this->m_namespaces); - $text='&'.$prefix.';'.$localName; - } else $text = RDFUtil::escapeValue($text); - $this->m_out .= $text; - } - - /** - * @param STRING $textValue - * @access private - */ - function writeTextValue($textValue) { - if ($this->getValueQuoteType($textValue)==USE_CDATA) - $this->writeEscapedCDATA($textValue); - else - $this->m_out .= $textValue; - } - - /** - * @param STRING $textValue - * @access private - */ - function writeEscapedCDATA($textValue) { - $this->m_out .= ''; - } - - /** - * @param STRING $textValue - * @access private - */ - function getValueQuoteType($textValue) { - $quote=USE_ANY_QUOTE; - $hasBreaks=FALSE; - $whiteSpaceOnly=TRUE; - for ($i=0; $i' || $c=='&') - return USE_CDATA; - if ($c==LINEFEED) - $hasBreaks=TRUE; - if ($c=='"' || $c=="\'") { - if ($quote==USE_ANY_QUOTE) - $quote=($c=='"') ? "\'" : "\""; - elseif ($c==$quote) - return USE_CDATA; - } - if (!($c == ' ')) - $whiteSpaceOnly = FALSE; - } - if ($whiteSpaceOnly || $hasBreaks) - return USE_CDATA; - return $quote==USE_ANY_QUOTE ? '"' : $quote; - } - - /** - * @param object Node $node - * @access private - */ - function canAbbreviateValue($node) { - if (is_a($node, 'Literal')) { - $value= $node->getLabel(); - if (strlen($value)getValueQuoteType($value); - return $c=='"' || $c=='\''; - } - } - return FALSE; - } - - /** - * @param STRING $elementName - * @access private - */ - function getElementText($elementName) { - $namespace=RDFUtil::guessNamespace($elementName); - $localName=RDFUtil::guessName($elementName); - if ($namespace=="") - return $localName; - $prefix=array_search($namespace, $this->m_namespaces); - - if ($prefix===FALSE) { - $errmsg = RDFAPI_ERROR . "(class: Serializer; method: getElementText): Prefix for element '" . $elementName . "' cannot be found."; - trigger_error($errmsg, E_USER_ERROR); - } - switch ($prefix) { - case RDF_NAMESPACE_PREFIX: - return $this->rdf_qname_prefix . $localName; - case NULL: - return $localName; - default: - return $prefix. ":" .$localName; - } - } - - /** - * @param object MemModel $model - * @access private - */ - function collectNamespaces($model) { - foreach($model->triples as $key => $value) { - - if ($this->use_entities) { - $this->collectNamespace($value->getSubject()); - if(!is_a($value->getObject(), 'Literal')) - $this->collectNamespace($value->getObject()); - - } else { - - if ($value->pred->getURI() == RDF_NAMESPACE_URI.RDF_TYPE) - $this->collectNamespace($value->getObject()); - elseif - (($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBCLASSOF) || - ($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBPROPERTYOF)) { - $this->collectNamespace($value->getSubject()); - $this->collectNamespace($value->getObject()); - } - } - - $this->collectNamespace($value->getPredicate()); - - } - } - - /** - * @param object Resource $resource - * @access private - */ - function collectNamespace($resource) { - - $namespace=RDFUtil::getNamespace($resource); - if (!in_array($namespace, $this->m_namespaces)&&$namespace!='') { - $prefix = array_search( $namespace, $this->m_defaultNamespaces); - if ($prefix===FALSE) - $prefix=$this->getNextNamespacePrefix(); - $this->m_namespaces[$prefix] = $namespace; - } - } - - /** - * @access private - */ - function getNextNamespacePrefix() { - $this->m_nextAutomaticPrefixIndex++; - return GENERAL_PREFIX_BASE . $this->m_nextAutomaticPrefixIndex; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RssParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RssParser.php deleted file mode 100755 index 53a12786..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/RssParser.php +++ /dev/null @@ -1,245 +0,0 @@ -. MagpieRSS is - * compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions). - * Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/) - * - * - * - * @author Tobias Gau - * @version $Id: RssParser.php 301 2006-06-26 10:22:25Z tgauss $ - * @package syntax - * @access public - **/ - -class RssParser extends Object { - var $type; - - /** - * Main function - * - * @param $url location of the document - * @return parsed model - */ - function generateModel($url){ - $rss = null; - if(substr($url,0,7)=="http://"){ - $rss = fetch_rss($url); - }else{ - $string = file_get_contents($url); - $rss = new MagpieRSS($string); - } - - $model = ModelFactory::getMemModel(); - $bn = new Resource($url); - - $this->type = $rss->feed_type; - $version = $rss->feed_version; - - $nmsp = null; - if($version == "1.0") - $nmsp = "http://purl.org/rss/1.0/"; - if($version == "0.91") - $nmsp = "http://my.netscape.com/publish/formats/rss-spec-0.91.html#"; - if($version == "2.0") - $nmsp = "http://purl.org/rss/1.0/"; - if($this->type == "Atom") - $nmsp = "http://www.w3.org/2005/Atom"; - - if($this->type == "Atom") - $this->channel($model,$rss,$bn,$nmsp,"feed"); - else - $this->channel($model,$rss,$bn,$nmsp,"channel"); - $this->image($model,$rss,$bn,$nmsp); - $this->items($model,$rss,$bn,$nmsp); - $model->addNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"); - if($nmsp!= null) - $model->addNamespace($this->type,$nmsp); - return $model; - } - - /** - * Parses the image if there is one. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $bnOrg the node which represents the channel - * @param $nmsp the - */ - function image(&$model,&$rss,&$bnOrg,&$nmsp){ - if(count($rss->image)>0){ - if(isset($rss->image['about'])){ - $bn = new Resource($rss->image['about']); - }else if(isset($rss->image['url'])){ - $bn = new Resource($rss->image['url']); - }else{ - $bn = new BlankNode("image"); - } - $model->add(new Statement($bnOrg,new Resource($nmsp."image"),$bn)); - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource($nmsp."image"))); - } - foreach($rss->image as $key => $value){ - $statement = null; - switch($key){ - case "dc": - $this->dc($bn,$model,$value); - break; - case "sy": - $this->sy($bn,$model,$value); - break; - default : - $statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } - - } - - /** - * Parses the rss items/ atom entries. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $bnOrg the node which represents the channel - * @param $nmsp the - */ - function items(&$model,&$rss,&$bnOrg,&$nmsp){ - $items = new BlankNode("items"); - $model->add(new Statement($bnOrg,new Resource($nmsp."items"),$items)); - $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"))); - $i = 1; - foreach($rss->items as $outerKey => $outerValue){ - if(isset($outerValue['about'])){ - $bn = new Resource($outerValue['about']); - }else if(isset($outerValue['guid'])){ - $bn = new Resource($outerValue['guid']); - }else if(isset($outerValue['id'])){ - $bn = new Resource($outerValue['id']); - }else{ - $bn = new Blanknode("item".$i); - } - $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#_".$i),$bn)); - if($this->type == "Atom"){ - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/2005/Atomentry"))); - }else{ - $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://purl.org/rss/1.0/item"))); - } - foreach($outerValue as $key => $value){ - $statement = null; - switch($key){ - case "about": - break; - case "guid": - break; - case "dc": - $this->dc($bn,$model,$value); - break; - case "sy": - $this->sy($bn,$model,$value); - break; - default : - if($value != null) - $statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } - $i++; - } - - } - - /** - * Adds the dc namespace. - * - * @param $node the node - * @param $model the model - * @param $dc Array which contains the dc objects - */ - function dc(&$node,&$model,&$dc){ - $model->addNamespace("dc","http://purl.org/dc/elements/1.1/"); - foreach($dc as $key => $value){ - $statement = null; - $statement = new Statement($node,new Resource("http://purl.org/dc/elements/1.1/".$key), new Literal($value)); - if($statement != null){ - $model->add($statement); - } - } - } - - /** - * Adds the sy namespace. - * - * @param $node the node - * @param $model the model - * @param $sy Array which contains the sy objects - */ - function sy(&$node,&$model,&$sy){ - $model->addNamespace("sy","http://purl.org/rss/1.0/modules/syndication/"); - foreach($sy as $key => $value){ - $statement = null; - $statement = new Statement($node,new Resource("http://purl.org/rss/1.0/modules/syndication/".$key), new Literal($value)); - if($statement != null){ - $model->add($statement); - } - } - - } - - - /** - * Parses the rss channel/ atom feed. - * - * @param $model the model - * @param $rss the magpie parser object - * @param $node the node which represents the channel - * @param $nmsp the - */ - function channel(&$model,&$rss,&$node,&$nmsp,$type){ - // Channel - $statement = new Statement($node,new Resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), new Resource($nmsp.$type)); - $model->add($statement); - - foreach($rss->channel as $key => $value){ - $statement = null; - switch($key){ - case "dc": - $this->dc($node,$model,$value); - break; - case "sy": - $this->sy($node,$model,$value); - break; - case "items": - break; - case "tagline": - break; - case "items_seq": - break; - default : - $statement = new Statement($node,new Resource($nmsp.$key), new Literal($value)); - break; - } - if($statement != null){ - $model->add($statement); - } - } -} - - - -} //end: RssParser - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SparqlResultParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SparqlResultParser.php deleted file mode 100755 index eb442345..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SparqlResultParser.php +++ /dev/null @@ -1,164 +0,0 @@ - -* -* @package sparql -*/ - -class SparqlResultParser extends Object { - - - var $arrOutput = array(); - var $resParser; - var $strXmlData; - var $counter = -1; - var $mode = -1; - var $varname; - var $dtype; - var $lang; - var $varlist; - var $bncounter = 0; - var $current_literal; - - -/** -* Main function of SparqlResultParser -* -* @param String $strInputXML input document. -*/ - function parse($strInputXML) { - - $this->resParser = xml_parser_create (); - - xml_set_object($this->resParser,$this); - xml_set_element_handler($this->resParser, "tagOpen", "tagClosed"); - - xml_set_character_data_handler($this->resParser, "tagData"); - - $this->strXmlData = xml_parse($this->resParser,$strInputXML ); - if(!$this->strXmlData) { - echo "unable to parse result
    ". - "server returned:
    " - .$strInputXML; - - return "false"; - - } - - xml_parser_free($this->resParser); - - return $this->arrOutput; - } - -// private parser functions from here // - function tagOpen($parser, $name, $attrs) { - // $tag=array("name"=>$name,"attrs"=>$attrs); - // array_push($this->arrOutput,$tag); - if(strtolower($name)=="variable"){ - if(isset($attrs['name'])) - $this->varlist[]=$attrs['name']; - if(isset($attrs['NAME'])) - $this->varlist[]=$attrs['NAME']; - } - - if(strtolower($name)=="result"){ - $this->counter++; - if($this->counter > -1){ - foreach($this->varlist as $value){ - if(!isset($this->arrOutput[$this->counter][$value])) - $this->arrOutput[$this->counter]["?".$value]=''; - } - } - - } - if(strtolower($name)=="boolean"){ - $this->counter++; - $this->mode = 3; - } - if(strtolower($name)=="binding"){ - $this->varname = null; - $this->dtype = null; - $this->lang = null; - - if(isset($attrs['name'])){ - $this->varname = "?".$attrs['name']; - }else{ - $this->varname = "?".$attrs['NAME']; - } - } - if(strtolower($name)=="uri"){ - $this->mode = 0; - } - if(strtolower($name)=="literal"){ - $this->mode = 1; - $this->current_literal = ""; - if(isset($attrs['datatype'])){ - $this->dtype = $attrs['datatype']; - }else if(isset($attrs['DATATYPE'])){ - $this->dtype = $attrs['DATATYPE']; - } - if(isset($attrs['xml:lang'])){ - $this->lang = $attrs['datatype']; - }else if(isset($attrs['XML:lang'])){ - $this->lang = $attrs['XML:lang']; - }else if(isset($attrs['XML:LANG'])){ - $this->lang = $attrs['XML:LANG']; - }else if(isset($attrs['xml:LANG'])){ - $this->lang = $attrs['xml:LANG']; - } - } - if(strtolower($name)=="bnode"){ - $this->mode = 2; - } - } - - function tagData($parser, $tagData) { - switch($this->mode){ - case 0 : - $this->arrOutput[$this->counter][$this->varname] = new Resource($tagData); - $this->mode = -1; - break; - case 1: - $this->current_literal .= $tagData; - break; - case 2: - if($tagData=="/"){ - $bn = "bNode".$this->bncounter; - $this->bncounter++; - }else{ - $bn = $tagData; - } - $this->arrOutput[$this->counter][$this->varname] = new BlankNode($bn); - $this->mode = -1; - break; - case 3: - $this->arrOutput = $tagData; - $this->mode = -1; - break; - - } - - } - - function tagClosed($parser, $name) { - if ($this->mode == 1) { - $lit = new Literal($this->current_literal); - if($this->lang) - $lit->setLanguage($this->lang); - if($this->dtype) - $lit->setDatatype($this->dtype); - $this->arrOutput[$this->counter][$this->varname] = $lit ; - $this->mode = -1; - } - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxGRDDL.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxGRDDL.php deleted file mode 100755 index 4b831714..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxGRDDL.php +++ /dev/null @@ -1,16 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/GRDDLParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxJSON.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxJSON.php deleted file mode 100755 index 74951950..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxJSON.php +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxN3.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxN3.php deleted file mode 100755 index 5b023ba3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxN3.php +++ /dev/null @@ -1,18 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Parser.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Serializer.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRDF.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRDF.php deleted file mode 100755 index 3cde490b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRDF.php +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfParser.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfSerializer.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRSS.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRSS.php deleted file mode 100755 index c105267c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxRSS.php +++ /dev/null @@ -1,17 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_fetch.inc' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_parse.inc' ); -require_once( RDFAPI_INCLUDE_DIR . 'syntax/RssParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxSparqlRes.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxSparqlRes.php deleted file mode 100755 index 6c549597..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/SyntaxSparqlRes.php +++ /dev/null @@ -1,15 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - - -// Include Syntax classes -require_once( RDFAPI_INCLUDE_DIR . 'syntax/SparqlResultParser.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXParser.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXParser.php deleted file mode 100755 index 10a41849..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXParser.php +++ /dev/null @@ -1,135 +0,0 @@ - V5) -* Currently, it doesn't support any namespaces and has problems with typed literals. -* So this parser only works with TRIX documents where the default namespace is the TRIX namespace. -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* @package dataset -* @access public -**/ -class TriXParser -{ - /** - * Reference to the graphSet - * - * @var GraphSet - * @access private - */ - var $graphSet; - - /** - * Constructor - * Needs a reference to a graphSet - * - * @param GraphSet - * @access public - */ - function TriXParser(&$graphSet) - { - $this->graphSet=&$graphSet; - } - - /** - * Parse an XML string - * - * @param string - * @access public - */ - function parseString($string) - { - $this->_populateGraphSet(simplexml_load_string($string)); - } - - /** - * Parse from a file - * - * @param string - * @access public - */ - function parseFile($pathToFile) - { - $this->_populateGraphSet(simplexml_load_file($pathToFile)); - } - - /** - * Populates the graphSet with namedGraphs and triples. - * - * @param object simpleXMLModel $xmlModel - * @access private - */ - function _populateGraphSet(&$xmlModel) - { - $defaultGraphOccurred=false; - - foreach ($xmlModel->graph as $graph) - { - if (isset($graph->uri)) - { - $graphName=(string)$graph->uri; - $namedGraph=& $this->graphSet->getNamedGraph($graphName); - if ($namedGraph ==null) - $namedGraph=& $this->graphSet->createGraph($graphName); - } else - { - if ($defaultGraphOccurred) - trigger_error('Only one unnamed Graph per file allowed', E_USER_ERROR); - - $namedGraph=& $this->graphSet->getDefaultGraph(); - $defaultGraphOccurred=true; - } - - foreach ($graph->triple as $triple) - { - $tripleCount=0; - $tripleArray=array(); - foreach ($triple->children() as $tag => $value) - { - $tripleArray[$tripleCount++]=$this->_element2Resource((string)$tag,$value); - }; - $namedGraph->add(new Statement($tripleArray[0],$tripleArray[1],$tripleArray[2])); - }; - }; - } - - /** - * return a mathing resource tyoe - * - * @param string - * @param object simpleXMLNode $value - * @access private - */ - function _element2Resource($tag,$value) - { - switch ($tag) - { - case 'uri': - return new Resource((string)$value); - break; - - case 'id': - return new BlankNode((string)$value); - break; - - case 'typedLiteral': - $literal=new Literal((string)$value); - $literal->setDatatype((string)$value['datatype']); - return $literal; - break; - - case 'plainLiteral': - $literal=new Literal((string)$value); - if(isset($value['xml:lang'])) - $literal->setLanguage((string)$value['xml:lang']); - return $literal; - break; - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXSerializer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXSerializer.php deleted file mode 100755 index 2b1d674f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/TriXSerializer.php +++ /dev/null @@ -1,151 +0,0 @@ -graphSet=&$graphSet; - } - - /** - * Serialize the dataset to a TriX string - * - * @return string - * @access public - */ - function & serializeToString() - { - return $this->_serialize(); - } - - /** - * Serialize the dataset to a TriX string and save in file - * - * @param string - * @access public - */ - function serializeToFile($fileName) - { - $serializedString=&$this->_serialize(); - $handle = fopen($fileName, 'w'); - fwrite($handle, $serializedString); - fclose($handle); - } - - - /** - * Serialize the dataset to a TriX string - * - * @return string - * @access private - */ - function & _serialize() - { - //Trix header - $serializedString= - ''. - ''; - - //serialize defaultGraph if it is not empty - $defaultGraph=& $this->graphSet->getDefaultGraph(); - if ($defaultGraph->isEmpty()===false) - { - $serializedString.=''; - for($iterator = $this->graphSet->findInDefaultGraph(null,null,null); $iterator->valid(); $iterator->next()) - { - $serializedString.=''; - - $statement=$iterator->current(); - - $serializedString.=$this->_node2string($statement->getSubject()); - $serializedString.=$this->_node2string($statement->getPredicate()); - $serializedString.=$this->_node2string($statement->getObject()); - - $serializedString.=''; - }; - $serializedString.=''; - } - - //serialize namedGraphs - foreach ($this->graphSet->listGraphNames() as $graphName) - { - $serializedString.=''; - $serializedString.=''.$graphName.''; - for($iterator = $this->graphSet->findInNamedGraphs(new Resource($graphName),null,null,null); $iterator->valid(); $iterator->next()) - { - $serializedString.=''; - - $statement=$iterator->current(); - - $serializedString.=$this->_node2string($statement->getSubject()); - $serializedString.=$this->_node2string($statement->getPredicate()); - $serializedString.=$this->_node2string($statement->getObject()); - - $serializedString.=''; - }; - $serializedString.=''; - }; - //TriX footer - $serializedString.=''; - return $serializedString; - } - - /** - * Serialize node to a TriX string - * - * @param Node - * @return string - * @access private - */ - function _node2string($node) - { - switch ($node) - { - case (is_a($node,'BlankNode')): - return (''.$node->getLabel().''); - - case (is_a($node,'Resource')): - return (''.$node->getLabel().''); - - case (is_a($node,'Literal')): - - if ($node->dtype!=null) - return (''.$node->getLabel().''); - - if ($node->lang!=null) - return (''.$node->getLabel().''); - - return (''.htmlentities($node->getLabel()).''); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/all-wcprops deleted file mode 100755 index ba05ccb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/all-wcprops +++ /dev/null @@ -1,47 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 58 -/svnroot/rdfapi-php/!svn/ver/375/trunk/rdfapi-php/api/util -END -RdfUtil.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/295/trunk/rdfapi-php/api/util/RdfUtil.php -END -FindIterator.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/util/FindIterator.php -END -StatementIterator.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/util/StatementIterator.php -END -Utility.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/api/util/Utility.php -END -IterFind.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/util/IterFind.php -END -Object.php -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/295/trunk/rdfapi-php/api/util/Object.php -END -ModelComparator.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/301/trunk/rdfapi-php/api/util/ModelComparator.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/entries deleted file mode 100755 index d09925ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/entries +++ /dev/null @@ -1,125 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-29T16:02:59.000000Z -375 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -RdfUtil.php -file - - - - -2008-02-29T14:57:56.878616Z -c3cad683b024581cd0876db334a35610 -2006-06-23T06:45:53.000000Z -295 -tgauss -has-props - -FindIterator.php -file - - - - -2008-02-29T14:57:56.878616Z -56f9ae9350add0ac206b5943e28ce8fa -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -magpie -dir - -StatementIterator.php -file - - - - -2008-02-29T14:57:56.894237Z -a89a067cfcb126671aa3f923fbcc13ec -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -adodb -dir - -Utility.php -file - - - - -2008-02-29T14:57:56.894237Z -c0aa90c531e7458b9fdc71a617b26029 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -IterFind.php -file - - - - -2008-02-29T14:57:56.909858Z -acaca8ea38aabf7af8b98b9493a0415e -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -Object.php -file - - - - -2008-02-29T14:57:56.909858Z -cb21a92ad12d78d6f4a6cc8569cbee78 -2006-06-23T06:45:53.000000Z -295 -tgauss -has-props - -ModelComparator.php -file - - - - -2008-02-29T14:57:56.909858Z -c069b39cb9e8add76f2b5a31ddca1914 -2006-06-26T10:22:25.000000Z -301 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/FindIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/FindIterator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/FindIterator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/IterFind.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/IterFind.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/IterFind.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/ModelComparator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/ModelComparator.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/ModelComparator.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Object.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Object.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Object.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/RdfUtil.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/RdfUtil.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/RdfUtil.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/StatementIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/StatementIterator.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/StatementIterator.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Utility.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Utility.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/prop-base/Utility.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/FindIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/FindIterator.php.svn-base deleted file mode 100755 index 429f99fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/FindIterator.php.svn-base +++ /dev/null @@ -1,119 +0,0 @@ -findAsIterator() - * Using a find iterator is significantly faster than using model->find() which returns - * a new result model. - * - * - * @version $Id$ - * @author Tobias Gau - * - * @package utility - * @access public - * - */ - class FindIterator extends Object { - - /** - * Reference to the MemModel - * @var object MemModel - * @access private - */ - var $model; - - - - /** - * Current position - * FindIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single MemModel. - * @var integer - * @access private - */ - var $position; - - - /** - * Searchpattern - * - * @var Object Subject,Predicate,Object - * @access private - */ - - var $subject; - var $predicate; - var $object; - - - /** - * Constructor - * - * @param object MemModel - * @param object Subject - * @param object Predicate - * @param object Object - * @access public - */ - function FindIterator(&$model,$sub,$pred,$obj) { - $this->model = &$model; - $this->subject=$sub; - $this->predicate=$pred; - $this->object=$obj; - $this->position=-1; - } - - - /** - * Returns TRUE if there are more matching statements. - * @return boolean - * @access public - */ - function hasNext() { - if($this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1)>-1){ - return TRUE; - }else{ - return FALSE; - } - } - - - /** - * Returns the next matching statement. - * @return statement or NULL if there is no next matching statement. - * @access public - */ - function next() { - $res=$this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1); - if($res>-1){ - $this->position=$res; - return $this->model->triples[$res]; - }else{ - return Null; - } - } - - - - - /** - * Returns the current matching statement. - * @return statement or NULL if there is no current matching statement. - * @access public - */ - function current() { - if (($this->position >= -1)&&(isset($this->model->triples[$this->position]))) { - return $this->model->triples[$this->position]; - } else { - return NULL; - } - } - - } - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/IterFind.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/IterFind.php.svn-base deleted file mode 100755 index 149f4893..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/IterFind.php.svn-base +++ /dev/null @@ -1,174 +0,0 @@ -iterFind(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $statement=$iterator->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* -* @package utility -* @access public -**/ -class IterFind -{ - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - /** - * boolean value, if the results should be returned as Quads - * @var boolean - * @access private - */ - var $returnAsQuads; - - /** - * If the current resource is valid - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph - * @var obejct NamedGraph - * @access private - */ - var $current; - - /** - * The graph to look in. - * @var string - * @access private - */ - var $findGraph; - - /** - * The subject Resource to search for - * @var string - * @access private - */ - var $findSubject; - - /** - * The predicate Resource to search for - * @var string - * @access private - */ - var $findPredicate; - - /** - * The object Resource to search for - * @var string - * @access private - */ - var $findObject; - - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like find(). - * $graph has to be a reference to the graph to search in. - * - * - * - * @param $graph Resource - * @param $subject Resource - * @param $predicate Resource - * @param $object Resource - * @param $returnAsQuads boolean - * @access public - */ - function IterFind($graph,$subject,$predicate,$object,$returnAsQuads=false) - { - if ($graph==NULL) - { - $this->valid=false; - return; - } - $this->findGraph=&$graph; - $this->findSubject=$subject; - $this->findPredicate=$predicate; - $this->findObject=$object; - $this->rewind(); - $this->returnAsQuads=$returnAsQuads; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->current = $this->findGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->key); - $this->valid=($this->current!=NULL); - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function current() - { - if($this->returnAsQuads) - return new Quad(new Resource($this->findGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject()); - //else - return $this->current; - } - - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/ModelComparator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/ModelComparator.php.svn-base deleted file mode 100755 index bdcb77c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/ModelComparator.php.svn-base +++ /dev/null @@ -1,158 +0,0 @@ -Signing RDF Graphs - * by Jeremy J. Carroll. - * - * - * @version $Id$ - * @author Tobias Gau - * - * @package utility - * @access public - * - **/ - class ModelComparator extends Object { - - /** - * Compares two models. - * - * @param $thisModel First Model. - * @param $thatModel Second Model. - * - * @return boolean - */ - function compare($thisModel, $thatModel){ - - $thisModeltriples = null; - $thatModeltriples = null; - - if(is_a($thisModel,"DbModel")){ - $thisModeltriples = $thisModel->getMemModel(); - }else{ - $thisModeltriples = $thisModel; - } - - if(is_a($thatModel,"DbModel")){ - $thatModeltriples = $thatModel->getMemModel(); - }else{ - $thatModeltriples = $thatModel; - } - - $sortArray1 = ModelComparator::buildSortArray($thisModeltriples->triples); - $sortArray2 = ModelComparator::buildSortArray($thatModeltriples->triples); - - $renamedArray1 = ModelComparator::renameBlanks($sortArray1); - $renamedArray2 = ModelComparator::renameBlanks($sortArray2); - - return ModelComparator::compareTriples($renamedArray1,$renamedArray2); - } - - - /** - * Builds a sorted array. - * - * @param $tripleList A List that contains the models triples. - * - * @return Array - */ - function buildSortArray($tripleList){ - $sortedArray = Array(); - - foreach($tripleList as $index => $triple){ - $sub = null; - $obj = null; - $orgSub = $triple->getSubject(); - $orgObj = $triple->getObject(); - - if(is_a($orgSub,"Blanknode")){ - $sub = $orgSub->getID(); - $triple->subj = new Blanknode("~"); - } - if(is_a($orgObj,"Blanknode")){ - $obj = $orgObj->getID(); - $triple->obj = new Blanknode("~"); - } - $sortedArray[$index]['string'] = $triple->toString(); - $sortedArray[$index]['index'] = $index; - $sortedArray[$index]['triple'] = $triple; - $sortedArray[$index]['sub'] = $sub; - $sortedArray[$index]['obj'] = $obj; - } - sort($sortedArray); - return $sortedArray; - } - - /** - * Renames the models Blanknodes. - * - * @param $sortedArray A List that contains the models triples. - * - * @return Array - */ - function renameBlanks($sortedArray){ - $i = 0; - $labelmap = Array(); - - foreach ($sortedArray as $value){ - //new label - if($value['sub']!=null){ - $label = null; - if(isset($labelmap[$value['sub']])){ - $label = $labelmap[$value['sub']]; - $value['triple']->subj = new BlankNode($labelmap[$value['sub']]); - }else{ - $label = $i."Bnode"; - $labelmap[$value['sub']]=$label; - $value['triple']->subj = new BlankNode($labelmap[$value['sub']]); - $i++; - } - } - - if($value['obj']!=null){ - $label = null; - if(isset($labelmap[$value['obj']])){ - $label = $labelmap[$value['obj']]; - $value['triple']->obj = new BlankNode($labelmap[$value['obj']]); - }else{ - $label = $i."Bnode"; - $labelmap[$value['obj']]=$label; - $value['triple']->obj = new BlankNode($labelmap[$value['obj']]); - $i++; - } - } - - } - return $sortedArray; - - } - - /** - * Compares the Triples in the lists. - * - * @param $tripleList A List that contains the models triples. - * @param $tripleList A List that contains the models triples. - * - * @return boolean - */ - function compareTriples($array1, $array2){ - foreach($array1 as $key => $value){ - if(!$value['triple']->equals($array2[$key]['triple'])) - return false; - } - return true; - - } - - - } - - - - ?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Object.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Object.php.svn-base deleted file mode 100755 index 6829ea51..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Object.php.svn-base +++ /dev/null @@ -1,37 +0,0 @@ - - * - * @abstract - * @package utility - * - **/ - class Object { - - /** - * Serializes a object into a string - * - * @access public - * @return string - */ - function toString() { - $objectvars = get_object_vars($this); - foreach($objectvars as $key => $value) - $content .= $key ."='". $value. "'; "; - return "Instance of " . get_class($this) ."; Properties: ". $content; - } - - } - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/RdfUtil.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/RdfUtil.php.svn-base deleted file mode 100755 index d88af7d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/RdfUtil.php.svn-base +++ /dev/null @@ -1,563 +0,0 @@ -, Daniel Westphal -* @author Anton Kstlbacher -* @package utility -* @access public -**/ -class RDFUtil extends Object { - - /** - * Extracts the namespace prefix out of a URI. - * - * @param String $uri - * @return string - * @access public - */ - function guessNamespace($uri) { - $l = RDFUtil::getNamespaceEnd($uri); - return $l > 1 ? substr($uri ,0, $l) : ""; - } - - /** - * Delivers the name out of the URI (without the namespace prefix). - * - * @param String $uri - * @return string - * @access public - */ - function guessName($uri) { - return substr($uri,RDFUtil::getNamespaceEnd($uri)); - } - - /** - * Extracts the namespace prefix out of the URI of a Resource. - * - * @param Object Resource $resource - * @return string - * @access public - */ - function getNamespace($resource) { - return RDFUtil::guessNamespace($resource->getURI()); - } - - /** - * Delivers the Localname (without the namespace prefix) out of the URI of a Resource. - * - * @param Object Resource $resource - * @return string - * @access public - */ - function getLocalName($resource) { - return RDFUtil::guessName($resource->getURI()); - } - - /** - * Position of the namespace end - * Method looks for # : and / - * @param String $uri - * @access private - */ - function getNamespaceEnd($uri) { - $l = strlen($uri)-1; - do { - $c = substr($uri, $l, 1); - if($c == '#' || $c == ':' || $c == '/') - break; - $l--; - } while ($l >= 0); - $l++; - return $l; - } - - /** - * Short Prefix for known Namespaces by given URI - * @param String $uri - * @access public - */ - function getPrefix($uri) { - switch (RDFUtil::guessNamespace($uri)) - { - case RDF_NAMESPACE_URI: - $prefix = RDF_NAMESPACE_PREFIX; - break; - - case RDF_SCHEMA_URI: - $short_p = RDF_SCHEMA_PREFIX; - break; - - case OWL_URI: - $short_p = OWL_PREFIX; - break; - - default: - $short_p = $statement->getLabelPredicate(); - } - return $short_p; - } - - - /** - * Tests if the URI of a resource belongs to the RDF syntax/model namespace. - * - * @param Object Resource $resource - * @return boolean - * @access public - */ - function isRDF($resource) { - return ($resource != NULL && RDFUtil::getNamespace($resource) == RDF_NAMESPACE_URI); - } - - /** - * Escapes < > and & - * - * @param String $textValue - * @return String - * @access public - */ - function escapeValue($textValue) { - - $textValue = str_replace('<', '<', $textValue); - $textValue = str_replace('>', '>', $textValue); - $textValue = str_replace('&', '&', $textValue); - - return $textValue; - } - - /** - * Converts an ordinal RDF resource to an integer. - * e.g. Resource(RDF:_1) => 1 - * - * @param object Resource $resource - * @return Integer - * @access public - */ - function getOrd($resource) { - if($resource == NULL || !is_a($resource, 'Resource') || !RDFUtil::isRDF($resource)) - return -1; - $name = RDFUtil::getLocalName($resource); - echo substr($name, 1).' '.RDFUtil::getLocalName($resource); - $n = substr($name, 1); - //noch rein : chekcen ob $n Nummer ist !!!!!!!!!!!!!!!!!!!!!!if($n) - return $n; - return -1; - } - - /** - * Creates ordinal RDF resource out of an integer. - * - * @param Integer $num - * @return object Resource - * @access public - */ - function createOrd($num) { - return new Resource(RDF_NAMESPACE_URI . '_' . $num); - } - - /** - * Prints a MemModel as HTML table. - * You can change the colors in the configuration file. - * - * @param object MemModel &$model - * @access public - */ - function writeHTMLTable(&$model) { - $nms = $model->getParsedNamespaces(); - $names = ''; - $pre = ''; - - - echo '' . LINEFEED; - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED; - echo INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . ''; - - echo ''; - $i=0; - if($nms != false){ - foreach($nms as $namespace => $prefix){ - if($i==0){ - $col = HTML_TABLE_NS_ROW_COLOR0; - }else{ - $col = HTML_TABLE_NS_ROW_COLOR1; - } - echo ''; - $i++; - $i%=2; - } - }else{ - echo ''; - } - - - - - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . '' . LINEFEED; - - $i = 1; - foreach($model->triples as $key => $statement) { - $infered=''; - if (is_a($statement,'InfStatement')) $infered='(infered)'; - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED; - // subject - echo INDENTATION . INDENTATION . '' . LINEFEED; - // predicate - echo INDENTATION . INDENTATION . '' . LINEFEED; - // object - echo INDENTATION . INDENTATION . '' . LINEFEED; - echo INDENTATION . '' . LINEFEED; - $i++; - } - echo '
    '; - echo '

    Base URI: ' . $model->getBaseURI() . '

    Size: ' . $model->size() . '

    Prefix:'.'
    Namespace:'.'
    '.$prefix.''.$namespace.'
    --

    No.

    Subject

    Predicate

    Object

    ' . $i . '.
    '.$infered.'

    '; - echo '

    ' . RDFUtil::getNodeTypeName($statement->getSubject()); - if(is_a($statement->subj,'Resource')){ - $ns = $statement->subj->getNamespace(); - if(isset($nms[$ns])){ - echo $nms[$ns].':'.RDFUtil::getLocalName($statement->subj); - }else{ - echo $statement->subj->getLabel(); - } - } - echo '

    '; - echo '

    ' . RDFUtil::getNodeTypeName($statement->getPredicate()); - if(is_a($statement->pred,'Resource')){ - $ns = $statement->pred->getNamespace(); - if(isset($nms[$ns])){ - echo $nms[$ns].':'.RDFUtil::getLocalName($statement->pred); - }else{ - echo $statement->pred->getLabel(); - } - } - echo '

    '; - echo '

    '; - if (is_a($statement->getObject(), 'Literal')) { - if ($statement->obj->getLanguage() != null) { - $lang = ' (xml:lang="' . $statement->obj->getLanguage() . '") '; - } ELSE $lang = ''; - if ($statement->obj->getDatatype() != null) { - $dtype = ' (rdf:datatype="' . $statement->obj->getDatatype() . '") '; - } ELSE $dtype = ''; - } else { - $lang = ''; - $dtype = ''; - } - $label = $statement->obj->getLabel(); - if(is_a($statement->obj,'Resource')){ - $ns = $statement->obj->getNamespace(); - if(isset($nms[$ns])){ - $label = $nms[$ns].':'.RDFUtil::getLocalName($statement->obj); - }else{ - $label = $statement->obj->getLabel(); - } - } - - echo RDFUtil::getNodeTypeName($statement->getObject()) - .nl2br(htmlspecialchars($label)) . $lang . $dtype; - - echo '

    ' . LINEFEED; - } - - /** - * Chooses a node color. - * Used by RDFUtil::writeHTMLTable() - * - * @param object Node $node - * @return object Resource - * @access private - */ - function chooseColor($node) { - if (is_a($node, 'BlankNode')) - return HTML_TABLE_BNODE_COLOR; - elseif (is_a($node, 'Literal')) - return HTML_TABLE_LITERAL_COLOR; - else { - if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || - RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || - RDFUtil::getNamespace($node) == OWL_URI - ) - - return HTML_TABLE_RDF_NS_COLOR; - } - return HTML_TABLE_RESOURCE_COLOR; - - } - - /** - * Get Node Type. - * Used by RDFUtil::writeHTMLTable() - * - * @param object Node $node - * @return object Resource - * @access private - */ - function getNodeTypeName($node) { - if (is_a($node, "BlankNode")) - return 'Blank Node: '; - elseif (is_a($node, 'Literal')) - return 'Literal: '; - else { - if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || - RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || - RDFUtil::getNamespace($node) == OWL_URI) - return 'RDF Node: '; - } - return 'Resource: '; - - } - - - /** - * Short Prefix for known and/or parsed Namespaces by given URI and Model - * Uses $default_prefixes defined in constants.php and getParsedNamespaces() - * Returns FALSE if no matching prefix is found - * - * @author Anton Kstlbacher - * @param string $uri - * @param object $model - * @return string, boolean - * @access public - * @throws PhpError - */ - - function guessPrefix($uri, &$model) - { - global $default_prefixes; - $namespace = RDFUtil::guessNamespace($uri); - $par_nms = $model->getParsedNamespaces(); - if (isset($par_nms[$namespace])) - { - $prefix = $par_nms[$namespace]; - } - else - { - $prefix = array_search($namespace, $default_prefixes); - } - if($prefix !== false) - { - return $prefix; - } - else - { - return false; - } - } - - - /** - * Generates a dot-file for drawing graphical output with the - * graphviz-application which can be downloaded at http://www.graphviz.org - * If the graphviz-application is installed and its path is set to the - * correct value in constants.php we can directly generate any - * file format graphviz supports, e.g. SVG, PNG - * Parameters: model to visualize, output format, use prefixes - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: Graphviz can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton Kstlbacher - * @param object Model - * @param string $format - * @param boolean $short_prefix - * @return string, binary - * @access public - * @throws PhpError - */ - - function visualizeGraph(&$model, $format = "input_dot", $short_prefix = TRUE) - { - global $graphviz_param; - $i = 0; - - foreach ($model->triples as $key => $statement) - { - $subject = $statement->getLabelSubject(); - $predicate = $statement->getLabelPredicate(); - $object = $statement->getLabelObject(); - - // format subject - if (!isset($attrib[$subject])) - { - if (is_a($statement->subject(),'BlankNode')) - { - $attrib[$subject] = $graphviz_param['BLANKNODE_STYLE']; - } - else - { - if ($short_prefix == TRUE && RDFUtil::guessPrefix($subject, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($subject, $model); - $subject_label = $prefix.":".RDFUtil::guessName($subject); - $attrib[$subject] = "label=\"".$subject_label."\" "; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($subject); - } - } - if (GRAPHVIZ_URI == TRUE) - { - $attrib[$subject] .= "URL=\"".$subject."\""; - } - } - } - - // format predicate - if ($short_prefix == TRUE && RDFUtil::guessPrefix($predicate, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($predicate, $model); - $predicate_label = "label=\"".$prefix.":".RDFUtil::guessName($predicate)."\""; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($predicate); - } - } - else - { - $predicate_label = "label=\"".$predicate."\""; - } - - if (is_a($statement,'InfStatement')) - { - $predicate_label .= " ".$graphviz_param['INFERRED_STYLE']; - } - else - { - if (GRAPHVIZ_URI == TRUE) - { - $predicate_label .= "URL=\"".$predicate."\""; - } - } - - // format object - if (!isset($attrib[$object])) - { - if (is_a($statement->object(),'BlankNode')) - { - $attrib[$object] = $graphviz_param['BLANKNODE_STYLE']; - } - elseif (is_a($statement->object(),'Literal')) - { - $object_label = $object; - $object = "literal".$i; - $i++; - $attrib[$object] = "label=\"$object_label\" ".$graphviz_param['LITERAL_STYLE']; - } - else - { - if ($short_prefix == TRUE && RDFUtil::guessPrefix($object, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($object, $model); - $object_label = $prefix.":".RDFUtil::guessName($object); - $attrib[$object] = "label=\"".$object_label."\" "; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($object); - } - } - if (GRAPHVIZ_URI == TRUE) - { - $attrib[$object] .= "URL=\"".$object."\""; - } - } - } - - // fill graph array - $graph[] = "\"".$subject."\" -> \"".$object."\" [".$predicate_label."];"; - } - - //generate DOT-file - $dot = "digraph G { ".$graphviz_param['GRAPH_STYLE']."\n edge [".$graphviz_param['PREDICATE_STYLE']."]\n node [".$graphviz_param['RESOURCE_STYLE']."]\n"; - if (isset($attrib)) - { - foreach ($attrib AS $key => $value) - { - $dot .= "\"$key\" [$value];\n"; - } - } - if (!isset($graph)) - { - $dot .= "error [shape=box,label=\"No Statements found!\"]"; - } - else - { - $dot .= implode("\n", $graph); - } - - - if (GRAPHVIZ_STAT == TRUE) - { - $stat_label = "| ".$model->size()." Statements drawn"; - } - if ((strstr($graphviz_param['GRAPH_STYLE'], 'rankdir="LR"') === FALSE) && (strstr($graphviz_param['GRAPH_STYLE'], 'rankdir=LR') === FALSE)) - { - $sep1 = "}"; - $sep2 = ""; - } - else - { - $sep1 = ""; - $sep2 = "}"; - } - - if ($short_prefix == TRUE && isset($prefix_array)) - { - $struct_label = "{ { Base URI: ".$model->getBaseURI()." $sep1 | { { ".implode("|", array_keys($prefix_array))." } | { ".implode("|", $prefix_array)." } } $stat_label } $sep2"; - } - else - { - $struct_label = "{ { Base URI: ".$model->getBaseURI()."$sep1 ".$stat_label." } }"; - } - - $dot .= "\n struct [shape=Mrecord,label=\"$struct_label\",".$graphviz_param['BOX_STYLE']."];\n"; - $dot .= " vocabulary [style=invis];\n struct -> vocabulary [style=invis];\n}"; - - // if needed call dot.exe - if (($format != "input_dot") && (defined('GRAPHVIZ_PATH')) && (strstr(GRAPHVIZ_FORMAT, $format) !== FALSE)) - { - mt_srand((double)microtime()*1000000); - $filename=GRAPHVIZ_TEMP.md5(uniqid(mt_rand())).".dot"; - $file_handle = @fopen($filename, 'w'); - if ($file_handle) - { - fwrite($file_handle, $dot); - fclose($file_handle); - } - $dotinput = " -T".$format." ".$filename; - - ob_start(); - passthru(GRAPHVIZ_PATH.$dotinput); - $output = ob_get_contents(); - ob_end_clean(); - unlink($filename); - echo $output; - return TRUE; - } - elseif ($format == "input_dot") - { - echo $dot; - return TRUE; - } - else - { - return FALSE; - } - } - -} // end: RDfUtil - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/StatementIterator.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/StatementIterator.php.svn-base deleted file mode 100755 index 49f7a483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/StatementIterator.php.svn-base +++ /dev/null @@ -1,208 +0,0 @@ - - * @author Chris Bizer - * - * @package utility - * @access public - * - */ - class StatementIterator extends Object { - - /** - * Reference to the MemModel - * @var object MemModel - * @access private - */ - var $model; - - /** - * Current position - * StatementIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single MemModel. - * @var integer - * @access private - */ - var $position; - - - /** - * Constructor - * - * @param object MemModel - * @access public - */ - function StatementIterator(&$model) { - $this->model = $model; - reset($this->model->triples); - $this->position = -1; - } - - /** - * Returns TRUE if there are more statements. - * @return boolean - * @access public - */ - function hasNext() { - if ($this->position == -1) - { - if(current($this->model->triples)!=NULL) - { - return TRUE; - } else - { - return FALSE; - } - }; - - if (next($this->model->triples)!=NULL ) - { - prev($this->model->triples); - return TRUE; - } else - { - end($this->model->triples); - return FALSE; - }; - } - - /** - * Returns TRUE if the first statement has not been reached. - * @return boolean - * @access public - */ - function hasPrevious() { - if (prev($this->model->triples)!=NULL) - { - next($this->model->triples); - return TRUE; - } else { - reset($this->model->triples); - return FALSE; - }; - } - - /** - * Returns the next statement. - * @return statement or NULL if there is no next statement. - * @access public - */ - function next() { - if ($this->position == -1) - { - if($return=current($this->model->triples)) - { - $this->position=key($this->model->triples); - return $return; - } else - { - $this->position=key($this->model->triples); - return NULL; - }; - }; - - - if ($return=next($this->model->triples)) { - $this->position=key($this->model->triples); - return $return; - } else { - $this->position=key($this->model->triples); - return NULL; - }; - } - - /** - * Returns the previous statement. - * @return statement or NULL if there is no previous statement. - * @access public - */ - function previous() { - if ($return=prev($this->model->triples)) { - $this->position=key($this->model->triples); - return $return; - } else { - $this->position=key($this->model->triples); - return NULL; - } - } - - /** - * Returns the current statement. - * @return statement or NULL if there is no current statement. - * @access public - */ - function current() { - if ($this->position==-1) return NULL; - - if ($return=current($this->model->triples)) { - return $return; - } else { - return NULL; - } - } - - /** - * Moves the pointer to the first statement. - * @return void - * @access public - */ - function moveFirst() { - reset($this->model->triples); - $this->position=0; - } - - /** - * Moves the pointer to the last statement. - * @return void - * @access public - */ - function moveLast() { - end($this->model->triples); - $this->position=key($this->model->triples); - } - - /** - * Moves the pointer to a specific statement. - * If you set an off-bounds value, the position will be set to the last element - * @param integer - * @return void - * @access public - */ - function moveTo($position) { - - if ($position + 1 > count($this->model->triples)) - { - end($this->model->triples); - } else - { - reset($this->model->triples); - - for ($i = 1; $i < $position; $i++) { - next($this->model->triples); - } - }; - $this->position=key($this->model->triples); - } - - /** - * Returns the current position of the iterator. - * @return integer - * @access public - */ - function getCurrentPosition() { - return key($this->model->triples); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Utility.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Utility.php.svn-base deleted file mode 100755 index 7f2e933f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/.svn/text-base/Utility.php.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// include utility classes -require_once( RDFAPI_INCLUDE_DIR . 'util/RdfUtil.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/FindIterator.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/IterFind.php' ); - -// experimental -require_once( RDFAPI_INCLUDE_DIR . 'util/ModelComparator.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/FindIterator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/FindIterator.php deleted file mode 100755 index 1763a5a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/FindIterator.php +++ /dev/null @@ -1,119 +0,0 @@ -findAsIterator() - * Using a find iterator is significantly faster than using model->find() which returns - * a new result model. - * - * - * @version $Id: FindIterator.php 268 2006-05-15 05:28:09Z tgauss $ - * @author Tobias Gau - * - * @package utility - * @access public - * - */ - class FindIterator extends Object { - - /** - * Reference to the MemModel - * @var object MemModel - * @access private - */ - var $model; - - - - /** - * Current position - * FindIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single MemModel. - * @var integer - * @access private - */ - var $position; - - - /** - * Searchpattern - * - * @var Object Subject,Predicate,Object - * @access private - */ - - var $subject; - var $predicate; - var $object; - - - /** - * Constructor - * - * @param object MemModel - * @param object Subject - * @param object Predicate - * @param object Object - * @access public - */ - function FindIterator(&$model,$sub,$pred,$obj) { - $this->model = &$model; - $this->subject=$sub; - $this->predicate=$pred; - $this->object=$obj; - $this->position=-1; - } - - - /** - * Returns TRUE if there are more matching statements. - * @return boolean - * @access public - */ - function hasNext() { - if($this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1)>-1){ - return TRUE; - }else{ - return FALSE; - } - } - - - /** - * Returns the next matching statement. - * @return statement or NULL if there is no next matching statement. - * @access public - */ - function next() { - $res=$this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1); - if($res>-1){ - $this->position=$res; - return $this->model->triples[$res]; - }else{ - return Null; - } - } - - - - - /** - * Returns the current matching statement. - * @return statement or NULL if there is no current matching statement. - * @access public - */ - function current() { - if (($this->position >= -1)&&(isset($this->model->triples[$this->position]))) { - return $this->model->triples[$this->position]; - } else { - return NULL; - } - } - - } - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/IterFind.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/IterFind.php deleted file mode 100755 index 80c6213f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/IterFind.php +++ /dev/null @@ -1,174 +0,0 @@ -iterFind(null,null,null,null); $iterator->valid(); $iterator->next()) -* { -* $statement=$iterator->current(); -* }; -* -* @version $Id$ -* @author Daniel Westphal (http://www.d-westphal.de) -* -* -* @package utility -* @access public -**/ -class IterFind -{ - - /** - * The current position - * @var integer - * @access private - */ - var $key; - - /** - * boolean value, if the results should be returned as Quads - * @var boolean - * @access private - */ - var $returnAsQuads; - - /** - * If the current resource is valid - * @var boolean - * @access private - */ - var $valid; - - /** - * The current NamedGraph - * @var obejct NamedGraph - * @access private - */ - var $current; - - /** - * The graph to look in. - * @var string - * @access private - */ - var $findGraph; - - /** - * The subject Resource to search for - * @var string - * @access private - */ - var $findSubject; - - /** - * The predicate Resource to search for - * @var string - * @access private - */ - var $findPredicate; - - /** - * The object Resource to search for - * @var string - * @access private - */ - var $findObject; - - - - /** - * Constructor. - * - * $subject, $predicate, and $object are used like find(). - * $graph has to be a reference to the graph to search in. - * - * - * - * @param $graph Resource - * @param $subject Resource - * @param $predicate Resource - * @param $object Resource - * @param $returnAsQuads boolean - * @access public - */ - function IterFind($graph,$subject,$predicate,$object,$returnAsQuads=false) - { - if ($graph==NULL) - { - $this->valid=false; - return; - } - $this->findGraph=&$graph; - $this->findSubject=$subject; - $this->findPredicate=$predicate; - $this->findObject=$object; - $this->rewind(); - $this->returnAsQuads=$returnAsQuads; - } - - /** - * Resets iterator list to start - * - * @access public - */ - function rewind() - { - $this->key = -1; - $this->next(); - } - - /** - * Says if there are additional items left in the list - * - * @return boolean - * @access public - */ - function valid() - { - return $this->valid; - } - - /** - * Moves Iterator to the next item in the list - * - * @access public - */ - function next() - { - $this->current = $this->findGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->key); - $this->valid=($this->current!=NULL); - } - - /** - * Returns the current item - * - * @return mixed - * @access public - */ - function current() - { - if($this->returnAsQuads) - return new Quad(new Resource($this->findGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject()); - //else - return $this->current; - } - - - /** - * Returns the key of the current item - * - * @return integer - * @access public - */ - function key() - { - return $this->key; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/ModelComparator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/ModelComparator.php deleted file mode 100755 index 42ab855c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/ModelComparator.php +++ /dev/null @@ -1,158 +0,0 @@ -Signing RDF Graphs - * by Jeremy J. Carroll. - * - * - * @version $Id$ - * @author Tobias Gau - * - * @package utility - * @access public - * - **/ - class ModelComparator extends Object { - - /** - * Compares two models. - * - * @param $thisModel First Model. - * @param $thatModel Second Model. - * - * @return boolean - */ - function compare($thisModel, $thatModel){ - - $thisModeltriples = null; - $thatModeltriples = null; - - if(is_a($thisModel,"DbModel")){ - $thisModeltriples = $thisModel->getMemModel(); - }else{ - $thisModeltriples = $thisModel; - } - - if(is_a($thatModel,"DbModel")){ - $thatModeltriples = $thatModel->getMemModel(); - }else{ - $thatModeltriples = $thatModel; - } - - $sortArray1 = ModelComparator::buildSortArray($thisModeltriples->triples); - $sortArray2 = ModelComparator::buildSortArray($thatModeltriples->triples); - - $renamedArray1 = ModelComparator::renameBlanks($sortArray1); - $renamedArray2 = ModelComparator::renameBlanks($sortArray2); - - return ModelComparator::compareTriples($renamedArray1,$renamedArray2); - } - - - /** - * Builds a sorted array. - * - * @param $tripleList A List that contains the models triples. - * - * @return Array - */ - function buildSortArray($tripleList){ - $sortedArray = Array(); - - foreach($tripleList as $index => $triple){ - $sub = null; - $obj = null; - $orgSub = $triple->getSubject(); - $orgObj = $triple->getObject(); - - if(is_a($orgSub,"Blanknode")){ - $sub = $orgSub->getID(); - $triple->subj = new Blanknode("~"); - } - if(is_a($orgObj,"Blanknode")){ - $obj = $orgObj->getID(); - $triple->obj = new Blanknode("~"); - } - $sortedArray[$index]['string'] = $triple->toString(); - $sortedArray[$index]['index'] = $index; - $sortedArray[$index]['triple'] = $triple; - $sortedArray[$index]['sub'] = $sub; - $sortedArray[$index]['obj'] = $obj; - } - sort($sortedArray); - return $sortedArray; - } - - /** - * Renames the models Blanknodes. - * - * @param $sortedArray A List that contains the models triples. - * - * @return Array - */ - function renameBlanks($sortedArray){ - $i = 0; - $labelmap = Array(); - - foreach ($sortedArray as $value){ - //new label - if($value['sub']!=null){ - $label = null; - if(isset($labelmap[$value['sub']])){ - $label = $labelmap[$value['sub']]; - $value['triple']->subj = new BlankNode($labelmap[$value['sub']]); - }else{ - $label = $i."Bnode"; - $labelmap[$value['sub']]=$label; - $value['triple']->subj = new BlankNode($labelmap[$value['sub']]); - $i++; - } - } - - if($value['obj']!=null){ - $label = null; - if(isset($labelmap[$value['obj']])){ - $label = $labelmap[$value['obj']]; - $value['triple']->obj = new BlankNode($labelmap[$value['obj']]); - }else{ - $label = $i."Bnode"; - $labelmap[$value['obj']]=$label; - $value['triple']->obj = new BlankNode($labelmap[$value['obj']]); - $i++; - } - } - - } - return $sortedArray; - - } - - /** - * Compares the Triples in the lists. - * - * @param $tripleList A List that contains the models triples. - * @param $tripleList A List that contains the models triples. - * - * @return boolean - */ - function compareTriples($array1, $array2){ - foreach($array1 as $key => $value){ - if(!$value['triple']->equals($array2[$key]['triple'])) - return false; - } - return true; - - } - - - } - - - - ?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Object.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Object.php deleted file mode 100755 index 16bb7e12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Object.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * @abstract - * @package utility - * - **/ - class Object { - - /** - * Serializes a object into a string - * - * @access public - * @return string - */ - function toString() { - $objectvars = get_object_vars($this); - foreach($objectvars as $key => $value) - $content .= $key ."='". $value. "'; "; - return "Instance of " . get_class($this) ."; Properties: ". $content; - } - - } - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/RdfUtil.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/RdfUtil.php deleted file mode 100755 index b2ff2367..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/RdfUtil.php +++ /dev/null @@ -1,563 +0,0 @@ -, Daniel Westphal -* @author Anton Kstlbacher -* @package utility -* @access public -**/ -class RDFUtil extends Object { - - /** - * Extracts the namespace prefix out of a URI. - * - * @param String $uri - * @return string - * @access public - */ - function guessNamespace($uri) { - $l = RDFUtil::getNamespaceEnd($uri); - return $l > 1 ? substr($uri ,0, $l) : ""; - } - - /** - * Delivers the name out of the URI (without the namespace prefix). - * - * @param String $uri - * @return string - * @access public - */ - function guessName($uri) { - return substr($uri,RDFUtil::getNamespaceEnd($uri)); - } - - /** - * Extracts the namespace prefix out of the URI of a Resource. - * - * @param Object Resource $resource - * @return string - * @access public - */ - function getNamespace($resource) { - return RDFUtil::guessNamespace($resource->getURI()); - } - - /** - * Delivers the Localname (without the namespace prefix) out of the URI of a Resource. - * - * @param Object Resource $resource - * @return string - * @access public - */ - function getLocalName($resource) { - return RDFUtil::guessName($resource->getURI()); - } - - /** - * Position of the namespace end - * Method looks for # : and / - * @param String $uri - * @access private - */ - function getNamespaceEnd($uri) { - $l = strlen($uri)-1; - do { - $c = substr($uri, $l, 1); - if($c == '#' || $c == ':' || $c == '/') - break; - $l--; - } while ($l >= 0); - $l++; - return $l; - } - - /** - * Short Prefix for known Namespaces by given URI - * @param String $uri - * @access public - */ - function getPrefix($uri) { - switch (RDFUtil::guessNamespace($uri)) - { - case RDF_NAMESPACE_URI: - $prefix = RDF_NAMESPACE_PREFIX; - break; - - case RDF_SCHEMA_URI: - $short_p = RDF_SCHEMA_PREFIX; - break; - - case OWL_URI: - $short_p = OWL_PREFIX; - break; - - default: - $short_p = $statement->getLabelPredicate(); - } - return $short_p; - } - - - /** - * Tests if the URI of a resource belongs to the RDF syntax/model namespace. - * - * @param Object Resource $resource - * @return boolean - * @access public - */ - function isRDF($resource) { - return ($resource != NULL && RDFUtil::getNamespace($resource) == RDF_NAMESPACE_URI); - } - - /** - * Escapes < > and & - * - * @param String $textValue - * @return String - * @access public - */ - function escapeValue($textValue) { - - $textValue = str_replace('<', '<', $textValue); - $textValue = str_replace('>', '>', $textValue); - $textValue = str_replace('&', '&', $textValue); - - return $textValue; - } - - /** - * Converts an ordinal RDF resource to an integer. - * e.g. Resource(RDF:_1) => 1 - * - * @param object Resource $resource - * @return Integer - * @access public - */ - function getOrd($resource) { - if($resource == NULL || !is_a($resource, 'Resource') || !RDFUtil::isRDF($resource)) - return -1; - $name = RDFUtil::getLocalName($resource); - echo substr($name, 1).' '.RDFUtil::getLocalName($resource); - $n = substr($name, 1); - //noch rein : chekcen ob $n Nummer ist !!!!!!!!!!!!!!!!!!!!!!if($n) - return $n; - return -1; - } - - /** - * Creates ordinal RDF resource out of an integer. - * - * @param Integer $num - * @return object Resource - * @access public - */ - function createOrd($num) { - return new Resource(RDF_NAMESPACE_URI . '_' . $num); - } - - /** - * Prints a MemModel as HTML table. - * You can change the colors in the configuration file. - * - * @param object MemModel &$model - * @access public - */ - function writeHTMLTable(&$model) { - $nms = $model->getParsedNamespaces(); - $names = ''; - $pre = ''; - - - echo '' . LINEFEED; - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED; - echo INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . ''; - - echo ''; - $i=0; - if($nms != false){ - foreach($nms as $namespace => $prefix){ - if($i==0){ - $col = HTML_TABLE_NS_ROW_COLOR0; - }else{ - $col = HTML_TABLE_NS_ROW_COLOR1; - } - echo ''; - $i++; - $i%=2; - } - }else{ - echo ''; - } - - - - - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED . INDENTATION . '' . LINEFEED; - - $i = 1; - foreach($model->triples as $key => $statement) { - $infered=''; - if (is_a($statement,'InfStatement')) $infered='(infered)'; - echo INDENTATION . '' . LINEFEED . INDENTATION . INDENTATION . '' . LINEFEED; - // subject - echo INDENTATION . INDENTATION . '' . LINEFEED; - // predicate - echo INDENTATION . INDENTATION . '' . LINEFEED; - // object - echo INDENTATION . INDENTATION . '' . LINEFEED; - echo INDENTATION . '' . LINEFEED; - $i++; - } - echo '
    '; - echo '

    Base URI: ' . $model->getBaseURI() . '

    Size: ' . $model->size() . '

    Prefix:'.'
    Namespace:'.'
    '.$prefix.''.$namespace.'
    --

    No.

    Subject

    Predicate

    Object

    ' . $i . '.
    '.$infered.'

    '; - echo '

    ' . RDFUtil::getNodeTypeName($statement->getSubject()); - if(is_a($statement->subj,'Resource')){ - $ns = $statement->subj->getNamespace(); - if(isset($nms[$ns])){ - echo $nms[$ns].':'.RDFUtil::getLocalName($statement->subj); - }else{ - echo $statement->subj->getLabel(); - } - } - echo '

    '; - echo '

    ' . RDFUtil::getNodeTypeName($statement->getPredicate()); - if(is_a($statement->pred,'Resource')){ - $ns = $statement->pred->getNamespace(); - if(isset($nms[$ns])){ - echo $nms[$ns].':'.RDFUtil::getLocalName($statement->pred); - }else{ - echo $statement->pred->getLabel(); - } - } - echo '

    '; - echo '

    '; - if (is_a($statement->getObject(), 'Literal')) { - if ($statement->obj->getLanguage() != null) { - $lang = ' (xml:lang="' . $statement->obj->getLanguage() . '") '; - } ELSE $lang = ''; - if ($statement->obj->getDatatype() != null) { - $dtype = ' (rdf:datatype="' . $statement->obj->getDatatype() . '") '; - } ELSE $dtype = ''; - } else { - $lang = ''; - $dtype = ''; - } - $label = $statement->obj->getLabel(); - if(is_a($statement->obj,'Resource')){ - $ns = $statement->obj->getNamespace(); - if(isset($nms[$ns])){ - $label = $nms[$ns].':'.RDFUtil::getLocalName($statement->obj); - }else{ - $label = $statement->obj->getLabel(); - } - } - - echo RDFUtil::getNodeTypeName($statement->getObject()) - .nl2br(htmlspecialchars($label)) . $lang . $dtype; - - echo '

    ' . LINEFEED; - } - - /** - * Chooses a node color. - * Used by RDFUtil::writeHTMLTable() - * - * @param object Node $node - * @return object Resource - * @access private - */ - function chooseColor($node) { - if (is_a($node, 'BlankNode')) - return HTML_TABLE_BNODE_COLOR; - elseif (is_a($node, 'Literal')) - return HTML_TABLE_LITERAL_COLOR; - else { - if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || - RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || - RDFUtil::getNamespace($node) == OWL_URI - ) - - return HTML_TABLE_RDF_NS_COLOR; - } - return HTML_TABLE_RESOURCE_COLOR; - - } - - /** - * Get Node Type. - * Used by RDFUtil::writeHTMLTable() - * - * @param object Node $node - * @return object Resource - * @access private - */ - function getNodeTypeName($node) { - if (is_a($node, "BlankNode")) - return 'Blank Node: '; - elseif (is_a($node, 'Literal')) - return 'Literal: '; - else { - if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI || - RDFUtil::getNamespace($node) == RDF_SCHEMA_URI || - RDFUtil::getNamespace($node) == OWL_URI) - return 'RDF Node: '; - } - return 'Resource: '; - - } - - - /** - * Short Prefix for known and/or parsed Namespaces by given URI and Model - * Uses $default_prefixes defined in constants.php and getParsedNamespaces() - * Returns FALSE if no matching prefix is found - * - * @author Anton Kstlbacher - * @param string $uri - * @param object $model - * @return string, boolean - * @access public - * @throws PhpError - */ - - function guessPrefix($uri, &$model) - { - global $default_prefixes; - $namespace = RDFUtil::guessNamespace($uri); - $par_nms = $model->getParsedNamespaces(); - if (isset($par_nms[$namespace])) - { - $prefix = $par_nms[$namespace]; - } - else - { - $prefix = array_search($namespace, $default_prefixes); - } - if($prefix !== false) - { - return $prefix; - } - else - { - return false; - } - } - - - /** - * Generates a dot-file for drawing graphical output with the - * graphviz-application which can be downloaded at http://www.graphviz.org - * If the graphviz-application is installed and its path is set to the - * correct value in constants.php we can directly generate any - * file format graphviz supports, e.g. SVG, PNG - * Parameters: model to visualize, output format, use prefixes - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * WARNING: Graphviz can be slow with large models. - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @author Anton Kstlbacher - * @param object Model - * @param string $format - * @param boolean $short_prefix - * @return string, binary - * @access public - * @throws PhpError - */ - - function visualizeGraph(&$model, $format = "input_dot", $short_prefix = TRUE) - { - global $graphviz_param; - $i = 0; - - foreach ($model->triples as $key => $statement) - { - $subject = $statement->getLabelSubject(); - $predicate = $statement->getLabelPredicate(); - $object = $statement->getLabelObject(); - - // format subject - if (!isset($attrib[$subject])) - { - if (is_a($statement->subject(),'BlankNode')) - { - $attrib[$subject] = $graphviz_param['BLANKNODE_STYLE']; - } - else - { - if ($short_prefix == TRUE && RDFUtil::guessPrefix($subject, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($subject, $model); - $subject_label = $prefix.":".RDFUtil::guessName($subject); - $attrib[$subject] = "label=\"".$subject_label."\" "; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($subject); - } - } - if (GRAPHVIZ_URI == TRUE) - { - $attrib[$subject] .= "URL=\"".$subject."\""; - } - } - } - - // format predicate - if ($short_prefix == TRUE && RDFUtil::guessPrefix($predicate, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($predicate, $model); - $predicate_label = "label=\"".$prefix.":".RDFUtil::guessName($predicate)."\""; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($predicate); - } - } - else - { - $predicate_label = "label=\"".$predicate."\""; - } - - if (is_a($statement,'InfStatement')) - { - $predicate_label .= " ".$graphviz_param['INFERRED_STYLE']; - } - else - { - if (GRAPHVIZ_URI == TRUE) - { - $predicate_label .= "URL=\"".$predicate."\""; - } - } - - // format object - if (!isset($attrib[$object])) - { - if (is_a($statement->object(),'BlankNode')) - { - $attrib[$object] = $graphviz_param['BLANKNODE_STYLE']; - } - elseif (is_a($statement->object(),'Literal')) - { - $object_label = $object; - $object = "literal".$i; - $i++; - $attrib[$object] = "label=\"$object_label\" ".$graphviz_param['LITERAL_STYLE']; - } - else - { - if ($short_prefix == TRUE && RDFUtil::guessPrefix($object, $model) != FALSE) - { - $prefix = RDFUtil::guessPrefix($object, $model); - $object_label = $prefix.":".RDFUtil::guessName($object); - $attrib[$object] = "label=\"".$object_label."\" "; - if(!isset($prefix_array[$prefix])) - { - $prefix_array[$prefix] = RDFUtil::guessNamespace($object); - } - } - if (GRAPHVIZ_URI == TRUE) - { - $attrib[$object] .= "URL=\"".$object."\""; - } - } - } - - // fill graph array - $graph[] = "\"".$subject."\" -> \"".$object."\" [".$predicate_label."];"; - } - - //generate DOT-file - $dot = "digraph G { ".$graphviz_param['GRAPH_STYLE']."\n edge [".$graphviz_param['PREDICATE_STYLE']."]\n node [".$graphviz_param['RESOURCE_STYLE']."]\n"; - if (isset($attrib)) - { - foreach ($attrib AS $key => $value) - { - $dot .= "\"$key\" [$value];\n"; - } - } - if (!isset($graph)) - { - $dot .= "error [shape=box,label=\"No Statements found!\"]"; - } - else - { - $dot .= implode("\n", $graph); - } - - - if (GRAPHVIZ_STAT == TRUE) - { - $stat_label = "| ".$model->size()." Statements drawn"; - } - if ((strstr($graphviz_param['GRAPH_STYLE'], 'rankdir="LR"') === FALSE) && (strstr($graphviz_param['GRAPH_STYLE'], 'rankdir=LR') === FALSE)) - { - $sep1 = "}"; - $sep2 = ""; - } - else - { - $sep1 = ""; - $sep2 = "}"; - } - - if ($short_prefix == TRUE && isset($prefix_array)) - { - $struct_label = "{ { Base URI: ".$model->getBaseURI()." $sep1 | { { ".implode("|", array_keys($prefix_array))." } | { ".implode("|", $prefix_array)." } } $stat_label } $sep2"; - } - else - { - $struct_label = "{ { Base URI: ".$model->getBaseURI()."$sep1 ".$stat_label." } }"; - } - - $dot .= "\n struct [shape=Mrecord,label=\"$struct_label\",".$graphviz_param['BOX_STYLE']."];\n"; - $dot .= " vocabulary [style=invis];\n struct -> vocabulary [style=invis];\n}"; - - // if needed call dot.exe - if (($format != "input_dot") && (defined('GRAPHVIZ_PATH')) && (strstr(GRAPHVIZ_FORMAT, $format) !== FALSE)) - { - mt_srand((double)microtime()*1000000); - $filename=GRAPHVIZ_TEMP.md5(uniqid(mt_rand())).".dot"; - $file_handle = @fopen($filename, 'w'); - if ($file_handle) - { - fwrite($file_handle, $dot); - fclose($file_handle); - } - $dotinput = " -T".$format." ".$filename; - - ob_start(); - passthru(GRAPHVIZ_PATH.$dotinput); - $output = ob_get_contents(); - ob_end_clean(); - unlink($filename); - echo $output; - return TRUE; - } - elseif ($format == "input_dot") - { - echo $dot; - return TRUE; - } - else - { - return FALSE; - } - } - -} // end: RDfUtil - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/StatementIterator.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/StatementIterator.php deleted file mode 100755 index bd82ace3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/StatementIterator.php +++ /dev/null @@ -1,208 +0,0 @@ - - * @author Chris Bizer - * - * @package utility - * @access public - * - */ - class StatementIterator extends Object { - - /** - * Reference to the MemModel - * @var object MemModel - * @access private - */ - var $model; - - /** - * Current position - * StatementIterator does not use the build in PHP array iterator, - * so you can use serveral iterators on a single MemModel. - * @var integer - * @access private - */ - var $position; - - - /** - * Constructor - * - * @param object MemModel - * @access public - */ - function StatementIterator(&$model) { - $this->model = $model; - reset($this->model->triples); - $this->position = -1; - } - - /** - * Returns TRUE if there are more statements. - * @return boolean - * @access public - */ - function hasNext() { - if ($this->position == -1) - { - if(current($this->model->triples)!=NULL) - { - return TRUE; - } else - { - return FALSE; - } - }; - - if (next($this->model->triples)!=NULL ) - { - prev($this->model->triples); - return TRUE; - } else - { - end($this->model->triples); - return FALSE; - }; - } - - /** - * Returns TRUE if the first statement has not been reached. - * @return boolean - * @access public - */ - function hasPrevious() { - if (prev($this->model->triples)!=NULL) - { - next($this->model->triples); - return TRUE; - } else { - reset($this->model->triples); - return FALSE; - }; - } - - /** - * Returns the next statement. - * @return statement or NULL if there is no next statement. - * @access public - */ - function next() { - if ($this->position == -1) - { - if($return=current($this->model->triples)) - { - $this->position=key($this->model->triples); - return $return; - } else - { - $this->position=key($this->model->triples); - return NULL; - }; - }; - - - if ($return=next($this->model->triples)) { - $this->position=key($this->model->triples); - return $return; - } else { - $this->position=key($this->model->triples); - return NULL; - }; - } - - /** - * Returns the previous statement. - * @return statement or NULL if there is no previous statement. - * @access public - */ - function previous() { - if ($return=prev($this->model->triples)) { - $this->position=key($this->model->triples); - return $return; - } else { - $this->position=key($this->model->triples); - return NULL; - } - } - - /** - * Returns the current statement. - * @return statement or NULL if there is no current statement. - * @access public - */ - function current() { - if ($this->position==-1) return NULL; - - if ($return=current($this->model->triples)) { - return $return; - } else { - return NULL; - } - } - - /** - * Moves the pointer to the first statement. - * @return void - * @access public - */ - function moveFirst() { - reset($this->model->triples); - $this->position=0; - } - - /** - * Moves the pointer to the last statement. - * @return void - * @access public - */ - function moveLast() { - end($this->model->triples); - $this->position=key($this->model->triples); - } - - /** - * Moves the pointer to a specific statement. - * If you set an off-bounds value, the position will be set to the last element - * @param integer - * @return void - * @access public - */ - function moveTo($position) { - - if ($position + 1 > count($this->model->triples)) - { - end($this->model->triples); - } else - { - reset($this->model->triples); - - for ($i = 1; $i < $position; $i++) { - next($this->model->triples); - } - }; - $this->position=key($this->model->triples); - } - - /** - * Returns the current position of the iterator. - * @return integer - * @access public - */ - function getCurrentPosition() { - return key($this->model->triples); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Utility.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Utility.php deleted file mode 100755 index f0b477d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/Utility.php +++ /dev/null @@ -1,20 +0,0 @@ - -// -// ---------------------------------------------------------------------------------- - -// include utility classes -require_once( RDFAPI_INCLUDE_DIR . 'util/RdfUtil.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/FindIterator.php' ); -require_once( RDFAPI_INCLUDE_DIR . 'util/IterFind.php' ); - -// experimental -require_once( RDFAPI_INCLUDE_DIR . 'util/ModelComparator.php' ); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/all-wcprops deleted file mode 100755 index 96cbbd87..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/all-wcprops +++ /dev/null @@ -1,173 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/375/trunk/rdfapi-php/api/util/adodb -END -adodb-php4.inc.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-php4.inc.php -END -adodb-datadict.inc.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-datadict.inc.php -END -toexport.inc.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/toexport.inc.php -END -adodb-exceptions.inc.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-exceptions.inc.php -END -adodb-xmlschema.inc.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-xmlschema.inc.php -END -adodb-csvlib.inc.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-csvlib.inc.php -END -rsfilter.inc.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/rsfilter.inc.php -END -adodb-xmlschema03.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/adodb-xmlschema03.inc.php -END -xmlschema.dtd -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/xmlschema.dtd -END -adodb-pear.inc.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-pear.inc.php -END -adodb-active-record.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/adodb-active-record.inc.php -END -server.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/server.php -END -adodb-errorhandler.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-errorhandler.inc.php -END -adodb-error.inc.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-error.inc.php -END -adodb-iterator.inc.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-iterator.inc.php -END -xmlschema03.dtd -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/xmlschema03.dtd -END -license.txt -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/license.txt -END -adodb-perf.inc.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-perf.inc.php -END -adodb-time.inc.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-time.inc.php -END -adodb-pager.inc.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-pager.inc.php -END -tohtml.inc.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tohtml.inc.php -END -adodb-time.zip -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/adodb-time.zip -END -adodb-errorpear.inc.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-errorpear.inc.php -END -adodb.inc.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb.inc.php -END -pivottable.inc.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pivottable.inc.php -END -readme.txt -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/readme.txt -END -adodb-lib.inc.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/adodb-lib.inc.php -END -adodb-memcache.lib.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/adodb-memcache.lib.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/entries deleted file mode 100755 index a6e2ba77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/entries +++ /dev/null @@ -1,425 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-29T16:02:59.000000Z -375 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -adodb-php4.inc.php -file - - - - -2008-02-29T14:57:56.550584Z -a7594a2cd266277753a819563624b5e7 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -toexport.inc.php -file - - - - -2008-02-29T14:57:56.550584Z -09fd7305914e3b54116b7e26543e7467 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-xmlschema.inc.php -file - - - - -2008-02-29T14:57:56.566204Z -04c6ac9da68645e830331b9574ae3e8c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -pear -dir - -adodb-csvlib.inc.php -file - - - - -2008-02-29T14:57:56.581825Z -64b4f8ef9c7bef57b765276da2658e5e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs -dir - -xmlschema.dtd -file - - - - -2008-02-29T14:57:56.581825Z -26f3f629d55257aafcf66840d7c66618 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pear.inc.php -file - - - - -2008-02-29T14:57:56.613066Z -eb287221e038f0c3a62a5d3f46c9f3b1 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-active-record.inc.php -file - - - - -2008-02-29T14:57:56.597446Z -f467f6c27c8547c162e5012c527df03c -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -server.php -file - - - - -2008-02-29T14:57:56.597446Z -7e2b72c8964ba1a4f6efe924376c1709 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -license.txt -file - - - - -2008-02-29T14:57:56.628687Z -af93a1a6737be1af8ab9f41ce036af63 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -tests -dir - -adodb-time.inc.php -file - - - - -2008-02-29T14:57:56.628687Z -896ad0bea1be2ac4c6dbcb5e6ecd1406 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -tohtml.inc.php -file - - - - -2008-02-29T14:57:56.644307Z -709dd875b29c9e9fe0e53ef2f98828ed -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-time.zip -file - - - - -2008-02-29T14:57:56.644307Z -dcf969f182014a125c790358b50ce2dd -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb.inc.php -file - - - - -2008-02-29T14:57:56.659928Z -3717f77c8b6d619c85d7c3a22541152e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-memcache.lib.inc.php -file - - - - -2008-02-29T14:57:56.675549Z -d34c6594dd94d6d2c4a84af47dec0b6e -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -datadict -dir - -lang -dir - -adodb-datadict.inc.php -file - - - - -2008-02-29T14:57:56.675549Z -ec0b2d3e4cf28f7b9acb67c5e3998c63 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -session -dir - -cute_icons_for_site -dir - -adodb-exceptions.inc.php -file - - - - -2008-02-29T14:57:56.691169Z -39906ca9a98f8068fed8099aaf4c201f -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -rsfilter.inc.php -file - - - - -2008-02-29T14:57:56.691169Z -c464e78ae9d6cdd9a322b74df4a18626 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-xmlschema03.inc.php -file - - - - -2008-02-29T14:57:56.706790Z -7bb8207359f9c5618c465b7b45a9faef -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-errorhandler.inc.php -file - - - - -2008-02-29T14:57:56.722410Z -de510576583b09b6301298359c80ae4e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf -dir - -adodb-error.inc.php -file - - - - -2008-02-29T14:57:56.722410Z -48fdf3effc35b9b958ff3cf44a9ce85c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-iterator.inc.php -file - - - - -2008-02-29T14:57:56.738031Z -5d8e78a51195957f97a8a5d78e2e1d0e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -xmlschema03.dtd -file - - - - -2008-02-29T14:57:56.753652Z -fa85ba4233e2f8691a6cb245695d731d -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -contrib -dir - -adodb-perf.inc.php -file - - - - -2008-02-29T14:57:56.753652Z -839ad82d5639061b3ac740604cd33fe0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pager.inc.php -file - - - - -2008-02-29T14:57:56.769272Z -d1702c984428a5f3eece586dab41a715 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -xsl -dir - -adodb-errorpear.inc.php -file - - - - -2008-02-29T14:57:56.769272Z -21c0815b515ee707e95c58f6e05e37ec -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -pivottable.inc.php -file - - - - -2008-02-29T14:57:56.784893Z -b05b98f7a09a709bf77cb391377ae3b9 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -readme.txt -file - - - - -2008-02-29T14:57:56.784893Z -a2d2351ddf19684e7f58196afa58ab0b -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-lib.inc.php -file - - - - -2008-02-29T14:57:56.800513Z -ed093e0b0d6ebf79f1ae08ca5290b03a -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -drivers -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-active-record.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-active-record.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-active-record.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-csvlib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-csvlib.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-csvlib.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-datadict.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-datadict.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-datadict.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-error.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-error.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-error.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorhandler.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorhandler.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorhandler.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorpear.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorpear.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-errorpear.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-exceptions.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-exceptions.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-exceptions.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-iterator.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-iterator.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-iterator.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-lib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-lib.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-lib.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-memcache.lib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-memcache.lib.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-memcache.lib.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pager.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pager.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pager.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pear.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pear.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-pear.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-perf.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-perf.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-perf.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-php4.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-php4.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-php4.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.zip.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.zip.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-time.zip.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema03.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema03.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb-xmlschema03.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/adodb.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/license.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/license.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/license.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/pivottable.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/pivottable.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/pivottable.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/readme.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/readme.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/rsfilter.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/rsfilter.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/rsfilter.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/server.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/server.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/server.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/toexport.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/toexport.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/toexport.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/tohtml.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/tohtml.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/tohtml.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema.dtd.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema.dtd.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema03.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema03.dtd.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/prop-base/xmlschema03.dtd.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-active-record.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-active-record.inc.php.svn-base deleted file mode 100755 index 35bf968e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-active-record.inc.php.svn-base +++ /dev/null @@ -1,622 +0,0 @@ -_dbat -$_ADODB_ACTIVE_DBS = array(); - - -class ADODB_Active_DB { - var $db; // ADOConnection - var $tables; // assoc array of ADODB_Active_Table objects, indexed by tablename -} - -class ADODB_Active_Table { - var $name; // table name - var $flds; // assoc array of adofieldobjs, indexed by fieldname - var $keys; // assoc array of primary keys, indexed by fieldname - var $_created; // only used when stored as a cached file -} - -// returns index into $_ADODB_ACTIVE_DBS -function ADODB_SetDatabaseAdapter(&$db) -{ - global $_ADODB_ACTIVE_DBS; - - foreach($_ADODB_ACTIVE_DBS as $k => $d) { - if (PHP_VERSION >= 5) { - if ($d->db === $db) return $k; - } else { - if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) - return $k; - } - } - - $obj = new ADODB_Active_DB(); - $obj->db =& $db; - $obj->tables = array(); - - $_ADODB_ACTIVE_DBS[] = $obj; - - return sizeof($_ADODB_ACTIVE_DBS)-1; -} - - -class ADODB_Active_Record { - var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat] - var $_table; // tablename, if set in class definition then use it as table name - var $_tableat; // associative index pointing to ADODB_Active_Table, eg $ADODB_Active_DBS[_dbat]->tables[$this->_tableat] - var $_where; // where clause set in Load() - var $_saved = false; // indicates whether data is already inserted. - var $_lasterr = false; // last error message - var $_original = false; // the original values loaded or inserted, refreshed on update - - // should be static - function SetDatabaseAdapter(&$db) - { - return ADODB_SetDatabaseAdapter($db); - } - - // php4 constructor - function ADODB_Active_Record($table = false, $pkeyarr=false, $db=false) - { - ADODB_Active_Record::__construct($table,$pkeyarr,$db); - } - - // php5 constructor - function __construct($table = false, $pkeyarr=false, $db=false) - { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS; - - if ($db == false && is_object($pkeyarr)) { - $db = $pkeyarr; - $pkeyarr = false; - } - - if (!$table) { - if (!empty($this->_table)) $table = $this->_table; - else $table = $this->_pluralize(get_class($this)); - } - if ($db) { - $this->_dbat = ADODB_Active_Record::SetDatabaseAdapter($db); - } else - $this->_dbat = sizeof($_ADODB_ACTIVE_DBS)-1; - - - if ($this->_dbat < 0) $this->Error("No database connection set; use ADOdb_Active_Record::SetDatabaseAdapter(\$db)",'ADODB_Active_Record::__constructor'); - - $this->_table = $table; - $this->_tableat = $table; # reserved for setting the assoc value to a non-table name, eg. the sql string in future - $this->UpdateActiveTable($pkeyarr); - } - - function __wakeup() - { - $class = get_class($this); - new $class; - } - - function _pluralize($table) - { - $ut = strtoupper($table); - $len = strlen($table); - $lastc = $ut[$len-1]; - $lastc2 = substr($ut,$len-2); - switch ($lastc) { - case 'S': - return $table.'es'; - case 'Y': - return substr($table,0,$len-1).'ies'; - case 'X': - return $table.'es'; - case 'H': - if ($lastc2 == 'CH' || $lastc2 == 'SH') - return $table.'es'; - default: - return $table.'s'; - } - } - - ////////////////////////////////// - - // update metadata - function UpdateActiveTable($pkeys=false,$forceUpdate=false) - { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; - - $activedb =& $_ADODB_ACTIVE_DBS[$this->_dbat]; - - $table = $this->_table; - $tables = $activedb->tables; - $tableat = $this->_tableat; - if (!$forceUpdate && !empty($tables[$tableat])) { - $tobj =& $tables[$tableat]; - foreach($tobj->flds as $name => $fld) - $this->$name = null; - return; - } - - $db =& $activedb->db; - $fname = $ADODB_CACHE_DIR . '/adodb_' . $db->databaseType . '_active_'. $table . '.cache'; - if (!$forceUpdate && $ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR && file_exists($fname)) { - $fp = fopen($fname,'r'); - @flock($fp, LOCK_SH); - $acttab = unserialize(fread($fp,100000)); - fclose($fp); - if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) { - // abs(rand()) randomizes deletion, reducing contention to delete/refresh file - // ideally, you should cache at least 32 secs - $activedb->tables[$table] = $acttab; - - //if ($db->debug) ADOConnection::outp("Reading cached active record file: $fname"); - return; - } else if ($db->debug) { - ADOConnection::outp("Refreshing cached active record file: $fname"); - } - } - $activetab = new ADODB_Active_Table(); - $activetab->name = $table; - - - $cols = $db->MetaColumns($table); - if (!$cols) { - $this->Error("Invalid table name: $table",'UpdateActiveTable'); - return false; - } - $fld = reset($cols); - if (!$pkeys) { - if (isset($fld->primary_key)) { - $pkeys = array(); - foreach($cols as $name => $fld) { - if (!empty($fld->primary_key)) $pkeys[] = $name; - } - } else - $pkeys = $this->GetPrimaryKeys($db, $table); - } - if (empty($pkeys)) { - $this->Error("No primary key found for table $table",'UpdateActiveTable'); - return false; - } - - $attr = array(); - $keys = array(); - - switch($ADODB_ASSOC_CASE) { - case 0: - foreach($cols as $name => $fldobj) { - $name = strtolower($name); - $this->$name = null; - $attr[$name] = $fldobj; - } - foreach($pkeys as $k => $name) { - $keys[strtolower($name)] = strtolower($name); - } - break; - - case 1: - foreach($cols as $name => $fldobj) { - $name = strtoupper($name); - $this->$name = null; - $attr[$name] = $fldobj; - } - - foreach($pkeys as $k => $name) { - $keys[strtoupper($name)] = strtoupper($name); - } - break; - default: - foreach($cols as $name => $fldobj) { - $name = ($fldobj->name); - $this->$name = null; - $attr[$name] = $fldobj; - } - foreach($pkeys as $k => $name) { - $keys[$name] = $cols[$name]->name; - } - break; - } - - $activetab->keys = $keys; - $activetab->flds = $attr; - - if ($ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR) { - $activetab->_created = time(); - $s = serialize($activetab); - if (!function_exists('adodb_write_file')) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - adodb_write_file($fname,$s); - } - $activedb->tables[$table] = $activetab; - } - - function GetPrimaryKeys(&$db, $table) - { - return $db->MetaPrimaryKeys($table); - } - - // error handler for both PHP4+5. - function Error($err,$fn) - { - global $_ADODB_ACTIVE_DBS; - - $fn = get_class($this).'::'.$fn; - $this->_lasterr = $fn.': '.$err; - - if ($this->_dbat < 0) $db = false; - else { - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $db =& $activedb->db; - } - - if (function_exists('adodb_throw')) { - if (!$db) adodb_throw('ADOdb_Active_Record', $fn, -1, $err, 0, 0, false); - else adodb_throw($db->databaseType, $fn, -1, $err, 0, 0, $db); - } else - if (!$db || $db->debug) ADOConnection::outp($this->_lasterr); - - } - - // return last error message - function ErrorMsg() - { - if (!function_exists('adodb_throw')) { - if ($this->_dbat < 0) $db = false; - else $db = $this->DB(); - - // last error could be database error too - if ($db && $db->ErrorMsg()) return $db->ErrorMsg(); - } - return $this->_lasterr; - } - - function ErrorNo() - { - if ($this->_dbat < 0) return -9999; // no database connection... - $db = $this->DB(); - - return (int) $db->ErrorNo(); - } - - - // retrieve ADOConnection from _ADODB_Active_DBs - function &DB() - { - global $_ADODB_ACTIVE_DBS; - - if ($this->_dbat < 0) { - $false = false; - $this->Error("No database connection set: use ADOdb_Active_Record::SetDatabaseAdaptor(\$db)", "DB"); - return $false; - } - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $db =& $activedb->db; - return $db; - } - - // retrieve ADODB_Active_Table - function &TableInfo() - { - global $_ADODB_ACTIVE_DBS; - - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $table =& $activedb->tables[$this->_tableat]; - return $table; - } - - // set a numeric array (using natural table field ordering) as object properties - function Set(&$row) - { - $db =& $this->DB(); - - if (!$row) { - $this->_saved = false; - return false; - } - - $this->_saved = true; - - $table =& $this->TableInfo(); - if (sizeof($table->flds) != sizeof($row)) { - $this->Error("Table structure of $this->_table has changed","Load"); - return false; - } - - $cnt = 0; - foreach($table->flds as $name=>$fld) { - $this->$name = $row[$cnt]; - $cnt += 1; - } - $this->_original = $row; - return true; - } - - // get last inserted id for INSERT - function LastInsertID(&$db,$fieldname) - { - if ($db->hasInsertID) - $val = $db->Insert_ID($this->_table,$fieldname); - else - $val = false; - - if (is_null($val) || $val === false) { - // this might not work reliably in multi-user environment - return $db->GetOne("select max(".$fieldname.") from ".$this->_table); - } - return $val; - } - - // quote data in where clause - function doquote(&$db, $val,$t) - { - switch($t) { - case 'D': - case 'T': - if (empty($val)) return 'null'; - - case 'C': - case 'X': - if (is_null($val)) return 'null'; - - if (strncmp($val,"'",1) != 0 && substr($val,strlen($val)-1,1) != "'") { - return $db->qstr($val); - break; - } - default: - return $val; - break; - } - } - - // generate where clause for an UPDATE/SELECT - function GenWhere(&$db, &$table) - { - $keys = $table->keys; - $parr = array(); - - foreach($keys as $k) { - $f = $table->flds[$k]; - if ($f) { - $parr[] = $k.' = '.$this->doquote($db,$this->$k,$db->MetaType($f->type)); - } - } - return implode(' and ', $parr); - } - - - //------------------------------------------------------------ Public functions below - - function Load($where,$bindarr=false) - { - $db =& $this->DB(); if (!$db) return false; - $this->_where = $where; - - $save = $db->SetFetchMode(ADODB_FETCH_NUM); - $row = $db->GetRow("select * from ".$this->_table.' WHERE '.$where,$bindarr); - $db->SetFetchMode($save); - - return $this->Set($row); - } - - // false on error - function Save() - { - if ($this->_saved) $ok = $this->Update(); - else $ok = $this->Insert(); - - return $ok; - } - - // false on error - function Insert() - { - $db =& $this->DB(); if (!$db) return false; - $cnt = 0; - $table =& $this->TableInfo(); - - $valarr = array(); - $names = array(); - $valstr = array(); - - foreach($table->flds as $name=>$fld) { - $val = $this->$name; - if(!is_null($val) || !array_key_exists($name, $table->keys)) { - $valarr[] = $val; - $names[] = $name; - $valstr[] = $db->Param($cnt); - $cnt += 1; - } - } - - if (empty($names)){ - foreach($table->flds as $name=>$fld) { - $valarr[] = null; - $names[] = $name; - $valstr[] = $db->Param($cnt); - $cnt += 1; - } - } - $sql = 'INSERT INTO '.$this->_table."(".implode(',',$names).') VALUES ('.implode(',',$valstr).')'; - $ok = $db->Execute($sql,$valarr); - - if ($ok) { - $this->_saved = true; - $autoinc = false; - foreach($table->keys as $k) { - if (is_null($this->$k)) { - $autoinc = true; - break; - } - } - if ($autoinc && sizeof($table->keys) == 1) { - $k = reset($table->keys); - $this->$k = $this->LastInsertID($db,$k); - } - } - - $this->_original = $valarr; - return !empty($ok); - } - - function Delete() - { - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $where = $this->GenWhere($db,$table); - $sql = 'DELETE FROM '.$this->_table.' WHERE '.$where; - $ok = $db->Execute($sql); - - return $ok ? true : false; - } - - // returns an array of active record objects - function &Find($whereOrderBy,$bindarr=false,$pkeysArr=false) - { - $db =& $this->DB(); if (!$db || empty($this->_table)) return false; - $arr =& $db->GetActiveRecordsClass(get_class($this),$this->_table, $whereOrderBy,$bindarr,$pkeysArr); - return $arr; - } - - // returns 0 on error, 1 on update, 2 on insert - function Replace() - { - global $ADODB_ASSOC_CASE; - - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $pkey = $table->keys; - - foreach($table->flds as $name=>$fld) { - $val = $this->$name; - /* - if (is_null($val)) { - if (isset($fld->not_null) && $fld->not_null) { - if (isset($fld->default_value) && strlen($fld->default_value)) continue; - else { - $this->Error("Cannot update null into $name","Replace"); - return false; - } - } - }*/ - if (is_null($val) && !empty($fld->auto_increment)) { - continue; - } - $t = $db->MetaType($fld->type); - $arr[$name] = $this->doquote($db,$val,$t); - $valarr[] = $val; - } - - if (!is_array($pkey)) $pkey = array($pkey); - - - if ($ADODB_ASSOC_CASE == 0) - foreach($pkey as $k => $v) - $pkey[$k] = strtolower($v); - elseif ($ADODB_ASSOC_CASE == 0) - foreach($pkey as $k => $v) - $pkey[$k] = strtoupper($v); - - $ok = $db->Replace($this->_table,$arr,$pkey); - if ($ok) { - $this->_saved = true; // 1= update 2=insert - if ($ok == 2) { - $autoinc = false; - foreach($table->keys as $k) { - if (is_null($this->$k)) { - $autoinc = true; - break; - } - } - if ($autoinc && sizeof($table->keys) == 1) { - $k = reset($table->keys); - $this->$k = $this->LastInsertID($db,$k); - } - } - - $this->_original =& $valarr; - } - return $ok; - } - - // returns 0 on error, 1 on update, -1 if no change in data (no update) - function Update() - { - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $where = $this->GenWhere($db, $table); - - if (!$where) { - $this->error("Where missing for table $table", "Update"); - return false; - } - $valarr = array(); - $neworig = array(); - $pairs = array(); - $i = -1; - $cnt = 0; - foreach($table->flds as $name=>$fld) { - $i += 1; - $val = $this->$name; - $neworig[] = $val; - - if (isset($table->keys[$name])) { - continue; - } - - if (is_null($val)) { - if (isset($fld->not_null) && $fld->not_null) { - if (isset($fld->default_value) && strlen($fld->default_value)) continue; - else { - $this->Error("Cannot set field $name to NULL","Update"); - return false; - } - } - } - - if (isset($this->_original[$i]) && $val == $this->_original[$i]) { - continue; - } - $valarr[] = $val; - $pairs[] = $name.'='.$db->Param($cnt); - $cnt += 1; - } - - - if (!$cnt) return -1; - $sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where; - $ok = $db->Execute($sql,$valarr); - if ($ok) { - $this->_original =& $neworig; - return 1; - } - return 0; - } - - function GetAttributeNames() - { - $table =& $this->TableInfo(); - if (!$table) return false; - return array_keys($table->flds); - } - -}; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-csvlib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-csvlib.inc.php.svn-base deleted file mode 100755 index 1e34d39e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-csvlib.inc.php.svn-base +++ /dev/null @@ -1,312 +0,0 @@ -FieldCount() : 0; - - if ($sql) $sql = urlencode($sql); - // metadata setup - - if ($max <= 0 || $rs->dataProvider == 'empty') { // is insert/update/delete - if (is_object($conn)) { - $sql .= ','.$conn->Affected_Rows(); - $sql .= ','.$conn->Insert_ID(); - } else - $sql .= ',,'; - - $text = "====-1,0,$sql\n"; - return $text; - } - $tt = ($rs->timeCreated) ? $rs->timeCreated : time(); - - ## changed format from ====0 to ====1 - $line = "====1,$tt,$sql\n"; - - if ($rs->databaseType == 'array') { - $rows =& $rs->_array; - } else { - $rows = array(); - while (!$rs->EOF) { - $rows[] = $rs->fields; - $rs->MoveNext(); - } - } - - for($i=0; $i < $max; $i++) { - $o =& $rs->FetchField($i); - $flds[] = $o; - } - - $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; - $class = $rs->connection->arrayClass; - $rs2 = new $class(); - $rs2->sql = $rs->sql; - $rs2->oldProvider = $rs->dataProvider; - $rs2->InitArrayFields($rows,$flds); - $rs2->fetchMode = $savefetch; - return $line.serialize($rs2); - } - - -/** -* Open CSV file and convert it into Data. -* -* @param url file/ftp/http url -* @param err returns the error message -* @param timeout dispose if recordset has been alive for $timeout secs -* -* @return recordset, or false if error occured. If no -* error occurred in sql INSERT/UPDATE/DELETE, -* empty recordset is returned -*/ - function &csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array') - { - $false = false; - $err = false; - $fp = @fopen($url,'rb'); - if (!$fp) { - $err = $url.' file/URL not found'; - return $false; - } - @flock($fp, LOCK_SH); - $arr = array(); - $ttl = 0; - - if ($meta = fgetcsv($fp, 32000, ",")) { - // check if error message - if (strncmp($meta[0],'****',4) === 0) { - $err = trim(substr($meta[0],4,1024)); - fclose($fp); - return $false; - } - // check for meta data - // $meta[0] is -1 means return an empty recordset - // $meta[1] contains a time - - if (strncmp($meta[0], '====',4) === 0) { - - if ($meta[0] == "====-1") { - if (sizeof($meta) < 5) { - $err = "Corrupt first line for format -1"; - fclose($fp); - return $false; - } - fclose($fp); - - if ($timeout > 0) { - $err = " Illegal Timeout $timeout "; - return $false; - } - - $rs = new $rsclass($val=true); - $rs->fields = array(); - $rs->timeCreated = $meta[1]; - $rs->EOF = true; - $rs->_numOfFields = 0; - $rs->sql = urldecode($meta[2]); - $rs->affectedrows = (integer)$meta[3]; - $rs->insertid = $meta[4]; - return $rs; - } - # Under high volume loads, we want only 1 thread/process to _write_file - # so that we don't have 50 processes queueing to write the same data. - # We use probabilistic timeout, ahead of time. - # - # -4 sec before timeout, give processes 1/32 chance of timing out - # -2 sec before timeout, give processes 1/16 chance of timing out - # -1 sec after timeout give processes 1/4 chance of timing out - # +0 sec after timeout, give processes 100% chance of timing out - if (sizeof($meta) > 1) { - if($timeout >0){ - $tdiff = (integer)( $meta[1]+$timeout - time()); - if ($tdiff <= 2) { - switch($tdiff) { - case 4: - case 3: - if ((rand() & 31) == 0) { - fclose($fp); - $err = "Timeout 3"; - return $false; - } - break; - case 2: - if ((rand() & 15) == 0) { - fclose($fp); - $err = "Timeout 2"; - return $false; - } - break; - case 1: - if ((rand() & 3) == 0) { - fclose($fp); - $err = "Timeout 1"; - return $false; - } - break; - default: - fclose($fp); - $err = "Timeout 0"; - return $false; - } // switch - - } // if check flush cache - }// (timeout>0) - $ttl = $meta[1]; - } - //================================================ - // new cache format - use serialize extensively... - if ($meta[0] === '====1') { - // slurp in the data - $MAXSIZE = 128000; - - $text = fread($fp,$MAXSIZE); - if (strlen($text)) { - while ($txt = fread($fp,$MAXSIZE)) { - $text .= $txt; - } - } - fclose($fp); - $rs = unserialize($text); - if (is_object($rs)) $rs->timeCreated = $ttl; - else { - $err = "Unable to unserialize recordset"; - //echo htmlspecialchars($text),' !--END--!

    '; - } - return $rs; - } - - $meta = false; - $meta = fgetcsv($fp, 32000, ","); - if (!$meta) { - fclose($fp); - $err = "Unexpected EOF 1"; - return $false; - } - } - - // Get Column definitions - $flds = array(); - foreach($meta as $o) { - $o2 = explode(':',$o); - if (sizeof($o2)!=3) { - $arr[] = $meta; - $flds = false; - break; - } - $fld = new ADOFieldObject(); - $fld->name = urldecode($o2[0]); - $fld->type = $o2[1]; - $fld->max_length = $o2[2]; - $flds[] = $fld; - } - } else { - fclose($fp); - $err = "Recordset had unexpected EOF 2"; - return $false; - } - - // slurp in the data - $MAXSIZE = 128000; - - $text = ''; - while ($txt = fread($fp,$MAXSIZE)) { - $text .= $txt; - } - - fclose($fp); - @$arr = unserialize($text); - //var_dump($arr); - if (!is_array($arr)) { - $err = "Recordset had unexpected EOF (in serialized recordset)"; - if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!"; - return $false; - } - $rs = new $rsclass(); - $rs->timeCreated = $ttl; - $rs->InitArrayFields($arr,$flds); - return $rs; - } - - - /** - * Save a file $filename and its $contents (normally for caching) with file locking - */ - function adodb_write_file($filename, $contents,$debug=false) - { - # http://www.php.net/bugs.php?id=9203 Bug that flock fails on Windows - # So to simulate locking, we assume that rename is an atomic operation. - # First we delete $filename, then we create a $tempfile write to it and - # rename to the desired $filename. If the rename works, then we successfully - # modified the file exclusively. - # What a stupid need - having to simulate locking. - # Risks: - # 1. $tempfile name is not unique -- very very low - # 2. unlink($filename) fails -- ok, rename will fail - # 3. adodb reads stale file because unlink fails -- ok, $rs timeout occurs - # 4. another process creates $filename between unlink() and rename() -- ok, rename() fails and cache updated - if (strncmp(PHP_OS,'WIN',3) === 0) { - // skip the decimal place - $mtime = substr(str_replace(' ','_',microtime()),2); - // getmypid() actually returns 0 on Win98 - never mind! - $tmpname = $filename.uniqid($mtime).getmypid(); - if (!($fd = @fopen($tmpname,'a'))) return false; - $ok = ftruncate($fd,0); - if (!fwrite($fd,$contents)) $ok = false; - fclose($fd); - chmod($tmpname,0644); - // the tricky moment - @unlink($filename); - if (!@rename($tmpname,$filename)) { - unlink($tmpname); - $ok = false; - } - if (!$ok) { - if ($debug) ADOConnection::outp( " Rename $tmpname ".($ok? 'ok' : 'failed')); - } - return $ok; - } - if (!($fd = @fopen($filename, 'a'))) return false; - if (flock($fd, LOCK_EX) && ftruncate($fd, 0)) { - $ok = fwrite( $fd, $contents ); - fclose($fd); - chmod($filename,0644); - }else { - fclose($fd); - if ($debug)ADOConnection::outp( " Failed acquiring lock for $filename
    \n"); - $ok = false; - } - - return $ok; - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-datadict.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-datadict.inc.php.svn-base deleted file mode 100755 index c31edd82..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-datadict.inc.php.svn-base +++ /dev/null @@ -1,889 +0,0 @@ -$str

    "; -$a= Lens_ParseArgs($str); -print "
    ";
    -print_r($a);
    -print "
    "; -} - - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { - return preg_match('/^[a-z0-9]*$/i', $text); - } -} - -//Lens_ParseTest(); - -/** - Parse arguments, treat "text" (text) and 'text' as quotation marks. - To escape, use "" or '' or )) - - Will read in "abc def" sans quotes, as: abc def - Same with 'abc def'. - However if `abc def`, then will read in as `abc def` - - @param endstmtchar Character that indicates end of statement - @param tokenchars Include the following characters in tokens apart from A-Z and 0-9 - @returns 2 dimensional array containing parsed tokens. -*/ -function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') -{ - $pos = 0; - $intoken = false; - $stmtno = 0; - $endquote = false; - $tokens = array(); - $tokens[$stmtno] = array(); - $max = strlen($args); - $quoted = false; - $tokarr = array(); - - while ($pos < $max) { - $ch = substr($args,$pos,1); - switch($ch) { - case ' ': - case "\t": - case "\n": - case "\r": - if (!$quoted) { - if ($intoken) { - $intoken = false; - $tokens[$stmtno][] = implode('',$tokarr); - } - break; - } - - $tokarr[] = $ch; - break; - - case '`': - if ($intoken) $tokarr[] = $ch; - case '(': - case ')': - case '"': - case "'": - - if ($intoken) { - if (empty($endquote)) { - $tokens[$stmtno][] = implode('',$tokarr); - if ($ch == '(') $endquote = ')'; - else $endquote = $ch; - $quoted = true; - $intoken = true; - $tokarr = array(); - } else if ($endquote == $ch) { - $ch2 = substr($args,$pos+1,1); - if ($ch2 == $endquote) { - $pos += 1; - $tokarr[] = $ch2; - } else { - $quoted = false; - $intoken = false; - $tokens[$stmtno][] = implode('',$tokarr); - $endquote = ''; - } - } else - $tokarr[] = $ch; - - }else { - - if ($ch == '(') $endquote = ')'; - else $endquote = $ch; - $quoted = true; - $intoken = true; - $tokarr = array(); - if ($ch == '`') $tokarr[] = '`'; - } - break; - - default: - - if (!$intoken) { - if ($ch == $endstmtchar) { - $stmtno += 1; - $tokens[$stmtno] = array(); - break; - } - - $intoken = true; - $quoted = false; - $endquote = false; - $tokarr = array(); - - } - - if ($quoted) $tokarr[] = $ch; - else if (ctype_alnum($ch) || strpos($tokenchars,$ch) !== false) $tokarr[] = $ch; - else { - if ($ch == $endstmtchar) { - $tokens[$stmtno][] = implode('',$tokarr); - $stmtno += 1; - $tokens[$stmtno] = array(); - $intoken = false; - $tokarr = array(); - break; - } - $tokens[$stmtno][] = implode('',$tokarr); - $tokens[$stmtno][] = $ch; - $intoken = false; - } - } - $pos += 1; - } - if ($intoken) $tokens[$stmtno][] = implode('',$tokarr); - - return $tokens; -} - - -class ADODB_DataDict { - var $connection; - var $debug = false; - var $dropTable = 'DROP TABLE %s'; - var $renameTable = 'RENAME TABLE %s TO %s'; - var $dropIndex = 'DROP INDEX %s'; - var $addCol = ' ADD'; - var $alterCol = ' ALTER COLUMN'; - var $dropCol = ' DROP COLUMN'; - var $renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s'; // table, old-column, new-column, column-definitions (not used by default) - var $nameRegex = '\w'; - var $nameRegexBrackets = 'a-zA-Z0-9_\(\)'; - var $schema = false; - var $serverInfo = array(); - var $autoIncrement = false; - var $dataProvider; - var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changetablesql - var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob - /// in other words, we use a text area for editting. - - function GetCommentSQL($table,$col) - { - return false; - } - - function SetCommentSQL($table,$col,$cmt) - { - return false; - } - - function MetaTables() - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaTables(); - } - - function MetaColumns($tab, $upper=true, $schema=false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema); - } - - function MetaPrimaryKeys($tab,$owner=false,$intkey=false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey); - } - - function MetaIndexes($table, $primary = false, $owner = false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaIndexes($this->TableName($table), $primary, $owner); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - return ADORecordSet::MetaType($t,$len,$fieldobj); - } - - function NameQuote($name = NULL,$allowBrackets=false) - { - if (!is_string($name)) { - return FALSE; - } - - $name = trim($name); - - if ( !is_object($this->connection) ) { - return $name; - } - - $quote = $this->connection->nameQuote; - - // if name is of the form `name`, quote it - if ( preg_match('/^`(.+)`$/', $name, $matches) ) { - return $quote . $matches[1] . $quote; - } - - // if name contains special characters, quote it - $regex = ($allowBrackets) ? $this->nameRegexBrackets : $this->nameRegex; - - if ( !preg_match('/^[' . $regex . ']+$/', $name) ) { - return $quote . $name . $quote; - } - - return $name; - } - - function TableName($name) - { - if ( $this->schema ) { - return $this->NameQuote($this->schema) .'.'. $this->NameQuote($name); - } - return $this->NameQuote($name); - } - - // Executes the sql array returned by GetTableSQL and GetIndexSQL - function ExecuteSQLArray($sql, $continueOnError = true) - { - $rez = 2; - $conn = &$this->connection; - $saved = $conn->debug; - foreach($sql as $line) { - - if ($this->debug) $conn->debug = true; - $ok = $conn->Execute($line); - $conn->debug = $saved; - if (!$ok) { - if ($this->debug) ADOConnection::outp($conn->ErrorMsg()); - if (!$continueOnError) return 0; - $rez = 1; - } - } - return $rez; - } - - /** - Returns the actual type given a character code. - - C: varchar - X: CLOB (character large object) or largest varchar size if CLOB is not supported - C2: Multibyte varchar - X2: Multibyte CLOB - - B: BLOB (binary large object) - - D: Date - T: Date-time - L: Integer field suitable for storing booleans (0 or 1) - I: Integer - F: Floating point number - N: Numeric or decimal number - */ - - function ActualType($meta) - { - return $meta; - } - - function CreateDatabase($dbname,$options=false) - { - $options = $this->_Options($options); - $sql = array(); - - $s = 'CREATE DATABASE ' . $this->NameQuote($dbname); - if (isset($options[$this->upperName])) - $s .= ' '.$options[$this->upperName]; - - $sql[] = $s; - return $sql; - } - - /* - Generates the SQL to create index. Returns an array of sql strings. - */ - function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) - { - if (!is_array($flds)) { - $flds = explode(',',$flds); - } - - foreach($flds as $key => $fld) { - # some indexes can use partial fields, eg. index first 32 chars of "name" with NAME(32) - $flds[$key] = $this->NameQuote($fld,$allowBrackets=true); - } - - return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions)); - } - - function DropIndexSQL ($idxname, $tabname = NULL) - { - return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname))); - } - - function SetSchema($schema) - { - $this->schema = $schema; - } - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; - foreach($lines as $v) { - $sql[] = $alter . $v; - } - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - } - return $sql; - } - - /** - * Change the definition of one column - * - * As some DBM's can't do that on there own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; - foreach($lines as $v) { - $sql[] = $alter . $v; - } - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - - } - return $sql; - } - - /** - * Rename one column - * - * Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql) - * @param string $tabname table-name - * @param string $oldcolumn column-name to be renamed - * @param string $newcolumn new column-name - * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' - * @return array with SQL strings - */ - function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') - { - $tabname = $this->TableName ($tabname); - if ($flds) { - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - list(,$first) = each($lines); - list(,$column_def) = split("[\t ]+",$first,2); - } - return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); - } - - /** - * Drop one column - * - * Some DBM's can't do that on there own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - $sql = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->dropCol . ' '; - foreach($flds as $v) { - $sql[] = $alter . $this->NameQuote($v); - } - return $sql; - } - - function DropTableSQL($tabname) - { - return array (sprintf($this->dropTable, $this->TableName($tabname))); - } - - function RenameTableSQL($tabname,$newname) - { - return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname))); - } - - /** - Generate the SQL to create table. Returns an array of sql strings. - */ - function CreateTableSQL($tabname, $flds, $tableoptions=array()) - { - list($lines,$pkey,$idxs) = $this->_GenFields($flds, true); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - - $taboptions = $this->_Options($tableoptions); - $tabname = $this->TableName ($tabname); - $sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions); - - // ggiunta - 2006/10/12 - KLUDGE: - // if we are on autoincrement, and table options includes REPLACE, the - // autoincrement sequence has already been dropped on table creation sql, so - // we avoid passing REPLACE to trigger creation code. This prevents - // creating sql that double-drops the sequence - if ($this->autoIncrement && isset($taboptions['REPLACE'])) - unset($taboptions['REPLACE']); - $tsql = $this->_Triggers($tabname,$taboptions); - foreach($tsql as $s) $sql[] = $s; - - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - } - - return $sql; - } - - function _GenFields($flds,$widespacing=false) - { - if (is_string($flds)) { - $padding = ' '; - $txt = $flds.$padding; - $flds = array(); - $flds0 = Lens_ParseArgs($txt,','); - $hasparam = false; - foreach($flds0 as $f0) { - $f1 = array(); - foreach($f0 as $token) { - switch (strtoupper($token)) { - case 'INDEX': - $f1['INDEX'] = ''; - // fall through intentionally - case 'CONSTRAINT': - case 'DEFAULT': - $hasparam = $token; - break; - default: - if ($hasparam) $f1[$hasparam] = $token; - else $f1[] = $token; - $hasparam = false; - break; - } - } - // 'index' token without a name means single column index: name it after column - if (array_key_exists('INDEX', $f1) && $f1['INDEX'] == '') { - $f1['INDEX'] = isset($f0['NAME']) ? $f0['NAME'] : $f0[0]; - // check if column name used to create an index name was quoted - if (($f1['INDEX'][0] == '"' || $f1['INDEX'][0] == "'" || $f1['INDEX'][0] == "`") && - ($f1['INDEX'][0] == substr($f1['INDEX'], -1))) { - $f1['INDEX'] = $f1['INDEX'][0].'idx_'.substr($f1['INDEX'], 1, -1).$f1['INDEX'][0]; - } - else - $f1['INDEX'] = 'idx_'.$f1['INDEX']; - } - // reset it, so we don't get next field 1st token as INDEX... - $hasparam = false; - - $flds[] = $f1; - - } - } - $this->autoIncrement = false; - $lines = array(); - $pkey = array(); - $idxs = array(); - foreach($flds as $fld) { - $fld = _array_change_key_case($fld); - - $fname = false; - $fdefault = false; - $fautoinc = false; - $ftype = false; - $fsize = false; - $fprec = false; - $fprimary = false; - $fnoquote = false; - $fdefts = false; - $fdefdate = false; - $fconstraint = false; - $fnotnull = false; - $funsigned = false; - $findex = ''; - $funiqueindex = false; - - //----------------- - // Parse attributes - foreach($fld as $attr => $v) { - if ($attr == 2 && is_numeric($v)) $attr = 'SIZE'; - else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v); - - switch($attr) { - case '0': - case 'NAME': $fname = $v; break; - case '1': - case 'TYPE': $ty = $v; $ftype = $this->ActualType(strtoupper($v)); break; - - case 'SIZE': - $dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,','); - if ($dotat === false) $fsize = $v; - else { - $fsize = substr($v,0,$dotat); - $fprec = substr($v,$dotat+1); - } - break; - case 'UNSIGNED': $funsigned = true; break; - case 'AUTOINCREMENT': - case 'AUTO': $fautoinc = true; $fnotnull = true; break; - case 'KEY': - // a primary key col can be non unique in itself (if key spans many cols...) - case 'PRIMARY': $fprimary = $v; $fnotnull = true; /*$funiqueindex = true;*/ break; - case 'DEF': - case 'DEFAULT': $fdefault = $v; break; - case 'NOTNULL': $fnotnull = $v; break; - case 'NOQUOTE': $fnoquote = $v; break; - case 'DEFDATE': $fdefdate = $v; break; - case 'DEFTIMESTAMP': $fdefts = $v; break; - case 'CONSTRAINT': $fconstraint = $v; break; - // let INDEX keyword create a 'very standard' index on column - case 'INDEX': $findex = $v; break; - case 'UNIQUE': $funiqueindex = true; break; - } //switch - } // foreach $fld - - //-------------------- - // VALIDATE FIELD INFO - if (!strlen($fname)) { - if ($this->debug) ADOConnection::outp("Undefined NAME"); - return false; - } - - $fid = strtoupper(preg_replace('/^`(.+)`$/', '$1', $fname)); - $fname = $this->NameQuote($fname); - - if (!strlen($ftype)) { - if ($this->debug) ADOConnection::outp("Undefined TYPE for field '$fname'"); - return false; - } else { - $ftype = strtoupper($ftype); - } - - $ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec); - - if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls - - if ($fprimary) $pkey[] = $fname; - - // some databases do not allow blobs to have defaults - if ($ty == 'X') $fdefault = false; - - // build list of indexes - if ($findex != '') { - if (array_key_exists($findex, $idxs)) { - $idxs[$findex]['cols'][] = ($fname); - if (in_array('UNIQUE', $idxs[$findex]['opts']) != $funiqueindex) { - if ($this->debug) ADOConnection::outp("Index $findex defined once UNIQUE and once not"); - } - if ($funiqueindex && !in_array('UNIQUE', $idxs[$findex]['opts'])) - $idxs[$findex]['opts'][] = 'UNIQUE'; - } - else - { - $idxs[$findex] = array(); - $idxs[$findex]['cols'] = array($fname); - if ($funiqueindex) - $idxs[$findex]['opts'] = array('UNIQUE'); - else - $idxs[$findex]['opts'] = array(); - } - } - - //-------------------- - // CONSTRUCT FIELD SQL - if ($fdefts) { - if (substr($this->connection->databaseType,0,5) == 'mysql') { - $ftype = 'TIMESTAMP'; - } else { - $fdefault = $this->connection->sysTimeStamp; - } - } else if ($fdefdate) { - if (substr($this->connection->databaseType,0,5) == 'mysql') { - $ftype = 'TIMESTAMP'; - } else { - $fdefault = $this->connection->sysDate; - } - } else if ($fdefault !== false && !$fnoquote) { - if ($ty == 'C' or $ty == 'X' or - ( substr($fdefault,0,1) != "'" && !is_numeric($fdefault))) { - - if (($ty == 'D' || $ty == 'T') && strtolower($fdefault) != 'null') { - // convert default date into database-aware code - if ($ty == 'T') - { - $fdefault = $this->connection->DBTimeStamp($fdefault); - } - else - { - $fdefault = $this->connection->DBDate($fdefault); - } - } - else - if (strlen($fdefault) != 1 && substr($fdefault,0,1) == ' ' && substr($fdefault,strlen($fdefault)-1) == ' ') - $fdefault = trim($fdefault); - else if (strtolower($fdefault) != 'null') - $fdefault = $this->connection->qstr($fdefault); - } - } - $suffix = $this->_CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned); - - // add index creation - if ($widespacing) $fname = str_pad($fname,24); - - // check for field names appearing twice - if (array_key_exists($fid, $lines)) { - ADOConnection::outp("Field '$fname' defined twice"); - } - - $lines[$fid] = $fname.' '.$ftype.$suffix; - - if ($fautoinc) $this->autoIncrement = true; - } // foreach $flds - - return array($lines,$pkey,$idxs); - } - - /** - GENERATE THE SIZE PART OF THE DATATYPE - $ftype is the actual type - $ty is the type defined originally in the DDL - */ - function _GetSize($ftype, $ty, $fsize, $fprec) - { - if (strlen($fsize) && $ty != 'X' && $ty != 'B' && strpos($ftype,'(') === false) { - $ftype .= "(".$fsize; - if (strlen($fprec)) $ftype .= ",".$fprec; - $ftype .= ')'; - } - return $ftype; - } - - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s .= '(' . $flds . ')'; - $sql[] = $s; - - return $sql; - } - - function _DropAutoIncrement($tabname) - { - return false; - } - - function _TableSQL($tabname,$lines,$pkey,$tableoptions) - { - $sql = array(); - - if (isset($tableoptions['REPLACE']) || isset ($tableoptions['DROP'])) { - $sql[] = sprintf($this->dropTable,$tabname); - if ($this->autoIncrement) { - $sInc = $this->_DropAutoIncrement($tabname); - if ($sInc) $sql[] = $sInc; - } - if ( isset ($tableoptions['DROP']) ) { - return $sql; - } - } - $s = "CREATE TABLE $tabname (\n"; - $s .= implode(",\n", $lines); - if (sizeof($pkey)>0) { - $s .= ",\n PRIMARY KEY ("; - $s .= implode(", ",$pkey).")"; - } - if (isset($tableoptions['CONSTRAINTS'])) - $s .= "\n".$tableoptions['CONSTRAINTS']; - - if (isset($tableoptions[$this->upperName.'_CONSTRAINTS'])) - $s .= "\n".$tableoptions[$this->upperName.'_CONSTRAINTS']; - - $s .= "\n)"; - if (isset($tableoptions[$this->upperName])) $s .= $tableoptions[$this->upperName]; - $sql[] = $s; - - return $sql; - } - - /** - GENERATE TRIGGERS IF NEEDED - used when table has auto-incrementing field that is emulated using triggers - */ - function _Triggers($tabname,$taboptions) - { - return array(); - } - - /** - Sanitize options, so that array elements with no keys are promoted to keys - */ - function _Options($opts) - { - if (!is_array($opts)) return array(); - $newopts = array(); - foreach($opts as $k => $v) { - if (is_numeric($k)) $newopts[strtoupper($v)] = $v; - else $newopts[strtoupper($k)] = $v; - } - return $newopts; - } - - /** - "Florian Buzin [ easywe ]" - - This function changes/adds new fields to your table. You don't - have to know if the col is new or not. It will check on its own. - */ - function ChangeTableSQL($tablename, $flds, $tableoptions = false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($this->connection->fetchMode !== false) $savem = $this->connection->SetFetchMode(false); - - // check table exists - $save_handler = $this->connection->raiseErrorFn; - $this->connection->raiseErrorFn = ''; - $cols = $this->MetaColumns($tablename); - $this->connection->raiseErrorFn = $save_handler; - - if (isset($savem)) $this->connection->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ( empty($cols)) { - return $this->CreateTableSQL($tablename, $flds, $tableoptions); - } - - if (is_array($flds)) { - // Cycle through the update fields, comparing - // existing fields to fields to update. - // if the Metatype and size is exactly the - // same, ignore - by Mark Newham - $holdflds = array(); - foreach($flds as $k=>$v) { - if ( isset($cols[$k]) && is_object($cols[$k]) ) { - // If already not allowing nulls, then don't change - $obj = $cols[$k]; - if (isset($obj->not_null) && $obj->not_null) - $v = str_replace('NOT NULL','',$v); - - $c = $cols[$k]; - $ml = $c->max_length; - $mt = $this->MetaType($c->type,$ml); - if ($ml == -1) $ml = ''; - if ($mt == 'X') $ml = $v['SIZE']; - if (($mt != $v['TYPE']) || $ml != $v['SIZE']) { - $holdflds[$k] = $v; - } - } else { - $holdflds[$k] = $v; - } - } - $flds = $holdflds; - } - - - // already exists, alter table instead - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $this->TableName($tablename); - $sql = array(); - - foreach ( $lines as $id => $v ) { - if ( isset($cols[$id]) && is_object($cols[$id]) ) { - - $flds = Lens_ParseArgs($v,','); - - // We are trying to change the size of the field, if not allowed, simply ignore the request. - if ($flds && in_array(strtoupper(substr($flds[0][1],0,4)),$this->invalidResizeTypes4)) { - echo "

    $this->alterCol cannot be changed to $flds currently

    "; - continue; - } - $sql[] = $alter . $this->alterCol . ' ' . $v; - } else { - $sql[] = $alter . $this->addCol . ' ' . $v; - } - } - - return $sql; - } -} // class -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-error.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-error.inc.php.svn-base deleted file mode 100755 index e60976b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-error.inc.php.svn-base +++ /dev/null @@ -1,258 +0,0 @@ - DB_ERROR_NOSUCHTABLE, - '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_ALREADY_EXISTS, - '/divide by zero$/' => DB_ERROR_DIVZERO, - '/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER, - '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD, - '/parser: parse error at or near \"/' => DB_ERROR_SYNTAX, - '/referential integrity violation/' => DB_ERROR_CONSTRAINT, - '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key violates unique constraint/' - => DB_ERROR_ALREADY_EXISTS - ); - reset($error_regexps); - while (list($regexp,$code) = each($error_regexps)) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; -} - -function adodb_error_odbc() -{ -static $MAP = array( - '01004' => DB_ERROR_TRUNCATED, - '07001' => DB_ERROR_MISMATCH, - '21S01' => DB_ERROR_MISMATCH, - '21S02' => DB_ERROR_MISMATCH, - '22003' => DB_ERROR_INVALID_NUMBER, - '22008' => DB_ERROR_INVALID_DATE, - '22012' => DB_ERROR_DIVZERO, - '23000' => DB_ERROR_CONSTRAINT, - '24000' => DB_ERROR_INVALID, - '34000' => DB_ERROR_INVALID, - '37000' => DB_ERROR_SYNTAX, - '42000' => DB_ERROR_SYNTAX, - 'IM001' => DB_ERROR_UNSUPPORTED, - 'S0000' => DB_ERROR_NOSUCHTABLE, - 'S0001' => DB_ERROR_NOT_FOUND, - 'S0002' => DB_ERROR_NOSUCHTABLE, - 'S0011' => DB_ERROR_ALREADY_EXISTS, - 'S0012' => DB_ERROR_NOT_FOUND, - 'S0021' => DB_ERROR_ALREADY_EXISTS, - 'S0022' => DB_ERROR_NOT_FOUND, - 'S1000' => DB_ERROR_NOSUCHTABLE, - 'S1009' => DB_ERROR_INVALID, - 'S1090' => DB_ERROR_INVALID, - 'S1C00' => DB_ERROR_NOT_CAPABLE - ); - return $MAP; -} - -function adodb_error_ibase() -{ -static $MAP = array( - -104 => DB_ERROR_SYNTAX, - -150 => DB_ERROR_ACCESS_VIOLATION, - -151 => DB_ERROR_ACCESS_VIOLATION, - -155 => DB_ERROR_NOSUCHTABLE, - -157 => DB_ERROR_NOSUCHFIELD, - -158 => DB_ERROR_VALUE_COUNT_ON_ROW, - -170 => DB_ERROR_MISMATCH, - -171 => DB_ERROR_MISMATCH, - -172 => DB_ERROR_INVALID, - -204 => DB_ERROR_INVALID, - -205 => DB_ERROR_NOSUCHFIELD, - -206 => DB_ERROR_NOSUCHFIELD, - -208 => DB_ERROR_INVALID, - -219 => DB_ERROR_NOSUCHTABLE, - -297 => DB_ERROR_CONSTRAINT, - -530 => DB_ERROR_CONSTRAINT, - -803 => DB_ERROR_CONSTRAINT, - -551 => DB_ERROR_ACCESS_VIOLATION, - -552 => DB_ERROR_ACCESS_VIOLATION, - -922 => DB_ERROR_NOSUCHDB, - -923 => DB_ERROR_CONNECT_FAILED, - -924 => DB_ERROR_CONNECT_FAILED - ); - - return $MAP; -} - -function adodb_error_ifx() -{ -static $MAP = array( - '-201' => DB_ERROR_SYNTAX, - '-206' => DB_ERROR_NOSUCHTABLE, - '-217' => DB_ERROR_NOSUCHFIELD, - '-329' => DB_ERROR_NODBSELECTED, - '-1204' => DB_ERROR_INVALID_DATE, - '-1205' => DB_ERROR_INVALID_DATE, - '-1206' => DB_ERROR_INVALID_DATE, - '-1209' => DB_ERROR_INVALID_DATE, - '-1210' => DB_ERROR_INVALID_DATE, - '-1212' => DB_ERROR_INVALID_DATE - ); - - return $MAP; -} - -function adodb_error_oci8() -{ -static $MAP = array( - 1 => DB_ERROR_ALREADY_EXISTS, - 900 => DB_ERROR_SYNTAX, - 904 => DB_ERROR_NOSUCHFIELD, - 923 => DB_ERROR_SYNTAX, - 942 => DB_ERROR_NOSUCHTABLE, - 955 => DB_ERROR_ALREADY_EXISTS, - 1476 => DB_ERROR_DIVZERO, - 1722 => DB_ERROR_INVALID_NUMBER, - 2289 => DB_ERROR_NOSUCHTABLE, - 2291 => DB_ERROR_CONSTRAINT, - 2449 => DB_ERROR_CONSTRAINT - ); - - return $MAP; -} - -function adodb_error_mssql() -{ -static $MAP = array( - 208 => DB_ERROR_NOSUCHTABLE, - 2601 => DB_ERROR_ALREADY_EXISTS - ); - - return $MAP; -} - -function adodb_error_sqlite() -{ -static $MAP = array( - 1 => DB_ERROR_SYNTAX - ); - - return $MAP; -} - -function adodb_error_mysql() -{ -static $MAP = array( - 1004 => DB_ERROR_CANNOT_CREATE, - 1005 => DB_ERROR_CANNOT_CREATE, - 1006 => DB_ERROR_CANNOT_CREATE, - 1007 => DB_ERROR_ALREADY_EXISTS, - 1008 => DB_ERROR_CANNOT_DROP, - 1045 => DB_ERROR_ACCESS_VIOLATION, - 1046 => DB_ERROR_NODBSELECTED, - 1049 => DB_ERROR_NOSUCHDB, - 1050 => DB_ERROR_ALREADY_EXISTS, - 1051 => DB_ERROR_NOSUCHTABLE, - 1054 => DB_ERROR_NOSUCHFIELD, - 1062 => DB_ERROR_ALREADY_EXISTS, - 1064 => DB_ERROR_SYNTAX, - 1100 => DB_ERROR_NOT_LOCKED, - 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, - 1146 => DB_ERROR_NOSUCHTABLE, - 1048 => DB_ERROR_CONSTRAINT, - 2002 => DB_ERROR_CONNECT_FAILED, - 2005 => DB_ERROR_CONNECT_FAILED - ); - - return $MAP; -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorhandler.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorhandler.inc.php.svn-base deleted file mode 100755 index 87a9267c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorhandler.inc.php.svn-base +++ /dev/null @@ -1,79 +0,0 @@ -$s

    "; - trigger_error($s,ADODB_ERROR_HANDLER_TYPE); -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorpear.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorpear.inc.php.svn-base deleted file mode 100755 index 31cbe614..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-errorpear.inc.php.svn-base +++ /dev/null @@ -1,88 +0,0 @@ -!$s

    "; -} - -/** -* Returns last PEAR_Error object. This error might be for an error that -* occured several sql statements ago. -*/ -function &ADODB_PEAR_Error() -{ -global $ADODB_Last_PEAR_Error; - - return $ADODB_Last_PEAR_Error; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-exceptions.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-exceptions.inc.php.svn-base deleted file mode 100755 index 3eebc4e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-exceptions.inc.php.svn-base +++ /dev/null @@ -1,82 +0,0 @@ -sql = $p1; - $this->params = $p2; - $s = "$dbms error: [$errno: $errmsg] in $fn(\"$p1\")\n"; - break; - - case 'PCONNECT': - case 'CONNECT': - $user = $thisConnection->user; - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n"; - break; - default: - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n"; - break; - } - - $this->dbms = $dbms; - if ($thisConnection) { - $this->host = $thisConnection->host; - $this->database = $thisConnection->database; - } - $this->fn = $fn; - $this->msg = $errmsg; - - if (!is_numeric($errno)) $errno = -1; - parent::__construct($s,$errno); - } -} - -/** -* Default Error Handler. This will be called with the following params -* -* @param $dbms the RDBMS you are connecting to -* @param $fn the name of the calling function (in uppercase) -* @param $errno the native error number from the database -* @param $errmsg the native error msg from the database -* @param $p1 $fn specific parameter - see below -* @param $P2 $fn specific parameter - see below -*/ - -function adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection) -{ -global $ADODB_EXCEPTION; - - if (error_reporting() == 0) return; // obey @ protocol - if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION; - else $errfn = 'ADODB_EXCEPTION'; - throw new $errfn($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection); -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-iterator.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-iterator.inc.php.svn-base deleted file mode 100755 index d291e78a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-iterator.inc.php.svn-base +++ /dev/null @@ -1,85 +0,0 @@ -Execute("select * from adoxyz"); - foreach($rs as $k => $v) { - echo $k; print_r($v); echo "
    "; - } - - - Iterator code based on http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2 - */ - - - class ADODB_Iterator implements Iterator { - - private $rs; - - function __construct($rs) - { - $this->rs = $rs; - } - function rewind() - { - $this->rs->MoveFirst(); - } - - function valid() - { - return !$this->rs->EOF; - } - - function key() - { - return $this->rs->_currentRow; - } - - function current() - { - return $this->rs->fields; - } - - function next() - { - $this->rs->MoveNext(); - } - - function __call($func, $params) - { - return call_user_func_array(array($this->rs, $func), $params); - } - - - function hasMore() - { - return !$this->rs->EOF; - } - -} - - -class ADODB_BASE_RS implements IteratorAggregate { - function getIterator() { - return new ADODB_Iterator($this); - } - - /* this is experimental - i don't really know what to return... */ - function __toString() - { - include_once(ADODB_DIR.'/toexport.inc.php'); - return _adodb_export($this,',',',',false,true); - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-lib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-lib.inc.php.svn-base deleted file mode 100755 index 2a67f28d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-lib.inc.php.svn-base +++ /dev/null @@ -1,1137 +0,0 @@ - sizeof($array)) $max = sizeof($array); - else $max = $probe; - - - for ($j=0;$j < $max; $j++) { - $row =& $array[$j]; - if (!$row) break; - $i = -1; - foreach($row as $v) { - $i += 1; - - if (isset($types[$i]) && $types[$i]=='C') continue; - - //print " ($i ".$types[$i]. "$v) "; - $v = trim($v); - - if (!preg_match('/^[+-]{0,1}[0-9\.]+$/',$v)) { - $types[$i] = 'C'; // once C, always C - - continue; - } - if ($j == 0) { - // If empty string, we presume is character - // test for integer for 1st row only - // after that it is up to testing other rows to prove - // that it is not an integer - if (strlen($v) == 0) $types[$i] = 'C'; - if (strpos($v,'.') !== false) $types[$i] = 'N'; - else $types[$i] = 'I'; - continue; - } - - if (strpos($v,'.') !== false) $types[$i] = 'N'; - - } - } - -} - -function adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs) -{ - $oldX = sizeof(reset($arr)); - $oldY = sizeof($arr); - - if ($hdr) { - $startx = 1; - $hdr = array('Fields'); - for ($y = 0; $y < $oldY; $y++) { - $hdr[] = $arr[$y][0]; - } - } else - $startx = 0; - - for ($x = $startx; $x < $oldX; $x++) { - if ($fobjs) { - $o = $fobjs[$x]; - $newarr[] = array($o->name); - } else - $newarr[] = array(); - - for ($y = 0; $y < $oldY; $y++) { - $newarr[$x-$startx][] = $arr[$y][$x]; - } - } -} - -// Force key to upper. -// See also http://www.php.net/manual/en/function.array-change-key-case.php -function _array_change_key_case($an_array) -{ - if (is_array($an_array)) { - $new_array = array(); - foreach($an_array as $key=>$value) - $new_array[strtoupper($key)] = $value; - - return $new_array; - } - - return $an_array; -} - -function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc) -{ - if (count($fieldArray) == 0) return 0; - $first = true; - $uSet = ''; - - if (!is_array($keyCol)) { - $keyCol = array($keyCol); - } - foreach($fieldArray as $k => $v) { - if ($autoQuote && !is_numeric($v) and strncmp($v,"'",1) !== 0 and strcasecmp($v,$zthis->null2null)!=0) { - $v = $zthis->qstr($v); - $fieldArray[$k] = $v; - } - if (in_array($k,$keyCol)) continue; // skip UPDATE if is key - - if ($first) { - $first = false; - $uSet = "$k=$v"; - } else - $uSet .= ",$k=$v"; - } - - $where = false; - foreach ($keyCol as $v) { - if (isset($fieldArray[$v])) { - if ($where) $where .= ' and '.$v.'='.$fieldArray[$v]; - else $where = $v.'='.$fieldArray[$v]; - } - } - - if ($uSet && $where) { - $update = "UPDATE $table SET $uSet WHERE $where"; - - $rs = $zthis->Execute($update); - - - if ($rs) { - if ($zthis->poorAffectedRows) { - /* - The Select count(*) wipes out any errors that the update would have returned. - http://phplens.com/lens/lensforum/msgs.php?id=5696 - */ - if ($zthis->ErrorNo()<>0) return 0; - - # affected_rows == 0 if update field values identical to old values - # for mysql - which is silly. - - $cnt = $zthis->GetOne("select count(*) from $table where $where"); - if ($cnt > 0) return 1; // record already exists - } else { - if (($zthis->Affected_Rows()>0)) return 1; - } - } else - return 0; - } - - // print "

    Error=".$this->ErrorNo().'

    '; - $first = true; - foreach($fieldArray as $k => $v) { - if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col - - if ($first) { - $first = false; - $iCols = "$k"; - $iVals = "$v"; - } else { - $iCols .= ",$k"; - $iVals .= ",$v"; - } - } - $insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; - $rs = $zthis->Execute($insert); - return ($rs) ? 2 : 0; -} - -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM -function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) -{ - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; - - $s = '\n"; -} - -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM -function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) -{ - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; - - $s = '\n"; -} - - -/* - Count the number of records this sql statement will return by using - query rewriting heuristics... - - Does not work with UNIONs, except with postgresql and oracle. - - Usage: - - $conn->Connect(...); - $cnt = _adodb_getcount($conn, $sql); - -*/ -function _adodb_getcount(&$zthis, $sql,$inputarr=false,$secs2cache=0) -{ - $qryRecs = 0; - - if (!empty($zthis->_nestedSQL) || preg_match("/^\s*SELECT\s+DISTINCT/is", $sql) || - preg_match('/\s+GROUP\s+BY\s+/is',$sql) || - preg_match('/\s+UNION\s+/is',$sql)) { - // ok, has SELECT DISTINCT or GROUP BY so see if we can use a table alias - // but this is only supported by oracle and postgresql... - if ($zthis->dataProvider == 'oci8') { - - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql); - - // Allow Oracle hints to be used for query optimization, Chris Wrye - if (preg_match('#/\\*+.*?\\*\\/#', $sql, $hint)) { - $rewritesql = "SELECT ".$hint[0]." COUNT(*) FROM (".$rewritesql.")"; - } else - $rewritesql = "SELECT COUNT(*) FROM (".$rewritesql.")"; - - } else if (strncmp($zthis->databaseType,'postgres',8) == 0) { - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql); - $rewritesql = "SELECT COUNT(*) FROM ($rewritesql) _ADODB_ALIAS_"; - } - } else { - // now replace SELECT ... FROM with SELECT COUNT(*) FROM - $rewritesql = preg_replace( - '/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql); - - - - // fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails - // with mssql, access and postgresql. Also a good speedup optimization - skips sorting! - // also see http://phplens.com/lens/lensforum/msgs.php?id=12752 - if (preg_match('/\sORDER\s+BY\s*\(/i',$rewritesql)) - $rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$rewritesql); - else - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$rewritesql); - } - - - - if (isset($rewritesql) && $rewritesql != $sql) { - if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[1]; - - if ($secs2cache) { - // we only use half the time of secs2cache because the count can quickly - // become inaccurate if new records are added - $qryRecs = $zthis->CacheGetOne($secs2cache/2,$rewritesql,$inputarr); - - } else { - $qryRecs = $zthis->GetOne($rewritesql,$inputarr); - } - if ($qryRecs !== false) return $qryRecs; - } - //-------------------------------------------- - // query rewrite failed - so try slower way... - - - // strip off unneeded ORDER BY if no UNION - if (preg_match('/\s*UNION\s*/is', $sql)) $rewritesql = $sql; - else $rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql); - - if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[0]; - - $rstest = &$zthis->Execute($rewritesql,$inputarr); - if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr); - - if ($rstest) { - $qryRecs = $rstest->RecordCount(); - if ($qryRecs == -1) { - global $ADODB_EXTENSION; - // some databases will return -1 on MoveLast() - change to MoveNext() - if ($ADODB_EXTENSION) { - while(!$rstest->EOF) { - adodb_movenext($rstest); - } - } else { - while(!$rstest->EOF) { - $rstest->MoveNext(); - } - } - $qryRecs = $rstest->_currentRow; - } - $rstest->Close(); - if ($qryRecs == -1) return 0; - } - return $qryRecs; -} - -/* - Code originally from "Cornel G" - - This code might not work with SQL that has UNION in it - - Also if you are using CachePageExecute(), there is a strong possibility that - data will get out of synch. use CachePageExecute() only with tables that - rarely change. -*/ -function &_adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, - $inputarr=false, $secs2cache=0) -{ - $atfirstpage = false; - $atlastpage = false; - $lastpageno=1; - - // If an invalid nrows is supplied, - // we assume a default value of 10 rows per page - if (!isset($nrows) || $nrows <= 0) $nrows = 10; - - $qryRecs = false; //count records for no offset - - $qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache); - $lastpageno = (int) ceil($qryRecs / $nrows); - $zthis->_maxRecordCount = $qryRecs; - - - - // ***** Here we check whether $page is the last page or - // whether we are trying to retrieve - // a page number greater than the last page number. - if ($page >= $lastpageno) { - $page = $lastpageno; - $atlastpage = true; - } - - // If page number <= 1, then we are at the first page - if (empty($page) || $page <= 1) { - $page = 1; - $atfirstpage = true; - } - - // We get the data we want - $offset = $nrows * ($page-1); - if ($secs2cache > 0) - $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); - else - $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); - - - // Before returning the RecordSet, we set the pagination properties we need - if ($rsreturn) { - $rsreturn->_maxRecordCount = $qryRecs; - $rsreturn->rowsPerPage = $nrows; - $rsreturn->AbsolutePage($page); - $rsreturn->AtFirstPage($atfirstpage); - $rsreturn->AtLastPage($atlastpage); - $rsreturn->LastPageNo($lastpageno); - } - return $rsreturn; -} - -// Ivn Oliva version -function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) -{ - - $atfirstpage = false; - $atlastpage = false; - - if (!isset($page) || $page <= 1) { // If page number <= 1, then we are at the first page - $page = 1; - $atfirstpage = true; - } - if ($nrows <= 0) $nrows = 10; // If an invalid nrows is supplied, we assume a default value of 10 rows per page - - // ***** Here we check whether $page is the last page or whether we are trying to retrieve a page number greater than - // the last page number. - $pagecounter = $page + 1; - $pagecounteroffset = ($pagecounter * $nrows) - $nrows; - if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); - else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); - if ($rstest) { - while ($rstest && $rstest->EOF && $pagecounter>0) { - $atlastpage = true; - $pagecounter--; - $pagecounteroffset = $nrows * ($pagecounter - 1); - $rstest->Close(); - if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); - else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); - } - if ($rstest) $rstest->Close(); - } - if ($atlastpage) { // If we are at the last page or beyond it, we are going to retrieve it - $page = $pagecounter; - if ($page == 1) $atfirstpage = true; // We have to do this again in case the last page is the same as the first - //... page, that is, the recordset has only 1 page. - } - - // We get the data we want - $offset = $nrows * ($page-1); - if ($secs2cache > 0) $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); - else $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); - - // Before returning the RecordSet, we set the pagination properties we need - if ($rsreturn) { - $rsreturn->rowsPerPage = $nrows; - $rsreturn->AbsolutePage($page); - $rsreturn->AtFirstPage($atfirstpage); - $rsreturn->AtLastPage($atlastpage); - } - return $rsreturn; -} - -function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=2) -{ - global $ADODB_QUOTE_FIELDNAMES; - - if (!$rs) { - printf(ADODB_BAD_RS,'GetUpdateSQL'); - return false; - } - - $fieldUpdatedCount = 0; - $arrFields = _array_change_key_case($arrFields); - - $hasnumeric = isset($rs->fields[0]); - $setFields = ''; - - // Loop through all of the fields in the recordset - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { - // Get the field from the recordset - $field = $rs->FetchField($i); - - // If the recordset field is one - // of the fields passed in then process. - $upperfname = strtoupper($field->name); - if (adodb_key_exists($upperfname,$arrFields,$force)) { - - // If the existing field value in the recordset - // is different from the value passed in then - // go ahead and append the field name and new value to - // the update query. - - if ($hasnumeric) $val = $rs->fields[$i]; - else if (isset($rs->fields[$upperfname])) $val = $rs->fields[$upperfname]; - else if (isset($rs->fields[$field->name])) $val = $rs->fields[$field->name]; - else if (isset($rs->fields[strtolower($upperfname)])) $val = $rs->fields[strtolower($upperfname)]; - else $val = ''; - - - if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) { - // Set the counter for the number of fields that will be updated. - $fieldUpdatedCount++; - - // Based on the datatype of the field - // Format the value properly for the database - $type = $rs->MetaType($field->type); - - - if ($type == 'null') { - $type = 'C'; - } - - if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) - $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; - else - $fnameq = $upperfname; - - - // is_null requires php 4.0.4 - //********************************************************// - if (is_null($arrFields[$upperfname]) - || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) - || $arrFields[$upperfname] === $zthis->null2null - ) - { - switch ($force) { - - //case 0: - // //Ignore empty values. This is allready handled in "adodb_key_exists" function. - //break; - - case 1: - //Set null - $setFields .= $field->name . " = null, "; - break; - - case 2: - //Set empty - $arrFields[$upperfname] = ""; - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); - break; - default: - case 3: - //Set the value that was given in array, so you can give both null and empty values - if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { - $setFields .= $field->name . " = null, "; - } else { - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); - } - break; - } - //********************************************************// - } else { - //we do this so each driver can customize the sql for - //DB specific column types. - //Oracle needs BLOB types to be handled with a returning clause - //postgres has special needs as well - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq, - $arrFields, $magicq); - } - } - } - } - - // If there were any modified fields then build the rest of the update query. - if ($fieldUpdatedCount > 0 || $forceUpdate) { - // Get the table name from the existing query. - if (!empty($rs->tableName)) $tableName = $rs->tableName; - else { - preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName); - $tableName = $tableName[1]; - } - // Get the full where clause excluding the word "WHERE" from - // the existing query. - preg_match('/\sWHERE\s(.*)/is', $rs->sql, $whereClause); - - $discard = false; - // not a good hack, improvements? - if ($whereClause) { - #var_dump($whereClause); - if (preg_match('/\s(ORDER\s.*)/is', $whereClause[1], $discard)); - else if (preg_match('/\s(LIMIT\s.*)/is', $whereClause[1], $discard)); - else if (preg_match('/\s(FOR UPDATE.*)/is', $whereClause[1], $discard)); - else preg_match('/\s.*(\) WHERE .*)/is', $whereClause[1], $discard); # see http://sourceforge.net/tracker/index.php?func=detail&aid=1379638&group_id=42718&atid=433976 - } else - $whereClause = array(false,false); - - if ($discard) - $whereClause[1] = substr($whereClause[1], 0, strlen($whereClause[1]) - strlen($discard[1])); - - $sql = 'UPDATE '.$tableName.' SET '.substr($setFields, 0, -2); - if (strlen($whereClause[1]) > 0) - $sql .= ' WHERE '.$whereClause[1]; - - return $sql; - - } else { - return false; - } -} - -function adodb_key_exists($key, &$arr,$force=2) -{ - if ($force<=0) { - // the following is the old behaviour where null or empty fields are ignored - return (!empty($arr[$key])) || (isset($arr[$key]) && strlen($arr[$key])>0); - } - - if (isset($arr[$key])) return true; - ## null check below - if (ADODB_PHPVER >= 0x4010) return array_key_exists($key,$arr); - return false; -} - -/** - * There is a special case of this function for the oci8 driver. - * The proper way to handle an insert w/ a blob in oracle requires - * a returning clause with bind variables and a descriptor blob. - * - * - */ -function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false,$force=2) -{ -static $cacheRS = false; -static $cacheSig = 0; -static $cacheCols; - global $ADODB_QUOTE_FIELDNAMES; - - $tableName = ''; - $values = ''; - $fields = ''; - $recordSet = null; - $arrFields = _array_change_key_case($arrFields); - $fieldInsertedCount = 0; - - if (is_string($rs)) { - //ok we have a table name - //try and get the column info ourself. - $tableName = $rs; - - //we need an object for the recordSet - //because we have to call MetaType. - //php can't do a $rsclass::MetaType() - $rsclass = $zthis->rsPrefix.$zthis->databaseType; - $recordSet = new $rsclass(-1,$zthis->fetchMode); - $recordSet->connection = &$zthis; - - if (is_string($cacheRS) && $cacheRS == $rs) { - $columns =& $cacheCols; - } else { - $columns = $zthis->MetaColumns( $tableName ); - $cacheRS = $tableName; - $cacheCols = $columns; - } - } else if (is_subclass_of($rs, 'adorecordset')) { - if (isset($rs->insertSig) && is_integer($cacheRS) && $cacheRS == $rs->insertSig) { - $columns =& $cacheCols; - } else { - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) - $columns[] = $rs->FetchField($i); - $cacheRS = $cacheSig; - $cacheCols = $columns; - $rs->insertSig = $cacheSig++; - } - $recordSet =& $rs; - - } else { - printf(ADODB_BAD_RS,'GetInsertSQL'); - return false; - } - - // Loop through all of the fields in the recordset - foreach( $columns as $field ) { - $upperfname = strtoupper($field->name); - if (adodb_key_exists($upperfname,$arrFields,$force)) { - $bad = false; - if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) - $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; - else - $fnameq = $upperfname; - - $type = $recordSet->MetaType($field->type); - - /********************************************************/ - if (is_null($arrFields[$upperfname]) - || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) - || $arrFields[$upperfname] === $zthis->null2null - ) - { - switch ($force) { - - case 0: // we must always set null if missing - $bad = true; - break; - - case 1: - $values .= "null, "; - break; - - case 2: - //Set empty - $arrFields[$upperfname] = ""; - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq,$arrFields, $magicq); - break; - - default: - case 3: - //Set the value that was given in array, so you can give both null and empty values - if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { - $values .= "null, "; - } else { - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, $arrFields, $magicq); - } - break; - } // switch - - /*********************************************************/ - } else { - //we do this so each driver can customize the sql for - //DB specific column types. - //Oracle needs BLOB types to be handled with a returning clause - //postgres has special needs as well - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, - $arrFields, $magicq); - } - - if ($bad) continue; - // Set the counter for the number of fields that will be inserted. - $fieldInsertedCount++; - - - // Get the name of the fields to insert - $fields .= $fnameq . ", "; - } - } - - - // If there were any inserted fields then build the rest of the insert query. - if ($fieldInsertedCount <= 0) return false; - - // Get the table name from the existing query. - if (!$tableName) { - if (!empty($rs->tableName)) $tableName = $rs->tableName; - else if (preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName)) - $tableName = $tableName[1]; - else - return false; - } - - // Strip off the comma and space on the end of both the fields - // and their values. - $fields = substr($fields, 0, -2); - $values = substr($values, 0, -2); - - // Append the fields and their values to the insert query. - return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )'; -} - - -/** - * This private method is used to help construct - * the update/sql which is generated by GetInsertSQL and GetUpdateSQL. - * It handles the string construction of 1 column -> sql string based on - * the column type. We want to do 'safe' handling of BLOBs - * - * @param string the type of sql we are trying to create - * 'I' or 'U'. - * @param string column data type from the db::MetaType() method - * @param string the column name - * @param array the column value - * - * @return string - * - */ -function _adodb_column_sql_oci8(&$zthis,$action, $type, $fname, $fnameq, $arrFields, $magicq) -{ - $sql = ''; - - // Based on the datatype of the field - // Format the value properly for the database - switch($type) { - case 'B': - //in order to handle Blobs correctly, we need - //to do some magic for Oracle - - //we need to create a new descriptor to handle - //this properly - if (!empty($zthis->hasReturningInto)) { - if ($action == 'I') { - $sql = 'empty_blob(), '; - } else { - $sql = $fnameq. '=empty_blob(), '; - } - //add the variable to the returning clause array - //so the user can build this later in - //case they want to add more to it - $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; - } else if (empty($arrFields[$fname])){ - if ($action == 'I') { - $sql = 'empty_blob(), '; - } else { - $sql = $fnameq. '=empty_blob(), '; - } - } else { - //this is to maintain compatibility - //with older adodb versions. - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - } - break; - - case "X": - //we need to do some more magic here for long variables - //to handle these correctly in oracle. - - //create a safe bind var name - //to avoid conflicts w/ dupes. - if (!empty($zthis->hasReturningInto)) { - if ($action == 'I') { - $sql = ':xx'.$fname.'xx, '; - } else { - $sql = $fnameq.'=:xx'.$fname.'xx, '; - } - //add the variable to the returning clause array - //so the user can build this later in - //case they want to add more to it - $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; - } else { - //this is to maintain compatibility - //with older adodb versions. - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - } - break; - - default: - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - break; - } - - return $sql; -} - -function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse=true) -{ - - if ($recurse) { - switch($zthis->dataProvider) { - case 'postgres': - if ($type == 'L') $type = 'C'; - break; - case 'oci8': - return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq); - - } - } - - switch($type) { - case "C": - case "X": - case 'B': - $val = $zthis->qstr($arrFields[$fname],$magicq); - break; - - case "D": - $val = $zthis->DBDate($arrFields[$fname]); - break; - - case "T": - $val = $zthis->DBTimeStamp($arrFields[$fname]); - break; - - default: - $val = $arrFields[$fname]; - if (empty($val)) $val = '0'; - break; - } - - if ($action == 'I') return $val . ", "; - - - return $fnameq . "=" . $val . ", "; - -} - - - -function _adodb_debug_execute(&$zthis, $sql, $inputarr) -{ - $ss = ''; - if ($inputarr) { - foreach($inputarr as $kk=>$vv) { - if (is_string($vv) && strlen($vv)>64) $vv = substr($vv,0,64).'...'; - $ss .= "($kk=>'$vv') "; - } - $ss = "[ $ss ]"; - } - $sqlTxt = is_array($sql) ? $sql[0] : $sql; - /*str_replace(', ','##1#__^LF',is_array($sql) ? $sql[0] : $sql); - $sqlTxt = str_replace(',',', ',$sqlTxt); - $sqlTxt = str_replace('##1#__^LF', ', ' ,$sqlTxt); - */ - // check if running from browser or command-line - $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); - - $dbt = $zthis->databaseType; - if (isset($zthis->dsnType)) $dbt .= '-'.$zthis->dsnType; - if ($inBrowser) { - if ($ss) { - $ss = ''.htmlspecialchars($ss).''; - } - if ($zthis->debug === -1) - ADOConnection::outp( "
    \n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
    \n",false); - else - ADOConnection::outp( "


    \n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
    \n",false); - } else { - ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false); - } - - $qID = $zthis->_query($sql,$inputarr); - - /* - Alexios Fakios notes that ErrorMsg() must be called before ErrorNo() for mssql - because ErrorNo() calls Execute('SELECT @ERROR'), causing recursion - */ - if ($zthis->databaseType == 'mssql') { - // ErrorNo is a slow function call in mssql, and not reliable in PHP 4.0.6 - if($emsg = $zthis->ErrorMsg()) { - if ($err = $zthis->ErrorNo()) ADOConnection::outp($err.': '.$emsg); - } - } else if (!$qID) { - ADOConnection::outp($zthis->ErrorNo() .': '. $zthis->ErrorMsg()); - } - - if ($zthis->debug === 99) _adodb_backtrace(true,9999,2); - return $qID; -} - -# pretty print the debug_backtrace function -function _adodb_backtrace($printOrArr=true,$levels=9999,$skippy=0) -{ - if (!function_exists('debug_backtrace')) return ''; - - $html = (isset($_SERVER['HTTP_USER_AGENT'])); - $fmt = ($html) ? " %% line %4d, file:
    %s" : "%% line %4d, file: %s"; - - $MAXSTRLEN = 128; - - $s = ($html) ? '
    ' : '';
    -	
    -	if (is_array($printOrArr)) $traceArr = $printOrArr;
    -	else $traceArr = debug_backtrace();
    -	array_shift($traceArr);
    -	array_shift($traceArr);
    -	$tabs = sizeof($traceArr)-2;
    -	
    -	foreach ($traceArr as $arr) {
    -		if ($skippy) {$skippy -= 1; continue;}
    -		$levels -= 1;
    -		if ($levels < 0) break;
    -		
    -		$args = array();
    -		for ($i=0; $i < $tabs; $i++) $s .=  ($html) ? '   ' : "\t";
    -		$tabs -= 1;
    -		if ($html) $s .= '';
    -		if (isset($arr['class'])) $s .= $arr['class'].'.';
    -		if (isset($arr['args']))
    -		 foreach($arr['args'] as $v) {
    -			if (is_null($v)) $args[] = 'null';
    -			else if (is_array($v)) $args[] = 'Array['.sizeof($v).']';
    -			else if (is_object($v)) $args[] = 'Object:'.get_class($v);
    -			else if (is_bool($v)) $args[] = $v ? 'true' : 'false';
    -			else {
    -				$v = (string) @$v;
    -				$str = htmlspecialchars(substr($v,0,$MAXSTRLEN));
    -				if (strlen($v) > $MAXSTRLEN) $str .= '...';
    -				$args[] = $str;
    -			}
    -		}
    -		$s .= $arr['function'].'('.implode(', ',$args).')';
    -		
    -		
    -		$s .= @sprintf($fmt, $arr['line'],$arr['file'],basename($arr['file']));
    -			
    -		$s .= "\n";
    -	}	
    -	if ($html) $s .= '
    '; - if ($printOrArr) print $s; - - return $s; -} -/* -function _adodb_find_from($sql) -{ - - $sql = str_replace(array("\n","\r"), ' ', $sql); - $charCount = strlen($sql); - - $inString = false; - $quote = ''; - $parentheseCount = 0; - $prevChars = ''; - $nextChars = ''; - - - for($i = 0; $i < $charCount; $i++) { - - $char = substr($sql,$i,1); - $prevChars = substr($sql,0,$i); - $nextChars = substr($sql,$i+1); - - if((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === false) { - $quote = $char; - $inString = true; - } - - elseif((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === true && $quote == $char) { - $quote = ""; - $inString = false; - } - - elseif($char == "(" && $inString === false) - $parentheseCount++; - - elseif($char == ")" && $inString === false && $parentheseCount > 0) - $parentheseCount--; - - elseif($parentheseCount <= 0 && $inString === false && $char == " " && strtoupper(substr($prevChars,-5,5)) == " FROM") - return $i; - - } -} -*/ - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-memcache.lib.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-memcache.lib.inc.php.svn-base deleted file mode 100755 index 8f70935d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-memcache.lib.inc.php.svn-base +++ /dev/null @@ -1,118 +0,0 @@ -pconnect($host, $port)) { - $err = 'Can\'t connect to memcache server on: '.$host.':'.$port; - return $false; - } - - $rs = $memcache->get($key); - if (!$rs) { - $err = 'Item with such key doesn\'t exists on the memcached server.'; - return $false; - } - - $tdiff = intval($rs->timeCreated+$timeout - time()); - if ($tdiff <= 2) { - switch($tdiff) { - case 2: - if ((rand() & 15) == 0) { - $err = "Timeout 2"; - return $false; - } - break; - case 1: - if ((rand() & 3) == 0) { - $err = "Timeout 1"; - return $false; - } - break; - default: - $err = "Timeout 0"; - return $false; - } - } - return $rs; - } - - function putmemcache($key, $rs, $host, $port, $compress, $debug=false) - { - $false = false; - $true = true; - - if (!function_exists('memcache_pconnect')) { - if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!
    \n"); - return $false; - } - - $memcache = new Memcache; - if (!@$memcache->pconnect($host, $port)) { - if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port
    \n"); - return $false; - } - - $rs->timeCreated = time(); - if (!$memcache->set($key, $rs, $compress, 0)) { - if ($debug) ADOConnection::outp(" Failed to save data at the memcached server!
    \n"); - return $false; - } - return $true; - } - - function flushmemcache($key=false, $host, $port, $debug=false) - { - if (!function_exists('memcache_pconnect')) { - if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!
    \n"); - return; - } - - $memcache = new Memcache; - if (!@$memcache->pconnect($host, $port)) { - if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port
    \n"); - return; - } - - if ($key) { - if (!$memcache->delete($key)) { - if ($debug) ADOConnection::outp("CacheFlush: $key entery doesn't exist on memcached server!
    \n"); - } else { - if ($debug) ADOConnection::outp("CacheFlush: $key entery flushed from memcached server!
    \n"); - } - } else { - if (!$memcache->flush()) { - if ($debug) ADOConnection::outp("CacheFlush: Failure flushing all enteries from memcached server!
    \n"); - } else { - if ($debug) ADOConnection::outp("CacheFlush: All enteries flushed from memcached server!
    \n"); - } - } - return; - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pager.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pager.inc.php.svn-base deleted file mode 100755 index 22321b2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pager.inc.php.svn-base +++ /dev/null @@ -1,290 +0,0 @@ - implemented Render_PageLinks(). - - Please note, this class is entirely unsupported, - and no free support requests except for bug reports - will be entertained by the author. - -*/ -class ADODB_Pager { - var $id; // unique id for pager (defaults to 'adodb') - var $db; // ADODB connection object - var $sql; // sql used - var $rs; // recordset generated - var $curr_page; // current page number before Render() called, calculated in constructor - var $rows; // number of rows per page - var $linksPerPage=10; // number of links per page in navigation bar - var $showPageLinks; - - var $gridAttributes = 'width=100% border=1 bgcolor=white'; - - // Localize text strings here - var $first = '|<'; - var $prev = '<<'; - var $next = '>>'; - var $last = '>|'; - var $moreLinks = '...'; - var $startLinks = '...'; - var $gridHeader = false; - var $htmlSpecialChars = true; - var $page = 'Page'; - var $linkSelectedColor = 'red'; - var $cache = 0; #secs to cache with CachePageExecute() - - //---------------------------------------------- - // constructor - // - // $db adodb connection object - // $sql sql statement - // $id optional id to identify which pager, - // if you have multiple on 1 page. - // $id should be only be [a-z0-9]* - // - function ADODB_Pager(&$db,$sql,$id = 'adodb', $showPageLinks = false) - { - global $PHP_SELF; - - $curr_page = $id.'_curr_page'; - if (empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks - - $this->sql = $sql; - $this->id = $id; - $this->db = $db; - $this->showPageLinks = $showPageLinks; - - $next_page = $id.'_next_page'; - - if (isset($_GET[$next_page])) { - $_SESSION[$curr_page] = (integer) $_GET[$next_page]; - } - if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page - - $this->curr_page = $_SESSION[$curr_page]; - - } - - //--------------------------- - // Display link to first page - function Render_First($anchor=true) - { - global $PHP_SELF; - if ($anchor) { - ?> - first;?>   - first   "; - } - } - - //-------------------------- - // Display link to next page - function render_next($anchor=true) - { - global $PHP_SELF; - - if ($anchor) { - ?> - next;?>   - next   "; - } - } - - //------------------ - // Link to last page - // - // for better performance with large recordsets, you can set - // $this->db->pageExecuteCountRows = false, which disables - // last page counting. - function render_last($anchor=true) - { - global $PHP_SELF; - - if (!$this->db->pageExecuteCountRows) return; - - if ($anchor) { - ?> - last;?>   - last   "; - } - } - - //--------------------------------------------------- - // original code by "Pablo Costa" - function render_pagelinks() - { - global $PHP_SELF; - $pages = $this->rs->LastPageNo(); - $linksperpage = $this->linksPerPage ? $this->linksPerPage : $pages; - for($i=1; $i <= $pages; $i+=$linksperpage) - { - if($this->rs->AbsolutePage() >= $i) - { - $start = $i; - } - } - $numbers = ''; - $end = $start+$linksperpage-1; - $link = $this->id . "_next_page"; - if($end > $pages) $end = $pages; - - - if ($this->startLinks && $start > 1) { - $pos = $start - 1; - $numbers .= "$this->startLinks "; - } - - for($i=$start; $i <= $end; $i++) { - if ($this->rs->AbsolutePage() == $i) - $numbers .= "linkSelectedColor>$i "; - else - $numbers .= "$i "; - - } - if ($this->moreLinks && $end < $pages) - $numbers .= "$this->moreLinks "; - print $numbers . '   '; - } - // Link to previous page - function render_prev($anchor=true) - { - global $PHP_SELF; - if ($anchor) { - ?> - prev;?>   - prev   "; - } - } - - //-------------------------------------------------------- - // Simply rendering of grid. You should override this for - // better control over the format of the grid - // - // We use output buffering to keep code clean and readable. - function RenderGrid() - { - global $gSQLBlockRows; // used by rs2html to indicate how many rows to display - include_once(ADODB_DIR.'/tohtml.inc.php'); - ob_start(); - $gSQLBlockRows = $this->rows; - rs2html($this->rs,$this->gridAttributes,$this->gridHeader,$this->htmlSpecialChars); - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - - //------------------------------------------------------- - // Navigation bar - // - // we use output buffering to keep the code easy to read. - function RenderNav() - { - ob_start(); - if (!$this->rs->AtFirstPage()) { - $this->Render_First(); - $this->Render_Prev(); - } else { - $this->Render_First(false); - $this->Render_Prev(false); - } - if ($this->showPageLinks){ - $this->Render_PageLinks(); - } - if (!$this->rs->AtLastPage()) { - $this->Render_Next(); - $this->Render_Last(); - } else { - $this->Render_Next(false); - $this->Render_Last(false); - } - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - - //------------------- - // This is the footer - function RenderPageCount() - { - if (!$this->db->pageExecuteCountRows) return ''; - $lastPage = $this->rs->LastPageNo(); - if ($lastPage == -1) $lastPage = 1; // check for empty rs. - if ($this->curr_page > $lastPage) $this->curr_page = 1; - return "$this->page ".$this->curr_page."/".$lastPage.""; - } - - //----------------------------------- - // Call this class to draw everything. - function Render($rows=10) - { - global $ADODB_COUNTRECS; - - $this->rows = $rows; - - if ($this->db->dataProvider == 'informix') $this->db->cursorType = IFX_SCROLL; - - $savec = $ADODB_COUNTRECS; - if ($this->db->pageExecuteCountRows) $ADODB_COUNTRECS = true; - if ($this->cache) - $rs = &$this->db->CachePageExecute($this->cache,$this->sql,$rows,$this->curr_page); - else - $rs = &$this->db->PageExecute($this->sql,$rows,$this->curr_page); - $ADODB_COUNTRECS = $savec; - - $this->rs = &$rs; - if (!$rs) { - print "

    Query failed: $this->sql

    "; - return; - } - - if (!$rs->EOF && (!$rs->AtFirstPage() || !$rs->AtLastPage())) - $header = $this->RenderNav(); - else - $header = " "; - - $grid = $this->RenderGrid(); - $footer = $this->RenderPageCount(); - - $this->RenderLayout($header,$grid,$footer); - - $rs->Close(); - $this->rs = false; - } - - //------------------------------------------------------ - // override this to control overall layout and formating - function RenderLayout($header,$grid,$footer,$attributes='border=1 bgcolor=beige') - { - echo "
    ", - $header, - "
    ", - $grid, - "
    ", - $footer, - "
    "; - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pear.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pear.inc.php.svn-base deleted file mode 100755 index ecaf7531..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-pear.inc.php.svn-base +++ /dev/null @@ -1,374 +0,0 @@ - | - * and Tomas V.V.Cox . Portions (c)1997-2002 The PHP Group. - */ - - /* - We support: - - DB_Common - --------- - query - returns PEAR_Error on error - limitQuery - return PEAR_Error on error - prepare - does not return PEAR_Error on error - execute - does not return PEAR_Error on error - setFetchMode - supports ASSOC and ORDERED - errorNative - quote - nextID - disconnect - - getOne - getAssoc - getRow - getCol - getAll - - DB_Result - --------- - numRows - returns -1 if not supported - numCols - fetchInto - does not support passing of fetchmode - fetchRows - does not support passing of fetchmode - free - */ - -define('ADODB_PEAR',dirname(__FILE__)); -include_once "PEAR.php"; -include_once ADODB_PEAR."/adodb-errorpear.inc.php"; -include_once ADODB_PEAR."/adodb.inc.php"; - -if (!defined('DB_OK')) { -define("DB_OK", 1); -define("DB_ERROR",-1); - -// autoExecute constants -define('DB_AUTOQUERY_INSERT', 1); -define('DB_AUTOQUERY_UPDATE', 2); - -/** - * This is a special constant that tells DB the user hasn't specified - * any particular get mode, so the default should be used. - */ - -define('DB_FETCHMODE_DEFAULT', 0); - -/** - * Column data indexed by numbers, ordered from 0 and up - */ - -define('DB_FETCHMODE_ORDERED', 1); - -/** - * Column data indexed by column names - */ - -define('DB_FETCHMODE_ASSOC', 2); - -/* for compatibility */ - -define('DB_GETMODE_ORDERED', DB_FETCHMODE_ORDERED); -define('DB_GETMODE_ASSOC', DB_FETCHMODE_ASSOC); - -/** - * these are constants for the tableInfo-function - * they are bitwised or'ed. so if there are more constants to be defined - * in the future, adjust DB_TABLEINFO_FULL accordingly - */ - -define('DB_TABLEINFO_ORDER', 1); -define('DB_TABLEINFO_ORDERTABLE', 2); -define('DB_TABLEINFO_FULL', 3); -} - -/** - * The main "DB" class is simply a container class with some static - * methods for creating DB objects as well as some utility functions - * common to all parts of DB. - * - */ - -class DB -{ - /** - * Create a new DB object for the specified database type - * - * @param $type string database type, for example "mysql" - * - * @return object a newly created DB object, or a DB error code on - * error - */ - - function &factory($type) - { - include_once(ADODB_DIR."/drivers/adodb-$type.inc.php"); - $obj = &NewADOConnection($type); - if (!is_object($obj)) $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); - return $obj; - } - - /** - * Create a new DB object and connect to the specified database - * - * @param $dsn mixed "data source name", see the DB::parseDSN - * method for a description of the dsn format. Can also be - * specified as an array of the format returned by DB::parseDSN. - * - * @param $options mixed if boolean (or scalar), tells whether - * this connection should be persistent (for backends that support - * this). This parameter can also be an array of options, see - * DB_common::setOption for more information on connection - * options. - * - * @return object a newly created DB connection object, or a DB - * error object on error - * - * @see DB::parseDSN - * @see DB::isError - */ - function &connect($dsn, $options = false) - { - if (is_array($dsn)) { - $dsninfo = $dsn; - } else { - $dsninfo = DB::parseDSN($dsn); - } - switch ($dsninfo["phptype"]) { - case 'pgsql': $type = 'postgres7'; break; - case 'ifx': $type = 'informix9'; break; - default: $type = $dsninfo["phptype"]; break; - } - - if (is_array($options) && isset($options["debug"]) && - $options["debug"] >= 2) { - // expose php errors with sufficient debug level - @include_once("adodb-$type.inc.php"); - } else { - @include_once("adodb-$type.inc.php"); - } - - @$obj =& NewADOConnection($type); - if (!is_object($obj)) { - $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); - return $obj; - } - if (is_array($options)) { - foreach($options as $k => $v) { - switch(strtolower($k)) { - case 'persist': - case 'persistent': $persist = $v; break; - #ibase - case 'dialect': $obj->dialect = $v; break; - case 'charset': $obj->charset = $v; break; - case 'buffers': $obj->buffers = $v; break; - #ado - case 'charpage': $obj->charPage = $v; break; - #mysql - case 'clientflags': $obj->clientFlags = $v; break; - } - } - } else { - $persist = false; - } - - if (isset($dsninfo['socket'])) $dsninfo['hostspec'] .= ':'.$dsninfo['socket']; - else if (isset($dsninfo['port'])) $dsninfo['hostspec'] .= ':'.$dsninfo['port']; - - if($persist) $ok = $obj->PConnect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']); - else $ok = $obj->Connect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']); - - if (!$ok) $obj = ADODB_PEAR_Error(); - return $obj; - } - - /** - * Return the DB API version - * - * @return int the DB API version number - */ - function apiVersion() - { - return 2; - } - - /** - * Tell whether a result code from a DB method is an error - * - * @param $value int result code - * - * @return bool whether $value is an error - */ - function isError($value) - { - if (!is_object($value)) return false; - $class = get_class($value); - return $class == 'pear_error' || is_subclass_of($value, 'pear_error') || - $class == 'db_error' || is_subclass_of($value, 'db_error'); - } - - - /** - * Tell whether a result code from a DB method is a warning. - * Warnings differ from errors in that they are generated by DB, - * and are not fatal. - * - * @param $value mixed result value - * - * @return bool whether $value is a warning - */ - function isWarning($value) - { - return false; - /* - return is_object($value) && - (get_class( $value ) == "db_warning" || - is_subclass_of($value, "db_warning"));*/ - } - - /** - * Parse a data source name - * - * @param $dsn string Data Source Name to be parsed - * - * @return array an associative array with the following keys: - * - * phptype: Database backend used in PHP (mysql, odbc etc.) - * dbsyntax: Database used with regards to SQL syntax etc. - * protocol: Communication protocol to use (tcp, unix etc.) - * hostspec: Host specification (hostname[:port]) - * database: Database to use on the DBMS server - * username: User name for login - * password: Password for login - * - * The format of the supplied DSN is in its fullest form: - * - * phptype(dbsyntax)://username:password@protocol+hostspec/database - * - * Most variations are allowed: - * - * phptype://username:password@protocol+hostspec:110//usr/db_file.db - * phptype://username:password@hostspec/database_name - * phptype://username:password@hostspec - * phptype://username@hostspec - * phptype://hostspec/database - * phptype://hostspec - * phptype(dbsyntax) - * phptype - * - * @author Tomas V.V.Cox - */ - function parseDSN($dsn) - { - if (is_array($dsn)) { - return $dsn; - } - - $parsed = array( - 'phptype' => false, - 'dbsyntax' => false, - 'protocol' => false, - 'hostspec' => false, - 'database' => false, - 'username' => false, - 'password' => false - ); - - // Find phptype and dbsyntax - if (($pos = strpos($dsn, '://')) !== false) { - $str = substr($dsn, 0, $pos); - $dsn = substr($dsn, $pos + 3); - } else { - $str = $dsn; - $dsn = NULL; - } - - // Get phptype and dbsyntax - // $str => phptype(dbsyntax) - if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) { - $parsed['phptype'] = $arr[1]; - $parsed['dbsyntax'] = (empty($arr[2])) ? $arr[1] : $arr[2]; - } else { - $parsed['phptype'] = $str; - $parsed['dbsyntax'] = $str; - } - - if (empty($dsn)) { - return $parsed; - } - - // Get (if found): username and password - // $dsn => username:password@protocol+hostspec/database - if (($at = strpos($dsn,'@')) !== false) { - $str = substr($dsn, 0, $at); - $dsn = substr($dsn, $at + 1); - if (($pos = strpos($str, ':')) !== false) { - $parsed['username'] = urldecode(substr($str, 0, $pos)); - $parsed['password'] = urldecode(substr($str, $pos + 1)); - } else { - $parsed['username'] = urldecode($str); - } - } - - // Find protocol and hostspec - // $dsn => protocol+hostspec/database - if (($pos=strpos($dsn, '/')) !== false) { - $str = substr($dsn, 0, $pos); - $dsn = substr($dsn, $pos + 1); - } else { - $str = $dsn; - $dsn = NULL; - } - - // Get protocol + hostspec - // $str => protocol+hostspec - if (($pos=strpos($str, '+')) !== false) { - $parsed['protocol'] = substr($str, 0, $pos); - $parsed['hostspec'] = urldecode(substr($str, $pos + 1)); - } else { - $parsed['hostspec'] = urldecode($str); - } - - // Get dabase if any - // $dsn => database - if (!empty($dsn)) { - $parsed['database'] = $dsn; - } - - return $parsed; - } - - /** - * Load a PHP database extension if it is not loaded already. - * - * @access public - * - * @param $name the base name of the extension (without the .so or - * .dll suffix) - * - * @return bool true if the extension was already or successfully - * loaded, false if it could not be loaded - */ - function assertExtension($name) - { - if (!extension_loaded($name)) { - $dlext = (strncmp(PHP_OS,'WIN',3) === 0) ? '.dll' : '.so'; - @dl($name . $dlext); - } - if (!extension_loaded($name)) { - return false; - } - return true; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-perf.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-perf.inc.php.svn-base deleted file mode 100755 index e00359fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-perf.inc.php.svn-base +++ /dev/null @@ -1,1068 +0,0 @@ -=2) return (integer) $memarr[1]; - - return 0; -} - -// avoids localization problems where , is used instead of . -function adodb_round($n,$prec) -{ - return number_format($n, $prec, '.', ''); -} - -/* return microtime value as a float */ -function adodb_microtime() -{ - $t = microtime(); - $t = explode(' ',$t); - return (float)$t[1]+ (float)$t[0]; -} - -/* sql code timing */ -function& adodb_log_sql(&$connx,$sql,$inputarr) -{ - $perf_table = adodb_perf::table(); - $connx->fnExecute = false; - $t0 = microtime(); - $rs =& $connx->Execute($sql,$inputarr); - $t1 = microtime(); - - if (!empty($connx->_logsql) && (empty($connx->_logsqlErrors) || !$rs)) { - global $ADODB_LOG_CONN; - - if (!empty($ADODB_LOG_CONN)) { - $conn = &$ADODB_LOG_CONN; - if ($conn->databaseType != $connx->databaseType) - $prefix = '/*dbx='.$connx->databaseType .'*/ '; - else - $prefix = ''; - } else { - $conn =& $connx; - $prefix = ''; - } - - $conn->_logsql = false; // disable logsql error simulation - $dbT = $conn->databaseType; - - $a0 = split(' ',$t0); - $a0 = (float)$a0[1]+(float)$a0[0]; - - $a1 = split(' ',$t1); - $a1 = (float)$a1[1]+(float)$a1[0]; - - $time = $a1 - $a0; - - if (!$rs) { - $errM = $connx->ErrorMsg(); - $errN = $connx->ErrorNo(); - $conn->lastInsID = 0; - $tracer = substr('ERROR: '.htmlspecialchars($errM),0,250); - } else { - $tracer = ''; - $errM = ''; - $errN = 0; - $dbg = $conn->debug; - $conn->debug = false; - if (!is_object($rs) || $rs->dataProvider == 'empty') - $conn->_affected = $conn->affected_rows(true); - $conn->lastInsID = @$conn->Insert_ID(); - $conn->debug = $dbg; - } - if (isset($_SERVER['HTTP_HOST'])) { - $tracer .= '
    '.$_SERVER['HTTP_HOST']; - if (isset($_SERVER['PHP_SELF'])) $tracer .= $_SERVER['PHP_SELF']; - } else - if (isset($_SERVER['PHP_SELF'])) $tracer .= '
    '.$_SERVER['PHP_SELF']; - //$tracer .= (string) adodb_backtrace(false); - - $tracer = (string) substr($tracer,0,500); - - if (is_array($inputarr)) { - if (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr); - else { - // Quote string parameters so we can see them in the - // performance stats. This helps spot disabled indexes. - $xar_params = $inputarr; - foreach ($xar_params as $xar_param_key => $xar_param) { - if (gettype($xar_param) == 'string') - $xar_params[$xar_param_key] = '"' . $xar_param . '"'; - } - $params = implode(', ', $xar_params); - if (strlen($params) >= 3000) $params = substr($params, 0, 3000); - } - } else { - $params = ''; - } - - if (is_array($sql)) $sql = $sql[0]; - if ($prefix) $sql = $prefix.$sql; - $arr = array('b'=>strlen($sql).'.'.crc32($sql), - 'c'=>substr($sql,0,3900), 'd'=>$params,'e'=>$tracer,'f'=>adodb_round($time,6)); - //var_dump($arr); - $saved = $conn->debug; - $conn->debug = 0; - - $d = $conn->sysTimeStamp; - if (empty($d)) $d = date("'Y-m-d H:i:s'"); - if ($conn->dataProvider == 'oci8' && $dbT != 'oci8po') { - $isql = "insert into $perf_table values($d,:b,:c,:d,:e,:f)"; - } else if ($dbT == 'odbc_mssql' || $dbT == 'informix' || strncmp($dbT,'odbtp',4)==0) { - $timer = $arr['f']; - if ($dbT == 'informix') $sql2 = substr($sql2,0,230); - - $sql1 = $conn->qstr($arr['b']); - $sql2 = $conn->qstr($arr['c']); - $params = $conn->qstr($arr['d']); - $tracer = $conn->qstr($arr['e']); - - $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($d,$sql1,$sql2,$params,$tracer,$timer)"; - if ($dbT == 'informix') $isql = str_replace(chr(10),' ',$isql); - $arr = false; - } else { - if ($dbT == 'db2') $arr['f'] = (float) $arr['f']; - $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $d,?,?,?,?,?)"; - } - $ok = $conn->Execute($isql,$arr); - $conn->debug = $saved; - - if ($ok) { - $conn->_logsql = true; - } else { - $err2 = $conn->ErrorMsg(); - $conn->_logsql = true; // enable logsql error simulation - $perf =& NewPerfMonitor($conn); - if ($perf) { - if ($perf->CreateLogTable()) $ok = $conn->Execute($isql,$arr); - } else { - $ok = $conn->Execute("create table $perf_table ( - created varchar(50), - sql0 varchar(250), - sql1 varchar(4000), - params varchar(3000), - tracer varchar(500), - timer decimal(16,6))"); - } - if (!$ok) { - ADOConnection::outp( "

    LOGSQL Insert Failed: $isql
    $err2

    "); - $conn->_logsql = false; - } - } - $connx->_errorMsg = $errM; - $connx->_errorCode = $errN; - } - $connx->fnExecute = 'adodb_log_sql'; - return $rs; -} - - -/* -The settings data structure is an associative array that database parameter per element. - -Each database parameter element in the array is itself an array consisting of: - -0: category code, used to group related db parameters -1: either - a. sql string to retrieve value, eg. "select value from v\$parameter where name='db_block_size'", - b. array holding sql string and field to look for, e.g. array('show variables','table_cache'), - c. a string prefixed by =, then a PHP method of the class is invoked, - e.g. to invoke $this->GetIndexValue(), set this array element to '=GetIndexValue', -2: description of the database parameter -*/ - -class adodb_perf { - var $conn; - var $color = '#F0F0F0'; - var $table = ''; - var $titles = ''; - var $warnRatio = 90; - var $tablesSQL = false; - var $cliFormat = "%32s => %s \r\n"; - var $sql1 = 'sql1'; // used for casting sql1 to text for mssql - var $explain = true; - var $helpurl = "LogSQL help"; - var $createTableSQL = false; - var $maxLength = 2000; - - // Sets the tablename to be used - function table($newtable = false) - { - static $_table; - - if (!empty($newtable)) $_table = $newtable; - if (empty($_table)) $_table = 'adodb_logsql'; - return $_table; - } - - // returns array with info to calculate CPU Load - function _CPULoad() - { -/* - -cpu 524152 2662 2515228 336057010 -cpu0 264339 1408 1257951 168025827 -cpu1 259813 1254 1257277 168031181 -page 622307 25475680 -swap 24 1891 -intr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -disk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320) -ctxt 66155838 -btime 1062315585 -processes 69293 - -*/ - // Algorithm is taken from - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/example__obtaining_raw_performance_data.asp - if (strncmp(PHP_OS,'WIN',3)==0) { - if (PHP_VERSION == '5.0.0') return false; - if (PHP_VERSION == '5.0.1') return false; - if (PHP_VERSION == '5.0.2') return false; - if (PHP_VERSION == '5.0.3') return false; - if (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737 - - @$c = new COM("WinMgmts:{impersonationLevel=impersonate}!Win32_PerfRawData_PerfOS_Processor.Name='_Total'"); - if (!$c) return false; - - $info[0] = $c->PercentProcessorTime; - $info[1] = 0; - $info[2] = 0; - $info[3] = $c->TimeStamp_Sys100NS; - //print_r($info); - return $info; - } - - // Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com) - $statfile = '/proc/stat'; - if (!file_exists($statfile)) return false; - - $fd = fopen($statfile,"r"); - if (!$fd) return false; - - $statinfo = explode("\n",fgets($fd, 1024)); - fclose($fd); - foreach($statinfo as $line) { - $info = explode(" ",$line); - if($info[0]=="cpu") { - array_shift($info); // pop off "cpu" - if(!$info[0]) array_shift($info); // pop off blank space (if any) - return $info; - } - } - - return false; - - } - - /* NOT IMPLEMENTED */ - function MemInfo() - { - /* - - total: used: free: shared: buffers: cached: -Mem: 1055289344 917299200 137990144 0 165437440 599773184 -Swap: 2146775040 11055104 2135719936 -MemTotal: 1030556 kB -MemFree: 134756 kB -MemShared: 0 kB -Buffers: 161560 kB -Cached: 581384 kB -SwapCached: 4332 kB -Active: 494468 kB -Inact_dirty: 322856 kB -Inact_clean: 24256 kB -Inact_target: 168316 kB -HighTotal: 131064 kB -HighFree: 1024 kB -LowTotal: 899492 kB -LowFree: 133732 kB -SwapTotal: 2096460 kB -SwapFree: 2085664 kB -Committed_AS: 348732 kB - */ - } - - - /* - Remember that this is client load, not db server load! - */ - var $_lastLoad; - function CPULoad() - { - $info = $this->_CPULoad(); - if (!$info) return false; - - if (empty($this->_lastLoad)) { - sleep(1); - $this->_lastLoad = $info; - $info = $this->_CPULoad(); - } - - $last = $this->_lastLoad; - $this->_lastLoad = $info; - - $d_user = $info[0] - $last[0]; - $d_nice = $info[1] - $last[1]; - $d_system = $info[2] - $last[2]; - $d_idle = $info[3] - $last[3]; - - //printf("Delta - User: %f Nice: %f System: %f Idle: %f
    ",$d_user,$d_nice,$d_system,$d_idle); - - if (strncmp(PHP_OS,'WIN',3)==0) { - if ($d_idle < 1) $d_idle = 1; - return 100*(1-$d_user/$d_idle); - }else { - $total=$d_user+$d_nice+$d_system+$d_idle; - if ($total<1) $total=1; - return 100*($d_user+$d_nice+$d_system)/$total; - } - } - - function Tracer($sql) - { - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $sqlq = $this->conn->qstr($sql); - $arr = $this->conn->GetArray( -"select count(*),tracer - from $perf_table where sql1=$sqlq - group by tracer - order by 1 desc"); - $s = ''; - if ($arr) { - $s .= '

    Scripts Affected

    '; - foreach($arr as $k) { - $s .= sprintf("%4d",$k[0]).'   '.strip_tags($k[1]).'
    '; - } - } - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - $this->conn->fnExecute = $saveE; - return $s; - } - - /* - Explain Plan for $sql. - If only a snippet of the $sql is passed in, then $partial will hold the crc32 of the - actual sql. - */ - function Explain($sql,$partial=false) - { - return false; - } - - function InvalidSQL($numsql = 10) - { - - if (isset($_GET['sql'])) return; - $s = '

    Invalid SQL

    '; - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - $perf_table = adodb_perf::table(); - $rs =& $this->conn->SelectLimit("select distinct count(*),sql1,tracer as error_msg from $perf_table where tracer like 'ERROR:%' group by sql1,tracer order by 1 desc",$numsql);//,$numsql); - $this->conn->fnExecute = $saveE; - if ($rs) { - $s .= rs2html($rs,false,false,false,false); - } else - return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - - return $s; - } - - - /* - This script identifies the longest running SQL - */ - function _SuspiciousSQL($numsql = 10) - { - global $ADODB_FETCH_MODE; - - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - if (isset($_GET['exps']) && isset($_GET['sql'])) { - $partial = !empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return; - $sql1 = $this->sql1; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - //$this->conn->debug=1; - $rs =& $this->conn->SelectLimit( - "select avg(timer) as avg_timer,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer - from $perf_table - where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') - and (tracer is null or tracer not like 'ERROR:%') - group by sql1 - order by 1 desc",$numsql); - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - $this->conn->fnExecute = $saveE; - - if (!$rs) return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - $s = "

    Suspicious SQL

    -The following SQL have high average execution times
    -
    ParameterValueDescription
    \n"; - $max = $this->maxLength; - while (!$rs->EOF) { - $sql = $rs->fields[1]; - $raw = urlencode($sql); - if (strlen($raw)>$max-100) { - $sql2 = substr($sql,0,$max-500); - $raw = urlencode($sql2).'&part='.crc32($sql); - } - $prefix = ""; - $suffix = ""; - if ($this->explain == false || strlen($prefix)>$max) { - $suffix = ' ... String too long for GET parameter: '.strlen($prefix).''; - $prefix = ''; - } - $s .= ""; - $rs->MoveNext(); - } - return $s."
    Avg TimeCountSQLMaxMin
    ".adodb_round($rs->fields[0],6)."".$rs->fields[2]."".$prefix.htmlspecialchars($sql).$suffix."". - "".$rs->fields[3]."".$rs->fields[4]."
    "; - - } - - function CheckMemory() - { - return ''; - } - - - function SuspiciousSQL($numsql=10) - { - return adodb_perf::_SuspiciousSQL($numsql); - } - - function ExpensiveSQL($numsql=10) - { - return adodb_perf::_ExpensiveSQL($numsql); - } - - - /* - This reports the percentage of load on the instance due to the most - expensive few SQL statements. Tuning these statements can often - make huge improvements in overall system performance. - */ - function _ExpensiveSQL($numsql = 10) - { - global $ADODB_FETCH_MODE; - - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - if (isset($_GET['expe']) && isset($_GET['sql'])) { - $partial = !empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return; - - $sql1 = $this->sql1; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs =& $this->conn->SelectLimit( - "select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer - from $perf_table - where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') - and (tracer is null or tracer not like 'ERROR:%') - group by sql1 - having count(*)>1 - order by 1 desc",$numsql); - if (isset($savem)) $this->conn->SetFetchMode($savem); - $this->conn->fnExecute = $saveE; - $ADODB_FETCH_MODE = $save; - if (!$rs) return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - $s = "

    Expensive SQL

    -Tuning the following SQL could reduce the server load substantially
    -\n"; - $max = $this->maxLength; - while (!$rs->EOF) { - $sql = $rs->fields[1]; - $raw = urlencode($sql); - if (strlen($raw)>$max-100) { - $sql2 = substr($sql,0,$max-500); - $raw = urlencode($sql2).'&part='.crc32($sql); - } - $prefix = ""; - $suffix = ""; - if($this->explain == false || strlen($prefix>$max)) { - $prefix = ''; - $suffix = ''; - } - $s .= ""; - $rs->MoveNext(); - } - return $s."
    LoadCountSQLMaxMin
    ".adodb_round($rs->fields[0],6)."".$rs->fields[2]."".$prefix.htmlspecialchars($sql).$suffix."". - "".$rs->fields[3]."".$rs->fields[4]."
    "; - } - - /* - Raw function to return parameter value from $settings. - */ - function DBParameter($param) - { - if (empty($this->settings[$param])) return false; - $sql = $this->settings[$param][1]; - return $this->_DBParameter($sql); - } - - /* - Raw function returning array of poll paramters - */ - function &PollParameters() - { - $arr[0] = (float)$this->DBParameter('data cache hit ratio'); - $arr[1] = (float)$this->DBParameter('data reads'); - $arr[2] = (float)$this->DBParameter('data writes'); - $arr[3] = (integer) $this->DBParameter('current connections'); - return $arr; - } - - /* - Low-level Get Database Parameter - */ - function _DBParameter($sql) - { - $savelog = $this->conn->LogSQL(false); - if (is_array($sql)) { - global $ADODB_FETCH_MODE; - - $sql1 = $sql[0]; - $key = $sql[1]; - if (sizeof($sql)>2) $pos = $sql[2]; - else $pos = 1; - if (sizeof($sql)>3) $coef = $sql[3]; - else $coef = false; - $ret = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute($sql1); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs) { - while (!$rs->EOF) { - $keyf = reset($rs->fields); - if (trim($keyf) == $key) { - $ret = $rs->fields[$pos]; - if ($coef) $ret *= $coef; - break; - } - $rs->MoveNext(); - } - $rs->Close(); - } - $this->conn->LogSQL($savelog); - return $ret; - } else { - if (strncmp($sql,'=',1) == 0) { - $fn = substr($sql,1); - return $this->$fn(); - } - $sql = str_replace('$DATABASE',$this->conn->database,$sql); - $ret = $this->conn->GetOne($sql); - $this->conn->LogSQL($savelog); - - return $ret; - } - } - - /* - Warn if cache ratio falls below threshold. Displayed in "Description" column. - */ - function WarnCacheRatio($val) - { - if ($val < $this->warnRatio) - return 'Cache ratio should be at least '.$this->warnRatio.'%'; - else return ''; - } - - /***********************************************************************************************/ - // HIGH LEVEL UI FUNCTIONS - /***********************************************************************************************/ - - - function UI($pollsecs=5) - { - - $perf_table = adodb_perf::table(); - $conn = $this->conn; - - $app = $conn->host; - if ($conn->host && $conn->database) $app .= ', db='; - $app .= $conn->database; - - if ($app) $app .= ', '; - $savelog = $this->conn->LogSQL(false); - $info = $conn->ServerInfo(); - if (isset($_GET['clearsql'])) { - $this->conn->Execute("delete from $perf_table"); - } - $this->conn->LogSQL($savelog); - - // magic quotes - - if (isset($_GET['sql']) && get_magic_quotes_gpc()) { - $_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']); - } - - if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10; - else $nsql = $_SESSION['ADODB_PERF_SQL']; - - $app .= $info['description']; - - - if (isset($_GET['do'])) $do = $_GET['do']; - else if (isset($_POST['do'])) $do = $_POST['do']; - else if (isset($_GET['sql'])) $do = 'viewsql'; - else $do = 'stats'; - - if (isset($_GET['nsql'])) { - if ($_GET['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (integer) $_GET['nsql']; - } - echo "ADOdb Performance Monitor on $app"; - if ($do == 'viewsql') $form = "
    # SQL:
    "; - else $form = " "; - - $allowsql = !defined('ADODB_PERF_NO_RUN_SQL'); - - if (empty($_GET['hidem'])) - echo "
    - ADOdb Performance Monitor for $app
    - Performance Stats   View SQL -   View Tables   Poll Stats", - $allowsql ? '   Run SQL' : '', - "$form", - "
    "; - - - switch ($do) { - default: - case 'stats': - echo $this->HealthCheck(); - //$this->conn->debug=1; - echo $this->CheckMemory(); - break; - case 'poll': - echo ""; - break; - case 'poll2': - echo "
    ";
    -			$this->Poll($pollsecs);
    -			break;
    -		
    -		case 'dosql':
    -			if (!$allowsql) break;
    -			
    -			$this->DoSQLForm();
    -			break;
    -		case 'viewsql':
    -			if (empty($_GET['hidem']))
    -				echo "  Clear SQL Log
    "; - echo($this->SuspiciousSQL($nsql)); - echo($this->ExpensiveSQL($nsql)); - echo($this->InvalidSQL($nsql)); - break; - case 'tables': - echo $this->Tables(); break; - } - global $ADODB_vers; - echo "

    $ADODB_vers Sponsored by phpLens
    "; - } - - /* - Runs in infinite loop, returning real-time statistics - */ - function Poll($secs=5) - { - $this->conn->fnExecute = false; - //$this->conn->debug=1; - if ($secs <= 1) $secs = 1; - echo "Accumulating statistics, every $secs seconds...\n";flush(); - $arro =& $this->PollParameters(); - $cnt = 0; - set_time_limit(0); - sleep($secs); - while (1) { - - $arr =& $this->PollParameters(); - - $hits = sprintf('%2.2f',$arr[0]); - $reads = sprintf('%12.4f',($arr[1]-$arro[1])/$secs); - $writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs); - $sess = sprintf('%5d',$arr[3]); - - $load = $this->CPULoad(); - if ($load !== false) { - $oslabel = 'WS-CPU%'; - $osval = sprintf(" %2.1f ",(float) $load); - }else { - $oslabel = ''; - $osval = ''; - } - if ($cnt % 10 == 0) echo " Time ".$oslabel." Hit% Sess Reads/s Writes/s\n"; - $cnt += 1; - echo date('H:i:s').' '.$osval."$hits $sess $reads $writes\n"; - flush(); - - if (connection_aborted()) return; - - sleep($secs); - $arro = $arr; - } - } - - /* - Returns basic health check in a command line interface - */ - function HealthCheckCLI() - { - return $this->HealthCheck(true); - } - - - /* - Returns basic health check as HTML - */ - function HealthCheck($cli=false) - { - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - if ($cli) $html = ''; - else $html = $this->table.'

    '.$this->conn->databaseType.'

    '.$this->titles; - - $oldc = false; - $bgc = ''; - foreach($this->settings as $name => $arr) { - if ($arr === false) break; - - if (!is_string($name)) { - if ($cli) $html .= " -- $arr -- \n"; - else $html .= "color>$arr  "; - continue; - } - - if (!is_array($arr)) break; - $category = $arr[0]; - $how = $arr[1]; - if (sizeof($arr)>2) $desc = $arr[2]; - else $desc = '   '; - - - if ($category == 'HIDE') continue; - - $val = $this->_DBParameter($how); - - if ($desc && strncmp($desc,"=",1) === 0) { - $fn = substr($desc,1); - $desc = $this->$fn($val); - } - - if ($val === false) { - $m = $this->conn->ErrorMsg(); - $val = "Error: $m"; - } else { - if (is_numeric($val) && $val >= 256*1024) { - if ($val % (1024*1024) == 0) { - $val /= (1024*1024); - $val .= 'M'; - } else if ($val % 1024 == 0) { - $val /= 1024; - $val .= 'K'; - } - //$val = htmlspecialchars($val); - } - } - if ($category != $oldc) { - $oldc = $category; - //$bgc = ($bgc == ' bgcolor='.$this->color) ? ' bgcolor=white' : ' bgcolor='.$this->color; - } - if (strlen($desc)==0) $desc = ' '; - if (strlen($val)==0) $val = ' '; - if ($cli) { - $html .= str_replace(' ','',sprintf($this->cliFormat,strip_tags($name),strip_tags($val),strip_tags($desc))); - - }else { - $html .= "".$name.''.$val.''.$desc."\n"; - } - } - - if (!$cli) $html .= "\n"; - $this->conn->fnExecute = $saveE; - - return $html; - } - - function Tables($orderby='1') - { - if (!$this->tablesSQL) return false; - - $savelog = $this->conn->LogSQL(false); - $rs = $this->conn->Execute($this->tablesSQL.' order by '.$orderby); - $this->conn->LogSQL($savelog); - $html = rs2html($rs,false,false,false,false); - return $html; - } - - - function CreateLogTable() - { - if (!$this->createTableSQL) return false; - - $table = $this->table(); - $sql = str_replace('adodb_logsql',$table,$this->createTableSQL); - $savelog = $this->conn->LogSQL(false); - $ok = $this->conn->Execute($sql); - $this->conn->LogSQL($savelog); - return ($ok) ? true : false; - } - - function DoSQLForm() - { - - - $PHP_SELF = $_SERVER['PHP_SELF']; - $sql = isset($_REQUEST['sql']) ? $_REQUEST['sql'] : ''; - - if (isset($_SESSION['phplens_sqlrows'])) $rows = $_SESSION['phplens_sqlrows']; - else $rows = 3; - - if (isset($_REQUEST['SMALLER'])) { - $rows /= 2; - if ($rows < 3) $rows = 3; - $_SESSION['phplens_sqlrows'] = $rows; - } - if (isset($_REQUEST['BIGGER'])) { - $rows *= 2; - $_SESSION['phplens_sqlrows'] = $rows; - } - -?> - -
    - - - - - - -
    Form size: - - -
    -
    -
    - -undomq(trim($sql)); - if (substr($sql,strlen($sql)-1) === ';') { - $print = true; - $sqla = $this->SplitSQL($sql); - } else { - $print = false; - $sqla = array($sql); - } - foreach($sqla as $sqls) { - - if (!$sqls) continue; - - if ($print) { - print "

    ".htmlspecialchars($sqls)."

    "; - flush(); - } - $savelog = $this->conn->LogSQL(false); - $rs = $this->conn->Execute($sqls); - $this->conn->LogSQL($savelog); - if ($rs && is_object($rs) && !$rs->EOF) { - rs2html($rs); - while ($rs->NextRecordSet()) { - print "
     
    "; - rs2html($rs); - } - } else { - $e1 = (integer) $this->conn->ErrorNo(); - $e2 = $this->conn->ErrorMsg(); - if (($e1) || ($e2)) { - if (empty($e1)) $e1 = '-1'; // postgresql fix - print '   '.$e1.': '.$e2; - } else { - print "

    No Recordset returned

    "; - } - } - } // foreach - } - - function SplitSQL($sql) - { - $arr = explode(';',$sql); - return $arr; - } - - function undomq($m) - { - if (get_magic_quotes_gpc()) { - // undo the damage - $m = str_replace('\\\\','\\',$m); - $m = str_replace('\"','"',$m); - $m = str_replace('\\\'','\'',$m); - } - return $m; -} - - - /************************************************************************/ - - /** - * Reorganise multiple table-indices/statistics/.. - * OptimizeMode could be given by last Parameter - * - * @example - *
    -     *          optimizeTables( 'tableA');
    -     *      
    - *
    -     *          optimizeTables( 'tableA', 'tableB', 'tableC');
    -     *      
    - *
    -     *          optimizeTables( 'tableA', 'tableB', ADODB_OPT_LOW);
    -     *      
    - * - * @param string table name of the table to optimize - * @param int mode optimization-mode - * ADODB_OPT_HIGH for full optimization - * ADODB_OPT_LOW for CPU-less optimization - * Default is LOW ADODB_OPT_LOW - * @author Markus Staab - * @return Returns true on success and false on error - */ - function OptimizeTables() - { - $args = func_get_args(); - $numArgs = func_num_args(); - - if ( $numArgs == 0) return false; - - $mode = ADODB_OPT_LOW; - $lastArg = $args[ $numArgs - 1]; - if ( !is_string($lastArg)) { - $mode = $lastArg; - unset( $args[ $numArgs - 1]); - } - - foreach( $args as $table) { - $this->optimizeTable( $table, $mode); - } - } - - /** - * Reorganise the table-indices/statistics/.. depending on the given mode. - * Default Implementation throws an error. - * - * @param string table name of the table to optimize - * @param int mode optimization-mode - * ADODB_OPT_HIGH for full optimization - * ADODB_OPT_LOW for CPU-less optimization - * Default is LOW ADODB_OPT_LOW - * @author Markus Staab - * @return Returns true on success and false on error - */ - function OptimizeTable( $table, $mode = ADODB_OPT_LOW) - { - ADOConnection::outp( sprintf( "

    %s: '%s' not implemented for driver '%s'

    ", __CLASS__, __FUNCTION__, $this->conn->databaseType)); - return false; - } - - /** - * Reorganise current database. - * Default implementation loops over all MetaTables() and - * optimize each using optmizeTable() - * - * @author Markus Staab - * @return Returns true on success and false on error - */ - function optimizeDatabase() - { - $conn = $this->conn; - if ( !$conn) return false; - - $tables = $conn->MetaTables( 'TABLES'); - if ( !$tables ) return false; - - foreach( $tables as $table) { - if ( !$this->optimizeTable( $table)) { - return false; - } - } - - return true; - } - // end hack -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-php4.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-php4.inc.php.svn-base deleted file mode 100755 index 99fda176..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-php4.inc.php.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.inc.php.svn-base deleted file mode 100755 index 51f69f76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.inc.php.svn-base +++ /dev/null @@ -1,1337 +0,0 @@ - 4 digit year conversion. The maximum is billions of years in the -future, but this is a theoretical limit as the computation of that year -would take too long with the current implementation of adodb_mktime(). - -This library replaces native functions as follows: - -
    	
    -	getdate()  with  adodb_getdate()
    -	date()     with  adodb_date() 
    -	gmdate()   with  adodb_gmdate()
    -	mktime()   with  adodb_mktime()
    -	gmmktime() with  adodb_gmmktime()
    -	strftime() with  adodb_strftime()
    -	strftime() with  adodb_gmstrftime()
    -
    - -The parameters are identical, except that adodb_date() accepts a subset -of date()'s field formats. Mktime() will convert from local time to GMT, -and date() will convert from GMT to local time, but daylight savings is -not handled currently. - -This library is independant of the rest of ADOdb, and can be used -as standalone code. - -PERFORMANCE - -For high speed, this library uses the native date functions where -possible, and only switches to PHP code when the dates fall outside -the 32-bit signed integer range. - -GREGORIAN CORRECTION - -Pope Gregory shortened October of A.D. 1582 by ten days. Thursday, -October 4, 1582 (Julian) was followed immediately by Friday, October 15, -1582 (Gregorian). - -Since 0.06, we handle this correctly, so: - -adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582) - == 24 * 3600 (1 day) - -============================================================================= - -COPYRIGHT - -(c) 2003-2005 John Lim and released under BSD-style license except for code by -jackbbs, which includes adodb_mktime, adodb_get_gmt_diff, adodb_is_leap_year -and originally found at http://www.php.net/manual/en/function.mktime.php - -============================================================================= - -BUG REPORTS - -These should be posted to the ADOdb forums at - - http://phplens.com/lens/lensforum/topics.php?id=4 - -============================================================================= - -FUNCTION DESCRIPTIONS - - -** FUNCTION adodb_getdate($date=false) - -Returns an array containing date information, as getdate(), but supports -dates greater than 1901 to 2038. The local date/time format is derived from a -heuristic the first time adodb_getdate is called. - - -** FUNCTION adodb_date($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - -The format fields that adodb_date supports: - -
    -	a - "am" or "pm" 
    -	A - "AM" or "PM" 
    -	d - day of the month, 2 digits with leading zeros; i.e. "01" to "31" 
    -	D - day of the week, textual, 3 letters; e.g. "Fri" 
    -	F - month, textual, long; e.g. "January" 
    -	g - hour, 12-hour format without leading zeros; i.e. "1" to "12" 
    -	G - hour, 24-hour format without leading zeros; i.e. "0" to "23" 
    -	h - hour, 12-hour format; i.e. "01" to "12" 
    -	H - hour, 24-hour format; i.e. "00" to "23" 
    -	i - minutes; i.e. "00" to "59" 
    -	j - day of the month without leading zeros; i.e. "1" to "31" 
    -	l (lowercase 'L') - day of the week, textual, long; e.g. "Friday"  
    -	L - boolean for whether it is a leap year; i.e. "0" or "1" 
    -	m - month; i.e. "01" to "12" 
    -	M - month, textual, 3 letters; e.g. "Jan" 
    -	n - month without leading zeros; i.e. "1" to "12" 
    -	O - Difference to Greenwich time in hours; e.g. "+0200" 
    -	Q - Quarter, as in 1, 2, 3, 4 
    -	r - RFC 2822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200" 
    -	s - seconds; i.e. "00" to "59" 
    -	S - English ordinal suffix for the day of the month, 2 characters; 
    -	   			i.e. "st", "nd", "rd" or "th" 
    -	t - number of days in the given month; i.e. "28" to "31"
    -	T - Timezone setting of this machine; e.g. "EST" or "MDT" 
    -	U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)  
    -	w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) 
    -	Y - year, 4 digits; e.g. "1999" 
    -	y - year, 2 digits; e.g. "99" 
    -	z - day of the year; i.e. "0" to "365" 
    -	Z - timezone offset in seconds (i.e. "-43200" to "43200"). 
    -	   			The offset for timezones west of UTC is always negative, 
    -				and for those east of UTC is always positive. 
    -
    - -Unsupported: -
    -	B - Swatch Internet time 
    -	I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
    -	W - ISO-8601 week number of year, weeks starting on Monday 
    -
    -
    - - -** FUNCTION adodb_date2($fmt, $isoDateString = false) -Same as adodb_date, but 2nd parameter accepts iso date, eg. - - adodb_date2('d-M-Y H:i','2003-12-25 13:01:34'); - - -** FUNCTION adodb_gmdate($fmt, $timestamp = false) - -Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - - -** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) - -Converts a local date to a unix timestamp. Unlike the function mktime(), it supports -dates outside the 1901 to 2038 range. All parameters are optional. - - -** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) - -Converts a gmt date to a unix timestamp. Unlike the function gmmktime(), it supports -dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters -are currently compulsory. - -** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) -Convert a timestamp to a formatted GMT date. - -** FUNCTION adodb_strftime($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. Internally converts $fmt into -adodb_date format, then echo result. - -For best results, you can define the local date format yourself. Define a global -variable $ADODB_DATE_LOCALE which is an array, 1st element is date format using -adodb_date syntax, and 2nd element is the time format, also in adodb_date syntax. - - eg. $ADODB_DATE_LOCALE = array('d/m/Y','H:i:s'); - - Supported format codes: - -
    -	%a - abbreviated weekday name according to the current locale 
    -	%A - full weekday name according to the current locale 
    -	%b - abbreviated month name according to the current locale 
    -	%B - full month name according to the current locale 
    -	%c - preferred date and time representation for the current locale 
    -	%d - day of the month as a decimal number (range 01 to 31) 
    -	%D - same as %m/%d/%y 
    -	%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31') 
    -	%h - same as %b
    -	%H - hour as a decimal number using a 24-hour clock (range 00 to 23) 
    -	%I - hour as a decimal number using a 12-hour clock (range 01 to 12) 
    -	%m - month as a decimal number (range 01 to 12) 
    -	%M - minute as a decimal number 
    -	%n - newline character 
    -	%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale 
    -	%r - time in a.m. and p.m. notation 
    -	%R - time in 24 hour notation 
    -	%S - second as a decimal number 
    -	%t - tab character 
    -	%T - current time, equal to %H:%M:%S 
    -	%x - preferred date representation for the current locale without the time 
    -	%X - preferred time representation for the current locale without the date 
    -	%y - year as a decimal number without a century (range 00 to 99) 
    -	%Y - year as a decimal number including the century 
    -	%Z - time zone or name or abbreviation 
    -	%% - a literal `%' character 
    -
    - - Unsupported codes: -
    -	%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99) 
    -	%g - like %G, but without the century. 
    -	%G - The 4-digit year corresponding to the ISO week number (see %V). 
    -	     This has the same format and value as %Y, except that if the ISO week number belongs 
    -		 to the previous or next year, that year is used instead. 
    -	%j - day of the year as a decimal number (range 001 to 366) 
    -	%u - weekday as a decimal number [1,7], with 1 representing Monday 
    -	%U - week number of the current year as a decimal number, starting 
    -	    with the first Sunday as the first day of the first week 
    -	%V - The ISO 8601:1988 week number of the current year as a decimal number, 
    -	     range 01 to 53, where week 1 is the first week that has at least 4 days in the 
    -		 current year, and with Monday as the first day of the week. (Use %G or %g for 
    -		 the year component that corresponds to the week number for the specified timestamp.) 
    -	%w - day of the week as a decimal, Sunday being 0 
    -	%W - week number of the current year as a decimal number, starting with the 
    -	     first Monday as the first day of the first week 
    -
    - -============================================================================= - -NOTES - -Useful url for generating test timestamps: - http://www.4webhelp.net/us/timestamp.php - -Possible future optimizations include - -a. Using an algorithm similar to Plauger's in "The Standard C Library" -(page 428, xttotm.c _Ttotm() function). Plauger's algorithm will not -work outside 32-bit signed range, so i decided not to implement it. - -b. Implement daylight savings, which looks awfully complicated, see - http://webexhibits.org/daylightsaving/ - - -CHANGELOG -- 19 March 2006 0.24 -Changed strftime() locale detection, because some locales prepend the day of week to the date when %c is used. - -- 10 Feb 2006 0.23 -PHP5 compat: when we detect PHP5, the RFC2822 format for gmt 0000hrs is changed from -0000 to +0000. - In PHP4, we will still use -0000 for 100% compat with PHP4. - -- 08 Sept 2005 0.22 -In adodb_date2(), $is_gmt not supported properly. Fixed. - -- 18 July 2005 0.21 -In PHP 4.3.11, the 'r' format has changed. Leading 0 in day is added. Changed for compat. -Added support for negative months in adodb_mktime(). - -- 24 Feb 2005 0.20 -Added limited strftime/gmstrftime support. x10 improvement in performance of adodb_date(). - -- 21 Dec 2004 0.17 -In adodb_getdate(), the timestamp was accidentally converted to gmt when $is_gmt is false. -Also adodb_mktime(0,0,0) did not work properly. Both fixed thx Mauro. - -- 17 Nov 2004 0.16 -Removed intval typecast in adodb_mktime() for secs, allowing: - adodb_mktime(0,0,0 + 2236672153,1,1,1934); -Suggested by Ryan. - -- 18 July 2004 0.15 -All params in adodb_mktime were formerly compulsory. Now only the hour, min, secs is compulsory. -This brings it more in line with mktime (still not identical). - -- 23 June 2004 0.14 - -Allow you to define your own daylights savings function, adodb_daylight_sv. -If the function is defined (somewhere in an include), then you can correct for daylights savings. - -In this example, we apply daylights savings in June or July, adding one hour. This is extremely -unrealistic as it does not take into account time-zone, geographic location, current year. - -function adodb_daylight_sv(&$arr, $is_gmt) -{ - if ($is_gmt) return; - $m = $arr['mon']; - if ($m == 6 || $m == 7) $arr['hours'] += 1; -} - -This is only called by adodb_date() and not by adodb_mktime(). - -The format of $arr is -Array ( - [seconds] => 0 - [minutes] => 0 - [hours] => 0 - [mday] => 1 # day of month, eg 1st day of the month - [mon] => 2 # month (eg. Feb) - [year] => 2102 - [yday] => 31 # days in current year - [leap] => # true if leap year - [ndays] => 28 # no of days in current month - ) - - -- 28 Apr 2004 0.13 -Fixed adodb_date to properly support $is_gmt. Thx to Dimitar Angelov. - -- 20 Mar 2004 0.12 -Fixed month calculation error in adodb_date. 2102-June-01 appeared as 2102-May-32. - -- 26 Oct 2003 0.11 -Because of daylight savings problems (some systems apply daylight savings to -January!!!), changed adodb_get_gmt_diff() to ignore daylight savings. - -- 9 Aug 2003 0.10 -Fixed bug with dates after 2038. -See http://phplens.com/lens/lensforum/msgs.php?id=6980 - -- 1 July 2003 0.09 -Added support for Q (Quarter). -Added adodb_date2(), which accepts ISO date in 2nd param - -- 3 March 2003 0.08 -Added support for 'S' adodb_date() format char. Added constant ADODB_ALLOW_NEGATIVE_TS -if you want PHP to handle negative timestamps between 1901 to 1969. - -- 27 Feb 2003 0.07 -All negative numbers handled by adodb now because of RH 7.3+ problems. -See http://bugs.php.net/bug.php?id=20048&edit=2 - -- 4 Feb 2003 0.06 -Fixed a typo, 1852 changed to 1582! This means that pre-1852 dates -are now correctly handled. - -- 29 Jan 2003 0.05 - -Leap year checking differs under Julian calendar (pre 1582). Also -leap year code optimized by checking for most common case first. - -We also handle month overflow correctly in mktime (eg month set to 13). - -Day overflow for less than one month's days is supported. - -- 28 Jan 2003 0.04 - -Gregorian correction handled. In PHP5, we might throw an error if -mktime uses invalid dates around 5-14 Oct 1582. Released with ADOdb 3.10. -Added limbo 5-14 Oct 1582 check, when we set to 15 Oct 1582. - -- 27 Jan 2003 0.03 - -Fixed some more month problems due to gmt issues. Added constant ADODB_DATE_VERSION. -Fixed calculation of days since start of year for <1970. - -- 27 Jan 2003 0.02 - -Changed _adodb_getdate() to inline leap year checking for better performance. -Fixed problem with time-zones west of GMT +0000. - -- 24 Jan 2003 0.01 - -First implementation. -*/ - - -/* Initialization */ - -/* - Version Number -*/ -define('ADODB_DATE_VERSION',0.24); - -/* - This code was originally for windows. But apparently this problem happens - also with Linux, RH 7.3 and later! - - glibc-2.2.5-34 and greater has been changed to return -1 for dates < - 1970. This used to work. The problem exists with RedHat 7.3 and 8.0 - echo (mktime(0, 0, 0, 1, 1, 1960)); // prints -1 - - References: - http://bugs.php.net/bug.php?id=20048&edit=2 - http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html -*/ - -if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); - -function adodb_date_test_date($y1,$m,$d=13) -{ - $t = adodb_mktime(0,0,0,$m,$d,$y1); - $rez = adodb_date('Y-n-j H:i:s',$t); - if ("$y1-$m-$d 00:00:00" != $rez) { - print "$y1 error, expected=$y1-$m-$d 00:00:00, adodb=$rez
    "; - return false; - } - return true; -} - -function adodb_date_test_strftime($fmt) -{ - $s1 = strftime($fmt); - $s2 = adodb_strftime($fmt); - - if ($s1 == $s2) return true; - - echo "error for $fmt, strftime=$s1, $adodb=$s2
    "; - return false; -} - -/** - Test Suite -*/ -function adodb_date_test() -{ - - error_reporting(E_ALL); - print "

    Testing adodb_date and adodb_mktime. version=".ADODB_DATE_VERSION.' PHP='.PHP_VERSION."

    "; - @set_time_limit(0); - $fail = false; - - // This flag disables calling of PHP native functions, so we can properly test the code - if (!defined('ADODB_TEST_DATES')) define('ADODB_TEST_DATES',1); - - adodb_date_test_strftime('%Y %m %x %X'); - adodb_date_test_strftime("%A %d %B %Y"); - adodb_date_test_strftime("%H %M S"); - - $t = adodb_mktime(0,0,0); - if (!(adodb_date('Y-m-d') == date('Y-m-d'))) print 'Error in '.adodb_mktime(0,0,0).'
    '; - - $t = adodb_mktime(0,0,0,6,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-06-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - $t = adodb_mktime(0,0,0,2,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-02-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - - print "

    Testing gregorian <=> julian conversion

    "; - $t = adodb_mktime(0,0,0,10,11,1492); - //http://www.holidayorigins.com/html/columbus_day.html - Friday check - if (!(adodb_date('D Y-m-d',$t) == 'Fri 1492-10-11')) print 'Error in Columbus landing
    '; - - $t = adodb_mktime(0,0,0,2,29,1500); - if (!(adodb_date('Y-m-d',$t) == '1500-02-29')) print 'Error in julian leap years
    '; - - $t = adodb_mktime(0,0,0,2,29,1700); - if (!(adodb_date('Y-m-d',$t) == '1700-03-01')) print 'Error in gregorian leap years
    '; - - print adodb_mktime(0,0,0,10,4,1582).' '; - print adodb_mktime(0,0,0,10,15,1582); - $diff = (adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582)); - if ($diff != 3600*24) print " Error in gregorian correction = ".($diff/3600/24)." days
    "; - - print " 15 Oct 1582, Fri=".(adodb_dow(1582,10,15) == 5 ? 'Fri' : 'Error')."
    "; - print " 4 Oct 1582, Thu=".(adodb_dow(1582,10,4) == 4 ? 'Thu' : 'Error')."
    "; - - print "

    Testing overflow

    "; - - $t = adodb_mktime(0,0,0,3,33,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-04-02')) print 'Error in day overflow 1
    '; - $t = adodb_mktime(0,0,0,4,33,1971); - if (!(adodb_date('Y-m-d',$t) == '1971-05-03')) print 'Error in day overflow 2
    '; - $t = adodb_mktime(0,0,0,1,60,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-03-01')) print 'Error in day overflow 3 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,32,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-01')) print 'Error in day overflow 4 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,63,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-02-01')) print 'Error in day overflow 5 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,13,3,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-03')) print 'Error in mth overflow 1
    '; - - print "Testing 2-digit => 4-digit year conversion

    "; - if (adodb_year_digit_check(00) != 2000) print "Err 2-digit 2000
    "; - if (adodb_year_digit_check(10) != 2010) print "Err 2-digit 2010
    "; - if (adodb_year_digit_check(20) != 2020) print "Err 2-digit 2020
    "; - if (adodb_year_digit_check(30) != 2030) print "Err 2-digit 2030
    "; - if (adodb_year_digit_check(40) != 1940) print "Err 2-digit 1940
    "; - if (adodb_year_digit_check(50) != 1950) print "Err 2-digit 1950
    "; - if (adodb_year_digit_check(90) != 1990) print "Err 2-digit 1990
    "; - - // Test string formating - print "

    Testing date formating

    "; - $fmt = '\d\a\t\e T Y-m-d H:i:s a A d D F g G h H i j l L m M n O \R\F\C2822 r s t U w y Y z Z 2003'; - $s1 = date($fmt,0); - $s2 = adodb_date($fmt,0); - if ($s1 != $s2) { - print " date() 0 failed
    $s1
    $s2
    "; - } - flush(); - for ($i=100; --$i > 0; ) { - - $ts = 3600.0*((rand()%60000)+(rand()%60000))+(rand()%60000); - $s1 = date($fmt,$ts); - $s2 = adodb_date($fmt,$ts); - //print "$s1
    $s2

    "; - $pos = strcmp($s1,$s2); - - if (($s1) != ($s2)) { - for ($j=0,$k=strlen($s1); $j < $k; $j++) { - if ($s1[$j] != $s2[$j]) { - print substr($s1,$j).' '; - break; - } - } - print "Error date(): $ts

     
    -  \"$s1\" (date len=".strlen($s1).")
    -  \"$s2\" (adodb_date len=".strlen($s2).")

    "; - $fail = true; - } - - $a1 = getdate($ts); - $a2 = adodb_getdate($ts); - $rez = array_diff($a1,$a2); - if (sizeof($rez)>0) { - print "Error getdate() $ts
    "; - print_r($a1); - print "
    "; - print_r($a2); - print "

    "; - $fail = true; - } - } - - // Test generation of dates outside 1901-2038 - print "

    Testing random dates between 100 and 4000

    "; - adodb_date_test_date(100,1); - for ($i=100; --$i >= 0;) { - $y1 = 100+rand(0,1970-100); - $m = rand(1,12); - adodb_date_test_date($y1,$m); - - $y1 = 3000-rand(0,3000-1970); - adodb_date_test_date($y1,$m); - } - print '

    '; - $start = 1960+rand(0,10); - $yrs = 12; - $i = 365.25*86400*($start-1970); - $offset = 36000+rand(10000,60000); - $max = 365*$yrs*86400; - $lastyear = 0; - - // we generate a timestamp, convert it to a date, and convert it back to a timestamp - // and check if the roundtrip broke the original timestamp value. - print "Testing $start to ".($start+$yrs).", or $max seconds, offset=$offset: "; - $cnt = 0; - for ($max += $i; $i < $max; $i += $offset) { - $ret = adodb_date('m,d,Y,H,i,s',$i); - $arr = explode(',',$ret); - if ($lastyear != $arr[2]) { - $lastyear = $arr[2]; - print " $lastyear "; - flush(); - } - $newi = adodb_mktime($arr[3],$arr[4],$arr[5],$arr[0],$arr[1],$arr[2]); - if ($i != $newi) { - print "Error at $i, adodb_mktime returned $newi ($ret)"; - $fail = true; - break; - } - $cnt += 1; - } - echo "Tested $cnt dates
    "; - if (!$fail) print "

    Passed !

    "; - else print "

    Failed :-(

    "; -} - -/** - Returns day of week, 0 = Sunday,... 6=Saturday. - Algorithm from PEAR::Date_Calc -*/ -function adodb_dow($year, $month, $day) -{ -/* -Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and -proclaimed that from that time onwards 3 days would be dropped from the calendar -every 400 years. - -Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). -*/ - if ($year <= 1582) { - if ($year < 1582 || - ($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3; - else - $greg_correction = 0; - } else - $greg_correction = 0; - - if($month > 2) - $month -= 2; - else { - $month += 10; - $year--; - } - - $day = floor((13 * $month - 1) / 5) + - $day + ($year % 100) + - floor(($year % 100) / 4) + - floor(($year / 100) / 4) - 2 * - floor($year / 100) + 77 + $greg_correction; - - return $day - 7 * floor($day / 7); -} - - -/** - Checks for leap year, returns true if it is. No 2-digit year check. Also - handles julian calendar correctly. -*/ -function _adodb_is_leap_year($year) -{ - if ($year % 4 != 0) return false; - - if ($year % 400 == 0) { - return true; - // if gregorian calendar (>1582), century not-divisible by 400 is not leap - } else if ($year > 1582 && $year % 100 == 0 ) { - return false; - } - - return true; -} - - -/** - checks for leap year, returns true if it is. Has 2-digit year check -*/ -function adodb_is_leap_year($year) -{ - return _adodb_is_leap_year(adodb_year_digit_check($year)); -} - -/** - Fix 2-digit years. Works for any century. - Assumes that if 2-digit is more than 30 years in future, then previous century. -*/ -function adodb_year_digit_check($y) -{ - if ($y < 100) { - - $yr = (integer) date("Y"); - $century = (integer) ($yr /100); - - if ($yr%100 > 50) { - $c1 = $century + 1; - $c0 = $century; - } else { - $c1 = $century; - $c0 = $century - 1; - } - $c1 *= 100; - // if 2-digit year is less than 30 years in future, set it to this century - // otherwise if more than 30 years in future, then we set 2-digit year to the prev century. - if (($y + $c1) < $yr+30) $y = $y + $c1; - else $y = $y + $c0*100; - } - return $y; -} - -/** - get local time zone offset from GMT -*/ -function adodb_get_gmt_diff() -{ -static $TZ; - if (isset($TZ)) return $TZ; - - $TZ = mktime(0,0,0,1,2,1970,0) - gmmktime(0,0,0,1,2,1970,0); - return $TZ; -} - -/** - Returns an array with date info. -*/ -function adodb_getdate($d=false,$fast=false) -{ - if ($d === false) return getdate(); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return @getdate($d); - } - } - return _adodb_getdate($d); -} - -/* -// generate $YRS table for _adodb_getdate() -function adodb_date_gentable($out=true) -{ - - for ($i=1970; $i >= 1600; $i-=10) { - $s = adodb_gmmktime(0,0,0,1,1,$i); - echo "$i => $s,
    "; - } -} -adodb_date_gentable(); - -for ($i=1970; $i > 1500; $i--) { - -echo "
    $i "; - adodb_date_test_date($i,1,1); -} - -*/ - - -$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); -$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - -function adodb_validdate($y,$m,$d) -{ -global $_month_table_normal,$_month_table_leaf; - - if (_adodb_is_leap_year($y)) $marr =& $_month_table_leaf; - else $marr =& $_month_table_normal; - - if ($m > 12 || $m < 1) return false; - - if ($d > 31 || $d < 1) return false; - - if ($marr[$m] < $d) return false; - - if ($y < 1000 && $y > 3000) return false; - - return true; -} - -/** - Low-level function that returns the getdate() array. We have a special - $fast flag, which if set to true, will return fewer array values, - and is much faster as it does not calculate dow, etc. -*/ -function _adodb_getdate($origd=false,$fast=false,$is_gmt=false) -{ -static $YRS; -global $_month_table_normal,$_month_table_leaf; - - $d = $origd - ($is_gmt ? 0 : adodb_get_gmt_diff()); - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $d366 = $_day_power * 366; - $d365 = $_day_power * 365; - - if ($d < 0) { - - if (empty($YRS)) $YRS = array( - 1970 => 0, - 1960 => -315619200, - 1950 => -631152000, - 1940 => -946771200, - 1930 => -1262304000, - 1920 => -1577923200, - 1910 => -1893456000, - 1900 => -2208988800, - 1890 => -2524521600, - 1880 => -2840140800, - 1870 => -3155673600, - 1860 => -3471292800, - 1850 => -3786825600, - 1840 => -4102444800, - 1830 => -4417977600, - 1820 => -4733596800, - 1810 => -5049129600, - 1800 => -5364662400, - 1790 => -5680195200, - 1780 => -5995814400, - 1770 => -6311347200, - 1760 => -6626966400, - 1750 => -6942499200, - 1740 => -7258118400, - 1730 => -7573651200, - 1720 => -7889270400, - 1710 => -8204803200, - 1700 => -8520336000, - 1690 => -8835868800, - 1680 => -9151488000, - 1670 => -9467020800, - 1660 => -9782640000, - 1650 => -10098172800, - 1640 => -10413792000, - 1630 => -10729324800, - 1620 => -11044944000, - 1610 => -11360476800, - 1600 => -11676096000); - - if ($is_gmt) $origd = $d; - // The valid range of a 32bit signed timestamp is typically from - // Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT - // - - # old algorithm iterates through all years. new algorithm does it in - # 10 year blocks - - /* - # old algo - for ($a = 1970 ; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - */ - - $lastsecs = 0; - $lastyear = 1970; - foreach($YRS as $year => $secs) { - if ($d >= $secs) { - $a = $lastyear; - break; - } - $lastsecs = $secs; - $lastyear = $year; - } - - $d -= $lastsecs; - if (!isset($a)) $a = $lastyear; - - //echo ' yr=',$a,' ', $d,'.'; - - for (; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - /**/ - - $secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd; - - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 13 ; --$a > 0;) { - $lastd = $d; - $d += $mtab[$a] * $_day_power; - if ($d >= 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - - $d = $lastd; - $day = $ndays + ceil(($d+1) / ($_day_power)); - - $d += ($ndays - $day+1)* $_day_power; - $hour = floor($d/$_hour_power); - - } else { - for ($a = 1970 ;; $a++) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d -= $d366; - else $d -= $d365; - if ($d < 0) { - $year = $a; - break; - } - } - $secsInYear = $lastd; - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 1 ; $a <= 12; $a++) { - $lastd = $d; - $d -= $mtab[$a] * $_day_power; - if ($d < 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - $d = $lastd; - $day = ceil(($d+1) / $_day_power); - $d = $d - ($day-1) * $_day_power; - $hour = floor($d /$_hour_power); - } - - $d -= $hour * $_hour_power; - $min = floor($d/$_min_power); - $secs = $d - $min * $_min_power; - if ($fast) { - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'leap' => $leaf, - 'ndays' => $ndays - ); - } - - - $dow = adodb_dow($year,$month,$day); - - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'wday' => $dow, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'weekday' => gmdate('l',$_day_power*(3+$dow)), - 'month' => gmdate('F',mktime(0,0,0,$month,2,1971)), - 0 => $origd - ); -} - -function adodb_gmdate($fmt,$d=false) -{ - return adodb_date($fmt,$d,true); -} - -// accepts unix timestamp and iso date format in $d -function adodb_date2($fmt, $d=false, $is_gmt=false) -{ - if ($d !== false) { - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($d), $rr)) return adodb_date($fmt,false,$is_gmt); - - if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt); - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1],false,$is_gmt); - else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1],false,$is_gmt); - } - - return adodb_date($fmt,$d,$is_gmt); -} - - -/** - Return formatted date based on timestamp $d -*/ -function adodb_date($fmt,$d=false,$is_gmt=false) -{ -static $daylight; - - if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d); - - } - } - $_day_power = 86400; - - $arr = _adodb_getdate($d,true,$is_gmt); - - if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv'); - if ($daylight) adodb_daylight_sv($arr, $is_gmt); - - $year = $arr['year']; - $month = $arr['mon']; - $day = $arr['mday']; - $hour = $arr['hours']; - $min = $arr['minutes']; - $secs = $arr['seconds']; - - $max = strlen($fmt); - $dates = ''; - - $isphp5 = PHP_VERSION >= 5; - - /* - at this point, we have the following integer vars to manipulate: - $year, $month, $day, $hour, $min, $secs - */ - for ($i=0; $i < $max; $i++) { - switch($fmt[$i]) { - case 'T': $dates .= date('T');break; - // YEAR - case 'L': $dates .= $arr['leap'] ? '1' : '0'; break; - case 'r': // Thu, 21 Dec 2000 16:01:07 +0200 - - // 4.3.11 uses '04 Jun 2004' - // 4.3.8 uses ' 4 Jun 2004' - $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', ' - . ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' '; - - if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; - - if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min; - - if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs; - - $gmt = adodb_get_gmt_diff(); - if ($isphp5) - $dates .= sprintf(' %s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); - else - $dates .= sprintf(' %s%04d',($gmt<0)?'+':'-',abs($gmt)/36); - break; - - case 'Y': $dates .= $year; break; - case 'y': $dates .= substr($year,strlen($year)-2,2); break; - // MONTH - case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break; - case 'Q': $dates .= ($month+3)>>2; break; - case 'n': $dates .= $month; break; - case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break; - case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break; - // DAY - case 't': $dates .= $arr['ndays']; break; - case 'z': $dates .= $arr['yday']; break; - case 'w': $dates .= adodb_dow($year,$month,$day); break; - case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'j': $dates .= $day; break; - case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break; - case 'S': - $d10 = $day % 10; - if ($d10 == 1) $dates .= 'st'; - else if ($d10 == 2 && $day != 12) $dates .= 'nd'; - else if ($d10 == 3) $dates .= 'rd'; - else $dates .= 'th'; - break; - - // HOUR - case 'Z': - $dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff(); break; - case 'O': - $gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - - if ($isphp5) - $dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); - else - $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); - break; - - case 'H': - if ($hour < 10) $dates .= '0'.$hour; - else $dates .= $hour; - break; - case 'h': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - - if ($hh < 10) $dates .= '0'.$hh; - else $dates .= $hh; - break; - - case 'G': - $dates .= $hour; - break; - - case 'g': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - $dates .= $hh; - break; - // MINUTES - case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break; - // SECONDS - case 'U': $dates .= $d; break; - case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break; - // AM/PM - // Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM - case 'a': - if ($hour>=12) $dates .= 'pm'; - else $dates .= 'am'; - break; - case 'A': - if ($hour>=12) $dates .= 'PM'; - else $dates .= 'AM'; - break; - default: - $dates .= $fmt[$i]; break; - // ESCAPE - case "\\": - $i++; - if ($i < $max) $dates .= $fmt[$i]; - break; - } - } - return $dates; -} - -/** - Returns a timestamp given a GMT/UTC time. - Note that $is_dst is not implemented and is ignored. -*/ -function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false) -{ - return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true); -} - -/** - Return a timestamp given a local time. Originally by jackbbs. - Note that $is_dst is not implemented and is ignored. - - Not a very fast algorithm - O(n) operation. Could be optimized to O(1). -*/ -function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false,$is_gmt=false) -{ - if (!defined('ADODB_TEST_DATES')) { - - if ($mon === false) { - return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec); - } - - // for windows, we don't check 1970 because with timezone differences, - // 1 Jan 1970 could generate negative timestamp, which is illegal - if (1971 < $year && $year < 2038 - || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038) - ) { - return $is_gmt ? - @gmmktime($hr,$min,$sec,$mon,$day,$year): - @mktime($hr,$min,$sec,$mon,$day,$year); - } - } - - $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - - /* - # disabled because some people place large values in $sec. - # however we need it for $mon because we use an array... - $hr = intval($hr); - $min = intval($min); - $sec = intval($sec); - */ - $mon = intval($mon); - $day = intval($day); - $year = intval($year); - - - $year = adodb_year_digit_check($year); - - if ($mon > 12) { - $y = floor($mon / 12); - $year += $y; - $mon -= $y*12; - } else if ($mon < 1) { - $y = ceil((1-$mon) / 12); - $year -= $y; - $mon += $y*12; - } - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $_total_date = 0; - if ($year >= 1970) { - for ($a = 1970 ; $a <= $year; $a++) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a < $year) { - $_total_date += $_add_date; - } else { - for($b=1;$b<$mon;$b++) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date +=$day-1; - $ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different; - - } else { - for ($a = 1969 ; $a >= $year; $a--) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a > $year) { $_total_date += $_add_date; - } else { - for($b=12;$b>$mon;$b--) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date += $loop_table[$mon] - $day; - - $_day_time = $hr * $_hour_power + $min * $_min_power + $sec; - $_day_time = $_day_power - $_day_time; - $ret = -( $_total_date * $_day_power + $_day_time - $gmt_different); - if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction - else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582. - } - //print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret; - return $ret; -} - -function adodb_gmstrftime($fmt, $ts=false) -{ - return adodb_strftime($fmt,$ts,true); -} - -// hack - convert to adodb_date -function adodb_strftime($fmt, $ts=false,$is_gmt=false) -{ -global $ADODB_DATE_LOCALE; - - if (!defined('ADODB_TEST_DATES')) { - if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); - - } - } - - if (empty($ADODB_DATE_LOCALE)) { - /* - $tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am - $sep = substr($tstr,2,1); - $hasAM = strrpos($tstr,'M') !== false; - */ - # see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24 - $dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am - $sep = substr($dstr,2,1); - $tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am - $hasAM = strrpos($tstr,'M') !== false; - - $ADODB_DATE_LOCALE = array(); - $ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y'; - $ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s'; - - } - $inpct = false; - $fmtdate = ''; - for ($i=0,$max = strlen($fmt); $i < $max; $i++) { - $ch = $fmt[$i]; - if ($ch == '%') { - if ($inpct) { - $fmtdate .= '%'; - $inpct = false; - } else - $inpct = true; - } else if ($inpct) { - - $inpct = false; - switch($ch) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'E': - case 'O': - /* ignore format modifiers */ - $inpct = true; - break; - - case 'a': $fmtdate .= 'D'; break; - case 'A': $fmtdate .= 'l'; break; - case 'h': - case 'b': $fmtdate .= 'M'; break; - case 'B': $fmtdate .= 'F'; break; - case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break; - case 'C': $fmtdate .= '\C?'; break; // century - case 'd': $fmtdate .= 'd'; break; - case 'D': $fmtdate .= 'm/d/y'; break; - case 'e': $fmtdate .= 'j'; break; - case 'g': $fmtdate .= '\g?'; break; //? - case 'G': $fmtdate .= '\G?'; break; //? - case 'H': $fmtdate .= 'H'; break; - case 'I': $fmtdate .= 'h'; break; - case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd - case 'm': $fmtdate .= 'm'; break; - case 'M': $fmtdate .= 'i'; break; - case 'n': $fmtdate .= "\n"; break; - case 'p': $fmtdate .= 'a'; break; - case 'r': $fmtdate .= 'h:i:s a'; break; - case 'R': $fmtdate .= 'H:i:s'; break; - case 'S': $fmtdate .= 's'; break; - case 't': $fmtdate .= "\t"; break; - case 'T': $fmtdate .= 'H:i:s'; break; - case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break; - case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break; - case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'y': $fmtdate .= 'y'; break; - case 'Y': $fmtdate .= 'Y'; break; - case 'Z': $fmtdate .= 'T'; break; - } - } else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' )) - $fmtdate .= "\\".$ch; - else - $fmtdate .= $ch; - } - //echo "fmt=",$fmtdate,"
    "; - if ($ts === false) $ts = time(); - $ret = adodb_date($fmtdate, $ts, $is_gmt); - return $ret; -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.zip.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.zip.svn-base deleted file mode 100755 index d3239dbc..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-time.zip.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema.inc.php.svn-base deleted file mode 100755 index c925f0b5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema.inc.php.svn-base +++ /dev/null @@ -1,2221 +0,0 @@ -parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - - } - - function create() { - return array(); - } - - /** - * Destroys the object - */ - function destroy() { - unset( $this ); - } - - /** - * Checks whether the specified RDBMS is supported by the current - * database object or its ranking ancestor. - * - * @param string $platform RDBMS platform name (from ADODB platform list). - * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE. - */ - function supportedPlatform( $platform = NULL ) { - return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE; - } - - /** - * Returns the prefix set by the ranking ancestor of the database object. - * - * @param string $name Prefix string. - * @return string Prefix. - */ - function prefix( $name = '' ) { - return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name; - } - - /** - * Extracts a field ID from the specified field. - * - * @param string $field Field. - * @return string Field ID. - */ - function FieldID( $field ) { - return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) ); - } -} - -/** -* Creates a table object in ADOdb's datadict format -* -* This class stores information about a database table. As charactaristics -* of the table are loaded from the external source, methods and properties -* of this class are used to build up the table description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbTable extends dbObject { - - /** - * @var string Table name - */ - var $name; - - /** - * @var array Field specifier: Meta-information about each field - */ - var $fields = array(); - - /** - * @var array List of table indexes. - */ - var $indexes = array(); - - /** - * @var array Table options: Table-level options - */ - var $opts = array(); - - /** - * @var string Field index: Keeps track of which field is currently being processed - */ - var $current_field; - - /** - * @var boolean Mark table for destruction - * @access private - */ - var $drop_table; - - /** - * @var boolean Mark field for destruction (not yet implemented) - * @access private - */ - var $drop_field = array(); - - /** - * Iniitializes a new table object. - * - * @param string $prefix DB Object prefix - * @param array $attributes Array of table attributes. - */ - function dbTable( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - $this->name = $this->prefix($attributes['NAME']); - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'INDEX': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addIndex( $attributes ) ); - } - break; - case 'DATA': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addData( $attributes ) ); - } - break; - case 'DROP': - $this->drop(); - break; - case 'FIELD': - // Add a field - $fieldName = $attributes['NAME']; - $fieldType = $attributes['TYPE']; - $fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL; - $fieldOpts = isset( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL; - - $this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts ); - break; - case 'KEY': - case 'NOTNULL': - case 'AUTOINCREMENT': - // Add a field option - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - case 'DEFAULT': - // Add a field option to the table object - - // Work around ADOdb datadict issue that misinterprets empty strings. - if( $attributes['VALUE'] == '' ) { - $attributes['VALUE'] = " '' "; - } - - $this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] ); - break; - case 'DEFDATE': - case 'DEFTIMESTAMP': - // Add a field option to the table object - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Table constraint - case 'CONSTRAINT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $this->currentElement, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - // Table option - case 'OPT': - $this->addTableOpt( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - case 'FIELD': - unset($this->current_field); - break; - - } - } - - /** - * Adds an index to a table object - * - * @param array $attributes Index attributes - * @return object dbIndex object - */ - function &addIndex( $attributes ) { - $name = strtoupper( $attributes['NAME'] ); - $this->indexes[$name] =& new dbIndex( $this, $attributes ); - return $this->indexes[$name]; - } - - /** - * Adds data to a table object - * - * @param array $attributes Data attributes - * @return object dbData object - */ - function &addData( $attributes ) { - if( !isset( $this->data ) ) { - $this->data =& new dbData( $this, $attributes ); - } - return $this->data; - } - - /** - * Adds a field to a table object - * - * $name is the name of the table to which the field should be added. - * $type is an ADODB datadict field type. The following field types - * are supported as of ADODB 3.40: - * - C: varchar - * - X: CLOB (character large object) or largest varchar size - * if CLOB is not supported - * - C2: Multibyte varchar - * - X2: Multibyte CLOB - * - B: BLOB (binary large object) - * - D: Date (some databases do not support this, and we return a datetime type) - * - T: Datetime or Timestamp - * - L: Integer field suitable for storing booleans (0 or 1) - * - I: Integer (mapped to I4) - * - I1: 1-byte integer - * - I2: 2-byte integer - * - I4: 4-byte integer - * - I8: 8-byte integer - * - F: Floating point number - * - N: Numeric or decimal number - * - * @param string $name Name of the table to which the field will be added. - * @param string $type ADODB datadict field type. - * @param string $size Field size - * @param array $opts Field options array - * @return array Field specifier array - */ - function addField( $name, $type, $size = NULL, $opts = NULL ) { - $field_id = $this->FieldID( $name ); - - // Set the field index so we know where we are - $this->current_field = $field_id; - - // Set the field name (required) - $this->fields[$field_id]['NAME'] = $name; - - // Set the field type (required) - $this->fields[$field_id]['TYPE'] = $type; - - // Set the field size (optional) - if( isset( $size ) ) { - $this->fields[$field_id]['SIZE'] = $size; - } - - // Set the field options - if( isset( $opts ) ) { - $this->fields[$field_id]['OPTS'][] = $opts; - } - } - - /** - * Adds a field option to the current field specifier - * - * This method adds a field option allowed by the ADOdb datadict - * and appends it to the given field. - * - * @param string $field Field name - * @param string $opt ADOdb field option - * @param mixed $value Field option value - * @return array Field specifier array - */ - function addFieldOpt( $field, $opt, $value = NULL ) { - if( !isset( $value ) ) { - $this->fields[$this->FieldID( $field )]['OPTS'][] = $opt; - // Add the option and value - } else { - $this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value ); - } - } - - /** - * Adds an option to the table - * - * This method takes a comma-separated list of table-level options - * and appends them to the table object. - * - * @param string $opt Table option - * @return array Options - */ - function addTableOpt( $opt ) { - $this->opts[] = $opt; - - return $this->opts; - } - - /** - * Generates the SQL that will create the table in the database - * - * @param object $xmls adoSchema object - * @return array Array containing table creation SQL - */ - function create( &$xmls ) { - $sql = array(); - - // drop any existing indexes - if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) { - foreach( $legacy_indexes as $index => $index_details ) { - $sql[] = $xmls->dict->DropIndexSQL( $index, $this->name ); - } - } - - // remove fields to be dropped from table object - foreach( $this->drop_field as $field ) { - unset( $this->fields[$field] ); - } - - // if table exists - if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) { - // drop table - if( $this->drop_table ) { - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - - return $sql; - } - - // drop any existing fields not in schema - foreach( $legacy_fields as $field_id => $field ) { - if( !isset( $this->fields[$field_id] ) ) { - $sql[] = $xmls->dict->DropColumnSQL( $this->name, '`'.$field->name.'`' ); - } - } - // if table doesn't exist - } else { - if( $this->drop_table ) { - return $sql; - } - - $legacy_fields = array(); - } - - // Loop through the field specifier array, building the associative array for the field options - $fldarray = array(); - - foreach( $this->fields as $field_id => $finfo ) { - // Set an empty size if it isn't supplied - if( !isset( $finfo['SIZE'] ) ) { - $finfo['SIZE'] = ''; - } - - // Initialize the field array with the type and size - $fldarray[$field_id] = array( - 'NAME' => $finfo['NAME'], - 'TYPE' => $finfo['TYPE'], - 'SIZE' => $finfo['SIZE'] - ); - - // Loop through the options array and add the field options. - if( isset( $finfo['OPTS'] ) ) { - foreach( $finfo['OPTS'] as $opt ) { - // Option has an argument. - if( is_array( $opt ) ) { - $key = key( $opt ); - $value = $opt[key( $opt )]; - @$fldarray[$field_id][$key] .= $value; - // Option doesn't have arguments - } else { - $fldarray[$field_id][$opt] = $opt; - } - } - } - } - - if( empty( $legacy_fields ) ) { - // Create the new table - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - logMsg( end( $sql ), 'Generated CreateTableSQL' ); - } else { - // Upgrade an existing table - logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" ); - switch( $xmls->upgrade ) { - // Use ChangeTableSQL - case 'ALTER': - logMsg( 'Generated ChangeTableSQL (ALTERing table)' ); - $sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts ); - break; - case 'REPLACE': - logMsg( 'Doing upgrade REPLACE (testing)' ); - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - break; - // ignore table - default: - return array(); - } - } - - foreach( $this->indexes as $index ) { - $sql[] = $index->create( $xmls ); - } - - if( isset( $this->data ) ) { - $sql[] = $this->data->create( $xmls ); - } - - return $sql; - } - - /** - * Marks a field or table for destruction - */ - function drop() { - if( isset( $this->current_field ) ) { - // Drop the current field - logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" ); - // $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field ); - $this->drop_field[$this->current_field] = $this->current_field; - } else { - // Drop the current table - logMsg( "Dropping table '{$this->name}'" ); - // $this->drop_table = $xmls->dict->DropTableSQL( $this->name ); - $this->drop_table = TRUE; - } - } -} - -/** -* Creates an index object in ADOdb's datadict format -* -* This class stores information about a database index. As charactaristics -* of the index are loaded from the external source, methods and properties -* of this class are used to build up the index description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbIndex extends dbObject { - - /** - * @var string Index name - */ - var $name; - - /** - * @var array Index options: Index-level options - */ - var $opts = array(); - - /** - * @var array Indexed fields: Table columns included in this index - */ - var $columns = array(); - - /** - * @var boolean Mark index for destruction - * @access private - */ - var $drop = FALSE; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbIndex( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - $this->name = $this->prefix ($attributes['NAME']); - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'DROP': - $this->drop(); - break; - case 'CLUSTERED': - case 'BITMAP': - case 'UNIQUE': - case 'FULLTEXT': - case 'HASH': - // Add index Option - $this->addIndexOpt( $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'COL': - $this->addField( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'INDEX': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $name ) { - $this->columns[$this->FieldID( $name )] = $name; - - // Return the field list - return $this->columns; - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addIndexOpt( $opt ) { - $this->opts[] = $opt; - - // Return the options list - return $this->opts; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - if( $this->drop ) { - return NULL; - } - - // eliminate any columns that aren't in the table - foreach( $this->columns as $id => $col ) { - if( !isset( $this->parent->fields[$id] ) ) { - unset( $this->columns[$id] ); - } - } - - return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts ); - } - - /** - * Marks an index for destruction - */ - function drop() { - $this->drop = TRUE; - } -} - -/** -* Creates a data object in ADOdb's datadict format -* -* This class stores information about table data. -* -* @package axmls -* @access private -*/ -class dbData extends dbObject { - - var $data = array(); - - var $row; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbData( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'ROW': - $this->row = count( $this->data ); - $this->data[$this->row] = array(); - break; - case 'F': - $this->addField($attributes); - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'F': - $this->addData( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'DATA': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $attributes ) { - if( isset( $attributes['NAME'] ) ) { - $name = $attributes['NAME']; - } else { - $name = count($this->data[$this->row]); - } - - // Set the field index so we know where we are - $this->current_field = $this->FieldID( $name ); - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addData( $cdata ) { - if( !isset( $this->data[$this->row] ) ) { - $this->data[$this->row] = array(); - } - - if( !isset( $this->data[$this->row][$this->current_field] ) ) { - $this->data[$this->row][$this->current_field] = ''; - } - - $this->data[$this->row][$this->current_field] .= $cdata; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - $table = $xmls->dict->TableName($this->parent->name); - $table_field_count = count($this->parent->fields); - $sql = array(); - - // eliminate any columns that aren't in the table - foreach( $this->data as $row ) { - $table_fields = $this->parent->fields; - $fields = array(); - - foreach( $row as $field_id => $field_data ) { - if( !array_key_exists( $field_id, $table_fields ) ) { - if( is_numeric( $field_id ) ) { - $field_id = reset( array_keys( $table_fields ) ); - } else { - continue; - } - } - - $name = $table_fields[$field_id]['NAME']; - - switch( $table_fields[$field_id]['TYPE'] ) { - case 'C': - case 'C2': - case 'X': - case 'X2': - $fields[$name] = $xmls->db->qstr( $field_data ); - break; - case 'I': - case 'I1': - case 'I2': - case 'I4': - case 'I8': - $fields[$name] = intval($field_data); - break; - default: - $fields[$name] = $field_data; - } - - unset($table_fields[$field_id]); - } - - // check that at least 1 column is specified - if( empty( $fields ) ) { - continue; - } - - // check that no required columns are missing - if( count( $fields ) < $table_field_count ) { - foreach( $table_fields as $field ) { - if (isset( $field['OPTS'] )) - if( ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) { - continue(2); - } - } - } - - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - } - - return $sql; - } -} - -/** -* Creates the SQL to execute a list of provided SQL queries -* -* @package axmls -* @access private -*/ -class dbQuerySet extends dbObject { - - /** - * @var array List of SQL queries - */ - var $queries = array(); - - /** - * @var string String used to build of a query line by line - */ - var $query; - - /** - * @var string Query prefix key - */ - var $prefixKey = ''; - - /** - * @var boolean Auto prefix enable (TRUE) - */ - var $prefixMethod = 'AUTO'; - - /** - * Initializes the query set. - * - * @param object $parent Parent object - * @param array $attributes Attributes - */ - function dbQuerySet( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - // Overrides the manual prefix key - if( isset( $attributes['KEY'] ) ) { - $this->prefixKey = $attributes['KEY']; - } - - $prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : ''; - - // Enables or disables automatic prefix prepending - switch( $prefixMethod ) { - case 'AUTO': - $this->prefixMethod = 'AUTO'; - break; - case 'MANUAL': - $this->prefixMethod = 'MANUAL'; - break; - case 'NONE': - $this->prefixMethod = 'NONE'; - break; - } - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: QUERY. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'QUERY': - // Create a new query in a SQL queryset. - // Ignore this query set if a platform is specified and it's different than the - // current connection platform. - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->newQuery(); - } else { - $this->discardQuery(); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Line of queryset SQL data - case 'QUERY': - $this->buildQuery( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'QUERY': - // Add the finished query to the open query set. - $this->addQuery(); - break; - case 'SQL': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - default: - - } - } - - /** - * Re-initializes the query. - * - * @return boolean TRUE - */ - function newQuery() { - $this->query = ''; - - return TRUE; - } - - /** - * Discards the existing query. - * - * @return boolean TRUE - */ - function discardQuery() { - unset( $this->query ); - - return TRUE; - } - - /** - * Appends a line to a query that is being built line by line - * - * @param string $data Line of SQL data or NULL to initialize a new query - * @return string SQL query string. - */ - function buildQuery( $sql = NULL ) { - if( !isset( $this->query ) OR empty( $sql ) ) { - return FALSE; - } - - $this->query .= $sql; - - return $this->query; - } - - /** - * Adds a completed query to the query list - * - * @return string SQL of added query - */ - function addQuery() { - if( !isset( $this->query ) ) { - return FALSE; - } - - $this->queries[] = $return = trim($this->query); - - unset( $this->query ); - - return $return; - } - - /** - * Creates and returns the current query set - * - * @param object $xmls adoSchema object - * @return array Query set - */ - function create( &$xmls ) { - foreach( $this->queries as $id => $query ) { - switch( $this->prefixMethod ) { - case 'AUTO': - // Enable auto prefix replacement - - // Process object prefix. - // Evaluate SQL statements to prepend prefix to objects - $query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - - // SELECT statements aren't working yet - #$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data ); - - case 'MANUAL': - // If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX. - // If prefixKey is not set, we use the default constant XMLS_PREFIX - if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) { - // Enable prefix override - $query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query ); - } else { - // Use default replacement - $query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query ); - } - } - - $this->queries[$id] = trim( $query ); - } - - // Return the query set array - return $this->queries; - } - - /** - * Rebuilds the query with the prefix attached to any objects - * - * @param string $regex Regex used to add prefix - * @param string $query SQL query string - * @param string $prefix Prefix to be appended to tables, indices, etc. - * @return string Prefixed SQL query string. - */ - function prefixQuery( $regex, $query, $prefix = NULL ) { - if( !isset( $prefix ) ) { - return $query; - } - - if( preg_match( $regex, $query, $match ) ) { - $preamble = $match[1]; - $postamble = $match[5]; - $objectList = explode( ',', $match[3] ); - // $prefix = $prefix . '_'; - - $prefixedList = ''; - - foreach( $objectList as $object ) { - if( $prefixedList !== '' ) { - $prefixedList .= ', '; - } - - $prefixedList .= $prefix . trim( $object ); - } - - $query = $preamble . ' ' . $prefixedList . ' ' . $postamble; - } - - return $query; - } -} - -/** -* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements -* -* This class is used to load and parse the XML file, to create an array of SQL statements -* that can be used to build a database, and to build the database using the SQL array. -* -* @tutorial getting_started.pkg -* -* @author Richard Tango-Lowy & Dan Cech -* @version $Revision$ -* -* @package axmls -*/ -class adoSchema { - - /** - * @var array Array containing SQL queries to generate all objects - * @access private - */ - var $sqlArray; - - /** - * @var object ADOdb connection object - * @access private - */ - var $db; - - /** - * @var object ADOdb Data Dictionary - * @access private - */ - var $dict; - - /** - * @var string Current XML element - * @access private - */ - var $currentElement = ''; - - /** - * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database - * @access private - */ - var $upgrade = ''; - - /** - * @var string Optional object prefix - * @access private - */ - var $objectPrefix = ''; - - /** - * @var long Original Magic Quotes Runtime value - * @access private - */ - var $mgq; - - /** - * @var long System debug - * @access private - */ - var $debug; - - /** - * @var string Regular expression to find schema version - * @access private - */ - var $versionRegex = '//'; - - /** - * @var string Current schema version - * @access private - */ - var $schemaVersion; - - /** - * @var int Success of last Schema execution - */ - var $success; - - /** - * @var bool Execute SQL inline as it is generated - */ - var $executeInline; - - /** - * @var bool Continue SQL execution if errors occur - */ - var $continueOnError; - - /** - * Creates an adoSchema object - * - * Creating an adoSchema object is the first step in processing an XML schema. - * The only parameter is an ADOdb database connection object, which must already - * have been created. - * - * @param object $db ADOdb database connection object. - */ - function adoSchema( &$db ) { - // Initialize the environment - $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - - $this->db =& $db; - $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); - $this->sqlArray = array(); - $this->schemaVersion = XMLS_SCHEMA_VERSION; - $this->executeInline( XMLS_EXECUTE_INLINE ); - $this->continueOnError( XMLS_CONTINUE_ON_ERROR ); - $this->setUpgradeMethod(); - } - - /** - * Sets the method to be used for upgrading an existing database - * - * Use this method to specify how existing database objects should be upgraded. - * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to - * alter each database object directly, REPLACE attempts to rebuild each object - * from scratch, BEST attempts to determine the best upgrade method for each - * object, and NONE disables upgrading. - * - * This method is not yet used by AXMLS, but exists for backward compatibility. - * The ALTER method is automatically assumed when the adoSchema object is - * instantiated; other upgrade methods are not currently supported. - * - * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE) - * @returns string Upgrade method used - */ - function SetUpgradeMethod( $method = '' ) { - if( !is_string( $method ) ) { - return FALSE; - } - - $method = strtoupper( $method ); - - // Handle the upgrade methods - switch( $method ) { - case 'ALTER': - $this->upgrade = $method; - break; - case 'REPLACE': - $this->upgrade = $method; - break; - case 'BEST': - $this->upgrade = 'ALTER'; - break; - case 'NONE': - $this->upgrade = 'NONE'; - break; - default: - // Use default if no legitimate method is passed. - $this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD; - } - - return $this->upgrade; - } - - /** - * Enables/disables inline SQL execution. - * - * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution), - * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode - * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema() - * to apply the schema to the database. - * - * @param bool $mode execute - * @return bool current execution mode - * - * @see ParseSchema(), ExecuteSchema() - */ - function ExecuteInline( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->executeInline = $mode; - } - - return $this->executeInline; - } - - /** - * Enables/disables SQL continue on error. - * - * Call this method to enable or disable continuation of SQL execution if an error occurs. - * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs. - * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing - * of the schema will continue. - * - * @param bool $mode execute - * @return bool current continueOnError mode - * - * @see addSQL(), ExecuteSchema() - */ - function ContinueOnError( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->continueOnError = $mode; - } - - return $this->continueOnError; - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to create the database described. - * @see ParseSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function ParseSchema( $filename, $returnSchema = FALSE ) { - return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema from a file (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - * - * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString() - * @see ParseSchema(), ParseSchemaString() - */ - function ParseSchemaFile( $filename, $returnSchema = FALSE ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) { - return FALSE; - } - - if ( $returnSchema ) - { - $xmlstring = ''; - while( $data = fread( $fp, 100000 ) ) { - $xmlstring .= $data; - } - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Converts an XML schema string to SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * @see ParseSchema() - * - * @param string $xmlstring XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - // do version detection here - if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) { - return FALSE; - } - - if ( $returnSchema ) - { - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Loads an XML schema from a file and converts it to uninstallation SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to remove the database described. - * @see RemoveSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function RemoveSchema( $filename, $returnSchema = FALSE ) { - return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Converts an XML schema string to uninstallation SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to uninstall the database described by the schema. - * @see RemoveSchema() - * - * @param string $schema XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function RemoveSchemaString( $schema, $returnSchema = FALSE ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema ); - } - - /** - * Applies the current XML schema to the database (post execution). - * - * Call this method to apply the current schema (generally created by calling - * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, - * and executing other SQL specified in the schema) after parsing. - * @see ParseSchema(), ParseSchemaString(), ExecuteInline() - * - * @param array $sqlArray Array of SQL statements that will be applied rather than - * the current schema. - * @param boolean $continueOnErr Continue to apply the schema even if an error occurs. - * @returns integer 0 if failure, 1 if errors, 2 if successful. - */ - function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) { - if( !is_bool( $continueOnErr ) ) { - $continueOnErr = $this->ContinueOnError(); - } - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - $this->success = 0; - } else { - $this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr ); - } - - return $this->success; - } - - /** - * Returns the current SQL array. - * - * Call this method to fetch the array of SQL queries resulting from - * ParseSchema() or ParseSchemaString(). - * - * @param string $format Format: HTML, TEXT, or NONE (PHP array) - * @return array Array of SQL statements or FALSE if an error occurs - */ - function PrintSQL( $format = 'NONE' ) { - $sqlArray = null; - return $this->getSQL( $format, $sqlArray ); - } - - /** - * Saves the current SQL array to the local filesystem as a list of SQL queries. - * - * Call this method to save the array of SQL queries (generally resulting from a - * parsed XML schema) to the filesystem. - * - * @param string $filename Path and name where the file should be saved. - * @return boolean TRUE if save is successful, else FALSE. - */ - function SaveSQL( $filename = './schema.sql' ) { - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - if( !isset( $sqlArray ) ) { - return FALSE; - } - - $fp = fopen( $filename, "w" ); - - foreach( $sqlArray as $key => $query ) { - fwrite( $fp, $query . ";\n" ); - } - fclose( $fp ); - } - - /** - * Create an xml parser - * - * @return object PHP XML parser object - * - * @access private - */ - function &create_parser() { - // Create the parser - $xmlParser = xml_parser_create(); - xml_set_object( $xmlParser, $this ); - - // Initialize the XML callback functions - xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' ); - xml_set_character_data_handler( $xmlParser, '_tag_cdata' ); - - return $xmlParser; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->obj = new dbTable( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - break; - case 'SQL': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbQuerySet( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - } - - /** - * XML Callback to process end elements - * - * @access private - * @internal - */ - function _tag_close( &$parser, $tag ) { - - } - - /** - * Converts an XML schema string to the specified DTD version. - * - * Call this method to convert a string containing an XML schema to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaFile() - * - * @param string $schema String containing XML schema that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = $schema; - } else { - $result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - // compat for pre-4.3 - jlim - function _file_get_contents($path) - { - if (function_exists('file_get_contents')) return file_get_contents($path); - return join('',file($path)); - } - - /** - * Converts an XML schema file to the specified DTD version. - * - * Call this method to convert the specified XML schema file to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaString() - * - * @param string $filename Name of XML schema file that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaFileVersion( $filename ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = _file_get_contents( $filename ); - - // remove unicode BOM if present - if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) { - $result = substr( $result, 3 ); - } - } else { - $result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' ); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - function TransformSchema( $schema, $xsl, $schematype='string' ) - { - // Fail if XSLT extension is not available - if( ! function_exists( 'xslt_create' ) ) { - return FALSE; - } - - $xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl'; - - // look for xsl - if( !is_readable( $xsl_file ) ) { - return FALSE; - } - - switch( $schematype ) - { - case 'file': - if( !is_readable( $schema ) ) { - return FALSE; - } - - $schema = _file_get_contents( $schema ); - break; - case 'string': - default: - if( !is_string( $schema ) ) { - return FALSE; - } - } - - $arguments = array ( - '/_xml' => $schema, - '/_xsl' => _file_get_contents( $xsl_file ) - ); - - // create an XSLT processor - $xh = xslt_create (); - - // set error handler - xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler')); - - // process the schema - $result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); - - xslt_free ($xh); - - return $result; - } - - /** - * Processes XSLT transformation errors - * - * @param object $parser XML parser object - * @param integer $errno Error number - * @param integer $level Error level - * @param array $fields Error information fields - * - * @access private - */ - function xslt_error_handler( $parser, $errno, $level, $fields ) { - if( is_array( $fields ) ) { - $msg = array( - 'Message Type' => ucfirst( $fields['msgtype'] ), - 'Message Code' => $fields['code'], - 'Message' => $fields['msg'], - 'Error Number' => $errno, - 'Level' => $level - ); - - switch( $fields['URI'] ) { - case 'arg:/_xml': - $msg['Input'] = 'XML'; - break; - case 'arg:/_xsl': - $msg['Input'] = 'XSL'; - break; - default: - $msg['Input'] = $fields['URI']; - } - - $msg['Line'] = $fields['line']; - } else { - $msg = array( - 'Message Type' => 'Error', - 'Error Number' => $errno, - 'Level' => $level, - 'Fields' => var_export( $fields, TRUE ) - ); - } - - $error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n" - . '' . "\n"; - - foreach( $msg as $label => $details ) { - $error_details .= '' . "\n"; - } - - $error_details .= '
    ' . $label . ': ' . htmlentities( $details ) . '
    '; - - trigger_error( $error_details, E_USER_ERROR ); - } - - /** - * Returns the AXMLS Schema Version of the requested XML schema file. - * - * Call this method to obtain the AXMLS DTD version of the requested XML schema file. - * @see SchemaStringVersion() - * - * @param string $filename AXMLS schema file - * @return string Schema version number or FALSE on error - */ - function SchemaFileVersion( $filename ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( preg_match( $this->versionRegex, $data, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - } - - return FALSE; - } - - /** - * Returns the AXMLS Schema Version of the provided XML schema string. - * - * Call this method to obtain the AXMLS DTD version of the provided XML schema string. - * @see SchemaFileVersion() - * - * @param string $xmlstring XML schema string - * @return string Schema version number or FALSE on error - */ - function SchemaStringVersion( $xmlstring ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - - return FALSE; - } - - /** - * Extracts an XML schema from an existing database. - * - * Call this method to create an XML schema string from an existing database. - * If the data parameter is set to TRUE, AXMLS will include the data from the database - * in the schema. - * - * @param boolean $data Include data in schema dump - * @return string Generated XML schema - */ - function ExtractSchema( $data = FALSE ) { - $old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM ); - - $schema = '' . "\n" - . '' . "\n"; - - if( is_array( $tables = $this->db->MetaTables( 'TABLES' ) ) ) { - foreach( $tables as $table ) { - $schema .= ' ' . "\n"; - - // grab details from database - $rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE 1=1' ); - $fields = $this->db->MetaColumns( $table ); - $indexes = $this->db->MetaIndexes( $table ); - - if( is_array( $fields ) ) { - foreach( $fields as $details ) { - $extra = ''; - $content = array(); - - if( $details->max_length > 0 ) { - $extra .= ' size="' . $details->max_length . '"'; - } - - if( $details->primary_key ) { - $content[] = ''; - } elseif( $details->not_null ) { - $content[] = ''; - } - - if( $details->has_default ) { - $content[] = ''; - } - - if( $details->auto_increment ) { - $content[] = ''; - } - - // this stops the creation of 'R' columns, - // AUTOINCREMENT is used to create auto columns - $details->primary_key = 0; - $type = $rs->MetaType( $details ); - - $schema .= ' '; - - if( !empty( $content ) ) { - $schema .= "\n " . implode( "\n ", $content ) . "\n "; - } - - $schema .= '' . "\n"; - } - } - - if( is_array( $indexes ) ) { - foreach( $indexes as $index => $details ) { - $schema .= ' ' . "\n"; - - if( $details['unique'] ) { - $schema .= ' ' . "\n"; - } - - foreach( $details['columns'] as $column ) { - $schema .= ' ' . $column . '' . "\n"; - } - - $schema .= ' ' . "\n"; - } - } - - if( $data ) { - $rs = $this->db->Execute( 'SELECT * FROM ' . $table ); - - if( is_object( $rs ) ) { - $schema .= ' ' . "\n"; - - while( $row = $rs->FetchRow() ) { - foreach( $row as $key => $val ) { - $row[$key] = htmlentities($val); - } - - $schema .= ' ' . implode( '', $row ) . '' . "\n"; - } - - $schema .= ' ' . "\n"; - } - } - - $schema .= '
    ' . "\n"; - } - } - - $this->db->SetFetchMode( $old_mode ); - - $schema .= '
    '; - return $schema; - } - - /** - * Sets a prefix for database objects - * - * Call this method to set a standard prefix that will be prepended to all database tables - * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix. - * - * @param string $prefix Prefix that will be prepended. - * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix. - * @return boolean TRUE if successful, else FALSE - */ - function SetPrefix( $prefix = '', $underscore = TRUE ) { - switch( TRUE ) { - // clear prefix - case empty( $prefix ): - logMsg( 'Cleared prefix' ); - $this->objectPrefix = ''; - return TRUE; - // prefix too long - case strlen( $prefix ) > XMLS_PREFIX_MAXLEN: - // prefix contains invalid characters - case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ): - logMsg( 'Invalid prefix: ' . $prefix ); - return FALSE; - } - - if( $underscore AND substr( $prefix, -1 ) != '_' ) { - $prefix .= '_'; - } - - // prefix valid - logMsg( 'Set prefix: ' . $prefix ); - $this->objectPrefix = $prefix; - return TRUE; - } - - /** - * Returns an object name with the current prefix prepended. - * - * @param string $name Name - * @return string Prefixed name - * - * @access private - */ - function prefix( $name = '' ) { - // if prefix is set - if( !empty( $this->objectPrefix ) ) { - // Prepend the object prefix to the table name - // prepend after quote if used - return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name ); - } - - // No prefix set. Use name provided. - return $name; - } - - /** - * Checks if element references a specific platform - * - * @param string $platform Requested platform - * @returns boolean TRUE if platform check succeeds - * - * @access private - */ - function supportedPlatform( $platform = NULL ) { - $regex = '/^(\w*\|)*' . $this->db->databaseType . '(\|\w*)*$/'; - - if( !isset( $platform ) OR preg_match( $regex, $platform ) ) { - logMsg( "Platform $platform is supported" ); - return TRUE; - } else { - logMsg( "Platform $platform is NOT supported" ); - return FALSE; - } - } - - /** - * Clears the array of generated SQL. - * - * @access private - */ - function clearSQL() { - $this->sqlArray = array(); - } - - /** - * Adds SQL into the SQL array. - * - * @param mixed $sql SQL to Add - * @return boolean TRUE if successful, else FALSE. - * - * @access private - */ - function addSQL( $sql = NULL ) { - if( is_array( $sql ) ) { - foreach( $sql as $line ) { - $this->addSQL( $line ); - } - - return TRUE; - } - - if( is_string( $sql ) ) { - $this->sqlArray[] = $sql; - - // if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL. - if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) { - $saved = $this->db->debug; - $this->db->debug = $this->debug; - $ok = $this->db->Execute( $sql ); - $this->db->debug = $saved; - - if( !$ok ) { - if( $this->debug ) { - ADOConnection::outp( $this->db->ErrorMsg() ); - } - - $this->success = 1; - } - } - - return TRUE; - } - - return FALSE; - } - - /** - * Gets the SQL array in the specified format. - * - * @param string $format Format - * @return mixed SQL - * - * @access private - */ - function getSQL( $format = NULL, $sqlArray = NULL ) { - if( !is_array( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - return FALSE; - } - - switch( strtolower( $format ) ) { - case 'string': - case 'text': - return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : ''; - case'html': - return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : ''; - } - - return $this->sqlArray; - } - - /** - * Destroys an adoSchema object. - * - * Call this method to clean up after an adoSchema object that is no longer in use. - * @deprecated adoSchema now cleans up automatically. - */ - function Destroy() { - set_magic_quotes_runtime( $this->mgq ); - unset( $this ); - } -} - -/** -* Message logging function -* -* @access private -*/ -function logMsg( $msg, $title = NULL, $force = FALSE ) { - if( XMLS_DEBUG or $force ) { - echo '
    ';
    -		
    -		if( isset( $title ) ) {
    -			echo '

    ' . htmlentities( $title ) . '

    '; - } - - if( is_object( $this ) ) { - echo '[' . get_class( $this ) . '] '; - } - - print_r( $msg ); - - echo '
    '; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema03.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema03.inc.php.svn-base deleted file mode 100755 index cc98bec6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb-xmlschema03.inc.php.svn-base +++ /dev/null @@ -1,2403 +0,0 @@ -parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - - } - - function create() { - return array(); - } - - /** - * Destroys the object - */ - function destroy() { - unset( $this ); - } - - /** - * Checks whether the specified RDBMS is supported by the current - * database object or its ranking ancestor. - * - * @param string $platform RDBMS platform name (from ADODB platform list). - * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE. - */ - function supportedPlatform( $platform = NULL ) { - return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE; - } - - /** - * Returns the prefix set by the ranking ancestor of the database object. - * - * @param string $name Prefix string. - * @return string Prefix. - */ - function prefix( $name = '' ) { - return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name; - } - - /** - * Extracts a field ID from the specified field. - * - * @param string $field Field. - * @return string Field ID. - */ - function FieldID( $field ) { - return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) ); - } -} - -/** -* Creates a table object in ADOdb's datadict format -* -* This class stores information about a database table. As charactaristics -* of the table are loaded from the external source, methods and properties -* of this class are used to build up the table description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbTable extends dbObject { - - /** - * @var string Table name - */ - var $name; - - /** - * @var array Field specifier: Meta-information about each field - */ - var $fields = array(); - - /** - * @var array List of table indexes. - */ - var $indexes = array(); - - /** - * @var array Table options: Table-level options - */ - var $opts = array(); - - /** - * @var string Field index: Keeps track of which field is currently being processed - */ - var $current_field; - - /** - * @var boolean Mark table for destruction - * @access private - */ - var $drop_table; - - /** - * @var boolean Mark field for destruction (not yet implemented) - * @access private - */ - var $drop_field = array(); - - /** - * @var array Platform-specific options - * @access private - */ - var $currentPlatform = true; - - - /** - * Iniitializes a new table object. - * - * @param string $prefix DB Object prefix - * @param array $attributes Array of table attributes. - */ - function dbTable( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - $this->name = $this->prefix($attributes['NAME']); - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'INDEX': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addIndex( $attributes ) ); - } - break; - case 'DATA': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addData( $attributes ) ); - } - break; - case 'DROP': - $this->drop(); - break; - case 'FIELD': - // Add a field - $fieldName = $attributes['NAME']; - $fieldType = $attributes['TYPE']; - $fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL; - $fieldOpts = !empty( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL; - - $this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts ); - break; - case 'KEY': - case 'NOTNULL': - case 'AUTOINCREMENT': - case 'DEFDATE': - case 'DEFTIMESTAMP': - case 'UNSIGNED': - // Add a field option - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - case 'DEFAULT': - // Add a field option to the table object - - // Work around ADOdb datadict issue that misinterprets empty strings. - if( $attributes['VALUE'] == '' ) { - $attributes['VALUE'] = " '' "; - } - - $this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] ); - break; - case 'OPT': - case 'CONSTRAINT': - // Accept platform-specific options - $this->currentPlatform = ( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Table/field constraint - case 'CONSTRAINT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $this->currentElement, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - // Table/field option - case 'OPT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - case 'FIELD': - unset($this->current_field); - break; - case 'OPT': - case 'CONSTRAINT': - $this->currentPlatform = true; - break; - default: - - } - } - - /** - * Adds an index to a table object - * - * @param array $attributes Index attributes - * @return object dbIndex object - */ - function &addIndex( $attributes ) { - $name = strtoupper( $attributes['NAME'] ); - $this->indexes[$name] =& new dbIndex( $this, $attributes ); - return $this->indexes[$name]; - } - - /** - * Adds data to a table object - * - * @param array $attributes Data attributes - * @return object dbData object - */ - function &addData( $attributes ) { - if( !isset( $this->data ) ) { - $this->data =& new dbData( $this, $attributes ); - } - return $this->data; - } - - /** - * Adds a field to a table object - * - * $name is the name of the table to which the field should be added. - * $type is an ADODB datadict field type. The following field types - * are supported as of ADODB 3.40: - * - C: varchar - * - X: CLOB (character large object) or largest varchar size - * if CLOB is not supported - * - C2: Multibyte varchar - * - X2: Multibyte CLOB - * - B: BLOB (binary large object) - * - D: Date (some databases do not support this, and we return a datetime type) - * - T: Datetime or Timestamp - * - L: Integer field suitable for storing booleans (0 or 1) - * - I: Integer (mapped to I4) - * - I1: 1-byte integer - * - I2: 2-byte integer - * - I4: 4-byte integer - * - I8: 8-byte integer - * - F: Floating point number - * - N: Numeric or decimal number - * - * @param string $name Name of the table to which the field will be added. - * @param string $type ADODB datadict field type. - * @param string $size Field size - * @param array $opts Field options array - * @return array Field specifier array - */ - function addField( $name, $type, $size = NULL, $opts = NULL ) { - $field_id = $this->FieldID( $name ); - - // Set the field index so we know where we are - $this->current_field = $field_id; - - // Set the field name (required) - $this->fields[$field_id]['NAME'] = $name; - - // Set the field type (required) - $this->fields[$field_id]['TYPE'] = $type; - - // Set the field size (optional) - if( isset( $size ) ) { - $this->fields[$field_id]['SIZE'] = $size; - } - - // Set the field options - if( isset( $opts ) ) { - $this->fields[$field_id]['OPTS'] = array($opts); - } else { - $this->fields[$field_id]['OPTS'] = array(); - } - } - - /** - * Adds a field option to the current field specifier - * - * This method adds a field option allowed by the ADOdb datadict - * and appends it to the given field. - * - * @param string $field Field name - * @param string $opt ADOdb field option - * @param mixed $value Field option value - * @return array Field specifier array - */ - function addFieldOpt( $field, $opt, $value = NULL ) { - if( $this->currentPlatform ) { - if( !isset( $value ) ) { - $this->fields[$this->FieldID( $field )]['OPTS'][] = $opt; - // Add the option and value - } else { - $this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value ); - } - } - } - - /** - * Adds an option to the table - * - * This method takes a comma-separated list of table-level options - * and appends them to the table object. - * - * @param string $opt Table option - * @return array Options - */ - function addTableOpt( $opt ) { - if( $this->currentPlatform ) { - $this->opts[] = $opt; - } - return $this->opts; - } - - /** - * Generates the SQL that will create the table in the database - * - * @param object $xmls adoSchema object - * @return array Array containing table creation SQL - */ - function create( &$xmls ) { - $sql = array(); - - // drop any existing indexes - if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) { - foreach( $legacy_indexes as $index => $index_details ) { - $sql[] = $xmls->dict->DropIndexSQL( $index, $this->name ); - } - } - - // remove fields to be dropped from table object - foreach( $this->drop_field as $field ) { - unset( $this->fields[$field] ); - } - - // if table exists - if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) { - // drop table - if( $this->drop_table ) { - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - - return $sql; - } - - // drop any existing fields not in schema - foreach( $legacy_fields as $field_id => $field ) { - if( !isset( $this->fields[$field_id] ) ) { - $sql[] = $xmls->dict->DropColumnSQL( $this->name, $field->name ); - } - } - // if table doesn't exist - } else { - if( $this->drop_table ) { - return $sql; - } - - $legacy_fields = array(); - } - - // Loop through the field specifier array, building the associative array for the field options - $fldarray = array(); - - foreach( $this->fields as $field_id => $finfo ) { - // Set an empty size if it isn't supplied - if( !isset( $finfo['SIZE'] ) ) { - $finfo['SIZE'] = ''; - } - - // Initialize the field array with the type and size - $fldarray[$field_id] = array( - 'NAME' => $finfo['NAME'], - 'TYPE' => $finfo['TYPE'], - 'SIZE' => $finfo['SIZE'] - ); - - // Loop through the options array and add the field options. - if( isset( $finfo['OPTS'] ) ) { - foreach( $finfo['OPTS'] as $opt ) { - // Option has an argument. - if( is_array( $opt ) ) { - $key = key( $opt ); - $value = $opt[key( $opt )]; - @$fldarray[$field_id][$key] .= $value; - // Option doesn't have arguments - } else { - $fldarray[$field_id][$opt] = $opt; - } - } - } - } - - if( empty( $legacy_fields ) ) { - // Create the new table - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - logMsg( end( $sql ), 'Generated CreateTableSQL' ); - } else { - // Upgrade an existing table - logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" ); - switch( $xmls->upgrade ) { - // Use ChangeTableSQL - case 'ALTER': - logMsg( 'Generated ChangeTableSQL (ALTERing table)' ); - $sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts ); - break; - case 'REPLACE': - logMsg( 'Doing upgrade REPLACE (testing)' ); - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - break; - // ignore table - default: - return array(); - } - } - - foreach( $this->indexes as $index ) { - $sql[] = $index->create( $xmls ); - } - - if( isset( $this->data ) ) { - $sql[] = $this->data->create( $xmls ); - } - - return $sql; - } - - /** - * Marks a field or table for destruction - */ - function drop() { - if( isset( $this->current_field ) ) { - // Drop the current field - logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" ); - // $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field ); - $this->drop_field[$this->current_field] = $this->current_field; - } else { - // Drop the current table - logMsg( "Dropping table '{$this->name}'" ); - // $this->drop_table = $xmls->dict->DropTableSQL( $this->name ); - $this->drop_table = TRUE; - } - } -} - -/** -* Creates an index object in ADOdb's datadict format -* -* This class stores information about a database index. As charactaristics -* of the index are loaded from the external source, methods and properties -* of this class are used to build up the index description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbIndex extends dbObject { - - /** - * @var string Index name - */ - var $name; - - /** - * @var array Index options: Index-level options - */ - var $opts = array(); - - /** - * @var array Indexed fields: Table columns included in this index - */ - var $columns = array(); - - /** - * @var boolean Mark index for destruction - * @access private - */ - var $drop = FALSE; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbIndex( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - $this->name = $this->prefix ($attributes['NAME']); - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'DROP': - $this->drop(); - break; - case 'CLUSTERED': - case 'BITMAP': - case 'UNIQUE': - case 'FULLTEXT': - case 'HASH': - // Add index Option - $this->addIndexOpt( $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'COL': - $this->addField( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'INDEX': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $name ) { - $this->columns[$this->FieldID( $name )] = $name; - - // Return the field list - return $this->columns; - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addIndexOpt( $opt ) { - $this->opts[] = $opt; - - // Return the options list - return $this->opts; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - if( $this->drop ) { - return NULL; - } - - // eliminate any columns that aren't in the table - foreach( $this->columns as $id => $col ) { - if( !isset( $this->parent->fields[$id] ) ) { - unset( $this->columns[$id] ); - } - } - - return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts ); - } - - /** - * Marks an index for destruction - */ - function drop() { - $this->drop = TRUE; - } -} - -/** -* Creates a data object in ADOdb's datadict format -* -* This class stores information about table data, and is called -* when we need to load field data into a table. -* -* @package axmls -* @access private -*/ -class dbData extends dbObject { - - var $data = array(); - - var $row; - - /** - * Initializes the new dbData object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbData( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: ROW and F (field). - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'ROW': - $this->row = count( $this->data ); - $this->data[$this->row] = array(); - break; - case 'F': - $this->addField($attributes); - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'F': - $this->addData( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'DATA': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the insert - * - * @param string $name Field name - * @return string Field list - */ - function addField( $attributes ) { - // check we're in a valid row - if( !isset( $this->row ) || !isset( $this->data[$this->row] ) ) { - return; - } - - // Set the field index so we know where we are - if( isset( $attributes['NAME'] ) ) { - $this->current_field = $this->FieldID( $attributes['NAME'] ); - } else { - $this->current_field = count( $this->data[$this->row] ); - } - - // initialise data - if( !isset( $this->data[$this->row][$this->current_field] ) ) { - $this->data[$this->row][$this->current_field] = ''; - } - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addData( $cdata ) { - // check we're in a valid field - if ( isset( $this->data[$this->row][$this->current_field] ) ) { - // add data to field - $this->data[$this->row][$this->current_field] .= $cdata; - } - } - - /** - * Generates the SQL that will add/update the data in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - $table = $xmls->dict->TableName($this->parent->name); - $table_field_count = count($this->parent->fields); - $tables = $xmls->db->MetaTables(); - $sql = array(); - - $ukeys = $xmls->db->MetaPrimaryKeys( $table ); - if( !empty( $this->parent->indexes ) and !empty( $ukeys ) ) { - foreach( $this->parent->indexes as $indexObj ) { - if( !in_array( $indexObj->name, $ukeys ) ) $ukeys[] = $indexObj->name; - } - } - - // eliminate any columns that aren't in the table - foreach( $this->data as $row ) { - $table_fields = $this->parent->fields; - $fields = array(); - $rawfields = array(); // Need to keep some of the unprocessed data on hand. - - foreach( $row as $field_id => $field_data ) { - if( !array_key_exists( $field_id, $table_fields ) ) { - if( is_numeric( $field_id ) ) { - $field_id = reset( array_keys( $table_fields ) ); - } else { - continue; - } - } - - $name = $table_fields[$field_id]['NAME']; - - switch( $table_fields[$field_id]['TYPE'] ) { - case 'I': - case 'I1': - case 'I2': - case 'I4': - case 'I8': - $fields[$name] = intval($field_data); - break; - case 'C': - case 'C2': - case 'X': - case 'X2': - default: - $fields[$name] = $xmls->db->qstr( $field_data ); - $rawfields[$name] = $field_data; - } - - unset($table_fields[$field_id]); - - } - - // check that at least 1 column is specified - if( empty( $fields ) ) { - continue; - } - - // check that no required columns are missing - if( count( $fields ) < $table_field_count ) { - foreach( $table_fields as $field ) { - if( isset( $field['OPTS'] ) and ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) { - continue(2); - } - } - } - - // The rest of this method deals with updating existing data records. - - if( !in_array( $table, $tables ) or ( $mode = $xmls->existingData() ) == XMLS_MODE_INSERT ) { - // Table doesn't yet exist, so it's safe to insert. - logMsg( "$table doesn't exist, inserting or mode is INSERT" ); - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - continue; - } - - // Prepare to test for potential violations. Get primary keys and unique indexes - $mfields = array_merge( $fields, $rawfields ); - $keyFields = array_intersect( $ukeys, array_keys( $mfields ) ); - - if( empty( $ukeys ) or count( $keyFields ) == 0 ) { - // No unique keys in schema, so safe to insert - logMsg( "Either schema or data has no unique keys, so safe to insert" ); - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - continue; - } - - // Select record containing matching unique keys. - $where = ''; - foreach( $ukeys as $key ) { - if( isset( $mfields[$key] ) and $mfields[$key] ) { - if( $where ) $where .= ' AND '; - $where .= $key . ' = ' . $xmls->db->qstr( $mfields[$key] ); - } - } - $records = $xmls->db->Execute( 'SELECT * FROM ' . $table . ' WHERE ' . $where ); - switch( $records->RecordCount() ) { - case 0: - // No matching record, so safe to insert. - logMsg( "No matching records. Inserting new row with unique data" ); - $sql[] = $xmls->db->GetInsertSQL( $records, $mfields ); - break; - case 1: - // Exactly one matching record, so we can update if the mode permits. - logMsg( "One matching record..." ); - if( $mode == XMLS_MODE_UPDATE ) { - logMsg( "...Updating existing row from unique data" ); - $sql[] = $xmls->db->GetUpdateSQL( $records, $mfields ); - } - break; - default: - // More than one matching record; the result is ambiguous, so we must ignore the row. - logMsg( "More than one matching record. Ignoring row." ); - } - } - return $sql; - } -} - -/** -* Creates the SQL to execute a list of provided SQL queries -* -* @package axmls -* @access private -*/ -class dbQuerySet extends dbObject { - - /** - * @var array List of SQL queries - */ - var $queries = array(); - - /** - * @var string String used to build of a query line by line - */ - var $query; - - /** - * @var string Query prefix key - */ - var $prefixKey = ''; - - /** - * @var boolean Auto prefix enable (TRUE) - */ - var $prefixMethod = 'AUTO'; - - /** - * Initializes the query set. - * - * @param object $parent Parent object - * @param array $attributes Attributes - */ - function dbQuerySet( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - // Overrides the manual prefix key - if( isset( $attributes['KEY'] ) ) { - $this->prefixKey = $attributes['KEY']; - } - - $prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : ''; - - // Enables or disables automatic prefix prepending - switch( $prefixMethod ) { - case 'AUTO': - $this->prefixMethod = 'AUTO'; - break; - case 'MANUAL': - $this->prefixMethod = 'MANUAL'; - break; - case 'NONE': - $this->prefixMethod = 'NONE'; - break; - } - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: QUERY. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'QUERY': - // Create a new query in a SQL queryset. - // Ignore this query set if a platform is specified and it's different than the - // current connection platform. - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->newQuery(); - } else { - $this->discardQuery(); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Line of queryset SQL data - case 'QUERY': - $this->buildQuery( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'QUERY': - // Add the finished query to the open query set. - $this->addQuery(); - break; - case 'SQL': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - default: - - } - } - - /** - * Re-initializes the query. - * - * @return boolean TRUE - */ - function newQuery() { - $this->query = ''; - - return TRUE; - } - - /** - * Discards the existing query. - * - * @return boolean TRUE - */ - function discardQuery() { - unset( $this->query ); - - return TRUE; - } - - /** - * Appends a line to a query that is being built line by line - * - * @param string $data Line of SQL data or NULL to initialize a new query - * @return string SQL query string. - */ - function buildQuery( $sql = NULL ) { - if( !isset( $this->query ) OR empty( $sql ) ) { - return FALSE; - } - - $this->query .= $sql; - - return $this->query; - } - - /** - * Adds a completed query to the query list - * - * @return string SQL of added query - */ - function addQuery() { - if( !isset( $this->query ) ) { - return FALSE; - } - - $this->queries[] = $return = trim($this->query); - - unset( $this->query ); - - return $return; - } - - /** - * Creates and returns the current query set - * - * @param object $xmls adoSchema object - * @return array Query set - */ - function create( &$xmls ) { - foreach( $this->queries as $id => $query ) { - switch( $this->prefixMethod ) { - case 'AUTO': - // Enable auto prefix replacement - - // Process object prefix. - // Evaluate SQL statements to prepend prefix to objects - $query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - - // SELECT statements aren't working yet - #$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data ); - - case 'MANUAL': - // If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX. - // If prefixKey is not set, we use the default constant XMLS_PREFIX - if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) { - // Enable prefix override - $query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query ); - } else { - // Use default replacement - $query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query ); - } - } - - $this->queries[$id] = trim( $query ); - } - - // Return the query set array - return $this->queries; - } - - /** - * Rebuilds the query with the prefix attached to any objects - * - * @param string $regex Regex used to add prefix - * @param string $query SQL query string - * @param string $prefix Prefix to be appended to tables, indices, etc. - * @return string Prefixed SQL query string. - */ - function prefixQuery( $regex, $query, $prefix = NULL ) { - if( !isset( $prefix ) ) { - return $query; - } - - if( preg_match( $regex, $query, $match ) ) { - $preamble = $match[1]; - $postamble = $match[5]; - $objectList = explode( ',', $match[3] ); - // $prefix = $prefix . '_'; - - $prefixedList = ''; - - foreach( $objectList as $object ) { - if( $prefixedList !== '' ) { - $prefixedList .= ', '; - } - - $prefixedList .= $prefix . trim( $object ); - } - - $query = $preamble . ' ' . $prefixedList . ' ' . $postamble; - } - - return $query; - } -} - -/** -* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements -* -* This class is used to load and parse the XML file, to create an array of SQL statements -* that can be used to build a database, and to build the database using the SQL array. -* -* @tutorial getting_started.pkg -* -* @author Richard Tango-Lowy & Dan Cech -* @version $Revision$ -* -* @package axmls -*/ -class adoSchema { - - /** - * @var array Array containing SQL queries to generate all objects - * @access private - */ - var $sqlArray; - - /** - * @var object ADOdb connection object - * @access private - */ - var $db; - - /** - * @var object ADOdb Data Dictionary - * @access private - */ - var $dict; - - /** - * @var string Current XML element - * @access private - */ - var $currentElement = ''; - - /** - * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database - * @access private - */ - var $upgrade = ''; - - /** - * @var string Optional object prefix - * @access private - */ - var $objectPrefix = ''; - - /** - * @var long Original Magic Quotes Runtime value - * @access private - */ - var $mgq; - - /** - * @var long System debug - * @access private - */ - var $debug; - - /** - * @var string Regular expression to find schema version - * @access private - */ - var $versionRegex = '//'; - - /** - * @var string Current schema version - * @access private - */ - var $schemaVersion; - - /** - * @var int Success of last Schema execution - */ - var $success; - - /** - * @var bool Execute SQL inline as it is generated - */ - var $executeInline; - - /** - * @var bool Continue SQL execution if errors occur - */ - var $continueOnError; - - /** - * @var int How to handle existing data rows (insert, update, or ignore) - */ - var $existingData; - - /** - * Creates an adoSchema object - * - * Creating an adoSchema object is the first step in processing an XML schema. - * The only parameter is an ADOdb database connection object, which must already - * have been created. - * - * @param object $db ADOdb database connection object. - */ - function adoSchema( &$db ) { - // Initialize the environment - $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - - $this->db =& $db; - $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); - $this->sqlArray = array(); - $this->schemaVersion = XMLS_SCHEMA_VERSION; - $this->executeInline( XMLS_EXECUTE_INLINE ); - $this->continueOnError( XMLS_CONTINUE_ON_ERROR ); - $this->existingData( XMLS_EXISTING_DATA ); - $this->setUpgradeMethod(); - } - - /** - * Sets the method to be used for upgrading an existing database - * - * Use this method to specify how existing database objects should be upgraded. - * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to - * alter each database object directly, REPLACE attempts to rebuild each object - * from scratch, BEST attempts to determine the best upgrade method for each - * object, and NONE disables upgrading. - * - * This method is not yet used by AXMLS, but exists for backward compatibility. - * The ALTER method is automatically assumed when the adoSchema object is - * instantiated; other upgrade methods are not currently supported. - * - * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE) - * @returns string Upgrade method used - */ - function SetUpgradeMethod( $method = '' ) { - if( !is_string( $method ) ) { - return FALSE; - } - - $method = strtoupper( $method ); - - // Handle the upgrade methods - switch( $method ) { - case 'ALTER': - $this->upgrade = $method; - break; - case 'REPLACE': - $this->upgrade = $method; - break; - case 'BEST': - $this->upgrade = 'ALTER'; - break; - case 'NONE': - $this->upgrade = 'NONE'; - break; - default: - // Use default if no legitimate method is passed. - $this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD; - } - - return $this->upgrade; - } - - /** - * Specifies how to handle existing data row when there is a unique key conflict. - * - * The existingData setting specifies how the parser should handle existing rows - * when a unique key violation occurs during the insert. This can happen when inserting - * data into an existing table with one or more primary keys or unique indexes. - * The existingData method takes one of three options: XMLS_MODE_INSERT attempts - * to always insert the data as a new row. In the event of a unique key violation, - * the database will generate an error. XMLS_MODE_UPDATE attempts to update the - * any existing rows with the new data based upon primary or unique key fields in - * the schema. If the data row in the schema specifies no unique fields, the row - * data will be inserted as a new row. XMLS_MODE_IGNORE specifies that any data rows - * that would result in a unique key violation be ignored; no inserts or updates will - * take place. For backward compatibility, the default setting is XMLS_MODE_INSERT, - * but XMLS_MODE_UPDATE will generally be the most appropriate setting. - * - * @param int $mode XMLS_MODE_INSERT, XMLS_MODE_UPDATE, or XMLS_MODE_IGNORE - * @return int current mode - */ - function ExistingData( $mode = NULL ) { - if( is_int( $mode ) ) { - switch( $mode ) { - case XMLS_MODE_UPDATE: - $mode = XMLS_MODE_UPDATE; - break; - case XMLS_MODE_IGNORE: - $mode = XMLS_MODE_IGNORE; - break; - case XMLS_MODE_INSERT: - $mode = XMLS_MODE_INSERT; - break; - default: - $mode = XMLS_EXISITNG_DATA; - break; - } - $this->existingData = $mode; - } - - return $this->existingData; - } - - /** - * Enables/disables inline SQL execution. - * - * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution), - * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode - * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema() - * to apply the schema to the database. - * - * @param bool $mode execute - * @return bool current execution mode - * - * @see ParseSchema(), ExecuteSchema() - */ - function ExecuteInline( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->executeInline = $mode; - } - - return $this->executeInline; - } - - /** - * Enables/disables SQL continue on error. - * - * Call this method to enable or disable continuation of SQL execution if an error occurs. - * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs. - * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing - * of the schema will continue. - * - * @param bool $mode execute - * @return bool current continueOnError mode - * - * @see addSQL(), ExecuteSchema() - */ - function ContinueOnError( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->continueOnError = $mode; - } - - return $this->continueOnError; - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to create the database - * described. This method automatically converts the schema to the latest - * axmls schema version. - * @see ParseSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function ParseSchema( $filename, $returnSchema = FALSE ) { - return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema directly from a file (see - * the DTD for the proper format) and generate the SQL necessary to create - * the database described by the schema. Use this method when you are dealing - * with large schema files. Otherwise, ParseSchema() is faster. - * This method does not automatically convert the schema to the latest axmls - * schema version. You must convert the schema manually using either the - * ConvertSchemaFile() or ConvertSchemaString() method. - * @see ParseSchema() - * @see ConvertSchemaFile() - * @see ConvertSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - * - * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString() - * @see ParseSchema(), ParseSchemaString() - */ - function ParseSchemaFile( $filename, $returnSchema = FALSE ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - logMsg( 'Unable to open file' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) { - logMsg( 'Invalid Schema Version' ); - return FALSE; - } - - if( $returnSchema ) { - $xmlstring = ''; - while( $data = fread( $fp, 4096 ) ) { - $xmlstring .= $data . "\n"; - } - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Converts an XML schema string to SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * @see ParseSchema() - * - * @param string $xmlstring XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - logMsg( 'Empty or Invalid Schema' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) { - logMsg( 'Invalid Schema Version' ); - return FALSE; - } - - if( $returnSchema ) { - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Loads an XML schema from a file and converts it to uninstallation SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to remove the database described. - * @see RemoveSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function RemoveSchema( $filename, $returnSchema = FALSE ) { - return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Converts an XML schema string to uninstallation SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to uninstall the database described by the schema. - * @see RemoveSchema() - * - * @param string $schema XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function RemoveSchemaString( $schema, $returnSchema = FALSE ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema ); - } - - /** - * Applies the current XML schema to the database (post execution). - * - * Call this method to apply the current schema (generally created by calling - * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, - * and executing other SQL specified in the schema) after parsing. - * @see ParseSchema(), ParseSchemaString(), ExecuteInline() - * - * @param array $sqlArray Array of SQL statements that will be applied rather than - * the current schema. - * @param boolean $continueOnErr Continue to apply the schema even if an error occurs. - * @returns integer 0 if failure, 1 if errors, 2 if successful. - */ - function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) { - if( !is_bool( $continueOnErr ) ) { - $continueOnErr = $this->ContinueOnError(); - } - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - $this->success = 0; - } else { - $this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr ); - } - - return $this->success; - } - - /** - * Returns the current SQL array. - * - * Call this method to fetch the array of SQL queries resulting from - * ParseSchema() or ParseSchemaString(). - * - * @param string $format Format: HTML, TEXT, or NONE (PHP array) - * @return array Array of SQL statements or FALSE if an error occurs - */ - function PrintSQL( $format = 'NONE' ) { - $sqlArray = null; - return $this->getSQL( $format, $sqlArray ); - } - - /** - * Saves the current SQL array to the local filesystem as a list of SQL queries. - * - * Call this method to save the array of SQL queries (generally resulting from a - * parsed XML schema) to the filesystem. - * - * @param string $filename Path and name where the file should be saved. - * @return boolean TRUE if save is successful, else FALSE. - */ - function SaveSQL( $filename = './schema.sql' ) { - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - if( !isset( $sqlArray ) ) { - return FALSE; - } - - $fp = fopen( $filename, "w" ); - - foreach( $sqlArray as $key => $query ) { - fwrite( $fp, $query . ";\n" ); - } - fclose( $fp ); - } - - /** - * Create an xml parser - * - * @return object PHP XML parser object - * - * @access private - */ - function &create_parser() { - // Create the parser - $xmlParser = xml_parser_create(); - xml_set_object( $xmlParser, $this ); - - // Initialize the XML callback functions - xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' ); - xml_set_character_data_handler( $xmlParser, '_tag_cdata' ); - - return $xmlParser; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - switch( strtoupper( $tag ) ) { - case 'TABLE': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbTable( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - case 'SQL': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbQuerySet( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - } - - /** - * XML Callback to process end elements - * - * @access private - * @internal - */ - function _tag_close( &$parser, $tag ) { - - } - - /** - * Converts an XML schema string to the specified DTD version. - * - * Call this method to convert a string containing an XML schema to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaFile() - * - * @param string $schema String containing XML schema that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = $schema; - } else { - $result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - /* - // compat for pre-4.3 - jlim - function _file_get_contents($path) - { - if (function_exists('file_get_contents')) return file_get_contents($path); - return join('',file($path)); - }*/ - - /** - * Converts an XML schema file to the specified DTD version. - * - * Call this method to convert the specified XML schema file to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaString() - * - * @param string $filename Name of XML schema file that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaFileVersion( $filename ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = _file_get_contents( $filename ); - - // remove unicode BOM if present - if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) { - $result = substr( $result, 3 ); - } - } else { - $result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' ); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - function TransformSchema( $schema, $xsl, $schematype='string' ) - { - // Fail if XSLT extension is not available - if( ! function_exists( 'xslt_create' ) ) { - return FALSE; - } - - $xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl'; - - // look for xsl - if( !is_readable( $xsl_file ) ) { - return FALSE; - } - - switch( $schematype ) - { - case 'file': - if( !is_readable( $schema ) ) { - return FALSE; - } - - $schema = _file_get_contents( $schema ); - break; - case 'string': - default: - if( !is_string( $schema ) ) { - return FALSE; - } - } - - $arguments = array ( - '/_xml' => $schema, - '/_xsl' => _file_get_contents( $xsl_file ) - ); - - // create an XSLT processor - $xh = xslt_create (); - - // set error handler - xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler')); - - // process the schema - $result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); - - xslt_free ($xh); - - return $result; - } - - /** - * Processes XSLT transformation errors - * - * @param object $parser XML parser object - * @param integer $errno Error number - * @param integer $level Error level - * @param array $fields Error information fields - * - * @access private - */ - function xslt_error_handler( $parser, $errno, $level, $fields ) { - if( is_array( $fields ) ) { - $msg = array( - 'Message Type' => ucfirst( $fields['msgtype'] ), - 'Message Code' => $fields['code'], - 'Message' => $fields['msg'], - 'Error Number' => $errno, - 'Level' => $level - ); - - switch( $fields['URI'] ) { - case 'arg:/_xml': - $msg['Input'] = 'XML'; - break; - case 'arg:/_xsl': - $msg['Input'] = 'XSL'; - break; - default: - $msg['Input'] = $fields['URI']; - } - - $msg['Line'] = $fields['line']; - } else { - $msg = array( - 'Message Type' => 'Error', - 'Error Number' => $errno, - 'Level' => $level, - 'Fields' => var_export( $fields, TRUE ) - ); - } - - $error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n" - . '' . "\n"; - - foreach( $msg as $label => $details ) { - $error_details .= '' . "\n"; - } - - $error_details .= '
    ' . $label . ': ' . htmlentities( $details ) . '
    '; - - trigger_error( $error_details, E_USER_ERROR ); - } - - /** - * Returns the AXMLS Schema Version of the requested XML schema file. - * - * Call this method to obtain the AXMLS DTD version of the requested XML schema file. - * @see SchemaStringVersion() - * - * @param string $filename AXMLS schema file - * @return string Schema version number or FALSE on error - */ - function SchemaFileVersion( $filename ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( preg_match( $this->versionRegex, $data, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - } - - return FALSE; - } - - /** - * Returns the AXMLS Schema Version of the provided XML schema string. - * - * Call this method to obtain the AXMLS DTD version of the provided XML schema string. - * @see SchemaFileVersion() - * - * @param string $xmlstring XML schema string - * @return string Schema version number or FALSE on error - */ - function SchemaStringVersion( $xmlstring ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - - return FALSE; - } - - /** - * Extracts an XML schema from an existing database. - * - * Call this method to create an XML schema string from an existing database. - * If the data parameter is set to TRUE, AXMLS will include the data from the database - * in the schema. - * - * @param boolean $data Include data in schema dump - * @indent string indentation to use - * @prefix string extract only tables with given prefix - * @stripprefix strip prefix string when storing in XML schema - * @return string Generated XML schema - */ - function ExtractSchema( $data = FALSE, $indent = ' ', $prefix = '' , $stripprefix=false) { - $old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM ); - - $schema = '' . "\n" - . '' . "\n"; - - if( is_array( $tables = $this->db->MetaTables( 'TABLES' , ($prefix) ? $prefix.'%' : '') ) ) { - foreach( $tables as $table ) { - if ($stripprefix) $table = str_replace(str_replace('\\_', '_', $pfx ), '', $table); - $schema .= $indent . '' . "\n"; - - // grab details from database - $rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE -1' ); - $fields = $this->db->MetaColumns( $table ); - $indexes = $this->db->MetaIndexes( $table ); - - if( is_array( $fields ) ) { - foreach( $fields as $details ) { - $extra = ''; - $content = array(); - - if( isset($details->max_length) && $details->max_length > 0 ) { - $extra .= ' size="' . $details->max_length . '"'; - } - - if( isset($details->primary_key) && $details->primary_key ) { - $content[] = ''; - } elseif( isset($details->not_null) && $details->not_null ) { - $content[] = ''; - } - - if( isset($details->has_default) && $details->has_default ) { - $content[] = ''; - } - - if( isset($details->auto_increment) && $details->auto_increment ) { - $content[] = ''; - } - - if( isset($details->unsigned) && $details->unsigned ) { - $content[] = ''; - } - - // this stops the creation of 'R' columns, - // AUTOINCREMENT is used to create auto columns - $details->primary_key = 0; - $type = $rs->MetaType( $details ); - - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - } else { - $schema .= "/>\n"; - } - } - } - - if( is_array( $indexes ) ) { - foreach( $indexes as $index => $details ) { - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - - if( $details['unique'] ) { - $schema .= str_repeat( $indent, 3 ) . '' . "\n"; - } - - foreach( $details['columns'] as $column ) { - $schema .= str_repeat( $indent, 3 ) . '' . htmlentities( $column ) . '' . "\n"; - } - - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - } - } - - if( $data ) { - $rs = $this->db->Execute( 'SELECT * FROM ' . $table ); - - if( is_object( $rs ) && !$rs->EOF ) { - $schema .= str_repeat( $indent, 2 ) . "\n"; - - while( $row = $rs->FetchRow() ) { - foreach( $row as $key => $val ) { - if ( $val != htmlentities( $val ) ) { - $row[$key] = ''; - } - } - - $schema .= str_repeat( $indent, 3 ) . '' . implode( '', $row ) . "\n"; - } - - $schema .= str_repeat( $indent, 2 ) . "\n"; - } - } - - $schema .= $indent . "
    \n"; - } - } - - $this->db->SetFetchMode( $old_mode ); - - $schema .= '
    '; - return $schema; - } - - /** - * Sets a prefix for database objects - * - * Call this method to set a standard prefix that will be prepended to all database tables - * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix. - * - * @param string $prefix Prefix that will be prepended. - * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix. - * @return boolean TRUE if successful, else FALSE - */ - function SetPrefix( $prefix = '', $underscore = TRUE ) { - switch( TRUE ) { - // clear prefix - case empty( $prefix ): - logMsg( 'Cleared prefix' ); - $this->objectPrefix = ''; - return TRUE; - // prefix too long - case strlen( $prefix ) > XMLS_PREFIX_MAXLEN: - // prefix contains invalid characters - case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ): - logMsg( 'Invalid prefix: ' . $prefix ); - return FALSE; - } - - if( $underscore AND substr( $prefix, -1 ) != '_' ) { - $prefix .= '_'; - } - - // prefix valid - logMsg( 'Set prefix: ' . $prefix ); - $this->objectPrefix = $prefix; - return TRUE; - } - - /** - * Returns an object name with the current prefix prepended. - * - * @param string $name Name - * @return string Prefixed name - * - * @access private - */ - function prefix( $name = '' ) { - // if prefix is set - if( !empty( $this->objectPrefix ) ) { - // Prepend the object prefix to the table name - // prepend after quote if used - return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name ); - } - - // No prefix set. Use name provided. - return $name; - } - - /** - * Checks if element references a specific platform - * - * @param string $platform Requested platform - * @returns boolean TRUE if platform check succeeds - * - * @access private - */ - function supportedPlatform( $platform = NULL ) { - if( !empty( $platform ) ) { - $regex = '/(^|\|)' . $this->db->databaseType . '(\||$)/i'; - - if( preg_match( '/^- /', $platform ) ) { - if (preg_match ( $regex, substr( $platform, 2 ) ) ) { - logMsg( 'Platform ' . $platform . ' is NOT supported' ); - return FALSE; - } - } else { - if( !preg_match ( $regex, $platform ) ) { - logMsg( 'Platform ' . $platform . ' is NOT supported' ); - return FALSE; - } - } - } - - logMsg( 'Platform ' . $platform . ' is supported' ); - return TRUE; - } - - /** - * Clears the array of generated SQL. - * - * @access private - */ - function clearSQL() { - $this->sqlArray = array(); - } - - /** - * Adds SQL into the SQL array. - * - * @param mixed $sql SQL to Add - * @return boolean TRUE if successful, else FALSE. - * - * @access private - */ - function addSQL( $sql = NULL ) { - if( is_array( $sql ) ) { - foreach( $sql as $line ) { - $this->addSQL( $line ); - } - - return TRUE; - } - - if( is_string( $sql ) ) { - $this->sqlArray[] = $sql; - - // if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL. - if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) { - $saved = $this->db->debug; - $this->db->debug = $this->debug; - $ok = $this->db->Execute( $sql ); - $this->db->debug = $saved; - - if( !$ok ) { - if( $this->debug ) { - ADOConnection::outp( $this->db->ErrorMsg() ); - } - - $this->success = 1; - } - } - - return TRUE; - } - - return FALSE; - } - - /** - * Gets the SQL array in the specified format. - * - * @param string $format Format - * @return mixed SQL - * - * @access private - */ - function getSQL( $format = NULL, $sqlArray = NULL ) { - if( !is_array( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - return FALSE; - } - - switch( strtolower( $format ) ) { - case 'string': - case 'text': - return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : ''; - case'html': - return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : ''; - } - - return $this->sqlArray; - } - - /** - * Destroys an adoSchema object. - * - * Call this method to clean up after an adoSchema object that is no longer in use. - * @deprecated adoSchema now cleans up automatically. - */ - function Destroy() { - set_magic_quotes_runtime( $this->mgq ); - unset( $this ); - } -} - -/** -* Message logging function -* -* @access private -*/ -function logMsg( $msg, $title = NULL, $force = FALSE ) { - if( XMLS_DEBUG or $force ) { - echo '
    ';
    -		
    -		if( isset( $title ) ) {
    -			echo '

    ' . htmlentities( $title ) . '

    '; - } - - if( @is_object( $this ) ) { - echo '[' . get_class( $this ) . '] '; - } - - print_r( $msg ); - - echo '
    '; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb.inc.php.svn-base deleted file mode 100755 index 351d505e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/adodb.inc.php.svn-base +++ /dev/null @@ -1,4231 +0,0 @@ -fields is available on EOF - $ADODB_FETCH_MODE, // DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default... - $ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in queries generated by getinsertsql and getupdatesql. - - //============================================================================================== - // GLOBAL SETUP - //============================================================================================== - - $ADODB_EXTENSION = defined('ADODB_EXTENSION'); - - //********************************************************// - /* - Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3). - Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi - - 0 = ignore empty fields. All empty fields in array are ignored. - 1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values. - 2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values. - 3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and empty fields '' are set to empty '' sql values. - */ - define('ADODB_FORCE_IGNORE',0); - define('ADODB_FORCE_NULL',1); - define('ADODB_FORCE_EMPTY',2); - define('ADODB_FORCE_VALUE',3); - //********************************************************// - - - if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) { - - define('ADODB_BAD_RS','

    Bad $rs in %s. Connection or SQL invalid. Try using $connection->debug=true;

    '); - - // allow [ ] @ ` " and . in table names - define('ADODB_TABLE_REGEX','([]0-9a-z_\:\"\`\.\@\[-]*)'); - - // prefetching used by oracle - if (!defined('ADODB_PREFETCH_ROWS')) define('ADODB_PREFETCH_ROWS',10); - - - /* - Controls ADODB_FETCH_ASSOC field-name case. Default is 2, use native case-names. - This currently works only with mssql, odbc, oci8po and ibase derived drivers. - - 0 = assoc lowercase field names. $rs->fields['orderid'] - 1 = assoc uppercase field names. $rs->fields['ORDERID'] - 2 = use native-case field names. $rs->fields['OrderID'] - */ - - define('ADODB_FETCH_DEFAULT',0); - define('ADODB_FETCH_NUM',1); - define('ADODB_FETCH_ASSOC',2); - define('ADODB_FETCH_BOTH',3); - - if (!defined('TIMESTAMP_FIRST_YEAR')) define('TIMESTAMP_FIRST_YEAR',100); - - // PHP's version scheme makes converting to numbers difficult - workaround - $_adodb_ver = (float) PHP_VERSION; - if ($_adodb_ver >= 5.2) { - define('ADODB_PHPVER',0x5200); - } else if ($_adodb_ver >= 5.0) { - define('ADODB_PHPVER',0x5000); - } else if ($_adodb_ver > 4.299999) { # 4.3 - define('ADODB_PHPVER',0x4300); - } else if ($_adodb_ver > 4.199999) { # 4.2 - define('ADODB_PHPVER',0x4200); - } else if (strnatcmp(PHP_VERSION,'4.0.5')>=0) { - define('ADODB_PHPVER',0x4050); - } else { - define('ADODB_PHPVER',0x4000); - } - } - - //if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); - - - /** - Accepts $src and $dest arrays, replacing string $data - */ - function ADODB_str_replace($src, $dest, $data) - { - if (ADODB_PHPVER >= 0x4050) return str_replace($src,$dest,$data); - - $s = reset($src); - $d = reset($dest); - while ($s !== false) { - $data = str_replace($s,$d,$data); - $s = next($src); - $d = next($dest); - } - return $data; - } - - function ADODB_Setup() - { - GLOBAL - $ADODB_vers, // database version - $ADODB_COUNTRECS, // count number of records returned - slows down query - $ADODB_CACHE_DIR, // directory to cache recordsets - $ADODB_FETCH_MODE, - $ADODB_FORCE_TYPE, - $ADODB_QUOTE_FIELDNAMES; - - $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT; - $ADODB_FORCE_TYPE = ADODB_FORCE_VALUE; - - - if (!isset($ADODB_CACHE_DIR)) { - $ADODB_CACHE_DIR = '/tmp'; //(isset($_ENV['TMP'])) ? $_ENV['TMP'] : '/tmp'; - } else { - // do not accept url based paths, eg. http:/ or ftp:/ - if (strpos($ADODB_CACHE_DIR,'://') !== false) - die("Illegal path http:// or ftp://"); - } - - - // Initialize random number generator for randomizing cache flushes - // -- note Since PHP 4.2.0, the seed becomes optional and defaults to a random value if omitted. - srand(((double)microtime())*1000000); - - /** - * ADODB version as a string. - */ - $ADODB_vers = 'V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. Released BSD & LGPL.'; - - /** - * Determines whether recordset->RecordCount() is used. - * Set to false for highest performance -- RecordCount() will always return -1 then - * for databases that provide "virtual" recordcounts... - */ - if (!isset($ADODB_COUNTRECS)) $ADODB_COUNTRECS = true; - } - - - //============================================================================================== - // CHANGE NOTHING BELOW UNLESS YOU ARE DESIGNING ADODB - //============================================================================================== - - ADODB_Setup(); - - //============================================================================================== - // CLASS ADOFieldObject - //============================================================================================== - /** - * Helper class for FetchFields -- holds info on a column - */ - class ADOFieldObject { - var $name = ''; - var $max_length=0; - var $type=""; -/* - // additional fields by dannym... (danny_milo@yahoo.com) - var $not_null = false; - // actually, this has already been built-in in the postgres, fbsql AND mysql module? ^-^ - // so we can as well make not_null standard (leaving it at "false" does not harm anyways) - - var $has_default = false; // this one I have done only in mysql and postgres for now ... - // others to come (dannym) - var $default_value; // default, if any, and supported. Check has_default first. -*/ - } - - - - function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection) - { - //print "Errorno ($fn errno=$errno m=$errmsg) "; - $thisConnection->_transOK = false; - if ($thisConnection->_oldRaiseFn) { - $fn = $thisConnection->_oldRaiseFn; - $fn($dbms, $fn, $errno, $errmsg, $p1, $p2,$thisConnection); - } - } - - //============================================================================================== - // CLASS ADOConnection - //============================================================================================== - - /** - * Connection object. For connecting to databases, and executing queries. - */ - class ADOConnection { - // - // PUBLIC VARS - // - var $dataProvider = 'native'; - var $databaseType = ''; /// RDBMS currently in use, eg. odbc, mysql, mssql - var $database = ''; /// Name of database to be used. - var $host = ''; /// The hostname of the database server - var $user = ''; /// The username which is used to connect to the database server. - var $password = ''; /// Password for the username. For security, we no longer store it. - var $debug = false; /// if set to true will output sql statements - var $maxblobsize = 262144; /// maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro - var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase - var $substr = 'substr'; /// substring operator - var $length = 'length'; /// string length ofperator - var $random = 'rand()'; /// random function - var $upperCase = 'upper'; /// uppercase function - var $fmtDate = "'Y-m-d'"; /// used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d, h:i:s A'"; /// used by DBTimeStamp as the default timestamp fmt. - var $true = '1'; /// string that represents TRUE for a database - var $false = '0'; /// string that represents FALSE for a database - var $replaceQuote = "\\'"; /// string to use to replace quotes - var $nameQuote = '"'; /// string to use to quote identifiers and names - var $charSet=false; /// character set to use - only for interbase, postgres and oci8 - var $metaDatabasesSQL = ''; - var $metaTablesSQL = ''; - var $uniqueOrderBy = false; /// All order by columns have to be unique - var $emptyDate = ' '; - var $emptyTimeStamp = ' '; - var $lastInsID = false; - //-- - var $hasInsertID = false; /// supports autoincrement ID? - var $hasAffectedRows = false; /// supports affected rows for update/delete? - var $hasTop = false; /// support mssql/access SELECT TOP 10 * FROM TABLE - var $hasLimit = false; /// support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - var $readOnly = false; /// this is a readonly database - used by phpLens - var $hasMoveFirst = false; /// has ability to run MoveFirst(), scrolling backwards - var $hasGenID = false; /// can generate sequences using GenID(); - var $hasTransactions = true; /// has transactions - //-- - var $genID = 0; /// sequence id used by GenID(); - var $raiseErrorFn = false; /// error function to call - var $isoDates = false; /// accepts dates in ISO format - var $cacheSecs = 3600; /// cache for 1 hour - - // memcache - var $memCache = false; /// should we use memCache instead of caching in files - var $memCacheHost; /// memCache host - var $memCachePort = 11211; /// memCache port - var $memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib) - - var $sysDate = false; /// name of function that returns the current date - var $sysTimeStamp = false; /// name of function that returns the current timestamp - var $arrayClass = 'ADORecordSet_array'; /// name of class used to generate array recordsets, which are pre-downloaded recordsets - - var $noNullStrings = false; /// oracle specific stuff - if true ensures that '' is converted to ' ' - var $numCacheHits = 0; - var $numCacheMisses = 0; - var $pageExecuteCountRows = true; - var $uniqueSort = false; /// indicates that all fields in order by must be unique - var $leftOuter = false; /// operator to use for left outer join in WHERE clause - var $rightOuter = false; /// operator to use for right outer join in WHERE clause - var $ansiOuter = false; /// whether ansi outer join syntax supported - var $autoRollback = false; // autoRollback on PConnect(). - var $poorAffectedRows = false; // affectedRows not working or unreliable - - var $fnExecute = false; - var $fnCacheExecute = false; - var $blobEncodeType = false; // false=not required, 'I'=encode to integer, 'C'=encode to char - var $rsPrefix = "ADORecordSet_"; - - var $autoCommit = true; /// do not modify this yourself - actually private - var $transOff = 0; /// temporarily disable transactions - var $transCnt = 0; /// count of nested transactions - - var $fetchMode=false; - - var $null2null = 'null'; // in autoexecute/getinsertsql/getupdatesql, this value will be converted to a null - // - // PRIVATE VARS - // - var $_oldRaiseFn = false; - var $_transOK = null; - var $_connectionID = false; /// The returned link identifier whenever a successful database connection is made. - var $_errorMsg = false; /// A variable which was used to keep the returned last error message. The value will - /// then returned by the errorMsg() function - var $_errorCode = false; /// Last error code, not guaranteed to be used - only by oci8 - var $_queryID = false; /// This variable keeps the last created result link identifier - - var $_isPersistentConnection = false; /// A boolean variable to state whether its a persistent connection or normal connection. */ - var $_bindInputArray = false; /// set to true if ADOConnection.Execute() permits binding of array parameters. - var $_evalAll = false; - var $_affected = false; - var $_logsql = false; - var $_transmode = ''; // transaction mode - - - - /** - * Constructor - */ - function ADOConnection() - { - die('Virtual Class -- cannot instantiate'); - } - - function Version() - { - global $ADODB_vers; - - return (float) substr($ADODB_vers,1); - } - - /** - Get server version info... - - @returns An array with 2 elements: $arr['string'] is the description string, - and $arr[version] is the version (also a string). - */ - function ServerInfo() - { - return array('description' => '', 'version' => ''); - } - - function IsConnected() - { - return !empty($this->_connectionID); - } - - function _findvers($str) - { - if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) return $arr[1]; - else return ''; - } - - /** - * All error messages go through this bottleneck function. - * You can define your own handler by defining the function name in ADODB_OUTP. - */ - function outp($msg,$newline=true) - { - global $ADODB_FLUSH,$ADODB_OUTP; - - if (defined('ADODB_OUTP')) { - $fn = ADODB_OUTP; - $fn($msg,$newline); - return; - } else if (isset($ADODB_OUTP)) { - $fn = $ADODB_OUTP; - $fn($msg,$newline); - return; - } - - if ($newline) $msg .= "
    \n"; - - if (isset($_SERVER['HTTP_USER_AGENT']) || !$newline) echo $msg; - else echo strip_tags($msg); - - - if (!empty($ADODB_FLUSH) && ob_get_length() !== false) flush(); // do not flush if output buffering enabled - useless - thx to Jesse Mullan - - } - - function Time() - { - $rs =& $this->_Execute("select $this->sysTimeStamp"); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - - /** - * Connect to database - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * @param [forceNew] force new connection - * - * @return true or false - */ - function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "", $forceNew = false) - { - if ($argHostname != "") $this->host = $argHostname; - if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; // not stored for security reasons - if ($argDatabaseName != "") $this->database = $argDatabaseName; - - $this->_isPersistentConnection = false; - if ($forceNew) { - if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true; - } else { - if ($rez=$this->_connect($this->host, $this->user, $this->password, $this->database)) return true; - } - if (isset($rez)) { - $err = $this->ErrorMsg(); - if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; - $ret = false; - } else { - $err = "Missing extension for ".$this->dataProvider; - $ret = 0; - } - if ($fn = $this->raiseErrorFn) - $fn($this->databaseType,'CONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); - - - $this->_connectionID = false; - if ($this->debug) ADOConnection::outp( $this->host.': '.$err); - return $ret; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName); - } - - - /** - * Always force a new connection to database - currently only works with oracle - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * - * @return true or false - */ - function NConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") - { - return $this->Connect($argHostname, $argUsername, $argPassword, $argDatabaseName, true); - } - - /** - * Establish persistent connect to database - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * - * @return return true or false - */ - function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") - { - if (defined('ADODB_NEVER_PERSIST')) - return $this->Connect($argHostname,$argUsername,$argPassword,$argDatabaseName); - - if ($argHostname != "") $this->host = $argHostname; - if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; - if ($argDatabaseName != "") $this->database = $argDatabaseName; - - $this->_isPersistentConnection = true; - if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true; - if (isset($rez)) { - $err = $this->ErrorMsg(); - if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; - $ret = false; - } else { - $err = "Missing extension for ".$this->dataProvider; - $ret = 0; - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'PCONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); - } - - $this->_connectionID = false; - if ($this->debug) ADOConnection::outp( $this->host.': '.$err); - return $ret; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysDate; - return $col; // child class implement - } - - /** - * Should prepare the sql statement and return the stmt resource. - * For databases that do not support this, we return the $sql. To ensure - * compatibility with databases that do not support prepare: - * - * $stmt = $db->Prepare("insert into table (id, name) values (?,?)"); - * $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); - * $db->Execute($stmt,array(2,'Joe')) or die('insert failed'); - * - * @param sql SQL to send to database - * - * @return return FALSE, or the prepared statement, or the original sql if - * if the database does not support prepare. - * - */ - function Prepare($sql) - { - return $sql; - } - - /** - * Some databases, eg. mssql require a different function for preparing - * stored procedures. So we cannot use Prepare(). - * - * Should prepare the stored procedure and return the stmt resource. - * For databases that do not support this, we return the $sql. To ensure - * compatibility with databases that do not support prepare: - * - * @param sql SQL to send to database - * - * @return return FALSE, or the prepared statement, or the original sql if - * if the database does not support prepare. - * - */ - function PrepareSP($sql,$param=true) - { - return $this->Prepare($sql,$param); - } - - /** - * PEAR DB Compat - */ - function Quote($s) - { - return $this->qstr($s,false); - } - - /** - Requested by "Karsten Dambekalns" - */ - function QMagic($s) - { - return $this->qstr($s,get_magic_quotes_gpc()); - } - - function q(&$s) - { - #if (!empty($this->qNull)) if ($s == 'null') return $s; - $s = $this->qstr($s,false); - } - - /** - * PEAR DB Compat - do not use internally. - */ - function ErrorNative() - { - return $this->ErrorNo(); - } - - - /** - * PEAR DB Compat - do not use internally. - */ - function nextId($seq_name) - { - return $this->GenID($seq_name); - } - - /** - * Lock a row, will escalate and lock the table if row locking not supported - * will normally free the lock at the end of the transaction - * - * @param $table name of table to lock - * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock - */ - function RowLock($table,$where) - { - return false; - } - - function CommitLock($table) - { - return $this->CommitTrans(); - } - - function RollbackLock($table) - { - return $this->RollbackTrans(); - } - - /** - * PEAR DB Compat - do not use internally. - * - * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical - * for easy porting :-) - * - * @param mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM - * @returns The previous fetch mode - */ - function SetFetchMode($mode) - { - $old = $this->fetchMode; - $this->fetchMode = $mode; - - if ($old === false) { - global $ADODB_FETCH_MODE; - return $ADODB_FETCH_MODE; - } - return $old; - } - - - /** - * PEAR DB Compat - do not use internally. - */ - function &Query($sql, $inputarr=false) - { - $rs = &$this->Execute($sql, $inputarr); - if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); - return $rs; - } - - - /** - * PEAR DB Compat - do not use internally - */ - function &LimitQuery($sql, $offset, $count, $params=false) - { - $rs = &$this->SelectLimit($sql, $count, $offset, $params); - if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); - return $rs; - } - - - /** - * PEAR DB Compat - do not use internally - */ - function Disconnect() - { - return $this->Close(); - } - - /* - Returns placeholder for parameter, eg. - $DB->Param('a') - - will return ':a' for Oracle, and '?' for most other databases... - - For databases that require positioned params, eg $1, $2, $3 for postgresql, - pass in Param(false) before setting the first parameter. - */ - function Param($name,$type='C') - { - return '?'; - } - - /* - InParameter and OutParameter are self-documenting versions of Parameter(). - */ - function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - return $this->Parameter($stmt,$var,$name,false,$maxLen,$type); - } - - /* - */ - function OutParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - return $this->Parameter($stmt,$var,$name,true,$maxLen,$type); - - } - - - /* - Usage in oracle - $stmt = $db->Prepare('select * from table where id =:myid and group=:group'); - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',64); - $db->Execute(); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - */ - function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) - { - return false; - } - - - function IgnoreErrors($saveErrs=false) - { - if (!$saveErrs) { - $saveErrs = array($this->raiseErrorFn,$this->_transOK); - $this->raiseErrorFn = false; - return $saveErrs; - } else { - $this->raiseErrorFn = $saveErrs[0]; - $this->_transOK = $saveErrs[1]; - } - } - - /** - Improved method of initiating a transaction. Used together with CompleteTrans(). - Advantages include: - - a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. - Only the outermost block is treated as a transaction.
    - b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.
    - c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block - are disabled, making it backward compatible. - */ - function StartTrans($errfn = 'ADODB_TransMonitor') - { - if ($this->transOff > 0) { - $this->transOff += 1; - return; - } - - $this->_oldRaiseFn = $this->raiseErrorFn; - $this->raiseErrorFn = $errfn; - $this->_transOK = true; - - if ($this->debug && $this->transCnt > 0) ADOConnection::outp("Bad Transaction: StartTrans called within BeginTrans"); - $this->BeginTrans(); - $this->transOff = 1; - } - - - /** - Used together with StartTrans() to end a transaction. Monitors connection - for sql errors, and will commit or rollback as appropriate. - - @autoComplete if true, monitor sql errors and commit and rollback as appropriate, - and if set to false force rollback even if no SQL error detected. - @returns true on commit, false on rollback. - */ - function CompleteTrans($autoComplete = true) - { - if ($this->transOff > 1) { - $this->transOff -= 1; - return true; - } - $this->raiseErrorFn = $this->_oldRaiseFn; - - $this->transOff = 0; - if ($this->_transOK && $autoComplete) { - if (!$this->CommitTrans()) { - $this->_transOK = false; - if ($this->debug) ADOConnection::outp("Smart Commit failed"); - } else - if ($this->debug) ADOConnection::outp("Smart Commit occurred"); - } else { - $this->_transOK = false; - $this->RollbackTrans(); - if ($this->debug) ADOCOnnection::outp("Smart Rollback occurred"); - } - - return $this->_transOK; - } - - /* - At the end of a StartTrans/CompleteTrans block, perform a rollback. - */ - function FailTrans() - { - if ($this->debug) - if ($this->transOff == 0) { - ADOConnection::outp("FailTrans outside StartTrans/CompleteTrans"); - } else { - ADOConnection::outp("FailTrans was called"); - adodb_backtrace(); - } - $this->_transOK = false; - } - - /** - Check if transaction has failed, only for Smart Transactions. - */ - function HasFailedTrans() - { - if ($this->transOff > 0) return $this->_transOK == false; - return false; - } - - /** - * Execute SQL - * - * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text) - * @param [inputarr] holds the input data to bind to. Null elements will be set to null. - * @return RecordSet or false - */ - function &Execute($sql,$inputarr=false) - { - if ($this->fnExecute) { - $fn = $this->fnExecute; - $ret =& $fn($this,$sql,$inputarr); - if (isset($ret)) return $ret; - } - if ($inputarr) { - if (!is_array($inputarr)) $inputarr = array($inputarr); - - $element0 = reset($inputarr); - # is_object check because oci8 descriptors can be passed in - $array_2d = is_array($element0) && !is_object(reset($element0)); - //remove extra memory copy of input -mikefedyk - unset($element0); - - if (!is_array($sql) && !$this->_bindInputArray) { - $sqlarr = explode('?',$sql); - - if (!$array_2d) $inputarr = array($inputarr); - foreach($inputarr as $arr) { - $sql = ''; $i = 0; - //Use each() instead of foreach to reduce memory usage -mikefedyk - while(list(, $v) = each($arr)) { - $sql .= $sqlarr[$i]; - // from Ron Baldwin - // Only quote string types - $typ = gettype($v); - if ($typ == 'string') - //New memory copy of input created here -mikefedyk - $sql .= $this->qstr($v); - else if ($typ == 'double') - $sql .= str_replace(',','.',$v); // locales fix so 1.1 does not get converted to 1,1 - else if ($typ == 'boolean') - $sql .= $v ? $this->true : $this->false; - else if ($typ == 'object') { - if (method_exists($v, '__toString')) $sql .= $this->qstr($v->__toString()); - else $sql .= $this->qstr((string) $v); - } else if ($v === null) - $sql .= 'NULL'; - else - $sql .= $v; - $i += 1; - } - if (isset($sqlarr[$i])) { - $sql .= $sqlarr[$i]; - if ($i+1 != sizeof($sqlarr)) ADOConnection::outp( "Input Array does not match ?: ".htmlspecialchars($sql)); - } else if ($i != sizeof($sqlarr)) - ADOConnection::outp( "Input array does not match ?: ".htmlspecialchars($sql)); - - $ret =& $this->_Execute($sql); - if (!$ret) return $ret; - } - } else { - if ($array_2d) { - if (is_string($sql)) - $stmt = $this->Prepare($sql); - else - $stmt = $sql; - - foreach($inputarr as $arr) { - $ret =& $this->_Execute($stmt,$arr); - if (!$ret) return $ret; - } - } else { - $ret =& $this->_Execute($sql,$inputarr); - } - } - } else { - $ret =& $this->_Execute($sql,false); - } - - return $ret; - } - - - function &_Execute($sql,$inputarr=false) - { - if ($this->debug) { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - $this->_queryID = _adodb_debug_execute($this, $sql,$inputarr); - } else { - $this->_queryID = @$this->_query($sql,$inputarr); - } - - /************************ - // OK, query executed - *************************/ - - if ($this->_queryID === false) { // error handling if query fails - if ($this->debug == 99) adodb_backtrace(true,5); - $fn = $this->raiseErrorFn; - if ($fn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this); - } - $false = false; - return $false; - } - - if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead - $rs = new ADORecordSet_empty(); - return $rs; - } - - // return real recordset from select statement - $rsclass = $this->rsPrefix.$this->databaseType; - $rs = new $rsclass($this->_queryID,$this->fetchMode); - $rs->connection = &$this; // Pablo suggestion - $rs->Init(); - if (is_array($sql)) $rs->sql = $sql[0]; - else $rs->sql = $sql; - if ($rs->_numOfRows <= 0) { - global $ADODB_COUNTRECS; - if ($ADODB_COUNTRECS) { - if (!$rs->EOF) { - $rs = &$this->_rs2rs($rs,-1,-1,!is_array($sql)); - $rs->_queryID = $this->_queryID; - } else - $rs->_numOfRows = 0; - } - } - return $rs; - } - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - return $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); - } - - function DropSequence($seqname='adodbseq') - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /** - * Generates a sequence id and stores it in $this->genID; - * GenID is only available if $this->hasGenID = true; - * - * @param seqname name of sequence to use - * @param startID if sequence does not exist, start at this ID - * @return 0 if not supported, otherwise a sequence id - */ - function GenID($seqname='adodbseq',$startID=1) - { - if (!$this->hasGenID) { - return 0; // formerly returns false pre 1.60 - } - - $getnext = sprintf($this->_genIDSQL,$seqname); - - $holdtransOK = $this->_transOK; - - $save_handler = $this->raiseErrorFn; - $this->raiseErrorFn = ''; - @($rs = $this->Execute($getnext)); - $this->raiseErrorFn = $save_handler; - - if (!$rs) { - $this->_transOK = $holdtransOK; //if the status was ok before reset - $createseq = $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); - $rs = $this->Execute($getnext); - } - if ($rs && !$rs->EOF) $this->genID = reset($rs->fields); - else $this->genID = 0; // false - - if ($rs) $rs->Close(); - - return $this->genID; - } - - /** - * @param $table string name of the table, not needed by all databases (eg. mysql), default '' - * @param $column string name of the column, not needed by all databases (eg. mysql), default '' - * @return the last inserted ID. Not all databases support this. - */ - function Insert_ID($table='',$column='') - { - if ($this->_logsql && $this->lastInsID) return $this->lastInsID; - if ($this->hasInsertID) return $this->_insertid($table,$column); - if ($this->debug) { - ADOConnection::outp( '

    Insert_ID error

    '); - adodb_backtrace(); - } - return false; - } - - - /** - * Portable Insert ID. Pablo Roca - * - * @return the last inserted ID. All databases support this. But aware possible - * problems in multiuser environments. Heavy test this before deploying. - */ - function PO_Insert_ID($table="", $id="") - { - if ($this->hasInsertID){ - return $this->Insert_ID($table,$id); - } else { - return $this->GetOne("SELECT MAX($id) FROM $table"); - } - } - - /** - * @return # rows affected by UPDATE/DELETE - */ - function Affected_Rows() - { - if ($this->hasAffectedRows) { - if ($this->fnExecute === 'adodb_log_sql') { - if ($this->_logsql && $this->_affected !== false) return $this->_affected; - } - $val = $this->_affectedrows(); - return ($val < 0) ? false : $val; - } - - if ($this->debug) ADOConnection::outp( '

    Affected_Rows error

    ',false); - return false; - } - - - /** - * @return the last error message - */ - function ErrorMsg() - { - if ($this->_errorMsg) return '!! '.strtoupper($this->dataProvider.' '.$this->databaseType).': '.$this->_errorMsg; - else return ''; - } - - - /** - * @return the last error number. Normally 0 means no error. - */ - function ErrorNo() - { - return ($this->_errorMsg) ? -1 : 0; - } - - function MetaError($err=false) - { - include_once(ADODB_DIR."/adodb-error.inc.php"); - if ($err === false) $err = $this->ErrorNo(); - return adodb_error($this->dataProvider,$this->databaseType,$err); - } - - function MetaErrorMsg($errno) - { - include_once(ADODB_DIR."/adodb-error.inc.php"); - return adodb_errormsg($errno); - } - - /** - * @returns an array with the primary key columns in it. - */ - function MetaPrimaryKeys($table, $owner=false) - { - // owner not used in base class - see oci8 - $p = array(); - $objs =& $this->MetaColumns($table); - if ($objs) { - foreach($objs as $v) { - if (!empty($v->primary_key)) - $p[] = $v->name; - } - } - if (sizeof($p)) return $p; - if (function_exists('ADODB_VIEW_PRIMARYKEYS')) - return ADODB_VIEW_PRIMARYKEYS($this->databaseType, $this->database, $table, $owner); - return false; - } - - /** - * @returns assoc array where keys are tables, and values are foreign keys - */ - function MetaForeignKeys($table, $owner=false, $upper=false) - { - return false; - } - /** - * Choose a database to connect to. Many databases do not support this. - * - * @param dbName is the name of the database to select - * @return true or false - */ - function SelectDB($dbName) - {return false;} - - - /** - * Will select, getting rows from $offset (1-based), for $nrows. - * This simulates the MySQL "select * from table limit $offset,$nrows" , and - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that - * MySQL and PostgreSQL parameter ordering is the opposite of the other. - * eg. - * SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) - * SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) - * - * Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) - * BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set - * - * @param sql - * @param [offset] is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to get - * @param [inputarr] array of bind variables - * @param [secs2cache] is a private parameter only used by jlim - * @return the recordset ($rs->databaseType == 'array') - */ - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($this->hasTop && $nrows > 0) { - // suggested by Reinhard Balling. Access requires top after distinct - // Informix requires first before distinct - F Riosa - $ismssql = (strpos($this->databaseType,'mssql') !== false); - if ($ismssql) $isaccess = false; - else $isaccess = (strpos($this->databaseType,'access') !== false); - - if ($offset <= 0) { - - // access includes ties in result - if ($isaccess) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - - if ($secs2cache != 0) { - $ret =& $this->CacheExecute($secs2cache, $sql,$inputarr); - } else { - $ret =& $this->Execute($sql,$inputarr); - } - return $ret; // PHP5 fix - } else if ($ismssql){ - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - } else { - $sql = preg_replace( - '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - } - } else { - $nn = $nrows + $offset; - if ($isaccess || $ismssql) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); - } else { - $sql = preg_replace( - '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); - } - } - } - - // if $offset>0, we want to skip rows, and $ADODB_COUNTRECS is set, we buffer rows - // 0 to offset-1 which will be discarded anyway. So we disable $ADODB_COUNTRECS. - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - if ($offset>0){ - if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - else $rs = &$this->Execute($sql,$inputarr); - } else { - if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - else $rs = &$this->Execute($sql,$inputarr); - } - $ADODB_COUNTRECS = $savec; - if ($rs && !$rs->EOF) { - $rs =& $this->_rs2rs($rs,$nrows,$offset); - } - //print_r($rs); - return $rs; - } - - /** - * Create serializable recordset. Breaks rs link to connection. - * - * @param rs the recordset to serialize - */ - function &SerializableRS(&$rs) - { - $rs2 =& $this->_rs2rs($rs); - $ignore = false; - $rs2->connection =& $ignore; - - return $rs2; - } - - /** - * Convert database recordset to an array recordset - * input recordset's cursor should be at beginning, and - * old $rs will be closed. - * - * @param rs the recordset to copy - * @param [nrows] number of rows to retrieve (optional) - * @param [offset] offset by number of rows (optional) - * @return the new recordset - */ - function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) - { - if (! $rs) { - $false = false; - return $false; - } - $dbtype = $rs->databaseType; - if (!$dbtype) { - $rs = &$rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1 -- why ? - return $rs; - } - if (($dbtype == 'array' || $dbtype == 'csv') && $nrows == -1 && $offset == -1) { - $rs->MoveFirst(); - $rs = &$rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1-- why ? - return $rs; - } - $flds = array(); - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { - $flds[] = $rs->FetchField($i); - } - - $arr =& $rs->GetArrayLimit($nrows,$offset); - //print_r($arr); - if ($close) $rs->Close(); - - $arrayClass = $this->arrayClass; - - $rs2 = new $arrayClass(); - $rs2->connection = &$this; - $rs2->sql = $rs->sql; - $rs2->dataProvider = $this->dataProvider; - $rs2->InitArrayFields($arr,$flds); - $rs2->fetchMode = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; - return $rs2; - } - - /* - * Return all rows. Compat with PEAR DB - */ - function &GetAll($sql, $inputarr=false) - { - $arr =& $this->GetArray($sql,$inputarr); - return $arr; - } - - function &GetAssoc($sql, $inputarr=false,$force_array = false, $first2cols = false) - { - $rs =& $this->Execute($sql, $inputarr); - if (!$rs) { - $false = false; - return $false; - } - $arr =& $rs->GetAssoc($force_array,$first2cols); - return $arr; - } - - function &CacheGetAssoc($secs2cache, $sql=false, $inputarr=false,$force_array = false, $first2cols = false) - { - if (!is_numeric($secs2cache)) { - $first2cols = $force_array; - $force_array = $inputarr; - } - $rs =& $this->CacheExecute($secs2cache, $sql, $inputarr); - if (!$rs) { - $false = false; - return $false; - } - $arr =& $rs->GetAssoc($force_array,$first2cols); - return $arr; - } - - /** - * Return first element of first row of sql statement. Recordset is disposed - * for you. - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function GetOne($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - $crecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - $ret = false; - $rs = &$this->Execute($sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - $ADODB_COUNTRECS = $crecs; - return $ret; - } - - function CacheGetOne($secs2cache,$sql=false,$inputarr=false) - { - $ret = false; - $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - - return $ret; - } - - function GetCol($sql, $inputarr = false, $trim = false) - { - $rv = false; - $rs = &$this->Execute($sql, $inputarr); - if ($rs) { - $rv = array(); - if ($trim) { - while (!$rs->EOF) { - $rv[] = trim(reset($rs->fields)); - $rs->MoveNext(); - } - } else { - while (!$rs->EOF) { - $rv[] = reset($rs->fields); - $rs->MoveNext(); - } - } - $rs->Close(); - } - return $rv; - } - - function CacheGetCol($secs, $sql = false, $inputarr = false,$trim=false) - { - $rv = false; - $rs = &$this->CacheExecute($secs, $sql, $inputarr); - if ($rs) { - if ($trim) { - while (!$rs->EOF) { - $rv[] = trim(reset($rs->fields)); - $rs->MoveNext(); - } - } else { - while (!$rs->EOF) { - $rv[] = reset($rs->fields); - $rs->MoveNext(); - } - } - $rs->Close(); - } - return $rv; - } - - function &Transpose(&$rs,$addfieldnames=true) - { - $rs2 =& $this->_rs2rs($rs); - $false = false; - if (!$rs2) return $false; - - $rs2->_transpose($addfieldnames); - return $rs2; - } - - /* - Calculate the offset of a date for a particular database and generate - appropriate SQL. Useful for calculating future/past dates and storing - in a database. - - If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour. - */ - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - return '('.$date.'+'.$dayFraction.')'; - } - - - /** - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function &GetArray($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $rs =& $this->Execute($sql,$inputarr); - $ADODB_COUNTRECS = $savec; - if (!$rs) - if (defined('ADODB_PEAR')) { - $cls = ADODB_PEAR_Error(); - return $cls; - } else { - $false = false; - return $false; - } - $arr =& $rs->GetArray(); - $rs->Close(); - return $arr; - } - - function &CacheGetAll($secs2cache,$sql=false,$inputarr=false) - { - $arr =& $this->CacheGetArray($secs2cache,$sql,$inputarr); - return $arr; - } - - function &CacheGetArray($secs2cache,$sql=false,$inputarr=false) - { - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $rs =& $this->CacheExecute($secs2cache,$sql,$inputarr); - $ADODB_COUNTRECS = $savec; - - if (!$rs) - if (defined('ADODB_PEAR')) { - $cls = ADODB_PEAR_Error(); - return $cls; - } else { - $false = false; - return $false; - } - $arr =& $rs->GetArray(); - $rs->Close(); - return $arr; - } - - - - /** - * Return one row of sql statement. Recordset is disposed for you. - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function &GetRow($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - $crecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - $rs =& $this->Execute($sql,$inputarr); - - $ADODB_COUNTRECS = $crecs; - if ($rs) { - if (!$rs->EOF) $arr = $rs->fields; - else $arr = array(); - $rs->Close(); - return $arr; - } - - $false = false; - return $false; - } - - function &CacheGetRow($secs2cache,$sql=false,$inputarr=false) - { - $rs =& $this->CacheExecute($secs2cache,$sql,$inputarr); - if ($rs) { - $arr = false; - if (!$rs->EOF) $arr = $rs->fields; - $rs->Close(); - return $arr; - } - $false = false; - return $false; - } - - /** - * Insert or replace a single record. Note: this is not the same as MySQL's replace. - * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. - * Also note that no table locking is done currently, so it is possible that the - * record be inserted twice by two programs... - * - * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); - * - * $table table name - * $fieldArray associative array of data (you must quote strings yourself). - * $keyCol the primary key field name or if compound key, array of field names - * autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers - * but does not work with dates nor SQL functions. - * has_autoinc the primary key is an auto-inc field, so skip in insert. - * - * Currently blob replace not supported - * - * returns 0 = fail, 1 = update, 2 = insert - */ - - function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - - return _adodb_replace($this, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc); - } - - - /** - * Will select, getting rows from $offset (1-based), for $nrows. - * This simulates the MySQL "select * from table limit $offset,$nrows" , and - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that - * MySQL and PostgreSQL parameter ordering is the opposite of the other. - * eg. - * CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) - * CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) - * - * BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set - * - * @param [secs2cache] seconds to cache data, set to 0 to force query. This is optional - * @param sql - * @param [offset] is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to get - * @param [inputarr] array of bind variables - * @return the recordset ($rs->databaseType == 'array') - */ - function &CacheSelectLimit($secs2cache,$sql,$nrows=-1,$offset=-1,$inputarr=false) - { - if (!is_numeric($secs2cache)) { - if ($sql === false) $sql = -1; - if ($offset == -1) $offset = false; - // sql, nrows, offset,inputarr - $rs =& $this->SelectLimit($secs2cache,$sql,$nrows,$offset,$this->cacheSecs); - } else { - if ($sql === false) ADOConnection::outp( "Warning: \$sql missing from CacheSelectLimit()"); - $rs =& $this->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - } - return $rs; - } - - - /** - * Flush cached recordsets that match a particular $sql statement. - * If $sql == false, then we purge all files in the cache. - */ - - /** - * Flush cached recordsets that match a particular $sql statement. - * If $sql == false, then we purge all files in the cache. - */ - function CacheFlush($sql=false,$inputarr=false) - { - global $ADODB_CACHE_DIR; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - - $key = false; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true); - FlushMemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug); - return; - } - - if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) { - /*if (strncmp(PHP_OS,'WIN',3) === 0) - $dir = str_replace('/', '\\', $ADODB_CACHE_DIR); - else */ - $dir = $ADODB_CACHE_DIR; - - if ($this->debug) { - ADOConnection::outp( "CacheFlush: $dir
    \n", $this->_dirFlush($dir),"
    "); - } else { - $this->_dirFlush($dir); - } - return; - } - - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - - $f = $this->_gencachename($sql.serialize($inputarr),false); - adodb_write_file($f,''); // is adodb_write_file needed? - if (!@unlink($f)) { - if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f"); - } - } - - /** - * Private function to erase all of the files and subdirectories in a directory. - * - * Just specify the directory, and tell it if you want to delete the directory or just clear it out. - * Note: $kill_top_level is used internally in the function to flush subdirectories. - */ - function _dirFlush($dir, $kill_top_level = false) { - if(!$dh = @opendir($dir)) return; - - while (($obj = readdir($dh))) { - if($obj=='.' || $obj=='..') - continue; - - if (!@unlink($dir.'/'.$obj)) - $this->_dirFlush($dir.'/'.$obj, true); - } - if ($kill_top_level === true) - @rmdir($dir); - return true; - } - - - function xCacheFlush($sql=false,$inputarr=false) - { - global $ADODB_CACHE_DIR; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - $key = false; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true); - flushmemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug); - return; - } - - if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) { - if (strncmp(PHP_OS,'WIN',3) === 0) { - $cmd = 'del /s '.str_replace('/','\\',$ADODB_CACHE_DIR).'\adodb_*.cache'; - } else { - //$cmd = 'find "'.$ADODB_CACHE_DIR.'" -type f -maxdepth 1 -print0 | xargs -0 rm -f'; - $cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; - // old version 'rm -f `find '.$ADODB_CACHE_DIR.' -name adodb_*.cache`'; - } - if ($this->debug) { - ADOConnection::outp( "CacheFlush: $cmd
    \n", system($cmd),"
    "); - } else { - exec($cmd); - } - return; - } - - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - - $f = $this->_gencachename($sql.serialize($inputarr),false); - adodb_write_file($f,''); // is adodb_write_file needed? - if (!@unlink($f)) { - if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f"); - } - } - - /** - * Private function to generate filename for caching. - * Filename is generated based on: - * - * - sql statement - * - database type (oci8, ibase, ifx, etc) - * - database name - * - userid - * - setFetchMode (adodb 4.23) - * - * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). - * Assuming that we can have 50,000 files per directory with good performance, - * then we can scale to 12.8 million unique cached recordsets. Wow! - */ - function _gencachename($sql,$createdir,$memcache=false) - { - global $ADODB_CACHE_DIR; - static $notSafeMode; - - if ($this->fetchMode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } else { - $mode = $this->fetchMode; - } - $m = md5($sql.$this->databaseType.$this->database.$this->user.$mode); - if ($memcache) return $m; - - if (!isset($notSafeMode)) $notSafeMode = !ini_get('safe_mode'); - $dir = ($notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($m,0,2) : $ADODB_CACHE_DIR; - - if ($createdir && $notSafeMode && !file_exists($dir)) { - $oldu = umask(0); - if (!mkdir($dir,0771)) - if ($this->debug) ADOConnection::outp( "Unable to mkdir $dir for $sql"); - umask($oldu); - } - return $dir.'/adodb_'.$m.'.cache'; - } - - - /** - * Execute SQL, caching recordsets. - * - * @param [secs2cache] seconds to cache data, set to 0 to force query. - * This is an optional parameter. - * @param sql SQL statement to execute - * @param [inputarr] holds the input data to bind to - * @return RecordSet or false - */ - function &CacheExecute($secs2cache,$sql=false,$inputarr=false) - { - - - if (!is_numeric($secs2cache)) { - $inputarr = $sql; - $sql = $secs2cache; - $secs2cache = $this->cacheSecs; - } - - if (is_array($sql)) { - $sqlparam = $sql; - $sql = $sql[0]; - } else - $sqlparam = $sql; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - $md5file = $this->_gencachename($sql.serialize($inputarr),false,true); - } else { - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - $md5file = $this->_gencachename($sql.serialize($inputarr),true); - } - - $err = ''; - - if ($secs2cache > 0){ - if ($this->memCache) - $rs = &getmemCache($md5file,$err,$secs2cache, $this->memCacheHost, $this->memCachePort); - else - $rs = &csv2rs($md5file,$err,$secs2cache,$this->arrayClass); - $this->numCacheHits += 1; - } else { - $err='Timeout 1'; - $rs = false; - $this->numCacheMisses += 1; - } - if (!$rs) { - // no cached rs found - if ($this->debug) { - if (get_magic_quotes_runtime() && !$this->memCache) { - ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :("); - } - if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)"); - } - - $rs = &$this->Execute($sqlparam,$inputarr); - - if ($rs && $this->memCache) { - $rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately - if(!putmemCache($md5file, $rs, $this->memCacheHost, $this->memCachePort, $this->memCacheCompress, $this->debug)) { - if ($fn = $this->raiseErrorFn) - $fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this); - if ($this->debug) ADOConnection::outp( " Cache write error"); - } - } else - if ($rs) { - $eof = $rs->EOF; - $rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately - $txt = _rs2serialize($rs,false,$sql); // serialize - - if (!adodb_write_file($md5file,$txt,$this->debug)) { - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this); - } - if ($this->debug) ADOConnection::outp( " Cache write error"); - } - if ($rs->EOF && !$eof) { - $rs->MoveFirst(); - //$rs = &csv2rs($md5file,$err); - $rs->connection = &$this; // Pablo suggestion - } - - } else - if (!$this->memCache) - @unlink($md5file); - } else { - $this->_errorMsg = ''; - $this->_errorCode = 0; - - if ($this->fnCacheExecute) { - $fn = $this->fnCacheExecute; - $fn($this, $secs2cache, $sql, $inputarr); - } - // ok, set cached object found - $rs->connection = &$this; // Pablo suggestion - if ($this->debug){ - - $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); - $ttl = $rs->timeCreated + $secs2cache - time(); - $s = is_array($sql) ? $sql[0] : $sql; - if ($inBrowser) $s = ''.htmlspecialchars($s).''; - - ADOConnection::outp( " $md5file reloaded, ttl=$ttl [ $s ]"); - } - } - return $rs; - } - - - /* - Similar to PEAR DB's autoExecute(), except that - $mode can be 'INSERT' or 'UPDATE' or DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE - If $mode == 'UPDATE', then $where is compulsory as a safety measure. - - $forceUpdate means that even if the data has not changed, perform update. - */ - function& AutoExecute($table, $fields_values, $mode = 'INSERT', $where = FALSE, $forceUpdate=true, $magicq=false) - { - $false = false; - $sql = 'SELECT * FROM '.$table; - if ($where!==FALSE) $sql .= ' WHERE '.$where; - else if ($mode == 'UPDATE' || $mode == 2 /* DB_AUTOQUERY_UPDATE */) { - ADOConnection::outp('AutoExecute: Illegal mode=UPDATE with empty WHERE clause'); - return $false; - } - - $rs =& $this->SelectLimit($sql,1); - if (!$rs) return $false; // table does not exist - $rs->tableName = $table; - - switch((string) $mode) { - case 'UPDATE': - case '2': - $sql = $this->GetUpdateSQL($rs, $fields_values, $forceUpdate, $magicq); - break; - case 'INSERT': - case '1': - $sql = $this->GetInsertSQL($rs, $fields_values, $magicq); - break; - default: - ADOConnection::outp("AutoExecute: Unknown mode=$mode"); - return $false; - } - $ret = false; - if ($sql) $ret = $this->Execute($sql); - if ($ret) $ret = true; - return $ret; - } - - - /** - * Generates an Update Query based on an existing recordset. - * $arrFields is an associative array of fields with the value - * that should be assigned. - * - * Note: This function should only be used on a recordset - * that is run against a single table and sql should only - * be a simple select stmt with no groupby/orderby/limit - * - * "Jonathan Younger" - */ - function GetUpdateSQL(&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=null) - { - global $ADODB_INCLUDED_LIB; - - //********************************************************// - //This is here to maintain compatibility - //with older adodb versions. Sets force type to force nulls if $forcenulls is set. - if (!isset($force)) { - global $ADODB_FORCE_TYPE; - $force = $ADODB_FORCE_TYPE; - } - //********************************************************// - - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getupdatesql($this,$rs,$arrFields,$forceUpdate,$magicq,$force); - } - - /** - * Generates an Insert Query based on an existing recordset. - * $arrFields is an associative array of fields with the value - * that should be assigned. - * - * Note: This function should only be used on a recordset - * that is run against a single table. - */ - function GetInsertSQL(&$rs, $arrFields,$magicq=false,$force=null) - { - global $ADODB_INCLUDED_LIB; - if (!isset($force)) { - global $ADODB_FORCE_TYPE; - $force = $ADODB_FORCE_TYPE; - - } - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getinsertsql($this,$rs,$arrFields,$magicq,$force); - } - - - /** - * Update a blob column, given a where clause. There are more sophisticated - * blob handling functions that we could have implemented, but all require - * a very complex API. Instead we have chosen something that is extremely - * simple to understand and use. - * - * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. - * - * Usage to update a $blobvalue which has a primary key blob_id=1 into a - * field blobtable.blobcolumn: - * - * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); - * - * Insert example: - * - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - /** - * Usage: - * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); - * - * $blobtype supports 'BLOB' and 'CLOB' - * - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); - */ - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - $fd = fopen($path,'rb'); - if ($fd === false) return false; - $val = fread($fd,filesize($path)); - fclose($fd); - return $this->UpdateBlob($table,$column,$val,$where,$blobtype); - } - - function BlobDecode($blob) - { - return $blob; - } - - function BlobEncode($blob) - { - return $blob; - } - - function SetCharSet($charset) - { - return false; - } - - function IfNull( $field, $ifNull ) - { - return " CASE WHEN $field is null THEN $ifNull ELSE $field END "; - } - - function LogSQL($enable=true) - { - include_once(ADODB_DIR.'/adodb-perf.inc.php'); - - if ($enable) $this->fnExecute = 'adodb_log_sql'; - else $this->fnExecute = false; - - $old = $this->_logsql; - $this->_logsql = $enable; - if ($enable && !$old) $this->_affected = false; - return $old; - } - - function GetCharSet() - { - return false; - } - - /** - * Usage: - * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); - * - * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); - * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); - */ - function UpdateClob($table,$column,$val,$where) - { - return $this->UpdateBlob($table,$column,$val,$where,'CLOB'); - } - - // not the fastest implementation - quick and dirty - jlim - // for best performance, use the actual $rs->MetaType(). - function MetaType($t,$len=-1,$fieldobj=false) - { - - if (empty($this->_metars)) { - $rsclass = $this->rsPrefix.$this->databaseType; - $this->_metars = new $rsclass(false,$this->fetchMode); - $this->_metars->connection =& $this; - } - return $this->_metars->MetaType($t,$len,$fieldobj); - } - - - /** - * Change the SQL connection locale to a specified locale. - * This is used to get the date formats written depending on the client locale. - */ - function SetDateLocale($locale = 'En') - { - $this->locale = $locale; - switch (strtoupper($locale)) - { - case 'EN': - $this->fmtDate="'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - break; - - case 'US': - $this->fmtDate = "'m-d-Y'"; - $this->fmtTimeStamp = "'m-d-Y H:i:s'"; - break; - - case 'PT_BR': - case 'NL': - case 'FR': - case 'RO': - case 'IT': - $this->fmtDate="'d-m-Y'"; - $this->fmtTimeStamp = "'d-m-Y H:i:s'"; - break; - - case 'GE': - $this->fmtDate="'d.m.Y'"; - $this->fmtTimeStamp = "'d.m.Y H:i:s'"; - break; - - default: - $this->fmtDate="'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - break; - } - } - - function &GetActiveRecordsClass($class, $table,$whereOrderBy=false,$bindarr=false, $primkeyArr=false) - { - global $_ADODB_ACTIVE_DBS; - - $save = $this->SetFetchMode(ADODB_FETCH_NUM); - if (empty($whereOrderBy)) $whereOrderBy = '1=1'; - $rows = $this->GetAll("select * from ".$table.' WHERE '.$whereOrderBy,$bindarr); - $this->SetFetchMode($save); - - $false = false; - - if ($rows === false) { - return $false; - } - - - if (!isset($_ADODB_ACTIVE_DBS)) { - include(ADODB_DIR.'/adodb-active-record.inc.php'); - } - if (!class_exists($class)) { - ADOConnection::outp("Unknown class $class in GetActiveRcordsClass()"); - return $false; - } - $arr = array(); - foreach($rows as $row) { - - $obj = new $class($table,$primkeyArr,$this); - if ($obj->ErrorMsg()){ - $this->_errorMsg = $obj->ErrorMsg(); - return $false; - } - $obj->Set($row); - $arr[] = $obj; - } - return $arr; - } - - function &GetActiveRecords($table,$where=false,$bindarr=false,$primkeyArr=false) - { - $arr =& $this->GetActiveRecordsClass('ADODB_Active_Record', $table, $where, $bindarr, $primkeyArr); - return $arr; - } - - /** - * Close Connection - */ - function Close() - { - $rez = $this->_close(); - $this->_connectionID = false; - return $rez; - } - - /** - * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans(). - * - * @return true if succeeded or false if database does not support transactions - */ - function BeginTrans() - { - if ($this->debug) ADOConnection::outp("BeginTrans: Transactions not supported for this driver"); - return false; - } - - /* set transaction mode */ - function SetTransactionMode( $transaction_mode ) - { - $transaction_mode = $this->MetaTransaction($transaction_mode, $this->dataProvider); - $this->_transmode = $transaction_mode; - } -/* -http://msdn2.microsoft.com/en-US/ms173763.aspx -http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-isolation.html -http://www.postgresql.org/docs/8.1/interactive/sql-set-transaction.html -http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_10005.htm -*/ - function MetaTransaction($mode,$db) - { - $mode = strtoupper($mode); - $mode = str_replace('ISOLATION LEVEL ','',$mode); - - switch($mode) { - - case 'READ UNCOMMITTED': - switch($db) { - case 'oci8': - case 'oracle': - return 'ISOLATION LEVEL READ COMMITTED'; - default: - return 'ISOLATION LEVEL READ UNCOMMITTED'; - } - break; - - case 'READ COMMITTED': - return 'ISOLATION LEVEL READ COMMITTED'; - break; - - case 'REPEATABLE READ': - switch($db) { - case 'oci8': - case 'oracle': - return 'ISOLATION LEVEL SERIALIZABLE'; - default: - return 'ISOLATION LEVEL REPEATABLE READ'; - } - break; - - case 'SERIALIZABLE': - return 'ISOLATION LEVEL SERIALIZABLE'; - break; - - default: - return $mode; - } - } - - /** - * If database does not support transactions, always return true as data always commited - * - * @param $ok set to false to rollback transaction, true to commit - * - * @return true/false. - */ - function CommitTrans($ok=true) - { return true;} - - - /** - * If database does not support transactions, rollbacks always fail, so return false - * - * @return true/false. - */ - function RollbackTrans() - { return false;} - - - /** - * return the databases that the driver can connect to. - * Some databases will return an empty array. - * - * @return an array of database names. - */ - function MetaDatabases() - { - global $ADODB_FETCH_MODE; - - if ($this->metaDatabasesSQL) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $arr = $this->GetCol($this->metaDatabasesSQL); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - return $arr; - } - - return false; - } - - - /** - * @param ttype can either be 'VIEW' or 'TABLE' or false. - * If false, both views and tables are returned. - * "VIEW" returns only views - * "TABLE" returns only tables - * @param showSchema returns the schema/user with the table name, eg. USER.TABLE - * @param mask is the input mask - only supported by oci8 and postgresql - * - * @return array of tables for current database. - */ - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - global $ADODB_FETCH_MODE; - - - $false = false; - if ($mask) { - return $false; - } - if ($this->metaTablesSQL) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute($this->metaTablesSQL); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) return $false; - $arr =& $rs->GetArray(); - $arr2 = array(); - - if ($hast = ($ttype && isset($arr[0][1]))) { - $showt = strncmp($ttype,'T',1); - } - - for ($i=0; $i < sizeof($arr); $i++) { - if ($hast) { - if ($showt == 0) { - if (strncmp($arr[$i][1],'T',1) == 0) $arr2[] = trim($arr[$i][0]); - } else { - if (strncmp($arr[$i][1],'V',1) == 0) $arr2[] = trim($arr[$i][0]); - } - } else - $arr2[] = trim($arr[$i][0]); - } - $rs->Close(); - return $arr2; - } - return $false; - } - - - function _findschema(&$table,&$schema) - { - if (!$schema && ($at = strpos($table,'.')) !== false) { - $schema = substr($table,0,$at); - $table = substr($table,$at+1); - } - } - - /** - * List columns in a database as an array of ADOFieldObjects. - * See top of file for definition of object. - * - * @param $table table name to query - * @param $normalize makes table name case-insensitive (required by some databases) - * @schema is optional database schema to use - not supported by all databases. - * - * @return array of ADOFieldObjects for current table. - */ - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $false = false; - - if (!empty($this->metaColumnsSQL)) { - - $schema = false; - $this->_findschema($table,$schema); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,($normalize)?strtoupper($table):$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs === false || $rs->EOF) return $false; - - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - if (isset($rs->fields[3]) && $rs->fields[3]) { - if ($rs->fields[3]>0) $fld->max_length = $rs->fields[3]; - $fld->scale = $rs->fields[4]; - if ($fld->scale>0) $fld->max_length += 1; - } else - $fld->max_length = $rs->fields[2]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return $false; - } - - /** - * List indexes on a table as an array. - * @param table table name to query - * @param primary true to only show primary keys. Not actually used for most databases - * - * @return array of indexes on current table. Each element represents an index, and is itself an associative array. - - Array ( - [name_of_index] => Array - ( - [unique] => true or false - [columns] => Array - ( - [0] => firstname - [1] => lastname - ) - ) - */ - function &MetaIndexes($table, $primary = false, $owner = false) - { - $false = false; - return $false; - } - - /** - * List columns names in a table as an array. - * @param table table name to query - * - * @return array of column names for current table. - */ - function &MetaColumnNames($table, $numIndexes=false,$useattnum=false /* only for postgres */) - { - $objarr =& $this->MetaColumns($table); - if (!is_array($objarr)) { - $false = false; - return $false; - } - $arr = array(); - if ($numIndexes) { - $i = 0; - if ($useattnum) { - foreach($objarr as $v) - $arr[$v->attnum] = $v->name; - - } else - foreach($objarr as $v) $arr[$i++] = $v->name; - } else - foreach($objarr as $v) $arr[strtoupper($v->name)] = $v->name; - - return $arr; - } - - /** - * Different SQL databases used different methods to combine strings together. - * This function provides a wrapper. - * - * param s variable number of string parameters - * - * Usage: $db->Concat($str1,$str2); - * - * @return concatenated string - */ - function Concat() - { - $arr = func_get_args(); - return implode($this->concat_operator, $arr); - } - - - /** - * Converts a date "d" to a string that the database can understand. - * - * @param d a date in Unix date time format. - * - * @return date string in database date format - */ - function DBDate($d) - { - if (empty($d) && $d !== 0) return 'null'; - - if (is_string($d) && !is_numeric($d)) { - if ($d === 'null' || strncmp($d,"'",1) === 0) return $d; - if ($this->isoDates) return "'$d'"; - $d = ADOConnection::UnixDate($d); - } - - return adodb_date($this->fmtDate,$d); - } - - function BindDate($d) - { - $d = $this->DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = $this->DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - - /** - * Converts a timestamp "ts" to a string that the database can understand. - * - * @param ts a timestamp in Unix date time format. - * - * @return timestamp string in database timestamp format - */ - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - - # strlen(14) allows YYYYMMDDHHMMSS format - if (!is_string($ts) || (is_numeric($ts) && strlen($ts)<14)) - return adodb_date($this->fmtTimeStamp,$ts); - - if ($ts === 'null') return $ts; - if ($this->isoDates && strlen($ts) !== 14) return "'$ts'"; - - $ts = ADOConnection::UnixTimeStamp($ts); - return adodb_date($this->fmtTimeStamp,$ts); - } - - /** - * Also in ADORecordSet. - * @param $v is a date string in YYYY-MM-DD format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixDate($v) - { - if (is_object($v)) { - // odbtp support - //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) - return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); - } - - if (is_numeric($v) && strlen($v) !== 8) return $v; - if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", - ($v), $rr)) return false; - - if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0; - // h-m-s-MM-DD-YY - return @adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); - } - - - /** - * Also in ADORecordSet. - * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixTimeStamp($v) - { - if (is_object($v)) { - // odbtp support - //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) - return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); - } - - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ ,-]*(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($v), $rr)) return false; - - if ($rr[1] <= TIMESTAMP_FIRST_YEAR && $rr[2]<= 1) return 0; - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) return adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); - return @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]); - } - - /** - * Also in ADORecordSet. - * - * Format database date based on user defined format. - * - * @param v is the character date in YYYY-MM-DD format, returned by database - * @param fmt is the format to apply to it, using date() - * - * @return a date formated as user desires - */ - - function UserDate($v,$fmt='Y-m-d',$gmt=false) - { - $tt = $this->UnixDate($v); - - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - else if ($tt == 0) return $this->emptyDate; - else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR - } - - return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); - - } - - /** - * - * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format - * @param fmt is the format to apply to it, using date() - * - * @return a timestamp formated as user desires - */ - function UserTimeStamp($v,$fmt='Y-m-d H:i:s',$gmt=false) - { - if (!isset($v)) return $this->emptyTimeStamp; - # strlen(14) allows YYYYMMDDHHMMSS format - if (is_numeric($v) && strlen($v)<14) return ($gmt) ? adodb_gmdate($fmt,$v) : adodb_date($fmt,$v); - $tt = $this->UnixTimeStamp($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - if ($tt == 0) return $this->emptyTimeStamp; - return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); - } - - function escape($s,$magic_quotes=false) - { - return $this->addq($s,$magic_quotes); - } - - /** - * Quotes a string, without prefixing nor appending quotes. - */ - function addq($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if ($this->replaceQuote[0] == '\\'){ - // only since php 4.0.5 - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); - } - return str_replace("'",$this->replaceQuote,$s); - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything - return $s; - else {// change \' to '' for sybase/mssql - $s = str_replace('\\\\','\\',$s); - return str_replace("\\'",$this->replaceQuote,$s); - } - } - - /** - * Correctly quotes a string so that all strings are escaped. We prefix and append - * to the string single-quotes. - * An example is $db->qstr("Don't bother",magic_quotes_runtime()); - * - * @param s the string to quote - * @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). - * This undoes the stupidity of magic quotes for GPC. - * - * @return quoted string to be sent back to database - */ - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if ($this->replaceQuote[0] == '\\'){ - // only since php 4.0.5 - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything - return "'$s'"; - else {// change \' to '' for sybase/mssql - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - } - } - - - /** - * Will select the supplied $page number from a recordset, given that it is paginated in pages of - * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. - * - * See readme.htm#ex8 for an example of usage. - * - * @param sql - * @param nrows is the number of rows per page to get - * @param page is the page number to get (1-based) - * @param [inputarr] array of bind variables - * @param [secs2cache] is a private parameter only used by jlim - * @return the recordset ($rs->databaseType == 'array') - * - * NOTE: phpLens uses a different algorithm and does not use PageExecute(). - * - */ - function &PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - if ($this->pageExecuteCountRows) $rs =& _adodb_pageexecute_all_rows($this, $sql, $nrows, $page, $inputarr, $secs2cache); - else $rs =& _adodb_pageexecute_no_last_page($this, $sql, $nrows, $page, $inputarr, $secs2cache); - return $rs; - } - - - /** - * Will select the supplied $page number from a recordset, given that it is paginated in pages of - * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. - * - * @param secs2cache seconds to cache data, set to 0 to force query - * @param sql - * @param nrows is the number of rows per page to get - * @param page is the page number to get (1-based) - * @param [inputarr] array of bind variables - * @return the recordset ($rs->databaseType == 'array') - */ - function &CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) - { - /*switch($this->dataProvider) { - case 'postgres': - case 'mysql': - break; - default: $secs2cache = 0; break; - }*/ - $rs =& $this->PageExecute($sql,$nrows,$page,$inputarr,$secs2cache); - return $rs; - } - -} // end class ADOConnection - - - - //============================================================================================== - // CLASS ADOFetchObj - //============================================================================================== - - /** - * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). - */ - class ADOFetchObj { - }; - - //============================================================================================== - // CLASS ADORecordSet_empty - //============================================================================================== - - /** - * Lightweight recordset when there are no records to be returned - */ - class ADORecordSet_empty - { - var $dataProvider = 'empty'; - var $databaseType = false; - var $EOF = true; - var $_numOfRows = 0; - var $fields = false; - var $connection = false; - function RowCount() {return 0;} - function RecordCount() {return 0;} - function PO_RecordCount(){return 0;} - function Close(){return true;} - function FetchRow() {return false;} - function FieldCount(){ return 0;} - function Init() {} - } - - //============================================================================================== - // DATE AND TIME FUNCTIONS - //============================================================================================== - if (!defined('ADODB_DATE_VERSION')) include(ADODB_DIR.'/adodb-time.inc.php'); - - //============================================================================================== - // CLASS ADORecordSet - //============================================================================================== - - if (PHP_VERSION < 5) include_once(ADODB_DIR.'/adodb-php4.inc.php'); - else include_once(ADODB_DIR.'/adodb-iterator.inc.php'); - /** - * RecordSet class that represents the dataset returned by the database. - * To keep memory overhead low, this class holds only the current row in memory. - * No prefetching of data is done, so the RecordCount() can return -1 ( which - * means recordcount not known). - */ - class ADORecordSet extends ADODB_BASE_RS { - /* - * public variables - */ - var $dataProvider = "native"; - var $fields = false; /// holds the current row data - var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob - /// in other words, we use a text area for editing. - var $canSeek = false; /// indicates that seek is supported - var $sql; /// sql text - var $EOF = false; /// Indicates that the current record position is after the last record in a Recordset object. - - var $emptyTimeStamp = ' '; /// what to display when $time==0 - var $emptyDate = ' '; /// what to display when $time==0 - var $debug = false; - var $timeCreated=0; /// datetime in Unix format rs created -- for cached recordsets - - var $bind = false; /// used by Fields() to hold array - should be private? - var $fetchMode; /// default fetch mode - var $connection = false; /// the parent connection - /* - * private variables - */ - var $_numOfRows = -1; /** number of rows, or -1 */ - var $_numOfFields = -1; /** number of fields in recordset */ - var $_queryID = -1; /** This variable keeps the result link identifier. */ - var $_currentRow = -1; /** This variable keeps the current row in the Recordset. */ - var $_closed = false; /** has recordset been closed */ - var $_inited = false; /** Init() should only be called once */ - var $_obj; /** Used by FetchObj */ - var $_names; /** Used by FetchObj */ - - var $_currentPage = -1; /** Added by Ivn Oliva to implement recordset pagination */ - var $_atFirstPage = false; /** Added by Ivn Oliva to implement recordset pagination */ - var $_atLastPage = false; /** Added by Ivn Oliva to implement recordset pagination */ - var $_lastPageNo = -1; - var $_maxRecordCount = 0; - var $datetime = false; - - /** - * Constructor - * - * @param queryID this is the queryID returned by ADOConnection->_query() - * - */ - function ADORecordSet($queryID) - { - $this->_queryID = $queryID; - } - - - - function Init() - { - if ($this->_inited) return; - $this->_inited = true; - if ($this->_queryID) @$this->_initrs(); - else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - } - if ($this->_numOfRows != 0 && $this->_numOfFields && $this->_currentRow == -1) { - - $this->_currentRow = 0; - if ($this->EOF = ($this->_fetch() === false)) { - $this->_numOfRows = 0; // _numOfRows could be -1 - } - } else { - $this->EOF = true; - } - } - - - /** - * Generate a SELECT tag string from a recordset, and return the string. - * If the recordset has 2 cols, we treat the 1st col as the containing - * the text to display to the user, and 2nd col as the return value. Default - * strings are compared with the FIRST column. - * - * @param name name of SELECT tag - * @param [defstr] the value to hilite. Use an array for multiple hilites for listbox. - * @param [blank1stItem] true to leave the 1st item in list empty - * @param [multiple] true for listbox, false for popup - * @param [size] #rows to show for listbox. not used by popup - * @param [selectAttr] additional attributes to defined for SELECT tag. - * useful for holding javascript onChange='...' handlers. - & @param [compareFields0] when we have 2 cols in recordset, we compare the defstr with - * column 0 (1st col) if this is true. This is not documented. - * - * @return HTML - * - * changes by glen.davies@cce.ac.nz to support multiple hilited items - */ - function GetMenu($name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getmenu($this, $name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,$compareFields0); - } - - - - /** - * Generate a SELECT tag string from a recordset, and return the string. - * If the recordset has 2 cols, we treat the 1st col as the containing - * the text to display to the user, and 2nd col as the return value. Default - * strings are compared with the SECOND column. - * - */ - function GetMenu2($name,$defstr='',$blank1stItem=true,$multiple=false,$size=0, $selectAttr='') - { - return $this->GetMenu($name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,false); - } - - /* - Grouped Menu - */ - function GetMenu3($name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='') - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getmenu_gp($this, $name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,false); - } - - /** - * return recordset as a 2-dimensional array. - * - * @param [nRows] is the number of rows to return. -1 means every row. - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetArray($nRows = -1) - { - global $ADODB_EXTENSION; if ($ADODB_EXTENSION) { - $results = adodb_getall($this,$nRows); - return $results; - } - $results = array(); - $cnt = 0; - while (!$this->EOF && $nRows != $cnt) { - $results[] = $this->fields; - $this->MoveNext(); - $cnt++; - } - return $results; - } - - function &GetAll($nRows = -1) - { - $arr =& $this->GetArray($nRows); - return $arr; - } - - /* - * Some databases allow multiple recordsets to be returned. This function - * will return true if there is a next recordset, or false if no more. - */ - function NextRecordSet() - { - return false; - } - - /** - * return recordset as a 2-dimensional array. - * Helper function for ADOConnection->SelectLimit() - * - * @param offset is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to return - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr =& $this->GetArray($nrows); - return $arr; - } - - $this->Move($offset); - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - /** - * Synonym for GetArray() for compatibility with ADO. - * - * @param [nRows] is the number of rows to return. -1 means every row. - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetRows($nRows = -1) - { - $arr =& $this->GetArray($nRows); - return $arr; - } - - /** - * return whole recordset as a 2-dimensional associative array if there are more than 2 columns. - * The first column is treated as the key and is not included in the array. - * If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless - * $force_array == true. - * - * @param [force_array] has only meaning if we have 2 data columns. If false, a 1 dimensional - * array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing, - * read the source. - * - * @param [first2cols] means if there are more than 2 cols, ignore the remaining cols and - * instead of returning array[col0] => array(remaining cols), return array[col0] => col1 - * - * @return an associative array indexed by the first column of the array, - * or false if the data has less than 2 cols. - */ - function &GetAssoc($force_array = false, $first2cols = false) - { - global $ADODB_EXTENSION; - - $cols = $this->_numOfFields; - if ($cols < 2) { - $false = false; - return $false; - } - $numIndex = isset($this->fields[0]); - $results = array(); - - if (!$first2cols && ($cols > 2 || $force_array)) { - if ($ADODB_EXTENSION) { - if ($numIndex) { - while (!$this->EOF) { - $results[trim($this->fields[0])] = array_slice($this->fields, 1); - adodb_movenext($this); - } - } else { - while (!$this->EOF) { - // Fix for array_slice re-numbering numeric associative keys - $keys = array_slice(array_keys($this->fields), 1); - $sliced_array = array(); - - foreach($keys as $key) { - $sliced_array[$key] = $this->fields[$key]; - } - - $results[trim(reset($this->fields))] = $sliced_array; - adodb_movenext($this); - } - } - } else { - if ($numIndex) { - while (!$this->EOF) { - $results[trim($this->fields[0])] = array_slice($this->fields, 1); - $this->MoveNext(); - } - } else { - while (!$this->EOF) { - // Fix for array_slice re-numbering numeric associative keys - $keys = array_slice(array_keys($this->fields), 1); - $sliced_array = array(); - - foreach($keys as $key) { - $sliced_array[$key] = $this->fields[$key]; - } - - $results[trim(reset($this->fields))] = $sliced_array; - $this->MoveNext(); - } - } - } - } else { - if ($ADODB_EXTENSION) { - // return scalar values - if ($numIndex) { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $results[trim(($this->fields[0]))] = $this->fields[1]; - adodb_movenext($this); - } - } else { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $v1 = trim(reset($this->fields)); - $v2 = ''.next($this->fields); - $results[$v1] = $v2; - adodb_movenext($this); - } - } - } else { - if ($numIndex) { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $results[trim(($this->fields[0]))] = $this->fields[1]; - $this->MoveNext(); - } - } else { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $v1 = trim(reset($this->fields)); - $v2 = ''.next($this->fields); - $results[$v1] = $v2; - $this->MoveNext(); - } - } - } - } - - $ref =& $results; # workaround accelerator incompat with PHP 4.4 :( - return $ref; - } - - - /** - * - * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format - * @param fmt is the format to apply to it, using date() - * - * @return a timestamp formated as user desires - */ - function UserTimeStamp($v,$fmt='Y-m-d H:i:s') - { - if (is_numeric($v) && strlen($v)<14) return adodb_date($fmt,$v); - $tt = $this->UnixTimeStamp($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - if ($tt === 0) return $this->emptyTimeStamp; - return adodb_date($fmt,$tt); - } - - - /** - * @param v is the character date in YYYY-MM-DD format, returned by database - * @param fmt is the format to apply to it, using date() - * - * @return a date formated as user desires - */ - function UserDate($v,$fmt='Y-m-d') - { - $tt = $this->UnixDate($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - else if ($tt == 0) return $this->emptyDate; - else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR - } - return adodb_date($fmt,$tt); - } - - - /** - * @param $v is a date string in YYYY-MM-DD format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixDate($v) - { - return ADOConnection::UnixDate($v); - } - - - /** - * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixTimeStamp($v) - { - return ADOConnection::UnixTimeStamp($v); - } - - - /** - * PEAR DB Compat - do not use internally - */ - function Free() - { - return $this->Close(); - } - - - /** - * PEAR DB compat, number of rows - */ - function NumRows() - { - return $this->_numOfRows; - } - - - /** - * PEAR DB compat, number of cols - */ - function NumCols() - { - return $this->_numOfFields; - } - - /** - * Fetch a row, returning false if no more rows. - * This is PEAR DB compat mode. - * - * @return false or array containing the current record - */ - function &FetchRow() - { - if ($this->EOF) { - $false = false; - return $false; - } - $arr = $this->fields; - $this->_currentRow++; - if (!$this->_fetch()) $this->EOF = true; - return $arr; - } - - - /** - * Fetch a row, returning PEAR_Error if no more rows. - * This is PEAR DB compat mode. - * - * @return DB_OK or error object - */ - function FetchInto(&$arr) - { - if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false; - $arr = $this->fields; - $this->MoveNext(); - return 1; // DB_OK - } - - - /** - * Move to the first row in the recordset. Many databases do NOT support this. - * - * @return true or false - */ - function MoveFirst() - { - if ($this->_currentRow == 0) return true; - return $this->Move(0); - } - - - /** - * Move to the last row in the recordset. - * - * @return true or false - */ - function MoveLast() - { - if ($this->_numOfRows >= 0) return $this->Move($this->_numOfRows-1); - if ($this->EOF) return false; - while (!$this->EOF) { - $f = $this->fields; - $this->MoveNext(); - } - $this->fields = $f; - $this->EOF = false; - return true; - } - - - /** - * Move to next record in the recordset. - * - * @return true if there still rows available, or false if there are no more rows (EOF). - */ - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_fetch()) return true; - } - $this->EOF = true; - /* -- tested error handling when scrolling cursor -- seems useless. - $conn = $this->connection; - if ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) { - $fn = $conn->raiseErrorFn; - $fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database); - } - */ - return false; - } - - - /** - * Random access to a specific row in the recordset. Some databases do not support - * access to previous rows in the databases (no scrolling backwards). - * - * @param rowNumber is the row to move to (0-based) - * - * @return true if there still rows available, or false if there are no more rows (EOF). - */ - function Move($rowNumber = 0) - { - $this->EOF = false; - if ($rowNumber == $this->_currentRow) return true; - if ($rowNumber >= $this->_numOfRows) - if ($this->_numOfRows != -1) $rowNumber = $this->_numOfRows-2; - - if ($this->canSeek) { - - if ($this->_seek($rowNumber)) { - $this->_currentRow = $rowNumber; - if ($this->_fetch()) { - return true; - } - } else { - $this->EOF = true; - return false; - } - } else { - if ($rowNumber < $this->_currentRow) return false; - global $ADODB_EXTENSION; - if ($ADODB_EXTENSION) { - while (!$this->EOF && $this->_currentRow < $rowNumber) { - adodb_movenext($this); - } - } else { - - while (! $this->EOF && $this->_currentRow < $rowNumber) { - $this->_currentRow++; - - if (!$this->_fetch()) $this->EOF = true; - } - } - return !($this->EOF); - } - - $this->fields = false; - $this->EOF = true; - return false; - } - - - /** - * Get the value of a field in the current row by column name. - * Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM. - * - * @param colname is the field to access - * - * @return the value of $colname column - */ - function Fields($colname) - { - return $this->fields[$colname]; - } - - function GetAssocKeys($upper=true) - { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - if ($upper === 2) $this->bind[$o->name] = $i; - else $this->bind[($upper) ? strtoupper($o->name) : strtolower($o->name)] = $i; - } - } - - /** - * Use associative array to get fields array for databases that do not support - * associative arrays. Submitted by Paolo S. Asioli paolo.asioli#libero.it - * - * If you don't want uppercase cols, set $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC - * before you execute your SQL statement, and access $rs->fields['col'] directly. - * - * $upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField - */ - function &GetRowAssoc($upper=1) - { - $record = array(); - // if (!$this->fields) return $record; - - if (!$this->bind) { - $this->GetAssocKeys($upper); - } - - foreach($this->bind as $k => $v) { - $record[$k] = $this->fields[$v]; - } - - return $record; - } - - - /** - * Clean up recordset - * - * @return true or false - */ - function Close() - { - // free connection object - this seems to globally free the object - // and not merely the reference, so don't do this... - // $this->connection = false; - if (!$this->_closed) { - $this->_closed = true; - return $this->_close(); - } else - return true; - } - - /** - * synonyms RecordCount and RowCount - * - * @return the number of rows or -1 if this is not supported - */ - function RecordCount() {return $this->_numOfRows;} - - - /* - * If we are using PageExecute(), this will return the maximum possible rows - * that can be returned when paging a recordset. - */ - function MaxRecordCount() - { - return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->RecordCount(); - } - - /** - * synonyms RecordCount and RowCount - * - * @return the number of rows or -1 if this is not supported - */ - function RowCount() {return $this->_numOfRows;} - - - /** - * Portable RecordCount. Pablo Roca - * - * @return the number of records from a previous SELECT. All databases support this. - * - * But aware possible problems in multiuser environments. For better speed the table - * must be indexed by the condition. Heavy test this before deploying. - */ - function PO_RecordCount($table="", $condition="") { - - $lnumrows = $this->_numOfRows; - // the database doesn't support native recordcount, so we do a workaround - if ($lnumrows == -1 && $this->connection) { - IF ($table) { - if ($condition) $condition = " WHERE " . $condition; - $resultrows = &$this->connection->Execute("SELECT COUNT(*) FROM $table $condition"); - if ($resultrows) $lnumrows = reset($resultrows->fields); - } - } - return $lnumrows; - } - - - /** - * @return the current row in the recordset. If at EOF, will return the last row. 0-based. - */ - function CurrentRow() {return $this->_currentRow;} - - /** - * synonym for CurrentRow -- for ADO compat - * - * @return the current row in the recordset. If at EOF, will return the last row. 0-based. - */ - function AbsolutePosition() {return $this->_currentRow;} - - /** - * @return the number of columns in the recordset. Some databases will set this to 0 - * if no records are returned, others will return the number of columns in the query. - */ - function FieldCount() {return $this->_numOfFields;} - - - /** - * Get the ADOFieldObject of a specific column. - * - * @param fieldoffset is the column position to access(0-based). - * - * @return the ADOFieldObject for that column, or false. - */ - function &FetchField($fieldoffset = -1) - { - // must be defined by child class - - $false = false; - return $false; - } - - /** - * Get the ADOFieldObjects of all columns in an array. - * - */ - function& FieldTypesArray() - { - $arr = array(); - for ($i=0, $max=$this->_numOfFields; $i < $max; $i++) - $arr[] = $this->FetchField($i); - return $arr; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default case is lowercase field names. - * - * @return the object with the properties set to the fields of the current row - */ - function &FetchObj() - { - $o =& $this->FetchObject(false); - return $o; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default case is uppercase. - * - * @param $isupper to set the object property names to uppercase - * - * @return the object with the properties set to the fields of the current row - */ - function &FetchObject($isupper=true) - { - if (empty($this->_obj)) { - $this->_obj = new ADOFetchObj(); - $this->_names = array(); - for ($i=0; $i <$this->_numOfFields; $i++) { - $f = $this->FetchField($i); - $this->_names[] = $f->name; - } - } - $i = 0; - if (PHP_VERSION >= 5) $o = clone($this->_obj); - else $o = $this->_obj; - - for ($i=0; $i <$this->_numOfFields; $i++) { - $name = $this->_names[$i]; - if ($isupper) $n = strtoupper($name); - else $n = $name; - - $o->$n = $this->Fields($name); - } - return $o; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default is lower-case field names. - * - * @return the object with the properties set to the fields of the current row, - * or false if EOF - * - * Fixed bug reported by tim@orotech.net - */ - function &FetchNextObj() - { - $o =& $this->FetchNextObject(false); - return $o; - } - - - /** - * Return the fields array of the current row as an object for convenience. - * The default is upper case field names. - * - * @param $isupper to set the object property names to uppercase - * - * @return the object with the properties set to the fields of the current row, - * or false if EOF - * - * Fixed bug reported by tim@orotech.net - */ - function &FetchNextObject($isupper=true) - { - $o = false; - if ($this->_numOfRows != 0 && !$this->EOF) { - $o = $this->FetchObject($isupper); - $this->_currentRow++; - if ($this->_fetch()) return $o; - } - $this->EOF = true; - return $o; - } - - /** - * Get the metatype of the column. This is used for formatting. This is because - * many databases use different names for the same type, so we transform the original - * type to our standardised version which uses 1 character codes: - * - * @param t is the type passed in. Normally is ADOFieldObject->type. - * @param len is the maximum length of that field. This is because we treat character - * fields bigger than a certain size as a 'B' (blob). - * @param fieldobj is the field object returned by the database driver. Can hold - * additional info (eg. primary_key for mysql). - * - * @return the general type of the data: - * C for character < 250 chars - * X for teXt (>= 250 chars) - * B for Binary - * N for numeric or floating point - * D for date - * T for timestamp - * L for logical/Boolean - * I for integer - * R for autoincrement counter/integer - * - * - */ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - // changed in 2.32 to hashing instead of switch stmt for speed... - static $typeMap = array( - 'VARCHAR' => 'C', - 'VARCHAR2' => 'C', - 'CHAR' => 'C', - 'C' => 'C', - 'STRING' => 'C', - 'NCHAR' => 'C', - 'NVARCHAR' => 'C', - 'VARYING' => 'C', - 'BPCHAR' => 'C', - 'CHARACTER' => 'C', - 'INTERVAL' => 'C', # Postgres - 'MACADDR' => 'C', # postgres - ## - 'LONGCHAR' => 'X', - 'TEXT' => 'X', - 'NTEXT' => 'X', - 'M' => 'X', - 'X' => 'X', - 'CLOB' => 'X', - 'NCLOB' => 'X', - 'LVARCHAR' => 'X', - ## - 'BLOB' => 'B', - 'IMAGE' => 'B', - 'BINARY' => 'B', - 'VARBINARY' => 'B', - 'LONGBINARY' => 'B', - 'B' => 'B', - ## - 'YEAR' => 'D', // mysql - 'DATE' => 'D', - 'D' => 'D', - ## - 'UNIQUEIDENTIFIER' => 'C', # MS SQL Server - ## - 'TIME' => 'T', - 'TIMESTAMP' => 'T', - 'DATETIME' => 'T', - 'TIMESTAMPTZ' => 'T', - 'T' => 'T', - 'TIMESTAMP WITHOUT TIME ZONE' => 'T', // postgresql - ## - 'BOOL' => 'L', - 'BOOLEAN' => 'L', - 'BIT' => 'L', - 'L' => 'L', - ## - 'COUNTER' => 'R', - 'R' => 'R', - 'SERIAL' => 'R', // ifx - 'INT IDENTITY' => 'R', - ## - 'INT' => 'I', - 'INT2' => 'I', - 'INT4' => 'I', - 'INT8' => 'I', - 'INTEGER' => 'I', - 'INTEGER UNSIGNED' => 'I', - 'SHORT' => 'I', - 'TINYINT' => 'I', - 'SMALLINT' => 'I', - 'I' => 'I', - ## - 'LONG' => 'N', // interbase is numeric, oci8 is blob - 'BIGINT' => 'N', // this is bigger than PHP 32-bit integers - 'DECIMAL' => 'N', - 'DEC' => 'N', - 'REAL' => 'N', - 'DOUBLE' => 'N', - 'DOUBLE PRECISION' => 'N', - 'SMALLFLOAT' => 'N', - 'FLOAT' => 'N', - 'NUMBER' => 'N', - 'NUM' => 'N', - 'NUMERIC' => 'N', - 'MONEY' => 'N', - - ## informix 9.2 - 'SQLINT' => 'I', - 'SQLSERIAL' => 'I', - 'SQLSMINT' => 'I', - 'SQLSMFLOAT' => 'N', - 'SQLFLOAT' => 'N', - 'SQLMONEY' => 'N', - 'SQLDECIMAL' => 'N', - 'SQLDATE' => 'D', - 'SQLVCHAR' => 'C', - 'SQLCHAR' => 'C', - 'SQLDTIME' => 'T', - 'SQLINTERVAL' => 'N', - 'SQLBYTES' => 'B', - 'SQLTEXT' => 'X', - ## informix 10 - "SQLINT8" => 'I8', - "SQLSERIAL8" => 'I8', - "SQLNCHAR" => 'C', - "SQLNVCHAR" => 'C', - "SQLLVARCHAR" => 'X', - "SQLBOOL" => 'L' - ); - - $tmap = false; - $t = strtoupper($t); - $tmap = (isset($typeMap[$t])) ? $typeMap[$t] : 'N'; - switch ($tmap) { - case 'C': - - // is the char field is too long, return as text field... - if ($this->blobSize >= 0) { - if ($len > $this->blobSize) return 'X'; - } else if ($len > 250) { - return 'X'; - } - return 'C'; - - case 'I': - if (!empty($fieldobj->primary_key)) return 'R'; - return 'I'; - - case false: - return 'N'; - - case 'B': - if (isset($fieldobj->binary)) - return ($fieldobj->binary) ? 'B' : 'X'; - return 'B'; - - case 'D': - if (!empty($this->connection) && !empty($this->connection->datetime)) return 'T'; - return 'D'; - - default: - if ($t == 'LONG' && $this->dataProvider == 'oci8') return 'B'; - return $tmap; - } - } - - - function _close() {} - - /** - * set/returns the current recordset page when paginating - */ - function AbsolutePage($page=-1) - { - if ($page != -1) $this->_currentPage = $page; - return $this->_currentPage; - } - - /** - * set/returns the status of the atFirstPage flag when paginating - */ - function AtFirstPage($status=false) - { - if ($status != false) $this->_atFirstPage = $status; - return $this->_atFirstPage; - } - - function LastPageNo($page = false) - { - if ($page != false) $this->_lastPageNo = $page; - return $this->_lastPageNo; - } - - /** - * set/returns the status of the atLastPage flag when paginating - */ - function AtLastPage($status=false) - { - if ($status != false) $this->_atLastPage = $status; - return $this->_atLastPage; - } - -} // end class ADORecordSet - - //============================================================================================== - // CLASS ADORecordSet_array - //============================================================================================== - - /** - * This class encapsulates the concept of a recordset created in memory - * as an array. This is useful for the creation of cached recordsets. - * - * Note that the constructor is different from the standard ADORecordSet - */ - - class ADORecordSet_array extends ADORecordSet - { - var $databaseType = 'array'; - - var $_array; // holds the 2-dimensional data array - var $_types; // the array of types of each column (C B I L M) - var $_colnames; // names of each column in array - var $_skiprow1; // skip 1st row because it holds column names - var $_fieldobjects; // holds array of field objects - var $canSeek = true; - var $affectedrows = false; - var $insertid = false; - var $sql = ''; - var $compat = false; - /** - * Constructor - * - */ - function ADORecordSet_array($fakeid=1) - { - global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH; - - // fetch() on EOF does not delete $this->fields - $this->compat = !empty($ADODB_COMPAT_FETCH); - $this->ADORecordSet($fakeid); // fake queryID - $this->fetchMode = $ADODB_FETCH_MODE; - } - - function _transpose($addfieldnames=true) - { - global $ADODB_INCLUDED_LIB; - - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - $hdr = true; - - $fobjs = $addfieldnames ? $this->_fieldobjects : false; - adodb_transpose($this->_array, $newarr, $hdr, $fobjs); - //adodb_pr($newarr); - - $this->_skiprow1 = false; - $this->_array =& $newarr; - $this->_colnames = $hdr; - - adodb_probetypes($newarr,$this->_types); - - $this->_fieldobjects = array(); - - foreach($hdr as $k => $name) { - $f = new ADOFieldObject(); - $f->name = $name; - $f->type = $this->_types[$k]; - $f->max_length = -1; - $this->_fieldobjects[] = $f; - } - $this->fields = reset($this->_array); - - $this->_initrs(); - - } - - /** - * Setup the array. - * - * @param array is a 2-dimensional array holding the data. - * The first row should hold the column names - * unless paramter $colnames is used. - * @param typearr holds an array of types. These are the same types - * used in MetaTypes (C,B,L,I,N). - * @param [colnames] array of column names. If set, then the first row of - * $array should not hold the column names. - */ - function InitArray($array,$typearr,$colnames=false) - { - $this->_array = $array; - $this->_types = $typearr; - if ($colnames) { - $this->_skiprow1 = false; - $this->_colnames = $colnames; - } else { - $this->_skiprow1 = true; - $this->_colnames = $array[0]; - } - $this->Init(); - } - /** - * Setup the Array and datatype file objects - * - * @param array is a 2-dimensional array holding the data. - * The first row should hold the column names - * unless paramter $colnames is used. - * @param fieldarr holds an array of ADOFieldObject's. - */ - function InitArrayFields(&$array,&$fieldarr) - { - $this->_array =& $array; - $this->_skiprow1= false; - if ($fieldarr) { - $this->_fieldobjects =& $fieldarr; - } - $this->Init(); - } - - function &GetArray($nRows=-1) - { - if ($nRows == -1 && $this->_currentRow <= 0 && !$this->_skiprow1) { - return $this->_array; - } else { - $arr =& ADORecordSet::GetArray($nRows); - return $arr; - } - } - - function _initrs() - { - $this->_numOfRows = sizeof($this->_array); - if ($this->_skiprow1) $this->_numOfRows -= 1; - - $this->_numOfFields =(isset($this->_fieldobjects)) ? - sizeof($this->_fieldobjects):sizeof($this->_types); - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - $mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode; - - if ($mode & ADODB_FETCH_ASSOC) { - if (!isset($this->fields[$colname])) $colname = strtolower($colname); - return $this->fields[$colname]; - } - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function &FetchField($fieldOffset = -1) - { - if (isset($this->_fieldobjects)) { - return $this->_fieldobjects[$fieldOffset]; - } - $o = new ADOFieldObject(); - $o->name = $this->_colnames[$fieldOffset]; - $o->type = $this->_types[$fieldOffset]; - $o->max_length = -1; // length not known - - return $o; - } - - function _seek($row) - { - if (sizeof($this->_array) && 0 <= $row && $row < $this->_numOfRows) { - $this->_currentRow = $row; - if ($this->_skiprow1) $row += 1; - $this->fields = $this->_array[$row]; - return true; - } - return false; - } - - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - - $pos = $this->_currentRow; - - if ($this->_numOfRows <= $pos) { - if (!$this->compat) $this->fields = false; - } else { - if ($this->_skiprow1) $pos += 1; - $this->fields = $this->_array[$pos]; - return true; - } - $this->EOF = true; - } - - return false; - } - - function _fetch() - { - $pos = $this->_currentRow; - - if ($this->_numOfRows <= $pos) { - if (!$this->compat) $this->fields = false; - return false; - } - if ($this->_skiprow1) $pos += 1; - $this->fields = $this->_array[$pos]; - return true; - } - - function _close() - { - return true; - } - - } // ADORecordSet_array - - //============================================================================================== - // HELPER FUNCTIONS - //============================================================================================== - - /** - * Synonym for ADOLoadCode. Private function. Do not use. - * - * @deprecated - */ - function ADOLoadDB($dbType) - { - return ADOLoadCode($dbType); - } - - /** - * Load the code for a specific database driver. Private function. Do not use. - */ - function ADOLoadCode($dbType) - { - global $ADODB_LASTDB; - - if (!$dbType) return false; - $db = strtolower($dbType); - switch ($db) { - case 'ado': - if (PHP_VERSION >= 5) $db = 'ado5'; - $class = 'ado'; - break; - case 'ifx': - case 'maxsql': $class = $db = 'mysqlt'; break; - case 'postgres': - case 'postgres8': - case 'pgsql': $class = $db = 'postgres7'; break; - default: - $class = $db; break; - } - - $file = ADODB_DIR."/drivers/adodb-".$db.".inc.php"; - @include_once($file); - $ADODB_LASTDB = $class; - if (class_exists("ADODB_" . $class)) return $class; - - //ADOConnection::outp(adodb_pr(get_declared_classes(),true)); - if (!file_exists($file)) ADOConnection::outp("Missing file: $file"); - else ADOConnection::outp("Syntax error in file: $file"); - return false; - } - - /** - * synonym for ADONewConnection for people like me who cannot remember the correct name - */ - function &NewADOConnection($db='') - { - $tmp =& ADONewConnection($db); - return $tmp; - } - - /** - * Instantiate a new Connection class for a specific database driver. - * - * @param [db] is the database Connection object to create. If undefined, - * use the last database driver that was loaded by ADOLoadCode(). - * - * @return the freshly created instance of the Connection class. - */ - function &ADONewConnection($db='') - { - GLOBAL $ADODB_NEWCONNECTION, $ADODB_LASTDB; - - if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); - $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; - $false = false; - if ($at = strpos($db,'://')) { - $origdsn = $db; - if (PHP_VERSION < 5) $dsna = @parse_url($db); - else { - $fakedsn = 'fake'.substr($db,$at); - $dsna = @parse_url($fakedsn); - $dsna['scheme'] = substr($db,0,$at); - - if (strncmp($db,'pdo',3) == 0) { - $sch = explode('_',$dsna['scheme']); - if (sizeof($sch)>1) { - $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; - $dsna['host'] = rawurlencode($sch[1].':host='.rawurldecode($dsna['host'])); - $dsna['scheme'] = 'pdo'; - } - } - } - - if (!$dsna) { - // special handling of oracle, which might not have host - $db = str_replace('@/','@adodb-fakehost/',$db); - $dsna = parse_url($db); - if (!$dsna) return $false; - $dsna['host'] = ''; - } - $db = @$dsna['scheme']; - if (!$db) return $false; - $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; - $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; - $dsna['pass'] = isset($dsna['pass']) ? rawurldecode($dsna['pass']) : ''; - $dsna['path'] = isset($dsna['path']) ? rawurldecode(substr($dsna['path'],1)) : ''; # strip off initial / - - if (isset($dsna['query'])) { - $opt1 = explode('&',$dsna['query']); - foreach($opt1 as $k => $v) { - $arr = explode('=',$v); - $opt[$arr[0]] = isset($arr[1]) ? rawurldecode($arr[1]) : 1; - } - } else $opt = array(); - } - /* - * phptype: Database backend used in PHP (mysql, odbc etc.) - * dbsyntax: Database used with regards to SQL syntax etc. - * protocol: Communication protocol to use (tcp, unix etc.) - * hostspec: Host specification (hostname[:port]) - * database: Database to use on the DBMS server - * username: User name for login - * password: Password for login - */ - if (!empty($ADODB_NEWCONNECTION)) { - $obj = $ADODB_NEWCONNECTION($db); - - } else { - - if (!isset($ADODB_LASTDB)) $ADODB_LASTDB = ''; - if (empty($db)) $db = $ADODB_LASTDB; - - if ($db != $ADODB_LASTDB) $db = ADOLoadCode($db); - - if (!$db) { - if (isset($origdsn)) $db = $origdsn; - if ($errorfn) { - // raise an error - $ignore = false; - $errorfn('ADONewConnection', 'ADONewConnection', -998, - "could not load the database driver for '$db'", - $db,false,$ignore); - } else - ADOConnection::outp( "

    ADONewConnection: Unable to load database driver '$db'

    ",false); - - return $false; - } - - $cls = 'ADODB_'.$db; - if (!class_exists($cls)) { - adodb_backtrace(); - return $false; - } - - $obj = new $cls(); - } - - # constructor should not fail - if ($obj) { - if ($errorfn) $obj->raiseErrorFn = $errorfn; - if (isset($dsna)) { - if (isset($dsna['port'])) $obj->port = $dsna['port']; - foreach($opt as $k => $v) { - switch(strtolower($k)) { - case 'new': - $nconnect = true; $persist = true; break; - case 'persist': - case 'persistent': $persist = $v; break; - case 'debug': $obj->debug = (integer) $v; break; - #ibase - case 'role': $obj->role = $v; break; - case 'dialect': $obj->dialect = (integer) $v; break; - case 'charset': $obj->charset = $v; $obj->charSet=$v; break; - case 'buffers': $obj->buffers = $v; break; - case 'fetchmode': $obj->SetFetchMode($v); break; - #ado - case 'charpage': $obj->charPage = $v; break; - #mysql, mysqli - case 'clientflags': $obj->clientFlags = $v; break; - #mysql, mysqli, postgres - case 'port': $obj->port = $v; break; - #mysqli - case 'socket': $obj->socket = $v; break; - #oci8 - case 'nls_date_format': $obj->NLS_DATE_FORMAT = $v; break; - } - } - if (empty($persist)) - $ok = $obj->Connect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - else if (empty($nconnect)) - $ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - else - $ok = $obj->NConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - - if (!$ok) return $false; - } - } - return $obj; - } - - - - // $perf == true means called by NewPerfMonitor(), otherwise for data dictionary - function _adodb_getdriver($provider,$drivername,$perf=false) - { - switch ($provider) { - case 'odbtp': if (strncmp('odbtp_',$drivername,6)==0) return substr($drivername,6); - case 'odbc' : if (strncmp('odbc_',$drivername,5)==0) return substr($drivername,5); - case 'ado' : if (strncmp('ado_',$drivername,4)==0) return substr($drivername,4); - case 'native': break; - default: - return $provider; - } - - switch($drivername) { - case 'mysqlt': - case 'mysqli': - $drivername='mysql'; - break; - case 'postgres7': - case 'postgres8': - $drivername = 'postgres'; - break; - case 'firebird15': $drivername = 'firebird'; break; - case 'oracle': $drivername = 'oci8'; break; - case 'access': if ($perf) $drivername = ''; break; - case 'db2' : break; - case 'sapdb' : break; - default: - $drivername = 'generic'; - break; - } - return $drivername; - } - - function &NewPerfMonitor(&$conn) - { - $false = false; - $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true); - if (!$drivername || $drivername == 'generic') return $false; - include_once(ADODB_DIR.'/adodb-perf.inc.php'); - @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php"); - $class = "Perf_$drivername"; - if (!class_exists($class)) return $false; - $perf = new $class($conn); - - return $perf; - } - - function &NewDataDictionary(&$conn,$drivername=false) - { - $false = false; - if (!$drivername) $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType); - - include_once(ADODB_DIR.'/adodb-lib.inc.php'); - include_once(ADODB_DIR.'/adodb-datadict.inc.php'); - $path = ADODB_DIR."/datadict/datadict-$drivername.inc.php"; - - if (!file_exists($path)) { - ADOConnection::outp("Dictionary driver '$path' not available"); - return $false; - } - include_once($path); - $class = "ADODB2_$drivername"; - $dict = new $class(); - $dict->dataProvider = $conn->dataProvider; - $dict->connection = &$conn; - $dict->upperName = strtoupper($drivername); - $dict->quote = $conn->nameQuote; - if (!empty($conn->_connectionID)) - $dict->serverInfo = $conn->ServerInfo(); - - return $dict; - } - - - - /* - Perform a print_r, with pre tags for better formatting. - */ - function adodb_pr($var,$as_string=false) - { - if ($as_string) ob_start(); - - if (isset($_SERVER['HTTP_USER_AGENT'])) { - echo "
    \n";print_r($var);echo "
    \n"; - } else - print_r($var); - - if ($as_string) { - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - } - - /* - Perform a stack-crawl and pretty print it. - - @param printOrArr Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then). - @param levels Number of levels to display - */ - function adodb_backtrace($printOrArr=true,$levels=9999) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_backtrace($printOrArr,$levels); - } - - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/license.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/license.txt.svn-base deleted file mode 100755 index 9821fcb7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/license.txt.svn-base +++ /dev/null @@ -1,182 +0,0 @@ -ADOdb is dual licensed using BSD and LGPL. - -In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license. - -For more info about ADOdb, visit http://adodb.sourceforge.net/ - -BSD Style-License -================= - -Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this list -of conditions and the following disclaimer in the documentation and/or other materials -provided with the distribution. - -Neither the name of the John Lim nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior written -permission. - -DISCLAIMER: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -========================================================== -GNU LESSER GENERAL PUBLIC LICENSE -Version 2.1, February 1999 - -Copyright (C) 1991, 1999 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - -Preamble -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - -This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. - -When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. - -To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. - -For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - -We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - -To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - -Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. - -Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. - -When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. - -We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. - -For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. - -In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. - -Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. - -The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". - -A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. - -The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) - -"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - -1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - -a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - -Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. - -This option is useful when you wish to copy part of the code of the Library into a program that is not a library. - -4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. - -If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. - -5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. - -However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. - -When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. - -If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) - -Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - -6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. - -You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - - -a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. -c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - -7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - - -a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. - -10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - -11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - -14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/pivottable.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/pivottable.inc.php.svn-base deleted file mode 100755 index f159f8e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/pivottable.inc.php.svn-base +++ /dev/null @@ -1,187 +0,0 @@ -databaseType,'access') !== false; - // note - vfp 6 still doesn' work even with IIF enabled || $db->databaseType == 'vfp'; - - //$hidecnt = false; - - if ($where) $where = "\nWHERE $where"; - if (!is_array($colfield)) $colarr = $db->GetCol("select distinct $colfield from $tables $where order by 1"); - if (!$aggfield) $hidecnt = false; - - $sel = "$rowfields, "; - if (is_array($colfield)) { - foreach ($colfield as $k => $v) { - $k = trim($k); - if (!$hidecnt) { - $sel .= $iif ? - "\n\t$aggfn(IIF($v,1,0)) AS \"$k\", " - : - "\n\t$aggfn(CASE WHEN $v THEN 1 ELSE 0 END) AS \"$k\", "; - } - if ($aggfield) { - $sel .= $iif ? - "\n\t$aggfn(IIF($v,$aggfield,0)) AS \"$sumlabel$k\", " - : - "\n\t$aggfn(CASE WHEN $v THEN $aggfield ELSE 0 END) AS \"$sumlabel$k\", "; - } - } - } else { - foreach ($colarr as $v) { - if (!is_numeric($v)) $vq = $db->qstr($v); - else $vq = $v; - $v = trim($v); - if (strlen($v) == 0 ) $v = 'null'; - if (!$hidecnt) { - $sel .= $iif ? - "\n\t$aggfn(IIF($colfield=$vq,1,0)) AS \"$v\", " - : - "\n\t$aggfn(CASE WHEN $colfield=$vq THEN 1 ELSE 0 END) AS \"$v\", "; - } - if ($aggfield) { - if ($hidecnt) $label = $v; - else $label = "{$v}_$aggfield"; - $sel .= $iif ? - "\n\t$aggfn(IIF($colfield=$vq,$aggfield,0)) AS \"$label\", " - : - "\n\t$aggfn(CASE WHEN $colfield=$vq THEN $aggfield ELSE 0 END) AS \"$label\", "; - } - } - } - if ($aggfield && $aggfield != '1'){ - $agg = "$aggfn($aggfield)"; - $sel .= "\n\t$agg as \"$sumlabel$aggfield\", "; - } - - if ($showcount) - $sel .= "\n\tSUM(1) as Total"; - else - $sel = substr($sel,0,strlen($sel)-2); - - - // Strip aliases - $rowfields = preg_replace('/ AS (\w+)/i', '', $rowfields); - - $sql = "SELECT $sel \nFROM $tables $where \nGROUP BY $rowfields"; - - return $sql; - } - -/* EXAMPLES USING MS NORTHWIND DATABASE */ -if (0) { - -# example1 -# -# Query the main "product" table -# Set the rows to CompanyName and QuantityPerUnit -# and the columns to the Categories -# and define the joins to link to lookup tables -# "categories" and "suppliers" -# - - $sql = PivotTableSQL( - $gDB, # adodb connection - 'products p ,categories c ,suppliers s', # tables - 'CompanyName,QuantityPerUnit', # row fields - 'CategoryName', # column fields - 'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where -); - print "
    $sql";
    - $rs = $gDB->Execute($sql);
    - rs2html($rs);
    - 
    -/*
    -Generated SQL:
    -
    -SELECT CompanyName,QuantityPerUnit, 
    -	SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", 
    -	SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", 
    -	SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", 
    -	SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy Products", 
    -	SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", 
    -	SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", 
    -	SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", 
    -	SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", 
    -	SUM(1) as Total 
    -FROM products p ,categories c ,suppliers s  WHERE p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
    -GROUP BY CompanyName,QuantityPerUnit
    -*/
    -//=====================================================================
    -
    -# example2
    -#
    -# Query the main "product" table
    -# Set the rows to CompanyName and QuantityPerUnit
    -# and the columns to the UnitsInStock for diiferent ranges
    -# and define the joins to link to lookup tables 
    -# "categories" and "suppliers"
    -#
    - $sql = PivotTableSQL(
    - 	$gDB,										# adodb connection
    - 	'products p ,categories c ,suppliers s',	# tables
    -	'CompanyName,QuantityPerUnit',				# row fields
    -												# column ranges
    -array(										
    -' 0 ' => 'UnitsInStock <= 0',
    -"1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5',
    -"6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10',
    -"11 to 15"  => '10 < UnitsInStock and UnitsInStock <= 15',
    -"16+" =>'15 < UnitsInStock'
    -),
    -	' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where
    -	'UnitsInStock', 							# sum this field
    -	'Sum'										# sum label prefix
    -);
    - print "
    $sql";
    - $rs = $gDB->Execute($sql);
    - rs2html($rs);
    - /*
    - Generated SQL:
    - 
    -SELECT CompanyName,QuantityPerUnit, 
    -	SUM(CASE WHEN UnitsInStock <= 0 THEN UnitsInStock ELSE 0 END) AS "Sum  0 ", 
    -	SUM(CASE WHEN 0 < UnitsInStock and UnitsInStock <= 5 THEN UnitsInStock ELSE 0 END) AS "Sum 1 to 5", 
    -	SUM(CASE WHEN 5 < UnitsInStock and UnitsInStock <= 10 THEN UnitsInStock ELSE 0 END) AS "Sum 6 to 10", 
    -	SUM(CASE WHEN 10 < UnitsInStock and UnitsInStock <= 15 THEN UnitsInStock ELSE 0 END) AS "Sum 11 to 15", 
    -	SUM(CASE WHEN 15 < UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum 16+",
    -	SUM(UnitsInStock) AS "Sum UnitsInStock", 
    -	SUM(1) as Total 
    -FROM products p ,categories c ,suppliers s  WHERE  p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
    -GROUP BY CompanyName,QuantityPerUnit
    - */
    -}
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/readme.txt.svn-base
    deleted file mode 100755
    index 009b94c5..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/readme.txt.svn-base	
    +++ /dev/null
    @@ -1,62 +0,0 @@
    ->> ADODB Library for PHP4
    -
    -(c) 2000-2004 John Lim (jlim@natsoft.com.my)
    -
    -Released under both BSD and GNU Lesser GPL library license. 
    -This means you can use it in proprietary products.
    - 
    - 
    ->> Introduction
    -
    -PHP's database access functions are not standardised. This creates a 
    -need for a database class library to hide the differences between the 
    -different databases (encapsulate the differences) so we can easily 
    -switch databases.
    -
    -We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle, 
    -Microsoft SQL server,  Foxpro ODBC, Access ODBC, Informix, DB2,
    -Sybase SQL Anywhere, generic ODBC and Microsoft's ADO. 
    -
    -We hope more people will contribute drivers to support other databases.
    -
    -
    ->> Documentation and Examples
    -
    -Refer to the adodb/docs directory for full documentation and examples. 
    -There is also a  tutorial tute.htm that contrasts ADODB code with 
    -mysql code.
    -
    -
    ->>> Files
    -Adodb.inc.php is the main file. You need to include only this file.
    -
    -Adodb-*.inc.php are the database specific driver code.
    -
    -Test.php contains a list of test commands to exercise the class library.
    -
    -Adodb-session.php is the PHP4 session handling code.
    -
    -Testdatabases.inc.php contains the list of databases to apply the tests on.
    -
    -Benchmark.php is a simple benchmark to test the throughput of a simple SELECT 
    -statement for databases described in testdatabases.inc.php. The benchmark
    -tables are created in test.php.
    -
    -readme.htm is the main documentation.
    -
    -tute.htm is the tutorial.
    -
    -
    ->> More Info
    -
    -For more information, including installation see readme.htm
    -or visit
    -           http://adodb.sourceforge.net/
    -
    -
    ->> Feature Requests and Bug Reports
    -
    -Email to jlim@natsoft.com.my 
    -
    -
    - 
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/rsfilter.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/rsfilter.inc.php.svn-base
    deleted file mode 100755
    index 41a1ea97..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/rsfilter.inc.php.svn-base	
    +++ /dev/null
    @@ -1,61 +0,0 @@
    - $v) {
    -			$arr[$k] = ucwords($v);
    -		}
    -	}
    -	$rs = RSFilter($rs,'do_ucwords');
    - */
    -function &RSFilter($rs,$fn)
    -{
    -	if ($rs->databaseType != 'array') {
    -		if (!$rs->connection) return false;
    -		
    -		$rs = &$rs->connection->_rs2rs($rs);
    -	}
    -	$rows = $rs->RecordCount();
    -	for ($i=0; $i < $rows; $i++) {
    -		if (is_array ($fn)) {
    -        	$obj = $fn[0];
    -        	$method = $fn[1];
    -        	$obj->$method ($rs->_array[$i],$rs);
    -      } else {
    -			$fn($rs->_array[$i],$rs);
    -      }
    -	  
    -	}
    -	if (!$rs->EOF) {
    -		$rs->_currentRow = 0;
    -		$rs->fields = $rs->_array[0];
    -	}
    -	
    -	return $rs;
    -}
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/server.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/server.php.svn-base
    deleted file mode 100755
    index 525b41eb..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/server.php.svn-base	
    +++ /dev/null
    @@ -1,100 +0,0 @@
    -Connect($host,$uid,$pwd,$database)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg());
    -$sql = undomq($_REQUEST['sql']);
    -
    -if (isset($_REQUEST['fetch']))
    -	$ADODB_FETCH_MODE = $_REQUEST['fetch'];
    -	
    -if (isset($_REQUEST['nrows'])) {
    -	$nrows = $_REQUEST['nrows'];
    -	$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
    -	$rs = $conn->SelectLimit($sql,$nrows,$offset);
    -} else 
    -	$rs = $conn->Execute($sql);
    -if ($rs){ 
    -	//$rs->timeToLive = 1;
    -	echo _rs2serialize($rs,$conn,$sql);
    -	$rs->Close();
    -} else
    -	err($conn->ErrorNo(). $sep .$conn->ErrorMsg());
    -
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/toexport.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/toexport.inc.php.svn-base
    deleted file mode 100755
    index a7406a03..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/toexport.inc.php.svn-base	
    +++ /dev/null
    @@ -1,133 +0,0 @@
    -FieldTypesArray();
    -		reset($fieldTypes);
    -		while(list(,$o) = each($fieldTypes)) {
    -			
    -			$v = $o->name;
    -			if ($escquote) $v = str_replace($quote,$escquotequote,$v);
    -			$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
    -			$elements[] = $v;
    -			
    -		}
    -		$s .= implode($sep, $elements).$NEWLINE;
    -	}
    -	$hasNumIndex = isset($rs->fields[0]);
    -	
    -	$line = 0;
    -	$max = $rs->FieldCount();
    -	
    -	while (!$rs->EOF) {
    -		$elements = array();
    -		$i = 0;
    -		
    -		if ($hasNumIndex) {
    -			for ($j=0; $j < $max; $j++) {
    -				$v = $rs->fields[$j];
    -				if (!is_object($v)) $v = trim($v);
    -				else $v = 'Object';
    -				if ($escquote) $v = str_replace($quote,$escquotequote,$v);
    -				$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
    -				
    -				if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote";
    -				else $elements[] = $v;
    -			}
    -		} else { // ASSOCIATIVE ARRAY
    -			foreach($rs->fields as $v) {
    -				if ($escquote) $v = str_replace($quote,$escquotequote,trim($v));
    -				$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
    -				
    -				if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote";
    -				else $elements[] = $v;
    -			}
    -		}
    -		$s .= implode($sep, $elements).$NEWLINE;
    -		$rs->MoveNext();
    -		$line += 1;
    -		if ($fp && ($line % $BUFLINES) == 0) {
    -			if ($fp === true) echo $s;
    -			else fwrite($fp,$s);
    -			$s = '';
    -		}
    -	}
    -	
    -	if ($fp) {
    -		if ($fp === true) echo $s;
    -		else fwrite($fp,$s);
    -		$s = '';
    -	}
    -	
    -	return $s;
    -}
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/tohtml.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/tohtml.inc.php.svn-base
    deleted file mode 100755
    index 050e9556..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/tohtml.inc.php.svn-base	
    +++ /dev/null
    @@ -1,195 +0,0 @@
    -
    -*/ 
    -  
    -// specific code for tohtml
    -GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND;
    -
    -$ADODB_ROUND=4; // rounding
    -$gSQLMaxRows = 1000; // max no of rows to download
    -$gSQLBlockRows=20; // max no of rows per table block
    -
    -// RecordSet to HTML Table
    -//------------------------------------------------------------
    -// Convert a recordset to a html table. Multiple tables are generated
    -// if the number of rows is > $gSQLBlockRows. This is because
    -// web browsers normally require the whole table to be downloaded
    -// before it can be rendered, so we break the output into several
    -// smaller faster rendering tables.
    -//
    -// $rs: the recordset
    -// $ztabhtml: the table tag attributes (optional)
    -// $zheaderarray: contains the replacement strings for the headers (optional)
    -//
    -//  USAGE:
    -//	include('adodb.inc.php');
    -//	$db = ADONewConnection('mysql');
    -//	$db->Connect('mysql','userid','password','database');
    -//	$rs = $db->Execute('select col1,col2,col3 from table');
    -//	rs2html($rs, 'BORDER=2', array('Title1', 'Title2', 'Title3'));
    -//	$rs->Close();
    -//
    -// RETURNS: number of rows displayed
    -
    -
    -function rs2html(&$rs,$ztabhtml=false,$zheaderarray=false,$htmlspecialchars=true,$echo = true)
    -{
    -$s ='';$rows=0;$docnt = false;
    -GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND;
    -
    -	if (!$rs) {
    -		printf(ADODB_BAD_RS,'rs2html');
    -		return false;
    -	}
    -	
    -	if (! $ztabhtml) $ztabhtml = "BORDER='1' WIDTH='98%'";
    -	//else $docnt = true;
    -	$typearr = array();
    -	$ncols = $rs->FieldCount();
    -	$hdr = "\n\n";
    -	for ($i=0; $i < $ncols; $i++) {	
    -		$field = $rs->FetchField($i);
    -		if ($field) {
    -			if ($zheaderarray) $fname = $zheaderarray[$i];
    -			else $fname = htmlspecialchars($field->name);	
    -			$typearr[$i] = $rs->MetaType($field->type,$field->max_length);
    - 			//print " $field->name $field->type $typearr[$i] ";
    -		} else {
    -			$fname = 'Field '.($i+1);
    -			$typearr[$i] = 'C';
    -		}
    -		if (strlen($fname)==0) $fname = ' ';
    -		$hdr .= "";
    -	}
    -	$hdr .= "\n";
    -	if ($echo) print $hdr."\n\n";
    -	else $html = $hdr;
    -	
    -	// smart algorithm - handles ADODB_FETCH_MODE's correctly by probing...
    -	$numoffset = isset($rs->fields[0]) ||isset($rs->fields[1]) || isset($rs->fields[2]);
    -	while (!$rs->EOF) {
    -		
    -		$s .= "\n";
    -		
    -		for ($i=0; $i < $ncols; $i++) {
    -			if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields);
    -			else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields);
    -			
    -			$type = $typearr[$i];
    -			switch($type) {
    -			case 'D':
    -				if (empty($v)) $s .= "\n";
    -				else if (!strpos($v,':')) {
    -					$s .= "	\n";
    -				}
    -				break;
    -			case 'T':
    -				if (empty($v)) $s .= "\n";
    -				else $s .= "	\n";
    -			break;
    -			
    -			case 'N':
    -				if (abs(abs($v) - round($v,0)) < 0.00000001)
    -					$v = round($v);
    -				else
    -					$v = round($v,$ADODB_ROUND);
    -			case 'I':
    -				$s .= "	\n";
    -			   	
    -			break;
    -			/*
    -			case 'B':
    -				if (substr($v,8,2)=="BM" ) $v = substr($v,8);
    -				$mtime = substr(str_replace(' ','_',microtime()),2);
    -				$tmpname = "tmp/".uniqid($mtime).getmypid();
    -				$fd = @fopen($tmpname,'a');
    -				@ftruncate($fd,0);
    -				@fwrite($fd,$v);
    -				@fclose($fd);
    -				if (!function_exists ("mime_content_type")) {
    -				  function mime_content_type ($file) {
    -				    return exec("file -bi ".escapeshellarg($file));
    -				  }
    -				}
    -				$t = mime_content_type($tmpname);
    -				$s .= (substr($t,0,5)=="image") ? " \\n" : " \\n";
    -				break;
    -			*/
    -
    -			default:
    -				if ($htmlspecialchars) $v = htmlspecialchars(trim($v));
    -				$v = trim($v);
    -				if (strlen($v) == 0) $v = ' ';
    -				$s .= "	\n";
    -			  
    -			}
    -		} // for
    -		$s .= "\n\n";
    -			  
    -		$rows += 1;
    -		if ($rows >= $gSQLMaxRows) {
    -			$rows = "

    Truncated at $gSQLMaxRows

    "; - break; - } // switch - - $rs->MoveNext(); - - // additional EOF check to prevent a widow header - if (!$rs->EOF && $rows % $gSQLBlockRows == 0) { - - //if (connection_aborted()) break;// not needed as PHP aborts script, unlike ASP - if ($echo) print $s . "
    $fname
      ".$rs->UserDate($v,"D d, M Y") ."    ".$rs->UserTimeStamp($v,"D d, M Y, h:i:s") ." ".stripslashes((trim($v))) ." $t$t". str_replace("\n",'
    ',stripslashes($v)) ."
    \n\n"; - else $html .= $s ."\n\n"; - $s = $hdr; - } - } // while - - if ($echo) print $s."\n\n"; - else $html .= $s."\n\n"; - - if ($docnt) if ($echo) print "

    ".$rows." Rows

    "; - - return ($echo) ? $rows : $html; - } - -// pass in 2 dimensional array -function arr2html(&$arr,$ztabhtml='',$zheaderarray='') -{ - if (!$ztabhtml) $ztabhtml = 'BORDER=1'; - - $s = "";//';print_r($arr); - - if ($zheaderarray) { - $s .= ''; - for ($i=0; $i\n"; - } else $s .= " \n"; - $s .= "\n\n"; - } - $s .= '
     
    '; - print $s; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema.dtd.svn-base deleted file mode 100755 index 4a055da4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema.dtd.svn-base +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -] > \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema03.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema03.dtd.svn-base deleted file mode 100755 index 97850bc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/.svn/text-base/xmlschema03.dtd.svn-base +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-active-record.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-active-record.inc.php deleted file mode 100755 index 60198fa6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-active-record.inc.php +++ /dev/null @@ -1,622 +0,0 @@ -_dbat -$_ADODB_ACTIVE_DBS = array(); - - -class ADODB_Active_DB { - var $db; // ADOConnection - var $tables; // assoc array of ADODB_Active_Table objects, indexed by tablename -} - -class ADODB_Active_Table { - var $name; // table name - var $flds; // assoc array of adofieldobjs, indexed by fieldname - var $keys; // assoc array of primary keys, indexed by fieldname - var $_created; // only used when stored as a cached file -} - -// returns index into $_ADODB_ACTIVE_DBS -function ADODB_SetDatabaseAdapter(&$db) -{ - global $_ADODB_ACTIVE_DBS; - - foreach($_ADODB_ACTIVE_DBS as $k => $d) { - if (PHP_VERSION >= 5) { - if ($d->db === $db) return $k; - } else { - if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) - return $k; - } - } - - $obj = new ADODB_Active_DB(); - $obj->db =& $db; - $obj->tables = array(); - - $_ADODB_ACTIVE_DBS[] = $obj; - - return sizeof($_ADODB_ACTIVE_DBS)-1; -} - - -class ADODB_Active_Record { - var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat] - var $_table; // tablename, if set in class definition then use it as table name - var $_tableat; // associative index pointing to ADODB_Active_Table, eg $ADODB_Active_DBS[_dbat]->tables[$this->_tableat] - var $_where; // where clause set in Load() - var $_saved = false; // indicates whether data is already inserted. - var $_lasterr = false; // last error message - var $_original = false; // the original values loaded or inserted, refreshed on update - - // should be static - function SetDatabaseAdapter(&$db) - { - return ADODB_SetDatabaseAdapter($db); - } - - // php4 constructor - function ADODB_Active_Record($table = false, $pkeyarr=false, $db=false) - { - ADODB_Active_Record::__construct($table,$pkeyarr,$db); - } - - // php5 constructor - function __construct($table = false, $pkeyarr=false, $db=false) - { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS; - - if ($db == false && is_object($pkeyarr)) { - $db = $pkeyarr; - $pkeyarr = false; - } - - if (!$table) { - if (!empty($this->_table)) $table = $this->_table; - else $table = $this->_pluralize(get_class($this)); - } - if ($db) { - $this->_dbat = ADODB_Active_Record::SetDatabaseAdapter($db); - } else - $this->_dbat = sizeof($_ADODB_ACTIVE_DBS)-1; - - - if ($this->_dbat < 0) $this->Error("No database connection set; use ADOdb_Active_Record::SetDatabaseAdapter(\$db)",'ADODB_Active_Record::__constructor'); - - $this->_table = $table; - $this->_tableat = $table; # reserved for setting the assoc value to a non-table name, eg. the sql string in future - $this->UpdateActiveTable($pkeyarr); - } - - function __wakeup() - { - $class = get_class($this); - new $class; - } - - function _pluralize($table) - { - $ut = strtoupper($table); - $len = strlen($table); - $lastc = $ut[$len-1]; - $lastc2 = substr($ut,$len-2); - switch ($lastc) { - case 'S': - return $table.'es'; - case 'Y': - return substr($table,0,$len-1).'ies'; - case 'X': - return $table.'es'; - case 'H': - if ($lastc2 == 'CH' || $lastc2 == 'SH') - return $table.'es'; - default: - return $table.'s'; - } - } - - ////////////////////////////////// - - // update metadata - function UpdateActiveTable($pkeys=false,$forceUpdate=false) - { - global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS; - - $activedb =& $_ADODB_ACTIVE_DBS[$this->_dbat]; - - $table = $this->_table; - $tables = $activedb->tables; - $tableat = $this->_tableat; - if (!$forceUpdate && !empty($tables[$tableat])) { - $tobj =& $tables[$tableat]; - foreach($tobj->flds as $name => $fld) - $this->$name = null; - return; - } - - $db =& $activedb->db; - $fname = $ADODB_CACHE_DIR . '/adodb_' . $db->databaseType . '_active_'. $table . '.cache'; - if (!$forceUpdate && $ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR && file_exists($fname)) { - $fp = fopen($fname,'r'); - @flock($fp, LOCK_SH); - $acttab = unserialize(fread($fp,100000)); - fclose($fp); - if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) { - // abs(rand()) randomizes deletion, reducing contention to delete/refresh file - // ideally, you should cache at least 32 secs - $activedb->tables[$table] = $acttab; - - //if ($db->debug) ADOConnection::outp("Reading cached active record file: $fname"); - return; - } else if ($db->debug) { - ADOConnection::outp("Refreshing cached active record file: $fname"); - } - } - $activetab = new ADODB_Active_Table(); - $activetab->name = $table; - - - $cols = $db->MetaColumns($table); - if (!$cols) { - $this->Error("Invalid table name: $table",'UpdateActiveTable'); - return false; - } - $fld = reset($cols); - if (!$pkeys) { - if (isset($fld->primary_key)) { - $pkeys = array(); - foreach($cols as $name => $fld) { - if (!empty($fld->primary_key)) $pkeys[] = $name; - } - } else - $pkeys = $this->GetPrimaryKeys($db, $table); - } - if (empty($pkeys)) { - $this->Error("No primary key found for table $table",'UpdateActiveTable'); - return false; - } - - $attr = array(); - $keys = array(); - - switch($ADODB_ASSOC_CASE) { - case 0: - foreach($cols as $name => $fldobj) { - $name = strtolower($name); - $this->$name = null; - $attr[$name] = $fldobj; - } - foreach($pkeys as $k => $name) { - $keys[strtolower($name)] = strtolower($name); - } - break; - - case 1: - foreach($cols as $name => $fldobj) { - $name = strtoupper($name); - $this->$name = null; - $attr[$name] = $fldobj; - } - - foreach($pkeys as $k => $name) { - $keys[strtoupper($name)] = strtoupper($name); - } - break; - default: - foreach($cols as $name => $fldobj) { - $name = ($fldobj->name); - $this->$name = null; - $attr[$name] = $fldobj; - } - foreach($pkeys as $k => $name) { - $keys[$name] = $cols[$name]->name; - } - break; - } - - $activetab->keys = $keys; - $activetab->flds = $attr; - - if ($ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR) { - $activetab->_created = time(); - $s = serialize($activetab); - if (!function_exists('adodb_write_file')) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - adodb_write_file($fname,$s); - } - $activedb->tables[$table] = $activetab; - } - - function GetPrimaryKeys(&$db, $table) - { - return $db->MetaPrimaryKeys($table); - } - - // error handler for both PHP4+5. - function Error($err,$fn) - { - global $_ADODB_ACTIVE_DBS; - - $fn = get_class($this).'::'.$fn; - $this->_lasterr = $fn.': '.$err; - - if ($this->_dbat < 0) $db = false; - else { - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $db =& $activedb->db; - } - - if (function_exists('adodb_throw')) { - if (!$db) adodb_throw('ADOdb_Active_Record', $fn, -1, $err, 0, 0, false); - else adodb_throw($db->databaseType, $fn, -1, $err, 0, 0, $db); - } else - if (!$db || $db->debug) ADOConnection::outp($this->_lasterr); - - } - - // return last error message - function ErrorMsg() - { - if (!function_exists('adodb_throw')) { - if ($this->_dbat < 0) $db = false; - else $db = $this->DB(); - - // last error could be database error too - if ($db && $db->ErrorMsg()) return $db->ErrorMsg(); - } - return $this->_lasterr; - } - - function ErrorNo() - { - if ($this->_dbat < 0) return -9999; // no database connection... - $db = $this->DB(); - - return (int) $db->ErrorNo(); - } - - - // retrieve ADOConnection from _ADODB_Active_DBs - function &DB() - { - global $_ADODB_ACTIVE_DBS; - - if ($this->_dbat < 0) { - $false = false; - $this->Error("No database connection set: use ADOdb_Active_Record::SetDatabaseAdaptor(\$db)", "DB"); - return $false; - } - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $db =& $activedb->db; - return $db; - } - - // retrieve ADODB_Active_Table - function &TableInfo() - { - global $_ADODB_ACTIVE_DBS; - - $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat]; - $table =& $activedb->tables[$this->_tableat]; - return $table; - } - - // set a numeric array (using natural table field ordering) as object properties - function Set(&$row) - { - $db =& $this->DB(); - - if (!$row) { - $this->_saved = false; - return false; - } - - $this->_saved = true; - - $table =& $this->TableInfo(); - if (sizeof($table->flds) != sizeof($row)) { - $this->Error("Table structure of $this->_table has changed","Load"); - return false; - } - - $cnt = 0; - foreach($table->flds as $name=>$fld) { - $this->$name = $row[$cnt]; - $cnt += 1; - } - $this->_original = $row; - return true; - } - - // get last inserted id for INSERT - function LastInsertID(&$db,$fieldname) - { - if ($db->hasInsertID) - $val = $db->Insert_ID($this->_table,$fieldname); - else - $val = false; - - if (is_null($val) || $val === false) { - // this might not work reliably in multi-user environment - return $db->GetOne("select max(".$fieldname.") from ".$this->_table); - } - return $val; - } - - // quote data in where clause - function doquote(&$db, $val,$t) - { - switch($t) { - case 'D': - case 'T': - if (empty($val)) return 'null'; - - case 'C': - case 'X': - if (is_null($val)) return 'null'; - - if (strncmp($val,"'",1) != 0 && substr($val,strlen($val)-1,1) != "'") { - return $db->qstr($val); - break; - } - default: - return $val; - break; - } - } - - // generate where clause for an UPDATE/SELECT - function GenWhere(&$db, &$table) - { - $keys = $table->keys; - $parr = array(); - - foreach($keys as $k) { - $f = $table->flds[$k]; - if ($f) { - $parr[] = $k.' = '.$this->doquote($db,$this->$k,$db->MetaType($f->type)); - } - } - return implode(' and ', $parr); - } - - - //------------------------------------------------------------ Public functions below - - function Load($where,$bindarr=false) - { - $db =& $this->DB(); if (!$db) return false; - $this->_where = $where; - - $save = $db->SetFetchMode(ADODB_FETCH_NUM); - $row = $db->GetRow("select * from ".$this->_table.' WHERE '.$where,$bindarr); - $db->SetFetchMode($save); - - return $this->Set($row); - } - - // false on error - function Save() - { - if ($this->_saved) $ok = $this->Update(); - else $ok = $this->Insert(); - - return $ok; - } - - // false on error - function Insert() - { - $db =& $this->DB(); if (!$db) return false; - $cnt = 0; - $table =& $this->TableInfo(); - - $valarr = array(); - $names = array(); - $valstr = array(); - - foreach($table->flds as $name=>$fld) { - $val = $this->$name; - if(!is_null($val) || !array_key_exists($name, $table->keys)) { - $valarr[] = $val; - $names[] = $name; - $valstr[] = $db->Param($cnt); - $cnt += 1; - } - } - - if (empty($names)){ - foreach($table->flds as $name=>$fld) { - $valarr[] = null; - $names[] = $name; - $valstr[] = $db->Param($cnt); - $cnt += 1; - } - } - $sql = 'INSERT INTO '.$this->_table."(".implode(',',$names).') VALUES ('.implode(',',$valstr).')'; - $ok = $db->Execute($sql,$valarr); - - if ($ok) { - $this->_saved = true; - $autoinc = false; - foreach($table->keys as $k) { - if (is_null($this->$k)) { - $autoinc = true; - break; - } - } - if ($autoinc && sizeof($table->keys) == 1) { - $k = reset($table->keys); - $this->$k = $this->LastInsertID($db,$k); - } - } - - $this->_original = $valarr; - return !empty($ok); - } - - function Delete() - { - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $where = $this->GenWhere($db,$table); - $sql = 'DELETE FROM '.$this->_table.' WHERE '.$where; - $ok = $db->Execute($sql); - - return $ok ? true : false; - } - - // returns an array of active record objects - function &Find($whereOrderBy,$bindarr=false,$pkeysArr=false) - { - $db =& $this->DB(); if (!$db || empty($this->_table)) return false; - $arr =& $db->GetActiveRecordsClass(get_class($this),$this->_table, $whereOrderBy,$bindarr,$pkeysArr); - return $arr; - } - - // returns 0 on error, 1 on update, 2 on insert - function Replace() - { - global $ADODB_ASSOC_CASE; - - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $pkey = $table->keys; - - foreach($table->flds as $name=>$fld) { - $val = $this->$name; - /* - if (is_null($val)) { - if (isset($fld->not_null) && $fld->not_null) { - if (isset($fld->default_value) && strlen($fld->default_value)) continue; - else { - $this->Error("Cannot update null into $name","Replace"); - return false; - } - } - }*/ - if (is_null($val) && !empty($fld->auto_increment)) { - continue; - } - $t = $db->MetaType($fld->type); - $arr[$name] = $this->doquote($db,$val,$t); - $valarr[] = $val; - } - - if (!is_array($pkey)) $pkey = array($pkey); - - - if ($ADODB_ASSOC_CASE == 0) - foreach($pkey as $k => $v) - $pkey[$k] = strtolower($v); - elseif ($ADODB_ASSOC_CASE == 0) - foreach($pkey as $k => $v) - $pkey[$k] = strtoupper($v); - - $ok = $db->Replace($this->_table,$arr,$pkey); - if ($ok) { - $this->_saved = true; // 1= update 2=insert - if ($ok == 2) { - $autoinc = false; - foreach($table->keys as $k) { - if (is_null($this->$k)) { - $autoinc = true; - break; - } - } - if ($autoinc && sizeof($table->keys) == 1) { - $k = reset($table->keys); - $this->$k = $this->LastInsertID($db,$k); - } - } - - $this->_original =& $valarr; - } - return $ok; - } - - // returns 0 on error, 1 on update, -1 if no change in data (no update) - function Update() - { - $db =& $this->DB(); if (!$db) return false; - $table =& $this->TableInfo(); - - $where = $this->GenWhere($db, $table); - - if (!$where) { - $this->error("Where missing for table $table", "Update"); - return false; - } - $valarr = array(); - $neworig = array(); - $pairs = array(); - $i = -1; - $cnt = 0; - foreach($table->flds as $name=>$fld) { - $i += 1; - $val = $this->$name; - $neworig[] = $val; - - if (isset($table->keys[$name])) { - continue; - } - - if (is_null($val)) { - if (isset($fld->not_null) && $fld->not_null) { - if (isset($fld->default_value) && strlen($fld->default_value)) continue; - else { - $this->Error("Cannot set field $name to NULL","Update"); - return false; - } - } - } - - if (isset($this->_original[$i]) && $val == $this->_original[$i]) { - continue; - } - $valarr[] = $val; - $pairs[] = $name.'='.$db->Param($cnt); - $cnt += 1; - } - - - if (!$cnt) return -1; - $sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where; - $ok = $db->Execute($sql,$valarr); - if ($ok) { - $this->_original =& $neworig; - return 1; - } - return 0; - } - - function GetAttributeNames() - { - $table =& $this->TableInfo(); - if (!$table) return false; - return array_keys($table->flds); - } - -}; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-csvlib.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-csvlib.inc.php deleted file mode 100755 index 25b82a8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-csvlib.inc.php +++ /dev/null @@ -1,312 +0,0 @@ -FieldCount() : 0; - - if ($sql) $sql = urlencode($sql); - // metadata setup - - if ($max <= 0 || $rs->dataProvider == 'empty') { // is insert/update/delete - if (is_object($conn)) { - $sql .= ','.$conn->Affected_Rows(); - $sql .= ','.$conn->Insert_ID(); - } else - $sql .= ',,'; - - $text = "====-1,0,$sql\n"; - return $text; - } - $tt = ($rs->timeCreated) ? $rs->timeCreated : time(); - - ## changed format from ====0 to ====1 - $line = "====1,$tt,$sql\n"; - - if ($rs->databaseType == 'array') { - $rows =& $rs->_array; - } else { - $rows = array(); - while (!$rs->EOF) { - $rows[] = $rs->fields; - $rs->MoveNext(); - } - } - - for($i=0; $i < $max; $i++) { - $o =& $rs->FetchField($i); - $flds[] = $o; - } - - $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; - $class = $rs->connection->arrayClass; - $rs2 = new $class(); - $rs2->sql = $rs->sql; - $rs2->oldProvider = $rs->dataProvider; - $rs2->InitArrayFields($rows,$flds); - $rs2->fetchMode = $savefetch; - return $line.serialize($rs2); - } - - -/** -* Open CSV file and convert it into Data. -* -* @param url file/ftp/http url -* @param err returns the error message -* @param timeout dispose if recordset has been alive for $timeout secs -* -* @return recordset, or false if error occured. If no -* error occurred in sql INSERT/UPDATE/DELETE, -* empty recordset is returned -*/ - function &csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array') - { - $false = false; - $err = false; - $fp = @fopen($url,'rb'); - if (!$fp) { - $err = $url.' file/URL not found'; - return $false; - } - @flock($fp, LOCK_SH); - $arr = array(); - $ttl = 0; - - if ($meta = fgetcsv($fp, 32000, ",")) { - // check if error message - if (strncmp($meta[0],'****',4) === 0) { - $err = trim(substr($meta[0],4,1024)); - fclose($fp); - return $false; - } - // check for meta data - // $meta[0] is -1 means return an empty recordset - // $meta[1] contains a time - - if (strncmp($meta[0], '====',4) === 0) { - - if ($meta[0] == "====-1") { - if (sizeof($meta) < 5) { - $err = "Corrupt first line for format -1"; - fclose($fp); - return $false; - } - fclose($fp); - - if ($timeout > 0) { - $err = " Illegal Timeout $timeout "; - return $false; - } - - $rs = new $rsclass($val=true); - $rs->fields = array(); - $rs->timeCreated = $meta[1]; - $rs->EOF = true; - $rs->_numOfFields = 0; - $rs->sql = urldecode($meta[2]); - $rs->affectedrows = (integer)$meta[3]; - $rs->insertid = $meta[4]; - return $rs; - } - # Under high volume loads, we want only 1 thread/process to _write_file - # so that we don't have 50 processes queueing to write the same data. - # We use probabilistic timeout, ahead of time. - # - # -4 sec before timeout, give processes 1/32 chance of timing out - # -2 sec before timeout, give processes 1/16 chance of timing out - # -1 sec after timeout give processes 1/4 chance of timing out - # +0 sec after timeout, give processes 100% chance of timing out - if (sizeof($meta) > 1) { - if($timeout >0){ - $tdiff = (integer)( $meta[1]+$timeout - time()); - if ($tdiff <= 2) { - switch($tdiff) { - case 4: - case 3: - if ((rand() & 31) == 0) { - fclose($fp); - $err = "Timeout 3"; - return $false; - } - break; - case 2: - if ((rand() & 15) == 0) { - fclose($fp); - $err = "Timeout 2"; - return $false; - } - break; - case 1: - if ((rand() & 3) == 0) { - fclose($fp); - $err = "Timeout 1"; - return $false; - } - break; - default: - fclose($fp); - $err = "Timeout 0"; - return $false; - } // switch - - } // if check flush cache - }// (timeout>0) - $ttl = $meta[1]; - } - //================================================ - // new cache format - use serialize extensively... - if ($meta[0] === '====1') { - // slurp in the data - $MAXSIZE = 128000; - - $text = fread($fp,$MAXSIZE); - if (strlen($text)) { - while ($txt = fread($fp,$MAXSIZE)) { - $text .= $txt; - } - } - fclose($fp); - $rs = unserialize($text); - if (is_object($rs)) $rs->timeCreated = $ttl; - else { - $err = "Unable to unserialize recordset"; - //echo htmlspecialchars($text),' !--END--!

    '; - } - return $rs; - } - - $meta = false; - $meta = fgetcsv($fp, 32000, ","); - if (!$meta) { - fclose($fp); - $err = "Unexpected EOF 1"; - return $false; - } - } - - // Get Column definitions - $flds = array(); - foreach($meta as $o) { - $o2 = explode(':',$o); - if (sizeof($o2)!=3) { - $arr[] = $meta; - $flds = false; - break; - } - $fld = new ADOFieldObject(); - $fld->name = urldecode($o2[0]); - $fld->type = $o2[1]; - $fld->max_length = $o2[2]; - $flds[] = $fld; - } - } else { - fclose($fp); - $err = "Recordset had unexpected EOF 2"; - return $false; - } - - // slurp in the data - $MAXSIZE = 128000; - - $text = ''; - while ($txt = fread($fp,$MAXSIZE)) { - $text .= $txt; - } - - fclose($fp); - @$arr = unserialize($text); - //var_dump($arr); - if (!is_array($arr)) { - $err = "Recordset had unexpected EOF (in serialized recordset)"; - if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!"; - return $false; - } - $rs = new $rsclass(); - $rs->timeCreated = $ttl; - $rs->InitArrayFields($arr,$flds); - return $rs; - } - - - /** - * Save a file $filename and its $contents (normally for caching) with file locking - */ - function adodb_write_file($filename, $contents,$debug=false) - { - # http://www.php.net/bugs.php?id=9203 Bug that flock fails on Windows - # So to simulate locking, we assume that rename is an atomic operation. - # First we delete $filename, then we create a $tempfile write to it and - # rename to the desired $filename. If the rename works, then we successfully - # modified the file exclusively. - # What a stupid need - having to simulate locking. - # Risks: - # 1. $tempfile name is not unique -- very very low - # 2. unlink($filename) fails -- ok, rename will fail - # 3. adodb reads stale file because unlink fails -- ok, $rs timeout occurs - # 4. another process creates $filename between unlink() and rename() -- ok, rename() fails and cache updated - if (strncmp(PHP_OS,'WIN',3) === 0) { - // skip the decimal place - $mtime = substr(str_replace(' ','_',microtime()),2); - // getmypid() actually returns 0 on Win98 - never mind! - $tmpname = $filename.uniqid($mtime).getmypid(); - if (!($fd = @fopen($tmpname,'a'))) return false; - $ok = ftruncate($fd,0); - if (!fwrite($fd,$contents)) $ok = false; - fclose($fd); - chmod($tmpname,0644); - // the tricky moment - @unlink($filename); - if (!@rename($tmpname,$filename)) { - unlink($tmpname); - $ok = false; - } - if (!$ok) { - if ($debug) ADOConnection::outp( " Rename $tmpname ".($ok? 'ok' : 'failed')); - } - return $ok; - } - if (!($fd = @fopen($filename, 'a'))) return false; - if (flock($fd, LOCK_EX) && ftruncate($fd, 0)) { - $ok = fwrite( $fd, $contents ); - fclose($fd); - chmod($filename,0644); - }else { - fclose($fd); - if ($debug)ADOConnection::outp( " Failed acquiring lock for $filename
    \n"); - $ok = false; - } - - return $ok; - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-datadict.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-datadict.inc.php deleted file mode 100755 index e0f39c1b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-datadict.inc.php +++ /dev/null @@ -1,889 +0,0 @@ -$str

    "; -$a= Lens_ParseArgs($str); -print "
    ";
    -print_r($a);
    -print "
    "; -} - - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { - return preg_match('/^[a-z0-9]*$/i', $text); - } -} - -//Lens_ParseTest(); - -/** - Parse arguments, treat "text" (text) and 'text' as quotation marks. - To escape, use "" or '' or )) - - Will read in "abc def" sans quotes, as: abc def - Same with 'abc def'. - However if `abc def`, then will read in as `abc def` - - @param endstmtchar Character that indicates end of statement - @param tokenchars Include the following characters in tokens apart from A-Z and 0-9 - @returns 2 dimensional array containing parsed tokens. -*/ -function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') -{ - $pos = 0; - $intoken = false; - $stmtno = 0; - $endquote = false; - $tokens = array(); - $tokens[$stmtno] = array(); - $max = strlen($args); - $quoted = false; - $tokarr = array(); - - while ($pos < $max) { - $ch = substr($args,$pos,1); - switch($ch) { - case ' ': - case "\t": - case "\n": - case "\r": - if (!$quoted) { - if ($intoken) { - $intoken = false; - $tokens[$stmtno][] = implode('',$tokarr); - } - break; - } - - $tokarr[] = $ch; - break; - - case '`': - if ($intoken) $tokarr[] = $ch; - case '(': - case ')': - case '"': - case "'": - - if ($intoken) { - if (empty($endquote)) { - $tokens[$stmtno][] = implode('',$tokarr); - if ($ch == '(') $endquote = ')'; - else $endquote = $ch; - $quoted = true; - $intoken = true; - $tokarr = array(); - } else if ($endquote == $ch) { - $ch2 = substr($args,$pos+1,1); - if ($ch2 == $endquote) { - $pos += 1; - $tokarr[] = $ch2; - } else { - $quoted = false; - $intoken = false; - $tokens[$stmtno][] = implode('',$tokarr); - $endquote = ''; - } - } else - $tokarr[] = $ch; - - }else { - - if ($ch == '(') $endquote = ')'; - else $endquote = $ch; - $quoted = true; - $intoken = true; - $tokarr = array(); - if ($ch == '`') $tokarr[] = '`'; - } - break; - - default: - - if (!$intoken) { - if ($ch == $endstmtchar) { - $stmtno += 1; - $tokens[$stmtno] = array(); - break; - } - - $intoken = true; - $quoted = false; - $endquote = false; - $tokarr = array(); - - } - - if ($quoted) $tokarr[] = $ch; - else if (ctype_alnum($ch) || strpos($tokenchars,$ch) !== false) $tokarr[] = $ch; - else { - if ($ch == $endstmtchar) { - $tokens[$stmtno][] = implode('',$tokarr); - $stmtno += 1; - $tokens[$stmtno] = array(); - $intoken = false; - $tokarr = array(); - break; - } - $tokens[$stmtno][] = implode('',$tokarr); - $tokens[$stmtno][] = $ch; - $intoken = false; - } - } - $pos += 1; - } - if ($intoken) $tokens[$stmtno][] = implode('',$tokarr); - - return $tokens; -} - - -class ADODB_DataDict { - var $connection; - var $debug = false; - var $dropTable = 'DROP TABLE %s'; - var $renameTable = 'RENAME TABLE %s TO %s'; - var $dropIndex = 'DROP INDEX %s'; - var $addCol = ' ADD'; - var $alterCol = ' ALTER COLUMN'; - var $dropCol = ' DROP COLUMN'; - var $renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s'; // table, old-column, new-column, column-definitions (not used by default) - var $nameRegex = '\w'; - var $nameRegexBrackets = 'a-zA-Z0-9_\(\)'; - var $schema = false; - var $serverInfo = array(); - var $autoIncrement = false; - var $dataProvider; - var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changetablesql - var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob - /// in other words, we use a text area for editting. - - function GetCommentSQL($table,$col) - { - return false; - } - - function SetCommentSQL($table,$col,$cmt) - { - return false; - } - - function MetaTables() - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaTables(); - } - - function MetaColumns($tab, $upper=true, $schema=false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema); - } - - function MetaPrimaryKeys($tab,$owner=false,$intkey=false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey); - } - - function MetaIndexes($table, $primary = false, $owner = false) - { - if (!$this->connection->IsConnected()) return array(); - return $this->connection->MetaIndexes($this->TableName($table), $primary, $owner); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - return ADORecordSet::MetaType($t,$len,$fieldobj); - } - - function NameQuote($name = NULL,$allowBrackets=false) - { - if (!is_string($name)) { - return FALSE; - } - - $name = trim($name); - - if ( !is_object($this->connection) ) { - return $name; - } - - $quote = $this->connection->nameQuote; - - // if name is of the form `name`, quote it - if ( preg_match('/^`(.+)`$/', $name, $matches) ) { - return $quote . $matches[1] . $quote; - } - - // if name contains special characters, quote it - $regex = ($allowBrackets) ? $this->nameRegexBrackets : $this->nameRegex; - - if ( !preg_match('/^[' . $regex . ']+$/', $name) ) { - return $quote . $name . $quote; - } - - return $name; - } - - function TableName($name) - { - if ( $this->schema ) { - return $this->NameQuote($this->schema) .'.'. $this->NameQuote($name); - } - return $this->NameQuote($name); - } - - // Executes the sql array returned by GetTableSQL and GetIndexSQL - function ExecuteSQLArray($sql, $continueOnError = true) - { - $rez = 2; - $conn = &$this->connection; - $saved = $conn->debug; - foreach($sql as $line) { - - if ($this->debug) $conn->debug = true; - $ok = $conn->Execute($line); - $conn->debug = $saved; - if (!$ok) { - if ($this->debug) ADOConnection::outp($conn->ErrorMsg()); - if (!$continueOnError) return 0; - $rez = 1; - } - } - return $rez; - } - - /** - Returns the actual type given a character code. - - C: varchar - X: CLOB (character large object) or largest varchar size if CLOB is not supported - C2: Multibyte varchar - X2: Multibyte CLOB - - B: BLOB (binary large object) - - D: Date - T: Date-time - L: Integer field suitable for storing booleans (0 or 1) - I: Integer - F: Floating point number - N: Numeric or decimal number - */ - - function ActualType($meta) - { - return $meta; - } - - function CreateDatabase($dbname,$options=false) - { - $options = $this->_Options($options); - $sql = array(); - - $s = 'CREATE DATABASE ' . $this->NameQuote($dbname); - if (isset($options[$this->upperName])) - $s .= ' '.$options[$this->upperName]; - - $sql[] = $s; - return $sql; - } - - /* - Generates the SQL to create index. Returns an array of sql strings. - */ - function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) - { - if (!is_array($flds)) { - $flds = explode(',',$flds); - } - - foreach($flds as $key => $fld) { - # some indexes can use partial fields, eg. index first 32 chars of "name" with NAME(32) - $flds[$key] = $this->NameQuote($fld,$allowBrackets=true); - } - - return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions)); - } - - function DropIndexSQL ($idxname, $tabname = NULL) - { - return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname))); - } - - function SetSchema($schema) - { - $this->schema = $schema; - } - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; - foreach($lines as $v) { - $sql[] = $alter . $v; - } - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - } - return $sql; - } - - /** - * Change the definition of one column - * - * As some DBM's can't do that on there own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; - foreach($lines as $v) { - $sql[] = $alter . $v; - } - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - - } - return $sql; - } - - /** - * Rename one column - * - * Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql) - * @param string $tabname table-name - * @param string $oldcolumn column-name to be renamed - * @param string $newcolumn new column-name - * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' - * @return array with SQL strings - */ - function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') - { - $tabname = $this->TableName ($tabname); - if ($flds) { - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - list(,$first) = each($lines); - list(,$column_def) = split("[\t ]+",$first,2); - } - return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); - } - - /** - * Drop one column - * - * Some DBM's can't do that on there own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' - * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - $sql = array(); - $alter = 'ALTER TABLE ' . $tabname . $this->dropCol . ' '; - foreach($flds as $v) { - $sql[] = $alter . $this->NameQuote($v); - } - return $sql; - } - - function DropTableSQL($tabname) - { - return array (sprintf($this->dropTable, $this->TableName($tabname))); - } - - function RenameTableSQL($tabname,$newname) - { - return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname))); - } - - /** - Generate the SQL to create table. Returns an array of sql strings. - */ - function CreateTableSQL($tabname, $flds, $tableoptions=array()) - { - list($lines,$pkey,$idxs) = $this->_GenFields($flds, true); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - - $taboptions = $this->_Options($tableoptions); - $tabname = $this->TableName ($tabname); - $sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions); - - // ggiunta - 2006/10/12 - KLUDGE: - // if we are on autoincrement, and table options includes REPLACE, the - // autoincrement sequence has already been dropped on table creation sql, so - // we avoid passing REPLACE to trigger creation code. This prevents - // creating sql that double-drops the sequence - if ($this->autoIncrement && isset($taboptions['REPLACE'])) - unset($taboptions['REPLACE']); - $tsql = $this->_Triggers($tabname,$taboptions); - foreach($tsql as $s) $sql[] = $s; - - if (is_array($idxs)) { - foreach($idxs as $idx => $idxdef) { - $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); - $sql = array_merge($sql, $sql_idxs); - } - } - - return $sql; - } - - function _GenFields($flds,$widespacing=false) - { - if (is_string($flds)) { - $padding = ' '; - $txt = $flds.$padding; - $flds = array(); - $flds0 = Lens_ParseArgs($txt,','); - $hasparam = false; - foreach($flds0 as $f0) { - $f1 = array(); - foreach($f0 as $token) { - switch (strtoupper($token)) { - case 'INDEX': - $f1['INDEX'] = ''; - // fall through intentionally - case 'CONSTRAINT': - case 'DEFAULT': - $hasparam = $token; - break; - default: - if ($hasparam) $f1[$hasparam] = $token; - else $f1[] = $token; - $hasparam = false; - break; - } - } - // 'index' token without a name means single column index: name it after column - if (array_key_exists('INDEX', $f1) && $f1['INDEX'] == '') { - $f1['INDEX'] = isset($f0['NAME']) ? $f0['NAME'] : $f0[0]; - // check if column name used to create an index name was quoted - if (($f1['INDEX'][0] == '"' || $f1['INDEX'][0] == "'" || $f1['INDEX'][0] == "`") && - ($f1['INDEX'][0] == substr($f1['INDEX'], -1))) { - $f1['INDEX'] = $f1['INDEX'][0].'idx_'.substr($f1['INDEX'], 1, -1).$f1['INDEX'][0]; - } - else - $f1['INDEX'] = 'idx_'.$f1['INDEX']; - } - // reset it, so we don't get next field 1st token as INDEX... - $hasparam = false; - - $flds[] = $f1; - - } - } - $this->autoIncrement = false; - $lines = array(); - $pkey = array(); - $idxs = array(); - foreach($flds as $fld) { - $fld = _array_change_key_case($fld); - - $fname = false; - $fdefault = false; - $fautoinc = false; - $ftype = false; - $fsize = false; - $fprec = false; - $fprimary = false; - $fnoquote = false; - $fdefts = false; - $fdefdate = false; - $fconstraint = false; - $fnotnull = false; - $funsigned = false; - $findex = ''; - $funiqueindex = false; - - //----------------- - // Parse attributes - foreach($fld as $attr => $v) { - if ($attr == 2 && is_numeric($v)) $attr = 'SIZE'; - else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v); - - switch($attr) { - case '0': - case 'NAME': $fname = $v; break; - case '1': - case 'TYPE': $ty = $v; $ftype = $this->ActualType(strtoupper($v)); break; - - case 'SIZE': - $dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,','); - if ($dotat === false) $fsize = $v; - else { - $fsize = substr($v,0,$dotat); - $fprec = substr($v,$dotat+1); - } - break; - case 'UNSIGNED': $funsigned = true; break; - case 'AUTOINCREMENT': - case 'AUTO': $fautoinc = true; $fnotnull = true; break; - case 'KEY': - // a primary key col can be non unique in itself (if key spans many cols...) - case 'PRIMARY': $fprimary = $v; $fnotnull = true; /*$funiqueindex = true;*/ break; - case 'DEF': - case 'DEFAULT': $fdefault = $v; break; - case 'NOTNULL': $fnotnull = $v; break; - case 'NOQUOTE': $fnoquote = $v; break; - case 'DEFDATE': $fdefdate = $v; break; - case 'DEFTIMESTAMP': $fdefts = $v; break; - case 'CONSTRAINT': $fconstraint = $v; break; - // let INDEX keyword create a 'very standard' index on column - case 'INDEX': $findex = $v; break; - case 'UNIQUE': $funiqueindex = true; break; - } //switch - } // foreach $fld - - //-------------------- - // VALIDATE FIELD INFO - if (!strlen($fname)) { - if ($this->debug) ADOConnection::outp("Undefined NAME"); - return false; - } - - $fid = strtoupper(preg_replace('/^`(.+)`$/', '$1', $fname)); - $fname = $this->NameQuote($fname); - - if (!strlen($ftype)) { - if ($this->debug) ADOConnection::outp("Undefined TYPE for field '$fname'"); - return false; - } else { - $ftype = strtoupper($ftype); - } - - $ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec); - - if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls - - if ($fprimary) $pkey[] = $fname; - - // some databases do not allow blobs to have defaults - if ($ty == 'X') $fdefault = false; - - // build list of indexes - if ($findex != '') { - if (array_key_exists($findex, $idxs)) { - $idxs[$findex]['cols'][] = ($fname); - if (in_array('UNIQUE', $idxs[$findex]['opts']) != $funiqueindex) { - if ($this->debug) ADOConnection::outp("Index $findex defined once UNIQUE and once not"); - } - if ($funiqueindex && !in_array('UNIQUE', $idxs[$findex]['opts'])) - $idxs[$findex]['opts'][] = 'UNIQUE'; - } - else - { - $idxs[$findex] = array(); - $idxs[$findex]['cols'] = array($fname); - if ($funiqueindex) - $idxs[$findex]['opts'] = array('UNIQUE'); - else - $idxs[$findex]['opts'] = array(); - } - } - - //-------------------- - // CONSTRUCT FIELD SQL - if ($fdefts) { - if (substr($this->connection->databaseType,0,5) == 'mysql') { - $ftype = 'TIMESTAMP'; - } else { - $fdefault = $this->connection->sysTimeStamp; - } - } else if ($fdefdate) { - if (substr($this->connection->databaseType,0,5) == 'mysql') { - $ftype = 'TIMESTAMP'; - } else { - $fdefault = $this->connection->sysDate; - } - } else if ($fdefault !== false && !$fnoquote) { - if ($ty == 'C' or $ty == 'X' or - ( substr($fdefault,0,1) != "'" && !is_numeric($fdefault))) { - - if (($ty == 'D' || $ty == 'T') && strtolower($fdefault) != 'null') { - // convert default date into database-aware code - if ($ty == 'T') - { - $fdefault = $this->connection->DBTimeStamp($fdefault); - } - else - { - $fdefault = $this->connection->DBDate($fdefault); - } - } - else - if (strlen($fdefault) != 1 && substr($fdefault,0,1) == ' ' && substr($fdefault,strlen($fdefault)-1) == ' ') - $fdefault = trim($fdefault); - else if (strtolower($fdefault) != 'null') - $fdefault = $this->connection->qstr($fdefault); - } - } - $suffix = $this->_CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned); - - // add index creation - if ($widespacing) $fname = str_pad($fname,24); - - // check for field names appearing twice - if (array_key_exists($fid, $lines)) { - ADOConnection::outp("Field '$fname' defined twice"); - } - - $lines[$fid] = $fname.' '.$ftype.$suffix; - - if ($fautoinc) $this->autoIncrement = true; - } // foreach $flds - - return array($lines,$pkey,$idxs); - } - - /** - GENERATE THE SIZE PART OF THE DATATYPE - $ftype is the actual type - $ty is the type defined originally in the DDL - */ - function _GetSize($ftype, $ty, $fsize, $fprec) - { - if (strlen($fsize) && $ty != 'X' && $ty != 'B' && strpos($ftype,'(') === false) { - $ftype .= "(".$fsize; - if (strlen($fprec)) $ftype .= ",".$fprec; - $ftype .= ')'; - } - return $ftype; - } - - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s .= '(' . $flds . ')'; - $sql[] = $s; - - return $sql; - } - - function _DropAutoIncrement($tabname) - { - return false; - } - - function _TableSQL($tabname,$lines,$pkey,$tableoptions) - { - $sql = array(); - - if (isset($tableoptions['REPLACE']) || isset ($tableoptions['DROP'])) { - $sql[] = sprintf($this->dropTable,$tabname); - if ($this->autoIncrement) { - $sInc = $this->_DropAutoIncrement($tabname); - if ($sInc) $sql[] = $sInc; - } - if ( isset ($tableoptions['DROP']) ) { - return $sql; - } - } - $s = "CREATE TABLE $tabname (\n"; - $s .= implode(",\n", $lines); - if (sizeof($pkey)>0) { - $s .= ",\n PRIMARY KEY ("; - $s .= implode(", ",$pkey).")"; - } - if (isset($tableoptions['CONSTRAINTS'])) - $s .= "\n".$tableoptions['CONSTRAINTS']; - - if (isset($tableoptions[$this->upperName.'_CONSTRAINTS'])) - $s .= "\n".$tableoptions[$this->upperName.'_CONSTRAINTS']; - - $s .= "\n)"; - if (isset($tableoptions[$this->upperName])) $s .= $tableoptions[$this->upperName]; - $sql[] = $s; - - return $sql; - } - - /** - GENERATE TRIGGERS IF NEEDED - used when table has auto-incrementing field that is emulated using triggers - */ - function _Triggers($tabname,$taboptions) - { - return array(); - } - - /** - Sanitize options, so that array elements with no keys are promoted to keys - */ - function _Options($opts) - { - if (!is_array($opts)) return array(); - $newopts = array(); - foreach($opts as $k => $v) { - if (is_numeric($k)) $newopts[strtoupper($v)] = $v; - else $newopts[strtoupper($k)] = $v; - } - return $newopts; - } - - /** - "Florian Buzin [ easywe ]" - - This function changes/adds new fields to your table. You don't - have to know if the col is new or not. It will check on its own. - */ - function ChangeTableSQL($tablename, $flds, $tableoptions = false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($this->connection->fetchMode !== false) $savem = $this->connection->SetFetchMode(false); - - // check table exists - $save_handler = $this->connection->raiseErrorFn; - $this->connection->raiseErrorFn = ''; - $cols = $this->MetaColumns($tablename); - $this->connection->raiseErrorFn = $save_handler; - - if (isset($savem)) $this->connection->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ( empty($cols)) { - return $this->CreateTableSQL($tablename, $flds, $tableoptions); - } - - if (is_array($flds)) { - // Cycle through the update fields, comparing - // existing fields to fields to update. - // if the Metatype and size is exactly the - // same, ignore - by Mark Newham - $holdflds = array(); - foreach($flds as $k=>$v) { - if ( isset($cols[$k]) && is_object($cols[$k]) ) { - // If already not allowing nulls, then don't change - $obj = $cols[$k]; - if (isset($obj->not_null) && $obj->not_null) - $v = str_replace('NOT NULL','',$v); - - $c = $cols[$k]; - $ml = $c->max_length; - $mt = $this->MetaType($c->type,$ml); - if ($ml == -1) $ml = ''; - if ($mt == 'X') $ml = $v['SIZE']; - if (($mt != $v['TYPE']) || $ml != $v['SIZE']) { - $holdflds[$k] = $v; - } - } else { - $holdflds[$k] = $v; - } - } - $flds = $holdflds; - } - - - // already exists, alter table instead - list($lines,$pkey,$idxs) = $this->_GenFields($flds); - // genfields can return FALSE at times - if ($lines == null) $lines = array(); - $alter = 'ALTER TABLE ' . $this->TableName($tablename); - $sql = array(); - - foreach ( $lines as $id => $v ) { - if ( isset($cols[$id]) && is_object($cols[$id]) ) { - - $flds = Lens_ParseArgs($v,','); - - // We are trying to change the size of the field, if not allowed, simply ignore the request. - if ($flds && in_array(strtoupper(substr($flds[0][1],0,4)),$this->invalidResizeTypes4)) { - echo "

    $this->alterCol cannot be changed to $flds currently

    "; - continue; - } - $sql[] = $alter . $this->alterCol . ' ' . $v; - } else { - $sql[] = $alter . $this->addCol . ' ' . $v; - } - } - - return $sql; - } -} // class -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-error.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-error.inc.php deleted file mode 100755 index 59c0dc23..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-error.inc.php +++ /dev/null @@ -1,258 +0,0 @@ - DB_ERROR_NOSUCHTABLE, - '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_ALREADY_EXISTS, - '/divide by zero$/' => DB_ERROR_DIVZERO, - '/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER, - '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD, - '/parser: parse error at or near \"/' => DB_ERROR_SYNTAX, - '/referential integrity violation/' => DB_ERROR_CONSTRAINT, - '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key violates unique constraint/' - => DB_ERROR_ALREADY_EXISTS - ); - reset($error_regexps); - while (list($regexp,$code) = each($error_regexps)) { - if (preg_match($regexp, $errormsg)) { - return $code; - } - } - // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; -} - -function adodb_error_odbc() -{ -static $MAP = array( - '01004' => DB_ERROR_TRUNCATED, - '07001' => DB_ERROR_MISMATCH, - '21S01' => DB_ERROR_MISMATCH, - '21S02' => DB_ERROR_MISMATCH, - '22003' => DB_ERROR_INVALID_NUMBER, - '22008' => DB_ERROR_INVALID_DATE, - '22012' => DB_ERROR_DIVZERO, - '23000' => DB_ERROR_CONSTRAINT, - '24000' => DB_ERROR_INVALID, - '34000' => DB_ERROR_INVALID, - '37000' => DB_ERROR_SYNTAX, - '42000' => DB_ERROR_SYNTAX, - 'IM001' => DB_ERROR_UNSUPPORTED, - 'S0000' => DB_ERROR_NOSUCHTABLE, - 'S0001' => DB_ERROR_NOT_FOUND, - 'S0002' => DB_ERROR_NOSUCHTABLE, - 'S0011' => DB_ERROR_ALREADY_EXISTS, - 'S0012' => DB_ERROR_NOT_FOUND, - 'S0021' => DB_ERROR_ALREADY_EXISTS, - 'S0022' => DB_ERROR_NOT_FOUND, - 'S1000' => DB_ERROR_NOSUCHTABLE, - 'S1009' => DB_ERROR_INVALID, - 'S1090' => DB_ERROR_INVALID, - 'S1C00' => DB_ERROR_NOT_CAPABLE - ); - return $MAP; -} - -function adodb_error_ibase() -{ -static $MAP = array( - -104 => DB_ERROR_SYNTAX, - -150 => DB_ERROR_ACCESS_VIOLATION, - -151 => DB_ERROR_ACCESS_VIOLATION, - -155 => DB_ERROR_NOSUCHTABLE, - -157 => DB_ERROR_NOSUCHFIELD, - -158 => DB_ERROR_VALUE_COUNT_ON_ROW, - -170 => DB_ERROR_MISMATCH, - -171 => DB_ERROR_MISMATCH, - -172 => DB_ERROR_INVALID, - -204 => DB_ERROR_INVALID, - -205 => DB_ERROR_NOSUCHFIELD, - -206 => DB_ERROR_NOSUCHFIELD, - -208 => DB_ERROR_INVALID, - -219 => DB_ERROR_NOSUCHTABLE, - -297 => DB_ERROR_CONSTRAINT, - -530 => DB_ERROR_CONSTRAINT, - -803 => DB_ERROR_CONSTRAINT, - -551 => DB_ERROR_ACCESS_VIOLATION, - -552 => DB_ERROR_ACCESS_VIOLATION, - -922 => DB_ERROR_NOSUCHDB, - -923 => DB_ERROR_CONNECT_FAILED, - -924 => DB_ERROR_CONNECT_FAILED - ); - - return $MAP; -} - -function adodb_error_ifx() -{ -static $MAP = array( - '-201' => DB_ERROR_SYNTAX, - '-206' => DB_ERROR_NOSUCHTABLE, - '-217' => DB_ERROR_NOSUCHFIELD, - '-329' => DB_ERROR_NODBSELECTED, - '-1204' => DB_ERROR_INVALID_DATE, - '-1205' => DB_ERROR_INVALID_DATE, - '-1206' => DB_ERROR_INVALID_DATE, - '-1209' => DB_ERROR_INVALID_DATE, - '-1210' => DB_ERROR_INVALID_DATE, - '-1212' => DB_ERROR_INVALID_DATE - ); - - return $MAP; -} - -function adodb_error_oci8() -{ -static $MAP = array( - 1 => DB_ERROR_ALREADY_EXISTS, - 900 => DB_ERROR_SYNTAX, - 904 => DB_ERROR_NOSUCHFIELD, - 923 => DB_ERROR_SYNTAX, - 942 => DB_ERROR_NOSUCHTABLE, - 955 => DB_ERROR_ALREADY_EXISTS, - 1476 => DB_ERROR_DIVZERO, - 1722 => DB_ERROR_INVALID_NUMBER, - 2289 => DB_ERROR_NOSUCHTABLE, - 2291 => DB_ERROR_CONSTRAINT, - 2449 => DB_ERROR_CONSTRAINT - ); - - return $MAP; -} - -function adodb_error_mssql() -{ -static $MAP = array( - 208 => DB_ERROR_NOSUCHTABLE, - 2601 => DB_ERROR_ALREADY_EXISTS - ); - - return $MAP; -} - -function adodb_error_sqlite() -{ -static $MAP = array( - 1 => DB_ERROR_SYNTAX - ); - - return $MAP; -} - -function adodb_error_mysql() -{ -static $MAP = array( - 1004 => DB_ERROR_CANNOT_CREATE, - 1005 => DB_ERROR_CANNOT_CREATE, - 1006 => DB_ERROR_CANNOT_CREATE, - 1007 => DB_ERROR_ALREADY_EXISTS, - 1008 => DB_ERROR_CANNOT_DROP, - 1045 => DB_ERROR_ACCESS_VIOLATION, - 1046 => DB_ERROR_NODBSELECTED, - 1049 => DB_ERROR_NOSUCHDB, - 1050 => DB_ERROR_ALREADY_EXISTS, - 1051 => DB_ERROR_NOSUCHTABLE, - 1054 => DB_ERROR_NOSUCHFIELD, - 1062 => DB_ERROR_ALREADY_EXISTS, - 1064 => DB_ERROR_SYNTAX, - 1100 => DB_ERROR_NOT_LOCKED, - 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, - 1146 => DB_ERROR_NOSUCHTABLE, - 1048 => DB_ERROR_CONSTRAINT, - 2002 => DB_ERROR_CONNECT_FAILED, - 2005 => DB_ERROR_CONNECT_FAILED - ); - - return $MAP; -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorhandler.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorhandler.inc.php deleted file mode 100755 index b21c368b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorhandler.inc.php +++ /dev/null @@ -1,79 +0,0 @@ -$s

    "; - trigger_error($s,ADODB_ERROR_HANDLER_TYPE); -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorpear.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorpear.inc.php deleted file mode 100755 index 01f6a57a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-errorpear.inc.php +++ /dev/null @@ -1,88 +0,0 @@ -!$s

    "; -} - -/** -* Returns last PEAR_Error object. This error might be for an error that -* occured several sql statements ago. -*/ -function &ADODB_PEAR_Error() -{ -global $ADODB_Last_PEAR_Error; - - return $ADODB_Last_PEAR_Error; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-exceptions.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-exceptions.inc.php deleted file mode 100755 index a89bb6f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-exceptions.inc.php +++ /dev/null @@ -1,82 +0,0 @@ -sql = $p1; - $this->params = $p2; - $s = "$dbms error: [$errno: $errmsg] in $fn(\"$p1\")\n"; - break; - - case 'PCONNECT': - case 'CONNECT': - $user = $thisConnection->user; - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n"; - break; - default: - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n"; - break; - } - - $this->dbms = $dbms; - if ($thisConnection) { - $this->host = $thisConnection->host; - $this->database = $thisConnection->database; - } - $this->fn = $fn; - $this->msg = $errmsg; - - if (!is_numeric($errno)) $errno = -1; - parent::__construct($s,$errno); - } -} - -/** -* Default Error Handler. This will be called with the following params -* -* @param $dbms the RDBMS you are connecting to -* @param $fn the name of the calling function (in uppercase) -* @param $errno the native error number from the database -* @param $errmsg the native error msg from the database -* @param $p1 $fn specific parameter - see below -* @param $P2 $fn specific parameter - see below -*/ - -function adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection) -{ -global $ADODB_EXCEPTION; - - if (error_reporting() == 0) return; // obey @ protocol - if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION; - else $errfn = 'ADODB_EXCEPTION'; - throw new $errfn($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection); -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-iterator.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-iterator.inc.php deleted file mode 100755 index 54afef96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-iterator.inc.php +++ /dev/null @@ -1,85 +0,0 @@ -Execute("select * from adoxyz"); - foreach($rs as $k => $v) { - echo $k; print_r($v); echo "
    "; - } - - - Iterator code based on http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2 - */ - - - class ADODB_Iterator implements Iterator { - - private $rs; - - function __construct($rs) - { - $this->rs = $rs; - } - function rewind() - { - $this->rs->MoveFirst(); - } - - function valid() - { - return !$this->rs->EOF; - } - - function key() - { - return $this->rs->_currentRow; - } - - function current() - { - return $this->rs->fields; - } - - function next() - { - $this->rs->MoveNext(); - } - - function __call($func, $params) - { - return call_user_func_array(array($this->rs, $func), $params); - } - - - function hasMore() - { - return !$this->rs->EOF; - } - -} - - -class ADODB_BASE_RS implements IteratorAggregate { - function getIterator() { - return new ADODB_Iterator($this); - } - - /* this is experimental - i don't really know what to return... */ - function __toString() - { - include_once(ADODB_DIR.'/toexport.inc.php'); - return _adodb_export($this,',',',',false,true); - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-lib.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-lib.inc.php deleted file mode 100755 index c24dc5b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-lib.inc.php +++ /dev/null @@ -1,1137 +0,0 @@ - sizeof($array)) $max = sizeof($array); - else $max = $probe; - - - for ($j=0;$j < $max; $j++) { - $row =& $array[$j]; - if (!$row) break; - $i = -1; - foreach($row as $v) { - $i += 1; - - if (isset($types[$i]) && $types[$i]=='C') continue; - - //print " ($i ".$types[$i]. "$v) "; - $v = trim($v); - - if (!preg_match('/^[+-]{0,1}[0-9\.]+$/',$v)) { - $types[$i] = 'C'; // once C, always C - - continue; - } - if ($j == 0) { - // If empty string, we presume is character - // test for integer for 1st row only - // after that it is up to testing other rows to prove - // that it is not an integer - if (strlen($v) == 0) $types[$i] = 'C'; - if (strpos($v,'.') !== false) $types[$i] = 'N'; - else $types[$i] = 'I'; - continue; - } - - if (strpos($v,'.') !== false) $types[$i] = 'N'; - - } - } - -} - -function adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs) -{ - $oldX = sizeof(reset($arr)); - $oldY = sizeof($arr); - - if ($hdr) { - $startx = 1; - $hdr = array('Fields'); - for ($y = 0; $y < $oldY; $y++) { - $hdr[] = $arr[$y][0]; - } - } else - $startx = 0; - - for ($x = $startx; $x < $oldX; $x++) { - if ($fobjs) { - $o = $fobjs[$x]; - $newarr[] = array($o->name); - } else - $newarr[] = array(); - - for ($y = 0; $y < $oldY; $y++) { - $newarr[$x-$startx][] = $arr[$y][$x]; - } - } -} - -// Force key to upper. -// See also http://www.php.net/manual/en/function.array-change-key-case.php -function _array_change_key_case($an_array) -{ - if (is_array($an_array)) { - $new_array = array(); - foreach($an_array as $key=>$value) - $new_array[strtoupper($key)] = $value; - - return $new_array; - } - - return $an_array; -} - -function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc) -{ - if (count($fieldArray) == 0) return 0; - $first = true; - $uSet = ''; - - if (!is_array($keyCol)) { - $keyCol = array($keyCol); - } - foreach($fieldArray as $k => $v) { - if ($autoQuote && !is_numeric($v) and strncmp($v,"'",1) !== 0 and strcasecmp($v,$zthis->null2null)!=0) { - $v = $zthis->qstr($v); - $fieldArray[$k] = $v; - } - if (in_array($k,$keyCol)) continue; // skip UPDATE if is key - - if ($first) { - $first = false; - $uSet = "$k=$v"; - } else - $uSet .= ",$k=$v"; - } - - $where = false; - foreach ($keyCol as $v) { - if (isset($fieldArray[$v])) { - if ($where) $where .= ' and '.$v.'='.$fieldArray[$v]; - else $where = $v.'='.$fieldArray[$v]; - } - } - - if ($uSet && $where) { - $update = "UPDATE $table SET $uSet WHERE $where"; - - $rs = $zthis->Execute($update); - - - if ($rs) { - if ($zthis->poorAffectedRows) { - /* - The Select count(*) wipes out any errors that the update would have returned. - http://phplens.com/lens/lensforum/msgs.php?id=5696 - */ - if ($zthis->ErrorNo()<>0) return 0; - - # affected_rows == 0 if update field values identical to old values - # for mysql - which is silly. - - $cnt = $zthis->GetOne("select count(*) from $table where $where"); - if ($cnt > 0) return 1; // record already exists - } else { - if (($zthis->Affected_Rows()>0)) return 1; - } - } else - return 0; - } - - // print "

    Error=".$this->ErrorNo().'

    '; - $first = true; - foreach($fieldArray as $k => $v) { - if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col - - if ($first) { - $first = false; - $iCols = "$k"; - $iVals = "$v"; - } else { - $iCols .= ",$k"; - $iVals .= ",$v"; - } - } - $insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; - $rs = $zthis->Execute($insert); - return ($rs) ? 2 : 0; -} - -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM -function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) -{ - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; - - $s = '\n"; -} - -// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM -function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) -{ - $hasvalue = false; - - if ($multiple or is_array($defstr)) { - if ($size==0) $size=5; - $attr = ' multiple size="'.$size.'"'; - if (!strpos($name,'[]')) $name .= '[]'; - } else if ($size) $attr = ' size="'.$size.'"'; - else $attr =''; - - $s = '\n"; -} - - -/* - Count the number of records this sql statement will return by using - query rewriting heuristics... - - Does not work with UNIONs, except with postgresql and oracle. - - Usage: - - $conn->Connect(...); - $cnt = _adodb_getcount($conn, $sql); - -*/ -function _adodb_getcount(&$zthis, $sql,$inputarr=false,$secs2cache=0) -{ - $qryRecs = 0; - - if (!empty($zthis->_nestedSQL) || preg_match("/^\s*SELECT\s+DISTINCT/is", $sql) || - preg_match('/\s+GROUP\s+BY\s+/is',$sql) || - preg_match('/\s+UNION\s+/is',$sql)) { - // ok, has SELECT DISTINCT or GROUP BY so see if we can use a table alias - // but this is only supported by oracle and postgresql... - if ($zthis->dataProvider == 'oci8') { - - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql); - - // Allow Oracle hints to be used for query optimization, Chris Wrye - if (preg_match('#/\\*+.*?\\*\\/#', $sql, $hint)) { - $rewritesql = "SELECT ".$hint[0]." COUNT(*) FROM (".$rewritesql.")"; - } else - $rewritesql = "SELECT COUNT(*) FROM (".$rewritesql.")"; - - } else if (strncmp($zthis->databaseType,'postgres',8) == 0) { - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql); - $rewritesql = "SELECT COUNT(*) FROM ($rewritesql) _ADODB_ALIAS_"; - } - } else { - // now replace SELECT ... FROM with SELECT COUNT(*) FROM - $rewritesql = preg_replace( - '/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql); - - - - // fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails - // with mssql, access and postgresql. Also a good speedup optimization - skips sorting! - // also see http://phplens.com/lens/lensforum/msgs.php?id=12752 - if (preg_match('/\sORDER\s+BY\s*\(/i',$rewritesql)) - $rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$rewritesql); - else - $rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$rewritesql); - } - - - - if (isset($rewritesql) && $rewritesql != $sql) { - if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[1]; - - if ($secs2cache) { - // we only use half the time of secs2cache because the count can quickly - // become inaccurate if new records are added - $qryRecs = $zthis->CacheGetOne($secs2cache/2,$rewritesql,$inputarr); - - } else { - $qryRecs = $zthis->GetOne($rewritesql,$inputarr); - } - if ($qryRecs !== false) return $qryRecs; - } - //-------------------------------------------- - // query rewrite failed - so try slower way... - - - // strip off unneeded ORDER BY if no UNION - if (preg_match('/\s*UNION\s*/is', $sql)) $rewritesql = $sql; - else $rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql); - - if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[0]; - - $rstest = &$zthis->Execute($rewritesql,$inputarr); - if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr); - - if ($rstest) { - $qryRecs = $rstest->RecordCount(); - if ($qryRecs == -1) { - global $ADODB_EXTENSION; - // some databases will return -1 on MoveLast() - change to MoveNext() - if ($ADODB_EXTENSION) { - while(!$rstest->EOF) { - adodb_movenext($rstest); - } - } else { - while(!$rstest->EOF) { - $rstest->MoveNext(); - } - } - $qryRecs = $rstest->_currentRow; - } - $rstest->Close(); - if ($qryRecs == -1) return 0; - } - return $qryRecs; -} - -/* - Code originally from "Cornel G" - - This code might not work with SQL that has UNION in it - - Also if you are using CachePageExecute(), there is a strong possibility that - data will get out of synch. use CachePageExecute() only with tables that - rarely change. -*/ -function &_adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, - $inputarr=false, $secs2cache=0) -{ - $atfirstpage = false; - $atlastpage = false; - $lastpageno=1; - - // If an invalid nrows is supplied, - // we assume a default value of 10 rows per page - if (!isset($nrows) || $nrows <= 0) $nrows = 10; - - $qryRecs = false; //count records for no offset - - $qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache); - $lastpageno = (int) ceil($qryRecs / $nrows); - $zthis->_maxRecordCount = $qryRecs; - - - - // ***** Here we check whether $page is the last page or - // whether we are trying to retrieve - // a page number greater than the last page number. - if ($page >= $lastpageno) { - $page = $lastpageno; - $atlastpage = true; - } - - // If page number <= 1, then we are at the first page - if (empty($page) || $page <= 1) { - $page = 1; - $atfirstpage = true; - } - - // We get the data we want - $offset = $nrows * ($page-1); - if ($secs2cache > 0) - $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); - else - $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); - - - // Before returning the RecordSet, we set the pagination properties we need - if ($rsreturn) { - $rsreturn->_maxRecordCount = $qryRecs; - $rsreturn->rowsPerPage = $nrows; - $rsreturn->AbsolutePage($page); - $rsreturn->AtFirstPage($atfirstpage); - $rsreturn->AtLastPage($atlastpage); - $rsreturn->LastPageNo($lastpageno); - } - return $rsreturn; -} - -// Ivn Oliva version -function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) -{ - - $atfirstpage = false; - $atlastpage = false; - - if (!isset($page) || $page <= 1) { // If page number <= 1, then we are at the first page - $page = 1; - $atfirstpage = true; - } - if ($nrows <= 0) $nrows = 10; // If an invalid nrows is supplied, we assume a default value of 10 rows per page - - // ***** Here we check whether $page is the last page or whether we are trying to retrieve a page number greater than - // the last page number. - $pagecounter = $page + 1; - $pagecounteroffset = ($pagecounter * $nrows) - $nrows; - if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); - else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); - if ($rstest) { - while ($rstest && $rstest->EOF && $pagecounter>0) { - $atlastpage = true; - $pagecounter--; - $pagecounteroffset = $nrows * ($pagecounter - 1); - $rstest->Close(); - if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); - else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); - } - if ($rstest) $rstest->Close(); - } - if ($atlastpage) { // If we are at the last page or beyond it, we are going to retrieve it - $page = $pagecounter; - if ($page == 1) $atfirstpage = true; // We have to do this again in case the last page is the same as the first - //... page, that is, the recordset has only 1 page. - } - - // We get the data we want - $offset = $nrows * ($page-1); - if ($secs2cache > 0) $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); - else $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); - - // Before returning the RecordSet, we set the pagination properties we need - if ($rsreturn) { - $rsreturn->rowsPerPage = $nrows; - $rsreturn->AbsolutePage($page); - $rsreturn->AtFirstPage($atfirstpage); - $rsreturn->AtLastPage($atlastpage); - } - return $rsreturn; -} - -function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=2) -{ - global $ADODB_QUOTE_FIELDNAMES; - - if (!$rs) { - printf(ADODB_BAD_RS,'GetUpdateSQL'); - return false; - } - - $fieldUpdatedCount = 0; - $arrFields = _array_change_key_case($arrFields); - - $hasnumeric = isset($rs->fields[0]); - $setFields = ''; - - // Loop through all of the fields in the recordset - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { - // Get the field from the recordset - $field = $rs->FetchField($i); - - // If the recordset field is one - // of the fields passed in then process. - $upperfname = strtoupper($field->name); - if (adodb_key_exists($upperfname,$arrFields,$force)) { - - // If the existing field value in the recordset - // is different from the value passed in then - // go ahead and append the field name and new value to - // the update query. - - if ($hasnumeric) $val = $rs->fields[$i]; - else if (isset($rs->fields[$upperfname])) $val = $rs->fields[$upperfname]; - else if (isset($rs->fields[$field->name])) $val = $rs->fields[$field->name]; - else if (isset($rs->fields[strtolower($upperfname)])) $val = $rs->fields[strtolower($upperfname)]; - else $val = ''; - - - if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) { - // Set the counter for the number of fields that will be updated. - $fieldUpdatedCount++; - - // Based on the datatype of the field - // Format the value properly for the database - $type = $rs->MetaType($field->type); - - - if ($type == 'null') { - $type = 'C'; - } - - if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) - $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; - else - $fnameq = $upperfname; - - - // is_null requires php 4.0.4 - //********************************************************// - if (is_null($arrFields[$upperfname]) - || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) - || $arrFields[$upperfname] === $zthis->null2null - ) - { - switch ($force) { - - //case 0: - // //Ignore empty values. This is allready handled in "adodb_key_exists" function. - //break; - - case 1: - //Set null - $setFields .= $field->name . " = null, "; - break; - - case 2: - //Set empty - $arrFields[$upperfname] = ""; - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); - break; - default: - case 3: - //Set the value that was given in array, so you can give both null and empty values - if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { - $setFields .= $field->name . " = null, "; - } else { - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); - } - break; - } - //********************************************************// - } else { - //we do this so each driver can customize the sql for - //DB specific column types. - //Oracle needs BLOB types to be handled with a returning clause - //postgres has special needs as well - $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq, - $arrFields, $magicq); - } - } - } - } - - // If there were any modified fields then build the rest of the update query. - if ($fieldUpdatedCount > 0 || $forceUpdate) { - // Get the table name from the existing query. - if (!empty($rs->tableName)) $tableName = $rs->tableName; - else { - preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName); - $tableName = $tableName[1]; - } - // Get the full where clause excluding the word "WHERE" from - // the existing query. - preg_match('/\sWHERE\s(.*)/is', $rs->sql, $whereClause); - - $discard = false; - // not a good hack, improvements? - if ($whereClause) { - #var_dump($whereClause); - if (preg_match('/\s(ORDER\s.*)/is', $whereClause[1], $discard)); - else if (preg_match('/\s(LIMIT\s.*)/is', $whereClause[1], $discard)); - else if (preg_match('/\s(FOR UPDATE.*)/is', $whereClause[1], $discard)); - else preg_match('/\s.*(\) WHERE .*)/is', $whereClause[1], $discard); # see http://sourceforge.net/tracker/index.php?func=detail&aid=1379638&group_id=42718&atid=433976 - } else - $whereClause = array(false,false); - - if ($discard) - $whereClause[1] = substr($whereClause[1], 0, strlen($whereClause[1]) - strlen($discard[1])); - - $sql = 'UPDATE '.$tableName.' SET '.substr($setFields, 0, -2); - if (strlen($whereClause[1]) > 0) - $sql .= ' WHERE '.$whereClause[1]; - - return $sql; - - } else { - return false; - } -} - -function adodb_key_exists($key, &$arr,$force=2) -{ - if ($force<=0) { - // the following is the old behaviour where null or empty fields are ignored - return (!empty($arr[$key])) || (isset($arr[$key]) && strlen($arr[$key])>0); - } - - if (isset($arr[$key])) return true; - ## null check below - if (ADODB_PHPVER >= 0x4010) return array_key_exists($key,$arr); - return false; -} - -/** - * There is a special case of this function for the oci8 driver. - * The proper way to handle an insert w/ a blob in oracle requires - * a returning clause with bind variables and a descriptor blob. - * - * - */ -function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false,$force=2) -{ -static $cacheRS = false; -static $cacheSig = 0; -static $cacheCols; - global $ADODB_QUOTE_FIELDNAMES; - - $tableName = ''; - $values = ''; - $fields = ''; - $recordSet = null; - $arrFields = _array_change_key_case($arrFields); - $fieldInsertedCount = 0; - - if (is_string($rs)) { - //ok we have a table name - //try and get the column info ourself. - $tableName = $rs; - - //we need an object for the recordSet - //because we have to call MetaType. - //php can't do a $rsclass::MetaType() - $rsclass = $zthis->rsPrefix.$zthis->databaseType; - $recordSet = new $rsclass(-1,$zthis->fetchMode); - $recordSet->connection = &$zthis; - - if (is_string($cacheRS) && $cacheRS == $rs) { - $columns =& $cacheCols; - } else { - $columns = $zthis->MetaColumns( $tableName ); - $cacheRS = $tableName; - $cacheCols = $columns; - } - } else if (is_subclass_of($rs, 'adorecordset')) { - if (isset($rs->insertSig) && is_integer($cacheRS) && $cacheRS == $rs->insertSig) { - $columns =& $cacheCols; - } else { - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) - $columns[] = $rs->FetchField($i); - $cacheRS = $cacheSig; - $cacheCols = $columns; - $rs->insertSig = $cacheSig++; - } - $recordSet =& $rs; - - } else { - printf(ADODB_BAD_RS,'GetInsertSQL'); - return false; - } - - // Loop through all of the fields in the recordset - foreach( $columns as $field ) { - $upperfname = strtoupper($field->name); - if (adodb_key_exists($upperfname,$arrFields,$force)) { - $bad = false; - if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) - $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; - else - $fnameq = $upperfname; - - $type = $recordSet->MetaType($field->type); - - /********************************************************/ - if (is_null($arrFields[$upperfname]) - || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) - || $arrFields[$upperfname] === $zthis->null2null - ) - { - switch ($force) { - - case 0: // we must always set null if missing - $bad = true; - break; - - case 1: - $values .= "null, "; - break; - - case 2: - //Set empty - $arrFields[$upperfname] = ""; - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq,$arrFields, $magicq); - break; - - default: - case 3: - //Set the value that was given in array, so you can give both null and empty values - if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { - $values .= "null, "; - } else { - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, $arrFields, $magicq); - } - break; - } // switch - - /*********************************************************/ - } else { - //we do this so each driver can customize the sql for - //DB specific column types. - //Oracle needs BLOB types to be handled with a returning clause - //postgres has special needs as well - $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, - $arrFields, $magicq); - } - - if ($bad) continue; - // Set the counter for the number of fields that will be inserted. - $fieldInsertedCount++; - - - // Get the name of the fields to insert - $fields .= $fnameq . ", "; - } - } - - - // If there were any inserted fields then build the rest of the insert query. - if ($fieldInsertedCount <= 0) return false; - - // Get the table name from the existing query. - if (!$tableName) { - if (!empty($rs->tableName)) $tableName = $rs->tableName; - else if (preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName)) - $tableName = $tableName[1]; - else - return false; - } - - // Strip off the comma and space on the end of both the fields - // and their values. - $fields = substr($fields, 0, -2); - $values = substr($values, 0, -2); - - // Append the fields and their values to the insert query. - return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )'; -} - - -/** - * This private method is used to help construct - * the update/sql which is generated by GetInsertSQL and GetUpdateSQL. - * It handles the string construction of 1 column -> sql string based on - * the column type. We want to do 'safe' handling of BLOBs - * - * @param string the type of sql we are trying to create - * 'I' or 'U'. - * @param string column data type from the db::MetaType() method - * @param string the column name - * @param array the column value - * - * @return string - * - */ -function _adodb_column_sql_oci8(&$zthis,$action, $type, $fname, $fnameq, $arrFields, $magicq) -{ - $sql = ''; - - // Based on the datatype of the field - // Format the value properly for the database - switch($type) { - case 'B': - //in order to handle Blobs correctly, we need - //to do some magic for Oracle - - //we need to create a new descriptor to handle - //this properly - if (!empty($zthis->hasReturningInto)) { - if ($action == 'I') { - $sql = 'empty_blob(), '; - } else { - $sql = $fnameq. '=empty_blob(), '; - } - //add the variable to the returning clause array - //so the user can build this later in - //case they want to add more to it - $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; - } else if (empty($arrFields[$fname])){ - if ($action == 'I') { - $sql = 'empty_blob(), '; - } else { - $sql = $fnameq. '=empty_blob(), '; - } - } else { - //this is to maintain compatibility - //with older adodb versions. - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - } - break; - - case "X": - //we need to do some more magic here for long variables - //to handle these correctly in oracle. - - //create a safe bind var name - //to avoid conflicts w/ dupes. - if (!empty($zthis->hasReturningInto)) { - if ($action == 'I') { - $sql = ':xx'.$fname.'xx, '; - } else { - $sql = $fnameq.'=:xx'.$fname.'xx, '; - } - //add the variable to the returning clause array - //so the user can build this later in - //case they want to add more to it - $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; - } else { - //this is to maintain compatibility - //with older adodb versions. - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - } - break; - - default: - $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); - break; - } - - return $sql; -} - -function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse=true) -{ - - if ($recurse) { - switch($zthis->dataProvider) { - case 'postgres': - if ($type == 'L') $type = 'C'; - break; - case 'oci8': - return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq); - - } - } - - switch($type) { - case "C": - case "X": - case 'B': - $val = $zthis->qstr($arrFields[$fname],$magicq); - break; - - case "D": - $val = $zthis->DBDate($arrFields[$fname]); - break; - - case "T": - $val = $zthis->DBTimeStamp($arrFields[$fname]); - break; - - default: - $val = $arrFields[$fname]; - if (empty($val)) $val = '0'; - break; - } - - if ($action == 'I') return $val . ", "; - - - return $fnameq . "=" . $val . ", "; - -} - - - -function _adodb_debug_execute(&$zthis, $sql, $inputarr) -{ - $ss = ''; - if ($inputarr) { - foreach($inputarr as $kk=>$vv) { - if (is_string($vv) && strlen($vv)>64) $vv = substr($vv,0,64).'...'; - $ss .= "($kk=>'$vv') "; - } - $ss = "[ $ss ]"; - } - $sqlTxt = is_array($sql) ? $sql[0] : $sql; - /*str_replace(', ','##1#__^LF',is_array($sql) ? $sql[0] : $sql); - $sqlTxt = str_replace(',',', ',$sqlTxt); - $sqlTxt = str_replace('##1#__^LF', ', ' ,$sqlTxt); - */ - // check if running from browser or command-line - $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); - - $dbt = $zthis->databaseType; - if (isset($zthis->dsnType)) $dbt .= '-'.$zthis->dsnType; - if ($inBrowser) { - if ($ss) { - $ss = ''.htmlspecialchars($ss).''; - } - if ($zthis->debug === -1) - ADOConnection::outp( "
    \n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
    \n",false); - else - ADOConnection::outp( "


    \n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
    \n",false); - } else { - ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false); - } - - $qID = $zthis->_query($sql,$inputarr); - - /* - Alexios Fakios notes that ErrorMsg() must be called before ErrorNo() for mssql - because ErrorNo() calls Execute('SELECT @ERROR'), causing recursion - */ - if ($zthis->databaseType == 'mssql') { - // ErrorNo is a slow function call in mssql, and not reliable in PHP 4.0.6 - if($emsg = $zthis->ErrorMsg()) { - if ($err = $zthis->ErrorNo()) ADOConnection::outp($err.': '.$emsg); - } - } else if (!$qID) { - ADOConnection::outp($zthis->ErrorNo() .': '. $zthis->ErrorMsg()); - } - - if ($zthis->debug === 99) _adodb_backtrace(true,9999,2); - return $qID; -} - -# pretty print the debug_backtrace function -function _adodb_backtrace($printOrArr=true,$levels=9999,$skippy=0) -{ - if (!function_exists('debug_backtrace')) return ''; - - $html = (isset($_SERVER['HTTP_USER_AGENT'])); - $fmt = ($html) ? "
    %% line %4d, file: %s" : "%% line %4d, file: %s"; - - $MAXSTRLEN = 128; - - $s = ($html) ? '
    ' : '';
    -	
    -	if (is_array($printOrArr)) $traceArr = $printOrArr;
    -	else $traceArr = debug_backtrace();
    -	array_shift($traceArr);
    -	array_shift($traceArr);
    -	$tabs = sizeof($traceArr)-2;
    -	
    -	foreach ($traceArr as $arr) {
    -		if ($skippy) {$skippy -= 1; continue;}
    -		$levels -= 1;
    -		if ($levels < 0) break;
    -		
    -		$args = array();
    -		for ($i=0; $i < $tabs; $i++) $s .=  ($html) ? '   ' : "\t";
    -		$tabs -= 1;
    -		if ($html) $s .= '';
    -		if (isset($arr['class'])) $s .= $arr['class'].'.';
    -		if (isset($arr['args']))
    -		 foreach($arr['args'] as $v) {
    -			if (is_null($v)) $args[] = 'null';
    -			else if (is_array($v)) $args[] = 'Array['.sizeof($v).']';
    -			else if (is_object($v)) $args[] = 'Object:'.get_class($v);
    -			else if (is_bool($v)) $args[] = $v ? 'true' : 'false';
    -			else {
    -				$v = (string) @$v;
    -				$str = htmlspecialchars(substr($v,0,$MAXSTRLEN));
    -				if (strlen($v) > $MAXSTRLEN) $str .= '...';
    -				$args[] = $str;
    -			}
    -		}
    -		$s .= $arr['function'].'('.implode(', ',$args).')';
    -		
    -		
    -		$s .= @sprintf($fmt, $arr['line'],$arr['file'],basename($arr['file']));
    -			
    -		$s .= "\n";
    -	}	
    -	if ($html) $s .= '
    '; - if ($printOrArr) print $s; - - return $s; -} -/* -function _adodb_find_from($sql) -{ - - $sql = str_replace(array("\n","\r"), ' ', $sql); - $charCount = strlen($sql); - - $inString = false; - $quote = ''; - $parentheseCount = 0; - $prevChars = ''; - $nextChars = ''; - - - for($i = 0; $i < $charCount; $i++) { - - $char = substr($sql,$i,1); - $prevChars = substr($sql,0,$i); - $nextChars = substr($sql,$i+1); - - if((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === false) { - $quote = $char; - $inString = true; - } - - elseif((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === true && $quote == $char) { - $quote = ""; - $inString = false; - } - - elseif($char == "(" && $inString === false) - $parentheseCount++; - - elseif($char == ")" && $inString === false && $parentheseCount > 0) - $parentheseCount--; - - elseif($parentheseCount <= 0 && $inString === false && $char == " " && strtoupper(substr($prevChars,-5,5)) == " FROM") - return $i; - - } -} -*/ - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-memcache.lib.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-memcache.lib.inc.php deleted file mode 100755 index bc6b420b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-memcache.lib.inc.php +++ /dev/null @@ -1,118 +0,0 @@ -pconnect($host, $port)) { - $err = 'Can\'t connect to memcache server on: '.$host.':'.$port; - return $false; - } - - $rs = $memcache->get($key); - if (!$rs) { - $err = 'Item with such key doesn\'t exists on the memcached server.'; - return $false; - } - - $tdiff = intval($rs->timeCreated+$timeout - time()); - if ($tdiff <= 2) { - switch($tdiff) { - case 2: - if ((rand() & 15) == 0) { - $err = "Timeout 2"; - return $false; - } - break; - case 1: - if ((rand() & 3) == 0) { - $err = "Timeout 1"; - return $false; - } - break; - default: - $err = "Timeout 0"; - return $false; - } - } - return $rs; - } - - function putmemcache($key, $rs, $host, $port, $compress, $debug=false) - { - $false = false; - $true = true; - - if (!function_exists('memcache_pconnect')) { - if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!
    \n"); - return $false; - } - - $memcache = new Memcache; - if (!@$memcache->pconnect($host, $port)) { - if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port
    \n"); - return $false; - } - - $rs->timeCreated = time(); - if (!$memcache->set($key, $rs, $compress, 0)) { - if ($debug) ADOConnection::outp(" Failed to save data at the memcached server!
    \n"); - return $false; - } - return $true; - } - - function flushmemcache($key=false, $host, $port, $debug=false) - { - if (!function_exists('memcache_pconnect')) { - if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!
    \n"); - return; - } - - $memcache = new Memcache; - if (!@$memcache->pconnect($host, $port)) { - if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port
    \n"); - return; - } - - if ($key) { - if (!$memcache->delete($key)) { - if ($debug) ADOConnection::outp("CacheFlush: $key entery doesn't exist on memcached server!
    \n"); - } else { - if ($debug) ADOConnection::outp("CacheFlush: $key entery flushed from memcached server!
    \n"); - } - } else { - if (!$memcache->flush()) { - if ($debug) ADOConnection::outp("CacheFlush: Failure flushing all enteries from memcached server!
    \n"); - } else { - if ($debug) ADOConnection::outp("CacheFlush: All enteries flushed from memcached server!
    \n"); - } - } - return; - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pager.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pager.inc.php deleted file mode 100755 index 577a10d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pager.inc.php +++ /dev/null @@ -1,290 +0,0 @@ - implemented Render_PageLinks(). - - Please note, this class is entirely unsupported, - and no free support requests except for bug reports - will be entertained by the author. - -*/ -class ADODB_Pager { - var $id; // unique id for pager (defaults to 'adodb') - var $db; // ADODB connection object - var $sql; // sql used - var $rs; // recordset generated - var $curr_page; // current page number before Render() called, calculated in constructor - var $rows; // number of rows per page - var $linksPerPage=10; // number of links per page in navigation bar - var $showPageLinks; - - var $gridAttributes = 'width=100% border=1 bgcolor=white'; - - // Localize text strings here - var $first = '|<'; - var $prev = '<<'; - var $next = '>>'; - var $last = '>|'; - var $moreLinks = '...'; - var $startLinks = '...'; - var $gridHeader = false; - var $htmlSpecialChars = true; - var $page = 'Page'; - var $linkSelectedColor = 'red'; - var $cache = 0; #secs to cache with CachePageExecute() - - //---------------------------------------------- - // constructor - // - // $db adodb connection object - // $sql sql statement - // $id optional id to identify which pager, - // if you have multiple on 1 page. - // $id should be only be [a-z0-9]* - // - function ADODB_Pager(&$db,$sql,$id = 'adodb', $showPageLinks = false) - { - global $PHP_SELF; - - $curr_page = $id.'_curr_page'; - if (empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks - - $this->sql = $sql; - $this->id = $id; - $this->db = $db; - $this->showPageLinks = $showPageLinks; - - $next_page = $id.'_next_page'; - - if (isset($_GET[$next_page])) { - $_SESSION[$curr_page] = (integer) $_GET[$next_page]; - } - if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page - - $this->curr_page = $_SESSION[$curr_page]; - - } - - //--------------------------- - // Display link to first page - function Render_First($anchor=true) - { - global $PHP_SELF; - if ($anchor) { - ?> - first;?>   - first   "; - } - } - - //-------------------------- - // Display link to next page - function render_next($anchor=true) - { - global $PHP_SELF; - - if ($anchor) { - ?> - next;?>   - next   "; - } - } - - //------------------ - // Link to last page - // - // for better performance with large recordsets, you can set - // $this->db->pageExecuteCountRows = false, which disables - // last page counting. - function render_last($anchor=true) - { - global $PHP_SELF; - - if (!$this->db->pageExecuteCountRows) return; - - if ($anchor) { - ?> - last;?>   - last   "; - } - } - - //--------------------------------------------------- - // original code by "Pablo Costa" - function render_pagelinks() - { - global $PHP_SELF; - $pages = $this->rs->LastPageNo(); - $linksperpage = $this->linksPerPage ? $this->linksPerPage : $pages; - for($i=1; $i <= $pages; $i+=$linksperpage) - { - if($this->rs->AbsolutePage() >= $i) - { - $start = $i; - } - } - $numbers = ''; - $end = $start+$linksperpage-1; - $link = $this->id . "_next_page"; - if($end > $pages) $end = $pages; - - - if ($this->startLinks && $start > 1) { - $pos = $start - 1; - $numbers .= "$this->startLinks "; - } - - for($i=$start; $i <= $end; $i++) { - if ($this->rs->AbsolutePage() == $i) - $numbers .= "linkSelectedColor>$i "; - else - $numbers .= "$i "; - - } - if ($this->moreLinks && $end < $pages) - $numbers .= "$this->moreLinks "; - print $numbers . '   '; - } - // Link to previous page - function render_prev($anchor=true) - { - global $PHP_SELF; - if ($anchor) { - ?> - prev;?>   - prev   "; - } - } - - //-------------------------------------------------------- - // Simply rendering of grid. You should override this for - // better control over the format of the grid - // - // We use output buffering to keep code clean and readable. - function RenderGrid() - { - global $gSQLBlockRows; // used by rs2html to indicate how many rows to display - include_once(ADODB_DIR.'/tohtml.inc.php'); - ob_start(); - $gSQLBlockRows = $this->rows; - rs2html($this->rs,$this->gridAttributes,$this->gridHeader,$this->htmlSpecialChars); - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - - //------------------------------------------------------- - // Navigation bar - // - // we use output buffering to keep the code easy to read. - function RenderNav() - { - ob_start(); - if (!$this->rs->AtFirstPage()) { - $this->Render_First(); - $this->Render_Prev(); - } else { - $this->Render_First(false); - $this->Render_Prev(false); - } - if ($this->showPageLinks){ - $this->Render_PageLinks(); - } - if (!$this->rs->AtLastPage()) { - $this->Render_Next(); - $this->Render_Last(); - } else { - $this->Render_Next(false); - $this->Render_Last(false); - } - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - - //------------------- - // This is the footer - function RenderPageCount() - { - if (!$this->db->pageExecuteCountRows) return ''; - $lastPage = $this->rs->LastPageNo(); - if ($lastPage == -1) $lastPage = 1; // check for empty rs. - if ($this->curr_page > $lastPage) $this->curr_page = 1; - return "$this->page ".$this->curr_page."/".$lastPage.""; - } - - //----------------------------------- - // Call this class to draw everything. - function Render($rows=10) - { - global $ADODB_COUNTRECS; - - $this->rows = $rows; - - if ($this->db->dataProvider == 'informix') $this->db->cursorType = IFX_SCROLL; - - $savec = $ADODB_COUNTRECS; - if ($this->db->pageExecuteCountRows) $ADODB_COUNTRECS = true; - if ($this->cache) - $rs = &$this->db->CachePageExecute($this->cache,$this->sql,$rows,$this->curr_page); - else - $rs = &$this->db->PageExecute($this->sql,$rows,$this->curr_page); - $ADODB_COUNTRECS = $savec; - - $this->rs = &$rs; - if (!$rs) { - print "

    Query failed: $this->sql

    "; - return; - } - - if (!$rs->EOF && (!$rs->AtFirstPage() || !$rs->AtLastPage())) - $header = $this->RenderNav(); - else - $header = " "; - - $grid = $this->RenderGrid(); - $footer = $this->RenderPageCount(); - - $this->RenderLayout($header,$grid,$footer); - - $rs->Close(); - $this->rs = false; - } - - //------------------------------------------------------ - // override this to control overall layout and formating - function RenderLayout($header,$grid,$footer,$attributes='border=1 bgcolor=beige') - { - echo "
    ", - $header, - "
    ", - $grid, - "
    ", - $footer, - "
    "; - } -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pear.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pear.inc.php deleted file mode 100755 index 6aa0d3e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-pear.inc.php +++ /dev/null @@ -1,374 +0,0 @@ - | - * and Tomas V.V.Cox . Portions (c)1997-2002 The PHP Group. - */ - - /* - We support: - - DB_Common - --------- - query - returns PEAR_Error on error - limitQuery - return PEAR_Error on error - prepare - does not return PEAR_Error on error - execute - does not return PEAR_Error on error - setFetchMode - supports ASSOC and ORDERED - errorNative - quote - nextID - disconnect - - getOne - getAssoc - getRow - getCol - getAll - - DB_Result - --------- - numRows - returns -1 if not supported - numCols - fetchInto - does not support passing of fetchmode - fetchRows - does not support passing of fetchmode - free - */ - -define('ADODB_PEAR',dirname(__FILE__)); -include_once "PEAR.php"; -include_once ADODB_PEAR."/adodb-errorpear.inc.php"; -include_once ADODB_PEAR."/adodb.inc.php"; - -if (!defined('DB_OK')) { -define("DB_OK", 1); -define("DB_ERROR",-1); - -// autoExecute constants -define('DB_AUTOQUERY_INSERT', 1); -define('DB_AUTOQUERY_UPDATE', 2); - -/** - * This is a special constant that tells DB the user hasn't specified - * any particular get mode, so the default should be used. - */ - -define('DB_FETCHMODE_DEFAULT', 0); - -/** - * Column data indexed by numbers, ordered from 0 and up - */ - -define('DB_FETCHMODE_ORDERED', 1); - -/** - * Column data indexed by column names - */ - -define('DB_FETCHMODE_ASSOC', 2); - -/* for compatibility */ - -define('DB_GETMODE_ORDERED', DB_FETCHMODE_ORDERED); -define('DB_GETMODE_ASSOC', DB_FETCHMODE_ASSOC); - -/** - * these are constants for the tableInfo-function - * they are bitwised or'ed. so if there are more constants to be defined - * in the future, adjust DB_TABLEINFO_FULL accordingly - */ - -define('DB_TABLEINFO_ORDER', 1); -define('DB_TABLEINFO_ORDERTABLE', 2); -define('DB_TABLEINFO_FULL', 3); -} - -/** - * The main "DB" class is simply a container class with some static - * methods for creating DB objects as well as some utility functions - * common to all parts of DB. - * - */ - -class DB -{ - /** - * Create a new DB object for the specified database type - * - * @param $type string database type, for example "mysql" - * - * @return object a newly created DB object, or a DB error code on - * error - */ - - function &factory($type) - { - include_once(ADODB_DIR."/drivers/adodb-$type.inc.php"); - $obj = &NewADOConnection($type); - if (!is_object($obj)) $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); - return $obj; - } - - /** - * Create a new DB object and connect to the specified database - * - * @param $dsn mixed "data source name", see the DB::parseDSN - * method for a description of the dsn format. Can also be - * specified as an array of the format returned by DB::parseDSN. - * - * @param $options mixed if boolean (or scalar), tells whether - * this connection should be persistent (for backends that support - * this). This parameter can also be an array of options, see - * DB_common::setOption for more information on connection - * options. - * - * @return object a newly created DB connection object, or a DB - * error object on error - * - * @see DB::parseDSN - * @see DB::isError - */ - function &connect($dsn, $options = false) - { - if (is_array($dsn)) { - $dsninfo = $dsn; - } else { - $dsninfo = DB::parseDSN($dsn); - } - switch ($dsninfo["phptype"]) { - case 'pgsql': $type = 'postgres7'; break; - case 'ifx': $type = 'informix9'; break; - default: $type = $dsninfo["phptype"]; break; - } - - if (is_array($options) && isset($options["debug"]) && - $options["debug"] >= 2) { - // expose php errors with sufficient debug level - @include_once("adodb-$type.inc.php"); - } else { - @include_once("adodb-$type.inc.php"); - } - - @$obj =& NewADOConnection($type); - if (!is_object($obj)) { - $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1); - return $obj; - } - if (is_array($options)) { - foreach($options as $k => $v) { - switch(strtolower($k)) { - case 'persist': - case 'persistent': $persist = $v; break; - #ibase - case 'dialect': $obj->dialect = $v; break; - case 'charset': $obj->charset = $v; break; - case 'buffers': $obj->buffers = $v; break; - #ado - case 'charpage': $obj->charPage = $v; break; - #mysql - case 'clientflags': $obj->clientFlags = $v; break; - } - } - } else { - $persist = false; - } - - if (isset($dsninfo['socket'])) $dsninfo['hostspec'] .= ':'.$dsninfo['socket']; - else if (isset($dsninfo['port'])) $dsninfo['hostspec'] .= ':'.$dsninfo['port']; - - if($persist) $ok = $obj->PConnect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']); - else $ok = $obj->Connect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']); - - if (!$ok) $obj = ADODB_PEAR_Error(); - return $obj; - } - - /** - * Return the DB API version - * - * @return int the DB API version number - */ - function apiVersion() - { - return 2; - } - - /** - * Tell whether a result code from a DB method is an error - * - * @param $value int result code - * - * @return bool whether $value is an error - */ - function isError($value) - { - if (!is_object($value)) return false; - $class = get_class($value); - return $class == 'pear_error' || is_subclass_of($value, 'pear_error') || - $class == 'db_error' || is_subclass_of($value, 'db_error'); - } - - - /** - * Tell whether a result code from a DB method is a warning. - * Warnings differ from errors in that they are generated by DB, - * and are not fatal. - * - * @param $value mixed result value - * - * @return bool whether $value is a warning - */ - function isWarning($value) - { - return false; - /* - return is_object($value) && - (get_class( $value ) == "db_warning" || - is_subclass_of($value, "db_warning"));*/ - } - - /** - * Parse a data source name - * - * @param $dsn string Data Source Name to be parsed - * - * @return array an associative array with the following keys: - * - * phptype: Database backend used in PHP (mysql, odbc etc.) - * dbsyntax: Database used with regards to SQL syntax etc. - * protocol: Communication protocol to use (tcp, unix etc.) - * hostspec: Host specification (hostname[:port]) - * database: Database to use on the DBMS server - * username: User name for login - * password: Password for login - * - * The format of the supplied DSN is in its fullest form: - * - * phptype(dbsyntax)://username:password@protocol+hostspec/database - * - * Most variations are allowed: - * - * phptype://username:password@protocol+hostspec:110//usr/db_file.db - * phptype://username:password@hostspec/database_name - * phptype://username:password@hostspec - * phptype://username@hostspec - * phptype://hostspec/database - * phptype://hostspec - * phptype(dbsyntax) - * phptype - * - * @author Tomas V.V.Cox - */ - function parseDSN($dsn) - { - if (is_array($dsn)) { - return $dsn; - } - - $parsed = array( - 'phptype' => false, - 'dbsyntax' => false, - 'protocol' => false, - 'hostspec' => false, - 'database' => false, - 'username' => false, - 'password' => false - ); - - // Find phptype and dbsyntax - if (($pos = strpos($dsn, '://')) !== false) { - $str = substr($dsn, 0, $pos); - $dsn = substr($dsn, $pos + 3); - } else { - $str = $dsn; - $dsn = NULL; - } - - // Get phptype and dbsyntax - // $str => phptype(dbsyntax) - if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) { - $parsed['phptype'] = $arr[1]; - $parsed['dbsyntax'] = (empty($arr[2])) ? $arr[1] : $arr[2]; - } else { - $parsed['phptype'] = $str; - $parsed['dbsyntax'] = $str; - } - - if (empty($dsn)) { - return $parsed; - } - - // Get (if found): username and password - // $dsn => username:password@protocol+hostspec/database - if (($at = strpos($dsn,'@')) !== false) { - $str = substr($dsn, 0, $at); - $dsn = substr($dsn, $at + 1); - if (($pos = strpos($str, ':')) !== false) { - $parsed['username'] = urldecode(substr($str, 0, $pos)); - $parsed['password'] = urldecode(substr($str, $pos + 1)); - } else { - $parsed['username'] = urldecode($str); - } - } - - // Find protocol and hostspec - // $dsn => protocol+hostspec/database - if (($pos=strpos($dsn, '/')) !== false) { - $str = substr($dsn, 0, $pos); - $dsn = substr($dsn, $pos + 1); - } else { - $str = $dsn; - $dsn = NULL; - } - - // Get protocol + hostspec - // $str => protocol+hostspec - if (($pos=strpos($str, '+')) !== false) { - $parsed['protocol'] = substr($str, 0, $pos); - $parsed['hostspec'] = urldecode(substr($str, $pos + 1)); - } else { - $parsed['hostspec'] = urldecode($str); - } - - // Get dabase if any - // $dsn => database - if (!empty($dsn)) { - $parsed['database'] = $dsn; - } - - return $parsed; - } - - /** - * Load a PHP database extension if it is not loaded already. - * - * @access public - * - * @param $name the base name of the extension (without the .so or - * .dll suffix) - * - * @return bool true if the extension was already or successfully - * loaded, false if it could not be loaded - */ - function assertExtension($name) - { - if (!extension_loaded($name)) { - $dlext = (strncmp(PHP_OS,'WIN',3) === 0) ? '.dll' : '.so'; - @dl($name . $dlext); - } - if (!extension_loaded($name)) { - return false; - } - return true; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-perf.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-perf.inc.php deleted file mode 100755 index 8128cd26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-perf.inc.php +++ /dev/null @@ -1,1068 +0,0 @@ -=2) return (integer) $memarr[1]; - - return 0; -} - -// avoids localization problems where , is used instead of . -function adodb_round($n,$prec) -{ - return number_format($n, $prec, '.', ''); -} - -/* return microtime value as a float */ -function adodb_microtime() -{ - $t = microtime(); - $t = explode(' ',$t); - return (float)$t[1]+ (float)$t[0]; -} - -/* sql code timing */ -function& adodb_log_sql(&$connx,$sql,$inputarr) -{ - $perf_table = adodb_perf::table(); - $connx->fnExecute = false; - $t0 = microtime(); - $rs =& $connx->Execute($sql,$inputarr); - $t1 = microtime(); - - if (!empty($connx->_logsql) && (empty($connx->_logsqlErrors) || !$rs)) { - global $ADODB_LOG_CONN; - - if (!empty($ADODB_LOG_CONN)) { - $conn = &$ADODB_LOG_CONN; - if ($conn->databaseType != $connx->databaseType) - $prefix = '/*dbx='.$connx->databaseType .'*/ '; - else - $prefix = ''; - } else { - $conn =& $connx; - $prefix = ''; - } - - $conn->_logsql = false; // disable logsql error simulation - $dbT = $conn->databaseType; - - $a0 = split(' ',$t0); - $a0 = (float)$a0[1]+(float)$a0[0]; - - $a1 = split(' ',$t1); - $a1 = (float)$a1[1]+(float)$a1[0]; - - $time = $a1 - $a0; - - if (!$rs) { - $errM = $connx->ErrorMsg(); - $errN = $connx->ErrorNo(); - $conn->lastInsID = 0; - $tracer = substr('ERROR: '.htmlspecialchars($errM),0,250); - } else { - $tracer = ''; - $errM = ''; - $errN = 0; - $dbg = $conn->debug; - $conn->debug = false; - if (!is_object($rs) || $rs->dataProvider == 'empty') - $conn->_affected = $conn->affected_rows(true); - $conn->lastInsID = @$conn->Insert_ID(); - $conn->debug = $dbg; - } - if (isset($_SERVER['HTTP_HOST'])) { - $tracer .= '
    '.$_SERVER['HTTP_HOST']; - if (isset($_SERVER['PHP_SELF'])) $tracer .= $_SERVER['PHP_SELF']; - } else - if (isset($_SERVER['PHP_SELF'])) $tracer .= '
    '.$_SERVER['PHP_SELF']; - //$tracer .= (string) adodb_backtrace(false); - - $tracer = (string) substr($tracer,0,500); - - if (is_array($inputarr)) { - if (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr); - else { - // Quote string parameters so we can see them in the - // performance stats. This helps spot disabled indexes. - $xar_params = $inputarr; - foreach ($xar_params as $xar_param_key => $xar_param) { - if (gettype($xar_param) == 'string') - $xar_params[$xar_param_key] = '"' . $xar_param . '"'; - } - $params = implode(', ', $xar_params); - if (strlen($params) >= 3000) $params = substr($params, 0, 3000); - } - } else { - $params = ''; - } - - if (is_array($sql)) $sql = $sql[0]; - if ($prefix) $sql = $prefix.$sql; - $arr = array('b'=>strlen($sql).'.'.crc32($sql), - 'c'=>substr($sql,0,3900), 'd'=>$params,'e'=>$tracer,'f'=>adodb_round($time,6)); - //var_dump($arr); - $saved = $conn->debug; - $conn->debug = 0; - - $d = $conn->sysTimeStamp; - if (empty($d)) $d = date("'Y-m-d H:i:s'"); - if ($conn->dataProvider == 'oci8' && $dbT != 'oci8po') { - $isql = "insert into $perf_table values($d,:b,:c,:d,:e,:f)"; - } else if ($dbT == 'odbc_mssql' || $dbT == 'informix' || strncmp($dbT,'odbtp',4)==0) { - $timer = $arr['f']; - if ($dbT == 'informix') $sql2 = substr($sql2,0,230); - - $sql1 = $conn->qstr($arr['b']); - $sql2 = $conn->qstr($arr['c']); - $params = $conn->qstr($arr['d']); - $tracer = $conn->qstr($arr['e']); - - $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($d,$sql1,$sql2,$params,$tracer,$timer)"; - if ($dbT == 'informix') $isql = str_replace(chr(10),' ',$isql); - $arr = false; - } else { - if ($dbT == 'db2') $arr['f'] = (float) $arr['f']; - $isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $d,?,?,?,?,?)"; - } - $ok = $conn->Execute($isql,$arr); - $conn->debug = $saved; - - if ($ok) { - $conn->_logsql = true; - } else { - $err2 = $conn->ErrorMsg(); - $conn->_logsql = true; // enable logsql error simulation - $perf =& NewPerfMonitor($conn); - if ($perf) { - if ($perf->CreateLogTable()) $ok = $conn->Execute($isql,$arr); - } else { - $ok = $conn->Execute("create table $perf_table ( - created varchar(50), - sql0 varchar(250), - sql1 varchar(4000), - params varchar(3000), - tracer varchar(500), - timer decimal(16,6))"); - } - if (!$ok) { - ADOConnection::outp( "

    LOGSQL Insert Failed: $isql
    $err2

    "); - $conn->_logsql = false; - } - } - $connx->_errorMsg = $errM; - $connx->_errorCode = $errN; - } - $connx->fnExecute = 'adodb_log_sql'; - return $rs; -} - - -/* -The settings data structure is an associative array that database parameter per element. - -Each database parameter element in the array is itself an array consisting of: - -0: category code, used to group related db parameters -1: either - a. sql string to retrieve value, eg. "select value from v\$parameter where name='db_block_size'", - b. array holding sql string and field to look for, e.g. array('show variables','table_cache'), - c. a string prefixed by =, then a PHP method of the class is invoked, - e.g. to invoke $this->GetIndexValue(), set this array element to '=GetIndexValue', -2: description of the database parameter -*/ - -class adodb_perf { - var $conn; - var $color = '#F0F0F0'; - var $table = ''; - var $titles = ''; - var $warnRatio = 90; - var $tablesSQL = false; - var $cliFormat = "%32s => %s \r\n"; - var $sql1 = 'sql1'; // used for casting sql1 to text for mssql - var $explain = true; - var $helpurl = "LogSQL help"; - var $createTableSQL = false; - var $maxLength = 2000; - - // Sets the tablename to be used - function table($newtable = false) - { - static $_table; - - if (!empty($newtable)) $_table = $newtable; - if (empty($_table)) $_table = 'adodb_logsql'; - return $_table; - } - - // returns array with info to calculate CPU Load - function _CPULoad() - { -/* - -cpu 524152 2662 2515228 336057010 -cpu0 264339 1408 1257951 168025827 -cpu1 259813 1254 1257277 168031181 -page 622307 25475680 -swap 24 1891 -intr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -disk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320) -ctxt 66155838 -btime 1062315585 -processes 69293 - -*/ - // Algorithm is taken from - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/example__obtaining_raw_performance_data.asp - if (strncmp(PHP_OS,'WIN',3)==0) { - if (PHP_VERSION == '5.0.0') return false; - if (PHP_VERSION == '5.0.1') return false; - if (PHP_VERSION == '5.0.2') return false; - if (PHP_VERSION == '5.0.3') return false; - if (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737 - - @$c = new COM("WinMgmts:{impersonationLevel=impersonate}!Win32_PerfRawData_PerfOS_Processor.Name='_Total'"); - if (!$c) return false; - - $info[0] = $c->PercentProcessorTime; - $info[1] = 0; - $info[2] = 0; - $info[3] = $c->TimeStamp_Sys100NS; - //print_r($info); - return $info; - } - - // Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com) - $statfile = '/proc/stat'; - if (!file_exists($statfile)) return false; - - $fd = fopen($statfile,"r"); - if (!$fd) return false; - - $statinfo = explode("\n",fgets($fd, 1024)); - fclose($fd); - foreach($statinfo as $line) { - $info = explode(" ",$line); - if($info[0]=="cpu") { - array_shift($info); // pop off "cpu" - if(!$info[0]) array_shift($info); // pop off blank space (if any) - return $info; - } - } - - return false; - - } - - /* NOT IMPLEMENTED */ - function MemInfo() - { - /* - - total: used: free: shared: buffers: cached: -Mem: 1055289344 917299200 137990144 0 165437440 599773184 -Swap: 2146775040 11055104 2135719936 -MemTotal: 1030556 kB -MemFree: 134756 kB -MemShared: 0 kB -Buffers: 161560 kB -Cached: 581384 kB -SwapCached: 4332 kB -Active: 494468 kB -Inact_dirty: 322856 kB -Inact_clean: 24256 kB -Inact_target: 168316 kB -HighTotal: 131064 kB -HighFree: 1024 kB -LowTotal: 899492 kB -LowFree: 133732 kB -SwapTotal: 2096460 kB -SwapFree: 2085664 kB -Committed_AS: 348732 kB - */ - } - - - /* - Remember that this is client load, not db server load! - */ - var $_lastLoad; - function CPULoad() - { - $info = $this->_CPULoad(); - if (!$info) return false; - - if (empty($this->_lastLoad)) { - sleep(1); - $this->_lastLoad = $info; - $info = $this->_CPULoad(); - } - - $last = $this->_lastLoad; - $this->_lastLoad = $info; - - $d_user = $info[0] - $last[0]; - $d_nice = $info[1] - $last[1]; - $d_system = $info[2] - $last[2]; - $d_idle = $info[3] - $last[3]; - - //printf("Delta - User: %f Nice: %f System: %f Idle: %f
    ",$d_user,$d_nice,$d_system,$d_idle); - - if (strncmp(PHP_OS,'WIN',3)==0) { - if ($d_idle < 1) $d_idle = 1; - return 100*(1-$d_user/$d_idle); - }else { - $total=$d_user+$d_nice+$d_system+$d_idle; - if ($total<1) $total=1; - return 100*($d_user+$d_nice+$d_system)/$total; - } - } - - function Tracer($sql) - { - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $sqlq = $this->conn->qstr($sql); - $arr = $this->conn->GetArray( -"select count(*),tracer - from $perf_table where sql1=$sqlq - group by tracer - order by 1 desc"); - $s = ''; - if ($arr) { - $s .= '

    Scripts Affected

    '; - foreach($arr as $k) { - $s .= sprintf("%4d",$k[0]).'   '.strip_tags($k[1]).'
    '; - } - } - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - $this->conn->fnExecute = $saveE; - return $s; - } - - /* - Explain Plan for $sql. - If only a snippet of the $sql is passed in, then $partial will hold the crc32 of the - actual sql. - */ - function Explain($sql,$partial=false) - { - return false; - } - - function InvalidSQL($numsql = 10) - { - - if (isset($_GET['sql'])) return; - $s = '

    Invalid SQL

    '; - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - $perf_table = adodb_perf::table(); - $rs =& $this->conn->SelectLimit("select distinct count(*),sql1,tracer as error_msg from $perf_table where tracer like 'ERROR:%' group by sql1,tracer order by 1 desc",$numsql);//,$numsql); - $this->conn->fnExecute = $saveE; - if ($rs) { - $s .= rs2html($rs,false,false,false,false); - } else - return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - - return $s; - } - - - /* - This script identifies the longest running SQL - */ - function _SuspiciousSQL($numsql = 10) - { - global $ADODB_FETCH_MODE; - - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - if (isset($_GET['exps']) && isset($_GET['sql'])) { - $partial = !empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return; - $sql1 = $this->sql1; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - //$this->conn->debug=1; - $rs =& $this->conn->SelectLimit( - "select avg(timer) as avg_timer,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer - from $perf_table - where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') - and (tracer is null or tracer not like 'ERROR:%') - group by sql1 - order by 1 desc",$numsql); - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - $this->conn->fnExecute = $saveE; - - if (!$rs) return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - $s = "

    Suspicious SQL

    -The following SQL have high average execution times
    -
    ParameterValueDescription
    \n"; - $max = $this->maxLength; - while (!$rs->EOF) { - $sql = $rs->fields[1]; - $raw = urlencode($sql); - if (strlen($raw)>$max-100) { - $sql2 = substr($sql,0,$max-500); - $raw = urlencode($sql2).'&part='.crc32($sql); - } - $prefix = ""; - $suffix = ""; - if ($this->explain == false || strlen($prefix)>$max) { - $suffix = ' ... String too long for GET parameter: '.strlen($prefix).''; - $prefix = ''; - } - $s .= ""; - $rs->MoveNext(); - } - return $s."
    Avg TimeCountSQLMaxMin
    ".adodb_round($rs->fields[0],6)."".$rs->fields[2]."".$prefix.htmlspecialchars($sql).$suffix."". - "".$rs->fields[3]."".$rs->fields[4]."
    "; - - } - - function CheckMemory() - { - return ''; - } - - - function SuspiciousSQL($numsql=10) - { - return adodb_perf::_SuspiciousSQL($numsql); - } - - function ExpensiveSQL($numsql=10) - { - return adodb_perf::_ExpensiveSQL($numsql); - } - - - /* - This reports the percentage of load on the instance due to the most - expensive few SQL statements. Tuning these statements can often - make huge improvements in overall system performance. - */ - function _ExpensiveSQL($numsql = 10) - { - global $ADODB_FETCH_MODE; - - $perf_table = adodb_perf::table(); - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - - if (isset($_GET['expe']) && isset($_GET['sql'])) { - $partial = !empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return; - - $sql1 = $this->sql1; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs =& $this->conn->SelectLimit( - "select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer - from $perf_table - where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') - and (tracer is null or tracer not like 'ERROR:%') - group by sql1 - having count(*)>1 - order by 1 desc",$numsql); - if (isset($savem)) $this->conn->SetFetchMode($savem); - $this->conn->fnExecute = $saveE; - $ADODB_FETCH_MODE = $save; - if (!$rs) return "

    $this->helpurl. ".$this->conn->ErrorMsg()."

    "; - $s = "

    Expensive SQL

    -Tuning the following SQL could reduce the server load substantially
    -\n"; - $max = $this->maxLength; - while (!$rs->EOF) { - $sql = $rs->fields[1]; - $raw = urlencode($sql); - if (strlen($raw)>$max-100) { - $sql2 = substr($sql,0,$max-500); - $raw = urlencode($sql2).'&part='.crc32($sql); - } - $prefix = ""; - $suffix = ""; - if($this->explain == false || strlen($prefix>$max)) { - $prefix = ''; - $suffix = ''; - } - $s .= ""; - $rs->MoveNext(); - } - return $s."
    LoadCountSQLMaxMin
    ".adodb_round($rs->fields[0],6)."".$rs->fields[2]."".$prefix.htmlspecialchars($sql).$suffix."". - "".$rs->fields[3]."".$rs->fields[4]."
    "; - } - - /* - Raw function to return parameter value from $settings. - */ - function DBParameter($param) - { - if (empty($this->settings[$param])) return false; - $sql = $this->settings[$param][1]; - return $this->_DBParameter($sql); - } - - /* - Raw function returning array of poll paramters - */ - function &PollParameters() - { - $arr[0] = (float)$this->DBParameter('data cache hit ratio'); - $arr[1] = (float)$this->DBParameter('data reads'); - $arr[2] = (float)$this->DBParameter('data writes'); - $arr[3] = (integer) $this->DBParameter('current connections'); - return $arr; - } - - /* - Low-level Get Database Parameter - */ - function _DBParameter($sql) - { - $savelog = $this->conn->LogSQL(false); - if (is_array($sql)) { - global $ADODB_FETCH_MODE; - - $sql1 = $sql[0]; - $key = $sql[1]; - if (sizeof($sql)>2) $pos = $sql[2]; - else $pos = 1; - if (sizeof($sql)>3) $coef = $sql[3]; - else $coef = false; - $ret = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute($sql1); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs) { - while (!$rs->EOF) { - $keyf = reset($rs->fields); - if (trim($keyf) == $key) { - $ret = $rs->fields[$pos]; - if ($coef) $ret *= $coef; - break; - } - $rs->MoveNext(); - } - $rs->Close(); - } - $this->conn->LogSQL($savelog); - return $ret; - } else { - if (strncmp($sql,'=',1) == 0) { - $fn = substr($sql,1); - return $this->$fn(); - } - $sql = str_replace('$DATABASE',$this->conn->database,$sql); - $ret = $this->conn->GetOne($sql); - $this->conn->LogSQL($savelog); - - return $ret; - } - } - - /* - Warn if cache ratio falls below threshold. Displayed in "Description" column. - */ - function WarnCacheRatio($val) - { - if ($val < $this->warnRatio) - return 'Cache ratio should be at least '.$this->warnRatio.'%'; - else return ''; - } - - /***********************************************************************************************/ - // HIGH LEVEL UI FUNCTIONS - /***********************************************************************************************/ - - - function UI($pollsecs=5) - { - - $perf_table = adodb_perf::table(); - $conn = $this->conn; - - $app = $conn->host; - if ($conn->host && $conn->database) $app .= ', db='; - $app .= $conn->database; - - if ($app) $app .= ', '; - $savelog = $this->conn->LogSQL(false); - $info = $conn->ServerInfo(); - if (isset($_GET['clearsql'])) { - $this->conn->Execute("delete from $perf_table"); - } - $this->conn->LogSQL($savelog); - - // magic quotes - - if (isset($_GET['sql']) && get_magic_quotes_gpc()) { - $_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']); - } - - if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10; - else $nsql = $_SESSION['ADODB_PERF_SQL']; - - $app .= $info['description']; - - - if (isset($_GET['do'])) $do = $_GET['do']; - else if (isset($_POST['do'])) $do = $_POST['do']; - else if (isset($_GET['sql'])) $do = 'viewsql'; - else $do = 'stats'; - - if (isset($_GET['nsql'])) { - if ($_GET['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (integer) $_GET['nsql']; - } - echo "ADOdb Performance Monitor on $app"; - if ($do == 'viewsql') $form = "
    # SQL:
    "; - else $form = " "; - - $allowsql = !defined('ADODB_PERF_NO_RUN_SQL'); - - if (empty($_GET['hidem'])) - echo "
    - ADOdb Performance Monitor for $app
    - Performance Stats   View SQL -   View Tables   Poll Stats", - $allowsql ? '   Run SQL' : '', - "$form", - "
    "; - - - switch ($do) { - default: - case 'stats': - echo $this->HealthCheck(); - //$this->conn->debug=1; - echo $this->CheckMemory(); - break; - case 'poll': - echo ""; - break; - case 'poll2': - echo "
    ";
    -			$this->Poll($pollsecs);
    -			break;
    -		
    -		case 'dosql':
    -			if (!$allowsql) break;
    -			
    -			$this->DoSQLForm();
    -			break;
    -		case 'viewsql':
    -			if (empty($_GET['hidem']))
    -				echo "  Clear SQL Log
    "; - echo($this->SuspiciousSQL($nsql)); - echo($this->ExpensiveSQL($nsql)); - echo($this->InvalidSQL($nsql)); - break; - case 'tables': - echo $this->Tables(); break; - } - global $ADODB_vers; - echo "

    $ADODB_vers Sponsored by phpLens
    "; - } - - /* - Runs in infinite loop, returning real-time statistics - */ - function Poll($secs=5) - { - $this->conn->fnExecute = false; - //$this->conn->debug=1; - if ($secs <= 1) $secs = 1; - echo "Accumulating statistics, every $secs seconds...\n";flush(); - $arro =& $this->PollParameters(); - $cnt = 0; - set_time_limit(0); - sleep($secs); - while (1) { - - $arr =& $this->PollParameters(); - - $hits = sprintf('%2.2f',$arr[0]); - $reads = sprintf('%12.4f',($arr[1]-$arro[1])/$secs); - $writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs); - $sess = sprintf('%5d',$arr[3]); - - $load = $this->CPULoad(); - if ($load !== false) { - $oslabel = 'WS-CPU%'; - $osval = sprintf(" %2.1f ",(float) $load); - }else { - $oslabel = ''; - $osval = ''; - } - if ($cnt % 10 == 0) echo " Time ".$oslabel." Hit% Sess Reads/s Writes/s\n"; - $cnt += 1; - echo date('H:i:s').' '.$osval."$hits $sess $reads $writes\n"; - flush(); - - if (connection_aborted()) return; - - sleep($secs); - $arro = $arr; - } - } - - /* - Returns basic health check in a command line interface - */ - function HealthCheckCLI() - { - return $this->HealthCheck(true); - } - - - /* - Returns basic health check as HTML - */ - function HealthCheck($cli=false) - { - $saveE = $this->conn->fnExecute; - $this->conn->fnExecute = false; - if ($cli) $html = ''; - else $html = $this->table.'

    '.$this->conn->databaseType.'

    '.$this->titles; - - $oldc = false; - $bgc = ''; - foreach($this->settings as $name => $arr) { - if ($arr === false) break; - - if (!is_string($name)) { - if ($cli) $html .= " -- $arr -- \n"; - else $html .= "color>$arr  "; - continue; - } - - if (!is_array($arr)) break; - $category = $arr[0]; - $how = $arr[1]; - if (sizeof($arr)>2) $desc = $arr[2]; - else $desc = '   '; - - - if ($category == 'HIDE') continue; - - $val = $this->_DBParameter($how); - - if ($desc && strncmp($desc,"=",1) === 0) { - $fn = substr($desc,1); - $desc = $this->$fn($val); - } - - if ($val === false) { - $m = $this->conn->ErrorMsg(); - $val = "Error: $m"; - } else { - if (is_numeric($val) && $val >= 256*1024) { - if ($val % (1024*1024) == 0) { - $val /= (1024*1024); - $val .= 'M'; - } else if ($val % 1024 == 0) { - $val /= 1024; - $val .= 'K'; - } - //$val = htmlspecialchars($val); - } - } - if ($category != $oldc) { - $oldc = $category; - //$bgc = ($bgc == ' bgcolor='.$this->color) ? ' bgcolor=white' : ' bgcolor='.$this->color; - } - if (strlen($desc)==0) $desc = ' '; - if (strlen($val)==0) $val = ' '; - if ($cli) { - $html .= str_replace(' ','',sprintf($this->cliFormat,strip_tags($name),strip_tags($val),strip_tags($desc))); - - }else { - $html .= "".$name.''.$val.''.$desc."\n"; - } - } - - if (!$cli) $html .= "\n"; - $this->conn->fnExecute = $saveE; - - return $html; - } - - function Tables($orderby='1') - { - if (!$this->tablesSQL) return false; - - $savelog = $this->conn->LogSQL(false); - $rs = $this->conn->Execute($this->tablesSQL.' order by '.$orderby); - $this->conn->LogSQL($savelog); - $html = rs2html($rs,false,false,false,false); - return $html; - } - - - function CreateLogTable() - { - if (!$this->createTableSQL) return false; - - $table = $this->table(); - $sql = str_replace('adodb_logsql',$table,$this->createTableSQL); - $savelog = $this->conn->LogSQL(false); - $ok = $this->conn->Execute($sql); - $this->conn->LogSQL($savelog); - return ($ok) ? true : false; - } - - function DoSQLForm() - { - - - $PHP_SELF = $_SERVER['PHP_SELF']; - $sql = isset($_REQUEST['sql']) ? $_REQUEST['sql'] : ''; - - if (isset($_SESSION['phplens_sqlrows'])) $rows = $_SESSION['phplens_sqlrows']; - else $rows = 3; - - if (isset($_REQUEST['SMALLER'])) { - $rows /= 2; - if ($rows < 3) $rows = 3; - $_SESSION['phplens_sqlrows'] = $rows; - } - if (isset($_REQUEST['BIGGER'])) { - $rows *= 2; - $_SESSION['phplens_sqlrows'] = $rows; - } - -?> - -
    - - - - - - -
    Form size: - - -
    -
    -
    - -undomq(trim($sql)); - if (substr($sql,strlen($sql)-1) === ';') { - $print = true; - $sqla = $this->SplitSQL($sql); - } else { - $print = false; - $sqla = array($sql); - } - foreach($sqla as $sqls) { - - if (!$sqls) continue; - - if ($print) { - print "

    ".htmlspecialchars($sqls)."

    "; - flush(); - } - $savelog = $this->conn->LogSQL(false); - $rs = $this->conn->Execute($sqls); - $this->conn->LogSQL($savelog); - if ($rs && is_object($rs) && !$rs->EOF) { - rs2html($rs); - while ($rs->NextRecordSet()) { - print "
     
    "; - rs2html($rs); - } - } else { - $e1 = (integer) $this->conn->ErrorNo(); - $e2 = $this->conn->ErrorMsg(); - if (($e1) || ($e2)) { - if (empty($e1)) $e1 = '-1'; // postgresql fix - print '   '.$e1.': '.$e2; - } else { - print "

    No Recordset returned

    "; - } - } - } // foreach - } - - function SplitSQL($sql) - { - $arr = explode(';',$sql); - return $arr; - } - - function undomq($m) - { - if (get_magic_quotes_gpc()) { - // undo the damage - $m = str_replace('\\\\','\\',$m); - $m = str_replace('\"','"',$m); - $m = str_replace('\\\'','\'',$m); - } - return $m; -} - - - /************************************************************************/ - - /** - * Reorganise multiple table-indices/statistics/.. - * OptimizeMode could be given by last Parameter - * - * @example - *
    -     *          optimizeTables( 'tableA');
    -     *      
    - *
    -     *          optimizeTables( 'tableA', 'tableB', 'tableC');
    -     *      
    - *
    -     *          optimizeTables( 'tableA', 'tableB', ADODB_OPT_LOW);
    -     *      
    - * - * @param string table name of the table to optimize - * @param int mode optimization-mode - * ADODB_OPT_HIGH for full optimization - * ADODB_OPT_LOW for CPU-less optimization - * Default is LOW ADODB_OPT_LOW - * @author Markus Staab - * @return Returns true on success and false on error - */ - function OptimizeTables() - { - $args = func_get_args(); - $numArgs = func_num_args(); - - if ( $numArgs == 0) return false; - - $mode = ADODB_OPT_LOW; - $lastArg = $args[ $numArgs - 1]; - if ( !is_string($lastArg)) { - $mode = $lastArg; - unset( $args[ $numArgs - 1]); - } - - foreach( $args as $table) { - $this->optimizeTable( $table, $mode); - } - } - - /** - * Reorganise the table-indices/statistics/.. depending on the given mode. - * Default Implementation throws an error. - * - * @param string table name of the table to optimize - * @param int mode optimization-mode - * ADODB_OPT_HIGH for full optimization - * ADODB_OPT_LOW for CPU-less optimization - * Default is LOW ADODB_OPT_LOW - * @author Markus Staab - * @return Returns true on success and false on error - */ - function OptimizeTable( $table, $mode = ADODB_OPT_LOW) - { - ADOConnection::outp( sprintf( "

    %s: '%s' not implemented for driver '%s'

    ", __CLASS__, __FUNCTION__, $this->conn->databaseType)); - return false; - } - - /** - * Reorganise current database. - * Default implementation loops over all MetaTables() and - * optimize each using optmizeTable() - * - * @author Markus Staab - * @return Returns true on success and false on error - */ - function optimizeDatabase() - { - $conn = $this->conn; - if ( !$conn) return false; - - $tables = $conn->MetaTables( 'TABLES'); - if ( !$tables ) return false; - - foreach( $tables as $table) { - if ( !$this->optimizeTable( $table)) { - return false; - } - } - - return true; - } - // end hack -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-php4.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-php4.inc.php deleted file mode 100755 index 58940c4c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-php4.inc.php +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.inc.php deleted file mode 100755 index c2ee6411..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.inc.php +++ /dev/null @@ -1,1337 +0,0 @@ - 4 digit year conversion. The maximum is billions of years in the -future, but this is a theoretical limit as the computation of that year -would take too long with the current implementation of adodb_mktime(). - -This library replaces native functions as follows: - -
    	
    -	getdate()  with  adodb_getdate()
    -	date()     with  adodb_date() 
    -	gmdate()   with  adodb_gmdate()
    -	mktime()   with  adodb_mktime()
    -	gmmktime() with  adodb_gmmktime()
    -	strftime() with  adodb_strftime()
    -	strftime() with  adodb_gmstrftime()
    -
    - -The parameters are identical, except that adodb_date() accepts a subset -of date()'s field formats. Mktime() will convert from local time to GMT, -and date() will convert from GMT to local time, but daylight savings is -not handled currently. - -This library is independant of the rest of ADOdb, and can be used -as standalone code. - -PERFORMANCE - -For high speed, this library uses the native date functions where -possible, and only switches to PHP code when the dates fall outside -the 32-bit signed integer range. - -GREGORIAN CORRECTION - -Pope Gregory shortened October of A.D. 1582 by ten days. Thursday, -October 4, 1582 (Julian) was followed immediately by Friday, October 15, -1582 (Gregorian). - -Since 0.06, we handle this correctly, so: - -adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582) - == 24 * 3600 (1 day) - -============================================================================= - -COPYRIGHT - -(c) 2003-2005 John Lim and released under BSD-style license except for code by -jackbbs, which includes adodb_mktime, adodb_get_gmt_diff, adodb_is_leap_year -and originally found at http://www.php.net/manual/en/function.mktime.php - -============================================================================= - -BUG REPORTS - -These should be posted to the ADOdb forums at - - http://phplens.com/lens/lensforum/topics.php?id=4 - -============================================================================= - -FUNCTION DESCRIPTIONS - - -** FUNCTION adodb_getdate($date=false) - -Returns an array containing date information, as getdate(), but supports -dates greater than 1901 to 2038. The local date/time format is derived from a -heuristic the first time adodb_getdate is called. - - -** FUNCTION adodb_date($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - -The format fields that adodb_date supports: - -
    -	a - "am" or "pm" 
    -	A - "AM" or "PM" 
    -	d - day of the month, 2 digits with leading zeros; i.e. "01" to "31" 
    -	D - day of the week, textual, 3 letters; e.g. "Fri" 
    -	F - month, textual, long; e.g. "January" 
    -	g - hour, 12-hour format without leading zeros; i.e. "1" to "12" 
    -	G - hour, 24-hour format without leading zeros; i.e. "0" to "23" 
    -	h - hour, 12-hour format; i.e. "01" to "12" 
    -	H - hour, 24-hour format; i.e. "00" to "23" 
    -	i - minutes; i.e. "00" to "59" 
    -	j - day of the month without leading zeros; i.e. "1" to "31" 
    -	l (lowercase 'L') - day of the week, textual, long; e.g. "Friday"  
    -	L - boolean for whether it is a leap year; i.e. "0" or "1" 
    -	m - month; i.e. "01" to "12" 
    -	M - month, textual, 3 letters; e.g. "Jan" 
    -	n - month without leading zeros; i.e. "1" to "12" 
    -	O - Difference to Greenwich time in hours; e.g. "+0200" 
    -	Q - Quarter, as in 1, 2, 3, 4 
    -	r - RFC 2822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200" 
    -	s - seconds; i.e. "00" to "59" 
    -	S - English ordinal suffix for the day of the month, 2 characters; 
    -	   			i.e. "st", "nd", "rd" or "th" 
    -	t - number of days in the given month; i.e. "28" to "31"
    -	T - Timezone setting of this machine; e.g. "EST" or "MDT" 
    -	U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)  
    -	w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) 
    -	Y - year, 4 digits; e.g. "1999" 
    -	y - year, 2 digits; e.g. "99" 
    -	z - day of the year; i.e. "0" to "365" 
    -	Z - timezone offset in seconds (i.e. "-43200" to "43200"). 
    -	   			The offset for timezones west of UTC is always negative, 
    -				and for those east of UTC is always positive. 
    -
    - -Unsupported: -
    -	B - Swatch Internet time 
    -	I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
    -	W - ISO-8601 week number of year, weeks starting on Monday 
    -
    -
    - - -** FUNCTION adodb_date2($fmt, $isoDateString = false) -Same as adodb_date, but 2nd parameter accepts iso date, eg. - - adodb_date2('d-M-Y H:i','2003-12-25 13:01:34'); - - -** FUNCTION adodb_gmdate($fmt, $timestamp = false) - -Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the -current timestamp is used. Unlike the function date(), it supports dates -outside the 1901 to 2038 range. - - -** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) - -Converts a local date to a unix timestamp. Unlike the function mktime(), it supports -dates outside the 1901 to 2038 range. All parameters are optional. - - -** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) - -Converts a gmt date to a unix timestamp. Unlike the function gmmktime(), it supports -dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters -are currently compulsory. - -** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) -Convert a timestamp to a formatted GMT date. - -** FUNCTION adodb_strftime($fmt, $timestamp = false) - -Convert a timestamp to a formatted local date. Internally converts $fmt into -adodb_date format, then echo result. - -For best results, you can define the local date format yourself. Define a global -variable $ADODB_DATE_LOCALE which is an array, 1st element is date format using -adodb_date syntax, and 2nd element is the time format, also in adodb_date syntax. - - eg. $ADODB_DATE_LOCALE = array('d/m/Y','H:i:s'); - - Supported format codes: - -
    -	%a - abbreviated weekday name according to the current locale 
    -	%A - full weekday name according to the current locale 
    -	%b - abbreviated month name according to the current locale 
    -	%B - full month name according to the current locale 
    -	%c - preferred date and time representation for the current locale 
    -	%d - day of the month as a decimal number (range 01 to 31) 
    -	%D - same as %m/%d/%y 
    -	%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31') 
    -	%h - same as %b
    -	%H - hour as a decimal number using a 24-hour clock (range 00 to 23) 
    -	%I - hour as a decimal number using a 12-hour clock (range 01 to 12) 
    -	%m - month as a decimal number (range 01 to 12) 
    -	%M - minute as a decimal number 
    -	%n - newline character 
    -	%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale 
    -	%r - time in a.m. and p.m. notation 
    -	%R - time in 24 hour notation 
    -	%S - second as a decimal number 
    -	%t - tab character 
    -	%T - current time, equal to %H:%M:%S 
    -	%x - preferred date representation for the current locale without the time 
    -	%X - preferred time representation for the current locale without the date 
    -	%y - year as a decimal number without a century (range 00 to 99) 
    -	%Y - year as a decimal number including the century 
    -	%Z - time zone or name or abbreviation 
    -	%% - a literal `%' character 
    -
    - - Unsupported codes: -
    -	%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99) 
    -	%g - like %G, but without the century. 
    -	%G - The 4-digit year corresponding to the ISO week number (see %V). 
    -	     This has the same format and value as %Y, except that if the ISO week number belongs 
    -		 to the previous or next year, that year is used instead. 
    -	%j - day of the year as a decimal number (range 001 to 366) 
    -	%u - weekday as a decimal number [1,7], with 1 representing Monday 
    -	%U - week number of the current year as a decimal number, starting 
    -	    with the first Sunday as the first day of the first week 
    -	%V - The ISO 8601:1988 week number of the current year as a decimal number, 
    -	     range 01 to 53, where week 1 is the first week that has at least 4 days in the 
    -		 current year, and with Monday as the first day of the week. (Use %G or %g for 
    -		 the year component that corresponds to the week number for the specified timestamp.) 
    -	%w - day of the week as a decimal, Sunday being 0 
    -	%W - week number of the current year as a decimal number, starting with the 
    -	     first Monday as the first day of the first week 
    -
    - -============================================================================= - -NOTES - -Useful url for generating test timestamps: - http://www.4webhelp.net/us/timestamp.php - -Possible future optimizations include - -a. Using an algorithm similar to Plauger's in "The Standard C Library" -(page 428, xttotm.c _Ttotm() function). Plauger's algorithm will not -work outside 32-bit signed range, so i decided not to implement it. - -b. Implement daylight savings, which looks awfully complicated, see - http://webexhibits.org/daylightsaving/ - - -CHANGELOG -- 19 March 2006 0.24 -Changed strftime() locale detection, because some locales prepend the day of week to the date when %c is used. - -- 10 Feb 2006 0.23 -PHP5 compat: when we detect PHP5, the RFC2822 format for gmt 0000hrs is changed from -0000 to +0000. - In PHP4, we will still use -0000 for 100% compat with PHP4. - -- 08 Sept 2005 0.22 -In adodb_date2(), $is_gmt not supported properly. Fixed. - -- 18 July 2005 0.21 -In PHP 4.3.11, the 'r' format has changed. Leading 0 in day is added. Changed for compat. -Added support for negative months in adodb_mktime(). - -- 24 Feb 2005 0.20 -Added limited strftime/gmstrftime support. x10 improvement in performance of adodb_date(). - -- 21 Dec 2004 0.17 -In adodb_getdate(), the timestamp was accidentally converted to gmt when $is_gmt is false. -Also adodb_mktime(0,0,0) did not work properly. Both fixed thx Mauro. - -- 17 Nov 2004 0.16 -Removed intval typecast in adodb_mktime() for secs, allowing: - adodb_mktime(0,0,0 + 2236672153,1,1,1934); -Suggested by Ryan. - -- 18 July 2004 0.15 -All params in adodb_mktime were formerly compulsory. Now only the hour, min, secs is compulsory. -This brings it more in line with mktime (still not identical). - -- 23 June 2004 0.14 - -Allow you to define your own daylights savings function, adodb_daylight_sv. -If the function is defined (somewhere in an include), then you can correct for daylights savings. - -In this example, we apply daylights savings in June or July, adding one hour. This is extremely -unrealistic as it does not take into account time-zone, geographic location, current year. - -function adodb_daylight_sv(&$arr, $is_gmt) -{ - if ($is_gmt) return; - $m = $arr['mon']; - if ($m == 6 || $m == 7) $arr['hours'] += 1; -} - -This is only called by adodb_date() and not by adodb_mktime(). - -The format of $arr is -Array ( - [seconds] => 0 - [minutes] => 0 - [hours] => 0 - [mday] => 1 # day of month, eg 1st day of the month - [mon] => 2 # month (eg. Feb) - [year] => 2102 - [yday] => 31 # days in current year - [leap] => # true if leap year - [ndays] => 28 # no of days in current month - ) - - -- 28 Apr 2004 0.13 -Fixed adodb_date to properly support $is_gmt. Thx to Dimitar Angelov. - -- 20 Mar 2004 0.12 -Fixed month calculation error in adodb_date. 2102-June-01 appeared as 2102-May-32. - -- 26 Oct 2003 0.11 -Because of daylight savings problems (some systems apply daylight savings to -January!!!), changed adodb_get_gmt_diff() to ignore daylight savings. - -- 9 Aug 2003 0.10 -Fixed bug with dates after 2038. -See http://phplens.com/lens/lensforum/msgs.php?id=6980 - -- 1 July 2003 0.09 -Added support for Q (Quarter). -Added adodb_date2(), which accepts ISO date in 2nd param - -- 3 March 2003 0.08 -Added support for 'S' adodb_date() format char. Added constant ADODB_ALLOW_NEGATIVE_TS -if you want PHP to handle negative timestamps between 1901 to 1969. - -- 27 Feb 2003 0.07 -All negative numbers handled by adodb now because of RH 7.3+ problems. -See http://bugs.php.net/bug.php?id=20048&edit=2 - -- 4 Feb 2003 0.06 -Fixed a typo, 1852 changed to 1582! This means that pre-1852 dates -are now correctly handled. - -- 29 Jan 2003 0.05 - -Leap year checking differs under Julian calendar (pre 1582). Also -leap year code optimized by checking for most common case first. - -We also handle month overflow correctly in mktime (eg month set to 13). - -Day overflow for less than one month's days is supported. - -- 28 Jan 2003 0.04 - -Gregorian correction handled. In PHP5, we might throw an error if -mktime uses invalid dates around 5-14 Oct 1582. Released with ADOdb 3.10. -Added limbo 5-14 Oct 1582 check, when we set to 15 Oct 1582. - -- 27 Jan 2003 0.03 - -Fixed some more month problems due to gmt issues. Added constant ADODB_DATE_VERSION. -Fixed calculation of days since start of year for <1970. - -- 27 Jan 2003 0.02 - -Changed _adodb_getdate() to inline leap year checking for better performance. -Fixed problem with time-zones west of GMT +0000. - -- 24 Jan 2003 0.01 - -First implementation. -*/ - - -/* Initialization */ - -/* - Version Number -*/ -define('ADODB_DATE_VERSION',0.24); - -/* - This code was originally for windows. But apparently this problem happens - also with Linux, RH 7.3 and later! - - glibc-2.2.5-34 and greater has been changed to return -1 for dates < - 1970. This used to work. The problem exists with RedHat 7.3 and 8.0 - echo (mktime(0, 0, 0, 1, 1, 1960)); // prints -1 - - References: - http://bugs.php.net/bug.php?id=20048&edit=2 - http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html -*/ - -if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); - -function adodb_date_test_date($y1,$m,$d=13) -{ - $t = adodb_mktime(0,0,0,$m,$d,$y1); - $rez = adodb_date('Y-n-j H:i:s',$t); - if ("$y1-$m-$d 00:00:00" != $rez) { - print "$y1 error, expected=$y1-$m-$d 00:00:00, adodb=$rez
    "; - return false; - } - return true; -} - -function adodb_date_test_strftime($fmt) -{ - $s1 = strftime($fmt); - $s2 = adodb_strftime($fmt); - - if ($s1 == $s2) return true; - - echo "error for $fmt, strftime=$s1, $adodb=$s2
    "; - return false; -} - -/** - Test Suite -*/ -function adodb_date_test() -{ - - error_reporting(E_ALL); - print "

    Testing adodb_date and adodb_mktime. version=".ADODB_DATE_VERSION.' PHP='.PHP_VERSION."

    "; - @set_time_limit(0); - $fail = false; - - // This flag disables calling of PHP native functions, so we can properly test the code - if (!defined('ADODB_TEST_DATES')) define('ADODB_TEST_DATES',1); - - adodb_date_test_strftime('%Y %m %x %X'); - adodb_date_test_strftime("%A %d %B %Y"); - adodb_date_test_strftime("%H %M S"); - - $t = adodb_mktime(0,0,0); - if (!(adodb_date('Y-m-d') == date('Y-m-d'))) print 'Error in '.adodb_mktime(0,0,0).'
    '; - - $t = adodb_mktime(0,0,0,6,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-06-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - $t = adodb_mktime(0,0,0,2,1,2102); - if (!(adodb_date('Y-m-d',$t) == '2102-02-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
    '; - - - print "

    Testing gregorian <=> julian conversion

    "; - $t = adodb_mktime(0,0,0,10,11,1492); - //http://www.holidayorigins.com/html/columbus_day.html - Friday check - if (!(adodb_date('D Y-m-d',$t) == 'Fri 1492-10-11')) print 'Error in Columbus landing
    '; - - $t = adodb_mktime(0,0,0,2,29,1500); - if (!(adodb_date('Y-m-d',$t) == '1500-02-29')) print 'Error in julian leap years
    '; - - $t = adodb_mktime(0,0,0,2,29,1700); - if (!(adodb_date('Y-m-d',$t) == '1700-03-01')) print 'Error in gregorian leap years
    '; - - print adodb_mktime(0,0,0,10,4,1582).' '; - print adodb_mktime(0,0,0,10,15,1582); - $diff = (adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582)); - if ($diff != 3600*24) print " Error in gregorian correction = ".($diff/3600/24)." days
    "; - - print " 15 Oct 1582, Fri=".(adodb_dow(1582,10,15) == 5 ? 'Fri' : 'Error')."
    "; - print " 4 Oct 1582, Thu=".(adodb_dow(1582,10,4) == 4 ? 'Thu' : 'Error')."
    "; - - print "

    Testing overflow

    "; - - $t = adodb_mktime(0,0,0,3,33,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-04-02')) print 'Error in day overflow 1
    '; - $t = adodb_mktime(0,0,0,4,33,1971); - if (!(adodb_date('Y-m-d',$t) == '1971-05-03')) print 'Error in day overflow 2
    '; - $t = adodb_mktime(0,0,0,1,60,1965); - if (!(adodb_date('Y-m-d',$t) == '1965-03-01')) print 'Error in day overflow 3 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,32,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-01')) print 'Error in day overflow 4 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,12,63,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-02-01')) print 'Error in day overflow 5 '.adodb_date('Y-m-d',$t).'
    '; - $t = adodb_mktime(0,0,0,13,3,1965); - if (!(adodb_date('Y-m-d',$t) == '1966-01-03')) print 'Error in mth overflow 1
    '; - - print "Testing 2-digit => 4-digit year conversion

    "; - if (adodb_year_digit_check(00) != 2000) print "Err 2-digit 2000
    "; - if (adodb_year_digit_check(10) != 2010) print "Err 2-digit 2010
    "; - if (adodb_year_digit_check(20) != 2020) print "Err 2-digit 2020
    "; - if (adodb_year_digit_check(30) != 2030) print "Err 2-digit 2030
    "; - if (adodb_year_digit_check(40) != 1940) print "Err 2-digit 1940
    "; - if (adodb_year_digit_check(50) != 1950) print "Err 2-digit 1950
    "; - if (adodb_year_digit_check(90) != 1990) print "Err 2-digit 1990
    "; - - // Test string formating - print "

    Testing date formating

    "; - $fmt = '\d\a\t\e T Y-m-d H:i:s a A d D F g G h H i j l L m M n O \R\F\C2822 r s t U w y Y z Z 2003'; - $s1 = date($fmt,0); - $s2 = adodb_date($fmt,0); - if ($s1 != $s2) { - print " date() 0 failed
    $s1
    $s2
    "; - } - flush(); - for ($i=100; --$i > 0; ) { - - $ts = 3600.0*((rand()%60000)+(rand()%60000))+(rand()%60000); - $s1 = date($fmt,$ts); - $s2 = adodb_date($fmt,$ts); - //print "$s1
    $s2

    "; - $pos = strcmp($s1,$s2); - - if (($s1) != ($s2)) { - for ($j=0,$k=strlen($s1); $j < $k; $j++) { - if ($s1[$j] != $s2[$j]) { - print substr($s1,$j).' '; - break; - } - } - print "Error date(): $ts

     
    -  \"$s1\" (date len=".strlen($s1).")
    -  \"$s2\" (adodb_date len=".strlen($s2).")

    "; - $fail = true; - } - - $a1 = getdate($ts); - $a2 = adodb_getdate($ts); - $rez = array_diff($a1,$a2); - if (sizeof($rez)>0) { - print "Error getdate() $ts
    "; - print_r($a1); - print "
    "; - print_r($a2); - print "

    "; - $fail = true; - } - } - - // Test generation of dates outside 1901-2038 - print "

    Testing random dates between 100 and 4000

    "; - adodb_date_test_date(100,1); - for ($i=100; --$i >= 0;) { - $y1 = 100+rand(0,1970-100); - $m = rand(1,12); - adodb_date_test_date($y1,$m); - - $y1 = 3000-rand(0,3000-1970); - adodb_date_test_date($y1,$m); - } - print '

    '; - $start = 1960+rand(0,10); - $yrs = 12; - $i = 365.25*86400*($start-1970); - $offset = 36000+rand(10000,60000); - $max = 365*$yrs*86400; - $lastyear = 0; - - // we generate a timestamp, convert it to a date, and convert it back to a timestamp - // and check if the roundtrip broke the original timestamp value. - print "Testing $start to ".($start+$yrs).", or $max seconds, offset=$offset: "; - $cnt = 0; - for ($max += $i; $i < $max; $i += $offset) { - $ret = adodb_date('m,d,Y,H,i,s',$i); - $arr = explode(',',$ret); - if ($lastyear != $arr[2]) { - $lastyear = $arr[2]; - print " $lastyear "; - flush(); - } - $newi = adodb_mktime($arr[3],$arr[4],$arr[5],$arr[0],$arr[1],$arr[2]); - if ($i != $newi) { - print "Error at $i, adodb_mktime returned $newi ($ret)"; - $fail = true; - break; - } - $cnt += 1; - } - echo "Tested $cnt dates
    "; - if (!$fail) print "

    Passed !

    "; - else print "

    Failed :-(

    "; -} - -/** - Returns day of week, 0 = Sunday,... 6=Saturday. - Algorithm from PEAR::Date_Calc -*/ -function adodb_dow($year, $month, $day) -{ -/* -Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and -proclaimed that from that time onwards 3 days would be dropped from the calendar -every 400 years. - -Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). -*/ - if ($year <= 1582) { - if ($year < 1582 || - ($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3; - else - $greg_correction = 0; - } else - $greg_correction = 0; - - if($month > 2) - $month -= 2; - else { - $month += 10; - $year--; - } - - $day = floor((13 * $month - 1) / 5) + - $day + ($year % 100) + - floor(($year % 100) / 4) + - floor(($year / 100) / 4) - 2 * - floor($year / 100) + 77 + $greg_correction; - - return $day - 7 * floor($day / 7); -} - - -/** - Checks for leap year, returns true if it is. No 2-digit year check. Also - handles julian calendar correctly. -*/ -function _adodb_is_leap_year($year) -{ - if ($year % 4 != 0) return false; - - if ($year % 400 == 0) { - return true; - // if gregorian calendar (>1582), century not-divisible by 400 is not leap - } else if ($year > 1582 && $year % 100 == 0 ) { - return false; - } - - return true; -} - - -/** - checks for leap year, returns true if it is. Has 2-digit year check -*/ -function adodb_is_leap_year($year) -{ - return _adodb_is_leap_year(adodb_year_digit_check($year)); -} - -/** - Fix 2-digit years. Works for any century. - Assumes that if 2-digit is more than 30 years in future, then previous century. -*/ -function adodb_year_digit_check($y) -{ - if ($y < 100) { - - $yr = (integer) date("Y"); - $century = (integer) ($yr /100); - - if ($yr%100 > 50) { - $c1 = $century + 1; - $c0 = $century; - } else { - $c1 = $century; - $c0 = $century - 1; - } - $c1 *= 100; - // if 2-digit year is less than 30 years in future, set it to this century - // otherwise if more than 30 years in future, then we set 2-digit year to the prev century. - if (($y + $c1) < $yr+30) $y = $y + $c1; - else $y = $y + $c0*100; - } - return $y; -} - -/** - get local time zone offset from GMT -*/ -function adodb_get_gmt_diff() -{ -static $TZ; - if (isset($TZ)) return $TZ; - - $TZ = mktime(0,0,0,1,2,1970,0) - gmmktime(0,0,0,1,2,1970,0); - return $TZ; -} - -/** - Returns an array with date info. -*/ -function adodb_getdate($d=false,$fast=false) -{ - if ($d === false) return getdate(); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return @getdate($d); - } - } - return _adodb_getdate($d); -} - -/* -// generate $YRS table for _adodb_getdate() -function adodb_date_gentable($out=true) -{ - - for ($i=1970; $i >= 1600; $i-=10) { - $s = adodb_gmmktime(0,0,0,1,1,$i); - echo "$i => $s,
    "; - } -} -adodb_date_gentable(); - -for ($i=1970; $i > 1500; $i--) { - -echo "
    $i "; - adodb_date_test_date($i,1,1); -} - -*/ - - -$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); -$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - -function adodb_validdate($y,$m,$d) -{ -global $_month_table_normal,$_month_table_leaf; - - if (_adodb_is_leap_year($y)) $marr =& $_month_table_leaf; - else $marr =& $_month_table_normal; - - if ($m > 12 || $m < 1) return false; - - if ($d > 31 || $d < 1) return false; - - if ($marr[$m] < $d) return false; - - if ($y < 1000 && $y > 3000) return false; - - return true; -} - -/** - Low-level function that returns the getdate() array. We have a special - $fast flag, which if set to true, will return fewer array values, - and is much faster as it does not calculate dow, etc. -*/ -function _adodb_getdate($origd=false,$fast=false,$is_gmt=false) -{ -static $YRS; -global $_month_table_normal,$_month_table_leaf; - - $d = $origd - ($is_gmt ? 0 : adodb_get_gmt_diff()); - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $d366 = $_day_power * 366; - $d365 = $_day_power * 365; - - if ($d < 0) { - - if (empty($YRS)) $YRS = array( - 1970 => 0, - 1960 => -315619200, - 1950 => -631152000, - 1940 => -946771200, - 1930 => -1262304000, - 1920 => -1577923200, - 1910 => -1893456000, - 1900 => -2208988800, - 1890 => -2524521600, - 1880 => -2840140800, - 1870 => -3155673600, - 1860 => -3471292800, - 1850 => -3786825600, - 1840 => -4102444800, - 1830 => -4417977600, - 1820 => -4733596800, - 1810 => -5049129600, - 1800 => -5364662400, - 1790 => -5680195200, - 1780 => -5995814400, - 1770 => -6311347200, - 1760 => -6626966400, - 1750 => -6942499200, - 1740 => -7258118400, - 1730 => -7573651200, - 1720 => -7889270400, - 1710 => -8204803200, - 1700 => -8520336000, - 1690 => -8835868800, - 1680 => -9151488000, - 1670 => -9467020800, - 1660 => -9782640000, - 1650 => -10098172800, - 1640 => -10413792000, - 1630 => -10729324800, - 1620 => -11044944000, - 1610 => -11360476800, - 1600 => -11676096000); - - if ($is_gmt) $origd = $d; - // The valid range of a 32bit signed timestamp is typically from - // Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT - // - - # old algorithm iterates through all years. new algorithm does it in - # 10 year blocks - - /* - # old algo - for ($a = 1970 ; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - */ - - $lastsecs = 0; - $lastyear = 1970; - foreach($YRS as $year => $secs) { - if ($d >= $secs) { - $a = $lastyear; - break; - } - $lastsecs = $secs; - $lastyear = $year; - } - - $d -= $lastsecs; - if (!isset($a)) $a = $lastyear; - - //echo ' yr=',$a,' ', $d,'.'; - - for (; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - /**/ - - $secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd; - - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 13 ; --$a > 0;) { - $lastd = $d; - $d += $mtab[$a] * $_day_power; - if ($d >= 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - - $d = $lastd; - $day = $ndays + ceil(($d+1) / ($_day_power)); - - $d += ($ndays - $day+1)* $_day_power; - $hour = floor($d/$_hour_power); - - } else { - for ($a = 1970 ;; $a++) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d -= $d366; - else $d -= $d365; - if ($d < 0) { - $year = $a; - break; - } - } - $secsInYear = $lastd; - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 1 ; $a <= 12; $a++) { - $lastd = $d; - $d -= $mtab[$a] * $_day_power; - if ($d < 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - $d = $lastd; - $day = ceil(($d+1) / $_day_power); - $d = $d - ($day-1) * $_day_power; - $hour = floor($d /$_hour_power); - } - - $d -= $hour * $_hour_power; - $min = floor($d/$_min_power); - $secs = $d - $min * $_min_power; - if ($fast) { - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'leap' => $leaf, - 'ndays' => $ndays - ); - } - - - $dow = adodb_dow($year,$month,$day); - - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'wday' => $dow, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'weekday' => gmdate('l',$_day_power*(3+$dow)), - 'month' => gmdate('F',mktime(0,0,0,$month,2,1971)), - 0 => $origd - ); -} - -function adodb_gmdate($fmt,$d=false) -{ - return adodb_date($fmt,$d,true); -} - -// accepts unix timestamp and iso date format in $d -function adodb_date2($fmt, $d=false, $is_gmt=false) -{ - if ($d !== false) { - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($d), $rr)) return adodb_date($fmt,false,$is_gmt); - - if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt); - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1],false,$is_gmt); - else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1],false,$is_gmt); - } - - return adodb_date($fmt,$d,$is_gmt); -} - - -/** - Return formatted date based on timestamp $d -*/ -function adodb_date($fmt,$d=false,$is_gmt=false) -{ -static $daylight; - - if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d); - - } - } - $_day_power = 86400; - - $arr = _adodb_getdate($d,true,$is_gmt); - - if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv'); - if ($daylight) adodb_daylight_sv($arr, $is_gmt); - - $year = $arr['year']; - $month = $arr['mon']; - $day = $arr['mday']; - $hour = $arr['hours']; - $min = $arr['minutes']; - $secs = $arr['seconds']; - - $max = strlen($fmt); - $dates = ''; - - $isphp5 = PHP_VERSION >= 5; - - /* - at this point, we have the following integer vars to manipulate: - $year, $month, $day, $hour, $min, $secs - */ - for ($i=0; $i < $max; $i++) { - switch($fmt[$i]) { - case 'T': $dates .= date('T');break; - // YEAR - case 'L': $dates .= $arr['leap'] ? '1' : '0'; break; - case 'r': // Thu, 21 Dec 2000 16:01:07 +0200 - - // 4.3.11 uses '04 Jun 2004' - // 4.3.8 uses ' 4 Jun 2004' - $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', ' - . ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' '; - - if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; - - if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min; - - if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs; - - $gmt = adodb_get_gmt_diff(); - if ($isphp5) - $dates .= sprintf(' %s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); - else - $dates .= sprintf(' %s%04d',($gmt<0)?'+':'-',abs($gmt)/36); - break; - - case 'Y': $dates .= $year; break; - case 'y': $dates .= substr($year,strlen($year)-2,2); break; - // MONTH - case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break; - case 'Q': $dates .= ($month+3)>>2; break; - case 'n': $dates .= $month; break; - case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break; - case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break; - // DAY - case 't': $dates .= $arr['ndays']; break; - case 'z': $dates .= $arr['yday']; break; - case 'w': $dates .= adodb_dow($year,$month,$day); break; - case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'j': $dates .= $day; break; - case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break; - case 'S': - $d10 = $day % 10; - if ($d10 == 1) $dates .= 'st'; - else if ($d10 == 2 && $day != 12) $dates .= 'nd'; - else if ($d10 == 3) $dates .= 'rd'; - else $dates .= 'th'; - break; - - // HOUR - case 'Z': - $dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff(); break; - case 'O': - $gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - - if ($isphp5) - $dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); - else - $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); - break; - - case 'H': - if ($hour < 10) $dates .= '0'.$hour; - else $dates .= $hour; - break; - case 'h': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - - if ($hh < 10) $dates .= '0'.$hh; - else $dates .= $hh; - break; - - case 'G': - $dates .= $hour; - break; - - case 'g': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - $dates .= $hh; - break; - // MINUTES - case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break; - // SECONDS - case 'U': $dates .= $d; break; - case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break; - // AM/PM - // Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM - case 'a': - if ($hour>=12) $dates .= 'pm'; - else $dates .= 'am'; - break; - case 'A': - if ($hour>=12) $dates .= 'PM'; - else $dates .= 'AM'; - break; - default: - $dates .= $fmt[$i]; break; - // ESCAPE - case "\\": - $i++; - if ($i < $max) $dates .= $fmt[$i]; - break; - } - } - return $dates; -} - -/** - Returns a timestamp given a GMT/UTC time. - Note that $is_dst is not implemented and is ignored. -*/ -function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false) -{ - return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true); -} - -/** - Return a timestamp given a local time. Originally by jackbbs. - Note that $is_dst is not implemented and is ignored. - - Not a very fast algorithm - O(n) operation. Could be optimized to O(1). -*/ -function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false,$is_gmt=false) -{ - if (!defined('ADODB_TEST_DATES')) { - - if ($mon === false) { - return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec); - } - - // for windows, we don't check 1970 because with timezone differences, - // 1 Jan 1970 could generate negative timestamp, which is illegal - if (1971 < $year && $year < 2038 - || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038) - ) { - return $is_gmt ? - @gmmktime($hr,$min,$sec,$mon,$day,$year): - @mktime($hr,$min,$sec,$mon,$day,$year); - } - } - - $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - - /* - # disabled because some people place large values in $sec. - # however we need it for $mon because we use an array... - $hr = intval($hr); - $min = intval($min); - $sec = intval($sec); - */ - $mon = intval($mon); - $day = intval($day); - $year = intval($year); - - - $year = adodb_year_digit_check($year); - - if ($mon > 12) { - $y = floor($mon / 12); - $year += $y; - $mon -= $y*12; - } else if ($mon < 1) { - $y = ceil((1-$mon) / 12); - $year -= $y; - $mon += $y*12; - } - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $_total_date = 0; - if ($year >= 1970) { - for ($a = 1970 ; $a <= $year; $a++) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a < $year) { - $_total_date += $_add_date; - } else { - for($b=1;$b<$mon;$b++) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date +=$day-1; - $ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different; - - } else { - for ($a = 1969 ; $a >= $year; $a--) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a > $year) { $_total_date += $_add_date; - } else { - for($b=12;$b>$mon;$b--) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date += $loop_table[$mon] - $day; - - $_day_time = $hr * $_hour_power + $min * $_min_power + $sec; - $_day_time = $_day_power - $_day_time; - $ret = -( $_total_date * $_day_power + $_day_time - $gmt_different); - if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction - else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582. - } - //print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret; - return $ret; -} - -function adodb_gmstrftime($fmt, $ts=false) -{ - return adodb_strftime($fmt,$ts,true); -} - -// hack - convert to adodb_date -function adodb_strftime($fmt, $ts=false,$is_gmt=false) -{ -global $ADODB_DATE_LOCALE; - - if (!defined('ADODB_TEST_DATES')) { - if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); - - } - } - - if (empty($ADODB_DATE_LOCALE)) { - /* - $tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am - $sep = substr($tstr,2,1); - $hasAM = strrpos($tstr,'M') !== false; - */ - # see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24 - $dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am - $sep = substr($dstr,2,1); - $tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am - $hasAM = strrpos($tstr,'M') !== false; - - $ADODB_DATE_LOCALE = array(); - $ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y'; - $ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s'; - - } - $inpct = false; - $fmtdate = ''; - for ($i=0,$max = strlen($fmt); $i < $max; $i++) { - $ch = $fmt[$i]; - if ($ch == '%') { - if ($inpct) { - $fmtdate .= '%'; - $inpct = false; - } else - $inpct = true; - } else if ($inpct) { - - $inpct = false; - switch($ch) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'E': - case 'O': - /* ignore format modifiers */ - $inpct = true; - break; - - case 'a': $fmtdate .= 'D'; break; - case 'A': $fmtdate .= 'l'; break; - case 'h': - case 'b': $fmtdate .= 'M'; break; - case 'B': $fmtdate .= 'F'; break; - case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break; - case 'C': $fmtdate .= '\C?'; break; // century - case 'd': $fmtdate .= 'd'; break; - case 'D': $fmtdate .= 'm/d/y'; break; - case 'e': $fmtdate .= 'j'; break; - case 'g': $fmtdate .= '\g?'; break; //? - case 'G': $fmtdate .= '\G?'; break; //? - case 'H': $fmtdate .= 'H'; break; - case 'I': $fmtdate .= 'h'; break; - case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd - case 'm': $fmtdate .= 'm'; break; - case 'M': $fmtdate .= 'i'; break; - case 'n': $fmtdate .= "\n"; break; - case 'p': $fmtdate .= 'a'; break; - case 'r': $fmtdate .= 'h:i:s a'; break; - case 'R': $fmtdate .= 'H:i:s'; break; - case 'S': $fmtdate .= 's'; break; - case 't': $fmtdate .= "\t"; break; - case 'T': $fmtdate .= 'H:i:s'; break; - case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break; - case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break; - case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based - case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'y': $fmtdate .= 'y'; break; - case 'Y': $fmtdate .= 'Y'; break; - case 'Z': $fmtdate .= 'T'; break; - } - } else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' )) - $fmtdate .= "\\".$ch; - else - $fmtdate .= $ch; - } - //echo "fmt=",$fmtdate,"
    "; - if ($ts === false) $ts = time(); - $ret = adodb_date($fmtdate, $ts, $is_gmt); - return $ret; -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.zip b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.zip deleted file mode 100755 index d3239dbc..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-time.zip and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema.inc.php deleted file mode 100755 index 8bd30be5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema.inc.php +++ /dev/null @@ -1,2221 +0,0 @@ -parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - - } - - function create() { - return array(); - } - - /** - * Destroys the object - */ - function destroy() { - unset( $this ); - } - - /** - * Checks whether the specified RDBMS is supported by the current - * database object or its ranking ancestor. - * - * @param string $platform RDBMS platform name (from ADODB platform list). - * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE. - */ - function supportedPlatform( $platform = NULL ) { - return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE; - } - - /** - * Returns the prefix set by the ranking ancestor of the database object. - * - * @param string $name Prefix string. - * @return string Prefix. - */ - function prefix( $name = '' ) { - return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name; - } - - /** - * Extracts a field ID from the specified field. - * - * @param string $field Field. - * @return string Field ID. - */ - function FieldID( $field ) { - return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) ); - } -} - -/** -* Creates a table object in ADOdb's datadict format -* -* This class stores information about a database table. As charactaristics -* of the table are loaded from the external source, methods and properties -* of this class are used to build up the table description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbTable extends dbObject { - - /** - * @var string Table name - */ - var $name; - - /** - * @var array Field specifier: Meta-information about each field - */ - var $fields = array(); - - /** - * @var array List of table indexes. - */ - var $indexes = array(); - - /** - * @var array Table options: Table-level options - */ - var $opts = array(); - - /** - * @var string Field index: Keeps track of which field is currently being processed - */ - var $current_field; - - /** - * @var boolean Mark table for destruction - * @access private - */ - var $drop_table; - - /** - * @var boolean Mark field for destruction (not yet implemented) - * @access private - */ - var $drop_field = array(); - - /** - * Iniitializes a new table object. - * - * @param string $prefix DB Object prefix - * @param array $attributes Array of table attributes. - */ - function dbTable( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - $this->name = $this->prefix($attributes['NAME']); - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'INDEX': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addIndex( $attributes ) ); - } - break; - case 'DATA': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addData( $attributes ) ); - } - break; - case 'DROP': - $this->drop(); - break; - case 'FIELD': - // Add a field - $fieldName = $attributes['NAME']; - $fieldType = $attributes['TYPE']; - $fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL; - $fieldOpts = isset( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL; - - $this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts ); - break; - case 'KEY': - case 'NOTNULL': - case 'AUTOINCREMENT': - // Add a field option - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - case 'DEFAULT': - // Add a field option to the table object - - // Work around ADOdb datadict issue that misinterprets empty strings. - if( $attributes['VALUE'] == '' ) { - $attributes['VALUE'] = " '' "; - } - - $this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] ); - break; - case 'DEFDATE': - case 'DEFTIMESTAMP': - // Add a field option to the table object - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Table constraint - case 'CONSTRAINT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $this->currentElement, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - // Table option - case 'OPT': - $this->addTableOpt( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - case 'FIELD': - unset($this->current_field); - break; - - } - } - - /** - * Adds an index to a table object - * - * @param array $attributes Index attributes - * @return object dbIndex object - */ - function &addIndex( $attributes ) { - $name = strtoupper( $attributes['NAME'] ); - $this->indexes[$name] =& new dbIndex( $this, $attributes ); - return $this->indexes[$name]; - } - - /** - * Adds data to a table object - * - * @param array $attributes Data attributes - * @return object dbData object - */ - function &addData( $attributes ) { - if( !isset( $this->data ) ) { - $this->data =& new dbData( $this, $attributes ); - } - return $this->data; - } - - /** - * Adds a field to a table object - * - * $name is the name of the table to which the field should be added. - * $type is an ADODB datadict field type. The following field types - * are supported as of ADODB 3.40: - * - C: varchar - * - X: CLOB (character large object) or largest varchar size - * if CLOB is not supported - * - C2: Multibyte varchar - * - X2: Multibyte CLOB - * - B: BLOB (binary large object) - * - D: Date (some databases do not support this, and we return a datetime type) - * - T: Datetime or Timestamp - * - L: Integer field suitable for storing booleans (0 or 1) - * - I: Integer (mapped to I4) - * - I1: 1-byte integer - * - I2: 2-byte integer - * - I4: 4-byte integer - * - I8: 8-byte integer - * - F: Floating point number - * - N: Numeric or decimal number - * - * @param string $name Name of the table to which the field will be added. - * @param string $type ADODB datadict field type. - * @param string $size Field size - * @param array $opts Field options array - * @return array Field specifier array - */ - function addField( $name, $type, $size = NULL, $opts = NULL ) { - $field_id = $this->FieldID( $name ); - - // Set the field index so we know where we are - $this->current_field = $field_id; - - // Set the field name (required) - $this->fields[$field_id]['NAME'] = $name; - - // Set the field type (required) - $this->fields[$field_id]['TYPE'] = $type; - - // Set the field size (optional) - if( isset( $size ) ) { - $this->fields[$field_id]['SIZE'] = $size; - } - - // Set the field options - if( isset( $opts ) ) { - $this->fields[$field_id]['OPTS'][] = $opts; - } - } - - /** - * Adds a field option to the current field specifier - * - * This method adds a field option allowed by the ADOdb datadict - * and appends it to the given field. - * - * @param string $field Field name - * @param string $opt ADOdb field option - * @param mixed $value Field option value - * @return array Field specifier array - */ - function addFieldOpt( $field, $opt, $value = NULL ) { - if( !isset( $value ) ) { - $this->fields[$this->FieldID( $field )]['OPTS'][] = $opt; - // Add the option and value - } else { - $this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value ); - } - } - - /** - * Adds an option to the table - * - * This method takes a comma-separated list of table-level options - * and appends them to the table object. - * - * @param string $opt Table option - * @return array Options - */ - function addTableOpt( $opt ) { - $this->opts[] = $opt; - - return $this->opts; - } - - /** - * Generates the SQL that will create the table in the database - * - * @param object $xmls adoSchema object - * @return array Array containing table creation SQL - */ - function create( &$xmls ) { - $sql = array(); - - // drop any existing indexes - if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) { - foreach( $legacy_indexes as $index => $index_details ) { - $sql[] = $xmls->dict->DropIndexSQL( $index, $this->name ); - } - } - - // remove fields to be dropped from table object - foreach( $this->drop_field as $field ) { - unset( $this->fields[$field] ); - } - - // if table exists - if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) { - // drop table - if( $this->drop_table ) { - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - - return $sql; - } - - // drop any existing fields not in schema - foreach( $legacy_fields as $field_id => $field ) { - if( !isset( $this->fields[$field_id] ) ) { - $sql[] = $xmls->dict->DropColumnSQL( $this->name, '`'.$field->name.'`' ); - } - } - // if table doesn't exist - } else { - if( $this->drop_table ) { - return $sql; - } - - $legacy_fields = array(); - } - - // Loop through the field specifier array, building the associative array for the field options - $fldarray = array(); - - foreach( $this->fields as $field_id => $finfo ) { - // Set an empty size if it isn't supplied - if( !isset( $finfo['SIZE'] ) ) { - $finfo['SIZE'] = ''; - } - - // Initialize the field array with the type and size - $fldarray[$field_id] = array( - 'NAME' => $finfo['NAME'], - 'TYPE' => $finfo['TYPE'], - 'SIZE' => $finfo['SIZE'] - ); - - // Loop through the options array and add the field options. - if( isset( $finfo['OPTS'] ) ) { - foreach( $finfo['OPTS'] as $opt ) { - // Option has an argument. - if( is_array( $opt ) ) { - $key = key( $opt ); - $value = $opt[key( $opt )]; - @$fldarray[$field_id][$key] .= $value; - // Option doesn't have arguments - } else { - $fldarray[$field_id][$opt] = $opt; - } - } - } - } - - if( empty( $legacy_fields ) ) { - // Create the new table - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - logMsg( end( $sql ), 'Generated CreateTableSQL' ); - } else { - // Upgrade an existing table - logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" ); - switch( $xmls->upgrade ) { - // Use ChangeTableSQL - case 'ALTER': - logMsg( 'Generated ChangeTableSQL (ALTERing table)' ); - $sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts ); - break; - case 'REPLACE': - logMsg( 'Doing upgrade REPLACE (testing)' ); - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - break; - // ignore table - default: - return array(); - } - } - - foreach( $this->indexes as $index ) { - $sql[] = $index->create( $xmls ); - } - - if( isset( $this->data ) ) { - $sql[] = $this->data->create( $xmls ); - } - - return $sql; - } - - /** - * Marks a field or table for destruction - */ - function drop() { - if( isset( $this->current_field ) ) { - // Drop the current field - logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" ); - // $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field ); - $this->drop_field[$this->current_field] = $this->current_field; - } else { - // Drop the current table - logMsg( "Dropping table '{$this->name}'" ); - // $this->drop_table = $xmls->dict->DropTableSQL( $this->name ); - $this->drop_table = TRUE; - } - } -} - -/** -* Creates an index object in ADOdb's datadict format -* -* This class stores information about a database index. As charactaristics -* of the index are loaded from the external source, methods and properties -* of this class are used to build up the index description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbIndex extends dbObject { - - /** - * @var string Index name - */ - var $name; - - /** - * @var array Index options: Index-level options - */ - var $opts = array(); - - /** - * @var array Indexed fields: Table columns included in this index - */ - var $columns = array(); - - /** - * @var boolean Mark index for destruction - * @access private - */ - var $drop = FALSE; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbIndex( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - $this->name = $this->prefix ($attributes['NAME']); - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'DROP': - $this->drop(); - break; - case 'CLUSTERED': - case 'BITMAP': - case 'UNIQUE': - case 'FULLTEXT': - case 'HASH': - // Add index Option - $this->addIndexOpt( $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'COL': - $this->addField( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'INDEX': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $name ) { - $this->columns[$this->FieldID( $name )] = $name; - - // Return the field list - return $this->columns; - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addIndexOpt( $opt ) { - $this->opts[] = $opt; - - // Return the options list - return $this->opts; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - if( $this->drop ) { - return NULL; - } - - // eliminate any columns that aren't in the table - foreach( $this->columns as $id => $col ) { - if( !isset( $this->parent->fields[$id] ) ) { - unset( $this->columns[$id] ); - } - } - - return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts ); - } - - /** - * Marks an index for destruction - */ - function drop() { - $this->drop = TRUE; - } -} - -/** -* Creates a data object in ADOdb's datadict format -* -* This class stores information about table data. -* -* @package axmls -* @access private -*/ -class dbData extends dbObject { - - var $data = array(); - - var $row; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbData( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'ROW': - $this->row = count( $this->data ); - $this->data[$this->row] = array(); - break; - case 'F': - $this->addField($attributes); - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'F': - $this->addData( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'DATA': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $attributes ) { - if( isset( $attributes['NAME'] ) ) { - $name = $attributes['NAME']; - } else { - $name = count($this->data[$this->row]); - } - - // Set the field index so we know where we are - $this->current_field = $this->FieldID( $name ); - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addData( $cdata ) { - if( !isset( $this->data[$this->row] ) ) { - $this->data[$this->row] = array(); - } - - if( !isset( $this->data[$this->row][$this->current_field] ) ) { - $this->data[$this->row][$this->current_field] = ''; - } - - $this->data[$this->row][$this->current_field] .= $cdata; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - $table = $xmls->dict->TableName($this->parent->name); - $table_field_count = count($this->parent->fields); - $sql = array(); - - // eliminate any columns that aren't in the table - foreach( $this->data as $row ) { - $table_fields = $this->parent->fields; - $fields = array(); - - foreach( $row as $field_id => $field_data ) { - if( !array_key_exists( $field_id, $table_fields ) ) { - if( is_numeric( $field_id ) ) { - $field_id = reset( array_keys( $table_fields ) ); - } else { - continue; - } - } - - $name = $table_fields[$field_id]['NAME']; - - switch( $table_fields[$field_id]['TYPE'] ) { - case 'C': - case 'C2': - case 'X': - case 'X2': - $fields[$name] = $xmls->db->qstr( $field_data ); - break; - case 'I': - case 'I1': - case 'I2': - case 'I4': - case 'I8': - $fields[$name] = intval($field_data); - break; - default: - $fields[$name] = $field_data; - } - - unset($table_fields[$field_id]); - } - - // check that at least 1 column is specified - if( empty( $fields ) ) { - continue; - } - - // check that no required columns are missing - if( count( $fields ) < $table_field_count ) { - foreach( $table_fields as $field ) { - if (isset( $field['OPTS'] )) - if( ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) { - continue(2); - } - } - } - - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - } - - return $sql; - } -} - -/** -* Creates the SQL to execute a list of provided SQL queries -* -* @package axmls -* @access private -*/ -class dbQuerySet extends dbObject { - - /** - * @var array List of SQL queries - */ - var $queries = array(); - - /** - * @var string String used to build of a query line by line - */ - var $query; - - /** - * @var string Query prefix key - */ - var $prefixKey = ''; - - /** - * @var boolean Auto prefix enable (TRUE) - */ - var $prefixMethod = 'AUTO'; - - /** - * Initializes the query set. - * - * @param object $parent Parent object - * @param array $attributes Attributes - */ - function dbQuerySet( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - // Overrides the manual prefix key - if( isset( $attributes['KEY'] ) ) { - $this->prefixKey = $attributes['KEY']; - } - - $prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : ''; - - // Enables or disables automatic prefix prepending - switch( $prefixMethod ) { - case 'AUTO': - $this->prefixMethod = 'AUTO'; - break; - case 'MANUAL': - $this->prefixMethod = 'MANUAL'; - break; - case 'NONE': - $this->prefixMethod = 'NONE'; - break; - } - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: QUERY. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'QUERY': - // Create a new query in a SQL queryset. - // Ignore this query set if a platform is specified and it's different than the - // current connection platform. - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->newQuery(); - } else { - $this->discardQuery(); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Line of queryset SQL data - case 'QUERY': - $this->buildQuery( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'QUERY': - // Add the finished query to the open query set. - $this->addQuery(); - break; - case 'SQL': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - default: - - } - } - - /** - * Re-initializes the query. - * - * @return boolean TRUE - */ - function newQuery() { - $this->query = ''; - - return TRUE; - } - - /** - * Discards the existing query. - * - * @return boolean TRUE - */ - function discardQuery() { - unset( $this->query ); - - return TRUE; - } - - /** - * Appends a line to a query that is being built line by line - * - * @param string $data Line of SQL data or NULL to initialize a new query - * @return string SQL query string. - */ - function buildQuery( $sql = NULL ) { - if( !isset( $this->query ) OR empty( $sql ) ) { - return FALSE; - } - - $this->query .= $sql; - - return $this->query; - } - - /** - * Adds a completed query to the query list - * - * @return string SQL of added query - */ - function addQuery() { - if( !isset( $this->query ) ) { - return FALSE; - } - - $this->queries[] = $return = trim($this->query); - - unset( $this->query ); - - return $return; - } - - /** - * Creates and returns the current query set - * - * @param object $xmls adoSchema object - * @return array Query set - */ - function create( &$xmls ) { - foreach( $this->queries as $id => $query ) { - switch( $this->prefixMethod ) { - case 'AUTO': - // Enable auto prefix replacement - - // Process object prefix. - // Evaluate SQL statements to prepend prefix to objects - $query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - - // SELECT statements aren't working yet - #$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data ); - - case 'MANUAL': - // If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX. - // If prefixKey is not set, we use the default constant XMLS_PREFIX - if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) { - // Enable prefix override - $query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query ); - } else { - // Use default replacement - $query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query ); - } - } - - $this->queries[$id] = trim( $query ); - } - - // Return the query set array - return $this->queries; - } - - /** - * Rebuilds the query with the prefix attached to any objects - * - * @param string $regex Regex used to add prefix - * @param string $query SQL query string - * @param string $prefix Prefix to be appended to tables, indices, etc. - * @return string Prefixed SQL query string. - */ - function prefixQuery( $regex, $query, $prefix = NULL ) { - if( !isset( $prefix ) ) { - return $query; - } - - if( preg_match( $regex, $query, $match ) ) { - $preamble = $match[1]; - $postamble = $match[5]; - $objectList = explode( ',', $match[3] ); - // $prefix = $prefix . '_'; - - $prefixedList = ''; - - foreach( $objectList as $object ) { - if( $prefixedList !== '' ) { - $prefixedList .= ', '; - } - - $prefixedList .= $prefix . trim( $object ); - } - - $query = $preamble . ' ' . $prefixedList . ' ' . $postamble; - } - - return $query; - } -} - -/** -* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements -* -* This class is used to load and parse the XML file, to create an array of SQL statements -* that can be used to build a database, and to build the database using the SQL array. -* -* @tutorial getting_started.pkg -* -* @author Richard Tango-Lowy & Dan Cech -* @version $Revision: 350 $ -* -* @package axmls -*/ -class adoSchema { - - /** - * @var array Array containing SQL queries to generate all objects - * @access private - */ - var $sqlArray; - - /** - * @var object ADOdb connection object - * @access private - */ - var $db; - - /** - * @var object ADOdb Data Dictionary - * @access private - */ - var $dict; - - /** - * @var string Current XML element - * @access private - */ - var $currentElement = ''; - - /** - * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database - * @access private - */ - var $upgrade = ''; - - /** - * @var string Optional object prefix - * @access private - */ - var $objectPrefix = ''; - - /** - * @var long Original Magic Quotes Runtime value - * @access private - */ - var $mgq; - - /** - * @var long System debug - * @access private - */ - var $debug; - - /** - * @var string Regular expression to find schema version - * @access private - */ - var $versionRegex = '//'; - - /** - * @var string Current schema version - * @access private - */ - var $schemaVersion; - - /** - * @var int Success of last Schema execution - */ - var $success; - - /** - * @var bool Execute SQL inline as it is generated - */ - var $executeInline; - - /** - * @var bool Continue SQL execution if errors occur - */ - var $continueOnError; - - /** - * Creates an adoSchema object - * - * Creating an adoSchema object is the first step in processing an XML schema. - * The only parameter is an ADOdb database connection object, which must already - * have been created. - * - * @param object $db ADOdb database connection object. - */ - function adoSchema( &$db ) { - // Initialize the environment - $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - - $this->db =& $db; - $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); - $this->sqlArray = array(); - $this->schemaVersion = XMLS_SCHEMA_VERSION; - $this->executeInline( XMLS_EXECUTE_INLINE ); - $this->continueOnError( XMLS_CONTINUE_ON_ERROR ); - $this->setUpgradeMethod(); - } - - /** - * Sets the method to be used for upgrading an existing database - * - * Use this method to specify how existing database objects should be upgraded. - * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to - * alter each database object directly, REPLACE attempts to rebuild each object - * from scratch, BEST attempts to determine the best upgrade method for each - * object, and NONE disables upgrading. - * - * This method is not yet used by AXMLS, but exists for backward compatibility. - * The ALTER method is automatically assumed when the adoSchema object is - * instantiated; other upgrade methods are not currently supported. - * - * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE) - * @returns string Upgrade method used - */ - function SetUpgradeMethod( $method = '' ) { - if( !is_string( $method ) ) { - return FALSE; - } - - $method = strtoupper( $method ); - - // Handle the upgrade methods - switch( $method ) { - case 'ALTER': - $this->upgrade = $method; - break; - case 'REPLACE': - $this->upgrade = $method; - break; - case 'BEST': - $this->upgrade = 'ALTER'; - break; - case 'NONE': - $this->upgrade = 'NONE'; - break; - default: - // Use default if no legitimate method is passed. - $this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD; - } - - return $this->upgrade; - } - - /** - * Enables/disables inline SQL execution. - * - * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution), - * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode - * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema() - * to apply the schema to the database. - * - * @param bool $mode execute - * @return bool current execution mode - * - * @see ParseSchema(), ExecuteSchema() - */ - function ExecuteInline( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->executeInline = $mode; - } - - return $this->executeInline; - } - - /** - * Enables/disables SQL continue on error. - * - * Call this method to enable or disable continuation of SQL execution if an error occurs. - * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs. - * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing - * of the schema will continue. - * - * @param bool $mode execute - * @return bool current continueOnError mode - * - * @see addSQL(), ExecuteSchema() - */ - function ContinueOnError( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->continueOnError = $mode; - } - - return $this->continueOnError; - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to create the database described. - * @see ParseSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function ParseSchema( $filename, $returnSchema = FALSE ) { - return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema from a file (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - * - * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString() - * @see ParseSchema(), ParseSchemaString() - */ - function ParseSchemaFile( $filename, $returnSchema = FALSE ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) { - return FALSE; - } - - if ( $returnSchema ) - { - $xmlstring = ''; - while( $data = fread( $fp, 100000 ) ) { - $xmlstring .= $data; - } - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Converts an XML schema string to SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * @see ParseSchema() - * - * @param string $xmlstring XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - // do version detection here - if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) { - return FALSE; - } - - if ( $returnSchema ) - { - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Loads an XML schema from a file and converts it to uninstallation SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to remove the database described. - * @see RemoveSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function RemoveSchema( $filename, $returnSchema = FALSE ) { - return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Converts an XML schema string to uninstallation SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to uninstall the database described by the schema. - * @see RemoveSchema() - * - * @param string $schema XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function RemoveSchemaString( $schema, $returnSchema = FALSE ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema ); - } - - /** - * Applies the current XML schema to the database (post execution). - * - * Call this method to apply the current schema (generally created by calling - * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, - * and executing other SQL specified in the schema) after parsing. - * @see ParseSchema(), ParseSchemaString(), ExecuteInline() - * - * @param array $sqlArray Array of SQL statements that will be applied rather than - * the current schema. - * @param boolean $continueOnErr Continue to apply the schema even if an error occurs. - * @returns integer 0 if failure, 1 if errors, 2 if successful. - */ - function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) { - if( !is_bool( $continueOnErr ) ) { - $continueOnErr = $this->ContinueOnError(); - } - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - $this->success = 0; - } else { - $this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr ); - } - - return $this->success; - } - - /** - * Returns the current SQL array. - * - * Call this method to fetch the array of SQL queries resulting from - * ParseSchema() or ParseSchemaString(). - * - * @param string $format Format: HTML, TEXT, or NONE (PHP array) - * @return array Array of SQL statements or FALSE if an error occurs - */ - function PrintSQL( $format = 'NONE' ) { - $sqlArray = null; - return $this->getSQL( $format, $sqlArray ); - } - - /** - * Saves the current SQL array to the local filesystem as a list of SQL queries. - * - * Call this method to save the array of SQL queries (generally resulting from a - * parsed XML schema) to the filesystem. - * - * @param string $filename Path and name where the file should be saved. - * @return boolean TRUE if save is successful, else FALSE. - */ - function SaveSQL( $filename = './schema.sql' ) { - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - if( !isset( $sqlArray ) ) { - return FALSE; - } - - $fp = fopen( $filename, "w" ); - - foreach( $sqlArray as $key => $query ) { - fwrite( $fp, $query . ";\n" ); - } - fclose( $fp ); - } - - /** - * Create an xml parser - * - * @return object PHP XML parser object - * - * @access private - */ - function &create_parser() { - // Create the parser - $xmlParser = xml_parser_create(); - xml_set_object( $xmlParser, $this ); - - // Initialize the XML callback functions - xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' ); - xml_set_character_data_handler( $xmlParser, '_tag_cdata' ); - - return $xmlParser; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->obj = new dbTable( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - break; - case 'SQL': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbQuerySet( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - } - - /** - * XML Callback to process end elements - * - * @access private - * @internal - */ - function _tag_close( &$parser, $tag ) { - - } - - /** - * Converts an XML schema string to the specified DTD version. - * - * Call this method to convert a string containing an XML schema to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaFile() - * - * @param string $schema String containing XML schema that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = $schema; - } else { - $result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - // compat for pre-4.3 - jlim - function _file_get_contents($path) - { - if (function_exists('file_get_contents')) return file_get_contents($path); - return join('',file($path)); - } - - /** - * Converts an XML schema file to the specified DTD version. - * - * Call this method to convert the specified XML schema file to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaString() - * - * @param string $filename Name of XML schema file that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaFileVersion( $filename ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = _file_get_contents( $filename ); - - // remove unicode BOM if present - if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) { - $result = substr( $result, 3 ); - } - } else { - $result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' ); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - function TransformSchema( $schema, $xsl, $schematype='string' ) - { - // Fail if XSLT extension is not available - if( ! function_exists( 'xslt_create' ) ) { - return FALSE; - } - - $xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl'; - - // look for xsl - if( !is_readable( $xsl_file ) ) { - return FALSE; - } - - switch( $schematype ) - { - case 'file': - if( !is_readable( $schema ) ) { - return FALSE; - } - - $schema = _file_get_contents( $schema ); - break; - case 'string': - default: - if( !is_string( $schema ) ) { - return FALSE; - } - } - - $arguments = array ( - '/_xml' => $schema, - '/_xsl' => _file_get_contents( $xsl_file ) - ); - - // create an XSLT processor - $xh = xslt_create (); - - // set error handler - xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler')); - - // process the schema - $result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); - - xslt_free ($xh); - - return $result; - } - - /** - * Processes XSLT transformation errors - * - * @param object $parser XML parser object - * @param integer $errno Error number - * @param integer $level Error level - * @param array $fields Error information fields - * - * @access private - */ - function xslt_error_handler( $parser, $errno, $level, $fields ) { - if( is_array( $fields ) ) { - $msg = array( - 'Message Type' => ucfirst( $fields['msgtype'] ), - 'Message Code' => $fields['code'], - 'Message' => $fields['msg'], - 'Error Number' => $errno, - 'Level' => $level - ); - - switch( $fields['URI'] ) { - case 'arg:/_xml': - $msg['Input'] = 'XML'; - break; - case 'arg:/_xsl': - $msg['Input'] = 'XSL'; - break; - default: - $msg['Input'] = $fields['URI']; - } - - $msg['Line'] = $fields['line']; - } else { - $msg = array( - 'Message Type' => 'Error', - 'Error Number' => $errno, - 'Level' => $level, - 'Fields' => var_export( $fields, TRUE ) - ); - } - - $error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n" - . '' . "\n"; - - foreach( $msg as $label => $details ) { - $error_details .= '' . "\n"; - } - - $error_details .= '
    ' . $label . ': ' . htmlentities( $details ) . '
    '; - - trigger_error( $error_details, E_USER_ERROR ); - } - - /** - * Returns the AXMLS Schema Version of the requested XML schema file. - * - * Call this method to obtain the AXMLS DTD version of the requested XML schema file. - * @see SchemaStringVersion() - * - * @param string $filename AXMLS schema file - * @return string Schema version number or FALSE on error - */ - function SchemaFileVersion( $filename ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( preg_match( $this->versionRegex, $data, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - } - - return FALSE; - } - - /** - * Returns the AXMLS Schema Version of the provided XML schema string. - * - * Call this method to obtain the AXMLS DTD version of the provided XML schema string. - * @see SchemaFileVersion() - * - * @param string $xmlstring XML schema string - * @return string Schema version number or FALSE on error - */ - function SchemaStringVersion( $xmlstring ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - - return FALSE; - } - - /** - * Extracts an XML schema from an existing database. - * - * Call this method to create an XML schema string from an existing database. - * If the data parameter is set to TRUE, AXMLS will include the data from the database - * in the schema. - * - * @param boolean $data Include data in schema dump - * @return string Generated XML schema - */ - function ExtractSchema( $data = FALSE ) { - $old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM ); - - $schema = '' . "\n" - . '' . "\n"; - - if( is_array( $tables = $this->db->MetaTables( 'TABLES' ) ) ) { - foreach( $tables as $table ) { - $schema .= ' ' . "\n"; - - // grab details from database - $rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE 1=1' ); - $fields = $this->db->MetaColumns( $table ); - $indexes = $this->db->MetaIndexes( $table ); - - if( is_array( $fields ) ) { - foreach( $fields as $details ) { - $extra = ''; - $content = array(); - - if( $details->max_length > 0 ) { - $extra .= ' size="' . $details->max_length . '"'; - } - - if( $details->primary_key ) { - $content[] = ''; - } elseif( $details->not_null ) { - $content[] = ''; - } - - if( $details->has_default ) { - $content[] = ''; - } - - if( $details->auto_increment ) { - $content[] = ''; - } - - // this stops the creation of 'R' columns, - // AUTOINCREMENT is used to create auto columns - $details->primary_key = 0; - $type = $rs->MetaType( $details ); - - $schema .= ' '; - - if( !empty( $content ) ) { - $schema .= "\n " . implode( "\n ", $content ) . "\n "; - } - - $schema .= '' . "\n"; - } - } - - if( is_array( $indexes ) ) { - foreach( $indexes as $index => $details ) { - $schema .= ' ' . "\n"; - - if( $details['unique'] ) { - $schema .= ' ' . "\n"; - } - - foreach( $details['columns'] as $column ) { - $schema .= ' ' . $column . '' . "\n"; - } - - $schema .= ' ' . "\n"; - } - } - - if( $data ) { - $rs = $this->db->Execute( 'SELECT * FROM ' . $table ); - - if( is_object( $rs ) ) { - $schema .= ' ' . "\n"; - - while( $row = $rs->FetchRow() ) { - foreach( $row as $key => $val ) { - $row[$key] = htmlentities($val); - } - - $schema .= ' ' . implode( '', $row ) . '' . "\n"; - } - - $schema .= ' ' . "\n"; - } - } - - $schema .= '
    ' . "\n"; - } - } - - $this->db->SetFetchMode( $old_mode ); - - $schema .= '
    '; - return $schema; - } - - /** - * Sets a prefix for database objects - * - * Call this method to set a standard prefix that will be prepended to all database tables - * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix. - * - * @param string $prefix Prefix that will be prepended. - * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix. - * @return boolean TRUE if successful, else FALSE - */ - function SetPrefix( $prefix = '', $underscore = TRUE ) { - switch( TRUE ) { - // clear prefix - case empty( $prefix ): - logMsg( 'Cleared prefix' ); - $this->objectPrefix = ''; - return TRUE; - // prefix too long - case strlen( $prefix ) > XMLS_PREFIX_MAXLEN: - // prefix contains invalid characters - case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ): - logMsg( 'Invalid prefix: ' . $prefix ); - return FALSE; - } - - if( $underscore AND substr( $prefix, -1 ) != '_' ) { - $prefix .= '_'; - } - - // prefix valid - logMsg( 'Set prefix: ' . $prefix ); - $this->objectPrefix = $prefix; - return TRUE; - } - - /** - * Returns an object name with the current prefix prepended. - * - * @param string $name Name - * @return string Prefixed name - * - * @access private - */ - function prefix( $name = '' ) { - // if prefix is set - if( !empty( $this->objectPrefix ) ) { - // Prepend the object prefix to the table name - // prepend after quote if used - return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name ); - } - - // No prefix set. Use name provided. - return $name; - } - - /** - * Checks if element references a specific platform - * - * @param string $platform Requested platform - * @returns boolean TRUE if platform check succeeds - * - * @access private - */ - function supportedPlatform( $platform = NULL ) { - $regex = '/^(\w*\|)*' . $this->db->databaseType . '(\|\w*)*$/'; - - if( !isset( $platform ) OR preg_match( $regex, $platform ) ) { - logMsg( "Platform $platform is supported" ); - return TRUE; - } else { - logMsg( "Platform $platform is NOT supported" ); - return FALSE; - } - } - - /** - * Clears the array of generated SQL. - * - * @access private - */ - function clearSQL() { - $this->sqlArray = array(); - } - - /** - * Adds SQL into the SQL array. - * - * @param mixed $sql SQL to Add - * @return boolean TRUE if successful, else FALSE. - * - * @access private - */ - function addSQL( $sql = NULL ) { - if( is_array( $sql ) ) { - foreach( $sql as $line ) { - $this->addSQL( $line ); - } - - return TRUE; - } - - if( is_string( $sql ) ) { - $this->sqlArray[] = $sql; - - // if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL. - if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) { - $saved = $this->db->debug; - $this->db->debug = $this->debug; - $ok = $this->db->Execute( $sql ); - $this->db->debug = $saved; - - if( !$ok ) { - if( $this->debug ) { - ADOConnection::outp( $this->db->ErrorMsg() ); - } - - $this->success = 1; - } - } - - return TRUE; - } - - return FALSE; - } - - /** - * Gets the SQL array in the specified format. - * - * @param string $format Format - * @return mixed SQL - * - * @access private - */ - function getSQL( $format = NULL, $sqlArray = NULL ) { - if( !is_array( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - return FALSE; - } - - switch( strtolower( $format ) ) { - case 'string': - case 'text': - return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : ''; - case'html': - return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : ''; - } - - return $this->sqlArray; - } - - /** - * Destroys an adoSchema object. - * - * Call this method to clean up after an adoSchema object that is no longer in use. - * @deprecated adoSchema now cleans up automatically. - */ - function Destroy() { - set_magic_quotes_runtime( $this->mgq ); - unset( $this ); - } -} - -/** -* Message logging function -* -* @access private -*/ -function logMsg( $msg, $title = NULL, $force = FALSE ) { - if( XMLS_DEBUG or $force ) { - echo '
    ';
    -		
    -		if( isset( $title ) ) {
    -			echo '

    ' . htmlentities( $title ) . '

    '; - } - - if( is_object( $this ) ) { - echo '[' . get_class( $this ) . '] '; - } - - print_r( $msg ); - - echo '
    '; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema03.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema03.inc.php deleted file mode 100755 index aa4536f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb-xmlschema03.inc.php +++ /dev/null @@ -1,2403 +0,0 @@ -parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - - } - - function create() { - return array(); - } - - /** - * Destroys the object - */ - function destroy() { - unset( $this ); - } - - /** - * Checks whether the specified RDBMS is supported by the current - * database object or its ranking ancestor. - * - * @param string $platform RDBMS platform name (from ADODB platform list). - * @return boolean TRUE if RDBMS is supported; otherwise returns FALSE. - */ - function supportedPlatform( $platform = NULL ) { - return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE; - } - - /** - * Returns the prefix set by the ranking ancestor of the database object. - * - * @param string $name Prefix string. - * @return string Prefix. - */ - function prefix( $name = '' ) { - return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name; - } - - /** - * Extracts a field ID from the specified field. - * - * @param string $field Field. - * @return string Field ID. - */ - function FieldID( $field ) { - return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) ); - } -} - -/** -* Creates a table object in ADOdb's datadict format -* -* This class stores information about a database table. As charactaristics -* of the table are loaded from the external source, methods and properties -* of this class are used to build up the table description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbTable extends dbObject { - - /** - * @var string Table name - */ - var $name; - - /** - * @var array Field specifier: Meta-information about each field - */ - var $fields = array(); - - /** - * @var array List of table indexes. - */ - var $indexes = array(); - - /** - * @var array Table options: Table-level options - */ - var $opts = array(); - - /** - * @var string Field index: Keeps track of which field is currently being processed - */ - var $current_field; - - /** - * @var boolean Mark table for destruction - * @access private - */ - var $drop_table; - - /** - * @var boolean Mark field for destruction (not yet implemented) - * @access private - */ - var $drop_field = array(); - - /** - * @var array Platform-specific options - * @access private - */ - var $currentPlatform = true; - - - /** - * Iniitializes a new table object. - * - * @param string $prefix DB Object prefix - * @param array $attributes Array of table attributes. - */ - function dbTable( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - $this->name = $this->prefix($attributes['NAME']); - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'INDEX': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addIndex( $attributes ) ); - } - break; - case 'DATA': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - xml_set_object( $parser, $this->addData( $attributes ) ); - } - break; - case 'DROP': - $this->drop(); - break; - case 'FIELD': - // Add a field - $fieldName = $attributes['NAME']; - $fieldType = $attributes['TYPE']; - $fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL; - $fieldOpts = !empty( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL; - - $this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts ); - break; - case 'KEY': - case 'NOTNULL': - case 'AUTOINCREMENT': - case 'DEFDATE': - case 'DEFTIMESTAMP': - case 'UNSIGNED': - // Add a field option - $this->addFieldOpt( $this->current_field, $this->currentElement ); - break; - case 'DEFAULT': - // Add a field option to the table object - - // Work around ADOdb datadict issue that misinterprets empty strings. - if( $attributes['VALUE'] == '' ) { - $attributes['VALUE'] = " '' "; - } - - $this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] ); - break; - case 'OPT': - case 'CONSTRAINT': - // Accept platform-specific options - $this->currentPlatform = ( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Table/field constraint - case 'CONSTRAINT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $this->currentElement, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - // Table/field option - case 'OPT': - if( isset( $this->current_field ) ) { - $this->addFieldOpt( $this->current_field, $cdata ); - } else { - $this->addTableOpt( $cdata ); - } - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'TABLE': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - case 'FIELD': - unset($this->current_field); - break; - case 'OPT': - case 'CONSTRAINT': - $this->currentPlatform = true; - break; - default: - - } - } - - /** - * Adds an index to a table object - * - * @param array $attributes Index attributes - * @return object dbIndex object - */ - function &addIndex( $attributes ) { - $name = strtoupper( $attributes['NAME'] ); - $this->indexes[$name] =& new dbIndex( $this, $attributes ); - return $this->indexes[$name]; - } - - /** - * Adds data to a table object - * - * @param array $attributes Data attributes - * @return object dbData object - */ - function &addData( $attributes ) { - if( !isset( $this->data ) ) { - $this->data =& new dbData( $this, $attributes ); - } - return $this->data; - } - - /** - * Adds a field to a table object - * - * $name is the name of the table to which the field should be added. - * $type is an ADODB datadict field type. The following field types - * are supported as of ADODB 3.40: - * - C: varchar - * - X: CLOB (character large object) or largest varchar size - * if CLOB is not supported - * - C2: Multibyte varchar - * - X2: Multibyte CLOB - * - B: BLOB (binary large object) - * - D: Date (some databases do not support this, and we return a datetime type) - * - T: Datetime or Timestamp - * - L: Integer field suitable for storing booleans (0 or 1) - * - I: Integer (mapped to I4) - * - I1: 1-byte integer - * - I2: 2-byte integer - * - I4: 4-byte integer - * - I8: 8-byte integer - * - F: Floating point number - * - N: Numeric or decimal number - * - * @param string $name Name of the table to which the field will be added. - * @param string $type ADODB datadict field type. - * @param string $size Field size - * @param array $opts Field options array - * @return array Field specifier array - */ - function addField( $name, $type, $size = NULL, $opts = NULL ) { - $field_id = $this->FieldID( $name ); - - // Set the field index so we know where we are - $this->current_field = $field_id; - - // Set the field name (required) - $this->fields[$field_id]['NAME'] = $name; - - // Set the field type (required) - $this->fields[$field_id]['TYPE'] = $type; - - // Set the field size (optional) - if( isset( $size ) ) { - $this->fields[$field_id]['SIZE'] = $size; - } - - // Set the field options - if( isset( $opts ) ) { - $this->fields[$field_id]['OPTS'] = array($opts); - } else { - $this->fields[$field_id]['OPTS'] = array(); - } - } - - /** - * Adds a field option to the current field specifier - * - * This method adds a field option allowed by the ADOdb datadict - * and appends it to the given field. - * - * @param string $field Field name - * @param string $opt ADOdb field option - * @param mixed $value Field option value - * @return array Field specifier array - */ - function addFieldOpt( $field, $opt, $value = NULL ) { - if( $this->currentPlatform ) { - if( !isset( $value ) ) { - $this->fields[$this->FieldID( $field )]['OPTS'][] = $opt; - // Add the option and value - } else { - $this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value ); - } - } - } - - /** - * Adds an option to the table - * - * This method takes a comma-separated list of table-level options - * and appends them to the table object. - * - * @param string $opt Table option - * @return array Options - */ - function addTableOpt( $opt ) { - if( $this->currentPlatform ) { - $this->opts[] = $opt; - } - return $this->opts; - } - - /** - * Generates the SQL that will create the table in the database - * - * @param object $xmls adoSchema object - * @return array Array containing table creation SQL - */ - function create( &$xmls ) { - $sql = array(); - - // drop any existing indexes - if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) { - foreach( $legacy_indexes as $index => $index_details ) { - $sql[] = $xmls->dict->DropIndexSQL( $index, $this->name ); - } - } - - // remove fields to be dropped from table object - foreach( $this->drop_field as $field ) { - unset( $this->fields[$field] ); - } - - // if table exists - if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) { - // drop table - if( $this->drop_table ) { - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - - return $sql; - } - - // drop any existing fields not in schema - foreach( $legacy_fields as $field_id => $field ) { - if( !isset( $this->fields[$field_id] ) ) { - $sql[] = $xmls->dict->DropColumnSQL( $this->name, $field->name ); - } - } - // if table doesn't exist - } else { - if( $this->drop_table ) { - return $sql; - } - - $legacy_fields = array(); - } - - // Loop through the field specifier array, building the associative array for the field options - $fldarray = array(); - - foreach( $this->fields as $field_id => $finfo ) { - // Set an empty size if it isn't supplied - if( !isset( $finfo['SIZE'] ) ) { - $finfo['SIZE'] = ''; - } - - // Initialize the field array with the type and size - $fldarray[$field_id] = array( - 'NAME' => $finfo['NAME'], - 'TYPE' => $finfo['TYPE'], - 'SIZE' => $finfo['SIZE'] - ); - - // Loop through the options array and add the field options. - if( isset( $finfo['OPTS'] ) ) { - foreach( $finfo['OPTS'] as $opt ) { - // Option has an argument. - if( is_array( $opt ) ) { - $key = key( $opt ); - $value = $opt[key( $opt )]; - @$fldarray[$field_id][$key] .= $value; - // Option doesn't have arguments - } else { - $fldarray[$field_id][$opt] = $opt; - } - } - } - } - - if( empty( $legacy_fields ) ) { - // Create the new table - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - logMsg( end( $sql ), 'Generated CreateTableSQL' ); - } else { - // Upgrade an existing table - logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" ); - switch( $xmls->upgrade ) { - // Use ChangeTableSQL - case 'ALTER': - logMsg( 'Generated ChangeTableSQL (ALTERing table)' ); - $sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts ); - break; - case 'REPLACE': - logMsg( 'Doing upgrade REPLACE (testing)' ); - $sql[] = $xmls->dict->DropTableSQL( $this->name ); - $sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts ); - break; - // ignore table - default: - return array(); - } - } - - foreach( $this->indexes as $index ) { - $sql[] = $index->create( $xmls ); - } - - if( isset( $this->data ) ) { - $sql[] = $this->data->create( $xmls ); - } - - return $sql; - } - - /** - * Marks a field or table for destruction - */ - function drop() { - if( isset( $this->current_field ) ) { - // Drop the current field - logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" ); - // $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field ); - $this->drop_field[$this->current_field] = $this->current_field; - } else { - // Drop the current table - logMsg( "Dropping table '{$this->name}'" ); - // $this->drop_table = $xmls->dict->DropTableSQL( $this->name ); - $this->drop_table = TRUE; - } - } -} - -/** -* Creates an index object in ADOdb's datadict format -* -* This class stores information about a database index. As charactaristics -* of the index are loaded from the external source, methods and properties -* of this class are used to build up the index description in ADOdb's -* datadict format. -* -* @package axmls -* @access private -*/ -class dbIndex extends dbObject { - - /** - * @var string Index name - */ - var $name; - - /** - * @var array Index options: Index-level options - */ - var $opts = array(); - - /** - * @var array Indexed fields: Table columns included in this index - */ - var $columns = array(); - - /** - * @var boolean Mark index for destruction - * @access private - */ - var $drop = FALSE; - - /** - * Initializes the new dbIndex object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbIndex( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - $this->name = $this->prefix ($attributes['NAME']); - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'DROP': - $this->drop(); - break; - case 'CLUSTERED': - case 'BITMAP': - case 'UNIQUE': - case 'FULLTEXT': - case 'HASH': - // Add index Option - $this->addIndexOpt( $this->currentElement ); - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'COL': - $this->addField( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'INDEX': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the index - * - * @param string $name Field name - * @return string Field list - */ - function addField( $name ) { - $this->columns[$this->FieldID( $name )] = $name; - - // Return the field list - return $this->columns; - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addIndexOpt( $opt ) { - $this->opts[] = $opt; - - // Return the options list - return $this->opts; - } - - /** - * Generates the SQL that will create the index in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - if( $this->drop ) { - return NULL; - } - - // eliminate any columns that aren't in the table - foreach( $this->columns as $id => $col ) { - if( !isset( $this->parent->fields[$id] ) ) { - unset( $this->columns[$id] ); - } - } - - return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts ); - } - - /** - * Marks an index for destruction - */ - function drop() { - $this->drop = TRUE; - } -} - -/** -* Creates a data object in ADOdb's datadict format -* -* This class stores information about table data, and is called -* when we need to load field data into a table. -* -* @package axmls -* @access private -*/ -class dbData extends dbObject { - - var $data = array(); - - var $row; - - /** - * Initializes the new dbData object. - * - * @param object $parent Parent object - * @param array $attributes Attributes - * - * @internal - */ - function dbData( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - } - - /** - * XML Callback to process start elements - * - * Processes XML opening tags. - * Elements currently processed are: ROW and F (field). - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'ROW': - $this->row = count( $this->data ); - $this->data[$this->row] = array(); - break; - case 'F': - $this->addField($attributes); - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - * - * Processes XML cdata. - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Index field name - case 'F': - $this->addData( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'DATA': - xml_set_object( $parser, $this->parent ); - break; - } - } - - /** - * Adds a field to the insert - * - * @param string $name Field name - * @return string Field list - */ - function addField( $attributes ) { - // check we're in a valid row - if( !isset( $this->row ) || !isset( $this->data[$this->row] ) ) { - return; - } - - // Set the field index so we know where we are - if( isset( $attributes['NAME'] ) ) { - $this->current_field = $this->FieldID( $attributes['NAME'] ); - } else { - $this->current_field = count( $this->data[$this->row] ); - } - - // initialise data - if( !isset( $this->data[$this->row][$this->current_field] ) ) { - $this->data[$this->row][$this->current_field] = ''; - } - } - - /** - * Adds options to the index - * - * @param string $opt Comma-separated list of index options. - * @return string Option list - */ - function addData( $cdata ) { - // check we're in a valid field - if ( isset( $this->data[$this->row][$this->current_field] ) ) { - // add data to field - $this->data[$this->row][$this->current_field] .= $cdata; - } - } - - /** - * Generates the SQL that will add/update the data in the database - * - * @param object $xmls adoSchema object - * @return array Array containing index creation SQL - */ - function create( &$xmls ) { - $table = $xmls->dict->TableName($this->parent->name); - $table_field_count = count($this->parent->fields); - $tables = $xmls->db->MetaTables(); - $sql = array(); - - $ukeys = $xmls->db->MetaPrimaryKeys( $table ); - if( !empty( $this->parent->indexes ) and !empty( $ukeys ) ) { - foreach( $this->parent->indexes as $indexObj ) { - if( !in_array( $indexObj->name, $ukeys ) ) $ukeys[] = $indexObj->name; - } - } - - // eliminate any columns that aren't in the table - foreach( $this->data as $row ) { - $table_fields = $this->parent->fields; - $fields = array(); - $rawfields = array(); // Need to keep some of the unprocessed data on hand. - - foreach( $row as $field_id => $field_data ) { - if( !array_key_exists( $field_id, $table_fields ) ) { - if( is_numeric( $field_id ) ) { - $field_id = reset( array_keys( $table_fields ) ); - } else { - continue; - } - } - - $name = $table_fields[$field_id]['NAME']; - - switch( $table_fields[$field_id]['TYPE'] ) { - case 'I': - case 'I1': - case 'I2': - case 'I4': - case 'I8': - $fields[$name] = intval($field_data); - break; - case 'C': - case 'C2': - case 'X': - case 'X2': - default: - $fields[$name] = $xmls->db->qstr( $field_data ); - $rawfields[$name] = $field_data; - } - - unset($table_fields[$field_id]); - - } - - // check that at least 1 column is specified - if( empty( $fields ) ) { - continue; - } - - // check that no required columns are missing - if( count( $fields ) < $table_field_count ) { - foreach( $table_fields as $field ) { - if( isset( $field['OPTS'] ) and ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) { - continue(2); - } - } - } - - // The rest of this method deals with updating existing data records. - - if( !in_array( $table, $tables ) or ( $mode = $xmls->existingData() ) == XMLS_MODE_INSERT ) { - // Table doesn't yet exist, so it's safe to insert. - logMsg( "$table doesn't exist, inserting or mode is INSERT" ); - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - continue; - } - - // Prepare to test for potential violations. Get primary keys and unique indexes - $mfields = array_merge( $fields, $rawfields ); - $keyFields = array_intersect( $ukeys, array_keys( $mfields ) ); - - if( empty( $ukeys ) or count( $keyFields ) == 0 ) { - // No unique keys in schema, so safe to insert - logMsg( "Either schema or data has no unique keys, so safe to insert" ); - $sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')'; - continue; - } - - // Select record containing matching unique keys. - $where = ''; - foreach( $ukeys as $key ) { - if( isset( $mfields[$key] ) and $mfields[$key] ) { - if( $where ) $where .= ' AND '; - $where .= $key . ' = ' . $xmls->db->qstr( $mfields[$key] ); - } - } - $records = $xmls->db->Execute( 'SELECT * FROM ' . $table . ' WHERE ' . $where ); - switch( $records->RecordCount() ) { - case 0: - // No matching record, so safe to insert. - logMsg( "No matching records. Inserting new row with unique data" ); - $sql[] = $xmls->db->GetInsertSQL( $records, $mfields ); - break; - case 1: - // Exactly one matching record, so we can update if the mode permits. - logMsg( "One matching record..." ); - if( $mode == XMLS_MODE_UPDATE ) { - logMsg( "...Updating existing row from unique data" ); - $sql[] = $xmls->db->GetUpdateSQL( $records, $mfields ); - } - break; - default: - // More than one matching record; the result is ambiguous, so we must ignore the row. - logMsg( "More than one matching record. Ignoring row." ); - } - } - return $sql; - } -} - -/** -* Creates the SQL to execute a list of provided SQL queries -* -* @package axmls -* @access private -*/ -class dbQuerySet extends dbObject { - - /** - * @var array List of SQL queries - */ - var $queries = array(); - - /** - * @var string String used to build of a query line by line - */ - var $query; - - /** - * @var string Query prefix key - */ - var $prefixKey = ''; - - /** - * @var boolean Auto prefix enable (TRUE) - */ - var $prefixMethod = 'AUTO'; - - /** - * Initializes the query set. - * - * @param object $parent Parent object - * @param array $attributes Attributes - */ - function dbQuerySet( &$parent, $attributes = NULL ) { - $this->parent =& $parent; - - // Overrides the manual prefix key - if( isset( $attributes['KEY'] ) ) { - $this->prefixKey = $attributes['KEY']; - } - - $prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : ''; - - // Enables or disables automatic prefix prepending - switch( $prefixMethod ) { - case 'AUTO': - $this->prefixMethod = 'AUTO'; - break; - case 'MANUAL': - $this->prefixMethod = 'MANUAL'; - break; - case 'NONE': - $this->prefixMethod = 'NONE'; - break; - } - } - - /** - * XML Callback to process start elements. Elements currently - * processed are: QUERY. - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - $this->currentElement = strtoupper( $tag ); - - switch( $this->currentElement ) { - case 'QUERY': - // Create a new query in a SQL queryset. - // Ignore this query set if a platform is specified and it's different than the - // current connection platform. - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->newQuery(); - } else { - $this->discardQuery(); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - } - - /** - * XML Callback to process CDATA elements - */ - function _tag_cdata( &$parser, $cdata ) { - switch( $this->currentElement ) { - // Line of queryset SQL data - case 'QUERY': - $this->buildQuery( $cdata ); - break; - default: - - } - } - - /** - * XML Callback to process end elements - * - * @access private - */ - function _tag_close( &$parser, $tag ) { - $this->currentElement = ''; - - switch( strtoupper( $tag ) ) { - case 'QUERY': - // Add the finished query to the open query set. - $this->addQuery(); - break; - case 'SQL': - $this->parent->addSQL( $this->create( $this->parent ) ); - xml_set_object( $parser, $this->parent ); - $this->destroy(); - break; - default: - - } - } - - /** - * Re-initializes the query. - * - * @return boolean TRUE - */ - function newQuery() { - $this->query = ''; - - return TRUE; - } - - /** - * Discards the existing query. - * - * @return boolean TRUE - */ - function discardQuery() { - unset( $this->query ); - - return TRUE; - } - - /** - * Appends a line to a query that is being built line by line - * - * @param string $data Line of SQL data or NULL to initialize a new query - * @return string SQL query string. - */ - function buildQuery( $sql = NULL ) { - if( !isset( $this->query ) OR empty( $sql ) ) { - return FALSE; - } - - $this->query .= $sql; - - return $this->query; - } - - /** - * Adds a completed query to the query list - * - * @return string SQL of added query - */ - function addQuery() { - if( !isset( $this->query ) ) { - return FALSE; - } - - $this->queries[] = $return = trim($this->query); - - unset( $this->query ); - - return $return; - } - - /** - * Creates and returns the current query set - * - * @param object $xmls adoSchema object - * @return array Query set - */ - function create( &$xmls ) { - foreach( $this->queries as $id => $query ) { - switch( $this->prefixMethod ) { - case 'AUTO': - // Enable auto prefix replacement - - // Process object prefix. - // Evaluate SQL statements to prepend prefix to objects - $query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - $query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix ); - - // SELECT statements aren't working yet - #$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data ); - - case 'MANUAL': - // If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX. - // If prefixKey is not set, we use the default constant XMLS_PREFIX - if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) { - // Enable prefix override - $query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query ); - } else { - // Use default replacement - $query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query ); - } - } - - $this->queries[$id] = trim( $query ); - } - - // Return the query set array - return $this->queries; - } - - /** - * Rebuilds the query with the prefix attached to any objects - * - * @param string $regex Regex used to add prefix - * @param string $query SQL query string - * @param string $prefix Prefix to be appended to tables, indices, etc. - * @return string Prefixed SQL query string. - */ - function prefixQuery( $regex, $query, $prefix = NULL ) { - if( !isset( $prefix ) ) { - return $query; - } - - if( preg_match( $regex, $query, $match ) ) { - $preamble = $match[1]; - $postamble = $match[5]; - $objectList = explode( ',', $match[3] ); - // $prefix = $prefix . '_'; - - $prefixedList = ''; - - foreach( $objectList as $object ) { - if( $prefixedList !== '' ) { - $prefixedList .= ', '; - } - - $prefixedList .= $prefix . trim( $object ); - } - - $query = $preamble . ' ' . $prefixedList . ' ' . $postamble; - } - - return $query; - } -} - -/** -* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements -* -* This class is used to load and parse the XML file, to create an array of SQL statements -* that can be used to build a database, and to build the database using the SQL array. -* -* @tutorial getting_started.pkg -* -* @author Richard Tango-Lowy & Dan Cech -* @version $Revision: 351 $ -* -* @package axmls -*/ -class adoSchema { - - /** - * @var array Array containing SQL queries to generate all objects - * @access private - */ - var $sqlArray; - - /** - * @var object ADOdb connection object - * @access private - */ - var $db; - - /** - * @var object ADOdb Data Dictionary - * @access private - */ - var $dict; - - /** - * @var string Current XML element - * @access private - */ - var $currentElement = ''; - - /** - * @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database - * @access private - */ - var $upgrade = ''; - - /** - * @var string Optional object prefix - * @access private - */ - var $objectPrefix = ''; - - /** - * @var long Original Magic Quotes Runtime value - * @access private - */ - var $mgq; - - /** - * @var long System debug - * @access private - */ - var $debug; - - /** - * @var string Regular expression to find schema version - * @access private - */ - var $versionRegex = '//'; - - /** - * @var string Current schema version - * @access private - */ - var $schemaVersion; - - /** - * @var int Success of last Schema execution - */ - var $success; - - /** - * @var bool Execute SQL inline as it is generated - */ - var $executeInline; - - /** - * @var bool Continue SQL execution if errors occur - */ - var $continueOnError; - - /** - * @var int How to handle existing data rows (insert, update, or ignore) - */ - var $existingData; - - /** - * Creates an adoSchema object - * - * Creating an adoSchema object is the first step in processing an XML schema. - * The only parameter is an ADOdb database connection object, which must already - * have been created. - * - * @param object $db ADOdb database connection object. - */ - function adoSchema( &$db ) { - // Initialize the environment - $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - - $this->db =& $db; - $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); - $this->sqlArray = array(); - $this->schemaVersion = XMLS_SCHEMA_VERSION; - $this->executeInline( XMLS_EXECUTE_INLINE ); - $this->continueOnError( XMLS_CONTINUE_ON_ERROR ); - $this->existingData( XMLS_EXISTING_DATA ); - $this->setUpgradeMethod(); - } - - /** - * Sets the method to be used for upgrading an existing database - * - * Use this method to specify how existing database objects should be upgraded. - * The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to - * alter each database object directly, REPLACE attempts to rebuild each object - * from scratch, BEST attempts to determine the best upgrade method for each - * object, and NONE disables upgrading. - * - * This method is not yet used by AXMLS, but exists for backward compatibility. - * The ALTER method is automatically assumed when the adoSchema object is - * instantiated; other upgrade methods are not currently supported. - * - * @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE) - * @returns string Upgrade method used - */ - function SetUpgradeMethod( $method = '' ) { - if( !is_string( $method ) ) { - return FALSE; - } - - $method = strtoupper( $method ); - - // Handle the upgrade methods - switch( $method ) { - case 'ALTER': - $this->upgrade = $method; - break; - case 'REPLACE': - $this->upgrade = $method; - break; - case 'BEST': - $this->upgrade = 'ALTER'; - break; - case 'NONE': - $this->upgrade = 'NONE'; - break; - default: - // Use default if no legitimate method is passed. - $this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD; - } - - return $this->upgrade; - } - - /** - * Specifies how to handle existing data row when there is a unique key conflict. - * - * The existingData setting specifies how the parser should handle existing rows - * when a unique key violation occurs during the insert. This can happen when inserting - * data into an existing table with one or more primary keys or unique indexes. - * The existingData method takes one of three options: XMLS_MODE_INSERT attempts - * to always insert the data as a new row. In the event of a unique key violation, - * the database will generate an error. XMLS_MODE_UPDATE attempts to update the - * any existing rows with the new data based upon primary or unique key fields in - * the schema. If the data row in the schema specifies no unique fields, the row - * data will be inserted as a new row. XMLS_MODE_IGNORE specifies that any data rows - * that would result in a unique key violation be ignored; no inserts or updates will - * take place. For backward compatibility, the default setting is XMLS_MODE_INSERT, - * but XMLS_MODE_UPDATE will generally be the most appropriate setting. - * - * @param int $mode XMLS_MODE_INSERT, XMLS_MODE_UPDATE, or XMLS_MODE_IGNORE - * @return int current mode - */ - function ExistingData( $mode = NULL ) { - if( is_int( $mode ) ) { - switch( $mode ) { - case XMLS_MODE_UPDATE: - $mode = XMLS_MODE_UPDATE; - break; - case XMLS_MODE_IGNORE: - $mode = XMLS_MODE_IGNORE; - break; - case XMLS_MODE_INSERT: - $mode = XMLS_MODE_INSERT; - break; - default: - $mode = XMLS_EXISITNG_DATA; - break; - } - $this->existingData = $mode; - } - - return $this->existingData; - } - - /** - * Enables/disables inline SQL execution. - * - * Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution), - * AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode - * is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema() - * to apply the schema to the database. - * - * @param bool $mode execute - * @return bool current execution mode - * - * @see ParseSchema(), ExecuteSchema() - */ - function ExecuteInline( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->executeInline = $mode; - } - - return $this->executeInline; - } - - /** - * Enables/disables SQL continue on error. - * - * Call this method to enable or disable continuation of SQL execution if an error occurs. - * If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs. - * If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing - * of the schema will continue. - * - * @param bool $mode execute - * @return bool current continueOnError mode - * - * @see addSQL(), ExecuteSchema() - */ - function ContinueOnError( $mode = NULL ) { - if( is_bool( $mode ) ) { - $this->continueOnError = $mode; - } - - return $this->continueOnError; - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to create the database - * described. This method automatically converts the schema to the latest - * axmls schema version. - * @see ParseSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function ParseSchema( $filename, $returnSchema = FALSE ) { - return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Loads an XML schema from a file and converts it to SQL. - * - * Call this method to load the specified schema directly from a file (see - * the DTD for the proper format) and generate the SQL necessary to create - * the database described by the schema. Use this method when you are dealing - * with large schema files. Otherwise, ParseSchema() is faster. - * This method does not automatically convert the schema to the latest axmls - * schema version. You must convert the schema manually using either the - * ConvertSchemaFile() or ConvertSchemaString() method. - * @see ParseSchema() - * @see ConvertSchemaFile() - * @see ConvertSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - * - * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString() - * @see ParseSchema(), ParseSchemaString() - */ - function ParseSchemaFile( $filename, $returnSchema = FALSE ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - logMsg( 'Unable to open file' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) { - logMsg( 'Invalid Schema Version' ); - return FALSE; - } - - if( $returnSchema ) { - $xmlstring = ''; - while( $data = fread( $fp, 4096 ) ) { - $xmlstring .= $data . "\n"; - } - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Converts an XML schema string to SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to create the database described by the schema. - * @see ParseSchema() - * - * @param string $xmlstring XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - logMsg( 'Empty or Invalid Schema' ); - return FALSE; - } - - // do version detection here - if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) { - logMsg( 'Invalid Schema Version' ); - return FALSE; - } - - if( $returnSchema ) { - return $xmlstring; - } - - $this->success = 2; - - $xmlParser = $this->create_parser(); - - if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) { - die( sprintf( - "XML error: %s at line %d", - xml_error_string( xml_get_error_code( $xmlParser) ), - xml_get_current_line_number( $xmlParser) - ) ); - } - - xml_parser_free( $xmlParser ); - - return $this->sqlArray; - } - - /** - * Loads an XML schema from a file and converts it to uninstallation SQL. - * - * Call this method to load the specified schema (see the DTD for the proper format) from - * the filesystem and generate the SQL necessary to remove the database described. - * @see RemoveSchemaString() - * - * @param string $file Name of XML schema file. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute - */ - function RemoveSchema( $filename, $returnSchema = FALSE ) { - return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); - } - - /** - * Converts an XML schema string to uninstallation SQL. - * - * Call this method to parse a string containing an XML schema (see the DTD for the proper format) - * and generate the SQL necessary to uninstall the database described by the schema. - * @see RemoveSchema() - * - * @param string $schema XML schema string. - * @param bool $returnSchema Return schema rather than parsing. - * @return array Array of SQL queries, ready to execute. - */ - function RemoveSchemaString( $schema, $returnSchema = FALSE ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema ); - } - - /** - * Applies the current XML schema to the database (post execution). - * - * Call this method to apply the current schema (generally created by calling - * ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, - * and executing other SQL specified in the schema) after parsing. - * @see ParseSchema(), ParseSchemaString(), ExecuteInline() - * - * @param array $sqlArray Array of SQL statements that will be applied rather than - * the current schema. - * @param boolean $continueOnErr Continue to apply the schema even if an error occurs. - * @returns integer 0 if failure, 1 if errors, 2 if successful. - */ - function ExecuteSchema( $sqlArray = NULL, $continueOnErr = NULL ) { - if( !is_bool( $continueOnErr ) ) { - $continueOnErr = $this->ContinueOnError(); - } - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - $this->success = 0; - } else { - $this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr ); - } - - return $this->success; - } - - /** - * Returns the current SQL array. - * - * Call this method to fetch the array of SQL queries resulting from - * ParseSchema() or ParseSchemaString(). - * - * @param string $format Format: HTML, TEXT, or NONE (PHP array) - * @return array Array of SQL statements or FALSE if an error occurs - */ - function PrintSQL( $format = 'NONE' ) { - $sqlArray = null; - return $this->getSQL( $format, $sqlArray ); - } - - /** - * Saves the current SQL array to the local filesystem as a list of SQL queries. - * - * Call this method to save the array of SQL queries (generally resulting from a - * parsed XML schema) to the filesystem. - * - * @param string $filename Path and name where the file should be saved. - * @return boolean TRUE if save is successful, else FALSE. - */ - function SaveSQL( $filename = './schema.sql' ) { - - if( !isset( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - if( !isset( $sqlArray ) ) { - return FALSE; - } - - $fp = fopen( $filename, "w" ); - - foreach( $sqlArray as $key => $query ) { - fwrite( $fp, $query . ";\n" ); - } - fclose( $fp ); - } - - /** - * Create an xml parser - * - * @return object PHP XML parser object - * - * @access private - */ - function &create_parser() { - // Create the parser - $xmlParser = xml_parser_create(); - xml_set_object( $xmlParser, $this ); - - // Initialize the XML callback functions - xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' ); - xml_set_character_data_handler( $xmlParser, '_tag_cdata' ); - - return $xmlParser; - } - - /** - * XML Callback to process start elements - * - * @access private - */ - function _tag_open( &$parser, $tag, $attributes ) { - switch( strtoupper( $tag ) ) { - case 'TABLE': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbTable( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - case 'SQL': - if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) { - $this->obj = new dbQuerySet( $this, $attributes ); - xml_set_object( $parser, $this->obj ); - } - break; - default: - // print_r( array( $tag, $attributes ) ); - } - - } - - /** - * XML Callback to process CDATA elements - * - * @access private - */ - function _tag_cdata( &$parser, $cdata ) { - } - - /** - * XML Callback to process end elements - * - * @access private - * @internal - */ - function _tag_close( &$parser, $tag ) { - - } - - /** - * Converts an XML schema string to the specified DTD version. - * - * Call this method to convert a string containing an XML schema to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaFile() - * - * @param string $schema String containing XML schema that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaStringVersion( $schema ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = $schema; - } else { - $result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - /* - // compat for pre-4.3 - jlim - function _file_get_contents($path) - { - if (function_exists('file_get_contents')) return file_get_contents($path); - return join('',file($path)); - }*/ - - /** - * Converts an XML schema file to the specified DTD version. - * - * Call this method to convert the specified XML schema file to a different AXMLS - * DTD version. For instance, to convert a schema created for an pre-1.0 version for - * AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version - * parameter is specified, the schema will be converted to the current DTD version. - * If the newFile parameter is provided, the converted schema will be written to the specified - * file. - * @see ConvertSchemaString() - * - * @param string $filename Name of XML schema file that will be converted. - * @param string $newVersion DTD version to convert to. - * @param string $newFile File name of (converted) output file. - * @return string Converted XML schema or FALSE if an error occurs. - */ - function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) { - - // grab current version - if( !( $version = $this->SchemaFileVersion( $filename ) ) ) { - return FALSE; - } - - if( !isset ($newVersion) ) { - $newVersion = $this->schemaVersion; - } - - if( $version == $newVersion ) { - $result = _file_get_contents( $filename ); - - // remove unicode BOM if present - if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) { - $result = substr( $result, 3 ); - } - } else { - $result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' ); - } - - if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) { - fwrite( $fp, $result ); - fclose( $fp ); - } - - return $result; - } - - function TransformSchema( $schema, $xsl, $schematype='string' ) - { - // Fail if XSLT extension is not available - if( ! function_exists( 'xslt_create' ) ) { - return FALSE; - } - - $xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl'; - - // look for xsl - if( !is_readable( $xsl_file ) ) { - return FALSE; - } - - switch( $schematype ) - { - case 'file': - if( !is_readable( $schema ) ) { - return FALSE; - } - - $schema = _file_get_contents( $schema ); - break; - case 'string': - default: - if( !is_string( $schema ) ) { - return FALSE; - } - } - - $arguments = array ( - '/_xml' => $schema, - '/_xsl' => _file_get_contents( $xsl_file ) - ); - - // create an XSLT processor - $xh = xslt_create (); - - // set error handler - xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler')); - - // process the schema - $result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); - - xslt_free ($xh); - - return $result; - } - - /** - * Processes XSLT transformation errors - * - * @param object $parser XML parser object - * @param integer $errno Error number - * @param integer $level Error level - * @param array $fields Error information fields - * - * @access private - */ - function xslt_error_handler( $parser, $errno, $level, $fields ) { - if( is_array( $fields ) ) { - $msg = array( - 'Message Type' => ucfirst( $fields['msgtype'] ), - 'Message Code' => $fields['code'], - 'Message' => $fields['msg'], - 'Error Number' => $errno, - 'Level' => $level - ); - - switch( $fields['URI'] ) { - case 'arg:/_xml': - $msg['Input'] = 'XML'; - break; - case 'arg:/_xsl': - $msg['Input'] = 'XSL'; - break; - default: - $msg['Input'] = $fields['URI']; - } - - $msg['Line'] = $fields['line']; - } else { - $msg = array( - 'Message Type' => 'Error', - 'Error Number' => $errno, - 'Level' => $level, - 'Fields' => var_export( $fields, TRUE ) - ); - } - - $error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n" - . '' . "\n"; - - foreach( $msg as $label => $details ) { - $error_details .= '' . "\n"; - } - - $error_details .= '
    ' . $label . ': ' . htmlentities( $details ) . '
    '; - - trigger_error( $error_details, E_USER_ERROR ); - } - - /** - * Returns the AXMLS Schema Version of the requested XML schema file. - * - * Call this method to obtain the AXMLS DTD version of the requested XML schema file. - * @see SchemaStringVersion() - * - * @param string $filename AXMLS schema file - * @return string Schema version number or FALSE on error - */ - function SchemaFileVersion( $filename ) { - // Open the file - if( !($fp = fopen( $filename, 'r' )) ) { - // die( 'Unable to open file' ); - return FALSE; - } - - // Process the file - while( $data = fread( $fp, 4096 ) ) { - if( preg_match( $this->versionRegex, $data, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - } - - return FALSE; - } - - /** - * Returns the AXMLS Schema Version of the provided XML schema string. - * - * Call this method to obtain the AXMLS DTD version of the provided XML schema string. - * @see SchemaFileVersion() - * - * @param string $xmlstring XML schema string - * @return string Schema version number or FALSE on error - */ - function SchemaStringVersion( $xmlstring ) { - if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) { - return FALSE; - } - - if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) { - return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION; - } - - return FALSE; - } - - /** - * Extracts an XML schema from an existing database. - * - * Call this method to create an XML schema string from an existing database. - * If the data parameter is set to TRUE, AXMLS will include the data from the database - * in the schema. - * - * @param boolean $data Include data in schema dump - * @indent string indentation to use - * @prefix string extract only tables with given prefix - * @stripprefix strip prefix string when storing in XML schema - * @return string Generated XML schema - */ - function ExtractSchema( $data = FALSE, $indent = ' ', $prefix = '' , $stripprefix=false) { - $old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM ); - - $schema = '' . "\n" - . '' . "\n"; - - if( is_array( $tables = $this->db->MetaTables( 'TABLES' , ($prefix) ? $prefix.'%' : '') ) ) { - foreach( $tables as $table ) { - if ($stripprefix) $table = str_replace(str_replace('\\_', '_', $pfx ), '', $table); - $schema .= $indent . '' . "\n"; - - // grab details from database - $rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE -1' ); - $fields = $this->db->MetaColumns( $table ); - $indexes = $this->db->MetaIndexes( $table ); - - if( is_array( $fields ) ) { - foreach( $fields as $details ) { - $extra = ''; - $content = array(); - - if( isset($details->max_length) && $details->max_length > 0 ) { - $extra .= ' size="' . $details->max_length . '"'; - } - - if( isset($details->primary_key) && $details->primary_key ) { - $content[] = ''; - } elseif( isset($details->not_null) && $details->not_null ) { - $content[] = ''; - } - - if( isset($details->has_default) && $details->has_default ) { - $content[] = ''; - } - - if( isset($details->auto_increment) && $details->auto_increment ) { - $content[] = ''; - } - - if( isset($details->unsigned) && $details->unsigned ) { - $content[] = ''; - } - - // this stops the creation of 'R' columns, - // AUTOINCREMENT is used to create auto columns - $details->primary_key = 0; - $type = $rs->MetaType( $details ); - - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - } else { - $schema .= "/>\n"; - } - } - } - - if( is_array( $indexes ) ) { - foreach( $indexes as $index => $details ) { - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - - if( $details['unique'] ) { - $schema .= str_repeat( $indent, 3 ) . '' . "\n"; - } - - foreach( $details['columns'] as $column ) { - $schema .= str_repeat( $indent, 3 ) . '' . htmlentities( $column ) . '' . "\n"; - } - - $schema .= str_repeat( $indent, 2 ) . '' . "\n"; - } - } - - if( $data ) { - $rs = $this->db->Execute( 'SELECT * FROM ' . $table ); - - if( is_object( $rs ) && !$rs->EOF ) { - $schema .= str_repeat( $indent, 2 ) . "\n"; - - while( $row = $rs->FetchRow() ) { - foreach( $row as $key => $val ) { - if ( $val != htmlentities( $val ) ) { - $row[$key] = ''; - } - } - - $schema .= str_repeat( $indent, 3 ) . '' . implode( '', $row ) . "\n"; - } - - $schema .= str_repeat( $indent, 2 ) . "\n"; - } - } - - $schema .= $indent . "
    \n"; - } - } - - $this->db->SetFetchMode( $old_mode ); - - $schema .= '
    '; - return $schema; - } - - /** - * Sets a prefix for database objects - * - * Call this method to set a standard prefix that will be prepended to all database tables - * and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix. - * - * @param string $prefix Prefix that will be prepended. - * @param boolean $underscore If TRUE, automatically append an underscore character to the prefix. - * @return boolean TRUE if successful, else FALSE - */ - function SetPrefix( $prefix = '', $underscore = TRUE ) { - switch( TRUE ) { - // clear prefix - case empty( $prefix ): - logMsg( 'Cleared prefix' ); - $this->objectPrefix = ''; - return TRUE; - // prefix too long - case strlen( $prefix ) > XMLS_PREFIX_MAXLEN: - // prefix contains invalid characters - case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ): - logMsg( 'Invalid prefix: ' . $prefix ); - return FALSE; - } - - if( $underscore AND substr( $prefix, -1 ) != '_' ) { - $prefix .= '_'; - } - - // prefix valid - logMsg( 'Set prefix: ' . $prefix ); - $this->objectPrefix = $prefix; - return TRUE; - } - - /** - * Returns an object name with the current prefix prepended. - * - * @param string $name Name - * @return string Prefixed name - * - * @access private - */ - function prefix( $name = '' ) { - // if prefix is set - if( !empty( $this->objectPrefix ) ) { - // Prepend the object prefix to the table name - // prepend after quote if used - return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name ); - } - - // No prefix set. Use name provided. - return $name; - } - - /** - * Checks if element references a specific platform - * - * @param string $platform Requested platform - * @returns boolean TRUE if platform check succeeds - * - * @access private - */ - function supportedPlatform( $platform = NULL ) { - if( !empty( $platform ) ) { - $regex = '/(^|\|)' . $this->db->databaseType . '(\||$)/i'; - - if( preg_match( '/^- /', $platform ) ) { - if (preg_match ( $regex, substr( $platform, 2 ) ) ) { - logMsg( 'Platform ' . $platform . ' is NOT supported' ); - return FALSE; - } - } else { - if( !preg_match ( $regex, $platform ) ) { - logMsg( 'Platform ' . $platform . ' is NOT supported' ); - return FALSE; - } - } - } - - logMsg( 'Platform ' . $platform . ' is supported' ); - return TRUE; - } - - /** - * Clears the array of generated SQL. - * - * @access private - */ - function clearSQL() { - $this->sqlArray = array(); - } - - /** - * Adds SQL into the SQL array. - * - * @param mixed $sql SQL to Add - * @return boolean TRUE if successful, else FALSE. - * - * @access private - */ - function addSQL( $sql = NULL ) { - if( is_array( $sql ) ) { - foreach( $sql as $line ) { - $this->addSQL( $line ); - } - - return TRUE; - } - - if( is_string( $sql ) ) { - $this->sqlArray[] = $sql; - - // if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL. - if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) { - $saved = $this->db->debug; - $this->db->debug = $this->debug; - $ok = $this->db->Execute( $sql ); - $this->db->debug = $saved; - - if( !$ok ) { - if( $this->debug ) { - ADOConnection::outp( $this->db->ErrorMsg() ); - } - - $this->success = 1; - } - } - - return TRUE; - } - - return FALSE; - } - - /** - * Gets the SQL array in the specified format. - * - * @param string $format Format - * @return mixed SQL - * - * @access private - */ - function getSQL( $format = NULL, $sqlArray = NULL ) { - if( !is_array( $sqlArray ) ) { - $sqlArray = $this->sqlArray; - } - - if( !is_array( $sqlArray ) ) { - return FALSE; - } - - switch( strtolower( $format ) ) { - case 'string': - case 'text': - return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : ''; - case'html': - return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : ''; - } - - return $this->sqlArray; - } - - /** - * Destroys an adoSchema object. - * - * Call this method to clean up after an adoSchema object that is no longer in use. - * @deprecated adoSchema now cleans up automatically. - */ - function Destroy() { - set_magic_quotes_runtime( $this->mgq ); - unset( $this ); - } -} - -/** -* Message logging function -* -* @access private -*/ -function logMsg( $msg, $title = NULL, $force = FALSE ) { - if( XMLS_DEBUG or $force ) { - echo '
    ';
    -		
    -		if( isset( $title ) ) {
    -			echo '

    ' . htmlentities( $title ) . '

    '; - } - - if( @is_object( $this ) ) { - echo '[' . get_class( $this ) . '] '; - } - - print_r( $msg ); - - echo '
    '; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb.inc.php deleted file mode 100755 index bc0874f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/adodb.inc.php +++ /dev/null @@ -1,4231 +0,0 @@ -fields is available on EOF - $ADODB_FETCH_MODE, // DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default... - $ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in queries generated by getinsertsql and getupdatesql. - - //============================================================================================== - // GLOBAL SETUP - //============================================================================================== - - $ADODB_EXTENSION = defined('ADODB_EXTENSION'); - - //********************************************************// - /* - Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3). - Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi - - 0 = ignore empty fields. All empty fields in array are ignored. - 1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values. - 2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values. - 3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and empty fields '' are set to empty '' sql values. - */ - define('ADODB_FORCE_IGNORE',0); - define('ADODB_FORCE_NULL',1); - define('ADODB_FORCE_EMPTY',2); - define('ADODB_FORCE_VALUE',3); - //********************************************************// - - - if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) { - - define('ADODB_BAD_RS','

    Bad $rs in %s. Connection or SQL invalid. Try using $connection->debug=true;

    '); - - // allow [ ] @ ` " and . in table names - define('ADODB_TABLE_REGEX','([]0-9a-z_\:\"\`\.\@\[-]*)'); - - // prefetching used by oracle - if (!defined('ADODB_PREFETCH_ROWS')) define('ADODB_PREFETCH_ROWS',10); - - - /* - Controls ADODB_FETCH_ASSOC field-name case. Default is 2, use native case-names. - This currently works only with mssql, odbc, oci8po and ibase derived drivers. - - 0 = assoc lowercase field names. $rs->fields['orderid'] - 1 = assoc uppercase field names. $rs->fields['ORDERID'] - 2 = use native-case field names. $rs->fields['OrderID'] - */ - - define('ADODB_FETCH_DEFAULT',0); - define('ADODB_FETCH_NUM',1); - define('ADODB_FETCH_ASSOC',2); - define('ADODB_FETCH_BOTH',3); - - if (!defined('TIMESTAMP_FIRST_YEAR')) define('TIMESTAMP_FIRST_YEAR',100); - - // PHP's version scheme makes converting to numbers difficult - workaround - $_adodb_ver = (float) PHP_VERSION; - if ($_adodb_ver >= 5.2) { - define('ADODB_PHPVER',0x5200); - } else if ($_adodb_ver >= 5.0) { - define('ADODB_PHPVER',0x5000); - } else if ($_adodb_ver > 4.299999) { # 4.3 - define('ADODB_PHPVER',0x4300); - } else if ($_adodb_ver > 4.199999) { # 4.2 - define('ADODB_PHPVER',0x4200); - } else if (strnatcmp(PHP_VERSION,'4.0.5')>=0) { - define('ADODB_PHPVER',0x4050); - } else { - define('ADODB_PHPVER',0x4000); - } - } - - //if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); - - - /** - Accepts $src and $dest arrays, replacing string $data - */ - function ADODB_str_replace($src, $dest, $data) - { - if (ADODB_PHPVER >= 0x4050) return str_replace($src,$dest,$data); - - $s = reset($src); - $d = reset($dest); - while ($s !== false) { - $data = str_replace($s,$d,$data); - $s = next($src); - $d = next($dest); - } - return $data; - } - - function ADODB_Setup() - { - GLOBAL - $ADODB_vers, // database version - $ADODB_COUNTRECS, // count number of records returned - slows down query - $ADODB_CACHE_DIR, // directory to cache recordsets - $ADODB_FETCH_MODE, - $ADODB_FORCE_TYPE, - $ADODB_QUOTE_FIELDNAMES; - - $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT; - $ADODB_FORCE_TYPE = ADODB_FORCE_VALUE; - - - if (!isset($ADODB_CACHE_DIR)) { - $ADODB_CACHE_DIR = '/tmp'; //(isset($_ENV['TMP'])) ? $_ENV['TMP'] : '/tmp'; - } else { - // do not accept url based paths, eg. http:/ or ftp:/ - if (strpos($ADODB_CACHE_DIR,'://') !== false) - die("Illegal path http:// or ftp://"); - } - - - // Initialize random number generator for randomizing cache flushes - // -- note Since PHP 4.2.0, the seed becomes optional and defaults to a random value if omitted. - srand(((double)microtime())*1000000); - - /** - * ADODB version as a string. - */ - $ADODB_vers = 'V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. Released BSD & LGPL.'; - - /** - * Determines whether recordset->RecordCount() is used. - * Set to false for highest performance -- RecordCount() will always return -1 then - * for databases that provide "virtual" recordcounts... - */ - if (!isset($ADODB_COUNTRECS)) $ADODB_COUNTRECS = true; - } - - - //============================================================================================== - // CHANGE NOTHING BELOW UNLESS YOU ARE DESIGNING ADODB - //============================================================================================== - - ADODB_Setup(); - - //============================================================================================== - // CLASS ADOFieldObject - //============================================================================================== - /** - * Helper class for FetchFields -- holds info on a column - */ - class ADOFieldObject { - var $name = ''; - var $max_length=0; - var $type=""; -/* - // additional fields by dannym... (danny_milo@yahoo.com) - var $not_null = false; - // actually, this has already been built-in in the postgres, fbsql AND mysql module? ^-^ - // so we can as well make not_null standard (leaving it at "false" does not harm anyways) - - var $has_default = false; // this one I have done only in mysql and postgres for now ... - // others to come (dannym) - var $default_value; // default, if any, and supported. Check has_default first. -*/ - } - - - - function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection) - { - //print "Errorno ($fn errno=$errno m=$errmsg) "; - $thisConnection->_transOK = false; - if ($thisConnection->_oldRaiseFn) { - $fn = $thisConnection->_oldRaiseFn; - $fn($dbms, $fn, $errno, $errmsg, $p1, $p2,$thisConnection); - } - } - - //============================================================================================== - // CLASS ADOConnection - //============================================================================================== - - /** - * Connection object. For connecting to databases, and executing queries. - */ - class ADOConnection { - // - // PUBLIC VARS - // - var $dataProvider = 'native'; - var $databaseType = ''; /// RDBMS currently in use, eg. odbc, mysql, mssql - var $database = ''; /// Name of database to be used. - var $host = ''; /// The hostname of the database server - var $user = ''; /// The username which is used to connect to the database server. - var $password = ''; /// Password for the username. For security, we no longer store it. - var $debug = false; /// if set to true will output sql statements - var $maxblobsize = 262144; /// maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro - var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase - var $substr = 'substr'; /// substring operator - var $length = 'length'; /// string length ofperator - var $random = 'rand()'; /// random function - var $upperCase = 'upper'; /// uppercase function - var $fmtDate = "'Y-m-d'"; /// used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d, h:i:s A'"; /// used by DBTimeStamp as the default timestamp fmt. - var $true = '1'; /// string that represents TRUE for a database - var $false = '0'; /// string that represents FALSE for a database - var $replaceQuote = "\\'"; /// string to use to replace quotes - var $nameQuote = '"'; /// string to use to quote identifiers and names - var $charSet=false; /// character set to use - only for interbase, postgres and oci8 - var $metaDatabasesSQL = ''; - var $metaTablesSQL = ''; - var $uniqueOrderBy = false; /// All order by columns have to be unique - var $emptyDate = ' '; - var $emptyTimeStamp = ' '; - var $lastInsID = false; - //-- - var $hasInsertID = false; /// supports autoincrement ID? - var $hasAffectedRows = false; /// supports affected rows for update/delete? - var $hasTop = false; /// support mssql/access SELECT TOP 10 * FROM TABLE - var $hasLimit = false; /// support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - var $readOnly = false; /// this is a readonly database - used by phpLens - var $hasMoveFirst = false; /// has ability to run MoveFirst(), scrolling backwards - var $hasGenID = false; /// can generate sequences using GenID(); - var $hasTransactions = true; /// has transactions - //-- - var $genID = 0; /// sequence id used by GenID(); - var $raiseErrorFn = false; /// error function to call - var $isoDates = false; /// accepts dates in ISO format - var $cacheSecs = 3600; /// cache for 1 hour - - // memcache - var $memCache = false; /// should we use memCache instead of caching in files - var $memCacheHost; /// memCache host - var $memCachePort = 11211; /// memCache port - var $memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib) - - var $sysDate = false; /// name of function that returns the current date - var $sysTimeStamp = false; /// name of function that returns the current timestamp - var $arrayClass = 'ADORecordSet_array'; /// name of class used to generate array recordsets, which are pre-downloaded recordsets - - var $noNullStrings = false; /// oracle specific stuff - if true ensures that '' is converted to ' ' - var $numCacheHits = 0; - var $numCacheMisses = 0; - var $pageExecuteCountRows = true; - var $uniqueSort = false; /// indicates that all fields in order by must be unique - var $leftOuter = false; /// operator to use for left outer join in WHERE clause - var $rightOuter = false; /// operator to use for right outer join in WHERE clause - var $ansiOuter = false; /// whether ansi outer join syntax supported - var $autoRollback = false; // autoRollback on PConnect(). - var $poorAffectedRows = false; // affectedRows not working or unreliable - - var $fnExecute = false; - var $fnCacheExecute = false; - var $blobEncodeType = false; // false=not required, 'I'=encode to integer, 'C'=encode to char - var $rsPrefix = "ADORecordSet_"; - - var $autoCommit = true; /// do not modify this yourself - actually private - var $transOff = 0; /// temporarily disable transactions - var $transCnt = 0; /// count of nested transactions - - var $fetchMode=false; - - var $null2null = 'null'; // in autoexecute/getinsertsql/getupdatesql, this value will be converted to a null - // - // PRIVATE VARS - // - var $_oldRaiseFn = false; - var $_transOK = null; - var $_connectionID = false; /// The returned link identifier whenever a successful database connection is made. - var $_errorMsg = false; /// A variable which was used to keep the returned last error message. The value will - /// then returned by the errorMsg() function - var $_errorCode = false; /// Last error code, not guaranteed to be used - only by oci8 - var $_queryID = false; /// This variable keeps the last created result link identifier - - var $_isPersistentConnection = false; /// A boolean variable to state whether its a persistent connection or normal connection. */ - var $_bindInputArray = false; /// set to true if ADOConnection.Execute() permits binding of array parameters. - var $_evalAll = false; - var $_affected = false; - var $_logsql = false; - var $_transmode = ''; // transaction mode - - - - /** - * Constructor - */ - function ADOConnection() - { - die('Virtual Class -- cannot instantiate'); - } - - function Version() - { - global $ADODB_vers; - - return (float) substr($ADODB_vers,1); - } - - /** - Get server version info... - - @returns An array with 2 elements: $arr['string'] is the description string, - and $arr[version] is the version (also a string). - */ - function ServerInfo() - { - return array('description' => '', 'version' => ''); - } - - function IsConnected() - { - return !empty($this->_connectionID); - } - - function _findvers($str) - { - if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) return $arr[1]; - else return ''; - } - - /** - * All error messages go through this bottleneck function. - * You can define your own handler by defining the function name in ADODB_OUTP. - */ - function outp($msg,$newline=true) - { - global $ADODB_FLUSH,$ADODB_OUTP; - - if (defined('ADODB_OUTP')) { - $fn = ADODB_OUTP; - $fn($msg,$newline); - return; - } else if (isset($ADODB_OUTP)) { - $fn = $ADODB_OUTP; - $fn($msg,$newline); - return; - } - - if ($newline) $msg .= "
    \n"; - - if (isset($_SERVER['HTTP_USER_AGENT']) || !$newline) echo $msg; - else echo strip_tags($msg); - - - if (!empty($ADODB_FLUSH) && ob_get_length() !== false) flush(); // do not flush if output buffering enabled - useless - thx to Jesse Mullan - - } - - function Time() - { - $rs =& $this->_Execute("select $this->sysTimeStamp"); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - - /** - * Connect to database - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * @param [forceNew] force new connection - * - * @return true or false - */ - function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "", $forceNew = false) - { - if ($argHostname != "") $this->host = $argHostname; - if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; // not stored for security reasons - if ($argDatabaseName != "") $this->database = $argDatabaseName; - - $this->_isPersistentConnection = false; - if ($forceNew) { - if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true; - } else { - if ($rez=$this->_connect($this->host, $this->user, $this->password, $this->database)) return true; - } - if (isset($rez)) { - $err = $this->ErrorMsg(); - if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; - $ret = false; - } else { - $err = "Missing extension for ".$this->dataProvider; - $ret = 0; - } - if ($fn = $this->raiseErrorFn) - $fn($this->databaseType,'CONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); - - - $this->_connectionID = false; - if ($this->debug) ADOConnection::outp( $this->host.': '.$err); - return $ret; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName); - } - - - /** - * Always force a new connection to database - currently only works with oracle - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * - * @return true or false - */ - function NConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") - { - return $this->Connect($argHostname, $argUsername, $argPassword, $argDatabaseName, true); - } - - /** - * Establish persistent connect to database - * - * @param [argHostname] Host to connect to - * @param [argUsername] Userid to login - * @param [argPassword] Associated password - * @param [argDatabaseName] database - * - * @return return true or false - */ - function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") - { - if (defined('ADODB_NEVER_PERSIST')) - return $this->Connect($argHostname,$argUsername,$argPassword,$argDatabaseName); - - if ($argHostname != "") $this->host = $argHostname; - if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; - if ($argDatabaseName != "") $this->database = $argDatabaseName; - - $this->_isPersistentConnection = true; - if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true; - if (isset($rez)) { - $err = $this->ErrorMsg(); - if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; - $ret = false; - } else { - $err = "Missing extension for ".$this->dataProvider; - $ret = 0; - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'PCONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); - } - - $this->_connectionID = false; - if ($this->debug) ADOConnection::outp( $this->host.': '.$err); - return $ret; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysDate; - return $col; // child class implement - } - - /** - * Should prepare the sql statement and return the stmt resource. - * For databases that do not support this, we return the $sql. To ensure - * compatibility with databases that do not support prepare: - * - * $stmt = $db->Prepare("insert into table (id, name) values (?,?)"); - * $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); - * $db->Execute($stmt,array(2,'Joe')) or die('insert failed'); - * - * @param sql SQL to send to database - * - * @return return FALSE, or the prepared statement, or the original sql if - * if the database does not support prepare. - * - */ - function Prepare($sql) - { - return $sql; - } - - /** - * Some databases, eg. mssql require a different function for preparing - * stored procedures. So we cannot use Prepare(). - * - * Should prepare the stored procedure and return the stmt resource. - * For databases that do not support this, we return the $sql. To ensure - * compatibility with databases that do not support prepare: - * - * @param sql SQL to send to database - * - * @return return FALSE, or the prepared statement, or the original sql if - * if the database does not support prepare. - * - */ - function PrepareSP($sql,$param=true) - { - return $this->Prepare($sql,$param); - } - - /** - * PEAR DB Compat - */ - function Quote($s) - { - return $this->qstr($s,false); - } - - /** - Requested by "Karsten Dambekalns" - */ - function QMagic($s) - { - return $this->qstr($s,get_magic_quotes_gpc()); - } - - function q(&$s) - { - #if (!empty($this->qNull)) if ($s == 'null') return $s; - $s = $this->qstr($s,false); - } - - /** - * PEAR DB Compat - do not use internally. - */ - function ErrorNative() - { - return $this->ErrorNo(); - } - - - /** - * PEAR DB Compat - do not use internally. - */ - function nextId($seq_name) - { - return $this->GenID($seq_name); - } - - /** - * Lock a row, will escalate and lock the table if row locking not supported - * will normally free the lock at the end of the transaction - * - * @param $table name of table to lock - * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock - */ - function RowLock($table,$where) - { - return false; - } - - function CommitLock($table) - { - return $this->CommitTrans(); - } - - function RollbackLock($table) - { - return $this->RollbackTrans(); - } - - /** - * PEAR DB Compat - do not use internally. - * - * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical - * for easy porting :-) - * - * @param mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM - * @returns The previous fetch mode - */ - function SetFetchMode($mode) - { - $old = $this->fetchMode; - $this->fetchMode = $mode; - - if ($old === false) { - global $ADODB_FETCH_MODE; - return $ADODB_FETCH_MODE; - } - return $old; - } - - - /** - * PEAR DB Compat - do not use internally. - */ - function &Query($sql, $inputarr=false) - { - $rs = &$this->Execute($sql, $inputarr); - if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); - return $rs; - } - - - /** - * PEAR DB Compat - do not use internally - */ - function &LimitQuery($sql, $offset, $count, $params=false) - { - $rs = &$this->SelectLimit($sql, $count, $offset, $params); - if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); - return $rs; - } - - - /** - * PEAR DB Compat - do not use internally - */ - function Disconnect() - { - return $this->Close(); - } - - /* - Returns placeholder for parameter, eg. - $DB->Param('a') - - will return ':a' for Oracle, and '?' for most other databases... - - For databases that require positioned params, eg $1, $2, $3 for postgresql, - pass in Param(false) before setting the first parameter. - */ - function Param($name,$type='C') - { - return '?'; - } - - /* - InParameter and OutParameter are self-documenting versions of Parameter(). - */ - function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - return $this->Parameter($stmt,$var,$name,false,$maxLen,$type); - } - - /* - */ - function OutParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - return $this->Parameter($stmt,$var,$name,true,$maxLen,$type); - - } - - - /* - Usage in oracle - $stmt = $db->Prepare('select * from table where id =:myid and group=:group'); - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',64); - $db->Execute(); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - */ - function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) - { - return false; - } - - - function IgnoreErrors($saveErrs=false) - { - if (!$saveErrs) { - $saveErrs = array($this->raiseErrorFn,$this->_transOK); - $this->raiseErrorFn = false; - return $saveErrs; - } else { - $this->raiseErrorFn = $saveErrs[0]; - $this->_transOK = $saveErrs[1]; - } - } - - /** - Improved method of initiating a transaction. Used together with CompleteTrans(). - Advantages include: - - a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. - Only the outermost block is treated as a transaction.
    - b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.
    - c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block - are disabled, making it backward compatible. - */ - function StartTrans($errfn = 'ADODB_TransMonitor') - { - if ($this->transOff > 0) { - $this->transOff += 1; - return; - } - - $this->_oldRaiseFn = $this->raiseErrorFn; - $this->raiseErrorFn = $errfn; - $this->_transOK = true; - - if ($this->debug && $this->transCnt > 0) ADOConnection::outp("Bad Transaction: StartTrans called within BeginTrans"); - $this->BeginTrans(); - $this->transOff = 1; - } - - - /** - Used together with StartTrans() to end a transaction. Monitors connection - for sql errors, and will commit or rollback as appropriate. - - @autoComplete if true, monitor sql errors and commit and rollback as appropriate, - and if set to false force rollback even if no SQL error detected. - @returns true on commit, false on rollback. - */ - function CompleteTrans($autoComplete = true) - { - if ($this->transOff > 1) { - $this->transOff -= 1; - return true; - } - $this->raiseErrorFn = $this->_oldRaiseFn; - - $this->transOff = 0; - if ($this->_transOK && $autoComplete) { - if (!$this->CommitTrans()) { - $this->_transOK = false; - if ($this->debug) ADOConnection::outp("Smart Commit failed"); - } else - if ($this->debug) ADOConnection::outp("Smart Commit occurred"); - } else { - $this->_transOK = false; - $this->RollbackTrans(); - if ($this->debug) ADOCOnnection::outp("Smart Rollback occurred"); - } - - return $this->_transOK; - } - - /* - At the end of a StartTrans/CompleteTrans block, perform a rollback. - */ - function FailTrans() - { - if ($this->debug) - if ($this->transOff == 0) { - ADOConnection::outp("FailTrans outside StartTrans/CompleteTrans"); - } else { - ADOConnection::outp("FailTrans was called"); - adodb_backtrace(); - } - $this->_transOK = false; - } - - /** - Check if transaction has failed, only for Smart Transactions. - */ - function HasFailedTrans() - { - if ($this->transOff > 0) return $this->_transOK == false; - return false; - } - - /** - * Execute SQL - * - * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text) - * @param [inputarr] holds the input data to bind to. Null elements will be set to null. - * @return RecordSet or false - */ - function &Execute($sql,$inputarr=false) - { - if ($this->fnExecute) { - $fn = $this->fnExecute; - $ret =& $fn($this,$sql,$inputarr); - if (isset($ret)) return $ret; - } - if ($inputarr) { - if (!is_array($inputarr)) $inputarr = array($inputarr); - - $element0 = reset($inputarr); - # is_object check because oci8 descriptors can be passed in - $array_2d = is_array($element0) && !is_object(reset($element0)); - //remove extra memory copy of input -mikefedyk - unset($element0); - - if (!is_array($sql) && !$this->_bindInputArray) { - $sqlarr = explode('?',$sql); - - if (!$array_2d) $inputarr = array($inputarr); - foreach($inputarr as $arr) { - $sql = ''; $i = 0; - //Use each() instead of foreach to reduce memory usage -mikefedyk - while(list(, $v) = each($arr)) { - $sql .= $sqlarr[$i]; - // from Ron Baldwin - // Only quote string types - $typ = gettype($v); - if ($typ == 'string') - //New memory copy of input created here -mikefedyk - $sql .= $this->qstr($v); - else if ($typ == 'double') - $sql .= str_replace(',','.',$v); // locales fix so 1.1 does not get converted to 1,1 - else if ($typ == 'boolean') - $sql .= $v ? $this->true : $this->false; - else if ($typ == 'object') { - if (method_exists($v, '__toString')) $sql .= $this->qstr($v->__toString()); - else $sql .= $this->qstr((string) $v); - } else if ($v === null) - $sql .= 'NULL'; - else - $sql .= $v; - $i += 1; - } - if (isset($sqlarr[$i])) { - $sql .= $sqlarr[$i]; - if ($i+1 != sizeof($sqlarr)) ADOConnection::outp( "Input Array does not match ?: ".htmlspecialchars($sql)); - } else if ($i != sizeof($sqlarr)) - ADOConnection::outp( "Input array does not match ?: ".htmlspecialchars($sql)); - - $ret =& $this->_Execute($sql); - if (!$ret) return $ret; - } - } else { - if ($array_2d) { - if (is_string($sql)) - $stmt = $this->Prepare($sql); - else - $stmt = $sql; - - foreach($inputarr as $arr) { - $ret =& $this->_Execute($stmt,$arr); - if (!$ret) return $ret; - } - } else { - $ret =& $this->_Execute($sql,$inputarr); - } - } - } else { - $ret =& $this->_Execute($sql,false); - } - - return $ret; - } - - - function &_Execute($sql,$inputarr=false) - { - if ($this->debug) { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - $this->_queryID = _adodb_debug_execute($this, $sql,$inputarr); - } else { - $this->_queryID = @$this->_query($sql,$inputarr); - } - - /************************ - // OK, query executed - *************************/ - - if ($this->_queryID === false) { // error handling if query fails - if ($this->debug == 99) adodb_backtrace(true,5); - $fn = $this->raiseErrorFn; - if ($fn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this); - } - $false = false; - return $false; - } - - if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead - $rs = new ADORecordSet_empty(); - return $rs; - } - - // return real recordset from select statement - $rsclass = $this->rsPrefix.$this->databaseType; - $rs = new $rsclass($this->_queryID,$this->fetchMode); - $rs->connection = &$this; // Pablo suggestion - $rs->Init(); - if (is_array($sql)) $rs->sql = $sql[0]; - else $rs->sql = $sql; - if ($rs->_numOfRows <= 0) { - global $ADODB_COUNTRECS; - if ($ADODB_COUNTRECS) { - if (!$rs->EOF) { - $rs = &$this->_rs2rs($rs,-1,-1,!is_array($sql)); - $rs->_queryID = $this->_queryID; - } else - $rs->_numOfRows = 0; - } - } - return $rs; - } - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - return $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); - } - - function DropSequence($seqname='adodbseq') - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /** - * Generates a sequence id and stores it in $this->genID; - * GenID is only available if $this->hasGenID = true; - * - * @param seqname name of sequence to use - * @param startID if sequence does not exist, start at this ID - * @return 0 if not supported, otherwise a sequence id - */ - function GenID($seqname='adodbseq',$startID=1) - { - if (!$this->hasGenID) { - return 0; // formerly returns false pre 1.60 - } - - $getnext = sprintf($this->_genIDSQL,$seqname); - - $holdtransOK = $this->_transOK; - - $save_handler = $this->raiseErrorFn; - $this->raiseErrorFn = ''; - @($rs = $this->Execute($getnext)); - $this->raiseErrorFn = $save_handler; - - if (!$rs) { - $this->_transOK = $holdtransOK; //if the status was ok before reset - $createseq = $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); - $rs = $this->Execute($getnext); - } - if ($rs && !$rs->EOF) $this->genID = reset($rs->fields); - else $this->genID = 0; // false - - if ($rs) $rs->Close(); - - return $this->genID; - } - - /** - * @param $table string name of the table, not needed by all databases (eg. mysql), default '' - * @param $column string name of the column, not needed by all databases (eg. mysql), default '' - * @return the last inserted ID. Not all databases support this. - */ - function Insert_ID($table='',$column='') - { - if ($this->_logsql && $this->lastInsID) return $this->lastInsID; - if ($this->hasInsertID) return $this->_insertid($table,$column); - if ($this->debug) { - ADOConnection::outp( '

    Insert_ID error

    '); - adodb_backtrace(); - } - return false; - } - - - /** - * Portable Insert ID. Pablo Roca - * - * @return the last inserted ID. All databases support this. But aware possible - * problems in multiuser environments. Heavy test this before deploying. - */ - function PO_Insert_ID($table="", $id="") - { - if ($this->hasInsertID){ - return $this->Insert_ID($table,$id); - } else { - return $this->GetOne("SELECT MAX($id) FROM $table"); - } - } - - /** - * @return # rows affected by UPDATE/DELETE - */ - function Affected_Rows() - { - if ($this->hasAffectedRows) { - if ($this->fnExecute === 'adodb_log_sql') { - if ($this->_logsql && $this->_affected !== false) return $this->_affected; - } - $val = $this->_affectedrows(); - return ($val < 0) ? false : $val; - } - - if ($this->debug) ADOConnection::outp( '

    Affected_Rows error

    ',false); - return false; - } - - - /** - * @return the last error message - */ - function ErrorMsg() - { - if ($this->_errorMsg) return '!! '.strtoupper($this->dataProvider.' '.$this->databaseType).': '.$this->_errorMsg; - else return ''; - } - - - /** - * @return the last error number. Normally 0 means no error. - */ - function ErrorNo() - { - return ($this->_errorMsg) ? -1 : 0; - } - - function MetaError($err=false) - { - include_once(ADODB_DIR."/adodb-error.inc.php"); - if ($err === false) $err = $this->ErrorNo(); - return adodb_error($this->dataProvider,$this->databaseType,$err); - } - - function MetaErrorMsg($errno) - { - include_once(ADODB_DIR."/adodb-error.inc.php"); - return adodb_errormsg($errno); - } - - /** - * @returns an array with the primary key columns in it. - */ - function MetaPrimaryKeys($table, $owner=false) - { - // owner not used in base class - see oci8 - $p = array(); - $objs =& $this->MetaColumns($table); - if ($objs) { - foreach($objs as $v) { - if (!empty($v->primary_key)) - $p[] = $v->name; - } - } - if (sizeof($p)) return $p; - if (function_exists('ADODB_VIEW_PRIMARYKEYS')) - return ADODB_VIEW_PRIMARYKEYS($this->databaseType, $this->database, $table, $owner); - return false; - } - - /** - * @returns assoc array where keys are tables, and values are foreign keys - */ - function MetaForeignKeys($table, $owner=false, $upper=false) - { - return false; - } - /** - * Choose a database to connect to. Many databases do not support this. - * - * @param dbName is the name of the database to select - * @return true or false - */ - function SelectDB($dbName) - {return false;} - - - /** - * Will select, getting rows from $offset (1-based), for $nrows. - * This simulates the MySQL "select * from table limit $offset,$nrows" , and - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that - * MySQL and PostgreSQL parameter ordering is the opposite of the other. - * eg. - * SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) - * SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) - * - * Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) - * BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set - * - * @param sql - * @param [offset] is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to get - * @param [inputarr] array of bind variables - * @param [secs2cache] is a private parameter only used by jlim - * @return the recordset ($rs->databaseType == 'array') - */ - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($this->hasTop && $nrows > 0) { - // suggested by Reinhard Balling. Access requires top after distinct - // Informix requires first before distinct - F Riosa - $ismssql = (strpos($this->databaseType,'mssql') !== false); - if ($ismssql) $isaccess = false; - else $isaccess = (strpos($this->databaseType,'access') !== false); - - if ($offset <= 0) { - - // access includes ties in result - if ($isaccess) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - - if ($secs2cache != 0) { - $ret =& $this->CacheExecute($secs2cache, $sql,$inputarr); - } else { - $ret =& $this->Execute($sql,$inputarr); - } - return $ret; // PHP5 fix - } else if ($ismssql){ - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - } else { - $sql = preg_replace( - '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); - } - } else { - $nn = $nrows + $offset; - if ($isaccess || $ismssql) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); - } else { - $sql = preg_replace( - '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); - } - } - } - - // if $offset>0, we want to skip rows, and $ADODB_COUNTRECS is set, we buffer rows - // 0 to offset-1 which will be discarded anyway. So we disable $ADODB_COUNTRECS. - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - if ($offset>0){ - if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - else $rs = &$this->Execute($sql,$inputarr); - } else { - if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - else $rs = &$this->Execute($sql,$inputarr); - } - $ADODB_COUNTRECS = $savec; - if ($rs && !$rs->EOF) { - $rs =& $this->_rs2rs($rs,$nrows,$offset); - } - //print_r($rs); - return $rs; - } - - /** - * Create serializable recordset. Breaks rs link to connection. - * - * @param rs the recordset to serialize - */ - function &SerializableRS(&$rs) - { - $rs2 =& $this->_rs2rs($rs); - $ignore = false; - $rs2->connection =& $ignore; - - return $rs2; - } - - /** - * Convert database recordset to an array recordset - * input recordset's cursor should be at beginning, and - * old $rs will be closed. - * - * @param rs the recordset to copy - * @param [nrows] number of rows to retrieve (optional) - * @param [offset] offset by number of rows (optional) - * @return the new recordset - */ - function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) - { - if (! $rs) { - $false = false; - return $false; - } - $dbtype = $rs->databaseType; - if (!$dbtype) { - $rs = &$rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1 -- why ? - return $rs; - } - if (($dbtype == 'array' || $dbtype == 'csv') && $nrows == -1 && $offset == -1) { - $rs->MoveFirst(); - $rs = &$rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1-- why ? - return $rs; - } - $flds = array(); - for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { - $flds[] = $rs->FetchField($i); - } - - $arr =& $rs->GetArrayLimit($nrows,$offset); - //print_r($arr); - if ($close) $rs->Close(); - - $arrayClass = $this->arrayClass; - - $rs2 = new $arrayClass(); - $rs2->connection = &$this; - $rs2->sql = $rs->sql; - $rs2->dataProvider = $this->dataProvider; - $rs2->InitArrayFields($arr,$flds); - $rs2->fetchMode = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; - return $rs2; - } - - /* - * Return all rows. Compat with PEAR DB - */ - function &GetAll($sql, $inputarr=false) - { - $arr =& $this->GetArray($sql,$inputarr); - return $arr; - } - - function &GetAssoc($sql, $inputarr=false,$force_array = false, $first2cols = false) - { - $rs =& $this->Execute($sql, $inputarr); - if (!$rs) { - $false = false; - return $false; - } - $arr =& $rs->GetAssoc($force_array,$first2cols); - return $arr; - } - - function &CacheGetAssoc($secs2cache, $sql=false, $inputarr=false,$force_array = false, $first2cols = false) - { - if (!is_numeric($secs2cache)) { - $first2cols = $force_array; - $force_array = $inputarr; - } - $rs =& $this->CacheExecute($secs2cache, $sql, $inputarr); - if (!$rs) { - $false = false; - return $false; - } - $arr =& $rs->GetAssoc($force_array,$first2cols); - return $arr; - } - - /** - * Return first element of first row of sql statement. Recordset is disposed - * for you. - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function GetOne($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - $crecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - $ret = false; - $rs = &$this->Execute($sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - $ADODB_COUNTRECS = $crecs; - return $ret; - } - - function CacheGetOne($secs2cache,$sql=false,$inputarr=false) - { - $ret = false; - $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - - return $ret; - } - - function GetCol($sql, $inputarr = false, $trim = false) - { - $rv = false; - $rs = &$this->Execute($sql, $inputarr); - if ($rs) { - $rv = array(); - if ($trim) { - while (!$rs->EOF) { - $rv[] = trim(reset($rs->fields)); - $rs->MoveNext(); - } - } else { - while (!$rs->EOF) { - $rv[] = reset($rs->fields); - $rs->MoveNext(); - } - } - $rs->Close(); - } - return $rv; - } - - function CacheGetCol($secs, $sql = false, $inputarr = false,$trim=false) - { - $rv = false; - $rs = &$this->CacheExecute($secs, $sql, $inputarr); - if ($rs) { - if ($trim) { - while (!$rs->EOF) { - $rv[] = trim(reset($rs->fields)); - $rs->MoveNext(); - } - } else { - while (!$rs->EOF) { - $rv[] = reset($rs->fields); - $rs->MoveNext(); - } - } - $rs->Close(); - } - return $rv; - } - - function &Transpose(&$rs,$addfieldnames=true) - { - $rs2 =& $this->_rs2rs($rs); - $false = false; - if (!$rs2) return $false; - - $rs2->_transpose($addfieldnames); - return $rs2; - } - - /* - Calculate the offset of a date for a particular database and generate - appropriate SQL. Useful for calculating future/past dates and storing - in a database. - - If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour. - */ - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - return '('.$date.'+'.$dayFraction.')'; - } - - - /** - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function &GetArray($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $rs =& $this->Execute($sql,$inputarr); - $ADODB_COUNTRECS = $savec; - if (!$rs) - if (defined('ADODB_PEAR')) { - $cls = ADODB_PEAR_Error(); - return $cls; - } else { - $false = false; - return $false; - } - $arr =& $rs->GetArray(); - $rs->Close(); - return $arr; - } - - function &CacheGetAll($secs2cache,$sql=false,$inputarr=false) - { - $arr =& $this->CacheGetArray($secs2cache,$sql,$inputarr); - return $arr; - } - - function &CacheGetArray($secs2cache,$sql=false,$inputarr=false) - { - global $ADODB_COUNTRECS; - - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $rs =& $this->CacheExecute($secs2cache,$sql,$inputarr); - $ADODB_COUNTRECS = $savec; - - if (!$rs) - if (defined('ADODB_PEAR')) { - $cls = ADODB_PEAR_Error(); - return $cls; - } else { - $false = false; - return $false; - } - $arr =& $rs->GetArray(); - $rs->Close(); - return $arr; - } - - - - /** - * Return one row of sql statement. Recordset is disposed for you. - * - * @param sql SQL statement - * @param [inputarr] input bind array - */ - function &GetRow($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - $crecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - - $rs =& $this->Execute($sql,$inputarr); - - $ADODB_COUNTRECS = $crecs; - if ($rs) { - if (!$rs->EOF) $arr = $rs->fields; - else $arr = array(); - $rs->Close(); - return $arr; - } - - $false = false; - return $false; - } - - function &CacheGetRow($secs2cache,$sql=false,$inputarr=false) - { - $rs =& $this->CacheExecute($secs2cache,$sql,$inputarr); - if ($rs) { - $arr = false; - if (!$rs->EOF) $arr = $rs->fields; - $rs->Close(); - return $arr; - } - $false = false; - return $false; - } - - /** - * Insert or replace a single record. Note: this is not the same as MySQL's replace. - * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. - * Also note that no table locking is done currently, so it is possible that the - * record be inserted twice by two programs... - * - * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); - * - * $table table name - * $fieldArray associative array of data (you must quote strings yourself). - * $keyCol the primary key field name or if compound key, array of field names - * autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers - * but does not work with dates nor SQL functions. - * has_autoinc the primary key is an auto-inc field, so skip in insert. - * - * Currently blob replace not supported - * - * returns 0 = fail, 1 = update, 2 = insert - */ - - function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - - return _adodb_replace($this, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc); - } - - - /** - * Will select, getting rows from $offset (1-based), for $nrows. - * This simulates the MySQL "select * from table limit $offset,$nrows" , and - * the PostgreSQL "select * from table limit $nrows offset $offset". Note that - * MySQL and PostgreSQL parameter ordering is the opposite of the other. - * eg. - * CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) - * CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) - * - * BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set - * - * @param [secs2cache] seconds to cache data, set to 0 to force query. This is optional - * @param sql - * @param [offset] is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to get - * @param [inputarr] array of bind variables - * @return the recordset ($rs->databaseType == 'array') - */ - function &CacheSelectLimit($secs2cache,$sql,$nrows=-1,$offset=-1,$inputarr=false) - { - if (!is_numeric($secs2cache)) { - if ($sql === false) $sql = -1; - if ($offset == -1) $offset = false; - // sql, nrows, offset,inputarr - $rs =& $this->SelectLimit($secs2cache,$sql,$nrows,$offset,$this->cacheSecs); - } else { - if ($sql === false) ADOConnection::outp( "Warning: \$sql missing from CacheSelectLimit()"); - $rs =& $this->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - } - return $rs; - } - - - /** - * Flush cached recordsets that match a particular $sql statement. - * If $sql == false, then we purge all files in the cache. - */ - - /** - * Flush cached recordsets that match a particular $sql statement. - * If $sql == false, then we purge all files in the cache. - */ - function CacheFlush($sql=false,$inputarr=false) - { - global $ADODB_CACHE_DIR; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - - $key = false; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true); - FlushMemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug); - return; - } - - if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) { - /*if (strncmp(PHP_OS,'WIN',3) === 0) - $dir = str_replace('/', '\\', $ADODB_CACHE_DIR); - else */ - $dir = $ADODB_CACHE_DIR; - - if ($this->debug) { - ADOConnection::outp( "CacheFlush: $dir
    \n", $this->_dirFlush($dir),"
    "); - } else { - $this->_dirFlush($dir); - } - return; - } - - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - - $f = $this->_gencachename($sql.serialize($inputarr),false); - adodb_write_file($f,''); // is adodb_write_file needed? - if (!@unlink($f)) { - if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f"); - } - } - - /** - * Private function to erase all of the files and subdirectories in a directory. - * - * Just specify the directory, and tell it if you want to delete the directory or just clear it out. - * Note: $kill_top_level is used internally in the function to flush subdirectories. - */ - function _dirFlush($dir, $kill_top_level = false) { - if(!$dh = @opendir($dir)) return; - - while (($obj = readdir($dh))) { - if($obj=='.' || $obj=='..') - continue; - - if (!@unlink($dir.'/'.$obj)) - $this->_dirFlush($dir.'/'.$obj, true); - } - if ($kill_top_level === true) - @rmdir($dir); - return true; - } - - - function xCacheFlush($sql=false,$inputarr=false) - { - global $ADODB_CACHE_DIR; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - $key = false; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true); - flushmemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug); - return; - } - - if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) { - if (strncmp(PHP_OS,'WIN',3) === 0) { - $cmd = 'del /s '.str_replace('/','\\',$ADODB_CACHE_DIR).'\adodb_*.cache'; - } else { - //$cmd = 'find "'.$ADODB_CACHE_DIR.'" -type f -maxdepth 1 -print0 | xargs -0 rm -f'; - $cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; - // old version 'rm -f `find '.$ADODB_CACHE_DIR.' -name adodb_*.cache`'; - } - if ($this->debug) { - ADOConnection::outp( "CacheFlush: $cmd
    \n", system($cmd),"
    "); - } else { - exec($cmd); - } - return; - } - - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - - $f = $this->_gencachename($sql.serialize($inputarr),false); - adodb_write_file($f,''); // is adodb_write_file needed? - if (!@unlink($f)) { - if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f"); - } - } - - /** - * Private function to generate filename for caching. - * Filename is generated based on: - * - * - sql statement - * - database type (oci8, ibase, ifx, etc) - * - database name - * - userid - * - setFetchMode (adodb 4.23) - * - * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). - * Assuming that we can have 50,000 files per directory with good performance, - * then we can scale to 12.8 million unique cached recordsets. Wow! - */ - function _gencachename($sql,$createdir,$memcache=false) - { - global $ADODB_CACHE_DIR; - static $notSafeMode; - - if ($this->fetchMode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } else { - $mode = $this->fetchMode; - } - $m = md5($sql.$this->databaseType.$this->database.$this->user.$mode); - if ($memcache) return $m; - - if (!isset($notSafeMode)) $notSafeMode = !ini_get('safe_mode'); - $dir = ($notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($m,0,2) : $ADODB_CACHE_DIR; - - if ($createdir && $notSafeMode && !file_exists($dir)) { - $oldu = umask(0); - if (!mkdir($dir,0771)) - if ($this->debug) ADOConnection::outp( "Unable to mkdir $dir for $sql"); - umask($oldu); - } - return $dir.'/adodb_'.$m.'.cache'; - } - - - /** - * Execute SQL, caching recordsets. - * - * @param [secs2cache] seconds to cache data, set to 0 to force query. - * This is an optional parameter. - * @param sql SQL statement to execute - * @param [inputarr] holds the input data to bind to - * @return RecordSet or false - */ - function &CacheExecute($secs2cache,$sql=false,$inputarr=false) - { - - - if (!is_numeric($secs2cache)) { - $inputarr = $sql; - $sql = $secs2cache; - $secs2cache = $this->cacheSecs; - } - - if (is_array($sql)) { - $sqlparam = $sql; - $sql = $sql[0]; - } else - $sqlparam = $sql; - - if ($this->memCache) { - global $ADODB_INCLUDED_MEMCACHE; - if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); - $md5file = $this->_gencachename($sql.serialize($inputarr),false,true); - } else { - global $ADODB_INCLUDED_CSV; - if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php'); - $md5file = $this->_gencachename($sql.serialize($inputarr),true); - } - - $err = ''; - - if ($secs2cache > 0){ - if ($this->memCache) - $rs = &getmemCache($md5file,$err,$secs2cache, $this->memCacheHost, $this->memCachePort); - else - $rs = &csv2rs($md5file,$err,$secs2cache,$this->arrayClass); - $this->numCacheHits += 1; - } else { - $err='Timeout 1'; - $rs = false; - $this->numCacheMisses += 1; - } - if (!$rs) { - // no cached rs found - if ($this->debug) { - if (get_magic_quotes_runtime() && !$this->memCache) { - ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :("); - } - if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)"); - } - - $rs = &$this->Execute($sqlparam,$inputarr); - - if ($rs && $this->memCache) { - $rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately - if(!putmemCache($md5file, $rs, $this->memCacheHost, $this->memCachePort, $this->memCacheCompress, $this->debug)) { - if ($fn = $this->raiseErrorFn) - $fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this); - if ($this->debug) ADOConnection::outp( " Cache write error"); - } - } else - if ($rs) { - $eof = $rs->EOF; - $rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately - $txt = _rs2serialize($rs,false,$sql); // serialize - - if (!adodb_write_file($md5file,$txt,$this->debug)) { - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this); - } - if ($this->debug) ADOConnection::outp( " Cache write error"); - } - if ($rs->EOF && !$eof) { - $rs->MoveFirst(); - //$rs = &csv2rs($md5file,$err); - $rs->connection = &$this; // Pablo suggestion - } - - } else - if (!$this->memCache) - @unlink($md5file); - } else { - $this->_errorMsg = ''; - $this->_errorCode = 0; - - if ($this->fnCacheExecute) { - $fn = $this->fnCacheExecute; - $fn($this, $secs2cache, $sql, $inputarr); - } - // ok, set cached object found - $rs->connection = &$this; // Pablo suggestion - if ($this->debug){ - - $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); - $ttl = $rs->timeCreated + $secs2cache - time(); - $s = is_array($sql) ? $sql[0] : $sql; - if ($inBrowser) $s = ''.htmlspecialchars($s).''; - - ADOConnection::outp( " $md5file reloaded, ttl=$ttl [ $s ]"); - } - } - return $rs; - } - - - /* - Similar to PEAR DB's autoExecute(), except that - $mode can be 'INSERT' or 'UPDATE' or DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE - If $mode == 'UPDATE', then $where is compulsory as a safety measure. - - $forceUpdate means that even if the data has not changed, perform update. - */ - function& AutoExecute($table, $fields_values, $mode = 'INSERT', $where = FALSE, $forceUpdate=true, $magicq=false) - { - $false = false; - $sql = 'SELECT * FROM '.$table; - if ($where!==FALSE) $sql .= ' WHERE '.$where; - else if ($mode == 'UPDATE' || $mode == 2 /* DB_AUTOQUERY_UPDATE */) { - ADOConnection::outp('AutoExecute: Illegal mode=UPDATE with empty WHERE clause'); - return $false; - } - - $rs =& $this->SelectLimit($sql,1); - if (!$rs) return $false; // table does not exist - $rs->tableName = $table; - - switch((string) $mode) { - case 'UPDATE': - case '2': - $sql = $this->GetUpdateSQL($rs, $fields_values, $forceUpdate, $magicq); - break; - case 'INSERT': - case '1': - $sql = $this->GetInsertSQL($rs, $fields_values, $magicq); - break; - default: - ADOConnection::outp("AutoExecute: Unknown mode=$mode"); - return $false; - } - $ret = false; - if ($sql) $ret = $this->Execute($sql); - if ($ret) $ret = true; - return $ret; - } - - - /** - * Generates an Update Query based on an existing recordset. - * $arrFields is an associative array of fields with the value - * that should be assigned. - * - * Note: This function should only be used on a recordset - * that is run against a single table and sql should only - * be a simple select stmt with no groupby/orderby/limit - * - * "Jonathan Younger" - */ - function GetUpdateSQL(&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=null) - { - global $ADODB_INCLUDED_LIB; - - //********************************************************// - //This is here to maintain compatibility - //with older adodb versions. Sets force type to force nulls if $forcenulls is set. - if (!isset($force)) { - global $ADODB_FORCE_TYPE; - $force = $ADODB_FORCE_TYPE; - } - //********************************************************// - - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getupdatesql($this,$rs,$arrFields,$forceUpdate,$magicq,$force); - } - - /** - * Generates an Insert Query based on an existing recordset. - * $arrFields is an associative array of fields with the value - * that should be assigned. - * - * Note: This function should only be used on a recordset - * that is run against a single table. - */ - function GetInsertSQL(&$rs, $arrFields,$magicq=false,$force=null) - { - global $ADODB_INCLUDED_LIB; - if (!isset($force)) { - global $ADODB_FORCE_TYPE; - $force = $ADODB_FORCE_TYPE; - - } - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getinsertsql($this,$rs,$arrFields,$magicq,$force); - } - - - /** - * Update a blob column, given a where clause. There are more sophisticated - * blob handling functions that we could have implemented, but all require - * a very complex API. Instead we have chosen something that is extremely - * simple to understand and use. - * - * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. - * - * Usage to update a $blobvalue which has a primary key blob_id=1 into a - * field blobtable.blobcolumn: - * - * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); - * - * Insert example: - * - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - /** - * Usage: - * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); - * - * $blobtype supports 'BLOB' and 'CLOB' - * - * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); - */ - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - $fd = fopen($path,'rb'); - if ($fd === false) return false; - $val = fread($fd,filesize($path)); - fclose($fd); - return $this->UpdateBlob($table,$column,$val,$where,$blobtype); - } - - function BlobDecode($blob) - { - return $blob; - } - - function BlobEncode($blob) - { - return $blob; - } - - function SetCharSet($charset) - { - return false; - } - - function IfNull( $field, $ifNull ) - { - return " CASE WHEN $field is null THEN $ifNull ELSE $field END "; - } - - function LogSQL($enable=true) - { - include_once(ADODB_DIR.'/adodb-perf.inc.php'); - - if ($enable) $this->fnExecute = 'adodb_log_sql'; - else $this->fnExecute = false; - - $old = $this->_logsql; - $this->_logsql = $enable; - if ($enable && !$old) $this->_affected = false; - return $old; - } - - function GetCharSet() - { - return false; - } - - /** - * Usage: - * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); - * - * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); - * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); - */ - function UpdateClob($table,$column,$val,$where) - { - return $this->UpdateBlob($table,$column,$val,$where,'CLOB'); - } - - // not the fastest implementation - quick and dirty - jlim - // for best performance, use the actual $rs->MetaType(). - function MetaType($t,$len=-1,$fieldobj=false) - { - - if (empty($this->_metars)) { - $rsclass = $this->rsPrefix.$this->databaseType; - $this->_metars = new $rsclass(false,$this->fetchMode); - $this->_metars->connection =& $this; - } - return $this->_metars->MetaType($t,$len,$fieldobj); - } - - - /** - * Change the SQL connection locale to a specified locale. - * This is used to get the date formats written depending on the client locale. - */ - function SetDateLocale($locale = 'En') - { - $this->locale = $locale; - switch (strtoupper($locale)) - { - case 'EN': - $this->fmtDate="'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - break; - - case 'US': - $this->fmtDate = "'m-d-Y'"; - $this->fmtTimeStamp = "'m-d-Y H:i:s'"; - break; - - case 'PT_BR': - case 'NL': - case 'FR': - case 'RO': - case 'IT': - $this->fmtDate="'d-m-Y'"; - $this->fmtTimeStamp = "'d-m-Y H:i:s'"; - break; - - case 'GE': - $this->fmtDate="'d.m.Y'"; - $this->fmtTimeStamp = "'d.m.Y H:i:s'"; - break; - - default: - $this->fmtDate="'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - break; - } - } - - function &GetActiveRecordsClass($class, $table,$whereOrderBy=false,$bindarr=false, $primkeyArr=false) - { - global $_ADODB_ACTIVE_DBS; - - $save = $this->SetFetchMode(ADODB_FETCH_NUM); - if (empty($whereOrderBy)) $whereOrderBy = '1=1'; - $rows = $this->GetAll("select * from ".$table.' WHERE '.$whereOrderBy,$bindarr); - $this->SetFetchMode($save); - - $false = false; - - if ($rows === false) { - return $false; - } - - - if (!isset($_ADODB_ACTIVE_DBS)) { - include(ADODB_DIR.'/adodb-active-record.inc.php'); - } - if (!class_exists($class)) { - ADOConnection::outp("Unknown class $class in GetActiveRcordsClass()"); - return $false; - } - $arr = array(); - foreach($rows as $row) { - - $obj = new $class($table,$primkeyArr,$this); - if ($obj->ErrorMsg()){ - $this->_errorMsg = $obj->ErrorMsg(); - return $false; - } - $obj->Set($row); - $arr[] = $obj; - } - return $arr; - } - - function &GetActiveRecords($table,$where=false,$bindarr=false,$primkeyArr=false) - { - $arr =& $this->GetActiveRecordsClass('ADODB_Active_Record', $table, $where, $bindarr, $primkeyArr); - return $arr; - } - - /** - * Close Connection - */ - function Close() - { - $rez = $this->_close(); - $this->_connectionID = false; - return $rez; - } - - /** - * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans(). - * - * @return true if succeeded or false if database does not support transactions - */ - function BeginTrans() - { - if ($this->debug) ADOConnection::outp("BeginTrans: Transactions not supported for this driver"); - return false; - } - - /* set transaction mode */ - function SetTransactionMode( $transaction_mode ) - { - $transaction_mode = $this->MetaTransaction($transaction_mode, $this->dataProvider); - $this->_transmode = $transaction_mode; - } -/* -http://msdn2.microsoft.com/en-US/ms173763.aspx -http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-isolation.html -http://www.postgresql.org/docs/8.1/interactive/sql-set-transaction.html -http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_10005.htm -*/ - function MetaTransaction($mode,$db) - { - $mode = strtoupper($mode); - $mode = str_replace('ISOLATION LEVEL ','',$mode); - - switch($mode) { - - case 'READ UNCOMMITTED': - switch($db) { - case 'oci8': - case 'oracle': - return 'ISOLATION LEVEL READ COMMITTED'; - default: - return 'ISOLATION LEVEL READ UNCOMMITTED'; - } - break; - - case 'READ COMMITTED': - return 'ISOLATION LEVEL READ COMMITTED'; - break; - - case 'REPEATABLE READ': - switch($db) { - case 'oci8': - case 'oracle': - return 'ISOLATION LEVEL SERIALIZABLE'; - default: - return 'ISOLATION LEVEL REPEATABLE READ'; - } - break; - - case 'SERIALIZABLE': - return 'ISOLATION LEVEL SERIALIZABLE'; - break; - - default: - return $mode; - } - } - - /** - * If database does not support transactions, always return true as data always commited - * - * @param $ok set to false to rollback transaction, true to commit - * - * @return true/false. - */ - function CommitTrans($ok=true) - { return true;} - - - /** - * If database does not support transactions, rollbacks always fail, so return false - * - * @return true/false. - */ - function RollbackTrans() - { return false;} - - - /** - * return the databases that the driver can connect to. - * Some databases will return an empty array. - * - * @return an array of database names. - */ - function MetaDatabases() - { - global $ADODB_FETCH_MODE; - - if ($this->metaDatabasesSQL) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $arr = $this->GetCol($this->metaDatabasesSQL); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - return $arr; - } - - return false; - } - - - /** - * @param ttype can either be 'VIEW' or 'TABLE' or false. - * If false, both views and tables are returned. - * "VIEW" returns only views - * "TABLE" returns only tables - * @param showSchema returns the schema/user with the table name, eg. USER.TABLE - * @param mask is the input mask - only supported by oci8 and postgresql - * - * @return array of tables for current database. - */ - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - global $ADODB_FETCH_MODE; - - - $false = false; - if ($mask) { - return $false; - } - if ($this->metaTablesSQL) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute($this->metaTablesSQL); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) return $false; - $arr =& $rs->GetArray(); - $arr2 = array(); - - if ($hast = ($ttype && isset($arr[0][1]))) { - $showt = strncmp($ttype,'T',1); - } - - for ($i=0; $i < sizeof($arr); $i++) { - if ($hast) { - if ($showt == 0) { - if (strncmp($arr[$i][1],'T',1) == 0) $arr2[] = trim($arr[$i][0]); - } else { - if (strncmp($arr[$i][1],'V',1) == 0) $arr2[] = trim($arr[$i][0]); - } - } else - $arr2[] = trim($arr[$i][0]); - } - $rs->Close(); - return $arr2; - } - return $false; - } - - - function _findschema(&$table,&$schema) - { - if (!$schema && ($at = strpos($table,'.')) !== false) { - $schema = substr($table,0,$at); - $table = substr($table,$at+1); - } - } - - /** - * List columns in a database as an array of ADOFieldObjects. - * See top of file for definition of object. - * - * @param $table table name to query - * @param $normalize makes table name case-insensitive (required by some databases) - * @schema is optional database schema to use - not supported by all databases. - * - * @return array of ADOFieldObjects for current table. - */ - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $false = false; - - if (!empty($this->metaColumnsSQL)) { - - $schema = false; - $this->_findschema($table,$schema); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,($normalize)?strtoupper($table):$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs === false || $rs->EOF) return $false; - - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - if (isset($rs->fields[3]) && $rs->fields[3]) { - if ($rs->fields[3]>0) $fld->max_length = $rs->fields[3]; - $fld->scale = $rs->fields[4]; - if ($fld->scale>0) $fld->max_length += 1; - } else - $fld->max_length = $rs->fields[2]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return $false; - } - - /** - * List indexes on a table as an array. - * @param table table name to query - * @param primary true to only show primary keys. Not actually used for most databases - * - * @return array of indexes on current table. Each element represents an index, and is itself an associative array. - - Array ( - [name_of_index] => Array - ( - [unique] => true or false - [columns] => Array - ( - [0] => firstname - [1] => lastname - ) - ) - */ - function &MetaIndexes($table, $primary = false, $owner = false) - { - $false = false; - return $false; - } - - /** - * List columns names in a table as an array. - * @param table table name to query - * - * @return array of column names for current table. - */ - function &MetaColumnNames($table, $numIndexes=false,$useattnum=false /* only for postgres */) - { - $objarr =& $this->MetaColumns($table); - if (!is_array($objarr)) { - $false = false; - return $false; - } - $arr = array(); - if ($numIndexes) { - $i = 0; - if ($useattnum) { - foreach($objarr as $v) - $arr[$v->attnum] = $v->name; - - } else - foreach($objarr as $v) $arr[$i++] = $v->name; - } else - foreach($objarr as $v) $arr[strtoupper($v->name)] = $v->name; - - return $arr; - } - - /** - * Different SQL databases used different methods to combine strings together. - * This function provides a wrapper. - * - * param s variable number of string parameters - * - * Usage: $db->Concat($str1,$str2); - * - * @return concatenated string - */ - function Concat() - { - $arr = func_get_args(); - return implode($this->concat_operator, $arr); - } - - - /** - * Converts a date "d" to a string that the database can understand. - * - * @param d a date in Unix date time format. - * - * @return date string in database date format - */ - function DBDate($d) - { - if (empty($d) && $d !== 0) return 'null'; - - if (is_string($d) && !is_numeric($d)) { - if ($d === 'null' || strncmp($d,"'",1) === 0) return $d; - if ($this->isoDates) return "'$d'"; - $d = ADOConnection::UnixDate($d); - } - - return adodb_date($this->fmtDate,$d); - } - - function BindDate($d) - { - $d = $this->DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = $this->DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - - /** - * Converts a timestamp "ts" to a string that the database can understand. - * - * @param ts a timestamp in Unix date time format. - * - * @return timestamp string in database timestamp format - */ - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - - # strlen(14) allows YYYYMMDDHHMMSS format - if (!is_string($ts) || (is_numeric($ts) && strlen($ts)<14)) - return adodb_date($this->fmtTimeStamp,$ts); - - if ($ts === 'null') return $ts; - if ($this->isoDates && strlen($ts) !== 14) return "'$ts'"; - - $ts = ADOConnection::UnixTimeStamp($ts); - return adodb_date($this->fmtTimeStamp,$ts); - } - - /** - * Also in ADORecordSet. - * @param $v is a date string in YYYY-MM-DD format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixDate($v) - { - if (is_object($v)) { - // odbtp support - //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) - return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); - } - - if (is_numeric($v) && strlen($v) !== 8) return $v; - if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", - ($v), $rr)) return false; - - if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0; - // h-m-s-MM-DD-YY - return @adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); - } - - - /** - * Also in ADORecordSet. - * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixTimeStamp($v) - { - if (is_object($v)) { - // odbtp support - //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) - return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); - } - - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ ,-]*(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($v), $rr)) return false; - - if ($rr[1] <= TIMESTAMP_FIRST_YEAR && $rr[2]<= 1) return 0; - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) return adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); - return @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]); - } - - /** - * Also in ADORecordSet. - * - * Format database date based on user defined format. - * - * @param v is the character date in YYYY-MM-DD format, returned by database - * @param fmt is the format to apply to it, using date() - * - * @return a date formated as user desires - */ - - function UserDate($v,$fmt='Y-m-d',$gmt=false) - { - $tt = $this->UnixDate($v); - - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - else if ($tt == 0) return $this->emptyDate; - else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR - } - - return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); - - } - - /** - * - * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format - * @param fmt is the format to apply to it, using date() - * - * @return a timestamp formated as user desires - */ - function UserTimeStamp($v,$fmt='Y-m-d H:i:s',$gmt=false) - { - if (!isset($v)) return $this->emptyTimeStamp; - # strlen(14) allows YYYYMMDDHHMMSS format - if (is_numeric($v) && strlen($v)<14) return ($gmt) ? adodb_gmdate($fmt,$v) : adodb_date($fmt,$v); - $tt = $this->UnixTimeStamp($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - if ($tt == 0) return $this->emptyTimeStamp; - return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); - } - - function escape($s,$magic_quotes=false) - { - return $this->addq($s,$magic_quotes); - } - - /** - * Quotes a string, without prefixing nor appending quotes. - */ - function addq($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if ($this->replaceQuote[0] == '\\'){ - // only since php 4.0.5 - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); - } - return str_replace("'",$this->replaceQuote,$s); - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything - return $s; - else {// change \' to '' for sybase/mssql - $s = str_replace('\\\\','\\',$s); - return str_replace("\\'",$this->replaceQuote,$s); - } - } - - /** - * Correctly quotes a string so that all strings are escaped. We prefix and append - * to the string single-quotes. - * An example is $db->qstr("Don't bother",magic_quotes_runtime()); - * - * @param s the string to quote - * @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). - * This undoes the stupidity of magic quotes for GPC. - * - * @return quoted string to be sent back to database - */ - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if ($this->replaceQuote[0] == '\\'){ - // only since php 4.0.5 - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything - return "'$s'"; - else {// change \' to '' for sybase/mssql - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - } - } - - - /** - * Will select the supplied $page number from a recordset, given that it is paginated in pages of - * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. - * - * See readme.htm#ex8 for an example of usage. - * - * @param sql - * @param nrows is the number of rows per page to get - * @param page is the page number to get (1-based) - * @param [inputarr] array of bind variables - * @param [secs2cache] is a private parameter only used by jlim - * @return the recordset ($rs->databaseType == 'array') - * - * NOTE: phpLens uses a different algorithm and does not use PageExecute(). - * - */ - function &PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - if ($this->pageExecuteCountRows) $rs =& _adodb_pageexecute_all_rows($this, $sql, $nrows, $page, $inputarr, $secs2cache); - else $rs =& _adodb_pageexecute_no_last_page($this, $sql, $nrows, $page, $inputarr, $secs2cache); - return $rs; - } - - - /** - * Will select the supplied $page number from a recordset, given that it is paginated in pages of - * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. - * - * @param secs2cache seconds to cache data, set to 0 to force query - * @param sql - * @param nrows is the number of rows per page to get - * @param page is the page number to get (1-based) - * @param [inputarr] array of bind variables - * @return the recordset ($rs->databaseType == 'array') - */ - function &CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) - { - /*switch($this->dataProvider) { - case 'postgres': - case 'mysql': - break; - default: $secs2cache = 0; break; - }*/ - $rs =& $this->PageExecute($sql,$nrows,$page,$inputarr,$secs2cache); - return $rs; - } - -} // end class ADOConnection - - - - //============================================================================================== - // CLASS ADOFetchObj - //============================================================================================== - - /** - * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). - */ - class ADOFetchObj { - }; - - //============================================================================================== - // CLASS ADORecordSet_empty - //============================================================================================== - - /** - * Lightweight recordset when there are no records to be returned - */ - class ADORecordSet_empty - { - var $dataProvider = 'empty'; - var $databaseType = false; - var $EOF = true; - var $_numOfRows = 0; - var $fields = false; - var $connection = false; - function RowCount() {return 0;} - function RecordCount() {return 0;} - function PO_RecordCount(){return 0;} - function Close(){return true;} - function FetchRow() {return false;} - function FieldCount(){ return 0;} - function Init() {} - } - - //============================================================================================== - // DATE AND TIME FUNCTIONS - //============================================================================================== - if (!defined('ADODB_DATE_VERSION')) include(ADODB_DIR.'/adodb-time.inc.php'); - - //============================================================================================== - // CLASS ADORecordSet - //============================================================================================== - - if (PHP_VERSION < 5) include_once(ADODB_DIR.'/adodb-php4.inc.php'); - else include_once(ADODB_DIR.'/adodb-iterator.inc.php'); - /** - * RecordSet class that represents the dataset returned by the database. - * To keep memory overhead low, this class holds only the current row in memory. - * No prefetching of data is done, so the RecordCount() can return -1 ( which - * means recordcount not known). - */ - class ADORecordSet extends ADODB_BASE_RS { - /* - * public variables - */ - var $dataProvider = "native"; - var $fields = false; /// holds the current row data - var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob - /// in other words, we use a text area for editing. - var $canSeek = false; /// indicates that seek is supported - var $sql; /// sql text - var $EOF = false; /// Indicates that the current record position is after the last record in a Recordset object. - - var $emptyTimeStamp = ' '; /// what to display when $time==0 - var $emptyDate = ' '; /// what to display when $time==0 - var $debug = false; - var $timeCreated=0; /// datetime in Unix format rs created -- for cached recordsets - - var $bind = false; /// used by Fields() to hold array - should be private? - var $fetchMode; /// default fetch mode - var $connection = false; /// the parent connection - /* - * private variables - */ - var $_numOfRows = -1; /** number of rows, or -1 */ - var $_numOfFields = -1; /** number of fields in recordset */ - var $_queryID = -1; /** This variable keeps the result link identifier. */ - var $_currentRow = -1; /** This variable keeps the current row in the Recordset. */ - var $_closed = false; /** has recordset been closed */ - var $_inited = false; /** Init() should only be called once */ - var $_obj; /** Used by FetchObj */ - var $_names; /** Used by FetchObj */ - - var $_currentPage = -1; /** Added by Ivn Oliva to implement recordset pagination */ - var $_atFirstPage = false; /** Added by Ivn Oliva to implement recordset pagination */ - var $_atLastPage = false; /** Added by Ivn Oliva to implement recordset pagination */ - var $_lastPageNo = -1; - var $_maxRecordCount = 0; - var $datetime = false; - - /** - * Constructor - * - * @param queryID this is the queryID returned by ADOConnection->_query() - * - */ - function ADORecordSet($queryID) - { - $this->_queryID = $queryID; - } - - - - function Init() - { - if ($this->_inited) return; - $this->_inited = true; - if ($this->_queryID) @$this->_initrs(); - else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - } - if ($this->_numOfRows != 0 && $this->_numOfFields && $this->_currentRow == -1) { - - $this->_currentRow = 0; - if ($this->EOF = ($this->_fetch() === false)) { - $this->_numOfRows = 0; // _numOfRows could be -1 - } - } else { - $this->EOF = true; - } - } - - - /** - * Generate a SELECT tag string from a recordset, and return the string. - * If the recordset has 2 cols, we treat the 1st col as the containing - * the text to display to the user, and 2nd col as the return value. Default - * strings are compared with the FIRST column. - * - * @param name name of SELECT tag - * @param [defstr] the value to hilite. Use an array for multiple hilites for listbox. - * @param [blank1stItem] true to leave the 1st item in list empty - * @param [multiple] true for listbox, false for popup - * @param [size] #rows to show for listbox. not used by popup - * @param [selectAttr] additional attributes to defined for SELECT tag. - * useful for holding javascript onChange='...' handlers. - & @param [compareFields0] when we have 2 cols in recordset, we compare the defstr with - * column 0 (1st col) if this is true. This is not documented. - * - * @return HTML - * - * changes by glen.davies@cce.ac.nz to support multiple hilited items - */ - function GetMenu($name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='',$compareFields0=true) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getmenu($this, $name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,$compareFields0); - } - - - - /** - * Generate a SELECT tag string from a recordset, and return the string. - * If the recordset has 2 cols, we treat the 1st col as the containing - * the text to display to the user, and 2nd col as the return value. Default - * strings are compared with the SECOND column. - * - */ - function GetMenu2($name,$defstr='',$blank1stItem=true,$multiple=false,$size=0, $selectAttr='') - { - return $this->GetMenu($name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,false); - } - - /* - Grouped Menu - */ - function GetMenu3($name,$defstr='',$blank1stItem=true,$multiple=false, - $size=0, $selectAttr='') - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_getmenu_gp($this, $name,$defstr,$blank1stItem,$multiple, - $size, $selectAttr,false); - } - - /** - * return recordset as a 2-dimensional array. - * - * @param [nRows] is the number of rows to return. -1 means every row. - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetArray($nRows = -1) - { - global $ADODB_EXTENSION; if ($ADODB_EXTENSION) { - $results = adodb_getall($this,$nRows); - return $results; - } - $results = array(); - $cnt = 0; - while (!$this->EOF && $nRows != $cnt) { - $results[] = $this->fields; - $this->MoveNext(); - $cnt++; - } - return $results; - } - - function &GetAll($nRows = -1) - { - $arr =& $this->GetArray($nRows); - return $arr; - } - - /* - * Some databases allow multiple recordsets to be returned. This function - * will return true if there is a next recordset, or false if no more. - */ - function NextRecordSet() - { - return false; - } - - /** - * return recordset as a 2-dimensional array. - * Helper function for ADOConnection->SelectLimit() - * - * @param offset is the row to start calculations from (1-based) - * @param [nrows] is the number of rows to return - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr =& $this->GetArray($nrows); - return $arr; - } - - $this->Move($offset); - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - /** - * Synonym for GetArray() for compatibility with ADO. - * - * @param [nRows] is the number of rows to return. -1 means every row. - * - * @return an array indexed by the rows (0-based) from the recordset - */ - function &GetRows($nRows = -1) - { - $arr =& $this->GetArray($nRows); - return $arr; - } - - /** - * return whole recordset as a 2-dimensional associative array if there are more than 2 columns. - * The first column is treated as the key and is not included in the array. - * If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless - * $force_array == true. - * - * @param [force_array] has only meaning if we have 2 data columns. If false, a 1 dimensional - * array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing, - * read the source. - * - * @param [first2cols] means if there are more than 2 cols, ignore the remaining cols and - * instead of returning array[col0] => array(remaining cols), return array[col0] => col1 - * - * @return an associative array indexed by the first column of the array, - * or false if the data has less than 2 cols. - */ - function &GetAssoc($force_array = false, $first2cols = false) - { - global $ADODB_EXTENSION; - - $cols = $this->_numOfFields; - if ($cols < 2) { - $false = false; - return $false; - } - $numIndex = isset($this->fields[0]); - $results = array(); - - if (!$first2cols && ($cols > 2 || $force_array)) { - if ($ADODB_EXTENSION) { - if ($numIndex) { - while (!$this->EOF) { - $results[trim($this->fields[0])] = array_slice($this->fields, 1); - adodb_movenext($this); - } - } else { - while (!$this->EOF) { - // Fix for array_slice re-numbering numeric associative keys - $keys = array_slice(array_keys($this->fields), 1); - $sliced_array = array(); - - foreach($keys as $key) { - $sliced_array[$key] = $this->fields[$key]; - } - - $results[trim(reset($this->fields))] = $sliced_array; - adodb_movenext($this); - } - } - } else { - if ($numIndex) { - while (!$this->EOF) { - $results[trim($this->fields[0])] = array_slice($this->fields, 1); - $this->MoveNext(); - } - } else { - while (!$this->EOF) { - // Fix for array_slice re-numbering numeric associative keys - $keys = array_slice(array_keys($this->fields), 1); - $sliced_array = array(); - - foreach($keys as $key) { - $sliced_array[$key] = $this->fields[$key]; - } - - $results[trim(reset($this->fields))] = $sliced_array; - $this->MoveNext(); - } - } - } - } else { - if ($ADODB_EXTENSION) { - // return scalar values - if ($numIndex) { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $results[trim(($this->fields[0]))] = $this->fields[1]; - adodb_movenext($this); - } - } else { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $v1 = trim(reset($this->fields)); - $v2 = ''.next($this->fields); - $results[$v1] = $v2; - adodb_movenext($this); - } - } - } else { - if ($numIndex) { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $results[trim(($this->fields[0]))] = $this->fields[1]; - $this->MoveNext(); - } - } else { - while (!$this->EOF) { - // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string - $v1 = trim(reset($this->fields)); - $v2 = ''.next($this->fields); - $results[$v1] = $v2; - $this->MoveNext(); - } - } - } - } - - $ref =& $results; # workaround accelerator incompat with PHP 4.4 :( - return $ref; - } - - - /** - * - * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format - * @param fmt is the format to apply to it, using date() - * - * @return a timestamp formated as user desires - */ - function UserTimeStamp($v,$fmt='Y-m-d H:i:s') - { - if (is_numeric($v) && strlen($v)<14) return adodb_date($fmt,$v); - $tt = $this->UnixTimeStamp($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - if ($tt === 0) return $this->emptyTimeStamp; - return adodb_date($fmt,$tt); - } - - - /** - * @param v is the character date in YYYY-MM-DD format, returned by database - * @param fmt is the format to apply to it, using date() - * - * @return a date formated as user desires - */ - function UserDate($v,$fmt='Y-m-d') - { - $tt = $this->UnixDate($v); - // $tt == -1 if pre TIMESTAMP_FIRST_YEAR - if (($tt === false || $tt == -1) && $v != false) return $v; - else if ($tt == 0) return $this->emptyDate; - else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR - } - return adodb_date($fmt,$tt); - } - - - /** - * @param $v is a date string in YYYY-MM-DD format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixDate($v) - { - return ADOConnection::UnixDate($v); - } - - - /** - * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format - * - * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format - */ - function UnixTimeStamp($v) - { - return ADOConnection::UnixTimeStamp($v); - } - - - /** - * PEAR DB Compat - do not use internally - */ - function Free() - { - return $this->Close(); - } - - - /** - * PEAR DB compat, number of rows - */ - function NumRows() - { - return $this->_numOfRows; - } - - - /** - * PEAR DB compat, number of cols - */ - function NumCols() - { - return $this->_numOfFields; - } - - /** - * Fetch a row, returning false if no more rows. - * This is PEAR DB compat mode. - * - * @return false or array containing the current record - */ - function &FetchRow() - { - if ($this->EOF) { - $false = false; - return $false; - } - $arr = $this->fields; - $this->_currentRow++; - if (!$this->_fetch()) $this->EOF = true; - return $arr; - } - - - /** - * Fetch a row, returning PEAR_Error if no more rows. - * This is PEAR DB compat mode. - * - * @return DB_OK or error object - */ - function FetchInto(&$arr) - { - if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false; - $arr = $this->fields; - $this->MoveNext(); - return 1; // DB_OK - } - - - /** - * Move to the first row in the recordset. Many databases do NOT support this. - * - * @return true or false - */ - function MoveFirst() - { - if ($this->_currentRow == 0) return true; - return $this->Move(0); - } - - - /** - * Move to the last row in the recordset. - * - * @return true or false - */ - function MoveLast() - { - if ($this->_numOfRows >= 0) return $this->Move($this->_numOfRows-1); - if ($this->EOF) return false; - while (!$this->EOF) { - $f = $this->fields; - $this->MoveNext(); - } - $this->fields = $f; - $this->EOF = false; - return true; - } - - - /** - * Move to next record in the recordset. - * - * @return true if there still rows available, or false if there are no more rows (EOF). - */ - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_fetch()) return true; - } - $this->EOF = true; - /* -- tested error handling when scrolling cursor -- seems useless. - $conn = $this->connection; - if ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) { - $fn = $conn->raiseErrorFn; - $fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database); - } - */ - return false; - } - - - /** - * Random access to a specific row in the recordset. Some databases do not support - * access to previous rows in the databases (no scrolling backwards). - * - * @param rowNumber is the row to move to (0-based) - * - * @return true if there still rows available, or false if there are no more rows (EOF). - */ - function Move($rowNumber = 0) - { - $this->EOF = false; - if ($rowNumber == $this->_currentRow) return true; - if ($rowNumber >= $this->_numOfRows) - if ($this->_numOfRows != -1) $rowNumber = $this->_numOfRows-2; - - if ($this->canSeek) { - - if ($this->_seek($rowNumber)) { - $this->_currentRow = $rowNumber; - if ($this->_fetch()) { - return true; - } - } else { - $this->EOF = true; - return false; - } - } else { - if ($rowNumber < $this->_currentRow) return false; - global $ADODB_EXTENSION; - if ($ADODB_EXTENSION) { - while (!$this->EOF && $this->_currentRow < $rowNumber) { - adodb_movenext($this); - } - } else { - - while (! $this->EOF && $this->_currentRow < $rowNumber) { - $this->_currentRow++; - - if (!$this->_fetch()) $this->EOF = true; - } - } - return !($this->EOF); - } - - $this->fields = false; - $this->EOF = true; - return false; - } - - - /** - * Get the value of a field in the current row by column name. - * Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM. - * - * @param colname is the field to access - * - * @return the value of $colname column - */ - function Fields($colname) - { - return $this->fields[$colname]; - } - - function GetAssocKeys($upper=true) - { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - if ($upper === 2) $this->bind[$o->name] = $i; - else $this->bind[($upper) ? strtoupper($o->name) : strtolower($o->name)] = $i; - } - } - - /** - * Use associative array to get fields array for databases that do not support - * associative arrays. Submitted by Paolo S. Asioli paolo.asioli#libero.it - * - * If you don't want uppercase cols, set $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC - * before you execute your SQL statement, and access $rs->fields['col'] directly. - * - * $upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField - */ - function &GetRowAssoc($upper=1) - { - $record = array(); - // if (!$this->fields) return $record; - - if (!$this->bind) { - $this->GetAssocKeys($upper); - } - - foreach($this->bind as $k => $v) { - $record[$k] = $this->fields[$v]; - } - - return $record; - } - - - /** - * Clean up recordset - * - * @return true or false - */ - function Close() - { - // free connection object - this seems to globally free the object - // and not merely the reference, so don't do this... - // $this->connection = false; - if (!$this->_closed) { - $this->_closed = true; - return $this->_close(); - } else - return true; - } - - /** - * synonyms RecordCount and RowCount - * - * @return the number of rows or -1 if this is not supported - */ - function RecordCount() {return $this->_numOfRows;} - - - /* - * If we are using PageExecute(), this will return the maximum possible rows - * that can be returned when paging a recordset. - */ - function MaxRecordCount() - { - return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->RecordCount(); - } - - /** - * synonyms RecordCount and RowCount - * - * @return the number of rows or -1 if this is not supported - */ - function RowCount() {return $this->_numOfRows;} - - - /** - * Portable RecordCount. Pablo Roca - * - * @return the number of records from a previous SELECT. All databases support this. - * - * But aware possible problems in multiuser environments. For better speed the table - * must be indexed by the condition. Heavy test this before deploying. - */ - function PO_RecordCount($table="", $condition="") { - - $lnumrows = $this->_numOfRows; - // the database doesn't support native recordcount, so we do a workaround - if ($lnumrows == -1 && $this->connection) { - IF ($table) { - if ($condition) $condition = " WHERE " . $condition; - $resultrows = &$this->connection->Execute("SELECT COUNT(*) FROM $table $condition"); - if ($resultrows) $lnumrows = reset($resultrows->fields); - } - } - return $lnumrows; - } - - - /** - * @return the current row in the recordset. If at EOF, will return the last row. 0-based. - */ - function CurrentRow() {return $this->_currentRow;} - - /** - * synonym for CurrentRow -- for ADO compat - * - * @return the current row in the recordset. If at EOF, will return the last row. 0-based. - */ - function AbsolutePosition() {return $this->_currentRow;} - - /** - * @return the number of columns in the recordset. Some databases will set this to 0 - * if no records are returned, others will return the number of columns in the query. - */ - function FieldCount() {return $this->_numOfFields;} - - - /** - * Get the ADOFieldObject of a specific column. - * - * @param fieldoffset is the column position to access(0-based). - * - * @return the ADOFieldObject for that column, or false. - */ - function &FetchField($fieldoffset = -1) - { - // must be defined by child class - - $false = false; - return $false; - } - - /** - * Get the ADOFieldObjects of all columns in an array. - * - */ - function& FieldTypesArray() - { - $arr = array(); - for ($i=0, $max=$this->_numOfFields; $i < $max; $i++) - $arr[] = $this->FetchField($i); - return $arr; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default case is lowercase field names. - * - * @return the object with the properties set to the fields of the current row - */ - function &FetchObj() - { - $o =& $this->FetchObject(false); - return $o; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default case is uppercase. - * - * @param $isupper to set the object property names to uppercase - * - * @return the object with the properties set to the fields of the current row - */ - function &FetchObject($isupper=true) - { - if (empty($this->_obj)) { - $this->_obj = new ADOFetchObj(); - $this->_names = array(); - for ($i=0; $i <$this->_numOfFields; $i++) { - $f = $this->FetchField($i); - $this->_names[] = $f->name; - } - } - $i = 0; - if (PHP_VERSION >= 5) $o = clone($this->_obj); - else $o = $this->_obj; - - for ($i=0; $i <$this->_numOfFields; $i++) { - $name = $this->_names[$i]; - if ($isupper) $n = strtoupper($name); - else $n = $name; - - $o->$n = $this->Fields($name); - } - return $o; - } - - /** - * Return the fields array of the current row as an object for convenience. - * The default is lower-case field names. - * - * @return the object with the properties set to the fields of the current row, - * or false if EOF - * - * Fixed bug reported by tim@orotech.net - */ - function &FetchNextObj() - { - $o =& $this->FetchNextObject(false); - return $o; - } - - - /** - * Return the fields array of the current row as an object for convenience. - * The default is upper case field names. - * - * @param $isupper to set the object property names to uppercase - * - * @return the object with the properties set to the fields of the current row, - * or false if EOF - * - * Fixed bug reported by tim@orotech.net - */ - function &FetchNextObject($isupper=true) - { - $o = false; - if ($this->_numOfRows != 0 && !$this->EOF) { - $o = $this->FetchObject($isupper); - $this->_currentRow++; - if ($this->_fetch()) return $o; - } - $this->EOF = true; - return $o; - } - - /** - * Get the metatype of the column. This is used for formatting. This is because - * many databases use different names for the same type, so we transform the original - * type to our standardised version which uses 1 character codes: - * - * @param t is the type passed in. Normally is ADOFieldObject->type. - * @param len is the maximum length of that field. This is because we treat character - * fields bigger than a certain size as a 'B' (blob). - * @param fieldobj is the field object returned by the database driver. Can hold - * additional info (eg. primary_key for mysql). - * - * @return the general type of the data: - * C for character < 250 chars - * X for teXt (>= 250 chars) - * B for Binary - * N for numeric or floating point - * D for date - * T for timestamp - * L for logical/Boolean - * I for integer - * R for autoincrement counter/integer - * - * - */ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - // changed in 2.32 to hashing instead of switch stmt for speed... - static $typeMap = array( - 'VARCHAR' => 'C', - 'VARCHAR2' => 'C', - 'CHAR' => 'C', - 'C' => 'C', - 'STRING' => 'C', - 'NCHAR' => 'C', - 'NVARCHAR' => 'C', - 'VARYING' => 'C', - 'BPCHAR' => 'C', - 'CHARACTER' => 'C', - 'INTERVAL' => 'C', # Postgres - 'MACADDR' => 'C', # postgres - ## - 'LONGCHAR' => 'X', - 'TEXT' => 'X', - 'NTEXT' => 'X', - 'M' => 'X', - 'X' => 'X', - 'CLOB' => 'X', - 'NCLOB' => 'X', - 'LVARCHAR' => 'X', - ## - 'BLOB' => 'B', - 'IMAGE' => 'B', - 'BINARY' => 'B', - 'VARBINARY' => 'B', - 'LONGBINARY' => 'B', - 'B' => 'B', - ## - 'YEAR' => 'D', // mysql - 'DATE' => 'D', - 'D' => 'D', - ## - 'UNIQUEIDENTIFIER' => 'C', # MS SQL Server - ## - 'TIME' => 'T', - 'TIMESTAMP' => 'T', - 'DATETIME' => 'T', - 'TIMESTAMPTZ' => 'T', - 'T' => 'T', - 'TIMESTAMP WITHOUT TIME ZONE' => 'T', // postgresql - ## - 'BOOL' => 'L', - 'BOOLEAN' => 'L', - 'BIT' => 'L', - 'L' => 'L', - ## - 'COUNTER' => 'R', - 'R' => 'R', - 'SERIAL' => 'R', // ifx - 'INT IDENTITY' => 'R', - ## - 'INT' => 'I', - 'INT2' => 'I', - 'INT4' => 'I', - 'INT8' => 'I', - 'INTEGER' => 'I', - 'INTEGER UNSIGNED' => 'I', - 'SHORT' => 'I', - 'TINYINT' => 'I', - 'SMALLINT' => 'I', - 'I' => 'I', - ## - 'LONG' => 'N', // interbase is numeric, oci8 is blob - 'BIGINT' => 'N', // this is bigger than PHP 32-bit integers - 'DECIMAL' => 'N', - 'DEC' => 'N', - 'REAL' => 'N', - 'DOUBLE' => 'N', - 'DOUBLE PRECISION' => 'N', - 'SMALLFLOAT' => 'N', - 'FLOAT' => 'N', - 'NUMBER' => 'N', - 'NUM' => 'N', - 'NUMERIC' => 'N', - 'MONEY' => 'N', - - ## informix 9.2 - 'SQLINT' => 'I', - 'SQLSERIAL' => 'I', - 'SQLSMINT' => 'I', - 'SQLSMFLOAT' => 'N', - 'SQLFLOAT' => 'N', - 'SQLMONEY' => 'N', - 'SQLDECIMAL' => 'N', - 'SQLDATE' => 'D', - 'SQLVCHAR' => 'C', - 'SQLCHAR' => 'C', - 'SQLDTIME' => 'T', - 'SQLINTERVAL' => 'N', - 'SQLBYTES' => 'B', - 'SQLTEXT' => 'X', - ## informix 10 - "SQLINT8" => 'I8', - "SQLSERIAL8" => 'I8', - "SQLNCHAR" => 'C', - "SQLNVCHAR" => 'C', - "SQLLVARCHAR" => 'X', - "SQLBOOL" => 'L' - ); - - $tmap = false; - $t = strtoupper($t); - $tmap = (isset($typeMap[$t])) ? $typeMap[$t] : 'N'; - switch ($tmap) { - case 'C': - - // is the char field is too long, return as text field... - if ($this->blobSize >= 0) { - if ($len > $this->blobSize) return 'X'; - } else if ($len > 250) { - return 'X'; - } - return 'C'; - - case 'I': - if (!empty($fieldobj->primary_key)) return 'R'; - return 'I'; - - case false: - return 'N'; - - case 'B': - if (isset($fieldobj->binary)) - return ($fieldobj->binary) ? 'B' : 'X'; - return 'B'; - - case 'D': - if (!empty($this->connection) && !empty($this->connection->datetime)) return 'T'; - return 'D'; - - default: - if ($t == 'LONG' && $this->dataProvider == 'oci8') return 'B'; - return $tmap; - } - } - - - function _close() {} - - /** - * set/returns the current recordset page when paginating - */ - function AbsolutePage($page=-1) - { - if ($page != -1) $this->_currentPage = $page; - return $this->_currentPage; - } - - /** - * set/returns the status of the atFirstPage flag when paginating - */ - function AtFirstPage($status=false) - { - if ($status != false) $this->_atFirstPage = $status; - return $this->_atFirstPage; - } - - function LastPageNo($page = false) - { - if ($page != false) $this->_lastPageNo = $page; - return $this->_lastPageNo; - } - - /** - * set/returns the status of the atLastPage flag when paginating - */ - function AtLastPage($status=false) - { - if ($status != false) $this->_atLastPage = $status; - return $this->_atLastPage; - } - -} // end class ADORecordSet - - //============================================================================================== - // CLASS ADORecordSet_array - //============================================================================================== - - /** - * This class encapsulates the concept of a recordset created in memory - * as an array. This is useful for the creation of cached recordsets. - * - * Note that the constructor is different from the standard ADORecordSet - */ - - class ADORecordSet_array extends ADORecordSet - { - var $databaseType = 'array'; - - var $_array; // holds the 2-dimensional data array - var $_types; // the array of types of each column (C B I L M) - var $_colnames; // names of each column in array - var $_skiprow1; // skip 1st row because it holds column names - var $_fieldobjects; // holds array of field objects - var $canSeek = true; - var $affectedrows = false; - var $insertid = false; - var $sql = ''; - var $compat = false; - /** - * Constructor - * - */ - function ADORecordSet_array($fakeid=1) - { - global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH; - - // fetch() on EOF does not delete $this->fields - $this->compat = !empty($ADODB_COMPAT_FETCH); - $this->ADORecordSet($fakeid); // fake queryID - $this->fetchMode = $ADODB_FETCH_MODE; - } - - function _transpose($addfieldnames=true) - { - global $ADODB_INCLUDED_LIB; - - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - $hdr = true; - - $fobjs = $addfieldnames ? $this->_fieldobjects : false; - adodb_transpose($this->_array, $newarr, $hdr, $fobjs); - //adodb_pr($newarr); - - $this->_skiprow1 = false; - $this->_array =& $newarr; - $this->_colnames = $hdr; - - adodb_probetypes($newarr,$this->_types); - - $this->_fieldobjects = array(); - - foreach($hdr as $k => $name) { - $f = new ADOFieldObject(); - $f->name = $name; - $f->type = $this->_types[$k]; - $f->max_length = -1; - $this->_fieldobjects[] = $f; - } - $this->fields = reset($this->_array); - - $this->_initrs(); - - } - - /** - * Setup the array. - * - * @param array is a 2-dimensional array holding the data. - * The first row should hold the column names - * unless paramter $colnames is used. - * @param typearr holds an array of types. These are the same types - * used in MetaTypes (C,B,L,I,N). - * @param [colnames] array of column names. If set, then the first row of - * $array should not hold the column names. - */ - function InitArray($array,$typearr,$colnames=false) - { - $this->_array = $array; - $this->_types = $typearr; - if ($colnames) { - $this->_skiprow1 = false; - $this->_colnames = $colnames; - } else { - $this->_skiprow1 = true; - $this->_colnames = $array[0]; - } - $this->Init(); - } - /** - * Setup the Array and datatype file objects - * - * @param array is a 2-dimensional array holding the data. - * The first row should hold the column names - * unless paramter $colnames is used. - * @param fieldarr holds an array of ADOFieldObject's. - */ - function InitArrayFields(&$array,&$fieldarr) - { - $this->_array =& $array; - $this->_skiprow1= false; - if ($fieldarr) { - $this->_fieldobjects =& $fieldarr; - } - $this->Init(); - } - - function &GetArray($nRows=-1) - { - if ($nRows == -1 && $this->_currentRow <= 0 && !$this->_skiprow1) { - return $this->_array; - } else { - $arr =& ADORecordSet::GetArray($nRows); - return $arr; - } - } - - function _initrs() - { - $this->_numOfRows = sizeof($this->_array); - if ($this->_skiprow1) $this->_numOfRows -= 1; - - $this->_numOfFields =(isset($this->_fieldobjects)) ? - sizeof($this->_fieldobjects):sizeof($this->_types); - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - $mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode; - - if ($mode & ADODB_FETCH_ASSOC) { - if (!isset($this->fields[$colname])) $colname = strtolower($colname); - return $this->fields[$colname]; - } - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function &FetchField($fieldOffset = -1) - { - if (isset($this->_fieldobjects)) { - return $this->_fieldobjects[$fieldOffset]; - } - $o = new ADOFieldObject(); - $o->name = $this->_colnames[$fieldOffset]; - $o->type = $this->_types[$fieldOffset]; - $o->max_length = -1; // length not known - - return $o; - } - - function _seek($row) - { - if (sizeof($this->_array) && 0 <= $row && $row < $this->_numOfRows) { - $this->_currentRow = $row; - if ($this->_skiprow1) $row += 1; - $this->fields = $this->_array[$row]; - return true; - } - return false; - } - - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - - $pos = $this->_currentRow; - - if ($this->_numOfRows <= $pos) { - if (!$this->compat) $this->fields = false; - } else { - if ($this->_skiprow1) $pos += 1; - $this->fields = $this->_array[$pos]; - return true; - } - $this->EOF = true; - } - - return false; - } - - function _fetch() - { - $pos = $this->_currentRow; - - if ($this->_numOfRows <= $pos) { - if (!$this->compat) $this->fields = false; - return false; - } - if ($this->_skiprow1) $pos += 1; - $this->fields = $this->_array[$pos]; - return true; - } - - function _close() - { - return true; - } - - } // ADORecordSet_array - - //============================================================================================== - // HELPER FUNCTIONS - //============================================================================================== - - /** - * Synonym for ADOLoadCode. Private function. Do not use. - * - * @deprecated - */ - function ADOLoadDB($dbType) - { - return ADOLoadCode($dbType); - } - - /** - * Load the code for a specific database driver. Private function. Do not use. - */ - function ADOLoadCode($dbType) - { - global $ADODB_LASTDB; - - if (!$dbType) return false; - $db = strtolower($dbType); - switch ($db) { - case 'ado': - if (PHP_VERSION >= 5) $db = 'ado5'; - $class = 'ado'; - break; - case 'ifx': - case 'maxsql': $class = $db = 'mysqlt'; break; - case 'postgres': - case 'postgres8': - case 'pgsql': $class = $db = 'postgres7'; break; - default: - $class = $db; break; - } - - $file = ADODB_DIR."/drivers/adodb-".$db.".inc.php"; - @include_once($file); - $ADODB_LASTDB = $class; - if (class_exists("ADODB_" . $class)) return $class; - - //ADOConnection::outp(adodb_pr(get_declared_classes(),true)); - if (!file_exists($file)) ADOConnection::outp("Missing file: $file"); - else ADOConnection::outp("Syntax error in file: $file"); - return false; - } - - /** - * synonym for ADONewConnection for people like me who cannot remember the correct name - */ - function &NewADOConnection($db='') - { - $tmp =& ADONewConnection($db); - return $tmp; - } - - /** - * Instantiate a new Connection class for a specific database driver. - * - * @param [db] is the database Connection object to create. If undefined, - * use the last database driver that was loaded by ADOLoadCode(). - * - * @return the freshly created instance of the Connection class. - */ - function &ADONewConnection($db='') - { - GLOBAL $ADODB_NEWCONNECTION, $ADODB_LASTDB; - - if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); - $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; - $false = false; - if ($at = strpos($db,'://')) { - $origdsn = $db; - if (PHP_VERSION < 5) $dsna = @parse_url($db); - else { - $fakedsn = 'fake'.substr($db,$at); - $dsna = @parse_url($fakedsn); - $dsna['scheme'] = substr($db,0,$at); - - if (strncmp($db,'pdo',3) == 0) { - $sch = explode('_',$dsna['scheme']); - if (sizeof($sch)>1) { - $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; - $dsna['host'] = rawurlencode($sch[1].':host='.rawurldecode($dsna['host'])); - $dsna['scheme'] = 'pdo'; - } - } - } - - if (!$dsna) { - // special handling of oracle, which might not have host - $db = str_replace('@/','@adodb-fakehost/',$db); - $dsna = parse_url($db); - if (!$dsna) return $false; - $dsna['host'] = ''; - } - $db = @$dsna['scheme']; - if (!$db) return $false; - $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; - $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; - $dsna['pass'] = isset($dsna['pass']) ? rawurldecode($dsna['pass']) : ''; - $dsna['path'] = isset($dsna['path']) ? rawurldecode(substr($dsna['path'],1)) : ''; # strip off initial / - - if (isset($dsna['query'])) { - $opt1 = explode('&',$dsna['query']); - foreach($opt1 as $k => $v) { - $arr = explode('=',$v); - $opt[$arr[0]] = isset($arr[1]) ? rawurldecode($arr[1]) : 1; - } - } else $opt = array(); - } - /* - * phptype: Database backend used in PHP (mysql, odbc etc.) - * dbsyntax: Database used with regards to SQL syntax etc. - * protocol: Communication protocol to use (tcp, unix etc.) - * hostspec: Host specification (hostname[:port]) - * database: Database to use on the DBMS server - * username: User name for login - * password: Password for login - */ - if (!empty($ADODB_NEWCONNECTION)) { - $obj = $ADODB_NEWCONNECTION($db); - - } else { - - if (!isset($ADODB_LASTDB)) $ADODB_LASTDB = ''; - if (empty($db)) $db = $ADODB_LASTDB; - - if ($db != $ADODB_LASTDB) $db = ADOLoadCode($db); - - if (!$db) { - if (isset($origdsn)) $db = $origdsn; - if ($errorfn) { - // raise an error - $ignore = false; - $errorfn('ADONewConnection', 'ADONewConnection', -998, - "could not load the database driver for '$db'", - $db,false,$ignore); - } else - ADOConnection::outp( "

    ADONewConnection: Unable to load database driver '$db'

    ",false); - - return $false; - } - - $cls = 'ADODB_'.$db; - if (!class_exists($cls)) { - adodb_backtrace(); - return $false; - } - - $obj = new $cls(); - } - - # constructor should not fail - if ($obj) { - if ($errorfn) $obj->raiseErrorFn = $errorfn; - if (isset($dsna)) { - if (isset($dsna['port'])) $obj->port = $dsna['port']; - foreach($opt as $k => $v) { - switch(strtolower($k)) { - case 'new': - $nconnect = true; $persist = true; break; - case 'persist': - case 'persistent': $persist = $v; break; - case 'debug': $obj->debug = (integer) $v; break; - #ibase - case 'role': $obj->role = $v; break; - case 'dialect': $obj->dialect = (integer) $v; break; - case 'charset': $obj->charset = $v; $obj->charSet=$v; break; - case 'buffers': $obj->buffers = $v; break; - case 'fetchmode': $obj->SetFetchMode($v); break; - #ado - case 'charpage': $obj->charPage = $v; break; - #mysql, mysqli - case 'clientflags': $obj->clientFlags = $v; break; - #mysql, mysqli, postgres - case 'port': $obj->port = $v; break; - #mysqli - case 'socket': $obj->socket = $v; break; - #oci8 - case 'nls_date_format': $obj->NLS_DATE_FORMAT = $v; break; - } - } - if (empty($persist)) - $ok = $obj->Connect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - else if (empty($nconnect)) - $ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - else - $ok = $obj->NConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); - - if (!$ok) return $false; - } - } - return $obj; - } - - - - // $perf == true means called by NewPerfMonitor(), otherwise for data dictionary - function _adodb_getdriver($provider,$drivername,$perf=false) - { - switch ($provider) { - case 'odbtp': if (strncmp('odbtp_',$drivername,6)==0) return substr($drivername,6); - case 'odbc' : if (strncmp('odbc_',$drivername,5)==0) return substr($drivername,5); - case 'ado' : if (strncmp('ado_',$drivername,4)==0) return substr($drivername,4); - case 'native': break; - default: - return $provider; - } - - switch($drivername) { - case 'mysqlt': - case 'mysqli': - $drivername='mysql'; - break; - case 'postgres7': - case 'postgres8': - $drivername = 'postgres'; - break; - case 'firebird15': $drivername = 'firebird'; break; - case 'oracle': $drivername = 'oci8'; break; - case 'access': if ($perf) $drivername = ''; break; - case 'db2' : break; - case 'sapdb' : break; - default: - $drivername = 'generic'; - break; - } - return $drivername; - } - - function &NewPerfMonitor(&$conn) - { - $false = false; - $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true); - if (!$drivername || $drivername == 'generic') return $false; - include_once(ADODB_DIR.'/adodb-perf.inc.php'); - @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php"); - $class = "Perf_$drivername"; - if (!class_exists($class)) return $false; - $perf = new $class($conn); - - return $perf; - } - - function &NewDataDictionary(&$conn,$drivername=false) - { - $false = false; - if (!$drivername) $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType); - - include_once(ADODB_DIR.'/adodb-lib.inc.php'); - include_once(ADODB_DIR.'/adodb-datadict.inc.php'); - $path = ADODB_DIR."/datadict/datadict-$drivername.inc.php"; - - if (!file_exists($path)) { - ADOConnection::outp("Dictionary driver '$path' not available"); - return $false; - } - include_once($path); - $class = "ADODB2_$drivername"; - $dict = new $class(); - $dict->dataProvider = $conn->dataProvider; - $dict->connection = &$conn; - $dict->upperName = strtoupper($drivername); - $dict->quote = $conn->nameQuote; - if (!empty($conn->_connectionID)) - $dict->serverInfo = $conn->ServerInfo(); - - return $dict; - } - - - - /* - Perform a print_r, with pre tags for better formatting. - */ - function adodb_pr($var,$as_string=false) - { - if ($as_string) ob_start(); - - if (isset($_SERVER['HTTP_USER_AGENT'])) { - echo "
    \n";print_r($var);echo "
    \n"; - } else - print_r($var); - - if ($as_string) { - $s = ob_get_contents(); - ob_end_clean(); - return $s; - } - } - - /* - Perform a stack-crawl and pretty print it. - - @param printOrArr Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then). - @param levels Number of levels to display - */ - function adodb_backtrace($printOrArr=true,$levels=9999) - { - global $ADODB_INCLUDED_LIB; - if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); - return _adodb_backtrace($printOrArr,$levels); - } - - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/all-wcprops deleted file mode 100755 index a9acabfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/contrib -END -toxmlrpc.inc.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/contrib/toxmlrpc.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/entries deleted file mode 100755 index 0492256d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/contrib -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -toxmlrpc.inc.php -file - - - - -2008-02-29T14:57:54.129391Z -4c4075cabe540650f9cbcfeaffceaabd -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/prop-base/toxmlrpc.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/prop-base/toxmlrpc.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/prop-base/toxmlrpc.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/text-base/toxmlrpc.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/text-base/toxmlrpc.inc.php.svn-base deleted file mode 100755 index ef49235a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/.svn/text-base/toxmlrpc.inc.php.svn-base +++ /dev/null @@ -1,183 +0,0 @@ -GetArray()) would work with: - * - ADODB_FETCH_BOTH - * - null values - */ - - /** - * Include the main libraries - */ - require_once('xmlrpc.inc'); - if (!defined('ADODB_DIR')) require_once('adodb.inc.php'); - - /** - * Builds an xmlrpc struct value out of an AdoDB recordset - */ - function rs2xmlrpcval(&$adodbrs) { - - $header =& rs2xmlrpcval_header($adodbrs); - $body =& rs2xmlrpcval_body($adodbrs); - - // put it all together and build final xmlrpc struct - $xmlrpcrs =& new xmlrpcval ( array( - "header" => $header, - "body" => $body, - ), "struct"); - - return $xmlrpcrs; - - } - - /** - * Builds an xmlrpc struct value describing an AdoDB recordset - */ - function rs2xmlrpcval_header($adodbrs) - { - $numfields = $adodbrs->FieldCount(); - $numrecords = $adodbrs->RecordCount(); - - // build structure holding recordset information - $fieldstruct = array(); - for ($i = 0; $i < $numfields; $i++) { - $fld = $adodbrs->FetchField($i); - $fieldarray = array(); - if (isset($fld->name)) - $fieldarray["name"] =& new xmlrpcval ($fld->name); - if (isset($fld->type)) - $fieldarray["type"] =& new xmlrpcval ($fld->type); - if (isset($fld->max_length)) - $fieldarray["max_length"] =& new xmlrpcval ($fld->max_length, "int"); - if (isset($fld->not_null)) - $fieldarray["not_null"] =& new xmlrpcval ($fld->not_null, "boolean"); - if (isset($fld->has_default)) - $fieldarray["has_default"] =& new xmlrpcval ($fld->has_default, "boolean"); - if (isset($fld->default_value)) - $fieldarray["default_value"] =& new xmlrpcval ($fld->default_value); - $fieldstruct[$i] =& new xmlrpcval ($fieldarray, "struct"); - } - $fieldcount =& new xmlrpcval ($numfields, "int"); - $recordcount =& new xmlrpcval ($numrecords, "int"); - $sql =& new xmlrpcval ($adodbrs->sql); - $fieldinfo =& new xmlrpcval ($fieldstruct, "array"); - - $header =& new xmlrpcval ( array( - "fieldcount" => $fieldcount, - "recordcount" => $recordcount, - "sql" => $sql, - "fieldinfo" => $fieldinfo - ), "struct"); - - return $header; - } - - /** - * Builds an xmlrpc struct value out of an AdoDB recordset - * (data values only, no data definition) - */ - function rs2xmlrpcval_body($adodbrs) - { - $numfields = $adodbrs->FieldCount(); - - // build structure containing recordset data - $adodbrs->MoveFirst(); - $rows = array(); - while (!$adodbrs->EOF) { - $columns = array(); - // This should work on all cases of fetch mode: assoc, num, both or default - if ($adodbrs->fetchMode == 'ADODB_FETCH_BOTH' || count($adodbrs->fields) == 2 * $adodbrs->FieldCount()) - for ($i = 0; $i < $numfields; $i++) - if ($adodbrs->fields[$i] === null) - $columns[$i] =& new xmlrpcval (''); - else - $columns[$i] =& xmlrpc_encode ($adodbrs->fields[$i]); - else - foreach ($adodbrs->fields as $val) - if ($val === null) - $columns[] =& new xmlrpcval (''); - else - $columns[] =& xmlrpc_encode ($val); - - $rows[] =& new xmlrpcval ($columns, "array"); - - $adodbrs->MoveNext(); - } - $body =& new xmlrpcval ($rows, "array"); - - return $body; - } - - /** - * Returns an xmlrpc struct value as string out of an AdoDB recordset - */ - function rs2xmlrpcstring (&$adodbrs) { - $xmlrpc = rs2xmlrpcval ($adodbrs); - if ($xmlrpc) - return $xmlrpc->serialize(); - else - return null; - } - - /** - * Given a well-formed xmlrpc struct object returns an AdoDB object - * - * @todo add some error checking on the input value - */ - function xmlrpcval2rs (&$xmlrpcval) { - - $fields_array = array(); - $data_array = array(); - - // rebuild column information - $header =& $xmlrpcval->structmem('header'); - - $numfields = $header->structmem('fieldcount'); - $numfields = $numfields->scalarval(); - $numrecords = $header->structmem('recordcount'); - $numrecords = $numrecords->scalarval(); - $sqlstring = $header->structmem('sql'); - $sqlstring = $sqlstring->scalarval(); - - $fieldinfo =& $header->structmem('fieldinfo'); - for ($i = 0; $i < $numfields; $i++) { - $temp =& $fieldinfo->arraymem($i); - $fld =& new ADOFieldObject(); - while (list($key,$value) = $temp->structeach()) { - if ($key == "name") $fld->name = $value->scalarval(); - if ($key == "type") $fld->type = $value->scalarval(); - if ($key == "max_length") $fld->max_length = $value->scalarval(); - if ($key == "not_null") $fld->not_null = $value->scalarval(); - if ($key == "has_default") $fld->has_default = $value->scalarval(); - if ($key == "default_value") $fld->default_value = $value->scalarval(); - } // while - $fields_array[] = $fld; - } // for - - // fetch recordset information into php array - $body =& $xmlrpcval->structmem('body'); - for ($i = 0; $i < $numrecords; $i++) { - $data_array[$i]= array(); - $xmlrpcrs_row =& $body->arraymem($i); - for ($j = 0; $j < $numfields; $j++) { - $temp =& $xmlrpcrs_row->arraymem($j); - $data_array[$i][$j] = $temp->scalarval(); - } // for j - } // for i - - // finally build in-memory recordset object and return it - $rs =& new ADORecordSet_array(); - $rs->InitArrayFields($data_array,$fields_array); - return $rs; - - } - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/toxmlrpc.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/toxmlrpc.inc.php deleted file mode 100755 index 41dc9df2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/contrib/toxmlrpc.inc.php +++ /dev/null @@ -1,183 +0,0 @@ -GetArray()) would work with: - * - ADODB_FETCH_BOTH - * - null values - */ - - /** - * Include the main libraries - */ - require_once('xmlrpc.inc'); - if (!defined('ADODB_DIR')) require_once('adodb.inc.php'); - - /** - * Builds an xmlrpc struct value out of an AdoDB recordset - */ - function rs2xmlrpcval(&$adodbrs) { - - $header =& rs2xmlrpcval_header($adodbrs); - $body =& rs2xmlrpcval_body($adodbrs); - - // put it all together and build final xmlrpc struct - $xmlrpcrs =& new xmlrpcval ( array( - "header" => $header, - "body" => $body, - ), "struct"); - - return $xmlrpcrs; - - } - - /** - * Builds an xmlrpc struct value describing an AdoDB recordset - */ - function rs2xmlrpcval_header($adodbrs) - { - $numfields = $adodbrs->FieldCount(); - $numrecords = $adodbrs->RecordCount(); - - // build structure holding recordset information - $fieldstruct = array(); - for ($i = 0; $i < $numfields; $i++) { - $fld = $adodbrs->FetchField($i); - $fieldarray = array(); - if (isset($fld->name)) - $fieldarray["name"] =& new xmlrpcval ($fld->name); - if (isset($fld->type)) - $fieldarray["type"] =& new xmlrpcval ($fld->type); - if (isset($fld->max_length)) - $fieldarray["max_length"] =& new xmlrpcval ($fld->max_length, "int"); - if (isset($fld->not_null)) - $fieldarray["not_null"] =& new xmlrpcval ($fld->not_null, "boolean"); - if (isset($fld->has_default)) - $fieldarray["has_default"] =& new xmlrpcval ($fld->has_default, "boolean"); - if (isset($fld->default_value)) - $fieldarray["default_value"] =& new xmlrpcval ($fld->default_value); - $fieldstruct[$i] =& new xmlrpcval ($fieldarray, "struct"); - } - $fieldcount =& new xmlrpcval ($numfields, "int"); - $recordcount =& new xmlrpcval ($numrecords, "int"); - $sql =& new xmlrpcval ($adodbrs->sql); - $fieldinfo =& new xmlrpcval ($fieldstruct, "array"); - - $header =& new xmlrpcval ( array( - "fieldcount" => $fieldcount, - "recordcount" => $recordcount, - "sql" => $sql, - "fieldinfo" => $fieldinfo - ), "struct"); - - return $header; - } - - /** - * Builds an xmlrpc struct value out of an AdoDB recordset - * (data values only, no data definition) - */ - function rs2xmlrpcval_body($adodbrs) - { - $numfields = $adodbrs->FieldCount(); - - // build structure containing recordset data - $adodbrs->MoveFirst(); - $rows = array(); - while (!$adodbrs->EOF) { - $columns = array(); - // This should work on all cases of fetch mode: assoc, num, both or default - if ($adodbrs->fetchMode == 'ADODB_FETCH_BOTH' || count($adodbrs->fields) == 2 * $adodbrs->FieldCount()) - for ($i = 0; $i < $numfields; $i++) - if ($adodbrs->fields[$i] === null) - $columns[$i] =& new xmlrpcval (''); - else - $columns[$i] =& xmlrpc_encode ($adodbrs->fields[$i]); - else - foreach ($adodbrs->fields as $val) - if ($val === null) - $columns[] =& new xmlrpcval (''); - else - $columns[] =& xmlrpc_encode ($val); - - $rows[] =& new xmlrpcval ($columns, "array"); - - $adodbrs->MoveNext(); - } - $body =& new xmlrpcval ($rows, "array"); - - return $body; - } - - /** - * Returns an xmlrpc struct value as string out of an AdoDB recordset - */ - function rs2xmlrpcstring (&$adodbrs) { - $xmlrpc = rs2xmlrpcval ($adodbrs); - if ($xmlrpc) - return $xmlrpc->serialize(); - else - return null; - } - - /** - * Given a well-formed xmlrpc struct object returns an AdoDB object - * - * @todo add some error checking on the input value - */ - function xmlrpcval2rs (&$xmlrpcval) { - - $fields_array = array(); - $data_array = array(); - - // rebuild column information - $header =& $xmlrpcval->structmem('header'); - - $numfields = $header->structmem('fieldcount'); - $numfields = $numfields->scalarval(); - $numrecords = $header->structmem('recordcount'); - $numrecords = $numrecords->scalarval(); - $sqlstring = $header->structmem('sql'); - $sqlstring = $sqlstring->scalarval(); - - $fieldinfo =& $header->structmem('fieldinfo'); - for ($i = 0; $i < $numfields; $i++) { - $temp =& $fieldinfo->arraymem($i); - $fld =& new ADOFieldObject(); - while (list($key,$value) = $temp->structeach()) { - if ($key == "name") $fld->name = $value->scalarval(); - if ($key == "type") $fld->type = $value->scalarval(); - if ($key == "max_length") $fld->max_length = $value->scalarval(); - if ($key == "not_null") $fld->not_null = $value->scalarval(); - if ($key == "has_default") $fld->has_default = $value->scalarval(); - if ($key == "default_value") $fld->default_value = $value->scalarval(); - } // while - $fields_array[] = $fld; - } // for - - // fetch recordset information into php array - $body =& $xmlrpcval->structmem('body'); - for ($i = 0; $i < $numrecords; $i++) { - $data_array[$i]= array(); - $xmlrpcrs_row =& $body->arraymem($i); - for ($j = 0; $j < $numfields; $j++) { - $temp =& $xmlrpcrs_row->arraymem($j); - $data_array[$i][$j] = $temp->scalarval(); - } // for j - } // for i - - // finally build in-memory recordset object and return it - $rs =& new ADORecordSet_array(); - $rs->InitArrayFields($data_array,$fields_array); - return $rs; - - } - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/all-wcprops deleted file mode 100755 index dedd7175..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/cute_icons_for_site -END -adodb2.gif -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/cute_icons_for_site/adodb2.gif -END -adodb.gif -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/cute_icons_for_site/adodb.gif -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/entries deleted file mode 100755 index 023b8b13..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/entries +++ /dev/null @@ -1,54 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/cute_icons_for_site -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2005-07-07T18:03:06.000000Z -240 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -adodb2.gif -file - - - - -2008-02-29T14:57:53.567049Z -f5405fa66aa4da4f6507c9356581b539 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb.gif -file - - - - -2008-02-29T14:57:53.582670Z -943052b5ea2b4188ca4453f9b62cebae -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb2.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb2.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/prop-base/adodb2.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb.gif.svn-base deleted file mode 100755 index c5e8dfc6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb2.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb2.gif.svn-base deleted file mode 100755 index f12ae203..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/.svn/text-base/adodb2.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb.gif deleted file mode 100755 index c5e8dfc6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb2.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb2.gif deleted file mode 100755 index f12ae203..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/cute_icons_for_site/adodb2.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/all-wcprops deleted file mode 100755 index c1b33563..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/all-wcprops +++ /dev/null @@ -1,77 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/datadict -END -datadict-firebird.inc.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-firebird.inc.php -END -datadict-postgres.inc.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-postgres.inc.php -END -datadict-sybase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-sybase.inc.php -END -datadict-db2.inc.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-db2.inc.php -END -datadict-sapdb.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/datadict/datadict-sapdb.inc.php -END -datadict-informix.inc.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-informix.inc.php -END -datadict-generic.inc.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-generic.inc.php -END -datadict-mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-mssql.inc.php -END -datadict-access.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-access.inc.php -END -datadict-oci8.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-oci8.inc.php -END -datadict-ibase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-ibase.inc.php -END -datadict-mysql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/datadict/datadict-mysql.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/entries deleted file mode 100755 index eeff149b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/entries +++ /dev/null @@ -1,184 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/datadict -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T11:01:00.000000Z -351 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -datadict-firebird.inc.php -file - - - - -2008-02-29T14:57:52.411125Z -a36153e1072006092a03ea79bac18776 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-postgres.inc.php -file - - - - -2008-02-29T14:57:52.411125Z -828a01406405a6af48af2e97bc428c18 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-sybase.inc.php -file - - - - -2008-02-29T14:57:52.426745Z -ac807d2292225b682deac038ddbcafba -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-db2.inc.php -file - - - - -2008-02-29T14:57:52.426745Z -e0ffd0062b67b155ddf833b60f5b0c21 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-sapdb.inc.php -file - - - - -2008-02-29T14:57:52.442366Z -aa27991b8e04d2ae304ee563de817445 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -datadict-informix.inc.php -file - - - - -2008-02-29T14:57:52.442366Z -6f7d34c8622b885e72626d03608995e1 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-generic.inc.php -file - - - - -2008-02-29T14:57:52.457987Z -a3c445a105c24998e6fc3a24114763e7 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-mssql.inc.php -file - - - - -2008-02-29T14:57:52.457987Z -2ec27b01a2b38540f2b9f39e89dad4f9 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-access.inc.php -file - - - - -2008-02-29T14:57:52.473607Z -b39a1803a39091803e5ccebfcf40702d -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-oci8.inc.php -file - - - - -2008-02-29T14:57:52.473607Z -efa80ead3e2d00d60b07704fc467c4f5 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-ibase.inc.php -file - - - - -2008-02-29T14:57:52.489228Z -4f0b8592fde9db986b0fb54324ab2a90 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -datadict-mysql.inc.php -file - - - - -2008-02-29T14:57:52.504848Z -09a5b2e14b71251184b270448472d758 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-access.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-access.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-db2.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-db2.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-firebird.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-firebird.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-firebird.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-generic.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-generic.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-generic.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-ibase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-ibase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-informix.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-informix.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mysql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-mysql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-oci8.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-oci8.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-postgres.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-postgres.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sapdb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sapdb.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sapdb.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sybase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sybase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/prop-base/datadict-sybase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-access.inc.php.svn-base deleted file mode 100755 index 4b62eb84..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-access.inc.php.svn-base +++ /dev/null @@ -1,95 +0,0 @@ -debug) ADOConnection::outp("Warning: Access does not supported DEFAULT values (field $fname)"); - } - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function CreateDatabase($dbname,$options=false) - { - return array(); - } - - - function SetSchema($schema) - { - } - - function AlterColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-db2.inc.php.svn-base deleted file mode 100755 index 21191b35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-db2.inc.php.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - - - function ChangeTableSQL($tablename, $flds, $tableoptions = false) - { - - /** - Allow basic table changes to DB2 databases - DB2 will fatally reject changes to non character columns - - */ - - $validTypes = array("CHAR","VARC"); - $invalidTypes = array("BIGI","BLOB","CLOB","DATE", "DECI","DOUB", "INTE", "REAL","SMAL", "TIME"); - // check table exists - $cols = &$this->MetaColumns($tablename); - if ( empty($cols)) { - return $this->CreateTableSQL($tablename, $flds, $tableoptions); - } - - // already exists, alter table instead - list($lines,$pkey) = $this->_GenFields($flds); - $alter = 'ALTER TABLE ' . $this->TableName($tablename); - $sql = array(); - - foreach ( $lines as $id => $v ) { - if ( isset($cols[$id]) && is_object($cols[$id]) ) { - /** - If the first field of $v is the fieldname, and - the second is the field type/size, we assume its an - attempt to modify the column size, so check that it is allowed - $v can have an indeterminate number of blanks between the - fields, so account for that too - */ - $vargs = explode(' ' , $v); - // assume that $vargs[0] is the field name. - $i=0; - // Find the next non-blank value; - for ($i=1;$ialterCol . ' ' . $v; - } else { - $sql[] = $alter . $this->addCol . ' ' . $v; - } - } - - return $sql; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-firebird.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-firebird.inc.php.svn-base deleted file mode 100755 index 6598d95a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-firebird.inc.php.svn-base +++ /dev/null @@ -1,151 +0,0 @@ -connection) ) { - return $name; - } - - $quote = $this->connection->nameQuote; - - // if name is of the form `name`, quote it - if ( preg_match('/^`(.+)`$/', $name, $matches) ) { - return $quote . $matches[1] . $quote; - } - - // if name contains special characters, quote it - if ( !preg_match('/^[' . $this->nameRegex . ']+$/', $name) ) { - return $quote . $name . $quote; - } - - return $quote . $name . $quote; - } - - function CreateDatabase($dbname, $options=false) - { - $options = $this->_Options($options); - $sql = array(); - - $sql[] = "DECLARE EXTERNAL FUNCTION LOWER CSTRING(80) RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf'"; - - return $sql; - } - - function _DropAutoIncrement($t) - { - if (strpos($t,'.') !== false) { - $tarr = explode('.',$t); - return 'DROP GENERATOR '.$tarr[0].'."gen_'.$tarr[1].'"'; - } - return 'DROP GENERATOR "GEN_'.$t; - } - - - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fautoinc) $this->seqField = $fname; - if ($fconstraint) $suffix .= ' '.$fconstraint; - - return $suffix; - } - -/* -CREATE or replace TRIGGER jaddress_insert -before insert on jaddress -for each row -begin -IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN - NEW."seqField" = GEN_ID("GEN_tabname", 1); -end; -*/ - function _Triggers($tabname,$tableoptions) - { - if (!$this->seqField) return array(); - - $tab1 = preg_replace( '/"/', '', $tabname ); - if ($this->schema) { - $t = strpos($tab1,'.'); - if ($t !== false) $tab = substr($tab1,$t+1); - else $tab = $tab1; - $seqField = $this->seqField; - $seqname = $this->schema.'.'.$this->seqPrefix.$tab; - $trigname = $this->schema.'.trig_'.$this->seqPrefix.$tab; - } else { - $seqField = $this->seqField; - $seqname = $this->seqPrefix.$tab1; - $trigname = 'trig_'.$seqname; - } - if (isset($tableoptions['REPLACE'])) - { $sql[] = "DROP GENERATOR \"$seqname\""; - $sql[] = "CREATE GENERATOR \"$seqname\""; - $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END"; - } - else - { $sql[] = "CREATE GENERATOR \"$seqname\""; - $sql[] = "CREATE TRIGGER \"$trigname\" FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END"; - } - - $this->seqField = false; - return $sql; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-generic.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-generic.inc.php.svn-base deleted file mode 100755 index fc5ba768..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-generic.inc.php.svn-base +++ /dev/null @@ -1,125 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - -/* -//db2 - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'X': return 'VARCHAR'; - - case 'C2': return 'VARCHAR'; // up to 32K - case 'X2': return 'VARCHAR'; - - case 'B': return 'BLOB'; - - case 'D': return 'DATE'; - case 'T': return 'TIMESTAMP'; - - case 'L': return 'SMALLINT'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INTEGER'; - case 'I8': return 'BIGINT'; - - case 'F': return 'DOUBLE'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } - -// ifx -function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR';// 255 - case 'X': return 'TEXT'; - - case 'C2': return 'NVARCHAR'; - case 'X2': return 'TEXT'; - - case 'B': return 'BLOB'; - - case 'D': return 'DATE'; - case 'T': return 'DATETIME'; - - case 'L': return 'SMALLINT'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INTEGER'; - case 'I8': return 'DECIMAL(20)'; - - case 'F': return 'FLOAT'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } -*/ -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-ibase.inc.php.svn-base deleted file mode 100755 index 163ba81d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-ibase.inc.php.svn-base +++ /dev/null @@ -1,67 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-informix.inc.php.svn-base deleted file mode 100755 index 879813be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-informix.inc.php.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - - // return string must begin with space - function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint) - { - if ($fautoinc) { - $ftype = 'SERIAL'; - return ''; - } - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mssql.inc.php.svn-base deleted file mode 100755 index 5737c27a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mssql.inc.php.svn-base +++ /dev/null @@ -1,282 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'R': - case 'INT': - case 'INTEGER': return 'I'; - case 'BIT': - case 'TINYINT': return 'I1'; - case 'SMALLINT': return 'I2'; - case 'BIGINT': return 'I8'; - - case 'REAL': - case 'FLOAT': return 'F'; - default: return parent::MetaType($t,$len,$fieldobj); - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - - case 'C': return 'VARCHAR'; - case 'XL': return (isset($this)) ? $this->typeXL : 'TEXT'; - case 'X': return (isset($this)) ? $this->typeX : 'TEXT'; ## could be varchar(8000), but we want compat with oracle - case 'C2': return 'NVARCHAR'; - case 'X2': return 'NTEXT'; - - case 'B': return 'IMAGE'; - - case 'D': return 'DATETIME'; - case 'T': return 'DATETIME'; - case 'L': return 'BIT'; - - case 'R': - case 'I': return 'INT'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'REAL'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname $this->addCol"; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - /* - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - foreach($lines as $v) { - $sql[] = "ALTER TABLE $tabname $this->alterCol $v"; - } - - return $sql; - } - */ - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) - $flds = explode(',',$flds); - $f = array(); - $s = 'ALTER TABLE ' . $tabname; - foreach($flds as $v) { - $f[] = "\n$this->dropCol ".$this->NameQuote($v); - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' IDENTITY(1,1)'; - if ($fnotnull) $suffix .= ' NOT NULL'; - else if ($suffix == '') $suffix .= ' NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* -CREATE TABLE - [ database_name.[ owner ] . | owner. ] table_name - ( { < column_definition > - | column_name AS computed_column_expression - | < table_constraint > ::= [ CONSTRAINT constraint_name ] } - - | [ { PRIMARY KEY | UNIQUE } [ ,...n ] - ) - -[ ON { filegroup | DEFAULT } ] -[ TEXTIMAGE_ON { filegroup | DEFAULT } ] - -< column_definition > ::= { column_name data_type } - [ COLLATE < collation_name > ] - [ [ DEFAULT constant_expression ] - | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ] - ] - [ ROWGUIDCOL] - [ < column_constraint > ] [ ...n ] - -< column_constraint > ::= [ CONSTRAINT constraint_name ] - { [ NULL | NOT NULL ] - | [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - [ WITH FILLFACTOR = fillfactor ] - [ON {filegroup | DEFAULT} ] ] - ] - | [ [ FOREIGN KEY ] - REFERENCES ref_table [ ( ref_column ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - ] - | CHECK [ NOT FOR REPLICATION ] - ( logical_expression ) - } - -< table_constraint > ::= [ CONSTRAINT constraint_name ] - { [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - { ( column [ ASC | DESC ] [ ,...n ] ) } - [ WITH FILLFACTOR = fillfactor ] - [ ON { filegroup | DEFAULT } ] - ] - | FOREIGN KEY - [ ( column [ ,...n ] ) ] - REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - | CHECK [ NOT FOR REPLICATION ] - ( search_conditions ) - } - - - */ - - /* - CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name - ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) - [ WITH < index_option > [ ,...n] ] - [ ON filegroup ] - < index_option > :: = - { PAD_INDEX | - FILLFACTOR = fillfactor | - IGNORE_DUP_KEY | - DROP_EXISTING | - STATISTICS_NORECOMPUTE | - SORT_IN_TEMPDB - } -*/ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : ''; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - - $sql[] = $s; - - return $sql; - } - - - function _GetSize($ftype, $ty, $fsize, $fprec) - { - switch ($ftype) { - case 'INT': - case 'SMALLINT': - case 'TINYINT': - case 'BIGINT': - return $ftype; - } - if ($ty == 'T') return $ftype; - return parent::_GetSize($ftype, $ty, $fsize, $fprec); - - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mysql.inc.php.svn-base deleted file mode 100755 index a4af25ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-mysql.inc.php.svn-base +++ /dev/null @@ -1,181 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment; - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'YEAR': - case 'DATE': return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': return 'T'; - - case 'FLOAT': - case 'DOUBLE': - return 'F'; - - case 'INT': - case 'INTEGER': return $is_serial ? 'R' : 'I'; - case 'TINYINT': return $is_serial ? 'R' : 'I1'; - case 'SMALLINT': return $is_serial ? 'R' : 'I2'; - case 'MEDIUMINT': return $is_serial ? 'R' : 'I4'; - case 'BIGINT': return $is_serial ? 'R' : 'I8'; - default: return 'N'; - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - case 'C': return 'VARCHAR'; - case 'XL':return 'LONGTEXT'; - case 'X': return 'TEXT'; - - case 'C2': return 'VARCHAR'; - case 'X2': return 'LONGTEXT'; - - case 'B': return 'LONGBLOB'; - - case 'D': return 'DATE'; - case 'T': return 'DATETIME'; - case 'L': return 'TINYINT'; - - case 'R': - case 'I4': - case 'I': return 'INTEGER'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'DOUBLE'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - if ($funsigned) $suffix .= ' UNSIGNED'; - if ($fnotnull) $suffix .= ' NOT NULL'; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' AUTO_INCREMENT'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* - CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] - [table_options] [select_statement] - create_definition: - col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] - [PRIMARY KEY] [reference_definition] - or PRIMARY KEY (index_col_name,...) - or KEY [index_name] (index_col_name,...) - or INDEX [index_name] (index_col_name,...) - or UNIQUE [INDEX] [index_name] (index_col_name,...) - or FULLTEXT [INDEX] [index_name] (index_col_name,...) - or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) - [reference_definition] - or CHECK (expr) - */ - - /* - CREATE [UNIQUE|FULLTEXT] INDEX index_name - ON tbl_name (col_name[(length)],... ) - */ - - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - if ($this->alterTableAddIndex) $sql[] = "ALTER TABLE $tabname DROP INDEX $idxname"; - else $sql[] = sprintf($this->dropIndex, $idxname, $tabname); - - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - if (isset($idxoptions['FULLTEXT'])) { - $unique = ' FULLTEXT'; - } elseif (isset($idxoptions['UNIQUE'])) { - $unique = ' UNIQUE'; - } else { - $unique = ''; - } - - if ( is_array($flds) ) $flds = implode(', ',$flds); - - if ($this->alterTableAddIndex) $s = "ALTER TABLE $tabname ADD $unique INDEX $idxname "; - else $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname; - - $s .= ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - $sql[] = $s; - - return $sql; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-oci8.inc.php.svn-base deleted file mode 100755 index 238fab47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-oci8.inc.php.svn-base +++ /dev/null @@ -1,290 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - if (isset($this) && $len <= $this->blobSize) return 'C'; - return 'X'; - - case 'NCHAR': - case 'NVARCHAR2': - case 'NVARCHAR': - if (isset($this) && $len <= $this->blobSize) return 'C2'; - return 'X2'; - - case 'NCLOB': - case 'CLOB': - return 'XL'; - - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': - return 'T'; - - case 'INT': - case 'SMALLINT': - case 'INTEGER': - return 'I'; - - default: - return 'N'; - } - } - - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'X': return $this->typeX; - case 'XL': return $this->typeXL; - - case 'C2': return 'NVARCHAR2'; - case 'X2': return 'NVARCHAR2(4000)'; - - case 'B': return 'BLOB'; - - case 'D': - case 'T': return 'DATE'; - case 'L': return 'DECIMAL(1)'; - case 'I1': return 'DECIMAL(3)'; - case 'I2': return 'DECIMAL(5)'; - case 'I': - case 'I4': return 'DECIMAL(10)'; - - case 'I8': return 'DECIMAL(20)'; - case 'F': return 'DECIMAL'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } - - function CreateDatabase($dbname, $options=false) - { - $options = $this->_Options($options); - $password = isset($options['PASSWORD']) ? $options['PASSWORD'] : 'tiger'; - $tablespace = isset($options["TABLESPACE"]) ? " DEFAULT TABLESPACE ".$options["TABLESPACE"] : ''; - $sql[] = "CREATE USER ".$dbname." IDENTIFIED BY ".$password.$tablespace; - $sql[] = "GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO $dbname"; - - return $sql; - } - - function AddColumnSQL($tabname, $flds) - { - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname ADD ("; - foreach($lines as $v) { - $f[] = "\n $v"; - } - - $s .= implode(', ',$f).')'; - $sql[] = $s; - return $sql; - } - - function AlterColumnSQL($tabname, $flds) - { - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname MODIFY("; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f).')'; - $sql[] = $s; - return $sql; - } - - function DropColumnSQL($tabname, $flds) - { - if (!is_array($flds)) $flds = explode(',',$flds); - foreach ($flds as $k => $v) $flds[$k] = $this->NameQuote($v); - - $sql = array(); - $s = "ALTER TABLE $tabname DROP("; - $s .= implode(', ',$flds).') CASCADE CONSTRAINTS'; - $sql[] = $s; - return $sql; - } - - function _DropAutoIncrement($t) - { - if (strpos($t,'.') !== false) { - $tarr = explode('.',$t); - return "drop sequence ".$tarr[0].".seq_".$tarr[1]; - } - return "drop sequence seq_".$t; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - - if ($fdefault == "''" && $fnotnull) {// this is null in oracle - $fnotnull = false; - if ($this->debug) ADOConnection::outp("NOT NULL and DEFAULT='' illegal in Oracle"); - } - - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - - if ($fautoinc) $this->seqField = $fname; - if ($fconstraint) $suffix .= ' '.$fconstraint; - - return $suffix; - } - -/* -CREATE or replace TRIGGER jaddress_insert -before insert on jaddress -for each row -begin -select seqaddress.nextval into :new.A_ID from dual; -end; -*/ - function _Triggers($tabname,$tableoptions) - { - if (!$this->seqField) return array(); - - if ($this->schema) { - $t = strpos($tabname,'.'); - if ($t !== false) $tab = substr($tabname,$t+1); - else $tab = $tabname; - $seqname = $this->schema.'.'.$this->seqPrefix.$tab; - $trigname = $this->schema.'.'.$this->trigPrefix.$this->seqPrefix.$tab; - } else { - $seqname = $this->seqPrefix.$tabname; - $trigname = $this->trigPrefix.$seqname; - } - - if (strlen($seqname) > 30) { - $seqname = $this->seqPrefix.uniqid(''); - } // end if - if (strlen($trigname) > 30) { - $trigname = $this->trigPrefix.uniqid(''); - } // end if - - if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname"; - $seqCache = ''; - if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];} - $seqIncr = ''; - if (isset($tableoptions['SEQUENCE_INCREMENT'])){$seqIncr = ' INCREMENT BY '.$tableoptions['SEQUENCE_INCREMENT'];} - $seqStart = ''; - if (isset($tableoptions['SEQUENCE_START'])){$seqIncr = ' START WITH '.$tableoptions['SEQUENCE_START'];} - $sql[] = "CREATE SEQUENCE $seqname $seqStart $seqIncr $seqCache"; - $sql[] = "CREATE OR REPLACE TRIGGER $trigname BEFORE insert ON $tabname FOR EACH ROW WHEN (NEW.$this->seqField IS NULL OR NEW.$this->seqField = 0) BEGIN select $seqname.nextval into :new.$this->seqField from dual; END;"; - - $this->seqField = false; - return $sql; - } - - /* - CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] - [table_options] [select_statement] - create_definition: - col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] - [PRIMARY KEY] [reference_definition] - or PRIMARY KEY (index_col_name,...) - or KEY [index_name] (index_col_name,...) - or INDEX [index_name] (index_col_name,...) - or UNIQUE [INDEX] [index_name] (index_col_name,...) - or FULLTEXT [INDEX] [index_name] (index_col_name,...) - or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) - [reference_definition] - or CHECK (expr) - */ - - - - function _IndexSQL($idxname, $tabname, $flds,$idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - if (isset($idxoptions['BITMAP'])) { - $unique = ' BITMAP'; - } elseif (isset($idxoptions['UNIQUE'])) { - $unique = ' UNIQUE'; - } else { - $unique = ''; - } - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if (isset($idxoptions['oci8'])) - $s .= $idxoptions['oci8']; - - - $sql[] = $s; - - return $sql; - } - - function GetCommentSQL($table,$col) - { - $table = $this->connection->qstr($table); - $col = $this->connection->qstr($col); - return "select comments from USER_COL_COMMENTS where TABLE_NAME=$table and COLUMN_NAME=$col"; - } - - function SetCommentSQL($table,$col,$cmt) - { - $cmt = $this->connection->qstr($cmt); - return "COMMENT ON COLUMN $table.$col IS $cmt"; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-postgres.inc.php.svn-base deleted file mode 100755 index c56d3b6e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-postgres.inc.php.svn-base +++ /dev/null @@ -1,371 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->unique && - $fieldobj->has_default && substr($fieldobj->default_value,0,8) == 'nextval('; - - switch (strtoupper($t)) { - case 'INTERVAL': - case 'CHAR': - case 'CHARACTER': - case 'VARCHAR': - case 'NAME': - case 'BPCHAR': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - return 'X'; - - case 'IMAGE': // user defined type - case 'BLOB': // user defined type - case 'BIT': // This is a bit string, not a single bit, so don't return 'L' - case 'VARBIT': - case 'BYTEA': - return 'B'; - - case 'BOOL': - case 'BOOLEAN': - return 'L'; - - case 'DATE': - return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - case 'TIMESTAMPTZ': - return 'T'; - - case 'INTEGER': return !$is_serial ? 'I' : 'R'; - case 'SMALLINT': - case 'INT2': return !$is_serial ? 'I2' : 'R'; - case 'INT4': return !$is_serial ? 'I4' : 'R'; - case 'BIGINT': - case 'INT8': return !$is_serial ? 'I8' : 'R'; - - case 'OID': - case 'SERIAL': - return 'R'; - - case 'FLOAT4': - case 'FLOAT8': - case 'DOUBLE PRECISION': - case 'REAL': - return 'F'; - - default: - return 'N'; - } - } - - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'XL': - case 'X': return 'TEXT'; - - case 'C2': return 'VARCHAR'; - case 'X2': return 'TEXT'; - - case 'B': return 'BYTEA'; - - case 'D': return 'DATE'; - case 'T': return 'TIMESTAMP'; - - case 'L': return 'BOOLEAN'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'INT2'; - case 'I4': return 'INT4'; - case 'I8': return 'INT8'; - - case 'F': return 'FLOAT8'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - /** - * Adding a new Column - * - * reimplementation of the default function as postgres does NOT allow to set the default in the same statement - * - * @param string $tabname table-name - * @param string $flds column-names and types for the changed columns - * @return array with SQL strings - */ - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; - foreach($lines as $v) { - if (($not_null = preg_match('/NOT NULL/i',$v))) { - $v = preg_replace('/NOT NULL/i','',$v); - } - if (preg_match('/^([^ ]+) .*DEFAULT ([^ ]+)/',$v,$matches)) { - list(,$colname,$default) = $matches; - $sql[] = $alter . str_replace('DEFAULT '.$default,'',$v); - $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default; - $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default; - } else { - $sql[] = $alter . $v; - } - if ($not_null) { - list($colname) = explode(' ',$v); - $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL'; - } - } - return $sql; - } - - /** - * Change the definition of one column - * - * Postgres can't do that on it's own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' - * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - if (!$tableflds) { - if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL"); - return array(); - } - return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions); - } - - /** - * Drop one column - * - * Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' - * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $has_drop_column = 7.3 <= (float) @$this->serverInfo['version']; - if (!$has_drop_column && !$tableflds) { - if ($this->debug) ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3"); - return array(); - } - if ($has_drop_column) { - return ADODB_DataDict::DropColumnSQL($tabname, $flds); - } - return $this->_recreate_copy_table($tabname,$flds,$tableflds,$tableoptions); - } - - /** - * Save the content into a temp. table, drop and recreate the original table and copy the content back in - * - * We also take care to set the values of the sequenz and recreate the indexes. - * All this is done in a transaction, to not loose the content of the table, if something went wrong! - * @internal - * @param string $tabname table-name - * @param string $dropflds column-names to drop - * @param string $tableflds complete defintion of the new table, eg. for postgres - * @param array/string $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function _recreate_copy_table($tabname,$dropflds,$tableflds,$tableoptions='') - { - if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds); - $copyflds = array(); - foreach($this->MetaColumns($tabname) as $fld) { - if (!$dropflds || !in_array($fld->name,$dropflds)) { - // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one - if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && - in_array($fld->type,array('varchar','char','text','bytea'))) { - $copyflds[] = "to_number($fld->name,'S9999999999999D99')"; - } else { - $copyflds[] = $fld->name; - } - // identify the sequence name and the fld its on - if ($fld->primary_key && $fld->has_default && - preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) { - $seq_name = $matches[1]; - $seq_fld = $fld->name; - } - } - } - $copyflds = implode(', ',$copyflds); - - $tempname = $tabname.'_tmp'; - $aSql[] = 'BEGIN'; // we use a transaction, to make sure not to loose the content of the table - $aSql[] = "SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname"; - $aSql = array_merge($aSql,$this->DropTableSQL($tabname)); - $aSql = array_merge($aSql,$this->CreateTableSQL($tabname,$tableflds,$tableoptions)); - $aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname"; - if ($seq_name && $seq_fld) { // if we have a sequence we need to set it again - $seq_name = $tabname.'_'.$seq_fld.'_seq'; // has to be the name of the new implicit sequence - $aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname"; - } - $aSql[] = "DROP TABLE $tempname"; - // recreate the indexes, if they not contain one of the droped columns - foreach($this->MetaIndexes($tabname) as $idx_name => $idx_data) - { - if (substr($idx_name,-5) != '_pkey' && (!$dropflds || !count(array_intersect($dropflds,$idx_data['columns'])))) { - $aSql = array_merge($aSql,$this->CreateIndexSQL($idx_name,$tabname,$idx_data['columns'], - $idx_data['unique'] ? array('UNIQUE') : False)); - } - } - $aSql[] = 'COMMIT'; - return $aSql; - } - - function DropTableSQL($tabname) - { - $sql = ADODB_DataDict::DropTableSQL($tabname); - - $drop_seq = $this->_DropAutoIncrement($tabname); - if ($drop_seq) $sql[] = $drop_seq; - - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint) - { - if ($fautoinc) { - $ftype = 'SERIAL'; - return ''; - } - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - // search for a sequece for the given table (asumes the seqence-name contains the table-name!) - // if yes return sql to drop it - // this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!! - function _DropAutoIncrement($tabname) - { - $tabname = $this->connection->quote('%'.$tabname.'%'); - - $seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'"); - - // check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly - if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) { - return False; - } - return "DROP SEQUENCE ".$seq; - } - - /* - CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( - { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] - | table_constraint } [, ... ] - ) - [ INHERITS ( parent_table [, ... ] ) ] - [ WITH OIDS | WITHOUT OIDS ] - where column_constraint is: - [ CONSTRAINT constraint_name ] - { NOT NULL | NULL | UNIQUE | PRIMARY KEY | - CHECK (expression) | - REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] - [ ON DELETE action ] [ ON UPDATE action ] } - [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] - and table_constraint is: - [ CONSTRAINT constraint_name ] - { UNIQUE ( column_name [, ... ] ) | - PRIMARY KEY ( column_name [, ... ] ) | - CHECK ( expression ) | - FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] - [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } - [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] - */ - - - /* - CREATE [ UNIQUE ] INDEX index_name ON table -[ USING acc_method ] ( column [ ops_name ] [, ...] ) -[ WHERE predicate ] -CREATE [ UNIQUE ] INDEX index_name ON table -[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) -[ WHERE predicate ] - */ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; - - if (isset($idxoptions['HASH'])) - $s .= 'USING HASH '; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s .= '(' . $flds . ')'; - $sql[] = $s; - - return $sql; - } - - function _GetSize($ftype, $ty, $fsize, $fprec) - { - if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty != 'I' && strpos($ftype,'(') === false) { - $ftype .= "(".$fsize; - if (strlen($fprec)) $ftype .= ",".$fprec; - $ftype .= ')'; - } - return $ftype; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sapdb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sapdb.inc.php.svn-base deleted file mode 100755 index 9b539efa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sapdb.inc.php.svn-base +++ /dev/null @@ -1,121 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - static $maxdb_type2adodb = array( - 'VARCHAR' => 'C', - 'CHARACTER' => 'C', - 'LONG' => 'X', // no way to differ between 'X' and 'B' :-( - 'DATE' => 'D', - 'TIMESTAMP' => 'T', - 'BOOLEAN' => 'L', - 'INTEGER' => 'I4', - 'SMALLINT' => 'I2', - 'FLOAT' => 'F', - 'FIXED' => 'N', - ); - $type = isset($maxdb_type2adodb[$t]) ? $maxdb_type2adodb[$t] : 'C'; - - // convert integer-types simulated with fixed back to integer - if ($t == 'FIXED' && !$fieldobj->scale && ($len == 20 || $len == 3)) { - $type = $len == 20 ? 'I8' : 'I1'; - } - if ($fieldobj->auto_increment) $type = 'R'; - - return $type; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - if ($funsigned) $suffix .= ' UNSIGNED'; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fautoinc) $suffix .= ' DEFAULT SERIAL'; - elseif (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' ); - } - - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' ); - } - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - foreach($flds as $k => $v) { - $flds[$k] = $this->NameQuote($v); - } - return array( 'ALTER TABLE ' . $tabname . ' DROP (' . implode(', ',$flds) . ')' ); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sybase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sybase.inc.php.svn-base deleted file mode 100755 index 4d215021..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/.svn/text-base/datadict-sybase.inc.php.svn-base +++ /dev/null @@ -1,228 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - - case 'INT': - case 'INTEGER': return 'I'; - case 'BIT': - case 'TINYINT': return 'I1'; - case 'SMALLINT': return 'I2'; - case 'BIGINT': return 'I8'; - - case 'REAL': - case 'FLOAT': return 'F'; - default: return parent::MetaType($t,$len,$fieldobj); - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - case 'C': return 'VARCHAR'; - case 'XL': - case 'X': return 'TEXT'; - - case 'C2': return 'NVARCHAR'; - case 'X2': return 'NTEXT'; - - case 'B': return 'IMAGE'; - - case 'D': return 'DATETIME'; - case 'T': return 'DATETIME'; - case 'L': return 'BIT'; - - case 'I': return 'INT'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'REAL'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname $this->addCol"; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - foreach($lines as $v) { - $sql[] = "ALTER TABLE $tabname $this->alterCol $v"; - } - - return $sql; - } - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - $f = array(); - $s = "ALTER TABLE $tabname"; - foreach($flds as $v) { - $f[] = "\n$this->dropCol ".$this->NameQuote($v); - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' DEFAULT AUTOINCREMENT'; - if ($fnotnull) $suffix .= ' NOT NULL'; - else if ($suffix == '') $suffix .= ' NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* -CREATE TABLE - [ database_name.[ owner ] . | owner. ] table_name - ( { < column_definition > - | column_name AS computed_column_expression - | < table_constraint > ::= [ CONSTRAINT constraint_name ] } - - | [ { PRIMARY KEY | UNIQUE } [ ,...n ] - ) - -[ ON { filegroup | DEFAULT } ] -[ TEXTIMAGE_ON { filegroup | DEFAULT } ] - -< column_definition > ::= { column_name data_type } - [ COLLATE < collation_name > ] - [ [ DEFAULT constant_expression ] - | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ] - ] - [ ROWGUIDCOL] - [ < column_constraint > ] [ ...n ] - -< column_constraint > ::= [ CONSTRAINT constraint_name ] - { [ NULL | NOT NULL ] - | [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - [ WITH FILLFACTOR = fillfactor ] - [ON {filegroup | DEFAULT} ] ] - ] - | [ [ FOREIGN KEY ] - REFERENCES ref_table [ ( ref_column ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - ] - | CHECK [ NOT FOR REPLICATION ] - ( logical_expression ) - } - -< table_constraint > ::= [ CONSTRAINT constraint_name ] - { [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - { ( column [ ASC | DESC ] [ ,...n ] ) } - [ WITH FILLFACTOR = fillfactor ] - [ ON { filegroup | DEFAULT } ] - ] - | FOREIGN KEY - [ ( column [ ,...n ] ) ] - REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - | CHECK [ NOT FOR REPLICATION ] - ( search_conditions ) - } - - - */ - - /* - CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name - ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) - [ WITH < index_option > [ ,...n] ] - [ ON filegroup ] - < index_option > :: = - { PAD_INDEX | - FILLFACTOR = fillfactor | - IGNORE_DUP_KEY | - DROP_EXISTING | - STATISTICS_NORECOMPUTE | - SORT_IN_TEMPDB - } -*/ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : ''; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - $sql[] = $s; - - return $sql; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-access.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-access.inc.php deleted file mode 100755 index b633d780..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-access.inc.php +++ /dev/null @@ -1,95 +0,0 @@ -debug) ADOConnection::outp("Warning: Access does not supported DEFAULT values (field $fname)"); - } - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function CreateDatabase($dbname,$options=false) - { - return array(); - } - - - function SetSchema($schema) - { - } - - function AlterColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-db2.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-db2.inc.php deleted file mode 100755 index e965a44a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-db2.inc.php +++ /dev/null @@ -1,143 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - - - function ChangeTableSQL($tablename, $flds, $tableoptions = false) - { - - /** - Allow basic table changes to DB2 databases - DB2 will fatally reject changes to non character columns - - */ - - $validTypes = array("CHAR","VARC"); - $invalidTypes = array("BIGI","BLOB","CLOB","DATE", "DECI","DOUB", "INTE", "REAL","SMAL", "TIME"); - // check table exists - $cols = &$this->MetaColumns($tablename); - if ( empty($cols)) { - return $this->CreateTableSQL($tablename, $flds, $tableoptions); - } - - // already exists, alter table instead - list($lines,$pkey) = $this->_GenFields($flds); - $alter = 'ALTER TABLE ' . $this->TableName($tablename); - $sql = array(); - - foreach ( $lines as $id => $v ) { - if ( isset($cols[$id]) && is_object($cols[$id]) ) { - /** - If the first field of $v is the fieldname, and - the second is the field type/size, we assume its an - attempt to modify the column size, so check that it is allowed - $v can have an indeterminate number of blanks between the - fields, so account for that too - */ - $vargs = explode(' ' , $v); - // assume that $vargs[0] is the field name. - $i=0; - // Find the next non-blank value; - for ($i=1;$ialterCol . ' ' . $v; - } else { - $sql[] = $alter . $this->addCol . ' ' . $v; - } - } - - return $sql; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-firebird.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-firebird.inc.php deleted file mode 100755 index 9f009d0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-firebird.inc.php +++ /dev/null @@ -1,151 +0,0 @@ -connection) ) { - return $name; - } - - $quote = $this->connection->nameQuote; - - // if name is of the form `name`, quote it - if ( preg_match('/^`(.+)`$/', $name, $matches) ) { - return $quote . $matches[1] . $quote; - } - - // if name contains special characters, quote it - if ( !preg_match('/^[' . $this->nameRegex . ']+$/', $name) ) { - return $quote . $name . $quote; - } - - return $quote . $name . $quote; - } - - function CreateDatabase($dbname, $options=false) - { - $options = $this->_Options($options); - $sql = array(); - - $sql[] = "DECLARE EXTERNAL FUNCTION LOWER CSTRING(80) RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf'"; - - return $sql; - } - - function _DropAutoIncrement($t) - { - if (strpos($t,'.') !== false) { - $tarr = explode('.',$t); - return 'DROP GENERATOR '.$tarr[0].'."gen_'.$tarr[1].'"'; - } - return 'DROP GENERATOR "GEN_'.$t; - } - - - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fautoinc) $this->seqField = $fname; - if ($fconstraint) $suffix .= ' '.$fconstraint; - - return $suffix; - } - -/* -CREATE or replace TRIGGER jaddress_insert -before insert on jaddress -for each row -begin -IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN - NEW."seqField" = GEN_ID("GEN_tabname", 1); -end; -*/ - function _Triggers($tabname,$tableoptions) - { - if (!$this->seqField) return array(); - - $tab1 = preg_replace( '/"/', '', $tabname ); - if ($this->schema) { - $t = strpos($tab1,'.'); - if ($t !== false) $tab = substr($tab1,$t+1); - else $tab = $tab1; - $seqField = $this->seqField; - $seqname = $this->schema.'.'.$this->seqPrefix.$tab; - $trigname = $this->schema.'.trig_'.$this->seqPrefix.$tab; - } else { - $seqField = $this->seqField; - $seqname = $this->seqPrefix.$tab1; - $trigname = 'trig_'.$seqname; - } - if (isset($tableoptions['REPLACE'])) - { $sql[] = "DROP GENERATOR \"$seqname\""; - $sql[] = "CREATE GENERATOR \"$seqname\""; - $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END"; - } - else - { $sql[] = "CREATE GENERATOR \"$seqname\""; - $sql[] = "CREATE TRIGGER \"$trigname\" FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END"; - } - - $this->seqField = false; - return $sql; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-generic.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-generic.inc.php deleted file mode 100755 index 94c59c38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-generic.inc.php +++ /dev/null @@ -1,125 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - -/* -//db2 - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'X': return 'VARCHAR'; - - case 'C2': return 'VARCHAR'; // up to 32K - case 'X2': return 'VARCHAR'; - - case 'B': return 'BLOB'; - - case 'D': return 'DATE'; - case 'T': return 'TIMESTAMP'; - - case 'L': return 'SMALLINT'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INTEGER'; - case 'I8': return 'BIGINT'; - - case 'F': return 'DOUBLE'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } - -// ifx -function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR';// 255 - case 'X': return 'TEXT'; - - case 'C2': return 'NVARCHAR'; - case 'X2': return 'TEXT'; - - case 'B': return 'BLOB'; - - case 'D': return 'DATE'; - case 'T': return 'DATETIME'; - - case 'L': return 'SMALLINT'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INTEGER'; - case 'I8': return 'DECIMAL(20)'; - - case 'F': return 'FLOAT'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } -*/ -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-ibase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-ibase.inc.php deleted file mode 100755 index 748ab127..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-ibase.inc.php +++ /dev/null @@ -1,67 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-informix.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-informix.inc.php deleted file mode 100755 index 107d2124..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-informix.inc.php +++ /dev/null @@ -1,80 +0,0 @@ -debug) ADOConnection::outp("AlterColumnSQL not supported"); - return array(); - } - - - function DropColumnSQL($tabname, $flds) - { - if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); - return array(); - } - - // return string must begin with space - function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint) - { - if ($fautoinc) { - $ftype = 'SERIAL'; - return ''; - } - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mssql.inc.php deleted file mode 100755 index 17b00216..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mssql.inc.php +++ /dev/null @@ -1,282 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'R': - case 'INT': - case 'INTEGER': return 'I'; - case 'BIT': - case 'TINYINT': return 'I1'; - case 'SMALLINT': return 'I2'; - case 'BIGINT': return 'I8'; - - case 'REAL': - case 'FLOAT': return 'F'; - default: return parent::MetaType($t,$len,$fieldobj); - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - - case 'C': return 'VARCHAR'; - case 'XL': return (isset($this)) ? $this->typeXL : 'TEXT'; - case 'X': return (isset($this)) ? $this->typeX : 'TEXT'; ## could be varchar(8000), but we want compat with oracle - case 'C2': return 'NVARCHAR'; - case 'X2': return 'NTEXT'; - - case 'B': return 'IMAGE'; - - case 'D': return 'DATETIME'; - case 'T': return 'DATETIME'; - case 'L': return 'BIT'; - - case 'R': - case 'I': return 'INT'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'REAL'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname $this->addCol"; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - /* - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - foreach($lines as $v) { - $sql[] = "ALTER TABLE $tabname $this->alterCol $v"; - } - - return $sql; - } - */ - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) - $flds = explode(',',$flds); - $f = array(); - $s = 'ALTER TABLE ' . $tabname; - foreach($flds as $v) { - $f[] = "\n$this->dropCol ".$this->NameQuote($v); - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' IDENTITY(1,1)'; - if ($fnotnull) $suffix .= ' NOT NULL'; - else if ($suffix == '') $suffix .= ' NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* -CREATE TABLE - [ database_name.[ owner ] . | owner. ] table_name - ( { < column_definition > - | column_name AS computed_column_expression - | < table_constraint > ::= [ CONSTRAINT constraint_name ] } - - | [ { PRIMARY KEY | UNIQUE } [ ,...n ] - ) - -[ ON { filegroup | DEFAULT } ] -[ TEXTIMAGE_ON { filegroup | DEFAULT } ] - -< column_definition > ::= { column_name data_type } - [ COLLATE < collation_name > ] - [ [ DEFAULT constant_expression ] - | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ] - ] - [ ROWGUIDCOL] - [ < column_constraint > ] [ ...n ] - -< column_constraint > ::= [ CONSTRAINT constraint_name ] - { [ NULL | NOT NULL ] - | [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - [ WITH FILLFACTOR = fillfactor ] - [ON {filegroup | DEFAULT} ] ] - ] - | [ [ FOREIGN KEY ] - REFERENCES ref_table [ ( ref_column ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - ] - | CHECK [ NOT FOR REPLICATION ] - ( logical_expression ) - } - -< table_constraint > ::= [ CONSTRAINT constraint_name ] - { [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - { ( column [ ASC | DESC ] [ ,...n ] ) } - [ WITH FILLFACTOR = fillfactor ] - [ ON { filegroup | DEFAULT } ] - ] - | FOREIGN KEY - [ ( column [ ,...n ] ) ] - REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - | CHECK [ NOT FOR REPLICATION ] - ( search_conditions ) - } - - - */ - - /* - CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name - ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) - [ WITH < index_option > [ ,...n] ] - [ ON filegroup ] - < index_option > :: = - { PAD_INDEX | - FILLFACTOR = fillfactor | - IGNORE_DUP_KEY | - DROP_EXISTING | - STATISTICS_NORECOMPUTE | - SORT_IN_TEMPDB - } -*/ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : ''; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - - $sql[] = $s; - - return $sql; - } - - - function _GetSize($ftype, $ty, $fsize, $fprec) - { - switch ($ftype) { - case 'INT': - case 'SMALLINT': - case 'TINYINT': - case 'BIGINT': - return $ftype; - } - if ($ty == 'T') return $ftype; - return parent::_GetSize($ftype, $ty, $fsize, $fprec); - - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mysql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mysql.inc.php deleted file mode 100755 index 3b6caabb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-mysql.inc.php +++ /dev/null @@ -1,181 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment; - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'YEAR': - case 'DATE': return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': return 'T'; - - case 'FLOAT': - case 'DOUBLE': - return 'F'; - - case 'INT': - case 'INTEGER': return $is_serial ? 'R' : 'I'; - case 'TINYINT': return $is_serial ? 'R' : 'I1'; - case 'SMALLINT': return $is_serial ? 'R' : 'I2'; - case 'MEDIUMINT': return $is_serial ? 'R' : 'I4'; - case 'BIGINT': return $is_serial ? 'R' : 'I8'; - default: return 'N'; - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - case 'C': return 'VARCHAR'; - case 'XL':return 'LONGTEXT'; - case 'X': return 'TEXT'; - - case 'C2': return 'VARCHAR'; - case 'X2': return 'LONGTEXT'; - - case 'B': return 'LONGBLOB'; - - case 'D': return 'DATE'; - case 'T': return 'DATETIME'; - case 'L': return 'TINYINT'; - - case 'R': - case 'I4': - case 'I': return 'INTEGER'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'DOUBLE'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - if ($funsigned) $suffix .= ' UNSIGNED'; - if ($fnotnull) $suffix .= ' NOT NULL'; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' AUTO_INCREMENT'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* - CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] - [table_options] [select_statement] - create_definition: - col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] - [PRIMARY KEY] [reference_definition] - or PRIMARY KEY (index_col_name,...) - or KEY [index_name] (index_col_name,...) - or INDEX [index_name] (index_col_name,...) - or UNIQUE [INDEX] [index_name] (index_col_name,...) - or FULLTEXT [INDEX] [index_name] (index_col_name,...) - or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) - [reference_definition] - or CHECK (expr) - */ - - /* - CREATE [UNIQUE|FULLTEXT] INDEX index_name - ON tbl_name (col_name[(length)],... ) - */ - - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - if ($this->alterTableAddIndex) $sql[] = "ALTER TABLE $tabname DROP INDEX $idxname"; - else $sql[] = sprintf($this->dropIndex, $idxname, $tabname); - - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - if (isset($idxoptions['FULLTEXT'])) { - $unique = ' FULLTEXT'; - } elseif (isset($idxoptions['UNIQUE'])) { - $unique = ' UNIQUE'; - } else { - $unique = ''; - } - - if ( is_array($flds) ) $flds = implode(', ',$flds); - - if ($this->alterTableAddIndex) $s = "ALTER TABLE $tabname ADD $unique INDEX $idxname "; - else $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname; - - $s .= ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - $sql[] = $s; - - return $sql; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-oci8.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-oci8.inc.php deleted file mode 100755 index e3d3f1ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-oci8.inc.php +++ /dev/null @@ -1,290 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - if (isset($this) && $len <= $this->blobSize) return 'C'; - return 'X'; - - case 'NCHAR': - case 'NVARCHAR2': - case 'NVARCHAR': - if (isset($this) && $len <= $this->blobSize) return 'C2'; - return 'X2'; - - case 'NCLOB': - case 'CLOB': - return 'XL'; - - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': - return 'T'; - - case 'INT': - case 'SMALLINT': - case 'INTEGER': - return 'I'; - - default: - return 'N'; - } - } - - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'X': return $this->typeX; - case 'XL': return $this->typeXL; - - case 'C2': return 'NVARCHAR2'; - case 'X2': return 'NVARCHAR2(4000)'; - - case 'B': return 'BLOB'; - - case 'D': - case 'T': return 'DATE'; - case 'L': return 'DECIMAL(1)'; - case 'I1': return 'DECIMAL(3)'; - case 'I2': return 'DECIMAL(5)'; - case 'I': - case 'I4': return 'DECIMAL(10)'; - - case 'I8': return 'DECIMAL(20)'; - case 'F': return 'DECIMAL'; - case 'N': return 'DECIMAL'; - default: - return $meta; - } - } - - function CreateDatabase($dbname, $options=false) - { - $options = $this->_Options($options); - $password = isset($options['PASSWORD']) ? $options['PASSWORD'] : 'tiger'; - $tablespace = isset($options["TABLESPACE"]) ? " DEFAULT TABLESPACE ".$options["TABLESPACE"] : ''; - $sql[] = "CREATE USER ".$dbname." IDENTIFIED BY ".$password.$tablespace; - $sql[] = "GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO $dbname"; - - return $sql; - } - - function AddColumnSQL($tabname, $flds) - { - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname ADD ("; - foreach($lines as $v) { - $f[] = "\n $v"; - } - - $s .= implode(', ',$f).')'; - $sql[] = $s; - return $sql; - } - - function AlterColumnSQL($tabname, $flds) - { - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname MODIFY("; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f).')'; - $sql[] = $s; - return $sql; - } - - function DropColumnSQL($tabname, $flds) - { - if (!is_array($flds)) $flds = explode(',',$flds); - foreach ($flds as $k => $v) $flds[$k] = $this->NameQuote($v); - - $sql = array(); - $s = "ALTER TABLE $tabname DROP("; - $s .= implode(', ',$flds).') CASCADE CONSTRAINTS'; - $sql[] = $s; - return $sql; - } - - function _DropAutoIncrement($t) - { - if (strpos($t,'.') !== false) { - $tarr = explode('.',$t); - return "drop sequence ".$tarr[0].".seq_".$tarr[1]; - } - return "drop sequence seq_".$t; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - - if ($fdefault == "''" && $fnotnull) {// this is null in oracle - $fnotnull = false; - if ($this->debug) ADOConnection::outp("NOT NULL and DEFAULT='' illegal in Oracle"); - } - - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - - if ($fautoinc) $this->seqField = $fname; - if ($fconstraint) $suffix .= ' '.$fconstraint; - - return $suffix; - } - -/* -CREATE or replace TRIGGER jaddress_insert -before insert on jaddress -for each row -begin -select seqaddress.nextval into :new.A_ID from dual; -end; -*/ - function _Triggers($tabname,$tableoptions) - { - if (!$this->seqField) return array(); - - if ($this->schema) { - $t = strpos($tabname,'.'); - if ($t !== false) $tab = substr($tabname,$t+1); - else $tab = $tabname; - $seqname = $this->schema.'.'.$this->seqPrefix.$tab; - $trigname = $this->schema.'.'.$this->trigPrefix.$this->seqPrefix.$tab; - } else { - $seqname = $this->seqPrefix.$tabname; - $trigname = $this->trigPrefix.$seqname; - } - - if (strlen($seqname) > 30) { - $seqname = $this->seqPrefix.uniqid(''); - } // end if - if (strlen($trigname) > 30) { - $trigname = $this->trigPrefix.uniqid(''); - } // end if - - if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname"; - $seqCache = ''; - if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];} - $seqIncr = ''; - if (isset($tableoptions['SEQUENCE_INCREMENT'])){$seqIncr = ' INCREMENT BY '.$tableoptions['SEQUENCE_INCREMENT'];} - $seqStart = ''; - if (isset($tableoptions['SEQUENCE_START'])){$seqIncr = ' START WITH '.$tableoptions['SEQUENCE_START'];} - $sql[] = "CREATE SEQUENCE $seqname $seqStart $seqIncr $seqCache"; - $sql[] = "CREATE OR REPLACE TRIGGER $trigname BEFORE insert ON $tabname FOR EACH ROW WHEN (NEW.$this->seqField IS NULL OR NEW.$this->seqField = 0) BEGIN select $seqname.nextval into :new.$this->seqField from dual; END;"; - - $this->seqField = false; - return $sql; - } - - /* - CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] - [table_options] [select_statement] - create_definition: - col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] - [PRIMARY KEY] [reference_definition] - or PRIMARY KEY (index_col_name,...) - or KEY [index_name] (index_col_name,...) - or INDEX [index_name] (index_col_name,...) - or UNIQUE [INDEX] [index_name] (index_col_name,...) - or FULLTEXT [INDEX] [index_name] (index_col_name,...) - or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) - [reference_definition] - or CHECK (expr) - */ - - - - function _IndexSQL($idxname, $tabname, $flds,$idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - if (isset($idxoptions['BITMAP'])) { - $unique = ' BITMAP'; - } elseif (isset($idxoptions['UNIQUE'])) { - $unique = ' UNIQUE'; - } else { - $unique = ''; - } - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if (isset($idxoptions['oci8'])) - $s .= $idxoptions['oci8']; - - - $sql[] = $s; - - return $sql; - } - - function GetCommentSQL($table,$col) - { - $table = $this->connection->qstr($table); - $col = $this->connection->qstr($col); - return "select comments from USER_COL_COMMENTS where TABLE_NAME=$table and COLUMN_NAME=$col"; - } - - function SetCommentSQL($table,$col,$cmt) - { - $cmt = $this->connection->qstr($cmt); - return "COMMENT ON COLUMN $table.$col IS $cmt"; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-postgres.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-postgres.inc.php deleted file mode 100755 index a158eb02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-postgres.inc.php +++ /dev/null @@ -1,371 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->unique && - $fieldobj->has_default && substr($fieldobj->default_value,0,8) == 'nextval('; - - switch (strtoupper($t)) { - case 'INTERVAL': - case 'CHAR': - case 'CHARACTER': - case 'VARCHAR': - case 'NAME': - case 'BPCHAR': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - return 'X'; - - case 'IMAGE': // user defined type - case 'BLOB': // user defined type - case 'BIT': // This is a bit string, not a single bit, so don't return 'L' - case 'VARBIT': - case 'BYTEA': - return 'B'; - - case 'BOOL': - case 'BOOLEAN': - return 'L'; - - case 'DATE': - return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - case 'TIMESTAMPTZ': - return 'T'; - - case 'INTEGER': return !$is_serial ? 'I' : 'R'; - case 'SMALLINT': - case 'INT2': return !$is_serial ? 'I2' : 'R'; - case 'INT4': return !$is_serial ? 'I4' : 'R'; - case 'BIGINT': - case 'INT8': return !$is_serial ? 'I8' : 'R'; - - case 'OID': - case 'SERIAL': - return 'R'; - - case 'FLOAT4': - case 'FLOAT8': - case 'DOUBLE PRECISION': - case 'REAL': - return 'F'; - - default: - return 'N'; - } - } - - function ActualType($meta) - { - switch($meta) { - case 'C': return 'VARCHAR'; - case 'XL': - case 'X': return 'TEXT'; - - case 'C2': return 'VARCHAR'; - case 'X2': return 'TEXT'; - - case 'B': return 'BYTEA'; - - case 'D': return 'DATE'; - case 'T': return 'TIMESTAMP'; - - case 'L': return 'BOOLEAN'; - case 'I': return 'INTEGER'; - case 'I1': return 'SMALLINT'; - case 'I2': return 'INT2'; - case 'I4': return 'INT4'; - case 'I8': return 'INT8'; - - case 'F': return 'FLOAT8'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - /** - * Adding a new Column - * - * reimplementation of the default function as postgres does NOT allow to set the default in the same statement - * - * @param string $tabname table-name - * @param string $flds column-names and types for the changed columns - * @return array with SQL strings - */ - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; - foreach($lines as $v) { - if (($not_null = preg_match('/NOT NULL/i',$v))) { - $v = preg_replace('/NOT NULL/i','',$v); - } - if (preg_match('/^([^ ]+) .*DEFAULT ([^ ]+)/',$v,$matches)) { - list(,$colname,$default) = $matches; - $sql[] = $alter . str_replace('DEFAULT '.$default,'',$v); - $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default; - $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default; - } else { - $sql[] = $alter . $v; - } - if ($not_null) { - list($colname) = explode(' ',$v); - $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL'; - } - } - return $sql; - } - - /** - * Change the definition of one column - * - * Postgres can't do that on it's own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' - * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - if (!$tableflds) { - if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL"); - return array(); - } - return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions); - } - - /** - * Drop one column - * - * Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table, - * to allow, recreating the table and copying the content over to the new table - * @param string $tabname table-name - * @param string $flds column-name and type for the changed column - * @param string $tableflds complete defintion of the new table, eg. for postgres, default '' - * @param array/ $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') - { - $has_drop_column = 7.3 <= (float) @$this->serverInfo['version']; - if (!$has_drop_column && !$tableflds) { - if ($this->debug) ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3"); - return array(); - } - if ($has_drop_column) { - return ADODB_DataDict::DropColumnSQL($tabname, $flds); - } - return $this->_recreate_copy_table($tabname,$flds,$tableflds,$tableoptions); - } - - /** - * Save the content into a temp. table, drop and recreate the original table and copy the content back in - * - * We also take care to set the values of the sequenz and recreate the indexes. - * All this is done in a transaction, to not loose the content of the table, if something went wrong! - * @internal - * @param string $tabname table-name - * @param string $dropflds column-names to drop - * @param string $tableflds complete defintion of the new table, eg. for postgres - * @param array/string $tableoptions options for the new table see CreateTableSQL, default '' - * @return array with SQL strings - */ - function _recreate_copy_table($tabname,$dropflds,$tableflds,$tableoptions='') - { - if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds); - $copyflds = array(); - foreach($this->MetaColumns($tabname) as $fld) { - if (!$dropflds || !in_array($fld->name,$dropflds)) { - // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one - if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && - in_array($fld->type,array('varchar','char','text','bytea'))) { - $copyflds[] = "to_number($fld->name,'S9999999999999D99')"; - } else { - $copyflds[] = $fld->name; - } - // identify the sequence name and the fld its on - if ($fld->primary_key && $fld->has_default && - preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) { - $seq_name = $matches[1]; - $seq_fld = $fld->name; - } - } - } - $copyflds = implode(', ',$copyflds); - - $tempname = $tabname.'_tmp'; - $aSql[] = 'BEGIN'; // we use a transaction, to make sure not to loose the content of the table - $aSql[] = "SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname"; - $aSql = array_merge($aSql,$this->DropTableSQL($tabname)); - $aSql = array_merge($aSql,$this->CreateTableSQL($tabname,$tableflds,$tableoptions)); - $aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname"; - if ($seq_name && $seq_fld) { // if we have a sequence we need to set it again - $seq_name = $tabname.'_'.$seq_fld.'_seq'; // has to be the name of the new implicit sequence - $aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname"; - } - $aSql[] = "DROP TABLE $tempname"; - // recreate the indexes, if they not contain one of the droped columns - foreach($this->MetaIndexes($tabname) as $idx_name => $idx_data) - { - if (substr($idx_name,-5) != '_pkey' && (!$dropflds || !count(array_intersect($dropflds,$idx_data['columns'])))) { - $aSql = array_merge($aSql,$this->CreateIndexSQL($idx_name,$tabname,$idx_data['columns'], - $idx_data['unique'] ? array('UNIQUE') : False)); - } - } - $aSql[] = 'COMMIT'; - return $aSql; - } - - function DropTableSQL($tabname) - { - $sql = ADODB_DataDict::DropTableSQL($tabname); - - $drop_seq = $this->_DropAutoIncrement($tabname); - if ($drop_seq) $sql[] = $drop_seq; - - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint) - { - if ($fautoinc) { - $ftype = 'SERIAL'; - return ''; - } - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - // search for a sequece for the given table (asumes the seqence-name contains the table-name!) - // if yes return sql to drop it - // this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!! - function _DropAutoIncrement($tabname) - { - $tabname = $this->connection->quote('%'.$tabname.'%'); - - $seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'"); - - // check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly - if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) { - return False; - } - return "DROP SEQUENCE ".$seq; - } - - /* - CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( - { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] - | table_constraint } [, ... ] - ) - [ INHERITS ( parent_table [, ... ] ) ] - [ WITH OIDS | WITHOUT OIDS ] - where column_constraint is: - [ CONSTRAINT constraint_name ] - { NOT NULL | NULL | UNIQUE | PRIMARY KEY | - CHECK (expression) | - REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] - [ ON DELETE action ] [ ON UPDATE action ] } - [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] - and table_constraint is: - [ CONSTRAINT constraint_name ] - { UNIQUE ( column_name [, ... ] ) | - PRIMARY KEY ( column_name [, ... ] ) | - CHECK ( expression ) | - FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] - [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } - [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] - */ - - - /* - CREATE [ UNIQUE ] INDEX index_name ON table -[ USING acc_method ] ( column [ ops_name ] [, ...] ) -[ WHERE predicate ] -CREATE [ UNIQUE ] INDEX index_name ON table -[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) -[ WHERE predicate ] - */ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - - $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; - - if (isset($idxoptions['HASH'])) - $s .= 'USING HASH '; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s .= '(' . $flds . ')'; - $sql[] = $s; - - return $sql; - } - - function _GetSize($ftype, $ty, $fsize, $fprec) - { - if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty != 'I' && strpos($ftype,'(') === false) { - $ftype .= "(".$fsize; - if (strlen($fprec)) $ftype .= ",".$fprec; - $ftype .= ')'; - } - return $ftype; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sapdb.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sapdb.inc.php deleted file mode 100755 index 37de29ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sapdb.inc.php +++ /dev/null @@ -1,121 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - static $maxdb_type2adodb = array( - 'VARCHAR' => 'C', - 'CHARACTER' => 'C', - 'LONG' => 'X', // no way to differ between 'X' and 'B' :-( - 'DATE' => 'D', - 'TIMESTAMP' => 'T', - 'BOOLEAN' => 'L', - 'INTEGER' => 'I4', - 'SMALLINT' => 'I2', - 'FLOAT' => 'F', - 'FIXED' => 'N', - ); - $type = isset($maxdb_type2adodb[$t]) ? $maxdb_type2adodb[$t] : 'C'; - - // convert integer-types simulated with fixed back to integer - if ($t == 'FIXED' && !$fieldobj->scale && ($len == 20 || $len == 3)) { - $type = $len == 20 ? 'I8' : 'I1'; - } - if ($fieldobj->auto_increment) $type = 'R'; - - return $type; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) - { - $suffix = ''; - if ($funsigned) $suffix .= ' UNSIGNED'; - if ($fnotnull) $suffix .= ' NOT NULL'; - if ($fautoinc) $suffix .= ' DEFAULT SERIAL'; - elseif (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' ); - } - - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' ); - } - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - foreach($flds as $k => $v) { - $flds[$k] = $this->NameQuote($v); - } - return array( 'ALTER TABLE ' . $tabname . ' DROP (' . implode(', ',$flds) . ')' ); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sybase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sybase.inc.php deleted file mode 100755 index 3aad805b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/datadict/datadict-sybase.inc.php +++ /dev/null @@ -1,228 +0,0 @@ -type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - - case 'INT': - case 'INTEGER': return 'I'; - case 'BIT': - case 'TINYINT': return 'I1'; - case 'SMALLINT': return 'I2'; - case 'BIGINT': return 'I8'; - - case 'REAL': - case 'FLOAT': return 'F'; - default: return parent::MetaType($t,$len,$fieldobj); - } - } - - function ActualType($meta) - { - switch(strtoupper($meta)) { - case 'C': return 'VARCHAR'; - case 'XL': - case 'X': return 'TEXT'; - - case 'C2': return 'NVARCHAR'; - case 'X2': return 'NTEXT'; - - case 'B': return 'IMAGE'; - - case 'D': return 'DATETIME'; - case 'T': return 'DATETIME'; - case 'L': return 'BIT'; - - case 'I': return 'INT'; - case 'I1': return 'TINYINT'; - case 'I2': return 'SMALLINT'; - case 'I4': return 'INT'; - case 'I8': return 'BIGINT'; - - case 'F': return 'REAL'; - case 'N': return 'NUMERIC'; - default: - return $meta; - } - } - - - function AddColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); - $s = "ALTER TABLE $tabname $this->addCol"; - foreach($lines as $v) { - $f[] = "\n $v"; - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - function AlterColumnSQL($tabname, $flds) - { - $tabname = $this->TableName ($tabname); - $sql = array(); - list($lines,$pkey) = $this->_GenFields($flds); - foreach($lines as $v) { - $sql[] = "ALTER TABLE $tabname $this->alterCol $v"; - } - - return $sql; - } - - function DropColumnSQL($tabname, $flds) - { - $tabname = $this->TableName($tabname); - if (!is_array($flds)) $flds = explode(',',$flds); - $f = array(); - $s = "ALTER TABLE $tabname"; - foreach($flds as $v) { - $f[] = "\n$this->dropCol ".$this->NameQuote($v); - } - $s .= implode(', ',$f); - $sql[] = $s; - return $sql; - } - - // return string must begin with space - function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint) - { - $suffix = ''; - if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; - if ($fautoinc) $suffix .= ' DEFAULT AUTOINCREMENT'; - if ($fnotnull) $suffix .= ' NOT NULL'; - else if ($suffix == '') $suffix .= ' NULL'; - if ($fconstraint) $suffix .= ' '.$fconstraint; - return $suffix; - } - - /* -CREATE TABLE - [ database_name.[ owner ] . | owner. ] table_name - ( { < column_definition > - | column_name AS computed_column_expression - | < table_constraint > ::= [ CONSTRAINT constraint_name ] } - - | [ { PRIMARY KEY | UNIQUE } [ ,...n ] - ) - -[ ON { filegroup | DEFAULT } ] -[ TEXTIMAGE_ON { filegroup | DEFAULT } ] - -< column_definition > ::= { column_name data_type } - [ COLLATE < collation_name > ] - [ [ DEFAULT constant_expression ] - | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ] - ] - [ ROWGUIDCOL] - [ < column_constraint > ] [ ...n ] - -< column_constraint > ::= [ CONSTRAINT constraint_name ] - { [ NULL | NOT NULL ] - | [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - [ WITH FILLFACTOR = fillfactor ] - [ON {filegroup | DEFAULT} ] ] - ] - | [ [ FOREIGN KEY ] - REFERENCES ref_table [ ( ref_column ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - ] - | CHECK [ NOT FOR REPLICATION ] - ( logical_expression ) - } - -< table_constraint > ::= [ CONSTRAINT constraint_name ] - { [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - { ( column [ ASC | DESC ] [ ,...n ] ) } - [ WITH FILLFACTOR = fillfactor ] - [ ON { filegroup | DEFAULT } ] - ] - | FOREIGN KEY - [ ( column [ ,...n ] ) ] - REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - | CHECK [ NOT FOR REPLICATION ] - ( search_conditions ) - } - - - */ - - /* - CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name - ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) - [ WITH < index_option > [ ,...n] ] - [ ON filegroup ] - < index_option > :: = - { PAD_INDEX | - FILLFACTOR = fillfactor | - IGNORE_DUP_KEY | - DROP_EXISTING | - STATISTICS_NORECOMPUTE | - SORT_IN_TEMPDB - } -*/ - function _IndexSQL($idxname, $tabname, $flds, $idxoptions) - { - $sql = array(); - - if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { - $sql[] = sprintf ($this->dropIndex, $idxname, $tabname); - if ( isset($idxoptions['DROP']) ) - return $sql; - } - - if ( empty ($flds) ) { - return $sql; - } - - $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; - $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : ''; - - if ( is_array($flds) ) - $flds = implode(', ',$flds); - $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')'; - - if ( isset($idxoptions[$this->upperName]) ) - $s .= $idxoptions[$this->upperName]; - - $sql[] = $s; - - return $sql; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/all-wcprops deleted file mode 100755 index df75a8ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/docs -END -docs-session.htm -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/docs-session.htm -END -docs-oracle.htm -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/docs/docs-oracle.htm -END -docs-active-record.htm -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/docs/docs-active-record.htm -END -readme.htm -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/readme.htm -END -docs-adodb.htm -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/docs-adodb.htm -END -tute.htm -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/tute.htm -END -docs-perf.htm -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/docs-perf.htm -END -docs-datadict.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/docs-datadict.htm -END -old-changelog.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/old-changelog.htm -END -docs-session.old.htm -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/docs/docs-session.old.htm -END -tips_portable_sql.htm -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/docs/tips_portable_sql.htm -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/entries deleted file mode 100755 index b8cc58c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/entries +++ /dev/null @@ -1,171 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/docs -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T11:01:00.000000Z -351 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -docs-session.htm -file - - - - -2008-02-29T14:57:51.114615Z -7d8aa24b968344db81a104c3073b0957 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs-oracle.htm -file - - - - -2008-02-29T14:57:51.130236Z -2c7d7f70eb2c1fbf17154b79e8f72ae0 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -docs-active-record.htm -file - - - - -2008-02-29T14:57:51.145856Z -92655a6b09bef74e7ddf0aecc3f7084b -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -readme.htm -file - - - - -2008-02-29T14:57:51.161477Z -635b2ff355b282ee2347447f81a054b2 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs-adodb.htm -file - - - - -2008-02-29T14:57:51.177097Z -72357075d070cc3c6cec22afa85cc649 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -tute.htm -file - - - - -2008-02-29T14:57:51.192718Z -a22b7c1a52cffcffa056e1d807f8aed8 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs-perf.htm -file - - - - -2008-02-29T14:57:51.208339Z -5efa63773a850269f541a84767d0e355 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs-datadict.htm -file - - - - -2008-02-29T14:57:51.223959Z -d9b3890f5bf06f5f5b594dbf74e1ad95 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -old-changelog.htm -file - - - - -2008-02-29T14:57:51.223959Z -340a83318a7215137dc5d9dd9c83a0be -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -docs-session.old.htm -file - - - - -2008-02-29T14:57:51.239580Z -de59e3c34a302c8e7eb2c14ad68e9a1a -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -tips_portable_sql.htm -file - - - - -2008-02-29T14:57:51.255200Z -1ad08763e233d4e59ac29db460dad7af -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-active-record.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-active-record.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-active-record.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-adodb.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-adodb.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-adodb.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-datadict.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-datadict.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-datadict.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-oracle.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-oracle.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-oracle.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-perf.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-perf.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-perf.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.old.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.old.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/docs-session.old.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/old-changelog.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/old-changelog.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/old-changelog.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/readme.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/readme.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/readme.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tips_portable_sql.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tips_portable_sql.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tips_portable_sql.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tute.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tute.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/prop-base/tute.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-active-record.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-active-record.htm.svn-base deleted file mode 100755 index 9a809be4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-active-record.htm.svn-base +++ /dev/null @@ -1,541 +0,0 @@ - - -ADOdb Active Record - -

    ADOdb Active Record

    -

    (c) 2000-2007 John Lim (jlim#natsoft.com)

    -

    This software is dual licensed using BSD-Style and LGPL. This - means you can use it in compiled proprietary and commercial products.

    -


    -
      - -

    1. Introduction
    2. -

      -ADOdb_Active_Record is an Object Relation Mapping (ORM) implementation using PHP. In an ORM system, the tables and rows of the database are abstracted into native PHP objects. This allows the programmer to focus more on manipulating the data and less on writing SQL queries. -

      -This implementation differs from Zend Framework's implementation in the following ways: -

        -
      • Works with PHP4 and PHP5 and provides equivalent functionality in both versions of PHP.

        -

      • ADOdb_Active_Record works when you are connected to multiple databases. Zend's only works when connected to a default database.

        -

      • Support for $ADODB_ASSOC_CASE. The field names are upper-cased, lower-cased or left in natural case depending on this setting.

        -

      • No field name conversion to camel-caps style, unlike Zend's implementation which will convert field names such as 'first_name' to 'firstName'.

        -

      • NewADOConnection::GetActiveRecords() and ADOConnection::GetActiveRecordsClass() functions in adodb.inc.php.

        -

      • Caching of table metadata so it is only queried once per table, no matter how many Active Records are created.

        -

      • The additional functionality is described below. -
      -

      -ADOdb_Active_Record is designed upon the principles of the "ActiveRecord" design pattern, which was first described by Martin Fowler. The ActiveRecord pattern has been implemented in many forms across the spectrum of programming languages. ADOdb_Active_Record attempts to represent the database as closely to native PHP objects as possible. -

      -ADOdb_Active_Record maps a database table to a PHP class, and each instance of that class represents a table row. Relations between tables can also be defined, allowing the ADOdb_Active_Record objects to be nested. -

      - -

    3. Setting the Database Connection
    4. -

      -The first step to using ADOdb_Active_Record is to set the default connection that an ADOdb_Active_Record objects will use to connect to a database. - -

      -require_once('adodb/adodb-active-record.inc.php');
      -
      -$db = NewADOConnection('mysql://root:pwd@localhost/dbname');
      -ADOdb_Active_Record::SetDatabaseAdapter($db);
      -
      - -

    5. Table Rows as Objects
    6. -

      -First, let's create a temporary table in our MySQL database that we can use for demonstrative purposes throughout the rest of this tutorial. We can do this by sending a CREATE query: - -

      -$db->Execute("CREATE TEMPORARY TABLE `persons` (
      -                `id` int(10) unsigned NOT NULL auto_increment,
      -                `name_first` varchar(100) NOT NULL default '',
      -                `name_last` varchar(100) NOT NULL default '',
      -                `favorite_color` varchar(100) NOT NULL default '',
      -                PRIMARY KEY  (`id`)
      -            ) ENGINE=MyISAM;
      -           ");
      - 
      -

      -ADOdb_Active_Record's are object representations of table rows. Each table in the database is represented by a class in PHP. To begin working with a table as a ADOdb_Active_Record, a class that extends ADOdb_Active_Records needs to be created for it. - -

      -class Person extends ADOdb_Active_Record{}
      -$person = new Person();
      -
      - -

      -In the above example, a new ADOdb_Active_Record object $person was created to access the "persons" table. Zend_Db_DataObject takes the name of the class, pluralizes it (according to American English rules), and assumes that this is the name of the table in the database. -

      -This kind of behavior is typical of ADOdb_Active_Record. It will assume as much as possible by convention rather than explicit configuration. In situations where it isn't possible to use the conventions that ADOdb_Active_Record expects, options can be overridden as we'll see later. - -

    7. Table Columns as Object Properties
    8. -

      -When the $person object was instantiated, ADOdb_Active_Record read the table metadata from the database itself, and then exposed the table's columns (fields) as object properties. -

      -Our "persons" table has three fields: "name_first", "name_last", and "favorite_color". Each of these fields is now a property of the $person object. To see all these properties, use the ADOdb_Active_Record::getAttributeNames() method: -

      -var_dump($person->getAttributeNames());
      -
      -/**
      - * Outputs the following:
      - * array(4) {
      - *    [0]=>
      - *    string(2) "id"
      - *    [1]=>
      - *    string(9) "name_first"
      - *    [2]=>
      - *    string(8) "name_last"
      - *    [3]=>
      - *    string(13) "favorite_color"
      - *  }
      - */
      -    
      -

      -One big difference between ADOdb and Zend's implementation is we do not automatically convert to camelCaps style. -

      -

    9. Inserting and Updating a Record
    10. - -An ADOdb_Active_Record object is a representation of a single table row. However, when our $person object is instantiated, it does not reference any particular row. It is a blank record that does not yet exist in the database. An ADOdb_Active_Record object is considered blank when its primary key is NULL. The primary key in our persons table is "id". -

      -To insert a new record into the database, change the object's properties and then call the ADOdb_Active_Record::save() method: -

      -$person = new Person();
      -$person->nameFirst = 'Andi';
      -$person->nameLast  = 'Gutmans';
      -$person->save();
      - 
      -

      -Oh, no! The above code snippet does not insert a new record into the database. Instead, outputs an error: -

      -1048: Column 'name_first' cannot be null
      - 
      -

      -This error occurred because MySQL rejected the INSERT query that was generated by ADOdb_Active_Record. If exceptions are enabled in ADOdb and you are using PHP5, an error will be thrown. In the definition of our table, we specified all of the fields as NOT NULL; i.e., they must contain a value. -

      -ADOdb_Active_Records are bound by the same contraints as the database tables they represent. If the field in the database cannot be NULL, the corresponding property in the ADOdb_Active_Record also cannot be NULL. In the example above, we failed to set the property $person->favoriteColor, which caused the INSERT to be rejected by MySQL. -

      -To insert a new ADOdb_Active_Record in the database, populate all of ADOdb_Active_Record's properties so that they satisfy the constraints of the database table, and then call the save() method: -

      -/**
      - * Calling the save() method will successfully INSERT
      - * this $person into the database table.
      - */
      -$person = new Person();
      -$person->name_first     = 'Andi';
      -$person->name_last      = 'Gutmans';
      -$person->favorite_color = 'blue';
      -$person->save();
      -
      -

      -Once this $person has been INSERTed into the database by calling save(), the primary key can now be read as a property. Since this is the first row inserted into our temporary table, its "id" will be 1: -

      -var_dump($person->id);
      -
      -/**
      - * Outputs the following:
      - * string(1)
      - */
      - 
      -

      -From this point on, updating it is simply a matter of changing the object's properties and calling the save() method again: - -

      -$person->favorite_color = 'red';
      -$person->save();
      -   
      -

      -The code snippet above will change the favorite color to red, and then UPDATE the record in the database. - - -

      ADOdb Specific Functionality

      -

    11. Setting the Table Name
    12. -

      The default behaviour on creating an ADOdb_Active_Record is to "pluralize" the class name and - use that as the table name. Often, this is not the case. For example, the Person class could be reading - from the "People" table. -

      We provide two ways to define your own table: -

      1. Use a constructor parameter to override the default table naming behaviour. -

      -	class Person extends ADOdb_Active_Record{}
      -	$person = new Person('People');
      -
      -

      2. Define it in a class declaration: -

      -	class Person extends ADOdb_Active_Record
      -	{
      -	var $_table = 'People';
      -	}
      -	$person = new Person();
      -
      - -

    13. $ADODB_ASSOC_CASE
    14. -

      This allows you to control the case of field names and properties. For example, all field names in Oracle are upper-case by default. So you -can force field names to be lowercase using $ADODB_ASSOC_CASE. Legal values are as follows: -

      - 0: lower-case
      - 1: upper-case
      - 2: native-case
      -
      -

      So to force all Oracle field names to lower-case, use -

      -$ADODB_ASSOC_CASE = 0;
      -$person = new Person('People');
      -$person->name = 'Lily';
      -$ADODB_ASSOC_CASE = 2;
      -$person2 = new Person('People');
      -$person2->NAME = 'Lily'; 
      -
      - -

      Also see $ADODB_ASSOC_CASE. - -

    15. ADOdb_Active_Record::Save()
    16. -

      -Saves a record by executing an INSERT or UPDATE SQL statement as appropriate. -

      Returns false on unsuccessful INSERT, true if successsful INSERT. -

      Returns 0 on failed UPDATE, and 1 on UPDATE if data has changed, and -1 if no data was changed, so no UPDATE statement was executed. - -

    17. ADOdb_Active_Record::Replace()
    18. -

      -ADOdb supports replace functionality, whereby the record is inserted if it does not exists, or updated otherwise. -

      -$rec = new ADOdb_Active_Record("product");
      -$rec->name = 'John';
      -$rec->tel_no = '34111145';
      -$ok = $rec->replace(); // 0=failure, 1=update, 2=insert
      -
      - - -

    19. ADOdb_Active_Record::Load($where)
    20. -

      Sometimes, we want to load a single record into an Active Record. We can do so using: -

      -$person->load("id=3");
      -
      -// or using bind parameters
      -
      -$person->load("id=?", array(3));
      -
      -

      Returns false if an error occurs. - -

    21. ADOdb_Active_Record::Find($whereOrderBy, $bindarr=false, $pkeyArr=false)
    22. -

      We want to retrieve an array of active records based on some search criteria. For example: -

      -class Person extends ADOdb_Active_Record {
      -var $_table = 'people';
      -}
      -
      -$person = new Person();
      -$peopleArray =& $person->Find("name like ? order by age", array('Sm%'));
      -
      - -

    23. Error Handling and Debugging
    24. -

      -In PHP5, if adodb-exceptions.inc.php is included, then errors are thrown. Otherwise errors are handled by returning a value. False by default means an error has occurred. You can get the last error message using the ErrorMsg() function. -

      -To check for errors in ADOdb_Active_Record, do not poll ErrorMsg() as the last error message will always be returned, even if it occurred several operations ago. Do this instead: -

      -# right!
      -$ok = $rec->Save();
      -if (!$ok) $err = $rec->ErrorMsg();
      -
      -# wrong :(
      -$rec->Save();
      -if ($rec->ErrorMsg()) echo "Wrong way to detect error";
      -
      -

      The ADOConnection::Debug property is obeyed. So -if $db->debug is enabled, then ADOdb_Active_Record errors are also outputted to standard output and written to the browser. - -

    25. ADOdb_Active_Record::Set()
    26. -

      You can convert an array to an ADOdb_Active_Record using Set(). The array must be numerically indexed, and have all fields of the table defined in the array. The elements of the array must be in the table's natural order too. -

      -$row = $db->GetRow("select * from tablex where id=$id");
      -
      -# PHP4 or PHP5 without enabling exceptions
      -$obj =& new ADOdb_Active_Record('Products');
      -if ($obj->ErrorMsg()){
      -	echo $obj->ErrorMsg();
      -} else {
      -	$obj->Set($row);
      -}
      -
      -# in PHP5, with exceptions enabled:
      -
      -include('adodb-exceptions.inc.php');
      -try {
      -	$obj =& new ADOdb_Active_Record('Products');
      -	$obj->Set($row);
      -} catch(exceptions $e) {
      -	echo $e->getMessage();
      -}
      -
      -

      -

    27. Primary Keys
    28. -

      -ADOdb_Active_Record does not require the table to have a primary key. You can insert records for such a table, but you will not be able to update nor delete. -

      Sometimes you are retrieving data from a view or table that has no primary key, but has a unique index. You can dynamically set the primary key of a table through the constructor, or using ADOdb_Active_Record::SetPrimaryKeys(): -

      -	$pkeys = array('category','prodcode');
      -	
      -	// set primary key using constructor
      -	$rec = new ADOdb_Active_Record('Products', $pkeys);
      -	
      -	 // or use method
      -	$rec->SetPrimaryKeys($pkeys);
      -
      - - -

    29. Retrieval of Auto-incrementing ID
    30. -When creating a new record, the retrieval of the last auto-incrementing ID is not reliable for databases that do not support the Insert_ID() function call (check $connection->hasInsertID). In this case we perform a SELECT MAX($primarykey) FROM $table, which will not work reliably in a multi-user environment. You can override the ADOdb_Active_Record::LastInsertID() function in this case. - -

    31. Dealing with Multiple Databases
    32. -

      -Sometimes we want to load data from one database and insert it into another using ActiveRecords. This can be done using the optional parameter of the ADOdb_Active_Record constructor. In the following example, we read data from db.table1 and store it in db2.table2: -

      -$db = NewADOConnection(...);
      -$db2 = NewADOConnection(...);
      -
      -ADOdb_Active_Record::SetDatabaseAdapter($db2);
      -
      -$activeRecs = $db->GetActiveRecords('table1');
      -
      -foreach($activeRecs as $rec) {
      -	$rec2 = new ADOdb_Active_Record('table2',$db2);
      -	$rec2->id = $rec->id;
      -	$rec2->name = $rec->name;
      -	
      -	$rec2->Save();
      -}
      -
      -

      -If you have to pass in a primary key called "id" and the 2nd db connection in the constructor, you can do so too: -

      -$rec = new ADOdb_Active_Record("table1",array("id"),$db2);
      -
      - -

    33. $ADODB_ACTIVE_CACHESECS
    34. -

      You can cache the table metadata (field names, types, and other info such primary keys) in $ADODB_CACHE_DIR (which defaults to /tmp) by setting -the global variable $ADODB_ACTIVE_CACHESECS to a value greater than 0. This will be the number of seconds to cache. - You should set this to a value of 30 seconds or greater for optimal performance. - -

    35. Active Record Considered Bad?
    36. -

      Although the Active Record concept is useful, you have to be aware of some pitfalls when using Active Record. The level of granularity of Active Record is individual records. It encourages code like the following, used to increase the price of all furniture products by 10%: -

      - $recs = $db->GetActiveRecords("Products","category='Furniture'");
      - foreach($recs as $rec) {
      -    $rec->price *= 1.1; // increase price by 10% for all Furniture products
      -    $rec->save();
      - }
      -
      -Of course a SELECT statement is superior because it's simpler and much more efficient (probably by a factor of x10 or more): -
      -   $db->Execute("update Products set price = price * 1.1 where category='Furniture'");
      -
      -

      Another issue is performance. For performance sensitive code, using direct SQL will always be faster than using Active Records due to overhead and the fact that all fields in a row are retrieved (rather than only the subset you need) whenever an Active Record is loaded. - -

    37. Transactions
    38. -

      -The default transaction mode in ADOdb is autocommit. So that is the default with active record too. -The general rules for managing transactions still apply. Active Record to the database is a set of insert/update/delete statements, and the db has no knowledge of active records. -

      -Smart transactions, that does an auto-rollback if an error occurs, is still the best method to multiple activities (inserts/updates/deletes) that need to be treated as a single transaction: -

      -$conn->StartTrans();
      -$parent->save();
      -$child->save();
      -$conn->CompleteTrans();
      -
      - -

      ADOConnection Supplement

      - -

    39. ADOConnection::GetActiveRecords()
    40. -

      -This allows you to retrieve an array of ADOdb_Active_Records. Returns false if an error occurs. -

      -$table = 'products';
      -$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
      -$activeRecArr = $db->GetActiveRecords($table, $whereOrderBy);
      -foreach($activeRecArr as $rec) {
      -	$rec->id = rand();
      -	$rec->save();
      -}
      -
      -

      -And to retrieve all records ordered by specific fields: -

      -$whereOrderBy = "1=1 ORDER BY Name";
      -$activeRecArr = $db->ADOdb_Active_Records($table);
      -
      -

      -To use bind variables (assuming ? is the place-holder for your database): -

      -$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
      -						array('A%'));
      -
      -

      You can also define the primary keys of the table by passing an array of field names: -

      -$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
      -						array('A%'), array('id'));
      -
      - -

    41. ADOConnection::GetActiveRecordsClass()
    42. -

      -This allows you to retrieve an array of objects derived from ADOdb_Active_Records. Returns false if an error occurs. -

      -class Product extends ADOdb_Active_Records{};
      -$table = 'products';
      -$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
      -$activeRecArr = $db->GetActiveRecordsClass('Product',$table, $whereOrderBy);
      -
      -# the objects in $activeRecArr are of class 'Product'
      -foreach($activeRecArr as $rec) {
      -	$rec->id = rand();
      -	$rec->save();
      -}
      -
      -

      -To use bind variables (assuming ? is the place-holder for your database): -

      -$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
      -						array('A%'));
      -
      -

      You can also define the primary keys of the table by passing an array of field names: -

      -$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
      -						array('A%'), array('id'));
      -
      - -
    - -

  • ADOConnection::ErrorMsg()
  • -

    Returns last error message. -

  • ADOConnection::ErrorNo()
  • -

    Returns last error number. -

    Code Sample

    -

    The following works with PHP4 and PHP5 -

    -include('../adodb.inc.php');
    -include('../adodb-active-record.inc.php');
    -
    -// uncomment the following if you want to test exceptions
    -#if (PHP_VERSION >= 5) include('../adodb-exceptions.inc.php');
    -
    -$db = NewADOConnection('mysql://root@localhost/northwind');
    -$db->debug=1;
    -ADOdb_Active_Record::SetDatabaseAdapter($db);
    -
    -$db->Execute("CREATE TEMPORARY TABLE `persons` (
    -                `id` int(10) unsigned NOT NULL auto_increment,
    -                `name_first` varchar(100) NOT NULL default '',
    -                `name_last` varchar(100) NOT NULL default '',
    -                `favorite_color` varchar(100) NOT NULL default '',
    -                PRIMARY KEY  (`id`)
    -            ) ENGINE=MyISAM;
    -           ");
    -		   
    -class Person extends ADOdb_Active_Record{}
    -$person = new Person();
    -
    -echo "<p>Output of getAttributeNames: ";
    -var_dump($person->getAttributeNames());
    -
    -/**
    - * Outputs the following:
    - * array(4) {
    - *    [0]=>
    - *    string(2) "id"
    - *    [1]=>
    - *    string(9) "name_first"
    - *    [2]=>
    - *    string(8) "name_last"
    - *    [3]=>
    - *    string(13) "favorite_color"
    - *  }
    - */
    -
    -$person = new Person();
    -$person->nameFirst = 'Andi';
    -$person->nameLast  = 'Gutmans';
    -$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
    -
    -
    -$person = new Person();
    -$person->name_first     = 'Andi';
    -$person->name_last      = 'Gutmans';
    -$person->favorite_color = 'blue';
    -$person->save(); // this save will perform an INSERT successfully
    -
    -echo "<p>The Insert ID generated:"; print_r($person->id);
    -
    -$person->favorite_color = 'red';
    -$person->save(); // this save() will perform an UPDATE
    -
    -$person = new Person();
    -$person->name_first     = 'John';
    -$person->name_last      = 'Lim';
    -$person->favorite_color = 'lavender';
    -$person->save(); // this save will perform an INSERT successfully
    -
    -// load record where id=2 into a new ADOdb_Active_Record
    -$person2 = new Person();
    -$person2->Load('id=2');
    -var_dump($person2);
    -
    -// retrieve an array of records
    -$activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2));
    -$person2 =& $activeArr[0];
    -echo "<p>Name first (should be John): ",$person->name_first, "<br>Class = ",get_class($person2);	
    -
    - -

    Todo (Code Contributions welcome)

    -

    Check _original and current field values before update, only update changes. Also if the primary key value is changed, then on update, we should save and use the original primary key values in the WHERE clause! -

    Handle 1-to-many relationships. -

    PHP5 specific: Make GetActiveRecords*() return an Iterator. -

    PHP5 specific: Change PHP5 implementation of Active Record to use __get() and __set() for better performance. - -

    Change Log

    -

    0.07 -

    $ADODB_ASSOC_CASE=2 did not work properly. Fixed. -

    Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter. - -

    0.06 -

    Added ErrorNo(). -

    Fixed php 5.2.0 compat issues. - -

    0.05 -

    If inserting a record and the value of a primary key field is null, then we do not insert that field in as -we assume it is an auto-increment field. Needed by mssql. - -

    0.04 5 June 2006
    -

    Added support for declaring table name in $_table in class declaration. Thx Bill Dueber for idea. -

    Added find($where,$bindarr=false) method to retrieve an array of active record objects. - -

    0.03
    -- Now we only update fields that have changed, using $this->_original.
    -- We do not include auto_increment fields in replace(). Thx Travis Cline
    -- Added ADODB_ACTIVE_CACHESECS.
    - -

    0.02
    -- Much better error handling. ErrorMsg() implemented. Throw implemented if adodb-exceptions.inc.php detected.
    -- You can now define the primary keys of the view or table you are accessing manually.
    -- The Active Record allows you to create an object which does not have a primary key. You can INSERT but not UPDATE in this case. -- Set() documented.
    -- Fixed _pluralize bug with y suffix. - -

    - 0.01 6 Mar 2006
    -- Fixed handling of nulls when saving (it didn't save nulls, saved them as '').
    -- Better error handling messages.
    -- Factored out a new method GetPrimaryKeys().
    -

    - 0.00 5 Mar 2006
    - 1st release - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-adodb.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-adodb.htm.svn-base deleted file mode 100755 index 69c94e5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-adodb.htm.svn-base +++ /dev/null @@ -1,3568 +0,0 @@ - -ADODB Manual - - - - - - - -

    ADOdb Library for PHP

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com)

    -

    This software is dual licensed using BSD-Style and LGPL. This - means you can use it in compiled proprietary and commercial products.

    - - -

    Useful ADOdb links: Download   Other Docs - -

    Introduction
    - Unique Features
    - How People are using ADOdb
    - Feature Requests and Bug Reports
    -
    Installation
    - Minimum Install
    - Initializing Code and Connectioning to Databases
    -
      Data Source Name (DSN) Support   Connection Examples
    - High Speed ADOdb - tuning tips
    - Hacking and Modifying ADOdb Safely
    - PHP5 Features

    - foreach iterators exceptions
    - Supported Databases
    - Tutorials
    - Example 1: Select
    - Example 2: Advanced Select
    - Example 3: Insert
    - Example 4: Debugging  rs2html - example
    - Example 5: MySQL and Menus
    - Example 6: Connecting to Multiple Databases at once
    - Example 7: Generating Update and Insert SQL
    - Example 8: Implementing Scrolling with Next and Previous
    - Example 9: Exporting in CSV or Tab-Delimited Format
    - Example 10: Custom filters
    - Example 11: Smart Transactions
    -
    - Using Custom Error Handlers and PEAR_Error
    - Data Source Names
    - Caching
    - Pivot Tables
    -

    REFERENCE -

    Variables: $ADODB_COUNTRECS -$ADODB_ANSI_PADDING_OFF - $ADODB_CACHE_DIR
    -         $ADODB_FORCE_TYPE - $ADODB_FETCH_MODE - $ADODB_LANG ADODB_QUOTE_FIELDNAMES
    - Constants:
    ADODB_ASSOC_CASE -
    - ADOConnection
    - Connections: Connect PConnect - NConnect IsConnected
    - Executing SQL: Execute CacheExecute - SelectLimit CacheSelectLimit - Param Prepare PrepareSP - InParameter OutParameter AutoExecute -
    -               GetOne - CacheGetOne GetRow CacheGetRow - GetAll CacheGetAll GetCol - CacheGetCol GetAssoc CacheGetAssoc Replace -
    -                ExecuteCursor - (oci8 only)
    - Generates SQL strings: GetUpdateSQL GetInsertSQL - Concat IfNull length random substr - qstr Param OffsetDate SQLDate - DBDate DBTimeStamp - BindDate BindTimeStamp -
    - Blobs: UpdateBlob UpdateClob - UpdateBlobFile BlobEncode - BlobDecode
    - Paging/Scrolling: PageExecute CachePageExecute
    - Cleanup: CacheFlush Close
    - Transactions: StartTrans CompleteTrans - FailTrans HasFailedTrans - BeginTrans CommitTrans - RollbackTrans SetTransactionMode
    - Fetching Data:
    SetFetchMode
    - Strings: concat length qstr quote substr
    - Dates: DBDate DBTimeStamp UnixDate - BindDate BindTimeStamp - UnixTimeStamp OffsetDate - SQLDate
    - Row Management: Affected_Rows Insert_ID RowLock - GenID CreateSequence DropSequence -
    - Error Handling: ErrorMsg ErrorNo - MetaError MetaErrorMsg IgnoreErrors
    - Data Dictionary (metadata): MetaDatabases MetaTables - MetaColumns MetaColumnNames - MetaPrimaryKeys MetaForeignKeys - ServerInfo
    - Statistics and Query-Rewriting: LogSQL fnExecute - and fnCacheExecute
    -
    Deprecated: Bind BlankRecordSet - Parameter -
    - ADORecordSet

    - - Returns one field: Fields
    - Returns one row:FetchRow FetchInto - FetchObject FetchNextObject - FetchObj FetchNextObj - GetRowAssoc
    - Returns all rows:GetArray GetRows - GetAssoc
    - Scrolling:Move MoveNext MoveFirst - MoveLast AbsolutePosition CurrentRow - AtFirstPage AtLastPage - AbsolutePage

    - Menu generation:GetMenu GetMenu2
    - Dates:UserDate UserTimeStamp - UnixDate UnixTimeStamp
    -
    Recordset Info:RecordCount PO_RecordCount - NextRecordSet
    - Field Info:FieldCount FetchField - MetaType
    - Cleanup: Close
    -

    -

    rs2html  example
    - Differences between ADOdb and ADO
    - Database Driver Guide
    -
    Change Log
    -

    -

    Introduction

    -

    PHP's database access functions are not standardised. This creates a need for - a database class library to hide the differences between the different database - API's (encapsulate the differences) so we can easily switch databases. PHP 4.0.5 or later - is now required (because we use array-based str_replace).

    -

    We currently support MySQL, Oracle, Microsoft SQL Server, Sybase, Sybase SQL Anywhere, Informix, - PostgreSQL, FrontBase, SQLite, Interbase (Firebird and Borland variants), Foxpro, Access, ADO, DB2, SAP DB and ODBC. - We have had successful reports of connecting to Progress and CacheLite via ODBC. We hope more people - will contribute drivers to support other databases.

    -

    PHP4 supports session variables. You can store your session information using - ADOdb for true portability and scalability. See adodb-session.php for more information.

    -

    Also read tips_portable_sql.htm - for tips on writing - portable SQL.

    -

    Unique Features of ADOdb

    -
      -
    • Easy for Windows programmers to adapt to because many of the conventions - are similar to Microsoft's ADO.
    • -
    • Unlike other PHP database classes which focus only on select statements, - we provide support code to handle inserts and updates which can be adapted - to multiple databases quickly. Methods are provided for date handling, - string concatenation and string quoting characters for differing databases.
    • -
    • A metatype system is built in so that we can figure out that types - such as CHAR, TEXT and STRING are equivalent in different databases.
    • -
    • Easy to port because all the database dependant code are stored in - stub functions. You do not need to port the core logic of the classes.
    • -
    • Portable table and index creation with the datadict classes. -
    • Database performance monitoring and SQL tuning with the performance monitoring classes. -
    • Database-backed sessions with the session management classes. Supports session expiry notification. -
    • Object-Relational Mapping using ADOdb_Active_Record classes. -
    -

    How People are using ADOdb

    -Here are some examples of how people are using ADOdb (for a much longer list, -visit adodb-cool-apps): -
      -
    • PhpLens is a commercial data grid -component that allows both cool Web designers and serious unshaved -programmers to develop and maintain databases on the Web easily. -Developed by the author of ADOdb.

      - -

    • PHAkt: PHP Extension for DreamWeaver Ultradev allows you to script PHP in the popular Web page editor. Database handling provided by ADOdb.

      - -

    • Analysis Console for Intrusion Databases -(ACID): PHP-based analysis engine to search and process a database of -security incidents generated by security-related software such as IDSes -and firewalls (e.g. Snort, ipchains). By Roman Danyliw.

      - -

    • PostNuke is a very -popular free content management system and weblog system. It offers -full CSS support, HTML 4.01 transitional compliance throughout, an -advanced blocks system, and is fully multi-lingual enabled.

      - -

    • EasyPublish CMS -is another free content management system for managing information and -integrated modules on your internet, intranet- and extranet-sites. From -Norway.

      - -

    • NOLA is a full featured accounting, inventory, and job tracking application. It is licensed under the GPL, and developed by Noguska. -

    - -

    Feature Requests and Bug Reports

    -

    Feature requests and bug reports can be emailed to jlim#natsoft.com.my - or posted to the ADOdb Help forums at http://phplens.com/lens/lensforum/topics.php?id=4.

    -

    Installation Guide

    -

    Make sure you are running PHP 4.0.5 or later. - Unpack all the files into a directory accessible by your webserver.

    -

    To test, try modifying some of the tutorial examples. Make sure you customize - the connection settings correctly. You can debug using $db->debug = true as shown below:

    -
    <?php
    include('adodb/adodb.inc.php');
    $db = ADONewConnection($dbdriver); # eg 'mysql' or 'postgres'
    $db->debug = true;
    $db->Connect($server, $user, $password, $database);
    $rs = $db->Execute('select * from some_small_table');
    print "<pre>";
    print_r($rs->GetRows());
    print "</pre>";
    ?>
    - -

    Minimum Install

    -

    For developers who want to release a minimal install of ADOdb, you will need: -

      -
    • adodb.inc.php -
    • adodb-lib.inc.php -
    • adodb-time.inc.php -
    • drivers/adodb-$database.inc.php -
    • license.txt (for legal reasons) -
    • adodb-php4.inc.php -
    • adodb-iterator.inc.php (php5 functionality) -
    -Optional: -
      -
    • adodb-error.inc.php and lang/adodb-$lang.inc.php (if you use MetaError()) -
    • adodb-csvlib.inc.php (if you use cached recordsets - CacheExecute(), etc) -
    • adodb-exceptions.inc.php and adodb-errorhandler.inc.php (if you use adodb error handler or php5 exceptions). -
    • adodb-active-record.inc.php if you use Active Records. -
    - -

    Code Initialization Examples

    -

    When running ADOdb, at least two files are loaded. First is adodb/adodb.inc.php, - which contains all functions used by all database classes. The code specific - to a particular database is in the adodb/driver/adodb-????.inc.php file.

    - -

    For example, to connect to a mysql database:

    -
    include('/path/to/set/here/adodb.inc.php');
    $conn = &ADONewConnection('mysql');
    -

    Whenever you need to connect to a database, you create a Connection object - using the ADONewConnection($driver) function. - NewADOConnection($driver) is an alternative name for the same function.

    - -

    At this point, you are not connected to the database (no longer true if you pass in a dsn). You will first need to decide -whether to use persistent or non-persistent connections. The advantage of persistent -connections is that they are faster, as the database connection is never closed (even -when you call Close()). Non-persistent connections take up much fewer resources though, -reducing the risk of your database and your web-server becoming overloaded. -

    For persistent connections, -use $conn->PConnect(), - or $conn->Connect() for non-persistent connections. -Some database drivers also support NConnect(), which forces -the creation of a new connection. - - -

    Connection Gotcha: If you create two connections, but both use the same userid and password, -PHP will share the same connection. This can cause problems if the connections are meant to -different databases. The solution is to always use different userid's for different databases, - or use NConnect(). - - -

    Data Source Name (DSN) Support

    -

    Since ADOdb 4.51, you can connect to a database by passing a dsn to NewADOConnection() (or ADONewConnection, which is - the same function). The dsn format is: -

    	$driver://$username:$password@hostname/$database?options[=value]

    -NewADOConnection() calls Connect() or PConnect() internally for you. If the connection fails, false is returned. -

    	# non-persistent connection
    -	$dsn = 'mysql://root:pwd@localhost/mydb'; 
    -	$db = NewADOConnection($dsn);
    -	if (!$db) die("Connection failed");   
    -	
    -	# no need to call connect/pconnect!
    -	$arr = $db->GetArray("select * from table");
    -	
    -	# persistent connection
    -	$dsn2 = 'mysql://root:pwd@localhost/mydb?persist'; 
    -
    -

    -If you have special characters such as /:?_ in your dsn, then you need to rawurlencode them first: -

    	$pwd = rawurlencode($pwd);
    $dsn = "mysql://root:$pwd@localhost/mydb"; - $dsn2=rawurlencode("sybase_ase")."://user:pass@host/path?query";
    -

    -Legal options are: -

    -
    For all drivers - 'persist', 'persistent', 'debug', 'fetchmode', 'new' -
    Interbase/Firebird - - 'dialect','charset','buffers','role' -
    M'soft ADO - 'charpage' - -
    MySQL - 'clientflags' -
    MySQLi - 'port', 'socket', 'clientflags' -
    Oci8 - 'nls_date_format','charset' -
    -

    -For all drivers, when the options persist or persistent are set, a persistent connection is forced; similarly, when new is set, then -a new connection will be created using NConnect if the underlying driver supports it. -The debug option enables debugging. The fetchmode calls SetFetchMode(). -If no value is defined for an option, then the value is set to 1. -

    -ADOdb DSN's are compatible with version 1.0 of PEAR DB's DSN format. - -

    Examples of Connecting to Databases

    -

    MySQL and Most Other Database Drivers

    -

    MySQL connections are very straightforward, and the parameters are identical - to mysql_connect:

    -
    	$conn = &ADONewConnection('mysql'); 
    $conn->PConnect('localhost','userid','password','database');

    # or dsn - $dsn = 'mysql://user:pwd@localhost/mydb'; - $conn = ADONewConnection($dsn); # no need for Connect() - - # or persistent dsn - $dsn = 'mysql://user:pwd@localhost/mydb?persist'; - $conn = ADONewConnection($dsn); # no need for PConnect() - - # a more complex example: - $pwd = urlencode($pwd); - $flags = MYSQL_CLIENT_COMPRESS; - $dsn = "mysql://user:$pwd@localhost/mydb?persist&clientflags=$flags"; - $conn = ADONewConnection($dsn); # no need for PConnect() -
    -

    For most drivers, you can use the standard function: Connect($server, $user, $password, $database), or -a DSN since ADOdb 4.51. Exceptions to this are listed below. -

    - -

    PDO

    -

    PDO, which only works with PHP5, accepts a driver specific connection string: -

    -	$conn =& NewADConnection('pdo');
    -	$conn->Connect('mysql:host=localhost',$user,$pwd,$mydb);
    -	$conn->Connect('mysql:host=localhost;dbname=mydb',$user,$pwd);
    -	$conn->Connect("mysql:host=localhost;dbname=mydb;username=$user;password=$pwd");
    -
    -

    The DSN mechanism is also supported: -

    -	$conn =& NewADConnection("pdo_mysql://user:pwd@localhost/mydb?persist"); # persist is optional
    -
    -

    PostgreSQL

    -

    PostgreSQL 7 and 8 accepts connections using:

    -

    a. the standard connection string:

    -
    	$conn = &ADONewConnection('postgres');  
    $conn->PConnect('host=localhost port=5432 dbname=mary');
    -

    b. the classical 4 parameters:

    -
    	$conn->PConnect('localhost','userid','password','database');
    -

    c. dsn: -

    	$dsn = 'postgres://user:pwd@localhost/mydb?persist';  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -
    - -

    LDAP

    -

    Here is an example of querying a LDAP server. Thanks to Josh Eldridge for the driver and this example: -

    -require('/path/to/adodb.inc.php');
    -
    -/* Make sure to set this BEFORE calling Connect() */
    -$LDAP_CONNECT_OPTIONS = Array(
    -	Array ("OPTION_NAME"=>LDAP_OPT_DEREF, "OPTION_VALUE"=>2),
    -	Array ("OPTION_NAME"=>LDAP_OPT_SIZELIMIT,"OPTION_VALUE"=>100),
    -	Array ("OPTION_NAME"=>LDAP_OPT_TIMELIMIT,"OPTION_VALUE"=>30),
    -	Array ("OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION,"OPTION_VALUE"=>3),
    -	Array ("OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER,"OPTION_VALUE"=>13),
    -	Array ("OPTION_NAME"=>LDAP_OPT_REFERRALS,"OPTION_VALUE"=>FALSE),
    -	Array ("OPTION_NAME"=>LDAP_OPT_RESTART,"OPTION_VALUE"=>FALSE)
    -);
    -$host = 'ldap.baylor.edu';
    -$ldapbase = 'ou=People,o=Baylor University,c=US';
    -
    -$ldap = NewADOConnection( 'ldap' );
    -$ldap->Connect( $host, $user_name='', $password='', $ldapbase );
    -
    -echo "<pre>";
    -
    -print_r( $ldap->ServerInfo() );
    -$ldap->SetFetchMode(ADODB_FETCH_ASSOC);
    -$userName = 'eldridge';
    -$filter="(|(CN=$userName*)(sn=$userName*)(givenname=$userName*)(uid=$userName*))";
    -
    -$rs = $ldap->Execute( $filter );
    -if ($rs)
    -	while ($arr = $rs->FetchRow()) {
    -	     print_r($arr);	
    -	}
    -
    -$rs = $ldap->Execute( $filter );
    -if ($rs) 
    -	while (!$rs->EOF) {
    - 		print_r($rs->fields);	
    -		$rs->MoveNext();
    -	} 
    -	
    -print_r( $ldap->GetArray( $filter ) );
    -print_r( $ldap->GetRow( $filter ) );
    -
    -$ldap->Close();
    -echo "</pre>";
    -
    -

    Using DSN: -

    -$dsn = "ldap://ldap.baylor.edu/ou=People,o=Baylor University,c=US";
    -$db = NewADOConnection($dsn);
    -
    -

    Interbase/Firebird

    -You define the database in the $host parameter: -
    	$conn = &ADONewConnection('ibase'); 
    $conn->PConnect('localhost:c:\ibase\employee.gdb','sysdba','masterkey');
    -

    Or dsn: -

    	$dsn = 'firebird://user:pwd@localhost/mydb?persist&dialect=3';  # persist is optional
    $conn = ADONewConnection($dsn); # no need for Connect/PConnect
    -

    SQLite

    -Sqlite will create the database file if it does not exist. -
    	$conn = &ADONewConnection('sqlite');
    -	$conn->PConnect('c:\path\to\sqlite.db'); # sqlite will create if does not exist
    -

    Or dsn: -

    	$path = urlencode('c:\path\to\sqlite.db');
    -	$dsn = "sqlite://$path/?persist";  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -

    Oracle (oci8)

    -

    With oci8, you can connect in multiple ways. Note that oci8 works fine with -newer versions of the Oracle, eg. 9i and 10g.

    -

    a. PHP and Oracle reside on the same machine, use default SID.

    -
    	$conn->Connect(false, 'scott', 'tiger');
    -

    b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS'

    -
    	$conn->PConnect(false, 'scott', 'tiger', 'myTNS');
    -

    or

    -
     	$conn->PConnect('myTNS', 'scott', 'tiger');
    -

    c. Host Address and SID

    -
    -	$conn->connectSID = true;
    -	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'SID');
    -

    d. Host Address and Service Name

    -
    	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'servicename');
    -

    e. Oracle connection string: -

    	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))
    (CONNECT_DATA=(SID=$sid)))";
    $conn->Connect($cstr, 'scott', 'tiger');
    -

    f. ADOdb dsn: -

    	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional
    $conn = ADONewConnection($dsn); # no need for Connect/PConnect

    $dsn = 'oci8://user:pwd@host/sid';
    $conn = ADONewConnection($dsn);

    $dsn = 'oci8://user:pwd@/'; # oracle on local machine
    $conn = ADONewConnection($dsn);
    -

    You can also set the charSet for Oracle 9.2 and later, supported since PHP 4.3.2, ADOdb 4.54: -

    	$conn->charSet = 'we8iso8859p1';
    $conn->Connect(...);

    # or
    $dsn = 'oci8://user:pwd@tnsname/?charset=WE8MSWIN1252';
    $db = ADONewConnection($dsn);
    - -

    DSN-less ODBC ( Access, MSSQL and DB2 examples)

    -

    ODBC DSN's can be created in the ODBC control panel, or you can use a DSN-less - connection.To use DSN-less connections with ODBC you need PHP 4.3 or later. -

    -

    For Microsoft Access:

    -
    	$db =& ADONewConnection('access');
    $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\\northwind.mdb;Uid=Admin;Pwd=;"; - $db->Connect($dsn); -
    -For Microsoft SQL Server: -
    	$db =& ADONewConnection('odbc_mssql');
    $dsn = "Driver={SQL Server};Server=localhost;Database=northwind;";
    $db->Connect($dsn,'userid','password');
    -or if you prefer to use the mssql extension (which is limited to mssql 6.5 functionality): -
    	$db =& ADONewConnection('mssql');
    $db->Execute('localhost', 'userid', 'password', 'northwind');
    -For DB2: -
    -	$dbms = 'db2'; # or 'odbc_db2' if db2 extension not available
    -	$db =& ADONewConnection($dbms);
    -	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP;".
    -				"uid=root; pwd=secret";
    $db->Connect($dsn); -
    -DSN-less Connections with ADO
    -If you are using versions of PHP earlier than PHP 4.3.0, DSN-less connections -only work with Microsoft's ADO, which is Microsoft's COM based API. An example -using the ADOdb library and Microsoft's ADO: -
    <?php
    include('adodb.inc.php');
    $db = &ADONewConnection("ado_mssql");
    print "<h1>Connecting DSN-less $db->databaseType...</h1>";

    $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};"
    . "SERVER=flipper;DATABASE=ai;UID=sa;PWD=;" ;
    - $db->Connect($myDSN); - - $rs = $db->Execute("select * from table"); - $arr = $rs->GetArray(); - print_r($arr); -?> -
    -

    High Speed ADOdb - tuning tips

    -

    ADOdb is a big class library, yet it consistently beats all other PHP class - libraries in performance. This is because it is designed in a layered fashion, - like an onion, with the fastest functions in the innermost layer. Stick to the - following functions for best performance:

    - - - - - - - -
    Innermost Layer

    Connect, PConnect, NConnect
    - Execute, CacheExecute
    - SelectLimit, CacheSelectLimit
    - MoveNext, Close
    - qstr, Affected_Rows, Insert_ID

    -

    The fastest way to access the field data is by accessing the array $recordset->fields - directly. Also set the global variables $ADODB_FETCH_MODE - = ADODB_FETCH_NUM, and (for oci8, ibase/firebird and odbc) $ADODB_COUNTRECS = false - before you connect to your database.

    -

    Consider using bind parameters if your database supports it, as it improves - query plan reuse. Use ADOdb's performance tuning system to identify bottlenecks - quickly. At the time of writing (Dec 2003), this means oci8 and odbc drivers.

    -

    Lastly make sure you have a PHP accelerator cache installed such as APC, Turck - MMCache, Zend Accelerator or ionCube.

    -

    Some examples:

    - -
    Fastest data retrieval using PHPFastest data retrieval using ADOdb extension
    -
    $rs =& $rs->Execute($sql);
    while (!$rs->EOF) {
    var_dump($rs->fields);
    $rs->MoveNext();
    }
    -
    $rs =& $rs->Execute($sql);
    $array = adodb_getall($rs);
    var_dump($array);


    -

    Advanced Tips -

    If you have the ADOdb C extension installed, - you can replace your calls to $rs->MoveNext() with adodb_movenext($rs). - This doubles the speed of this operation. For retrieving entire recordsets at once, -use GetArray(), which uses the high speed extension function adodb_getall($rs) internally. -

    Execute() is the default way to run queries. You can use the low-level functions _Execute() and _query() -to reduce query overhead. Both these functions share the same parameters as Execute(). -

    If you do not have any bind parameters or your database supports -binding (without emulation), -then you can call _Execute() directly. Calling this function bypasses -bind emulation. Debugging is still supported in _Execute(). -

    If you do not require debugging facilities nor emulated -binding, and do not require a recordset to be returned, then you can -call _query. This is great for inserts, updates and deletes. Calling -this function -bypasses emulated binding, debugging, and recordset handling. Either -the resultid, true or false are returned by _query().

    For Informix, you can disable scrollable cursors with $db->cursorType = 0. -

    -

    Hacking ADOdb Safely

    -

    You might want to modify ADOdb for your own purposes. Luckily you can -still maintain backward compatibility by sub-classing ADOdb and using the $ADODB_NEWCONNECTION -variable. $ADODB_NEWCONNECTION allows you to override the behaviour of ADONewConnection(). -ADOConnection() checks for this variable and will call -the function-name stored in this variable if it is defined. -

    In the following example, new functionality for the connection object -is placed in the hack_mysql and hack_postgres7 classes. The recordset class naming convention -can be controlled using $rsPrefix. Here we set it to 'hack_rs_', which will make ADOdb use -hack_rs_mysql and hack_rs_postgres7 as the recordset classes. - - -

    class hack_mysql extends adodb_mysql {
    var $rsPrefix = 'hack_rs_';
    /* Your mods here */
    }

    class hack_rs_mysql extends ADORecordSet_mysql {
    /* Your mods here */
    }

    class hack_postgres7 extends adodb_postgres7 {
    var $rsPrefix = 'hack_rs_';
    /* Your mods here */
    }

    class hack_rs_postgres7 extends ADORecordSet_postgres7 {
    /* Your mods here */
    }

    $ADODB_NEWCONNECTION = 'hack_factory';

    function& hack_factory($driver)
    {
    if ($driver !== 'mysql' && $driver !== 'postgres7') return false;

    $driver = 'hack_'.$driver;
    $obj = new $driver();
    return $obj;
    }

    include_once('adodb.inc.php');
    -

    Don't forget to call the constructor of the parent class in -your constructor. If you want to use the default ADOdb drivers return -false in the above hack_factory() function. - -

    PHP5 Features

    - ADOdb 4.02 or later will transparently determine which version of PHP you are using. -If PHP5 is detected, the following features become available: -
      - -
    • PDO: PDO drivers are available. See the connection examples. Currently PDO drivers are - not as powerful as native drivers, and should be treated as experimental.

      - -
    • Foreach iterators: This is a very natural way of going through a recordset: -
      	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
      $rs = $db->Execute($sql);
      foreach($rs as $k => $row) {
      echo "r1=".$row[0]." r2=".$row[1]."<br>";
      }
      -

      - -

    • Exceptions: Just include adodb-exceptions.inc.php and you can now -catch exceptions on errors as they occur. -
      	include("../adodb-exceptions.inc.php"); 
      include("../adodb.inc.php");
      try {
      $db = NewADOConnection("oci8");
      $db->Connect('','scott','bad-password');
      } catch (exception $e) {
      var_dump($e);
      adodb_backtrace($e->gettrace());
      }
      -

      Note that reaching EOF is not considered an error nor an exception. -

    -

    Databases Supported

    -The name below is the value you pass to NewADOConnection($name) to create a connection object for that database. -

    -

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTestedDatabaseRecordCount() usablePrerequisitesOperating Systems
    accessBMicrosoft Access/Jet. You need to create an ODBC DSN.Y/NODBC Windows only
    adoB

    Generic ADO, not tuned for specific databases. Allows - DSN-less connections. For best performance, use an OLEDB provider. This - is the base class for all ado drivers.

    -

    You can set $db->codePage before connecting.

    ? depends on databaseADO or OLEDB providerWindows only
    ado_accessBMicrosoft Access/Jet using ADO. Allows DSN-less connections. - For best performance, use an OLEDB provider.Y/NADO or OLEDB providerWindows only
    ado_mssqlBMicrosoft SQL Server using ADO. Allows DSN-less connections. - For best performance, use an OLEDB provider.Y/NADO or OLEDB providerWindows only
    db2CUses PHP's db2-specific extension for better performance.Y/NDB2 CLI/ODBC interface

    Unix and Windows. Requires IBM DB2 Universal Database client.

    odbc_db2CConnects to DB2 using generic ODBC extension.Y/NDB2 CLI/ODBC interface

    Unix and Windows. Unix - install hints. I have had reports that the $host and $database params have to be reversed in Connect() when using the CLI interface.

    vfpAMicrosoft Visual FoxPro. You need to create an ODBC DSN.Y/NODBCWindows only
    fbsqlCFrontBase. Y?

    Unix and Windows

    ibaseBInterbase 6 or earlier. Some users report you might need - to use this
    - $db->PConnect('localhost:c:/ibase/employee.gdb', "sysdba", "masterkey") - to connect. Lacks Affected_Rows currently.
    -
    - You can set $db->role, $db->dialect, $db->buffers and $db->charSet before connecting.
    Y/NInterbase clientUnix and Windows
    firebirdCFirebird version of interbase.Y/NInterbase clientUnix and Windows
    borland_ibaseCBorland version of Interbase 6.5 or later. Very sad that - the forks differ.Y/NInterbase clientUnix and Windows
    informixCGeneric informix driver. Use this if you are using Informix 7.3 or later.Y/NInformix clientUnix and Windows
    informix72C Informix databases before Informix 7.3 that do no support - SELECT FIRST.Y/NInformix clientUnix and Windows
    ldapCLDAP driver. See this example for usage information. LDAP extension?
    mssqlA

    Microsoft SQL Server 7 and later. Works - with Microsoft SQL Server 2000 also. Note that date formating is problematic - with this driver. For example, the PHP mssql extension does not return - the seconds for datetime!

    Y/NMssql client

    Unix and Windows.
    - Unix install - howto and another - one.

    mssqlpoA

    Portable mssql driver. Identical to above - mssql driver, except that '||', the concatenation operator, is converted - to '+'. Useful for porting scripts from most other sql variants that use - ||.

    Y/NMssql client

    Unix and Windows.
    - Unix install howto
    .

    mysqlAMySQL without transaction support. You can also set $db->clientFlags - before connecting.YMySQL clientUnix and Windows
    mysqlt or maxsqlA

    MySQL with transaction support. We recommend using - || as the concat operator for best portability. This can be done by running - MySQL using:
    - mysqld --ansi or mysqld --sql-mode=PIPES_AS_CONCAT

    Y/NMySQL clientUnix and Windows
    oci8AOracle 8/9. Has more functionality than oracle driver - (eg. Affected_Rows). You might have to putenv('ORACLE_HOME=...') before - Connect/PConnect.

    There are 2 ways of connecting - - with server IP and service name:
    - PConnect('serverip:1521','scott','tiger','service')
    - or using an entry in TNSNAMES.ORA or ONAMES or HOSTNAMES:
    - PConnect(false, 'scott', 'tiger', $oraname).
    -

    Since 2.31, we support Oracle REF cursor variables directly - (see ExecuteCursor).

    Y/NOracle clientUnix and Windows
    oci805CSupports reduced Oracle functionality for Oracle 8.0.5. - SelectLimit is not as efficient as in the oci8 or oci8po drivers.Y/NOracle clientUnix and Windows
    oci8poAOracle 8/9 portable driver. This is nearly identical with - the oci8 driver except (a) bind variables in Prepare() use the ? convention, - instead of :bindvar, (b) field names use the more common PHP convention - of lowercase names.

    Use this driver if porting - from other databases is important. Otherwise the oci8 driver offers better - performance.

    Y/NOracle clientUnix and Windows
    odbcAGeneric ODBC, not tuned for specific databases. To connect, - use
    - PConnect('DSN','user','pwd'). This is the base class for all odbc derived - drivers.
    ? depends on databaseODBCUnix and Windows. Unix - hints.
    odbc_mssqlCUses ODBC to connect to MSSQLY/NODBCUnix and Windows.
    odbc_oracleCUses ODBC to connect to OracleY/NODBCUnix and Windows.
    odbtpCGeneric odbtp driver. Odbtp is a software for - accessing Windows ODBC data sources from other operating systems.Y/NodbtpUnix and Windows
    odbtp_unicodeCOdtbp with unicode supportY/NodbtpUnix and Windows
    oracleCImplements old Oracle 7 client API. Use oci8 - driver if possible for better performance.Y/NOracle clientUnix and Windows
    netezzaCNetezza driver. Netezza is based on postgres code-base.Y??
    pdoCGeneric PDO driver for PHP5. YPDO extension and database specific driversUnix and Windows.
    postgresAGeneric PostgreSQL driver. Currently identical to postgres7 - driver.YPostgreSQL clientUnix and Windows.
    postgres64AFor PostgreSQL 6.4 and earlier which does not support LIMIT - internally.YPostgreSQL clientUnix and Windows.
    postgres7APostgreSQL which supports LIMIT and other version 7 functionality.YPostgreSQL clientUnix and Windows.
    postgres8APostgreSQL which supports version 8 functionality.YPostgreSQL clientUnix and Windows.
    sapdbCSAP DB. Should work reliably as based on ODBC driver.Y/NSAP ODBC client

    ?

    sqlanywhereCSybase SQL Anywhere. Should work reliably as based on ODBC - driver.Y/NSQL Anywhere ODBC client

    ?

    sqliteBSQLite.Y-

    Unix and Windows.

    sqlitepoBPortable SQLite driver. This is because assoc mode does not work like other drivers in sqlite. - Namely, when selecting (joining) multiple tables, the table - names are included in the assoc keys in the "sqlite" driver.

    - In "sqlitepo" driver, the table names are stripped from the returned column names. - When this results in a conflict, the first field get preference. -

    Y-

    Unix and Windows.

    sybaseCSybase. Y/NSybase client

    Unix and Windows.

    sybase_aseCSybase ASE. Y/NSybase client

    Unix and Windows.

    - -

    The "Tested" column indicates how extensively the code has been tested - and used.
    - A = well tested and used by many people
    - B = tested and usable, but some features might not be implemented
    - C = user contributed or experimental driver. Might not fully support all of - the latest features of ADOdb.

    -

    The column "RecordCount() usable" indicates whether RecordCount() - return the number of rows, or returns -1 when a SELECT statement is executed. - If this column displays Y/N then the RecordCount() is emulated when the global - variable $ADODB_COUNTRECS=true (this is the default). Note that for large recordsets, - it might be better to disable RecordCount() emulation because substantial amounts - of memory are required to cache the recordset for counting. Also there is a - speed penalty of 40-50% if emulation is required. This is emulated in most databases - except for PostgreSQL and MySQL. This variable is checked every time a query - is executed, so you can selectively choose which recordsets to count.

    -

    -


    -

    Tutorials

    -

    Example 1: Select Statement

    -

    Task: Connect to the Access Northwind DSN, display the first 2 columns of each - row.

    -

    In this example, we create a ADOConnection object, which represents the connection - to the database. The connection is initiated with PConnect, - which is a persistent connection. Whenever we want to query the database, we - call the ADOConnection.Execute() - function. This returns an ADORecordSet object which is actually a cursor that - holds the current row in the array fields[]. - We use MoveNext() - to move from row to row.

    -

    NB: A useful function that is not used in this example is SelectLimit, - which allows us to limit the number of rows shown. -

    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind DSN
    $recordSet = &$conn->Execute('select * from products');
    if (!$recordSet)
    print $conn->ErrorMsg();
    else
    while (!$recordSet->EOF) {
    print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';
    $recordSet->MoveNext();
    }
    - -$recordSet->Close(); # optional
    $conn->Close(); # optional
    -?> -
    -

    The $recordSet returned stores - the current row in the $recordSet->fields - array, indexed by column number (starting from zero). We use the MoveNext() - function to move to the next row. The EOF - property is set to true when end-of-file is reached. If an error occurs in Execute(), - we return false instead of a recordset.

    -

    The $recordSet->fields[] array is generated by the PHP database - extension. Some database extensions only index by number and do not index the - array by field name. To force indexing by name - that is associative arrays - - use the SetFetchMode function. Each recordset saves and uses whatever fetch - mode was set when the recordset was created in Execute() or SelectLimit(). -

    	$db->SetFetchMode(ADODB_FETCH_NUM);
    $rs1 = $db->Execute('select * from table');
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1') -
    -

    -

    To get the number of rows in the select statement, you can use $recordSet->RecordCount(). - Note that it can return -1 if the number of rows returned cannot be determined.

    -

    Example 2: Advanced Select with Field Objects

    -

    Select a table, display the first two columns. If the second column is a date - or timestamp, reformat the date to US format.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $recordSet = &$conn->Execute('select CustomerID,OrderDate from Orders');
    if (!$recordSet)
    print $conn->ErrorMsg();
    else
    while (!$recordSet->EOF) {
    $fld = $recordSet->FetchField(1); - $type = $recordSet->MetaType($fld->type);

    if ( $type == 'D' || $type == 'T')
    print $recordSet->fields[0].' '.
    $recordSet->UserDate($recordSet->fields[1],'m/d/Y').'<BR>';
    else - print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';

    $recordSet->MoveNext();
    }
    -$recordSet->Close(); # optional
    $conn->Close(); # optional
    -?> -
    -

    In this example, we check the field type of the second column using FetchField(). - This returns an object with at least 3 fields.

    -
      -
    • name: name of column
    • -
    • type: native field type of column
    • -
    • max_length: maximum length of field. Some databases such as MySQL - do not return the maximum length of the field correctly. In these cases max_length - will be set to -1.
    • -
    -

    We then use MetaType() - to translate the native type to a generic type. Currently the following - generic types are defined:

    -
      -
    • C: character fields that should be shown in a <input type="text"> - tag.
    • -
    • X: TeXt, large text fields that should be shown in a <textarea>
    • -
    • B: Blobs, or Binary Large Objects. Typically images. -
    • D: Date field
    • -
    • T: Timestamp field
    • -
    • L: Logical field (boolean or bit-field)
    • -
    • I:  Integer field
    • -
    • N: Numeric field. Includes autoincrement, numeric, floating point, - real and integer.
    • -
    • R: Serial field. Includes serial, autoincrement integers. This works - for selected databases.
    • -
    -

    If the metatype is of type date or timestamp, then we print it using the user - defined date format with UserDate(), - which converts the PHP SQL date string format to a user defined one. Another - use for MetaType() - is data validation before doing an SQL insert or update.

    -

    Example 3: Inserting

    -

    Insert a row to the Orders table containing dates and strings that need to - be quoted before they can be accepted by the database, eg: the single-quote - in the word John's.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection

    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $shipto = $conn->qstr("John's Old Shoppe");

    $sql = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";
    $sql .= "values ('ANATR',2,".$conn->DBDate(time()).",$shipto)";

    if ($conn->Execute($sql) === false) {
    print 'error inserting: '.$conn->ErrorMsg().'<BR>';
    }
    ?>
    -

    In this example, we see the advanced date and quote handling facilities of - ADOdb. The unix timestamp (which is a long integer) is appropriately formated - for Access with DBDate(), - and the right escape character is used for quoting the John's Old Shoppe, - which is John''s Old Shoppe and not PHP's default John's - Old Shoppe with qstr(). -

    -

    Observe the error-handling of the Execute statement. False is returned by - Execute() if an error occured. The error message - for the last error that occurred is displayed in ErrorMsg(). - Note: php_track_errors might have to be enabled for error messages to - be saved.

    -

    Example 4: Debugging

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $shipto = $conn->qstr("John's Old Shoppe");
    $sql = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";
    $sql .= "values ('ANATR',2,".$conn->FormatDate(time()).",$shipto)";
    $conn->debug = true; -if ($conn->Execute($sql) === false) print 'error inserting';
    -?> -
    -

    In the above example, we have turned on debugging by setting debug = true. - This will display the SQL statement before execution, and also show any error - messages. There is no need to call ErrorMsg() - in this case. For displaying the recordset, see the rs2html() - example.

    -

    Also see the section on Custom Error Handlers.

    -

    Example 5: MySQL and Menus

    -

    Connect to MySQL database agora, and generate a <select> menu - from an SQL statement where the <option> captions are in the 1st column, - and the value to send back to the server is in the 2nd column.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->Execute($sql);
    print $rs->GetMenu('GetCust','Mary Rosli');
    ?>
    -

    Here we define a menu named GetCust, with the menu option 'Mary Rosli' selected. - See GetMenu(). - We also have functions that return the recordset as an array: GetArray(), - and as an associative array with the key being the first column: GetAssoc().

    -

    Example 6: Connecting to 2 Databases At Once

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn1 = &ADONewConnection('mysql'); # create a mysql connection
    $conn2 = &ADONewConnection('oracle'); # create a oracle connection

    $conn1->PConnect($server, $userid, $password, $database);
    $conn2->PConnect(false, $ora_userid, $ora_pwd, $oraname);

    $conn1->Execute('insert ...');
    $conn2->Execute('update ...');
    ?>
    -

    -

    Example 7: Generating Update and Insert SQL

    -

    Since ADOdb 4.56, we support AutoExecute(), -which simplifies things by providing an advanced wrapper for GetInsertSQL() and GetUpdateSQL(). For example, -an INSERT can be carried out with: - -

    -    $record["firstname"] = "Bob"; 
    -    $record["lastname"] = "Smith"; 
    -    $record["created"] = time(); 
    -    $insertSQL = $conn->AutoExecute($rs, $record, 'INSERT'); 
    -
    - -and an UPDATE with: -
    -    $record["firstname"] = "Caroline"; 
    -    $record["lastname"] = "Smith"; # Update Caroline's lastname from Miranda to Smith 
    -    $insertSQL = $conn->AutoExecute($rs, $record, 'UPDATE', 'id = 1'); 
    -
    -

    -The rest of this section is out-of-date: -

    ADOdb 1.31 and later supports two new recordset functions: GetUpdateSQL( ) and -GetInsertSQL( ). This allow you to perform a "SELECT * FROM table query WHERE...", -make a copy of the $rs->fields, modify the fields, and then generate the SQL to -update or insert into the table automatically. -

    We show how the functions can be used when accessing a table with the following - fields: (ID, FirstName, LastName, Created). -

    Before these functions can be called, you need to initialize the recordset - by performing a select on the table. Idea and code by Jonathan Younger jyounger#unilab.com. - Since ADOdb 2.42, you can pass a table name instead of a recordset into -GetInsertSQL (in $rs), and it will generate an insert statement for that table. -

    -

    <?
    #==============================================
    # SAMPLE GetUpdateSQL() and GetInsertSQL() code
    #==============================================
    include('adodb.inc.php');
    include('tohtml.inc.php');

    #==========================
    # This code tests an insert

    $sql = "SELECT * FROM ADOXYZ WHERE id = -1";
    # Select an empty record from the database

    $conn = &ADONewConnection("mysql"); # create a connection
    $conn->debug=1;
    $conn->PConnect("localhost", "admin", "", "test"); # connect to MySQL, testdb
    $rs = $conn->Execute($sql); # Execute the query and get the empty recordset

    $record = array(); # Initialize an array to hold the record data to insert

    # Set the values for the fields in the record
    # Note that field names are case-insensitive
    $record["firstname"] = "Bob";
    $record["lastNamE"] = "Smith";
    $record["creaTed"] = time();

    # Pass the empty recordset and the array containing the data to insert
    # into the GetInsertSQL function. The function will process the data and return
    # a fully formatted insert sql statement.
    $insertSQL = $conn->GetInsertSQL($rs, $record);

    $conn->Execute($insertSQL); # Insert the record into the database

    #==========================
    # This code tests an update

    $sql = "SELECT * FROM ADOXYZ WHERE id = 1";
    # Select a record to update

    $rs = $conn->Execute($sql); # Execute the query and get the existing record to update

    $record = array(); # Initialize an array to hold the record data to update

    # Set the values for the fields in the record
    # Note that field names are case-insensitive
    $record["firstname"] = "Caroline";
    $record["LasTnAme"] = "Smith"; # Update Caroline's lastname from Miranda to Smith

    # Pass the single record recordset and the array containing the data to update
    # into the GetUpdateSQL function. The function will process the data and return
    # a fully formatted update sql statement with the correct WHERE clause.
    # If the data has not changed, no recordset is returned
    $updateSQL = $conn->GetUpdateSQL($rs, $record);

    $conn->Execute($updateSQL); # Update the record in the database
    $conn->Close();
    ?>
    - -$ADODB_FORCE_TYPE

    -The behaviour of AutoExecute(), GetUpdateSQL() and GetInsertSQL() -when converting empty or null PHP variables to SQL is controlled by the - global $ADODB_FORCE_TYPE variable. Set it to one of the values below. Default - is ADODB_FORCE_VALUE (3): -

    0 = ignore empty fields. All empty fields in array are ignored.
    1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values.
    2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values.
    3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and
    empty fields '' are set to empty '' sql values.

    define('ADODB_FORCE_IGNORE',0);
    define('ADODB_FORCE_NULL',1);
    define('ADODB_FORCE_EMPTY',2);
    define('ADODB_FORCE_VALUE',3);
    -

    -Thanks to Niko (nuko#mbnet.fi) for the $ADODB_FORCE_TYPE code. -

    -Note: the constant ADODB_FORCE_NULLS is obsolete since 4.52 and is ignored. Set $ADODB_FORCE_TYPE = ADODB_FORCE_NULL -for equivalent behaviour. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    Example 8: Implementing Scrolling with Next and Previous

    -

    The following code creates a very simple recordset pager, where you can scroll - from page to page of a recordset.

    -
    include_once('../adodb.inc.php');
    include_once('../adodb-pager.inc.php');
    session_start();

    $db = NewADOConnection('mysql');

    $db->Connect('localhost','root','','xphplens');

    $sql = "select * from adoxyz ";

    $pager = new ADODB_Pager($db,$sql);
    $pager->Render($rows_per_page=5);
    -

    This will create a basic record pager that looks like this: -

    - - - - - - - - - - -
    |<   << -   >>   >| -  
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDFirst NameLast NameDate Created
    36 Alan Turing Sat 06, Oct 2001 
    37 Serena Williams Sat 06, Oct 2001 
    38 Yat Sun Sun Sat 06, Oct 2001 
    39 Wai Hun See Sat 06, Oct 2001 
    40 Steven Oey Sat 06, Oct 2001 
    Page 8/10
    -

    The number of rows to display at one time is controled by the Render($rows) - method. If you do not pass any value to Render(), ADODB_Pager will default to - 10 records per page. -

    You can control the column titles by modifying your SQL (supported by most - databases): -

    $sql = 'select id as "ID", firstname as "First Name", 
    lastname as "Last Name", created as "Date Created"
    from adoxyz';
    -

    The above code can be found in the adodb/tests/testpaging.php example - included with this release, and the class ADODB_Pager in adodb/adodb-pager.inc.php. - The ADODB_Pager code can be adapted by a programmer so that the text links can - be replaced by images, and the dull white background be replaced with more interesting - colors. -

    You can also allow display of html by setting $pager->htmlSpecialChars = false. -

    Some of the code used here was contributed by Iván Oliva and Cornel - G.

    -

    Example 9: Exporting in CSV or Tab-Delimited Format

    -

    We provide some helper functions to export in comma-separated-value (CSV) and - tab-delimited formats:

    -
    include_once('/path/to/adodb/toexport.inc.php');
    include_once('/path/to/adodb/adodb.inc.php');
    -$db = &NewADOConnection('mysql');
    $db->Connect($server, $userid, $password, $database);

    $rs = $db->Execute('select fname as "First Name", surname as "Surname" from table');

    print "<pre>";
    print rs2csv($rs); # return a string, CSV format

    print '<hr>';

    $rs->MoveFirst(); # note, some databases do not support MoveFirst
    print rs2tab($rs,false); # return a string, tab-delimited
    # false == suppress field names in first line

    print '<hr>';
    $rs->MoveFirst();
    rs2tabout($rs); # send to stdout directly (there is also an rs2csvout function)
    print "</pre>";

    $rs->MoveFirst();
    $fp = fopen($path, "w");
    if ($fp) {
    rs2csvfile($rs, $fp); # write to file (there is also an rs2tabfile function)
    fclose($fp);
    }
    -

    Carriage-returns or newlines are converted to spaces. Field names are returned - in the first line of text. Strings containing the delimiter character are quoted - with double-quotes. Double-quotes are double-quoted again. This conforms to - Excel import and export guide-lines. -

    All the above functions take as an optional last parameter, $addtitles which - defaults to true. When set to false field names in the first line - are suppressed.
    -

    Example 10: Recordset Filters

    -

    Sometimes we want to pre-process all rows in a recordset before we use it. - For example, we want to ucwords all text in recordset. -

    include_once('adodb/rsfilter.inc.php');
    include_once('adodb/adodb.inc.php');

    // ucwords() every element in the recordset
    function do_ucwords(&$arr,$rs)
    {
    foreach($arr as $k => $v) {
    $arr[$k] = ucwords($v);
    }
    }

    $db = NewADOConnection('mysql');
    $db->PConnect('server','user','pwd','db');

    $rs = $db->Execute('select ... from table');
    $rs = RSFilter($rs,'do_ucwords');
    -

    The RSFilter function takes 2 parameters, the recordset, and the name - of the filter function. It returns the processed recordset scrolled to - the first record. The filter function takes two parameters, the current - row as an array, and the recordset object. For future compatibility, you should - not use the original recordset object.

    -

    Example 11: Smart Transactions

    -The old way of doing transactions required you to use -
    $conn->BeginTrans();
    $ok = $conn->Execute($sql);
    if ($ok) $ok = $conn->Execute($sql2);
    if (!$ok) $conn->RollbackTrans();
    else $conn->CommitTrans();
    -This is very complicated for large projects because you have to track the error -status. Smart Transactions is much simpler. You start a smart transaction by calling -StartTrans(): -
    $conn->StartTrans();
    $conn->Execute($sql);
    $conn->Execute($Sql2);
    $conn->CompleteTrans();
    -CompleteTrans() detects when an SQL error occurs, and will Rollback/Commit as -appropriate. To specificly force a rollback even if no error occured, use FailTrans(). -Note that the rollback is done in CompleteTrans(), and not in FailTrans(). -
    $conn->StartTrans();
    $conn->Execute($sql);
    if (!CheckRecords()) $conn->FailTrans();
    $conn->Execute($Sql2);
    $conn->CompleteTrans();
    -

    You can also check if a transaction has failed, using HasFailedTrans(), which - returns true if FailTrans() was called, or there was an error in the SQL execution. - Make sure you call HasFailedTrans() before you call CompleteTrans(), as it is - only works between StartTrans/CompleteTrans. -

    Lastly, StartTrans/CompleteTrans is nestable, and only the outermost block - is executed. In contrast, BeginTrans/CommitTrans/RollbackTrans is NOT nestable. -

    $conn->StartTrans();
    $conn->Execute($sql);
    $conn->StartTrans(); # ignored - if (!CheckRecords()) $conn->FailTrans(); - $conn->CompleteTrans(); # ignored -$conn->Execute($Sql2); -$conn->CompleteTrans();
    -

    Note: Savepoints are currently not supported. -

    Using Custom Error Handlers and PEAR_Error

    -

    ADOdb supports PHP5 exceptions. Just include adodb-exceptions.inc.php and you can now -catch exceptions on errors as they occur. -

    	include("../adodb-exceptions.inc.php"); 
    include("../adodb.inc.php");
    try {
    $db = NewADOConnection("oci8://scott:bad-password@mytns/");
    } catch (exception $e) {
    var_dump($e);
    adodb_backtrace($e->gettrace());
    }
    -

    ADOdb also provides two custom handlers which you can modify for your needs. The - first one is in the adodb-errorhandler.inc.php file. This makes use of - the standard PHP functions error_reporting - to control what error messages types to display, and trigger_error - which invokes the default PHP error handler. -

    Including the above file will cause trigger_error($errorstring,E_USER_ERROR) - to be called when
    - (a) Connect() or PConnect() fails, or
    - (b) a function that executes SQL statements such as Execute() or SelectLimit() - has an error.
    - (c) GenID() appears to go into an infinite loop. -

    The $errorstring is generated by ADOdb and will contain useful debugging information - similar to the error.log data generated below. This file adodb-errorhandler.inc.php - should be included before you create any ADOConnection objects. -

    If you define error_reporting(0), no errors will be passed to the error handler. - If you set error_reporting(E_ALL), all errors will be passed to the error handler. - You still need to use ini_set("display_errors", "0" or "1") to control - the display of errors. -

    <?php
    error_reporting(E_ALL); # pass any error messages triggered to error handler
    include('adodb-errorhandler.inc.php');
    -include('adodb.inc.php'); -include('tohtml.inc.php'); -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); #invalid table productsz'); -if ($rs) rs2html($rs); -?> -
    -

    If you want to log the error message, you can do so by defining the following - optional constants ADODB_ERROR_LOG_TYPE and ADODB_ERROR_LOG_DEST. ADODB_ERROR_LOG_TYPE - is the error log message type (see error_log - in the PHP manual). In this case we set it to 3, which means log to the file - defined by the constant ADODB_ERROR_LOG_DEST. -

    <?php
    error_reporting(E_ALL); # report all errors
    ini_set("display_errors", "0"); # but do not echo the errors
    define('ADODB_ERROR_LOG_TYPE',3);
    define('ADODB_ERROR_LOG_DEST','C:/errors.log');
    include('adodb-errorhandler.inc.php');
    -include('adodb.inc.php'); -include('tohtml.inc.php'); - -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); ## invalid table productsz -if ($rs) rs2html($rs); -?> -
    -The following message will be logged in the error.log file: -
    (2001-10-28 14:20:38) mysql error: [1146: Table 'northwind.productsz' doesn't exist] in
    EXECUTE("select * from productsz")
    -

    PEAR_ERROR

    -The second error handler is adodb-errorpear.inc.php. This will create a -PEAR_Error derived object whenever an error occurs. The last PEAR_Error object -created can be retrieved using ADODB_Pear_Error(). -
    <?php
    include('adodb-errorpear.inc.php'); -include('adodb.inc.php'); -include('tohtml.inc.php'); -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); #invalid table productsz'); -if ($rs) rs2html($rs); -else { - $e = ADODB_Pear_Error();
    echo '<p>',$e->message,'</p>';
    -} -?> -
    -

    You can use a PEAR_Error derived class by defining the constant ADODB_PEAR_ERROR_CLASS - before the adodb-errorpear.inc.php file is included. For easy debugging, you - can set the default error handler in the beginning of the PHP script to PEAR_ERROR_DIE, - which will cause an error message to be printed, then halt script execution: -

    include('PEAR.php');
    PEAR::setErrorHandling('PEAR_ERROR_DIE');
    -

    Note that we do not explicitly return a PEAR_Error object to you when an error - occurs. We return false instead. You have to call ADODB_Pear_Error() to get - the last error or use the PEAR_ERROR_DIE technique. -

    -

    MetaError and MetaErrMsg

    -

    If you need error messages that work across multiple databases, then use MetaError(), which returns a virtualized error number, based on PEAR DB's error number system, and MetaErrMsg(). - -

    Error Messages

    -

    Error messages are outputted using the static method ADOConnnection::outp($msg,$newline=true). - By default, it sends the messages to the client. You can override this to perform - error-logging. -

    Data Source Names

    -

    We now support connecting using PEAR style DSN's. A DSN is a connection string - of the form:

    -

    $dsn = "$driver://$username:$password@$hostname/$databasename";

    -

    An example:

    -
       $username = 'root';
    $password = '';
    $hostname = 'localhost';
    $databasename = 'xphplens';
    $driver = 'mysql';
    $dsn = "$driver://$username:$password@$hostname/$databasename"
    $db = NewADOConnection();
    # DB::Connect($dsn) also works if you include 'adodb/adodb-pear.inc.php' at the top
    $rs = $db->query('select firstname,lastname from adoxyz');
    $cnt = 0;
    while ($arr = $rs->fetchRow()) {
    print_r($arr); print "<br>";
    }
    -

    -

    More info and connection examples on the DSN format. - -

    PEAR Compatibility

    - We support DSN's (see above), and the following functions: -
     DB_Common
    - 	query - returns PEAR_Error on error
    -	limitQuery - return PEAR_Error on error
    -	prepare - does not return PEAR_Error on error
    -	execute - does not return PEAR_Error on error
    -	setFetchMode - supports ASSOC and ORDERED
    -	errorNative
    -	quote
    -	nextID
    -	disconnect
    -	
    -	getOne
    -	getAssoc
    -	getRow
    -	getCol
    -	
    - DB_Result
    - 	numRows - returns -1 if not supported
    -	numCols
    -	fetchInto - does not support passing of fetchmode
    -	fetchRows - does not support passing of fetchmode
    -	free
    -
    -

    Caching of Recordsets

    -

    ADOdb now supports caching of recordsets using the CacheExecute( ), CachePageExecute( - ) and CacheSelectLimit( ) functions. There are similar to the non-cache functions, - except that they take a new first parameter, $secs2cache. -

    An example: -

    include('adodb.inc.php'); # load code common to ADOdb
    $ADODB_CACHE_DIR = '/usr/ADODB_cache';
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->CacheExecute(15,$sql);
    -

    The first parameter is the number of seconds to cache - the query. Subsequent calls to that query will used the cached version stored - in $ADODB_CACHE_DIR. To force a query to execute and flush the cache, call CacheExecute() - with the first parameter set to zero. Alternatively, use the CacheFlush($sql) - call.

    -

    For the sake of security, we recommend you set register_globals=off - in php.ini if you are using $ADODB_CACHE_DIR.

    -

    In ADOdb 1.80 onwards, the secs2cache parameter is optional in CacheSelectLimit() - and CacheExecute(). If you leave it out, it will use the $connection->cacheSecs - parameter, which defaults to 60 minutes. -

    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; # cache 24 hours
    $rs = $conn->CacheExecute('select * from table');
    -

    Please note that magic_quotes_runtime should be turned off. More - info, and do not change $ADODB_FETCH_MODE (or SetFetchMode) - as the cached recordset will use the $ADODB_FETCH_MODE set when the query was executed. -

    Pivot Tables

    -

    Since ADOdb 2.30, we support the generation of -SQL to create pivot tables, also known as cross-tabulations. For further explanation -read this DevShed Cross-Tabulation -tutorial. We assume that your database supports the SQL case-when expression.

    - -

    In this example, we will use the Northwind database from Microsoft. In the - database, we have a products table, and we want to analyze this table by suppliers - versus product categories. We will place the suppliers on each row, and - pivot on categories. So from the table on the left, we generate the pivot-table - on the right:

    -
    - - - - - - -
    - - - - - - - - - - - - - - - - - -
    SupplierCategory
    supplier1category1
    supplier2category1
    supplier2category2
    -
    --> - - - - - - - - - - - - - - - - - - - -
     category1category2total
    supplier1101
    supplier2112
    -
    - -

    The following code will generate the SQL for a cross-tabulation: -

    # Query the main "product" table
    # Set the rows to SupplierName
    # and the columns to the values of Categories
    # and define the joins to link to lookup tables
    # "categories" and "suppliers"
    #
    include "adodb/pivottable.inc.php";
    $sql = PivotTableSQL(
    $gDB, # adodb connection
    'products p ,categories c ,suppliers s', # tables
    'SupplierName', # rows (multiple fields allowed)
    'CategoryName', # column to pivot on
    'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where
    );
    - -

    This will generate the following SQL:

    -

    SELECT SupplierName,
    - SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", -
    - SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", -
    - SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", -
    - SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy - Products",
    - SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", -
    - SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", -
    - SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", -
    - SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", -
    - SUM(1) as Total
    - FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID - and s.SupplierID= p.SupplierID
    - GROUP BY SupplierName

    -

    You can also pivot on numerical columns and generate totals - by using ranges. This code was revised in ADODB 2.41 - and is not backward compatible. The second example shows this:

    -
     $sql = PivotTableSQL(
    $gDB, # adodb connection
    'products p ,categories c ,suppliers s', # tables
    'SupplierName', # rows (multiple fields allowed) - array( # column ranges - ' 0 ' => 'UnitsInStock <= 0', - "1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5', - "6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10', - "11 to 15" => '10 < UnitsInStock and UnitsInStock <= 15', - "16+" => '15 < UnitsInStock' - ), - ' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where - 'UnitsInStock', # sum this field - 'Sum ' # sum label prefix -); -
    -

    Which generates:

    -

    SELECT SupplierName,
    - SUM(CASE WHEN UnitsInStock <= 0 THEN UnitsInStock ELSE 0 END) AS "Sum - 0 ",
    - SUM(CASE WHEN 0 < UnitsInStock and UnitsInStock <= 5 THEN UnitsInStock - ELSE 0 END) AS "Sum 1 to 5",
    - SUM(CASE WHEN 5 < UnitsInStock and UnitsInStock <= 10 THEN UnitsInStock - ELSE 0 END) AS "Sum 6 to 10",
    - SUM(CASE WHEN 10 < UnitsInStock and UnitsInStock <= 15 THEN UnitsInStock - ELSE 0 END) AS "Sum 11 to 15",
    - SUM(CASE WHEN 15 < UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum - 16+",
    - SUM(UnitsInStock) AS "Sum UnitsInStock",
    - SUM(1) as Total,
    - FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID - and s.SupplierID= p.SupplierID
    - GROUP BY SupplierName

    -

    -
    -

    Class Reference

    -

    Function parameters with [ ] around them are optional.

    -
    -

    Global Variables

    -

    $ADODB_COUNTRECS

    -

    If the database driver API does not support counting the number of records - returned in a SELECT statement, the function RecordCount() is emulated when - the global variable $ADODB_COUNTRECS is set to true, which is the default. - We emulate this by buffering the records, which can take up large amounts - of memory for big recordsets. Set this variable to false for the best performance. - This variable is checked every time a query is executed, so you can selectively - choose which recordsets to count.

    -

    $ADODB_CACHE_DIR

    - -

    If you are using recordset caching, this is the directory to save your recordsets - in. Define this before you call any caching functions such as CacheExecute( - ). We recommend setting register_globals=off in php.ini if you use this - feature for security reasons.

    -

    If you are using Unix and apache, you might need to set your cache directory - permissions to something similar to the following:

    -
    -

    chown -R apache /path/to/adodb/cache
    - chgrp -R apache /path/to/adodb/cache

    -

    $ADODB_ANSI_PADDING_OFF

    -

    Determines whether to right trim CHAR fields (and also VARCHAR for ibase/firebird). -Set to true to trim. Default is false. Currently works for oci8po, ibase and firebird -drivers. Added in ADOdb 4.01. -

    $ADODB_LANG

    -

    Determines the language used in MetaErrorMsg(). The default is 'en', for English. -To find out what languages are supported, see the files -in adodb/lang/adodb-$lang.inc.php, where $lang is the supported langauge. -

    $ADODB_FETCH_MODE

    -

    This is a global variable that determines how arrays are retrieved by recordsets. - The recordset saves this value on creation (eg. in Execute( ) or SelectLimit( - )), and any subsequent changes to $ADODB_FETCH_MODE have no affect on existing - recordsets, only on recordsets created in the future.

    -

    The following constants are defined:

    -

    define('ADODB_FETCH_DEFAULT',0);
    - define('ADODB_FETCH_NUM',1);
    - define('ADODB_FETCH_ASSOC',2);
    - define('ADODB_FETCH_BOTH',3);

    - -

    An example: -

    	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
    $rs1 = $db->Execute('select * from table');
    $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1') -
    -

    As you can see in the above example, both recordsets store and use different - fetch modes based on the $ADODB_FETCH_MODE setting when the recordset was - created by Execute().

    -

    If no fetch mode is predefined, the fetch mode defaults to ADODB_FETCH_DEFAULT. - The behaviour of this default mode varies from driver to driver, so do not - rely on ADODB_FETCH_DEFAULT. For portability, we recommend sticking to ADODB_FETCH_NUM - or ADODB_FETCH_ASSOC. Many drivers do not support ADODB_FETCH_BOTH.

    -

    SetFetchMode Function

    -

    If you have multiple connection objects, and want to have different fetch modes for each -connection, then use SetFetchMode. - Once this function is called for a connection object, that connection object - will ignore the global variable $ADODB_FETCH_MODE and will use the internal - fetchMode property exclusively.

    -
    	$db->SetFetchMode(ADODB_FETCH_NUM);
    $rs1 = $db->Execute('select * from table');
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1')
    -

    To retrieve the previous fetch mode, you can use check the $db->fetchMode - property, or use the return value of SetFetchMode( ). -

    ADODB_ASSOC_CASE

    -

    You can control the associative fetch case for certain drivers which behave - differently. For the sybase, oci8po, mssql, odbc and ibase drivers and all - drivers derived from them, ADODB_ASSOC_CASE will by default generate recordsets - where the field name keys are lower-cased. Use the constant ADODB_ASSOC_CASE - to change the case of the keys. There are 3 possible values:

    -

    0 = assoc lowercase field names. $rs->fields['orderid']
    - 1 = assoc uppercase field names. $rs->fields['ORDERID']
    - 2 = use native-case field names. $rs->fields['OrderID'] -- this is the - default since ADOdb 2.90

    -

    To use it, declare it before you incldue adodb.inc.php.

    -

    define('ADODB_ASSOC_CASE', 2); # use native-case for ADODB_FETCH_ASSOC
    - include('adodb.inc.php');

    -

    $ADODB_FORCE_TYPE

    -

    See the GetUpdateSQL tutorial. -

    -

    $ADODB_QUOTE_FIELDNAMES

    -

    Auto-quotes field names when using AutoExecute() when set to true. -

     

    -
    -

    ADOConnection

    -

    Object that performs the connection to the database, executes SQL statements - and has a set of utility functions for standardising the format of SQL statements - for issues such as concatenation and date formats.

    -

    ADOConnection Fields

    -

    databaseType: Name of the database system we are connecting to. Eg. - odbc or mssql or mysql.

    -

    dataProvider: The underlying mechanism used to connect to the database. - Normally set to native, unless using odbc or ado.

    -

    host: Name of server or data source name (DSN) to connect to.

    -

    database: Name of the database or to connect to. If ado is used, it - will hold the ado data provider.

    -

    user: Login id to connect to database. Password is not saved for security - reasons.

    -

    raiseErrorFn: Allows you to define an error handling function. See adodb-errorhandler.inc.php - for an example.

    -

    debug: Set to true to make debug statements to appear.

    -

    concat_operator: Set to '+' or '||' normally. The operator used to concatenate - strings in SQL. Used by the Concat function.

    -

    fmtDate: The format used by the DBDate - function to send dates to the database. is '#Y-m-d#' for Microsoft Access, - and ''Y-m-d'' for MySQL.

    -

    fmtTimeStamp: The format used by the DBTimeStamp - function to send timestamps to the database.

    -

    true: The value used to represent true.Eg. '.T.'. for Foxpro, '1' for - Microsoft SQL.

    -

    false: The value used to represent false. Eg. '.F.'. for Foxpro, '0' - for Microsoft SQL.

    -

    replaceQuote: The string used to escape quotes. Eg. double single-quotes - for Microsoft SQL, and backslash-quote for MySQL. Used by qstr.

    -

    autoCommit: indicates whether automatic commit is enabled. Default is - true.

    -

    charSet: set the default charset to use. Currently only interbase/firebird supports - this.

    -

    dialect: set the default sql dialect to use. Currently only interbase/firebird - supports this.

    -

    role: set the role. Currently only interbase/firebird - supports this.

    -

    metaTablesSQL: SQL statement to return a list of available tables. Eg. - SHOW TABLES in MySQL.

    -

    genID: The latest id generated by GenID() if supported by the database.

    -

    cacheSecs: The number of seconds to cache recordsets if CacheExecute() - or CacheSelectLimit() omit the $secs2cache parameter. Defaults to 60 minutes.

    -

    sysDate: String that holds the name of the database function to call - to get the current date. Useful for inserts and updates.

    -

    sysTimeStamp: String that holds the name of the database function to - call to get the current timestamp/datetime value.

    -

    leftOuter: String that holds operator for left outer join, if known. - Otherwise set to false.

    -

    rightOuter: String that holds operator for left outer join, if known. - Otherwise set to false.

    -

    ansiOuter: Boolean that if true indicates that ANSI style outer joins - are permitted. Eg. select * from table1 left join table2 on p1=p2.

    -

    connectSID: Boolean that indicates whether to treat the $database parameter - in connects as the SID for the oci8 driver. Defaults to false. Useful for - Oracle 8.0.5 and earlier.

    -

    autoRollback: Persistent connections are auto-rollbacked in PConnect( - ) if this is set to true. Default is false.

    -
    -

    ADOConnection Main Functions

    -

    ADOConnection( )

    -

    Constructor function. Do not call this directly. Use ADONewConnection( ) instead.

    -

    Connect($host,[$user],[$password],[$database])

    -

    Non-persistent connect to data source or server $host, using userid - $user and password $password. If the server supports multiple - databases, connect to database $database.

    -

    Returns true/false depending on connection success. Since 4.23, null is returned if the extension is not loaded.

    -

    ADO Note: If you are using a Microsoft ADO and not OLEDB, you can set the $database - parameter to the OLEDB data provider you are using.

    -

    PostgreSQL: An alternative way of connecting to the database is to pass the - standard PostgreSQL connection string in the first parameter $host, and the - other parameters will be ignored.

    -

    For Oracle and Oci8, there are two ways to connect. First is to use the TNS - name defined in your local tnsnames.ora (or ONAMES or HOSTNAMES). Place the - name in the $database field, and set the $host field to false. Alternatively, - set $host to the server, and $database to the database SID, this bypassed - tnsnames.ora. -

    Examples: -

     # $oraname in tnsnames.ora/ONAMES/HOSTNAMES
    $conn->Connect(false, 'scott', 'tiger', $oraname);
    $conn->Connect('server:1521', 'scott', 'tiger', 'ServiceName'); # bypass tnsnames.ora
    -

    There are many examples of connecting to a database. -See Connection Examples for many examples. - -

    PConnect($host,[$user],[$password],[$database])

    -

    Persistent connect to data source or server $host, using userid $user - and password $password. If the server supports multiple databases, - connect to database $database.

    -

    We now perform a rollback on persistent connection for selected databases since - 2.21, as advised in the PHP manual. See change log or source code for which - databases are affected. -

    Returns true/false depending on connection. Since 4.23, 0 is returned if the extension is not loaded. -See Connect( ) above for more info.

    -

    Since ADOdb 2.21, we also support autoRollback. If you set:

    - -
     $conn = &NewADOConnection('mysql');
    $conn->autoRollback = true; # default is false
    $conn->PConnect(...); # rollback here
    -

    Then when doing a persistent connection with PConnect( ), ADOdb will - perform a rollback first. This is because it is documented that PHP is - not guaranteed to rollback existing failed transactions when - persistent connections are used. This is implemented in Oracle, - MySQL, PgSQL, MSSQL, ODBC currently. -

    Since ADOdb 3.11, you can force non-persistent -connections even if PConnect is called by defining the constant -ADODB_NEVER_PERSIST before you call PConnect. -

    -Since 4.23, null is returned if the extension is not loaded. -

    NConnect($host,[$user],[$password],[$database])

    -

    Always force a new connection. In contrast, PHP sometimes reuses connections - when you use Connect() or PConnect(). Currently works only on mysql (PHP 4.3.0 - or later), postgresql and oci8-derived drivers. For other drivers, NConnect() works like - Connect().

    -

    IsConnected( )

    -

    -Returns true if connected to database. Added in 4.53. - -

    Execute($sql,$inputarr=false)

    -

    Execute SQL statement $sql and return derived class of ADORecordSet - if successful. Note that a record set is always returned on success, even - if we are executing an insert or update statement. You can also pass in $sql a statement prepared - in Prepare().

    -

    Returns derived class of ADORecordSet. Eg. if connecting via mysql, then ADORecordSet_mysql - would be returned. False is returned if there was an error in executing the - sql.

    -

    The $inputarr parameter can be used for binding variables to parameters. Below - is an Oracle example:

    -
     $conn->Execute("SELECT * FROM TABLE WHERE COND=:val", array('val'=> $val));
    -

    Another example, using ODBC,which uses the ? convention:

    -
      $conn->Execute("SELECT * FROM TABLE WHERE COND=?", array($val));
    - -Binding variables

    -Variable binding speeds the compilation and caching of SQL statements, leading -to higher performance. Currently Oracle, Interbase and ODBC supports variable binding. -Interbase/ODBC style ? binding is emulated in databases that do not support binding. -Note that you do not have to quote strings if you use binding. -

    Variable binding in the odbc, interbase and oci8po drivers. -

    $rs = $db->Execute('select * from table where val=?', array('10'));
    -Variable binding in the oci8 driver: -
    $rs = $db->Execute('select name from table where val=:key', 
    array('key' => 10));
    - -Bulk binding -

    Since ADOdb 3.80, we support bulk binding in Execute(), in which you pass in a 2-dimensional array to -be bound to an INSERT/UPDATE or DELETE statement. -

    $arr = array(
    array('Ahmad',32),
    array('Zulkifli', 24),
    array('Rosnah', 21)
    );
    $ok = $db->Execute('insert into table (name,age) values (?,?)',$arr);
    -

    This provides very high performance as the SQL statement is prepared first. -The prepared statement is executed repeatedly for each array row until all rows are completed, -or until the first error. Very useful for importing data. - -

    CacheExecute([$secs2cache,]$sql,$inputarr=false)

    -

    Similar to Execute, except that the recordset is cached for $secs2cache seconds - in the $ADODB_CACHE_DIR directory, and $inputarr only accepts 1-dimensional arrays. - If CacheExecute() is called again with the same $sql, $inputarr, - and also the same database, same userid, and the cached recordset - has not expired, the cached recordset is returned. -

      include('adodb.inc.php'); 
    include('tohtml.inc.php');
    $ADODB_CACHE_DIR = '/usr/local/ADOdbcache';
    $conn = &ADONewConnection('mysql');
    $conn->PConnect('localhost','userid','password','database');
    $rs = $conn->CacheExecute(15, 'select * from table'); # cache 15 secs
    rs2html($rs); /* recordset to html table */
    -

    Alternatively, since ADOdb 1.80, the $secs2cache parameter is optional:

    -
    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; // cache 24 hours
    $rs = $conn->CacheExecute('select * from table');
    -If $secs2cache is omitted, we use the value -in $connection->cacheSecs (default is 3600 seconds, or 1 hour). Use CacheExecute() -only with SELECT statements. -

    Performance note: I have done some benchmarks and found that they vary so greatly - that it's better to talk about when caching is of benefit. When your database - server is much slower than your Web server or the database is very - overloaded then ADOdb's caching is good because it reduces the load on - your database server. If your database server is lightly loaded or much faster - than your Web server, then caching could actually reduce performance.

    -

    ExecuteCursor($sql,$cursorName='rs',$parameters=false)

    -

    Execute an Oracle stored procedure, and returns an Oracle REF cursor variable as - a regular ADOdb recordset. Does not work with any other database except oci8. - Thanks to Robert Tuttle for the design. -

        $db = ADONewConnection("oci8"); 
    $db->Connect("foo.com:1521", "uid", "pwd", "FOO");
    $rs = $db->ExecuteCursor("begin :cursorvar := getdata(:param1); end;",
    'cursorvar',
    array('param1'=>10));
    # $rs is now just like any other ADOdb recordset object
    rs2html($rs);
    -

    ExecuteCursor() is a helper function that does the following internally: -

    	$stmt = $db->Prepare("begin :cursorvar := getdata(:param1); end;", true); 
    $db->Parameter($stmt, $cur, 'cursorvar', false, -1, OCI_B_CURSOR);
    $rs = $db->Execute($stmt,$bindarr);
    -

    ExecuteCursor only accepts 1 out parameter. So if you have 2 out parameters, use: -

    	$vv = 'A%';
    $stmt = $db->PrepareSP("BEGIN list_tabs(:crsr,:tt); END;");
    $db->OutParameter($stmt, $cur, 'crsr', -1, OCI_B_CURSOR);
    $db->OutParameter($stmt, $vv, 'tt', 32); # return varchar(32)
    $arr = $db->GetArray($stmt);
    print_r($arr);
    echo " val = $vv"; ## outputs 'TEST'
    -for the following PL/SQL: -
    	TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;

    PROCEDURE list_tabs(tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS
    BEGIN
    OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
    tablenames := 'TEST';
    END list_tabs;
    -

    SelectLimit($sql,$numrows=-1,$offset=-1,$inputarr=false)

    -

    Returns a recordset if successful. Returns false otherwise. Performs a select - statement, simulating PostgreSQL's SELECT statement, LIMIT $numrows OFFSET - $offset clause.

    -

    In PostgreSQL, SELECT * FROM TABLE LIMIT 3 will return the first 3 records - only. The equivalent is $connection->SelectLimit('SELECT * FROM TABLE',3). - This functionality is simulated for databases that do not possess this feature.

    -

    And SELECT * FROM TABLE LIMIT 3 OFFSET 2 will return records 3, 4 and 5 (eg. - after record 2, return 3 rows). The equivalent in ADOdb is $connection->SelectLimit('SELECT - * FROM TABLE',3,2).

    -

    Note that this is the opposite of MySQL's LIMIT clause. You can also - set $connection->SelectLimit('SELECT * FROM TABLE',-1,10) to - get rows 11 to the last row.

    -

    The last parameter $inputarr is for databases that support variable binding - such as Oracle oci8. This substantially reduces SQL compilation overhead. - Below is an Oracle example:

    -
     $conn->SelectLimit("SELECT * FROM TABLE WHERE COND=:val", 100,-1,array('val'=> $val));
    -

    The oci8po driver (oracle portable driver) uses the more standard bind variable - of ?: -

     $conn->SelectLimit("SELECT * FROM TABLE WHERE COND=?", 100,-1,array('val'=> $val));
    -

    -

    Ron Wilson reports that SelectLimit does not work with UNIONs. -

    CacheSelectLimit([$secs2cache,] $sql, $numrows=-1,$offset=-1,$inputarr=false)

    -

    Similar to SelectLimit, except that the recordset returned is cached for $secs2cache - seconds in the $ADODB_CACHE_DIR directory.

    -

    Since 1.80, $secs2cache has been optional, and you can define the caching time - in $connection->cacheSecs.

    - -
    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; // cache 24 hours
    $rs = $conn->CacheSelectLimit('select * from table',10);
    - -

    CacheFlush($sql=false,$inputarr=false)

    -

    Flush (delete) any cached recordsets for the SQL statement $sql in $ADODB_CACHE_DIR. -

    If no parameter is passed in, then all adodb_*.cache files are deleted. -

    -

    CacheSelectLimit() rewrites the SQL query, so you won't be able to pass the SQL to CacheFlush. In this case, - to flush the cached SQL recordset returned by CacheSelectLimit(), set $secs2cache to -1: -

    -	$db->CacheSelectLimit(-1, $sql, $nrows);
    -
    -

    If you want to flush all cached recordsets manually, execute the following - PHP code (works only under Unix):
    -   system("rm -f `find ".$ADODB_CACHE_DIR." -name - adodb_*.cache`");

    -

    For general cleanup of all expired files, you should use crontab - on Unix, or at.exe on Windows, and a shell script similar to the following:
    - #------------------------------------------------------
    - # This particular example deletes files in the TMPPATH
    - # directory with the string ".cache" in their name that
    - # are more than 7 days old.
    - #------------------------------------------------------
    - AGED=7
    - find ${TMPPATH} -mtime +$AGED | grep "\.cache" | xargs rm -f
    -

    -

    MetaError($errno=false)

    -

    Returns a virtualized error number, based on PEAR DB's error number system. You might -need to include adodb-error.inc.php before you call this function. The parameter $errno -is the native error number you want to convert. If you do not pass any parameter, MetaError -will call ErrorNo() for you and convert it. If the error number cannot be virtualized, MetaError -will return -1 (DB_ERROR).

    - -

    MetaErrorMsg($errno)

    -

    Pass the error number returned by MetaError() for the equivalent textual error message.

    -

    ErrorMsg()

    -

    Returns the last status or error message. The error message is reset after every -call to Execute(). -

    -This can return a string even if - no error occurs. In general you do not need to call this function unless an - ADOdb function returns false on an error.

    -

    Note: If debug is enabled, the SQL error message is always displayed - when the Execute function is called.

    -

    ErrorNo()

    -

    Returns the last error number. The error number is reset after every call to Execute(). -If 0 is returned, no error occurred. -

    -Note that old versions of PHP (pre 4.0.6) do - not support error number for ODBC. In general you do not need to call this - function unless an ADOdb function returns false on an error.

    -

    IgnoreErrors($saveErrHandlers)

    -

    Allows you to ignore errors so that StartTrans()/CompleteTrans() is not affected, nor is the default error handler called if an error occurs. -Useful when you want to check if a field or table exists in a database without invoking an error if it does not exist. -

    Usage: -

    -$saveErrHandlers = $conn->IgnoreErrors();
    -$rs = $conn->Execute("select field from some_table_that_might_not_exist");
    -$conn->IgnoreErrors($saveErrHandlers);
    -
    -

    Warning: do not call StartTrans()/CompleteTrans() inside a code block that is using IgnoreErrors(). -

    SetFetchMode($mode)

    -

    Sets the current fetch mode for the connection and stores - it in $db->fetchMode. Legal modes are ADODB_FETCH_ASSOC and ADODB_FETCH_NUM. - For more info, see $ADODB_FETCH_MODE.

    -

    Returns the previous fetch mode, which could be false - if SetFetchMode( ) has not been called before.

    - -

    CreateSequence($seqName = 'adodbseq',$startID=1)

    -

    Create a sequence. The next time GenID( ) is called, the value returned will - be $startID. Added in 2.60. -

    DropSequence($seqName = 'adodbseq')

    -

    Delete a sequence. Added in 2.60. -

    GenID($seqName = 'adodbseq',$startID=1)

    -

    Generate a sequence number . Works for interbase, - mysql, postgresql, oci8, oci8po, mssql, ODBC based (access,vfp,db2,etc) drivers - currently. Uses $seqName as the name of the sequence. GenID() will automatically - create the sequence for you if it does not exist (provided the userid has - permission to do so). Otherwise you will have to create the sequence yourself. -

    If your database driver emulates sequences, the name of the table is the sequence - name. The table has one column, "id" which should be of type integer, or if - you need something larger - numeric(16). -

    For ODBC and databases that do not support sequences natively (eg mssql, mysql), - we create a table for each sequence. If the sequence has not been defined - earlier, it is created with the starting value set in $startID.

    -

    Note that the mssql driver's GenID() before 1.90 used to generate 16 byte GUID's.

    -

    UpdateBlob($table,$column,$val,$where)

    -Allows you to store a blob (in $val) into $table into $column in a row at $where. -

    Usage: -

    -

    	# for oracle
    $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, empty_blob())');
    $conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');

    # non oracle databases
    $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
    $conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
    -

    Returns true if succesful, false otherwise. Supported by MySQL, PostgreSQL, - Oci8, Oci8po and Interbase drivers. Other drivers might work, depending on - the state of development.

    -

    Note that when an Interbase blob is retrieved using SELECT, it still needs - to be decoded using $connection->DecodeBlob($blob); to derive the original - value in versions of PHP before 4.1.0. -

    For PostgreSQL, you can store your blob using blob oid's or as a bytea field. - You can use bytea fields but not blob oid's currently with UpdateBlob( ). - Conversely UpdateBlobFile( ) supports oid's, but not bytea data.
    -
    - If you do not pass in an oid, then UpdateBlob() assumes that you are storing - in bytea fields. -

    If you do not have any blob fields, you can improve you can improve general SQL query performance by disabling blob handling with $connection->disableBlobs = true. -

    UpdateClob($table,$column,$val,$where)

    -Allows you to store a clob (in $val) into $table into $column in a row at $where. -Similar to UpdateBlob (see above), but for Character Large OBjects. -

    Usage: -

    	# for oracle
    $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, empty_clob())');
    $conn->UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');

    # non oracle databases
    $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');
    $conn->UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');
    -

    UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')

    -

    Similar to UpdateBlob, except that we pass in a file path to where the blob - resides. -

    For PostgreSQL, if you are using blob oid's, use this interface. This interface - does not support bytea fields. -

    Returns true if successful, false otherwise. -

    BlobEncode($blob) -

    Some databases require blob's to be encoded manually before upload. Note if - you use UpdateBlob( ) or UpdateBlobFile( ) the conversion is done automatically - for you and you do not have to call this function. For PostgreSQL, currently, - BlobEncode() can only be used for bytea fields. -

    Returns the encoded blob value. -

    Note that there is a connection property called blobEncodeType which - has 3 legal values: -

    false - no need to perform encoding or decoding.
    - 'I' - blob encoding required, and returned encoded blob is a numeric value - (no need to quote).
    - 'C' - blob encoding required, and returned encoded blob is a character value - (requires quoting). -

    This is purely for documentation purposes, so that programs that accept multiple - database drivers know what is the right thing to do when processing blobs. -

    BlobDecode($blob, $maxblobsize = false) -

    Some databases require blob's to be decoded manually after doing a select statement. - If the database does not require decoding, then this function will return - the blob unchanged. Currently BlobDecode is only required for one database, - PostgreSQL, and only if you are using blob oid's (if you are using bytea fields, - we auto-decode for you). The default maxblobsize is set in $connection->maxblobsize, which - is set to 256K in adodb 4.54.

    - In ADOdb 4.54 and later, the blob is the return value. In earlier versions, the blob data is sent to stdout.

    -

    $rs = $db->Execute("select bloboid from postgres_table where id=$key");
    $blob = $db->BlobDecode( reset($rs->fields) );
    -

    Replace($table, $arrFields, $keyCols,$autoQuote=false)

    -

    Try to update a record, and if the record is not found, an insert statement - is generated and executed. Returns 0 on failure, 1 if update statement worked, - 2 if no record was found and the insert was executed successfully. This differs - from MySQL's replace which deletes the record and inserts a new record. This - also means you cannot update the primary key. The only exception to this is - Interbase and its derivitives, which uses delete and insert because of some - Interbase API limitations. -

    The parameters are $table which is the table name, the $arrFields which is an - associative array where the keys are the field names, and $keyCols is the name - of the primary key, or an array of field names if it is a compound key. If - $autoQuote is set to true, then Replace() will quote all values that are non-numeric; - auto-quoting will not quote nulls. Note that auto-quoting will not work if - you use SQL functions or operators. -

    Examples: -

    # single field primary key
    $ret = $db->Replace('atable',
    array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'),
    'id',$autoquote = true);
    # generates UPDATE atable SET firstname='Harun',lastname='Al-Rashid' WHERE id=1000
    # or INSERT INTO atable (id,firstname,lastname) VALUES (1000,'Harun','Al-Rashid')

    # compound key
    $ret = $db->Replace('atable2',
    array('firstname'=>'Harun','lastname'=>'Al-Rashid', 'age' => 33, 'birthday' => 'null'),
    array('lastname','firstname'),
    $autoquote = true);

    # no auto-quoting
    $ret = $db->Replace('atable2',
    array('firstname'=>"'Harun'",'lastname'=>"'Al-Rashid'", 'age' => 'null'),
    array('lastname','firstname'));
    -

    AutoExecute($table, $arrFields, $mode, $where=false, $forceUpdate=true,$magicq=false)

    -

    Since ADOdb 4.56, you can automatically generate and execute INSERTs and UPDATEs on a given table with this -function, which is a wrapper for GetInsertSQL() and GetUpdateSQL(). -

    AutoExecute() inserts or updates $table given an array of $arrFields, where the keys are the field names and the array values are the -field values to store. Note that there is some overhead because the table is first queried to extract key information -before the SQL is generated. We generate an INSERT or UPDATE based on $mode (see below). -

    -Legal values for $mode are -

      -
    • 'INSERT' or 1 or DB_AUTOQUERY_INSERT -
    • 'UPDATE' or 2 or DB_AUTOQUERY_UPDATE -
    -

    You have to define the constants DB_AUTOQUERY_UPDATE and DB_AUTOQUERY_INSERT yourself or include adodb-pear.inc.php. -

    The $where clause is required if $mode == 'UPDATE'. If $forceUpdate=false then we will query the -database first and check if the field value returned by the query matches the current field value; only if they differ do we update that field. -

    Returns true on success, false on error. -

    An example of its use is: -

    -$record["firstName"] = "Carol";
    -$record["lasTname"] = "Smith"; 
    -$conn->AutoExecute($table,$record,'INSERT');
    -# executes "INSERT INTO $table (firstName,lasTname) values ('Carol',Smith')";
    -
    -$record["firstName"] = "Carol";
    -$record["lasTname"] = "Jones"; 
    -$conn->AutoExecute($table,$record,'UPDATE', "lastname like 'Sm%'");
    -# executes "UPDATE $table SET firstName='Carol',lasTname='Jones' WHERE lastname like 'Sm%'";
    -
    -

    Note: One of the strengths of ADOdb's AutoExecute() is that only valid field names for $table are updated. If $arrFields -contains keys that are invalid field names for $table, they are ignored. There is some overhead in doing this as we have to -query the database to get the field names, but given that you are not directly coding the SQL yourself, you probably aren't interested in -speed at all, but convenience. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    Since 4.94, setting the global variable $ADODB_QUOTE_FIELDNAMES to true will force field names to be auto-quoted in AutoExecute(), GetInsertSQL() and GetUpdateSQL().

    -

    GetUpdateSQL(&$rs, $arrFields, $forceUpdate=false,$magicq=false, $force=null)

    -

    Generate SQL to update a table given a recordset $rs, and the modified fields - of the array $arrFields (which must be an associative array holding the column - names and the new values) are compared with the current recordset. If $forceUpdate - is true, then we also generate the SQL even if $arrFields is identical to - $rs->fields. Requires the recordset to be associative. $magicq is used - to indicate whether magic quotes are enabled (see qstr()). The field names in the array - are case-insensitive.

    -

    Since 4.52, we allow you to pass the $force type parameter, and this overrides the $ADODB_FORCE_TYPE - global variable. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    GetInsertSQL(&$rs, $arrFields,$magicq=false,$force_type=false)

    -

    Generate SQL to insert into a table given a recordset $rs. Requires the query - to be associative. $magicq is used to indicate whether magic quotes are enabled - (for qstr()). The field names in the array are case-insensitive.

    -

    - Since 2.42, you can pass a table name instead of a recordset into -GetInsertSQL (in $rs), and it will generate an insert statement for that table. -

    Since 4.52, we allow you to pass the $force_type parameter, and this overrides the $ADODB_FORCE_TYPE - global variable. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    PageExecute($sql, $nrows, $page, $inputarr=false) -

    Used for pagination of recordset. $page is 1-based. See Example - 8.

    - -

    CachePageExecute($secs2cache, - $sql, $nrows, $page, $inputarr=false)

    -

    Used for pagination of recordset. $page is 1-based. See - Example 8. Caching version of PageExecute.

    - -

    -

    Close( )

    -

    Close the database connection. PHP4 proudly states that we no longer have to - clean up at the end of the connection because the reference counting mechanism - of PHP4 will automatically clean up for us.

    -

    StartTrans( )

    -

    Start a monitored transaction. As SQL statements are executed, ADOdb will monitor - for SQL errors, and if any are detected, when CompleteTrans() is called, we auto-rollback. -

    -

    To understand why StartTrans() is superior to BeginTrans(), - let us examine a few ways of using BeginTrans(). - The following is the wrong way to use transactions: -

    $DB->BeginTrans();
    $DB->Execute("update table1 set val=$val1 where id=$id");
    $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CommitTrans();
    -

    because you perform no error checking. It is possible to update table1 and - for the update on table2 to fail. Here is a better way: -

    $DB->BeginTrans();
    $ok = $DB->Execute("update table1 set val=$val1 where id=$id");
    if ($ok) $ok = $DB->Execute("update table2 set val=$val2 where id=$id");
    if ($ok) $DB->CommitTrans();
    else $DB->RollbackTrans();
    -

    Another way is (since ADOdb 2.0): -

    $DB->BeginTrans();
    $ok = $DB->Execute("update table1 set val=$val1 where id=$id");
    if ($ok) $ok = $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CommitTrans($ok);
    -

    Now it is a headache monitoring $ok all over the place. StartTrans() is an -improvement because it monitors all SQL errors for you. This is particularly -useful if you are calling black-box functions in which SQL queries might be executed. - Also all BeginTrans, CommitTrans and RollbackTrans calls inside a StartTrans block - will be disabled, so even if the black box function does a commit, it will be ignored. -

    $DB->StartTrans();
    CallBlackBox();
    $DB->Execute("update table1 set val=$val1 where id=$id");
    $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CompleteTrans();
    -

    Note that a StartTrans blocks are nestable, the inner blocks are ignored. -

    CompleteTrans($autoComplete=true)

    -

    Complete a transaction called with StartTrans(). This function monitors - for SQL errors, and will commit if no errors have occured, otherwise it will rollback. - Returns true on commit, false on rollback. If the parameter $autoComplete is true - monitor sql errors and commit and rollback as appropriate. Set $autoComplete to false - to force rollback even if no SQL error detected. -

    FailTrans( )

    -

    Fail a transaction started with StartTrans(). The rollback will only occur when - CompleteTrans() is called. -

    HasFailedTrans( )

    -

    Check whether smart transaction has failed, - eg. returns true if there was an error in SQL execution or FailTrans() was called. - If not within smart transaction, returns false. -

    BeginTrans( )

    -

    Begin a transaction. Turns off autoCommit. Returns true if successful. Some - databases will always return false if transaction support is not available. - Any open transactions will be rolled back when the connection is closed. Among the - databases that support transactions are Oracle, PostgreSQL, Interbase, MSSQL, certain - versions of MySQL, DB2, Informix, Sybase, etc.

    -

    Note that StartTrans() and CompleteTrans() is a superior method of - handling transactions, available since ADOdb 3.40. For a explanation, see the StartTrans() documentation. - -

    You can also use the ADOdb error handler to die - and rollback your transactions for you transparently. Some buggy database extensions - are known to commit all outstanding tranasactions, so you might want to explicitly - do a $DB->RollbackTrans() in your error handler for safety. -

    Detecting Transactions

    -

    Since ADOdb 2.50, you are able to detect when you are inside a transaction. Check - that $connection->transCnt > 0. This variable is incremented whenever BeginTrans() is called, - and decremented whenever RollbackTrans() or CommitTrans() is called. -

    CommitTrans($ok=true)

    -

    End a transaction successfully. Returns true if successful. If the database - does not support transactions, will return true also as data is always committed. -

    -

    If you pass the parameter $ok=false, the data is rolled back. See example in - BeginTrans().

    -

    RollbackTrans( )

    -

    End a transaction, rollback all changes. Returns true if successful. If the - database does not support transactions, will return false as data is never rollbacked. -

    - -

    SetTransactionMode($mode )

    -

    SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions. -Note: if you have persistent connections and using mssql or mysql, you might have to explicitly reset your transaction mode at the beginning of each page request. -This is only supported in postgresql, mssql, mysql with InnoDB and oci8 currently. For example: -

    -$db->SetTransactionMode("SERIALIZABLE");
    -$db->BeginTrans();
    -$db->Execute(...); $db->Execute(...);
    -$db->CommiTrans();
    -
    -$db->SetTransactionMode(""); // restore to default
    -$db->StartTrans();
    -$db->Execute(...); $db->Execute(...);
    -$db->CompleteTrans();
    -
    - -

    Supported values to pass in: -

      -
    • READ UNCOMMITTED (allows dirty reads, but fastest) -
    • READ COMMITTED (default postgres, mssql and oci8) -
    • REPEATABLE READ (default mysql) -
    • SERIALIZABLE (slowest and most restrictive) -
    -

    You can also pass in database specific values such as 'SNAPSHOT' for mssql or 'READ ONLY' for oci8/postgres. -

    See transaction levels for PostgreSQL, -Oracle, -MySQL, and -MS SQL Server. -

    GetAssoc($sql,$inputarr=false,$force_array=false,$first2cols=false)

    -

    Returns an associative array for the given query $sql with optional bind parameters - in $inputarr. If the number of columns returned is greater to two, a 2-dimensional - array is returned, with the first column of the recordset becomes the keys - to the rest of the rows. If the columns is equal to two, a 1-dimensional array - is created, where the the keys directly map to the values (unless $force_array - is set to true, when an array is created for each value). -

    Examples:

    - -

    We have the following data in a recordset:

    -

    row1: Apple, Fruit, Edible
    - row2: Cactus, Plant, Inedible
    - row3: Rose, Flower, Edible

    -

    GetAssoc will generate the following 2-dimensional associative - array:

    -

    Apple => array[Fruit, Edible]
    - Cactus => array[Plant, Inedible]
    - Rose => array[Flower,Edible]

    -

    If the dataset is:

    -

    row1: Apple, Fruit
    -row2: Cactus, Plant
    -row3: Rose, Flower

    -

    GetAssoc will generate the following 1-dimensional associative - array (with $force_array==false):

    -

    Apple => Fruit
    - Cactus=>Plant
    - Rose=>Flower

    -

    The function returns:

    -

    The associative array, or false if an error occurs.

    - -

    CacheGetAssoc([$secs2cache,] $sql,$inputarr=false,$force_array=false,$first2cols=false)

    -
    -

    Caching version of GetAssoc function above. -

    GetOne($sql,$inputarr=false)

    -

    Executes the SQL and returns the first field of the first row. The recordset - and remaining rows are discarded for you automatically. If an error occur, false - is returned.

    -

    GetRow($sql,$inputarr=false)

    -

    Executes the SQL and returns the first row as an array. The recordset and remaining - rows are discarded for you automatically. If an error occurs, false is returned.

    -

    GetAll($sql,$inputarr=false)

    - -

    Executes the SQL and returns the all the rows as a 2-dimensional - array. The recordset is discarded for you automatically. If an error occurs, - false is returned. GetArray is a synonym for GetAll.

    -

    GetCol($sql,$inputarr=false,$trim=false)

    - -

    Executes the SQL and returns all elements of the first column as a -1-dimensional array. The recordset is discarded for you automatically. If an error occurs, - false is returned.

    -

    CacheGetOne([$secs2cache,] - $sql,$inputarr=false), CacheGetRow([$secs2cache,] $sql,$inputarr=false), CacheGetAll([$secs2cache,] - $sql,$inputarr=false), CacheGetCol([$secs2cache,] - $sql,$inputarr=false,$trim=false)

    - -

    Similar to above Get* functions, except that the recordset is serialized and - cached in the $ADODB_CACHE_DIR directory for $secs2cache seconds. Good for speeding - up queries on rarely changing data. Note that the $secs2cache parameter is optional. - If omitted, we use the value in $connection->cacheSecs (default is 3600 seconds, - or 1 hour).

    -

    Prepare($sql )

    - -

    Prepares (compiles) an SQL query for repeated execution. Bind parameters -are denoted by ?, except for the oci8 driver, which uses the traditional Oracle :varname -convention. -

    -

    Returns an array containing the original sql statement - in the first array element; the remaining elements of the array are driver dependent. - If there is an error, or we are emulating Prepare( ), we return the original - $sql string. This is because all error-handling has been centralized in Execute( - ).

    -

    Prepare( ) cannot be used with functions that use SQL - query rewriting techniques, e.g. PageExecute( ) and SelectLimit( ).

    -

    Example:

    -
    $stmt = $DB->Prepare('insert into table (col1,col2) values (?,?)');
    for ($i=0; $i < $max; $i++)
    $DB->Execute($stmt,array((string) rand(), $i));
    - -

    Also see InParameter(), OutParameter() and PrepareSP() below. Only supported internally by interbase, - oci8 and selected ODBC-based drivers, otherwise it is emulated. There is no - performance advantage to using Prepare() with emulation. -

    Important: Due to limitations or bugs in PHP, if you are getting errors when - you using prepared queries, try setting $ADODB_COUNTRECS = false before preparing. - This behaviour has been observed with ODBC. -

    IfNull($field, $nullReplacementValue)

    -

    Portable IFNULL function (NVL in Oracle). Returns a string that represents - the function that checks whether a $field is null for the given database, and - if null, change the value returned to $nullReplacementValue. Eg.

    -
    $sql = 'SELECT '.$db->IfNull('name', "'- unknown -'"). ' FROM table';
    - -

    length

    -

    This is not a function, but a property. Some databases have "length" and others "len" -as the function to measure the length of a string. To use this property: -

      $sql = "SELECT ".$db->length."(field) from table";
    $rs = $db->Execute($sql);
    - -

    random

    -

    This is not a function, but a property. This is a string that holds the sql to -generate a random number between 0.0 and 1.0 inclusive. - -

    substr

    -

    This is not a function, but a property. Some databases have "substr" and others "substring" -as the function to retrieve a sub-string. To use this property: -

      $sql = "SELECT ".$db->substr."(field, $offset, $length) from table";
    $rs = $db->Execute($sql);
    -

    For all databases, the 1st parameter of substr is the field, the 2nd is the -offset (1-based) to the beginning of the sub-string, and the 3rd is the length of the sub-string. - - -

    Param($name)

    -

    Generates a bind placeholder portably. For most databases, the bind placeholder - is "?". However some databases use named bind parameters such as Oracle, eg - ":somevar". This allows us to portably define an SQL statement with bind parameters: -

    $sql = 'insert into table (col1,col2) values ('.$DB->Param('a').','.$DB->Param('b').')';
    # generates 'insert into table (col1,col2) values (?,?)'
    # or 'insert into table (col1,col2) values (:a,:b)
    '
    $stmt = $DB->Prepare($sql);
    $stmt = $DB->Execute($stmt,array('one','two'));
    - -

    -

    PrepareSP($sql, -$cursor=false )

    -

    When calling stored procedures in mssql and oci8 (oracle), - and you might want to directly bind to parameters that return values, or -for special LOB handling. PrepareSP() allows you to do so.

    -

    Returns the same array or $sql string as Prepare( ) - above. If you do not need to bind to return values, you should use Prepare( - ) instead.

    -

    The 2nd parameter, $cursor is not used except with oci8. - Setting it to true will force OCINewCursor to be called; this is to support -output REF CURSORs.

    -

    For examples of usage of PrepareSP( ), see InParameter( -) below.

    -

    Note: in the mssql driver, preparing stored procedures - requires a special function call, mssql_init( ), which is called by this - function. PrepareSP( ) is available in all other drivers, and is emulated - by calling Prepare( ).

    -

    InParameter($stmt, $var, - $name, $maxLen = 4000, $type = false )

    -Binds a PHP variable as input to a stored procedure variable. -The parameter $stmt is the value returned by PrepareSP(), $var is -the PHP variable you want to bind, $name is the name of the stored procedure -variable. Optional is $maxLen, the maximum length of the data to bind, -and $type which is database dependant. Consult mssql_bind and ocibindbyname docs -at php.net for more info on legal values for $type. -

    -InParameter() is a wrapper function that calls Parameter() -with $isOutput=false. The advantage of this function is that it is self-documenting, -because the $isOutput parameter is no longer needed. Only for mssql and oci8 -currently.

    -

    Here is an example using oci8:

    -
    # For oracle, Prepare and PrepareSP are identical
    -$stmt = $db->PrepareSP(
    -	"declare RETVAL integer; 
    begin
    :RETVAL :=
    SP_RUNSOMETHING(:myid,:group);
    end;"
    );
    $db->InParameter($stmt,$id,'myid');
    $db->InParameter($stmt,$group,'group',64);
    $db->OutParameter($stmt,$ret,'RETVAL');
    $db->Execute($stmt);
    -

    The same example using mssql:

    - -
    # @RETVAL = SP_RUNSOMETHING @myid,@group
    -$stmt = $db->PrepareSP('SP_RUNSOMETHING'); 
    # note that the parameter name does not have @ in front! -$db->InParameter($stmt,$id,'myid'); -$db->InParameter($stmt,$group,'group',64); -# return value in mssql - RETVAL is hard-coded name
    $db->OutParameter($stmt,$ret,'RETVAL');
    $db->Execute($stmt);
    - -

    Note that the only difference between the oci8 and mssql implementations is $sql.

    -

    - If $type parameter is set to false, in mssql, $type will be dynamicly determined -based on the type of the PHP variable passed (string -=> SQLCHAR, boolean =>SQLINT1, integer =>SQLINT4 or float/double=>SQLFLT8). -

    -In oci8, $type can be set to OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), -OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). To -pass in a null, use $db->Parameter($stmt, -$null=null, 'param'). -

    OutParameter($stmt, $var, $name, - $maxLen = 4000, $type = false )

    - Binds a PHP variable as output from a stored procedure variable. The parameter $stmt - is the value returned by PrepareSP(), $var is the PHP variable you want to bind, $name - is the name of the stored procedure variable. Optional is $maxLen, the maximum length of the - data to bind, and $type which is database dependant. -

    - OutParameter() is a wrapper function that calls Parameter() with $isOutput=true. - The advantage of this function is that it is self-documenting, because -the $isOutput parameter is no longer needed. Only for mssql - and oci8 currently. -

    -For an example, see InParameter. - -

    Parameter($stmt, $var, $name, $isOutput=false, - $maxLen = 4000, $type = false )

    -

    Note: This function is deprecated, because of the new InParameter() and OutParameter() functions. -These are superior because they are self-documenting, unlike Parameter(). -

    Adds a bind parameter suitable for return values or special data handling (eg. - LOBs) after a statement has been prepared using PrepareSP(). Only for mssql - and oci8 currently. The parameters are:
    -
    - $stmt Statement returned by Prepare() or PrepareSP().
    - $var PHP variable to bind to. Make sure you pre-initialize it!
    - $name Name of stored procedure variable name to bind to.
    - [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT - 2= IN/OUT. This is ignored in oci8 as this driver auto-detects the direction.
    - [$maxLen] Maximum length of the parameter variable.
    - [$type] Consult mssql_bind and - ocibindbyname docs at php.net for - more info on legal values for type.

    -

    Lastly, in oci8, bind parameters can be reused without calling PrepareSP( ) - or Parameters again. This is not possible with mssql. An oci8 example:

    -
    $id = 0; $i = 0;
    $stmt = $db->PrepareSP( "update table set val=:i where id=:id");
    $db->Parameter($stmt,$id,'id');
    $db->Parameter($stmt,$i, 'i');
    for ($cnt=0; $cnt < 1000; $cnt++) {
    $id = $cnt;
    $i = $cnt * $cnt; # works with oci8! - $db->Execute($stmt);
    }
    -

    Bind($stmt, $var, $size=4001, $type=false, $name=false)

    - -

    This is a low-level function supported only by the oci8 - driver. Avoid using unless you only want to support Oracle. The Parameter( - ) function is the recommended way to go with bind variables.

    -

    Bind( ) allows you to use bind variables in your sql - statement. This binds a PHP variable to a name defined in an Oracle sql statement - that was previously prepared using Prepare(). Oracle named variables begin with - a colon, and ADOdb requires the named variables be called :0, :1, :2, :3, etc. - The first invocation of Bind() will match :0, the second invocation will match - :1, etc. Binding can provide 100% speedups for insert, select and update statements. -

    -

    The other variables, $size sets the buffer size for data storage, $type is - the optional descriptor type OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), - OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). - Lastly, instead of using the default :0, :1, etc names, you can define your - own bind-name using $name. -

    The following example shows 3 bind variables being used: - p1, p2 and p3. These variables are bound to :0, :1 and :2.

    -
    $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
    $DB->Bind($stmt, $p1);
    $DB->Bind($stmt, $p2);
    $DB->Bind($stmt, $p3);
    for ($i = 0; $i < $max; $i++) {
    $p1 = ?; $p2 = ?; $p3 = ?;
    $DB->Execute($stmt);
    }
    -

    You can also use named variables:

    -
    $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:name0, :name1, :name2)");
    $DB->Bind($stmt, $p1, "name0");
    $DB->Bind($stmt, $p2, "name1");
    $DB->Bind($stmt, $p3, "name2");
    for ($i = 0; $i < $max; $i++) {
    $p1 = ?; $p2 = ?; $p3 = ?;
    $DB->Execute($stmt);
    }
    -

    LogSQL($enable=true)

    -Call this method to install a SQL logging and timing function (using fnExecute). -Then all SQL statements are logged into an adodb_logsql table in a database. If -the adodb_logsql table does not exist, ADOdb will create the table if you have -the appropriate permissions. Returns the previous logging value (true for enabled, -false for disabled). Here are samples of the DDL for selected databases: -

    -

    		mysql:
    -		CREATE TABLE adodb_logsql (
    -		  created datetime NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 text NOT NULL,
    -		  params text NOT NULL,
    -		  tracer text NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		postgres:
    -		CREATE TABLE adodb_logsql (
    -		  created timestamp NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 text NOT NULL,
    -		  params text NOT NULL,
    -		  tracer text NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		mssql:
    -		CREATE TABLE adodb_logsql (
    -		  created datetime NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 varchar(4000) NOT NULL,
    -		  params varchar(3000) NOT NULL,
    -		  tracer varchar(500) NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		oci8:
    -		CREATE TABLE adodb_logsql (
    -		  created date NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 varchar(4000) NOT NULL,
    -		  params varchar(4000),
    -		  tracer varchar(4000),
    -		  timer decimal(16,6) NOT NULL
    -		)
    -
    -Usage: -
    	$conn->LogSQL(); // turn on logging
    :
    $conn->Execute(...);
    :
    $conn->LogSQL(false); // turn off logging

    # output summary of SQL logging results
    $perf = NewPerfMonitor($conn);
    echo $perf->SuspiciousSQL();
    echo $perf->ExpensiveSQL();
    -

    One limitation of logging is that rollback also prevents SQL from being logged. -

    -If you prefer to use another name for the table used to store the SQL, you can override it by calling -adodb_perf::table($tablename), where $tablename is the new table name (you will still need to manually -create the table yourself). An example: -

    	include('adodb.inc.php');
    include('adodb-perf.inc.php');
    adodb_perf::table('my_logsql_table');
    -Also see Performance Monitor. -

    fnExecute and fnCacheExecute properties

    -

    These two properties allow you to define bottleneck functions for all sql statements - processed by ADOdb. This allows you to perform statistical analysis and query-rewriting - of your sql. -

    Examples of fnExecute

    -

    Here is an example of using fnExecute, to count all cached queries and non-cached - queries, you can do this:

    -
    # $db is the connection object
    -function &CountExecs($db, $sql, $inputarray)
    -{
    -global $EXECS;
    -
    -	if (!is_array(inputarray)) $EXECS++;
    -	# handle 2-dimensional input arrays
    -	else if (is_array(reset($inputarray))) $EXECS += sizeof($inputarray);
    -	else $EXECS++;
    -	
    -	# in PHP4.4 and PHP5, we need to return a value by reference
    -	$null = null;
    -	return $null;
    -}
    -
    -# $db is the connection object
    -function CountCachedExecs($db, $secs2cache, $sql, $inputarray)
    -{
    global $CACHED; $CACHED++;
    }

    $db = NewADOConnection('mysql');
    $db->Connect(...);
    $db->fnExecute = 'CountExecs';
    $db->fnCacheExecute = 'CountCachedExecs';
    :
    :
    # After many sql statements:`
    printf("<p>Total queries=%d; total cached=%d</p>",$EXECS+$CACHED, $CACHED);
    -

    The fnExecute function is called before the sql is parsed and executed, so - you can perform a query rewrite. If you are passing in a prepared statement, - then $sql is an array (see Prepare). The fnCacheExecute - function is only called if the recordset returned was cached. - The function parameters match the Execute and CacheExecute functions respectively, - except that $this (the connection object) is passed as the first parameter.

    -

    Since ADOdb 3.91, the behaviour of fnExecute varies depending on whether the - defined function returns a value. If it does not return a value, then the $sql - is executed as before. This is useful for query rewriting or counting sql queries. -

    On the other hand, you might want to replace the Execute function with one - of your own design. If this is the case, then have your function return a value. - If a value is returned, that value is returned immediately, without any further - processing. This is used internally by ADOdb to implement LogSQL() functionality. -

    -

    -


    -

    ADOConnection Utility Functions

    -

    BlankRecordSet([$queryid])

    -

    No longer available - removed since 1.99.

    -

    Concat($s1,$s2,....)

    -

    Generates the sql string used to concatenate $s1, $s2, etc together. Uses the - string in the concat_operator field to generate the concatenation. Override - this function if a concatenation operator is not used, eg. MySQL.

    -

    Returns the concatenated string.

    -

    DBDate($date)

    -

    Format the $date in the format the database accepts. This is used in - INSERT/UPDATE statements; for SELECT statements, use SQLDate. - The $date parameter can be a Unix integer timestamp or an ISO format - Y-m-d. Uses the fmtDate field, which holds the format to use. If null or false - or '' is passed in, it will be converted to an SQL null.

    -

    Returns the date as a quoted string.

    -
    -	$sql = "select * from atable where created > ".$db->DBDate("$year-$month-$day");
    -	$db->Execute($sql);
    -
    -

    BindDate($date)

    -

    Format the $date in the bind format the database accepts. Normally - this means that the date string is not quoted, unlike DBDate, which quotes the string. -

    -	$sql = "select * from atable where created > ".$db->Param('0');
    -	// or
    -	$sql = "select * from atable where created > ?";
    -	$db->Execute($sql,array($db->BindDate("$year-$month-$day"));
    -
    -

    DBTimeStamp($ts)

    -

    Format the timestamp $ts in the format the database accepts; this can - be a Unix integer timestamp or an ISO format Y-m-d H:i:s. Uses the fmtTimeStamp - field, which holds the format to use. If null or false or '' is passed in, it - will be converted to an SQL null.

    -

    Returns the timestamp as a quoted string.

    -
    -	$sql = "select * from atable where created > ".$db->DBTimeStamp("$year-$month-$day $hr:$min:$secs");
    -	$db->Execute($sql);
    -
    -

    BindTimeStamp($ts)

    -

    Format the timestamp $ts in the bind format the database accepts. Normally - this means that the timestamp string is not quoted, unlike DBTimeStamp, which quotes the string. -

    -	$sql = "select * from atable where created > ".$db->Param('0');
    -	// or
    -	$sql = "select * from atable where created > ?";
    -	$db->Execute($sql,array($db->BindTimeStamp("$year-$month-$day $hr:$min:$secs"));
    -
    -

    qstr($s,[$magic_quotes_enabled=false])

    -

    Quotes a string to be sent to the database. The $magic_quotes_enabled - parameter may look funny, but the idea is if you are quoting a string extracted - from a POST/GET variable, then pass get_magic_quotes_gpc() as the second parameter. - This will ensure that the variable is not quoted twice, once by qstr - and once by the magic_quotes_gpc.

    -

    Eg. $s = $db->qstr(HTTP_GET_VARS['name'],get_magic_quotes_gpc());

    -

    Returns the quoted string.

    -

    Quote($s)

    -

    Quotes the string $s, escaping the database specific quote character as appropriate. - Formerly checked magic quotes setting, but this was disabled since 3.31 for - compatibility with PEAR DB. -

    Affected_Rows( )

    -

    Returns the number of rows affected by a update or delete statement. Returns - false if function not supported.

    -

    Not supported by interbase/firebird currently.

    -

    Insert_ID( )

    -

    Returns the last autonumbering ID inserted. Returns false if function not supported. -

    -

    Only supported by databases that support auto-increment or object id's, such - as PostgreSQL, MySQL and MS SQL Server currently. PostgreSQL returns the OID, which - can change on a database reload.

    -

    RowLock($table,$where)

    -

    Lock a table row for the duration of a transaction. For example to lock record $id in table1: -

    	$DB->StartTrans();
    $DB->RowLock("table1","rowid=$id");
    $DB->Execute($sql1);
    $DB->Execute($sql2);
    $DB->CompleteTrans();
    -

    Supported in db2, interbase, informix, mssql, oci8, postgres, sybase. -

    MetaDatabases()

    -

    Returns a list of databases available on the server as an array. You have to - connect to the server first. Only available for ODBC, MySQL and ADO.

    -

    MetaTables($ttype = false, $showSchema = false, - $mask=false)

    -

    Returns an array of tables and views for the current database as an array. - The array should exclude system catalog tables if possible. To only show tables, - use $db->MetaTables('TABLES'). To show only views, use $db->MetaTables('VIEWS'). - The $showSchema parameter currently works only for DB2, and when set to true, - will add the schema name to the table, eg. "SCHEMA.TABLE".

    -

    You can define a mask for matching. For example, setting $mask = 'TMP%' will - match all tables that begin with 'TMP'. Currently only mssql, oci8, odbc_mssql - and postgres* support $mask. -

    MetaColumns($table,$notcasesensitive=true)

    -

    Returns an array of ADOFieldObject's, one field object for every column of - $table. A field object is a class instance with (name, type, max_length) defined. - Currently Sybase does not recognise date types, and ADO cannot identify - the correct data type (so we default to varchar). -

    The $notcasesensitive parameter determines whether we uppercase or lowercase the table name to normalize it - (required for some databases). Does not work with MySQL ISAM tables. -

    For schema support, pass in the $table parameter, "$schema.$tablename". This is only - supported for selected databases. -

    MetaColumnNames($table,$numericIndex=false)

    -

    Returns an array of column names for $table. Since ADOdb 4.22, this is an associative array, with the -keys in uppercase. Set $numericIndex=true if you want the old behaviour of numeric indexes (since 4.23). -

    -e.g. array('FIELD1' => 'Field1', 'FIELD2'=>'Field2') -

    -

    MetaPrimaryKeys($table, - $owner=false) -

    -

    Returns an array containing column names that are the - primary keys of $table. Supported by mysql, odbc (including db2, odbc_mssql, -etc), mssql, postgres, interbase/firebird, oci8 currently.

    -

    Views (and some tables) have primary keys, but sometimes this information is not available from the -database. You can define a function ADODB_View_PrimaryKeys($databaseType, $database, $view, $owner) that -should return an array containing the fields that make up the primary key. If that function exists, -it will be called when MetaPrimaryKeys() cannot find a primary key for a table or view. -

    // In this example: dbtype = 'oci8', $db = 'mydb', $view = 'dataView', $owner = false 
    function ADODB_View_PrimaryKeys($dbtype,$db,$view,$owner)
    {
    switch(strtoupper($view)) {
    case 'DATAVIEW': return array('DATAID');
    default: return false;
    }
    }

    $db = NewADOConnection('oci8');
    $db->Connect('localhost','root','','mydb');
    $db->MetaPrimaryKeys('dataView');
    -

    ServerInfo() -

    -

    Returns an array of containing two elements 'description' - and 'version'. The 'description' element contains the string description of - the database. The 'version' naturally holds the version number (which is also -a string).

    -

    MetaForeignKeys($table, $owner=false, $upper=false) -

    Returns an associate array of foreign keys, or false if not supported. For - example, if table employee has a foreign key where employee.deptkey points to - dept_table.deptid, and employee.posn=posn_table.postionid and employee.poscategory=posn_table.category, - then $conn->MetaForeignKeys('employee') will return -

    	array(
    'dept_table' => array('deptkey=deptid'),
    'posn_table' => array('posn=positionid','poscategory=category')
    )
    -

    The optional schema or owner can be defined in $owner. If $upper is true, then - the table names (array keys) are upper-cased. -


    -

    ADORecordSet

    -

    When an SQL statement successfully is executed by ADOConnection->Execute($sql),an - ADORecordSet object is returned. This object contains a virtual cursor so we - can move from row to row, functions to obtain information about the columns - and column types, and helper functions to deal with formating the results to - show to the user.

    -

    ADORecordSet Fields

    -

    fields: Array containing the current row. This is not associative, but - is an indexed array from 0 to columns-1. See also the function Fields, - which behaves like an associative array.

    -

    dataProvider: The underlying mechanism used to connect to the database. - Normally set to native, unless using odbc or ado.

    -

    blobSize: Maximum size of a char, string or varchar object before it - is treated as a Blob (Blob's should be shown with textarea's). See the MetaType - function.

    -

    sql: Holds the sql statement used to generate this record set.

    -

    canSeek: Set to true if Move( ) function works.

    -

    EOF: True if we have scrolled the cursor past the last record.

    -

    ADORecordSet Functions

    -

    ADORecordSet( )

    -

    Constructer. Normally you never call this function yourself.

    -

    GetAssoc([$force_array])

    -

    Generates an associative array from the recordset. Note that is this function - is also available in the connection object. More details - can be found there.

    - -

    GetArray([$number_of_rows])

    -

    Generate a 2-dimensional array of records from the current - cursor position, indexed from 0 to $number_of_rows - 1. If $number_of_rows - is undefined, till EOF.

    -

    GetRows([$number_of_rows])

    -Generate a 2-dimensional array of records from the current -cursor position. Synonym for GetArray() for compatibility with Microsoft ADO. -

    GetMenu($name, [$default_str=''], - [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])

    -

    Generate a HTML menu (<select><option><option></select>). - The first column of the recordset (fields[0]) will hold the string to display - in the option tags. If the recordset has more than 1 column, the second column - (fields[1]) is the value to send back to the web server.. The menu will be -given the name $name.

    -

    If $default_str is defined, then if $default_str == - fields[0], that field is selected. If $blank1stItem is true, the first - option is empty. You can also set the first option strings by setting $blank1stItem - = "$value:$text".

    -

    $Default_str can be array for a multiple select -listbox.

    -

    To get a listbox, set the $size to a non-zero - value (or pass $default_str as an array). If $multiple_select is true - then a listbox will be generated with $size items (or if $size==0, - then 5 items) visible, and we will return an array to a server. Lastly use - $moreAttr to add additional attributes such as javascript or styles.

    -

    Menu Example 1: GetMenu('menu1','A',true) will - generate a menu: - -for the data (A,1), (B,2), (C,3). Also see example 5.

    -

    Menu Example 2: For the same data, GetMenu('menu1',array('A','B'),false) will - generate a menu with both A and B selected:
    - -

    -

    GetMenu2($name, [$default_str=''], - [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])

    -

    This is nearly identical to GetMenu, except that the - $default_str is matched to fields[1] (the option values).

    -

    Menu Example 3: Given the data in menu example 2, GetMenu2('menu1',array('1','2'),false) will - generate a menu with both A and B selected in menu example 2, but this time - the selection is based on the 2nd column, which holds the values to return -to the Web server.

    -

    UserDate($str, [$fmt])

    -

    Converts the date string $str to another format. - The date format is Y-m-d, or Unix timestamp format. The default $fmt is -Y-m-d.

    -

    UserTimeStamp($str, [$fmt])

    -

    Converts the timestamp string $str to another - format. The timestamp format is Y-m-d H:i:s, as in '2002-02-28 23:00:12', - or Unix timestamp format. UserTimeStamp calls UnixTimeStamp to parse $str, -and $fmt defaults to Y-m-d H:i:s if not defined.

    -

    UnixDate($str)

    -

    Parses the date string $str and returns it in - unix mktime format (eg. a number indicating the seconds after January 1st, - 1970). Expects the date to be in Y-m-d H:i:s format, except for Sybase and - Microsoft SQL Server, where M d Y is also accepted (the 3 letter month strings - are controlled by a global array, which might need localisation).

    -

    This function is available in both ADORecordSet and -ADOConnection since 1.91.

    -

    UnixTimeStamp($str)

    -

    Parses the timestamp string $str and returns - it in unix mktime format (eg. a number indicating the seconds after January - 1st, 1970). Expects the date to be in "Y-m-d, H:i:s" (1970-12-24, 00:00:00) - or "Y-m-d H:i:s" (1970-12-24 00:00:00) or "YmdHis" (19701225000000) format, - except for Sybase and Microsoft SQL Server, where "M d Y h:i:sA" (Dec 25 - 1970 00:00:00AM) is also accepted (the 3 letter month strings are controlled -by a global array, which might need localisation).

    - -

    This function is available in both ADORecordSet - and ADOConnection since 1.91.

    -

    OffsetDate($dayFraction, - $basedate=false)

    -

    Returns a string with the native SQL functions to calculate - future and past dates based on $basedate in a portable fashion. If $basedate - is not defined, then the current date (at 12 midnight) is used. Returns the - SQL string that performs the calculation when passed to Execute().

    -

    For example, in Oracle, to find the date and time that - is 2.5 days from today, you can use:

    -
    # get date one week from now
    $fld = $conn->OffsetDate(7); // returns "(trunc(sysdate)+7")
    -
    # get date and time that is 60 hours from current date and time
    $fld = $conn->OffsetDate(2.5, $conn->sysTimeStamp); // returns "(sysdate+2.5)"

    $conn->Execute("UPDATE TABLE SET dodate=$fld WHERE ID=$id");
    -

    This function is available for mysql, mssql, oracle, oci8 and postgresql drivers - since 2.13. It might work with other drivers provided they allow performing - numeric day arithmetic on dates.

    - -

    SQLDate($dateFormat, $basedate=false)

    -Returns a string which contains the native SQL functions -to format a date or date column $basedate. This is used in SELECT statements. -For INSERT/UPDATE statements, use DBDate. It uses a case-sensitive -$dateFormat, which supports: -
     
    -  Y: 4-digit Year
    -  Q: Quarter (1-4)
    -  M: Month (Jan-Dec)
    -  m: Month (01-12)
    -  d: Day (01-31)
    -  H: Hour (00-23)
    -  h: Hour (1-12)
    -  i: Minute (00-59)
    -  s: Second (00-60)
    -  A: AM/PM indicator
    -  w: day of week (0-6 or 1-7 depending on DB)
    -  l: day of week (as string - lowercase L)
    -  W: week in year (0..53 for MySQL, 1..53 for PostgreSQL and Oracle)
    -  
    -

    All other characters are treated as strings. You can - also use \ to escape characters. Available on selected databases, including -mysql, postgresql, mssql, oci8 and DB2.

    -

    This is useful in writing portable sql statements that - GROUP BY on dates. For example to display total cost of goods sold broken -by quarter (dates are stored in a field called postdate):

    -
     $sqlfn = $db->SQLDate('Y-\QQ','postdate'); # get sql that formats postdate to output 2002-Q1
    $sql = "SELECT $sqlfn,SUM(cogs) FROM table GROUP BY $sqlfn ORDER BY 1 desc";
    -

    MoveNext( )

    -

    Move the internal cursor to the next row. The $this->fields array - is automatically updated. Returns false if unable to do so (normally because -EOF has been reached), otherwise true.

    -

    If EOF is reached, then the $this->fields array - is set to false (this was only implemented consistently in ADOdb 3.30). For - the pre-3.30 behaviour of $this->fields (at EOF), set the global variable - $ADODB_COMPAT_FETCH = true.

    -

    Example:

    -
    $rs = $db->Execute($sql);
    if ($rs)
    while (!$rs->EOF) {
    ProcessArray($rs->fields);
    $rs->MoveNext();
    }
    -

    Move($to)

    -

    Moves the internal cursor to a specific row $to. - Rows are zero-based eg. 0 is the first row. The fields array is automatically - updated. For databases that do not support scrolling internally, ADOdb will - simulate forward scrolling. Some databases do not support backward scrolling. - If the $to position is after the EOF, $to will move to the - end of the RecordSet for most databases. Some obscure databases using odbc - might not behave this way.

    -

    Note: This function uses absolute positioning, -unlike Microsoft's ADO.

    -

    Returns true or false. If false, the internal cursor - is not moved in most implementations, so AbsolutePosition( ) will return - the last cursor position before the Move( ).

    -

    MoveFirst()

    -

    Internally calls Move(0). Note that some databases do -not support this function.

    -

    MoveLast()

    -

    Internally calls Move(RecordCount()-1). Note that some - databases do not support this function.

    -

    GetRowAssoc($toUpper=true)

    -

    Returns an associative array containing the current - row. The keys to the array are the column names. The column names are upper-cased - for easy access. To get the next row, you will still need to call MoveNext().

    -

    For example:
    -Array ( [ID] => 1 [FIRSTNAME] => Caroline [LASTNAME] => Miranda [CREATED] -=> 2001-07-05 )

    -

    Note: do not use GetRowAssoc() with $ADODB_FETCH_MODE - = ADODB_FETCH_ASSOC. Because they have the same functionality, they will - interfere with each other.

    - -

    AbsolutePage($page=-1)

    -

    Returns the current page. Requires PageExecute()/CachePageExecute() to be called. - See Example 8.

    - -

    AtFirstPage($status='')

    -

    Returns true if at first page (1-based). Requires PageExecute()/CachePageExecute() - to be called. See Example 8.

    -

    AtLastPage($status='')

    -

    Returns true if at last page (1-based). Requires PageExecute()/CachePageExecute() - to be called. See Example 8.

    -

    Fields($colname)

    -

    Returns the value of the associated column $colname for the current - row. The column name is case-insensitive.

    -

    This is a convenience function. For higher performance, use $ADODB_FETCH_MODE.

    -

    FetchRow()

    -

    Returns array containing current row, or false - if EOF. FetchRow( ) internally moves to the next record after returning the - current row.

    -

    Warning: Do not mix using FetchRow() with MoveNext().

    -

    Usage:

    -
    $rs = $db->Execute($sql);
    if ($rs)
    while ($arr = $rs->FetchRow()) {
      # process $arr
    }
    -

    FetchInto(&$array)

    -

    Sets $array to the current row. Returns PEAR_Error - object if EOF, 1 if ok (DB_OK constant). If PEAR is undefined, false is returned - when EOF. FetchInto( ) internally moves to the next record after returning - the current row.

    -

    FetchRow() is easier to use. See above.

    - -

    FetchField($column_number)

    -

    Returns an object containing the name, type and max_length of - the associated field. If the max_length cannot be determined reliably, it - will be set to -1. The column numbers are zero-based. See example - 2.

    -

    FieldCount( )

    -

    Returns the number of fields (columns) in the record -set.

    -

    RecordCount( )

    -

    Returns the number of rows in the record set. If the - number of records returned cannot be determined from the database driver - API, we will buffer all rows and return a count of the rows after all the - records have been retrieved. This buffering can be disabled (for performance - reasons) by setting the global variable $ADODB_COUNTRECS = false. When disabled, - RecordCount( ) will return -1 for certain databases. See the supported databases - list above for more details.

    -

    RowCount is a synonym for RecordCount.

    -

    PO_RecordCount($table, -$where)

    -

    Returns the number of rows in the record set. If the - database does not support this, it will perform a SELECT COUNT(*) on the - table $table, with the given $where condition to return an estimate of the - recordset size.

    -

    $numrows = $rs->PO_RecordCount("articles_table", "group=$group");

    - NextRecordSet() -

    For databases that allow multiple recordsets to be returned - in one query, this function allows you to switch to the next recordset. Currently - only supported by mssql driver.

    -
    $rs = $db->Execute('execute return_multiple_rs');
    $arr1 = $rs->GetArray();
    $rs->NextRecordSet();
    $arr2 = $rs->GetArray();
    -

    FetchObject($toupper=true)

    -

    Returns the current row as an object. If you set $toupper - to true, then the object fields are set to upper-case. Note: The newer FetchNextObject() - is the recommended way of accessing rows as objects. See below.

    -

    FetchNextObject($toupper=true)

    -

    Gets the current row as an object and moves to the next - row automatically. Returns false if at end-of-file. If you set $toupper to - true, then the object fields are set to upper-case. Note that for some drivers such as mssql, you need to SetFetchMode(ADODB_FETCH_ASSOC) or SetFetchMode(ADODB_FETCH_BOTH).

    -
    $rs = $db->Execute('select firstname,lastname from table');
    if ($rs) {
    while ($o = $rs->FetchNextObject()) {
    print "$o->FIRSTNAME, $o->LASTNAME<BR>";
    }
    }
    -

    There is some trade-off in speed in using FetchNextObject(). -If performance is important, you should access rows with the fields[] array. FetchObj()

    -

    Returns the current record as an object. Fields are - not upper-cased, unlike FetchObject. -

    -

    FetchNextObj()

    -

    Returns the current record as an object and moves to - the next record. If EOF, false is returned. Fields are not upper-cased, unlike - FetctNextObject.

    - -

    CurrentRow( )

    -

    Returns the current row of the record set. 0 is the first row.

    -

    AbsolutePosition( )

    -

    Synonym for CurrentRow for compatibility with ADO. Returns the current - row of the record set. 0 is the first row.

    -

    MetaType($nativeDBType[,$field_max_length],[$fieldobj])

    -

    Determine what generic meta type a database field type is given its - native type $nativeDBType as a string and the length of the field $field_max_length. - Note that field_max_length can be -1 if it is not known. The field object returned - by FetchField() can be passed in $fieldobj or as the 1st parameter $nativeDBType. - This is useful for databases such as mysql which has additional properties - in the field object such as primary_key.

    -

    Uses the field blobSize and compares it with $field_max_length to - determine whether the character field is actually a blob.

    -For example, $db->MetaType('char') will return 'C'. -

    Returns:

    -
      -
    • C: Character fields that should be shown in a <input type="text"> tag.
    • -
    • X: Clob (character large objects), or large text fields that should - be shown in a <textarea>
    • -
    • D: Date field
    • -
    • T: Timestamp field
    • -
    • L: Logical field (boolean or bit-field)
    • -
    • N: Numeric field. Includes decimal, numeric, floating point, and - real.
    • -
    • I:  Integer field.
    • -
    • R: Counter or Autoincrement field. Must be numeric.
    • -
    • B: Blob, or binary large objects.
    • -
    -

    Since ADOdb 3.0, MetaType accepts $fieldobj - as the first parameter, instead of $nativeDBType.

    - -

    Close( )

    -

    Closes the recordset, cleaning all memory and resources -associated with the recordset.

    -

    -If memory management is not an issue, you do not need to -call this function as recordsets are closed for you by PHP at the end of the -script. SQL statements such as INSERT/UPDATE/DELETE do not really return a recordset, -so you do not have to call Close() for such SQL statements.

    -
    -

    function rs2html($adorecordset,[$tableheader_attributes], - [$col_titles])

    -

    This is a standalone function (rs2html = recordset to - html) that is similar to PHP's odbc_result_all function, it prints - a ADORecordSet, $adorecordset as a HTML table. $tableheader_attributes allow - you to control the table cellpadding, cellspacing and border attributes. - Lastly you can replace the database column names with your own column titles - with the array $col_titles. This is designed more as a quick debugging - mechanism, not a production table recordset viewer.

    -

    You will need to include the file tohtml.inc.php.

    -

    Example of rs2html:

    -
    <?
    include('tohtml.inc.php')
    ; # load code common to ADOdb
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->Execute($sql);
    rs2html($rs,'border=2 cellpadding=3',array('Customer Name','Customer ID'));
    ?>
    -
    -

    Differences between this ADOdb library and Microsoft -ADO

    -
      - -
    1. ADOdb only supports recordsets created by a connection object. Recordsets - cannot be created independently.
    2. -
    3. ADO properties are implemented as functions in ADOdb. This makes it easier - to implement any enhanced ADO functionality in the future.
    4. -
    5. ADOdb's ADORecordSet->Move() uses - absolute positioning, not relative. Bookmarks are not supported.
    6. -
    7. ADORecordSet->AbsolutePosition() cannot - be used to move the record cursor.
    8. -
    9. ADO Parameter objects are not supported. Instead we have the ADOConnection::Parameter( - ) function, which provides a simpler interface for calling preparing parameters - and calling stored procedures.
    10. -
    11. Recordset properties for paging records are available, but implemented as - in Example 8.
    12. -
    -
    -

    Database Driver Guide

    -

    This describes how to create a class to connect to a - new database. To ensure there is no duplication of work, kindly email me - at jlim#natsoft.com.my if you decide to create such a class.

    -

    First decide on a name in lower case to call the database - type. Let's say we call it xbase.

    -

    Then we need to create two classes ADODB_xbase and ADORecordSet_xbase - in the file adodb-xbase.inc.php.

    -

    The simplest form of database driver is an adaptation - of an existing ODBC driver. Then we just need to create the class ADODB_xbase - extends ADODB_odbc to support the new date and timestamp formats, - the concatenation operator used, true and false. For - the ADORecordSet_xbase extends ADORecordSet_odbc we need to change - the MetaType function. See adodb-vfp.inc.php as an example.

    -

    More complicated is a totally new database driver that - connects to a new PHP extension. Then you will need to implement several - functions. Fortunately, you do not have to modify most of the complex code. - You only need to override a few stub functions. See adodb-mysql.inc.php for - example.

    -

    The default date format of ADOdb internally is YYYY-MM-DD - (Ansi-92). All dates should be converted to that format when passing to an - ADOdb date function. See Oracle for an example how we use ALTER SESSION to - change the default date format in _pconnect _connect.

    -

    ADOConnection Functions to Override

    -

    Defining a constructor for your ADOConnection derived - function is optional. There is no need to call the base class constructor.

    -

    _connect: Low level implementation of Connect. - Returns true or false. Should set the _connectionID.

    -

    _pconnect: Low level implemention of PConnect. - Returns true or false. Should set the _connectionID.

    -

    _query: Execute a query. Returns the queryID, -or false.

    -

    _close: Close the connection -- PHP should clean -up all recordsets.

    -

    ErrorMsg: Stores the error message in the private -variable _errorMsg.

    -

    ADOConnection Fields to Set

    -

    _bindInputArray: Set to true if binding of parameters - for SQL inserts and updates is allowed using ?, eg. as with ODBC.

    -

    fmtDate

    -

    fmtTimeStamp

    -

    true

    -

    false

    -

    concat_operator

    -

    replaceQuote

    -

    hasLimit support SELECT * FROM TABLE LIMIT 10 -of MySQL.

    -

    hasTop support Microsoft style SELECT TOP 10 -* FROM TABLE.

    -

    ADORecordSet Functions to Override

    -

    You will need to define a constructor for your ADORecordSet - derived class that calls the parent class constructor.

    -

    FetchField: as documented above in ADORecordSet

    -

    _initrs: low level initialization of the recordset: - setup the _numOfRows and _numOfFields fields -- called by the - constructor.

    -

    _seek: seek to a particular row. Do not load - the data into the fields array. This is done by _fetch. Returns true or false. - Note that some implementations such as Interbase do not support seek. Set - canSeek to false.

    -

    _fetch: fetch a row using the database extension - function and then move to the next row. Sets the fields array. If - the parameter $ignore_fields is true then there is no need to populate the fields array, - just move to the next row. then Returns true or false.

    -

    _close: close the recordset

    -

    Fields: If the array row returned by the PHP - extension is not an associative one, you will have to override this. See - adodb-odbc.inc.php for an example. For databases such as MySQL and MSSQL - where an associative array is returned, there is no need to override this - function.

    -

    ADOConnection Fields to Set

    -

    canSeek: Set to true if the _seek function works.

    -

    Optimizing PHP

    - For info on tuning PHP, read this article on Optimizing - PHP.

    - -

    Change Log

    - -

    4.94 23 Jan 2007 -

    Active Record: $ADODB_ASSOC_CASE=2 did not work properly. Fixed. Thx gmane#auxbuss.com. -

    mysqli had bugs in BeginTrans() and EndTrans(). Fixed.

    -

    Improved error handling when no database is connected for oci8. Thx Andy Hassall.

    -

    Names longer than 30 chars in oci8 datadict will be changed to random name. Thx Eugenio. http://phplens.com/lens/lensforum/msgs.php?id=16182 -

    Added var $upperCase = 'ucase' to access and ado_access drivers. Thx Renato De Giovanni renato#cria.org.br

    -

    Postgres64 driver, if preparing plan failed in _query, did not handle error properly. Fixed. See http://phplens.com/lens/lensforum/msgs.php?id=16131. -

    Fixed GetActiveRecordsClass() reference bug. See http://phplens.com/lens/lensforum/msgs.php?id=16120 -

    - -Added handling of nulls in adodb-ado_mssql.inc.php for qstr(). Thx to Felix Rabinovich. -

    - -Adodb-dict contributions by Gaetano: -
    -+ Support for INDEX in data-dict. Example: -idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94. The following example features mutiple indexes, including a compound index idx_ev1. -

    -  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
    -  event_type I(4) NOTNULL  INDEX idx_evt,
    -  event_start_date T DEFAULT NULL INDEX id_esd,
    -  event_end_date T DEFAULT '0000-00-00 00:00:00' INDEX id_eted,
    -  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 INDEX id_evp,
    -  event_owner I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_project I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
    -  event_icon C(20) DEFAULT 'obj/event',
    -  event_description X
    -
    -
    -+ Prevents the generated SQL from including double drop-sequence statements for REPLACE case of tables with autoincrement columns (on those dbs that emulate it via sequences) -
    -+ makes any date defined as DEFAULT value for D and T columns work cross-database, not just the "sysdate" value (as long as it is specified using adodb standard format). See above example. -

    Fixed pdo's GetInsertID() support. Thx Ricky Su. -

    oci8 Prepare() now sets error messages if an error occurs. -

    Added 'PT_BR' to SetDateLocale() -- brazilian portugese. -

    charset in oci8 was not set correctly on *Connect() -

    ADOConnection::Transpose() now appends as first column the field names. -

    Added $ADODB_QUOTE_FIELDNAMES. If set to true, will autoquote field names in AutoExecute(),GetInsertSQL(), GetUpdateSQL(). -

    Transpose now adds the field names as the first column after transposition. -

    Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter. -

    Added ErrorNo() to adodb-active-record.inc.php. Thx ante#novisplet.com. - - - -

    4.93 10 Oct 2006 -

    Added support for multiple database connections in performance monitoring code (adodb-perf.inc.php). Now all sql in multiple database connections can be saved into one database ($ADODB_LOG_CONN). -

    Added MetaIndexes() to odbc_mssql. -

    Added connection property $db->null2null = 'null'. In autoexecute/getinsertsql/getupdatesql, this value will be converted to a null. Set this to a funny invalid value if you do not want null conversion. See http://phplens.com/lens/lensforum/msgs.php?id=15902. -

    Path disclosure problem in mysqli fixed. Thx Andy. -

    Fixed typo in session_schema2.xml. -

    Changed INT in oci8 to return correct precision in $fld->max_length, MetaColumns(). Thx Eloy Lafuente Plaza. -

    Patched postgres64 _connect to handle serverinfo(). see http://phplens.com/lens/lensforum/msgs.php?id=15887. -

    Added pdo fix for null columns. See http://phplens.com/lens/lensforum/msgs.php?id=15889 -

    For stored procedures, missing connection id now passed into mssql_query(). Thx Ecsy (ecsy#freemail.hu). - -

    4.92a 30 Aug 2006 -

    Syntax error in postgres7 driver. Thx Eloy Lafuente Plaza. -

    Minor bug fixes - adodb informix 10 types added to adodb.inc.php. Thx Fernando Ortiz. - -

    4.92 29 Aug 2006 - -

    Better odbtp date support. -

    Added IgnoreErrors() to bypass default error handling. -

    The _adodb_getcount() function in adodb-lib.inc.php, some ORDER BY bug fixes. -

    For ibase and firebird, set $sysTimeStamp = "CURRENT_TIMESTAMP". -

    Fixed postgres connection bug: http://phplens.com/lens/lensforum/msgs.php?id=11057. -

    Changed CacheSelectLimit() to flush cache when $secs2cache==-1 due to complaints from other users. -

    Added support for using memcached with CacheExecute/CacheSelectLimit. Requires memcache module PECL extension. Usage: -

    -$db = NewADOConnection($driver);
    -$db->memCache = true; /// should we use memCache instead of caching in files
    -$db->memCacheHost = 126.0.1.1; /// memCache host
    -$db->memCachePort = 11211; /// this is default memCache port
    -$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
    -
    -$db->Connect(...);
    -$db->CacheExecute($sql);
    -
    -

    Implemented Transpose() for recordsets. Recordset must be retrieved using ADODB_FETCH_NUM. First column becomes the -column name. -

    -$DB = NewADOConnection('mysql');
    -$DB->Connect(...);
    -$DB->SetFetchMode(ADODB_FETCH_NUM);
    -$rs = $DB->Execute('select productname,productid,unitprice from products limit 10');
    -$rs2 = $DB->Transpose($rs);
    -rs2html($rs2);
    -
    -

    4.91 2 Aug 2006 -

    Major session code rewrite .... See session docs. -

    PDO bindinputarray was not set properly for MySQL (changed from true to false). -

    Changed CacheSelectLimit() to re-cache when $secs2cache==0. This is one way to flush the cache when SelectLimit is called. -

    Added to quotes to mysql and mysqli: "SHOW COLUMNS FROM `%s`"; -

    Removed accidental optgroup handling in GetMenu(). -Fixed ibase _BlobDecode for php5 compat, and also mem alloc issues for small blobs, thx salvatori#interia.pl -

    Mysql driver OffsetDate() speedup, useful for adodb-sessions. -

    Fix for GetAssoc() PHP5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=15425 -

    Active Record - If inserting a record and the value of a primary key field is null, then we do not insert that field in as we assume it is an auto-increment field. Needed by mssql. -

    Changed postgres7 MetaForeignKeys() see http://phplens.com/lens/lensforum/msgs.php?id=15531 -

    DB2 will now return db2_conn_errormsg() when it is a connection error. -

    4.90 8 June 2006 -

    Changed adodb_countrec() in adodb-lib.inc.php to allow LIMIT to be used as a speedup to reduce no of records counted. -

    Added support for transaction modes for postgres and oci8 with SetTransactionMode(). -These transaction modes affect all subsequent transactions of that connection. -

    Thanks to Halmai Csongor for suggestion. -

    Removed $off = $fieldOffset - 1 line in db2 driver, FetchField(). Tx Larry Menard. -

    Added support for PHP5 objects as Execute() bind parameters using __toString (eg. Simple-XML). Thx Carl-Christian Salvesen. -

    Rounding in tohtml.inc.php did not work properly. Fixed. -

    MetaIndexes in postgres fails when fields are deleted then added in again because the attnum has gaps in it. -See http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976. Fixed. -

    MetaForeignkeys in mysql and mysqli did not work when fetchMode==ADODB_FETCH_ASSOC used. Fixed. -

    Reference error in AutoExecute() fixed. -

    Added macaddr postgres type to MetaType. Maps to 'C'. -

    Added to _connect() in adodb-ado5.inc.php support for $database and $dataProvider parameters. Thx Larry Menard. -

    Added support for sequences in adodb-ado_mssql.inc.php. Thx Larry Menard. -

    Added ADODB_SESSION_READONLY. -

    Added session expiryref support to crc32 mode, and in LOB code. -

    Clear _errorMsg in postgres7 driver, so that ErrorMsg() displays properly when no error occurs. -

    Added BindDate and BindTimeStamp -

    4.81 3 May 2006 -

    Fixed variable ref errors in adodb-ado5.inc.php in _query(). -

    Mysqli setcharset fix using method_exists(). -

    The adodb-perf.inc.php CreateLogTable() code now works for user-defined table names. -

    Error in ibase_blob_open() fixed. See http://phplens.com/lens/lensforum/msgs.php?id=14997 -

    4.80 8 Mar 2006 -

    Added activerecord support. -

    Added mysql $conn->compat323 = true if you want MySQL 3.23 compat enabled. Fixes GetOne() Select-Limit problems. -

    Added adodb-xmlschema03.inc.php to support XML Schema version 3 and updated adodb-datadict.htm docs. -

    Better memory management in Execute. Thx Mike Fedyk. -

    4.72 21 Feb 2006 -

    Added 'new' DSN parameter for NConnect(). -

    Pager now sanitizes $PHP_SELF to protect against XSS. Thx to James Bercegay and others. -

    ADOConnection::MetaType changed to setup $rs->connection correctly. -

    New native DB2 driver contributed by Larry Menard, Dan Scott, Andy Staudacher, Bharat Mediratta. -

    The mssql CreateSequence() did not BEGIN TRANSACTION correctly. Fixed. Thx Sean Lee. -

    The _adodb_countrecs() function in adodb-lib.inc.php has been revised to handle more ORDER BY variations. -

    4.71 24 Jan 2006 -

    Fixes postgresql security issue related to binary strings. Thx to Andy Staudacher. -

    Several DSN bugs found: -

    1. Fix bugs in DSN connections introduced in 4.70 when underscores are found in the DSN. -

    2. DSN with _ did not work properly in PHP5 (fine in PHP4). Fixed. -

    3. Added support for PDO DSN connections in NewADOConnection(), and database parameter in PDO::Connect(). -

    The oci8 datetime flag not correctly implemented in ADORecordSet_array. Fixed. -

    Added BlobDelete() to postgres, as a counterpoint to UpdateBlobFile(). -

    Fixed GetInsertSQL() to support oci8po. -

    Fixed qstr() issue with postgresql with \0 in strings. -

    Fixed some datadict driver loading issues in _adodb_getdriver(). -

    Added register shutdown function session_write_close in adodb-session.inc.php for PHP 5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=14200. -

    4.70 6 Jan 2006 -

    Many fixes from Danila Ulyanov to ibase, oci8, postgres, mssql, odbc_oracle, odbtp, etc drivers. -

    Changed usage of binary hint in adodb-session.inc.php for mysql. See -http://phplens.com/lens/lensforum/msgs.php?id=14160 -

    Fixed invalid variable reference problem in undomq(), adodb-perf.inc.php. -

    Fixed http://phplens.com/lens/lensforum/msgs.php?id=14254 in adodb-perf.inc.php, _DBParameter() settings of fetchmode was wrong. -

    Fixed security issues in server.php and tmssql.php discussed by Andreas Sandblad in a Secunia security advisory. Added $ACCEPTIP = 127.0.0.1 -and changed suggested root password to something more secure. -

    Changed pager to close recordset after RenderLayout(). -

    4.68 25 Nov 2005 -

    PHP 5 compat for mysqli. MetaForeignKeys repeated twice and MYSQLI_BINARY_FLAG missing. -

    PHP 5.1 support for postgresql bind parameters using ? did not work if >= 10 parameters. Fixed. Thx to Stanislav Shramko. -

    Lots of PDO improvements. -

    Spelling error fixed in mysql MetaForeignKeys, $associative parameter. -

    4.67 16 Nov 2005 -

    Postgresql not_null flag not set to false correctly. Thx Cristian MARIN. -

    We now check in Replace() if key is in fieldArray. Thx Sbastien Vanvelthem. -

    _file_get_contents() function was missing in xmlschema. fixed. -

    Added week in year support to SQLDate(), using 'W' flag. Thx Spider. -

    In sqlite metacolumns was repeated twice, causing PHP 5 problems. Fixed. -

    Made debug output XHTML compliant. -

    4.66 28 Sept 2005 -

    ExecuteCursor() in oci8 did not clean up properly on failure. Fixed. -

    Updated xmlschema.dtd, by "Alec Smecher" asmecher#smecher.bc.ca -

    Hardened SelectLimit, typecasting nrows and offset to integer. -

    Fixed misc bugs in AutoExecute() and GetInsertSQL(). -

    Added $conn->database as the property holding the database name. The older $conn->databaseName is retained for backward -compat. -

    Changed _adodb_backtrace() compat check to use function_exists(). -

    Bug in postgresql MetaIndexes fixed. Thx Kevin Jamieson. -

    Improved OffsetDate for MySQL, reducing rounding error. -

    Metacolumns added to sqlite. Thx Mark Newnham. -

    PHP 4.4 compat fixes for GetAssoc(). -

    Added postgresql bind support for php 5.1. Thx Cristiano da Cunha Duarte -

    OffsetDate() fixes for postgresql, typecasting strings to date or timestamp. -

    DBTimeStamp formats for mssql, odbc_mssql and postgresql made to conform with other db's. -

    Changed PDO constants from PDO_ to PDO:: to support latest spec. -

    4.65 22 July 2005 -

    Reverted 'X' in mssql datadict to 'TEXT' to be compat with mssql driver. However now you can -set $datadict->typeX = 'varchar(4000)' or 'TEXT' or 'CLOB' for mssql and oci8 drivers. -

    Added charset support when using DSN for Oracle. -

    _adodb_getmenu did not use fieldcount() to get number of fields. Fixed. -

    MetaForeignKeys() for mysql/mysqli contributed by Juan Carlos Gonzalez. -

    MetaDatabases() now correctly returns an array for mysqli driver. Thx Cristian MARIN. -

    CompleteTrans(false) did not return false. Fixed. Thx to JMF. -

    AutoExecute() did not work with Oracle. Fixed. Thx Jos Moreira. -

    MetaType() added to connection object. -

    More PHP 4.4 reference return fixes. Thx Ryan C Bonham and others. - -

    4.64 20 June 2005 -

    In datadict, if the default field value is set to '', then it is not applied when the field is created. Fixed by Eugenio. -

    MetaPrimaryKeys for postgres did not work because of true/false change in 4.63. Fixed. -

    Tested ocifetchstatement in oci8. Rejected at the end. -

    Added port to dsn handling. Supported in postgres, mysql, mysqli,ldap. -

    Added 'w' and 'l' to mysqli SQLDate(). -

    Fixed error handling in ldap _connect() to be more consistent. Also added ErrorMsg() handling to ldap. -

    Added support for union in _adodb_getcount, adodb-lib.inc.php for postgres and oci8. -

    rs2html() did not work with null dates properly. -

    PHP 4.4 reference return fixes. - -

    4.63 18 May 2005 -

    Added $nrows<0 check to mysqli's SelectLimit(). -

    Added OptimizeTable() and OptimizeTables() in adodb-perf.inc.php. By Markus Staab. -

    PostgreSQL inconsistencies fixed. true and false set to TRUE and FALSE, and boolean type in datadict-postgres.inc.php set -to 'L' => 'BOOLEAN'. Thx Kevin Jamieson. -

    New adodb_session_create_table() function in adodb-session.inc.php. By Markus Staab. -

    Added null check to UserTimeStamp(). -

    Fixed typo in mysqlt driver in adorecordset. Thx to Andy Staudacher. -

    GenID() had a bug in the raiseErrorFn handling. Fixed. Thx Marcos Pont. -

    Datadict name quoting now handles ( ) in index fields correctly - they aren't part of the index field. -

    Performance monitoring: (1) oci8 Ixora checks moved down; (2) expensive sql changed so that only those sql with -count(*)>1 are shown; (3) changed sql1 field to a length+crc32 checksum - this breaks backward compat. -

    We remap firebird15 to firebird in data dictionary. - -

    4.62 2 Apr 2005 -

    Added 'w' (dow as 0-6 or 1-7) and 'l' (dow as string) for SQLDate for oci8, postgres and mysql. -

    Rolled back MetaType() changes for mysqli done in prev version. -

    Datadict change by chris, cblin#tennaxia.com data mappings from: -

    -oci8:  X->varchar(4000) XL->CLOB
    -mssql: X->XL->TEXT
    -mysql: X->XL->LONGTEXT
    -fbird: X->XL->varchar(4000)
    -
    -

    to: -

    -oci8:  X->varchar(4000) XL->CLOB
    -mssql: X->VARCHAR(4000) XL->TEXT
    -mysql: X->TEXT          XL->LONGTEXT
    -fbird: X->VARCHAR(4000) XL->VARCHAR(32000)
    -
    -

    Added $connection->disableBlobs to postgresql to improve performance when no bytea is used (2-5% improvement). -

    Removed all HTTP_* vars. -

    Added $rs->tableName to be set before calling AutoExecute(). -

    Alex Rootoff rootoff#pisem.net contributed ukrainian language file. -

    Added new mysql_option() support using $conn->optionFlags array. -

    Added support for ldap_set_option() using the $LDAP_CONNECT_OPTIONS global variable. Contributed by Josh Eldridge. -

    Added LDAP_* constant definitions to ldap. -

    Added support for boolean bind variables. We use $conn->false and $conn->true to hold values to set false/true to. -

    We now do not close the session connection in adodb-session.inc.php as other objects could be using this connection. -

    We now strip off \0 at end of Ixora SQL strings in $perf->tohtml() for oci8. -

    4.61 23 Feb 2005 -

    MySQLi added support for mysqli_connect_errno() and mysqli_connect_error(). -

    Massive improvements to alpha PDO driver. -

    Quote string bind parameters logged by performance monitor for easy type checking. Thx Jason Judge. -

    Added support for $role when connecting with Interbase/firebird. -

    Added support for enum recognition in MetaColumns() mysql and mysqli. Thx Amedeo Petrella. -

    The sybase_ase driver contributed by Interakt Online. Thx Cristian Marin cristic#interaktonline.com. -

    Removed not_null, has_default, and default_value from ADOFieldObject. -

    Sessions code, fixed quoting of keys when handling LOBs in session write() function. -

    Sessions code, added adodb_session_regenerate_id(), to reduce risk of session hijacking by changing session cookie dynamically. Thx Joe Li. -

    Perf monitor, polling for CPU did not work for PHP 4.3.10 and 5.0.0-5.0.3 due to PHP bugs, so we special case these versions. -

    Postgresql, UpdateBlob() added code to handle type==CLOB. -

    4.60 24 Jan 2005 -

    Implemented PEAR DB's autoExecute(). Simplified design because I don't like using constants when -strings work fine. -

    _rs2serialize will now update $rs->sql and $rs->oldProvider. -

    Added autoExecute(). -

    Added support for postgres8 driver. Currently just remapped to postgres7 driver. -

    Changed oci8 _query(), so that OCIBindByName() sets the length to -1 if element size is > 4000. This provides better support -for LONGs. -

    Added SetDateLocale() support for netherlands (Nl). -

    Spelling error in pivot code ($iff should be $iif). -

    mysql insert_id() did not work with mysql 3.x. Fixed. -

    "\r\n" not converted to spaces correctly in exporting data. Fixed. -

    _nconnect() in mysqli did not return value correctly. Fixed. -

    Arne Eckmann contributed danish language file. -

    Added clone() support to FetchObject() for PHP5.
    -

    -

    Removed SQL_CUR_USE_ODBC from odbc_mssql.
    -

    -

    4.55 5 Jan 2005 -

    Found bug in Execute() with bind params for db's that do not support binding natively. -

    DropSequence() now correctly uses default parameter. -

    Now Execute() ignores locale for floats, so 1.23 is NEVER converted to 1,23. -

    SetFetchMode() not properly saved in adodb-perf, suspicious sql and expensive sql. Fixed. -

    Added INET to postgresql metatypes. Thx motzel. -

    Allow oracle hints to work when counting with _adodb_getcount in adodb-lib.inc.php. Thx Chris Wrye. -

    Changed mysql insert_id() to use SELECT LAST_INSERT_ID(). -

    If alter col in datadict does not modify col type/size of actual -col, then it is removed from alter col code. By Mark Newham. Not -perfect as MetaType() !== ActualType(). -

    Added handling of view fields in metacolumns() for postgresql. Thx Renato De Giovanni. -

    Added to informix MetaPrimaryKeys and MetaColumns fixes for null bit. Thx to Cecilio Albero. -

    Removed obsolete connection_timeout() from perf code. -

    Added support for arrayClass in adodb-csv.inc.php. -

    RSFilter now accepts methods of the form $array($obj, 'methodname'). Thx to blake#near-time.com. -

    Changed CacheFlush to $cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; -

    For better cursor concurrency, added code to free ref cursors in -oci8 when $rs->Close() is called. Note that CLose() is called -internally by the Get* functions too. -

    Added IIF support for access when pivoting. Thx Volodia Krupach. -

    Added mssql datadict support for timestamp. Thx Alexios. -

    Informix pager fix. By Mario Ramirez. -

    ADODB_TABLE_REGEX now includes ':'. By Mario Ramirez. -

    Mark Newnham contributed MetaIndexes for oci8 and db2. -

    4.54 5 Nov 2004 -

    -Now you can set $db->charSet = ?? before doing a Connect() in oci8. -

    -Added adodbFetchMode to sqlite. -

    -Perf code, added a string typecast to substr in adodb_log_sql(). -

    -Postgres: Changed BlobDecode() to use po_loread, added new $maxblobsize parameter, and now it returns the blob instead -of sending it to stdout - make sure to mention that as a compat warning. -Also added $db->IsOID($oid) function; uses a heuristic, not guaranteed to work 100%. -

    -Contributed arabic language file by "El-Shamaa, Khaled" k.el-shamaa#cgiar.org -

    -PHP5 exceptions did not handle @ protocol properly. Fixed. -

    -Added ifnull handling for postgresql (using coalesce). -

    -Added metatables() support for Postgresql 8.0 (no longer uses pg_% dictionary tables). -

    -Improved Sybase ErrorMsg() function. By Gaetano Giunta. -

    -Improved oci8 SelectLimit() to use Prepare(). By Cristiano Duarte. -

    -Type-cast $row parameter in ifx_fetch_row() to int. Thx stefan bodgan. -

    Ralf becker contributed improvements in postgresql, sapdb, mysql data dictionary handling:
    -- MySql and Postgres MetaType was reporting every int column which was -part of a primary key and unique as serial
    -- Postgres was not reporting the scale of decimal types
    -- MaxDB was padding the defaults of none-string types with spaces
    -- MySql now correctly converts enum columns to varchar -

    -Ralf also changed Postgresql datadict:
    -- you cant add NOT NULL columns in postgres in one go, they need to be -added as NULL and then altered to NOT NULL
    -- AlterColumnSQL could not change a varchar column with numbers into an -integer column, postgres need an explicit conversation
    -- a re-created sequence was not set to the correct value, if the name -was the old name (no implicit sequence), now always the new name of the -implicit sequence is used
    -

    Sergio Strampelli added extra $intoken check to Lens_ParseArgs() in datadict code. -

    4.53 28 Sept 2004 -

    FetchMode cached in recordset is sometimes mapped to native db fetchMode. Normally this does not matter, -but when using cached recordsets, we need to switch back to using adodb fetchmode. So we cache this -in $rs->adodbFetchMode if it differs from the db's fetchMode. -

    For informix we now set canSeek = false driver because stefan bodgan tells me that seeking doesn't work. -

    SetDateLocale() never worked till now ;-) Thx david#tomato.it -

    Set $_bindInputArray = true in sapdb driver. Required for clob support. -

    Fixed some PEAR::DB emulation issues with isError() and isWarning. Thx to Gert-Rainer Bitterlich. -

    Empty() used in getupdatesql without strlen() check. Fixed.

    -

    Added unsigned detection to mysql and mysqli drivers. Thx to dan cech. -

    Added hungarian language file. Thx to Halászvári Gábor. -

    Improved fieldname-type formatting of datadict SQL generated (adding $widespacing parameter to _GenField). -

    Datadict oci8 DROP CONSTRAINTS misspelt. Fixed. Thx Mark Newnham. -

    Changed odbtp to dynamically change databaseType based on connection, eg. from 'odbtp' to 'odbtp_mssql' when connecting -to mssql database. -

    In datadict, MySQL I4 was wrongly mapped to MEDIUMINT, which is actually I3. Fixed. -

    Fixed mysqli MetaType() recognition. Mysqli returns numeric types unlike mysql extension. Thx Francesco Riosa. -

    VFP odbc driver curmode set wrongly, causing problems with memo fields. Fixed. -

    Odbc driver did not recognize odbc version 2 driver date types properly. Fixed. Thx Bostjan. -

    ChangeTableSQL() fixes to datadict-db2.inc.php by Mark Newnham. -

    Perf monitoring with odbc improved. Now we try in perf code to manually set the sysTimeStamp using date() if sysTimeStamp -is empty. -

    All ADO errors are thrown as exceptions in PHP5. -So we added exception handling to ado in PHP5 by creating new adodb-ado5.inc.php driver. -

    Added IsConnected(). Returns true if connection object connected. By Luca.Gioppo. -

    "Ralf Becker" -RalfBecker#digitalROCK.de contributed new sapdb data-dictionary driver -and a large patch that implements field and table renaming for oracle, -mssql, postgresql, mysql and sapdb. See the new RenameTableSQL() and -RenameColumnSQL() functions. -

    We now check ExecuteCursor to see if PrepareSP was initially called. -

    Changed oci8 datadict to use MODIFY for $dd->alterCol. Thx Mark Newnham. -

    4.52 10 Aug 2004 -

    Bug found in Replace() when performance logging enabled, introduced in ADOdb 4.50. Fixed. -

    Replace() checks update stmt. If update stmt fails, we now return immediately. Thx to alex. -

    Added support for $ADODB_FORCE_TYPE in GetUpdateSQL/GetInsertSQL. Thx to niko. -

    Added ADODB_ASSOC_CASE support to postgres/postgres7 driver. -

    Support for DECLARE stmt in oci8. Thx Lochbrunner. -

    4.51 29 July 2004 -

    Added adodb-xmlschema 1.0.2. Thx dan and richard. -

    Added new adorecordset_ext_* classes. If ADOdb extension installed for mysql, mysqlt and oci8 -(but not oci8po), we use the superfast ADOdb extension code for movenext. -

    Added schema support to mssql and odbc_mssql MetaPrimaryKeys(). -

    Patched MSSQL driver to support PHP NULL and Boolean values -while binding the input array parameters in the _query() function. By Stephen Farmer. -

    Added support for clob's for mssql, UpdateBlob(). Thx to gfran#directa.com.br -

    Added normalize support for postgresql (true=lowercase table name, or false=case-sensitive table names) -to MetaColumns($table, $normalize=true). -

    PHP5 variant dates in ADO not working. Fixed in adodb-ado.inc.php. -

    Constant ADODB_FORCE_NULLS was not working properly for many releases (for GetUpdateSQL). Fixed. -Also GetUpdateSQL strips off ORDER BY now - thx Elieser Leão. -

    Perf Monitor for oci8 now dynamically highlights optimizer_* params if too high/low. -

    Added dsn support to NewADOConnection/ADONewConnection. -

    Fixed out of page bounds bug in _adodb_pageexecute_all_rows() Thx to "Sergio Strampelli" sergio#rir.it -

    Speedup of movenext for mysql and oci8 drivers. -

    Moved debugging code _adodb_debug_execute() to adodb-lib.inc.php. -

    Fixed postgresql bytea detection bug. See http://phplens.com/lens/lensforum/msgs.php?id=9849. -

    Fixed ibase datetimestamp typo in PHP5. Thx stefan. -

    Removed whitespace at end of odbtp drivers. -

    Added db2 metaprimarykeys fix. -

    Optimizations to MoveNext() for mysql and oci8. Misc speedups to Get* functions. -

    4.50 6 July 2004 -

    Bumped it to 4.50 to avoid confusion with PHP 4.3.x series. -

    Added db2 metatables and metacolumns extensions. -

    Added alpha PDO driver. Very buggy, only works with odbc. -

    Tested mysqli. Set poorAffectedRows = true. Cleaned up movenext() and _fetch(). -

    PageExecute does not work properly with php5 (return val not a variable). Reported Dmytro Sychevsky sych#php.com.ua. Fixed. -

    MetaTables() for mysql, $showschema parameter was not backward compatible with older versions of adodb. Fixed. -

    Changed mysql GetOne() to work with mysql 3.23 when using with non-select stmts (e.g. SHOW TABLES). -

    Changed TRIG_ prefix to a variable in datadict-oci8.inc.php. Thx to Luca.Gioppo#csi.it. -

    New to adodb-time code. We allow you to define your own daylights savings function, -adodb_daylight_sv for pre-1970 dates. If the function is defined -(somewhere in an include), then you can correct -for daylights savings. See http://phplens.com/phpeverywhere/node/view/16#daylightsavings -for more info. -

    New sqlitepo driver. This is because assoc mode does not work like other drivers in sqlite. - Namely, when selecting (joining) multiple tables, in assoc mode the table - names are included in the assoc keys in the "sqlite" driver. - In "sqlitepo" driver, the table names are stripped from the returned column names. - When this results in a conflict, the first field get preference. - Contributed by Herman Kuiper herman#ozuzo.net -

    Added $forcenull parameter to GetInsertSQL/GetUpdateSQL. Idea by Marco Aurelio Silva. -

    More XHTML changes for GetMenu. By Jeremy Evans. -

    Fixes some ibase date issues. Thx to stefan bogdan. -

    Improvements to mysqli driver to support $ADODB_COUNTRECS. -

    Fixed adodb-csvlib.inc.php problem when reading stream from socket. We need to poll stream continiously. -

    4.23 16 June 2004 -

    -New interbase/firebird fixes thx to Lester Caine. -Driver fixes a problem with getting field names in the result array, and -corrects a couple of data conversions. Also we default to dialect3 for firebird. -Also ibase sysDate property was wrong. Changed to cast as timestamp. -

    -The datadict driver is set up to give quoted tables and fields as this -was the only way round reserved words being used as field names in -TikiWiki. TikiPro is tidying that up, and I hope to be able to produce a -build of THAT which uses what I consider proper UPPERCASE field and -table names. The conversion of TikiWiki to ADOdb helped in that, but -until the database is completely tidied up in TikiPro ... -

    Modified _gencachename() to include fetchmode in name hash. -This means you should clear your cache directory after installing this release as the -cache name algorithm has changed. -

    Now Cache* functions work in safe -mode, because we do not create sub-directories in the $ADODB_CACHE_DIR -in safe mode. In non-safe mode we still create sub-directories. Done by -modifying _gencachename(). -

    Added $gmt parameter (true/false) -to UserDate and UserTimeStamp in connection class, to force conversion -of input (in local time) to be converted to UTC/GMT. -

    Mssql datadict did not support INT types properly (no size param allowed). -Added _GetSize() to datadict-mssql.inc.php. -

    For borland_ibase, BeginTrans(), changed:
    -

       $this->_transactionID = $this->_connectionID;
    -to
    -
       $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
    - -

    Fixed typo in mysqi_field_seek(). Thx to Sh4dow (sh4dow#php.pl). -

    LogSQL did not work with Firebird/Interbase. Fixed. -

    Postgres: made errorno() handling more consistent. Thx to Michael Jahn, Michael.Jahn#mailbox.tu-dresden.de. -

    Added informix patch to better support metatables, metacolumns by "Cecilio Albero" c-albero#eos-i.com -

    Cyril Malevanov contributed patch to oci8 to support passing of LOB parameters: -

    	$text = 'test test test';
    $sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
    $stmt = $conn -> PrepareSP($sql);
    $conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB);
    $rs = '';
    $conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
    $conn -> Execute($stmt);
    echo "return = ".$rs."<br>";
    -As he says, the LOBs limitations are: -
     - use OCINewDescriptor before binding
    - if Param is IN, uses save() before each execute. This is done automatically for you.
    - if Param is OUT, uses load() after each execute. This is done automatically for you.
    - when we bind $var as LOB, we create new descriptor and return it as a
    Bind Result, so if we want to use OUT parameters, we have to store
    somewhere &$var to load() data from LOB to it.
    - IN OUT params are not working now (should not be a big problem to fix it)
    - now mass binding not working too (I've wrote about it before)
    -

    Simplified Connect() and PConnect() error handling. -

    When extension not loaded, Connect() and PConnect() will return null. On connect error, the fns will return false. -

    CacheGetArray() added to code. -

    Added Init() to adorecordset_empty(). -

    Changed postgres64 driver, MetaColumns() to not strip off quotes in default value if :: detected (type-casting of default). -

    Added test: if (!defined('ADODB_DIR')) die(). Useful to prevent hackers from detecting file paths. -

    Changed metaTablesSQL to ignore Postgres 7.4 information schemas (sql_*). -

    New polish language file by Grzegorz Pacan -

    Added support for UNION in _adodb_getcount(). -

    Added security check for ADODB_DIR to limit path disclosure issues. Requested by postnuke team. -

    Added better error message support to oracle driver. Thx to Gaetano Giunta. -

    Added showSchema support to mysql. -

    Bind in oci8 did not handle $name=false properly. Fixed. -

    If extension not loaded, Connect(), PConnect(), NConnect() will return null. -

    4.22 15 Apr 2004 -

    Moved docs to own adodb/docs folder. -

    Fixed session bug when quoting compressed/encrypted data in Replace(). -

    Netezza Driver and LDAP drivers contributed by Josh Eldridge. -

    GetMenu now uses rtrim() on values instead of trim(). -

    Changed MetaColumnNames to return an associative array, keys being the field names in uppercase. -

    Suggested fix to adodb-ado.inc.php affected_rows to support PHP5 variants. Thx to Alexios Fakos. -

    Contributed bulgarian language file by Valentin Sheiretsky valio#valio.eu.org. -

    Contributed romanian language file by stefan bogdan. -

    GetInsertSQL now checks for table name (string) in $rs, and will create a recordset for that -table automatically. Contributed by Walt Boring. Also added OCI_B_BLOB in bind on Walt's request - hope -it doesn't break anything :-) -

    Some minor postgres speedups in _initrs(). -

    ChangeTableSQL checks now if MetaColumns returns empty. Thx Jason Judge. -

    Added ADOConnection::Time(), returns current database time in unix timestamp format, or false. -

    4.21 20 Mar 2004 -

    We no longer in SelectLimit for VFP driver add SELECT TOP X unless an ORDER BY exists. -

    Pim Koeman contributed dutch language file adodb-nl.inc.php. -

    Rick Hickerson added CLOB support to db2 datadict. -

    Added odbtp driver. Thx to "stefan bogdan" sbogdan#rsb.ro. -

    Changed PrepareSP() 2nd parameter, $cursor, to default to true (formerly false). Fixes oci8 backward -compat problems with OUT params. -

    Fixed month calculation error in adodb-time.inc.php. 2102-June-01 appeared as 2102-May-32. -

    Updated PHP5 RC1 iterator support. API changed, hasMore() renamed to valid(). -

    Changed internal format of serialized cache recordsets. As we store a version number, this should be -backward compatible. -

    Error handling when driver file not found was flawed in ADOLoadCode(). Fixed. -

    4.20 27 Feb 2004 -

    Updated to AXMLS 1.01. -

    MetaForeignKeys for postgres7 modified by Edward Jaramilla, works on pg 7.4. -

    Now numbers accepts function calls or sequences for GetInsertSQL/GetUpdateSQL numeric fields. -

    Changed quotes of 'delete from $perf_table' to "". Thx Kehui (webmaster#kehui.net) -

    Added ServerInfo() for ifx, and putenv trim fix. Thx Fernando Ortiz. -

    Added addq(), which is analogous to addslashes(). -

    Tested with php5b4. Fix some php5 compat problems with exceptions and sybase. -

    Carl-Christian Salvesen added patch to mssql _query to support binds greater than 4000 chars. -

    Mike suggested patch to PHP5 exception handler. $errno must be numeric. -

    Added double quotes (") to ADODB_TABLE_REGEX. -

    For oci8, Prepare(...,$cursor), -$cursor's meaning was accidentally inverted in 4.11. This causes -problems with ExecuteCursor() too, which calls Prepare() internally. -Thx to William Lovaton. -

    Now dateHasTime property in connection object renamed to datetime for consistency. This could break bc. -

    Csongor Halmai reports that db2 SelectLimit with input array is not working. Fixed.. -

    4.11 27 Jan 2004 -

    Csongor Halmai reports db2 binding not working. Reverted back to emulated binding. -

    Dan Cech modifies datadict code. Adds support for DropIndex. Minor cleanups. -

    Table misspelt in perf-oci8.inc.php. Changed v$conn_cache_advice to v$db_cache_advice. Reported by Steve W. -

    UserTimeStamp and DBTimeStamp did not handle YYYYMMDDHHMMSS format properly. Reported by Mike Muir. Fixed. -

    Changed oci8 Prepare(). Does not auto-allocate OCINewCursor automatically, unless 2nd param is set to true. -This will break backward compat, if Prepare/Execute is used instead of ExecuteCursor. Reported by Chris Jones. -

    Added InParameter() and OutParameter(). Wrapper functions to Parameter(), but nicer because they -are self-documenting. -

    Added 'R' handling in ActualType() to datadict-mysql.inc.php -

    Added ADOConnection::SerializableRS($rs). Returns a recordset that can be serialized in a session. -

    Added "Run SQL" to performance UI(). -

    Misc spelling corrections in adodb-mysqli.inc.php, adodb-oci8.inc.php and datadict-oci8.inc.php, from Heinz Hombergs. -

    MetaIndexes() for ibase contributed by Heinz Hombergs. -

    4.10 12 Jan 2004 -

    Dan Cech contributed extensive changes to data dictionary to support name quoting (with `), and drop table/index. -

    Informix added cursorType property. Default remains IFX_SCROLL, but you can change to 0 (non-scrollable cursor) for performance. -

    Added ADODB_View_PrimaryKeys() for returning view primary keys to MetaPrimaryKeys(). -

    Simplified chinese file, adodb-cn.inc.php from cysoft. -

    Added check for ctype_alnum in adodb-datadict.inc.php. Thx to Jason Judge. -

    Added connection parameter to ibase Prepare(). Fix by Daniel Hassan. -

    Added nameQuote for quoting identifiers and names to connection obj. Requested by Jason Judge. Also the -data dictionary parser now detects `field name` and generates column names with spaces correctly. -

    BOOL type not recognised correctly as L. Fixed. -

    Fixed paths in ADODB_DIR for session files, and back-ported it to 4.05 (15 Dec 2003) -

    Added Schema to postgresql MetaTables. Thx to col#gear.hu -

    Empty postgresql recordsets that had blob fields did not set EOF properly. Fixed. -

    CacheSelectLimit internal parameters to SelectLimit were wrong. Thx to Nio. -

    Modified adodb_pr() and adodb_backtrace() to support command-line usage (eg. no html). -

    Fixed some fr and it lang errors. Thx to Gaetano G. -

    Added contrib directory, with adodb rs to xmlrpc convertor by Gaetano G. -

    Fixed array recordset bugs when _skiprow1 is true. Thx to Gaetano G. -

    Fixed pivot table code when count is false. -

    - -

    4.05 13 Dec 2003 -

    Added MetaIndexes to data-dict code - thx to Dan Cech. -

    Rewritten session code by Ross Smith. Moved code to adodb/session directory. -

    Added function exists check on connecting to most drivers, so we don't crash with the unknown function error. -

    Smart Transactions failed with GenID() when it no seq table has been created because the sql - statement fails. Fix by Mark Newnham. -

    Added $db->length, which holds name of function that returns strlen. -

    Fixed error handling for bad driver in ADONewConnection - passed too few params to error-handler. -

    Datadict did not handle types like 16.0 properly in _GetSize. Fixed. -

    Oci8 driver SelectLimit() bug &= instead of =& used. Thx to Swen Thümmler. -

    Jesse Mullan suggested not flushing outp when output buffering enabled. Due to Apache 2.0 bug. Added. -

    MetaTables/MetaColumns return ref bug with PHP5 fixed in adodb-datadict.inc.php. -

    New mysqli driver contributed by Arjen de Rijke. Based on adodb 3.40 driver. -Then jlim added BeginTrans, CommitTrans, RollbackTrans, IfNull, SQLDate. Also fixed return ref bug. -

    $ADODB_FLUSH added, if true then force flush in debugging outp. Default is false. In earlier -versions, outp defaulted to flush, which is not compat with apache 2.0. -

    Mysql driver's GenID() function did not work when when sql logging is on. Fixed. -

    $ADODB_SESSION_TBL not declared as global var. Not available if adodb-session.inc.php included in function. Fixed. -

    The input array not passed to Execute() in _adodb_getcount(). Fixed. -

    4.04 13 Nov 2003 -

    Switched back to foreach - faster than list-each. -

    Fixed bug in ado driver - wiping out $this->fields with date fields. -

    Performance Monitor, View SQL, Explain Plan did not work if strlen($SQL)>max($_GET length). Fixed. -

    Performance monitor, oci8 driver added memory sort ratio. -

    Added random property, returns SQL to generate a floating point number between 0 and 1; -

    4.03 6 Nov 2003 -

    The path to adodb-php4.inc.php and adodb-iterators.inc.php was not setup properly. -

    Patched SQLDate in interbase to support hours/mins/secs. Thx to ari kuorikoski. -

    Force autorollback for pgsql persistent connections - -apparently pgsql did not autorollback properly before 4.3.4. See http://bugs.php.net/bug.php?id=25404 -

    4.02 5 Nov 2003 -

    Some errors in adodb_error_pg() fixed. Thx to Styve. -

    Spurious Insert_ID() error was generated by LogSQL(). Fixed. -

    Insert_ID was interfering with Affected_Rows() and Replace() when LogSQL() enabled. Fixed. -

    More foreach loops optimized with list/each. -

    Null dates not handled properly in ADO driver (it becomes 31 Dec 1969!). -

    Heinz Hombergs contributed patches for mysql MetaColumns - adding scale, made -interbase MetaColumns work with firebird/interbase, and added lang/adodb-de.inc.php. -

    Added INFORMIXSERVER environment variable. -

    Added $ADODB_ANSI_PADDING_OFF for interbase/firebird. -

    PHP 5 beta 2 compat check. Foreach (Iterator) support. Exceptions support. -

    4.01 23 Oct 2003 -

    Fixed bug in rs2html(), tohtml.inc.php, that generated blank table cells. -

    Fixed insert_id() incorrectly generated when logsql() enabled. -

    Modified PostgreSQL _fixblobs to use list/each instead of foreach. -

    Informix ErrorNo() implemented correctly. -

    Modified several places to use list/each, including GetRowAssoc(). -

    Added UserTimeStamp() to connection class. -

    Added $ADODB_ANSI_PADDING_OFF for oci8po. -

    4.00 20 Oct 2003 -

    Upgraded adodb-xmlschema to 1 Oct 2003 snapshot. -

    Fix to rs2html warning message. Thx to Filo. -

    Fix for odbc_mssql/mssql SQLDate(), hours was wrong. -

    Added MetaColumns and MetaPrimaryKeys for sybase. Thx to Chris Phillipson. -

    Added autoquoting to datadict for MySQL and PostgreSQL. Suggestion by Karsten Dambekalns -

    3.94 11 Oct 2003 -

    Create trigger in datadict-oci8.inc.php did not work, because all cr/lf's must be removed. -

    ErrorMsg()/ErrorNo() did not work for many databases when logging enabled. Fixed. -

    Removed global variable $ADODB_LOGSQL as it does not work properly with multiple connections. -

    Added SQLDate support for sybase. Thx to Chris Phillipson -

    Postgresql checking of pgsql resultset resource was incorrect. Fix by Bharat Mediratta bharat#menalto.com. -Same patch applied to _insertid and _affectedrows for adodb-postgres64.inc.php. -

    Added support for NConnect for postgresql. -

    Added Sybase data dict support. Thx to Chris Phillipson -

    Extensive improvements in $perf->UI(), eg. Explain now opens in new window, we show scripts -which call sql, etc. -

    Perf Monitor UI works with magic quotes enabled. -

    rsPrefix was declared twice. Removed. -

    Oci8 stored procedure support, eg. "begin func(); end;" was incorrect in _query. Fixed. -

    Tiraboschi Massimiliano contributed italian language file. -

    Fernando Ortiz, fortiz#lacorona.com.mx, contributed informix performance monitor. -

    Added _varchar (varchar arrays) support for postgresql. Reported by PREVOT Stéphane.


    -

    0.10 Sept 9 2000 First release -

    Old change log history moved to old-changelog.htm. -

    -

     

    -

    -

    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-datadict.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-datadict.htm.svn-base deleted file mode 100755 index 6bc19f8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-datadict.htm.svn-base +++ /dev/null @@ -1,328 +0,0 @@ - - - - ADOdb Data Dictionary Manual - - - - -

    ADOdb Data Dictionary Library for PHP

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my).
    -AXMLS (c) 2004 ars Cognita, Inc

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products.

    - -

    Useful ADOdb links: DownloadOther Docs -

    -

    This documentation describes a PHP class library to automate the -creation of tables, indexes and foreign key constraints portably for -multiple databases. Richard Tango-Lowy and Dan Cech have been kind -enough to contribute AXMLS, an XML schema -system for defining databases. You can contact them at -dcech#phpwerx.net and richtl#arscognita.com.

    -

    Currently the following databases are supported:

    -

    Well-tested: PostgreSQL, MySQL, Oracle, MSSQL.
    -Beta-quality: DB2, Informix, Sybase, Interbase, Firebird.
    -Alpha-quality: MS Access (does not support DEFAULT values) and -generic ODBC. -

    -

    Example Usage

    -
      include_once('adodb.inc.php');
    # First create a normal connection
    $db = NewADOConnection('mysql');
    $db->Connect(...);

    # Then create a data dictionary object, using this connection
    $dict = NewDataDictionary($db);

    # We have a portable declarative data dictionary format in ADOdb, similar to SQL.
    # Field types use 1 character codes, and fields are separated by commas.
    # The following example creates three fields: "col1", "col2" and "col3":

    $flds = "
    col1 C(32) NOTNULL DEFAULT 'abc',
    col2 I DEFAULT 0,
    col3 N(12.2)

    ";

    # We demonstrate creating tables and indexes
    $sqlarray = $dict->CreateTableSQL($tabname, $flds, $taboptarray);
    $dict->ExecuteSQLArray($sqlarray);

    $idxflds = 'co11, col2';
    $sqlarray = $dict->CreateIndexSQL($idxname, $tabname, $idxflds);
    $dict->ExecuteSQLArray($sqlarray);
    -

    More Complex Table Sample

    -

    -The following string will create a table with a primary key event_id and multiple indexes, including one compound index idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94 by Gaetano Giunta. -

    -$flds = "
    -  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
    -  event_type I(4) NOTNULL  INDEX idx_evt,
    -  event_start_date T DEFAULT NULL INDEX id_esd,
    -  event_end_date T DEFAULT '0000-00-00 00:00:00' INDEX id_eted,
    -  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 INDEX id_evp,
    -  event_owner I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_project I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
    -  event_icon C(20) DEFAULT 'obj/event',
    -  event_description X
    -";
    -$sqlarray = $db->CreateTableSQL($tablename, $flds);
    -$dict->ExecuteSQLArray($sqlarray);
    -
    -

    Class Factory

    -

    NewDataDictionary($connection, $drivername=false)

    -

    Creates a new data dictionary object. You pass a database connection object in $connection. The $connection does not have to be actually connected to the database. Some database connection objects are generic (eg. odbtp and odbc). Since 4.53, you can tell ADOdb the actual database with $drivername. E.g.

    -
    -$db =& NewADOConnection('odbtp');
    -$datadict = NewDataDictionary($db, 'mssql'); # force mssql
    -
    -

    Class Functions

    -

    function CreateDatabase($dbname, $optionsarray=false)

    -

    Create a database with the name $dbname;

    -

    function CreateTableSQL($tabname, $fldarray, $taboptarray=false)

    -
      RETURNS:      an array of strings, the sql to be executed, or false
    $tabname: name of table
    $fldarray: string (or array) containing field info
    $taboptarray: array containing table options
    -

    The new format of $fldarray uses a free text format, where each -field is comma-delimited. -The first token for each field is the field name, followed by the type -and optional -field size. Then optional keywords in $otheroptions:

    -
      "$fieldname $type $colsize $otheroptions"
    -

    The older (and still supported) format of $fldarray is a -2-dimensional array, where each row in the 1st dimension represents one -field. Each row has this format:

    -
      array($fieldname, $type, [,$colsize] [,$otheroptions]*)
    -

    The first 2 fields must be the field name and the field type. The -field type can be a portable type codes or the actual type for that -database.

    -

    Legal portable type codes include:

    -
      C:  Varchar, capped to 255 characters.
    X: Larger varchar, capped to 4000 characters (to be compatible with Oracle).
    XL: For Oracle, returns CLOB, otherwise the largest varchar size.

    C2: Multibyte varchar
    X2: Multibyte varchar (largest size)

    B: BLOB (binary large object)

    D: Date (some databases do not support this, and we return a datetime type)
    T: Datetime or Timestamp
    L: Integer field suitable for storing booleans (0 or 1)
    I: Integer (mapped to I4)
    I1: 1-byte integer
    I2: 2-byte integer
    I4: 4-byte integer
    I8: 8-byte integer
    F: Floating point number
    N: Numeric or decimal number
    -

    The $colsize field represents the size of the field. If a decimal -number is used, then it is assumed that the number following the dot is -the precision, so 6.2 means a number of size 6 digits and 2 decimal -places. It is recommended that the default for number types be -represented as a string to avoid any rounding errors.

    -

    The $otheroptions include the following keywords (case-insensitive):

    -
      AUTO            For autoincrement number. Emulated with triggers if not available.
    Sets NOTNULL also.
    AUTOINCREMENT Same as auto.
    KEY Primary key field. Sets NOTNULL also. Compound keys are supported.
    PRIMARY Same as KEY.
    DEF Synonym for DEFAULT for lazy typists.
    DEFAULT The default value. Character strings are auto-quoted unless
    the string begins and ends with spaces, eg ' SYSDATE '.
    NOTNULL If field is not null.
    DEFDATE Set default value to call function to get today's date.
    DEFTIMESTAMP Set default to call function to get today's datetime.
    NOQUOTE Prevents autoquoting of default string values.
    CONSTRAINTS Additional constraints defined at the end of the field
    definition.
    -

    The Data Dictonary accepts two formats, the older array -specification:

    -
      $flds = array(
    array('COLNAME', 'DECIMAL', '8.4', 'DEFAULT' => 0, 'NOTNULL'),
    array('id', 'I' , 'AUTO'),
    array('`MY DATE`', 'D' , 'DEFDATE'),
    array('NAME', 'C' , '32', 'CONSTRAINTS' => 'FOREIGN KEY REFERENCES reftable')
    );
    -

    Or the simpler declarative format:

    -
      $flds = "
    COLNAME DECIMAL(8.4) DEFAULT 0 NOTNULL,
    id I AUTO,
    `MY DATE` D DEFDATE,
    NAME C(32) CONSTRAINTS 'FOREIGN KEY REFERENCES reftable'

    ";
    -

    Note that if you have special characters in the field name (e.g. My -Date), you should enclose it in back-quotes. Normally field names are -not case-sensitive, but if you enclose it in back-quotes, some -databases will treat the names as case-sensitive (eg. Oracle) , and -others won't. So be careful.

    -

    The $taboptarray is the 3rd parameter of the CreateTableSQL -function. This contains table specific settings. Legal keywords include:

    -
      -
    • REPLACE
      -Indicates that the previous table definition should be removed -(dropped)together with ALL data. See first example below.
    • -
    • DROP
      -Drop table. Useful for removing unused tables.
    • -
    • CONSTRAINTS
      -Define this as the key, with the constraint as the value. See the -postgresql example below. Additional constraints defined for the whole -table. You will probably need to prefix this with a comma.
    • -
    -

    Database specific table options can be defined also using the name -of the database type as the array key. In the following example, create -the table as ISAM with MySQL, and store the table in the "users" -tablespace if using Oracle. And because we specified REPLACE, drop -the table first.

    -
      $taboptarray = array('mysql' => 'TYPE=ISAM', 'oci8' => 'tablespace users', 'REPLACE');
    -

    You can also define foreign key constraints. The following is syntax -for postgresql: -

    -
      $taboptarray = array('constraints' => ', FOREIGN KEY (col1) REFERENCES reftable (refcol)');
    -

    function DropTableSQL($tabname)

    -

    Returns the SQL to drop the specified table.

    -

    function ChangeTableSQL($tabname, $flds)

    -

    Checks to see if table exists, if table does not exist, behaves like -CreateTableSQL. If table exists, generates appropriate ALTER TABLE -MODIFY COLUMN commands if field already exists, or ALTER TABLE ADD -$column if field does not exist.

    -

    The class must be connected to the database for ChangeTableSQL to -detect the existence of the table. Idea and code contributed by Florian -Buzin.

    -

    function RenameTableSQL($tabname,$newname)

    -

    Rename a table. Returns the an array of strings, which is the SQL required to rename a table. Since ADOdb 4.53. Contributed by Ralf Becker.

    -

    function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')

    -

    Rename a table field. Returns the an array of strings, which is the SQL required to rename a column. The optional $flds is a complete column-defintion-string like for AddColumnSQL, only used by mysql at the moment. Since ADOdb 4.53. Contributed by Ralf Becker.

    -

    function CreateIndexSQL($idxname, $tabname, $flds, -$idxoptarray=false)

    -
      RETURNS:      an array of strings, the sql to be executed, or false
    $idxname: name of index
    $tabname: name of table
    $flds: list of fields as a comma delimited string or an array of strings
    $idxoptarray: array of index creation options
    -

    $idxoptarray is similar to $taboptarray in that index specific -information can be embedded in the array. Other options include:

    -
      CLUSTERED     Create clustered index (only mssql)
    BITMAP Create bitmap index (only oci8)
    UNIQUE Make unique index
    FULLTEXT Make fulltext index (only mysql)
    HASH Create hash index (only postgres)
    DROP Drop legacy index
    -

    function DropIndexSQL ($idxname, $tabname = NULL)

    -

    Returns the SQL to drop the specified index.

    -

    function AddColumnSQL($tabname, $flds)

    -

    Add one or more columns. Not guaranteed to work under all situations.

    -

    function AlterColumnSQL($tabname, $flds)

    -

    Warning, not all databases support this feature.

    -

    function DropColumnSQL($tabname, $flds)

    -

    Drop 1 or more columns.

    -

    function SetSchema($schema)

    -

    Set the schema.

    -

    function &MetaTables()

    -

    function &MetaColumns($tab, $upper=true, $schema=false)

    -

    function &MetaPrimaryKeys($tab,$owner=false,$intkey=false)

    -

    function &MetaIndexes($table, $primary = false, $owner = false)

    -

    These functions are wrappers for the corresponding functions in the -connection object. However, the table names will be autoquoted by the -TableName function (see below) before being passed to the connection -object.

    -

    function NameQuote($name = NULL)

    -

    If the provided name is quoted with backquotes (`) or contains -special characters, returns the name quoted with the appropriate quote -character, otherwise the name is returned unchanged.

    -

    function TableName($name)

    -

    The same as NameQuote, but will prepend the current schema if -specified

    -

    function MetaType($t,$len=-1,$fieldobj=false)

    -

    function ActualType($meta)

    -

    Convert between database-independent 'Meta' and database-specific -'Actual' type codes.

    -

    function ExecuteSQLArray($sqlarray, $contOnError = true)

    -
      RETURNS:      0 if failed, 1 if executed all but with errors, 2 if executed successfully
    $sqlarray: an array of strings with sql code (no semicolon at the end of string)
    $contOnError: if true, then continue executing even if error occurs
    -

    Executes an array of SQL strings returned by CreateTableSQL or -CreateIndexSQL.

    -
    - -

    ADOdb XML Schema (AXMLS)

    -

    This is a class contributed by Richard Tango-Lowy and Dan Cech that -allows the user to quickly -and easily build a database using the excellent ADODB database library -and a simple XML formatted file. -You can download -the latest version of AXMLS here.

    -

    Quick Start

    -

    Adodb-xmlschema, or AXMLS, is a set of classes that allow the user -to quickly and easily build or upgrade a database on almost any RDBMS -using the excellent ADOdb database library and a simple XML formatted -schema file. Our goal is to give developers a tool that's simple to -use, but that will allow them to create a single file that can build, -upgrade, and manipulate databases on most RDBMS platforms.

    - Installing axmls -

    The easiest way to install AXMLS to download and install any recent -version of the ADOdb database abstraction library. To install AXMLS -manually, simply copy the adodb-xmlschema.inc.php file and the xsl -directory into your adodb directory.

    - Using AXMLS in Your Application -

    There are two steps involved in using AXMLS in your application: -first, you must create a schema, or XML representation of your -database, and second, you must create the PHP code that will parse and -execute the schema.

    -

    Let's begin with a schema that describes a typical, if simplistic -user management table for an application.

    -
    <?xml version="1.0"?>
    <schema version="0.2">

    <table name="users">
    <desc>A typical users table for our application.</desc>
    <field name="userId" type="I">
    <descr>A unique ID assigned to each user.</descr>

    <KEY/>
    <AUTOINCREMENT/>
    </field>

    <field name="userName" type="C" size="16"><NOTNULL/></field>


    <index name="userName">
    <descr>Put a unique index on the user name</descr>
    <col>userName</col>
    <UNIQUE/>

    </index>
    </table>

    <sql>
    <descr>Insert some data into the users table.</descr>
    <query>insert into users (userName) values ( 'admin' )</query>

    <query>insert into users (userName) values ( 'Joe' )</query>
    </sql>
    </schema>
    -

    Let's take a detailed look at this schema.

    -

    The opening <?xml version="1.0"?> tag is required by XML. The -<schema> tag tells the parser that the enclosed markup defines an -XML schema. The version="0.2" attribute sets the version of the -AXMLS DTD used by the XML schema.

    -

    All versions of AXMLS prior to version 1.0 have a schema version of -"0.1". The current schema version is "0.2".

    -
    <?xml version="1.0"?>
    <schema version="0.2">
    ...
    </schema>
    -

    Next we define one or more tables. A table consists of a fields (and -other objects) enclosed by <table> tags. The name="" attribute -specifies the name of the table that will be created in the database.

    -
    <table name="users">

    <desc>A typical users table for our application.</desc>
    <field name="userId" type="I">

    <descr>A unique ID assigned to each user.</descr>
    <KEY/>
    <AUTOINCREMENT/>
    </field>

    <field name="userName" type="C" size="16"><NOTNULL/></field>


    </table>
    -

    This table is called "users" and has a description and two fields. -The description is optional, and is currently only for your own -information; it is not applied to the database.

    -

    The first <field> tag will create a field named "userId" of -type "I", or integer. (See the ADOdb Data Dictionary documentation for -a list of valid types.) This <field> tag encloses two special -field options: <KEY/>, which specifies this field as a primary -key, and <AUTOINCREMENT/>, which specifies that the database -engine should automatically fill this field with the next available -value when a new row is inserted.

    -

    The second <field> tag will create a field named "userName" of -type "C", or character, and of length 16 characters. The -<NOTNULL/> option specifies that this field does not allow NULLs.

    -

    There are two ways to add indexes to a table. The simplest is to -mark a field with the <KEY/> option as described above; a primary -key is a unique index. The second and more powerful method uses the -<index> tags.

    -
    <table name="users">
    ...

    <index name="userName">
    <descr>Put a unique index on the user name</descr>
    <col>userName</col>

    <UNIQUE/>
    </index>

    </table>
    -

    The <index> tag specifies that an index should be created on -the enclosing table. The name="" attribute provides the name of the -index that will be created in the database. The description, as above, -is for your information only. The <col> tags list each column -that will be included in the index. Finally, the <UNIQUE/> tag -specifies that this will be created as a unique index.

    -

    Finally, AXMLS allows you to include arbitrary SQL that will be -applied to the database when the schema is executed.

    -
    <sql>
    <descr>Insert some data into the users table.</descr>
    <query>insert into users (userName) values ( 'admin' )</query>

    <query>insert into users (userName) values ( 'Joe' )</query>
    </sql>
    -

    The <sql> tag encloses any number of SQL queries that you -define for your own use.

    -

    Now that we've defined an XML schema, you need to know how to apply -it to your database. Here's a simple PHP script that shows how to load -the schema.

    -
    <?PHP
    /* You must tell the script where to find the ADOdb and
    * the AXMLS libraries.
    */ -require( "path_to_adodb/adodb.inc.php"); -require( "path_to_adodb/adodb-xmlschema.inc.php" ); # or adodb-xmlschema03.inc.php - -/* Configuration information. Define the schema filename,
    * RDBMS platform (see the ADODB documentation for valid
    * platform names), and database connection information here.
    */
    $schemaFile = 'example.xml';
    $platform = 'mysql';
    $dbHost = 'localhost';
    $dbName = 'database';
    $dbUser = 'username';
    $dbPassword = 'password';

    /* Start by creating a normal ADODB connection.
    */
    $db = ADONewConnection( $platform );
    $db->Connect( $dbHost, $dbUser, $dbPassword, $dbName );

    /* Use the database connection to create a new adoSchema object.
    */
    $schema = new adoSchema( $db );

    /* Call ParseSchema() to build SQL from the XML schema file.
    * Then call ExecuteSchema() to apply the resulting SQL to
    * the database.
    */
    $sql = $schema->ParseSchema( $schemaFile );
    $result = $schema->ExecuteSchema();
    ?>
    -

    Let's look at each part of the example in turn. After you manually -create the database, there are three steps required to load (or -upgrade) your schema.

    -

    First, create a normal ADOdb connection. The variables and values -here should be those required to connect to your database.

    -
    $db = ADONewConnection( 'mysql' );
    $db->Connect( 'host', 'user', 'password', 'database' );
    -

    Second, create the adoSchema object that load and manipulate your -schema. You must pass an ADOdb database connection object in order to -create the adoSchema object.

    -
    $schema = new adoSchema( $db );
    -

    Third, call ParseSchema() to parse the schema and then -ExecuteSchema() to apply it to the database. You must pass -ParseSchema() the path and filename of your schema file.

    -
    $schema->ParseSchema( $schemaFile ); 
    $schema->ExecuteSchema();
    -

    Execute the above code and then log into your database. If you've -done all this right, you should see your tables, indexes, and SQL.

    -

    You can find the source files for this tutorial in the examples -directory as tutorial_shema.xml and tutorial.php. See the class -documentation for a more detailed description of the adoSchema methods, -including methods and schema elements that are not described in this -tutorial.

    -

    XML Schema Version 3

    -

    In March 2006, we added adodb-xmlschema03.inc.php to the release, which supports version 3 of XML Schema. -The adodb-xmlschema.inc.php remains the same as previous releases, and supports version 2 of XML Schema. -Version 3 provides some enhancements: - -

      -
    • Support for updating table data during an upgrade. -
    • Support for platform-specific table options and platform negation. -
    • Support for unsigned fields. -
    • Fixed opt and constraint support -
    • Many other fixes such as OPT tag, which allows you to set optional platform settings: -
    - -

    Example usage: -

    <?xml version="1.0"?>
    -<schema version="0.3">
    - <table name="ats_kb">
    -  <descr>ATS KnowledgeBase</descr>
    -  <opt platform="mysql">TYPE=INNODB</opt>
    -  <field name="recid" type="I"/>
    -  <field name="organization_code" type="I4"/> 
    -  <field name="sub_code" type="C" size="20"/>
    -  etc...
    -
    -

    To use it, change your code to include adodb-xmlschema03.inc.php. - -

    Upgrading

    -

    -If your schema version is older, than XSLT is used to transform the -schema to the newest version. This means that if you are using an older -XML schema format, you need to have the XSLT extension installed. -If you do not want to require your users to have the XSLT extension -installed, make sure you modify your XML schema to conform to the -latest version. -


    -
    If you have any questions or comments, please email them to -Richard at richtl#arscognita.com. -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-oracle.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-oracle.htm.svn-base deleted file mode 100755 index aeb03505..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-oracle.htm.svn-base +++ /dev/null @@ -1,542 +0,0 @@ - - - - -ADOdb with PHP and Oracle - - - - - -
    -

    Using ADOdb with PHP and Oracle: an advanced tutorial

    -
    -

    (c)2004-2005 John Lim. All rights reserved.

    -

    1. Introduction

    -

    Oracle is the most popular commercial database used with PHP. There are many ways of accessing Oracle databases in PHP. These include:

    -
      -
    • The oracle extension
    • -
    • The oci8 extension
    • -
    • PEAR DB library
    • -
    • ADOdb library
    • -
    -

    The wide range of choices is confusing to someone just starting with Oracle and PHP. I will briefly summarize the differences, and show you the advantages of using ADOdb.

    -

    First we have the C extensions which provide low-level access to Oracle functionality. These C extensions are precompiled into PHP, or linked in dynamically when the web server starts up. Just in case you need it, here's a guide to installing Oracle and PHP on Linux.

    - - - - - - - - - -
    Oracle extensionDesigned for Oracle 7 or earlier. This is obsolete.
    Oci8 extension Despite it's name, which implies it is only for Oracle 8i, this is the standard method for accessing databases running Oracle 8i, 9i or 10g (and later).
    -

    Here is an example of using the oci8 extension to query the emp table of the scott schema with bind parameters: -

    -$conn = OCILogon("scott","tiger", $tnsName); 
    -
    -$stmt = OCIParse($conn,"select * from emp where empno > :emp order by empno"); 
    -$emp = 7900;
    -OCIBindByName($stmt, ':emp', $emp);
    -$ok = OCIExecute($stmt);
    -while (OCIFetchInto($stmt,$arr)) {
    -	print_r($arr);
    -	echo "<hr>";	
    -} 
    -
    -

    This generates the following output: -

    -Array ( [0] => 7902 [1] => FORD [2] => ANALYST [3] => 7566 [4] => 03/DEC/81 [5] => 3000 [7] => 20 ) -
    - Array ( [0] => 7934 [1] => MILLER [2] => CLERK [3] => 7782 [4] => 23/JAN/82 [5] => 1300 [7] => 10 ) -
    -

    We also have many higher level PHP libraries that allow you to simplify the above code. The most popular are PEAR DB and ADOdb. Here are some of the differences between these libraries:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeaturePEAR DB 1.6ADOdb 4.52
    General StyleSimple, easy to use. Lacks Oracle specific functionality.Has multi-tier design. Simple high-level design for beginners, and also lower-level advanced Oracle functionality.
    Support for PrepareYes, but only on one statement, as the last prepare overwrites previous prepares.Yes (multiple simultaneous prepare's allowed)
    Support for LOBsNoYes, using update semantics
    Support for REF CursorsNoYes
    Support for IN ParametersYesYes
    Support for OUT ParametersNoYes
    Schema creation using XMLNoYes, including ability to define tablespaces and constraints
    Provides database portability featuresNoYes, has some ability to abstract features that differ between databases such as dates, bind parameters, and data types.
    Performance monitoring and tracingNoYes. SQL can be traced and linked to web page it was executed on. Explain plan support included.
    Recordset caching for frequently used queriesNoYes. Provides great speedups for SQL involving complex where, group-by and order-by clauses.
    PopularityYes, part of PEAR releaseYes, many open source projects are using this software, including PostNuke, Xaraya, Mambo, Tiki Wiki.
    SpeedMedium speed.Very high speed. Fastest database abstraction library available for PHP. Benchmarks are available.
    High Speed Extension availableNoYes. You can install the optional ADOdb extension, which reimplements the most frequently used parts of ADOdb as fast C code. Note that the source code version of ADOdb runs just fine without this extension, and only makes use of the extension if detected.
    -

    PEAR DB is good enough for simple web apps. But if you need more power, you can see ADOdb offers more sophisticated functionality. The rest of this article will concentrate on using ADOdb with Oracle. You can find out more about connecting to Oracle later in this guide.

    -

    ADOdb Example

    -

    In ADOdb, the above oci8 example querying the emp table could be written as:

    -
    -include "/path/to/adodb.inc.php";
    -$db = NewADOConnection("oci8");
    -$db->Connect($tnsName, "scott", "tiger");
    -
    -$rs = $db->Execute("select * from emp where empno>:emp order by empno", 
    -                    array('emp' => 7900));
    -while ($arr = $rs->FetchRow()) {
    -    print_r($arr);
    -	echo "<hr>";
    -}
    -
    -

    The Execute( ) function returns a recordset object, and you can retrieve the rows returned using $recordset->FetchRow( ).

    -

    If we ignore the initial connection preamble, we can see the ADOdb version is much easier and simpler:

    - - - - - - - - - -
    Oci8ADOdb
    $stmt = OCIParse($conn,
    -       "select * from emp where empno > :emp"); 
    -$emp = 7900;
    -OCIBindByName($stmt, ':emp', $emp);
    -$ok = OCIExecute($stmt);
    -
    -while (OCIFetchInto($stmt,$arr)) {
    -	print_r($arr);
    -	echo "<hr>";	
    -} 
    $recordset = $db->Execute("select * from emp where empno>:emp", 
    -                           array('emp' => 7900));
    -
    -while ($arr = $recordset->FetchRow()) {
    -	print_r($arr);
    -	echo "<hr>";
    -}
    -

     

    -

    2. ADOdb Query Semantics

    -

    You can also query the database using the standard Microsoft ADO MoveNext( ) metaphor. The data array for the current row is stored in the fields property of the recordset object, $rs. -MoveNext( ) offers the highest performance among all the techniques for iterating through a recordset: -

    -$rs = $db->Execute("select * from emp where empno>:emp", array('emp' => 7900));
    -while (!$rs->EOF) {
    -	print_r($rs->fields);
    -	$rs->MoveNext();
    -}
    -
    -

    And if you are interested in having the data returned in a 2-dimensional array, you can use: -

    -$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
    -
    -

    Now to obtain only the first row as an array: -

    -$arr = $db->GetRow("select * from emp where empno=:emp", array('emp' => 7900));
    -
    -

    Or to retrieve only the first field of the first row: -

    -$arr = $db->GetOne("select ename from emp where empno=:emp", array('emp' => 7900));
    -
    -

    For easy pagination support, we provide the SelectLimit function. The following will perform a select query, limiting it to 100 rows, starting from row 201 (row 1 being the 1st row): -

    -$offset = 200; $limitrows = 100;
    -$rs = $db->SelectLimit('select * from table', $limitrows, $offset);
    -
    -

    The $offset parameter is optional. -

    Array Fetch Mode

    -

    When data is being returned in an array, you can choose the type of array the data is returned in. -

      -
    1. Numeric indexes - use $connection->SetFetchMode(ADODB_FETCH_NUM).
    2. -
    3. Associative indexes - the keys of the array are the names of the fields (in upper-case). Use $connection->SetFetchMode(ADODB_FETCH_ASSOC).
    4. -
    5. Both numeric and associative indexes - use $connection->SetFetchMode(ADODB_FETCH_BOTH).
    6. -
    -

    The default is ADODB_FETCH_BOTH for Oracle.

    -

    Caching

    -

    You can define a database cache directory using $ADODB_CACHE_DIR, and cache the results of frequently used queries that rarely change. This is particularly useful for SQL with complex where clauses and group-by's and order-by's. It is also good for relieving heavily-loaded database servers.

    -

    This example will cache the following select statement for 3600 seconds (1 hour):

    -
    -$ADODB_CACHE_DIR = '/var/adodb/tmp';
    -$rs = $db->CacheExecute(3600, "select names from allcountries order by 1");
    -
    -There are analogous CacheGetArray( -), CacheGetRow( ), CacheGetOne( ) and CacheSelectLimit( ) functions. The first parameter is the number of seconds to cache. You can also pass a bind array as a 3rd parameter (not shown above). -

    There is an alternative syntax for the caching functions. The first parameter is omitted, and you set the cacheSecs - property of the connection object: -

    -$ADODB_CACHE_DIR = '/var/adodb/tmp';
    -$connection->cacheSecs = 3600;
    -$rs = $connection->CacheExecute($sql, array('id' => 1));
    -
    -

     

    -

    3. Using Prepare( ) For Frequently Used Statements

    -

    Prepare( ) is for compiling frequently used SQL statement for reuse. For example, suppose we have a large array which needs to be inserted into an Oracle database. The following will result in a massive speedup in query execution (at least 20-40%), as the SQL statement only needs to be compiled once:

    -
    -$stmt = $db->Prepare('insert into table (field1, field2) values (:f1, :f2)');
    -foreach ($arrayToInsert as $key => $value) {
    -	$db->Execute($stmt, array('f1' => $key, 'f2' => $val);
    -}
    -
    -

     

    -

    4. Working With LOBs

    -

    Oracle treats data which is more than 4000 bytes in length specially. These are called Large Objects, or LOBs for short. Binary LOBs are BLOBs, and character LOBs are CLOBs. In most Oracle libraries, you need to do a lot of work to process LOBs, probably because Oracle designed it to work in systems with little memory. ADOdb tries to make things easy by assuming the LOB can fit into main memory.

    -

    ADOdb will transparently handle LOBs in select statements. The LOBs are automatically converted to PHP variables without any special coding.

    -

    For updating records with LOBs, the functions UpdateBlob( ) and UpdateClob( ) are provided. Here's a BLOB example. The parameters should be self-explanatory: -

    -$ok = $db->Execute("insert into aTable (id, name, ablob) 
    -                                values (aSequence.nextVal, 'Name', null)");
    -if (!$ok) return LogError($db->ErrorMsg());
    -# params: $tableName, $blobFieldName, $blobValue, $whereClause
    -$db->UpdateBlob('aTable', 'ablob', $blobValue, 'id=aSequence.currVal');
    -
    -

    and the analogous CLOB example: -

    -$ok = $db->Execute("insert into aTable (id, name, aclob) 
    -                                values (aSequence.nextVal, 'Name', null)");
    -if (!$ok) return LogError($db->ErrorMsg());
    -$db->UpdateClob('aTable', 'aclob', $clobValue, 'id=aSequence.currVal');
    -
    -

    Note that LogError( ) is a user-defined function, and not part of ADOdb. -

    Inserting LOBs is more complicated. Since ADOdb 4.55, we allow you to do this - (assuming that the photo field is a BLOB, and we want to store $blob_data into - this field, and the primary key is the id field): -

    -	$sql = "INSERT INTO photos ( ID, photo) ".
    -			"VALUES ( :id, empty_blob() )".
    -			" RETURNING photo INTO :xx";
    -
    - 		$stmt = $db->PrepareSP($sql);
    -		$db->InParameter($stmt, $id, 'id');
    -		$blob = $db->InParameter($stmt, $blob_data, 'xx',-1, OCI_B_BLOB);
    -		$db->StartTrans();
    -		$ok = $db->Execute($stmt);
    -		$db->CompleteTrans();
    -
    -

    -

    5. REF CURSORs

    -

    Oracle recordsets can be passed around as variables called REF Cursors. For example, in PL/SQL, we could define a function open_tab that returns a REF CURSOR in the first parameter:

    -
    -TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;
    -
    -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS
    -	BEGIN
    -		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
    -	END open_tab;
    -
    -

    In ADOdb, we could access this REF Cursor using the ExecuteCursor() function. The following will find - all table names that begin with 'A' in the current schema: -

    -$rs = $db->ExecuteCursor("BEGIN open_tab(:refc,'A%'); END;",'refc');
    -while ($arr = $rs->FetchRow()) print_r($arr);
    -
    -

    The first parameter is the PL/SQL statement, and the second parameter is the name of the REF Cursor. -

    -

     

    -

    6. In and Out Parameters

    -

    The following PL/SQL -stored procedure requires an input variable, and returns a result into an output variable: -

    -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS
    -	BEGIN
    -		output := 'I love '||input;
    -	END;
    -
    -

    The following ADOdb code allows you to call the stored procedure:

    -
    -$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;");
    -$input = 'Sophia Loren';
    -$db->InParameter($stmt,$input,'a1');
    -$db->OutParameter($stmt,$output,'a2');
    -$ok = $db->Execute($stmt);
    -if ($ok) echo ($output == 'I love Sophia Loren') ? 'OK' : 'Failed';
    -
    -

    PrepareSP( ) is a special function that knows about bind parameters. -The main limitation currently is that IN OUT parameters do not work. -

    Bind Parameters and REF CURSORs

    -

    We could also rewrite the REF CURSOR example to use InParameter (requires ADOdb 4.53 or later): -

    -$stmt = $db->PrepareSP("BEGIN adodb.open_tab(:refc,:tabname); END;");
    -$input = 'A%';
    -$db->InParameter($stmt,$input,'tabname');
    -$rs = $db->ExecuteCursor($stmt,'refc');
    -while ($arr = $rs->FetchRow()) print_r($arr);
    -
    -

    Bind Parameters and LOBs

    -

    You can also operate on LOBs. In this example, we have IN and OUT parameters using CLOBs. -

    -	$text = 'test test test';
    -	$sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
    -	$stmt = $conn -> PrepareSP($sql);
    -	$conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB); # -1 means variable length
    -	$rs = '';
    -	$conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
    -	$conn -> Execute($stmt);
    -	echo "return = ".$rs."<br>";
    -
    -

    Similarly, you can use the constant OCI_B_BLOB to indicate that you are using BLOBs. -

    Reusing Bind Parameters with CURSOR_SHARING=FORCE

    -

    Many web programmers do not care to use bind parameters, and prefer to enter the SQL directly. So instead of:

    -
    -$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
    -
    -

    They prefer entering the values inside the SQL: -

    -$arr = $db->GetArray("select * from emp where empno>7900");
    -
    -

    This reduces Oracle performance because Oracle will reuse compiled SQL which is identical to previously compiled SQL. The above example with the values inside the SQL -is unlikely to be reused. As an optimization, from Oracle 8.1 onwards, you can set the following session parameter after you login: -

    -ALTER SESSION SET CURSOR_SHARING=FORCE
    -
    -

    This will force Oracle to convert all such variables (eg. the 7900 value) into constant bind parameters, improving SQL reuse.

    -

    More speedup tips.

    -

     

    -

    7. Dates and Datetime in ADOdb

    -

    There are two things you need to know about dates in ADOdb.

    -

    First, to ensure cross-database compability, ADOdb assumes that dates are returned in ISO format (YYYY-MM-DD H24:MI:SS).

    -

    Secondly, since Oracle treats dates and datetime as the same data type, we decided not to display the time in the default date format. So on login, ADOdb will set the NLS_DATE_FORMAT to 'YYYY-MM-DD'. If you prefer to show the date and time by default, do this:

    -
    -$db = NewADOConnection('oci8');
    -$db->NLS_DATE_FORMAT =  'RRRR-MM-DD HH24:MI:SS';
    -$db->Connect($tns, $user, $pwd);
    -
    -

    Or execute:

    -
    $sql = "ALTER SESSION SET NLS_DATE_FORMAT = 'RRRR-MM-DD HH24:MI:SS'";
    -$db->Execute($sql);
    -
    -

    If you are not concerned about date portability and do not use ADOdb's portability layer, you can use your preferred date format instead. -

    -

    8. Database Portability Layer

    -

    ADOdb provides the following functions for portably generating SQL functions - as strings to be merged into your SQL statements:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FunctionDescription
    DBDate($date)Pass in a UNIX timestamp or ISO date and it will convert it to a date - string formatted for INSERT/UPDATE
    DBTimeStamp($date)Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp - string formatted for INSERT/UPDATE
    SQLDate($date, $fmt)Portably generate a date formatted using $fmt mask, for use in SELECT - statements.
    OffsetDate($date, $ndays)Portably generate a $date offset by $ndays.
    Concat($s1, $s2, ...)Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, - which allows || operator.
    IfNull($fld, $replaceNull)Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.
    Param($name)Generates bind placeholders, using ? or named conventions as appropriate.
    $db->sysDateProperty that holds the SQL function that returns today's date
    $db->sysTimeStampProperty that holds the SQL function that returns the current -timestamp (date+time). -
    $db->concat_operatorProperty that holds the concatenation operator -
    $db->lengthProperty that holds the name of the SQL strlen function. -
    $db->upperCaseProperty that holds the name of the SQL strtoupper function. -
    $db->randomProperty that holds the SQL to generate a random number between 0.00 and 1.00. -
    $db->substrProperty that holds the name of the SQL substring function. -
    -

    ADOdb also provides multiple oracle oci8 drivers for different scenarios:

    - - - - - - - - - - - - - - - - - -
    Driver NameDescription
    oci805 Specifically for Oracle 8.0.5. This driver has a slower SelectLimit( ).
    oci8The default high performance driver. The keys of associative arrays returned in a recordset are upper-case.
    oci8po The portable Oracle driver. Slightly slower than oci8. This driver uses ? instead of :bindvar for binding variables, which is the standard for other databases. Also the keys of associative arrays are in lower-case like other databases.
    -

    Here's an example of calling the oci8po driver. Note that the bind variables use question-mark:

    -
    $db = NewADOConnection('oci8po');
    -$db->Connect($tns, $user, $pwd);
    -$db->Execute("insert into atable (f1, f2) values (?,?)", array(12, 'abc'));
    -

      -

    9. Connecting to Oracle

    -

    Before you can use ADOdb, you need to have the Oracle client installed and setup the oci8 extension. This extension comes pre-compiled for Windows (but you still need to enable it in the php.ini file). For information on compiling the oci8 extension for PHP and Apache on Unix, there is an excellent guide at oracle.com.

    -

    Should You Use Persistent Connections

    -

    One question that is frequently asked is should you use persistent connections to Oracle. Persistent connections allow PHP to recycle existing connections, reusing them after the previous web pages have completed. Non-persistent connections close automatically after the web page has completed. Persistent connections are faster because the cost of reconnecting is expensive, but there is additional resource overhead. As an alternative, Oracle allows you to pool and reuse server processes; this is called Shared Server (also known as MTS).

    -

    The author's benchmarks suggest that using non-persistent connections and the Shared Server configuration offer the best performance. If Shared Server is not an option, only then consider using persistent connections.

    -

    Connection Examples

    -

    Just in case you are having problems connecting to Oracle, here are some examples:

    -

    a. PHP and Oracle reside on the same machine, use default SID, with non-persistent connections:

    -
    	$conn = NewADOConnection('oci8');
    -	$conn->Connect(false, 'scott', 'tiger');
    -

    b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS', using persistent connections:

    -
    	$conn = NewADOConnection('oci8');
    -	$conn->PConnect(false, 'scott', 'tiger', 'myTNS');
    -

    or

    -
     	$conn->PConnect('myTNS', 'scott', 'tiger');
    -

    c. Host Address and SID

    -
    -	$conn->connectSID = true;	
    -	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'SID');
    -

    d. Host Address and Service Name

    -
    	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'servicename');
    -

    e. Oracle connection string: -

    	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))
    -			(CONNECT_DATA=(SID=$sid)))";
    -	$conn->Connect($cstr, 'scott', 'tiger');
    -
    -

    f. ADOdb data source names (dsn): -

    -	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -	
    -	$dsn = 'oci8://user:pwd@host/sid';
    -	$conn = ADONewConnection($dsn);
    -	
    -	$dsn = 'oci8://user:pwd@/';   # oracle on local machine
    -	$conn = ADONewConnection($dsn);
    -

    With ADOdb data source names, -you don't have to call Connect( ) or PConnect( ). -

    -

     

    -

    10. Error Checking

    -

    The examples in this article are easy to read but a bit simplistic because we ignore error-handling. Execute( ) and Connect( ) will return false on error. So a more realistic way to call Connect( ) and Execute( ) is: -

    function InvokeErrorHandler()
    -{
    global $db; ## assume global - MyLogFunction($db->ErrorNo(), $db->ErrorMsg()); -} -if (!$db->Connect($tns, $usr, $pwd)) InvokeErrorHandler(); - -$rs = $db->Execute("select * from emp where empno>:emp order by empno", - array('emp' => 7900)); -if (!$rs) return InvokeErrorHandler(); -while ($arr = $rs->FetchRow()) { - print_r($arr); - echo "<hr>"; -} -
    -

    You can retrieve the error message and error number of the last SQL statement executed from ErrorMsg( ) and ErrorNo( ). You can also define a custom error handler function. -ADOdb also supports throwing exceptions in PHP5. -

     

    -

    Handling Large Recordsets (added 27 May 2005)

    -The oci8 driver does not support counting the number of records returned in a SELECT statement, so the function RecordCount() -is emulated when the global variable $ADODB_COUNTRECS is set to true, which is the default. -We emulate this by buffering all the records. This can take up large amounts of memory for big recordsets. - Set $ADODB_COUNTRECS to false for the best performance. -

    -This variable is checked every time a query is executed, so you can selectively choose which recordsets to count. -

     

    -

    11. Other ADOdb Features

    -

    Schema generation. This allows you to define a schema using XML and import it into different RDBMS systems portably.

    -

    Performance monitoring and tracing. Highlights of performance monitoring include identification of poor and suspicious SQL, with explain plan support, and identifying which web pages the SQL ran on.

    -

     

    -

    12. Download

    -

    You can download ADOdb from sourceforge. ADOdb uses a BSD style license. That means that it is free for commercial use, and redistribution without source code is allowed.

    -

     

    -

    13. Resources

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-perf.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-perf.htm.svn-base deleted file mode 100755 index cef8db56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-perf.htm.svn-base +++ /dev/null @@ -1,962 +0,0 @@ - - - - ADOdb Performance Monitoring Library - - - -

    The ADOdb Performance Monitoring Library

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my)

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products.

    -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This module, part of the ADOdb package, provides both CLI and HTML -interfaces for viewing key performance indicators of your database. -This is very useful because web apps such as the popular phpMyAdmin -currently do not provide effective database health monitoring tools. -The module provides the following:

    -
      -
    • A quick health check of your database server using $perf->HealthCheck() -or $perf->HealthCheckCLI().
    • -
    • User interface for performance monitoring, $perf->UI(). -This UI displays: -
        -
      • the health check,
      • -
      • all SQL logged and their query plans,
      • -
      • a list of all tables in the current database
      • -
      • an interface to continiously poll the server for key -performance indicators such as CPU, Hit Ratio, Disk I/O
      • -
      • a form where you can enter and run SQL interactively.
      • -
      -
    • -
    • Gives you an API to build database monitoring tools for a server -farm, for example calling $perf->DBParameter('data cache hit -ratio') returns this very important statistic in a database -independant manner.
    • -
    -

    ADOdb also has the ability to log all SQL executed, using LogSQL. All SQL logged can be -analyzed through the performance monitor UI. In the View -SQL mode, we categorize the SQL into 3 types: -

    -
      -
    • Suspicious SQL: queries with high average execution times, -and are potential candidates for rewriting
    • -
    • Expensive SQL: queries with high total execution times -(#executions * avg execution time). Optimizing these queries will -reduce your database server load.
    • -
    • Invalid SQL: queries that generate errors.
    • -
    -

    Each query is hyperlinked to a description of the query plan, and -every PHP script that executed that query is also shown.

    -

    Please note that the information presented is a very basic database -health check, and does not provide a complete overview of database -performance. Although some attempt has been made to make it work across -multiple databases in the same way, it is impossible to do so. For the -health check, we do try to display the following key database -parameters for all drivers:

    -
      -
    • data cache size - The amount of memory allocated to the -cache.
    • -
    • data cache hit ratio - A measure of how effective the -cache is, as a percentage. The higher, the better.
    • -
    • current connections - The number of sessions currently -connected to the database.
    • -
    -

    You will need to connect to the database as an administrator to view -most of the parameters.

    -

    Code improvements as very welcome, particularly adding new database -parameters and automated tuning hints.

    - -

    Usage

    -

    Currently, the following drivers: mysql, postgres, -oci8, mssql, informix and db2 are -supported. To create a new performance monitor, call NewPerfMonitor( ) -as demonstrated below:

    -
    <?php
    include_once('adodb.inc.php');
    session_start(); # session variables required for monitoring
    $conn = ADONewConnection($driver);
    $conn->Connect($server,$user,$pwd,$db);
    $perf =& NewPerfMonitor($conn);
    $perf->UI($pollsecs=5);
    ?>
    -

    It is also possible to retrieve a single database parameter:

    -
    $size = $perf->DBParameter('data cache size');
    -

    -Thx to Fernando Ortiz for the informix module.

    -

    Methods

    - -

    function UI($pollsecs=5)

    -

    Creates a web-based user interface for performance monitoring. When -you click on Poll, server statistics will be displayed every $pollsecs -seconds. See Usage above.

    -

    Since 4.11, we allow users to enter and run SQL interactively via -the "Run SQL" link. To disable this for security reasons, set this -constant before calling $perf->UI().

    -

    -
    define('ADODB_PERF_NO_RUN_SQL',1);
    -

    Sample output follows below:

    - - - - - - - - - -
    ADOdb -Performance Monitor for localhost, db=test
    - PostgreSQL 7.3.2 on i686-pc-cygwin, compiled by -GCC gcc (GCC) 3.2 20020927 (prerelease)
    Performance Stats   View -SQL   View Tables   Poll -Stats
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    postgres7

    -
    ParameterValueDescription
    Ratios  
    statistics collectorTRUEValue must be TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level -and stats_block_level must be set to true in postgresql.conf)
    data cache hit ratio99.7967555299239 
    IO  
    data reads125 
    data writes21.78125000000000000Count of inserts/updates/deletes * coef
    Data Cache  
    data cache buffers640Number of cache buffers. Tuning
    cache blocksize8192(estimate)
    data cache size5M 
    operating system cache size80M(effective cache size)
    Memory Usage  
    sort buffer size1MSize of sort buffer (per query)
    Connections  
    current connections0 
    max connections32 
    Parameters  
    rollback buffers8WAL buffers
    random page cost4Cost of doing a seek (default=4). See random_page_cost
    -

    function HealthCheck()

    -

    Returns database health check parameters as a HTML table. You will -need to echo or print the output of this function,

    -

    function HealthCheckCLI()

    -

    Returns database health check parameters formatted for a command -line interface. You will need to echo or print the output of this -function. Sample output for mysql:

    -
    -- Ratios -- 
    MyISAM cache hit ratio => 56.5635738832
    InnoDB cache hit ratio => 0
    sql cache hit ratio => 0
    -- IO --
    data reads => 2622
    data writes => 2415.5
    -- Data Cache --
    MyISAM data cache size => 512K
    BDB data cache size => 8388600
    InnoDB data cache size => 8M
    -- Memory Pools --
    read buffer size => 131072
    sort buffer size => 65528
    table cache => 4
    -- Connections --
    current connections => 3
    max connections => 100
    -

    function Poll($pollSecs=5) -

    -

    Run in infinite loop, displaying the following information every -$pollSecs. This will not work properly if output buffering is enabled. -In the example below, $pollSecs=3: -

    -
    Accumulating statistics...
    Time WS-CPU% Hit% Sess Reads/s Writes/s
    11:08:30 0.7 56.56 1 0.0000 0.0000
    11:08:33 1.8 56.56 2 0.0000 0.0000
    11:08:36 11.1 56.55 3 2.5000 0.0000
    11:08:39 9.8 56.55 2 3.1121 0.0000
    11:08:42 2.8 56.55 1 0.0000 0.0000
    11:08:45 7.4 56.55 2 0.0000 1.5000
    -

    WS-CPU% is the Web Server CPU load of the server that PHP is -running from (eg. the database client), and not the database. The Hit% -is the data cache hit ratio. Sess is the current number of -sessions connected to the database. If you are using persistent -connections, this should not change much. The Reads/s and Writes/s -are synthetic values to give the viewer a rough guide to I/O, and are -not to be taken literally.

    -

    function SuspiciousSQL($numsql=10)

    -

    Returns SQL which have high average execution times as a HTML table. -Each sql statement -is hyperlinked to a new window which details the execution plan and the -scripts that execute this SQL. -

    -

    The number of statements returned is determined by $numsql. Data is -taken from the adodb_logsql table, where the sql statements are logged -when -$connection->LogSQL(true) is enabled. The adodb_logsql table is -populated using $conn->LogSQL. -

    -

    For Oracle, Ixora Suspicious SQL returns a list of SQL statements -that are most cache intensive as a HTML table. These are data intensive -SQL statements that could benefit most from tuning.

    -

    function ExpensiveSQL($numsql=10)

    -

    Returns SQL whose total execution time (avg time * #executions) is -high as a HTML table. Each sql statement -is hyperlinked to a new window which details the execution plan and the -scripts that execute this SQL. -

    -

    The number of statements returned is determined by $numsql. Data is -taken from the adodb_logsql table, where the sql statements are logged -when -$connection->LogSQL(true) is enabled. The adodb_logsql table is -populated using $conn->LogSQL. -

    -

    For Oracle, Ixora Expensive SQL returns a list of SQL statements -that are taking the most CPU load when run. -

    -

    function InvalidSQL($numsql=10)

    -

    Returns a list of invalid SQL as an HTML table. -

    -

    Data is taken from the adodb_logsql table, where the sql statements -are logged when -$connection->LogSQL(true) is enabled. -

    -

    function Tables($orderby=1)

    -

    Returns information on all tables in a database, with the first two -fields containing the table name and table size, the remaining fields -depend on the database driver. If $orderby is set to 1, it will sort by -name. If $orderby is set to 2, then it will sort by table size. Some -database drivers (mssql and mysql) will ignore the $orderby clause. For -postgresql, the information is up-to-date since the last vacuum. -Not supported currently for db2.

    -

    Raw Functions

    -

    Raw functions return values without any formatting.

    -

    function DBParameter($paramname)

    -

    Returns the value of a database parameter, such as -$this->DBParameter("data cache size").

    -

    function CPULoad()

    -

    Returns the CPU load of the database client (NOT THE SERVER) as a -percentage. Only works for Linux and Windows. For Windows, WMI must be -available.

    -

    Format of $settings Property

    -

    To create new database parameters, you need to understand -$settings. The $settings data structure is an associative array. Each -element of the array defines a database parameter. The key is the name -of the database parameter. If no key is defined, then it is assumed to -be a section break, and the value is the name of the section break. If -this is too confusing, looking at the source code will help a lot!

    -

    Each database parameter is itself an array consisting of the -following elements:

    -
      -
    1. Category code, used to group related db parameters. If the -category code is 'HIDE', then -the database parameter is not shown when HTML() is called.
      -
    2. -
    3. either -
        -
      1. sql string to retrieve value, eg. "select value from -v\$parameter where name='db_block_size'",
      2. -
      3. array holding sql string and field to look for, e.g. -array('show variables','table_cache'); optional 3rd parameter is the -$rs->fields[$index] to use (otherwise $index=1), and optional 4th -parameter is a constant to multiply the result with (typically 100 for -percentage calculations),
      4. -
      5. a string prefixed by =, then a PHP method of the class is -invoked, e.g. to invoke $this->GetIndexValue(), set this array -element to '=GetIndexValue',
        -
      6. -
      -
    4. -
    5. Description of database parameter. If description begins with an -=, then it is interpreted as a method call, just as in (1c) above, -taking one parameter, the current value. E.g. '=GetIndexDescription' -will invoke $this->GetIndexDescription($val). This is useful for -generating tuning suggestions. For an example, see WarnCacheRatio().
    6. -
    -

    Example from MySQL, table_cache database parameter:

    -
    'table cache' => array('CACHE',            # category code
    array("show variables", 'table_cache'), # array (type 1b)
    'Number of tables to keep open'), # description
    -

    Example Health Check Output

    -

    db2 informix mysql mssql oci8 -postgres

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    db2

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio0    
    Data Cache
    data cache buffers250   See tuning -reference.
    cache blocksize4096    
    data cache size1000K    
    Connections
    current connections2    
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    informix

    -
    ParameterVal -ueDescription
    Ratios  
    data cache hit -ratio95.89 
    IO  
    data -reads1883884Page reads
    data writes1716724Page writes
    Connections
    current connections263.0Number of -sessions
    -

    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    mysql

    -
    ParameterValueDescription
    Ratios  
    MyISAM cache hit ratio56.5658301822Cache ratio should be at least 90%
    InnoDB cache hit ratio0Cache ratio should be at least 90%
    sql cache hit ratio0 
    IO  
    data reads2622Number of selects (Key_reads is not accurate)
    data writes2415.5Number of inserts/updates/deletes * coef (Key_writes is not -accurate)
    Data Cache  
    MyISAM data cache size512K 
    BDB data cache size8388600 
    InnoDB data cache size8M 
    Memory Pools  
    read buffer size131072(per session)
    sort buffer size65528Size of sort buffer (per session)
    table cache4Number of tables to keep open
    Connections  
    current connections3 
    max connections100 
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    mssql

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio99.9999694824 
    prepared sql hit ratio99.7738579828 
    adhoc sql hit ratio98.4540169133 
    IO  
    data reads2858 
    data writes1438 
    Data Cache  
    data cache size4362in K
    Connections  
    current connections14 
    max connections32767 
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    oci8

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio96.98 
    sql cache hit ratio99.96 
    IO  
    data reads842938 
    data writes16852 
    Data Cache  
    data cache buffers3072Number of cache buffers
    data cache blocksize8192 
    data cache size48Mshared_pool_size
    Memory Pools  
    java pool size0java_pool_size
    sort buffer size512Ksort_area_size (per query)
    user session buffer size8Mlarge_pool_size
    Connections  
    current connections1 
    max connections170 
    data cache utilization ratio88.46Percentage of data cache actually in use
    user cache utilization ratio91.76Percentage of user cache (large_pool) actually in use
    rollback segments11 
    Transactions  
    peak transactions24Taken from high-water-mark
    max transactions187max transactions / rollback segments < 3.5 (or -transactions_per_rollback_segment)
    Parameters  
    cursor sharingEXACTCursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR -(9i+). See cursor_sharing.
    index cache cost0% of indexed data blocks expected in the cache. Recommended -is 20-80. Default is 0. See optimizer_index_caching.
    random page cost100Recommended is 10-50 for TP, and 50 for data warehouses. -Default is 100. See optimizer_index_cost_adj. -
    -

    Suspicious SQL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LOADEXECUTESSQL_TEXT
    .73%89select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o, -sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576) -and o.obj#=t.obj# and o.owner# = u.user# select i.obj#, i.flags, -u.name, o.name from sys.obj$ o, sys.user$ u, sys.ind$ i where -(bitand(i.flags, 256) = 256 or bitand(i.flags, 512) = 512) and -(not((i.type# = 9) and bitand(i.flags,8) = 8)) and o.obj#=i.obj# and -o.owner# = u.user#
    .84%3select /*+ RULE */ distinct tabs.table_name, tabs.owner , -partitioned, iot_type , TEMPORARY, table_type, table_type_owner from -DBA_ALL_TABLES tabs where tabs.owner = :own
    3.95%6SELECT round(count(1)*avg(buf.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.buffer_pool = buf.name and buf.name = -'DEFAULT'
    4.50%6SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.tablespace_name = tsp.tablespace_name
    57.34%9267select t.schema, t.name, t.flags, q.name from -system.aq$_queue_tables t, sys.aq$_queue_table_affinities aft, -system.aq$_queues q where aft.table_objno = t.objno and -aft.owner_instance = :1 and q.table_objno = t.objno and q.usage = 0 and -bitand(t.flags, 4+16+32+64+128+256) = 0 for update of t.name, -aft.table_objno skip locked
    -

    Expensive SQL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LOADEXECUTESSQL_TEXT
    5.24%1select round(sum(bytes)/1048576) from dba_segments
    6.89%6SELECT round(count(1)*avg(buf.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.buffer_pool = buf.name and buf.name = -'DEFAULT'
    7.85%6SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.tablespace_name = tsp.tablespace_name
    33.69%89select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o, -sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576) -and o.obj#=t.obj# and o.owner# = u.user#
    36.44%89select i.obj#, i.flags, u.name, o.name from sys.obj$ o, -sys.user$ u, sys.ind$ i where (bitand(i.flags, 256) = 256 or -bitand(i.flags, 512) = 512) and (not((i.type# = 9) and -bitand(i.flags,8) = 8)) and o.obj#=i.obj# and o.owner# = u.user#
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    postgres7

    -
    ParameterValueDescription
    Ratios  
    statistics collectorFALSEMust be set to TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level -and stats_block_level must be set to true in postgresql.conf)
    data cache hit ratio99.9666031916603 
    IO  
    data reads15 
    data writes0.000000000000000000Count of inserts/updates/deletes * coef
    Data Cache  
    data cache buffers1280Number of cache buffers. Tuning
    cache blocksize8192(estimate)
    data cache size10M 
    operating system cache size80000K(effective cache size)
    Memory Pools  
    sort buffer size1MSize of sort buffer (per query)
    Connections  
    current connections13 
    max connections32 
    Parameters  
    rollback buffers8WAL buffers
    random page cost4Cost of doing a seek (default=4). See random_page_cost
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.htm.svn-base deleted file mode 100755 index e6bfb769..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.htm.svn-base +++ /dev/null @@ -1,336 +0,0 @@ - - - - ADODB Session Management Manual - - - - -

    ADODB Session 2 Management Manual

    -

    -V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my) -

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products. -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This document discusses the newer session handler adodb-session2.php. If - you have used the older adodb-session.php, then be forewarned that you will - need to alter your session table format. Otherwise everything is backward - compatible. - Here are the older - docs for - adodb-session.php.

    -

    Why Session Variables in a Database?

    -

    We store state information specific to a user or web - client in session variables. These session variables persist throughout a -session, as the user moves from page to page.

    -

    To use session variables, call session_start() at the beginning of -your web page, before your HTTP headers are sent. Then for every -variable you want to keep alive for the duration of the session, call -session_register($variable_name). By default, the session handler will -keep track of the session by using a cookie. You can save objects or -arrays in session variables also. -

    -

    The default method of storing sessions is to store it in a file. -However if you have special needs such as you: -

    -
      -
    • Have multiple web servers that need to share session info
    • -
    • Need to do special processing of each session
    • -
    • Require notification when a session expires
    • -
    -

    The ADOdb session handler provides you with the above -additional capabilities by storing the session information as records -in a database table that can be shared across multiple servers.

    -

    These records will be garbage collected based on the php.ini [session] timeout settings. -You can register a notification function to notify you when the record has expired and -is about to be freed by the garbage collector.

    -

    An alternative to using a database backed session handler is to use memcached. - This is a distributed memory based caching system suitable for storing session - information. -

    -

    The Improved Session Handler

    -

    In ADOdb 4.91, we added a new session handler, in adodb-session2.php. -It features the following improvements: -

      -
    • Fully supports server farms using a new database table format. The - previous version used the web server time for timestamps, which can cause problems - on a system with multiple web servers with possibly inconsistent - times. The new version uses the database server time instead for all timestamps. -
    • The older database table format is obsolete. The database table must be modified - to support storage of the database server time mentioned above. Also the field - named DATA has been changed to SESSDATA. In some databases, DATA is a reserved - word. -
    • The functions dataFieldName() and syncSeconds() is obsolete. -
    - -

    Usage is - -

    -include_once("adodb/session/adodb-session2.php");
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    -session_start();
    -
    -#
    # Test session vars, the following should increment on refresh
    #
    $_SESSION['AVAR'] += 1;
    print "<p>\$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
    -
    - -

    When the session is created in session_start( ), the global variable $ADODB_SESS_CONN holds -the connection object. -

    The default name of the table is sessions2. If you want to override it: - -

    -include_once("adodb/session/adodb-session2.php");
    -$options['table'] = 'mytablename';
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options);
    -session_start();
    -
    - - -

    ADOdb Session Handler Features

    -
      -
    • Ability to define a notification function that is called when a -session expires. Typically -used to detect session logout and release global resources.
    • -
    • Optimization of database writes. We crc32 the session data and -only perform an update -to the session data if there is a data change.
    • -
    • Support for large amounts of session data with CLOBs (see -adodb-session-clob2.php). Useful -for Oracle.
    • -
    • Support for encrypted session data, see -adodb-cryptsession2.php. Enabling encryption is simply a matter of -including adodb-cryptsession2.php instead of adodb-session2.php.
    • -
    -

    Session Handler Files

    -

    There are 3 session management files that you can use: -

    -
    adodb-session2.php        : The default
    adodb-cryptsession2.php : Use this if you want to store encrypted session data in the database
    adodb-session-clob2.php : Use this if you are storing DATA in clobs and you are NOT using oci8 driver
    -

    Usage Examples

    -

    To force non-persistent connections, call Persist() first before session_start(): - - -

    - 
    -include_once("adodb/session/adodb-session2.php");
    -$driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb';
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    ADOdb_session::Persist($connectMode=false);
    -session_start();
    -
    -

    The parameter to the Persist( ) method sets the connection mode. You can - pass the following:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    $connectModeConnection Method
    true

    PConnect( )

    falseConnect( )
    'N'NConnect( )
    'P'PConnect( )
    'C'Connect( )
    -

    To use a encrypted sessions, simply replace the file adodb-session2.php:

    -
     
    include('adodb/session/adodb-cryptsession2.php');

    $driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb'; -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    adodb_sess_open(false,false,$connectMode=false);
    -session_start();
    -

    And the same technique for adodb-session-clob2.php:

    -
      
    include('adodb/session/adodb-session2-clob2.php');
    $driver = 'oci8'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb'; -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    adodb_sess_open(false,false,$connectMode=false);
    -session_start();
    -

    Installation

    -

    1. Create this table in your database. Here is the MySQL version: -

      
    -CREATE TABLE sessions2(
    -	  sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
    -  	  expiry DATETIME NOT NULL ,
    -	  expireref VARCHAR( 250 ) DEFAULT '',
    -	  created DATETIME NOT NULL ,
    -	  modified DATETIME NOT NULL ,
    -	  sessdata LONGTEXT DEFAULT '',
    -	  PRIMARY KEY ( sesskey ) ,
    -	  INDEX sess2_expiry( expiry ),
    -	  INDEX sess2_expireref( expireref )
    -)
    - -

    For PostgreSQL, use: -

    CREATE TABLE sessions2(
    - sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
    - expiry TIMESTAMP NOT NULL ,
    - expireref VARCHAR( 250 ) DEFAULT '',
    - created TIMESTAMP NOT NULL ,
    - modified TIMESTAMP NOT NULL ,
    - sessdata TEXT DEFAULT '',
    - PRIMARY KEY ( sesskey )
    - );
    -
    -
    create INDEX sess2_expiry on sessions2( expiry );
    -create INDEX sess2_expireref on sessions2 ( expireref );
    -

    Here is the Oracle definition, which uses a CLOB for the SESSDATA field: -

    -  CREATE TABLE SESSIONS2
    (
    SESSKEY VARCHAR2(48 BYTE) NOT NULL,
    EXPIRY DATE NOT NULL,
    EXPIREREF VARCHAR2(200 BYTE),
    CREATED DATE NOT NULL,
    MODIFIED DATE NOT NULL,
    SESSDATA CLOB,
    PRIMARY KEY(SESSKEY)
    ); -
    CREATE INDEX SESS2_EXPIRY ON SESSIONS2(EXPIRY); -CREATE INDEX SESS2_EXPIREREF ON SESSIONS2(EXPIREREF);
    -

    We need to use a CLOB here because for text greater than 4000 bytes long, - Oracle requires you to use the CLOB data type. If you are using the oci8 driver, - ADOdb will automatically enable CLOB handling. So you can use either adodb-session2.php - or adodb-session-clob2.php - in this case it doesn't matter.
    -

    Notifications

    -

    You can receive notification when your session is cleaned up by the session garbage collector or -when you call session_destroy(). -

    PHP's session extension will automatically run a special garbage collection function based on -your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call -adodb's garbage collection function, which can be setup to do notification. -

    -

    -	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
    -	GC Function     GC Function        to be deleted      notification      records
    -	executed at     called by                             for all recs
    -	random time     Session Extension                     queued for deletion
    -
    -

    When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically -the userid of the session. Later when the session has expired, just before the record is deleted, -we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which -is the userid of the person being logged off. -

    ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session -start to store the notification configuration. -$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the -first being the name of the session variable you would like to store in -the EXPIREREF field, and the 2nd is the notification function's name.

    -

    For example, suppose we want to be notified when a user's session has expired, -based on the userid. When the user logs in, we store the id in the global session variable -$USERID. The function name is 'NotifyFn'. -

    -So we define (before session_start() is called):

    -
     
    -	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -And when the NotifyFn is called (when the session expires), the -$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The -session key (which is the primary key of the record in the sessions -table) is the 2nd parameter. -

    Here is an example of a Notification function that deletes some -records in the database and temporary files:

    -
    
    -	function NotifyFn($expireref, $sesskey)
    -	{
    -		global $ADODB_SESS_CONN; # the session connection object
    -		$user = $ADODB_SESS_CONN->qstr($expireref);
    -		
    -		$ADODB_SESS_CONN->Execute("delete from shopping_cart where user=$user");          
    -		system("rm /work/tmpfiles/$expireref/*");
    -	}  
    -			  
    -

    NOTE 1: If you have register_globals disabled in php.ini, then you -will have to manually set the EXPIREREF. E.g.

    -
     
    -$GLOBALS['USERID'] = GetUserID();
    -$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -

    NOTE 2: If you want to change the EXPIREREF after the session -record has been created, you will need to modify any session variable -to force a database record update. -

    -

    Neat Notification Tricks

    -

    ExpireRef normally holds the user id of the current session. -

    -

    1. You can then write a session monitor, scanning expireref to see -who is currently logged on. -

    -

    2. If you delete the sessions record for a specific user, eg. -

    -
    delete from sessions where expireref = '$USER'
    -then the user is logged out. Useful for ejecting someone from a -site. -

    3. You can scan the sessions table to ensure no user -can be logged in twice. Useful for security reasons. -

    -

    Compression/Encryption Schemes

    -Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and -compression schemes are supported. Currently, supported are: -

    -

      MD5Crypt (crypt.inc.php)
    MCrypt
    Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
    GZip
    BZip2
    -

    These are stackable. E.g. -

    ADODB_Session::filter(new ADODB_Compress_Bzip2());
    ADODB_Session::filter(new ADODB_Encrypt_MD5());
    -will compress and then encrypt the record in the database. -

    Session Cookie Regeneration: adodb_session_regenerate_id()

    -

    Dynamically change the current session id with a newly generated one and update - database. Currently only works with cookies. Useful to improve security by - reducing the risk of session-hijacking. See this article on Session - Fixation for more info -on the theory behind this feature. Usage:

    -	include('path/to/adodb/session/adodb-session2.php');
    -	
    -	session_start();
    -	# Approximately every 10 page loads, reset cookie for safety.
    -	# This is extremely simplistic example, better 
    -	# to regenerate only when the user logs in or changes
    -	# user privilege levels.
    -	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
    -
    -

    This function calls session_regenerate_id() internally or simulates it if the function does not exist. -

    Vacuum/Optimize Database

    -

    During session garbage collection, if postgresql is detected, - ADOdb can be set to run VACUUM. If mysql is detected, then optimize database - could be called.You can turn this on or off using:

    -
    $turnOn = true; # or false
    -ADODB_Session::optimize($turnOn);
    -
    -

    The default is optimization is disabled.

    -

    Backwards Compatability

    -

    The older method of connecting to ADOdb using global variables is still supported:

    -
     $ADODB_SESSION_DRIVER='mysql';
    - $ADODB_SESSION_CONNECT='localhost';
    - $ADODB_SESSION_USER ='root';
    - $ADODB_SESSION_PWD ='abc';
    - $ADODB_SESSION_DB ='phplens';
    - 
    - include('path/to/adodb/session/adodb-session2.php'); 
    -

    In the above example, the only things you need to change in your code to upgrade - is

    -
      -
    • your session table format to the new one.
    • -
    • the include file from adodb-session.php to adodb-session2.php.
    • -
    -

    More Info

    -

    Also see the core ADOdb documentation. And if - you are interested in the obsolete adodb-session.php, see old - session documentation.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.old.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.old.htm.svn-base deleted file mode 100755 index 0a3251d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/docs-session.old.htm.svn-base +++ /dev/null @@ -1,313 +0,0 @@ - - - - ADODB Old Session Management Manual - - - - -

    ADODB Session Management Manual

    -

    -V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my) -

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products. -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This documentation discusses the old adodb-session.php. -Here is the new documentation on the newer adodb-session2.php. -

    We store state information specific to a user or web client in -session variables. These session variables persist throughout a -session, as the user moves from page to page.

    -

    To use session variables, call session_start() at the beginning of -your web page, before your HTTP headers are sent. Then for every -variable you want to keep alive for the duration of the session, call -session_register($variable_name). By default, the session handler will -keep track of the session by using a cookie. You can save objects or -arrays in session variables also. -

    -

    The default method of storing sessions is to store it in a file. -However if you have special needs such as you: -

    -
      -
    • Have multiple web servers that need to share session info
    • -
    • Need to do special processing of each session
    • -
    • Require notification when a session expires
    • -
    -

    The ADOdb session handler provides you with the above -additional capabilities by storing the session information as records -in a database table that can be shared across multiple servers.

    -

    These records will be garbage collected based on the php.ini [session] timeout settings. -You can register a notification function to notify you when the record has expired and -is about to be freed by the garbage collector.

    -

    Important Upgrade Notice: Since ADOdb 4.05, the session files -have been moved to its own folder, adodb/session. This is a rewrite -of the session code by Ross Smith. The old session code is in -adodb/session/old.

    -

    ADOdb Session Handler Features

    -
      -
    • Ability to define a notification function that is called when a -session expires. Typically -used to detect session logout and release global resources.
    • -
    • Optimization of database writes. We crc32 the session data and -only perform an update -to the session data if there is a data change.
    • -
    • Support for large amounts of session data with CLOBs (see -adodb-session-clob.php). Useful -for Oracle.
    • -
    • Support for encrypted session data, see -adodb-cryptsession.php. Enabling encryption is simply a matter of -including adodb-cryptsession.php instead of adodb-session.php.
    • -
    -

    Setup

    -

    There are 3 session management files that you can use: -

    -
    adodb-session.php        : The default
    adodb-session-clob.php : Use this if you are storing DATA in clobs
    adodb-cryptsession.php : Use this if you want to store encrypted session data in the database

    -
    -

    Examples -

    -     include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';


    include('adodb/session/adodb-session.php');
    session_start();

    #
    # Test session vars, the following should increment on refresh
    #
    $_SESSION['AVAR'] += 1;
    print "<p>\$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
    - -

    To force non-persistent connections, call adodb_session_open() first before session_start(): -

    -

    - 
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';


    include('adodb/session/adodb-session.php');
    adodb_sess_open(false,false,false);

    session_start();
    -
    -

    The 3rd parameter to adodb_sess_open($path, $sessname, $connectMode) sets the connection method. You can pass in the following:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    $connectModeConnection Method
    true

    PConnect( )

    falseConnect( )
    'N'NConnect( )
    'P'PConnect( )
    'C'Connect( )
    -

    To use a encrypted sessions, simply replace the file adodb-session.php:

    -
     
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';

    include('adodb/session/adodb-cryptsession.php');

    session_start();

    -
    -

    And the same technique for adodb-session-clob.php:

    -
      
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';

    include('adodb/session/adodb-session-clob.php');

    session_start();
    -
    -

    An alternative way to set persistant or non-persistent connections is to call the following function before session_start() is called. -

    - 	ADODB_Session::persist('P'); # 'C' for non-persistent connections
    - 
    -

    Installation

    -

    1. Create this table in your database (MySQL syntax): -

      
    -   create table sessions (
    -       SESSKEY char(32) not null,
    -       EXPIRY int(11) unsigned not null,
    -       EXPIREREF varchar(64),
    -	   DATA text not null,
    -	   primary key (sesskey)
    -	   );
    - 
    - -

    You may want to rename the 'data' field to 'session_data' as - 'data' appears to be a reserved word for one or more of the following: -

      -
    • ANSI SQL -
    • IBM DB2 -
    • MS SQL Server -
    • Postgres -
    • SAP -
    -

    - If you do, then execute: -

    -		ADODB_Session::dataFieldName('session_data');
    -
    -

    For the adodb-session-clob.php version, create this: -

    -    
    create table sessions (
    SESSKEY char(32) not null,
    EXPIRY int(11) unsigned not null,
    EXPIREREF varchar(64),
    DATA CLOB,
    primary key (sesskey)
    );
    -
    -

    2. Then define the following parameters. You can either modify this file, or define them before this file is included: -

          
    $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';
    $ADODB_SESSION_CONNECT='server to connect to';
    $ADODB_SESSION_USER ='user';
    $ADODB_SESSION_PWD ='password';
    $ADODB_SESSION_DB ='database';
    $ADODB_SESSION_TBL = 'sessions'; # setting this is optional
    -

    - When the session is created, $ADODB_SESS_CONN holds the connection object.

    3. Recommended is PHP 4.0.6 or later. There are documented session bugs in earlier versions of PHP. -

    Notifications

    -

    You can receive notification when your session is cleaned up by the session garbage collector or -when you call session_destroy(). -

    PHP's session extension will automatically run a special garbage collection function based on -your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call -adodb's garbage collection function, which can be setup to do notification. -

    -

    -	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
    -	GC Function     GC Function        to be deleted      notification      records
    -	executed at     called by                             for all recs
    -	random time     Session Extension                     queued for deletion
    -
    -

    When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically -the userid of the session. Later when the session has expired, just before the record is deleted, -we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which -is the userid of the person being logged off. -

    ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session -start to store the notification configuration. -$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the -first being the name of the session variable you would like to store in -the EXPIREREF field, and the 2nd is the notification function's name.

    -

    For example, suppose we want to be notified when a user's session has expired, -based on the userid. When the user logs in, we store the id in the global session variable -$USERID. The function name is 'NotifyFn'. -

    -So we define (before session_start() is called):

    -
     
    -	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -And when the NotifyFn is called (when the session expires), the -$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The -session key (which is the primary key of the record in the sessions -table) is the 2nd parameter. -

    Here is an example of a Notification function that deletes some -records in the database and temporary files:

    -
    
    -	function NotifyFn($expireref, $sesskey)
    -	{
    -		global $ADODB_SESS_CONN; # the session connection object
    -		$user = $ADODB_SESS_CONN->qstr($expireref);
    -		
    -		$ADODB_SESS_CONN->Execute("delete from shopping_cart where user=$user");          
    -		system("rm /work/tmpfiles/$expireref/*");
    -	}  
    -			  
    -

    NOTE 1: If you have register_globals disabled in php.ini, then you -will have to manually set the EXPIREREF. E.g.

    -
     
    -$GLOBALS['USERID'] = GetUserID();
    -$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -

    NOTE 2: If you want to change the EXPIREREF after the session -record has been created, you will need to modify any session variable -to force a database record update. -

    -

    Neat Notification Tricks

    -

    ExpireRef normally holds the user id of the current session. -

    -

    1. You can then write a session monitor, scanning expireref to see -who is currently logged on. -

    -

    2. If you delete the sessions record for a specific user, eg. -

    -
    delete from sessions where expireref = '$USER'
    -then the user is logged out. Useful for ejecting someone from a -site. -

    3. You can scan the sessions table to ensure no user -can be logged in twice. Useful for security reasons. -

    -

    Using Oracle CLOBs

    -

    Suppose you are storing the DATA field in a CLOB: -

    
    -   CREATE TABLE sessions (
    -       SESSKEY VARCHAR(32) NOT NULL,
    -       EXPIRY NUMBER(16)  NOT NULL,
    -       EXPIREREF VARCHAR(64),
    -       DATA CLOB,
    -      PRIMARY KEY (sesskey)
    -  );
    - 
    -

    Then your PHP code could look like this: -

    -	ADODB_SESSION_DRIVER='oci8';
    -	$ADODB_SESSION_CONNECT=$tnsname;
    -	$ADODB_SESSION_USER ='scott';
    -	$ADODB_SESSION_PWD = 'tiger';
    -	$ADODB_SESSION_DB ='';
    -	
    -	$ADODB_SESSION_USE_LOBS = 'clob';
    -	$ADODB_SESSION_TBL = 'sessions';
    -	
    -	$ADODB_SESS_DEBUG=0;
    -	
    -	include(ADODB_DIR.'/session/adodb-session.php');
    -	
    -	ADODB_Session::persist('P'); # use 'C' for non-persistent connects
    -	
    -	session_start();
    - 
    -

    Note that you can set persistance using ADODB_Session::persist('P'). - -

    Compression/Encryption Schemes

    -Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and -compression schemes are supported. Currently, supported are: -

    -

      MD5Crypt (crypt.inc.php)
    MCrypt
    Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
    GZip
    BZip2
    -

    These are stackable. E.g. -

    ADODB_Session::filter(new ADODB_Compress_Bzip2());
    ADODB_Session::filter(new ADODB_Encrypt_MD5());
    -will compress and then encrypt the record in the database. -

    adodb_session_regenerate_id()

    -

    Dynamically change the current session id with a newly generated one and update database. Currently only -works with cookies. Useful to improve security by reducing the risk of session-hijacking. -See this article on Session Fixation for more info -on the theory behind this feature. Usage: -

    -	$ADODB_SESSION_DRIVER='mysql';
    -	$ADODB_SESSION_CONNECT='localhost';
    -	$ADODB_SESSION_USER ='root';
    -	$ADODB_SESSION_PWD ='abc';
    -	$ADODB_SESSION_DB ='phplens';
    -	
    -	include('path/to/adodb/session/adodb-session.php');
    -	
    -	session_start();
    -	# Every 10 page loads, reset cookie for safety.
    -	# This is extremely simplistic example, better 
    -	# to regenerate only when the user logs in or changes
    -	# user privilege levels.
    -	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
    -
    -

    This function calls session_regenerate_id() internally or simulates it if the function does not exist. -

    Vacuum/Optimize Database

    -

    During session garbage collection, if postgresql is detected, - ADOdb can be set to run VACUUM. If mysql is detected, then optimize database - could be called.You can turn this on or off using:

    -
    $turnOn = true; # or false
    -ADODB_Session::optimize($turnOn);
    -
    -

    The default for optimization is it is disabled.

    -

    More Info

    -

    Also see the core ADOdb documentation. -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/old-changelog.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/old-changelog.htm.svn-base deleted file mode 100755 index 284f3ad1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/old-changelog.htm.svn-base +++ /dev/null @@ -1,822 +0,0 @@ -Old Changelog: ADOdb -

    Old Changelog

    - -

    3.92 22 Sept 2003 -

    Added GetAssoc and CacheGetAssoc to connection object. -

    Removed TextMax and CharMax functions from adodb.inc.php. -

    HasFailedTrans() returned false when trans failed. Fixed. -

    Moved perf driver classes into adodb/perf/*.php. -

    Misc improvements to performance monitoring, including UI(). -

    RETVAL in mssql Parameter(), we do not append @ now. -

    Added Param($name) to connection class, returns '?' or ":$name", for defining - bind parameters portably. -

    LogSQL traps affected_rows() and saves its value properly now. Also fixed oci8 - _stmt and _affectedrows() bugs. -

    Session code timestamp check for oci8 works now. Formerly default NLS_DATE_FORMAT - stripped off time portion. Thx to Tony Blair (tonanbarbarian#hotmail.com). Also - added new $conn->datetime field to oci8, controls whether MetaType() returns - 'D' ($this->datetime==false) or 'T' ($this->datetime == true) for DATE type. -

    Fixed bugs in adodb-cryptsession.inc.php and adodb-session-clob.inc.php. -

    Fixed misc bugs in adodb_key_exists, GetInsertSQL() and GetUpdateSQL(). -

    Tuned include_once handling to reduce file-system checking overhead. -

    3.91 9 Sept 2003 -

    Only released to InterAkt -

    Added LogSQL() for sql logging and $ADODB_NEWCONNECTION to override factory - for driver instantiation. -

    Added IfNull($field,$ifNull) function, thx to johnwilk#juno.com -

    Added portable substr support. -

    Now rs2html() has new parameter, $echo. Set to false to return $html instead - of echoing it. -

    3.90 5 Sept 2003 -

    First beta of performance monitoring released. -

    MySQL supports MetaTable() masking. -

    Fixed key_exists() bug in adodb-lib.inc.php -

    Added sp_executesql Prepare() support to mssql. -

    Added bind support to db2. -

    Added swedish language file - Christian Tiberg" christian#commsoft.nu -

    Bug in drop index for mssql data dict fixed. Thx to Gert-Rainer Bitterlich. -

    Left join setting for oci8 was wrong. Thx to johnwilk#juno.com -

    3.80 27 Aug 2003 -

    Patch for PHP 4.3.3 cached recordset csv2rs() fread loop incompatibility. -

    Added matching mask for MetaTables. Only for oci8, mssql and postgres currently. -

    Rewrite of "oracle" driver connection code, merging with "oci8", by Gaetano. -

    Added better debugging for Smart Transactions. -

    Postgres DBTimeStamp() was wrongly using TO_DATE. Changed to TO_TIMESTAMP. -

    ADODB_FETCH_CASE check pushed to ADONewConnection to allow people to define - it after including adodb.inc.php. -

    Added portugese (brazilian) to languages. Thx to "Levi Fukumori". -

    Removed arg3 parameter from Execute/SelectLimit/Cache* functions. -

    Execute() now accepts 2-d array as $inputarray. Also changed docs of fnExecute() - to note change in sql query counting with 2-d arrays. -

    Added MONEY to MetaType in PostgreSQL. -

    Added more debugging output to CacheFlush(). -

    3.72 9 Aug 2003 -

    Added qmagic($str), which is a qstr($str) that auto-checks for magic quotes - and does the right thing... -

    Fixed CacheFlush() bug - Thx to martin#gmx.de -

    Walt Boring contributed MetaForeignKeys for postgres7. -

    _fetch() called _BlobDecode() wrongly in interbase. Fixed. -

    adodb_time bug fixed with dates after 2038 fixed by Jason Pell. http://phplens.com/lens/lensforum/msgs.php?id=6980 -

    3.71 4 Aug 2003 -

    The oci8 driver, MetaPrimaryKeys() did not check the owner correctly when $owner - == false. -

    Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru. -

    Spanish language file contributed by "Horacio Degiorgi" horaciod#codigophp.com. -

    Error handling in oci8 bugfix - if there was an error in Execute(), then when - calling ErrorNo() and/or ErrorMsg(), the 1st call would return the error, but - the 2nd call would return no error. -

    Error handling in odbc bugfix. ODBC would always return the last error, even - if it happened 5 queries ago. Now we reset the errormsg to '' and errorno to - 0 everytime before CacheExecute() and Execute(). -

    3.70 29 July 2003 -

    Added new SQLite driver. Tested on PHP 4.3 and PHP 5. -

    Added limited "sapdb" driver support - mainly date support. -

    The oci8 driver did not identify NUMBER with no defined precision correctly. -

    Added ADODB_FORCE_NULLS, if set, then PHP nulls are converted to SQL nulls - in GetInsertSQL/GetUpdateSQL. -

    DBDate() and DBTimeStamp() format for postgresql had problems. Fixed. -

    Added tableoptions to ChangeTableSQL(). Thx to Mike Benoit. -

    Added charset support to postgresql. Thx to Julian Tarkhanov. -

    Changed OS check for MS-Windows to prevent confusion with darWIN (MacOS) -

    Timestamp format for db2 was wrong. Changed to yyyy-mm-dd-hh.mm.ss.nnnnnn. -

    adodb-cryptsession.php includes wrong. Fixed. -

    Added MetaForeignKeys(). Supported by mssql, odbc_mssql and oci8. -

    Fixed some oci8 MetaColumns/MetaPrimaryKeys bugs. Thx to Walt Boring. -

    adodb_getcount() did not init qryRecs to 0. Missing "WHERE" clause checking - in GetUpdateSQL fixed. Thx to Sebastiaan van Stijn. -

    Added support for only 'VIEWS' and "TABLES" in MetaTables. From Walt Boring. -

    Upgraded to adodb-xmlschema.inc.php 0.0.2. -

    NConnect for mysql now returns value. Thx to Dennis Verspuij. -

    ADODB_FETCH_BOTH support added to interbase/firebird. -

    Czech language file contributed by Kamil Jakubovic jake#host.sk. -

    PostgreSQL BlobDecode did not use _connectionID properly. Thx to Juraj Chlebec. -

    Added some new initialization stuff for Informix. Thx to "Andrea Pinnisi" pinnisi#sysnet.it -

    ADODB_ASSOC_CASE constant wrong in sybase _fetch(). Fixed. -

    3.60 16 June 2003 -

    We now SET CONCAT_NULL_YIELDS_NULL OFF for odbc_mssql driver to be compat with - mssql driver. -

    The property $emptyDate missing from connection class. Also changed 1903 to - constant (TIMESTAMP_FIRST_YEAR=100). Thx to Sebastiaan van Stijn. -

    ADOdb speedup optimization - we now return all arrays by reference. -

    Now DBDate() and DBTimeStamp() now accepts the string 'null' as a parameter. - Suggested by vincent. -

    Added GetArray() to connection class. -

    Added not_null check in informix metacolumns(). -

    Connection parameters for postgresql did not work correctly when port was defined. -

    DB2 is now a tested driver, making adodb 100% compatible. Extensive changes - to odbc driver for DB2, including implementing serverinfo() and SQLDate(), switching - to SQL_CUR_USE_ODBC as the cursor mode, and lastAffectedRows and SelectLimit() - fixes. -

    The odbc driver's FetchField() field names did not obey ADODB_ASSOC_CASE. Fixed. -

    Some bugs in adodb_backtrace() fixed. -

    Added "INT IDENTITY" type to adorecordset::MetaType() to support odbc_mssql - properly. -

    MetaColumns() for oci8, mssql, odbc revised to support scale. Also minor revisions - to odbc MetaColumns() for vfp and db2 compat. -

    Added unsigned support to mysql datadict class. Thx to iamsure. -

    Infinite loop in mssql MoveNext() fixed when ADODB_FETCH_ASSOC used. Thx to - Josh R, Night_Wulfe#hotmail.com. -

    ChangeTableSQL contributed by Florian Buzin. -

    The odbc_mssql driver now sets CONCAT_NULL_YIELDS_NULL OFF for compat with - mssql driver. -

    - -

    3.50 19 May 2003

    -

    Fixed mssql compat with FreeTDS. FreeTDS does not implement mssql_fetch_assoc(). -

    Merged back connection and recordset code into adodb.inc.php. -

    ADOdb sessions using oracle clobs contributed by achim.gosse#ddd.de. See adodb-session-clob.php. -

    Added /s modifier to preg_match everywhere, which ensures that regex does not - stop at /n. Thx Pao-Hsi Huang. -

    Fixed error in metacolumns() for mssql. -

    Added time format support for SQLDate. -

    Image => B added to metatype. -

    MetaType now checks empty($this->blobSize) instead of empty($this). -

    Datadict has beta support for informix, sybase (mapped to mssql), db2 and generic - (which is a fudge). -

    BlobEncode for postgresql uses pg_escape_bytea, if available. Needed for compat - with 7.3. -

    Added $ADODB_LANG, to support multiple languages in MetaErrorMsg(). -

    Datadict can now parse table definition as declarative text. -

    For DataDict, oci8 autoincrement trigger missing semi-colon. Fixed. -

    For DataDict, when REPLACE flag enabled, drop sequence in datadict for autoincrement - field in postgres and oci8.s -

    Postgresql defaults to template1 database if no database defined in connect/pconnect. -

    We now clear _resultid in postgresql if query fails. -

    3.40 19 May 2003

    -

    Added insert_id for odbc_mssql. -

    Modified postgresql UpdateBlobFile() because it did not work in safe mode. -

    Now connection object is passed to raiseErrorFn as last parameter. Needed by - StartTrans(). -

    Added StartTrans() and CompleteTrans(). It is recommended that you do not modify - transOff, but use the above functions. -

    oci8po now obeys ADODB_ASSOC_CASE settings. -

    Added virtualized error codes, using PEAR DB equivalents. Requires you to manually - include adodb-error.inc.php yourself, with MetaError() and MetaErrorMsg($errno). -

    GetRowAssoc for mysql and pgsql were flawed. Fix by Ross Smith. -

    Added to datadict types I1, I2, I4 and I8. Changed datadict type 'T' to map - to timestamp instead of datetime for postgresql. -

    Error handling in ExecuteSQLArray(), adodb-datadict.inc.php did not work. -

    We now auto-quote postgresql connection parameters when building connection - string. -

    Added session expiry notification. -

    We now test with odbc mysql - made some changes to odbc recordset constructor. -

    MetaColumns now special cases access and other databases for odbc. -

    3.31 17 March 2003

    -

    Added row checking for _fetch in postgres. -

    Added Interval type to MetaType for postgres. -

    Remapped postgres driver to call postgres7 driver internally. -

    Adorecordset_array::getarray() did not return array when nRows >= 0. -

    Postgresql: at times, no error message returned by pg_result_error() but error - message returned in pg_last_error(). Recoded again. -

    Interbase blob's now use chunking for updateblob. -

    Move() did not set EOF correctly. Reported by Jorma T. -

    We properly support mysql timestamp fields when we are creating mysql tables - using the data-dict interface. -

    Table regex includes backticks character now. -

    3.30 3 March 2003

    -

    Added $ADODB_EXTENSION and $ADODB_COMPAT_FETCH constant. -

    Made blank1stItem configurable using syntax "value:text" in GetMenu/GetMenu2. - Thx to Gabriel Birke. -

    Previously ADOdb differed from the Microsoft standard because it did not define - what to set $this->fields when EOF was reached. Now at EOF, ADOdb sets $this->fields - to false for all databases, which is consist with Microsoft's implementation. - Postgresql and mysql have always worked this way (in 3.11 and earlier). If you - are experiencing compatibility problems (and you are not using postgresql nor - mysql) on upgrading to 3.30, try setting the global variables $ADODB_COUNTRECS - = true (which is the default) and $ADODB_FETCH_COMPAT = true (this is a new - global variable). -

    We now check both pg_result_error and pg_last_error as sometimes pg_result_error - does not display anything. Iman Mayes -

    We no longer check for magic quotes gpc in Quote(). -

    Misc fixes for table creation in adodb-datadict.inc.php. Thx to iamsure. -

    Time calculations use adodb_time library for all negative timestamps due to - problems in Red Hat 7.3 or later. Formerly, only did this for Windows. -

    In mssqlpo, we now check if $sql in _query is a string before we change || - to +. This is to support prepared stmts. -

    Move() and MoveLast() internals changed to support to support EOF and $this->fields - change. -

    Added ADODB_FETCH_BOTH support to mssql. Thx to Angel Fradejas afradejas#mediafusion.es -

    We now check if link resource exists before we run mysql_escape_string in - qstr(). -

    Before we flock in csv code, we check that it is not a http url. -

    3.20 17 Feb 2003

    -

    Added new Data Dictionary classes for creating tables and indexes. Warning - - this is very much alpha quality code. The API can still change. See adodb/tests/test-datadict.php - for more info. -

    We now ignore $ADODB_COUNTRECS for mysql, because PHP truncates incomplete - recordsets when mysql_unbuffered_query() is called a second time. -

    Now postgresql works correctly when $ADODB_COUNTRECS = false. -

    Changed _adodb_getcount to properly support SELECT DISTINCT. -

    Discovered that $ADODB_COUNTRECS=true has some problems with prepared queries - - suspect PHP bug. -

    Now GetOne and GetRow run in $ADODB_COUNTRECS=false mode for better performance. -

    Added support for mysql_real_escape_string() and pg_escape_string() in qstr(). -

    Added an intermediate variable for mysql _fetch() and MoveNext() to store fields, - to prevent overwriting field array with boolean when mysql_fetch_array() returns - false. -

    Made arrays for getinsertsql and getupdatesql case-insensitive. Suggested by - Tim Uckun" tim#diligence.com -

    3.11 11 Feb 2003

    -

    Added check for ADODB_NEVER_PERSIST constant in PConnect(). If defined, then - PConnect() will actually call non-persistent Connect(). -

    Modified interbase to properly work with Prepare(). -

    Added $this->ibase_timefmt to allow you to change the date and time format. -

    Added support for $input_array parameter in CacheFlush(). -

    Added experimental support for dbx, which was then removed when i found that - it was slower than using native calls. -

    Added MetaPrimaryKeys for mssql and ibase/firebird. -

    Added new $trim parameter to GetCol and CacheGetCol -

    Uses updated adodb-time.inc.php 0.06. -

    3.10 27 Jan 2003 -

    Added adodb_date(), adodb_getdate(), adodb_mktime() and adodb-time.inc.php. -

    For interbase, added code to handle unlimited number of bind parameters. From - Daniel Hasan daniel#hasan.cl. -

    Added BlobDecode and UpdateBlob for informix. Thx to Fernando Ortiz. -

    Added constant ADODB_WINDOWS. If defined, means that running on Windows. -

    Added constant ADODB_PHPVER which stores php version as a hex num. Removed - $ADODB_PHPVER variable. -

    Felho Bacsi reported a minor white-space regular expression problem in GetInsertSQL. -

    Modified ADO to use variant to store _affectedRows -

    Changed ibase to use base class Replace(). Modified base class Replace() to - support ibase. -

    Changed odbc to auto-detect when 0 records returned is wrong due to bad odbc - drivers. -

    Changed mssql to use datetimeconvert ini setting only when 4.30 or later (does - not work in 4.23). -

    ExecuteCursor($stmt, $cursorname, $params) now accepts a new $params array - of additional bind parameters -- William Lovaton walovaton#yahoo.com.mx. -

    Added support for sybase_unbuffered_query if ADODB_COUNTRECS == false. Thx - to chuck may. -

    Fixed FetchNextObj() bug. Thx to Jorma Tuomainen. -

    We now use SCOPE_IDENTITY() instead of @@IDENTITY for mssql - thx to marchesini#eside.it -

    Changed postgresql movenext logic to prevent illegal row number from being - passed to pg_fetch_array(). -

    Postgresql initrs bug found by "Bogdan RIPA" bripa#interakt.ro $f1 accidentally - named $f -

    3.00 6 Jan 2003 -

    Fixed adodb-pear.inc.php syntax error. -

    Improved _adodb_getcount() to use SELECT COUNT(*) FROM ($sql) for languages - that accept it. -

    Fixed _adodb_getcount() caching error. -

    Added sql to retrive table and column info for odbc_mssql. -

    2.91 3 Jan 2003 -

    Revised PHP version checking to use $ADODB_PHPVER with legal values 0x4000, - 0x4050, 0x4200, 0x4300. -

    Added support for bytea fields and oid blobs in postgres by allowing BlobDecode() - to detect and convert non-oid fields. Also added BlobEncode to postgres when - you want to encode oid blobs. -

    Added blobEncodeType property for connections to inform phpLens what encoding - method to use for blobs. -

    Added BlobDecode() and BlobEncode() to base ADOConnection class. -

    Added umask() to _gencachename() when creating directories. -

    Added charPage for ado drivers, so you can set the code page. -

    -$conn->charPage = CP_UTF8;
    -$conn->Connect($dsn);
    -
    -

    Modified _seek in mysql to check for num rows=0. -

    Added to metatypes new informix types for IDS 9.30. Thx Fernando Ortiz. -

    _maxrecordcount returned in CachePageExecute $rsreturn -

    Fixed sybase cacheselectlimit( ) problems -

    MetaColumns() max_length should use precision for types X and C for ms access. - Fixed. -

    Speedup of odbc non-SELECT sql statements. -

    Added support in MetaColumns for Wide Char types for ODBC. We halve max_length - if unicode/wide char. -

    Added 'B' to types handled by GetUpdateSQL/GetInsertSQL. -

    Fixed warning message in oci8 driver with $persist variable when using PConnect. -

    2.90 11 Dec 2002 -

    Mssql and mssqlpo and oci8po now support ADODB_ASSOC_CASE. -

    Now MetaType() can accept a field object as the first parameter. -

    New $arr = $db->ServerInfo( ) function. Returns $arr['description'] which - is the string description, and $arr['version']. -

    PostgreSQL and MSSQL speedups for insert/updates. -

    Implemented new SetFetchMode() that removes the need to use $ADODB_FETCH_MODE. - Each connection has independant fetchMode. -

    ADODB_ASSOC_CASE now defaults to 2, use native defaults. This is because we - would break backward compat for too many applications otherwise. -

    Patched encrypted sessions to use replace() -

    The qstr function supports quoting of nulls when escape character is \ -

    Rewrote bits and pieces of session code to check for time synch and improve - reliability. -

    Added property ADOConnection::hasTransactions = true/false; -

    Added CreateSequence and DropSequence functions -

    Found misplaced MoveNext() in adodb-postgres.inc.php. Fixed. -

    Sybase SelectLimit not reliable because 'set rowcount' not cached - fixed. -

    Moved ADOConnection to adodb-connection.inc.php and ADORecordSet to adodb-recordset.inc.php. - This allows us to use doxygen to generate documentation. Doxygen doesn't like - the classes in the main adodb.inc.php file for some mysterious reason. -

    2.50, 14 Nov 2002 -

    Added transOff and transCnt properties for disabling (transOff = true) and - tracking transaction status (transCnt>0). -

    Added inputarray handling into _adodb_pageexecute_all_rows - "Ross Smith" RossSmith#bnw.com. -

    Fixed postgresql inconsistencies in date handling. -

    Added support for mssql_fetch_assoc. -

    Fixed $ADODB_FETCH_MODE bug in odbc MetaTables() and MetaPrimaryKeys(). -

    Accidentally declared UnixDate() twice, making adodb incompatible with php - 4.3.0. Fixed. -

    Fixed pager problems with some databases that returned -1 for _currentRow on - MoveLast() by switching to MoveNext() in adodb-lib.inc.php. -

    Also fixed uninited $discard in adodb-lib.inc.php. -

    2.43, 25 Oct 2002

    -Added ADODB_ASSOC_CASE constant to better support ibase and odbc field names. -

    Added support for NConnect() for oracle OCINLogin. -

    Fixed NumCols() bug. -

    Changed session handler to use Replace() on write. -

    Fixed oci8 SelectLimit aggregate function bug again. -

    Rewrote pivoting code. -

    2.42, 4 Oct 2002

    -

    Fixed ibase_fetch() problem with nulls. Also interbase now does automatic blob - decoding, and is backward compatible. Suggested by Heinz Hombergs heinz#hhombergs.de. -

    Fixed postgresql MoveNext() problems when called repeatedly after EOF. Also - suggested by Heinz Hombergs. -

    PageExecute() does not rewrite queries if SELECT DISTINCT is used. Requested - by hans#velum.net -

    Added additional fixes to oci8 SelectLimit handling with aggregate functions - - thx to Christian Bugge for reporting the problem. -

    2.41, 2 Oct 2002

    -

    Fixed ADODB_COUNTRECS bug in odbc. Thx to Joshua Zoshi jzoshi#hotmail.com. -

    Increased buffers for adodb-csvlib.inc.php for extremely long sql from 8192 - to 32000. -

    Revised pivottable.inc.php code. Added better support for aggregate fields. -

    Fixed mysql text/blob types problem in MetaTypes base class - thx to horacio - degiorgi. -

    Added SQLDate($fmt,$date) function, which allows an sql date format string - to be generated - useful for group by's. -

    Fixed bug in oci8 SelectLimit when offset>100. -

    2.40 4 Sept 2002

    -

    Added new NLS_DATE_FORMAT property to oci8. Suggested by Laurent NAVARRO ln#altidev.com -

    Now use bind parameters in oci8 selectlimit for better performance. -

    Fixed interbase replaceQuote for dialect != 1. Thx to "BEGUIN Pierre-Henri - - INFOCOB" phb#infocob.com. -

    Added white-space check to QA. -

    Changed unixtimestamp to support fractional seconds (we always round down/floor - the seconds). Thanks to beezly#beezly.org.uk. -

    Now you can set the trigger_error type your own user-defined type in adodb-errorhandler.inc.php. - Suggested by Claudio Bustos clbustos#entelchile.net. -

    Added recordset filters with rsfilter.inc.php. -

    $conn->_rs2rs does not create a new recordset when it detects it is of type - array. Some trickery there as there seems to be a bug in Zend Engine -

    Added render_pagelinks to adodb-pager.inc.php. Code by "Pablo Costa" pablo#cbsp.com.br. -

    MetaType() speedup in adodb.inc.php by using hashing instead of switch. Best - performance if constant arrays are supported, as they are in PHP5. -

    adodb-session.php now updates only the expiry date if the crc32 check indicates - that the data has not been modified. -

    2.31 20 Aug 2002

    -

    Made changes to pivottable.inc.php due to daniel lucuzaeu's suggestions (we sum the pivottable column if desired). -

    Fixed ErrorNo() in postgres so it does not depend on _errorMsg property. -

    Robert Tuttle added support for oracle cursors. See ExecuteCursor(). -

    Fixed Replace() so it works with mysql when updating record where data has not changed. Reported by -Cal Evans (cal#calevans.com). -

    2.30 1 Aug 2002

    -

    Added pivottable.inc.php. Thanks to daniel.lucazeau#ajornet.com for the original - concept. -

    Added ADOConnection::outp($msg,$newline) to output error and debugging messages. Now -you can override this using the ADODB_OUTP constant and use your own output handler. -

    Changed == to === for 'null' comparison. Reported by ericquil#yahoo.com -

    Fixed mssql SelectLimit( ) bug when distinct used. -

    2.30 1 Aug 2002

    -

    New GetCol() and CacheGetCol() from ross#bnw.com that returns the first field as a 1 dim array. -

    We have an empty recordset, but RecordCount() could return -1. Fixed. Reported by "Jonathan Polansky" jonathan#polansky.com. -

    We now check for session variable changes using strlen($sessval).crc32($sessval). -Formerly we only used crc32(). -

    Informix SelectLimit() problem with $ADODB_COUNTRECS fixed. -

    Fixed informix SELECT FIRST x DISTINCT, and not SELECT DISTINCT FIRST x - reported by F Riosa -

    Now default adodb error handlers ignores error if @ used. -

    If you set $conn->autoRollback=true, we auto-rollback persistent connections for odbc, mysql, oci8, mssql. -Default for autoRollback is false. No need to do so for postgres. -As interbase requires a transaction id (what a flawed api), we don't do it for interbase. -

    Changed PageExecute() to use non-greedy preg_match when searching for "FROM" keyword. -

    2.20 9 July 2002

    -

    Added CacheGetOne($secs2cache,$sql), CacheGetRow($secs2cache,$sql), CacheGetAll($secs2cache,$sql). -

    Added $conn->OffsetDate($dayFraction,$date=false) to generate sql that calcs - date offsets. Useful for scheduling appointments. -

    Added connection properties: leftOuter, rightOuter that hold left and right - outer join operators. -

    Added connection property: ansiOuter to indicate whether ansi outer joins supported. -

    New driver mssqlpo, the portable mssql driver, which converts string - concat operator from || to +. -

    Fixed ms access bug - SelectLimit() did not support ties - fixed. -

    Karsten Kraus (Karsten.Kraus#web.de), contributed error-handling code to ADONewConnection. - Unfortunately due to backward compat problems, had to rollback most of the changes. -

    Added new parameter to GetAssoc() to allow returning an array of key-value pairs, -ignoring any additional columns in the recordset. Off by default. -

    Corrected mssql $conn->sysDate to return only date using convert(). -

    CacheExecute() improved debugging output. -

    Changed rs2html() so newlines are converted to BR tags. Also optimized rs2html() based -on feedback by "Jerry Workman" jerry#mtncad.com. -

    Added support for Replace() with Interbase, using DELETE and INSERT. -

    Some minor optimizations (mostly removing & references when passing arrays). -

    Changed GenID() to allows id's larger than the size of an integer. -

    Added force_session property to oci8 for better updateblob() support. -

    Fixed PageExecute() which did not work properly with sql containing GROUP BY. -

    2.12 12 June 2002

    -

    Added toexport.inc.php to export recordsets in CSV and tab-delimited format. -

    CachePageExecute() does not work - fixed - thx John Huong. -

    Interbase aliases not set properly in FetchField() - fixed. Thx Stefan Goethals. -

    Added cache property to adodb pager class. The number of secs to cache recordsets. -

    SQL rewriting bug in pageexecute() due to skipping of newlines due to missing /s modifier. Fixed. -

    Max size of cached recordset due to a bug was 256000 bytes. Fixed. -

    Speedup of 1st invocation of CacheExecute() by tuning code. -

    We compare $rewritesql with $sql in pageexecute code in case of rewrite failure. -

    2.11 7 June 2002

    -

    Fixed PageExecute() rewrite sql problem - COUNT(*) and ORDER BY don't go together with - mssql, access and postgres. Thx to Alexander Zhukov alex#unipack.ru -

    DB2 support for CHARACTER type added - thx John Huong huongch#bigfoot.com -

    For ado, $argProvider not properly checked. Fixed - kalimero#ngi.it -

    Added $conn->Replace() function for update with automatic insert if the record does not exist. - Supported by all databases except interbase. -

    2.10 4 June 2002

    -

    Added uniqueSort property to indicate mssql ORDER BY cols must be unique. -

    Optimized session handler by crc32 the data. We only write if session data has changed. -

    adodb_sess_read in adodb-session.php now returns ''correctly - thanks to Jorma Tuomainen, webmaster#wizactive.com -

    Mssql driver did not throw EXECUTE errors correctly because ErrorMsg() and ErrorNo() called in wrong order. -Pointed out by Alexios Fakos. Fixed. -

    Changed ado to use client cursors. This fixes BeginTran() problems with ado. -

    Added handling of timestamp type in ado. -

    Added to ado_mssql support for insert_id() and affected_rows(). -

    Added support for mssql.datetimeconvert=0, available since php 4.2.0. -

    Made UnixDate() less strict, so that the time is ignored if present. -

    Changed quote() so that it checks for magic_quotes_gpc. -

    Changed maxblobsize for odbc to default to 64000. -

    2.00 13 May 2002

    -

    Added drivers informix72 for pre-7.3 versions, and oci805 for - oracle 8.0.5, and postgres64 for postgresql 6.4 and earlier. The postgres and postgres7 drivers - are now identical. -

    Interbase now partially supports ADODB_FETCH_BOTH, by defaulting to ASSOC mode. -

    Proper support for blobs in mssql. Also revised blob support code -is base class. Now UpdateBlobFile() calls UpdateBlob() for consistency. -

    Added support for changed odbc_fetch_into api in php 4.2.0 -with $conn->_has_stupid_odbc_fetch_api_change. -

    Fixed spelling of tablock locking hint in GenID( ) for mssql. -

    Added RowLock( ) to several databases, including oci8, informix, sybase, etc. - Fixed where error in mssql RowLock(). -

    Added sysDate and sysTimeStamp properties to most database drivers. These are the sql -functions/constants for that database that return the current date and current timestamp, and -are useful for portable inserts and updates. -

    Support for RecordCount() caused date handling in sybase and mssql to break. -Fixed, thanks to Toni Tunkkari, by creating derived classes for ADORecordSet_array for -both databases. Generalized using arrayClass property. Also to support RecordCount(), -changed metatype handling for ado drivers. Now the type returned in FetchField - is no longer a number, but the 1-char data type returned by MetaType. - At the same time, fixed a lot of date handling. Now mssql support dmy and mdy date formats. -Also speedups in sybase and mssql with preg_match and ^ in date/timestamp handling. -Added support in sybase and mssql for 24 hour clock in timestamps (no AM/PM). -

    Extensive revisions to informix driver - thanks to Samuel CARRIERE samuel_carriere#hotmail.com -

    Added $ok parameter to CommitTrans($ok) for easy rollbacks. -

    Fixed odbc MetaColumns and MetaTables to save and restore $ADODB_FETCH_MODE. -

    Some odbc drivers did not call the base connection class constructor. Fixed. -

    Fixed regex for GetUpdateSQL() and GetInsertSQL() to support more legal character combinations. - -

    1.99 21 April 2002

    -

    Added emulated RecordCount() to all database drivers if $ADODB_COUNTRECS = true - (which it is by default). Inspired by Cristiano Duarte (cunha17#uol.com.br). -

    Unified stored procedure support for mssql and oci8. Parameter() and PrepareSP() - functions implemented. -

    Added support for SELECT FIRST in informix, modified hasTop property to support - this. -

    Changed csv driver to handle updates/deletes/inserts properly (when Execute() returns true). -Bind params also work now, and raiseErrorFn with csv driver. Added csv driver to QA process. -

    Better error checking in oci8 UpdateBlob() and UpdateBlobFile(). -

    Added TIME type to MySQL - patch by Manfred h9125297#zechine.wu-wien.ac.at -

    Prepare/Execute implemented for Interbase/Firebird -

    Changed some regular expressions to be anchored by /^ $/ for speed. -

    Added UnixTimeStamp() and UnixDate() to ADOConnection(). Now these functions - are in both ADOConnection and ADORecordSet classes. -

    Empty recordsets were not cached - fixed. -

    Thanks to Gaetano Giunta (g.giunta#libero.it) for the oci8 code review. We - didn't agree on everything, but i hoped we agreed to disagree! -

    1.90 6 April 2002

    -

    Now all database drivers support fetch modes ADODB_FETCH_NUM and ADODB_FETCH_ASSOC, though - still not fully tested. Eg. Frontbase, Sybase, Informix. -

    NextRecordSet() support for mssql. Contributed by "Sven Axelsson" sven.axelsson#bokochwebb.se -

    Added blob support for SQL Anywhere. Contributed by Wade Johnson wade#wadejohnson.de -

    Fixed some security loopholes in server.php. Server.php also supports fetch mode. -

    Generalized GenID() to support odbc and mssql drivers. Mssql no longer generates GUID's. -

    Experimental RowLock($table,$where) for mssql. -

    Properly implemented Prepare() in oci8 and ODBC. -

    Added Bind() support to oci8 to support Prepare(). -

    Improved error handler. Catches CacheExecute() and GenID() errors now. -

    Now if you are running php from the command line, debugging messages do not output html formating. -Not 100% complete, but getting there. -

    1.81 22 March 2002

    -

    Restored default $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT for backward compatibility. -

    SelectLimit for oci8 improved - Our FIRST_ROWS optimization now does not overwrite existing hint. -

    New Sybase SQL Anywhere driver. Contributed by Wade Johnson wade#wadejohnson.de -

    1.80 15 March 2002

    -

    Redesigned directory structure of ADOdb files. Added new driver directory where -all database drivers reside. -

    Changed caching algorithm to create subdirectories. Now we scale better. -

    Informix driver now supports insert_id(). Contribution by "Andrea Pinnisi" pinnisi#sysnet.it -

    Added experimental ISO date and FetchField support for informix. -

    Fixed a quoting bug in Execute() with bind parameters, causing problems with blobs. -

    Mssql driver speedup by 10-15%. -

    Now in CacheExecute($secs2cache,$sql,...), $secs2cache is optional. If missing, it will -take the value defined in $connection->cacheSecs (default is 3600 seconds). Note that -CacheSelectLimit(), the secs2cache is still compulsory - sigh. -

    Sybase SQL Anywhere driver (using ODBC) contributed by Wade Johnson wade#wadejohnson.de -

    1.72 8 March 2002

    -

    Added @ when returning Fields() to prevent spurious error - "Michael William Miller" mille562#pilot.msu.edu -

    MetaDatabases() for postgres contributed by Phil pamelant#nerim.net -

    Mitchell T. Young (mitch#youngfamily.org) contributed informix driver. -

    Fixed rs2html() problem. I cannot reproduce, so probably a problem with pre PHP 4.1.0 versions, - when supporting new ADODB_FETCH_MODEs. -

    Mattia Rossi (mattia#technologist.com) contributed BlobDecode() and UpdateBlobFile() for postgresql - using the postgres specific pg_lo_import()/pg_lo_open() - i don't use them but hopefully others will - find this useful. See this posting - for an example of usage. -

    Added UpdateBlobFile() for uploading files to a database. -

    Made UpdateBlob() compatible with oci8po driver. -

    Added noNullStrings support to oci8 driver. Oracle changes all ' ' strings to nulls, - so you need to set strings to ' ' to prevent the nullifying of strings. $conn->noNullStrings = true; - will do this for you automatically. This is useful when you define a char column as NOT NULL. -

    Fixed UnixTimeStamp() bug - wasn't setting minutes and seconds properly. Patch from Agusti Fita i Borrell agusti#anglatecnic.com. -

    Toni Tunkkari added patch for sybase dates. Problem with spaces in day part of date fixed. -

    1.71 18 Jan 2002

    -

    Sequence start id support. Now $conn->Gen_ID('seqname', 50) to start sequence from 50. -

    CSV driver fix for selectlimit, from Andreas - akaiser#vocote.de. -

    Gam3r spotted that a global variable was undefined in the session handler. -

    Mssql date regex had error. Fixed - reported by Minh Hoang vb_user#yahoo.com. -

    DBTimeStamp() and DBDate() now accept iso dates and unix timestamps. This means -that the PostgreSQL handling of dates in GetInsertSQL() and GetUpdateSQL() can -be removed. Also if these functions are passed '' or null or false, we return a SQL null. -

    GetInsertSQL() and GetUpdateSQL() now accept a new parameter, $magicq to -indicate whether quotes should be inserted based on magic quote settings - suggested by -dj#4ict.com. -

    Reformated docs slightly based on suggestions by Chris Small. -

    1.65 28 Dec 2001

    -

    Fixed borland_ibase class naming bug. -

    Now instead of using $rs->fields[0] internally, we use reset($rs->fields) so - that we are compatible with ADODB_FETCH_ASSOC mode. Reported by Nico S. -

    Changed recordset constructor and _initrs() for oci8 so that it returns the field definitions even - if no rows in the recordset. Reported by Rick Hickerson (rhickers#mv.mv.com). -

    Improved support for postgresql in GetInsertSQL and GetUpdateSQL by - "mike" mike#partner2partner.com and "Ryan Bailey" rebel#windriders.com -

    1.64 20 Dec 2001

    -

    Danny Milosavljevic <danny.milo#gmx.net> added some patches for MySQL error handling -and displaying default values. -

    Fixed some ADODB_FETCH_BOTH inconsistencies in odbc and interbase. -

    Added more tests to test suite to cover ADODB_FETCH_* and ADODB_ERROR_HANDLER. -

    Added firebird (ibase) driver -

    Added borland_ibase driver for interbase 6.5 -

    1.63 13 Dec 2001

    -Absolute to the adodb-lib.inc.php file not set properly. Fixed.

    - -

    1.62 11 Dec 2001

    -

    Major speedup of ADOdb for low-end web sites by reducing the php code loading and compiling -cycle. We conditionally compile not so common functions. -Moved csv code to adodb-csvlib.inc.php to reduce adodb.inc.php parsing. This file -is loaded only when the csv/proxy driver is used, or CacheExecute() is run. -Also moved PageExecute(), GetSelectSQL() and GetUpdateSQL() core code to adodb-lib.inc.php. -This reduced the 70K main adodb.inc.php file to 55K, and since at least 20K of the file -is comments, we have reduced 50K of code in adodb.inc.php to 35K. There - should be 35% reduction in memory and thus 35% speedup in compiling the php code for the -main adodb.inc.php file. -

    Highly tuned SelectLimit() for oci8 for massive speed improvements on large files. -Selecting 20 rows starting from the 20,000th row of a table is now 7 times faster. -Thx to Tomas V V Cox. -

    Allow . and # in table definitions in GetInsertSQL and GetUpdateSQL. - See ADODB_TABLE_REGEX constant. Thx to Ari Kuorikoski. -

    Added ADODB_PREFETCH_ROWS constant, defaulting to 10. This determines the number -of records to prefetch in a SELECT statement. Only used by oci8.

    -

    Added high portability Oracle class called oci8po. This uses ? for bind variables, and -lower cases column names.

    -

    Now all database drivers support $ADODB_FETCH_MODE, including interbase, ado, and odbc: -ADODB_FETCH_NUM and ADODB_FETCH_ASSOC. ADODB_FETCH_BOTH is not fully implemented for all -database drivers. -

    1.61 Nov 2001

    -

    Added PO_RecordCount() and PO_Insert_ID(). PO stands for portable. Pablo Roca - [pabloroca#mvps.org]

    -

    GenID now returns 0 if not available. Safer is that you should check $conn->hasGenID - for availability.

    -

    M'soft ADO we now correctly close recordset in _close() peterd#telephonetics.co.uk

    -

    MSSQL now supports GenID(). It generates a 16-byte GUID from mssql newid() - function.

    -

    Changed ereg_replace to preg_replace in SelectLimit. This is a fix for mssql. - Ereg doesn't support t or n! Reported by marino Carlos xaplo#postnuke-espanol.org

    -

    Added $recordset->connection. This is the ADOConnection object for the recordset. -Works with cached and normal recordsets. Surprisingly, this had no affect on performance!

    -

    1.54 15 Nov 2001

    -Fixed some more bugs in PageExecute(). I am getting sick of bug in this and will have to -reconsider my QA here. The main issue is that I don't use PageExecute() and -to check whether it is working requires a visual inspection of the html generated currently. -It is possible to write a test script but it would be quite complicated :( -

    More speedups of SelectLimit() for DB2, Oci8, access, vfp, mssql. -

    - -

    1.53 7 Nov 2001

    -Added support for ADODB_FETCH_ASSOC for ado and odbc drivers.

    -Tuned GetRowAssoc(false) in postgresql and mysql.

    -Stephen Van Dyke contributed ADOdb icon, accepted with some minor mods.

    -Enabled Affected_Rows() for postgresql

    -Speedup for Concat() using implode() - Benjamin Curtis ben_curtis#yahoo.com

    -Fixed some more bugs in PageExecute() to prevent infinite loops

    -

    1.52 5 Nov 2001

    -Spelling error in CacheExecute() caused it to fail. $ql should be $sql in line 625!

    -Added fixes for parsing [ and ] in GetUpdateSQL(). -

    1.51 5 Nov 2001

    -

    Oci8 SelectLimit() speedup by using OCIFetch(). -

    Oci8 was mistakenly reporting errors when $db->debug = true. -

    If a connection failed with ODBC, it was not correctly reported - fixed. -

    _connectionID was inited to -1, changed to false. -

    Added $rs->FetchRow(), to simplify API, ala PEAR DB -

    Added PEAR DB compat mode, which is still faster than PEAR! See adodb-pear.inc.php. -

    Removed postgres pconnect debugging statement. -

    1.50 31 Oct 2001

    -

    ADOdbConnection renamed to ADOConnection, and ADOdbFieldObject to ADOFieldObject. -

    PageExecute() now checks for empty $rs correctly, and the errors in the docs on this subject have been fixed. -

    odbc_error() does not return 6 digit error correctly at times. Implemented workaround. -

    Added ADORecordSet_empty class. This will speedup INSERTS/DELETES/UPDATES because the return -object created is much smaller. -

    Added Prepare() to odbc, and oci8 (but doesn't work properly for oci8 still). -

    Made pgsql a synonym for postgre7, and changed SELECT LIMIT to use OFFSET for compat with -postgres 7.2. -

    Revised adodb-cryptsession.php thanks to Ari. -

    Set resources to false on _close, to force freeing of resources. -

    Added adodb-errorhandler.inc.php, adodb-errorpear.inc.php and raiseErrorFn on Freek's urging. -

    GetRowAssoc($toUpper=true): $toUpper added as default. -

    Errors when connecting to a database were not captured formerly. Now we do it correctly. -

    1.40 19 September 2001

    -

    PageExecute() to implement page scrolling added. Code and idea by Iván Oliva.

    -

    Some minor postgresql fixes.

    -

    Added sequence support using GenID() for postgresql, oci8, mysql, interbase.

    -

    Added UpdateBlob support for interbase (untested).

    -

    Added encrypted sessions (see adodb-cryptsession.php). By Ari Kuorikoski <kuoriari#finebyte.com>

    -

    1.31 21 August 2001

    -

    Many bug fixes thanks to "GaM3R (Cameron)" <gamr#outworld.cx>. Some session changes due to Gam3r. -

    Fixed qstr() to quote also. -

    rs2html() now pretty printed. -

    Jonathan Younger jyounger#unilab.com contributed the great idea GetUpdateSQL() and GetInsertSQL() which -generates SQL to update and insert into a table from a recordset. Modify the recordset fields -array, then can this function to generate the SQL (the SQL is not executed). -

    "Nicola Fankhauser" <nicola.fankhauser#couniq.com> found some bugs in date handling for mssql.

    -

    Added minimal Oracle support for LOBs. Still under development.

    -Added $ADODB_FETCH_MODE so you can control whether recordsets return arrays which are -numeric, associative or both. This is a global variable you set. Currently only MySQL, Oci8, Postgres -drivers support this. -

    PostgreSQL properly closes recordsets now. Reported by several people. -

    -Added UpdateBlob() for Oracle. A hack to make it easier to save blobs. -

    -Oracle timestamps did not display properly. Fixed. -

    1.20 6 June 2001

    -

    Now Oracle can connect using tnsnames.ora or server and service name

    -

    Extensive Oci8 speed optimizations. -Oci8 code revised to support variable binding, and /*+ FIRST_ROWS */ hint.

    -

    Worked around some 4.0.6 bugs in odbc_fetch_into().

    -

    Paolo S. Asioli paolo.asioli#libero.it suggested GetRowAssoc().

    -

    Escape quotes for oracle wrongly set to '. Now '' is used.

    -

    Variable binding now works in ODBC also.

    -

    Jumped to version 1.20 because I don't like 13 :-)

    -

    1.12 6 June 2001

    -

    Changed $ADODB_DIR to ADODB_DIR constant to plug a security loophole.

    -

    Changed _close() to close persistent connections also. Prevents connection leaks.

    -

    Major revision of oracle and oci8 drivers. -Added OCI_RETURN_NULLS and OCI_RETURN_LOBS to OCIFetchInto(). BLOB, CLOB and VARCHAR2 recognition -in MetaType() improved. MetaColumns() returns columns in correct sort order.

    -

    Interbase timestamp input format was wrong. Fixed.

    -

    1.11 20 May 2001

    -

    Improved file locking for Windows.

    -

    Probabilistic flushing of cache to avoid avalanche updates when cache timeouts.

    -

    Cached recordset timestamp not saved in some scenarios. Fixed.

    -

    1.10 19 May 2001

    -

    Added caching. CacheExecute() and CacheSelectLimit(). -

    Added csv driver. See http://php.weblogs.com/ADODB_csv. -

    Fixed SelectLimit(), SELECT TOP not working under certain circumstances. -

    Added better Frontbase support of MetaTypes() by Frank M. Kromann. -

    1.01 24 April 2001

    -

    Fixed SelectLimit bug. not quoted properly. -

    SelectLimit: SELECT TOP -1 * FROM TABLE not support by Microsoft. Fixed.

    -

    GetMenu improved by glen.davies#cce.ac.nz to support multiple hilited items

    -

    FetchNextObject() did not work with only 1 record returned. Fixed bug reported by $tim#orotech.net

    -

    Fixed mysql field max_length problem. Fix suggested by Jim Nicholson (jnich#att.com)

    -

    1.00 16 April 2001

    -

    Given some brilliant suggestions on how to simplify ADOdb by akul. You no longer need to -setup $ADODB_DIR yourself, and ADOLoadCode() is automatically called by ADONewConnection(), -simplifying the startup code.

    -

    FetchNextObject() added. Suggested by Jakub Marecek. This makes FetchObject() obsolete, as -this is more flexible and powerful.

    -

    Misc fixes to SelectLimit() to support Access (top must follow distinct) and Fields() -in the array recordset. From Reinhard Balling.

    -

    0.96 27 Mar 2001

    -

    ADOConnection Close() did not return a value correctly. Thanks to akul#otamedia.com.

    -

    When the horrible magic_quotes is enabled, back-slash () is changed to double-backslash (\). -This doesn't make sense for Microsoft/Sybase databases. We fix this in qstr().

    -

    Fixed Sybase date problem in UnixDate() thanks to Toni Tunkkari. Also fixed MSSQL problem -in UnixDate() - thanks to milhouse31#hotmail.com.

    -

    MoveNext() moved to leaf classes for speed in MySQL/PostgreSQL. 10-15% speedup.

    -

    Added null handling in bindInputArray in Execute() -- Ron Baldwin suggestion.

    -

    Fixed some option tags. Thanks to john#jrmstudios.com.

    -

    0.95 13 Mar 2001

    -

    Added postgres7 database driver which supports LIMIT and other version 7 stuff in the future.

    -

    Added SelectLimit to ADOConnection to simulate PostgreSQL's "select * from table limit 10 offset 3". -Added helper function GetArrayLimit() to ADORecordSet.

    -

    Fixed mysql metacolumns bug. Thanks to Freek Dijkstra (phpeverywhere#macfreek.com).

    -

    Also many PostgreSQL changes by Freek. He almost rewrote the whole PostgreSQL driver!

    -

    Added fix to input parameters in Execute for non-strings by Ron Baldwin.

    -

    Added new metatype, X for TeXt. Formerly, metatype B for Blob also included -text fields. Now 'B' is for binary/image data. 'X' for textual data.

    -

    Fixed $this->GetArray() in GetRows().

    -

    Oracle and OCI8: 1st parameter is always blank -- now warns if it is filled.

    -

    Now hasLimit and hasTop added to indicate whether -SELECT * FROM TABLE LIMIT 10 or SELECT TOP 10 * FROM TABLE are supported.

    -

    0.94 04 Feb 2001

    -

    Added ADORecordSet::GetRows() for compatibility with Microsoft ADO. Synonym for GetArray().

    -

    Added new metatype 'R' to represent autoincrement numbers.

    -

    Added ADORecordSet.FetchObject() to return a row as an object.

    -

    Finally got a Linux box to test PostgreSql. Many fixes.

    -

    Fixed copyright misspellings in 0.93.

    -

    Fixed mssql MetaColumns type bug.

    -

    Worked around odbc bug in PHP4 for sessions.

    -

    Fixed many documentation bugs (affected_rows, metadatabases, qstr).

    -

    Fixed MySQL timestamp format (removed comma).

    -

    Interbase driver did not call ibase_pconnect(). Fixed.

    -

    0.93 18 Jan 2002

    -

    Fixed GetMenu bug.

    -

    Simplified Interbase commit and rollback.

    -

    Default behaviour on closing a connection is now to rollback all active transactions.

    -

    Added field object handling for array recordset for future XML compatibility.

    -

    Added arr2html() to convert array to html table.

    -

    0.92 2 Jan 2002

    -

    Interbase Commit and Rollback should be working again.

    -

    Changed initialisation of ADORecordSet. This is internal and should not affect users. We -are doing this to support cached recordsets in the future.

    - -

    Implemented ADORecordSet_array class. This allows you to simulate a database recordset -with an array.

    -

    Added UnixDate() and UnixTimeStamp() to ADORecordSet.

    -

    0.91 21 Dec 2000

    -

    Fixed ODBC so ErrorMsg() is working.

    -

    Worked around ADO unrecognised null (0x1) value problem in COM.

    -

    Added Sybase support for FetchField() type

    -

    Removed debugging code and unneeded html from various files

    -

    Changed to javadoc style comments to adodb.inc.php.

    -

    Added maxsql as synonym for mysqlt

    -

    Now ODBC downloads first 8K of blob by default -

    0.90 15 Nov 2000

    -

    Lots of testing of Microsoft ADO. Should be more stable now.

    -

    Added $ADODB_COUNTREC. Set to false for high speed selects.

    -

    Added Sybase support. Contributed by Toni Tunkkari (toni.tunkkari#finebyte.com). Bug in Sybase - API: GetFields is unable to determine date types.

    -

    Changed behaviour of RecordSet.GetMenu() to support size parameter (listbox) properly.

    -

    Added emptyDate and emptyTimeStamp to RecordSet class that defines how to represent - empty dates.

    -

    Added MetaColumns($table) that returns an array of ADOFieldObject's listing - the columns of a table.

    -

    Added transaction support for PostgresSQL -- thanks to "Eric G. Werk" egw#netguide.dk.

    -

    Added adodb-session.php for session support.

    -

    0.80 30 Nov 2000

    -

    Added support for charSet for interbase. Implemented MetaTables for most databases. - PostgreSQL more extensively tested.

    -

    0.71 22 Nov 2000

    -

    Switched from using require_once to include/include_once for backward compatability with PHP 4.02 and earlier.

    -

    0.70 15 Nov 2000

    -

    Calls by reference have been removed (call_time_pass_reference=Off) to ensure compatibility with future versions of PHP, -except in Oracle 7 driver due to a bug in php_oracle.dll.

    -

    PostgreSQL database driver contributed by Alberto Cerezal (acerezalp#dbnet.es). -

    -

    Oci8 driver for Oracle 8 contributed by George Fourlanos (fou#infomap.gr).

    -

    Added mysqlt database driver to support MySQL 3.23 which has transaction - support.

    -

    Oracle default date format (DD-MON-YY) did not match ADOdb default date format (which is YYYY-MM-DD). Use ALTER SESSION to force the default date.

    -

    Error message checking is now included in test suite.

    -

    MoveNext() did not check EOF properly -- fixed.

    -

    0.60 Nov 8 2000

    -

    Fixed some constructor bugs in ODBC and ADO. Added ErrorNo function to ADOConnection - class.

    -

    0.51 Oct 18 2000

    -

    Fixed some interbase bugs.

    -

    0.50 Oct 16 2000

    -

    Interbase commit/rollback changed to be compatible with PHP 4.03.

    -

    CommitTrans( ) will now return true if transactions not supported.

    -

    Conversely RollbackTrans( ) will return false if transactions not supported. -

    -

    0.46 Oct 12

    -Many Oracle compatibility issues fixed. -

    0.40 Sept 26

    -

    Many bug fixes

    -

    Now Code for BeginTrans, CommitTrans and RollbackTrans is working. So is the Affected_Rows -and Insert_ID. Added above functions to test.php.

    -

    ADO type handling was busted in 0.30. Fixed.

    -

    Generalised Move( ) so it works will all databases, including ODBC.

    -

    0.30 Sept 18

    -

    Renamed ADOLoadDB to ADOLoadCode. This is clearer.

    -

    Added BeginTrans, CommitTrans and RollbackTrans functions.

    -

    Added Affected_Rows() and Insert_ID(), _affectedrows() and _insertID(), ListTables(), - ListDatabases(), ListColumns().

    -

    Need to add New_ID() and hasInsertID and hasAffectedRows, autoCommit

    -

    0.20 Sept 12

    -

    Added support for Microsoft's ADO.

    -

    Added new field to ADORecordSet -- canSeek

    -

    Added new parameter to _fetch($ignore_fields = false). Setting to true will - not update fields array for faster performance.

    -

    Added new field to ADORecordSet/ADOConnection -- dataProvider to indicate whether - a class is derived from odbc or ado.

    -

    Changed class ODBCFieldObject to ADOFieldObject -- not documented currently.

    -

    Added benchmark.php and testdatabases.inc.php to the test suite.

    -

    Added to ADORecordSet FastForward( ) for future high speed scrolling. Not documented.

    -

    Realised that ADO's Move( ) uses relative positioning. ADOdb uses absolute. -

    -

    0.10 Sept 9 2000

    -

    First release

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/readme.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/readme.htm.svn-base deleted file mode 100755 index e2c0bb54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/readme.htm.svn-base +++ /dev/null @@ -1,68 +0,0 @@ - - -ADODB Manual - - - - - -

    ADOdb Library for PHP

    -

    ADOdb is a suite of database libraries that allow you to connect to multiple - databases in a portable manner. Download from http://adodb.sourceforge.net/. -

    • The ADOdb documentation has moved to docs-adodb.htm - This allows you to query, update and insert records using a portable API. -

    • The ADOdb data dictionary docs are at docs-datadict.htm. - This allows you to create database tables and indexes in a portable manner. -

    • The ADOdb database performance monitoring docs are at docs-perf.htm. - This allows you to perform health checks, tune and monitor your database. -

    • The ADOdb database-backed session docs are at docs-session.htm. -
    -

    -

    Installation

    -Make sure you are running PHP4.0.4 or later. Unpack all the files into a directory accessible by your webserver. -

    -To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly. You can debug using: -

    -<?php
    -include('adodb/adodb.inc.php');
    -
    -$db = ADONewConnection($driver); # eg. 'mysql' or 'oci8' 
    -$db->debug = true;
    -$db->Connect($server, $user, $password, $database);
    -$rs = $db->Execute('select * from some_small_table');
    -print "<pre>";
    -print_r($rs->GetRows());
    -print "</pre>";
    -?>
    -
    -

    How are people using ADOdb

    -Here are some examples of how people are using ADOdb: -
      -
    • PhpLens is a commercial data grid component that allows - both cool Web designers and serious unshaved programmers to develop and - maintain databases on the Web easily. Developed by the author of ADOdb. -
    • -
    • PHAkt: PHP Extension for DreamWeaver Ultradev allows - you to script PHP in the popular Web page editor. Database handling provided - by ADOdb.
    • -
    • Analysis Console for Intrusion Databases (ACID): PHP-based - analysis engine to search and process a database of security incidents - generated by security-related software such as IDSes and firewalls (e.g. - Snort, ipchains). By Roman Danyliw.
    • -
    • PostNuke is a very popular free content management system - and weblog system. It offers full CSS support, HTML 4.01 transitional - compliance throughout, an advanced blocks system, and is fully multi-lingual - enabled.
    • -
    • EasyPublish CMS is another free content management system - for managing information and integrated modules on your internet, intranet- - and extranet-sites. From Norway.
    • -
    • NOLA is a full featured accounting, inventory, and job - tracking application. It is licensed under the GPL, and developed by Noguska. -
    • -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tips_portable_sql.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tips_portable_sql.htm.svn-base deleted file mode 100755 index d59a698f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tips_portable_sql.htm.svn-base +++ /dev/null @@ -1,367 +0,0 @@ - - - - - Tips on Writing Portable SQL for Multiple Databases for PHP - - - -

    Tips on Writing Portable SQL  

    -
    -

    Updated 6 Oct 2006. Added OffsetDate example. -

    Updated 18 Sep 2003. Added Portable Native SQL section. -

    - - If you are writing an application that is used in multiple environments and - operating systems, you need to plan to support multiple databases. This article - is based on my experiences with multiple database systems, stretching from 4th - Dimension in my Mac days, to the databases I currently use, which are: Oracle, - FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies - to using SQL with Perl, Python and other programming languages, I will focus on PHP and how - the ADOdb database abstraction library - offers some solutions.

    -

    Most database vendors practice product lock-in. The best or fastest way to - do things is often implemented using proprietary extensions to SQL. This makes - it extremely hard to write portable SQL code that performs well under all conditions. - When the first ANSI committee got together in 1984 to standardize SQL, the database - vendors had such different implementations that they could only agree on the - core functionality of SQL. Many important application specific requirements - were not standardized, and after so many years since the ANSI effort began, - it looks as if much useful database functionality will never be standardized. - Even though ANSI-92 SQL has codified much more, we still have to implement portability - at the application level.

    -

    Selects

    -

    The SELECT statement has been standardized to a great degree. Nearly every - database supports the following:

    -

    SELECT [cols] FROM [tables]
    -   [WHERE conditions]
    -   [GROUP BY cols]
    -   [HAVING conditions]
    -   [ORDER BY cols]

    -

    But so many useful techniques can only be implemented by using proprietary - extensions. For example, when writing SQL to retrieve the first 10 rows for - paging, you could write...

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    DatabaseSQL Syntax
    DB2select * from table fetch first 10 rows only
    Informixselect first 10 * from table
    Microsoft SQL Server and Accessselect top 10 * from table
    MySQL and PostgreSQLselect * from table limit 10
    Oracle 8iselect * from (select * from table) where rownum <= 10
    -

    This feature of getting a subset of data is so useful that in the PHP class - library ADOdb, we have a SelectLimit( ) function that allows you to hide the - implementation details within a function that will rewrite your SQL for you:

    -
    $connection->SelectLimit('select * from table', 10);
    -
    -

    Selects: Fetch Modes

    -

    PHP allows you to retrieve database records as arrays. You can choose to have - the arrays indexed by field name or number. However different low-level PHP - database drivers are inconsistent in their indexing efforts. ADOdb allows you - to determine your prefered mode. You set this by setting the variable $ADODB_FETCH_MODE - to either of the constants ADODB_FETCH_NUM (for numeric indexes) or ADODB_FETCH_ASSOC - (using field names as an associative index).

    -

    The default behaviour of ADOdb varies depending on the database you are using. - For consistency, set the fetch mode to either ADODB_FETCH_NUM (for speed) or - ADODB_FETCH_ASSOC (for convenience) at the beginning of your code.

    -

    Selects: Counting Records

    -

    Another problem with SELECTs is that some databases do not return the number - of rows retrieved from a select statement. This is because the highest performance - databases will return records to you even before the last record has been found. -

    -

    In ADOdb, RecordCount( ) returns the number of rows returned, or will emulate - it by buffering the rows and returning the count after all rows have been returned. - This can be disabled for performance reasons when retrieving large recordsets - by setting the global variable $ADODB_COUNTRECS = false. This variable is checked - every time a query is executed, so you can selectively choose which recordsets - to count.

    -

    If you prefer to set $ADODB_COUNTRECS = false, ADOdb still has the PO_RecordCount( - ) function. This will return the number of rows, or if it is not found, it will - return an estimate using SELECT COUNT(*):

    -
    $rs = $db->Execute("select * from table where state=$state");
    -$numrows = $rs->PO_RecordCount('table', "state=$state");
    -

    Selects: Locking

    -

    SELECT statements are commonly used to implement row-level locking of tables. - Other databases such as Oracle, Interbase, PostgreSQL and MySQL with InnoDB - do not require row-level locking because they use versioning to display data - consistent with a specific point in time.

    -

    Currently, I recommend encapsulating the row-level locking in a separate function, - such as RowLock($table, $where):

    -
    $connection->BeginTrans( );
    -$connection->RowLock($table, $where); 
    -
    # some operation
    -
    if ($ok) $connection->CommitTrans( );
    -else $connection->RollbackTrans( );
    -
    -

    Selects: Outer Joins

    -

    Not all databases support outer joins. Furthermore the syntax for outer joins - differs dramatically between database vendors. One portable (and possibly slower) - method of implementing outer joins is using UNION.

    -

    For example, an ANSI-92 left outer join between two tables t1 and t2 could - look like:

    -
    SELECT t1.col1, t1.col2, t2.cola 
    FROM t1 LEFT JOIN t2 ON t1.col = t2.col
    -

    This can be emulated using:

    -
    SELECT t1.col1, t1.col2, t2.cola FROM t1, t2 
    WHERE t1.col = t2.col - UNION ALL -SELECT col1, col2, null FROM t1
    WHERE t1.col not in (select distinct col from t2) -
    -

    Since ADOdb 2.13, we provide some hints in the connection object as to legal - join variations. This is still incomplete and sometimes depends on the database - version you are using, but is useful as a general guideline:

    -

    $conn->leftOuter: holds the - operator used for left outer joins (eg. '*='), or false if not known or not - available.
    - $conn->rightOuter: holds the - operator used for right outer joins (eg '=*'), or false if not known or not - available.
    - $conn->ansiOuter: boolean - that if true means that ANSI-92 style outer joins are supported, or false if - not known.

    -

    Inserts

    -

    When you create records, you need to generate unique id's for each record. - There are two common techniques: (1) auto-incrementing columns and (2) sequences. -

    -

    Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access - and SQL Server. However most other databases do not support this feature. So - for portability, you have little choice but to use sequences. Sequences are - special functions that return a unique incrementing number every time you call - it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function. - It has takes a parameter, the sequence name. Different tables can have different - sequences.

    -
    $id = $connection->GenID('sequence_name');
    $connection->Execute("insert into table (id, firstname, lastname)
    values ($id, $firstname, $lastname)");
    -

    For databases that do not support sequences natively, ADOdb emulates sequences - by creating a table for every sequence.

    -

    Binding

    -

    Binding variables in an SQL statement is another tricky feature. Binding is - useful because it allows pre-compilation of SQL. When inserting multiple records - into a database in a loop, binding can offer a 50% (or greater) speedup. However - many databases such as Access and MySQL do not support binding natively and - there is some overhead in emulating binding. Furthermore, different databases - (specificly Oracle!) implement binding differently. My recommendation is to - use binding if your database queries are too slow, but make sure you are using - a database that supports it like Oracle.

    -

    ADOdb supports portable Prepare/Execute with:

    -
    $stmt = $db->Prepare('select * from customers where custid=? and state=?');
    -$rs = $db->Execute($stmt, array($id,'New York'));
    -

    Oracle uses named bind placeholders, not "?", so to support portable binding, we have Param() that generates -the correct placeholder (available since ADOdb 3.92): -

    $sql = 'insert into table (col1,col2) values ('.$DB->Param('a').','.$DB->Param('b').')';
    -# generates 'insert into table (col1,col2) values (?,?)'
    -# or        'insert into table (col1,col2) values (:a,:b)'
    -$stmt = $DB->Prepare($sql);
    -$stmt = $DB->Execute($stmt,array('one','two'));
    -
    - -

    Portable Native SQL

    -

    ADOdb provides the following functions for portably generating SQL functions - as strings to be merged into your SQL statements (some are only available since - ADOdb 3.92):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FunctionDescription
    DBDate($date)Pass in a UNIX timestamp or ISO date and it will convert it to a date - string formatted for INSERT/UPDATE
    DBTimeStamp($date)Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp - string formatted for INSERT/UPDATE
    SQLDate($date, $fmt)Portably generate a date formatted using $fmt mask, for use in SELECT - statements.
    OffsetDate($date, $ndays)Portably generate a $date offset by $ndays.
    Concat($s1, $s2, ...)Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, - which allows || operator.
    IfNull($fld, $replaceNull)Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.
    Param($name)Generates bind placeholders, using ? or named conventions as appropriate.
    $db->sysDateProperty that holds the SQL function that returns today's date
    $db->sysTimeStampProperty that holds the SQL function that returns the current -timestamp (date+time). -
    $db->concat_operatorProperty that holds the concatenation operator -
    $db->lengthProperty that holds the name of the SQL strlen function. -
    $db->upperCaseProperty that holds the name of the SQL strtoupper function. -
    $db->randomProperty that holds the SQL to generate a random number between 0.00 and 1.00. -
    $db->substrProperty that holds the name of the SQL substring function. -
    -

     

    -

    DDL and Tuning

    -There are database design tools such as ERWin or Dezign that allow you to generate data definition language commands such as ALTER TABLE or CREATE INDEX from Entity-Relationship diagrams. -

    -However if you prefer to use a PHP-based table creation scheme, adodb provides you with this feature. Here is the code to generate the SQL to create a table with: -

      -
    1. Auto-increment primary key 'ID',
    2. -
    3. The person's 'NAME' VARCHAR(32) NOT NULL and defaults to '',
    4. -
    5. The date and time of record creation 'CREATED',
    6. -
    7. The person's 'AGE', defaulting to 0, type NUMERIC(16).
    8. -
    -

    -Also create a compound index consisting of 'NAME' and 'AGE': -

    -$datadict = NewDataDictionary($connection);
    -$flds = " 
    -  ID I AUTOINCREMENT PRIMARY,
    -  NAME C(32) DEFAULT '' NOTNULL,
    -  CREATED T DEFTIMESTAMP,
    -  AGE N(16) DEFAULT 0
    -";
    -$sql1 = $datadict->CreateTableSQL('tabname', $flds);
    -$sql2 = $datadict->CreateIndexSQL('idx_name_age', 'tabname', 'NAME,AGE');
    -
    - -

    Data Types

    -

    Stick to a few data types that are available in most databases. Char, varchar - and numeric/number are supported by most databases. Most other data types (including - integer, boolean and float) cannot be relied on being available. I recommend - using char(1) or number(1) to hold booleans.

    -

    Different databases have different ways of representing dates and timestamps/datetime. - ADOdb attempts to display all dates in ISO (YYYY-MM-DD) format. ADOdb also provides - DBDate( ) and DBTimeStamp( ) to convert dates to formats that are acceptable - to that database. Both functions accept Unix integer timestamps and date strings - in ISO format.

    -
    $date1 = $connection->DBDate(time( ));
    $date2 = $connection->DBTimeStamp('2002-02-23 13:03:33');
    -

    We also provide functions to convert database dates to Unix timestamps:

    -
    $unixts = $recordset->UnixDate('#2002-02-30#'); # MS Access date => unix timestamp
    -

    For date calculations, we have OffsetDate which allows you to calculate dates such as yesterday and next week in a RDBMS independant fashion. For example, if we want to set a field to 6 hour from now, use: -

    -$sql = 'update table set dtimefld='.$db->OffsetDate($db->sysTimeStamp, 6/24).' where ...';
    -
    -

    The maximum length of a char/varchar field is also database specific. You can - only assume that field lengths of up to 250 characters are supported. This is - normally impractical for web based forum or content management systems. You - will need to be familiar with how databases handle large objects (LOBs). ADOdb - implements two functions, UpdateBlob( ) and UpdateClob( ) that allow you to - update fields holding Binary Large Objects (eg. pictures) and Character Large - Objects (eg. HTML articles):

    -
    # for oracle 
    -$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1,empty_blob())'); 
    -$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1'); 
    -   
    -# non-oracle databases
    -$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); 
    -$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
    -
    -

    Null handling is another area where differences can occur. This is a mine-field, - because 3-value logic is tricky. -

    In general, I avoid using nulls except for dates and default all my numeric - and character fields to 0 or the empty string. This maintains consistency with - PHP, where empty strings and zero are treated as equivalent, and avoids SQL - ambiguities when you use the ANY and EXISTS operators. However if your database - has significant amounts of missing or unknown data, using nulls might be a good - idea. -

    - ADOdb also supports a portable IfNull function, so you can define what to display - if the field contains a null. -

    Stored Procedures

    -

    Stored procedures are another problem area. Some databases allow recordsets - to be returned in a stored procedure (Microsoft SQL Server and Sybase), and - others only allow output parameters to be returned. Stored procedures sometimes - need to be wrapped in special syntax. For example, Oracle requires such code - to be wrapped in an anonymous block with BEGIN and END. Also internal sql operators - and functions such as +, ||, TRIM( ), SUBSTR( ) or INSTR( ) vary between vendors. -

    -

    An example of how to call a stored procedure with 2 parameters and 1 return - value follows:

    -
    	switch ($db->databaseType) {
    -	case 'mssql':
    -	  $sql = 'SP_RUNSOMETHING'; break;
    -	case 'oci8':
    -	  $sql = 
    -	  "declare RETVAL integer;begin :RETVAL := SP_RUNSOMETHING(:myid,:group);end;";
    -	  break;
    -	default:
    -	  die('Unsupported feature');
    -	}
    -	# @RETVAL = SP_RUNSOMETHING @myid,@group
    -	$stmt = $db->PrepareSP($sql);	
    $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group'); - # true indicates output parameter
    $db->Parameter($stmt,$ret,'RETVAL',true); - $db->Execute($stmt);
    -

    As you can see, the ADOdb API is the same for both databases. But the stored - procedure SQL syntax is quite different between databases and is not portable, - so be forewarned! However sometimes you have little choice as some systems only - allow data to be accessed via stored procedures. This is when the ultimate portability - solution might be the only solution: treating portable SQL as a localization - exercise...

    -

    SQL as a Localization Exercise

    -

    In general to provide real portability, you will have to treat SQL coding - as a localization exercise. In PHP, it has become common to define separate - language files for English, Russian, Korean, etc. Similarly, I would suggest - you have separate Sybase, Intebase, MySQL, etc files, and conditionally include - the SQL based on the database. For example, each MySQL SQL statement would be - stored in a separate variable, in a file called 'mysql-lang.inc.php'.

    -
    $sqlGetPassword = 'select password from users where userid=%s';
    -$sqlSearchKeyword = "SELECT * FROM articles WHERE match (title,body) against (%s)";
    -

    In our main PHP file:

    -
    # define which database to load...
    -$database = 'mysql';
    -include_once("$database-lang.inc.php");
    -
    -$db = &NewADOConnection($database);
    -$db->PConnect(...) or die('Failed to connect to database');
    -
    -# search for a keyword $word
    -$rs = $db->Execute(sprintf($sqlSearchKeyWord,$db->qstr($word)));
    -

    Note that we quote the $word variable using the qstr( ) function. This is because - each database quotes strings using different conventions.

    -

    -

    Final Thoughts

    -

    The best way to ensure that you have portable SQL is to have your data tables designed using -sound principles. Learn the theory of normalization and entity-relationship diagrams and model -your data carefully. Understand how joins and indexes work and how they are used to tune performance. -

    Visit the following page for more references on database theory and vendors: - http://php.weblogs.com/sql_tutorial. - Also read this article on Optimizing PHP. -

    -(c) 2002-2003 John Lim. - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tute.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tute.htm.svn-base deleted file mode 100755 index 3f2261e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/.svn/text-base/tute.htm.svn-base +++ /dev/null @@ -1,290 +0,0 @@ - - - - - Tutorial: Moving from MySQL to ADODB - - - -

    Tutorial: Moving from MySQL to ADODB

    - -
    		You say eether and I say eyether, 
    -		You say neether and I say nyther; 
    -		Eether, eyether, neether, nyther - 
    -		Let's call the whole thing off ! 
    -
    - You like potato and I like po-tah-to, - You like tomato and I like to-mah-to; - Potato, po-tah-to, tomato, to-mah-to - - Let's call the whole thing off ! -
    -

    I love this song, especially the version with Louis Armstrong and Ella singing - duet. It is all about how hard it is for two people in love to be compatible - with each other. It's about compromise and finding a common ground, and that's - what this article is all about. -

    PHP is all about creating dynamic web-sites with the least fuss and the most - fun. To create these websites we need to use databases to retrieve login information, - to splash dynamic news onto the web page and store forum postings. So let's - say we were using the popular MySQL database for this. Your company has done - such a fantastic job that the Web site is more popular than your wildest dreams. - You find that MySQL cannot scale to handle the workload; time to switch databases. -

    Unfortunately in PHP every database is accessed slightly differently. To connect - to MySQL, you would use mysql_connect(); when you decide to upgrade to - Oracle or Microsoft SQL Server, you would use ocilogon() or mssql_connect() - respectively. What is worse is that the parameters you use for the different - connect functions are different also.. One database says po-tato, the other - database says pota-to. Oh-oh. -

    Let's NOT call the whole thing off

    -

    A database wrapper library such as ADODB comes in handy when you need to ensure portability. It provides - you with a common API to communicate with any supported database so you don't have to call things off.

    - -

    ADODB stands for Active Data Objects DataBase (sorry computer guys are sometimes - not very original). ADODB currently supports MySQL, PostgreSQL, Oracle, Interbase, - Microsoft SQL Server, Access, FoxPro, Sybase, ODBC and ADO. You can download - ADODB from http://php.weblogs.com/adodb. -

    MySQL Example

    -

    The most common database used with PHP is MySQL, so I guess you should be familiar - with the following code. It connects to a MySQL server at localhost, - database mydb, and executes an SQL select statement. The results are - printed, one line per row. -

    $db = mysql_connect("localhost", "root", "password");
    -mysql_select_db("mydb",$db);
    -$result = mysql_query("SELECT * FROM employees",$db);
    -if ($result === false) die("failed"); 
    -while ($fields = mysql_fetch_row($result)) {
    - for ($i=0, $max=sizeof($fields); $i < $max; $i++) {
    -		print $fields[$i].' ';
    - }
    - print "<br>\n";
    -} 
    -
    -

    The above code has been color-coded by section. The first section is the connection - phase. The second is the execution of the SQL, and the last section is displaying - the fields. The while loop scans the rows of the result, while the for - loop scans the fields in one row.

    -

    Here is the equivalent code in ADODB

    -
     include("adodb.inc.php");
    - $db = NewADOConnection('mysql');
    - $db->Connect("localhost", "root", "password", "mydb");
    - $result = $db->Execute("SELECT * FROM employees");
    - if ($result === false) die("failed");  
    - while (!$result->EOF) {
    -	for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
    -		   print $result->fields[$i].' ';
    -	$result->MoveNext();
    -	print "<br>\n";
    - } 
    -

    -

    Now porting to Oracle is as simple as changing the second line to NewADOConnection('oracle'). - Let's walk through the code...

    -

    Connecting to the Database

    -

    -
    include("adodb.inc.php");
    -$db = NewADOConnection('mysql');
    -$db->Connect("localhost", "root", "password", "mydb");
    -

    The connection code is a bit more sophisticated than MySQL's because our needs - are more sophisticated. In ADODB, we use an object-oriented approach to managing - the complexity of handling multiple databases. We have different classes to - handle different databases. If you aren't familiar with object-oriented programing, - don't worry -- the complexity is all hidden away in the NewADOConnection() - function.

    -

    To conserve memory, we only load the PHP code specific to the database you - are connecting to. We do this by calling NewADOConnection(databasedriver). - Legal database drivers include mysql, mssql, oracle, oci8, postgres, sybase, - vfp, access, ibase and many others.

    -

    Then we create a new instance of the connection class by calling NewADOConnection(). - Finally we connect to the database using $db->Connect().

    -

    Executing the SQL

    -

    $result = $db->Execute("SELECT * - FROM employees");
    - if ($result === false) die("failed")
    ; -
    -

    -

    Sending the SQL statement to the server is straight forward. Execute() will - return a recordset object on successful execution. You should check $result - as we do above. -

    An issue that confuses beginners is the fact that we have two types of objects - in ADODB, the connection object and the recordset object. When do we use each? -

    The connection object ($db) is responsible for connecting to the database, - formatting your SQL and querying the database server. The recordset object ($result) - is responsible for retrieving the results and formatting the reply as text or - as an array. -

    The only thing I need to add is that ADODB provides several helper functions - for making INSERT and UPDATE statements easier, which we will cover in the Advanced - section. -

    Retrieving the Data
    -

    -
    while (!$result->EOF) {
    -   for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
    -	   print $result->fields[$i].' ';
    -   $result->MoveNext();
    -   print "<br>\n";
    -}
    -

    The paradigm for getting the data is that it's like reading a file. For every - line, we check first whether we have reached the end-of-file (EOF). While not - end-of-file, loop through each field in the row. Then move to the next line - (MoveNext) and repeat. -

    The $result->fields[] array is generated by the PHP database - extension. Some database extensions do not index the array by field name. - To force indexing by name - that is associative arrays - - use the $ADODB_FETCH_MODE global variable. -

    -	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
    -	$rs1 = $db->Execute('select * from table');
    -	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
    -	$rs2 = $db->Execute('select * from table');
    -	print_r($rs1->fields); // shows array([0]=>'v0',[1] =>'v1')
    -	print_r($rs2->fields); // shows array(['col1']=>'v0',['col2'] =>'v1')
    -
    -

    -As you can see in the above example, both recordsets store and use different fetch modes -based on the $ADODB_FETCH_MODE setting when the recordset was created by Execute().

    -

    ADOConnection

    -

    Object that performs the connection to the database, executes SQL statements - and has a set of utility functions for standardising the format of SQL statements - for issues such as concatenation and date formats.

    - -

    Other Useful Functions

    -

    $recordset->Move($pos) scrolls to that particular row. ADODB supports forward - scrolling for all databases. Some databases will not support backwards scrolling. - This is normally not a problem as you can always cache records to simulate backwards - scrolling. -

    $recordset->RecordCount() returns the number of records accessed by the - SQL statement. Some databases will return -1 because it is not supported. -

    $recordset->GetArray() returns the result as an array. -

    rs2html($recordset) is a function that is generates a HTML table based on the - $recordset passed to it. An example with the relevant lines in bold: -

       include('adodb.inc.php'); 
    -   include('tohtml.inc.php'); /* includes the rs2html function */
    -   $conn = &ADONewConnection('mysql'); 
    -   $conn->PConnect('localhost','userid','password','database');
    -   $rs = $conn->Execute('select * from table');
    -   rs2html($rs); /* recordset to html table */ 
    -

    There are many other helper functions that are listed in the documentation available at http://php.weblogs.com/adodb_manual. -

    Advanced Material

    -

    Inserts and Updates

    -

    Let's say you want to insert the following data into a database. -

    ID = 3
    - TheDate=mktime(0,0,0,8,31,2001) /* 31st August 2001 */
    - Note= sugar why don't we call it off -

    When you move to another database, your insert might no longer work.

    -

    The first problem is that each database has a different default date format. - MySQL expects YYYY-MM-DD format, while other databases have different defaults. - ADODB has a function called DBDate() that addresses this issue by converting - converting the date to the correct format.

    -

    The next problem is that the don't in the Note needs to be quoted. In - MySQL, we use don\'t but in some other databases (Sybase, Access, Microsoft - SQL Server) we use don''t. The qstr() function addresses this issue.

    -

    So how do we use the functions? Like this:

    -
    $sql = "INSERT INTO table (id, thedate,note) values (" 
    -   . $ID . ','
    -   . $db->DBDate($TheDate) .','
    -   . $db->qstr($Note).")";
    -$db->Execute($sql);
    -

    ADODB also supports $connection->Affected_Rows() (returns the - number of rows affected by last update or delete) and $recordset->Insert_ID() - (returns last autoincrement number generated by an insert statement). Be forewarned - that not all databases support the two functions.
    -

    -

    MetaTypes

    -

    You can find out more information about each of the fields (I use the words - fields and columns interchangebly) you are selecting by calling the recordset - method FetchField($fieldoffset). This will return an object with - 3 properties: name, type and max_length. -

    For example:
    -
    $recordset = $conn->Execute("select adate from table");
    $f0 = $recordset->FetchField(0); -
    -

    Then $f0->name will hold 'adata', $f0->type - will be set to 'date'. If the max_length is unknown, it will be set to - -1. -

    One problem with handling different databases is that each database often calls - the same type by a different name. For example a timestamp type is called - datetime in one database and time in another. So ADODB has a special - MetaType($type, $max_length) function that standardises the types - to the following: -

    C: character and varchar types
    - X: text or long character (eg. more than 255 bytes wide).
    - B: blob or binary image
    - D: date
    - T: timestamp
    - L: logical (boolean)
    - I: integer
    - N: numeric (float, double, money) -

    In the above date example, -

    $recordset = $conn->Execute("select adate from table");
    - $f0 = $recordset->FetchField(0);
    - $type = $recordset->MetaType($f0->type, $f0->max_length);
    - print $type; /* should print 'D'
    */ -

    -

    Select Limit and Top Support -

    ADODB has a function called $connection->SelectLimit($sql,$nrows,$offset) that allows -you to retrieve a subset of the recordset. This will take advantage of native -SELECT TOP on Microsoft products and SELECT ... LIMIT with PostgreSQL and MySQL, and -emulated if the database does not support it. -

    Caching Support -

    ADODB allows you to cache recordsets in your file system, and only requery the database -server after a certain timeout period with $connection->CacheExecute($secs2cache,$sql) and -$connection->CacheSelectLimit($secs2cache,$sql,$nrows,$offset). -

    PHP4 Session Handler Support -

    ADODB also supports PHP4 session handlers. You can store your session variables - in a database for true scalability using ADODB. For further information, visit - http://php.weblogs.com/adodb-sessions -

    Commercial Use Encouraged

    -

    If you plan to write commercial PHP applications that you want to resell, you should consider ADODB. It has been released using the lesser GPL, which means you can legally include it in commercial applications, while keeping your code proprietary. Commercial use of ADODB is strongly encouraged! We are using it internally for this reason.

    - -

    Conclusion

    -

    As a thank you for finishing this article, here are the complete lyrics for - let's call the whole thing off.
    -
    -

    -   Refrain 
    -
    - You say eether and I say eyether, - You say neether and I say nyther; - Eether, eyether, neether, nyther - - Let's call the whole thing off ! -
    - You like potato and I like po-tah-to, - You like tomato and I like to-mah-to; - Potato, po-tah-to, tomato, to-mah-to - - Let's call the whole thing off ! -
    -But oh, if we call the whole thing off, then we must part. -And oh, if we ever part, then that might break my heart. -
    - So, if you like pajamas and I like pa-jah-mas, - I'll wear pajamas and give up pa-jah-mas. - For we know we - Need each other, so we - Better call the calling off off. - Let's call the whole thing off ! -
    - Second Refrain -
    - You say laughter and I say lawfter, - You say after and I say awfter; - Laughter, lawfter, after, awfter - - Let's call the whole thing off ! -
    - You like vanilla and I like vanella, - You, sa's'parilla and I sa's'parella; - Vanilla, vanella, choc'late, strawb'ry - - Let's call the whole thing off ! -
    -But oh, if we call the whole thing off, then we must part. -And oh, if we ever part, then that might break my heart. -
    - So, if you go for oysters and I go for ersters, - I'll order oysters and cancel the ersters. - For we know we - Need each other, so we - Better call the calling off off. - Let's call the whole thing off ! -
    -

    Song and lyrics by George and Ira Gershwin, introduced by Fred Astaire and Ginger Rogers -in the film "Shall We Dance?"

    -

    -(c)2001-2002 John Lim. - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-active-record.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-active-record.htm deleted file mode 100755 index 531894de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-active-record.htm +++ /dev/null @@ -1,541 +0,0 @@ - - -ADOdb Active Record - -

    ADOdb Active Record

    -

    (c) 2000-2007 John Lim (jlim#natsoft.com)

    -

    This software is dual licensed using BSD-Style and LGPL. This - means you can use it in compiled proprietary and commercial products.

    -


    -
      - -

    1. Introduction
    2. -

      -ADOdb_Active_Record is an Object Relation Mapping (ORM) implementation using PHP. In an ORM system, the tables and rows of the database are abstracted into native PHP objects. This allows the programmer to focus more on manipulating the data and less on writing SQL queries. -

      -This implementation differs from Zend Framework's implementation in the following ways: -

        -
      • Works with PHP4 and PHP5 and provides equivalent functionality in both versions of PHP.

        -

      • ADOdb_Active_Record works when you are connected to multiple databases. Zend's only works when connected to a default database.

        -

      • Support for $ADODB_ASSOC_CASE. The field names are upper-cased, lower-cased or left in natural case depending on this setting.

        -

      • No field name conversion to camel-caps style, unlike Zend's implementation which will convert field names such as 'first_name' to 'firstName'.

        -

      • NewADOConnection::GetActiveRecords() and ADOConnection::GetActiveRecordsClass() functions in adodb.inc.php.

        -

      • Caching of table metadata so it is only queried once per table, no matter how many Active Records are created.

        -

      • The additional functionality is described below. -
      -

      -ADOdb_Active_Record is designed upon the principles of the "ActiveRecord" design pattern, which was first described by Martin Fowler. The ActiveRecord pattern has been implemented in many forms across the spectrum of programming languages. ADOdb_Active_Record attempts to represent the database as closely to native PHP objects as possible. -

      -ADOdb_Active_Record maps a database table to a PHP class, and each instance of that class represents a table row. Relations between tables can also be defined, allowing the ADOdb_Active_Record objects to be nested. -

      - -

    3. Setting the Database Connection
    4. -

      -The first step to using ADOdb_Active_Record is to set the default connection that an ADOdb_Active_Record objects will use to connect to a database. - -

      -require_once('adodb/adodb-active-record.inc.php');
      -
      -$db = NewADOConnection('mysql://root:pwd@localhost/dbname');
      -ADOdb_Active_Record::SetDatabaseAdapter($db);
      -
      - -

    5. Table Rows as Objects
    6. -

      -First, let's create a temporary table in our MySQL database that we can use for demonstrative purposes throughout the rest of this tutorial. We can do this by sending a CREATE query: - -

      -$db->Execute("CREATE TEMPORARY TABLE `persons` (
      -                `id` int(10) unsigned NOT NULL auto_increment,
      -                `name_first` varchar(100) NOT NULL default '',
      -                `name_last` varchar(100) NOT NULL default '',
      -                `favorite_color` varchar(100) NOT NULL default '',
      -                PRIMARY KEY  (`id`)
      -            ) ENGINE=MyISAM;
      -           ");
      - 
      -

      -ADOdb_Active_Record's are object representations of table rows. Each table in the database is represented by a class in PHP. To begin working with a table as a ADOdb_Active_Record, a class that extends ADOdb_Active_Records needs to be created for it. - -

      -class Person extends ADOdb_Active_Record{}
      -$person = new Person();
      -
      - -

      -In the above example, a new ADOdb_Active_Record object $person was created to access the "persons" table. Zend_Db_DataObject takes the name of the class, pluralizes it (according to American English rules), and assumes that this is the name of the table in the database. -

      -This kind of behavior is typical of ADOdb_Active_Record. It will assume as much as possible by convention rather than explicit configuration. In situations where it isn't possible to use the conventions that ADOdb_Active_Record expects, options can be overridden as we'll see later. - -

    7. Table Columns as Object Properties
    8. -

      -When the $person object was instantiated, ADOdb_Active_Record read the table metadata from the database itself, and then exposed the table's columns (fields) as object properties. -

      -Our "persons" table has three fields: "name_first", "name_last", and "favorite_color". Each of these fields is now a property of the $person object. To see all these properties, use the ADOdb_Active_Record::getAttributeNames() method: -

      -var_dump($person->getAttributeNames());
      -
      -/**
      - * Outputs the following:
      - * array(4) {
      - *    [0]=>
      - *    string(2) "id"
      - *    [1]=>
      - *    string(9) "name_first"
      - *    [2]=>
      - *    string(8) "name_last"
      - *    [3]=>
      - *    string(13) "favorite_color"
      - *  }
      - */
      -    
      -

      -One big difference between ADOdb and Zend's implementation is we do not automatically convert to camelCaps style. -

      -

    9. Inserting and Updating a Record
    10. - -An ADOdb_Active_Record object is a representation of a single table row. However, when our $person object is instantiated, it does not reference any particular row. It is a blank record that does not yet exist in the database. An ADOdb_Active_Record object is considered blank when its primary key is NULL. The primary key in our persons table is "id". -

      -To insert a new record into the database, change the object's properties and then call the ADOdb_Active_Record::save() method: -

      -$person = new Person();
      -$person->nameFirst = 'Andi';
      -$person->nameLast  = 'Gutmans';
      -$person->save();
      - 
      -

      -Oh, no! The above code snippet does not insert a new record into the database. Instead, outputs an error: -

      -1048: Column 'name_first' cannot be null
      - 
      -

      -This error occurred because MySQL rejected the INSERT query that was generated by ADOdb_Active_Record. If exceptions are enabled in ADOdb and you are using PHP5, an error will be thrown. In the definition of our table, we specified all of the fields as NOT NULL; i.e., they must contain a value. -

      -ADOdb_Active_Records are bound by the same contraints as the database tables they represent. If the field in the database cannot be NULL, the corresponding property in the ADOdb_Active_Record also cannot be NULL. In the example above, we failed to set the property $person->favoriteColor, which caused the INSERT to be rejected by MySQL. -

      -To insert a new ADOdb_Active_Record in the database, populate all of ADOdb_Active_Record's properties so that they satisfy the constraints of the database table, and then call the save() method: -

      -/**
      - * Calling the save() method will successfully INSERT
      - * this $person into the database table.
      - */
      -$person = new Person();
      -$person->name_first     = 'Andi';
      -$person->name_last      = 'Gutmans';
      -$person->favorite_color = 'blue';
      -$person->save();
      -
      -

      -Once this $person has been INSERTed into the database by calling save(), the primary key can now be read as a property. Since this is the first row inserted into our temporary table, its "id" will be 1: -

      -var_dump($person->id);
      -
      -/**
      - * Outputs the following:
      - * string(1)
      - */
      - 
      -

      -From this point on, updating it is simply a matter of changing the object's properties and calling the save() method again: - -

      -$person->favorite_color = 'red';
      -$person->save();
      -   
      -

      -The code snippet above will change the favorite color to red, and then UPDATE the record in the database. - - -

      ADOdb Specific Functionality

      -

    11. Setting the Table Name
    12. -

      The default behaviour on creating an ADOdb_Active_Record is to "pluralize" the class name and - use that as the table name. Often, this is not the case. For example, the Person class could be reading - from the "People" table. -

      We provide two ways to define your own table: -

      1. Use a constructor parameter to override the default table naming behaviour. -

      -	class Person extends ADOdb_Active_Record{}
      -	$person = new Person('People');
      -
      -

      2. Define it in a class declaration: -

      -	class Person extends ADOdb_Active_Record
      -	{
      -	var $_table = 'People';
      -	}
      -	$person = new Person();
      -
      - -

    13. $ADODB_ASSOC_CASE
    14. -

      This allows you to control the case of field names and properties. For example, all field names in Oracle are upper-case by default. So you -can force field names to be lowercase using $ADODB_ASSOC_CASE. Legal values are as follows: -

      - 0: lower-case
      - 1: upper-case
      - 2: native-case
      -
      -

      So to force all Oracle field names to lower-case, use -

      -$ADODB_ASSOC_CASE = 0;
      -$person = new Person('People');
      -$person->name = 'Lily';
      -$ADODB_ASSOC_CASE = 2;
      -$person2 = new Person('People');
      -$person2->NAME = 'Lily'; 
      -
      - -

      Also see $ADODB_ASSOC_CASE. - -

    15. ADOdb_Active_Record::Save()
    16. -

      -Saves a record by executing an INSERT or UPDATE SQL statement as appropriate. -

      Returns false on unsuccessful INSERT, true if successsful INSERT. -

      Returns 0 on failed UPDATE, and 1 on UPDATE if data has changed, and -1 if no data was changed, so no UPDATE statement was executed. - -

    17. ADOdb_Active_Record::Replace()
    18. -

      -ADOdb supports replace functionality, whereby the record is inserted if it does not exists, or updated otherwise. -

      -$rec = new ADOdb_Active_Record("product");
      -$rec->name = 'John';
      -$rec->tel_no = '34111145';
      -$ok = $rec->replace(); // 0=failure, 1=update, 2=insert
      -
      - - -

    19. ADOdb_Active_Record::Load($where)
    20. -

      Sometimes, we want to load a single record into an Active Record. We can do so using: -

      -$person->load("id=3");
      -
      -// or using bind parameters
      -
      -$person->load("id=?", array(3));
      -
      -

      Returns false if an error occurs. - -

    21. ADOdb_Active_Record::Find($whereOrderBy, $bindarr=false, $pkeyArr=false)
    22. -

      We want to retrieve an array of active records based on some search criteria. For example: -

      -class Person extends ADOdb_Active_Record {
      -var $_table = 'people';
      -}
      -
      -$person = new Person();
      -$peopleArray =& $person->Find("name like ? order by age", array('Sm%'));
      -
      - -

    23. Error Handling and Debugging
    24. -

      -In PHP5, if adodb-exceptions.inc.php is included, then errors are thrown. Otherwise errors are handled by returning a value. False by default means an error has occurred. You can get the last error message using the ErrorMsg() function. -

      -To check for errors in ADOdb_Active_Record, do not poll ErrorMsg() as the last error message will always be returned, even if it occurred several operations ago. Do this instead: -

      -# right!
      -$ok = $rec->Save();
      -if (!$ok) $err = $rec->ErrorMsg();
      -
      -# wrong :(
      -$rec->Save();
      -if ($rec->ErrorMsg()) echo "Wrong way to detect error";
      -
      -

      The ADOConnection::Debug property is obeyed. So -if $db->debug is enabled, then ADOdb_Active_Record errors are also outputted to standard output and written to the browser. - -

    25. ADOdb_Active_Record::Set()
    26. -

      You can convert an array to an ADOdb_Active_Record using Set(). The array must be numerically indexed, and have all fields of the table defined in the array. The elements of the array must be in the table's natural order too. -

      -$row = $db->GetRow("select * from tablex where id=$id");
      -
      -# PHP4 or PHP5 without enabling exceptions
      -$obj =& new ADOdb_Active_Record('Products');
      -if ($obj->ErrorMsg()){
      -	echo $obj->ErrorMsg();
      -} else {
      -	$obj->Set($row);
      -}
      -
      -# in PHP5, with exceptions enabled:
      -
      -include('adodb-exceptions.inc.php');
      -try {
      -	$obj =& new ADOdb_Active_Record('Products');
      -	$obj->Set($row);
      -} catch(exceptions $e) {
      -	echo $e->getMessage();
      -}
      -
      -

      -

    27. Primary Keys
    28. -

      -ADOdb_Active_Record does not require the table to have a primary key. You can insert records for such a table, but you will not be able to update nor delete. -

      Sometimes you are retrieving data from a view or table that has no primary key, but has a unique index. You can dynamically set the primary key of a table through the constructor, or using ADOdb_Active_Record::SetPrimaryKeys(): -

      -	$pkeys = array('category','prodcode');
      -	
      -	// set primary key using constructor
      -	$rec = new ADOdb_Active_Record('Products', $pkeys);
      -	
      -	 // or use method
      -	$rec->SetPrimaryKeys($pkeys);
      -
      - - -

    29. Retrieval of Auto-incrementing ID
    30. -When creating a new record, the retrieval of the last auto-incrementing ID is not reliable for databases that do not support the Insert_ID() function call (check $connection->hasInsertID). In this case we perform a SELECT MAX($primarykey) FROM $table, which will not work reliably in a multi-user environment. You can override the ADOdb_Active_Record::LastInsertID() function in this case. - -

    31. Dealing with Multiple Databases
    32. -

      -Sometimes we want to load data from one database and insert it into another using ActiveRecords. This can be done using the optional parameter of the ADOdb_Active_Record constructor. In the following example, we read data from db.table1 and store it in db2.table2: -

      -$db = NewADOConnection(...);
      -$db2 = NewADOConnection(...);
      -
      -ADOdb_Active_Record::SetDatabaseAdapter($db2);
      -
      -$activeRecs = $db->GetActiveRecords('table1');
      -
      -foreach($activeRecs as $rec) {
      -	$rec2 = new ADOdb_Active_Record('table2',$db2);
      -	$rec2->id = $rec->id;
      -	$rec2->name = $rec->name;
      -	
      -	$rec2->Save();
      -}
      -
      -

      -If you have to pass in a primary key called "id" and the 2nd db connection in the constructor, you can do so too: -

      -$rec = new ADOdb_Active_Record("table1",array("id"),$db2);
      -
      - -

    33. $ADODB_ACTIVE_CACHESECS
    34. -

      You can cache the table metadata (field names, types, and other info such primary keys) in $ADODB_CACHE_DIR (which defaults to /tmp) by setting -the global variable $ADODB_ACTIVE_CACHESECS to a value greater than 0. This will be the number of seconds to cache. - You should set this to a value of 30 seconds or greater for optimal performance. - -

    35. Active Record Considered Bad?
    36. -

      Although the Active Record concept is useful, you have to be aware of some pitfalls when using Active Record. The level of granularity of Active Record is individual records. It encourages code like the following, used to increase the price of all furniture products by 10%: -

      - $recs = $db->GetActiveRecords("Products","category='Furniture'");
      - foreach($recs as $rec) {
      -    $rec->price *= 1.1; // increase price by 10% for all Furniture products
      -    $rec->save();
      - }
      -
      -Of course a SELECT statement is superior because it's simpler and much more efficient (probably by a factor of x10 or more): -
      -   $db->Execute("update Products set price = price * 1.1 where category='Furniture'");
      -
      -

      Another issue is performance. For performance sensitive code, using direct SQL will always be faster than using Active Records due to overhead and the fact that all fields in a row are retrieved (rather than only the subset you need) whenever an Active Record is loaded. - -

    37. Transactions
    38. -

      -The default transaction mode in ADOdb is autocommit. So that is the default with active record too. -The general rules for managing transactions still apply. Active Record to the database is a set of insert/update/delete statements, and the db has no knowledge of active records. -

      -Smart transactions, that does an auto-rollback if an error occurs, is still the best method to multiple activities (inserts/updates/deletes) that need to be treated as a single transaction: -

      -$conn->StartTrans();
      -$parent->save();
      -$child->save();
      -$conn->CompleteTrans();
      -
      - -

      ADOConnection Supplement

      - -

    39. ADOConnection::GetActiveRecords()
    40. -

      -This allows you to retrieve an array of ADOdb_Active_Records. Returns false if an error occurs. -

      -$table = 'products';
      -$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
      -$activeRecArr = $db->GetActiveRecords($table, $whereOrderBy);
      -foreach($activeRecArr as $rec) {
      -	$rec->id = rand();
      -	$rec->save();
      -}
      -
      -

      -And to retrieve all records ordered by specific fields: -

      -$whereOrderBy = "1=1 ORDER BY Name";
      -$activeRecArr = $db->ADOdb_Active_Records($table);
      -
      -

      -To use bind variables (assuming ? is the place-holder for your database): -

      -$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
      -						array('A%'));
      -
      -

      You can also define the primary keys of the table by passing an array of field names: -

      -$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
      -						array('A%'), array('id'));
      -
      - -

    41. ADOConnection::GetActiveRecordsClass()
    42. -

      -This allows you to retrieve an array of objects derived from ADOdb_Active_Records. Returns false if an error occurs. -

      -class Product extends ADOdb_Active_Records{};
      -$table = 'products';
      -$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
      -$activeRecArr = $db->GetActiveRecordsClass('Product',$table, $whereOrderBy);
      -
      -# the objects in $activeRecArr are of class 'Product'
      -foreach($activeRecArr as $rec) {
      -	$rec->id = rand();
      -	$rec->save();
      -}
      -
      -

      -To use bind variables (assuming ? is the place-holder for your database): -

      -$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
      -						array('A%'));
      -
      -

      You can also define the primary keys of the table by passing an array of field names: -

      -$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
      -						array('A%'), array('id'));
      -
      - -
    - -

  • ADOConnection::ErrorMsg()
  • -

    Returns last error message. -

  • ADOConnection::ErrorNo()
  • -

    Returns last error number. -

    Code Sample

    -

    The following works with PHP4 and PHP5 -

    -include('../adodb.inc.php');
    -include('../adodb-active-record.inc.php');
    -
    -// uncomment the following if you want to test exceptions
    -#if (PHP_VERSION >= 5) include('../adodb-exceptions.inc.php');
    -
    -$db = NewADOConnection('mysql://root@localhost/northwind');
    -$db->debug=1;
    -ADOdb_Active_Record::SetDatabaseAdapter($db);
    -
    -$db->Execute("CREATE TEMPORARY TABLE `persons` (
    -                `id` int(10) unsigned NOT NULL auto_increment,
    -                `name_first` varchar(100) NOT NULL default '',
    -                `name_last` varchar(100) NOT NULL default '',
    -                `favorite_color` varchar(100) NOT NULL default '',
    -                PRIMARY KEY  (`id`)
    -            ) ENGINE=MyISAM;
    -           ");
    -		   
    -class Person extends ADOdb_Active_Record{}
    -$person = new Person();
    -
    -echo "<p>Output of getAttributeNames: ";
    -var_dump($person->getAttributeNames());
    -
    -/**
    - * Outputs the following:
    - * array(4) {
    - *    [0]=>
    - *    string(2) "id"
    - *    [1]=>
    - *    string(9) "name_first"
    - *    [2]=>
    - *    string(8) "name_last"
    - *    [3]=>
    - *    string(13) "favorite_color"
    - *  }
    - */
    -
    -$person = new Person();
    -$person->nameFirst = 'Andi';
    -$person->nameLast  = 'Gutmans';
    -$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
    -
    -
    -$person = new Person();
    -$person->name_first     = 'Andi';
    -$person->name_last      = 'Gutmans';
    -$person->favorite_color = 'blue';
    -$person->save(); // this save will perform an INSERT successfully
    -
    -echo "<p>The Insert ID generated:"; print_r($person->id);
    -
    -$person->favorite_color = 'red';
    -$person->save(); // this save() will perform an UPDATE
    -
    -$person = new Person();
    -$person->name_first     = 'John';
    -$person->name_last      = 'Lim';
    -$person->favorite_color = 'lavender';
    -$person->save(); // this save will perform an INSERT successfully
    -
    -// load record where id=2 into a new ADOdb_Active_Record
    -$person2 = new Person();
    -$person2->Load('id=2');
    -var_dump($person2);
    -
    -// retrieve an array of records
    -$activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2));
    -$person2 =& $activeArr[0];
    -echo "<p>Name first (should be John): ",$person->name_first, "<br>Class = ",get_class($person2);	
    -
    - -

    Todo (Code Contributions welcome)

    -

    Check _original and current field values before update, only update changes. Also if the primary key value is changed, then on update, we should save and use the original primary key values in the WHERE clause! -

    Handle 1-to-many relationships. -

    PHP5 specific: Make GetActiveRecords*() return an Iterator. -

    PHP5 specific: Change PHP5 implementation of Active Record to use __get() and __set() for better performance. - -

    Change Log

    -

    0.07 -

    $ADODB_ASSOC_CASE=2 did not work properly. Fixed. -

    Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter. - -

    0.06 -

    Added ErrorNo(). -

    Fixed php 5.2.0 compat issues. - -

    0.05 -

    If inserting a record and the value of a primary key field is null, then we do not insert that field in as -we assume it is an auto-increment field. Needed by mssql. - -

    0.04 5 June 2006
    -

    Added support for declaring table name in $_table in class declaration. Thx Bill Dueber for idea. -

    Added find($where,$bindarr=false) method to retrieve an array of active record objects. - -

    0.03
    -- Now we only update fields that have changed, using $this->_original.
    -- We do not include auto_increment fields in replace(). Thx Travis Cline
    -- Added ADODB_ACTIVE_CACHESECS.
    - -

    0.02
    -- Much better error handling. ErrorMsg() implemented. Throw implemented if adodb-exceptions.inc.php detected.
    -- You can now define the primary keys of the view or table you are accessing manually.
    -- The Active Record allows you to create an object which does not have a primary key. You can INSERT but not UPDATE in this case. -- Set() documented.
    -- Fixed _pluralize bug with y suffix. - -

    - 0.01 6 Mar 2006
    -- Fixed handling of nulls when saving (it didn't save nulls, saved them as '').
    -- Better error handling messages.
    -- Factored out a new method GetPrimaryKeys().
    -

    - 0.00 5 Mar 2006
    - 1st release - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-adodb.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-adodb.htm deleted file mode 100755 index f49d3792..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-adodb.htm +++ /dev/null @@ -1,3568 +0,0 @@ - -ADODB Manual - - - - - - - -

    ADOdb Library for PHP

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com)

    -

    This software is dual licensed using BSD-Style and LGPL. This - means you can use it in compiled proprietary and commercial products.

    - - -

    Useful ADOdb links: Download   Other Docs - -

    Introduction
    - Unique Features
    - How People are using ADOdb
    - Feature Requests and Bug Reports
    -
    Installation
    - Minimum Install
    - Initializing Code and Connectioning to Databases
    -
      Data Source Name (DSN) Support   Connection Examples
    - High Speed ADOdb - tuning tips
    - Hacking and Modifying ADOdb Safely
    - PHP5 Features

    - foreach iterators exceptions
    - Supported Databases
    - Tutorials
    - Example 1: Select
    - Example 2: Advanced Select
    - Example 3: Insert
    - Example 4: Debugging  rs2html - example
    - Example 5: MySQL and Menus
    - Example 6: Connecting to Multiple Databases at once
    - Example 7: Generating Update and Insert SQL
    - Example 8: Implementing Scrolling with Next and Previous
    - Example 9: Exporting in CSV or Tab-Delimited Format
    - Example 10: Custom filters
    - Example 11: Smart Transactions
    -
    - Using Custom Error Handlers and PEAR_Error
    - Data Source Names
    - Caching
    - Pivot Tables
    -

    REFERENCE -

    Variables: $ADODB_COUNTRECS -$ADODB_ANSI_PADDING_OFF - $ADODB_CACHE_DIR
    -         $ADODB_FORCE_TYPE - $ADODB_FETCH_MODE - $ADODB_LANG ADODB_QUOTE_FIELDNAMES
    - Constants:
    ADODB_ASSOC_CASE -
    - ADOConnection
    - Connections: Connect PConnect - NConnect IsConnected
    - Executing SQL: Execute CacheExecute - SelectLimit CacheSelectLimit - Param Prepare PrepareSP - InParameter OutParameter AutoExecute -
    -               GetOne - CacheGetOne GetRow CacheGetRow - GetAll CacheGetAll GetCol - CacheGetCol GetAssoc CacheGetAssoc Replace -
    -                ExecuteCursor - (oci8 only)
    - Generates SQL strings: GetUpdateSQL GetInsertSQL - Concat IfNull length random substr - qstr Param OffsetDate SQLDate - DBDate DBTimeStamp - BindDate BindTimeStamp -
    - Blobs: UpdateBlob UpdateClob - UpdateBlobFile BlobEncode - BlobDecode
    - Paging/Scrolling: PageExecute CachePageExecute
    - Cleanup: CacheFlush Close
    - Transactions: StartTrans CompleteTrans - FailTrans HasFailedTrans - BeginTrans CommitTrans - RollbackTrans SetTransactionMode
    - Fetching Data:
    SetFetchMode
    - Strings: concat length qstr quote substr
    - Dates: DBDate DBTimeStamp UnixDate - BindDate BindTimeStamp - UnixTimeStamp OffsetDate - SQLDate
    - Row Management: Affected_Rows Insert_ID RowLock - GenID CreateSequence DropSequence -
    - Error Handling: ErrorMsg ErrorNo - MetaError MetaErrorMsg IgnoreErrors
    - Data Dictionary (metadata): MetaDatabases MetaTables - MetaColumns MetaColumnNames - MetaPrimaryKeys MetaForeignKeys - ServerInfo
    - Statistics and Query-Rewriting: LogSQL fnExecute - and fnCacheExecute
    -
    Deprecated: Bind BlankRecordSet - Parameter -
    - ADORecordSet

    - - Returns one field: Fields
    - Returns one row:FetchRow FetchInto - FetchObject FetchNextObject - FetchObj FetchNextObj - GetRowAssoc
    - Returns all rows:GetArray GetRows - GetAssoc
    - Scrolling:Move MoveNext MoveFirst - MoveLast AbsolutePosition CurrentRow - AtFirstPage AtLastPage - AbsolutePage

    - Menu generation:GetMenu GetMenu2
    - Dates:UserDate UserTimeStamp - UnixDate UnixTimeStamp
    -
    Recordset Info:RecordCount PO_RecordCount - NextRecordSet
    - Field Info:FieldCount FetchField - MetaType
    - Cleanup: Close
    -

    -

    rs2html  example
    - Differences between ADOdb and ADO
    - Database Driver Guide
    -
    Change Log
    -

    -

    Introduction

    -

    PHP's database access functions are not standardised. This creates a need for - a database class library to hide the differences between the different database - API's (encapsulate the differences) so we can easily switch databases. PHP 4.0.5 or later - is now required (because we use array-based str_replace).

    -

    We currently support MySQL, Oracle, Microsoft SQL Server, Sybase, Sybase SQL Anywhere, Informix, - PostgreSQL, FrontBase, SQLite, Interbase (Firebird and Borland variants), Foxpro, Access, ADO, DB2, SAP DB and ODBC. - We have had successful reports of connecting to Progress and CacheLite via ODBC. We hope more people - will contribute drivers to support other databases.

    -

    PHP4 supports session variables. You can store your session information using - ADOdb for true portability and scalability. See adodb-session.php for more information.

    -

    Also read tips_portable_sql.htm - for tips on writing - portable SQL.

    -

    Unique Features of ADOdb

    -
      -
    • Easy for Windows programmers to adapt to because many of the conventions - are similar to Microsoft's ADO.
    • -
    • Unlike other PHP database classes which focus only on select statements, - we provide support code to handle inserts and updates which can be adapted - to multiple databases quickly. Methods are provided for date handling, - string concatenation and string quoting characters for differing databases.
    • -
    • A metatype system is built in so that we can figure out that types - such as CHAR, TEXT and STRING are equivalent in different databases.
    • -
    • Easy to port because all the database dependant code are stored in - stub functions. You do not need to port the core logic of the classes.
    • -
    • Portable table and index creation with the datadict classes. -
    • Database performance monitoring and SQL tuning with the performance monitoring classes. -
    • Database-backed sessions with the session management classes. Supports session expiry notification. -
    • Object-Relational Mapping using ADOdb_Active_Record classes. -
    -

    How People are using ADOdb

    -Here are some examples of how people are using ADOdb (for a much longer list, -visit adodb-cool-apps): -
      -
    • PhpLens is a commercial data grid -component that allows both cool Web designers and serious unshaved -programmers to develop and maintain databases on the Web easily. -Developed by the author of ADOdb.

      - -

    • PHAkt: PHP Extension for DreamWeaver Ultradev allows you to script PHP in the popular Web page editor. Database handling provided by ADOdb.

      - -

    • Analysis Console for Intrusion Databases -(ACID): PHP-based analysis engine to search and process a database of -security incidents generated by security-related software such as IDSes -and firewalls (e.g. Snort, ipchains). By Roman Danyliw.

      - -

    • PostNuke is a very -popular free content management system and weblog system. It offers -full CSS support, HTML 4.01 transitional compliance throughout, an -advanced blocks system, and is fully multi-lingual enabled.

      - -

    • EasyPublish CMS -is another free content management system for managing information and -integrated modules on your internet, intranet- and extranet-sites. From -Norway.

      - -

    • NOLA is a full featured accounting, inventory, and job tracking application. It is licensed under the GPL, and developed by Noguska. -

    - -

    Feature Requests and Bug Reports

    -

    Feature requests and bug reports can be emailed to jlim#natsoft.com.my - or posted to the ADOdb Help forums at http://phplens.com/lens/lensforum/topics.php?id=4.

    -

    Installation Guide

    -

    Make sure you are running PHP 4.0.5 or later. - Unpack all the files into a directory accessible by your webserver.

    -

    To test, try modifying some of the tutorial examples. Make sure you customize - the connection settings correctly. You can debug using $db->debug = true as shown below:

    -
    <?php
    include('adodb/adodb.inc.php');
    $db = ADONewConnection($dbdriver); # eg 'mysql' or 'postgres'
    $db->debug = true;
    $db->Connect($server, $user, $password, $database);
    $rs = $db->Execute('select * from some_small_table');
    print "<pre>";
    print_r($rs->GetRows());
    print "</pre>";
    ?>
    - -

    Minimum Install

    -

    For developers who want to release a minimal install of ADOdb, you will need: -

      -
    • adodb.inc.php -
    • adodb-lib.inc.php -
    • adodb-time.inc.php -
    • drivers/adodb-$database.inc.php -
    • license.txt (for legal reasons) -
    • adodb-php4.inc.php -
    • adodb-iterator.inc.php (php5 functionality) -
    -Optional: -
      -
    • adodb-error.inc.php and lang/adodb-$lang.inc.php (if you use MetaError()) -
    • adodb-csvlib.inc.php (if you use cached recordsets - CacheExecute(), etc) -
    • adodb-exceptions.inc.php and adodb-errorhandler.inc.php (if you use adodb error handler or php5 exceptions). -
    • adodb-active-record.inc.php if you use Active Records. -
    - -

    Code Initialization Examples

    -

    When running ADOdb, at least two files are loaded. First is adodb/adodb.inc.php, - which contains all functions used by all database classes. The code specific - to a particular database is in the adodb/driver/adodb-????.inc.php file.

    - -

    For example, to connect to a mysql database:

    -
    include('/path/to/set/here/adodb.inc.php');
    $conn = &ADONewConnection('mysql');
    -

    Whenever you need to connect to a database, you create a Connection object - using the ADONewConnection($driver) function. - NewADOConnection($driver) is an alternative name for the same function.

    - -

    At this point, you are not connected to the database (no longer true if you pass in a dsn). You will first need to decide -whether to use persistent or non-persistent connections. The advantage of persistent -connections is that they are faster, as the database connection is never closed (even -when you call Close()). Non-persistent connections take up much fewer resources though, -reducing the risk of your database and your web-server becoming overloaded. -

    For persistent connections, -use $conn->PConnect(), - or $conn->Connect() for non-persistent connections. -Some database drivers also support NConnect(), which forces -the creation of a new connection. - - -

    Connection Gotcha: If you create two connections, but both use the same userid and password, -PHP will share the same connection. This can cause problems if the connections are meant to -different databases. The solution is to always use different userid's for different databases, - or use NConnect(). - - -

    Data Source Name (DSN) Support

    -

    Since ADOdb 4.51, you can connect to a database by passing a dsn to NewADOConnection() (or ADONewConnection, which is - the same function). The dsn format is: -

    	$driver://$username:$password@hostname/$database?options[=value]

    -NewADOConnection() calls Connect() or PConnect() internally for you. If the connection fails, false is returned. -

    	# non-persistent connection
    -	$dsn = 'mysql://root:pwd@localhost/mydb'; 
    -	$db = NewADOConnection($dsn);
    -	if (!$db) die("Connection failed");   
    -	
    -	# no need to call connect/pconnect!
    -	$arr = $db->GetArray("select * from table");
    -	
    -	# persistent connection
    -	$dsn2 = 'mysql://root:pwd@localhost/mydb?persist'; 
    -
    -

    -If you have special characters such as /:?_ in your dsn, then you need to rawurlencode them first: -

    	$pwd = rawurlencode($pwd);
    $dsn = "mysql://root:$pwd@localhost/mydb"; - $dsn2=rawurlencode("sybase_ase")."://user:pass@host/path?query";
    -

    -Legal options are: -

    -
    For all drivers - 'persist', 'persistent', 'debug', 'fetchmode', 'new' -
    Interbase/Firebird - - 'dialect','charset','buffers','role' -
    M'soft ADO - 'charpage' - -
    MySQL - 'clientflags' -
    MySQLi - 'port', 'socket', 'clientflags' -
    Oci8 - 'nls_date_format','charset' -
    -

    -For all drivers, when the options persist or persistent are set, a persistent connection is forced; similarly, when new is set, then -a new connection will be created using NConnect if the underlying driver supports it. -The debug option enables debugging. The fetchmode calls SetFetchMode(). -If no value is defined for an option, then the value is set to 1. -

    -ADOdb DSN's are compatible with version 1.0 of PEAR DB's DSN format. - -

    Examples of Connecting to Databases

    -

    MySQL and Most Other Database Drivers

    -

    MySQL connections are very straightforward, and the parameters are identical - to mysql_connect:

    -
    	$conn = &ADONewConnection('mysql'); 
    $conn->PConnect('localhost','userid','password','database');

    # or dsn - $dsn = 'mysql://user:pwd@localhost/mydb'; - $conn = ADONewConnection($dsn); # no need for Connect() - - # or persistent dsn - $dsn = 'mysql://user:pwd@localhost/mydb?persist'; - $conn = ADONewConnection($dsn); # no need for PConnect() - - # a more complex example: - $pwd = urlencode($pwd); - $flags = MYSQL_CLIENT_COMPRESS; - $dsn = "mysql://user:$pwd@localhost/mydb?persist&clientflags=$flags"; - $conn = ADONewConnection($dsn); # no need for PConnect() -
    -

    For most drivers, you can use the standard function: Connect($server, $user, $password, $database), or -a DSN since ADOdb 4.51. Exceptions to this are listed below. -

    - -

    PDO

    -

    PDO, which only works with PHP5, accepts a driver specific connection string: -

    -	$conn =& NewADConnection('pdo');
    -	$conn->Connect('mysql:host=localhost',$user,$pwd,$mydb);
    -	$conn->Connect('mysql:host=localhost;dbname=mydb',$user,$pwd);
    -	$conn->Connect("mysql:host=localhost;dbname=mydb;username=$user;password=$pwd");
    -
    -

    The DSN mechanism is also supported: -

    -	$conn =& NewADConnection("pdo_mysql://user:pwd@localhost/mydb?persist"); # persist is optional
    -
    -

    PostgreSQL

    -

    PostgreSQL 7 and 8 accepts connections using:

    -

    a. the standard connection string:

    -
    	$conn = &ADONewConnection('postgres');  
    $conn->PConnect('host=localhost port=5432 dbname=mary');
    -

    b. the classical 4 parameters:

    -
    	$conn->PConnect('localhost','userid','password','database');
    -

    c. dsn: -

    	$dsn = 'postgres://user:pwd@localhost/mydb?persist';  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -
    - -

    LDAP

    -

    Here is an example of querying a LDAP server. Thanks to Josh Eldridge for the driver and this example: -

    -require('/path/to/adodb.inc.php');
    -
    -/* Make sure to set this BEFORE calling Connect() */
    -$LDAP_CONNECT_OPTIONS = Array(
    -	Array ("OPTION_NAME"=>LDAP_OPT_DEREF, "OPTION_VALUE"=>2),
    -	Array ("OPTION_NAME"=>LDAP_OPT_SIZELIMIT,"OPTION_VALUE"=>100),
    -	Array ("OPTION_NAME"=>LDAP_OPT_TIMELIMIT,"OPTION_VALUE"=>30),
    -	Array ("OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION,"OPTION_VALUE"=>3),
    -	Array ("OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER,"OPTION_VALUE"=>13),
    -	Array ("OPTION_NAME"=>LDAP_OPT_REFERRALS,"OPTION_VALUE"=>FALSE),
    -	Array ("OPTION_NAME"=>LDAP_OPT_RESTART,"OPTION_VALUE"=>FALSE)
    -);
    -$host = 'ldap.baylor.edu';
    -$ldapbase = 'ou=People,o=Baylor University,c=US';
    -
    -$ldap = NewADOConnection( 'ldap' );
    -$ldap->Connect( $host, $user_name='', $password='', $ldapbase );
    -
    -echo "<pre>";
    -
    -print_r( $ldap->ServerInfo() );
    -$ldap->SetFetchMode(ADODB_FETCH_ASSOC);
    -$userName = 'eldridge';
    -$filter="(|(CN=$userName*)(sn=$userName*)(givenname=$userName*)(uid=$userName*))";
    -
    -$rs = $ldap->Execute( $filter );
    -if ($rs)
    -	while ($arr = $rs->FetchRow()) {
    -	     print_r($arr);	
    -	}
    -
    -$rs = $ldap->Execute( $filter );
    -if ($rs) 
    -	while (!$rs->EOF) {
    - 		print_r($rs->fields);	
    -		$rs->MoveNext();
    -	} 
    -	
    -print_r( $ldap->GetArray( $filter ) );
    -print_r( $ldap->GetRow( $filter ) );
    -
    -$ldap->Close();
    -echo "</pre>";
    -
    -

    Using DSN: -

    -$dsn = "ldap://ldap.baylor.edu/ou=People,o=Baylor University,c=US";
    -$db = NewADOConnection($dsn);
    -
    -

    Interbase/Firebird

    -You define the database in the $host parameter: -
    	$conn = &ADONewConnection('ibase'); 
    $conn->PConnect('localhost:c:\ibase\employee.gdb','sysdba','masterkey');
    -

    Or dsn: -

    	$dsn = 'firebird://user:pwd@localhost/mydb?persist&dialect=3';  # persist is optional
    $conn = ADONewConnection($dsn); # no need for Connect/PConnect
    -

    SQLite

    -Sqlite will create the database file if it does not exist. -
    	$conn = &ADONewConnection('sqlite');
    -	$conn->PConnect('c:\path\to\sqlite.db'); # sqlite will create if does not exist
    -

    Or dsn: -

    	$path = urlencode('c:\path\to\sqlite.db');
    -	$dsn = "sqlite://$path/?persist";  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -

    Oracle (oci8)

    -

    With oci8, you can connect in multiple ways. Note that oci8 works fine with -newer versions of the Oracle, eg. 9i and 10g.

    -

    a. PHP and Oracle reside on the same machine, use default SID.

    -
    	$conn->Connect(false, 'scott', 'tiger');
    -

    b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS'

    -
    	$conn->PConnect(false, 'scott', 'tiger', 'myTNS');
    -

    or

    -
     	$conn->PConnect('myTNS', 'scott', 'tiger');
    -

    c. Host Address and SID

    -
    -	$conn->connectSID = true;
    -	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'SID');
    -

    d. Host Address and Service Name

    -
    	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'servicename');
    -

    e. Oracle connection string: -

    	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))
    (CONNECT_DATA=(SID=$sid)))";
    $conn->Connect($cstr, 'scott', 'tiger');
    -

    f. ADOdb dsn: -

    	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional
    $conn = ADONewConnection($dsn); # no need for Connect/PConnect

    $dsn = 'oci8://user:pwd@host/sid';
    $conn = ADONewConnection($dsn);

    $dsn = 'oci8://user:pwd@/'; # oracle on local machine
    $conn = ADONewConnection($dsn);
    -

    You can also set the charSet for Oracle 9.2 and later, supported since PHP 4.3.2, ADOdb 4.54: -

    	$conn->charSet = 'we8iso8859p1';
    $conn->Connect(...);

    # or
    $dsn = 'oci8://user:pwd@tnsname/?charset=WE8MSWIN1252';
    $db = ADONewConnection($dsn);
    - -

    DSN-less ODBC ( Access, MSSQL and DB2 examples)

    -

    ODBC DSN's can be created in the ODBC control panel, or you can use a DSN-less - connection.To use DSN-less connections with ODBC you need PHP 4.3 or later. -

    -

    For Microsoft Access:

    -
    	$db =& ADONewConnection('access');
    $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\\northwind.mdb;Uid=Admin;Pwd=;"; - $db->Connect($dsn); -
    -For Microsoft SQL Server: -
    	$db =& ADONewConnection('odbc_mssql');
    $dsn = "Driver={SQL Server};Server=localhost;Database=northwind;";
    $db->Connect($dsn,'userid','password');
    -or if you prefer to use the mssql extension (which is limited to mssql 6.5 functionality): -
    	$db =& ADONewConnection('mssql');
    $db->Execute('localhost', 'userid', 'password', 'northwind');
    -For DB2: -
    -	$dbms = 'db2'; # or 'odbc_db2' if db2 extension not available
    -	$db =& ADONewConnection($dbms);
    -	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP;".
    -				"uid=root; pwd=secret";
    $db->Connect($dsn); -
    -DSN-less Connections with ADO
    -If you are using versions of PHP earlier than PHP 4.3.0, DSN-less connections -only work with Microsoft's ADO, which is Microsoft's COM based API. An example -using the ADOdb library and Microsoft's ADO: -
    <?php
    include('adodb.inc.php');
    $db = &ADONewConnection("ado_mssql");
    print "<h1>Connecting DSN-less $db->databaseType...</h1>";

    $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};"
    . "SERVER=flipper;DATABASE=ai;UID=sa;PWD=;" ;
    - $db->Connect($myDSN); - - $rs = $db->Execute("select * from table"); - $arr = $rs->GetArray(); - print_r($arr); -?> -
    -

    High Speed ADOdb - tuning tips

    -

    ADOdb is a big class library, yet it consistently beats all other PHP class - libraries in performance. This is because it is designed in a layered fashion, - like an onion, with the fastest functions in the innermost layer. Stick to the - following functions for best performance:

    - - - - - - - -
    Innermost Layer

    Connect, PConnect, NConnect
    - Execute, CacheExecute
    - SelectLimit, CacheSelectLimit
    - MoveNext, Close
    - qstr, Affected_Rows, Insert_ID

    -

    The fastest way to access the field data is by accessing the array $recordset->fields - directly. Also set the global variables $ADODB_FETCH_MODE - = ADODB_FETCH_NUM, and (for oci8, ibase/firebird and odbc) $ADODB_COUNTRECS = false - before you connect to your database.

    -

    Consider using bind parameters if your database supports it, as it improves - query plan reuse. Use ADOdb's performance tuning system to identify bottlenecks - quickly. At the time of writing (Dec 2003), this means oci8 and odbc drivers.

    -

    Lastly make sure you have a PHP accelerator cache installed such as APC, Turck - MMCache, Zend Accelerator or ionCube.

    -

    Some examples:

    - -
    Fastest data retrieval using PHPFastest data retrieval using ADOdb extension
    -
    $rs =& $rs->Execute($sql);
    while (!$rs->EOF) {
    var_dump($rs->fields);
    $rs->MoveNext();
    }
    -
    $rs =& $rs->Execute($sql);
    $array = adodb_getall($rs);
    var_dump($array);


    -

    Advanced Tips -

    If you have the ADOdb C extension installed, - you can replace your calls to $rs->MoveNext() with adodb_movenext($rs). - This doubles the speed of this operation. For retrieving entire recordsets at once, -use GetArray(), which uses the high speed extension function adodb_getall($rs) internally. -

    Execute() is the default way to run queries. You can use the low-level functions _Execute() and _query() -to reduce query overhead. Both these functions share the same parameters as Execute(). -

    If you do not have any bind parameters or your database supports -binding (without emulation), -then you can call _Execute() directly. Calling this function bypasses -bind emulation. Debugging is still supported in _Execute(). -

    If you do not require debugging facilities nor emulated -binding, and do not require a recordset to be returned, then you can -call _query. This is great for inserts, updates and deletes. Calling -this function -bypasses emulated binding, debugging, and recordset handling. Either -the resultid, true or false are returned by _query().

    For Informix, you can disable scrollable cursors with $db->cursorType = 0. -

    -

    Hacking ADOdb Safely

    -

    You might want to modify ADOdb for your own purposes. Luckily you can -still maintain backward compatibility by sub-classing ADOdb and using the $ADODB_NEWCONNECTION -variable. $ADODB_NEWCONNECTION allows you to override the behaviour of ADONewConnection(). -ADOConnection() checks for this variable and will call -the function-name stored in this variable if it is defined. -

    In the following example, new functionality for the connection object -is placed in the hack_mysql and hack_postgres7 classes. The recordset class naming convention -can be controlled using $rsPrefix. Here we set it to 'hack_rs_', which will make ADOdb use -hack_rs_mysql and hack_rs_postgres7 as the recordset classes. - - -

    class hack_mysql extends adodb_mysql {
    var $rsPrefix = 'hack_rs_';
    /* Your mods here */
    }

    class hack_rs_mysql extends ADORecordSet_mysql {
    /* Your mods here */
    }

    class hack_postgres7 extends adodb_postgres7 {
    var $rsPrefix = 'hack_rs_';
    /* Your mods here */
    }

    class hack_rs_postgres7 extends ADORecordSet_postgres7 {
    /* Your mods here */
    }

    $ADODB_NEWCONNECTION = 'hack_factory';

    function& hack_factory($driver)
    {
    if ($driver !== 'mysql' && $driver !== 'postgres7') return false;

    $driver = 'hack_'.$driver;
    $obj = new $driver();
    return $obj;
    }

    include_once('adodb.inc.php');
    -

    Don't forget to call the constructor of the parent class in -your constructor. If you want to use the default ADOdb drivers return -false in the above hack_factory() function. - -

    PHP5 Features

    - ADOdb 4.02 or later will transparently determine which version of PHP you are using. -If PHP5 is detected, the following features become available: -
      - -
    • PDO: PDO drivers are available. See the connection examples. Currently PDO drivers are - not as powerful as native drivers, and should be treated as experimental.

      - -
    • Foreach iterators: This is a very natural way of going through a recordset: -
      	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
      $rs = $db->Execute($sql);
      foreach($rs as $k => $row) {
      echo "r1=".$row[0]." r2=".$row[1]."<br>";
      }
      -

      - -

    • Exceptions: Just include adodb-exceptions.inc.php and you can now -catch exceptions on errors as they occur. -
      	include("../adodb-exceptions.inc.php"); 
      include("../adodb.inc.php");
      try {
      $db = NewADOConnection("oci8");
      $db->Connect('','scott','bad-password');
      } catch (exception $e) {
      var_dump($e);
      adodb_backtrace($e->gettrace());
      }
      -

      Note that reaching EOF is not considered an error nor an exception. -

    -

    Databases Supported

    -The name below is the value you pass to NewADOConnection($name) to create a connection object for that database. -

    -

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTestedDatabaseRecordCount() usablePrerequisitesOperating Systems
    accessBMicrosoft Access/Jet. You need to create an ODBC DSN.Y/NODBC Windows only
    adoB

    Generic ADO, not tuned for specific databases. Allows - DSN-less connections. For best performance, use an OLEDB provider. This - is the base class for all ado drivers.

    -

    You can set $db->codePage before connecting.

    ? depends on databaseADO or OLEDB providerWindows only
    ado_accessBMicrosoft Access/Jet using ADO. Allows DSN-less connections. - For best performance, use an OLEDB provider.Y/NADO or OLEDB providerWindows only
    ado_mssqlBMicrosoft SQL Server using ADO. Allows DSN-less connections. - For best performance, use an OLEDB provider.Y/NADO or OLEDB providerWindows only
    db2CUses PHP's db2-specific extension for better performance.Y/NDB2 CLI/ODBC interface

    Unix and Windows. Requires IBM DB2 Universal Database client.

    odbc_db2CConnects to DB2 using generic ODBC extension.Y/NDB2 CLI/ODBC interface

    Unix and Windows. Unix - install hints. I have had reports that the $host and $database params have to be reversed in Connect() when using the CLI interface.

    vfpAMicrosoft Visual FoxPro. You need to create an ODBC DSN.Y/NODBCWindows only
    fbsqlCFrontBase. Y?

    Unix and Windows

    ibaseBInterbase 6 or earlier. Some users report you might need - to use this
    - $db->PConnect('localhost:c:/ibase/employee.gdb', "sysdba", "masterkey") - to connect. Lacks Affected_Rows currently.
    -
    - You can set $db->role, $db->dialect, $db->buffers and $db->charSet before connecting.
    Y/NInterbase clientUnix and Windows
    firebirdCFirebird version of interbase.Y/NInterbase clientUnix and Windows
    borland_ibaseCBorland version of Interbase 6.5 or later. Very sad that - the forks differ.Y/NInterbase clientUnix and Windows
    informixCGeneric informix driver. Use this if you are using Informix 7.3 or later.Y/NInformix clientUnix and Windows
    informix72C Informix databases before Informix 7.3 that do no support - SELECT FIRST.Y/NInformix clientUnix and Windows
    ldapCLDAP driver. See this example for usage information. LDAP extension?
    mssqlA

    Microsoft SQL Server 7 and later. Works - with Microsoft SQL Server 2000 also. Note that date formating is problematic - with this driver. For example, the PHP mssql extension does not return - the seconds for datetime!

    Y/NMssql client

    Unix and Windows.
    - Unix install - howto and another - one.

    mssqlpoA

    Portable mssql driver. Identical to above - mssql driver, except that '||', the concatenation operator, is converted - to '+'. Useful for porting scripts from most other sql variants that use - ||.

    Y/NMssql client

    Unix and Windows.
    - Unix install howto
    .

    mysqlAMySQL without transaction support. You can also set $db->clientFlags - before connecting.YMySQL clientUnix and Windows
    mysqlt or maxsqlA

    MySQL with transaction support. We recommend using - || as the concat operator for best portability. This can be done by running - MySQL using:
    - mysqld --ansi or mysqld --sql-mode=PIPES_AS_CONCAT

    Y/NMySQL clientUnix and Windows
    oci8AOracle 8/9. Has more functionality than oracle driver - (eg. Affected_Rows). You might have to putenv('ORACLE_HOME=...') before - Connect/PConnect.

    There are 2 ways of connecting - - with server IP and service name:
    - PConnect('serverip:1521','scott','tiger','service')
    - or using an entry in TNSNAMES.ORA or ONAMES or HOSTNAMES:
    - PConnect(false, 'scott', 'tiger', $oraname).
    -

    Since 2.31, we support Oracle REF cursor variables directly - (see ExecuteCursor).

    Y/NOracle clientUnix and Windows
    oci805CSupports reduced Oracle functionality for Oracle 8.0.5. - SelectLimit is not as efficient as in the oci8 or oci8po drivers.Y/NOracle clientUnix and Windows
    oci8poAOracle 8/9 portable driver. This is nearly identical with - the oci8 driver except (a) bind variables in Prepare() use the ? convention, - instead of :bindvar, (b) field names use the more common PHP convention - of lowercase names.

    Use this driver if porting - from other databases is important. Otherwise the oci8 driver offers better - performance.

    Y/NOracle clientUnix and Windows
    odbcAGeneric ODBC, not tuned for specific databases. To connect, - use
    - PConnect('DSN','user','pwd'). This is the base class for all odbc derived - drivers.
    ? depends on databaseODBCUnix and Windows. Unix - hints.
    odbc_mssqlCUses ODBC to connect to MSSQLY/NODBCUnix and Windows.
    odbc_oracleCUses ODBC to connect to OracleY/NODBCUnix and Windows.
    odbtpCGeneric odbtp driver. Odbtp is a software for - accessing Windows ODBC data sources from other operating systems.Y/NodbtpUnix and Windows
    odbtp_unicodeCOdtbp with unicode supportY/NodbtpUnix and Windows
    oracleCImplements old Oracle 7 client API. Use oci8 - driver if possible for better performance.Y/NOracle clientUnix and Windows
    netezzaCNetezza driver. Netezza is based on postgres code-base.Y??
    pdoCGeneric PDO driver for PHP5. YPDO extension and database specific driversUnix and Windows.
    postgresAGeneric PostgreSQL driver. Currently identical to postgres7 - driver.YPostgreSQL clientUnix and Windows.
    postgres64AFor PostgreSQL 6.4 and earlier which does not support LIMIT - internally.YPostgreSQL clientUnix and Windows.
    postgres7APostgreSQL which supports LIMIT and other version 7 functionality.YPostgreSQL clientUnix and Windows.
    postgres8APostgreSQL which supports version 8 functionality.YPostgreSQL clientUnix and Windows.
    sapdbCSAP DB. Should work reliably as based on ODBC driver.Y/NSAP ODBC client

    ?

    sqlanywhereCSybase SQL Anywhere. Should work reliably as based on ODBC - driver.Y/NSQL Anywhere ODBC client

    ?

    sqliteBSQLite.Y-

    Unix and Windows.

    sqlitepoBPortable SQLite driver. This is because assoc mode does not work like other drivers in sqlite. - Namely, when selecting (joining) multiple tables, the table - names are included in the assoc keys in the "sqlite" driver.

    - In "sqlitepo" driver, the table names are stripped from the returned column names. - When this results in a conflict, the first field get preference. -

    Y-

    Unix and Windows.

    sybaseCSybase. Y/NSybase client

    Unix and Windows.

    sybase_aseCSybase ASE. Y/NSybase client

    Unix and Windows.

    - -

    The "Tested" column indicates how extensively the code has been tested - and used.
    - A = well tested and used by many people
    - B = tested and usable, but some features might not be implemented
    - C = user contributed or experimental driver. Might not fully support all of - the latest features of ADOdb.

    -

    The column "RecordCount() usable" indicates whether RecordCount() - return the number of rows, or returns -1 when a SELECT statement is executed. - If this column displays Y/N then the RecordCount() is emulated when the global - variable $ADODB_COUNTRECS=true (this is the default). Note that for large recordsets, - it might be better to disable RecordCount() emulation because substantial amounts - of memory are required to cache the recordset for counting. Also there is a - speed penalty of 40-50% if emulation is required. This is emulated in most databases - except for PostgreSQL and MySQL. This variable is checked every time a query - is executed, so you can selectively choose which recordsets to count.

    -

    -


    -

    Tutorials

    -

    Example 1: Select Statement

    -

    Task: Connect to the Access Northwind DSN, display the first 2 columns of each - row.

    -

    In this example, we create a ADOConnection object, which represents the connection - to the database. The connection is initiated with PConnect, - which is a persistent connection. Whenever we want to query the database, we - call the ADOConnection.Execute() - function. This returns an ADORecordSet object which is actually a cursor that - holds the current row in the array fields[]. - We use MoveNext() - to move from row to row.

    -

    NB: A useful function that is not used in this example is SelectLimit, - which allows us to limit the number of rows shown. -

    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind DSN
    $recordSet = &$conn->Execute('select * from products');
    if (!$recordSet)
    print $conn->ErrorMsg();
    else
    while (!$recordSet->EOF) {
    print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';
    $recordSet->MoveNext();
    }
    - -$recordSet->Close(); # optional
    $conn->Close(); # optional
    -?> -
    -

    The $recordSet returned stores - the current row in the $recordSet->fields - array, indexed by column number (starting from zero). We use the MoveNext() - function to move to the next row. The EOF - property is set to true when end-of-file is reached. If an error occurs in Execute(), - we return false instead of a recordset.

    -

    The $recordSet->fields[] array is generated by the PHP database - extension. Some database extensions only index by number and do not index the - array by field name. To force indexing by name - that is associative arrays - - use the SetFetchMode function. Each recordset saves and uses whatever fetch - mode was set when the recordset was created in Execute() or SelectLimit(). -

    	$db->SetFetchMode(ADODB_FETCH_NUM);
    $rs1 = $db->Execute('select * from table');
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1') -
    -

    -

    To get the number of rows in the select statement, you can use $recordSet->RecordCount(). - Note that it can return -1 if the number of rows returned cannot be determined.

    -

    Example 2: Advanced Select with Field Objects

    -

    Select a table, display the first two columns. If the second column is a date - or timestamp, reformat the date to US format.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $recordSet = &$conn->Execute('select CustomerID,OrderDate from Orders');
    if (!$recordSet)
    print $conn->ErrorMsg();
    else
    while (!$recordSet->EOF) {
    $fld = $recordSet->FetchField(1); - $type = $recordSet->MetaType($fld->type);

    if ( $type == 'D' || $type == 'T')
    print $recordSet->fields[0].' '.
    $recordSet->UserDate($recordSet->fields[1],'m/d/Y').'<BR>';
    else - print $recordSet->fields[0].' '.$recordSet->fields[1].'<BR>';

    $recordSet->MoveNext();
    }
    -$recordSet->Close(); # optional
    $conn->Close(); # optional
    -?> -
    -

    In this example, we check the field type of the second column using FetchField(). - This returns an object with at least 3 fields.

    -
      -
    • name: name of column
    • -
    • type: native field type of column
    • -
    • max_length: maximum length of field. Some databases such as MySQL - do not return the maximum length of the field correctly. In these cases max_length - will be set to -1.
    • -
    -

    We then use MetaType() - to translate the native type to a generic type. Currently the following - generic types are defined:

    -
      -
    • C: character fields that should be shown in a <input type="text"> - tag.
    • -
    • X: TeXt, large text fields that should be shown in a <textarea>
    • -
    • B: Blobs, or Binary Large Objects. Typically images. -
    • D: Date field
    • -
    • T: Timestamp field
    • -
    • L: Logical field (boolean or bit-field)
    • -
    • I:  Integer field
    • -
    • N: Numeric field. Includes autoincrement, numeric, floating point, - real and integer.
    • -
    • R: Serial field. Includes serial, autoincrement integers. This works - for selected databases.
    • -
    -

    If the metatype is of type date or timestamp, then we print it using the user - defined date format with UserDate(), - which converts the PHP SQL date string format to a user defined one. Another - use for MetaType() - is data validation before doing an SQL insert or update.

    -

    Example 3: Inserting

    -

    Insert a row to the Orders table containing dates and strings that need to - be quoted before they can be accepted by the database, eg: the single-quote - in the word John's.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection

    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $shipto = $conn->qstr("John's Old Shoppe");

    $sql = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";
    $sql .= "values ('ANATR',2,".$conn->DBDate(time()).",$shipto)";

    if ($conn->Execute($sql) === false) {
    print 'error inserting: '.$conn->ErrorMsg().'<BR>';
    }
    ?>
    -

    In this example, we see the advanced date and quote handling facilities of - ADOdb. The unix timestamp (which is a long integer) is appropriately formated - for Access with DBDate(), - and the right escape character is used for quoting the John's Old Shoppe, - which is John''s Old Shoppe and not PHP's default John's - Old Shoppe with qstr(). -

    -

    Observe the error-handling of the Execute statement. False is returned by - Execute() if an error occured. The error message - for the last error that occurred is displayed in ErrorMsg(). - Note: php_track_errors might have to be enabled for error messages to - be saved.

    -

    Example 4: Debugging

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('access'); # create a connection
    $conn->PConnect('northwind'); # connect to MS-Access, northwind dsn
    $shipto = $conn->qstr("John's Old Shoppe");
    $sql = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";
    $sql .= "values ('ANATR',2,".$conn->FormatDate(time()).",$shipto)";
    $conn->debug = true; -if ($conn->Execute($sql) === false) print 'error inserting';
    -?> -
    -

    In the above example, we have turned on debugging by setting debug = true. - This will display the SQL statement before execution, and also show any error - messages. There is no need to call ErrorMsg() - in this case. For displaying the recordset, see the rs2html() - example.

    -

    Also see the section on Custom Error Handlers.

    -

    Example 5: MySQL and Menus

    -

    Connect to MySQL database agora, and generate a <select> menu - from an SQL statement where the <option> captions are in the 1st column, - and the value to send back to the server is in the 2nd column.

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->Execute($sql);
    print $rs->GetMenu('GetCust','Mary Rosli');
    ?>
    -

    Here we define a menu named GetCust, with the menu option 'Mary Rosli' selected. - See GetMenu(). - We also have functions that return the recordset as an array: GetArray(), - and as an associative array with the key being the first column: GetAssoc().

    -

    Example 6: Connecting to 2 Databases At Once

    -
    <?
    include('adodb.inc.php'); # load code common to ADOdb
    $conn1 = &ADONewConnection('mysql'); # create a mysql connection
    $conn2 = &ADONewConnection('oracle'); # create a oracle connection

    $conn1->PConnect($server, $userid, $password, $database);
    $conn2->PConnect(false, $ora_userid, $ora_pwd, $oraname);

    $conn1->Execute('insert ...');
    $conn2->Execute('update ...');
    ?>
    -

    -

    Example 7: Generating Update and Insert SQL

    -

    Since ADOdb 4.56, we support AutoExecute(), -which simplifies things by providing an advanced wrapper for GetInsertSQL() and GetUpdateSQL(). For example, -an INSERT can be carried out with: - -

    -    $record["firstname"] = "Bob"; 
    -    $record["lastname"] = "Smith"; 
    -    $record["created"] = time(); 
    -    $insertSQL = $conn->AutoExecute($rs, $record, 'INSERT'); 
    -
    - -and an UPDATE with: -
    -    $record["firstname"] = "Caroline"; 
    -    $record["lastname"] = "Smith"; # Update Caroline's lastname from Miranda to Smith 
    -    $insertSQL = $conn->AutoExecute($rs, $record, 'UPDATE', 'id = 1'); 
    -
    -

    -The rest of this section is out-of-date: -

    ADOdb 1.31 and later supports two new recordset functions: GetUpdateSQL( ) and -GetInsertSQL( ). This allow you to perform a "SELECT * FROM table query WHERE...", -make a copy of the $rs->fields, modify the fields, and then generate the SQL to -update or insert into the table automatically. -

    We show how the functions can be used when accessing a table with the following - fields: (ID, FirstName, LastName, Created). -

    Before these functions can be called, you need to initialize the recordset - by performing a select on the table. Idea and code by Jonathan Younger jyounger#unilab.com. - Since ADOdb 2.42, you can pass a table name instead of a recordset into -GetInsertSQL (in $rs), and it will generate an insert statement for that table. -

    -

    <?
    #==============================================
    # SAMPLE GetUpdateSQL() and GetInsertSQL() code
    #==============================================
    include('adodb.inc.php');
    include('tohtml.inc.php');

    #==========================
    # This code tests an insert

    $sql = "SELECT * FROM ADOXYZ WHERE id = -1";
    # Select an empty record from the database

    $conn = &ADONewConnection("mysql"); # create a connection
    $conn->debug=1;
    $conn->PConnect("localhost", "admin", "", "test"); # connect to MySQL, testdb
    $rs = $conn->Execute($sql); # Execute the query and get the empty recordset

    $record = array(); # Initialize an array to hold the record data to insert

    # Set the values for the fields in the record
    # Note that field names are case-insensitive
    $record["firstname"] = "Bob";
    $record["lastNamE"] = "Smith";
    $record["creaTed"] = time();

    # Pass the empty recordset and the array containing the data to insert
    # into the GetInsertSQL function. The function will process the data and return
    # a fully formatted insert sql statement.
    $insertSQL = $conn->GetInsertSQL($rs, $record);

    $conn->Execute($insertSQL); # Insert the record into the database

    #==========================
    # This code tests an update

    $sql = "SELECT * FROM ADOXYZ WHERE id = 1";
    # Select a record to update

    $rs = $conn->Execute($sql); # Execute the query and get the existing record to update

    $record = array(); # Initialize an array to hold the record data to update

    # Set the values for the fields in the record
    # Note that field names are case-insensitive
    $record["firstname"] = "Caroline";
    $record["LasTnAme"] = "Smith"; # Update Caroline's lastname from Miranda to Smith

    # Pass the single record recordset and the array containing the data to update
    # into the GetUpdateSQL function. The function will process the data and return
    # a fully formatted update sql statement with the correct WHERE clause.
    # If the data has not changed, no recordset is returned
    $updateSQL = $conn->GetUpdateSQL($rs, $record);

    $conn->Execute($updateSQL); # Update the record in the database
    $conn->Close();
    ?>
    - -$ADODB_FORCE_TYPE

    -The behaviour of AutoExecute(), GetUpdateSQL() and GetInsertSQL() -when converting empty or null PHP variables to SQL is controlled by the - global $ADODB_FORCE_TYPE variable. Set it to one of the values below. Default - is ADODB_FORCE_VALUE (3): -

    0 = ignore empty fields. All empty fields in array are ignored.
    1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values.
    2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values.
    3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and
    empty fields '' are set to empty '' sql values.

    define('ADODB_FORCE_IGNORE',0);
    define('ADODB_FORCE_NULL',1);
    define('ADODB_FORCE_EMPTY',2);
    define('ADODB_FORCE_VALUE',3);
    -

    -Thanks to Niko (nuko#mbnet.fi) for the $ADODB_FORCE_TYPE code. -

    -Note: the constant ADODB_FORCE_NULLS is obsolete since 4.52 and is ignored. Set $ADODB_FORCE_TYPE = ADODB_FORCE_NULL -for equivalent behaviour. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    Example 8: Implementing Scrolling with Next and Previous

    -

    The following code creates a very simple recordset pager, where you can scroll - from page to page of a recordset.

    -
    include_once('../adodb.inc.php');
    include_once('../adodb-pager.inc.php');
    session_start();

    $db = NewADOConnection('mysql');

    $db->Connect('localhost','root','','xphplens');

    $sql = "select * from adoxyz ";

    $pager = new ADODB_Pager($db,$sql);
    $pager->Render($rows_per_page=5);
    -

    This will create a basic record pager that looks like this: -

    - - - - - - - - - - -
    |<   << -   >>   >| -  
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDFirst NameLast NameDate Created
    36 Alan Turing Sat 06, Oct 2001 
    37 Serena Williams Sat 06, Oct 2001 
    38 Yat Sun Sun Sat 06, Oct 2001 
    39 Wai Hun See Sat 06, Oct 2001 
    40 Steven Oey Sat 06, Oct 2001 
    Page 8/10
    -

    The number of rows to display at one time is controled by the Render($rows) - method. If you do not pass any value to Render(), ADODB_Pager will default to - 10 records per page. -

    You can control the column titles by modifying your SQL (supported by most - databases): -

    $sql = 'select id as "ID", firstname as "First Name", 
    lastname as "Last Name", created as "Date Created"
    from adoxyz';
    -

    The above code can be found in the adodb/tests/testpaging.php example - included with this release, and the class ADODB_Pager in adodb/adodb-pager.inc.php. - The ADODB_Pager code can be adapted by a programmer so that the text links can - be replaced by images, and the dull white background be replaced with more interesting - colors. -

    You can also allow display of html by setting $pager->htmlSpecialChars = false. -

    Some of the code used here was contributed by Iván Oliva and Cornel - G.

    -

    Example 9: Exporting in CSV or Tab-Delimited Format

    -

    We provide some helper functions to export in comma-separated-value (CSV) and - tab-delimited formats:

    -
    include_once('/path/to/adodb/toexport.inc.php');
    include_once('/path/to/adodb/adodb.inc.php');
    -$db = &NewADOConnection('mysql');
    $db->Connect($server, $userid, $password, $database);

    $rs = $db->Execute('select fname as "First Name", surname as "Surname" from table');

    print "<pre>";
    print rs2csv($rs); # return a string, CSV format

    print '<hr>';

    $rs->MoveFirst(); # note, some databases do not support MoveFirst
    print rs2tab($rs,false); # return a string, tab-delimited
    # false == suppress field names in first line

    print '<hr>';
    $rs->MoveFirst();
    rs2tabout($rs); # send to stdout directly (there is also an rs2csvout function)
    print "</pre>";

    $rs->MoveFirst();
    $fp = fopen($path, "w");
    if ($fp) {
    rs2csvfile($rs, $fp); # write to file (there is also an rs2tabfile function)
    fclose($fp);
    }
    -

    Carriage-returns or newlines are converted to spaces. Field names are returned - in the first line of text. Strings containing the delimiter character are quoted - with double-quotes. Double-quotes are double-quoted again. This conforms to - Excel import and export guide-lines. -

    All the above functions take as an optional last parameter, $addtitles which - defaults to true. When set to false field names in the first line - are suppressed.
    -

    Example 10: Recordset Filters

    -

    Sometimes we want to pre-process all rows in a recordset before we use it. - For example, we want to ucwords all text in recordset. -

    include_once('adodb/rsfilter.inc.php');
    include_once('adodb/adodb.inc.php');

    // ucwords() every element in the recordset
    function do_ucwords(&$arr,$rs)
    {
    foreach($arr as $k => $v) {
    $arr[$k] = ucwords($v);
    }
    }

    $db = NewADOConnection('mysql');
    $db->PConnect('server','user','pwd','db');

    $rs = $db->Execute('select ... from table');
    $rs = RSFilter($rs,'do_ucwords');
    -

    The RSFilter function takes 2 parameters, the recordset, and the name - of the filter function. It returns the processed recordset scrolled to - the first record. The filter function takes two parameters, the current - row as an array, and the recordset object. For future compatibility, you should - not use the original recordset object.

    -

    Example 11: Smart Transactions

    -The old way of doing transactions required you to use -
    $conn->BeginTrans();
    $ok = $conn->Execute($sql);
    if ($ok) $ok = $conn->Execute($sql2);
    if (!$ok) $conn->RollbackTrans();
    else $conn->CommitTrans();
    -This is very complicated for large projects because you have to track the error -status. Smart Transactions is much simpler. You start a smart transaction by calling -StartTrans(): -
    $conn->StartTrans();
    $conn->Execute($sql);
    $conn->Execute($Sql2);
    $conn->CompleteTrans();
    -CompleteTrans() detects when an SQL error occurs, and will Rollback/Commit as -appropriate. To specificly force a rollback even if no error occured, use FailTrans(). -Note that the rollback is done in CompleteTrans(), and not in FailTrans(). -
    $conn->StartTrans();
    $conn->Execute($sql);
    if (!CheckRecords()) $conn->FailTrans();
    $conn->Execute($Sql2);
    $conn->CompleteTrans();
    -

    You can also check if a transaction has failed, using HasFailedTrans(), which - returns true if FailTrans() was called, or there was an error in the SQL execution. - Make sure you call HasFailedTrans() before you call CompleteTrans(), as it is - only works between StartTrans/CompleteTrans. -

    Lastly, StartTrans/CompleteTrans is nestable, and only the outermost block - is executed. In contrast, BeginTrans/CommitTrans/RollbackTrans is NOT nestable. -

    $conn->StartTrans();
    $conn->Execute($sql);
    $conn->StartTrans(); # ignored - if (!CheckRecords()) $conn->FailTrans(); - $conn->CompleteTrans(); # ignored -$conn->Execute($Sql2); -$conn->CompleteTrans();
    -

    Note: Savepoints are currently not supported. -

    Using Custom Error Handlers and PEAR_Error

    -

    ADOdb supports PHP5 exceptions. Just include adodb-exceptions.inc.php and you can now -catch exceptions on errors as they occur. -

    	include("../adodb-exceptions.inc.php"); 
    include("../adodb.inc.php");
    try {
    $db = NewADOConnection("oci8://scott:bad-password@mytns/");
    } catch (exception $e) {
    var_dump($e);
    adodb_backtrace($e->gettrace());
    }
    -

    ADOdb also provides two custom handlers which you can modify for your needs. The - first one is in the adodb-errorhandler.inc.php file. This makes use of - the standard PHP functions error_reporting - to control what error messages types to display, and trigger_error - which invokes the default PHP error handler. -

    Including the above file will cause trigger_error($errorstring,E_USER_ERROR) - to be called when
    - (a) Connect() or PConnect() fails, or
    - (b) a function that executes SQL statements such as Execute() or SelectLimit() - has an error.
    - (c) GenID() appears to go into an infinite loop. -

    The $errorstring is generated by ADOdb and will contain useful debugging information - similar to the error.log data generated below. This file adodb-errorhandler.inc.php - should be included before you create any ADOConnection objects. -

    If you define error_reporting(0), no errors will be passed to the error handler. - If you set error_reporting(E_ALL), all errors will be passed to the error handler. - You still need to use ini_set("display_errors", "0" or "1") to control - the display of errors. -

    <?php
    error_reporting(E_ALL); # pass any error messages triggered to error handler
    include('adodb-errorhandler.inc.php');
    -include('adodb.inc.php'); -include('tohtml.inc.php'); -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); #invalid table productsz'); -if ($rs) rs2html($rs); -?> -
    -

    If you want to log the error message, you can do so by defining the following - optional constants ADODB_ERROR_LOG_TYPE and ADODB_ERROR_LOG_DEST. ADODB_ERROR_LOG_TYPE - is the error log message type (see error_log - in the PHP manual). In this case we set it to 3, which means log to the file - defined by the constant ADODB_ERROR_LOG_DEST. -

    <?php
    error_reporting(E_ALL); # report all errors
    ini_set("display_errors", "0"); # but do not echo the errors
    define('ADODB_ERROR_LOG_TYPE',3);
    define('ADODB_ERROR_LOG_DEST','C:/errors.log');
    include('adodb-errorhandler.inc.php');
    -include('adodb.inc.php'); -include('tohtml.inc.php'); - -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); ## invalid table productsz -if ($rs) rs2html($rs); -?> -
    -The following message will be logged in the error.log file: -
    (2001-10-28 14:20:38) mysql error: [1146: Table 'northwind.productsz' doesn't exist] in
    EXECUTE("select * from productsz")
    -

    PEAR_ERROR

    -The second error handler is adodb-errorpear.inc.php. This will create a -PEAR_Error derived object whenever an error occurs. The last PEAR_Error object -created can be retrieved using ADODB_Pear_Error(). -
    <?php
    include('adodb-errorpear.inc.php'); -include('adodb.inc.php'); -include('tohtml.inc.php'); -$c = NewADOConnection('mysql'); -$c->PConnect('localhost','root','','northwind'); -$rs=$c->Execute('select * from productsz'); #invalid table productsz'); -if ($rs) rs2html($rs); -else { - $e = ADODB_Pear_Error();
    echo '<p>',$e->message,'</p>';
    -} -?> -
    -

    You can use a PEAR_Error derived class by defining the constant ADODB_PEAR_ERROR_CLASS - before the adodb-errorpear.inc.php file is included. For easy debugging, you - can set the default error handler in the beginning of the PHP script to PEAR_ERROR_DIE, - which will cause an error message to be printed, then halt script execution: -

    include('PEAR.php');
    PEAR::setErrorHandling('PEAR_ERROR_DIE');
    -

    Note that we do not explicitly return a PEAR_Error object to you when an error - occurs. We return false instead. You have to call ADODB_Pear_Error() to get - the last error or use the PEAR_ERROR_DIE technique. -

    -

    MetaError and MetaErrMsg

    -

    If you need error messages that work across multiple databases, then use MetaError(), which returns a virtualized error number, based on PEAR DB's error number system, and MetaErrMsg(). - -

    Error Messages

    -

    Error messages are outputted using the static method ADOConnnection::outp($msg,$newline=true). - By default, it sends the messages to the client. You can override this to perform - error-logging. -

    Data Source Names

    -

    We now support connecting using PEAR style DSN's. A DSN is a connection string - of the form:

    -

    $dsn = "$driver://$username:$password@$hostname/$databasename";

    -

    An example:

    -
       $username = 'root';
    $password = '';
    $hostname = 'localhost';
    $databasename = 'xphplens';
    $driver = 'mysql';
    $dsn = "$driver://$username:$password@$hostname/$databasename"
    $db = NewADOConnection();
    # DB::Connect($dsn) also works if you include 'adodb/adodb-pear.inc.php' at the top
    $rs = $db->query('select firstname,lastname from adoxyz');
    $cnt = 0;
    while ($arr = $rs->fetchRow()) {
    print_r($arr); print "<br>";
    }
    -

    -

    More info and connection examples on the DSN format. - -

    PEAR Compatibility

    - We support DSN's (see above), and the following functions: -
     DB_Common
    - 	query - returns PEAR_Error on error
    -	limitQuery - return PEAR_Error on error
    -	prepare - does not return PEAR_Error on error
    -	execute - does not return PEAR_Error on error
    -	setFetchMode - supports ASSOC and ORDERED
    -	errorNative
    -	quote
    -	nextID
    -	disconnect
    -	
    -	getOne
    -	getAssoc
    -	getRow
    -	getCol
    -	
    - DB_Result
    - 	numRows - returns -1 if not supported
    -	numCols
    -	fetchInto - does not support passing of fetchmode
    -	fetchRows - does not support passing of fetchmode
    -	free
    -
    -

    Caching of Recordsets

    -

    ADOdb now supports caching of recordsets using the CacheExecute( ), CachePageExecute( - ) and CacheSelectLimit( ) functions. There are similar to the non-cache functions, - except that they take a new first parameter, $secs2cache. -

    An example: -

    include('adodb.inc.php'); # load code common to ADOdb
    $ADODB_CACHE_DIR = '/usr/ADODB_cache';
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->CacheExecute(15,$sql);
    -

    The first parameter is the number of seconds to cache - the query. Subsequent calls to that query will used the cached version stored - in $ADODB_CACHE_DIR. To force a query to execute and flush the cache, call CacheExecute() - with the first parameter set to zero. Alternatively, use the CacheFlush($sql) - call.

    -

    For the sake of security, we recommend you set register_globals=off - in php.ini if you are using $ADODB_CACHE_DIR.

    -

    In ADOdb 1.80 onwards, the secs2cache parameter is optional in CacheSelectLimit() - and CacheExecute(). If you leave it out, it will use the $connection->cacheSecs - parameter, which defaults to 60 minutes. -

    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; # cache 24 hours
    $rs = $conn->CacheExecute('select * from table');
    -

    Please note that magic_quotes_runtime should be turned off. More - info, and do not change $ADODB_FETCH_MODE (or SetFetchMode) - as the cached recordset will use the $ADODB_FETCH_MODE set when the query was executed. -

    Pivot Tables

    -

    Since ADOdb 2.30, we support the generation of -SQL to create pivot tables, also known as cross-tabulations. For further explanation -read this DevShed Cross-Tabulation -tutorial. We assume that your database supports the SQL case-when expression.

    - -

    In this example, we will use the Northwind database from Microsoft. In the - database, we have a products table, and we want to analyze this table by suppliers - versus product categories. We will place the suppliers on each row, and - pivot on categories. So from the table on the left, we generate the pivot-table - on the right:

    -
    - - - - - - -
    - - - - - - - - - - - - - - - - - -
    SupplierCategory
    supplier1category1
    supplier2category1
    supplier2category2
    -
    --> - - - - - - - - - - - - - - - - - - - -
     category1category2total
    supplier1101
    supplier2112
    -
    - -

    The following code will generate the SQL for a cross-tabulation: -

    # Query the main "product" table
    # Set the rows to SupplierName
    # and the columns to the values of Categories
    # and define the joins to link to lookup tables
    # "categories" and "suppliers"
    #
    include "adodb/pivottable.inc.php";
    $sql = PivotTableSQL(
    $gDB, # adodb connection
    'products p ,categories c ,suppliers s', # tables
    'SupplierName', # rows (multiple fields allowed)
    'CategoryName', # column to pivot on
    'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where
    );
    - -

    This will generate the following SQL:

    -

    SELECT SupplierName,
    - SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", -
    - SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", -
    - SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", -
    - SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy - Products",
    - SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", -
    - SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", -
    - SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", -
    - SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", -
    - SUM(1) as Total
    - FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID - and s.SupplierID= p.SupplierID
    - GROUP BY SupplierName

    -

    You can also pivot on numerical columns and generate totals - by using ranges. This code was revised in ADODB 2.41 - and is not backward compatible. The second example shows this:

    -
     $sql = PivotTableSQL(
    $gDB, # adodb connection
    'products p ,categories c ,suppliers s', # tables
    'SupplierName', # rows (multiple fields allowed) - array( # column ranges - ' 0 ' => 'UnitsInStock <= 0', - "1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5', - "6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10', - "11 to 15" => '10 < UnitsInStock and UnitsInStock <= 15', - "16+" => '15 < UnitsInStock' - ), - ' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where - 'UnitsInStock', # sum this field - 'Sum ' # sum label prefix -); -
    -

    Which generates:

    -

    SELECT SupplierName,
    - SUM(CASE WHEN UnitsInStock <= 0 THEN UnitsInStock ELSE 0 END) AS "Sum - 0 ",
    - SUM(CASE WHEN 0 < UnitsInStock and UnitsInStock <= 5 THEN UnitsInStock - ELSE 0 END) AS "Sum 1 to 5",
    - SUM(CASE WHEN 5 < UnitsInStock and UnitsInStock <= 10 THEN UnitsInStock - ELSE 0 END) AS "Sum 6 to 10",
    - SUM(CASE WHEN 10 < UnitsInStock and UnitsInStock <= 15 THEN UnitsInStock - ELSE 0 END) AS "Sum 11 to 15",
    - SUM(CASE WHEN 15 < UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum - 16+",
    - SUM(UnitsInStock) AS "Sum UnitsInStock",
    - SUM(1) as Total,
    - FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID - and s.SupplierID= p.SupplierID
    - GROUP BY SupplierName

    -

    -
    -

    Class Reference

    -

    Function parameters with [ ] around them are optional.

    -
    -

    Global Variables

    -

    $ADODB_COUNTRECS

    -

    If the database driver API does not support counting the number of records - returned in a SELECT statement, the function RecordCount() is emulated when - the global variable $ADODB_COUNTRECS is set to true, which is the default. - We emulate this by buffering the records, which can take up large amounts - of memory for big recordsets. Set this variable to false for the best performance. - This variable is checked every time a query is executed, so you can selectively - choose which recordsets to count.

    -

    $ADODB_CACHE_DIR

    - -

    If you are using recordset caching, this is the directory to save your recordsets - in. Define this before you call any caching functions such as CacheExecute( - ). We recommend setting register_globals=off in php.ini if you use this - feature for security reasons.

    -

    If you are using Unix and apache, you might need to set your cache directory - permissions to something similar to the following:

    -
    -

    chown -R apache /path/to/adodb/cache
    - chgrp -R apache /path/to/adodb/cache

    -

    $ADODB_ANSI_PADDING_OFF

    -

    Determines whether to right trim CHAR fields (and also VARCHAR for ibase/firebird). -Set to true to trim. Default is false. Currently works for oci8po, ibase and firebird -drivers. Added in ADOdb 4.01. -

    $ADODB_LANG

    -

    Determines the language used in MetaErrorMsg(). The default is 'en', for English. -To find out what languages are supported, see the files -in adodb/lang/adodb-$lang.inc.php, where $lang is the supported langauge. -

    $ADODB_FETCH_MODE

    -

    This is a global variable that determines how arrays are retrieved by recordsets. - The recordset saves this value on creation (eg. in Execute( ) or SelectLimit( - )), and any subsequent changes to $ADODB_FETCH_MODE have no affect on existing - recordsets, only on recordsets created in the future.

    -

    The following constants are defined:

    -

    define('ADODB_FETCH_DEFAULT',0);
    - define('ADODB_FETCH_NUM',1);
    - define('ADODB_FETCH_ASSOC',2);
    - define('ADODB_FETCH_BOTH',3);

    - -

    An example: -

    	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
    $rs1 = $db->Execute('select * from table');
    $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1') -
    -

    As you can see in the above example, both recordsets store and use different - fetch modes based on the $ADODB_FETCH_MODE setting when the recordset was - created by Execute().

    -

    If no fetch mode is predefined, the fetch mode defaults to ADODB_FETCH_DEFAULT. - The behaviour of this default mode varies from driver to driver, so do not - rely on ADODB_FETCH_DEFAULT. For portability, we recommend sticking to ADODB_FETCH_NUM - or ADODB_FETCH_ASSOC. Many drivers do not support ADODB_FETCH_BOTH.

    -

    SetFetchMode Function

    -

    If you have multiple connection objects, and want to have different fetch modes for each -connection, then use SetFetchMode. - Once this function is called for a connection object, that connection object - will ignore the global variable $ADODB_FETCH_MODE and will use the internal - fetchMode property exclusively.

    -
    	$db->SetFetchMode(ADODB_FETCH_NUM);
    $rs1 = $db->Execute('select * from table');
    $db->SetFetchMode(ADODB_FETCH_ASSOC);
    $rs2 = $db->Execute('select * from table');
    print_r($rs1->fields); # shows array([0]=>'v0',[1] =>'v1') - print_r($rs2->fields); # shows array(['col1']=>'v0',['col2'] =>'v1')
    -

    To retrieve the previous fetch mode, you can use check the $db->fetchMode - property, or use the return value of SetFetchMode( ). -

    ADODB_ASSOC_CASE

    -

    You can control the associative fetch case for certain drivers which behave - differently. For the sybase, oci8po, mssql, odbc and ibase drivers and all - drivers derived from them, ADODB_ASSOC_CASE will by default generate recordsets - where the field name keys are lower-cased. Use the constant ADODB_ASSOC_CASE - to change the case of the keys. There are 3 possible values:

    -

    0 = assoc lowercase field names. $rs->fields['orderid']
    - 1 = assoc uppercase field names. $rs->fields['ORDERID']
    - 2 = use native-case field names. $rs->fields['OrderID'] -- this is the - default since ADOdb 2.90

    -

    To use it, declare it before you incldue adodb.inc.php.

    -

    define('ADODB_ASSOC_CASE', 2); # use native-case for ADODB_FETCH_ASSOC
    - include('adodb.inc.php');

    -

    $ADODB_FORCE_TYPE

    -

    See the GetUpdateSQL tutorial. -

    -

    $ADODB_QUOTE_FIELDNAMES

    -

    Auto-quotes field names when using AutoExecute() when set to true. -

     

    -
    -

    ADOConnection

    -

    Object that performs the connection to the database, executes SQL statements - and has a set of utility functions for standardising the format of SQL statements - for issues such as concatenation and date formats.

    -

    ADOConnection Fields

    -

    databaseType: Name of the database system we are connecting to. Eg. - odbc or mssql or mysql.

    -

    dataProvider: The underlying mechanism used to connect to the database. - Normally set to native, unless using odbc or ado.

    -

    host: Name of server or data source name (DSN) to connect to.

    -

    database: Name of the database or to connect to. If ado is used, it - will hold the ado data provider.

    -

    user: Login id to connect to database. Password is not saved for security - reasons.

    -

    raiseErrorFn: Allows you to define an error handling function. See adodb-errorhandler.inc.php - for an example.

    -

    debug: Set to true to make debug statements to appear.

    -

    concat_operator: Set to '+' or '||' normally. The operator used to concatenate - strings in SQL. Used by the Concat function.

    -

    fmtDate: The format used by the DBDate - function to send dates to the database. is '#Y-m-d#' for Microsoft Access, - and ''Y-m-d'' for MySQL.

    -

    fmtTimeStamp: The format used by the DBTimeStamp - function to send timestamps to the database.

    -

    true: The value used to represent true.Eg. '.T.'. for Foxpro, '1' for - Microsoft SQL.

    -

    false: The value used to represent false. Eg. '.F.'. for Foxpro, '0' - for Microsoft SQL.

    -

    replaceQuote: The string used to escape quotes. Eg. double single-quotes - for Microsoft SQL, and backslash-quote for MySQL. Used by qstr.

    -

    autoCommit: indicates whether automatic commit is enabled. Default is - true.

    -

    charSet: set the default charset to use. Currently only interbase/firebird supports - this.

    -

    dialect: set the default sql dialect to use. Currently only interbase/firebird - supports this.

    -

    role: set the role. Currently only interbase/firebird - supports this.

    -

    metaTablesSQL: SQL statement to return a list of available tables. Eg. - SHOW TABLES in MySQL.

    -

    genID: The latest id generated by GenID() if supported by the database.

    -

    cacheSecs: The number of seconds to cache recordsets if CacheExecute() - or CacheSelectLimit() omit the $secs2cache parameter. Defaults to 60 minutes.

    -

    sysDate: String that holds the name of the database function to call - to get the current date. Useful for inserts and updates.

    -

    sysTimeStamp: String that holds the name of the database function to - call to get the current timestamp/datetime value.

    -

    leftOuter: String that holds operator for left outer join, if known. - Otherwise set to false.

    -

    rightOuter: String that holds operator for left outer join, if known. - Otherwise set to false.

    -

    ansiOuter: Boolean that if true indicates that ANSI style outer joins - are permitted. Eg. select * from table1 left join table2 on p1=p2.

    -

    connectSID: Boolean that indicates whether to treat the $database parameter - in connects as the SID for the oci8 driver. Defaults to false. Useful for - Oracle 8.0.5 and earlier.

    -

    autoRollback: Persistent connections are auto-rollbacked in PConnect( - ) if this is set to true. Default is false.

    -
    -

    ADOConnection Main Functions

    -

    ADOConnection( )

    -

    Constructor function. Do not call this directly. Use ADONewConnection( ) instead.

    -

    Connect($host,[$user],[$password],[$database])

    -

    Non-persistent connect to data source or server $host, using userid - $user and password $password. If the server supports multiple - databases, connect to database $database.

    -

    Returns true/false depending on connection success. Since 4.23, null is returned if the extension is not loaded.

    -

    ADO Note: If you are using a Microsoft ADO and not OLEDB, you can set the $database - parameter to the OLEDB data provider you are using.

    -

    PostgreSQL: An alternative way of connecting to the database is to pass the - standard PostgreSQL connection string in the first parameter $host, and the - other parameters will be ignored.

    -

    For Oracle and Oci8, there are two ways to connect. First is to use the TNS - name defined in your local tnsnames.ora (or ONAMES or HOSTNAMES). Place the - name in the $database field, and set the $host field to false. Alternatively, - set $host to the server, and $database to the database SID, this bypassed - tnsnames.ora. -

    Examples: -

     # $oraname in tnsnames.ora/ONAMES/HOSTNAMES
    $conn->Connect(false, 'scott', 'tiger', $oraname);
    $conn->Connect('server:1521', 'scott', 'tiger', 'ServiceName'); # bypass tnsnames.ora
    -

    There are many examples of connecting to a database. -See Connection Examples for many examples. - -

    PConnect($host,[$user],[$password],[$database])

    -

    Persistent connect to data source or server $host, using userid $user - and password $password. If the server supports multiple databases, - connect to database $database.

    -

    We now perform a rollback on persistent connection for selected databases since - 2.21, as advised in the PHP manual. See change log or source code for which - databases are affected. -

    Returns true/false depending on connection. Since 4.23, 0 is returned if the extension is not loaded. -See Connect( ) above for more info.

    -

    Since ADOdb 2.21, we also support autoRollback. If you set:

    - -
     $conn = &NewADOConnection('mysql');
    $conn->autoRollback = true; # default is false
    $conn->PConnect(...); # rollback here
    -

    Then when doing a persistent connection with PConnect( ), ADOdb will - perform a rollback first. This is because it is documented that PHP is - not guaranteed to rollback existing failed transactions when - persistent connections are used. This is implemented in Oracle, - MySQL, PgSQL, MSSQL, ODBC currently. -

    Since ADOdb 3.11, you can force non-persistent -connections even if PConnect is called by defining the constant -ADODB_NEVER_PERSIST before you call PConnect. -

    -Since 4.23, null is returned if the extension is not loaded. -

    NConnect($host,[$user],[$password],[$database])

    -

    Always force a new connection. In contrast, PHP sometimes reuses connections - when you use Connect() or PConnect(). Currently works only on mysql (PHP 4.3.0 - or later), postgresql and oci8-derived drivers. For other drivers, NConnect() works like - Connect().

    -

    IsConnected( )

    -

    -Returns true if connected to database. Added in 4.53. - -

    Execute($sql,$inputarr=false)

    -

    Execute SQL statement $sql and return derived class of ADORecordSet - if successful. Note that a record set is always returned on success, even - if we are executing an insert or update statement. You can also pass in $sql a statement prepared - in Prepare().

    -

    Returns derived class of ADORecordSet. Eg. if connecting via mysql, then ADORecordSet_mysql - would be returned. False is returned if there was an error in executing the - sql.

    -

    The $inputarr parameter can be used for binding variables to parameters. Below - is an Oracle example:

    -
     $conn->Execute("SELECT * FROM TABLE WHERE COND=:val", array('val'=> $val));
    -

    Another example, using ODBC,which uses the ? convention:

    -
      $conn->Execute("SELECT * FROM TABLE WHERE COND=?", array($val));
    - -Binding variables

    -Variable binding speeds the compilation and caching of SQL statements, leading -to higher performance. Currently Oracle, Interbase and ODBC supports variable binding. -Interbase/ODBC style ? binding is emulated in databases that do not support binding. -Note that you do not have to quote strings if you use binding. -

    Variable binding in the odbc, interbase and oci8po drivers. -

    $rs = $db->Execute('select * from table where val=?', array('10'));
    -Variable binding in the oci8 driver: -
    $rs = $db->Execute('select name from table where val=:key', 
    array('key' => 10));
    - -Bulk binding -

    Since ADOdb 3.80, we support bulk binding in Execute(), in which you pass in a 2-dimensional array to -be bound to an INSERT/UPDATE or DELETE statement. -

    $arr = array(
    array('Ahmad',32),
    array('Zulkifli', 24),
    array('Rosnah', 21)
    );
    $ok = $db->Execute('insert into table (name,age) values (?,?)',$arr);
    -

    This provides very high performance as the SQL statement is prepared first. -The prepared statement is executed repeatedly for each array row until all rows are completed, -or until the first error. Very useful for importing data. - -

    CacheExecute([$secs2cache,]$sql,$inputarr=false)

    -

    Similar to Execute, except that the recordset is cached for $secs2cache seconds - in the $ADODB_CACHE_DIR directory, and $inputarr only accepts 1-dimensional arrays. - If CacheExecute() is called again with the same $sql, $inputarr, - and also the same database, same userid, and the cached recordset - has not expired, the cached recordset is returned. -

      include('adodb.inc.php'); 
    include('tohtml.inc.php');
    $ADODB_CACHE_DIR = '/usr/local/ADOdbcache';
    $conn = &ADONewConnection('mysql');
    $conn->PConnect('localhost','userid','password','database');
    $rs = $conn->CacheExecute(15, 'select * from table'); # cache 15 secs
    rs2html($rs); /* recordset to html table */
    -

    Alternatively, since ADOdb 1.80, the $secs2cache parameter is optional:

    -
    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; // cache 24 hours
    $rs = $conn->CacheExecute('select * from table');
    -If $secs2cache is omitted, we use the value -in $connection->cacheSecs (default is 3600 seconds, or 1 hour). Use CacheExecute() -only with SELECT statements. -

    Performance note: I have done some benchmarks and found that they vary so greatly - that it's better to talk about when caching is of benefit. When your database - server is much slower than your Web server or the database is very - overloaded then ADOdb's caching is good because it reduces the load on - your database server. If your database server is lightly loaded or much faster - than your Web server, then caching could actually reduce performance.

    -

    ExecuteCursor($sql,$cursorName='rs',$parameters=false)

    -

    Execute an Oracle stored procedure, and returns an Oracle REF cursor variable as - a regular ADOdb recordset. Does not work with any other database except oci8. - Thanks to Robert Tuttle for the design. -

        $db = ADONewConnection("oci8"); 
    $db->Connect("foo.com:1521", "uid", "pwd", "FOO");
    $rs = $db->ExecuteCursor("begin :cursorvar := getdata(:param1); end;",
    'cursorvar',
    array('param1'=>10));
    # $rs is now just like any other ADOdb recordset object
    rs2html($rs);
    -

    ExecuteCursor() is a helper function that does the following internally: -

    	$stmt = $db->Prepare("begin :cursorvar := getdata(:param1); end;", true); 
    $db->Parameter($stmt, $cur, 'cursorvar', false, -1, OCI_B_CURSOR);
    $rs = $db->Execute($stmt,$bindarr);
    -

    ExecuteCursor only accepts 1 out parameter. So if you have 2 out parameters, use: -

    	$vv = 'A%';
    $stmt = $db->PrepareSP("BEGIN list_tabs(:crsr,:tt); END;");
    $db->OutParameter($stmt, $cur, 'crsr', -1, OCI_B_CURSOR);
    $db->OutParameter($stmt, $vv, 'tt', 32); # return varchar(32)
    $arr = $db->GetArray($stmt);
    print_r($arr);
    echo " val = $vv"; ## outputs 'TEST'
    -for the following PL/SQL: -
    	TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;

    PROCEDURE list_tabs(tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS
    BEGIN
    OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
    tablenames := 'TEST';
    END list_tabs;
    -

    SelectLimit($sql,$numrows=-1,$offset=-1,$inputarr=false)

    -

    Returns a recordset if successful. Returns false otherwise. Performs a select - statement, simulating PostgreSQL's SELECT statement, LIMIT $numrows OFFSET - $offset clause.

    -

    In PostgreSQL, SELECT * FROM TABLE LIMIT 3 will return the first 3 records - only. The equivalent is $connection->SelectLimit('SELECT * FROM TABLE',3). - This functionality is simulated for databases that do not possess this feature.

    -

    And SELECT * FROM TABLE LIMIT 3 OFFSET 2 will return records 3, 4 and 5 (eg. - after record 2, return 3 rows). The equivalent in ADOdb is $connection->SelectLimit('SELECT - * FROM TABLE',3,2).

    -

    Note that this is the opposite of MySQL's LIMIT clause. You can also - set $connection->SelectLimit('SELECT * FROM TABLE',-1,10) to - get rows 11 to the last row.

    -

    The last parameter $inputarr is for databases that support variable binding - such as Oracle oci8. This substantially reduces SQL compilation overhead. - Below is an Oracle example:

    -
     $conn->SelectLimit("SELECT * FROM TABLE WHERE COND=:val", 100,-1,array('val'=> $val));
    -

    The oci8po driver (oracle portable driver) uses the more standard bind variable - of ?: -

     $conn->SelectLimit("SELECT * FROM TABLE WHERE COND=?", 100,-1,array('val'=> $val));
    -

    -

    Ron Wilson reports that SelectLimit does not work with UNIONs. -

    CacheSelectLimit([$secs2cache,] $sql, $numrows=-1,$offset=-1,$inputarr=false)

    -

    Similar to SelectLimit, except that the recordset returned is cached for $secs2cache - seconds in the $ADODB_CACHE_DIR directory.

    -

    Since 1.80, $secs2cache has been optional, and you can define the caching time - in $connection->cacheSecs.

    - -
    	$conn->Connect(...);
    $conn->cacheSecs = 3600*24; // cache 24 hours
    $rs = $conn->CacheSelectLimit('select * from table',10);
    - -

    CacheFlush($sql=false,$inputarr=false)

    -

    Flush (delete) any cached recordsets for the SQL statement $sql in $ADODB_CACHE_DIR. -

    If no parameter is passed in, then all adodb_*.cache files are deleted. -

    -

    CacheSelectLimit() rewrites the SQL query, so you won't be able to pass the SQL to CacheFlush. In this case, - to flush the cached SQL recordset returned by CacheSelectLimit(), set $secs2cache to -1: -

    -	$db->CacheSelectLimit(-1, $sql, $nrows);
    -
    -

    If you want to flush all cached recordsets manually, execute the following - PHP code (works only under Unix):
    -   system("rm -f `find ".$ADODB_CACHE_DIR." -name - adodb_*.cache`");

    -

    For general cleanup of all expired files, you should use crontab - on Unix, or at.exe on Windows, and a shell script similar to the following:
    - #------------------------------------------------------
    - # This particular example deletes files in the TMPPATH
    - # directory with the string ".cache" in their name that
    - # are more than 7 days old.
    - #------------------------------------------------------
    - AGED=7
    - find ${TMPPATH} -mtime +$AGED | grep "\.cache" | xargs rm -f
    -

    -

    MetaError($errno=false)

    -

    Returns a virtualized error number, based on PEAR DB's error number system. You might -need to include adodb-error.inc.php before you call this function. The parameter $errno -is the native error number you want to convert. If you do not pass any parameter, MetaError -will call ErrorNo() for you and convert it. If the error number cannot be virtualized, MetaError -will return -1 (DB_ERROR).

    - -

    MetaErrorMsg($errno)

    -

    Pass the error number returned by MetaError() for the equivalent textual error message.

    -

    ErrorMsg()

    -

    Returns the last status or error message. The error message is reset after every -call to Execute(). -

    -This can return a string even if - no error occurs. In general you do not need to call this function unless an - ADOdb function returns false on an error.

    -

    Note: If debug is enabled, the SQL error message is always displayed - when the Execute function is called.

    -

    ErrorNo()

    -

    Returns the last error number. The error number is reset after every call to Execute(). -If 0 is returned, no error occurred. -

    -Note that old versions of PHP (pre 4.0.6) do - not support error number for ODBC. In general you do not need to call this - function unless an ADOdb function returns false on an error.

    -

    IgnoreErrors($saveErrHandlers)

    -

    Allows you to ignore errors so that StartTrans()/CompleteTrans() is not affected, nor is the default error handler called if an error occurs. -Useful when you want to check if a field or table exists in a database without invoking an error if it does not exist. -

    Usage: -

    -$saveErrHandlers = $conn->IgnoreErrors();
    -$rs = $conn->Execute("select field from some_table_that_might_not_exist");
    -$conn->IgnoreErrors($saveErrHandlers);
    -
    -

    Warning: do not call StartTrans()/CompleteTrans() inside a code block that is using IgnoreErrors(). -

    SetFetchMode($mode)

    -

    Sets the current fetch mode for the connection and stores - it in $db->fetchMode. Legal modes are ADODB_FETCH_ASSOC and ADODB_FETCH_NUM. - For more info, see $ADODB_FETCH_MODE.

    -

    Returns the previous fetch mode, which could be false - if SetFetchMode( ) has not been called before.

    - -

    CreateSequence($seqName = 'adodbseq',$startID=1)

    -

    Create a sequence. The next time GenID( ) is called, the value returned will - be $startID. Added in 2.60. -

    DropSequence($seqName = 'adodbseq')

    -

    Delete a sequence. Added in 2.60. -

    GenID($seqName = 'adodbseq',$startID=1)

    -

    Generate a sequence number . Works for interbase, - mysql, postgresql, oci8, oci8po, mssql, ODBC based (access,vfp,db2,etc) drivers - currently. Uses $seqName as the name of the sequence. GenID() will automatically - create the sequence for you if it does not exist (provided the userid has - permission to do so). Otherwise you will have to create the sequence yourself. -

    If your database driver emulates sequences, the name of the table is the sequence - name. The table has one column, "id" which should be of type integer, or if - you need something larger - numeric(16). -

    For ODBC and databases that do not support sequences natively (eg mssql, mysql), - we create a table for each sequence. If the sequence has not been defined - earlier, it is created with the starting value set in $startID.

    -

    Note that the mssql driver's GenID() before 1.90 used to generate 16 byte GUID's.

    -

    UpdateBlob($table,$column,$val,$where)

    -Allows you to store a blob (in $val) into $table into $column in a row at $where. -

    Usage: -

    -

    	# for oracle
    $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, empty_blob())');
    $conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');

    # non oracle databases
    $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
    $conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
    -

    Returns true if succesful, false otherwise. Supported by MySQL, PostgreSQL, - Oci8, Oci8po and Interbase drivers. Other drivers might work, depending on - the state of development.

    -

    Note that when an Interbase blob is retrieved using SELECT, it still needs - to be decoded using $connection->DecodeBlob($blob); to derive the original - value in versions of PHP before 4.1.0. -

    For PostgreSQL, you can store your blob using blob oid's or as a bytea field. - You can use bytea fields but not blob oid's currently with UpdateBlob( ). - Conversely UpdateBlobFile( ) supports oid's, but not bytea data.
    -
    - If you do not pass in an oid, then UpdateBlob() assumes that you are storing - in bytea fields. -

    If you do not have any blob fields, you can improve you can improve general SQL query performance by disabling blob handling with $connection->disableBlobs = true. -

    UpdateClob($table,$column,$val,$where)

    -Allows you to store a clob (in $val) into $table into $column in a row at $where. -Similar to UpdateBlob (see above), but for Character Large OBjects. -

    Usage: -

    	# for oracle
    $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, empty_clob())');
    $conn->UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');

    # non oracle databases
    $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');
    $conn->UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');
    -

    UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')

    -

    Similar to UpdateBlob, except that we pass in a file path to where the blob - resides. -

    For PostgreSQL, if you are using blob oid's, use this interface. This interface - does not support bytea fields. -

    Returns true if successful, false otherwise. -

    BlobEncode($blob) -

    Some databases require blob's to be encoded manually before upload. Note if - you use UpdateBlob( ) or UpdateBlobFile( ) the conversion is done automatically - for you and you do not have to call this function. For PostgreSQL, currently, - BlobEncode() can only be used for bytea fields. -

    Returns the encoded blob value. -

    Note that there is a connection property called blobEncodeType which - has 3 legal values: -

    false - no need to perform encoding or decoding.
    - 'I' - blob encoding required, and returned encoded blob is a numeric value - (no need to quote).
    - 'C' - blob encoding required, and returned encoded blob is a character value - (requires quoting). -

    This is purely for documentation purposes, so that programs that accept multiple - database drivers know what is the right thing to do when processing blobs. -

    BlobDecode($blob, $maxblobsize = false) -

    Some databases require blob's to be decoded manually after doing a select statement. - If the database does not require decoding, then this function will return - the blob unchanged. Currently BlobDecode is only required for one database, - PostgreSQL, and only if you are using blob oid's (if you are using bytea fields, - we auto-decode for you). The default maxblobsize is set in $connection->maxblobsize, which - is set to 256K in adodb 4.54.

    - In ADOdb 4.54 and later, the blob is the return value. In earlier versions, the blob data is sent to stdout.

    -

    $rs = $db->Execute("select bloboid from postgres_table where id=$key");
    $blob = $db->BlobDecode( reset($rs->fields) );
    -

    Replace($table, $arrFields, $keyCols,$autoQuote=false)

    -

    Try to update a record, and if the record is not found, an insert statement - is generated and executed. Returns 0 on failure, 1 if update statement worked, - 2 if no record was found and the insert was executed successfully. This differs - from MySQL's replace which deletes the record and inserts a new record. This - also means you cannot update the primary key. The only exception to this is - Interbase and its derivitives, which uses delete and insert because of some - Interbase API limitations. -

    The parameters are $table which is the table name, the $arrFields which is an - associative array where the keys are the field names, and $keyCols is the name - of the primary key, or an array of field names if it is a compound key. If - $autoQuote is set to true, then Replace() will quote all values that are non-numeric; - auto-quoting will not quote nulls. Note that auto-quoting will not work if - you use SQL functions or operators. -

    Examples: -

    # single field primary key
    $ret = $db->Replace('atable',
    array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'),
    'id',$autoquote = true);
    # generates UPDATE atable SET firstname='Harun',lastname='Al-Rashid' WHERE id=1000
    # or INSERT INTO atable (id,firstname,lastname) VALUES (1000,'Harun','Al-Rashid')

    # compound key
    $ret = $db->Replace('atable2',
    array('firstname'=>'Harun','lastname'=>'Al-Rashid', 'age' => 33, 'birthday' => 'null'),
    array('lastname','firstname'),
    $autoquote = true);

    # no auto-quoting
    $ret = $db->Replace('atable2',
    array('firstname'=>"'Harun'",'lastname'=>"'Al-Rashid'", 'age' => 'null'),
    array('lastname','firstname'));
    -

    AutoExecute($table, $arrFields, $mode, $where=false, $forceUpdate=true,$magicq=false)

    -

    Since ADOdb 4.56, you can automatically generate and execute INSERTs and UPDATEs on a given table with this -function, which is a wrapper for GetInsertSQL() and GetUpdateSQL(). -

    AutoExecute() inserts or updates $table given an array of $arrFields, where the keys are the field names and the array values are the -field values to store. Note that there is some overhead because the table is first queried to extract key information -before the SQL is generated. We generate an INSERT or UPDATE based on $mode (see below). -

    -Legal values for $mode are -

      -
    • 'INSERT' or 1 or DB_AUTOQUERY_INSERT -
    • 'UPDATE' or 2 or DB_AUTOQUERY_UPDATE -
    -

    You have to define the constants DB_AUTOQUERY_UPDATE and DB_AUTOQUERY_INSERT yourself or include adodb-pear.inc.php. -

    The $where clause is required if $mode == 'UPDATE'. If $forceUpdate=false then we will query the -database first and check if the field value returned by the query matches the current field value; only if they differ do we update that field. -

    Returns true on success, false on error. -

    An example of its use is: -

    -$record["firstName"] = "Carol";
    -$record["lasTname"] = "Smith"; 
    -$conn->AutoExecute($table,$record,'INSERT');
    -# executes "INSERT INTO $table (firstName,lasTname) values ('Carol',Smith')";
    -
    -$record["firstName"] = "Carol";
    -$record["lasTname"] = "Jones"; 
    -$conn->AutoExecute($table,$record,'UPDATE', "lastname like 'Sm%'");
    -# executes "UPDATE $table SET firstName='Carol',lasTname='Jones' WHERE lastname like 'Sm%'";
    -
    -

    Note: One of the strengths of ADOdb's AutoExecute() is that only valid field names for $table are updated. If $arrFields -contains keys that are invalid field names for $table, they are ignored. There is some overhead in doing this as we have to -query the database to get the field names, but given that you are not directly coding the SQL yourself, you probably aren't interested in -speed at all, but convenience. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    Since 4.94, setting the global variable $ADODB_QUOTE_FIELDNAMES to true will force field names to be auto-quoted in AutoExecute(), GetInsertSQL() and GetUpdateSQL().

    -

    GetUpdateSQL(&$rs, $arrFields, $forceUpdate=false,$magicq=false, $force=null)

    -

    Generate SQL to update a table given a recordset $rs, and the modified fields - of the array $arrFields (which must be an associative array holding the column - names and the new values) are compared with the current recordset. If $forceUpdate - is true, then we also generate the SQL even if $arrFields is identical to - $rs->fields. Requires the recordset to be associative. $magicq is used - to indicate whether magic quotes are enabled (see qstr()). The field names in the array - are case-insensitive.

    -

    Since 4.52, we allow you to pass the $force type parameter, and this overrides the $ADODB_FORCE_TYPE - global variable. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    GetInsertSQL(&$rs, $arrFields,$magicq=false,$force_type=false)

    -

    Generate SQL to insert into a table given a recordset $rs. Requires the query - to be associative. $magicq is used to indicate whether magic quotes are enabled - (for qstr()). The field names in the array are case-insensitive.

    -

    - Since 2.42, you can pass a table name instead of a recordset into -GetInsertSQL (in $rs), and it will generate an insert statement for that table. -

    Since 4.52, we allow you to pass the $force_type parameter, and this overrides the $ADODB_FORCE_TYPE - global variable. -

    Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called. -

    PageExecute($sql, $nrows, $page, $inputarr=false) -

    Used for pagination of recordset. $page is 1-based. See Example - 8.

    - -

    CachePageExecute($secs2cache, - $sql, $nrows, $page, $inputarr=false)

    -

    Used for pagination of recordset. $page is 1-based. See - Example 8. Caching version of PageExecute.

    - -

    -

    Close( )

    -

    Close the database connection. PHP4 proudly states that we no longer have to - clean up at the end of the connection because the reference counting mechanism - of PHP4 will automatically clean up for us.

    -

    StartTrans( )

    -

    Start a monitored transaction. As SQL statements are executed, ADOdb will monitor - for SQL errors, and if any are detected, when CompleteTrans() is called, we auto-rollback. -

    -

    To understand why StartTrans() is superior to BeginTrans(), - let us examine a few ways of using BeginTrans(). - The following is the wrong way to use transactions: -

    $DB->BeginTrans();
    $DB->Execute("update table1 set val=$val1 where id=$id");
    $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CommitTrans();
    -

    because you perform no error checking. It is possible to update table1 and - for the update on table2 to fail. Here is a better way: -

    $DB->BeginTrans();
    $ok = $DB->Execute("update table1 set val=$val1 where id=$id");
    if ($ok) $ok = $DB->Execute("update table2 set val=$val2 where id=$id");
    if ($ok) $DB->CommitTrans();
    else $DB->RollbackTrans();
    -

    Another way is (since ADOdb 2.0): -

    $DB->BeginTrans();
    $ok = $DB->Execute("update table1 set val=$val1 where id=$id");
    if ($ok) $ok = $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CommitTrans($ok);
    -

    Now it is a headache monitoring $ok all over the place. StartTrans() is an -improvement because it monitors all SQL errors for you. This is particularly -useful if you are calling black-box functions in which SQL queries might be executed. - Also all BeginTrans, CommitTrans and RollbackTrans calls inside a StartTrans block - will be disabled, so even if the black box function does a commit, it will be ignored. -

    $DB->StartTrans();
    CallBlackBox();
    $DB->Execute("update table1 set val=$val1 where id=$id");
    $DB->Execute("update table2 set val=$val2 where id=$id");
    $DB->CompleteTrans();
    -

    Note that a StartTrans blocks are nestable, the inner blocks are ignored. -

    CompleteTrans($autoComplete=true)

    -

    Complete a transaction called with StartTrans(). This function monitors - for SQL errors, and will commit if no errors have occured, otherwise it will rollback. - Returns true on commit, false on rollback. If the parameter $autoComplete is true - monitor sql errors and commit and rollback as appropriate. Set $autoComplete to false - to force rollback even if no SQL error detected. -

    FailTrans( )

    -

    Fail a transaction started with StartTrans(). The rollback will only occur when - CompleteTrans() is called. -

    HasFailedTrans( )

    -

    Check whether smart transaction has failed, - eg. returns true if there was an error in SQL execution or FailTrans() was called. - If not within smart transaction, returns false. -

    BeginTrans( )

    -

    Begin a transaction. Turns off autoCommit. Returns true if successful. Some - databases will always return false if transaction support is not available. - Any open transactions will be rolled back when the connection is closed. Among the - databases that support transactions are Oracle, PostgreSQL, Interbase, MSSQL, certain - versions of MySQL, DB2, Informix, Sybase, etc.

    -

    Note that StartTrans() and CompleteTrans() is a superior method of - handling transactions, available since ADOdb 3.40. For a explanation, see the StartTrans() documentation. - -

    You can also use the ADOdb error handler to die - and rollback your transactions for you transparently. Some buggy database extensions - are known to commit all outstanding tranasactions, so you might want to explicitly - do a $DB->RollbackTrans() in your error handler for safety. -

    Detecting Transactions

    -

    Since ADOdb 2.50, you are able to detect when you are inside a transaction. Check - that $connection->transCnt > 0. This variable is incremented whenever BeginTrans() is called, - and decremented whenever RollbackTrans() or CommitTrans() is called. -

    CommitTrans($ok=true)

    -

    End a transaction successfully. Returns true if successful. If the database - does not support transactions, will return true also as data is always committed. -

    -

    If you pass the parameter $ok=false, the data is rolled back. See example in - BeginTrans().

    -

    RollbackTrans( )

    -

    End a transaction, rollback all changes. Returns true if successful. If the - database does not support transactions, will return false as data is never rollbacked. -

    - -

    SetTransactionMode($mode )

    -

    SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions. -Note: if you have persistent connections and using mssql or mysql, you might have to explicitly reset your transaction mode at the beginning of each page request. -This is only supported in postgresql, mssql, mysql with InnoDB and oci8 currently. For example: -

    -$db->SetTransactionMode("SERIALIZABLE");
    -$db->BeginTrans();
    -$db->Execute(...); $db->Execute(...);
    -$db->CommiTrans();
    -
    -$db->SetTransactionMode(""); // restore to default
    -$db->StartTrans();
    -$db->Execute(...); $db->Execute(...);
    -$db->CompleteTrans();
    -
    - -

    Supported values to pass in: -

      -
    • READ UNCOMMITTED (allows dirty reads, but fastest) -
    • READ COMMITTED (default postgres, mssql and oci8) -
    • REPEATABLE READ (default mysql) -
    • SERIALIZABLE (slowest and most restrictive) -
    -

    You can also pass in database specific values such as 'SNAPSHOT' for mssql or 'READ ONLY' for oci8/postgres. -

    See transaction levels for PostgreSQL, -Oracle, -MySQL, and -MS SQL Server. -

    GetAssoc($sql,$inputarr=false,$force_array=false,$first2cols=false)

    -

    Returns an associative array for the given query $sql with optional bind parameters - in $inputarr. If the number of columns returned is greater to two, a 2-dimensional - array is returned, with the first column of the recordset becomes the keys - to the rest of the rows. If the columns is equal to two, a 1-dimensional array - is created, where the the keys directly map to the values (unless $force_array - is set to true, when an array is created for each value). -

    Examples:

    - -

    We have the following data in a recordset:

    -

    row1: Apple, Fruit, Edible
    - row2: Cactus, Plant, Inedible
    - row3: Rose, Flower, Edible

    -

    GetAssoc will generate the following 2-dimensional associative - array:

    -

    Apple => array[Fruit, Edible]
    - Cactus => array[Plant, Inedible]
    - Rose => array[Flower,Edible]

    -

    If the dataset is:

    -

    row1: Apple, Fruit
    -row2: Cactus, Plant
    -row3: Rose, Flower

    -

    GetAssoc will generate the following 1-dimensional associative - array (with $force_array==false):

    -

    Apple => Fruit
    - Cactus=>Plant
    - Rose=>Flower

    -

    The function returns:

    -

    The associative array, or false if an error occurs.

    - -

    CacheGetAssoc([$secs2cache,] $sql,$inputarr=false,$force_array=false,$first2cols=false)

    -
    -

    Caching version of GetAssoc function above. -

    GetOne($sql,$inputarr=false)

    -

    Executes the SQL and returns the first field of the first row. The recordset - and remaining rows are discarded for you automatically. If an error occur, false - is returned.

    -

    GetRow($sql,$inputarr=false)

    -

    Executes the SQL and returns the first row as an array. The recordset and remaining - rows are discarded for you automatically. If an error occurs, false is returned.

    -

    GetAll($sql,$inputarr=false)

    - -

    Executes the SQL and returns the all the rows as a 2-dimensional - array. The recordset is discarded for you automatically. If an error occurs, - false is returned. GetArray is a synonym for GetAll.

    -

    GetCol($sql,$inputarr=false,$trim=false)

    - -

    Executes the SQL and returns all elements of the first column as a -1-dimensional array. The recordset is discarded for you automatically. If an error occurs, - false is returned.

    -

    CacheGetOne([$secs2cache,] - $sql,$inputarr=false), CacheGetRow([$secs2cache,] $sql,$inputarr=false), CacheGetAll([$secs2cache,] - $sql,$inputarr=false), CacheGetCol([$secs2cache,] - $sql,$inputarr=false,$trim=false)

    - -

    Similar to above Get* functions, except that the recordset is serialized and - cached in the $ADODB_CACHE_DIR directory for $secs2cache seconds. Good for speeding - up queries on rarely changing data. Note that the $secs2cache parameter is optional. - If omitted, we use the value in $connection->cacheSecs (default is 3600 seconds, - or 1 hour).

    -

    Prepare($sql )

    - -

    Prepares (compiles) an SQL query for repeated execution. Bind parameters -are denoted by ?, except for the oci8 driver, which uses the traditional Oracle :varname -convention. -

    -

    Returns an array containing the original sql statement - in the first array element; the remaining elements of the array are driver dependent. - If there is an error, or we are emulating Prepare( ), we return the original - $sql string. This is because all error-handling has been centralized in Execute( - ).

    -

    Prepare( ) cannot be used with functions that use SQL - query rewriting techniques, e.g. PageExecute( ) and SelectLimit( ).

    -

    Example:

    -
    $stmt = $DB->Prepare('insert into table (col1,col2) values (?,?)');
    for ($i=0; $i < $max; $i++)
    $DB->Execute($stmt,array((string) rand(), $i));
    - -

    Also see InParameter(), OutParameter() and PrepareSP() below. Only supported internally by interbase, - oci8 and selected ODBC-based drivers, otherwise it is emulated. There is no - performance advantage to using Prepare() with emulation. -

    Important: Due to limitations or bugs in PHP, if you are getting errors when - you using prepared queries, try setting $ADODB_COUNTRECS = false before preparing. - This behaviour has been observed with ODBC. -

    IfNull($field, $nullReplacementValue)

    -

    Portable IFNULL function (NVL in Oracle). Returns a string that represents - the function that checks whether a $field is null for the given database, and - if null, change the value returned to $nullReplacementValue. Eg.

    -
    $sql = 'SELECT '.$db->IfNull('name', "'- unknown -'"). ' FROM table';
    - -

    length

    -

    This is not a function, but a property. Some databases have "length" and others "len" -as the function to measure the length of a string. To use this property: -

      $sql = "SELECT ".$db->length."(field) from table";
    $rs = $db->Execute($sql);
    - -

    random

    -

    This is not a function, but a property. This is a string that holds the sql to -generate a random number between 0.0 and 1.0 inclusive. - -

    substr

    -

    This is not a function, but a property. Some databases have "substr" and others "substring" -as the function to retrieve a sub-string. To use this property: -

      $sql = "SELECT ".$db->substr."(field, $offset, $length) from table";
    $rs = $db->Execute($sql);
    -

    For all databases, the 1st parameter of substr is the field, the 2nd is the -offset (1-based) to the beginning of the sub-string, and the 3rd is the length of the sub-string. - - -

    Param($name)

    -

    Generates a bind placeholder portably. For most databases, the bind placeholder - is "?". However some databases use named bind parameters such as Oracle, eg - ":somevar". This allows us to portably define an SQL statement with bind parameters: -

    $sql = 'insert into table (col1,col2) values ('.$DB->Param('a').','.$DB->Param('b').')';
    # generates 'insert into table (col1,col2) values (?,?)'
    # or 'insert into table (col1,col2) values (:a,:b)
    '
    $stmt = $DB->Prepare($sql);
    $stmt = $DB->Execute($stmt,array('one','two'));
    - -

    -

    PrepareSP($sql, -$cursor=false )

    -

    When calling stored procedures in mssql and oci8 (oracle), - and you might want to directly bind to parameters that return values, or -for special LOB handling. PrepareSP() allows you to do so.

    -

    Returns the same array or $sql string as Prepare( ) - above. If you do not need to bind to return values, you should use Prepare( - ) instead.

    -

    The 2nd parameter, $cursor is not used except with oci8. - Setting it to true will force OCINewCursor to be called; this is to support -output REF CURSORs.

    -

    For examples of usage of PrepareSP( ), see InParameter( -) below.

    -

    Note: in the mssql driver, preparing stored procedures - requires a special function call, mssql_init( ), which is called by this - function. PrepareSP( ) is available in all other drivers, and is emulated - by calling Prepare( ).

    -

    InParameter($stmt, $var, - $name, $maxLen = 4000, $type = false )

    -Binds a PHP variable as input to a stored procedure variable. -The parameter $stmt is the value returned by PrepareSP(), $var is -the PHP variable you want to bind, $name is the name of the stored procedure -variable. Optional is $maxLen, the maximum length of the data to bind, -and $type which is database dependant. Consult mssql_bind and ocibindbyname docs -at php.net for more info on legal values for $type. -

    -InParameter() is a wrapper function that calls Parameter() -with $isOutput=false. The advantage of this function is that it is self-documenting, -because the $isOutput parameter is no longer needed. Only for mssql and oci8 -currently.

    -

    Here is an example using oci8:

    -
    # For oracle, Prepare and PrepareSP are identical
    -$stmt = $db->PrepareSP(
    -	"declare RETVAL integer; 
    begin
    :RETVAL :=
    SP_RUNSOMETHING(:myid,:group);
    end;"
    );
    $db->InParameter($stmt,$id,'myid');
    $db->InParameter($stmt,$group,'group',64);
    $db->OutParameter($stmt,$ret,'RETVAL');
    $db->Execute($stmt);
    -

    The same example using mssql:

    - -
    # @RETVAL = SP_RUNSOMETHING @myid,@group
    -$stmt = $db->PrepareSP('SP_RUNSOMETHING'); 
    # note that the parameter name does not have @ in front! -$db->InParameter($stmt,$id,'myid'); -$db->InParameter($stmt,$group,'group',64); -# return value in mssql - RETVAL is hard-coded name
    $db->OutParameter($stmt,$ret,'RETVAL');
    $db->Execute($stmt);
    - -

    Note that the only difference between the oci8 and mssql implementations is $sql.

    -

    - If $type parameter is set to false, in mssql, $type will be dynamicly determined -based on the type of the PHP variable passed (string -=> SQLCHAR, boolean =>SQLINT1, integer =>SQLINT4 or float/double=>SQLFLT8). -

    -In oci8, $type can be set to OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), -OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). To -pass in a null, use $db->Parameter($stmt, -$null=null, 'param'). -

    OutParameter($stmt, $var, $name, - $maxLen = 4000, $type = false )

    - Binds a PHP variable as output from a stored procedure variable. The parameter $stmt - is the value returned by PrepareSP(), $var is the PHP variable you want to bind, $name - is the name of the stored procedure variable. Optional is $maxLen, the maximum length of the - data to bind, and $type which is database dependant. -

    - OutParameter() is a wrapper function that calls Parameter() with $isOutput=true. - The advantage of this function is that it is self-documenting, because -the $isOutput parameter is no longer needed. Only for mssql - and oci8 currently. -

    -For an example, see InParameter. - -

    Parameter($stmt, $var, $name, $isOutput=false, - $maxLen = 4000, $type = false )

    -

    Note: This function is deprecated, because of the new InParameter() and OutParameter() functions. -These are superior because they are self-documenting, unlike Parameter(). -

    Adds a bind parameter suitable for return values or special data handling (eg. - LOBs) after a statement has been prepared using PrepareSP(). Only for mssql - and oci8 currently. The parameters are:
    -
    - $stmt Statement returned by Prepare() or PrepareSP().
    - $var PHP variable to bind to. Make sure you pre-initialize it!
    - $name Name of stored procedure variable name to bind to.
    - [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT - 2= IN/OUT. This is ignored in oci8 as this driver auto-detects the direction.
    - [$maxLen] Maximum length of the parameter variable.
    - [$type] Consult mssql_bind and - ocibindbyname docs at php.net for - more info on legal values for type.

    -

    Lastly, in oci8, bind parameters can be reused without calling PrepareSP( ) - or Parameters again. This is not possible with mssql. An oci8 example:

    -
    $id = 0; $i = 0;
    $stmt = $db->PrepareSP( "update table set val=:i where id=:id");
    $db->Parameter($stmt,$id,'id');
    $db->Parameter($stmt,$i, 'i');
    for ($cnt=0; $cnt < 1000; $cnt++) {
    $id = $cnt;
    $i = $cnt * $cnt; # works with oci8! - $db->Execute($stmt);
    }
    -

    Bind($stmt, $var, $size=4001, $type=false, $name=false)

    - -

    This is a low-level function supported only by the oci8 - driver. Avoid using unless you only want to support Oracle. The Parameter( - ) function is the recommended way to go with bind variables.

    -

    Bind( ) allows you to use bind variables in your sql - statement. This binds a PHP variable to a name defined in an Oracle sql statement - that was previously prepared using Prepare(). Oracle named variables begin with - a colon, and ADOdb requires the named variables be called :0, :1, :2, :3, etc. - The first invocation of Bind() will match :0, the second invocation will match - :1, etc. Binding can provide 100% speedups for insert, select and update statements. -

    -

    The other variables, $size sets the buffer size for data storage, $type is - the optional descriptor type OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), - OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). - Lastly, instead of using the default :0, :1, etc names, you can define your - own bind-name using $name. -

    The following example shows 3 bind variables being used: - p1, p2 and p3. These variables are bound to :0, :1 and :2.

    -
    $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
    $DB->Bind($stmt, $p1);
    $DB->Bind($stmt, $p2);
    $DB->Bind($stmt, $p3);
    for ($i = 0; $i < $max; $i++) {
    $p1 = ?; $p2 = ?; $p3 = ?;
    $DB->Execute($stmt);
    }
    -

    You can also use named variables:

    -
    $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:name0, :name1, :name2)");
    $DB->Bind($stmt, $p1, "name0");
    $DB->Bind($stmt, $p2, "name1");
    $DB->Bind($stmt, $p3, "name2");
    for ($i = 0; $i < $max; $i++) {
    $p1 = ?; $p2 = ?; $p3 = ?;
    $DB->Execute($stmt);
    }
    -

    LogSQL($enable=true)

    -Call this method to install a SQL logging and timing function (using fnExecute). -Then all SQL statements are logged into an adodb_logsql table in a database. If -the adodb_logsql table does not exist, ADOdb will create the table if you have -the appropriate permissions. Returns the previous logging value (true for enabled, -false for disabled). Here are samples of the DDL for selected databases: -

    -

    		mysql:
    -		CREATE TABLE adodb_logsql (
    -		  created datetime NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 text NOT NULL,
    -		  params text NOT NULL,
    -		  tracer text NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		postgres:
    -		CREATE TABLE adodb_logsql (
    -		  created timestamp NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 text NOT NULL,
    -		  params text NOT NULL,
    -		  tracer text NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		mssql:
    -		CREATE TABLE adodb_logsql (
    -		  created datetime NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 varchar(4000) NOT NULL,
    -		  params varchar(3000) NOT NULL,
    -		  tracer varchar(500) NOT NULL,
    -		  timer decimal(16,6) NOT NULL
    -		)
    -		
    -		oci8:
    -		CREATE TABLE adodb_logsql (
    -		  created date NOT NULL,
    -		  sql0 varchar(250) NOT NULL,
    -		  sql1 varchar(4000) NOT NULL,
    -		  params varchar(4000),
    -		  tracer varchar(4000),
    -		  timer decimal(16,6) NOT NULL
    -		)
    -
    -Usage: -
    	$conn->LogSQL(); // turn on logging
    :
    $conn->Execute(...);
    :
    $conn->LogSQL(false); // turn off logging

    # output summary of SQL logging results
    $perf = NewPerfMonitor($conn);
    echo $perf->SuspiciousSQL();
    echo $perf->ExpensiveSQL();
    -

    One limitation of logging is that rollback also prevents SQL from being logged. -

    -If you prefer to use another name for the table used to store the SQL, you can override it by calling -adodb_perf::table($tablename), where $tablename is the new table name (you will still need to manually -create the table yourself). An example: -

    	include('adodb.inc.php');
    include('adodb-perf.inc.php');
    adodb_perf::table('my_logsql_table');
    -Also see Performance Monitor. -

    fnExecute and fnCacheExecute properties

    -

    These two properties allow you to define bottleneck functions for all sql statements - processed by ADOdb. This allows you to perform statistical analysis and query-rewriting - of your sql. -

    Examples of fnExecute

    -

    Here is an example of using fnExecute, to count all cached queries and non-cached - queries, you can do this:

    -
    # $db is the connection object
    -function &CountExecs($db, $sql, $inputarray)
    -{
    -global $EXECS;
    -
    -	if (!is_array(inputarray)) $EXECS++;
    -	# handle 2-dimensional input arrays
    -	else if (is_array(reset($inputarray))) $EXECS += sizeof($inputarray);
    -	else $EXECS++;
    -	
    -	# in PHP4.4 and PHP5, we need to return a value by reference
    -	$null = null;
    -	return $null;
    -}
    -
    -# $db is the connection object
    -function CountCachedExecs($db, $secs2cache, $sql, $inputarray)
    -{
    global $CACHED; $CACHED++;
    }

    $db = NewADOConnection('mysql');
    $db->Connect(...);
    $db->fnExecute = 'CountExecs';
    $db->fnCacheExecute = 'CountCachedExecs';
    :
    :
    # After many sql statements:`
    printf("<p>Total queries=%d; total cached=%d</p>",$EXECS+$CACHED, $CACHED);
    -

    The fnExecute function is called before the sql is parsed and executed, so - you can perform a query rewrite. If you are passing in a prepared statement, - then $sql is an array (see Prepare). The fnCacheExecute - function is only called if the recordset returned was cached. - The function parameters match the Execute and CacheExecute functions respectively, - except that $this (the connection object) is passed as the first parameter.

    -

    Since ADOdb 3.91, the behaviour of fnExecute varies depending on whether the - defined function returns a value. If it does not return a value, then the $sql - is executed as before. This is useful for query rewriting or counting sql queries. -

    On the other hand, you might want to replace the Execute function with one - of your own design. If this is the case, then have your function return a value. - If a value is returned, that value is returned immediately, without any further - processing. This is used internally by ADOdb to implement LogSQL() functionality. -

    -

    -


    -

    ADOConnection Utility Functions

    -

    BlankRecordSet([$queryid])

    -

    No longer available - removed since 1.99.

    -

    Concat($s1,$s2,....)

    -

    Generates the sql string used to concatenate $s1, $s2, etc together. Uses the - string in the concat_operator field to generate the concatenation. Override - this function if a concatenation operator is not used, eg. MySQL.

    -

    Returns the concatenated string.

    -

    DBDate($date)

    -

    Format the $date in the format the database accepts. This is used in - INSERT/UPDATE statements; for SELECT statements, use SQLDate. - The $date parameter can be a Unix integer timestamp or an ISO format - Y-m-d. Uses the fmtDate field, which holds the format to use. If null or false - or '' is passed in, it will be converted to an SQL null.

    -

    Returns the date as a quoted string.

    -
    -	$sql = "select * from atable where created > ".$db->DBDate("$year-$month-$day");
    -	$db->Execute($sql);
    -
    -

    BindDate($date)

    -

    Format the $date in the bind format the database accepts. Normally - this means that the date string is not quoted, unlike DBDate, which quotes the string. -

    -	$sql = "select * from atable where created > ".$db->Param('0');
    -	// or
    -	$sql = "select * from atable where created > ?";
    -	$db->Execute($sql,array($db->BindDate("$year-$month-$day"));
    -
    -

    DBTimeStamp($ts)

    -

    Format the timestamp $ts in the format the database accepts; this can - be a Unix integer timestamp or an ISO format Y-m-d H:i:s. Uses the fmtTimeStamp - field, which holds the format to use. If null or false or '' is passed in, it - will be converted to an SQL null.

    -

    Returns the timestamp as a quoted string.

    -
    -	$sql = "select * from atable where created > ".$db->DBTimeStamp("$year-$month-$day $hr:$min:$secs");
    -	$db->Execute($sql);
    -
    -

    BindTimeStamp($ts)

    -

    Format the timestamp $ts in the bind format the database accepts. Normally - this means that the timestamp string is not quoted, unlike DBTimeStamp, which quotes the string. -

    -	$sql = "select * from atable where created > ".$db->Param('0');
    -	// or
    -	$sql = "select * from atable where created > ?";
    -	$db->Execute($sql,array($db->BindTimeStamp("$year-$month-$day $hr:$min:$secs"));
    -
    -

    qstr($s,[$magic_quotes_enabled=false])

    -

    Quotes a string to be sent to the database. The $magic_quotes_enabled - parameter may look funny, but the idea is if you are quoting a string extracted - from a POST/GET variable, then pass get_magic_quotes_gpc() as the second parameter. - This will ensure that the variable is not quoted twice, once by qstr - and once by the magic_quotes_gpc.

    -

    Eg. $s = $db->qstr(HTTP_GET_VARS['name'],get_magic_quotes_gpc());

    -

    Returns the quoted string.

    -

    Quote($s)

    -

    Quotes the string $s, escaping the database specific quote character as appropriate. - Formerly checked magic quotes setting, but this was disabled since 3.31 for - compatibility with PEAR DB. -

    Affected_Rows( )

    -

    Returns the number of rows affected by a update or delete statement. Returns - false if function not supported.

    -

    Not supported by interbase/firebird currently.

    -

    Insert_ID( )

    -

    Returns the last autonumbering ID inserted. Returns false if function not supported. -

    -

    Only supported by databases that support auto-increment or object id's, such - as PostgreSQL, MySQL and MS SQL Server currently. PostgreSQL returns the OID, which - can change on a database reload.

    -

    RowLock($table,$where)

    -

    Lock a table row for the duration of a transaction. For example to lock record $id in table1: -

    	$DB->StartTrans();
    $DB->RowLock("table1","rowid=$id");
    $DB->Execute($sql1);
    $DB->Execute($sql2);
    $DB->CompleteTrans();
    -

    Supported in db2, interbase, informix, mssql, oci8, postgres, sybase. -

    MetaDatabases()

    -

    Returns a list of databases available on the server as an array. You have to - connect to the server first. Only available for ODBC, MySQL and ADO.

    -

    MetaTables($ttype = false, $showSchema = false, - $mask=false)

    -

    Returns an array of tables and views for the current database as an array. - The array should exclude system catalog tables if possible. To only show tables, - use $db->MetaTables('TABLES'). To show only views, use $db->MetaTables('VIEWS'). - The $showSchema parameter currently works only for DB2, and when set to true, - will add the schema name to the table, eg. "SCHEMA.TABLE".

    -

    You can define a mask for matching. For example, setting $mask = 'TMP%' will - match all tables that begin with 'TMP'. Currently only mssql, oci8, odbc_mssql - and postgres* support $mask. -

    MetaColumns($table,$notcasesensitive=true)

    -

    Returns an array of ADOFieldObject's, one field object for every column of - $table. A field object is a class instance with (name, type, max_length) defined. - Currently Sybase does not recognise date types, and ADO cannot identify - the correct data type (so we default to varchar). -

    The $notcasesensitive parameter determines whether we uppercase or lowercase the table name to normalize it - (required for some databases). Does not work with MySQL ISAM tables. -

    For schema support, pass in the $table parameter, "$schema.$tablename". This is only - supported for selected databases. -

    MetaColumnNames($table,$numericIndex=false)

    -

    Returns an array of column names for $table. Since ADOdb 4.22, this is an associative array, with the -keys in uppercase. Set $numericIndex=true if you want the old behaviour of numeric indexes (since 4.23). -

    -e.g. array('FIELD1' => 'Field1', 'FIELD2'=>'Field2') -

    -

    MetaPrimaryKeys($table, - $owner=false) -

    -

    Returns an array containing column names that are the - primary keys of $table. Supported by mysql, odbc (including db2, odbc_mssql, -etc), mssql, postgres, interbase/firebird, oci8 currently.

    -

    Views (and some tables) have primary keys, but sometimes this information is not available from the -database. You can define a function ADODB_View_PrimaryKeys($databaseType, $database, $view, $owner) that -should return an array containing the fields that make up the primary key. If that function exists, -it will be called when MetaPrimaryKeys() cannot find a primary key for a table or view. -

    // In this example: dbtype = 'oci8', $db = 'mydb', $view = 'dataView', $owner = false 
    function ADODB_View_PrimaryKeys($dbtype,$db,$view,$owner)
    {
    switch(strtoupper($view)) {
    case 'DATAVIEW': return array('DATAID');
    default: return false;
    }
    }

    $db = NewADOConnection('oci8');
    $db->Connect('localhost','root','','mydb');
    $db->MetaPrimaryKeys('dataView');
    -

    ServerInfo() -

    -

    Returns an array of containing two elements 'description' - and 'version'. The 'description' element contains the string description of - the database. The 'version' naturally holds the version number (which is also -a string).

    -

    MetaForeignKeys($table, $owner=false, $upper=false) -

    Returns an associate array of foreign keys, or false if not supported. For - example, if table employee has a foreign key where employee.deptkey points to - dept_table.deptid, and employee.posn=posn_table.postionid and employee.poscategory=posn_table.category, - then $conn->MetaForeignKeys('employee') will return -

    	array(
    'dept_table' => array('deptkey=deptid'),
    'posn_table' => array('posn=positionid','poscategory=category')
    )
    -

    The optional schema or owner can be defined in $owner. If $upper is true, then - the table names (array keys) are upper-cased. -


    -

    ADORecordSet

    -

    When an SQL statement successfully is executed by ADOConnection->Execute($sql),an - ADORecordSet object is returned. This object contains a virtual cursor so we - can move from row to row, functions to obtain information about the columns - and column types, and helper functions to deal with formating the results to - show to the user.

    -

    ADORecordSet Fields

    -

    fields: Array containing the current row. This is not associative, but - is an indexed array from 0 to columns-1. See also the function Fields, - which behaves like an associative array.

    -

    dataProvider: The underlying mechanism used to connect to the database. - Normally set to native, unless using odbc or ado.

    -

    blobSize: Maximum size of a char, string or varchar object before it - is treated as a Blob (Blob's should be shown with textarea's). See the MetaType - function.

    -

    sql: Holds the sql statement used to generate this record set.

    -

    canSeek: Set to true if Move( ) function works.

    -

    EOF: True if we have scrolled the cursor past the last record.

    -

    ADORecordSet Functions

    -

    ADORecordSet( )

    -

    Constructer. Normally you never call this function yourself.

    -

    GetAssoc([$force_array])

    -

    Generates an associative array from the recordset. Note that is this function - is also available in the connection object. More details - can be found there.

    - -

    GetArray([$number_of_rows])

    -

    Generate a 2-dimensional array of records from the current - cursor position, indexed from 0 to $number_of_rows - 1. If $number_of_rows - is undefined, till EOF.

    -

    GetRows([$number_of_rows])

    -Generate a 2-dimensional array of records from the current -cursor position. Synonym for GetArray() for compatibility with Microsoft ADO. -

    GetMenu($name, [$default_str=''], - [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])

    -

    Generate a HTML menu (<select><option><option></select>). - The first column of the recordset (fields[0]) will hold the string to display - in the option tags. If the recordset has more than 1 column, the second column - (fields[1]) is the value to send back to the web server.. The menu will be -given the name $name.

    -

    If $default_str is defined, then if $default_str == - fields[0], that field is selected. If $blank1stItem is true, the first - option is empty. You can also set the first option strings by setting $blank1stItem - = "$value:$text".

    -

    $Default_str can be array for a multiple select -listbox.

    -

    To get a listbox, set the $size to a non-zero - value (or pass $default_str as an array). If $multiple_select is true - then a listbox will be generated with $size items (or if $size==0, - then 5 items) visible, and we will return an array to a server. Lastly use - $moreAttr to add additional attributes such as javascript or styles.

    -

    Menu Example 1: GetMenu('menu1','A',true) will - generate a menu: - -for the data (A,1), (B,2), (C,3). Also see example 5.

    -

    Menu Example 2: For the same data, GetMenu('menu1',array('A','B'),false) will - generate a menu with both A and B selected:
    - -

    -

    GetMenu2($name, [$default_str=''], - [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])

    -

    This is nearly identical to GetMenu, except that the - $default_str is matched to fields[1] (the option values).

    -

    Menu Example 3: Given the data in menu example 2, GetMenu2('menu1',array('1','2'),false) will - generate a menu with both A and B selected in menu example 2, but this time - the selection is based on the 2nd column, which holds the values to return -to the Web server.

    -

    UserDate($str, [$fmt])

    -

    Converts the date string $str to another format. - The date format is Y-m-d, or Unix timestamp format. The default $fmt is -Y-m-d.

    -

    UserTimeStamp($str, [$fmt])

    -

    Converts the timestamp string $str to another - format. The timestamp format is Y-m-d H:i:s, as in '2002-02-28 23:00:12', - or Unix timestamp format. UserTimeStamp calls UnixTimeStamp to parse $str, -and $fmt defaults to Y-m-d H:i:s if not defined.

    -

    UnixDate($str)

    -

    Parses the date string $str and returns it in - unix mktime format (eg. a number indicating the seconds after January 1st, - 1970). Expects the date to be in Y-m-d H:i:s format, except for Sybase and - Microsoft SQL Server, where M d Y is also accepted (the 3 letter month strings - are controlled by a global array, which might need localisation).

    -

    This function is available in both ADORecordSet and -ADOConnection since 1.91.

    -

    UnixTimeStamp($str)

    -

    Parses the timestamp string $str and returns - it in unix mktime format (eg. a number indicating the seconds after January - 1st, 1970). Expects the date to be in "Y-m-d, H:i:s" (1970-12-24, 00:00:00) - or "Y-m-d H:i:s" (1970-12-24 00:00:00) or "YmdHis" (19701225000000) format, - except for Sybase and Microsoft SQL Server, where "M d Y h:i:sA" (Dec 25 - 1970 00:00:00AM) is also accepted (the 3 letter month strings are controlled -by a global array, which might need localisation).

    - -

    This function is available in both ADORecordSet - and ADOConnection since 1.91.

    -

    OffsetDate($dayFraction, - $basedate=false)

    -

    Returns a string with the native SQL functions to calculate - future and past dates based on $basedate in a portable fashion. If $basedate - is not defined, then the current date (at 12 midnight) is used. Returns the - SQL string that performs the calculation when passed to Execute().

    -

    For example, in Oracle, to find the date and time that - is 2.5 days from today, you can use:

    -
    # get date one week from now
    $fld = $conn->OffsetDate(7); // returns "(trunc(sysdate)+7")
    -
    # get date and time that is 60 hours from current date and time
    $fld = $conn->OffsetDate(2.5, $conn->sysTimeStamp); // returns "(sysdate+2.5)"

    $conn->Execute("UPDATE TABLE SET dodate=$fld WHERE ID=$id");
    -

    This function is available for mysql, mssql, oracle, oci8 and postgresql drivers - since 2.13. It might work with other drivers provided they allow performing - numeric day arithmetic on dates.

    - -

    SQLDate($dateFormat, $basedate=false)

    -Returns a string which contains the native SQL functions -to format a date or date column $basedate. This is used in SELECT statements. -For INSERT/UPDATE statements, use DBDate. It uses a case-sensitive -$dateFormat, which supports: -
     
    -  Y: 4-digit Year
    -  Q: Quarter (1-4)
    -  M: Month (Jan-Dec)
    -  m: Month (01-12)
    -  d: Day (01-31)
    -  H: Hour (00-23)
    -  h: Hour (1-12)
    -  i: Minute (00-59)
    -  s: Second (00-60)
    -  A: AM/PM indicator
    -  w: day of week (0-6 or 1-7 depending on DB)
    -  l: day of week (as string - lowercase L)
    -  W: week in year (0..53 for MySQL, 1..53 for PostgreSQL and Oracle)
    -  
    -

    All other characters are treated as strings. You can - also use \ to escape characters. Available on selected databases, including -mysql, postgresql, mssql, oci8 and DB2.

    -

    This is useful in writing portable sql statements that - GROUP BY on dates. For example to display total cost of goods sold broken -by quarter (dates are stored in a field called postdate):

    -
     $sqlfn = $db->SQLDate('Y-\QQ','postdate'); # get sql that formats postdate to output 2002-Q1
    $sql = "SELECT $sqlfn,SUM(cogs) FROM table GROUP BY $sqlfn ORDER BY 1 desc";
    -

    MoveNext( )

    -

    Move the internal cursor to the next row. The $this->fields array - is automatically updated. Returns false if unable to do so (normally because -EOF has been reached), otherwise true.

    -

    If EOF is reached, then the $this->fields array - is set to false (this was only implemented consistently in ADOdb 3.30). For - the pre-3.30 behaviour of $this->fields (at EOF), set the global variable - $ADODB_COMPAT_FETCH = true.

    -

    Example:

    -
    $rs = $db->Execute($sql);
    if ($rs)
    while (!$rs->EOF) {
    ProcessArray($rs->fields);
    $rs->MoveNext();
    }
    -

    Move($to)

    -

    Moves the internal cursor to a specific row $to. - Rows are zero-based eg. 0 is the first row. The fields array is automatically - updated. For databases that do not support scrolling internally, ADOdb will - simulate forward scrolling. Some databases do not support backward scrolling. - If the $to position is after the EOF, $to will move to the - end of the RecordSet for most databases. Some obscure databases using odbc - might not behave this way.

    -

    Note: This function uses absolute positioning, -unlike Microsoft's ADO.

    -

    Returns true or false. If false, the internal cursor - is not moved in most implementations, so AbsolutePosition( ) will return - the last cursor position before the Move( ).

    -

    MoveFirst()

    -

    Internally calls Move(0). Note that some databases do -not support this function.

    -

    MoveLast()

    -

    Internally calls Move(RecordCount()-1). Note that some - databases do not support this function.

    -

    GetRowAssoc($toUpper=true)

    -

    Returns an associative array containing the current - row. The keys to the array are the column names. The column names are upper-cased - for easy access. To get the next row, you will still need to call MoveNext().

    -

    For example:
    -Array ( [ID] => 1 [FIRSTNAME] => Caroline [LASTNAME] => Miranda [CREATED] -=> 2001-07-05 )

    -

    Note: do not use GetRowAssoc() with $ADODB_FETCH_MODE - = ADODB_FETCH_ASSOC. Because they have the same functionality, they will - interfere with each other.

    - -

    AbsolutePage($page=-1)

    -

    Returns the current page. Requires PageExecute()/CachePageExecute() to be called. - See Example 8.

    - -

    AtFirstPage($status='')

    -

    Returns true if at first page (1-based). Requires PageExecute()/CachePageExecute() - to be called. See Example 8.

    -

    AtLastPage($status='')

    -

    Returns true if at last page (1-based). Requires PageExecute()/CachePageExecute() - to be called. See Example 8.

    -

    Fields($colname)

    -

    Returns the value of the associated column $colname for the current - row. The column name is case-insensitive.

    -

    This is a convenience function. For higher performance, use $ADODB_FETCH_MODE.

    -

    FetchRow()

    -

    Returns array containing current row, or false - if EOF. FetchRow( ) internally moves to the next record after returning the - current row.

    -

    Warning: Do not mix using FetchRow() with MoveNext().

    -

    Usage:

    -
    $rs = $db->Execute($sql);
    if ($rs)
    while ($arr = $rs->FetchRow()) {
      # process $arr
    }
    -

    FetchInto(&$array)

    -

    Sets $array to the current row. Returns PEAR_Error - object if EOF, 1 if ok (DB_OK constant). If PEAR is undefined, false is returned - when EOF. FetchInto( ) internally moves to the next record after returning - the current row.

    -

    FetchRow() is easier to use. See above.

    - -

    FetchField($column_number)

    -

    Returns an object containing the name, type and max_length of - the associated field. If the max_length cannot be determined reliably, it - will be set to -1. The column numbers are zero-based. See example - 2.

    -

    FieldCount( )

    -

    Returns the number of fields (columns) in the record -set.

    -

    RecordCount( )

    -

    Returns the number of rows in the record set. If the - number of records returned cannot be determined from the database driver - API, we will buffer all rows and return a count of the rows after all the - records have been retrieved. This buffering can be disabled (for performance - reasons) by setting the global variable $ADODB_COUNTRECS = false. When disabled, - RecordCount( ) will return -1 for certain databases. See the supported databases - list above for more details.

    -

    RowCount is a synonym for RecordCount.

    -

    PO_RecordCount($table, -$where)

    -

    Returns the number of rows in the record set. If the - database does not support this, it will perform a SELECT COUNT(*) on the - table $table, with the given $where condition to return an estimate of the - recordset size.

    -

    $numrows = $rs->PO_RecordCount("articles_table", "group=$group");

    - NextRecordSet() -

    For databases that allow multiple recordsets to be returned - in one query, this function allows you to switch to the next recordset. Currently - only supported by mssql driver.

    -
    $rs = $db->Execute('execute return_multiple_rs');
    $arr1 = $rs->GetArray();
    $rs->NextRecordSet();
    $arr2 = $rs->GetArray();
    -

    FetchObject($toupper=true)

    -

    Returns the current row as an object. If you set $toupper - to true, then the object fields are set to upper-case. Note: The newer FetchNextObject() - is the recommended way of accessing rows as objects. See below.

    -

    FetchNextObject($toupper=true)

    -

    Gets the current row as an object and moves to the next - row automatically. Returns false if at end-of-file. If you set $toupper to - true, then the object fields are set to upper-case. Note that for some drivers such as mssql, you need to SetFetchMode(ADODB_FETCH_ASSOC) or SetFetchMode(ADODB_FETCH_BOTH).

    -
    $rs = $db->Execute('select firstname,lastname from table');
    if ($rs) {
    while ($o = $rs->FetchNextObject()) {
    print "$o->FIRSTNAME, $o->LASTNAME<BR>";
    }
    }
    -

    There is some trade-off in speed in using FetchNextObject(). -If performance is important, you should access rows with the fields[] array. FetchObj()

    -

    Returns the current record as an object. Fields are - not upper-cased, unlike FetchObject. -

    -

    FetchNextObj()

    -

    Returns the current record as an object and moves to - the next record. If EOF, false is returned. Fields are not upper-cased, unlike - FetctNextObject.

    - -

    CurrentRow( )

    -

    Returns the current row of the record set. 0 is the first row.

    -

    AbsolutePosition( )

    -

    Synonym for CurrentRow for compatibility with ADO. Returns the current - row of the record set. 0 is the first row.

    -

    MetaType($nativeDBType[,$field_max_length],[$fieldobj])

    -

    Determine what generic meta type a database field type is given its - native type $nativeDBType as a string and the length of the field $field_max_length. - Note that field_max_length can be -1 if it is not known. The field object returned - by FetchField() can be passed in $fieldobj or as the 1st parameter $nativeDBType. - This is useful for databases such as mysql which has additional properties - in the field object such as primary_key.

    -

    Uses the field blobSize and compares it with $field_max_length to - determine whether the character field is actually a blob.

    -For example, $db->MetaType('char') will return 'C'. -

    Returns:

    -
      -
    • C: Character fields that should be shown in a <input type="text"> tag.
    • -
    • X: Clob (character large objects), or large text fields that should - be shown in a <textarea>
    • -
    • D: Date field
    • -
    • T: Timestamp field
    • -
    • L: Logical field (boolean or bit-field)
    • -
    • N: Numeric field. Includes decimal, numeric, floating point, and - real.
    • -
    • I:  Integer field.
    • -
    • R: Counter or Autoincrement field. Must be numeric.
    • -
    • B: Blob, or binary large objects.
    • -
    -

    Since ADOdb 3.0, MetaType accepts $fieldobj - as the first parameter, instead of $nativeDBType.

    - -

    Close( )

    -

    Closes the recordset, cleaning all memory and resources -associated with the recordset.

    -

    -If memory management is not an issue, you do not need to -call this function as recordsets are closed for you by PHP at the end of the -script. SQL statements such as INSERT/UPDATE/DELETE do not really return a recordset, -so you do not have to call Close() for such SQL statements.

    -
    -

    function rs2html($adorecordset,[$tableheader_attributes], - [$col_titles])

    -

    This is a standalone function (rs2html = recordset to - html) that is similar to PHP's odbc_result_all function, it prints - a ADORecordSet, $adorecordset as a HTML table. $tableheader_attributes allow - you to control the table cellpadding, cellspacing and border attributes. - Lastly you can replace the database column names with your own column titles - with the array $col_titles. This is designed more as a quick debugging - mechanism, not a production table recordset viewer.

    -

    You will need to include the file tohtml.inc.php.

    -

    Example of rs2html:

    -
    <?
    include('tohtml.inc.php')
    ; # load code common to ADOdb
    include('adodb.inc.php'); # load code common to ADOdb
    $conn = &ADONewConnection('mysql'); # create a connection
    $conn->PConnect('localhost','userid','','agora');# connect to MySQL, agora db
    $sql = 'select CustomerName, CustomerID from customers';
    $rs = $conn->Execute($sql);
    rs2html($rs,'border=2 cellpadding=3',array('Customer Name','Customer ID'));
    ?>
    -
    -

    Differences between this ADOdb library and Microsoft -ADO

    -
      - -
    1. ADOdb only supports recordsets created by a connection object. Recordsets - cannot be created independently.
    2. -
    3. ADO properties are implemented as functions in ADOdb. This makes it easier - to implement any enhanced ADO functionality in the future.
    4. -
    5. ADOdb's ADORecordSet->Move() uses - absolute positioning, not relative. Bookmarks are not supported.
    6. -
    7. ADORecordSet->AbsolutePosition() cannot - be used to move the record cursor.
    8. -
    9. ADO Parameter objects are not supported. Instead we have the ADOConnection::Parameter( - ) function, which provides a simpler interface for calling preparing parameters - and calling stored procedures.
    10. -
    11. Recordset properties for paging records are available, but implemented as - in Example 8.
    12. -
    -
    -

    Database Driver Guide

    -

    This describes how to create a class to connect to a - new database. To ensure there is no duplication of work, kindly email me - at jlim#natsoft.com.my if you decide to create such a class.

    -

    First decide on a name in lower case to call the database - type. Let's say we call it xbase.

    -

    Then we need to create two classes ADODB_xbase and ADORecordSet_xbase - in the file adodb-xbase.inc.php.

    -

    The simplest form of database driver is an adaptation - of an existing ODBC driver. Then we just need to create the class ADODB_xbase - extends ADODB_odbc to support the new date and timestamp formats, - the concatenation operator used, true and false. For - the ADORecordSet_xbase extends ADORecordSet_odbc we need to change - the MetaType function. See adodb-vfp.inc.php as an example.

    -

    More complicated is a totally new database driver that - connects to a new PHP extension. Then you will need to implement several - functions. Fortunately, you do not have to modify most of the complex code. - You only need to override a few stub functions. See adodb-mysql.inc.php for - example.

    -

    The default date format of ADOdb internally is YYYY-MM-DD - (Ansi-92). All dates should be converted to that format when passing to an - ADOdb date function. See Oracle for an example how we use ALTER SESSION to - change the default date format in _pconnect _connect.

    -

    ADOConnection Functions to Override

    -

    Defining a constructor for your ADOConnection derived - function is optional. There is no need to call the base class constructor.

    -

    _connect: Low level implementation of Connect. - Returns true or false. Should set the _connectionID.

    -

    _pconnect: Low level implemention of PConnect. - Returns true or false. Should set the _connectionID.

    -

    _query: Execute a query. Returns the queryID, -or false.

    -

    _close: Close the connection -- PHP should clean -up all recordsets.

    -

    ErrorMsg: Stores the error message in the private -variable _errorMsg.

    -

    ADOConnection Fields to Set

    -

    _bindInputArray: Set to true if binding of parameters - for SQL inserts and updates is allowed using ?, eg. as with ODBC.

    -

    fmtDate

    -

    fmtTimeStamp

    -

    true

    -

    false

    -

    concat_operator

    -

    replaceQuote

    -

    hasLimit support SELECT * FROM TABLE LIMIT 10 -of MySQL.

    -

    hasTop support Microsoft style SELECT TOP 10 -* FROM TABLE.

    -

    ADORecordSet Functions to Override

    -

    You will need to define a constructor for your ADORecordSet - derived class that calls the parent class constructor.

    -

    FetchField: as documented above in ADORecordSet

    -

    _initrs: low level initialization of the recordset: - setup the _numOfRows and _numOfFields fields -- called by the - constructor.

    -

    _seek: seek to a particular row. Do not load - the data into the fields array. This is done by _fetch. Returns true or false. - Note that some implementations such as Interbase do not support seek. Set - canSeek to false.

    -

    _fetch: fetch a row using the database extension - function and then move to the next row. Sets the fields array. If - the parameter $ignore_fields is true then there is no need to populate the fields array, - just move to the next row. then Returns true or false.

    -

    _close: close the recordset

    -

    Fields: If the array row returned by the PHP - extension is not an associative one, you will have to override this. See - adodb-odbc.inc.php for an example. For databases such as MySQL and MSSQL - where an associative array is returned, there is no need to override this - function.

    -

    ADOConnection Fields to Set

    -

    canSeek: Set to true if the _seek function works.

    -

    Optimizing PHP

    - For info on tuning PHP, read this article on Optimizing - PHP.

    - -

    Change Log

    - -

    4.94 23 Jan 2007 -

    Active Record: $ADODB_ASSOC_CASE=2 did not work properly. Fixed. Thx gmane#auxbuss.com. -

    mysqli had bugs in BeginTrans() and EndTrans(). Fixed.

    -

    Improved error handling when no database is connected for oci8. Thx Andy Hassall.

    -

    Names longer than 30 chars in oci8 datadict will be changed to random name. Thx Eugenio. http://phplens.com/lens/lensforum/msgs.php?id=16182 -

    Added var $upperCase = 'ucase' to access and ado_access drivers. Thx Renato De Giovanni renato#cria.org.br

    -

    Postgres64 driver, if preparing plan failed in _query, did not handle error properly. Fixed. See http://phplens.com/lens/lensforum/msgs.php?id=16131. -

    Fixed GetActiveRecordsClass() reference bug. See http://phplens.com/lens/lensforum/msgs.php?id=16120 -

    - -Added handling of nulls in adodb-ado_mssql.inc.php for qstr(). Thx to Felix Rabinovich. -

    - -Adodb-dict contributions by Gaetano: -
    -+ Support for INDEX in data-dict. Example: -idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94. The following example features mutiple indexes, including a compound index idx_ev1. -

    -  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
    -  event_type I(4) NOTNULL  INDEX idx_evt,
    -  event_start_date T DEFAULT NULL INDEX id_esd,
    -  event_end_date T DEFAULT '0000-00-00 00:00:00' INDEX id_eted,
    -  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 INDEX id_evp,
    -  event_owner I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_project I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
    -  event_icon C(20) DEFAULT 'obj/event',
    -  event_description X
    -
    -
    -+ Prevents the generated SQL from including double drop-sequence statements for REPLACE case of tables with autoincrement columns (on those dbs that emulate it via sequences) -
    -+ makes any date defined as DEFAULT value for D and T columns work cross-database, not just the "sysdate" value (as long as it is specified using adodb standard format). See above example. -

    Fixed pdo's GetInsertID() support. Thx Ricky Su. -

    oci8 Prepare() now sets error messages if an error occurs. -

    Added 'PT_BR' to SetDateLocale() -- brazilian portugese. -

    charset in oci8 was not set correctly on *Connect() -

    ADOConnection::Transpose() now appends as first column the field names. -

    Added $ADODB_QUOTE_FIELDNAMES. If set to true, will autoquote field names in AutoExecute(),GetInsertSQL(), GetUpdateSQL(). -

    Transpose now adds the field names as the first column after transposition. -

    Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter. -

    Added ErrorNo() to adodb-active-record.inc.php. Thx ante#novisplet.com. - - - -

    4.93 10 Oct 2006 -

    Added support for multiple database connections in performance monitoring code (adodb-perf.inc.php). Now all sql in multiple database connections can be saved into one database ($ADODB_LOG_CONN). -

    Added MetaIndexes() to odbc_mssql. -

    Added connection property $db->null2null = 'null'. In autoexecute/getinsertsql/getupdatesql, this value will be converted to a null. Set this to a funny invalid value if you do not want null conversion. See http://phplens.com/lens/lensforum/msgs.php?id=15902. -

    Path disclosure problem in mysqli fixed. Thx Andy. -

    Fixed typo in session_schema2.xml. -

    Changed INT in oci8 to return correct precision in $fld->max_length, MetaColumns(). Thx Eloy Lafuente Plaza. -

    Patched postgres64 _connect to handle serverinfo(). see http://phplens.com/lens/lensforum/msgs.php?id=15887. -

    Added pdo fix for null columns. See http://phplens.com/lens/lensforum/msgs.php?id=15889 -

    For stored procedures, missing connection id now passed into mssql_query(). Thx Ecsy (ecsy#freemail.hu). - -

    4.92a 30 Aug 2006 -

    Syntax error in postgres7 driver. Thx Eloy Lafuente Plaza. -

    Minor bug fixes - adodb informix 10 types added to adodb.inc.php. Thx Fernando Ortiz. - -

    4.92 29 Aug 2006 - -

    Better odbtp date support. -

    Added IgnoreErrors() to bypass default error handling. -

    The _adodb_getcount() function in adodb-lib.inc.php, some ORDER BY bug fixes. -

    For ibase and firebird, set $sysTimeStamp = "CURRENT_TIMESTAMP". -

    Fixed postgres connection bug: http://phplens.com/lens/lensforum/msgs.php?id=11057. -

    Changed CacheSelectLimit() to flush cache when $secs2cache==-1 due to complaints from other users. -

    Added support for using memcached with CacheExecute/CacheSelectLimit. Requires memcache module PECL extension. Usage: -

    -$db = NewADOConnection($driver);
    -$db->memCache = true; /// should we use memCache instead of caching in files
    -$db->memCacheHost = 126.0.1.1; /// memCache host
    -$db->memCachePort = 11211; /// this is default memCache port
    -$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
    -
    -$db->Connect(...);
    -$db->CacheExecute($sql);
    -
    -

    Implemented Transpose() for recordsets. Recordset must be retrieved using ADODB_FETCH_NUM. First column becomes the -column name. -

    -$DB = NewADOConnection('mysql');
    -$DB->Connect(...);
    -$DB->SetFetchMode(ADODB_FETCH_NUM);
    -$rs = $DB->Execute('select productname,productid,unitprice from products limit 10');
    -$rs2 = $DB->Transpose($rs);
    -rs2html($rs2);
    -
    -

    4.91 2 Aug 2006 -

    Major session code rewrite .... See session docs. -

    PDO bindinputarray was not set properly for MySQL (changed from true to false). -

    Changed CacheSelectLimit() to re-cache when $secs2cache==0. This is one way to flush the cache when SelectLimit is called. -

    Added to quotes to mysql and mysqli: "SHOW COLUMNS FROM `%s`"; -

    Removed accidental optgroup handling in GetMenu(). -Fixed ibase _BlobDecode for php5 compat, and also mem alloc issues for small blobs, thx salvatori#interia.pl -

    Mysql driver OffsetDate() speedup, useful for adodb-sessions. -

    Fix for GetAssoc() PHP5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=15425 -

    Active Record - If inserting a record and the value of a primary key field is null, then we do not insert that field in as we assume it is an auto-increment field. Needed by mssql. -

    Changed postgres7 MetaForeignKeys() see http://phplens.com/lens/lensforum/msgs.php?id=15531 -

    DB2 will now return db2_conn_errormsg() when it is a connection error. -

    4.90 8 June 2006 -

    Changed adodb_countrec() in adodb-lib.inc.php to allow LIMIT to be used as a speedup to reduce no of records counted. -

    Added support for transaction modes for postgres and oci8 with SetTransactionMode(). -These transaction modes affect all subsequent transactions of that connection. -

    Thanks to Halmai Csongor for suggestion. -

    Removed $off = $fieldOffset - 1 line in db2 driver, FetchField(). Tx Larry Menard. -

    Added support for PHP5 objects as Execute() bind parameters using __toString (eg. Simple-XML). Thx Carl-Christian Salvesen. -

    Rounding in tohtml.inc.php did not work properly. Fixed. -

    MetaIndexes in postgres fails when fields are deleted then added in again because the attnum has gaps in it. -See http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976. Fixed. -

    MetaForeignkeys in mysql and mysqli did not work when fetchMode==ADODB_FETCH_ASSOC used. Fixed. -

    Reference error in AutoExecute() fixed. -

    Added macaddr postgres type to MetaType. Maps to 'C'. -

    Added to _connect() in adodb-ado5.inc.php support for $database and $dataProvider parameters. Thx Larry Menard. -

    Added support for sequences in adodb-ado_mssql.inc.php. Thx Larry Menard. -

    Added ADODB_SESSION_READONLY. -

    Added session expiryref support to crc32 mode, and in LOB code. -

    Clear _errorMsg in postgres7 driver, so that ErrorMsg() displays properly when no error occurs. -

    Added BindDate and BindTimeStamp -

    4.81 3 May 2006 -

    Fixed variable ref errors in adodb-ado5.inc.php in _query(). -

    Mysqli setcharset fix using method_exists(). -

    The adodb-perf.inc.php CreateLogTable() code now works for user-defined table names. -

    Error in ibase_blob_open() fixed. See http://phplens.com/lens/lensforum/msgs.php?id=14997 -

    4.80 8 Mar 2006 -

    Added activerecord support. -

    Added mysql $conn->compat323 = true if you want MySQL 3.23 compat enabled. Fixes GetOne() Select-Limit problems. -

    Added adodb-xmlschema03.inc.php to support XML Schema version 3 and updated adodb-datadict.htm docs. -

    Better memory management in Execute. Thx Mike Fedyk. -

    4.72 21 Feb 2006 -

    Added 'new' DSN parameter for NConnect(). -

    Pager now sanitizes $PHP_SELF to protect against XSS. Thx to James Bercegay and others. -

    ADOConnection::MetaType changed to setup $rs->connection correctly. -

    New native DB2 driver contributed by Larry Menard, Dan Scott, Andy Staudacher, Bharat Mediratta. -

    The mssql CreateSequence() did not BEGIN TRANSACTION correctly. Fixed. Thx Sean Lee. -

    The _adodb_countrecs() function in adodb-lib.inc.php has been revised to handle more ORDER BY variations. -

    4.71 24 Jan 2006 -

    Fixes postgresql security issue related to binary strings. Thx to Andy Staudacher. -

    Several DSN bugs found: -

    1. Fix bugs in DSN connections introduced in 4.70 when underscores are found in the DSN. -

    2. DSN with _ did not work properly in PHP5 (fine in PHP4). Fixed. -

    3. Added support for PDO DSN connections in NewADOConnection(), and database parameter in PDO::Connect(). -

    The oci8 datetime flag not correctly implemented in ADORecordSet_array. Fixed. -

    Added BlobDelete() to postgres, as a counterpoint to UpdateBlobFile(). -

    Fixed GetInsertSQL() to support oci8po. -

    Fixed qstr() issue with postgresql with \0 in strings. -

    Fixed some datadict driver loading issues in _adodb_getdriver(). -

    Added register shutdown function session_write_close in adodb-session.inc.php for PHP 5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=14200. -

    4.70 6 Jan 2006 -

    Many fixes from Danila Ulyanov to ibase, oci8, postgres, mssql, odbc_oracle, odbtp, etc drivers. -

    Changed usage of binary hint in adodb-session.inc.php for mysql. See -http://phplens.com/lens/lensforum/msgs.php?id=14160 -

    Fixed invalid variable reference problem in undomq(), adodb-perf.inc.php. -

    Fixed http://phplens.com/lens/lensforum/msgs.php?id=14254 in adodb-perf.inc.php, _DBParameter() settings of fetchmode was wrong. -

    Fixed security issues in server.php and tmssql.php discussed by Andreas Sandblad in a Secunia security advisory. Added $ACCEPTIP = 127.0.0.1 -and changed suggested root password to something more secure. -

    Changed pager to close recordset after RenderLayout(). -

    4.68 25 Nov 2005 -

    PHP 5 compat for mysqli. MetaForeignKeys repeated twice and MYSQLI_BINARY_FLAG missing. -

    PHP 5.1 support for postgresql bind parameters using ? did not work if >= 10 parameters. Fixed. Thx to Stanislav Shramko. -

    Lots of PDO improvements. -

    Spelling error fixed in mysql MetaForeignKeys, $associative parameter. -

    4.67 16 Nov 2005 -

    Postgresql not_null flag not set to false correctly. Thx Cristian MARIN. -

    We now check in Replace() if key is in fieldArray. Thx Sbastien Vanvelthem. -

    _file_get_contents() function was missing in xmlschema. fixed. -

    Added week in year support to SQLDate(), using 'W' flag. Thx Spider. -

    In sqlite metacolumns was repeated twice, causing PHP 5 problems. Fixed. -

    Made debug output XHTML compliant. -

    4.66 28 Sept 2005 -

    ExecuteCursor() in oci8 did not clean up properly on failure. Fixed. -

    Updated xmlschema.dtd, by "Alec Smecher" asmecher#smecher.bc.ca -

    Hardened SelectLimit, typecasting nrows and offset to integer. -

    Fixed misc bugs in AutoExecute() and GetInsertSQL(). -

    Added $conn->database as the property holding the database name. The older $conn->databaseName is retained for backward -compat. -

    Changed _adodb_backtrace() compat check to use function_exists(). -

    Bug in postgresql MetaIndexes fixed. Thx Kevin Jamieson. -

    Improved OffsetDate for MySQL, reducing rounding error. -

    Metacolumns added to sqlite. Thx Mark Newnham. -

    PHP 4.4 compat fixes for GetAssoc(). -

    Added postgresql bind support for php 5.1. Thx Cristiano da Cunha Duarte -

    OffsetDate() fixes for postgresql, typecasting strings to date or timestamp. -

    DBTimeStamp formats for mssql, odbc_mssql and postgresql made to conform with other db's. -

    Changed PDO constants from PDO_ to PDO:: to support latest spec. -

    4.65 22 July 2005 -

    Reverted 'X' in mssql datadict to 'TEXT' to be compat with mssql driver. However now you can -set $datadict->typeX = 'varchar(4000)' or 'TEXT' or 'CLOB' for mssql and oci8 drivers. -

    Added charset support when using DSN for Oracle. -

    _adodb_getmenu did not use fieldcount() to get number of fields. Fixed. -

    MetaForeignKeys() for mysql/mysqli contributed by Juan Carlos Gonzalez. -

    MetaDatabases() now correctly returns an array for mysqli driver. Thx Cristian MARIN. -

    CompleteTrans(false) did not return false. Fixed. Thx to JMF. -

    AutoExecute() did not work with Oracle. Fixed. Thx Jos Moreira. -

    MetaType() added to connection object. -

    More PHP 4.4 reference return fixes. Thx Ryan C Bonham and others. - -

    4.64 20 June 2005 -

    In datadict, if the default field value is set to '', then it is not applied when the field is created. Fixed by Eugenio. -

    MetaPrimaryKeys for postgres did not work because of true/false change in 4.63. Fixed. -

    Tested ocifetchstatement in oci8. Rejected at the end. -

    Added port to dsn handling. Supported in postgres, mysql, mysqli,ldap. -

    Added 'w' and 'l' to mysqli SQLDate(). -

    Fixed error handling in ldap _connect() to be more consistent. Also added ErrorMsg() handling to ldap. -

    Added support for union in _adodb_getcount, adodb-lib.inc.php for postgres and oci8. -

    rs2html() did not work with null dates properly. -

    PHP 4.4 reference return fixes. - -

    4.63 18 May 2005 -

    Added $nrows<0 check to mysqli's SelectLimit(). -

    Added OptimizeTable() and OptimizeTables() in adodb-perf.inc.php. By Markus Staab. -

    PostgreSQL inconsistencies fixed. true and false set to TRUE and FALSE, and boolean type in datadict-postgres.inc.php set -to 'L' => 'BOOLEAN'. Thx Kevin Jamieson. -

    New adodb_session_create_table() function in adodb-session.inc.php. By Markus Staab. -

    Added null check to UserTimeStamp(). -

    Fixed typo in mysqlt driver in adorecordset. Thx to Andy Staudacher. -

    GenID() had a bug in the raiseErrorFn handling. Fixed. Thx Marcos Pont. -

    Datadict name quoting now handles ( ) in index fields correctly - they aren't part of the index field. -

    Performance monitoring: (1) oci8 Ixora checks moved down; (2) expensive sql changed so that only those sql with -count(*)>1 are shown; (3) changed sql1 field to a length+crc32 checksum - this breaks backward compat. -

    We remap firebird15 to firebird in data dictionary. - -

    4.62 2 Apr 2005 -

    Added 'w' (dow as 0-6 or 1-7) and 'l' (dow as string) for SQLDate for oci8, postgres and mysql. -

    Rolled back MetaType() changes for mysqli done in prev version. -

    Datadict change by chris, cblin#tennaxia.com data mappings from: -

    -oci8:  X->varchar(4000) XL->CLOB
    -mssql: X->XL->TEXT
    -mysql: X->XL->LONGTEXT
    -fbird: X->XL->varchar(4000)
    -
    -

    to: -

    -oci8:  X->varchar(4000) XL->CLOB
    -mssql: X->VARCHAR(4000) XL->TEXT
    -mysql: X->TEXT          XL->LONGTEXT
    -fbird: X->VARCHAR(4000) XL->VARCHAR(32000)
    -
    -

    Added $connection->disableBlobs to postgresql to improve performance when no bytea is used (2-5% improvement). -

    Removed all HTTP_* vars. -

    Added $rs->tableName to be set before calling AutoExecute(). -

    Alex Rootoff rootoff#pisem.net contributed ukrainian language file. -

    Added new mysql_option() support using $conn->optionFlags array. -

    Added support for ldap_set_option() using the $LDAP_CONNECT_OPTIONS global variable. Contributed by Josh Eldridge. -

    Added LDAP_* constant definitions to ldap. -

    Added support for boolean bind variables. We use $conn->false and $conn->true to hold values to set false/true to. -

    We now do not close the session connection in adodb-session.inc.php as other objects could be using this connection. -

    We now strip off \0 at end of Ixora SQL strings in $perf->tohtml() for oci8. -

    4.61 23 Feb 2005 -

    MySQLi added support for mysqli_connect_errno() and mysqli_connect_error(). -

    Massive improvements to alpha PDO driver. -

    Quote string bind parameters logged by performance monitor for easy type checking. Thx Jason Judge. -

    Added support for $role when connecting with Interbase/firebird. -

    Added support for enum recognition in MetaColumns() mysql and mysqli. Thx Amedeo Petrella. -

    The sybase_ase driver contributed by Interakt Online. Thx Cristian Marin cristic#interaktonline.com. -

    Removed not_null, has_default, and default_value from ADOFieldObject. -

    Sessions code, fixed quoting of keys when handling LOBs in session write() function. -

    Sessions code, added adodb_session_regenerate_id(), to reduce risk of session hijacking by changing session cookie dynamically. Thx Joe Li. -

    Perf monitor, polling for CPU did not work for PHP 4.3.10 and 5.0.0-5.0.3 due to PHP bugs, so we special case these versions. -

    Postgresql, UpdateBlob() added code to handle type==CLOB. -

    4.60 24 Jan 2005 -

    Implemented PEAR DB's autoExecute(). Simplified design because I don't like using constants when -strings work fine. -

    _rs2serialize will now update $rs->sql and $rs->oldProvider. -

    Added autoExecute(). -

    Added support for postgres8 driver. Currently just remapped to postgres7 driver. -

    Changed oci8 _query(), so that OCIBindByName() sets the length to -1 if element size is > 4000. This provides better support -for LONGs. -

    Added SetDateLocale() support for netherlands (Nl). -

    Spelling error in pivot code ($iff should be $iif). -

    mysql insert_id() did not work with mysql 3.x. Fixed. -

    "\r\n" not converted to spaces correctly in exporting data. Fixed. -

    _nconnect() in mysqli did not return value correctly. Fixed. -

    Arne Eckmann contributed danish language file. -

    Added clone() support to FetchObject() for PHP5.
    -

    -

    Removed SQL_CUR_USE_ODBC from odbc_mssql.
    -

    -

    4.55 5 Jan 2005 -

    Found bug in Execute() with bind params for db's that do not support binding natively. -

    DropSequence() now correctly uses default parameter. -

    Now Execute() ignores locale for floats, so 1.23 is NEVER converted to 1,23. -

    SetFetchMode() not properly saved in adodb-perf, suspicious sql and expensive sql. Fixed. -

    Added INET to postgresql metatypes. Thx motzel. -

    Allow oracle hints to work when counting with _adodb_getcount in adodb-lib.inc.php. Thx Chris Wrye. -

    Changed mysql insert_id() to use SELECT LAST_INSERT_ID(). -

    If alter col in datadict does not modify col type/size of actual -col, then it is removed from alter col code. By Mark Newham. Not -perfect as MetaType() !== ActualType(). -

    Added handling of view fields in metacolumns() for postgresql. Thx Renato De Giovanni. -

    Added to informix MetaPrimaryKeys and MetaColumns fixes for null bit. Thx to Cecilio Albero. -

    Removed obsolete connection_timeout() from perf code. -

    Added support for arrayClass in adodb-csv.inc.php. -

    RSFilter now accepts methods of the form $array($obj, 'methodname'). Thx to blake#near-time.com. -

    Changed CacheFlush to $cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; -

    For better cursor concurrency, added code to free ref cursors in -oci8 when $rs->Close() is called. Note that CLose() is called -internally by the Get* functions too. -

    Added IIF support for access when pivoting. Thx Volodia Krupach. -

    Added mssql datadict support for timestamp. Thx Alexios. -

    Informix pager fix. By Mario Ramirez. -

    ADODB_TABLE_REGEX now includes ':'. By Mario Ramirez. -

    Mark Newnham contributed MetaIndexes for oci8 and db2. -

    4.54 5 Nov 2004 -

    -Now you can set $db->charSet = ?? before doing a Connect() in oci8. -

    -Added adodbFetchMode to sqlite. -

    -Perf code, added a string typecast to substr in adodb_log_sql(). -

    -Postgres: Changed BlobDecode() to use po_loread, added new $maxblobsize parameter, and now it returns the blob instead -of sending it to stdout - make sure to mention that as a compat warning. -Also added $db->IsOID($oid) function; uses a heuristic, not guaranteed to work 100%. -

    -Contributed arabic language file by "El-Shamaa, Khaled" k.el-shamaa#cgiar.org -

    -PHP5 exceptions did not handle @ protocol properly. Fixed. -

    -Added ifnull handling for postgresql (using coalesce). -

    -Added metatables() support for Postgresql 8.0 (no longer uses pg_% dictionary tables). -

    -Improved Sybase ErrorMsg() function. By Gaetano Giunta. -

    -Improved oci8 SelectLimit() to use Prepare(). By Cristiano Duarte. -

    -Type-cast $row parameter in ifx_fetch_row() to int. Thx stefan bodgan. -

    Ralf becker contributed improvements in postgresql, sapdb, mysql data dictionary handling:
    -- MySql and Postgres MetaType was reporting every int column which was -part of a primary key and unique as serial
    -- Postgres was not reporting the scale of decimal types
    -- MaxDB was padding the defaults of none-string types with spaces
    -- MySql now correctly converts enum columns to varchar -

    -Ralf also changed Postgresql datadict:
    -- you cant add NOT NULL columns in postgres in one go, they need to be -added as NULL and then altered to NOT NULL
    -- AlterColumnSQL could not change a varchar column with numbers into an -integer column, postgres need an explicit conversation
    -- a re-created sequence was not set to the correct value, if the name -was the old name (no implicit sequence), now always the new name of the -implicit sequence is used
    -

    Sergio Strampelli added extra $intoken check to Lens_ParseArgs() in datadict code. -

    4.53 28 Sept 2004 -

    FetchMode cached in recordset is sometimes mapped to native db fetchMode. Normally this does not matter, -but when using cached recordsets, we need to switch back to using adodb fetchmode. So we cache this -in $rs->adodbFetchMode if it differs from the db's fetchMode. -

    For informix we now set canSeek = false driver because stefan bodgan tells me that seeking doesn't work. -

    SetDateLocale() never worked till now ;-) Thx david#tomato.it -

    Set $_bindInputArray = true in sapdb driver. Required for clob support. -

    Fixed some PEAR::DB emulation issues with isError() and isWarning. Thx to Gert-Rainer Bitterlich. -

    Empty() used in getupdatesql without strlen() check. Fixed.

    -

    Added unsigned detection to mysql and mysqli drivers. Thx to dan cech. -

    Added hungarian language file. Thx to Halászvári Gábor. -

    Improved fieldname-type formatting of datadict SQL generated (adding $widespacing parameter to _GenField). -

    Datadict oci8 DROP CONSTRAINTS misspelt. Fixed. Thx Mark Newnham. -

    Changed odbtp to dynamically change databaseType based on connection, eg. from 'odbtp' to 'odbtp_mssql' when connecting -to mssql database. -

    In datadict, MySQL I4 was wrongly mapped to MEDIUMINT, which is actually I3. Fixed. -

    Fixed mysqli MetaType() recognition. Mysqli returns numeric types unlike mysql extension. Thx Francesco Riosa. -

    VFP odbc driver curmode set wrongly, causing problems with memo fields. Fixed. -

    Odbc driver did not recognize odbc version 2 driver date types properly. Fixed. Thx Bostjan. -

    ChangeTableSQL() fixes to datadict-db2.inc.php by Mark Newnham. -

    Perf monitoring with odbc improved. Now we try in perf code to manually set the sysTimeStamp using date() if sysTimeStamp -is empty. -

    All ADO errors are thrown as exceptions in PHP5. -So we added exception handling to ado in PHP5 by creating new adodb-ado5.inc.php driver. -

    Added IsConnected(). Returns true if connection object connected. By Luca.Gioppo. -

    "Ralf Becker" -RalfBecker#digitalROCK.de contributed new sapdb data-dictionary driver -and a large patch that implements field and table renaming for oracle, -mssql, postgresql, mysql and sapdb. See the new RenameTableSQL() and -RenameColumnSQL() functions. -

    We now check ExecuteCursor to see if PrepareSP was initially called. -

    Changed oci8 datadict to use MODIFY for $dd->alterCol. Thx Mark Newnham. -

    4.52 10 Aug 2004 -

    Bug found in Replace() when performance logging enabled, introduced in ADOdb 4.50. Fixed. -

    Replace() checks update stmt. If update stmt fails, we now return immediately. Thx to alex. -

    Added support for $ADODB_FORCE_TYPE in GetUpdateSQL/GetInsertSQL. Thx to niko. -

    Added ADODB_ASSOC_CASE support to postgres/postgres7 driver. -

    Support for DECLARE stmt in oci8. Thx Lochbrunner. -

    4.51 29 July 2004 -

    Added adodb-xmlschema 1.0.2. Thx dan and richard. -

    Added new adorecordset_ext_* classes. If ADOdb extension installed for mysql, mysqlt and oci8 -(but not oci8po), we use the superfast ADOdb extension code for movenext. -

    Added schema support to mssql and odbc_mssql MetaPrimaryKeys(). -

    Patched MSSQL driver to support PHP NULL and Boolean values -while binding the input array parameters in the _query() function. By Stephen Farmer. -

    Added support for clob's for mssql, UpdateBlob(). Thx to gfran#directa.com.br -

    Added normalize support for postgresql (true=lowercase table name, or false=case-sensitive table names) -to MetaColumns($table, $normalize=true). -

    PHP5 variant dates in ADO not working. Fixed in adodb-ado.inc.php. -

    Constant ADODB_FORCE_NULLS was not working properly for many releases (for GetUpdateSQL). Fixed. -Also GetUpdateSQL strips off ORDER BY now - thx Elieser Leão. -

    Perf Monitor for oci8 now dynamically highlights optimizer_* params if too high/low. -

    Added dsn support to NewADOConnection/ADONewConnection. -

    Fixed out of page bounds bug in _adodb_pageexecute_all_rows() Thx to "Sergio Strampelli" sergio#rir.it -

    Speedup of movenext for mysql and oci8 drivers. -

    Moved debugging code _adodb_debug_execute() to adodb-lib.inc.php. -

    Fixed postgresql bytea detection bug. See http://phplens.com/lens/lensforum/msgs.php?id=9849. -

    Fixed ibase datetimestamp typo in PHP5. Thx stefan. -

    Removed whitespace at end of odbtp drivers. -

    Added db2 metaprimarykeys fix. -

    Optimizations to MoveNext() for mysql and oci8. Misc speedups to Get* functions. -

    4.50 6 July 2004 -

    Bumped it to 4.50 to avoid confusion with PHP 4.3.x series. -

    Added db2 metatables and metacolumns extensions. -

    Added alpha PDO driver. Very buggy, only works with odbc. -

    Tested mysqli. Set poorAffectedRows = true. Cleaned up movenext() and _fetch(). -

    PageExecute does not work properly with php5 (return val not a variable). Reported Dmytro Sychevsky sych#php.com.ua. Fixed. -

    MetaTables() for mysql, $showschema parameter was not backward compatible with older versions of adodb. Fixed. -

    Changed mysql GetOne() to work with mysql 3.23 when using with non-select stmts (e.g. SHOW TABLES). -

    Changed TRIG_ prefix to a variable in datadict-oci8.inc.php. Thx to Luca.Gioppo#csi.it. -

    New to adodb-time code. We allow you to define your own daylights savings function, -adodb_daylight_sv for pre-1970 dates. If the function is defined -(somewhere in an include), then you can correct -for daylights savings. See http://phplens.com/phpeverywhere/node/view/16#daylightsavings -for more info. -

    New sqlitepo driver. This is because assoc mode does not work like other drivers in sqlite. - Namely, when selecting (joining) multiple tables, in assoc mode the table - names are included in the assoc keys in the "sqlite" driver. - In "sqlitepo" driver, the table names are stripped from the returned column names. - When this results in a conflict, the first field get preference. - Contributed by Herman Kuiper herman#ozuzo.net -

    Added $forcenull parameter to GetInsertSQL/GetUpdateSQL. Idea by Marco Aurelio Silva. -

    More XHTML changes for GetMenu. By Jeremy Evans. -

    Fixes some ibase date issues. Thx to stefan bogdan. -

    Improvements to mysqli driver to support $ADODB_COUNTRECS. -

    Fixed adodb-csvlib.inc.php problem when reading stream from socket. We need to poll stream continiously. -

    4.23 16 June 2004 -

    -New interbase/firebird fixes thx to Lester Caine. -Driver fixes a problem with getting field names in the result array, and -corrects a couple of data conversions. Also we default to dialect3 for firebird. -Also ibase sysDate property was wrong. Changed to cast as timestamp. -

    -The datadict driver is set up to give quoted tables and fields as this -was the only way round reserved words being used as field names in -TikiWiki. TikiPro is tidying that up, and I hope to be able to produce a -build of THAT which uses what I consider proper UPPERCASE field and -table names. The conversion of TikiWiki to ADOdb helped in that, but -until the database is completely tidied up in TikiPro ... -

    Modified _gencachename() to include fetchmode in name hash. -This means you should clear your cache directory after installing this release as the -cache name algorithm has changed. -

    Now Cache* functions work in safe -mode, because we do not create sub-directories in the $ADODB_CACHE_DIR -in safe mode. In non-safe mode we still create sub-directories. Done by -modifying _gencachename(). -

    Added $gmt parameter (true/false) -to UserDate and UserTimeStamp in connection class, to force conversion -of input (in local time) to be converted to UTC/GMT. -

    Mssql datadict did not support INT types properly (no size param allowed). -Added _GetSize() to datadict-mssql.inc.php. -

    For borland_ibase, BeginTrans(), changed:
    -

       $this->_transactionID = $this->_connectionID;
    -to
    -
       $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
    - -

    Fixed typo in mysqi_field_seek(). Thx to Sh4dow (sh4dow#php.pl). -

    LogSQL did not work with Firebird/Interbase. Fixed. -

    Postgres: made errorno() handling more consistent. Thx to Michael Jahn, Michael.Jahn#mailbox.tu-dresden.de. -

    Added informix patch to better support metatables, metacolumns by "Cecilio Albero" c-albero#eos-i.com -

    Cyril Malevanov contributed patch to oci8 to support passing of LOB parameters: -

    	$text = 'test test test';
    $sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
    $stmt = $conn -> PrepareSP($sql);
    $conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB);
    $rs = '';
    $conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
    $conn -> Execute($stmt);
    echo "return = ".$rs."<br>";
    -As he says, the LOBs limitations are: -
     - use OCINewDescriptor before binding
    - if Param is IN, uses save() before each execute. This is done automatically for you.
    - if Param is OUT, uses load() after each execute. This is done automatically for you.
    - when we bind $var as LOB, we create new descriptor and return it as a
    Bind Result, so if we want to use OUT parameters, we have to store
    somewhere &$var to load() data from LOB to it.
    - IN OUT params are not working now (should not be a big problem to fix it)
    - now mass binding not working too (I've wrote about it before)
    -

    Simplified Connect() and PConnect() error handling. -

    When extension not loaded, Connect() and PConnect() will return null. On connect error, the fns will return false. -

    CacheGetArray() added to code. -

    Added Init() to adorecordset_empty(). -

    Changed postgres64 driver, MetaColumns() to not strip off quotes in default value if :: detected (type-casting of default). -

    Added test: if (!defined('ADODB_DIR')) die(). Useful to prevent hackers from detecting file paths. -

    Changed metaTablesSQL to ignore Postgres 7.4 information schemas (sql_*). -

    New polish language file by Grzegorz Pacan -

    Added support for UNION in _adodb_getcount(). -

    Added security check for ADODB_DIR to limit path disclosure issues. Requested by postnuke team. -

    Added better error message support to oracle driver. Thx to Gaetano Giunta. -

    Added showSchema support to mysql. -

    Bind in oci8 did not handle $name=false properly. Fixed. -

    If extension not loaded, Connect(), PConnect(), NConnect() will return null. -

    4.22 15 Apr 2004 -

    Moved docs to own adodb/docs folder. -

    Fixed session bug when quoting compressed/encrypted data in Replace(). -

    Netezza Driver and LDAP drivers contributed by Josh Eldridge. -

    GetMenu now uses rtrim() on values instead of trim(). -

    Changed MetaColumnNames to return an associative array, keys being the field names in uppercase. -

    Suggested fix to adodb-ado.inc.php affected_rows to support PHP5 variants. Thx to Alexios Fakos. -

    Contributed bulgarian language file by Valentin Sheiretsky valio#valio.eu.org. -

    Contributed romanian language file by stefan bogdan. -

    GetInsertSQL now checks for table name (string) in $rs, and will create a recordset for that -table automatically. Contributed by Walt Boring. Also added OCI_B_BLOB in bind on Walt's request - hope -it doesn't break anything :-) -

    Some minor postgres speedups in _initrs(). -

    ChangeTableSQL checks now if MetaColumns returns empty. Thx Jason Judge. -

    Added ADOConnection::Time(), returns current database time in unix timestamp format, or false. -

    4.21 20 Mar 2004 -

    We no longer in SelectLimit for VFP driver add SELECT TOP X unless an ORDER BY exists. -

    Pim Koeman contributed dutch language file adodb-nl.inc.php. -

    Rick Hickerson added CLOB support to db2 datadict. -

    Added odbtp driver. Thx to "stefan bogdan" sbogdan#rsb.ro. -

    Changed PrepareSP() 2nd parameter, $cursor, to default to true (formerly false). Fixes oci8 backward -compat problems with OUT params. -

    Fixed month calculation error in adodb-time.inc.php. 2102-June-01 appeared as 2102-May-32. -

    Updated PHP5 RC1 iterator support. API changed, hasMore() renamed to valid(). -

    Changed internal format of serialized cache recordsets. As we store a version number, this should be -backward compatible. -

    Error handling when driver file not found was flawed in ADOLoadCode(). Fixed. -

    4.20 27 Feb 2004 -

    Updated to AXMLS 1.01. -

    MetaForeignKeys for postgres7 modified by Edward Jaramilla, works on pg 7.4. -

    Now numbers accepts function calls or sequences for GetInsertSQL/GetUpdateSQL numeric fields. -

    Changed quotes of 'delete from $perf_table' to "". Thx Kehui (webmaster#kehui.net) -

    Added ServerInfo() for ifx, and putenv trim fix. Thx Fernando Ortiz. -

    Added addq(), which is analogous to addslashes(). -

    Tested with php5b4. Fix some php5 compat problems with exceptions and sybase. -

    Carl-Christian Salvesen added patch to mssql _query to support binds greater than 4000 chars. -

    Mike suggested patch to PHP5 exception handler. $errno must be numeric. -

    Added double quotes (") to ADODB_TABLE_REGEX. -

    For oci8, Prepare(...,$cursor), -$cursor's meaning was accidentally inverted in 4.11. This causes -problems with ExecuteCursor() too, which calls Prepare() internally. -Thx to William Lovaton. -

    Now dateHasTime property in connection object renamed to datetime for consistency. This could break bc. -

    Csongor Halmai reports that db2 SelectLimit with input array is not working. Fixed.. -

    4.11 27 Jan 2004 -

    Csongor Halmai reports db2 binding not working. Reverted back to emulated binding. -

    Dan Cech modifies datadict code. Adds support for DropIndex. Minor cleanups. -

    Table misspelt in perf-oci8.inc.php. Changed v$conn_cache_advice to v$db_cache_advice. Reported by Steve W. -

    UserTimeStamp and DBTimeStamp did not handle YYYYMMDDHHMMSS format properly. Reported by Mike Muir. Fixed. -

    Changed oci8 Prepare(). Does not auto-allocate OCINewCursor automatically, unless 2nd param is set to true. -This will break backward compat, if Prepare/Execute is used instead of ExecuteCursor. Reported by Chris Jones. -

    Added InParameter() and OutParameter(). Wrapper functions to Parameter(), but nicer because they -are self-documenting. -

    Added 'R' handling in ActualType() to datadict-mysql.inc.php -

    Added ADOConnection::SerializableRS($rs). Returns a recordset that can be serialized in a session. -

    Added "Run SQL" to performance UI(). -

    Misc spelling corrections in adodb-mysqli.inc.php, adodb-oci8.inc.php and datadict-oci8.inc.php, from Heinz Hombergs. -

    MetaIndexes() for ibase contributed by Heinz Hombergs. -

    4.10 12 Jan 2004 -

    Dan Cech contributed extensive changes to data dictionary to support name quoting (with `), and drop table/index. -

    Informix added cursorType property. Default remains IFX_SCROLL, but you can change to 0 (non-scrollable cursor) for performance. -

    Added ADODB_View_PrimaryKeys() for returning view primary keys to MetaPrimaryKeys(). -

    Simplified chinese file, adodb-cn.inc.php from cysoft. -

    Added check for ctype_alnum in adodb-datadict.inc.php. Thx to Jason Judge. -

    Added connection parameter to ibase Prepare(). Fix by Daniel Hassan. -

    Added nameQuote for quoting identifiers and names to connection obj. Requested by Jason Judge. Also the -data dictionary parser now detects `field name` and generates column names with spaces correctly. -

    BOOL type not recognised correctly as L. Fixed. -

    Fixed paths in ADODB_DIR for session files, and back-ported it to 4.05 (15 Dec 2003) -

    Added Schema to postgresql MetaTables. Thx to col#gear.hu -

    Empty postgresql recordsets that had blob fields did not set EOF properly. Fixed. -

    CacheSelectLimit internal parameters to SelectLimit were wrong. Thx to Nio. -

    Modified adodb_pr() and adodb_backtrace() to support command-line usage (eg. no html). -

    Fixed some fr and it lang errors. Thx to Gaetano G. -

    Added contrib directory, with adodb rs to xmlrpc convertor by Gaetano G. -

    Fixed array recordset bugs when _skiprow1 is true. Thx to Gaetano G. -

    Fixed pivot table code when count is false. -

    - -

    4.05 13 Dec 2003 -

    Added MetaIndexes to data-dict code - thx to Dan Cech. -

    Rewritten session code by Ross Smith. Moved code to adodb/session directory. -

    Added function exists check on connecting to most drivers, so we don't crash with the unknown function error. -

    Smart Transactions failed with GenID() when it no seq table has been created because the sql - statement fails. Fix by Mark Newnham. -

    Added $db->length, which holds name of function that returns strlen. -

    Fixed error handling for bad driver in ADONewConnection - passed too few params to error-handler. -

    Datadict did not handle types like 16.0 properly in _GetSize. Fixed. -

    Oci8 driver SelectLimit() bug &= instead of =& used. Thx to Swen Thümmler. -

    Jesse Mullan suggested not flushing outp when output buffering enabled. Due to Apache 2.0 bug. Added. -

    MetaTables/MetaColumns return ref bug with PHP5 fixed in adodb-datadict.inc.php. -

    New mysqli driver contributed by Arjen de Rijke. Based on adodb 3.40 driver. -Then jlim added BeginTrans, CommitTrans, RollbackTrans, IfNull, SQLDate. Also fixed return ref bug. -

    $ADODB_FLUSH added, if true then force flush in debugging outp. Default is false. In earlier -versions, outp defaulted to flush, which is not compat with apache 2.0. -

    Mysql driver's GenID() function did not work when when sql logging is on. Fixed. -

    $ADODB_SESSION_TBL not declared as global var. Not available if adodb-session.inc.php included in function. Fixed. -

    The input array not passed to Execute() in _adodb_getcount(). Fixed. -

    4.04 13 Nov 2003 -

    Switched back to foreach - faster than list-each. -

    Fixed bug in ado driver - wiping out $this->fields with date fields. -

    Performance Monitor, View SQL, Explain Plan did not work if strlen($SQL)>max($_GET length). Fixed. -

    Performance monitor, oci8 driver added memory sort ratio. -

    Added random property, returns SQL to generate a floating point number between 0 and 1; -

    4.03 6 Nov 2003 -

    The path to adodb-php4.inc.php and adodb-iterators.inc.php was not setup properly. -

    Patched SQLDate in interbase to support hours/mins/secs. Thx to ari kuorikoski. -

    Force autorollback for pgsql persistent connections - -apparently pgsql did not autorollback properly before 4.3.4. See http://bugs.php.net/bug.php?id=25404 -

    4.02 5 Nov 2003 -

    Some errors in adodb_error_pg() fixed. Thx to Styve. -

    Spurious Insert_ID() error was generated by LogSQL(). Fixed. -

    Insert_ID was interfering with Affected_Rows() and Replace() when LogSQL() enabled. Fixed. -

    More foreach loops optimized with list/each. -

    Null dates not handled properly in ADO driver (it becomes 31 Dec 1969!). -

    Heinz Hombergs contributed patches for mysql MetaColumns - adding scale, made -interbase MetaColumns work with firebird/interbase, and added lang/adodb-de.inc.php. -

    Added INFORMIXSERVER environment variable. -

    Added $ADODB_ANSI_PADDING_OFF for interbase/firebird. -

    PHP 5 beta 2 compat check. Foreach (Iterator) support. Exceptions support. -

    4.01 23 Oct 2003 -

    Fixed bug in rs2html(), tohtml.inc.php, that generated blank table cells. -

    Fixed insert_id() incorrectly generated when logsql() enabled. -

    Modified PostgreSQL _fixblobs to use list/each instead of foreach. -

    Informix ErrorNo() implemented correctly. -

    Modified several places to use list/each, including GetRowAssoc(). -

    Added UserTimeStamp() to connection class. -

    Added $ADODB_ANSI_PADDING_OFF for oci8po. -

    4.00 20 Oct 2003 -

    Upgraded adodb-xmlschema to 1 Oct 2003 snapshot. -

    Fix to rs2html warning message. Thx to Filo. -

    Fix for odbc_mssql/mssql SQLDate(), hours was wrong. -

    Added MetaColumns and MetaPrimaryKeys for sybase. Thx to Chris Phillipson. -

    Added autoquoting to datadict for MySQL and PostgreSQL. Suggestion by Karsten Dambekalns -

    3.94 11 Oct 2003 -

    Create trigger in datadict-oci8.inc.php did not work, because all cr/lf's must be removed. -

    ErrorMsg()/ErrorNo() did not work for many databases when logging enabled. Fixed. -

    Removed global variable $ADODB_LOGSQL as it does not work properly with multiple connections. -

    Added SQLDate support for sybase. Thx to Chris Phillipson -

    Postgresql checking of pgsql resultset resource was incorrect. Fix by Bharat Mediratta bharat#menalto.com. -Same patch applied to _insertid and _affectedrows for adodb-postgres64.inc.php. -

    Added support for NConnect for postgresql. -

    Added Sybase data dict support. Thx to Chris Phillipson -

    Extensive improvements in $perf->UI(), eg. Explain now opens in new window, we show scripts -which call sql, etc. -

    Perf Monitor UI works with magic quotes enabled. -

    rsPrefix was declared twice. Removed. -

    Oci8 stored procedure support, eg. "begin func(); end;" was incorrect in _query. Fixed. -

    Tiraboschi Massimiliano contributed italian language file. -

    Fernando Ortiz, fortiz#lacorona.com.mx, contributed informix performance monitor. -

    Added _varchar (varchar arrays) support for postgresql. Reported by PREVOT Stéphane.


    -

    0.10 Sept 9 2000 First release -

    Old change log history moved to old-changelog.htm. -

    -

     

    -

    -

    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-datadict.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-datadict.htm deleted file mode 100755 index e7eef575..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-datadict.htm +++ /dev/null @@ -1,328 +0,0 @@ - - - - ADOdb Data Dictionary Manual - - - - -

    ADOdb Data Dictionary Library for PHP

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my).
    -AXMLS (c) 2004 ars Cognita, Inc

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products.

    - -

    Useful ADOdb links: DownloadOther Docs -

    -

    This documentation describes a PHP class library to automate the -creation of tables, indexes and foreign key constraints portably for -multiple databases. Richard Tango-Lowy and Dan Cech have been kind -enough to contribute AXMLS, an XML schema -system for defining databases. You can contact them at -dcech#phpwerx.net and richtl#arscognita.com.

    -

    Currently the following databases are supported:

    -

    Well-tested: PostgreSQL, MySQL, Oracle, MSSQL.
    -Beta-quality: DB2, Informix, Sybase, Interbase, Firebird.
    -Alpha-quality: MS Access (does not support DEFAULT values) and -generic ODBC. -

    -

    Example Usage

    -
      include_once('adodb.inc.php');
    # First create a normal connection
    $db = NewADOConnection('mysql');
    $db->Connect(...);

    # Then create a data dictionary object, using this connection
    $dict = NewDataDictionary($db);

    # We have a portable declarative data dictionary format in ADOdb, similar to SQL.
    # Field types use 1 character codes, and fields are separated by commas.
    # The following example creates three fields: "col1", "col2" and "col3":

    $flds = "
    col1 C(32) NOTNULL DEFAULT 'abc',
    col2 I DEFAULT 0,
    col3 N(12.2)

    ";

    # We demonstrate creating tables and indexes
    $sqlarray = $dict->CreateTableSQL($tabname, $flds, $taboptarray);
    $dict->ExecuteSQLArray($sqlarray);

    $idxflds = 'co11, col2';
    $sqlarray = $dict->CreateIndexSQL($idxname, $tabname, $idxflds);
    $dict->ExecuteSQLArray($sqlarray);
    -

    More Complex Table Sample

    -

    -The following string will create a table with a primary key event_id and multiple indexes, including one compound index idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94 by Gaetano Giunta. -

    -$flds = "
    -  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
    -  event_type I(4) NOTNULL  INDEX idx_evt,
    -  event_start_date T DEFAULT NULL INDEX id_esd,
    -  event_end_date T DEFAULT '0000-00-00 00:00:00' INDEX id_eted,
    -  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 INDEX id_evp,
    -  event_owner I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_project I(11) DEFAULT 0 INDEX idx_ev1,
    -  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
    -  event_icon C(20) DEFAULT 'obj/event',
    -  event_description X
    -";
    -$sqlarray = $db->CreateTableSQL($tablename, $flds);
    -$dict->ExecuteSQLArray($sqlarray);
    -
    -

    Class Factory

    -

    NewDataDictionary($connection, $drivername=false)

    -

    Creates a new data dictionary object. You pass a database connection object in $connection. The $connection does not have to be actually connected to the database. Some database connection objects are generic (eg. odbtp and odbc). Since 4.53, you can tell ADOdb the actual database with $drivername. E.g.

    -
    -$db =& NewADOConnection('odbtp');
    -$datadict = NewDataDictionary($db, 'mssql'); # force mssql
    -
    -

    Class Functions

    -

    function CreateDatabase($dbname, $optionsarray=false)

    -

    Create a database with the name $dbname;

    -

    function CreateTableSQL($tabname, $fldarray, $taboptarray=false)

    -
      RETURNS:      an array of strings, the sql to be executed, or false
    $tabname: name of table
    $fldarray: string (or array) containing field info
    $taboptarray: array containing table options
    -

    The new format of $fldarray uses a free text format, where each -field is comma-delimited. -The first token for each field is the field name, followed by the type -and optional -field size. Then optional keywords in $otheroptions:

    -
      "$fieldname $type $colsize $otheroptions"
    -

    The older (and still supported) format of $fldarray is a -2-dimensional array, where each row in the 1st dimension represents one -field. Each row has this format:

    -
      array($fieldname, $type, [,$colsize] [,$otheroptions]*)
    -

    The first 2 fields must be the field name and the field type. The -field type can be a portable type codes or the actual type for that -database.

    -

    Legal portable type codes include:

    -
      C:  Varchar, capped to 255 characters.
    X: Larger varchar, capped to 4000 characters (to be compatible with Oracle).
    XL: For Oracle, returns CLOB, otherwise the largest varchar size.

    C2: Multibyte varchar
    X2: Multibyte varchar (largest size)

    B: BLOB (binary large object)

    D: Date (some databases do not support this, and we return a datetime type)
    T: Datetime or Timestamp
    L: Integer field suitable for storing booleans (0 or 1)
    I: Integer (mapped to I4)
    I1: 1-byte integer
    I2: 2-byte integer
    I4: 4-byte integer
    I8: 8-byte integer
    F: Floating point number
    N: Numeric or decimal number
    -

    The $colsize field represents the size of the field. If a decimal -number is used, then it is assumed that the number following the dot is -the precision, so 6.2 means a number of size 6 digits and 2 decimal -places. It is recommended that the default for number types be -represented as a string to avoid any rounding errors.

    -

    The $otheroptions include the following keywords (case-insensitive):

    -
      AUTO            For autoincrement number. Emulated with triggers if not available.
    Sets NOTNULL also.
    AUTOINCREMENT Same as auto.
    KEY Primary key field. Sets NOTNULL also. Compound keys are supported.
    PRIMARY Same as KEY.
    DEF Synonym for DEFAULT for lazy typists.
    DEFAULT The default value. Character strings are auto-quoted unless
    the string begins and ends with spaces, eg ' SYSDATE '.
    NOTNULL If field is not null.
    DEFDATE Set default value to call function to get today's date.
    DEFTIMESTAMP Set default to call function to get today's datetime.
    NOQUOTE Prevents autoquoting of default string values.
    CONSTRAINTS Additional constraints defined at the end of the field
    definition.
    -

    The Data Dictonary accepts two formats, the older array -specification:

    -
      $flds = array(
    array('COLNAME', 'DECIMAL', '8.4', 'DEFAULT' => 0, 'NOTNULL'),
    array('id', 'I' , 'AUTO'),
    array('`MY DATE`', 'D' , 'DEFDATE'),
    array('NAME', 'C' , '32', 'CONSTRAINTS' => 'FOREIGN KEY REFERENCES reftable')
    );
    -

    Or the simpler declarative format:

    -
      $flds = "
    COLNAME DECIMAL(8.4) DEFAULT 0 NOTNULL,
    id I AUTO,
    `MY DATE` D DEFDATE,
    NAME C(32) CONSTRAINTS 'FOREIGN KEY REFERENCES reftable'

    ";
    -

    Note that if you have special characters in the field name (e.g. My -Date), you should enclose it in back-quotes. Normally field names are -not case-sensitive, but if you enclose it in back-quotes, some -databases will treat the names as case-sensitive (eg. Oracle) , and -others won't. So be careful.

    -

    The $taboptarray is the 3rd parameter of the CreateTableSQL -function. This contains table specific settings. Legal keywords include:

    -
      -
    • REPLACE
      -Indicates that the previous table definition should be removed -(dropped)together with ALL data. See first example below.
    • -
    • DROP
      -Drop table. Useful for removing unused tables.
    • -
    • CONSTRAINTS
      -Define this as the key, with the constraint as the value. See the -postgresql example below. Additional constraints defined for the whole -table. You will probably need to prefix this with a comma.
    • -
    -

    Database specific table options can be defined also using the name -of the database type as the array key. In the following example, create -the table as ISAM with MySQL, and store the table in the "users" -tablespace if using Oracle. And because we specified REPLACE, drop -the table first.

    -
      $taboptarray = array('mysql' => 'TYPE=ISAM', 'oci8' => 'tablespace users', 'REPLACE');
    -

    You can also define foreign key constraints. The following is syntax -for postgresql: -

    -
      $taboptarray = array('constraints' => ', FOREIGN KEY (col1) REFERENCES reftable (refcol)');
    -

    function DropTableSQL($tabname)

    -

    Returns the SQL to drop the specified table.

    -

    function ChangeTableSQL($tabname, $flds)

    -

    Checks to see if table exists, if table does not exist, behaves like -CreateTableSQL. If table exists, generates appropriate ALTER TABLE -MODIFY COLUMN commands if field already exists, or ALTER TABLE ADD -$column if field does not exist.

    -

    The class must be connected to the database for ChangeTableSQL to -detect the existence of the table. Idea and code contributed by Florian -Buzin.

    -

    function RenameTableSQL($tabname,$newname)

    -

    Rename a table. Returns the an array of strings, which is the SQL required to rename a table. Since ADOdb 4.53. Contributed by Ralf Becker.

    -

    function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')

    -

    Rename a table field. Returns the an array of strings, which is the SQL required to rename a column. The optional $flds is a complete column-defintion-string like for AddColumnSQL, only used by mysql at the moment. Since ADOdb 4.53. Contributed by Ralf Becker.

    -

    function CreateIndexSQL($idxname, $tabname, $flds, -$idxoptarray=false)

    -
      RETURNS:      an array of strings, the sql to be executed, or false
    $idxname: name of index
    $tabname: name of table
    $flds: list of fields as a comma delimited string or an array of strings
    $idxoptarray: array of index creation options
    -

    $idxoptarray is similar to $taboptarray in that index specific -information can be embedded in the array. Other options include:

    -
      CLUSTERED     Create clustered index (only mssql)
    BITMAP Create bitmap index (only oci8)
    UNIQUE Make unique index
    FULLTEXT Make fulltext index (only mysql)
    HASH Create hash index (only postgres)
    DROP Drop legacy index
    -

    function DropIndexSQL ($idxname, $tabname = NULL)

    -

    Returns the SQL to drop the specified index.

    -

    function AddColumnSQL($tabname, $flds)

    -

    Add one or more columns. Not guaranteed to work under all situations.

    -

    function AlterColumnSQL($tabname, $flds)

    -

    Warning, not all databases support this feature.

    -

    function DropColumnSQL($tabname, $flds)

    -

    Drop 1 or more columns.

    -

    function SetSchema($schema)

    -

    Set the schema.

    -

    function &MetaTables()

    -

    function &MetaColumns($tab, $upper=true, $schema=false)

    -

    function &MetaPrimaryKeys($tab,$owner=false,$intkey=false)

    -

    function &MetaIndexes($table, $primary = false, $owner = false)

    -

    These functions are wrappers for the corresponding functions in the -connection object. However, the table names will be autoquoted by the -TableName function (see below) before being passed to the connection -object.

    -

    function NameQuote($name = NULL)

    -

    If the provided name is quoted with backquotes (`) or contains -special characters, returns the name quoted with the appropriate quote -character, otherwise the name is returned unchanged.

    -

    function TableName($name)

    -

    The same as NameQuote, but will prepend the current schema if -specified

    -

    function MetaType($t,$len=-1,$fieldobj=false)

    -

    function ActualType($meta)

    -

    Convert between database-independent 'Meta' and database-specific -'Actual' type codes.

    -

    function ExecuteSQLArray($sqlarray, $contOnError = true)

    -
      RETURNS:      0 if failed, 1 if executed all but with errors, 2 if executed successfully
    $sqlarray: an array of strings with sql code (no semicolon at the end of string)
    $contOnError: if true, then continue executing even if error occurs
    -

    Executes an array of SQL strings returned by CreateTableSQL or -CreateIndexSQL.

    -
    - -

    ADOdb XML Schema (AXMLS)

    -

    This is a class contributed by Richard Tango-Lowy and Dan Cech that -allows the user to quickly -and easily build a database using the excellent ADODB database library -and a simple XML formatted file. -You can download -the latest version of AXMLS here.

    -

    Quick Start

    -

    Adodb-xmlschema, or AXMLS, is a set of classes that allow the user -to quickly and easily build or upgrade a database on almost any RDBMS -using the excellent ADOdb database library and a simple XML formatted -schema file. Our goal is to give developers a tool that's simple to -use, but that will allow them to create a single file that can build, -upgrade, and manipulate databases on most RDBMS platforms.

    - Installing axmls -

    The easiest way to install AXMLS to download and install any recent -version of the ADOdb database abstraction library. To install AXMLS -manually, simply copy the adodb-xmlschema.inc.php file and the xsl -directory into your adodb directory.

    - Using AXMLS in Your Application -

    There are two steps involved in using AXMLS in your application: -first, you must create a schema, or XML representation of your -database, and second, you must create the PHP code that will parse and -execute the schema.

    -

    Let's begin with a schema that describes a typical, if simplistic -user management table for an application.

    -
    <?xml version="1.0"?>
    <schema version="0.2">

    <table name="users">
    <desc>A typical users table for our application.</desc>
    <field name="userId" type="I">
    <descr>A unique ID assigned to each user.</descr>

    <KEY/>
    <AUTOINCREMENT/>
    </field>

    <field name="userName" type="C" size="16"><NOTNULL/></field>


    <index name="userName">
    <descr>Put a unique index on the user name</descr>
    <col>userName</col>
    <UNIQUE/>

    </index>
    </table>

    <sql>
    <descr>Insert some data into the users table.</descr>
    <query>insert into users (userName) values ( 'admin' )</query>

    <query>insert into users (userName) values ( 'Joe' )</query>
    </sql>
    </schema>
    -

    Let's take a detailed look at this schema.

    -

    The opening <?xml version="1.0"?> tag is required by XML. The -<schema> tag tells the parser that the enclosed markup defines an -XML schema. The version="0.2" attribute sets the version of the -AXMLS DTD used by the XML schema.

    -

    All versions of AXMLS prior to version 1.0 have a schema version of -"0.1". The current schema version is "0.2".

    -
    <?xml version="1.0"?>
    <schema version="0.2">
    ...
    </schema>
    -

    Next we define one or more tables. A table consists of a fields (and -other objects) enclosed by <table> tags. The name="" attribute -specifies the name of the table that will be created in the database.

    -
    <table name="users">

    <desc>A typical users table for our application.</desc>
    <field name="userId" type="I">

    <descr>A unique ID assigned to each user.</descr>
    <KEY/>
    <AUTOINCREMENT/>
    </field>

    <field name="userName" type="C" size="16"><NOTNULL/></field>


    </table>
    -

    This table is called "users" and has a description and two fields. -The description is optional, and is currently only for your own -information; it is not applied to the database.

    -

    The first <field> tag will create a field named "userId" of -type "I", or integer. (See the ADOdb Data Dictionary documentation for -a list of valid types.) This <field> tag encloses two special -field options: <KEY/>, which specifies this field as a primary -key, and <AUTOINCREMENT/>, which specifies that the database -engine should automatically fill this field with the next available -value when a new row is inserted.

    -

    The second <field> tag will create a field named "userName" of -type "C", or character, and of length 16 characters. The -<NOTNULL/> option specifies that this field does not allow NULLs.

    -

    There are two ways to add indexes to a table. The simplest is to -mark a field with the <KEY/> option as described above; a primary -key is a unique index. The second and more powerful method uses the -<index> tags.

    -
    <table name="users">
    ...

    <index name="userName">
    <descr>Put a unique index on the user name</descr>
    <col>userName</col>

    <UNIQUE/>
    </index>

    </table>
    -

    The <index> tag specifies that an index should be created on -the enclosing table. The name="" attribute provides the name of the -index that will be created in the database. The description, as above, -is for your information only. The <col> tags list each column -that will be included in the index. Finally, the <UNIQUE/> tag -specifies that this will be created as a unique index.

    -

    Finally, AXMLS allows you to include arbitrary SQL that will be -applied to the database when the schema is executed.

    -
    <sql>
    <descr>Insert some data into the users table.</descr>
    <query>insert into users (userName) values ( 'admin' )</query>

    <query>insert into users (userName) values ( 'Joe' )</query>
    </sql>
    -

    The <sql> tag encloses any number of SQL queries that you -define for your own use.

    -

    Now that we've defined an XML schema, you need to know how to apply -it to your database. Here's a simple PHP script that shows how to load -the schema.

    -
    <?PHP
    /* You must tell the script where to find the ADOdb and
    * the AXMLS libraries.
    */ -require( "path_to_adodb/adodb.inc.php"); -require( "path_to_adodb/adodb-xmlschema.inc.php" ); # or adodb-xmlschema03.inc.php - -/* Configuration information. Define the schema filename,
    * RDBMS platform (see the ADODB documentation for valid
    * platform names), and database connection information here.
    */
    $schemaFile = 'example.xml';
    $platform = 'mysql';
    $dbHost = 'localhost';
    $dbName = 'database';
    $dbUser = 'username';
    $dbPassword = 'password';

    /* Start by creating a normal ADODB connection.
    */
    $db = ADONewConnection( $platform );
    $db->Connect( $dbHost, $dbUser, $dbPassword, $dbName );

    /* Use the database connection to create a new adoSchema object.
    */
    $schema = new adoSchema( $db );

    /* Call ParseSchema() to build SQL from the XML schema file.
    * Then call ExecuteSchema() to apply the resulting SQL to
    * the database.
    */
    $sql = $schema->ParseSchema( $schemaFile );
    $result = $schema->ExecuteSchema();
    ?>
    -

    Let's look at each part of the example in turn. After you manually -create the database, there are three steps required to load (or -upgrade) your schema.

    -

    First, create a normal ADOdb connection. The variables and values -here should be those required to connect to your database.

    -
    $db = ADONewConnection( 'mysql' );
    $db->Connect( 'host', 'user', 'password', 'database' );
    -

    Second, create the adoSchema object that load and manipulate your -schema. You must pass an ADOdb database connection object in order to -create the adoSchema object.

    -
    $schema = new adoSchema( $db );
    -

    Third, call ParseSchema() to parse the schema and then -ExecuteSchema() to apply it to the database. You must pass -ParseSchema() the path and filename of your schema file.

    -
    $schema->ParseSchema( $schemaFile ); 
    $schema->ExecuteSchema();
    -

    Execute the above code and then log into your database. If you've -done all this right, you should see your tables, indexes, and SQL.

    -

    You can find the source files for this tutorial in the examples -directory as tutorial_shema.xml and tutorial.php. See the class -documentation for a more detailed description of the adoSchema methods, -including methods and schema elements that are not described in this -tutorial.

    -

    XML Schema Version 3

    -

    In March 2006, we added adodb-xmlschema03.inc.php to the release, which supports version 3 of XML Schema. -The adodb-xmlschema.inc.php remains the same as previous releases, and supports version 2 of XML Schema. -Version 3 provides some enhancements: - -

      -
    • Support for updating table data during an upgrade. -
    • Support for platform-specific table options and platform negation. -
    • Support for unsigned fields. -
    • Fixed opt and constraint support -
    • Many other fixes such as OPT tag, which allows you to set optional platform settings: -
    - -

    Example usage: -

    <?xml version="1.0"?>
    -<schema version="0.3">
    - <table name="ats_kb">
    -  <descr>ATS KnowledgeBase</descr>
    -  <opt platform="mysql">TYPE=INNODB</opt>
    -  <field name="recid" type="I"/>
    -  <field name="organization_code" type="I4"/> 
    -  <field name="sub_code" type="C" size="20"/>
    -  etc...
    -
    -

    To use it, change your code to include adodb-xmlschema03.inc.php. - -

    Upgrading

    -

    -If your schema version is older, than XSLT is used to transform the -schema to the newest version. This means that if you are using an older -XML schema format, you need to have the XSLT extension installed. -If you do not want to require your users to have the XSLT extension -installed, make sure you modify your XML schema to conform to the -latest version. -


    -
    If you have any questions or comments, please email them to -Richard at richtl#arscognita.com. -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-oracle.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-oracle.htm deleted file mode 100755 index 7b768d07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-oracle.htm +++ /dev/null @@ -1,542 +0,0 @@ - - - - -ADOdb with PHP and Oracle - - - - - -
    -

    Using ADOdb with PHP and Oracle: an advanced tutorial

    -
    -

    (c)2004-2005 John Lim. All rights reserved.

    -

    1. Introduction

    -

    Oracle is the most popular commercial database used with PHP. There are many ways of accessing Oracle databases in PHP. These include:

    -
      -
    • The oracle extension
    • -
    • The oci8 extension
    • -
    • PEAR DB library
    • -
    • ADOdb library
    • -
    -

    The wide range of choices is confusing to someone just starting with Oracle and PHP. I will briefly summarize the differences, and show you the advantages of using ADOdb.

    -

    First we have the C extensions which provide low-level access to Oracle functionality. These C extensions are precompiled into PHP, or linked in dynamically when the web server starts up. Just in case you need it, here's a guide to installing Oracle and PHP on Linux.

    - - - - - - - - - -
    Oracle extensionDesigned for Oracle 7 or earlier. This is obsolete.
    Oci8 extension Despite it's name, which implies it is only for Oracle 8i, this is the standard method for accessing databases running Oracle 8i, 9i or 10g (and later).
    -

    Here is an example of using the oci8 extension to query the emp table of the scott schema with bind parameters: -

    -$conn = OCILogon("scott","tiger", $tnsName); 
    -
    -$stmt = OCIParse($conn,"select * from emp where empno > :emp order by empno"); 
    -$emp = 7900;
    -OCIBindByName($stmt, ':emp', $emp);
    -$ok = OCIExecute($stmt);
    -while (OCIFetchInto($stmt,$arr)) {
    -	print_r($arr);
    -	echo "<hr>";	
    -} 
    -
    -

    This generates the following output: -

    -Array ( [0] => 7902 [1] => FORD [2] => ANALYST [3] => 7566 [4] => 03/DEC/81 [5] => 3000 [7] => 20 ) -
    - Array ( [0] => 7934 [1] => MILLER [2] => CLERK [3] => 7782 [4] => 23/JAN/82 [5] => 1300 [7] => 10 ) -
    -

    We also have many higher level PHP libraries that allow you to simplify the above code. The most popular are PEAR DB and ADOdb. Here are some of the differences between these libraries:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeaturePEAR DB 1.6ADOdb 4.52
    General StyleSimple, easy to use. Lacks Oracle specific functionality.Has multi-tier design. Simple high-level design for beginners, and also lower-level advanced Oracle functionality.
    Support for PrepareYes, but only on one statement, as the last prepare overwrites previous prepares.Yes (multiple simultaneous prepare's allowed)
    Support for LOBsNoYes, using update semantics
    Support for REF CursorsNoYes
    Support for IN ParametersYesYes
    Support for OUT ParametersNoYes
    Schema creation using XMLNoYes, including ability to define tablespaces and constraints
    Provides database portability featuresNoYes, has some ability to abstract features that differ between databases such as dates, bind parameters, and data types.
    Performance monitoring and tracingNoYes. SQL can be traced and linked to web page it was executed on. Explain plan support included.
    Recordset caching for frequently used queriesNoYes. Provides great speedups for SQL involving complex where, group-by and order-by clauses.
    PopularityYes, part of PEAR releaseYes, many open source projects are using this software, including PostNuke, Xaraya, Mambo, Tiki Wiki.
    SpeedMedium speed.Very high speed. Fastest database abstraction library available for PHP. Benchmarks are available.
    High Speed Extension availableNoYes. You can install the optional ADOdb extension, which reimplements the most frequently used parts of ADOdb as fast C code. Note that the source code version of ADOdb runs just fine without this extension, and only makes use of the extension if detected.
    -

    PEAR DB is good enough for simple web apps. But if you need more power, you can see ADOdb offers more sophisticated functionality. The rest of this article will concentrate on using ADOdb with Oracle. You can find out more about connecting to Oracle later in this guide.

    -

    ADOdb Example

    -

    In ADOdb, the above oci8 example querying the emp table could be written as:

    -
    -include "/path/to/adodb.inc.php";
    -$db = NewADOConnection("oci8");
    -$db->Connect($tnsName, "scott", "tiger");
    -
    -$rs = $db->Execute("select * from emp where empno>:emp order by empno", 
    -                    array('emp' => 7900));
    -while ($arr = $rs->FetchRow()) {
    -    print_r($arr);
    -	echo "<hr>";
    -}
    -
    -

    The Execute( ) function returns a recordset object, and you can retrieve the rows returned using $recordset->FetchRow( ).

    -

    If we ignore the initial connection preamble, we can see the ADOdb version is much easier and simpler:

    - - - - - - - - - -
    Oci8ADOdb
    $stmt = OCIParse($conn,
    -       "select * from emp where empno > :emp"); 
    -$emp = 7900;
    -OCIBindByName($stmt, ':emp', $emp);
    -$ok = OCIExecute($stmt);
    -
    -while (OCIFetchInto($stmt,$arr)) {
    -	print_r($arr);
    -	echo "<hr>";	
    -} 
    $recordset = $db->Execute("select * from emp where empno>:emp", 
    -                           array('emp' => 7900));
    -
    -while ($arr = $recordset->FetchRow()) {
    -	print_r($arr);
    -	echo "<hr>";
    -}
    -

     

    -

    2. ADOdb Query Semantics

    -

    You can also query the database using the standard Microsoft ADO MoveNext( ) metaphor. The data array for the current row is stored in the fields property of the recordset object, $rs. -MoveNext( ) offers the highest performance among all the techniques for iterating through a recordset: -

    -$rs = $db->Execute("select * from emp where empno>:emp", array('emp' => 7900));
    -while (!$rs->EOF) {
    -	print_r($rs->fields);
    -	$rs->MoveNext();
    -}
    -
    -

    And if you are interested in having the data returned in a 2-dimensional array, you can use: -

    -$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
    -
    -

    Now to obtain only the first row as an array: -

    -$arr = $db->GetRow("select * from emp where empno=:emp", array('emp' => 7900));
    -
    -

    Or to retrieve only the first field of the first row: -

    -$arr = $db->GetOne("select ename from emp where empno=:emp", array('emp' => 7900));
    -
    -

    For easy pagination support, we provide the SelectLimit function. The following will perform a select query, limiting it to 100 rows, starting from row 201 (row 1 being the 1st row): -

    -$offset = 200; $limitrows = 100;
    -$rs = $db->SelectLimit('select * from table', $limitrows, $offset);
    -
    -

    The $offset parameter is optional. -

    Array Fetch Mode

    -

    When data is being returned in an array, you can choose the type of array the data is returned in. -

      -
    1. Numeric indexes - use $connection->SetFetchMode(ADODB_FETCH_NUM).
    2. -
    3. Associative indexes - the keys of the array are the names of the fields (in upper-case). Use $connection->SetFetchMode(ADODB_FETCH_ASSOC).
    4. -
    5. Both numeric and associative indexes - use $connection->SetFetchMode(ADODB_FETCH_BOTH).
    6. -
    -

    The default is ADODB_FETCH_BOTH for Oracle.

    -

    Caching

    -

    You can define a database cache directory using $ADODB_CACHE_DIR, and cache the results of frequently used queries that rarely change. This is particularly useful for SQL with complex where clauses and group-by's and order-by's. It is also good for relieving heavily-loaded database servers.

    -

    This example will cache the following select statement for 3600 seconds (1 hour):

    -
    -$ADODB_CACHE_DIR = '/var/adodb/tmp';
    -$rs = $db->CacheExecute(3600, "select names from allcountries order by 1");
    -
    -There are analogous CacheGetArray( -), CacheGetRow( ), CacheGetOne( ) and CacheSelectLimit( ) functions. The first parameter is the number of seconds to cache. You can also pass a bind array as a 3rd parameter (not shown above). -

    There is an alternative syntax for the caching functions. The first parameter is omitted, and you set the cacheSecs - property of the connection object: -

    -$ADODB_CACHE_DIR = '/var/adodb/tmp';
    -$connection->cacheSecs = 3600;
    -$rs = $connection->CacheExecute($sql, array('id' => 1));
    -
    -

     

    -

    3. Using Prepare( ) For Frequently Used Statements

    -

    Prepare( ) is for compiling frequently used SQL statement for reuse. For example, suppose we have a large array which needs to be inserted into an Oracle database. The following will result in a massive speedup in query execution (at least 20-40%), as the SQL statement only needs to be compiled once:

    -
    -$stmt = $db->Prepare('insert into table (field1, field2) values (:f1, :f2)');
    -foreach ($arrayToInsert as $key => $value) {
    -	$db->Execute($stmt, array('f1' => $key, 'f2' => $val);
    -}
    -
    -

     

    -

    4. Working With LOBs

    -

    Oracle treats data which is more than 4000 bytes in length specially. These are called Large Objects, or LOBs for short. Binary LOBs are BLOBs, and character LOBs are CLOBs. In most Oracle libraries, you need to do a lot of work to process LOBs, probably because Oracle designed it to work in systems with little memory. ADOdb tries to make things easy by assuming the LOB can fit into main memory.

    -

    ADOdb will transparently handle LOBs in select statements. The LOBs are automatically converted to PHP variables without any special coding.

    -

    For updating records with LOBs, the functions UpdateBlob( ) and UpdateClob( ) are provided. Here's a BLOB example. The parameters should be self-explanatory: -

    -$ok = $db->Execute("insert into aTable (id, name, ablob) 
    -                                values (aSequence.nextVal, 'Name', null)");
    -if (!$ok) return LogError($db->ErrorMsg());
    -# params: $tableName, $blobFieldName, $blobValue, $whereClause
    -$db->UpdateBlob('aTable', 'ablob', $blobValue, 'id=aSequence.currVal');
    -
    -

    and the analogous CLOB example: -

    -$ok = $db->Execute("insert into aTable (id, name, aclob) 
    -                                values (aSequence.nextVal, 'Name', null)");
    -if (!$ok) return LogError($db->ErrorMsg());
    -$db->UpdateClob('aTable', 'aclob', $clobValue, 'id=aSequence.currVal');
    -
    -

    Note that LogError( ) is a user-defined function, and not part of ADOdb. -

    Inserting LOBs is more complicated. Since ADOdb 4.55, we allow you to do this - (assuming that the photo field is a BLOB, and we want to store $blob_data into - this field, and the primary key is the id field): -

    -	$sql = "INSERT INTO photos ( ID, photo) ".
    -			"VALUES ( :id, empty_blob() )".
    -			" RETURNING photo INTO :xx";
    -
    - 		$stmt = $db->PrepareSP($sql);
    -		$db->InParameter($stmt, $id, 'id');
    -		$blob = $db->InParameter($stmt, $blob_data, 'xx',-1, OCI_B_BLOB);
    -		$db->StartTrans();
    -		$ok = $db->Execute($stmt);
    -		$db->CompleteTrans();
    -
    -

    -

    5. REF CURSORs

    -

    Oracle recordsets can be passed around as variables called REF Cursors. For example, in PL/SQL, we could define a function open_tab that returns a REF CURSOR in the first parameter:

    -
    -TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;
    -
    -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS
    -	BEGIN
    -		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
    -	END open_tab;
    -
    -

    In ADOdb, we could access this REF Cursor using the ExecuteCursor() function. The following will find - all table names that begin with 'A' in the current schema: -

    -$rs = $db->ExecuteCursor("BEGIN open_tab(:refc,'A%'); END;",'refc');
    -while ($arr = $rs->FetchRow()) print_r($arr);
    -
    -

    The first parameter is the PL/SQL statement, and the second parameter is the name of the REF Cursor. -

    -

     

    -

    6. In and Out Parameters

    -

    The following PL/SQL -stored procedure requires an input variable, and returns a result into an output variable: -

    -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS
    -	BEGIN
    -		output := 'I love '||input;
    -	END;
    -
    -

    The following ADOdb code allows you to call the stored procedure:

    -
    -$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;");
    -$input = 'Sophia Loren';
    -$db->InParameter($stmt,$input,'a1');
    -$db->OutParameter($stmt,$output,'a2');
    -$ok = $db->Execute($stmt);
    -if ($ok) echo ($output == 'I love Sophia Loren') ? 'OK' : 'Failed';
    -
    -

    PrepareSP( ) is a special function that knows about bind parameters. -The main limitation currently is that IN OUT parameters do not work. -

    Bind Parameters and REF CURSORs

    -

    We could also rewrite the REF CURSOR example to use InParameter (requires ADOdb 4.53 or later): -

    -$stmt = $db->PrepareSP("BEGIN adodb.open_tab(:refc,:tabname); END;");
    -$input = 'A%';
    -$db->InParameter($stmt,$input,'tabname');
    -$rs = $db->ExecuteCursor($stmt,'refc');
    -while ($arr = $rs->FetchRow()) print_r($arr);
    -
    -

    Bind Parameters and LOBs

    -

    You can also operate on LOBs. In this example, we have IN and OUT parameters using CLOBs. -

    -	$text = 'test test test';
    -	$sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
    -	$stmt = $conn -> PrepareSP($sql);
    -	$conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB); # -1 means variable length
    -	$rs = '';
    -	$conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
    -	$conn -> Execute($stmt);
    -	echo "return = ".$rs."<br>";
    -
    -

    Similarly, you can use the constant OCI_B_BLOB to indicate that you are using BLOBs. -

    Reusing Bind Parameters with CURSOR_SHARING=FORCE

    -

    Many web programmers do not care to use bind parameters, and prefer to enter the SQL directly. So instead of:

    -
    -$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
    -
    -

    They prefer entering the values inside the SQL: -

    -$arr = $db->GetArray("select * from emp where empno>7900");
    -
    -

    This reduces Oracle performance because Oracle will reuse compiled SQL which is identical to previously compiled SQL. The above example with the values inside the SQL -is unlikely to be reused. As an optimization, from Oracle 8.1 onwards, you can set the following session parameter after you login: -

    -ALTER SESSION SET CURSOR_SHARING=FORCE
    -
    -

    This will force Oracle to convert all such variables (eg. the 7900 value) into constant bind parameters, improving SQL reuse.

    -

    More speedup tips.

    -

     

    -

    7. Dates and Datetime in ADOdb

    -

    There are two things you need to know about dates in ADOdb.

    -

    First, to ensure cross-database compability, ADOdb assumes that dates are returned in ISO format (YYYY-MM-DD H24:MI:SS).

    -

    Secondly, since Oracle treats dates and datetime as the same data type, we decided not to display the time in the default date format. So on login, ADOdb will set the NLS_DATE_FORMAT to 'YYYY-MM-DD'. If you prefer to show the date and time by default, do this:

    -
    -$db = NewADOConnection('oci8');
    -$db->NLS_DATE_FORMAT =  'RRRR-MM-DD HH24:MI:SS';
    -$db->Connect($tns, $user, $pwd);
    -
    -

    Or execute:

    -
    $sql = "ALTER SESSION SET NLS_DATE_FORMAT = 'RRRR-MM-DD HH24:MI:SS'";
    -$db->Execute($sql);
    -
    -

    If you are not concerned about date portability and do not use ADOdb's portability layer, you can use your preferred date format instead. -

    -

    8. Database Portability Layer

    -

    ADOdb provides the following functions for portably generating SQL functions - as strings to be merged into your SQL statements:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FunctionDescription
    DBDate($date)Pass in a UNIX timestamp or ISO date and it will convert it to a date - string formatted for INSERT/UPDATE
    DBTimeStamp($date)Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp - string formatted for INSERT/UPDATE
    SQLDate($date, $fmt)Portably generate a date formatted using $fmt mask, for use in SELECT - statements.
    OffsetDate($date, $ndays)Portably generate a $date offset by $ndays.
    Concat($s1, $s2, ...)Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, - which allows || operator.
    IfNull($fld, $replaceNull)Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.
    Param($name)Generates bind placeholders, using ? or named conventions as appropriate.
    $db->sysDateProperty that holds the SQL function that returns today's date
    $db->sysTimeStampProperty that holds the SQL function that returns the current -timestamp (date+time). -
    $db->concat_operatorProperty that holds the concatenation operator -
    $db->lengthProperty that holds the name of the SQL strlen function. -
    $db->upperCaseProperty that holds the name of the SQL strtoupper function. -
    $db->randomProperty that holds the SQL to generate a random number between 0.00 and 1.00. -
    $db->substrProperty that holds the name of the SQL substring function. -
    -

    ADOdb also provides multiple oracle oci8 drivers for different scenarios:

    - - - - - - - - - - - - - - - - - -
    Driver NameDescription
    oci805 Specifically for Oracle 8.0.5. This driver has a slower SelectLimit( ).
    oci8The default high performance driver. The keys of associative arrays returned in a recordset are upper-case.
    oci8po The portable Oracle driver. Slightly slower than oci8. This driver uses ? instead of :bindvar for binding variables, which is the standard for other databases. Also the keys of associative arrays are in lower-case like other databases.
    -

    Here's an example of calling the oci8po driver. Note that the bind variables use question-mark:

    -
    $db = NewADOConnection('oci8po');
    -$db->Connect($tns, $user, $pwd);
    -$db->Execute("insert into atable (f1, f2) values (?,?)", array(12, 'abc'));
    -

      -

    9. Connecting to Oracle

    -

    Before you can use ADOdb, you need to have the Oracle client installed and setup the oci8 extension. This extension comes pre-compiled for Windows (but you still need to enable it in the php.ini file). For information on compiling the oci8 extension for PHP and Apache on Unix, there is an excellent guide at oracle.com.

    -

    Should You Use Persistent Connections

    -

    One question that is frequently asked is should you use persistent connections to Oracle. Persistent connections allow PHP to recycle existing connections, reusing them after the previous web pages have completed. Non-persistent connections close automatically after the web page has completed. Persistent connections are faster because the cost of reconnecting is expensive, but there is additional resource overhead. As an alternative, Oracle allows you to pool and reuse server processes; this is called Shared Server (also known as MTS).

    -

    The author's benchmarks suggest that using non-persistent connections and the Shared Server configuration offer the best performance. If Shared Server is not an option, only then consider using persistent connections.

    -

    Connection Examples

    -

    Just in case you are having problems connecting to Oracle, here are some examples:

    -

    a. PHP and Oracle reside on the same machine, use default SID, with non-persistent connections:

    -
    	$conn = NewADOConnection('oci8');
    -	$conn->Connect(false, 'scott', 'tiger');
    -

    b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS', using persistent connections:

    -
    	$conn = NewADOConnection('oci8');
    -	$conn->PConnect(false, 'scott', 'tiger', 'myTNS');
    -

    or

    -
     	$conn->PConnect('myTNS', 'scott', 'tiger');
    -

    c. Host Address and SID

    -
    -	$conn->connectSID = true;	
    -	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'SID');
    -

    d. Host Address and Service Name

    -
    	$conn->Connect('192.168.0.1', 'scott', 'tiger', 'servicename');
    -

    e. Oracle connection string: -

    	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))
    -			(CONNECT_DATA=(SID=$sid)))";
    -	$conn->Connect($cstr, 'scott', 'tiger');
    -
    -

    f. ADOdb data source names (dsn): -

    -	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional
    -	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
    -	
    -	$dsn = 'oci8://user:pwd@host/sid';
    -	$conn = ADONewConnection($dsn);
    -	
    -	$dsn = 'oci8://user:pwd@/';   # oracle on local machine
    -	$conn = ADONewConnection($dsn);
    -

    With ADOdb data source names, -you don't have to call Connect( ) or PConnect( ). -

    -

     

    -

    10. Error Checking

    -

    The examples in this article are easy to read but a bit simplistic because we ignore error-handling. Execute( ) and Connect( ) will return false on error. So a more realistic way to call Connect( ) and Execute( ) is: -

    function InvokeErrorHandler()
    -{
    global $db; ## assume global - MyLogFunction($db->ErrorNo(), $db->ErrorMsg()); -} -if (!$db->Connect($tns, $usr, $pwd)) InvokeErrorHandler(); - -$rs = $db->Execute("select * from emp where empno>:emp order by empno", - array('emp' => 7900)); -if (!$rs) return InvokeErrorHandler(); -while ($arr = $rs->FetchRow()) { - print_r($arr); - echo "<hr>"; -} -
    -

    You can retrieve the error message and error number of the last SQL statement executed from ErrorMsg( ) and ErrorNo( ). You can also define a custom error handler function. -ADOdb also supports throwing exceptions in PHP5. -

     

    -

    Handling Large Recordsets (added 27 May 2005)

    -The oci8 driver does not support counting the number of records returned in a SELECT statement, so the function RecordCount() -is emulated when the global variable $ADODB_COUNTRECS is set to true, which is the default. -We emulate this by buffering all the records. This can take up large amounts of memory for big recordsets. - Set $ADODB_COUNTRECS to false for the best performance. -

    -This variable is checked every time a query is executed, so you can selectively choose which recordsets to count. -

     

    -

    11. Other ADOdb Features

    -

    Schema generation. This allows you to define a schema using XML and import it into different RDBMS systems portably.

    -

    Performance monitoring and tracing. Highlights of performance monitoring include identification of poor and suspicious SQL, with explain plan support, and identifying which web pages the SQL ran on.

    -

     

    -

    12. Download

    -

    You can download ADOdb from sourceforge. ADOdb uses a BSD style license. That means that it is free for commercial use, and redistribution without source code is allowed.

    -

     

    -

    13. Resources

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-perf.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-perf.htm deleted file mode 100755 index b7a23fc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-perf.htm +++ /dev/null @@ -1,962 +0,0 @@ - - - - ADOdb Performance Monitoring Library - - - -

    The ADOdb Performance Monitoring Library

    -

    V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my)

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products.

    -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This module, part of the ADOdb package, provides both CLI and HTML -interfaces for viewing key performance indicators of your database. -This is very useful because web apps such as the popular phpMyAdmin -currently do not provide effective database health monitoring tools. -The module provides the following:

    -
      -
    • A quick health check of your database server using $perf->HealthCheck() -or $perf->HealthCheckCLI().
    • -
    • User interface for performance monitoring, $perf->UI(). -This UI displays: -
        -
      • the health check,
      • -
      • all SQL logged and their query plans,
      • -
      • a list of all tables in the current database
      • -
      • an interface to continiously poll the server for key -performance indicators such as CPU, Hit Ratio, Disk I/O
      • -
      • a form where you can enter and run SQL interactively.
      • -
      -
    • -
    • Gives you an API to build database monitoring tools for a server -farm, for example calling $perf->DBParameter('data cache hit -ratio') returns this very important statistic in a database -independant manner.
    • -
    -

    ADOdb also has the ability to log all SQL executed, using LogSQL. All SQL logged can be -analyzed through the performance monitor UI. In the View -SQL mode, we categorize the SQL into 3 types: -

    -
      -
    • Suspicious SQL: queries with high average execution times, -and are potential candidates for rewriting
    • -
    • Expensive SQL: queries with high total execution times -(#executions * avg execution time). Optimizing these queries will -reduce your database server load.
    • -
    • Invalid SQL: queries that generate errors.
    • -
    -

    Each query is hyperlinked to a description of the query plan, and -every PHP script that executed that query is also shown.

    -

    Please note that the information presented is a very basic database -health check, and does not provide a complete overview of database -performance. Although some attempt has been made to make it work across -multiple databases in the same way, it is impossible to do so. For the -health check, we do try to display the following key database -parameters for all drivers:

    -
      -
    • data cache size - The amount of memory allocated to the -cache.
    • -
    • data cache hit ratio - A measure of how effective the -cache is, as a percentage. The higher, the better.
    • -
    • current connections - The number of sessions currently -connected to the database.
    • -
    -

    You will need to connect to the database as an administrator to view -most of the parameters.

    -

    Code improvements as very welcome, particularly adding new database -parameters and automated tuning hints.

    - -

    Usage

    -

    Currently, the following drivers: mysql, postgres, -oci8, mssql, informix and db2 are -supported. To create a new performance monitor, call NewPerfMonitor( ) -as demonstrated below:

    -
    <?php
    include_once('adodb.inc.php');
    session_start(); # session variables required for monitoring
    $conn = ADONewConnection($driver);
    $conn->Connect($server,$user,$pwd,$db);
    $perf =& NewPerfMonitor($conn);
    $perf->UI($pollsecs=5);
    ?>
    -

    It is also possible to retrieve a single database parameter:

    -
    $size = $perf->DBParameter('data cache size');
    -

    -Thx to Fernando Ortiz for the informix module.

    -

    Methods

    - -

    function UI($pollsecs=5)

    -

    Creates a web-based user interface for performance monitoring. When -you click on Poll, server statistics will be displayed every $pollsecs -seconds. See Usage above.

    -

    Since 4.11, we allow users to enter and run SQL interactively via -the "Run SQL" link. To disable this for security reasons, set this -constant before calling $perf->UI().

    -

    -
    define('ADODB_PERF_NO_RUN_SQL',1);
    -

    Sample output follows below:

    - - - - - - - - - -
    ADOdb -Performance Monitor for localhost, db=test
    - PostgreSQL 7.3.2 on i686-pc-cygwin, compiled by -GCC gcc (GCC) 3.2 20020927 (prerelease)
    Performance Stats   View -SQL   View Tables   Poll -Stats
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    postgres7

    -
    ParameterValueDescription
    Ratios  
    statistics collectorTRUEValue must be TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level -and stats_block_level must be set to true in postgresql.conf)
    data cache hit ratio99.7967555299239 
    IO  
    data reads125 
    data writes21.78125000000000000Count of inserts/updates/deletes * coef
    Data Cache  
    data cache buffers640Number of cache buffers. Tuning
    cache blocksize8192(estimate)
    data cache size5M 
    operating system cache size80M(effective cache size)
    Memory Usage  
    sort buffer size1MSize of sort buffer (per query)
    Connections  
    current connections0 
    max connections32 
    Parameters  
    rollback buffers8WAL buffers
    random page cost4Cost of doing a seek (default=4). See random_page_cost
    -

    function HealthCheck()

    -

    Returns database health check parameters as a HTML table. You will -need to echo or print the output of this function,

    -

    function HealthCheckCLI()

    -

    Returns database health check parameters formatted for a command -line interface. You will need to echo or print the output of this -function. Sample output for mysql:

    -
    -- Ratios -- 
    MyISAM cache hit ratio => 56.5635738832
    InnoDB cache hit ratio => 0
    sql cache hit ratio => 0
    -- IO --
    data reads => 2622
    data writes => 2415.5
    -- Data Cache --
    MyISAM data cache size => 512K
    BDB data cache size => 8388600
    InnoDB data cache size => 8M
    -- Memory Pools --
    read buffer size => 131072
    sort buffer size => 65528
    table cache => 4
    -- Connections --
    current connections => 3
    max connections => 100
    -

    function Poll($pollSecs=5) -

    -

    Run in infinite loop, displaying the following information every -$pollSecs. This will not work properly if output buffering is enabled. -In the example below, $pollSecs=3: -

    -
    Accumulating statistics...
    Time WS-CPU% Hit% Sess Reads/s Writes/s
    11:08:30 0.7 56.56 1 0.0000 0.0000
    11:08:33 1.8 56.56 2 0.0000 0.0000
    11:08:36 11.1 56.55 3 2.5000 0.0000
    11:08:39 9.8 56.55 2 3.1121 0.0000
    11:08:42 2.8 56.55 1 0.0000 0.0000
    11:08:45 7.4 56.55 2 0.0000 1.5000
    -

    WS-CPU% is the Web Server CPU load of the server that PHP is -running from (eg. the database client), and not the database. The Hit% -is the data cache hit ratio. Sess is the current number of -sessions connected to the database. If you are using persistent -connections, this should not change much. The Reads/s and Writes/s -are synthetic values to give the viewer a rough guide to I/O, and are -not to be taken literally.

    -

    function SuspiciousSQL($numsql=10)

    -

    Returns SQL which have high average execution times as a HTML table. -Each sql statement -is hyperlinked to a new window which details the execution plan and the -scripts that execute this SQL. -

    -

    The number of statements returned is determined by $numsql. Data is -taken from the adodb_logsql table, where the sql statements are logged -when -$connection->LogSQL(true) is enabled. The adodb_logsql table is -populated using $conn->LogSQL. -

    -

    For Oracle, Ixora Suspicious SQL returns a list of SQL statements -that are most cache intensive as a HTML table. These are data intensive -SQL statements that could benefit most from tuning.

    -

    function ExpensiveSQL($numsql=10)

    -

    Returns SQL whose total execution time (avg time * #executions) is -high as a HTML table. Each sql statement -is hyperlinked to a new window which details the execution plan and the -scripts that execute this SQL. -

    -

    The number of statements returned is determined by $numsql. Data is -taken from the adodb_logsql table, where the sql statements are logged -when -$connection->LogSQL(true) is enabled. The adodb_logsql table is -populated using $conn->LogSQL. -

    -

    For Oracle, Ixora Expensive SQL returns a list of SQL statements -that are taking the most CPU load when run. -

    -

    function InvalidSQL($numsql=10)

    -

    Returns a list of invalid SQL as an HTML table. -

    -

    Data is taken from the adodb_logsql table, where the sql statements -are logged when -$connection->LogSQL(true) is enabled. -

    -

    function Tables($orderby=1)

    -

    Returns information on all tables in a database, with the first two -fields containing the table name and table size, the remaining fields -depend on the database driver. If $orderby is set to 1, it will sort by -name. If $orderby is set to 2, then it will sort by table size. Some -database drivers (mssql and mysql) will ignore the $orderby clause. For -postgresql, the information is up-to-date since the last vacuum. -Not supported currently for db2.

    -

    Raw Functions

    -

    Raw functions return values without any formatting.

    -

    function DBParameter($paramname)

    -

    Returns the value of a database parameter, such as -$this->DBParameter("data cache size").

    -

    function CPULoad()

    -

    Returns the CPU load of the database client (NOT THE SERVER) as a -percentage. Only works for Linux and Windows. For Windows, WMI must be -available.

    -

    Format of $settings Property

    -

    To create new database parameters, you need to understand -$settings. The $settings data structure is an associative array. Each -element of the array defines a database parameter. The key is the name -of the database parameter. If no key is defined, then it is assumed to -be a section break, and the value is the name of the section break. If -this is too confusing, looking at the source code will help a lot!

    -

    Each database parameter is itself an array consisting of the -following elements:

    -
      -
    1. Category code, used to group related db parameters. If the -category code is 'HIDE', then -the database parameter is not shown when HTML() is called.
      -
    2. -
    3. either -
        -
      1. sql string to retrieve value, eg. "select value from -v\$parameter where name='db_block_size'",
      2. -
      3. array holding sql string and field to look for, e.g. -array('show variables','table_cache'); optional 3rd parameter is the -$rs->fields[$index] to use (otherwise $index=1), and optional 4th -parameter is a constant to multiply the result with (typically 100 for -percentage calculations),
      4. -
      5. a string prefixed by =, then a PHP method of the class is -invoked, e.g. to invoke $this->GetIndexValue(), set this array -element to '=GetIndexValue',
        -
      6. -
      -
    4. -
    5. Description of database parameter. If description begins with an -=, then it is interpreted as a method call, just as in (1c) above, -taking one parameter, the current value. E.g. '=GetIndexDescription' -will invoke $this->GetIndexDescription($val). This is useful for -generating tuning suggestions. For an example, see WarnCacheRatio().
    6. -
    -

    Example from MySQL, table_cache database parameter:

    -
    'table cache' => array('CACHE',            # category code
    array("show variables", 'table_cache'), # array (type 1b)
    'Number of tables to keep open'), # description
    -

    Example Health Check Output

    -

    db2 informix mysql mssql oci8 -postgres

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    db2

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio0    
    Data Cache
    data cache buffers250   See tuning -reference.
    cache blocksize4096    
    data cache size1000K    
    Connections
    current connections2    
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    informix

    -
    ParameterVal -ueDescription
    Ratios  
    data cache hit -ratio95.89 
    IO  
    data -reads1883884Page reads
    data writes1716724Page writes
    Connections
    current connections263.0Number of -sessions
    -

    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    mysql

    -
    ParameterValueDescription
    Ratios  
    MyISAM cache hit ratio56.5658301822Cache ratio should be at least 90%
    InnoDB cache hit ratio0Cache ratio should be at least 90%
    sql cache hit ratio0 
    IO  
    data reads2622Number of selects (Key_reads is not accurate)
    data writes2415.5Number of inserts/updates/deletes * coef (Key_writes is not -accurate)
    Data Cache  
    MyISAM data cache size512K 
    BDB data cache size8388600 
    InnoDB data cache size8M 
    Memory Pools  
    read buffer size131072(per session)
    sort buffer size65528Size of sort buffer (per session)
    table cache4Number of tables to keep open
    Connections  
    current connections3 
    max connections100 
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    mssql

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio99.9999694824 
    prepared sql hit ratio99.7738579828 
    adhoc sql hit ratio98.4540169133 
    IO  
    data reads2858 
    data writes1438 
    Data Cache  
    data cache size4362in K
    Connections  
    current connections14 
    max connections32767 
    -

     

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    oci8

    -
    ParameterValueDescription
    Ratios  
    data cache hit ratio96.98 
    sql cache hit ratio99.96 
    IO  
    data reads842938 
    data writes16852 
    Data Cache  
    data cache buffers3072Number of cache buffers
    data cache blocksize8192 
    data cache size48Mshared_pool_size
    Memory Pools  
    java pool size0java_pool_size
    sort buffer size512Ksort_area_size (per query)
    user session buffer size8Mlarge_pool_size
    Connections  
    current connections1 
    max connections170 
    data cache utilization ratio88.46Percentage of data cache actually in use
    user cache utilization ratio91.76Percentage of user cache (large_pool) actually in use
    rollback segments11 
    Transactions  
    peak transactions24Taken from high-water-mark
    max transactions187max transactions / rollback segments < 3.5 (or -transactions_per_rollback_segment)
    Parameters  
    cursor sharingEXACTCursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR -(9i+). See cursor_sharing.
    index cache cost0% of indexed data blocks expected in the cache. Recommended -is 20-80. Default is 0. See optimizer_index_caching.
    random page cost100Recommended is 10-50 for TP, and 50 for data warehouses. -Default is 100. See optimizer_index_cost_adj. -
    -

    Suspicious SQL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LOADEXECUTESSQL_TEXT
    .73%89select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o, -sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576) -and o.obj#=t.obj# and o.owner# = u.user# select i.obj#, i.flags, -u.name, o.name from sys.obj$ o, sys.user$ u, sys.ind$ i where -(bitand(i.flags, 256) = 256 or bitand(i.flags, 512) = 512) and -(not((i.type# = 9) and bitand(i.flags,8) = 8)) and o.obj#=i.obj# and -o.owner# = u.user#
    .84%3select /*+ RULE */ distinct tabs.table_name, tabs.owner , -partitioned, iot_type , TEMPORARY, table_type, table_type_owner from -DBA_ALL_TABLES tabs where tabs.owner = :own
    3.95%6SELECT round(count(1)*avg(buf.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.buffer_pool = buf.name and buf.name = -'DEFAULT'
    4.50%6SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.tablespace_name = tsp.tablespace_name
    57.34%9267select t.schema, t.name, t.flags, q.name from -system.aq$_queue_tables t, sys.aq$_queue_table_affinities aft, -system.aq$_queues q where aft.table_objno = t.objno and -aft.owner_instance = :1 and q.table_objno = t.objno and q.usage = 0 and -bitand(t.flags, 4+16+32+64+128+256) = 0 for update of t.name, -aft.table_objno skip locked
    -

    Expensive SQL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    LOADEXECUTESSQL_TEXT
    5.24%1select round(sum(bytes)/1048576) from dba_segments
    6.89%6SELECT round(count(1)*avg(buf.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.buffer_pool = buf.name and buf.name = -'DEFAULT'
    7.85%6SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM -DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE -obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner = -seg.owner and obj.object_name = seg.segment_name and obj.object_type = -seg.segment_type and seg.tablespace_name = tsp.tablespace_name
    33.69%89select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o, -sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576) -and o.obj#=t.obj# and o.owner# = u.user#
    36.44%89select i.obj#, i.flags, u.name, o.name from sys.obj$ o, -sys.user$ u, sys.ind$ i where (bitand(i.flags, 256) = 256 or -bitand(i.flags, 512) = 512) and (not((i.type# = 9) and -bitand(i.flags,8) = 8)) and o.obj#=i.obj# and o.owner# = u.user#
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    postgres7

    -
    ParameterValueDescription
    Ratios  
    statistics collectorFALSEMust be set to TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level -and stats_block_level must be set to true in postgresql.conf)
    data cache hit ratio99.9666031916603 
    IO  
    data reads15 
    data writes0.000000000000000000Count of inserts/updates/deletes * coef
    Data Cache  
    data cache buffers1280Number of cache buffers. Tuning
    cache blocksize8192(estimate)
    data cache size10M 
    operating system cache size80000K(effective cache size)
    Memory Pools  
    sort buffer size1MSize of sort buffer (per query)
    Connections  
    current connections13 
    max connections32 
    Parameters  
    rollback buffers8WAL buffers
    random page cost4Cost of doing a seek (default=4). See random_page_cost
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.htm deleted file mode 100755 index 9e207be6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.htm +++ /dev/null @@ -1,336 +0,0 @@ - - - - ADODB Session Management Manual - - - - -

    ADODB Session 2 Management Manual

    -

    -V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my) -

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products. -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This document discusses the newer session handler adodb-session2.php. If - you have used the older adodb-session.php, then be forewarned that you will - need to alter your session table format. Otherwise everything is backward - compatible. - Here are the older - docs for - adodb-session.php.

    -

    Why Session Variables in a Database?

    -

    We store state information specific to a user or web - client in session variables. These session variables persist throughout a -session, as the user moves from page to page.

    -

    To use session variables, call session_start() at the beginning of -your web page, before your HTTP headers are sent. Then for every -variable you want to keep alive for the duration of the session, call -session_register($variable_name). By default, the session handler will -keep track of the session by using a cookie. You can save objects or -arrays in session variables also. -

    -

    The default method of storing sessions is to store it in a file. -However if you have special needs such as you: -

    -
      -
    • Have multiple web servers that need to share session info
    • -
    • Need to do special processing of each session
    • -
    • Require notification when a session expires
    • -
    -

    The ADOdb session handler provides you with the above -additional capabilities by storing the session information as records -in a database table that can be shared across multiple servers.

    -

    These records will be garbage collected based on the php.ini [session] timeout settings. -You can register a notification function to notify you when the record has expired and -is about to be freed by the garbage collector.

    -

    An alternative to using a database backed session handler is to use memcached. - This is a distributed memory based caching system suitable for storing session - information. -

    -

    The Improved Session Handler

    -

    In ADOdb 4.91, we added a new session handler, in adodb-session2.php. -It features the following improvements: -

      -
    • Fully supports server farms using a new database table format. The - previous version used the web server time for timestamps, which can cause problems - on a system with multiple web servers with possibly inconsistent - times. The new version uses the database server time instead for all timestamps. -
    • The older database table format is obsolete. The database table must be modified - to support storage of the database server time mentioned above. Also the field - named DATA has been changed to SESSDATA. In some databases, DATA is a reserved - word. -
    • The functions dataFieldName() and syncSeconds() is obsolete. -
    - -

    Usage is - -

    -include_once("adodb/session/adodb-session2.php");
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    -session_start();
    -
    -#
    # Test session vars, the following should increment on refresh
    #
    $_SESSION['AVAR'] += 1;
    print "<p>\$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
    -
    - -

    When the session is created in session_start( ), the global variable $ADODB_SESS_CONN holds -the connection object. -

    The default name of the table is sessions2. If you want to override it: - -

    -include_once("adodb/session/adodb-session2.php");
    -$options['table'] = 'mytablename';
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options);
    -session_start();
    -
    - - -

    ADOdb Session Handler Features

    -
      -
    • Ability to define a notification function that is called when a -session expires. Typically -used to detect session logout and release global resources.
    • -
    • Optimization of database writes. We crc32 the session data and -only perform an update -to the session data if there is a data change.
    • -
    • Support for large amounts of session data with CLOBs (see -adodb-session-clob2.php). Useful -for Oracle.
    • -
    • Support for encrypted session data, see -adodb-cryptsession2.php. Enabling encryption is simply a matter of -including adodb-cryptsession2.php instead of adodb-session2.php.
    • -
    -

    Session Handler Files

    -

    There are 3 session management files that you can use: -

    -
    adodb-session2.php        : The default
    adodb-cryptsession2.php : Use this if you want to store encrypted session data in the database
    adodb-session-clob2.php : Use this if you are storing DATA in clobs and you are NOT using oci8 driver
    -

    Usage Examples

    -

    To force non-persistent connections, call Persist() first before session_start(): - - -

    - 
    -include_once("adodb/session/adodb-session2.php");
    -$driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb';
    -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    ADOdb_session::Persist($connectMode=false);
    -session_start();
    -
    -

    The parameter to the Persist( ) method sets the connection mode. You can - pass the following:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    $connectModeConnection Method
    true

    PConnect( )

    falseConnect( )
    'N'NConnect( )
    'P'PConnect( )
    'C'Connect( )
    -

    To use a encrypted sessions, simply replace the file adodb-session2.php:

    -
     
    include('adodb/session/adodb-cryptsession2.php');

    $driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb'; -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    adodb_sess_open(false,false,$connectMode=false);
    -session_start();
    -

    And the same technique for adodb-session-clob2.php:

    -
      
    include('adodb/session/adodb-session2-clob2.php');
    $driver = 'oci8'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb'; -ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
    adodb_sess_open(false,false,$connectMode=false);
    -session_start();
    -

    Installation

    -

    1. Create this table in your database. Here is the MySQL version: -

      
    -CREATE TABLE sessions2(
    -	  sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
    -  	  expiry DATETIME NOT NULL ,
    -	  expireref VARCHAR( 250 ) DEFAULT '',
    -	  created DATETIME NOT NULL ,
    -	  modified DATETIME NOT NULL ,
    -	  sessdata LONGTEXT DEFAULT '',
    -	  PRIMARY KEY ( sesskey ) ,
    -	  INDEX sess2_expiry( expiry ),
    -	  INDEX sess2_expireref( expireref )
    -)
    - -

    For PostgreSQL, use: -

    CREATE TABLE sessions2(
    - sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
    - expiry TIMESTAMP NOT NULL ,
    - expireref VARCHAR( 250 ) DEFAULT '',
    - created TIMESTAMP NOT NULL ,
    - modified TIMESTAMP NOT NULL ,
    - sessdata TEXT DEFAULT '',
    - PRIMARY KEY ( sesskey )
    - );
    -
    -
    create INDEX sess2_expiry on sessions2( expiry );
    -create INDEX sess2_expireref on sessions2 ( expireref );
    -

    Here is the Oracle definition, which uses a CLOB for the SESSDATA field: -

    -  CREATE TABLE SESSIONS2
    (
    SESSKEY VARCHAR2(48 BYTE) NOT NULL,
    EXPIRY DATE NOT NULL,
    EXPIREREF VARCHAR2(200 BYTE),
    CREATED DATE NOT NULL,
    MODIFIED DATE NOT NULL,
    SESSDATA CLOB,
    PRIMARY KEY(SESSKEY)
    ); -
    CREATE INDEX SESS2_EXPIRY ON SESSIONS2(EXPIRY); -CREATE INDEX SESS2_EXPIREREF ON SESSIONS2(EXPIREREF);
    -

    We need to use a CLOB here because for text greater than 4000 bytes long, - Oracle requires you to use the CLOB data type. If you are using the oci8 driver, - ADOdb will automatically enable CLOB handling. So you can use either adodb-session2.php - or adodb-session-clob2.php - in this case it doesn't matter.
    -

    Notifications

    -

    You can receive notification when your session is cleaned up by the session garbage collector or -when you call session_destroy(). -

    PHP's session extension will automatically run a special garbage collection function based on -your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call -adodb's garbage collection function, which can be setup to do notification. -

    -

    -	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
    -	GC Function     GC Function        to be deleted      notification      records
    -	executed at     called by                             for all recs
    -	random time     Session Extension                     queued for deletion
    -
    -

    When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically -the userid of the session. Later when the session has expired, just before the record is deleted, -we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which -is the userid of the person being logged off. -

    ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session -start to store the notification configuration. -$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the -first being the name of the session variable you would like to store in -the EXPIREREF field, and the 2nd is the notification function's name.

    -

    For example, suppose we want to be notified when a user's session has expired, -based on the userid. When the user logs in, we store the id in the global session variable -$USERID. The function name is 'NotifyFn'. -

    -So we define (before session_start() is called):

    -
     
    -	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -And when the NotifyFn is called (when the session expires), the -$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The -session key (which is the primary key of the record in the sessions -table) is the 2nd parameter. -

    Here is an example of a Notification function that deletes some -records in the database and temporary files:

    -
    
    -	function NotifyFn($expireref, $sesskey)
    -	{
    -		global $ADODB_SESS_CONN; # the session connection object
    -		$user = $ADODB_SESS_CONN->qstr($expireref);
    -		
    -		$ADODB_SESS_CONN->Execute("delete from shopping_cart where user=$user");          
    -		system("rm /work/tmpfiles/$expireref/*");
    -	}  
    -			  
    -

    NOTE 1: If you have register_globals disabled in php.ini, then you -will have to manually set the EXPIREREF. E.g.

    -
     
    -$GLOBALS['USERID'] = GetUserID();
    -$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -

    NOTE 2: If you want to change the EXPIREREF after the session -record has been created, you will need to modify any session variable -to force a database record update. -

    -

    Neat Notification Tricks

    -

    ExpireRef normally holds the user id of the current session. -

    -

    1. You can then write a session monitor, scanning expireref to see -who is currently logged on. -

    -

    2. If you delete the sessions record for a specific user, eg. -

    -
    delete from sessions where expireref = '$USER'
    -then the user is logged out. Useful for ejecting someone from a -site. -

    3. You can scan the sessions table to ensure no user -can be logged in twice. Useful for security reasons. -

    -

    Compression/Encryption Schemes

    -Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and -compression schemes are supported. Currently, supported are: -

    -

      MD5Crypt (crypt.inc.php)
    MCrypt
    Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
    GZip
    BZip2
    -

    These are stackable. E.g. -

    ADODB_Session::filter(new ADODB_Compress_Bzip2());
    ADODB_Session::filter(new ADODB_Encrypt_MD5());
    -will compress and then encrypt the record in the database. -

    Session Cookie Regeneration: adodb_session_regenerate_id()

    -

    Dynamically change the current session id with a newly generated one and update - database. Currently only works with cookies. Useful to improve security by - reducing the risk of session-hijacking. See this article on Session - Fixation for more info -on the theory behind this feature. Usage:

    -	include('path/to/adodb/session/adodb-session2.php');
    -	
    -	session_start();
    -	# Approximately every 10 page loads, reset cookie for safety.
    -	# This is extremely simplistic example, better 
    -	# to regenerate only when the user logs in or changes
    -	# user privilege levels.
    -	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
    -
    -

    This function calls session_regenerate_id() internally or simulates it if the function does not exist. -

    Vacuum/Optimize Database

    -

    During session garbage collection, if postgresql is detected, - ADOdb can be set to run VACUUM. If mysql is detected, then optimize database - could be called.You can turn this on or off using:

    -
    $turnOn = true; # or false
    -ADODB_Session::optimize($turnOn);
    -
    -

    The default is optimization is disabled.

    -

    Backwards Compatability

    -

    The older method of connecting to ADOdb using global variables is still supported:

    -
     $ADODB_SESSION_DRIVER='mysql';
    - $ADODB_SESSION_CONNECT='localhost';
    - $ADODB_SESSION_USER ='root';
    - $ADODB_SESSION_PWD ='abc';
    - $ADODB_SESSION_DB ='phplens';
    - 
    - include('path/to/adodb/session/adodb-session2.php'); 
    -

    In the above example, the only things you need to change in your code to upgrade - is

    -
      -
    • your session table format to the new one.
    • -
    • the include file from adodb-session.php to adodb-session2.php.
    • -
    -

    More Info

    -

    Also see the core ADOdb documentation. And if - you are interested in the obsolete adodb-session.php, see old - session documentation.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.old.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.old.htm deleted file mode 100755 index f8739bdb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/docs-session.old.htm +++ /dev/null @@ -1,313 +0,0 @@ - - - - ADODB Old Session Management Manual - - - - -

    ADODB Session Management Manual

    -

    -V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my) -

    -

    This software is dual licensed using BSD-Style and -LGPL. This means you can use it in compiled proprietary and commercial -products. -

    Useful ADOdb links: DownloadOther Docs -

    -

    Introduction

    -

    This documentation discusses the old adodb-session.php. -Here is the new documentation on the newer adodb-session2.php. -

    We store state information specific to a user or web client in -session variables. These session variables persist throughout a -session, as the user moves from page to page.

    -

    To use session variables, call session_start() at the beginning of -your web page, before your HTTP headers are sent. Then for every -variable you want to keep alive for the duration of the session, call -session_register($variable_name). By default, the session handler will -keep track of the session by using a cookie. You can save objects or -arrays in session variables also. -

    -

    The default method of storing sessions is to store it in a file. -However if you have special needs such as you: -

    -
      -
    • Have multiple web servers that need to share session info
    • -
    • Need to do special processing of each session
    • -
    • Require notification when a session expires
    • -
    -

    The ADOdb session handler provides you with the above -additional capabilities by storing the session information as records -in a database table that can be shared across multiple servers.

    -

    These records will be garbage collected based on the php.ini [session] timeout settings. -You can register a notification function to notify you when the record has expired and -is about to be freed by the garbage collector.

    -

    Important Upgrade Notice: Since ADOdb 4.05, the session files -have been moved to its own folder, adodb/session. This is a rewrite -of the session code by Ross Smith. The old session code is in -adodb/session/old.

    -

    ADOdb Session Handler Features

    -
      -
    • Ability to define a notification function that is called when a -session expires. Typically -used to detect session logout and release global resources.
    • -
    • Optimization of database writes. We crc32 the session data and -only perform an update -to the session data if there is a data change.
    • -
    • Support for large amounts of session data with CLOBs (see -adodb-session-clob.php). Useful -for Oracle.
    • -
    • Support for encrypted session data, see -adodb-cryptsession.php. Enabling encryption is simply a matter of -including adodb-cryptsession.php instead of adodb-session.php.
    • -
    -

    Setup

    -

    There are 3 session management files that you can use: -

    -
    adodb-session.php        : The default
    adodb-session-clob.php : Use this if you are storing DATA in clobs
    adodb-cryptsession.php : Use this if you want to store encrypted session data in the database

    -
    -

    Examples -

    -     include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';


    include('adodb/session/adodb-session.php');
    session_start();

    #
    # Test session vars, the following should increment on refresh
    #
    $_SESSION['AVAR'] += 1;
    print "<p>\$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
    - -

    To force non-persistent connections, call adodb_session_open() first before session_start(): -

    -

    - 
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';


    include('adodb/session/adodb-session.php');
    adodb_sess_open(false,false,false);

    session_start();
    -
    -

    The 3rd parameter to adodb_sess_open($path, $sessname, $connectMode) sets the connection method. You can pass in the following:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    $connectModeConnection Method
    true

    PConnect( )

    falseConnect( )
    'N'NConnect( )
    'P'PConnect( )
    'C'Connect( )
    -

    To use a encrypted sessions, simply replace the file adodb-session.php:

    -
     
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';

    include('adodb/session/adodb-cryptsession.php');

    session_start();

    -
    -

    And the same technique for adodb-session-clob.php:

    -
      
    include('adodb/adodb.inc.php');

    $ADODB_SESSION_DRIVER='mysql';
    $ADODB_SESSION_CONNECT='localhost';
    $ADODB_SESSION_USER ='scott';
    $ADODB_SESSION_PWD ='tiger';
    $ADODB_SESSION_DB ='sessiondb';

    include('adodb/session/adodb-session-clob.php');

    session_start();
    -
    -

    An alternative way to set persistant or non-persistent connections is to call the following function before session_start() is called. -

    - 	ADODB_Session::persist('P'); # 'C' for non-persistent connections
    - 
    -

    Installation

    -

    1. Create this table in your database (MySQL syntax): -

      
    -   create table sessions (
    -       SESSKEY char(32) not null,
    -       EXPIRY int(11) unsigned not null,
    -       EXPIREREF varchar(64),
    -	   DATA text not null,
    -	   primary key (sesskey)
    -	   );
    - 
    - -

    You may want to rename the 'data' field to 'session_data' as - 'data' appears to be a reserved word for one or more of the following: -

      -
    • ANSI SQL -
    • IBM DB2 -
    • MS SQL Server -
    • Postgres -
    • SAP -
    -

    - If you do, then execute: -

    -		ADODB_Session::dataFieldName('session_data');
    -
    -

    For the adodb-session-clob.php version, create this: -

    -    
    create table sessions (
    SESSKEY char(32) not null,
    EXPIRY int(11) unsigned not null,
    EXPIREREF varchar(64),
    DATA CLOB,
    primary key (sesskey)
    );
    -
    -

    2. Then define the following parameters. You can either modify this file, or define them before this file is included: -

          
    $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';
    $ADODB_SESSION_CONNECT='server to connect to';
    $ADODB_SESSION_USER ='user';
    $ADODB_SESSION_PWD ='password';
    $ADODB_SESSION_DB ='database';
    $ADODB_SESSION_TBL = 'sessions'; # setting this is optional
    -

    - When the session is created, $ADODB_SESS_CONN holds the connection object.

    3. Recommended is PHP 4.0.6 or later. There are documented session bugs in earlier versions of PHP. -

    Notifications

    -

    You can receive notification when your session is cleaned up by the session garbage collector or -when you call session_destroy(). -

    PHP's session extension will automatically run a special garbage collection function based on -your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call -adodb's garbage collection function, which can be setup to do notification. -

    -

    -	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
    -	GC Function     GC Function        to be deleted      notification      records
    -	executed at     called by                             for all recs
    -	random time     Session Extension                     queued for deletion
    -
    -

    When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically -the userid of the session. Later when the session has expired, just before the record is deleted, -we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which -is the userid of the person being logged off. -

    ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session -start to store the notification configuration. -$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the -first being the name of the session variable you would like to store in -the EXPIREREF field, and the 2nd is the notification function's name.

    -

    For example, suppose we want to be notified when a user's session has expired, -based on the userid. When the user logs in, we store the id in the global session variable -$USERID. The function name is 'NotifyFn'. -

    -So we define (before session_start() is called):

    -
     
    -	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -And when the NotifyFn is called (when the session expires), the -$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The -session key (which is the primary key of the record in the sessions -table) is the 2nd parameter. -

    Here is an example of a Notification function that deletes some -records in the database and temporary files:

    -
    
    -	function NotifyFn($expireref, $sesskey)
    -	{
    -		global $ADODB_SESS_CONN; # the session connection object
    -		$user = $ADODB_SESS_CONN->qstr($expireref);
    -		
    -		$ADODB_SESS_CONN->Execute("delete from shopping_cart where user=$user");          
    -		system("rm /work/tmpfiles/$expireref/*");
    -	}  
    -			  
    -

    NOTE 1: If you have register_globals disabled in php.ini, then you -will have to manually set the EXPIREREF. E.g.

    -
     
    -$GLOBALS['USERID'] = GetUserID();
    -$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
    -
    -

    NOTE 2: If you want to change the EXPIREREF after the session -record has been created, you will need to modify any session variable -to force a database record update. -

    -

    Neat Notification Tricks

    -

    ExpireRef normally holds the user id of the current session. -

    -

    1. You can then write a session monitor, scanning expireref to see -who is currently logged on. -

    -

    2. If you delete the sessions record for a specific user, eg. -

    -
    delete from sessions where expireref = '$USER'
    -then the user is logged out. Useful for ejecting someone from a -site. -

    3. You can scan the sessions table to ensure no user -can be logged in twice. Useful for security reasons. -

    -

    Using Oracle CLOBs

    -

    Suppose you are storing the DATA field in a CLOB: -

    
    -   CREATE TABLE sessions (
    -       SESSKEY VARCHAR(32) NOT NULL,
    -       EXPIRY NUMBER(16)  NOT NULL,
    -       EXPIREREF VARCHAR(64),
    -       DATA CLOB,
    -      PRIMARY KEY (sesskey)
    -  );
    - 
    -

    Then your PHP code could look like this: -

    -	ADODB_SESSION_DRIVER='oci8';
    -	$ADODB_SESSION_CONNECT=$tnsname;
    -	$ADODB_SESSION_USER ='scott';
    -	$ADODB_SESSION_PWD = 'tiger';
    -	$ADODB_SESSION_DB ='';
    -	
    -	$ADODB_SESSION_USE_LOBS = 'clob';
    -	$ADODB_SESSION_TBL = 'sessions';
    -	
    -	$ADODB_SESS_DEBUG=0;
    -	
    -	include(ADODB_DIR.'/session/adodb-session.php');
    -	
    -	ADODB_Session::persist('P'); # use 'C' for non-persistent connects
    -	
    -	session_start();
    - 
    -

    Note that you can set persistance using ADODB_Session::persist('P'). - -

    Compression/Encryption Schemes

    -Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and -compression schemes are supported. Currently, supported are: -

    -

      MD5Crypt (crypt.inc.php)
    MCrypt
    Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
    GZip
    BZip2
    -

    These are stackable. E.g. -

    ADODB_Session::filter(new ADODB_Compress_Bzip2());
    ADODB_Session::filter(new ADODB_Encrypt_MD5());
    -will compress and then encrypt the record in the database. -

    adodb_session_regenerate_id()

    -

    Dynamically change the current session id with a newly generated one and update database. Currently only -works with cookies. Useful to improve security by reducing the risk of session-hijacking. -See this article on Session Fixation for more info -on the theory behind this feature. Usage: -

    -	$ADODB_SESSION_DRIVER='mysql';
    -	$ADODB_SESSION_CONNECT='localhost';
    -	$ADODB_SESSION_USER ='root';
    -	$ADODB_SESSION_PWD ='abc';
    -	$ADODB_SESSION_DB ='phplens';
    -	
    -	include('path/to/adodb/session/adodb-session.php');
    -	
    -	session_start();
    -	# Every 10 page loads, reset cookie for safety.
    -	# This is extremely simplistic example, better 
    -	# to regenerate only when the user logs in or changes
    -	# user privilege levels.
    -	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
    -
    -

    This function calls session_regenerate_id() internally or simulates it if the function does not exist. -

    Vacuum/Optimize Database

    -

    During session garbage collection, if postgresql is detected, - ADOdb can be set to run VACUUM. If mysql is detected, then optimize database - could be called.You can turn this on or off using:

    -
    $turnOn = true; # or false
    -ADODB_Session::optimize($turnOn);
    -
    -

    The default for optimization is it is disabled.

    -

    More Info

    -

    Also see the core ADOdb documentation. -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/old-changelog.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/old-changelog.htm deleted file mode 100755 index bf8a1af2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/old-changelog.htm +++ /dev/null @@ -1,822 +0,0 @@ -Old Changelog: ADOdb -

    Old Changelog

    - -

    3.92 22 Sept 2003 -

    Added GetAssoc and CacheGetAssoc to connection object. -

    Removed TextMax and CharMax functions from adodb.inc.php. -

    HasFailedTrans() returned false when trans failed. Fixed. -

    Moved perf driver classes into adodb/perf/*.php. -

    Misc improvements to performance monitoring, including UI(). -

    RETVAL in mssql Parameter(), we do not append @ now. -

    Added Param($name) to connection class, returns '?' or ":$name", for defining - bind parameters portably. -

    LogSQL traps affected_rows() and saves its value properly now. Also fixed oci8 - _stmt and _affectedrows() bugs. -

    Session code timestamp check for oci8 works now. Formerly default NLS_DATE_FORMAT - stripped off time portion. Thx to Tony Blair (tonanbarbarian#hotmail.com). Also - added new $conn->datetime field to oci8, controls whether MetaType() returns - 'D' ($this->datetime==false) or 'T' ($this->datetime == true) for DATE type. -

    Fixed bugs in adodb-cryptsession.inc.php and adodb-session-clob.inc.php. -

    Fixed misc bugs in adodb_key_exists, GetInsertSQL() and GetUpdateSQL(). -

    Tuned include_once handling to reduce file-system checking overhead. -

    3.91 9 Sept 2003 -

    Only released to InterAkt -

    Added LogSQL() for sql logging and $ADODB_NEWCONNECTION to override factory - for driver instantiation. -

    Added IfNull($field,$ifNull) function, thx to johnwilk#juno.com -

    Added portable substr support. -

    Now rs2html() has new parameter, $echo. Set to false to return $html instead - of echoing it. -

    3.90 5 Sept 2003 -

    First beta of performance monitoring released. -

    MySQL supports MetaTable() masking. -

    Fixed key_exists() bug in adodb-lib.inc.php -

    Added sp_executesql Prepare() support to mssql. -

    Added bind support to db2. -

    Added swedish language file - Christian Tiberg" christian#commsoft.nu -

    Bug in drop index for mssql data dict fixed. Thx to Gert-Rainer Bitterlich. -

    Left join setting for oci8 was wrong. Thx to johnwilk#juno.com -

    3.80 27 Aug 2003 -

    Patch for PHP 4.3.3 cached recordset csv2rs() fread loop incompatibility. -

    Added matching mask for MetaTables. Only for oci8, mssql and postgres currently. -

    Rewrite of "oracle" driver connection code, merging with "oci8", by Gaetano. -

    Added better debugging for Smart Transactions. -

    Postgres DBTimeStamp() was wrongly using TO_DATE. Changed to TO_TIMESTAMP. -

    ADODB_FETCH_CASE check pushed to ADONewConnection to allow people to define - it after including adodb.inc.php. -

    Added portugese (brazilian) to languages. Thx to "Levi Fukumori". -

    Removed arg3 parameter from Execute/SelectLimit/Cache* functions. -

    Execute() now accepts 2-d array as $inputarray. Also changed docs of fnExecute() - to note change in sql query counting with 2-d arrays. -

    Added MONEY to MetaType in PostgreSQL. -

    Added more debugging output to CacheFlush(). -

    3.72 9 Aug 2003 -

    Added qmagic($str), which is a qstr($str) that auto-checks for magic quotes - and does the right thing... -

    Fixed CacheFlush() bug - Thx to martin#gmx.de -

    Walt Boring contributed MetaForeignKeys for postgres7. -

    _fetch() called _BlobDecode() wrongly in interbase. Fixed. -

    adodb_time bug fixed with dates after 2038 fixed by Jason Pell. http://phplens.com/lens/lensforum/msgs.php?id=6980 -

    3.71 4 Aug 2003 -

    The oci8 driver, MetaPrimaryKeys() did not check the owner correctly when $owner - == false. -

    Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru. -

    Spanish language file contributed by "Horacio Degiorgi" horaciod#codigophp.com. -

    Error handling in oci8 bugfix - if there was an error in Execute(), then when - calling ErrorNo() and/or ErrorMsg(), the 1st call would return the error, but - the 2nd call would return no error. -

    Error handling in odbc bugfix. ODBC would always return the last error, even - if it happened 5 queries ago. Now we reset the errormsg to '' and errorno to - 0 everytime before CacheExecute() and Execute(). -

    3.70 29 July 2003 -

    Added new SQLite driver. Tested on PHP 4.3 and PHP 5. -

    Added limited "sapdb" driver support - mainly date support. -

    The oci8 driver did not identify NUMBER with no defined precision correctly. -

    Added ADODB_FORCE_NULLS, if set, then PHP nulls are converted to SQL nulls - in GetInsertSQL/GetUpdateSQL. -

    DBDate() and DBTimeStamp() format for postgresql had problems. Fixed. -

    Added tableoptions to ChangeTableSQL(). Thx to Mike Benoit. -

    Added charset support to postgresql. Thx to Julian Tarkhanov. -

    Changed OS check for MS-Windows to prevent confusion with darWIN (MacOS) -

    Timestamp format for db2 was wrong. Changed to yyyy-mm-dd-hh.mm.ss.nnnnnn. -

    adodb-cryptsession.php includes wrong. Fixed. -

    Added MetaForeignKeys(). Supported by mssql, odbc_mssql and oci8. -

    Fixed some oci8 MetaColumns/MetaPrimaryKeys bugs. Thx to Walt Boring. -

    adodb_getcount() did not init qryRecs to 0. Missing "WHERE" clause checking - in GetUpdateSQL fixed. Thx to Sebastiaan van Stijn. -

    Added support for only 'VIEWS' and "TABLES" in MetaTables. From Walt Boring. -

    Upgraded to adodb-xmlschema.inc.php 0.0.2. -

    NConnect for mysql now returns value. Thx to Dennis Verspuij. -

    ADODB_FETCH_BOTH support added to interbase/firebird. -

    Czech language file contributed by Kamil Jakubovic jake#host.sk. -

    PostgreSQL BlobDecode did not use _connectionID properly. Thx to Juraj Chlebec. -

    Added some new initialization stuff for Informix. Thx to "Andrea Pinnisi" pinnisi#sysnet.it -

    ADODB_ASSOC_CASE constant wrong in sybase _fetch(). Fixed. -

    3.60 16 June 2003 -

    We now SET CONCAT_NULL_YIELDS_NULL OFF for odbc_mssql driver to be compat with - mssql driver. -

    The property $emptyDate missing from connection class. Also changed 1903 to - constant (TIMESTAMP_FIRST_YEAR=100). Thx to Sebastiaan van Stijn. -

    ADOdb speedup optimization - we now return all arrays by reference. -

    Now DBDate() and DBTimeStamp() now accepts the string 'null' as a parameter. - Suggested by vincent. -

    Added GetArray() to connection class. -

    Added not_null check in informix metacolumns(). -

    Connection parameters for postgresql did not work correctly when port was defined. -

    DB2 is now a tested driver, making adodb 100% compatible. Extensive changes - to odbc driver for DB2, including implementing serverinfo() and SQLDate(), switching - to SQL_CUR_USE_ODBC as the cursor mode, and lastAffectedRows and SelectLimit() - fixes. -

    The odbc driver's FetchField() field names did not obey ADODB_ASSOC_CASE. Fixed. -

    Some bugs in adodb_backtrace() fixed. -

    Added "INT IDENTITY" type to adorecordset::MetaType() to support odbc_mssql - properly. -

    MetaColumns() for oci8, mssql, odbc revised to support scale. Also minor revisions - to odbc MetaColumns() for vfp and db2 compat. -

    Added unsigned support to mysql datadict class. Thx to iamsure. -

    Infinite loop in mssql MoveNext() fixed when ADODB_FETCH_ASSOC used. Thx to - Josh R, Night_Wulfe#hotmail.com. -

    ChangeTableSQL contributed by Florian Buzin. -

    The odbc_mssql driver now sets CONCAT_NULL_YIELDS_NULL OFF for compat with - mssql driver. -

    - -

    3.50 19 May 2003

    -

    Fixed mssql compat with FreeTDS. FreeTDS does not implement mssql_fetch_assoc(). -

    Merged back connection and recordset code into adodb.inc.php. -

    ADOdb sessions using oracle clobs contributed by achim.gosse#ddd.de. See adodb-session-clob.php. -

    Added /s modifier to preg_match everywhere, which ensures that regex does not - stop at /n. Thx Pao-Hsi Huang. -

    Fixed error in metacolumns() for mssql. -

    Added time format support for SQLDate. -

    Image => B added to metatype. -

    MetaType now checks empty($this->blobSize) instead of empty($this). -

    Datadict has beta support for informix, sybase (mapped to mssql), db2 and generic - (which is a fudge). -

    BlobEncode for postgresql uses pg_escape_bytea, if available. Needed for compat - with 7.3. -

    Added $ADODB_LANG, to support multiple languages in MetaErrorMsg(). -

    Datadict can now parse table definition as declarative text. -

    For DataDict, oci8 autoincrement trigger missing semi-colon. Fixed. -

    For DataDict, when REPLACE flag enabled, drop sequence in datadict for autoincrement - field in postgres and oci8.s -

    Postgresql defaults to template1 database if no database defined in connect/pconnect. -

    We now clear _resultid in postgresql if query fails. -

    3.40 19 May 2003

    -

    Added insert_id for odbc_mssql. -

    Modified postgresql UpdateBlobFile() because it did not work in safe mode. -

    Now connection object is passed to raiseErrorFn as last parameter. Needed by - StartTrans(). -

    Added StartTrans() and CompleteTrans(). It is recommended that you do not modify - transOff, but use the above functions. -

    oci8po now obeys ADODB_ASSOC_CASE settings. -

    Added virtualized error codes, using PEAR DB equivalents. Requires you to manually - include adodb-error.inc.php yourself, with MetaError() and MetaErrorMsg($errno). -

    GetRowAssoc for mysql and pgsql were flawed. Fix by Ross Smith. -

    Added to datadict types I1, I2, I4 and I8. Changed datadict type 'T' to map - to timestamp instead of datetime for postgresql. -

    Error handling in ExecuteSQLArray(), adodb-datadict.inc.php did not work. -

    We now auto-quote postgresql connection parameters when building connection - string. -

    Added session expiry notification. -

    We now test with odbc mysql - made some changes to odbc recordset constructor. -

    MetaColumns now special cases access and other databases for odbc. -

    3.31 17 March 2003

    -

    Added row checking for _fetch in postgres. -

    Added Interval type to MetaType for postgres. -

    Remapped postgres driver to call postgres7 driver internally. -

    Adorecordset_array::getarray() did not return array when nRows >= 0. -

    Postgresql: at times, no error message returned by pg_result_error() but error - message returned in pg_last_error(). Recoded again. -

    Interbase blob's now use chunking for updateblob. -

    Move() did not set EOF correctly. Reported by Jorma T. -

    We properly support mysql timestamp fields when we are creating mysql tables - using the data-dict interface. -

    Table regex includes backticks character now. -

    3.30 3 March 2003

    -

    Added $ADODB_EXTENSION and $ADODB_COMPAT_FETCH constant. -

    Made blank1stItem configurable using syntax "value:text" in GetMenu/GetMenu2. - Thx to Gabriel Birke. -

    Previously ADOdb differed from the Microsoft standard because it did not define - what to set $this->fields when EOF was reached. Now at EOF, ADOdb sets $this->fields - to false for all databases, which is consist with Microsoft's implementation. - Postgresql and mysql have always worked this way (in 3.11 and earlier). If you - are experiencing compatibility problems (and you are not using postgresql nor - mysql) on upgrading to 3.30, try setting the global variables $ADODB_COUNTRECS - = true (which is the default) and $ADODB_FETCH_COMPAT = true (this is a new - global variable). -

    We now check both pg_result_error and pg_last_error as sometimes pg_result_error - does not display anything. Iman Mayes -

    We no longer check for magic quotes gpc in Quote(). -

    Misc fixes for table creation in adodb-datadict.inc.php. Thx to iamsure. -

    Time calculations use adodb_time library for all negative timestamps due to - problems in Red Hat 7.3 or later. Formerly, only did this for Windows. -

    In mssqlpo, we now check if $sql in _query is a string before we change || - to +. This is to support prepared stmts. -

    Move() and MoveLast() internals changed to support to support EOF and $this->fields - change. -

    Added ADODB_FETCH_BOTH support to mssql. Thx to Angel Fradejas afradejas#mediafusion.es -

    We now check if link resource exists before we run mysql_escape_string in - qstr(). -

    Before we flock in csv code, we check that it is not a http url. -

    3.20 17 Feb 2003

    -

    Added new Data Dictionary classes for creating tables and indexes. Warning - - this is very much alpha quality code. The API can still change. See adodb/tests/test-datadict.php - for more info. -

    We now ignore $ADODB_COUNTRECS for mysql, because PHP truncates incomplete - recordsets when mysql_unbuffered_query() is called a second time. -

    Now postgresql works correctly when $ADODB_COUNTRECS = false. -

    Changed _adodb_getcount to properly support SELECT DISTINCT. -

    Discovered that $ADODB_COUNTRECS=true has some problems with prepared queries - - suspect PHP bug. -

    Now GetOne and GetRow run in $ADODB_COUNTRECS=false mode for better performance. -

    Added support for mysql_real_escape_string() and pg_escape_string() in qstr(). -

    Added an intermediate variable for mysql _fetch() and MoveNext() to store fields, - to prevent overwriting field array with boolean when mysql_fetch_array() returns - false. -

    Made arrays for getinsertsql and getupdatesql case-insensitive. Suggested by - Tim Uckun" tim#diligence.com -

    3.11 11 Feb 2003

    -

    Added check for ADODB_NEVER_PERSIST constant in PConnect(). If defined, then - PConnect() will actually call non-persistent Connect(). -

    Modified interbase to properly work with Prepare(). -

    Added $this->ibase_timefmt to allow you to change the date and time format. -

    Added support for $input_array parameter in CacheFlush(). -

    Added experimental support for dbx, which was then removed when i found that - it was slower than using native calls. -

    Added MetaPrimaryKeys for mssql and ibase/firebird. -

    Added new $trim parameter to GetCol and CacheGetCol -

    Uses updated adodb-time.inc.php 0.06. -

    3.10 27 Jan 2003 -

    Added adodb_date(), adodb_getdate(), adodb_mktime() and adodb-time.inc.php. -

    For interbase, added code to handle unlimited number of bind parameters. From - Daniel Hasan daniel#hasan.cl. -

    Added BlobDecode and UpdateBlob for informix. Thx to Fernando Ortiz. -

    Added constant ADODB_WINDOWS. If defined, means that running on Windows. -

    Added constant ADODB_PHPVER which stores php version as a hex num. Removed - $ADODB_PHPVER variable. -

    Felho Bacsi reported a minor white-space regular expression problem in GetInsertSQL. -

    Modified ADO to use variant to store _affectedRows -

    Changed ibase to use base class Replace(). Modified base class Replace() to - support ibase. -

    Changed odbc to auto-detect when 0 records returned is wrong due to bad odbc - drivers. -

    Changed mssql to use datetimeconvert ini setting only when 4.30 or later (does - not work in 4.23). -

    ExecuteCursor($stmt, $cursorname, $params) now accepts a new $params array - of additional bind parameters -- William Lovaton walovaton#yahoo.com.mx. -

    Added support for sybase_unbuffered_query if ADODB_COUNTRECS == false. Thx - to chuck may. -

    Fixed FetchNextObj() bug. Thx to Jorma Tuomainen. -

    We now use SCOPE_IDENTITY() instead of @@IDENTITY for mssql - thx to marchesini#eside.it -

    Changed postgresql movenext logic to prevent illegal row number from being - passed to pg_fetch_array(). -

    Postgresql initrs bug found by "Bogdan RIPA" bripa#interakt.ro $f1 accidentally - named $f -

    3.00 6 Jan 2003 -

    Fixed adodb-pear.inc.php syntax error. -

    Improved _adodb_getcount() to use SELECT COUNT(*) FROM ($sql) for languages - that accept it. -

    Fixed _adodb_getcount() caching error. -

    Added sql to retrive table and column info for odbc_mssql. -

    2.91 3 Jan 2003 -

    Revised PHP version checking to use $ADODB_PHPVER with legal values 0x4000, - 0x4050, 0x4200, 0x4300. -

    Added support for bytea fields and oid blobs in postgres by allowing BlobDecode() - to detect and convert non-oid fields. Also added BlobEncode to postgres when - you want to encode oid blobs. -

    Added blobEncodeType property for connections to inform phpLens what encoding - method to use for blobs. -

    Added BlobDecode() and BlobEncode() to base ADOConnection class. -

    Added umask() to _gencachename() when creating directories. -

    Added charPage for ado drivers, so you can set the code page. -

    -$conn->charPage = CP_UTF8;
    -$conn->Connect($dsn);
    -
    -

    Modified _seek in mysql to check for num rows=0. -

    Added to metatypes new informix types for IDS 9.30. Thx Fernando Ortiz. -

    _maxrecordcount returned in CachePageExecute $rsreturn -

    Fixed sybase cacheselectlimit( ) problems -

    MetaColumns() max_length should use precision for types X and C for ms access. - Fixed. -

    Speedup of odbc non-SELECT sql statements. -

    Added support in MetaColumns for Wide Char types for ODBC. We halve max_length - if unicode/wide char. -

    Added 'B' to types handled by GetUpdateSQL/GetInsertSQL. -

    Fixed warning message in oci8 driver with $persist variable when using PConnect. -

    2.90 11 Dec 2002 -

    Mssql and mssqlpo and oci8po now support ADODB_ASSOC_CASE. -

    Now MetaType() can accept a field object as the first parameter. -

    New $arr = $db->ServerInfo( ) function. Returns $arr['description'] which - is the string description, and $arr['version']. -

    PostgreSQL and MSSQL speedups for insert/updates. -

    Implemented new SetFetchMode() that removes the need to use $ADODB_FETCH_MODE. - Each connection has independant fetchMode. -

    ADODB_ASSOC_CASE now defaults to 2, use native defaults. This is because we - would break backward compat for too many applications otherwise. -

    Patched encrypted sessions to use replace() -

    The qstr function supports quoting of nulls when escape character is \ -

    Rewrote bits and pieces of session code to check for time synch and improve - reliability. -

    Added property ADOConnection::hasTransactions = true/false; -

    Added CreateSequence and DropSequence functions -

    Found misplaced MoveNext() in adodb-postgres.inc.php. Fixed. -

    Sybase SelectLimit not reliable because 'set rowcount' not cached - fixed. -

    Moved ADOConnection to adodb-connection.inc.php and ADORecordSet to adodb-recordset.inc.php. - This allows us to use doxygen to generate documentation. Doxygen doesn't like - the classes in the main adodb.inc.php file for some mysterious reason. -

    2.50, 14 Nov 2002 -

    Added transOff and transCnt properties for disabling (transOff = true) and - tracking transaction status (transCnt>0). -

    Added inputarray handling into _adodb_pageexecute_all_rows - "Ross Smith" RossSmith#bnw.com. -

    Fixed postgresql inconsistencies in date handling. -

    Added support for mssql_fetch_assoc. -

    Fixed $ADODB_FETCH_MODE bug in odbc MetaTables() and MetaPrimaryKeys(). -

    Accidentally declared UnixDate() twice, making adodb incompatible with php - 4.3.0. Fixed. -

    Fixed pager problems with some databases that returned -1 for _currentRow on - MoveLast() by switching to MoveNext() in adodb-lib.inc.php. -

    Also fixed uninited $discard in adodb-lib.inc.php. -

    2.43, 25 Oct 2002

    -Added ADODB_ASSOC_CASE constant to better support ibase and odbc field names. -

    Added support for NConnect() for oracle OCINLogin. -

    Fixed NumCols() bug. -

    Changed session handler to use Replace() on write. -

    Fixed oci8 SelectLimit aggregate function bug again. -

    Rewrote pivoting code. -

    2.42, 4 Oct 2002

    -

    Fixed ibase_fetch() problem with nulls. Also interbase now does automatic blob - decoding, and is backward compatible. Suggested by Heinz Hombergs heinz#hhombergs.de. -

    Fixed postgresql MoveNext() problems when called repeatedly after EOF. Also - suggested by Heinz Hombergs. -

    PageExecute() does not rewrite queries if SELECT DISTINCT is used. Requested - by hans#velum.net -

    Added additional fixes to oci8 SelectLimit handling with aggregate functions - - thx to Christian Bugge for reporting the problem. -

    2.41, 2 Oct 2002

    -

    Fixed ADODB_COUNTRECS bug in odbc. Thx to Joshua Zoshi jzoshi#hotmail.com. -

    Increased buffers for adodb-csvlib.inc.php for extremely long sql from 8192 - to 32000. -

    Revised pivottable.inc.php code. Added better support for aggregate fields. -

    Fixed mysql text/blob types problem in MetaTypes base class - thx to horacio - degiorgi. -

    Added SQLDate($fmt,$date) function, which allows an sql date format string - to be generated - useful for group by's. -

    Fixed bug in oci8 SelectLimit when offset>100. -

    2.40 4 Sept 2002

    -

    Added new NLS_DATE_FORMAT property to oci8. Suggested by Laurent NAVARRO ln#altidev.com -

    Now use bind parameters in oci8 selectlimit for better performance. -

    Fixed interbase replaceQuote for dialect != 1. Thx to "BEGUIN Pierre-Henri - - INFOCOB" phb#infocob.com. -

    Added white-space check to QA. -

    Changed unixtimestamp to support fractional seconds (we always round down/floor - the seconds). Thanks to beezly#beezly.org.uk. -

    Now you can set the trigger_error type your own user-defined type in adodb-errorhandler.inc.php. - Suggested by Claudio Bustos clbustos#entelchile.net. -

    Added recordset filters with rsfilter.inc.php. -

    $conn->_rs2rs does not create a new recordset when it detects it is of type - array. Some trickery there as there seems to be a bug in Zend Engine -

    Added render_pagelinks to adodb-pager.inc.php. Code by "Pablo Costa" pablo#cbsp.com.br. -

    MetaType() speedup in adodb.inc.php by using hashing instead of switch. Best - performance if constant arrays are supported, as they are in PHP5. -

    adodb-session.php now updates only the expiry date if the crc32 check indicates - that the data has not been modified. -

    2.31 20 Aug 2002

    -

    Made changes to pivottable.inc.php due to daniel lucuzaeu's suggestions (we sum the pivottable column if desired). -

    Fixed ErrorNo() in postgres so it does not depend on _errorMsg property. -

    Robert Tuttle added support for oracle cursors. See ExecuteCursor(). -

    Fixed Replace() so it works with mysql when updating record where data has not changed. Reported by -Cal Evans (cal#calevans.com). -

    2.30 1 Aug 2002

    -

    Added pivottable.inc.php. Thanks to daniel.lucazeau#ajornet.com for the original - concept. -

    Added ADOConnection::outp($msg,$newline) to output error and debugging messages. Now -you can override this using the ADODB_OUTP constant and use your own output handler. -

    Changed == to === for 'null' comparison. Reported by ericquil#yahoo.com -

    Fixed mssql SelectLimit( ) bug when distinct used. -

    2.30 1 Aug 2002

    -

    New GetCol() and CacheGetCol() from ross#bnw.com that returns the first field as a 1 dim array. -

    We have an empty recordset, but RecordCount() could return -1. Fixed. Reported by "Jonathan Polansky" jonathan#polansky.com. -

    We now check for session variable changes using strlen($sessval).crc32($sessval). -Formerly we only used crc32(). -

    Informix SelectLimit() problem with $ADODB_COUNTRECS fixed. -

    Fixed informix SELECT FIRST x DISTINCT, and not SELECT DISTINCT FIRST x - reported by F Riosa -

    Now default adodb error handlers ignores error if @ used. -

    If you set $conn->autoRollback=true, we auto-rollback persistent connections for odbc, mysql, oci8, mssql. -Default for autoRollback is false. No need to do so for postgres. -As interbase requires a transaction id (what a flawed api), we don't do it for interbase. -

    Changed PageExecute() to use non-greedy preg_match when searching for "FROM" keyword. -

    2.20 9 July 2002

    -

    Added CacheGetOne($secs2cache,$sql), CacheGetRow($secs2cache,$sql), CacheGetAll($secs2cache,$sql). -

    Added $conn->OffsetDate($dayFraction,$date=false) to generate sql that calcs - date offsets. Useful for scheduling appointments. -

    Added connection properties: leftOuter, rightOuter that hold left and right - outer join operators. -

    Added connection property: ansiOuter to indicate whether ansi outer joins supported. -

    New driver mssqlpo, the portable mssql driver, which converts string - concat operator from || to +. -

    Fixed ms access bug - SelectLimit() did not support ties - fixed. -

    Karsten Kraus (Karsten.Kraus#web.de), contributed error-handling code to ADONewConnection. - Unfortunately due to backward compat problems, had to rollback most of the changes. -

    Added new parameter to GetAssoc() to allow returning an array of key-value pairs, -ignoring any additional columns in the recordset. Off by default. -

    Corrected mssql $conn->sysDate to return only date using convert(). -

    CacheExecute() improved debugging output. -

    Changed rs2html() so newlines are converted to BR tags. Also optimized rs2html() based -on feedback by "Jerry Workman" jerry#mtncad.com. -

    Added support for Replace() with Interbase, using DELETE and INSERT. -

    Some minor optimizations (mostly removing & references when passing arrays). -

    Changed GenID() to allows id's larger than the size of an integer. -

    Added force_session property to oci8 for better updateblob() support. -

    Fixed PageExecute() which did not work properly with sql containing GROUP BY. -

    2.12 12 June 2002

    -

    Added toexport.inc.php to export recordsets in CSV and tab-delimited format. -

    CachePageExecute() does not work - fixed - thx John Huong. -

    Interbase aliases not set properly in FetchField() - fixed. Thx Stefan Goethals. -

    Added cache property to adodb pager class. The number of secs to cache recordsets. -

    SQL rewriting bug in pageexecute() due to skipping of newlines due to missing /s modifier. Fixed. -

    Max size of cached recordset due to a bug was 256000 bytes. Fixed. -

    Speedup of 1st invocation of CacheExecute() by tuning code. -

    We compare $rewritesql with $sql in pageexecute code in case of rewrite failure. -

    2.11 7 June 2002

    -

    Fixed PageExecute() rewrite sql problem - COUNT(*) and ORDER BY don't go together with - mssql, access and postgres. Thx to Alexander Zhukov alex#unipack.ru -

    DB2 support for CHARACTER type added - thx John Huong huongch#bigfoot.com -

    For ado, $argProvider not properly checked. Fixed - kalimero#ngi.it -

    Added $conn->Replace() function for update with automatic insert if the record does not exist. - Supported by all databases except interbase. -

    2.10 4 June 2002

    -

    Added uniqueSort property to indicate mssql ORDER BY cols must be unique. -

    Optimized session handler by crc32 the data. We only write if session data has changed. -

    adodb_sess_read in adodb-session.php now returns ''correctly - thanks to Jorma Tuomainen, webmaster#wizactive.com -

    Mssql driver did not throw EXECUTE errors correctly because ErrorMsg() and ErrorNo() called in wrong order. -Pointed out by Alexios Fakos. Fixed. -

    Changed ado to use client cursors. This fixes BeginTran() problems with ado. -

    Added handling of timestamp type in ado. -

    Added to ado_mssql support for insert_id() and affected_rows(). -

    Added support for mssql.datetimeconvert=0, available since php 4.2.0. -

    Made UnixDate() less strict, so that the time is ignored if present. -

    Changed quote() so that it checks for magic_quotes_gpc. -

    Changed maxblobsize for odbc to default to 64000. -

    2.00 13 May 2002

    -

    Added drivers informix72 for pre-7.3 versions, and oci805 for - oracle 8.0.5, and postgres64 for postgresql 6.4 and earlier. The postgres and postgres7 drivers - are now identical. -

    Interbase now partially supports ADODB_FETCH_BOTH, by defaulting to ASSOC mode. -

    Proper support for blobs in mssql. Also revised blob support code -is base class. Now UpdateBlobFile() calls UpdateBlob() for consistency. -

    Added support for changed odbc_fetch_into api in php 4.2.0 -with $conn->_has_stupid_odbc_fetch_api_change. -

    Fixed spelling of tablock locking hint in GenID( ) for mssql. -

    Added RowLock( ) to several databases, including oci8, informix, sybase, etc. - Fixed where error in mssql RowLock(). -

    Added sysDate and sysTimeStamp properties to most database drivers. These are the sql -functions/constants for that database that return the current date and current timestamp, and -are useful for portable inserts and updates. -

    Support for RecordCount() caused date handling in sybase and mssql to break. -Fixed, thanks to Toni Tunkkari, by creating derived classes for ADORecordSet_array for -both databases. Generalized using arrayClass property. Also to support RecordCount(), -changed metatype handling for ado drivers. Now the type returned in FetchField - is no longer a number, but the 1-char data type returned by MetaType. - At the same time, fixed a lot of date handling. Now mssql support dmy and mdy date formats. -Also speedups in sybase and mssql with preg_match and ^ in date/timestamp handling. -Added support in sybase and mssql for 24 hour clock in timestamps (no AM/PM). -

    Extensive revisions to informix driver - thanks to Samuel CARRIERE samuel_carriere#hotmail.com -

    Added $ok parameter to CommitTrans($ok) for easy rollbacks. -

    Fixed odbc MetaColumns and MetaTables to save and restore $ADODB_FETCH_MODE. -

    Some odbc drivers did not call the base connection class constructor. Fixed. -

    Fixed regex for GetUpdateSQL() and GetInsertSQL() to support more legal character combinations. - -

    1.99 21 April 2002

    -

    Added emulated RecordCount() to all database drivers if $ADODB_COUNTRECS = true - (which it is by default). Inspired by Cristiano Duarte (cunha17#uol.com.br). -

    Unified stored procedure support for mssql and oci8. Parameter() and PrepareSP() - functions implemented. -

    Added support for SELECT FIRST in informix, modified hasTop property to support - this. -

    Changed csv driver to handle updates/deletes/inserts properly (when Execute() returns true). -Bind params also work now, and raiseErrorFn with csv driver. Added csv driver to QA process. -

    Better error checking in oci8 UpdateBlob() and UpdateBlobFile(). -

    Added TIME type to MySQL - patch by Manfred h9125297#zechine.wu-wien.ac.at -

    Prepare/Execute implemented for Interbase/Firebird -

    Changed some regular expressions to be anchored by /^ $/ for speed. -

    Added UnixTimeStamp() and UnixDate() to ADOConnection(). Now these functions - are in both ADOConnection and ADORecordSet classes. -

    Empty recordsets were not cached - fixed. -

    Thanks to Gaetano Giunta (g.giunta#libero.it) for the oci8 code review. We - didn't agree on everything, but i hoped we agreed to disagree! -

    1.90 6 April 2002

    -

    Now all database drivers support fetch modes ADODB_FETCH_NUM and ADODB_FETCH_ASSOC, though - still not fully tested. Eg. Frontbase, Sybase, Informix. -

    NextRecordSet() support for mssql. Contributed by "Sven Axelsson" sven.axelsson#bokochwebb.se -

    Added blob support for SQL Anywhere. Contributed by Wade Johnson wade#wadejohnson.de -

    Fixed some security loopholes in server.php. Server.php also supports fetch mode. -

    Generalized GenID() to support odbc and mssql drivers. Mssql no longer generates GUID's. -

    Experimental RowLock($table,$where) for mssql. -

    Properly implemented Prepare() in oci8 and ODBC. -

    Added Bind() support to oci8 to support Prepare(). -

    Improved error handler. Catches CacheExecute() and GenID() errors now. -

    Now if you are running php from the command line, debugging messages do not output html formating. -Not 100% complete, but getting there. -

    1.81 22 March 2002

    -

    Restored default $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT for backward compatibility. -

    SelectLimit for oci8 improved - Our FIRST_ROWS optimization now does not overwrite existing hint. -

    New Sybase SQL Anywhere driver. Contributed by Wade Johnson wade#wadejohnson.de -

    1.80 15 March 2002

    -

    Redesigned directory structure of ADOdb files. Added new driver directory where -all database drivers reside. -

    Changed caching algorithm to create subdirectories. Now we scale better. -

    Informix driver now supports insert_id(). Contribution by "Andrea Pinnisi" pinnisi#sysnet.it -

    Added experimental ISO date and FetchField support for informix. -

    Fixed a quoting bug in Execute() with bind parameters, causing problems with blobs. -

    Mssql driver speedup by 10-15%. -

    Now in CacheExecute($secs2cache,$sql,...), $secs2cache is optional. If missing, it will -take the value defined in $connection->cacheSecs (default is 3600 seconds). Note that -CacheSelectLimit(), the secs2cache is still compulsory - sigh. -

    Sybase SQL Anywhere driver (using ODBC) contributed by Wade Johnson wade#wadejohnson.de -

    1.72 8 March 2002

    -

    Added @ when returning Fields() to prevent spurious error - "Michael William Miller" mille562#pilot.msu.edu -

    MetaDatabases() for postgres contributed by Phil pamelant#nerim.net -

    Mitchell T. Young (mitch#youngfamily.org) contributed informix driver. -

    Fixed rs2html() problem. I cannot reproduce, so probably a problem with pre PHP 4.1.0 versions, - when supporting new ADODB_FETCH_MODEs. -

    Mattia Rossi (mattia#technologist.com) contributed BlobDecode() and UpdateBlobFile() for postgresql - using the postgres specific pg_lo_import()/pg_lo_open() - i don't use them but hopefully others will - find this useful. See this posting - for an example of usage. -

    Added UpdateBlobFile() for uploading files to a database. -

    Made UpdateBlob() compatible with oci8po driver. -

    Added noNullStrings support to oci8 driver. Oracle changes all ' ' strings to nulls, - so you need to set strings to ' ' to prevent the nullifying of strings. $conn->noNullStrings = true; - will do this for you automatically. This is useful when you define a char column as NOT NULL. -

    Fixed UnixTimeStamp() bug - wasn't setting minutes and seconds properly. Patch from Agusti Fita i Borrell agusti#anglatecnic.com. -

    Toni Tunkkari added patch for sybase dates. Problem with spaces in day part of date fixed. -

    1.71 18 Jan 2002

    -

    Sequence start id support. Now $conn->Gen_ID('seqname', 50) to start sequence from 50. -

    CSV driver fix for selectlimit, from Andreas - akaiser#vocote.de. -

    Gam3r spotted that a global variable was undefined in the session handler. -

    Mssql date regex had error. Fixed - reported by Minh Hoang vb_user#yahoo.com. -

    DBTimeStamp() and DBDate() now accept iso dates and unix timestamps. This means -that the PostgreSQL handling of dates in GetInsertSQL() and GetUpdateSQL() can -be removed. Also if these functions are passed '' or null or false, we return a SQL null. -

    GetInsertSQL() and GetUpdateSQL() now accept a new parameter, $magicq to -indicate whether quotes should be inserted based on magic quote settings - suggested by -dj#4ict.com. -

    Reformated docs slightly based on suggestions by Chris Small. -

    1.65 28 Dec 2001

    -

    Fixed borland_ibase class naming bug. -

    Now instead of using $rs->fields[0] internally, we use reset($rs->fields) so - that we are compatible with ADODB_FETCH_ASSOC mode. Reported by Nico S. -

    Changed recordset constructor and _initrs() for oci8 so that it returns the field definitions even - if no rows in the recordset. Reported by Rick Hickerson (rhickers#mv.mv.com). -

    Improved support for postgresql in GetInsertSQL and GetUpdateSQL by - "mike" mike#partner2partner.com and "Ryan Bailey" rebel#windriders.com -

    1.64 20 Dec 2001

    -

    Danny Milosavljevic <danny.milo#gmx.net> added some patches for MySQL error handling -and displaying default values. -

    Fixed some ADODB_FETCH_BOTH inconsistencies in odbc and interbase. -

    Added more tests to test suite to cover ADODB_FETCH_* and ADODB_ERROR_HANDLER. -

    Added firebird (ibase) driver -

    Added borland_ibase driver for interbase 6.5 -

    1.63 13 Dec 2001

    -Absolute to the adodb-lib.inc.php file not set properly. Fixed.

    - -

    1.62 11 Dec 2001

    -

    Major speedup of ADOdb for low-end web sites by reducing the php code loading and compiling -cycle. We conditionally compile not so common functions. -Moved csv code to adodb-csvlib.inc.php to reduce adodb.inc.php parsing. This file -is loaded only when the csv/proxy driver is used, or CacheExecute() is run. -Also moved PageExecute(), GetSelectSQL() and GetUpdateSQL() core code to adodb-lib.inc.php. -This reduced the 70K main adodb.inc.php file to 55K, and since at least 20K of the file -is comments, we have reduced 50K of code in adodb.inc.php to 35K. There - should be 35% reduction in memory and thus 35% speedup in compiling the php code for the -main adodb.inc.php file. -

    Highly tuned SelectLimit() for oci8 for massive speed improvements on large files. -Selecting 20 rows starting from the 20,000th row of a table is now 7 times faster. -Thx to Tomas V V Cox. -

    Allow . and # in table definitions in GetInsertSQL and GetUpdateSQL. - See ADODB_TABLE_REGEX constant. Thx to Ari Kuorikoski. -

    Added ADODB_PREFETCH_ROWS constant, defaulting to 10. This determines the number -of records to prefetch in a SELECT statement. Only used by oci8.

    -

    Added high portability Oracle class called oci8po. This uses ? for bind variables, and -lower cases column names.

    -

    Now all database drivers support $ADODB_FETCH_MODE, including interbase, ado, and odbc: -ADODB_FETCH_NUM and ADODB_FETCH_ASSOC. ADODB_FETCH_BOTH is not fully implemented for all -database drivers. -

    1.61 Nov 2001

    -

    Added PO_RecordCount() and PO_Insert_ID(). PO stands for portable. Pablo Roca - [pabloroca#mvps.org]

    -

    GenID now returns 0 if not available. Safer is that you should check $conn->hasGenID - for availability.

    -

    M'soft ADO we now correctly close recordset in _close() peterd#telephonetics.co.uk

    -

    MSSQL now supports GenID(). It generates a 16-byte GUID from mssql newid() - function.

    -

    Changed ereg_replace to preg_replace in SelectLimit. This is a fix for mssql. - Ereg doesn't support t or n! Reported by marino Carlos xaplo#postnuke-espanol.org

    -

    Added $recordset->connection. This is the ADOConnection object for the recordset. -Works with cached and normal recordsets. Surprisingly, this had no affect on performance!

    -

    1.54 15 Nov 2001

    -Fixed some more bugs in PageExecute(). I am getting sick of bug in this and will have to -reconsider my QA here. The main issue is that I don't use PageExecute() and -to check whether it is working requires a visual inspection of the html generated currently. -It is possible to write a test script but it would be quite complicated :( -

    More speedups of SelectLimit() for DB2, Oci8, access, vfp, mssql. -

    - -

    1.53 7 Nov 2001

    -Added support for ADODB_FETCH_ASSOC for ado and odbc drivers.

    -Tuned GetRowAssoc(false) in postgresql and mysql.

    -Stephen Van Dyke contributed ADOdb icon, accepted with some minor mods.

    -Enabled Affected_Rows() for postgresql

    -Speedup for Concat() using implode() - Benjamin Curtis ben_curtis#yahoo.com

    -Fixed some more bugs in PageExecute() to prevent infinite loops

    -

    1.52 5 Nov 2001

    -Spelling error in CacheExecute() caused it to fail. $ql should be $sql in line 625!

    -Added fixes for parsing [ and ] in GetUpdateSQL(). -

    1.51 5 Nov 2001

    -

    Oci8 SelectLimit() speedup by using OCIFetch(). -

    Oci8 was mistakenly reporting errors when $db->debug = true. -

    If a connection failed with ODBC, it was not correctly reported - fixed. -

    _connectionID was inited to -1, changed to false. -

    Added $rs->FetchRow(), to simplify API, ala PEAR DB -

    Added PEAR DB compat mode, which is still faster than PEAR! See adodb-pear.inc.php. -

    Removed postgres pconnect debugging statement. -

    1.50 31 Oct 2001

    -

    ADOdbConnection renamed to ADOConnection, and ADOdbFieldObject to ADOFieldObject. -

    PageExecute() now checks for empty $rs correctly, and the errors in the docs on this subject have been fixed. -

    odbc_error() does not return 6 digit error correctly at times. Implemented workaround. -

    Added ADORecordSet_empty class. This will speedup INSERTS/DELETES/UPDATES because the return -object created is much smaller. -

    Added Prepare() to odbc, and oci8 (but doesn't work properly for oci8 still). -

    Made pgsql a synonym for postgre7, and changed SELECT LIMIT to use OFFSET for compat with -postgres 7.2. -

    Revised adodb-cryptsession.php thanks to Ari. -

    Set resources to false on _close, to force freeing of resources. -

    Added adodb-errorhandler.inc.php, adodb-errorpear.inc.php and raiseErrorFn on Freek's urging. -

    GetRowAssoc($toUpper=true): $toUpper added as default. -

    Errors when connecting to a database were not captured formerly. Now we do it correctly. -

    1.40 19 September 2001

    -

    PageExecute() to implement page scrolling added. Code and idea by Iván Oliva.

    -

    Some minor postgresql fixes.

    -

    Added sequence support using GenID() for postgresql, oci8, mysql, interbase.

    -

    Added UpdateBlob support for interbase (untested).

    -

    Added encrypted sessions (see adodb-cryptsession.php). By Ari Kuorikoski <kuoriari#finebyte.com>

    -

    1.31 21 August 2001

    -

    Many bug fixes thanks to "GaM3R (Cameron)" <gamr#outworld.cx>. Some session changes due to Gam3r. -

    Fixed qstr() to quote also. -

    rs2html() now pretty printed. -

    Jonathan Younger jyounger#unilab.com contributed the great idea GetUpdateSQL() and GetInsertSQL() which -generates SQL to update and insert into a table from a recordset. Modify the recordset fields -array, then can this function to generate the SQL (the SQL is not executed). -

    "Nicola Fankhauser" <nicola.fankhauser#couniq.com> found some bugs in date handling for mssql.

    -

    Added minimal Oracle support for LOBs. Still under development.

    -Added $ADODB_FETCH_MODE so you can control whether recordsets return arrays which are -numeric, associative or both. This is a global variable you set. Currently only MySQL, Oci8, Postgres -drivers support this. -

    PostgreSQL properly closes recordsets now. Reported by several people. -

    -Added UpdateBlob() for Oracle. A hack to make it easier to save blobs. -

    -Oracle timestamps did not display properly. Fixed. -

    1.20 6 June 2001

    -

    Now Oracle can connect using tnsnames.ora or server and service name

    -

    Extensive Oci8 speed optimizations. -Oci8 code revised to support variable binding, and /*+ FIRST_ROWS */ hint.

    -

    Worked around some 4.0.6 bugs in odbc_fetch_into().

    -

    Paolo S. Asioli paolo.asioli#libero.it suggested GetRowAssoc().

    -

    Escape quotes for oracle wrongly set to '. Now '' is used.

    -

    Variable binding now works in ODBC also.

    -

    Jumped to version 1.20 because I don't like 13 :-)

    -

    1.12 6 June 2001

    -

    Changed $ADODB_DIR to ADODB_DIR constant to plug a security loophole.

    -

    Changed _close() to close persistent connections also. Prevents connection leaks.

    -

    Major revision of oracle and oci8 drivers. -Added OCI_RETURN_NULLS and OCI_RETURN_LOBS to OCIFetchInto(). BLOB, CLOB and VARCHAR2 recognition -in MetaType() improved. MetaColumns() returns columns in correct sort order.

    -

    Interbase timestamp input format was wrong. Fixed.

    -

    1.11 20 May 2001

    -

    Improved file locking for Windows.

    -

    Probabilistic flushing of cache to avoid avalanche updates when cache timeouts.

    -

    Cached recordset timestamp not saved in some scenarios. Fixed.

    -

    1.10 19 May 2001

    -

    Added caching. CacheExecute() and CacheSelectLimit(). -

    Added csv driver. See http://php.weblogs.com/ADODB_csv. -

    Fixed SelectLimit(), SELECT TOP not working under certain circumstances. -

    Added better Frontbase support of MetaTypes() by Frank M. Kromann. -

    1.01 24 April 2001

    -

    Fixed SelectLimit bug. not quoted properly. -

    SelectLimit: SELECT TOP -1 * FROM TABLE not support by Microsoft. Fixed.

    -

    GetMenu improved by glen.davies#cce.ac.nz to support multiple hilited items

    -

    FetchNextObject() did not work with only 1 record returned. Fixed bug reported by $tim#orotech.net

    -

    Fixed mysql field max_length problem. Fix suggested by Jim Nicholson (jnich#att.com)

    -

    1.00 16 April 2001

    -

    Given some brilliant suggestions on how to simplify ADOdb by akul. You no longer need to -setup $ADODB_DIR yourself, and ADOLoadCode() is automatically called by ADONewConnection(), -simplifying the startup code.

    -

    FetchNextObject() added. Suggested by Jakub Marecek. This makes FetchObject() obsolete, as -this is more flexible and powerful.

    -

    Misc fixes to SelectLimit() to support Access (top must follow distinct) and Fields() -in the array recordset. From Reinhard Balling.

    -

    0.96 27 Mar 2001

    -

    ADOConnection Close() did not return a value correctly. Thanks to akul#otamedia.com.

    -

    When the horrible magic_quotes is enabled, back-slash () is changed to double-backslash (\). -This doesn't make sense for Microsoft/Sybase databases. We fix this in qstr().

    -

    Fixed Sybase date problem in UnixDate() thanks to Toni Tunkkari. Also fixed MSSQL problem -in UnixDate() - thanks to milhouse31#hotmail.com.

    -

    MoveNext() moved to leaf classes for speed in MySQL/PostgreSQL. 10-15% speedup.

    -

    Added null handling in bindInputArray in Execute() -- Ron Baldwin suggestion.

    -

    Fixed some option tags. Thanks to john#jrmstudios.com.

    -

    0.95 13 Mar 2001

    -

    Added postgres7 database driver which supports LIMIT and other version 7 stuff in the future.

    -

    Added SelectLimit to ADOConnection to simulate PostgreSQL's "select * from table limit 10 offset 3". -Added helper function GetArrayLimit() to ADORecordSet.

    -

    Fixed mysql metacolumns bug. Thanks to Freek Dijkstra (phpeverywhere#macfreek.com).

    -

    Also many PostgreSQL changes by Freek. He almost rewrote the whole PostgreSQL driver!

    -

    Added fix to input parameters in Execute for non-strings by Ron Baldwin.

    -

    Added new metatype, X for TeXt. Formerly, metatype B for Blob also included -text fields. Now 'B' is for binary/image data. 'X' for textual data.

    -

    Fixed $this->GetArray() in GetRows().

    -

    Oracle and OCI8: 1st parameter is always blank -- now warns if it is filled.

    -

    Now hasLimit and hasTop added to indicate whether -SELECT * FROM TABLE LIMIT 10 or SELECT TOP 10 * FROM TABLE are supported.

    -

    0.94 04 Feb 2001

    -

    Added ADORecordSet::GetRows() for compatibility with Microsoft ADO. Synonym for GetArray().

    -

    Added new metatype 'R' to represent autoincrement numbers.

    -

    Added ADORecordSet.FetchObject() to return a row as an object.

    -

    Finally got a Linux box to test PostgreSql. Many fixes.

    -

    Fixed copyright misspellings in 0.93.

    -

    Fixed mssql MetaColumns type bug.

    -

    Worked around odbc bug in PHP4 for sessions.

    -

    Fixed many documentation bugs (affected_rows, metadatabases, qstr).

    -

    Fixed MySQL timestamp format (removed comma).

    -

    Interbase driver did not call ibase_pconnect(). Fixed.

    -

    0.93 18 Jan 2002

    -

    Fixed GetMenu bug.

    -

    Simplified Interbase commit and rollback.

    -

    Default behaviour on closing a connection is now to rollback all active transactions.

    -

    Added field object handling for array recordset for future XML compatibility.

    -

    Added arr2html() to convert array to html table.

    -

    0.92 2 Jan 2002

    -

    Interbase Commit and Rollback should be working again.

    -

    Changed initialisation of ADORecordSet. This is internal and should not affect users. We -are doing this to support cached recordsets in the future.

    - -

    Implemented ADORecordSet_array class. This allows you to simulate a database recordset -with an array.

    -

    Added UnixDate() and UnixTimeStamp() to ADORecordSet.

    -

    0.91 21 Dec 2000

    -

    Fixed ODBC so ErrorMsg() is working.

    -

    Worked around ADO unrecognised null (0x1) value problem in COM.

    -

    Added Sybase support for FetchField() type

    -

    Removed debugging code and unneeded html from various files

    -

    Changed to javadoc style comments to adodb.inc.php.

    -

    Added maxsql as synonym for mysqlt

    -

    Now ODBC downloads first 8K of blob by default -

    0.90 15 Nov 2000

    -

    Lots of testing of Microsoft ADO. Should be more stable now.

    -

    Added $ADODB_COUNTREC. Set to false for high speed selects.

    -

    Added Sybase support. Contributed by Toni Tunkkari (toni.tunkkari#finebyte.com). Bug in Sybase - API: GetFields is unable to determine date types.

    -

    Changed behaviour of RecordSet.GetMenu() to support size parameter (listbox) properly.

    -

    Added emptyDate and emptyTimeStamp to RecordSet class that defines how to represent - empty dates.

    -

    Added MetaColumns($table) that returns an array of ADOFieldObject's listing - the columns of a table.

    -

    Added transaction support for PostgresSQL -- thanks to "Eric G. Werk" egw#netguide.dk.

    -

    Added adodb-session.php for session support.

    -

    0.80 30 Nov 2000

    -

    Added support for charSet for interbase. Implemented MetaTables for most databases. - PostgreSQL more extensively tested.

    -

    0.71 22 Nov 2000

    -

    Switched from using require_once to include/include_once for backward compatability with PHP 4.02 and earlier.

    -

    0.70 15 Nov 2000

    -

    Calls by reference have been removed (call_time_pass_reference=Off) to ensure compatibility with future versions of PHP, -except in Oracle 7 driver due to a bug in php_oracle.dll.

    -

    PostgreSQL database driver contributed by Alberto Cerezal (acerezalp#dbnet.es). -

    -

    Oci8 driver for Oracle 8 contributed by George Fourlanos (fou#infomap.gr).

    -

    Added mysqlt database driver to support MySQL 3.23 which has transaction - support.

    -

    Oracle default date format (DD-MON-YY) did not match ADOdb default date format (which is YYYY-MM-DD). Use ALTER SESSION to force the default date.

    -

    Error message checking is now included in test suite.

    -

    MoveNext() did not check EOF properly -- fixed.

    -

    0.60 Nov 8 2000

    -

    Fixed some constructor bugs in ODBC and ADO. Added ErrorNo function to ADOConnection - class.

    -

    0.51 Oct 18 2000

    -

    Fixed some interbase bugs.

    -

    0.50 Oct 16 2000

    -

    Interbase commit/rollback changed to be compatible with PHP 4.03.

    -

    CommitTrans( ) will now return true if transactions not supported.

    -

    Conversely RollbackTrans( ) will return false if transactions not supported. -

    -

    0.46 Oct 12

    -Many Oracle compatibility issues fixed. -

    0.40 Sept 26

    -

    Many bug fixes

    -

    Now Code for BeginTrans, CommitTrans and RollbackTrans is working. So is the Affected_Rows -and Insert_ID. Added above functions to test.php.

    -

    ADO type handling was busted in 0.30. Fixed.

    -

    Generalised Move( ) so it works will all databases, including ODBC.

    -

    0.30 Sept 18

    -

    Renamed ADOLoadDB to ADOLoadCode. This is clearer.

    -

    Added BeginTrans, CommitTrans and RollbackTrans functions.

    -

    Added Affected_Rows() and Insert_ID(), _affectedrows() and _insertID(), ListTables(), - ListDatabases(), ListColumns().

    -

    Need to add New_ID() and hasInsertID and hasAffectedRows, autoCommit

    -

    0.20 Sept 12

    -

    Added support for Microsoft's ADO.

    -

    Added new field to ADORecordSet -- canSeek

    -

    Added new parameter to _fetch($ignore_fields = false). Setting to true will - not update fields array for faster performance.

    -

    Added new field to ADORecordSet/ADOConnection -- dataProvider to indicate whether - a class is derived from odbc or ado.

    -

    Changed class ODBCFieldObject to ADOFieldObject -- not documented currently.

    -

    Added benchmark.php and testdatabases.inc.php to the test suite.

    -

    Added to ADORecordSet FastForward( ) for future high speed scrolling. Not documented.

    -

    Realised that ADO's Move( ) uses relative positioning. ADOdb uses absolute. -

    -

    0.10 Sept 9 2000

    -

    First release

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/readme.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/readme.htm deleted file mode 100755 index 4780cb78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/readme.htm +++ /dev/null @@ -1,68 +0,0 @@ - - -ADODB Manual - - - - - -

    ADOdb Library for PHP

    -

    ADOdb is a suite of database libraries that allow you to connect to multiple - databases in a portable manner. Download from http://adodb.sourceforge.net/. -

    • The ADOdb documentation has moved to docs-adodb.htm - This allows you to query, update and insert records using a portable API. -

    • The ADOdb data dictionary docs are at docs-datadict.htm. - This allows you to create database tables and indexes in a portable manner. -

    • The ADOdb database performance monitoring docs are at docs-perf.htm. - This allows you to perform health checks, tune and monitor your database. -

    • The ADOdb database-backed session docs are at docs-session.htm. -
    -

    -

    Installation

    -Make sure you are running PHP4.0.4 or later. Unpack all the files into a directory accessible by your webserver. -

    -To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly. You can debug using: -

    -<?php
    -include('adodb/adodb.inc.php');
    -
    -$db = ADONewConnection($driver); # eg. 'mysql' or 'oci8' 
    -$db->debug = true;
    -$db->Connect($server, $user, $password, $database);
    -$rs = $db->Execute('select * from some_small_table');
    -print "<pre>";
    -print_r($rs->GetRows());
    -print "</pre>";
    -?>
    -
    -

    How are people using ADOdb

    -Here are some examples of how people are using ADOdb: -
      -
    • PhpLens is a commercial data grid component that allows - both cool Web designers and serious unshaved programmers to develop and - maintain databases on the Web easily. Developed by the author of ADOdb. -
    • -
    • PHAkt: PHP Extension for DreamWeaver Ultradev allows - you to script PHP in the popular Web page editor. Database handling provided - by ADOdb.
    • -
    • Analysis Console for Intrusion Databases (ACID): PHP-based - analysis engine to search and process a database of security incidents - generated by security-related software such as IDSes and firewalls (e.g. - Snort, ipchains). By Roman Danyliw.
    • -
    • PostNuke is a very popular free content management system - and weblog system. It offers full CSS support, HTML 4.01 transitional - compliance throughout, an advanced blocks system, and is fully multi-lingual - enabled.
    • -
    • EasyPublish CMS is another free content management system - for managing information and integrated modules on your internet, intranet- - and extranet-sites. From Norway.
    • -
    • NOLA is a full featured accounting, inventory, and job - tracking application. It is licensed under the GPL, and developed by Noguska. -
    • -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tips_portable_sql.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tips_portable_sql.htm deleted file mode 100755 index 40121e79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tips_portable_sql.htm +++ /dev/null @@ -1,367 +0,0 @@ - - - - - Tips on Writing Portable SQL for Multiple Databases for PHP - - - -

    Tips on Writing Portable SQL  

    -
    -

    Updated 6 Oct 2006. Added OffsetDate example. -

    Updated 18 Sep 2003. Added Portable Native SQL section. -

    - - If you are writing an application that is used in multiple environments and - operating systems, you need to plan to support multiple databases. This article - is based on my experiences with multiple database systems, stretching from 4th - Dimension in my Mac days, to the databases I currently use, which are: Oracle, - FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies - to using SQL with Perl, Python and other programming languages, I will focus on PHP and how - the ADOdb database abstraction library - offers some solutions.

    -

    Most database vendors practice product lock-in. The best or fastest way to - do things is often implemented using proprietary extensions to SQL. This makes - it extremely hard to write portable SQL code that performs well under all conditions. - When the first ANSI committee got together in 1984 to standardize SQL, the database - vendors had such different implementations that they could only agree on the - core functionality of SQL. Many important application specific requirements - were not standardized, and after so many years since the ANSI effort began, - it looks as if much useful database functionality will never be standardized. - Even though ANSI-92 SQL has codified much more, we still have to implement portability - at the application level.

    -

    Selects

    -

    The SELECT statement has been standardized to a great degree. Nearly every - database supports the following:

    -

    SELECT [cols] FROM [tables]
    -   [WHERE conditions]
    -   [GROUP BY cols]
    -   [HAVING conditions]
    -   [ORDER BY cols]

    -

    But so many useful techniques can only be implemented by using proprietary - extensions. For example, when writing SQL to retrieve the first 10 rows for - paging, you could write...

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    DatabaseSQL Syntax
    DB2select * from table fetch first 10 rows only
    Informixselect first 10 * from table
    Microsoft SQL Server and Accessselect top 10 * from table
    MySQL and PostgreSQLselect * from table limit 10
    Oracle 8iselect * from (select * from table) where rownum <= 10
    -

    This feature of getting a subset of data is so useful that in the PHP class - library ADOdb, we have a SelectLimit( ) function that allows you to hide the - implementation details within a function that will rewrite your SQL for you:

    -
    $connection->SelectLimit('select * from table', 10);
    -
    -

    Selects: Fetch Modes

    -

    PHP allows you to retrieve database records as arrays. You can choose to have - the arrays indexed by field name or number. However different low-level PHP - database drivers are inconsistent in their indexing efforts. ADOdb allows you - to determine your prefered mode. You set this by setting the variable $ADODB_FETCH_MODE - to either of the constants ADODB_FETCH_NUM (for numeric indexes) or ADODB_FETCH_ASSOC - (using field names as an associative index).

    -

    The default behaviour of ADOdb varies depending on the database you are using. - For consistency, set the fetch mode to either ADODB_FETCH_NUM (for speed) or - ADODB_FETCH_ASSOC (for convenience) at the beginning of your code.

    -

    Selects: Counting Records

    -

    Another problem with SELECTs is that some databases do not return the number - of rows retrieved from a select statement. This is because the highest performance - databases will return records to you even before the last record has been found. -

    -

    In ADOdb, RecordCount( ) returns the number of rows returned, or will emulate - it by buffering the rows and returning the count after all rows have been returned. - This can be disabled for performance reasons when retrieving large recordsets - by setting the global variable $ADODB_COUNTRECS = false. This variable is checked - every time a query is executed, so you can selectively choose which recordsets - to count.

    -

    If you prefer to set $ADODB_COUNTRECS = false, ADOdb still has the PO_RecordCount( - ) function. This will return the number of rows, or if it is not found, it will - return an estimate using SELECT COUNT(*):

    -
    $rs = $db->Execute("select * from table where state=$state");
    -$numrows = $rs->PO_RecordCount('table', "state=$state");
    -

    Selects: Locking

    -

    SELECT statements are commonly used to implement row-level locking of tables. - Other databases such as Oracle, Interbase, PostgreSQL and MySQL with InnoDB - do not require row-level locking because they use versioning to display data - consistent with a specific point in time.

    -

    Currently, I recommend encapsulating the row-level locking in a separate function, - such as RowLock($table, $where):

    -
    $connection->BeginTrans( );
    -$connection->RowLock($table, $where); 
    -
    # some operation
    -
    if ($ok) $connection->CommitTrans( );
    -else $connection->RollbackTrans( );
    -
    -

    Selects: Outer Joins

    -

    Not all databases support outer joins. Furthermore the syntax for outer joins - differs dramatically between database vendors. One portable (and possibly slower) - method of implementing outer joins is using UNION.

    -

    For example, an ANSI-92 left outer join between two tables t1 and t2 could - look like:

    -
    SELECT t1.col1, t1.col2, t2.cola 
    FROM t1 LEFT JOIN t2 ON t1.col = t2.col
    -

    This can be emulated using:

    -
    SELECT t1.col1, t1.col2, t2.cola FROM t1, t2 
    WHERE t1.col = t2.col - UNION ALL -SELECT col1, col2, null FROM t1
    WHERE t1.col not in (select distinct col from t2) -
    -

    Since ADOdb 2.13, we provide some hints in the connection object as to legal - join variations. This is still incomplete and sometimes depends on the database - version you are using, but is useful as a general guideline:

    -

    $conn->leftOuter: holds the - operator used for left outer joins (eg. '*='), or false if not known or not - available.
    - $conn->rightOuter: holds the - operator used for right outer joins (eg '=*'), or false if not known or not - available.
    - $conn->ansiOuter: boolean - that if true means that ANSI-92 style outer joins are supported, or false if - not known.

    -

    Inserts

    -

    When you create records, you need to generate unique id's for each record. - There are two common techniques: (1) auto-incrementing columns and (2) sequences. -

    -

    Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access - and SQL Server. However most other databases do not support this feature. So - for portability, you have little choice but to use sequences. Sequences are - special functions that return a unique incrementing number every time you call - it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function. - It has takes a parameter, the sequence name. Different tables can have different - sequences.

    -
    $id = $connection->GenID('sequence_name');
    $connection->Execute("insert into table (id, firstname, lastname)
    values ($id, $firstname, $lastname)");
    -

    For databases that do not support sequences natively, ADOdb emulates sequences - by creating a table for every sequence.

    -

    Binding

    -

    Binding variables in an SQL statement is another tricky feature. Binding is - useful because it allows pre-compilation of SQL. When inserting multiple records - into a database in a loop, binding can offer a 50% (or greater) speedup. However - many databases such as Access and MySQL do not support binding natively and - there is some overhead in emulating binding. Furthermore, different databases - (specificly Oracle!) implement binding differently. My recommendation is to - use binding if your database queries are too slow, but make sure you are using - a database that supports it like Oracle.

    -

    ADOdb supports portable Prepare/Execute with:

    -
    $stmt = $db->Prepare('select * from customers where custid=? and state=?');
    -$rs = $db->Execute($stmt, array($id,'New York'));
    -

    Oracle uses named bind placeholders, not "?", so to support portable binding, we have Param() that generates -the correct placeholder (available since ADOdb 3.92): -

    $sql = 'insert into table (col1,col2) values ('.$DB->Param('a').','.$DB->Param('b').')';
    -# generates 'insert into table (col1,col2) values (?,?)'
    -# or        'insert into table (col1,col2) values (:a,:b)'
    -$stmt = $DB->Prepare($sql);
    -$stmt = $DB->Execute($stmt,array('one','two'));
    -
    - -

    Portable Native SQL

    -

    ADOdb provides the following functions for portably generating SQL functions - as strings to be merged into your SQL statements (some are only available since - ADOdb 3.92):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FunctionDescription
    DBDate($date)Pass in a UNIX timestamp or ISO date and it will convert it to a date - string formatted for INSERT/UPDATE
    DBTimeStamp($date)Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp - string formatted for INSERT/UPDATE
    SQLDate($date, $fmt)Portably generate a date formatted using $fmt mask, for use in SELECT - statements.
    OffsetDate($date, $ndays)Portably generate a $date offset by $ndays.
    Concat($s1, $s2, ...)Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, - which allows || operator.
    IfNull($fld, $replaceNull)Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.
    Param($name)Generates bind placeholders, using ? or named conventions as appropriate.
    $db->sysDateProperty that holds the SQL function that returns today's date
    $db->sysTimeStampProperty that holds the SQL function that returns the current -timestamp (date+time). -
    $db->concat_operatorProperty that holds the concatenation operator -
    $db->lengthProperty that holds the name of the SQL strlen function. -
    $db->upperCaseProperty that holds the name of the SQL strtoupper function. -
    $db->randomProperty that holds the SQL to generate a random number between 0.00 and 1.00. -
    $db->substrProperty that holds the name of the SQL substring function. -
    -

     

    -

    DDL and Tuning

    -There are database design tools such as ERWin or Dezign that allow you to generate data definition language commands such as ALTER TABLE or CREATE INDEX from Entity-Relationship diagrams. -

    -However if you prefer to use a PHP-based table creation scheme, adodb provides you with this feature. Here is the code to generate the SQL to create a table with: -

      -
    1. Auto-increment primary key 'ID',
    2. -
    3. The person's 'NAME' VARCHAR(32) NOT NULL and defaults to '',
    4. -
    5. The date and time of record creation 'CREATED',
    6. -
    7. The person's 'AGE', defaulting to 0, type NUMERIC(16).
    8. -
    -

    -Also create a compound index consisting of 'NAME' and 'AGE': -

    -$datadict = NewDataDictionary($connection);
    -$flds = " 
    -  ID I AUTOINCREMENT PRIMARY,
    -  NAME C(32) DEFAULT '' NOTNULL,
    -  CREATED T DEFTIMESTAMP,
    -  AGE N(16) DEFAULT 0
    -";
    -$sql1 = $datadict->CreateTableSQL('tabname', $flds);
    -$sql2 = $datadict->CreateIndexSQL('idx_name_age', 'tabname', 'NAME,AGE');
    -
    - -

    Data Types

    -

    Stick to a few data types that are available in most databases. Char, varchar - and numeric/number are supported by most databases. Most other data types (including - integer, boolean and float) cannot be relied on being available. I recommend - using char(1) or number(1) to hold booleans.

    -

    Different databases have different ways of representing dates and timestamps/datetime. - ADOdb attempts to display all dates in ISO (YYYY-MM-DD) format. ADOdb also provides - DBDate( ) and DBTimeStamp( ) to convert dates to formats that are acceptable - to that database. Both functions accept Unix integer timestamps and date strings - in ISO format.

    -
    $date1 = $connection->DBDate(time( ));
    $date2 = $connection->DBTimeStamp('2002-02-23 13:03:33');
    -

    We also provide functions to convert database dates to Unix timestamps:

    -
    $unixts = $recordset->UnixDate('#2002-02-30#'); # MS Access date => unix timestamp
    -

    For date calculations, we have OffsetDate which allows you to calculate dates such as yesterday and next week in a RDBMS independant fashion. For example, if we want to set a field to 6 hour from now, use: -

    -$sql = 'update table set dtimefld='.$db->OffsetDate($db->sysTimeStamp, 6/24).' where ...';
    -
    -

    The maximum length of a char/varchar field is also database specific. You can - only assume that field lengths of up to 250 characters are supported. This is - normally impractical for web based forum or content management systems. You - will need to be familiar with how databases handle large objects (LOBs). ADOdb - implements two functions, UpdateBlob( ) and UpdateClob( ) that allow you to - update fields holding Binary Large Objects (eg. pictures) and Character Large - Objects (eg. HTML articles):

    -
    # for oracle 
    -$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1,empty_blob())'); 
    -$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1'); 
    -   
    -# non-oracle databases
    -$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); 
    -$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
    -
    -

    Null handling is another area where differences can occur. This is a mine-field, - because 3-value logic is tricky. -

    In general, I avoid using nulls except for dates and default all my numeric - and character fields to 0 or the empty string. This maintains consistency with - PHP, where empty strings and zero are treated as equivalent, and avoids SQL - ambiguities when you use the ANY and EXISTS operators. However if your database - has significant amounts of missing or unknown data, using nulls might be a good - idea. -

    - ADOdb also supports a portable IfNull function, so you can define what to display - if the field contains a null. -

    Stored Procedures

    -

    Stored procedures are another problem area. Some databases allow recordsets - to be returned in a stored procedure (Microsoft SQL Server and Sybase), and - others only allow output parameters to be returned. Stored procedures sometimes - need to be wrapped in special syntax. For example, Oracle requires such code - to be wrapped in an anonymous block with BEGIN and END. Also internal sql operators - and functions such as +, ||, TRIM( ), SUBSTR( ) or INSTR( ) vary between vendors. -

    -

    An example of how to call a stored procedure with 2 parameters and 1 return - value follows:

    -
    	switch ($db->databaseType) {
    -	case 'mssql':
    -	  $sql = 'SP_RUNSOMETHING'; break;
    -	case 'oci8':
    -	  $sql = 
    -	  "declare RETVAL integer;begin :RETVAL := SP_RUNSOMETHING(:myid,:group);end;";
    -	  break;
    -	default:
    -	  die('Unsupported feature');
    -	}
    -	# @RETVAL = SP_RUNSOMETHING @myid,@group
    -	$stmt = $db->PrepareSP($sql);	
    $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group'); - # true indicates output parameter
    $db->Parameter($stmt,$ret,'RETVAL',true); - $db->Execute($stmt);
    -

    As you can see, the ADOdb API is the same for both databases. But the stored - procedure SQL syntax is quite different between databases and is not portable, - so be forewarned! However sometimes you have little choice as some systems only - allow data to be accessed via stored procedures. This is when the ultimate portability - solution might be the only solution: treating portable SQL as a localization - exercise...

    -

    SQL as a Localization Exercise

    -

    In general to provide real portability, you will have to treat SQL coding - as a localization exercise. In PHP, it has become common to define separate - language files for English, Russian, Korean, etc. Similarly, I would suggest - you have separate Sybase, Intebase, MySQL, etc files, and conditionally include - the SQL based on the database. For example, each MySQL SQL statement would be - stored in a separate variable, in a file called 'mysql-lang.inc.php'.

    -
    $sqlGetPassword = 'select password from users where userid=%s';
    -$sqlSearchKeyword = "SELECT * FROM articles WHERE match (title,body) against (%s)";
    -

    In our main PHP file:

    -
    # define which database to load...
    -$database = 'mysql';
    -include_once("$database-lang.inc.php");
    -
    -$db = &NewADOConnection($database);
    -$db->PConnect(...) or die('Failed to connect to database');
    -
    -# search for a keyword $word
    -$rs = $db->Execute(sprintf($sqlSearchKeyWord,$db->qstr($word)));
    -

    Note that we quote the $word variable using the qstr( ) function. This is because - each database quotes strings using different conventions.

    -

    -

    Final Thoughts

    -

    The best way to ensure that you have portable SQL is to have your data tables designed using -sound principles. Learn the theory of normalization and entity-relationship diagrams and model -your data carefully. Understand how joins and indexes work and how they are used to tune performance. -

    Visit the following page for more references on database theory and vendors: - http://php.weblogs.com/sql_tutorial. - Also read this article on Optimizing PHP. -

    -(c) 2002-2003 John Lim. - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tute.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tute.htm deleted file mode 100755 index b060a985..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/docs/tute.htm +++ /dev/null @@ -1,290 +0,0 @@ - - - - - Tutorial: Moving from MySQL to ADODB - - - -

    Tutorial: Moving from MySQL to ADODB

    - -
    		You say eether and I say eyether, 
    -		You say neether and I say nyther; 
    -		Eether, eyether, neether, nyther - 
    -		Let's call the whole thing off ! 
    -
    - You like potato and I like po-tah-to, - You like tomato and I like to-mah-to; - Potato, po-tah-to, tomato, to-mah-to - - Let's call the whole thing off ! -
    -

    I love this song, especially the version with Louis Armstrong and Ella singing - duet. It is all about how hard it is for two people in love to be compatible - with each other. It's about compromise and finding a common ground, and that's - what this article is all about. -

    PHP is all about creating dynamic web-sites with the least fuss and the most - fun. To create these websites we need to use databases to retrieve login information, - to splash dynamic news onto the web page and store forum postings. So let's - say we were using the popular MySQL database for this. Your company has done - such a fantastic job that the Web site is more popular than your wildest dreams. - You find that MySQL cannot scale to handle the workload; time to switch databases. -

    Unfortunately in PHP every database is accessed slightly differently. To connect - to MySQL, you would use mysql_connect(); when you decide to upgrade to - Oracle or Microsoft SQL Server, you would use ocilogon() or mssql_connect() - respectively. What is worse is that the parameters you use for the different - connect functions are different also.. One database says po-tato, the other - database says pota-to. Oh-oh. -

    Let's NOT call the whole thing off

    -

    A database wrapper library such as ADODB comes in handy when you need to ensure portability. It provides - you with a common API to communicate with any supported database so you don't have to call things off.

    - -

    ADODB stands for Active Data Objects DataBase (sorry computer guys are sometimes - not very original). ADODB currently supports MySQL, PostgreSQL, Oracle, Interbase, - Microsoft SQL Server, Access, FoxPro, Sybase, ODBC and ADO. You can download - ADODB from http://php.weblogs.com/adodb. -

    MySQL Example

    -

    The most common database used with PHP is MySQL, so I guess you should be familiar - with the following code. It connects to a MySQL server at localhost, - database mydb, and executes an SQL select statement. The results are - printed, one line per row. -

    $db = mysql_connect("localhost", "root", "password");
    -mysql_select_db("mydb",$db);
    -$result = mysql_query("SELECT * FROM employees",$db);
    -if ($result === false) die("failed"); 
    -while ($fields = mysql_fetch_row($result)) {
    - for ($i=0, $max=sizeof($fields); $i < $max; $i++) {
    -		print $fields[$i].' ';
    - }
    - print "<br>\n";
    -} 
    -
    -

    The above code has been color-coded by section. The first section is the connection - phase. The second is the execution of the SQL, and the last section is displaying - the fields. The while loop scans the rows of the result, while the for - loop scans the fields in one row.

    -

    Here is the equivalent code in ADODB

    -
     include("adodb.inc.php");
    - $db = NewADOConnection('mysql');
    - $db->Connect("localhost", "root", "password", "mydb");
    - $result = $db->Execute("SELECT * FROM employees");
    - if ($result === false) die("failed");  
    - while (!$result->EOF) {
    -	for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
    -		   print $result->fields[$i].' ';
    -	$result->MoveNext();
    -	print "<br>\n";
    - } 
    -

    -

    Now porting to Oracle is as simple as changing the second line to NewADOConnection('oracle'). - Let's walk through the code...

    -

    Connecting to the Database

    -

    -
    include("adodb.inc.php");
    -$db = NewADOConnection('mysql');
    -$db->Connect("localhost", "root", "password", "mydb");
    -

    The connection code is a bit more sophisticated than MySQL's because our needs - are more sophisticated. In ADODB, we use an object-oriented approach to managing - the complexity of handling multiple databases. We have different classes to - handle different databases. If you aren't familiar with object-oriented programing, - don't worry -- the complexity is all hidden away in the NewADOConnection() - function.

    -

    To conserve memory, we only load the PHP code specific to the database you - are connecting to. We do this by calling NewADOConnection(databasedriver). - Legal database drivers include mysql, mssql, oracle, oci8, postgres, sybase, - vfp, access, ibase and many others.

    -

    Then we create a new instance of the connection class by calling NewADOConnection(). - Finally we connect to the database using $db->Connect().

    -

    Executing the SQL

    -

    $result = $db->Execute("SELECT * - FROM employees");
    - if ($result === false) die("failed")
    ; -
    -

    -

    Sending the SQL statement to the server is straight forward. Execute() will - return a recordset object on successful execution. You should check $result - as we do above. -

    An issue that confuses beginners is the fact that we have two types of objects - in ADODB, the connection object and the recordset object. When do we use each? -

    The connection object ($db) is responsible for connecting to the database, - formatting your SQL and querying the database server. The recordset object ($result) - is responsible for retrieving the results and formatting the reply as text or - as an array. -

    The only thing I need to add is that ADODB provides several helper functions - for making INSERT and UPDATE statements easier, which we will cover in the Advanced - section. -

    Retrieving the Data
    -

    -
    while (!$result->EOF) {
    -   for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
    -	   print $result->fields[$i].' ';
    -   $result->MoveNext();
    -   print "<br>\n";
    -}
    -

    The paradigm for getting the data is that it's like reading a file. For every - line, we check first whether we have reached the end-of-file (EOF). While not - end-of-file, loop through each field in the row. Then move to the next line - (MoveNext) and repeat. -

    The $result->fields[] array is generated by the PHP database - extension. Some database extensions do not index the array by field name. - To force indexing by name - that is associative arrays - - use the $ADODB_FETCH_MODE global variable. -

    -	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
    -	$rs1 = $db->Execute('select * from table');
    -	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
    -	$rs2 = $db->Execute('select * from table');
    -	print_r($rs1->fields); // shows array([0]=>'v0',[1] =>'v1')
    -	print_r($rs2->fields); // shows array(['col1']=>'v0',['col2'] =>'v1')
    -
    -

    -As you can see in the above example, both recordsets store and use different fetch modes -based on the $ADODB_FETCH_MODE setting when the recordset was created by Execute().

    -

    ADOConnection

    -

    Object that performs the connection to the database, executes SQL statements - and has a set of utility functions for standardising the format of SQL statements - for issues such as concatenation and date formats.

    - -

    Other Useful Functions

    -

    $recordset->Move($pos) scrolls to that particular row. ADODB supports forward - scrolling for all databases. Some databases will not support backwards scrolling. - This is normally not a problem as you can always cache records to simulate backwards - scrolling. -

    $recordset->RecordCount() returns the number of records accessed by the - SQL statement. Some databases will return -1 because it is not supported. -

    $recordset->GetArray() returns the result as an array. -

    rs2html($recordset) is a function that is generates a HTML table based on the - $recordset passed to it. An example with the relevant lines in bold: -

       include('adodb.inc.php'); 
    -   include('tohtml.inc.php'); /* includes the rs2html function */
    -   $conn = &ADONewConnection('mysql'); 
    -   $conn->PConnect('localhost','userid','password','database');
    -   $rs = $conn->Execute('select * from table');
    -   rs2html($rs); /* recordset to html table */ 
    -

    There are many other helper functions that are listed in the documentation available at http://php.weblogs.com/adodb_manual. -

    Advanced Material

    -

    Inserts and Updates

    -

    Let's say you want to insert the following data into a database. -

    ID = 3
    - TheDate=mktime(0,0,0,8,31,2001) /* 31st August 2001 */
    - Note= sugar why don't we call it off -

    When you move to another database, your insert might no longer work.

    -

    The first problem is that each database has a different default date format. - MySQL expects YYYY-MM-DD format, while other databases have different defaults. - ADODB has a function called DBDate() that addresses this issue by converting - converting the date to the correct format.

    -

    The next problem is that the don't in the Note needs to be quoted. In - MySQL, we use don\'t but in some other databases (Sybase, Access, Microsoft - SQL Server) we use don''t. The qstr() function addresses this issue.

    -

    So how do we use the functions? Like this:

    -
    $sql = "INSERT INTO table (id, thedate,note) values (" 
    -   . $ID . ','
    -   . $db->DBDate($TheDate) .','
    -   . $db->qstr($Note).")";
    -$db->Execute($sql);
    -

    ADODB also supports $connection->Affected_Rows() (returns the - number of rows affected by last update or delete) and $recordset->Insert_ID() - (returns last autoincrement number generated by an insert statement). Be forewarned - that not all databases support the two functions.
    -

    -

    MetaTypes

    -

    You can find out more information about each of the fields (I use the words - fields and columns interchangebly) you are selecting by calling the recordset - method FetchField($fieldoffset). This will return an object with - 3 properties: name, type and max_length. -

    For example:
    -
    $recordset = $conn->Execute("select adate from table");
    $f0 = $recordset->FetchField(0); -
    -

    Then $f0->name will hold 'adata', $f0->type - will be set to 'date'. If the max_length is unknown, it will be set to - -1. -

    One problem with handling different databases is that each database often calls - the same type by a different name. For example a timestamp type is called - datetime in one database and time in another. So ADODB has a special - MetaType($type, $max_length) function that standardises the types - to the following: -

    C: character and varchar types
    - X: text or long character (eg. more than 255 bytes wide).
    - B: blob or binary image
    - D: date
    - T: timestamp
    - L: logical (boolean)
    - I: integer
    - N: numeric (float, double, money) -

    In the above date example, -

    $recordset = $conn->Execute("select adate from table");
    - $f0 = $recordset->FetchField(0);
    - $type = $recordset->MetaType($f0->type, $f0->max_length);
    - print $type; /* should print 'D'
    */ -

    -

    Select Limit and Top Support -

    ADODB has a function called $connection->SelectLimit($sql,$nrows,$offset) that allows -you to retrieve a subset of the recordset. This will take advantage of native -SELECT TOP on Microsoft products and SELECT ... LIMIT with PostgreSQL and MySQL, and -emulated if the database does not support it. -

    Caching Support -

    ADODB allows you to cache recordsets in your file system, and only requery the database -server after a certain timeout period with $connection->CacheExecute($secs2cache,$sql) and -$connection->CacheSelectLimit($secs2cache,$sql,$nrows,$offset). -

    PHP4 Session Handler Support -

    ADODB also supports PHP4 session handlers. You can store your session variables - in a database for true scalability using ADODB. For further information, visit - http://php.weblogs.com/adodb-sessions -

    Commercial Use Encouraged

    -

    If you plan to write commercial PHP applications that you want to resell, you should consider ADODB. It has been released using the lesser GPL, which means you can legally include it in commercial applications, while keeping your code proprietary. Commercial use of ADODB is strongly encouraged! We are using it internally for this reason.

    - -

    Conclusion

    -

    As a thank you for finishing this article, here are the complete lyrics for - let's call the whole thing off.
    -
    -

    -   Refrain 
    -
    - You say eether and I say eyether, - You say neether and I say nyther; - Eether, eyether, neether, nyther - - Let's call the whole thing off ! -
    - You like potato and I like po-tah-to, - You like tomato and I like to-mah-to; - Potato, po-tah-to, tomato, to-mah-to - - Let's call the whole thing off ! -
    -But oh, if we call the whole thing off, then we must part. -And oh, if we ever part, then that might break my heart. -
    - So, if you like pajamas and I like pa-jah-mas, - I'll wear pajamas and give up pa-jah-mas. - For we know we - Need each other, so we - Better call the calling off off. - Let's call the whole thing off ! -
    - Second Refrain -
    - You say laughter and I say lawfter, - You say after and I say awfter; - Laughter, lawfter, after, awfter - - Let's call the whole thing off ! -
    - You like vanilla and I like vanella, - You, sa's'parilla and I sa's'parella; - Vanilla, vanella, choc'late, strawb'ry - - Let's call the whole thing off ! -
    -But oh, if we call the whole thing off, then we must part. -And oh, if we ever part, then that might break my heart. -
    - So, if you go for oysters and I go for ersters, - I'll order oysters and cancel the ersters. - For we know we - Need each other, so we - Better call the calling off off. - Let's call the whole thing off ! -
    -

    Song and lyrics by George and Ira Gershwin, introduced by Fred Astaire and Ginger Rogers -in the film "Shall We Dance?"

    -

    -(c)2001-2002 John Lim. - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/all-wcprops deleted file mode 100755 index 463681ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/all-wcprops +++ /dev/null @@ -1,293 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/375/trunk/rdfapi-php/api/util/adodb/drivers -END -adodb-mssql_n.inc.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mssql_n.inc.php -END -adodb-pdo_oci.inc.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-pdo_oci.inc.php -END -adodb-odbtp_unicode.inc.php -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbtp_unicode.inc.php -END -adodb-ldap.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ldap.inc.php -END -adodb-postgres64.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-postgres64.inc.php -END -adodb-ado_mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ado_mssql.inc.php -END -adodb-ibase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ibase.inc.php -END -adodb-borland_ibase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-borland_ibase.inc.php -END -adodb-firebird.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-firebird.inc.php -END -adodb-sybase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sybase.inc.php -END -adodb-pdo_pgsql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-pdo_pgsql.inc.php -END -adodb-sapdb.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sapdb.inc.php -END -adodb-csv.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-csv.inc.php -END -adodb-postgres7.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-postgres7.inc.php -END -adodb-postgres8.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-postgres8.inc.php -END -adodb-mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mssql.inc.php -END -adodb-sqlitepo.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sqlitepo.inc.php -END -adodb-pdo_mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-pdo_mssql.inc.php -END -adodb-access.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-access.inc.php -END -adodb-oci8po.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-oci8po.inc.php -END -adodb-ado.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ado.inc.php -END -adodb-mysql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mysql.inc.php -END -adodb-postgres.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-postgres.inc.php -END -adodb-pdo_mysql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-pdo_mysql.inc.php -END -adodb-fbsql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-fbsql.inc.php -END -adodb-db2.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-db2.inc.php -END -adodb-oci805.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-oci805.inc.php -END -adodb-sybase_ase.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sybase_ase.inc.php -END -adodb-mysqli.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/375/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mysqli.inc.php -END -adodb-netezza.inc.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-netezza.inc.php -END -adodb-proxy.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-proxy.inc.php -END -adodb-pdo.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-pdo.inc.php -END -adodb-ado_access.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ado_access.inc.php -END -adodb-odbc_mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbc_mssql.inc.php -END -adodb-ado5.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-ado5.inc.php -END -adodb-mysqlt.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mysqlt.inc.php -END -adodb-informix.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-informix.inc.php -END -adodb-vfp.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-vfp.inc.php -END -adodb-odbc_oracle.inc.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbc_oracle.inc.php -END -adodb-odbc_db2.inc.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbc_db2.inc.php -END -adodb-mssqlpo.inc.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-mssqlpo.inc.php -END -adodb-sqlite.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sqlite.inc.php -END -adodb-oci8.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-oci8.inc.php -END -adodb-sqlanywhere.inc.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-sqlanywhere.inc.php -END -adodb-informix72.inc.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-informix72.inc.php -END -adodb-oracle.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-oracle.inc.php -END -adodb-odbc.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbc.inc.php -END -adodb-odbtp.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/drivers/adodb-odbtp.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/entries deleted file mode 100755 index 3296d939..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/entries +++ /dev/null @@ -1,652 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/drivers -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-29T16:02:59.000000Z -375 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -adodb-mssql_n.inc.php -file - - - - -2008-02-29T14:57:56.066345Z -788c8bd6a96e7e1907db038dc9694f7e -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-pdo_oci.inc.php -file - - - - -2008-02-29T14:57:56.081966Z -3be05b438ceb42687a3975a6a0e9cd35 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-odbtp_unicode.inc.php -file - - - - -2008-02-29T14:57:56.097586Z -e8a3265c0e62bc7c08e75c61d293a25c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ldap.inc.php -file - - - - -2008-02-29T14:57:56.097586Z -1db9ccdfb54726361376677a7634769f -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-postgres64.inc.php -file - - - - -2008-02-29T14:57:56.113207Z -002a1f1dc2713aef8e74714a9f5a8cdb -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ado_mssql.inc.php -file - - - - -2008-02-29T14:57:56.113207Z -f6e6d8eba8b709e57c717b4ce1eefbc5 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ibase.inc.php -file - - - - -2008-02-29T14:57:56.128828Z -c268ac59571030ea9190aa5444cef9b0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-borland_ibase.inc.php -file - - - - -2008-02-29T14:57:56.144448Z -b433b5aa6bee7b6fd609ec47b679f6b0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-firebird.inc.php -file - - - - -2008-02-29T14:57:56.144448Z -91e138ba3becbcfddbeb4acf769dde04 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-sybase.inc.php -file - - - - -2008-02-29T14:57:56.160069Z -31551b1fc6e7128a7fe118127285f220 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pdo_pgsql.inc.php -file - - - - -2008-02-29T14:57:56.160069Z -706b812d66e85245e3d7f0ac4722a413 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-sapdb.inc.php -file - - - - -2008-02-29T14:57:56.175689Z -6dcc541791c124b64f0cfa620379a4dd -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-csv.inc.php -file - - - - -2008-02-29T14:57:56.175689Z -e7ce7dac3135cb1b4beaa966b2162aa9 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-postgres7.inc.php -file - - - - -2008-02-29T14:57:56.191310Z -bc47a0bf838499b8338f81d1aeaba762 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-postgres8.inc.php -file - - - - -2008-02-29T14:57:56.206931Z -23eb1a03e907e48b2d4debfbd15ad016 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-mssql.inc.php -file - - - - -2008-02-29T14:57:56.206931Z -49be44b765c03ce046a4a4f796bfeb9c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-sqlitepo.inc.php -file - - - - -2008-02-29T14:57:56.222551Z -503b46b2db6d886d605d03da21a47230 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pdo_mssql.inc.php -file - - - - -2008-02-29T14:57:56.238172Z -d874ae3e4108104380486f913019de5b -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-access.inc.php -file - - - - -2008-02-29T14:57:56.238172Z -350537366b8bd7983dcea60cadaefbe0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-oci8po.inc.php -file - - - - -2008-02-29T14:57:56.222551Z -58cc0701c2182f6bc61eb9454aafbdd5 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ado.inc.php -file - - - - -2008-02-29T14:57:56.253792Z -7c395a7bc1b31413cd484e2369280dba -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-mysql.inc.php -file - - - - -2008-02-29T14:57:56.253792Z -7c419997ea37d29811e5c94886c04f34 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-postgres.inc.php -file - - - - -2008-02-29T14:57:56.269413Z -d73a913c0ca2227177e1efb18ef25f19 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pdo_mysql.inc.php -file - - - - -2008-02-29T14:57:56.300654Z -4b3582a0f629ef6767b73e5fdb4268ef -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-fbsql.inc.php -file - - - - -2008-02-29T14:57:56.285034Z -6df279272bdf260791ccb9ddfaae626b -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-db2.inc.php -file - - - - -2008-02-29T14:57:56.285034Z -99925f5c1a0a1097b2e0341659f812ac -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-oci805.inc.php -file - - - - -2008-02-29T14:57:56.269413Z -5d72355354856b8c78ad0fefc9ecd325 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-sybase_ase.inc.php -file - - - - -2008-02-29T14:57:56.316275Z -0a30585e1a549a722dd469b9372bd26b -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-mysqli.inc.php -file - - - - -2008-02-29T14:57:56.316275Z -91be8aca42997e2f021322f1492118dc -2007-03-29T16:02:59.000000Z -375 -cweiske -has-props - -adodb-netezza.inc.php -file - - - - -2008-02-29T14:57:56.331895Z -11ca7f6b6fb65d97734fbb205805a4ca -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-proxy.inc.php -file - - - - -2008-02-29T14:57:56.331895Z -cf9857124cc01e7449b933077046c54e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pdo.inc.php -file - - - - -2008-02-29T14:57:56.347516Z -2dbc0ca94b794c3d55c1baee05532d86 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ado_access.inc.php -file - - - - -2008-02-29T14:57:56.347516Z -c94e98612c0afa2012971771a077ea59 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-odbc_mssql.inc.php -file - - - - -2008-02-29T14:57:56.363137Z -bd54dd2e35267dd6a1e641bf039febe7 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ado5.inc.php -file - - - - -2008-02-29T14:57:56.378757Z -4017335ea4100b0040760351030718d5 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-mysqlt.inc.php -file - - - - -2008-02-29T14:57:56.378757Z -5d6d364a1d7bb92d005e1524f7754554 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-informix.inc.php -file - - - - -2008-02-29T14:57:56.394378Z -537724a6f5c22f5e021ec33590d86a57 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-vfp.inc.php -file - - - - -2008-02-29T14:57:56.394378Z -6cebfb07c4398b2428ee9fb2a03086ba -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-odbc_oracle.inc.php -file - - - - -2008-02-29T14:57:56.409998Z -f27953687ed563783dd9e4bfbb975d86 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-odbc_db2.inc.php -file - - - - -2008-02-29T14:57:56.409998Z -e4681f580f24baadf612ca5418feaaf8 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-mssqlpo.inc.php -file - - - - -2008-02-29T14:57:56.425619Z -d6f437a68e2629e3f75eb67c103acf65 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-sqlite.inc.php -file - - - - -2008-02-29T14:57:56.425619Z -15e78f322ac07602d9d405fed08c0219 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-oci8.inc.php -file - - - - -2008-02-29T14:57:56.441240Z -79047a0b2f9068afa51ac3b28f72200e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-sqlanywhere.inc.php -file - - - - -2008-02-29T14:57:56.456860Z -9b5cfdb6755dbdeb2aac95028a592fb8 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-informix72.inc.php -file - - - - -2008-02-29T14:57:56.456860Z -f008ea272ea3cb2db282109da0cf27b3 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-oracle.inc.php -file - - - - -2008-02-29T14:57:56.472481Z -a41c74ec5df248f308a44889ecc1dd2a -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-odbc.inc.php -file - - - - -2008-02-29T14:57:56.488101Z -0f5d04404343c7eccfbef7275019d948 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-odbtp.inc.php -file - - - - -2008-02-29T14:57:56.488101Z -20b8a00d5cb613c7820f18bde8c2ae10 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-access.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-access.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado5.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado5.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado5.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_access.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_access.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ado_mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-borland_ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-borland_ibase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-borland_ibase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-csv.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-csv.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-csv.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-db2.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-db2.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-fbsql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-fbsql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-fbsql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-firebird.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-firebird.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-firebird.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ibase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ibase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix72.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix72.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-informix72.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ldap.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ldap.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-ldap.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql_n.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql_n.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssql_n.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssqlpo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssqlpo.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mssqlpo.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqli.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqli.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqli.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqlt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqlt.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-mysqlt.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-netezza.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-netezza.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-netezza.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci805.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci805.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci805.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8po.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8po.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oci8po.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_db2.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_db2.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_oracle.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_oracle.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbc_oracle.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp_unicode.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp_unicode.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-odbtp_unicode.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oracle.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oracle.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-oracle.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mysql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_mysql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_oci.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_oci.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_oci.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_pgsql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_pgsql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-pdo_pgsql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres64.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres64.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres64.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres7.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres7.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres7.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres8.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-postgres8.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-proxy.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-proxy.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-proxy.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sapdb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sapdb.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sapdb.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlanywhere.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlanywhere.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlanywhere.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlite.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlite.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlite.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlitepo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlitepo.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sqlitepo.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase_ase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase_ase.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-sybase_ase.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-vfp.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-vfp.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/prop-base/adodb-vfp.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-access.inc.php.svn-base deleted file mode 100755 index 0b2cb2b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-access.inc.php.svn-base +++ /dev/null @@ -1,87 +0,0 @@ -ADODB_odbc(); - } - - function Time() - { - return time(); - } - - function BeginTrans() { return false;} - - function IfNull( $field, $ifNull ) - { - return " IIF(IsNull($field), $ifNull, $field) "; // if Access - } -/* - function &MetaTables() - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID); - $rs = new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - if (!$rs) return false; - - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr = &$rs->GetArray(); - //print_pre($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE') - $arr2[] = $arr[$i][2]; - } - return $arr2; - }*/ -} - - -class ADORecordSet_access extends ADORecordSet_odbc { - - var $databaseType = "access"; - - function ADORecordSet_access($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -}// class -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado.inc.php.svn-base deleted file mode 100755 index 4d730f27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado.inc.php.svn-base +++ /dev/null @@ -1,634 +0,0 @@ -_affectedRows = new VARIANT; - } - - function ServerInfo() - { - if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider; - return array('description' => $desc, 'version' => ''); - } - - function _affectedrows() - { - if (PHP_VERSION >= 5) return $this->_affectedRows; - - return $this->_affectedRows->value; - } - - // you can also pass a connection string like this: - // - // $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB'); - function _connect($argHostname, $argUsername, $argPassword, $argProvider= 'MSDASQL') - { - $u = 'UID'; - $p = 'PWD'; - - if (!empty($this->charPage)) - $dbc = new COM('ADODB.Connection',null,$this->charPage); - else - $dbc = new COM('ADODB.Connection'); - - if (! $dbc) return false; - - /* special support if provider is mssql or access */ - if ($argProvider=='mssql') { - $u = 'User Id'; //User parameter name for OLEDB - $p = 'Password'; - $argProvider = "SQLOLEDB"; // SQL Server Provider - - // not yet - //if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename"; - - //use trusted conection for SQL if username not specified - if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes"; - } else if ($argProvider=='access') - $argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider - - if ($argProvider) $dbc->Provider = $argProvider; - - if ($argUsername) $argHostname .= ";$u=$argUsername"; - if ($argPassword)$argHostname .= ";$p=$argPassword"; - - if ($this->debug) ADOConnection::outp( "Host=".$argHostname."
    \n version=$dbc->version"); - // @ added below for php 4.0.1 and earlier - @$dbc->Open((string) $argHostname); - - $this->_connectionID = $dbc; - - $dbc->CursorLocation = $this->_cursor_location; - return $dbc->State > 0; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL') - { - return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider); - } - -/* - adSchemaCatalogs = 1, - adSchemaCharacterSets = 2, - adSchemaCollations = 3, - adSchemaColumns = 4, - adSchemaCheckConstraints = 5, - adSchemaConstraintColumnUsage = 6, - adSchemaConstraintTableUsage = 7, - adSchemaKeyColumnUsage = 8, - adSchemaReferentialContraints = 9, - adSchemaTableConstraints = 10, - adSchemaColumnsDomainUsage = 11, - adSchemaIndexes = 12, - adSchemaColumnPrivileges = 13, - adSchemaTablePrivileges = 14, - adSchemaUsagePrivileges = 15, - adSchemaProcedures = 16, - adSchemaSchemata = 17, - adSchemaSQLLanguages = 18, - adSchemaStatistics = 19, - adSchemaTables = 20, - adSchemaTranslations = 21, - adSchemaProviderTypes = 22, - adSchemaViews = 23, - adSchemaViewColumnUsage = 24, - adSchemaViewTableUsage = 25, - adSchemaProcedureParameters = 26, - adSchemaForeignKeys = 27, - adSchemaPrimaryKeys = 28, - adSchemaProcedureColumns = 29, - adSchemaDBInfoKeywords = 30, - adSchemaDBInfoLiterals = 31, - adSchemaCubes = 32, - adSchemaDimensions = 33, - adSchemaHierarchies = 34, - adSchemaLevels = 35, - adSchemaMeasures = 36, - adSchemaProperties = 37, - adSchemaMembers = 38 - -*/ - - function &MetaTables() - { - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(20);//tables - if ($adors){ - $f = $adors->Fields(2);//table/view name - $t = $adors->Fields(3);//table type - while (!$adors->EOF){ - $tt=substr($t->value,0,6); - if ($tt!='SYSTEM' && $tt !='ACCESS') - $arr[]=$f->value; - //print $f->value . ' ' . $t->value.'
    '; - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - function &MetaColumns($table) - { - $table = strtoupper($table); - $arr = array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(4);//tables - - if ($adors){ - $t = $adors->Fields(2);//table/view name - while (!$adors->EOF){ - - - if (strtoupper($t->Value) == $table) { - - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - } - - $adors->MoveNext(); - } - $adors->Close(); - } - $false = false; - return empty($arr) ? $false : $arr; - } - - - - - /* returns queryID or false */ - function &_query($sql,$inputarr=false) - { - - $dbc = $this->_connectionID; - $false = false; - - // return rs - if ($inputarr) { - - if (!empty($this->charPage)) - $oCmd = new COM('ADODB.Command',null,$this->charPage); - else - $oCmd = new COM('ADODB.Command'); - $oCmd->ActiveConnection = $dbc; - $oCmd->CommandText = $sql; - $oCmd->CommandType = 1; - - foreach($inputarr as $val) { - // name, type, direction 1 = input, len, - $this->adoParameterType = 130; - $p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val); - //print $p->Type.' '.$p->value; - $oCmd->Parameters->Append($p); - } - $p = false; - $rs = $oCmd->Execute(); - $e = $dbc->Errors; - if ($dbc->Errors->Count > 0) return $false; - return $rs; - } - - $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); - - if ($dbc->Errors->Count > 0) return $false; - if (! $rs) return $false; - - if ($rs->State == 0) { - $true = true; - return $true; // 0 = adStateClosed means no records returned - } - return $rs; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - - if (isset($this->_thisTransactions)) - if (!$this->_thisTransactions) return false; - else { - $o = $this->_connectionID->Properties("Transaction DDL"); - $this->_thisTransactions = $o ? true : false; - if (!$o) return false; - } - @$this->_connectionID->BeginTrans(); - $this->transCnt += 1; - return true; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - - @$this->_connectionID->CommitTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - function RollbackTrans() { - if ($this->transOff) return true; - @$this->_connectionID->RollbackTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - - /* Returns: the last error message from previous database operation */ - - function ErrorMsg() - { - if (!$this->_connectionID) return "No connection established"; - $errc = $this->_connectionID->Errors; - if (!$errc) return "No Errors object found"; - if ($errc->Count == 0) return ''; - $err = $errc->Item($errc->Count-1); - return $err->Description; - } - - function ErrorNo() - { - $errc = $this->_connectionID->Errors; - if ($errc->Count == 0) return 0; - $err = $errc->Item($errc->Count-1); - return $err->NativeError; - } - - // returns true or false - function _close() - { - if ($this->_connectionID) $this->_connectionID->Close(); - $this->_connectionID = false; - return true; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ado extends ADORecordSet { - - var $bind = false; - var $databaseType = "ado"; - var $dataProvider = "ado"; - var $_tarr = false; // caches the types - var $_flds; // and field objects - var $canSeek = true; - var $hideErrors = true; - - function ADORecordSet_ado($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $rs = $this->_queryID; - $f = $rs->Fields($fieldOffset); - $o->name = $f->Name; - $t = $f->Type; - $o->type = $this->MetaType($t); - $o->max_length = $f->DefinedSize; - $o->ado_type = $t; - - //print "off=$off name=$o->name type=$o->type len=$o->max_length
    "; - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - $rs = $this->_queryID; - $this->_numOfRows = $rs->RecordCount; - - $f = $rs->Fields; - $this->_numOfFields = $f->Count; - } - - - // should only be used to move forward as we normally use forward-only cursors - function _seek($row) - { - $rs = $this->_queryID; - // absoluteposition doesn't work -- my maths is wrong ? - // $rs->AbsolutePosition->$row-2; - // return true; - if ($this->_currentRow > $row) return false; - @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst - return true; - } - -/* - OLEDB types - - enum DBTYPEENUM - { DBTYPE_EMPTY = 0, - DBTYPE_NULL = 1, - DBTYPE_I2 = 2, - DBTYPE_I4 = 3, - DBTYPE_R4 = 4, - DBTYPE_R8 = 5, - DBTYPE_CY = 6, - DBTYPE_DATE = 7, - DBTYPE_BSTR = 8, - DBTYPE_IDISPATCH = 9, - DBTYPE_ERROR = 10, - DBTYPE_BOOL = 11, - DBTYPE_VARIANT = 12, - DBTYPE_IUNKNOWN = 13, - DBTYPE_DECIMAL = 14, - DBTYPE_UI1 = 17, - DBTYPE_ARRAY = 0x2000, - DBTYPE_BYREF = 0x4000, - DBTYPE_I1 = 16, - DBTYPE_UI2 = 18, - DBTYPE_UI4 = 19, - DBTYPE_I8 = 20, - DBTYPE_UI8 = 21, - DBTYPE_GUID = 72, - DBTYPE_VECTOR = 0x1000, - DBTYPE_RESERVED = 0x8000, - DBTYPE_BYTES = 128, - DBTYPE_STR = 129, - DBTYPE_WSTR = 130, - DBTYPE_NUMERIC = 131, - DBTYPE_UDT = 132, - DBTYPE_DBDATE = 133, - DBTYPE_DBTIME = 134, - DBTYPE_DBTIMESTAMP = 135 - - ADO Types - - adEmpty = 0, - adTinyInt = 16, - adSmallInt = 2, - adInteger = 3, - adBigInt = 20, - adUnsignedTinyInt = 17, - adUnsignedSmallInt = 18, - adUnsignedInt = 19, - adUnsignedBigInt = 21, - adSingle = 4, - adDouble = 5, - adCurrency = 6, - adDecimal = 14, - adNumeric = 131, - adBoolean = 11, - adError = 10, - adUserDefined = 132, - adVariant = 12, - adIDispatch = 9, - adIUnknown = 13, - adGUID = 72, - adDate = 7, - adDBDate = 133, - adDBTime = 134, - adDBTimeStamp = 135, - adBSTR = 8, - adChar = 129, - adVarChar = 200, - adLongVarChar = 201, - adWChar = 130, - adVarWChar = 202, - adLongVarWChar = 203, - adBinary = 128, - adVarBinary = 204, - adLongVarBinary = 205, - adChapter = 136, - adFileTime = 64, - adDBFileTime = 137, - adPropVariant = 138, - adVarNumeric = 139 -*/ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - if (!is_numeric($t)) return $t; - - switch ($t) { - case 0: - case 12: // variant - case 8: // bstr - case 129: //char - case 130: //wc - case 200: // varc - case 202:// varWC - case 128: // bin - case 204: // varBin - case 72: // guid - if ($len <= $this->blobSize) return 'C'; - - case 201: - case 203: - return 'X'; - case 128: - case 204: - case 205: - return 'B'; - case 7: - case 133: return 'D'; - - case 134: - case 135: return 'T'; - - case 11: return 'L'; - - case 16:// adTinyInt = 16, - case 2://adSmallInt = 2, - case 3://adInteger = 3, - case 4://adBigInt = 20, - case 17://adUnsignedTinyInt = 17, - case 18://adUnsignedSmallInt = 18, - case 19://adUnsignedInt = 19, - case 20://adUnsignedBigInt = 21, - return 'I'; - default: return 'N'; - } - } - - // time stamp not supported yet - function _fetch() - { - $rs = $this->_queryID; - if (!$rs or $rs->EOF) { - $this->fields = false; - return false; - } - $this->fields = array(); - - if (!$this->_tarr) { - $tarr = array(); - $flds = array(); - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - $f = $rs->Fields($i); - $flds[] = $f; - $tarr[] = $f->Type; - } - // bind types and flds only once - $this->_tarr = $tarr; - $this->_flds = $flds; - } - $t = reset($this->_tarr); - $f = reset($this->_flds); - - if ($this->hideErrors) $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - //echo "

    ",$t,' ';var_dump($f->value); echo '

    '; - switch($t) { - case 135: // timestamp - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value); - // VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00 - $val=(float) variant_cast($f->value,VT_R8)*3600*24-2209161600; - else - $val = $f->value; - $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 133:// A date value (yyyymmdd) - if ($val = $f->value) { - $this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2); - } else - $this->fields[] = false; - break; - case 7: // adDate - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value); - else $val = $f->value; - - if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val); - else $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 1: // null - $this->fields[] = false; - break; - case 6: // currency is not supported properly; - ADOConnection::outp( ''.$f->Name.': currency type not supported by PHP'); - $this->fields[] = (float) $f->value; - break; - default: - $this->fields[] = $f->value; - break; - } - //print " $f->value $t, "; - $f = next($this->_flds); - $t = next($this->_tarr); - } // for - if ($this->hideErrors) error_reporting($olde); - @$rs->MoveNext(); // @ needed for some versions of PHP! - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - - function NextRecordSet() - { - $rs = $this->_queryID; - $this->_queryID = $rs->NextRecordSet(); - //$this->_queryID = $this->_QueryId->NextRecordSet(); - if ($this->_queryID == null) return false; - - $this->_currentRow = -1; - $this->_currentPage = -1; - $this->bind = false; - $this->fields = false; - $this->_flds = false; - $this->_tarr = false; - - $this->_inited = false; - $this->Init(); - return true; - } - - function _close() { - $this->_flds = false; - @$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk) - $this->_queryID = false; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado5.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado5.inc.php.svn-base deleted file mode 100755 index a0e2e3ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado5.inc.php.svn-base +++ /dev/null @@ -1,668 +0,0 @@ -_affectedRows = new VARIANT; - } - - function ServerInfo() - { - if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider; - return array('description' => $desc, 'version' => ''); - } - - function _affectedrows() - { - if (PHP_VERSION >= 5) return $this->_affectedRows; - - return $this->_affectedRows->value; - } - - // you can also pass a connection string like this: - // - // $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB'); - function _connect($argHostname, $argUsername, $argPassword,$argDBorProvider, $argProvider= '') - { - // two modes - // - if $argProvider is empty, we assume that $argDBorProvider holds provider -- this is for backward compat - // - if $argProvider is not empty, then $argDBorProvider holds db - - - if ($argProvider) { - $argDatabasename = $argDBorProvider; - } else { - $argDatabasename = ''; - if ($argDBorProvider) $argProvider = $argDBorProvider; - else $argProvider = 'MSDASQL'; - } - - - try { - $u = 'UID'; - $p = 'PWD'; - - if (!empty($this->charPage)) - $dbc = new COM('ADODB.Connection',null,$this->charPage); - else - $dbc = new COM('ADODB.Connection'); - - if (! $dbc) return false; - - /* special support if provider is mssql or access */ - if ($argProvider=='mssql') { - $u = 'User Id'; //User parameter name for OLEDB - $p = 'Password'; - $argProvider = "SQLOLEDB"; // SQL Server Provider - - // not yet - //if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename"; - - //use trusted conection for SQL if username not specified - if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes"; - } else if ($argProvider=='access') - $argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider - - if ($argProvider) $dbc->Provider = $argProvider; - - if ($argProvider) $argHostname = "PROVIDER=$argProvider;DRIVER={SQL Server};SERVER=$argHostname"; - - - if ($argDatabasename) $argHostname .= ";DATABASE=$argDatabasename"; - if ($argUsername) $argHostname .= ";$u=$argUsername"; - if ($argPassword)$argHostname .= ";$p=$argPassword"; - - if ($this->debug) ADOConnection::outp( "Host=".$argHostname."
    \n version=$dbc->version"); - // @ added below for php 4.0.1 and earlier - @$dbc->Open((string) $argHostname); - - $this->_connectionID = $dbc; - - $dbc->CursorLocation = $this->_cursor_location; - return $dbc->State > 0; - } catch (exception $e) { - } - - return false; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL') - { - return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider); - } - -/* - adSchemaCatalogs = 1, - adSchemaCharacterSets = 2, - adSchemaCollations = 3, - adSchemaColumns = 4, - adSchemaCheckConstraints = 5, - adSchemaConstraintColumnUsage = 6, - adSchemaConstraintTableUsage = 7, - adSchemaKeyColumnUsage = 8, - adSchemaReferentialContraints = 9, - adSchemaTableConstraints = 10, - adSchemaColumnsDomainUsage = 11, - adSchemaIndexes = 12, - adSchemaColumnPrivileges = 13, - adSchemaTablePrivileges = 14, - adSchemaUsagePrivileges = 15, - adSchemaProcedures = 16, - adSchemaSchemata = 17, - adSchemaSQLLanguages = 18, - adSchemaStatistics = 19, - adSchemaTables = 20, - adSchemaTranslations = 21, - adSchemaProviderTypes = 22, - adSchemaViews = 23, - adSchemaViewColumnUsage = 24, - adSchemaViewTableUsage = 25, - adSchemaProcedureParameters = 26, - adSchemaForeignKeys = 27, - adSchemaPrimaryKeys = 28, - adSchemaProcedureColumns = 29, - adSchemaDBInfoKeywords = 30, - adSchemaDBInfoLiterals = 31, - adSchemaCubes = 32, - adSchemaDimensions = 33, - adSchemaHierarchies = 34, - adSchemaLevels = 35, - adSchemaMeasures = 36, - adSchemaProperties = 37, - adSchemaMembers = 38 - -*/ - - function &MetaTables() - { - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(20);//tables - if ($adors){ - $f = $adors->Fields(2);//table/view name - $t = $adors->Fields(3);//table type - while (!$adors->EOF){ - $tt=substr($t->value,0,6); - if ($tt!='SYSTEM' && $tt !='ACCESS') - $arr[]=$f->value; - //print $f->value . ' ' . $t->value.'
    '; - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - function &MetaColumns($table) - { - $table = strtoupper($table); - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(4);//tables - - if ($adors){ - $t = $adors->Fields(2);//table/view name - while (!$adors->EOF){ - - - if (strtoupper($t->Value) == $table) { - - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - } - - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - /* returns queryID or false */ - function &_query($sql,$inputarr=false) - { - try { // In PHP5, all COM errors are exceptions, so to maintain old behaviour... - - $dbc = $this->_connectionID; - - // return rs - - $false = false; - - if ($inputarr) { - - if (!empty($this->charPage)) - $oCmd = new COM('ADODB.Command',null,$this->charPage); - else - $oCmd = new COM('ADODB.Command'); - $oCmd->ActiveConnection = $dbc; - $oCmd->CommandText = $sql; - $oCmd->CommandType = 1; - - foreach($inputarr as $val) { - // name, type, direction 1 = input, len, - $this->adoParameterType = 130; - $p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val); - //print $p->Type.' '.$p->value; - $oCmd->Parameters->Append($p); - } - $p = false; - $rs = $oCmd->Execute(); - $e = $dbc->Errors; - if ($dbc->Errors->Count > 0) return $false; - return $rs; - } - - $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); - - if ($dbc->Errors->Count > 0) return $false; - if (! $rs) return $false; - - if ($rs->State == 0) { - $true = true; - return $true; // 0 = adStateClosed means no records returned - } - return $rs; - - } catch (exception $e) { - - } - return $false; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - - if (isset($this->_thisTransactions)) - if (!$this->_thisTransactions) return false; - else { - $o = $this->_connectionID->Properties("Transaction DDL"); - $this->_thisTransactions = $o ? true : false; - if (!$o) return false; - } - @$this->_connectionID->BeginTrans(); - $this->transCnt += 1; - return true; - } - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - - @$this->_connectionID->CommitTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - function RollbackTrans() { - if ($this->transOff) return true; - @$this->_connectionID->RollbackTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - - /* Returns: the last error message from previous database operation */ - - function ErrorMsg() - { - if (!$this->_connectionID) return "No connection established"; - $errmsg = ''; - - try { - $errc = $this->_connectionID->Errors; - if (!$errc) return "No Errors object found"; - if ($errc->Count == 0) return ''; - $err = $errc->Item($errc->Count-1); - $errmsg = $err->Description; - }catch(exception $e) { - } - return $errmsg; - } - - function ErrorNo() - { - $errc = $this->_connectionID->Errors; - if ($errc->Count == 0) return 0; - $err = $errc->Item($errc->Count-1); - return $err->NativeError; - } - - // returns true or false - function _close() - { - if ($this->_connectionID) $this->_connectionID->Close(); - $this->_connectionID = false; - return true; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ado extends ADORecordSet { - - var $bind = false; - var $databaseType = "ado"; - var $dataProvider = "ado"; - var $_tarr = false; // caches the types - var $_flds; // and field objects - var $canSeek = true; - var $hideErrors = true; - - function ADORecordSet_ado($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $rs = $this->_queryID; - $f = $rs->Fields($fieldOffset); - $o->name = $f->Name; - $t = $f->Type; - $o->type = $this->MetaType($t); - $o->max_length = $f->DefinedSize; - $o->ado_type = $t; - - - //print "off=$off name=$o->name type=$o->type len=$o->max_length
    "; - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - $rs = $this->_queryID; - $this->_numOfRows = $rs->RecordCount; - - $f = $rs->Fields; - $this->_numOfFields = $f->Count; - } - - - // should only be used to move forward as we normally use forward-only cursors - function _seek($row) - { - $rs = $this->_queryID; - // absoluteposition doesn't work -- my maths is wrong ? - // $rs->AbsolutePosition->$row-2; - // return true; - if ($this->_currentRow > $row) return false; - @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst - return true; - } - -/* - OLEDB types - - enum DBTYPEENUM - { DBTYPE_EMPTY = 0, - DBTYPE_NULL = 1, - DBTYPE_I2 = 2, - DBTYPE_I4 = 3, - DBTYPE_R4 = 4, - DBTYPE_R8 = 5, - DBTYPE_CY = 6, - DBTYPE_DATE = 7, - DBTYPE_BSTR = 8, - DBTYPE_IDISPATCH = 9, - DBTYPE_ERROR = 10, - DBTYPE_BOOL = 11, - DBTYPE_VARIANT = 12, - DBTYPE_IUNKNOWN = 13, - DBTYPE_DECIMAL = 14, - DBTYPE_UI1 = 17, - DBTYPE_ARRAY = 0x2000, - DBTYPE_BYREF = 0x4000, - DBTYPE_I1 = 16, - DBTYPE_UI2 = 18, - DBTYPE_UI4 = 19, - DBTYPE_I8 = 20, - DBTYPE_UI8 = 21, - DBTYPE_GUID = 72, - DBTYPE_VECTOR = 0x1000, - DBTYPE_RESERVED = 0x8000, - DBTYPE_BYTES = 128, - DBTYPE_STR = 129, - DBTYPE_WSTR = 130, - DBTYPE_NUMERIC = 131, - DBTYPE_UDT = 132, - DBTYPE_DBDATE = 133, - DBTYPE_DBTIME = 134, - DBTYPE_DBTIMESTAMP = 135 - - ADO Types - - adEmpty = 0, - adTinyInt = 16, - adSmallInt = 2, - adInteger = 3, - adBigInt = 20, - adUnsignedTinyInt = 17, - adUnsignedSmallInt = 18, - adUnsignedInt = 19, - adUnsignedBigInt = 21, - adSingle = 4, - adDouble = 5, - adCurrency = 6, - adDecimal = 14, - adNumeric = 131, - adBoolean = 11, - adError = 10, - adUserDefined = 132, - adVariant = 12, - adIDispatch = 9, - adIUnknown = 13, - adGUID = 72, - adDate = 7, - adDBDate = 133, - adDBTime = 134, - adDBTimeStamp = 135, - adBSTR = 8, - adChar = 129, - adVarChar = 200, - adLongVarChar = 201, - adWChar = 130, - adVarWChar = 202, - adLongVarWChar = 203, - adBinary = 128, - adVarBinary = 204, - adLongVarBinary = 205, - adChapter = 136, - adFileTime = 64, - adDBFileTime = 137, - adPropVariant = 138, - adVarNumeric = 139 -*/ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - if (!is_numeric($t)) return $t; - - switch ($t) { - case 0: - case 12: // variant - case 8: // bstr - case 129: //char - case 130: //wc - case 200: // varc - case 202:// varWC - case 128: // bin - case 204: // varBin - case 72: // guid - if ($len <= $this->blobSize) return 'C'; - - case 201: - case 203: - return 'X'; - case 128: - case 204: - case 205: - return 'B'; - case 7: - case 133: return 'D'; - - case 134: - case 135: return 'T'; - - case 11: return 'L'; - - case 16:// adTinyInt = 16, - case 2://adSmallInt = 2, - case 3://adInteger = 3, - case 4://adBigInt = 20, - case 17://adUnsignedTinyInt = 17, - case 18://adUnsignedSmallInt = 18, - case 19://adUnsignedInt = 19, - case 20://adUnsignedBigInt = 21, - return 'I'; - default: return 'N'; - } - } - - // time stamp not supported yet - function _fetch() - { - $rs = $this->_queryID; - if (!$rs or $rs->EOF) { - $this->fields = false; - return false; - } - $this->fields = array(); - - if (!$this->_tarr) { - $tarr = array(); - $flds = array(); - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - $f = $rs->Fields($i); - $flds[] = $f; - $tarr[] = $f->Type; - } - // bind types and flds only once - $this->_tarr = $tarr; - $this->_flds = $flds; - } - $t = reset($this->_tarr); - $f = reset($this->_flds); - - if ($this->hideErrors) $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - //echo "

    ",$t,' ';var_dump($f->value); echo '

    '; - switch($t) { - case 135: // timestamp - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value); - // VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00 - $val= (float) variant_cast($f->value,VT_R8)*3600*24-2209161600; - else - $val = $f->value; - $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 133:// A date value (yyyymmdd) - if ($val = $f->value) { - $this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2); - } else - $this->fields[] = false; - break; - case 7: // adDate - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value); - else $val = $f->value; - - if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val); - else $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 1: // null - $this->fields[] = false; - break; - case 6: // currency is not supported properly; - ADOConnection::outp( ''.$f->Name.': currency type not supported by PHP'); - $this->fields[] = (float) $f->value; - break; - default: - $this->fields[] = $f->value; - break; - } - //print " $f->value $t, "; - $f = next($this->_flds); - $t = next($this->_tarr); - } // for - if ($this->hideErrors) error_reporting($olde); - @$rs->MoveNext(); // @ needed for some versions of PHP! - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - - function NextRecordSet() - { - $rs = $this->_queryID; - $this->_queryID = $rs->NextRecordSet(); - //$this->_queryID = $this->_QueryId->NextRecordSet(); - if ($this->_queryID == null) return false; - - $this->_currentRow = -1; - $this->_currentPage = -1; - $this->bind = false; - $this->fields = false; - $this->_flds = false; - $this->_tarr = false; - - $this->_inited = false; - $this->Init(); - return true; - } - - function _close() { - $this->_flds = false; - @$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk) - $this->_queryID = false; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_access.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_access.inc.php.svn-base deleted file mode 100755 index ab83e26d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_access.inc.php.svn-base +++ /dev/null @@ -1,55 +0,0 @@ -= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php"); - else include(ADODB_DIR."/drivers/adodb-ado.inc.php"); -} - -class ADODB_ado_access extends ADODB_ado { - var $databaseType = 'ado_access'; - var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE - var $fmtDate = "#Y-m-d#"; - var $fmtTimeStamp = "#Y-m-d h:i:sA#";// note no comma - var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')"; - var $sysTimeStamp = 'NOW'; - var $hasTransactions = false; - var $upperCase = 'ucase'; - - function ADODB_ado_access() - { - $this->ADODB_ado(); - } - - function BeginTrans() { return false;} - - function CommitTrans() { return false;} - - function RollbackTrans() { return false;} - -} - - -class ADORecordSet_ado_access extends ADORecordSet_ado { - - var $databaseType = "ado_access"; - - function ADORecordSet_ado_access($id,$mode=false) - { - return $this->ADORecordSet_ado($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_mssql.inc.php.svn-base deleted file mode 100755 index 576223d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ado_mssql.inc.php.svn-base +++ /dev/null @@ -1,154 +0,0 @@ -= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php"); - else include(ADODB_DIR."/drivers/adodb-ado.inc.php"); -} - - -class ADODB_ado_mssql extends ADODB_ado { - var $databaseType = 'ado_mssql'; - var $hasTop = 'top'; - var $hasInsertID = true; - var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - var $sysTimeStamp = 'GetDate()'; - var $leftOuter = '*='; - var $rightOuter = '=*'; - var $ansiOuter = true; // for mssql7 or later - var $substr = "substring"; - var $length = 'len'; - var $_dropSeqSQL = "drop table %s"; - - //var $_inTransaction = 1; // always open recordsets, so no transaction problems. - - function ADODB_ado_mssql() - { - $this->ADODB_ado(); - } - - function _insertid() - { - return $this->GetOne('select @@identity'); - } - - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - function qstr($s,$magic_quotes=false) - { - $s = ADOConnection::qstr($s, $magic_quotes); - return str_replace("\0", "\\\\000", $s); - } - - function MetaColumns($table) - { - $table = strtoupper($table); - $arr= array(); - $dbc = $this->_connectionID; - - $osoptions = array(); - $osoptions[0] = null; - $osoptions[1] = null; - $osoptions[2] = $table; - $osoptions[3] = null; - - $adors=@$dbc->OpenSchema(4, $osoptions);//tables - - if ($adors){ - while (!$adors->EOF){ - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - - $adors->MoveNext(); - } - $adors->Close(); - } - $false = false; - return empty($arr) ? $false : $arr; - } - - function CreateSequence($seq='adodbseq',$start=1) - { - - $this->Execute('BEGIN TRANSACTION adodbseq'); - $start -= 1; - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return true; - } - - function GenID($seq='adodbseq',$start=1) - { - //$this->debug=1; - $this->Execute('BEGIN TRANSACTION adodbseq'); - $ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1"); - if (!$ok) { - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $start; - } - $num = $this->GetOne("select id from $seq"); - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $num; - - // in old implementation, pre 1.90, we returned GUID... - //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'"); - } - - } // end class - - class ADORecordSet_ado_mssql extends ADORecordSet_ado { - - var $databaseType = 'ado_mssql'; - - function ADORecordSet_ado_mssql($id,$mode=false) - { - return $this->ADORecordSet_ado($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-borland_ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-borland_ibase.inc.php.svn-base deleted file mode 100755 index ab15feff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-borland_ibase.inc.php.svn-base +++ /dev/null @@ -1,92 +0,0 @@ -ADODB_ibase(); - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID); - return $this->_transactionID; - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Interbase 6.5, Dialect 1'; break; - case '2': $s = 'Interbase 6.5, Dialect 2'; break; - default: - case '3': $s = 'Interbase 6.5, Dialect 3'; break; - } - $arr['version'] = '6.5'; - $arr['description'] = $s; - return $arr; - } - - // Note that Interbase 6.5 uses ROWS instead - don't you love forking wars! - // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows - // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 - // Firebird uses - // SELECT FIRST 5 SKIP 2 col1, col2 FROM TABLE - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - if ($nrows > 0) { - if ($offset <= 0) $str = " ROWS $nrows "; - else { - $a = $offset+1; - $b = $offset+$nrows; - $str = " ROWS $a TO $b"; - } - } else { - // ok, skip - $a = $offset + 1; - $str = " ROWS $a TO 999999999"; // 999 million - } - $sql .= $str; - - return ($secs2cache) ? - $this->CacheExecute($secs2cache,$sql,$inputarr) - : - $this->Execute($sql,$inputarr); - } - -}; - - -class ADORecordSet_borland_ibase extends ADORecordSet_ibase { - - var $databaseType = "borland_ibase"; - - function ADORecordSet_borland_ibase($id,$mode=false) - { - $this->ADORecordSet_ibase($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-csv.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-csv.inc.php.svn-base deleted file mode 100755 index a977416f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-csv.inc.php.svn-base +++ /dev/null @@ -1,207 +0,0 @@ -_insertid; - } - - function _affectedrows() - { - return $this->_affectedrows; - } - - function &MetaDatabases() - { - return false; - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (strtolower(substr($argHostname,0,7)) !== 'http://') return false; - $this->_url = $argHostname; - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (strtolower(substr($argHostname,0,7)) !== 'http://') return false; - $this->_url = $argHostname; - return true; - } - - function &MetaColumns($table) - { - return false; - } - - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1) - { - global $ADODB_FETCH_MODE; - - $url = $this->_url.'?sql='.urlencode($sql)."&nrows=$nrows&fetch=". - (($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE). - "&offset=$offset"; - $err = false; - $rs = csv2rs($url,$err,false); - - if ($this->debug) print "$url
    $err
    "; - - $at = strpos($err,'::::'); - if ($at === false) { - $this->_errorMsg = $err; - $this->_errorNo = (integer)$err; - } else { - $this->_errorMsg = substr($err,$at+4,1024); - $this->_errorNo = -9999; - } - if ($this->_errorNo) - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,''); - } - - if (is_object($rs)) { - - $rs->databaseType='csv'; - $rs->fetchMode = ($this->fetchMode !== false) ? $this->fetchMode : $ADODB_FETCH_MODE; - $rs->connection = &$this; - } - return $rs; - } - - // returns queryID or false - function &_Execute($sql,$inputarr=false) - { - global $ADODB_FETCH_MODE; - - if (!$this->_bindInputArray && $inputarr) { - $sqlarr = explode('?',$sql); - $sql = ''; - $i = 0; - foreach($inputarr as $v) { - - $sql .= $sqlarr[$i]; - if (gettype($v) == 'string') - $sql .= $this->qstr($v); - else if ($v === null) - $sql .= 'NULL'; - else - $sql .= $v; - $i += 1; - - } - $sql .= $sqlarr[$i]; - if ($i+1 != sizeof($sqlarr)) - print "Input Array does not match ?: ".htmlspecialchars($sql); - $inputarr = false; - } - - $url = $this->_url.'?sql='.urlencode($sql)."&fetch=". - (($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE); - $err = false; - - - $rs = csv2rs($url,$err,false); - if ($this->debug) print urldecode($url)."
    $err
    "; - $at = strpos($err,'::::'); - if ($at === false) { - $this->_errorMsg = $err; - $this->_errorNo = (integer)$err; - } else { - $this->_errorMsg = substr($err,$at+4,1024); - $this->_errorNo = -9999; - } - - if ($this->_errorNo) - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr); - } - if (is_object($rs)) { - $rs->fetchMode = ($this->fetchMode !== false) ? $this->fetchMode : $ADODB_FETCH_MODE; - - $this->_affectedrows = $rs->affectedrows; - $this->_insertid = $rs->insertid; - $rs->databaseType='csv'; - $rs->connection = &$this; - } - return $rs; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - return $this->_errorNo; - } - - // returns true or false - function _close() - { - return true; - } -} // class - -class ADORecordset_csv extends ADORecordset { - function ADORecordset_csv($id,$mode=false) - { - $this->ADORecordset($id,$mode); - } - - function _close() - { - return true; - } -} - -} // define - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-db2.inc.php.svn-base deleted file mode 100755 index 9c1882d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-db2.inc.php.svn-base +++ /dev/null @@ -1,828 +0,0 @@ -_haserrorfunctions = ADODB_PHPVER >= 0x4050; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('db2_connect')) { - ADOConnection::outp("Warning: The old ODBC based DB2 driver has been renamed 'odbc_db2'. This ADOdb driver calls PHP's native db2 extension."); - return null; - } - // This needs to be set before the connect(). - // Replaces the odbc_binmode() call that was in Execute() - ini_set('ibm_db2.binmode', $this->binmode); - - if ($argDatabasename) { - $this->_connectionID = db2_connect($argDatabasename,$argUsername,$argPassword); - } else { - $this->_connectionID = db2_connect($argDSN,$argUsername,$argPassword); - } - if (isset($php_errormsg)) $php_errormsg = ''; - - // For db2_connect(), there is an optional 4th arg. If present, it must be - // an array of valid options. So far, we don't use them. - - $this->_errorMsg = @db2_conn_errormsg(); - - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('db2_connect')) return null; - - // This needs to be set before the connect(). - // Replaces the odbc_binmode() call that was in Execute() - ini_set('ibm_db2.binmode', $this->binmode); - - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - - if ($argDatabasename) { - $this->_connectionID = db2_pconnect($argDatabasename,$argUsername,$argPassword); - } else { - $this->_connectionID = db2_pconnect($argDSN,$argUsername,$argPassword); - } - if (isset($php_errormsg)) $php_errormsg = ''; - - $this->_errorMsg = @db2_conn_errormsg(); - if ($this->_connectionID && $this->autoRollback) @db2_rollback($this->_connectionID); - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'YYYY-MM-DD HH24:MI:SS')"; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - // use right() and replace() ? - if (!$col) $col = $this->sysDate; - - /* use TO_CHAR() if $fmt is TO_CHAR() allowed fmt */ - if ($fmt== 'Y-m-d H:i:s') - return 'TO_CHAR('.$col.", 'YYYY-MM-DD HH24:MI:SS')"; - - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= $this->concat_operator; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - if ($len==1) return "year($col)"; - $s .= "char(year($col))"; - break; - case 'M': - if ($len==1) return "monthname($col)"; - $s .= "substr(monthname($col),1,3)"; - break; - case 'm': - if ($len==1) return "month($col)"; - $s .= "right(digits(month($col)),2)"; - break; - case 'D': - case 'd': - if ($len==1) return "day($col)"; - $s .= "right(digits(day($col)),2)"; - break; - case 'H': - case 'h': - if ($len==1) return "hour($col)"; - if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)"; - else $s .= "''"; - break; - case 'i': - case 'I': - if ($len==1) return "minute($col)"; - if ($col != $this->sysDate) - $s .= "right(digits(minute($col)),2)"; - else $s .= "''"; - break; - case 'S': - case 's': - if ($len==1) return "second($col)"; - if ($col != $this->sysDate) - $s .= "right(digits(second($col)),2)"; - else $s .= "''"; - break; - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - } - } - return $s; - } - - - function ServerInfo() - { - - if (!empty($this->host) && ADODB_PHPVER >= 0x4300) { - $dsn = strtoupper($this->host); - $first = true; - $found = false; - - if (!function_exists('db2_data_source')) return false; - - while(true) { - - $rez = @db2_data_source($this->_connectionID, - $first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT); - $first = false; - if (!is_array($rez)) break; - if (strtoupper($rez['server']) == $dsn) { - $found = true; - break; - } - } - if (!$found) return ADOConnection::ServerInfo(); - if (!isset($rez['version'])) $rez['version'] = ''; - return $rez; - } else { - return ADOConnection::ServerInfo(); - } - } - - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return true; - } - - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $num = $this->GetOne("VALUES NEXTVAL FOR $seq"); - return $num; - } - - - function ErrorMsg() - { - if ($this->_haserrorfunctions) { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (empty($this->_connectionID)) return @db2_conn_errormsg(); - return @db2_conn_errormsg($this->_connectionID); - } else return ADOConnection::ErrorMsg(); - } - - function ErrorNo() - { - - if ($this->_haserrorfunctions) { - if ($this->_errorCode !== false) { - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode; - } - - if (empty($this->_connectionID)) $e = @db2_conn_error(); - else $e = @db2_conn_error($this->_connectionID); - - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - // so we check and patch - if (strlen($e)<=2) return 0; - return $e; - } else return ADOConnection::ErrorNo(); - } - - - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - return db2_autocommit($this->_connectionID,false); - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = db2_commit($this->_connectionID); - db2_autocommit($this->_connectionID,true); - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = db2_rollback($this->_connectionID); - db2_autocommit($this->_connectionID,true); - return $ret; - } - - function MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @db2_primarykeys($this->_connectionID,'',$schema,$table); - - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return false; - - $arr =& $rs->GetArray(); - $rs->Close(); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - function MetaForeignKeys($table, $owner = FALSE, $upper = FALSE, $asociative = FALSE ) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @db2_foreign_keys($this->_connectionID,'',$schema,$table); - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_db2($qid); - - $ADODB_FETCH_MODE = $savem; - /* - $rs->fields indices - 0 PKTABLE_CAT - 1 PKTABLE_SCHEM - 2 PKTABLE_NAME - 3 PKCOLUMN_NAME - 4 FKTABLE_CAT - 5 FKTABLE_SCHEM - 6 FKTABLE_NAME - 7 FKCOLUMN_NAME - */ - if (!$rs) return false; - - $foreign_keys = array(); - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - if (!is_array($foreign_keys[$rs->fields[5].'.'.$rs->fields[6]])) - $foreign_keys[$rs->fields[5].'.'.$rs->fields[6]] = array(); - $foreign_keys[$rs->fields[5].'.'.$rs->fields[6]][$rs->fields[7]] = $rs->fields[3]; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $foreign_key; - } - - - function &MetaTables($ttype=false,$schema=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = db2_tables($this->_connectionID); - - $rs = new ADORecordSet_db2($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - - $arr =& $rs->GetArray(); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - if (!$arr[$i][2]) continue; - $type = $arr[$i][3]; - $schemaval = ($schema) ? $arr[$i][1].'.' : ''; - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $schemaval.$arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2]; - } - return $arr2; - } - -/* -See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2datetime_data_type_changes.asp -/ SQL data type codes / -#define SQL_UNKNOWN_TYPE 0 -#define SQL_CHAR 1 -#define SQL_NUMERIC 2 -#define SQL_DECIMAL 3 -#define SQL_INTEGER 4 -#define SQL_SMALLINT 5 -#define SQL_FLOAT 6 -#define SQL_REAL 7 -#define SQL_DOUBLE 8 -#if (DB2VER >= 0x0300) -#define SQL_DATETIME 9 -#endif -#define SQL_VARCHAR 12 - - -/ One-parameter shortcuts for date/time data types / -#if (DB2VER >= 0x0300) -#define SQL_TYPE_DATE 91 -#define SQL_TYPE_TIME 92 -#define SQL_TYPE_TIMESTAMP 93 - -#define SQL_UNICODE (-95) -#define SQL_UNICODE_VARCHAR (-96) -#define SQL_UNICODE_LONGVARCHAR (-97) -*/ - function DB2Types($t) - { - switch ((integer)$t) { - case 1: - case 12: - case 0: - case -95: - case -96: - return 'C'; - case -97: - case -1: //text - return 'X'; - case -4: //image - return 'B'; - - case 9: - case 91: - return 'D'; - - case 10: - case 11: - case 92: - case 93: - return 'T'; - - case 4: - case 5: - case -6: - return 'I'; - - case -11: // uniqidentifier - return 'R'; - case -7: //bit - return 'L'; - - default: - return 'N'; - } - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $colname = "%"; - $qid = db2_columns($this->_connectionID, "", $schema, $table, $colname); - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $false; - $rs->_fetch(); - - $retarr = array(); - - /* - $rs->fields indices - 0 TABLE_QUALIFIER - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 DATA_TYPE - 5 TYPE_NAME - 6 PRECISION - 7 LENGTH - 8 SCALE - 9 RADIX - 10 NULLABLE - 11 REMARKS - */ - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $this->DB2Types($rs->fields[4]); - - // ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp - // access uses precision to store length for char/varchar - if ($fld->type == 'C' or $fld->type == 'X') { - if ($rs->fields[4] <= -95) // UNICODE - $fld->max_length = $rs->fields[7]/2; - else - $fld->max_length = $rs->fields[7]; - } else - $fld->max_length = $rs->fields[7]; - $fld->not_null = !empty($rs->fields[10]); - $fld->scale = $rs->fields[8]; - $fld->primary_key = false; - $retarr[strtoupper($fld->name)] = $fld; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) $retarr = false; - - $qid = db2_primary_keys($this->_connectionID, "", $schema, $table); - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $retarr; - $rs->_fetch(); - - /* - $rs->fields indices - 0 TABLE_CAT - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 KEY_SEQ - 5 PK_NAME - */ - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $retarr[strtoupper($rs->fields[3])]->primary_key = true; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); - - if (empty($retarr)) $retarr = false; - return $retarr; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = db2_prepare($this->_connectionID,$sql); - if (!$stmt) { - // we don't know whether db2 driver is parsing prepared stmts, so just return sql - return $sql; - } - return array($sql,$stmt,false); - } - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - GLOBAL $php_errormsg; - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_error = ''; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = db2_prepare($this->_connectionID,$sql); - - if ($stmtid == false) { - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - return false; - } - } - - if (! db2_execute($stmtid,$inputarr)) { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } - return false; - } - - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!db2_execute($stmtid)) { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } - return false; - } - } else - $stmtid = @db2_exec($this->_connectionID,$sql); - - $this->_lastAffectedRows = 0; - if ($stmtid) { - if (@db2_num_fields($stmtid) == 0) { - $this->_lastAffectedRows = db2_num_rows($stmtid); - $stmtid = true; - } else { - $this->_lastAffectedRows = 0; - } - - if ($this->_haserrorfunctions) { - $this->_errorMsg = ''; - $this->_errorCode = 0; - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } else { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - - } - return $stmtid; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - // returns true or false - function _close() - { - $ret = @db2_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } - - function _affectedrows() - { - return $this->_lastAffectedRows; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_db2 extends ADORecordSet { - - var $bind = false; - var $databaseType = "db2"; - var $dataProvider = "db2"; - var $useFetchArray; - - function ADORecordSet_db2($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - } - - - // returns the field object - function &FetchField($offset = -1) - { - $o= new ADOFieldObject(); - $o->name = @db2_field_name($this->_queryID,$offset); - $o->type = @db2_field_type($this->_queryID,$offset); - $o->max_length = db2_field_width($this->_queryID,$offset); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @db2_num_rows($this->_queryID) : -1; - $this->_numOfFields = @db2_num_fields($this->_queryID); - // some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0 - if ($this->_numOfRows == 0) $this->_numOfRows = -1; - } - - function _seek($row) - { - return false; - } - - // speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $rs =& $this->GetArray($nrows); - return $rs; - } - $savem = $this->fetchMode; - $this->fetchMode = ADODB_FETCH_NUM; - $this->Move($offset); - $this->fetchMode = $savem; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - function MoveNext() - { - if ($this->_numOfRows != 0 && !$this->EOF) { - $this->_currentRow++; - - $this->fields = @db2_fetch_array($this->_queryID); - if ($this->fields) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - } - $this->fields = false; - $this->EOF = true; - return false; - } - - function _fetch() - { - - $this->fields = db2_fetch_array($this->_queryID); - if ($this->fields) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - $this->fields = false; - return false; - } - - function _close() - { - return @db2_free_result($this->_queryID); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-fbsql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-fbsql.inc.php.svn-base deleted file mode 100755 index 6a19bc20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-fbsql.inc.php.svn-base +++ /dev/null @@ -1,266 +0,0 @@ -. - Set tabs to 8. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (! defined("_ADODB_FBSQL_LAYER")) { - define("_ADODB_FBSQL_LAYER", 1 ); - -class ADODB_fbsql extends ADOConnection { - var $databaseType = 'fbsql'; - var $hasInsertID = true; - var $hasAffectedRows = true; - var $metaTablesSQL = "SHOW TABLES"; - var $metaColumnsSQL = "SHOW COLUMNS FROM %s"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasLimit = false; - - function ADODB_fbsql() - { - } - - function _insertid() - { - return fbsql_insert_id($this->_connectionID); - } - - function _affectedrows() - { - return fbsql_affected_rows($this->_connectionID); - } - - function &MetaDatabases() - { - $qid = fbsql_list_dbs($this->_connectionID); - $arr = array(); - $i = 0; - $max = fbsql_num_rows($qid); - while ($i < $max) { - $arr[] = fbsql_tablename($qid,$i); - $i += 1; - } - return $arr; - } - - // returns concatenated string - function Concat() - { - $s = ""; - $arr = func_get_args(); - $first = true; - - $s = implode(',',$arr); - if (sizeof($arr) > 0) return "CONCAT($s)"; - else return ''; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->_connectionID = fbsql_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->_connectionID = fbsql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function &MetaColumns($table) - { - if ($this->metaColumnsSQL) { - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($rs === false) return false; - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - - // split type into type(length): - if (preg_match("/^(.+)\((\d+)\)$/", $fld->type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = $query_array[2]; - } else { - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($fld->type,'blob') !== false); - - $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return false; - } - - // returns true or false - function SelectDB($dbName) - { - $this->database = $dbName; - if ($this->_connectionID) { - return @fbsql_select_db($dbName,$this->_connectionID); - } - else return false; - } - - - // returns queryID or false - function _query($sql,$inputarr) - { - return fbsql_query("$sql;",$this->_connectionID); - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - $this->_errorMsg = @fbsql_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - return @fbsql_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - return @fbsql_close($this->_connectionID); - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_fbsql extends ADORecordSet{ - - var $databaseType = "fbsql"; - var $canSeek = true; - - function ADORecordSet_fbsql($queryID,$mode=false) - { - if (!$mode) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) { - case ADODB_FETCH_NUM: $this->fetchMode = FBSQL_NUM; break; - case ADODB_FETCH_ASSOC: $this->fetchMode = FBSQL_ASSOC; break; - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = FBSQL_BOTH; break; - } - return $this->ADORecordSet($queryID); - } - - function _initrs() - { - GLOBAL $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @fbsql_num_rows($this->_queryID):-1; - $this->_numOfFields = @fbsql_num_fields($this->_queryID); - } - - - - function &FetchField($fieldOffset = -1) { - if ($fieldOffset != -1) { - $o = @fbsql_fetch_field($this->_queryID, $fieldOffset); - //$o->max_length = -1; // fbsql returns the max length less spaces -- so it is unrealiable - $f = @fbsql_field_flags($this->_queryID,$fieldOffset); - $o->binary = (strpos($f,'binary')!== false); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @fbsql_fetch_field($this->_queryID);// fbsql returns the max length less spaces -- so it is unrealiable - //$o->max_length = -1; - } - - return $o; - } - - function _seek($row) - { - return @fbsql_data_seek($this->_queryID,$row); - } - - function _fetch($ignore_fields=false) - { - $this->fields = @fbsql_fetch_array($this->_queryID,$this->fetchMode); - return ($this->fields == true); - } - - function _close() { - return @fbsql_free_result($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - $len = -1; // fbsql max_length is not accurate - switch (strtoupper($t)) { - case 'CHARACTER': - case 'CHARACTER VARYING': - case 'BLOB': - case 'CLOB': - case 'BIT': - case 'BIT VARYING': - if ($len <= $this->blobSize) return 'C'; - - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'DATE': return 'D'; - - case 'TIME': - case 'TIME WITH TIME ZONE': - case 'TIMESTAMP': - case 'TIMESTAMP WITH TIME ZONE': return 'T'; - - case 'PRIMARY_KEY': - return 'R'; - case 'INTEGER': - case 'SMALLINT': - case 'BOOLEAN': - - if (!empty($fieldobj->primary_key)) return 'R'; - else return 'I'; - - default: return 'N'; - } - } - -} //class -} // defined -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-firebird.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-firebird.inc.php.svn-base deleted file mode 100755 index 9b7b59ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-firebird.inc.php.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -ADODB_ibase(); - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Firebird Dialect 1'; break; - case '2': $s = 'Firebird Dialect 2'; break; - default: - case '3': $s = 'Firebird Dialect 3'; break; - } - $arr['version'] = ADOConnection::_findvers($s); - $arr['description'] = $s; - return $arr; - } - - // Note that Interbase 6.5 uses this ROWS instead - don't you love forking wars! - // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows - // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0) - { - $nrows = (integer) $nrows; - $offset = (integer) $offset; - $str = 'SELECT '; - if ($nrows >= 0) $str .= "FIRST $nrows "; - $str .=($offset>=0) ? "SKIP $offset " : ''; - - $sql = preg_replace('/^[ \t]*select/i',$str,$sql); - if ($secs) - $rs =& $this->CacheExecute($secs,$sql,$inputarr); - else - $rs =& $this->Execute($sql,$inputarr); - - return $rs; - } - - -}; - - -class ADORecordSet_firebird extends ADORecordSet_ibase { - - var $databaseType = "firebird"; - - function ADORecordSet_firebird($id,$mode=false) - { - $this->ADORecordSet_ibase($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ibase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ibase.inc.php.svn-base deleted file mode 100755 index 335493d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ibase.inc.php.svn-base +++ /dev/null @@ -1,887 +0,0 @@ - - changed transaction handling and added experimental blob stuff - - Docs to interbase at the website - http://www.synectics.co.za/php3/tutorial/IB_PHP3_API.html - - To use gen_id(), see - http://www.volny.cz/iprenosil/interbase/ip_ib_code.htm#_code_creategen - - $rs = $conn->Execute('select gen_id(adodb,1) from rdb$database'); - $id = $rs->fields[0]; - $conn->Execute("insert into table (id, col1,...) values ($id, $val1,...)"); -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -class ADODB_ibase extends ADOConnection { - var $databaseType = "ibase"; - var $dataProvider = "ibase"; - var $replaceQuote = "''"; // string to use to replace quotes - var $ibase_datefmt = '%Y-%m-%d'; // For hours,mins,secs change to '%Y-%m-%d %H:%M:%S'; - var $fmtDate = "'Y-m-d'"; - var $ibase_timestampfmt = "%Y-%m-%d %H:%M:%S"; - var $ibase_timefmt = "%H:%M:%S"; - var $fmtTimeStamp = "'Y-m-d, H:i:s'"; - var $concat_operator='||'; - var $_transactionID; - var $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"; - //OPN STUFF start - var $metaColumnsSQL = "select a.rdb\$field_name, a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc"; - //OPN STUFF end - var $ibasetrans; - var $hasGenID = true; - var $_bindInputArray = true; - var $buffers = 0; - var $dialect = 1; - var $sysDate = "cast('TODAY' as timestamp)"; - var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)"; - var $ansiOuter = true; - var $hasAffectedRows = false; - var $poorAffectedRows = true; - var $blobEncodeType = 'C'; - var $role = false; - - function ADODB_ibase() - { - if (defined('IBASE_DEFAULT')) $this->ibasetrans = IBASE_DEFAULT; - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false) - { - if (!function_exists('ibase_pconnect')) return null; - if ($argDatabasename) $argHostname .= ':'.$argDatabasename; - $fn = ($persist) ? 'ibase_pconnect':'ibase_connect'; - if ($this->role) - $this->_connectionID = $fn($argHostname,$argUsername,$argPassword, - $this->charSet,$this->buffers,$this->dialect,$this->role); - else - $this->_connectionID = $fn($argHostname,$argUsername,$argPassword, - $this->charSet,$this->buffers,$this->dialect); - - if ($this->dialect != 1) { // http://www.ibphoenix.com/ibp_60_del_id_ds.html - $this->replaceQuote = "''"; - } - if ($this->_connectionID === false) { - $this->_handleerror(); - return false; - } - - // PHP5 change. - if (function_exists('ibase_timefmt')) { - ibase_timefmt($this->ibase_datefmt,IBASE_DATE ); - if ($this->dialect == 1) ibase_timefmt($this->ibase_datefmt,IBASE_TIMESTAMP ); - else ibase_timefmt($this->ibase_timestampfmt,IBASE_TIMESTAMP ); - ibase_timefmt($this->ibase_timefmt,IBASE_TIME ); - - } else { - ini_set("ibase.timestampformat", $this->ibase_timestampfmt); - ini_set("ibase.dateformat", $this->ibase_datefmt); - ini_set("ibase.timeformat", $this->ibase_timefmt); - } - return true; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true); - } - - - function MetaPrimaryKeys($table,$owner_notused=false,$internalKey=false) - { - if ($internalKey) return array('RDB$DB_KEY'); - - $table = strtoupper($table); - - $sql = 'SELECT S.RDB$FIELD_NAME AFIELDNAME - FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON I.RDB$INDEX_NAME=S.RDB$INDEX_NAME - WHERE I.RDB$RELATION_NAME=\''.$table.'\' and I.RDB$INDEX_NAME like \'RDB$PRIMARY%\' - ORDER BY I.RDB$INDEX_NAME,S.RDB$FIELD_POSITION'; - - $a = $this->GetCol($sql,false,true); - if ($a && sizeof($a)>0) return $a; - return false; - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Interbase 5.5 or earlier'; break; - case '2': $s = 'Interbase 5.6'; break; - default: - case '3': $s = 'Interbase 6.0'; break; - } - $arr['version'] = ADOConnection::_findvers($s); - $arr['description'] = $s; - return $arr; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans, $this->_connectionID); - return $this->_transactionID; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = false; - $this->autoCommit = true; - if ($this->_transactionID) { - //print ' commit '; - $ret = ibase_commit($this->_transactionID); - } - $this->_transactionID = false; - return $ret; - } - - // there are some compat problems with ADODB_COUNTRECS=false and $this->_logsql currently. - // it appears that ibase extension cannot support multiple concurrent queryid's - function &_Execute($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - - if ($this->_logsql) { - $savecrecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = true; // force countrecs - $ret =& ADOConnection::_Execute($sql,$inputarr); - $ADODB_COUNTRECS = $savecrecs; - } else { - $ret =& ADOConnection::_Execute($sql,$inputarr); - } - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = false; - $this->autoCommit = true; - if ($this->_transactionID) - $ret = ibase_rollback($this->_transactionID); - $this->_transactionID = false; - - return $ret; - } - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $table = strtoupper($table); - $sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'"; - if (!$primary) { - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$%'"; - } else { - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'"; - } - // get index details - $rs = $this->Execute($sql); - if (!is_object($rs)) { - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - $index = $row[0]; - if (!isset($indexes[$index])) { - if (is_null($row[3])) {$row[3] = 0;} - $indexes[$index] = array( - 'unique' => ($row[3] == 1), - 'columns' => array() - ); - } - $sql = "SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '".$index."' ORDER BY RDB\$FIELD_POSITION ASC"; - $rs1 = $this->Execute($sql); - while ($row1 = $rs1->FetchRow()) { - $indexes[$index]['columns'][$row1[2]] = $row1[1]; - } - } - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - return $indexes; - } - - - // See http://community.borland.com/article/0,1410,25844,00.html - function RowLock($tables,$where,$col) - { - if ($this->autoCommit) $this->BeginTrans(); - $this->Execute("UPDATE $table SET $col=$col WHERE $where "); // is this correct - jlim? - return 1; - } - - - function CreateSequence($seqname,$startID=1) - { - $ok = $this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" )); - if (!$ok) return false; - return $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';'); - } - - function DropSequence($seqname) - { - $seqname = strtoupper($seqname); - $this->Execute("delete from RDB\$GENERATORS where RDB\$GENERATOR_NAME='$seqname'"); - } - - function GenID($seqname='adodbseq',$startID=1) - { - $getnext = ("SELECT Gen_ID($seqname,1) FROM RDB\$DATABASE"); - $rs = @$this->Execute($getnext); - if (!$rs) { - $this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" )); - $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';'); - $rs = $this->Execute($getnext); - } - if ($rs && !$rs->EOF) $this->genID = (integer) reset($rs->fields); - else $this->genID = 0; // false - - if ($rs) $rs->Close(); - - return $this->genID; - } - - function SelectDB($dbName) - { - return false; - } - - function _handleerror() - { - $this->_errorMsg = ibase_errmsg(); - } - - function ErrorNo() - { - if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1]; - else return 0; - } - - function ErrorMsg() - { - return $this->_errorMsg; - } - - function Prepare($sql) - { - $stmt = ibase_prepare($this->_connectionID,$sql); - if (!$stmt) return false; - return array($sql,$stmt); - } - - // returns query ID if successful, otherwise false - // there have been reports of problems with nested queries - the code is probably not re-entrant? - function _query($sql,$iarr=false) - { - - if (!$this->autoCommit && $this->_transactionID) { - $conn = $this->_transactionID; - $docommit = false; - } else { - $conn = $this->_connectionID; - $docommit = true; - } - if (is_array($sql)) { - $fn = 'ibase_execute'; - $sql = $sql[1]; - if (is_array($iarr)) { - if (ADODB_PHPVER >= 0x4050) { // actually 4.0.4 - if ( !isset($iarr[0]) ) $iarr[0] = ''; // PHP5 compat hack - $fnarr =& array_merge( array($sql) , $iarr); - $ret = call_user_func_array($fn,$fnarr); - } else { - switch(sizeof($iarr)) { - case 1: $ret = $fn($sql,$iarr[0]); break; - case 2: $ret = $fn($sql,$iarr[0],$iarr[1]); break; - case 3: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2]); break; - case 4: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break; - case 5: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break; - case 6: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; - case 7: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; - default: ADOConnection::outp( "Too many parameters to ibase query $sql"); - case 8: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; - } - } - } else $ret = $fn($sql); - } else { - $fn = 'ibase_query'; - - if (is_array($iarr)) { - if (ADODB_PHPVER >= 0x4050) { // actually 4.0.4 - if (sizeof($iarr) == 0) $iarr[0] = ''; // PHP5 compat hack - $fnarr =& array_merge( array($conn,$sql) , $iarr); - $ret = call_user_func_array($fn,$fnarr); - } else { - switch(sizeof($iarr)) { - case 1: $ret = $fn($conn,$sql,$iarr[0]); break; - case 2: $ret = $fn($conn,$sql,$iarr[0],$iarr[1]); break; - case 3: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2]); break; - case 4: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break; - case 5: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break; - case 6: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; - case 7: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; - default: ADOConnection::outp( "Too many parameters to ibase query $sql"); - case 8: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; - } - } - } else $ret = $fn($conn,$sql); - } - if ($docommit && $ret === true) ibase_commit($this->_connectionID); - - $this->_handleerror(); - return $ret; - } - - // returns true or false - function _close() - { - if (!$this->autoCommit) @ibase_rollback($this->_connectionID); - return @ibase_close($this->_connectionID); - } - - //OPN STUFF start - function _ConvertFieldType(&$fld, $ftype, $flen, $fscale, $fsubtype, $fprecision, $dialect3) - { - $fscale = abs($fscale); - $fld->max_length = $flen; - $fld->scale = null; - switch($ftype){ - case 7: - case 8: - if ($dialect3) { - switch($fsubtype){ - case 0: - $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); - break; - case 1: - $fld->type = 'numeric'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - case 2: - $fld->type = 'decimal'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - } // switch - } else { - if ($fscale !=0) { - $fld->type = 'decimal'; - $fld->scale = $fscale; - $fld->max_length = ($ftype == 7 ? 4 : 9); - } else { - $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); - } - } - break; - case 16: - if ($dialect3) { - switch($fsubtype){ - case 0: - $fld->type = 'decimal'; - $fld->max_length = 18; - $fld->scale = 0; - break; - case 1: - $fld->type = 'numeric'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - case 2: - $fld->type = 'decimal'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - } // switch - } - break; - case 10: - $fld->type = 'float'; - break; - case 14: - $fld->type = 'char'; - break; - case 27: - if ($fscale !=0) { - $fld->type = 'decimal'; - $fld->max_length = 15; - $fld->scale = 5; - } else { - $fld->type = 'double'; - } - break; - case 35: - if ($dialect3) { - $fld->type = 'timestamp'; - } else { - $fld->type = 'date'; - } - break; - case 12: - $fld->type = 'date'; - break; - case 13: - $fld->type = 'time'; - break; - case 37: - $fld->type = 'varchar'; - break; - case 40: - $fld->type = 'cstring'; - break; - case 261: - $fld->type = 'blob'; - $fld->max_length = -1; - break; - } // switch - } - //OPN STUFF end - // returns array of ADOFieldObjects for current table - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - $ADODB_FETCH_MODE = $save; - $false = false; - if ($rs === false) { - return $false; - } - - $retarr = array(); - //OPN STUFF start - $dialect3 = ($this->dialect==3 ? true : false); - //OPN STUFF end - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = trim($rs->fields[0]); - //OPN STUFF start - $this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3); - if (isset($rs->fields[1]) && $rs->fields[1]) { - $fld->not_null = true; - } - if (isset($rs->fields[2])) { - - $fld->has_default = true; - $d = substr($rs->fields[2],strlen('default ')); - switch ($fld->type) - { - case 'smallint': - case 'integer': $fld->default_value = (int) $d; break; - case 'char': - case 'blob': - case 'text': - case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break; - case 'double': - case 'float': $fld->default_value = (float) $d; break; - default: $fld->default_value = $d; break; - } - // case 35:$tt = 'TIMESTAMP'; break; - } - if ((isset($rs->fields[5])) && ($fld->type == 'blob')) { - $fld->sub_type = $rs->fields[5]; - } else { - $fld->sub_type = null; - } - //OPN STUFF end - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if ( empty($retarr)) return $false; - else return $retarr; - } - - function BlobEncode( $blob ) - { - $blobid = ibase_blob_create( $this->_connectionID); - ibase_blob_add( $blobid, $blob ); - return ibase_blob_close( $blobid ); - } - - // since we auto-decode all blob's since 2.42, - // BlobDecode should not do any transforms - function BlobDecode($blob) - { - return $blob; - } - - - - - // old blobdecode function - // still used to auto-decode all blob's - function _BlobDecode_old( $blob ) - { - $blobid = ibase_blob_open($this->_connectionID, $blob ); - $realblob = ibase_blob_get( $blobid,$this->maxblobsize); // 2nd param is max size of blob -- Kevin Boillet - while($string = ibase_blob_get($blobid, 8192)){ - $realblob .= $string; - } - ibase_blob_close( $blobid ); - - return( $realblob ); - } - - function _BlobDecode( $blob ) - { - if (ADODB_PHPVER >= 0x5000) { - $blob_data = ibase_blob_info($this->_connectionID, $blob ); - $blobid = ibase_blob_open($this->_connectionID, $blob ); - } else { - - $blob_data = ibase_blob_info( $blob ); - $blobid = ibase_blob_open( $blob ); - } - - if( $blob_data[0] > $this->maxblobsize ) { - - $realblob = ibase_blob_get($blobid, $this->maxblobsize); - - while($string = ibase_blob_get($blobid, 8192)){ - $realblob .= $string; - } - } else { - $realblob = ibase_blob_get($blobid, $blob_data[0]); - } - - ibase_blob_close( $blobid ); - return( $realblob ); - } - - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - $fd = fopen($path,'rb'); - if ($fd === false) return false; - $blob_id = ibase_blob_create($this->_connectionID); - - /* fill with data */ - - while ($val = fread($fd,32768)){ - ibase_blob_add($blob_id, $val); - } - - /* close and get $blob_id_str for inserting into table */ - $blob_id_str = ibase_blob_close($blob_id); - - fclose($fd); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - $blob_id = ibase_blob_create($this->_connectionID); - - // ibase_blob_add($blob_id, $val); - - // replacement that solves the problem by which only the first modulus 64K / - // of $val are stored at the blob field //////////////////////////////////// - // Thx Abel Berenstein aberenstein#afip.gov.ar - $len = strlen($val); - $chunk_size = 32768; - $tail_size = $len % $chunk_size; - $n_chunks = ($len - $tail_size) / $chunk_size; - - for ($n = 0; $n < $n_chunks; $n++) { - $start = $n * $chunk_size; - $data = substr($val, $start, $chunk_size); - ibase_blob_add($blob_id, $data); - } - - if ($tail_size) { - $start = $n_chunks * $chunk_size; - $data = substr($val, $start, $tail_size); - ibase_blob_add($blob_id, $data); - } - // end replacement ///////////////////////////////////////////////////////// - - $blob_id_str = ibase_blob_close($blob_id); - - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - - } - - - function OldUpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - $blob_id = ibase_blob_create($this->_connectionID); - ibase_blob_add($blob_id, $val); - $blob_id_str = ibase_blob_close($blob_id); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - } - - // Format date column in sql string given an input format that understands Y M D - // Only since Interbase 6.0 - uses EXTRACT - // problem - does not zero-fill the day and month yet - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysDate; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '||'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "extract(year from $col)"; - break; - case 'M': - case 'm': - $s .= "extract(month from $col)"; - break; - case 'Q': - case 'q': - $s .= "cast(((extract(month from $col)+2) / 3) as integer)"; - break; - case 'D': - case 'd': - $s .= "(extract(day from $col))"; - break; - case 'H': - case 'h': - $s .= "(extract(hour from $col))"; - break; - case 'I': - case 'i': - $s .= "(extract(minute from $col))"; - break; - case 'S': - case 's': - $s .= "CAST((extract(second from $col)) AS INTEGER)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_ibase extends ADORecordSet -{ - - var $databaseType = "ibase"; - var $bind=false; - var $_cacheType; - - function ADORecordset_ibase($id,$mode=false) - { - global $ADODB_FETCH_MODE; - - $this->fetchMode = ($mode === false) ? $ADODB_FETCH_MODE : $mode; - $this->ADORecordSet($id); - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $ibf = ibase_field_info($this->_queryID,$fieldOffset); - switch (ADODB_ASSOC_CASE) { - case 2: // the default - $fld->name = ($ibf['alias']); - if (empty($fld->name)) $fld->name = ($ibf['name']); - break; - case 0: - $fld->name = strtoupper($ibf['alias']); - if (empty($fld->name)) $fld->name = strtoupper($ibf['name']); - break; - case 1: - $fld->name = strtolower($ibf['alias']); - if (empty($fld->name)) $fld->name = strtolower($ibf['name']); - break; - } - - $fld->type = $ibf['type']; - $fld->max_length = $ibf['length']; - - /* This needs to be populated from the metadata */ - $fld->not_null = false; - $fld->has_default = false; - $fld->default_value = 'null'; - return $fld; - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = @ibase_num_fields($this->_queryID); - - // cache types for blob decode check - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - $f1 = $this->FetchField($i); - $this->_cacheType[] = $f1->type; - } - } - - function _seek($row) - { - return false; - } - - function _fetch() - { - $f = @ibase_fetch_row($this->_queryID); - if ($f === false) { - $this->fields = false; - return false; - } - // OPN stuff start - optimized - // fix missing nulls and decode blobs automatically - - global $ADODB_ANSI_PADDING_OFF; - //$ADODB_ANSI_PADDING_OFF=1; - $rtrim = !empty($ADODB_ANSI_PADDING_OFF); - - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - if ($this->_cacheType[$i]=="BLOB") { - if (isset($f[$i])) { - $f[$i] = $this->connection->_BlobDecode($f[$i]); - } else { - $f[$i] = null; - } - } else { - if (!isset($f[$i])) { - $f[$i] = null; - } else if ($rtrim && is_string($f[$i])) { - $f[$i] = rtrim($f[$i]); - } - } - } - // OPN stuff end - - $this->fields = $f; - if ($this->fetchMode == ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } else if ($this->fetchMode == ADODB_FETCH_BOTH) { - $this->fields =& array_merge($this->fields,$this->GetRowAssoc(ADODB_ASSOC_CASE)); - } - return true; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - - } - - - function _close() - { - return @ibase_free_result($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'CHAR': - return 'C'; - - case 'TEXT': - case 'VARCHAR': - case 'VARYING': - if ($len <= $this->blobSize) return 'C'; - return 'X'; - case 'BLOB': - return 'B'; - - case 'TIMESTAMP': - case 'DATE': return 'D'; - case 'TIME': return 'T'; - //case 'T': return 'T'; - - //case 'L': return 'L'; - case 'INT': - case 'SHORT': - case 'INTEGER': return 'I'; - default: return 'N'; - } - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix.inc.php.svn-base deleted file mode 100755 index eed00b05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix.inc.php.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -ADORecordset_informix72($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix72.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix72.inc.php.svn-base deleted file mode 100755 index 3bf65ef9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-informix72.inc.php.svn-base +++ /dev/null @@ -1,475 +0,0 @@ - - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('IFX_SCROLL')) define('IFX_SCROLL',1); - -class ADODB_informix72 extends ADOConnection { - var $databaseType = "informix72"; - var $dataProvider = "informix"; - var $replaceQuote = "''"; // string to use to replace quotes - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasInsertID = true; - var $hasAffectedRows = true; - var $substr = 'substr'; - var $metaTablesSQL="select tabname,tabtype from systables where tabtype in ('T','V') and owner!='informix'"; //Don't get informix tables and pseudo-tables - - - var $metaColumnsSQL = - "select c.colname, c.coltype, c.collength, d.default,c.colno - from syscolumns c, systables t,outer sysdefaults d - where c.tabid=t.tabid and d.tabid=t.tabid and d.colno=c.colno - and tabname='%s' order by c.colno"; - - var $metaPrimaryKeySQL = - "select part1,part2,part3,part4,part5,part6,part7,part8 from - systables t,sysconstraints s,sysindexes i where t.tabname='%s' - and s.tabid=t.tabid and s.constrtype='P' - and i.idxname=s.idxname"; - - var $concat_operator = '||'; - - var $lastQuery = false; - var $has_insertid = true; - - var $_autocommit = true; - var $_bindInputArray = true; // set to true if ADOConnection.Execute() permits binding of array parameters. - var $sysDate = 'TODAY'; - var $sysTimeStamp = 'CURRENT'; - var $cursorType = IFX_SCROLL; // IFX_SCROLL or IFX_HOLD or 0 - - function ADODB_informix72() - { - // alternatively, use older method: - //putenv("DBDATE=Y4MD-"); - - // force ISO date format - putenv('GL_DATE=%Y-%m-%d'); - - if (function_exists('ifx_byteasvarchar')) { - ifx_byteasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. - ifx_textasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. - ifx_blobinfile_mode(0); // Mode "0" means save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in a file. - } - } - - function ServerInfo() - { - if (isset($this->version)) return $this->version; - - $arr['description'] = $this->GetOne("select DBINFO('version','full') from systables where tabid = 1"); - $arr['version'] = $this->GetOne("select DBINFO('version','major') || DBINFO('version','minor') from systables where tabid = 1"); - $this->version = $arr; - return $arr; - } - - - - function _insertid() - { - $sqlca =ifx_getsqlca($this->lastQuery); - return @$sqlca["sqlerrd1"]; - } - - function _affectedrows() - { - if ($this->lastQuery) { - return @ifx_affected_rows ($this->lastQuery); - } - return 0; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('BEGIN'); - $this->_autocommit = false; - return true; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - $this->_autocommit = true; - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - $this->_autocommit = true; - return true; - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->_autocommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - /* Returns: the last error message from previous database operation - Note: This function is NOT available for Microsoft SQL Server. */ - - function ErrorMsg() - { - if (!empty($this->_logsql)) return $this->_errorMsg; - $this->_errorMsg = ifx_errormsg(); - return $this->_errorMsg; - } - - function ErrorNo() - { - preg_match("/.*SQLCODE=([^\]]*)/",ifx_error(),$parse); - if (is_array($parse) && isset($parse[1])) return (int)$parse[1]; - return 0; - } - - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if (!empty($this->metaColumnsSQL)) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs === false) return $false; - $rspkey = $this->Execute(sprintf($this->metaPrimaryKeySQL,$table)); //Added to get primary key colno items - - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; -/* //!eos. - $rs->fields[1] is not the correct adodb type - $rs->fields[2] is not correct max_length, because can include not-null bit - - $fld->type = $rs->fields[1]; - $fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields); //Added to set primary key flag - $fld->max_length = $rs->fields[2];*/ - $pr=ifx_props($rs->fields[1],$rs->fields[2]); //!eos - $fld->type = $pr[0] ;//!eos - $fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields); - $fld->max_length = $pr[1]; //!eos - $fld->precision = $pr[2] ;//!eos - $fld->not_null = $pr[3]=="N"; //!eos - - if (trim($rs->fields[3]) != "AAAAAA 0") { - $fld->has_default = 1; - $fld->default_value = $rs->fields[3]; - } else { - $fld->has_default = 0; - } - - $retarr[strtolower($fld->name)] = $fld; - $rs->MoveNext(); - } - - $rs->Close(); - $rspkey->Close(); //!eos - return $retarr; - } - - return $false; - } - - function &xMetaColumns($table) - { - return ADOConnection::MetaColumns($table,false); - } - - function MetaForeignKeys($table, $owner=false, $upper=false) //!Eos - { - $sql = " - select tr.tabname,updrule,delrule, - i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4, - i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8 - from systables t,sysconstraints s,sysindexes i, - sysreferences r,systables tr,sysconstraints s2,sysindexes i2 - where t.tabname='$table' - and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid - and i.idxname=s.idxname and tr.tabid=r.ptabid - and s2.constrid=r.primary and i2.idxname=s2.idxname"; - - $rs = $this->Execute($sql); - if (!$rs || $rs->EOF) return false; - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $coldest=$this->metaColumnNames($v["tabname"]); - $colorig=$this->metaColumnNames($table); - $colnames=array(); - for($i=1;$i<=8 && $v["o$i"] ;$i++) { - $colnames[]=$coldest[$v["d$i"]-1]."=".$colorig[$v["o$i"]-1]; - } - if($upper) - $a[strtoupper($v["tabname"])] = $colnames; - else - $a[$v["tabname"]] = $colnames; - } - return $a; - } - - function UpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB') - { - $type = ($blobtype == 'TEXT') ? 1 : 0; - $blobid = ifx_create_blob($type,0,$val); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blobid)); - } - - function BlobDecode($blobid) - { - return function_exists('ifx_byteasvarchar') ? $blobid : @ifx_get_blob($blobid); - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('ifx_connect')) return null; - - $dbs = $argDatabasename . "@" . $argHostname; - if ($argHostname) putenv("INFORMIXSERVER=$argHostname"); - putenv("INFORMIXSERVER=".trim($argHostname)); - $this->_connectionID = ifx_connect($dbs,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - #if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('ifx_connect')) return null; - - $dbs = $argDatabasename . "@" . $argHostname; - putenv("INFORMIXSERVER=".trim($argHostname)); - $this->_connectionID = ifx_pconnect($dbs,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - #if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } -/* - // ifx_do does not accept bind parameters - weird ??? - function Prepare($sql) - { - $stmt = ifx_prepare($sql); - if (!$stmt) return $sql; - else return array($sql,$stmt); - } -*/ - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - global $ADODB_COUNTRECS; - - // String parameters have to be converted using ifx_create_char - if ($inputarr) { - foreach($inputarr as $v) { - if (gettype($v) == 'string') { - $tab[] = ifx_create_char($v); - } - else { - $tab[] = $v; - } - } - } - - // In case of select statement, we use a scroll cursor in order - // to be able to call "move", or "movefirst" statements - if (!$ADODB_COUNTRECS && preg_match("/^\s*select/is", $sql)) { - if ($inputarr) { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType, $tab); - } - else { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType); - } - } - else { - if ($inputarr) { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $tab); - } - else { - $this->lastQuery = ifx_query($sql,$this->_connectionID); - } - } - - // Following line have been commented because autocommit mode is - // not supported by informix SE 7.2 - - //if ($this->_autocommit) ifx_query('COMMIT',$this->_connectionID); - - return $this->lastQuery; - } - - // returns true or false - function _close() - { - $this->lastQuery = false; - return ifx_close($this->_connectionID); - } -} - - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_informix72 extends ADORecordSet { - - var $databaseType = "informix72"; - var $canSeek = true; - var $_fieldprops = false; - - function ADORecordset_informix72($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id); - } - - - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - function &FetchField($fieldOffset = -1) - { - if (empty($this->_fieldprops)) { - $fp = ifx_fieldproperties($this->_queryID); - foreach($fp as $k => $v) { - $o = new ADOFieldObject; - $o->name = $k; - $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE" - $o->type = $arr[0]; - $o->max_length = $arr[1]; - $this->_fieldprops[] = $o; - $o->not_null = $arr[4]=="N"; - } - } - $ret = $this->_fieldprops[$fieldOffset]; - return $ret; - } - - function _initrs() - { - $this->_numOfRows = -1; // ifx_affected_rows not reliable, only returns estimate -- ($ADODB_COUNTRECS)? ifx_affected_rows($this->_queryID):-1; - $this->_numOfFields = ifx_num_fields($this->_queryID); - } - - function _seek($row) - { - return @ifx_fetch_row($this->_queryID, (int) $row); - } - - function MoveLast() - { - $this->fields = @ifx_fetch_row($this->_queryID, "LAST"); - if ($this->fields) $this->EOF = false; - $this->_currentRow = -1; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - - return true; - } - - function MoveFirst() - { - $this->fields = @ifx_fetch_row($this->_queryID, "FIRST"); - if ($this->fields) $this->EOF = false; - $this->_currentRow = 0; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - - return true; - } - - function _fetch($ignore_fields=false) - { - - $this->fields = @ifx_fetch_row($this->_queryID); - - if (!is_array($this->fields)) return false; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - return true; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - function _close() - { - return ifx_free_result($this->_queryID); - } - -} -/** !Eos -* Auxiliar function to Parse coltype,collength. Used by Metacolumns -* return: array ($mtype,$length,$precision,$nullable) (similar to ifx_fieldpropierties) -*/ -function ifx_props($coltype,$collength){ - $itype=fmod($coltype+1,256); - $nullable=floor(($coltype+1) /256) ?"N":"Y"; - $mtype=substr(" CIIFFNNDN TBXCC ",$itype,1); - switch ($itype){ - case 2: - $length=4; - case 6: - case 9: - case 14: - $length=floor($collength/256); - $precision=fmod($collength,256); - break; - default: - $precision=0; - $length=$collength; - } - return array($mtype,$length,$precision,$nullable); -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ldap.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ldap.inc.php.svn-base deleted file mode 100755 index bbf0cbf0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-ldap.inc.php.svn-base +++ /dev/null @@ -1,406 +0,0 @@ -port); - - if ( strstr( $host, ':' ) ) { - $conn_info = split( ':', $host ); - } - - $this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] ); - if (!$this->_connectionID) { - $e = 'Could not connect to ' . $conn_info[0]; - $this->_errorMsg = $e; - if ($this->debug) ADOConnection::outp($e); - return false; - } - if( count( $LDAP_CONNECT_OPTIONS ) > 0 ) { - $this->_inject_bind_options( $LDAP_CONNECT_OPTIONS ); - } - - if ($username) { - $bind = ldap_bind( $this->_connectionID, $username, $password ); - } else { - $username = 'anonymous'; - $bind = ldap_bind( $this->_connectionID ); - } - - if (!$bind) { - $e = 'Could not bind to ' . $conn_info[0] . " as ".$username; - $this->_errorMsg = $e; - if ($this->debug) ADOConnection::outp($e); - return false; - } - $this->_errorMsg = ''; - $this->database = $ldapbase; - return $this->_connectionID; - } - -/* - Valid Domain Values for LDAP Options: - - LDAP_OPT_DEREF (integer) - LDAP_OPT_SIZELIMIT (integer) - LDAP_OPT_TIMELIMIT (integer) - LDAP_OPT_PROTOCOL_VERSION (integer) - LDAP_OPT_ERROR_NUMBER (integer) - LDAP_OPT_REFERRALS (boolean) - LDAP_OPT_RESTART (boolean) - LDAP_OPT_HOST_NAME (string) - LDAP_OPT_ERROR_STRING (string) - LDAP_OPT_MATCHED_DN (string) - LDAP_OPT_SERVER_CONTROLS (array) - LDAP_OPT_CLIENT_CONTROLS (array) - - Make sure to set this BEFORE calling Connect() - - Example: - - $LDAP_CONNECT_OPTIONS = Array( - Array ( - "OPTION_NAME"=>LDAP_OPT_DEREF, - "OPTION_VALUE"=>2 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_SIZELIMIT, - "OPTION_VALUE"=>100 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_TIMELIMIT, - "OPTION_VALUE"=>30 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION, - "OPTION_VALUE"=>3 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER, - "OPTION_VALUE"=>13 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_REFERRALS, - "OPTION_VALUE"=>FALSE - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_RESTART, - "OPTION_VALUE"=>FALSE - ) - ); -*/ - - function _inject_bind_options( $options ) { - foreach( $options as $option ) { - ldap_set_option( $this->_connectionID, $option["OPTION_NAME"], $option["OPTION_VALUE"] ) - or die( "Unable to set server option: " . $option["OPTION_NAME"] ); - } - } - - /* returns _queryID or false */ - function _query($sql,$inputarr) - { - $rs = ldap_search( $this->_connectionID, $this->database, $sql ); - $this->_errorMsg = ($rs) ? '' : 'Search error on '.$sql; - return $rs; - } - - /* closes the LDAP connection */ - function _close() - { - @ldap_close( $this->_connectionID ); - $this->_connectionID = false; - } - - function SelectDB($db) { - $this->database = $db; - return true; - } // SelectDB - - function ServerInfo() - { - if( !empty( $this->version ) ) return $this->version; - $version = array(); - /* - Determines how aliases are handled during search. - LDAP_DEREF_NEVER (0x00) - LDAP_DEREF_SEARCHING (0x01) - LDAP_DEREF_FINDING (0x02) - LDAP_DEREF_ALWAYS (0x03) - The LDAP_DEREF_SEARCHING value means aliases are dereferenced during the search but - not when locating the base object of the search. The LDAP_DEREF_FINDING value means - aliases are dereferenced when locating the base object but not during the search. - Default: LDAP_DEREF_NEVER - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_DEREF, $version['LDAP_OPT_DEREF'] ) ; - switch ( $version['LDAP_OPT_DEREF'] ) { - case 0: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_NEVER'; - case 1: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_SEARCHING'; - case 2: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_FINDING'; - case 3: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_ALWAYS'; - } - - /* - A limit on the number of entries to return from a search. - LDAP_NO_LIMIT (0) means no limit. - Default: LDAP_NO_LIMIT - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_SIZELIMIT, $version['LDAP_OPT_SIZELIMIT'] ); - if ( $version['LDAP_OPT_SIZELIMIT'] == 0 ) { - $version['LDAP_OPT_SIZELIMIT'] = 'LDAP_NO_LIMIT'; - } - - /* - A limit on the number of seconds to spend on a search. - LDAP_NO_LIMIT (0) means no limit. - Default: LDAP_NO_LIMIT - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_TIMELIMIT, $version['LDAP_OPT_TIMELIMIT'] ); - if ( $version['LDAP_OPT_TIMELIMIT'] == 0 ) { - $version['LDAP_OPT_TIMELIMIT'] = 'LDAP_NO_LIMIT'; - } - - /* - Determines whether the LDAP library automatically follows referrals returned by LDAP servers or not. - LDAP_OPT_ON - LDAP_OPT_OFF - Default: ON - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_REFERRALS, $version['LDAP_OPT_REFERRALS'] ); - if ( $version['LDAP_OPT_REFERRALS'] == 0 ) { - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_OFF'; - } else { - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_ON'; - - } - /* - Determines whether LDAP I/O operations are automatically restarted if they abort prematurely. - LDAP_OPT_ON - LDAP_OPT_OFF - Default: OFF - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_RESTART, $version['LDAP_OPT_RESTART'] ); - if ( $version['LDAP_OPT_RESTART'] == 0 ) { - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_OFF'; - } else { - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_ON'; - - } - /* - This option indicates the version of the LDAP protocol used when communicating with the primary LDAP server. - LDAP_VERSION2 (2) - LDAP_VERSION3 (3) - Default: LDAP_VERSION2 (2) - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_PROTOCOL_VERSION, $version['LDAP_OPT_PROTOCOL_VERSION'] ); - if ( $version['LDAP_OPT_PROTOCOL_VERSION'] == 2 ) { - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION2'; - } else { - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION3'; - - } - /* The host name (or list of hosts) for the primary LDAP server. */ - ldap_get_option( $this->_connectionID, LDAP_OPT_HOST_NAME, $version['LDAP_OPT_HOST_NAME'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_NUMBER, $version['LDAP_OPT_ERROR_NUMBER'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_STRING, $version['LDAP_OPT_ERROR_STRING'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_MATCHED_DN, $version['LDAP_OPT_MATCHED_DN'] ); - - return $this->version = $version; - - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ldap extends ADORecordSet{ - - var $databaseType = "ldap"; - var $canSeek = false; - var $_entryID; /* keeps track of the entry resource identifier */ - - function ADORecordSet_ldap($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: - $this->fetchMode = LDAP_NUM; - break; - case ADODB_FETCH_ASSOC: - $this->fetchMode = LDAP_ASSOC; - break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = LDAP_BOTH; - break; - } - - $this->ADORecordSet($queryID); - } - - function _initrs() - { - /* - This could be teaked to respect the $COUNTRECS directive from ADODB - It's currently being used in the _fetch() function and the - GetAssoc() function - */ - $this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID ); - - } - - /* - Return whole recordset as a multi-dimensional associative array - */ - function &GetAssoc($force_array = false, $first2cols = false) - { - $records = $this->_numOfRows; - $results = array(); - for ( $i=0; $i < $records; $i++ ) { - foreach ( $this->fields as $k=>$v ) { - if ( is_array( $v ) ) { - if ( $v['count'] == 1 ) { - $results[$i][$k] = $v[0]; - } else { - array_shift( $v ); - $results[$i][$k] = $v; - } - } - } - } - - return $results; - } - - function &GetRowAssoc() - { - $results = array(); - foreach ( $this->fields as $k=>$v ) { - if ( is_array( $v ) ) { - if ( $v['count'] == 1 ) { - $results[$k] = $v[0]; - } else { - array_shift( $v ); - $results[$k] = $v; - } - } - } - - return $results; - } - - function GetRowNums() - { - $results = array(); - foreach ( $this->fields as $k=>$v ) { - static $i = 0; - if (is_array( $v )) { - if ( $v['count'] == 1 ) { - $results[$i] = $v[0]; - } else { - array_shift( $v ); - $results[$i] = $v; - } - $i++; - } - } - return $results; - } - - function _fetch() - { - if ( $this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0 ) - return false; - - if ( $this->_currentRow == 0 ) { - $this->_entryID = ldap_first_entry( $this->connection->_connectionID, $this->_queryID ); - } else { - $this->_entryID = ldap_next_entry( $this->connection->_connectionID, $this->_entryID ); - } - - $this->fields = ldap_get_attributes( $this->connection->_connectionID, $this->_entryID ); - $this->_numOfFields = $this->fields['count']; - switch ( $this->fetchMode ) { - - case LDAP_ASSOC: - $this->fields = $this->GetRowAssoc(); - break; - - case LDAP_NUM: - $this->fields = array_merge($this->GetRowNums(),$this->GetRowAssoc()); - break; - - case LDAP_BOTH: - default: - $this->fields = $this->GetRowNums(); - break; - } - return ( is_array( $this->fields ) ); - } - - function _close() { - @ldap_free_result( $this->_queryID ); - $this->_queryID = false; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql.inc.php.svn-base deleted file mode 100755 index 8eebd914..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql.inc.php.svn-base +++ /dev/null @@ -1,1037 +0,0 @@ -= 0x4300) { -// docs say 4.2.0, but testing shows only since 4.3.0 does it work! - ini_set('mssql.datetimeconvert',0); -} else { -global $ADODB_mssql_mths; // array, months must be upper-case - - - $ADODB_mssql_date_order = 'mdy'; - $ADODB_mssql_mths = array( - 'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6, - 'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); -} - -//--------------------------------------------------------------------------- -// Call this to autoset $ADODB_mssql_date_order at the beginning of your code, -// just after you connect to the database. Supports mdy and dmy only. -// Not required for PHP 4.2.0 and above. -function AutoDetect_MSSQL_Date_Order($conn) -{ -global $ADODB_mssql_date_order; - $adate = $conn->GetOne('select getdate()'); - if ($adate) { - $anum = (int) $adate; - if ($anum > 0) { - if ($anum > 31) { - //ADOConnection::outp( "MSSQL: YYYY-MM-DD date format not supported currently"); - } else - $ADODB_mssql_date_order = 'dmy'; - } else - $ADODB_mssql_date_order = 'mdy'; - } -} - -class ADODB_mssql extends ADOConnection { - var $databaseType = "mssql"; - var $dataProvider = "mssql"; - var $replaceQuote = "''"; // string to use to replace quotes - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasInsertID = true; - var $substr = "substring"; - var $length = 'len'; - var $hasAffectedRows = true; - var $metaDatabasesSQL = "select name from sysdatabases where name <> 'master'"; - var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"; - var $metaColumnsSQL = # xtype==61 is datetime -"select c.name,t.name,c.length, - (case when c.xusertype=61 then 0 else c.xprec end), - (case when c.xusertype=61 then 0 else c.xscale end) - from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; - var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE - var $hasGenID = true; - var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - var $sysTimeStamp = 'GetDate()'; - var $_has_mssql_init; - var $maxParameterLen = 4000; - var $arrayClass = 'ADORecordSet_array_mssql'; - var $uniqueSort = true; - var $leftOuter = '*='; - var $rightOuter = '=*'; - var $ansiOuter = true; // for mssql7 or later - var $poorAffectedRows = true; - var $identitySQL = 'select @@IDENTITY'; // 'select SCOPE_IDENTITY'; # for mssql 2000 - var $uniqueOrderBy = true; - var $_bindInputArray = true; - - function ADODB_mssql() - { - $this->_has_mssql_init = (strnatcmp(PHP_VERSION,'4.1.0')>=0); - } - - function ServerInfo() - { - global $ADODB_FETCH_MODE; - - - if ($this->fetchMode === false) { - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - } else - $savem = $this->SetFetchMode(ADODB_FETCH_NUM); - - if (0) { - $stmt = $this->PrepareSP('sp_server_info'); - $val = 2; - $this->Parameter($stmt,$val,'attribute_id'); - $row = $this->GetRow($stmt); - } - - $row = $this->GetRow("execute sp_server_info 2"); - - - if ($this->fetchMode === false) { - $ADODB_FETCH_MODE = $savem; - } else - $this->SetFetchMode($savem); - - $arr['description'] = $row[2]; - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " ISNULL($field, $ifNull) "; // if MS SQL Server - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seq='adodbseq',$start=1) - { - - $this->Execute('BEGIN TRANSACTION adodbseq'); - $start -= 1; - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return true; - } - - function GenID($seq='adodbseq',$start=1) - { - //$this->debug=1; - $this->Execute('BEGIN TRANSACTION adodbseq'); - $ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1"); - if (!$ok) { - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $start; - } - $num = $this->GetOne("select id from $seq"); - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $num; - - // in old implementation, pre 1.90, we returned GUID... - //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'"); - } - - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($nrows > 0 && $offset <= 0) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql); - $rs =& $this->Execute($sql,$inputarr); - } else - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - - return $rs; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yyyy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(quarter,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(day($col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('BEGIN TRAN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT TRAN'); - return true; - } - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK TRAN'); - return true; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - /* - Usage: - - $this->BeginTrans(); - $this->RowLock('table1,table2','table1.id=33 and table2.id=table1.id'); # lock row 33 for both tables - - # some operation on both tables table1 and table2 - - $this->CommitTrans(); - - See http://www.swynk.com/friends/achigrik/SQL70Locks.asp - */ - function RowLock($tables,$where,$flds='top 1 null as ignore') - { - if (!$this->transCnt) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables with (ROWLOCK,HOLDLOCK) where $where"); - } - - - function &MetaIndexes($table,$primary=false) - { - $table = $this->qstr($table); - - $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, - CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, - CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique - FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id - INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid - INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid - WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table - ORDER BY O.name, I.Name, K.keyno"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - if (!$primary && $row[5]) continue; - - $indexes[$row[0]]['unique'] = $row[6]; - $indexes[$row[0]]['columns'][] = $row[1]; - } - return $indexes; - } - - function MetaForeignKeys($table, $owner=false, $upper=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - - $sql = -"select object_name(constid) as constraint_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where upper(object_name(fkeyid)) = $table -order by constraint_name, referenced_table_name, keyno"; - - $constraints =& $this->GetArray($sql); - - $ADODB_FETCH_MODE = $save; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; - } - if (!$arr) return false; - - $arr2 = false; - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - //From: Fernando Moreira - function MetaDatabases() - { - if(@mssql_select_db("master")) { - $qry=$this->metaDatabasesSQL; - if($rs=@mssql_query($qry,$this->_connectionID)){ - $tmpAr=$ar=array(); - while($tmpAr=@mssql_fetch_row($rs)) - $ar[]=$tmpAr[0]; - @mssql_select_db($this->database); - if(sizeof($ar)) - return($ar); - else - return(false); - } else { - @mssql_select_db($this->database); - return(false); - } - } - return(false); - } - - // "Stein-Aksel Basma" - // tested with MSSQL 2000 - function &MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - $schema = ''; - $this->_findschema($table,$schema); - if (!$schema) $schema = $this->database; - if ($schema) $schema = "and k.table_catalog like '$schema%'"; - - $sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, - information_schema.table_constraints tc - where tc.constraint_name = k.constraint_name and tc.constraint_type = - 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position "; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $a = $this->GetCol($sql); - $ADODB_FETCH_MODE = $savem; - - if ($a && sizeof($a)>0) return $a; - $false = false; - return $false; - } - - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(($mask)); - $this->metaTablesSQL .= " AND name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @mssql_select_db($dbName); - } - else return false; - } - - function ErrorMsg() - { - if (empty($this->_errorMsg)){ - $this->_errorMsg = mssql_get_last_message(); - } - return $this->_errorMsg; - } - - function ErrorNo() - { - if ($this->_logsql && $this->_errorCode !== false) return $this->_errorCode; - if (empty($this->_errorMsg)) { - $this->_errorMsg = mssql_get_last_message(); - } - $id = @mssql_query("select @@ERROR",$this->_connectionID); - if (!$id) return false; - $arr = mssql_fetch_array($id); - @mssql_free_result($id); - if (is_array($arr)) return $arr[0]; - else return -1; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('mssql_pconnect')) return null; - $this->_connectionID = mssql_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('mssql_pconnect')) return null; - $this->_connectionID = mssql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - - // persistent connections can forget to rollback on crash, so we do it here. - if ($this->autoRollback) { - $cnt = $this->GetOne('select @@TRANCOUNT'); - while (--$cnt >= 0) $this->Execute('ROLLBACK TRAN'); - } - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function Prepare($sql) - { - $sqlarr = explode('?',$sql); - if (sizeof($sqlarr) <= 1) return $sql; - $sql2 = $sqlarr[0]; - for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) { - $sql2 .= '@P'.($i-1) . $sqlarr[$i]; - } - return array($sql,$this->qstr($sql2),$max); - } - - function PrepareSP($sql) - { - if (!$this->_has_mssql_init) { - ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); - return $sql; - } - $stmt = mssql_init($sql,$this->_connectionID); - if (!$stmt) return $sql; - return array($sql,$stmt); - } - - // returns concatenated string - // MSSQL requires integers to be cast as strings - // automatically cast every datatype to VARCHAR(255) - // @author David Rogers (introspectshun) - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // Split single record on commas, if possible - if (sizeof($arr) == 1) { - foreach ($arr as $arg) { - $args = explode(',', $arg); - } - $arr = $args; - } - - array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";')); - $s = implode('+',$arr); - if (sizeof($arr) > 0) return "$s"; - - return ''; - } - - /* - Usage: - $stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group - - # note that the parameter does not have @ in front! - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',false,64); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to. Can set to null (for isNull support). - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See mssql_bind documentation at php.net. - */ - function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false) - { - if (!$this->_has_mssql_init) { - ADOConnection::outp( "Parameter: mssql_bind only available since PHP 4.1.0"); - return false; - } - - $isNull = is_null($var); // php 4.0.4 and above... - - if ($type === false) - switch(gettype($var)) { - default: - case 'string': $type = SQLCHAR; break; - case 'double': $type = SQLFLT8; break; - case 'integer': $type = SQLINT4; break; - case 'boolean': $type = SQLINT1; break; # SQLBIT not supported in 4.1.0 - } - - if ($this->debug) { - $prefix = ($isOutput) ? 'Out' : 'In'; - $ztype = (empty($type)) ? 'false' : $type; - ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);"); - } - /* - See http://phplens.com/lens/lensforum/msgs.php?id=7231 - - RETVAL is HARD CODED into php_mssql extension: - The return value (a long integer value) is treated like a special OUTPUT parameter, - called "RETVAL" (without the @). See the example at mssql_execute to - see how it works. - type: one of this new supported PHP constants. - SQLTEXT, SQLVARCHAR,SQLCHAR, SQLINT1,SQLINT2, SQLINT4, SQLBIT,SQLFLT8 - */ - if ($name !== 'RETVAL') $name = '@'.$name; - return mssql_bind($stmt[1], $name, $var, $type, $isOutput, $isNull, $maxLen); - } - - /* - Unfortunately, it appears that mssql cannot handle varbinary > 255 chars - So all your blobs must be of type "image". - - Remember to set in php.ini the following... - - ; Valid range 0 - 2147483647. Default = 4096. - mssql.textlimit = 0 ; zero to pass through - - ; Valid range 0 - 2147483647. Default = 4096. - mssql.textsize = 0 ; zero to pass through - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - if (strtoupper($blobtype) == 'CLOB') { - $sql = "UPDATE $table SET $column='" . $val . "' WHERE $where"; - return $this->Execute($sql) != false; - } - $sql = "UPDATE $table SET $column=0x".bin2hex($val)." WHERE $where"; - return $this->Execute($sql) != false; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - $this->_errorMsg = false; - if (is_array($inputarr)) { - - # bind input params with sp_executesql: - # see http://www.quest-pipelines.com/newsletter-v3/0402_F.htm - # works only with sql server 7 and newer - if (!is_array($sql)) $sql = $this->Prepare($sql); - $params = ''; - $decl = ''; - $i = 0; - foreach($inputarr as $v) { - if ($decl) { - $decl .= ', '; - $params .= ', '; - } - if (is_string($v)) { - $len = strlen($v); - if ($len == 0) $len = 1; - - if ($len > 4000 ) { - // NVARCHAR is max 4000 chars. Let's use NTEXT - $decl .= "@P$i NTEXT"; - } else { - $decl .= "@P$i NVARCHAR($len)"; - } - - $params .= "@P$i=N". (strncmp($v,"'",1)==0? $v : $this->qstr($v)); - } else if (is_integer($v)) { - $decl .= "@P$i INT"; - $params .= "@P$i=".$v; - } else if (is_float($v)) { - $decl .= "@P$i FLOAT"; - $params .= "@P$i=".$v; - } else if (is_bool($v)) { - $decl .= "@P$i INT"; # Used INT just in case BIT in not supported on the user's MSSQL version. It will cast appropriately. - $params .= "@P$i=".(($v)?'1':'0'); # True == 1 in MSSQL BIT fields and acceptable for storing logical true in an int field - } else { - $decl .= "@P$i CHAR"; # Used char because a type is required even when the value is to be NULL. - $params .= "@P$i=NULL"; - } - $i += 1; - } - $decl = $this->qstr($decl); - if ($this->debug) ADOConnection::outp("sp_executesql N{$sql[1]},N$decl,$params"); - $rez = mssql_query("sp_executesql N{$sql[1]},N$decl,$params", $this->_connectionID); - - } else if (is_array($sql)) { - # PrepareSP() - $rez = mssql_execute($sql[1]); - - } else { - $rez = mssql_query($sql,$this->_connectionID); - } - return $rez; - } - - // returns true or false - function _close() - { - if ($this->transCnt) $this->RollbackTrans(); - $rez = @mssql_close($this->_connectionID); - $this->_connectionID = false; - return $rez; - } - - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_mssql::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_mssql::UnixTimeStamp($v); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_mssql extends ADORecordSet { - - var $databaseType = "mssql"; - var $canSeek = true; - var $hasFetchAssoc; // see http://phplens.com/lens/lensforum/msgs.php?id=6083 - // _mths works only in non-localised system - - function ADORecordset_mssql($id,$mode=false) - { - // freedts check... - $this->hasFetchAssoc = function_exists('mssql_fetch_assoc'); - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - function _initrs() - { - GLOBAL $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @mssql_num_rows($this->_queryID):-1; - $this->_numOfFields = @mssql_num_fields($this->_queryID); - } - - - //Contributed by "Sven Axelsson" - // get next resultset - requires PHP 4.0.5 or later - function NextRecordSet() - { - if (!mssql_next_result($this->_queryID)) return false; - $this->_inited = false; - $this->bind = false; - $this->_currentRow = -1; - $this->Init(); - return true; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != ADODB_FETCH_NUM) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $f = @mssql_fetch_field($this->_queryID, $fieldOffset); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $f = @mssql_fetch_field($this->_queryID); - } - $false = false; - if (empty($f)) return $false; - return $f; - } - - function _seek($row) - { - return @mssql_data_seek($this->_queryID, $row); - } - - // speedup - function MoveNext() - { - if ($this->EOF) return false; - - $this->_currentRow++; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - if ($this->fetchMode & ADODB_FETCH_NUM) { - //ADODB_FETCH_BOTH mode - $this->fields = @mssql_fetch_array($this->_queryID); - } - else { - if ($this->hasFetchAssoc) {// only for PHP 4.2.0 or later - $this->fields = @mssql_fetch_assoc($this->_queryID); - } else { - $flds = @mssql_fetch_array($this->_queryID); - if (is_array($flds)) { - $fassoc = array(); - foreach($flds as $k => $v) { - if (is_numeric($k)) continue; - $fassoc[$k] = $v; - } - $this->fields = $fassoc; - } else - $this->fields = false; - } - } - - if (is_array($this->fields)) { - if (ADODB_ASSOC_CASE == 0) { - foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; - } - } else if (ADODB_ASSOC_CASE == 1) { - foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; - } - } - } - } else { - $this->fields = @mssql_fetch_row($this->_queryID); - } - if ($this->fields) return true; - $this->EOF = true; - - return false; - } - - - // INSERT UPDATE DELETE returns false even if no error occurs in 4.0.4 - // also the date format has been changed from YYYY-mm-dd to dd MMM YYYY in 4.0.4. Idiot! - function _fetch($ignore_fields=false) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - if ($this->fetchMode & ADODB_FETCH_NUM) { - //ADODB_FETCH_BOTH mode - $this->fields = @mssql_fetch_array($this->_queryID); - } else { - if ($this->hasFetchAssoc) // only for PHP 4.2.0 or later - $this->fields = @mssql_fetch_assoc($this->_queryID); - else { - $this->fields = @mssql_fetch_array($this->_queryID); - if (@is_array($$this->fields)) { - $fassoc = array(); - foreach($$this->fields as $k => $v) { - if (is_integer($k)) continue; - $fassoc[$k] = $v; - } - $this->fields = $fassoc; - } - } - } - - if (!$this->fields) { - } else if (ADODB_ASSOC_CASE == 0) { - foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; - } - } else if (ADODB_ASSOC_CASE == 1) { - foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; - } - } - } else { - $this->fields = @mssql_fetch_row($this->_queryID); - } - return $this->fields; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() - { - $rez = mssql_free_result($this->_queryID); - $this->_queryID = false; - return $rez; - } - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_mssql::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_mssql::UnixTimeStamp($v); - } - -} - - -class ADORecordSet_array_mssql extends ADORecordSet_array { - function ADORecordSet_array_mssql($id=-1,$mode=false) - { - $this->ADORecordSet_array($id,$mode); - } - - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - - if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixDate($v); - - global $ADODB_mssql_mths,$ADODB_mssql_date_order; - - //Dec 30 2000 12:00AM - if ($ADODB_mssql_date_order == 'dmy') { - if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { - return parent::UnixDate($v); - } - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[1]; - $themth = substr(strtoupper($rr[2]),0,3); - } else { - if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { - return parent::UnixDate($v); - } - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[2]; - $themth = substr(strtoupper($rr[1]),0,3); - } - $themth = $ADODB_mssql_mths[$themth]; - if ($themth <= 0) return false; - // h-m-s-MM-DD-YY - return mktime(0,0,0,$themth,$theday,$rr[3]); - } - - function UnixTimeStamp($v) - { - - if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixTimeStamp($v); - - global $ADODB_mssql_mths,$ADODB_mssql_date_order; - - //Dec 30 2000 12:00AM - if ($ADODB_mssql_date_order == 'dmy') { - if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[1]; - $themth = substr(strtoupper($rr[2]),0,3); - } else { - if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[2]; - $themth = substr(strtoupper($rr[1]),0,3); - } - - $themth = $ADODB_mssql_mths[$themth]; - if ($themth <= 0) return false; - - switch (strtoupper($rr[6])) { - case 'P': - if ($rr[4]<12) $rr[4] += 12; - break; - case 'A': - if ($rr[4]==12) $rr[4] = 0; - break; - default: - break; - } - // h-m-s-MM-DD-YY - return mktime($rr[4],$rr[5],0,$themth,$theday,$rr[3]); - } -} - -/* -Code Example 1: - -select object_name(constid) as constraint_name, - object_name(fkeyid) as table_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where object_name(fkeyid) = x -order by constraint_name, table_name, referenced_table_name, keyno - -Code Example 2: -select constraint_name, - column_name, - ordinal_position -from information_schema.key_column_usage -where constraint_catalog = db_name() -and table_name = x -order by constraint_name, ordinal_position - -http://www.databasejournal.com/scripts/article.php/1440551 -*/ - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql_n.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql_n.inc.php.svn-base deleted file mode 100755 index 15001092..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssql_n.inc.php.svn-base +++ /dev/null @@ -1,166 +0,0 @@ -_appendN($sql); - return ADODB_mssql::_query($sql,$inputarr); - } - - /** - * This function will intercept all the literals used in the SQL, prepending the "N" char to them - * in order to allow mssql to store properly data sent in the correct UCS-2 encoding (by freeTDS - * and ODBTP) keeping SQL compatibility at ADOdb level (instead of hacking every project to add - * the "N" notation when working against MSSQL. - * - * Note that this hack only must be used if ALL the char-based columns in your DB are of type nchar, - * nvarchar and ntext - */ - function _appendN($sql) { - - $result = $sql; - - /// Check we have some single quote in the query. Exit ok. - if (strpos($sql, SINGLEQUOTE) === false) { - return $sql; - } - - /// Check we haven't an odd number of single quotes (this can cause problems below - /// and should be considered one wrong SQL). Exit with debug info. - if ((substr_count($sql, SINGLEQUOTE) & 1)) { - if ($this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Wrong number of quotes (odd)"); - } - return $sql; - } - - /// Check we haven't any backslash + single quote combination. It should mean wrong - /// backslashes use (bad magic_quotes_sybase?). Exit with debug info. - $regexp = '/(\\\\' . SINGLEQUOTE . '[^' . SINGLEQUOTE . '])/'; - if (preg_match($regexp, $sql)) { - if ($this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Found bad use of backslash + single quote"); - } - return $sql; - } - - /// Remove pairs of single-quotes - $pairs = array(); - $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/'; - preg_match_all($regexp, $result, $list_of_pairs); - if ($list_of_pairs) { - foreach (array_unique($list_of_pairs[0]) as $key=>$value) { - $pairs['<@#@#@PAIR-'.$key.'@#@#@>'] = $value; - } - if (!empty($pairs)) { - $result = str_replace($pairs, array_keys($pairs), $result); - } - } - - /// Remove the rest of literals present in the query - $literals = array(); - $regexp = '/(N?' . SINGLEQUOTE . '.*?' . SINGLEQUOTE . ')/is'; - preg_match_all($regexp, $result, $list_of_literals); - if ($list_of_literals) { - foreach (array_unique($list_of_literals[0]) as $key=>$value) { - $literals['<#@#@#LITERAL-'.$key.'#@#@#>'] = $value; - } - if (!empty($literals)) { - $result = str_replace($literals, array_keys($literals), $result); - } - } - - /// Analyse literals to prepend the N char to them if their contents aren't numeric - if (!empty($literals)) { - foreach ($literals as $key=>$value) { - if (!is_numeric(trim($value, SINGLEQUOTE))) { - /// Non numeric string, prepend our dear N - $literals[$key] = 'N' . trim($value, 'N'); //Trimming potentially existing previous "N" - } - } - } - - /// Re-apply literals to the text - if (!empty($literals)) { - $result = str_replace(array_keys($literals), $literals, $result); - } - - /// Re-apply pairs of single-quotes to the text - if (!empty($pairs)) { - $result = str_replace(array_keys($pairs), $pairs, $result); - } - - /// Print transformation if debug = on - if ($result != $sql && $this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation:
    {$sql}
    to
    {$result}"); - } - - return $result; - } -} - -class ADORecordset_mssql_n extends ADORecordset_mssql { - var $databaseType = "mssql_n"; - function ADORecordset_mssql_n($id,$mode=false) - { - $this->ADORecordset_mssql($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssqlpo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssqlpo.inc.php.svn-base deleted file mode 100755 index df482860..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mssqlpo.inc.php.svn-base +++ /dev/null @@ -1,62 +0,0 @@ -_has_mssql_init) { - ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); - return $sql; - } - if (is_string($sql)) $sql = str_replace('||','+',$sql); - $stmt = mssql_init($sql,$this->_connectionID); - if (!$stmt) return $sql; - return array($sql,$stmt); - } - - function _query($sql,$inputarr) - { - if (is_string($sql)) $sql = str_replace('||','+',$sql); - return ADODB_mssql::_query($sql,$inputarr); - } -} - -class ADORecordset_mssqlpo extends ADORecordset_mssql { - var $databaseType = "mssqlpo"; - function ADORecordset_mssqlpo($id,$mode=false) - { - $this->ADORecordset_mssql($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysql.inc.php.svn-base deleted file mode 100755 index 14d288e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysql.inc.php.svn-base +++ /dev/null @@ -1,782 +0,0 @@ -rsPrefix .= 'ext_'; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " IFNULL($field, $ifNull) "; // if MySQL - } - - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $rs = $this->Execute(sprintf('SHOW INDEX FROM %s',$table)); - - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return $false; - } - - $indexes = array (); - - // parse index data into array - while ($row = $rs->FetchRow()) { - if ($primary == FALSE AND $row[2] == 'PRIMARY') { - continue; - } - - if (!isset($indexes[$row[2]])) { - $indexes[$row[2]] = array( - 'unique' => ($row[1] == 0), - 'columns' => array() - ); - } - - $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) - { - ksort ($indexes[$index]['columns']); - } - - return $indexes; - } - - - // if magic quotes disabled, use mysql_real_escape_string() - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if (ADODB_PHPVER >= 0x4300) { - if (is_resource($this->_connectionID)) - return "'".mysql_real_escape_string($s,$this->_connectionID)."'"; - } - if ($this->replaceQuote[0] == '\\'){ - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - function _insertid() - { - return ADOConnection::GetOne('SELECT LAST_INSERT_ID()'); - //return mysql_insert_id($this->_connectionID); - } - - function GetOne($sql,$inputarr=false) - { - if ($this->compat323 == false && strncasecmp($sql,'sele',4) == 0) { - $rs =& $this->SelectLimit($sql,1,-1,$inputarr); - if ($rs) { - $rs->Close(); - if ($rs->EOF) return false; - return reset($rs->fields); - } - } else { - return ADOConnection::GetOne($sql,$inputarr); - } - return false; - } - - function BeginTrans() - { - if ($this->debug) ADOConnection::outp("Transactions not supported in 'mysql' driver. Use 'mysqlt' or 'mysqli' driver"); - } - - function _affectedrows() - { - return mysql_affected_rows($this->_connectionID); - } - - // See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html - // Reference on Last_Insert_ID on the recommended way to simulate sequences - var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"; - var $_genSeqSQL = "create table %s (id int not null)"; - var $_genSeq2SQL = "insert into %s values (%s)"; - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - $u = strtoupper($seqname); - - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - } - - - function GenID($seqname='adodbseq',$startID=1) - { - // post-nuke sets hasGenID to false - if (!$this->hasGenID) return false; - - $savelog = $this->_logsql; - $this->_logsql = false; - $getnext = sprintf($this->_genIDSQL,$seqname); - $holdtransOK = $this->_transOK; // save the current status - $rs = @$this->Execute($getnext); - if (!$rs) { - if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset - $u = strtoupper($seqname); - $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - $rs = $this->Execute($getnext); - } - $this->genID = mysql_insert_id($this->_connectionID); - - if ($rs) $rs->Close(); - - $this->_logsql = $savelog; - return $this->genID; - } - - function &MetaDatabases() - { - $qid = mysql_list_dbs($this->_connectionID); - $arr = array(); - $i = 0; - $max = mysql_num_rows($qid); - while ($i < $max) { - $db = mysql_tablename($qid,$i); - if ($db != 'mysql') $arr[] = $db; - $i += 1; - } - return $arr; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'DATE_FORMAT('.$col.",'"; - $concat = false; - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - /** FALL THROUGH */ - case '-': - case '/': - $s .= $ch; - break; - - case 'Y': - case 'y': - $s .= '%Y'; - break; - case 'M': - $s .= '%b'; - break; - - case 'm': - $s .= '%m'; - break; - case 'D': - case 'd': - $s .= '%d'; - break; - - case 'Q': - case 'q': - $s .= "'),Quarter($col)"; - - if ($len > $i+1) $s .= ",DATE_FORMAT($col,'"; - else $s .= ",('"; - $concat = true; - break; - - case 'H': - $s .= '%H'; - break; - - case 'h': - $s .= '%I'; - break; - - case 'i': - $s .= '%i'; - break; - - case 's': - $s .= '%s'; - break; - - case 'a': - case 'A': - $s .= '%p'; - break; - - case 'w': - $s .= '%w'; - break; - - case 'W': - $s .= '%U'; - break; - - case 'l': - $s .= '%W'; - break; - } - } - $s.="')"; - if ($concat) $s = "CONCAT($s)"; - return $s; - } - - - // returns concatenated string - // much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // suggestion by andrew005@mnogo.ru - $s = implode(',',$arr); - if (strlen($s) > 0) return "CONCAT($s)"; - else return ''; - } - - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!empty($this->port)) $argHostname .= ":".$this->port; - - if (ADODB_PHPVER >= 0x4300) - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, - $this->forceNewConnect,$this->clientFlags); - else if (ADODB_PHPVER >= 0x4200) - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, - $this->forceNewConnect); - else - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword); - - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!empty($this->port)) $argHostname .= ":".$this->port; - - if (ADODB_PHPVER >= 0x4300) - $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags); - else - $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($this->autoRollback) $this->RollbackTrans(); - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->forceNewConnect = true; - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); - } - - function &MetaColumns($table) - { - $this->_findschema($table,$schema); - if ($schema) { - $dbName = $this->database; - $this->SelectDB($schema); - } - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($schema) { - $this->SelectDB($dbName); - } - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) { - $false = false; - return $false; - } - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $arr = explode(",",$query_array[2]); - $fld->enums = $arr; - $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6 - $fld->max_length = ($zlen > 0) ? $zlen : 1; - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - // returns true or false - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @mysql_select_db($dbName,$this->_connectionID); - } - else return false; - } - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0) - { - $offsetStr =($offset>=0) ? ((integer)$offset)."," : ''; - // jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220 - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr".((integer)$nrows),$inputarr); - else - $rs =& $this->Execute($sql." LIMIT $offsetStr".((integer)$nrows),$inputarr); - return $rs; - } - - // returns queryID or false - function _query($sql,$inputarr) - { - //global $ADODB_COUNTRECS; - //if($ADODB_COUNTRECS) - return mysql_query($sql,$this->_connectionID); - //else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6 - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - - if ($this->_logsql) return $this->_errorMsg; - if (empty($this->_connectionID)) $this->_errorMsg = @mysql_error(); - else $this->_errorMsg = @mysql_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - if ($this->_logsql) return $this->_errorCode; - if (empty($this->_connectionID)) return @mysql_errno(); - else return @mysql_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - @mysql_close($this->_connectionID); - $this->_connectionID = false; - } - - - /* - * Maximum size of C field - */ - function CharMax() - { - return 255; - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 4294967295; - } - - // "Innox - Juan Carlos Gonzalez" - function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE ) - { - global $ADODB_FETCH_MODE; - if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true; - - if ( !empty($owner) ) { - $table = "$owner.$table"; - } - $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table)); - if ($associative) $create_sql = $a_create_table["Create Table"]; - else $create_sql = $a_create_table[1]; - - $matches = array(); - - if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false; - $foreign_keys = array(); - $num_keys = count($matches[0]); - for ( $i = 0; $i < $num_keys; $i ++ ) { - $my_field = explode('`, `', $matches[1][$i]); - $ref_table = $matches[2][$i]; - $ref_field = explode('`, `', $matches[3][$i]); - - if ( $upper ) { - $ref_table = strtoupper($ref_table); - } - - $foreign_keys[$ref_table] = array(); - $num_fields = count($my_field); - for ( $j = 0; $j < $num_fields; $j ++ ) { - if ( $associative ) { - $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j]; - } else { - $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}"; - } - } - } - - return $foreign_keys; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - - -class ADORecordSet_mysql extends ADORecordSet{ - - var $databaseType = "mysql"; - var $canSeek = true; - - function ADORecordSet_mysql($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - //GLOBAL $ADODB_COUNTRECS; - // $this->_numOfRows = ($ADODB_COUNTRECS) ? @mysql_num_rows($this->_queryID):-1; - $this->_numOfRows = @mysql_num_rows($this->_queryID); - $this->_numOfFields = @mysql_num_fields($this->_queryID); - } - - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $o = @mysql_fetch_field($this->_queryID, $fieldOffset); - $f = @mysql_field_flags($this->_queryID,$fieldOffset); - $o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com) - //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable - $o->binary = (strpos($f,'binary')!== false); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @mysql_fetch_field($this->_queryID); - $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com) - //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable - } - - return $o; - } - - function &GetRowAssoc($upper=true) - { - if ($this->fetchMode == MYSQL_ASSOC && !$upper) $row = $this->fields; - else $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - // added @ by "Michael William Miller" - if ($this->fetchMode != MYSQL_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - if ($this->_numOfRows == 0) return false; - return @mysql_data_seek($this->_queryID,$row); - } - - function MoveNext() - { - //return adodb_movenext($this); - //if (defined('ADODB_EXTENSION')) return adodb_movenext($this); - if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } - - function _fetch() - { - $this->fields = @mysql_fetch_array($this->_queryID,$this->fetchMode); - return is_array($this->fields); - } - - function _close() { - @mysql_free_result($this->_queryID); - $this->_queryID = false; - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'YEAR': - case 'DATE': return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': return 'T'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'TINYINT': - case 'MEDIUMINT': - case 'SMALLINT': - - if (!empty($fieldobj->primary_key)) return 'R'; - else return 'I'; - - default: return 'N'; - } - } - -} - -class ADORecordSet_ext_mysql extends ADORecordSet_mysql { - function ADORecordSet_ext_mysql($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - return @adodb_movenext($this); - } -} - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqli.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqli.inc.php.svn-base deleted file mode 100755 index 96c6eae3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqli.inc.php.svn-base +++ /dev/null @@ -1,1020 +0,0 @@ -_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - // returns true or false - // To add: parameter int $port, - // parameter string $socket - function _connect($argHostname = NULL, - $argUsername = NULL, - $argPassword = NULL, - $argDatabasename = NULL, $persist=false) - { - if(!extension_loaded("mysqli")) { - return null; - } - $this->_connectionID = @mysqli_init(); - - if (is_null($this->_connectionID)) { - // mysqli_init only fails if insufficient memory - if ($this->debug) - ADOConnection::outp("mysqli_init() failed : " . $this->ErrorMsg()); - return false; - } - /* - I suggest a simple fix which would enable adodb and mysqli driver to - read connection options from the standard mysql configuration file - /etc/my.cnf - "Bastien Duclaux" - */ - foreach($this->optionFlags as $arr) { - mysqli_options($this->_connectionID,$arr[0],$arr[1]); - } - - #if (!empty($this->port)) $argHostname .= ":".$this->port; - $ok = mysqli_real_connect($this->_connectionID, - $argHostname, - $argUsername, - $argPassword, - $argDatabasename, - $this->port, - $this->socket, - $this->clientFlags); - - if ($ok) { - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } else { - if ($this->debug) - ADOConnection::outp("Could't connect : " . $this->ErrorMsg()); - return false; - } - } - - // returns true or false - // How to force a persistent connection - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, true); - - } - - // When is this used? Close old connection first? - // In _connect(), check $this->forceNewConnect? - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->forceNewConnect = true; - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); - } - - function IfNull( $field, $ifNull ) - { - return " IFNULL($field, $ifNull) "; // if MySQL - } - - // do not use $ADODB_COUNTRECS - function GetOne($sql,$inputarr=false) - { - $ret = false; - $rs = &$this->Execute($sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - return $ret; - } - - function ServerInfo() - { - $arr['description'] = $this->GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - - //$this->Execute('SET AUTOCOMMIT=0'); - mysqli_autocommit($this->_connectionID, false); - $this->Execute('BEGIN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - - //$this->Execute('SET AUTOCOMMIT=1'); - mysqli_autocommit($this->_connectionID, true); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - //$this->Execute('SET AUTOCOMMIT=1'); - mysqli_autocommit($this->_connectionID, true); - return true; - } - - function RowLock($tables,$where='',$flds='1 as adodb_ignore') - { - if ($this->transCnt==0) $this->BeginTrans(); - if ($where) $where = ' where '.$where; - $rs =& $this->Execute("select $flds from $tables $where for update"); - return !empty($rs); - } - - // if magic quotes disabled, use mysql_real_escape_string() - // From readme.htm: - // Quotes a string to be sent to the database. The $magic_quotes_enabled - // parameter may look funny, but the idea is if you are quoting a - // string extracted from a POST/GET variable, then - // pass get_magic_quotes_gpc() as the second parameter. This will - // ensure that the variable is not quoted twice, once by qstr and once - // by the magic_quotes_gpc. - // - //Eg. $s = $db->qstr(_GET['name'],get_magic_quotes_gpc()); - function qstr($s, $magic_quotes = false) - { - if (!$magic_quotes) { - if (PHP_VERSION >= 5) - return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'"; - - if ($this->replaceQuote[0] == '\\') - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - function _insertid() - { - $result = @mysqli_insert_id($this->_connectionID); - if ($result == -1){ - if ($this->debug) ADOConnection::outp("mysqli_insert_id() failed : " . $this->ErrorMsg()); - } - return $result; - } - - // Only works for INSERT, UPDATE and DELETE query's - function _affectedrows() - { - $result = @mysqli_affected_rows($this->_connectionID); - if ($result == -1) { - if ($this->debug) ADOConnection::outp("mysqli_affected_rows() failed : " . $this->ErrorMsg()); - } - return $result; - } - - // See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html - // Reference on Last_Insert_ID on the recommended way to simulate sequences - var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"; - var $_genSeqSQL = "create table %s (id int not null)"; - var $_genSeq2SQL = "insert into %s values (%s)"; - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - $u = strtoupper($seqname); - - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - } - - function GenID($seqname='adodbseq',$startID=1) - { - // post-nuke sets hasGenID to false - if (!$this->hasGenID) return false; - - $getnext = sprintf($this->_genIDSQL,$seqname); - $holdtransOK = $this->_transOK; // save the current status - $rs = @$this->Execute($getnext); - if (!$rs) { - if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset - $u = strtoupper($seqname); - $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - $rs = $this->Execute($getnext); - } - $this->genID = mysqli_insert_id($this->_connectionID); - - if ($rs) $rs->Close(); - - return $this->genID; - } - - function &MetaDatabases() - { - $query = "SHOW DATABASES"; - $ret =& $this->Execute($query); - if ($ret && is_object($ret)){ - $arr = array(); - while (!$ret->EOF){ - $db = $ret->Fields('Database'); - if ($db != 'mysql') $arr[] = $db; - $ret->MoveNext(); - } - return $arr; - } - return $ret; - } - - - function &MetaIndexes ($table, $primary = FALSE) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table)); - - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return $false; - } - - $indexes = array (); - - // parse index data into array - while ($row = $rs->FetchRow()) { - if ($primary == FALSE AND $row[2] == 'PRIMARY') { - continue; - } - - if (!isset($indexes[$row[2]])) { - $indexes[$row[2]] = array( - 'unique' => ($row[1] == 0), - 'columns' => array() - ); - } - - $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) - { - ksort ($indexes[$index]['columns']); - } - - return $indexes; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'DATE_FORMAT('.$col.",'"; - $concat = false; - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= '%Y'; - break; - case 'Q': - case 'q': - $s .= "'),Quarter($col)"; - - if ($len > $i+1) $s .= ",DATE_FORMAT($col,'"; - else $s .= ",('"; - $concat = true; - break; - case 'M': - $s .= '%b'; - break; - - case 'm': - $s .= '%m'; - break; - case 'D': - case 'd': - $s .= '%d'; - break; - - case 'H': - $s .= '%H'; - break; - - case 'h': - $s .= '%I'; - break; - - case 'i': - $s .= '%i'; - break; - - case 's': - $s .= '%s'; - break; - - case 'a': - case 'A': - $s .= '%p'; - break; - - case 'w': - $s .= '%w'; - break; - - case 'l': - $s .= '%W'; - break; - - default: - - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $ch; - break; - } - } - $s.="')"; - if ($concat) $s = "CONCAT($s)"; - return $s; - } - - // returns concatenated string - // much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // suggestion by andrew005@mnogo.ru - $s = implode(',',$arr); - if (strlen($s) > 0) return "CONCAT($s)"; - else return ''; - } - - // dayFraction is a day in floating point - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - // "Innox - Juan Carlos Gonzalez" - function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE ) - { - global $ADODB_FETCH_MODE; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true; - - if ( !empty($owner) ) { - $table = "$owner.$table"; - } - $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table)); - if ($associative) $create_sql = $a_create_table["Create Table"]; - else $create_sql = $a_create_table[1]; - - $matches = array(); - - if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false; - $foreign_keys = array(); - $num_keys = count($matches[0]); - for ( $i = 0; $i < $num_keys; $i ++ ) { - $my_field = explode('`, `', $matches[1][$i]); - $ref_table = $matches[2][$i]; - $ref_field = explode('`, `', $matches[3][$i]); - - if ( $upper ) { - $ref_table = strtoupper($ref_table); - } - - $foreign_keys[$ref_table] = array(); - $num_fields = count($my_field); - for ( $j = 0; $j < $num_fields; $j ++ ) { - if ( $associative ) { - $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j]; - } else { - $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}"; - } - } - } - - return $foreign_keys; - } - - function &MetaColumns($table) - { - $false = false; - if (!$this->metaColumnsSQL) - return $false; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) - $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) - return $false; - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = max(array_map("strlen",explode(",",$query_array[2]))) - 2; // PHP >= 4.0.6 - $fld->max_length = ($fld->max_length == 0 ? 1 : $fld->max_length); - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - // returns true or false - function SelectDB($dbName) - { -// $this->_connectionID = $this->mysqli_resolve_link($this->_connectionID); - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - - if ($this->_connectionID) { - $result = @mysqli_select_db($this->_connectionID, $dbName); - if (!$result) { - ADOConnection::outp("Select of database " . $dbName . " failed. " . $this->ErrorMsg()); - } - return $result; - } - return false; - } - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql, - $nrows = -1, - $offset = -1, - $inputarr = false, - $arg3 = false, - $secs = 0) - { - $offsetStr = ($offset >= 0) ? "$offset," : ''; - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs, $sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3); - else - $rs =& $this->Execute($sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3); - - return $rs; - } - - - function Prepare($sql) - { - return $sql; - - $stmt = $this->_connectionID->prepare($sql); - if (!$stmt) { - echo $this->ErrorMsg(); - return $sql; - } - return array($sql,$stmt); - } - - - // returns queryID or false - function _query($sql, $inputarr) - { - global $ADODB_COUNTRECS; - - if (is_array($sql)) { - $stmt = $sql[1]; - $a = ''; - foreach($inputarr as $k => $v) { - if (is_string($v)) $a .= 's'; - else if (is_integer($v)) $a .= 'i'; - else $a .= 'd'; - } - - $fnarr = array_merge( array($stmt,$a) , $inputarr); - $ret = call_user_func_array('mysqli_stmt_bind_param',$fnarr); - - $ret = mysqli_stmt_execute($stmt); - return $ret; - } - if (!$mysql_res = mysqli_query($this->_connectionID, $sql, ($ADODB_COUNTRECS) ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT)) { - if ($this->debug) ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg()); - return false; - } - - return $mysql_res; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - if (empty($this->_connectionID)) - $this->_errorMsg = @mysqli_connect_error(); - else - $this->_errorMsg = @mysqli_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - if (empty($this->_connectionID)) - return @mysqli_connect_errno(); - else - return @mysqli_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - @mysqli_close($this->_connectionID); - $this->_connectionID = false; - } - - /* - * Maximum size of C field - */ - function CharMax() - { - return 255; - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 4294967295; - } - - - - // this is a set of functions for managing client encoding - very important if the encodings - // of your database and your output target (i.e. HTML) don't match - // for instance, you may have UTF8 database and server it on-site as latin1 etc. - // GetCharSet - get the name of the character set the client is using now - // Under Windows, the functions should work with MySQL 4.1.11 and above, the set of charsets supported - // depends on compile flags of mysql distribution - - function GetCharSet() - { - //we will use ADO's builtin property charSet - if (!method_exists($this->_connectionID,'character_set_name')) - return false; - - $this->charSet = @$this->_connectionID->character_set_name(); - if (!$this->charSet) { - return false; - } else { - return $this->charSet; - } - } - - // SetCharSet - switch the client encoding - function SetCharSet($charset_name) - { - if (!method_exists($this->_connectionID,'set_charset')) - return false; - - if ($this->charSet !== $charset_name) { - $if = @$this->_connectionID->set_charset($charset_name); - if ($if == "0" & $this->GetCharSet() == $charset_name) { - return true; - } else return false; - } else return true; - } - - - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_mysqli extends ADORecordSet{ - - var $databaseType = "mysqli"; - var $canSeek = true; - - function ADORecordSet_mysqli($queryID, $mode = false) - { - if ($mode === false) - { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - - switch ($mode) - { - case ADODB_FETCH_NUM: - $this->fetchMode = MYSQLI_NUM; - break; - case ADODB_FETCH_ASSOC: - $this->fetchMode = MYSQLI_ASSOC; - break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQLI_BOTH; - break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - global $ADODB_COUNTRECS; - - $this->_numOfRows = $ADODB_COUNTRECS ? @mysqli_num_rows($this->_queryID) : -1; - $this->_numOfFields = @mysqli_num_fields($this->_queryID); - } - -/* -1 = MYSQLI_NOT_NULL_FLAG -2 = MYSQLI_PRI_KEY_FLAG -4 = MYSQLI_UNIQUE_KEY_FLAG -8 = MYSQLI_MULTIPLE_KEY_FLAG -16 = MYSQLI_BLOB_FLAG -32 = MYSQLI_UNSIGNED_FLAG -64 = MYSQLI_ZEROFILL_FLAG -128 = MYSQLI_BINARY_FLAG -256 = MYSQLI_ENUM_FLAG -512 = MYSQLI_AUTO_INCREMENT_FLAG -1024 = MYSQLI_TIMESTAMP_FLAG -2048 = MYSQLI_SET_FLAG -32768 = MYSQLI_NUM_FLAG -16384 = MYSQLI_PART_KEY_FLAG -32768 = MYSQLI_GROUP_FLAG -65536 = MYSQLI_UNIQUE_FLAG -131072 = MYSQLI_BINCMP_FLAG -*/ - - function &FetchField($fieldOffset = -1) - { - $fieldnr = $fieldOffset; - if ($fieldOffset != -1) { - $fieldOffset = mysqli_field_seek($this->_queryID, $fieldnr); - } - $o = mysqli_fetch_field($this->_queryID); - /* Properties of an ADOFieldObject as set by MetaColumns */ - $o->primary_key = $o->flags & MYSQLI_PRI_KEY_FLAG; - $o->not_null = $o->flags & MYSQLI_NOT_NULL_FLAG; - $o->auto_increment = $o->flags & MYSQLI_AUTO_INCREMENT_FLAG; - $o->binary = $o->flags & MYSQLI_BINARY_FLAG; - // $o->blob = $o->flags & MYSQLI_BLOB_FLAG; /* not returned by MetaColumns */ - $o->unsigned = $o->flags & MYSQLI_UNSIGNED_FLAG; - - return $o; - } - - function &GetRowAssoc($upper = true) - { - if ($this->fetchMode == MYSQLI_ASSOC && !$upper) - return $this->fields; - $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != MYSQLI_NUM) - return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i = 0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - if ($this->_numOfRows == 0) - return false; - - if ($row < 0) - return false; - - mysqli_data_seek($this->_queryID, $row); - $this->EOF = false; - return true; - } - - // 10% speedup to move MoveNext to child class - // This is the only implementation that works now (23-10-2003). - // Other functions return no or the wrong results. - function MoveNext() - { - if ($this->EOF) return false; - $this->_currentRow++; - $this->fields = @mysqli_fetch_array($this->_queryID,$this->fetchMode); - - if (is_array($this->fields)) return true; - $this->EOF = true; - return false; - } - - function _fetch() - { - $this->fields = mysqli_fetch_array($this->_queryID,$this->fetchMode); - return is_array($this->fields); - } - - function _close() - { - mysqli_free_result($this->_queryID); - $this->_queryID = false; - } - -/* - -0 = MYSQLI_TYPE_DECIMAL -1 = MYSQLI_TYPE_CHAR -1 = MYSQLI_TYPE_TINY -2 = MYSQLI_TYPE_SHORT -3 = MYSQLI_TYPE_LONG -4 = MYSQLI_TYPE_FLOAT -5 = MYSQLI_TYPE_DOUBLE -6 = MYSQLI_TYPE_NULL -7 = MYSQLI_TYPE_TIMESTAMP -8 = MYSQLI_TYPE_LONGLONG -9 = MYSQLI_TYPE_INT24 -10 = MYSQLI_TYPE_DATE -11 = MYSQLI_TYPE_TIME -12 = MYSQLI_TYPE_DATETIME -13 = MYSQLI_TYPE_YEAR -14 = MYSQLI_TYPE_NEWDATE -247 = MYSQLI_TYPE_ENUM -248 = MYSQLI_TYPE_SET -249 = MYSQLI_TYPE_TINY_BLOB -250 = MYSQLI_TYPE_MEDIUM_BLOB -251 = MYSQLI_TYPE_LONG_BLOB -252 = MYSQLI_TYPE_BLOB -253 = MYSQLI_TYPE_VAR_STRING -254 = MYSQLI_TYPE_STRING -255 = MYSQLI_TYPE_GEOMETRY -*/ - - function MetaType($t, $len = -1, $fieldobj = false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - - case MYSQLI_TYPE_TINY_BLOB : - case MYSQLI_TYPE_CHAR : - case MYSQLI_TYPE_STRING : - case MYSQLI_TYPE_ENUM : - case MYSQLI_TYPE_SET : - case 253 : - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - - case MYSQLI_TYPE_BLOB : - case MYSQLI_TYPE_LONG_BLOB : - case MYSQLI_TYPE_MEDIUM_BLOB : - - return !empty($fieldobj->binary) ? 'B' : 'X'; - case 'YEAR': - case 'DATE': - case MYSQLI_TYPE_DATE : - case MYSQLI_TYPE_YEAR : - - return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - - case MYSQLI_TYPE_DATETIME : - case MYSQLI_TYPE_NEWDATE : - case MYSQLI_TYPE_TIME : - case MYSQLI_TYPE_TIMESTAMP : - - return 'T'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'TINYINT': - case 'MEDIUMINT': - case 'SMALLINT': - - case MYSQLI_TYPE_INT24 : - case MYSQLI_TYPE_LONG : - case MYSQLI_TYPE_LONGLONG : - case MYSQLI_TYPE_SHORT : - case MYSQLI_TYPE_TINY : - - if (!empty($fieldobj->primary_key)) return 'R'; - - return 'I'; - - - // Added floating-point types - // Maybe not necessery. - case 'FLOAT': - case 'DOUBLE': - // case 'DOUBLE PRECISION': - case 'DECIMAL': - case 'DEC': - case 'FIXED': - default: - //if (!is_numeric($t)) echo "

    --- Error in type matching $t -----

    "; - return 'N'; - } - } // function - - -} // rs class - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqlt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqlt.inc.php.svn-base deleted file mode 100755 index 9f1b53a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-mysqlt.inc.php.svn-base +++ /dev/null @@ -1,155 +0,0 @@ - - - Requires mysql client. Works on Windows and Unix. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -include_once(ADODB_DIR."/drivers/adodb-mysql.inc.php"); - - -class ADODB_mysqlt extends ADODB_mysql { - var $databaseType = 'mysqlt'; - var $ansiOuter = true; // for Version 3.23.17 or later - var $hasTransactions = true; - var $autoRollback = true; // apparently mysql does not autorollback properly - - function ADODB_mysqlt() - { - global $ADODB_EXTENSION; if ($ADODB_EXTENSION) $this->rsPrefix .= 'ext_'; - } - - /* set transaction mode - - SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL -{ READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } - - */ - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('SET AUTOCOMMIT=0'); - $this->Execute('BEGIN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - $this->Execute('SET AUTOCOMMIT=1'); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - $this->Execute('SET AUTOCOMMIT=1'); - return true; - } - - function RowLock($tables,$where='',$flds='1 as adodb_ignore') - { - if ($this->transCnt==0) $this->BeginTrans(); - if ($where) $where = ' where '.$where; - $rs =& $this->Execute("select $flds from $tables $where for update"); - return !empty($rs); - } - -} - -class ADORecordSet_mysqlt extends ADORecordSet_mysql{ - var $databaseType = "mysqlt"; - - function ADORecordSet_mysqlt($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = MYSQL_BOTH; break; - } - - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } -} - -class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt { - - function ADORecordSet_ext_mysqlt($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - return adodb_movenext($this); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-netezza.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-netezza.inc.php.svn-base deleted file mode 100755 index eedf51df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-netezza.inc.php.svn-base +++ /dev/null @@ -1,170 +0,0 @@ - 0 ORDER BY attnum"; - var $metaColumnsSQL1 = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum"; - // netezza doesn't have keys. it does have distributions, so maybe this is - // something that can be pulled from the system tables - var $metaKeySQL = ""; - var $hasAffectedRows = true; - var $hasLimit = true; - var $true = 't'; // string that represents TRUE for a database - var $false = 'f'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $ansiOuter = true; - var $autoRollback = true; // apparently pgsql does not autorollback properly before 4.3.4 - // http://bugs.php.net/bug.php?id=25404 - - - function ADODB_netezza() - { - - } - - function &MetaColumns($table,$upper=true) - { - - // Changed this function to support Netezza which has no concept of keys - // could posisbly work on other things from the system table later. - - global $ADODB_FETCH_MODE; - - $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) return false; - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - - // since we're returning type and length as one string, - // split them out here. - - if ($first = strstr($rs->fields[1], "(")) { - $fld->max_length = trim($first, "()"); - } else { - $fld->max_length = -1; - } - - if ($first = strpos($rs->fields[1], "(")) { - $fld->type = substr($rs->fields[1], 0, $first); - } else { - $fld->type = $rs->fields[1]; - } - - switch ($fld->type) { - case "byteint": - case "boolean": - $fld->max_length = 1; - break; - case "smallint": - $fld->max_length = 2; - break; - case "integer": - case "numeric": - case "date": - $fld->max_length = 4; - break; - case "bigint": - case "time": - case "timestamp": - $fld->max_length = 8; - break; - case "timetz": - case "time with time zone": - $fld->max_length = 12; - break; - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($upper) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_netezza extends ADORecordSet_postgres64 -{ - var $databaseType = "netezza"; - var $canSeek = true; - - function ADORecordSet_netezza($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = PGSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - // _initrs modified to disable blob handling - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($this->_queryID):-1; - $this->_numOfFields = @pg_numfields($this->_queryID); - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8.inc.php.svn-base deleted file mode 100755 index 3681876f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8.inc.php.svn-base +++ /dev/null @@ -1,1512 +0,0 @@ - - - 13 Nov 2000 jlim - removed all ora_* references. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -/* -NLS_Date_Format -Allows you to use a date format other than the Oracle Lite default. When a literal -character string appears where a date value is expected, the Oracle Lite database -tests the string to see if it matches the formats of Oracle, SQL-92, or the value -specified for this parameter in the POLITE.INI file. Setting this parameter also -defines the default format used in the TO_CHAR or TO_DATE functions when no -other format string is supplied. - -For Oracle the default is dd-mon-yy or dd-mon-yyyy, and for SQL-92 the default is -yy-mm-dd or yyyy-mm-dd. - -Using 'RR' in the format forces two-digit years less than or equal to 49 to be -interpreted as years in the 21st century (20002049), and years over 50 as years in -the 20th century (19501999). Setting the RR format as the default for all two-digit -year entries allows you to become year-2000 compliant. For example: -NLS_DATE_FORMAT='RR-MM-DD' - -You can also modify the date format using the ALTER SESSION command. -*/ - -# define the LOB descriptor type for the given type -# returns false if no LOB descriptor -function oci_lob_desc($type) { - switch ($type) { - case OCI_B_BFILE: $result = OCI_D_FILE; break; - case OCI_B_CFILEE: $result = OCI_D_FILE; break; - case OCI_B_CLOB: $result = OCI_D_LOB; break; - case OCI_B_BLOB: $result = OCI_D_LOB; break; - case OCI_B_ROWID: $result = OCI_D_ROWID; break; - default: $result = false; break; - } - return $result; -} - -class ADODB_oci8 extends ADOConnection { - var $databaseType = 'oci8'; - var $dataProvider = 'oci8'; - var $replaceQuote = "''"; // string to use to replace quotes - var $concat_operator='||'; - var $sysDate = "TRUNC(SYSDATE)"; - var $sysTimeStamp = 'SYSDATE'; - var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1"; - var $_stmt; - var $_commit = OCI_COMMIT_ON_SUCCESS; - var $_initdate = true; // init date to YYYY-MM-DD - var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"; // bin$ tables are recycle bin tables - var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net - var $_bindInputArray = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL"; - var $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $hasAffectedRows = true; - var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)"; - var $noNullStrings = false; - var $connectSID = false; - var $_bind = false; - var $_nestedSQL = true; - var $_hasOCIFetchStatement = false; - var $_getarray = false; // currently not working - var $leftOuter = ''; // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER - var $session_sharing_force_blob = false; // alter session on updateblob if set to true - var $firstrows = true; // enable first rows optimization on SelectLimit() - var $selectOffsetAlg1 = 100; // when to use 1st algorithm of selectlimit. - var $NLS_DATE_FORMAT = 'YYYY-MM-DD'; // To include time, use 'RRRR-MM-DD HH24:MI:SS' - var $useDBDateFormatForTextInput=false; - var $datetime = false; // MetaType('DATE') returns 'D' (datetime==false) or 'T' (datetime == true) - var $_refLOBs = array(); - - // var $ansiOuter = true; // if oracle9 - - function ADODB_oci8() - { - $this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200; - if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_'; - } - - /* Function &MetaColumns($table) added by smondino@users.sourceforge.net*/ - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!$rs) { - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->scale = $rs->fields[3]; - if ($rs->fields[1] == 'NUMBER') { - if ($rs->fields[3] == 0) $fld->type = 'INT'; - $fld->max_length = $rs->fields[4]; - } - $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0); - $fld->binary = (strpos($fld->type,'BLOB') !== false); - $fld->default_value = $rs->fields[6]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - } - - function Time() - { - $rs =& $this->Execute("select TO_CHAR($this->sysTimeStamp,'YYYY-MM-DD HH24:MI:SS') from dual"); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - -/* - - Multiple modes of connection are supported: - - a. Local Database - $conn->Connect(false,'scott','tiger'); - - b. From tnsnames.ora - $conn->Connect(false,'scott','tiger',$tnsname); - $conn->Connect($tnsname,'scott','tiger'); - - c. Server + service name - $conn->Connect($serveraddress,'scott,'tiger',$service_name); - - d. Server + SID - $conn->connectSID = true; - $conn->Connect($serveraddress,'scott,'tiger',$SID); - - -Example TNSName: ---------------- -NATSOFT.DOMAIN = - (DESCRIPTION = - (ADDRESS_LIST = - (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523)) - ) - (CONNECT_DATA = - (SERVICE_NAME = natsoft.domain) - ) - ) - - There are 3 connection modes, 0 = non-persistent, 1 = persistent, 2 = force new connection - -*/ - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0) - { - if (!function_exists('OCIPLogon')) return null; - - - $this->_errorMsg = false; - $this->_errorCode = false; - - if($argHostname) { // added by Jorma Tuomainen - if (empty($argDatabasename)) $argDatabasename = $argHostname; - else { - if(strpos($argHostname,":")) { - $argHostinfo=explode(":",$argHostname); - $argHostname=$argHostinfo[0]; - $argHostport=$argHostinfo[1]; - } else { - $argHostport = empty($this->port)? "1521" : $this->port; - } - - if ($this->connectSID) { - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))"; - } else - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; - } - } - - //if ($argHostname) print "

    Connect: 1st argument should be left blank for $this->databaseType

    "; - if ($mode==1) { - $this->_connectionID = ($this->charSet) ? - OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCIPLogon($argUsername,$argPassword, $argDatabasename) - ; - if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID); - } else if ($mode==2) { - $this->_connectionID = ($this->charSet) ? - OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCINLogon($argUsername,$argPassword, $argDatabasename); - - } else { - $this->_connectionID = ($this->charSet) ? - OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCILogon($argUsername,$argPassword, $argDatabasename); - } - if (!$this->_connectionID) return false; - if ($this->_initdate) { - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'"); - } - - // looks like: - // Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production - // $vers = OCIServerVersion($this->_connectionID); - // if (strpos($vers,'8i') !== false) $this->ansiOuter = true; - return true; - } - - function ServerInfo() - { - $arr['compat'] = $this->GetOne('select value from sys.database_compatible_level'); - $arr['description'] = @OCIServerVersion($this->_connectionID); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,1); - } - - // returns true or false - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,2); - } - - function _affectedrows() - { - if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt); - return 0; - } - - function IfNull( $field, $ifNull ) - { - return " NVL($field, $ifNull) "; // if Oracle - } - - // format and return date string in database date format - function DBDate($d) - { - if (empty($d) && $d !== 0) return 'null'; - - if (is_string($d)) $d = ADORecordSet::UnixDate($d); - return "TO_DATE(".adodb_date($this->fmtDate,$d).",'".$this->NLS_DATE_FORMAT."')"; - } - - function BindDate($d) - { - $d = ADOConnection::DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = ADOConnection::DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')"; - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->autoCommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtoupper($mask)); - $this->metaTablesSQL .= " AND upper(table_name) like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - // Mark Newnham - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $table = strtoupper($table); - - // get Primary index - $primary_key = ''; - - $false = false; - $rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table)); - if ($row = $rs->FetchRow()) - $primary_key = $row[1]; //constraint_name - - if ($primary==TRUE && $primary_key=='') { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; //There is no primary key - } - - $rs = $this->Execute(sprintf("SELECT ALL_INDEXES.INDEX_NAME, ALL_INDEXES.UNIQUENESS, ALL_IND_COLUMNS.COLUMN_POSITION, ALL_IND_COLUMNS.COLUMN_NAME FROM ALL_INDEXES,ALL_IND_COLUMNS WHERE UPPER(ALL_INDEXES.TABLE_NAME)='%s' AND ALL_IND_COLUMNS.INDEX_NAME=ALL_INDEXES.INDEX_NAME",$table)); - - - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array (); - // parse index data into array - - while ($row = $rs->FetchRow()) { - if ($primary && $row[0] != $primary_key) continue; - if (!isset($indexes[$row[0]])) { - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 'UNIQUE'), - 'columns' => array() - ); - } - $indexes[$row[0]]['columns'][$row[2] - 1] = $row[3]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) { - ksort ($indexes[$index]['columns']); - } - - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_commit = OCI_DEFAULT; - - if ($this->_transmode) $this->Execute("SET TRANSACTION ".$this->_transmode); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $ret = OCIcommit($this->_connectionID); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - $this->autoCommit = true; - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = OCIrollback($this->_connectionID); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - $this->autoCommit = true; - return $ret; - } - - - function SelectDB($dbName) - { - return false; - } - - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - - if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt); - if (empty($arr)) { - if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID); - else $arr = @OCIError(); - if ($arr === false) return ''; - } - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - return $this->_errorMsg; - } - - function ErrorNo() - { - if ($this->_errorCode !== false) return $this->_errorCode; - - if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt); - if (empty($arr)) { - $arr = @OCIError($this->_connectionID); - if ($arr == false) $arr = @OCIError(); - if ($arr == false) return ''; - } - - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - - return $arr['code']; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'TO_CHAR('.$col.",'"; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= 'YYYY'; - break; - case 'Q': - case 'q': - $s .= 'Q'; - break; - - case 'M': - $s .= 'Mon'; - break; - - case 'm': - $s .= 'MM'; - break; - case 'D': - case 'd': - $s .= 'DD'; - break; - - case 'H': - $s.= 'HH24'; - break; - - case 'h': - $s .= 'HH'; - break; - - case 'i': - $s .= 'MI'; - break; - - case 's': - $s .= 'SS'; - break; - - case 'a': - case 'A': - $s .= 'AM'; - break; - - case 'w': - $s .= 'D'; - break; - - case 'l': - $s .= 'DAY'; - break; - - case 'W': - $s .= 'WW'; - break; - - default: - // handle escape characters... - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - if (strpos('-/.:;, ',$ch) !== false) $s .= $ch; - else $s .= '"'.$ch.'"'; - - } - } - return $s. "')"; - } - - - /* - This algorithm makes use of - - a. FIRST_ROWS hint - The FIRST_ROWS hint explicitly chooses the approach to optimize response time, - that is, minimum resource usage to return the first row. Results will be returned - as soon as they are identified. - - b. Uses rownum tricks to obtain only the required rows from a given offset. - As this uses complicated sql statements, we only use this if the $offset >= 100. - This idea by Tomas V V Cox. - - This implementation does not appear to work with oracle 8.0.5 or earlier. Comment - out this function then, and the slower SelectLimit() in the base class will be used. - */ - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // seems that oracle only supports 1 hint comment in 8i - if ($this->firstrows) { - if (strpos($sql,'/*+') !== false) - $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql); - else - $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql); - } - - if ($offset < $this->selectOffsetAlg1) { - if ($nrows > 0) { - if ($offset > 0) $nrows += $offset; - //$inputarr['adodb_rownum'] = $nrows; - if ($this->databaseType == 'oci8po') { - $sql = "select * from (".$sql.") where rownum <= ?"; - } else { - $sql = "select * from (".$sql.") where rownum <= :adodb_offset"; - } - $inputarr['adodb_offset'] = $nrows; - $nrows = -1; - } - // note that $nrows = 0 still has to work ==> no rows returned - - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $rs; - - } else { - // Algorithm by Tomas V V Cox, from PEAR DB oci8.php - - // Let Oracle return the name of the columns - $q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL"; - - $false = false; - if (! $stmt_arr = $this->Prepare($q_fields)) { - return $false; - } - $stmt = $stmt_arr[1]; - - if (is_array($inputarr)) { - foreach($inputarr as $k => $v) { - if (is_array($v)) { - if (sizeof($v) == 2) // suggested by g.giunta@libero. - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]); - else - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]); - } else { - $len = -1; - if ($v === ' ') $len = 1; - if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again - $bindarr[$k] = $v; - } else { // dynamic sql, so rebind every time - OCIBindByName($stmt,":$k",$inputarr[$k],$len); - } - } - } - } - - if (!OCIExecute($stmt, OCI_DEFAULT)) { - OCIFreeStatement($stmt); - return $false; - } - - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $cols[] = '"'.OCIColumnName($stmt, $i).'"'; - } - $result = false; - - OCIFreeStatement($stmt); - $fields = implode(',', $cols); - $nrows += $offset; - $offset += 1; // in Oracle rownum starts at 1 - - if ($this->databaseType == 'oci8po') { - $sql = "SELECT $fields FROM". - "(SELECT rownum as adodb_rownum, $fields FROM". - " ($sql) WHERE rownum <= ?". - ") WHERE adodb_rownum >= ?"; - } else { - $sql = "SELECT $fields FROM". - "(SELECT rownum as adodb_rownum, $fields FROM". - " ($sql) WHERE rownum <= :adodb_nrows". - ") WHERE adodb_rownum >= :adodb_offset"; - } - $inputarr['adodb_nrows'] = $nrows; - $inputarr['adodb_offset'] = $offset; - - if ($secs2cache>0) $rs =& $this->CacheExecute($secs2cache, $sql,$inputarr); - else $rs =& $this->Execute($sql,$inputarr); - return $rs; - } - - } - - /** - * Usage: - * Store BLOBs and CLOBs - * - * Example: to store $var in a blob - * - * $conn->Execute('insert into TABLE (id,ablob) values(12,empty_blob())'); - * $conn->UpdateBlob('TABLE', 'ablob', $varHoldingBlob, 'ID=12', 'BLOB'); - * - * $blobtype supports 'BLOB' and 'CLOB', but you need to change to 'empty_clob()'. - * - * to get length of LOB: - * select DBMS_LOB.GETLENGTH(ablob) from TABLE - * - * If you are using CURSOR_SHARING = force, it appears this will case a segfault - * under oracle 8.1.7.0. Run: - * $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); - * before UpdateBlob() then... - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - //if (strlen($val) < 4000) return $this->Execute("UPDATE $table SET $column=:blob WHERE $where",array('blob'=>$val)) != false; - - switch(strtoupper($blobtype)) { - default: ADOConnection::outp("UpdateBlob: Unknown blobtype=$blobtype"); return false; - case 'BLOB': $type = OCI_B_BLOB; break; - case 'CLOB': $type = OCI_B_CLOB; break; - } - - if ($this->databaseType == 'oci8po') - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?"; - else - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob"; - - $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB); - $arr['blob'] = array($desc,-1,$type); - if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); - $commit = $this->autoCommit; - if ($commit) $this->BeginTrans(); - $rs = $this->_Execute($sql,$arr); - if ($rez = !empty($rs)) $desc->save($val); - $desc->free(); - if ($commit) $this->CommitTrans(); - if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=FORCE'); - - if ($rez) $rs->Close(); - return $rez; - } - - /** - * Usage: store file pointed to by $var in a blob - */ - function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB') - { - switch(strtoupper($blobtype)) { - default: ADOConnection::outp( "UpdateBlob: Unknown blobtype=$blobtype"); return false; - case 'BLOB': $type = OCI_B_BLOB; break; - case 'CLOB': $type = OCI_B_CLOB; break; - } - - if ($this->databaseType == 'oci8po') - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?"; - else - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob"; - - $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB); - $arr['blob'] = array($desc,-1,$type); - - $this->BeginTrans(); - $rs = ADODB_oci8::Execute($sql,$arr); - if ($rez = !empty($rs)) $desc->savefile($val); - $desc->free(); - $this->CommitTrans(); - - if ($rez) $rs->Close(); - return $rez; - } - - /** - * Execute SQL - * - * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text) - * @param [inputarr] holds the input data to bind to. Null elements will be set to null. - * @return RecordSet or false - */ - function &Execute($sql,$inputarr=false) - { - if ($this->fnExecute) { - $fn = $this->fnExecute; - $ret =& $fn($this,$sql,$inputarr); - if (isset($ret)) return $ret; - } - if ($inputarr) { - #if (!is_array($inputarr)) $inputarr = array($inputarr); - - $element0 = reset($inputarr); - - # is_object check because oci8 descriptors can be passed in - if (is_array($element0) && !is_object(reset($element0))) { - if (is_string($sql)) - $stmt = $this->Prepare($sql); - else - $stmt = $sql; - - foreach($inputarr as $arr) { - $ret =& $this->_Execute($stmt,$arr); - if (!$ret) return $ret; - } - } else { - $ret =& $this->_Execute($sql,$inputarr); - } - - } else { - $ret =& $this->_Execute($sql,false); - } - - return $ret; - } - - /* - Example of usage: - - $stmt = $this->Prepare('insert into emp (empno, ename) values (:empno, :ename)'); - */ - function Prepare($sql,$cursor=false) - { - static $BINDNUM = 0; - - $stmt = OCIParse($this->_connectionID,$sql); - - if (!$stmt) { - $this->_errorMsg = false; - $this->_errorCode = false; - $arr = @OCIError($this->_connectionID); - if ($arr === false) return false; - - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - return false; - } - - $BINDNUM += 1; - - $sttype = @OCIStatementType($stmt); - if ($sttype == 'BEGIN' || $sttype == 'DECLARE') { - return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false); - } - return array($sql,$stmt,0,$BINDNUM); - } - - /* - Call an oracle stored procedure and returns a cursor variable as a recordset. - Concept by Robert Tuttle robert@ud.com - - Example: - Note: we return a cursor variable in :RS2 - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS2); END;",'RS2'); - - $rs = $db->ExecuteCursor( - "BEGIN :RS2 = adodb.getdata(:VAR1); END;", - 'RS2', - array('VAR1' => 'Mr Bean')); - - */ - function &ExecuteCursor($sql,$cursorName='rs',$params=false) - { - if (is_array($sql)) $stmt = $sql; - else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor - - if (is_array($stmt) && sizeof($stmt) >= 5) { - $hasref = true; - $ignoreCur = false; - $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR); - if ($params) { - foreach($params as $k => $v) { - $this->Parameter($stmt,$params[$k], $k); - } - } - } else - $hasref = false; - - $rs =& $this->Execute($stmt); - if ($rs) { - if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]); - else if ($hasref) $rs->_refcursor = $stmt[4]; - } - return $rs; - } - - /* - Bind a variable -- very, very fast for executing repeated statements in oracle. - Better than using - for ($i = 0; $i < $max; $i++) { - $p1 = ?; $p2 = ?; $p3 = ?; - $this->Execute("insert into table (col0, col1, col2) values (:0, :1, :2)", - array($p1,$p2,$p3)); - } - - Usage: - $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)"); - $DB->Bind($stmt, $p1); - $DB->Bind($stmt, $p2); - $DB->Bind($stmt, $p3); - for ($i = 0; $i < $max; $i++) { - $p1 = ?; $p2 = ?; $p3 = ?; - $DB->Execute($stmt); - } - - Some timings: - ** Test table has 3 cols, and 1 index. Test to insert 1000 records - Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute - Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute - Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute - - Now if PHP only had batch/bulk updating like Java or PL/SQL... - - Note that the order of parameters differs from OCIBindByName, - because we default the names to :0, :1, :2 - */ - function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false) - { - - if (!is_array($stmt)) return false; - - if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) { - return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type); - } - - if ($name == false) { - if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type); - else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator - $stmt[2] += 1; - } else if (oci_lob_desc($type)) { - if ($this->debug) { - ADOConnection::outp("Bind: name = $name"); - } - //we have to create a new Descriptor here - $numlob = count($this->_refLOBs); - $this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type)); - $this->_refLOBs[$numlob]['TYPE'] = $isOutput; - - $tmp = &$this->_refLOBs[$numlob]['LOB']; - $rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type); - if ($this->debug) { - ADOConnection::outp("Bind: descriptor has been allocated, var (".$name.") binded"); - } - - // if type is input then write data to lob now - if ($isOutput == false) { - $var = $this->BlobEncode($var); - $tmp->WriteTemporary($var); - $this->_refLOBs[$numlob]['VAR'] = &$var; - if ($this->debug) { - ADOConnection::outp("Bind: LOB has been written to temp"); - } - } else { - $this->_refLOBs[$numlob]['VAR'] = &$var; - } - $rez = $tmp; - } else { - if ($this->debug) - ADOConnection::outp("Bind: name = $name"); - - if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type); - else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator - } - - return $rez; - } - - function Param($name,$type=false) - { - return ':'.$name; - } - - /* - Usage: - $stmt = $db->Prepare('select * from table where id =:myid and group=:group'); - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group'); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See OCIBindByName documentation at php.net. - */ - function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) - { - if ($this->debug) { - $prefix = ($isOutput) ? 'Out' : 'In'; - $ztype = (empty($type)) ? 'false' : $type; - ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);"); - } - return $this->Bind($stmt,$var,$maxLen,$type,$name,$isOutput); - } - - /* - returns query ID if successful, otherwise false - this version supports: - - 1. $db->execute('select * from table'); - - 2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); - $db->execute($prepared_statement, array(1,2,3)); - - 3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3)); - - 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); - $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); - $db->execute($stmt); - */ - function _query($sql,$inputarr) - { - if (is_array($sql)) { // is prepared sql - $stmt = $sql[1]; - - // we try to bind to permanent array, so that OCIBindByName is persistent - // and carried out once only - note that max array element size is 4000 chars - if (is_array($inputarr)) { - $bindpos = $sql[3]; - if (isset($this->_bind[$bindpos])) { - // all tied up already - $bindarr = &$this->_bind[$bindpos]; - } else { - // one statement to bind them all - $bindarr = array(); - foreach($inputarr as $k => $v) { - $bindarr[$k] = $v; - OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000); - } - $this->_bind[$bindpos] = &$bindarr; - } - } - } else { - $stmt=OCIParse($this->_connectionID,$sql); - } - - $this->_stmt = $stmt; - if (!$stmt) return false; - - if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS); - - if (is_array($inputarr)) { - foreach($inputarr as $k => $v) { - if (is_array($v)) { - if (sizeof($v) == 2) // suggested by g.giunta@libero. - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]); - else - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]); - - if ($this->debug==99) echo "name=:$k",' var='.$inputarr[$k][0],' len='.$v[1],' type='.$v[2],'
    '; - } else { - $len = -1; - if ($v === ' ') $len = 1; - if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again - $bindarr[$k] = $v; - } else { // dynamic sql, so rebind every time - OCIBindByName($stmt,":$k",$inputarr[$k],$len); - } - } - } - } - - $this->_errorMsg = false; - $this->_errorCode = false; - if (OCIExecute($stmt,$this->_commit)) { -//OCIInternalDebug(1); - if (count($this -> _refLOBs) > 0) { - - foreach ($this -> _refLOBs as $key => $value) { - if ($this -> _refLOBs[$key]['TYPE'] == true) { - $tmp = $this -> _refLOBs[$key]['LOB'] -> load(); - if ($this -> debug) { - ADOConnection::outp("OUT LOB: LOB has been loaded.
    "); - } - //$_GLOBALS[$this -> _refLOBs[$key]['VAR']] = $tmp; - $this -> _refLOBs[$key]['VAR'] = $tmp; - } else { - $this->_refLOBs[$key]['LOB']->save($this->_refLOBs[$key]['VAR']); - $this -> _refLOBs[$key]['LOB']->free(); - unset($this -> _refLOBs[$key]); - if ($this->debug) { - ADOConnection::outp("IN LOB: LOB has been saved.
    "); - } - } - } - } - - switch (@OCIStatementType($stmt)) { - case "SELECT": - return $stmt; - - case 'DECLARE': - case "BEGIN": - if (is_array($sql) && !empty($sql[4])) { - $cursor = $sql[4]; - if (is_resource($cursor)) { - $ok = OCIExecute($cursor); - return $cursor; - } - return $stmt; - } else { - if (is_resource($stmt)) { - OCIFreeStatement($stmt); - return true; - } - return $stmt; - } - break; - default : - // ociclose -- no because it could be used in a LOB? - return true; - } - } - return false; - } - - // returns true or false - function _close() - { - if (!$this->_connectionID) return; - - if (!$this->autoCommit) OCIRollback($this->_connectionID); - if (count($this->_refLOBs) > 0) { - foreach ($this ->_refLOBs as $key => $value) { - $this->_refLOBs[$key]['LOB']->free(); - unset($this->_refLOBs[$key]); - } - } - OCILogoff($this->_connectionID); - - $this->_stmt = false; - $this->_connectionID = false; - } - - function MetaPrimaryKeys($table, $owner=false,$internalKey=false) - { - if ($internalKey) return array('ROWID'); - - // tested with oracle 8.1.7 - $table = strtoupper($table); - if ($owner) { - $owner_clause = "AND ((a.OWNER = b.OWNER) AND (a.OWNER = UPPER('$owner')))"; - $ptab = 'ALL_'; - } else { - $owner_clause = ''; - $ptab = 'USER_'; - } - $sql = " -SELECT /*+ RULE */ distinct b.column_name - FROM {$ptab}CONSTRAINTS a - , {$ptab}CONS_COLUMNS b - WHERE ( UPPER(b.table_name) = ('$table')) - AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P') - $owner_clause - AND (a.constraint_name = b.constraint_name)"; - - $rs = $this->Execute($sql); - if ($rs && !$rs->EOF) { - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $a[] = reset($v); - } - return $a; - } - else return false; - } - - // http://gis.mit.edu/classes/11.521/sqlnotes/referential_integrity.html - function MetaForeignKeys($table, $owner=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - if (!$owner) { - $owner = $this->user; - $tabp = 'user_'; - } else - $tabp = 'all_'; - - $owner = ' and owner='.$this->qstr(strtoupper($owner)); - - $sql = -"select constraint_name,r_owner,r_constraint_name - from {$tabp}constraints - where constraint_type = 'R' and table_name = $table $owner"; - - $constraints =& $this->GetArray($sql); - $arr = false; - foreach($constraints as $constr) { - $cons = $this->qstr($constr[0]); - $rowner = $this->qstr($constr[1]); - $rcons = $this->qstr($constr[2]); - $cols = $this->GetArray("select column_name from {$tabp}cons_columns where constraint_name=$cons $owner order by position"); - $tabcol = $this->GetArray("select table_name,column_name from {$tabp}cons_columns where owner=$rowner and constraint_name=$rcons order by position"); - - if ($cols && $tabcol) - for ($i=0, $max=sizeof($cols); $i < $max; $i++) { - $arr[$tabcol[$i][0]] = $cols[$i][0].'='.$tabcol[$i][1]; - } - } - $ADODB_FETCH_MODE = $save; - - return $arr; - } - - - function CharMax() - { - return 4000; - } - - function TextMax() - { - return 4000; - } - - /** - * Quotes a string. - * An example is $db->qstr("Don't bother",magic_quotes_runtime()); - * - * @param s the string to quote - * @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). - * This undoes the stupidity of magic quotes for GPC. - * - * @return quoted string to be sent back to database - */ - function qstr($s,$magic_quotes=false) - { - //$nofixquotes=false; - - if ($this->noNullStrings && strlen($s)==0)$s = ' '; - if (!$magic_quotes) { - if ($this->replaceQuote[0] == '\\'){ - $s = str_replace('\\','\\\\',$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oci8 extends ADORecordSet { - - var $databaseType = 'oci8'; - var $bind=false; - var $_fieldobjs; - - //var $_arr = false; - - function ADORecordset_oci8($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_NUM: - default: - $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - } - - $this->adodbFetchMode = $mode; - $this->_queryID = $queryID; - } - - - function Init() - { - if ($this->_inited) return; - - $this->_inited = true; - if ($this->_queryID) { - - $this->_currentRow = 0; - @$this->_initrs(); - $this->EOF = !$this->_fetch(); - - /* - // based on idea by Gaetano Giunta to detect unusual oracle errors - // see http://phplens.com/lens/lensforum/msgs.php?id=6771 - $err = OCIError($this->_queryID); - if ($err && $this->connection->debug) ADOConnection::outp($err); - */ - - if (!is_array($this->fields)) { - $this->_numOfRows = 0; - $this->fields = array(); - } - } else { - $this->fields = array(); - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = OCInumcols($this->_queryID); - if ($this->_numOfFields>0) { - $this->_fieldobjs = array(); - $max = $this->_numOfFields; - for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i); - } - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &_FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fieldOffset += 1; - $fld->name =OCIcolumnname($this->_queryID, $fieldOffset); - $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); - $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); - if ($fld->type == 'NUMBER') { - $p = OCIColumnPrecision($this->_queryID, $fieldOffset); - $sc = OCIColumnScale($this->_queryID, $fieldOffset); - if ($p != 0 && $sc == 0) $fld->type = 'INT'; - //echo " $this->name ($p.$sc) "; - } - return $fld; - } - - /* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */ - function &FetchField($fieldOffset = -1) - { - return $this->_fieldobjs[$fieldOffset]; - } - - - /* - // 10% speedup to move MoveNext to child class - function _MoveNext() - { - //global $ADODB_EXTENSION;if ($ADODB_EXTENSION) return @adodb_movenext($this); - - if ($this->EOF) return false; - - $this->_currentRow++; - if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) - return true; - $this->EOF = true; - - return false; - } */ - - - function MoveNext() - { - if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } - - /* - # does not work as first record is retrieved in _initrs(), so is not included in GetArray() - function &GetArray($nRows = -1) - { - global $ADODB_OCI8_GETARRAY; - - if (true || !empty($ADODB_OCI8_GETARRAY)) { - # does not support $ADODB_ANSI_PADDING_OFF - - //OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement - switch($this->adodbFetchMode) { - case ADODB_FETCH_NUM: - - $ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM); - $results = array_merge(array($this->fields),$results); - return $results; - - case ADODB_FETCH_ASSOC: - if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break; - - $ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW); - $results =& array_merge(array($this->fields),$assoc); - return $results; - - default: - break; - } - } - - $results =& ADORecordSet::GetArray($nRows); - return $results; - - } */ - - /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr =& $this->GetArray($nrows); - return $arr; - } - $arr = array(); - for ($i=1; $i < $offset; $i++) - if (!@OCIFetch($this->_queryID)) return $arr; - - if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;; - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - /* Use associative array to get fields array */ - function Fields($colname) - { - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - - function _seek($row) - { - return false; - } - - function _fetch() - { - return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() - { - if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false; - if (!empty($this->_refcursor)) { - OCIFreeCursor($this->_refcursor); - $this->_refcursor = false; - } - @OCIFreeStatement($this->_queryID); - $this->_queryID = false; - - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - case 'NCHAR': - case 'NVARCHAR': - case 'NVARCHAR2': - if (isset($this) && $len <= $this->blobSize) return 'C'; - - case 'NCLOB': - case 'LONG': - case 'LONG VARCHAR': - case 'CLOB': - return 'X'; - - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': - return ($this->connection->datetime) ? 'T' : 'D'; - - - case 'TIMESTAMP': return 'T'; - - case 'INT': - case 'SMALLINT': - case 'INTEGER': - return 'I'; - - default: return 'N'; - } - } -} - -class ADORecordSet_ext_oci8 extends ADORecordSet_oci8 { - function ADORecordSet_ext_oci8($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_NUM: - default: $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - } - $this->adodbFetchMode = $mode; - $this->_queryID = $queryID; - } - - function MoveNext() - { - return adodb_movenext($this); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci805.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci805.inc.php.svn-base deleted file mode 100755 index 8da0ba19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci805.inc.php.svn-base +++ /dev/null @@ -1,59 +0,0 @@ -ADODB_oci8(); - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // seems that oracle only supports 1 hint comment in 8i - if (strpos($sql,'/*+') !== false) - $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql); - else - $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql); - - /* - The following is only available from 8.1.5 because order by in inline views not - available before then... - http://www.jlcomp.demon.co.uk/faq/top_sql.html - if ($nrows > 0) { - if ($offset > 0) $nrows += $offset; - $sql = "select * from ($sql) where rownum <= $nrows"; - $nrows = -1; - } - */ - - return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - } -} - -class ADORecordset_oci805 extends ADORecordset_oci8 { - var $databaseType = "oci805"; - function ADORecordset_oci805($id,$mode=false) - { - $this->ADORecordset_oci8($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8po.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8po.inc.php.svn-base deleted file mode 100755 index 2432f395..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oci8po.inc.php.svn-base +++ /dev/null @@ -1,217 +0,0 @@ - - - Should some emulation of RecordCount() be implemented? - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php'); - -class ADODB_oci8po extends ADODB_oci8 { - var $databaseType = 'oci8po'; - var $dataProvider = 'oci8'; - var $metaColumnsSQL = "select lower(cname),coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net - var $metaTablesSQL = "select lower(table_name),table_type from cat where table_type in ('TABLE','VIEW')"; - - function ADODB_oci8po() - { - $this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200; - # oci8po does not support adodb extension: adodb_movenext() - } - - function Param($name) - { - return '?'; - } - - function Prepare($sql,$cursor=false) - { - $sqlarr = explode('?',$sql); - $sql = $sqlarr[0]; - for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) { - $sql .= ':'.($i-1) . $sqlarr[$i]; - } - return ADODB_oci8::Prepare($sql,$cursor); - } - - // emulate handling of parameters ? ?, replacing with :bind0 :bind1 - function _query($sql,$inputarr) - { - if (is_array($inputarr)) { - $i = 0; - if (is_array($sql)) { - foreach($inputarr as $v) { - $arr['bind'.$i++] = $v; - } - } else { - $sqlarr = explode('?',$sql); - $sql = $sqlarr[0]; - foreach($inputarr as $k => $v) { - $sql .= ":$k" . $sqlarr[++$i]; - } - } - } - return ADODB_oci8::_query($sql,$inputarr); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oci8po extends ADORecordset_oci8 { - - var $databaseType = 'oci8po'; - - function ADORecordset_oci8po($queryID,$mode=false) - { - $this->ADORecordset_oci8($queryID,$mode); - } - - function Fields($colname) - { - if ($this->fetchMode & OCI_ASSOC) return $this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - // lowercase field names... - function &_FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fieldOffset += 1; - $fld->name = strtolower(OCIcolumnname($this->_queryID, $fieldOffset)); - $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); - $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); - if ($fld->type == 'NUMBER') { - //$p = OCIColumnPrecision($this->_queryID, $fieldOffset); - $sc = OCIColumnScale($this->_queryID, $fieldOffset); - if ($sc == 0) $fld->type = 'INT'; - } - return $fld; - } - /* - function MoveNext() - { - if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - }*/ - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - global $ADODB_ANSI_PADDING_OFF; - $this->_currentRow++; - - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - if (!empty($ADODB_ANSI_PADDING_OFF)) { - foreach($this->fields as $k => $v) { - if (is_string($v)) $this->fields[$k] = rtrim($v); - } - } - return true; - } - if (!$this->EOF) { - $this->EOF = true; - $this->_currentRow++; - } - return false; - } - - /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr = $this->GetArray($nrows); - return $arr; - } - for ($i=1; $i < $offset; $i++) - if (!@OCIFetch($this->_queryID)) { - $arr = array(); - return $arr; - } - if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $arr = array(); - return $arr; - } - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - // Create associative array - function _updatefields() - { - if (ADODB_ASSOC_CASE == 2) return; // native - - $arr = array(); - $lowercase = (ADODB_ASSOC_CASE == 0); - - foreach($this->fields as $k => $v) { - if (is_integer($k)) $arr[$k] = $v; - else { - if ($lowercase) - $arr[strtolower($k)] = $v; - else - $arr[strtoupper($k)] = $v; - } - } - $this->fields = $arr; - } - - function _fetch() - { - $ret = @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); - if ($ret) { - global $ADODB_ANSI_PADDING_OFF; - - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - if (!empty($ADODB_ANSI_PADDING_OFF)) { - foreach($this->fields as $k => $v) { - if (is_string($v)) $this->fields[$k] = rtrim($v); - } - } - } - return $ret; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc.inc.php.svn-base deleted file mode 100755 index d8b8f185..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc.inc.php.svn-base +++ /dev/null @@ -1,738 +0,0 @@ -_haserrorfunctions = ADODB_PHPVER >= 0x4050; - $this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('odbc_connect')) return null; - - if ($this->debug && $argDatabasename && $this->databaseType != 'vfp') { - ADOConnection::outp("For odbc Connect(), $argDatabasename is not used. Place dsn in 1st parameter."); - } - if (isset($php_errormsg)) $php_errormsg = ''; - if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword); - else $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,$this->curmode); - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('odbc_connect')) return null; - - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if ($this->debug && $argDatabasename) { - ADOConnection::outp("For odbc PConnect(), $argDatabasename is not used. Place dsn in 1st parameter."); - } - // print "dsn=$argDSN u=$argUsername p=$argPassword
    "; flush(); - if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword); - else $this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,$this->curmode); - - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if ($this->_connectionID && $this->autoRollback) @odbc_rollback($this->_connectionID); - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - - function ServerInfo() - { - - if (!empty($this->host) && ADODB_PHPVER >= 0x4300) { - $dsn = strtoupper($this->host); - $first = true; - $found = false; - - if (!function_exists('odbc_data_source')) return false; - - while(true) { - - $rez = @odbc_data_source($this->_connectionID, - $first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT); - $first = false; - if (!is_array($rez)) break; - if (strtoupper($rez['server']) == $dsn) { - $found = true; - break; - } - } - if (!$found) return ADOConnection::ServerInfo(); - if (!isset($rez['version'])) $rez['version'] = ''; - return $rez; - } else { - return ADOConnection::ServerInfo(); - } - } - - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - $start -= 1; - return $this->Execute("insert into $seqname values($start)"); - } - - var $_dropSeqSQL = 'drop table %s'; - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $MAXLOOPS = 100; - //$this->debug=1; - while (--$MAXLOOPS>=0) { - $num = $this->GetOne("select id from $seq"); - if ($num === false) { - $this->Execute(sprintf($this->_genSeqSQL ,$seq)); - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into $seq values($start)"); - if (!$ok) return false; - } - $this->Execute("update $seq set id=id+1 where id=$num"); - - if ($this->affected_rows() > 0) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - - function ErrorMsg() - { - if ($this->_haserrorfunctions) { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (empty($this->_connectionID)) return @odbc_errormsg(); - return @odbc_errormsg($this->_connectionID); - } else return ADOConnection::ErrorMsg(); - } - - function ErrorNo() - { - - if ($this->_haserrorfunctions) { - if ($this->_errorCode !== false) { - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode; - } - - if (empty($this->_connectionID)) $e = @odbc_error(); - else $e = @odbc_error($this->_connectionID); - - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - // so we check and patch - if (strlen($e)<=2) return 0; - return $e; - } else return ADOConnection::ErrorNo(); - } - - - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - return odbc_autocommit($this->_connectionID,false); - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = odbc_commit($this->_connectionID); - odbc_autocommit($this->_connectionID,true); - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = odbc_rollback($this->_connectionID); - odbc_autocommit($this->_connectionID,true); - return $ret; - } - - function MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @odbc_primarykeys($this->_connectionID,'',$schema,$table); - - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - $rs->Close(); - //print_r($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - - - function &MetaTables($ttype=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID); - - $rs = new ADORecordSet_odbc($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - //print_r($arr); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - if (!$arr[$i][2]) continue; - $type = $arr[$i][3]; - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2]; - } - return $arr2; - } - -/* -See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcdatetime_data_type_changes.asp -/ SQL data type codes / -#define SQL_UNKNOWN_TYPE 0 -#define SQL_CHAR 1 -#define SQL_NUMERIC 2 -#define SQL_DECIMAL 3 -#define SQL_INTEGER 4 -#define SQL_SMALLINT 5 -#define SQL_FLOAT 6 -#define SQL_REAL 7 -#define SQL_DOUBLE 8 -#if (ODBCVER >= 0x0300) -#define SQL_DATETIME 9 -#endif -#define SQL_VARCHAR 12 - - -/ One-parameter shortcuts for date/time data types / -#if (ODBCVER >= 0x0300) -#define SQL_TYPE_DATE 91 -#define SQL_TYPE_TIME 92 -#define SQL_TYPE_TIMESTAMP 93 - -#define SQL_UNICODE (-95) -#define SQL_UNICODE_VARCHAR (-96) -#define SQL_UNICODE_LONGVARCHAR (-97) -*/ - function ODBCTypes($t) - { - switch ((integer)$t) { - case 1: - case 12: - case 0: - case -95: - case -96: - return 'C'; - case -97: - case -1: //text - return 'X'; - case -4: //image - return 'B'; - - case 9: - case 91: - return 'D'; - - case 10: - case 11: - case 92: - case 93: - return 'T'; - - case 4: - case 5: - case -6: - return 'I'; - - case -11: // uniqidentifier - return 'R'; - case -7: //bit - return 'L'; - - default: - return 'N'; - } - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - /*if (false) { // after testing, confirmed that the following does not work becoz of a bug - $qid2 = odbc_tables($this->_connectionID); - $rs = new ADORecordSet_odbc($qid2); - $ADODB_FETCH_MODE = $savem; - if (!$rs) return false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - $rs->_fetch(); - - while (!$rs->EOF) { - if ($table == strtoupper($rs->fields[2])) { - $q = $rs->fields[0]; - $o = $rs->fields[1]; - break; - } - $rs->MoveNext(); - } - $rs->Close(); - - $qid = odbc_columns($this->_connectionID,$q,$o,strtoupper($table),'%'); - } */ - - switch ($this->databaseType) { - case 'access': - case 'vfp': - $qid = odbc_columns($this->_connectionID);#,'%','',strtoupper($table),'%'); - break; - - - case 'db2': - $colname = "%"; - $qid = odbc_columns($this->_connectionID, "", $schema, $table, $colname); - break; - - default: - $qid = @odbc_columns($this->_connectionID,'%','%',strtoupper($table),'%'); - if (empty($qid)) $qid = odbc_columns($this->_connectionID); - break; - } - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - $rs->_fetch(); - - $retarr = array(); - - /* - $rs->fields indices - 0 TABLE_QUALIFIER - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 DATA_TYPE - 5 TYPE_NAME - 6 PRECISION - 7 LENGTH - 8 SCALE - 9 RADIX - 10 NULLABLE - 11 REMARKS - */ - while (!$rs->EOF) { - // adodb_pr($rs->fields); - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $this->ODBCTypes($rs->fields[4]); - - // ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp - // access uses precision to store length for char/varchar - if ($fld->type == 'C' or $fld->type == 'X') { - if ($this->databaseType == 'access') - $fld->max_length = $rs->fields[6]; - else if ($rs->fields[4] <= -95) // UNICODE - $fld->max_length = $rs->fields[7]/2; - else - $fld->max_length = $rs->fields[7]; - } else - $fld->max_length = $rs->fields[7]; - $fld->not_null = !empty($rs->fields[10]); - $fld->scale = $rs->fields[8]; - $retarr[strtoupper($fld->name)] = $fld; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); //-- crashes 4.03pl1 -- why? - - if (empty($retarr)) $retarr = false; - return $retarr; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = odbc_prepare($this->_connectionID,$sql); - if (!$stmt) { - // we don't know whether odbc driver is parsing prepared stmts, so just return sql - return $sql; - } - return array($sql,$stmt,false); - } - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - GLOBAL $php_errormsg; - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_error = ''; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = odbc_prepare($this->_connectionID,$sql); - - if ($stmtid == false) { - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - return false; - } - } - - if (! odbc_execute($stmtid,$inputarr)) { - //@odbc_free_result($stmtid); - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } - return false; - } - - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!odbc_execute($stmtid)) { - //@odbc_free_result($stmtid); - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } - return false; - } - } else - $stmtid = odbc_exec($this->_connectionID,$sql); - - $this->_lastAffectedRows = 0; - if ($stmtid) { - if (@odbc_num_fields($stmtid) == 0) { - $this->_lastAffectedRows = odbc_num_rows($stmtid); - $stmtid = true; - } else { - $this->_lastAffectedRows = 0; - odbc_binmode($stmtid,$this->binmode); - odbc_longreadlen($stmtid,$this->maxblobsize); - } - - if ($this->_haserrorfunctions) { - $this->_errorMsg = ''; - $this->_errorCode = 0; - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } else { - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } - return $stmtid; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - // returns true or false - function _close() - { - $ret = @odbc_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } - - function _affectedrows() - { - return $this->_lastAffectedRows; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_odbc extends ADORecordSet { - - var $bind = false; - var $databaseType = "odbc"; - var $dataProvider = "odbc"; - var $useFetchArray; - var $_has_stupid_odbc_fetch_api_change; - - function ADORecordSet_odbc($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - - // the following is required for mysql odbc driver in 4.3.1 -- why? - $this->EOF = false; - $this->_currentRow = -1; - //$this->ADORecordSet($id); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) - { - - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $o->name = @odbc_field_name($this->_queryID,$off); - $o->type = @odbc_field_type($this->_queryID,$off); - $o->max_length = @odbc_field_len($this->_queryID,$off); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @odbc_num_rows($this->_queryID) : -1; - $this->_numOfFields = @odbc_num_fields($this->_queryID); - // some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0 - if ($this->_numOfRows == 0) $this->_numOfRows = -1; - //$this->useFetchArray = $this->connection->useFetchArray; - $this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200; - } - - function _seek($row) - { - return false; - } - - // speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $rs =& $this->GetArray($nrows); - return $rs; - } - $savem = $this->fetchMode; - $this->fetchMode = ADODB_FETCH_NUM; - $this->Move($offset); - $this->fetchMode = $savem; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - function MoveNext() - { - if ($this->_numOfRows != 0 && !$this->EOF) { - $this->_currentRow++; - - if ($this->_has_stupid_odbc_fetch_api_change) - $rez = @odbc_fetch_into($this->_queryID,$this->fields); - else { - $row = 0; - $rez = @odbc_fetch_into($this->_queryID,$row,$this->fields); - } - if ($rez) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - } - $this->fields = false; - $this->EOF = true; - return false; - } - - function _fetch() - { - - if ($this->_has_stupid_odbc_fetch_api_change) - $rez = @odbc_fetch_into($this->_queryID,$this->fields); - else { - $row = 0; - $rez = @odbc_fetch_into($this->_queryID,$row,$this->fields); - } - if ($rez) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - $this->fields = false; - return false; - } - - function _close() - { - return @odbc_free_result($this->_queryID); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_db2.inc.php.svn-base deleted file mode 100755 index 3ae91d7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_db2.inc.php.svn-base +++ /dev/null @@ -1,368 +0,0 @@ -curMode = SQL_CUR_USE_ODBC; -$db->Connect($dsn, $userid, $pwd); - - - -USING CLI INTERFACE -=================== - -I have had reports that the $host and $database params have to be reversed in -Connect() when using the CLI interface. From Halmai Csongor csongor.halmai#nexum.hu: - -> The symptom is that if I change the database engine from postgres or any other to DB2 then the following -> connection command becomes wrong despite being described this version to be correct in the docs. -> -> $connection_object->Connect( $DATABASE_HOST, $DATABASE_AUTH_USER_NAME, $DATABASE_AUTH_PASSWORD, $DATABASE_NAME ) -> -> In case of DB2 I had to swap the first and last arguments in order to connect properly. - - -System Error 5 -============== -IF you get a System Error 5 when trying to Connect/Load, it could be a permission problem. Give the user connecting -to DB2 full rights to the DB2 SQLLIB directory, and place the user in the DBUSERS group. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('_ADODB_ODBC_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbc.inc.php"); -} -if (!defined('ADODB_ODBC_DB2')){ -define('ADODB_ODBC_DB2',1); - -class ADODB_ODBC_DB2 extends ADODB_odbc { - var $databaseType = "db2"; - var $concat_operator = '||'; - var $sysTime = 'CURRENT TIME'; - var $sysDate = 'CURRENT DATE'; - var $sysTimeStamp = 'CURRENT TIMESTAMP'; - // The complete string representation of a timestamp has the form - // yyyy-mm-dd-hh.mm.ss.nnnnnn. - var $fmtTimeStamp = "'Y-m-d-H.i.s'"; - var $ansiOuter = true; - var $identitySQL = 'values IDENTITY_VAL_LOCAL()'; - var $_bindInputArray = true; - var $hasInsertID = true; - var $rsPrefix = 'ADORecordset_odbc_'; - - function ADODB_DB2() - { - if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC; - $this->ADODB_odbc(); - } - - function IfNull( $field, $ifNull ) - { - return " COALESCE($field, $ifNull) "; // if DB2 UDB - } - - function ServerInfo() - { - //odbc_setoption($this->_connectionID,1,101 /*SQL_ATTR_ACCESS_MODE*/, 1 /*SQL_MODE_READ_ONLY*/); - $vers = $this->GetOne('select versionnumber from sysibm.sysversions'); - //odbc_setoption($this->_connectionID,1,101, 0 /*SQL_MODE_READ_WRITE*/); - return array('description'=>'DB2 ODBC driver', 'version'=>$vers); - } - - function _insertid() - { - return $this->GetOne($this->identitySQL); - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->_autocommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - function &MetaTables($ttype=false,$showSchema=false, $qtable="%", $qschema="%") - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID, "", $qschema, $qtable, ""); - - $rs = new ADORecordSet_odbc($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - //print_r($arr); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - - if (!$arr[$i][2]) continue; - if (strncmp($arr[$i][1],'SYS',3) === 0) continue; - - $type = $arr[$i][3]; - - if ($showSchema) $arr[$i][2] = $arr[$i][1].'.'.$arr[$i][2]; - - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'T',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'S',1) !== 0) $arr2[] = $arr[$i][2]; - } - return $arr2; - } - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $false = false; - // get index details - $table = strtoupper($table); - $SQL="SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'"; - if ($primary) - $SQL.= " AND UNIQUERULE='P'"; - $rs = $this->Execute($SQL); - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - $indexes = array (); - // parse index data into array - while ($row = $rs->FetchRow()) { - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 'U' || $row[1] == 'P'), - 'columns' => array() - ); - $cols = ltrim($row[2],'+'); - $indexes[$row[0]]['columns'] = explode('+', $cols); - } - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - // use right() and replace() ? - if (!$col) $col = $this->sysDate; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '||'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "char(year($col))"; - break; - case 'M': - $s .= "substr(monthname($col),1,3)"; - break; - case 'm': - $s .= "right(digits(month($col)),2)"; - break; - case 'D': - case 'd': - $s .= "right(digits(day($col)),2)"; - break; - case 'H': - case 'h': - if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)"; - else $s .= "''"; - break; - case 'i': - case 'I': - if ($col != $this->sysDate) - $s .= "right(digits(minute($col)),2)"; - else $s .= "''"; - break; - case 'S': - case 's': - if ($col != $this->sysDate) - $s .= "right(digits(second($col)),2)"; - else $s .= "''"; - break; - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - } - } - return $s; - } - - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false) - { - $nrows = (integer) $nrows; - if ($offset <= 0) { - // could also use " OPTIMIZE FOR $nrows ROWS " - if ($nrows >= 0) $sql .= " FETCH FIRST $nrows ROWS ONLY "; - $rs =& $this->Execute($sql,$inputArr); - } else { - if ($offset > 0 && $nrows < 0); - else { - $nrows += $offset; - $sql .= " FETCH FIRST $nrows ROWS ONLY "; - } - $rs =& ADOConnection::SelectLimit($sql,-1,$offset,$inputArr); - } - - return $rs; - } - -}; - - -class ADORecordSet_odbc_db2 extends ADORecordSet_odbc { - - var $databaseType = "db2"; - - function ADORecordSet_db2($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - switch (strtoupper($t)) { - case 'VARCHAR': - case 'CHAR': - case 'CHARACTER': - case 'C': - if ($len <= $this->blobSize) return 'C'; - - case 'LONGCHAR': - case 'TEXT': - case 'CLOB': - case 'DBCLOB': // double-byte - case 'X': - return 'X'; - - case 'BLOB': - case 'GRAPHIC': - case 'VARGRAPHIC': - return 'B'; - - case 'DATE': - case 'D': - return 'D'; - - case 'TIME': - case 'TIMESTAMP': - case 'T': - return 'T'; - - //case 'BOOLEAN': - //case 'BIT': - // return 'L'; - - //case 'COUNTER': - // return 'R'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'SMALLINT': - case 'I': - return 'I'; - - default: return 'N'; - } - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_mssql.inc.php.svn-base deleted file mode 100755 index 21817395..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_mssql.inc.php.svn-base +++ /dev/null @@ -1,306 +0,0 @@ -ADODB_odbc(); - //$this->curmode = SQL_CUR_USE_ODBC; - } - - // crashes php... - function ServerInfo() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $row = $this->GetRow("execute sp_server_info 2"); - $ADODB_FETCH_MODE = $save; - if (!is_array($row)) return false; - $arr['description'] = $row[2]; - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " ISNULL($field, $ifNull) "; // if MS SQL Server - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - - function MetaForeignKeys($table, $owner=false, $upper=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - - $sql = -"select object_name(constid) as constraint_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where upper(object_name(fkeyid)) = $table -order by constraint_name, referenced_table_name, keyno"; - - $constraints =& $this->GetArray($sql); - - $ADODB_FETCH_MODE = $save; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; - } - if (!$arr) return false; - - $arr2 = false; - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) {$this->debug=1; - $save = $this->metaTablesSQL; - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " AND name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table) - { - $arr = ADOConnection::MetaColumns($table); - return $arr; - } - - - function &MetaIndexes($table,$primary=false) - { - $table = $this->qstr($table); - - $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, - CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, - CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique - FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id - INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid - INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid - WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table - ORDER BY O.name, I.Name, K.keyno"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - if (!$primary && $row[5]) continue; - - $indexes[$row[0]]['unique'] = $row[6]; - $indexes[$row[0]]['columns'][] = $row[1]; - } - return $indexes; - } - - function _query($sql,$inputarr) - { - if (is_string($sql)) $sql = str_replace('||','+',$sql); - return ADODB_odbc::_query($sql,$inputarr); - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - // "Stein-Aksel Basma" - // tested with MSSQL 2000 - function &MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - $schema = ''; - $this->_findschema($table,$schema); - //if (!$schema) $schema = $this->database; - if ($schema) $schema = "and k.table_catalog like '$schema%'"; - - $sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, - information_schema.table_constraints tc - where tc.constraint_name = k.constraint_name and tc.constraint_type = - 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position "; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $a = $this->GetCol($sql); - $ADODB_FETCH_MODE = $savem; - - if ($a && sizeof($a)>0) return $a; - $false = false; - return $false; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($nrows > 0 && $offset <= 0) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql); - $rs =& $this->Execute($sql,$inputarr); - } else - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - - return $rs; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yyyy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(quarter,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(day($col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - -} - -class ADORecordSet_odbc_mssql extends ADORecordSet_odbc { - - var $databaseType = 'odbc_mssql'; - - function ADORecordSet_odbc_mssql($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_oracle.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_oracle.inc.php.svn-base deleted file mode 100755 index cb29f0b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbc_oracle.inc.php.svn-base +++ /dev/null @@ -1,115 +0,0 @@ -ADODB_odbc(); - } - - function &MetaTables() - { - $false = false; - $rs = $this->Execute($this->metaTablesSQL); - if ($rs === false) return $false; - $arr = $rs->GetArray(); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - $arr2[] = $arr[$i][0]; - } - $rs->Close(); - return $arr2; - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - if ($rs === false) { - $false = false; - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - $php_errormsg = ''; - $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC ); - $this->_errorMsg = $php_errormsg; - - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'"); - //if ($this->_connectionID) odbc_autocommit($this->_connectionID,true); - return $this->_connectionID != false; - } - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - $php_errormsg = ''; - $this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC ); - $this->_errorMsg = $php_errormsg; - - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'"); - //if ($this->_connectionID) odbc_autocommit($this->_connectionID,true); - return $this->_connectionID != false; - } -} - -class ADORecordSet_odbc_oracle extends ADORecordSet_odbc { - - var $databaseType = 'odbc_oracle'; - - function ADORecordSet_odbc_oracle($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp.inc.php.svn-base deleted file mode 100755 index 6f52ae77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp.inc.php.svn-base +++ /dev/null @@ -1,743 +0,0 @@ - - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -define("_ADODB_ODBTP_LAYER", 2 ); - -class ADODB_odbtp extends ADOConnection{ - var $databaseType = "odbtp"; - var $dataProvider = "odbtp"; - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d, h:i:sA'"; - var $replaceQuote = "''"; // string to use to replace quotes - var $odbc_driver = 0; - var $hasAffectedRows = true; - var $hasInsertID = false; - var $hasGenID = true; - var $hasMoveFirst = true; - - var $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)"; - var $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'"; - var $_bindInputArray = false; - var $_useUnicodeSQL = false; - var $_canPrepareSP = false; - var $_dontPoolDBC = true; - - function ADODB_odbtp() - { - } - - function ServerInfo() - { - return array('description' => @odbtp_get_attr( ODB_ATTR_DBMSNAME, $this->_connectionID), - 'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID)); - } - - function ErrorMsg() - { - if (empty($this->_connectionID)) return @odbtp_last_error(); - return @odbtp_last_error($this->_connectionID); - } - - function ErrorNo() - { - if (empty($this->_connectionID)) return @odbtp_last_error_state(); - return @odbtp_last_error_state($this->_connectionID); - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - function _affectedrows() - { - if ($this->_queryID) { - return @odbtp_affected_rows ($this->_queryID); - } else - return 0; - } - - function CreateSequence($seqname='adodbseq',$start=1) - { - //verify existence - $num = $this->GetOne("select seq_value from adodb_seq"); - $seqtab='adodb_seq'; - if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) { - $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); - //if using vfp dbc file - if( !strcasecmp(strrchr($path, '.'), '.dbc') ) - $path = substr($path,0,strrpos($path,'\/')); - $seqtab = $path . '/' . $seqtab; - } - if($num == false) { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL ,$seqtab)); - } - $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seqname'"); - if ($num) { - return false; - } - $start -= 1; - return $this->Execute("insert into adodb_seq values('$seqname',$start)"); - } - - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - function GenID($seq='adodbseq',$start=1) - { - $seqtab='adodb_seq'; - if( $this->odbc_driver == ODB_DRIVER_FOXPRO) { - $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); - //if using vfp dbc file - if( !strcasecmp(strrchr($path, '.'), '.dbc') ) - $path = substr($path,0,strrpos($path,'\/')); - $seqtab = $path . '/' . $seqtab; - } - $MAXLOOPS = 100; - while (--$MAXLOOPS>=0) { - $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seq'"); - if ($num === false) { - //verify if abodb_seq table exist - $ok = $this->GetOne("select seq_value from adodb_seq "); - if(!$ok) { - //creating the sequence table adodb_seq - $this->Execute(sprintf($this->_genSeqSQL ,$seqtab)); - } - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into adodb_seq values('$seq',$start)"); - if (!$ok) return false; - } - $ok = $this->Execute("update adodb_seq set seq_value=seq_value+1 where seq_name='$seq'"); - if($ok) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - //example for $UserOrDSN - //for visual fox : DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=c:\YourDbfFileDir;EXCLUSIVE=NO; - //for visual fox dbc: DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBC;SOURCEDB=c:\YourDbcFileDir\mydb.dbc;EXCLUSIVE=NO; - //for access : DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\path_to_access_db\base_test.mdb;UID=root;PWD=; - //for mssql : DRIVER={SQL Server};SERVER=myserver;UID=myuid;PWD=mypwd;DATABASE=OdbtpTest; - //if uid & pwd can be separate - function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') - { - $this->_connectionID = odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase); - if ($this->_connectionID === false) { - $this->_errorMsg = $this->ErrorMsg() ; - return false; - } - - odbtp_convert_datetime($this->_connectionID,true); - - if ($this->_dontPoolDBC) { - if (function_exists('odbtp_dont_pool_dbc')) - @odbtp_dont_pool_dbc($this->_connectionID); - } - else { - $this->_dontPoolDBC = true; - } - $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID); - $dbms = strtolower(@odbtp_get_attr(ODB_ATTR_DBMSNAME, $this->_connectionID)); - $this->odbc_name = $dbms; - - // Account for inconsistent DBMS names - if( $this->odbc_driver == ODB_DRIVER_ORACLE ) - $dbms = 'oracle'; - else if( $this->odbc_driver == ODB_DRIVER_SYBASE ) - $dbms = 'sybase'; - - // Set DBMS specific attributes - switch( $dbms ) { - case 'microsoft sql server': - $this->databaseType = 'odbtp_mssql'; - $this->fmtDate = "'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d h:i:sA'"; - $this->sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - $this->sysTimeStamp = 'GetDate()'; - $this->ansiOuter = true; - $this->leftOuter = '*='; - $this->rightOuter = '=*'; - $this->hasTop = 'top'; - $this->hasInsertID = true; - $this->hasTransactions = true; - $this->_bindInputArray = true; - $this->_canSelectDb = true; - $this->substr = "substring"; - $this->length = 'len'; - $this->identitySQL = 'select @@IDENTITY'; - $this->metaDatabasesSQL = "select name from master..sysdatabases where name <> 'master'"; - $this->_canPrepareSP = true; - break; - case 'access': - $this->databaseType = 'odbtp_access'; - $this->fmtDate = "#Y-m-d#"; - $this->fmtTimeStamp = "#Y-m-d h:i:sA#"; - $this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')"; - $this->sysTimeStamp = 'NOW'; - $this->hasTop = 'top'; - $this->hasTransactions = false; - $this->_canPrepareSP = true; // For MS Access only. - break; - case 'visual foxpro': - $this->databaseType = 'odbtp_vfp'; - $this->fmtDate = "{^Y-m-d}"; - $this->fmtTimeStamp = "{^Y-m-d, h:i:sA}"; - $this->sysDate = 'date()'; - $this->sysTimeStamp = 'datetime()'; - $this->ansiOuter = true; - $this->hasTop = 'top'; - $this->hasTransactions = false; - $this->replaceQuote = "'+chr(39)+'"; - $this->true = '.T.'; - $this->false = '.F.'; - - break; - case 'oracle': - $this->databaseType = 'odbtp_oci8'; - $this->fmtDate = "'Y-m-d 00:00:00'"; - $this->fmtTimeStamp = "'Y-m-d h:i:sA'"; - $this->sysDate = 'TRUNC(SYSDATE)'; - $this->sysTimeStamp = 'SYSDATE'; - $this->hasTransactions = true; - $this->_bindInputArray = true; - $this->concat_operator = '||'; - break; - case 'sybase': - $this->databaseType = 'odbtp_sybase'; - $this->fmtDate = "'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - $this->sysDate = 'GetDate()'; - $this->sysTimeStamp = 'GetDate()'; - $this->leftOuter = '*='; - $this->rightOuter = '=*'; - $this->hasInsertID = true; - $this->hasTransactions = true; - $this->identitySQL = 'select @@IDENTITY'; - break; - default: - $this->databaseType = 'odbtp'; - if( @odbtp_get_attr(ODB_ATTR_TXNCAPABLE, $this->_connectionID) ) - $this->hasTransactions = true; - else - $this->hasTransactions = false; - } - @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID ); - - if ($this->_useUnicodeSQL ) - @odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID); - - return true; - } - - function _pconnect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') - { - $this->_dontPoolDBC = false; - return $this->_connect($HostOrInterface, $UserOrDSN, $argPassword, $argDatabase); - } - - function SelectDB($dbName) - { - if (!@odbtp_select_db($dbName, $this->_connectionID)) { - return false; - } - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - return true; - } - - function &MetaTables($ttype='',$showSchema=false,$mask=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false); - - $arr =& $this->GetArray("||SQLTables||||$ttype"); - - if (isset($savefm)) $this->SetFetchMode($savefm); - $ADODB_FETCH_MODE = $savem; - - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3] == 'SYSTEM TABLE' ) continue; - if ($arr[$i][2]) - $arr2[] = $showSchema && $arr[$i][1]? $arr[$i][1].'.'.$arr[$i][2] : $arr[$i][2]; - } - return $arr2; - } - - function &MetaColumns($table,$upper=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - if ($upper) $table = strtoupper($table); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false); - - $rs = $this->Execute( "||SQLColumns||$schema|$table" ); - - if (isset($savefm)) $this->SetFetchMode($savefm); - $ADODB_FETCH_MODE = $savem; - - if (!$rs || $rs->EOF) { - $false = false; - return $false; - } - $retarr = array(); - while (!$rs->EOF) { - //print_r($rs->fields); - if (strtoupper($rs->fields[2]) == $table) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $rs->fields[5]; - $fld->max_length = $rs->fields[6]; - $fld->not_null = !empty($rs->fields[9]); - $fld->scale = $rs->fields[7]; - if (isset($rs->fields[12])) // vfp does not have field 12 - if (!is_null($rs->fields[12])) { - $fld->has_default = true; - $fld->default_value = $rs->fields[12]; - } - $retarr[strtoupper($fld->name)] = $fld; - } else if (!empty($retarr)) - break; - $rs->MoveNext(); - } - $rs->Close(); - - return $retarr; - } - - function &MetaPrimaryKeys($table, $owner='') - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $arr =& $this->GetArray("||SQLPrimaryKeys||$owner|$table"); - $ADODB_FETCH_MODE = $savem; - - //print_r($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - function &MetaForeignKeys($table, $owner='', $upper=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $constraints =& $this->GetArray("||SQLForeignKeys|||||$owner|$table"); - $ADODB_FETCH_MODE = $savem; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3]; - } - if (!$arr) { - $false = false; - return $false; - } - - $arr2 = array(); - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - if (defined('ODB_TXN_DEFAULT')) - $txn = ODB_TXN_DEFAULT; - else - $txn = ODB_TXN_READUNCOMMITTED; - $rs = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS,$txn,$this->_connectionID); - if(!$rs) return false; - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->autoCommit = true; - if( ($ret = @odbtp_commit($this->_connectionID)) ) - $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->autoCommit = true; - if( ($ret = @odbtp_rollback($this->_connectionID)) ) - $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off - return $ret; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // TOP requires ORDER BY for Visual FoxPro - if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) { - if (!preg_match('/ORDER[ \t\r\n]+BY/is',$sql)) $sql .= ' ORDER BY 1'; - } - $ret =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = @odbtp_prepare($sql,$this->_connectionID); - if (!$stmt) { - // print "Prepare Error for ($sql) ".$this->ErrorMsg()."
    "; - return $sql; - } - return array($sql,$stmt,false); - } - - function PrepareSP($sql) - { - if (!$this->_canPrepareSP) return $sql; // Can't prepare procedures - - $stmt = @odbtp_prepare_proc($sql,$this->_connectionID); - if (!$stmt) return false; - return array($sql,$stmt); - } - - /* - Usage: - $stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group - - # note that the parameter does not have @ in front! - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',false,64); - $db->Parameter($stmt,$group,'photo',false,100000,ODB_BINARY); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to. Can set to null (for isNull support). - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in odbtp. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See odbtp_attach_param documentation at http://odbtp.sourceforge.net. - */ - function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0) - { - if ( $this->odbc_driver == ODB_DRIVER_JET ) { - $name = '['.$name.']'; - if( !$type && $this->_useUnicodeSQL - && @odbtp_param_bindtype($stmt[1], $name) == ODB_CHAR ) - { - $type = ODB_WCHAR; - } - } - else { - $name = '@'.$name; - } - return @odbtp_attach_param($stmt[1], $name, $var, $type, $maxLen); - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='image') - { - $sql = "UPDATE $table SET $column = ? WHERE $where"; - if( !($stmt = @odbtp_prepare($sql, $this->_connectionID)) ) - return false; - if( !@odbtp_input( $stmt, 1, ODB_BINARY, 1000000, $blobtype ) ) - return false; - if( !@odbtp_set( $stmt, 1, $val ) ) - return false; - return @odbtp_execute( $stmt ) != false; - } - - function IfNull( $field, $ifNull ) - { - switch( $this->odbc_driver ) { - case ODB_DRIVER_MSSQL: - return " ISNULL($field, $ifNull) "; - case ODB_DRIVER_JET: - return " IIF(IsNull($field), $ifNull, $field) "; - } - return " CASE WHEN $field is null THEN $ifNull ELSE $field END "; - } - - function _query($sql,$inputarr=false) - { - global $php_errormsg; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = @odbtp_prepare($sql,$this->_connectionID); - if ($stmtid == false) { - $this->_errorMsg = $php_errormsg; - return false; - } - } - $num_params = @odbtp_num_params( $stmtid ); - for( $param = 1; $param <= $num_params; $param++ ) { - @odbtp_input( $stmtid, $param ); - @odbtp_set( $stmtid, $param, $inputarr[$param-1] ); - } - if (!@odbtp_execute($stmtid) ) { - return false; - } - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!@odbtp_execute($stmtid)) { - return false; - } - } else { - $stmtid = odbtp_query($sql,$this->_connectionID); - } - $this->_lastAffectedRows = 0; - if ($stmtid) { - $this->_lastAffectedRows = @odbtp_affected_rows($stmtid); - } - return $stmtid; - } - - function _close() - { - $ret = @odbtp_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } -} - -class ADORecordSet_odbtp extends ADORecordSet { - - var $databaseType = 'odbtp'; - var $canSeek = true; - - function ADORecordSet_odbtp($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - $this->_numOfFields = @odbtp_num_fields($this->_queryID); - if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID))) - $this->_numOfRows = -1; - - if (!$this->connection->_useUnicodeSQL) return; - - if ($this->connection->odbc_driver == ODB_DRIVER_JET) { - if (!@odbtp_get_attr(ODB_ATTR_MAPCHARTOWCHAR, - $this->connection->_connectionID)) - { - for ($f = 0; $f < $this->_numOfFields; $f++) { - if (@odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR) - @odbtp_bind_field($this->_queryID, $f, ODB_WCHAR); - } - } - } - } - - function &FetchField($fieldOffset = 0) - { - $off=$fieldOffset; // offsets begin at 0 - $o= new ADOFieldObject(); - $o->name = @odbtp_field_name($this->_queryID,$off); - $o->type = @odbtp_field_type($this->_queryID,$off); - $o->max_length = @odbtp_field_length($this->_queryID,$off); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - function _seek($row) - { - return @odbtp_data_seek($this->_queryID, $row); - } - - function fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $name = @odbtp_field_name( $this->_queryID, $i ); - $this->bind[strtoupper($name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _fetch_odbtp($type=0) - { - switch ($this->fetchMode) { - case ADODB_FETCH_NUM: - $this->fields = @odbtp_fetch_row($this->_queryID, $type); - break; - case ADODB_FETCH_ASSOC: - $this->fields = @odbtp_fetch_assoc($this->_queryID, $type); - break; - default: - $this->fields = @odbtp_fetch_array($this->_queryID, $type); - } - if ($this->databaseType = 'odbtp_vfp') { - if ($this->fields) - foreach($this->fields as $k => $v) { - if (strncmp($v,'1899-12-30',10) == 0) $this->fields[$k] = ''; - } - } - return is_array($this->fields); - } - - function _fetch() - { - return $this->_fetch_odbtp(); - } - - function MoveFirst() - { - if (!$this->_fetch_odbtp(ODB_FETCH_FIRST)) return false; - $this->EOF = false; - $this->_currentRow = 0; - return true; - } - - function MoveLast() - { - if (!$this->_fetch_odbtp(ODB_FETCH_LAST)) return false; - $this->EOF = false; - $this->_currentRow = $this->_numOfRows - 1; - return true; - } - - function NextRecordSet() - { - if (!@odbtp_next_result($this->_queryID)) return false; - $this->_inited = false; - $this->bind = false; - $this->_currentRow = -1; - $this->Init(); - return true; - } - - function _close() - { - return @odbtp_free_query($this->_queryID); - } -} - -class ADORecordSet_odbtp_mssql extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_mssql'; - - function ADORecordSet_odbtp_mssql($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_access extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_access'; - - function ADORecordSet_odbtp_access($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_vfp extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_vfp'; - - function ADORecordSet_odbtp_vfp($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_oci8 extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_oci8'; - - function ADORecordSet_odbtp_oci8($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_sybase extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_sybase'; - - function ADORecordSet_odbtp_sybase($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp_unicode.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp_unicode.inc.php.svn-base deleted file mode 100755 index ff793733..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-odbtp_unicode.inc.php.svn-base +++ /dev/null @@ -1,39 +0,0 @@ - - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -/* - Because the ODBTP server sends and reads UNICODE text data using UTF-8 - encoding, the following HTML meta tag must be included within the HTML - head section of every HTML form and script page: - - - - Also, all SQL query strings must be submitted as UTF-8 encoded text. -*/ - -if (!defined('_ADODB_ODBTP_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbtp.inc.php"); -} - -class ADODB_odbtp_unicode extends ADODB_odbtp { - var $databaseType = 'odbtp'; - var $_useUnicodeSQL = true; - - function ADODB_odbtp_unicode() - { - $this->ADODB_odbtp(); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oracle.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oracle.inc.php.svn-base deleted file mode 100755 index 3c6dbd30..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-oracle.inc.php.svn-base +++ /dev/null @@ -1,338 +0,0 @@ -fmtDate,$d).",'YYYY-MM-DD')"; - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - - if (is_string($ts)) $d = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')"; - } - - - function BindDate($d) - { - $d = ADOConnection::DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = ADOConnection::DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - - - function BeginTrans() - { - $this->autoCommit = false; - ora_commitoff($this->_connectionID); - return true; - } - - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - $ret = ora_commit($this->_connectionID); - ora_commiton($this->_connectionID); - return $ret; - } - - - function RollbackTrans() - { - $ret = ora_rollback($this->_connectionID); - ora_commiton($this->_connectionID); - return $ret; - } - - - /* there seems to be a bug in the oracle extension -- always returns ORA-00000 - no error */ - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - - if (is_resource($this->_curs)) $this->_errorMsg = @ora_error($this->_curs); - if (empty($this->_errorMsg)) $this->_errorMsg = @ora_error($this->_connectionID); - return $this->_errorMsg; - } - - - function ErrorNo() - { - if ($this->_errorCode !== false) return $this->_errorCode; - - if (is_resource($this->_curs)) $this->_errorCode = @ora_errorcode($this->_curs); - if (empty($this->_errorCode)) $this->_errorCode = @ora_errorcode($this->_connectionID); - return $this->_errorCode; - } - - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename, $mode=0) - { - if (!function_exists('ora_plogon')) return null; - - // Reset error messages before connecting - $this->_errorMsg = false; - $this->_errorCode = false; - - // G. Giunta 2003/08/13 - This looks danegrously suspicious: why should we want to set - // the oracle home to the host name of remote DB? -// if ($argHostname) putenv("ORACLE_HOME=$argHostname"); - - if($argHostname) { // code copied from version submitted for oci8 by Jorma Tuomainen - if (empty($argDatabasename)) $argDatabasename = $argHostname; - else { - if(strpos($argHostname,":")) { - $argHostinfo=explode(":",$argHostname); - $argHostname=$argHostinfo[0]; - $argHostport=$argHostinfo[1]; - } else { - $argHostport="1521"; - } - - - if ($this->connectSID) { - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))"; - } else - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; - } - - } - - if ($argDatabasename) $argUsername .= "@$argDatabasename"; - - //if ($argHostname) print "

    Connect: 1st argument should be left blank for $this->databaseType

    "; - if ($mode = 1) - $this->_connectionID = ora_plogon($argUsername,$argPassword); - else - $this->_connectionID = ora_logon($argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($this->autoCommit) ora_commiton($this->_connectionID); - if ($this->_initdate) { - $rs = $this->_query("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); - if ($rs) ora_close($rs); - } - - return true; - } - - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, 1); - } - - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr=false) - { - // Reset error messages before executing - $this->_errorMsg = false; - $this->_errorCode = false; - - $curs = ora_open($this->_connectionID); - - if ($curs === false) return false; - $this->_curs = $curs; - if (!ora_parse($curs,$sql)) return false; - if (ora_exec($curs)) return $curs; - // before we close the cursor, we have to store the error message - // that we can obtain ONLY from the cursor (and not from the connection) - $this->_errorCode = @ora_errorcode($curs); - $this->_errorMsg = @ora_error($curs); - // - @ora_close($curs); - return false; - } - - - // returns true or false - function _close() - { - return @ora_logoff($this->_connectionID); - } - - - -} - - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oracle extends ADORecordSet { - - var $databaseType = "oracle"; - var $bind = false; - - function ADORecordset_oracle($queryID,$mode=false) - { - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $queryID; - - $this->_inited = true; - $this->fields = array(); - if ($queryID) { - $this->_currentRow = 0; - $this->EOF = !$this->_fetch(); - @$this->_initrs(); - } else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - - return $this->_queryID; - } - - - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fld->name = ora_columnname($this->_queryID, $fieldOffset); - $fld->type = ora_columntype($this->_queryID, $fieldOffset); - $fld->max_length = ora_columnsize($this->_queryID, $fieldOffset); - return $fld; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = @ora_numcols($this->_queryID); - } - - - function _seek($row) - { - return false; - } - - function _fetch($ignore_fields=false) { -// should remove call by reference, but ora_fetch_into requires it in 4.0.3pl1 - if ($this->fetchMode & ADODB_FETCH_ASSOC) - return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC); - else - return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS); - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() -{ - return @ora_close($this->_queryID); - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - if ($len <= $this->blobSize) return 'C'; - case 'LONG': - case 'LONG VARCHAR': - case 'CLOB': - return 'X'; - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': return 'D'; - - //case 'T': return 'T'; - - case 'BIT': return 'L'; - case 'INT': - case 'SMALLINT': - case 'INTEGER': return 'I'; - default: return 'N'; - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo.inc.php.svn-base deleted file mode 100755 index e3f77f1f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo.inc.php.svn-base +++ /dev/null @@ -1,569 +0,0 @@ -_bindInputArray = true; - #$parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); - } - - function ServerInfo() - { - return ADOConnection::ServerInfo(); - } - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function MetaTables() - { - return false; - } - - function MetaColumns() - { - return false; - } -} - - -class ADODB_pdo extends ADOConnection { - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d, h:i:sA'"; - var $replaceQuote = "''"; // string to use to replace quotes - var $hasAffectedRows = true; - var $_bindInputArray = true; - var $_genSeqSQL = "create table %s (id integer)"; - var $_autocommit = true; - var $_haserrorfunctions = true; - var $_lastAffectedRows = 0; - - var $_errormsg = false; - var $_errorno = false; - - var $dsnType = ''; - var $stmt = false; - - function ADODB_pdo() - { - } - - function _UpdatePDO() - { - $d = &$this->_driver; - $this->fmtDate = $d->fmtDate; - $this->fmtTimeStamp = $d->fmtTimeStamp; - $this->replaceQuote = $d->replaceQuote; - $this->sysDate = $d->sysDate; - $this->sysTimeStamp = $d->sysTimeStamp; - $this->random = $d->random; - $this->concat_operator = $d->concat_operator; - $this->nameQuote = $d->nameQuote; - - $this->hasGenID = $d->hasGenID; - $this->_genIDSQL = $d->_genIDSQL; - $this->_genSeqSQL = $d->_genSeqSQL; - $this->_dropSeqSQL = $d->_dropSeqSQL; - - $d->_init($this); - } - - function Time() - { - if (!empty($this->_driver->_hasdual)) $sql = "select $this->sysTimeStamp from dual"; - else $sql = "select $this->sysTimeStamp"; - - $rs =& $this->_Execute($sql); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename, $persist=false) - { - $at = strpos($argDSN,':'); - $this->dsnType = substr($argDSN,0,$at); - - if ($argDatabasename) { - $argDSN .= ';dbname='.$argDatabasename; - } - try { - $this->_connectionID = new PDO($argDSN, $argUsername, $argPassword); - } catch (Exception $e) { - $this->_connectionID = false; - $this->_errorno = -1; - //var_dump($e); - $this->_errormsg = 'Connection attempt failed: '.$e->getMessage(); - return false; - } - - if ($this->_connectionID) { - switch(ADODB_ASSOC_CASE){ - case 0: $m = PDO::CASE_LOWER; break; - case 1: $m = PDO::CASE_UPPER; break; - default: - case 2: $m = PDO::CASE_NATURAL; break; - } - - //$this->_connectionID->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_SILENT ); - $this->_connectionID->setAttribute(PDO::ATTR_CASE,$m); - - $class = 'ADODB_pdo_'.$this->dsnType; - //$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - switch($this->dsnType) { - case 'oci': - case 'mysql': - case 'pgsql': - case 'mssql': - include_once(ADODB_DIR.'/drivers/adodb-pdo_'.$this->dsnType.'.inc.php'); - break; - } - if (class_exists($class)) - $this->_driver = new $class(); - else - $this->_driver = new ADODB_pdo_base(); - - $this->_driver->_connectionID = $this->_connectionID; - $this->_UpdatePDO(); - return true; - } - $this->_driver = new ADODB_pdo_base(); - return false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argDSN, $argUsername, $argPassword, $argDatabasename, true); - } - - /*------------------------------------------------------------------------------*/ - - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $save = $this->_driver->fetchMode; - $this->_driver->fetchMode = $this->fetchMode; - $this->_driver->debug = $this->debug; - $ret = $this->_driver->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - $this->_driver->fetchMode = $save; - return $ret; - } - - - function ServerInfo() - { - return $this->_driver->ServerInfo(); - } - - function MetaTables($ttype=false,$showSchema=false,$mask=false) - { - return $this->_driver->MetaTables($ttype,$showSchema,$mask); - } - - function MetaColumns($table,$normalize=true) - { - return $this->_driver->MetaColumns($table,$normalize); - } - - function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - $obj = $stmt[1]; - if ($type) $obj->bindParam($name,$var,$type,$maxLen); - else $obj->bindParam($name, $var); - } - - - function ErrorMsg() - { - if ($this->_errormsg !== false) return $this->_errormsg; - if (!empty($this->_stmt)) $arr = $this->_stmt->errorInfo(); - else if (!empty($this->_connectionID)) $arr = $this->_connectionID->errorInfo(); - else return 'No Connection Established'; - - - if ($arr) { - if (sizeof($arr)<2) return ''; - if ((integer)$arr[1]) return $arr[2]; - else return ''; - } else return '-1'; - } - - - function ErrorNo() - { - if ($this->_errorno !== false) return $this->_errorno; - if (!empty($this->_stmt)) $err = $this->_stmt->errorCode(); - else if (!empty($this->_connectionID)) { - $arr = $this->_connectionID->errorInfo(); - if (isset($arr[0])) $err = $arr[0]; - else $err = -1; - } else - return 0; - - if ($err == '00000') return 0; // allows empty check - return $err; - } - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,false); - return $this->_connectionID->beginTransaction(); - } - - function CommitTrans($ok=true) - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - - $ret = $this->_connectionID->commit(); - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - return $ret; - } - - function RollbackTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - - $ret = $this->_connectionID->rollback(); - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - return $ret; - } - - function Prepare($sql) - { - $this->_stmt = $this->_connectionID->prepare($sql); - if ($this->_stmt) return array($sql,$this->_stmt); - - return false; - } - - function PrepareStmt($sql) - { - $stmt = $this->_connectionID->prepare($sql); - if (!$stmt) return false; - $obj = new ADOPDOStatement($stmt,$this); - return $obj; - } - - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - if (is_array($sql)) { - $stmt = $sql[1]; - } else { - $stmt = $this->_connectionID->prepare($sql); - } - #adodb_backtrace(); - #var_dump($this->_bindInputArray); - if ($stmt) { - $this->_driver->debug = $this->debug; - if ($inputarr) $ok = $stmt->execute($inputarr); - else $ok = $stmt->execute(); - } - - - $this->_errormsg = false; - $this->_errorno = false; - - if ($ok) { - $this->_stmt = $stmt; - return $stmt; - } - - if ($stmt) { - - $arr = $stmt->errorinfo(); - if ((integer)$arr[1]) { - $this->_errormsg = $arr[2]; - $this->_errorno = $arr[1]; - } - - } else { - $this->_errormsg = false; - $this->_errorno = false; - } - return false; - } - - // returns true or false - function _close() - { - $this->_stmt = false; - return true; - } - - function _affectedrows() - { - return ($this->_stmt) ? $this->_stmt->rowCount() : 0; - } - - function _insertid() - { - return ($this->_connectionID) ? $this->_connectionID->lastInsertId() : 0; - } -} - -class ADOPDOStatement { - - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - var $_stmt; - var $_connectionID; - - function ADOPDOStatement($stmt,$connection) - { - $this->_stmt = $stmt; - $this->_connectionID = $connection; - } - - function Execute($inputArr=false) - { - $savestmt = $this->_connectionID->_stmt; - $rs = $this->_connectionID->Execute(array(false,$this->_stmt),$inputArr); - $this->_connectionID->_stmt = $savestmt; - return $rs; - } - - function InParameter(&$var,$name,$maxLen=4000,$type=false) - { - - if ($type) $this->_stmt->bindParam($name,$var,$type,$maxLen); - else $this->_stmt->bindParam($name, $var); - } - - function Affected_Rows() - { - return ($this->_stmt) ? $this->_stmt->rowCount() : 0; - } - - function ErrorMsg() - { - if ($this->_stmt) $arr = $this->_stmt->errorInfo(); - else $arr = $this->_connectionID->errorInfo(); - - if (is_array($arr)) { - if ((integer) $arr[0] && isset($arr[2])) return $arr[2]; - else return ''; - } else return '-1'; - } - - function NumCols() - { - return ($this->_stmt) ? $this->_stmt->columnCount() : 0; - } - - function ErrorNo() - { - if ($this->_stmt) return $this->_stmt->errorCode(); - else return $this->_connectionID->errorInfo(); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_pdo extends ADORecordSet { - - var $bind = false; - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - - function ADORecordSet_pdo($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->adodbFetchMode = $mode; - switch($mode) { - case ADODB_FETCH_NUM: $mode = PDO::FETCH_NUM; break; - case ADODB_FETCH_ASSOC: $mode = PDO::FETCH_ASSOC; break; - - case ADODB_FETCH_BOTH: - default: $mode = PDO::FETCH_BOTH; break; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - $this->ADORecordSet($id); - } - - - function Init() - { - if ($this->_inited) return; - $this->_inited = true; - if ($this->_queryID) @$this->_initrs(); - else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - } - if ($this->_numOfRows != 0 && $this->_currentRow == -1) { - $this->_currentRow = 0; - if ($this->EOF = ($this->_fetch() === false)) { - $this->_numOfRows = 0; // _numOfRows could be -1 - } - } else { - $this->EOF = true; - } - } - - function _initrs() - { - global $ADODB_COUNTRECS; - - $this->_numOfRows = ($ADODB_COUNTRECS) ? @$this->_queryID->rowCount() : -1; - if (!$this->_numOfRows) $this->_numOfRows = -1; - $this->_numOfFields = $this->_queryID->columnCount(); - } - - // returns the field object - function &FetchField($fieldOffset = -1) - { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $arr = @$this->_queryID->getColumnMeta($fieldOffset); - if (!$arr) { - $o->name = 'bad getColumnMeta()'; - $o->max_length = -1; - $o->type = 'VARCHAR'; - $o->precision = 0; - # $false = false; - return $o; - } - //adodb_pr($arr); - $o->name = $arr['name']; - if (isset($arr['native_type']) && $arr['native_type'] <> "null") $o->type = $arr['native_type']; - else $o->type = adodb_pdo_type($arr['pdo_type']); - $o->max_length = $arr['len']; - $o->precision = $arr['precision']; - - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - function _seek($row) - { - return false; - } - - function _fetch() - { - if (!$this->_queryID) return false; - - $this->fields = $this->_queryID->fetch($this->fetchMode); - return !empty($this->fields); - } - - function _close() - { - $this->_queryID = false; - } - - function Fields($colname) - { - if ($this->adodbFetchMode != ADODB_FETCH_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mssql.inc.php.svn-base deleted file mode 100755 index 9470dd8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mssql.inc.php.svn-base +++ /dev/null @@ -1,61 +0,0 @@ -hasTransactions = false; ## <<< BUG IN PDO mssql driver - $parentDriver->_bindInputArray = false; - $parentDriver->hasInsertID = true; - } - - function ServerInfo() - { - return ADOConnection::ServerInfo(); - } - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - function MetaTables() - { - return false; - } - - function MetaColumns() - { - return false; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mysql.inc.php.svn-base deleted file mode 100755 index b80241df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_mysql.inc.php.svn-base +++ /dev/null @@ -1,168 +0,0 @@ -hasTransactions = false; - $parentDriver->_bindInputArray = false; - $parentDriver->hasInsertID = true; - $parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); - } - - // dayFraction is a day in floating point - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - function &MetaColumns($table) - { - $this->_findschema($table,$schema); - if ($schema) { - $dbName = $this->database; - $this->SelectDB($schema); - } - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($schema) { - $this->SelectDB($dbName); - } - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) { - $false = false; - return $false; - } - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $arr = explode(",",$query_array[2]); - $fld->enums = $arr; - $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6 - $fld->max_length = ($zlen > 0) ? $zlen : 1; - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0) - { - $offsetStr =($offset>=0) ? "$offset," : ''; - // jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220 - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr$nrows",$inputarr); - else - $rs =& $this->Execute($sql." LIMIT $offsetStr$nrows",$inputarr); - return $rs; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_oci.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_oci.inc.php.svn-base deleted file mode 100755 index 9d40f14a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_oci.inc.php.svn-base +++ /dev/null @@ -1,93 +0,0 @@ -_bindInputArray = true; - $parentDriver->_nestedSQL = true; - if ($this->_initdate) { - $parentDriver->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'"); - } - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtoupper($mask)); - $this->metaTablesSQL .= " AND table_name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!$rs) { - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->scale = $rs->fields[3]; - if ($rs->fields[1] == 'NUMBER' && $rs->fields[3] == 0) { - $fld->type ='INT'; - $fld->max_length = $rs->fields[4]; - } - $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0); - $fld->binary = (strpos($fld->type,'BLOB') !== false); - $fld->default_value = $rs->fields[6]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_pgsql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_pgsql.inc.php.svn-base deleted file mode 100755 index e802d799..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-pdo_pgsql.inc.php.svn-base +++ /dev/null @@ -1,230 +0,0 @@ - 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // used when schema defined - var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum -FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n -WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) - and c.relnamespace=n.oid and n.nspname='%s' - and a.attname not like '....%%' AND a.attnum > 0 - AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // get primary key etc -- from Freek Dijkstra - var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key - FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"; - - var $hasAffectedRows = true; - var $hasLimit = false; // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - // below suggested by Freek Dijkstra - var $true = 't'; // string that represents TRUE for a database - var $false = 'f'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $hasMoveFirst = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT NEXTVAL('%s')"; - var $_genSeqSQL = "CREATE SEQUENCE %s START %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum"; - var $random = 'random()'; /// random function - var $concat_operator='||'; - - function _init($parentDriver) - { - - $parentDriver->hasTransactions = false; ## <<< BUG IN PDO pgsql driver - $parentDriver->hasInsertID = true; - $parentDriver->_nestedSQL = true; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; - $limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ''; - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $info = $this->ServerInfo(); - if ($info['version'] >= 7.3) { - $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and schemaname not in ( 'pg_catalog','information_schema') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; - } - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtolower($mask)); - if ($info['version']>=7.3) - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') - union -select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; - else - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask - union -select viewname,'V' from pg_views where viewname like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - - if ($normalize) $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema)); - else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) { - $false = false; - return $false; - } - if (!empty($this->metaKeySQL)) { - // If we want the primary keys, we have to issue a separate query - // Of course, a modified version of the metaColumnsSQL query using a - // LEFT JOIN would have been much more elegant, but postgres does - // not support OUTER JOINS. So here is the clumsy way. - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rskey = $this->Execute(sprintf($this->metaKeySQL,($table))); - // fetch all result in once for performance. - $keys =& $rskey->GetArray(); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - $rskey->Close(); - unset($rskey); - } - - $rsdefa = array(); - if (!empty($this->metaDefaultsSQL)) { - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $sql = sprintf($this->metaDefaultsSQL, ($table)); - $rsdef = $this->Execute($sql); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rsdef) { - while (!$rsdef->EOF) { - $num = $rsdef->fields['num']; - $s = $rsdef->fields['def']; - if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */ - $s = substr($s, 1); - $s = substr($s, 0, strlen($s) - 1); - } - - $rsdefa[$num] = $s; - $rsdef->MoveNext(); - } - } else { - ADOConnection::outp( "==> SQL => " . $sql); - } - unset($rsdef); - } - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; - if ($fld->max_length <= 0) $fld->max_length = -1; - if ($fld->type == 'numeric') { - $fld->scale = $fld->max_length & 0xFFFF; - $fld->max_length >>= 16; - } - // dannym - // 5 hasdefault; 6 num-of-column - $fld->has_default = ($rs->fields[5] == 't'); - if ($fld->has_default) { - $fld->default_value = $rsdefa[$rs->fields[6]]; - } - - //Freek - if ($rs->fields[4] == $this->true) { - $fld->not_null = true; - } - - // Freek - if (is_array($keys)) { - foreach($keys as $key) { - if ($fld->name == $key['column_name'] AND $key['primary_key'] == $this->true) - $fld->primary_key = true; - if ($fld->name == $key['column_name'] AND $key['unique_key'] == $this->true) - $fld->unique = true; // What name is more compatible? - } - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) { - $false = false; - return $false; - } else return $retarr; - - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres.inc.php.svn-base deleted file mode 100755 index 5e8ce48e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres.inc.php.svn-base +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres64.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres64.inc.php.svn-base deleted file mode 100755 index 69d44fc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres64.inc.php.svn-base +++ /dev/null @@ -1,1064 +0,0 @@ - - jlim - changed concat operator to || and data types to MetaType to match documented pgsql types - see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm - 22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" - 27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" - 15 Dec 2000 jlim - added changes suggested by Additional code changes by "Eric G. Werk" egw@netguide.dk. - 31 Jan 2002 jlim - finally installed postgresql. testing - 01 Mar 2001 jlim - Freek Dijkstra changes, also support for text type - - See http://www.varlena.com/varlena/GeneralBits/47.php - - -- What indexes are on my table? - select * from pg_indexes where tablename = 'tablename'; - - -- What triggers are on my table? - select c.relname as "Table", t.tgname as "Trigger Name", - t.tgconstrname as "Constraint Name", t.tgenabled as "Enabled", - t.tgisconstraint as "Is Constraint", cc.relname as "Referenced Table", - p.proname as "Function Name" - from pg_trigger t, pg_class c, pg_class cc, pg_proc p - where t.tgfoid = p.oid and t.tgrelid = c.oid - and t.tgconstrrelid = cc.oid - and c.relname = 'tablename'; - - -- What constraints are on my table? - select r.relname as "Table", c.conname as "Constraint Name", - contype as "Constraint Type", conkey as "Key Columns", - confkey as "Foreign Columns", consrc as "Source" - from pg_class r, pg_constraint c - where r.oid = c.conrelid - and relname = 'tablename'; - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -function adodb_addslashes($s) -{ - $len = strlen($s); - if ($len == 0) return "''"; - if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted - - return "'".addslashes($s)."'"; -} - -class ADODB_postgres64 extends ADOConnection{ - var $databaseType = 'postgres64'; - var $dataProvider = 'postgres'; - var $hasInsertID = true; - var $_resultid = false; - var $concat_operator='||'; - var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1"; - var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages', - 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%'"; - //"select tablename from pg_tables where tablename not like 'pg_%' order by 1"; - var $isoDates = true; // accepts dates in ISO format - var $sysDate = "CURRENT_DATE"; - var $sysTimeStamp = "CURRENT_TIMESTAMP"; - var $blobEncodeType = 'C'; - var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum - FROM pg_class c, pg_attribute a,pg_type t - WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%' -AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // used when schema defined - var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum -FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n -WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) - and c.relnamespace=n.oid and n.nspname='%s' - and a.attname not like '....%%' AND a.attnum > 0 - AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // get primary key etc -- from Freek Dijkstra - var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key - FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"; - - var $hasAffectedRows = true; - var $hasLimit = false; // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - // below suggested by Freek Dijkstra - var $true = 'TRUE'; // string that represents TRUE for a database - var $false = 'FALSE'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d H:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $hasMoveFirst = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT NEXTVAL('%s')"; - var $_genSeqSQL = "CREATE SEQUENCE %s START %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum"; - var $random = 'random()'; /// random function - var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4 - // http://bugs.php.net/bug.php?id=25404 - - var $_bindInputArray = false; // requires postgresql 7.3+ and ability to modify database - var $disableBlobs = false; // set to true to disable blob checking, resulting in 2-5% improvement in performance. - - // The last (fmtTimeStamp is not entirely correct: - // PostgreSQL also has support for time zones, - // and writes these time in this format: "2001-03-01 18:59:26+02". - // There is no code for the "+02" time zone information, so I just left that out. - // I'm not familiar enough with both ADODB as well as Postgres - // to know what the concequences are. The other values are correct (wheren't in 0.94) - // -- Freek Dijkstra - - function ADODB_postgres64() - { - // changes the metaColumnsSQL, adds columns: attnum[6] - } - - function ServerInfo() - { - if (isset($this->version)) return $this->version; - - $arr['description'] = $this->GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - $this->version = $arr; - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " coalesce($field, $ifNull) "; - } - - // get the last id - never tested - function pg_insert_id($tablename,$fieldname) - { - $result=pg_exec($this->_connectionID, "SELECT last_value FROM ${tablename}_${fieldname}_seq"); - if ($result) { - $arr = @pg_fetch_row($result,0); - pg_freeresult($result); - if (isset($arr[0])) return $arr[0]; - } - return false; - } - -/* Warning from http://www.php.net/manual/function.pg-getlastoid.php: -Using a OID as a unique identifier is not generally wise. -Unless you are very careful, you might end up with a tuple having -a different OID if a database must be reloaded. */ - function _insertid($table,$column) - { - if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; - $oid = pg_getlastoid($this->_resultid); - // to really return the id, we need the table and column-name, else we can only return the oid != id - return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); - } - -// I get this error with PHP before 4.0.6 - jlim -// Warning: This compilation does not support pg_cmdtuples() in adodb-postgres.inc.php on line 44 - function _affectedrows() - { - if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; - return pg_cmdtuples($this->_resultid); - } - - - // returns true/false - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - return @pg_Exec($this->_connectionID, "begin ".$this->_transmode); - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if (!$this->transCnt) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - // returns true/false. - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - $this->transCnt -= 1; - return @pg_Exec($this->_connectionID, "commit"); - } - - // returns true/false - function RollbackTrans() - { - if ($this->transOff) return true; - $this->transCnt -= 1; - return @pg_Exec($this->_connectionID, "rollback"); - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $info = $this->ServerInfo(); - if ($info['version'] >= 7.3) { - $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and schemaname not in ( 'pg_catalog','information_schema') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; - } - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtolower($mask)); - if ($info['version']>=7.3) - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') - union -select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; - else - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask - union -select viewname,'V' from pg_views where viewname like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - - // if magic quotes disabled, use pg_escape_string() - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - if (ADODB_PHPVER >= 0x5200) { - return "'".pg_escape_string($this->_connectionID,$s)."'"; - } - if (ADODB_PHPVER >= 0x4200) { - return "'".pg_escape_string($s)."'"; - } - if ($this->replaceQuote[0] == '\\'){ - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\\000"),$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'TO_CHAR('.$col.",'"; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= 'YYYY'; - break; - case 'Q': - case 'q': - $s .= 'Q'; - break; - - case 'M': - $s .= 'Mon'; - break; - - case 'm': - $s .= 'MM'; - break; - case 'D': - case 'd': - $s .= 'DD'; - break; - - case 'H': - $s.= 'HH24'; - break; - - case 'h': - $s .= 'HH'; - break; - - case 'i': - $s .= 'MI'; - break; - - case 's': - $s .= 'SS'; - break; - - case 'a': - case 'A': - $s .= 'AM'; - break; - - case 'w': - $s .= 'D'; - break; - - case 'l': - $s .= 'DAY'; - break; - - case 'W': - $s .= 'WW'; - break; - - default: - // handle escape characters... - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - if (strpos('-/.:;, ',$ch) !== false) $s .= $ch; - else $s .= '"'.$ch.'"'; - - } - } - return $s. "')"; - } - - - - /* - * Load a Large Object from a file - * - the procedure stores the object id in the table and imports the object using - * postgres proprietary blob handling routines - * - * contributed by Mattia Rossi mattia@technologist.com - * modified for safe mode by juraj chlebec - */ - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - pg_exec ($this->_connectionID, "begin"); - - $fd = fopen($path,'r'); - $contents = fread($fd,filesize($path)); - fclose($fd); - - $oid = pg_lo_create($this->_connectionID); - $handle = pg_lo_open($this->_connectionID, $oid, 'w'); - pg_lo_write($handle, $contents); - pg_lo_close($handle); - - // $oid = pg_lo_import ($path); - pg_exec($this->_connectionID, "commit"); - $rs = ADOConnection::UpdateBlob($table,$column,$oid,$where,$blobtype); - $rez = !empty($rs); - return $rez; - } - - /* - * Deletes/Unlinks a Blob from the database, otherwise it - * will be left behind - * - * Returns TRUE on success or FALSE on failure. - * - * contributed by Todd Rogers todd#windfox.net - */ - function BlobDelete( $blob ) - { - pg_exec ($this->_connectionID, "begin"); - $result = @pg_lo_unlink($blob); - pg_exec ($this->_connectionID, "commit"); - return( $result ); - } - - /* - Hueristic - not guaranteed to work. - */ - function GuessOID($oid) - { - if (strlen($oid)>16) return false; - return is_numeric($oid); - } - - /* - * If an OID is detected, then we use pg_lo_* to open the oid file and read the - * real blob from the db using the oid supplied as a parameter. If you are storing - * blobs using bytea, we autodetect and process it so this function is not needed. - * - * contributed by Mattia Rossi mattia@technologist.com - * - * see http://www.postgresql.org/idocs/index.php?largeobjects.html - * - * Since adodb 4.54, this returns the blob, instead of sending it to stdout. Also - * added maxsize parameter, which defaults to $db->maxblobsize if not defined. - */ - function BlobDecode($blob,$maxsize=false,$hastrans=true) - { - if (!$this->GuessOID($blob)) return $blob; - - if ($hastrans) @pg_exec($this->_connectionID,"begin"); - $fd = @pg_lo_open($this->_connectionID,$blob,"r"); - if ($fd === false) { - if ($hastrans) @pg_exec($this->_connectionID,"commit"); - return $blob; - } - if (!$maxsize) $maxsize = $this->maxblobsize; - $realblob = @pg_loread($fd,$maxsize); - @pg_loclose($fd); - if ($hastrans) @pg_exec($this->_connectionID,"commit"); - return $realblob; - } - - /* - See http://www.postgresql.org/idocs/index.php?datatype-binary.html - - NOTE: SQL string literals (input strings) must be preceded with two backslashes - due to the fact that they must pass through two parsers in the PostgreSQL - backend. - */ - function BlobEncode($blob) - { - if (ADODB_PHPVER >= 0x5200) return pg_escape_bytea($this->_connectionID, $blob); - if (ADODB_PHPVER >= 0x4200) return pg_escape_bytea($blob); - - /*92=backslash, 0=null, 39=single-quote*/ - $badch = array(chr(92),chr(0),chr(39)); # \ null ' - $fixch = array('\\\\134','\\\\000','\\\\047'); - return adodb_str_replace($badch,$fixch,$blob); - - // note that there is a pg_escape_bytea function only for php 4.2.0 or later - } - - // assumes bytea for blob, and varchar for clob - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - if ($blobtype == 'CLOB') { - return $this->Execute("UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where"); - } - // do not use bind params which uses qstr(), as blobencode() already quotes data - return $this->Execute("UPDATE $table SET $column='".$this->BlobEncode($val)."'::bytea WHERE $where"); - } - - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - else if (strncmp($date,"'",1) == 0) { - $len = strlen($date); - if (10 <= $len && $len <= 12) $date = 'date '.$date; - else $date = 'timestamp '.$date; - } - return "($date+interval'$dayFraction days')"; - } - - - // for schema support, pass in the $table param "$schema.$tabname". - // converts field names to lowercase, $upper is ignored - // see http://phplens.com/lens/lensforum/msgs.php?id=14018 for more info - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $false = false; - $this->_findschema($table,$schema); - - if ($normalize) $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema)); - else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) { - return $false; - } - if (!empty($this->metaKeySQL)) { - // If we want the primary keys, we have to issue a separate query - // Of course, a modified version of the metaColumnsSQL query using a - // LEFT JOIN would have been much more elegant, but postgres does - // not support OUTER JOINS. So here is the clumsy way. - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rskey = $this->Execute(sprintf($this->metaKeySQL,($table))); - // fetch all result in once for performance. - $keys =& $rskey->GetArray(); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - $rskey->Close(); - unset($rskey); - } - - $rsdefa = array(); - if (!empty($this->metaDefaultsSQL)) { - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $sql = sprintf($this->metaDefaultsSQL, ($table)); - $rsdef = $this->Execute($sql); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rsdef) { - while (!$rsdef->EOF) { - $num = $rsdef->fields['num']; - $s = $rsdef->fields['def']; - if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */ - $s = substr($s, 1); - $s = substr($s, 0, strlen($s) - 1); - } - - $rsdefa[$num] = $s; - $rsdef->MoveNext(); - } - } else { - ADOConnection::outp( "==> SQL => " . $sql); - } - unset($rsdef); - } - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->attnum = $rs->fields[6]; - - if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; - if ($fld->max_length <= 0) $fld->max_length = -1; - if ($fld->type == 'numeric') { - $fld->scale = $fld->max_length & 0xFFFF; - $fld->max_length >>= 16; - } - // dannym - // 5 hasdefault; 6 num-of-column - $fld->has_default = ($rs->fields[5] == 't'); - if ($fld->has_default) { - $fld->default_value = $rsdefa[$rs->fields[6]]; - } - - //Freek - $fld->not_null = $rs->fields[4] == 't'; - - - // Freek - if (is_array($keys)) { - foreach($keys as $key) { - if ($fld->name == $key['column_name'] AND $key['primary_key'] == 't') - $fld->primary_key = true; - if ($fld->name == $key['column_name'] AND $key['unique_key'] == 't') - $fld->unique = true; // What name is more compatible? - } - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - - } - - function &MetaIndexes ($table, $primary = FALSE) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - - if ($schema) { // requires pgsql 7.3+ - pg_namespace used. - $sql = ' -SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" -FROM pg_catalog.pg_class c -JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid -JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid - ,pg_namespace n -WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\')) and c.relnamespace=c2.relnamespace and c.relnamespace=n.oid and n.nspname=\'%s\''; - } else { - $sql = ' -SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" -FROM pg_catalog.pg_class c -JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid -JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid -WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))'; - } - - if ($primary == FALSE) { - $sql .= ' AND i.indisprimary=false;'; - } - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute(sprintf($sql,$table,$table,$schema)); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - $false = false; - return $false; - } - - $col_names = $this->MetaColumnNames($table,true,true); - //3rd param is use attnum, - // see http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976 - $indexes = array(); - while ($row = $rs->FetchRow()) { - $columns = array(); - foreach (explode(' ', $row[2]) as $col) { - $columns[] = $col_names[$col]; - } - - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 't'), - 'columns' => $columns - ); - } - return $indexes; - } - - // returns true or false - // - // examples: - // $db->Connect("host=host1 user=user1 password=secret port=4341"); - // $db->Connect('host1','user1','secret'); - function _connect($str,$user='',$pwd='',$db='',$ctype=0) - { - - if (!function_exists('pg_connect')) return null; - - $this->_errorMsg = false; - - if ($user || $pwd || $db) { - $user = adodb_addslashes($user); - $pwd = adodb_addslashes($pwd); - if (strlen($db) == 0) $db = 'template1'; - $db = adodb_addslashes($db); - if ($str) { - $host = split(":", $str); - if ($host[0]) $str = "host=".adodb_addslashes($host[0]); - else $str = ''; - if (isset($host[1])) $str .= " port=$host[1]"; - else if (!empty($this->port)) $str .= " port=".$this->port; - } - if ($user) $str .= " user=".$user; - if ($pwd) $str .= " password=".$pwd; - if ($db) $str .= " dbname=".$db; - } - - //if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432"; - - if ($ctype === 1) { // persistent - $this->_connectionID = pg_pconnect($str); - } else { - if ($ctype === -1) { // nconnect, we trick pgsql ext by changing the connection str - static $ncnt; - - if (empty($ncnt)) $ncnt = 1; - else $ncnt += 1; - - $str .= str_repeat(' ',$ncnt); - } - $this->_connectionID = pg_connect($str); - } - if ($this->_connectionID === false) return false; - $this->Execute("set datestyle='ISO'"); - - $info = $this->ServerInfo(); - $this->pgVersion = (float) substr($info['version'],0,3); - if ($this->pgVersion >= 7.1) { // good till version 999 - $this->_nestedSQL = true; - } - return true; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName,-1); - } - - // returns true or false - // - // examples: - // $db->PConnect("host=host1 user=user1 password=secret port=4341"); - // $db->PConnect('host1','user1','secret'); - function _pconnect($str,$user='',$pwd='',$db='') - { - return $this->_connect($str,$user,$pwd,$db,1); - } - - - // returns queryID or false - function _query($sql,$inputarr) - { - $this->_errorMsg = false; - if ($inputarr) { - /* - It appears that PREPARE/EXECUTE is slower for many queries. - - For query executed 1000 times: - "select id,firstname,lastname from adoxyz - where firstname not like ? and lastname not like ? and id = ?" - - with plan = 1.51861286163 secs - no plan = 1.26903700829 secs - - - - */ - $plan = 'P'.md5($sql); - - $execp = ''; - foreach($inputarr as $v) { - if ($execp) $execp .= ','; - if (is_string($v)) { - if (strncmp($v,"'",1) !== 0) $execp .= $this->qstr($v); - } else { - $execp .= $v; - } - } - - if ($execp) $exsql = "EXECUTE $plan ($execp)"; - else $exsql = "EXECUTE $plan"; - - - $rez = @pg_exec($this->_connectionID,$exsql); - if (!$rez) { - # Perhaps plan does not exist? Prepare/compile plan. - $params = ''; - foreach($inputarr as $v) { - if ($params) $params .= ','; - if (is_string($v)) { - $params .= 'VARCHAR'; - } else if (is_integer($v)) { - $params .= 'INTEGER'; - } else { - $params .= "REAL"; - } - } - $sqlarr = explode('?',$sql); - //print_r($sqlarr); - $sql = ''; - $i = 1; - foreach($sqlarr as $v) { - $sql .= $v.' $'.$i; - $i++; - } - $s = "PREPARE $plan ($params) AS ".substr($sql,0,strlen($sql)-2); - //adodb_pr($s); - $rez = pg_exec($this->_connectionID,$s); - //echo $this->ErrorMsg(); - } - if ($rez) - $rez = pg_exec($this->_connectionID,$exsql); - } else { - //adodb_backtrace(); - $rez = pg_exec($this->_connectionID,$sql); - } - // check if no data returned, then no need to create real recordset - if ($rez && pg_numfields($rez) <= 0) { - if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { - pg_freeresult($this->_resultid); - } - $this->_resultid = $rez; - return true; - } - - return $rez; - } - - function _errconnect() - { - if (defined('DB_ERROR_CONNECT_FAILED')) return DB_ERROR_CONNECT_FAILED; - else return 'Database connection failed'; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (ADODB_PHPVER >= 0x4300) { - if (!empty($this->_resultid)) { - $this->_errorMsg = @pg_result_error($this->_resultid); - if ($this->_errorMsg) return $this->_errorMsg; - } - - if (!empty($this->_connectionID)) { - $this->_errorMsg = @pg_last_error($this->_connectionID); - } else $this->_errorMsg = $this->_errconnect(); - } else { - if (empty($this->_connectionID)) $this->_errconnect(); - else $this->_errorMsg = @pg_errormessage($this->_connectionID); - } - return $this->_errorMsg; - } - - function ErrorNo() - { - $e = $this->ErrorMsg(); - if (strlen($e)) { - return ADOConnection::MetaError($e); - } - return 0; - } - - // returns true or false - function _close() - { - if ($this->transCnt) $this->RollbackTrans(); - if ($this->_resultid) { - @pg_freeresult($this->_resultid); - $this->_resultid = false; - } - @pg_close($this->_connectionID); - $this->_connectionID = false; - return true; - } - - - /* - * Maximum size of C field - */ - function CharMax() - { - return 1000000000; // should be 1 Gb? - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 1000000000; // should be 1 Gb? - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_postgres64 extends ADORecordSet{ - var $_blobArr; - var $databaseType = "postgres64"; - var $canSeek = true; - function ADORecordSet_postgres64($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = PGSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function &GetRowAssoc($upper=true) - { - if ($this->fetchMode == PGSQL_ASSOC && !$upper) return $this->fields; - $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - function _initrs() - { - global $ADODB_COUNTRECS; - $qid = $this->_queryID; - $this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($qid):-1; - $this->_numOfFields = @pg_numfields($qid); - - // cache types for blob decode check - // apparently pg_fieldtype actually performs an sql query on the database to get the type. - if (empty($this->connection->noBlobs)) - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - if (pg_fieldtype($qid,$i) == 'bytea') { - $this->_blobArr[$i] = pg_fieldname($qid,$i); - } - } - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != PGSQL_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function &FetchField($off = 0) - { - // offsets begin at 0 - - $o= new ADOFieldObject(); - $o->name = @pg_fieldname($this->_queryID,$off); - $o->type = @pg_fieldtype($this->_queryID,$off); - $o->max_length = @pg_fieldsize($this->_queryID,$off); - return $o; - } - - function _seek($row) - { - return @pg_fetch_row($this->_queryID,$row); - } - - function _decode($blob) - { - eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";'); - return $realblob; - } - - function _fixblobs() - { - if ($this->fetchMode == PGSQL_NUM || $this->fetchMode == PGSQL_BOTH) { - foreach($this->_blobArr as $k => $v) { - $this->fields[$k] = ADORecordSet_postgres64::_decode($this->fields[$k]); - } - } - if ($this->fetchMode == PGSQL_ASSOC || $this->fetchMode == PGSQL_BOTH) { - foreach($this->_blobArr as $k => $v) { - $this->fields[$v] = ADORecordSet_postgres64::_decode($this->fields[$v]); - } - } - } - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - if (is_array($this->fields) && $this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - return true; - } - } - $this->fields = false; - $this->EOF = true; - } - return false; - } - - function _fetch() - { - - if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) - return false; - - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); - - return (is_array($this->fields)); - } - - function _close() - { - return @pg_freeresult($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'MONEY': // stupid, postgres expects money to be a string - case 'INTERVAL': - case 'CHAR': - case 'CHARACTER': - case 'VARCHAR': - case 'NAME': - case 'BPCHAR': - case '_VARCHAR': - case 'INET': - case 'MACADDR': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - return 'X'; - - case 'IMAGE': // user defined type - case 'BLOB': // user defined type - case 'BIT': // This is a bit string, not a single bit, so don't return 'L' - case 'VARBIT': - case 'BYTEA': - return 'B'; - - case 'BOOL': - case 'BOOLEAN': - return 'L'; - - case 'DATE': - return 'D'; - - - case 'TIMESTAMP WITHOUT TIME ZONE': - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - case 'TIMESTAMPTZ': - return 'T'; - - case 'SMALLINT': - case 'BIGINT': - case 'INTEGER': - case 'INT8': - case 'INT4': - case 'INT2': - if (isset($fieldobj) && - empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I'; - - case 'OID': - case 'SERIAL': - return 'R'; - - default: - return 'N'; - } - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres7.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres7.inc.php.svn-base deleted file mode 100755 index 5c3d7bb6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres7.inc.php.svn-base +++ /dev/null @@ -1,264 +0,0 @@ -ADODB_postgres64(); - if (ADODB_ASSOC_CASE !== 2) { - $this->rsPrefix .= 'assoc_'; - } - $this->_bindInputArray = PHP_VERSION >= 5.1; - } - - - // the following should be compat with postgresql 7.2, - // which makes obsolete the LIMIT limit,offset syntax - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET ".((integer)$offset) : ''; - $limitStr = ($nrows >= 0) ? " LIMIT ".((integer)$nrows) : ''; - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - /* - function Prepare($sql) - { - $info = $this->ServerInfo(); - if ($info['version']>=7.3) { - return array($sql,false); - } - return $sql; - } - */ - - - // from Edward Jaramilla, improved version - works on pg 7.4 - function MetaForeignKeys($table, $owner=false, $upper=false) - { - $sql = 'SELECT t.tgargs as args - FROM - pg_trigger t,pg_class c,pg_proc p - WHERE - t.tgenabled AND - t.tgrelid = c.oid AND - t.tgfoid = p.oid AND - p.proname = \'RI_FKey_check_ins\' AND - c.relname = \''.strtolower($table).'\' - ORDER BY - t.tgrelid'; - - $rs =& $this->Execute($sql); - - if (!$rs || $rs->EOF) return false; - - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $data = explode(chr(0), $v['args']); - $size = count($data)-1; //-1 because the last node is empty - for($i = 4; $i < $size; $i++) { - if ($upper) - $a[strtoupper($data[2])][] = strtoupper($data[$i].'='.$data[++$i]); - else - $a[$data[2]][] = $data[$i].'='.$data[++$i]; - } - } - return $a; - } - - function _query($sql,$inputarr) - { - if (! $this->_bindInputArray) { - // We don't have native support for parameterized queries, so let's emulate it at the parent - return ADODB_postgres64::_query($sql, $inputarr); - } - $this->_errorMsg = false; - // -- added Cristiano da Cunha Duarte - if ($inputarr) { - $sqlarr = explode('?',trim($sql)); - $sql = ''; - $i = 1; - $last = sizeof($sqlarr)-1; - foreach($sqlarr as $v) { - if ($last < $i) $sql .= $v; - else $sql .= $v.' $'.$i; - $i++; - } - - $rez = pg_query_params($this->_connectionID,$sql, $inputarr); - } else { - $rez = pg_query($this->_connectionID,$sql); - } - // check if no data returned, then no need to create real recordset - if ($rez && pg_numfields($rez) <= 0) { - if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { - pg_freeresult($this->_resultid); - } - $this->_resultid = $rez; - return true; - } - return $rez; - } - - // this is a set of functions for managing client encoding - very important if the encodings - // of your database and your output target (i.e. HTML) don't match - //for instance, you may have UNICODE database and server it on-site as WIN1251 etc. - // GetCharSet - get the name of the character set the client is using now - // the functions should work with Postgres 7.0 and above, the set of charsets supported - // depends on compile flags of postgres distribution - if no charsets were compiled into the server - // it will return 'SQL_ANSI' always - function GetCharSet() - { - //we will use ADO's builtin property charSet - $this->charSet = @pg_client_encoding($this->_connectionID); - if (!$this->charSet) { - return false; - } else { - return $this->charSet; - } - } - - // SetCharSet - switch the client encoding - function SetCharSet($charset_name) - { - $this->GetCharSet(); - if ($this->charSet !== $charset_name) { - $if = pg_set_client_encoding($this->_connectionID, $charset_name); - if ($if == "0" & $this->GetCharSet() == $charset_name) { - return true; - } else return false; - } else return true; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_postgres7 extends ADORecordSet_postgres64{ - - var $databaseType = "postgres7"; - - - function ADORecordSet_postgres7($queryID,$mode=false) - { - $this->ADORecordSet_postgres64($queryID,$mode); - } - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if (is_array($this->fields)) { - if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); - return true; - } - } - $this->fields = false; - $this->EOF = true; - } - return false; - } - -} - -class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{ - - var $databaseType = "postgres7"; - - - function ADORecordSet_assoc_postgres7($queryID,$mode=false) - { - $this->ADORecordSet_postgres64($queryID,$mode); - } - - function _fetch() - { - if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) - return false; - - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if ($this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - $this->_updatefields(); - } - - return (is_array($this->fields)); - } - - // Create associative array - function _updatefields() - { - if (ADODB_ASSOC_CASE == 2) return; // native - - $arr = array(); - $lowercase = (ADODB_ASSOC_CASE == 0); - - foreach($this->fields as $k => $v) { - if (is_integer($k)) $arr[$k] = $v; - else { - if ($lowercase) - $arr[strtolower($k)] = $v; - else - $arr[strtoupper($k)] = $v; - } - } - $this->fields = $arr; - } - - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if (is_array($this->fields)) { - if ($this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - - $this->_updatefields(); - } - return true; - } - } - - - $this->fields = false; - $this->EOF = true; - } - return false; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres8.inc.php.svn-base deleted file mode 100755 index f3712a39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-postgres8.inc.php.svn-base +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-proxy.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-proxy.inc.php.svn-base deleted file mode 100755 index 022a64ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-proxy.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ -ADORecordset($id,$mode); - } - }; -} // define - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sapdb.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sapdb.inc.php.svn-base deleted file mode 100755 index 493893e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sapdb.inc.php.svn-base +++ /dev/null @@ -1,184 +0,0 @@ -curmode = SQL_CUR_USE_ODBC; - $this->ADODB_odbc(); - } - - function ServerInfo() - { - $info = ADODB_odbc::ServerInfo(); - if (!$info['version'] && preg_match('/([0-9.]+)/',$info['description'],$matches)) { - $info['version'] = $matches[1]; - } - return $info; - } - - function MetaPrimaryKeys($table) - { - $table = $this->Quote(strtoupper($table)); - - return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"); - } - - function &MetaIndexes ($table, $primary = FALSE) - { - $table = $this->Quote(strtoupper($table)); - - $sql = "SELECT INDEXNAME,TYPE,COLUMNNAME FROM INDEXCOLUMNS ". - " WHERE TABLENAME=$table". - " ORDER BY INDEXNAME,COLUMNNO"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - $indexes[$row[0]]['unique'] = $row[1] == 'UNIQUE'; - $indexes[$row[0]]['columns'][] = $row[2]; - } - if ($primary) { - $indexes['SYSPRIMARYKEYINDEX'] = array( - 'unique' => True, // by definition - 'columns' => $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"), - ); - } - return $indexes; - } - - function &MetaColumns ($table) - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $table = $this->Quote(strtoupper($table)); - - $retarr = array(); - foreach($this->GetAll("SELECT COLUMNNAME,DATATYPE,LEN,DEC,NULLABLE,MODE,\"DEFAULT\",CASE WHEN \"DEFAULT\" IS NULL THEN 0 ELSE 1 END AS HAS_DEFAULT FROM COLUMNS WHERE tablename=$table ORDER BY pos") as $column) - { - $fld = new ADOFieldObject(); - $fld->name = $column[0]; - $fld->type = $column[1]; - $fld->max_length = $fld->type == 'LONG' ? 2147483647 : $column[2]; - $fld->scale = $column[3]; - $fld->not_null = $column[4] == 'NO'; - $fld->primary_key = $column[5] == 'KEY'; - if ($fld->has_default = $column[7]) { - if ($fld->primary_key && $column[6] == 'DEFAULT SERIAL (1)') { - $fld->auto_increment = true; - $fld->has_default = false; - } else { - $fld->default_value = $column[6]; - switch($fld->type) { - case 'VARCHAR': - case 'CHARACTER': - case 'LONG': - $fld->default_value = $column[6]; - break; - default: - $fld->default_value = trim($column[6]); - break; - } - } - } - $retarr[$fld->name] = $fld; - } - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - return $retarr; - } - - function MetaColumnNames($table) - { - $table = $this->Quote(strtoupper($table)); - - return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table ORDER BY pos"); - } - - // unlike it seems, this depends on the db-session and works in a multiuser environment - function _insertid($table,$column) - { - return empty($table) ? False : $this->GetOne("SELECT $table.CURRVAL FROM DUAL"); - } - - /* - SelectLimit implementation problems: - - The following will return random 10 rows as order by performed after "WHERE rowno<10" - which is not ideal... - - select * from table where rowno < 10 order by 1 - - This means that we have to use the adoconnection base class SelectLimit when - there is an "order by". - - See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html - */ - -}; - - -class ADORecordSet_sapdb extends ADORecordSet_odbc { - - var $databaseType = "sapdb"; - - function ADORecordSet_sapdb($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlanywhere.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlanywhere.inc.php.svn-base deleted file mode 100755 index 88af3ae6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlanywhere.inc.php.svn-base +++ /dev/null @@ -1,169 +0,0 @@ -create_blobvar($blobVarName); - - b) load blob var from file. $filename must be complete path - - $dbcon->load_blobvar_from_file($blobVarName, $filename); - - c) Use the $blobVarName in SQL insert or update statement in the values - clause: - - $recordSet = $dbconn->Execute('INSERT INTO tabname (idcol, blobcol) ' - . - 'VALUES (\'test\', ' . $blobVarName . ')'); - - instead of loading blob from a file, you can also load from - an unformatted (raw) blob variable: - $dbcon->load_blobvar_from_var($blobVarName, $varName); - - d) drop blob variable on db server to free up resources: - $dbconn->drop_blobvar($blobVarName); - - Sybase_SQLAnywhere data driver. Requires ODBC. - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('_ADODB_ODBC_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbc.inc.php"); -} - -if (!defined('ADODB_SYBASE_SQLANYWHERE')){ - - define('ADODB_SYBASE_SQLANYWHERE',1); - - class ADODB_sqlanywhere extends ADODB_odbc { - var $databaseType = "sqlanywhere"; - var $hasInsertID = true; - - function ADODB_sqlanywhere() - { - $this->ADODB_odbc(); - } - - function _insertid() { - return $this->GetOne('select @@identity'); - } - - function create_blobvar($blobVarName) { - $this->Execute("create variable $blobVarName long binary"); - return; - } - - function drop_blobvar($blobVarName) { - $this->Execute("drop variable $blobVarName"); - return; - } - - function load_blobvar_from_file($blobVarName, $filename) { - $chunk_size = 1000; - - $fd = fopen ($filename, "rb"); - - $integer_chunks = (integer)filesize($filename) / $chunk_size; - $modulus = filesize($filename) % $chunk_size; - if ($modulus != 0){ - $integer_chunks += 1; - } - - for($loop=1;$loop<=$integer_chunks;$loop++){ - $contents = fread ($fd, $chunk_size); - $contents = bin2hex($contents); - - $hexstring = ''; - - for($loop2=0;$loop2qstr($hexstring); - - $this->Execute("set $blobVarName = $blobVarName || " . $hexstring); - } - - fclose ($fd); - return; - } - - function load_blobvar_from_var($blobVarName, &$varName) { - $chunk_size = 1000; - - $integer_chunks = (integer)strlen($varName) / $chunk_size; - $modulus = strlen($varName) % $chunk_size; - if ($modulus != 0){ - $integer_chunks += 1; - } - - for($loop=1;$loop<=$integer_chunks;$loop++){ - $contents = substr ($varName, (($loop - 1) * $chunk_size), $chunk_size); - $contents = bin2hex($contents); - - $hexstring = ''; - - for($loop2=0;$loop2qstr($hexstring); - - $this->Execute("set $blobVarName = $blobVarName || " . $hexstring); - } - - return; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,&$val,$where,$blobtype='BLOB') - { - $blobVarName = 'hold_blob'; - $this->create_blobvar($blobVarName); - $this->load_blobvar_from_var($blobVarName, $val); - $this->Execute("UPDATE $table SET $column=$blobVarName WHERE $where"); - $this->drop_blobvar($blobVarName); - return true; - } - }; //class - - class ADORecordSet_sqlanywhere extends ADORecordSet_odbc { - - var $databaseType = "sqlanywhere"; - - function ADORecordSet_sqlanywhere($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } - - - }; //class - - -} //define -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlite.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlite.inc.php.svn-base deleted file mode 100755 index 665cc543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlite.inc.php.svn-base +++ /dev/null @@ -1,398 +0,0 @@ -fmtDate)."'"; - case 'sysTimeStamp' : return "'".date($this->sysTimeStamp)."'"; - } - }*/ - - function ServerInfo() - { - $arr['version'] = sqlite_libversion(); - $arr['description'] = 'SQLite '; - $arr['encoding'] = sqlite_libencoding(); - return $arr; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $ret = $this->Execute("BEGIN TRANSACTION"); - $this->transCnt += 1; - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - $ret = $this->Execute("COMMIT"); - if ($this->transCnt>0)$this->transCnt -= 1; - return !empty($ret); - } - - function RollbackTrans() - { - if ($this->transOff) return true; - $ret = $this->Execute("ROLLBACK"); - if ($this->transCnt>0)$this->transCnt -= 1; - return !empty($ret); - } - - // mark newnham - function &MetaColumns($tab) - { - global $ADODB_FETCH_MODE; - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute("PRAGMA table_info('$tab')"); - if (isset($savem)) $this->SetFetchMode($savem); - if (!$rs) { - $ADODB_FETCH_MODE = $save; - return $false; - } - $arr = array(); - while ($r = $rs->FetchRow()) { - $type = explode('(',$r['type']); - $size = ''; - if (sizeof($type)==2) - $size = trim($type[1],')'); - $fn = strtoupper($r['name']); - $fld = new ADOFieldObject; - $fld->name = $r['name']; - $fld->type = $type[0]; - $fld->max_length = $size; - $fld->not_null = $r['notnull']; - $fld->default_value = $r['dflt_value']; - $fld->scale = 0; - if ($save == ADODB_FETCH_NUM) $arr[] = $fld; - else $arr[strtoupper($fld->name)] = $fld; - } - $rs->Close(); - $ADODB_FETCH_MODE = $save; - return $arr; - } - - function _init($parentDriver) - { - - $parentDriver->hasTransactions = false; - $parentDriver->hasInsertID = true; - } - - function _insertid() - { - return sqlite_last_insert_rowid($this->_connectionID); - } - - function _affectedrows() - { - return sqlite_changes($this->_connectionID); - } - - function ErrorMsg() - { - if ($this->_logsql) return $this->_errorMsg; - return ($this->_errorNo) ? sqlite_error_string($this->_errorNo) : ''; - } - - function ErrorNo() - { - return $this->_errorNo; - } - - function SQLDate($fmt, $col=false) - { - $fmt = $this->qstr($fmt); - return ($col) ? "adodb_date2($fmt,$col)" : "adodb_date($fmt)"; - } - - - function _createFunctions() - { - @sqlite_create_function($this->_connectionID, 'adodb_date', 'adodb_date', 1); - @sqlite_create_function($this->_connectionID, 'adodb_date2', 'adodb_date2', 2); - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sqlite_open')) return null; - if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename; - - $this->_connectionID = sqlite_open($argHostname); - if ($this->_connectionID === false) return false; - $this->_createFunctions(); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sqlite_open')) return null; - if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename; - - $this->_connectionID = sqlite_popen($argHostname); - if ($this->_connectionID === false) return false; - $this->_createFunctions(); - return true; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr=false) - { - $rez = sqlite_query($sql,$this->_connectionID); - if (!$rez) { - $this->_errorNo = sqlite_last_error($this->_connectionID); - } - - return $rez; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; - $limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : ''); - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - var $_genSeqSQL = "create table %s (id integer)"; - - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $MAXLOOPS = 100; - //$this->debug=1; - while (--$MAXLOOPS>=0) { - @($num = $this->GetOne("select id from $seq")); - if ($num === false) { - $this->Execute(sprintf($this->_genSeqSQL ,$seq)); - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into $seq values($start)"); - if (!$ok) return false; - } - $this->Execute("update $seq set id=id+1 where id=$num"); - - if ($this->affected_rows() > 0) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - $start -= 1; - return $this->Execute("insert into $seqname values($start)"); - } - - var $_dropSeqSQL = 'drop table %s'; - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - // returns true or false - function _close() - { - return @sqlite_close($this->_connectionID); - } - - function &MetaIndexes($table, $primary = FALSE, $owner=false) - { - $false = false; - // save old fetch mode - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $SQL=sprintf("SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'", strtolower($table)); - $rs = $this->Execute($SQL); - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array (); - while ($row = $rs->FetchRow()) { - if ($primary && preg_match("/primary/i",$row[1]) == 0) continue; - if (!isset($indexes[$row[0]])) { - - $indexes[$row[0]] = array( - 'unique' => preg_match("/unique/i",$row[1]), - 'columns' => array()); - } - /** - * There must be a more elegant way of doing this, - * the index elements appear in the SQL statement - * in cols[1] between parentheses - * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse) - */ - $cols = explode("(",$row[1]); - $cols = explode(")",$cols[1]); - array_pop($cols); - $indexes[$row[0]]['columns'] = $cols; - } - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_sqlite extends ADORecordSet { - - var $databaseType = "sqlite"; - var $bind = false; - - function ADORecordset_sqlite($queryID,$mode=false) - { - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch($mode) { - case ADODB_FETCH_NUM: $this->fetchMode = SQLITE_NUM; break; - case ADODB_FETCH_ASSOC: $this->fetchMode = SQLITE_ASSOC; break; - default: $this->fetchMode = SQLITE_BOTH; break; - } - $this->adodbFetchMode = $mode; - - $this->_queryID = $queryID; - - $this->_inited = true; - $this->fields = array(); - if ($queryID) { - $this->_currentRow = 0; - $this->EOF = !$this->_fetch(); - @$this->_initrs(); - } else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - - return $this->_queryID; - } - - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fld->name = sqlite_field_name($this->_queryID, $fieldOffset); - $fld->type = 'VARCHAR'; - $fld->max_length = -1; - return $fld; - } - - function _initrs() - { - $this->_numOfRows = @sqlite_num_rows($this->_queryID); - $this->_numOfFields = @sqlite_num_fields($this->_queryID); - } - - function Fields($colname) - { - if ($this->fetchMode != SQLITE_NUM) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - return sqlite_seek($this->_queryID, $row); - } - - function _fetch($ignore_fields=false) - { - $this->fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); - return !empty($this->fields); - } - - function _close() - { - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlitepo.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlitepo.inc.php.svn-base deleted file mode 100755 index dbd0271b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sqlitepo.inc.php.svn-base +++ /dev/null @@ -1,62 +0,0 @@ -ADODB_sqlite(); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_sqlitepo extends ADORecordset_sqlite { - - var $databaseType = 'sqlitepo'; - - function ADORecordset_sqlitepo($queryID,$mode=false) - { - $this->ADORecordset_sqlite($queryID,$mode); - } - - // Modified to strip table names from returned fields - function _fetch($ignore_fields=false) - { - $this->fields = array(); - $fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); - if(is_array($fields)) - foreach($fields as $n => $v) - { - if(($p = strpos($n, ".")) !== false) - $n = substr($n, $p+1); - $this->fields[$n] = $v; - } - - return !empty($this->fields); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase.inc.php.svn-base deleted file mode 100755 index ba6b9192..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase.inc.php.svn-base +++ /dev/null @@ -1,418 +0,0 @@ -GetOne('select @@identity'); - } - // might require begintrans -- committrans - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - - function BeginTrans() - { - - if ($this->transOff) return true; - $this->transCnt += 1; - - $this->Execute('BEGIN TRAN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - - if (!$ok) return $this->RollbackTrans(); - - $this->transCnt -= 1; - $this->Execute('COMMIT TRAN'); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - $this->transCnt -= 1; - $this->Execute('ROLLBACK TRAN'); - return true; - } - - // http://www.isug.com/Sybase_FAQ/ASE/section6.1.html#6.1.4 - function RowLock($tables,$where,$flds='top 1 null as ignore') - { - if (!$this->_hastrans) $this->BeginTrans(); - $tables = str_replace(',',' HOLDLOCK,',$tables); - return $this->GetOne("select $flds from $tables HOLDLOCK where $where"); - - } - - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @sybase_select_db($dbName); - } - else return false; - } - - /* Returns: the last error message from previous database operation - Note: This function is NOT available for Microsoft SQL Server. */ - - - function ErrorMsg() - { - if ($this->_logsql) return $this->_errorMsg; - if (function_exists('sybase_get_last_message')) - $this->_errorMsg = sybase_get_last_message(); - else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform'; - return $this->_errorMsg; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sybase_connect')) return null; - - $this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sybase_connect')) return null; - - $this->_connectionID = sybase_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - global $ADODB_COUNTRECS; - - if ($ADODB_COUNTRECS == false && ADODB_PHPVER >= 0x4300) - return sybase_unbuffered_query($sql,$this->_connectionID); - else - return sybase_query($sql,$this->_connectionID); - } - - // See http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12 - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - if ($secs2cache > 0) {// we do not cache rowcount, so we have to load entire recordset - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $rs; - } - - $nrows = (integer) $nrows; - $offset = (integer) $offset; - - $cnt = ($nrows >= 0) ? $nrows : 999999999; - if ($offset > 0 && $cnt) $cnt += $offset; - - $this->Execute("set rowcount $cnt"); - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0); - $this->Execute("set rowcount 0"); - - return $rs; - } - - // returns true or false - function _close() - { - return @sybase_close($this->_connectionID); - } - - function UnixDate($v) - { - return ADORecordSet_array_sybase::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_sybase::UnixTimeStamp($v); - } - - - - # Added 2003-10-05 by Chris Phillipson - # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=16756?target=%25N%15_12018_START_RESTART_N%25 - # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(qq,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(datepart(dd,$col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - - # Added 2003-10-07 by Chris Phillipson - # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8 - # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version - function MetaPrimaryKeys($table) - { - $sql = "SELECT c.column_name " . - "FROM syscolumn c, systable t " . - "WHERE t.table_name='$table' AND c.table_id=t.table_id " . - "AND t.table_type='BASE' " . - "AND c.pkey = 'Y' " . - "ORDER BY c.column_id"; - - $a = $this->GetCol($sql); - if ($a && sizeof($a)>0) return $a; - return false; - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ -global $ADODB_sybase_mths; -$ADODB_sybase_mths = array( - 'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6, - 'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); - -class ADORecordset_sybase extends ADORecordSet { - - var $databaseType = "sybase"; - var $canSeek = true; - // _mths works only in non-localised system - var $_mths = array('JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); - - function ADORecordset_sybase($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - if (!$mode) $this->fetchMode = ADODB_FETCH_ASSOC; - else $this->fetchMode = $mode; - $this->ADORecordSet($id,$mode); - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $o = @sybase_fetch_field($this->_queryID, $fieldOffset); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @sybase_fetch_field($this->_queryID); - } - // older versions of PHP did not support type, only numeric - if ($o && !isset($o->type)) $o->type = ($o->numeric) ? 'float' : 'varchar'; - return $o; - } - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @sybase_num_rows($this->_queryID):-1; - $this->_numOfFields = @sybase_num_fields($this->_queryID); - } - - function _seek($row) - { - return @sybase_data_seek($this->_queryID, $row); - } - - function _fetch($ignore_fields=false) - { - if ($this->fetchMode == ADODB_FETCH_NUM) { - $this->fields = @sybase_fetch_row($this->_queryID); - } else if ($this->fetchMode == ADODB_FETCH_ASSOC) { - $this->fields = @sybase_fetch_row($this->_queryID); - if (is_array($this->fields)) { - $this->fields = $this->GetRowAssoc(ADODB_ASSOC_CASE); - return true; - } - return false; - } else { - $this->fields = @sybase_fetch_array($this->_queryID); - } - if ( is_array($this->fields)) { - return true; - } - - return false; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - function _close() { - return @sybase_free_result($this->_queryID); - } - - // sybase/mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_sybase::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_sybase::UnixTimeStamp($v); - } -} - -class ADORecordSet_array_sybase extends ADORecordSet_array { - function ADORecordSet_array_sybase($id=-1) - { - $this->ADORecordSet_array($id); - } - - // sybase/mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - global $ADODB_sybase_mths; - - //Dec 30 2000 12:00AM - if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})" - ,$v, $rr)) return parent::UnixDate($v); - - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $themth = substr(strtoupper($rr[1]),0,3); - $themth = $ADODB_sybase_mths[$themth]; - if ($themth <= 0) return false; - // h-m-s-MM-DD-YY - return mktime(0,0,0,$themth,$rr[2],$rr[3]); - } - - function UnixTimeStamp($v) - { - global $ADODB_sybase_mths; - //11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com - //Changed [0-9] to [0-9 ] in day conversion - if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $themth = substr(strtoupper($rr[1]),0,3); - $themth = $ADODB_sybase_mths[$themth]; - if ($themth <= 0) return false; - - switch (strtoupper($rr[6])) { - case 'P': - if ($rr[4]<12) $rr[4] += 12; - break; - case 'A': - if ($rr[4]==12) $rr[4] = 0; - break; - default: - break; - } - // h-m-s-MM-DD-YY - return mktime($rr[4],$rr[5],0,$themth,$rr[2],$rr[3]); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase_ase.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase_ase.inc.php.svn-base deleted file mode 100755 index 9b5334d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-sybase_ase.inc.php.svn-base +++ /dev/null @@ -1,119 +0,0 @@ -metaTablesSQL) { - // complicated state saving by the need for backward compat - - if ($ttype == 'VIEWS'){ - $sql = str_replace('U', 'V', $this->metaTablesSQL); - }elseif (false === $ttype){ - $sql = str_replace('U',"U' OR type='V", $this->metaTablesSQL); - }else{ // TABLES OR ANY OTHER - $sql = $this->metaTablesSQL; - } - $rs = $this->Execute($sql); - - if ($rs === false || !method_exists($rs, 'GetArray')){ - return $false; - } - $arr =& $rs->GetArray(); - - $arr2 = array(); - foreach($arr as $key=>$value){ - $arr2[] = trim($value['name']); - } - return $arr2; - } - return $false; - } - - function MetaDatabases() - { - $arr = array(); - if ($this->metaDatabasesSQL!='') { - $rs = $this->Execute($this->metaDatabasesSQL); - if ($rs && !$rs->EOF){ - while (!$rs->EOF){ - $arr[] = $rs->Fields('name'); - $rs->MoveNext(); - } - return $arr; - } - } - return false; - } - - // fix a bug which prevent the metaColumns query to be executed for Sybase ASE - function &MetaColumns($table,$upper=false) - { - $false = false; - if (!empty($this->metaColumnsSQL)) { - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if ($rs === false) return $false; - - $retarr = array(); - while (!$rs->EOF) { - $fld =& new ADOFieldObject(); - $fld->name = $rs->Fields('field_name'); - $fld->type = $rs->Fields('type'); - $fld->max_length = $rs->Fields('width'); - $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return $false; - } - - function getProcedureList($schema) - { - return false; - } - - function ErrorMsg() - { - if (!function_exists('sybase_connect')){ - return 'Your PHP doesn\'t contain the Sybase connection module!'; - } - return parent::ErrorMsg(); - } -} - -class adorecordset_sybase_ase extends ADORecordset_sybase { -var $databaseType = "sybase_ase"; -function ADORecordset_sybase_ase($id,$mode=false) - { - $this->ADORecordSet_sybase($id,$mode); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-vfp.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-vfp.inc.php.svn-base deleted file mode 100755 index 034eee2f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/.svn/text-base/adodb-vfp.inc.php.svn-base +++ /dev/null @@ -1,107 +0,0 @@ -ADODB_odbc(); - } - - function Time() - { - return time(); - } - - function BeginTrans() { return false;} - - // quote string to be sent back to database - function qstr($s,$nofixquotes=false) - { - if (!$nofixquotes) return "'".str_replace("\r\n","'+chr(13)+'",str_replace("'",$this->replaceQuote,$s))."'"; - return "'".$s."'"; - } - - - // TOP requires ORDER BY for VFP - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - $this->hasTop = preg_match('/ORDER[ \t\r\n]+BY/is',$sql) ? 'top' : false; - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - - -}; - - -class ADORecordSet_vfp extends ADORecordSet_odbc { - - var $databaseType = "vfp"; - - - function ADORecordSet_vfp($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'C': - if ($len <= $this->blobSize) return 'C'; - case 'M': - return 'X'; - - case 'D': return 'D'; - - case 'T': return 'T'; - - case 'L': return 'L'; - - case 'I': return 'I'; - - default: return 'N'; - } - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-access.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-access.inc.php deleted file mode 100755 index bddea340..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-access.inc.php +++ /dev/null @@ -1,87 +0,0 @@ -ADODB_odbc(); - } - - function Time() - { - return time(); - } - - function BeginTrans() { return false;} - - function IfNull( $field, $ifNull ) - { - return " IIF(IsNull($field), $ifNull, $field) "; // if Access - } -/* - function &MetaTables() - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID); - $rs = new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - if (!$rs) return false; - - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr = &$rs->GetArray(); - //print_pre($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE') - $arr2[] = $arr[$i][2]; - } - return $arr2; - }*/ -} - - -class ADORecordSet_access extends ADORecordSet_odbc { - - var $databaseType = "access"; - - function ADORecordSet_access($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -}// class -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado.inc.php deleted file mode 100755 index b2b3f42c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado.inc.php +++ /dev/null @@ -1,634 +0,0 @@ -_affectedRows = new VARIANT; - } - - function ServerInfo() - { - if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider; - return array('description' => $desc, 'version' => ''); - } - - function _affectedrows() - { - if (PHP_VERSION >= 5) return $this->_affectedRows; - - return $this->_affectedRows->value; - } - - // you can also pass a connection string like this: - // - // $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB'); - function _connect($argHostname, $argUsername, $argPassword, $argProvider= 'MSDASQL') - { - $u = 'UID'; - $p = 'PWD'; - - if (!empty($this->charPage)) - $dbc = new COM('ADODB.Connection',null,$this->charPage); - else - $dbc = new COM('ADODB.Connection'); - - if (! $dbc) return false; - - /* special support if provider is mssql or access */ - if ($argProvider=='mssql') { - $u = 'User Id'; //User parameter name for OLEDB - $p = 'Password'; - $argProvider = "SQLOLEDB"; // SQL Server Provider - - // not yet - //if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename"; - - //use trusted conection for SQL if username not specified - if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes"; - } else if ($argProvider=='access') - $argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider - - if ($argProvider) $dbc->Provider = $argProvider; - - if ($argUsername) $argHostname .= ";$u=$argUsername"; - if ($argPassword)$argHostname .= ";$p=$argPassword"; - - if ($this->debug) ADOConnection::outp( "Host=".$argHostname."
    \n version=$dbc->version"); - // @ added below for php 4.0.1 and earlier - @$dbc->Open((string) $argHostname); - - $this->_connectionID = $dbc; - - $dbc->CursorLocation = $this->_cursor_location; - return $dbc->State > 0; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL') - { - return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider); - } - -/* - adSchemaCatalogs = 1, - adSchemaCharacterSets = 2, - adSchemaCollations = 3, - adSchemaColumns = 4, - adSchemaCheckConstraints = 5, - adSchemaConstraintColumnUsage = 6, - adSchemaConstraintTableUsage = 7, - adSchemaKeyColumnUsage = 8, - adSchemaReferentialContraints = 9, - adSchemaTableConstraints = 10, - adSchemaColumnsDomainUsage = 11, - adSchemaIndexes = 12, - adSchemaColumnPrivileges = 13, - adSchemaTablePrivileges = 14, - adSchemaUsagePrivileges = 15, - adSchemaProcedures = 16, - adSchemaSchemata = 17, - adSchemaSQLLanguages = 18, - adSchemaStatistics = 19, - adSchemaTables = 20, - adSchemaTranslations = 21, - adSchemaProviderTypes = 22, - adSchemaViews = 23, - adSchemaViewColumnUsage = 24, - adSchemaViewTableUsage = 25, - adSchemaProcedureParameters = 26, - adSchemaForeignKeys = 27, - adSchemaPrimaryKeys = 28, - adSchemaProcedureColumns = 29, - adSchemaDBInfoKeywords = 30, - adSchemaDBInfoLiterals = 31, - adSchemaCubes = 32, - adSchemaDimensions = 33, - adSchemaHierarchies = 34, - adSchemaLevels = 35, - adSchemaMeasures = 36, - adSchemaProperties = 37, - adSchemaMembers = 38 - -*/ - - function &MetaTables() - { - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(20);//tables - if ($adors){ - $f = $adors->Fields(2);//table/view name - $t = $adors->Fields(3);//table type - while (!$adors->EOF){ - $tt=substr($t->value,0,6); - if ($tt!='SYSTEM' && $tt !='ACCESS') - $arr[]=$f->value; - //print $f->value . ' ' . $t->value.'
    '; - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - function &MetaColumns($table) - { - $table = strtoupper($table); - $arr = array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(4);//tables - - if ($adors){ - $t = $adors->Fields(2);//table/view name - while (!$adors->EOF){ - - - if (strtoupper($t->Value) == $table) { - - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - } - - $adors->MoveNext(); - } - $adors->Close(); - } - $false = false; - return empty($arr) ? $false : $arr; - } - - - - - /* returns queryID or false */ - function &_query($sql,$inputarr=false) - { - - $dbc = $this->_connectionID; - $false = false; - - // return rs - if ($inputarr) { - - if (!empty($this->charPage)) - $oCmd = new COM('ADODB.Command',null,$this->charPage); - else - $oCmd = new COM('ADODB.Command'); - $oCmd->ActiveConnection = $dbc; - $oCmd->CommandText = $sql; - $oCmd->CommandType = 1; - - foreach($inputarr as $val) { - // name, type, direction 1 = input, len, - $this->adoParameterType = 130; - $p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val); - //print $p->Type.' '.$p->value; - $oCmd->Parameters->Append($p); - } - $p = false; - $rs = $oCmd->Execute(); - $e = $dbc->Errors; - if ($dbc->Errors->Count > 0) return $false; - return $rs; - } - - $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); - - if ($dbc->Errors->Count > 0) return $false; - if (! $rs) return $false; - - if ($rs->State == 0) { - $true = true; - return $true; // 0 = adStateClosed means no records returned - } - return $rs; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - - if (isset($this->_thisTransactions)) - if (!$this->_thisTransactions) return false; - else { - $o = $this->_connectionID->Properties("Transaction DDL"); - $this->_thisTransactions = $o ? true : false; - if (!$o) return false; - } - @$this->_connectionID->BeginTrans(); - $this->transCnt += 1; - return true; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - - @$this->_connectionID->CommitTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - function RollbackTrans() { - if ($this->transOff) return true; - @$this->_connectionID->RollbackTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - - /* Returns: the last error message from previous database operation */ - - function ErrorMsg() - { - if (!$this->_connectionID) return "No connection established"; - $errc = $this->_connectionID->Errors; - if (!$errc) return "No Errors object found"; - if ($errc->Count == 0) return ''; - $err = $errc->Item($errc->Count-1); - return $err->Description; - } - - function ErrorNo() - { - $errc = $this->_connectionID->Errors; - if ($errc->Count == 0) return 0; - $err = $errc->Item($errc->Count-1); - return $err->NativeError; - } - - // returns true or false - function _close() - { - if ($this->_connectionID) $this->_connectionID->Close(); - $this->_connectionID = false; - return true; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ado extends ADORecordSet { - - var $bind = false; - var $databaseType = "ado"; - var $dataProvider = "ado"; - var $_tarr = false; // caches the types - var $_flds; // and field objects - var $canSeek = true; - var $hideErrors = true; - - function ADORecordSet_ado($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $rs = $this->_queryID; - $f = $rs->Fields($fieldOffset); - $o->name = $f->Name; - $t = $f->Type; - $o->type = $this->MetaType($t); - $o->max_length = $f->DefinedSize; - $o->ado_type = $t; - - //print "off=$off name=$o->name type=$o->type len=$o->max_length
    "; - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - $rs = $this->_queryID; - $this->_numOfRows = $rs->RecordCount; - - $f = $rs->Fields; - $this->_numOfFields = $f->Count; - } - - - // should only be used to move forward as we normally use forward-only cursors - function _seek($row) - { - $rs = $this->_queryID; - // absoluteposition doesn't work -- my maths is wrong ? - // $rs->AbsolutePosition->$row-2; - // return true; - if ($this->_currentRow > $row) return false; - @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst - return true; - } - -/* - OLEDB types - - enum DBTYPEENUM - { DBTYPE_EMPTY = 0, - DBTYPE_NULL = 1, - DBTYPE_I2 = 2, - DBTYPE_I4 = 3, - DBTYPE_R4 = 4, - DBTYPE_R8 = 5, - DBTYPE_CY = 6, - DBTYPE_DATE = 7, - DBTYPE_BSTR = 8, - DBTYPE_IDISPATCH = 9, - DBTYPE_ERROR = 10, - DBTYPE_BOOL = 11, - DBTYPE_VARIANT = 12, - DBTYPE_IUNKNOWN = 13, - DBTYPE_DECIMAL = 14, - DBTYPE_UI1 = 17, - DBTYPE_ARRAY = 0x2000, - DBTYPE_BYREF = 0x4000, - DBTYPE_I1 = 16, - DBTYPE_UI2 = 18, - DBTYPE_UI4 = 19, - DBTYPE_I8 = 20, - DBTYPE_UI8 = 21, - DBTYPE_GUID = 72, - DBTYPE_VECTOR = 0x1000, - DBTYPE_RESERVED = 0x8000, - DBTYPE_BYTES = 128, - DBTYPE_STR = 129, - DBTYPE_WSTR = 130, - DBTYPE_NUMERIC = 131, - DBTYPE_UDT = 132, - DBTYPE_DBDATE = 133, - DBTYPE_DBTIME = 134, - DBTYPE_DBTIMESTAMP = 135 - - ADO Types - - adEmpty = 0, - adTinyInt = 16, - adSmallInt = 2, - adInteger = 3, - adBigInt = 20, - adUnsignedTinyInt = 17, - adUnsignedSmallInt = 18, - adUnsignedInt = 19, - adUnsignedBigInt = 21, - adSingle = 4, - adDouble = 5, - adCurrency = 6, - adDecimal = 14, - adNumeric = 131, - adBoolean = 11, - adError = 10, - adUserDefined = 132, - adVariant = 12, - adIDispatch = 9, - adIUnknown = 13, - adGUID = 72, - adDate = 7, - adDBDate = 133, - adDBTime = 134, - adDBTimeStamp = 135, - adBSTR = 8, - adChar = 129, - adVarChar = 200, - adLongVarChar = 201, - adWChar = 130, - adVarWChar = 202, - adLongVarWChar = 203, - adBinary = 128, - adVarBinary = 204, - adLongVarBinary = 205, - adChapter = 136, - adFileTime = 64, - adDBFileTime = 137, - adPropVariant = 138, - adVarNumeric = 139 -*/ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - if (!is_numeric($t)) return $t; - - switch ($t) { - case 0: - case 12: // variant - case 8: // bstr - case 129: //char - case 130: //wc - case 200: // varc - case 202:// varWC - case 128: // bin - case 204: // varBin - case 72: // guid - if ($len <= $this->blobSize) return 'C'; - - case 201: - case 203: - return 'X'; - case 128: - case 204: - case 205: - return 'B'; - case 7: - case 133: return 'D'; - - case 134: - case 135: return 'T'; - - case 11: return 'L'; - - case 16:// adTinyInt = 16, - case 2://adSmallInt = 2, - case 3://adInteger = 3, - case 4://adBigInt = 20, - case 17://adUnsignedTinyInt = 17, - case 18://adUnsignedSmallInt = 18, - case 19://adUnsignedInt = 19, - case 20://adUnsignedBigInt = 21, - return 'I'; - default: return 'N'; - } - } - - // time stamp not supported yet - function _fetch() - { - $rs = $this->_queryID; - if (!$rs or $rs->EOF) { - $this->fields = false; - return false; - } - $this->fields = array(); - - if (!$this->_tarr) { - $tarr = array(); - $flds = array(); - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - $f = $rs->Fields($i); - $flds[] = $f; - $tarr[] = $f->Type; - } - // bind types and flds only once - $this->_tarr = $tarr; - $this->_flds = $flds; - } - $t = reset($this->_tarr); - $f = reset($this->_flds); - - if ($this->hideErrors) $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - //echo "

    ",$t,' ';var_dump($f->value); echo '

    '; - switch($t) { - case 135: // timestamp - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value); - // VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00 - $val=(float) variant_cast($f->value,VT_R8)*3600*24-2209161600; - else - $val = $f->value; - $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 133:// A date value (yyyymmdd) - if ($val = $f->value) { - $this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2); - } else - $this->fields[] = false; - break; - case 7: // adDate - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value); - else $val = $f->value; - - if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val); - else $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 1: // null - $this->fields[] = false; - break; - case 6: // currency is not supported properly; - ADOConnection::outp( ''.$f->Name.': currency type not supported by PHP'); - $this->fields[] = (float) $f->value; - break; - default: - $this->fields[] = $f->value; - break; - } - //print " $f->value $t, "; - $f = next($this->_flds); - $t = next($this->_tarr); - } // for - if ($this->hideErrors) error_reporting($olde); - @$rs->MoveNext(); // @ needed for some versions of PHP! - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - - function NextRecordSet() - { - $rs = $this->_queryID; - $this->_queryID = $rs->NextRecordSet(); - //$this->_queryID = $this->_QueryId->NextRecordSet(); - if ($this->_queryID == null) return false; - - $this->_currentRow = -1; - $this->_currentPage = -1; - $this->bind = false; - $this->fields = false; - $this->_flds = false; - $this->_tarr = false; - - $this->_inited = false; - $this->Init(); - return true; - } - - function _close() { - $this->_flds = false; - @$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk) - $this->_queryID = false; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado5.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado5.inc.php deleted file mode 100755 index 22217b44..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado5.inc.php +++ /dev/null @@ -1,668 +0,0 @@ -_affectedRows = new VARIANT; - } - - function ServerInfo() - { - if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider; - return array('description' => $desc, 'version' => ''); - } - - function _affectedrows() - { - if (PHP_VERSION >= 5) return $this->_affectedRows; - - return $this->_affectedRows->value; - } - - // you can also pass a connection string like this: - // - // $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB'); - function _connect($argHostname, $argUsername, $argPassword,$argDBorProvider, $argProvider= '') - { - // two modes - // - if $argProvider is empty, we assume that $argDBorProvider holds provider -- this is for backward compat - // - if $argProvider is not empty, then $argDBorProvider holds db - - - if ($argProvider) { - $argDatabasename = $argDBorProvider; - } else { - $argDatabasename = ''; - if ($argDBorProvider) $argProvider = $argDBorProvider; - else $argProvider = 'MSDASQL'; - } - - - try { - $u = 'UID'; - $p = 'PWD'; - - if (!empty($this->charPage)) - $dbc = new COM('ADODB.Connection',null,$this->charPage); - else - $dbc = new COM('ADODB.Connection'); - - if (! $dbc) return false; - - /* special support if provider is mssql or access */ - if ($argProvider=='mssql') { - $u = 'User Id'; //User parameter name for OLEDB - $p = 'Password'; - $argProvider = "SQLOLEDB"; // SQL Server Provider - - // not yet - //if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename"; - - //use trusted conection for SQL if username not specified - if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes"; - } else if ($argProvider=='access') - $argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider - - if ($argProvider) $dbc->Provider = $argProvider; - - if ($argProvider) $argHostname = "PROVIDER=$argProvider;DRIVER={SQL Server};SERVER=$argHostname"; - - - if ($argDatabasename) $argHostname .= ";DATABASE=$argDatabasename"; - if ($argUsername) $argHostname .= ";$u=$argUsername"; - if ($argPassword)$argHostname .= ";$p=$argPassword"; - - if ($this->debug) ADOConnection::outp( "Host=".$argHostname."
    \n version=$dbc->version"); - // @ added below for php 4.0.1 and earlier - @$dbc->Open((string) $argHostname); - - $this->_connectionID = $dbc; - - $dbc->CursorLocation = $this->_cursor_location; - return $dbc->State > 0; - } catch (exception $e) { - } - - return false; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL') - { - return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider); - } - -/* - adSchemaCatalogs = 1, - adSchemaCharacterSets = 2, - adSchemaCollations = 3, - adSchemaColumns = 4, - adSchemaCheckConstraints = 5, - adSchemaConstraintColumnUsage = 6, - adSchemaConstraintTableUsage = 7, - adSchemaKeyColumnUsage = 8, - adSchemaReferentialContraints = 9, - adSchemaTableConstraints = 10, - adSchemaColumnsDomainUsage = 11, - adSchemaIndexes = 12, - adSchemaColumnPrivileges = 13, - adSchemaTablePrivileges = 14, - adSchemaUsagePrivileges = 15, - adSchemaProcedures = 16, - adSchemaSchemata = 17, - adSchemaSQLLanguages = 18, - adSchemaStatistics = 19, - adSchemaTables = 20, - adSchemaTranslations = 21, - adSchemaProviderTypes = 22, - adSchemaViews = 23, - adSchemaViewColumnUsage = 24, - adSchemaViewTableUsage = 25, - adSchemaProcedureParameters = 26, - adSchemaForeignKeys = 27, - adSchemaPrimaryKeys = 28, - adSchemaProcedureColumns = 29, - adSchemaDBInfoKeywords = 30, - adSchemaDBInfoLiterals = 31, - adSchemaCubes = 32, - adSchemaDimensions = 33, - adSchemaHierarchies = 34, - adSchemaLevels = 35, - adSchemaMeasures = 36, - adSchemaProperties = 37, - adSchemaMembers = 38 - -*/ - - function &MetaTables() - { - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(20);//tables - if ($adors){ - $f = $adors->Fields(2);//table/view name - $t = $adors->Fields(3);//table type - while (!$adors->EOF){ - $tt=substr($t->value,0,6); - if ($tt!='SYSTEM' && $tt !='ACCESS') - $arr[]=$f->value; - //print $f->value . ' ' . $t->value.'
    '; - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - function &MetaColumns($table) - { - $table = strtoupper($table); - $arr= array(); - $dbc = $this->_connectionID; - - $adors=@$dbc->OpenSchema(4);//tables - - if ($adors){ - $t = $adors->Fields(2);//table/view name - while (!$adors->EOF){ - - - if (strtoupper($t->Value) == $table) { - - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - } - - $adors->MoveNext(); - } - $adors->Close(); - } - - return $arr; - } - - /* returns queryID or false */ - function &_query($sql,$inputarr=false) - { - try { // In PHP5, all COM errors are exceptions, so to maintain old behaviour... - - $dbc = $this->_connectionID; - - // return rs - - $false = false; - - if ($inputarr) { - - if (!empty($this->charPage)) - $oCmd = new COM('ADODB.Command',null,$this->charPage); - else - $oCmd = new COM('ADODB.Command'); - $oCmd->ActiveConnection = $dbc; - $oCmd->CommandText = $sql; - $oCmd->CommandType = 1; - - foreach($inputarr as $val) { - // name, type, direction 1 = input, len, - $this->adoParameterType = 130; - $p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val); - //print $p->Type.' '.$p->value; - $oCmd->Parameters->Append($p); - } - $p = false; - $rs = $oCmd->Execute(); - $e = $dbc->Errors; - if ($dbc->Errors->Count > 0) return $false; - return $rs; - } - - $rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option); - - if ($dbc->Errors->Count > 0) return $false; - if (! $rs) return $false; - - if ($rs->State == 0) { - $true = true; - return $true; // 0 = adStateClosed means no records returned - } - return $rs; - - } catch (exception $e) { - - } - return $false; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - - if (isset($this->_thisTransactions)) - if (!$this->_thisTransactions) return false; - else { - $o = $this->_connectionID->Properties("Transaction DDL"); - $this->_thisTransactions = $o ? true : false; - if (!$o) return false; - } - @$this->_connectionID->BeginTrans(); - $this->transCnt += 1; - return true; - } - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - - @$this->_connectionID->CommitTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - function RollbackTrans() { - if ($this->transOff) return true; - @$this->_connectionID->RollbackTrans(); - if ($this->transCnt) @$this->transCnt -= 1; - return true; - } - - /* Returns: the last error message from previous database operation */ - - function ErrorMsg() - { - if (!$this->_connectionID) return "No connection established"; - $errmsg = ''; - - try { - $errc = $this->_connectionID->Errors; - if (!$errc) return "No Errors object found"; - if ($errc->Count == 0) return ''; - $err = $errc->Item($errc->Count-1); - $errmsg = $err->Description; - }catch(exception $e) { - } - return $errmsg; - } - - function ErrorNo() - { - $errc = $this->_connectionID->Errors; - if ($errc->Count == 0) return 0; - $err = $errc->Item($errc->Count-1); - return $err->NativeError; - } - - // returns true or false - function _close() - { - if ($this->_connectionID) $this->_connectionID->Close(); - $this->_connectionID = false; - return true; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ado extends ADORecordSet { - - var $bind = false; - var $databaseType = "ado"; - var $dataProvider = "ado"; - var $_tarr = false; // caches the types - var $_flds; // and field objects - var $canSeek = true; - var $hideErrors = true; - - function ADORecordSet_ado($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $rs = $this->_queryID; - $f = $rs->Fields($fieldOffset); - $o->name = $f->Name; - $t = $f->Type; - $o->type = $this->MetaType($t); - $o->max_length = $f->DefinedSize; - $o->ado_type = $t; - - - //print "off=$off name=$o->name type=$o->type len=$o->max_length
    "; - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - $rs = $this->_queryID; - $this->_numOfRows = $rs->RecordCount; - - $f = $rs->Fields; - $this->_numOfFields = $f->Count; - } - - - // should only be used to move forward as we normally use forward-only cursors - function _seek($row) - { - $rs = $this->_queryID; - // absoluteposition doesn't work -- my maths is wrong ? - // $rs->AbsolutePosition->$row-2; - // return true; - if ($this->_currentRow > $row) return false; - @$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst - return true; - } - -/* - OLEDB types - - enum DBTYPEENUM - { DBTYPE_EMPTY = 0, - DBTYPE_NULL = 1, - DBTYPE_I2 = 2, - DBTYPE_I4 = 3, - DBTYPE_R4 = 4, - DBTYPE_R8 = 5, - DBTYPE_CY = 6, - DBTYPE_DATE = 7, - DBTYPE_BSTR = 8, - DBTYPE_IDISPATCH = 9, - DBTYPE_ERROR = 10, - DBTYPE_BOOL = 11, - DBTYPE_VARIANT = 12, - DBTYPE_IUNKNOWN = 13, - DBTYPE_DECIMAL = 14, - DBTYPE_UI1 = 17, - DBTYPE_ARRAY = 0x2000, - DBTYPE_BYREF = 0x4000, - DBTYPE_I1 = 16, - DBTYPE_UI2 = 18, - DBTYPE_UI4 = 19, - DBTYPE_I8 = 20, - DBTYPE_UI8 = 21, - DBTYPE_GUID = 72, - DBTYPE_VECTOR = 0x1000, - DBTYPE_RESERVED = 0x8000, - DBTYPE_BYTES = 128, - DBTYPE_STR = 129, - DBTYPE_WSTR = 130, - DBTYPE_NUMERIC = 131, - DBTYPE_UDT = 132, - DBTYPE_DBDATE = 133, - DBTYPE_DBTIME = 134, - DBTYPE_DBTIMESTAMP = 135 - - ADO Types - - adEmpty = 0, - adTinyInt = 16, - adSmallInt = 2, - adInteger = 3, - adBigInt = 20, - adUnsignedTinyInt = 17, - adUnsignedSmallInt = 18, - adUnsignedInt = 19, - adUnsignedBigInt = 21, - adSingle = 4, - adDouble = 5, - adCurrency = 6, - adDecimal = 14, - adNumeric = 131, - adBoolean = 11, - adError = 10, - adUserDefined = 132, - adVariant = 12, - adIDispatch = 9, - adIUnknown = 13, - adGUID = 72, - adDate = 7, - adDBDate = 133, - adDBTime = 134, - adDBTimeStamp = 135, - adBSTR = 8, - adChar = 129, - adVarChar = 200, - adLongVarChar = 201, - adWChar = 130, - adVarWChar = 202, - adLongVarWChar = 203, - adBinary = 128, - adVarBinary = 204, - adLongVarBinary = 205, - adChapter = 136, - adFileTime = 64, - adDBFileTime = 137, - adPropVariant = 138, - adVarNumeric = 139 -*/ - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - if (!is_numeric($t)) return $t; - - switch ($t) { - case 0: - case 12: // variant - case 8: // bstr - case 129: //char - case 130: //wc - case 200: // varc - case 202:// varWC - case 128: // bin - case 204: // varBin - case 72: // guid - if ($len <= $this->blobSize) return 'C'; - - case 201: - case 203: - return 'X'; - case 128: - case 204: - case 205: - return 'B'; - case 7: - case 133: return 'D'; - - case 134: - case 135: return 'T'; - - case 11: return 'L'; - - case 16:// adTinyInt = 16, - case 2://adSmallInt = 2, - case 3://adInteger = 3, - case 4://adBigInt = 20, - case 17://adUnsignedTinyInt = 17, - case 18://adUnsignedSmallInt = 18, - case 19://adUnsignedInt = 19, - case 20://adUnsignedBigInt = 21, - return 'I'; - default: return 'N'; - } - } - - // time stamp not supported yet - function _fetch() - { - $rs = $this->_queryID; - if (!$rs or $rs->EOF) { - $this->fields = false; - return false; - } - $this->fields = array(); - - if (!$this->_tarr) { - $tarr = array(); - $flds = array(); - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - $f = $rs->Fields($i); - $flds[] = $f; - $tarr[] = $f->Type; - } - // bind types and flds only once - $this->_tarr = $tarr; - $this->_flds = $flds; - } - $t = reset($this->_tarr); - $f = reset($this->_flds); - - if ($this->hideErrors) $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null - for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) { - //echo "

    ",$t,' ';var_dump($f->value); echo '

    '; - switch($t) { - case 135: // timestamp - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value); - // VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00 - $val= (float) variant_cast($f->value,VT_R8)*3600*24-2209161600; - else - $val = $f->value; - $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 133:// A date value (yyyymmdd) - if ($val = $f->value) { - $this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2); - } else - $this->fields[] = false; - break; - case 7: // adDate - if (!strlen((string)$f->value)) $this->fields[] = false; - else { - if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value); - else $val = $f->value; - - if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val); - else $this->fields[] = adodb_date('Y-m-d H:i:s',$val); - } - break; - case 1: // null - $this->fields[] = false; - break; - case 6: // currency is not supported properly; - ADOConnection::outp( ''.$f->Name.': currency type not supported by PHP'); - $this->fields[] = (float) $f->value; - break; - default: - $this->fields[] = $f->value; - break; - } - //print " $f->value $t, "; - $f = next($this->_flds); - $t = next($this->_tarr); - } // for - if ($this->hideErrors) error_reporting($olde); - @$rs->MoveNext(); // @ needed for some versions of PHP! - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - - function NextRecordSet() - { - $rs = $this->_queryID; - $this->_queryID = $rs->NextRecordSet(); - //$this->_queryID = $this->_QueryId->NextRecordSet(); - if ($this->_queryID == null) return false; - - $this->_currentRow = -1; - $this->_currentPage = -1; - $this->bind = false; - $this->fields = false; - $this->_flds = false; - $this->_tarr = false; - - $this->_inited = false; - $this->Init(); - return true; - } - - function _close() { - $this->_flds = false; - @$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk) - $this->_queryID = false; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_access.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_access.inc.php deleted file mode 100755 index ebecb4d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_access.inc.php +++ /dev/null @@ -1,55 +0,0 @@ -= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php"); - else include(ADODB_DIR."/drivers/adodb-ado.inc.php"); -} - -class ADODB_ado_access extends ADODB_ado { - var $databaseType = 'ado_access'; - var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE - var $fmtDate = "#Y-m-d#"; - var $fmtTimeStamp = "#Y-m-d h:i:sA#";// note no comma - var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')"; - var $sysTimeStamp = 'NOW'; - var $hasTransactions = false; - var $upperCase = 'ucase'; - - function ADODB_ado_access() - { - $this->ADODB_ado(); - } - - function BeginTrans() { return false;} - - function CommitTrans() { return false;} - - function RollbackTrans() { return false;} - -} - - -class ADORecordSet_ado_access extends ADORecordSet_ado { - - var $databaseType = "ado_access"; - - function ADORecordSet_ado_access($id,$mode=false) - { - return $this->ADORecordSet_ado($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_mssql.inc.php deleted file mode 100755 index e876dc54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ado_mssql.inc.php +++ /dev/null @@ -1,154 +0,0 @@ -= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php"); - else include(ADODB_DIR."/drivers/adodb-ado.inc.php"); -} - - -class ADODB_ado_mssql extends ADODB_ado { - var $databaseType = 'ado_mssql'; - var $hasTop = 'top'; - var $hasInsertID = true; - var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - var $sysTimeStamp = 'GetDate()'; - var $leftOuter = '*='; - var $rightOuter = '=*'; - var $ansiOuter = true; // for mssql7 or later - var $substr = "substring"; - var $length = 'len'; - var $_dropSeqSQL = "drop table %s"; - - //var $_inTransaction = 1; // always open recordsets, so no transaction problems. - - function ADODB_ado_mssql() - { - $this->ADODB_ado(); - } - - function _insertid() - { - return $this->GetOne('select @@identity'); - } - - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - function qstr($s,$magic_quotes=false) - { - $s = ADOConnection::qstr($s, $magic_quotes); - return str_replace("\0", "\\\\000", $s); - } - - function MetaColumns($table) - { - $table = strtoupper($table); - $arr= array(); - $dbc = $this->_connectionID; - - $osoptions = array(); - $osoptions[0] = null; - $osoptions[1] = null; - $osoptions[2] = $table; - $osoptions[3] = null; - - $adors=@$dbc->OpenSchema(4, $osoptions);//tables - - if ($adors){ - while (!$adors->EOF){ - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; - - $adors->MoveNext(); - } - $adors->Close(); - } - $false = false; - return empty($arr) ? $false : $arr; - } - - function CreateSequence($seq='adodbseq',$start=1) - { - - $this->Execute('BEGIN TRANSACTION adodbseq'); - $start -= 1; - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return true; - } - - function GenID($seq='adodbseq',$start=1) - { - //$this->debug=1; - $this->Execute('BEGIN TRANSACTION adodbseq'); - $ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1"); - if (!$ok) { - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $start; - } - $num = $this->GetOne("select id from $seq"); - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $num; - - // in old implementation, pre 1.90, we returned GUID... - //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'"); - } - - } // end class - - class ADORecordSet_ado_mssql extends ADORecordSet_ado { - - var $databaseType = 'ado_mssql'; - - function ADORecordSet_ado_mssql($id,$mode=false) - { - return $this->ADORecordSet_ado($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-borland_ibase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-borland_ibase.inc.php deleted file mode 100755 index 6d95caf5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-borland_ibase.inc.php +++ /dev/null @@ -1,92 +0,0 @@ -ADODB_ibase(); - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID); - return $this->_transactionID; - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Interbase 6.5, Dialect 1'; break; - case '2': $s = 'Interbase 6.5, Dialect 2'; break; - default: - case '3': $s = 'Interbase 6.5, Dialect 3'; break; - } - $arr['version'] = '6.5'; - $arr['description'] = $s; - return $arr; - } - - // Note that Interbase 6.5 uses ROWS instead - don't you love forking wars! - // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows - // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 - // Firebird uses - // SELECT FIRST 5 SKIP 2 col1, col2 FROM TABLE - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - if ($nrows > 0) { - if ($offset <= 0) $str = " ROWS $nrows "; - else { - $a = $offset+1; - $b = $offset+$nrows; - $str = " ROWS $a TO $b"; - } - } else { - // ok, skip - $a = $offset + 1; - $str = " ROWS $a TO 999999999"; // 999 million - } - $sql .= $str; - - return ($secs2cache) ? - $this->CacheExecute($secs2cache,$sql,$inputarr) - : - $this->Execute($sql,$inputarr); - } - -}; - - -class ADORecordSet_borland_ibase extends ADORecordSet_ibase { - - var $databaseType = "borland_ibase"; - - function ADORecordSet_borland_ibase($id,$mode=false) - { - $this->ADORecordSet_ibase($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-csv.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-csv.inc.php deleted file mode 100755 index 35da1882..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-csv.inc.php +++ /dev/null @@ -1,207 +0,0 @@ -_insertid; - } - - function _affectedrows() - { - return $this->_affectedrows; - } - - function &MetaDatabases() - { - return false; - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (strtolower(substr($argHostname,0,7)) !== 'http://') return false; - $this->_url = $argHostname; - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (strtolower(substr($argHostname,0,7)) !== 'http://') return false; - $this->_url = $argHostname; - return true; - } - - function &MetaColumns($table) - { - return false; - } - - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1) - { - global $ADODB_FETCH_MODE; - - $url = $this->_url.'?sql='.urlencode($sql)."&nrows=$nrows&fetch=". - (($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE). - "&offset=$offset"; - $err = false; - $rs = csv2rs($url,$err,false); - - if ($this->debug) print "$url
    $err
    "; - - $at = strpos($err,'::::'); - if ($at === false) { - $this->_errorMsg = $err; - $this->_errorNo = (integer)$err; - } else { - $this->_errorMsg = substr($err,$at+4,1024); - $this->_errorNo = -9999; - } - if ($this->_errorNo) - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,''); - } - - if (is_object($rs)) { - - $rs->databaseType='csv'; - $rs->fetchMode = ($this->fetchMode !== false) ? $this->fetchMode : $ADODB_FETCH_MODE; - $rs->connection = &$this; - } - return $rs; - } - - // returns queryID or false - function &_Execute($sql,$inputarr=false) - { - global $ADODB_FETCH_MODE; - - if (!$this->_bindInputArray && $inputarr) { - $sqlarr = explode('?',$sql); - $sql = ''; - $i = 0; - foreach($inputarr as $v) { - - $sql .= $sqlarr[$i]; - if (gettype($v) == 'string') - $sql .= $this->qstr($v); - else if ($v === null) - $sql .= 'NULL'; - else - $sql .= $v; - $i += 1; - - } - $sql .= $sqlarr[$i]; - if ($i+1 != sizeof($sqlarr)) - print "Input Array does not match ?: ".htmlspecialchars($sql); - $inputarr = false; - } - - $url = $this->_url.'?sql='.urlencode($sql)."&fetch=". - (($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE); - $err = false; - - - $rs = csv2rs($url,$err,false); - if ($this->debug) print urldecode($url)."
    $err
    "; - $at = strpos($err,'::::'); - if ($at === false) { - $this->_errorMsg = $err; - $this->_errorNo = (integer)$err; - } else { - $this->_errorMsg = substr($err,$at+4,1024); - $this->_errorNo = -9999; - } - - if ($this->_errorNo) - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr); - } - if (is_object($rs)) { - $rs->fetchMode = ($this->fetchMode !== false) ? $this->fetchMode : $ADODB_FETCH_MODE; - - $this->_affectedrows = $rs->affectedrows; - $this->_insertid = $rs->insertid; - $rs->databaseType='csv'; - $rs->connection = &$this; - } - return $rs; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - return $this->_errorNo; - } - - // returns true or false - function _close() - { - return true; - } -} // class - -class ADORecordset_csv extends ADORecordset { - function ADORecordset_csv($id,$mode=false) - { - $this->ADORecordset($id,$mode); - } - - function _close() - { - return true; - } -} - -} // define - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-db2.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-db2.inc.php deleted file mode 100755 index 17872296..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-db2.inc.php +++ /dev/null @@ -1,828 +0,0 @@ -_haserrorfunctions = ADODB_PHPVER >= 0x4050; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('db2_connect')) { - ADOConnection::outp("Warning: The old ODBC based DB2 driver has been renamed 'odbc_db2'. This ADOdb driver calls PHP's native db2 extension."); - return null; - } - // This needs to be set before the connect(). - // Replaces the odbc_binmode() call that was in Execute() - ini_set('ibm_db2.binmode', $this->binmode); - - if ($argDatabasename) { - $this->_connectionID = db2_connect($argDatabasename,$argUsername,$argPassword); - } else { - $this->_connectionID = db2_connect($argDSN,$argUsername,$argPassword); - } - if (isset($php_errormsg)) $php_errormsg = ''; - - // For db2_connect(), there is an optional 4th arg. If present, it must be - // an array of valid options. So far, we don't use them. - - $this->_errorMsg = @db2_conn_errormsg(); - - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('db2_connect')) return null; - - // This needs to be set before the connect(). - // Replaces the odbc_binmode() call that was in Execute() - ini_set('ibm_db2.binmode', $this->binmode); - - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - - if ($argDatabasename) { - $this->_connectionID = db2_pconnect($argDatabasename,$argUsername,$argPassword); - } else { - $this->_connectionID = db2_pconnect($argDSN,$argUsername,$argPassword); - } - if (isset($php_errormsg)) $php_errormsg = ''; - - $this->_errorMsg = @db2_conn_errormsg(); - if ($this->_connectionID && $this->autoRollback) @db2_rollback($this->_connectionID); - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'YYYY-MM-DD HH24:MI:SS')"; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - // use right() and replace() ? - if (!$col) $col = $this->sysDate; - - /* use TO_CHAR() if $fmt is TO_CHAR() allowed fmt */ - if ($fmt== 'Y-m-d H:i:s') - return 'TO_CHAR('.$col.", 'YYYY-MM-DD HH24:MI:SS')"; - - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= $this->concat_operator; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - if ($len==1) return "year($col)"; - $s .= "char(year($col))"; - break; - case 'M': - if ($len==1) return "monthname($col)"; - $s .= "substr(monthname($col),1,3)"; - break; - case 'm': - if ($len==1) return "month($col)"; - $s .= "right(digits(month($col)),2)"; - break; - case 'D': - case 'd': - if ($len==1) return "day($col)"; - $s .= "right(digits(day($col)),2)"; - break; - case 'H': - case 'h': - if ($len==1) return "hour($col)"; - if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)"; - else $s .= "''"; - break; - case 'i': - case 'I': - if ($len==1) return "minute($col)"; - if ($col != $this->sysDate) - $s .= "right(digits(minute($col)),2)"; - else $s .= "''"; - break; - case 'S': - case 's': - if ($len==1) return "second($col)"; - if ($col != $this->sysDate) - $s .= "right(digits(second($col)),2)"; - else $s .= "''"; - break; - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - } - } - return $s; - } - - - function ServerInfo() - { - - if (!empty($this->host) && ADODB_PHPVER >= 0x4300) { - $dsn = strtoupper($this->host); - $first = true; - $found = false; - - if (!function_exists('db2_data_source')) return false; - - while(true) { - - $rez = @db2_data_source($this->_connectionID, - $first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT); - $first = false; - if (!is_array($rez)) break; - if (strtoupper($rez['server']) == $dsn) { - $found = true; - break; - } - } - if (!$found) return ADOConnection::ServerInfo(); - if (!isset($rez['version'])) $rez['version'] = ''; - return $rez; - } else { - return ADOConnection::ServerInfo(); - } - } - - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return true; - } - - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $num = $this->GetOne("VALUES NEXTVAL FOR $seq"); - return $num; - } - - - function ErrorMsg() - { - if ($this->_haserrorfunctions) { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (empty($this->_connectionID)) return @db2_conn_errormsg(); - return @db2_conn_errormsg($this->_connectionID); - } else return ADOConnection::ErrorMsg(); - } - - function ErrorNo() - { - - if ($this->_haserrorfunctions) { - if ($this->_errorCode !== false) { - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode; - } - - if (empty($this->_connectionID)) $e = @db2_conn_error(); - else $e = @db2_conn_error($this->_connectionID); - - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - // so we check and patch - if (strlen($e)<=2) return 0; - return $e; - } else return ADOConnection::ErrorNo(); - } - - - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - return db2_autocommit($this->_connectionID,false); - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = db2_commit($this->_connectionID); - db2_autocommit($this->_connectionID,true); - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = db2_rollback($this->_connectionID); - db2_autocommit($this->_connectionID,true); - return $ret; - } - - function MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @db2_primarykeys($this->_connectionID,'',$schema,$table); - - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return false; - - $arr =& $rs->GetArray(); - $rs->Close(); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - function MetaForeignKeys($table, $owner = FALSE, $upper = FALSE, $asociative = FALSE ) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @db2_foreign_keys($this->_connectionID,'',$schema,$table); - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_db2($qid); - - $ADODB_FETCH_MODE = $savem; - /* - $rs->fields indices - 0 PKTABLE_CAT - 1 PKTABLE_SCHEM - 2 PKTABLE_NAME - 3 PKCOLUMN_NAME - 4 FKTABLE_CAT - 5 FKTABLE_SCHEM - 6 FKTABLE_NAME - 7 FKCOLUMN_NAME - */ - if (!$rs) return false; - - $foreign_keys = array(); - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - if (!is_array($foreign_keys[$rs->fields[5].'.'.$rs->fields[6]])) - $foreign_keys[$rs->fields[5].'.'.$rs->fields[6]] = array(); - $foreign_keys[$rs->fields[5].'.'.$rs->fields[6]][$rs->fields[7]] = $rs->fields[3]; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $foreign_key; - } - - - function &MetaTables($ttype=false,$schema=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = db2_tables($this->_connectionID); - - $rs = new ADORecordSet_db2($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - - $arr =& $rs->GetArray(); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - if (!$arr[$i][2]) continue; - $type = $arr[$i][3]; - $schemaval = ($schema) ? $arr[$i][1].'.' : ''; - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $schemaval.$arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2]; - } - return $arr2; - } - -/* -See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2datetime_data_type_changes.asp -/ SQL data type codes / -#define SQL_UNKNOWN_TYPE 0 -#define SQL_CHAR 1 -#define SQL_NUMERIC 2 -#define SQL_DECIMAL 3 -#define SQL_INTEGER 4 -#define SQL_SMALLINT 5 -#define SQL_FLOAT 6 -#define SQL_REAL 7 -#define SQL_DOUBLE 8 -#if (DB2VER >= 0x0300) -#define SQL_DATETIME 9 -#endif -#define SQL_VARCHAR 12 - - -/ One-parameter shortcuts for date/time data types / -#if (DB2VER >= 0x0300) -#define SQL_TYPE_DATE 91 -#define SQL_TYPE_TIME 92 -#define SQL_TYPE_TIMESTAMP 93 - -#define SQL_UNICODE (-95) -#define SQL_UNICODE_VARCHAR (-96) -#define SQL_UNICODE_LONGVARCHAR (-97) -*/ - function DB2Types($t) - { - switch ((integer)$t) { - case 1: - case 12: - case 0: - case -95: - case -96: - return 'C'; - case -97: - case -1: //text - return 'X'; - case -4: //image - return 'B'; - - case 9: - case 91: - return 'D'; - - case 10: - case 11: - case 92: - case 93: - return 'T'; - - case 4: - case 5: - case -6: - return 'I'; - - case -11: // uniqidentifier - return 'R'; - case -7: //bit - return 'L'; - - default: - return 'N'; - } - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $colname = "%"; - $qid = db2_columns($this->_connectionID, "", $schema, $table, $colname); - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $false; - $rs->_fetch(); - - $retarr = array(); - - /* - $rs->fields indices - 0 TABLE_QUALIFIER - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 DATA_TYPE - 5 TYPE_NAME - 6 PRECISION - 7 LENGTH - 8 SCALE - 9 RADIX - 10 NULLABLE - 11 REMARKS - */ - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $this->DB2Types($rs->fields[4]); - - // ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp - // access uses precision to store length for char/varchar - if ($fld->type == 'C' or $fld->type == 'X') { - if ($rs->fields[4] <= -95) // UNICODE - $fld->max_length = $rs->fields[7]/2; - else - $fld->max_length = $rs->fields[7]; - } else - $fld->max_length = $rs->fields[7]; - $fld->not_null = !empty($rs->fields[10]); - $fld->scale = $rs->fields[8]; - $fld->primary_key = false; - $retarr[strtoupper($fld->name)] = $fld; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) $retarr = false; - - $qid = db2_primary_keys($this->_connectionID, "", $schema, $table); - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_db2($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $retarr; - $rs->_fetch(); - - /* - $rs->fields indices - 0 TABLE_CAT - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 KEY_SEQ - 5 PK_NAME - */ - while (!$rs->EOF) { - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $retarr[strtoupper($rs->fields[3])]->primary_key = true; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); - - if (empty($retarr)) $retarr = false; - return $retarr; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = db2_prepare($this->_connectionID,$sql); - if (!$stmt) { - // we don't know whether db2 driver is parsing prepared stmts, so just return sql - return $sql; - } - return array($sql,$stmt,false); - } - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - GLOBAL $php_errormsg; - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_error = ''; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = db2_prepare($this->_connectionID,$sql); - - if ($stmtid == false) { - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - return false; - } - } - - if (! db2_execute($stmtid,$inputarr)) { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } - return false; - } - - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!db2_execute($stmtid)) { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } - return false; - } - } else - $stmtid = @db2_exec($this->_connectionID,$sql); - - $this->_lastAffectedRows = 0; - if ($stmtid) { - if (@db2_num_fields($stmtid) == 0) { - $this->_lastAffectedRows = db2_num_rows($stmtid); - $stmtid = true; - } else { - $this->_lastAffectedRows = 0; - } - - if ($this->_haserrorfunctions) { - $this->_errorMsg = ''; - $this->_errorCode = 0; - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } else { - if ($this->_haserrorfunctions) { - $this->_errorMsg = db2_stmt_errormsg(); - $this->_errorCode = db2_stmt_error(); - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - - } - return $stmtid; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - // returns true or false - function _close() - { - $ret = @db2_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } - - function _affectedrows() - { - return $this->_lastAffectedRows; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_db2 extends ADORecordSet { - - var $bind = false; - var $databaseType = "db2"; - var $dataProvider = "db2"; - var $useFetchArray; - - function ADORecordSet_db2($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - } - - - // returns the field object - function &FetchField($offset = -1) - { - $o= new ADOFieldObject(); - $o->name = @db2_field_name($this->_queryID,$offset); - $o->type = @db2_field_type($this->_queryID,$offset); - $o->max_length = db2_field_width($this->_queryID,$offset); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @db2_num_rows($this->_queryID) : -1; - $this->_numOfFields = @db2_num_fields($this->_queryID); - // some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0 - if ($this->_numOfRows == 0) $this->_numOfRows = -1; - } - - function _seek($row) - { - return false; - } - - // speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $rs =& $this->GetArray($nrows); - return $rs; - } - $savem = $this->fetchMode; - $this->fetchMode = ADODB_FETCH_NUM; - $this->Move($offset); - $this->fetchMode = $savem; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - function MoveNext() - { - if ($this->_numOfRows != 0 && !$this->EOF) { - $this->_currentRow++; - - $this->fields = @db2_fetch_array($this->_queryID); - if ($this->fields) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - } - $this->fields = false; - $this->EOF = true; - return false; - } - - function _fetch() - { - - $this->fields = db2_fetch_array($this->_queryID); - if ($this->fields) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - $this->fields = false; - return false; - } - - function _close() - { - return @db2_free_result($this->_queryID); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-fbsql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-fbsql.inc.php deleted file mode 100755 index 55c93718..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-fbsql.inc.php +++ /dev/null @@ -1,266 +0,0 @@ -. - Set tabs to 8. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (! defined("_ADODB_FBSQL_LAYER")) { - define("_ADODB_FBSQL_LAYER", 1 ); - -class ADODB_fbsql extends ADOConnection { - var $databaseType = 'fbsql'; - var $hasInsertID = true; - var $hasAffectedRows = true; - var $metaTablesSQL = "SHOW TABLES"; - var $metaColumnsSQL = "SHOW COLUMNS FROM %s"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasLimit = false; - - function ADODB_fbsql() - { - } - - function _insertid() - { - return fbsql_insert_id($this->_connectionID); - } - - function _affectedrows() - { - return fbsql_affected_rows($this->_connectionID); - } - - function &MetaDatabases() - { - $qid = fbsql_list_dbs($this->_connectionID); - $arr = array(); - $i = 0; - $max = fbsql_num_rows($qid); - while ($i < $max) { - $arr[] = fbsql_tablename($qid,$i); - $i += 1; - } - return $arr; - } - - // returns concatenated string - function Concat() - { - $s = ""; - $arr = func_get_args(); - $first = true; - - $s = implode(',',$arr); - if (sizeof($arr) > 0) return "CONCAT($s)"; - else return ''; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->_connectionID = fbsql_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->_connectionID = fbsql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function &MetaColumns($table) - { - if ($this->metaColumnsSQL) { - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($rs === false) return false; - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - - // split type into type(length): - if (preg_match("/^(.+)\((\d+)\)$/", $fld->type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = $query_array[2]; - } else { - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($fld->type,'blob') !== false); - - $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return false; - } - - // returns true or false - function SelectDB($dbName) - { - $this->database = $dbName; - if ($this->_connectionID) { - return @fbsql_select_db($dbName,$this->_connectionID); - } - else return false; - } - - - // returns queryID or false - function _query($sql,$inputarr) - { - return fbsql_query("$sql;",$this->_connectionID); - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - $this->_errorMsg = @fbsql_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - return @fbsql_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - return @fbsql_close($this->_connectionID); - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_fbsql extends ADORecordSet{ - - var $databaseType = "fbsql"; - var $canSeek = true; - - function ADORecordSet_fbsql($queryID,$mode=false) - { - if (!$mode) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) { - case ADODB_FETCH_NUM: $this->fetchMode = FBSQL_NUM; break; - case ADODB_FETCH_ASSOC: $this->fetchMode = FBSQL_ASSOC; break; - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = FBSQL_BOTH; break; - } - return $this->ADORecordSet($queryID); - } - - function _initrs() - { - GLOBAL $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @fbsql_num_rows($this->_queryID):-1; - $this->_numOfFields = @fbsql_num_fields($this->_queryID); - } - - - - function &FetchField($fieldOffset = -1) { - if ($fieldOffset != -1) { - $o = @fbsql_fetch_field($this->_queryID, $fieldOffset); - //$o->max_length = -1; // fbsql returns the max length less spaces -- so it is unrealiable - $f = @fbsql_field_flags($this->_queryID,$fieldOffset); - $o->binary = (strpos($f,'binary')!== false); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @fbsql_fetch_field($this->_queryID);// fbsql returns the max length less spaces -- so it is unrealiable - //$o->max_length = -1; - } - - return $o; - } - - function _seek($row) - { - return @fbsql_data_seek($this->_queryID,$row); - } - - function _fetch($ignore_fields=false) - { - $this->fields = @fbsql_fetch_array($this->_queryID,$this->fetchMode); - return ($this->fields == true); - } - - function _close() { - return @fbsql_free_result($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - $len = -1; // fbsql max_length is not accurate - switch (strtoupper($t)) { - case 'CHARACTER': - case 'CHARACTER VARYING': - case 'BLOB': - case 'CLOB': - case 'BIT': - case 'BIT VARYING': - if ($len <= $this->blobSize) return 'C'; - - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'DATE': return 'D'; - - case 'TIME': - case 'TIME WITH TIME ZONE': - case 'TIMESTAMP': - case 'TIMESTAMP WITH TIME ZONE': return 'T'; - - case 'PRIMARY_KEY': - return 'R'; - case 'INTEGER': - case 'SMALLINT': - case 'BOOLEAN': - - if (!empty($fieldobj->primary_key)) return 'R'; - else return 'I'; - - default: return 'N'; - } - } - -} //class -} // defined -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-firebird.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-firebird.inc.php deleted file mode 100755 index 79153d8a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-firebird.inc.php +++ /dev/null @@ -1,77 +0,0 @@ -ADODB_ibase(); - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Firebird Dialect 1'; break; - case '2': $s = 'Firebird Dialect 2'; break; - default: - case '3': $s = 'Firebird Dialect 3'; break; - } - $arr['version'] = ADOConnection::_findvers($s); - $arr['description'] = $s; - return $arr; - } - - // Note that Interbase 6.5 uses this ROWS instead - don't you love forking wars! - // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows - // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0) - { - $nrows = (integer) $nrows; - $offset = (integer) $offset; - $str = 'SELECT '; - if ($nrows >= 0) $str .= "FIRST $nrows "; - $str .=($offset>=0) ? "SKIP $offset " : ''; - - $sql = preg_replace('/^[ \t]*select/i',$str,$sql); - if ($secs) - $rs =& $this->CacheExecute($secs,$sql,$inputarr); - else - $rs =& $this->Execute($sql,$inputarr); - - return $rs; - } - - -}; - - -class ADORecordSet_firebird extends ADORecordSet_ibase { - - var $databaseType = "firebird"; - - function ADORecordSet_firebird($id,$mode=false) - { - $this->ADORecordSet_ibase($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ibase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ibase.inc.php deleted file mode 100755 index afe7cbbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ibase.inc.php +++ /dev/null @@ -1,887 +0,0 @@ - - changed transaction handling and added experimental blob stuff - - Docs to interbase at the website - http://www.synectics.co.za/php3/tutorial/IB_PHP3_API.html - - To use gen_id(), see - http://www.volny.cz/iprenosil/interbase/ip_ib_code.htm#_code_creategen - - $rs = $conn->Execute('select gen_id(adodb,1) from rdb$database'); - $id = $rs->fields[0]; - $conn->Execute("insert into table (id, col1,...) values ($id, $val1,...)"); -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -class ADODB_ibase extends ADOConnection { - var $databaseType = "ibase"; - var $dataProvider = "ibase"; - var $replaceQuote = "''"; // string to use to replace quotes - var $ibase_datefmt = '%Y-%m-%d'; // For hours,mins,secs change to '%Y-%m-%d %H:%M:%S'; - var $fmtDate = "'Y-m-d'"; - var $ibase_timestampfmt = "%Y-%m-%d %H:%M:%S"; - var $ibase_timefmt = "%H:%M:%S"; - var $fmtTimeStamp = "'Y-m-d, H:i:s'"; - var $concat_operator='||'; - var $_transactionID; - var $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'"; - //OPN STUFF start - var $metaColumnsSQL = "select a.rdb\$field_name, a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc"; - //OPN STUFF end - var $ibasetrans; - var $hasGenID = true; - var $_bindInputArray = true; - var $buffers = 0; - var $dialect = 1; - var $sysDate = "cast('TODAY' as timestamp)"; - var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)"; - var $ansiOuter = true; - var $hasAffectedRows = false; - var $poorAffectedRows = true; - var $blobEncodeType = 'C'; - var $role = false; - - function ADODB_ibase() - { - if (defined('IBASE_DEFAULT')) $this->ibasetrans = IBASE_DEFAULT; - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false) - { - if (!function_exists('ibase_pconnect')) return null; - if ($argDatabasename) $argHostname .= ':'.$argDatabasename; - $fn = ($persist) ? 'ibase_pconnect':'ibase_connect'; - if ($this->role) - $this->_connectionID = $fn($argHostname,$argUsername,$argPassword, - $this->charSet,$this->buffers,$this->dialect,$this->role); - else - $this->_connectionID = $fn($argHostname,$argUsername,$argPassword, - $this->charSet,$this->buffers,$this->dialect); - - if ($this->dialect != 1) { // http://www.ibphoenix.com/ibp_60_del_id_ds.html - $this->replaceQuote = "''"; - } - if ($this->_connectionID === false) { - $this->_handleerror(); - return false; - } - - // PHP5 change. - if (function_exists('ibase_timefmt')) { - ibase_timefmt($this->ibase_datefmt,IBASE_DATE ); - if ($this->dialect == 1) ibase_timefmt($this->ibase_datefmt,IBASE_TIMESTAMP ); - else ibase_timefmt($this->ibase_timestampfmt,IBASE_TIMESTAMP ); - ibase_timefmt($this->ibase_timefmt,IBASE_TIME ); - - } else { - ini_set("ibase.timestampformat", $this->ibase_timestampfmt); - ini_set("ibase.dateformat", $this->ibase_datefmt); - ini_set("ibase.timeformat", $this->ibase_timefmt); - } - return true; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true); - } - - - function MetaPrimaryKeys($table,$owner_notused=false,$internalKey=false) - { - if ($internalKey) return array('RDB$DB_KEY'); - - $table = strtoupper($table); - - $sql = 'SELECT S.RDB$FIELD_NAME AFIELDNAME - FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON I.RDB$INDEX_NAME=S.RDB$INDEX_NAME - WHERE I.RDB$RELATION_NAME=\''.$table.'\' and I.RDB$INDEX_NAME like \'RDB$PRIMARY%\' - ORDER BY I.RDB$INDEX_NAME,S.RDB$FIELD_POSITION'; - - $a = $this->GetCol($sql,false,true); - if ($a && sizeof($a)>0) return $a; - return false; - } - - function ServerInfo() - { - $arr['dialect'] = $this->dialect; - switch($arr['dialect']) { - case '': - case '1': $s = 'Interbase 5.5 or earlier'; break; - case '2': $s = 'Interbase 5.6'; break; - default: - case '3': $s = 'Interbase 6.0'; break; - } - $arr['version'] = ADOConnection::_findvers($s); - $arr['description'] = $s; - return $arr; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans, $this->_connectionID); - return $this->_transactionID; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = false; - $this->autoCommit = true; - if ($this->_transactionID) { - //print ' commit '; - $ret = ibase_commit($this->_transactionID); - } - $this->_transactionID = false; - return $ret; - } - - // there are some compat problems with ADODB_COUNTRECS=false and $this->_logsql currently. - // it appears that ibase extension cannot support multiple concurrent queryid's - function &_Execute($sql,$inputarr=false) - { - global $ADODB_COUNTRECS; - - if ($this->_logsql) { - $savecrecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = true; // force countrecs - $ret =& ADOConnection::_Execute($sql,$inputarr); - $ADODB_COUNTRECS = $savecrecs; - } else { - $ret =& ADOConnection::_Execute($sql,$inputarr); - } - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = false; - $this->autoCommit = true; - if ($this->_transactionID) - $ret = ibase_rollback($this->_transactionID); - $this->_transactionID = false; - - return $ret; - } - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $table = strtoupper($table); - $sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'"; - if (!$primary) { - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$%'"; - } else { - $sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'"; - } - // get index details - $rs = $this->Execute($sql); - if (!is_object($rs)) { - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - $index = $row[0]; - if (!isset($indexes[$index])) { - if (is_null($row[3])) {$row[3] = 0;} - $indexes[$index] = array( - 'unique' => ($row[3] == 1), - 'columns' => array() - ); - } - $sql = "SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '".$index."' ORDER BY RDB\$FIELD_POSITION ASC"; - $rs1 = $this->Execute($sql); - while ($row1 = $rs1->FetchRow()) { - $indexes[$index]['columns'][$row1[2]] = $row1[1]; - } - } - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - return $indexes; - } - - - // See http://community.borland.com/article/0,1410,25844,00.html - function RowLock($tables,$where,$col) - { - if ($this->autoCommit) $this->BeginTrans(); - $this->Execute("UPDATE $table SET $col=$col WHERE $where "); // is this correct - jlim? - return 1; - } - - - function CreateSequence($seqname,$startID=1) - { - $ok = $this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" )); - if (!$ok) return false; - return $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';'); - } - - function DropSequence($seqname) - { - $seqname = strtoupper($seqname); - $this->Execute("delete from RDB\$GENERATORS where RDB\$GENERATOR_NAME='$seqname'"); - } - - function GenID($seqname='adodbseq',$startID=1) - { - $getnext = ("SELECT Gen_ID($seqname,1) FROM RDB\$DATABASE"); - $rs = @$this->Execute($getnext); - if (!$rs) { - $this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" )); - $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';'); - $rs = $this->Execute($getnext); - } - if ($rs && !$rs->EOF) $this->genID = (integer) reset($rs->fields); - else $this->genID = 0; // false - - if ($rs) $rs->Close(); - - return $this->genID; - } - - function SelectDB($dbName) - { - return false; - } - - function _handleerror() - { - $this->_errorMsg = ibase_errmsg(); - } - - function ErrorNo() - { - if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1]; - else return 0; - } - - function ErrorMsg() - { - return $this->_errorMsg; - } - - function Prepare($sql) - { - $stmt = ibase_prepare($this->_connectionID,$sql); - if (!$stmt) return false; - return array($sql,$stmt); - } - - // returns query ID if successful, otherwise false - // there have been reports of problems with nested queries - the code is probably not re-entrant? - function _query($sql,$iarr=false) - { - - if (!$this->autoCommit && $this->_transactionID) { - $conn = $this->_transactionID; - $docommit = false; - } else { - $conn = $this->_connectionID; - $docommit = true; - } - if (is_array($sql)) { - $fn = 'ibase_execute'; - $sql = $sql[1]; - if (is_array($iarr)) { - if (ADODB_PHPVER >= 0x4050) { // actually 4.0.4 - if ( !isset($iarr[0]) ) $iarr[0] = ''; // PHP5 compat hack - $fnarr =& array_merge( array($sql) , $iarr); - $ret = call_user_func_array($fn,$fnarr); - } else { - switch(sizeof($iarr)) { - case 1: $ret = $fn($sql,$iarr[0]); break; - case 2: $ret = $fn($sql,$iarr[0],$iarr[1]); break; - case 3: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2]); break; - case 4: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break; - case 5: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break; - case 6: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; - case 7: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; - default: ADOConnection::outp( "Too many parameters to ibase query $sql"); - case 8: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; - } - } - } else $ret = $fn($sql); - } else { - $fn = 'ibase_query'; - - if (is_array($iarr)) { - if (ADODB_PHPVER >= 0x4050) { // actually 4.0.4 - if (sizeof($iarr) == 0) $iarr[0] = ''; // PHP5 compat hack - $fnarr =& array_merge( array($conn,$sql) , $iarr); - $ret = call_user_func_array($fn,$fnarr); - } else { - switch(sizeof($iarr)) { - case 1: $ret = $fn($conn,$sql,$iarr[0]); break; - case 2: $ret = $fn($conn,$sql,$iarr[0],$iarr[1]); break; - case 3: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2]); break; - case 4: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break; - case 5: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break; - case 6: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break; - case 7: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break; - default: ADOConnection::outp( "Too many parameters to ibase query $sql"); - case 8: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break; - } - } - } else $ret = $fn($conn,$sql); - } - if ($docommit && $ret === true) ibase_commit($this->_connectionID); - - $this->_handleerror(); - return $ret; - } - - // returns true or false - function _close() - { - if (!$this->autoCommit) @ibase_rollback($this->_connectionID); - return @ibase_close($this->_connectionID); - } - - //OPN STUFF start - function _ConvertFieldType(&$fld, $ftype, $flen, $fscale, $fsubtype, $fprecision, $dialect3) - { - $fscale = abs($fscale); - $fld->max_length = $flen; - $fld->scale = null; - switch($ftype){ - case 7: - case 8: - if ($dialect3) { - switch($fsubtype){ - case 0: - $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); - break; - case 1: - $fld->type = 'numeric'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - case 2: - $fld->type = 'decimal'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - } // switch - } else { - if ($fscale !=0) { - $fld->type = 'decimal'; - $fld->scale = $fscale; - $fld->max_length = ($ftype == 7 ? 4 : 9); - } else { - $fld->type = ($ftype == 7 ? 'smallint' : 'integer'); - } - } - break; - case 16: - if ($dialect3) { - switch($fsubtype){ - case 0: - $fld->type = 'decimal'; - $fld->max_length = 18; - $fld->scale = 0; - break; - case 1: - $fld->type = 'numeric'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - case 2: - $fld->type = 'decimal'; - $fld->max_length = $fprecision; - $fld->scale = $fscale; - break; - } // switch - } - break; - case 10: - $fld->type = 'float'; - break; - case 14: - $fld->type = 'char'; - break; - case 27: - if ($fscale !=0) { - $fld->type = 'decimal'; - $fld->max_length = 15; - $fld->scale = 5; - } else { - $fld->type = 'double'; - } - break; - case 35: - if ($dialect3) { - $fld->type = 'timestamp'; - } else { - $fld->type = 'date'; - } - break; - case 12: - $fld->type = 'date'; - break; - case 13: - $fld->type = 'time'; - break; - case 37: - $fld->type = 'varchar'; - break; - case 40: - $fld->type = 'cstring'; - break; - case 261: - $fld->type = 'blob'; - $fld->max_length = -1; - break; - } // switch - } - //OPN STUFF end - // returns array of ADOFieldObjects for current table - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - $ADODB_FETCH_MODE = $save; - $false = false; - if ($rs === false) { - return $false; - } - - $retarr = array(); - //OPN STUFF start - $dialect3 = ($this->dialect==3 ? true : false); - //OPN STUFF end - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = trim($rs->fields[0]); - //OPN STUFF start - $this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3); - if (isset($rs->fields[1]) && $rs->fields[1]) { - $fld->not_null = true; - } - if (isset($rs->fields[2])) { - - $fld->has_default = true; - $d = substr($rs->fields[2],strlen('default ')); - switch ($fld->type) - { - case 'smallint': - case 'integer': $fld->default_value = (int) $d; break; - case 'char': - case 'blob': - case 'text': - case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break; - case 'double': - case 'float': $fld->default_value = (float) $d; break; - default: $fld->default_value = $d; break; - } - // case 35:$tt = 'TIMESTAMP'; break; - } - if ((isset($rs->fields[5])) && ($fld->type == 'blob')) { - $fld->sub_type = $rs->fields[5]; - } else { - $fld->sub_type = null; - } - //OPN STUFF end - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if ( empty($retarr)) return $false; - else return $retarr; - } - - function BlobEncode( $blob ) - { - $blobid = ibase_blob_create( $this->_connectionID); - ibase_blob_add( $blobid, $blob ); - return ibase_blob_close( $blobid ); - } - - // since we auto-decode all blob's since 2.42, - // BlobDecode should not do any transforms - function BlobDecode($blob) - { - return $blob; - } - - - - - // old blobdecode function - // still used to auto-decode all blob's - function _BlobDecode_old( $blob ) - { - $blobid = ibase_blob_open($this->_connectionID, $blob ); - $realblob = ibase_blob_get( $blobid,$this->maxblobsize); // 2nd param is max size of blob -- Kevin Boillet - while($string = ibase_blob_get($blobid, 8192)){ - $realblob .= $string; - } - ibase_blob_close( $blobid ); - - return( $realblob ); - } - - function _BlobDecode( $blob ) - { - if (ADODB_PHPVER >= 0x5000) { - $blob_data = ibase_blob_info($this->_connectionID, $blob ); - $blobid = ibase_blob_open($this->_connectionID, $blob ); - } else { - - $blob_data = ibase_blob_info( $blob ); - $blobid = ibase_blob_open( $blob ); - } - - if( $blob_data[0] > $this->maxblobsize ) { - - $realblob = ibase_blob_get($blobid, $this->maxblobsize); - - while($string = ibase_blob_get($blobid, 8192)){ - $realblob .= $string; - } - } else { - $realblob = ibase_blob_get($blobid, $blob_data[0]); - } - - ibase_blob_close( $blobid ); - return( $realblob ); - } - - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - $fd = fopen($path,'rb'); - if ($fd === false) return false; - $blob_id = ibase_blob_create($this->_connectionID); - - /* fill with data */ - - while ($val = fread($fd,32768)){ - ibase_blob_add($blob_id, $val); - } - - /* close and get $blob_id_str for inserting into table */ - $blob_id_str = ibase_blob_close($blob_id); - - fclose($fd); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - $blob_id = ibase_blob_create($this->_connectionID); - - // ibase_blob_add($blob_id, $val); - - // replacement that solves the problem by which only the first modulus 64K / - // of $val are stored at the blob field //////////////////////////////////// - // Thx Abel Berenstein aberenstein#afip.gov.ar - $len = strlen($val); - $chunk_size = 32768; - $tail_size = $len % $chunk_size; - $n_chunks = ($len - $tail_size) / $chunk_size; - - for ($n = 0; $n < $n_chunks; $n++) { - $start = $n * $chunk_size; - $data = substr($val, $start, $chunk_size); - ibase_blob_add($blob_id, $data); - } - - if ($tail_size) { - $start = $n_chunks * $chunk_size; - $data = substr($val, $start, $tail_size); - ibase_blob_add($blob_id, $data); - } - // end replacement ///////////////////////////////////////////////////////// - - $blob_id_str = ibase_blob_close($blob_id); - - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - - } - - - function OldUpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - $blob_id = ibase_blob_create($this->_connectionID); - ibase_blob_add($blob_id, $val); - $blob_id_str = ibase_blob_close($blob_id); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; - } - - // Format date column in sql string given an input format that understands Y M D - // Only since Interbase 6.0 - uses EXTRACT - // problem - does not zero-fill the day and month yet - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysDate; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '||'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "extract(year from $col)"; - break; - case 'M': - case 'm': - $s .= "extract(month from $col)"; - break; - case 'Q': - case 'q': - $s .= "cast(((extract(month from $col)+2) / 3) as integer)"; - break; - case 'D': - case 'd': - $s .= "(extract(day from $col))"; - break; - case 'H': - case 'h': - $s .= "(extract(hour from $col))"; - break; - case 'I': - case 'i': - $s .= "(extract(minute from $col))"; - break; - case 'S': - case 's': - $s .= "CAST((extract(second from $col)) AS INTEGER)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_ibase extends ADORecordSet -{ - - var $databaseType = "ibase"; - var $bind=false; - var $_cacheType; - - function ADORecordset_ibase($id,$mode=false) - { - global $ADODB_FETCH_MODE; - - $this->fetchMode = ($mode === false) ? $ADODB_FETCH_MODE : $mode; - $this->ADORecordSet($id); - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $ibf = ibase_field_info($this->_queryID,$fieldOffset); - switch (ADODB_ASSOC_CASE) { - case 2: // the default - $fld->name = ($ibf['alias']); - if (empty($fld->name)) $fld->name = ($ibf['name']); - break; - case 0: - $fld->name = strtoupper($ibf['alias']); - if (empty($fld->name)) $fld->name = strtoupper($ibf['name']); - break; - case 1: - $fld->name = strtolower($ibf['alias']); - if (empty($fld->name)) $fld->name = strtolower($ibf['name']); - break; - } - - $fld->type = $ibf['type']; - $fld->max_length = $ibf['length']; - - /* This needs to be populated from the metadata */ - $fld->not_null = false; - $fld->has_default = false; - $fld->default_value = 'null'; - return $fld; - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = @ibase_num_fields($this->_queryID); - - // cache types for blob decode check - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - $f1 = $this->FetchField($i); - $this->_cacheType[] = $f1->type; - } - } - - function _seek($row) - { - return false; - } - - function _fetch() - { - $f = @ibase_fetch_row($this->_queryID); - if ($f === false) { - $this->fields = false; - return false; - } - // OPN stuff start - optimized - // fix missing nulls and decode blobs automatically - - global $ADODB_ANSI_PADDING_OFF; - //$ADODB_ANSI_PADDING_OFF=1; - $rtrim = !empty($ADODB_ANSI_PADDING_OFF); - - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - if ($this->_cacheType[$i]=="BLOB") { - if (isset($f[$i])) { - $f[$i] = $this->connection->_BlobDecode($f[$i]); - } else { - $f[$i] = null; - } - } else { - if (!isset($f[$i])) { - $f[$i] = null; - } else if ($rtrim && is_string($f[$i])) { - $f[$i] = rtrim($f[$i]); - } - } - } - // OPN stuff end - - $this->fields = $f; - if ($this->fetchMode == ADODB_FETCH_ASSOC) { - $this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE); - } else if ($this->fetchMode == ADODB_FETCH_BOTH) { - $this->fields =& array_merge($this->fields,$this->GetRowAssoc(ADODB_ASSOC_CASE)); - } - return true; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - - } - - - function _close() - { - return @ibase_free_result($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'CHAR': - return 'C'; - - case 'TEXT': - case 'VARCHAR': - case 'VARYING': - if ($len <= $this->blobSize) return 'C'; - return 'X'; - case 'BLOB': - return 'B'; - - case 'TIMESTAMP': - case 'DATE': return 'D'; - case 'TIME': return 'T'; - //case 'T': return 'T'; - - //case 'L': return 'L'; - case 'INT': - case 'SHORT': - case 'INTEGER': return 'I'; - default: return 'N'; - } - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix.inc.php deleted file mode 100755 index 04c054b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix.inc.php +++ /dev/null @@ -1,40 +0,0 @@ -ADORecordset_informix72($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix72.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix72.inc.php deleted file mode 100755 index 0227fe37..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-informix72.inc.php +++ /dev/null @@ -1,475 +0,0 @@ - - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('IFX_SCROLL')) define('IFX_SCROLL',1); - -class ADODB_informix72 extends ADOConnection { - var $databaseType = "informix72"; - var $dataProvider = "informix"; - var $replaceQuote = "''"; // string to use to replace quotes - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasInsertID = true; - var $hasAffectedRows = true; - var $substr = 'substr'; - var $metaTablesSQL="select tabname,tabtype from systables where tabtype in ('T','V') and owner!='informix'"; //Don't get informix tables and pseudo-tables - - - var $metaColumnsSQL = - "select c.colname, c.coltype, c.collength, d.default,c.colno - from syscolumns c, systables t,outer sysdefaults d - where c.tabid=t.tabid and d.tabid=t.tabid and d.colno=c.colno - and tabname='%s' order by c.colno"; - - var $metaPrimaryKeySQL = - "select part1,part2,part3,part4,part5,part6,part7,part8 from - systables t,sysconstraints s,sysindexes i where t.tabname='%s' - and s.tabid=t.tabid and s.constrtype='P' - and i.idxname=s.idxname"; - - var $concat_operator = '||'; - - var $lastQuery = false; - var $has_insertid = true; - - var $_autocommit = true; - var $_bindInputArray = true; // set to true if ADOConnection.Execute() permits binding of array parameters. - var $sysDate = 'TODAY'; - var $sysTimeStamp = 'CURRENT'; - var $cursorType = IFX_SCROLL; // IFX_SCROLL or IFX_HOLD or 0 - - function ADODB_informix72() - { - // alternatively, use older method: - //putenv("DBDATE=Y4MD-"); - - // force ISO date format - putenv('GL_DATE=%Y-%m-%d'); - - if (function_exists('ifx_byteasvarchar')) { - ifx_byteasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. - ifx_textasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. - ifx_blobinfile_mode(0); // Mode "0" means save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in a file. - } - } - - function ServerInfo() - { - if (isset($this->version)) return $this->version; - - $arr['description'] = $this->GetOne("select DBINFO('version','full') from systables where tabid = 1"); - $arr['version'] = $this->GetOne("select DBINFO('version','major') || DBINFO('version','minor') from systables where tabid = 1"); - $this->version = $arr; - return $arr; - } - - - - function _insertid() - { - $sqlca =ifx_getsqlca($this->lastQuery); - return @$sqlca["sqlerrd1"]; - } - - function _affectedrows() - { - if ($this->lastQuery) { - return @ifx_affected_rows ($this->lastQuery); - } - return 0; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('BEGIN'); - $this->_autocommit = false; - return true; - } - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - $this->_autocommit = true; - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - $this->_autocommit = true; - return true; - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->_autocommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - /* Returns: the last error message from previous database operation - Note: This function is NOT available for Microsoft SQL Server. */ - - function ErrorMsg() - { - if (!empty($this->_logsql)) return $this->_errorMsg; - $this->_errorMsg = ifx_errormsg(); - return $this->_errorMsg; - } - - function ErrorNo() - { - preg_match("/.*SQLCODE=([^\]]*)/",ifx_error(),$parse); - if (is_array($parse) && isset($parse[1])) return (int)$parse[1]; - return 0; - } - - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if (!empty($this->metaColumnsSQL)) { - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if ($rs === false) return $false; - $rspkey = $this->Execute(sprintf($this->metaPrimaryKeySQL,$table)); //Added to get primary key colno items - - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; -/* //!eos. - $rs->fields[1] is not the correct adodb type - $rs->fields[2] is not correct max_length, because can include not-null bit - - $fld->type = $rs->fields[1]; - $fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields); //Added to set primary key flag - $fld->max_length = $rs->fields[2];*/ - $pr=ifx_props($rs->fields[1],$rs->fields[2]); //!eos - $fld->type = $pr[0] ;//!eos - $fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields); - $fld->max_length = $pr[1]; //!eos - $fld->precision = $pr[2] ;//!eos - $fld->not_null = $pr[3]=="N"; //!eos - - if (trim($rs->fields[3]) != "AAAAAA 0") { - $fld->has_default = 1; - $fld->default_value = $rs->fields[3]; - } else { - $fld->has_default = 0; - } - - $retarr[strtolower($fld->name)] = $fld; - $rs->MoveNext(); - } - - $rs->Close(); - $rspkey->Close(); //!eos - return $retarr; - } - - return $false; - } - - function &xMetaColumns($table) - { - return ADOConnection::MetaColumns($table,false); - } - - function MetaForeignKeys($table, $owner=false, $upper=false) //!Eos - { - $sql = " - select tr.tabname,updrule,delrule, - i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4, - i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8 - from systables t,sysconstraints s,sysindexes i, - sysreferences r,systables tr,sysconstraints s2,sysindexes i2 - where t.tabname='$table' - and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid - and i.idxname=s.idxname and tr.tabid=r.ptabid - and s2.constrid=r.primary and i2.idxname=s2.idxname"; - - $rs = $this->Execute($sql); - if (!$rs || $rs->EOF) return false; - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $coldest=$this->metaColumnNames($v["tabname"]); - $colorig=$this->metaColumnNames($table); - $colnames=array(); - for($i=1;$i<=8 && $v["o$i"] ;$i++) { - $colnames[]=$coldest[$v["d$i"]-1]."=".$colorig[$v["o$i"]-1]; - } - if($upper) - $a[strtoupper($v["tabname"])] = $colnames; - else - $a[$v["tabname"]] = $colnames; - } - return $a; - } - - function UpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB') - { - $type = ($blobtype == 'TEXT') ? 1 : 0; - $blobid = ifx_create_blob($type,0,$val); - return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blobid)); - } - - function BlobDecode($blobid) - { - return function_exists('ifx_byteasvarchar') ? $blobid : @ifx_get_blob($blobid); - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('ifx_connect')) return null; - - $dbs = $argDatabasename . "@" . $argHostname; - if ($argHostname) putenv("INFORMIXSERVER=$argHostname"); - putenv("INFORMIXSERVER=".trim($argHostname)); - $this->_connectionID = ifx_connect($dbs,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - #if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('ifx_connect')) return null; - - $dbs = $argDatabasename . "@" . $argHostname; - putenv("INFORMIXSERVER=".trim($argHostname)); - $this->_connectionID = ifx_pconnect($dbs,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - #if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } -/* - // ifx_do does not accept bind parameters - weird ??? - function Prepare($sql) - { - $stmt = ifx_prepare($sql); - if (!$stmt) return $sql; - else return array($sql,$stmt); - } -*/ - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - global $ADODB_COUNTRECS; - - // String parameters have to be converted using ifx_create_char - if ($inputarr) { - foreach($inputarr as $v) { - if (gettype($v) == 'string') { - $tab[] = ifx_create_char($v); - } - else { - $tab[] = $v; - } - } - } - - // In case of select statement, we use a scroll cursor in order - // to be able to call "move", or "movefirst" statements - if (!$ADODB_COUNTRECS && preg_match("/^\s*select/is", $sql)) { - if ($inputarr) { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType, $tab); - } - else { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType); - } - } - else { - if ($inputarr) { - $this->lastQuery = ifx_query($sql,$this->_connectionID, $tab); - } - else { - $this->lastQuery = ifx_query($sql,$this->_connectionID); - } - } - - // Following line have been commented because autocommit mode is - // not supported by informix SE 7.2 - - //if ($this->_autocommit) ifx_query('COMMIT',$this->_connectionID); - - return $this->lastQuery; - } - - // returns true or false - function _close() - { - $this->lastQuery = false; - return ifx_close($this->_connectionID); - } -} - - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_informix72 extends ADORecordSet { - - var $databaseType = "informix72"; - var $canSeek = true; - var $_fieldprops = false; - - function ADORecordset_informix72($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id); - } - - - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - function &FetchField($fieldOffset = -1) - { - if (empty($this->_fieldprops)) { - $fp = ifx_fieldproperties($this->_queryID); - foreach($fp as $k => $v) { - $o = new ADOFieldObject; - $o->name = $k; - $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE" - $o->type = $arr[0]; - $o->max_length = $arr[1]; - $this->_fieldprops[] = $o; - $o->not_null = $arr[4]=="N"; - } - } - $ret = $this->_fieldprops[$fieldOffset]; - return $ret; - } - - function _initrs() - { - $this->_numOfRows = -1; // ifx_affected_rows not reliable, only returns estimate -- ($ADODB_COUNTRECS)? ifx_affected_rows($this->_queryID):-1; - $this->_numOfFields = ifx_num_fields($this->_queryID); - } - - function _seek($row) - { - return @ifx_fetch_row($this->_queryID, (int) $row); - } - - function MoveLast() - { - $this->fields = @ifx_fetch_row($this->_queryID, "LAST"); - if ($this->fields) $this->EOF = false; - $this->_currentRow = -1; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - - return true; - } - - function MoveFirst() - { - $this->fields = @ifx_fetch_row($this->_queryID, "FIRST"); - if ($this->fields) $this->EOF = false; - $this->_currentRow = 0; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - - return true; - } - - function _fetch($ignore_fields=false) - { - - $this->fields = @ifx_fetch_row($this->_queryID); - - if (!is_array($this->fields)) return false; - - if ($this->fetchMode == ADODB_FETCH_NUM) { - foreach($this->fields as $v) { - $arr[] = $v; - } - $this->fields = $arr; - } - return true; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - function _close() - { - return ifx_free_result($this->_queryID); - } - -} -/** !Eos -* Auxiliar function to Parse coltype,collength. Used by Metacolumns -* return: array ($mtype,$length,$precision,$nullable) (similar to ifx_fieldpropierties) -*/ -function ifx_props($coltype,$collength){ - $itype=fmod($coltype+1,256); - $nullable=floor(($coltype+1) /256) ?"N":"Y"; - $mtype=substr(" CIIFFNNDN TBXCC ",$itype,1); - switch ($itype){ - case 2: - $length=4; - case 6: - case 9: - case 14: - $length=floor($collength/256); - $precision=fmod($collength,256); - break; - default: - $precision=0; - $length=$collength; - } - return array($mtype,$length,$precision,$nullable); -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ldap.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ldap.inc.php deleted file mode 100755 index 3a94be6e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-ldap.inc.php +++ /dev/null @@ -1,406 +0,0 @@ -port); - - if ( strstr( $host, ':' ) ) { - $conn_info = split( ':', $host ); - } - - $this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] ); - if (!$this->_connectionID) { - $e = 'Could not connect to ' . $conn_info[0]; - $this->_errorMsg = $e; - if ($this->debug) ADOConnection::outp($e); - return false; - } - if( count( $LDAP_CONNECT_OPTIONS ) > 0 ) { - $this->_inject_bind_options( $LDAP_CONNECT_OPTIONS ); - } - - if ($username) { - $bind = ldap_bind( $this->_connectionID, $username, $password ); - } else { - $username = 'anonymous'; - $bind = ldap_bind( $this->_connectionID ); - } - - if (!$bind) { - $e = 'Could not bind to ' . $conn_info[0] . " as ".$username; - $this->_errorMsg = $e; - if ($this->debug) ADOConnection::outp($e); - return false; - } - $this->_errorMsg = ''; - $this->database = $ldapbase; - return $this->_connectionID; - } - -/* - Valid Domain Values for LDAP Options: - - LDAP_OPT_DEREF (integer) - LDAP_OPT_SIZELIMIT (integer) - LDAP_OPT_TIMELIMIT (integer) - LDAP_OPT_PROTOCOL_VERSION (integer) - LDAP_OPT_ERROR_NUMBER (integer) - LDAP_OPT_REFERRALS (boolean) - LDAP_OPT_RESTART (boolean) - LDAP_OPT_HOST_NAME (string) - LDAP_OPT_ERROR_STRING (string) - LDAP_OPT_MATCHED_DN (string) - LDAP_OPT_SERVER_CONTROLS (array) - LDAP_OPT_CLIENT_CONTROLS (array) - - Make sure to set this BEFORE calling Connect() - - Example: - - $LDAP_CONNECT_OPTIONS = Array( - Array ( - "OPTION_NAME"=>LDAP_OPT_DEREF, - "OPTION_VALUE"=>2 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_SIZELIMIT, - "OPTION_VALUE"=>100 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_TIMELIMIT, - "OPTION_VALUE"=>30 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION, - "OPTION_VALUE"=>3 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER, - "OPTION_VALUE"=>13 - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_REFERRALS, - "OPTION_VALUE"=>FALSE - ), - Array ( - "OPTION_NAME"=>LDAP_OPT_RESTART, - "OPTION_VALUE"=>FALSE - ) - ); -*/ - - function _inject_bind_options( $options ) { - foreach( $options as $option ) { - ldap_set_option( $this->_connectionID, $option["OPTION_NAME"], $option["OPTION_VALUE"] ) - or die( "Unable to set server option: " . $option["OPTION_NAME"] ); - } - } - - /* returns _queryID or false */ - function _query($sql,$inputarr) - { - $rs = ldap_search( $this->_connectionID, $this->database, $sql ); - $this->_errorMsg = ($rs) ? '' : 'Search error on '.$sql; - return $rs; - } - - /* closes the LDAP connection */ - function _close() - { - @ldap_close( $this->_connectionID ); - $this->_connectionID = false; - } - - function SelectDB($db) { - $this->database = $db; - return true; - } // SelectDB - - function ServerInfo() - { - if( !empty( $this->version ) ) return $this->version; - $version = array(); - /* - Determines how aliases are handled during search. - LDAP_DEREF_NEVER (0x00) - LDAP_DEREF_SEARCHING (0x01) - LDAP_DEREF_FINDING (0x02) - LDAP_DEREF_ALWAYS (0x03) - The LDAP_DEREF_SEARCHING value means aliases are dereferenced during the search but - not when locating the base object of the search. The LDAP_DEREF_FINDING value means - aliases are dereferenced when locating the base object but not during the search. - Default: LDAP_DEREF_NEVER - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_DEREF, $version['LDAP_OPT_DEREF'] ) ; - switch ( $version['LDAP_OPT_DEREF'] ) { - case 0: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_NEVER'; - case 1: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_SEARCHING'; - case 2: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_FINDING'; - case 3: - $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_ALWAYS'; - } - - /* - A limit on the number of entries to return from a search. - LDAP_NO_LIMIT (0) means no limit. - Default: LDAP_NO_LIMIT - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_SIZELIMIT, $version['LDAP_OPT_SIZELIMIT'] ); - if ( $version['LDAP_OPT_SIZELIMIT'] == 0 ) { - $version['LDAP_OPT_SIZELIMIT'] = 'LDAP_NO_LIMIT'; - } - - /* - A limit on the number of seconds to spend on a search. - LDAP_NO_LIMIT (0) means no limit. - Default: LDAP_NO_LIMIT - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_TIMELIMIT, $version['LDAP_OPT_TIMELIMIT'] ); - if ( $version['LDAP_OPT_TIMELIMIT'] == 0 ) { - $version['LDAP_OPT_TIMELIMIT'] = 'LDAP_NO_LIMIT'; - } - - /* - Determines whether the LDAP library automatically follows referrals returned by LDAP servers or not. - LDAP_OPT_ON - LDAP_OPT_OFF - Default: ON - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_REFERRALS, $version['LDAP_OPT_REFERRALS'] ); - if ( $version['LDAP_OPT_REFERRALS'] == 0 ) { - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_OFF'; - } else { - $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_ON'; - - } - /* - Determines whether LDAP I/O operations are automatically restarted if they abort prematurely. - LDAP_OPT_ON - LDAP_OPT_OFF - Default: OFF - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_RESTART, $version['LDAP_OPT_RESTART'] ); - if ( $version['LDAP_OPT_RESTART'] == 0 ) { - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_OFF'; - } else { - $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_ON'; - - } - /* - This option indicates the version of the LDAP protocol used when communicating with the primary LDAP server. - LDAP_VERSION2 (2) - LDAP_VERSION3 (3) - Default: LDAP_VERSION2 (2) - */ - ldap_get_option( $this->_connectionID, LDAP_OPT_PROTOCOL_VERSION, $version['LDAP_OPT_PROTOCOL_VERSION'] ); - if ( $version['LDAP_OPT_PROTOCOL_VERSION'] == 2 ) { - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION2'; - } else { - $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION3'; - - } - /* The host name (or list of hosts) for the primary LDAP server. */ - ldap_get_option( $this->_connectionID, LDAP_OPT_HOST_NAME, $version['LDAP_OPT_HOST_NAME'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_NUMBER, $version['LDAP_OPT_ERROR_NUMBER'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_STRING, $version['LDAP_OPT_ERROR_STRING'] ); - ldap_get_option( $this->_connectionID, LDAP_OPT_MATCHED_DN, $version['LDAP_OPT_MATCHED_DN'] ); - - return $this->version = $version; - - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_ldap extends ADORecordSet{ - - var $databaseType = "ldap"; - var $canSeek = false; - var $_entryID; /* keeps track of the entry resource identifier */ - - function ADORecordSet_ldap($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: - $this->fetchMode = LDAP_NUM; - break; - case ADODB_FETCH_ASSOC: - $this->fetchMode = LDAP_ASSOC; - break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = LDAP_BOTH; - break; - } - - $this->ADORecordSet($queryID); - } - - function _initrs() - { - /* - This could be teaked to respect the $COUNTRECS directive from ADODB - It's currently being used in the _fetch() function and the - GetAssoc() function - */ - $this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID ); - - } - - /* - Return whole recordset as a multi-dimensional associative array - */ - function &GetAssoc($force_array = false, $first2cols = false) - { - $records = $this->_numOfRows; - $results = array(); - for ( $i=0; $i < $records; $i++ ) { - foreach ( $this->fields as $k=>$v ) { - if ( is_array( $v ) ) { - if ( $v['count'] == 1 ) { - $results[$i][$k] = $v[0]; - } else { - array_shift( $v ); - $results[$i][$k] = $v; - } - } - } - } - - return $results; - } - - function &GetRowAssoc() - { - $results = array(); - foreach ( $this->fields as $k=>$v ) { - if ( is_array( $v ) ) { - if ( $v['count'] == 1 ) { - $results[$k] = $v[0]; - } else { - array_shift( $v ); - $results[$k] = $v; - } - } - } - - return $results; - } - - function GetRowNums() - { - $results = array(); - foreach ( $this->fields as $k=>$v ) { - static $i = 0; - if (is_array( $v )) { - if ( $v['count'] == 1 ) { - $results[$i] = $v[0]; - } else { - array_shift( $v ); - $results[$i] = $v; - } - $i++; - } - } - return $results; - } - - function _fetch() - { - if ( $this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0 ) - return false; - - if ( $this->_currentRow == 0 ) { - $this->_entryID = ldap_first_entry( $this->connection->_connectionID, $this->_queryID ); - } else { - $this->_entryID = ldap_next_entry( $this->connection->_connectionID, $this->_entryID ); - } - - $this->fields = ldap_get_attributes( $this->connection->_connectionID, $this->_entryID ); - $this->_numOfFields = $this->fields['count']; - switch ( $this->fetchMode ) { - - case LDAP_ASSOC: - $this->fields = $this->GetRowAssoc(); - break; - - case LDAP_NUM: - $this->fields = array_merge($this->GetRowNums(),$this->GetRowAssoc()); - break; - - case LDAP_BOTH: - default: - $this->fields = $this->GetRowNums(); - break; - } - return ( is_array( $this->fields ) ); - } - - function _close() { - @ldap_free_result( $this->_queryID ); - $this->_queryID = false; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql.inc.php deleted file mode 100755 index c93ab43c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql.inc.php +++ /dev/null @@ -1,1037 +0,0 @@ -= 0x4300) { -// docs say 4.2.0, but testing shows only since 4.3.0 does it work! - ini_set('mssql.datetimeconvert',0); -} else { -global $ADODB_mssql_mths; // array, months must be upper-case - - - $ADODB_mssql_date_order = 'mdy'; - $ADODB_mssql_mths = array( - 'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6, - 'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); -} - -//--------------------------------------------------------------------------- -// Call this to autoset $ADODB_mssql_date_order at the beginning of your code, -// just after you connect to the database. Supports mdy and dmy only. -// Not required for PHP 4.2.0 and above. -function AutoDetect_MSSQL_Date_Order($conn) -{ -global $ADODB_mssql_date_order; - $adate = $conn->GetOne('select getdate()'); - if ($adate) { - $anum = (int) $adate; - if ($anum > 0) { - if ($anum > 31) { - //ADOConnection::outp( "MSSQL: YYYY-MM-DD date format not supported currently"); - } else - $ADODB_mssql_date_order = 'dmy'; - } else - $ADODB_mssql_date_order = 'mdy'; - } -} - -class ADODB_mssql extends ADOConnection { - var $databaseType = "mssql"; - var $dataProvider = "mssql"; - var $replaceQuote = "''"; // string to use to replace quotes - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d H:i:s'"; - var $hasInsertID = true; - var $substr = "substring"; - var $length = 'len'; - var $hasAffectedRows = true; - var $metaDatabasesSQL = "select name from sysdatabases where name <> 'master'"; - var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"; - var $metaColumnsSQL = # xtype==61 is datetime -"select c.name,t.name,c.length, - (case when c.xusertype=61 then 0 else c.xprec end), - (case when c.xusertype=61 then 0 else c.xscale end) - from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; - var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE - var $hasGenID = true; - var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - var $sysTimeStamp = 'GetDate()'; - var $_has_mssql_init; - var $maxParameterLen = 4000; - var $arrayClass = 'ADORecordSet_array_mssql'; - var $uniqueSort = true; - var $leftOuter = '*='; - var $rightOuter = '=*'; - var $ansiOuter = true; // for mssql7 or later - var $poorAffectedRows = true; - var $identitySQL = 'select @@IDENTITY'; // 'select SCOPE_IDENTITY'; # for mssql 2000 - var $uniqueOrderBy = true; - var $_bindInputArray = true; - - function ADODB_mssql() - { - $this->_has_mssql_init = (strnatcmp(PHP_VERSION,'4.1.0')>=0); - } - - function ServerInfo() - { - global $ADODB_FETCH_MODE; - - - if ($this->fetchMode === false) { - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - } else - $savem = $this->SetFetchMode(ADODB_FETCH_NUM); - - if (0) { - $stmt = $this->PrepareSP('sp_server_info'); - $val = 2; - $this->Parameter($stmt,$val,'attribute_id'); - $row = $this->GetRow($stmt); - } - - $row = $this->GetRow("execute sp_server_info 2"); - - - if ($this->fetchMode === false) { - $ADODB_FETCH_MODE = $savem; - } else - $this->SetFetchMode($savem); - - $arr['description'] = $row[2]; - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " ISNULL($field, $ifNull) "; // if MS SQL Server - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seq='adodbseq',$start=1) - { - - $this->Execute('BEGIN TRANSACTION adodbseq'); - $start -= 1; - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return true; - } - - function GenID($seq='adodbseq',$start=1) - { - //$this->debug=1; - $this->Execute('BEGIN TRANSACTION adodbseq'); - $ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1"); - if (!$ok) { - $this->Execute("create table $seq (id float(53))"); - $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); - if (!$ok) { - $this->Execute('ROLLBACK TRANSACTION adodbseq'); - return false; - } - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $start; - } - $num = $this->GetOne("select id from $seq"); - $this->Execute('COMMIT TRANSACTION adodbseq'); - return $num; - - // in old implementation, pre 1.90, we returned GUID... - //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'"); - } - - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($nrows > 0 && $offset <= 0) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql); - $rs =& $this->Execute($sql,$inputarr); - } else - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - - return $rs; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yyyy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(quarter,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(day($col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('BEGIN TRAN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT TRAN'); - return true; - } - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK TRAN'); - return true; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - /* - Usage: - - $this->BeginTrans(); - $this->RowLock('table1,table2','table1.id=33 and table2.id=table1.id'); # lock row 33 for both tables - - # some operation on both tables table1 and table2 - - $this->CommitTrans(); - - See http://www.swynk.com/friends/achigrik/SQL70Locks.asp - */ - function RowLock($tables,$where,$flds='top 1 null as ignore') - { - if (!$this->transCnt) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables with (ROWLOCK,HOLDLOCK) where $where"); - } - - - function &MetaIndexes($table,$primary=false) - { - $table = $this->qstr($table); - - $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, - CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, - CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique - FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id - INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid - INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid - WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table - ORDER BY O.name, I.Name, K.keyno"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - if (!$primary && $row[5]) continue; - - $indexes[$row[0]]['unique'] = $row[6]; - $indexes[$row[0]]['columns'][] = $row[1]; - } - return $indexes; - } - - function MetaForeignKeys($table, $owner=false, $upper=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - - $sql = -"select object_name(constid) as constraint_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where upper(object_name(fkeyid)) = $table -order by constraint_name, referenced_table_name, keyno"; - - $constraints =& $this->GetArray($sql); - - $ADODB_FETCH_MODE = $save; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; - } - if (!$arr) return false; - - $arr2 = false; - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - //From: Fernando Moreira - function MetaDatabases() - { - if(@mssql_select_db("master")) { - $qry=$this->metaDatabasesSQL; - if($rs=@mssql_query($qry,$this->_connectionID)){ - $tmpAr=$ar=array(); - while($tmpAr=@mssql_fetch_row($rs)) - $ar[]=$tmpAr[0]; - @mssql_select_db($this->database); - if(sizeof($ar)) - return($ar); - else - return(false); - } else { - @mssql_select_db($this->database); - return(false); - } - } - return(false); - } - - // "Stein-Aksel Basma" - // tested with MSSQL 2000 - function &MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - $schema = ''; - $this->_findschema($table,$schema); - if (!$schema) $schema = $this->database; - if ($schema) $schema = "and k.table_catalog like '$schema%'"; - - $sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, - information_schema.table_constraints tc - where tc.constraint_name = k.constraint_name and tc.constraint_type = - 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position "; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $a = $this->GetCol($sql); - $ADODB_FETCH_MODE = $savem; - - if ($a && sizeof($a)>0) return $a; - $false = false; - return $false; - } - - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(($mask)); - $this->metaTablesSQL .= " AND name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @mssql_select_db($dbName); - } - else return false; - } - - function ErrorMsg() - { - if (empty($this->_errorMsg)){ - $this->_errorMsg = mssql_get_last_message(); - } - return $this->_errorMsg; - } - - function ErrorNo() - { - if ($this->_logsql && $this->_errorCode !== false) return $this->_errorCode; - if (empty($this->_errorMsg)) { - $this->_errorMsg = mssql_get_last_message(); - } - $id = @mssql_query("select @@ERROR",$this->_connectionID); - if (!$id) return false; - $arr = mssql_fetch_array($id); - @mssql_free_result($id); - if (is_array($arr)) return $arr[0]; - else return -1; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('mssql_pconnect')) return null; - $this->_connectionID = mssql_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('mssql_pconnect')) return null; - $this->_connectionID = mssql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - - // persistent connections can forget to rollback on crash, so we do it here. - if ($this->autoRollback) { - $cnt = $this->GetOne('select @@TRANCOUNT'); - while (--$cnt >= 0) $this->Execute('ROLLBACK TRAN'); - } - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function Prepare($sql) - { - $sqlarr = explode('?',$sql); - if (sizeof($sqlarr) <= 1) return $sql; - $sql2 = $sqlarr[0]; - for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) { - $sql2 .= '@P'.($i-1) . $sqlarr[$i]; - } - return array($sql,$this->qstr($sql2),$max); - } - - function PrepareSP($sql) - { - if (!$this->_has_mssql_init) { - ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); - return $sql; - } - $stmt = mssql_init($sql,$this->_connectionID); - if (!$stmt) return $sql; - return array($sql,$stmt); - } - - // returns concatenated string - // MSSQL requires integers to be cast as strings - // automatically cast every datatype to VARCHAR(255) - // @author David Rogers (introspectshun) - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // Split single record on commas, if possible - if (sizeof($arr) == 1) { - foreach ($arr as $arg) { - $args = explode(',', $arg); - } - $arr = $args; - } - - array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";')); - $s = implode('+',$arr); - if (sizeof($arr) > 0) return "$s"; - - return ''; - } - - /* - Usage: - $stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group - - # note that the parameter does not have @ in front! - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',false,64); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to. Can set to null (for isNull support). - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See mssql_bind documentation at php.net. - */ - function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false) - { - if (!$this->_has_mssql_init) { - ADOConnection::outp( "Parameter: mssql_bind only available since PHP 4.1.0"); - return false; - } - - $isNull = is_null($var); // php 4.0.4 and above... - - if ($type === false) - switch(gettype($var)) { - default: - case 'string': $type = SQLCHAR; break; - case 'double': $type = SQLFLT8; break; - case 'integer': $type = SQLINT4; break; - case 'boolean': $type = SQLINT1; break; # SQLBIT not supported in 4.1.0 - } - - if ($this->debug) { - $prefix = ($isOutput) ? 'Out' : 'In'; - $ztype = (empty($type)) ? 'false' : $type; - ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);"); - } - /* - See http://phplens.com/lens/lensforum/msgs.php?id=7231 - - RETVAL is HARD CODED into php_mssql extension: - The return value (a long integer value) is treated like a special OUTPUT parameter, - called "RETVAL" (without the @). See the example at mssql_execute to - see how it works. - type: one of this new supported PHP constants. - SQLTEXT, SQLVARCHAR,SQLCHAR, SQLINT1,SQLINT2, SQLINT4, SQLBIT,SQLFLT8 - */ - if ($name !== 'RETVAL') $name = '@'.$name; - return mssql_bind($stmt[1], $name, $var, $type, $isOutput, $isNull, $maxLen); - } - - /* - Unfortunately, it appears that mssql cannot handle varbinary > 255 chars - So all your blobs must be of type "image". - - Remember to set in php.ini the following... - - ; Valid range 0 - 2147483647. Default = 4096. - mssql.textlimit = 0 ; zero to pass through - - ; Valid range 0 - 2147483647. Default = 4096. - mssql.textsize = 0 ; zero to pass through - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - if (strtoupper($blobtype) == 'CLOB') { - $sql = "UPDATE $table SET $column='" . $val . "' WHERE $where"; - return $this->Execute($sql) != false; - } - $sql = "UPDATE $table SET $column=0x".bin2hex($val)." WHERE $where"; - return $this->Execute($sql) != false; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - $this->_errorMsg = false; - if (is_array($inputarr)) { - - # bind input params with sp_executesql: - # see http://www.quest-pipelines.com/newsletter-v3/0402_F.htm - # works only with sql server 7 and newer - if (!is_array($sql)) $sql = $this->Prepare($sql); - $params = ''; - $decl = ''; - $i = 0; - foreach($inputarr as $v) { - if ($decl) { - $decl .= ', '; - $params .= ', '; - } - if (is_string($v)) { - $len = strlen($v); - if ($len == 0) $len = 1; - - if ($len > 4000 ) { - // NVARCHAR is max 4000 chars. Let's use NTEXT - $decl .= "@P$i NTEXT"; - } else { - $decl .= "@P$i NVARCHAR($len)"; - } - - $params .= "@P$i=N". (strncmp($v,"'",1)==0? $v : $this->qstr($v)); - } else if (is_integer($v)) { - $decl .= "@P$i INT"; - $params .= "@P$i=".$v; - } else if (is_float($v)) { - $decl .= "@P$i FLOAT"; - $params .= "@P$i=".$v; - } else if (is_bool($v)) { - $decl .= "@P$i INT"; # Used INT just in case BIT in not supported on the user's MSSQL version. It will cast appropriately. - $params .= "@P$i=".(($v)?'1':'0'); # True == 1 in MSSQL BIT fields and acceptable for storing logical true in an int field - } else { - $decl .= "@P$i CHAR"; # Used char because a type is required even when the value is to be NULL. - $params .= "@P$i=NULL"; - } - $i += 1; - } - $decl = $this->qstr($decl); - if ($this->debug) ADOConnection::outp("sp_executesql N{$sql[1]},N$decl,$params"); - $rez = mssql_query("sp_executesql N{$sql[1]},N$decl,$params", $this->_connectionID); - - } else if (is_array($sql)) { - # PrepareSP() - $rez = mssql_execute($sql[1]); - - } else { - $rez = mssql_query($sql,$this->_connectionID); - } - return $rez; - } - - // returns true or false - function _close() - { - if ($this->transCnt) $this->RollbackTrans(); - $rez = @mssql_close($this->_connectionID); - $this->_connectionID = false; - return $rez; - } - - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_mssql::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_mssql::UnixTimeStamp($v); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_mssql extends ADORecordSet { - - var $databaseType = "mssql"; - var $canSeek = true; - var $hasFetchAssoc; // see http://phplens.com/lens/lensforum/msgs.php?id=6083 - // _mths works only in non-localised system - - function ADORecordset_mssql($id,$mode=false) - { - // freedts check... - $this->hasFetchAssoc = function_exists('mssql_fetch_assoc'); - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - - } - $this->fetchMode = $mode; - return $this->ADORecordSet($id,$mode); - } - - - function _initrs() - { - GLOBAL $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @mssql_num_rows($this->_queryID):-1; - $this->_numOfFields = @mssql_num_fields($this->_queryID); - } - - - //Contributed by "Sven Axelsson" - // get next resultset - requires PHP 4.0.5 or later - function NextRecordSet() - { - if (!mssql_next_result($this->_queryID)) return false; - $this->_inited = false; - $this->bind = false; - $this->_currentRow = -1; - $this->Init(); - return true; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != ADODB_FETCH_NUM) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $f = @mssql_fetch_field($this->_queryID, $fieldOffset); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $f = @mssql_fetch_field($this->_queryID); - } - $false = false; - if (empty($f)) return $false; - return $f; - } - - function _seek($row) - { - return @mssql_data_seek($this->_queryID, $row); - } - - // speedup - function MoveNext() - { - if ($this->EOF) return false; - - $this->_currentRow++; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - if ($this->fetchMode & ADODB_FETCH_NUM) { - //ADODB_FETCH_BOTH mode - $this->fields = @mssql_fetch_array($this->_queryID); - } - else { - if ($this->hasFetchAssoc) {// only for PHP 4.2.0 or later - $this->fields = @mssql_fetch_assoc($this->_queryID); - } else { - $flds = @mssql_fetch_array($this->_queryID); - if (is_array($flds)) { - $fassoc = array(); - foreach($flds as $k => $v) { - if (is_numeric($k)) continue; - $fassoc[$k] = $v; - } - $this->fields = $fassoc; - } else - $this->fields = false; - } - } - - if (is_array($this->fields)) { - if (ADODB_ASSOC_CASE == 0) { - foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; - } - } else if (ADODB_ASSOC_CASE == 1) { - foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; - } - } - } - } else { - $this->fields = @mssql_fetch_row($this->_queryID); - } - if ($this->fields) return true; - $this->EOF = true; - - return false; - } - - - // INSERT UPDATE DELETE returns false even if no error occurs in 4.0.4 - // also the date format has been changed from YYYY-mm-dd to dd MMM YYYY in 4.0.4. Idiot! - function _fetch($ignore_fields=false) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - if ($this->fetchMode & ADODB_FETCH_NUM) { - //ADODB_FETCH_BOTH mode - $this->fields = @mssql_fetch_array($this->_queryID); - } else { - if ($this->hasFetchAssoc) // only for PHP 4.2.0 or later - $this->fields = @mssql_fetch_assoc($this->_queryID); - else { - $this->fields = @mssql_fetch_array($this->_queryID); - if (@is_array($$this->fields)) { - $fassoc = array(); - foreach($$this->fields as $k => $v) { - if (is_integer($k)) continue; - $fassoc[$k] = $v; - } - $this->fields = $fassoc; - } - } - } - - if (!$this->fields) { - } else if (ADODB_ASSOC_CASE == 0) { - foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; - } - } else if (ADODB_ASSOC_CASE == 1) { - foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; - } - } - } else { - $this->fields = @mssql_fetch_row($this->_queryID); - } - return $this->fields; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() - { - $rez = mssql_free_result($this->_queryID); - $this->_queryID = false; - return $rez; - } - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_mssql::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_mssql::UnixTimeStamp($v); - } - -} - - -class ADORecordSet_array_mssql extends ADORecordSet_array { - function ADORecordSet_array_mssql($id=-1,$mode=false) - { - $this->ADORecordSet_array($id,$mode); - } - - // mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - - if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixDate($v); - - global $ADODB_mssql_mths,$ADODB_mssql_date_order; - - //Dec 30 2000 12:00AM - if ($ADODB_mssql_date_order == 'dmy') { - if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { - return parent::UnixDate($v); - } - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[1]; - $themth = substr(strtoupper($rr[2]),0,3); - } else { - if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { - return parent::UnixDate($v); - } - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[2]; - $themth = substr(strtoupper($rr[1]),0,3); - } - $themth = $ADODB_mssql_mths[$themth]; - if ($themth <= 0) return false; - // h-m-s-MM-DD-YY - return mktime(0,0,0,$themth,$theday,$rr[3]); - } - - function UnixTimeStamp($v) - { - - if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixTimeStamp($v); - - global $ADODB_mssql_mths,$ADODB_mssql_date_order; - - //Dec 30 2000 12:00AM - if ($ADODB_mssql_date_order == 'dmy') { - if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[1]; - $themth = substr(strtoupper($rr[2]),0,3); - } else { - if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $theday = $rr[2]; - $themth = substr(strtoupper($rr[1]),0,3); - } - - $themth = $ADODB_mssql_mths[$themth]; - if ($themth <= 0) return false; - - switch (strtoupper($rr[6])) { - case 'P': - if ($rr[4]<12) $rr[4] += 12; - break; - case 'A': - if ($rr[4]==12) $rr[4] = 0; - break; - default: - break; - } - // h-m-s-MM-DD-YY - return mktime($rr[4],$rr[5],0,$themth,$theday,$rr[3]); - } -} - -/* -Code Example 1: - -select object_name(constid) as constraint_name, - object_name(fkeyid) as table_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where object_name(fkeyid) = x -order by constraint_name, table_name, referenced_table_name, keyno - -Code Example 2: -select constraint_name, - column_name, - ordinal_position -from information_schema.key_column_usage -where constraint_catalog = db_name() -and table_name = x -order by constraint_name, ordinal_position - -http://www.databasejournal.com/scripts/article.php/1440551 -*/ - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql_n.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql_n.inc.php deleted file mode 100755 index d112f89a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssql_n.inc.php +++ /dev/null @@ -1,166 +0,0 @@ -_appendN($sql); - return ADODB_mssql::_query($sql,$inputarr); - } - - /** - * This function will intercept all the literals used in the SQL, prepending the "N" char to them - * in order to allow mssql to store properly data sent in the correct UCS-2 encoding (by freeTDS - * and ODBTP) keeping SQL compatibility at ADOdb level (instead of hacking every project to add - * the "N" notation when working against MSSQL. - * - * Note that this hack only must be used if ALL the char-based columns in your DB are of type nchar, - * nvarchar and ntext - */ - function _appendN($sql) { - - $result = $sql; - - /// Check we have some single quote in the query. Exit ok. - if (strpos($sql, SINGLEQUOTE) === false) { - return $sql; - } - - /// Check we haven't an odd number of single quotes (this can cause problems below - /// and should be considered one wrong SQL). Exit with debug info. - if ((substr_count($sql, SINGLEQUOTE) & 1)) { - if ($this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Wrong number of quotes (odd)"); - } - return $sql; - } - - /// Check we haven't any backslash + single quote combination. It should mean wrong - /// backslashes use (bad magic_quotes_sybase?). Exit with debug info. - $regexp = '/(\\\\' . SINGLEQUOTE . '[^' . SINGLEQUOTE . '])/'; - if (preg_match($regexp, $sql)) { - if ($this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Found bad use of backslash + single quote"); - } - return $sql; - } - - /// Remove pairs of single-quotes - $pairs = array(); - $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/'; - preg_match_all($regexp, $result, $list_of_pairs); - if ($list_of_pairs) { - foreach (array_unique($list_of_pairs[0]) as $key=>$value) { - $pairs['<@#@#@PAIR-'.$key.'@#@#@>'] = $value; - } - if (!empty($pairs)) { - $result = str_replace($pairs, array_keys($pairs), $result); - } - } - - /// Remove the rest of literals present in the query - $literals = array(); - $regexp = '/(N?' . SINGLEQUOTE . '.*?' . SINGLEQUOTE . ')/is'; - preg_match_all($regexp, $result, $list_of_literals); - if ($list_of_literals) { - foreach (array_unique($list_of_literals[0]) as $key=>$value) { - $literals['<#@#@#LITERAL-'.$key.'#@#@#>'] = $value; - } - if (!empty($literals)) { - $result = str_replace($literals, array_keys($literals), $result); - } - } - - /// Analyse literals to prepend the N char to them if their contents aren't numeric - if (!empty($literals)) { - foreach ($literals as $key=>$value) { - if (!is_numeric(trim($value, SINGLEQUOTE))) { - /// Non numeric string, prepend our dear N - $literals[$key] = 'N' . trim($value, 'N'); //Trimming potentially existing previous "N" - } - } - } - - /// Re-apply literals to the text - if (!empty($literals)) { - $result = str_replace(array_keys($literals), $literals, $result); - } - - /// Re-apply pairs of single-quotes to the text - if (!empty($pairs)) { - $result = str_replace(array_keys($pairs), $pairs, $result); - } - - /// Print transformation if debug = on - if ($result != $sql && $this->debug) { - ADOConnection::outp("{$this->databaseType} internal transformation:
    {$sql}
    to
    {$result}"); - } - - return $result; - } -} - -class ADORecordset_mssql_n extends ADORecordset_mssql { - var $databaseType = "mssql_n"; - function ADORecordset_mssql_n($id,$mode=false) - { - $this->ADORecordset_mssql($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssqlpo.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssqlpo.inc.php deleted file mode 100755 index 82da2330..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mssqlpo.inc.php +++ /dev/null @@ -1,62 +0,0 @@ -_has_mssql_init) { - ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); - return $sql; - } - if (is_string($sql)) $sql = str_replace('||','+',$sql); - $stmt = mssql_init($sql,$this->_connectionID); - if (!$stmt) return $sql; - return array($sql,$stmt); - } - - function _query($sql,$inputarr) - { - if (is_string($sql)) $sql = str_replace('||','+',$sql); - return ADODB_mssql::_query($sql,$inputarr); - } -} - -class ADORecordset_mssqlpo extends ADORecordset_mssql { - var $databaseType = "mssqlpo"; - function ADORecordset_mssqlpo($id,$mode=false) - { - $this->ADORecordset_mssql($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysql.inc.php deleted file mode 100755 index d8ca1818..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysql.inc.php +++ /dev/null @@ -1,782 +0,0 @@ -rsPrefix .= 'ext_'; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " IFNULL($field, $ifNull) "; // if MySQL - } - - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $rs = $this->Execute(sprintf('SHOW INDEX FROM %s',$table)); - - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return $false; - } - - $indexes = array (); - - // parse index data into array - while ($row = $rs->FetchRow()) { - if ($primary == FALSE AND $row[2] == 'PRIMARY') { - continue; - } - - if (!isset($indexes[$row[2]])) { - $indexes[$row[2]] = array( - 'unique' => ($row[1] == 0), - 'columns' => array() - ); - } - - $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) - { - ksort ($indexes[$index]['columns']); - } - - return $indexes; - } - - - // if magic quotes disabled, use mysql_real_escape_string() - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - - if (ADODB_PHPVER >= 0x4300) { - if (is_resource($this->_connectionID)) - return "'".mysql_real_escape_string($s,$this->_connectionID)."'"; - } - if ($this->replaceQuote[0] == '\\'){ - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - function _insertid() - { - return ADOConnection::GetOne('SELECT LAST_INSERT_ID()'); - //return mysql_insert_id($this->_connectionID); - } - - function GetOne($sql,$inputarr=false) - { - if ($this->compat323 == false && strncasecmp($sql,'sele',4) == 0) { - $rs =& $this->SelectLimit($sql,1,-1,$inputarr); - if ($rs) { - $rs->Close(); - if ($rs->EOF) return false; - return reset($rs->fields); - } - } else { - return ADOConnection::GetOne($sql,$inputarr); - } - return false; - } - - function BeginTrans() - { - if ($this->debug) ADOConnection::outp("Transactions not supported in 'mysql' driver. Use 'mysqlt' or 'mysqli' driver"); - } - - function _affectedrows() - { - return mysql_affected_rows($this->_connectionID); - } - - // See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html - // Reference on Last_Insert_ID on the recommended way to simulate sequences - var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"; - var $_genSeqSQL = "create table %s (id int not null)"; - var $_genSeq2SQL = "insert into %s values (%s)"; - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - $u = strtoupper($seqname); - - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - } - - - function GenID($seqname='adodbseq',$startID=1) - { - // post-nuke sets hasGenID to false - if (!$this->hasGenID) return false; - - $savelog = $this->_logsql; - $this->_logsql = false; - $getnext = sprintf($this->_genIDSQL,$seqname); - $holdtransOK = $this->_transOK; // save the current status - $rs = @$this->Execute($getnext); - if (!$rs) { - if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset - $u = strtoupper($seqname); - $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - $rs = $this->Execute($getnext); - } - $this->genID = mysql_insert_id($this->_connectionID); - - if ($rs) $rs->Close(); - - $this->_logsql = $savelog; - return $this->genID; - } - - function &MetaDatabases() - { - $qid = mysql_list_dbs($this->_connectionID); - $arr = array(); - $i = 0; - $max = mysql_num_rows($qid); - while ($i < $max) { - $db = mysql_tablename($qid,$i); - if ($db != 'mysql') $arr[] = $db; - $i += 1; - } - return $arr; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'DATE_FORMAT('.$col.",'"; - $concat = false; - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - /** FALL THROUGH */ - case '-': - case '/': - $s .= $ch; - break; - - case 'Y': - case 'y': - $s .= '%Y'; - break; - case 'M': - $s .= '%b'; - break; - - case 'm': - $s .= '%m'; - break; - case 'D': - case 'd': - $s .= '%d'; - break; - - case 'Q': - case 'q': - $s .= "'),Quarter($col)"; - - if ($len > $i+1) $s .= ",DATE_FORMAT($col,'"; - else $s .= ",('"; - $concat = true; - break; - - case 'H': - $s .= '%H'; - break; - - case 'h': - $s .= '%I'; - break; - - case 'i': - $s .= '%i'; - break; - - case 's': - $s .= '%s'; - break; - - case 'a': - case 'A': - $s .= '%p'; - break; - - case 'w': - $s .= '%w'; - break; - - case 'W': - $s .= '%U'; - break; - - case 'l': - $s .= '%W'; - break; - } - } - $s.="')"; - if ($concat) $s = "CONCAT($s)"; - return $s; - } - - - // returns concatenated string - // much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // suggestion by andrew005@mnogo.ru - $s = implode(',',$arr); - if (strlen($s) > 0) return "CONCAT($s)"; - else return ''; - } - - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!empty($this->port)) $argHostname .= ":".$this->port; - - if (ADODB_PHPVER >= 0x4300) - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, - $this->forceNewConnect,$this->clientFlags); - else if (ADODB_PHPVER >= 0x4200) - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, - $this->forceNewConnect); - else - $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword); - - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!empty($this->port)) $argHostname .= ":".$this->port; - - if (ADODB_PHPVER >= 0x4300) - $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags); - else - $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($this->autoRollback) $this->RollbackTrans(); - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->forceNewConnect = true; - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); - } - - function &MetaColumns($table) - { - $this->_findschema($table,$schema); - if ($schema) { - $dbName = $this->database; - $this->SelectDB($schema); - } - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($schema) { - $this->SelectDB($dbName); - } - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) { - $false = false; - return $false; - } - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $arr = explode(",",$query_array[2]); - $fld->enums = $arr; - $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6 - $fld->max_length = ($zlen > 0) ? $zlen : 1; - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - // returns true or false - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @mysql_select_db($dbName,$this->_connectionID); - } - else return false; - } - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0) - { - $offsetStr =($offset>=0) ? ((integer)$offset)."," : ''; - // jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220 - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr".((integer)$nrows),$inputarr); - else - $rs =& $this->Execute($sql." LIMIT $offsetStr".((integer)$nrows),$inputarr); - return $rs; - } - - // returns queryID or false - function _query($sql,$inputarr) - { - //global $ADODB_COUNTRECS; - //if($ADODB_COUNTRECS) - return mysql_query($sql,$this->_connectionID); - //else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6 - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - - if ($this->_logsql) return $this->_errorMsg; - if (empty($this->_connectionID)) $this->_errorMsg = @mysql_error(); - else $this->_errorMsg = @mysql_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - if ($this->_logsql) return $this->_errorCode; - if (empty($this->_connectionID)) return @mysql_errno(); - else return @mysql_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - @mysql_close($this->_connectionID); - $this->_connectionID = false; - } - - - /* - * Maximum size of C field - */ - function CharMax() - { - return 255; - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 4294967295; - } - - // "Innox - Juan Carlos Gonzalez" - function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE ) - { - global $ADODB_FETCH_MODE; - if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true; - - if ( !empty($owner) ) { - $table = "$owner.$table"; - } - $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table)); - if ($associative) $create_sql = $a_create_table["Create Table"]; - else $create_sql = $a_create_table[1]; - - $matches = array(); - - if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false; - $foreign_keys = array(); - $num_keys = count($matches[0]); - for ( $i = 0; $i < $num_keys; $i ++ ) { - $my_field = explode('`, `', $matches[1][$i]); - $ref_table = $matches[2][$i]; - $ref_field = explode('`, `', $matches[3][$i]); - - if ( $upper ) { - $ref_table = strtoupper($ref_table); - } - - $foreign_keys[$ref_table] = array(); - $num_fields = count($my_field); - for ( $j = 0; $j < $num_fields; $j ++ ) { - if ( $associative ) { - $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j]; - } else { - $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}"; - } - } - } - - return $foreign_keys; - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - - -class ADORecordSet_mysql extends ADORecordSet{ - - var $databaseType = "mysql"; - var $canSeek = true; - - function ADORecordSet_mysql($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - //GLOBAL $ADODB_COUNTRECS; - // $this->_numOfRows = ($ADODB_COUNTRECS) ? @mysql_num_rows($this->_queryID):-1; - $this->_numOfRows = @mysql_num_rows($this->_queryID); - $this->_numOfFields = @mysql_num_fields($this->_queryID); - } - - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $o = @mysql_fetch_field($this->_queryID, $fieldOffset); - $f = @mysql_field_flags($this->_queryID,$fieldOffset); - $o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com) - //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable - $o->binary = (strpos($f,'binary')!== false); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @mysql_fetch_field($this->_queryID); - $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com) - //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable - } - - return $o; - } - - function &GetRowAssoc($upper=true) - { - if ($this->fetchMode == MYSQL_ASSOC && !$upper) $row = $this->fields; - else $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - // added @ by "Michael William Miller" - if ($this->fetchMode != MYSQL_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - if ($this->_numOfRows == 0) return false; - return @mysql_data_seek($this->_queryID,$row); - } - - function MoveNext() - { - //return adodb_movenext($this); - //if (defined('ADODB_EXTENSION')) return adodb_movenext($this); - if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } - - function _fetch() - { - $this->fields = @mysql_fetch_array($this->_queryID,$this->fetchMode); - return is_array($this->fields); - } - - function _close() { - @mysql_free_result($this->_queryID); - $this->_queryID = false; - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - return !empty($fieldobj->binary) ? 'B' : 'X'; - - case 'YEAR': - case 'DATE': return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': return 'T'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'TINYINT': - case 'MEDIUMINT': - case 'SMALLINT': - - if (!empty($fieldobj->primary_key)) return 'R'; - else return 'I'; - - default: return 'N'; - } - } - -} - -class ADORecordSet_ext_mysql extends ADORecordSet_mysql { - function ADORecordSet_ext_mysql($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - return @adodb_movenext($this); - } -} - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqli.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqli.inc.php deleted file mode 100755 index 8d002a9f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqli.inc.php +++ /dev/null @@ -1,1020 +0,0 @@ -_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - // returns true or false - // To add: parameter int $port, - // parameter string $socket - function _connect($argHostname = NULL, - $argUsername = NULL, - $argPassword = NULL, - $argDatabasename = NULL, $persist=false) - { - if(!extension_loaded("mysqli")) { - return null; - } - $this->_connectionID = @mysqli_init(); - - if (is_null($this->_connectionID)) { - // mysqli_init only fails if insufficient memory - if ($this->debug) - ADOConnection::outp("mysqli_init() failed : " . $this->ErrorMsg()); - return false; - } - /* - I suggest a simple fix which would enable adodb and mysqli driver to - read connection options from the standard mysql configuration file - /etc/my.cnf - "Bastien Duclaux" - */ - foreach($this->optionFlags as $arr) { - mysqli_options($this->_connectionID,$arr[0],$arr[1]); - } - - #if (!empty($this->port)) $argHostname .= ":".$this->port; - $ok = mysqli_real_connect($this->_connectionID, - $argHostname, - $argUsername, - $argPassword, - $argDatabasename, - $this->port, - $this->socket, - $this->clientFlags); - - if ($ok) { - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } else { - if ($this->debug) - ADOConnection::outp("Could't connect : " . $this->ErrorMsg()); - return false; - } - } - - // returns true or false - // How to force a persistent connection - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, true); - - } - - // When is this used? Close old connection first? - // In _connect(), check $this->forceNewConnect? - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - $this->forceNewConnect = true; - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); - } - - function IfNull( $field, $ifNull ) - { - return " IFNULL($field, $ifNull) "; // if MySQL - } - - // do not use $ADODB_COUNTRECS - function GetOne($sql,$inputarr=false) - { - $ret = false; - $rs = &$this->Execute($sql,$inputarr); - if ($rs) { - if (!$rs->EOF) $ret = reset($rs->fields); - $rs->Close(); - } - return $ret; - } - - function ServerInfo() - { - $arr['description'] = $this->GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - - //$this->Execute('SET AUTOCOMMIT=0'); - mysqli_autocommit($this->_connectionID, false); - $this->Execute('BEGIN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - - //$this->Execute('SET AUTOCOMMIT=1'); - mysqli_autocommit($this->_connectionID, true); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - //$this->Execute('SET AUTOCOMMIT=1'); - mysqli_autocommit($this->_connectionID, true); - return true; - } - - function RowLock($tables,$where='',$flds='1 as adodb_ignore') - { - if ($this->transCnt==0) $this->BeginTrans(); - if ($where) $where = ' where '.$where; - $rs =& $this->Execute("select $flds from $tables $where for update"); - return !empty($rs); - } - - // if magic quotes disabled, use mysql_real_escape_string() - // From readme.htm: - // Quotes a string to be sent to the database. The $magic_quotes_enabled - // parameter may look funny, but the idea is if you are quoting a - // string extracted from a POST/GET variable, then - // pass get_magic_quotes_gpc() as the second parameter. This will - // ensure that the variable is not quoted twice, once by qstr and once - // by the magic_quotes_gpc. - // - //Eg. $s = $db->qstr(_GET['name'],get_magic_quotes_gpc()); - function qstr($s, $magic_quotes = false) - { - if (!$magic_quotes) { - if (PHP_VERSION >= 5) - return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'"; - - if ($this->replaceQuote[0] == '\\') - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - function _insertid() - { - $result = @mysqli_insert_id($this->_connectionID); - if ($result == -1){ - if ($this->debug) ADOConnection::outp("mysqli_insert_id() failed : " . $this->ErrorMsg()); - } - return $result; - } - - // Only works for INSERT, UPDATE and DELETE query's - function _affectedrows() - { - $result = @mysqli_affected_rows($this->_connectionID); - if ($result == -1) { - if ($this->debug) ADOConnection::outp("mysqli_affected_rows() failed : " . $this->ErrorMsg()); - } - return $result; - } - - // See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html - // Reference on Last_Insert_ID on the recommended way to simulate sequences - var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"; - var $_genSeqSQL = "create table %s (id int not null)"; - var $_genSeq2SQL = "insert into %s values (%s)"; - var $_dropSeqSQL = "drop table %s"; - - function CreateSequence($seqname='adodbseq',$startID=1) - { - if (empty($this->_genSeqSQL)) return false; - $u = strtoupper($seqname); - - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - } - - function GenID($seqname='adodbseq',$startID=1) - { - // post-nuke sets hasGenID to false - if (!$this->hasGenID) return false; - - $getnext = sprintf($this->_genIDSQL,$seqname); - $holdtransOK = $this->_transOK; // save the current status - $rs = @$this->Execute($getnext); - if (!$rs) { - if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset - $u = strtoupper($seqname); - $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1)); - $rs = $this->Execute($getnext); - } - $this->genID = mysqli_insert_id($this->_connectionID); - - if ($rs) $rs->Close(); - - return $this->genID; - } - - function &MetaDatabases() - { - $query = "SHOW DATABASES"; - $ret =& $this->Execute($query); - if ($ret && is_object($ret)){ - $arr = array(); - while (!$ret->EOF){ - $db = $ret->Fields('Database'); - if ($db != 'mysql') $arr[] = $db; - $ret->MoveNext(); - } - return $arr; - } - return $ret; - } - - - function &MetaIndexes ($table, $primary = FALSE) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table)); - - // restore fetchmode - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return $false; - } - - $indexes = array (); - - // parse index data into array - while ($row = $rs->FetchRow()) { - if ($primary == FALSE AND $row[2] == 'PRIMARY') { - continue; - } - - if (!isset($indexes[$row[2]])) { - $indexes[$row[2]] = array( - 'unique' => ($row[1] == 0), - 'columns' => array() - ); - } - - $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) - { - ksort ($indexes[$index]['columns']); - } - - return $indexes; - } - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'DATE_FORMAT('.$col.",'"; - $concat = false; - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= '%Y'; - break; - case 'Q': - case 'q': - $s .= "'),Quarter($col)"; - - if ($len > $i+1) $s .= ",DATE_FORMAT($col,'"; - else $s .= ",('"; - $concat = true; - break; - case 'M': - $s .= '%b'; - break; - - case 'm': - $s .= '%m'; - break; - case 'D': - case 'd': - $s .= '%d'; - break; - - case 'H': - $s .= '%H'; - break; - - case 'h': - $s .= '%I'; - break; - - case 'i': - $s .= '%i'; - break; - - case 's': - $s .= '%s'; - break; - - case 'a': - case 'A': - $s .= '%p'; - break; - - case 'w': - $s .= '%w'; - break; - - case 'l': - $s .= '%W'; - break; - - default: - - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $ch; - break; - } - } - $s.="')"; - if ($concat) $s = "CONCAT($s)"; - return $s; - } - - // returns concatenated string - // much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator - function Concat() - { - $s = ""; - $arr = func_get_args(); - - // suggestion by andrew005@mnogo.ru - $s = implode(',',$arr); - if (strlen($s) > 0) return "CONCAT($s)"; - else return ''; - } - - // dayFraction is a day in floating point - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - // "Innox - Juan Carlos Gonzalez" - function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE ) - { - global $ADODB_FETCH_MODE; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true; - - if ( !empty($owner) ) { - $table = "$owner.$table"; - } - $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table)); - if ($associative) $create_sql = $a_create_table["Create Table"]; - else $create_sql = $a_create_table[1]; - - $matches = array(); - - if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false; - $foreign_keys = array(); - $num_keys = count($matches[0]); - for ( $i = 0; $i < $num_keys; $i ++ ) { - $my_field = explode('`, `', $matches[1][$i]); - $ref_table = $matches[2][$i]; - $ref_field = explode('`, `', $matches[3][$i]); - - if ( $upper ) { - $ref_table = strtoupper($ref_table); - } - - $foreign_keys[$ref_table] = array(); - $num_fields = count($my_field); - for ( $j = 0; $j < $num_fields; $j ++ ) { - if ( $associative ) { - $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j]; - } else { - $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}"; - } - } - } - - return $foreign_keys; - } - - function &MetaColumns($table) - { - $false = false; - if (!$this->metaColumnsSQL) - return $false; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) - $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) - return $false; - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = max(array_map("strlen",explode(",",$query_array[2]))) - 2; // PHP >= 4.0.6 - $fld->max_length = ($fld->max_length == 0 ? 1 : $fld->max_length); - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - // returns true or false - function SelectDB($dbName) - { -// $this->_connectionID = $this->mysqli_resolve_link($this->_connectionID); - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - - if ($this->_connectionID) { - $result = @mysqli_select_db($this->_connectionID, $dbName); - if (!$result) { - ADOConnection::outp("Select of database " . $dbName . " failed. " . $this->ErrorMsg()); - } - return $result; - } - return false; - } - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql, - $nrows = -1, - $offset = -1, - $inputarr = false, - $arg3 = false, - $secs = 0) - { - $offsetStr = ($offset >= 0) ? "$offset," : ''; - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs, $sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3); - else - $rs =& $this->Execute($sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3); - - return $rs; - } - - - function Prepare($sql) - { - return $sql; - - $stmt = $this->_connectionID->prepare($sql); - if (!$stmt) { - echo $this->ErrorMsg(); - return $sql; - } - return array($sql,$stmt); - } - - - // returns queryID or false - function _query($sql, $inputarr) - { - global $ADODB_COUNTRECS; - - if (is_array($sql)) { - $stmt = $sql[1]; - $a = ''; - foreach($inputarr as $k => $v) { - if (is_string($v)) $a .= 's'; - else if (is_integer($v)) $a .= 'i'; - else $a .= 'd'; - } - - $fnarr = array_merge( array($stmt,$a) , $inputarr); - $ret = call_user_func_array('mysqli_stmt_bind_param',$fnarr); - - $ret = mysqli_stmt_execute($stmt); - return $ret; - } - if (!$mysql_res = mysqli_query($this->_connectionID, $sql, ($ADODB_COUNTRECS) ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT)) { - if ($this->debug) ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg()); - return false; - } - - return $mysql_res; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - if (empty($this->_connectionID)) - $this->_errorMsg = @mysqli_connect_error(); - else - $this->_errorMsg = @mysqli_error($this->_connectionID); - return $this->_errorMsg; - } - - /* Returns: the last error number from previous database operation */ - function ErrorNo() - { - if (empty($this->_connectionID)) - return @mysqli_connect_errno(); - else - return @mysqli_errno($this->_connectionID); - } - - // returns true or false - function _close() - { - @mysqli_close($this->_connectionID); - $this->_connectionID = false; - } - - /* - * Maximum size of C field - */ - function CharMax() - { - return 255; - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 4294967295; - } - - - - // this is a set of functions for managing client encoding - very important if the encodings - // of your database and your output target (i.e. HTML) don't match - // for instance, you may have UTF8 database and server it on-site as latin1 etc. - // GetCharSet - get the name of the character set the client is using now - // Under Windows, the functions should work with MySQL 4.1.11 and above, the set of charsets supported - // depends on compile flags of mysql distribution - - function GetCharSet() - { - //we will use ADO's builtin property charSet - if (!method_exists($this->_connectionID,'character_set_name')) - return false; - - $this->charSet = @$this->_connectionID->character_set_name(); - if (!$this->charSet) { - return false; - } else { - return $this->charSet; - } - } - - // SetCharSet - switch the client encoding - function SetCharSet($charset_name) - { - if (!method_exists($this->_connectionID,'set_charset')) - return false; - - if ($this->charSet !== $charset_name) { - $if = @$this->_connectionID->set_charset($charset_name); - if ($if == "0" & $this->GetCharSet() == $charset_name) { - return true; - } else return false; - } else return true; - } - - - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_mysqli extends ADORecordSet{ - - var $databaseType = "mysqli"; - var $canSeek = true; - - function ADORecordSet_mysqli($queryID, $mode = false) - { - if ($mode === false) - { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - - switch ($mode) - { - case ADODB_FETCH_NUM: - $this->fetchMode = MYSQLI_NUM; - break; - case ADODB_FETCH_ASSOC: - $this->fetchMode = MYSQLI_ASSOC; - break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQLI_BOTH; - break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - global $ADODB_COUNTRECS; - - $this->_numOfRows = $ADODB_COUNTRECS ? @mysqli_num_rows($this->_queryID) : -1; - $this->_numOfFields = @mysqli_num_fields($this->_queryID); - } - -/* -1 = MYSQLI_NOT_NULL_FLAG -2 = MYSQLI_PRI_KEY_FLAG -4 = MYSQLI_UNIQUE_KEY_FLAG -8 = MYSQLI_MULTIPLE_KEY_FLAG -16 = MYSQLI_BLOB_FLAG -32 = MYSQLI_UNSIGNED_FLAG -64 = MYSQLI_ZEROFILL_FLAG -128 = MYSQLI_BINARY_FLAG -256 = MYSQLI_ENUM_FLAG -512 = MYSQLI_AUTO_INCREMENT_FLAG -1024 = MYSQLI_TIMESTAMP_FLAG -2048 = MYSQLI_SET_FLAG -32768 = MYSQLI_NUM_FLAG -16384 = MYSQLI_PART_KEY_FLAG -32768 = MYSQLI_GROUP_FLAG -65536 = MYSQLI_UNIQUE_FLAG -131072 = MYSQLI_BINCMP_FLAG -*/ - - function &FetchField($fieldOffset = -1) - { - $fieldnr = $fieldOffset; - if ($fieldOffset != -1) { - $fieldOffset = mysqli_field_seek($this->_queryID, $fieldnr); - } - $o = mysqli_fetch_field($this->_queryID); - /* Properties of an ADOFieldObject as set by MetaColumns */ - $o->primary_key = $o->flags & MYSQLI_PRI_KEY_FLAG; - $o->not_null = $o->flags & MYSQLI_NOT_NULL_FLAG; - $o->auto_increment = $o->flags & MYSQLI_AUTO_INCREMENT_FLAG; - $o->binary = $o->flags & MYSQLI_BINARY_FLAG; - // $o->blob = $o->flags & MYSQLI_BLOB_FLAG; /* not returned by MetaColumns */ - $o->unsigned = $o->flags & MYSQLI_UNSIGNED_FLAG; - - return $o; - } - - function &GetRowAssoc($upper = true) - { - if ($this->fetchMode == MYSQLI_ASSOC && !$upper) - return $this->fields; - $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != MYSQLI_NUM) - return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i = 0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - if ($this->_numOfRows == 0) - return false; - - if ($row < 0) - return false; - - mysqli_data_seek($this->_queryID, $row); - $this->EOF = false; - return true; - } - - // 10% speedup to move MoveNext to child class - // This is the only implementation that works now (23-10-2003). - // Other functions return no or the wrong results. - function MoveNext() - { - if ($this->EOF) return false; - $this->_currentRow++; - $this->fields = @mysqli_fetch_array($this->_queryID,$this->fetchMode); - - if (is_array($this->fields)) return true; - $this->EOF = true; - return false; - } - - function _fetch() - { - $this->fields = mysqli_fetch_array($this->_queryID,$this->fetchMode); - return is_array($this->fields); - } - - function _close() - { - mysqli_free_result($this->_queryID); - $this->_queryID = false; - } - -/* - -0 = MYSQLI_TYPE_DECIMAL -1 = MYSQLI_TYPE_CHAR -1 = MYSQLI_TYPE_TINY -2 = MYSQLI_TYPE_SHORT -3 = MYSQLI_TYPE_LONG -4 = MYSQLI_TYPE_FLOAT -5 = MYSQLI_TYPE_DOUBLE -6 = MYSQLI_TYPE_NULL -7 = MYSQLI_TYPE_TIMESTAMP -8 = MYSQLI_TYPE_LONGLONG -9 = MYSQLI_TYPE_INT24 -10 = MYSQLI_TYPE_DATE -11 = MYSQLI_TYPE_TIME -12 = MYSQLI_TYPE_DATETIME -13 = MYSQLI_TYPE_YEAR -14 = MYSQLI_TYPE_NEWDATE -247 = MYSQLI_TYPE_ENUM -248 = MYSQLI_TYPE_SET -249 = MYSQLI_TYPE_TINY_BLOB -250 = MYSQLI_TYPE_MEDIUM_BLOB -251 = MYSQLI_TYPE_LONG_BLOB -252 = MYSQLI_TYPE_BLOB -253 = MYSQLI_TYPE_VAR_STRING -254 = MYSQLI_TYPE_STRING -255 = MYSQLI_TYPE_GEOMETRY -*/ - - function MetaType($t, $len = -1, $fieldobj = false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - - $len = -1; // mysql max_length is not accurate - switch (strtoupper($t)) { - case 'STRING': - case 'CHAR': - case 'VARCHAR': - case 'TINYBLOB': - case 'TINYTEXT': - case 'ENUM': - case 'SET': - - case MYSQLI_TYPE_TINY_BLOB : - case MYSQLI_TYPE_CHAR : - case MYSQLI_TYPE_STRING : - case MYSQLI_TYPE_ENUM : - case MYSQLI_TYPE_SET : - case 253 : - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - case 'LONGTEXT': - case 'MEDIUMTEXT': - return 'X'; - - - // php_mysql extension always returns 'blob' even if 'text' - // so we have to check whether binary... - case 'IMAGE': - case 'LONGBLOB': - case 'BLOB': - case 'MEDIUMBLOB': - - case MYSQLI_TYPE_BLOB : - case MYSQLI_TYPE_LONG_BLOB : - case MYSQLI_TYPE_MEDIUM_BLOB : - - return !empty($fieldobj->binary) ? 'B' : 'X'; - case 'YEAR': - case 'DATE': - case MYSQLI_TYPE_DATE : - case MYSQLI_TYPE_YEAR : - - return 'D'; - - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - - case MYSQLI_TYPE_DATETIME : - case MYSQLI_TYPE_NEWDATE : - case MYSQLI_TYPE_TIME : - case MYSQLI_TYPE_TIMESTAMP : - - return 'T'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'TINYINT': - case 'MEDIUMINT': - case 'SMALLINT': - - case MYSQLI_TYPE_INT24 : - case MYSQLI_TYPE_LONG : - case MYSQLI_TYPE_LONGLONG : - case MYSQLI_TYPE_SHORT : - case MYSQLI_TYPE_TINY : - - if (!empty($fieldobj->primary_key)) return 'R'; - - return 'I'; - - - // Added floating-point types - // Maybe not necessery. - case 'FLOAT': - case 'DOUBLE': - // case 'DOUBLE PRECISION': - case 'DECIMAL': - case 'DEC': - case 'FIXED': - default: - //if (!is_numeric($t)) echo "

    --- Error in type matching $t -----

    "; - return 'N'; - } - } // function - - -} // rs class - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqlt.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqlt.inc.php deleted file mode 100755 index bc91e0f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-mysqlt.inc.php +++ /dev/null @@ -1,155 +0,0 @@ - - - Requires mysql client. Works on Windows and Unix. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -include_once(ADODB_DIR."/drivers/adodb-mysql.inc.php"); - - -class ADODB_mysqlt extends ADODB_mysql { - var $databaseType = 'mysqlt'; - var $ansiOuter = true; // for Version 3.23.17 or later - var $hasTransactions = true; - var $autoRollback = true; // apparently mysql does not autorollback properly - - function ADODB_mysqlt() - { - global $ADODB_EXTENSION; if ($ADODB_EXTENSION) $this->rsPrefix .= 'ext_'; - } - - /* set transaction mode - - SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL -{ READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } - - */ - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->Execute('SET AUTOCOMMIT=0'); - $this->Execute('BEGIN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('COMMIT'); - $this->Execute('SET AUTOCOMMIT=1'); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->Execute('ROLLBACK'); - $this->Execute('SET AUTOCOMMIT=1'); - return true; - } - - function RowLock($tables,$where='',$flds='1 as adodb_ignore') - { - if ($this->transCnt==0) $this->BeginTrans(); - if ($where) $where = ' where '.$where; - $rs =& $this->Execute("select $flds from $tables $where for update"); - return !empty($rs); - } - -} - -class ADORecordSet_mysqlt extends ADORecordSet_mysql{ - var $databaseType = "mysqlt"; - - function ADORecordSet_mysqlt($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = MYSQL_BOTH; break; - } - - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } -} - -class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt { - - function ADORecordSet_ext_mysqlt($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: - $this->fetchMode = MYSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function MoveNext() - { - return adodb_movenext($this); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-netezza.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-netezza.inc.php deleted file mode 100755 index 308b898a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-netezza.inc.php +++ /dev/null @@ -1,170 +0,0 @@ - 0 ORDER BY attnum"; - var $metaColumnsSQL1 = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum"; - // netezza doesn't have keys. it does have distributions, so maybe this is - // something that can be pulled from the system tables - var $metaKeySQL = ""; - var $hasAffectedRows = true; - var $hasLimit = true; - var $true = 't'; // string that represents TRUE for a database - var $false = 'f'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $ansiOuter = true; - var $autoRollback = true; // apparently pgsql does not autorollback properly before 4.3.4 - // http://bugs.php.net/bug.php?id=25404 - - - function ADODB_netezza() - { - - } - - function &MetaColumns($table,$upper=true) - { - - // Changed this function to support Netezza which has no concept of keys - // could posisbly work on other things from the system table later. - - global $ADODB_FETCH_MODE; - - $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) return false; - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - - // since we're returning type and length as one string, - // split them out here. - - if ($first = strstr($rs->fields[1], "(")) { - $fld->max_length = trim($first, "()"); - } else { - $fld->max_length = -1; - } - - if ($first = strpos($rs->fields[1], "(")) { - $fld->type = substr($rs->fields[1], 0, $first); - } else { - $fld->type = $rs->fields[1]; - } - - switch ($fld->type) { - case "byteint": - case "boolean": - $fld->max_length = 1; - break; - case "smallint": - $fld->max_length = 2; - break; - case "integer": - case "numeric": - case "date": - $fld->max_length = 4; - break; - case "bigint": - case "time": - case "timestamp": - $fld->max_length = 8; - break; - case "timetz": - case "time with time zone": - $fld->max_length = 12; - break; - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($upper) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_netezza extends ADORecordSet_postgres64 -{ - var $databaseType = "netezza"; - var $canSeek = true; - - function ADORecordSet_netezza($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = PGSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - // _initrs modified to disable blob handling - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($this->_queryID):-1; - $this->_numOfFields = @pg_numfields($this->_queryID); - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8.inc.php deleted file mode 100755 index de617d7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8.inc.php +++ /dev/null @@ -1,1512 +0,0 @@ - - - 13 Nov 2000 jlim - removed all ora_* references. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -/* -NLS_Date_Format -Allows you to use a date format other than the Oracle Lite default. When a literal -character string appears where a date value is expected, the Oracle Lite database -tests the string to see if it matches the formats of Oracle, SQL-92, or the value -specified for this parameter in the POLITE.INI file. Setting this parameter also -defines the default format used in the TO_CHAR or TO_DATE functions when no -other format string is supplied. - -For Oracle the default is dd-mon-yy or dd-mon-yyyy, and for SQL-92 the default is -yy-mm-dd or yyyy-mm-dd. - -Using 'RR' in the format forces two-digit years less than or equal to 49 to be -interpreted as years in the 21st century (20002049), and years over 50 as years in -the 20th century (19501999). Setting the RR format as the default for all two-digit -year entries allows you to become year-2000 compliant. For example: -NLS_DATE_FORMAT='RR-MM-DD' - -You can also modify the date format using the ALTER SESSION command. -*/ - -# define the LOB descriptor type for the given type -# returns false if no LOB descriptor -function oci_lob_desc($type) { - switch ($type) { - case OCI_B_BFILE: $result = OCI_D_FILE; break; - case OCI_B_CFILEE: $result = OCI_D_FILE; break; - case OCI_B_CLOB: $result = OCI_D_LOB; break; - case OCI_B_BLOB: $result = OCI_D_LOB; break; - case OCI_B_ROWID: $result = OCI_D_ROWID; break; - default: $result = false; break; - } - return $result; -} - -class ADODB_oci8 extends ADOConnection { - var $databaseType = 'oci8'; - var $dataProvider = 'oci8'; - var $replaceQuote = "''"; // string to use to replace quotes - var $concat_operator='||'; - var $sysDate = "TRUNC(SYSDATE)"; - var $sysTimeStamp = 'SYSDATE'; - var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1"; - var $_stmt; - var $_commit = OCI_COMMIT_ON_SUCCESS; - var $_initdate = true; // init date to YYYY-MM-DD - var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"; // bin$ tables are recycle bin tables - var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net - var $_bindInputArray = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL"; - var $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $hasAffectedRows = true; - var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)"; - var $noNullStrings = false; - var $connectSID = false; - var $_bind = false; - var $_nestedSQL = true; - var $_hasOCIFetchStatement = false; - var $_getarray = false; // currently not working - var $leftOuter = ''; // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER - var $session_sharing_force_blob = false; // alter session on updateblob if set to true - var $firstrows = true; // enable first rows optimization on SelectLimit() - var $selectOffsetAlg1 = 100; // when to use 1st algorithm of selectlimit. - var $NLS_DATE_FORMAT = 'YYYY-MM-DD'; // To include time, use 'RRRR-MM-DD HH24:MI:SS' - var $useDBDateFormatForTextInput=false; - var $datetime = false; // MetaType('DATE') returns 'D' (datetime==false) or 'T' (datetime == true) - var $_refLOBs = array(); - - // var $ansiOuter = true; // if oracle9 - - function ADODB_oci8() - { - $this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200; - if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_'; - } - - /* Function &MetaColumns($table) added by smondino@users.sourceforge.net*/ - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!$rs) { - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->scale = $rs->fields[3]; - if ($rs->fields[1] == 'NUMBER') { - if ($rs->fields[3] == 0) $fld->type = 'INT'; - $fld->max_length = $rs->fields[4]; - } - $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0); - $fld->binary = (strpos($fld->type,'BLOB') !== false); - $fld->default_value = $rs->fields[6]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - } - - function Time() - { - $rs =& $this->Execute("select TO_CHAR($this->sysTimeStamp,'YYYY-MM-DD HH24:MI:SS') from dual"); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - -/* - - Multiple modes of connection are supported: - - a. Local Database - $conn->Connect(false,'scott','tiger'); - - b. From tnsnames.ora - $conn->Connect(false,'scott','tiger',$tnsname); - $conn->Connect($tnsname,'scott','tiger'); - - c. Server + service name - $conn->Connect($serveraddress,'scott,'tiger',$service_name); - - d. Server + SID - $conn->connectSID = true; - $conn->Connect($serveraddress,'scott,'tiger',$SID); - - -Example TNSName: ---------------- -NATSOFT.DOMAIN = - (DESCRIPTION = - (ADDRESS_LIST = - (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523)) - ) - (CONNECT_DATA = - (SERVICE_NAME = natsoft.domain) - ) - ) - - There are 3 connection modes, 0 = non-persistent, 1 = persistent, 2 = force new connection - -*/ - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0) - { - if (!function_exists('OCIPLogon')) return null; - - - $this->_errorMsg = false; - $this->_errorCode = false; - - if($argHostname) { // added by Jorma Tuomainen - if (empty($argDatabasename)) $argDatabasename = $argHostname; - else { - if(strpos($argHostname,":")) { - $argHostinfo=explode(":",$argHostname); - $argHostname=$argHostinfo[0]; - $argHostport=$argHostinfo[1]; - } else { - $argHostport = empty($this->port)? "1521" : $this->port; - } - - if ($this->connectSID) { - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))"; - } else - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; - } - } - - //if ($argHostname) print "

    Connect: 1st argument should be left blank for $this->databaseType

    "; - if ($mode==1) { - $this->_connectionID = ($this->charSet) ? - OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCIPLogon($argUsername,$argPassword, $argDatabasename) - ; - if ($this->_connectionID && $this->autoRollback) OCIrollback($this->_connectionID); - } else if ($mode==2) { - $this->_connectionID = ($this->charSet) ? - OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCINLogon($argUsername,$argPassword, $argDatabasename); - - } else { - $this->_connectionID = ($this->charSet) ? - OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet) - : - OCILogon($argUsername,$argPassword, $argDatabasename); - } - if (!$this->_connectionID) return false; - if ($this->_initdate) { - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'"); - } - - // looks like: - // Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production - // $vers = OCIServerVersion($this->_connectionID); - // if (strpos($vers,'8i') !== false) $this->ansiOuter = true; - return true; - } - - function ServerInfo() - { - $arr['compat'] = $this->GetOne('select value from sys.database_compatible_level'); - $arr['description'] = @OCIServerVersion($this->_connectionID); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,1); - } - - // returns true or false - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,2); - } - - function _affectedrows() - { - if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt); - return 0; - } - - function IfNull( $field, $ifNull ) - { - return " NVL($field, $ifNull) "; // if Oracle - } - - // format and return date string in database date format - function DBDate($d) - { - if (empty($d) && $d !== 0) return 'null'; - - if (is_string($d)) $d = ADORecordSet::UnixDate($d); - return "TO_DATE(".adodb_date($this->fmtDate,$d).",'".$this->NLS_DATE_FORMAT."')"; - } - - function BindDate($d) - { - $d = ADOConnection::DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = ADOConnection::DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - if (empty($ts) && $ts !== 0) return 'null'; - if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')"; - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->autoCommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtoupper($mask)); - $this->metaTablesSQL .= " AND upper(table_name) like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - // Mark Newnham - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - // get index details - $table = strtoupper($table); - - // get Primary index - $primary_key = ''; - - $false = false; - $rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table)); - if ($row = $rs->FetchRow()) - $primary_key = $row[1]; //constraint_name - - if ($primary==TRUE && $primary_key=='') { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; //There is no primary key - } - - $rs = $this->Execute(sprintf("SELECT ALL_INDEXES.INDEX_NAME, ALL_INDEXES.UNIQUENESS, ALL_IND_COLUMNS.COLUMN_POSITION, ALL_IND_COLUMNS.COLUMN_NAME FROM ALL_INDEXES,ALL_IND_COLUMNS WHERE UPPER(ALL_INDEXES.TABLE_NAME)='%s' AND ALL_IND_COLUMNS.INDEX_NAME=ALL_INDEXES.INDEX_NAME",$table)); - - - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array (); - // parse index data into array - - while ($row = $rs->FetchRow()) { - if ($primary && $row[0] != $primary_key) continue; - if (!isset($indexes[$row[0]])) { - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 'UNIQUE'), - 'columns' => array() - ); - } - $indexes[$row[0]]['columns'][$row[2] - 1] = $row[3]; - } - - // sort columns by order in the index - foreach ( array_keys ($indexes) as $index ) { - ksort ($indexes[$index]['columns']); - } - - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - $this->_commit = OCI_DEFAULT; - - if ($this->_transmode) $this->Execute("SET TRANSACTION ".$this->_transmode); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - if ($this->transCnt) $this->transCnt -= 1; - $ret = OCIcommit($this->_connectionID); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - $this->autoCommit = true; - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $ret = OCIrollback($this->_connectionID); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - $this->autoCommit = true; - return $ret; - } - - - function SelectDB($dbName) - { - return false; - } - - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - - if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt); - if (empty($arr)) { - if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID); - else $arr = @OCIError(); - if ($arr === false) return ''; - } - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - return $this->_errorMsg; - } - - function ErrorNo() - { - if ($this->_errorCode !== false) return $this->_errorCode; - - if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt); - if (empty($arr)) { - $arr = @OCIError($this->_connectionID); - if ($arr == false) $arr = @OCIError(); - if ($arr == false) return ''; - } - - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - - return $arr['code']; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'TO_CHAR('.$col.",'"; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= 'YYYY'; - break; - case 'Q': - case 'q': - $s .= 'Q'; - break; - - case 'M': - $s .= 'Mon'; - break; - - case 'm': - $s .= 'MM'; - break; - case 'D': - case 'd': - $s .= 'DD'; - break; - - case 'H': - $s.= 'HH24'; - break; - - case 'h': - $s .= 'HH'; - break; - - case 'i': - $s .= 'MI'; - break; - - case 's': - $s .= 'SS'; - break; - - case 'a': - case 'A': - $s .= 'AM'; - break; - - case 'w': - $s .= 'D'; - break; - - case 'l': - $s .= 'DAY'; - break; - - case 'W': - $s .= 'WW'; - break; - - default: - // handle escape characters... - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - if (strpos('-/.:;, ',$ch) !== false) $s .= $ch; - else $s .= '"'.$ch.'"'; - - } - } - return $s. "')"; - } - - - /* - This algorithm makes use of - - a. FIRST_ROWS hint - The FIRST_ROWS hint explicitly chooses the approach to optimize response time, - that is, minimum resource usage to return the first row. Results will be returned - as soon as they are identified. - - b. Uses rownum tricks to obtain only the required rows from a given offset. - As this uses complicated sql statements, we only use this if the $offset >= 100. - This idea by Tomas V V Cox. - - This implementation does not appear to work with oracle 8.0.5 or earlier. Comment - out this function then, and the slower SelectLimit() in the base class will be used. - */ - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // seems that oracle only supports 1 hint comment in 8i - if ($this->firstrows) { - if (strpos($sql,'/*+') !== false) - $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql); - else - $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql); - } - - if ($offset < $this->selectOffsetAlg1) { - if ($nrows > 0) { - if ($offset > 0) $nrows += $offset; - //$inputarr['adodb_rownum'] = $nrows; - if ($this->databaseType == 'oci8po') { - $sql = "select * from (".$sql.") where rownum <= ?"; - } else { - $sql = "select * from (".$sql.") where rownum <= :adodb_offset"; - } - $inputarr['adodb_offset'] = $nrows; - $nrows = -1; - } - // note that $nrows = 0 still has to work ==> no rows returned - - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $rs; - - } else { - // Algorithm by Tomas V V Cox, from PEAR DB oci8.php - - // Let Oracle return the name of the columns - $q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL"; - - $false = false; - if (! $stmt_arr = $this->Prepare($q_fields)) { - return $false; - } - $stmt = $stmt_arr[1]; - - if (is_array($inputarr)) { - foreach($inputarr as $k => $v) { - if (is_array($v)) { - if (sizeof($v) == 2) // suggested by g.giunta@libero. - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]); - else - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]); - } else { - $len = -1; - if ($v === ' ') $len = 1; - if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again - $bindarr[$k] = $v; - } else { // dynamic sql, so rebind every time - OCIBindByName($stmt,":$k",$inputarr[$k],$len); - } - } - } - } - - if (!OCIExecute($stmt, OCI_DEFAULT)) { - OCIFreeStatement($stmt); - return $false; - } - - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $cols[] = '"'.OCIColumnName($stmt, $i).'"'; - } - $result = false; - - OCIFreeStatement($stmt); - $fields = implode(',', $cols); - $nrows += $offset; - $offset += 1; // in Oracle rownum starts at 1 - - if ($this->databaseType == 'oci8po') { - $sql = "SELECT $fields FROM". - "(SELECT rownum as adodb_rownum, $fields FROM". - " ($sql) WHERE rownum <= ?". - ") WHERE adodb_rownum >= ?"; - } else { - $sql = "SELECT $fields FROM". - "(SELECT rownum as adodb_rownum, $fields FROM". - " ($sql) WHERE rownum <= :adodb_nrows". - ") WHERE adodb_rownum >= :adodb_offset"; - } - $inputarr['adodb_nrows'] = $nrows; - $inputarr['adodb_offset'] = $offset; - - if ($secs2cache>0) $rs =& $this->CacheExecute($secs2cache, $sql,$inputarr); - else $rs =& $this->Execute($sql,$inputarr); - return $rs; - } - - } - - /** - * Usage: - * Store BLOBs and CLOBs - * - * Example: to store $var in a blob - * - * $conn->Execute('insert into TABLE (id,ablob) values(12,empty_blob())'); - * $conn->UpdateBlob('TABLE', 'ablob', $varHoldingBlob, 'ID=12', 'BLOB'); - * - * $blobtype supports 'BLOB' and 'CLOB', but you need to change to 'empty_clob()'. - * - * to get length of LOB: - * select DBMS_LOB.GETLENGTH(ablob) from TABLE - * - * If you are using CURSOR_SHARING = force, it appears this will case a segfault - * under oracle 8.1.7.0. Run: - * $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); - * before UpdateBlob() then... - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - //if (strlen($val) < 4000) return $this->Execute("UPDATE $table SET $column=:blob WHERE $where",array('blob'=>$val)) != false; - - switch(strtoupper($blobtype)) { - default: ADOConnection::outp("UpdateBlob: Unknown blobtype=$blobtype"); return false; - case 'BLOB': $type = OCI_B_BLOB; break; - case 'CLOB': $type = OCI_B_CLOB; break; - } - - if ($this->databaseType == 'oci8po') - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?"; - else - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob"; - - $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB); - $arr['blob'] = array($desc,-1,$type); - if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT'); - $commit = $this->autoCommit; - if ($commit) $this->BeginTrans(); - $rs = $this->_Execute($sql,$arr); - if ($rez = !empty($rs)) $desc->save($val); - $desc->free(); - if ($commit) $this->CommitTrans(); - if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=FORCE'); - - if ($rez) $rs->Close(); - return $rez; - } - - /** - * Usage: store file pointed to by $var in a blob - */ - function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB') - { - switch(strtoupper($blobtype)) { - default: ADOConnection::outp( "UpdateBlob: Unknown blobtype=$blobtype"); return false; - case 'BLOB': $type = OCI_B_BLOB; break; - case 'CLOB': $type = OCI_B_CLOB; break; - } - - if ($this->databaseType == 'oci8po') - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?"; - else - $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob"; - - $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB); - $arr['blob'] = array($desc,-1,$type); - - $this->BeginTrans(); - $rs = ADODB_oci8::Execute($sql,$arr); - if ($rez = !empty($rs)) $desc->savefile($val); - $desc->free(); - $this->CommitTrans(); - - if ($rez) $rs->Close(); - return $rez; - } - - /** - * Execute SQL - * - * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text) - * @param [inputarr] holds the input data to bind to. Null elements will be set to null. - * @return RecordSet or false - */ - function &Execute($sql,$inputarr=false) - { - if ($this->fnExecute) { - $fn = $this->fnExecute; - $ret =& $fn($this,$sql,$inputarr); - if (isset($ret)) return $ret; - } - if ($inputarr) { - #if (!is_array($inputarr)) $inputarr = array($inputarr); - - $element0 = reset($inputarr); - - # is_object check because oci8 descriptors can be passed in - if (is_array($element0) && !is_object(reset($element0))) { - if (is_string($sql)) - $stmt = $this->Prepare($sql); - else - $stmt = $sql; - - foreach($inputarr as $arr) { - $ret =& $this->_Execute($stmt,$arr); - if (!$ret) return $ret; - } - } else { - $ret =& $this->_Execute($sql,$inputarr); - } - - } else { - $ret =& $this->_Execute($sql,false); - } - - return $ret; - } - - /* - Example of usage: - - $stmt = $this->Prepare('insert into emp (empno, ename) values (:empno, :ename)'); - */ - function Prepare($sql,$cursor=false) - { - static $BINDNUM = 0; - - $stmt = OCIParse($this->_connectionID,$sql); - - if (!$stmt) { - $this->_errorMsg = false; - $this->_errorCode = false; - $arr = @OCIError($this->_connectionID); - if ($arr === false) return false; - - $this->_errorMsg = $arr['message']; - $this->_errorCode = $arr['code']; - return false; - } - - $BINDNUM += 1; - - $sttype = @OCIStatementType($stmt); - if ($sttype == 'BEGIN' || $sttype == 'DECLARE') { - return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false); - } - return array($sql,$stmt,0,$BINDNUM); - } - - /* - Call an oracle stored procedure and returns a cursor variable as a recordset. - Concept by Robert Tuttle robert@ud.com - - Example: - Note: we return a cursor variable in :RS2 - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS2); END;",'RS2'); - - $rs = $db->ExecuteCursor( - "BEGIN :RS2 = adodb.getdata(:VAR1); END;", - 'RS2', - array('VAR1' => 'Mr Bean')); - - */ - function &ExecuteCursor($sql,$cursorName='rs',$params=false) - { - if (is_array($sql)) $stmt = $sql; - else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor - - if (is_array($stmt) && sizeof($stmt) >= 5) { - $hasref = true; - $ignoreCur = false; - $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR); - if ($params) { - foreach($params as $k => $v) { - $this->Parameter($stmt,$params[$k], $k); - } - } - } else - $hasref = false; - - $rs =& $this->Execute($stmt); - if ($rs) { - if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]); - else if ($hasref) $rs->_refcursor = $stmt[4]; - } - return $rs; - } - - /* - Bind a variable -- very, very fast for executing repeated statements in oracle. - Better than using - for ($i = 0; $i < $max; $i++) { - $p1 = ?; $p2 = ?; $p3 = ?; - $this->Execute("insert into table (col0, col1, col2) values (:0, :1, :2)", - array($p1,$p2,$p3)); - } - - Usage: - $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)"); - $DB->Bind($stmt, $p1); - $DB->Bind($stmt, $p2); - $DB->Bind($stmt, $p3); - for ($i = 0; $i < $max; $i++) { - $p1 = ?; $p2 = ?; $p3 = ?; - $DB->Execute($stmt); - } - - Some timings: - ** Test table has 3 cols, and 1 index. Test to insert 1000 records - Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute - Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute - Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute - - Now if PHP only had batch/bulk updating like Java or PL/SQL... - - Note that the order of parameters differs from OCIBindByName, - because we default the names to :0, :1, :2 - */ - function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false) - { - - if (!is_array($stmt)) return false; - - if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) { - return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type); - } - - if ($name == false) { - if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type); - else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator - $stmt[2] += 1; - } else if (oci_lob_desc($type)) { - if ($this->debug) { - ADOConnection::outp("Bind: name = $name"); - } - //we have to create a new Descriptor here - $numlob = count($this->_refLOBs); - $this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type)); - $this->_refLOBs[$numlob]['TYPE'] = $isOutput; - - $tmp = &$this->_refLOBs[$numlob]['LOB']; - $rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type); - if ($this->debug) { - ADOConnection::outp("Bind: descriptor has been allocated, var (".$name.") binded"); - } - - // if type is input then write data to lob now - if ($isOutput == false) { - $var = $this->BlobEncode($var); - $tmp->WriteTemporary($var); - $this->_refLOBs[$numlob]['VAR'] = &$var; - if ($this->debug) { - ADOConnection::outp("Bind: LOB has been written to temp"); - } - } else { - $this->_refLOBs[$numlob]['VAR'] = &$var; - } - $rez = $tmp; - } else { - if ($this->debug) - ADOConnection::outp("Bind: name = $name"); - - if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type); - else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator - } - - return $rez; - } - - function Param($name,$type=false) - { - return ':'.$name; - } - - /* - Usage: - $stmt = $db->Prepare('select * from table where id =:myid and group=:group'); - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group'); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See OCIBindByName documentation at php.net. - */ - function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) - { - if ($this->debug) { - $prefix = ($isOutput) ? 'Out' : 'In'; - $ztype = (empty($type)) ? 'false' : $type; - ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);"); - } - return $this->Bind($stmt,$var,$maxLen,$type,$name,$isOutput); - } - - /* - returns query ID if successful, otherwise false - this version supports: - - 1. $db->execute('select * from table'); - - 2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); - $db->execute($prepared_statement, array(1,2,3)); - - 3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3)); - - 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); - $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); - $db->execute($stmt); - */ - function _query($sql,$inputarr) - { - if (is_array($sql)) { // is prepared sql - $stmt = $sql[1]; - - // we try to bind to permanent array, so that OCIBindByName is persistent - // and carried out once only - note that max array element size is 4000 chars - if (is_array($inputarr)) { - $bindpos = $sql[3]; - if (isset($this->_bind[$bindpos])) { - // all tied up already - $bindarr = &$this->_bind[$bindpos]; - } else { - // one statement to bind them all - $bindarr = array(); - foreach($inputarr as $k => $v) { - $bindarr[$k] = $v; - OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000); - } - $this->_bind[$bindpos] = &$bindarr; - } - } - } else { - $stmt=OCIParse($this->_connectionID,$sql); - } - - $this->_stmt = $stmt; - if (!$stmt) return false; - - if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS); - - if (is_array($inputarr)) { - foreach($inputarr as $k => $v) { - if (is_array($v)) { - if (sizeof($v) == 2) // suggested by g.giunta@libero. - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]); - else - OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]); - - if ($this->debug==99) echo "name=:$k",' var='.$inputarr[$k][0],' len='.$v[1],' type='.$v[2],'
    '; - } else { - $len = -1; - if ($v === ' ') $len = 1; - if (isset($bindarr)) { // is prepared sql, so no need to ocibindbyname again - $bindarr[$k] = $v; - } else { // dynamic sql, so rebind every time - OCIBindByName($stmt,":$k",$inputarr[$k],$len); - } - } - } - } - - $this->_errorMsg = false; - $this->_errorCode = false; - if (OCIExecute($stmt,$this->_commit)) { -//OCIInternalDebug(1); - if (count($this -> _refLOBs) > 0) { - - foreach ($this -> _refLOBs as $key => $value) { - if ($this -> _refLOBs[$key]['TYPE'] == true) { - $tmp = $this -> _refLOBs[$key]['LOB'] -> load(); - if ($this -> debug) { - ADOConnection::outp("OUT LOB: LOB has been loaded.
    "); - } - //$_GLOBALS[$this -> _refLOBs[$key]['VAR']] = $tmp; - $this -> _refLOBs[$key]['VAR'] = $tmp; - } else { - $this->_refLOBs[$key]['LOB']->save($this->_refLOBs[$key]['VAR']); - $this -> _refLOBs[$key]['LOB']->free(); - unset($this -> _refLOBs[$key]); - if ($this->debug) { - ADOConnection::outp("IN LOB: LOB has been saved.
    "); - } - } - } - } - - switch (@OCIStatementType($stmt)) { - case "SELECT": - return $stmt; - - case 'DECLARE': - case "BEGIN": - if (is_array($sql) && !empty($sql[4])) { - $cursor = $sql[4]; - if (is_resource($cursor)) { - $ok = OCIExecute($cursor); - return $cursor; - } - return $stmt; - } else { - if (is_resource($stmt)) { - OCIFreeStatement($stmt); - return true; - } - return $stmt; - } - break; - default : - // ociclose -- no because it could be used in a LOB? - return true; - } - } - return false; - } - - // returns true or false - function _close() - { - if (!$this->_connectionID) return; - - if (!$this->autoCommit) OCIRollback($this->_connectionID); - if (count($this->_refLOBs) > 0) { - foreach ($this ->_refLOBs as $key => $value) { - $this->_refLOBs[$key]['LOB']->free(); - unset($this->_refLOBs[$key]); - } - } - OCILogoff($this->_connectionID); - - $this->_stmt = false; - $this->_connectionID = false; - } - - function MetaPrimaryKeys($table, $owner=false,$internalKey=false) - { - if ($internalKey) return array('ROWID'); - - // tested with oracle 8.1.7 - $table = strtoupper($table); - if ($owner) { - $owner_clause = "AND ((a.OWNER = b.OWNER) AND (a.OWNER = UPPER('$owner')))"; - $ptab = 'ALL_'; - } else { - $owner_clause = ''; - $ptab = 'USER_'; - } - $sql = " -SELECT /*+ RULE */ distinct b.column_name - FROM {$ptab}CONSTRAINTS a - , {$ptab}CONS_COLUMNS b - WHERE ( UPPER(b.table_name) = ('$table')) - AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P') - $owner_clause - AND (a.constraint_name = b.constraint_name)"; - - $rs = $this->Execute($sql); - if ($rs && !$rs->EOF) { - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $a[] = reset($v); - } - return $a; - } - else return false; - } - - // http://gis.mit.edu/classes/11.521/sqlnotes/referential_integrity.html - function MetaForeignKeys($table, $owner=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - if (!$owner) { - $owner = $this->user; - $tabp = 'user_'; - } else - $tabp = 'all_'; - - $owner = ' and owner='.$this->qstr(strtoupper($owner)); - - $sql = -"select constraint_name,r_owner,r_constraint_name - from {$tabp}constraints - where constraint_type = 'R' and table_name = $table $owner"; - - $constraints =& $this->GetArray($sql); - $arr = false; - foreach($constraints as $constr) { - $cons = $this->qstr($constr[0]); - $rowner = $this->qstr($constr[1]); - $rcons = $this->qstr($constr[2]); - $cols = $this->GetArray("select column_name from {$tabp}cons_columns where constraint_name=$cons $owner order by position"); - $tabcol = $this->GetArray("select table_name,column_name from {$tabp}cons_columns where owner=$rowner and constraint_name=$rcons order by position"); - - if ($cols && $tabcol) - for ($i=0, $max=sizeof($cols); $i < $max; $i++) { - $arr[$tabcol[$i][0]] = $cols[$i][0].'='.$tabcol[$i][1]; - } - } - $ADODB_FETCH_MODE = $save; - - return $arr; - } - - - function CharMax() - { - return 4000; - } - - function TextMax() - { - return 4000; - } - - /** - * Quotes a string. - * An example is $db->qstr("Don't bother",magic_quotes_runtime()); - * - * @param s the string to quote - * @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). - * This undoes the stupidity of magic quotes for GPC. - * - * @return quoted string to be sent back to database - */ - function qstr($s,$magic_quotes=false) - { - //$nofixquotes=false; - - if ($this->noNullStrings && strlen($s)==0)$s = ' '; - if (!$magic_quotes) { - if ($this->replaceQuote[0] == '\\'){ - $s = str_replace('\\','\\\\',$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oci8 extends ADORecordSet { - - var $databaseType = 'oci8'; - var $bind=false; - var $_fieldobjs; - - //var $_arr = false; - - function ADORecordset_oci8($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_NUM: - default: - $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - } - - $this->adodbFetchMode = $mode; - $this->_queryID = $queryID; - } - - - function Init() - { - if ($this->_inited) return; - - $this->_inited = true; - if ($this->_queryID) { - - $this->_currentRow = 0; - @$this->_initrs(); - $this->EOF = !$this->_fetch(); - - /* - // based on idea by Gaetano Giunta to detect unusual oracle errors - // see http://phplens.com/lens/lensforum/msgs.php?id=6771 - $err = OCIError($this->_queryID); - if ($err && $this->connection->debug) ADOConnection::outp($err); - */ - - if (!is_array($this->fields)) { - $this->_numOfRows = 0; - $this->fields = array(); - } - } else { - $this->fields = array(); - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = OCInumcols($this->_queryID); - if ($this->_numOfFields>0) { - $this->_fieldobjs = array(); - $max = $this->_numOfFields; - for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i); - } - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &_FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fieldOffset += 1; - $fld->name =OCIcolumnname($this->_queryID, $fieldOffset); - $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); - $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); - if ($fld->type == 'NUMBER') { - $p = OCIColumnPrecision($this->_queryID, $fieldOffset); - $sc = OCIColumnScale($this->_queryID, $fieldOffset); - if ($p != 0 && $sc == 0) $fld->type = 'INT'; - //echo " $this->name ($p.$sc) "; - } - return $fld; - } - - /* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */ - function &FetchField($fieldOffset = -1) - { - return $this->_fieldobjs[$fieldOffset]; - } - - - /* - // 10% speedup to move MoveNext to child class - function _MoveNext() - { - //global $ADODB_EXTENSION;if ($ADODB_EXTENSION) return @adodb_movenext($this); - - if ($this->EOF) return false; - - $this->_currentRow++; - if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) - return true; - $this->EOF = true; - - return false; - } */ - - - function MoveNext() - { - if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - } - - /* - # does not work as first record is retrieved in _initrs(), so is not included in GetArray() - function &GetArray($nRows = -1) - { - global $ADODB_OCI8_GETARRAY; - - if (true || !empty($ADODB_OCI8_GETARRAY)) { - # does not support $ADODB_ANSI_PADDING_OFF - - //OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement - switch($this->adodbFetchMode) { - case ADODB_FETCH_NUM: - - $ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM); - $results = array_merge(array($this->fields),$results); - return $results; - - case ADODB_FETCH_ASSOC: - if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break; - - $ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW); - $results =& array_merge(array($this->fields),$assoc); - return $results; - - default: - break; - } - } - - $results =& ADORecordSet::GetArray($nRows); - return $results; - - } */ - - /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr =& $this->GetArray($nrows); - return $arr; - } - $arr = array(); - for ($i=1; $i < $offset; $i++) - if (!@OCIFetch($this->_queryID)) return $arr; - - if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;; - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - /* Use associative array to get fields array */ - function Fields($colname) - { - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - - function _seek($row) - { - return false; - } - - function _fetch() - { - return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() - { - if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false; - if (!empty($this->_refcursor)) { - OCIFreeCursor($this->_refcursor); - $this->_refcursor = false; - } - @OCIFreeStatement($this->_queryID); - $this->_queryID = false; - - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - case 'NCHAR': - case 'NVARCHAR': - case 'NVARCHAR2': - if (isset($this) && $len <= $this->blobSize) return 'C'; - - case 'NCLOB': - case 'LONG': - case 'LONG VARCHAR': - case 'CLOB': - return 'X'; - - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': - return ($this->connection->datetime) ? 'T' : 'D'; - - - case 'TIMESTAMP': return 'T'; - - case 'INT': - case 'SMALLINT': - case 'INTEGER': - return 'I'; - - default: return 'N'; - } - } -} - -class ADORecordSet_ext_oci8 extends ADORecordSet_oci8 { - function ADORecordSet_ext_oci8($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - case ADODB_FETCH_NUM: - default: $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break; - } - $this->adodbFetchMode = $mode; - $this->_queryID = $queryID; - } - - function MoveNext() - { - return adodb_movenext($this); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci805.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci805.inc.php deleted file mode 100755 index 3cc60d14..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci805.inc.php +++ /dev/null @@ -1,59 +0,0 @@ -ADODB_oci8(); - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // seems that oracle only supports 1 hint comment in 8i - if (strpos($sql,'/*+') !== false) - $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql); - else - $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql); - - /* - The following is only available from 8.1.5 because order by in inline views not - available before then... - http://www.jlcomp.demon.co.uk/faq/top_sql.html - if ($nrows > 0) { - if ($offset > 0) $nrows += $offset; - $sql = "select * from ($sql) where rownum <= $nrows"; - $nrows = -1; - } - */ - - return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - } -} - -class ADORecordset_oci805 extends ADORecordset_oci8 { - var $databaseType = "oci805"; - function ADORecordset_oci805($id,$mode=false) - { - $this->ADORecordset_oci8($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8po.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8po.inc.php deleted file mode 100755 index e51545ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oci8po.inc.php +++ /dev/null @@ -1,217 +0,0 @@ - - - Should some emulation of RecordCount() be implemented? - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php'); - -class ADODB_oci8po extends ADODB_oci8 { - var $databaseType = 'oci8po'; - var $dataProvider = 'oci8'; - var $metaColumnsSQL = "select lower(cname),coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net - var $metaTablesSQL = "select lower(table_name),table_type from cat where table_type in ('TABLE','VIEW')"; - - function ADODB_oci8po() - { - $this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200; - # oci8po does not support adodb extension: adodb_movenext() - } - - function Param($name) - { - return '?'; - } - - function Prepare($sql,$cursor=false) - { - $sqlarr = explode('?',$sql); - $sql = $sqlarr[0]; - for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) { - $sql .= ':'.($i-1) . $sqlarr[$i]; - } - return ADODB_oci8::Prepare($sql,$cursor); - } - - // emulate handling of parameters ? ?, replacing with :bind0 :bind1 - function _query($sql,$inputarr) - { - if (is_array($inputarr)) { - $i = 0; - if (is_array($sql)) { - foreach($inputarr as $v) { - $arr['bind'.$i++] = $v; - } - } else { - $sqlarr = explode('?',$sql); - $sql = $sqlarr[0]; - foreach($inputarr as $k => $v) { - $sql .= ":$k" . $sqlarr[++$i]; - } - } - } - return ADODB_oci8::_query($sql,$inputarr); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oci8po extends ADORecordset_oci8 { - - var $databaseType = 'oci8po'; - - function ADORecordset_oci8po($queryID,$mode=false) - { - $this->ADORecordset_oci8($queryID,$mode); - } - - function Fields($colname) - { - if ($this->fetchMode & OCI_ASSOC) return $this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - // lowercase field names... - function &_FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fieldOffset += 1; - $fld->name = strtolower(OCIcolumnname($this->_queryID, $fieldOffset)); - $fld->type = OCIcolumntype($this->_queryID, $fieldOffset); - $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset); - if ($fld->type == 'NUMBER') { - //$p = OCIColumnPrecision($this->_queryID, $fieldOffset); - $sc = OCIColumnScale($this->_queryID, $fieldOffset); - if ($sc == 0) $fld->type = 'INT'; - } - return $fld; - } - /* - function MoveNext() - { - if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $this->_currentRow += 1; - return true; - } - if (!$this->EOF) { - $this->_currentRow += 1; - $this->EOF = true; - } - return false; - }*/ - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - global $ADODB_ANSI_PADDING_OFF; - $this->_currentRow++; - - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - if (!empty($ADODB_ANSI_PADDING_OFF)) { - foreach($this->fields as $k => $v) { - if (is_string($v)) $this->fields[$k] = rtrim($v); - } - } - return true; - } - if (!$this->EOF) { - $this->EOF = true; - $this->_currentRow++; - } - return false; - } - - /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */ - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $arr = $this->GetArray($nrows); - return $arr; - } - for ($i=1; $i < $offset; $i++) - if (!@OCIFetch($this->_queryID)) { - $arr = array(); - return $arr; - } - if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) { - $arr = array(); - return $arr; - } - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - // Create associative array - function _updatefields() - { - if (ADODB_ASSOC_CASE == 2) return; // native - - $arr = array(); - $lowercase = (ADODB_ASSOC_CASE == 0); - - foreach($this->fields as $k => $v) { - if (is_integer($k)) $arr[$k] = $v; - else { - if ($lowercase) - $arr[strtolower($k)] = $v; - else - $arr[strtoupper($k)] = $v; - } - } - $this->fields = $arr; - } - - function _fetch() - { - $ret = @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode); - if ($ret) { - global $ADODB_ANSI_PADDING_OFF; - - if ($this->fetchMode & OCI_ASSOC) $this->_updatefields(); - if (!empty($ADODB_ANSI_PADDING_OFF)) { - foreach($this->fields as $k => $v) { - if (is_string($v)) $this->fields[$k] = rtrim($v); - } - } - } - return $ret; - } - -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc.inc.php deleted file mode 100755 index f8cbb9ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc.inc.php +++ /dev/null @@ -1,738 +0,0 @@ -_haserrorfunctions = ADODB_PHPVER >= 0x4050; - $this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('odbc_connect')) return null; - - if ($this->debug && $argDatabasename && $this->databaseType != 'vfp') { - ADOConnection::outp("For odbc Connect(), $argDatabasename is not used. Place dsn in 1st parameter."); - } - if (isset($php_errormsg)) $php_errormsg = ''; - if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword); - else $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,$this->curmode); - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - if (!function_exists('odbc_connect')) return null; - - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if ($this->debug && $argDatabasename) { - ADOConnection::outp("For odbc PConnect(), $argDatabasename is not used. Place dsn in 1st parameter."); - } - // print "dsn=$argDSN u=$argUsername p=$argPassword
    "; flush(); - if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword); - else $this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,$this->curmode); - - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - if ($this->_connectionID && $this->autoRollback) @odbc_rollback($this->_connectionID); - if (isset($this->connectStmt)) $this->Execute($this->connectStmt); - - return $this->_connectionID != false; - } - - - function ServerInfo() - { - - if (!empty($this->host) && ADODB_PHPVER >= 0x4300) { - $dsn = strtoupper($this->host); - $first = true; - $found = false; - - if (!function_exists('odbc_data_source')) return false; - - while(true) { - - $rez = @odbc_data_source($this->_connectionID, - $first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT); - $first = false; - if (!is_array($rez)) break; - if (strtoupper($rez['server']) == $dsn) { - $found = true; - break; - } - } - if (!$found) return ADOConnection::ServerInfo(); - if (!isset($rez['version'])) $rez['version'] = ''; - return $rez; - } else { - return ADOConnection::ServerInfo(); - } - } - - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - $start -= 1; - return $this->Execute("insert into $seqname values($start)"); - } - - var $_dropSeqSQL = 'drop table %s'; - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $MAXLOOPS = 100; - //$this->debug=1; - while (--$MAXLOOPS>=0) { - $num = $this->GetOne("select id from $seq"); - if ($num === false) { - $this->Execute(sprintf($this->_genSeqSQL ,$seq)); - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into $seq values($start)"); - if (!$ok) return false; - } - $this->Execute("update $seq set id=id+1 where id=$num"); - - if ($this->affected_rows() > 0) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - - function ErrorMsg() - { - if ($this->_haserrorfunctions) { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (empty($this->_connectionID)) return @odbc_errormsg(); - return @odbc_errormsg($this->_connectionID); - } else return ADOConnection::ErrorMsg(); - } - - function ErrorNo() - { - - if ($this->_haserrorfunctions) { - if ($this->_errorCode !== false) { - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode; - } - - if (empty($this->_connectionID)) $e = @odbc_error(); - else $e = @odbc_error($this->_connectionID); - - // bug in 4.0.6, error number can be corrupted string (should be 6 digits) - // so we check and patch - if (strlen($e)<=2) return 0; - return $e; - } else return ADOConnection::ErrorNo(); - } - - - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - return odbc_autocommit($this->_connectionID,false); - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = odbc_commit($this->_connectionID); - odbc_autocommit($this->_connectionID,true); - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - $ret = odbc_rollback($this->_connectionID); - odbc_autocommit($this->_connectionID,true); - return $ret; - } - - function MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = @odbc_primarykeys($this->_connectionID,'',$schema,$table); - - if (!$qid) { - $ADODB_FETCH_MODE = $savem; - return false; - } - $rs = new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - $rs->Close(); - //print_r($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - - - function &MetaTables($ttype=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID); - - $rs = new ADORecordSet_odbc($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - //print_r($arr); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - if (!$arr[$i][2]) continue; - $type = $arr[$i][3]; - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2]; - } - return $arr2; - } - -/* -See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcdatetime_data_type_changes.asp -/ SQL data type codes / -#define SQL_UNKNOWN_TYPE 0 -#define SQL_CHAR 1 -#define SQL_NUMERIC 2 -#define SQL_DECIMAL 3 -#define SQL_INTEGER 4 -#define SQL_SMALLINT 5 -#define SQL_FLOAT 6 -#define SQL_REAL 7 -#define SQL_DOUBLE 8 -#if (ODBCVER >= 0x0300) -#define SQL_DATETIME 9 -#endif -#define SQL_VARCHAR 12 - - -/ One-parameter shortcuts for date/time data types / -#if (ODBCVER >= 0x0300) -#define SQL_TYPE_DATE 91 -#define SQL_TYPE_TIME 92 -#define SQL_TYPE_TIMESTAMP 93 - -#define SQL_UNICODE (-95) -#define SQL_UNICODE_VARCHAR (-96) -#define SQL_UNICODE_LONGVARCHAR (-97) -*/ - function ODBCTypes($t) - { - switch ((integer)$t) { - case 1: - case 12: - case 0: - case -95: - case -96: - return 'C'; - case -97: - case -1: //text - return 'X'; - case -4: //image - return 'B'; - - case 9: - case 91: - return 'D'; - - case 10: - case 11: - case 92: - case 93: - return 'T'; - - case 4: - case 5: - case -6: - return 'I'; - - case -11: // uniqidentifier - return 'R'; - case -7: //bit - return 'L'; - - default: - return 'N'; - } - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - if ($this->uCaseTables) $table = strtoupper($table); - $schema = ''; - $this->_findschema($table,$schema); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - /*if (false) { // after testing, confirmed that the following does not work becoz of a bug - $qid2 = odbc_tables($this->_connectionID); - $rs = new ADORecordSet_odbc($qid2); - $ADODB_FETCH_MODE = $savem; - if (!$rs) return false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - $rs->_fetch(); - - while (!$rs->EOF) { - if ($table == strtoupper($rs->fields[2])) { - $q = $rs->fields[0]; - $o = $rs->fields[1]; - break; - } - $rs->MoveNext(); - } - $rs->Close(); - - $qid = odbc_columns($this->_connectionID,$q,$o,strtoupper($table),'%'); - } */ - - switch ($this->databaseType) { - case 'access': - case 'vfp': - $qid = odbc_columns($this->_connectionID);#,'%','',strtoupper($table),'%'); - break; - - - case 'db2': - $colname = "%"; - $qid = odbc_columns($this->_connectionID, "", $schema, $table, $colname); - break; - - default: - $qid = @odbc_columns($this->_connectionID,'%','%',strtoupper($table),'%'); - if (empty($qid)) $qid = odbc_columns($this->_connectionID); - break; - } - if (empty($qid)) return $false; - - $rs =& new ADORecordSet_odbc($qid); - $ADODB_FETCH_MODE = $savem; - - if (!$rs) return $false; - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - $rs->_fetch(); - - $retarr = array(); - - /* - $rs->fields indices - 0 TABLE_QUALIFIER - 1 TABLE_SCHEM - 2 TABLE_NAME - 3 COLUMN_NAME - 4 DATA_TYPE - 5 TYPE_NAME - 6 PRECISION - 7 LENGTH - 8 SCALE - 9 RADIX - 10 NULLABLE - 11 REMARKS - */ - while (!$rs->EOF) { - // adodb_pr($rs->fields); - if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $this->ODBCTypes($rs->fields[4]); - - // ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp - // access uses precision to store length for char/varchar - if ($fld->type == 'C' or $fld->type == 'X') { - if ($this->databaseType == 'access') - $fld->max_length = $rs->fields[6]; - else if ($rs->fields[4] <= -95) // UNICODE - $fld->max_length = $rs->fields[7]/2; - else - $fld->max_length = $rs->fields[7]; - } else - $fld->max_length = $rs->fields[7]; - $fld->not_null = !empty($rs->fields[10]); - $fld->scale = $rs->fields[8]; - $retarr[strtoupper($fld->name)] = $fld; - } else if (sizeof($retarr)>0) - break; - $rs->MoveNext(); - } - $rs->Close(); //-- crashes 4.03pl1 -- why? - - if (empty($retarr)) $retarr = false; - return $retarr; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = odbc_prepare($this->_connectionID,$sql); - if (!$stmt) { - // we don't know whether odbc driver is parsing prepared stmts, so just return sql - return $sql; - } - return array($sql,$stmt,false); - } - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - GLOBAL $php_errormsg; - if (isset($php_errormsg)) $php_errormsg = ''; - $this->_error = ''; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = odbc_prepare($this->_connectionID,$sql); - - if ($stmtid == false) { - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - return false; - } - } - - if (! odbc_execute($stmtid,$inputarr)) { - //@odbc_free_result($stmtid); - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } - return false; - } - - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!odbc_execute($stmtid)) { - //@odbc_free_result($stmtid); - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } - return false; - } - } else - $stmtid = odbc_exec($this->_connectionID,$sql); - - $this->_lastAffectedRows = 0; - if ($stmtid) { - if (@odbc_num_fields($stmtid) == 0) { - $this->_lastAffectedRows = odbc_num_rows($stmtid); - $stmtid = true; - } else { - $this->_lastAffectedRows = 0; - odbc_binmode($stmtid,$this->binmode); - odbc_longreadlen($stmtid,$this->maxblobsize); - } - - if ($this->_haserrorfunctions) { - $this->_errorMsg = ''; - $this->_errorCode = 0; - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } else { - if ($this->_haserrorfunctions) { - $this->_errorMsg = odbc_errormsg(); - $this->_errorCode = odbc_error(); - } else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : ''; - } - return $stmtid; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; - } - - // returns true or false - function _close() - { - $ret = @odbc_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } - - function _affectedrows() - { - return $this->_lastAffectedRows; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_odbc extends ADORecordSet { - - var $bind = false; - var $databaseType = "odbc"; - var $dataProvider = "odbc"; - var $useFetchArray; - var $_has_stupid_odbc_fetch_api_change; - - function ADORecordSet_odbc($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - - // the following is required for mysql odbc driver in 4.3.1 -- why? - $this->EOF = false; - $this->_currentRow = -1; - //$this->ADORecordSet($id); - } - - - // returns the field object - function &FetchField($fieldOffset = -1) - { - - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $o->name = @odbc_field_name($this->_queryID,$off); - $o->type = @odbc_field_type($this->_queryID,$off); - $o->max_length = @odbc_field_len($this->_queryID,$off); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS) ? @odbc_num_rows($this->_queryID) : -1; - $this->_numOfFields = @odbc_num_fields($this->_queryID); - // some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0 - if ($this->_numOfRows == 0) $this->_numOfRows = -1; - //$this->useFetchArray = $this->connection->useFetchArray; - $this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200; - } - - function _seek($row) - { - return false; - } - - // speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated - function &GetArrayLimit($nrows,$offset=-1) - { - if ($offset <= 0) { - $rs =& $this->GetArray($nrows); - return $rs; - } - $savem = $this->fetchMode; - $this->fetchMode = ADODB_FETCH_NUM; - $this->Move($offset); - $this->fetchMode = $savem; - - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - - $results = array(); - $cnt = 0; - while (!$this->EOF && $nrows != $cnt) { - $results[$cnt++] = $this->fields; - $this->MoveNext(); - } - - return $results; - } - - - function MoveNext() - { - if ($this->_numOfRows != 0 && !$this->EOF) { - $this->_currentRow++; - - if ($this->_has_stupid_odbc_fetch_api_change) - $rez = @odbc_fetch_into($this->_queryID,$this->fields); - else { - $row = 0; - $rez = @odbc_fetch_into($this->_queryID,$row,$this->fields); - } - if ($rez) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - } - $this->fields = false; - $this->EOF = true; - return false; - } - - function _fetch() - { - - if ($this->_has_stupid_odbc_fetch_api_change) - $rez = @odbc_fetch_into($this->_queryID,$this->fields); - else { - $row = 0; - $rez = @odbc_fetch_into($this->_queryID,$row,$this->fields); - } - if ($rez) { - if ($this->fetchMode & ADODB_FETCH_ASSOC) { - $this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE); - } - return true; - } - $this->fields = false; - return false; - } - - function _close() - { - return @odbc_free_result($this->_queryID); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_db2.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_db2.inc.php deleted file mode 100755 index f3435870..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_db2.inc.php +++ /dev/null @@ -1,368 +0,0 @@ -curMode = SQL_CUR_USE_ODBC; -$db->Connect($dsn, $userid, $pwd); - - - -USING CLI INTERFACE -=================== - -I have had reports that the $host and $database params have to be reversed in -Connect() when using the CLI interface. From Halmai Csongor csongor.halmai#nexum.hu: - -> The symptom is that if I change the database engine from postgres or any other to DB2 then the following -> connection command becomes wrong despite being described this version to be correct in the docs. -> -> $connection_object->Connect( $DATABASE_HOST, $DATABASE_AUTH_USER_NAME, $DATABASE_AUTH_PASSWORD, $DATABASE_NAME ) -> -> In case of DB2 I had to swap the first and last arguments in order to connect properly. - - -System Error 5 -============== -IF you get a System Error 5 when trying to Connect/Load, it could be a permission problem. Give the user connecting -to DB2 full rights to the DB2 SQLLIB directory, and place the user in the DBUSERS group. -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('_ADODB_ODBC_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbc.inc.php"); -} -if (!defined('ADODB_ODBC_DB2')){ -define('ADODB_ODBC_DB2',1); - -class ADODB_ODBC_DB2 extends ADODB_odbc { - var $databaseType = "db2"; - var $concat_operator = '||'; - var $sysTime = 'CURRENT TIME'; - var $sysDate = 'CURRENT DATE'; - var $sysTimeStamp = 'CURRENT TIMESTAMP'; - // The complete string representation of a timestamp has the form - // yyyy-mm-dd-hh.mm.ss.nnnnnn. - var $fmtTimeStamp = "'Y-m-d-H.i.s'"; - var $ansiOuter = true; - var $identitySQL = 'values IDENTITY_VAL_LOCAL()'; - var $_bindInputArray = true; - var $hasInsertID = true; - var $rsPrefix = 'ADORecordset_odbc_'; - - function ADODB_DB2() - { - if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC; - $this->ADODB_odbc(); - } - - function IfNull( $field, $ifNull ) - { - return " COALESCE($field, $ifNull) "; // if DB2 UDB - } - - function ServerInfo() - { - //odbc_setoption($this->_connectionID,1,101 /*SQL_ATTR_ACCESS_MODE*/, 1 /*SQL_MODE_READ_ONLY*/); - $vers = $this->GetOne('select versionnumber from sysibm.sysversions'); - //odbc_setoption($this->_connectionID,1,101, 0 /*SQL_MODE_READ_WRITE*/); - return array('description'=>'DB2 ODBC driver', 'version'=>$vers); - } - - function _insertid() - { - return $this->GetOne($this->identitySQL); - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if ($this->_autocommit) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - function &MetaTables($ttype=false,$showSchema=false, $qtable="%", $qschema="%") - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $qid = odbc_tables($this->_connectionID, "", $qschema, $qtable, ""); - - $rs = new ADORecordSet_odbc($qid); - - $ADODB_FETCH_MODE = $savem; - if (!$rs) { - $false = false; - return $false; - } - $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; - - $arr =& $rs->GetArray(); - //print_r($arr); - - $rs->Close(); - $arr2 = array(); - - if ($ttype) { - $isview = strncmp($ttype,'V',1) === 0; - } - for ($i=0; $i < sizeof($arr); $i++) { - - if (!$arr[$i][2]) continue; - if (strncmp($arr[$i][1],'SYS',3) === 0) continue; - - $type = $arr[$i][3]; - - if ($showSchema) $arr[$i][2] = $arr[$i][1].'.'.$arr[$i][2]; - - if ($ttype) { - if ($isview) { - if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'T',1) === 0) $arr2[] = $arr[$i][2]; - } else if (strncmp($type,'S',1) !== 0) $arr2[] = $arr[$i][2]; - } - return $arr2; - } - - function &MetaIndexes ($table, $primary = FALSE, $owner=false) - { - // save old fetch mode - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $false = false; - // get index details - $table = strtoupper($table); - $SQL="SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'"; - if ($primary) - $SQL.= " AND UNIQUERULE='P'"; - $rs = $this->Execute($SQL); - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - $indexes = array (); - // parse index data into array - while ($row = $rs->FetchRow()) { - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 'U' || $row[1] == 'P'), - 'columns' => array() - ); - $cols = ltrim($row[2],'+'); - $indexes[$row[0]]['columns'] = explode('+', $cols); - } - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - // use right() and replace() ? - if (!$col) $col = $this->sysDate; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '||'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "char(year($col))"; - break; - case 'M': - $s .= "substr(monthname($col),1,3)"; - break; - case 'm': - $s .= "right(digits(month($col)),2)"; - break; - case 'D': - case 'd': - $s .= "right(digits(day($col)),2)"; - break; - case 'H': - case 'h': - if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)"; - else $s .= "''"; - break; - case 'i': - case 'I': - if ($col != $this->sysDate) - $s .= "right(digits(minute($col)),2)"; - else $s .= "''"; - break; - case 'S': - case 's': - if ($col != $this->sysDate) - $s .= "right(digits(second($col)),2)"; - else $s .= "''"; - break; - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - } - } - return $s; - } - - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false) - { - $nrows = (integer) $nrows; - if ($offset <= 0) { - // could also use " OPTIMIZE FOR $nrows ROWS " - if ($nrows >= 0) $sql .= " FETCH FIRST $nrows ROWS ONLY "; - $rs =& $this->Execute($sql,$inputArr); - } else { - if ($offset > 0 && $nrows < 0); - else { - $nrows += $offset; - $sql .= " FETCH FIRST $nrows ROWS ONLY "; - } - $rs =& ADOConnection::SelectLimit($sql,-1,$offset,$inputArr); - } - - return $rs; - } - -}; - - -class ADORecordSet_odbc_db2 extends ADORecordSet_odbc { - - var $databaseType = "db2"; - - function ADORecordSet_db2($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - switch (strtoupper($t)) { - case 'VARCHAR': - case 'CHAR': - case 'CHARACTER': - case 'C': - if ($len <= $this->blobSize) return 'C'; - - case 'LONGCHAR': - case 'TEXT': - case 'CLOB': - case 'DBCLOB': // double-byte - case 'X': - return 'X'; - - case 'BLOB': - case 'GRAPHIC': - case 'VARGRAPHIC': - return 'B'; - - case 'DATE': - case 'D': - return 'D'; - - case 'TIME': - case 'TIMESTAMP': - case 'T': - return 'T'; - - //case 'BOOLEAN': - //case 'BIT': - // return 'L'; - - //case 'COUNTER': - // return 'R'; - - case 'INT': - case 'INTEGER': - case 'BIGINT': - case 'SMALLINT': - case 'I': - return 'I'; - - default: return 'N'; - } - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_mssql.inc.php deleted file mode 100755 index d270c50e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_mssql.inc.php +++ /dev/null @@ -1,306 +0,0 @@ -ADODB_odbc(); - //$this->curmode = SQL_CUR_USE_ODBC; - } - - // crashes php... - function ServerInfo() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $row = $this->GetRow("execute sp_server_info 2"); - $ADODB_FETCH_MODE = $save; - if (!is_array($row)) return false; - $arr['description'] = $row[2]; - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " ISNULL($field, $ifNull) "; // if MS SQL Server - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - - function MetaForeignKeys($table, $owner=false, $upper=false) - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $table = $this->qstr(strtoupper($table)); - - $sql = -"select object_name(constid) as constraint_name, - col_name(fkeyid, fkey) as column_name, - object_name(rkeyid) as referenced_table_name, - col_name(rkeyid, rkey) as referenced_column_name -from sysforeignkeys -where upper(object_name(fkeyid)) = $table -order by constraint_name, referenced_table_name, keyno"; - - $constraints =& $this->GetArray($sql); - - $ADODB_FETCH_MODE = $save; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; - } - if (!$arr) return false; - - $arr2 = false; - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) {$this->debug=1; - $save = $this->metaTablesSQL; - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " AND name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table) - { - $arr = ADOConnection::MetaColumns($table); - return $arr; - } - - - function &MetaIndexes($table,$primary=false) - { - $table = $this->qstr($table); - - $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, - CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, - CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique - FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id - INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid - INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid - WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table - ORDER BY O.name, I.Name, K.keyno"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - if (!$primary && $row[5]) continue; - - $indexes[$row[0]]['unique'] = $row[6]; - $indexes[$row[0]]['columns'][] = $row[1]; - } - return $indexes; - } - - function _query($sql,$inputarr) - { - if (is_string($sql)) $sql = str_replace('||','+',$sql); - return ADODB_odbc::_query($sql,$inputarr); - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - // "Stein-Aksel Basma" - // tested with MSSQL 2000 - function &MetaPrimaryKeys($table) - { - global $ADODB_FETCH_MODE; - - $schema = ''; - $this->_findschema($table,$schema); - //if (!$schema) $schema = $this->database; - if ($schema) $schema = "and k.table_catalog like '$schema%'"; - - $sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, - information_schema.table_constraints tc - where tc.constraint_name = k.constraint_name and tc.constraint_type = - 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position "; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $a = $this->GetCol($sql); - $ADODB_FETCH_MODE = $savem; - - if ($a && sizeof($a)>0) return $a; - $false = false; - return $false; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - if ($nrows > 0 && $offset <= 0) { - $sql = preg_replace( - '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql); - $rs =& $this->Execute($sql,$inputarr); - } else - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - - return $rs; - } - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yyyy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(quarter,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(day($col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - -} - -class ADORecordSet_odbc_mssql extends ADORecordSet_odbc { - - var $databaseType = 'odbc_mssql'; - - function ADORecordSet_odbc_mssql($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_oracle.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_oracle.inc.php deleted file mode 100755 index d9462f26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbc_oracle.inc.php +++ /dev/null @@ -1,115 +0,0 @@ -ADODB_odbc(); - } - - function &MetaTables() - { - $false = false; - $rs = $this->Execute($this->metaTablesSQL); - if ($rs === false) return $false; - $arr = $rs->GetArray(); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - $arr2[] = $arr[$i][0]; - } - $rs->Close(); - return $arr2; - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - if ($rs === false) { - $false = false; - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - - $php_errormsg = ''; - $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC ); - $this->_errorMsg = $php_errormsg; - - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'"); - //if ($this->_connectionID) odbc_autocommit($this->_connectionID,true); - return $this->_connectionID != false; - } - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - global $php_errormsg; - $php_errormsg = ''; - $this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC ); - $this->_errorMsg = $php_errormsg; - - $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'"); - //if ($this->_connectionID) odbc_autocommit($this->_connectionID,true); - return $this->_connectionID != false; - } -} - -class ADORecordSet_odbc_oracle extends ADORecordSet_odbc { - - var $databaseType = 'odbc_oracle'; - - function ADORecordSet_odbc_oracle($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp.inc.php deleted file mode 100755 index c1be3f49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp.inc.php +++ /dev/null @@ -1,743 +0,0 @@ - - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -define("_ADODB_ODBTP_LAYER", 2 ); - -class ADODB_odbtp extends ADOConnection{ - var $databaseType = "odbtp"; - var $dataProvider = "odbtp"; - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d, h:i:sA'"; - var $replaceQuote = "''"; // string to use to replace quotes - var $odbc_driver = 0; - var $hasAffectedRows = true; - var $hasInsertID = false; - var $hasGenID = true; - var $hasMoveFirst = true; - - var $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)"; - var $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'"; - var $_bindInputArray = false; - var $_useUnicodeSQL = false; - var $_canPrepareSP = false; - var $_dontPoolDBC = true; - - function ADODB_odbtp() - { - } - - function ServerInfo() - { - return array('description' => @odbtp_get_attr( ODB_ATTR_DBMSNAME, $this->_connectionID), - 'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID)); - } - - function ErrorMsg() - { - if (empty($this->_connectionID)) return @odbtp_last_error(); - return @odbtp_last_error($this->_connectionID); - } - - function ErrorNo() - { - if (empty($this->_connectionID)) return @odbtp_last_error_state(); - return @odbtp_last_error_state($this->_connectionID); - } - - function _insertid() - { - // SCOPE_IDENTITY() - // Returns the last IDENTITY value inserted into an IDENTITY column in - // the same scope. A scope is a module -- a stored procedure, trigger, - // function, or batch. Thus, two statements are in the same scope if - // they are in the same stored procedure, function, or batch. - return $this->GetOne($this->identitySQL); - } - - function _affectedrows() - { - if ($this->_queryID) { - return @odbtp_affected_rows ($this->_queryID); - } else - return 0; - } - - function CreateSequence($seqname='adodbseq',$start=1) - { - //verify existence - $num = $this->GetOne("select seq_value from adodb_seq"); - $seqtab='adodb_seq'; - if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) { - $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); - //if using vfp dbc file - if( !strcasecmp(strrchr($path, '.'), '.dbc') ) - $path = substr($path,0,strrpos($path,'\/')); - $seqtab = $path . '/' . $seqtab; - } - if($num == false) { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL ,$seqtab)); - } - $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seqname'"); - if ($num) { - return false; - } - $start -= 1; - return $this->Execute("insert into adodb_seq values('$seqname',$start)"); - } - - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - function GenID($seq='adodbseq',$start=1) - { - $seqtab='adodb_seq'; - if( $this->odbc_driver == ODB_DRIVER_FOXPRO) { - $path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID ); - //if using vfp dbc file - if( !strcasecmp(strrchr($path, '.'), '.dbc') ) - $path = substr($path,0,strrpos($path,'\/')); - $seqtab = $path . '/' . $seqtab; - } - $MAXLOOPS = 100; - while (--$MAXLOOPS>=0) { - $num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seq'"); - if ($num === false) { - //verify if abodb_seq table exist - $ok = $this->GetOne("select seq_value from adodb_seq "); - if(!$ok) { - //creating the sequence table adodb_seq - $this->Execute(sprintf($this->_genSeqSQL ,$seqtab)); - } - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into adodb_seq values('$seq',$start)"); - if (!$ok) return false; - } - $ok = $this->Execute("update adodb_seq set seq_value=seq_value+1 where seq_name='$seq'"); - if($ok) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - //example for $UserOrDSN - //for visual fox : DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=c:\YourDbfFileDir;EXCLUSIVE=NO; - //for visual fox dbc: DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBC;SOURCEDB=c:\YourDbcFileDir\mydb.dbc;EXCLUSIVE=NO; - //for access : DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\path_to_access_db\base_test.mdb;UID=root;PWD=; - //for mssql : DRIVER={SQL Server};SERVER=myserver;UID=myuid;PWD=mypwd;DATABASE=OdbtpTest; - //if uid & pwd can be separate - function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') - { - $this->_connectionID = odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase); - if ($this->_connectionID === false) { - $this->_errorMsg = $this->ErrorMsg() ; - return false; - } - - odbtp_convert_datetime($this->_connectionID,true); - - if ($this->_dontPoolDBC) { - if (function_exists('odbtp_dont_pool_dbc')) - @odbtp_dont_pool_dbc($this->_connectionID); - } - else { - $this->_dontPoolDBC = true; - } - $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID); - $dbms = strtolower(@odbtp_get_attr(ODB_ATTR_DBMSNAME, $this->_connectionID)); - $this->odbc_name = $dbms; - - // Account for inconsistent DBMS names - if( $this->odbc_driver == ODB_DRIVER_ORACLE ) - $dbms = 'oracle'; - else if( $this->odbc_driver == ODB_DRIVER_SYBASE ) - $dbms = 'sybase'; - - // Set DBMS specific attributes - switch( $dbms ) { - case 'microsoft sql server': - $this->databaseType = 'odbtp_mssql'; - $this->fmtDate = "'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d h:i:sA'"; - $this->sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; - $this->sysTimeStamp = 'GetDate()'; - $this->ansiOuter = true; - $this->leftOuter = '*='; - $this->rightOuter = '=*'; - $this->hasTop = 'top'; - $this->hasInsertID = true; - $this->hasTransactions = true; - $this->_bindInputArray = true; - $this->_canSelectDb = true; - $this->substr = "substring"; - $this->length = 'len'; - $this->identitySQL = 'select @@IDENTITY'; - $this->metaDatabasesSQL = "select name from master..sysdatabases where name <> 'master'"; - $this->_canPrepareSP = true; - break; - case 'access': - $this->databaseType = 'odbtp_access'; - $this->fmtDate = "#Y-m-d#"; - $this->fmtTimeStamp = "#Y-m-d h:i:sA#"; - $this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')"; - $this->sysTimeStamp = 'NOW'; - $this->hasTop = 'top'; - $this->hasTransactions = false; - $this->_canPrepareSP = true; // For MS Access only. - break; - case 'visual foxpro': - $this->databaseType = 'odbtp_vfp'; - $this->fmtDate = "{^Y-m-d}"; - $this->fmtTimeStamp = "{^Y-m-d, h:i:sA}"; - $this->sysDate = 'date()'; - $this->sysTimeStamp = 'datetime()'; - $this->ansiOuter = true; - $this->hasTop = 'top'; - $this->hasTransactions = false; - $this->replaceQuote = "'+chr(39)+'"; - $this->true = '.T.'; - $this->false = '.F.'; - - break; - case 'oracle': - $this->databaseType = 'odbtp_oci8'; - $this->fmtDate = "'Y-m-d 00:00:00'"; - $this->fmtTimeStamp = "'Y-m-d h:i:sA'"; - $this->sysDate = 'TRUNC(SYSDATE)'; - $this->sysTimeStamp = 'SYSDATE'; - $this->hasTransactions = true; - $this->_bindInputArray = true; - $this->concat_operator = '||'; - break; - case 'sybase': - $this->databaseType = 'odbtp_sybase'; - $this->fmtDate = "'Y-m-d'"; - $this->fmtTimeStamp = "'Y-m-d H:i:s'"; - $this->sysDate = 'GetDate()'; - $this->sysTimeStamp = 'GetDate()'; - $this->leftOuter = '*='; - $this->rightOuter = '=*'; - $this->hasInsertID = true; - $this->hasTransactions = true; - $this->identitySQL = 'select @@IDENTITY'; - break; - default: - $this->databaseType = 'odbtp'; - if( @odbtp_get_attr(ODB_ATTR_TXNCAPABLE, $this->_connectionID) ) - $this->hasTransactions = true; - else - $this->hasTransactions = false; - } - @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID ); - - if ($this->_useUnicodeSQL ) - @odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID); - - return true; - } - - function _pconnect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') - { - $this->_dontPoolDBC = false; - return $this->_connect($HostOrInterface, $UserOrDSN, $argPassword, $argDatabase); - } - - function SelectDB($dbName) - { - if (!@odbtp_select_db($dbName, $this->_connectionID)) { - return false; - } - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - return true; - } - - function &MetaTables($ttype='',$showSchema=false,$mask=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false); - - $arr =& $this->GetArray("||SQLTables||||$ttype"); - - if (isset($savefm)) $this->SetFetchMode($savefm); - $ADODB_FETCH_MODE = $savem; - - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3] == 'SYSTEM TABLE' ) continue; - if ($arr[$i][2]) - $arr2[] = $showSchema && $arr[$i][1]? $arr[$i][1].'.'.$arr[$i][2] : $arr[$i][2]; - } - return $arr2; - } - - function &MetaColumns($table,$upper=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - if ($upper) $table = strtoupper($table); - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false); - - $rs = $this->Execute( "||SQLColumns||$schema|$table" ); - - if (isset($savefm)) $this->SetFetchMode($savefm); - $ADODB_FETCH_MODE = $savem; - - if (!$rs || $rs->EOF) { - $false = false; - return $false; - } - $retarr = array(); - while (!$rs->EOF) { - //print_r($rs->fields); - if (strtoupper($rs->fields[2]) == $table) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[3]; - $fld->type = $rs->fields[5]; - $fld->max_length = $rs->fields[6]; - $fld->not_null = !empty($rs->fields[9]); - $fld->scale = $rs->fields[7]; - if (isset($rs->fields[12])) // vfp does not have field 12 - if (!is_null($rs->fields[12])) { - $fld->has_default = true; - $fld->default_value = $rs->fields[12]; - } - $retarr[strtoupper($fld->name)] = $fld; - } else if (!empty($retarr)) - break; - $rs->MoveNext(); - } - $rs->Close(); - - return $retarr; - } - - function &MetaPrimaryKeys($table, $owner='') - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $arr =& $this->GetArray("||SQLPrimaryKeys||$owner|$table"); - $ADODB_FETCH_MODE = $savem; - - //print_r($arr); - $arr2 = array(); - for ($i=0; $i < sizeof($arr); $i++) { - if ($arr[$i][3]) $arr2[] = $arr[$i][3]; - } - return $arr2; - } - - function &MetaForeignKeys($table, $owner='', $upper=false) - { - global $ADODB_FETCH_MODE; - - $savem = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $constraints =& $this->GetArray("||SQLForeignKeys|||||$owner|$table"); - $ADODB_FETCH_MODE = $savem; - - $arr = false; - foreach($constraints as $constr) { - //print_r($constr); - $arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3]; - } - if (!$arr) { - $false = false; - return $false; - } - - $arr2 = array(); - - foreach($arr as $k => $v) { - foreach($v as $a => $b) { - if ($upper) $a = strtoupper($a); - $arr2[$a] = $b; - } - } - return $arr2; - } - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->autoCommit = false; - if (defined('ODB_TXN_DEFAULT')) - $txn = ODB_TXN_DEFAULT; - else - $txn = ODB_TXN_READUNCOMMITTED; - $rs = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS,$txn,$this->_connectionID); - if(!$rs) return false; - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->autoCommit = true; - if( ($ret = @odbtp_commit($this->_connectionID)) ) - $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off - return $ret; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->autoCommit = true; - if( ($ret = @odbtp_rollback($this->_connectionID)) ) - $ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off - return $ret; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - // TOP requires ORDER BY for Visual FoxPro - if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) { - if (!preg_match('/ORDER[ \t\r\n]+BY/is',$sql)) $sql .= ' ORDER BY 1'; - } - $ret =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function Prepare($sql) - { - if (! $this->_bindInputArray) return $sql; // no binding - $stmt = @odbtp_prepare($sql,$this->_connectionID); - if (!$stmt) { - // print "Prepare Error for ($sql) ".$this->ErrorMsg()."
    "; - return $sql; - } - return array($sql,$stmt,false); - } - - function PrepareSP($sql) - { - if (!$this->_canPrepareSP) return $sql; // Can't prepare procedures - - $stmt = @odbtp_prepare_proc($sql,$this->_connectionID); - if (!$stmt) return false; - return array($sql,$stmt); - } - - /* - Usage: - $stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group - - # note that the parameter does not have @ in front! - $db->Parameter($stmt,$id,'myid'); - $db->Parameter($stmt,$group,'group',false,64); - $db->Parameter($stmt,$group,'photo',false,100000,ODB_BINARY); - $db->Execute($stmt); - - @param $stmt Statement returned by Prepare() or PrepareSP(). - @param $var PHP variable to bind to. Can set to null (for isNull support). - @param $name Name of stored procedure variable name to bind to. - @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in odbtp. - @param [$maxLen] Holds an maximum length of the variable. - @param [$type] The data type of $var. Legal values depend on driver. - - See odbtp_attach_param documentation at http://odbtp.sourceforge.net. - */ - function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0) - { - if ( $this->odbc_driver == ODB_DRIVER_JET ) { - $name = '['.$name.']'; - if( !$type && $this->_useUnicodeSQL - && @odbtp_param_bindtype($stmt[1], $name) == ODB_CHAR ) - { - $type = ODB_WCHAR; - } - } - else { - $name = '@'.$name; - } - return @odbtp_attach_param($stmt[1], $name, $var, $type, $maxLen); - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - - function UpdateBlob($table,$column,$val,$where,$blobtype='image') - { - $sql = "UPDATE $table SET $column = ? WHERE $where"; - if( !($stmt = @odbtp_prepare($sql, $this->_connectionID)) ) - return false; - if( !@odbtp_input( $stmt, 1, ODB_BINARY, 1000000, $blobtype ) ) - return false; - if( !@odbtp_set( $stmt, 1, $val ) ) - return false; - return @odbtp_execute( $stmt ) != false; - } - - function IfNull( $field, $ifNull ) - { - switch( $this->odbc_driver ) { - case ODB_DRIVER_MSSQL: - return " ISNULL($field, $ifNull) "; - case ODB_DRIVER_JET: - return " IIF(IsNull($field), $ifNull, $field) "; - } - return " CASE WHEN $field is null THEN $ifNull ELSE $field END "; - } - - function _query($sql,$inputarr=false) - { - global $php_errormsg; - - if ($inputarr) { - if (is_array($sql)) { - $stmtid = $sql[1]; - } else { - $stmtid = @odbtp_prepare($sql,$this->_connectionID); - if ($stmtid == false) { - $this->_errorMsg = $php_errormsg; - return false; - } - } - $num_params = @odbtp_num_params( $stmtid ); - for( $param = 1; $param <= $num_params; $param++ ) { - @odbtp_input( $stmtid, $param ); - @odbtp_set( $stmtid, $param, $inputarr[$param-1] ); - } - if (!@odbtp_execute($stmtid) ) { - return false; - } - } else if (is_array($sql)) { - $stmtid = $sql[1]; - if (!@odbtp_execute($stmtid)) { - return false; - } - } else { - $stmtid = odbtp_query($sql,$this->_connectionID); - } - $this->_lastAffectedRows = 0; - if ($stmtid) { - $this->_lastAffectedRows = @odbtp_affected_rows($stmtid); - } - return $stmtid; - } - - function _close() - { - $ret = @odbtp_close($this->_connectionID); - $this->_connectionID = false; - return $ret; - } -} - -class ADORecordSet_odbtp extends ADORecordSet { - - var $databaseType = 'odbtp'; - var $canSeek = true; - - function ADORecordSet_odbtp($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function _initrs() - { - $this->_numOfFields = @odbtp_num_fields($this->_queryID); - if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID))) - $this->_numOfRows = -1; - - if (!$this->connection->_useUnicodeSQL) return; - - if ($this->connection->odbc_driver == ODB_DRIVER_JET) { - if (!@odbtp_get_attr(ODB_ATTR_MAPCHARTOWCHAR, - $this->connection->_connectionID)) - { - for ($f = 0; $f < $this->_numOfFields; $f++) { - if (@odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR) - @odbtp_bind_field($this->_queryID, $f, ODB_WCHAR); - } - } - } - } - - function &FetchField($fieldOffset = 0) - { - $off=$fieldOffset; // offsets begin at 0 - $o= new ADOFieldObject(); - $o->name = @odbtp_field_name($this->_queryID,$off); - $o->type = @odbtp_field_type($this->_queryID,$off); - $o->max_length = @odbtp_field_length($this->_queryID,$off); - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - function _seek($row) - { - return @odbtp_data_seek($this->_queryID, $row); - } - - function fields($colname) - { - if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $name = @odbtp_field_name( $this->_queryID, $i ); - $this->bind[strtoupper($name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _fetch_odbtp($type=0) - { - switch ($this->fetchMode) { - case ADODB_FETCH_NUM: - $this->fields = @odbtp_fetch_row($this->_queryID, $type); - break; - case ADODB_FETCH_ASSOC: - $this->fields = @odbtp_fetch_assoc($this->_queryID, $type); - break; - default: - $this->fields = @odbtp_fetch_array($this->_queryID, $type); - } - if ($this->databaseType = 'odbtp_vfp') { - if ($this->fields) - foreach($this->fields as $k => $v) { - if (strncmp($v,'1899-12-30',10) == 0) $this->fields[$k] = ''; - } - } - return is_array($this->fields); - } - - function _fetch() - { - return $this->_fetch_odbtp(); - } - - function MoveFirst() - { - if (!$this->_fetch_odbtp(ODB_FETCH_FIRST)) return false; - $this->EOF = false; - $this->_currentRow = 0; - return true; - } - - function MoveLast() - { - if (!$this->_fetch_odbtp(ODB_FETCH_LAST)) return false; - $this->EOF = false; - $this->_currentRow = $this->_numOfRows - 1; - return true; - } - - function NextRecordSet() - { - if (!@odbtp_next_result($this->_queryID)) return false; - $this->_inited = false; - $this->bind = false; - $this->_currentRow = -1; - $this->Init(); - return true; - } - - function _close() - { - return @odbtp_free_query($this->_queryID); - } -} - -class ADORecordSet_odbtp_mssql extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_mssql'; - - function ADORecordSet_odbtp_mssql($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_access extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_access'; - - function ADORecordSet_odbtp_access($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_vfp extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_vfp'; - - function ADORecordSet_odbtp_vfp($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_oci8 extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_oci8'; - - function ADORecordSet_odbtp_oci8($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} - -class ADORecordSet_odbtp_sybase extends ADORecordSet_odbtp { - - var $databaseType = 'odbtp_sybase'; - - function ADORecordSet_odbtp_sybase($id,$mode=false) - { - return $this->ADORecordSet_odbtp($id,$mode); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp_unicode.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp_unicode.inc.php deleted file mode 100755 index 0e8808bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-odbtp_unicode.inc.php +++ /dev/null @@ -1,39 +0,0 @@ - - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -/* - Because the ODBTP server sends and reads UNICODE text data using UTF-8 - encoding, the following HTML meta tag must be included within the HTML - head section of every HTML form and script page: - - - - Also, all SQL query strings must be submitted as UTF-8 encoded text. -*/ - -if (!defined('_ADODB_ODBTP_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbtp.inc.php"); -} - -class ADODB_odbtp_unicode extends ADODB_odbtp { - var $databaseType = 'odbtp'; - var $_useUnicodeSQL = true; - - function ADODB_odbtp_unicode() - { - $this->ADODB_odbtp(); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oracle.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oracle.inc.php deleted file mode 100755 index a04b41a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-oracle.inc.php +++ /dev/null @@ -1,338 +0,0 @@ -fmtDate,$d).",'YYYY-MM-DD')"; - } - - // format and return date string in database timestamp format - function DBTimeStamp($ts) - { - - if (is_string($ts)) $d = ADORecordSet::UnixTimeStamp($ts); - return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')"; - } - - - function BindDate($d) - { - $d = ADOConnection::DBDate($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - function BindTimeStamp($d) - { - $d = ADOConnection::DBTimeStamp($d); - if (strncmp($d,"'",1)) return $d; - - return substr($d,1,strlen($d)-2); - } - - - - function BeginTrans() - { - $this->autoCommit = false; - ora_commitoff($this->_connectionID); - return true; - } - - - function CommitTrans($ok=true) - { - if (!$ok) return $this->RollbackTrans(); - $ret = ora_commit($this->_connectionID); - ora_commiton($this->_connectionID); - return $ret; - } - - - function RollbackTrans() - { - $ret = ora_rollback($this->_connectionID); - ora_commiton($this->_connectionID); - return $ret; - } - - - /* there seems to be a bug in the oracle extension -- always returns ORA-00000 - no error */ - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - - if (is_resource($this->_curs)) $this->_errorMsg = @ora_error($this->_curs); - if (empty($this->_errorMsg)) $this->_errorMsg = @ora_error($this->_connectionID); - return $this->_errorMsg; - } - - - function ErrorNo() - { - if ($this->_errorCode !== false) return $this->_errorCode; - - if (is_resource($this->_curs)) $this->_errorCode = @ora_errorcode($this->_curs); - if (empty($this->_errorCode)) $this->_errorCode = @ora_errorcode($this->_connectionID); - return $this->_errorCode; - } - - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename, $mode=0) - { - if (!function_exists('ora_plogon')) return null; - - // Reset error messages before connecting - $this->_errorMsg = false; - $this->_errorCode = false; - - // G. Giunta 2003/08/13 - This looks danegrously suspicious: why should we want to set - // the oracle home to the host name of remote DB? -// if ($argHostname) putenv("ORACLE_HOME=$argHostname"); - - if($argHostname) { // code copied from version submitted for oci8 by Jorma Tuomainen - if (empty($argDatabasename)) $argDatabasename = $argHostname; - else { - if(strpos($argHostname,":")) { - $argHostinfo=explode(":",$argHostname); - $argHostname=$argHostinfo[0]; - $argHostport=$argHostinfo[1]; - } else { - $argHostport="1521"; - } - - - if ($this->connectSID) { - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))"; - } else - $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname - .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))"; - } - - } - - if ($argDatabasename) $argUsername .= "@$argDatabasename"; - - //if ($argHostname) print "

    Connect: 1st argument should be left blank for $this->databaseType

    "; - if ($mode = 1) - $this->_connectionID = ora_plogon($argUsername,$argPassword); - else - $this->_connectionID = ora_logon($argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($this->autoCommit) ora_commiton($this->_connectionID); - if ($this->_initdate) { - $rs = $this->_query("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'"); - if ($rs) ora_close($rs); - } - - return true; - } - - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, 1); - } - - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr=false) - { - // Reset error messages before executing - $this->_errorMsg = false; - $this->_errorCode = false; - - $curs = ora_open($this->_connectionID); - - if ($curs === false) return false; - $this->_curs = $curs; - if (!ora_parse($curs,$sql)) return false; - if (ora_exec($curs)) return $curs; - // before we close the cursor, we have to store the error message - // that we can obtain ONLY from the cursor (and not from the connection) - $this->_errorCode = @ora_errorcode($curs); - $this->_errorMsg = @ora_error($curs); - // - @ora_close($curs); - return false; - } - - - // returns true or false - function _close() - { - return @ora_logoff($this->_connectionID); - } - - - -} - - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_oracle extends ADORecordSet { - - var $databaseType = "oracle"; - var $bind = false; - - function ADORecordset_oracle($queryID,$mode=false) - { - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->fetchMode = $mode; - - $this->_queryID = $queryID; - - $this->_inited = true; - $this->fields = array(); - if ($queryID) { - $this->_currentRow = 0; - $this->EOF = !$this->_fetch(); - @$this->_initrs(); - } else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - - return $this->_queryID; - } - - - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fld->name = ora_columnname($this->_queryID, $fieldOffset); - $fld->type = ora_columntype($this->_queryID, $fieldOffset); - $fld->max_length = ora_columnsize($this->_queryID, $fieldOffset); - return $fld; - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _initrs() - { - $this->_numOfRows = -1; - $this->_numOfFields = @ora_numcols($this->_queryID); - } - - - function _seek($row) - { - return false; - } - - function _fetch($ignore_fields=false) { -// should remove call by reference, but ora_fetch_into requires it in 4.0.3pl1 - if ($this->fetchMode & ADODB_FETCH_ASSOC) - return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC); - else - return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS); - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - - function _close() -{ - return @ora_close($this->_queryID); - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - - switch (strtoupper($t)) { - case 'VARCHAR': - case 'VARCHAR2': - case 'CHAR': - case 'VARBINARY': - case 'BINARY': - if ($len <= $this->blobSize) return 'C'; - case 'LONG': - case 'LONG VARCHAR': - case 'CLOB': - return 'X'; - case 'LONG RAW': - case 'LONG VARBINARY': - case 'BLOB': - return 'B'; - - case 'DATE': return 'D'; - - //case 'T': return 'T'; - - case 'BIT': return 'L'; - case 'INT': - case 'SMALLINT': - case 'INTEGER': return 'I'; - default: return 'N'; - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo.inc.php deleted file mode 100755 index 4d753f7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo.inc.php +++ /dev/null @@ -1,569 +0,0 @@ -_bindInputArray = true; - #$parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); - } - - function ServerInfo() - { - return ADOConnection::ServerInfo(); - } - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function MetaTables() - { - return false; - } - - function MetaColumns() - { - return false; - } -} - - -class ADODB_pdo extends ADOConnection { - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - var $fmtDate = "'Y-m-d'"; - var $fmtTimeStamp = "'Y-m-d, h:i:sA'"; - var $replaceQuote = "''"; // string to use to replace quotes - var $hasAffectedRows = true; - var $_bindInputArray = true; - var $_genSeqSQL = "create table %s (id integer)"; - var $_autocommit = true; - var $_haserrorfunctions = true; - var $_lastAffectedRows = 0; - - var $_errormsg = false; - var $_errorno = false; - - var $dsnType = ''; - var $stmt = false; - - function ADODB_pdo() - { - } - - function _UpdatePDO() - { - $d = &$this->_driver; - $this->fmtDate = $d->fmtDate; - $this->fmtTimeStamp = $d->fmtTimeStamp; - $this->replaceQuote = $d->replaceQuote; - $this->sysDate = $d->sysDate; - $this->sysTimeStamp = $d->sysTimeStamp; - $this->random = $d->random; - $this->concat_operator = $d->concat_operator; - $this->nameQuote = $d->nameQuote; - - $this->hasGenID = $d->hasGenID; - $this->_genIDSQL = $d->_genIDSQL; - $this->_genSeqSQL = $d->_genSeqSQL; - $this->_dropSeqSQL = $d->_dropSeqSQL; - - $d->_init($this); - } - - function Time() - { - if (!empty($this->_driver->_hasdual)) $sql = "select $this->sysTimeStamp from dual"; - else $sql = "select $this->sysTimeStamp"; - - $rs =& $this->_Execute($sql); - if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); - - return false; - } - - // returns true or false - function _connect($argDSN, $argUsername, $argPassword, $argDatabasename, $persist=false) - { - $at = strpos($argDSN,':'); - $this->dsnType = substr($argDSN,0,$at); - - if ($argDatabasename) { - $argDSN .= ';dbname='.$argDatabasename; - } - try { - $this->_connectionID = new PDO($argDSN, $argUsername, $argPassword); - } catch (Exception $e) { - $this->_connectionID = false; - $this->_errorno = -1; - //var_dump($e); - $this->_errormsg = 'Connection attempt failed: '.$e->getMessage(); - return false; - } - - if ($this->_connectionID) { - switch(ADODB_ASSOC_CASE){ - case 0: $m = PDO::CASE_LOWER; break; - case 1: $m = PDO::CASE_UPPER; break; - default: - case 2: $m = PDO::CASE_NATURAL; break; - } - - //$this->_connectionID->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_SILENT ); - $this->_connectionID->setAttribute(PDO::ATTR_CASE,$m); - - $class = 'ADODB_pdo_'.$this->dsnType; - //$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - switch($this->dsnType) { - case 'oci': - case 'mysql': - case 'pgsql': - case 'mssql': - include_once(ADODB_DIR.'/drivers/adodb-pdo_'.$this->dsnType.'.inc.php'); - break; - } - if (class_exists($class)) - $this->_driver = new $class(); - else - $this->_driver = new ADODB_pdo_base(); - - $this->_driver->_connectionID = $this->_connectionID; - $this->_UpdatePDO(); - return true; - } - $this->_driver = new ADODB_pdo_base(); - return false; - } - - // returns true or false - function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename) - { - return $this->_connect($argDSN, $argUsername, $argPassword, $argDatabasename, true); - } - - /*------------------------------------------------------------------------------*/ - - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $save = $this->_driver->fetchMode; - $this->_driver->fetchMode = $this->fetchMode; - $this->_driver->debug = $this->debug; - $ret = $this->_driver->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - $this->_driver->fetchMode = $save; - return $ret; - } - - - function ServerInfo() - { - return $this->_driver->ServerInfo(); - } - - function MetaTables($ttype=false,$showSchema=false,$mask=false) - { - return $this->_driver->MetaTables($ttype,$showSchema,$mask); - } - - function MetaColumns($table,$normalize=true) - { - return $this->_driver->MetaColumns($table,$normalize); - } - - function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) - { - $obj = $stmt[1]; - if ($type) $obj->bindParam($name,$var,$type,$maxLen); - else $obj->bindParam($name, $var); - } - - - function ErrorMsg() - { - if ($this->_errormsg !== false) return $this->_errormsg; - if (!empty($this->_stmt)) $arr = $this->_stmt->errorInfo(); - else if (!empty($this->_connectionID)) $arr = $this->_connectionID->errorInfo(); - else return 'No Connection Established'; - - - if ($arr) { - if (sizeof($arr)<2) return ''; - if ((integer)$arr[1]) return $arr[2]; - else return ''; - } else return '-1'; - } - - - function ErrorNo() - { - if ($this->_errorno !== false) return $this->_errorno; - if (!empty($this->_stmt)) $err = $this->_stmt->errorCode(); - else if (!empty($this->_connectionID)) { - $arr = $this->_connectionID->errorInfo(); - if (isset($arr[0])) $err = $arr[0]; - else $err = -1; - } else - return 0; - - if ($err == '00000') return 0; // allows empty check - return $err; - } - - function BeginTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - $this->transCnt += 1; - $this->_autocommit = false; - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,false); - return $this->_connectionID->beginTransaction(); - } - - function CommitTrans($ok=true) - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - - $ret = $this->_connectionID->commit(); - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - return $ret; - } - - function RollbackTrans() - { - if (!$this->hasTransactions) return false; - if ($this->transOff) return true; - if ($this->transCnt) $this->transCnt -= 1; - $this->_autocommit = true; - - $ret = $this->_connectionID->rollback(); - $this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true); - return $ret; - } - - function Prepare($sql) - { - $this->_stmt = $this->_connectionID->prepare($sql); - if ($this->_stmt) return array($sql,$this->_stmt); - - return false; - } - - function PrepareStmt($sql) - { - $stmt = $this->_connectionID->prepare($sql); - if (!$stmt) return false; - $obj = new ADOPDOStatement($stmt,$this); - return $obj; - } - - - /* returns queryID or false */ - function _query($sql,$inputarr=false) - { - if (is_array($sql)) { - $stmt = $sql[1]; - } else { - $stmt = $this->_connectionID->prepare($sql); - } - #adodb_backtrace(); - #var_dump($this->_bindInputArray); - if ($stmt) { - $this->_driver->debug = $this->debug; - if ($inputarr) $ok = $stmt->execute($inputarr); - else $ok = $stmt->execute(); - } - - - $this->_errormsg = false; - $this->_errorno = false; - - if ($ok) { - $this->_stmt = $stmt; - return $stmt; - } - - if ($stmt) { - - $arr = $stmt->errorinfo(); - if ((integer)$arr[1]) { - $this->_errormsg = $arr[2]; - $this->_errorno = $arr[1]; - } - - } else { - $this->_errormsg = false; - $this->_errorno = false; - } - return false; - } - - // returns true or false - function _close() - { - $this->_stmt = false; - return true; - } - - function _affectedrows() - { - return ($this->_stmt) ? $this->_stmt->rowCount() : 0; - } - - function _insertid() - { - return ($this->_connectionID) ? $this->_connectionID->lastInsertId() : 0; - } -} - -class ADOPDOStatement { - - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - var $_stmt; - var $_connectionID; - - function ADOPDOStatement($stmt,$connection) - { - $this->_stmt = $stmt; - $this->_connectionID = $connection; - } - - function Execute($inputArr=false) - { - $savestmt = $this->_connectionID->_stmt; - $rs = $this->_connectionID->Execute(array(false,$this->_stmt),$inputArr); - $this->_connectionID->_stmt = $savestmt; - return $rs; - } - - function InParameter(&$var,$name,$maxLen=4000,$type=false) - { - - if ($type) $this->_stmt->bindParam($name,$var,$type,$maxLen); - else $this->_stmt->bindParam($name, $var); - } - - function Affected_Rows() - { - return ($this->_stmt) ? $this->_stmt->rowCount() : 0; - } - - function ErrorMsg() - { - if ($this->_stmt) $arr = $this->_stmt->errorInfo(); - else $arr = $this->_connectionID->errorInfo(); - - if (is_array($arr)) { - if ((integer) $arr[0] && isset($arr[2])) return $arr[2]; - else return ''; - } else return '-1'; - } - - function NumCols() - { - return ($this->_stmt) ? $this->_stmt->columnCount() : 0; - } - - function ErrorNo() - { - if ($this->_stmt) return $this->_stmt->errorCode(); - else return $this->_connectionID->errorInfo(); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_pdo extends ADORecordSet { - - var $bind = false; - var $databaseType = "pdo"; - var $dataProvider = "pdo"; - - function ADORecordSet_pdo($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - $this->adodbFetchMode = $mode; - switch($mode) { - case ADODB_FETCH_NUM: $mode = PDO::FETCH_NUM; break; - case ADODB_FETCH_ASSOC: $mode = PDO::FETCH_ASSOC; break; - - case ADODB_FETCH_BOTH: - default: $mode = PDO::FETCH_BOTH; break; - } - $this->fetchMode = $mode; - - $this->_queryID = $id; - $this->ADORecordSet($id); - } - - - function Init() - { - if ($this->_inited) return; - $this->_inited = true; - if ($this->_queryID) @$this->_initrs(); - else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - } - if ($this->_numOfRows != 0 && $this->_currentRow == -1) { - $this->_currentRow = 0; - if ($this->EOF = ($this->_fetch() === false)) { - $this->_numOfRows = 0; // _numOfRows could be -1 - } - } else { - $this->EOF = true; - } - } - - function _initrs() - { - global $ADODB_COUNTRECS; - - $this->_numOfRows = ($ADODB_COUNTRECS) ? @$this->_queryID->rowCount() : -1; - if (!$this->_numOfRows) $this->_numOfRows = -1; - $this->_numOfFields = $this->_queryID->columnCount(); - } - - // returns the field object - function &FetchField($fieldOffset = -1) - { - $off=$fieldOffset+1; // offsets begin at 1 - - $o= new ADOFieldObject(); - $arr = @$this->_queryID->getColumnMeta($fieldOffset); - if (!$arr) { - $o->name = 'bad getColumnMeta()'; - $o->max_length = -1; - $o->type = 'VARCHAR'; - $o->precision = 0; - # $false = false; - return $o; - } - //adodb_pr($arr); - $o->name = $arr['name']; - if (isset($arr['native_type']) && $arr['native_type'] <> "null") $o->type = $arr['native_type']; - else $o->type = adodb_pdo_type($arr['pdo_type']); - $o->max_length = $arr['len']; - $o->precision = $arr['precision']; - - if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name); - else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name); - return $o; - } - - function _seek($row) - { - return false; - } - - function _fetch() - { - if (!$this->_queryID) return false; - - $this->fields = $this->_queryID->fetch($this->fetchMode); - return !empty($this->fields); - } - - function _close() - { - $this->_queryID = false; - } - - function Fields($colname) - { - if ($this->adodbFetchMode != ADODB_FETCH_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mssql.inc.php deleted file mode 100755 index b5599966..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mssql.inc.php +++ /dev/null @@ -1,61 +0,0 @@ -hasTransactions = false; ## <<< BUG IN PDO mssql driver - $parentDriver->_bindInputArray = false; - $parentDriver->hasInsertID = true; - } - - function ServerInfo() - { - return ADOConnection::ServerInfo(); - } - - function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET TRANSACTION ".$transaction_mode); - } - - function MetaTables() - { - return false; - } - - function MetaColumns() - { - return false; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mysql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mysql.inc.php deleted file mode 100755 index 37309fe0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_mysql.inc.php +++ /dev/null @@ -1,168 +0,0 @@ -hasTransactions = false; - $parentDriver->_bindInputArray = false; - $parentDriver->hasInsertID = true; - $parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); - } - - // dayFraction is a day in floating point - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - - $fraction = $dayFraction * 24 * 3600; - return $date . ' + INTERVAL ' . $fraction.' SECOND'; - -// return "from_unixtime(unix_timestamp($date)+$fraction)"; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $save = $this->metaTablesSQL; - if ($showSchema && is_string($showSchema)) { - $this->metaTablesSQL .= " from $showSchema"; - } - - if ($mask) { - $mask = $this->qstr($mask); - $this->metaTablesSQL .= " like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - $this->metaTablesSQL = $save; - return $ret; - } - - function SetTransactionMode( $transaction_mode ) - { - $this->_transmode = $transaction_mode; - if (empty($transaction_mode)) { - $this->Execute('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ'); - return; - } - if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; - $this->Execute("SET SESSION TRANSACTION ".$transaction_mode); - } - - function &MetaColumns($table) - { - $this->_findschema($table,$schema); - if ($schema) { - $dbName = $this->database; - $this->SelectDB($schema); - } - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - - if ($schema) { - $this->SelectDB($dbName); - } - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!is_object($rs)) { - $false = false; - return $false; - } - - $retarr = array(); - while (!$rs->EOF){ - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $type = $rs->fields[1]; - - // split type into type(length): - $fld->scale = null; - if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1; - } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) { - $fld->type = $query_array[1]; - $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1; - } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) { - $fld->type = $query_array[1]; - $arr = explode(",",$query_array[2]); - $fld->enums = $arr; - $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6 - $fld->max_length = ($zlen > 0) ? $zlen : 1; - } else { - $fld->type = $type; - $fld->max_length = -1; - } - $fld->not_null = ($rs->fields[2] != 'YES'); - $fld->primary_key = ($rs->fields[3] == 'PRI'); - $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false); - $fld->binary = (strpos($type,'blob') !== false); - $fld->unsigned = (strpos($type,'unsigned') !== false); - - if (!$fld->binary) { - $d = $rs->fields[4]; - if ($d != '' && $d != 'NULL') { - $fld->has_default = true; - $fld->default_value = $d; - } else { - $fld->has_default = false; - } - } - - if ($save == ADODB_FETCH_NUM) { - $retarr[] = $fld; - } else { - $retarr[strtoupper($fld->name)] = $fld; - } - $rs->MoveNext(); - } - - $rs->Close(); - return $retarr; - } - - - // parameters use PostgreSQL convention, not MySQL - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0) - { - $offsetStr =($offset>=0) ? "$offset," : ''; - // jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220 - if ($nrows < 0) $nrows = '18446744073709551615'; - - if ($secs) - $rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr$nrows",$inputarr); - else - $rs =& $this->Execute($sql." LIMIT $offsetStr$nrows",$inputarr); - return $rs; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_oci.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_oci.inc.php deleted file mode 100755 index dddf006b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_oci.inc.php +++ /dev/null @@ -1,93 +0,0 @@ -_bindInputArray = true; - $parentDriver->_nestedSQL = true; - if ($this->_initdate) { - $parentDriver->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'"); - } - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtoupper($mask)); - $this->metaTablesSQL .= " AND table_name like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table) - { - global $ADODB_FETCH_MODE; - - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); - - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - if (!$rs) { - return $false; - } - $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->scale = $rs->fields[3]; - if ($rs->fields[1] == 'NUMBER' && $rs->fields[3] == 0) { - $fld->type ='INT'; - $fld->max_length = $rs->fields[4]; - } - $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0); - $fld->binary = (strpos($fld->type,'BLOB') !== false); - $fld->default_value = $rs->fields[6]; - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_pgsql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_pgsql.inc.php deleted file mode 100755 index 92b108db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-pdo_pgsql.inc.php +++ /dev/null @@ -1,230 +0,0 @@ - 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // used when schema defined - var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum -FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n -WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) - and c.relnamespace=n.oid and n.nspname='%s' - and a.attname not like '....%%' AND a.attnum > 0 - AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // get primary key etc -- from Freek Dijkstra - var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key - FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"; - - var $hasAffectedRows = true; - var $hasLimit = false; // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - // below suggested by Freek Dijkstra - var $true = 't'; // string that represents TRUE for a database - var $false = 'f'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $hasMoveFirst = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT NEXTVAL('%s')"; - var $_genSeqSQL = "CREATE SEQUENCE %s START %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum"; - var $random = 'random()'; /// random function - var $concat_operator='||'; - - function _init($parentDriver) - { - - $parentDriver->hasTransactions = false; ## <<< BUG IN PDO pgsql driver - $parentDriver->hasInsertID = true; - $parentDriver->_nestedSQL = true; - } - - function ServerInfo() - { - $arr['description'] = ADOConnection::GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - return $arr; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; - $limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ''; - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $info = $this->ServerInfo(); - if ($info['version'] >= 7.3) { - $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and schemaname not in ( 'pg_catalog','information_schema') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; - } - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtolower($mask)); - if ($info['version']>=7.3) - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') - union -select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; - else - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask - union -select viewname,'V' from pg_views where viewname like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - - if ($normalize) $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema)); - else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) { - $false = false; - return $false; - } - if (!empty($this->metaKeySQL)) { - // If we want the primary keys, we have to issue a separate query - // Of course, a modified version of the metaColumnsSQL query using a - // LEFT JOIN would have been much more elegant, but postgres does - // not support OUTER JOINS. So here is the clumsy way. - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rskey = $this->Execute(sprintf($this->metaKeySQL,($table))); - // fetch all result in once for performance. - $keys =& $rskey->GetArray(); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - $rskey->Close(); - unset($rskey); - } - - $rsdefa = array(); - if (!empty($this->metaDefaultsSQL)) { - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $sql = sprintf($this->metaDefaultsSQL, ($table)); - $rsdef = $this->Execute($sql); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rsdef) { - while (!$rsdef->EOF) { - $num = $rsdef->fields['num']; - $s = $rsdef->fields['def']; - if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */ - $s = substr($s, 1); - $s = substr($s, 0, strlen($s) - 1); - } - - $rsdefa[$num] = $s; - $rsdef->MoveNext(); - } - } else { - ADOConnection::outp( "==> SQL => " . $sql); - } - unset($rsdef); - } - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; - if ($fld->max_length <= 0) $fld->max_length = -1; - if ($fld->type == 'numeric') { - $fld->scale = $fld->max_length & 0xFFFF; - $fld->max_length >>= 16; - } - // dannym - // 5 hasdefault; 6 num-of-column - $fld->has_default = ($rs->fields[5] == 't'); - if ($fld->has_default) { - $fld->default_value = $rsdefa[$rs->fields[6]]; - } - - //Freek - if ($rs->fields[4] == $this->true) { - $fld->not_null = true; - } - - // Freek - if (is_array($keys)) { - foreach($keys as $key) { - if ($fld->name == $key['column_name'] AND $key['primary_key'] == $this->true) - $fld->primary_key = true; - if ($fld->name == $key['column_name'] AND $key['unique_key'] == $this->true) - $fld->unique = true; // What name is more compatible? - } - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) { - $false = false; - return $false; - } else return $retarr; - - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres.inc.php deleted file mode 100755 index 7d0cff1a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres.inc.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres64.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres64.inc.php deleted file mode 100755 index 9d99a241..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres64.inc.php +++ /dev/null @@ -1,1064 +0,0 @@ - - jlim - changed concat operator to || and data types to MetaType to match documented pgsql types - see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm - 22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" - 27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" - 15 Dec 2000 jlim - added changes suggested by Additional code changes by "Eric G. Werk" egw@netguide.dk. - 31 Jan 2002 jlim - finally installed postgresql. testing - 01 Mar 2001 jlim - Freek Dijkstra changes, also support for text type - - See http://www.varlena.com/varlena/GeneralBits/47.php - - -- What indexes are on my table? - select * from pg_indexes where tablename = 'tablename'; - - -- What triggers are on my table? - select c.relname as "Table", t.tgname as "Trigger Name", - t.tgconstrname as "Constraint Name", t.tgenabled as "Enabled", - t.tgisconstraint as "Is Constraint", cc.relname as "Referenced Table", - p.proname as "Function Name" - from pg_trigger t, pg_class c, pg_class cc, pg_proc p - where t.tgfoid = p.oid and t.tgrelid = c.oid - and t.tgconstrrelid = cc.oid - and c.relname = 'tablename'; - - -- What constraints are on my table? - select r.relname as "Table", c.conname as "Constraint Name", - contype as "Constraint Type", conkey as "Key Columns", - confkey as "Foreign Columns", consrc as "Source" - from pg_class r, pg_constraint c - where r.oid = c.conrelid - and relname = 'tablename'; - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -function adodb_addslashes($s) -{ - $len = strlen($s); - if ($len == 0) return "''"; - if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted - - return "'".addslashes($s)."'"; -} - -class ADODB_postgres64 extends ADOConnection{ - var $databaseType = 'postgres64'; - var $dataProvider = 'postgres'; - var $hasInsertID = true; - var $_resultid = false; - var $concat_operator='||'; - var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1"; - var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages', - 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%'"; - //"select tablename from pg_tables where tablename not like 'pg_%' order by 1"; - var $isoDates = true; // accepts dates in ISO format - var $sysDate = "CURRENT_DATE"; - var $sysTimeStamp = "CURRENT_TIMESTAMP"; - var $blobEncodeType = 'C'; - var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum - FROM pg_class c, pg_attribute a,pg_type t - WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%' -AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // used when schema defined - var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum -FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n -WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) - and c.relnamespace=n.oid and n.nspname='%s' - and a.attname not like '....%%' AND a.attnum > 0 - AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; - - // get primary key etc -- from Freek Dijkstra - var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key - FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"; - - var $hasAffectedRows = true; - var $hasLimit = false; // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10 - // below suggested by Freek Dijkstra - var $true = 'TRUE'; // string that represents TRUE for a database - var $false = 'FALSE'; // string that represents FALSE for a database - var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database - var $fmtTimeStamp = "'Y-m-d H:i:s'"; // used by DBTimeStamp as the default timestamp fmt. - var $hasMoveFirst = true; - var $hasGenID = true; - var $_genIDSQL = "SELECT NEXTVAL('%s')"; - var $_genSeqSQL = "CREATE SEQUENCE %s START %s"; - var $_dropSeqSQL = "DROP SEQUENCE %s"; - var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum"; - var $random = 'random()'; /// random function - var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4 - // http://bugs.php.net/bug.php?id=25404 - - var $_bindInputArray = false; // requires postgresql 7.3+ and ability to modify database - var $disableBlobs = false; // set to true to disable blob checking, resulting in 2-5% improvement in performance. - - // The last (fmtTimeStamp is not entirely correct: - // PostgreSQL also has support for time zones, - // and writes these time in this format: "2001-03-01 18:59:26+02". - // There is no code for the "+02" time zone information, so I just left that out. - // I'm not familiar enough with both ADODB as well as Postgres - // to know what the concequences are. The other values are correct (wheren't in 0.94) - // -- Freek Dijkstra - - function ADODB_postgres64() - { - // changes the metaColumnsSQL, adds columns: attnum[6] - } - - function ServerInfo() - { - if (isset($this->version)) return $this->version; - - $arr['description'] = $this->GetOne("select version()"); - $arr['version'] = ADOConnection::_findvers($arr['description']); - $this->version = $arr; - return $arr; - } - - function IfNull( $field, $ifNull ) - { - return " coalesce($field, $ifNull) "; - } - - // get the last id - never tested - function pg_insert_id($tablename,$fieldname) - { - $result=pg_exec($this->_connectionID, "SELECT last_value FROM ${tablename}_${fieldname}_seq"); - if ($result) { - $arr = @pg_fetch_row($result,0); - pg_freeresult($result); - if (isset($arr[0])) return $arr[0]; - } - return false; - } - -/* Warning from http://www.php.net/manual/function.pg-getlastoid.php: -Using a OID as a unique identifier is not generally wise. -Unless you are very careful, you might end up with a tuple having -a different OID if a database must be reloaded. */ - function _insertid($table,$column) - { - if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; - $oid = pg_getlastoid($this->_resultid); - // to really return the id, we need the table and column-name, else we can only return the oid != id - return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); - } - -// I get this error with PHP before 4.0.6 - jlim -// Warning: This compilation does not support pg_cmdtuples() in adodb-postgres.inc.php on line 44 - function _affectedrows() - { - if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; - return pg_cmdtuples($this->_resultid); - } - - - // returns true/false - function BeginTrans() - { - if ($this->transOff) return true; - $this->transCnt += 1; - return @pg_Exec($this->_connectionID, "begin ".$this->_transmode); - } - - function RowLock($tables,$where,$flds='1 as ignore') - { - if (!$this->transCnt) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); - } - - // returns true/false. - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - - $this->transCnt -= 1; - return @pg_Exec($this->_connectionID, "commit"); - } - - // returns true/false - function RollbackTrans() - { - if ($this->transOff) return true; - $this->transCnt -= 1; - return @pg_Exec($this->_connectionID, "rollback"); - } - - function &MetaTables($ttype=false,$showSchema=false,$mask=false) - { - $info = $this->ServerInfo(); - if ($info['version'] >= 7.3) { - $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and schemaname not in ( 'pg_catalog','information_schema') - union - select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; - } - if ($mask) { - $save = $this->metaTablesSQL; - $mask = $this->qstr(strtolower($mask)); - if ($info['version']>=7.3) - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') - union -select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; - else - $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask - union -select viewname,'V' from pg_views where viewname like $mask"; - } - $ret =& ADOConnection::MetaTables($ttype,$showSchema); - - if ($mask) { - $this->metaTablesSQL = $save; - } - return $ret; - } - - - // if magic quotes disabled, use pg_escape_string() - function qstr($s,$magic_quotes=false) - { - if (!$magic_quotes) { - if (ADODB_PHPVER >= 0x5200) { - return "'".pg_escape_string($this->_connectionID,$s)."'"; - } - if (ADODB_PHPVER >= 0x4200) { - return "'".pg_escape_string($s)."'"; - } - if ($this->replaceQuote[0] == '\\'){ - $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\\000"),$s); - } - return "'".str_replace("'",$this->replaceQuote,$s)."'"; - } - - // undo magic quotes for " - $s = str_replace('\\"','"',$s); - return "'$s'"; - } - - - - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = 'TO_CHAR('.$col.",'"; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= 'YYYY'; - break; - case 'Q': - case 'q': - $s .= 'Q'; - break; - - case 'M': - $s .= 'Mon'; - break; - - case 'm': - $s .= 'MM'; - break; - case 'D': - case 'd': - $s .= 'DD'; - break; - - case 'H': - $s.= 'HH24'; - break; - - case 'h': - $s .= 'HH'; - break; - - case 'i': - $s .= 'MI'; - break; - - case 's': - $s .= 'SS'; - break; - - case 'a': - case 'A': - $s .= 'AM'; - break; - - case 'w': - $s .= 'D'; - break; - - case 'l': - $s .= 'DAY'; - break; - - case 'W': - $s .= 'WW'; - break; - - default: - // handle escape characters... - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - if (strpos('-/.:;, ',$ch) !== false) $s .= $ch; - else $s .= '"'.$ch.'"'; - - } - } - return $s. "')"; - } - - - - /* - * Load a Large Object from a file - * - the procedure stores the object id in the table and imports the object using - * postgres proprietary blob handling routines - * - * contributed by Mattia Rossi mattia@technologist.com - * modified for safe mode by juraj chlebec - */ - function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') - { - pg_exec ($this->_connectionID, "begin"); - - $fd = fopen($path,'r'); - $contents = fread($fd,filesize($path)); - fclose($fd); - - $oid = pg_lo_create($this->_connectionID); - $handle = pg_lo_open($this->_connectionID, $oid, 'w'); - pg_lo_write($handle, $contents); - pg_lo_close($handle); - - // $oid = pg_lo_import ($path); - pg_exec($this->_connectionID, "commit"); - $rs = ADOConnection::UpdateBlob($table,$column,$oid,$where,$blobtype); - $rez = !empty($rs); - return $rez; - } - - /* - * Deletes/Unlinks a Blob from the database, otherwise it - * will be left behind - * - * Returns TRUE on success or FALSE on failure. - * - * contributed by Todd Rogers todd#windfox.net - */ - function BlobDelete( $blob ) - { - pg_exec ($this->_connectionID, "begin"); - $result = @pg_lo_unlink($blob); - pg_exec ($this->_connectionID, "commit"); - return( $result ); - } - - /* - Hueristic - not guaranteed to work. - */ - function GuessOID($oid) - { - if (strlen($oid)>16) return false; - return is_numeric($oid); - } - - /* - * If an OID is detected, then we use pg_lo_* to open the oid file and read the - * real blob from the db using the oid supplied as a parameter. If you are storing - * blobs using bytea, we autodetect and process it so this function is not needed. - * - * contributed by Mattia Rossi mattia@technologist.com - * - * see http://www.postgresql.org/idocs/index.php?largeobjects.html - * - * Since adodb 4.54, this returns the blob, instead of sending it to stdout. Also - * added maxsize parameter, which defaults to $db->maxblobsize if not defined. - */ - function BlobDecode($blob,$maxsize=false,$hastrans=true) - { - if (!$this->GuessOID($blob)) return $blob; - - if ($hastrans) @pg_exec($this->_connectionID,"begin"); - $fd = @pg_lo_open($this->_connectionID,$blob,"r"); - if ($fd === false) { - if ($hastrans) @pg_exec($this->_connectionID,"commit"); - return $blob; - } - if (!$maxsize) $maxsize = $this->maxblobsize; - $realblob = @pg_loread($fd,$maxsize); - @pg_loclose($fd); - if ($hastrans) @pg_exec($this->_connectionID,"commit"); - return $realblob; - } - - /* - See http://www.postgresql.org/idocs/index.php?datatype-binary.html - - NOTE: SQL string literals (input strings) must be preceded with two backslashes - due to the fact that they must pass through two parsers in the PostgreSQL - backend. - */ - function BlobEncode($blob) - { - if (ADODB_PHPVER >= 0x5200) return pg_escape_bytea($this->_connectionID, $blob); - if (ADODB_PHPVER >= 0x4200) return pg_escape_bytea($blob); - - /*92=backslash, 0=null, 39=single-quote*/ - $badch = array(chr(92),chr(0),chr(39)); # \ null ' - $fixch = array('\\\\134','\\\\000','\\\\047'); - return adodb_str_replace($badch,$fixch,$blob); - - // note that there is a pg_escape_bytea function only for php 4.2.0 or later - } - - // assumes bytea for blob, and varchar for clob - function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') - { - - if ($blobtype == 'CLOB') { - return $this->Execute("UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where"); - } - // do not use bind params which uses qstr(), as blobencode() already quotes data - return $this->Execute("UPDATE $table SET $column='".$this->BlobEncode($val)."'::bytea WHERE $where"); - } - - function OffsetDate($dayFraction,$date=false) - { - if (!$date) $date = $this->sysDate; - else if (strncmp($date,"'",1) == 0) { - $len = strlen($date); - if (10 <= $len && $len <= 12) $date = 'date '.$date; - else $date = 'timestamp '.$date; - } - return "($date+interval'$dayFraction days')"; - } - - - // for schema support, pass in the $table param "$schema.$tabname". - // converts field names to lowercase, $upper is ignored - // see http://phplens.com/lens/lensforum/msgs.php?id=14018 for more info - function &MetaColumns($table,$normalize=true) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $false = false; - $this->_findschema($table,$schema); - - if ($normalize) $table = strtolower($table); - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema)); - else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rs === false) { - return $false; - } - if (!empty($this->metaKeySQL)) { - // If we want the primary keys, we have to issue a separate query - // Of course, a modified version of the metaColumnsSQL query using a - // LEFT JOIN would have been much more elegant, but postgres does - // not support OUTER JOINS. So here is the clumsy way. - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rskey = $this->Execute(sprintf($this->metaKeySQL,($table))); - // fetch all result in once for performance. - $keys =& $rskey->GetArray(); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - $rskey->Close(); - unset($rskey); - } - - $rsdefa = array(); - if (!empty($this->metaDefaultsSQL)) { - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $sql = sprintf($this->metaDefaultsSQL, ($table)); - $rsdef = $this->Execute($sql); - if (isset($savem)) $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if ($rsdef) { - while (!$rsdef->EOF) { - $num = $rsdef->fields['num']; - $s = $rsdef->fields['def']; - if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */ - $s = substr($s, 1); - $s = substr($s, 0, strlen($s) - 1); - } - - $rsdefa[$num] = $s; - $rsdef->MoveNext(); - } - } else { - ADOConnection::outp( "==> SQL => " . $sql); - } - unset($rsdef); - } - - $retarr = array(); - while (!$rs->EOF) { - $fld = new ADOFieldObject(); - $fld->name = $rs->fields[0]; - $fld->type = $rs->fields[1]; - $fld->max_length = $rs->fields[2]; - $fld->attnum = $rs->fields[6]; - - if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; - if ($fld->max_length <= 0) $fld->max_length = -1; - if ($fld->type == 'numeric') { - $fld->scale = $fld->max_length & 0xFFFF; - $fld->max_length >>= 16; - } - // dannym - // 5 hasdefault; 6 num-of-column - $fld->has_default = ($rs->fields[5] == 't'); - if ($fld->has_default) { - $fld->default_value = $rsdefa[$rs->fields[6]]; - } - - //Freek - $fld->not_null = $rs->fields[4] == 't'; - - - // Freek - if (is_array($keys)) { - foreach($keys as $key) { - if ($fld->name == $key['column_name'] AND $key['primary_key'] == 't') - $fld->primary_key = true; - if ($fld->name == $key['column_name'] AND $key['unique_key'] == 't') - $fld->unique = true; // What name is more compatible? - } - } - - if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; - else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld; - - $rs->MoveNext(); - } - $rs->Close(); - if (empty($retarr)) - return $false; - else - return $retarr; - - } - - function &MetaIndexes ($table, $primary = FALSE) - { - global $ADODB_FETCH_MODE; - - $schema = false; - $this->_findschema($table,$schema); - - if ($schema) { // requires pgsql 7.3+ - pg_namespace used. - $sql = ' -SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" -FROM pg_catalog.pg_class c -JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid -JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid - ,pg_namespace n -WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\')) and c.relnamespace=c2.relnamespace and c.relnamespace=n.oid and n.nspname=\'%s\''; - } else { - $sql = ' -SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" -FROM pg_catalog.pg_class c -JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid -JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid -WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))'; - } - - if ($primary == FALSE) { - $sql .= ' AND i.indisprimary=false;'; - } - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute(sprintf($sql,$table,$table,$schema)); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - $false = false; - return $false; - } - - $col_names = $this->MetaColumnNames($table,true,true); - //3rd param is use attnum, - // see http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976 - $indexes = array(); - while ($row = $rs->FetchRow()) { - $columns = array(); - foreach (explode(' ', $row[2]) as $col) { - $columns[] = $col_names[$col]; - } - - $indexes[$row[0]] = array( - 'unique' => ($row[1] == 't'), - 'columns' => $columns - ); - } - return $indexes; - } - - // returns true or false - // - // examples: - // $db->Connect("host=host1 user=user1 password=secret port=4341"); - // $db->Connect('host1','user1','secret'); - function _connect($str,$user='',$pwd='',$db='',$ctype=0) - { - - if (!function_exists('pg_connect')) return null; - - $this->_errorMsg = false; - - if ($user || $pwd || $db) { - $user = adodb_addslashes($user); - $pwd = adodb_addslashes($pwd); - if (strlen($db) == 0) $db = 'template1'; - $db = adodb_addslashes($db); - if ($str) { - $host = split(":", $str); - if ($host[0]) $str = "host=".adodb_addslashes($host[0]); - else $str = ''; - if (isset($host[1])) $str .= " port=$host[1]"; - else if (!empty($this->port)) $str .= " port=".$this->port; - } - if ($user) $str .= " user=".$user; - if ($pwd) $str .= " password=".$pwd; - if ($db) $str .= " dbname=".$db; - } - - //if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432"; - - if ($ctype === 1) { // persistent - $this->_connectionID = pg_pconnect($str); - } else { - if ($ctype === -1) { // nconnect, we trick pgsql ext by changing the connection str - static $ncnt; - - if (empty($ncnt)) $ncnt = 1; - else $ncnt += 1; - - $str .= str_repeat(' ',$ncnt); - } - $this->_connectionID = pg_connect($str); - } - if ($this->_connectionID === false) return false; - $this->Execute("set datestyle='ISO'"); - - $info = $this->ServerInfo(); - $this->pgVersion = (float) substr($info['version'],0,3); - if ($this->pgVersion >= 7.1) { // good till version 999 - $this->_nestedSQL = true; - } - return true; - } - - function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) - { - return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName,-1); - } - - // returns true or false - // - // examples: - // $db->PConnect("host=host1 user=user1 password=secret port=4341"); - // $db->PConnect('host1','user1','secret'); - function _pconnect($str,$user='',$pwd='',$db='') - { - return $this->_connect($str,$user,$pwd,$db,1); - } - - - // returns queryID or false - function _query($sql,$inputarr) - { - $this->_errorMsg = false; - if ($inputarr) { - /* - It appears that PREPARE/EXECUTE is slower for many queries. - - For query executed 1000 times: - "select id,firstname,lastname from adoxyz - where firstname not like ? and lastname not like ? and id = ?" - - with plan = 1.51861286163 secs - no plan = 1.26903700829 secs - - - - */ - $plan = 'P'.md5($sql); - - $execp = ''; - foreach($inputarr as $v) { - if ($execp) $execp .= ','; - if (is_string($v)) { - if (strncmp($v,"'",1) !== 0) $execp .= $this->qstr($v); - } else { - $execp .= $v; - } - } - - if ($execp) $exsql = "EXECUTE $plan ($execp)"; - else $exsql = "EXECUTE $plan"; - - - $rez = @pg_exec($this->_connectionID,$exsql); - if (!$rez) { - # Perhaps plan does not exist? Prepare/compile plan. - $params = ''; - foreach($inputarr as $v) { - if ($params) $params .= ','; - if (is_string($v)) { - $params .= 'VARCHAR'; - } else if (is_integer($v)) { - $params .= 'INTEGER'; - } else { - $params .= "REAL"; - } - } - $sqlarr = explode('?',$sql); - //print_r($sqlarr); - $sql = ''; - $i = 1; - foreach($sqlarr as $v) { - $sql .= $v.' $'.$i; - $i++; - } - $s = "PREPARE $plan ($params) AS ".substr($sql,0,strlen($sql)-2); - //adodb_pr($s); - $rez = pg_exec($this->_connectionID,$s); - //echo $this->ErrorMsg(); - } - if ($rez) - $rez = pg_exec($this->_connectionID,$exsql); - } else { - //adodb_backtrace(); - $rez = pg_exec($this->_connectionID,$sql); - } - // check if no data returned, then no need to create real recordset - if ($rez && pg_numfields($rez) <= 0) { - if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { - pg_freeresult($this->_resultid); - } - $this->_resultid = $rez; - return true; - } - - return $rez; - } - - function _errconnect() - { - if (defined('DB_ERROR_CONNECT_FAILED')) return DB_ERROR_CONNECT_FAILED; - else return 'Database connection failed'; - } - - /* Returns: the last error message from previous database operation */ - function ErrorMsg() - { - if ($this->_errorMsg !== false) return $this->_errorMsg; - if (ADODB_PHPVER >= 0x4300) { - if (!empty($this->_resultid)) { - $this->_errorMsg = @pg_result_error($this->_resultid); - if ($this->_errorMsg) return $this->_errorMsg; - } - - if (!empty($this->_connectionID)) { - $this->_errorMsg = @pg_last_error($this->_connectionID); - } else $this->_errorMsg = $this->_errconnect(); - } else { - if (empty($this->_connectionID)) $this->_errconnect(); - else $this->_errorMsg = @pg_errormessage($this->_connectionID); - } - return $this->_errorMsg; - } - - function ErrorNo() - { - $e = $this->ErrorMsg(); - if (strlen($e)) { - return ADOConnection::MetaError($e); - } - return 0; - } - - // returns true or false - function _close() - { - if ($this->transCnt) $this->RollbackTrans(); - if ($this->_resultid) { - @pg_freeresult($this->_resultid); - $this->_resultid = false; - } - @pg_close($this->_connectionID); - $this->_connectionID = false; - return true; - } - - - /* - * Maximum size of C field - */ - function CharMax() - { - return 1000000000; // should be 1 Gb? - } - - /* - * Maximum size of X field - */ - function TextMax() - { - return 1000000000; // should be 1 Gb? - } - - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_postgres64 extends ADORecordSet{ - var $_blobArr; - var $databaseType = "postgres64"; - var $canSeek = true; - function ADORecordSet_postgres64($queryID,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch ($mode) - { - case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break; - case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break; - - case ADODB_FETCH_DEFAULT: - case ADODB_FETCH_BOTH: - default: $this->fetchMode = PGSQL_BOTH; break; - } - $this->adodbFetchMode = $mode; - $this->ADORecordSet($queryID); - } - - function &GetRowAssoc($upper=true) - { - if ($this->fetchMode == PGSQL_ASSOC && !$upper) return $this->fields; - $row =& ADORecordSet::GetRowAssoc($upper); - return $row; - } - - function _initrs() - { - global $ADODB_COUNTRECS; - $qid = $this->_queryID; - $this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($qid):-1; - $this->_numOfFields = @pg_numfields($qid); - - // cache types for blob decode check - // apparently pg_fieldtype actually performs an sql query on the database to get the type. - if (empty($this->connection->noBlobs)) - for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { - if (pg_fieldtype($qid,$i) == 'bytea') { - $this->_blobArr[$i] = pg_fieldname($qid,$i); - } - } - } - - /* Use associative array to get fields array */ - function Fields($colname) - { - if ($this->fetchMode != PGSQL_NUM) return @$this->fields[$colname]; - - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function &FetchField($off = 0) - { - // offsets begin at 0 - - $o= new ADOFieldObject(); - $o->name = @pg_fieldname($this->_queryID,$off); - $o->type = @pg_fieldtype($this->_queryID,$off); - $o->max_length = @pg_fieldsize($this->_queryID,$off); - return $o; - } - - function _seek($row) - { - return @pg_fetch_row($this->_queryID,$row); - } - - function _decode($blob) - { - eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";'); - return $realblob; - } - - function _fixblobs() - { - if ($this->fetchMode == PGSQL_NUM || $this->fetchMode == PGSQL_BOTH) { - foreach($this->_blobArr as $k => $v) { - $this->fields[$k] = ADORecordSet_postgres64::_decode($this->fields[$k]); - } - } - if ($this->fetchMode == PGSQL_ASSOC || $this->fetchMode == PGSQL_BOTH) { - foreach($this->_blobArr as $k => $v) { - $this->fields[$v] = ADORecordSet_postgres64::_decode($this->fields[$v]); - } - } - } - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - if (is_array($this->fields) && $this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - return true; - } - } - $this->fields = false; - $this->EOF = true; - } - return false; - } - - function _fetch() - { - - if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) - return false; - - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); - - return (is_array($this->fields)); - } - - function _close() - { - return @pg_freeresult($this->_queryID); - } - - function MetaType($t,$len=-1,$fieldobj=false) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'MONEY': // stupid, postgres expects money to be a string - case 'INTERVAL': - case 'CHAR': - case 'CHARACTER': - case 'VARCHAR': - case 'NAME': - case 'BPCHAR': - case '_VARCHAR': - case 'INET': - case 'MACADDR': - if ($len <= $this->blobSize) return 'C'; - - case 'TEXT': - return 'X'; - - case 'IMAGE': // user defined type - case 'BLOB': // user defined type - case 'BIT': // This is a bit string, not a single bit, so don't return 'L' - case 'VARBIT': - case 'BYTEA': - return 'B'; - - case 'BOOL': - case 'BOOLEAN': - return 'L'; - - case 'DATE': - return 'D'; - - - case 'TIMESTAMP WITHOUT TIME ZONE': - case 'TIME': - case 'DATETIME': - case 'TIMESTAMP': - case 'TIMESTAMPTZ': - return 'T'; - - case 'SMALLINT': - case 'BIGINT': - case 'INTEGER': - case 'INT8': - case 'INT4': - case 'INT2': - if (isset($fieldobj) && - empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I'; - - case 'OID': - case 'SERIAL': - return 'R'; - - default: - return 'N'; - } - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres7.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres7.inc.php deleted file mode 100755 index e1fa20bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres7.inc.php +++ /dev/null @@ -1,264 +0,0 @@ -ADODB_postgres64(); - if (ADODB_ASSOC_CASE !== 2) { - $this->rsPrefix .= 'assoc_'; - } - $this->_bindInputArray = PHP_VERSION >= 5.1; - } - - - // the following should be compat with postgresql 7.2, - // which makes obsolete the LIMIT limit,offset syntax - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET ".((integer)$offset) : ''; - $limitStr = ($nrows >= 0) ? " LIMIT ".((integer)$nrows) : ''; - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - /* - function Prepare($sql) - { - $info = $this->ServerInfo(); - if ($info['version']>=7.3) { - return array($sql,false); - } - return $sql; - } - */ - - - // from Edward Jaramilla, improved version - works on pg 7.4 - function MetaForeignKeys($table, $owner=false, $upper=false) - { - $sql = 'SELECT t.tgargs as args - FROM - pg_trigger t,pg_class c,pg_proc p - WHERE - t.tgenabled AND - t.tgrelid = c.oid AND - t.tgfoid = p.oid AND - p.proname = \'RI_FKey_check_ins\' AND - c.relname = \''.strtolower($table).'\' - ORDER BY - t.tgrelid'; - - $rs =& $this->Execute($sql); - - if (!$rs || $rs->EOF) return false; - - $arr =& $rs->GetArray(); - $a = array(); - foreach($arr as $v) { - $data = explode(chr(0), $v['args']); - $size = count($data)-1; //-1 because the last node is empty - for($i = 4; $i < $size; $i++) { - if ($upper) - $a[strtoupper($data[2])][] = strtoupper($data[$i].'='.$data[++$i]); - else - $a[$data[2]][] = $data[$i].'='.$data[++$i]; - } - } - return $a; - } - - function _query($sql,$inputarr) - { - if (! $this->_bindInputArray) { - // We don't have native support for parameterized queries, so let's emulate it at the parent - return ADODB_postgres64::_query($sql, $inputarr); - } - $this->_errorMsg = false; - // -- added Cristiano da Cunha Duarte - if ($inputarr) { - $sqlarr = explode('?',trim($sql)); - $sql = ''; - $i = 1; - $last = sizeof($sqlarr)-1; - foreach($sqlarr as $v) { - if ($last < $i) $sql .= $v; - else $sql .= $v.' $'.$i; - $i++; - } - - $rez = pg_query_params($this->_connectionID,$sql, $inputarr); - } else { - $rez = pg_query($this->_connectionID,$sql); - } - // check if no data returned, then no need to create real recordset - if ($rez && pg_numfields($rez) <= 0) { - if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { - pg_freeresult($this->_resultid); - } - $this->_resultid = $rez; - return true; - } - return $rez; - } - - // this is a set of functions for managing client encoding - very important if the encodings - // of your database and your output target (i.e. HTML) don't match - //for instance, you may have UNICODE database and server it on-site as WIN1251 etc. - // GetCharSet - get the name of the character set the client is using now - // the functions should work with Postgres 7.0 and above, the set of charsets supported - // depends on compile flags of postgres distribution - if no charsets were compiled into the server - // it will return 'SQL_ANSI' always - function GetCharSet() - { - //we will use ADO's builtin property charSet - $this->charSet = @pg_client_encoding($this->_connectionID); - if (!$this->charSet) { - return false; - } else { - return $this->charSet; - } - } - - // SetCharSet - switch the client encoding - function SetCharSet($charset_name) - { - $this->GetCharSet(); - if ($this->charSet !== $charset_name) { - $if = pg_set_client_encoding($this->_connectionID, $charset_name); - if ($if == "0" & $this->GetCharSet() == $charset_name) { - return true; - } else return false; - } else return true; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordSet_postgres7 extends ADORecordSet_postgres64{ - - var $databaseType = "postgres7"; - - - function ADORecordSet_postgres7($queryID,$mode=false) - { - $this->ADORecordSet_postgres64($queryID,$mode); - } - - // 10% speedup to move MoveNext to child class - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if (is_array($this->fields)) { - if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); - return true; - } - } - $this->fields = false; - $this->EOF = true; - } - return false; - } - -} - -class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{ - - var $databaseType = "postgres7"; - - - function ADORecordSet_assoc_postgres7($queryID,$mode=false) - { - $this->ADORecordSet_postgres64($queryID,$mode); - } - - function _fetch() - { - if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) - return false; - - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if ($this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - $this->_updatefields(); - } - - return (is_array($this->fields)); - } - - // Create associative array - function _updatefields() - { - if (ADODB_ASSOC_CASE == 2) return; // native - - $arr = array(); - $lowercase = (ADODB_ASSOC_CASE == 0); - - foreach($this->fields as $k => $v) { - if (is_integer($k)) $arr[$k] = $v; - else { - if ($lowercase) - $arr[strtolower($k)] = $v; - else - $arr[strtoupper($k)] = $v; - } - } - $this->fields = $arr; - } - - function MoveNext() - { - if (!$this->EOF) { - $this->_currentRow++; - if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { - $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); - - if (is_array($this->fields)) { - if ($this->fields) { - if (isset($this->_blobArr)) $this->_fixblobs(); - - $this->_updatefields(); - } - return true; - } - } - - - $this->fields = false; - $this->EOF = true; - } - return false; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres8.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres8.inc.php deleted file mode 100755 index 8067d91d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-postgres8.inc.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-proxy.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-proxy.inc.php deleted file mode 100755 index 38a91a51..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-proxy.inc.php +++ /dev/null @@ -1,33 +0,0 @@ -ADORecordset($id,$mode); - } - }; -} // define - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sapdb.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sapdb.inc.php deleted file mode 100755 index c90fe588..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sapdb.inc.php +++ /dev/null @@ -1,184 +0,0 @@ -curmode = SQL_CUR_USE_ODBC; - $this->ADODB_odbc(); - } - - function ServerInfo() - { - $info = ADODB_odbc::ServerInfo(); - if (!$info['version'] && preg_match('/([0-9.]+)/',$info['description'],$matches)) { - $info['version'] = $matches[1]; - } - return $info; - } - - function MetaPrimaryKeys($table) - { - $table = $this->Quote(strtoupper($table)); - - return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"); - } - - function &MetaIndexes ($table, $primary = FALSE) - { - $table = $this->Quote(strtoupper($table)); - - $sql = "SELECT INDEXNAME,TYPE,COLUMNNAME FROM INDEXCOLUMNS ". - " WHERE TABLENAME=$table". - " ORDER BY INDEXNAME,COLUMNNO"; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - - $rs = $this->Execute($sql); - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - if (!is_object($rs)) { - return FALSE; - } - - $indexes = array(); - while ($row = $rs->FetchRow()) { - $indexes[$row[0]]['unique'] = $row[1] == 'UNIQUE'; - $indexes[$row[0]]['columns'][] = $row[2]; - } - if ($primary) { - $indexes['SYSPRIMARYKEYINDEX'] = array( - 'unique' => True, // by definition - 'columns' => $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"), - ); - } - return $indexes; - } - - function &MetaColumns ($table) - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $table = $this->Quote(strtoupper($table)); - - $retarr = array(); - foreach($this->GetAll("SELECT COLUMNNAME,DATATYPE,LEN,DEC,NULLABLE,MODE,\"DEFAULT\",CASE WHEN \"DEFAULT\" IS NULL THEN 0 ELSE 1 END AS HAS_DEFAULT FROM COLUMNS WHERE tablename=$table ORDER BY pos") as $column) - { - $fld = new ADOFieldObject(); - $fld->name = $column[0]; - $fld->type = $column[1]; - $fld->max_length = $fld->type == 'LONG' ? 2147483647 : $column[2]; - $fld->scale = $column[3]; - $fld->not_null = $column[4] == 'NO'; - $fld->primary_key = $column[5] == 'KEY'; - if ($fld->has_default = $column[7]) { - if ($fld->primary_key && $column[6] == 'DEFAULT SERIAL (1)') { - $fld->auto_increment = true; - $fld->has_default = false; - } else { - $fld->default_value = $column[6]; - switch($fld->type) { - case 'VARCHAR': - case 'CHARACTER': - case 'LONG': - $fld->default_value = $column[6]; - break; - default: - $fld->default_value = trim($column[6]); - break; - } - } - } - $retarr[$fld->name] = $fld; - } - if (isset($savem)) { - $this->SetFetchMode($savem); - } - $ADODB_FETCH_MODE = $save; - - return $retarr; - } - - function MetaColumnNames($table) - { - $table = $this->Quote(strtoupper($table)); - - return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table ORDER BY pos"); - } - - // unlike it seems, this depends on the db-session and works in a multiuser environment - function _insertid($table,$column) - { - return empty($table) ? False : $this->GetOne("SELECT $table.CURRVAL FROM DUAL"); - } - - /* - SelectLimit implementation problems: - - The following will return random 10 rows as order by performed after "WHERE rowno<10" - which is not ideal... - - select * from table where rowno < 10 order by 1 - - This means that we have to use the adoconnection base class SelectLimit when - there is an "order by". - - See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html - */ - -}; - - -class ADORecordSet_sapdb extends ADORecordSet_odbc { - - var $databaseType = "sapdb"; - - function ADORecordSet_sapdb($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlanywhere.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlanywhere.inc.php deleted file mode 100755 index a09275df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlanywhere.inc.php +++ /dev/null @@ -1,169 +0,0 @@ -create_blobvar($blobVarName); - - b) load blob var from file. $filename must be complete path - - $dbcon->load_blobvar_from_file($blobVarName, $filename); - - c) Use the $blobVarName in SQL insert or update statement in the values - clause: - - $recordSet = $dbconn->Execute('INSERT INTO tabname (idcol, blobcol) ' - . - 'VALUES (\'test\', ' . $blobVarName . ')'); - - instead of loading blob from a file, you can also load from - an unformatted (raw) blob variable: - $dbcon->load_blobvar_from_var($blobVarName, $varName); - - d) drop blob variable on db server to free up resources: - $dbconn->drop_blobvar($blobVarName); - - Sybase_SQLAnywhere data driver. Requires ODBC. - -*/ - -// security - hide paths -if (!defined('ADODB_DIR')) die(); - -if (!defined('_ADODB_ODBC_LAYER')) { - include(ADODB_DIR."/drivers/adodb-odbc.inc.php"); -} - -if (!defined('ADODB_SYBASE_SQLANYWHERE')){ - - define('ADODB_SYBASE_SQLANYWHERE',1); - - class ADODB_sqlanywhere extends ADODB_odbc { - var $databaseType = "sqlanywhere"; - var $hasInsertID = true; - - function ADODB_sqlanywhere() - { - $this->ADODB_odbc(); - } - - function _insertid() { - return $this->GetOne('select @@identity'); - } - - function create_blobvar($blobVarName) { - $this->Execute("create variable $blobVarName long binary"); - return; - } - - function drop_blobvar($blobVarName) { - $this->Execute("drop variable $blobVarName"); - return; - } - - function load_blobvar_from_file($blobVarName, $filename) { - $chunk_size = 1000; - - $fd = fopen ($filename, "rb"); - - $integer_chunks = (integer)filesize($filename) / $chunk_size; - $modulus = filesize($filename) % $chunk_size; - if ($modulus != 0){ - $integer_chunks += 1; - } - - for($loop=1;$loop<=$integer_chunks;$loop++){ - $contents = fread ($fd, $chunk_size); - $contents = bin2hex($contents); - - $hexstring = ''; - - for($loop2=0;$loop2qstr($hexstring); - - $this->Execute("set $blobVarName = $blobVarName || " . $hexstring); - } - - fclose ($fd); - return; - } - - function load_blobvar_from_var($blobVarName, &$varName) { - $chunk_size = 1000; - - $integer_chunks = (integer)strlen($varName) / $chunk_size; - $modulus = strlen($varName) % $chunk_size; - if ($modulus != 0){ - $integer_chunks += 1; - } - - for($loop=1;$loop<=$integer_chunks;$loop++){ - $contents = substr ($varName, (($loop - 1) * $chunk_size), $chunk_size); - $contents = bin2hex($contents); - - $hexstring = ''; - - for($loop2=0;$loop2qstr($hexstring); - - $this->Execute("set $blobVarName = $blobVarName || " . $hexstring); - } - - return; - } - - /* - Insert a null into the blob field of the table first. - Then use UpdateBlob to store the blob. - - Usage: - - $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); - $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); - */ - function UpdateBlob($table,$column,&$val,$where,$blobtype='BLOB') - { - $blobVarName = 'hold_blob'; - $this->create_blobvar($blobVarName); - $this->load_blobvar_from_var($blobVarName, $val); - $this->Execute("UPDATE $table SET $column=$blobVarName WHERE $where"); - $this->drop_blobvar($blobVarName); - return true; - } - }; //class - - class ADORecordSet_sqlanywhere extends ADORecordSet_odbc { - - var $databaseType = "sqlanywhere"; - - function ADORecordSet_sqlanywhere($id,$mode=false) - { - $this->ADORecordSet_odbc($id,$mode); - } - - - }; //class - - -} //define -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlite.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlite.inc.php deleted file mode 100755 index 4a9ec5ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlite.inc.php +++ /dev/null @@ -1,398 +0,0 @@ -fmtDate)."'"; - case 'sysTimeStamp' : return "'".date($this->sysTimeStamp)."'"; - } - }*/ - - function ServerInfo() - { - $arr['version'] = sqlite_libversion(); - $arr['description'] = 'SQLite '; - $arr['encoding'] = sqlite_libencoding(); - return $arr; - } - - function BeginTrans() - { - if ($this->transOff) return true; - $ret = $this->Execute("BEGIN TRANSACTION"); - $this->transCnt += 1; - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - if (!$ok) return $this->RollbackTrans(); - $ret = $this->Execute("COMMIT"); - if ($this->transCnt>0)$this->transCnt -= 1; - return !empty($ret); - } - - function RollbackTrans() - { - if ($this->transOff) return true; - $ret = $this->Execute("ROLLBACK"); - if ($this->transCnt>0)$this->transCnt -= 1; - return !empty($ret); - } - - // mark newnham - function &MetaColumns($tab) - { - global $ADODB_FETCH_MODE; - $false = false; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - $rs = $this->Execute("PRAGMA table_info('$tab')"); - if (isset($savem)) $this->SetFetchMode($savem); - if (!$rs) { - $ADODB_FETCH_MODE = $save; - return $false; - } - $arr = array(); - while ($r = $rs->FetchRow()) { - $type = explode('(',$r['type']); - $size = ''; - if (sizeof($type)==2) - $size = trim($type[1],')'); - $fn = strtoupper($r['name']); - $fld = new ADOFieldObject; - $fld->name = $r['name']; - $fld->type = $type[0]; - $fld->max_length = $size; - $fld->not_null = $r['notnull']; - $fld->default_value = $r['dflt_value']; - $fld->scale = 0; - if ($save == ADODB_FETCH_NUM) $arr[] = $fld; - else $arr[strtoupper($fld->name)] = $fld; - } - $rs->Close(); - $ADODB_FETCH_MODE = $save; - return $arr; - } - - function _init($parentDriver) - { - - $parentDriver->hasTransactions = false; - $parentDriver->hasInsertID = true; - } - - function _insertid() - { - return sqlite_last_insert_rowid($this->_connectionID); - } - - function _affectedrows() - { - return sqlite_changes($this->_connectionID); - } - - function ErrorMsg() - { - if ($this->_logsql) return $this->_errorMsg; - return ($this->_errorNo) ? sqlite_error_string($this->_errorNo) : ''; - } - - function ErrorNo() - { - return $this->_errorNo; - } - - function SQLDate($fmt, $col=false) - { - $fmt = $this->qstr($fmt); - return ($col) ? "adodb_date2($fmt,$col)" : "adodb_date($fmt)"; - } - - - function _createFunctions() - { - @sqlite_create_function($this->_connectionID, 'adodb_date', 'adodb_date', 1); - @sqlite_create_function($this->_connectionID, 'adodb_date2', 'adodb_date2', 2); - } - - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sqlite_open')) return null; - if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename; - - $this->_connectionID = sqlite_open($argHostname); - if ($this->_connectionID === false) return false; - $this->_createFunctions(); - return true; - } - - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sqlite_open')) return null; - if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename; - - $this->_connectionID = sqlite_popen($argHostname); - if ($this->_connectionID === false) return false; - $this->_createFunctions(); - return true; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr=false) - { - $rez = sqlite_query($sql,$this->_connectionID); - if (!$rez) { - $this->_errorNo = sqlite_last_error($this->_connectionID); - } - - return $rez; - } - - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - $offsetStr = ($offset >= 0) ? " OFFSET $offset" : ''; - $limitStr = ($nrows >= 0) ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : ''); - if ($secs2cache) - $rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); - else - $rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr); - - return $rs; - } - - /* - This algorithm is not very efficient, but works even if table locking - is not available. - - Will return false if unable to generate an ID after $MAXLOOPS attempts. - */ - var $_genSeqSQL = "create table %s (id integer)"; - - function GenID($seq='adodbseq',$start=1) - { - // if you have to modify the parameter below, your database is overloaded, - // or you need to implement generation of id's yourself! - $MAXLOOPS = 100; - //$this->debug=1; - while (--$MAXLOOPS>=0) { - @($num = $this->GetOne("select id from $seq")); - if ($num === false) { - $this->Execute(sprintf($this->_genSeqSQL ,$seq)); - $start -= 1; - $num = '0'; - $ok = $this->Execute("insert into $seq values($start)"); - if (!$ok) return false; - } - $this->Execute("update $seq set id=id+1 where id=$num"); - - if ($this->affected_rows() > 0) { - $num += 1; - $this->genID = $num; - return $num; - } - } - if ($fn = $this->raiseErrorFn) { - $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num); - } - return false; - } - - function CreateSequence($seqname='adodbseq',$start=1) - { - if (empty($this->_genSeqSQL)) return false; - $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname)); - if (!$ok) return false; - $start -= 1; - return $this->Execute("insert into $seqname values($start)"); - } - - var $_dropSeqSQL = 'drop table %s'; - function DropSequence($seqname) - { - if (empty($this->_dropSeqSQL)) return false; - return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); - } - - // returns true or false - function _close() - { - return @sqlite_close($this->_connectionID); - } - - function &MetaIndexes($table, $primary = FALSE, $owner=false) - { - $false = false; - // save old fetch mode - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->fetchMode !== FALSE) { - $savem = $this->SetFetchMode(FALSE); - } - $SQL=sprintf("SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'", strtolower($table)); - $rs = $this->Execute($SQL); - if (!is_object($rs)) { - if (isset($savem)) - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - return $false; - } - - $indexes = array (); - while ($row = $rs->FetchRow()) { - if ($primary && preg_match("/primary/i",$row[1]) == 0) continue; - if (!isset($indexes[$row[0]])) { - - $indexes[$row[0]] = array( - 'unique' => preg_match("/unique/i",$row[1]), - 'columns' => array()); - } - /** - * There must be a more elegant way of doing this, - * the index elements appear in the SQL statement - * in cols[1] between parentheses - * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse) - */ - $cols = explode("(",$row[1]); - $cols = explode(")",$cols[1]); - array_pop($cols); - $indexes[$row[0]]['columns'] = $cols; - } - if (isset($savem)) { - $this->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - } - return $indexes; - } - -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_sqlite extends ADORecordSet { - - var $databaseType = "sqlite"; - var $bind = false; - - function ADORecordset_sqlite($queryID,$mode=false) - { - - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - switch($mode) { - case ADODB_FETCH_NUM: $this->fetchMode = SQLITE_NUM; break; - case ADODB_FETCH_ASSOC: $this->fetchMode = SQLITE_ASSOC; break; - default: $this->fetchMode = SQLITE_BOTH; break; - } - $this->adodbFetchMode = $mode; - - $this->_queryID = $queryID; - - $this->_inited = true; - $this->fields = array(); - if ($queryID) { - $this->_currentRow = 0; - $this->EOF = !$this->_fetch(); - @$this->_initrs(); - } else { - $this->_numOfRows = 0; - $this->_numOfFields = 0; - $this->EOF = true; - } - - return $this->_queryID; - } - - - function &FetchField($fieldOffset = -1) - { - $fld = new ADOFieldObject; - $fld->name = sqlite_field_name($this->_queryID, $fieldOffset); - $fld->type = 'VARCHAR'; - $fld->max_length = -1; - return $fld; - } - - function _initrs() - { - $this->_numOfRows = @sqlite_num_rows($this->_queryID); - $this->_numOfFields = @sqlite_num_fields($this->_queryID); - } - - function Fields($colname) - { - if ($this->fetchMode != SQLITE_NUM) return $this->fields[$colname]; - if (!$this->bind) { - $this->bind = array(); - for ($i=0; $i < $this->_numOfFields; $i++) { - $o = $this->FetchField($i); - $this->bind[strtoupper($o->name)] = $i; - } - } - - return $this->fields[$this->bind[strtoupper($colname)]]; - } - - function _seek($row) - { - return sqlite_seek($this->_queryID, $row); - } - - function _fetch($ignore_fields=false) - { - $this->fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); - return !empty($this->fields); - } - - function _close() - { - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlitepo.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlitepo.inc.php deleted file mode 100755 index 3f1c7c66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sqlitepo.inc.php +++ /dev/null @@ -1,62 +0,0 @@ -ADODB_sqlite(); - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ - -class ADORecordset_sqlitepo extends ADORecordset_sqlite { - - var $databaseType = 'sqlitepo'; - - function ADORecordset_sqlitepo($queryID,$mode=false) - { - $this->ADORecordset_sqlite($queryID,$mode); - } - - // Modified to strip table names from returned fields - function _fetch($ignore_fields=false) - { - $this->fields = array(); - $fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode); - if(is_array($fields)) - foreach($fields as $n => $v) - { - if(($p = strpos($n, ".")) !== false) - $n = substr($n, $p+1); - $this->fields[$n] = $v; - } - - return !empty($this->fields); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase.inc.php deleted file mode 100755 index 49898d88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase.inc.php +++ /dev/null @@ -1,418 +0,0 @@ -GetOne('select @@identity'); - } - // might require begintrans -- committrans - function _affectedrows() - { - return $this->GetOne('select @@rowcount'); - } - - - function BeginTrans() - { - - if ($this->transOff) return true; - $this->transCnt += 1; - - $this->Execute('BEGIN TRAN'); - return true; - } - - function CommitTrans($ok=true) - { - if ($this->transOff) return true; - - if (!$ok) return $this->RollbackTrans(); - - $this->transCnt -= 1; - $this->Execute('COMMIT TRAN'); - return true; - } - - function RollbackTrans() - { - if ($this->transOff) return true; - $this->transCnt -= 1; - $this->Execute('ROLLBACK TRAN'); - return true; - } - - // http://www.isug.com/Sybase_FAQ/ASE/section6.1.html#6.1.4 - function RowLock($tables,$where,$flds='top 1 null as ignore') - { - if (!$this->_hastrans) $this->BeginTrans(); - $tables = str_replace(',',' HOLDLOCK,',$tables); - return $this->GetOne("select $flds from $tables HOLDLOCK where $where"); - - } - - function SelectDB($dbName) - { - $this->database = $dbName; - $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions - if ($this->_connectionID) { - return @sybase_select_db($dbName); - } - else return false; - } - - /* Returns: the last error message from previous database operation - Note: This function is NOT available for Microsoft SQL Server. */ - - - function ErrorMsg() - { - if ($this->_logsql) return $this->_errorMsg; - if (function_exists('sybase_get_last_message')) - $this->_errorMsg = sybase_get_last_message(); - else - $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform'; - return $this->_errorMsg; - } - - // returns true or false - function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sybase_connect')) return null; - - $this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - // returns true or false - function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) - { - if (!function_exists('sybase_connect')) return null; - - $this->_connectionID = sybase_pconnect($argHostname,$argUsername,$argPassword); - if ($this->_connectionID === false) return false; - if ($argDatabasename) return $this->SelectDB($argDatabasename); - return true; - } - - // returns query ID if successful, otherwise false - function _query($sql,$inputarr) - { - global $ADODB_COUNTRECS; - - if ($ADODB_COUNTRECS == false && ADODB_PHPVER >= 0x4300) - return sybase_unbuffered_query($sql,$this->_connectionID); - else - return sybase_query($sql,$this->_connectionID); - } - - // See http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12 - function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) - { - if ($secs2cache > 0) {// we do not cache rowcount, so we have to load entire recordset - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $rs; - } - - $nrows = (integer) $nrows; - $offset = (integer) $offset; - - $cnt = ($nrows >= 0) ? $nrows : 999999999; - if ($offset > 0 && $cnt) $cnt += $offset; - - $this->Execute("set rowcount $cnt"); - $rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0); - $this->Execute("set rowcount 0"); - - return $rs; - } - - // returns true or false - function _close() - { - return @sybase_close($this->_connectionID); - } - - function UnixDate($v) - { - return ADORecordSet_array_sybase::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_sybase::UnixTimeStamp($v); - } - - - - # Added 2003-10-05 by Chris Phillipson - # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=16756?target=%25N%15_12018_START_RESTART_N%25 - # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version - // Format date column in sql string given an input format that understands Y M D - function SQLDate($fmt, $col=false) - { - if (!$col) $col = $this->sysTimeStamp; - $s = ''; - - $len = strlen($fmt); - for ($i=0; $i < $len; $i++) { - if ($s) $s .= '+'; - $ch = $fmt[$i]; - switch($ch) { - case 'Y': - case 'y': - $s .= "datename(yy,$col)"; - break; - case 'M': - $s .= "convert(char(3),$col,0)"; - break; - case 'm': - $s .= "replace(str(month($col),2),' ','0')"; - break; - case 'Q': - case 'q': - $s .= "datename(qq,$col)"; - break; - case 'D': - case 'd': - $s .= "replace(str(datepart(dd,$col),2),' ','0')"; - break; - case 'h': - $s .= "substring(convert(char(14),$col,0),13,2)"; - break; - - case 'H': - $s .= "replace(str(datepart(hh,$col),2),' ','0')"; - break; - - case 'i': - $s .= "replace(str(datepart(mi,$col),2),' ','0')"; - break; - case 's': - $s .= "replace(str(datepart(ss,$col),2),' ','0')"; - break; - case 'a': - case 'A': - $s .= "substring(convert(char(19),$col,0),18,2)"; - break; - - default: - if ($ch == '\\') { - $i++; - $ch = substr($fmt,$i,1); - } - $s .= $this->qstr($ch); - break; - } - } - return $s; - } - - # Added 2003-10-07 by Chris Phillipson - # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8 - # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version - function MetaPrimaryKeys($table) - { - $sql = "SELECT c.column_name " . - "FROM syscolumn c, systable t " . - "WHERE t.table_name='$table' AND c.table_id=t.table_id " . - "AND t.table_type='BASE' " . - "AND c.pkey = 'Y' " . - "ORDER BY c.column_id"; - - $a = $this->GetCol($sql); - if ($a && sizeof($a)>0) return $a; - return false; - } -} - -/*-------------------------------------------------------------------------------------- - Class Name: Recordset ---------------------------------------------------------------------------------------*/ -global $ADODB_sybase_mths; -$ADODB_sybase_mths = array( - 'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6, - 'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); - -class ADORecordset_sybase extends ADORecordSet { - - var $databaseType = "sybase"; - var $canSeek = true; - // _mths works only in non-localised system - var $_mths = array('JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); - - function ADORecordset_sybase($id,$mode=false) - { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } - if (!$mode) $this->fetchMode = ADODB_FETCH_ASSOC; - else $this->fetchMode = $mode; - $this->ADORecordSet($id,$mode); - } - - /* Returns: an object containing field information. - Get column information in the Recordset object. fetchField() can be used in order to obtain information about - fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by - fetchField() is retrieved. */ - function &FetchField($fieldOffset = -1) - { - if ($fieldOffset != -1) { - $o = @sybase_fetch_field($this->_queryID, $fieldOffset); - } - else if ($fieldOffset == -1) { /* The $fieldOffset argument is not provided thus its -1 */ - $o = @sybase_fetch_field($this->_queryID); - } - // older versions of PHP did not support type, only numeric - if ($o && !isset($o->type)) $o->type = ($o->numeric) ? 'float' : 'varchar'; - return $o; - } - - function _initrs() - { - global $ADODB_COUNTRECS; - $this->_numOfRows = ($ADODB_COUNTRECS)? @sybase_num_rows($this->_queryID):-1; - $this->_numOfFields = @sybase_num_fields($this->_queryID); - } - - function _seek($row) - { - return @sybase_data_seek($this->_queryID, $row); - } - - function _fetch($ignore_fields=false) - { - if ($this->fetchMode == ADODB_FETCH_NUM) { - $this->fields = @sybase_fetch_row($this->_queryID); - } else if ($this->fetchMode == ADODB_FETCH_ASSOC) { - $this->fields = @sybase_fetch_row($this->_queryID); - if (is_array($this->fields)) { - $this->fields = $this->GetRowAssoc(ADODB_ASSOC_CASE); - return true; - } - return false; - } else { - $this->fields = @sybase_fetch_array($this->_queryID); - } - if ( is_array($this->fields)) { - return true; - } - - return false; - } - - /* close() only needs to be called if you are worried about using too much memory while your script - is running. All associated result memory for the specified result identifier will automatically be freed. */ - function _close() { - return @sybase_free_result($this->_queryID); - } - - // sybase/mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - return ADORecordSet_array_sybase::UnixDate($v); - } - - function UnixTimeStamp($v) - { - return ADORecordSet_array_sybase::UnixTimeStamp($v); - } -} - -class ADORecordSet_array_sybase extends ADORecordSet_array { - function ADORecordSet_array_sybase($id=-1) - { - $this->ADORecordSet_array($id); - } - - // sybase/mssql uses a default date like Dec 30 2000 12:00AM - function UnixDate($v) - { - global $ADODB_sybase_mths; - - //Dec 30 2000 12:00AM - if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})" - ,$v, $rr)) return parent::UnixDate($v); - - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $themth = substr(strtoupper($rr[1]),0,3); - $themth = $ADODB_sybase_mths[$themth]; - if ($themth <= 0) return false; - // h-m-s-MM-DD-YY - return mktime(0,0,0,$themth,$rr[2],$rr[3]); - } - - function UnixTimeStamp($v) - { - global $ADODB_sybase_mths; - //11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com - //Changed [0-9] to [0-9 ] in day conversion - if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})" - ,$v, $rr)) return parent::UnixTimeStamp($v); - if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; - - $themth = substr(strtoupper($rr[1]),0,3); - $themth = $ADODB_sybase_mths[$themth]; - if ($themth <= 0) return false; - - switch (strtoupper($rr[6])) { - case 'P': - if ($rr[4]<12) $rr[4] += 12; - break; - case 'A': - if ($rr[4]==12) $rr[4] = 0; - break; - default: - break; - } - // h-m-s-MM-DD-YY - return mktime($rr[4],$rr[5],0,$themth,$rr[2],$rr[3]); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase_ase.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase_ase.inc.php deleted file mode 100755 index 269ae263..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-sybase_ase.inc.php +++ /dev/null @@ -1,119 +0,0 @@ -metaTablesSQL) { - // complicated state saving by the need for backward compat - - if ($ttype == 'VIEWS'){ - $sql = str_replace('U', 'V', $this->metaTablesSQL); - }elseif (false === $ttype){ - $sql = str_replace('U',"U' OR type='V", $this->metaTablesSQL); - }else{ // TABLES OR ANY OTHER - $sql = $this->metaTablesSQL; - } - $rs = $this->Execute($sql); - - if ($rs === false || !method_exists($rs, 'GetArray')){ - return $false; - } - $arr =& $rs->GetArray(); - - $arr2 = array(); - foreach($arr as $key=>$value){ - $arr2[] = trim($value['name']); - } - return $arr2; - } - return $false; - } - - function MetaDatabases() - { - $arr = array(); - if ($this->metaDatabasesSQL!='') { - $rs = $this->Execute($this->metaDatabasesSQL); - if ($rs && !$rs->EOF){ - while (!$rs->EOF){ - $arr[] = $rs->Fields('name'); - $rs->MoveNext(); - } - return $arr; - } - } - return false; - } - - // fix a bug which prevent the metaColumns query to be executed for Sybase ASE - function &MetaColumns($table,$upper=false) - { - $false = false; - if (!empty($this->metaColumnsSQL)) { - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); - if ($rs === false) return $false; - - $retarr = array(); - while (!$rs->EOF) { - $fld =& new ADOFieldObject(); - $fld->name = $rs->Fields('field_name'); - $fld->type = $rs->Fields('type'); - $fld->max_length = $rs->Fields('width'); - $retarr[strtoupper($fld->name)] = $fld; - $rs->MoveNext(); - } - $rs->Close(); - return $retarr; - } - return $false; - } - - function getProcedureList($schema) - { - return false; - } - - function ErrorMsg() - { - if (!function_exists('sybase_connect')){ - return 'Your PHP doesn\'t contain the Sybase connection module!'; - } - return parent::ErrorMsg(); - } -} - -class adorecordset_sybase_ase extends ADORecordset_sybase { -var $databaseType = "sybase_ase"; -function ADORecordset_sybase_ase($id,$mode=false) - { - $this->ADORecordSet_sybase($id,$mode); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-vfp.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-vfp.inc.php deleted file mode 100755 index 59aa8a69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/drivers/adodb-vfp.inc.php +++ /dev/null @@ -1,107 +0,0 @@ -ADODB_odbc(); - } - - function Time() - { - return time(); - } - - function BeginTrans() { return false;} - - // quote string to be sent back to database - function qstr($s,$nofixquotes=false) - { - if (!$nofixquotes) return "'".str_replace("\r\n","'+chr(13)+'",str_replace("'",$this->replaceQuote,$s))."'"; - return "'".$s."'"; - } - - - // TOP requires ORDER BY for VFP - function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) - { - $this->hasTop = preg_match('/ORDER[ \t\r\n]+BY/is',$sql) ? 'top' : false; - $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); - return $ret; - } - - - -}; - - -class ADORecordSet_vfp extends ADORecordSet_odbc { - - var $databaseType = "vfp"; - - - function ADORecordSet_vfp($id,$mode=false) - { - return $this->ADORecordSet_odbc($id,$mode); - } - - function MetaType($t,$len=-1) - { - if (is_object($t)) { - $fieldobj = $t; - $t = $fieldobj->type; - $len = $fieldobj->max_length; - } - switch (strtoupper($t)) { - case 'C': - if ($len <= $this->blobSize) return 'C'; - case 'M': - return 'X'; - - case 'D': return 'D'; - - case 'T': return 'T'; - - case 'L': return 'L'; - - case 'I': return 'I'; - - default: return 'N'; - } - } -} - -} //define -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/all-wcprops deleted file mode 100755 index e67cb9b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/all-wcprops +++ /dev/null @@ -1,131 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang -END -adodb-pl.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-pl.inc.php -END -adodb-cz.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-cz.inc.php -END -adodb-hu.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang/adodb-hu.inc.php -END -adodb-it.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-it.inc.php -END -adodb-ro.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-ro.inc.php -END -adodb-ca.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-ca.inc.php -END -adodb-pt-br.inc.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-pt-br.inc.php -END -adodb-da.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang/adodb-da.inc.php -END -adodb-uk1251.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang/adodb-uk1251.inc.php -END -adodb-sv.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-sv.inc.php -END -adodb-bg.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-bg.inc.php -END -adodb-de.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-de.inc.php -END -adodb-ru1251.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-ru1251.inc.php -END -adodb-bgutf8.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-bgutf8.inc.php -END -adodb-cn.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-cn.inc.php -END -adodb-esperanto.inc.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang/adodb-esperanto.inc.php -END -adodb-en.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-en.inc.php -END -adodb-ar.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/lang/adodb-ar.inc.php -END -adodb-fr.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-fr.inc.php -END -adodb-es.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/lang/adodb-es.inc.php -END -adodb-nl.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/lang/adodb-nl.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/entries deleted file mode 100755 index d1554e0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/entries +++ /dev/null @@ -1,301 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/lang -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T11:01:00.000000Z -351 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -adodb-pl.inc.php -file - - - - -2008-02-29T14:57:52.801640Z -333e11e85411307b88ea16bdf8996d21 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-cz.inc.php -file - - - - -2008-02-29T14:57:52.817260Z -03391b25da96b777a5551f2a8c6ead5d -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-hu.inc.php -file - - - - -2008-02-29T14:57:52.817260Z -f308d107e1335ec36f71f101bc5324cf -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-it.inc.php -file - - - - -2008-02-29T14:57:52.801640Z -ae50135b082e9fb48d8c35dc1661f64b -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ro.inc.php -file - - - - -2008-02-29T14:57:52.817260Z -779e6c52a20bce569e066aba65c60003 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-ca.inc.php -file - - - - -2008-02-29T14:57:52.832881Z -93060159c76883fa275d2ced362f78dc -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-pt-br.inc.php -file - - - - -2008-02-29T14:57:52.848502Z -e63bd13e7b4355fe5dadcb7a730b8fec -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-da.inc.php -file - - - - -2008-02-29T14:57:52.832881Z -2ea23878b1027f3d07c8a9b8bbe4e3a3 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-uk1251.inc.php -file - - - - -2008-02-29T14:57:52.879743Z -320306b503da23dbe82faf07510d107f -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-sv.inc.php -file - - - - -2008-02-29T14:57:52.864122Z -2e5a4ae963a924ec9eca642bcf29f14c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-bg.inc.php -file - - - - -2008-02-29T14:57:52.864122Z -666dcae97c0af42eb0e05ef6d3142978 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-de.inc.php -file - - - - -2008-02-29T14:57:52.848502Z -6e6eb75314d67b7dd35d6c952455f196 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-ru1251.inc.php -file - - - - -2008-02-29T14:57:52.895363Z -43c805db84804ac7382c4c840cdb6027 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-bgutf8.inc.php -file - - - - -2008-02-29T14:57:52.879743Z -63163113e58eeb2b8c266e0ed0979ab0 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-esperanto.inc.php -file - - - - -2008-02-29T14:57:52.895363Z -32b94a998cb1a8b1ee14089af407d585 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-cn.inc.php -file - - - - -2008-02-29T14:57:52.910984Z -c8e10a9a5e1107554febfd2e0b5f7239 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-en.inc.php -file - - - - -2008-02-29T14:57:52.910984Z -0820efeceaa0126b74158721c39dc48e -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-ar.inc.php -file - - - - -2008-02-29T14:57:52.926605Z -6f2a34557221b1f08c4232dc7745da3e -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -adodb-fr.inc.php -file - - - - -2008-02-29T14:57:52.926605Z -237c0b092fa1c1c34a9c67633c3842f8 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-es.inc.php -file - - - - -2008-02-29T14:57:52.926605Z -de0722a45173d1e076216f41090232d1 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-nl.inc.php -file - - - - -2008-02-29T14:57:52.942225Z -ed3d417b04f361e178f1a258d193b929 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ar.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ar.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ar.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bg.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bg.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bg.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bgutf8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bgutf8.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-bgutf8.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ca.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ca.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ca.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cn.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cn.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cn.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cz.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cz.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-cz.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-da.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-da.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-da.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-de.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-de.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-de.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-en.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-en.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-en.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-es.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-es.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-es.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-esperanto.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-esperanto.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-esperanto.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-fr.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-fr.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-fr.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-hu.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-hu.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-hu.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-it.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-it.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-it.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-nl.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-nl.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-nl.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pl.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pl.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pl.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pt-br.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pt-br.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-pt-br.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ro.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ro.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ro.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ru1251.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ru1251.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-ru1251.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-sv.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-sv.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-sv.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-uk1251.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-uk1251.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/prop-base/adodb-uk1251.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ar.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ar.inc.php.svn-base deleted file mode 100755 index dd0f830f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ar.inc.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ar', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => ' ', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => 'DSN ', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bg.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bg.inc.php.svn-base deleted file mode 100755 index 4fb1dc07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bg.inc.php.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bg', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bgutf8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bgutf8.inc.php.svn-base deleted file mode 100755 index 6f3a4173..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-bgutf8.inc.php.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bgutf8', - DB_ERROR => 'неизвестна грешка', - DB_ERROR_ALREADY_EXISTS => 'вече съществува', - DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена', - DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита', - DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена', - DB_ERROR_CONSTRAINT => 'нарушено условие', - DB_ERROR_DIVZERO => 'деление на нула', - DB_ERROR_INVALID => 'неправилно', - DB_ERROR_INVALID_DATE => 'некоректна дата или час', - DB_ERROR_INVALID_NUMBER => 'невалиден номер', - DB_ERROR_MISMATCH => 'погрешна употреба', - DB_ERROR_NODBSELECTED => 'не е избрана база данни', - DB_ERROR_NOSUCHFIELD => 'несъществуващо поле', - DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'не е намерена', - DB_ERROR_NOT_LOCKED => 'не е заключена', - DB_ERROR_SYNTAX => 'грешен синтаксис', - DB_ERROR_UNSUPPORTED => 'не се поддържа', - DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда', - DB_ERROR_INVALID_DSN => 'невалиден DSN', - DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена', - 0 => 'няма грешки', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни', - DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено', - DB_ERROR_NOSUCHDB => 'несъществуваща база данни', - DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ca.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ca.inc.php.svn-base deleted file mode 100755 index 081f632f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ca.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'ca', - DB_ERROR => 'error desconegut', - DB_ERROR_ALREADY_EXISTS => 'ja existeix', - DB_ERROR_CANNOT_CREATE => 'no es pot crear', - DB_ERROR_CANNOT_DELETE => 'no es pot esborrar', - DB_ERROR_CANNOT_DROP => 'no es pot eliminar', - DB_ERROR_CONSTRAINT => 'violaci de constraint', - DB_ERROR_DIVZERO => 'divisi per zero', - DB_ERROR_INVALID => 'no s vlid', - DB_ERROR_INVALID_DATE => 'la data o l\'hora no sn vlides', - DB_ERROR_INVALID_NUMBER => 'el nombre no s vlid', - DB_ERROR_MISMATCH => 'no hi ha coincidncia', - DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'taula inexistent', - DB_ERROR_NOT_CAPABLE => 'l\'execuci secundria de DB no pot', - DB_ERROR_NOT_FOUND => 'no trobat', - DB_ERROR_NOT_LOCKED => 'no blocat', - DB_ERROR_SYNTAX => 'error de sintaxi', - DB_ERROR_UNSUPPORTED => 'no suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila', - DB_ERROR_INVALID_DSN => 'el DSN no s vlid', - DB_ERROR_CONNECT_FAILED => 'connexi fallida', - 0 => 'cap error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'les dades subministrades sn insuficients', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensi no trobada', - DB_ERROR_NOSUCHDB => 'base de dades inexistent', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cn.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cn.inc.php.svn-base deleted file mode 100755 index 44d5f490..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cn.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'cn', - DB_ERROR => 'δ֪', - DB_ERROR_ALREADY_EXISTS => 'Ѿ', - DB_ERROR_CANNOT_CREATE => 'ܴ', - DB_ERROR_CANNOT_DELETE => 'ɾ', - DB_ERROR_CANNOT_DROP => 'ܶ', - DB_ERROR_CONSTRAINT => 'Լ', - DB_ERROR_DIVZERO => '0', - DB_ERROR_INVALID => 'Ч', - DB_ERROR_INVALID_DATE => 'Чڻʱ', - DB_ERROR_INVALID_NUMBER => 'Ч', - DB_ERROR_MISMATCH => 'ƥ', - DB_ERROR_NODBSELECTED => 'ûݿⱻѡ', - DB_ERROR_NOSUCHFIELD => 'ûӦֶ', - DB_ERROR_NOSUCHTABLE => 'ûӦı', - DB_ERROR_NOT_CAPABLE => 'ݿ̨', - DB_ERROR_NOT_FOUND => 'ûз', - DB_ERROR_NOT_LOCKED => 'ûб', - DB_ERROR_SYNTAX => '﷨', - DB_ERROR_UNSUPPORTED => '֧', - DB_ERROR_VALUE_COUNT_ON_ROW => 'ۼֵ', - DB_ERROR_INVALID_DSN => 'ЧԴ (DSN)', - DB_ERROR_CONNECT_FAILED => 'ʧ', - 0 => 'ûд', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ṩݲܷҪ', - DB_ERROR_EXTENSION_NOT_FOUND=> 'չûб', - DB_ERROR_NOSUCHDB => 'ûӦݿ', - DB_ERROR_ACCESS_VIOLATION => 'ûкʵȨ' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cz.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cz.inc.php.svn-base deleted file mode 100755 index 1f5c08a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-cz.inc.php.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'cz', - DB_ERROR => 'neznm chyba', - DB_ERROR_ALREADY_EXISTS => 'ji? existuje', - DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it', - DB_ERROR_CANNOT_DELETE => 'nelze smazat', - DB_ERROR_CANNOT_DROP => 'nelze odstranit', - DB_ERROR_CONSTRAINT => 'poru?en omezujc podmnky', - DB_ERROR_DIVZERO => 'd?len nulou', - DB_ERROR_INVALID => 'neplatn', - DB_ERROR_INVALID_DATE => 'neplatn datum nebo ?as', - DB_ERROR_INVALID_NUMBER => 'neplatn ?slo', - DB_ERROR_MISMATCH => 'nesouhlas', - DB_ERROR_NODBSELECTED => '?dn databze nen vybrna', - DB_ERROR_NOSUCHFIELD => 'pole nenalezeno', - DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena', - DB_ERROR_NOT_CAPABLE => 'nepodporovno', - DB_ERROR_NOT_FOUND => 'nenalezeno', - DB_ERROR_NOT_LOCKED => 'nezam?eno', - DB_ERROR_SYNTAX => 'syntaktick chyba', - DB_ERROR_UNSUPPORTED => 'nepodporovno', - DB_ERROR_VALUE_COUNT_ON_ROW => '', - DB_ERROR_INVALID_DSN => 'neplatn DSN', - DB_ERROR_CONNECT_FAILED => 'p?ipojen selhalo', - 0 => 'bez chyb', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'mlo zdrojovch dat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'roz??en nenalezeno', - DB_ERROR_NOSUCHDB => 'databze neexistuje', - DB_ERROR_ACCESS_VIOLATION => 'nedostate?n prva' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-da.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-da.inc.php.svn-base deleted file mode 100755 index ca0e72d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-da.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - 'da', - DB_ERROR => 'ukendt fejl', - DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede', - DB_ERROR_CANNOT_CREATE => 'kan ikke oprette', - DB_ERROR_CANNOT_DELETE => 'kan ikke slette', - DB_ERROR_CANNOT_DROP => 'kan ikke droppe', - DB_ERROR_CONSTRAINT => 'begrænsning krænket', - DB_ERROR_DIVZERO => 'division med nul', - DB_ERROR_INVALID => 'ugyldig', - DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet', - DB_ERROR_INVALID_NUMBER => 'ugyldigt tal', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'ingen database valgt', - DB_ERROR_NOSUCHFIELD => 'felt findes ikke', - DB_ERROR_NOSUCHTABLE => 'tabel findes ikke', - DB_ERROR_NOT_CAPABLE => 'DB backend opgav', - DB_ERROR_NOT_FOUND => 'ikke fundet', - DB_ERROR_NOT_LOCKED => 'ikke låst', - DB_ERROR_SYNTAX => 'syntaksfejl', - DB_ERROR_UNSUPPORTED => 'ikke understøttet', - DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter', - DB_ERROR_INVALID_DSN => 'ugyldig DSN', - DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes', - 0 => 'ingen fejl', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet', - DB_ERROR_NOSUCHDB => 'database ikke fundet', - DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-de.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-de.inc.php.svn-base deleted file mode 100755 index 44c57e9f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-de.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'de', - DB_ERROR => 'Unbekannter Fehler', - DB_ERROR_ALREADY_EXISTS => 'existiert bereits', - DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen', - DB_ERROR_CANNOT_DELETE => 'kann nicht löschen', - DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden', - DB_ERROR_CONSTRAINT => 'Constraint Verletzung', - DB_ERROR_DIVZERO => 'Division durch Null', - DB_ERROR_INVALID => 'ung¨ltig', - DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit', - DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl', - DB_ERROR_MISMATCH => 'Unverträglichkeit', - DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt', - DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden', - DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden', - DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert', - DB_ERROR_NOT_FOUND => 'nicht gefunden', - DB_ERROR_NOT_LOCKED => 'nicht gesperrt', - DB_ERROR_SYNTAX => 'Syntaxfehler', - DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt', - DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage', - DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN', - DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden', - 0 => 'kein Fehler', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert', - DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden', - DB_ERROR_NOSUCHDB => 'keine Datenbank', - DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-en.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-en.inc.php.svn-base deleted file mode 100755 index ed1b8f19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-en.inc.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - 'en', - DB_ERROR => 'unknown error', - DB_ERROR_ALREADY_EXISTS => 'already exists', - DB_ERROR_CANNOT_CREATE => 'can not create', - DB_ERROR_CANNOT_DELETE => 'can not delete', - DB_ERROR_CANNOT_DROP => 'can not drop', - DB_ERROR_CONSTRAINT => 'constraint violation', - DB_ERROR_DIVZERO => 'division by zero', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'invalid date or time', - DB_ERROR_INVALID_NUMBER => 'invalid number', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'no database selected', - DB_ERROR_NOSUCHFIELD => 'no such field', - DB_ERROR_NOSUCHTABLE => 'no such table', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'not found', - DB_ERROR_NOT_LOCKED => 'not locked', - DB_ERROR_SYNTAX => 'syntax error', - DB_ERROR_UNSUPPORTED => 'not supported', - DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', - DB_ERROR_INVALID_DSN => 'invalid DSN', - DB_ERROR_CONNECT_FAILED => 'connect failed', - 0 => 'no error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'insufficient data supplied', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found', - DB_ERROR_NOSUCHDB => 'no such database', - DB_ERROR_ACCESS_VIOLATION => 'insufficient permissions' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-es.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-es.inc.php.svn-base deleted file mode 100755 index 1e0afbb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-es.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'es', - DB_ERROR => 'error desconocido', - DB_ERROR_ALREADY_EXISTS => 'ya existe', - DB_ERROR_CANNOT_CREATE => 'imposible crear', - DB_ERROR_CANNOT_DELETE => 'imposible borrar', - DB_ERROR_CANNOT_DROP => 'imposible hacer drop', - DB_ERROR_CONSTRAINT => 'violacion de constraint', - DB_ERROR_DIVZERO => 'division por cero', - DB_ERROR_INVALID => 'invalido', - DB_ERROR_INVALID_DATE => 'fecha u hora invalida', - DB_ERROR_INVALID_NUMBER => 'numero invalido', - DB_ERROR_MISMATCH => 'error', - DB_ERROR_NODBSELECTED => 'no hay base de datos seleccionada', - DB_ERROR_NOSUCHFIELD => 'campo invalido', - DB_ERROR_NOSUCHTABLE => 'tabla no existe', - DB_ERROR_NOT_CAPABLE => 'capacidad invalida para esta DB', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'error de sintaxis', - DB_ERROR_UNSUPPORTED => 'no soportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores', - DB_ERROR_INVALID_DSN => 'DSN invalido', - DB_ERROR_CONNECT_FAILED => 'fallo la conexion', - 0 => 'sin error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'insuficientes datos', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada', - DB_ERROR_NOSUCHDB => 'base de datos no encontrada', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficientes' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-esperanto.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-esperanto.inc.php.svn-base deleted file mode 100755 index 16ca00e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-esperanto.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'eo', - DB_ERROR => 'nekonata eraro', - DB_ERROR_ALREADY_EXISTS => 'jam ekzistas', - DB_ERROR_CANNOT_CREATE => 'maleblas krei', - DB_ERROR_CANNOT_DELETE => 'maleblas elimini', - DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)', - DB_ERROR_CONSTRAINT => 'rompo de kondicxoj de provo', - DB_ERROR_DIVZERO => 'divido per 0 (nul)', - DB_ERROR_INVALID => 'malregule', - DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo', - DB_ERROR_INVALID_NUMBER => 'malregula nombro', - DB_ERROR_MISMATCH => 'eraro', - DB_ERROR_NODBSELECTED => 'datumbazo ne elektita', - DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo', - DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo', - DB_ERROR_NOT_CAPABLE => 'DBMS ne povas', - DB_ERROR_NOT_FOUND => 'ne trovita', - DB_ERROR_NOT_LOCKED => 'ne blokita', - DB_ERROR_SYNTAX => 'sintaksa eraro', - DB_ERROR_UNSUPPORTED => 'ne apogata', - DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio', - DB_ERROR_INVALID_DSN => 'malregula DSN-o', - DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa', - 0 => 'cxio bone', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ne suficxe da datumo', - DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita', - DB_ERROR_NOSUCHDB => 'datumbazo ne ekzistas', - DB_ERROR_ACCESS_VIOLATION => 'ne suficxe da rajto por atingo' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-fr.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-fr.inc.php.svn-base deleted file mode 100755 index 11127cd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-fr.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - 'fr', - DB_ERROR => 'erreur inconnue', - DB_ERROR_ALREADY_EXISTS => 'existe déjà', - DB_ERROR_CANNOT_CREATE => 'crétion impossible', - DB_ERROR_CANNOT_DELETE => 'effacement impossible', - DB_ERROR_CANNOT_DROP => 'suppression impossible', - DB_ERROR_CONSTRAINT => 'violation de contrainte', - DB_ERROR_DIVZERO => 'division par zéro', - DB_ERROR_INVALID => 'invalide', - DB_ERROR_INVALID_DATE => 'date ou heure invalide', - DB_ERROR_INVALID_NUMBER => 'nombre invalide', - DB_ERROR_MISMATCH => 'erreur de concordance', - DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée', - DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide', - DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante', - DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée', - DB_ERROR_NOT_FOUND => 'pas trouvé', - DB_ERROR_NOT_LOCKED => 'non verrouillé', - DB_ERROR_SYNTAX => 'erreur de syntaxe', - DB_ERROR_UNSUPPORTED => 'non supporté', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne', - DB_ERROR_INVALID_DSN => 'DSN invalide', - DB_ERROR_CONNECT_FAILED => 'échec à la connexion', - 0 => "pas d'erreur", // DB_OK - DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée', - DB_ERROR_NOSUCHDB => 'base de données inconnue', - DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-hu.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-hu.inc.php.svn-base deleted file mode 100755 index d6f0ef82..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-hu.inc.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'hu', - DB_ERROR => 'ismeretlen hiba', - DB_ERROR_ALREADY_EXISTS => 'mr ltezik', - DB_ERROR_CANNOT_CREATE => 'nem sikerlt ltrehozni', - DB_ERROR_CANNOT_DELETE => 'nem sikerlt trlni', - DB_ERROR_CANNOT_DROP => 'nem sikerlt eldobni', - DB_ERROR_CONSTRAINT => 'szablyok megszegse', - DB_ERROR_DIVZERO => 'oszts nullval', - DB_ERROR_INVALID => 'rvnytelen', - DB_ERROR_INVALID_DATE => 'rvnytelen dtum vagy id', - DB_ERROR_INVALID_NUMBER => 'rvnytelen szm', - DB_ERROR_MISMATCH => 'nem megfelel', - DB_ERROR_NODBSELECTED => 'nincs kivlasztott adatbzis', - DB_ERROR_NOSUCHFIELD => 'nincs ilyen mez', - DB_ERROR_NOSUCHTABLE => 'nincs ilyen tbla', - DB_ERROR_NOT_CAPABLE => 'DB backend nem tmogatja', - DB_ERROR_NOT_FOUND => 'nem tallhat', - DB_ERROR_NOT_LOCKED => 'nincs lezrva', - DB_ERROR_SYNTAX => 'szintaktikai hiba', - DB_ERROR_UNSUPPORTED => 'nem tmogatott', - DB_ERROR_VALUE_COUNT_ON_ROW => 'soron vgzett rtk szmlls', - DB_ERROR_INVALID_DSN => 'hibs DSN', - DB_ERROR_CONNECT_FAILED => 'sikertelen csatlakozs', - 0 => 'nincs hiba', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'tl kevs az adat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'bvtmny nem tallhat', - DB_ERROR_NOSUCHDB => 'nincs ilyen adatbzis', - DB_ERROR_ACCESS_VIOLATION => 'nincs jogosultsg' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-it.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-it.inc.php.svn-base deleted file mode 100755 index ac5cc5a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-it.inc.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - 'it', - DB_ERROR => 'errore sconosciuto', - DB_ERROR_ALREADY_EXISTS => 'esiste già', - DB_ERROR_CANNOT_CREATE => 'non posso creare', - DB_ERROR_CANNOT_DELETE => 'non posso cancellare', - DB_ERROR_CANNOT_DROP => 'non posso eliminare', - DB_ERROR_CONSTRAINT => 'violazione constraint', - DB_ERROR_DIVZERO => 'divisione per zero', - DB_ERROR_INVALID => 'non valido', - DB_ERROR_INVALID_DATE => 'data od ora non valida', - DB_ERROR_INVALID_NUMBER => 'numero non valido', - DB_ERROR_MISMATCH => 'diversi', - DB_ERROR_NODBSELECTED => 'nessun database selezionato', - DB_ERROR_NOSUCHFIELD => 'nessun campo trovato', - DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata', - DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato', - DB_ERROR_NOT_FOUND => 'non trovato', - DB_ERROR_NOT_LOCKED => 'non bloccato', - DB_ERROR_SYNTAX => 'errore di sintassi', - DB_ERROR_UNSUPPORTED => 'non supportato', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna', - DB_ERROR_INVALID_DSN => 'DSN non valido', - DB_ERROR_CONNECT_FAILED => 'connessione fallita', - 0 => 'nessun errore', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti', - DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata', - DB_ERROR_NOSUCHDB => 'database non trovato', - DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-nl.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-nl.inc.php.svn-base deleted file mode 100755 index abe77b52..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-nl.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - 'nl', - DB_ERROR => 'onbekende fout', - DB_ERROR_ALREADY_EXISTS => 'bestaat al', - DB_ERROR_CANNOT_CREATE => 'kan niet aanmaken', - DB_ERROR_CANNOT_DELETE => 'kan niet wissen', - DB_ERROR_CANNOT_DROP => 'kan niet verwijderen', - DB_ERROR_CONSTRAINT => 'constraint overtreding', - DB_ERROR_DIVZERO => 'poging tot delen door nul', - DB_ERROR_INVALID => 'ongeldig', - DB_ERROR_INVALID_DATE => 'ongeldige datum of tijd', - DB_ERROR_INVALID_NUMBER => 'ongeldig nummer', - DB_ERROR_MISMATCH => 'is incorrect', - DB_ERROR_NODBSELECTED => 'geen database geselecteerd', - DB_ERROR_NOSUCHFIELD => 'onbekend veld', - DB_ERROR_NOSUCHTABLE => 'onbekende tabel', - DB_ERROR_NOT_CAPABLE => 'database systeem is niet tot uitvoer in staat', - DB_ERROR_NOT_FOUND => 'niet gevonden', - DB_ERROR_NOT_LOCKED => 'niet vergrendeld', - DB_ERROR_SYNTAX => 'syntaxis fout', - DB_ERROR_UNSUPPORTED => 'niet ondersteund', - DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij', - DB_ERROR_INVALID_DSN => 'ongeldige DSN', - DB_ERROR_CONNECT_FAILED => 'connectie mislukt', - 0 => 'geen fout', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'onvoldoende data gegeven', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden', - DB_ERROR_NOSUCHDB => 'onbekende database', - DB_ERROR_ACCESS_VIOLATION => 'onvoldoende rechten' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pl.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pl.inc.php.svn-base deleted file mode 100755 index aee5bfdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pl.inc.php.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'pl', - DB_ERROR => 'niezidentyfikowany bd', - DB_ERROR_ALREADY_EXISTS => 'ju istniej', - DB_ERROR_CANNOT_CREATE => 'nie mona stworzy', - DB_ERROR_CANNOT_DELETE => 'nie mona usun', - DB_ERROR_CANNOT_DROP => 'nie mona porzuci', - DB_ERROR_CONSTRAINT => 'pogwacenie uprawnie', - DB_ERROR_DIVZERO => 'dzielenie przez zero', - DB_ERROR_INVALID => 'bdny', - DB_ERROR_INVALID_DATE => 'bdna godzina lub data', - DB_ERROR_INVALID_NUMBER => 'bdny numer', - DB_ERROR_MISMATCH => 'niedopasowanie', - DB_ERROR_NODBSELECTED => 'baza danych nie zostaa wybrana', - DB_ERROR_NOSUCHFIELD => 'nie znaleziono pola', - DB_ERROR_NOSUCHTABLE => 'nie znaleziono tabeli', - DB_ERROR_NOT_CAPABLE => 'nie zdolny', - DB_ERROR_NOT_FOUND => 'nie znaleziono', - DB_ERROR_NOT_LOCKED => 'nie zakmnity', - DB_ERROR_SYNTAX => 'bd skadni', - DB_ERROR_UNSUPPORTED => 'nie obsuguje', - DB_ERROR_VALUE_COUNT_ON_ROW => 'warto liczona w szeregu', - DB_ERROR_INVALID_DSN => 'bdny DSN', - DB_ERROR_CONNECT_FAILED => 'poczenie nie zostao zrealizowane', - 0 => 'brak bdw', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'niedostateczna ilo informacji', - DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia', - DB_ERROR_NOSUCHDB => 'nie znaleziono bazy', - DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pt-br.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pt-br.inc.php.svn-base deleted file mode 100755 index 320cce89..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-pt-br.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'pt-br', - DB_ERROR => 'erro desconhecido', - DB_ERROR_ALREADY_EXISTS => 'j existe', - DB_ERROR_CANNOT_CREATE => 'impossvel criar', - DB_ERROR_CANNOT_DELETE => 'impossvel exclur', - DB_ERROR_CANNOT_DROP => 'impossvel remover', - DB_ERROR_CONSTRAINT => 'violao do confinamente', - DB_ERROR_DIVZERO => 'diviso por zero', - DB_ERROR_INVALID => 'invlido', - DB_ERROR_INVALID_DATE => 'data ou hora invlida', - DB_ERROR_INVALID_NUMBER => 'nmero invlido', - DB_ERROR_MISMATCH => 'erro', - DB_ERROR_NODBSELECTED => 'nenhum banco de dados selecionado', - DB_ERROR_NOSUCHFIELD => 'campo invlido', - DB_ERROR_NOSUCHTABLE => 'tabela inexistente', - DB_ERROR_NOT_CAPABLE => 'capacidade invlida para este BD', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'erro de sintaxe', - DB_ERROR_UNSUPPORTED => -'no suportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas no corresponde ao de valores', - DB_ERROR_INVALID_DSN => 'DSN invlido', - DB_ERROR_CONNECT_FAILED => 'falha na conexo', - 0 => 'sem erro', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dados insuficientes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extenso no encontrada', - DB_ERROR_NOSUCHDB => 'banco de dados no encontrado', - DB_ERROR_ACCESS_VIOLATION => 'permisso insuficiente' -); -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ro.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ro.inc.php.svn-base deleted file mode 100755 index 7c9aa522..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ro.inc.php.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - */ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ro', - DB_ERROR => 'eroare necunoscuta', - DB_ERROR_ALREADY_EXISTS => 'deja exista', - DB_ERROR_CANNOT_CREATE => 'nu se poate creea', - DB_ERROR_CANNOT_DELETE => 'nu se poate sterge', - DB_ERROR_CANNOT_DROP => 'nu se poate executa drop', - DB_ERROR_CONSTRAINT => 'violare de constrain', - DB_ERROR_DIVZERO => 'se divide la zero', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'data sau timp invalide', - DB_ERROR_INVALID_NUMBER => 'numar invalid', - DB_ERROR_MISMATCH => 'nepotrivire-mismatch', - DB_ERROR_NODBSELECTED => 'nu exista baza de date selectata', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'tabela inexistenta', - DB_ERROR_NOT_CAPABLE => 'functie optionala neinstalata', - DB_ERROR_NOT_FOUND => 'negasit', - DB_ERROR_NOT_LOCKED => 'neblocat', - DB_ERROR_SYNTAX => 'eroare de sintaxa', - DB_ERROR_UNSUPPORTED => 'nu e suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana', - DB_ERROR_INVALID_DSN => 'DSN invalid', - DB_ERROR_CONNECT_FAILED => 'conectare esuata', - 0 => 'fara eroare', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'data introduse insuficiente', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita', - DB_ERROR_NOSUCHDB => 'nu exista baza de date', - DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente' -); -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ru1251.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ru1251.inc.php.svn-base deleted file mode 100755 index e273f427..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-ru1251.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'ru1251', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' (drop)', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' 0', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => '', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-sv.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-sv.inc.php.svn-base deleted file mode 100755 index 64a5b4bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-sv.inc.php.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - 'en', - DB_ERROR => 'Oknt fel', - DB_ERROR_ALREADY_EXISTS => 'finns redan', - DB_ERROR_CANNOT_CREATE => 'kan inte skapa', - DB_ERROR_CANNOT_DELETE => 'kan inte ta bort', - DB_ERROR_CANNOT_DROP => 'kan inte slppa', - DB_ERROR_CONSTRAINT => 'begrnsning krnkt', - DB_ERROR_DIVZERO => 'division med noll', - DB_ERROR_INVALID => 'ogiltig', - DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid', - DB_ERROR_INVALID_NUMBER => 'ogiltigt tal', - DB_ERROR_MISMATCH => 'felaktig matchning', - DB_ERROR_NODBSELECTED => 'ingen databas vald', - DB_ERROR_NOSUCHFIELD => 'inget sdant flt', - DB_ERROR_NOSUCHTABLE => 'ingen sdan tabell', - DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte', - DB_ERROR_NOT_FOUND => 'finns inte', - DB_ERROR_NOT_LOCKED => 'inte lst', - DB_ERROR_SYNTAX => 'syntaxfel', - DB_ERROR_UNSUPPORTED => 'stds ej', - DB_ERROR_VALUE_COUNT_ON_ROW => 'vrde rknat p rad', - DB_ERROR_INVALID_DSN => 'ogiltig DSN', - DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades', - 0 => 'inget fel', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'otillrckligt med data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'utkning hittades ej', - DB_ERROR_NOSUCHDB => 'ingen sdan databas', - DB_ERROR_ACCESS_VIOLATION => 'otillrckliga rttigheter' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-uk1251.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-uk1251.inc.php.svn-base deleted file mode 100755 index 9fa32ed5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/.svn/text-base/adodb-uk1251.inc.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - 'uk1251', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' (drop)', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' 0', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => '', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => '\' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ar.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ar.inc.php deleted file mode 100755 index 2b50570e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ar.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ar', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => ' ', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => 'DSN ', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bg.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bg.inc.php deleted file mode 100755 index 075ba293..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bg.inc.php +++ /dev/null @@ -1,38 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bg', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bgutf8.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bgutf8.inc.php deleted file mode 100755 index c7c80fe4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-bgutf8.inc.php +++ /dev/null @@ -1,38 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bgutf8', - DB_ERROR => 'неизвестна грешка', - DB_ERROR_ALREADY_EXISTS => 'вече съществува', - DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена', - DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита', - DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена', - DB_ERROR_CONSTRAINT => 'нарушено условие', - DB_ERROR_DIVZERO => 'деление на нула', - DB_ERROR_INVALID => 'неправилно', - DB_ERROR_INVALID_DATE => 'некоректна дата или час', - DB_ERROR_INVALID_NUMBER => 'невалиден номер', - DB_ERROR_MISMATCH => 'погрешна употреба', - DB_ERROR_NODBSELECTED => 'не е избрана база данни', - DB_ERROR_NOSUCHFIELD => 'несъществуващо поле', - DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'не е намерена', - DB_ERROR_NOT_LOCKED => 'не е заключена', - DB_ERROR_SYNTAX => 'грешен синтаксис', - DB_ERROR_UNSUPPORTED => 'не се поддържа', - DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда', - DB_ERROR_INVALID_DSN => 'невалиден DSN', - DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена', - 0 => 'няма грешки', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни', - DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено', - DB_ERROR_NOSUCHDB => 'несъществуваща база данни', - DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ca.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ca.inc.php deleted file mode 100755 index 3e6a4496..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ca.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'ca', - DB_ERROR => 'error desconegut', - DB_ERROR_ALREADY_EXISTS => 'ja existeix', - DB_ERROR_CANNOT_CREATE => 'no es pot crear', - DB_ERROR_CANNOT_DELETE => 'no es pot esborrar', - DB_ERROR_CANNOT_DROP => 'no es pot eliminar', - DB_ERROR_CONSTRAINT => 'violaci de constraint', - DB_ERROR_DIVZERO => 'divisi per zero', - DB_ERROR_INVALID => 'no s vlid', - DB_ERROR_INVALID_DATE => 'la data o l\'hora no sn vlides', - DB_ERROR_INVALID_NUMBER => 'el nombre no s vlid', - DB_ERROR_MISMATCH => 'no hi ha coincidncia', - DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'taula inexistent', - DB_ERROR_NOT_CAPABLE => 'l\'execuci secundria de DB no pot', - DB_ERROR_NOT_FOUND => 'no trobat', - DB_ERROR_NOT_LOCKED => 'no blocat', - DB_ERROR_SYNTAX => 'error de sintaxi', - DB_ERROR_UNSUPPORTED => 'no suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila', - DB_ERROR_INVALID_DSN => 'el DSN no s vlid', - DB_ERROR_CONNECT_FAILED => 'connexi fallida', - 0 => 'cap error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'les dades subministrades sn insuficients', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensi no trobada', - DB_ERROR_NOSUCHDB => 'base de dades inexistent', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cn.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cn.inc.php deleted file mode 100755 index eb8c7de5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cn.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'cn', - DB_ERROR => 'δ֪', - DB_ERROR_ALREADY_EXISTS => 'Ѿ', - DB_ERROR_CANNOT_CREATE => 'ܴ', - DB_ERROR_CANNOT_DELETE => 'ɾ', - DB_ERROR_CANNOT_DROP => 'ܶ', - DB_ERROR_CONSTRAINT => 'Լ', - DB_ERROR_DIVZERO => '0', - DB_ERROR_INVALID => 'Ч', - DB_ERROR_INVALID_DATE => 'Чڻʱ', - DB_ERROR_INVALID_NUMBER => 'Ч', - DB_ERROR_MISMATCH => 'ƥ', - DB_ERROR_NODBSELECTED => 'ûݿⱻѡ', - DB_ERROR_NOSUCHFIELD => 'ûӦֶ', - DB_ERROR_NOSUCHTABLE => 'ûӦı', - DB_ERROR_NOT_CAPABLE => 'ݿ̨', - DB_ERROR_NOT_FOUND => 'ûз', - DB_ERROR_NOT_LOCKED => 'ûб', - DB_ERROR_SYNTAX => '﷨', - DB_ERROR_UNSUPPORTED => '֧', - DB_ERROR_VALUE_COUNT_ON_ROW => 'ۼֵ', - DB_ERROR_INVALID_DSN => 'ЧԴ (DSN)', - DB_ERROR_CONNECT_FAILED => 'ʧ', - 0 => 'ûд', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ṩݲܷҪ', - DB_ERROR_EXTENSION_NOT_FOUND=> 'չûб', - DB_ERROR_NOSUCHDB => 'ûӦݿ', - DB_ERROR_ACCESS_VIOLATION => 'ûкʵȨ' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cz.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cz.inc.php deleted file mode 100755 index 2424c244..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-cz.inc.php +++ /dev/null @@ -1,40 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'cz', - DB_ERROR => 'neznm chyba', - DB_ERROR_ALREADY_EXISTS => 'ji? existuje', - DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it', - DB_ERROR_CANNOT_DELETE => 'nelze smazat', - DB_ERROR_CANNOT_DROP => 'nelze odstranit', - DB_ERROR_CONSTRAINT => 'poru?en omezujc podmnky', - DB_ERROR_DIVZERO => 'd?len nulou', - DB_ERROR_INVALID => 'neplatn', - DB_ERROR_INVALID_DATE => 'neplatn datum nebo ?as', - DB_ERROR_INVALID_NUMBER => 'neplatn ?slo', - DB_ERROR_MISMATCH => 'nesouhlas', - DB_ERROR_NODBSELECTED => '?dn databze nen vybrna', - DB_ERROR_NOSUCHFIELD => 'pole nenalezeno', - DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena', - DB_ERROR_NOT_CAPABLE => 'nepodporovno', - DB_ERROR_NOT_FOUND => 'nenalezeno', - DB_ERROR_NOT_LOCKED => 'nezam?eno', - DB_ERROR_SYNTAX => 'syntaktick chyba', - DB_ERROR_UNSUPPORTED => 'nepodporovno', - DB_ERROR_VALUE_COUNT_ON_ROW => '', - DB_ERROR_INVALID_DSN => 'neplatn DSN', - DB_ERROR_CONNECT_FAILED => 'p?ipojen selhalo', - 0 => 'bez chyb', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'mlo zdrojovch dat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'roz??en nenalezeno', - DB_ERROR_NOSUCHDB => 'databze neexistuje', - DB_ERROR_ACCESS_VIOLATION => 'nedostate?n prva' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-da.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-da.inc.php deleted file mode 100755 index b0394a8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-da.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'da', - DB_ERROR => 'ukendt fejl', - DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede', - DB_ERROR_CANNOT_CREATE => 'kan ikke oprette', - DB_ERROR_CANNOT_DELETE => 'kan ikke slette', - DB_ERROR_CANNOT_DROP => 'kan ikke droppe', - DB_ERROR_CONSTRAINT => 'begrænsning krænket', - DB_ERROR_DIVZERO => 'division med nul', - DB_ERROR_INVALID => 'ugyldig', - DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet', - DB_ERROR_INVALID_NUMBER => 'ugyldigt tal', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'ingen database valgt', - DB_ERROR_NOSUCHFIELD => 'felt findes ikke', - DB_ERROR_NOSUCHTABLE => 'tabel findes ikke', - DB_ERROR_NOT_CAPABLE => 'DB backend opgav', - DB_ERROR_NOT_FOUND => 'ikke fundet', - DB_ERROR_NOT_LOCKED => 'ikke låst', - DB_ERROR_SYNTAX => 'syntaksfejl', - DB_ERROR_UNSUPPORTED => 'ikke understøttet', - DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter', - DB_ERROR_INVALID_DSN => 'ugyldig DSN', - DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes', - 0 => 'ingen fejl', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet', - DB_ERROR_NOSUCHDB => 'database ikke fundet', - DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-de.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-de.inc.php deleted file mode 100755 index 244cb2f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-de.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'de', - DB_ERROR => 'Unbekannter Fehler', - DB_ERROR_ALREADY_EXISTS => 'existiert bereits', - DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen', - DB_ERROR_CANNOT_DELETE => 'kann nicht löschen', - DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden', - DB_ERROR_CONSTRAINT => 'Constraint Verletzung', - DB_ERROR_DIVZERO => 'Division durch Null', - DB_ERROR_INVALID => 'ung¨ltig', - DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit', - DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl', - DB_ERROR_MISMATCH => 'Unverträglichkeit', - DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt', - DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden', - DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden', - DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert', - DB_ERROR_NOT_FOUND => 'nicht gefunden', - DB_ERROR_NOT_LOCKED => 'nicht gesperrt', - DB_ERROR_SYNTAX => 'Syntaxfehler', - DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt', - DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage', - DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN', - DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden', - 0 => 'kein Fehler', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert', - DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden', - DB_ERROR_NOSUCHDB => 'keine Datenbank', - DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-en.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-en.inc.php deleted file mode 100755 index d719d7a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-en.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - 'en', - DB_ERROR => 'unknown error', - DB_ERROR_ALREADY_EXISTS => 'already exists', - DB_ERROR_CANNOT_CREATE => 'can not create', - DB_ERROR_CANNOT_DELETE => 'can not delete', - DB_ERROR_CANNOT_DROP => 'can not drop', - DB_ERROR_CONSTRAINT => 'constraint violation', - DB_ERROR_DIVZERO => 'division by zero', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'invalid date or time', - DB_ERROR_INVALID_NUMBER => 'invalid number', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'no database selected', - DB_ERROR_NOSUCHFIELD => 'no such field', - DB_ERROR_NOSUCHTABLE => 'no such table', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'not found', - DB_ERROR_NOT_LOCKED => 'not locked', - DB_ERROR_SYNTAX => 'syntax error', - DB_ERROR_UNSUPPORTED => 'not supported', - DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', - DB_ERROR_INVALID_DSN => 'invalid DSN', - DB_ERROR_CONNECT_FAILED => 'connect failed', - 0 => 'no error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'insufficient data supplied', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found', - DB_ERROR_NOSUCHDB => 'no such database', - DB_ERROR_ACCESS_VIOLATION => 'insufficient permissions' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-es.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-es.inc.php deleted file mode 100755 index 01bbc8ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-es.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'es', - DB_ERROR => 'error desconocido', - DB_ERROR_ALREADY_EXISTS => 'ya existe', - DB_ERROR_CANNOT_CREATE => 'imposible crear', - DB_ERROR_CANNOT_DELETE => 'imposible borrar', - DB_ERROR_CANNOT_DROP => 'imposible hacer drop', - DB_ERROR_CONSTRAINT => 'violacion de constraint', - DB_ERROR_DIVZERO => 'division por cero', - DB_ERROR_INVALID => 'invalido', - DB_ERROR_INVALID_DATE => 'fecha u hora invalida', - DB_ERROR_INVALID_NUMBER => 'numero invalido', - DB_ERROR_MISMATCH => 'error', - DB_ERROR_NODBSELECTED => 'no hay base de datos seleccionada', - DB_ERROR_NOSUCHFIELD => 'campo invalido', - DB_ERROR_NOSUCHTABLE => 'tabla no existe', - DB_ERROR_NOT_CAPABLE => 'capacidad invalida para esta DB', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'error de sintaxis', - DB_ERROR_UNSUPPORTED => 'no soportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores', - DB_ERROR_INVALID_DSN => 'DSN invalido', - DB_ERROR_CONNECT_FAILED => 'fallo la conexion', - 0 => 'sin error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'insuficientes datos', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada', - DB_ERROR_NOSUCHDB => 'base de datos no encontrada', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficientes' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-esperanto.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-esperanto.inc.php deleted file mode 100755 index 60ae42f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-esperanto.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'eo', - DB_ERROR => 'nekonata eraro', - DB_ERROR_ALREADY_EXISTS => 'jam ekzistas', - DB_ERROR_CANNOT_CREATE => 'maleblas krei', - DB_ERROR_CANNOT_DELETE => 'maleblas elimini', - DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)', - DB_ERROR_CONSTRAINT => 'rompo de kondicxoj de provo', - DB_ERROR_DIVZERO => 'divido per 0 (nul)', - DB_ERROR_INVALID => 'malregule', - DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo', - DB_ERROR_INVALID_NUMBER => 'malregula nombro', - DB_ERROR_MISMATCH => 'eraro', - DB_ERROR_NODBSELECTED => 'datumbazo ne elektita', - DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo', - DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo', - DB_ERROR_NOT_CAPABLE => 'DBMS ne povas', - DB_ERROR_NOT_FOUND => 'ne trovita', - DB_ERROR_NOT_LOCKED => 'ne blokita', - DB_ERROR_SYNTAX => 'sintaksa eraro', - DB_ERROR_UNSUPPORTED => 'ne apogata', - DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio', - DB_ERROR_INVALID_DSN => 'malregula DSN-o', - DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa', - 0 => 'cxio bone', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ne suficxe da datumo', - DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita', - DB_ERROR_NOSUCHDB => 'datumbazo ne ekzistas', - DB_ERROR_ACCESS_VIOLATION => 'ne suficxe da rajto por atingo' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-fr.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-fr.inc.php deleted file mode 100755 index 066a2a5e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-fr.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'fr', - DB_ERROR => 'erreur inconnue', - DB_ERROR_ALREADY_EXISTS => 'existe déjà', - DB_ERROR_CANNOT_CREATE => 'crétion impossible', - DB_ERROR_CANNOT_DELETE => 'effacement impossible', - DB_ERROR_CANNOT_DROP => 'suppression impossible', - DB_ERROR_CONSTRAINT => 'violation de contrainte', - DB_ERROR_DIVZERO => 'division par zéro', - DB_ERROR_INVALID => 'invalide', - DB_ERROR_INVALID_DATE => 'date ou heure invalide', - DB_ERROR_INVALID_NUMBER => 'nombre invalide', - DB_ERROR_MISMATCH => 'erreur de concordance', - DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée', - DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide', - DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante', - DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée', - DB_ERROR_NOT_FOUND => 'pas trouvé', - DB_ERROR_NOT_LOCKED => 'non verrouillé', - DB_ERROR_SYNTAX => 'erreur de syntaxe', - DB_ERROR_UNSUPPORTED => 'non supporté', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne', - DB_ERROR_INVALID_DSN => 'DSN invalide', - DB_ERROR_CONNECT_FAILED => 'échec à la connexion', - 0 => "pas d'erreur", // DB_OK - DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée', - DB_ERROR_NOSUCHDB => 'base de données inconnue', - DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-hu.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-hu.inc.php deleted file mode 100755 index d5b91d9c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-hu.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'hu', - DB_ERROR => 'ismeretlen hiba', - DB_ERROR_ALREADY_EXISTS => 'mr ltezik', - DB_ERROR_CANNOT_CREATE => 'nem sikerlt ltrehozni', - DB_ERROR_CANNOT_DELETE => 'nem sikerlt trlni', - DB_ERROR_CANNOT_DROP => 'nem sikerlt eldobni', - DB_ERROR_CONSTRAINT => 'szablyok megszegse', - DB_ERROR_DIVZERO => 'oszts nullval', - DB_ERROR_INVALID => 'rvnytelen', - DB_ERROR_INVALID_DATE => 'rvnytelen dtum vagy id', - DB_ERROR_INVALID_NUMBER => 'rvnytelen szm', - DB_ERROR_MISMATCH => 'nem megfelel', - DB_ERROR_NODBSELECTED => 'nincs kivlasztott adatbzis', - DB_ERROR_NOSUCHFIELD => 'nincs ilyen mez', - DB_ERROR_NOSUCHTABLE => 'nincs ilyen tbla', - DB_ERROR_NOT_CAPABLE => 'DB backend nem tmogatja', - DB_ERROR_NOT_FOUND => 'nem tallhat', - DB_ERROR_NOT_LOCKED => 'nincs lezrva', - DB_ERROR_SYNTAX => 'szintaktikai hiba', - DB_ERROR_UNSUPPORTED => 'nem tmogatott', - DB_ERROR_VALUE_COUNT_ON_ROW => 'soron vgzett rtk szmlls', - DB_ERROR_INVALID_DSN => 'hibs DSN', - DB_ERROR_CONNECT_FAILED => 'sikertelen csatlakozs', - 0 => 'nincs hiba', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'tl kevs az adat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'bvtmny nem tallhat', - DB_ERROR_NOSUCHDB => 'nincs ilyen adatbzis', - DB_ERROR_ACCESS_VIOLATION => 'nincs jogosultsg' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-it.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-it.inc.php deleted file mode 100755 index 20c5b93b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-it.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - 'it', - DB_ERROR => 'errore sconosciuto', - DB_ERROR_ALREADY_EXISTS => 'esiste già', - DB_ERROR_CANNOT_CREATE => 'non posso creare', - DB_ERROR_CANNOT_DELETE => 'non posso cancellare', - DB_ERROR_CANNOT_DROP => 'non posso eliminare', - DB_ERROR_CONSTRAINT => 'violazione constraint', - DB_ERROR_DIVZERO => 'divisione per zero', - DB_ERROR_INVALID => 'non valido', - DB_ERROR_INVALID_DATE => 'data od ora non valida', - DB_ERROR_INVALID_NUMBER => 'numero non valido', - DB_ERROR_MISMATCH => 'diversi', - DB_ERROR_NODBSELECTED => 'nessun database selezionato', - DB_ERROR_NOSUCHFIELD => 'nessun campo trovato', - DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata', - DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato', - DB_ERROR_NOT_FOUND => 'non trovato', - DB_ERROR_NOT_LOCKED => 'non bloccato', - DB_ERROR_SYNTAX => 'errore di sintassi', - DB_ERROR_UNSUPPORTED => 'non supportato', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna', - DB_ERROR_INVALID_DSN => 'DSN non valido', - DB_ERROR_CONNECT_FAILED => 'connessione fallita', - 0 => 'nessun errore', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti', - DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata', - DB_ERROR_NOSUCHDB => 'database non trovato', - DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-nl.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-nl.inc.php deleted file mode 100755 index bd9eb2f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-nl.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'nl', - DB_ERROR => 'onbekende fout', - DB_ERROR_ALREADY_EXISTS => 'bestaat al', - DB_ERROR_CANNOT_CREATE => 'kan niet aanmaken', - DB_ERROR_CANNOT_DELETE => 'kan niet wissen', - DB_ERROR_CANNOT_DROP => 'kan niet verwijderen', - DB_ERROR_CONSTRAINT => 'constraint overtreding', - DB_ERROR_DIVZERO => 'poging tot delen door nul', - DB_ERROR_INVALID => 'ongeldig', - DB_ERROR_INVALID_DATE => 'ongeldige datum of tijd', - DB_ERROR_INVALID_NUMBER => 'ongeldig nummer', - DB_ERROR_MISMATCH => 'is incorrect', - DB_ERROR_NODBSELECTED => 'geen database geselecteerd', - DB_ERROR_NOSUCHFIELD => 'onbekend veld', - DB_ERROR_NOSUCHTABLE => 'onbekende tabel', - DB_ERROR_NOT_CAPABLE => 'database systeem is niet tot uitvoer in staat', - DB_ERROR_NOT_FOUND => 'niet gevonden', - DB_ERROR_NOT_LOCKED => 'niet vergrendeld', - DB_ERROR_SYNTAX => 'syntaxis fout', - DB_ERROR_UNSUPPORTED => 'niet ondersteund', - DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij', - DB_ERROR_INVALID_DSN => 'ongeldige DSN', - DB_ERROR_CONNECT_FAILED => 'connectie mislukt', - 0 => 'geen fout', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'onvoldoende data gegeven', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden', - DB_ERROR_NOSUCHDB => 'onbekende database', - DB_ERROR_ACCESS_VIOLATION => 'onvoldoende rechten' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pl.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pl.inc.php deleted file mode 100755 index b8749640..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pl.inc.php +++ /dev/null @@ -1,36 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'pl', - DB_ERROR => 'niezidentyfikowany bd', - DB_ERROR_ALREADY_EXISTS => 'ju istniej', - DB_ERROR_CANNOT_CREATE => 'nie mona stworzy', - DB_ERROR_CANNOT_DELETE => 'nie mona usun', - DB_ERROR_CANNOT_DROP => 'nie mona porzuci', - DB_ERROR_CONSTRAINT => 'pogwacenie uprawnie', - DB_ERROR_DIVZERO => 'dzielenie przez zero', - DB_ERROR_INVALID => 'bdny', - DB_ERROR_INVALID_DATE => 'bdna godzina lub data', - DB_ERROR_INVALID_NUMBER => 'bdny numer', - DB_ERROR_MISMATCH => 'niedopasowanie', - DB_ERROR_NODBSELECTED => 'baza danych nie zostaa wybrana', - DB_ERROR_NOSUCHFIELD => 'nie znaleziono pola', - DB_ERROR_NOSUCHTABLE => 'nie znaleziono tabeli', - DB_ERROR_NOT_CAPABLE => 'nie zdolny', - DB_ERROR_NOT_FOUND => 'nie znaleziono', - DB_ERROR_NOT_LOCKED => 'nie zakmnity', - DB_ERROR_SYNTAX => 'bd skadni', - DB_ERROR_UNSUPPORTED => 'nie obsuguje', - DB_ERROR_VALUE_COUNT_ON_ROW => 'warto liczona w szeregu', - DB_ERROR_INVALID_DSN => 'bdny DSN', - DB_ERROR_CONNECT_FAILED => 'poczenie nie zostao zrealizowane', - 0 => 'brak bdw', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'niedostateczna ilo informacji', - DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia', - DB_ERROR_NOSUCHDB => 'nie znaleziono bazy', - DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia' -); -?> - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pt-br.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pt-br.inc.php deleted file mode 100755 index 3424099a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-pt-br.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'pt-br', - DB_ERROR => 'erro desconhecido', - DB_ERROR_ALREADY_EXISTS => 'j existe', - DB_ERROR_CANNOT_CREATE => 'impossvel criar', - DB_ERROR_CANNOT_DELETE => 'impossvel exclur', - DB_ERROR_CANNOT_DROP => 'impossvel remover', - DB_ERROR_CONSTRAINT => 'violao do confinamente', - DB_ERROR_DIVZERO => 'diviso por zero', - DB_ERROR_INVALID => 'invlido', - DB_ERROR_INVALID_DATE => 'data ou hora invlida', - DB_ERROR_INVALID_NUMBER => 'nmero invlido', - DB_ERROR_MISMATCH => 'erro', - DB_ERROR_NODBSELECTED => 'nenhum banco de dados selecionado', - DB_ERROR_NOSUCHFIELD => 'campo invlido', - DB_ERROR_NOSUCHTABLE => 'tabela inexistente', - DB_ERROR_NOT_CAPABLE => 'capacidade invlida para este BD', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'erro de sintaxe', - DB_ERROR_UNSUPPORTED => -'no suportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas no corresponde ao de valores', - DB_ERROR_INVALID_DSN => 'DSN invlido', - DB_ERROR_CONNECT_FAILED => 'falha na conexo', - 0 => 'sem erro', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dados insuficientes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extenso no encontrada', - DB_ERROR_NOSUCHDB => 'banco de dados no encontrado', - DB_ERROR_ACCESS_VIOLATION => 'permisso insuficiente' -); -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ro.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ro.inc.php deleted file mode 100755 index f390dbab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ro.inc.php +++ /dev/null @@ -1,36 +0,0 @@ - */ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ro', - DB_ERROR => 'eroare necunoscuta', - DB_ERROR_ALREADY_EXISTS => 'deja exista', - DB_ERROR_CANNOT_CREATE => 'nu se poate creea', - DB_ERROR_CANNOT_DELETE => 'nu se poate sterge', - DB_ERROR_CANNOT_DROP => 'nu se poate executa drop', - DB_ERROR_CONSTRAINT => 'violare de constrain', - DB_ERROR_DIVZERO => 'se divide la zero', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'data sau timp invalide', - DB_ERROR_INVALID_NUMBER => 'numar invalid', - DB_ERROR_MISMATCH => 'nepotrivire-mismatch', - DB_ERROR_NODBSELECTED => 'nu exista baza de date selectata', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'tabela inexistenta', - DB_ERROR_NOT_CAPABLE => 'functie optionala neinstalata', - DB_ERROR_NOT_FOUND => 'negasit', - DB_ERROR_NOT_LOCKED => 'neblocat', - DB_ERROR_SYNTAX => 'eroare de sintaxa', - DB_ERROR_UNSUPPORTED => 'nu e suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana', - DB_ERROR_INVALID_DSN => 'DSN invalid', - DB_ERROR_CONNECT_FAILED => 'conectare esuata', - 0 => 'fara eroare', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'data introduse insuficiente', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita', - DB_ERROR_NOSUCHDB => 'nu exista baza de date', - DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente' -); -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ru1251.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ru1251.inc.php deleted file mode 100755 index 3a20538a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-ru1251.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'ru1251', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' (drop)', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' 0', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => '', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-sv.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-sv.inc.php deleted file mode 100755 index a9fd6981..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-sv.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'en', - DB_ERROR => 'Oknt fel', - DB_ERROR_ALREADY_EXISTS => 'finns redan', - DB_ERROR_CANNOT_CREATE => 'kan inte skapa', - DB_ERROR_CANNOT_DELETE => 'kan inte ta bort', - DB_ERROR_CANNOT_DROP => 'kan inte slppa', - DB_ERROR_CONSTRAINT => 'begrnsning krnkt', - DB_ERROR_DIVZERO => 'division med noll', - DB_ERROR_INVALID => 'ogiltig', - DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid', - DB_ERROR_INVALID_NUMBER => 'ogiltigt tal', - DB_ERROR_MISMATCH => 'felaktig matchning', - DB_ERROR_NODBSELECTED => 'ingen databas vald', - DB_ERROR_NOSUCHFIELD => 'inget sdant flt', - DB_ERROR_NOSUCHTABLE => 'ingen sdan tabell', - DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte', - DB_ERROR_NOT_FOUND => 'finns inte', - DB_ERROR_NOT_LOCKED => 'inte lst', - DB_ERROR_SYNTAX => 'syntaxfel', - DB_ERROR_UNSUPPORTED => 'stds ej', - DB_ERROR_VALUE_COUNT_ON_ROW => 'vrde rknat p rad', - DB_ERROR_INVALID_DSN => 'ogiltig DSN', - DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades', - 0 => 'inget fel', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'otillrckligt med data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'utkning hittades ej', - DB_ERROR_NOSUCHDB => 'ingen sdan databas', - DB_ERROR_ACCESS_VIOLATION => 'otillrckliga rttigheter' -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-uk1251.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-uk1251.inc.php deleted file mode 100755 index 53a90df8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/lang/adodb-uk1251.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'uk1251', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' (drop)', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' 0', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => '', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => '\' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/license.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/license.txt deleted file mode 100755 index 2353871c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/license.txt +++ /dev/null @@ -1,182 +0,0 @@ -ADOdb is dual licensed using BSD and LGPL. - -In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license. - -For more info about ADOdb, visit http://adodb.sourceforge.net/ - -BSD Style-License -================= - -Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this list -of conditions and the following disclaimer in the documentation and/or other materials -provided with the distribution. - -Neither the name of the John Lim nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior written -permission. - -DISCLAIMER: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -========================================================== -GNU LESSER GENERAL PUBLIC LICENSE -Version 2.1, February 1999 - -Copyright (C) 1991, 1999 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - -Preamble -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - -This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. - -When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. - -To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. - -For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - -We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - -To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - -Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. - -Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. - -When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. - -We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. - -For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. - -In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. - -Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. - -The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". - -A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. - -The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) - -"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - -1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - -a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - -Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. - -This option is useful when you wish to copy part of the code of the Library into a program that is not a library. - -4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. - -If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. - -5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. - -However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. - -When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. - -If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) - -Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - -6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. - -You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - - -a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. -c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - -7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - - -a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. - -10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - -11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - -14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/all-wcprops deleted file mode 100755 index d039f964..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pear -END -readme.Auth.txt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pear/readme.Auth.txt -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/entries deleted file mode 100755 index 3856ba47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/entries +++ /dev/null @@ -1,44 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/pear -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Auth -dir - -readme.Auth.txt -file - - - - -2008-02-29T14:57:50.177379Z -87ddb0ed51cc77d342497100f67efcbd -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/prop-base/readme.Auth.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/prop-base/readme.Auth.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/prop-base/readme.Auth.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/text-base/readme.Auth.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/text-base/readme.Auth.txt.svn-base deleted file mode 100755 index b6b0c157..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/.svn/text-base/readme.Auth.txt.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -From: Rich Tango-Lowy (richtl#arscognita.com) -Date: Sat, May 29, 2004 11:20 am - -OK, I hacked out an ADOdb container for PEAR-Auth. The error handling's -a bit of a mess, but all the methods work. - -Copy ADOdb.php to your pear/Auth/Container/ directory. - -Use the ADOdb container exactly as you would the DB -container, but specify 'ADOdb' instead of 'DB': - -$dsn = "mysql://myuser:mypass@localhost/authdb"; -$a = new Auth("ADOdb", $dsn, "loginFunction"); - - -------------------- - -John Lim adds: - -See http://pear.php.net/manual/en/package.authentication.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/all-wcprops deleted file mode 100755 index 01988f5a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pear/Auth -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/entries deleted file mode 100755 index 72dd279b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/entries +++ /dev/null @@ -1,31 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/pear/Auth -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Container -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/all-wcprops deleted file mode 100755 index 7aa14331..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pear/Auth/Container -END -ADOdb.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/pear/Auth/Container/ADOdb.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/entries deleted file mode 100755 index 900feaf5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/pear/Auth/Container -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ADOdb.php -file - - - - -2008-02-29T14:57:50.130517Z -da6b477880ec9f41dd11a2a45cda67d5 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/prop-base/ADOdb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/prop-base/ADOdb.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/prop-base/ADOdb.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/text-base/ADOdb.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/text-base/ADOdb.php.svn-base deleted file mode 100755 index d73433ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/.svn/text-base/ADOdb.php.svn-base +++ /dev/null @@ -1,413 +0,0 @@ - -// | Richard Tango-Lowy | -// +----------------------------------------------------------------------+ -// -// $Id$ -// - -require_once 'Auth/Container.php'; -require_once 'adodb.inc.php'; -require_once 'adodb-pear.inc.php'; -require_once 'adodb-errorpear.inc.php'; - -/** - * Storage driver for fetching login data from a database using ADOdb-PHP. - * - * This storage driver can use all databases which are supported - * by the ADBdb DB abstraction layer to fetch login data. - * See http://php.weblogs.com/adodb for information on ADOdb. - * NOTE: The ADOdb directory MUST be in your PHP include_path! - * - * @author Richard Tango-Lowy - * @package Auth - * @version $Revision$ - */ -class Auth_Container_ADOdb extends Auth_Container -{ - - /** - * Additional options for the storage container - * @var array - */ - var $options = array(); - - /** - * DB object - * @var object - */ - var $db = null; - var $dsn = ''; - - /** - * User that is currently selected from the DB. - * @var string - */ - var $activeUser = ''; - - // {{{ Constructor - - /** - * Constructor of the container class - * - * Initate connection to the database via PEAR::ADOdb - * - * @param string Connection data or DB object - * @return object Returns an error object if something went wrong - */ - function Auth_Container_ADOdb($dsn) - { - $this->_setDefaults(); - - if (is_array($dsn)) { - $this->_parseOptions($dsn); - - if (empty($this->options['dsn'])) { - PEAR::raiseError('No connection parameters specified!'); - } - } else { - // Extract db_type from dsn string. - $this->options['dsn'] = $dsn; - } - } - - // }}} - // {{{ _connect() - - /** - * Connect to database by using the given DSN string - * - * @access private - * @param string DSN string - * @return mixed Object on error, otherwise bool - */ - function _connect($dsn) - { - if (is_string($dsn) || is_array($dsn)) { - if(!$this->db) { - $this->db = &ADONewConnection($dsn); - if( $err = ADODB_Pear_error() ) { - return PEAR::raiseError($err); - } - } - - } else { - return PEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__, - 41, - PEAR_ERROR_RETURN, - null, - null - ); - } - - if(!$this->db) { - return PEAR::raiseError(ADODB_Pear_error()); - } else { - return true; - } - } - - // }}} - // {{{ _prepare() - - /** - * Prepare database connection - * - * This function checks if we have already opened a connection to - * the database. If that's not the case, a new connection is opened. - * - * @access private - * @return mixed True or a DB error object. - */ - function _prepare() - { - if(!$this->db) { - $res = $this->_connect($this->options['dsn']); - } - return true; - } - - // }}} - // {{{ query() - - /** - * Prepare query to the database - * - * This function checks if we have already opened a connection to - * the database. If that's not the case, a new connection is opened. - * After that the query is passed to the database. - * - * @access public - * @param string Query string - * @return mixed a DB_result object or DB_OK on success, a DB - * or PEAR error on failure - */ - function query($query) - { - $err = $this->_prepare(); - if ($err !== true) { - return $err; - } - return $this->db->query($query); - } - - // }}} - // {{{ _setDefaults() - - /** - * Set some default options - * - * @access private - * @return void - */ - function _setDefaults() - { - $this->options['db_type'] = 'mysql'; - $this->options['table'] = 'auth'; - $this->options['usernamecol'] = 'username'; - $this->options['passwordcol'] = 'password'; - $this->options['dsn'] = ''; - $this->options['db_fields'] = ''; - $this->options['cryptType'] = 'md5'; - } - - // }}} - // {{{ _parseOptions() - - /** - * Parse options passed to the container class - * - * @access private - * @param array - */ - function _parseOptions($array) - { - foreach ($array as $key => $value) { - if (isset($this->options[$key])) { - $this->options[$key] = $value; - } - } - - /* Include additional fields if they exist */ - if(!empty($this->options['db_fields'])){ - if(is_array($this->options['db_fields'])){ - $this->options['db_fields'] = join($this->options['db_fields'], ', '); - } - $this->options['db_fields'] = ', '.$this->options['db_fields']; - } - } - - // }}} - // {{{ fetchData() - - /** - * Get user information from database - * - * This function uses the given username to fetch - * the corresponding login data from the database - * table. If an account that matches the passed username - * and password is found, the function returns true. - * Otherwise it returns false. - * - * @param string Username - * @param string Password - * @return mixed Error object or boolean - */ - function fetchData($username, $password) - { - // Prepare for a database query - $err = $this->_prepare(); - if ($err !== true) { - return PEAR::raiseError($err->getMessage(), $err->getCode()); - } - - // Find if db_fields contains a *, i so assume all col are selected - if(strstr($this->options['db_fields'], '*')){ - $sql_from = "*"; - } - else{ - $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; - } - - $query = "SELECT ".$sql_from. - " FROM ".$this->options['table']. - " WHERE ".$this->options['usernamecol']." = " . $this->db->Quote($username); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rset = $this->db->Execute( $query ); - $res = $rset->fetchRow(); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } - if (!is_array($res)) { - $this->activeUser = ''; - return false; - } - if ($this->verifyPassword(trim($password, "\r\n"), - trim($res[$this->options['passwordcol']], "\r\n"), - $this->options['cryptType'])) { - // Store additional field values in the session - foreach ($res as $key => $value) { - if ($key == $this->options['passwordcol'] || - $key == $this->options['usernamecol']) { - continue; - } - // Use reference to the auth object if exists - // This is because the auth session variable can change so a static call to setAuthData does not make sence - if(is_object($this->_auth_obj)){ - $this->_auth_obj->setAuthData($key, $value); - } else { - Auth::setAuthData($key, $value); - } - } - - return true; - } - - $this->activeUser = $res[$this->options['usernamecol']]; - return false; - } - - // }}} - // {{{ listUsers() - - function listUsers() - { - $err = $this->_prepare(); - if ($err !== true) { - return PEAR::raiseError($err->getMessage(), $err->getCode()); - } - - $retVal = array(); - - // Find if db_fileds contains a *, i so assume all col are selected - if(strstr($this->options['db_fields'], '*')){ - $sql_from = "*"; - } - else{ - $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; - } - - $query = sprintf("SELECT %s FROM %s", - $sql_from, - $this->options['table'] - ); - $res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - foreach ($res as $user) { - $user['username'] = $user[$this->options['usernamecol']]; - $retVal[] = $user; - } - } - return $retVal; - } - - // }}} - // {{{ addUser() - - /** - * Add user to the storage container - * - * @access public - * @param string Username - * @param string Password - * @param mixed Additional information that are stored in the DB - * - * @return mixed True on success, otherwise error object - */ - function addUser($username, $password, $additional = "") - { - if (function_exists($this->options['cryptType'])) { - $cryptFunction = $this->options['cryptType']; - } else { - $cryptFunction = 'md5'; - } - - $additional_key = ''; - $additional_value = ''; - - if (is_array($additional)) { - foreach ($additional as $key => $value) { - $additional_key .= ', ' . $key; - $additional_value .= ", '" . $value . "'"; - } - } - - $query = sprintf("INSERT INTO %s (%s, %s%s) VALUES ('%s', '%s'%s)", - $this->options['table'], - $this->options['usernamecol'], - $this->options['passwordcol'], - $additional_key, - $username, - $cryptFunction($password), - $additional_value - ); - - $res = $this->query($query); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - return true; - } - } - - // }}} - // {{{ removeUser() - - /** - * Remove user from the storage container - * - * @access public - * @param string Username - * - * @return mixed True on success, otherwise error object - */ - function removeUser($username) - { - $query = sprintf("DELETE FROM %s WHERE %s = '%s'", - $this->options['table'], - $this->options['usernamecol'], - $username - ); - - $res = $this->query($query); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - return true; - } - } - - // }}} -} - -function showDbg( $string ) { - print " --- $string

    "; -} -function dump( $var, $str, $vardump = false ) { - print "

    $str

    ";
    -	( !$vardump ) ? ( print_r( $var )) : ( var_dump( $var ));
    -	print "
    "; -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/ADOdb.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/ADOdb.php deleted file mode 100755 index 00f6d5d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/Auth/Container/ADOdb.php +++ /dev/null @@ -1,413 +0,0 @@ - -// | Richard Tango-Lowy | -// +----------------------------------------------------------------------+ -// -// $Id: ADOdb.php 350 2007-03-12 10:55:13Z cweiske $ -// - -require_once 'Auth/Container.php'; -require_once 'adodb.inc.php'; -require_once 'adodb-pear.inc.php'; -require_once 'adodb-errorpear.inc.php'; - -/** - * Storage driver for fetching login data from a database using ADOdb-PHP. - * - * This storage driver can use all databases which are supported - * by the ADBdb DB abstraction layer to fetch login data. - * See http://php.weblogs.com/adodb for information on ADOdb. - * NOTE: The ADOdb directory MUST be in your PHP include_path! - * - * @author Richard Tango-Lowy - * @package Auth - * @version $Revision: 350 $ - */ -class Auth_Container_ADOdb extends Auth_Container -{ - - /** - * Additional options for the storage container - * @var array - */ - var $options = array(); - - /** - * DB object - * @var object - */ - var $db = null; - var $dsn = ''; - - /** - * User that is currently selected from the DB. - * @var string - */ - var $activeUser = ''; - - // {{{ Constructor - - /** - * Constructor of the container class - * - * Initate connection to the database via PEAR::ADOdb - * - * @param string Connection data or DB object - * @return object Returns an error object if something went wrong - */ - function Auth_Container_ADOdb($dsn) - { - $this->_setDefaults(); - - if (is_array($dsn)) { - $this->_parseOptions($dsn); - - if (empty($this->options['dsn'])) { - PEAR::raiseError('No connection parameters specified!'); - } - } else { - // Extract db_type from dsn string. - $this->options['dsn'] = $dsn; - } - } - - // }}} - // {{{ _connect() - - /** - * Connect to database by using the given DSN string - * - * @access private - * @param string DSN string - * @return mixed Object on error, otherwise bool - */ - function _connect($dsn) - { - if (is_string($dsn) || is_array($dsn)) { - if(!$this->db) { - $this->db = &ADONewConnection($dsn); - if( $err = ADODB_Pear_error() ) { - return PEAR::raiseError($err); - } - } - - } else { - return PEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__, - 41, - PEAR_ERROR_RETURN, - null, - null - ); - } - - if(!$this->db) { - return PEAR::raiseError(ADODB_Pear_error()); - } else { - return true; - } - } - - // }}} - // {{{ _prepare() - - /** - * Prepare database connection - * - * This function checks if we have already opened a connection to - * the database. If that's not the case, a new connection is opened. - * - * @access private - * @return mixed True or a DB error object. - */ - function _prepare() - { - if(!$this->db) { - $res = $this->_connect($this->options['dsn']); - } - return true; - } - - // }}} - // {{{ query() - - /** - * Prepare query to the database - * - * This function checks if we have already opened a connection to - * the database. If that's not the case, a new connection is opened. - * After that the query is passed to the database. - * - * @access public - * @param string Query string - * @return mixed a DB_result object or DB_OK on success, a DB - * or PEAR error on failure - */ - function query($query) - { - $err = $this->_prepare(); - if ($err !== true) { - return $err; - } - return $this->db->query($query); - } - - // }}} - // {{{ _setDefaults() - - /** - * Set some default options - * - * @access private - * @return void - */ - function _setDefaults() - { - $this->options['db_type'] = 'mysql'; - $this->options['table'] = 'auth'; - $this->options['usernamecol'] = 'username'; - $this->options['passwordcol'] = 'password'; - $this->options['dsn'] = ''; - $this->options['db_fields'] = ''; - $this->options['cryptType'] = 'md5'; - } - - // }}} - // {{{ _parseOptions() - - /** - * Parse options passed to the container class - * - * @access private - * @param array - */ - function _parseOptions($array) - { - foreach ($array as $key => $value) { - if (isset($this->options[$key])) { - $this->options[$key] = $value; - } - } - - /* Include additional fields if they exist */ - if(!empty($this->options['db_fields'])){ - if(is_array($this->options['db_fields'])){ - $this->options['db_fields'] = join($this->options['db_fields'], ', '); - } - $this->options['db_fields'] = ', '.$this->options['db_fields']; - } - } - - // }}} - // {{{ fetchData() - - /** - * Get user information from database - * - * This function uses the given username to fetch - * the corresponding login data from the database - * table. If an account that matches the passed username - * and password is found, the function returns true. - * Otherwise it returns false. - * - * @param string Username - * @param string Password - * @return mixed Error object or boolean - */ - function fetchData($username, $password) - { - // Prepare for a database query - $err = $this->_prepare(); - if ($err !== true) { - return PEAR::raiseError($err->getMessage(), $err->getCode()); - } - - // Find if db_fields contains a *, i so assume all col are selected - if(strstr($this->options['db_fields'], '*')){ - $sql_from = "*"; - } - else{ - $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; - } - - $query = "SELECT ".$sql_from. - " FROM ".$this->options['table']. - " WHERE ".$this->options['usernamecol']." = " . $this->db->Quote($username); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rset = $this->db->Execute( $query ); - $res = $rset->fetchRow(); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } - if (!is_array($res)) { - $this->activeUser = ''; - return false; - } - if ($this->verifyPassword(trim($password, "\r\n"), - trim($res[$this->options['passwordcol']], "\r\n"), - $this->options['cryptType'])) { - // Store additional field values in the session - foreach ($res as $key => $value) { - if ($key == $this->options['passwordcol'] || - $key == $this->options['usernamecol']) { - continue; - } - // Use reference to the auth object if exists - // This is because the auth session variable can change so a static call to setAuthData does not make sence - if(is_object($this->_auth_obj)){ - $this->_auth_obj->setAuthData($key, $value); - } else { - Auth::setAuthData($key, $value); - } - } - - return true; - } - - $this->activeUser = $res[$this->options['usernamecol']]; - return false; - } - - // }}} - // {{{ listUsers() - - function listUsers() - { - $err = $this->_prepare(); - if ($err !== true) { - return PEAR::raiseError($err->getMessage(), $err->getCode()); - } - - $retVal = array(); - - // Find if db_fileds contains a *, i so assume all col are selected - if(strstr($this->options['db_fields'], '*')){ - $sql_from = "*"; - } - else{ - $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; - } - - $query = sprintf("SELECT %s FROM %s", - $sql_from, - $this->options['table'] - ); - $res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - foreach ($res as $user) { - $user['username'] = $user[$this->options['usernamecol']]; - $retVal[] = $user; - } - } - return $retVal; - } - - // }}} - // {{{ addUser() - - /** - * Add user to the storage container - * - * @access public - * @param string Username - * @param string Password - * @param mixed Additional information that are stored in the DB - * - * @return mixed True on success, otherwise error object - */ - function addUser($username, $password, $additional = "") - { - if (function_exists($this->options['cryptType'])) { - $cryptFunction = $this->options['cryptType']; - } else { - $cryptFunction = 'md5'; - } - - $additional_key = ''; - $additional_value = ''; - - if (is_array($additional)) { - foreach ($additional as $key => $value) { - $additional_key .= ', ' . $key; - $additional_value .= ", '" . $value . "'"; - } - } - - $query = sprintf("INSERT INTO %s (%s, %s%s) VALUES ('%s', '%s'%s)", - $this->options['table'], - $this->options['usernamecol'], - $this->options['passwordcol'], - $additional_key, - $username, - $cryptFunction($password), - $additional_value - ); - - $res = $this->query($query); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - return true; - } - } - - // }}} - // {{{ removeUser() - - /** - * Remove user from the storage container - * - * @access public - * @param string Username - * - * @return mixed True on success, otherwise error object - */ - function removeUser($username) - { - $query = sprintf("DELETE FROM %s WHERE %s = '%s'", - $this->options['table'], - $this->options['usernamecol'], - $username - ); - - $res = $this->query($query); - - if (DB::isError($res)) { - return PEAR::raiseError($res->getMessage(), $res->getCode()); - } else { - return true; - } - } - - // }}} -} - -function showDbg( $string ) { - print " --- $string

    "; -} -function dump( $var, $str, $vardump = false ) { - print "

    $str

    ";
    -	( !$vardump ) ? ( print_r( $var )) : ( var_dump( $var ));
    -	print "
    "; -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/readme.Auth.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/readme.Auth.txt deleted file mode 100755 index db283197..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pear/readme.Auth.txt +++ /dev/null @@ -1,20 +0,0 @@ -From: Rich Tango-Lowy (richtl#arscognita.com) -Date: Sat, May 29, 2004 11:20 am - -OK, I hacked out an ADOdb container for PEAR-Auth. The error handling's -a bit of a mess, but all the methods work. - -Copy ADOdb.php to your pear/Auth/Container/ directory. - -Use the ADOdb container exactly as you would the DB -container, but specify 'ADOdb' instead of 'DB': - -$dsn = "mysql://myuser:mypass@localhost/authdb"; -$a = new Auth("ADOdb", $dsn, "loginFunction"); - - -------------------- - -John Lim adds: - -See http://pear.php.net/manual/en/package.authentication.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/all-wcprops deleted file mode 100755 index b0f9b84a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/all-wcprops +++ /dev/null @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf -END -perf-db2.inc.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-db2.inc.php -END -perf-informix.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-informix.inc.php -END -perf-mssql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-mssql.inc.php -END -perf-oci8.inc.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-oci8.inc.php -END -perf-mysql.inc.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-mysql.inc.php -END -perf-postgres.inc.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/perf/perf-postgres.inc.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/entries deleted file mode 100755 index 88d71466..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/entries +++ /dev/null @@ -1,106 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/perf -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -perf-db2.inc.php -file - - - - -2008-02-29T14:57:53.973185Z -74c097f8b78a0a510af7cebb99b892c0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf-informix.inc.php -file - - - - -2008-02-29T14:57:53.988805Z -b33d60163ea0a820357d1355b7c1973f -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf-mssql.inc.php -file - - - - -2008-02-29T14:57:53.988805Z -191e4387a98699a648f1925c9896cb76 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf-oci8.inc.php -file - - - - -2008-02-29T14:57:54.004426Z -6b30526c88d2adb4728fdd191c25e523 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf-mysql.inc.php -file - - - - -2008-02-29T14:57:54.004426Z -3cef132be994f88c6bb6ce80ec5566cc -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -perf-postgres.inc.php -file - - - - -2008-02-29T14:57:54.020047Z -4fe38a486d39c8bf468197518ae53583 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-db2.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-db2.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-informix.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-informix.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mssql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mssql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mysql.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-mysql.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-oci8.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-oci8.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-postgres.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/prop-base/perf-postgres.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-db2.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-db2.inc.php.svn-base deleted file mode 100755 index 9c8e7726..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-db2.inc.php.svn-base +++ /dev/null @@ -1,102 +0,0 @@ - array('RATIO', - "SELECT - case when sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)=0 then 0 - else 100*(1-sum(POOL_DATA_P_READS+POOL_INDEX_P_READS)/sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)) end - FROM TABLE(SNAPSHOT_APPL('',-2)) as t", - '=WarnCacheRatio'), - - 'Data Cache', - 'data cache buffers' => array('DATAC', - 'select sum(npages) from SYSCAT.BUFFERPOOLS', - 'See tuning reference.' ), - 'cache blocksize' => array('DATAC', - 'select avg(pagesize) from SYSCAT.BUFFERPOOLS', - '' ), - 'data cache size' => array('DATAC', - 'select sum(npages*pagesize) from SYSCAT.BUFFERPOOLS', - '' ), - 'Connections', - 'current connections' => array('SESS', - "SELECT count(*) FROM TABLE(SNAPSHOT_APPL_INFO('',-2)) as t", - ''), - - false - ); - - - function perf_db2(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $qno = rand(); - $ok = $this->conn->Execute("EXPLAIN PLAN SET QUERYNO=$qno FOR $sql"); - ob_start(); - if (!$ok) echo "

    Have EXPLAIN tables been created?

    "; - else { - $rs = $this->conn->Execute("select * from explain_statement where queryno=$qno"); - if ($rs) rs2html($rs); - } - $s = ob_get_contents(); - ob_end_clean(); - $this->conn->LogSQL($save); - - $s .= $this->Tracer($sql); - return $s; - } - - - function Tables() - { - $rs = $this->conn->Execute("select tabschema,tabname,card as rows, - npages pages_used,fpages pages_allocated, tbspace tablespace - from syscat.tables where tabschema not in ('SYSCAT','SYSIBM','SYSSTAT') order by 1,2"); - return rs2html($rs,false,false,false,false); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-informix.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-informix.inc.php.svn-base deleted file mode 100755 index d5e47578..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-informix.inc.php.svn-base +++ /dev/null @@ -1,70 +0,0 @@ - array('RATIOH', - "select round((1-(wt.value / (rd.value + wr.value)))*100,2) - from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt - where rd.name = 'pagreads' and - wr.name = 'pagwrites' and - wt.name = 'buffwts'", - '=WarnCacheRatio'), - 'IO', - 'data reads' => array('IO', - "select value from sysmaster:sysprofile where name='pagreads'", - 'Page reads'), - - 'data writes' => array('IO', - "select value from sysmaster:sysprofile where name='pagwrites'", - 'Page writes'), - - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from sysmaster:syssessions', - 'Number of sessions'), - - false - - ); - - function perf_informix(&$conn) - { - $this->conn =& $conn; - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mssql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mssql.inc.php.svn-base deleted file mode 100755 index f2dfa7ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mssql.inc.php.svn-base +++ /dev/null @@ -1,164 +0,0 @@ - array('RATIO', - "select round((a.cntr_value*100.0)/b.cntr_value,2) from master.dbo.sysperfinfo a, master.dbo.sysperfinfo b where a.counter_name = 'Buffer cache hit ratio' and b.counter_name='Buffer cache hit ratio base'", - '=WarnCacheRatio'), - 'prepared sql hit ratio' => array('RATIO', - array('dbcc cachestats','Prepared',1,100), - ''), - 'adhoc sql hit ratio' => array('RATIO', - array('dbcc cachestats','Adhoc',1,100), - ''), - 'IO', - 'data reads' => array('IO', - "select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page reads/sec'"), - 'data writes' => array('IO', - "select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page writes/sec'"), - - 'Data Cache', - 'data cache size' => array('DATAC', - "select cntr_value*8192 from master.dbo.sysperfinfo where counter_name = 'Total Pages' and object_name='SQLServer:Buffer Manager'", - '' ), - 'data cache blocksize' => array('DATAC', - "select 8192",'page size'), - 'Connections', - 'current connections' => array('SESS', - '=sp_who', - ''), - 'max connections' => array('SESS', - "SELECT @@MAX_CONNECTIONS", - ''), - - false - ); - - - function perf_mssql(&$conn) - { - if ($conn->dataProvider == 'odbc') { - $this->sql1 = 'sql1'; - //$this->explain = false; - } - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $this->conn->Execute("SET SHOWPLAN_ALL ON;"); - $sql = str_replace('?',"''",$sql); - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs =& $this->conn->Execute($sql); - //adodb_printr($rs); - $ADODB_FETCH_MODE = $save; - if ($rs) { - $rs->MoveNext(); - $s .= ''; - while (!$rs->EOF) { - $s .= '\n"; ## NOTE CORRUPT tag is intentional!!!! - $rs->MoveNext(); - } - $s .= '
    Rows IO CPU     Plan
    '.round($rs->fields[8],1).''.round($rs->fields[9],3).''.round($rs->fields[10],3).'
    '.htmlspecialchars($rs->fields[0])."
    '; - - $rs->NextRecordSet(); - } - - $this->conn->Execute("SET SHOWPLAN_ALL OFF;"); - $this->conn->LogSQL($save); - $s .= $this->Tracer($sql); - return $s; - } - - function Tables() - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - //$this->conn->debug=1; - $s = ''; - $rs1 = $this->conn->Execute("select distinct name from sysobjects where xtype='U'"); - if ($rs1) { - while (!$rs1->EOF) { - $tab = $rs1->fields[0]; - $tabq = $this->conn->qstr($tab); - $rs2 = $this->conn->Execute("sp_spaceused $tabq"); - if ($rs2) { - $s .= ''; - $rs2->Close(); - } - $rs1->MoveNext(); - } - $rs1->Close(); - } - $ADODB_FETCH_MODE = $save; - return $s.'
    tablenamesize_in_kindex sizereserved size
    '.$tab.''.$rs2->fields[3].''.$rs2->fields[4].''.$rs2->fields[2].'
    '; - } - - function sp_who() - { - $arr = $this->conn->GetArray('sp_who'); - return sizeof($arr); - } - - function HealthCheck($cli=false) - { - - $this->conn->Execute('dbcc traceon(3604)'); - $html = adodb_perf::HealthCheck($cli); - $this->conn->Execute('dbcc traceoff(3604)'); - return $html; - } - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mysql.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mysql.inc.php.svn-base deleted file mode 100755 index 50639d95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-mysql.inc.php.svn-base +++ /dev/null @@ -1,315 +0,0 @@ - array('RATIO', - '=GetKeyHitRatio', - '=WarnCacheRatio'), - 'InnoDB cache hit ratio' => array('RATIO', - '=GetInnoDBHitRatio', - '=WarnCacheRatio'), - 'data cache hit ratio' => array('HIDE', # only if called - '=FindDBHitRatio', - '=WarnCacheRatio'), - 'sql cache hit ratio' => array('RATIO', - '=GetQHitRatio', - ''), - 'IO', - 'data reads' => array('IO', - '=GetReads', - 'Number of selects (Key_reads is not accurate)'), - 'data writes' => array('IO', - '=GetWrites', - 'Number of inserts/updates/deletes * coef (Key_writes is not accurate)'), - - 'Data Cache', - 'MyISAM data cache size' => array('DATAC', - array("show variables", 'key_buffer_size'), - '' ), - 'BDB data cache size' => array('DATAC', - array("show variables", 'bdb_cache_size'), - '' ), - 'InnoDB data cache size' => array('DATAC', - array("show variables", 'innodb_buffer_pool_size'), - '' ), - 'Memory Usage', - 'read buffer size' => array('CACHE', - array("show variables", 'read_buffer_size'), - '(per session)'), - 'sort buffer size' => array('CACHE', - array("show variables", 'sort_buffer_size'), - 'Size of sort buffer (per session)' ), - 'table cache' => array('CACHE', - array("show variables", 'table_cache'), - 'Number of tables to keep open'), - 'Connections', - 'current connections' => array('SESS', - array('show status','Threads_connected'), - ''), - 'max connections' => array( 'SESS', - array("show variables",'max_connections'), - ''), - - false - ); - - function perf_mysql(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - - if (strtoupper(substr(trim($sql),0,6)) !== 'SELECT') return '

    Unable to EXPLAIN non-select statement

    '; - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $sql = str_replace('?',"''",$sql); - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $sql = $this->conn->GetOne("select sql1 from adodb_logsql where sql1 like $sqlq"); - } - - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $rs = $this->conn->Execute('EXPLAIN '.$sql); - $s .= rs2html($rs,false,false,false,false); - $this->conn->LogSQL($save); - $s .= $this->Tracer($sql); - return $s; - } - - function Tables() - { - if (!$this->tablesSQL) return false; - - $rs = $this->conn->Execute($this->tablesSQL); - if (!$rs) return false; - - $html = rs2html($rs,false,false,false,false); - return $html; - } - - function GetReads() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return 0; - $val = 0; - while (!$rs->EOF) { - switch($rs->fields[0]) { - case 'Com_select': - $val = $rs->fields[1]; - $rs->Close(); - return $val; - } - $rs->MoveNext(); - } - - $rs->Close(); - - return $val; - } - - function GetWrites() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return 0; - $val = 0.0; - while (!$rs->EOF) { - switch($rs->fields[0]) { - case 'Com_insert': - $val += $rs->fields[1]; break; - case 'Com_delete': - $val += $rs->fields[1]; break; - case 'Com_update': - $val += $rs->fields[1]/2; - $rs->Close(); - return $val; - } - $rs->MoveNext(); - } - - $rs->Close(); - - return $val; - } - - function FindDBHitRatio() - { - // first find out type of table - //$this->conn->debug=1; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show table status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return ''; - $type = strtoupper($rs->fields[1]); - $rs->Close(); - switch($type){ - case 'MYISAM': - case 'ISAM': - return $this->DBParameter('MyISAM cache hit ratio').' (MyISAM)'; - case 'INNODB': - return $this->DBParameter('InnoDB cache hit ratio').' (InnoDB)'; - default: - return $type.' not supported'; - } - - } - - function GetQHitRatio() - { - //Total number of queries = Qcache_inserts + Qcache_hits + Qcache_not_cached - $hits = $this->_DBParameter(array("show status","Qcache_hits")); - $total = $this->_DBParameter(array("show status","Qcache_inserts")); - $total += $this->_DBParameter(array("show status","Qcache_not_cached")); - - $total += $hits; - if ($total) return round(($hits*100)/$total,2); - return 0; - } - - /* - Use session variable to store Hit percentage, because MySQL - does not remember last value of SHOW INNODB STATUS hit ratio - - # 1st query to SHOW INNODB STATUS - 0.00 reads/s, 0.00 creates/s, 0.00 writes/s - Buffer pool hit rate 1000 / 1000 - - # 2nd query to SHOW INNODB STATUS - 0.00 reads/s, 0.00 creates/s, 0.00 writes/s - No buffer pool activity since the last printout - */ - function GetInnoDBHitRatio() - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show innodb status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs || $rs->EOF) return 0; - $stat = $rs->fields[0]; - $rs->Close(); - $at = strpos($stat,'Buffer pool hit rate'); - $stat = substr($stat,$at,200); - if (preg_match('!Buffer pool hit rate\s*([0-9]*) / ([0-9]*)!',$stat,$arr)) { - $val = 100*$arr[1]/$arr[2]; - $_SESSION['INNODB_HIT_PCT'] = $val; - return round($val,2); - } else { - if (isset($_SESSION['INNODB_HIT_PCT'])) return $_SESSION['INNODB_HIT_PCT']; - return 0; - } - return 0; - } - - function GetKeyHitRatio() - { - $hits = $this->_DBParameter(array("show status","Key_read_requests")); - $reqs = $this->_DBParameter(array("show status","Key_reads")); - if ($reqs == 0) return 0; - - return round(($hits/($reqs+$hits))*100,2); - } - - // start hack - var $optimizeTableLow = 'CHECK TABLE %s FAST QUICK'; - var $optimizeTableHigh = 'OPTIMIZE TABLE %s'; - - /** - * @see adodb_perf#optimizeTable - */ - function optimizeTable( $table, $mode = ADODB_OPT_LOW) - { - if ( !is_string( $table)) return false; - - $conn = $this->conn; - if ( !$conn) return false; - - $sql = ''; - switch( $mode) { - case ADODB_OPT_LOW : $sql = $this->optimizeTableLow; break; - case ADODB_OPT_HIGH : $sql = $this->optimizeTableHigh; break; - default : - { - // May dont use __FUNCTION__ constant for BC (__FUNCTION__ Added in PHP 4.3.0) - ADOConnection::outp( sprintf( "

    %s: '%s' using of undefined mode '%s'

    ", __CLASS__, __FUNCTION__, $mode)); - return false; - } - } - $sql = sprintf( $sql, $table); - - return $conn->Execute( $sql) !== false; - } - // end hack -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-oci8.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-oci8.inc.php.svn-base deleted file mode 100755 index a4bcda67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-oci8.inc.php.svn-base +++ /dev/null @@ -1,509 +0,0 @@ - array('RATIOH', - "select round((1-(phy.value / (cur.value + con.value)))*100,2) - from v\$sysstat cur, v\$sysstat con, v\$sysstat phy - where cur.name = 'db block gets' and - con.name = 'consistent gets' and - phy.name = 'physical reads'", - '=WarnCacheRatio'), - - 'sql cache hit ratio' => array( 'RATIOH', - 'select round(100*(sum(pins)-sum(reloads))/sum(pins),2) from v$librarycache', - 'increase shared_pool_size if too ratio low'), - - 'datadict cache hit ratio' => array('RATIOH', - "select - round((1 - (sum(getmisses) / (sum(gets) + - sum(getmisses))))*100,2) - from v\$rowcache", - 'increase shared_pool_size if too ratio low'), - - 'memory sort ratio' => array('RATIOH', - "SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE), - 0,1,(a.VALUE + b.VALUE)),2) -FROM v\$sysstat a, - v\$sysstat b -WHERE a.name = 'sorts (disk)' -AND b.name = 'sorts (memory)'", - "% of memory sorts compared to disk sorts - should be over 95%"), - - 'IO', - 'data reads' => array('IO', - "select value from v\$sysstat where name='physical reads'"), - - 'data writes' => array('IO', - "select value from v\$sysstat where name='physical writes'"), - - 'Data Cache', - 'data cache buffers' => array( 'DATAC', - "select a.value/b.value from v\$parameter a, v\$parameter b - where a.name = 'db_cache_size' and b.name= 'db_block_size'", - 'Number of cache buffers. Tune db_cache_size if the data cache hit ratio is too low.'), - 'data cache blocksize' => array('DATAC', - "select value from v\$parameter where name='db_block_size'", - '' ), - 'Memory Pools', - 'data cache size' => array('DATAC', - "select value from v\$parameter where name = 'db_cache_size'", - 'db_cache_size' ), - 'shared pool size' => array('DATAC', - "select value from v\$parameter where name = 'shared_pool_size'", - 'shared_pool_size, which holds shared sql, stored procedures, dict cache and similar shared structs' ), - 'java pool size' => array('DATAJ', - "select value from v\$parameter where name = 'java_pool_size'", - 'java_pool_size' ), - 'large pool buffer size' => array('CACHE', - "select value from v\$parameter where name='large_pool_size'", - 'this pool is for large mem allocations (not because it is larger than shared pool), for MTS sessions, parallel queries, io buffers (large_pool_size) ' ), - - 'pga buffer size' => array('CACHE', - "select value from v\$parameter where name='pga_aggregate_target'", - 'program global area is private memory for sorting, and hash and bitmap merges - since oracle 9i (pga_aggregate_target)' ), - - - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from sys.v_$session where username is not null', - ''), - 'max connections' => array( 'SESS', - "select value from v\$parameter where name='sessions'", - ''), - - 'Memory Utilization', - 'data cache utilization ratio' => array('RATIOU', - "select round((1-bytes/sgasize)*100, 2) - from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f - where name = 'free memory' and pool = 'shared pool'", - 'Percentage of data cache actually in use - should be over 85%'), - - 'shared pool utilization ratio' => array('RATIOU', - 'select round((sga.bytes/p.value)*100,2) - from v$sgastat sga, v$parameter p - where sga.name = \'free memory\' and sga.pool = \'shared pool\' - and p.name = \'shared_pool_size\'', - 'Percentage of shared pool actually used - too low is bad, too high is worse'), - - 'large pool utilization ratio' => array('RATIOU', - "select round((1-bytes/sgasize)*100, 2) - from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f - where name = 'free memory' and pool = 'large pool'", - 'Percentage of large_pool actually in use - too low is bad, too high is worse'), - 'sort buffer size' => array('CACHE', - "select value from v\$parameter where name='sort_area_size'", - 'max in-mem sort_area_size (per query), uses memory in pga' ), - - 'pga usage at peak' => array('RATIOU', - '=PGA','Mb utilization at peak transactions (requires Oracle 9i+)'), - 'Transactions', - 'rollback segments' => array('ROLLBACK', - "select count(*) from sys.v_\$rollstat", - ''), - - 'peak transactions' => array('ROLLBACK', - "select max_utilization tx_hwm - from sys.v_\$resource_limit - where resource_name = 'transactions'", - 'Taken from high-water-mark'), - 'max transactions' => array('ROLLBACK', - "select value from v\$parameter where name = 'transactions'", - 'max transactions / rollback segments < 3.5 (or transactions_per_rollback_segment)'), - 'Parameters', - 'cursor sharing' => array('CURSOR', - "select value from v\$parameter where name = 'cursor_sharing'", - 'Cursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR (9i+). See cursor_sharing.'), - /* - 'cursor reuse' => array('CURSOR', - "select count(*) from (select sql_text_wo_constants, count(*) - from t1 - group by sql_text_wo_constants -having count(*) > 100)",'These are sql statements that should be using bind variables'),*/ - 'index cache cost' => array('COST', - "select value from v\$parameter where name = 'optimizer_index_caching'", - '=WarnIndexCost'), - 'random page cost' => array('COST', - "select value from v\$parameter where name = 'optimizer_index_cost_adj'", - '=WarnPageCost'), - - false - - ); - - - function perf_oci8(&$conn) - { - $savelog = $conn->LogSQL(false); - $this->version = $conn->ServerInfo(); - $conn->LogSQL($savelog); - $this->conn =& $conn; - } - - function WarnPageCost($val) - { - if ($val == 100) $s = 'Too High. '; - else $s = ''; - - return $s.'Recommended is 20-50 for TP, and 50 for data warehouses. Default is 100. See optimizer_index_cost_adj. '; - } - - function WarnIndexCost($val) - { - if ($val == 0) $s = 'Too Low. '; - else $s = ''; - - return $s.'Percentage of indexed data blocks expected in the cache. - Recommended is 20 (fast disk array) to 50 (slower hard disks). Default is 0. - See optimizer_index_caching.'; - } - - function PGA() - { - if ($this->version['version'] < 9) return 'Oracle 9i or later required'; - - $rs = $this->conn->Execute("select a.mb,a.targ as pga_size_pct,a.pct from - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, - pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r - from v\$pga_target_advice) a left join - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, - pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r - from v\$pga_target_advice) b on - a.r = b.r+1 where - b.pct < 100"); - if (!$rs) return "Only in 9i or later"; - $rs->Close(); - if ($rs->EOF) return "PGA could be too big"; - - return reset($rs->fields); - } - - function Explain($sql,$partial=false) - { - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->SelectLimit("select ID FROM PLAN_TABLE"); - if (!$rs) { - echo "

    Missing PLAN_TABLE

    -
    -CREATE TABLE PLAN_TABLE (
    -  STATEMENT_ID                    VARCHAR2(30),
    -  TIMESTAMP                       DATE,
    -  REMARKS                         VARCHAR2(80),
    -  OPERATION                       VARCHAR2(30),
    -  OPTIONS                         VARCHAR2(30),
    -  OBJECT_NODE                     VARCHAR2(128),
    -  OBJECT_OWNER                    VARCHAR2(30),
    -  OBJECT_NAME                     VARCHAR2(30),
    -  OBJECT_INSTANCE                 NUMBER(38),
    -  OBJECT_TYPE                     VARCHAR2(30),
    -  OPTIMIZER                       VARCHAR2(255),
    -  SEARCH_COLUMNS                  NUMBER,
    -  ID                              NUMBER(38),
    -  PARENT_ID                       NUMBER(38),
    -  POSITION                        NUMBER(38),
    -  COST                            NUMBER(38),
    -  CARDINALITY                     NUMBER(38),
    -  BYTES                           NUMBER(38),
    -  OTHER_TAG                       VARCHAR2(255),
    -  PARTITION_START                 VARCHAR2(255),
    -  PARTITION_STOP                  VARCHAR2(255),
    -  PARTITION_ID                    NUMBER(38),
    -  OTHER                           LONG,
    -  DISTRIBUTION                    VARCHAR2(30)
    -);
    -
    "; - return false; - } - - $rs->Close(); - // $this->conn->debug=1; - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - - $s = "

    Explain: ".htmlspecialchars($sql)."

    "; - - $this->conn->BeginTrans(); - $id = "ADODB ".microtime(); - - $rs =& $this->conn->Execute("EXPLAIN PLAN SET STATEMENT_ID='$id' FOR $sql"); - $m = $this->conn->ErrorMsg(); - if ($m) { - $this->conn->RollbackTrans(); - $this->conn->LogSQL($savelog); - $s .= "

    $m

    "; - return $s; - } - $rs =& $this->conn->Execute(" - select - '
    '||lpad('--', (level-1)*2,'-') || trim(operation) || ' ' || trim(options)||'
    ' as Operation, - object_name,COST,CARDINALITY,bytes - FROM plan_table -START WITH id = 0 and STATEMENT_ID='$id' -CONNECT BY prior id=parent_id and statement_id='$id'"); - - $s .= rs2html($rs,false,false,false,false); - $this->conn->RollbackTrans(); - $this->conn->LogSQL($savelog); - $s .= $this->Tracer($sql,$partial); - return $s; - } - - - function CheckMemory() - { - if ($this->version['version'] < 9) return 'Oracle 9i or later required'; - - $rs =& $this->conn->Execute(" -select a.size_for_estimate as cache_mb_estimate, - case when a.size_factor=1 then - '<<= current' - when a.estd_physical_read_factor-b.estd_physical_read_factor > 0 and a.estd_physical_read_factor<1 then - '- BETTER - ' - else ' ' end as currsize, - a.estd_physical_read_factor-b.estd_physical_read_factor as best_when_0 - from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) a , - (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) b where a.r = b.r-1"); - if (!$rs) return false; - - /* - The v$db_cache_advice utility show the marginal changes in physical data block reads for different sizes of db_cache_size - */ - $s = "

    Data Cache Estimate

    "; - if ($rs->EOF) { - $s .= "

    Cache that is 50% of current size is still too big

    "; - } else { - $s .= "Ideal size of Data Cache is when \"best_when_0\" changes from a positive number and becomes zero."; - $s .= rs2html($rs,false,false,false,false); - } - return $s; - } - - /* - Generate html for suspicious/expensive sql - */ - function tohtml(&$rs,$type) - { - $o1 = $rs->FetchField(0); - $o2 = $rs->FetchField(1); - $o3 = $rs->FetchField(2); - if ($rs->EOF) return '

    None found

    '; - $check = ''; - $sql = ''; - $s = "\n\n'; - while (!$rs->EOF) { - if ($check != $rs->fields[0].'::'.$rs->fields[1]) { - if ($check) { - $carr = explode('::',$check); - $prefix = "'; - $suffix = ''; - if (strlen($prefix)>2000) { - $prefix = ''; - $suffix = ''; - } - - $s .= "\n'; - } - $sql = $rs->fields[2]; - $check = $rs->fields[0].'::'.$rs->fields[1]; - } else - $sql .= $rs->fields[2]; - if (substr($sql,strlen($sql)-1) == "\0") $sql = substr($sql,0,strlen($sql)-1); - $rs->MoveNext(); - } - $rs->Close(); - - $carr = explode('::',$check); - $prefix = "'; - $suffix = ''; - if (strlen($prefix)>2000) { - $prefix = ''; - $suffix = ''; - } - $s .= "\n'; - - return $s."
    ".$o1->name.''.$o2->name.''.$o3->name.'
    ".$carr[0].''.$carr[1].''.$prefix.$sql.$suffix.'
    ".$carr[0].''.$carr[1].''.$prefix.$sql.$suffix.'
    \n\n"; - } - - // code thanks to Ixora. - // http://www.ixora.com.au/scripts/query_opt.htm - // requires oracle 8.1.7 or later - function SuspiciousSQL($numsql=10) - { - $sql = " -select - substr(to_char(s.pct, '99.00'), 2) || '%' load, - s.executions executes, - p.sql_text -from - ( - select - address, - buffer_gets, - executions, - pct, - rank() over (order by buffer_gets desc) ranking - from - ( - select - address, - buffer_gets, - executions, - 100 * ratio_to_report(buffer_gets) over () pct - from - sys.v_\$sql - where - command_type != 47 and module != 'T.O.A.D.' - ) - where - buffer_gets > 50 * executions - ) s, - sys.v_\$sqltext p -where - s.ranking <= $numsql and - p.address = s.address -order by - 1 desc, s.address, p.piece"; - - global $ADODB_CACHE_MODE; - if (isset($_GET['expsixora']) && isset($_GET['sql'])) { - $partial = empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return $this->_SuspiciousSQL($numsql); - - $s = ''; - $s .= $this->_SuspiciousSQL($numsql); - $s .= '

    '; - - $save = $ADODB_CACHE_MODE; - $ADODB_CACHE_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->SelectLimit($sql); - $this->conn->LogSQL($savelog); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - if ($rs) { - $s .= "\n

    Ixora Suspicious SQL

    "; - $s .= $this->tohtml($rs,'expsixora'); - } - - return $s; - } - - // code thanks to Ixora. - // http://www.ixora.com.au/scripts/query_opt.htm - // requires oracle 8.1.7 or later - function ExpensiveSQL($numsql = 10) - { - $sql = " -select - substr(to_char(s.pct, '99.00'), 2) || '%' load, - s.executions executes, - p.sql_text -from - ( - select - address, - disk_reads, - executions, - pct, - rank() over (order by disk_reads desc) ranking - from - ( - select - address, - disk_reads, - executions, - 100 * ratio_to_report(disk_reads) over () pct - from - sys.v_\$sql - where - command_type != 47 and module != 'T.O.A.D.' - ) - where - disk_reads > 50 * executions - ) s, - sys.v_\$sqltext p -where - s.ranking <= $numsql and - p.address = s.address -order by - 1 desc, s.address, p.piece -"; - global $ADODB_CACHE_MODE; - if (isset($_GET['expeixora']) && isset($_GET['sql'])) { - $partial = empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - if (isset($_GET['sql'])) { - $var = $this->_ExpensiveSQL($numsql); - return $var; - } - - $s = ''; - $s .= $this->_ExpensiveSQL($numsql); - $s .= '

    '; - $save = $ADODB_CACHE_MODE; - $ADODB_CACHE_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->Execute($sql); - $this->conn->LogSQL($savelog); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - - if ($rs) { - $s .= "\n

    Ixora Expensive SQL

    "; - $s .= $this->tohtml($rs,'expeixora'); - } - - return $s; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-postgres.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-postgres.inc.php.svn-base deleted file mode 100755 index da41ebe4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/.svn/text-base/perf-postgres.inc.php.svn-base +++ /dev/null @@ -1,124 +0,0 @@ - array('RATIO', - "select case when count(*)=3 then 'TRUE' else 'FALSE' end from pg_settings where (name='stats_block_level' or name='stats_row_level' or name='stats_start_collector') and setting='on' ", - 'Value must be TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level and stats_block_level must be set to true in postgresql.conf)'), - 'data cache hit ratio' => array('RATIO', - "select case when blks_hit=0 then 0 else round( ((1-blks_read::float/blks_hit)*100)::numeric, 2) end from pg_stat_database where datname='\$DATABASE'", - '=WarnCacheRatio'), - 'IO', - 'data reads' => array('IO', - 'select sum(heap_blks_read+toast_blks_read) from pg_statio_user_tables', - ), - 'data writes' => array('IO', - 'select round((sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16)::numeric,2) from pg_stat_user_tables', - 'Count of inserts/updates/deletes * coef'), - - 'Data Cache', - 'data cache buffers' => array('DATAC', - "select setting from pg_settings where name='shared_buffers'", - 'Number of cache buffers. Tuning'), - 'cache blocksize' => array('DATAC', - 'select 8192', - '(estimate)' ), - 'data cache size' => array( 'DATAC', - "select setting::integer*8192 from pg_settings where name='shared_buffers'", - '' ), - 'operating system cache size' => array( 'DATA', - "select setting::integer*8192 from pg_settings where name='effective_cache_size'", - '(effective cache size)' ), - 'Memory Usage', - # Postgres 7.5 changelog: Rename server parameters SortMem and VacuumMem to work_mem and maintenance_work_mem; - 'sort/work buffer size' => array('CACHE', - "select setting::integer*1024 from pg_settings where name='sort_mem' or name = 'work_mem' order by name", - 'Size of sort buffer (per query)' ), - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from pg_stat_activity', - ''), - 'max connections' => array('SESS', - "select setting from pg_settings where name='max_connections'", - ''), - 'Parameters', - 'rollback buffers' => array('COST', - "select setting from pg_settings where name='wal_buffers'", - 'WAL buffers'), - 'random page cost' => array('COST', - "select setting from pg_settings where name='random_page_cost'", - 'Cost of doing a seek (default=4). See random_page_cost'), - false - ); - - function perf_postgres(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - $save = $this->conn->LogSQL(false); - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $sql = str_replace('?',"''",$sql); - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $rs = $this->conn->Execute('EXPLAIN '.$sql); - $this->conn->LogSQL($save); - $s .= '
    ';
    -		if ($rs)
    -			while (!$rs->EOF) {
    -				$s .= reset($rs->fields)."\n";
    -				$rs->MoveNext();
    -			}
    -		$s .= '
    '; - $s .= $this->Tracer($sql,$partial); - return $s; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-db2.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-db2.inc.php deleted file mode 100755 index 2eb56ae5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-db2.inc.php +++ /dev/null @@ -1,102 +0,0 @@ - array('RATIO', - "SELECT - case when sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)=0 then 0 - else 100*(1-sum(POOL_DATA_P_READS+POOL_INDEX_P_READS)/sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)) end - FROM TABLE(SNAPSHOT_APPL('',-2)) as t", - '=WarnCacheRatio'), - - 'Data Cache', - 'data cache buffers' => array('DATAC', - 'select sum(npages) from SYSCAT.BUFFERPOOLS', - 'See tuning reference.' ), - 'cache blocksize' => array('DATAC', - 'select avg(pagesize) from SYSCAT.BUFFERPOOLS', - '' ), - 'data cache size' => array('DATAC', - 'select sum(npages*pagesize) from SYSCAT.BUFFERPOOLS', - '' ), - 'Connections', - 'current connections' => array('SESS', - "SELECT count(*) FROM TABLE(SNAPSHOT_APPL_INFO('',-2)) as t", - ''), - - false - ); - - - function perf_db2(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $qno = rand(); - $ok = $this->conn->Execute("EXPLAIN PLAN SET QUERYNO=$qno FOR $sql"); - ob_start(); - if (!$ok) echo "

    Have EXPLAIN tables been created?

    "; - else { - $rs = $this->conn->Execute("select * from explain_statement where queryno=$qno"); - if ($rs) rs2html($rs); - } - $s = ob_get_contents(); - ob_end_clean(); - $this->conn->LogSQL($save); - - $s .= $this->Tracer($sql); - return $s; - } - - - function Tables() - { - $rs = $this->conn->Execute("select tabschema,tabname,card as rows, - npages pages_used,fpages pages_allocated, tbspace tablespace - from syscat.tables where tabschema not in ('SYSCAT','SYSIBM','SYSSTAT') order by 1,2"); - return rs2html($rs,false,false,false,false); - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-informix.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-informix.inc.php deleted file mode 100755 index bd21b649..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-informix.inc.php +++ /dev/null @@ -1,70 +0,0 @@ - array('RATIOH', - "select round((1-(wt.value / (rd.value + wr.value)))*100,2) - from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt - where rd.name = 'pagreads' and - wr.name = 'pagwrites' and - wt.name = 'buffwts'", - '=WarnCacheRatio'), - 'IO', - 'data reads' => array('IO', - "select value from sysmaster:sysprofile where name='pagreads'", - 'Page reads'), - - 'data writes' => array('IO', - "select value from sysmaster:sysprofile where name='pagwrites'", - 'Page writes'), - - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from sysmaster:syssessions', - 'Number of sessions'), - - false - - ); - - function perf_informix(&$conn) - { - $this->conn =& $conn; - } - -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mssql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mssql.inc.php deleted file mode 100755 index e40f51dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mssql.inc.php +++ /dev/null @@ -1,164 +0,0 @@ - array('RATIO', - "select round((a.cntr_value*100.0)/b.cntr_value,2) from master.dbo.sysperfinfo a, master.dbo.sysperfinfo b where a.counter_name = 'Buffer cache hit ratio' and b.counter_name='Buffer cache hit ratio base'", - '=WarnCacheRatio'), - 'prepared sql hit ratio' => array('RATIO', - array('dbcc cachestats','Prepared',1,100), - ''), - 'adhoc sql hit ratio' => array('RATIO', - array('dbcc cachestats','Adhoc',1,100), - ''), - 'IO', - 'data reads' => array('IO', - "select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page reads/sec'"), - 'data writes' => array('IO', - "select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page writes/sec'"), - - 'Data Cache', - 'data cache size' => array('DATAC', - "select cntr_value*8192 from master.dbo.sysperfinfo where counter_name = 'Total Pages' and object_name='SQLServer:Buffer Manager'", - '' ), - 'data cache blocksize' => array('DATAC', - "select 8192",'page size'), - 'Connections', - 'current connections' => array('SESS', - '=sp_who', - ''), - 'max connections' => array('SESS', - "SELECT @@MAX_CONNECTIONS", - ''), - - false - ); - - - function perf_mssql(&$conn) - { - if ($conn->dataProvider == 'odbc') { - $this->sql1 = 'sql1'; - //$this->explain = false; - } - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $this->conn->Execute("SET SHOWPLAN_ALL ON;"); - $sql = str_replace('?',"''",$sql); - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs =& $this->conn->Execute($sql); - //adodb_printr($rs); - $ADODB_FETCH_MODE = $save; - if ($rs) { - $rs->MoveNext(); - $s .= ''; - while (!$rs->EOF) { - $s .= '\n"; ## NOTE CORRUPT tag is intentional!!!! - $rs->MoveNext(); - } - $s .= '
    Rows IO CPU     Plan
    '.round($rs->fields[8],1).''.round($rs->fields[9],3).''.round($rs->fields[10],3).'
    '.htmlspecialchars($rs->fields[0])."
    '; - - $rs->NextRecordSet(); - } - - $this->conn->Execute("SET SHOWPLAN_ALL OFF;"); - $this->conn->LogSQL($save); - $s .= $this->Tracer($sql); - return $s; - } - - function Tables() - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - //$this->conn->debug=1; - $s = ''; - $rs1 = $this->conn->Execute("select distinct name from sysobjects where xtype='U'"); - if ($rs1) { - while (!$rs1->EOF) { - $tab = $rs1->fields[0]; - $tabq = $this->conn->qstr($tab); - $rs2 = $this->conn->Execute("sp_spaceused $tabq"); - if ($rs2) { - $s .= ''; - $rs2->Close(); - } - $rs1->MoveNext(); - } - $rs1->Close(); - } - $ADODB_FETCH_MODE = $save; - return $s.'
    tablenamesize_in_kindex sizereserved size
    '.$tab.''.$rs2->fields[3].''.$rs2->fields[4].''.$rs2->fields[2].'
    '; - } - - function sp_who() - { - $arr = $this->conn->GetArray('sp_who'); - return sizeof($arr); - } - - function HealthCheck($cli=false) - { - - $this->conn->Execute('dbcc traceon(3604)'); - $html = adodb_perf::HealthCheck($cli); - $this->conn->Execute('dbcc traceoff(3604)'); - return $html; - } - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mysql.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mysql.inc.php deleted file mode 100755 index 8db74617..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-mysql.inc.php +++ /dev/null @@ -1,315 +0,0 @@ - array('RATIO', - '=GetKeyHitRatio', - '=WarnCacheRatio'), - 'InnoDB cache hit ratio' => array('RATIO', - '=GetInnoDBHitRatio', - '=WarnCacheRatio'), - 'data cache hit ratio' => array('HIDE', # only if called - '=FindDBHitRatio', - '=WarnCacheRatio'), - 'sql cache hit ratio' => array('RATIO', - '=GetQHitRatio', - ''), - 'IO', - 'data reads' => array('IO', - '=GetReads', - 'Number of selects (Key_reads is not accurate)'), - 'data writes' => array('IO', - '=GetWrites', - 'Number of inserts/updates/deletes * coef (Key_writes is not accurate)'), - - 'Data Cache', - 'MyISAM data cache size' => array('DATAC', - array("show variables", 'key_buffer_size'), - '' ), - 'BDB data cache size' => array('DATAC', - array("show variables", 'bdb_cache_size'), - '' ), - 'InnoDB data cache size' => array('DATAC', - array("show variables", 'innodb_buffer_pool_size'), - '' ), - 'Memory Usage', - 'read buffer size' => array('CACHE', - array("show variables", 'read_buffer_size'), - '(per session)'), - 'sort buffer size' => array('CACHE', - array("show variables", 'sort_buffer_size'), - 'Size of sort buffer (per session)' ), - 'table cache' => array('CACHE', - array("show variables", 'table_cache'), - 'Number of tables to keep open'), - 'Connections', - 'current connections' => array('SESS', - array('show status','Threads_connected'), - ''), - 'max connections' => array( 'SESS', - array("show variables",'max_connections'), - ''), - - false - ); - - function perf_mysql(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - - if (strtoupper(substr(trim($sql),0,6)) !== 'SELECT') return '

    Unable to EXPLAIN non-select statement

    '; - $save = $this->conn->LogSQL(false); - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $sql = str_replace('?',"''",$sql); - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $sql = $this->conn->GetOne("select sql1 from adodb_logsql where sql1 like $sqlq"); - } - - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $rs = $this->conn->Execute('EXPLAIN '.$sql); - $s .= rs2html($rs,false,false,false,false); - $this->conn->LogSQL($save); - $s .= $this->Tracer($sql); - return $s; - } - - function Tables() - { - if (!$this->tablesSQL) return false; - - $rs = $this->conn->Execute($this->tablesSQL); - if (!$rs) return false; - - $html = rs2html($rs,false,false,false,false); - return $html; - } - - function GetReads() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return 0; - $val = 0; - while (!$rs->EOF) { - switch($rs->fields[0]) { - case 'Com_select': - $val = $rs->fields[1]; - $rs->Close(); - return $val; - } - $rs->MoveNext(); - } - - $rs->Close(); - - return $val; - } - - function GetWrites() - { - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return 0; - $val = 0.0; - while (!$rs->EOF) { - switch($rs->fields[0]) { - case 'Com_insert': - $val += $rs->fields[1]; break; - case 'Com_delete': - $val += $rs->fields[1]; break; - case 'Com_update': - $val += $rs->fields[1]/2; - $rs->Close(); - return $val; - } - $rs->MoveNext(); - } - - $rs->Close(); - - return $val; - } - - function FindDBHitRatio() - { - // first find out type of table - //$this->conn->debug=1; - - global $ADODB_FETCH_MODE; - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show table status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs) return ''; - $type = strtoupper($rs->fields[1]); - $rs->Close(); - switch($type){ - case 'MYISAM': - case 'ISAM': - return $this->DBParameter('MyISAM cache hit ratio').' (MyISAM)'; - case 'INNODB': - return $this->DBParameter('InnoDB cache hit ratio').' (InnoDB)'; - default: - return $type.' not supported'; - } - - } - - function GetQHitRatio() - { - //Total number of queries = Qcache_inserts + Qcache_hits + Qcache_not_cached - $hits = $this->_DBParameter(array("show status","Qcache_hits")); - $total = $this->_DBParameter(array("show status","Qcache_inserts")); - $total += $this->_DBParameter(array("show status","Qcache_not_cached")); - - $total += $hits; - if ($total) return round(($hits*100)/$total,2); - return 0; - } - - /* - Use session variable to store Hit percentage, because MySQL - does not remember last value of SHOW INNODB STATUS hit ratio - - # 1st query to SHOW INNODB STATUS - 0.00 reads/s, 0.00 creates/s, 0.00 writes/s - Buffer pool hit rate 1000 / 1000 - - # 2nd query to SHOW INNODB STATUS - 0.00 reads/s, 0.00 creates/s, 0.00 writes/s - No buffer pool activity since the last printout - */ - function GetInnoDBHitRatio() - { - global $ADODB_FETCH_MODE; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $rs = $this->conn->Execute('show innodb status'); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_FETCH_MODE = $save; - - if (!$rs || $rs->EOF) return 0; - $stat = $rs->fields[0]; - $rs->Close(); - $at = strpos($stat,'Buffer pool hit rate'); - $stat = substr($stat,$at,200); - if (preg_match('!Buffer pool hit rate\s*([0-9]*) / ([0-9]*)!',$stat,$arr)) { - $val = 100*$arr[1]/$arr[2]; - $_SESSION['INNODB_HIT_PCT'] = $val; - return round($val,2); - } else { - if (isset($_SESSION['INNODB_HIT_PCT'])) return $_SESSION['INNODB_HIT_PCT']; - return 0; - } - return 0; - } - - function GetKeyHitRatio() - { - $hits = $this->_DBParameter(array("show status","Key_read_requests")); - $reqs = $this->_DBParameter(array("show status","Key_reads")); - if ($reqs == 0) return 0; - - return round(($hits/($reqs+$hits))*100,2); - } - - // start hack - var $optimizeTableLow = 'CHECK TABLE %s FAST QUICK'; - var $optimizeTableHigh = 'OPTIMIZE TABLE %s'; - - /** - * @see adodb_perf#optimizeTable - */ - function optimizeTable( $table, $mode = ADODB_OPT_LOW) - { - if ( !is_string( $table)) return false; - - $conn = $this->conn; - if ( !$conn) return false; - - $sql = ''; - switch( $mode) { - case ADODB_OPT_LOW : $sql = $this->optimizeTableLow; break; - case ADODB_OPT_HIGH : $sql = $this->optimizeTableHigh; break; - default : - { - // May dont use __FUNCTION__ constant for BC (__FUNCTION__ Added in PHP 4.3.0) - ADOConnection::outp( sprintf( "

    %s: '%s' using of undefined mode '%s'

    ", __CLASS__, __FUNCTION__, $mode)); - return false; - } - } - $sql = sprintf( $sql, $table); - - return $conn->Execute( $sql) !== false; - } - // end hack -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-oci8.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-oci8.inc.php deleted file mode 100755 index 527fdace..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-oci8.inc.php +++ /dev/null @@ -1,509 +0,0 @@ - array('RATIOH', - "select round((1-(phy.value / (cur.value + con.value)))*100,2) - from v\$sysstat cur, v\$sysstat con, v\$sysstat phy - where cur.name = 'db block gets' and - con.name = 'consistent gets' and - phy.name = 'physical reads'", - '=WarnCacheRatio'), - - 'sql cache hit ratio' => array( 'RATIOH', - 'select round(100*(sum(pins)-sum(reloads))/sum(pins),2) from v$librarycache', - 'increase shared_pool_size if too ratio low'), - - 'datadict cache hit ratio' => array('RATIOH', - "select - round((1 - (sum(getmisses) / (sum(gets) + - sum(getmisses))))*100,2) - from v\$rowcache", - 'increase shared_pool_size if too ratio low'), - - 'memory sort ratio' => array('RATIOH', - "SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE), - 0,1,(a.VALUE + b.VALUE)),2) -FROM v\$sysstat a, - v\$sysstat b -WHERE a.name = 'sorts (disk)' -AND b.name = 'sorts (memory)'", - "% of memory sorts compared to disk sorts - should be over 95%"), - - 'IO', - 'data reads' => array('IO', - "select value from v\$sysstat where name='physical reads'"), - - 'data writes' => array('IO', - "select value from v\$sysstat where name='physical writes'"), - - 'Data Cache', - 'data cache buffers' => array( 'DATAC', - "select a.value/b.value from v\$parameter a, v\$parameter b - where a.name = 'db_cache_size' and b.name= 'db_block_size'", - 'Number of cache buffers. Tune db_cache_size if the data cache hit ratio is too low.'), - 'data cache blocksize' => array('DATAC', - "select value from v\$parameter where name='db_block_size'", - '' ), - 'Memory Pools', - 'data cache size' => array('DATAC', - "select value from v\$parameter where name = 'db_cache_size'", - 'db_cache_size' ), - 'shared pool size' => array('DATAC', - "select value from v\$parameter where name = 'shared_pool_size'", - 'shared_pool_size, which holds shared sql, stored procedures, dict cache and similar shared structs' ), - 'java pool size' => array('DATAJ', - "select value from v\$parameter where name = 'java_pool_size'", - 'java_pool_size' ), - 'large pool buffer size' => array('CACHE', - "select value from v\$parameter where name='large_pool_size'", - 'this pool is for large mem allocations (not because it is larger than shared pool), for MTS sessions, parallel queries, io buffers (large_pool_size) ' ), - - 'pga buffer size' => array('CACHE', - "select value from v\$parameter where name='pga_aggregate_target'", - 'program global area is private memory for sorting, and hash and bitmap merges - since oracle 9i (pga_aggregate_target)' ), - - - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from sys.v_$session where username is not null', - ''), - 'max connections' => array( 'SESS', - "select value from v\$parameter where name='sessions'", - ''), - - 'Memory Utilization', - 'data cache utilization ratio' => array('RATIOU', - "select round((1-bytes/sgasize)*100, 2) - from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f - where name = 'free memory' and pool = 'shared pool'", - 'Percentage of data cache actually in use - should be over 85%'), - - 'shared pool utilization ratio' => array('RATIOU', - 'select round((sga.bytes/p.value)*100,2) - from v$sgastat sga, v$parameter p - where sga.name = \'free memory\' and sga.pool = \'shared pool\' - and p.name = \'shared_pool_size\'', - 'Percentage of shared pool actually used - too low is bad, too high is worse'), - - 'large pool utilization ratio' => array('RATIOU', - "select round((1-bytes/sgasize)*100, 2) - from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f - where name = 'free memory' and pool = 'large pool'", - 'Percentage of large_pool actually in use - too low is bad, too high is worse'), - 'sort buffer size' => array('CACHE', - "select value from v\$parameter where name='sort_area_size'", - 'max in-mem sort_area_size (per query), uses memory in pga' ), - - 'pga usage at peak' => array('RATIOU', - '=PGA','Mb utilization at peak transactions (requires Oracle 9i+)'), - 'Transactions', - 'rollback segments' => array('ROLLBACK', - "select count(*) from sys.v_\$rollstat", - ''), - - 'peak transactions' => array('ROLLBACK', - "select max_utilization tx_hwm - from sys.v_\$resource_limit - where resource_name = 'transactions'", - 'Taken from high-water-mark'), - 'max transactions' => array('ROLLBACK', - "select value from v\$parameter where name = 'transactions'", - 'max transactions / rollback segments < 3.5 (or transactions_per_rollback_segment)'), - 'Parameters', - 'cursor sharing' => array('CURSOR', - "select value from v\$parameter where name = 'cursor_sharing'", - 'Cursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR (9i+). See cursor_sharing.'), - /* - 'cursor reuse' => array('CURSOR', - "select count(*) from (select sql_text_wo_constants, count(*) - from t1 - group by sql_text_wo_constants -having count(*) > 100)",'These are sql statements that should be using bind variables'),*/ - 'index cache cost' => array('COST', - "select value from v\$parameter where name = 'optimizer_index_caching'", - '=WarnIndexCost'), - 'random page cost' => array('COST', - "select value from v\$parameter where name = 'optimizer_index_cost_adj'", - '=WarnPageCost'), - - false - - ); - - - function perf_oci8(&$conn) - { - $savelog = $conn->LogSQL(false); - $this->version = $conn->ServerInfo(); - $conn->LogSQL($savelog); - $this->conn =& $conn; - } - - function WarnPageCost($val) - { - if ($val == 100) $s = 'Too High. '; - else $s = ''; - - return $s.'Recommended is 20-50 for TP, and 50 for data warehouses. Default is 100. See optimizer_index_cost_adj. '; - } - - function WarnIndexCost($val) - { - if ($val == 0) $s = 'Too Low. '; - else $s = ''; - - return $s.'Percentage of indexed data blocks expected in the cache. - Recommended is 20 (fast disk array) to 50 (slower hard disks). Default is 0. - See optimizer_index_caching.'; - } - - function PGA() - { - if ($this->version['version'] < 9) return 'Oracle 9i or later required'; - - $rs = $this->conn->Execute("select a.mb,a.targ as pga_size_pct,a.pct from - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, - pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r - from v\$pga_target_advice) a left join - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, - pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r - from v\$pga_target_advice) b on - a.r = b.r+1 where - b.pct < 100"); - if (!$rs) return "Only in 9i or later"; - $rs->Close(); - if ($rs->EOF) return "PGA could be too big"; - - return reset($rs->fields); - } - - function Explain($sql,$partial=false) - { - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->SelectLimit("select ID FROM PLAN_TABLE"); - if (!$rs) { - echo "

    Missing PLAN_TABLE

    -
    -CREATE TABLE PLAN_TABLE (
    -  STATEMENT_ID                    VARCHAR2(30),
    -  TIMESTAMP                       DATE,
    -  REMARKS                         VARCHAR2(80),
    -  OPERATION                       VARCHAR2(30),
    -  OPTIONS                         VARCHAR2(30),
    -  OBJECT_NODE                     VARCHAR2(128),
    -  OBJECT_OWNER                    VARCHAR2(30),
    -  OBJECT_NAME                     VARCHAR2(30),
    -  OBJECT_INSTANCE                 NUMBER(38),
    -  OBJECT_TYPE                     VARCHAR2(30),
    -  OPTIMIZER                       VARCHAR2(255),
    -  SEARCH_COLUMNS                  NUMBER,
    -  ID                              NUMBER(38),
    -  PARENT_ID                       NUMBER(38),
    -  POSITION                        NUMBER(38),
    -  COST                            NUMBER(38),
    -  CARDINALITY                     NUMBER(38),
    -  BYTES                           NUMBER(38),
    -  OTHER_TAG                       VARCHAR2(255),
    -  PARTITION_START                 VARCHAR2(255),
    -  PARTITION_STOP                  VARCHAR2(255),
    -  PARTITION_ID                    NUMBER(38),
    -  OTHER                           LONG,
    -  DISTRIBUTION                    VARCHAR2(30)
    -);
    -
    "; - return false; - } - - $rs->Close(); - // $this->conn->debug=1; - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - - $s = "

    Explain: ".htmlspecialchars($sql)."

    "; - - $this->conn->BeginTrans(); - $id = "ADODB ".microtime(); - - $rs =& $this->conn->Execute("EXPLAIN PLAN SET STATEMENT_ID='$id' FOR $sql"); - $m = $this->conn->ErrorMsg(); - if ($m) { - $this->conn->RollbackTrans(); - $this->conn->LogSQL($savelog); - $s .= "

    $m

    "; - return $s; - } - $rs =& $this->conn->Execute(" - select - '
    '||lpad('--', (level-1)*2,'-') || trim(operation) || ' ' || trim(options)||'
    ' as Operation, - object_name,COST,CARDINALITY,bytes - FROM plan_table -START WITH id = 0 and STATEMENT_ID='$id' -CONNECT BY prior id=parent_id and statement_id='$id'"); - - $s .= rs2html($rs,false,false,false,false); - $this->conn->RollbackTrans(); - $this->conn->LogSQL($savelog); - $s .= $this->Tracer($sql,$partial); - return $s; - } - - - function CheckMemory() - { - if ($this->version['version'] < 9) return 'Oracle 9i or later required'; - - $rs =& $this->conn->Execute(" -select a.size_for_estimate as cache_mb_estimate, - case when a.size_factor=1 then - '<<= current' - when a.estd_physical_read_factor-b.estd_physical_read_factor > 0 and a.estd_physical_read_factor<1 then - '- BETTER - ' - else ' ' end as currsize, - a.estd_physical_read_factor-b.estd_physical_read_factor as best_when_0 - from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) a , - (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) b where a.r = b.r-1"); - if (!$rs) return false; - - /* - The v$db_cache_advice utility show the marginal changes in physical data block reads for different sizes of db_cache_size - */ - $s = "

    Data Cache Estimate

    "; - if ($rs->EOF) { - $s .= "

    Cache that is 50% of current size is still too big

    "; - } else { - $s .= "Ideal size of Data Cache is when \"best_when_0\" changes from a positive number and becomes zero."; - $s .= rs2html($rs,false,false,false,false); - } - return $s; - } - - /* - Generate html for suspicious/expensive sql - */ - function tohtml(&$rs,$type) - { - $o1 = $rs->FetchField(0); - $o2 = $rs->FetchField(1); - $o3 = $rs->FetchField(2); - if ($rs->EOF) return '

    None found

    '; - $check = ''; - $sql = ''; - $s = "\n\n'; - while (!$rs->EOF) { - if ($check != $rs->fields[0].'::'.$rs->fields[1]) { - if ($check) { - $carr = explode('::',$check); - $prefix = "'; - $suffix = ''; - if (strlen($prefix)>2000) { - $prefix = ''; - $suffix = ''; - } - - $s .= "\n'; - } - $sql = $rs->fields[2]; - $check = $rs->fields[0].'::'.$rs->fields[1]; - } else - $sql .= $rs->fields[2]; - if (substr($sql,strlen($sql)-1) == "\0") $sql = substr($sql,0,strlen($sql)-1); - $rs->MoveNext(); - } - $rs->Close(); - - $carr = explode('::',$check); - $prefix = "'; - $suffix = ''; - if (strlen($prefix)>2000) { - $prefix = ''; - $suffix = ''; - } - $s .= "\n'; - - return $s."
    ".$o1->name.''.$o2->name.''.$o3->name.'
    ".$carr[0].''.$carr[1].''.$prefix.$sql.$suffix.'
    ".$carr[0].''.$carr[1].''.$prefix.$sql.$suffix.'
    \n\n"; - } - - // code thanks to Ixora. - // http://www.ixora.com.au/scripts/query_opt.htm - // requires oracle 8.1.7 or later - function SuspiciousSQL($numsql=10) - { - $sql = " -select - substr(to_char(s.pct, '99.00'), 2) || '%' load, - s.executions executes, - p.sql_text -from - ( - select - address, - buffer_gets, - executions, - pct, - rank() over (order by buffer_gets desc) ranking - from - ( - select - address, - buffer_gets, - executions, - 100 * ratio_to_report(buffer_gets) over () pct - from - sys.v_\$sql - where - command_type != 47 and module != 'T.O.A.D.' - ) - where - buffer_gets > 50 * executions - ) s, - sys.v_\$sqltext p -where - s.ranking <= $numsql and - p.address = s.address -order by - 1 desc, s.address, p.piece"; - - global $ADODB_CACHE_MODE; - if (isset($_GET['expsixora']) && isset($_GET['sql'])) { - $partial = empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - - if (isset($_GET['sql'])) return $this->_SuspiciousSQL($numsql); - - $s = ''; - $s .= $this->_SuspiciousSQL($numsql); - $s .= '

    '; - - $save = $ADODB_CACHE_MODE; - $ADODB_CACHE_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->SelectLimit($sql); - $this->conn->LogSQL($savelog); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - if ($rs) { - $s .= "\n

    Ixora Suspicious SQL

    "; - $s .= $this->tohtml($rs,'expsixora'); - } - - return $s; - } - - // code thanks to Ixora. - // http://www.ixora.com.au/scripts/query_opt.htm - // requires oracle 8.1.7 or later - function ExpensiveSQL($numsql = 10) - { - $sql = " -select - substr(to_char(s.pct, '99.00'), 2) || '%' load, - s.executions executes, - p.sql_text -from - ( - select - address, - disk_reads, - executions, - pct, - rank() over (order by disk_reads desc) ranking - from - ( - select - address, - disk_reads, - executions, - 100 * ratio_to_report(disk_reads) over () pct - from - sys.v_\$sql - where - command_type != 47 and module != 'T.O.A.D.' - ) - where - disk_reads > 50 * executions - ) s, - sys.v_\$sqltext p -where - s.ranking <= $numsql and - p.address = s.address -order by - 1 desc, s.address, p.piece -"; - global $ADODB_CACHE_MODE; - if (isset($_GET['expeixora']) && isset($_GET['sql'])) { - $partial = empty($_GET['part']); - echo "".$this->Explain($_GET['sql'],$partial)."\n"; - } - if (isset($_GET['sql'])) { - $var = $this->_ExpensiveSQL($numsql); - return $var; - } - - $s = ''; - $s .= $this->_ExpensiveSQL($numsql); - $s .= '

    '; - $save = $ADODB_CACHE_MODE; - $ADODB_CACHE_MODE = ADODB_FETCH_NUM; - if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false); - - $savelog = $this->conn->LogSQL(false); - $rs =& $this->conn->Execute($sql); - $this->conn->LogSQL($savelog); - - if (isset($savem)) $this->conn->SetFetchMode($savem); - $ADODB_CACHE_MODE = $save; - - if ($rs) { - $s .= "\n

    Ixora Expensive SQL

    "; - $s .= $this->tohtml($rs,'expeixora'); - } - - return $s; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-postgres.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-postgres.inc.php deleted file mode 100755 index efa71662..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/perf/perf-postgres.inc.php +++ /dev/null @@ -1,124 +0,0 @@ - array('RATIO', - "select case when count(*)=3 then 'TRUE' else 'FALSE' end from pg_settings where (name='stats_block_level' or name='stats_row_level' or name='stats_start_collector') and setting='on' ", - 'Value must be TRUE to enable hit ratio statistics (stats_start_collector,stats_row_level and stats_block_level must be set to true in postgresql.conf)'), - 'data cache hit ratio' => array('RATIO', - "select case when blks_hit=0 then 0 else round( ((1-blks_read::float/blks_hit)*100)::numeric, 2) end from pg_stat_database where datname='\$DATABASE'", - '=WarnCacheRatio'), - 'IO', - 'data reads' => array('IO', - 'select sum(heap_blks_read+toast_blks_read) from pg_statio_user_tables', - ), - 'data writes' => array('IO', - 'select round((sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16)::numeric,2) from pg_stat_user_tables', - 'Count of inserts/updates/deletes * coef'), - - 'Data Cache', - 'data cache buffers' => array('DATAC', - "select setting from pg_settings where name='shared_buffers'", - 'Number of cache buffers. Tuning'), - 'cache blocksize' => array('DATAC', - 'select 8192', - '(estimate)' ), - 'data cache size' => array( 'DATAC', - "select setting::integer*8192 from pg_settings where name='shared_buffers'", - '' ), - 'operating system cache size' => array( 'DATA', - "select setting::integer*8192 from pg_settings where name='effective_cache_size'", - '(effective cache size)' ), - 'Memory Usage', - # Postgres 7.5 changelog: Rename server parameters SortMem and VacuumMem to work_mem and maintenance_work_mem; - 'sort/work buffer size' => array('CACHE', - "select setting::integer*1024 from pg_settings where name='sort_mem' or name = 'work_mem' order by name", - 'Size of sort buffer (per query)' ), - 'Connections', - 'current connections' => array('SESS', - 'select count(*) from pg_stat_activity', - ''), - 'max connections' => array('SESS', - "select setting from pg_settings where name='max_connections'", - ''), - 'Parameters', - 'rollback buffers' => array('COST', - "select setting from pg_settings where name='wal_buffers'", - 'WAL buffers'), - 'random page cost' => array('COST', - "select setting from pg_settings where name='random_page_cost'", - 'Cost of doing a seek (default=4). See random_page_cost'), - false - ); - - function perf_postgres(&$conn) - { - $this->conn =& $conn; - } - - function Explain($sql,$partial=false) - { - $save = $this->conn->LogSQL(false); - - if ($partial) { - $sqlq = $this->conn->qstr($sql.'%'); - $arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq"); - if ($arr) { - foreach($arr as $row) { - $sql = reset($row); - if (crc32($sql) == $partial) break; - } - } - } - $sql = str_replace('?',"''",$sql); - $s = '

    Explain: '.htmlspecialchars($sql).'

    '; - $rs = $this->conn->Execute('EXPLAIN '.$sql); - $this->conn->LogSQL($save); - $s .= '
    ';
    -		if ($rs)
    -			while (!$rs->EOF) {
    -				$s .= reset($rs->fields)."\n";
    -				$rs->MoveNext();
    -			}
    -		$s .= '
    '; - $s .= $this->Tracer($sql,$partial); - return $s; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pivottable.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pivottable.inc.php deleted file mode 100755 index 0e0e7b1f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/pivottable.inc.php +++ /dev/null @@ -1,187 +0,0 @@ -databaseType,'access') !== false; - // note - vfp 6 still doesn' work even with IIF enabled || $db->databaseType == 'vfp'; - - //$hidecnt = false; - - if ($where) $where = "\nWHERE $where"; - if (!is_array($colfield)) $colarr = $db->GetCol("select distinct $colfield from $tables $where order by 1"); - if (!$aggfield) $hidecnt = false; - - $sel = "$rowfields, "; - if (is_array($colfield)) { - foreach ($colfield as $k => $v) { - $k = trim($k); - if (!$hidecnt) { - $sel .= $iif ? - "\n\t$aggfn(IIF($v,1,0)) AS \"$k\", " - : - "\n\t$aggfn(CASE WHEN $v THEN 1 ELSE 0 END) AS \"$k\", "; - } - if ($aggfield) { - $sel .= $iif ? - "\n\t$aggfn(IIF($v,$aggfield,0)) AS \"$sumlabel$k\", " - : - "\n\t$aggfn(CASE WHEN $v THEN $aggfield ELSE 0 END) AS \"$sumlabel$k\", "; - } - } - } else { - foreach ($colarr as $v) { - if (!is_numeric($v)) $vq = $db->qstr($v); - else $vq = $v; - $v = trim($v); - if (strlen($v) == 0 ) $v = 'null'; - if (!$hidecnt) { - $sel .= $iif ? - "\n\t$aggfn(IIF($colfield=$vq,1,0)) AS \"$v\", " - : - "\n\t$aggfn(CASE WHEN $colfield=$vq THEN 1 ELSE 0 END) AS \"$v\", "; - } - if ($aggfield) { - if ($hidecnt) $label = $v; - else $label = "{$v}_$aggfield"; - $sel .= $iif ? - "\n\t$aggfn(IIF($colfield=$vq,$aggfield,0)) AS \"$label\", " - : - "\n\t$aggfn(CASE WHEN $colfield=$vq THEN $aggfield ELSE 0 END) AS \"$label\", "; - } - } - } - if ($aggfield && $aggfield != '1'){ - $agg = "$aggfn($aggfield)"; - $sel .= "\n\t$agg as \"$sumlabel$aggfield\", "; - } - - if ($showcount) - $sel .= "\n\tSUM(1) as Total"; - else - $sel = substr($sel,0,strlen($sel)-2); - - - // Strip aliases - $rowfields = preg_replace('/ AS (\w+)/i', '', $rowfields); - - $sql = "SELECT $sel \nFROM $tables $where \nGROUP BY $rowfields"; - - return $sql; - } - -/* EXAMPLES USING MS NORTHWIND DATABASE */ -if (0) { - -# example1 -# -# Query the main "product" table -# Set the rows to CompanyName and QuantityPerUnit -# and the columns to the Categories -# and define the joins to link to lookup tables -# "categories" and "suppliers" -# - - $sql = PivotTableSQL( - $gDB, # adodb connection - 'products p ,categories c ,suppliers s', # tables - 'CompanyName,QuantityPerUnit', # row fields - 'CategoryName', # column fields - 'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where -); - print "
    $sql";
    - $rs = $gDB->Execute($sql);
    - rs2html($rs);
    - 
    -/*
    -Generated SQL:
    -
    -SELECT CompanyName,QuantityPerUnit, 
    -	SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", 
    -	SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", 
    -	SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", 
    -	SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy Products", 
    -	SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", 
    -	SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", 
    -	SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", 
    -	SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", 
    -	SUM(1) as Total 
    -FROM products p ,categories c ,suppliers s  WHERE p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
    -GROUP BY CompanyName,QuantityPerUnit
    -*/
    -//=====================================================================
    -
    -# example2
    -#
    -# Query the main "product" table
    -# Set the rows to CompanyName and QuantityPerUnit
    -# and the columns to the UnitsInStock for diiferent ranges
    -# and define the joins to link to lookup tables 
    -# "categories" and "suppliers"
    -#
    - $sql = PivotTableSQL(
    - 	$gDB,										# adodb connection
    - 	'products p ,categories c ,suppliers s',	# tables
    -	'CompanyName,QuantityPerUnit',				# row fields
    -												# column ranges
    -array(										
    -' 0 ' => 'UnitsInStock <= 0',
    -"1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5',
    -"6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10',
    -"11 to 15"  => '10 < UnitsInStock and UnitsInStock <= 15',
    -"16+" =>'15 < UnitsInStock'
    -),
    -	' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where
    -	'UnitsInStock', 							# sum this field
    -	'Sum'										# sum label prefix
    -);
    - print "
    $sql";
    - $rs = $gDB->Execute($sql);
    - rs2html($rs);
    - /*
    - Generated SQL:
    - 
    -SELECT CompanyName,QuantityPerUnit, 
    -	SUM(CASE WHEN UnitsInStock <= 0 THEN UnitsInStock ELSE 0 END) AS "Sum  0 ", 
    -	SUM(CASE WHEN 0 < UnitsInStock and UnitsInStock <= 5 THEN UnitsInStock ELSE 0 END) AS "Sum 1 to 5", 
    -	SUM(CASE WHEN 5 < UnitsInStock and UnitsInStock <= 10 THEN UnitsInStock ELSE 0 END) AS "Sum 6 to 10", 
    -	SUM(CASE WHEN 10 < UnitsInStock and UnitsInStock <= 15 THEN UnitsInStock ELSE 0 END) AS "Sum 11 to 15", 
    -	SUM(CASE WHEN 15 < UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum 16+",
    -	SUM(UnitsInStock) AS "Sum UnitsInStock", 
    -	SUM(1) as Total 
    -FROM products p ,categories c ,suppliers s  WHERE  p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
    -GROUP BY CompanyName,QuantityPerUnit
    - */
    -}
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/readme.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/readme.txt
    deleted file mode 100755
    index 97bdd9ea..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/readme.txt	
    +++ /dev/null
    @@ -1,62 +0,0 @@
    ->> ADODB Library for PHP4
    -
    -(c) 2000-2004 John Lim (jlim@natsoft.com.my)
    -
    -Released under both BSD and GNU Lesser GPL library license. 
    -This means you can use it in proprietary products.
    - 
    - 
    ->> Introduction
    -
    -PHP's database access functions are not standardised. This creates a 
    -need for a database class library to hide the differences between the 
    -different databases (encapsulate the differences) so we can easily 
    -switch databases.
    -
    -We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle, 
    -Microsoft SQL server,  Foxpro ODBC, Access ODBC, Informix, DB2,
    -Sybase SQL Anywhere, generic ODBC and Microsoft's ADO. 
    -
    -We hope more people will contribute drivers to support other databases.
    -
    -
    ->> Documentation and Examples
    -
    -Refer to the adodb/docs directory for full documentation and examples. 
    -There is also a  tutorial tute.htm that contrasts ADODB code with 
    -mysql code.
    -
    -
    ->>> Files
    -Adodb.inc.php is the main file. You need to include only this file.
    -
    -Adodb-*.inc.php are the database specific driver code.
    -
    -Test.php contains a list of test commands to exercise the class library.
    -
    -Adodb-session.php is the PHP4 session handling code.
    -
    -Testdatabases.inc.php contains the list of databases to apply the tests on.
    -
    -Benchmark.php is a simple benchmark to test the throughput of a simple SELECT 
    -statement for databases described in testdatabases.inc.php. The benchmark
    -tables are created in test.php.
    -
    -readme.htm is the main documentation.
    -
    -tute.htm is the tutorial.
    -
    -
    ->> More Info
    -
    -For more information, including installation see readme.htm
    -or visit
    -           http://adodb.sourceforge.net/
    -
    -
    ->> Feature Requests and Bug Reports
    -
    -Email to jlim@natsoft.com.my 
    -
    -
    - 
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/rsfilter.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/rsfilter.inc.php
    deleted file mode 100755
    index 29662a21..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/rsfilter.inc.php	
    +++ /dev/null
    @@ -1,61 +0,0 @@
    - $v) {
    -			$arr[$k] = ucwords($v);
    -		}
    -	}
    -	$rs = RSFilter($rs,'do_ucwords');
    - */
    -function &RSFilter($rs,$fn)
    -{
    -	if ($rs->databaseType != 'array') {
    -		if (!$rs->connection) return false;
    -		
    -		$rs = &$rs->connection->_rs2rs($rs);
    -	}
    -	$rows = $rs->RecordCount();
    -	for ($i=0; $i < $rows; $i++) {
    -		if (is_array ($fn)) {
    -        	$obj = $fn[0];
    -        	$method = $fn[1];
    -        	$obj->$method ($rs->_array[$i],$rs);
    -      } else {
    -			$fn($rs->_array[$i],$rs);
    -      }
    -	  
    -	}
    -	if (!$rs->EOF) {
    -		$rs->_currentRow = 0;
    -		$rs->fields = $rs->_array[0];
    -	}
    -	
    -	return $rs;
    -}
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/server.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/server.php
    deleted file mode 100755
    index a39f9c77..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/server.php	
    +++ /dev/null
    @@ -1,100 +0,0 @@
    -Connect($host,$uid,$pwd,$database)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg());
    -$sql = undomq($_REQUEST['sql']);
    -
    -if (isset($_REQUEST['fetch']))
    -	$ADODB_FETCH_MODE = $_REQUEST['fetch'];
    -	
    -if (isset($_REQUEST['nrows'])) {
    -	$nrows = $_REQUEST['nrows'];
    -	$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
    -	$rs = $conn->SelectLimit($sql,$nrows,$offset);
    -} else 
    -	$rs = $conn->Execute($sql);
    -if ($rs){ 
    -	//$rs->timeToLive = 1;
    -	echo _rs2serialize($rs,$conn,$sql);
    -	$rs->Close();
    -} else
    -	err($conn->ErrorNo(). $sep .$conn->ErrorMsg());
    -
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/all-wcprops
    deleted file mode 100755
    index eb9e7c89..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/all-wcprops	
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -K 25
    -svn:wc:ra_dav:version-url
    -V 72
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session
    -END
    -adodb-session-clob2.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 96
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/adodb-session-clob2.php
    -END
    -adodb-sessions.mysql.sql
    -K 25
    -svn:wc:ra_dav:version-url
    -V 97
    -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/session/adodb-sessions.mysql.sql
    -END
    -adodb-sessions.oracle.sql
    -K 25
    -svn:wc:ra_dav:version-url
    -V 98
    -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/session/adodb-sessions.oracle.sql
    -END
    -adodb-session.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 90
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-session.php
    -END
    -session_schema2.xml
    -K 25
    -svn:wc:ra_dav:version-url
    -V 92
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/session_schema2.xml
    -END
    -adodb-cryptsession2.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 96
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/adodb-cryptsession2.php
    -END
    -adodb-encrypt-mcrypt.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 97
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-encrypt-mcrypt.php
    -END
    -adodb-session-clob.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 95
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-session-clob.php
    -END
    -adodb-sessions.oracle.clob.sql
    -K 25
    -svn:wc:ra_dav:version-url
    -V 103
    -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/session/adodb-sessions.oracle.clob.sql
    -END
    -crypt.inc.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 86
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/crypt.inc.php
    -END
    -adodb-compress-gzip.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 96
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-compress-gzip.php
    -END
    -session_schema.xml
    -K 25
    -svn:wc:ra_dav:version-url
    -V 91
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/session_schema.xml
    -END
    -adodb-cryptsession.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 95
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-cryptsession.php
    -END
    -adodb-sess.txt
    -K 25
    -svn:wc:ra_dav:version-url
    -V 87
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-sess.txt
    -END
    -adodb-session2.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 91
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/adodb-session2.php
    -END
    -adodb-encrypt-secret.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 97
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-encrypt-secret.php
    -END
    -adodb-encrypt-md5.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 94
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-encrypt-md5.php
    -END
    -adodb-encrypt-sha1.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 95
    -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/session/adodb-encrypt-sha1.php
    -END
    -adodb-compress-bzip2.php
    -K 25
    -svn:wc:ra_dav:version-url
    -V 97
    -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/adodb-compress-bzip2.php
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/entries
    deleted file mode 100755
    index bd6f11ec..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/entries	
    +++ /dev/null
    @@ -1,278 +0,0 @@
    -8
    -
    -dir
    -556
    -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/session
    -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php
    -
    -
    -
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -
    -
    -svn:special svn:externals svn:needs-lock
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -b2ee660e-c932-0410-bdee-d8da4d8102f4
    -
    -adodb-session-clob2.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.395223Z
    -6c42286a79eb5ff2ac2ca46ecde57ca3
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -adodb-sessions.mysql.sql
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.379602Z
    -42fef0886af1f6da31a06de273876b71
    -2005-07-07T18:03:06.000000Z
    -240
    -tgauss
    -has-props
    -
    -adodb-sessions.oracle.sql
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.379602Z
    -08d0fc1f5fbf8b79a4dca43cbd30e3a1
    -2005-07-07T18:03:06.000000Z
    -240
    -tgauss
    -has-props
    -
    -adodb-session.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.395223Z
    -6988c5a0f0409cf02787750c641f2f2a
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -session_schema2.xml
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.410843Z
    -34094c892ec3ab48bdaead67fd0d09be
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -adodb-cryptsession2.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.410843Z
    -ad6a2f06436cdc8b8bd50d4006a1bc39
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -adodb-encrypt-mcrypt.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.442084Z
    -4048643cfdd7f4d6ada98aac57ac2eb1
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-session-clob.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.426464Z
    -bb48dad86b3aae7c129cd49d0aaebd2f
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-sessions.oracle.clob.sql
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.426464Z
    -3c64f822ee1b493b319c6e8196cc06b8
    -2005-07-07T18:03:06.000000Z
    -240
    -tgauss
    -has-props
    -
    -crypt.inc.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.457705Z
    -4dad264ca0f5f669be480305f6be8835
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-compress-gzip.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.442084Z
    -3298cab571d752bef2f76181b16b1974
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-cryptsession.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.473326Z
    -414aa6a557224af7c75efd27e91d3777
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-sess.txt
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.473326Z
    -a25a7a7ed70830c2d14901e8bf14d4de
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-session2.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.457705Z
    -55114e284f2a34b351e00af0ef354e01
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -session_schema.xml
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.488946Z
    -644334444418c6b39d20b6f22f3cf634
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -adodb-encrypt-secret.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.488946Z
    -ff2076f0d5cc84caf3323e7a5d110f56
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-encrypt-md5.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.488946Z
    -62b8721c86c98927d61b1177e609c906
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -adodb-encrypt-sha1.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.504567Z
    -5c928ad5f9385ce8ebf35c8c62fe729d
    -2007-03-12T11:01:00.000000Z
    -351
    -cweiske
    -has-props
    -
    -adodb-compress-bzip2.php
    -file
    -
    -
    -
    -
    -2008-02-29T14:57:53.504567Z
    -2527abec62a354bb5876537e941acf98
    -2007-03-12T10:55:13.000000Z
    -350
    -cweiske
    -has-props
    -
    -old
    -dir
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/format
    deleted file mode 100755
    index 45a4fb75..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/format	
    +++ /dev/null
    @@ -1 +0,0 @@
    -8
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-bzip2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-bzip2.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-bzip2.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-gzip.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-gzip.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-compress-gzip.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession2.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-cryptsession2.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-mcrypt.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-mcrypt.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-mcrypt.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-md5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-md5.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-md5.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-secret.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-secret.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-secret.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-sha1.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-sha1.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-encrypt-sha1.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sess.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sess.txt.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sess.txt.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob2.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session-clob2.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session2.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-session2.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.mysql.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.mysql.sql.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.mysql.sql.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.clob.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.clob.sql.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.clob.sql.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.sql.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/adodb-sessions.oracle.sql.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/crypt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/crypt.inc.php.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/crypt.inc.php.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema.xml.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema.xml.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema2.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema2.xml.svn-base
    deleted file mode 100755
    index 7b57b302..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/prop-base/session_schema2.xml.svn-base	
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -K 13
    -svn:eol-style
    -V 6
    -native
    -K 12
    -svn:keywords
    -V 23
    -Author Date Id Revision
    -END
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-bzip2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-bzip2.php.svn-base
    deleted file mode 100755
    index 79c3823f..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-bzip2.php.svn-base	
    +++ /dev/null
    @@ -1,118 +0,0 @@
    -_block_size;
    -	}
    -
    -	/**
    -	 */
    -	function setBlockSize($block_size) {
    -		assert('$block_size >= 1');
    -		assert('$block_size <= 9');
    -		$this->_block_size = (int) $block_size;
    -	}
    -
    -	/**
    -	 */
    -	function getWorkLevel() {
    -		return $this->_work_level;
    -	}
    -
    -	/**
    -	 */
    -	function setWorkLevel($work_level) {
    -		assert('$work_level >= 0');
    -		assert('$work_level <= 250');
    -		$this->_work_level = (int) $work_level;
    -	}
    -
    -	/**
    -	 */
    -	function getMinLength() {
    -		return $this->_min_length;
    -	}
    -
    -	/**
    -	 */
    -	function setMinLength($min_length) {
    -		assert('$min_length >= 0');
    -		$this->_min_length = (int) $min_length;
    -	}
    -
    -	/**
    -	 */
    -	function ADODB_Compress_Bzip2($block_size = null, $work_level = null, $min_length = null) {
    -		if (!is_null($block_size)) {
    -			$this->setBlockSize($block_size);
    -		}
    -
    -		if (!is_null($work_level)) {
    -			$this->setWorkLevel($work_level);
    -		}
    -
    -		if (!is_null($min_length)) {
    -			$this->setMinLength($min_length);
    -		}
    -	}
    -
    -	/**
    -	 */
    -	function write($data, $key) {
    -		if (strlen($data) < $this->_min_length) {
    -			return $data;
    -		}
    -
    -		if (!is_null($this->_block_size)) {
    -			if (!is_null($this->_work_level)) {
    -				return bzcompress($data, $this->_block_size, $this->_work_level);
    -			} else {
    -				return bzcompress($data, $this->_block_size);
    -			}
    -		}
    -
    -		return bzcompress($data);
    -	}
    -
    -	/**
    -	 */
    -	function read($data, $key) {
    -		return $data ? bzdecompress($data) : $data;
    -	}
    -
    -}
    -
    -return 1;
    -
    -?>
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-gzip.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-gzip.php.svn-base
    deleted file mode 100755
    index da8d3d4e..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-compress-gzip.php.svn-base	
    +++ /dev/null
    @@ -1,93 +0,0 @@
    -_level;
    -	}
    -
    -	/**
    -	 */
    -	function setLevel($level) {
    -		assert('$level >= 0');
    -		assert('$level <= 9');
    -		$this->_level = (int) $level;
    -	}
    -
    -	/**
    -	 */
    -	function getMinLength() {
    -		return $this->_min_length;
    -	}
    -
    -	/**
    -	 */
    -	function setMinLength($min_length) {
    -		assert('$min_length >= 0');
    -		$this->_min_length = (int) $min_length;
    -	}
    -
    -	/**
    -	 */
    -	function ADODB_Compress_Gzip($level = null, $min_length = null) {
    -		if (!is_null($level)) {
    -			$this->setLevel($level);
    -		}
    -
    -		if (!is_null($min_length)) {
    -			$this->setMinLength($min_length);
    -		}
    -	}
    -
    -	/**
    -	 */
    -	function write($data, $key) {
    -		if (strlen($data) < $this->_min_length) {
    -			return $data;
    -		}
    -
    -		if (!is_null($this->_level)) {
    -			return gzcompress($data, $this->_level);
    -		} else {
    -			return gzcompress($data);
    -		}
    -	}
    -
    -	/**
    -	 */
    -	function read($data, $key) {
    -		return $data ? gzuncompress($data) : $data;
    -	}
    -
    -}
    -
    -return 1;
    -
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession.php.svn-base
    deleted file mode 100755
    index ddf619dd..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession.php.svn-base	
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession2.php.svn-base
    deleted file mode 100755
    index 6334eaf8..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-cryptsession2.php.svn-base	
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-mcrypt.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-mcrypt.php.svn-base
    deleted file mode 100755
    index a047579f..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-mcrypt.php.svn-base	
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -_cipher;
    -	}
    -
    -	/**
    -	 */
    -	function setCipher($cipher) {
    -		$this->_cipher = $cipher;
    -	}
    -
    -	/**
    -	 */
    -	function getMode() {
    -		return $this->_mode;
    -	}
    -
    -	/**
    -	 */
    -	function setMode($mode) {
    -		$this->_mode = $mode;
    -	}
    -
    -	/**
    -	 */
    -	function getSource() {
    -		return $this->_source;
    -	}
    -
    -	/**
    -	 */
    -	function setSource($source) {
    -		$this->_source = $source;
    -	}
    -
    -	/**
    -	 */
    -	function ADODB_Encrypt_MCrypt($cipher = null, $mode = null, $source = null) {
    -		if (!$cipher) {
    -			$cipher = MCRYPT_RIJNDAEL_256;
    -		}
    -		if (!$mode) {
    -			$mode = MCRYPT_MODE_ECB;
    -		}
    -		if (!$source) {
    -			$source = MCRYPT_RAND;
    -		}
    -
    -		$this->_cipher = $cipher;
    -		$this->_mode = $mode;
    -		$this->_source = $source;
    -	}
    -
    -	/**
    -	 */
    -	function write($data, $key) {
    -		$iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode);
    -		$iv = mcrypt_create_iv($iv_size, $this->_source);
    -		return mcrypt_encrypt($this->_cipher, $key, $data, $this->_mode, $iv);
    -	}
    -
    -	/**
    -	 */
    -	function read($data, $key) {
    -		$iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode);
    -		$iv = mcrypt_create_iv($iv_size, $this->_source);
    -		$rv = mcrypt_decrypt($this->_cipher, $key, $data, $this->_mode, $iv);
    -		return rtrim($rv, "\0");
    -	}
    -
    -}
    -
    -return 1;
    -
    -?>
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-md5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-md5.php.svn-base
    deleted file mode 100755
    index 24caa662..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-md5.php.svn-base	
    +++ /dev/null
    @@ -1,39 +0,0 @@
    -encrypt($data, $key);
    -	}
    -
    -	/**
    -	 */
    -	function read($data, $key) {
    -		$md5crypt =& new MD5Crypt();
    -		return $md5crypt->decrypt($data, $key);
    -	}
    -
    -}
    -
    -return 1;
    -
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-secret.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-secret.php.svn-base
    deleted file mode 100755
    index cc7e2fb2..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-secret.php.svn-base	
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-sha1.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-sha1.php.svn-base
    deleted file mode 100755
    index c876002b..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-encrypt-sha1.php.svn-base	
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -encrypt($data, $key);
    -
    -	}
    -
    -
    -	function read($data, $key) 
    -	{
    -		$sha1crypt =& new SHA1Crypt();
    -		return $sha1crypt->decrypt($data, $key);
    -
    -	}
    -}
    -
    -
    -
    -return 1;
    -?>
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sess.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sess.txt.svn-base
    deleted file mode 100755
    index c6c76858..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sess.txt.svn-base	
    +++ /dev/null
    @@ -1,131 +0,0 @@
    -John,
    -
    -I have been an extremely satisfied ADODB user for several years now.
    -
    -To give you something back for all your hard work, I've spent the last 3
    -days rewriting the adodb-session.php code.
    -
    -----------
    -What's New
    -----------
    -
    -Here's a list of the new code's benefits:
    -
    -* Combines the functionality of the three files:
    -
    -adodb-session.php
    -adodb-session-clob.php
    -adodb-cryptsession.php
    -
    -each with very similar functionality, into a single file adodb-session.php.
    -This will ease maintenance and support issues.
    -
    -* Supports multiple encryption and compression schemes.
    -  Currently, we support:
    -
    -  MD5Crypt (crypt.inc.php)
    -  MCrypt
    -  Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
    -  GZip
    -  BZip2
    -
    -These can be stacked, so if you want to compress and then encrypt your
    -session data, it's easy.
    -Also, the built-in MCrypt functions will be *much* faster, and more secure,
    -than the MD5Crypt code.
    -
    -* adodb-session.php contains a single class ADODB_Session that encapsulates
    -all functionality.
    -  This eliminates the use of global vars and defines (though they are
    -supported for backwards compatibility).
    -
    -* All user defined parameters are now static functions in the ADODB_Session
    -class.
    -
    -New parameters include:
    -
    -* encryptionKey(): Define the encryption key used to encrypt the session.
    -Originally, it was a hard coded string.
    -
    -* persist(): Define if the database will be opened in persistent mode.
    -Originally, the user had to call adodb_sess_open().
    -
    -* dataFieldName(): Define the field name used to store the session data, as
    -'DATA' appears to be a reserved word in the following cases:
    -	ANSI SQL
    -	IBM DB2
    -	MS SQL Server
    -	Postgres
    -	SAP
    -
    -* filter(): Used to support multiple, simulataneous encryption/compression
    -schemes.
    -
    -* Debug support is improved thru _rsdump() function, which is called after
    -every database call.
    -
    -------------
    -What's Fixed
    -------------
    -
    -The new code includes several bug fixes and enhancements:
    -
    -* sesskey is compared in BINARY mode for MySQL, to avoid problems with
    -session keys that differ only by case.
    -  Of course, the user should define the sesskey field as BINARY, to
    -correctly fix this problem, otherwise performance will suffer.
    -
    -* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
    -the original code have been optimized to a single DELETE.
    -
    -* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
    -WHERE sesskey = $qkey" will only return a single value, we don't loop on the
    -result, we simply process the row, if any.
    -
    -* We close $rs after every use.
    -
    ----------------
    -What's the Same
    ----------------
    -
    -I know backwards compatibility is *very* important to you.  Therefore, the
    -new code is 100% backwards compatible.
    -
    -If you like my code, but don't "trust" it's backwards compatible, maybe we
    -offer it as beta code, in a new directory for a release or two?
    -
    -------------
    -What's To Do
    -------------
    -
    -I've vascillated over whether to use a single function to get/set
    -parameters:
    -
    -$user = ADODB_Session::user(); 	// get
    -ADODB_Session::user($user);		// set
    -
    -or to use separate functions (which is the PEAR/Java way):
    -
    -$user = ADODB_Session::getUser();
    -ADODB_Session::setUser($user);
    -
    -I've chosen the former as it's makes for a simpler API, and reduces the
    -amount of code, but I'd be happy to change it to the latter.
    -
    -Also, do you think the class should be a singleton class, versus a static
    -class?
    -
    -Let me know if you find this code useful, and will be including it in the
    -next release of ADODB.
    -
    -If so, I will modify the current documentation to detail the new
    -functionality.  To that end, what file(s) contain the documentation?  Please
    -send them to me if they are not publically available.
    -
    -Also, if there is *anything* in the code that you like to see changed, let
    -me know.
    -
    -Thanks,
    -
    -Ross
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob.php.svn-base
    deleted file mode 100755
    index a2cd4800..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob.php.svn-base	
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob2.php.svn-base
    deleted file mode 100755
    index 54b80439..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session-clob2.php.svn-base	
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -
    \ No newline at end of file
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session.php.svn-base
    deleted file mode 100755
    index f0054ef8..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session.php.svn-base	
    +++ /dev/null
    @@ -1,934 +0,0 @@
    -Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id));
    -	
    -	/* it is possible that the update statement fails due to a collision */
    -	if (!$ok) {
    -		session_id($old_id);
    -		if (empty($ck)) $ck = session_get_cookie_params();
    -		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
    -		return false;
    -	}
    -	
    -	return true;
    -}
    -
    -/*
    -    Generate database table for session data
    -    @see http://phplens.com/lens/lensforum/msgs.php?id=12280
    -    @return 0 if failure, 1 if errors, 2 if successful.
    -	@author Markus Staab http://www.public-4u.de
    -*/
    -function adodb_session_create_table($schemaFile=null,$conn = null)
    -{
    -    // set default values
    -    if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema.xml';
    -    if ($conn===null) $conn =& ADODB_Session::_conn();
    -
    -	if (!$conn) return 0;
    -
    -    $schema = new adoSchema($conn);
    -    $schema->ParseSchema($schemaFile);
    -    return $schema->ExecuteSchema();
    -}
    -
    -/*!
    -	\static
    -*/
    -class ADODB_Session {
    -	/////////////////////
    -	// getter/setter methods
    -	/////////////////////
    -	
    -	/*
    -	
    -	function Lock($lock=null)
    -	{
    -	static $_lock = false;
    -	
    -		if (!is_null($lock)) $_lock = $lock;
    -		return $lock;
    -	}
    -	*/
    -	/*!
    -	*/
    -	function driver($driver = null) {
    -		static $_driver = 'mysql';
    -		static $set = false;
    -
    -		if (!is_null($driver)) {
    -			$_driver = trim($driver);
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) {
    -				return $GLOBALS['ADODB_SESSION_DRIVER'];
    -			}
    -		}
    -
    -		return $_driver;
    -	}
    -
    -	/*!
    -	*/
    -	function host($host = null) {
    -		static $_host = 'localhost';
    -		static $set = false;
    -
    -		if (!is_null($host)) {
    -			$_host = trim($host);
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) {
    -				return $GLOBALS['ADODB_SESSION_CONNECT'];
    -			}
    -		}
    -
    -		return $_host;
    -	}
    -
    -	/*!
    -	*/
    -	function user($user = null) {
    -		static $_user = 'root';
    -		static $set = false;
    -
    -		if (!is_null($user)) {
    -			$_user = trim($user);
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESSION_USER'])) {
    -				return $GLOBALS['ADODB_SESSION_USER'];
    -			}
    -		}
    -
    -		return $_user;
    -	}
    -
    -	/*!
    -	*/
    -	function password($password = null) {
    -		static $_password = '';
    -		static $set = false;
    -
    -		if (!is_null($password)) {
    -			$_password = $password;
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESSION_PWD'])) {
    -				return $GLOBALS['ADODB_SESSION_PWD'];
    -			}
    -		}
    -
    -		return $_password;
    -	}
    -
    -	/*!
    -	*/
    -	function database($database = null) {
    -		static $_database = 'xphplens_2';
    -		static $set = false;
    -
    -		if (!is_null($database)) {
    -			$_database = trim($database);
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESSION_DB'])) {
    -				return $GLOBALS['ADODB_SESSION_DB'];
    -			}
    -		}
    -
    -		return $_database;
    -	}
    -
    -	/*!
    -	*/
    -	function persist($persist = null) 
    -	{
    -		static $_persist = true;
    -
    -		if (!is_null($persist)) {
    -			$_persist = trim($persist);
    -		}
    -
    -		return $_persist;
    -	}
    -
    -	/*!
    -	*/
    -	function lifetime($lifetime = null) {
    -		static $_lifetime;
    -		static $set = false;
    -
    -		if (!is_null($lifetime)) {
    -			$_lifetime = (int) $lifetime;
    -			$set = true;
    -		} elseif (!$set) {
    -			// backwards compatibility
    -			if (isset($GLOBALS['ADODB_SESS_LIFE'])) {
    -				return $GLOBALS['ADODB_SESS_LIFE'];
    -			}
    -		}
    -		if (!$_lifetime) {
    -			$_lifetime = ini_get('session.gc_maxlifetime');
    -			if ($_lifetime <= 1) {
    -				// bug in PHP 4.0.3 pl 1  -- how about other versions?
    -				//print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $lifetime

    "; - $_lifetime = 1440; - } - } - - return $_lifetime; - } - - /*! - */ - function debug($debug = null) { - static $_debug = false; - static $set = false; - - if (!is_null($debug)) { - $_debug = (bool) $debug; - - $conn = ADODB_Session::_conn(); - if ($conn) { - $conn->debug = $_debug; - } - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_DEBUG'])) { - return $GLOBALS['ADODB_SESS_DEBUG']; - } - } - - return $_debug; - } - - /*! - */ - function expireNotify($expire_notify = null) { - static $_expire_notify; - static $set = false; - - if (!is_null($expire_notify)) { - $_expire_notify = $expire_notify; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) { - return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY']; - } - } - - return $_expire_notify; - } - - /*! - */ - function table($table = null) { - static $_table = 'sessions'; - static $set = false; - - if (!is_null($table)) { - $_table = trim($table); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_TBL'])) { - return $GLOBALS['ADODB_SESSION_TBL']; - } - } - - return $_table; - } - - /*! - */ - function optimize($optimize = null) { - static $_optimize = false; - static $set = false; - - if (!is_null($optimize)) { - $_optimize = (bool) $optimize; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_OPTIMIZE')) { - return true; - } - } - - return $_optimize; - } - - /*! - */ - function syncSeconds($sync_seconds = null) { - static $_sync_seconds = 60; - static $set = false; - - if (!is_null($sync_seconds)) { - $_sync_seconds = (int) $sync_seconds; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_SYNCH_SECS')) { - return ADODB_SESSION_SYNCH_SECS; - } - } - - return $_sync_seconds; - } - - /*! - */ - function clob($clob = null) { - static $_clob = false; - static $set = false; - - if (!is_null($clob)) { - $_clob = strtolower(trim($clob)); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) { - return $GLOBALS['ADODB_SESSION_USE_LOBS']; - } - } - - return $_clob; - } - - /*! - */ - function dataFieldName($data_field_name = null) { - static $_data_field_name = 'data'; - - if (!is_null($data_field_name)) { - $_data_field_name = trim($data_field_name); - } - - return $_data_field_name; - } - - /*! - */ - function filter($filter = null) { - static $_filter = array(); - - if (!is_null($filter)) { - if (!is_array($filter)) { - $filter = array($filter); - } - $_filter = $filter; - } - - return $_filter; - } - - /*! - */ - function encryptionKey($encryption_key = null) { - static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!'; - - if (!is_null($encryption_key)) { - $_encryption_key = $encryption_key; - } - - return $_encryption_key; - } - - ///////////////////// - // private methods - ///////////////////// - - /*! - */ - function &_conn($conn=null) { - return $GLOBALS['ADODB_SESS_CONN']; - } - - /*! - */ - function _crc($crc = null) { - static $_crc = false; - - if (!is_null($crc)) { - $_crc = $crc; - } - - return $_crc; - } - - /*! - */ - function _init() { - session_module_name('user'); - session_set_save_handler( - array('ADODB_Session', 'open'), - array('ADODB_Session', 'close'), - array('ADODB_Session', 'read'), - array('ADODB_Session', 'write'), - array('ADODB_Session', 'destroy'), - array('ADODB_Session', 'gc') - ); - } - - - /*! - */ - function _sessionKey() { - // use this function to create the encryption key for crypted sessions - // crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt - return crypt(ADODB_Session::encryptionKey(), session_id()); - } - - /*! - */ - function _dumprs($rs) { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - - if (!$conn) { - return; - } - - if (!$debug) { - return; - } - - if (!$rs) { - echo "
    \$rs is null or false
    \n"; - return; - } - - //echo "
    \nAffected_Rows=",$conn->Affected_Rows(),"
    \n"; - - if (!is_object($rs)) { - return; - } - - require_once ADODB_SESSION.'/../tohtml.inc.php'; - rs2html($rs); - } - - ///////////////////// - // public methods - ///////////////////// - - function config($driver, $host, $user, $password, $database=false,$options=false) - { - ADODB_Session::driver($driver); - ADODB_Session::host($host); - ADODB_Session::user($user); - ADODB_Session::password($password); - ADODB_Session::database($database); - - if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB'; - - if (isset($options['table'])) ADODB_Session::table($options['table']); - if (isset($options['lob'])) ADODB_Session::clob($options['lob']); - if (isset($options['debug'])) ADODB_Session::debug($options['debug']); - } - - /*! - Create the connection to the database. - - If $conn already exists, reuse that connection - */ - function open($save_path, $session_name, $persist = null) - { - $conn =& ADODB_Session::_conn(); - - if ($conn) { - return true; - } - - $database = ADODB_Session::database(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $host = ADODB_Session::host(); - $password = ADODB_Session::password(); - $user = ADODB_Session::user(); - - if (!is_null($persist)) { - ADODB_Session::persist($persist); - } else { - $persist = ADODB_Session::persist(); - } - -# these can all be defaulted to in php.ini -# assert('$database'); -# assert('$driver'); -# assert('$host'); - - $conn =& ADONewConnection($driver); - - if ($debug) { - $conn->debug = true; -// ADOConnection::outp( " driver=$driver user=$user pwd=$password db=$database "); - } - - if ($persist) { - switch($persist) { - default: - case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break; - case 'C': $ok = $conn->Connect($host, $user, $password, $database); break; - case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break; - } - } else { - $ok = $conn->Connect($host, $user, $password, $database); - } - - if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn; - else - ADOConnection::outp('

    Session: connection failed

    ', false); - - - return $ok; - } - - /*! - Close the connection - */ - function close() - { -/* - $conn =& ADODB_Session::_conn(); - if ($conn) $conn->Close(); -*/ - return true; - } - - /* - Slurp in the session variables and return the serialized string - */ - function read($key) - { - $conn =& ADODB_Session::_conn(); - $data = ADODB_Session::dataFieldName(); - $filter = ADODB_Session::filter(); - $table = ADODB_Session::table(); - - if (!$conn) { - return ''; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - $sql = "SELECT $data FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . time(); - /* Lock code does not work as it needs to hold transaction within whole page, and we don't know if - developer has commited elsewhere... :( - */ - #if (ADODB_Session::Lock()) - # $rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), $data); - #else - - $rs =& $conn->Execute($sql); - //ADODB_Session::_dumprs($rs); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else { - $v = reset($rs->fields); - $filter = array_reverse($filter); - foreach ($filter as $f) { - if (is_object($f)) { - $v = $f->read($v, ADODB_Session::_sessionKey()); - } - } - $v = rawurldecode($v); - } - - $rs->Close(); - - ADODB_Session::_crc(strlen($v) . crc32($v)); - return $v; - } - - return ''; - } - - /*! - Write the serialized data to a database. - - If the data has not been modified since the last read(), we do not write. - */ - function write($key, $val) - { - global $ADODB_SESSION_READONLY; - - if (!empty($ADODB_SESSION_READONLY)) return; - - $clob = ADODB_Session::clob(); - $conn =& ADODB_Session::_conn(); - $crc = ADODB_Session::_crc(); - $data = ADODB_Session::dataFieldName(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $expire_notify = ADODB_Session::expireNotify(); - $filter = ADODB_Session::filter(); - $lifetime = ADODB_Session::lifetime(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - $qkey = $conn->qstr($key); - - //assert('$table'); - - $expiry = time() + $lifetime; - - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($crc !== false && $crc == (strlen($val) . crc32($val))) { - if ($debug) { - echo '

    Session: Only updating date - crc32 not changed

    '; - } - - $expirevar = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expirevar = $$var; - } - } - - - $sql = "UPDATE $table SET expiry = ".$conn->Param('0').",expireref=".$conn->Param('1')." WHERE $binary sesskey = ".$conn->Param('2')." AND expiry >= ".$conn->Param('3'); - $rs =& $conn->Execute($sql,array($expiry,$expirevar,$key,time())); - return true; - } - $val = rawurlencode($val); - foreach ($filter as $f) { - if (is_object($f)) { - $val = $f->write($val, ADODB_Session::_sessionKey()); - } - } - - $arr = array('sesskey' => $key, 'expiry' => $expiry, $data => $val, 'expireref' => ''); - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $arr['expireref'] = $$var; - } - } - - if (!$clob) { // no lobs, simply use replace() - $arr[$data] = $conn->qstr($val); - $rs = $conn->Replace($table, $arr, 'sesskey', $autoQuote = true); - - } else { - // what value shall we insert/update for lob row? - switch ($driver) { - // empty_clob or empty_lob for oracle dbs - case 'oracle': - case 'oci8': - case 'oci8po': - case 'oci805': - $lob_value = sprintf('empty_%s()', strtolower($clob)); - break; - - // null for all other - default: - $lob_value = 'null'; - break; - } - - $conn->StartTrans(); - $expiryref = $conn->qstr($arr['expireref']); - // do we insert or update? => as for sesskey - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = $qkey"); - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry = $expiry, $data = $lob_value, expireref=$expiryref WHERE sesskey = $qkey"; - } else { - $sql = "INSERT INTO $table (expiry, $data, sesskey,expireref) VALUES ($expiry, $lob_value, $qkey,$expiryref)"; - } - if ($rs)$rs->Close(); - - - $err = ''; - $rs1 =& $conn->Execute($sql); - if (!$rs1) $err = $conn->ErrorMsg()."\n"; - - $rs2 =& $conn->UpdateBlob($table, $data, $val, " sesskey=$qkey", strtoupper($clob)); - if (!$rs2) $err .= $conn->ErrorMsg()."\n"; - - $rs = ($rs && $rs2) ? true : false; - $conn->CompleteTrans(); - } - - if (!$rs) { - ADOConnection::outp('

    Session Replace: ' . $conn->ErrorMsg() . '

    ', false); - return false; - } else { - // bug in access driver (could be odbc?) means that info is not committed - // properly unless select statement executed in Win2000 - if ($conn->databaseType == 'access') { - $sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - } - }/* - if (ADODB_Session::Lock()) { - $conn->CommitTrans(); - }*/ - return $rs ? true : false; - } - - /*! - */ - function destroy($key) { - $conn =& ADODB_Session::_conn(); - $table = ADODB_Session::table(); - $expire_notify = ADODB_Session::expireNotify(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if (!$rs) { - return false; - } - if (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - //assert('$ref'); - //assert('$key'); - $fn($ref, $key); - } - $rs->Close(); - } - - $sql = "DELETE FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - - return $rs ? true : false; - } - - /*! - */ - function gc($maxlifetime) - { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - $expire_notify = ADODB_Session::expireNotify(); - $optimize = ADODB_Session::optimize(); - $sync_seconds = ADODB_Session::syncSeconds(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - - $time = time(); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if ($rs) { - $conn->StartTrans(); - $keys = array(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref, $key); - $del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key)); - $rs->MoveNext(); - } - $rs->Close(); - - $conn->CompleteTrans(); - } - } else { - - if (1) { - $sql = "SELECT sesskey FROM $table WHERE expiry < $time"; - $arr =& $conn->GetAll($sql); - foreach ($arr as $row) { - $sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0'); - $conn->Execute($sql2,array($row[0])); - } - } else { - $sql = "DELETE FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) $rs->Close(); - } - if ($debug) { - ADOConnection::outp("

    Garbage Collection: $sql

    "); - } - } - - // suggested by Cameron, "GaM3R" - if ($optimize) { - $driver = ADODB_Session::driver(); - - if (preg_match('/mysql/i', $driver)) { - $sql = "OPTIMIZE TABLE $table"; - } - if (preg_match('/postgres/i', $driver)) { - $sql = "VACUUM $table"; - } - if (!empty($sql)) { - $conn->Execute($sql); - } - } - - if ($sync_seconds) { - $sql = 'SELECT '; - if ($conn->dataProvider === 'oci8') { - $sql .= "TO_CHAR({$conn->sysTimeStamp}, 'RRRR-MM-DD HH24:MI:SS')"; - } else { - $sql .= $conn->sysTimeStamp; - } - $sql .= " FROM $table"; - - $rs =& $conn->SelectLimit($sql, 1); - if ($rs && !$rs->EOF) { - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $conn->UnixTimeStamp($dbts); - $t = time(); - - if (abs($dbt - $t) >= $sync_seconds) { - $msg = __FILE__ . - ": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: " . - " database=$dbt ($dbts), webserver=$t (diff=". (abs($dbt - $t) / 60) . ' minutes)'; - error_log($msg); - if ($debug) { - ADOConnection::outp("

    $msg

    "); - } - } - } - } - - return true; - } -} - -ADODB_Session::_init(); -if (empty($ADODB_SESSION_READONLY)) - register_shutdown_function('session_write_close'); - -// for backwards compatability only -function adodb_sess_open($save_path, $session_name, $persist = true) { - return ADODB_Session::open($save_path, $session_name, $persist); -} - -// for backwards compatability only -function adodb_sess_gc($t) -{ - return ADODB_Session::gc($t); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session2.php.svn-base deleted file mode 100755 index c5932b64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-session2.php.svn-base +++ /dev/null @@ -1,941 +0,0 @@ -Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id)); - - /* it is possible that the update statement fails due to a collision */ - if (!$ok) { - session_id($old_id); - if (empty($ck)) $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - return false; - } - - return true; -} - -/* - Generate database table for session data - @see http://phplens.com/lens/lensforum/msgs.php?id=12280 - @return 0 if failure, 1 if errors, 2 if successful. - @author Markus Staab http://www.public-4u.de -*/ -function adodb_session_create_table($schemaFile=null,$conn = null) -{ - // set default values - if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema2.xml'; - if ($conn===null) $conn =& ADODB_Session::_conn(); - - if (!$conn) return 0; - - $schema = new adoSchema($conn); - $schema->ParseSchema($schemaFile); - return $schema->ExecuteSchema(); -} - -/*! - \static -*/ -class ADODB_Session { - ///////////////////// - // getter/setter methods - ///////////////////// - - /* - - function Lock($lock=null) - { - static $_lock = false; - - if (!is_null($lock)) $_lock = $lock; - return $lock; - } - */ - /*! - */ - function driver($driver = null) - { - static $_driver = 'mysql'; - static $set = false; - - if (!is_null($driver)) { - $_driver = trim($driver); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) { - return $GLOBALS['ADODB_SESSION_DRIVER']; - } - } - - return $_driver; - } - - /*! - */ - function host($host = null) { - static $_host = 'localhost'; - static $set = false; - - if (!is_null($host)) { - $_host = trim($host); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) { - return $GLOBALS['ADODB_SESSION_CONNECT']; - } - } - - return $_host; - } - - /*! - */ - function user($user = null) - { - static $_user = 'root'; - static $set = false; - - if (!is_null($user)) { - $_user = trim($user); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USER'])) { - return $GLOBALS['ADODB_SESSION_USER']; - } - } - - return $_user; - } - - /*! - */ - function password($password = null) - { - static $_password = ''; - static $set = false; - - if (!is_null($password)) { - $_password = $password; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_PWD'])) { - return $GLOBALS['ADODB_SESSION_PWD']; - } - } - - return $_password; - } - - /*! - */ - function database($database = null) - { - static $_database = ''; - static $set = false; - - if (!is_null($database)) { - $_database = trim($database); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DB'])) { - return $GLOBALS['ADODB_SESSION_DB']; - } - } - return $_database; - } - - /*! - */ - function persist($persist = null) - { - static $_persist = true; - - if (!is_null($persist)) { - $_persist = trim($persist); - } - - return $_persist; - } - - /*! - */ - function lifetime($lifetime = null) - { - static $_lifetime; - static $set = false; - - if (!is_null($lifetime)) { - $_lifetime = (int) $lifetime; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_LIFE'])) { - return $GLOBALS['ADODB_SESS_LIFE']; - } - } - if (!$_lifetime) { - $_lifetime = ini_get('session.gc_maxlifetime'); - if ($_lifetime <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $lifetime

    "; - $_lifetime = 1440; - } - } - - return $_lifetime; - } - - /*! - */ - function debug($debug = null) - { - static $_debug = false; - static $set = false; - - if (!is_null($debug)) { - $_debug = (bool) $debug; - - $conn = ADODB_Session::_conn(); - if ($conn) { - $conn->debug = $_debug; - } - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_DEBUG'])) { - return $GLOBALS['ADODB_SESS_DEBUG']; - } - } - - return $_debug; - } - - /*! - */ - function expireNotify($expire_notify = null) - { - static $_expire_notify; - static $set = false; - - if (!is_null($expire_notify)) { - $_expire_notify = $expire_notify; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) { - return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY']; - } - } - - return $_expire_notify; - } - - /*! - */ - function table($table = null) - { - static $_table = 'sessions2'; - static $set = false; - - if (!is_null($table)) { - $_table = trim($table); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_TBL'])) { - return $GLOBALS['ADODB_SESSION_TBL']; - } - } - - return $_table; - } - - /*! - */ - function optimize($optimize = null) - { - static $_optimize = false; - static $set = false; - - if (!is_null($optimize)) { - $_optimize = (bool) $optimize; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_OPTIMIZE')) { - return true; - } - } - - return $_optimize; - } - - /*! - */ - function syncSeconds($sync_seconds = null) { - //echo ("

    WARNING: ADODB_SESSION::syncSeconds is longer used, please remove this function for your code

    "); - - return 0; - } - - /*! - */ - function clob($clob = null) { - static $_clob = false; - static $set = false; - - if (!is_null($clob)) { - $_clob = strtolower(trim($clob)); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) { - return $GLOBALS['ADODB_SESSION_USE_LOBS']; - } - } - - return $_clob; - } - - /*! - */ - function dataFieldName($data_field_name = null) { - //echo ("

    WARNING: ADODB_SESSION::dataFieldName() is longer used, please remove this function for your code

    "); - return ''; - } - - /*! - */ - function filter($filter = null) { - static $_filter = array(); - - if (!is_null($filter)) { - if (!is_array($filter)) { - $filter = array($filter); - } - $_filter = $filter; - } - - return $_filter; - } - - /*! - */ - function encryptionKey($encryption_key = null) { - static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!'; - - if (!is_null($encryption_key)) { - $_encryption_key = $encryption_key; - } - - return $_encryption_key; - } - - ///////////////////// - // private methods - ///////////////////// - - /*! - */ - function &_conn($conn=null) { - return $GLOBALS['ADODB_SESS_CONN']; - } - - /*! - */ - function _crc($crc = null) { - static $_crc = false; - - if (!is_null($crc)) { - $_crc = $crc; - } - - return $_crc; - } - - /*! - */ - function _init() { - session_module_name('user'); - session_set_save_handler( - array('ADODB_Session', 'open'), - array('ADODB_Session', 'close'), - array('ADODB_Session', 'read'), - array('ADODB_Session', 'write'), - array('ADODB_Session', 'destroy'), - array('ADODB_Session', 'gc') - ); - } - - - /*! - */ - function _sessionKey() { - // use this function to create the encryption key for crypted sessions - // crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt - return crypt(ADODB_Session::encryptionKey(), session_id()); - } - - /*! - */ - function _dumprs($rs) { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - - if (!$conn) { - return; - } - - if (!$debug) { - return; - } - - if (!$rs) { - echo "
    \$rs is null or false
    \n"; - return; - } - - //echo "
    \nAffected_Rows=",$conn->Affected_Rows(),"
    \n"; - - if (!is_object($rs)) { - return; - } - - require_once ADODB_SESSION.'/../tohtml.inc.php'; - rs2html($rs); - } - - ///////////////////// - // public methods - ///////////////////// - - function config($driver, $host, $user, $password, $database=false,$options=false) - { - ADODB_Session::driver($driver); - ADODB_Session::host($host); - ADODB_Session::user($user); - ADODB_Session::password($password); - ADODB_Session::database($database); - - if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB'; - - if (isset($options['table'])) ADODB_Session::table($options['table']); - if (isset($options['lob'])) ADODB_Session::clob($options['lob']); - if (isset($options['debug'])) ADODB_Session::debug($options['debug']); - } - - /*! - Create the connection to the database. - - If $conn already exists, reuse that connection - */ - function open($save_path, $session_name, $persist = null) - { - $conn =& ADODB_Session::_conn(); - - if ($conn) { - return true; - } - - $database = ADODB_Session::database(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $host = ADODB_Session::host(); - $password = ADODB_Session::password(); - $user = ADODB_Session::user(); - - if (!is_null($persist)) { - ADODB_Session::persist($persist); - } else { - $persist = ADODB_Session::persist(); - } - -# these can all be defaulted to in php.ini -# assert('$database'); -# assert('$driver'); -# assert('$host'); - - $conn =& ADONewConnection($driver); - - if ($debug) { - $conn->debug = true; - ADOConnection::outp( " driver=$driver user=$user db=$database "); - } - - if ($persist) { - switch($persist) { - default: - case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break; - case 'C': $ok = $conn->Connect($host, $user, $password, $database); break; - case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break; - } - } else { - $ok = $conn->Connect($host, $user, $password, $database); - } - - if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn; - else - ADOConnection::outp('

    Session: connection failed

    ', false); - - - return $ok; - } - - /*! - Close the connection - */ - function close() - { -/* - $conn =& ADODB_Session::_conn(); - if ($conn) $conn->Close(); -*/ - return true; - } - - /* - Slurp in the session variables and return the serialized string - */ - function read($key) - { - $conn =& ADODB_Session::_conn(); - $filter = ADODB_Session::filter(); - $table = ADODB_Session::table(); - - if (!$conn) { - return ''; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - $sql = "SELECT sessdata FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . $conn->sysTimeStamp; - /* Lock code does not work as it needs to hold transaction within whole page, and we don't know if - developer has commited elsewhere... :( - */ - #if (ADODB_Session::Lock()) - # $rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), sessdata); - #else - - $rs =& $conn->Execute($sql); - //ADODB_Session::_dumprs($rs); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else { - $v = reset($rs->fields); - $filter = array_reverse($filter); - foreach ($filter as $f) { - if (is_object($f)) { - $v = $f->read($v, ADODB_Session::_sessionKey()); - } - } - $v = rawurldecode($v); - } - - $rs->Close(); - - ADODB_Session::_crc(strlen($v) . crc32($v)); - return $v; - } - - return ''; - } - - /*! - Write the serialized data to a database. - - If the data has not been modified since the last read(), we do not write. - */ - function write($key, $val) - { - global $ADODB_SESSION_READONLY; - - if (!empty($ADODB_SESSION_READONLY)) return; - - $clob = ADODB_Session::clob(); - $conn =& ADODB_Session::_conn(); - $crc = ADODB_Session::_crc(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $expire_notify = ADODB_Session::expireNotify(); - $filter = ADODB_Session::filter(); - $lifetime = ADODB_Session::lifetime(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - $sysTimeStamp = $conn->sysTimeStamp; - - //assert('$table'); - - $expiry = $conn->OffsetDate($lifetime/(24*3600),$sysTimeStamp); - - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($crc !== false && $crc == (strlen($val) . crc32($val))) { - if ($debug) { - echo '

    Session: Only updating date - crc32 not changed

    '; - } - - $expirevar = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expirevar = $$var; - } - } - - - $sql = "UPDATE $table SET expiry = $expiry ,expireref=".$conn->Param('0').", modified = $sysTimeStamp WHERE $binary sesskey = ".$conn->Param('1')." AND expiry >= $sysTimeStamp"; - $rs =& $conn->Execute($sql,array($expirevar,$key)); - return true; - } - $val = rawurlencode($val); - foreach ($filter as $f) { - if (is_object($f)) { - $val = $f->write($val, ADODB_Session::_sessionKey()); - } - } - - $expireref = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expireref = $$var; - } - } - - if (!$clob) { // no lobs, simply use replace() - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key)); - if ($rs) $rs->Close(); - - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry=$expiry, sessdata=".$conn->Param(0).", expireref= ".$conn->Param(1).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('2'); - - } else { - $sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) - VALUES ($expiry,".$conn->Param('0').", ". $conn->Param('1').", ".$conn->Param('2').", $sysTimeStamp, $sysTimeStamp)"; - } - - - $rs =& $conn->Execute($sql,array($val,$expireref,$key)); - - } else { - // what value shall we insert/update for lob row? - switch ($driver) { - // empty_clob or empty_lob for oracle dbs - case 'oracle': - case 'oci8': - case 'oci8po': - case 'oci805': - $lob_value = sprintf('empty_%s()', strtolower($clob)); - break; - - // null for all other - default: - $lob_value = 'null'; - break; - } - - $conn->StartTrans(); - - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key)); - if ($rs) $rs->Close(); - - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry=$expiry, sessdata=$lob_value, expireref= ".$conn->Param(0).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('1'); - - } else { - $sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) - VALUES ($expiry,$lob_value, ". $conn->Param('0').", ".$conn->Param('1').", $sysTimeStamp, $sysTimeStamp)"; - } - - $rs =& $conn->Execute($sql,array($expireref,$key)); - - $qkey = $conn->qstr($key); - $rs2 =& $conn->UpdateBlob($table, 'sessdata', $val, " sesskey=$qkey", strtoupper($clob)); - $rs = @$conn->CompleteTrans(); - - - } - - if (!$rs) { - ADOConnection::outp('

    Session Replace: ' . $conn->ErrorMsg() . '

    ', false); - return false; - } else { - // bug in access driver (could be odbc?) means that info is not committed - // properly unless select statement executed in Win2000 - if ($conn->databaseType == 'access') { - $sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - } - }/* - if (ADODB_Session::Lock()) { - $conn->CommitTrans(); - }*/ - return $rs ? true : false; - } - - /*! - */ - function destroy($key) { - $conn =& ADODB_Session::_conn(); - $table = ADODB_Session::table(); - $expire_notify = ADODB_Session::expireNotify(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if (!$rs) { - return false; - } - if (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - //assert('$ref'); - //assert('$key'); - $fn($ref, $key); - } - $rs->Close(); - } - - $sql = "DELETE FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - - return $rs ? true : false; - } - - /*! - */ - function gc($maxlifetime) - { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - $expire_notify = ADODB_Session::expireNotify(); - $optimize = ADODB_Session::optimize(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $time = $conn->sysTimeStamp; - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if ($rs) { - $conn->StartTrans(); - $keys = array(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref, $key); - $del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key)); - $rs->MoveNext(); - } - $rs->Close(); - - $conn->CompleteTrans(); - } - } else { - - if (0) { - $sql = "SELECT sesskey FROM $table WHERE expiry < $time"; - $arr =& $conn->GetAll($sql); - foreach ($arr as $row) { - $sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0'); - $conn->Execute($sql2,array($row[0])); - } - } else { - $sql = "DELETE FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) $rs->Close(); - } - if ($debug) { - ADOConnection::outp("

    Garbage Collection: $sql

    "); - } - } - - // suggested by Cameron, "GaM3R" - if ($optimize) { - $driver = ADODB_Session::driver(); - - if (preg_match('/mysql/i', $driver)) { - $sql = "OPTIMIZE TABLE $table"; - } - if (preg_match('/postgres/i', $driver)) { - $sql = "VACUUM $table"; - } - if (!empty($sql)) { - $conn->Execute($sql); - } - } - - - return true; - } -} - -ADODB_Session::_init(); -if (empty($ADODB_SESSION_READONLY)) - register_shutdown_function('session_write_close'); - -// for backwards compatability only -function adodb_sess_open($save_path, $session_name, $persist = true) { - return ADODB_Session::open($save_path, $session_name, $persist); -} - -// for backwards compatability only -function adodb_sess_gc($t) -{ - return ADODB_Session::gc($t); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.mysql.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.mysql.sql.svn-base deleted file mode 100755 index f90de449..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.mysql.sql.svn-base +++ /dev/null @@ -1,16 +0,0 @@ --- $CVSHeader$ - -CREATE DATABASE /*! IF NOT EXISTS */ adodb_sessions; - -USE adodb_sessions; - -DROP TABLE /*! IF EXISTS */ sessions; - -CREATE TABLE /*! IF NOT EXISTS */ sessions ( - sesskey CHAR(32) /*! BINARY */ NOT NULL DEFAULT '', - expiry INT(11) /*! UNSIGNED */ NOT NULL DEFAULT 0, - expireref VARCHAR(64) DEFAULT '', - data LONGTEXT DEFAULT '', - PRIMARY KEY (sesskey), - INDEX expiry (expiry) -); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.clob.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.clob.sql.svn-base deleted file mode 100755 index c5c4f2d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.clob.sql.svn-base +++ /dev/null @@ -1,15 +0,0 @@ --- $CVSHeader$ - -DROP TABLE adodb_sessions; - -CREATE TABLE sessions ( - sesskey CHAR(32) DEFAULT '' NOT NULL, - expiry INT DEFAULT 0 NOT NULL, - expireref VARCHAR(64) DEFAULT '', - data CLOB DEFAULT '', - PRIMARY KEY (sesskey) -); - -CREATE INDEX ix_expiry ON sessions (expiry); - -QUIT; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.sql.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.sql.svn-base deleted file mode 100755 index 8fd5a342..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/adodb-sessions.oracle.sql.svn-base +++ /dev/null @@ -1,16 +0,0 @@ --- $CVSHeader$ - -DROP TABLE adodb_sessions; - -CREATE TABLE sessions ( - sesskey CHAR(32) DEFAULT '' NOT NULL, - expiry INT DEFAULT 0 NOT NULL, - expireref VARCHAR(64) DEFAULT '', - data VARCHAR(4000) DEFAULT '', - PRIMARY KEY (sesskey), - INDEX expiry (expiry) -); - -CREATE INDEX ix_expiry ON sessions (expiry); - -QUIT; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/crypt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/crypt.inc.php.svn-base deleted file mode 100755 index 41cb06a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/crypt.inc.php.svn-base +++ /dev/null @@ -1,161 +0,0 @@ - -class MD5Crypt{ - function keyED($txt,$encrypt_key) - { - $encrypt_key = md5($encrypt_key); - $ctr=0; - $tmp = ""; - for ($i=0;$ikeyED($tmp,$key)); - } - - function Decrypt($txt,$key) - { - $txt = $this->keyED(base64_decode($txt),$key); - $tmp = ""; - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - return $randomPassword; - } - -} - - -class SHA1Crypt{ - - function keyED($txt,$encrypt_key) - { - - $encrypt_key = sha1($encrypt_key); - $ctr=0; - $tmp = ""; - - for ($i=0;$ikeyED($tmp,$key)); - - } - - - - function Decrypt($txt,$key) - { - - $txt = $this->keyED(base64_decode($txt),$key); - - $tmp = ""; - - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - - return $randomPassword; - - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema.xml.svn-base deleted file mode 100755 index 3c61ff64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema.xml.svn-base +++ /dev/null @@ -1,26 +0,0 @@ - - - - table for ADOdb session-management - - - session key - - - - - - - - - - - - - - - - - -
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema2.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema2.xml.svn-base deleted file mode 100755 index 22f8dafe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/.svn/text-base/session_schema2.xml.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - table for ADOdb session-management - - - session key - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-bzip2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-bzip2.php deleted file mode 100755 index 7f2d223c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-bzip2.php +++ /dev/null @@ -1,118 +0,0 @@ -_block_size; - } - - /** - */ - function setBlockSize($block_size) { - assert('$block_size >= 1'); - assert('$block_size <= 9'); - $this->_block_size = (int) $block_size; - } - - /** - */ - function getWorkLevel() { - return $this->_work_level; - } - - /** - */ - function setWorkLevel($work_level) { - assert('$work_level >= 0'); - assert('$work_level <= 250'); - $this->_work_level = (int) $work_level; - } - - /** - */ - function getMinLength() { - return $this->_min_length; - } - - /** - */ - function setMinLength($min_length) { - assert('$min_length >= 0'); - $this->_min_length = (int) $min_length; - } - - /** - */ - function ADODB_Compress_Bzip2($block_size = null, $work_level = null, $min_length = null) { - if (!is_null($block_size)) { - $this->setBlockSize($block_size); - } - - if (!is_null($work_level)) { - $this->setWorkLevel($work_level); - } - - if (!is_null($min_length)) { - $this->setMinLength($min_length); - } - } - - /** - */ - function write($data, $key) { - if (strlen($data) < $this->_min_length) { - return $data; - } - - if (!is_null($this->_block_size)) { - if (!is_null($this->_work_level)) { - return bzcompress($data, $this->_block_size, $this->_work_level); - } else { - return bzcompress($data, $this->_block_size); - } - } - - return bzcompress($data); - } - - /** - */ - function read($data, $key) { - return $data ? bzdecompress($data) : $data; - } - -} - -return 1; - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-gzip.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-gzip.php deleted file mode 100755 index 08e6c987..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-compress-gzip.php +++ /dev/null @@ -1,93 +0,0 @@ -_level; - } - - /** - */ - function setLevel($level) { - assert('$level >= 0'); - assert('$level <= 9'); - $this->_level = (int) $level; - } - - /** - */ - function getMinLength() { - return $this->_min_length; - } - - /** - */ - function setMinLength($min_length) { - assert('$min_length >= 0'); - $this->_min_length = (int) $min_length; - } - - /** - */ - function ADODB_Compress_Gzip($level = null, $min_length = null) { - if (!is_null($level)) { - $this->setLevel($level); - } - - if (!is_null($min_length)) { - $this->setMinLength($min_length); - } - } - - /** - */ - function write($data, $key) { - if (strlen($data) < $this->_min_length) { - return $data; - } - - if (!is_null($this->_level)) { - return gzcompress($data, $this->_level); - } else { - return gzcompress($data); - } - } - - /** - */ - function read($data, $key) { - return $data ? gzuncompress($data) : $data; - } - -} - -return 1; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession.php deleted file mode 100755 index 00dfd8c4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession2.php deleted file mode 100755 index 28f543f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-cryptsession2.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-mcrypt.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-mcrypt.php deleted file mode 100755 index b21786e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-mcrypt.php +++ /dev/null @@ -1,109 +0,0 @@ -_cipher; - } - - /** - */ - function setCipher($cipher) { - $this->_cipher = $cipher; - } - - /** - */ - function getMode() { - return $this->_mode; - } - - /** - */ - function setMode($mode) { - $this->_mode = $mode; - } - - /** - */ - function getSource() { - return $this->_source; - } - - /** - */ - function setSource($source) { - $this->_source = $source; - } - - /** - */ - function ADODB_Encrypt_MCrypt($cipher = null, $mode = null, $source = null) { - if (!$cipher) { - $cipher = MCRYPT_RIJNDAEL_256; - } - if (!$mode) { - $mode = MCRYPT_MODE_ECB; - } - if (!$source) { - $source = MCRYPT_RAND; - } - - $this->_cipher = $cipher; - $this->_mode = $mode; - $this->_source = $source; - } - - /** - */ - function write($data, $key) { - $iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode); - $iv = mcrypt_create_iv($iv_size, $this->_source); - return mcrypt_encrypt($this->_cipher, $key, $data, $this->_mode, $iv); - } - - /** - */ - function read($data, $key) { - $iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode); - $iv = mcrypt_create_iv($iv_size, $this->_source); - $rv = mcrypt_decrypt($this->_cipher, $key, $data, $this->_mode, $iv); - return rtrim($rv, "\0"); - } - -} - -return 1; - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-md5.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-md5.php deleted file mode 100755 index 734c9623..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-md5.php +++ /dev/null @@ -1,39 +0,0 @@ -encrypt($data, $key); - } - - /** - */ - function read($data, $key) { - $md5crypt =& new MD5Crypt(); - return $md5crypt->decrypt($data, $key); - } - -} - -return 1; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-secret.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-secret.php deleted file mode 100755 index 0e4e66f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-secret.php +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-sha1.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-sha1.php deleted file mode 100755 index 6618be7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-encrypt-sha1.php +++ /dev/null @@ -1,32 +0,0 @@ -encrypt($data, $key); - - } - - - function read($data, $key) - { - $sha1crypt =& new SHA1Crypt(); - return $sha1crypt->decrypt($data, $key); - - } -} - - - -return 1; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sess.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sess.txt deleted file mode 100755 index d23dac42..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sess.txt +++ /dev/null @@ -1,131 +0,0 @@ -John, - -I have been an extremely satisfied ADODB user for several years now. - -To give you something back for all your hard work, I've spent the last 3 -days rewriting the adodb-session.php code. - ----------- -What's New ----------- - -Here's a list of the new code's benefits: - -* Combines the functionality of the three files: - -adodb-session.php -adodb-session-clob.php -adodb-cryptsession.php - -each with very similar functionality, into a single file adodb-session.php. -This will ease maintenance and support issues. - -* Supports multiple encryption and compression schemes. - Currently, we support: - - MD5Crypt (crypt.inc.php) - MCrypt - Secure (Horde's emulation of MCrypt, if MCrypt module is not available.) - GZip - BZip2 - -These can be stacked, so if you want to compress and then encrypt your -session data, it's easy. -Also, the built-in MCrypt functions will be *much* faster, and more secure, -than the MD5Crypt code. - -* adodb-session.php contains a single class ADODB_Session that encapsulates -all functionality. - This eliminates the use of global vars and defines (though they are -supported for backwards compatibility). - -* All user defined parameters are now static functions in the ADODB_Session -class. - -New parameters include: - -* encryptionKey(): Define the encryption key used to encrypt the session. -Originally, it was a hard coded string. - -* persist(): Define if the database will be opened in persistent mode. -Originally, the user had to call adodb_sess_open(). - -* dataFieldName(): Define the field name used to store the session data, as -'DATA' appears to be a reserved word in the following cases: - ANSI SQL - IBM DB2 - MS SQL Server - Postgres - SAP - -* filter(): Used to support multiple, simulataneous encryption/compression -schemes. - -* Debug support is improved thru _rsdump() function, which is called after -every database call. - ------------- -What's Fixed ------------- - -The new code includes several bug fixes and enhancements: - -* sesskey is compared in BINARY mode for MySQL, to avoid problems with -session keys that differ only by case. - Of course, the user should define the sesskey field as BINARY, to -correctly fix this problem, otherwise performance will suffer. - -* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in -the original code have been optimized to a single DELETE. - -* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table -WHERE sesskey = $qkey" will only return a single value, we don't loop on the -result, we simply process the row, if any. - -* We close $rs after every use. - ---------------- -What's the Same ---------------- - -I know backwards compatibility is *very* important to you. Therefore, the -new code is 100% backwards compatible. - -If you like my code, but don't "trust" it's backwards compatible, maybe we -offer it as beta code, in a new directory for a release or two? - ------------- -What's To Do ------------- - -I've vascillated over whether to use a single function to get/set -parameters: - -$user = ADODB_Session::user(); // get -ADODB_Session::user($user); // set - -or to use separate functions (which is the PEAR/Java way): - -$user = ADODB_Session::getUser(); -ADODB_Session::setUser($user); - -I've chosen the former as it's makes for a simpler API, and reduces the -amount of code, but I'd be happy to change it to the latter. - -Also, do you think the class should be a singleton class, versus a static -class? - -Let me know if you find this code useful, and will be including it in the -next release of ADODB. - -If so, I will modify the current documentation to detail the new -functionality. To that end, what file(s) contain the documentation? Please -send them to me if they are not publically available. - -Also, if there is *anything* in the code that you like to see changed, let -me know. - -Thanks, - -Ross - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob.php deleted file mode 100755 index 15568af6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob.php +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob2.php deleted file mode 100755 index 99b77447..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session-clob2.php +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session.php deleted file mode 100755 index f232d6cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session.php +++ /dev/null @@ -1,934 +0,0 @@ -Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id)); - - /* it is possible that the update statement fails due to a collision */ - if (!$ok) { - session_id($old_id); - if (empty($ck)) $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - return false; - } - - return true; -} - -/* - Generate database table for session data - @see http://phplens.com/lens/lensforum/msgs.php?id=12280 - @return 0 if failure, 1 if errors, 2 if successful. - @author Markus Staab http://www.public-4u.de -*/ -function adodb_session_create_table($schemaFile=null,$conn = null) -{ - // set default values - if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema.xml'; - if ($conn===null) $conn =& ADODB_Session::_conn(); - - if (!$conn) return 0; - - $schema = new adoSchema($conn); - $schema->ParseSchema($schemaFile); - return $schema->ExecuteSchema(); -} - -/*! - \static -*/ -class ADODB_Session { - ///////////////////// - // getter/setter methods - ///////////////////// - - /* - - function Lock($lock=null) - { - static $_lock = false; - - if (!is_null($lock)) $_lock = $lock; - return $lock; - } - */ - /*! - */ - function driver($driver = null) { - static $_driver = 'mysql'; - static $set = false; - - if (!is_null($driver)) { - $_driver = trim($driver); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) { - return $GLOBALS['ADODB_SESSION_DRIVER']; - } - } - - return $_driver; - } - - /*! - */ - function host($host = null) { - static $_host = 'localhost'; - static $set = false; - - if (!is_null($host)) { - $_host = trim($host); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) { - return $GLOBALS['ADODB_SESSION_CONNECT']; - } - } - - return $_host; - } - - /*! - */ - function user($user = null) { - static $_user = 'root'; - static $set = false; - - if (!is_null($user)) { - $_user = trim($user); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USER'])) { - return $GLOBALS['ADODB_SESSION_USER']; - } - } - - return $_user; - } - - /*! - */ - function password($password = null) { - static $_password = ''; - static $set = false; - - if (!is_null($password)) { - $_password = $password; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_PWD'])) { - return $GLOBALS['ADODB_SESSION_PWD']; - } - } - - return $_password; - } - - /*! - */ - function database($database = null) { - static $_database = 'xphplens_2'; - static $set = false; - - if (!is_null($database)) { - $_database = trim($database); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DB'])) { - return $GLOBALS['ADODB_SESSION_DB']; - } - } - - return $_database; - } - - /*! - */ - function persist($persist = null) - { - static $_persist = true; - - if (!is_null($persist)) { - $_persist = trim($persist); - } - - return $_persist; - } - - /*! - */ - function lifetime($lifetime = null) { - static $_lifetime; - static $set = false; - - if (!is_null($lifetime)) { - $_lifetime = (int) $lifetime; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_LIFE'])) { - return $GLOBALS['ADODB_SESS_LIFE']; - } - } - if (!$_lifetime) { - $_lifetime = ini_get('session.gc_maxlifetime'); - if ($_lifetime <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $lifetime

    "; - $_lifetime = 1440; - } - } - - return $_lifetime; - } - - /*! - */ - function debug($debug = null) { - static $_debug = false; - static $set = false; - - if (!is_null($debug)) { - $_debug = (bool) $debug; - - $conn = ADODB_Session::_conn(); - if ($conn) { - $conn->debug = $_debug; - } - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_DEBUG'])) { - return $GLOBALS['ADODB_SESS_DEBUG']; - } - } - - return $_debug; - } - - /*! - */ - function expireNotify($expire_notify = null) { - static $_expire_notify; - static $set = false; - - if (!is_null($expire_notify)) { - $_expire_notify = $expire_notify; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) { - return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY']; - } - } - - return $_expire_notify; - } - - /*! - */ - function table($table = null) { - static $_table = 'sessions'; - static $set = false; - - if (!is_null($table)) { - $_table = trim($table); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_TBL'])) { - return $GLOBALS['ADODB_SESSION_TBL']; - } - } - - return $_table; - } - - /*! - */ - function optimize($optimize = null) { - static $_optimize = false; - static $set = false; - - if (!is_null($optimize)) { - $_optimize = (bool) $optimize; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_OPTIMIZE')) { - return true; - } - } - - return $_optimize; - } - - /*! - */ - function syncSeconds($sync_seconds = null) { - static $_sync_seconds = 60; - static $set = false; - - if (!is_null($sync_seconds)) { - $_sync_seconds = (int) $sync_seconds; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_SYNCH_SECS')) { - return ADODB_SESSION_SYNCH_SECS; - } - } - - return $_sync_seconds; - } - - /*! - */ - function clob($clob = null) { - static $_clob = false; - static $set = false; - - if (!is_null($clob)) { - $_clob = strtolower(trim($clob)); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) { - return $GLOBALS['ADODB_SESSION_USE_LOBS']; - } - } - - return $_clob; - } - - /*! - */ - function dataFieldName($data_field_name = null) { - static $_data_field_name = 'data'; - - if (!is_null($data_field_name)) { - $_data_field_name = trim($data_field_name); - } - - return $_data_field_name; - } - - /*! - */ - function filter($filter = null) { - static $_filter = array(); - - if (!is_null($filter)) { - if (!is_array($filter)) { - $filter = array($filter); - } - $_filter = $filter; - } - - return $_filter; - } - - /*! - */ - function encryptionKey($encryption_key = null) { - static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!'; - - if (!is_null($encryption_key)) { - $_encryption_key = $encryption_key; - } - - return $_encryption_key; - } - - ///////////////////// - // private methods - ///////////////////// - - /*! - */ - function &_conn($conn=null) { - return $GLOBALS['ADODB_SESS_CONN']; - } - - /*! - */ - function _crc($crc = null) { - static $_crc = false; - - if (!is_null($crc)) { - $_crc = $crc; - } - - return $_crc; - } - - /*! - */ - function _init() { - session_module_name('user'); - session_set_save_handler( - array('ADODB_Session', 'open'), - array('ADODB_Session', 'close'), - array('ADODB_Session', 'read'), - array('ADODB_Session', 'write'), - array('ADODB_Session', 'destroy'), - array('ADODB_Session', 'gc') - ); - } - - - /*! - */ - function _sessionKey() { - // use this function to create the encryption key for crypted sessions - // crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt - return crypt(ADODB_Session::encryptionKey(), session_id()); - } - - /*! - */ - function _dumprs($rs) { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - - if (!$conn) { - return; - } - - if (!$debug) { - return; - } - - if (!$rs) { - echo "
    \$rs is null or false
    \n"; - return; - } - - //echo "
    \nAffected_Rows=",$conn->Affected_Rows(),"
    \n"; - - if (!is_object($rs)) { - return; - } - - require_once ADODB_SESSION.'/../tohtml.inc.php'; - rs2html($rs); - } - - ///////////////////// - // public methods - ///////////////////// - - function config($driver, $host, $user, $password, $database=false,$options=false) - { - ADODB_Session::driver($driver); - ADODB_Session::host($host); - ADODB_Session::user($user); - ADODB_Session::password($password); - ADODB_Session::database($database); - - if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB'; - - if (isset($options['table'])) ADODB_Session::table($options['table']); - if (isset($options['lob'])) ADODB_Session::clob($options['lob']); - if (isset($options['debug'])) ADODB_Session::debug($options['debug']); - } - - /*! - Create the connection to the database. - - If $conn already exists, reuse that connection - */ - function open($save_path, $session_name, $persist = null) - { - $conn =& ADODB_Session::_conn(); - - if ($conn) { - return true; - } - - $database = ADODB_Session::database(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $host = ADODB_Session::host(); - $password = ADODB_Session::password(); - $user = ADODB_Session::user(); - - if (!is_null($persist)) { - ADODB_Session::persist($persist); - } else { - $persist = ADODB_Session::persist(); - } - -# these can all be defaulted to in php.ini -# assert('$database'); -# assert('$driver'); -# assert('$host'); - - $conn =& ADONewConnection($driver); - - if ($debug) { - $conn->debug = true; -// ADOConnection::outp( " driver=$driver user=$user pwd=$password db=$database "); - } - - if ($persist) { - switch($persist) { - default: - case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break; - case 'C': $ok = $conn->Connect($host, $user, $password, $database); break; - case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break; - } - } else { - $ok = $conn->Connect($host, $user, $password, $database); - } - - if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn; - else - ADOConnection::outp('

    Session: connection failed

    ', false); - - - return $ok; - } - - /*! - Close the connection - */ - function close() - { -/* - $conn =& ADODB_Session::_conn(); - if ($conn) $conn->Close(); -*/ - return true; - } - - /* - Slurp in the session variables and return the serialized string - */ - function read($key) - { - $conn =& ADODB_Session::_conn(); - $data = ADODB_Session::dataFieldName(); - $filter = ADODB_Session::filter(); - $table = ADODB_Session::table(); - - if (!$conn) { - return ''; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - $sql = "SELECT $data FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . time(); - /* Lock code does not work as it needs to hold transaction within whole page, and we don't know if - developer has commited elsewhere... :( - */ - #if (ADODB_Session::Lock()) - # $rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), $data); - #else - - $rs =& $conn->Execute($sql); - //ADODB_Session::_dumprs($rs); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else { - $v = reset($rs->fields); - $filter = array_reverse($filter); - foreach ($filter as $f) { - if (is_object($f)) { - $v = $f->read($v, ADODB_Session::_sessionKey()); - } - } - $v = rawurldecode($v); - } - - $rs->Close(); - - ADODB_Session::_crc(strlen($v) . crc32($v)); - return $v; - } - - return ''; - } - - /*! - Write the serialized data to a database. - - If the data has not been modified since the last read(), we do not write. - */ - function write($key, $val) - { - global $ADODB_SESSION_READONLY; - - if (!empty($ADODB_SESSION_READONLY)) return; - - $clob = ADODB_Session::clob(); - $conn =& ADODB_Session::_conn(); - $crc = ADODB_Session::_crc(); - $data = ADODB_Session::dataFieldName(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $expire_notify = ADODB_Session::expireNotify(); - $filter = ADODB_Session::filter(); - $lifetime = ADODB_Session::lifetime(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - $qkey = $conn->qstr($key); - - //assert('$table'); - - $expiry = time() + $lifetime; - - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($crc !== false && $crc == (strlen($val) . crc32($val))) { - if ($debug) { - echo '

    Session: Only updating date - crc32 not changed

    '; - } - - $expirevar = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expirevar = $$var; - } - } - - - $sql = "UPDATE $table SET expiry = ".$conn->Param('0').",expireref=".$conn->Param('1')." WHERE $binary sesskey = ".$conn->Param('2')." AND expiry >= ".$conn->Param('3'); - $rs =& $conn->Execute($sql,array($expiry,$expirevar,$key,time())); - return true; - } - $val = rawurlencode($val); - foreach ($filter as $f) { - if (is_object($f)) { - $val = $f->write($val, ADODB_Session::_sessionKey()); - } - } - - $arr = array('sesskey' => $key, 'expiry' => $expiry, $data => $val, 'expireref' => ''); - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $arr['expireref'] = $$var; - } - } - - if (!$clob) { // no lobs, simply use replace() - $arr[$data] = $conn->qstr($val); - $rs = $conn->Replace($table, $arr, 'sesskey', $autoQuote = true); - - } else { - // what value shall we insert/update for lob row? - switch ($driver) { - // empty_clob or empty_lob for oracle dbs - case 'oracle': - case 'oci8': - case 'oci8po': - case 'oci805': - $lob_value = sprintf('empty_%s()', strtolower($clob)); - break; - - // null for all other - default: - $lob_value = 'null'; - break; - } - - $conn->StartTrans(); - $expiryref = $conn->qstr($arr['expireref']); - // do we insert or update? => as for sesskey - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = $qkey"); - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry = $expiry, $data = $lob_value, expireref=$expiryref WHERE sesskey = $qkey"; - } else { - $sql = "INSERT INTO $table (expiry, $data, sesskey,expireref) VALUES ($expiry, $lob_value, $qkey,$expiryref)"; - } - if ($rs)$rs->Close(); - - - $err = ''; - $rs1 =& $conn->Execute($sql); - if (!$rs1) $err = $conn->ErrorMsg()."\n"; - - $rs2 =& $conn->UpdateBlob($table, $data, $val, " sesskey=$qkey", strtoupper($clob)); - if (!$rs2) $err .= $conn->ErrorMsg()."\n"; - - $rs = ($rs && $rs2) ? true : false; - $conn->CompleteTrans(); - } - - if (!$rs) { - ADOConnection::outp('

    Session Replace: ' . $conn->ErrorMsg() . '

    ', false); - return false; - } else { - // bug in access driver (could be odbc?) means that info is not committed - // properly unless select statement executed in Win2000 - if ($conn->databaseType == 'access') { - $sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - } - }/* - if (ADODB_Session::Lock()) { - $conn->CommitTrans(); - }*/ - return $rs ? true : false; - } - - /*! - */ - function destroy($key) { - $conn =& ADODB_Session::_conn(); - $table = ADODB_Session::table(); - $expire_notify = ADODB_Session::expireNotify(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if (!$rs) { - return false; - } - if (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - //assert('$ref'); - //assert('$key'); - $fn($ref, $key); - } - $rs->Close(); - } - - $sql = "DELETE FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - - return $rs ? true : false; - } - - /*! - */ - function gc($maxlifetime) - { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - $expire_notify = ADODB_Session::expireNotify(); - $optimize = ADODB_Session::optimize(); - $sync_seconds = ADODB_Session::syncSeconds(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - - $time = time(); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if ($rs) { - $conn->StartTrans(); - $keys = array(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref, $key); - $del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key)); - $rs->MoveNext(); - } - $rs->Close(); - - $conn->CompleteTrans(); - } - } else { - - if (1) { - $sql = "SELECT sesskey FROM $table WHERE expiry < $time"; - $arr =& $conn->GetAll($sql); - foreach ($arr as $row) { - $sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0'); - $conn->Execute($sql2,array($row[0])); - } - } else { - $sql = "DELETE FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) $rs->Close(); - } - if ($debug) { - ADOConnection::outp("

    Garbage Collection: $sql

    "); - } - } - - // suggested by Cameron, "GaM3R" - if ($optimize) { - $driver = ADODB_Session::driver(); - - if (preg_match('/mysql/i', $driver)) { - $sql = "OPTIMIZE TABLE $table"; - } - if (preg_match('/postgres/i', $driver)) { - $sql = "VACUUM $table"; - } - if (!empty($sql)) { - $conn->Execute($sql); - } - } - - if ($sync_seconds) { - $sql = 'SELECT '; - if ($conn->dataProvider === 'oci8') { - $sql .= "TO_CHAR({$conn->sysTimeStamp}, 'RRRR-MM-DD HH24:MI:SS')"; - } else { - $sql .= $conn->sysTimeStamp; - } - $sql .= " FROM $table"; - - $rs =& $conn->SelectLimit($sql, 1); - if ($rs && !$rs->EOF) { - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $conn->UnixTimeStamp($dbts); - $t = time(); - - if (abs($dbt - $t) >= $sync_seconds) { - $msg = __FILE__ . - ": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: " . - " database=$dbt ($dbts), webserver=$t (diff=". (abs($dbt - $t) / 60) . ' minutes)'; - error_log($msg); - if ($debug) { - ADOConnection::outp("

    $msg

    "); - } - } - } - } - - return true; - } -} - -ADODB_Session::_init(); -if (empty($ADODB_SESSION_READONLY)) - register_shutdown_function('session_write_close'); - -// for backwards compatability only -function adodb_sess_open($save_path, $session_name, $persist = true) { - return ADODB_Session::open($save_path, $session_name, $persist); -} - -// for backwards compatability only -function adodb_sess_gc($t) -{ - return ADODB_Session::gc($t); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session2.php deleted file mode 100755 index 1303513e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-session2.php +++ /dev/null @@ -1,941 +0,0 @@ -Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id)); - - /* it is possible that the update statement fails due to a collision */ - if (!$ok) { - session_id($old_id); - if (empty($ck)) $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - return false; - } - - return true; -} - -/* - Generate database table for session data - @see http://phplens.com/lens/lensforum/msgs.php?id=12280 - @return 0 if failure, 1 if errors, 2 if successful. - @author Markus Staab http://www.public-4u.de -*/ -function adodb_session_create_table($schemaFile=null,$conn = null) -{ - // set default values - if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema2.xml'; - if ($conn===null) $conn =& ADODB_Session::_conn(); - - if (!$conn) return 0; - - $schema = new adoSchema($conn); - $schema->ParseSchema($schemaFile); - return $schema->ExecuteSchema(); -} - -/*! - \static -*/ -class ADODB_Session { - ///////////////////// - // getter/setter methods - ///////////////////// - - /* - - function Lock($lock=null) - { - static $_lock = false; - - if (!is_null($lock)) $_lock = $lock; - return $lock; - } - */ - /*! - */ - function driver($driver = null) - { - static $_driver = 'mysql'; - static $set = false; - - if (!is_null($driver)) { - $_driver = trim($driver); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) { - return $GLOBALS['ADODB_SESSION_DRIVER']; - } - } - - return $_driver; - } - - /*! - */ - function host($host = null) { - static $_host = 'localhost'; - static $set = false; - - if (!is_null($host)) { - $_host = trim($host); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) { - return $GLOBALS['ADODB_SESSION_CONNECT']; - } - } - - return $_host; - } - - /*! - */ - function user($user = null) - { - static $_user = 'root'; - static $set = false; - - if (!is_null($user)) { - $_user = trim($user); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USER'])) { - return $GLOBALS['ADODB_SESSION_USER']; - } - } - - return $_user; - } - - /*! - */ - function password($password = null) - { - static $_password = ''; - static $set = false; - - if (!is_null($password)) { - $_password = $password; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_PWD'])) { - return $GLOBALS['ADODB_SESSION_PWD']; - } - } - - return $_password; - } - - /*! - */ - function database($database = null) - { - static $_database = ''; - static $set = false; - - if (!is_null($database)) { - $_database = trim($database); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_DB'])) { - return $GLOBALS['ADODB_SESSION_DB']; - } - } - return $_database; - } - - /*! - */ - function persist($persist = null) - { - static $_persist = true; - - if (!is_null($persist)) { - $_persist = trim($persist); - } - - return $_persist; - } - - /*! - */ - function lifetime($lifetime = null) - { - static $_lifetime; - static $set = false; - - if (!is_null($lifetime)) { - $_lifetime = (int) $lifetime; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_LIFE'])) { - return $GLOBALS['ADODB_SESS_LIFE']; - } - } - if (!$_lifetime) { - $_lifetime = ini_get('session.gc_maxlifetime'); - if ($_lifetime <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $lifetime

    "; - $_lifetime = 1440; - } - } - - return $_lifetime; - } - - /*! - */ - function debug($debug = null) - { - static $_debug = false; - static $set = false; - - if (!is_null($debug)) { - $_debug = (bool) $debug; - - $conn = ADODB_Session::_conn(); - if ($conn) { - $conn->debug = $_debug; - } - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESS_DEBUG'])) { - return $GLOBALS['ADODB_SESS_DEBUG']; - } - } - - return $_debug; - } - - /*! - */ - function expireNotify($expire_notify = null) - { - static $_expire_notify; - static $set = false; - - if (!is_null($expire_notify)) { - $_expire_notify = $expire_notify; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) { - return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY']; - } - } - - return $_expire_notify; - } - - /*! - */ - function table($table = null) - { - static $_table = 'sessions2'; - static $set = false; - - if (!is_null($table)) { - $_table = trim($table); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_TBL'])) { - return $GLOBALS['ADODB_SESSION_TBL']; - } - } - - return $_table; - } - - /*! - */ - function optimize($optimize = null) - { - static $_optimize = false; - static $set = false; - - if (!is_null($optimize)) { - $_optimize = (bool) $optimize; - $set = true; - } elseif (!$set) { - // backwards compatibility - if (defined('ADODB_SESSION_OPTIMIZE')) { - return true; - } - } - - return $_optimize; - } - - /*! - */ - function syncSeconds($sync_seconds = null) { - //echo ("

    WARNING: ADODB_SESSION::syncSeconds is longer used, please remove this function for your code

    "); - - return 0; - } - - /*! - */ - function clob($clob = null) { - static $_clob = false; - static $set = false; - - if (!is_null($clob)) { - $_clob = strtolower(trim($clob)); - $set = true; - } elseif (!$set) { - // backwards compatibility - if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) { - return $GLOBALS['ADODB_SESSION_USE_LOBS']; - } - } - - return $_clob; - } - - /*! - */ - function dataFieldName($data_field_name = null) { - //echo ("

    WARNING: ADODB_SESSION::dataFieldName() is longer used, please remove this function for your code

    "); - return ''; - } - - /*! - */ - function filter($filter = null) { - static $_filter = array(); - - if (!is_null($filter)) { - if (!is_array($filter)) { - $filter = array($filter); - } - $_filter = $filter; - } - - return $_filter; - } - - /*! - */ - function encryptionKey($encryption_key = null) { - static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!'; - - if (!is_null($encryption_key)) { - $_encryption_key = $encryption_key; - } - - return $_encryption_key; - } - - ///////////////////// - // private methods - ///////////////////// - - /*! - */ - function &_conn($conn=null) { - return $GLOBALS['ADODB_SESS_CONN']; - } - - /*! - */ - function _crc($crc = null) { - static $_crc = false; - - if (!is_null($crc)) { - $_crc = $crc; - } - - return $_crc; - } - - /*! - */ - function _init() { - session_module_name('user'); - session_set_save_handler( - array('ADODB_Session', 'open'), - array('ADODB_Session', 'close'), - array('ADODB_Session', 'read'), - array('ADODB_Session', 'write'), - array('ADODB_Session', 'destroy'), - array('ADODB_Session', 'gc') - ); - } - - - /*! - */ - function _sessionKey() { - // use this function to create the encryption key for crypted sessions - // crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt - return crypt(ADODB_Session::encryptionKey(), session_id()); - } - - /*! - */ - function _dumprs($rs) { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - - if (!$conn) { - return; - } - - if (!$debug) { - return; - } - - if (!$rs) { - echo "
    \$rs is null or false
    \n"; - return; - } - - //echo "
    \nAffected_Rows=",$conn->Affected_Rows(),"
    \n"; - - if (!is_object($rs)) { - return; - } - - require_once ADODB_SESSION.'/../tohtml.inc.php'; - rs2html($rs); - } - - ///////////////////// - // public methods - ///////////////////// - - function config($driver, $host, $user, $password, $database=false,$options=false) - { - ADODB_Session::driver($driver); - ADODB_Session::host($host); - ADODB_Session::user($user); - ADODB_Session::password($password); - ADODB_Session::database($database); - - if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB'; - - if (isset($options['table'])) ADODB_Session::table($options['table']); - if (isset($options['lob'])) ADODB_Session::clob($options['lob']); - if (isset($options['debug'])) ADODB_Session::debug($options['debug']); - } - - /*! - Create the connection to the database. - - If $conn already exists, reuse that connection - */ - function open($save_path, $session_name, $persist = null) - { - $conn =& ADODB_Session::_conn(); - - if ($conn) { - return true; - } - - $database = ADODB_Session::database(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $host = ADODB_Session::host(); - $password = ADODB_Session::password(); - $user = ADODB_Session::user(); - - if (!is_null($persist)) { - ADODB_Session::persist($persist); - } else { - $persist = ADODB_Session::persist(); - } - -# these can all be defaulted to in php.ini -# assert('$database'); -# assert('$driver'); -# assert('$host'); - - $conn =& ADONewConnection($driver); - - if ($debug) { - $conn->debug = true; - ADOConnection::outp( " driver=$driver user=$user db=$database "); - } - - if ($persist) { - switch($persist) { - default: - case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break; - case 'C': $ok = $conn->Connect($host, $user, $password, $database); break; - case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break; - } - } else { - $ok = $conn->Connect($host, $user, $password, $database); - } - - if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn; - else - ADOConnection::outp('

    Session: connection failed

    ', false); - - - return $ok; - } - - /*! - Close the connection - */ - function close() - { -/* - $conn =& ADODB_Session::_conn(); - if ($conn) $conn->Close(); -*/ - return true; - } - - /* - Slurp in the session variables and return the serialized string - */ - function read($key) - { - $conn =& ADODB_Session::_conn(); - $filter = ADODB_Session::filter(); - $table = ADODB_Session::table(); - - if (!$conn) { - return ''; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - $sql = "SELECT sessdata FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . $conn->sysTimeStamp; - /* Lock code does not work as it needs to hold transaction within whole page, and we don't know if - developer has commited elsewhere... :( - */ - #if (ADODB_Session::Lock()) - # $rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), sessdata); - #else - - $rs =& $conn->Execute($sql); - //ADODB_Session::_dumprs($rs); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else { - $v = reset($rs->fields); - $filter = array_reverse($filter); - foreach ($filter as $f) { - if (is_object($f)) { - $v = $f->read($v, ADODB_Session::_sessionKey()); - } - } - $v = rawurldecode($v); - } - - $rs->Close(); - - ADODB_Session::_crc(strlen($v) . crc32($v)); - return $v; - } - - return ''; - } - - /*! - Write the serialized data to a database. - - If the data has not been modified since the last read(), we do not write. - */ - function write($key, $val) - { - global $ADODB_SESSION_READONLY; - - if (!empty($ADODB_SESSION_READONLY)) return; - - $clob = ADODB_Session::clob(); - $conn =& ADODB_Session::_conn(); - $crc = ADODB_Session::_crc(); - $debug = ADODB_Session::debug(); - $driver = ADODB_Session::driver(); - $expire_notify = ADODB_Session::expireNotify(); - $filter = ADODB_Session::filter(); - $lifetime = ADODB_Session::lifetime(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - $sysTimeStamp = $conn->sysTimeStamp; - - //assert('$table'); - - $expiry = $conn->OffsetDate($lifetime/(24*3600),$sysTimeStamp); - - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($crc !== false && $crc == (strlen($val) . crc32($val))) { - if ($debug) { - echo '

    Session: Only updating date - crc32 not changed

    '; - } - - $expirevar = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expirevar = $$var; - } - } - - - $sql = "UPDATE $table SET expiry = $expiry ,expireref=".$conn->Param('0').", modified = $sysTimeStamp WHERE $binary sesskey = ".$conn->Param('1')." AND expiry >= $sysTimeStamp"; - $rs =& $conn->Execute($sql,array($expirevar,$key)); - return true; - } - $val = rawurlencode($val); - foreach ($filter as $f) { - if (is_object($f)) { - $val = $f->write($val, ADODB_Session::_sessionKey()); - } - } - - $expireref = ''; - if ($expire_notify) { - $var = reset($expire_notify); - global $$var; - if (isset($$var)) { - $expireref = $$var; - } - } - - if (!$clob) { // no lobs, simply use replace() - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key)); - if ($rs) $rs->Close(); - - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry=$expiry, sessdata=".$conn->Param(0).", expireref= ".$conn->Param(1).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('2'); - - } else { - $sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) - VALUES ($expiry,".$conn->Param('0').", ". $conn->Param('1').", ".$conn->Param('2').", $sysTimeStamp, $sysTimeStamp)"; - } - - - $rs =& $conn->Execute($sql,array($val,$expireref,$key)); - - } else { - // what value shall we insert/update for lob row? - switch ($driver) { - // empty_clob or empty_lob for oracle dbs - case 'oracle': - case 'oci8': - case 'oci8po': - case 'oci805': - $lob_value = sprintf('empty_%s()', strtolower($clob)); - break; - - // null for all other - default: - $lob_value = 'null'; - break; - } - - $conn->StartTrans(); - - $rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key)); - if ($rs) $rs->Close(); - - if ($rs && reset($rs->fields) > 0) { - $sql = "UPDATE $table SET expiry=$expiry, sessdata=$lob_value, expireref= ".$conn->Param(0).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('1'); - - } else { - $sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) - VALUES ($expiry,$lob_value, ". $conn->Param('0').", ".$conn->Param('1').", $sysTimeStamp, $sysTimeStamp)"; - } - - $rs =& $conn->Execute($sql,array($expireref,$key)); - - $qkey = $conn->qstr($key); - $rs2 =& $conn->UpdateBlob($table, 'sessdata', $val, " sesskey=$qkey", strtoupper($clob)); - $rs = @$conn->CompleteTrans(); - - - } - - if (!$rs) { - ADOConnection::outp('

    Session Replace: ' . $conn->ErrorMsg() . '

    ', false); - return false; - } else { - // bug in access driver (could be odbc?) means that info is not committed - // properly unless select statement executed in Win2000 - if ($conn->databaseType == 'access') { - $sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - } - }/* - if (ADODB_Session::Lock()) { - $conn->CommitTrans(); - }*/ - return $rs ? true : false; - } - - /*! - */ - function destroy($key) { - $conn =& ADODB_Session::_conn(); - $table = ADODB_Session::table(); - $expire_notify = ADODB_Session::expireNotify(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $qkey = $conn->quote($key); - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if (!$rs) { - return false; - } - if (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - //assert('$ref'); - //assert('$key'); - $fn($ref, $key); - } - $rs->Close(); - } - - $sql = "DELETE FROM $table WHERE $binary sesskey = $qkey"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) { - $rs->Close(); - } - - return $rs ? true : false; - } - - /*! - */ - function gc($maxlifetime) - { - $conn =& ADODB_Session::_conn(); - $debug = ADODB_Session::debug(); - $expire_notify = ADODB_Session::expireNotify(); - $optimize = ADODB_Session::optimize(); - $table = ADODB_Session::table(); - - if (!$conn) { - return false; - } - - //assert('$table'); - - $time = $conn->sysTimeStamp; - $binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : ''; - - if ($expire_notify) { - reset($expire_notify); - $fn = next($expire_notify); - $savem = $conn->SetFetchMode(ADODB_FETCH_NUM); - $sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - $conn->SetFetchMode($savem); - if ($rs) { - $conn->StartTrans(); - $keys = array(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref, $key); - $del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key)); - $rs->MoveNext(); - } - $rs->Close(); - - $conn->CompleteTrans(); - } - } else { - - if (0) { - $sql = "SELECT sesskey FROM $table WHERE expiry < $time"; - $arr =& $conn->GetAll($sql); - foreach ($arr as $row) { - $sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0'); - $conn->Execute($sql2,array($row[0])); - } - } else { - $sql = "DELETE FROM $table WHERE expiry < $time"; - $rs =& $conn->Execute($sql); - ADODB_Session::_dumprs($rs); - if ($rs) $rs->Close(); - } - if ($debug) { - ADOConnection::outp("

    Garbage Collection: $sql

    "); - } - } - - // suggested by Cameron, "GaM3R" - if ($optimize) { - $driver = ADODB_Session::driver(); - - if (preg_match('/mysql/i', $driver)) { - $sql = "OPTIMIZE TABLE $table"; - } - if (preg_match('/postgres/i', $driver)) { - $sql = "VACUUM $table"; - } - if (!empty($sql)) { - $conn->Execute($sql); - } - } - - - return true; - } -} - -ADODB_Session::_init(); -if (empty($ADODB_SESSION_READONLY)) - register_shutdown_function('session_write_close'); - -// for backwards compatability only -function adodb_sess_open($save_path, $session_name, $persist = true) { - return ADODB_Session::open($save_path, $session_name, $persist); -} - -// for backwards compatability only -function adodb_sess_gc($t) -{ - return ADODB_Session::gc($t); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.mysql.sql b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.mysql.sql deleted file mode 100755 index c1b673a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.mysql.sql +++ /dev/null @@ -1,16 +0,0 @@ --- $CVSHeader$ - -CREATE DATABASE /*! IF NOT EXISTS */ adodb_sessions; - -USE adodb_sessions; - -DROP TABLE /*! IF EXISTS */ sessions; - -CREATE TABLE /*! IF NOT EXISTS */ sessions ( - sesskey CHAR(32) /*! BINARY */ NOT NULL DEFAULT '', - expiry INT(11) /*! UNSIGNED */ NOT NULL DEFAULT 0, - expireref VARCHAR(64) DEFAULT '', - data LONGTEXT DEFAULT '', - PRIMARY KEY (sesskey), - INDEX expiry (expiry) -); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.clob.sql b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.clob.sql deleted file mode 100755 index cf6c5bad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.clob.sql +++ /dev/null @@ -1,15 +0,0 @@ --- $CVSHeader$ - -DROP TABLE adodb_sessions; - -CREATE TABLE sessions ( - sesskey CHAR(32) DEFAULT '' NOT NULL, - expiry INT DEFAULT 0 NOT NULL, - expireref VARCHAR(64) DEFAULT '', - data CLOB DEFAULT '', - PRIMARY KEY (sesskey) -); - -CREATE INDEX ix_expiry ON sessions (expiry); - -QUIT; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.sql b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.sql deleted file mode 100755 index dc32a5fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/adodb-sessions.oracle.sql +++ /dev/null @@ -1,16 +0,0 @@ --- $CVSHeader$ - -DROP TABLE adodb_sessions; - -CREATE TABLE sessions ( - sesskey CHAR(32) DEFAULT '' NOT NULL, - expiry INT DEFAULT 0 NOT NULL, - expireref VARCHAR(64) DEFAULT '', - data VARCHAR(4000) DEFAULT '', - PRIMARY KEY (sesskey), - INDEX expiry (expiry) -); - -CREATE INDEX ix_expiry ON sessions (expiry); - -QUIT; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/crypt.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/crypt.inc.php deleted file mode 100755 index 94177f34..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/crypt.inc.php +++ /dev/null @@ -1,161 +0,0 @@ - -class MD5Crypt{ - function keyED($txt,$encrypt_key) - { - $encrypt_key = md5($encrypt_key); - $ctr=0; - $tmp = ""; - for ($i=0;$ikeyED($tmp,$key)); - } - - function Decrypt($txt,$key) - { - $txt = $this->keyED(base64_decode($txt),$key); - $tmp = ""; - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - return $randomPassword; - } - -} - - -class SHA1Crypt{ - - function keyED($txt,$encrypt_key) - { - - $encrypt_key = sha1($encrypt_key); - $ctr=0; - $tmp = ""; - - for ($i=0;$ikeyED($tmp,$key)); - - } - - - - function Decrypt($txt,$key) - { - - $txt = $this->keyED(base64_decode($txt),$key); - - $tmp = ""; - - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - - return $randomPassword; - - } - - - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/all-wcprops deleted file mode 100755 index 4a768942..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/all-wcprops +++ /dev/null @@ -1,29 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/old -END -crypt.inc.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/session/old/crypt.inc.php -END -adodb-session.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/old/adodb-session.php -END -adodb-cryptsession.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/old/adodb-cryptsession.php -END -adodb-session-clob.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/session/old/adodb-session-clob.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/entries deleted file mode 100755 index 20dd92e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/entries +++ /dev/null @@ -1,80 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/session/old -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T10:55:13.000000Z -350 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -crypt.inc.php -file - - - - -2008-02-29T14:57:53.332740Z -5a4e4fde0da690423376a99610929101 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -adodb-session.php -file - - - - -2008-02-29T14:57:53.332740Z -aeffff48c5142b39507c434d184d712e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-cryptsession.php -file - - - - -2008-02-29T14:57:53.348361Z -0fcfb702eeaac9a346aa14f4351bcee0 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -adodb-session-clob.php -file - - - - -2008-02-29T14:57:53.348361Z -e2e15d66d7e0582004a86b19fa9be6bd -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-cryptsession.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-cryptsession.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-cryptsession.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session-clob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session-clob.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session-clob.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/adodb-session.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/crypt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/crypt.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/prop-base/crypt.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-cryptsession.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-cryptsession.php.svn-base deleted file mode 100755 index 40ce283b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-cryptsession.php.svn-base +++ /dev/null @@ -1,324 +0,0 @@ - - - Set tabs to 4 for best viewing. - - Latest version of ADODB is available at http://php.weblogs.com/adodb - ====================================================================== - - This file provides PHP4 session management using the ADODB database -wrapper library. - - Example - ======= - - include('adodb.inc.php'); - #---------------------------------# - include('adodb-cryptsession.php'); - #---------------------------------# - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create a new database in MySQL or Access "sessions" like -so: - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA CLOB, - primary key (sesskey) - ); - - 2. Then define the following parameters. You can either modify - this file, or define them before this file is included: - - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - - 3. Recommended is PHP 4.0.2 or later. There are documented -session bugs in earlier versions of PHP. - -*/ - - -include_once('crypt.inc.php'); - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESS_INSERT, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_TBL; - - //$ADODB_SESS_DEBUG = true; - - /* SET THE FOLLOWING PARAMETERS */ -if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; -} - -if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; -} - -if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; -} - -function ADODB_Session_Key() -{ -$ADODB_CRYPT_KEY = 'CRYPTED ADODB SESSIONS ROCK!'; - - /* USE THIS FUNCTION TO CREATE THE ENCRYPTION KEY FOR CRYPTED SESSIONS */ - /* Crypt the used key, $ADODB_CRYPT_KEY as key and session_ID as SALT */ - return crypt($ADODB_CRYPT_KEY, session_ID()); -} - -$ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); -if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; -} - -function adodb_sess_open($save_path, $session_name) -{ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_DEBUG; - - $ADODB_SESS_INSERT = false; - - if (isset($ADODB_SESS_CONN)) return true; - - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - print" conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "; - } - return $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - -} - -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -function adodb_sess_read($key) -{ -$Crypt = new MD5Crypt; -global $ADODB_SESS_CONN,$ADODB_SESS_INSERT,$ADODB_SESSION_TBL; - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $ADODB_SESS_INSERT = true; - $v = ''; - } else { - // Decrypt session data - $v = rawurldecode($Crypt->Decrypt(reset($rs->fields), ADODB_Session_Key())); - } - $rs->Close(); - return $v; - } - else $ADODB_SESS_INSERT = true; - - return ''; -} - -function adodb_sess_write($key, $val) -{ -$Crypt = new MD5Crypt; - global $ADODB_SESS_INSERT,$ADODB_SESS_CONN, $ADODB_SESS_LIFE, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - $expiry = time() + $ADODB_SESS_LIFE; - - // encrypt session data.. - $val = $Crypt->Encrypt(rawurlencode($val), ADODB_Session_Key()); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL, - $arr, - 'sesskey',$autoQuote = true); - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - - if ($ADODB_SESS_CONN->databaseType == 'access') $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return isset($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - - -function adodb_sess_gc($maxlifetime) { - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY,$ADODB_SESS_DEBUG; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - //$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time(); - $ADODB_SESS_CONN->Execute($qry); - } - - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) - { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - } - - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ -/* -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; -} -*/ -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session-clob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session-clob.php.svn-base deleted file mode 100755 index 9367bca7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session-clob.php.svn-base +++ /dev/null @@ -1,448 +0,0 @@ -"; - -To force non-persistent connections, call adodb_session_open first before session_start(): - - include('adodb.inc.php'); - include('adodb-session.php'); - adodb_session_open(false,false,false); - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create this table in your database (syntax might vary depending on your db): - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA CLOB, - primary key (sesskey) - ); - - - 2. Then define the following parameters in this file: - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - $ADODB_SESSION_USE_LOBS = false; (or, if you wanna use CLOBS (= 'CLOB') or ( = 'BLOB') - - 3. Recommended is PHP 4.1.0 or later. There are documented - session bugs in earlier versions of PHP. - - 4. If you want to receive notifications when a session expires, then - you can tag a session with an EXPIREREF, and before the session - record is deleted, we can call a function that will pass the EXPIREREF - as the first parameter, and the session key as the second parameter. - - To do this, define a notification function, say NotifyFn: - - function NotifyFn($expireref, $sesskey) - { - } - - Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY. - This is an array with 2 elements, the first being the name of the variable - you would like to store in the EXPIREREF field, and the 2nd is the - notification function's name. - - In this example, we want to be notified when a user's session - has expired, so we store the user id in the global variable $USERID, - store this value in the EXPIREREF field: - - $ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn'); - - Then when the NotifyFn is called, we are passed the $USERID as the first - parameter, eg. NotifyFn($userid, $sesskey). -*/ - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - -/****************************************************************************************\ - Global definitions -\****************************************************************************************/ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_CRC, - $ADODB_SESSION_USE_LOBS, - $ADODB_SESSION_TBL; - - if (!isset($ADODB_SESSION_USE_LOBS)) $ADODB_SESSION_USE_LOBS = 'CLOB'; - - $ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); - if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; - } - $ADODB_SESSION_CRC = false; - //$ADODB_SESS_DEBUG = true; - - ////////////////////////////////// - /* SET THE FOLLOWING PARAMETERS */ - ////////////////////////////////// - - if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; - } - - if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; - } - // Made table name configurable - by David Johnson djohnson@inpro.net - if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; - } - - - // defaulting $ADODB_SESSION_USE_LOBS - if (!isset($ADODB_SESSION_USE_LOBS) || empty($ADODB_SESSION_USE_LOBS)) { - $ADODB_SESSION_USE_LOBS = false; - } - - /* - $ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER; - $ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT; - $ADODB_SESS['user'] = $ADODB_SESSION_USER; - $ADODB_SESS['pwd'] = $ADODB_SESSION_PWD; - $ADODB_SESS['db'] = $ADODB_SESSION_DB; - $ADODB_SESS['life'] = $ADODB_SESS_LIFE; - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - $ADODB_SESS['table'] = $ADODB_SESS_TBL; - */ - -/****************************************************************************************\ - Create the connection to the database. - - If $ADODB_SESS_CONN already exists, reuse that connection -\****************************************************************************************/ -function adodb_sess_open($save_path, $session_name,$persist=true) -{ -GLOBAL $ADODB_SESS_CONN; - if (isset($ADODB_SESS_CONN)) return true; - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_DEBUG; - - // cannot use & below - do not know why... - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "); - } - if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - - if (!$ok) ADOConnection::outp( " --- Session: connection failed

    ",false); -} - -/****************************************************************************************\ - Close the connection -\****************************************************************************************/ -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -/****************************************************************************************\ - Slurp in the session variables and return the serialized string -\****************************************************************************************/ -function adodb_sess_read($key) -{ -global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC; - - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else - $v = rawurldecode(reset($rs->fields)); - - $rs->Close(); - - // new optimization adodb 2.1 - $ADODB_SESSION_CRC = strlen($v).crc32($v); - - return $v; - } - - return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com -} - -/****************************************************************************************\ - Write the serialized data to a database. - - If the data has not been modified since adodb_sess_read(), we do not write. -\****************************************************************************************/ -function adodb_sess_write($key, $val) -{ - global - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESSION_TBL, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_CRC, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_DRIVER, // added - $ADODB_SESSION_USE_LOBS; // added - - $expiry = time() + $ADODB_SESS_LIFE; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) { - if ($ADODB_SESS_DEBUG) echo " --- Session: Only updating date - crc32 not changed

    "; - $qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time(); - $rs = $ADODB_SESS_CONN->Execute($qry); - return true; - } - $val = rawurlencode($val); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - - - if ($ADODB_SESSION_USE_LOBS === false) { // no lobs, simply use replace() - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr, 'sesskey',$autoQuote = true); - if (!$rs) { - $err = $ADODB_SESS_CONN->ErrorMsg(); - } - } else { - // what value shall we insert/update for lob row? - switch ($ADODB_SESSION_DRIVER) { - // empty_clob or empty_lob for oracle dbs - case "oracle": - case "oci8": - case "oci8po": - case "oci805": - $lob_value = sprintf("empty_%s()", strtolower($ADODB_SESSION_USE_LOBS)); - break; - - // null for all other - default: - $lob_value = "null"; - break; - } - - // do we insert or update? => as for sesskey - $res = $ADODB_SESS_CONN->Execute("select count(*) as cnt from $ADODB_SESSION_TBL where sesskey = '$key'"); - if ($res && reset($res->fields) > 0) { - $qry = sprintf("update %s set expiry = %d, data = %s where sesskey = '%s'", $ADODB_SESSION_TBL, $expiry, $lob_value, $key); - } else { - // insert - $qry = sprintf("insert into %s (sesskey, expiry, data) values ('%s', %d, %s)", $ADODB_SESSION_TBL, $key, $expiry, $lob_value); - } - - $err = ""; - $rs1 = $ADODB_SESS_CONN->Execute($qry); - if (!$rs1) { - $err .= $ADODB_SESS_CONN->ErrorMsg()."\n"; - } - $rs2 = $ADODB_SESS_CONN->UpdateBlob($ADODB_SESSION_TBL, 'data', $val, "sesskey='$key'", strtoupper($ADODB_SESSION_USE_LOBS)); - if (!$rs2) { - $err .= $ADODB_SESS_CONN->ErrorMsg()."\n"; - } - $rs = ($rs1 && $rs2) ? true : false; - } - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.nl2br($err).'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - if ($ADODB_SESS_CONN->databaseType == 'access') - $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return !empty($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - -function adodb_sess_gc($maxlifetime) -{ - global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - //$ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->CommitTrans(); - - } - } else { - $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time()); - - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- Garbage Collection: $qry

    "); - } - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - if (!empty($opt_qry)) { - $ADODB_SESS_CONN->Execute($opt_qry); - } - } - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ - -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - ADOConnection::outp( " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    ",false); -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session.php.svn-base deleted file mode 100755 index a4bc8fb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/adodb-session.php.svn-base +++ /dev/null @@ -1,439 +0,0 @@ -"; - -To force non-persistent connections, call adodb_session_open first before session_start(): - - include('adodb.inc.php'); - include('adodb-session.php'); - adodb_sess_open(false,false,false); - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create this table in your database (syntax might vary depending on your db): - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA text not null, - primary key (sesskey) - ); - - For oracle: - create table sessions ( - SESSKEY char(32) not null, - EXPIRY DECIMAL(16) not null, - EXPIREREF varchar(64), - DATA varchar(4000) not null, - primary key (sesskey) - ); - - - 2. Then define the following parameters. You can either modify - this file, or define them before this file is included: - - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - - 3. Recommended is PHP 4.1.0 or later. There are documented - session bugs in earlier versions of PHP. - - 4. If you want to receive notifications when a session expires, then - you can tag a session with an EXPIREREF, and before the session - record is deleted, we can call a function that will pass the EXPIREREF - as the first parameter, and the session key as the second parameter. - - To do this, define a notification function, say NotifyFn: - - function NotifyFn($expireref, $sesskey) - { - } - - Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY. - This is an array with 2 elements, the first being the name of the variable - you would like to store in the EXPIREREF field, and the 2nd is the - notification function's name. - - In this example, we want to be notified when a user's session - has expired, so we store the user id in the global variable $USERID, - store this value in the EXPIREREF field: - - $ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn'); - - Then when the NotifyFn is called, we are passed the $USERID as the first - parameter, eg. NotifyFn($userid, $sesskey). -*/ - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - - /* - Thanks Joe Li. See http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1 -*/ -function adodb_session_regenerate_id() -{ - $conn =& ADODB_Session::_conn(); - if (!$conn) return false; - - $old_id = session_id(); - if (function_exists('session_regenerate_id')) { - session_regenerate_id(); - } else { - session_id(md5(uniqid(rand(), true))); - $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - //@session_start(); - } - $new_id = session_id(); - $ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id)); - - /* it is possible that the update statement fails due to a collision */ - if (!$ok) { - session_id($old_id); - if (empty($ck)) $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - return false; - } - - return true; -} - -/****************************************************************************************\ - Global definitions -\****************************************************************************************/ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_CRC, - $ADODB_SESSION_TBL; - - - $ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); - if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; - } - $ADODB_SESSION_CRC = false; - //$ADODB_SESS_DEBUG = true; - - ////////////////////////////////// - /* SET THE FOLLOWING PARAMETERS */ - ////////////////////////////////// - - if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; - } - - if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; - } - // Made table name configurable - by David Johnson djohnson@inpro.net - if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; - } - - /* - $ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER; - $ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT; - $ADODB_SESS['user'] = $ADODB_SESSION_USER; - $ADODB_SESS['pwd'] = $ADODB_SESSION_PWD; - $ADODB_SESS['db'] = $ADODB_SESSION_DB; - $ADODB_SESS['life'] = $ADODB_SESS_LIFE; - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - $ADODB_SESS['table'] = $ADODB_SESS_TBL; - */ - -/****************************************************************************************\ - Create the connection to the database. - - If $ADODB_SESS_CONN already exists, reuse that connection -\****************************************************************************************/ -function adodb_sess_open($save_path, $session_name,$persist=true) -{ -GLOBAL $ADODB_SESS_CONN; - if (isset($ADODB_SESS_CONN)) return true; - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_DEBUG; - - // cannot use & below - do not know why... - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "); - } - if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - - if (!$ok) ADOConnection::outp( " --- Session: connection failed

    ",false); -} - -/****************************************************************************************\ - Close the connection -\****************************************************************************************/ -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -/****************************************************************************************\ - Slurp in the session variables and return the serialized string -\****************************************************************************************/ -function adodb_sess_read($key) -{ -global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC; - - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else - $v = rawurldecode(reset($rs->fields)); - - $rs->Close(); - - // new optimization adodb 2.1 - $ADODB_SESSION_CRC = strlen($v).crc32($v); - - return $v; - } - - return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com -} - -/****************************************************************************************\ - Write the serialized data to a database. - - If the data has not been modified since adodb_sess_read(), we do not write. -\****************************************************************************************/ -function adodb_sess_write($key, $val) -{ - global - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESSION_TBL, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_CRC, - $ADODB_SESSION_EXPIRE_NOTIFY; - - $expiry = time() + $ADODB_SESS_LIFE; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) { - if ($ADODB_SESS_DEBUG) echo " --- Session: Only updating date - crc32 not changed

    "; - $qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time(); - $rs = $ADODB_SESS_CONN->Execute($qry); - return true; - } - $val = rawurlencode($val); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr, - 'sesskey',$autoQuote = true); - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - if ($ADODB_SESS_CONN->databaseType == 'access') - $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return !empty($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - -function adodb_sess_gc($maxlifetime) -{ - global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs =& $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - $ADODB_SESS_CONN->CommitTrans(); - - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time(); - $ADODB_SESS_CONN->Execute($qry); - - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- Garbage Collection: $qry

    "); - } - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - if (!empty($opt_qry)) { - $ADODB_SESS_CONN->Execute($opt_qry); - } - } - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ - -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - ADOConnection::outp( " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    ",false); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/crypt.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/crypt.inc.php.svn-base deleted file mode 100755 index b99bbba5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/.svn/text-base/crypt.inc.php.svn-base +++ /dev/null @@ -1,64 +0,0 @@ - -class MD5Crypt{ - function keyED($txt,$encrypt_key) - { - $encrypt_key = md5($encrypt_key); - $ctr=0; - $tmp = ""; - for ($i=0;$ikeyED($tmp,$key)); - } - - function Decrypt($txt,$key) - { - $txt = $this->keyED(base64_decode($txt),$key); - $tmp = ""; - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - return $randomPassword; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-cryptsession.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-cryptsession.php deleted file mode 100755 index 4323af89..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-cryptsession.php +++ /dev/null @@ -1,324 +0,0 @@ - - - Set tabs to 4 for best viewing. - - Latest version of ADODB is available at http://php.weblogs.com/adodb - ====================================================================== - - This file provides PHP4 session management using the ADODB database -wrapper library. - - Example - ======= - - include('adodb.inc.php'); - #---------------------------------# - include('adodb-cryptsession.php'); - #---------------------------------# - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create a new database in MySQL or Access "sessions" like -so: - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA CLOB, - primary key (sesskey) - ); - - 2. Then define the following parameters. You can either modify - this file, or define them before this file is included: - - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - - 3. Recommended is PHP 4.0.2 or later. There are documented -session bugs in earlier versions of PHP. - -*/ - - -include_once('crypt.inc.php'); - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESS_INSERT, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_TBL; - - //$ADODB_SESS_DEBUG = true; - - /* SET THE FOLLOWING PARAMETERS */ -if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; -} - -if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; -} - -if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; -} - -function ADODB_Session_Key() -{ -$ADODB_CRYPT_KEY = 'CRYPTED ADODB SESSIONS ROCK!'; - - /* USE THIS FUNCTION TO CREATE THE ENCRYPTION KEY FOR CRYPTED SESSIONS */ - /* Crypt the used key, $ADODB_CRYPT_KEY as key and session_ID as SALT */ - return crypt($ADODB_CRYPT_KEY, session_ID()); -} - -$ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); -if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; -} - -function adodb_sess_open($save_path, $session_name) -{ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_DEBUG; - - $ADODB_SESS_INSERT = false; - - if (isset($ADODB_SESS_CONN)) return true; - - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - print" conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "; - } - return $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - -} - -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -function adodb_sess_read($key) -{ -$Crypt = new MD5Crypt; -global $ADODB_SESS_CONN,$ADODB_SESS_INSERT,$ADODB_SESSION_TBL; - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $ADODB_SESS_INSERT = true; - $v = ''; - } else { - // Decrypt session data - $v = rawurldecode($Crypt->Decrypt(reset($rs->fields), ADODB_Session_Key())); - } - $rs->Close(); - return $v; - } - else $ADODB_SESS_INSERT = true; - - return ''; -} - -function adodb_sess_write($key, $val) -{ -$Crypt = new MD5Crypt; - global $ADODB_SESS_INSERT,$ADODB_SESS_CONN, $ADODB_SESS_LIFE, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - $expiry = time() + $ADODB_SESS_LIFE; - - // encrypt session data.. - $val = $Crypt->Encrypt(rawurlencode($val), ADODB_Session_Key()); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL, - $arr, - 'sesskey',$autoQuote = true); - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - - if ($ADODB_SESS_CONN->databaseType == 'access') $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return isset($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - - -function adodb_sess_gc($maxlifetime) { - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY,$ADODB_SESS_DEBUG; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - //$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time(); - $ADODB_SESS_CONN->Execute($qry); - } - - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) - { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - } - - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ -/* -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; -} -*/ -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session-clob.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session-clob.php deleted file mode 100755 index 788e184a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session-clob.php +++ /dev/null @@ -1,448 +0,0 @@ -"; - -To force non-persistent connections, call adodb_session_open first before session_start(): - - include('adodb.inc.php'); - include('adodb-session.php'); - adodb_session_open(false,false,false); - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create this table in your database (syntax might vary depending on your db): - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA CLOB, - primary key (sesskey) - ); - - - 2. Then define the following parameters in this file: - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - $ADODB_SESSION_USE_LOBS = false; (or, if you wanna use CLOBS (= 'CLOB') or ( = 'BLOB') - - 3. Recommended is PHP 4.1.0 or later. There are documented - session bugs in earlier versions of PHP. - - 4. If you want to receive notifications when a session expires, then - you can tag a session with an EXPIREREF, and before the session - record is deleted, we can call a function that will pass the EXPIREREF - as the first parameter, and the session key as the second parameter. - - To do this, define a notification function, say NotifyFn: - - function NotifyFn($expireref, $sesskey) - { - } - - Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY. - This is an array with 2 elements, the first being the name of the variable - you would like to store in the EXPIREREF field, and the 2nd is the - notification function's name. - - In this example, we want to be notified when a user's session - has expired, so we store the user id in the global variable $USERID, - store this value in the EXPIREREF field: - - $ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn'); - - Then when the NotifyFn is called, we are passed the $USERID as the first - parameter, eg. NotifyFn($userid, $sesskey). -*/ - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - -/****************************************************************************************\ - Global definitions -\****************************************************************************************/ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_CRC, - $ADODB_SESSION_USE_LOBS, - $ADODB_SESSION_TBL; - - if (!isset($ADODB_SESSION_USE_LOBS)) $ADODB_SESSION_USE_LOBS = 'CLOB'; - - $ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); - if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; - } - $ADODB_SESSION_CRC = false; - //$ADODB_SESS_DEBUG = true; - - ////////////////////////////////// - /* SET THE FOLLOWING PARAMETERS */ - ////////////////////////////////// - - if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; - } - - if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; - } - // Made table name configurable - by David Johnson djohnson@inpro.net - if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; - } - - - // defaulting $ADODB_SESSION_USE_LOBS - if (!isset($ADODB_SESSION_USE_LOBS) || empty($ADODB_SESSION_USE_LOBS)) { - $ADODB_SESSION_USE_LOBS = false; - } - - /* - $ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER; - $ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT; - $ADODB_SESS['user'] = $ADODB_SESSION_USER; - $ADODB_SESS['pwd'] = $ADODB_SESSION_PWD; - $ADODB_SESS['db'] = $ADODB_SESSION_DB; - $ADODB_SESS['life'] = $ADODB_SESS_LIFE; - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - $ADODB_SESS['table'] = $ADODB_SESS_TBL; - */ - -/****************************************************************************************\ - Create the connection to the database. - - If $ADODB_SESS_CONN already exists, reuse that connection -\****************************************************************************************/ -function adodb_sess_open($save_path, $session_name,$persist=true) -{ -GLOBAL $ADODB_SESS_CONN; - if (isset($ADODB_SESS_CONN)) return true; - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_DEBUG; - - // cannot use & below - do not know why... - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "); - } - if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - - if (!$ok) ADOConnection::outp( " --- Session: connection failed

    ",false); -} - -/****************************************************************************************\ - Close the connection -\****************************************************************************************/ -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -/****************************************************************************************\ - Slurp in the session variables and return the serialized string -\****************************************************************************************/ -function adodb_sess_read($key) -{ -global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC; - - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else - $v = rawurldecode(reset($rs->fields)); - - $rs->Close(); - - // new optimization adodb 2.1 - $ADODB_SESSION_CRC = strlen($v).crc32($v); - - return $v; - } - - return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com -} - -/****************************************************************************************\ - Write the serialized data to a database. - - If the data has not been modified since adodb_sess_read(), we do not write. -\****************************************************************************************/ -function adodb_sess_write($key, $val) -{ - global - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESSION_TBL, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_CRC, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_DRIVER, // added - $ADODB_SESSION_USE_LOBS; // added - - $expiry = time() + $ADODB_SESS_LIFE; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) { - if ($ADODB_SESS_DEBUG) echo " --- Session: Only updating date - crc32 not changed

    "; - $qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time(); - $rs = $ADODB_SESS_CONN->Execute($qry); - return true; - } - $val = rawurlencode($val); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - - - if ($ADODB_SESSION_USE_LOBS === false) { // no lobs, simply use replace() - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr, 'sesskey',$autoQuote = true); - if (!$rs) { - $err = $ADODB_SESS_CONN->ErrorMsg(); - } - } else { - // what value shall we insert/update for lob row? - switch ($ADODB_SESSION_DRIVER) { - // empty_clob or empty_lob for oracle dbs - case "oracle": - case "oci8": - case "oci8po": - case "oci805": - $lob_value = sprintf("empty_%s()", strtolower($ADODB_SESSION_USE_LOBS)); - break; - - // null for all other - default: - $lob_value = "null"; - break; - } - - // do we insert or update? => as for sesskey - $res = $ADODB_SESS_CONN->Execute("select count(*) as cnt from $ADODB_SESSION_TBL where sesskey = '$key'"); - if ($res && reset($res->fields) > 0) { - $qry = sprintf("update %s set expiry = %d, data = %s where sesskey = '%s'", $ADODB_SESSION_TBL, $expiry, $lob_value, $key); - } else { - // insert - $qry = sprintf("insert into %s (sesskey, expiry, data) values ('%s', %d, %s)", $ADODB_SESSION_TBL, $key, $expiry, $lob_value); - } - - $err = ""; - $rs1 = $ADODB_SESS_CONN->Execute($qry); - if (!$rs1) { - $err .= $ADODB_SESS_CONN->ErrorMsg()."\n"; - } - $rs2 = $ADODB_SESS_CONN->UpdateBlob($ADODB_SESSION_TBL, 'data', $val, "sesskey='$key'", strtoupper($ADODB_SESSION_USE_LOBS)); - if (!$rs2) { - $err .= $ADODB_SESS_CONN->ErrorMsg()."\n"; - } - $rs = ($rs1 && $rs2) ? true : false; - } - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.nl2br($err).'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - if ($ADODB_SESS_CONN->databaseType == 'access') - $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return !empty($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - -function adodb_sess_gc($maxlifetime) -{ - global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - //$ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->CommitTrans(); - - } - } else { - $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time()); - - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- Garbage Collection: $qry

    "); - } - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - if (!empty($opt_qry)) { - $ADODB_SESS_CONN->Execute($opt_qry); - } - } - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ - -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - ADOConnection::outp( " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    ",false); -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session.php deleted file mode 100755 index 6fc9b2fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/adodb-session.php +++ /dev/null @@ -1,439 +0,0 @@ -"; - -To force non-persistent connections, call adodb_session_open first before session_start(): - - include('adodb.inc.php'); - include('adodb-session.php'); - adodb_sess_open(false,false,false); - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - print " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - - Installation - ============ - 1. Create this table in your database (syntax might vary depending on your db): - - create table sessions ( - SESSKEY char(32) not null, - EXPIRY int(11) unsigned not null, - EXPIREREF varchar(64), - DATA text not null, - primary key (sesskey) - ); - - For oracle: - create table sessions ( - SESSKEY char(32) not null, - EXPIRY DECIMAL(16) not null, - EXPIREREF varchar(64), - DATA varchar(4000) not null, - primary key (sesskey) - ); - - - 2. Then define the following parameters. You can either modify - this file, or define them before this file is included: - - $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase'; - $ADODB_SESSION_CONNECT='server to connect to'; - $ADODB_SESSION_USER ='user'; - $ADODB_SESSION_PWD ='password'; - $ADODB_SESSION_DB ='database'; - $ADODB_SESSION_TBL = 'sessions' - - 3. Recommended is PHP 4.1.0 or later. There are documented - session bugs in earlier versions of PHP. - - 4. If you want to receive notifications when a session expires, then - you can tag a session with an EXPIREREF, and before the session - record is deleted, we can call a function that will pass the EXPIREREF - as the first parameter, and the session key as the second parameter. - - To do this, define a notification function, say NotifyFn: - - function NotifyFn($expireref, $sesskey) - { - } - - Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY. - This is an array with 2 elements, the first being the name of the variable - you would like to store in the EXPIREREF field, and the 2nd is the - notification function's name. - - In this example, we want to be notified when a user's session - has expired, so we store the user id in the global variable $USERID, - store this value in the EXPIREREF field: - - $ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn'); - - Then when the NotifyFn is called, we are passed the $USERID as the first - parameter, eg. NotifyFn($userid, $sesskey). -*/ - -if (!defined('_ADODB_LAYER')) { - include (dirname(__FILE__).'/adodb.inc.php'); -} - -if (!defined('ADODB_SESSION')) { - - define('ADODB_SESSION',1); - - /* if database time and system time is difference is greater than this, then give warning */ - define('ADODB_SESSION_SYNCH_SECS',60); - - /* - Thanks Joe Li. See http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1 -*/ -function adodb_session_regenerate_id() -{ - $conn =& ADODB_Session::_conn(); - if (!$conn) return false; - - $old_id = session_id(); - if (function_exists('session_regenerate_id')) { - session_regenerate_id(); - } else { - session_id(md5(uniqid(rand(), true))); - $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - //@session_start(); - } - $new_id = session_id(); - $ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id)); - - /* it is possible that the update statement fails due to a collision */ - if (!$ok) { - session_id($old_id); - if (empty($ck)) $ck = session_get_cookie_params(); - setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']); - return false; - } - - return true; -} - -/****************************************************************************************\ - Global definitions -\****************************************************************************************/ -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_EXPIRE_NOTIFY, - $ADODB_SESSION_CRC, - $ADODB_SESSION_TBL; - - - $ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime'); - if ($ADODB_SESS_LIFE <= 1) { - // bug in PHP 4.0.3 pl 1 -- how about other versions? - //print "

    Session Error: PHP.INI setting session.gc_maxlifetimenot set: $ADODB_SESS_LIFE

    "; - $ADODB_SESS_LIFE=1440; - } - $ADODB_SESSION_CRC = false; - //$ADODB_SESS_DEBUG = true; - - ////////////////////////////////// - /* SET THE FOLLOWING PARAMETERS */ - ////////////////////////////////// - - if (empty($ADODB_SESSION_DRIVER)) { - $ADODB_SESSION_DRIVER='mysql'; - $ADODB_SESSION_CONNECT='localhost'; - $ADODB_SESSION_USER ='root'; - $ADODB_SESSION_PWD =''; - $ADODB_SESSION_DB ='xphplens_2'; - } - - if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) { - $ADODB_SESSION_EXPIRE_NOTIFY = false; - } - // Made table name configurable - by David Johnson djohnson@inpro.net - if (empty($ADODB_SESSION_TBL)){ - $ADODB_SESSION_TBL = 'sessions'; - } - - /* - $ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER; - $ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT; - $ADODB_SESS['user'] = $ADODB_SESSION_USER; - $ADODB_SESS['pwd'] = $ADODB_SESSION_PWD; - $ADODB_SESS['db'] = $ADODB_SESSION_DB; - $ADODB_SESS['life'] = $ADODB_SESS_LIFE; - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - - $ADODB_SESS['debug'] = $ADODB_SESS_DEBUG; - $ADODB_SESS['table'] = $ADODB_SESS_TBL; - */ - -/****************************************************************************************\ - Create the connection to the database. - - If $ADODB_SESS_CONN already exists, reuse that connection -\****************************************************************************************/ -function adodb_sess_open($save_path, $session_name,$persist=true) -{ -GLOBAL $ADODB_SESS_CONN; - if (isset($ADODB_SESS_CONN)) return true; - -GLOBAL $ADODB_SESSION_CONNECT, - $ADODB_SESSION_DRIVER, - $ADODB_SESSION_USER, - $ADODB_SESSION_PWD, - $ADODB_SESSION_DB, - $ADODB_SESS_DEBUG; - - // cannot use & below - do not know why... - $ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER); - if (!empty($ADODB_SESS_DEBUG)) { - $ADODB_SESS_CONN->debug = true; - ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB "); - } - if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT, - $ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB); - - if (!$ok) ADOConnection::outp( " --- Session: connection failed

    ",false); -} - -/****************************************************************************************\ - Close the connection -\****************************************************************************************/ -function adodb_sess_close() -{ -global $ADODB_SESS_CONN; - - if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close(); - return true; -} - -/****************************************************************************************\ - Slurp in the session variables and return the serialized string -\****************************************************************************************/ -function adodb_sess_read($key) -{ -global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC; - - $rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time()); - if ($rs) { - if ($rs->EOF) { - $v = ''; - } else - $v = rawurldecode(reset($rs->fields)); - - $rs->Close(); - - // new optimization adodb 2.1 - $ADODB_SESSION_CRC = strlen($v).crc32($v); - - return $v; - } - - return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com -} - -/****************************************************************************************\ - Write the serialized data to a database. - - If the data has not been modified since adodb_sess_read(), we do not write. -\****************************************************************************************/ -function adodb_sess_write($key, $val) -{ - global - $ADODB_SESS_CONN, - $ADODB_SESS_LIFE, - $ADODB_SESSION_TBL, - $ADODB_SESS_DEBUG, - $ADODB_SESSION_CRC, - $ADODB_SESSION_EXPIRE_NOTIFY; - - $expiry = time() + $ADODB_SESS_LIFE; - - // crc32 optimization since adodb 2.1 - // now we only update expiry date, thx to sebastian thom in adodb 2.32 - if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) { - if ($ADODB_SESS_DEBUG) echo " --- Session: Only updating date - crc32 not changed

    "; - $qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time(); - $rs = $ADODB_SESS_CONN->Execute($qry); - return true; - } - $val = rawurlencode($val); - - $arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val); - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - $var = reset($ADODB_SESSION_EXPIRE_NOTIFY); - global $$var; - $arr['expireref'] = $$var; - } - $rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr, - 'sesskey',$autoQuote = true); - - if (!$rs) { - ADOConnection::outp( ' --- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'

    ',false); - } else { - // bug in access driver (could be odbc?) means that info is not commited - // properly unless select statement executed in Win2000 - if ($ADODB_SESS_CONN->databaseType == 'access') - $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'"); - } - return !empty($rs); -} - -function adodb_sess_destroy($key) -{ - global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $ADODB_SESS_CONN->CommitTrans(); - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'"; - $rs = $ADODB_SESS_CONN->Execute($qry); - } - return $rs ? true : false; -} - -function adodb_sess_gc($maxlifetime) -{ - global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY; - - if ($ADODB_SESSION_EXPIRE_NOTIFY) { - reset($ADODB_SESSION_EXPIRE_NOTIFY); - $fn = next($ADODB_SESSION_EXPIRE_NOTIFY); - $savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM); - $t = time(); - $rs =& $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t"); - $ADODB_SESS_CONN->SetFetchMode($savem); - if ($rs) { - $ADODB_SESS_CONN->BeginTrans(); - while (!$rs->EOF) { - $ref = $rs->fields[0]; - $key = $rs->fields[1]; - $fn($ref,$key); - $del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'"); - $rs->MoveNext(); - } - $rs->Close(); - - $ADODB_SESS_CONN->CommitTrans(); - - } - } else { - $qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time(); - $ADODB_SESS_CONN->Execute($qry); - - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- Garbage Collection: $qry

    "); - } - // suggested by Cameron, "GaM3R" - if (defined('ADODB_SESSION_OPTIMIZE')) { - global $ADODB_SESSION_DRIVER; - - switch( $ADODB_SESSION_DRIVER ) { - case 'mysql': - case 'mysqlt': - $opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL; - break; - case 'postgresql': - case 'postgresql7': - $opt_qry = 'VACUUM '.$ADODB_SESSION_TBL; - break; - } - if (!empty($opt_qry)) { - $ADODB_SESS_CONN->Execute($opt_qry); - } - } - if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL; - else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL; - - $rs =& $ADODB_SESS_CONN->SelectLimit($sql,1); - if ($rs && !$rs->EOF) { - - $dbts = reset($rs->fields); - $rs->Close(); - $dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts); - $t = time(); - - if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) { - - $msg = - __FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)"; - error_log($msg); - if ($ADODB_SESS_DEBUG) ADOConnection::outp(" --- $msg

    "); - } - } - - return true; -} - -session_module_name('user'); -session_set_save_handler( - "adodb_sess_open", - "adodb_sess_close", - "adodb_sess_read", - "adodb_sess_write", - "adodb_sess_destroy", - "adodb_sess_gc"); -} - -/* TEST SCRIPT -- UNCOMMENT */ - -if (0) { - - session_start(); - session_register('AVAR'); - $_SESSION['AVAR'] += 1; - ADOConnection::outp( " --- \$_SESSION['AVAR']={$_SESSION['AVAR']}

    ",false); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/crypt.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/crypt.inc.php deleted file mode 100755 index 7266ab61..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/old/crypt.inc.php +++ /dev/null @@ -1,64 +0,0 @@ - -class MD5Crypt{ - function keyED($txt,$encrypt_key) - { - $encrypt_key = md5($encrypt_key); - $ctr=0; - $tmp = ""; - for ($i=0;$ikeyED($tmp,$key)); - } - - function Decrypt($txt,$key) - { - $txt = $this->keyED(base64_decode($txt),$key); - $tmp = ""; - for ($i=0;$i= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) - { - $randnumber = rand(48,120); - } - - $randomPassword .= chr($randnumber); - } - return $randomPassword; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema.xml deleted file mode 100755 index c0dd6ecd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - table for ADOdb session-management - - - session key - - - - - - - - - - - - - - - - - -
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema2.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema2.xml deleted file mode 100755 index b53da4cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/session/session_schema2.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - table for ADOdb session-management - - - session key - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/all-wcprops deleted file mode 100755 index 1e308920..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/all-wcprops +++ /dev/null @@ -1,179 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/tests -END -test-php5.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test-php5.php -END -xmlschema.xml -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/xmlschema.xml -END -benchmark.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/benchmark.php -END -test-datadict.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test-datadict.php -END -time.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/time.php -END -test-xmlschema.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test-xmlschema.php -END -testmssql.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testmssql.php -END -testdatabases.inc.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testdatabases.inc.php -END -testoci8cursor.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testoci8cursor.php -END -test2.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test2.php -END -testoci8.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testoci8.php -END -test3.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test3.php -END -testcache.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testcache.php -END -test4.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test4.php -END -test-active-recs2.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/tests/test-active-recs2.php -END -test5.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test5.php -END -test-active-record.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/tests/test-active-record.php -END -testpaging.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testpaging.php -END -testsessions.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testsessions.php -END -test-perf.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test-perf.php -END -client.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/client.php -END -test.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test.php -END -test_rs_array.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test_rs_array.php -END -test-pgblob.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/test-pgblob.php -END -pdo.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/pdo.php -END -tmssql.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/tmssql.php -END -testgenid.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testgenid.php -END -testpear.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/tests/testpear.php -END -xmlschema-mssql.xml -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/tests/xmlschema-mssql.xml -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/entries deleted file mode 100755 index 4e83b943..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/entries +++ /dev/null @@ -1,405 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/tests -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T11:01:00.000000Z -351 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -test-php5.php -file - - - - -2008-02-29T14:57:51.723818Z -5efd6ca0d817a8b81ffa57be78189cbb -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -xmlschema.xml -file - - - - -2008-02-29T14:57:51.755060Z -d0b48b1134ab6aff026753d6b684948e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -benchmark.php -file - - - - -2008-02-29T14:57:51.739439Z -fd364bd9669f206c8723527add79e6d1 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test-datadict.php -file - - - - -2008-02-29T14:57:51.723818Z -c634ae92f3ace78b480afbd576292cd9 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -time.php -file - - - - -2008-02-29T14:57:51.755060Z -b4abe0baf0e57ecdda8a3dbbdf851b43 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test-xmlschema.php -file - - - - -2008-02-29T14:57:51.755060Z -c64f9923dda687bb398a44ceb708197a -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testmssql.php -file - - - - -2008-02-29T14:57:51.786301Z -4149b8c25fc7ec87376e301a1429e57e -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testdatabases.inc.php -file - - - - -2008-02-29T14:57:51.770680Z -91b67a72c9c6ef22726518a3ae8a7192 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testoci8cursor.php -file - - - - -2008-02-29T14:57:51.786301Z -32351b3d7ba6ddc199a29aa96e70249c -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test2.php -file - - - - -2008-02-29T14:57:51.786301Z -24ae36f4587ffdc6f76b0ae0c3d72ed8 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testoci8.php -file - - - - -2008-02-29T14:57:51.801921Z -1569699c191160e52acb62cdb6c03bb3 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test3.php -file - - - - -2008-02-29T14:57:51.801921Z -b005accd57850b513bedcd31bc05cf82 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testcache.php -file - - - - -2008-02-29T14:57:51.817542Z -6e3e1d38b42eb9ae696c4759231dd283 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test4.php -file - - - - -2008-02-29T14:57:51.817542Z -9334ccc107abd581c5984bc5ec30cd59 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test5.php -file - - - - -2008-02-29T14:57:51.833163Z -5282e0911d13b03d0b59e65bfc604666 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test-active-recs2.php -file - - - - -2008-02-29T14:57:51.833163Z -2f5ec8df77acaa27e323fe5f8dc3a0a7 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -test-active-record.php -file - - - - -2008-02-29T14:57:51.848783Z -9d06f390e480a588481846be34627791 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -testpaging.php -file - - - - -2008-02-29T14:57:51.848783Z -b3b39ee20c814796d70c2f37125e6876 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testsessions.php -file - - - - -2008-02-29T14:57:51.864404Z -cbc3530937347f4840b1b1baa5e62580 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test-perf.php -file - - - - -2008-02-29T14:57:51.864404Z -f236fe5f53122abae94425fc876895df -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -client.php -file - - - - -2008-02-29T14:57:51.864404Z -bcce85a3d9094fff9faae4d2f5285c10 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test.php -file - - - - -2008-02-29T14:57:51.880024Z -09a9b0f52bbf9123386c31545932eb97 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test_rs_array.php -file - - - - -2008-02-29T14:57:51.895645Z -1ccf2778737a7c41eab84989e464a642 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -test-pgblob.php -file - - - - -2008-02-29T14:57:51.895645Z -62b6b5f397babd852597f9d9ec5749fe -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -pdo.php -file - - - - -2008-02-29T14:57:51.911266Z -96889719b7a1986861ab240e6ad17dd7 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -tmssql.php -file - - - - -2008-02-29T14:57:51.911266Z -3d7a43b2eb78e4442b082da5a04e42b7 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testgenid.php -file - - - - -2008-02-29T14:57:51.926886Z -43b1b8d4481f44115549396427d89101 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -testpear.php -file - - - - -2008-02-29T14:57:51.926886Z -b2aac184c60c326766fd87c3e1b995f5 -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -xmlschema-mssql.xml -file - - - - -2008-02-29T14:57:51.926886Z -38cd368e4ecfc7cf00a5700ed421f8a9 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/benchmark.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/benchmark.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/benchmark.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/client.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/client.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/client.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/pdo.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/pdo.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/pdo.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-record.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-record.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-record.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-recs2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-recs2.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-active-recs2.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-datadict.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-datadict.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-datadict.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-perf.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-perf.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-perf.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-pgblob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-pgblob.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-pgblob.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-php5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-php5.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-php5.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-xmlschema.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-xmlschema.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test-xmlschema.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test2.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test2.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test3.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test3.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test4.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test4.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test4.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test5.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test5.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test_rs_array.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test_rs_array.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/test_rs_array.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testcache.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testcache.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testcache.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testdatabases.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testdatabases.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testdatabases.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testgenid.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testgenid.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testgenid.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testmssql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testmssql.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testmssql.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8cursor.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8cursor.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testoci8cursor.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpaging.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpaging.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpaging.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpear.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpear.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testpear.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testsessions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testsessions.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/testsessions.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/time.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/time.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/time.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/tmssql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/tmssql.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/tmssql.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema-mssql.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema-mssql.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema-mssql.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/prop-base/xmlschema.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/benchmark.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/benchmark.php.svn-base deleted file mode 100755 index ccdbdcee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/benchmark.php.svn-base +++ /dev/null @@ -1,84 +0,0 @@ - - - - - ADODB Benchmarks - - - -ADODB Version: $ADODB_version Host: $db->host   Database: $db->database"; - - // perform query once to cache results so we are only testing throughput - $rs = $db->Execute($sql); - if (!$rs){ - print "Error in recordset

    "; - return; - } - $arr = $rs->GetArray(); - //$db->debug = true; - global $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $start = microtime(); - for ($i=0; $i < $max; $i++) { - $rs =& $db->Execute($sql); - $arr =& $rs->GetArray(); - // print $arr[0][1]; - } - $end = microtime(); - $start = explode(' ',$start); - $end = explode(' ',$end); - - //print_r($start); - //print_r($end); - - // print_r($arr); - $total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]); - printf ("

    seconds = %8.2f for %d iterations each with %d records

    ",$total,$max, sizeof($arr)); - flush(); - - - //$db->Close(); -} -include("testdatabases.inc.php"); - -?> - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/client.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/client.php.svn-base deleted file mode 100755 index b1e4fb26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/client.php.svn-base +++ /dev/null @@ -1,198 +0,0 @@ - - -'; - var_dump(parse_url('odbc_mssql://userserver/')); - die(); - -include('../adodb.inc.php'); -include('../tohtml.inc.php'); - - function &send2server($url,$sql) - { - $url .= '?sql='.urlencode($sql); - print "

    $url

    "; - $rs = csv2rs($url,$err); - if ($err) print $err; - return $rs; - } - - function print_pre($s) - { - print "
    ";print_r($s);print "
    "; - } - - -$serverURL = 'http://localhost/php/phplens/adodb/server.php'; -$testhttp = false; - -$sql1 = "insertz into products (productname) values ('testprod 1')"; -$sql2 = "insert into products (productname) values ('testprod 1')"; -$sql3 = "insert into products (productname) values ('testprod 2')"; -$sql4 = "delete from products where productid>80"; -$sql5 = 'select * from products'; - -if ($testhttp) { - print "Client Driver Tests

    "; - print "

    Test Error

    "; - $rs = send2server($serverURL,$sql1); - print_pre($rs); - print "
    "; - - print "

    Test Insert

    "; - - $rs = send2server($serverURL,$sql2); - print_pre($rs); - print "
    "; - - print "

    Test Insert2

    "; - - $rs = send2server($serverURL,$sql3); - print_pre($rs); - print "
    "; - - print "

    Test Delete

    "; - - $rs = send2server($serverURL,$sql4); - print_pre($rs); - print "
    "; - - - print "

    Test Select

    "; - $rs = send2server($serverURL,$sql5); - if ($rs) rs2html($rs); - - print "
    "; -} - - -print "

    CLIENT Driver Tests

    "; -$conn = ADONewConnection('csv'); -$conn->Connect($serverURL); -$conn->debug = true; - -print "

    Bad SQL

    "; - -$rs = $conn->Execute($sql1); - -print "

    Insert SQL 1

    "; -$rs = $conn->Execute($sql2); - -print "

    Insert SQL 2

    "; -$rs = $conn->Execute($sql3); - -print "

    Select SQL

    "; -$rs = $conn->Execute($sql5); -if ($rs) rs2html($rs); - -print "

    Delete SQL

    "; -$rs = $conn->Execute($sql4); - -print "

    Select SQL

    "; -$rs = $conn->Execute($sql5); -if ($rs) rs2html($rs); - - -/* EXPECTED RESULTS FOR HTTP TEST: - -Test Insert -http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => insert into products (productname) values ('testprod') - [affectedrows] => 1 - [insertid] => 81 -) - - --------------------------------------------------------------------------------- - -Test Insert2 -http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => insert into products (productname) values ('testprod') - [affectedrows] => 1 - [insertid] => 82 -) - - --------------------------------------------------------------------------------- - -Test Delete -http://localhost/php/adodb/server.php?sql=delete+from+products+where+productid%3E80 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => delete from products where productid>80 - [affectedrows] => 2 - [insertid] => 0 -) - -[more stuff deleted] - . - . - . -*/ -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/pdo.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/pdo.php.svn-base deleted file mode 100755 index 5001cb0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/pdo.php.svn-base +++ /dev/null @@ -1,94 +0,0 @@ -"; -try { - echo "New Connection\n"; - - - $dsn = 'pdo_mysql://root:@localhost/northwind?persist'; - - if (!empty($dsn)) { - $DB =& NewADOConnection($dsn) || die("CONNECT FAILED"); - $connstr = $dsn; - } else { - - $DB = NewADOConnection('pdo'); - - echo "Connect\n"; - - $u = ''; $p = ''; - /* - $connstr = 'odbc:nwind'; - - $connstr = 'oci:'; - $u = 'scott'; - $p = 'natsoft'; - - - $connstr ="sqlite:d:\inetpub\adodb\sqlite.db"; - */ - - $connstr = "mysql:dbname=northwind"; - $u = 'root'; - - $connstr = "pgsql:dbname=test"; - $u = 'tester'; - $p = 'test'; - - $DB->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - } - - echo "connection string=$connstr\n Execute\n"; - - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $DB->Execute("select * from ADOXYZ where id<3"); - if ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n"; - - - //print_r(get_class_methods($DB->_stmt)); - - if (!$rs) die("NO RS"); - - echo "Meta\n"; - for ($i=0; $i < $rs->NumCols(); $i++) { - var_dump($rs->FetchField($i)); - echo "
    "; - } - - echo "FETCH\n"; - $cnt = 0; - while (!$rs->EOF) { - adodb_pr($rs->fields); - $rs->MoveNext(); - if ($cnt++ > 1000) break; - } - - echo "
    --------------------------------------------------------
    \n\n\n"; - - $stmt = $DB->PrepareStmt("select * from ADOXYZ"); - - $rs = $stmt->Execute(); - $cols = $stmt->NumCols(); // execute required - - echo "COLS = $cols"; - for($i=1;$i<=$cols;$i++) { - $v = $stmt->_stmt->getColumnMeta($i); - var_dump($v); - } - - echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n"; - while ($arr = $rs->FetchRow()) { - adodb_pr($arr); - } - die("DONE\n"); - -} catch (exception $e) { - echo "
    ";
    -	echo $e;
    -	echo "
    "; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-record.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-record.php.svn-base deleted file mode 100755 index 79a06ee0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-record.php.svn-base +++ /dev/null @@ -1,82 +0,0 @@ -= 5) { - include('../adodb-exceptions.inc.php'); - echo "

    Exceptions included

    "; - } - } - - $db = NewADOConnection('mysql://root@localhost/northwind'); - $db->debug=1; - ADOdb_Active_Record::SetDatabaseAdapter($db); - - $db->Execute("CREATE TEMPORARY TABLE `persons` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name_first` varchar(100) NOT NULL default '', - `name_last` varchar(100) NOT NULL default '', - `favorite_color` varchar(100) NOT NULL default '', - PRIMARY KEY (`id`) - ) ENGINE=MyISAM; - "); - - class Person extends ADOdb_Active_Record{} - $person = new Person(); - - echo "

    Output of getAttributeNames: "; - var_dump($person->getAttributeNames()); - - /** - * Outputs the following: - * array(4) { - * [0]=> - * string(2) "id" - * [1]=> - * string(9) "name_first" - * [2]=> - * string(8) "name_last" - * [3]=> - * string(13) "favorite_color" - * } - */ - - $person = new Person(); - $person->name_first = 'Andi'; - $person->name_last = 'Gutmans'; - $person->save(); // this save() will fail on INSERT as favorite_color is a must fill... - - - $person = new Person(); - $person->name_first = 'Andi'; - $person->name_last = 'Gutmans'; - $person->favorite_color = 'blue'; - $person->save(); // this save will perform an INSERT successfully - - echo "

    The Insert ID generated:"; print_r($person->id); - - $person->favorite_color = 'red'; - $person->save(); // this save() will perform an UPDATE - - $person = new Person(); - $person->name_first = 'John'; - $person->name_last = 'Lim'; - $person->favorite_color = 'lavender'; - $person->save(); // this save will perform an INSERT successfully - - // load record where id=2 into a new ADOdb_Active_Record - $person2 = new Person(); - $person2->Load('id=2'); - - var_dump($person2); - - $activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2)); - $person2 =& $activeArr[0]; - echo "

    Name (should be John): ",$person->name_first, "
    Class (should be Person): ",get_class($person2); - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-recs2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-recs2.php.svn-base deleted file mode 100755 index 72168d80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-active-recs2.php.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -Connect("localhost","tester","test","test"); -} else - $db = NewADOConnection('oci8://scott:natsoft@/'); - - -$arr = $db->ServerInfo(); -echo "

    $db->dataProvider: {$arr['description']}

    "; - -$arr = $db->GetActiveRecords('products',' productid<10'); -adodb_pr($arr); - -ADOdb_Active_Record::SetDatabaseAdapter($db); -if (!$db) die('failed'); - - - - -$rec = new ADODB_Active_Record('photos'); - -$rec = new ADODB_Active_Record('products'); - - -adodb_pr($rec->getAttributeNames()); - -echo "
    "; - - -$rec->load('productid=2'); -adodb_pr($rec); - -$db->debug=1; - - -$rec->productname = 'Changie Chan'.rand(); - -$rec->insert(); -$rec->update(); - -$rec->productname = 'Changie Chan 99'; -$rec->replace(); - - -$rec2 = new ADODB_Active_Record('products'); -$rec->load('productid=3'); -$rec->save(); - -$rec = new ADODB_Active_record('products'); -$rec->productname = 'John ActiveRec'; -$rec->notes = 22; -#$rec->productid=0; -$rec->discontinued=1; -$rec->Save(); -$rec->supplierid=33; -$rec->Save(); -$rec->discontinued=0; -$rec->Save(); -$rec->Delete(); - -echo "

    Affected Rows after delete=".$db->Affected_Rows()."

    "; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-datadict.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-datadict.php.svn-base deleted file mode 100755 index ed7cdb96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-datadict.php.svn-base +++ /dev/null @@ -1,248 +0,0 @@ -$dbType

    "; - $db = NewADOConnection($dbType); - $dict = NewDataDictionary($db); - - if (!$dict) continue; - $dict->debug = 1; - - $opts = array('REPLACE','mysql' => 'ENGINE=INNODB', 'oci8' => 'TABLESPACE USERS'); - -/* $flds = array( - array('id', 'I', - 'AUTO','KEY'), - - array('name' => 'firstname', 'type' => 'varchar','size' => 30, - 'DEFAULT'=>'Joan'), - - array('lastname','varchar',28, - 'DEFAULT'=>'Chen','key'), - - array('averylonglongfieldname','X',1024, - 'NOTNULL','default' => 'test'), - - array('price','N','7.2', - 'NOTNULL','default' => '0.00'), - - array('MYDATE', 'D', - 'DEFDATE'), - array('TS','T', - 'DEFTIMESTAMP') - );*/ - - $flds = " -ID I AUTO KEY, -FIRSTNAME VARCHAR(30) DEFAULT 'Joan' INDEX idx_name, -LASTNAME VARCHAR(28) DEFAULT 'Chen' key INDEX idx_name, -averylonglongfieldname X(1024) DEFAULT 'test', -price N(7.2) DEFAULT '0.00', -MYDATE D DEFDATE INDEX idx_date, -BIGFELLOW X NOTNULL, -TS T DEFTIMESTAMP"; - - - $sqla = $dict->CreateDatabase('KUTU',array('postgres'=>"LOCATION='/u01/postdata'")); - $dict->SetSchema('KUTU'); - - $sqli = ($dict->CreateTableSQL('testtable',$flds, $opts)); - $sqla = array_merge($sqla,$sqli); - - $sqli = $dict->CreateIndexSQL('idx','testtable','price,firstname,lastname',array('BITMAP','FULLTEXT','CLUSTERED','HASH')); - $sqla = array_merge($sqla,$sqli); - $sqli = $dict->CreateIndexSQL('idx2','testtable','price,lastname');//,array('BITMAP','FULLTEXT','CLUSTERED')); - $sqla = array_merge($sqla,$sqli); - - $addflds = array(array('height', 'F'),array('weight','F')); - $sqli = $dict->AddColumnSQL('testtable',$addflds); - $sqla = array_merge($sqla,$sqli); - $addflds = array(array('height', 'F','NOTNULL'),array('weight','F','NOTNULL')); - $sqli = $dict->AlterColumnSQL('testtable',$addflds); - $sqla = array_merge($sqla,$sqli); - - - printsqla($dbType,$sqla); - - if (file_exists('d:\inetpub\wwwroot\php\phplens\adodb\adodb.inc.php')) - if ($dbType == 'mysqlt') { - $db->Connect('localhost', "root", "", "test"); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - if ($dbType == 'postgres') { - if (@$db->Connect('localhost', "tester", "test", "test")); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - - if ($dbType == 'odbc_mssql') { - $dsn = $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=localhost;Database=northwind;"; - if (@$db->Connect($dsn, "sa", "natsoft", "test")); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - - - - adodb_pr($dict->databaseType); - printsqla($dbType, $dict->DropColumnSQL('table',array('my col','`col2_with_Quotes`','A_col3','col3(10)'))); - printsqla($dbType, $dict->ChangeTableSQL('adoxyz','LASTNAME varchar(32)')); - -} - -function printsqla($dbType,$sqla) -{ - print "

    ";
    -	//print_r($dict->MetaTables());
    -	foreach($sqla as $s) {
    -		$s = htmlspecialchars($s);
    -		print "$s;\n";
    -		if ($dbType == 'oci8') print "/\n";
    -	}
    -	print "

    "; -} - -/*** - -Generated SQL: - -mysql - -CREATE DATABASE KUTU; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id INTEGER NOT NULL AUTO_INCREMENT, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) NOT NULL DEFAULT 'Chen', -averylonglongfieldname LONGTEXT NOT NULL, -price NUMERIC(7,2) NOT NULL DEFAULT 0.00, -MYDATE DATE DEFAULT CURDATE(), - PRIMARY KEY (id, lastname) -)TYPE=ISAM; -CREATE FULLTEXT INDEX idx ON KUTU.testtable (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD height DOUBLE; -ALTER TABLE KUTU.testtable ADD weight DOUBLE; -ALTER TABLE KUTU.testtable MODIFY COLUMN height DOUBLE NOT NULL; -ALTER TABLE KUTU.testtable MODIFY COLUMN weight DOUBLE NOT NULL; - - --------------------------------------------------------------------------------- - -oci8 - -CREATE USER KUTU IDENTIFIED BY tiger; -/ -GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO KUTU; -/ -DROP TABLE KUTU.testtable CASCADE CONSTRAINTS; -/ -CREATE TABLE KUTU.testtable ( -id NUMBER(16) NOT NULL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname CLOB NOT NULL, -price NUMBER(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATE DEFAULT TRUNC(SYSDATE), - PRIMARY KEY (id, lastname) -)TABLESPACE USERS; -/ -DROP SEQUENCE KUTU.SEQ_testtable; -/ -CREATE SEQUENCE KUTU.SEQ_testtable; -/ -CREATE OR REPLACE TRIGGER KUTU.TRIG_SEQ_testtable BEFORE insert ON KUTU.testtable - FOR EACH ROW - BEGIN - select KUTU.SEQ_testtable.nextval into :new.id from dual; - END; -/ -CREATE BITMAP INDEX idx ON KUTU.testtable (firstname,lastname); -/ -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -/ -ALTER TABLE testtable ADD ( - height NUMBER, - weight NUMBER); -/ -ALTER TABLE testtable MODIFY( - height NUMBER NOT NULL, - weight NUMBER NOT NULL); -/ - - --------------------------------------------------------------------------------- - -postgres -AlterColumnSQL not supported for PostgreSQL - - -CREATE DATABASE KUTU LOCATION='/u01/postdata'; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id SERIAL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname TEXT NOT NULL, -price NUMERIC(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATE DEFAULT CURRENT_DATE, - PRIMARY KEY (id, lastname) -); -CREATE INDEX idx ON KUTU.testtable USING HASH (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD height FLOAT8; -ALTER TABLE KUTU.testtable ADD weight FLOAT8; - - --------------------------------------------------------------------------------- - -odbc_mssql - -CREATE DATABASE KUTU; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id INT IDENTITY(1,1) NOT NULL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname TEXT NOT NULL, -price NUMERIC(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATETIME DEFAULT GetDate(), - PRIMARY KEY (id, lastname) -); -CREATE CLUSTERED INDEX idx ON KUTU.testtable (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD - height REAL, - weight REAL; -ALTER TABLE KUTU.testtable ALTER COLUMN height REAL NOT NULL; -ALTER TABLE KUTU.testtable ALTER COLUMN weight REAL NOT NULL; - - --------------------------------------------------------------------------------- -*/ - - -echo "

    Test XML Schema

    "; -$ff = file('xmlschema.xml'); -echo "
    ";
    -foreach($ff as $xml) echo htmlspecialchars($xml);
    -echo "
    "; -include_once('test-xmlschema.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-perf.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-perf.php.svn-base deleted file mode 100755 index bdeae281..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-perf.php.svn-base +++ /dev/null @@ -1,50 +0,0 @@ - $v) { - if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k; - } -} - -if (isset($_SESSION['_db'])) { - $_db = $_SESSION['_db']; - $_GET[$_db] = 1; - $$_db = 1; -} - -echo "

    Performance Monitoring

    "; -include_once('testdatabases.inc.php'); - - -function testdb($db) -{ - if (!$db) return; - echo "";print_r($db->ServerInfo()); echo " user=".$db->user.""; - - $perf = NewPerfMonitor($db); - - # unit tests - if (0) { - //$DB->debug=1; - echo "Data Cache Size=".$perf->DBParameter('data cache size').'

    '; - echo $perf->HealthCheck(); - echo($perf->SuspiciousSQL()); - echo($perf->ExpensiveSQL()); - echo($perf->InvalidSQL()); - echo $perf->Tables(); - - echo "

    ";
    -		echo $perf->HealthCheckCLI();
    -		$perf->Poll(3);
    -		die();
    -	}
    -	
    -	if ($perf) $perf->UI(3);
    -}
    - 
    -?>
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-pgblob.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-pgblob.php.svn-base
    deleted file mode 100755
    index c190e5b8..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-pgblob.php.svn-base	
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -Param(false);
    -		$x = (rand() % 10) + 1;
    -		$db->debug= ($i==1);
    -		$id = $db->GetOne($sql,
    -			array('Z%','Z%',$x));
    -		if($id != $offset+$x) {
    -			print "

    Error at $x"; - break; - } - } -} - -include_once('../adodb.inc.php'); -$db = NewADOConnection('postgres7'); -$db->PConnect('localhost','tester','test','test') || die("failed connection"); - -$enc = "GIF89a%01%00%01%00%80%FF%00%C0%C0%C0%00%00%00%21%F9%04%01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%01%012%00%3Bt_clear.gif%0D"; -$val = rawurldecode($enc); - -$MAX = 1000; - -adodb_pr($db->ServerInfo()); - -echo "

    Testing PREPARE/EXECUTE PLAN

    "; - - -$db->_bindInputArray = true; // requires postgresql 7.3+ and ability to modify database -$t = getmicrotime(); -doloop(); -echo '

    ',$MAX,' times, with plan=',getmicrotime() - $t,'

    '; - - -$db->_bindInputArray = false; -$t = getmicrotime(); -doloop(); -echo '

    ',$MAX,' times, no plan=',getmicrotime() - $t,'

    '; - - - -echo "

    Testing UPDATEBLOB

    "; -$db->debug=1; - -### TEST BEGINS - -$db->Execute("insert into photos (id,name) values(9999,'dot.gif')"); -$db->UpdateBlob('photos','photo',$val,'id=9999'); -$v = $db->GetOne('select photo from photos where id=9999'); - - -### CLEANUP - -$db->Execute("delete from photos where id=9999"); - -### VALIDATION - -if ($v !== $val) echo "*** ERROR: Inserted value does not match downloaded val"; -else echo "*** OK: Passed"; - -echo "
    ";
    -echo "INSERTED: ", $enc;
    -echo "
    "; -echo"RETURNED: ", rawurlencode($v); -echo "

    "; -echo "INSERTED: ", $val; -echo "


    "; -echo "RETURNED: ", $v; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-php5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-php5.php.svn-base deleted file mode 100755 index f8fb3511..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-php5.php.svn-base +++ /dev/null @@ -1,108 +0,0 @@ -PHP ".PHP_VERSION."\n"; -try { - -$dbt = 'mysql'; - -try { -switch($dbt) { -case 'oci8po': - $db = NewADOConnection("oci8po"); - - $db->Connect('','scott','natsoft'); - break; -default: -case 'mysql': - $db = NewADOConnection("mysql"); - $db->Connect('localhost','root','','northwind'); - break; - -case 'mysqli': - $db = NewADOConnection("mysqli://root:@localhost/northwind"); - //$db->Connect('localhost','root','','test'); - break; -} -} catch (exception $e){ - echo "Connect Failed"; - adodb_pr($e); - die(); -} - -$db->debug=1; - -$cnt = $db->GetOne("select count(*) from adoxyz where ?Prepare("select * from adoxyz where ?ErrorMsg(),"\n"; -$rs = $db->Execute($stmt,array(10,20)); - -echo "
    Foreach Iterator Test (rand=".rand().")
    "; -$i = 0; -foreach($rs as $v) { - $i += 1; - echo "rec $i: "; $s1 = adodb_pr($v,true); $s2 = adodb_pr($rs->fields,true); - if ($s1 != $s2 && !empty($v)) {adodb_pr($s1); adodb_pr($s2);} - else echo "passed
    "; - flush(); -} - - -if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n"); -else echo "Count $i is correct
    "; - -$rs = $db->Execute("select bad from badder"); - -} catch (exception $e) { - adodb_pr($e); - echo "

    adodb_backtrace:

    \n"; - $e = adodb_backtrace($e->gettrace()); -} - -$rs = $db->Execute("select distinct id, firstname,lastname from adoxyz order by id"); -echo "Result=\n",$rs,"

    "; - -echo "

    Active Record

    "; -try { - include_once("../adodb-active-record.inc.php"); - class City extends ADOdb_Active_Record{}; - $a = new City(); - -} catch(exception $e){ - echo $e->getMessage(); -} - -try { - - ADOdb_Active_Record::SetDatabaseAdapter($db); - $a = new City(); - - echo "

    Successfully created City()
    "; - var_dump($a->GetPrimaryKeys()); - $a->city = 'Kuala Lumpur'; - $a->Save(); - $a->Update(); - $a->SetPrimaryKeys(array('city')); - $a->country = "M'sia"; - $a->save(); - $a->Delete(); -} catch(exception $e){ - echo $e->getMessage(); -} - -include_once("test-active-record.php"); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-xmlschema.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-xmlschema.php.svn-base deleted file mode 100755 index 2d15c111..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test-xmlschema.php.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -Connect( 'localhost', 'root', '', 'test' ) || die('fail connect1'); - -// To create a schema object and build the query array. -$schema = new adoSchema( $db ); - -// To upgrade an existing schema object, use the following -// To upgrade an existing database to the provided schema, -// uncomment the following line: -#$schema->upgradeSchema(); - -print "SQL to build xmlschema.xml:\n

    ";
    -// Build the SQL array
    -$sql = $schema->ParseSchema( "xmlschema.xml" );
    -
    -var_dump( $sql );
    -print "
    \n"; - -// Execute the SQL on the database -//$result = $schema->ExecuteSchema( $sql ); - -// Finally, clean up after the XML parser -// (PHP won't do this for you!) -//$schema->Destroy(); - - - -print "SQL to build xmlschema-mssql.xml:\n
    ";
    -
    -$db2 = ADONewConnection('mssql');
    -$db2->Connect('','adodb','natsoft','northwind') || die("Fail 2");
    -
    -$db2->Execute("drop table simple_table");
    -
    -$schema = new adoSchema( $db2 );
    -$sql = $schema->ParseSchema( "xmlschema-mssql.xml" );
    -
    -print_r( $sql );
    -print "
    \n"; - -$db2->debug=1; - -foreach ($sql as $s) -$db2->Execute($s); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test.php.svn-base deleted file mode 100755 index 149c08ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test.php.svn-base +++ /dev/null @@ -1,1743 +0,0 @@ -$msg

    "; - flush(); -} - -function CheckWS($conn) -{ -global $ADODB_EXTENSION; - - include_once('../session/adodb-session.php'); - if (defined('CHECKWSFAIL')){ echo " TESTING $conn ";flush();} - $saved = $ADODB_EXTENSION; - $db = ADONewConnection($conn); - $ADODB_EXTENSION = $saved; - if (headers_sent()) { - print "

    White space detected in adodb-$conn.inc.php or include file...

    "; - //die(); - } -} - -function do_strtolower(&$arr) -{ - foreach($arr as $k => $v) { - if (is_object($v)) $arr[$k] = adodb_pr($v,true); - else $arr[$k] = strtolower($v); - } -} - - -function CountExecs($db, $sql, $inputarray) -{ -global $EXECS; $EXECS++; -} - -function CountCachedExecs($db, $secs2cache, $sql, $inputarray) -{ -global $CACHED; $CACHED++; -} - -// the table creation code is specific to the database, so we allow the user -// to define their own table creation stuff - -function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)") -{ -GLOBAL $ADODB_vers,$ADODB_CACHE_DIR,$ADODB_FETCH_MODE,$ADODB_COUNTRECS; - - //adodb_pr($db); - -?>
    -

    -
     
    -

    -Execute('select lastname,firstname,lastname,id from ADOXYZ'); - $arr = $rs->GetAssoc(); - echo "
    ";print_r($arr);
    -	die();*/
    -	
    -	if (!$db) die("testdb: database not inited");
    -	GLOBAL $EXECS, $CACHED;
    -	
    -	$EXECS = 0;
    -	$CACHED = 0;
    -	//$db->Execute("drop table adodb_logsql");
    -	if ((rand()%3) == 0) @$db->Execute("delete from adodb_logsql");
    -	$db->debug=1;
    -	
    -	$db->fnExecute = 'CountExecs';
    -	$db->fnCacheExecute = 'CountCachedExecs';
    -	
    -	if (empty($_GET['nolog'])) {
    -		echo "

    SQL Logging enabled

    "; - $db->LogSQL();/* - $sql = -"SELECT t1.sid, t1.sid, t1.title, t1.hometext, t1.notes, t1.aid, t1.informant, -t2.url, t2.email, t1.catid, t3.title, t1.topic, t4.topicname, t4.topicimage, -t4.topictext, t1.score, t1.ratings, t1.counter, t1.comments, t1.acomm -FROM `nuke_stories` `t1`, `nuke_authors` `t2`, `nuke_stories_cat` `t3`, `nuke_topics` `t4` - WHERE ((t2.aid=t1.aid) AND (t3.catid=t1.catid) AND (t4.topicid=t1.topic) - AND ((t1.alanguage='german') OR (t1.alanguage='')) AND (t1.ihome='0')) - ORDER BY t1.time DESC"; - $db->SelectLimit($sql); - echo $db->ErrorMsg();*/ - } - $ADODB_CACHE_DIR = dirname(TempNam('/tmp','testadodb')); - $db->debug = false; - //print $db->UnixTimeStamp('2003-7-22 23:00:00'); - - $phpv = phpversion(); - if (defined('ADODB_EXTENSION')) $ext = '   Extension '.ADODB_EXTENSION.' installed'; - else $ext = ''; - print "

    ADODB Version: $ADODB_vers Host: $db->host   Database: $db->database   PHP: $phpv $ext

    "; - - flush(); - - if (function_exists('date_default_timezone_set')) date_default_timezone_set('Asia/Kuala_Lumpur'); - - $arr = $db->ServerInfo(); - print_r($arr); - echo E_ALL,' ',E_STRICT, "
    "; - $e = error_reporting(E_ALL | E_STRICT); - echo error_reporting(),'

    '; - flush(); - #$db->debug=1; - $tt = $db->Time(); - if ($tt == 0) echo '
    $db->Time failed'; - else echo "
    db->Time: ".date('d-m-Y H:i:s',$tt); - echo '
    '; - - echo "Date=",$db->UserDate('2002-04-07'),'
    '; - print "date1 (1969-02-20) = ".$db->DBDate('1969-2-20'); - print "
    date1 (1999-02-20) = ".$db->DBDate('1999-2-20'); - print "
    date1.1 1999 = ".$db->DBDate("'1999'"); - print "
    date2 (1970-1-2) = ".$db->DBDate(24*3600)."

    "; - print "ts1 (1999-02-20 13:40:50) = ".$db->DBTimeStamp('1999-2-20 1:40:50 pm'); - print "
    ts1.1 (1999-02-20 13:40:00) = ".$db->DBTimeStamp('1999-2-20 13:40'); - print "
    ts2 (1999-02-20) = ".$db->DBTimeStamp('1999-2-20'); - print "
    ts3 (1970-1-2 +/- timezone) = ".$db->DBTimeStamp(24*3600); - print "
    Fractional TS (1999-2-20 13:40:50.91): ".$db->DBTimeStamp($db->UnixTimeStamp('1999-2-20 13:40:50.91+1')); - $dd = $db->UnixDate('1999-02-20'); - print "
    unixdate 1999-02-20 = ".date('Y-m-d',$dd)."

    "; - print "
    ts4 =".($db->UnixTimeStamp("19700101000101")+8*3600); - print "
    ts5 =".$db->DBTimeStamp($db->UnixTimeStamp("20040110092123")); - print "
    ts6 =".$db->UserTimeStamp("20040110092123"); - print "
    ts7 =".$db->DBTimeStamp("20040110092123"); - flush(); - // mssql too slow in failing bad connection - if (false && $db->databaseType != 'mssql') { - print "

    Testing bad connection. Ignore following error msgs:
    "; - $db2 = ADONewConnection(); - $rez = $db2->Connect("bad connection"); - $err = $db2->ErrorMsg(); - print "Error='$err'

    "; - if ($rez) print "Cannot check if connection failed. The Connect() function returned true.

    "; - } - #error_reporting($e); - flush(); - - //$ADODB_COUNTRECS=false; - $rs=$db->Execute('select * from ADOXYZ order by id'); - if($rs === false) $create = true; - else $rs->Close(); - - //if ($db->databaseType !='vfp') $db->Execute("drop table ADOXYZ"); - - if ($create) { - if (false && $db->databaseType == 'ibase') { - print "Please create the following table for testing:

    $createtab

    "; - return; - } else { - $db->debug = 99; - # $e = error_reporting(E_ALL-E_WARNING); - $db->Execute($createtab); - # error_reporting($e); - } - } - #error_reporting(E_ALL); - echo "

    Testing Metatypes

    "; - $t = $db->MetaType('varchar'); - if ($t != 'C') Err("Bad Metatype for varchar"); - - $rs = $db->Execute("delete from ADOXYZ"); // some ODBC drivers will fail the drop so we delete - if ($rs) { - if(! $rs->EOF) print "Error: RecordSet returned by Execute('delete...') should show EOF

    "; - $rs->Close(); - } else print "err=".$db->ErrorMsg(); - - print "

    Test select on empty table, FetchField when EOF, and GetInsertSQL

    "; - $rs = $db->Execute("select id,firstname from ADOXYZ where id=9999"); - if ($rs && !$rs->EOF) print "Error: RecordSet returned by Execute(select...') on empty table should show EOF

    "; - if ($rs->EOF && (($ox = $rs->FetchField(0)) && !empty($ox->name))) { - $record['id'] = 99; - $record['firstname'] = 'John'; - $sql = $db->GetInsertSQL($rs, $record); - if (strtoupper($sql) != strtoupper("INSERT INTO ADOXYZ ( id, firstname ) VALUES ( 99, 'John' )")) Err("GetInsertSQL does not work on empty table: $sql"); - } else { - Err("FetchField does not work on empty recordset, meaning GetInsertSQL will fail..."); - } - if ($rs) $rs->Close(); - flush(); - //$db->debug=true; - print "

    Testing Commit: "; - $time = $db->DBDate(time()); - if (!$db->BeginTrans()) { - print 'Transactions not supported

    '; - if ($db->hasTransactions) Err("hasTransactions should be false"); - } else { /* COMMIT */ - if (!$db->hasTransactions) Err("hasTransactions should be true"); - if ($db->transCnt != 1) Err("Invalid transCnt = $db->transCnt (should be 1)"); - $rs = $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (99,'Should Not','Exist (Commit)',$time)"); - if ($rs && $db->CommitTrans()) { - $rs->Close(); - $rs = $db->Execute("select * from ADOXYZ where id=99"); - if ($rs === false || $rs->EOF) { - print 'Data not saved

    '; - $rs = $db->Execute("select * from ADOXYZ where id=99"); - print_r($rs); - die(); - } else print 'OK

    '; - if ($rs) $rs->Close(); - } else { - if (!$rs) { - print "Insert failed

    "; - $db->RollbackTrans(); - } else print "Commit failed

    "; - } - if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)"); - - /* ROLLBACK */ - if (!$db->BeginTrans()) print "

    Error in BeginTrans()

    "; - print "

    Testing Rollback: "; - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (100,'Should Not','Exist (Rollback)',$time)"); - if ($db->RollbackTrans()) { - $rs = $db->Execute("select * from ADOXYZ where id=100"); - if ($rs && !$rs->EOF) print 'Fail: Data should rollback

    '; - else print 'OK

    '; - if ($rs) $rs->Close(); - } else - print "Commit failed

    "; - - $rs = $db->Execute('delete from ADOXYZ where id>50'); - if ($rs) $rs->Close(); - - if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)"); - } - - if (1) { - print "

    Testing MetaDatabases()

    "; - print_r( $db->MetaDatabases()); - - print "

    Testing MetaTables() and MetaColumns()

    "; - $a = $db->MetaTables(); - if ($a===false) print "MetaTables not supported

    "; - else { - print "Array of tables and views: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables('VIEW'); - if ($a===false) print "MetaTables not supported (views)

    "; - else { - print "Array of views: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables(false,false,'aDo%'); - if ($a===false) print "MetaTables not supported (mask)

    "; - else { - print "Array of ado%: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables('TABLE'); - if ($a===false) print "MetaTables not supported

    "; - else { - print "Array of tables: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $db->debug=0; - $rez = $db->MetaColumns("NOSUCHTABLEHERE"); - if ($rez !== false) { - Err("MetaColumns error handling failed"); - var_dump($rez); - } - $db->debug=1; - $a = $db->MetaColumns('ADOXYZ'); - if ($a===false) print "MetaColumns not supported

    "; - else { - print "

    Columns of ADOXYZ:
    "; - foreach($a as $v) {print_r($v); echo "
    ";} - echo "
    "; - } - - print "

    Testing MetaIndexes

    "; - - $a = $db->MetaIndexes(('ADOXYZ'),true); - if ($a===false) print "MetaIndexes not supported

    "; - else { - print "

    Indexes of ADOXYZ:
    "; - adodb_pr($a); - echo "
    "; - } - print "

    Testing MetaPrimaryKeys

    "; - $a = $db->MetaPrimaryKeys('ADOXYZ'); - var_dump($a); - } - $rs = $db->Execute('delete from ADOXYZ'); - if ($rs) $rs->Close(); - - $db->debug = false; - - - switch ($db->databaseType) { - case 'vfp': - - if (0) { - // memo test - $rs = $db->Execute("select data from memo"); - rs2html($rs); - } - break; - - case 'postgres7': - case 'postgres64': - case 'postgres': - case 'ibase': - print "

    Encode=".$db->BlobEncode("abc\0d\"' -ef")."

    ";//' - - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('ADOXYZ',false,true); - print_r($arr); - if (!$arr) Err("No MetaForeignKeys"); - break; - - case 'odbc_mssql': - case 'mssqlpo': - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('Orders',false,true); - print_r($arr); - if (!$arr) Err("Bad MetaForeignKeys"); - if ($db->databaseType == 'odbc_mssql') break; - - case 'mssql': - - -/* -ASSUME Northwind available... - -CREATE PROCEDURE SalesByCategory - @CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998' -AS -IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998' -BEGIN - SELECT @OrdYear = '1998' -END - -SELECT ProductName, - TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0) -FROM [Order Details] OD, Orders O, Products P, Categories C -WHERE OD.OrderID = O.OrderID - AND OD.ProductID = P.ProductID - AND P.CategoryID = C.CategoryID - AND C.CategoryName = @CategoryName - AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear -GROUP BY ProductName -ORDER BY ProductName -GO - - -CREATE PROCEDURE ADODBTestSP -@a nvarchar(25) -AS -SELECT GETDATE() AS T, @a AS A -GO -*/ - print "

    Testing Stored Procedures for mssql

    "; - $saved = $db->debug; - $db->debug=true; - $assoc = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $cmd = $db->PrepareSP('ADODBTestSP'); - $ss = "You should see me in the output."; - $db->InParameter($cmd,$ss,'a'); - $rs = $db->Execute($cmd); - #var_dump($rs->fields); - echo $rs->fields['T']." --- ".$rs->fields['A']."---
    "; - - $cat = 'Dairy Products'; - $yr = '1998'; - - $stmt = $db->PrepareSP('SalesByCategory'); - $db->InParameter($stmt,$cat,'CategoryName'); - $db->InParameter($stmt,$yr,'OrdYear'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $cat = 'Grains/Cereals'; - $yr = 1998; - - $stmt = $db->PrepareSP('SalesByCategory'); - $db->InParameter($stmt,$cat,'CategoryName'); - $db->InParameter($stmt,$yr,'OrdYear'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $ADODB_FETCH_MODE = $assoc; - - /* - Test out params - works in PHP 4.2.3 and 4.3.3 and 4.3.8 but not 4.3.0: - - CREATE PROCEDURE at_date_interval - @days INTEGER, - @start VARCHAR(20) OUT, - @end VARCHAR(20) OUT - AS - BEGIN - set @start = CONVERT(VARCHAR(20), getdate(), 101) - set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 ) - END - GO - */ - $db->debug=1; - $stmt = $db->PrepareSP('at_date_interval'); - $days = 10; - $begin_date = ''; - $end_date = ''; - $db->InParameter($stmt,$days,'days', 4, SQLINT4); - $db->OutParameter($stmt,$begin_date,'start', 20, SQLVARCHAR ); - $db->OutParameter($stmt,$end_date,'end', 20, SQLVARCHAR ); - $db->Execute($stmt); - if (empty($begin_date) or empty($end_date) or $begin_date == $end_date) { - Err("MSSQL SP Test for OUT Failed"); - print "begin=$begin_date end=$end_date

    "; - } else print "(Today +10days) = (begin=$begin_date end=$end_date)

    "; - - $db->debug = $saved; - break; - case 'oci8': - case 'oci8po': - - if (0) { - $t = getmicrotime(); - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $arr = $db->GetArray('select * from abalone_tree'); - $arr = $db->GetArray('select * from abalone_tree'); - $arr = $db->GetArray('select * from abalone_tree'); - echo "

    t = ",getmicrotime() - $t,"

    "; - die(); - } - - # cleanup - $db->Execute("delete from photos where id=99 or id=1"); - $db->Execute("insert into photos (id) values(1)"); - $db->Execute("update photos set photo=null,descclob=null where id=1"); - - $saved = $db->debug; - $db->debug=true; - - - - /* - CREATE TABLE PHOTOS - ( - ID NUMBER(16), - PHOTO BLOB, - DESCRIPTION VARCHAR2(4000 BYTE), - DESCCLOB CLOB - ); - - INSERT INTO PHOTOS (ID) VALUES(1); - */ - $s = ''; - for ($i = 0; $i <= 500; $i++) { - $s .= '1234567890'; - } - - $sql = "INSERT INTO photos ( ID, photo) ". - "VALUES ( :id, empty_blob() )". - " RETURNING photo INTO :xx"; - - - $blob_data = $s; - $id = 99; - - $stmt = $db->PrepareSP($sql); - $db->InParameter($stmt, $id, 'id'); - $blob = $db->InParameter($stmt, $s, 'xx',-1, OCI_B_BLOB); - $db->StartTrans(); - $result = $db->Execute($stmt); - $db->CompleteTrans(); - - $s2= $db->GetOne("select photo from photos where id=99"); - echo "
    ---$s2"; - if ($s !== $s2) Err("insert blob does not match"); - - print "

    Testing Blob: size=".strlen($s)."

    "; - $ok = $db->Updateblob('photos','photo',$s,'id=1'); - if (!$ok) Err("Blob failed 1"); - else { - $s2= $db->GetOne("select photo from photos where id=1"); - if ($s !== $s2) Err("updateblob does not match"); - } - - print "

    Testing Clob: size=".strlen($s)."

    "; - $ok = $db->UpdateClob('photos','descclob',$s,'id=1'); - if (!$ok) Err("Clob failed 1"); - else { - $s2= $db->GetOne("select descclob from photos where id=1"); - if ($s !== $s2) Err("updateclob does not match"); - } - - - $s = ''; - $s2 = ''; - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('emp','scott'); - print_r($arr); - if (!$arr) Err("Bad MetaForeignKeys"); -/* --- TEST PACKAGE --- "Set scan off" turns off substitution variables. -Set scan off; - -CREATE OR REPLACE PACKAGE Adodb AS -TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE; -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR); -PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) ; -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR); -PROCEDURE data_in(input IN VARCHAR); -PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER); -END Adodb; -/ - - -CREATE OR REPLACE PACKAGE BODY Adodb AS -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS - BEGIN - OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames; - END open_tab; - - PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS - BEGIN - OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames; - tablenames := 'TEST'; - END open_tab2; - -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS - BEGIN - output := 'Cinta Hati '||input; - END; - -PROCEDURE data_in(input IN VARCHAR) IS - ignore varchar(1000); - BEGIN - ignore := input; - END; - -PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER) AS -BEGIN -p2 := p1; -END; -END Adodb; -/ - -*/ - - print "

    Testing Cursor Variables

    "; - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:zz,'A%'); END;",'zz'); - - if ($rs && !$rs->EOF) { - $v = $db->GetOne("SELECT count(*) FROM tab where tname like 'A%'"); - if ($v == $rs->RecordCount()) print "Test 1 RowCount: OK

    "; - else Err("Test 1 RowCount ".$rs->RecordCount().", actual = $v"); - } else { - print "Error in using Cursor Variables 1

    "; - } - $rs->Close(); - - print "

    Testing Stored Procedures for oci8

    "; - - $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;"); - $a1 = 'Malaysia'; - //$a2 = ''; # a2 doesn't even need to be defined! - $db->InParameter($stmt,$a1,'a1'); - $db->OutParameter($stmt,$a2,'a2'); - $rs = $db->Execute($stmt); - if ($rs) { - if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

    "; - else echo "OK: a2=$a2

    "; - } else { - print "Error in using Stored Procedure IN/Out Variables

    "; - } - - $tname = 'A%'; - - $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); - $db->Parameter($stmt,$tname,'tablename'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $stmt = $db->PrepareSP("begin adodb.data_in(:a1); end;"); - $db->InParameter($stmt,$a1,'a1'); - $db->Execute($stmt); - - $db->debug = $saved; - break; - - default: - break; - } - $arr = array( - array(1,'Caroline','Miranda'), - array(2,'John','Lim'), - array(3,'Wai Hun','See') - ); - //$db->debug=1; - print "

    Testing Bulk Insert of 3 rows

    "; - - $sql = "insert into ADOXYZ (id,firstname,lastname) values (".$db->Param('0').",".$db->Param('1').",".$db->Param('2').")"; - $db->StartTrans(); - $db->Execute($sql,$arr); - $db->CompleteTrans(); - $rs = $db->Execute('select * from ADOXYZ order by id'); - if (!$rs || $rs->RecordCount() != 3) Err("Bad bulk insert"); - - rs2html($rs); - - $db->Execute('delete from ADOXYZ'); - - print "

    Inserting 50 rows

    "; - - for ($i = 0; $i < 5; $i++) { - - $time = $db->DBDate(time()); - if (empty($_GET['hide'])) $db->debug = true; - switch($db->databaseType){ - case 'mssqlpo': - case 'mssql': - $sqlt = "CREATE TABLE mytable ( - row1 INT IDENTITY(1,1) NOT NULL, - row2 varchar(16), - PRIMARY KEY (row1))"; - //$db->debug=1; - if (!$db->Execute("delete from mytable")) - $db->Execute($sqlt); - - $ok = $db->Execute("insert into mytable (row2) values ('test')"); - $ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id); - if ($ins_id == 0) Err("Bad Insert_ID()"); - $ins_id2 = $db->GetOne("select row1 from mytable"); - if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2"); - - $arr = array(0=>'Caroline',1=>'Miranda'); - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)"; - break; - case 'mysqli': - case 'mysqlt': - case 'mysql': - $sqlt = "CREATE TABLE `mytable` ( - `row1` int(11) NOT NULL auto_increment, - `row2` varchar(16) NOT NULL default '', - PRIMARY KEY (`row1`), - KEY `myindex` (`row1`,`row2`) -) "; - if (!$db->Execute("delete from mytable")) - $db->Execute($sqlt); - - $ok = $db->Execute("insert into mytable (row2) values ('test')"); - $ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id); - if ($ins_id == 0) Err("Bad Insert_ID()"); - $ins_id2 = $db->GetOne("select row1 from mytable"); - if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2"); - - default: - $arr = array(0=>'Caroline',1=>'Miranda'); - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)"; - break; - - case 'oci8': - case 'oci805': - $arr = array('first'=>'Caroline','last'=>'Miranda'); - $amt = rand() % 100; - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,:first,:last,$time)"; - break; - } - if ($i & 1) { - $sql = $db->Prepare($sql); - } - $rs = $db->Execute($sql,$arr); - - if ($rs === false) Err( 'Error inserting with parameters'); - else $rs->Close(); - $db->debug = false; - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+1,'John','Lim',$time)"); - /*$ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id);*/ - if ($db->databaseType == 'mysql') if ($ins_id == 0) Err('Bad Insert_ID'); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+2,'Mary','Lamb',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+3,'George','Washington',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+4,'Mr. Alan','Tam',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+5,'Alan',".$db->quote("Turing'ton").",$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created)values ($i*10+6,'Serena','Williams',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+7,'Yat Sun','Sun',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+8,'Wai Hun','See',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+9,'Steven','Oey',$time )"); - } // for - if (1) { - $db->debug=1; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $cnt = $db->GetOne("select count(*) from ADOXYZ"); - $rs = $db->Execute('update ADOXYZ set id=id+1'); - if (!is_object($rs)) { - print_r($rs); - err("Update should return object"); - } - if (!$rs) err("Update generated error"); - - $nrows = $db->Affected_Rows(); - if ($nrows === false) print "

    Affected_Rows() not supported

    "; - else if ($nrows != $cnt) print "

    Affected_Rows() Error: $nrows returned (should be 50)

    "; - else print "

    Affected_Rows() passed

    "; - } - - if ($db->dataProvider == 'oci8') $array = array('zid'=>1,'zdate'=>date('Y-m-d',time())); - else $array=array(1,date('Y-m-d',time())); - - - #$array = array(1,date('Y-m-d',time())); - $id = $db->GetOne("select id from ADOXYZ - where id=".$db->Param('zid')." and created>=".$db->Param('ZDATE')."", - $array); - if ($id != 1) Err("Bad bind; id=$id"); - else echo "
    Bind date/integer 1 passed"; - - $array =array(1,$db->BindDate(time())); - $id = $db->GetOne("select id from ADOXYZ - where id=".$db->Param('0')." and created>=".$db->Param('1')."", - $array); - if ($id != 1) Err("Bad bind; id=$id"); - else echo "
    Bind date/integer 2 passed"; - - $db->debug = false; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - ////////////////////////////////////////////////////////////////////////////////////////// - - $rs = $db->Execute("select * from ADOXYZ where firstname = 'not known'"); - if (!$rs || !$rs->EOF) print "

    Error on empty recordset

    "; - else if ($rs->RecordCount() != 0) { - print "

    Error on RecordCount. Should be 0. Was ".$rs->RecordCount()."

    "; - print_r($rs->fields); - } - if ($db->databaseType !== 'odbc') { - $rs = $db->Execute("select id,firstname,lastname,created,".$db->random." from ADOXYZ order by id"); - if ($rs) { - if ($rs->RecordCount() != 50) { - print "

    RecordCount returns ".$rs->RecordCount().", should be 50

    "; - adodb_pr($rs->GetArray()); - $poc = $rs->PO_RecordCount('ADOXYZ'); - if ($poc == 50) print "

        PO_RecordCount passed

    "; - else print "

    PO_RecordCount returns wrong value: $poc

    "; - } else print "

    RecordCount() passed

    "; - if (isset($rs->fields['firstname'])) print '

    The fields columns can be indexed by column name.

    '; - else { - Err( '

    The fields columns cannot be indexed by column name.

    '); - print_r($rs->fields); - } - if (empty($_GET['hide'])) rs2html($rs); - } - else print "

    Error in Execute of SELECT with random

    "; - } - $val = $db->GetOne("select count(*) from ADOXYZ"); - if ($val == 50) print "

    GetOne returns ok

    "; - else print "

    Fail: GetOne returns $val

    "; - - echo "GetRow Test"; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $val1 = $db->GetRow("select count(*) from ADOXYZ"); - $val2 = $db->GetRow("select count(*) from ADOXYZ"); - if ($val1[0] == 50 and sizeof($val1) == 1 and $val2[0] == 50 and sizeof($val2) == 1) print "

    GetRow returns ok

    "; - else { - print_r($val); - print "

    Fail: GetRow returns {$val2[0]}

    "; - } - - print "

    FetchObject/FetchNextObject Test

    "; - $rs = $db->Execute('select * from ADOXYZ'); - if ($rs) { - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - - while ($o = $rs->FetchNextObject()) { // calls FetchObject internally - if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) { - print_r($o); - print "

    Firstname is not string

    "; - break; - } - } - } else { - print "

    Failed rs

    "; - die("

    ADOXYZ table cannot be read - die()"); - } - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - print "

    FetchObject/FetchNextObject Test 2

    "; - #$db->debug=99; - $rs = $db->Execute('select * from ADOXYZ'); - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - print_r($rs->fields); - while ($o = $rs->FetchNextObject()) { // calls FetchObject internally - if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) { - print_r($o); - print "

    Firstname is not string

    "; - break; - } - } - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $savefetch = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - print "

    CacheSelectLimit Test...

    "; - $db->debug=1; - $rs = $db->CacheSelectLimit('select id, firstname from ADOXYZ order by id',2); - - if ($rs && !$rs->EOF) { - if (isset($rs->fields[0])) { - Err("ASSOC has numeric fields"); - print_r($rs->fields); - } - if ($rs->fields['id'] != 1) {Err("Error"); print_r($rs->fields);}; - if (trim($rs->fields['firstname']) != 'Caroline') {print Err("Error 2"); print_r($rs->fields);}; - - $rs->MoveNext(); - if ($rs->fields['id'] != 2) {Err("Error 3"); print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) { - Err("Error EOF"); - print_r($rs); - } - } - - print "

    FETCH_MODE = ASSOC: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',2); - if ($rs && !$rs->EOF) { - if (ADODB_ASSOC_CASE == 2) { - $id = 'ID'; - $fname = 'FIRSTNAME'; - }else { - $id = 'id'; - $fname = 'firstname'; - } - if ($rs->fields[$id] != 1) {Err("Error 1"); print_r($rs->fields);}; - if (trim($rs->fields[$fname]) != 'Caroline') {Err("Error 2"); print_r($rs->fields);}; - $rs->MoveNext(); - if ($rs->fields[$id] != 2) {Err("Error 3"); print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - else if (is_array($rs->fields) || $rs->fields) { - Err("Error: ## fields should be set to false on EOF"); - print_r($rs->fields); - } - } - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - print "

    FETCH_MODE = NUM: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - if (isset($rs->fields['id'])) Err("FETCH_NUM has ASSOC fields"); - if ($rs->fields[0] != 1) {Err("Error 1"); print_r($rs->fields);}; - if (trim($rs->fields[1]) != 'Caroline') {Err("Error 2");print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - - } - $ADODB_FETCH_MODE = $savefetch; - - $db->debug = false; - print "

    GetRowAssoc Upper: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(); - if ($arr['ID'] != 1) {Err("Error 1");print_r($arr);}; - if (trim($arr['FIRSTNAME']) != 'Caroline') {Err("Error 2"); print_r($arr);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - - } - print "

    GetRowAssoc Lower: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(false); - if ($arr['id'] != 1) {Err("Error 1"); print_r($arr);}; - if (trim($arr['firstname']) != 'Caroline') {Err("Error 2"); print_r($arr);}; - - } - - print "

    GetCol Test

    "; - $col = $db->GetCol('select distinct firstname from ADOXYZ order by 1'); - if (!is_array($col)) Err("Col size is wrong"); - if (trim($col[0]) != 'Alan' or trim($col[9]) != 'Yat Sun') Err("Col elements wrong"); - - $db->debug = true; - - - echo "

    Date Update Test

    "; - $zdate = date('Y-m-d',time()+3600*24); - $zdate = $db->DBDate($zdate); - $db->Execute("update ADOXYZ set created=$zdate where id=1"); - $row = $db->GetRow("select created,firstname from ADOXYZ where id=1"); - print_r($row); echo "
    "; - - - - print "

    SelectLimit Distinct Test 1: Should see Caroline, John and Mary

    "; - $rs = $db->SelectLimit('select distinct * from ADOXYZ order by id',3); - - - if ($rs && !$rs->EOF) { - if (trim($rs->fields[1]) != 'Caroline') Err("Error 1 (exp Caroline), ".$rs->fields[1]); - $rs->MoveNext(); - - if (trim($rs->fields[1]) != 'John') Err("Error 2 (exp John), ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Mary') Err("Error 3 (exp Mary),".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) Err("Error EOF"); - //rs2html($rs); - } else Err("Failed SelectLimit Test 1"); - - print "

    SelectLimit Test 2: Should see Mary, George and Mr. Alan

    "; - $rs = $db->SelectLimit('select * from ADOXYZ order by id',3,2); - if ($rs && !$rs->EOF) { - if (trim($rs->fields[1]) != 'Mary') Err("Error 1 - No Mary, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'George')Err("Error 2 - No George, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Mr. Alan') Err("Error 3 - No Mr. Alan, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) Err("Error EOF"); - // rs2html($rs); - } - else Err("Failed SelectLimit Test 2 ". ($rs ? 'EOF':'no RS')); - - print "

    SelectLimit Test 3: Should see Wai Hun and Steven

    "; - $db->debug=1; - global $A; $A=1; - $rs = $db->SelectLimit('select * from ADOXYZ order by id',-1,48); - $A=0; - if ($rs && !$rs->EOF) { - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - if (trim($rs->fields[1]) != 'Wai Hun') Err("Error 1 ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Steven') Err("Error 2 ".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) { - Err("Error EOF"); - } - //rs2html($rs); - } - else Err("Failed SelectLimit Test 3"); - $db->debug = false; - - - $rs = $db->Execute("select * from ADOXYZ order by id"); - print "

    Testing Move()

    "; - if (!$rs)Err( "Failed Move SELECT"); - else { - if (!$rs->Move(2)) { - if (!$rs->canSeek) print "

    $db->databaseType: Move(), MoveFirst() nor MoveLast() not supported.

    "; - else print '

    RecordSet->canSeek property should be set to false

    '; - } else { - $rs->MoveFirst(); - if (trim($rs->Fields("firstname")) != 'Caroline') { - print "

    $db->databaseType: MoveFirst failed -- probably cannot scroll backwards

    "; - } - else print "MoveFirst() OK
    "; - - // Move(3) tests error handling -- MoveFirst should not move cursor - $rs->Move(3); - if (trim($rs->Fields("firstname")) != 'George') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(3) failed

    "; - } else print "Move(3) OK
    "; - - $rs->Move(7); - if (trim($rs->Fields("firstname")) != 'Yat Sun') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(7) failed

    "; - print_r($rs); - } else print "Move(7) OK
    "; - if ($rs->EOF) Err("Move(7) is EOF already"); - $rs->MoveLast(); - if (trim($rs->Fields("firstname")) != 'Steven'){ - print '

    '.$rs->Fields("id")."$db->databaseType: MoveLast() failed

    "; - print_r($rs); - }else print "MoveLast() OK
    "; - $rs->MoveNext(); - if (!$rs->EOF) err("Bad MoveNext"); - if ($rs->canSeek) { - $rs->Move(3); - if (trim($rs->Fields("firstname")) != 'George') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(3) after MoveLast failed

    "; - - } else print "Move(3) after MoveLast() OK
    "; - } - - print "

    Empty Move Test"; - $rs = $db->Execute("select * from ADOXYZ where id > 0 and id < 0"); - $rs->MoveFirst(); - if (!$rs->EOF || $rs->fields) Err("Error in empty move first"); - } - } - - $rs = $db->Execute('select * from ADOXYZ where id = 2'); - if ($rs->EOF || !is_array($rs->fields)) Err("Error in select"); - $rs->MoveNext(); - if (!$rs->EOF) Err("Error in EOF (xx) "); - // $db->debug=true; - print "

    Testing ADODB_FETCH_ASSOC and concat: concat firstname and lastname

    "; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($db->dataProvider == 'postgres') { - $sql = "select ".$db->Concat('cast(firstname as varchar)',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ"; - $rs = $db->Execute($sql); - } else { - $sql = "select distinct ".$db->Concat('firstname',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ"; - $rs = $db->Execute($sql); - } - if ($rs) { - if (empty($_GET['hide'])) rs2html($rs); - } else { - Err( "Failed Concat:".$sql); - } - $ADODB_FETCH_MODE = $save; - print "
    Testing GetArray() "; - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rs = $db->Execute("select * from ADOXYZ order by id"); - if ($rs) { - $arr = $rs->GetArray(10); - if (sizeof($arr) != 10 || trim($arr[1][1]) != 'John' || trim($arr[1][2]) != 'Lim') print $arr[1][1].' '.$arr[1][2]."   ERROR
    "; - else print " OK
    "; - } - - $arr = $db->GetArray("select x from ADOXYZ"); - $e = $db->ErrorMsg(); $e2 = $db->ErrorNo(); - echo "Testing error handling, should see illegal column 'x' error=$e ($e2)
    "; - if (!$e || !$e2) Err("Error handling did not work"); - print "Testing FetchNextObject for 1 object "; - $rs = $db->Execute("select distinct lastname,firstname from ADOXYZ where firstname='Caroline'"); - $fcnt = 0; - if ($rs) - while ($o = $rs->FetchNextObject()) { - $fcnt += 1; - } - if ($fcnt == 1) print " OK
    "; - else print "FAILED
    "; - - $stmt = $db->Prepare("select * from ADOXYZ where id < 3"); - $rs = $db->Execute($stmt); - if (!$rs) Err("Prepare failed"); - else { - $arr = $rs->GetArray(); - if (!$arr) Err("Prepare failed 2"); - if (sizeof($arr) != 2) Err("Prepare failed 3"); - } - print "Testing GetAssoc() "; - $savecrecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - //$arr = $db->GetArray("select lastname,firstname from ADOXYZ"); - //print_r($arr); - print "
    "; - $rs = $db->Execute("select distinct lastname,firstname,created from ADOXYZ"); - - if ($rs) { - $arr = $rs->GetAssoc(); - //print_r($arr); - if (empty($arr['See']) || trim(reset($arr['See'])) != 'Wai Hun') print $arr['See']."   ERROR
    "; - else print " OK 1"; - } - - $arr = $db->GetAssoc("select distinct lastname,firstname from ADOXYZ"); - if ($arr) { - //print_r($arr); - if (empty($arr['See']) || trim($arr['See']) != 'Wai Hun') print $arr['See']."   ERROR
    "; - else print " OK 2
    "; - } - // Comment this out to test countrecs = false - $ADODB_COUNTRECS = $savecrecs; - $db->debug=1; - $query = $db->Prepare("select count(*) from ADOXYZ"); - $rs = $db->CacheExecute(10,$query); - if (reset($rs->fields) != 50) echo Err("$cnt wrong for Prepare/CacheGetOne"); - - for ($loop=0; $loop < 1; $loop++) { - print "Testing GetMenu() and CacheExecute
    "; - $db->debug = true; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - - - - if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu('menu','Steven').'
    '; - else print " Fail
    "; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu('menu','Steven',false).'
    '; - else print " Fail
    "; - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - if ($rs) print ' 1st line set to **** , Steven selected: '. $rs->GetMenu('menu','Steven','1st:****').'
    '; - else print " Fail
    "; - - - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print ' Multiple, Alan selected: '. $rs->GetMenu('menu','Alan',false,true).'
    '; - else print " Fail
    "; - print '


    '; - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) { - print ' Multiple, Alan and George selected: '. $rs->GetMenu('menu',array('Alan','George'),false,true); - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - } else print " Fail
    "; - print '


    '; - - print "Testing GetMenu3()
    "; - $rs = $db->Execute("select ".$db->Concat('firstname',"'-'",'id').",id, lastname from ADOXYZ order by lastname,id"); - if ($rs) print "Grouped Menu: ".$rs->GetMenu3('name'); - else Err('Grouped Menu GetMenu3()'); - print "
    "; - - print "Testing GetMenu2()
    "; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu2('menu',('Oey')).'
    '; - else print " Fail
    "; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu2('menu',('Oey'),false).'
    '; - else print " Fail
    "; - } - echo "

    CacheExecute

    "; - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - print_r($rs->fields); echo $rs->fetchMode;echo "
    "; - echo $rs->Fields('firstname'); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - print_r($rs->fields);echo "
    "; - echo $rs->Fields('firstname'); - $db->debug = false; - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - // phplens - - $sql = 'select * from ADOXYZ where 0=1'; - echo "

    **Testing '$sql' (phplens compat 1)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'"); - if (!$rs->FieldCount()) err( "No fields returned for $sql"); - if (!$rs->FetchField(1)) err( "FetchField failed for $sql"); - - $sql = 'select * from ADOXYZ order by 1'; - echo "

    **Testing '$sql' (phplens compat 2)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'
    ".$db->ErrorMsg()."
    "); - - - $sql = 'select * from ADOXYZ order by 1,1'; - echo "

    **Testing '$sql' (phplens compat 3)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'
    ".$db->ErrorMsg()."
    "); - - - // Move - $rs1 = $db->Execute("select id from ADOXYZ where id <= 2 order by 1"); - $rs2 = $db->Execute("select id from ADOXYZ where id = 3 or id = 4 order by 1"); - - if ($rs1) $rs1->MoveLast(); - if ($rs2) $rs2->MoveLast(); - - if (empty($rs1) || empty($rs2) || $rs1->fields[0] != 2 || $rs2->fields[0] != 4) { - $a = $rs1->fields[0]; - $b = $rs2->fields[0]; - print "

    Error in multiple recordset test rs1=$a rs2=$b (should be rs1=2 rs2=4)

    "; - } else - print "

    Testing multiple recordsets OK

    "; - - - echo "

    GenID test: "; - for ($i=1; $i <= 10; $i++) - echo "($i: ",$val = $db->GenID($db->databaseType.'abcseq6' ,5), ") "; - if ($val == 0) Err("GenID not supported"); - - if ($val) { - $db->DropSequence('abc_seq2'); - $db->CreateSequence('abc_seq2'); - $val = $db->GenID('abc_seq2'); - $db->DropSequence('abc_seq2'); - $db->CreateSequence('abc_seq2'); - $val = $db->GenID('abc_seq2'); - if ($val != 1) Err("Drop and Create Sequence not supported ($val)"); - } - echo "

    "; - - if (substr($db->dataProvider,0,3) != 'notused') { // used to crash ado - $sql = "select firstnames from ADOXYZ"; - print "

    Testing execution of illegal statement: $sql

    "; - if ($db->Execute($sql) === false) { - print "

    This returns the following ErrorMsg(): ".$db->ErrorMsg()." and ErrorNo(): ".$db->ErrorNo().'

    '; - } else - print "

    Error in error handling -- Execute() should return false

    "; - } else - print "

    ADO skipped error handling of bad select statement

    "; - - print "

    ASSOC TEST 2
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->query('select * from ADOXYZ order by id'); - if ($ee = $db->ErrorMsg()) { - Err("Error message=$ee"); - } - if ($ee = $db->ErrorNo()) { - Err("Error No = $ee"); - } - print_r($rs->fields); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - - - print "

    BOTH TEST 2
    "; - if ($db->dataProvider == 'ado') { - print "ADODB_FETCH_BOTH not supported for dataProvider=".$db->dataProvider."
    "; - } else { - $ADODB_FETCH_MODE = ADODB_FETCH_BOTH; - $rs = $db->query('select * from ADOXYZ order by id'); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - } - - print "

    NUM TEST 2
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->query('select * from ADOXYZ order by id'); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - - print "

    ASSOC Test of SelectLimit
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->selectlimit('select * from ADOXYZ order by id',3,4); - $cnt = 0; - while ($rs && !$rs->EOF) { - $cnt += 1; - if (!isset($rs->fields['firstname'])) { - print "
    ASSOC returned numeric field

    "; - break; - } - $rs->MoveNext(); - } - if ($cnt != 3) print "
    Count should be 3, instead it was $cnt

    "; - - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($db->sysDate) { - $saved = $db->debug; - $db->debug = 1; - $rs = $db->Execute("select {$db->sysDate} from ADOXYZ where id=1"); - if (ADORecordSet::UnixDate(date('Y-m-d')) != $rs->UnixDate($rs->fields[0])) { - print "

    Invalid date {$rs->fields[0]}

    "; - } else - print "

    Passed \$sysDate test ({$rs->fields[0]})

    "; - - print_r($rs->FetchField(0)); - print time(); - $db->debug=$saved; - } else { - print "

    \$db->sysDate not defined

    "; - } - - print "

    Test CSV

    "; - include_once('../toexport.inc.php'); - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->SelectLimit('select id,firstname,lastname,created,\'He, he\' he,\'"\' q from ADOXYZ',10); - - print "
    ";
    -	print rs2csv($rs);
    -	print "
    "; - - $rs = $db->SelectLimit('select id,firstname,lastname,created,\'The "young man", he said\' from ADOXYZ',10); - - if (PHP_VERSION < 5) { - print "
    ";
    -		rs2tabout($rs);
    -		print "
    "; - } - print " CacheFlush "; - $db->CacheFlush(); - - $date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A'); - $sql = "SELECT $date from ADOXYZ"; - print "

    Test SQLDate: ".htmlspecialchars($sql)."

    "; - $rs = $db->SelectLimit($sql,1); - $d = date('d-m-M-Y-').'Q'.(ceil(date('m')/3.0)).date(' h:i:s A'); - if (!$rs) Err("SQLDate query returned no recordset"); - else if ($d != $rs->fields[0]) Err("SQLDate 1 failed expected:
    act:$d
    sql:".$rs->fields[0]); - - $date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A',$db->DBDate("1974-02-25")); - $sql = "SELECT $date from ADOXYZ"; - print "

    Test SQLDate: ".htmlspecialchars($sql)."

    "; - $db->debug=1; - $rs = $db->SelectLimit($sql,1); - $ts = ADOConnection::UnixDate('1974-02-25'); - $d = date('d-m-M-Y-',$ts).'Q'.(ceil(date('m',$ts)/3.0)).date(' h:i:s A',$ts); - if (!$rs) { - Err("SQLDate query returned no recordset"); - echo $db->ErrorMsg(),'
    '; - } else if ($d != reset($rs->fields)) { - Err("SQLDate 2 failed expected:
    act:$d
    sql:".$rs->fields[0].'
    '.$db->ErrorMsg()); - } - - - print "

    Test Filter

    "; - $db->debug = 1; - - $rs = $db->SelectLimit('select * from ADOXYZ where id < 3 order by id'); - - $rs = RSFilter($rs,'do_strtolower'); - if (trim($rs->fields[1]) != 'caroline' && trim($rs->fields[2]) != 'miranda') { - err('**** RSFilter failed'); - print_r($rs->fields); - } - - rs2html($rs); - - $db->debug=1; - - - print "

    Test Replace

    "; - - $ret = $db->Replace('ADOXYZ', - array('id'=>1,'firstname'=>'Caroline','lastname'=>'Miranda'), - array('id'), - $autoq = true); - if (!$ret) echo "

    Error in replacing existing record

    "; - else { - $saved = $db->debug; - $db->debug = 0; - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = true; - $rs = $db->Execute('select * FROM ADOXYZ where id=1'); - $db->debug = $saved; - if ($rs->RecordCount() != 1) { - $cnt = $rs->RecordCount(); - rs2html($rs); - print "Error - Replace failed, count=$cnt

    "; - } - $ADODB_COUNTRECS = $savec; - } - $ret = $db->Replace('ADOXYZ', - array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'), - array('id','firstname'), - $autoq = true); - if ($ret != 2) print "Replace failed: "; - print "test A return value=$ret (2 expected)

    "; - - $ret = $db->Replace('ADOXYZ', - array('id'=>1000,'firstname'=>'Sherazade','lastname'=>'Al-Rashid'), - 'id', - $autoq = true); - if ($ret != 1) - if ($db->dataProvider == 'ibase' && $ret == 2); - else print "Replace failed: "; - print "test B return value=$ret (1 or if ibase then 2 expected)

    "; - - print "

    rs2rs Test

    "; - - $rs = $db->Execute('select * from ADOXYZ where id>= 1 order by id'); - $rs = $db->_rs2rs($rs); - $rs->valueX = 'X'; - $rs->MoveNext(); - $rs = $db->_rs2rs($rs); - if (!isset($rs->valueX)) err("rs2rs does not preserve array recordsets"); - if (reset($rs->fields) != 1) err("rs2rs does not move to first row: id=".reset($rs->fields)); - - ///////////////////////////////////////////////////////////// - include_once('../pivottable.inc.php'); - print "

    Pivot Test

    "; - $db->debug=true; - $sql = PivotTableSQL( - $db, # adodb connection - 'ADOXYZ', # tables - 'firstname', # row fields - 'lastname', # column fields - false, # join - 'ID', # sum - 'Sum ', # label for sum - 'sum', # aggregate function - true - ); - $rs = $db->Execute($sql); - if ($rs) rs2html($rs); - else Err("Pivot sql error"); - - $pear = true; //true; - $db->debug=false; - - if ($pear) { - // PEAR TESTS BELOW - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - include_once "PEAR.php"; - $rs = $db->query('select * from ADOXYZ where id>0 and id<10 order by id'); - - $i = 0; - if ($rs && !$rs->EOF) { - while ($arr = $rs->fetchRow()) { - $i++; - //print "$i "; - if ($arr[0] != $i) { - print_r($arr); - print "

    PEAR DB emulation error 1.

    "; - $pear = false; - break; - } - } - $rs->Close(); - } - - - if ($i != $db->GetOne('select count(*) from ADOXYZ where id>0 and id<10')) { - print "

    PEAR DB emulation error 1.1 EOF ($i)

    "; - $pear = false; - } - - $rs = $db->limitQuery('select * from ADOXYZ where id>0 order by id',$i=3,$top=3); - $i2 = $i; - if ($rs && !$rs->EOF) { - - while (!is_object($rs->fetchInto($arr))) { - $i2++; - - // print_r($arr); - // print "$i ";print_r($arr); - if ($arr[0] != $i2) { - print "

    PEAR DB emulation error 2.

    "; - $pear = false; - break; - } - } - $rs->Close(); - } - if ($i2 != $i+$top) { - print "

    PEAR DB emulation error 2.1 EOF (correct=$i+$top, actual=$i2)

    "; - $pear = false; - } - } - if ($pear) print "

    PEAR DB emulation passed.

    "; - flush(); - - - $rs = $db->SelectLimit("select ".$db->sysDate." from ADOXYZ",1); - $date = $rs->fields[0]; - if (!$date) Err("Bad sysDate"); - else { - $ds = $db->UserDate($date,"d m Y"); - if ($ds != date("d m Y")) Err("Bad UserDate: ".$ds.' expected='.date("d m Y")); - else echo "Passed UserDate: $ds

    "; - } - $db->debug=1; - if ($db->dataProvider == 'oci8') - $rs = $db->SelectLimit("select to_char(".$db->sysTimeStamp.",'YYYY-MM-DD HH24:MI:SS') from ADOXYZ",1); - else - $rs = $db->SelectLimit("select ".$db->sysTimeStamp." from ADOXYZ",1); - $date = $rs->fields[0]; - if (!$date) Err("Bad sysTimeStamp"); - else { - $ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y"); - if ($ds != date("H \\h\\r\\s-d m Y")) Err("Bad UserTimeStamp: ".$ds.", correct is ".date("H \\h\\r\\s-d m Y")); - else echo "Passed UserTimeStamp: $ds

    "; - - $date = 100; - $ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y"); - $ds2 = date("H \\h\\r\\s-d m Y",$date); - if ($ds != $ds2) Err("Bad UserTimeStamp 2: $ds: $ds2"); - else echo "Passed UserTimeStamp 2: $ds

    "; - } - flush(); - - if ($db->hasTransactions) { - $db->debug=1; - echo "

    Testing StartTrans CompleteTrans

    "; - $db->raiseErrorFn = false; - - $db->SetTransactionMode('SERIALIZABLE'); - $db->StartTrans(); - $rs = $db->Execute('select * from notable'); - $db->StartTrans(); - $db->BeginTrans(); - $db->Execute("update ADOXYZ set firstname='Carolx' where id=1"); - $db->CommitTrans(); - $db->CompleteTrans(); - $rez = $db->CompleteTrans(); - $db->SetTransactionMode(''); - $db->debug=0; - if ($rez !== false) { - if (is_null($rez)) Err("Error: _transOK not modified"); - else Err("Error: CompleteTrans (1) should have failed"); - } else { - $name = $db->GetOne("Select firstname from ADOXYZ where id=1"); - if ($name == "Carolx") Err("Error: CompleteTrans (2) should have failed"); - else echo "

    -- Passed StartTrans test1 - rolling back

    "; - } - - $db->StartTrans(); - $db->BeginTrans(); - $db->Execute("update ADOXYZ set firstname='Carolx' where id=1"); - $db->RollbackTrans(); - $rez = $db->CompleteTrans(); - if ($rez !== true) Err("Error: CompleteTrans (1) should have succeeded"); - else { - $name = $db->GetOne("Select firstname from ADOXYZ where id=1"); - if (trim($name) != "Carolx") Err("Error: CompleteTrans (2) should have succeeded, returned name=$name"); - else echo "

    -- Passed StartTrans test2 - commiting

    "; - } - } - flush(); - $saved = $db->debug; - $db->debug=1; - $cnt = _adodb_getcount($db, 'select * from ADOXYZ where firstname in (select firstname from ADOXYZ)'); - echo "Count= $cnt"; - $db->debug=$saved; - - global $TESTERRS; - $debugerr = true; - - global $ADODB_LANG;$ADODB_LANG = 'fr'; - $db->debug = false; - $TESTERRS = 0; - $db->raiseErrorFn = 'adodb_test_err'; - global $ERRNO; // from adodb_test_err - $db->Execute('select * from nowhere'); - $metae = $db->MetaError($ERRNO); - if ($metae !== DB_ERROR_NOSUCHTABLE) print "

    MetaError=".$metae." wrong, should be ".DB_ERROR_NOSUCHTABLE."

    "; - else print "

    MetaError ok (".DB_ERROR_NOSUCHTABLE."): ".$db->MetaErrorMsg($metae)."

    "; - if ($TESTERRS != 1) print "raiseErrorFn select nowhere failed
    "; - $rs = $db->Execute('select * from ADOXYZ'); - if ($debugerr) print " Move"; - $rs->Move(100); - $rs->_queryID = false; - if ($debugerr) print " MoveNext"; - $rs->MoveNext(); - if ($debugerr) print " $rs=false"; - $rs = false; - - flush(); - - print "

    SetFetchMode() tests

    "; - $db->SetFetchMode(ADODB_FETCH_ASSOC); - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC"); - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - //var_dump($rs->fields); - if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC"); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $db->SetFetchMode(ADODB_FETCH_NUM); - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - if (!isset($rs->fields[0])) Err("BAD FETCH NUM"); - - flush(); - - print "

    Test MetaTables again with SetFetchMode()

    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $db->SetFetchMode(ADODB_FETCH_ASSOC); - print_r($db->MetaTables()); - print "

    "; - - //////////////////////////////////////////////////////////////////// - - print "

    Testing Bad Connection

    "; - flush(); - - if (true || PHP_VERSION < 5) { - if ($db->dataProvider == 'odbtp') $db->databaseType = 'odbtp'; - $conn = NewADOConnection($db->databaseType); - $conn->raiseErrorFn = 'adodb_test_err'; - if (1) $conn->PConnect('abc','baduser','badpassword'); - if ($TESTERRS == 2) print "raiseErrorFn tests passed
    "; - else print "raiseErrorFn tests failed ($TESTERRS)
    "; - - flush(); - } - //////////////////////////////////////////////////////////////////// - - global $nocountrecs; - - if (isset($nocountrecs) && $ADODB_COUNTRECS) err("Error: \$ADODB_COUNTRECS is set"); - if (empty($nocountrecs) && $ADODB_COUNTRECS==false) err("Error: \$ADODB_COUNTRECS is not set"); - - flush(); -?> -

    -
     
    -

    -Close(); - if ($rs2) $rs2->Close(); - if ($rs) $rs->Close(); - $db->Close(); - - if ($db->transCnt != 0) Err("Error in transCnt=$db->transCnt (should be 0)"); - - - printf("

    Total queries=%d; total cached=%d

    ",$EXECS+$CACHED, $CACHED); - flush(); -} - -function adodb_test_err($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false) -{ -global $TESTERRS,$ERRNO; - - $ERRNO = $errno; - $TESTERRS += 1; - print "** $dbms ($fn): errno=$errno   errmsg=$errmsg ($p1,$p2)
    "; -} - -//-------------------------------------------------------------------------------------- - - -@set_time_limit(240); // increase timeout - -include("../tohtml.inc.php"); -include("../adodb.inc.php"); -include("../rsfilter.inc.php"); - -/* White Space Check */ - -if (isset($_SERVER['argv'][1])) { - //print_r($_SERVER['argv']); - $_GET[$_SERVER['argv'][1]] = 1; -} - -if (@$_SERVER['COMPUTERNAME'] == 'TIGRESS') { - CheckWS('mysqlt'); - CheckWS('postgres'); - CheckWS('oci8po'); - - CheckWS('firebird'); - CheckWS('sybase'); - if (!ini_get('safe_mode')) CheckWS('informix'); - - CheckWS('ado_mssql'); - CheckWS('ado_access'); - CheckWS('mssql'); - - CheckWS('vfp'); - CheckWS('sqlanywhere'); - CheckWS('db2'); - CheckWS('access'); - CheckWS('odbc_mssql'); - CheckWS('firebird15'); - // - CheckWS('oracle'); - CheckWS('proxy'); - CheckWS('fbsql'); - print "White Space Check complete

    "; -} -if (sizeof($_GET) == 0) $testmysql = true; - - -foreach($_GET as $k=>$v) { - //global $$k; - $$k = $v; -} -if (strpos(PHP_VERSION,'5') === 0) { - //$testaccess=1; - //$testmssql = 1; - //$testsqlite=1; -} -?> - -ADODB Testing - -

    ADODB Test

    - -This script tests the following databases: Interbase, Oracle, Visual FoxPro, Microsoft Access (ODBC and ADO), MySQL, MSSQL (ODBC, native, ADO). -There is also support for Sybase, PostgreSQL.

    -For the latest version of ADODB, visit
    adodb.sourceforge.net.

    - -Test GetInsertSQL/GetUpdateSQL   - Sessions   - Paging   - Perf Monitor

    -vers=",ADOConnection::Version(); - - -include_once('../adodb-time.inc.php'); -if (isset($_GET['time'])) adodb_date_test(); - -?> -

    ADODB Database Library (c) 2000-2007 John Lim. All rights reserved. Released under BSD and LGPL, PHP .

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test2.php.svn-base deleted file mode 100755 index 169aa0cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test2.php.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -debug=1; - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;' - . 'DATA SOURCE=' . $access . ';'; - - echo "

    PHP ",PHP_VERSION,"

    "; - - $db->Connect($myDSN) || die('fail'); - - print_r($db->ServerInfo()); - - try { - $rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx"); - print_r($rs->fields); - } catch(exception $e) { - print_r($e); - echo "

    Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y'); - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test3.php.svn-base deleted file mode 100755 index c0924aeb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test3.php.svn-base +++ /dev/null @@ -1,44 +0,0 @@ -Connect('','scott','natsoft'); -$db->debug=1; - -$cnt = $db->GetOne("select count(*) from adoxyz"); -$rs = $db->Execute("select * from adoxyz order by id"); - -$i = 0; -foreach($rs as $k => $v) { - $i += 1; - echo $k; adodb_pr($v); - flush(); -} - -if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n"); - - - -$rs = $db->Execute("select bad from badder"); - -} catch (exception $e) { - adodb_pr($e); - $e = adodb_backtrace($e->trace); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test4.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test4.php.svn-base deleted file mode 100755 index c3ae6592..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test4.php.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -PConnect("", "sa", "natsoft", "northwind"); // connect to MySQL, testdb - -$conn = &ADONewConnection("mysql"); // create a connection -$conn->PConnect("localhost", "root", "", "test"); // connect to MySQL, testdb - - -#$conn =& ADONewConnection('oci8po'); -#$conn->Connect('','scott','natsoft'); - -if (PHP_VERSION >= 5) { - $connstr = "mysql:dbname=northwind"; - $u = 'root';$p=''; - $conn =& ADONewConnection('pdo'); - $conn->Connect($connstr, $u, $p); -} -//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - -$conn->debug=1; -$conn->Execute("delete from adoxyz where lastname like 'Smi%'"); - -$rs = $conn->Execute($sql); // Execute the query and get the empty recordset -$record = array(); // Initialize an array to hold the record data to insert - -if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 751; -$record["firstname"] = 'Jann'; -$record["lastname"] = "Smitts"; -$record["created"] = time(); - -$insertSQL = $conn->GetInsertSQL($rs, $record); -$conn->Execute($insertSQL); // Insert the record into the database - -if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 752; -// Set the values for the fields in the record -$record["firstname"] = 'anull'; -$record["lastname"] = "Smith\$@//"; -$record["created"] = time(); - -if (isset($_GET['f'])) $ADODB_FORCE_TYPE = $_GET['f']; - -//$record["id"] = -1; - -// Pass the empty recordset and the array containing the data to insert -// into the GetInsertSQL function. The function will process the data and return -// a fully formatted insert sql statement. -$insertSQL = $conn->GetInsertSQL($rs, $record); -$conn->Execute($insertSQL); // Insert the record into the database - - - -$insertSQL2 = $conn->GetInsertSQL($table='ADOXYZ', $record); -if ($insertSQL != $insertSQL2) echo "

    Walt's new stuff failed: $insertSQL2

    "; -//========================== -// This code tests an update - -$sql = " -SELECT * -FROM ADOXYZ WHERE lastname=".$conn->Param('var'). " ORDER BY 1"; -// Select a record to update - -$varr = array('var'=>$record['lastname'].''); -$rs = $conn->Execute($sql,$varr); // Execute the query and get the existing record to update -if (!$rs || $rs->EOF) print "

    No record found!

    "; - -$record = array(); // Initialize an array to hold the record data to update - - -// Set the values for the fields in the record -$record["firstName"] = "Caroline".rand(); -//$record["lasTname"] = ""; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = ''; -// Pass the single record recordset and the array containing the data to update -// into the GetUpdateSQL function. The function will process the data and return -// a fully formatted update sql statement. -// If the data has not changed, no recordset is returned - -$updateSQL = $conn->GetUpdateSQL($rs, $record); -$conn->Execute($updateSQL,$varr); // Update the record in the database -if ($conn->Affected_Rows() != 1)print "

    Error1 : Rows Affected=".$conn->Affected_Rows().", should be 1

    "; - -$record["firstName"] = "Caroline".rand(); -$record["lasTname"] = "Smithy Jones"; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = 331; -$updateSQL = $conn->GetUpdateSQL($rs, $record); -$conn->Execute($updateSQL,$varr); // Update the record in the database -if ($conn->Affected_Rows() != 1)print "

    Error 2: Rows Affected=".$conn->Affected_Rows().", should be 1

    "; - -$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'"); -//adodb_pr($rs); -rs2html($rs); - -$record["firstName"] = "Carol-new-".rand(); -$record["lasTname"] = "Smithy"; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = 331; - -$conn->AutoExecute('ADOXYZ',$record,'UPDATE', "lastname like 'Sm%'"); -$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'"); -//adodb_pr($rs); -rs2html($rs); -} - - -testsql(); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test5.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test5.php.svn-base deleted file mode 100755 index 429479ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test5.php.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -debug=1; - $conn->PConnect("localhost","root","","xphplens"); - print $conn->databaseType.':'.$conn->GenID().'
    '; -} - -if (0) { - $conn = &ADONewConnection("oci8"); // create a connection - $conn->debug=1; - $conn->PConnect("falcon", "scott", "tiger", "juris8.ecosystem.natsoft.com.my"); // connect to MySQL, testdb - print $conn->databaseType.':'.$conn->GenID(); -} - -if (0) { - $conn = &ADONewConnection("ibase"); // create a connection - $conn->debug=1; - $conn->Connect("localhost:c:\\Interbase\\Examples\\Database\\employee.gdb", "sysdba", "masterkey", ""); // connect to MySQL, testdb - print $conn->databaseType.':'.$conn->GenID().'
    '; -} - -if (0) { - $conn = &ADONewConnection('postgres'); - $conn->debug=1; - @$conn->PConnect("susetikus","tester","test","test"); - print $conn->databaseType.':'.$conn->GenID().'
    '; -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test_rs_array.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test_rs_array.php.svn-base deleted file mode 100755 index 1de37b22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/test_rs_array.php.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -InitArray($array,$typearr); - -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    1 Seek
    "; -$rs->Move(1); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    2 Seek
    "; -$rs->Move(2); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    3 Seek
    "; -$rs->Move(3); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - - - -die(); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testcache.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testcache.php.svn-base deleted file mode 100755 index 7cf8adb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testcache.php.svn-base +++ /dev/null @@ -1,29 +0,0 @@ - - -PConnect('nwind'); -} else { - $db = ADONewConnection('mysql'); - $db->PConnect('mangrove','root','','xphplens'); -} -if (isset($cache)) $rs = $db->CacheExecute(120,'select * from products'); -else $rs = $db->Execute('select * from products'); - -$arr = $rs->GetArray(); -print sizeof($arr); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testdatabases.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testdatabases.inc.php.svn-base deleted file mode 100755 index 67cbc5c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testdatabases.inc.php.svn-base +++ /dev/null @@ -1,442 +0,0 @@ - - -
    -
    -> Access
    -> Interbase
    -> MSSQL
    - > MySQL
    -> MySQL ODBC
    -> MySQLi -
    -
    > SQLite
    -> MySQL Proxy
    -> Oracle (oci8)
    -> PostgreSQL
    -> PostgreSQL ODBC
    -
    -> PgSQL PDO
    -> MySQL PDO
    -> SQLite PDO
    -> Access PDO
    -> MSSQL PDO
    - -> OCI PDO
    - -
    > DB2
    -> VFP+ODBTP
    -> ADO (for mssql and access)
    -> $ADODB_COUNTRECS=false
    -> No SQL Logging
    -> ADOdb time test -
    - - - -FETCH MODE IS NOT ADODB_FETCH_DEFAULT"; - -if (isset($nocountrecs)) $ADODB_COUNTRECS = false; - -// cannot test databases below, but we include them anyway to check -// if they parse ok... - -if (!strpos(PHP_VERSION,'5') === 0) { - ADOLoadCode("sybase"); - //ADOLoadCode("postgres"); - //ADOLoadCode("postgres7"); - ADOLoadCode("firebird"); - ADOLoadCode("borland_ibase"); - ADOLoadCode("informix"); - ADOLoadCode("sqlanywhere"); -// ADOLoadCode('mysqli'); -} - - -flush(); -if (!empty($testpostgres)) { - //ADOLoadCode("postgres"); - - $db = &ADONewConnection('postgres'); - print "

    Connecting $db->databaseType...

    "; - if ($db->Connect("localhost","tester","test","test")) { - testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname varchar,created date)"); - }else - print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.
    ".$db->ErrorMsg(); -} - -if (!empty($testpgodbc)) { - - $db = &ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - - if ($db->PConnect('Postgresql')) { - $db->hasTransactions = true; - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - } else print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.
    ".$db->ErrorMsg(); -} - -if (!empty($testibase)) { - //$_GET['nolog'] = true; - $db = &ADONewConnection('firebird'); - print "

    Connecting $db->databaseType...

    "; - if ($db->PConnect("localhost:d:\\firebird\\151\\examples\\EMPLOYEE.fdb", "sysdba", "masterkey", "")) - testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname char(24),price numeric(12,2),created date)"); - else print "ERROR: Interbase test requires a database called employee.gdb".'
    '.$db->ErrorMsg(); - -} - - -if (!empty($testsqlite)) { - $path =urlencode('d:\inetpub\adodb\sqlite.db'); - $dsn = "sqlite://$path/"; - $db = ADONewConnection($dsn); - //echo $dsn; - - //$db = &ADONewConnection('sqlite'); - - - if ($db && $db->PConnect("d:\\inetpub\\adodb\\sqlite.db", "", "", "")) { - print "

    Connecting $db->databaseType...

    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else - print "ERROR: SQLite"; - -} - -if (!empty($testpdopgsql)) { - $connstr = "pgsql:dbname=test"; - $u = 'tester';$p='test'; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomysql)) { - $connstr = "mysql:dbname=northwind"; - $u = 'root';$p=''; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomssql)) { - $connstr = "mssql:dbname=northwind"; - $u = 'sa';$p='natsoft'; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdosqlite)) { - $connstr = "sqlite:d:/inetpub/adodb/sqlite-pdo.db3"; - $u = '';$p=''; - $db = &ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoaccess)) { - $connstr = 'odbc:nwind'; - $u = '';$p=''; - $db = &ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoora)) { - $connstr = 'oci:'; - $u = 'scott';$p='natsoft'; - $db = &ADONewConnection('pdo'); - #$db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -// REQUIRES ODBC DSN CALLED nwind -if (!empty($testaccess)) { - $db = &ADONewConnection('access'); - print "

    Connecting $db->databaseType...

    "; - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $dsn = "nwind"; - $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=$access;Uid=Admin;Pwd=;"; - - //$dsn = 'Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=' . $access . ';'; - if ($db->PConnect($dsn, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - else print "ERROR: Access test requires a Windows ODBC DSN=nwind, Access driver"; - -} - -if (!empty($testaccess) && !empty($testado)) { // ADO ACCESS - - $db = &ADONewConnection("ado_access"); - print "

    Connecting $db->databaseType...

    "; - - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;' - . 'DATA SOURCE=' . $access . ';'; - //. 'USER ID=;PASSWORD=;'; - $_GET['nolog'] = 1; - if ($db->PConnect($myDSN, "", "", "")) { - print "ADO version=".$db->_connectionID->version."
    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: Access test requires a Access database $access".'
    '.$db->ErrorMsg(); - -} - -if (!empty($testvfp)) { // ODBC - $db = &ADONewConnection('vfp'); - print "

    Connecting $db->databaseType...

    ";flush(); - - if ( $db->PConnect("vfp-adoxyz")) { - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - - echo "
    "; - $db = &ADONewConnection('odbtp'); - - if ( $db->PConnect('localhost','DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=d:\inetpub\adodb;EXCLUSIVE=NO;')) { - print "

    Connecting $db->databaseType...

    ";flush(); - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysql)) { // MYSQL - - - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - $user = 'root'; $password = ''; $database = 'northwind'; - $db = &ADONewConnection("mysqlt://$user:$password@$server/$database?persist"); - print "

    Connecting $db->databaseType...

    "; - - if (true || $db->PConnect($server, "root", "", "northwind")) { - //$db->Execute("DROP TABLE ADOXYZ") || die('fail drop'); - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) Type=InnoDB"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqli)) { // MYSQL - - $db = &ADONewConnection('mysqli'); - print "

    Connecting $db->databaseType...

    "; - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect($server, "root", "", "northwind")) { - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqlodbc)) { // MYSQL - - $db = &ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect('mysql', "root", "")) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - -if (!empty($testproxy)){ - $db = &ADONewConnection('proxy'); - print "

    Connecting $db->databaseType...

    "; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - - if ($db->PConnect('http://localhost/php/phplens/adodb/server.php')) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); - -} - -ADOLoadCode('oci805'); -ADOLoadCode("oci8po"); - -if (!empty($testoracle)) { - $dsn = "oci8po://juris10:natsoft@sherkhan?persist"; - $db = ADONewConnection($dsn );//'oci8'); - - //$db->debug=1; - print "

    Connecting $db->databaseType...

    "; - if (true || $db->Connect('', "scott", "natsoft",'')) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else - print "ERROR: Oracle test requires an Oracle server setup with scott/natsoft".'
    '.$db->ErrorMsg(); - -} -ADOLoadCode("oracle"); // no longer supported -if (false && !empty($testoracle)) { - - $db = ADONewConnection(); - print "

    Connecting $db->databaseType...

    "; - if ($db->PConnect("", "scott", "tiger", "natsoft.domain")) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else print "ERROR: Oracle test requires an Oracle server setup with scott/tiger".'
    '.$db->ErrorMsg(); - -} - -ADOLoadCode("odbc_db2"); // no longer supported -if (!empty($testdb2)) { - if (PHP_VERSION>=5.1) { - $db = ADONewConnection("db2"); - print "

    Connecting $db->databaseType...

    "; - - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect('localhost','natsoft','guest','test')) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
    '.$db->ErrorMsg(); - } else { - $db = ADONewConnection("odbc_db2"); - print "

    Connecting $db->databaseType...

    "; - - $dsn = "db2test"; - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect($dsn)) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
    '.$db->ErrorMsg(); - } -echo "
    "; -flush(); - $dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP; uid=root; pwd=natsoft"; - - $db = ADONewConnection('odbtp'); - if ($db->Connect('127.0.0.1',$dsn)) { - - $db->debug=1; - $arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr); - $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr); - - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else echo ("ERROR Connection"); - echo $db->ErrorMsg(); -} - - -$server = 'sherkhan'; - - - -ADOLoadCode("mssqlpo"); -if (!empty($testmssql)) { // MS SQL Server -- the extension is buggy -- probably better to use ODBC - $db = ADONewConnection("mssqlpo"); - //$db->debug=1; - print "

    Connecting $db->databaseType...

    "; - - $ok = $db->Connect('','adodb','natsoft','northwind'); - - if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) { - AutoDetect_MSSQL_Date_Order($db); - // $db->Execute('drop table adoxyz'); - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='192.168.0.1', userid='adodb', password='natsoft', database='ai'".'
    '.$db->ErrorMsg(); - -} - - -ADOLoadCode('odbc_mssql'); -if (!empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection(); - - print "

    Connecting $db->databaseType...

    "; - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;"; - - if ($db->PConnect($dsn, "adodb", "natsoft", "")) { - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - -ADOLoadCode("ado_mssql"); -if (!empty($testmssql) && !empty($testado) ) { // ADO ACCESS MSSQL -- thru ODBC -- DSN-less - - $db = &ADONewConnection("ado_mssql"); - //$db->debug=1; - print "

    Connecting DSN-less $db->databaseType...

    "; - - $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};" - . "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No"; - - - if ($db->PConnect($myDSN, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - else print "ERROR: MSSQL test 2 requires MS SQL 7"; - -} - -if (!empty($testmssql) && !empty($testado)) { // ADO ACCESS MSSQL with OLEDB provider - - $db = &ADONewConnection("ado_mssql"); - print "

    Connecting DSN-less OLEDB Provider $db->databaseType...

    "; - //$db->debug=1; - $myDSN="SERVER=localhost;DATABASE=northwind;Trusted_Connection=yes"; - if ($db->PConnect($myDSN, "adodb", "natsoft", 'SQLOLEDB')) { - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='mangrove', userid='sa', password='', database='ai'"; - -} - - -if (extension_loaded('odbtp') && !empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection('odbtp'); - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;uid=adodb;pwd=natsoft"; - - if ($db->PConnect('localhost',$dsn, "", "")) { - print "

    Connecting $db->databaseType...

    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - - -print "

    Tests Completed

    "; - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testgenid.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testgenid.php.svn-base deleted file mode 100755 index bc54adac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testgenid.php.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -Execute("drop table $table"); - //$db->debug=true; - - $ctr = 5000; - $lastnum = 0; - - while (--$ctr >= 0) { - $num = $db->GenID($table); - if ($num === false) { - print "GenID returned false"; - break; - } - if ($lastnum + 1 == $num) print " $num "; - else { - print " $num "; - flush(); - } - $lastnum = $num; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testmssql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testmssql.php.svn-base deleted file mode 100755 index 4788596a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testmssql.php.svn-base +++ /dev/null @@ -1,76 +0,0 @@ -Connect('127.0.0.1','adodb','natsoft','northwind') or die('Fail'); - -$conn->debug =1; -$query = 'select * from products'; -$conn->SetFetchMode(ADODB_FETCH_ASSOC); -$rs = $conn->Execute($query); -echo "
    ";
    -while( !$rs->EOF ) {
    -	$output[] = $rs->fields;
    -	var_dump($rs->fields);
    -	$rs->MoveNext();
    -	print "

    "; -} -die(); - - -$p = $conn->Prepare('insert into products (productname,unitprice,dcreated) values (?,?,?)'); -echo "

    ";
    -print_r($p);
    -
    -$conn->debug=1;
    -$conn->Execute($p,array('John'.rand(),33.3,$conn->DBDate(time())));
    -
    -$p = $conn->Prepare('select * from products where productname like ?');
    -$arr = $conn->getarray($p,array('V%'));
    -print_r($arr);
    -die();
    -
    -//$conn = &ADONewConnection("mssql");
    -//$conn->Connect('mangrove','sa','natsoft','ai');
    -
    -//$conn->Connect('mangrove','sa','natsoft','ai');
    -$conn->debug=1;
    -$conn->Execute('delete from blobtest');
    -
    -$conn->Execute('insert into blobtest (id) values(1)');
    -$conn->UpdateBlobFile('blobtest','b1','../cute_icons_for_site/adodb.gif','id=1');
    -$rs = $conn->Execute('select b1 from blobtest where id=1');
    -
    -$output = "c:\\temp\\test_out-".date('H-i-s').".gif"; 
    -print "Saving file $output, size=".strlen($rs->fields[0])."

    "; -$fd = fopen($output, "wb"); -fwrite($fd, $rs->fields[0]); -fclose($fd); - -print " View Image"; -//$rs = $conn->Execute('SELECT id,SUBSTRING(b1, 1, 10) FROM blobtest'); -//rs2html($rs); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8.php.svn-base deleted file mode 100755 index 0a99c7b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8.php.svn-base +++ /dev/null @@ -1,83 +0,0 @@ - - -PConnect('','scott','natsoft'); - if (!empty($testblob)) { - $varHoldingBlob = 'ABC DEF GEF John TEST'; - $num = time()%10240; - // create table atable (id integer, ablob blob); - $db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())'); - $db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB'); - - $rs = &$db->Execute('select * from atable'); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } - $stmt = $db->Prepare('select * from adoxyz where id=?'); - for ($i = 1; $i <= 10; $i++) { - $rs = &$db->Execute( - $stmt, - array($i)); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } -} -if (1) { - $db = ADONewConnection('oci8'); - $db->PConnect('','scott','natsoft'); - $db->debug = true; - $db->Execute("delete from emp where ename='John'"); - print $db->Affected_Rows().'
    '; - $stmt = &$db->Prepare('insert into emp (empno, ename) values (:empno, :ename)'); - $rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John')); - // prepare not quite ready for prime time - //$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John')); - if (!$rs) die("Empty RS"); - - $db->setfetchmode(ADODB_FETCH_NUM); - - $vv = 'A%'; - $stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true); - $db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR); - $db->OutParameter($stmt, $vv, 'tt'); - $rs = $db->Execute($stmt); - while (!$rs->EOF) { - adodb_pr($rs->fields); - $rs->MoveNext(); - } - echo " val = $vv"; - -} - -if (0) { - $db = ADONewConnection('odbc_oracle'); - if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect'); - $db->debug = true; - $rs = &$db->Execute( - 'select * from adoxyz where firstname=? and trim(lastname)=?', - array('first'=>'Caroline','last'=>'Miranda')); - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8cursor.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8cursor.php.svn-base deleted file mode 100755 index 44de0525..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testoci8cursor.php.svn-base +++ /dev/null @@ -1,111 +0,0 @@ -PConnect('','scott','natsoft'); - $db->debug = 99; - - -/* -*/ - - define('MYNUM',5); - - - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;"); - - if ($rs && !$rs->EOF) { - print "Test 1 RowCount: ".$rs->RecordCount()."

    "; - } else { - print "Error in using Cursor Variables 1

    "; - } - - print "

    Testing Stored Procedures for oci8

    "; - - $stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;'); - $db->OutParameter($stid, $myov, 'myov'); - $db->Execute($stid); - if ($myov != MYNUM) print "

    Error with myproc

    "; - - - $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true); - $a1 = 'Malaysia'; - //$a2 = ''; # a2 doesn't even need to be defined! - $db->InParameter($stmt,$a1,'a1'); - $db->OutParameter($stmt,$a2,'a2'); - $rs = $db->Execute($stmt); - if ($rs) { - if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

    "; - else echo "OK: a2=$a2

    "; - } else { - print "Error in using Stored Procedure IN/Out Variables

    "; - } - - - $tname = 'A%'; - - $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); - $db->Parameter($stmt,$tname,'tablename'); - $rs = $db->Execute($stmt); - rs2html($rs); - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpaging.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpaging.php.svn-base deleted file mode 100755 index 1799cc77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpaging.php.svn-base +++ /dev/null @@ -1,86 +0,0 @@ -PConnect('localhost','tester','test','test'); -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->PConnect("nwind", "", "", ""); -} - -if ($driver == 'ibase') { - $db = NewADOConnection('ibase'); - $db->PConnect("localhost:e:\\firebird\\examples\\employee.gdb", "sysdba", "masterkey", ""); - $sql = 'select distinct firstname, lastname from adoxyz order by firstname'; - -} -if ($driver == 'mssql') { - $db = NewADOConnection('mssql'); - $db->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -} -if ($driver == 'oci8') { - $db = NewADOConnection('oci8'); - $db->Connect('','scott','natsoft'); - -$sql = "select * from (select ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz - order by 1)"; -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->Connect('nwind'); -} - -if (empty($driver) or $driver == 'mysql') { - $db = NewADOConnection('mysql'); - $db->Connect('localhost','root','','test'); -} - -//$db->pageExecuteCountRows = false; - -$db->debug = true; - -if (0) { -$rs = &$db->Execute($sql); -include_once('../toexport.inc.php'); -print "

    ";
    -print rs2csv($rs); # return a string
    -
    -print '
    '; -$rs->MoveFirst(); # note, some databases do not support MoveFirst -print rs2tab($rs); # return a string - -print '
    '; -$rs->MoveFirst(); -rs2tabout($rs); # send to stdout directly -print "
    "; -} - -$pager = new ADODB_Pager($db,$sql); -$pager->showPageLinks = true; -$pager->linksPerPage = 10; -$pager->cache = 60; -$pager->Render($rows=7); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpear.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpear.php.svn-base deleted file mode 100755 index 81ebbe89..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testpear.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -setFetchMode(ADODB_FETCH_ASSOC); -$rs = $db->Query('select firstname,lastname from adoxyz'); -$cnt = 0; -while ($arr = $rs->FetchRow()) { - print_r($arr); - print "
    "; - $cnt += 1; -} - -if ($cnt != 50) print "Error in \$cnt = $cnt"; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testsessions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testsessions.php.svn-base deleted file mode 100755 index 83db5604..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/testsessions.php.svn-base +++ /dev/null @@ -1,90 +0,0 @@ -Notify Expiring=$ref, sessionkey=$key

    "; -} - -//------------------------------------------------------------------- - -error_reporting(E_ALL); - - -ob_start(); -include('../session/adodb-cryptsession2.php'); - -$options['debug'] = 99; -$db = 'postgres'; - -#### CONNECTION -switch($db) { -case 'oci8': - $options['table'] = 'adodb_sessions2'; - ADOdb_Session::config('oci8', '', 'jcollect', 'natsoft', '',$options); - break; - -case 'postgres': - ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options); - break; - -case 'mysql': -default: - ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options); - break; - - -} - - - -#### SETUP NOTIFICATION - $USER = 'JLIM'.rand(); - $ADODB_SESSION_EXPIRE_NOTIFY = array('USER','NotifyExpire'); - - adodb_session_create_table(); - session_start(); - - adodb_session_regenerate_id(); - -### SETUP SESSION VARIABLES - if (empty($_SESSION['MONKEY'])) $_SESSION['MONKEY'] = array(1,'abc',44.41); - else $_SESSION['MONKEY'][0] += 1; - if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1; - - -### START DISPLAY - print "

    PHP ".PHP_VERSION."

    "; - print "

    \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - print "
    Cookies: "; - print_r($_COOKIE); - - var_dump($_SESSION['MONKEY']); - -### RANDOMLY PERFORM Garbage Collection -### In real-production environment, this is done for you -### by php's session extension, which calls adodb_sess_gc() -### automatically for you. See php.ini's -### session.cookie_lifetime and session.gc_probability - - if (rand() % 5 == 0) { - - print "

    Garbage Collection

    "; - adodb_sess_gc(10); - - if (rand() % 2 == 0) { - print "

    Random session destroy

    "; - session_destroy(); - } - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/time.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/time.php.svn-base deleted file mode 100755 index 3bd21132..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/time.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/tmssql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/tmssql.php.svn-base deleted file mode 100755 index 427876ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/tmssql.php.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -mssql"; - $db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection'); - mssql_select_db('northwind',$db); - - $rs = mssql_query('select getdate() as date',$db); - $o = mssql_fetch_row($rs); - print_r($o); - mssql_free_result($rs); - - print "

    Delete

    "; flush(); - $rs2 = mssql_query('delete from adoxyz',$db); - $p = mssql_num_rows($rs2); - mssql_free_result($rs2); - -} - -function tpear() -{ -include_once('DB.php'); - - print "

    PEAR

    "; - $username = 'adodb'; - $password = 'natsoft'; - $hostname = 'JAGUAR\vsdotnet'; - $databasename = 'northwind'; - - $dsn = "mssql://$username:$password@$hostname/$databasename"; - $conn = &DB::connect($dsn); - print "date=".$conn->GetOne('select getdate()')."
    "; - @$conn->query('create table tester (id integer)'); - print "

    Delete

    "; flush(); - $rs = $conn->query('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
    "; -} - -function tadodb() -{ -include_once('../adodb.inc.php'); - - print "

    ADOdb

    "; - $conn = NewADOConnection('mssql'); - $conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -// $conn->debug=1; - print "date=".$conn->GetOne('select getdate()')."
    "; - $conn->Execute('create table tester (id integer)'); - print "

    Delete

    "; flush(); - $rs = $conn->Execute('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
    "; -} - - -$ACCEPTIP = '127.0.0.1'; - -$remote = $_SERVER["REMOTE_ADDR"]; - -if (!empty($ACCEPTIP)) - if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) - die("Unauthorised client: '$remote'"); - -?> -mssql -pear -adodb - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema-mssql.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema-mssql.xml.svn-base deleted file mode 100755 index db2c3432..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema-mssql.xml.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - -id - - -id - - - -
    - - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - INSERT into simple_table ( name, description ) values ( '12', 'Microsoft stuff' ) - - -
    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema.xml.svn-base deleted file mode 100755 index ea48ae2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/.svn/text-base/xmlschema.xml.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - - - - - An integer row that's a primary key and autoincrements - - - - - A 16 character varchar row that can't be null - - - - row1 - row2 - -
    - - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'Microsoft stuff' ) - - - - -
    -
    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/benchmark.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/benchmark.php deleted file mode 100755 index df80477f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/benchmark.php +++ /dev/null @@ -1,84 +0,0 @@ - - - - - ADODB Benchmarks - - - -ADODB Version: $ADODB_version Host: $db->host   Database: $db->database"; - - // perform query once to cache results so we are only testing throughput - $rs = $db->Execute($sql); - if (!$rs){ - print "Error in recordset

    "; - return; - } - $arr = $rs->GetArray(); - //$db->debug = true; - global $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - $start = microtime(); - for ($i=0; $i < $max; $i++) { - $rs =& $db->Execute($sql); - $arr =& $rs->GetArray(); - // print $arr[0][1]; - } - $end = microtime(); - $start = explode(' ',$start); - $end = explode(' ',$end); - - //print_r($start); - //print_r($end); - - // print_r($arr); - $total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]); - printf ("

    seconds = %8.2f for %d iterations each with %d records

    ",$total,$max, sizeof($arr)); - flush(); - - - //$db->Close(); -} -include("testdatabases.inc.php"); - -?> - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/client.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/client.php deleted file mode 100755 index b911581d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/client.php +++ /dev/null @@ -1,198 +0,0 @@ - - -'; - var_dump(parse_url('odbc_mssql://userserver/')); - die(); - -include('../adodb.inc.php'); -include('../tohtml.inc.php'); - - function &send2server($url,$sql) - { - $url .= '?sql='.urlencode($sql); - print "

    $url

    "; - $rs = csv2rs($url,$err); - if ($err) print $err; - return $rs; - } - - function print_pre($s) - { - print "
    ";print_r($s);print "
    "; - } - - -$serverURL = 'http://localhost/php/phplens/adodb/server.php'; -$testhttp = false; - -$sql1 = "insertz into products (productname) values ('testprod 1')"; -$sql2 = "insert into products (productname) values ('testprod 1')"; -$sql3 = "insert into products (productname) values ('testprod 2')"; -$sql4 = "delete from products where productid>80"; -$sql5 = 'select * from products'; - -if ($testhttp) { - print "Client Driver Tests

    "; - print "

    Test Error

    "; - $rs = send2server($serverURL,$sql1); - print_pre($rs); - print "
    "; - - print "

    Test Insert

    "; - - $rs = send2server($serverURL,$sql2); - print_pre($rs); - print "
    "; - - print "

    Test Insert2

    "; - - $rs = send2server($serverURL,$sql3); - print_pre($rs); - print "
    "; - - print "

    Test Delete

    "; - - $rs = send2server($serverURL,$sql4); - print_pre($rs); - print "
    "; - - - print "

    Test Select

    "; - $rs = send2server($serverURL,$sql5); - if ($rs) rs2html($rs); - - print "
    "; -} - - -print "

    CLIENT Driver Tests

    "; -$conn = ADONewConnection('csv'); -$conn->Connect($serverURL); -$conn->debug = true; - -print "

    Bad SQL

    "; - -$rs = $conn->Execute($sql1); - -print "

    Insert SQL 1

    "; -$rs = $conn->Execute($sql2); - -print "

    Insert SQL 2

    "; -$rs = $conn->Execute($sql3); - -print "

    Select SQL

    "; -$rs = $conn->Execute($sql5); -if ($rs) rs2html($rs); - -print "

    Delete SQL

    "; -$rs = $conn->Execute($sql4); - -print "

    Select SQL

    "; -$rs = $conn->Execute($sql5); -if ($rs) rs2html($rs); - - -/* EXPECTED RESULTS FOR HTTP TEST: - -Test Insert -http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => insert into products (productname) values ('testprod') - [affectedrows] => 1 - [insertid] => 81 -) - - --------------------------------------------------------------------------------- - -Test Insert2 -http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => insert into products (productname) values ('testprod') - [affectedrows] => 1 - [insertid] => 82 -) - - --------------------------------------------------------------------------------- - -Test Delete -http://localhost/php/adodb/server.php?sql=delete+from+products+where+productid%3E80 - -adorecordset Object -( - [dataProvider] => native - [fields] => - [blobSize] => 64 - [canSeek] => - [EOF] => 1 - [emptyTimeStamp] => - [emptyDate] => - [debug] => - [timeToLive] => 0 - [bind] => - [_numOfRows] => -1 - [_numOfFields] => 0 - [_queryID] => 1 - [_currentRow] => -1 - [_closed] => - [_inited] => - [sql] => delete from products where productid>80 - [affectedrows] => 2 - [insertid] => 0 -) - -[more stuff deleted] - . - . - . -*/ -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/pdo.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/pdo.php deleted file mode 100755 index 0fe715df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/pdo.php +++ /dev/null @@ -1,94 +0,0 @@ -"; -try { - echo "New Connection\n"; - - - $dsn = 'pdo_mysql://root:@localhost/northwind?persist'; - - if (!empty($dsn)) { - $DB =& NewADOConnection($dsn) || die("CONNECT FAILED"); - $connstr = $dsn; - } else { - - $DB = NewADOConnection('pdo'); - - echo "Connect\n"; - - $u = ''; $p = ''; - /* - $connstr = 'odbc:nwind'; - - $connstr = 'oci:'; - $u = 'scott'; - $p = 'natsoft'; - - - $connstr ="sqlite:d:\inetpub\adodb\sqlite.db"; - */ - - $connstr = "mysql:dbname=northwind"; - $u = 'root'; - - $connstr = "pgsql:dbname=test"; - $u = 'tester'; - $p = 'test'; - - $DB->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - } - - echo "connection string=$connstr\n Execute\n"; - - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $DB->Execute("select * from ADOXYZ where id<3"); - if ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n"; - - - //print_r(get_class_methods($DB->_stmt)); - - if (!$rs) die("NO RS"); - - echo "Meta\n"; - for ($i=0; $i < $rs->NumCols(); $i++) { - var_dump($rs->FetchField($i)); - echo "
    "; - } - - echo "FETCH\n"; - $cnt = 0; - while (!$rs->EOF) { - adodb_pr($rs->fields); - $rs->MoveNext(); - if ($cnt++ > 1000) break; - } - - echo "
    --------------------------------------------------------
    \n\n\n"; - - $stmt = $DB->PrepareStmt("select * from ADOXYZ"); - - $rs = $stmt->Execute(); - $cols = $stmt->NumCols(); // execute required - - echo "COLS = $cols"; - for($i=1;$i<=$cols;$i++) { - $v = $stmt->_stmt->getColumnMeta($i); - var_dump($v); - } - - echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n"; - while ($arr = $rs->FetchRow()) { - adodb_pr($arr); - } - die("DONE\n"); - -} catch (exception $e) { - echo "
    ";
    -	echo $e;
    -	echo "
    "; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-record.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-record.php deleted file mode 100755 index b08eca54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-record.php +++ /dev/null @@ -1,82 +0,0 @@ -= 5) { - include('../adodb-exceptions.inc.php'); - echo "

    Exceptions included

    "; - } - } - - $db = NewADOConnection('mysql://root@localhost/northwind'); - $db->debug=1; - ADOdb_Active_Record::SetDatabaseAdapter($db); - - $db->Execute("CREATE TEMPORARY TABLE `persons` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name_first` varchar(100) NOT NULL default '', - `name_last` varchar(100) NOT NULL default '', - `favorite_color` varchar(100) NOT NULL default '', - PRIMARY KEY (`id`) - ) ENGINE=MyISAM; - "); - - class Person extends ADOdb_Active_Record{} - $person = new Person(); - - echo "

    Output of getAttributeNames: "; - var_dump($person->getAttributeNames()); - - /** - * Outputs the following: - * array(4) { - * [0]=> - * string(2) "id" - * [1]=> - * string(9) "name_first" - * [2]=> - * string(8) "name_last" - * [3]=> - * string(13) "favorite_color" - * } - */ - - $person = new Person(); - $person->name_first = 'Andi'; - $person->name_last = 'Gutmans'; - $person->save(); // this save() will fail on INSERT as favorite_color is a must fill... - - - $person = new Person(); - $person->name_first = 'Andi'; - $person->name_last = 'Gutmans'; - $person->favorite_color = 'blue'; - $person->save(); // this save will perform an INSERT successfully - - echo "

    The Insert ID generated:"; print_r($person->id); - - $person->favorite_color = 'red'; - $person->save(); // this save() will perform an UPDATE - - $person = new Person(); - $person->name_first = 'John'; - $person->name_last = 'Lim'; - $person->favorite_color = 'lavender'; - $person->save(); // this save will perform an INSERT successfully - - // load record where id=2 into a new ADOdb_Active_Record - $person2 = new Person(); - $person2->Load('id=2'); - - var_dump($person2); - - $activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2)); - $person2 =& $activeArr[0]; - echo "

    Name (should be John): ",$person->name_first, "
    Class (should be Person): ",get_class($person2); - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-recs2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-recs2.php deleted file mode 100755 index b8abe787..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-active-recs2.php +++ /dev/null @@ -1,75 +0,0 @@ -Connect("localhost","tester","test","test"); -} else - $db = NewADOConnection('oci8://scott:natsoft@/'); - - -$arr = $db->ServerInfo(); -echo "

    $db->dataProvider: {$arr['description']}

    "; - -$arr = $db->GetActiveRecords('products',' productid<10'); -adodb_pr($arr); - -ADOdb_Active_Record::SetDatabaseAdapter($db); -if (!$db) die('failed'); - - - - -$rec = new ADODB_Active_Record('photos'); - -$rec = new ADODB_Active_Record('products'); - - -adodb_pr($rec->getAttributeNames()); - -echo "
    "; - - -$rec->load('productid=2'); -adodb_pr($rec); - -$db->debug=1; - - -$rec->productname = 'Changie Chan'.rand(); - -$rec->insert(); -$rec->update(); - -$rec->productname = 'Changie Chan 99'; -$rec->replace(); - - -$rec2 = new ADODB_Active_Record('products'); -$rec->load('productid=3'); -$rec->save(); - -$rec = new ADODB_Active_record('products'); -$rec->productname = 'John ActiveRec'; -$rec->notes = 22; -#$rec->productid=0; -$rec->discontinued=1; -$rec->Save(); -$rec->supplierid=33; -$rec->Save(); -$rec->discontinued=0; -$rec->Save(); -$rec->Delete(); - -echo "

    Affected Rows after delete=".$db->Affected_Rows()."

    "; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-datadict.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-datadict.php deleted file mode 100755 index 8dfdbf2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-datadict.php +++ /dev/null @@ -1,248 +0,0 @@ -$dbType

    "; - $db = NewADOConnection($dbType); - $dict = NewDataDictionary($db); - - if (!$dict) continue; - $dict->debug = 1; - - $opts = array('REPLACE','mysql' => 'ENGINE=INNODB', 'oci8' => 'TABLESPACE USERS'); - -/* $flds = array( - array('id', 'I', - 'AUTO','KEY'), - - array('name' => 'firstname', 'type' => 'varchar','size' => 30, - 'DEFAULT'=>'Joan'), - - array('lastname','varchar',28, - 'DEFAULT'=>'Chen','key'), - - array('averylonglongfieldname','X',1024, - 'NOTNULL','default' => 'test'), - - array('price','N','7.2', - 'NOTNULL','default' => '0.00'), - - array('MYDATE', 'D', - 'DEFDATE'), - array('TS','T', - 'DEFTIMESTAMP') - );*/ - - $flds = " -ID I AUTO KEY, -FIRSTNAME VARCHAR(30) DEFAULT 'Joan' INDEX idx_name, -LASTNAME VARCHAR(28) DEFAULT 'Chen' key INDEX idx_name, -averylonglongfieldname X(1024) DEFAULT 'test', -price N(7.2) DEFAULT '0.00', -MYDATE D DEFDATE INDEX idx_date, -BIGFELLOW X NOTNULL, -TS T DEFTIMESTAMP"; - - - $sqla = $dict->CreateDatabase('KUTU',array('postgres'=>"LOCATION='/u01/postdata'")); - $dict->SetSchema('KUTU'); - - $sqli = ($dict->CreateTableSQL('testtable',$flds, $opts)); - $sqla = array_merge($sqla,$sqli); - - $sqli = $dict->CreateIndexSQL('idx','testtable','price,firstname,lastname',array('BITMAP','FULLTEXT','CLUSTERED','HASH')); - $sqla = array_merge($sqla,$sqli); - $sqli = $dict->CreateIndexSQL('idx2','testtable','price,lastname');//,array('BITMAP','FULLTEXT','CLUSTERED')); - $sqla = array_merge($sqla,$sqli); - - $addflds = array(array('height', 'F'),array('weight','F')); - $sqli = $dict->AddColumnSQL('testtable',$addflds); - $sqla = array_merge($sqla,$sqli); - $addflds = array(array('height', 'F','NOTNULL'),array('weight','F','NOTNULL')); - $sqli = $dict->AlterColumnSQL('testtable',$addflds); - $sqla = array_merge($sqla,$sqli); - - - printsqla($dbType,$sqla); - - if (file_exists('d:\inetpub\wwwroot\php\phplens\adodb\adodb.inc.php')) - if ($dbType == 'mysqlt') { - $db->Connect('localhost', "root", "", "test"); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - if ($dbType == 'postgres') { - if (@$db->Connect('localhost', "tester", "test", "test")); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - - if ($dbType == 'odbc_mssql') { - $dsn = $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=localhost;Database=northwind;"; - if (@$db->Connect($dsn, "sa", "natsoft", "test")); - $dict->SetSchema(''); - $sqla2 = $dict->ChangeTableSQL('adoxyz',$flds); - if ($sqla2) printsqla($dbType,$sqla2); - } - - - - adodb_pr($dict->databaseType); - printsqla($dbType, $dict->DropColumnSQL('table',array('my col','`col2_with_Quotes`','A_col3','col3(10)'))); - printsqla($dbType, $dict->ChangeTableSQL('adoxyz','LASTNAME varchar(32)')); - -} - -function printsqla($dbType,$sqla) -{ - print "

    ";
    -	//print_r($dict->MetaTables());
    -	foreach($sqla as $s) {
    -		$s = htmlspecialchars($s);
    -		print "$s;\n";
    -		if ($dbType == 'oci8') print "/\n";
    -	}
    -	print "

    "; -} - -/*** - -Generated SQL: - -mysql - -CREATE DATABASE KUTU; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id INTEGER NOT NULL AUTO_INCREMENT, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) NOT NULL DEFAULT 'Chen', -averylonglongfieldname LONGTEXT NOT NULL, -price NUMERIC(7,2) NOT NULL DEFAULT 0.00, -MYDATE DATE DEFAULT CURDATE(), - PRIMARY KEY (id, lastname) -)TYPE=ISAM; -CREATE FULLTEXT INDEX idx ON KUTU.testtable (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD height DOUBLE; -ALTER TABLE KUTU.testtable ADD weight DOUBLE; -ALTER TABLE KUTU.testtable MODIFY COLUMN height DOUBLE NOT NULL; -ALTER TABLE KUTU.testtable MODIFY COLUMN weight DOUBLE NOT NULL; - - --------------------------------------------------------------------------------- - -oci8 - -CREATE USER KUTU IDENTIFIED BY tiger; -/ -GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO KUTU; -/ -DROP TABLE KUTU.testtable CASCADE CONSTRAINTS; -/ -CREATE TABLE KUTU.testtable ( -id NUMBER(16) NOT NULL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname CLOB NOT NULL, -price NUMBER(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATE DEFAULT TRUNC(SYSDATE), - PRIMARY KEY (id, lastname) -)TABLESPACE USERS; -/ -DROP SEQUENCE KUTU.SEQ_testtable; -/ -CREATE SEQUENCE KUTU.SEQ_testtable; -/ -CREATE OR REPLACE TRIGGER KUTU.TRIG_SEQ_testtable BEFORE insert ON KUTU.testtable - FOR EACH ROW - BEGIN - select KUTU.SEQ_testtable.nextval into :new.id from dual; - END; -/ -CREATE BITMAP INDEX idx ON KUTU.testtable (firstname,lastname); -/ -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -/ -ALTER TABLE testtable ADD ( - height NUMBER, - weight NUMBER); -/ -ALTER TABLE testtable MODIFY( - height NUMBER NOT NULL, - weight NUMBER NOT NULL); -/ - - --------------------------------------------------------------------------------- - -postgres -AlterColumnSQL not supported for PostgreSQL - - -CREATE DATABASE KUTU LOCATION='/u01/postdata'; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id SERIAL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname TEXT NOT NULL, -price NUMERIC(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATE DEFAULT CURRENT_DATE, - PRIMARY KEY (id, lastname) -); -CREATE INDEX idx ON KUTU.testtable USING HASH (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD height FLOAT8; -ALTER TABLE KUTU.testtable ADD weight FLOAT8; - - --------------------------------------------------------------------------------- - -odbc_mssql - -CREATE DATABASE KUTU; -DROP TABLE KUTU.testtable; -CREATE TABLE KUTU.testtable ( -id INT IDENTITY(1,1) NOT NULL, -firstname VARCHAR(30) DEFAULT 'Joan', -lastname VARCHAR(28) DEFAULT 'Chen' NOT NULL, -averylonglongfieldname TEXT NOT NULL, -price NUMERIC(7,2) DEFAULT 0.00 NOT NULL, -MYDATE DATETIME DEFAULT GetDate(), - PRIMARY KEY (id, lastname) -); -CREATE CLUSTERED INDEX idx ON KUTU.testtable (firstname,lastname); -CREATE INDEX idx2 ON KUTU.testtable (price,lastname); -ALTER TABLE KUTU.testtable ADD - height REAL, - weight REAL; -ALTER TABLE KUTU.testtable ALTER COLUMN height REAL NOT NULL; -ALTER TABLE KUTU.testtable ALTER COLUMN weight REAL NOT NULL; - - --------------------------------------------------------------------------------- -*/ - - -echo "

    Test XML Schema

    "; -$ff = file('xmlschema.xml'); -echo "
    ";
    -foreach($ff as $xml) echo htmlspecialchars($xml);
    -echo "
    "; -include_once('test-xmlschema.php'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-perf.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-perf.php deleted file mode 100755 index 37406d2d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-perf.php +++ /dev/null @@ -1,50 +0,0 @@ - $v) { - if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k; - } -} - -if (isset($_SESSION['_db'])) { - $_db = $_SESSION['_db']; - $_GET[$_db] = 1; - $$_db = 1; -} - -echo "

    Performance Monitoring

    "; -include_once('testdatabases.inc.php'); - - -function testdb($db) -{ - if (!$db) return; - echo "";print_r($db->ServerInfo()); echo " user=".$db->user.""; - - $perf = NewPerfMonitor($db); - - # unit tests - if (0) { - //$DB->debug=1; - echo "Data Cache Size=".$perf->DBParameter('data cache size').'

    '; - echo $perf->HealthCheck(); - echo($perf->SuspiciousSQL()); - echo($perf->ExpensiveSQL()); - echo($perf->InvalidSQL()); - echo $perf->Tables(); - - echo "

    ";
    -		echo $perf->HealthCheckCLI();
    -		$perf->Poll(3);
    -		die();
    -	}
    -	
    -	if ($perf) $perf->UI(3);
    -}
    - 
    -?>
    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-pgblob.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-pgblob.php
    deleted file mode 100755
    index 90993b3a..00000000
    --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-pgblob.php	
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -Param(false);
    -		$x = (rand() % 10) + 1;
    -		$db->debug= ($i==1);
    -		$id = $db->GetOne($sql,
    -			array('Z%','Z%',$x));
    -		if($id != $offset+$x) {
    -			print "

    Error at $x"; - break; - } - } -} - -include_once('../adodb.inc.php'); -$db = NewADOConnection('postgres7'); -$db->PConnect('localhost','tester','test','test') || die("failed connection"); - -$enc = "GIF89a%01%00%01%00%80%FF%00%C0%C0%C0%00%00%00%21%F9%04%01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%01%012%00%3Bt_clear.gif%0D"; -$val = rawurldecode($enc); - -$MAX = 1000; - -adodb_pr($db->ServerInfo()); - -echo "

    Testing PREPARE/EXECUTE PLAN

    "; - - -$db->_bindInputArray = true; // requires postgresql 7.3+ and ability to modify database -$t = getmicrotime(); -doloop(); -echo '

    ',$MAX,' times, with plan=',getmicrotime() - $t,'

    '; - - -$db->_bindInputArray = false; -$t = getmicrotime(); -doloop(); -echo '

    ',$MAX,' times, no plan=',getmicrotime() - $t,'

    '; - - - -echo "

    Testing UPDATEBLOB

    "; -$db->debug=1; - -### TEST BEGINS - -$db->Execute("insert into photos (id,name) values(9999,'dot.gif')"); -$db->UpdateBlob('photos','photo',$val,'id=9999'); -$v = $db->GetOne('select photo from photos where id=9999'); - - -### CLEANUP - -$db->Execute("delete from photos where id=9999"); - -### VALIDATION - -if ($v !== $val) echo "*** ERROR: Inserted value does not match downloaded val"; -else echo "*** OK: Passed"; - -echo "
    ";
    -echo "INSERTED: ", $enc;
    -echo "
    "; -echo"RETURNED: ", rawurlencode($v); -echo "

    "; -echo "INSERTED: ", $val; -echo "


    "; -echo "RETURNED: ", $v; - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-php5.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-php5.php deleted file mode 100755 index 78c9a429..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-php5.php +++ /dev/null @@ -1,108 +0,0 @@ -PHP ".PHP_VERSION."\n"; -try { - -$dbt = 'mysql'; - -try { -switch($dbt) { -case 'oci8po': - $db = NewADOConnection("oci8po"); - - $db->Connect('','scott','natsoft'); - break; -default: -case 'mysql': - $db = NewADOConnection("mysql"); - $db->Connect('localhost','root','','northwind'); - break; - -case 'mysqli': - $db = NewADOConnection("mysqli://root:@localhost/northwind"); - //$db->Connect('localhost','root','','test'); - break; -} -} catch (exception $e){ - echo "Connect Failed"; - adodb_pr($e); - die(); -} - -$db->debug=1; - -$cnt = $db->GetOne("select count(*) from adoxyz where ?Prepare("select * from adoxyz where ?ErrorMsg(),"\n"; -$rs = $db->Execute($stmt,array(10,20)); - -echo "
    Foreach Iterator Test (rand=".rand().")
    "; -$i = 0; -foreach($rs as $v) { - $i += 1; - echo "rec $i: "; $s1 = adodb_pr($v,true); $s2 = adodb_pr($rs->fields,true); - if ($s1 != $s2 && !empty($v)) {adodb_pr($s1); adodb_pr($s2);} - else echo "passed
    "; - flush(); -} - - -if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n"); -else echo "Count $i is correct
    "; - -$rs = $db->Execute("select bad from badder"); - -} catch (exception $e) { - adodb_pr($e); - echo "

    adodb_backtrace:

    \n"; - $e = adodb_backtrace($e->gettrace()); -} - -$rs = $db->Execute("select distinct id, firstname,lastname from adoxyz order by id"); -echo "Result=\n",$rs,"

    "; - -echo "

    Active Record

    "; -try { - include_once("../adodb-active-record.inc.php"); - class City extends ADOdb_Active_Record{}; - $a = new City(); - -} catch(exception $e){ - echo $e->getMessage(); -} - -try { - - ADOdb_Active_Record::SetDatabaseAdapter($db); - $a = new City(); - - echo "

    Successfully created City()
    "; - var_dump($a->GetPrimaryKeys()); - $a->city = 'Kuala Lumpur'; - $a->Save(); - $a->Update(); - $a->SetPrimaryKeys(array('city')); - $a->country = "M'sia"; - $a->save(); - $a->Delete(); -} catch(exception $e){ - echo $e->getMessage(); -} - -include_once("test-active-record.php"); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-xmlschema.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-xmlschema.php deleted file mode 100755 index 31994b67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test-xmlschema.php +++ /dev/null @@ -1,54 +0,0 @@ -Connect( 'localhost', 'root', '', 'test' ) || die('fail connect1'); - -// To create a schema object and build the query array. -$schema = new adoSchema( $db ); - -// To upgrade an existing schema object, use the following -// To upgrade an existing database to the provided schema, -// uncomment the following line: -#$schema->upgradeSchema(); - -print "SQL to build xmlschema.xml:\n

    ";
    -// Build the SQL array
    -$sql = $schema->ParseSchema( "xmlschema.xml" );
    -
    -var_dump( $sql );
    -print "
    \n"; - -// Execute the SQL on the database -//$result = $schema->ExecuteSchema( $sql ); - -// Finally, clean up after the XML parser -// (PHP won't do this for you!) -//$schema->Destroy(); - - - -print "SQL to build xmlschema-mssql.xml:\n
    ";
    -
    -$db2 = ADONewConnection('mssql');
    -$db2->Connect('','adodb','natsoft','northwind') || die("Fail 2");
    -
    -$db2->Execute("drop table simple_table");
    -
    -$schema = new adoSchema( $db2 );
    -$sql = $schema->ParseSchema( "xmlschema-mssql.xml" );
    -
    -print_r( $sql );
    -print "
    \n"; - -$db2->debug=1; - -foreach ($sql as $s) -$db2->Execute($s); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test.php deleted file mode 100755 index cd4bc57a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test.php +++ /dev/null @@ -1,1743 +0,0 @@ -$msg

    "; - flush(); -} - -function CheckWS($conn) -{ -global $ADODB_EXTENSION; - - include_once('../session/adodb-session.php'); - if (defined('CHECKWSFAIL')){ echo " TESTING $conn ";flush();} - $saved = $ADODB_EXTENSION; - $db = ADONewConnection($conn); - $ADODB_EXTENSION = $saved; - if (headers_sent()) { - print "

    White space detected in adodb-$conn.inc.php or include file...

    "; - //die(); - } -} - -function do_strtolower(&$arr) -{ - foreach($arr as $k => $v) { - if (is_object($v)) $arr[$k] = adodb_pr($v,true); - else $arr[$k] = strtolower($v); - } -} - - -function CountExecs($db, $sql, $inputarray) -{ -global $EXECS; $EXECS++; -} - -function CountCachedExecs($db, $secs2cache, $sql, $inputarray) -{ -global $CACHED; $CACHED++; -} - -// the table creation code is specific to the database, so we allow the user -// to define their own table creation stuff - -function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)") -{ -GLOBAL $ADODB_vers,$ADODB_CACHE_DIR,$ADODB_FETCH_MODE,$ADODB_COUNTRECS; - - //adodb_pr($db); - -?>
    -

    -
     
    -

    -Execute('select lastname,firstname,lastname,id from ADOXYZ'); - $arr = $rs->GetAssoc(); - echo "
    ";print_r($arr);
    -	die();*/
    -	
    -	if (!$db) die("testdb: database not inited");
    -	GLOBAL $EXECS, $CACHED;
    -	
    -	$EXECS = 0;
    -	$CACHED = 0;
    -	//$db->Execute("drop table adodb_logsql");
    -	if ((rand()%3) == 0) @$db->Execute("delete from adodb_logsql");
    -	$db->debug=1;
    -	
    -	$db->fnExecute = 'CountExecs';
    -	$db->fnCacheExecute = 'CountCachedExecs';
    -	
    -	if (empty($_GET['nolog'])) {
    -		echo "

    SQL Logging enabled

    "; - $db->LogSQL();/* - $sql = -"SELECT t1.sid, t1.sid, t1.title, t1.hometext, t1.notes, t1.aid, t1.informant, -t2.url, t2.email, t1.catid, t3.title, t1.topic, t4.topicname, t4.topicimage, -t4.topictext, t1.score, t1.ratings, t1.counter, t1.comments, t1.acomm -FROM `nuke_stories` `t1`, `nuke_authors` `t2`, `nuke_stories_cat` `t3`, `nuke_topics` `t4` - WHERE ((t2.aid=t1.aid) AND (t3.catid=t1.catid) AND (t4.topicid=t1.topic) - AND ((t1.alanguage='german') OR (t1.alanguage='')) AND (t1.ihome='0')) - ORDER BY t1.time DESC"; - $db->SelectLimit($sql); - echo $db->ErrorMsg();*/ - } - $ADODB_CACHE_DIR = dirname(TempNam('/tmp','testadodb')); - $db->debug = false; - //print $db->UnixTimeStamp('2003-7-22 23:00:00'); - - $phpv = phpversion(); - if (defined('ADODB_EXTENSION')) $ext = '   Extension '.ADODB_EXTENSION.' installed'; - else $ext = ''; - print "

    ADODB Version: $ADODB_vers Host: $db->host   Database: $db->database   PHP: $phpv $ext

    "; - - flush(); - - if (function_exists('date_default_timezone_set')) date_default_timezone_set('Asia/Kuala_Lumpur'); - - $arr = $db->ServerInfo(); - print_r($arr); - echo E_ALL,' ',E_STRICT, "
    "; - $e = error_reporting(E_ALL | E_STRICT); - echo error_reporting(),'

    '; - flush(); - #$db->debug=1; - $tt = $db->Time(); - if ($tt == 0) echo '
    $db->Time failed'; - else echo "
    db->Time: ".date('d-m-Y H:i:s',$tt); - echo '
    '; - - echo "Date=",$db->UserDate('2002-04-07'),'
    '; - print "date1 (1969-02-20) = ".$db->DBDate('1969-2-20'); - print "
    date1 (1999-02-20) = ".$db->DBDate('1999-2-20'); - print "
    date1.1 1999 = ".$db->DBDate("'1999'"); - print "
    date2 (1970-1-2) = ".$db->DBDate(24*3600)."

    "; - print "ts1 (1999-02-20 13:40:50) = ".$db->DBTimeStamp('1999-2-20 1:40:50 pm'); - print "
    ts1.1 (1999-02-20 13:40:00) = ".$db->DBTimeStamp('1999-2-20 13:40'); - print "
    ts2 (1999-02-20) = ".$db->DBTimeStamp('1999-2-20'); - print "
    ts3 (1970-1-2 +/- timezone) = ".$db->DBTimeStamp(24*3600); - print "
    Fractional TS (1999-2-20 13:40:50.91): ".$db->DBTimeStamp($db->UnixTimeStamp('1999-2-20 13:40:50.91+1')); - $dd = $db->UnixDate('1999-02-20'); - print "
    unixdate 1999-02-20 = ".date('Y-m-d',$dd)."

    "; - print "
    ts4 =".($db->UnixTimeStamp("19700101000101")+8*3600); - print "
    ts5 =".$db->DBTimeStamp($db->UnixTimeStamp("20040110092123")); - print "
    ts6 =".$db->UserTimeStamp("20040110092123"); - print "
    ts7 =".$db->DBTimeStamp("20040110092123"); - flush(); - // mssql too slow in failing bad connection - if (false && $db->databaseType != 'mssql') { - print "

    Testing bad connection. Ignore following error msgs:
    "; - $db2 = ADONewConnection(); - $rez = $db2->Connect("bad connection"); - $err = $db2->ErrorMsg(); - print "Error='$err'

    "; - if ($rez) print "Cannot check if connection failed. The Connect() function returned true.

    "; - } - #error_reporting($e); - flush(); - - //$ADODB_COUNTRECS=false; - $rs=$db->Execute('select * from ADOXYZ order by id'); - if($rs === false) $create = true; - else $rs->Close(); - - //if ($db->databaseType !='vfp') $db->Execute("drop table ADOXYZ"); - - if ($create) { - if (false && $db->databaseType == 'ibase') { - print "Please create the following table for testing:

    $createtab

    "; - return; - } else { - $db->debug = 99; - # $e = error_reporting(E_ALL-E_WARNING); - $db->Execute($createtab); - # error_reporting($e); - } - } - #error_reporting(E_ALL); - echo "

    Testing Metatypes

    "; - $t = $db->MetaType('varchar'); - if ($t != 'C') Err("Bad Metatype for varchar"); - - $rs = $db->Execute("delete from ADOXYZ"); // some ODBC drivers will fail the drop so we delete - if ($rs) { - if(! $rs->EOF) print "Error: RecordSet returned by Execute('delete...') should show EOF

    "; - $rs->Close(); - } else print "err=".$db->ErrorMsg(); - - print "

    Test select on empty table, FetchField when EOF, and GetInsertSQL

    "; - $rs = $db->Execute("select id,firstname from ADOXYZ where id=9999"); - if ($rs && !$rs->EOF) print "Error: RecordSet returned by Execute(select...') on empty table should show EOF

    "; - if ($rs->EOF && (($ox = $rs->FetchField(0)) && !empty($ox->name))) { - $record['id'] = 99; - $record['firstname'] = 'John'; - $sql = $db->GetInsertSQL($rs, $record); - if (strtoupper($sql) != strtoupper("INSERT INTO ADOXYZ ( id, firstname ) VALUES ( 99, 'John' )")) Err("GetInsertSQL does not work on empty table: $sql"); - } else { - Err("FetchField does not work on empty recordset, meaning GetInsertSQL will fail..."); - } - if ($rs) $rs->Close(); - flush(); - //$db->debug=true; - print "

    Testing Commit: "; - $time = $db->DBDate(time()); - if (!$db->BeginTrans()) { - print 'Transactions not supported

    '; - if ($db->hasTransactions) Err("hasTransactions should be false"); - } else { /* COMMIT */ - if (!$db->hasTransactions) Err("hasTransactions should be true"); - if ($db->transCnt != 1) Err("Invalid transCnt = $db->transCnt (should be 1)"); - $rs = $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (99,'Should Not','Exist (Commit)',$time)"); - if ($rs && $db->CommitTrans()) { - $rs->Close(); - $rs = $db->Execute("select * from ADOXYZ where id=99"); - if ($rs === false || $rs->EOF) { - print 'Data not saved

    '; - $rs = $db->Execute("select * from ADOXYZ where id=99"); - print_r($rs); - die(); - } else print 'OK

    '; - if ($rs) $rs->Close(); - } else { - if (!$rs) { - print "Insert failed

    "; - $db->RollbackTrans(); - } else print "Commit failed

    "; - } - if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)"); - - /* ROLLBACK */ - if (!$db->BeginTrans()) print "

    Error in BeginTrans()

    "; - print "

    Testing Rollback: "; - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (100,'Should Not','Exist (Rollback)',$time)"); - if ($db->RollbackTrans()) { - $rs = $db->Execute("select * from ADOXYZ where id=100"); - if ($rs && !$rs->EOF) print 'Fail: Data should rollback

    '; - else print 'OK

    '; - if ($rs) $rs->Close(); - } else - print "Commit failed

    "; - - $rs = $db->Execute('delete from ADOXYZ where id>50'); - if ($rs) $rs->Close(); - - if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)"); - } - - if (1) { - print "

    Testing MetaDatabases()

    "; - print_r( $db->MetaDatabases()); - - print "

    Testing MetaTables() and MetaColumns()

    "; - $a = $db->MetaTables(); - if ($a===false) print "MetaTables not supported

    "; - else { - print "Array of tables and views: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables('VIEW'); - if ($a===false) print "MetaTables not supported (views)

    "; - else { - print "Array of views: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables(false,false,'aDo%'); - if ($a===false) print "MetaTables not supported (mask)

    "; - else { - print "Array of ado%: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $a = $db->MetaTables('TABLE'); - if ($a===false) print "MetaTables not supported

    "; - else { - print "Array of tables: "; - foreach($a as $v) print " ($v) "; - print '

    '; - } - - $db->debug=0; - $rez = $db->MetaColumns("NOSUCHTABLEHERE"); - if ($rez !== false) { - Err("MetaColumns error handling failed"); - var_dump($rez); - } - $db->debug=1; - $a = $db->MetaColumns('ADOXYZ'); - if ($a===false) print "MetaColumns not supported

    "; - else { - print "

    Columns of ADOXYZ:
    "; - foreach($a as $v) {print_r($v); echo "
    ";} - echo "
    "; - } - - print "

    Testing MetaIndexes

    "; - - $a = $db->MetaIndexes(('ADOXYZ'),true); - if ($a===false) print "MetaIndexes not supported

    "; - else { - print "

    Indexes of ADOXYZ:
    "; - adodb_pr($a); - echo "
    "; - } - print "

    Testing MetaPrimaryKeys

    "; - $a = $db->MetaPrimaryKeys('ADOXYZ'); - var_dump($a); - } - $rs = $db->Execute('delete from ADOXYZ'); - if ($rs) $rs->Close(); - - $db->debug = false; - - - switch ($db->databaseType) { - case 'vfp': - - if (0) { - // memo test - $rs = $db->Execute("select data from memo"); - rs2html($rs); - } - break; - - case 'postgres7': - case 'postgres64': - case 'postgres': - case 'ibase': - print "

    Encode=".$db->BlobEncode("abc\0d\"' -ef")."

    ";//' - - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('ADOXYZ',false,true); - print_r($arr); - if (!$arr) Err("No MetaForeignKeys"); - break; - - case 'odbc_mssql': - case 'mssqlpo': - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('Orders',false,true); - print_r($arr); - if (!$arr) Err("Bad MetaForeignKeys"); - if ($db->databaseType == 'odbc_mssql') break; - - case 'mssql': - - -/* -ASSUME Northwind available... - -CREATE PROCEDURE SalesByCategory - @CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998' -AS -IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998' -BEGIN - SELECT @OrdYear = '1998' -END - -SELECT ProductName, - TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0) -FROM [Order Details] OD, Orders O, Products P, Categories C -WHERE OD.OrderID = O.OrderID - AND OD.ProductID = P.ProductID - AND P.CategoryID = C.CategoryID - AND C.CategoryName = @CategoryName - AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear -GROUP BY ProductName -ORDER BY ProductName -GO - - -CREATE PROCEDURE ADODBTestSP -@a nvarchar(25) -AS -SELECT GETDATE() AS T, @a AS A -GO -*/ - print "

    Testing Stored Procedures for mssql

    "; - $saved = $db->debug; - $db->debug=true; - $assoc = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $cmd = $db->PrepareSP('ADODBTestSP'); - $ss = "You should see me in the output."; - $db->InParameter($cmd,$ss,'a'); - $rs = $db->Execute($cmd); - #var_dump($rs->fields); - echo $rs->fields['T']." --- ".$rs->fields['A']."---
    "; - - $cat = 'Dairy Products'; - $yr = '1998'; - - $stmt = $db->PrepareSP('SalesByCategory'); - $db->InParameter($stmt,$cat,'CategoryName'); - $db->InParameter($stmt,$yr,'OrdYear'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $cat = 'Grains/Cereals'; - $yr = 1998; - - $stmt = $db->PrepareSP('SalesByCategory'); - $db->InParameter($stmt,$cat,'CategoryName'); - $db->InParameter($stmt,$yr,'OrdYear'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $ADODB_FETCH_MODE = $assoc; - - /* - Test out params - works in PHP 4.2.3 and 4.3.3 and 4.3.8 but not 4.3.0: - - CREATE PROCEDURE at_date_interval - @days INTEGER, - @start VARCHAR(20) OUT, - @end VARCHAR(20) OUT - AS - BEGIN - set @start = CONVERT(VARCHAR(20), getdate(), 101) - set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 ) - END - GO - */ - $db->debug=1; - $stmt = $db->PrepareSP('at_date_interval'); - $days = 10; - $begin_date = ''; - $end_date = ''; - $db->InParameter($stmt,$days,'days', 4, SQLINT4); - $db->OutParameter($stmt,$begin_date,'start', 20, SQLVARCHAR ); - $db->OutParameter($stmt,$end_date,'end', 20, SQLVARCHAR ); - $db->Execute($stmt); - if (empty($begin_date) or empty($end_date) or $begin_date == $end_date) { - Err("MSSQL SP Test for OUT Failed"); - print "begin=$begin_date end=$end_date

    "; - } else print "(Today +10days) = (begin=$begin_date end=$end_date)

    "; - - $db->debug = $saved; - break; - case 'oci8': - case 'oci8po': - - if (0) { - $t = getmicrotime(); - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $arr = $db->GetArray('select * from abalone_tree'); - $arr = $db->GetArray('select * from abalone_tree'); - $arr = $db->GetArray('select * from abalone_tree'); - echo "

    t = ",getmicrotime() - $t,"

    "; - die(); - } - - # cleanup - $db->Execute("delete from photos where id=99 or id=1"); - $db->Execute("insert into photos (id) values(1)"); - $db->Execute("update photos set photo=null,descclob=null where id=1"); - - $saved = $db->debug; - $db->debug=true; - - - - /* - CREATE TABLE PHOTOS - ( - ID NUMBER(16), - PHOTO BLOB, - DESCRIPTION VARCHAR2(4000 BYTE), - DESCCLOB CLOB - ); - - INSERT INTO PHOTOS (ID) VALUES(1); - */ - $s = ''; - for ($i = 0; $i <= 500; $i++) { - $s .= '1234567890'; - } - - $sql = "INSERT INTO photos ( ID, photo) ". - "VALUES ( :id, empty_blob() )". - " RETURNING photo INTO :xx"; - - - $blob_data = $s; - $id = 99; - - $stmt = $db->PrepareSP($sql); - $db->InParameter($stmt, $id, 'id'); - $blob = $db->InParameter($stmt, $s, 'xx',-1, OCI_B_BLOB); - $db->StartTrans(); - $result = $db->Execute($stmt); - $db->CompleteTrans(); - - $s2= $db->GetOne("select photo from photos where id=99"); - echo "
    ---$s2"; - if ($s !== $s2) Err("insert blob does not match"); - - print "

    Testing Blob: size=".strlen($s)."

    "; - $ok = $db->Updateblob('photos','photo',$s,'id=1'); - if (!$ok) Err("Blob failed 1"); - else { - $s2= $db->GetOne("select photo from photos where id=1"); - if ($s !== $s2) Err("updateblob does not match"); - } - - print "

    Testing Clob: size=".strlen($s)."

    "; - $ok = $db->UpdateClob('photos','descclob',$s,'id=1'); - if (!$ok) Err("Clob failed 1"); - else { - $s2= $db->GetOne("select descclob from photos where id=1"); - if ($s !== $s2) Err("updateclob does not match"); - } - - - $s = ''; - $s2 = ''; - print "

    Testing Foreign Keys

    "; - $arr = $db->MetaForeignKeys('emp','scott'); - print_r($arr); - if (!$arr) Err("Bad MetaForeignKeys"); -/* --- TEST PACKAGE --- "Set scan off" turns off substitution variables. -Set scan off; - -CREATE OR REPLACE PACKAGE Adodb AS -TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE; -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR); -PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) ; -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR); -PROCEDURE data_in(input IN VARCHAR); -PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER); -END Adodb; -/ - - -CREATE OR REPLACE PACKAGE BODY Adodb AS -PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS - BEGIN - OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames; - END open_tab; - - PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS - BEGIN - OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames; - tablenames := 'TEST'; - END open_tab2; - -PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS - BEGIN - output := 'Cinta Hati '||input; - END; - -PROCEDURE data_in(input IN VARCHAR) IS - ignore varchar(1000); - BEGIN - ignore := input; - END; - -PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER) AS -BEGIN -p2 := p1; -END; -END Adodb; -/ - -*/ - - print "

    Testing Cursor Variables

    "; - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:zz,'A%'); END;",'zz'); - - if ($rs && !$rs->EOF) { - $v = $db->GetOne("SELECT count(*) FROM tab where tname like 'A%'"); - if ($v == $rs->RecordCount()) print "Test 1 RowCount: OK

    "; - else Err("Test 1 RowCount ".$rs->RecordCount().", actual = $v"); - } else { - print "Error in using Cursor Variables 1

    "; - } - $rs->Close(); - - print "

    Testing Stored Procedures for oci8

    "; - - $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;"); - $a1 = 'Malaysia'; - //$a2 = ''; # a2 doesn't even need to be defined! - $db->InParameter($stmt,$a1,'a1'); - $db->OutParameter($stmt,$a2,'a2'); - $rs = $db->Execute($stmt); - if ($rs) { - if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

    "; - else echo "OK: a2=$a2

    "; - } else { - print "Error in using Stored Procedure IN/Out Variables

    "; - } - - $tname = 'A%'; - - $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); - $db->Parameter($stmt,$tname,'tablename'); - $rs = $db->Execute($stmt); - rs2html($rs); - - $stmt = $db->PrepareSP("begin adodb.data_in(:a1); end;"); - $db->InParameter($stmt,$a1,'a1'); - $db->Execute($stmt); - - $db->debug = $saved; - break; - - default: - break; - } - $arr = array( - array(1,'Caroline','Miranda'), - array(2,'John','Lim'), - array(3,'Wai Hun','See') - ); - //$db->debug=1; - print "

    Testing Bulk Insert of 3 rows

    "; - - $sql = "insert into ADOXYZ (id,firstname,lastname) values (".$db->Param('0').",".$db->Param('1').",".$db->Param('2').")"; - $db->StartTrans(); - $db->Execute($sql,$arr); - $db->CompleteTrans(); - $rs = $db->Execute('select * from ADOXYZ order by id'); - if (!$rs || $rs->RecordCount() != 3) Err("Bad bulk insert"); - - rs2html($rs); - - $db->Execute('delete from ADOXYZ'); - - print "

    Inserting 50 rows

    "; - - for ($i = 0; $i < 5; $i++) { - - $time = $db->DBDate(time()); - if (empty($_GET['hide'])) $db->debug = true; - switch($db->databaseType){ - case 'mssqlpo': - case 'mssql': - $sqlt = "CREATE TABLE mytable ( - row1 INT IDENTITY(1,1) NOT NULL, - row2 varchar(16), - PRIMARY KEY (row1))"; - //$db->debug=1; - if (!$db->Execute("delete from mytable")) - $db->Execute($sqlt); - - $ok = $db->Execute("insert into mytable (row2) values ('test')"); - $ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id); - if ($ins_id == 0) Err("Bad Insert_ID()"); - $ins_id2 = $db->GetOne("select row1 from mytable"); - if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2"); - - $arr = array(0=>'Caroline',1=>'Miranda'); - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)"; - break; - case 'mysqli': - case 'mysqlt': - case 'mysql': - $sqlt = "CREATE TABLE `mytable` ( - `row1` int(11) NOT NULL auto_increment, - `row2` varchar(16) NOT NULL default '', - PRIMARY KEY (`row1`), - KEY `myindex` (`row1`,`row2`) -) "; - if (!$db->Execute("delete from mytable")) - $db->Execute($sqlt); - - $ok = $db->Execute("insert into mytable (row2) values ('test')"); - $ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id); - if ($ins_id == 0) Err("Bad Insert_ID()"); - $ins_id2 = $db->GetOne("select row1 from mytable"); - if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2"); - - default: - $arr = array(0=>'Caroline',1=>'Miranda'); - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)"; - break; - - case 'oci8': - case 'oci805': - $arr = array('first'=>'Caroline','last'=>'Miranda'); - $amt = rand() % 100; - $sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,:first,:last,$time)"; - break; - } - if ($i & 1) { - $sql = $db->Prepare($sql); - } - $rs = $db->Execute($sql,$arr); - - if ($rs === false) Err( 'Error inserting with parameters'); - else $rs->Close(); - $db->debug = false; - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+1,'John','Lim',$time)"); - /*$ins_id=$db->Insert_ID(); - echo "Insert ID=";var_dump($ins_id);*/ - if ($db->databaseType == 'mysql') if ($ins_id == 0) Err('Bad Insert_ID'); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+2,'Mary','Lamb',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+3,'George','Washington',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+4,'Mr. Alan','Tam',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+5,'Alan',".$db->quote("Turing'ton").",$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created)values ($i*10+6,'Serena','Williams',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+7,'Yat Sun','Sun',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+8,'Wai Hun','See',$time )"); - $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+9,'Steven','Oey',$time )"); - } // for - if (1) { - $db->debug=1; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $cnt = $db->GetOne("select count(*) from ADOXYZ"); - $rs = $db->Execute('update ADOXYZ set id=id+1'); - if (!is_object($rs)) { - print_r($rs); - err("Update should return object"); - } - if (!$rs) err("Update generated error"); - - $nrows = $db->Affected_Rows(); - if ($nrows === false) print "

    Affected_Rows() not supported

    "; - else if ($nrows != $cnt) print "

    Affected_Rows() Error: $nrows returned (should be 50)

    "; - else print "

    Affected_Rows() passed

    "; - } - - if ($db->dataProvider == 'oci8') $array = array('zid'=>1,'zdate'=>date('Y-m-d',time())); - else $array=array(1,date('Y-m-d',time())); - - - #$array = array(1,date('Y-m-d',time())); - $id = $db->GetOne("select id from ADOXYZ - where id=".$db->Param('zid')." and created>=".$db->Param('ZDATE')."", - $array); - if ($id != 1) Err("Bad bind; id=$id"); - else echo "
    Bind date/integer 1 passed"; - - $array =array(1,$db->BindDate(time())); - $id = $db->GetOne("select id from ADOXYZ - where id=".$db->Param('0')." and created>=".$db->Param('1')."", - $array); - if ($id != 1) Err("Bad bind; id=$id"); - else echo "
    Bind date/integer 2 passed"; - - $db->debug = false; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - ////////////////////////////////////////////////////////////////////////////////////////// - - $rs = $db->Execute("select * from ADOXYZ where firstname = 'not known'"); - if (!$rs || !$rs->EOF) print "

    Error on empty recordset

    "; - else if ($rs->RecordCount() != 0) { - print "

    Error on RecordCount. Should be 0. Was ".$rs->RecordCount()."

    "; - print_r($rs->fields); - } - if ($db->databaseType !== 'odbc') { - $rs = $db->Execute("select id,firstname,lastname,created,".$db->random." from ADOXYZ order by id"); - if ($rs) { - if ($rs->RecordCount() != 50) { - print "

    RecordCount returns ".$rs->RecordCount().", should be 50

    "; - adodb_pr($rs->GetArray()); - $poc = $rs->PO_RecordCount('ADOXYZ'); - if ($poc == 50) print "

        PO_RecordCount passed

    "; - else print "

    PO_RecordCount returns wrong value: $poc

    "; - } else print "

    RecordCount() passed

    "; - if (isset($rs->fields['firstname'])) print '

    The fields columns can be indexed by column name.

    '; - else { - Err( '

    The fields columns cannot be indexed by column name.

    '); - print_r($rs->fields); - } - if (empty($_GET['hide'])) rs2html($rs); - } - else print "

    Error in Execute of SELECT with random

    "; - } - $val = $db->GetOne("select count(*) from ADOXYZ"); - if ($val == 50) print "

    GetOne returns ok

    "; - else print "

    Fail: GetOne returns $val

    "; - - echo "GetRow Test"; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $val1 = $db->GetRow("select count(*) from ADOXYZ"); - $val2 = $db->GetRow("select count(*) from ADOXYZ"); - if ($val1[0] == 50 and sizeof($val1) == 1 and $val2[0] == 50 and sizeof($val2) == 1) print "

    GetRow returns ok

    "; - else { - print_r($val); - print "

    Fail: GetRow returns {$val2[0]}

    "; - } - - print "

    FetchObject/FetchNextObject Test

    "; - $rs = $db->Execute('select * from ADOXYZ'); - if ($rs) { - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - - while ($o = $rs->FetchNextObject()) { // calls FetchObject internally - if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) { - print_r($o); - print "

    Firstname is not string

    "; - break; - } - } - } else { - print "

    Failed rs

    "; - die("

    ADOXYZ table cannot be read - die()"); - } - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - print "

    FetchObject/FetchNextObject Test 2

    "; - #$db->debug=99; - $rs = $db->Execute('select * from ADOXYZ'); - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - print_r($rs->fields); - while ($o = $rs->FetchNextObject()) { // calls FetchObject internally - if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) { - print_r($o); - print "

    Firstname is not string

    "; - break; - } - } - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - $savefetch = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - print "

    CacheSelectLimit Test...

    "; - $db->debug=1; - $rs = $db->CacheSelectLimit('select id, firstname from ADOXYZ order by id',2); - - if ($rs && !$rs->EOF) { - if (isset($rs->fields[0])) { - Err("ASSOC has numeric fields"); - print_r($rs->fields); - } - if ($rs->fields['id'] != 1) {Err("Error"); print_r($rs->fields);}; - if (trim($rs->fields['firstname']) != 'Caroline') {print Err("Error 2"); print_r($rs->fields);}; - - $rs->MoveNext(); - if ($rs->fields['id'] != 2) {Err("Error 3"); print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) { - Err("Error EOF"); - print_r($rs); - } - } - - print "

    FETCH_MODE = ASSOC: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',2); - if ($rs && !$rs->EOF) { - if (ADODB_ASSOC_CASE == 2) { - $id = 'ID'; - $fname = 'FIRSTNAME'; - }else { - $id = 'id'; - $fname = 'firstname'; - } - if ($rs->fields[$id] != 1) {Err("Error 1"); print_r($rs->fields);}; - if (trim($rs->fields[$fname]) != 'Caroline') {Err("Error 2"); print_r($rs->fields);}; - $rs->MoveNext(); - if ($rs->fields[$id] != 2) {Err("Error 3"); print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - else if (is_array($rs->fields) || $rs->fields) { - Err("Error: ## fields should be set to false on EOF"); - print_r($rs->fields); - } - } - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - print "

    FETCH_MODE = NUM: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - if (isset($rs->fields['id'])) Err("FETCH_NUM has ASSOC fields"); - if ($rs->fields[0] != 1) {Err("Error 1"); print_r($rs->fields);}; - if (trim($rs->fields[1]) != 'Caroline') {Err("Error 2");print_r($rs->fields);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - - } - $ADODB_FETCH_MODE = $savefetch; - - $db->debug = false; - print "

    GetRowAssoc Upper: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(); - if ($arr['ID'] != 1) {Err("Error 1");print_r($arr);}; - if (trim($arr['FIRSTNAME']) != 'Caroline') {Err("Error 2"); print_r($arr);}; - $rs->MoveNext(); - if (!$rs->EOF) Err("Error EOF"); - - } - print "

    GetRowAssoc Lower: Should get 1, Caroline

    "; - $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); - if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(false); - if ($arr['id'] != 1) {Err("Error 1"); print_r($arr);}; - if (trim($arr['firstname']) != 'Caroline') {Err("Error 2"); print_r($arr);}; - - } - - print "

    GetCol Test

    "; - $col = $db->GetCol('select distinct firstname from ADOXYZ order by 1'); - if (!is_array($col)) Err("Col size is wrong"); - if (trim($col[0]) != 'Alan' or trim($col[9]) != 'Yat Sun') Err("Col elements wrong"); - - $db->debug = true; - - - echo "

    Date Update Test

    "; - $zdate = date('Y-m-d',time()+3600*24); - $zdate = $db->DBDate($zdate); - $db->Execute("update ADOXYZ set created=$zdate where id=1"); - $row = $db->GetRow("select created,firstname from ADOXYZ where id=1"); - print_r($row); echo "
    "; - - - - print "

    SelectLimit Distinct Test 1: Should see Caroline, John and Mary

    "; - $rs = $db->SelectLimit('select distinct * from ADOXYZ order by id',3); - - - if ($rs && !$rs->EOF) { - if (trim($rs->fields[1]) != 'Caroline') Err("Error 1 (exp Caroline), ".$rs->fields[1]); - $rs->MoveNext(); - - if (trim($rs->fields[1]) != 'John') Err("Error 2 (exp John), ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Mary') Err("Error 3 (exp Mary),".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) Err("Error EOF"); - //rs2html($rs); - } else Err("Failed SelectLimit Test 1"); - - print "

    SelectLimit Test 2: Should see Mary, George and Mr. Alan

    "; - $rs = $db->SelectLimit('select * from ADOXYZ order by id',3,2); - if ($rs && !$rs->EOF) { - if (trim($rs->fields[1]) != 'Mary') Err("Error 1 - No Mary, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'George')Err("Error 2 - No George, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Mr. Alan') Err("Error 3 - No Mr. Alan, instead: ".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) Err("Error EOF"); - // rs2html($rs); - } - else Err("Failed SelectLimit Test 2 ". ($rs ? 'EOF':'no RS')); - - print "

    SelectLimit Test 3: Should see Wai Hun and Steven

    "; - $db->debug=1; - global $A; $A=1; - $rs = $db->SelectLimit('select * from ADOXYZ order by id',-1,48); - $A=0; - if ($rs && !$rs->EOF) { - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - if (trim($rs->fields[1]) != 'Wai Hun') Err("Error 1 ".$rs->fields[1]); - $rs->MoveNext(); - if (trim($rs->fields[1]) != 'Steven') Err("Error 2 ".$rs->fields[1]); - $rs->MoveNext(); - if (! $rs->EOF) { - Err("Error EOF"); - } - //rs2html($rs); - } - else Err("Failed SelectLimit Test 3"); - $db->debug = false; - - - $rs = $db->Execute("select * from ADOXYZ order by id"); - print "

    Testing Move()

    "; - if (!$rs)Err( "Failed Move SELECT"); - else { - if (!$rs->Move(2)) { - if (!$rs->canSeek) print "

    $db->databaseType: Move(), MoveFirst() nor MoveLast() not supported.

    "; - else print '

    RecordSet->canSeek property should be set to false

    '; - } else { - $rs->MoveFirst(); - if (trim($rs->Fields("firstname")) != 'Caroline') { - print "

    $db->databaseType: MoveFirst failed -- probably cannot scroll backwards

    "; - } - else print "MoveFirst() OK
    "; - - // Move(3) tests error handling -- MoveFirst should not move cursor - $rs->Move(3); - if (trim($rs->Fields("firstname")) != 'George') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(3) failed

    "; - } else print "Move(3) OK
    "; - - $rs->Move(7); - if (trim($rs->Fields("firstname")) != 'Yat Sun') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(7) failed

    "; - print_r($rs); - } else print "Move(7) OK
    "; - if ($rs->EOF) Err("Move(7) is EOF already"); - $rs->MoveLast(); - if (trim($rs->Fields("firstname")) != 'Steven'){ - print '

    '.$rs->Fields("id")."$db->databaseType: MoveLast() failed

    "; - print_r($rs); - }else print "MoveLast() OK
    "; - $rs->MoveNext(); - if (!$rs->EOF) err("Bad MoveNext"); - if ($rs->canSeek) { - $rs->Move(3); - if (trim($rs->Fields("firstname")) != 'George') { - print '

    '.$rs->Fields("id")."$db->databaseType: Move(3) after MoveLast failed

    "; - - } else print "Move(3) after MoveLast() OK
    "; - } - - print "

    Empty Move Test"; - $rs = $db->Execute("select * from ADOXYZ where id > 0 and id < 0"); - $rs->MoveFirst(); - if (!$rs->EOF || $rs->fields) Err("Error in empty move first"); - } - } - - $rs = $db->Execute('select * from ADOXYZ where id = 2'); - if ($rs->EOF || !is_array($rs->fields)) Err("Error in select"); - $rs->MoveNext(); - if (!$rs->EOF) Err("Error in EOF (xx) "); - // $db->debug=true; - print "

    Testing ADODB_FETCH_ASSOC and concat: concat firstname and lastname

    "; - - $save = $ADODB_FETCH_MODE; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - if ($db->dataProvider == 'postgres') { - $sql = "select ".$db->Concat('cast(firstname as varchar)',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ"; - $rs = $db->Execute($sql); - } else { - $sql = "select distinct ".$db->Concat('firstname',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ"; - $rs = $db->Execute($sql); - } - if ($rs) { - if (empty($_GET['hide'])) rs2html($rs); - } else { - Err( "Failed Concat:".$sql); - } - $ADODB_FETCH_MODE = $save; - print "
    Testing GetArray() "; - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - $rs = $db->Execute("select * from ADOXYZ order by id"); - if ($rs) { - $arr = $rs->GetArray(10); - if (sizeof($arr) != 10 || trim($arr[1][1]) != 'John' || trim($arr[1][2]) != 'Lim') print $arr[1][1].' '.$arr[1][2]."   ERROR
    "; - else print " OK
    "; - } - - $arr = $db->GetArray("select x from ADOXYZ"); - $e = $db->ErrorMsg(); $e2 = $db->ErrorNo(); - echo "Testing error handling, should see illegal column 'x' error=$e ($e2)
    "; - if (!$e || !$e2) Err("Error handling did not work"); - print "Testing FetchNextObject for 1 object "; - $rs = $db->Execute("select distinct lastname,firstname from ADOXYZ where firstname='Caroline'"); - $fcnt = 0; - if ($rs) - while ($o = $rs->FetchNextObject()) { - $fcnt += 1; - } - if ($fcnt == 1) print " OK
    "; - else print "FAILED
    "; - - $stmt = $db->Prepare("select * from ADOXYZ where id < 3"); - $rs = $db->Execute($stmt); - if (!$rs) Err("Prepare failed"); - else { - $arr = $rs->GetArray(); - if (!$arr) Err("Prepare failed 2"); - if (sizeof($arr) != 2) Err("Prepare failed 3"); - } - print "Testing GetAssoc() "; - $savecrecs = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = false; - //$arr = $db->GetArray("select lastname,firstname from ADOXYZ"); - //print_r($arr); - print "
    "; - $rs = $db->Execute("select distinct lastname,firstname,created from ADOXYZ"); - - if ($rs) { - $arr = $rs->GetAssoc(); - //print_r($arr); - if (empty($arr['See']) || trim(reset($arr['See'])) != 'Wai Hun') print $arr['See']."   ERROR
    "; - else print " OK 1"; - } - - $arr = $db->GetAssoc("select distinct lastname,firstname from ADOXYZ"); - if ($arr) { - //print_r($arr); - if (empty($arr['See']) || trim($arr['See']) != 'Wai Hun') print $arr['See']."   ERROR
    "; - else print " OK 2
    "; - } - // Comment this out to test countrecs = false - $ADODB_COUNTRECS = $savecrecs; - $db->debug=1; - $query = $db->Prepare("select count(*) from ADOXYZ"); - $rs = $db->CacheExecute(10,$query); - if (reset($rs->fields) != 50) echo Err("$cnt wrong for Prepare/CacheGetOne"); - - for ($loop=0; $loop < 1; $loop++) { - print "Testing GetMenu() and CacheExecute
    "; - $db->debug = true; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - - - - if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu('menu','Steven').'
    '; - else print " Fail
    "; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu('menu','Steven',false).'
    '; - else print " Fail
    "; - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - - if ($rs) print ' 1st line set to **** , Steven selected: '. $rs->GetMenu('menu','Steven','1st:****').'
    '; - else print " Fail
    "; - - - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print ' Multiple, Alan selected: '. $rs->GetMenu('menu','Alan',false,true).'
    '; - else print " Fail
    "; - print '


    '; - - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) { - print ' Multiple, Alan and George selected: '. $rs->GetMenu('menu',array('Alan','George'),false,true); - if (empty($rs->connection)) print "Connection object missing from recordset
    "; - } else print " Fail
    "; - print '


    '; - - print "Testing GetMenu3()
    "; - $rs = $db->Execute("select ".$db->Concat('firstname',"'-'",'id').",id, lastname from ADOXYZ order by lastname,id"); - if ($rs) print "Grouped Menu: ".$rs->GetMenu3('name'); - else Err('Grouped Menu GetMenu3()'); - print "
    "; - - print "Testing GetMenu2()
    "; - $rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu2('menu',('Oey')).'
    '; - else print " Fail
    "; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu2('menu',('Oey'),false).'
    '; - else print " Fail
    "; - } - echo "

    CacheExecute

    "; - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - print_r($rs->fields); echo $rs->fetchMode;echo "
    "; - echo $rs->Fields('firstname'); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ"); - print_r($rs->fields);echo "
    "; - echo $rs->Fields('firstname'); - $db->debug = false; - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - // phplens - - $sql = 'select * from ADOXYZ where 0=1'; - echo "

    **Testing '$sql' (phplens compat 1)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'"); - if (!$rs->FieldCount()) err( "No fields returned for $sql"); - if (!$rs->FetchField(1)) err( "FetchField failed for $sql"); - - $sql = 'select * from ADOXYZ order by 1'; - echo "

    **Testing '$sql' (phplens compat 2)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'
    ".$db->ErrorMsg()."
    "); - - - $sql = 'select * from ADOXYZ order by 1,1'; - echo "

    **Testing '$sql' (phplens compat 3)

    "; - $rs = $db->Execute($sql); - if (!$rs) err( "No recordset returned for '$sql'
    ".$db->ErrorMsg()."
    "); - - - // Move - $rs1 = $db->Execute("select id from ADOXYZ where id <= 2 order by 1"); - $rs2 = $db->Execute("select id from ADOXYZ where id = 3 or id = 4 order by 1"); - - if ($rs1) $rs1->MoveLast(); - if ($rs2) $rs2->MoveLast(); - - if (empty($rs1) || empty($rs2) || $rs1->fields[0] != 2 || $rs2->fields[0] != 4) { - $a = $rs1->fields[0]; - $b = $rs2->fields[0]; - print "

    Error in multiple recordset test rs1=$a rs2=$b (should be rs1=2 rs2=4)

    "; - } else - print "

    Testing multiple recordsets OK

    "; - - - echo "

    GenID test: "; - for ($i=1; $i <= 10; $i++) - echo "($i: ",$val = $db->GenID($db->databaseType.'abcseq6' ,5), ") "; - if ($val == 0) Err("GenID not supported"); - - if ($val) { - $db->DropSequence('abc_seq2'); - $db->CreateSequence('abc_seq2'); - $val = $db->GenID('abc_seq2'); - $db->DropSequence('abc_seq2'); - $db->CreateSequence('abc_seq2'); - $val = $db->GenID('abc_seq2'); - if ($val != 1) Err("Drop and Create Sequence not supported ($val)"); - } - echo "

    "; - - if (substr($db->dataProvider,0,3) != 'notused') { // used to crash ado - $sql = "select firstnames from ADOXYZ"; - print "

    Testing execution of illegal statement: $sql

    "; - if ($db->Execute($sql) === false) { - print "

    This returns the following ErrorMsg(): ".$db->ErrorMsg()." and ErrorNo(): ".$db->ErrorNo().'

    '; - } else - print "

    Error in error handling -- Execute() should return false

    "; - } else - print "

    ADO skipped error handling of bad select statement

    "; - - print "

    ASSOC TEST 2
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->query('select * from ADOXYZ order by id'); - if ($ee = $db->ErrorMsg()) { - Err("Error message=$ee"); - } - if ($ee = $db->ErrorNo()) { - Err("Error No = $ee"); - } - print_r($rs->fields); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - - - print "

    BOTH TEST 2
    "; - if ($db->dataProvider == 'ado') { - print "ADODB_FETCH_BOTH not supported for dataProvider=".$db->dataProvider."
    "; - } else { - $ADODB_FETCH_MODE = ADODB_FETCH_BOTH; - $rs = $db->query('select * from ADOXYZ order by id'); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - } - - print "

    NUM TEST 2
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->query('select * from ADOXYZ order by id'); - for($i=0;$i<$rs->FieldCount();$i++) - { - $fld=$rs->FetchField($i); - print "
    Field name is ".$fld->name; - print " ".$rs->Fields($fld->name); - } - - print "

    ASSOC Test of SelectLimit
    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->selectlimit('select * from ADOXYZ order by id',3,4); - $cnt = 0; - while ($rs && !$rs->EOF) { - $cnt += 1; - if (!isset($rs->fields['firstname'])) { - print "
    ASSOC returned numeric field

    "; - break; - } - $rs->MoveNext(); - } - if ($cnt != 3) print "
    Count should be 3, instead it was $cnt

    "; - - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - if ($db->sysDate) { - $saved = $db->debug; - $db->debug = 1; - $rs = $db->Execute("select {$db->sysDate} from ADOXYZ where id=1"); - if (ADORecordSet::UnixDate(date('Y-m-d')) != $rs->UnixDate($rs->fields[0])) { - print "

    Invalid date {$rs->fields[0]}

    "; - } else - print "

    Passed \$sysDate test ({$rs->fields[0]})

    "; - - print_r($rs->FetchField(0)); - print time(); - $db->debug=$saved; - } else { - print "

    \$db->sysDate not defined

    "; - } - - print "

    Test CSV

    "; - include_once('../toexport.inc.php'); - //$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $rs = $db->SelectLimit('select id,firstname,lastname,created,\'He, he\' he,\'"\' q from ADOXYZ',10); - - print "
    ";
    -	print rs2csv($rs);
    -	print "
    "; - - $rs = $db->SelectLimit('select id,firstname,lastname,created,\'The "young man", he said\' from ADOXYZ',10); - - if (PHP_VERSION < 5) { - print "
    ";
    -		rs2tabout($rs);
    -		print "
    "; - } - print " CacheFlush "; - $db->CacheFlush(); - - $date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A'); - $sql = "SELECT $date from ADOXYZ"; - print "

    Test SQLDate: ".htmlspecialchars($sql)."

    "; - $rs = $db->SelectLimit($sql,1); - $d = date('d-m-M-Y-').'Q'.(ceil(date('m')/3.0)).date(' h:i:s A'); - if (!$rs) Err("SQLDate query returned no recordset"); - else if ($d != $rs->fields[0]) Err("SQLDate 1 failed expected:
    act:$d
    sql:".$rs->fields[0]); - - $date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A',$db->DBDate("1974-02-25")); - $sql = "SELECT $date from ADOXYZ"; - print "

    Test SQLDate: ".htmlspecialchars($sql)."

    "; - $db->debug=1; - $rs = $db->SelectLimit($sql,1); - $ts = ADOConnection::UnixDate('1974-02-25'); - $d = date('d-m-M-Y-',$ts).'Q'.(ceil(date('m',$ts)/3.0)).date(' h:i:s A',$ts); - if (!$rs) { - Err("SQLDate query returned no recordset"); - echo $db->ErrorMsg(),'
    '; - } else if ($d != reset($rs->fields)) { - Err("SQLDate 2 failed expected:
    act:$d
    sql:".$rs->fields[0].'
    '.$db->ErrorMsg()); - } - - - print "

    Test Filter

    "; - $db->debug = 1; - - $rs = $db->SelectLimit('select * from ADOXYZ where id < 3 order by id'); - - $rs = RSFilter($rs,'do_strtolower'); - if (trim($rs->fields[1]) != 'caroline' && trim($rs->fields[2]) != 'miranda') { - err('**** RSFilter failed'); - print_r($rs->fields); - } - - rs2html($rs); - - $db->debug=1; - - - print "

    Test Replace

    "; - - $ret = $db->Replace('ADOXYZ', - array('id'=>1,'firstname'=>'Caroline','lastname'=>'Miranda'), - array('id'), - $autoq = true); - if (!$ret) echo "

    Error in replacing existing record

    "; - else { - $saved = $db->debug; - $db->debug = 0; - $savec = $ADODB_COUNTRECS; - $ADODB_COUNTRECS = true; - $rs = $db->Execute('select * FROM ADOXYZ where id=1'); - $db->debug = $saved; - if ($rs->RecordCount() != 1) { - $cnt = $rs->RecordCount(); - rs2html($rs); - print "Error - Replace failed, count=$cnt

    "; - } - $ADODB_COUNTRECS = $savec; - } - $ret = $db->Replace('ADOXYZ', - array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'), - array('id','firstname'), - $autoq = true); - if ($ret != 2) print "Replace failed: "; - print "test A return value=$ret (2 expected)

    "; - - $ret = $db->Replace('ADOXYZ', - array('id'=>1000,'firstname'=>'Sherazade','lastname'=>'Al-Rashid'), - 'id', - $autoq = true); - if ($ret != 1) - if ($db->dataProvider == 'ibase' && $ret == 2); - else print "Replace failed: "; - print "test B return value=$ret (1 or if ibase then 2 expected)

    "; - - print "

    rs2rs Test

    "; - - $rs = $db->Execute('select * from ADOXYZ where id>= 1 order by id'); - $rs = $db->_rs2rs($rs); - $rs->valueX = 'X'; - $rs->MoveNext(); - $rs = $db->_rs2rs($rs); - if (!isset($rs->valueX)) err("rs2rs does not preserve array recordsets"); - if (reset($rs->fields) != 1) err("rs2rs does not move to first row: id=".reset($rs->fields)); - - ///////////////////////////////////////////////////////////// - include_once('../pivottable.inc.php'); - print "

    Pivot Test

    "; - $db->debug=true; - $sql = PivotTableSQL( - $db, # adodb connection - 'ADOXYZ', # tables - 'firstname', # row fields - 'lastname', # column fields - false, # join - 'ID', # sum - 'Sum ', # label for sum - 'sum', # aggregate function - true - ); - $rs = $db->Execute($sql); - if ($rs) rs2html($rs); - else Err("Pivot sql error"); - - $pear = true; //true; - $db->debug=false; - - if ($pear) { - // PEAR TESTS BELOW - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - - include_once "PEAR.php"; - $rs = $db->query('select * from ADOXYZ where id>0 and id<10 order by id'); - - $i = 0; - if ($rs && !$rs->EOF) { - while ($arr = $rs->fetchRow()) { - $i++; - //print "$i "; - if ($arr[0] != $i) { - print_r($arr); - print "

    PEAR DB emulation error 1.

    "; - $pear = false; - break; - } - } - $rs->Close(); - } - - - if ($i != $db->GetOne('select count(*) from ADOXYZ where id>0 and id<10')) { - print "

    PEAR DB emulation error 1.1 EOF ($i)

    "; - $pear = false; - } - - $rs = $db->limitQuery('select * from ADOXYZ where id>0 order by id',$i=3,$top=3); - $i2 = $i; - if ($rs && !$rs->EOF) { - - while (!is_object($rs->fetchInto($arr))) { - $i2++; - - // print_r($arr); - // print "$i ";print_r($arr); - if ($arr[0] != $i2) { - print "

    PEAR DB emulation error 2.

    "; - $pear = false; - break; - } - } - $rs->Close(); - } - if ($i2 != $i+$top) { - print "

    PEAR DB emulation error 2.1 EOF (correct=$i+$top, actual=$i2)

    "; - $pear = false; - } - } - if ($pear) print "

    PEAR DB emulation passed.

    "; - flush(); - - - $rs = $db->SelectLimit("select ".$db->sysDate." from ADOXYZ",1); - $date = $rs->fields[0]; - if (!$date) Err("Bad sysDate"); - else { - $ds = $db->UserDate($date,"d m Y"); - if ($ds != date("d m Y")) Err("Bad UserDate: ".$ds.' expected='.date("d m Y")); - else echo "Passed UserDate: $ds

    "; - } - $db->debug=1; - if ($db->dataProvider == 'oci8') - $rs = $db->SelectLimit("select to_char(".$db->sysTimeStamp.",'YYYY-MM-DD HH24:MI:SS') from ADOXYZ",1); - else - $rs = $db->SelectLimit("select ".$db->sysTimeStamp." from ADOXYZ",1); - $date = $rs->fields[0]; - if (!$date) Err("Bad sysTimeStamp"); - else { - $ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y"); - if ($ds != date("H \\h\\r\\s-d m Y")) Err("Bad UserTimeStamp: ".$ds.", correct is ".date("H \\h\\r\\s-d m Y")); - else echo "Passed UserTimeStamp: $ds

    "; - - $date = 100; - $ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y"); - $ds2 = date("H \\h\\r\\s-d m Y",$date); - if ($ds != $ds2) Err("Bad UserTimeStamp 2: $ds: $ds2"); - else echo "Passed UserTimeStamp 2: $ds

    "; - } - flush(); - - if ($db->hasTransactions) { - $db->debug=1; - echo "

    Testing StartTrans CompleteTrans

    "; - $db->raiseErrorFn = false; - - $db->SetTransactionMode('SERIALIZABLE'); - $db->StartTrans(); - $rs = $db->Execute('select * from notable'); - $db->StartTrans(); - $db->BeginTrans(); - $db->Execute("update ADOXYZ set firstname='Carolx' where id=1"); - $db->CommitTrans(); - $db->CompleteTrans(); - $rez = $db->CompleteTrans(); - $db->SetTransactionMode(''); - $db->debug=0; - if ($rez !== false) { - if (is_null($rez)) Err("Error: _transOK not modified"); - else Err("Error: CompleteTrans (1) should have failed"); - } else { - $name = $db->GetOne("Select firstname from ADOXYZ where id=1"); - if ($name == "Carolx") Err("Error: CompleteTrans (2) should have failed"); - else echo "

    -- Passed StartTrans test1 - rolling back

    "; - } - - $db->StartTrans(); - $db->BeginTrans(); - $db->Execute("update ADOXYZ set firstname='Carolx' where id=1"); - $db->RollbackTrans(); - $rez = $db->CompleteTrans(); - if ($rez !== true) Err("Error: CompleteTrans (1) should have succeeded"); - else { - $name = $db->GetOne("Select firstname from ADOXYZ where id=1"); - if (trim($name) != "Carolx") Err("Error: CompleteTrans (2) should have succeeded, returned name=$name"); - else echo "

    -- Passed StartTrans test2 - commiting

    "; - } - } - flush(); - $saved = $db->debug; - $db->debug=1; - $cnt = _adodb_getcount($db, 'select * from ADOXYZ where firstname in (select firstname from ADOXYZ)'); - echo "Count= $cnt"; - $db->debug=$saved; - - global $TESTERRS; - $debugerr = true; - - global $ADODB_LANG;$ADODB_LANG = 'fr'; - $db->debug = false; - $TESTERRS = 0; - $db->raiseErrorFn = 'adodb_test_err'; - global $ERRNO; // from adodb_test_err - $db->Execute('select * from nowhere'); - $metae = $db->MetaError($ERRNO); - if ($metae !== DB_ERROR_NOSUCHTABLE) print "

    MetaError=".$metae." wrong, should be ".DB_ERROR_NOSUCHTABLE."

    "; - else print "

    MetaError ok (".DB_ERROR_NOSUCHTABLE."): ".$db->MetaErrorMsg($metae)."

    "; - if ($TESTERRS != 1) print "raiseErrorFn select nowhere failed
    "; - $rs = $db->Execute('select * from ADOXYZ'); - if ($debugerr) print " Move"; - $rs->Move(100); - $rs->_queryID = false; - if ($debugerr) print " MoveNext"; - $rs->MoveNext(); - if ($debugerr) print " $rs=false"; - $rs = false; - - flush(); - - print "

    SetFetchMode() tests

    "; - $db->SetFetchMode(ADODB_FETCH_ASSOC); - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC"); - - $ADODB_FETCH_MODE = ADODB_FETCH_NUM; - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - //var_dump($rs->fields); - if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC"); - - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $db->SetFetchMode(ADODB_FETCH_NUM); - $rs = $db->SelectLimit('select firstname from ADOXYZ',1); - if (!isset($rs->fields[0])) Err("BAD FETCH NUM"); - - flush(); - - print "

    Test MetaTables again with SetFetchMode()

    "; - $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - $db->SetFetchMode(ADODB_FETCH_ASSOC); - print_r($db->MetaTables()); - print "

    "; - - //////////////////////////////////////////////////////////////////// - - print "

    Testing Bad Connection

    "; - flush(); - - if (true || PHP_VERSION < 5) { - if ($db->dataProvider == 'odbtp') $db->databaseType = 'odbtp'; - $conn = NewADOConnection($db->databaseType); - $conn->raiseErrorFn = 'adodb_test_err'; - if (1) $conn->PConnect('abc','baduser','badpassword'); - if ($TESTERRS == 2) print "raiseErrorFn tests passed
    "; - else print "raiseErrorFn tests failed ($TESTERRS)
    "; - - flush(); - } - //////////////////////////////////////////////////////////////////// - - global $nocountrecs; - - if (isset($nocountrecs) && $ADODB_COUNTRECS) err("Error: \$ADODB_COUNTRECS is set"); - if (empty($nocountrecs) && $ADODB_COUNTRECS==false) err("Error: \$ADODB_COUNTRECS is not set"); - - flush(); -?> -

    -
     
    -

    -Close(); - if ($rs2) $rs2->Close(); - if ($rs) $rs->Close(); - $db->Close(); - - if ($db->transCnt != 0) Err("Error in transCnt=$db->transCnt (should be 0)"); - - - printf("

    Total queries=%d; total cached=%d

    ",$EXECS+$CACHED, $CACHED); - flush(); -} - -function adodb_test_err($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false) -{ -global $TESTERRS,$ERRNO; - - $ERRNO = $errno; - $TESTERRS += 1; - print "** $dbms ($fn): errno=$errno   errmsg=$errmsg ($p1,$p2)
    "; -} - -//-------------------------------------------------------------------------------------- - - -@set_time_limit(240); // increase timeout - -include("../tohtml.inc.php"); -include("../adodb.inc.php"); -include("../rsfilter.inc.php"); - -/* White Space Check */ - -if (isset($_SERVER['argv'][1])) { - //print_r($_SERVER['argv']); - $_GET[$_SERVER['argv'][1]] = 1; -} - -if (@$_SERVER['COMPUTERNAME'] == 'TIGRESS') { - CheckWS('mysqlt'); - CheckWS('postgres'); - CheckWS('oci8po'); - - CheckWS('firebird'); - CheckWS('sybase'); - if (!ini_get('safe_mode')) CheckWS('informix'); - - CheckWS('ado_mssql'); - CheckWS('ado_access'); - CheckWS('mssql'); - - CheckWS('vfp'); - CheckWS('sqlanywhere'); - CheckWS('db2'); - CheckWS('access'); - CheckWS('odbc_mssql'); - CheckWS('firebird15'); - // - CheckWS('oracle'); - CheckWS('proxy'); - CheckWS('fbsql'); - print "White Space Check complete

    "; -} -if (sizeof($_GET) == 0) $testmysql = true; - - -foreach($_GET as $k=>$v) { - //global $$k; - $$k = $v; -} -if (strpos(PHP_VERSION,'5') === 0) { - //$testaccess=1; - //$testmssql = 1; - //$testsqlite=1; -} -?> - -ADODB Testing - -

    ADODB Test

    - -This script tests the following databases: Interbase, Oracle, Visual FoxPro, Microsoft Access (ODBC and ADO), MySQL, MSSQL (ODBC, native, ADO). -There is also support for Sybase, PostgreSQL.

    -For the latest version of ADODB, visit
    adodb.sourceforge.net.

    - -Test GetInsertSQL/GetUpdateSQL   - Sessions   - Paging   - Perf Monitor

    -vers=",ADOConnection::Version(); - - -include_once('../adodb-time.inc.php'); -if (isset($_GET['time'])) adodb_date_test(); - -?> -

    ADODB Database Library (c) 2000-2007 John Lim. All rights reserved. Released under BSD and LGPL, PHP .

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test2.php deleted file mode 100755 index 3b1dafea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test2.php +++ /dev/null @@ -1,26 +0,0 @@ -debug=1; - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;' - . 'DATA SOURCE=' . $access . ';'; - - echo "

    PHP ",PHP_VERSION,"

    "; - - $db->Connect($myDSN) || die('fail'); - - print_r($db->ServerInfo()); - - try { - $rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx"); - print_r($rs->fields); - } catch(exception $e) { - print_r($e); - echo "

    Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y'); - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test3.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test3.php deleted file mode 100755 index 01552b41..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test3.php +++ /dev/null @@ -1,44 +0,0 @@ -Connect('','scott','natsoft'); -$db->debug=1; - -$cnt = $db->GetOne("select count(*) from adoxyz"); -$rs = $db->Execute("select * from adoxyz order by id"); - -$i = 0; -foreach($rs as $k => $v) { - $i += 1; - echo $k; adodb_pr($v); - flush(); -} - -if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n"); - - - -$rs = $db->Execute("select bad from badder"); - -} catch (exception $e) { - adodb_pr($e); - $e = adodb_backtrace($e->trace); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test4.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test4.php deleted file mode 100755 index 8305a7a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test4.php +++ /dev/null @@ -1,143 +0,0 @@ -PConnect("", "sa", "natsoft", "northwind"); // connect to MySQL, testdb - -$conn = &ADONewConnection("mysql"); // create a connection -$conn->PConnect("localhost", "root", "", "test"); // connect to MySQL, testdb - - -#$conn =& ADONewConnection('oci8po'); -#$conn->Connect('','scott','natsoft'); - -if (PHP_VERSION >= 5) { - $connstr = "mysql:dbname=northwind"; - $u = 'root';$p=''; - $conn =& ADONewConnection('pdo'); - $conn->Connect($connstr, $u, $p); -} -//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; - - -$conn->debug=1; -$conn->Execute("delete from adoxyz where lastname like 'Smi%'"); - -$rs = $conn->Execute($sql); // Execute the query and get the empty recordset -$record = array(); // Initialize an array to hold the record data to insert - -if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 751; -$record["firstname"] = 'Jann'; -$record["lastname"] = "Smitts"; -$record["created"] = time(); - -$insertSQL = $conn->GetInsertSQL($rs, $record); -$conn->Execute($insertSQL); // Insert the record into the database - -if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 752; -// Set the values for the fields in the record -$record["firstname"] = 'anull'; -$record["lastname"] = "Smith\$@//"; -$record["created"] = time(); - -if (isset($_GET['f'])) $ADODB_FORCE_TYPE = $_GET['f']; - -//$record["id"] = -1; - -// Pass the empty recordset and the array containing the data to insert -// into the GetInsertSQL function. The function will process the data and return -// a fully formatted insert sql statement. -$insertSQL = $conn->GetInsertSQL($rs, $record); -$conn->Execute($insertSQL); // Insert the record into the database - - - -$insertSQL2 = $conn->GetInsertSQL($table='ADOXYZ', $record); -if ($insertSQL != $insertSQL2) echo "

    Walt's new stuff failed: $insertSQL2

    "; -//========================== -// This code tests an update - -$sql = " -SELECT * -FROM ADOXYZ WHERE lastname=".$conn->Param('var'). " ORDER BY 1"; -// Select a record to update - -$varr = array('var'=>$record['lastname'].''); -$rs = $conn->Execute($sql,$varr); // Execute the query and get the existing record to update -if (!$rs || $rs->EOF) print "

    No record found!

    "; - -$record = array(); // Initialize an array to hold the record data to update - - -// Set the values for the fields in the record -$record["firstName"] = "Caroline".rand(); -//$record["lasTname"] = ""; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = ''; -// Pass the single record recordset and the array containing the data to update -// into the GetUpdateSQL function. The function will process the data and return -// a fully formatted update sql statement. -// If the data has not changed, no recordset is returned - -$updateSQL = $conn->GetUpdateSQL($rs, $record); -$conn->Execute($updateSQL,$varr); // Update the record in the database -if ($conn->Affected_Rows() != 1)print "

    Error1 : Rows Affected=".$conn->Affected_Rows().", should be 1

    "; - -$record["firstName"] = "Caroline".rand(); -$record["lasTname"] = "Smithy Jones"; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = 331; -$updateSQL = $conn->GetUpdateSQL($rs, $record); -$conn->Execute($updateSQL,$varr); // Update the record in the database -if ($conn->Affected_Rows() != 1)print "

    Error 2: Rows Affected=".$conn->Affected_Rows().", should be 1

    "; - -$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'"); -//adodb_pr($rs); -rs2html($rs); - -$record["firstName"] = "Carol-new-".rand(); -$record["lasTname"] = "Smithy"; // Update Caroline's lastname from Miranda to Smith -$record["creAted"] = '2002-12-'.(rand()%30+1); -$record['num'] = 331; - -$conn->AutoExecute('ADOXYZ',$record,'UPDATE', "lastname like 'Sm%'"); -$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'"); -//adodb_pr($rs); -rs2html($rs); -} - - -testsql(); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test5.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test5.php deleted file mode 100755 index d7fe9d60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test5.php +++ /dev/null @@ -1,47 +0,0 @@ -debug=1; - $conn->PConnect("localhost","root","","xphplens"); - print $conn->databaseType.':'.$conn->GenID().'
    '; -} - -if (0) { - $conn = &ADONewConnection("oci8"); // create a connection - $conn->debug=1; - $conn->PConnect("falcon", "scott", "tiger", "juris8.ecosystem.natsoft.com.my"); // connect to MySQL, testdb - print $conn->databaseType.':'.$conn->GenID(); -} - -if (0) { - $conn = &ADONewConnection("ibase"); // create a connection - $conn->debug=1; - $conn->Connect("localhost:c:\\Interbase\\Examples\\Database\\employee.gdb", "sysdba", "masterkey", ""); // connect to MySQL, testdb - print $conn->databaseType.':'.$conn->GenID().'
    '; -} - -if (0) { - $conn = &ADONewConnection('postgres'); - $conn->debug=1; - @$conn->PConnect("susetikus","tester","test","test"); - print $conn->databaseType.':'.$conn->GenID().'
    '; -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test_rs_array.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test_rs_array.php deleted file mode 100755 index a6a04f06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/test_rs_array.php +++ /dev/null @@ -1,47 +0,0 @@ -InitArray($array,$typearr); - -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    1 Seek
    "; -$rs->Move(1); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    2 Seek
    "; -$rs->Move(2); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - -echo "
    3 Seek
    "; -$rs->Move(3); -while (!$rs->EOF) { - print_r($rs->fields);echo "
    "; - $rs->MoveNext(); -} - - - -die(); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testcache.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testcache.php deleted file mode 100755 index 262b16cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testcache.php +++ /dev/null @@ -1,29 +0,0 @@ - - -PConnect('nwind'); -} else { - $db = ADONewConnection('mysql'); - $db->PConnect('mangrove','root','','xphplens'); -} -if (isset($cache)) $rs = $db->CacheExecute(120,'select * from products'); -else $rs = $db->Execute('select * from products'); - -$arr = $rs->GetArray(); -print sizeof($arr); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testdatabases.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testdatabases.inc.php deleted file mode 100755 index 1a87421c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testdatabases.inc.php +++ /dev/null @@ -1,442 +0,0 @@ - - -
    -
    -> Access
    -> Interbase
    -> MSSQL
    - > MySQL
    -> MySQL ODBC
    -> MySQLi -
    -
    > SQLite
    -> MySQL Proxy
    -> Oracle (oci8)
    -> PostgreSQL
    -> PostgreSQL ODBC
    -
    -> PgSQL PDO
    -> MySQL PDO
    -> SQLite PDO
    -> Access PDO
    -> MSSQL PDO
    - -> OCI PDO
    - -
    > DB2
    -> VFP+ODBTP
    -> ADO (for mssql and access)
    -> $ADODB_COUNTRECS=false
    -> No SQL Logging
    -> ADOdb time test -
    - - - -FETCH MODE IS NOT ADODB_FETCH_DEFAULT"; - -if (isset($nocountrecs)) $ADODB_COUNTRECS = false; - -// cannot test databases below, but we include them anyway to check -// if they parse ok... - -if (!strpos(PHP_VERSION,'5') === 0) { - ADOLoadCode("sybase"); - //ADOLoadCode("postgres"); - //ADOLoadCode("postgres7"); - ADOLoadCode("firebird"); - ADOLoadCode("borland_ibase"); - ADOLoadCode("informix"); - ADOLoadCode("sqlanywhere"); -// ADOLoadCode('mysqli'); -} - - -flush(); -if (!empty($testpostgres)) { - //ADOLoadCode("postgres"); - - $db = &ADONewConnection('postgres'); - print "

    Connecting $db->databaseType...

    "; - if ($db->Connect("localhost","tester","test","test")) { - testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname varchar,created date)"); - }else - print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.
    ".$db->ErrorMsg(); -} - -if (!empty($testpgodbc)) { - - $db = &ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - - if ($db->PConnect('Postgresql')) { - $db->hasTransactions = true; - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - } else print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.
    ".$db->ErrorMsg(); -} - -if (!empty($testibase)) { - //$_GET['nolog'] = true; - $db = &ADONewConnection('firebird'); - print "

    Connecting $db->databaseType...

    "; - if ($db->PConnect("localhost:d:\\firebird\\151\\examples\\EMPLOYEE.fdb", "sysdba", "masterkey", "")) - testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname char(24),price numeric(12,2),created date)"); - else print "ERROR: Interbase test requires a database called employee.gdb".'
    '.$db->ErrorMsg(); - -} - - -if (!empty($testsqlite)) { - $path =urlencode('d:\inetpub\adodb\sqlite.db'); - $dsn = "sqlite://$path/"; - $db = ADONewConnection($dsn); - //echo $dsn; - - //$db = &ADONewConnection('sqlite'); - - - if ($db && $db->PConnect("d:\\inetpub\\adodb\\sqlite.db", "", "", "")) { - print "

    Connecting $db->databaseType...

    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else - print "ERROR: SQLite"; - -} - -if (!empty($testpdopgsql)) { - $connstr = "pgsql:dbname=test"; - $u = 'tester';$p='test'; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomysql)) { - $connstr = "mysql:dbname=northwind"; - $u = 'root';$p=''; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdomssql)) { - $connstr = "mssql:dbname=northwind"; - $u = 'sa';$p='natsoft'; - $db = &ADONewConnection('pdo'); - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdosqlite)) { - $connstr = "sqlite:d:/inetpub/adodb/sqlite-pdo.db3"; - $u = '';$p=''; - $db = &ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoaccess)) { - $connstr = 'odbc:nwind'; - $u = '';$p=''; - $db = &ADONewConnection('pdo'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -if (!empty($testpdoora)) { - $connstr = 'oci:'; - $u = 'scott';$p='natsoft'; - $db = &ADONewConnection('pdo'); - #$db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - $db->Connect($connstr,$u,$p) || die("CONNECT FAILED"); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); -} - -// REQUIRES ODBC DSN CALLED nwind -if (!empty($testaccess)) { - $db = &ADONewConnection('access'); - print "

    Connecting $db->databaseType...

    "; - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $dsn = "nwind"; - $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=$access;Uid=Admin;Pwd=;"; - - //$dsn = 'Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=' . $access . ';'; - if ($db->PConnect($dsn, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - else print "ERROR: Access test requires a Windows ODBC DSN=nwind, Access driver"; - -} - -if (!empty($testaccess) && !empty($testado)) { // ADO ACCESS - - $db = &ADONewConnection("ado_access"); - print "

    Connecting $db->databaseType...

    "; - - $access = 'd:\inetpub\wwwroot\php\NWIND.MDB'; - $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;' - . 'DATA SOURCE=' . $access . ';'; - //. 'USER ID=;PASSWORD=;'; - $_GET['nolog'] = 1; - if ($db->PConnect($myDSN, "", "", "")) { - print "ADO version=".$db->_connectionID->version."
    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: Access test requires a Access database $access".'
    '.$db->ErrorMsg(); - -} - -if (!empty($testvfp)) { // ODBC - $db = &ADONewConnection('vfp'); - print "

    Connecting $db->databaseType...

    ";flush(); - - if ( $db->PConnect("vfp-adoxyz")) { - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - - echo "
    "; - $db = &ADONewConnection('odbtp'); - - if ( $db->PConnect('localhost','DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=d:\inetpub\adodb;EXCLUSIVE=NO;')) { - print "

    Connecting $db->databaseType...

    ";flush(); - testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)"); - } else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver"; - -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysql)) { // MYSQL - - - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - $user = 'root'; $password = ''; $database = 'northwind'; - $db = &ADONewConnection("mysqlt://$user:$password@$server/$database?persist"); - print "

    Connecting $db->databaseType...

    "; - - if (true || $db->PConnect($server, "root", "", "northwind")) { - //$db->Execute("DROP TABLE ADOXYZ") || die('fail drop'); - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) Type=InnoDB"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqli)) { // MYSQL - - $db = &ADONewConnection('mysqli'); - print "

    Connecting $db->databaseType...

    "; - if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect($server, "root", "", "northwind")) { - //$db->debug=1;$db->Execute('drop table ADOXYZ'); - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)"); - } else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - - -// REQUIRES MySQL server at localhost with database 'test' -if (!empty($testmysqlodbc)) { // MYSQL - - $db = &ADONewConnection('odbc'); - $db->hasTransactions = false; - print "

    Connecting $db->databaseType...

    "; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - else $server = "mangrove"; - if ($db->PConnect('mysql', "root", "")) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); -} - -if (!empty($testproxy)){ - $db = &ADONewConnection('proxy'); - print "

    Connecting $db->databaseType...

    "; - if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost'; - - if ($db->PConnect('http://localhost/php/phplens/adodb/server.php')) - testdb($db, - "create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb"); - else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'
    '.$db->ErrorMsg(); - -} - -ADOLoadCode('oci805'); -ADOLoadCode("oci8po"); - -if (!empty($testoracle)) { - $dsn = "oci8po://juris10:natsoft@sherkhan?persist"; - $db = ADONewConnection($dsn );//'oci8'); - - //$db->debug=1; - print "

    Connecting $db->databaseType...

    "; - if (true || $db->Connect('', "scott", "natsoft",'')) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else - print "ERROR: Oracle test requires an Oracle server setup with scott/natsoft".'
    '.$db->ErrorMsg(); - -} -ADOLoadCode("oracle"); // no longer supported -if (false && !empty($testoracle)) { - - $db = ADONewConnection(); - print "

    Connecting $db->databaseType...

    "; - if ($db->PConnect("", "scott", "tiger", "natsoft.domain")) - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - else print "ERROR: Oracle test requires an Oracle server setup with scott/tiger".'
    '.$db->ErrorMsg(); - -} - -ADOLoadCode("odbc_db2"); // no longer supported -if (!empty($testdb2)) { - if (PHP_VERSION>=5.1) { - $db = ADONewConnection("db2"); - print "

    Connecting $db->databaseType...

    "; - - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect('localhost','natsoft','guest','test')) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
    '.$db->ErrorMsg(); - } else { - $db = ADONewConnection("odbc_db2"); - print "

    Connecting $db->databaseType...

    "; - - $dsn = "db2test"; - #$db->curMode = SQL_CUR_USE_ODBC; - #$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest"; - if ($db->Connect($dsn)) { - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'
    '.$db->ErrorMsg(); - } -echo "
    "; -flush(); - $dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP; uid=root; pwd=natsoft"; - - $db = ADONewConnection('odbtp'); - if ($db->Connect('127.0.0.1',$dsn)) { - - $db->debug=1; - $arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr); - $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr); - - testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)"); - } else echo ("ERROR Connection"); - echo $db->ErrorMsg(); -} - - -$server = 'sherkhan'; - - - -ADOLoadCode("mssqlpo"); -if (!empty($testmssql)) { // MS SQL Server -- the extension is buggy -- probably better to use ODBC - $db = ADONewConnection("mssqlpo"); - //$db->debug=1; - print "

    Connecting $db->databaseType...

    "; - - $ok = $db->Connect('','adodb','natsoft','northwind'); - - if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) { - AutoDetect_MSSQL_Date_Order($db); - // $db->Execute('drop table adoxyz'); - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='192.168.0.1', userid='adodb', password='natsoft', database='ai'".'
    '.$db->ErrorMsg(); - -} - - -ADOLoadCode('odbc_mssql'); -if (!empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection(); - - print "

    Connecting $db->databaseType...

    "; - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;"; - - if ($db->PConnect($dsn, "adodb", "natsoft", "")) { - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - -ADOLoadCode("ado_mssql"); -if (!empty($testmssql) && !empty($testado) ) { // ADO ACCESS MSSQL -- thru ODBC -- DSN-less - - $db = &ADONewConnection("ado_mssql"); - //$db->debug=1; - print "

    Connecting DSN-less $db->databaseType...

    "; - - $myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};" - . "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No"; - - - if ($db->PConnect($myDSN, "", "", "")) - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - else print "ERROR: MSSQL test 2 requires MS SQL 7"; - -} - -if (!empty($testmssql) && !empty($testado)) { // ADO ACCESS MSSQL with OLEDB provider - - $db = &ADONewConnection("ado_mssql"); - print "

    Connecting DSN-less OLEDB Provider $db->databaseType...

    "; - //$db->debug=1; - $myDSN="SERVER=localhost;DATABASE=northwind;Trusted_Connection=yes"; - if ($db->PConnect($myDSN, "adodb", "natsoft", 'SQLOLEDB')) { - testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)"); - } else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='mangrove', userid='sa', password='', database='ai'"; - -} - - -if (extension_loaded('odbtp') && !empty($testmssql)) { // MS SQL Server via ODBC - $db = ADONewConnection('odbtp'); - - $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;uid=adodb;pwd=natsoft"; - - if ($db->PConnect('localhost',$dsn, "", "")) { - print "

    Connecting $db->databaseType...

    "; - testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)"); - } - else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup"; - -} - - -print "

    Tests Completed

    "; - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testgenid.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testgenid.php deleted file mode 100755 index 14b48ce3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testgenid.php +++ /dev/null @@ -1,36 +0,0 @@ -Execute("drop table $table"); - //$db->debug=true; - - $ctr = 5000; - $lastnum = 0; - - while (--$ctr >= 0) { - $num = $db->GenID($table); - if ($num === false) { - print "GenID returned false"; - break; - } - if ($lastnum + 1 == $num) print " $num "; - else { - print " $num "; - flush(); - } - $lastnum = $num; - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testmssql.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testmssql.php deleted file mode 100755 index 29764df3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testmssql.php +++ /dev/null @@ -1,76 +0,0 @@ -Connect('127.0.0.1','adodb','natsoft','northwind') or die('Fail'); - -$conn->debug =1; -$query = 'select * from products'; -$conn->SetFetchMode(ADODB_FETCH_ASSOC); -$rs = $conn->Execute($query); -echo "
    ";
    -while( !$rs->EOF ) {
    -	$output[] = $rs->fields;
    -	var_dump($rs->fields);
    -	$rs->MoveNext();
    -	print "

    "; -} -die(); - - -$p = $conn->Prepare('insert into products (productname,unitprice,dcreated) values (?,?,?)'); -echo "

    ";
    -print_r($p);
    -
    -$conn->debug=1;
    -$conn->Execute($p,array('John'.rand(),33.3,$conn->DBDate(time())));
    -
    -$p = $conn->Prepare('select * from products where productname like ?');
    -$arr = $conn->getarray($p,array('V%'));
    -print_r($arr);
    -die();
    -
    -//$conn = &ADONewConnection("mssql");
    -//$conn->Connect('mangrove','sa','natsoft','ai');
    -
    -//$conn->Connect('mangrove','sa','natsoft','ai');
    -$conn->debug=1;
    -$conn->Execute('delete from blobtest');
    -
    -$conn->Execute('insert into blobtest (id) values(1)');
    -$conn->UpdateBlobFile('blobtest','b1','../cute_icons_for_site/adodb.gif','id=1');
    -$rs = $conn->Execute('select b1 from blobtest where id=1');
    -
    -$output = "c:\\temp\\test_out-".date('H-i-s').".gif"; 
    -print "Saving file $output, size=".strlen($rs->fields[0])."

    "; -$fd = fopen($output, "wb"); -fwrite($fd, $rs->fields[0]); -fclose($fd); - -print " View Image"; -//$rs = $conn->Execute('SELECT id,SUBSTRING(b1, 1, 10) FROM blobtest'); -//rs2html($rs); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8.php deleted file mode 100755 index 62689a0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8.php +++ /dev/null @@ -1,83 +0,0 @@ - - -PConnect('','scott','natsoft'); - if (!empty($testblob)) { - $varHoldingBlob = 'ABC DEF GEF John TEST'; - $num = time()%10240; - // create table atable (id integer, ablob blob); - $db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())'); - $db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB'); - - $rs = &$db->Execute('select * from atable'); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } - $stmt = $db->Prepare('select * from adoxyz where id=?'); - for ($i = 1; $i <= 10; $i++) { - $rs = &$db->Execute( - $stmt, - array($i)); - - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); - } -} -if (1) { - $db = ADONewConnection('oci8'); - $db->PConnect('','scott','natsoft'); - $db->debug = true; - $db->Execute("delete from emp where ename='John'"); - print $db->Affected_Rows().'
    '; - $stmt = &$db->Prepare('insert into emp (empno, ename) values (:empno, :ename)'); - $rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John')); - // prepare not quite ready for prime time - //$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John')); - if (!$rs) die("Empty RS"); - - $db->setfetchmode(ADODB_FETCH_NUM); - - $vv = 'A%'; - $stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true); - $db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR); - $db->OutParameter($stmt, $vv, 'tt'); - $rs = $db->Execute($stmt); - while (!$rs->EOF) { - adodb_pr($rs->fields); - $rs->MoveNext(); - } - echo " val = $vv"; - -} - -if (0) { - $db = ADONewConnection('odbc_oracle'); - if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect'); - $db->debug = true; - $rs = &$db->Execute( - 'select * from adoxyz where firstname=? and trim(lastname)=?', - array('first'=>'Caroline','last'=>'Miranda')); - if (!$rs) die("Empty RS"); - if ($rs->EOF) die("EOF RS"); - rs2html($rs); -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8cursor.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8cursor.php deleted file mode 100755 index 68bff07e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testoci8cursor.php +++ /dev/null @@ -1,111 +0,0 @@ -PConnect('','scott','natsoft'); - $db->debug = 99; - - -/* -*/ - - define('MYNUM',5); - - - $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;"); - - if ($rs && !$rs->EOF) { - print "Test 1 RowCount: ".$rs->RecordCount()."

    "; - } else { - print "Error in using Cursor Variables 1

    "; - } - - print "

    Testing Stored Procedures for oci8

    "; - - $stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;'); - $db->OutParameter($stid, $myov, 'myov'); - $db->Execute($stid); - if ($myov != MYNUM) print "

    Error with myproc

    "; - - - $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true); - $a1 = 'Malaysia'; - //$a2 = ''; # a2 doesn't even need to be defined! - $db->InParameter($stmt,$a1,'a1'); - $db->OutParameter($stmt,$a2,'a2'); - $rs = $db->Execute($stmt); - if ($rs) { - if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

    "; - else echo "OK: a2=$a2

    "; - } else { - print "Error in using Stored Procedure IN/Out Variables

    "; - } - - - $tname = 'A%'; - - $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); - $db->Parameter($stmt,$tname,'tablename'); - $rs = $db->Execute($stmt); - rs2html($rs); - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpaging.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpaging.php deleted file mode 100755 index b99cbafe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpaging.php +++ /dev/null @@ -1,86 +0,0 @@ -PConnect('localhost','tester','test','test'); -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->PConnect("nwind", "", "", ""); -} - -if ($driver == 'ibase') { - $db = NewADOConnection('ibase'); - $db->PConnect("localhost:e:\\firebird\\examples\\employee.gdb", "sysdba", "masterkey", ""); - $sql = 'select distinct firstname, lastname from adoxyz order by firstname'; - -} -if ($driver == 'mssql') { - $db = NewADOConnection('mssql'); - $db->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -} -if ($driver == 'oci8') { - $db = NewADOConnection('oci8'); - $db->Connect('','scott','natsoft'); - -$sql = "select * from (select ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz - order by 1)"; -} - -if ($driver == 'access') { - $db = NewADOConnection('access'); - $db->Connect('nwind'); -} - -if (empty($driver) or $driver == 'mysql') { - $db = NewADOConnection('mysql'); - $db->Connect('localhost','root','','test'); -} - -//$db->pageExecuteCountRows = false; - -$db->debug = true; - -if (0) { -$rs = &$db->Execute($sql); -include_once('../toexport.inc.php'); -print "

    ";
    -print rs2csv($rs); # return a string
    -
    -print '
    '; -$rs->MoveFirst(); # note, some databases do not support MoveFirst -print rs2tab($rs); # return a string - -print '
    '; -$rs->MoveFirst(); -rs2tabout($rs); # send to stdout directly -print "
    "; -} - -$pager = new ADODB_Pager($db,$sql); -$pager->showPageLinks = true; -$pager->linksPerPage = 10; -$pager->cache = 60; -$pager->Render($rows=7); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpear.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpear.php deleted file mode 100755 index a85924e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testpear.php +++ /dev/null @@ -1,34 +0,0 @@ -setFetchMode(ADODB_FETCH_ASSOC); -$rs = $db->Query('select firstname,lastname from adoxyz'); -$cnt = 0; -while ($arr = $rs->FetchRow()) { - print_r($arr); - print "
    "; - $cnt += 1; -} - -if ($cnt != 50) print "Error in \$cnt = $cnt"; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testsessions.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testsessions.php deleted file mode 100755 index c9fb1dec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/testsessions.php +++ /dev/null @@ -1,90 +0,0 @@ -Notify Expiring=$ref, sessionkey=$key

    "; -} - -//------------------------------------------------------------------- - -error_reporting(E_ALL); - - -ob_start(); -include('../session/adodb-cryptsession2.php'); - -$options['debug'] = 99; -$db = 'postgres'; - -#### CONNECTION -switch($db) { -case 'oci8': - $options['table'] = 'adodb_sessions2'; - ADOdb_Session::config('oci8', '', 'jcollect', 'natsoft', '',$options); - break; - -case 'postgres': - ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options); - break; - -case 'mysql': -default: - ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options); - break; - - -} - - - -#### SETUP NOTIFICATION - $USER = 'JLIM'.rand(); - $ADODB_SESSION_EXPIRE_NOTIFY = array('USER','NotifyExpire'); - - adodb_session_create_table(); - session_start(); - - adodb_session_regenerate_id(); - -### SETUP SESSION VARIABLES - if (empty($_SESSION['MONKEY'])) $_SESSION['MONKEY'] = array(1,'abc',44.41); - else $_SESSION['MONKEY'][0] += 1; - if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1; - - -### START DISPLAY - print "

    PHP ".PHP_VERSION."

    "; - print "

    \$_SESSION['AVAR']={$_SESSION['AVAR']}

    "; - - print "
    Cookies: "; - print_r($_COOKIE); - - var_dump($_SESSION['MONKEY']); - -### RANDOMLY PERFORM Garbage Collection -### In real-production environment, this is done for you -### by php's session extension, which calls adodb_sess_gc() -### automatically for you. See php.ini's -### session.cookie_lifetime and session.gc_probability - - if (rand() % 5 == 0) { - - print "

    Garbage Collection

    "; - adodb_sess_gc(10); - - if (rand() % 2 == 0) { - print "

    Random session destroy

    "; - session_destroy(); - } - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/time.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/time.php deleted file mode 100755 index e4474b1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/time.php +++ /dev/null @@ -1,17 +0,0 @@ - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/tmssql.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/tmssql.php deleted file mode 100755 index 8de4495c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/tmssql.php +++ /dev/null @@ -1,80 +0,0 @@ -mssql"; - $db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection'); - mssql_select_db('northwind',$db); - - $rs = mssql_query('select getdate() as date',$db); - $o = mssql_fetch_row($rs); - print_r($o); - mssql_free_result($rs); - - print "

    Delete

    "; flush(); - $rs2 = mssql_query('delete from adoxyz',$db); - $p = mssql_num_rows($rs2); - mssql_free_result($rs2); - -} - -function tpear() -{ -include_once('DB.php'); - - print "

    PEAR

    "; - $username = 'adodb'; - $password = 'natsoft'; - $hostname = 'JAGUAR\vsdotnet'; - $databasename = 'northwind'; - - $dsn = "mssql://$username:$password@$hostname/$databasename"; - $conn = &DB::connect($dsn); - print "date=".$conn->GetOne('select getdate()')."
    "; - @$conn->query('create table tester (id integer)'); - print "

    Delete

    "; flush(); - $rs = $conn->query('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
    "; -} - -function tadodb() -{ -include_once('../adodb.inc.php'); - - print "

    ADOdb

    "; - $conn = NewADOConnection('mssql'); - $conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -// $conn->debug=1; - print "date=".$conn->GetOne('select getdate()')."
    "; - $conn->Execute('create table tester (id integer)'); - print "

    Delete

    "; flush(); - $rs = $conn->Execute('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
    "; -} - - -$ACCEPTIP = '127.0.0.1'; - -$remote = $_SERVER["REMOTE_ADDR"]; - -if (!empty($ACCEPTIP)) - if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) - die("Unauthorised client: '$remote'"); - -?> -mssql -pear -adodb - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema-mssql.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema-mssql.xml deleted file mode 100755 index 0467802b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema-mssql.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - -id - - -id - - - -
    - - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - INSERT into simple_table ( name, description ) values ( '12', 'Microsoft stuff' ) - - -
    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema.xml deleted file mode 100755 index 50626c74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tests/xmlschema.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - An integer row that's a primary key and autoincrements - - - - - A 16 character varchar row that can't be null - - - - row1 - row2 - -
    - - SQL to be executed only on specific platforms - - insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' ) - - - insert into mytable ( row1, row2 ) values ( 12, 'Microsoft stuff' ) - - - - -
    -
    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/toexport.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/toexport.inc.php deleted file mode 100755 index ba3f37a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/toexport.inc.php +++ /dev/null @@ -1,133 +0,0 @@ -FieldTypesArray(); - reset($fieldTypes); - while(list(,$o) = each($fieldTypes)) { - - $v = $o->name; - if ($escquote) $v = str_replace($quote,$escquotequote,$v); - $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); - $elements[] = $v; - - } - $s .= implode($sep, $elements).$NEWLINE; - } - $hasNumIndex = isset($rs->fields[0]); - - $line = 0; - $max = $rs->FieldCount(); - - while (!$rs->EOF) { - $elements = array(); - $i = 0; - - if ($hasNumIndex) { - for ($j=0; $j < $max; $j++) { - $v = $rs->fields[$j]; - if (!is_object($v)) $v = trim($v); - else $v = 'Object'; - if ($escquote) $v = str_replace($quote,$escquotequote,$v); - $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); - - if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote"; - else $elements[] = $v; - } - } else { // ASSOCIATIVE ARRAY - foreach($rs->fields as $v) { - if ($escquote) $v = str_replace($quote,$escquotequote,trim($v)); - $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); - - if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote"; - else $elements[] = $v; - } - } - $s .= implode($sep, $elements).$NEWLINE; - $rs->MoveNext(); - $line += 1; - if ($fp && ($line % $BUFLINES) == 0) { - if ($fp === true) echo $s; - else fwrite($fp,$s); - $s = ''; - } - } - - if ($fp) { - if ($fp === true) echo $s; - else fwrite($fp,$s); - $s = ''; - } - - return $s; -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tohtml.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tohtml.inc.php deleted file mode 100755 index b9bef03f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/tohtml.inc.php +++ /dev/null @@ -1,195 +0,0 @@ - -*/ - -// specific code for tohtml -GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND; - -$ADODB_ROUND=4; // rounding -$gSQLMaxRows = 1000; // max no of rows to download -$gSQLBlockRows=20; // max no of rows per table block - -// RecordSet to HTML Table -//------------------------------------------------------------ -// Convert a recordset to a html table. Multiple tables are generated -// if the number of rows is > $gSQLBlockRows. This is because -// web browsers normally require the whole table to be downloaded -// before it can be rendered, so we break the output into several -// smaller faster rendering tables. -// -// $rs: the recordset -// $ztabhtml: the table tag attributes (optional) -// $zheaderarray: contains the replacement strings for the headers (optional) -// -// USAGE: -// include('adodb.inc.php'); -// $db = ADONewConnection('mysql'); -// $db->Connect('mysql','userid','password','database'); -// $rs = $db->Execute('select col1,col2,col3 from table'); -// rs2html($rs, 'BORDER=2', array('Title1', 'Title2', 'Title3')); -// $rs->Close(); -// -// RETURNS: number of rows displayed - - -function rs2html(&$rs,$ztabhtml=false,$zheaderarray=false,$htmlspecialchars=true,$echo = true) -{ -$s ='';$rows=0;$docnt = false; -GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND; - - if (!$rs) { - printf(ADODB_BAD_RS,'rs2html'); - return false; - } - - if (! $ztabhtml) $ztabhtml = "BORDER='1' WIDTH='98%'"; - //else $docnt = true; - $typearr = array(); - $ncols = $rs->FieldCount(); - $hdr = "\n\n"; - for ($i=0; $i < $ncols; $i++) { - $field = $rs->FetchField($i); - if ($field) { - if ($zheaderarray) $fname = $zheaderarray[$i]; - else $fname = htmlspecialchars($field->name); - $typearr[$i] = $rs->MetaType($field->type,$field->max_length); - //print " $field->name $field->type $typearr[$i] "; - } else { - $fname = 'Field '.($i+1); - $typearr[$i] = 'C'; - } - if (strlen($fname)==0) $fname = ' '; - $hdr .= ""; - } - $hdr .= "\n"; - if ($echo) print $hdr."\n\n"; - else $html = $hdr; - - // smart algorithm - handles ADODB_FETCH_MODE's correctly by probing... - $numoffset = isset($rs->fields[0]) ||isset($rs->fields[1]) || isset($rs->fields[2]); - while (!$rs->EOF) { - - $s .= "\n"; - - for ($i=0; $i < $ncols; $i++) { - if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields); - else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields); - - $type = $typearr[$i]; - switch($type) { - case 'D': - if (empty($v)) $s .= "\n"; - else if (!strpos($v,':')) { - $s .= " \n"; - } - break; - case 'T': - if (empty($v)) $s .= "\n"; - else $s .= " \n"; - break; - - case 'N': - if (abs(abs($v) - round($v,0)) < 0.00000001) - $v = round($v); - else - $v = round($v,$ADODB_ROUND); - case 'I': - $s .= " \n"; - - break; - /* - case 'B': - if (substr($v,8,2)=="BM" ) $v = substr($v,8); - $mtime = substr(str_replace(' ','_',microtime()),2); - $tmpname = "tmp/".uniqid($mtime).getmypid(); - $fd = @fopen($tmpname,'a'); - @ftruncate($fd,0); - @fwrite($fd,$v); - @fclose($fd); - if (!function_exists ("mime_content_type")) { - function mime_content_type ($file) { - return exec("file -bi ".escapeshellarg($file)); - } - } - $t = mime_content_type($tmpname); - $s .= (substr($t,0,5)=="image") ? " \\n" : " \\n"; - break; - */ - - default: - if ($htmlspecialchars) $v = htmlspecialchars(trim($v)); - $v = trim($v); - if (strlen($v) == 0) $v = ' '; - $s .= " \n"; - - } - } // for - $s .= "\n\n"; - - $rows += 1; - if ($rows >= $gSQLMaxRows) { - $rows = "

    Truncated at $gSQLMaxRows

    "; - break; - } // switch - - $rs->MoveNext(); - - // additional EOF check to prevent a widow header - if (!$rs->EOF && $rows % $gSQLBlockRows == 0) { - - //if (connection_aborted()) break;// not needed as PHP aborts script, unlike ASP - if ($echo) print $s . "
    $fname
      ".$rs->UserDate($v,"D d, M Y") ."    ".$rs->UserTimeStamp($v,"D d, M Y, h:i:s") ." ".stripslashes((trim($v))) ." $t$t". str_replace("\n",'
    ',stripslashes($v)) ."
    \n\n"; - else $html .= $s ."\n\n"; - $s = $hdr; - } - } // while - - if ($echo) print $s."\n\n"; - else $html .= $s."\n\n"; - - if ($docnt) if ($echo) print "

    ".$rows." Rows

    "; - - return ($echo) ? $rows : $html; - } - -// pass in 2 dimensional array -function arr2html(&$arr,$ztabhtml='',$zheaderarray='') -{ - if (!$ztabhtml) $ztabhtml = 'BORDER=1'; - - $s = "";//';print_r($arr); - - if ($zheaderarray) { - $s .= ''; - for ($i=0; $i\n"; - } else $s .= " \n"; - $s .= "\n\n"; - } - $s .= '
     
    '; - print $s; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema.dtd b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema.dtd deleted file mode 100755 index 337a9930..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema.dtd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -] > \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema03.dtd b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema03.dtd deleted file mode 100755 index a7c8864f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xmlschema03.dtd +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/all-wcprops deleted file mode 100755 index 8e34ac60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/all-wcprops +++ /dev/null @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/xsl -END -convert-0.1-0.3.xsl -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/xsl/convert-0.1-0.3.xsl -END -remove-0.2.xsl -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/xsl/remove-0.2.xsl -END -convert-0.2-0.3.xsl -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/xsl/convert-0.2-0.3.xsl -END -remove-0.3.xsl -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/351/trunk/rdfapi-php/api/util/adodb/xsl/remove-0.3.xsl -END -convert-0.1-0.2.xsl -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/350/trunk/rdfapi-php/api/util/adodb/xsl/convert-0.1-0.2.xsl -END -convert-0.2-0.1.xsl -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/util/adodb/xsl/convert-0.2-0.1.xsl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/entries deleted file mode 100755 index 2b1732a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/entries +++ /dev/null @@ -1,106 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/adodb/xsl -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-03-12T11:01:00.000000Z -351 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -convert-0.1-0.3.xsl -file - - - - -2008-02-29T14:57:54.285597Z -6aadb6a50dc09f6e776d5847f70432d0 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -remove-0.2.xsl -file - - - - -2008-02-29T14:57:54.301217Z -0b2b85762fe8c79ec259c25098840e4d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -convert-0.2-0.3.xsl -file - - - - -2008-02-29T14:57:54.301217Z -409846921dd94e5bbb473ff65314ea2a -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -remove-0.3.xsl -file - - - - -2008-02-29T14:57:54.316838Z -678d96591452812ec32cfffc56877b51 -2007-03-12T11:01:00.000000Z -351 -cweiske -has-props - -convert-0.1-0.2.xsl -file - - - - -2008-02-29T14:57:54.316838Z -29d98453a420d4cbaee77cf29e79ccea -2007-03-12T10:55:13.000000Z -350 -cweiske -has-props - -convert-0.2-0.1.xsl -file - - - - -2008-02-29T14:57:54.332459Z -5d2788a525f2591249dedab11fa603b4 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.2.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.2.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.2.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.3.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.1-0.3.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.1.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.1.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.1.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.3.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/convert-0.2-0.3.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.2.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.2.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.2.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.3.xsl.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/prop-base/remove-0.3.xsl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.2.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.2.xsl.svn-base deleted file mode 100755 index 6cd9e5bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.2.xsl.svn-base +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.3.xsl.svn-base deleted file mode 100755 index 381aa4fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.1-0.3.xsl.svn-base +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.1.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.1.xsl.svn-base deleted file mode 100755 index 61841b48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.1.xsl.svn-base +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.3.xsl.svn-base deleted file mode 100755 index 26bd9e9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/convert-0.2-0.3.xsl.svn-base +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.2.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.2.xsl.svn-base deleted file mode 100755 index 9b10a528..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.2.xsl.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - -Uninstallation Schema - - - - 0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.3.xsl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.3.xsl.svn-base deleted file mode 100755 index 768e092b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/.svn/text-base/remove-0.3.xsl.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - -Uninstallation Schema - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.2.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.2.xsl deleted file mode 100755 index 3781e60f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.2.xsl +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.3.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.3.xsl deleted file mode 100755 index 2a7d003c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.1-0.3.xsl +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.1.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.1.xsl deleted file mode 100755 index 6eb2d3f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.1.xsl +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.3.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.3.xsl deleted file mode 100755 index 85d9b538..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/convert-0.2-0.3.xsl +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.2.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.2.xsl deleted file mode 100755 index 079f161b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.2.xsl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - -Uninstallation Schema - - - - 0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.3.xsl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.3.xsl deleted file mode 100755 index 7db40854..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/adodb/xsl/remove-0.3.xsl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -ADODB XMLSchema -http://adodb-xmlschema.sourceforge.net - - - -Uninstallation Schema - - - - 0.3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/all-wcprops deleted file mode 100755 index 772c6705..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/all-wcprops +++ /dev/null @@ -1,77 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie -END -rss_utils.inc -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/rss_utils.inc -END -rss_cache.inc -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/rss_cache.inc -END -AUTHORS -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/AUTHORS -END -INSTALL -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/INSTALL -END -cookbook -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/cookbook -END -ChangeLog -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/ChangeLog -END -TROUBLESHOOTING -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/TROUBLESHOOTING -END -CHANGES -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/CHANGES -END -rss_fetch.inc -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/rss_fetch.inc -END -rss_parse.inc -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/rss_parse.inc -END -NEWS -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/NEWS -END -README -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/README -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/entries deleted file mode 100755 index cfa687d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/entries +++ /dev/null @@ -1,193 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -htdocs -dir - -AUTHORS -file - - - - -2008-02-29T14:57:49.630658Z -49589aee6f0d4ffeb026254cb466cbe5 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -TROUBLESHOOTING -file - - - - -2008-02-29T14:57:49.661899Z -0b996424b2785fd6acd1347e8e771f10 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -ChangeLog -file - - - - -2008-02-29T14:57:49.646279Z -0198ae3c981d9a5d03f75535569c1796 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -scripts -dir - -extlib -dir - -rss_fetch.inc -file - - - - -2008-02-29T14:57:49.677520Z -6c4cfac911c73e867c30320631792a3c -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -README -file - - - - -2008-02-29T14:57:49.974311Z -2711c0456df41f6089214f710a688f3c -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -rss_utils.inc -file - - - - -2008-02-29T14:57:49.599417Z -a665d2bc52d9c0ce6ae208fe7b5d0651 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -rss_cache.inc -file - - - - -2008-02-29T14:57:49.615037Z -e5f4c67d03d00107d212845c61dc0d63 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -cookbook -file - - - - -2008-02-29T14:57:49.646279Z -0a9bed6f1c9b8ff1bea2f436d8dd99c4 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -INSTALL -file - - - - -2008-02-29T14:57:49.630658Z -83a8b979fcebf9b5ed41bfce3cf82cc0 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -CHANGES -file - - - - -2008-02-29T14:57:49.677520Z -fd94ee868611843d9c8ff6279decb432 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -rss_parse.inc -file - - - - -2008-02-29T14:57:49.693140Z -613abd6a6faff1074e5176952bba8196 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -NEWS -file - - - - -2008-02-29T14:57:49.693140Z -7a16faad21a776f1faf70d5fe0bc457f -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/AUTHORS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/AUTHORS.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/AUTHORS.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/CHANGES.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/CHANGES.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/CHANGES.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/ChangeLog.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/ChangeLog.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/ChangeLog.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/INSTALL.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/INSTALL.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/INSTALL.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/NEWS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/NEWS.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/NEWS.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/README.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/README.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/README.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/TROUBLESHOOTING.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/TROUBLESHOOTING.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/TROUBLESHOOTING.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/cookbook.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/cookbook.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/cookbook.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_cache.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_cache.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_cache.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_fetch.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_fetch.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_fetch.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_parse.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_parse.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_parse.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_utils.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_utils.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/prop-base/rss_utils.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/AUTHORS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/AUTHORS.svn-base deleted file mode 100755 index 7d7f3f53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/AUTHORS.svn-base +++ /dev/null @@ -1 +0,0 @@ -kellan diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/CHANGES.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/CHANGES.svn-base deleted file mode 100755 index 3346f2ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/CHANGES.svn-base +++ /dev/null @@ -1,41 +0,0 @@ -Version 0.72 ------------ - - fix security exploit: http://www.sec-consult.com/216.html - -Version 0.7 ------------ - - support for input and output charset encoding - based on the work in FoF, uses iconv or mbstring if available - - - -Version 0.6 ------------ - - basic support for Atom syndication format - including support for Atom content constructs - - fixed support for private feeds (HTTP Auth and SSL) - (thanks to silverorange.com for providing test feeds) - - support for some broken webservers - -Version 0.52 ------------ - - support GZIP content negoiation - - PHP 4.3.2 support - -Version 0.4 ------------ - - improved error handling, better access for script authors - - included example scripts of working with MagpieRSS - - new Smarty plugin for RSS date parsing - -Version 0.3 ------------ - - added support for conditional gets (Last-Modified, ETag) - - now use Snoopy to handle fetching RSS files - -Version 0.2 ------------ - - MAJOR CLEAN UP - - removed kludgy $options array in favour of constants - - phased out returning arrays - - added better error handling - - re-worked comments diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/ChangeLog.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/ChangeLog.svn-base deleted file mode 100755 index 62fa4f55..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/ChangeLog.svn-base +++ /dev/null @@ -1,405 +0,0 @@ -2005-10-28 14:11 kellan - - * extlib/Snoopy.class.inc: a better solution - -2005-10-28 11:51 kellan - - * extlib/Snoopy.class.inc: fix arbtriary code execution - vulnerability when using curl+ssl - - http://www.sec-consult.com/216.html - -2005-03-08 10:46 kellan - - * rss_parse.inc: fix bug w/ atom and date normalization - -2005-02-09 14:59 kellan - - * rss_fetch.inc: fix stale cache bug - -2005-01-28 02:27 kellan - - * rss_parse.inc: support php w/o array_change_case - -2005-01-23 20:02 kellan - - * rss_fetch.inc: fix cache bug introduced by charset encoding - -2005-01-12 09:14 kellan - - * rss_cache.inc, rss_fetch.inc: more sanity checks for when things - go wrong - -2004-12-12 13:44 kellan - - * INSTALL, rss_cache.inc, rss_utils.inc: detab - -2004-11-23 20:15 kellan - - * rss_parse.inc: fix calling iconv instead of mb_convert_encoding - -2004-11-22 02:11 kellan - - * CHANGES, ChangeLog, rss_parse.inc, scripts/magpie_debug.php: last - bit of tidying - -2004-11-22 01:45 kellan - - * rss_fetch.inc: detab, bump version - -2004-11-22 01:43 kellan - - * rss_parse.inc: was filtering too much - -2004-11-22 00:03 kellan - - * rss_fetch.inc, rss_parse.inc: cache on $url . $output_encoding - otherwise we can get munged output - -2004-11-21 23:52 kellan - - * rss_parse.inc: add WARNING - -2004-11-21 23:45 kellan - - * rss_parse.inc: don't set ERROR on notice or warning (rss_fetch - dies on parse errors) - -2004-11-21 23:44 kellan - - * rss_fetch.inc: add encoding defines (fix timeout error reporting) - -2004-11-21 20:21 kellan - - * rss_parse.inc: incorporate steve's patch - -2004-11-21 19:26 kellan - - * rss_parse.inc: remove old debugging functions, totally - arbitrarily. might break stuff. can't really explain why i'm - doing this. - -2004-10-28 15:52 kellan - - * rss_parse.inc: fixed '=' instead of '==' - -2004-10-26 00:48 kellan - - * rss_parse.inc: chance epoch to timestamp to conform w/ php naming - conventions - -2004-06-15 12:00 kellan - - * rss_parse.inc: [no log message] - -2004-04-26 14:16 kellan - - * rss_fetch.inc: bump version - -2004-04-26 12:36 kellan - - * rss_parse.inc: fix field doubling - -2004-04-24 17:47 kellan - - * CHANGES, ChangeLog: updated - -2004-04-24 17:35 kellan - - * rss_fetch.inc: bumped version - -2004-04-24 16:52 kellan - - * rss_parse.inc: support arbitrary atom content constructs - - some refactoring - -2004-04-24 16:15 kellan - - * rss_parse.inc: support summary content contstruct. add normalize - function - -2004-03-27 16:29 kellan - - * extlib/Snoopy.class.inc: accept self-signed certs - -2004-03-27 12:53 kellan - - * extlib/Snoopy.class.inc: fixed SSL support * set status * set - error on bad curl - - (also ripped out big chunks of dead weight (submit_form) which - were getting in my way - -2004-01-25 02:25 kellan - - * rss_parse.inc: make RSS 1.0's rdf:about available - -2004-01-25 02:07 kellan - - * rss_parse.inc: clean up text, and line formats. add support item - rdf:about - -2004-01-24 23:40 kellan - - * CHANGES, ChangeLog: update changes - -2004-01-24 23:37 kellan - - * rss_fetch.inc: updated version - -2004-01-24 23:35 kellan - - * rss_parse.inc: whitespace - -2004-01-24 23:23 kellan - - * extlib/Snoopy.class.inc: support badly formatted http headers - -2004-01-24 23:20 kellan - - * rss_parse.inc: added alpha atom parsing support - -2003-06-25 22:34 kellan - - * extlib/Snoopy.class.inc: fixed fread 4.3.2 compatibility problems - -2003-06-13 11:31 kellan - - * rss_fetch.inc: reset cache on 304 - -2003-06-12 21:37 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: - bumped up version numbers - -2003-06-12 21:32 kellan - - * htdocs/index.html: updated news - -2003-06-12 21:27 kellan - - * NEWS: a manual blog :) - -2003-06-12 21:22 kellan - - * htdocs/index.html: fully qualified img - -2003-06-12 21:20 kellan - - * htdocs/index.html: clean up. added badge. - -2003-06-12 21:04 kellan - - * rss_utils.inc: clean up regex - -2003-06-12 21:02 kellan - - * rss_cache.inc: suppress some warnings - -2003-05-30 20:44 kellan - - * extlib/Snoopy.class.inc: more comments, cleaned up notice - -2003-05-30 15:14 kellan - - * extlib/Snoopy.class.inc: don't advertise gzip support if the user - hasn't built php with gzinflate support - -2003-05-12 22:32 kellan - - * ChangeLog: changes - -2003-05-12 22:11 kellan - - * htdocs/index.html: announce 0.5 - -2003-05-12 21:42 kellan - - * htdocs/index.html: change - -2003-05-12 21:39 kellan - - * rss_fetch.inc: use gzip - -2003-05-12 21:37 kellan - - * extlib/Snoopy.class.inc: added support gzip encoded content - negoiation - -2003-05-12 21:32 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: fixed - typoes - -2003-04-26 21:44 kellan - - * rss_parse.inc: fix minor typo - -2003-04-18 08:19 kellan - - * htdocs/cookbook.html: updated cookbook to show more code for - limiting items - -2003-03-03 16:02 kellan - - * rss_parse.inc, scripts/magpie_slashbox.php: committed (or - adpated) patch from Nicola (www.technick.com) to quell 'Undefined - Indexes' notices - -2003-03-03 15:59 kellan - - * rss_fetch.inc: commited patch from nicola (www.technick.com) to - quell 'undefined indexes' notices. - - * Magpie now automatically includes its version in the - user-agent, & whether cacheing is turned on. - -2003-02-12 01:22 kellan - - * CHANGES, ChangeLog: ChangeLog now auto-generated by cvs2cl - -2003-02-12 00:21 kellan - - * rss_fetch.inc: better errors, hopefully stomped on pesky notices - -2003-02-12 00:19 kellan - - * rss_parse.inc: check to see is xml is supported, if not die - - also throw better xml errors - -2003-02-12 00:18 kellan - - * rss_cache.inc: hopefully cleared up some notices that were being - thrown into the log - - fixed a debug statement that was being called as an error - -2003-02-12 00:15 kellan - - * scripts/: magpie_simple.php, magpie_slashbox.php: moved - magpie_simple to magpie_slashbox, and replaced it with a simpler - demo. - -2003-02-12 00:02 kellan - - * INSTALL, README, TROUBLESHOOTING: Improved documentation. Better - install instructions. - - TROUBLESHOOTING cover common installation and usage problems - -2003-01-22 14:40 kellan - - * htdocs/cookbook.html: added cookbook.html - -2003-01-21 23:47 kellan - - * cookbook: a magpie cookbook - -2003-01-20 10:09 kellan - - * ChangeLog: updated - -2003-01-20 09:23 kellan - - * scripts/simple_smarty.php: minor clean up - -2003-01-20 09:15 kellan - - * scripts/README: added smarty url - -2003-01-20 09:14 kellan - - * magpie_simple.php, htdocs/index.html, scripts/README, - scripts/magpie_debug.php, scripts/magpie_simple.php, - scripts/simple_smarty.php, - scripts/smarty_plugin/modifier.rss_date_parse.php, - scripts/templates/simple.smarty: Added scripts directory for - examples on how to use MagpieRSS - - magpie_simple - is a simple example magpie_debug - spew all the - information from a parsed RSS feed simple_smary - example of - using magpie with Smarty template system - smarty_plugin/modifier.rss_date_parse.php - support file for the - smarty demo templates/simple.smary - template for the smarty demo - -2003-01-20 09:11 kellan - - * rss_fetch.inc, rss_parse.inc: changes to error handling to give - script authors more access to magpie's errors. - - added method magpie_error() to retrieve global MAGPIE_ERROR - variable for when fetch_rss() returns false - -2002-10-26 19:02 kellan - - * htdocs/index.html: putting the website under source control - -2002-10-26 18:43 kellan - - * AUTHORS, ChangeLog, INSTALL, README: some documentation to make - it all look official :) - -2002-10-25 23:04 kellan - - * magpie_simple.php: quxx - -2002-10-25 23:04 kellan - - * rss_parse.inc: added support for textinput and image - -2002-10-25 19:23 kellan - - * magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc, - rss_utils.inc: switched to using Snoopy for fetching remote RSS - files. - - added support for conditional gets - -2002-10-25 19:22 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: - Change comment style to slavishly imitate the phpinsider style - found in Smarty and Snoopy :) - -2002-10-25 19:18 kellan - - * extlib/Snoopy.class.inc: added Snoopy in order to support - conditional gets - -2002-10-23 23:19 kellan - - * magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc: - MAJOR CLEANUP! - - * rss_fetch got rid of the options array, replaced it with a more - PHP-like solution of using defines. constants are setup, with - defaults, in the function init() - - got rid of the idiom of passing back an array, its was awkward to - deal with in PHP, and unusual (and consquently confusing to - people). now i return true/false values, and try to setup error - string where appropiate (rss_cache has the most complete example - of this) - - change the logic for interacting with the cache - - * rss_cache major re-working of how error are handled. tried to - make the code more resillient. the cache is now much more aware - of MAX_AGE, where before this was being driven out of rss_fetch - (which was silly) - - * rss_parse properly handles xml parse errors. used to sail - along blithely unaware. - -2002-09-11 11:11 kellan - - * rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc, - rss_utils.inc: Initial revision - -2002-09-11 11:11 kellan - - * rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc, - rss_utils.inc: initial import - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/INSTALL.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/INSTALL.svn-base deleted file mode 100755 index 640833d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/INSTALL.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -REQUIREMENTS - - MapieRSS requires a recent PHP 4+ (developed with 4.2.0) - with xml (expat) support. - - Optionally: - * PHP5 with libxml2 support. - * cURL for SSL support - * iconv (preferred) or mb_string for expanded character set support - -QUICK START - - Magpie consists of 4 files (rss_fetch.inc, rss_parser.inc, rss_cache.inc, - and rss_utils.inc), and the directory extlib (which contains a modified - version of the Snoopy HTTP client) - - Copy these 5 resources to a directory named 'magpierss' in the same - directory as your PHP script. - - At the top of your script add the following line: - - require_once('magpierss/rss_fetch.inc'); - - Now you can use the fetch_rss() method: - - $rss = fetch_rss($url); - - Done. That's it. See README for more details on using MagpieRSS. - -NEXT STEPS - - Important: you'll probably want to get the cache directory working in - order to speed up your application, and not abuse the webserver you're - downloading the RSS from. - - Optionally you can install MagpieRSS in your PHP include path in order to - make it available server wide. - - Lastly you might want to look through the constants in rss_fetch.inc see if - there is anything you want to override (the defaults are pretty good) - - For more info, or if you have trouble, see TROUBLESHOOTING - -SETTING UP CACHING - - Magpie has built-in transparent caching. With caching Magpie will only - fetch and parse RSS feeds when there is new content. Without this feature - your pages will be slow, and the sites serving the RSS feed will be annoyed - with you. - -** Simple and Automatic ** - - By default Magpie will try to create a cache directory named 'cache' in the - same directory as your PHP script. - -** Creating a Local Cache Directory ** - - Often this will fail, because your webserver doesn't have sufficient - permissions to create the directory. - - Exact instructions for how to do this will vary from install to install and - platform to platform. The steps are: - - 1. Make a directory named 'cache' - 2. Give the web server write access to that directory. - - An example of how to do this on Debian would be: - - 1. mkdir /path/to/script/cache - 2. chgrp www-data /path/to/script/cache - 3. chmod 775 /path/to/script/cache - - On other Unixes you'll need to change 'www-data' to what ever user Apache - runs as. (on MacOS X the user would be 'www') - -** Cache in /tmp ** - - Sometimes you won't be able to create a local cache directory. Some reasons - might be: - - 1. No shell account - 2. Insufficient permissions to change ownership of a directory - 3. Webserver runs as 'nobody' - - In these situations using a cache directory in /tmp can often be a good - option. - - The drawback is /tmp is public, so anyone on the box can read the cache - files. Usually RSS feeds are public information, so you'll have to decide - how much of an issue that is. - - To use /tmp as your cache directory you need to add the following line to - your script: - - define('MAGPIE_CACHE_DIR', '/tmp/magpie_cache'); - -** Global Cache ** - - If you have several applications using Magpie, you can create a single - shared cache directory, either using the /tmp cache, or somewhere else on - the system. - - The upside is that you'll distribute fetching and parsing feeds across - several applications. - -INSTALLING MAGPIE SERVER WIDE - - Rather then following the Quickstart instructions which requires you to have - a copy of Magpie per application, alternately you can place it in some - shared location. - -** Adding Magpie to Your Include Path ** - - Copy the 5 resources (rss_fetch.inc, rss_parser.inc, rss_cache.inc, - rss_utils.inc, and extlib) to a directory named 'magpierss' in your include - path. Now any PHP file on your system can use Magpie with: - - require_once('magpierss/rss_fetch.inc'); - - Different installs have different include paths, and you'll have to figure - out what your include_path is. - - From shell you can try: - - php -i | grep 'include_path' - - Alternatley you can create a phpinfo.php file with contains: - - - - Debian's default is: - - /usr/share/php - - (though more idealogically pure location would be /usr/local/share/php) - - Apple's default include path is: - - /usr/lib/php - - While the Entropy PHP build seems to use: - - /usr/local/php/lib/php \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/NEWS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/NEWS.svn-base deleted file mode 100755 index 5ac6b978..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/NEWS.svn-base +++ /dev/null @@ -1,53 +0,0 @@ -MagpieRSS News - -MAGPIERSS 0.51 RELEASED - * important bugfix! - * fix "silent failure" when PHP doesn't have zlib - -FEED ON FEEDS USES MAGPIE - * web-based RSS aggregator built with Magpie - * easy to install, easy to use. - http://minutillo.com/steve/feedonfeeds/ - -MAGPIERSS 0.5 RELEASED - * supports transparent HTTP gzip content negotiation for reduced bandwidth usage - * quashed some undefined index notices - -MAGPIERSS 0.46 RELEASED - * minor release, more error handling clean up - * documentation fixes, simpler example - * new trouble shooting guide for installation and usage problems - http://magpierss.sourceforge.net/TROUBLESHOOTING - -MAGPIE NEWS AS RSS - * releases, bug fixes, releated stories in RSS - -MAGPIERSS COOKBOOK: SIMPLE PHP RSS HOW TOS - * answers some of the most frequently asked Magpie questions - * feedback, suggestions, requests, recipes welcome - http://magpierss.sourceforge.net/cookbook.html - -MAGPIERSS 0.4 RELEASED! - * improved error handling, more flexibility for script authors, backwards compatible - * new and better examples! including using MagpieRSS and Smarty - * new Smarty plugin for RSS date parsing - http://smarty.php.net - -INFINITE PENGUIN NOW SUPPORTS MAGPIE 0.3 - * simple, sophisticated RSS viewer - * includes auto-generated javascript ticker from RSS feed - http://www.infinitepenguins.net/rss/ - -TRAUMWIND RELEASES REX BACKEND FOR MAGPIERSS - * drop in support using regex based XML parser - * parses improperly formed XML that chokes expat - http://traumwind.de/blog/magpie/magpie_alike.php - -MAGPIERSS 0.3 RELEASED! - * Support added for HTTP Conditional GETs. - http://fishbowl.pastiche.org/archives/001132.html - -MAGPIERSS 0.2! - * Major clean up of the code. Easier to use. - * Simpler install on shared hosts. - * Better documentation and comments. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/README.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/README.svn-base deleted file mode 100755 index 6af7edb0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/README.svn-base +++ /dev/null @@ -1,48 +0,0 @@ -NAME - - MagpieRSS - a simple RSS integration tool - -SYNOPSIS - - require_once(rss_fetch.inc); - $url = $_GET['url']; - $rss = fetch_rss( $url ); - - echo "Channel Title: " . $rss->channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; - -DESCRIPTION - - MapieRSS is an XML-based RSS parser in PHP. It attempts to be "PHP-like", - and simple to use. - - Some features include: - - * supports RSS 0.9 - 1.0, with limited RSS 2.0 support - * supports namespaces, and modules, including mod_content and mod_event - * open minded [1] - * simple, functional interface, to object oriented backend parser - * automatic caching of parsed RSS objects makes its easy to integrate - * supports conditional GET with Last-Modified, and ETag - * uses constants for easy override of default behaviour - * heavily commented - - -1. By open minded I mean Magpie will accept any tag it finds in good faith that - it was supposed to be here. For strict validation, look elsewhere. - - -GETTING STARTED - - - -COPYRIGHT: - Copyright(c) 2002 kellan@protest.net. All rights reserved. - This software is released under the GNU General Public License. - Please read the disclaimer at the top of the Snoopy.class.inc file. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/TROUBLESHOOTING.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/TROUBLESHOOTING.svn-base deleted file mode 100755 index 89068d38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/TROUBLESHOOTING.svn-base +++ /dev/null @@ -1,152 +0,0 @@ -TROUBLESHOOTING - - -Trouble Installing MagpieRSS: - -1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' - (include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') - -2. Cache couldn't make dir './cache'. - -3. Fatal error: Failed to load PHP's XML Extension. - http://www.php.net/manual/en/ref.xml.php - -Trouble Using MagpieRSS - -4. Warning: MagpieRSS: Failed to fetch example.com/index.rdf. - (HTTP Error: Invalid protocol "") - -5. Warning: MagpieRSS: Failed to parse RSS file. - (not well-formed (invalid token) at line 19, column 98) - -6. Warning: MagpieRSS: Failed to fetch http://localhost/rss/features.1-0.rss. - (HTTP Response: HTTP/1.1 404 Not Found) - -If you would rather provide a custom error, see the COOKBOOK -(http://magpierss.sf.net/cookbook.html) recipe 2. - -************************************************************************* -1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' - (include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') - - This could mean that: - - a) PHP can't find the MagpieRSS files. - b) PHP found them the MagpieRSS files, but can't read them. - - a. Telling PHP where to look for MagpieRSS file. - - This might mean your PHP program can't find the MagpieRSS libraries. - Magpie relies on 4 include files, rss_fetch.inc, rss_parse.inc, - rss_cache.inc, rss_util.inc, and for normal use you'll need all 4 (see the - cookbook for exceptions). - - This can be fixed by making sure the MagpieRSS files are in your include - path. - - If you can edit your include path (for example your on a shared host) then - you need to replace: - - require_once('rss_fetch.inc'); - - -with- - - define('MAGPIE_DIR', '/path/to/magpierss/'); - require_once(MAGPIE_DIR.'rss_fetch.inc'); - - b. PHP can't read the MagpieRSS files - - All PHP libraries need to be readable by your webserver. - - On Unix you can accomplish this with: - - chmod 755 rss_fetch.inc rss_parse.inc rss_cache.inc rss_util.inc - -************************************************************************* -2. Cache couldn't make dir './cache'. - - MagpieRSS caches the results of fetched and parsed RSS to reduce the load on - both your server, and the remote server providing the RSS. It does this by - writing files to a cache directory. - - This error means the webserver doesn't have write access to the current - directory. - - a. Make a webserver writeable cache directory - - Find the webserver's group. (on my system it is 'www') - - mkdir ./cache - chgrp www directory_name - chmod g+w directory_name - - (this is the best, and desired solution) - - b. Tell MagpieRSS to create the cache directory somewhere the webserver can - write to. - - define('MAGPIE_CACHE_DIR', '/tmp/magpierss'); - - (this is not a great solution, and might have security considerations) - - c. Turn off cacheing. - - Magpie can work fine with cacheing, but it will be slower, and you might - become a nuiance to the RSS provider, but it is an option. - - define('MAGPIE_CACHE_ON', 0); - - d. And lastly, do NOT - - chmod 777 ./cache - - Any of the above solutions are better then this. - - NOTE: If none of this works for you, let me know. I've got root, and a - custom compiled Apache on almost any box I ever touch, so I can be a little - out of touch with reality. But I won't know that if I don't feedback. - -************************************************************************* 3. -3. Fatal error: Failed to load PHP's XML Extension. - http://www.php.net/manual/en/ref.xml.php - - -or- - - Fatal error: Failed to create an instance of PHP's XML parser. - http://www.php.net/manual/en/ref.xml.php - - Make sure your PHP was built with --with-xml - - This has been turned on by default for several versions of PHP, but it might - be turned off in your build. - - See php.net for details on building and configuring PHP. - - -************************************************************************* -4. Warning: MagpieRSS: Failed to fetch index.rdf. - (HTTP Error: Invalid protocol "") - - You need to put http:// in front of your the URL to your RSS feed - -************************************************************************* -5. Warning: MagpieRSS: Failed to parse RSS file. - (not well-formed (invalid token) at line 19, column 98) - - There is a problem with the RSS feed you are trying to read. - MagpieRSS is an XML parser, and therefore can't parse RSS feed with invalid - characters. Some RSS parser are based on regular expressions, and can - parse invalid RSS but they have their own problems. - - You could try contacting the author of the RSS feed, and pointing them to - the online RSS validator at: - - http://feeds.archive.org/validator/ - -************************************************************************* -6. Warning: MagpieRSS: Failed to fetch http://example.com/index.rdf - (HTTP Response: HTTP/1.1 404 Not Found) - - Its a 404! The RSS file ain't there. - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/cookbook.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/cookbook.svn-base deleted file mode 100755 index 45dda98b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/cookbook.svn-base +++ /dev/null @@ -1,125 +0,0 @@ -MAGPIERSS RECIPES: Cooking with Corbies - - "Four and twenty blackbirds baked in a pie." - -1. LIMIT THE NUMBER OF HEADLINES(AKA ITEMS) RETURNED. - -PROBLEM: - -You want to display the 10 (or 3) most recent headlines, but the RSS feed -contains 15. - -SOLUTION: - -$num_items = 10; -$rss = fetch_rss($url); - -$items = array_slice($rss->items, 0, $num_items); - -DISCUSSION: - -Rather then trying to limit the number of items Magpie parses, a much simpler, -and more flexible approach is to take a "slice" of the array of items. And -array_slice() is smart enough to do the right thing if the feed has less items -then $num_items. - -See: http://www.php.net/array_slice - - -2. DISPLAY A CUSTOM ERROR MESSAGE IF SOMETHING GOES WRONG - -PROBLEM: - -You don't want Magpie's error messages showing up if something goes wrong. - -SOLUTION: - -# Magpie throws USER_WARNINGS only -# so you can cloak these, by only showing ERRORs -error_reporting(E_ERROR); - -# check the return value of fetch_rss() - -$rss = fetch_rss($url); - -if ( $rss ) { -...display rss feed... -} -else { - echo "An error occured! " . - "Consider donating more $$$ for restoration of services." . - "
    Error Message: " . magpie_error(); -} - -DISCUSSION: - -MagpieRSS triggers a warning in a number of circumstances. The 2 most common -circumstances are: if the specified RSS file isn't properly formed (usually -because it includes illegal HTML), or if Magpie can't download the remote RSS -file, and there is no cached version. - -If you don't want your users to see these warnings change your error_reporting -settings to only display ERRORs. Another option is to turn off display_error, -so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages. - -You can do this with: - -ini_set('display_errors', 0); - -See: http://www.php.net/error_reporting, - http://www.php.net/ini_set, - http://www.php.net/manual/en/ref.errorfunc.php - -3. GENERATE A NEW RSS FEED - -PROBLEM: - -Create an RSS feed for other people to use. - -SOLUTION: - -Use Useful Inc's RSSWriter (http://usefulinc.com/rss/rsswriter/) - -DISCUSSION: - -An example of turning a Magpie parsed RSS object back into an RSS file is forth -coming. In the meantime RSSWriter has great documentation. - -4. DISPLAY HEADLINES MORE RECENT THEN X DATE - -PROBLEM: - -You only want to display headlines that were published on, or after a certain -date. - - -SOLUTION: - -require 'rss_utils.inc'; - -# get all headlines published today -$today = getdate(); - -# today, 12AM -$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']); - -$rss = fetch_rss($url); - -foreach ( $rss->items as $item ) { - $published = parse_w3cdtf($item['dc']['date']); - if ( $published >= $date ) { - echo "Title: " . $item['title']; - echo "Published: " . date("h:i:s A", $published); - echo "

    "; - } -} - -DISCUSSION: - -This recipe only works for RSS 1.0 feeds that include the field. -(which is very good RSS style) - -parse_w3cdtf is defined in rss_utils.inc, and parses RSS style dates into Unix -epoch seconds. - -See: http://www.php.net/manual/en/ref.datetime.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_cache.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_cache.inc.svn-base deleted file mode 100755 index b8d436cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_cache.inc.svn-base +++ /dev/null @@ -1,200 +0,0 @@ - - * Version: 0.51 - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * http://lists.sourceforge.net/lists/listinfo/magpierss-general - * - */ - -class RSSCache { - var $BASE_CACHE = './cache'; // where the cache files are stored - var $MAX_AGE = 3600; // when are files stale, default one hour - var $ERROR = ""; // accumulate error messages - - function RSSCache ($base='', $age='') { - if ( $base ) { - $this->BASE_CACHE = $base; - } - if ( $age ) { - $this->MAX_AGE = $age; - } - - // attempt to make the cache directory - if ( ! file_exists( $this->BASE_CACHE ) ) { - $status = @mkdir( $this->BASE_CACHE, 0755 ); - - // if make failed - if ( ! $status ) { - $this->error( - "Cache couldn't make dir '" . $this->BASE_CACHE . "'." - ); - } - } - } - -/*=======================================================================*\ - Function: set - Purpose: add an item to the cache, keyed on url - Input: url from wich the rss file was fetched - Output: true on sucess -\*=======================================================================*/ - function set ($url, $rss) { - $this->ERROR = ""; - $cache_file = $this->file_name( $url ); - $fp = @fopen( $cache_file, 'w' ); - - if ( ! $fp ) { - $this->error( - "Cache unable to open file for writing: $cache_file" - ); - return 0; - } - - - $data = $this->serialize( $rss ); - fwrite( $fp, $data ); - fclose( $fp ); - - return $cache_file; - } - -/*=======================================================================*\ - Function: get - Purpose: fetch an item from the cache - Input: url from wich the rss file was fetched - Output: cached object on HIT, false on MISS -\*=======================================================================*/ - function get ($url) { - $this->ERROR = ""; - $cache_file = $this->file_name( $url ); - - if ( ! file_exists( $cache_file ) ) { - $this->debug( - "Cache doesn't contain: $url (cache file: $cache_file)" - ); - return 0; - } - - $fp = @fopen($cache_file, 'r'); - if ( ! $fp ) { - $this->error( - "Failed to open cache file for reading: $cache_file" - ); - return 0; - } - - if ($filesize = filesize($cache_file) ) { - $data = fread( $fp, filesize($cache_file) ); - $rss = $this->unserialize( $data ); - - return $rss; - } - - return 0; - } - -/*=======================================================================*\ - Function: check_cache - Purpose: check a url for membership in the cache - and whether the object is older then MAX_AGE (ie. STALE) - Input: url from wich the rss file was fetched - Output: cached object on HIT, false on MISS -\*=======================================================================*/ - function check_cache ( $url ) { - $this->ERROR = ""; - $filename = $this->file_name( $url ); - - if ( file_exists( $filename ) ) { - // find how long ago the file was added to the cache - // and whether that is longer then MAX_AGE - $mtime = filemtime( $filename ); - $age = time() - $mtime; - if ( $this->MAX_AGE > $age ) { - // object exists and is current - return 'HIT'; - } - else { - // object exists but is old - return 'STALE'; - } - } - else { - // object does not exist - return 'MISS'; - } - } - - function cache_age( $cache_key ) { - $filename = $this->file_name( $url ); - if ( file_exists( $filename ) ) { - $mtime = filemtime( $filename ); - $age = time() - $mtime; - return $age; - } - else { - return -1; - } - } - -/*=======================================================================*\ - Function: serialize -\*=======================================================================*/ - function serialize ( $rss ) { - return serialize( $rss ); - } - -/*=======================================================================*\ - Function: unserialize -\*=======================================================================*/ - function unserialize ( $data ) { - return unserialize( $data ); - } - -/*=======================================================================*\ - Function: file_name - Purpose: map url to location in cache - Input: url from wich the rss file was fetched - Output: a file name -\*=======================================================================*/ - function file_name ($url) { - $filename = md5( $url ); - return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) ); - } - -/*=======================================================================*\ - Function: error - Purpose: register error -\*=======================================================================*/ - function error ($errormsg, $lvl=E_USER_WARNING) { - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - $this->ERROR = $errormsg; - if ( MAGPIE_DEBUG ) { - trigger_error( $errormsg, $lvl); - } - else { - error_log( $errormsg, 0); - } - } - - function debug ($debugmsg, $lvl=E_USER_NOTICE) { - if ( MAGPIE_DEBUG ) { - $this->error("MagpieRSS [debug] $debugmsg", $lvl); - } - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_fetch.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_fetch.inc.svn-base deleted file mode 100755 index f2fa2fa8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_fetch.inc.svn-base +++ /dev/null @@ -1,458 +0,0 @@ - - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * magpierss-general@lists.sourceforge.net - * - */ - -// Setup MAGPIE_DIR for use on hosts that don't include -// the current path in include_path. -// with thanks to rajiv and smarty -if (!defined('DIR_SEP')) { - define('DIR_SEP', DIRECTORY_SEPARATOR); -} - -if (!defined('MAGPIE_DIR')) { - define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP); -} - -require_once( MAGPIE_DIR . 'rss_parse.inc' ); -require_once( MAGPIE_DIR . 'rss_cache.inc' ); - -// for including 3rd party libraries -define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP); -require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc'); - - -/* - * CONSTANTS - redefine these in your script to change the - * behaviour of fetch_rss() currently, most options effect the cache - * - * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? - * For me a built in cache was essential to creating a "PHP-like" - * feel to Magpie, see rss_cache.inc for rationale - * - * - * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects? - * This should be a location that the webserver can write to. If this - * directory does not already exist Mapie will try to be smart and create - * it. This will often fail for permissions reasons. - * - * - * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds. - * - * - * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error - * instead of returning stale object? - * - * MAGPIE_DEBUG - Display debugging notices? - * -*/ - - -/*=======================================================================*\ - Function: fetch_rss: - Purpose: return RSS object for the give url - maintain the cache - Input: url of RSS file - Output: parsed RSS object (see rss_parse.inc) - - NOTES ON CACHEING: - If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache. - - NOTES ON RETRIEVING REMOTE FILES: - If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will - return a cached object, and touch the cache object upon recieving a - 304. - - NOTES ON FAILED REQUESTS: - If there is an HTTP error while fetching an RSS object, the cached - version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off) -\*=======================================================================*/ - -define('MAGPIE_VERSION', '0.72'); - -$MAGPIE_ERROR = ""; - -function fetch_rss ($url) { - // initialize constants - init(); - - if ( !isset($url) ) { - error("fetch_rss called without a url"); - return false; - } - - // if cache is disabled - if ( !MAGPIE_CACHE_ON ) { - // fetch file, and parse it - $resp = _fetch_remote_file( $url ); - if ( is_success( $resp->status ) ) { - return _response_to_rss( $resp ); - } - else { - error("Failed to fetch $url and cache is off"); - return false; - } - } - // else cache is ON - else { - // Flow - // 1. check cache - // 2. if there is a hit, make sure its fresh - // 3. if cached obj fails freshness check, fetch remote - // 4. if remote fails, return stale object, or error - - $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); - - if (MAGPIE_DEBUG and $cache->ERROR) { - debug($cache->ERROR, E_USER_WARNING); - } - - - $cache_status = 0; // response of check_cache - $request_headers = array(); // HTTP headers to send with fetch - $rss = 0; // parsed RSS object - $errormsg = 0; // errors, if any - - // store parsed XML by desired output encoding - // as character munging happens at parse time - $cache_key = $url . MAGPIE_OUTPUT_ENCODING; - - if (!$cache->ERROR) { - // return cache HIT, MISS, or STALE - $cache_status = $cache->check_cache( $cache_key); - } - - // if object cached, and cache is fresh, return cached obj - if ( $cache_status == 'HIT' ) { - $rss = $cache->get( $cache_key ); - if ( isset($rss) and $rss ) { - // should be cache age - $rss->from_cache = 1; - if ( MAGPIE_DEBUG > 1) { - debug("MagpieRSS: Cache HIT", E_USER_NOTICE); - } - return $rss; - } - } - - // else attempt a conditional get - - // setup headers - if ( $cache_status == 'STALE' ) { - $rss = $cache->get( $cache_key ); - if ( $rss and $rss->etag and $rss->last_modified ) { - $request_headers['If-None-Match'] = $rss->etag; - $request_headers['If-Last-Modified'] = $rss->last_modified; - } - } - - $resp = _fetch_remote_file( $url, $request_headers ); - - if (isset($resp) and $resp) { - if ($resp->status == '304' ) { - // we have the most current copy - if ( MAGPIE_DEBUG > 1) { - debug("Got 304 for $url"); - } - // reset cache on 304 (at minutillo insistent prodding) - $cache->set($cache_key, $rss); - return $rss; - } - elseif ( is_success( $resp->status ) ) { - $rss = _response_to_rss( $resp ); - if ( $rss ) { - if (MAGPIE_DEBUG > 1) { - debug("Fetch successful"); - } - // add object to cache - $cache->set( $cache_key, $rss ); - return $rss; - } - } - else { - $errormsg = "Failed to fetch $url "; - if ( $resp->status == '-100' ) { - $errormsg .= "(Request timed out after " . MAGPIE_FETCH_TIME_OUT . " seconds)"; - } - elseif ( $resp->error ) { - # compensate for Snoopy's annoying habbit to tacking - # on '\n' - $http_error = substr($resp->error, 0, -2); - $errormsg .= "(HTTP Error: $http_error)"; - } - else { - $errormsg .= "(HTTP Response: " . $resp->response_code .')'; - } - } - } - else { - $errormsg = "Unable to retrieve RSS file for unknown reasons."; - } - - // else fetch failed - - // attempt to return cached object - if ($rss) { - if ( MAGPIE_DEBUG ) { - debug("Returning STALE object for $url"); - } - return $rss; - } - - // else we totally failed - error( $errormsg ); - - return false; - - } // end if ( !MAGPIE_CACHE_ON ) { -} // end fetch_rss() - -/*=======================================================================*\ - Function: error - Purpose: set MAGPIE_ERROR, and trigger error -\*=======================================================================*/ - -function error ($errormsg, $lvl=E_USER_WARNING) { - global $MAGPIE_ERROR; - - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - if ( $errormsg ) { - $errormsg = "MagpieRSS: $errormsg"; - $MAGPIE_ERROR = $errormsg; - trigger_error( $errormsg, $lvl); - } -} - -function debug ($debugmsg, $lvl=E_USER_NOTICE) { - trigger_error("MagpieRSS [debug] $debugmsg", $lvl); -} - -/*=======================================================================*\ - Function: magpie_error - Purpose: accessor for the magpie error variable -\*=======================================================================*/ -function magpie_error ($errormsg="") { - global $MAGPIE_ERROR; - - if ( isset($errormsg) and $errormsg ) { - $MAGPIE_ERROR = $errormsg; - } - - return $MAGPIE_ERROR; -} - -/*=======================================================================*\ - Function: _fetch_remote_file - Purpose: retrieve an arbitrary remote file - Input: url of the remote file - headers to send along with the request (optional) - Output: an HTTP response object (see Snoopy.class.inc) -\*=======================================================================*/ -function _fetch_remote_file ($url, $headers = "" ) { - // Snoopy is an HTTP client in PHP - $client = new Snoopy(); - $client->agent = MAGPIE_USER_AGENT; - $client->read_timeout = MAGPIE_FETCH_TIME_OUT; - $client->use_gzip = MAGPIE_USE_GZIP; - if (is_array($headers) ) { - $client->rawheaders = $headers; - } - - @$client->fetch($url); - return $client; - -} - -/*=======================================================================*\ - Function: _response_to_rss - Purpose: parse an HTTP response object into an RSS object - Input: an HTTP response object (see Snoopy) - Output: parsed RSS object (see rss_parse) -\*=======================================================================*/ -function _response_to_rss ($resp) { - $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); - - // if RSS parsed successfully - if ( $rss and !$rss->ERROR) { - - // find Etag, and Last-Modified - foreach($resp->headers as $h) { - // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" - if (strpos($h, ": ")) { - list($field, $val) = explode(": ", $h, 2); - } - else { - $field = $h; - $val = ""; - } - - if ( $field == 'ETag' ) { - $rss->etag = $val; - } - - if ( $field == 'Last-Modified' ) { - $rss->last_modified = $val; - } - } - - return $rss; - } // else construct error message - else { - $errormsg = "Failed to parse RSS file."; - - if ($rss) { - $errormsg .= " (" . $rss->ERROR . ")"; - } - error($errormsg); - - return false; - } // end if ($rss and !$rss->error) -} - -/*=======================================================================*\ - Function: init - Purpose: setup constants with default values - check for user overrides -\*=======================================================================*/ -function init () { - if ( defined('MAGPIE_INITALIZED') ) { - return; - } - else { - define('MAGPIE_INITALIZED', true); - } - - if ( !defined('MAGPIE_CACHE_ON') ) { - define('MAGPIE_CACHE_ON', true); - } - - if ( !defined('MAGPIE_CACHE_DIR') ) { - define('MAGPIE_CACHE_DIR', './cache'); - } - - if ( !defined('MAGPIE_CACHE_AGE') ) { - define('MAGPIE_CACHE_AGE', 60*60); // one hour - } - - if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) { - define('MAGPIE_CACHE_FRESH_ONLY', false); - } - - if ( !defined('MAGPIE_OUTPUT_ENCODING') ) { - define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1'); - } - - if ( !defined('MAGPIE_INPUT_ENCODING') ) { - define('MAGPIE_INPUT_ENCODING', null); - } - - if ( !defined('MAGPIE_DETECT_ENCODING') ) { - define('MAGPIE_DETECT_ENCODING', true); - } - - if ( !defined('MAGPIE_DEBUG') ) { - define('MAGPIE_DEBUG', 0); - } - - if ( !defined('MAGPIE_USER_AGENT') ) { - $ua = 'MagpieRSS/'. MAGPIE_VERSION . ' (+http://magpierss.sf.net'; - - if ( MAGPIE_CACHE_ON ) { - $ua = $ua . ')'; - } - else { - $ua = $ua . '; No cache)'; - } - - define('MAGPIE_USER_AGENT', $ua); - } - - if ( !defined('MAGPIE_FETCH_TIME_OUT') ) { - define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout - } - - // use gzip encoding to fetch rss files if supported? - if ( !defined('MAGPIE_USE_GZIP') ) { - define('MAGPIE_USE_GZIP', true); - } -} - -// NOTE: the following code should really be in Snoopy, or at least -// somewhere other then rss_fetch! - -/*=======================================================================*\ - HTTP STATUS CODE PREDICATES - These functions attempt to classify an HTTP status code - based on RFC 2616 and RFC 2518. - - All of them take an HTTP status code as input, and return true or false - - All this code is adapted from LWP's HTTP::Status. -\*=======================================================================*/ - - -/*=======================================================================*\ - Function: is_info - Purpose: return true if Informational status code -\*=======================================================================*/ -function is_info ($sc) { - return $sc >= 100 && $sc < 200; -} - -/*=======================================================================*\ - Function: is_success - Purpose: return true if Successful status code -\*=======================================================================*/ -function is_success ($sc) { - return $sc >= 200 && $sc < 300; -} - -/*=======================================================================*\ - Function: is_redirect - Purpose: return true if Redirection status code -\*=======================================================================*/ -function is_redirect ($sc) { - return $sc >= 300 && $sc < 400; -} - -/*=======================================================================*\ - Function: is_error - Purpose: return true if Error status code -\*=======================================================================*/ -function is_error ($sc) { - return $sc >= 400 && $sc < 600; -} - -/*=======================================================================*\ - Function: is_client_error - Purpose: return true if Error status code, and its a client error -\*=======================================================================*/ -function is_client_error ($sc) { - return $sc >= 400 && $sc < 500; -} - -/*=======================================================================*\ - Function: is_client_error - Purpose: return true if Error status code, and its a server error -\*=======================================================================*/ -function is_server_error ($sc) { - return $sc >= 500 && $sc < 600; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_parse.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_parse.inc.svn-base deleted file mode 100755 index 56d420f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_parse.inc.svn-base +++ /dev/null @@ -1,605 +0,0 @@ - -* @version 0.7a -* @license GPL -* -*/ - -define('RSS', 'RSS'); -define('ATOM', 'Atom'); - -require_once (MAGPIE_DIR . 'rss_utils.inc'); - -/** -* Hybrid parser, and object, takes RSS as a string and returns a simple object. -* -* see: rss_fetch.inc for a simpler interface with integrated caching support -* -*/ -class MagpieRSS { - var $parser; - - var $current_item = array(); // item currently being parsed - var $items = array(); // collection of parsed items - var $channel = array(); // hash of channel fields - var $textinput = array(); - var $image = array(); - var $feed_type; - var $feed_version; - var $encoding = ''; // output encoding of parsed rss - - var $_source_encoding = ''; // only set if we have to parse xml prolog - - var $ERROR = ""; - var $WARNING = ""; - - // define some constants - - var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); - var $_KNOWN_ENCODINGS = array('UTF-8', 'US-ASCII', 'ISO-8859-1'); - - // parser variables, useless if you're not a parser, treat as private - var $stack = array(); // parser stack - var $inchannel = false; - var $initem = false; - var $incontent = false; // if in Atom field - var $intextinput = false; - var $inimage = false; - var $current_namespace = false; - - - /** - * Set up XML parser, parse source, and return populated RSS object.. - * - * @param string $source string containing the RSS to be parsed - * - * NOTE: Probably a good idea to leave the encoding options alone unless - * you know what you're doing as PHP's character set support is - * a little weird. - * - * NOTE: A lot of this is unnecessary but harmless with PHP5 - * - * - * @param string $output_encoding output the parsed RSS in this character - * set defaults to ISO-8859-1 as this is PHP's - * default. - * - * NOTE: might be changed to UTF-8 in future - * versions. - * - * @param string $input_encoding the character set of the incoming RSS source. - * Leave blank and Magpie will try to figure it - * out. - * - * - * @param bool $detect_encoding if false Magpie won't attempt to detect - * source encoding. (caveat emptor) - * - */ - function MagpieRSS ($source, $output_encoding='ISO-8859-1', - $input_encoding=null, $detect_encoding=true) - { - # if PHP xml isn't compiled in, die - # - if (!function_exists('xml_parser_create')) { - $this->error( "Failed to load PHP's XML Extension. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - list($parser, $source) = $this->create_parser($source, - $output_encoding, $input_encoding, $detect_encoding); - - - if (!is_resource($parser)) { - $this->error( "Failed to create an instance of PHP's XML parser. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - - $this->parser = $parser; - - # pass in parser, and a reference to this object - # setup handlers - # - xml_set_object( $this->parser, $this ); - xml_set_element_handler($this->parser, - 'feed_start_element', 'feed_end_element' ); - - xml_set_character_data_handler( $this->parser, 'feed_cdata' ); - - $status = xml_parse( $this->parser, $source ); - - if (! $status ) { - $errorcode = xml_get_error_code( $this->parser ); - if ( $errorcode != XML_ERROR_NONE ) { - $xml_error = xml_error_string( $errorcode ); - $error_line = xml_get_current_line_number($this->parser); - $error_col = xml_get_current_column_number($this->parser); - $errormsg = "$xml_error at line $error_line, column $error_col"; - - $this->error( $errormsg ); - } - } - - xml_parser_free( $this->parser ); - - $this->normalize(); - } - - function feed_start_element($p, $element, &$attrs) { - $el = $element = strtolower($element); - $attrs = array_change_key_case($attrs, CASE_LOWER); - - // check for a namespace, and split if found - $ns = false; - if ( strpos( $element, ':' ) ) { - list($ns, $el) = split( ':', $element, 2); - } - if ( $ns and $ns != 'rdf' ) { - $this->current_namespace = $ns; - } - - # if feed type isn't set, then this is first element of feed - # identify feed from root element - # - if (!isset($this->feed_type) ) { - if ( $el == 'rdf' ) { - $this->feed_type = RSS; - $this->feed_version = '1.0'; - } - elseif ( $el == 'rss' ) { - $this->feed_type = RSS; - $this->feed_version = $attrs['version']; - } - elseif ( $el == 'feed' ) { - $this->feed_type = ATOM; - $this->feed_version = $attrs['version']; - $this->inchannel = true; - } - return; - } - - if ( $el == 'channel' ) - { - $this->inchannel = true; - } - elseif ($el == 'item' or $el == 'entry' ) - { - $this->initem = true; - if ( isset($attrs['rdf:about']) ) { - $this->current_item['about'] = $attrs['rdf:about']; - } - } - - // if we're in the default namespace of an RSS feed, - // record textinput or image fields - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'textinput' ) - { - $this->intextinput = true; - } - - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'image' ) - { - $this->inimage = true; - } - - # handle atom content constructs - elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - // avoid clashing w/ RSS mod_content - if ($el == 'content' ) { - $el = 'atom_content'; - } - - $this->incontent = $el; - - - } - - // if inside an Atom content construct (e.g. content or summary) field treat tags as text - elseif ($this->feed_type == ATOM and $this->incontent ) - { - // if tags are inlined, then flatten - $attrs_str = join(' ', - array_map('map_attrs', - array_keys($attrs), - array_values($attrs) ) ); - - $this->append_content( "<$element $attrs_str>" ); - - array_unshift( $this->stack, $el ); - } - - // Atom support many links per containging element. - // Magpie treats link elements of type rel='alternate' - // as being equivalent to RSS's simple link element. - // - elseif ($this->feed_type == ATOM and $el == 'link' ) - { - if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) - { - $link_el = 'link'; - } - else { - $link_el = 'link_' . $attrs['rel']; - } - - $this->append($link_el, $attrs['href']); - } - // set stack[0] to current element - else { - array_unshift($this->stack, $el); - } - } - - - - function feed_cdata ($p, $text) { - if ($this->feed_type == ATOM and $this->incontent) - { - $this->append_content( $text ); - } - else { - $current_el = join('_', array_reverse($this->stack)); - $this->append($current_el, $text); - } - } - - function feed_end_element ($p, $el) { - $el = strtolower($el); - - if ( $el == 'item' or $el == 'entry' ) - { - $this->items[] = $this->current_item; - $this->current_item = array(); - $this->initem = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) - { - $this->intextinput = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) - { - $this->inimage = false; - } - elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - $this->incontent = false; - } - elseif ($el == 'channel' or $el == 'feed' ) - { - $this->inchannel = false; - } - elseif ($this->feed_type == ATOM and $this->incontent ) { - // balance tags properly - // note: i don't think this is actually neccessary - if ( $this->stack[0] == $el ) - { - $this->append_content(""); - } - else { - $this->append_content("<$el />"); - } - - array_shift( $this->stack ); - } - else { - array_shift( $this->stack ); - } - - $this->current_namespace = false; - } - - function concat (&$str1, $str2="") { - if (!isset($str1) ) { - $str1=""; - } - $str1 .= $str2; - } - - - - function append_content($text) { - if ( $this->initem ) { - $this->concat( $this->current_item[ $this->incontent ], $text ); - } - elseif ( $this->inchannel ) { - $this->concat( $this->channel[ $this->incontent ], $text ); - } - } - - // smart append - field and namespace aware - function append($el, $text) { - if (!$el) { - return; - } - if ( $this->current_namespace ) - { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $this->current_namespace ][ $el ], $text); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $this->current_namespace ][ $el ], $text ); - } - } - else { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $el ], $text); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $el ], $text ); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $el ], $text ); - } - - } - } - - function normalize () { - // if atom populate rss fields - if ( $this->is_atom() ) { - $this->channel['description'] = $this->channel['tagline']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['summary']) ) - $item['description'] = $item['summary']; - if ( isset($item['atom_content'])) - $item['content']['encoded'] = $item['atom_content']; - - $atom_date = (isset($item['issued']) ) ? $item['issued'] : $item['modified']; - if ( $atom_date ) { - $epoch = @parse_w3cdtf($atom_date); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - elseif ( $this->is_rss() ) { - $this->channel['tagline'] = $this->channel['description']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['description'])) - $item['summary'] = $item['description']; - if ( isset($item['content']['encoded'] ) ) - $item['atom_content'] = $item['content']['encoded']; - - if ( $this->is_rss() == '1.0' and isset($item['dc']['date']) ) { - $epoch = @parse_w3cdtf($item['dc']['date']); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - elseif ( isset($item['pubdate']) ) { - $epoch = @strtotime($item['pubdate']); - if ($epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - } - - - function is_rss () { - if ( $this->feed_type == RSS ) { - return $this->feed_version; - } - else { - return false; - } - } - - function is_atom() { - if ( $this->feed_type == ATOM ) { - return $this->feed_version; - } - else { - return false; - } - } - - /** - * return XML parser, and possibly re-encoded source - * - */ - function create_parser($source, $out_enc, $in_enc, $detect) { - if ( substr(phpversion(),0,1) == 5) { - $parser = $this->php5_create_parser($in_enc, $detect); - } - else { - list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect); - } - if ($out_enc) { - $this->encoding = $out_enc; - xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc); - } - - return array($parser, $source); - } - - /** - * Instantiate an XML parser under PHP5 - * - * PHP5 will do a fine job of detecting input encoding - * if passed an empty string as the encoding. - * - * All hail libxml2! - * - */ - function php5_create_parser($in_enc, $detect) { - // by default php5 does a fine job of detecting input encodings - if(!$detect && $in_enc) { - return xml_parser_create($in_enc); - } - else { - return xml_parser_create(''); - } - } - - /** - * Instaniate an XML parser under PHP4 - * - * Unfortunately PHP4's support for character encodings - * and especially XML and character encodings sucks. As - * long as the documents you parse only contain characters - * from the ISO-8859-1 character set (a superset of ASCII, - * and a subset of UTF-8) you're fine. However once you - * step out of that comfy little world things get mad, bad, - * and dangerous to know. - * - * The following code is based on SJM's work with FoF - * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss - * - */ - function php4_create_parser($source, $in_enc, $detect) { - if ( !$detect ) { - return array(xml_parser_create($in_enc), $source); - } - - if (!$in_enc) { - if (preg_match('//m', $source, $m)) { - $in_enc = strtoupper($m[1]); - $this->source_encoding = $in_enc; - } - else { - $in_enc = 'UTF-8'; - } - } - - if ($this->known_encoding($in_enc)) { - return array(xml_parser_create($in_enc), $source); - } - - // the dectected encoding is not one of the simple encodings PHP knows - - // attempt to use the iconv extension to - // cast the XML to a known encoding - // @see http://php.net/iconv - - if (function_exists('iconv')) { - $encoded_source = iconv($in_enc,'UTF-8', $source); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // iconv didn't work, try mb_convert_encoding - // @see http://php.net/mbstring - if(function_exists('mb_convert_encoding')) { - $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc ); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // else - $this->error("Feed is in an unsupported character encoding. ($in_enc) " . - "You may see strange artifacts, and mangled characters.", - E_USER_NOTICE); - - return array(xml_parser_create(), $source); - } - - function known_encoding($enc) { - $enc = strtoupper($enc); - if ( in_array($enc, $this->_KNOWN_ENCODINGS) ) { - return $enc; - } - else { - return false; - } - } - - function error ($errormsg, $lvl=E_USER_WARNING) { - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - if ( MAGPIE_DEBUG ) { - trigger_error( $errormsg, $lvl); - } - else { - error_log( $errormsg, 0); - } - - $notices = E_USER_NOTICE|E_NOTICE; - if ( $lvl&$notices ) { - $this->WARNING = $errormsg; - } else { - $this->ERROR = $errormsg; - } - } - - -} // end class RSS - -function map_attrs($k, $v) { - return "$k=\"$v\""; -} - -// patch to support medieval versions of PHP4.1.x, -// courtesy, Ryan Currie, ryan@digibliss.com - -if (!function_exists('array_change_key_case')) { - define("CASE_UPPER",1); - define("CASE_LOWER",0); - - - function array_change_key_case($array,$case=CASE_LOWER) { - if ($case=CASE_LOWER) $cmd=strtolower; - elseif ($case=CASE_UPPER) $cmd=strtoupper; - foreach($array as $key=>$value) { - $output[$cmd($key)]=$value; - } - return $output; - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_utils.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_utils.inc.svn-base deleted file mode 100755 index 2a29e72a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/.svn/text-base/rss_utils.inc.svn-base +++ /dev/null @@ -1,67 +0,0 @@ - - * Version: 0.51 - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * magpierss-general@lists.sourceforge.net - */ - - -/*======================================================================*\ - Function: parse_w3cdtf - Purpose: parse a W3CDTF date into unix epoch - - NOTE: http://www.w3.org/TR/NOTE-datetime -\*======================================================================*/ - -function parse_w3cdtf ( $date_str ) { - - # regex to match wc3dtf - $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; - - if ( preg_match( $pat, $date_str, $match ) ) { - list( $year, $month, $day, $hours, $minutes, $seconds) = - array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]); - - # calc epoch for current date assuming GMT - $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year); - - $offset = 0; - if ( $match[10] == 'Z' ) { - # zulu time, aka GMT - } - else { - list( $tz_mod, $tz_hour, $tz_min ) = - array( $match[8], $match[9], $match[10]); - - # zero out the variables - if ( ! $tz_hour ) { $tz_hour = 0; } - if ( ! $tz_min ) { $tz_min = 0; } - - $offset_secs = (($tz_hour*60)+$tz_min)*60; - - # is timezone ahead of GMT? then subtract offset - # - if ( $tz_mod == '+' ) { - $offset_secs = $offset_secs * -1; - } - - $offset = $offset_secs; - } - $epoch = $epoch + $offset; - return $epoch; - } - else { - return -1; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/AUTHORS b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/AUTHORS deleted file mode 100755 index 2f52c215..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -kellan diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/CHANGES b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/CHANGES deleted file mode 100755 index b7ab200e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/CHANGES +++ /dev/null @@ -1,41 +0,0 @@ -Version 0.72 ------------ - - fix security exploit: http://www.sec-consult.com/216.html - -Version 0.7 ------------ - - support for input and output charset encoding - based on the work in FoF, uses iconv or mbstring if available - - - -Version 0.6 ------------ - - basic support for Atom syndication format - including support for Atom content constructs - - fixed support for private feeds (HTTP Auth and SSL) - (thanks to silverorange.com for providing test feeds) - - support for some broken webservers - -Version 0.52 ------------ - - support GZIP content negoiation - - PHP 4.3.2 support - -Version 0.4 ------------ - - improved error handling, better access for script authors - - included example scripts of working with MagpieRSS - - new Smarty plugin for RSS date parsing - -Version 0.3 ------------ - - added support for conditional gets (Last-Modified, ETag) - - now use Snoopy to handle fetching RSS files - -Version 0.2 ------------ - - MAJOR CLEAN UP - - removed kludgy $options array in favour of constants - - phased out returning arrays - - added better error handling - - re-worked comments diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/ChangeLog b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/ChangeLog deleted file mode 100755 index 7eb25810..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/ChangeLog +++ /dev/null @@ -1,405 +0,0 @@ -2005-10-28 14:11 kellan - - * extlib/Snoopy.class.inc: a better solution - -2005-10-28 11:51 kellan - - * extlib/Snoopy.class.inc: fix arbtriary code execution - vulnerability when using curl+ssl - - http://www.sec-consult.com/216.html - -2005-03-08 10:46 kellan - - * rss_parse.inc: fix bug w/ atom and date normalization - -2005-02-09 14:59 kellan - - * rss_fetch.inc: fix stale cache bug - -2005-01-28 02:27 kellan - - * rss_parse.inc: support php w/o array_change_case - -2005-01-23 20:02 kellan - - * rss_fetch.inc: fix cache bug introduced by charset encoding - -2005-01-12 09:14 kellan - - * rss_cache.inc, rss_fetch.inc: more sanity checks for when things - go wrong - -2004-12-12 13:44 kellan - - * INSTALL, rss_cache.inc, rss_utils.inc: detab - -2004-11-23 20:15 kellan - - * rss_parse.inc: fix calling iconv instead of mb_convert_encoding - -2004-11-22 02:11 kellan - - * CHANGES, ChangeLog, rss_parse.inc, scripts/magpie_debug.php: last - bit of tidying - -2004-11-22 01:45 kellan - - * rss_fetch.inc: detab, bump version - -2004-11-22 01:43 kellan - - * rss_parse.inc: was filtering too much - -2004-11-22 00:03 kellan - - * rss_fetch.inc, rss_parse.inc: cache on $url . $output_encoding - otherwise we can get munged output - -2004-11-21 23:52 kellan - - * rss_parse.inc: add WARNING - -2004-11-21 23:45 kellan - - * rss_parse.inc: don't set ERROR on notice or warning (rss_fetch - dies on parse errors) - -2004-11-21 23:44 kellan - - * rss_fetch.inc: add encoding defines (fix timeout error reporting) - -2004-11-21 20:21 kellan - - * rss_parse.inc: incorporate steve's patch - -2004-11-21 19:26 kellan - - * rss_parse.inc: remove old debugging functions, totally - arbitrarily. might break stuff. can't really explain why i'm - doing this. - -2004-10-28 15:52 kellan - - * rss_parse.inc: fixed '=' instead of '==' - -2004-10-26 00:48 kellan - - * rss_parse.inc: chance epoch to timestamp to conform w/ php naming - conventions - -2004-06-15 12:00 kellan - - * rss_parse.inc: [no log message] - -2004-04-26 14:16 kellan - - * rss_fetch.inc: bump version - -2004-04-26 12:36 kellan - - * rss_parse.inc: fix field doubling - -2004-04-24 17:47 kellan - - * CHANGES, ChangeLog: updated - -2004-04-24 17:35 kellan - - * rss_fetch.inc: bumped version - -2004-04-24 16:52 kellan - - * rss_parse.inc: support arbitrary atom content constructs - - some refactoring - -2004-04-24 16:15 kellan - - * rss_parse.inc: support summary content contstruct. add normalize - function - -2004-03-27 16:29 kellan - - * extlib/Snoopy.class.inc: accept self-signed certs - -2004-03-27 12:53 kellan - - * extlib/Snoopy.class.inc: fixed SSL support * set status * set - error on bad curl - - (also ripped out big chunks of dead weight (submit_form) which - were getting in my way - -2004-01-25 02:25 kellan - - * rss_parse.inc: make RSS 1.0's rdf:about available - -2004-01-25 02:07 kellan - - * rss_parse.inc: clean up text, and line formats. add support item - rdf:about - -2004-01-24 23:40 kellan - - * CHANGES, ChangeLog: update changes - -2004-01-24 23:37 kellan - - * rss_fetch.inc: updated version - -2004-01-24 23:35 kellan - - * rss_parse.inc: whitespace - -2004-01-24 23:23 kellan - - * extlib/Snoopy.class.inc: support badly formatted http headers - -2004-01-24 23:20 kellan - - * rss_parse.inc: added alpha atom parsing support - -2003-06-25 22:34 kellan - - * extlib/Snoopy.class.inc: fixed fread 4.3.2 compatibility problems - -2003-06-13 11:31 kellan - - * rss_fetch.inc: reset cache on 304 - -2003-06-12 21:37 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: - bumped up version numbers - -2003-06-12 21:32 kellan - - * htdocs/index.html: updated news - -2003-06-12 21:27 kellan - - * NEWS: a manual blog :) - -2003-06-12 21:22 kellan - - * htdocs/index.html: fully qualified img - -2003-06-12 21:20 kellan - - * htdocs/index.html: clean up. added badge. - -2003-06-12 21:04 kellan - - * rss_utils.inc: clean up regex - -2003-06-12 21:02 kellan - - * rss_cache.inc: suppress some warnings - -2003-05-30 20:44 kellan - - * extlib/Snoopy.class.inc: more comments, cleaned up notice - -2003-05-30 15:14 kellan - - * extlib/Snoopy.class.inc: don't advertise gzip support if the user - hasn't built php with gzinflate support - -2003-05-12 22:32 kellan - - * ChangeLog: changes - -2003-05-12 22:11 kellan - - * htdocs/index.html: announce 0.5 - -2003-05-12 21:42 kellan - - * htdocs/index.html: change - -2003-05-12 21:39 kellan - - * rss_fetch.inc: use gzip - -2003-05-12 21:37 kellan - - * extlib/Snoopy.class.inc: added support gzip encoded content - negoiation - -2003-05-12 21:32 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: fixed - typoes - -2003-04-26 21:44 kellan - - * rss_parse.inc: fix minor typo - -2003-04-18 08:19 kellan - - * htdocs/cookbook.html: updated cookbook to show more code for - limiting items - -2003-03-03 16:02 kellan - - * rss_parse.inc, scripts/magpie_slashbox.php: committed (or - adpated) patch from Nicola (www.technick.com) to quell 'Undefined - Indexes' notices - -2003-03-03 15:59 kellan - - * rss_fetch.inc: commited patch from nicola (www.technick.com) to - quell 'undefined indexes' notices. - - * Magpie now automatically includes its version in the - user-agent, & whether cacheing is turned on. - -2003-02-12 01:22 kellan - - * CHANGES, ChangeLog: ChangeLog now auto-generated by cvs2cl - -2003-02-12 00:21 kellan - - * rss_fetch.inc: better errors, hopefully stomped on pesky notices - -2003-02-12 00:19 kellan - - * rss_parse.inc: check to see is xml is supported, if not die - - also throw better xml errors - -2003-02-12 00:18 kellan - - * rss_cache.inc: hopefully cleared up some notices that were being - thrown into the log - - fixed a debug statement that was being called as an error - -2003-02-12 00:15 kellan - - * scripts/: magpie_simple.php, magpie_slashbox.php: moved - magpie_simple to magpie_slashbox, and replaced it with a simpler - demo. - -2003-02-12 00:02 kellan - - * INSTALL, README, TROUBLESHOOTING: Improved documentation. Better - install instructions. - - TROUBLESHOOTING cover common installation and usage problems - -2003-01-22 14:40 kellan - - * htdocs/cookbook.html: added cookbook.html - -2003-01-21 23:47 kellan - - * cookbook: a magpie cookbook - -2003-01-20 10:09 kellan - - * ChangeLog: updated - -2003-01-20 09:23 kellan - - * scripts/simple_smarty.php: minor clean up - -2003-01-20 09:15 kellan - - * scripts/README: added smarty url - -2003-01-20 09:14 kellan - - * magpie_simple.php, htdocs/index.html, scripts/README, - scripts/magpie_debug.php, scripts/magpie_simple.php, - scripts/simple_smarty.php, - scripts/smarty_plugin/modifier.rss_date_parse.php, - scripts/templates/simple.smarty: Added scripts directory for - examples on how to use MagpieRSS - - magpie_simple - is a simple example magpie_debug - spew all the - information from a parsed RSS feed simple_smary - example of - using magpie with Smarty template system - smarty_plugin/modifier.rss_date_parse.php - support file for the - smarty demo templates/simple.smary - template for the smarty demo - -2003-01-20 09:11 kellan - - * rss_fetch.inc, rss_parse.inc: changes to error handling to give - script authors more access to magpie's errors. - - added method magpie_error() to retrieve global MAGPIE_ERROR - variable for when fetch_rss() returns false - -2002-10-26 19:02 kellan - - * htdocs/index.html: putting the website under source control - -2002-10-26 18:43 kellan - - * AUTHORS, ChangeLog, INSTALL, README: some documentation to make - it all look official :) - -2002-10-25 23:04 kellan - - * magpie_simple.php: quxx - -2002-10-25 23:04 kellan - - * rss_parse.inc: added support for textinput and image - -2002-10-25 19:23 kellan - - * magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc, - rss_utils.inc: switched to using Snoopy for fetching remote RSS - files. - - added support for conditional gets - -2002-10-25 19:22 kellan - - * rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: - Change comment style to slavishly imitate the phpinsider style - found in Smarty and Snoopy :) - -2002-10-25 19:18 kellan - - * extlib/Snoopy.class.inc: added Snoopy in order to support - conditional gets - -2002-10-23 23:19 kellan - - * magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc: - MAJOR CLEANUP! - - * rss_fetch got rid of the options array, replaced it with a more - PHP-like solution of using defines. constants are setup, with - defaults, in the function init() - - got rid of the idiom of passing back an array, its was awkward to - deal with in PHP, and unusual (and consquently confusing to - people). now i return true/false values, and try to setup error - string where appropiate (rss_cache has the most complete example - of this) - - change the logic for interacting with the cache - - * rss_cache major re-working of how error are handled. tried to - make the code more resillient. the cache is now much more aware - of MAX_AGE, where before this was being driven out of rss_fetch - (which was silly) - - * rss_parse properly handles xml parse errors. used to sail - along blithely unaware. - -2002-09-11 11:11 kellan - - * rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc, - rss_utils.inc: Initial revision - -2002-09-11 11:11 kellan - - * rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc, - rss_utils.inc: initial import - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/INSTALL b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/INSTALL deleted file mode 100755 index ea106cc4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/INSTALL +++ /dev/null @@ -1,143 +0,0 @@ -REQUIREMENTS - - MapieRSS requires a recent PHP 4+ (developed with 4.2.0) - with xml (expat) support. - - Optionally: - * PHP5 with libxml2 support. - * cURL for SSL support - * iconv (preferred) or mb_string for expanded character set support - -QUICK START - - Magpie consists of 4 files (rss_fetch.inc, rss_parser.inc, rss_cache.inc, - and rss_utils.inc), and the directory extlib (which contains a modified - version of the Snoopy HTTP client) - - Copy these 5 resources to a directory named 'magpierss' in the same - directory as your PHP script. - - At the top of your script add the following line: - - require_once('magpierss/rss_fetch.inc'); - - Now you can use the fetch_rss() method: - - $rss = fetch_rss($url); - - Done. That's it. See README for more details on using MagpieRSS. - -NEXT STEPS - - Important: you'll probably want to get the cache directory working in - order to speed up your application, and not abuse the webserver you're - downloading the RSS from. - - Optionally you can install MagpieRSS in your PHP include path in order to - make it available server wide. - - Lastly you might want to look through the constants in rss_fetch.inc see if - there is anything you want to override (the defaults are pretty good) - - For more info, or if you have trouble, see TROUBLESHOOTING - -SETTING UP CACHING - - Magpie has built-in transparent caching. With caching Magpie will only - fetch and parse RSS feeds when there is new content. Without this feature - your pages will be slow, and the sites serving the RSS feed will be annoyed - with you. - -** Simple and Automatic ** - - By default Magpie will try to create a cache directory named 'cache' in the - same directory as your PHP script. - -** Creating a Local Cache Directory ** - - Often this will fail, because your webserver doesn't have sufficient - permissions to create the directory. - - Exact instructions for how to do this will vary from install to install and - platform to platform. The steps are: - - 1. Make a directory named 'cache' - 2. Give the web server write access to that directory. - - An example of how to do this on Debian would be: - - 1. mkdir /path/to/script/cache - 2. chgrp www-data /path/to/script/cache - 3. chmod 775 /path/to/script/cache - - On other Unixes you'll need to change 'www-data' to what ever user Apache - runs as. (on MacOS X the user would be 'www') - -** Cache in /tmp ** - - Sometimes you won't be able to create a local cache directory. Some reasons - might be: - - 1. No shell account - 2. Insufficient permissions to change ownership of a directory - 3. Webserver runs as 'nobody' - - In these situations using a cache directory in /tmp can often be a good - option. - - The drawback is /tmp is public, so anyone on the box can read the cache - files. Usually RSS feeds are public information, so you'll have to decide - how much of an issue that is. - - To use /tmp as your cache directory you need to add the following line to - your script: - - define('MAGPIE_CACHE_DIR', '/tmp/magpie_cache'); - -** Global Cache ** - - If you have several applications using Magpie, you can create a single - shared cache directory, either using the /tmp cache, or somewhere else on - the system. - - The upside is that you'll distribute fetching and parsing feeds across - several applications. - -INSTALLING MAGPIE SERVER WIDE - - Rather then following the Quickstart instructions which requires you to have - a copy of Magpie per application, alternately you can place it in some - shared location. - -** Adding Magpie to Your Include Path ** - - Copy the 5 resources (rss_fetch.inc, rss_parser.inc, rss_cache.inc, - rss_utils.inc, and extlib) to a directory named 'magpierss' in your include - path. Now any PHP file on your system can use Magpie with: - - require_once('magpierss/rss_fetch.inc'); - - Different installs have different include paths, and you'll have to figure - out what your include_path is. - - From shell you can try: - - php -i | grep 'include_path' - - Alternatley you can create a phpinfo.php file with contains: - - - - Debian's default is: - - /usr/share/php - - (though more idealogically pure location would be /usr/local/share/php) - - Apple's default include path is: - - /usr/lib/php - - While the Entropy PHP build seems to use: - - /usr/local/php/lib/php \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/NEWS b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/NEWS deleted file mode 100755 index 982af083..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/NEWS +++ /dev/null @@ -1,53 +0,0 @@ -MagpieRSS News - -MAGPIERSS 0.51 RELEASED - * important bugfix! - * fix "silent failure" when PHP doesn't have zlib - -FEED ON FEEDS USES MAGPIE - * web-based RSS aggregator built with Magpie - * easy to install, easy to use. - http://minutillo.com/steve/feedonfeeds/ - -MAGPIERSS 0.5 RELEASED - * supports transparent HTTP gzip content negotiation for reduced bandwidth usage - * quashed some undefined index notices - -MAGPIERSS 0.46 RELEASED - * minor release, more error handling clean up - * documentation fixes, simpler example - * new trouble shooting guide for installation and usage problems - http://magpierss.sourceforge.net/TROUBLESHOOTING - -MAGPIE NEWS AS RSS - * releases, bug fixes, releated stories in RSS - -MAGPIERSS COOKBOOK: SIMPLE PHP RSS HOW TOS - * answers some of the most frequently asked Magpie questions - * feedback, suggestions, requests, recipes welcome - http://magpierss.sourceforge.net/cookbook.html - -MAGPIERSS 0.4 RELEASED! - * improved error handling, more flexibility for script authors, backwards compatible - * new and better examples! including using MagpieRSS and Smarty - * new Smarty plugin for RSS date parsing - http://smarty.php.net - -INFINITE PENGUIN NOW SUPPORTS MAGPIE 0.3 - * simple, sophisticated RSS viewer - * includes auto-generated javascript ticker from RSS feed - http://www.infinitepenguins.net/rss/ - -TRAUMWIND RELEASES REX BACKEND FOR MAGPIERSS - * drop in support using regex based XML parser - * parses improperly formed XML that chokes expat - http://traumwind.de/blog/magpie/magpie_alike.php - -MAGPIERSS 0.3 RELEASED! - * Support added for HTTP Conditional GETs. - http://fishbowl.pastiche.org/archives/001132.html - -MAGPIERSS 0.2! - * Major clean up of the code. Easier to use. - * Simpler install on shared hosts. - * Better documentation and comments. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/README b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/README deleted file mode 100755 index c39f0f53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/README +++ /dev/null @@ -1,48 +0,0 @@ -NAME - - MagpieRSS - a simple RSS integration tool - -SYNOPSIS - - require_once(rss_fetch.inc); - $url = $_GET['url']; - $rss = fetch_rss( $url ); - - echo "Channel Title: " . $rss->channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; - -DESCRIPTION - - MapieRSS is an XML-based RSS parser in PHP. It attempts to be "PHP-like", - and simple to use. - - Some features include: - - * supports RSS 0.9 - 1.0, with limited RSS 2.0 support - * supports namespaces, and modules, including mod_content and mod_event - * open minded [1] - * simple, functional interface, to object oriented backend parser - * automatic caching of parsed RSS objects makes its easy to integrate - * supports conditional GET with Last-Modified, and ETag - * uses constants for easy override of default behaviour - * heavily commented - - -1. By open minded I mean Magpie will accept any tag it finds in good faith that - it was supposed to be here. For strict validation, look elsewhere. - - -GETTING STARTED - - - -COPYRIGHT: - Copyright(c) 2002 kellan@protest.net. All rights reserved. - This software is released under the GNU General Public License. - Please read the disclaimer at the top of the Snoopy.class.inc file. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/TROUBLESHOOTING b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/TROUBLESHOOTING deleted file mode 100755 index 3490e0b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/TROUBLESHOOTING +++ /dev/null @@ -1,152 +0,0 @@ -TROUBLESHOOTING - - -Trouble Installing MagpieRSS: - -1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' - (include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') - -2. Cache couldn't make dir './cache'. - -3. Fatal error: Failed to load PHP's XML Extension. - http://www.php.net/manual/en/ref.xml.php - -Trouble Using MagpieRSS - -4. Warning: MagpieRSS: Failed to fetch example.com/index.rdf. - (HTTP Error: Invalid protocol "") - -5. Warning: MagpieRSS: Failed to parse RSS file. - (not well-formed (invalid token) at line 19, column 98) - -6. Warning: MagpieRSS: Failed to fetch http://localhost/rss/features.1-0.rss. - (HTTP Response: HTTP/1.1 404 Not Found) - -If you would rather provide a custom error, see the COOKBOOK -(http://magpierss.sf.net/cookbook.html) recipe 2. - -************************************************************************* -1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' - (include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') - - This could mean that: - - a) PHP can't find the MagpieRSS files. - b) PHP found them the MagpieRSS files, but can't read them. - - a. Telling PHP where to look for MagpieRSS file. - - This might mean your PHP program can't find the MagpieRSS libraries. - Magpie relies on 4 include files, rss_fetch.inc, rss_parse.inc, - rss_cache.inc, rss_util.inc, and for normal use you'll need all 4 (see the - cookbook for exceptions). - - This can be fixed by making sure the MagpieRSS files are in your include - path. - - If you can edit your include path (for example your on a shared host) then - you need to replace: - - require_once('rss_fetch.inc'); - - -with- - - define('MAGPIE_DIR', '/path/to/magpierss/'); - require_once(MAGPIE_DIR.'rss_fetch.inc'); - - b. PHP can't read the MagpieRSS files - - All PHP libraries need to be readable by your webserver. - - On Unix you can accomplish this with: - - chmod 755 rss_fetch.inc rss_parse.inc rss_cache.inc rss_util.inc - -************************************************************************* -2. Cache couldn't make dir './cache'. - - MagpieRSS caches the results of fetched and parsed RSS to reduce the load on - both your server, and the remote server providing the RSS. It does this by - writing files to a cache directory. - - This error means the webserver doesn't have write access to the current - directory. - - a. Make a webserver writeable cache directory - - Find the webserver's group. (on my system it is 'www') - - mkdir ./cache - chgrp www directory_name - chmod g+w directory_name - - (this is the best, and desired solution) - - b. Tell MagpieRSS to create the cache directory somewhere the webserver can - write to. - - define('MAGPIE_CACHE_DIR', '/tmp/magpierss'); - - (this is not a great solution, and might have security considerations) - - c. Turn off cacheing. - - Magpie can work fine with cacheing, but it will be slower, and you might - become a nuiance to the RSS provider, but it is an option. - - define('MAGPIE_CACHE_ON', 0); - - d. And lastly, do NOT - - chmod 777 ./cache - - Any of the above solutions are better then this. - - NOTE: If none of this works for you, let me know. I've got root, and a - custom compiled Apache on almost any box I ever touch, so I can be a little - out of touch with reality. But I won't know that if I don't feedback. - -************************************************************************* 3. -3. Fatal error: Failed to load PHP's XML Extension. - http://www.php.net/manual/en/ref.xml.php - - -or- - - Fatal error: Failed to create an instance of PHP's XML parser. - http://www.php.net/manual/en/ref.xml.php - - Make sure your PHP was built with --with-xml - - This has been turned on by default for several versions of PHP, but it might - be turned off in your build. - - See php.net for details on building and configuring PHP. - - -************************************************************************* -4. Warning: MagpieRSS: Failed to fetch index.rdf. - (HTTP Error: Invalid protocol "") - - You need to put http:// in front of your the URL to your RSS feed - -************************************************************************* -5. Warning: MagpieRSS: Failed to parse RSS file. - (not well-formed (invalid token) at line 19, column 98) - - There is a problem with the RSS feed you are trying to read. - MagpieRSS is an XML parser, and therefore can't parse RSS feed with invalid - characters. Some RSS parser are based on regular expressions, and can - parse invalid RSS but they have their own problems. - - You could try contacting the author of the RSS feed, and pointing them to - the online RSS validator at: - - http://feeds.archive.org/validator/ - -************************************************************************* -6. Warning: MagpieRSS: Failed to fetch http://example.com/index.rdf - (HTTP Response: HTTP/1.1 404 Not Found) - - Its a 404! The RSS file ain't there. - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/cookbook b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/cookbook deleted file mode 100755 index 0559c64c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/cookbook +++ /dev/null @@ -1,125 +0,0 @@ -MAGPIERSS RECIPES: Cooking with Corbies - - "Four and twenty blackbirds baked in a pie." - -1. LIMIT THE NUMBER OF HEADLINES(AKA ITEMS) RETURNED. - -PROBLEM: - -You want to display the 10 (or 3) most recent headlines, but the RSS feed -contains 15. - -SOLUTION: - -$num_items = 10; -$rss = fetch_rss($url); - -$items = array_slice($rss->items, 0, $num_items); - -DISCUSSION: - -Rather then trying to limit the number of items Magpie parses, a much simpler, -and more flexible approach is to take a "slice" of the array of items. And -array_slice() is smart enough to do the right thing if the feed has less items -then $num_items. - -See: http://www.php.net/array_slice - - -2. DISPLAY A CUSTOM ERROR MESSAGE IF SOMETHING GOES WRONG - -PROBLEM: - -You don't want Magpie's error messages showing up if something goes wrong. - -SOLUTION: - -# Magpie throws USER_WARNINGS only -# so you can cloak these, by only showing ERRORs -error_reporting(E_ERROR); - -# check the return value of fetch_rss() - -$rss = fetch_rss($url); - -if ( $rss ) { -...display rss feed... -} -else { - echo "An error occured! " . - "Consider donating more $$$ for restoration of services." . - "
    Error Message: " . magpie_error(); -} - -DISCUSSION: - -MagpieRSS triggers a warning in a number of circumstances. The 2 most common -circumstances are: if the specified RSS file isn't properly formed (usually -because it includes illegal HTML), or if Magpie can't download the remote RSS -file, and there is no cached version. - -If you don't want your users to see these warnings change your error_reporting -settings to only display ERRORs. Another option is to turn off display_error, -so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages. - -You can do this with: - -ini_set('display_errors', 0); - -See: http://www.php.net/error_reporting, - http://www.php.net/ini_set, - http://www.php.net/manual/en/ref.errorfunc.php - -3. GENERATE A NEW RSS FEED - -PROBLEM: - -Create an RSS feed for other people to use. - -SOLUTION: - -Use Useful Inc's RSSWriter (http://usefulinc.com/rss/rsswriter/) - -DISCUSSION: - -An example of turning a Magpie parsed RSS object back into an RSS file is forth -coming. In the meantime RSSWriter has great documentation. - -4. DISPLAY HEADLINES MORE RECENT THEN X DATE - -PROBLEM: - -You only want to display headlines that were published on, or after a certain -date. - - -SOLUTION: - -require 'rss_utils.inc'; - -# get all headlines published today -$today = getdate(); - -# today, 12AM -$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']); - -$rss = fetch_rss($url); - -foreach ( $rss->items as $item ) { - $published = parse_w3cdtf($item['dc']['date']); - if ( $published >= $date ) { - echo "Title: " . $item['title']; - echo "Published: " . date("h:i:s A", $published); - echo "

    "; - } -} - -DISCUSSION: - -This recipe only works for RSS 1.0 feeds that include the field. -(which is very good RSS style) - -parse_w3cdtf is defined in rss_utils.inc, and parses RSS style dates into Unix -epoch seconds. - -See: http://www.php.net/manual/en/ref.datetime.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/all-wcprops deleted file mode 100755 index 91b0b366..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/extlib -END -Snoopy.class.inc -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/extlib/Snoopy.class.inc -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/entries deleted file mode 100755 index 1125d443..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie/extlib -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Snoopy.class.inc -file - - - - -2008-02-29T14:57:49.302625Z -41b8457b9011f84d301011bbc22c82a2 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/prop-base/Snoopy.class.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/prop-base/Snoopy.class.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/prop-base/Snoopy.class.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/text-base/Snoopy.class.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/text-base/Snoopy.class.inc.svn-base deleted file mode 100755 index 3ddecbab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/.svn/text-base/Snoopy.class.inc.svn-base +++ /dev/null @@ -1,900 +0,0 @@ - -Copyright (c): 1999-2000 ispi, all rights reserved -Version: 1.0 - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser 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 - -You may contact the author of Snoopy by e-mail at: -monte@ispi.net - -Or, write to: -Monte Ohrt -CTO, ispi -237 S. 70th suite 220 -Lincoln, NE 68510 - -The latest version of Snoopy can be obtained from: -http://snoopy.sourceforge.com - -*************************************************/ - -class Snoopy -{ - /**** Public variables ****/ - - /* user definable vars */ - - var $host = "www.php.net"; // host name we are connecting to - var $port = 80; // port we are connecting to - var $proxy_host = ""; // proxy host to use - var $proxy_port = ""; // proxy port to use - var $agent = "Snoopy v1.0"; // agent we masquerade as - var $referer = ""; // referer info to pass - var $cookies = array(); // array of cookies to pass - // $cookies["username"]="joe"; - var $rawheaders = array(); // array of raw headers to send - // $rawheaders["Content-type"]="text/html"; - - var $maxredirs = 5; // http redirection depth maximum. 0 = disallow - var $lastredirectaddr = ""; // contains address of last redirected address - var $offsiteok = true; // allows redirection off-site - var $maxframes = 0; // frame content depth maximum. 0 = disallow - var $expandlinks = true; // expand links to fully qualified URLs. - // this only applies to fetchlinks() - // or submitlinks() - var $passcookies = true; // pass set cookies back through redirects - // NOTE: this currently does not respect - // dates, domains or paths. - - var $user = ""; // user for http authentication - var $pass = ""; // password for http authentication - - // http accept types - var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - - var $results = ""; // where the content is put - - var $error = ""; // error messages sent here - var $response_code = ""; // response code returned from server - var $headers = array(); // headers returned from server sent here - var $maxlength = 500000; // max return data length (body) - var $read_timeout = 0; // timeout on read operations, in seconds - // supported only since PHP 4 Beta 4 - // set to 0 to disallow timeouts - var $timed_out = false; // if a read operation timed out - var $status = 0; // http request status - - var $curl_path = "/usr/bin/curl"; - // Snoopy will use cURL for fetching - // SSL content if a full system path to - // the cURL binary is supplied here. - // set to false if you do not have - // cURL installed. See http://curl.haxx.se - // for details on installing cURL. - // Snoopy does *not* use the cURL - // library functions built into php, - // as these functions are not stable - // as of this Snoopy release. - - // send Accept-encoding: gzip? - var $use_gzip = true; - - /**** Private variables ****/ - - var $_maxlinelen = 4096; // max line length (headers) - - var $_httpmethod = "GET"; // default http request method - var $_httpversion = "HTTP/1.0"; // default http request version - var $_submit_method = "POST"; // default submit method - var $_submit_type = "application/x-www-form-urlencoded"; // default submit type - var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type - var $_redirectaddr = false; // will be set if page fetched is a redirect - var $_redirectdepth = 0; // increments on an http redirect - var $_frameurls = array(); // frame src urls - var $_framedepth = 0; // increments on frame depth - - var $_isproxy = false; // set if using a proxy server - var $_fp_timeout = 30; // timeout for socket connection - -/*======================================================================*\ - Function: fetch - Purpose: fetch the contents of a web page - (and possibly other protocols in the - future like ftp, nntp, gopher, etc.) - Input: $URI the location of the page to fetch - Output: $this->results the output text from the fetch -\*======================================================================*/ - - function fetch($URI) - { - - //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); - $URI_PARTS = parse_url($URI); - if (!empty($URI_PARTS["user"])) - $this->user = $URI_PARTS["user"]; - if (!empty($URI_PARTS["pass"])) - $this->pass = $URI_PARTS["pass"]; - - switch($URI_PARTS["scheme"]) - { - case "http": - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_connect($fp)) - { - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httprequest($URI,$fp,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].(isset($URI_PARTS["query"]) ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httprequest($path, $fp, $URI, $this->_httpmethod); - } - - $this->_disconnect($fp); - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - } - else - { - return false; - } - return true; - break; - case "https": - if(!$this->curl_path || (!is_executable($this->curl_path))) { - $this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n"; - return false; - } - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httpsrequest($URI,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httpsrequest($path, $URI, $this->_httpmethod); - } - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - return true; - break; - default: - // not a valid protocol - $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; - return false; - break; - } - return true; - } - - - -/*======================================================================*\ - Private functions -\*======================================================================*/ - - -/*======================================================================*\ - Function: _striplinks - Purpose: strip the hyperlinks from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _striplinks($document) - { - preg_match_all("'<\s*a\s+.*href\s*=\s* # find ]+)) # if quote found, match up to next matching - # quote, otherwise match up to next space - 'isx",$document,$links); - - - // catenate the non-empty matches from the conditional subpattern - - while(list($key,$val) = each($links[2])) - { - if(!empty($val)) - $match[] = $val; - } - - while(list($key,$val) = each($links[3])) - { - if(!empty($val)) - $match[] = $val; - } - - // return the links - return $match; - } - -/*======================================================================*\ - Function: _stripform - Purpose: strip the form elements from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _stripform($document) - { - preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements); - - // catenate the matches - $match = implode("\r\n",$elements[0]); - - // return the links - return $match; - } - - - -/*======================================================================*\ - Function: _striptext - Purpose: strip the text from an html document - Input: $document document to strip. - Output: $text the resulting text -\*======================================================================*/ - - function _striptext($document) - { - - // I didn't use preg eval (//e) since that is only available in PHP 4.0. - // so, list your entities one by one here. I included some of the - // more common ones. - - $search = array("']*?>.*?'si", // strip out javascript - "'<[\/\!]*?[^<>]*?>'si", // strip out html tags - "'([\r\n])[\s]+'", // strip out white space - "'&(quote|#34);'i", // replace html entities - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i", - "'&(nbsp|#160);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i" - ); - $replace = array( "", - "", - "\\1", - "\"", - "&", - "<", - ">", - " ", - chr(161), - chr(162), - chr(163), - chr(169)); - - $text = preg_replace($search,$replace,$document); - - return $text; - } - -/*======================================================================*\ - Function: _expandlinks - Purpose: expand each link into a fully qualified URL - Input: $links the links to qualify - $URI the full URI to get the base from - Output: $expandedLinks the expanded links -\*======================================================================*/ - - function _expandlinks($links,$URI) - { - - preg_match("/^[^\?]+/",$URI,$match); - - $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]); - - $search = array( "|^http://".preg_quote($this->host)."|i", - "|^(?!http://)(\/)?(?!mailto:)|i", - "|/\./|", - "|/[^\/]+/\.\./|" - ); - - $replace = array( "", - $match."/", - "/", - "/" - ); - - $expandedLinks = preg_replace($search,$replace,$links); - - return $expandedLinks; - } - -/*======================================================================*\ - Function: _httprequest - Purpose: go get the http data from the server - Input: $url the url to fetch - $fp the current open file pointer - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="") - { - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; - if(!empty($this->agent)) - $headers .= "User-Agent: ".$this->agent."\r\n"; - if(!empty($this->host) && !isset($this->rawheaders['Host'])) - $headers .= "Host: ".$this->host."\r\n"; - if(!empty($this->accept)) - $headers .= "Accept: ".$this->accept."\r\n"; - - if($this->use_gzip) { - // make sure PHP was built with --with-zlib - // and we can handle gzipp'ed data - if ( function_exists(gzinflate) ) { - $headers .= "Accept-encoding: gzip\r\n"; - } - else { - trigger_error( - "use_gzip is on, but PHP was built without zlib support.". - " Requesting file(s) without gzip encoding.", - E_USER_NOTICE); - } - } - - if(!empty($this->referer)) - $headers .= "Referer: ".$this->referer."\r\n"; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_headers .= 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers .= substr($cookie_headers,0,-2) . "\r\n"; - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers .= $headerKey.": ".$headerVal."\r\n"; - } - if(!empty($content_type)) { - $headers .= "Content-type: $content_type"; - if ($content_type == "multipart/form-data") - $headers .= "; boundary=".$this->_mime_boundary; - $headers .= "\r\n"; - } - if(!empty($body)) - $headers .= "Content-length: ".strlen($body)."\r\n"; - if(!empty($this->user) || !empty($this->pass)) - $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n"; - - $headers .= "\r\n"; - - // set the read timeout if needed - if ($this->read_timeout > 0) - socket_set_timeout($fp, $this->read_timeout); - $this->timed_out = false; - - fwrite($fp,$headers.$body,strlen($headers.$body)); - - $this->_redirectaddr = false; - unset($this->headers); - - // content was returned gzip encoded? - $is_gzipped = false; - - while($currentHeader = fgets($fp,$this->_maxlinelen)) - { - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - // if($currentHeader == "\r\n") - if(preg_match("/^\r?\n$/", $currentHeader) ) - break; - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location:|URI:)/i",$currentHeader)) - { - // get URL portion of the redirect - preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$currentHeader)) - { - if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status)) - { - $this->status= $status[1]; - } - $this->response_code = $currentHeader; - } - - if (preg_match("/Content-Encoding: gzip/", $currentHeader) ) { - $is_gzipped = true; - } - - $this->headers[] = $currentHeader; - } - - # $results = fread($fp, $this->maxlength); - $results = ""; - while ( $data = fread($fp, $this->maxlength) ) { - $results .= $data; - if ( - strlen($results) > $this->maxlength ) { - break; - } - } - - // gunzip - if ( $is_gzipped ) { - // per http://www.php.net/manual/en/function.gzencode.php - $results = substr($results, 10); - $results = gzinflate($results); - } - - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - return true; - } - -/*======================================================================*\ - Function: _httpsrequest - Purpose: go get the https data from the server using curl - Input: $url the url to fetch - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httpsrequest($url,$URI,$http_method,$content_type="",$body="") - { - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $headers = array(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - // GET ... header not needed for curl - //$headers[] = $http_method." ".$url." ".$this->_httpversion; - if(!empty($this->agent)) - $headers[] = "User-Agent: ".$this->agent; - if(!empty($this->host)) - $headers[] = "Host: ".$this->host; - if(!empty($this->accept)) - $headers[] = "Accept: ".$this->accept; - if(!empty($this->referer)) - $headers[] = "Referer: ".$this->referer; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_str = 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers[] = substr($cookie_str,0,-2); - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers[] = $headerKey.": ".$headerVal; - } - if(!empty($content_type)) { - if ($content_type == "multipart/form-data") - $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary; - else - $headers[] = "Content-type: $content_type"; - } - if(!empty($body)) - $headers[] = "Content-length: ".strlen($body); - if(!empty($this->user) || !empty($this->pass)) - $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass); - - for($curr_header = 0; $curr_header < count($headers); $curr_header++) { - $cmdline_params .= " -H \"".$headers[$curr_header]."\""; - } - - if(!empty($body)) - $cmdline_params .= " -d \"$body\""; - - if($this->read_timeout > 0) - $cmdline_params .= " -m ".$this->read_timeout; - - $headerfile = uniqid(time()); - - # accept self-signed certs - $cmdline_params .= " -k"; - exec($this->curl_path." -D \"/tmp/$headerfile\"".escapeshellcmd($cmdline_params)." ".escapeshellcmd($URI),$results,$return); - - if($return) - { - $this->error = "Error: cURL could not retrieve the document, error $return."; - return false; - } - - - $results = implode("\r\n",$results); - - $result_headers = file("/tmp/$headerfile"); - - $this->_redirectaddr = false; - unset($this->headers); - - for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++) - { - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader])) - { - // get URL portion of the redirect - preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$result_headers[$currentHeader])) - { - $this->response_code = $result_headers[$currentHeader]; - if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code, $match)) - { - $this->status= $match[1]; - } - } - $this->headers[] = $result_headers[$currentHeader]; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - unlink("/tmp/$headerfile"); - - return true; - } - -/*======================================================================*\ - Function: setcookies() - Purpose: set cookies for a redirection -\*======================================================================*/ - - function setcookies() - { - for($x=0; $xheaders); $x++) - { - if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match)) - $this->cookies[$match[1]] = $match[2]; - } - } - - -/*======================================================================*\ - Function: _check_timeout - Purpose: checks whether timeout has occurred - Input: $fp file pointer -\*======================================================================*/ - - function _check_timeout($fp) - { - if ($this->read_timeout > 0) { - $fp_status = socket_get_status($fp); - if ($fp_status["timed_out"]) { - $this->timed_out = true; - return true; - } - } - return false; - } - -/*======================================================================*\ - Function: _connect - Purpose: make a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _connect(&$fp) - { - if(!empty($this->proxy_host) && !empty($this->proxy_port)) - { - $this->_isproxy = true; - $host = $this->proxy_host; - $port = $this->proxy_port; - } - else - { - $host = $this->host; - $port = $this->port; - } - - $this->status = 0; - - if($fp = fsockopen( - $host, - $port, - $errno, - $errstr, - $this->_fp_timeout - )) - { - // socket connection succeeded - - return true; - } - else - { - // socket connection failed - $this->status = $errno; - switch($errno) - { - case -3: - $this->error="socket creation failed (-3)"; - case -4: - $this->error="dns lookup failure (-4)"; - case -5: - $this->error="connection refused or timed out (-5)"; - default: - $this->error="connection failed (".$errno.")"; - } - return false; - } - } -/*======================================================================*\ - Function: _disconnect - Purpose: disconnect a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _disconnect($fp) - { - return(fclose($fp)); - } - - -/*======================================================================*\ - Function: _prepare_post_body - Purpose: Prepare post body according to encoding type - Input: $formvars - form variables - $formfiles - form upload files - Output: post body -\*======================================================================*/ - - function _prepare_post_body($formvars, $formfiles) - { - settype($formvars, "array"); - settype($formfiles, "array"); - - if (count($formvars) == 0 && count($formfiles) == 0) - return; - - switch ($this->_submit_type) { - case "application/x-www-form-urlencoded": - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; - } - } else - $postdata .= urlencode($key)."=".urlencode($val)."&"; - } - break; - - case "multipart/form-data": - $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); - - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; - $postdata .= "$cur_val\r\n"; - } - } else { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; - $postdata .= "$val\r\n"; - } - } - - reset($formfiles); - while (list($field_name, $file_names) = each($formfiles)) { - settype($file_names, "array"); - while (list(, $file_name) = each($file_names)) { - if (!is_readable($file_name)) continue; - - $fp = fopen($file_name, "r"); - $file_content = fread($fp, filesize($file_name)); - fclose($fp); - $base_name = basename($file_name); - - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; - $postdata .= "$file_content\r\n"; - } - } - $postdata .= "--".$this->_mime_boundary."--\r\n"; - break; - } - - return $postdata; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/Snoopy.class.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/Snoopy.class.inc deleted file mode 100755 index 4e866f47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/extlib/Snoopy.class.inc +++ /dev/null @@ -1,900 +0,0 @@ - -Copyright (c): 1999-2000 ispi, all rights reserved -Version: 1.0 - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser 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 - -You may contact the author of Snoopy by e-mail at: -monte@ispi.net - -Or, write to: -Monte Ohrt -CTO, ispi -237 S. 70th suite 220 -Lincoln, NE 68510 - -The latest version of Snoopy can be obtained from: -http://snoopy.sourceforge.com - -*************************************************/ - -class Snoopy -{ - /**** Public variables ****/ - - /* user definable vars */ - - var $host = "www.php.net"; // host name we are connecting to - var $port = 80; // port we are connecting to - var $proxy_host = ""; // proxy host to use - var $proxy_port = ""; // proxy port to use - var $agent = "Snoopy v1.0"; // agent we masquerade as - var $referer = ""; // referer info to pass - var $cookies = array(); // array of cookies to pass - // $cookies["username"]="joe"; - var $rawheaders = array(); // array of raw headers to send - // $rawheaders["Content-type"]="text/html"; - - var $maxredirs = 5; // http redirection depth maximum. 0 = disallow - var $lastredirectaddr = ""; // contains address of last redirected address - var $offsiteok = true; // allows redirection off-site - var $maxframes = 0; // frame content depth maximum. 0 = disallow - var $expandlinks = true; // expand links to fully qualified URLs. - // this only applies to fetchlinks() - // or submitlinks() - var $passcookies = true; // pass set cookies back through redirects - // NOTE: this currently does not respect - // dates, domains or paths. - - var $user = ""; // user for http authentication - var $pass = ""; // password for http authentication - - // http accept types - var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - - var $results = ""; // where the content is put - - var $error = ""; // error messages sent here - var $response_code = ""; // response code returned from server - var $headers = array(); // headers returned from server sent here - var $maxlength = 500000; // max return data length (body) - var $read_timeout = 0; // timeout on read operations, in seconds - // supported only since PHP 4 Beta 4 - // set to 0 to disallow timeouts - var $timed_out = false; // if a read operation timed out - var $status = 0; // http request status - - var $curl_path = "/usr/bin/curl"; - // Snoopy will use cURL for fetching - // SSL content if a full system path to - // the cURL binary is supplied here. - // set to false if you do not have - // cURL installed. See http://curl.haxx.se - // for details on installing cURL. - // Snoopy does *not* use the cURL - // library functions built into php, - // as these functions are not stable - // as of this Snoopy release. - - // send Accept-encoding: gzip? - var $use_gzip = true; - - /**** Private variables ****/ - - var $_maxlinelen = 4096; // max line length (headers) - - var $_httpmethod = "GET"; // default http request method - var $_httpversion = "HTTP/1.0"; // default http request version - var $_submit_method = "POST"; // default submit method - var $_submit_type = "application/x-www-form-urlencoded"; // default submit type - var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type - var $_redirectaddr = false; // will be set if page fetched is a redirect - var $_redirectdepth = 0; // increments on an http redirect - var $_frameurls = array(); // frame src urls - var $_framedepth = 0; // increments on frame depth - - var $_isproxy = false; // set if using a proxy server - var $_fp_timeout = 30; // timeout for socket connection - -/*======================================================================*\ - Function: fetch - Purpose: fetch the contents of a web page - (and possibly other protocols in the - future like ftp, nntp, gopher, etc.) - Input: $URI the location of the page to fetch - Output: $this->results the output text from the fetch -\*======================================================================*/ - - function fetch($URI) - { - - //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); - $URI_PARTS = parse_url($URI); - if (!empty($URI_PARTS["user"])) - $this->user = $URI_PARTS["user"]; - if (!empty($URI_PARTS["pass"])) - $this->pass = $URI_PARTS["pass"]; - - switch($URI_PARTS["scheme"]) - { - case "http": - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_connect($fp)) - { - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httprequest($URI,$fp,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].(isset($URI_PARTS["query"]) ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httprequest($path, $fp, $URI, $this->_httpmethod); - } - - $this->_disconnect($fp); - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - } - else - { - return false; - } - return true; - break; - case "https": - if(!$this->curl_path || (!is_executable($this->curl_path))) { - $this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n"; - return false; - } - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httpsrequest($URI,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httpsrequest($path, $URI, $this->_httpmethod); - } - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - return true; - break; - default: - // not a valid protocol - $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; - return false; - break; - } - return true; - } - - - -/*======================================================================*\ - Private functions -\*======================================================================*/ - - -/*======================================================================*\ - Function: _striplinks - Purpose: strip the hyperlinks from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _striplinks($document) - { - preg_match_all("'<\s*a\s+.*href\s*=\s* # find ]+)) # if quote found, match up to next matching - # quote, otherwise match up to next space - 'isx",$document,$links); - - - // catenate the non-empty matches from the conditional subpattern - - while(list($key,$val) = each($links[2])) - { - if(!empty($val)) - $match[] = $val; - } - - while(list($key,$val) = each($links[3])) - { - if(!empty($val)) - $match[] = $val; - } - - // return the links - return $match; - } - -/*======================================================================*\ - Function: _stripform - Purpose: strip the form elements from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _stripform($document) - { - preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements); - - // catenate the matches - $match = implode("\r\n",$elements[0]); - - // return the links - return $match; - } - - - -/*======================================================================*\ - Function: _striptext - Purpose: strip the text from an html document - Input: $document document to strip. - Output: $text the resulting text -\*======================================================================*/ - - function _striptext($document) - { - - // I didn't use preg eval (//e) since that is only available in PHP 4.0. - // so, list your entities one by one here. I included some of the - // more common ones. - - $search = array("']*?>.*?'si", // strip out javascript - "'<[\/\!]*?[^<>]*?>'si", // strip out html tags - "'([\r\n])[\s]+'", // strip out white space - "'&(quote|#34);'i", // replace html entities - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i", - "'&(nbsp|#160);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i" - ); - $replace = array( "", - "", - "\\1", - "\"", - "&", - "<", - ">", - " ", - chr(161), - chr(162), - chr(163), - chr(169)); - - $text = preg_replace($search,$replace,$document); - - return $text; - } - -/*======================================================================*\ - Function: _expandlinks - Purpose: expand each link into a fully qualified URL - Input: $links the links to qualify - $URI the full URI to get the base from - Output: $expandedLinks the expanded links -\*======================================================================*/ - - function _expandlinks($links,$URI) - { - - preg_match("/^[^\?]+/",$URI,$match); - - $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]); - - $search = array( "|^http://".preg_quote($this->host)."|i", - "|^(?!http://)(\/)?(?!mailto:)|i", - "|/\./|", - "|/[^\/]+/\.\./|" - ); - - $replace = array( "", - $match."/", - "/", - "/" - ); - - $expandedLinks = preg_replace($search,$replace,$links); - - return $expandedLinks; - } - -/*======================================================================*\ - Function: _httprequest - Purpose: go get the http data from the server - Input: $url the url to fetch - $fp the current open file pointer - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="") - { - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; - if(!empty($this->agent)) - $headers .= "User-Agent: ".$this->agent."\r\n"; - if(!empty($this->host) && !isset($this->rawheaders['Host'])) - $headers .= "Host: ".$this->host."\r\n"; - if(!empty($this->accept)) - $headers .= "Accept: ".$this->accept."\r\n"; - - if($this->use_gzip) { - // make sure PHP was built with --with-zlib - // and we can handle gzipp'ed data - if ( function_exists(gzinflate) ) { - $headers .= "Accept-encoding: gzip\r\n"; - } - else { - trigger_error( - "use_gzip is on, but PHP was built without zlib support.". - " Requesting file(s) without gzip encoding.", - E_USER_NOTICE); - } - } - - if(!empty($this->referer)) - $headers .= "Referer: ".$this->referer."\r\n"; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_headers .= 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers .= substr($cookie_headers,0,-2) . "\r\n"; - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers .= $headerKey.": ".$headerVal."\r\n"; - } - if(!empty($content_type)) { - $headers .= "Content-type: $content_type"; - if ($content_type == "multipart/form-data") - $headers .= "; boundary=".$this->_mime_boundary; - $headers .= "\r\n"; - } - if(!empty($body)) - $headers .= "Content-length: ".strlen($body)."\r\n"; - if(!empty($this->user) || !empty($this->pass)) - $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n"; - - $headers .= "\r\n"; - - // set the read timeout if needed - if ($this->read_timeout > 0) - socket_set_timeout($fp, $this->read_timeout); - $this->timed_out = false; - - fwrite($fp,$headers.$body,strlen($headers.$body)); - - $this->_redirectaddr = false; - unset($this->headers); - - // content was returned gzip encoded? - $is_gzipped = false; - - while($currentHeader = fgets($fp,$this->_maxlinelen)) - { - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - // if($currentHeader == "\r\n") - if(preg_match("/^\r?\n$/", $currentHeader) ) - break; - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location:|URI:)/i",$currentHeader)) - { - // get URL portion of the redirect - preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$currentHeader)) - { - if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status)) - { - $this->status= $status[1]; - } - $this->response_code = $currentHeader; - } - - if (preg_match("/Content-Encoding: gzip/", $currentHeader) ) { - $is_gzipped = true; - } - - $this->headers[] = $currentHeader; - } - - # $results = fread($fp, $this->maxlength); - $results = ""; - while ( $data = fread($fp, $this->maxlength) ) { - $results .= $data; - if ( - strlen($results) > $this->maxlength ) { - break; - } - } - - // gunzip - if ( $is_gzipped ) { - // per http://www.php.net/manual/en/function.gzencode.php - $results = substr($results, 10); - $results = gzinflate($results); - } - - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - return true; - } - -/*======================================================================*\ - Function: _httpsrequest - Purpose: go get the https data from the server using curl - Input: $url the url to fetch - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httpsrequest($url,$URI,$http_method,$content_type="",$body="") - { - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $headers = array(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - // GET ... header not needed for curl - //$headers[] = $http_method." ".$url." ".$this->_httpversion; - if(!empty($this->agent)) - $headers[] = "User-Agent: ".$this->agent; - if(!empty($this->host)) - $headers[] = "Host: ".$this->host; - if(!empty($this->accept)) - $headers[] = "Accept: ".$this->accept; - if(!empty($this->referer)) - $headers[] = "Referer: ".$this->referer; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_str = 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers[] = substr($cookie_str,0,-2); - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers[] = $headerKey.": ".$headerVal; - } - if(!empty($content_type)) { - if ($content_type == "multipart/form-data") - $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary; - else - $headers[] = "Content-type: $content_type"; - } - if(!empty($body)) - $headers[] = "Content-length: ".strlen($body); - if(!empty($this->user) || !empty($this->pass)) - $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass); - - for($curr_header = 0; $curr_header < count($headers); $curr_header++) { - $cmdline_params .= " -H \"".$headers[$curr_header]."\""; - } - - if(!empty($body)) - $cmdline_params .= " -d \"$body\""; - - if($this->read_timeout > 0) - $cmdline_params .= " -m ".$this->read_timeout; - - $headerfile = uniqid(time()); - - # accept self-signed certs - $cmdline_params .= " -k"; - exec($this->curl_path." -D \"/tmp/$headerfile\"".escapeshellcmd($cmdline_params)." ".escapeshellcmd($URI),$results,$return); - - if($return) - { - $this->error = "Error: cURL could not retrieve the document, error $return."; - return false; - } - - - $results = implode("\r\n",$results); - - $result_headers = file("/tmp/$headerfile"); - - $this->_redirectaddr = false; - unset($this->headers); - - for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++) - { - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader])) - { - // get URL portion of the redirect - preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$result_headers[$currentHeader])) - { - $this->response_code = $result_headers[$currentHeader]; - if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code, $match)) - { - $this->status= $match[1]; - } - } - $this->headers[] = $result_headers[$currentHeader]; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - unlink("/tmp/$headerfile"); - - return true; - } - -/*======================================================================*\ - Function: setcookies() - Purpose: set cookies for a redirection -\*======================================================================*/ - - function setcookies() - { - for($x=0; $xheaders); $x++) - { - if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match)) - $this->cookies[$match[1]] = $match[2]; - } - } - - -/*======================================================================*\ - Function: _check_timeout - Purpose: checks whether timeout has occurred - Input: $fp file pointer -\*======================================================================*/ - - function _check_timeout($fp) - { - if ($this->read_timeout > 0) { - $fp_status = socket_get_status($fp); - if ($fp_status["timed_out"]) { - $this->timed_out = true; - return true; - } - } - return false; - } - -/*======================================================================*\ - Function: _connect - Purpose: make a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _connect(&$fp) - { - if(!empty($this->proxy_host) && !empty($this->proxy_port)) - { - $this->_isproxy = true; - $host = $this->proxy_host; - $port = $this->proxy_port; - } - else - { - $host = $this->host; - $port = $this->port; - } - - $this->status = 0; - - if($fp = fsockopen( - $host, - $port, - $errno, - $errstr, - $this->_fp_timeout - )) - { - // socket connection succeeded - - return true; - } - else - { - // socket connection failed - $this->status = $errno; - switch($errno) - { - case -3: - $this->error="socket creation failed (-3)"; - case -4: - $this->error="dns lookup failure (-4)"; - case -5: - $this->error="connection refused or timed out (-5)"; - default: - $this->error="connection failed (".$errno.")"; - } - return false; - } - } -/*======================================================================*\ - Function: _disconnect - Purpose: disconnect a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _disconnect($fp) - { - return(fclose($fp)); - } - - -/*======================================================================*\ - Function: _prepare_post_body - Purpose: Prepare post body according to encoding type - Input: $formvars - form variables - $formfiles - form upload files - Output: post body -\*======================================================================*/ - - function _prepare_post_body($formvars, $formfiles) - { - settype($formvars, "array"); - settype($formfiles, "array"); - - if (count($formvars) == 0 && count($formfiles) == 0) - return; - - switch ($this->_submit_type) { - case "application/x-www-form-urlencoded": - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; - } - } else - $postdata .= urlencode($key)."=".urlencode($val)."&"; - } - break; - - case "multipart/form-data": - $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); - - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; - $postdata .= "$cur_val\r\n"; - } - } else { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; - $postdata .= "$val\r\n"; - } - } - - reset($formfiles); - while (list($field_name, $file_names) = each($formfiles)) { - settype($file_names, "array"); - while (list(, $file_name) = each($file_names)) { - if (!is_readable($file_name)) continue; - - $fp = fopen($file_name, "r"); - $file_content = fread($fp, filesize($file_name)); - fclose($fp); - $base_name = basename($file_name); - - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; - $postdata .= "$file_content\r\n"; - } - } - $postdata .= "--".$this->_mime_boundary."--\r\n"; - break; - } - - return $postdata; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/all-wcprops deleted file mode 100755 index ef69563b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/htdocs -END -cookbook.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/htdocs/cookbook.html -END -index.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/htdocs/index.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/entries deleted file mode 100755 index b8c57b11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/entries +++ /dev/null @@ -1,54 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie/htdocs -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -cookbook.html -file - - - - -2008-02-29T14:57:49.177661Z -d444251435fedb4017b1d25a2433f127 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -index.html -file - - - - -2008-02-29T14:57:49.193281Z -583fe61e8f7b503fad0f4004a61ef311 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/cookbook.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/cookbook.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/cookbook.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/index.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/prop-base/index.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/cookbook.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/cookbook.html.svn-base deleted file mode 100755 index 2a18e74c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/cookbook.html.svn-base +++ /dev/null @@ -1,237 +0,0 @@ - - - Magie RSS Recipes: Simple PHP RSS How To - - - -

    -

    MagpieRSS Recipes: Cooking with Corbies

    - -

    "Four and twenty blackbirds baked in a -pie."

    -

    -

    -

      -
    1. Limit the Number of Headlines(aka Items) Returned
    2. -
    3. Display a Custom Error Message if Something Goes -Wrong
    4. -
    5. Generate a New RSS Feed
    6. -
    7. Display Headlines More Recent then X Date
    8. -
    9. Parse a Local File Containing RSS
    10. - -
    -

    - -

    1. Limit the Number of Headlines(aka Items) Returned.

    - -

    Problem:

    - -You want to display the 10 (or 3 or whatever) most recent headlines, but the RSS feed -contains 15. - -

    Solution:

    - -
    -$num_items = 10;
    -$rss = fetch_rss($url);
    -
    -$items = array_slice($rss->items, 0, $num_items);
    -
    -foreach ( $items as $item ) {
    -
    -

    Discussion:

    - -Rather then trying to limit the number of items Magpie parses, a much simpler, -and more flexible approach is to take a "slice" of the array of items. And -array_slice() is smart enough to do the right thing if the feed has less items -then $num_items. - -

    See:

    http://www.php.net/array_slice -

    - -

    2. Display a Custom Error Message if Something Goes Wrong

    - -

    Problem:

    - -You don't want Magpie's error messages showing up if something goes wrong. - -

    Solution:

    -
    -# Magpie throws USER_WARNINGS only
    -# so you can cloak these, by only showing ERRORs
    -error_reporting(E_ERROR);
    -
    -# check the return value of fetch_rss()
    -
    -$rss = fetch_rss($url);
    -
    -if ( $rss ) {
    -...display rss feed...
    -}
    -else {
    -   echo "An error occured!  " .
    -        "Consider donating more $$$ for restoration of services." .
    -        "<br>Error Message: " . magpie_error();
    -}
    -
    -

    Discussion:

    - -MagpieRSS triggers a warning in a number of circumstances. The 2 most common -circumstances are: if the specified RSS file isn't properly formed (usually -because it includes illegal HTML), or if Magpie can't download the remote RSS -file, and there is no cached version. - -If you don't want your users to see these warnings change your error_reporting -settings to only display ERRORs.
    -Another option is to turn off display_error, -so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages. - -You can do this with: - -
    -# you can also do this in your php.ini file
    -ini_set('display_errors', 0);
    -
    - -

    See:

    -http://www.php.net/error_reporting,
    -http://www.php.net/ini_set,
    -http://www.php.net/manual/en/ref.errorfunc.php
    - -

    3. Generate a New RSS Feed

    - -

    Problem:

    - -Create an RSS feed for other people to use. - -

    Solution:

    - -Use Useful Inc's RSSWriter. - -

    Discussion:

    - -An example of turning a Magpie parsed RSS object back into an RSS file is -forthcoming. In the meantime RSSWriter is well documented. - -

    4. Display Headlines More Recent then X Date

    - -

    Problem:

    - -You only want to display headlines that were published on, or after a certain -date. - - -

    Solution:

    -
    -require_once('rss_utils.inc');
    -
    -# get all headlines published today
    -$today = getdate();
    -
    -# today, 12AM
    -$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']);
    -
    -$rss = fetch_rss($url);
    -
    -foreach ( $rss->items as $item ) {
    -   $published = parse_w3cdtf($item['dc']['date']);
    -   if ( $published >= $date ) {
    -        echo "Title: " . $item['title'];
    -        echo "Published: " . date("h:i:s A", $published);
    -        echo "<p>";
    -    }
    -}
    -
    -

    Discussion:

    - -This recipe only works for RSS 1.0 feeds that include the field. -(which is very good RSS style)
    -parse_w3cdtf() is defined in -rss_utils.inc, and parses RSS style dates into Unix epoch -seconds. - -

    See:

    -http://www.php.net/manual/en/ref.datetime.php - - -

    5. Parse a Local File Containing RSS

    -

    Problem:

    -MagpieRSS provides fetch_rss() which takes a URL and returns a -parsed RSS object, but what if you want to parse a file stored locally that -doesn't have a URL? - -

    Solution

    -
    -require_once('rss_parse.inc');
    -
    -$rss_file = 'some_rss_file.rdf';
    -$rss_string = read_file($rss_file);
    -$rss = new MagpieRSS( $rss_string );
    -
    -if ( $rss and !$rss->ERROR) {
    -...display rss...
    -}
    -else {
    -    echo "Error: " . $rss->ERROR;
    -}
    -
    -# efficiently read a file into a string
    -# in php >= 4.3.0 you can simply use file_get_contents()
    -#
    -function read_file($filename) {
    -    $fh = fopen($filename, 'r') or die($php_errormsg);
    -    $rss_string = fread($fh, filesize($filename) );
    -    fclose($fh);
    -    return $rss_string;
    -}
    -
    - -

    Discussion

    -Here we are using MagpieRSS's RSS parser directly without the convience wrapper -of fetch_rss(). We read the contents of the RSS file into a -string, and pass it to the parser constructor. Notice also that error handling -is subtly different. - -

    See:

    -http://www.php.net/manual/en/ref.filesystem.php,
    -http://www.php.net/manual/en/language.oop.php - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/index.html.svn-base deleted file mode 100755 index e6b24b5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/.svn/text-base/index.html.svn-base +++ /dev/null @@ -1,419 +0,0 @@ - - - Magpie RSS - PHP RSS Parser - - - - - -

    MagpieRSS

    -

    -

    MagpieRSS provides an XML-based (expat) RSS parser in PHP.

    -

    - MagpieRSS is compatible with RSS .9 through RSS 1.0, and supports the - RSS 1.0's modules. (with a few exceptions) -

    -

    - -

    News!

    - -

    -

    - -

    Why?

    - I wrote MagpieRSS out of a frustration with the limitations of existing - solutions. In particular many of the existing PHP solutions seemed to: -
      -
    • use a parser based on regular expressions, making for an inherently - fragile solution -
    • only support early versions of RSS -
    • discard all the interesting information besides item title, description, - and link. -
    • not build proper separation between parsing the RSS and displaying it. -
    - In particular I failed to find any PHP RSS parsers that could sufficiently - parse RSS 1.0 feeds, to be useful on the RSS based event feeds we generate - at Protest.net. -

    -

    - -

    Features

    - -
      -
    • -

      Easy to Use

      - As simple as: -
      -require('rss_fetch.inc');
      -$rss = fetch_rss($url);
      -
      - -
    • -
    • -

      Parses RSS 0.9 - RSS 1.0

      - - Parses most RSS formats, including support for - 1.0 modules and limited - namespace support. RSS is packed into convenient data structures; easy to - use in PHP, and appropriate for passing to a templating system, like - Smarty. -
    • -
    • -

      Integrated Object Cache

      - - Caching the parsed RSS means that the 2nd request is fast, and that -including the rss_fetch call in your PHP page won't destroy your performance, -and force you to reply on an external cron job. And it happens transparently. - -
    • -
    • -

      HTTP Conditional GETs

      - - Save bandwidth and speed up download times with intelligent use of - Last-Modified and ETag.
      See HTTP Conditional Get for RSS Hackers -
    • - -
    • Configurable

      - - Makes extensive use of constants to allow overriding default behaviour, and - installation on shared hosts. -
    • -
    • Modular

      -
        -
      • rss_fetch.inc - wraps a simple interface (fetch_rss()) - around the library. -
      • rss_parse.inc - provides the RSS parser, and the RSS object -
      • rss_cache.inc - a simple (no GC) object cache, optimized for RSS objects -
      • rss_utils.inc - utility functions for working with RSS. currently - provides parse_w3cdtf(), for parsing W3CDTF into epoch seconds. -
      -
    - - -

    -

    - -

    Magpie's approach to parsing RSS

    - - Magpie takes a naive, and inclusive approach. Absolutely - non-validating, as long as the RSS feed is well formed, Magpie will - cheerfully parse new, and never before seen tags in your RSS feeds. -

    -

    - This makes it very simple support the varied versions of RSS simply, but - forces the consumer of a RSS feed to be cognizant of how it is - structured.(at least if you want to do something fancy) -

    -

    - Magpie parses a RSS feed into a simple object, with 4 fields: - channel, items, image, and - textinput. -

    -

    -

    channel

    - $rss->channel contains key-value pairs of all tags, without - nested tags, found between the root tag (<rdf:RDF>, or <rss>) - and the end of the document. -

    -

    -

    items

    - $rss->items is an array of associative arrays, each one - describing a single item. An example that looks like: -
    -<item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257">
    -<title>Weekly Peace Vigil</title>
    -<link>http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257</link>
    -<description>Wear a white ribbon</description>
    -<dc:subject>Peace</dc:subject>
    -<ev:startdate>2002-06-01T11:00:00</ev:startdate>
    -<ev:location>Northampton, MA</ev:location>
    -<ev:enddate>2002-06-01T12:00:00</ev:enddate>
    -<ev:type>Protest</ev:type>
    -</item>
    -	

    - Is parsed, and pushed on the $rss->items array as: -

    -array(
    -	title => 'Weekly Peace Vigil',
    -	link => 'http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257',
    -	description => 'Wear a white ribbon',
    -	dc => array (
    -			subject => 'Peace'
    -		),
    -	ev => array (
    -		startdate => '2002-06-01T11:00:00',
    -		enddate => '2002-06-01T12:00:00',
    -		type => 'Protest',
    -		location => 'Northampton, MA'
    -	)
    -);
    -
    -

    -

    -

    image and textinput

    -$rss->image and $rss-textinput are associative arrays -including name-value pairs for anything found between the respective parent -tags. -

    -

    - -

    Usage Examples:

    - -A very simple example would be: -
    -require_once 'rss_fetch.inc';
    -
    -$url = 'http://magpie.sf.net/samples/imc.1-0.rdf';
    -$rss = fetch_rss($url);
    -
    -echo "Site: ", $rss->channel['title'], "<br>\n";
    -foreach ($rss->items as $item ) {
    -	$title = $item[title];
    -	$url   = $item[link];
    -	echo "<a href=$url>$title</a></li><br>\n";
    -}
    -
    -More soon....in the meantime you can check out a -cool tool built with -MagpieRSS, version 0.1. -

    -

    - -

    Todos

    -

    RSS Parser

    -
      -
    • Swap in a smarter parser that includes optional - support for validation, and required fields.
    • - -
    • Support RSS 2.0 (as much as I'm annoyed by it)
    • - -
    • Improve support for modules that rely on attributes
    • -
    - -

    RSS Cache

    -
      -
    • Light-weight garbage collection -
    - -

    Fetch RSS

    - -

    Misc

    -
      -
    • More examples
    • -
    • A test suite
    • -
    • RSS generation, perhaps with RSSwriter? -
    • -
    - -

    -

    -

    RSS Resources

    - . -

    -

    License and Contact Info

    -Magpie is distributed under the GPL license... -

    -coded by: kellan (at) protest.net, feedback is always appreciated. -

    -SourceForge.net Logo - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/cookbook.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/cookbook.html deleted file mode 100755 index e098423a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/cookbook.html +++ /dev/null @@ -1,237 +0,0 @@ - - - Magie RSS Recipes: Simple PHP RSS How To - - - -

    -

    MagpieRSS Recipes: Cooking with Corbies

    - -

    "Four and twenty blackbirds baked in a -pie."

    -

    -

    -

      -
    1. Limit the Number of Headlines(aka Items) Returned
    2. -
    3. Display a Custom Error Message if Something Goes -Wrong
    4. -
    5. Generate a New RSS Feed
    6. -
    7. Display Headlines More Recent then X Date
    8. -
    9. Parse a Local File Containing RSS
    10. - -
    -

    - -

    1. Limit the Number of Headlines(aka Items) Returned.

    - -

    Problem:

    - -You want to display the 10 (or 3 or whatever) most recent headlines, but the RSS feed -contains 15. - -

    Solution:

    - -
    -$num_items = 10;
    -$rss = fetch_rss($url);
    -
    -$items = array_slice($rss->items, 0, $num_items);
    -
    -foreach ( $items as $item ) {
    -
    -

    Discussion:

    - -Rather then trying to limit the number of items Magpie parses, a much simpler, -and more flexible approach is to take a "slice" of the array of items. And -array_slice() is smart enough to do the right thing if the feed has less items -then $num_items. - -

    See:

    http://www.php.net/array_slice -

    - -

    2. Display a Custom Error Message if Something Goes Wrong

    - -

    Problem:

    - -You don't want Magpie's error messages showing up if something goes wrong. - -

    Solution:

    -
    -# Magpie throws USER_WARNINGS only
    -# so you can cloak these, by only showing ERRORs
    -error_reporting(E_ERROR);
    -
    -# check the return value of fetch_rss()
    -
    -$rss = fetch_rss($url);
    -
    -if ( $rss ) {
    -...display rss feed...
    -}
    -else {
    -   echo "An error occured!  " .
    -        "Consider donating more $$$ for restoration of services." .
    -        "<br>Error Message: " . magpie_error();
    -}
    -
    -

    Discussion:

    - -MagpieRSS triggers a warning in a number of circumstances. The 2 most common -circumstances are: if the specified RSS file isn't properly formed (usually -because it includes illegal HTML), or if Magpie can't download the remote RSS -file, and there is no cached version. - -If you don't want your users to see these warnings change your error_reporting -settings to only display ERRORs.
    -Another option is to turn off display_error, -so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages. - -You can do this with: - -
    -# you can also do this in your php.ini file
    -ini_set('display_errors', 0);
    -
    - -

    See:

    -http://www.php.net/error_reporting,
    -http://www.php.net/ini_set,
    -http://www.php.net/manual/en/ref.errorfunc.php
    - -

    3. Generate a New RSS Feed

    - -

    Problem:

    - -Create an RSS feed for other people to use. - -

    Solution:

    - -Use Useful Inc's RSSWriter. - -

    Discussion:

    - -An example of turning a Magpie parsed RSS object back into an RSS file is -forthcoming. In the meantime RSSWriter is well documented. - -

    4. Display Headlines More Recent then X Date

    - -

    Problem:

    - -You only want to display headlines that were published on, or after a certain -date. - - -

    Solution:

    -
    -require_once('rss_utils.inc');
    -
    -# get all headlines published today
    -$today = getdate();
    -
    -# today, 12AM
    -$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']);
    -
    -$rss = fetch_rss($url);
    -
    -foreach ( $rss->items as $item ) {
    -   $published = parse_w3cdtf($item['dc']['date']);
    -   if ( $published >= $date ) {
    -        echo "Title: " . $item['title'];
    -        echo "Published: " . date("h:i:s A", $published);
    -        echo "<p>";
    -    }
    -}
    -
    -

    Discussion:

    - -This recipe only works for RSS 1.0 feeds that include the field. -(which is very good RSS style)
    -parse_w3cdtf() is defined in -rss_utils.inc, and parses RSS style dates into Unix epoch -seconds. - -

    See:

    -http://www.php.net/manual/en/ref.datetime.php - - -

    5. Parse a Local File Containing RSS

    -

    Problem:

    -MagpieRSS provides fetch_rss() which takes a URL and returns a -parsed RSS object, but what if you want to parse a file stored locally that -doesn't have a URL? - -

    Solution

    -
    -require_once('rss_parse.inc');
    -
    -$rss_file = 'some_rss_file.rdf';
    -$rss_string = read_file($rss_file);
    -$rss = new MagpieRSS( $rss_string );
    -
    -if ( $rss and !$rss->ERROR) {
    -...display rss...
    -}
    -else {
    -    echo "Error: " . $rss->ERROR;
    -}
    -
    -# efficiently read a file into a string
    -# in php >= 4.3.0 you can simply use file_get_contents()
    -#
    -function read_file($filename) {
    -    $fh = fopen($filename, 'r') or die($php_errormsg);
    -    $rss_string = fread($fh, filesize($filename) );
    -    fclose($fh);
    -    return $rss_string;
    -}
    -
    - -

    Discussion

    -Here we are using MagpieRSS's RSS parser directly without the convience wrapper -of fetch_rss(). We read the contents of the RSS file into a -string, and pass it to the parser constructor. Notice also that error handling -is subtly different. - -

    See:

    -http://www.php.net/manual/en/ref.filesystem.php,
    -http://www.php.net/manual/en/language.oop.php - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/index.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/index.html deleted file mode 100755 index 0d8343a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/htdocs/index.html +++ /dev/null @@ -1,419 +0,0 @@ - - - Magpie RSS - PHP RSS Parser - - - - - -

    MagpieRSS

    -

    -

    MagpieRSS provides an XML-based (expat) RSS parser in PHP.

    -

    - MagpieRSS is compatible with RSS .9 through RSS 1.0, and supports the - RSS 1.0's modules. (with a few exceptions) -

    -

    - -

    News!

    - -

    -

    - -

    Why?

    - I wrote MagpieRSS out of a frustration with the limitations of existing - solutions. In particular many of the existing PHP solutions seemed to: -
      -
    • use a parser based on regular expressions, making for an inherently - fragile solution -
    • only support early versions of RSS -
    • discard all the interesting information besides item title, description, - and link. -
    • not build proper separation between parsing the RSS and displaying it. -
    - In particular I failed to find any PHP RSS parsers that could sufficiently - parse RSS 1.0 feeds, to be useful on the RSS based event feeds we generate - at Protest.net. -

    -

    - -

    Features

    - -
      -
    • -

      Easy to Use

      - As simple as: -
      -require('rss_fetch.inc');
      -$rss = fetch_rss($url);
      -
      - -
    • -
    • -

      Parses RSS 0.9 - RSS 1.0

      - - Parses most RSS formats, including support for - 1.0 modules and limited - namespace support. RSS is packed into convenient data structures; easy to - use in PHP, and appropriate for passing to a templating system, like - Smarty. -
    • -
    • -

      Integrated Object Cache

      - - Caching the parsed RSS means that the 2nd request is fast, and that -including the rss_fetch call in your PHP page won't destroy your performance, -and force you to reply on an external cron job. And it happens transparently. - -
    • -
    • -

      HTTP Conditional GETs

      - - Save bandwidth and speed up download times with intelligent use of - Last-Modified and ETag.
      See HTTP Conditional Get for RSS Hackers -
    • - -
    • Configurable

      - - Makes extensive use of constants to allow overriding default behaviour, and - installation on shared hosts. -
    • -
    • Modular

      -
        -
      • rss_fetch.inc - wraps a simple interface (fetch_rss()) - around the library. -
      • rss_parse.inc - provides the RSS parser, and the RSS object -
      • rss_cache.inc - a simple (no GC) object cache, optimized for RSS objects -
      • rss_utils.inc - utility functions for working with RSS. currently - provides parse_w3cdtf(), for parsing W3CDTF into epoch seconds. -
      -
    - - -

    -

    - -

    Magpie's approach to parsing RSS

    - - Magpie takes a naive, and inclusive approach. Absolutely - non-validating, as long as the RSS feed is well formed, Magpie will - cheerfully parse new, and never before seen tags in your RSS feeds. -

    -

    - This makes it very simple support the varied versions of RSS simply, but - forces the consumer of a RSS feed to be cognizant of how it is - structured.(at least if you want to do something fancy) -

    -

    - Magpie parses a RSS feed into a simple object, with 4 fields: - channel, items, image, and - textinput. -

    -

    -

    channel

    - $rss->channel contains key-value pairs of all tags, without - nested tags, found between the root tag (<rdf:RDF>, or <rss>) - and the end of the document. -

    -

    -

    items

    - $rss->items is an array of associative arrays, each one - describing a single item. An example that looks like: -
    -<item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257">
    -<title>Weekly Peace Vigil</title>
    -<link>http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257</link>
    -<description>Wear a white ribbon</description>
    -<dc:subject>Peace</dc:subject>
    -<ev:startdate>2002-06-01T11:00:00</ev:startdate>
    -<ev:location>Northampton, MA</ev:location>
    -<ev:enddate>2002-06-01T12:00:00</ev:enddate>
    -<ev:type>Protest</ev:type>
    -</item>
    -	

    - Is parsed, and pushed on the $rss->items array as: -

    -array(
    -	title => 'Weekly Peace Vigil',
    -	link => 'http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257',
    -	description => 'Wear a white ribbon',
    -	dc => array (
    -			subject => 'Peace'
    -		),
    -	ev => array (
    -		startdate => '2002-06-01T11:00:00',
    -		enddate => '2002-06-01T12:00:00',
    -		type => 'Protest',
    -		location => 'Northampton, MA'
    -	)
    -);
    -
    -

    -

    -

    image and textinput

    -$rss->image and $rss-textinput are associative arrays -including name-value pairs for anything found between the respective parent -tags. -

    -

    - -

    Usage Examples:

    - -A very simple example would be: -
    -require_once 'rss_fetch.inc';
    -
    -$url = 'http://magpie.sf.net/samples/imc.1-0.rdf';
    -$rss = fetch_rss($url);
    -
    -echo "Site: ", $rss->channel['title'], "<br>\n";
    -foreach ($rss->items as $item ) {
    -	$title = $item[title];
    -	$url   = $item[link];
    -	echo "<a href=$url>$title</a></li><br>\n";
    -}
    -
    -More soon....in the meantime you can check out a -cool tool built with -MagpieRSS, version 0.1. -

    -

    - -

    Todos

    -

    RSS Parser

    -
      -
    • Swap in a smarter parser that includes optional - support for validation, and required fields.
    • - -
    • Support RSS 2.0 (as much as I'm annoyed by it)
    • - -
    • Improve support for modules that rely on attributes
    • -
    - -

    RSS Cache

    -
      -
    • Light-weight garbage collection -
    - -

    Fetch RSS

    - -

    Misc

    -
      -
    • More examples
    • -
    • A test suite
    • -
    • RSS generation, perhaps with RSSwriter? -
    • -
    - -

    -

    -

    RSS Resources

    - . -

    -

    License and Contact Info

    -Magpie is distributed under the GPL license... -

    -coded by: kellan (at) protest.net, feedback is always appreciated. -

    -SourceForge.net Logo - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_cache.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_cache.inc deleted file mode 100755 index df158451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_cache.inc +++ /dev/null @@ -1,200 +0,0 @@ - - * Version: 0.51 - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * http://lists.sourceforge.net/lists/listinfo/magpierss-general - * - */ - -class RSSCache { - var $BASE_CACHE = './cache'; // where the cache files are stored - var $MAX_AGE = 3600; // when are files stale, default one hour - var $ERROR = ""; // accumulate error messages - - function RSSCache ($base='', $age='') { - if ( $base ) { - $this->BASE_CACHE = $base; - } - if ( $age ) { - $this->MAX_AGE = $age; - } - - // attempt to make the cache directory - if ( ! file_exists( $this->BASE_CACHE ) ) { - $status = @mkdir( $this->BASE_CACHE, 0755 ); - - // if make failed - if ( ! $status ) { - $this->error( - "Cache couldn't make dir '" . $this->BASE_CACHE . "'." - ); - } - } - } - -/*=======================================================================*\ - Function: set - Purpose: add an item to the cache, keyed on url - Input: url from wich the rss file was fetched - Output: true on sucess -\*=======================================================================*/ - function set ($url, $rss) { - $this->ERROR = ""; - $cache_file = $this->file_name( $url ); - $fp = @fopen( $cache_file, 'w' ); - - if ( ! $fp ) { - $this->error( - "Cache unable to open file for writing: $cache_file" - ); - return 0; - } - - - $data = $this->serialize( $rss ); - fwrite( $fp, $data ); - fclose( $fp ); - - return $cache_file; - } - -/*=======================================================================*\ - Function: get - Purpose: fetch an item from the cache - Input: url from wich the rss file was fetched - Output: cached object on HIT, false on MISS -\*=======================================================================*/ - function get ($url) { - $this->ERROR = ""; - $cache_file = $this->file_name( $url ); - - if ( ! file_exists( $cache_file ) ) { - $this->debug( - "Cache doesn't contain: $url (cache file: $cache_file)" - ); - return 0; - } - - $fp = @fopen($cache_file, 'r'); - if ( ! $fp ) { - $this->error( - "Failed to open cache file for reading: $cache_file" - ); - return 0; - } - - if ($filesize = filesize($cache_file) ) { - $data = fread( $fp, filesize($cache_file) ); - $rss = $this->unserialize( $data ); - - return $rss; - } - - return 0; - } - -/*=======================================================================*\ - Function: check_cache - Purpose: check a url for membership in the cache - and whether the object is older then MAX_AGE (ie. STALE) - Input: url from wich the rss file was fetched - Output: cached object on HIT, false on MISS -\*=======================================================================*/ - function check_cache ( $url ) { - $this->ERROR = ""; - $filename = $this->file_name( $url ); - - if ( file_exists( $filename ) ) { - // find how long ago the file was added to the cache - // and whether that is longer then MAX_AGE - $mtime = filemtime( $filename ); - $age = time() - $mtime; - if ( $this->MAX_AGE > $age ) { - // object exists and is current - return 'HIT'; - } - else { - // object exists but is old - return 'STALE'; - } - } - else { - // object does not exist - return 'MISS'; - } - } - - function cache_age( $cache_key ) { - $filename = $this->file_name( $url ); - if ( file_exists( $filename ) ) { - $mtime = filemtime( $filename ); - $age = time() - $mtime; - return $age; - } - else { - return -1; - } - } - -/*=======================================================================*\ - Function: serialize -\*=======================================================================*/ - function serialize ( $rss ) { - return serialize( $rss ); - } - -/*=======================================================================*\ - Function: unserialize -\*=======================================================================*/ - function unserialize ( $data ) { - return unserialize( $data ); - } - -/*=======================================================================*\ - Function: file_name - Purpose: map url to location in cache - Input: url from wich the rss file was fetched - Output: a file name -\*=======================================================================*/ - function file_name ($url) { - $filename = md5( $url ); - return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) ); - } - -/*=======================================================================*\ - Function: error - Purpose: register error -\*=======================================================================*/ - function error ($errormsg, $lvl=E_USER_WARNING) { - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - $this->ERROR = $errormsg; - if ( MAGPIE_DEBUG ) { - trigger_error( $errormsg, $lvl); - } - else { - error_log( $errormsg, 0); - } - } - - function debug ($debugmsg, $lvl=E_USER_NOTICE) { - if ( MAGPIE_DEBUG ) { - $this->error("MagpieRSS [debug] $debugmsg", $lvl); - } - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_fetch.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_fetch.inc deleted file mode 100755 index 5bdc478f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_fetch.inc +++ /dev/null @@ -1,458 +0,0 @@ - - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * magpierss-general@lists.sourceforge.net - * - */ - -// Setup MAGPIE_DIR for use on hosts that don't include -// the current path in include_path. -// with thanks to rajiv and smarty -if (!defined('DIR_SEP')) { - define('DIR_SEP', DIRECTORY_SEPARATOR); -} - -if (!defined('MAGPIE_DIR')) { - define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP); -} - -require_once( MAGPIE_DIR . 'rss_parse.inc' ); -require_once( MAGPIE_DIR . 'rss_cache.inc' ); - -// for including 3rd party libraries -define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP); -require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc'); - - -/* - * CONSTANTS - redefine these in your script to change the - * behaviour of fetch_rss() currently, most options effect the cache - * - * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? - * For me a built in cache was essential to creating a "PHP-like" - * feel to Magpie, see rss_cache.inc for rationale - * - * - * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects? - * This should be a location that the webserver can write to. If this - * directory does not already exist Mapie will try to be smart and create - * it. This will often fail for permissions reasons. - * - * - * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds. - * - * - * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error - * instead of returning stale object? - * - * MAGPIE_DEBUG - Display debugging notices? - * -*/ - - -/*=======================================================================*\ - Function: fetch_rss: - Purpose: return RSS object for the give url - maintain the cache - Input: url of RSS file - Output: parsed RSS object (see rss_parse.inc) - - NOTES ON CACHEING: - If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache. - - NOTES ON RETRIEVING REMOTE FILES: - If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will - return a cached object, and touch the cache object upon recieving a - 304. - - NOTES ON FAILED REQUESTS: - If there is an HTTP error while fetching an RSS object, the cached - version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off) -\*=======================================================================*/ - -define('MAGPIE_VERSION', '0.72'); - -$MAGPIE_ERROR = ""; - -function fetch_rss ($url) { - // initialize constants - init(); - - if ( !isset($url) ) { - error("fetch_rss called without a url"); - return false; - } - - // if cache is disabled - if ( !MAGPIE_CACHE_ON ) { - // fetch file, and parse it - $resp = _fetch_remote_file( $url ); - if ( is_success( $resp->status ) ) { - return _response_to_rss( $resp ); - } - else { - error("Failed to fetch $url and cache is off"); - return false; - } - } - // else cache is ON - else { - // Flow - // 1. check cache - // 2. if there is a hit, make sure its fresh - // 3. if cached obj fails freshness check, fetch remote - // 4. if remote fails, return stale object, or error - - $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); - - if (MAGPIE_DEBUG and $cache->ERROR) { - debug($cache->ERROR, E_USER_WARNING); - } - - - $cache_status = 0; // response of check_cache - $request_headers = array(); // HTTP headers to send with fetch - $rss = 0; // parsed RSS object - $errormsg = 0; // errors, if any - - // store parsed XML by desired output encoding - // as character munging happens at parse time - $cache_key = $url . MAGPIE_OUTPUT_ENCODING; - - if (!$cache->ERROR) { - // return cache HIT, MISS, or STALE - $cache_status = $cache->check_cache( $cache_key); - } - - // if object cached, and cache is fresh, return cached obj - if ( $cache_status == 'HIT' ) { - $rss = $cache->get( $cache_key ); - if ( isset($rss) and $rss ) { - // should be cache age - $rss->from_cache = 1; - if ( MAGPIE_DEBUG > 1) { - debug("MagpieRSS: Cache HIT", E_USER_NOTICE); - } - return $rss; - } - } - - // else attempt a conditional get - - // setup headers - if ( $cache_status == 'STALE' ) { - $rss = $cache->get( $cache_key ); - if ( $rss and $rss->etag and $rss->last_modified ) { - $request_headers['If-None-Match'] = $rss->etag; - $request_headers['If-Last-Modified'] = $rss->last_modified; - } - } - - $resp = _fetch_remote_file( $url, $request_headers ); - - if (isset($resp) and $resp) { - if ($resp->status == '304' ) { - // we have the most current copy - if ( MAGPIE_DEBUG > 1) { - debug("Got 304 for $url"); - } - // reset cache on 304 (at minutillo insistent prodding) - $cache->set($cache_key, $rss); - return $rss; - } - elseif ( is_success( $resp->status ) ) { - $rss = _response_to_rss( $resp ); - if ( $rss ) { - if (MAGPIE_DEBUG > 1) { - debug("Fetch successful"); - } - // add object to cache - $cache->set( $cache_key, $rss ); - return $rss; - } - } - else { - $errormsg = "Failed to fetch $url "; - if ( $resp->status == '-100' ) { - $errormsg .= "(Request timed out after " . MAGPIE_FETCH_TIME_OUT . " seconds)"; - } - elseif ( $resp->error ) { - # compensate for Snoopy's annoying habbit to tacking - # on '\n' - $http_error = substr($resp->error, 0, -2); - $errormsg .= "(HTTP Error: $http_error)"; - } - else { - $errormsg .= "(HTTP Response: " . $resp->response_code .')'; - } - } - } - else { - $errormsg = "Unable to retrieve RSS file for unknown reasons."; - } - - // else fetch failed - - // attempt to return cached object - if ($rss) { - if ( MAGPIE_DEBUG ) { - debug("Returning STALE object for $url"); - } - return $rss; - } - - // else we totally failed - error( $errormsg ); - - return false; - - } // end if ( !MAGPIE_CACHE_ON ) { -} // end fetch_rss() - -/*=======================================================================*\ - Function: error - Purpose: set MAGPIE_ERROR, and trigger error -\*=======================================================================*/ - -function error ($errormsg, $lvl=E_USER_WARNING) { - global $MAGPIE_ERROR; - - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - if ( $errormsg ) { - $errormsg = "MagpieRSS: $errormsg"; - $MAGPIE_ERROR = $errormsg; - trigger_error( $errormsg, $lvl); - } -} - -function debug ($debugmsg, $lvl=E_USER_NOTICE) { - trigger_error("MagpieRSS [debug] $debugmsg", $lvl); -} - -/*=======================================================================*\ - Function: magpie_error - Purpose: accessor for the magpie error variable -\*=======================================================================*/ -function magpie_error ($errormsg="") { - global $MAGPIE_ERROR; - - if ( isset($errormsg) and $errormsg ) { - $MAGPIE_ERROR = $errormsg; - } - - return $MAGPIE_ERROR; -} - -/*=======================================================================*\ - Function: _fetch_remote_file - Purpose: retrieve an arbitrary remote file - Input: url of the remote file - headers to send along with the request (optional) - Output: an HTTP response object (see Snoopy.class.inc) -\*=======================================================================*/ -function _fetch_remote_file ($url, $headers = "" ) { - // Snoopy is an HTTP client in PHP - $client = new Snoopy(); - $client->agent = MAGPIE_USER_AGENT; - $client->read_timeout = MAGPIE_FETCH_TIME_OUT; - $client->use_gzip = MAGPIE_USE_GZIP; - if (is_array($headers) ) { - $client->rawheaders = $headers; - } - - @$client->fetch($url); - return $client; - -} - -/*=======================================================================*\ - Function: _response_to_rss - Purpose: parse an HTTP response object into an RSS object - Input: an HTTP response object (see Snoopy) - Output: parsed RSS object (see rss_parse) -\*=======================================================================*/ -function _response_to_rss ($resp) { - $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); - - // if RSS parsed successfully - if ( $rss and !$rss->ERROR) { - - // find Etag, and Last-Modified - foreach($resp->headers as $h) { - // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" - if (strpos($h, ": ")) { - list($field, $val) = explode(": ", $h, 2); - } - else { - $field = $h; - $val = ""; - } - - if ( $field == 'ETag' ) { - $rss->etag = $val; - } - - if ( $field == 'Last-Modified' ) { - $rss->last_modified = $val; - } - } - - return $rss; - } // else construct error message - else { - $errormsg = "Failed to parse RSS file."; - - if ($rss) { - $errormsg .= " (" . $rss->ERROR . ")"; - } - error($errormsg); - - return false; - } // end if ($rss and !$rss->error) -} - -/*=======================================================================*\ - Function: init - Purpose: setup constants with default values - check for user overrides -\*=======================================================================*/ -function init () { - if ( defined('MAGPIE_INITALIZED') ) { - return; - } - else { - define('MAGPIE_INITALIZED', true); - } - - if ( !defined('MAGPIE_CACHE_ON') ) { - define('MAGPIE_CACHE_ON', true); - } - - if ( !defined('MAGPIE_CACHE_DIR') ) { - define('MAGPIE_CACHE_DIR', './cache'); - } - - if ( !defined('MAGPIE_CACHE_AGE') ) { - define('MAGPIE_CACHE_AGE', 60*60); // one hour - } - - if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) { - define('MAGPIE_CACHE_FRESH_ONLY', false); - } - - if ( !defined('MAGPIE_OUTPUT_ENCODING') ) { - define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1'); - } - - if ( !defined('MAGPIE_INPUT_ENCODING') ) { - define('MAGPIE_INPUT_ENCODING', null); - } - - if ( !defined('MAGPIE_DETECT_ENCODING') ) { - define('MAGPIE_DETECT_ENCODING', true); - } - - if ( !defined('MAGPIE_DEBUG') ) { - define('MAGPIE_DEBUG', 0); - } - - if ( !defined('MAGPIE_USER_AGENT') ) { - $ua = 'MagpieRSS/'. MAGPIE_VERSION . ' (+http://magpierss.sf.net'; - - if ( MAGPIE_CACHE_ON ) { - $ua = $ua . ')'; - } - else { - $ua = $ua . '; No cache)'; - } - - define('MAGPIE_USER_AGENT', $ua); - } - - if ( !defined('MAGPIE_FETCH_TIME_OUT') ) { - define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout - } - - // use gzip encoding to fetch rss files if supported? - if ( !defined('MAGPIE_USE_GZIP') ) { - define('MAGPIE_USE_GZIP', true); - } -} - -// NOTE: the following code should really be in Snoopy, or at least -// somewhere other then rss_fetch! - -/*=======================================================================*\ - HTTP STATUS CODE PREDICATES - These functions attempt to classify an HTTP status code - based on RFC 2616 and RFC 2518. - - All of them take an HTTP status code as input, and return true or false - - All this code is adapted from LWP's HTTP::Status. -\*=======================================================================*/ - - -/*=======================================================================*\ - Function: is_info - Purpose: return true if Informational status code -\*=======================================================================*/ -function is_info ($sc) { - return $sc >= 100 && $sc < 200; -} - -/*=======================================================================*\ - Function: is_success - Purpose: return true if Successful status code -\*=======================================================================*/ -function is_success ($sc) { - return $sc >= 200 && $sc < 300; -} - -/*=======================================================================*\ - Function: is_redirect - Purpose: return true if Redirection status code -\*=======================================================================*/ -function is_redirect ($sc) { - return $sc >= 300 && $sc < 400; -} - -/*=======================================================================*\ - Function: is_error - Purpose: return true if Error status code -\*=======================================================================*/ -function is_error ($sc) { - return $sc >= 400 && $sc < 600; -} - -/*=======================================================================*\ - Function: is_client_error - Purpose: return true if Error status code, and its a client error -\*=======================================================================*/ -function is_client_error ($sc) { - return $sc >= 400 && $sc < 500; -} - -/*=======================================================================*\ - Function: is_client_error - Purpose: return true if Error status code, and its a server error -\*=======================================================================*/ -function is_server_error ($sc) { - return $sc >= 500 && $sc < 600; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_parse.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_parse.inc deleted file mode 100755 index 563ac962..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_parse.inc +++ /dev/null @@ -1,605 +0,0 @@ - -* @version 0.7a -* @license GPL -* -*/ - -define('RSS', 'RSS'); -define('ATOM', 'Atom'); - -require_once (MAGPIE_DIR . 'rss_utils.inc'); - -/** -* Hybrid parser, and object, takes RSS as a string and returns a simple object. -* -* see: rss_fetch.inc for a simpler interface with integrated caching support -* -*/ -class MagpieRSS { - var $parser; - - var $current_item = array(); // item currently being parsed - var $items = array(); // collection of parsed items - var $channel = array(); // hash of channel fields - var $textinput = array(); - var $image = array(); - var $feed_type; - var $feed_version; - var $encoding = ''; // output encoding of parsed rss - - var $_source_encoding = ''; // only set if we have to parse xml prolog - - var $ERROR = ""; - var $WARNING = ""; - - // define some constants - - var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); - var $_KNOWN_ENCODINGS = array('UTF-8', 'US-ASCII', 'ISO-8859-1'); - - // parser variables, useless if you're not a parser, treat as private - var $stack = array(); // parser stack - var $inchannel = false; - var $initem = false; - var $incontent = false; // if in Atom field - var $intextinput = false; - var $inimage = false; - var $current_namespace = false; - - - /** - * Set up XML parser, parse source, and return populated RSS object.. - * - * @param string $source string containing the RSS to be parsed - * - * NOTE: Probably a good idea to leave the encoding options alone unless - * you know what you're doing as PHP's character set support is - * a little weird. - * - * NOTE: A lot of this is unnecessary but harmless with PHP5 - * - * - * @param string $output_encoding output the parsed RSS in this character - * set defaults to ISO-8859-1 as this is PHP's - * default. - * - * NOTE: might be changed to UTF-8 in future - * versions. - * - * @param string $input_encoding the character set of the incoming RSS source. - * Leave blank and Magpie will try to figure it - * out. - * - * - * @param bool $detect_encoding if false Magpie won't attempt to detect - * source encoding. (caveat emptor) - * - */ - function MagpieRSS ($source, $output_encoding='ISO-8859-1', - $input_encoding=null, $detect_encoding=true) - { - # if PHP xml isn't compiled in, die - # - if (!function_exists('xml_parser_create')) { - $this->error( "Failed to load PHP's XML Extension. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - list($parser, $source) = $this->create_parser($source, - $output_encoding, $input_encoding, $detect_encoding); - - - if (!is_resource($parser)) { - $this->error( "Failed to create an instance of PHP's XML parser. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - - $this->parser = $parser; - - # pass in parser, and a reference to this object - # setup handlers - # - xml_set_object( $this->parser, $this ); - xml_set_element_handler($this->parser, - 'feed_start_element', 'feed_end_element' ); - - xml_set_character_data_handler( $this->parser, 'feed_cdata' ); - - $status = xml_parse( $this->parser, $source ); - - if (! $status ) { - $errorcode = xml_get_error_code( $this->parser ); - if ( $errorcode != XML_ERROR_NONE ) { - $xml_error = xml_error_string( $errorcode ); - $error_line = xml_get_current_line_number($this->parser); - $error_col = xml_get_current_column_number($this->parser); - $errormsg = "$xml_error at line $error_line, column $error_col"; - - $this->error( $errormsg ); - } - } - - xml_parser_free( $this->parser ); - - $this->normalize(); - } - - function feed_start_element($p, $element, &$attrs) { - $el = $element = strtolower($element); - $attrs = array_change_key_case($attrs, CASE_LOWER); - - // check for a namespace, and split if found - $ns = false; - if ( strpos( $element, ':' ) ) { - list($ns, $el) = split( ':', $element, 2); - } - if ( $ns and $ns != 'rdf' ) { - $this->current_namespace = $ns; - } - - # if feed type isn't set, then this is first element of feed - # identify feed from root element - # - if (!isset($this->feed_type) ) { - if ( $el == 'rdf' ) { - $this->feed_type = RSS; - $this->feed_version = '1.0'; - } - elseif ( $el == 'rss' ) { - $this->feed_type = RSS; - $this->feed_version = $attrs['version']; - } - elseif ( $el == 'feed' ) { - $this->feed_type = ATOM; - $this->feed_version = $attrs['version']; - $this->inchannel = true; - } - return; - } - - if ( $el == 'channel' ) - { - $this->inchannel = true; - } - elseif ($el == 'item' or $el == 'entry' ) - { - $this->initem = true; - if ( isset($attrs['rdf:about']) ) { - $this->current_item['about'] = $attrs['rdf:about']; - } - } - - // if we're in the default namespace of an RSS feed, - // record textinput or image fields - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'textinput' ) - { - $this->intextinput = true; - } - - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'image' ) - { - $this->inimage = true; - } - - # handle atom content constructs - elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - // avoid clashing w/ RSS mod_content - if ($el == 'content' ) { - $el = 'atom_content'; - } - - $this->incontent = $el; - - - } - - // if inside an Atom content construct (e.g. content or summary) field treat tags as text - elseif ($this->feed_type == ATOM and $this->incontent ) - { - // if tags are inlined, then flatten - $attrs_str = join(' ', - array_map('map_attrs', - array_keys($attrs), - array_values($attrs) ) ); - - $this->append_content( "<$element $attrs_str>" ); - - array_unshift( $this->stack, $el ); - } - - // Atom support many links per containging element. - // Magpie treats link elements of type rel='alternate' - // as being equivalent to RSS's simple link element. - // - elseif ($this->feed_type == ATOM and $el == 'link' ) - { - if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) - { - $link_el = 'link'; - } - else { - $link_el = 'link_' . $attrs['rel']; - } - - $this->append($link_el, $attrs['href']); - } - // set stack[0] to current element - else { - array_unshift($this->stack, $el); - } - } - - - - function feed_cdata ($p, $text) { - if ($this->feed_type == ATOM and $this->incontent) - { - $this->append_content( $text ); - } - else { - $current_el = join('_', array_reverse($this->stack)); - $this->append($current_el, $text); - } - } - - function feed_end_element ($p, $el) { - $el = strtolower($el); - - if ( $el == 'item' or $el == 'entry' ) - { - $this->items[] = $this->current_item; - $this->current_item = array(); - $this->initem = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) - { - $this->intextinput = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) - { - $this->inimage = false; - } - elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - $this->incontent = false; - } - elseif ($el == 'channel' or $el == 'feed' ) - { - $this->inchannel = false; - } - elseif ($this->feed_type == ATOM and $this->incontent ) { - // balance tags properly - // note: i don't think this is actually neccessary - if ( $this->stack[0] == $el ) - { - $this->append_content(""); - } - else { - $this->append_content("<$el />"); - } - - array_shift( $this->stack ); - } - else { - array_shift( $this->stack ); - } - - $this->current_namespace = false; - } - - function concat (&$str1, $str2="") { - if (!isset($str1) ) { - $str1=""; - } - $str1 .= $str2; - } - - - - function append_content($text) { - if ( $this->initem ) { - $this->concat( $this->current_item[ $this->incontent ], $text ); - } - elseif ( $this->inchannel ) { - $this->concat( $this->channel[ $this->incontent ], $text ); - } - } - - // smart append - field and namespace aware - function append($el, $text) { - if (!$el) { - return; - } - if ( $this->current_namespace ) - { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $this->current_namespace ][ $el ], $text); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $this->current_namespace ][ $el ], $text ); - } - } - else { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $el ], $text); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $el ], $text ); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $el ], $text ); - } - - } - } - - function normalize () { - // if atom populate rss fields - if ( $this->is_atom() ) { - $this->channel['description'] = $this->channel['tagline']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['summary']) ) - $item['description'] = $item['summary']; - if ( isset($item['atom_content'])) - $item['content']['encoded'] = $item['atom_content']; - - $atom_date = (isset($item['issued']) ) ? $item['issued'] : $item['modified']; - if ( $atom_date ) { - $epoch = @parse_w3cdtf($atom_date); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - elseif ( $this->is_rss() ) { - $this->channel['tagline'] = $this->channel['description']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['description'])) - $item['summary'] = $item['description']; - if ( isset($item['content']['encoded'] ) ) - $item['atom_content'] = $item['content']['encoded']; - - if ( $this->is_rss() == '1.0' and isset($item['dc']['date']) ) { - $epoch = @parse_w3cdtf($item['dc']['date']); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - elseif ( isset($item['pubdate']) ) { - $epoch = @strtotime($item['pubdate']); - if ($epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - } - - - function is_rss () { - if ( $this->feed_type == RSS ) { - return $this->feed_version; - } - else { - return false; - } - } - - function is_atom() { - if ( $this->feed_type == ATOM ) { - return $this->feed_version; - } - else { - return false; - } - } - - /** - * return XML parser, and possibly re-encoded source - * - */ - function create_parser($source, $out_enc, $in_enc, $detect) { - if ( substr(phpversion(),0,1) == 5) { - $parser = $this->php5_create_parser($in_enc, $detect); - } - else { - list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect); - } - if ($out_enc) { - $this->encoding = $out_enc; - xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc); - } - - return array($parser, $source); - } - - /** - * Instantiate an XML parser under PHP5 - * - * PHP5 will do a fine job of detecting input encoding - * if passed an empty string as the encoding. - * - * All hail libxml2! - * - */ - function php5_create_parser($in_enc, $detect) { - // by default php5 does a fine job of detecting input encodings - if(!$detect && $in_enc) { - return xml_parser_create($in_enc); - } - else { - return xml_parser_create(''); - } - } - - /** - * Instaniate an XML parser under PHP4 - * - * Unfortunately PHP4's support for character encodings - * and especially XML and character encodings sucks. As - * long as the documents you parse only contain characters - * from the ISO-8859-1 character set (a superset of ASCII, - * and a subset of UTF-8) you're fine. However once you - * step out of that comfy little world things get mad, bad, - * and dangerous to know. - * - * The following code is based on SJM's work with FoF - * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss - * - */ - function php4_create_parser($source, $in_enc, $detect) { - if ( !$detect ) { - return array(xml_parser_create($in_enc), $source); - } - - if (!$in_enc) { - if (preg_match('//m', $source, $m)) { - $in_enc = strtoupper($m[1]); - $this->source_encoding = $in_enc; - } - else { - $in_enc = 'UTF-8'; - } - } - - if ($this->known_encoding($in_enc)) { - return array(xml_parser_create($in_enc), $source); - } - - // the dectected encoding is not one of the simple encodings PHP knows - - // attempt to use the iconv extension to - // cast the XML to a known encoding - // @see http://php.net/iconv - - if (function_exists('iconv')) { - $encoded_source = iconv($in_enc,'UTF-8', $source); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // iconv didn't work, try mb_convert_encoding - // @see http://php.net/mbstring - if(function_exists('mb_convert_encoding')) { - $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc ); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // else - $this->error("Feed is in an unsupported character encoding. ($in_enc) " . - "You may see strange artifacts, and mangled characters.", - E_USER_NOTICE); - - return array(xml_parser_create(), $source); - } - - function known_encoding($enc) { - $enc = strtoupper($enc); - if ( in_array($enc, $this->_KNOWN_ENCODINGS) ) { - return $enc; - } - else { - return false; - } - } - - function error ($errormsg, $lvl=E_USER_WARNING) { - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - if ( MAGPIE_DEBUG ) { - trigger_error( $errormsg, $lvl); - } - else { - error_log( $errormsg, 0); - } - - $notices = E_USER_NOTICE|E_NOTICE; - if ( $lvl&$notices ) { - $this->WARNING = $errormsg; - } else { - $this->ERROR = $errormsg; - } - } - - -} // end class RSS - -function map_attrs($k, $v) { - return "$k=\"$v\""; -} - -// patch to support medieval versions of PHP4.1.x, -// courtesy, Ryan Currie, ryan@digibliss.com - -if (!function_exists('array_change_key_case')) { - define("CASE_UPPER",1); - define("CASE_LOWER",0); - - - function array_change_key_case($array,$case=CASE_LOWER) { - if ($case=CASE_LOWER) $cmd=strtolower; - elseif ($case=CASE_UPPER) $cmd=strtoupper; - foreach($array as $key=>$value) { - $output[$cmd($key)]=$value; - } - return $output; - } - -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_utils.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_utils.inc deleted file mode 100755 index b1531da4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/rss_utils.inc +++ /dev/null @@ -1,67 +0,0 @@ - - * Version: 0.51 - * License: GPL - * - * The lastest version of MagpieRSS can be obtained from: - * http://magpierss.sourceforge.net - * - * For questions, help, comments, discussion, etc., please join the - * Magpie mailing list: - * magpierss-general@lists.sourceforge.net - */ - - -/*======================================================================*\ - Function: parse_w3cdtf - Purpose: parse a W3CDTF date into unix epoch - - NOTE: http://www.w3.org/TR/NOTE-datetime -\*======================================================================*/ - -function parse_w3cdtf ( $date_str ) { - - # regex to match wc3dtf - $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; - - if ( preg_match( $pat, $date_str, $match ) ) { - list( $year, $month, $day, $hours, $minutes, $seconds) = - array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]); - - # calc epoch for current date assuming GMT - $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year); - - $offset = 0; - if ( $match[10] == 'Z' ) { - # zulu time, aka GMT - } - else { - list( $tz_mod, $tz_hour, $tz_min ) = - array( $match[8], $match[9], $match[10]); - - # zero out the variables - if ( ! $tz_hour ) { $tz_hour = 0; } - if ( ! $tz_min ) { $tz_min = 0; } - - $offset_secs = (($tz_hour*60)+$tz_min)*60; - - # is timezone ahead of GMT? then subtract offset - # - if ( $tz_mod == '+' ) { - $offset_secs = $offset_secs * -1; - } - - $offset = $offset_secs; - } - $epoch = $epoch + $offset; - return $epoch; - } - else { - return -1; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/all-wcprops deleted file mode 100755 index 22185ad8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts -END -magpie_simple.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/magpie_simple.php -END -magpie_slashbox.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/magpie_slashbox.php -END -README -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/README -END -magpie_debug.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/magpie_debug.php -END -simple_smarty.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/simple_smarty.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/entries deleted file mode 100755 index 915117e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/entries +++ /dev/null @@ -1,99 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie/scripts -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -magpie_simple.php -file - - - - -2008-02-29T14:57:49.490073Z -455f2406233fedb58a57785165a30380 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -magpie_slashbox.php -file - - - - -2008-02-29T14:57:49.490073Z -64cc0ec56ca4057aeecf885c1acd8d27 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -smarty_plugin -dir - -README -file - - - - -2008-02-29T14:57:49.505693Z -773220e3985d1e703905b2ff811e35ad -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -templates -dir - -magpie_debug.php -file - - - - -2008-02-29T14:57:49.505693Z -9b527808bc9ba0e7190c0d26fc4484ba -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - -simple_smarty.php -file - - - - -2008-02-29T14:57:49.521314Z -dfbff9c279c088ae9b2839adf7227630 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/README.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/README.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/README.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_debug.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_debug.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_debug.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_simple.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_simple.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_simple.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_slashbox.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_slashbox.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/magpie_slashbox.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/simple_smarty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/simple_smarty.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/prop-base/simple_smarty.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/README.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/README.svn-base deleted file mode 100755 index e37afe54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/README.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -Some example on how to use Magpie: - -* magpie_simple.php * - Simple example of fetching and parsing an RSS file. Expects to be - called with a query param 'rss_url=http://' - -* simple_smarty.php * - Similiar to magpie_simple, but using the Smarty template engine to do - display. Also demostrates using rss_utils.inc and a smarty plugin to - parse and display when each RSS item was published. - -* magpie_debug.php * - Displays all the information available from a parsed feed. - -* smarty_plugin/modifier.rss_date_parse.php * - - A Smarty plugin for parsing RSS style dates. You must include rss_utils.inc - for this plugin to work. It also must be installed in the Smarty plugin - directory, see the Smarty docs for details. - -* templates/simple.smarty - A Smarty template used by simple_smarty.php which demostrates - displaying an RSS feed and using the date parse plugin. - - -The Smarty template engine and documentation on how to use it are available from -http://smarty.php.net diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_debug.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_debug.php.svn-base deleted file mode 100755 index 84549db5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_debug.php.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -Example Output"; - echo "Channel: " . $rss->channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; -} -else { - echo "Error: " . magpie_error(); -} -?> - -
    - RSS URL:
    - -
    - -

    Parsed Results (var_dump'ed)

    -
    -
    -
    - -Error:
    PHP compiled without XML support (--with-xml), Mapgie won't work without PHP support for XML.
    \n"; - exit; - } - else { - echo "OK: Found an XML parser.
    \n"; - } - - if ( ! function_exists('gzinflate') ) { - echo "Warning: PHP compiled without Zlib support (--with-zlib). No support for GZIP encoding.
    \n"; - } - else { - echo "OK: Support for GZIP encoding.
    \n"; - } - - if ( ! (function_exists('iconv') and function_exists('mb_convert_encoding') ) ) { - echo "Warning: No support for iconv (--with-iconv) or multi-byte strings (--enable-mbstring)." . - "No support character set munging.
    \n"; - } - else { - echo "OK: Support for character munging.
    \n"; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_simple.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_simple.php.svn-base deleted file mode 100755 index 282735e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_simple.php.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; -} -?> - -
    - RSS URL:
    - -
    - -

    -

    Security Note:

    -This is a simple example script. If this was a real script we probably wouldn't allow strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL. Additionally its a bad idea to leave this example script lying around. -

    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_slashbox.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_slashbox.php.svn-base deleted file mode 100755 index bbef30be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/magpie_slashbox.php.svn-base +++ /dev/null @@ -1,66 +0,0 @@ - - - - -
    - -
    - -"; - $rss = fetch_rss( $url ); - echo slashbox ($rss); -} - -echo "
    ";
    -print_r($rss);
    -echo "
    "; -?> - - - - -"; - echo ""; - - # get the channel title and link properties off of the rss object - # - $title = $rss->channel['title']; - $link = $rss->channel['link']; - - echo "$title"; - echo ""; - - # foreach over each item in the array. - # displaying simple links - # - # we could be doing all sorts of neat things with the dublin core - # info, or the event info, or what not, but keeping it simple for now. - # - foreach ($rss->items as $item ) { - echo ""; - echo ""; - echo $item['title']; - echo ""; - } - - echo ""; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/simple_smarty.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/simple_smarty.php.svn-base deleted file mode 100755 index a904d88d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/.svn/text-base/simple_smarty.php.svn-base +++ /dev/null @@ -1,58 +0,0 @@ -compile_check = true; - -// url of an rss file -$url = $_GET['rss_url']; - - -if ( $url ) { - // assign a variable to smarty for use in the template - $smarty->assign('rss_url', $url); - - // use MagpieRSS to fetch remote RSS file, and parse it - $rss = fetch_rss( $url ); - - // if fetch_rss returned false, we encountered an error - if ( !$rss ) { - $smarty->assign( 'error', magpie_error() ); - } - $smarty->assign('rss', $rss ); - - $item = $rss->items[0]; - $date = parse_w3cdtf( $item['dc']['date'] ); - $smarty->assign( 'date', $date ); -} - -// parse smarty template, and display using the variables we assigned -$smarty->display('simple.smarty'); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/README b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/README deleted file mode 100755 index 6a812aa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/README +++ /dev/null @@ -1,27 +0,0 @@ -Some example on how to use Magpie: - -* magpie_simple.php * - Simple example of fetching and parsing an RSS file. Expects to be - called with a query param 'rss_url=http://' - -* simple_smarty.php * - Similiar to magpie_simple, but using the Smarty template engine to do - display. Also demostrates using rss_utils.inc and a smarty plugin to - parse and display when each RSS item was published. - -* magpie_debug.php * - Displays all the information available from a parsed feed. - -* smarty_plugin/modifier.rss_date_parse.php * - - A Smarty plugin for parsing RSS style dates. You must include rss_utils.inc - for this plugin to work. It also must be installed in the Smarty plugin - directory, see the Smarty docs for details. - -* templates/simple.smarty - A Smarty template used by simple_smarty.php which demostrates - displaying an RSS feed and using the date parse plugin. - - -The Smarty template engine and documentation on how to use it are available from -http://smarty.php.net diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_debug.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_debug.php deleted file mode 100755 index 49947449..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_debug.php +++ /dev/null @@ -1,80 +0,0 @@ -Example Output"; - echo "Channel: " . $rss->channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; -} -else { - echo "Error: " . magpie_error(); -} -?> - -
    - RSS URL:
    - -
    - -

    Parsed Results (var_dump'ed)

    -
    -
    -
    - -Error: PHP compiled without XML support (--with-xml), Mapgie won't work without PHP support for XML.
    \n"; - exit; - } - else { - echo "OK: Found an XML parser.
    \n"; - } - - if ( ! function_exists('gzinflate') ) { - echo "Warning: PHP compiled without Zlib support (--with-zlib). No support for GZIP encoding.
    \n"; - } - else { - echo "OK: Support for GZIP encoding.
    \n"; - } - - if ( ! (function_exists('iconv') and function_exists('mb_convert_encoding') ) ) { - echo "Warning: No support for iconv (--with-iconv) or multi-byte strings (--enable-mbstring)." . - "No support character set munging.
    \n"; - } - else { - echo "OK: Support for character munging.
    \n"; - } -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_simple.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_simple.php deleted file mode 100755 index 28c72cc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_simple.php +++ /dev/null @@ -1,29 +0,0 @@ -channel['title'] . "

    "; - echo "

      "; - foreach ($rss->items as $item) { - $href = $item['link']; - $title = $item['title']; - echo "
    • $title
    • "; - } - echo "
    "; -} -?> - -
    - RSS URL:
    - -
    - -

    -

    Security Note:

    -This is a simple example script. If this was a real script we probably wouldn't allow strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL. Additionally its a bad idea to leave this example script lying around. -

    \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_slashbox.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_slashbox.php deleted file mode 100755 index 6d68dffb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/magpie_slashbox.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - -
    - -
    - -"; - $rss = fetch_rss( $url ); - echo slashbox ($rss); -} - -echo "
    ";
    -print_r($rss);
    -echo "
    "; -?> - - - - -"; - echo ""; - - # get the channel title and link properties off of the rss object - # - $title = $rss->channel['title']; - $link = $rss->channel['link']; - - echo "$title"; - echo ""; - - # foreach over each item in the array. - # displaying simple links - # - # we could be doing all sorts of neat things with the dublin core - # info, or the event info, or what not, but keeping it simple for now. - # - foreach ($rss->items as $item ) { - echo ""; - echo ""; - echo $item['title']; - echo ""; - } - - echo ""; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/simple_smarty.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/simple_smarty.php deleted file mode 100755 index 13278574..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/simple_smarty.php +++ /dev/null @@ -1,58 +0,0 @@ -compile_check = true; - -// url of an rss file -$url = $_GET['rss_url']; - - -if ( $url ) { - // assign a variable to smarty for use in the template - $smarty->assign('rss_url', $url); - - // use MagpieRSS to fetch remote RSS file, and parse it - $rss = fetch_rss( $url ); - - // if fetch_rss returned false, we encountered an error - if ( !$rss ) { - $smarty->assign( 'error', magpie_error() ); - } - $smarty->assign('rss', $rss ); - - $item = $rss->items[0]; - $date = parse_w3cdtf( $item['dc']['date'] ); - $smarty->assign( 'date', $date ); -} - -// parse smarty template, and display using the variables we assigned -$smarty->display('simple.smarty'); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/all-wcprops deleted file mode 100755 index 80a47428..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/smarty_plugin -END -modifier.rss_date_parse.php -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/entries deleted file mode 100755 index 9cf20818..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie/scripts/smarty_plugin -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -modifier.rss_date_parse.php -file - - - - -2008-02-29T14:57:49.396349Z -8fa557dbe3ce6957e6263af16506e50b -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/prop-base/modifier.rss_date_parse.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/prop-base/modifier.rss_date_parse.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/prop-base/modifier.rss_date_parse.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/text-base/modifier.rss_date_parse.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/text-base/modifier.rss_date_parse.php.svn-base deleted file mode 100755 index 593270e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/.svn/text-base/modifier.rss_date_parse.php.svn-base +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php deleted file mode 100755 index 605af2a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/all-wcprops deleted file mode 100755 index 2b678fc6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/templates -END -simple.smarty -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/274/trunk/rdfapi-php/api/util/magpie/scripts/templates/simple.smarty -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/entries deleted file mode 100755 index 30bba188..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/util/magpie/scripts/templates -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-24T07:48:26.000000Z -274 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -simple.smarty -file - - - - -2008-02-29T14:57:49.474452Z -eccae93df713f6ec9cba5b019e32db48 -2006-05-24T07:48:26.000000Z -274 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/prop-base/simple.smarty.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/prop-base/simple.smarty.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/prop-base/simple.smarty.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/text-base/simple.smarty.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/text-base/simple.smarty.svn-base deleted file mode 100755 index c0761cff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/.svn/text-base/simple.smarty.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - -A Simple RSS Box: I'm not a designer - - - -
    -RSS File: - - -
    - -Displaying: {$rss_url} -

    - -{* if $error display the error - elseif parsed RSS object display the RSS - else solicit user for a URL -*} - -{if $error } -Error: {$error} -{elseif $rss} - - - - - {foreach from=$rss->items item=item} - - - - - {/foreach} -
    - {$rss->channel.title} -
    - {$item.title} - - {$item.dc.date|rss_date_parse|date_format:"%A, %B %e, %Y"} -
    -{else} - Enter the URL of an RSS file to display. -{/if} - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/simple.smarty b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/simple.smarty deleted file mode 100755 index eba38807..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/util/magpie/scripts/templates/simple.smarty +++ /dev/null @@ -1,46 +0,0 @@ - - -A Simple RSS Box: I'm not a designer - - - -

    -RSS File: - - -
    - -Displaying: {$rss_url} -

    - -{* if $error display the error - elseif parsed RSS object display the RSS - else solicit user for a URL -*} - -{if $error } -Error: {$error} -{elseif $rss} - - - - - {foreach from=$rss->items item=item} - - - - - {/foreach} -
    - {$rss->channel.title} -
    - {$item.title} - - {$item.dc.date|rss_date_parse|date_format:"%A, %B %e, %Y"} -
    -{else} - Enter the URL of an RSS file to display. -{/if} - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/all-wcprops deleted file mode 100755 index 845bde57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/all-wcprops +++ /dev/null @@ -1,167 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary -END -VocabularyClass.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/VocabularyClass.php -END -GEOURL.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/api/vocabulary/GEOURL.php -END -RDFS.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDFS.php -END -VCARD.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/VCARD.php -END -DC_RES.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/DC_RES.php -END -RDFS_C.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDFS_C.php -END -VCARD_C.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/VCARD_C.php -END -OWL.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/OWL.php -END -ATOM_C.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/ATOM_C.php -END -OWL_C.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/OWL_C.php -END -Vocabulary.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/Vocabulary.php -END -RSS.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RSS.php -END -RDFS_RES.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDFS_RES.php -END -VCARD_RES.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/VCARD_RES.php -END -RSS_C.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RSS_C.php -END -ATOM_RES.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/ATOM_RES.php -END -OWL_RES.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/OWL_RES.php -END -RDF.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDF.php -END -FOAF.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/FOAF.php -END -FOAF_C.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/FOAF_C.php -END -RDF_C.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDF_C.php -END -RSS_RES.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RSS_RES.php -END -VocabularyRes.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/VocabularyRes.php -END -FOAF_RES.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/FOAF_RES.php -END -RDF_RES.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/RDF_RES.php -END -DC.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/api/vocabulary/DC.php -END -DC_C.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/431/trunk/rdfapi-php/api/vocabulary/DC_C.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/entries deleted file mode 100755 index c59df28b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/entries +++ /dev/null @@ -1,379 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/api/vocabulary -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-05-01T15:49:19.000000Z -431 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -VocabularyClass.php -file - - - - -2008-02-29T14:57:48.365389Z -e22245ff7efb33090ebff8c1c6e93c37 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -GEOURL.php -file - - - - -2008-02-29T14:57:48.365389Z -d41d8cd98f00b204e9800998ecf8427e -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -RDFS.php -file - - - - -2008-02-29T14:57:48.381010Z -8be8010a1740031782896905617e8658 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -VCARD.php -file - - - - -2008-02-29T14:57:48.396631Z -214276cb9c2b61fa6e4612437802c54d -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -DC_RES.php -file - - - - -2008-02-29T14:57:48.381010Z -d890ea203ba18982c92a01b98ce85c49 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RDFS_C.php -file - - - - -2008-02-29T14:57:48.396631Z -18ea8bcb0a395492ae7a13f3428dffd2 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -VCARD_C.php -file - - - - -2008-02-29T14:57:48.412251Z -c0315c7ff7308ed81fc07147bb46a660 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -OWL.php -file - - - - -2008-02-29T14:57:48.412251Z -3f2aaa004e6b461774cf92c0fd9da0f5 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -ATOM_C.php -file - - - - -2008-02-29T14:57:48.427872Z -e54d7cfb57e01a12abaeefa3b5ab5586 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -OWL_C.php -file - - - - -2008-02-29T14:57:48.427872Z -7171955ac6213552a699eacaa906d089 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -Vocabulary.php -file - - - - -2008-02-29T14:57:48.459113Z -2b78717c01bf5d8ac86d9bda35f20cad -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RSS.php -file - - - - -2008-02-29T14:57:48.443492Z -7891807cdb6093ad78450b9db3d70e25 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RDFS_RES.php -file - - - - -2008-02-29T14:57:48.443492Z -74fb016b0cf9c05c04204af782c94ea2 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -VCARD_RES.php -file - - - - -2008-02-29T14:57:48.459113Z -be76c9918653a59d3b6152a7cbba16e4 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -ATOM_RES.php -file - - - - -2008-02-29T14:57:48.474734Z -74f78358a9370244328218690ac83eb6 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RSS_C.php -file - - - - -2008-02-29T14:57:48.474734Z -c1ccc7f28235190246277cf7b677af98 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -OWL_RES.php -file - - - - -2008-02-29T14:57:48.474734Z -852da90a5605856c4f6b29c5c245a165 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RDF.php -file - - - - -2008-02-29T14:57:48.490354Z -754c29e1f1ae4680a248b9930de8bf4e -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -FOAF.php -file - - - - -2008-02-29T14:57:48.490354Z -8d1fa640077a011924d430a0666be94b -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -FOAF_C.php -file - - - - -2008-02-29T14:57:48.505975Z -860b0346bc481ac7a8b218f757a06eb8 -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RDF_C.php -file - - - - -2008-02-29T14:57:48.505975Z -9b1097991be34357e1f36c4bd25f3e2f -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RSS_RES.php -file - - - - -2008-02-29T14:57:48.521595Z -e85fab2269e02f1ede2839a7fed2f31a -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -VocabularyRes.php -file - - - - -2008-02-29T14:57:48.521595Z -6c3e1b099773b81b0f820cc81a2c22fc -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -FOAF_RES.php -file - - - - -2008-02-29T14:57:48.537216Z -7d5f5281b3a4587afea729340f349e0a -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -RDF_RES.php -file - - - - -2008-02-29T14:57:48.537216Z -554ac6a1184b9d9cde6c4a91e8e5199d -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - -DC.php -file - - - - -2008-02-29T14:57:48.552837Z -6e1b52c627c21891667ffe5e9bdb6e53 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -DC_C.php -file - - - - -2008-02-29T14:57:48.552837Z -ba219983a329e157b2aa014ac400deac -2007-05-01T15:49:19.000000Z -431 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/ATOM_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/DC_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/FOAF_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/GEOURL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/GEOURL.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/GEOURL.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/OWL_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDFS_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RDF_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/RSS_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_C.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_C.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_RES.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VCARD_RES.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/Vocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/Vocabulary.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/Vocabulary.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyClass.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyClass.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyClass.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyRes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyRes.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/prop-base/VocabularyRes.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_C.php.svn-base deleted file mode 100755 index c3a3cbe0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_C.php.svn-base +++ /dev/null @@ -1,206 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_RES.php.svn-base deleted file mode 100755 index 59721215..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/ATOM_RES.php.svn-base +++ /dev/null @@ -1,206 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC.php.svn-base deleted file mode 100755 index 6f511dd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC.php.svn-base +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_C.php.svn-base deleted file mode 100755 index 3dec26c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_C.php.svn-base +++ /dev/null @@ -1,486 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_RES.php.svn-base deleted file mode 100755 index f3ad4af1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/DC_RES.php.svn-base +++ /dev/null @@ -1,486 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF.php.svn-base deleted file mode 100755 index 00616353..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF.php.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_C.php.svn-base deleted file mode 100755 index 958a716b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_C.php.svn-base +++ /dev/null @@ -1,401 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_RES.php.svn-base deleted file mode 100755 index af46105e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/FOAF_RES.php.svn-base +++ /dev/null @@ -1,399 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/GEOURL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/GEOURL.php.svn-base deleted file mode 100755 index e69de29b..00000000 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL.php.svn-base deleted file mode 100755 index 7b719315..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL.php.svn-base +++ /dev/null @@ -1,66 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_C.php.svn-base deleted file mode 100755 index 091d499f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_C.php.svn-base +++ /dev/null @@ -1,303 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_RES.php.svn-base deleted file mode 100755 index 380e0ec2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/OWL_RES.php.svn-base +++ /dev/null @@ -1,303 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF.php.svn-base deleted file mode 100755 index 24bcaea7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF.php.svn-base +++ /dev/null @@ -1,49 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS.php.svn-base deleted file mode 100755 index 3b1b2884..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_C.php.svn-base deleted file mode 100755 index 2fe0c9b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_C.php.svn-base +++ /dev/null @@ -1,108 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_RES.php.svn-base deleted file mode 100755 index 964f7615..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDFS_RES.php.svn-base +++ /dev/null @@ -1,107 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_C.php.svn-base deleted file mode 100755 index 7c878526..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_C.php.svn-base +++ /dev/null @@ -1,182 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_RES.php.svn-base deleted file mode 100755 index 4d219d00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RDF_RES.php.svn-base +++ /dev/null @@ -1,182 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS.php.svn-base deleted file mode 100755 index 8a25a9d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_C.php.svn-base deleted file mode 100755 index 302cba4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_C.php.svn-base +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_RES.php.svn-base deleted file mode 100755 index 1c637540..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/RSS_RES.php.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD.php.svn-base deleted file mode 100755 index 46a34711..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD.php.svn-base +++ /dev/null @@ -1,66 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_C.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_C.php.svn-base deleted file mode 100755 index 68fce84d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_C.php.svn-base +++ /dev/null @@ -1,301 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_RES.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_RES.php.svn-base deleted file mode 100755 index b200f943..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VCARD_RES.php.svn-base +++ /dev/null @@ -1,302 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/Vocabulary.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/Vocabulary.php.svn-base deleted file mode 100755 index 24f32444..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/Vocabulary.php.svn-base +++ /dev/null @@ -1,19 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyClass.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyClass.php.svn-base deleted file mode 100755 index 5f4c5450..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyClass.php.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_C.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyRes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyRes.php.svn-base deleted file mode 100755 index c23e6dc6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/.svn/text-base/VocabularyRes.php.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -include_once RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL); -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_RES.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_C.php deleted file mode 100755 index aa72130a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_C.php +++ /dev/null @@ -1,206 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_RES.php deleted file mode 100755 index 20da2610..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/ATOM_RES.php +++ /dev/null @@ -1,206 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC.php deleted file mode 100755 index edbc8bde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC.php +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_C.php deleted file mode 100755 index 2ce65090..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_C.php +++ /dev/null @@ -1,486 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_RES.php deleted file mode 100755 index 7abbaa9f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/DC_RES.php +++ /dev/null @@ -1,486 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF.php deleted file mode 100755 index 63a50189..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF.php +++ /dev/null @@ -1,87 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_C.php deleted file mode 100755 index f1d1ac52..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_C.php +++ /dev/null @@ -1,401 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_RES.php deleted file mode 100755 index b531e229..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/FOAF_RES.php +++ /dev/null @@ -1,399 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/GEOURL.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/GEOURL.php deleted file mode 100755 index e69de29b..00000000 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL.php deleted file mode 100755 index 10963881..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL.php +++ /dev/null @@ -1,66 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_C.php deleted file mode 100755 index 3af40845..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_C.php +++ /dev/null @@ -1,303 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_RES.php deleted file mode 100755 index 6b2fc2ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/OWL_RES.php +++ /dev/null @@ -1,303 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF.php deleted file mode 100755 index 99d6be60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF.php +++ /dev/null @@ -1,49 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS.php deleted file mode 100755 index aee6778d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS.php +++ /dev/null @@ -1,34 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_C.php deleted file mode 100755 index bc108800..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_C.php +++ /dev/null @@ -1,108 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_RES.php deleted file mode 100755 index e3a7cbec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDFS_RES.php +++ /dev/null @@ -1,107 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_C.php deleted file mode 100755 index 40bd3e2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_C.php +++ /dev/null @@ -1,182 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_RES.php deleted file mode 100755 index 39e9bf85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RDF_RES.php +++ /dev/null @@ -1,182 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS.php deleted file mode 100755 index 4151c86e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS.php +++ /dev/null @@ -1,34 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_C.php deleted file mode 100755 index b415a393..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_C.php +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_RES.php deleted file mode 100755 index 81fae138..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/RSS_RES.php +++ /dev/null @@ -1,79 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD.php deleted file mode 100755 index 819a1f19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD.php +++ /dev/null @@ -1,66 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_C.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_C.php deleted file mode 100755 index 21237d0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_C.php +++ /dev/null @@ -1,301 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_RES.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_RES.php deleted file mode 100755 index b8435237..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VCARD_RES.php +++ /dev/null @@ -1,302 +0,0 @@ - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/Vocabulary.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/Vocabulary.php deleted file mode 100755 index e8ca92ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/Vocabulary.php +++ /dev/null @@ -1,19 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyClass.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyClass.php deleted file mode 100755 index eb72d0bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyClass.php +++ /dev/null @@ -1,20 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_C.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyRes.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyRes.php deleted file mode 100755 index ed8234a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/vocabulary/VocabularyRes.php +++ /dev/null @@ -1,21 +0,0 @@ - -* @package vocabulary -* -*/ - -// Include vocabularies -include_once RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL); -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_RES.php'; -require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_RES.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/all-wcprops deleted file mode 100755 index 08495be6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/all-wcprops +++ /dev/null @@ -1,53 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 53 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc -END -rdql_grammar.htm -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/rdql_grammar.htm -END -manual.css -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/421/trunk/rdfapi-php/doc/manual.css -END -phpdoc.CSS -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/phpdoc.CSS -END -tests.html -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/563/trunk/rdfapi-php/doc/tests.html -END -example1.rdf -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/example1.rdf -END -database_schema.html -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/database_schema.html -END -phpdoc.dtd -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/phpdoc.dtd -END -index.html -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/563/trunk/rdfapi-php/doc/index.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/entries deleted file mode 100755 index ba98e832..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/entries +++ /dev/null @@ -1,147 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -rdql_grammar.htm -file - - - - -2008-02-29T14:57:44.413378Z -1916849faf08642a2f045cc80c765ed5 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -tests -dir - -tutorial -dir - -manual.css -file - - - - -2008-02-29T14:57:44.428998Z -e23b2206cbd08421ffdeab53937d58a7 -2007-04-30T06:30:09.000000Z -421 -cweiske -has-props - -phpdoc.CSS -file - - - - -2008-02-29T14:57:44.428998Z -9ba426cf3e0ac703962b272673a63cc3 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -tests.html -file -563 - - - -2008-02-29T15:51:21.000000Z -6bed6b8ca610a0c5a90b7c4d8946b8f4 -2008-02-29T16:02:33.224682Z -563 -cax -has-props - -example1.rdf -file - - - - -2008-02-29T14:57:44.444619Z -033f3ebdde0e1aea8d342a781e79291d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -database_schema.html -file - - - - -2008-02-29T14:57:44.460239Z -da77d148d7bc6b4182871cf6552cccb5 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -phpdoc.dtd -file - - - - -2008-02-29T14:57:44.460239Z -784764c4a912eb50f0bf1d2a274a2d50 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -implNotes -dir - -index.html -file -563 - - - -2008-02-29T15:55:33.000000Z -3e8652e799e5f088c0ce3e2c7d0755f5 -2008-02-29T16:02:33.224682Z -563 -cax -has-props - -img -dir - -phpdoc -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/database_schema.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/database_schema.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/database_schema.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/example1.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/example1.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/index.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/index.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/manual.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/manual.css.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/manual.css.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.CSS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.CSS.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.CSS.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.dtd.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/phpdoc.dtd.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/rdql_grammar.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/rdql_grammar.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/rdql_grammar.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/tests.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/tests.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/prop-base/tests.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/database_schema.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/database_schema.html.svn-base deleted file mode 100755 index fc53cbb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/database_schema.html.svn-base +++ /dev/null @@ -1,164 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP

    -

    Database Schema

    -
    RAP uses a denormalized database layout for increased performance.
    -
    -
    -
    -

    Table models

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    modelURIvarcharused at reopening a persistent model
    baseURIvarcharaffects creating of new resources and serialization syntax
    -
    -
    -
    -

    Table statements

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    subjectvarchar, indexed 
    predicatevarchar, indexed 
    objectblob, indexed 
    l_languagevarcharonly if object is a literal, otherwise NULL
    l_datatypevarcharonly if object is a literal, otherwise NULL
    subject_isvarchar(1)flags whether subject is a resource or blankNode
    object_isvarchar(1)flags whether object is a resource, blankNode or literal
    -
    -
    -
    -

    Table namespaces

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    namespacevarchar 
    prefixvarchar 
    - -
    For best performance we recommend joint indexing on subject and predicate.
    -

     

    -

     

    -

    Table datasets

    - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    datasetName varchar  
    defaultModelUrivarchar 
    -


    -
    -

    -

    Table dataset_model

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    datasetNamevarchar 
    modelIDint 
    graphURIvarchar 
    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/example1.rdf.svn-base deleted file mode 100755 index 41ea683f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/example1.rdf.svn-base +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Ora Lassila - lassila@w3.org - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/index.html.svn-base deleted file mode 100755 index 2ece3bbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/index.html.svn-base +++ /dev/null @@ -1,338 +0,0 @@ - - - - - RAP - Rdf API for PHP V0.9.6 - Home - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - -
    -

    -  RDF Logo -  PHP Logo - SourceForge Logo
    -

     

    -

    -


    -

    RAP - RDF API for PHP V0.9.6

    -

    RAP is a software package for parsing, querying, manipulating, serializing - and serving RDF models.
    -
    - Its features include:

    - -

    For further information about RAP see:

    - - -
    -

    Download and Installation

    -
      -
    1. Download the current version from: http://sourceforge.net/projects/rdfapi-php/ -
    2. Unpack the zip file. -
    3. Include RDF API into your scripts: -
        -
      • define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -
      • include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
      • -
      -
    4. Change the constant RDFAPI_INCLUDE_DIR to the directory in which you - have unpacked the zip file.
    5. -
    -

    RAP can be used with PHP 4 or PHP 5.

    -
      -
    • When used with PHP 4 it requires at least version 4.2 -
    • When used with PHP 5 it requires at least version 5.0.1 -
    -

    License

    - -

    Status of the code

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Version Comment Release Date
    V0.9.6RAP_Pubby - a linked data frontend for RAP added.
    - Multiple bugs fixed.
    2008-02-29
    V0.9.5

    New SPARQL query engine added. The new engine is much faster and supports
    - all features - of the W3C SPARQL recommendation.
    - Multiple bugs fixed.
    -

    2007-06-01
    V0.9.4

    SPARQL client library added.
    - RSS parser added.
    - Updated ADODB database abstraction layer to the current version.
    - Unit test suite extended. -
    - Multiple bugs fixed.
    -

    -
    2006-06-26
    V0.9.3

    Support for the SPARQL query language and a subset of SPARQL protocol added.
    - Multiple bugs fixed.
    -

    2006-01-16
    V0.9.2

    Support for Named Graphs and RDF dataset added.
    - Graph visualization modul added.
    - Multiple bugs fixed.
    -

    2005-07-06
    V0.9.1

    GRDDL parser added.
    - Improved RDF/XML namespace handling.
    - Option to create models using RDQL added.
    - RDF DB Utils bugs fixed.
    - Improved common vocabulary support.
    - RSS, FOAF, ATOM vocabularies added.
    -

    2004-12-10
    V0.9

    Resource-centric ResModel API added.
    - Ontology-centric OntModel API added.
    - InfModelF and InfModelB inference engine added.
    - RDF DB Utils added.
    - RAP Unit Test Suite extended.
    -

    -
    2004-10-21
    V0.8.1

    New MemModel indexing speeding up searches.
    - Dynamic script inclusion speeding up many operations.
    - New FindIterator() class added.
    - RAP Unit Test Suite added.
    - Multiple bugs fixed.

    2004-08-24
    V0.8

    RDF server supporting the RDF NetAPI added.
    - RDQL syntax updated according to the W3C - member submission.
    - Multiple bug fixes.

    2004-06-01
    V0.7.1Multiple bugs fixed.
    - Support for XML default namespace (xmlns="uri_namespace").
    2004-03-29
    V0.7

    Improved RDF, N3 and N-Triple parsers and serializers.
    - Support for the "RDF/XML Syntax Specification (Revised) -
    - W3C Working Draft 10 October 2003".
    - RDQLResultIterator added.

    2003-11-19
    V0.6

    Database backend, rdql and n3 support added.
    -

    2003-07-31
    V0.5Parser and model operations are much faster now.
    - Search index and some convenience methods added.
    2003-06-01
    V0.4Support for common vocabularies and StatementIterator - object added.2003-02-20
    V0.3Support for rdf:datatype and rdf:nodeID added.2003-01-13
    V0.2Some bugs fixed.
    - Documentation updated.
    2002-10-08
    V0.1Initial Release.2002-09-24
    -

     

    -

    Contributions

    -

    RAP is an open source project and we highly welcome any kind of useful - external contributions.

    -

    Lots of thanks to

    -
      -
    • Christian Weiske for reimplementing the RAP SPARQL engine and extending it with support for all features from the W3C SPARQL Recommendation
    • -
    • Daniel Westphal for the ResModel- and OntModel-APIs, RDF dataset and the RDF-S/OWL - reasoning support.
    • -
    • Radoslaw Oldakowski for the database backend, the RDQL query engine, improving the RDF/XML-parser, and for the RAP_Pubby
    • -
    • Gunnar AA. Grimnes for the N3 support and the RDF DB Utils package
    • -
    • Phil Dawes for the NetAPI implementation
    • -
    • Tobias Gauß for the MemModel indexing, the unit test suite and the SPARQL engine and client library.
    • -
    • Anton Köstlbacher for the graph visualization.
    • -
    • Lukas Smith, Sören Auer, Leandro Mariano Lopez, Riccardo Catanzani, - Scott Willy for multiple bug reports and fixes.
      -
    • -
    -

    Mailing List

    -

    Please send:

    -

    + general questions about RAP
    - + feature requests
    - + links to interesting RAP use cases

    -

    to the RAP mailing list rdfapi-php-interest@lists.sourceforge.net

    -

    You can subscribe rdfapi-php-interest and scroll through the mailing list archives under http://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest

    - Other feedback can also be send directly to: chris@bizer.de (Chris Bizer) -


    - Bug Tracker

    -

    Please report bugs (maybe together with a patch) to the RAP bug tracker:

    -

    http://sourceforge.net/tracker/?group_id=63257&atid=503361

    -


    - Open issues

    -

    There are some open issues and future ideas which await implementation.
    - So if you want to contribute some code to RAP, our Open Issues list might give you some valuable ideas :-)

    -
    -

    Other RDF tools for PHP

    -
      -
    • Section on PHP in Developers Guide to Semantic Web Toolkits for different Programming Languages -
    • R2D2 RDF to Database too. University Leipzig project implementing the D2RQ relational database to RDF mapping language in PHP. R2D2 allows you to treat legacy databases as RDF graphs and to query these graphs. -
    • pOWL (Sören Auer): Webbased OWL editor and OWL API based on RAP. -
    • appmosphere RDF classes (Benjamin Nowack): Lightweight RDF parser and N-Triples serializer. -
    • SimpleRdfParser (Morten Frederiksen): A wrapper class around the RAP rdf parser, which parses RDF into a simple array. The SimpleRdfParser is faster than the RAP parser because it doesn't use the rest of the RAP library. -
    • Rdfworld.php (Chris Snyder): Rdfworld.php is an RDF to PHP object converter, inspired by Aaron Swartz's TRAMP for Python.
      - It allows PHP developers to convert RDF Resources into PHP objects with appropriate properties. The converter is based on RAP V0.3. -
    • PHP XML Classes (Luis Argerich): XML/RDF package including RDF parser, storage mechanism and RDQL query interface. The RAP rdf parser is an up-to-date version of the rdf parser from this package. Luis' parser and RDQL query engine haven't been changed for 2 years and don't reflect the current RDF specification any more. -
    • rdftp (Vangelis Vassiliadis): rdftp is an RDF server implemented as a PHP script that supports Query and Update operations on RDF content. -
    -
    -

    References

    - -

     

    - - - - -
    - -
    -
     
    - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/manual.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/manual.css.svn-base deleted file mode 100755 index e34086b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/manual.css.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - -h1, h2, h3, h4, h5, h6 { - color : Navy; -} - -.varname { - background-color: #FFB; - font-weight: bold; -} - -.classname { - color: #A00; -} - -.function, .methodname { - color: #0A0; -} - -.navheader, .navfooter { - background-color: #EEF; -} - -.programlisting { - border: 2px solid gray; - border-style: groove; - padding: 2px; - background-color: #e7e7ef; -} - -.screen { - border: 2px solid gray; - border-style: groove; - padding: 5px; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.CSS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.CSS.svn-base deleted file mode 100755 index 1f310dce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.CSS.svn-base +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.dtd.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.dtd.svn-base deleted file mode 100755 index 62c96c8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/phpdoc.dtd.svn-base +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/rdql_grammar.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/rdql_grammar.htm.svn-base deleted file mode 100755 index 9f2ec69c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/rdql_grammar.htm.svn-base +++ /dev/null @@ -1,316 +0,0 @@ - -BNF for RAP's RDQL engine - - - - - -

    RDF API for PHP

    -

    BNF for RAPs RDQL engine

    -

    NON-Terminals

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CompilationUnit -
    ::=
    -
    Query
    CommaOpt -
    ::=
    -
    (,)?
    Query -
    ::=
    -
    SelectClause
    - (SourceClause)?
    - TriplePatternClause
    - (ConstraintClause)?
    - (PrefixesClause)?
    SelectClause -
    ::=
    -
    (SELECT Var (CommaOpt - Var)* | SELECT *")
    SourceClause -
    ::=
    -
    (FROM | SOURCE) QuotedURI
    TriplePatternClause -
    ::=
    -
    WHERE TriplePattern (CommaOpt - TriplePattern)*
    TriplePattern -
    ::=
    -
    ( VarOrURI CommaOpt - VarOrURICommaOpt VarOrUriOrLiteral - )
    ConstraintClause -
    ::=
    -
    AND Expression (, Expression)*
    PrefixesClause -
    ::=
    -
    USING PrefixDecl (CommaOpt - PrefixDecl)*
    PrefixDecl -
    ::=
    -
    Identifier FOR QuotedURI
    Expression -
    ::=
    -
    ConditionalOrExpression
    ConditionalOrExpression -
    ::=
    -
    ConditionalXorExpression (|| - ConditionalXorExpression)*
    ConditionalXorExpression -
    ::=
    -
    ConditionalAndExpression
    ConditionalAndExpression -
    ::=
    -
    ValueLogical (&& ValueLogical)*
    ValueLogical -
    ::=
    -
    StringEqualityExpression
    StringEqualityExpression -
    ::=
    -
    EqualityExpression ((StrEqOp - EqualityExpression) | (RegexMatchOp - RegexPattern))
    StrEqOp -
    ::=
    -
    EQ | NE
    RegexMatchOp -
    ::=
    -
    ~~ | =~ | !~
    RegexPattern -
    ::=
    -
    <REGULAR_EXPRESSION>
    EqualityExpression -
    ::=
    -
    RelationalExpression (EqOp - RelationalExpression)?
    EqOp -
    ::=
    -
    == | !=
    RelationalExpression -
    ::=
    -
    AdditiveExpression (RelOp - AdditiveExpression) ?
    RelOp -
    ::=
    -
    < | <= | > | >=
    AdditiveExpression -
    ::=
    -
    MultiplicativeExpression (AddOp - MultiplicativeExpression)*
    AddOp -
    ::=
    -
    + | -
    MultiplicativeExpression -
    ::=
    -
    UnaryExpression (MulOp - UnaryExpression)*
    MulOp -
    ::=
    -
    * | / | %
    UnaryExpression -
    ::=
    -
    PrimaryExpression | + UnaryExpression - | - UnaryExpression | ! - UnaryExpression
    PrimaryExpression -
    ::=
    -
    Var | Literal | ( Expression - )
    VarOrURI -
    ::=
    -
    Var | QuotedURI
    VarOrUriOrLiteral -
    ::=
    -
    Var | QuotedURI | Literal
    Var -
    ::=
    -
    ? Identifier
    Identifier -
    ::=
    -
    <IDENTIFIER>
    URI -
    ::=
    -
    <URI>
    QuotedURI -
    ::=
    -
    < <URI> >
    Literal -
    ::=
    -
    URI | NumericLiteral - | TextLiteral | BooleanLiteral - | NullLiteral
    NumericLiteral -
    ::=
    -
    <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL>
    TextLiteral -
    ::=
    -
    <STRING_LITERAL> (@ Identifier)? - (^^ URI)?
    BooleanLiteral -
    ::=
    -
    <BOOLEAN_LITERAL>
    NullLiteral -
    ::=
    -
    <NULL_LITERAL>
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/tests.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/tests.html.svn-base deleted file mode 100755 index 2ae7a1ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/.svn/text-base/tests.html.svn-base +++ /dev/null @@ -1,225 +0,0 @@ - - RAP - RDF API for PHP Documentation - - - - - - - - - -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - -
    - -
    -

    Documentation

    - - - - - -
    - - - - - - - - - - - - - - - - - - - -

    Tutorials

      -
    1. Introducion to - RAP
      -
      -
    2. -
    3. Using the statement-centric - Model API
      -

      -
    4. -
    5. Using the resource-centric - ResModel API
      -

      -

    6. -
    7. Using the ontology-centric - OntModel API
      -

    8. -
    9. Using the RDF Dataset API
      -

    10. -
    11. RDQL tutorial
      -

    12. -
    13. Database - Persistence
      -

      -

    14. -
    15. RDF DB Utils tutorial
      -

      -

    16. -
    17. GRDDL Parser

      -

    18. -
    19. Using vocabularies

      -

    20. -
    21. Graph visualization

      -

    22. -
    23. Using the SPARQL Engine

      -

    24. -
    25. SPARQL client

      -

    26. -
    27. RAP_Pubby
    28. -
    -

     

    -

    API Documentation

      -
    1. PHPDoc
    2. -

    Implementation Notes

      -
    1. Database Backend -

    2. -
    3. RDQL Engine
    4. -
    -
    - - - - - - - -
    -

    Usage Examples

    -
      -
    1. Manipulate and Seach MemModel
    2. - -
    3. Traverse MemModel
    4. - -
    5. Using the InfModel
    6. - -
    7. Using the ResModel - -  
    8. -
    9. Using the DatasetMem API - -  
    10. -
    11. Set Operations
    12. - -
    13. Serializer Options
    14. - -
    15. Custom API Test
    16. - -
    17. Set Database Connection
    18. - -
    19. Storing Models in a Database
    20. - -
    21. Manipulate and Seach Database Model
    22. - -
    23. Query a Model using the RDQL Query Language
    24. - -
    25. Custom RDQL Test
    26. - -
    -
    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/database_schema.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/database_schema.html deleted file mode 100755 index f93534f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/database_schema.html +++ /dev/null @@ -1,164 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP

    -

    Database Schema

    -
    RAP uses a denormalized database layout for increased performance.
    -
    -
    -
    -

    Table models

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    modelURIvarcharused at reopening a persistent model
    baseURIvarcharaffects creating of new resources and serialization syntax
    -
    -
    -
    -

    Table statements

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    subjectvarchar, indexed 
    predicatevarchar, indexed 
    objectblob, indexed 
    l_languagevarcharonly if object is a literal, otherwise NULL
    l_datatypevarcharonly if object is a literal, otherwise NULL
    subject_isvarchar(1)flags whether subject is a resource or blankNode
    object_isvarchar(1)flags whether object is a resource, blankNode or literal
    -
    -
    -
    -

    Table namespaces

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    modelIDid-ref, indexed 
    namespacevarchar 
    prefixvarchar 
    - -
    For best performance we recommend joint indexing on subject and predicate.
    -

     

    -

     

    -

    Table datasets

    - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    datasetName varchar  
    defaultModelUrivarchar 
    -


    -
    -

    -

    Table dataset_model

    - - - - - - - - - - - - - - - - - - - - - -
    Column nameTypeComments
    datasetNamevarchar 
    modelIDint 
    graphURIvarchar 
    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/example1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/example1.rdf deleted file mode 100755 index 44d90167..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/example1.rdf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Ora Lassila - lassila@w3.org - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/all-wcprops deleted file mode 100755 index e4d35863..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 57 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/img -END -rdf_metadata_button.gif -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/img/rdf_metadata_button.gif -END -php_logo.gif -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/img/php_logo.gif -END -sflogo.png -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/img/sflogo.png -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/entries deleted file mode 100755 index e0bb285e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/entries +++ /dev/null @@ -1,67 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/img -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2005-07-07T18:03:06.000000Z -240 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -rdf_metadata_button.gif -file - - - - -2008-02-29T14:57:30.729732Z -f59f8d1a8d2aeb9c82678448d23e46f3 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -php_logo.gif -file - - - - -2008-02-29T14:57:30.729732Z -254a716791271979e29f9500305f259f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -sflogo.png -file - - - - -2008-02-29T14:57:30.729732Z -ca002b4053c2cd89d0c2d5cd288874e2 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/php_logo.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/php_logo.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/php_logo.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/rdf_metadata_button.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/rdf_metadata_button.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/rdf_metadata_button.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/sflogo.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/sflogo.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/prop-base/sflogo.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/php_logo.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/php_logo.gif.svn-base deleted file mode 100755 index 7beda43f..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/php_logo.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/rdf_metadata_button.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/rdf_metadata_button.gif.svn-base deleted file mode 100755 index 42b18749..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/rdf_metadata_button.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/sflogo.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/sflogo.png.svn-base deleted file mode 100755 index b49f6ccf..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/.svn/text-base/sflogo.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/php_logo.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/php_logo.gif deleted file mode 100755 index 7beda43f..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/php_logo.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/rdf_metadata_button.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/rdf_metadata_button.gif deleted file mode 100755 index 42b18749..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/rdf_metadata_button.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/sflogo.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/sflogo.png deleted file mode 100755 index b49f6ccf..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/img/sflogo.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/all-wcprops deleted file mode 100755 index 1c3a4083..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 63 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/implNotes -END -database_backend.htm -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/implNotes/database_backend.htm -END -rdql_engine.htm -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/implNotes/rdql_engine.htm -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/entries deleted file mode 100755 index b34aedb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/entries +++ /dev/null @@ -1,54 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/implNotes -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-01-13T09:54:04.000000Z -248 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -database_backend.htm -file - - - - -2008-02-29T14:57:30.573526Z -333c6db14ded4579e86b40d448d9e874 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -rdql_engine.htm -file - - - - -2008-02-29T14:57:30.589147Z -577228a1c7bea98caa9f4ae98d125f28 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/database_backend.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/database_backend.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/database_backend.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/rdql_engine.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/rdql_engine.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/prop-base/rdql_engine.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/database_backend.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/database_backend.htm.svn-base deleted file mode 100755 index 9119487c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/database_backend.htm.svn-base +++ /dev/null @@ -1,143 +0,0 @@ - -Implementation Notes: Database Backend - - - - - -

    RDF API for PHP V0.9.3

    -

    Implementation Notes: Database Backend

    -
    - -

    Radoslaw Oldakowski <radol@gmx.de> -
    - October 2003

    -

     

    -

    This document is meant for developers who are interested in further work on RDF API for PHP. - I will disclose here some implementation issues of the new developed - Database Backend for RAP V0.6. However, my intention is not to describe each - method one by one but to explain some general concepts instead. -

    -

     

    -

    Database Schema

    -

    One of the most fundamental decisions I was faced with as the developer of - the database backend for RAP was the choice of a suitable database schema. Among - various RDF APIs, there are different approaches to storing RDF data in a relational - database stretching from pain layouts, where statements are stored in one table - in a form resembling N-Triples, to highly normalized schemas consisting of several - tables enabling efficient implementation of sophisticated RDF capabilities (cf. - [Beckett - 2003], [Melnik 2001]).

    -

    The goal for RAP's database backend was to provide an optimized for speed, - portable solution that would support all RAP's features and fitt into its internal - structure. Accordingly, the database layout should reflect all these requirements - as well.

    -

    At the beginning I designed a normalized database schema with the main table - rdf_statements which stored only numerical identifiers pointing to the - corresponding entries in tables: rdf_models, rdf_resources, and - rdf_literals. For this database layout I further developed a prototype - of RAP's database backend. Although this solution met all requirements of a - proper normalization, in practice it turned out to be definitely too slow. As - the result of that experience I developed another prototype, this time, using - a denormalized database schema, where all resources and literals were written - in full in table statements. Subsequently, to compare the performance - of both solutions, I did some benchmark tests with two databases: MsAccess 2000 - and MySQL 3.23. These tests resulted in a finding that the simple model was - 2-3 times faster than the explicit model and the advantage was rising with the - increasing number of statements. Moreover, the trade-off between better performance - and increased database size turned out to be acceptable, especially since RAP - mostly targets manipulating medium-sized RDF models (up to 100.000 statements). - After some minor changes and improvements (e.g. joint indexing on subject and - predicate) the denormalized layout has become the final RAP's database schema. - Its description can be found in the database - schema provided with the API documentation.

    -

     

    -

    Internal Structure of RAP's Database Backend

    -

    The core of RAP's database backend is built by two classes: DbStore - and DbModel. The former is used to create, store, list, and retrieve - persited models, whereas the latter provides methods for manipulating these - models. Furthermore RAP V0.8 utilizes ADOdb - Library for PHP V4.52 to connect to multiple databases in a portable manner. -

    -

    Incorporating of the newly developed classes into RDF API for PHP entailed - a reorganization of RAP's class tree (i.e. renaming of the former class Model - to MemModel and creating of the parent class Model) - and moreover required a customization of numerous existing methods. Consequently, - the constructor of class BlankNode was made able to generate unique - identifiers for persisted models as well, and several methods of class MemModel - like: containsAny(), containsAll(), equals(), - unite(), subtract(), intersect(), addModel() - were adapted for receiving both MemModels and DbModels as a parameter.

    -

    In order to work with persisted models, at first, an instance of class DbStore - representing the database has to be created. Given the passed parameters, the - constructor method creates an ADOConnection object which performs - the connection to the database and is responsible for executing SQL statements. - This object is represented by the class internal variable $dbConn. -

    -

    When a method getModel() or getNewModel() is called - on a database object, an instance of DbModel is returned. Every - object representing a persisted model stores four variables. The first two: - $modelURI and $baseURI (inherited from the parent - class Model) can be accessed from outside the object. The remaining - ones: $modelID and $dbConn are private variables. - The former is the database internal identifier for the model. It is used to - avoid SQL joins on tables: statements and models, which results - in increased query performance. The latter is a reference pointer to the ADOConnection - object of the corresponding database object. The binding of a persisted model - to the specific database connection allows us to simultaneously work with various - models stored in multiple databases.

    -

    Note that RDF statements of a persisted model are not loaded into memory while - a DbModel is created. Most of the methods of this class are able - to query and manipulate the triples directly in the database, for example: size(), - add(), remove(), contains(), containsAny(), - find(), rdqlQuery(), replace(), equals(), - addModel(), etc. Delegating some tasks to the database management - system saves server resources and reduces the CPU usage. Only few functions - require all the statements to be loaded into memory for further processing. - These methods are, for instance: saveAs(), unite(), - toStringIncludingTriples(), writeAsHtmlTable(), findRegex(), - etc.

    -

     

    -

    Portability

    -

    One of the great advantages of RAP's database backend is the ability to support - multiple databases. On the other hand the portability has also its price. As - most database vendors practice product lock-in, the fastest way to query a certain - database is to use its proprietary extensions to SQL which are not standardized. - Moreover, even many widespread and very useful features like auto-incrementing - columns or binding variables in an SQL statement are not supported by all databases - (in this case the former has to be emulated by the method _createUniqueModelID() - of class DbStore, the latter unfortunately could not have been - implemented). All of this required writing portable SQL that would perform well - under all conditions.

    -

    Furthermore, handling of data types and indexes is also an area where differences - among various database vendors may occur. Therefore, RAP provides methods automatically - creating tables only for those two databases that have been tested - MsAccess - and MySQL. If you want to use other databases, you will have to create tables - manually according to RAP's abstract database - schema.

    -

     

    -

    Error and Transaction Handling

    -

    RAP's database backend offers an extensive error checking. In the case of public - methods all objects passed as parameters are checked whether or not they are - instances of the desired class. If not, an error message is shown on the screen. - Moreover, the user is informed if an error occurs while connecting to the database - or executing an SQL statement. Furthermore, transactions consisting of several - SQL statements, for instance, creating tables (createTables()), - adding (add()) or deleting an entire model (delete()), - are also being monitored for SQL errors. If an error occurs, the whole transaction - will be rolled back.

    -

    Additionally, the user is also given the possibility to turn the debugging - on, that will display all SQL statements before execution. To activate this - feature you have to edit the script constants.php and set the constant - ADO_DEBUG_MODE to "1", as shown below:

    - - - - - - -
    -

    define("ADODB_DEBUG_MODE", "1");

    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/rdql_engine.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/rdql_engine.htm.svn-base deleted file mode 100755 index a6a8f58a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/.svn/text-base/rdql_engine.htm.svn-base +++ /dev/null @@ -1,583 +0,0 @@ - -Implementation Notes: RDQL Engine - - - - - -

    RDF API for PHP V0.9.3

    -

    Implementation Notes: RDQL Engine

    -
    - -

    Radoslaw Oldakowski <radol@gmx.de> -
    - October 2003

    -

     

    -

    This document is meant for developers who are interested in further work on RDF API for PHP. - I will explain here some general concepts behind the RDQL implementation. - A thorough description of functions and variables used within the RDQL package - can be found in the detailed method reference. - For a more profound understanding of every single part of the query execution - consult the commented source code.

    -

     

    -

    Contents

    - - - - - - - - - - - - - - - - - - -
    1.Introduction
    2.Query Parser
    3.RDQL Memory Engine
    4.RDQL Database Engine
    -

     

    -

    1. Introduction

    -

    The execution of an RDQL query in RDF API for PHP V0.8 consists of four main - steps. At first, the query string is parsed into an in-memory structure represented - - by a PHP array using the class RdqlParser. Subsequently, depending - on the storage mechanism of the model the query is performed on, this array - - is passed to the corresponding engine (RdqlMemEngine for MemModels and RdqlDbEngine - for DbModels). In the second step, the query engine searches for triples matching - - all patterns from the WHERE clause of the RDQL query and returns - a set of variable bindings. Next, this result set is filtered by evaluating - - Boolean expressions specified in the AND clause. The last step - is the processing of the final result, i.e. creating of RAP objects (Resource, - BlankNode, Literal) or their plain text serialization - as values of the query variables, according to the desired format. In case - of - the former, the returned objects can be used for model update or other API - calls, or simply printed out using the method writeQueryResultsAsHtmlTable() - of class RdqlEngine.

    -

     

    -

    2. Query Parser

    -

    Although there had already been an RDQL parser written in PHP [PHPxmlClasses] - available, it did not meet all requirements of RAP's RDQL grammar. Hence, I - have decided to develop a completely new parser from scratch.

    -

    The output of the RDQL parser used in RDF API for PHP V0.8 is a multi-dimensional - array (described in Figure 1) representing every clause - of the parsed query. In this section I will briefly explain how this structure - is generated.

    - - - - - - -
    -

    array ['selectVars'][] = ?VARNAME
    -
    -       ['sources'][]{['value']} = URI | QName
    -                    {['is_qname'] = boolean}
    -       ['patterns'][]['subject']['value'] = VARorURI
    -                               - {['is_qname'] = boolean}
    -                     - ['predicate']['value'] = VARorURI
    -                                 - {['is_qname'] = boolean}
    -                     - ['object']['value'] = VARorURIorLiterl
    -                              - {['is_qname'] = boolean}
    -                               - ['is_literal'] = boolean
    -                               - ['l_lang'] = string
    -                               - ['l_dtype'] = string
    -                              - {['l_dtype_is_qname'] = boolean}
    -       ['filters'][]['string'] = string
    -                    - ['evalFilterStr'] = string
    -                    - ['reqexEqExprs'][]['var'] = ?VARNAME
    -                                      - ['operator'] = (eq | ne)
    -                                      - ['regex'] = string
    -                    - ['strEqExprs'][]['var'] = ?VARNAME
    -                                    - ['operator'] = (eq | ne)
    -                                    - ['value'] = string
    -                                    - ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal')
    -                                    - ['value_lang'] = string
    -                                    - ['value_dtype'] = string
    -                                   - {['value_dtype_is_qname'] = boolean}
    -                    - ['numExpr']['vars'][] = ?VARNAME
    -      {['ns'][PREFIX] = NAMESPACE}

    -
    - - - - - -
    Figure 1: -
    An abstract description of the PHP array representing - an RDQL query produced by RAP's RDQL parser ( [ ] stands for an integer - - index 0..N, {} are only used within the parser class and are not passed - to the query engine).
    -
    -

    After the query string has been passed to the method parseQuery() - called on an object RdqlParser, the function removeComments() - is used by the parser to clear all comments. Subsequently, the string is divided - into small tokens (tokenize()). Each token is either a special - character (e.g. '(' , ',' , ' ') or a - character string (e.g. ?variable) saved in the class internal variable - $tokens of type array. Parsing is nothing but analyzing these tokens - one by one, in the order of their appearance in the query string.

    -

    The process is initiated by the method parseSelect() which recognizes - tokens representing query variables from the SELECT clause and - stores them in the array $parsedQuery['selectVars'] (according - to Figure1). When this function encounters a token holding - the keyword introducing a subsequent clause of the RDQL query (i.e. FROM - / SOURCE or WHERE) the next method parseFrom() - or parseWhere() is called respectively.

    -

    As explained in the RDQL tutorial, - there is no need to specify the source while calling the method rdqlQuery() - on an active object MemModel or DbModel. However, - RAP's RdqlParser is able to parse the FROM clause and can be used, - for instance, together with the RDQL engine to carry out a query on multiple - documents specified by URLs, as shown in example 1.

    - - - - - - -
    -

    // Some RDQL query with two input documents
    - $query = '
    - SELECT *
    - FROM <http://example.org/doc1.rdf>, <http://somewhere.edu/doc2.rdf>
    - WHERE (?x, vcard:FN, ?z)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>';

    -

    // Create the parser object and parse the query string
    - $parser = new RdqlParser();
    - $parsedQuery = $parser->parseQuery($query);

    -

    // Create a new RDQL engine for models stored in memory
    - $rdqlMemEngine = new RdqlMemEngine();

    -

    // Set the variable for the merged query result
    - $mergedResult = array();

    -

    // Iterate through all sources specified in the FROM clause
    - foreach ($parsedQuery['sources'] as $url) {

    -

       // Load each document into a memory Model
    -    $model = new MemModel();
    -    $model->load($url);
    -
    -    // Execute the RDQL query on the Model just created
    -    $queryResult = $rdqlMemEngine->queryModel($model, $parsedQuery);

    -

       // Merge all query results
    -    $mergedResult = array_merge($mergedResult, $queryResult);
    - }

    -

    // Print the merged result of the query on multiple documents
    - RdqlEngine::writeQueryResultAsHtmlTable($mergedResult);

    -
    - - - - - -
    Example 1: -
    RDQL query on multiple documents.
    -
    -

    When the parsing of the SELECT and FROM clauses is - completed, the method parseWhere() is called as next and all patterns - are transformed into the array $parsedQuery['patterns'] (see Figure - 1). If the object of a pattern is a literal, additional information about - its language and datatype is recorded. A token indicating the beginning of the - AND or the USING clause causes the corresponding method - parseAnd() or parseUsing() to be called.

    -

    The processing of query filters - is one of the most complex tasks the RdqlParser has to accomplish. In the AND - clause the tokens of each filter are combined to form a complete filter string - in order to examine the filter as a whole. At first, the parser searches inside - - the string for regular - expression patterns (e.g. ?x ~~ "/\.html$/i") and - serializes their corresponding parts into the array described in Figure - 1 (in this example: ['var'] = ?x, ['operator'] = - 'eq', - ['regex'] = '/\.html$/i'). Additionally, it replaces each pattern - inside the original filter string (['string']) with a placeholder - (i.e. ##RegEx_$i## where $i is a numerical index) - and stores this transformed string in the array (['evalFilterStr']). - Subsequently, the parser looks for three different kinds of string equality - - expressions in the form of ?variable (eq | ne) VALUE, where VALUE - can be: ?variable, <uri> or "literal"@lang^^<datatypeURI>. - Similarly, in this case, all parts of an expression are serialized into the - - array (see Figure 1) and each expression inside the - already once transformed filter (['evalFilterStr']) is replaced - with a placeholder (i.e. ##strEqExpr_$i##). The processed filter - string now only contains numerical expressions and placeholders (e.g. ?x > - 5 && ##strEqExpr_0##). Finally the parser finds all variables - of the numerical expressions and stores them in the array as well.

    -

    Given this structure saved in an array, the RDL query engine will be able to - determine the Boolean value of each single regex and string equality - expression for a certain set of variable bindings, replace the corresponding - placeholders, and insert the values of numerical variables. An example filter - string representation for a query result to be filtered might be: (7 > - 5 && TRUE). After having evaluated this condition, the query - engine will accept this particular set of variable bindings.

    -

    If all filters have been parsed and the query contains a USING - clause, the method parseUsing() is called. It writes all prefixes - with their corresponding namespaces into the array described in Figure - 1. However, this part of the array will not be returned by the parser but - will be only used internally to replace prefixes used in the WHERE - and AND clause. All URIs contained in the in-memory representation - of the parsed query passed to the query engine will be therefore stored in full.

    -

    An advantageous and helpful feature of RAP's RdqlParser worth mentioning is - its extensive error checking. The parser is not only able to find a syntax error, - but moreover to return a message pointing to the spot in the query where the - error occurred. This is even more important since there exist several syntactically - different RDQL implementations. Example 2 presents some - RDQL clauses containing syntax errors and the corresponding error message returned - by the parser.

    - - - - - - -
    -

    SELECT ?city, ?givenN@me, ?age

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the SELECT clause: '?givenN@me' variable name contains - illegal characters

    -
    -

    - - - - - - -
    -

    WHERE (?x, ?y, "some Literal"), (<http://www.example.org, - ?a, ?b)

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the WHERE clause: '<http://www.example.org,' - illegal - input: ',' - '>' missing

    -
    -

    - - - - - - -
    -

    AND ?x ~~ /\.thml$/

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the AND clause: '?x ~~ /\.thml$/ ' - regular expressions - must be quoted

    -
    - -

    - - - - - - -
    -

    USING ?dc FOR <http://www.purl.org/dc/elements/1.1/>

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the USING clause: '?dc' - illegal input, namespace prefix - expected

    -
    - - - - - - -
    Example 2: -
    Error messages returned by the RDQL parser.
    -
    -

     

    -

    3. RDQL Memory Engine

    -

    If an RDQL query is performed on an in-memory model, an instance of the object - RdqlMemEngine has to be created. The query execution is initiated - by calling the method queryModel() with two parameters being passed - by reference: the object MemModel itself and the array representation - of the query, generated by the RdqlParser.

    -

    The RdqlMemEngine begins the execution of a query with searching for tuples - matching all patterns specified in the WHERE clause, by calling - the corresponding method findTuplesMatchingAllPatterns(). This - process is divided into a sequence of two steps carried out in a loop. Initially - the result for one single pattern is found (findTuplesMatchingOnePattern()). - Subsequently, it is joined with the set of tuples matching the previously examined - patterns (joinTuples()).

    -

    The execution of both steps is rather complex. In the case of the first one, - the RdqlMemEngine analyzes all parts of the statement pattern (subject, predicate, - object) and additionally determines internal bindings (e.g. ?x, <uri>, - ?x). Given all the information, the method findTriplesMatchingPattern() - searches the queried model for statements fitting into the pattern also considering - the nuances of the RDQL specification. The result of this function is then converted - into an array holding variable bindings that represents a set of tuples matching - one pattern.

    -

    The join operation performed on two result sets is nothing else than a PHP - implementation of the SQL-like Inner Join. Furthermore, applying it within the - loop (compared to the approach where the results for each pattern are first - determined and then joined altogether) enables the engine to significantly reduce - memory consumption.

    -

    In this way the query engine has found all tuples matching the patterns from - the WHERE clause. If the RDQL query being processed additionally - contains filter expressions (AND clause), the result set determined - so far is passed to the method filterTuples(). This function, taken - one by one for each tuple, substitutes the placeholders inside the filter string - with the Boolean values of the evaluated filter regex and string equality - expressions; subsequently it inserts the values of the numerical variables and - evaluates the entire filter string as a PHP expression .

    -

    For a better understanding I will explain the filtering process with an example. - Consider the tuple consisting of two variable bindings: ?age = 26, - ?name = "Radoslaw" and the AND clause of - an RDQL query: (?age < 25) && (?name eq "Radoslaw"). - The in-memory representation of this particular filter returned by the RdqlParser - is shown in Example 3 (compare to Figure - 1).

    - - - - - - -
    -

    array ['filters'][0]['string'] = '(?age < 25) && (?name - == "Radoslaw")'
    -                     - ['evalFilterStr'] = '(?age < 25) && (##strEqExpr_0##)'
    -                     - ['strEqExprs'][0]['var'] = ?name
    -                                      - ['operator'] = 'eq'
    -                                      - ['value'] = 'Radoslaw'
    -                                      - ['value_type'] = 'Literal'
    -                                      - ['value_lang'] = NULL
    -                                      - ['value_dtype'] = NULL
    -                     - ['numExpr']['vars'][0] = ?age

    -
    - - - - - -
    Example 3: -
    The in-memory representation of the AND clause:
    -
    (?age < 30) && (?name eq "Radoslaw").
    -
    -
    -

    Given the structure described in Example 3, the query - engine at first evaluates the string equality expression by checking if the - value of the variable ?name (i.e. "Radoslaw") - is a literal with the label equal "Radoslaw" and no specified language - or datatype. In this case it is one, so the query engine replaces the placeholder - (i.e. ##strEqExpr_0##) with TRUE, what results in - the filter string: (?age < 25) && (TRUE). Next, the - query engine inserts the value of the numerical variable ?age and - determines the Boolean value of the whole filter (26 < 25) && - (TRUE). In this example the output is FALSE ( (26 - < 25) && (TRUE) => (FALSE) && (TRUE) = FALSE ); - consequently this particular tuple will be removed from the final result.

    -

    This was just an example of a very simple filter. RAP RDQL query engine is - able to handle much more complex AND clauses consisting of several - filters where each of them can be built of different kinds of expressions combined - together by using logical operators. Even the process of evaluating one single - string equality expression becomes more complicated if the literal has specified - datatype and language.

    -

    In the last step, after having filtered all tuples, the query engine removes - the filter variables (which have not been specified in the SELECT - clause) from the result set. Since the engine has been working with RAP objects - all the time, it can now return the final query result with no further processing, - unless the parameter $returnNodes passed to the object RdqlMemEngine - has been set to FALSE. In this case the values of all query variables - are still to be serialized to string.

    -

     

    -

    4. RDQL Database Engine

    -

    Similarly to the case of a MemModel, an RDQL query performed on a persistent - model (DbModel) is initiated by calling the method queryModel() - on an object RdqlDbEngine with two parameters being passed by reference: - the DbModel itself and the in-memory representation of the parsed query. Though, - from this point on the internal execution of the query takes a different course. - The searching for tuples matching all patterns from the WHERE clause - is this time delegated to the database management system. Moreover instead of - calling the database for the result set matching each single pattern and then - joining them in memory, the RdqlDbEngine translates almost the entire RDQL query - into an SQL statement and sends it to the database for execution. This approach - enables the machine to use the database indexing and optimization capabilities.

    -

    The algorithm used for the query rewriting is relatively simple. Every single - statement pattern is treated as a separate virtual database table (statements). - If the subject, predicate, or object of each pattern is a URI or a literal, - it is bound to its value. Otherwise, in the case that it is a variable, an identity - relationship between all occurrences of this variable is created. The variables - to be returned are indicated in the SELECT clause of the SQL statement - being generated.

    -

    Example 4 provides a sample RDQL query and its corresponding - translation into SQL produced by the RdqlDbEngine. The first two lines in the - SELECT clause of the SQL statement describe the variable ?someone. - Due to its mapping to the subject (of the first triple), it can either be a - resource or a Blank Node. To find this out we need to know the value of the - corresponding table column (subject_is). In the case of the next variable - ?name mapped to the object of the second triple, it can additionally - be a literal as well, so that the information about its language and datatype - must also be returned. The FROM clause indicates three virtual - tables (statements) each representing a pattern of the RDQL query. In - the WHERE clause of the SQL statement there are constraints specified - for every part of a triple. Respectively, the subject in the first table (s1.subject) - representing the variable ?someone is bound to the subject in the - second table (s2.subject) holding the same variable; the predicate - (s1.predicate) and object (s1.object) are equated - to the string they are supposed to match. Since RAP supports storing of multiple - models in a database, each pattern has to be bound to the modelID - of the model the query is performed on. Note that variables ?name - and ?y occur only once so that they are not constrained by any - binding and can therefore match anything. Furthermore, the value of the variable - ?name must be returned by the database even if it is not specified - in the SELECT clause of the RDQL query. It will be needed to evaluate - the filter expressions (?name EQ "Brian" || ?name EQ "Carl"), - which will be carried out in main memory. However, this variable will only be - used internally within the RdqlQueryEngine and will not be included in the returned - final result set.

    -RDQL query: - - - - - - -
    -

    SELECT ?someone, ?name
    - WHERE (?someone, <http://ex.org/vocab/isFirendOf>, <http://ex.org/John>),
    -       (?someone, <http://ex.org/vocab/name>, ?name),
    -       (?someone, ?y, "35"^^http://www.w3.org/2001/XMLSchema#integer)
    - AND (?name EQ "Brian" || ?name EQ "Carl")

    -
    -
    The corresponding SQL-Statement: - - - - - - -
    -

    SELECT s1.subject as _someone ,
    -        s1.subject_is ,

    -

    -        s2.object as _name ,
    -        s2.object_is ,
    -        s2.l_language ,
    -        s2.l_datatype

    -

    FROM statements s1 ,
    -      statements s2 ,
    -      statements s3

    -

    WHERE s1.modelID=39
    - AND s1.subject=s2.subject
    - AND s1.predicate='http://ex.org/vocab/isFirendOf'
    - AND s1.object='http://ex.org/John'

    -

    AND s2.modelID=39
    - AND s2.subject=s3.subject
    - AND s2.predicate='http://ex.org/vocab/name'

    -

    AND s3.modelID=39
    - AND s3.object='35'
    - AND s3.object_is='l'
    - AND s3.l_datatype='http://www.w3.org/2001/XMLSchema#integer

    -
    - - - - - -
    Example 4: -
    An example query and its corresponding SQL translation. -
    -
    -

    The technique used for the query rewriting is very similar to Matt Biddulp's - algorithm for translating rdfDB-style queries into SQL ([Biddulph - 2002], [Miller 2002]). - It has been extended in order to - additionally retrieve variable bindings for filter variables used in the AND - clause of an RDQL query and adapted to RAP's database layout.

    -

    RdqlDbEngine uses ADOdb abstraction - layer for SQL query execution. Thus, the result of every successful database - query is returned in the form of an object ADORecordSet holding - the found database records in the form of an array, where the values of each - single record field are associated with integer keys. However, because of the - fact that SQL statements are generated dynamically, the mapping of these indexes - to the query variables is different for every RDQL query. Fortunately, RdqlDbEngine - provides a solution to this problem: while generating an SQL statement it associates - each RDQL query variable with the corresponding index of the ADORecordSet->fields - array. This information is stored in the class private variable $rsIndexes. - This approach allows the query engine to emulate indexing by variable name while - retrieving SQL query results.

    -

    The filtering of the tuples matching all patterns specified in the WHERE - clause of the RDQL query is carried out in memory. The process is very similar - to the one performed by the RdqlMemEngine with the major difference being that - the RdqlDbEngine does not operate on RAP objects (Resource, Literal, - BlankNode), but on the object ADORecordSet returned - by the database. Finally in the last step the values of the variable bindings - have to be converted either to RAP objects or to their string serialization - according to the desired format of the RDQL query result set.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/database_backend.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/database_backend.htm deleted file mode 100755 index 58db35ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/database_backend.htm +++ /dev/null @@ -1,143 +0,0 @@ - -Implementation Notes: Database Backend - - - - - -

    RDF API for PHP V0.9.3

    -

    Implementation Notes: Database Backend

    -
    - -

    Radoslaw Oldakowski <radol@gmx.de> -
    - October 2003

    -

     

    -

    This document is meant for developers who are interested in further work on RDF API for PHP. - I will disclose here some implementation issues of the new developed - Database Backend for RAP V0.6. However, my intention is not to describe each - method one by one but to explain some general concepts instead. -

    -

     

    -

    Database Schema

    -

    One of the most fundamental decisions I was faced with as the developer of - the database backend for RAP was the choice of a suitable database schema. Among - various RDF APIs, there are different approaches to storing RDF data in a relational - database stretching from pain layouts, where statements are stored in one table - in a form resembling N-Triples, to highly normalized schemas consisting of several - tables enabling efficient implementation of sophisticated RDF capabilities (cf. - [Beckett - 2003], [Melnik 2001]).

    -

    The goal for RAP's database backend was to provide an optimized for speed, - portable solution that would support all RAP's features and fitt into its internal - structure. Accordingly, the database layout should reflect all these requirements - as well.

    -

    At the beginning I designed a normalized database schema with the main table - rdf_statements which stored only numerical identifiers pointing to the - corresponding entries in tables: rdf_models, rdf_resources, and - rdf_literals. For this database layout I further developed a prototype - of RAP's database backend. Although this solution met all requirements of a - proper normalization, in practice it turned out to be definitely too slow. As - the result of that experience I developed another prototype, this time, using - a denormalized database schema, where all resources and literals were written - in full in table statements. Subsequently, to compare the performance - of both solutions, I did some benchmark tests with two databases: MsAccess 2000 - and MySQL 3.23. These tests resulted in a finding that the simple model was - 2-3 times faster than the explicit model and the advantage was rising with the - increasing number of statements. Moreover, the trade-off between better performance - and increased database size turned out to be acceptable, especially since RAP - mostly targets manipulating medium-sized RDF models (up to 100.000 statements). - After some minor changes and improvements (e.g. joint indexing on subject and - predicate) the denormalized layout has become the final RAP's database schema. - Its description can be found in the database - schema provided with the API documentation.

    -

     

    -

    Internal Structure of RAP's Database Backend

    -

    The core of RAP's database backend is built by two classes: DbStore - and DbModel. The former is used to create, store, list, and retrieve - persited models, whereas the latter provides methods for manipulating these - models. Furthermore RAP V0.8 utilizes ADOdb - Library for PHP V4.52 to connect to multiple databases in a portable manner. -

    -

    Incorporating of the newly developed classes into RDF API for PHP entailed - a reorganization of RAP's class tree (i.e. renaming of the former class Model - to MemModel and creating of the parent class Model) - and moreover required a customization of numerous existing methods. Consequently, - the constructor of class BlankNode was made able to generate unique - identifiers for persisted models as well, and several methods of class MemModel - like: containsAny(), containsAll(), equals(), - unite(), subtract(), intersect(), addModel() - were adapted for receiving both MemModels and DbModels as a parameter.

    -

    In order to work with persisted models, at first, an instance of class DbStore - representing the database has to be created. Given the passed parameters, the - constructor method creates an ADOConnection object which performs - the connection to the database and is responsible for executing SQL statements. - This object is represented by the class internal variable $dbConn. -

    -

    When a method getModel() or getNewModel() is called - on a database object, an instance of DbModel is returned. Every - object representing a persisted model stores four variables. The first two: - $modelURI and $baseURI (inherited from the parent - class Model) can be accessed from outside the object. The remaining - ones: $modelID and $dbConn are private variables. - The former is the database internal identifier for the model. It is used to - avoid SQL joins on tables: statements and models, which results - in increased query performance. The latter is a reference pointer to the ADOConnection - object of the corresponding database object. The binding of a persisted model - to the specific database connection allows us to simultaneously work with various - models stored in multiple databases.

    -

    Note that RDF statements of a persisted model are not loaded into memory while - a DbModel is created. Most of the methods of this class are able - to query and manipulate the triples directly in the database, for example: size(), - add(), remove(), contains(), containsAny(), - find(), rdqlQuery(), replace(), equals(), - addModel(), etc. Delegating some tasks to the database management - system saves server resources and reduces the CPU usage. Only few functions - require all the statements to be loaded into memory for further processing. - These methods are, for instance: saveAs(), unite(), - toStringIncludingTriples(), writeAsHtmlTable(), findRegex(), - etc.

    -

     

    -

    Portability

    -

    One of the great advantages of RAP's database backend is the ability to support - multiple databases. On the other hand the portability has also its price. As - most database vendors practice product lock-in, the fastest way to query a certain - database is to use its proprietary extensions to SQL which are not standardized. - Moreover, even many widespread and very useful features like auto-incrementing - columns or binding variables in an SQL statement are not supported by all databases - (in this case the former has to be emulated by the method _createUniqueModelID() - of class DbStore, the latter unfortunately could not have been - implemented). All of this required writing portable SQL that would perform well - under all conditions.

    -

    Furthermore, handling of data types and indexes is also an area where differences - among various database vendors may occur. Therefore, RAP provides methods automatically - creating tables only for those two databases that have been tested - MsAccess - and MySQL. If you want to use other databases, you will have to create tables - manually according to RAP's abstract database - schema.

    -

     

    -

    Error and Transaction Handling

    -

    RAP's database backend offers an extensive error checking. In the case of public - methods all objects passed as parameters are checked whether or not they are - instances of the desired class. If not, an error message is shown on the screen. - Moreover, the user is informed if an error occurs while connecting to the database - or executing an SQL statement. Furthermore, transactions consisting of several - SQL statements, for instance, creating tables (createTables()), - adding (add()) or deleting an entire model (delete()), - are also being monitored for SQL errors. If an error occurs, the whole transaction - will be rolled back.

    -

    Additionally, the user is also given the possibility to turn the debugging - on, that will display all SQL statements before execution. To activate this - feature you have to edit the script constants.php and set the constant - ADO_DEBUG_MODE to "1", as shown below:

    - - - - - - -
    -

    define("ADODB_DEBUG_MODE", "1");

    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/rdql_engine.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/rdql_engine.htm deleted file mode 100755 index d87a5b12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/implNotes/rdql_engine.htm +++ /dev/null @@ -1,583 +0,0 @@ - -Implementation Notes: RDQL Engine - - - - - -

    RDF API for PHP V0.9.3

    -

    Implementation Notes: RDQL Engine

    -
    - -

    Radoslaw Oldakowski <radol@gmx.de> -
    - October 2003

    -

     

    -

    This document is meant for developers who are interested in further work on RDF API for PHP. - I will explain here some general concepts behind the RDQL implementation. - A thorough description of functions and variables used within the RDQL package - can be found in the detailed method reference. - For a more profound understanding of every single part of the query execution - consult the commented source code.

    -

     

    -

    Contents

    - - - - - - - - - - - - - - - - - - -
    1.Introduction
    2.Query Parser
    3.RDQL Memory Engine
    4.RDQL Database Engine
    -

     

    -

    1. Introduction

    -

    The execution of an RDQL query in RDF API for PHP V0.8 consists of four main - steps. At first, the query string is parsed into an in-memory structure represented - - by a PHP array using the class RdqlParser. Subsequently, depending - on the storage mechanism of the model the query is performed on, this array - - is passed to the corresponding engine (RdqlMemEngine for MemModels and RdqlDbEngine - for DbModels). In the second step, the query engine searches for triples matching - - all patterns from the WHERE clause of the RDQL query and returns - a set of variable bindings. Next, this result set is filtered by evaluating - - Boolean expressions specified in the AND clause. The last step - is the processing of the final result, i.e. creating of RAP objects (Resource, - BlankNode, Literal) or their plain text serialization - as values of the query variables, according to the desired format. In case - of - the former, the returned objects can be used for model update or other API - calls, or simply printed out using the method writeQueryResultsAsHtmlTable() - of class RdqlEngine.

    -

     

    -

    2. Query Parser

    -

    Although there had already been an RDQL parser written in PHP [PHPxmlClasses] - available, it did not meet all requirements of RAP's RDQL grammar. Hence, I - have decided to develop a completely new parser from scratch.

    -

    The output of the RDQL parser used in RDF API for PHP V0.8 is a multi-dimensional - array (described in Figure 1) representing every clause - of the parsed query. In this section I will briefly explain how this structure - is generated.

    - - - - - - -
    -

    array ['selectVars'][] = ?VARNAME
    -
    -       ['sources'][]{['value']} = URI | QName
    -                    {['is_qname'] = boolean}
    -       ['patterns'][]['subject']['value'] = VARorURI
    -                               - {['is_qname'] = boolean}
    -                     - ['predicate']['value'] = VARorURI
    -                                 - {['is_qname'] = boolean}
    -                     - ['object']['value'] = VARorURIorLiterl
    -                              - {['is_qname'] = boolean}
    -                               - ['is_literal'] = boolean
    -                               - ['l_lang'] = string
    -                               - ['l_dtype'] = string
    -                              - {['l_dtype_is_qname'] = boolean}
    -       ['filters'][]['string'] = string
    -                    - ['evalFilterStr'] = string
    -                    - ['reqexEqExprs'][]['var'] = ?VARNAME
    -                                      - ['operator'] = (eq | ne)
    -                                      - ['regex'] = string
    -                    - ['strEqExprs'][]['var'] = ?VARNAME
    -                                    - ['operator'] = (eq | ne)
    -                                    - ['value'] = string
    -                                    - ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal')
    -                                    - ['value_lang'] = string
    -                                    - ['value_dtype'] = string
    -                                   - {['value_dtype_is_qname'] = boolean}
    -                    - ['numExpr']['vars'][] = ?VARNAME
    -      {['ns'][PREFIX] = NAMESPACE}

    -
    - - - - - -
    Figure 1: -
    An abstract description of the PHP array representing - an RDQL query produced by RAP's RDQL parser ( [ ] stands for an integer - - index 0..N, {} are only used within the parser class and are not passed - to the query engine).
    -
    -

    After the query string has been passed to the method parseQuery() - called on an object RdqlParser, the function removeComments() - is used by the parser to clear all comments. Subsequently, the string is divided - into small tokens (tokenize()). Each token is either a special - character (e.g. '(' , ',' , ' ') or a - character string (e.g. ?variable) saved in the class internal variable - $tokens of type array. Parsing is nothing but analyzing these tokens - one by one, in the order of their appearance in the query string.

    -

    The process is initiated by the method parseSelect() which recognizes - tokens representing query variables from the SELECT clause and - stores them in the array $parsedQuery['selectVars'] (according - to Figure1). When this function encounters a token holding - the keyword introducing a subsequent clause of the RDQL query (i.e. FROM - / SOURCE or WHERE) the next method parseFrom() - or parseWhere() is called respectively.

    -

    As explained in the RDQL tutorial, - there is no need to specify the source while calling the method rdqlQuery() - on an active object MemModel or DbModel. However, - RAP's RdqlParser is able to parse the FROM clause and can be used, - for instance, together with the RDQL engine to carry out a query on multiple - documents specified by URLs, as shown in example 1.

    - - - - - - -
    -

    // Some RDQL query with two input documents
    - $query = '
    - SELECT *
    - FROM <http://example.org/doc1.rdf>, <http://somewhere.edu/doc2.rdf>
    - WHERE (?x, vcard:FN, ?z)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>';

    -

    // Create the parser object and parse the query string
    - $parser = new RdqlParser();
    - $parsedQuery = $parser->parseQuery($query);

    -

    // Create a new RDQL engine for models stored in memory
    - $rdqlMemEngine = new RdqlMemEngine();

    -

    // Set the variable for the merged query result
    - $mergedResult = array();

    -

    // Iterate through all sources specified in the FROM clause
    - foreach ($parsedQuery['sources'] as $url) {

    -

       // Load each document into a memory Model
    -    $model = new MemModel();
    -    $model->load($url);
    -
    -    // Execute the RDQL query on the Model just created
    -    $queryResult = $rdqlMemEngine->queryModel($model, $parsedQuery);

    -

       // Merge all query results
    -    $mergedResult = array_merge($mergedResult, $queryResult);
    - }

    -

    // Print the merged result of the query on multiple documents
    - RdqlEngine::writeQueryResultAsHtmlTable($mergedResult);

    -
    - - - - - -
    Example 1: -
    RDQL query on multiple documents.
    -
    -

    When the parsing of the SELECT and FROM clauses is - completed, the method parseWhere() is called as next and all patterns - are transformed into the array $parsedQuery['patterns'] (see Figure - 1). If the object of a pattern is a literal, additional information about - its language and datatype is recorded. A token indicating the beginning of the - AND or the USING clause causes the corresponding method - parseAnd() or parseUsing() to be called.

    -

    The processing of query filters - is one of the most complex tasks the RdqlParser has to accomplish. In the AND - clause the tokens of each filter are combined to form a complete filter string - in order to examine the filter as a whole. At first, the parser searches inside - - the string for regular - expression patterns (e.g. ?x ~~ "/\.html$/i") and - serializes their corresponding parts into the array described in Figure - 1 (in this example: ['var'] = ?x, ['operator'] = - 'eq', - ['regex'] = '/\.html$/i'). Additionally, it replaces each pattern - inside the original filter string (['string']) with a placeholder - (i.e. ##RegEx_$i## where $i is a numerical index) - and stores this transformed string in the array (['evalFilterStr']). - Subsequently, the parser looks for three different kinds of string equality - - expressions in the form of ?variable (eq | ne) VALUE, where VALUE - can be: ?variable, <uri> or "literal"@lang^^<datatypeURI>. - Similarly, in this case, all parts of an expression are serialized into the - - array (see Figure 1) and each expression inside the - already once transformed filter (['evalFilterStr']) is replaced - with a placeholder (i.e. ##strEqExpr_$i##). The processed filter - string now only contains numerical expressions and placeholders (e.g. ?x > - 5 && ##strEqExpr_0##). Finally the parser finds all variables - of the numerical expressions and stores them in the array as well.

    -

    Given this structure saved in an array, the RDL query engine will be able to - determine the Boolean value of each single regex and string equality - expression for a certain set of variable bindings, replace the corresponding - placeholders, and insert the values of numerical variables. An example filter - string representation for a query result to be filtered might be: (7 > - 5 && TRUE). After having evaluated this condition, the query - engine will accept this particular set of variable bindings.

    -

    If all filters have been parsed and the query contains a USING - clause, the method parseUsing() is called. It writes all prefixes - with their corresponding namespaces into the array described in Figure - 1. However, this part of the array will not be returned by the parser but - will be only used internally to replace prefixes used in the WHERE - and AND clause. All URIs contained in the in-memory representation - of the parsed query passed to the query engine will be therefore stored in full.

    -

    An advantageous and helpful feature of RAP's RdqlParser worth mentioning is - its extensive error checking. The parser is not only able to find a syntax error, - but moreover to return a message pointing to the spot in the query where the - error occurred. This is even more important since there exist several syntactically - different RDQL implementations. Example 2 presents some - RDQL clauses containing syntax errors and the corresponding error message returned - by the parser.

    - - - - - - -
    -

    SELECT ?city, ?givenN@me, ?age

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the SELECT clause: '?givenN@me' variable name contains - illegal characters

    -
    -

    - - - - - - -
    -

    WHERE (?x, ?y, "some Literal"), (<http://www.example.org, - ?a, ?b)

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the WHERE clause: '<http://www.example.org,' - illegal - input: ',' - '>' missing

    -
    -

    - - - - - - -
    -

    AND ?x ~~ /\.thml$/

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the AND clause: '?x ~~ /\.thml$/ ' - regular expressions - must be quoted

    -
    - -

    - - - - - - -
    -

    USING ?dc FOR <http://www.purl.org/dc/elements/1.1/>

    -
    -
    Output: - - - - - - -
    -

    RDQL error in the USING clause: '?dc' - illegal input, namespace prefix - expected

    -
    - - - - - - -
    Example 2: -
    Error messages returned by the RDQL parser.
    -
    -

     

    -

    3. RDQL Memory Engine

    -

    If an RDQL query is performed on an in-memory model, an instance of the object - RdqlMemEngine has to be created. The query execution is initiated - by calling the method queryModel() with two parameters being passed - by reference: the object MemModel itself and the array representation - of the query, generated by the RdqlParser.

    -

    The RdqlMemEngine begins the execution of a query with searching for tuples - matching all patterns specified in the WHERE clause, by calling - the corresponding method findTuplesMatchingAllPatterns(). This - process is divided into a sequence of two steps carried out in a loop. Initially - the result for one single pattern is found (findTuplesMatchingOnePattern()). - Subsequently, it is joined with the set of tuples matching the previously examined - patterns (joinTuples()).

    -

    The execution of both steps is rather complex. In the case of the first one, - the RdqlMemEngine analyzes all parts of the statement pattern (subject, predicate, - object) and additionally determines internal bindings (e.g. ?x, <uri>, - ?x). Given all the information, the method findTriplesMatchingPattern() - searches the queried model for statements fitting into the pattern also considering - the nuances of the RDQL specification. The result of this function is then converted - into an array holding variable bindings that represents a set of tuples matching - one pattern.

    -

    The join operation performed on two result sets is nothing else than a PHP - implementation of the SQL-like Inner Join. Furthermore, applying it within the - loop (compared to the approach where the results for each pattern are first - determined and then joined altogether) enables the engine to significantly reduce - memory consumption.

    -

    In this way the query engine has found all tuples matching the patterns from - the WHERE clause. If the RDQL query being processed additionally - contains filter expressions (AND clause), the result set determined - so far is passed to the method filterTuples(). This function, taken - one by one for each tuple, substitutes the placeholders inside the filter string - with the Boolean values of the evaluated filter regex and string equality - expressions; subsequently it inserts the values of the numerical variables and - evaluates the entire filter string as a PHP expression .

    -

    For a better understanding I will explain the filtering process with an example. - Consider the tuple consisting of two variable bindings: ?age = 26, - ?name = "Radoslaw" and the AND clause of - an RDQL query: (?age < 25) && (?name eq "Radoslaw"). - The in-memory representation of this particular filter returned by the RdqlParser - is shown in Example 3 (compare to Figure - 1).

    - - - - - - -
    -

    array ['filters'][0]['string'] = '(?age < 25) && (?name - == "Radoslaw")'
    -                     - ['evalFilterStr'] = '(?age < 25) && (##strEqExpr_0##)'
    -                     - ['strEqExprs'][0]['var'] = ?name
    -                                      - ['operator'] = 'eq'
    -                                      - ['value'] = 'Radoslaw'
    -                                      - ['value_type'] = 'Literal'
    -                                      - ['value_lang'] = NULL
    -                                      - ['value_dtype'] = NULL
    -                     - ['numExpr']['vars'][0] = ?age

    -
    - - - - - -
    Example 3: -
    The in-memory representation of the AND clause:
    -
    (?age < 30) && (?name eq "Radoslaw").
    -
    -
    -

    Given the structure described in Example 3, the query - engine at first evaluates the string equality expression by checking if the - value of the variable ?name (i.e. "Radoslaw") - is a literal with the label equal "Radoslaw" and no specified language - or datatype. In this case it is one, so the query engine replaces the placeholder - (i.e. ##strEqExpr_0##) with TRUE, what results in - the filter string: (?age < 25) && (TRUE). Next, the - query engine inserts the value of the numerical variable ?age and - determines the Boolean value of the whole filter (26 < 25) && - (TRUE). In this example the output is FALSE ( (26 - < 25) && (TRUE) => (FALSE) && (TRUE) = FALSE ); - consequently this particular tuple will be removed from the final result.

    -

    This was just an example of a very simple filter. RAP RDQL query engine is - able to handle much more complex AND clauses consisting of several - filters where each of them can be built of different kinds of expressions combined - together by using logical operators. Even the process of evaluating one single - string equality expression becomes more complicated if the literal has specified - datatype and language.

    -

    In the last step, after having filtered all tuples, the query engine removes - the filter variables (which have not been specified in the SELECT - clause) from the result set. Since the engine has been working with RAP objects - all the time, it can now return the final query result with no further processing, - unless the parameter $returnNodes passed to the object RdqlMemEngine - has been set to FALSE. In this case the values of all query variables - are still to be serialized to string.

    -

     

    -

    4. RDQL Database Engine

    -

    Similarly to the case of a MemModel, an RDQL query performed on a persistent - model (DbModel) is initiated by calling the method queryModel() - on an object RdqlDbEngine with two parameters being passed by reference: - the DbModel itself and the in-memory representation of the parsed query. Though, - from this point on the internal execution of the query takes a different course. - The searching for tuples matching all patterns from the WHERE clause - is this time delegated to the database management system. Moreover instead of - calling the database for the result set matching each single pattern and then - joining them in memory, the RdqlDbEngine translates almost the entire RDQL query - into an SQL statement and sends it to the database for execution. This approach - enables the machine to use the database indexing and optimization capabilities.

    -

    The algorithm used for the query rewriting is relatively simple. Every single - statement pattern is treated as a separate virtual database table (statements). - If the subject, predicate, or object of each pattern is a URI or a literal, - it is bound to its value. Otherwise, in the case that it is a variable, an identity - relationship between all occurrences of this variable is created. The variables - to be returned are indicated in the SELECT clause of the SQL statement - being generated.

    -

    Example 4 provides a sample RDQL query and its corresponding - translation into SQL produced by the RdqlDbEngine. The first two lines in the - SELECT clause of the SQL statement describe the variable ?someone. - Due to its mapping to the subject (of the first triple), it can either be a - resource or a Blank Node. To find this out we need to know the value of the - corresponding table column (subject_is). In the case of the next variable - ?name mapped to the object of the second triple, it can additionally - be a literal as well, so that the information about its language and datatype - must also be returned. The FROM clause indicates three virtual - tables (statements) each representing a pattern of the RDQL query. In - the WHERE clause of the SQL statement there are constraints specified - for every part of a triple. Respectively, the subject in the first table (s1.subject) - representing the variable ?someone is bound to the subject in the - second table (s2.subject) holding the same variable; the predicate - (s1.predicate) and object (s1.object) are equated - to the string they are supposed to match. Since RAP supports storing of multiple - models in a database, each pattern has to be bound to the modelID - of the model the query is performed on. Note that variables ?name - and ?y occur only once so that they are not constrained by any - binding and can therefore match anything. Furthermore, the value of the variable - ?name must be returned by the database even if it is not specified - in the SELECT clause of the RDQL query. It will be needed to evaluate - the filter expressions (?name EQ "Brian" || ?name EQ "Carl"), - which will be carried out in main memory. However, this variable will only be - used internally within the RdqlQueryEngine and will not be included in the returned - final result set.

    -RDQL query: - - - - - - -
    -

    SELECT ?someone, ?name
    - WHERE (?someone, <http://ex.org/vocab/isFirendOf>, <http://ex.org/John>),
    -       (?someone, <http://ex.org/vocab/name>, ?name),
    -       (?someone, ?y, "35"^^http://www.w3.org/2001/XMLSchema#integer)
    - AND (?name EQ "Brian" || ?name EQ "Carl")

    -
    -
    The corresponding SQL-Statement: - - - - - - -
    -

    SELECT s1.subject as _someone ,
    -        s1.subject_is ,

    -

    -        s2.object as _name ,
    -        s2.object_is ,
    -        s2.l_language ,
    -        s2.l_datatype

    -

    FROM statements s1 ,
    -      statements s2 ,
    -      statements s3

    -

    WHERE s1.modelID=39
    - AND s1.subject=s2.subject
    - AND s1.predicate='http://ex.org/vocab/isFirendOf'
    - AND s1.object='http://ex.org/John'

    -

    AND s2.modelID=39
    - AND s2.subject=s3.subject
    - AND s2.predicate='http://ex.org/vocab/name'

    -

    AND s3.modelID=39
    - AND s3.object='35'
    - AND s3.object_is='l'
    - AND s3.l_datatype='http://www.w3.org/2001/XMLSchema#integer

    -
    - - - - - -
    Example 4: -
    An example query and its corresponding SQL translation. -
    -
    -

    The technique used for the query rewriting is very similar to Matt Biddulp's - algorithm for translating rdfDB-style queries into SQL ([Biddulph - 2002], [Miller 2002]). - It has been extended in order to - additionally retrieve variable bindings for filter variables used in the AND - clause of an RDQL query and adapted to RAP's database layout.

    -

    RdqlDbEngine uses ADOdb abstraction - layer for SQL query execution. Thus, the result of every successful database - query is returned in the form of an object ADORecordSet holding - the found database records in the form of an array, where the values of each - single record field are associated with integer keys. However, because of the - fact that SQL statements are generated dynamically, the mapping of these indexes - to the query variables is different for every RDQL query. Fortunately, RdqlDbEngine - provides a solution to this problem: while generating an SQL statement it associates - each RDQL query variable with the corresponding index of the ADORecordSet->fields - array. This information is stored in the class private variable $rsIndexes. - This approach allows the query engine to emulate indexing by variable name while - retrieving SQL query results.

    -

    The filtering of the tuples matching all patterns specified in the WHERE - clause of the RDQL query is carried out in memory. The process is very similar - to the one performed by the RdqlMemEngine with the major difference being that - the RdqlDbEngine does not operate on RAP objects (Resource, Literal, - BlankNode), but on the object ADORecordSet returned - by the database. Finally in the last step the values of the variable bindings - have to be converted either to RAP objects or to their string serialization - according to the desired format of the RDQL query result set.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/index.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/index.html deleted file mode 100755 index d0f04266..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/index.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - RAP - Rdf API for PHP V0.9.6 - Home - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - -
    -

    -  RDF Logo -  PHP Logo - SourceForge Logo
    -

     

    -

    -


    -

    RAP - RDF API for PHP V0.9.6

    -

    RAP is a software package for parsing, querying, manipulating, serializing - and serving RDF models.
    -
    - Its features include:

    - -

    For further information about RAP see:

    - - -
    -

    Download and Installation

    -
      -
    1. Download the current version from: http://sourceforge.net/projects/rdfapi-php/ -
    2. Unpack the zip file. -
    3. Include RDF API into your scripts: -
        -
      • define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -
      • include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
      • -
      -
    4. Change the constant RDFAPI_INCLUDE_DIR to the directory in which you - have unpacked the zip file.
    5. -
    -

    RAP can be used with PHP 4 or PHP 5.

    -
      -
    • When used with PHP 4 it requires at least version 4.2 -
    • When used with PHP 5 it requires at least version 5.0.1 -
    -

    License

    - -

    Status of the code

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Version Comment Release Date
    V0.9.6RAP_Pubby - a linked data frontend for RAP added.
    - Multiple bugs fixed.
    2008-02-29
    V0.9.5

    New SPARQL query engine added. The new engine is much faster and supports
    - all features - of the W3C SPARQL recommendation.
    - Multiple bugs fixed.
    -

    2007-06-01
    V0.9.4

    SPARQL client library added.
    - RSS parser added.
    - Updated ADODB database abstraction layer to the current version.
    - Unit test suite extended. -
    - Multiple bugs fixed.
    -

    -
    2006-06-26
    V0.9.3

    Support for the SPARQL query language and a subset of SPARQL protocol added.
    - Multiple bugs fixed.
    -

    2006-01-16
    V0.9.2

    Support for Named Graphs and RDF dataset added.
    - Graph visualization modul added.
    - Multiple bugs fixed.
    -

    2005-07-06
    V0.9.1

    GRDDL parser added.
    - Improved RDF/XML namespace handling.
    - Option to create models using RDQL added.
    - RDF DB Utils bugs fixed.
    - Improved common vocabulary support.
    - RSS, FOAF, ATOM vocabularies added.
    -

    2004-12-10
    V0.9

    Resource-centric ResModel API added.
    - Ontology-centric OntModel API added.
    - InfModelF and InfModelB inference engine added.
    - RDF DB Utils added.
    - RAP Unit Test Suite extended.
    -

    -
    2004-10-21
    V0.8.1

    New MemModel indexing speeding up searches.
    - Dynamic script inclusion speeding up many operations.
    - New FindIterator() class added.
    - RAP Unit Test Suite added.
    - Multiple bugs fixed.

    2004-08-24
    V0.8

    RDF server supporting the RDF NetAPI added.
    - RDQL syntax updated according to the W3C - member submission.
    - Multiple bug fixes.

    2004-06-01
    V0.7.1Multiple bugs fixed.
    - Support for XML default namespace (xmlns="uri_namespace").
    2004-03-29
    V0.7

    Improved RDF, N3 and N-Triple parsers and serializers.
    - Support for the "RDF/XML Syntax Specification (Revised) -
    - W3C Working Draft 10 October 2003".
    - RDQLResultIterator added.

    2003-11-19
    V0.6

    Database backend, rdql and n3 support added.
    -

    2003-07-31
    V0.5Parser and model operations are much faster now.
    - Search index and some convenience methods added.
    2003-06-01
    V0.4Support for common vocabularies and StatementIterator - object added.2003-02-20
    V0.3Support for rdf:datatype and rdf:nodeID added.2003-01-13
    V0.2Some bugs fixed.
    - Documentation updated.
    2002-10-08
    V0.1Initial Release.2002-09-24
    -

     

    -

    Contributions

    -

    RAP is an open source project and we highly welcome any kind of useful - external contributions.

    -

    Lots of thanks to

    -
      -
    • Christian Weiske for reimplementing the RAP SPARQL engine and extending it with support for all features from the W3C SPARQL Recommendation
    • -
    • Daniel Westphal for the ResModel- and OntModel-APIs, RDF dataset and the RDF-S/OWL - reasoning support.
    • -
    • Radoslaw Oldakowski for the database backend, the RDQL query engine, improving the RDF/XML-parser, and for the RAP_Pubby
    • -
    • Gunnar AA. Grimnes for the N3 support and the RDF DB Utils package
    • -
    • Phil Dawes for the NetAPI implementation
    • -
    • Tobias Gauß for the MemModel indexing, the unit test suite and the SPARQL engine and client library.
    • -
    • Anton Köstlbacher for the graph visualization.
    • -
    • Lukas Smith, Sören Auer, Leandro Mariano Lopez, Riccardo Catanzani, - Scott Willy for multiple bug reports and fixes.
      -
    • -
    -

    Mailing List

    -

    Please send:

    -

    + general questions about RAP
    - + feature requests
    - + links to interesting RAP use cases

    -

    to the RAP mailing list rdfapi-php-interest@lists.sourceforge.net

    -

    You can subscribe rdfapi-php-interest and scroll through the mailing list archives under http://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest

    - Other feedback can also be send directly to: chris@bizer.de (Chris Bizer) -


    - Bug Tracker

    -

    Please report bugs (maybe together with a patch) to the RAP bug tracker:

    -

    http://sourceforge.net/tracker/?group_id=63257&atid=503361

    -


    - Open issues

    -

    There are some open issues and future ideas which await implementation.
    - So if you want to contribute some code to RAP, our Open Issues list might give you some valuable ideas :-)

    -
    -

    Other RDF tools for PHP

    -
      -
    • Section on PHP in Developers Guide to Semantic Web Toolkits for different Programming Languages -
    • R2D2 RDF to Database too. University Leipzig project implementing the D2RQ relational database to RDF mapping language in PHP. R2D2 allows you to treat legacy databases as RDF graphs and to query these graphs. -
    • pOWL (Sören Auer): Webbased OWL editor and OWL API based on RAP. -
    • appmosphere RDF classes (Benjamin Nowack): Lightweight RDF parser and N-Triples serializer. -
    • SimpleRdfParser (Morten Frederiksen): A wrapper class around the RAP rdf parser, which parses RDF into a simple array. The SimpleRdfParser is faster than the RAP parser because it doesn't use the rest of the RAP library. -
    • Rdfworld.php (Chris Snyder): Rdfworld.php is an RDF to PHP object converter, inspired by Aaron Swartz's TRAMP for Python.
      - It allows PHP developers to convert RDF Resources into PHP objects with appropriate properties. The converter is based on RAP V0.3. -
    • PHP XML Classes (Luis Argerich): XML/RDF package including RDF parser, storage mechanism and RDQL query interface. The RAP rdf parser is an up-to-date version of the rdf parser from this package. Luis' parser and RDQL query engine haven't been changed for 2 years and don't reflect the current RDF specification any more. -
    • rdftp (Vangelis Vassiliadis): rdftp is an RDF server implemented as a PHP script that supports Query and Update operations on RDF content. -
    -
    -

    References

    - -

     

    - - - - -
    - -
    -
     
    - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/manual.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/manual.css deleted file mode 100755 index 7a2febe1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/manual.css +++ /dev/null @@ -1,34 +0,0 @@ - -h1, h2, h3, h4, h5, h6 { - color : Navy; -} - -.varname { - background-color: #FFB; - font-weight: bold; -} - -.classname { - color: #A00; -} - -.function, .methodname { - color: #0A0; -} - -.navheader, .navfooter { - background-color: #EEF; -} - -.programlisting { - border: 2px solid gray; - border-style: groove; - padding: 2px; - background-color: #e7e7ef; -} - -.screen { - border: 2px solid gray; - border-style: groove; - padding: 5px; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.CSS b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.CSS deleted file mode 100755 index 004c5a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.CSS +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.dtd b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.dtd deleted file mode 100755 index ec1d2bc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc.dtd +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/all-wcprops deleted file mode 100755 index 3f4c6c3d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/all-wcprops +++ /dev/null @@ -1,257 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc -END -classtrees_default.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/classtrees_default.html -END -classtrees_dataset.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_dataset.html -END -classtrees_sparql-db.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/classtrees_sparql-db.html -END -classtrees_syntax.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_syntax.html -END -packages.html -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/packages.html -END -elementindex.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex.html -END -li_model.html -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_model.html -END -classtrees_infModel.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_infModel.html -END -li_rdql.html -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_rdql.html -END -elementindex_syntax.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_syntax.html -END -blank.html -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/blank.html -END -classtrees_sparql.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_sparql.html -END -classtrees_utility.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_utility.html -END -elementindex_infModel.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_infModel.html -END -li_resModel.html -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_resModel.html -END -classtrees_vocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_vocabulary.html -END -todolist.html -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/310/trunk/rdfapi-php/doc/phpdoc/todolist.html -END -elementindex_model.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_model.html -END -elementindex_sparql.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_sparql.html -END -li_default.html -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/li_default.html -END -elementindex_vocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_vocabulary.html -END -li_sparql-db.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/li_sparql-db.html -END -classtrees_ontModel.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_ontModel.html -END -li_dataset.html -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_dataset.html -END -li_syntax.html -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_syntax.html -END -errors.html -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/errors.html -END -li_infModel.html -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_infModel.html -END -elementindex_ontModel.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_ontModel.html -END -elementindex_default.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/elementindex_default.html -END -li_sparql.html -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_sparql.html -END -elementindex_dataset.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_dataset.html -END -elementindex_sparql-db.html -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/elementindex_sparql-db.html -END -li_utility.html -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_utility.html -END -classtrees_model.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_model.html -END -classtrees_rdql.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_rdql.html -END -li_vocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_vocabulary.html -END -classtrees_resModel.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/classtrees_resModel.html -END -elementindex_rdql.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_rdql.html -END -elementindex_utility.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_utility.html -END -li_ontModel.html -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/li_ontModel.html -END -index.html -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/index.html -END -elementindex_resModel.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/elementindex_resModel.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/entries deleted file mode 100755 index 8eb9f43a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/entries +++ /dev/null @@ -1,610 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -media -dir - -classtrees_default.html -file - - - - -2008-02-29T14:57:43.976001Z -0d17f3e2f0712e02dca4a1dcb4aff55f -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -classtrees_dataset.html -file - - - - -2008-02-29T14:57:43.991621Z -2ff45c4545096038824dbac44c52d517 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_sparql-db.html -file - - - - -2008-02-29T14:57:43.991621Z -6a17865fee9690a7c557f808ee095961 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -packages.html -file - - - - -2008-02-29T14:57:44.007242Z -390cac90d998420c14579f7fd7e6e3e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_syntax.html -file - - - - -2008-02-29T14:57:44.007242Z -62e57edf5173dde215b7bd6a65c42435 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex.html -file - - - - -2008-02-29T14:57:44.022863Z -7cdce9b9a81f5950b9a6c0d63df08b2a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -dataset -dir - -li_model.html -file - - - - -2008-02-29T14:57:44.038483Z -16e1aaed3ed2db232a24d9002841ee64 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_infModel.html -file - - - - -2008-02-29T14:57:44.054104Z -23a28f260188d775bd1fad2c4a131791 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_rdql.html -file - - - - -2008-02-29T14:57:44.054104Z -bd295785f9d8c19f6c99c5349fd13de0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -blank.html -file - - - - -2008-02-29T14:57:44.085345Z -c4dffb5e8c7f334b6633bb91b7e95ee6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_syntax.html -file - - - - -2008-02-29T14:57:44.069724Z -54f43d2d0dcfe2c0a17fb548fe32b06f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_sparql.html -file - - - - -2008-02-29T14:57:44.085345Z -c381f4195821bb1877056833d9458c61 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -infModel -dir - -classtrees_utility.html -file - - - - -2008-02-29T14:57:44.100966Z -0a7634621d47480b2379232a65b19759 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -model -dir - -li_resModel.html -file - - - - -2008-02-29T14:57:44.116586Z -66961707aded5452e0ca0231cb765ddc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_infModel.html -file - - - - -2008-02-29T14:57:44.100966Z -8e44e0ce7ceb3bab9950f993c7623f8b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_vocabulary.html -file - - - - -2008-02-29T14:57:44.116586Z -ef05c8536a96ce8ba30ca9237e77450d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -rdql -dir - -utility -dir - -todolist.html -file - - - - -2008-02-29T14:57:44.132207Z -e3f9b12f547c13f948b4a20a62096a79 -2006-06-26T12:34:22.000000Z -310 -tgauss -has-props - -elementindex_model.html -file - - - - -2008-02-29T14:57:44.132207Z -c9270fd67431822bcdd589d75ba06eda -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_sparql.html -file - - - - -2008-02-29T14:57:44.147827Z -913fb89e3ba34ba8b3b4a35a0fd916bd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -vocabulary -dir - -resModel -dir - -elementindex_vocabulary.html -file - - - - -2008-02-29T14:57:44.163448Z -2334f944bae6b08da3c7ec3cc04719cf -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_default.html -file - - - - -2008-02-29T14:57:44.179069Z -b153550539fb8b9be387a65d97e08862 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -li_dataset.html -file - - - - -2008-02-29T14:57:44.179069Z -bafbd34e10635ede64c560b3e0e9e3da -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_ontModel.html -file - - - - -2008-02-29T14:57:44.194689Z -1417a8a310a6050dddcaf1f1524ceffc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_sparql-db.html -file - - - - -2008-02-29T14:57:44.194689Z -14c4fc8c7315c9073c8610db87feebe0 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -li_syntax.html -file - - - - -2008-02-29T14:57:44.210310Z -67f6e0e7c71e3b56784cdf7368cc2aba -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -errors.html -file - - - - -2008-02-29T14:57:44.210310Z -b11093ca88ca75946581c857dfcfa6b2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ontModel -dir - -li_infModel.html -file - - - - -2008-02-29T14:57:44.225930Z -a5f7df53e4077fd85f412e892ad7c353 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_ontModel.html -file - - - - -2008-02-29T14:57:44.241551Z -ede440db5654f95890d89b5b1cb72970 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -syntax -dir - -elementindex_default.html -file - - - - -2008-02-29T14:57:44.241551Z -983fbed6c6992b6af1f52d564ef1421a -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -elementindex_sparql-db.html -file - - - - -2008-02-29T14:57:44.257172Z -23030faac3e653f3ac83b36cf0df8dd3 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -elementindex_dataset.html -file - - - - -2008-02-29T14:57:44.272792Z -a2001760607d3ed8c31ee9cef9618da0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_sparql.html -file - - - - -2008-02-29T14:57:44.288413Z -fecc6a50f081d917b51de031309759bc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_utility.html -file - - - - -2008-02-29T14:57:44.288413Z -348658872069241c12a7c0b6082c0364 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_model.html -file - - - - -2008-02-29T14:57:44.304033Z -05558d466448807e251ac2a75a8a507f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -classtrees_rdql.html -file - - - - -2008-02-29T14:57:44.304033Z -193b62258211b35e1c16cc30f4cc4a8a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -__filesource -dir - -li_vocabulary.html -file - - - - -2008-02-29T14:57:44.304033Z -8823f13bad393888ca8d4854252ee6f0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -sparql -dir - -classtrees_resModel.html -file - - - - -2008-02-29T14:57:44.319654Z -3043db7e4c5a84d6133c1e4a4236da49 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_rdql.html -file - - - - -2008-02-29T14:57:44.319654Z -ae649ebb2b4e6b7749bf212bbb6e801d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_utility.html -file - - - - -2008-02-29T14:57:44.335275Z -76cb47f4505513ecfb3fbd4dddd1f234 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -li_ontModel.html -file - - - - -2008-02-29T14:57:44.350895Z -94c6ee2d6b45feef7db07859dcde8e9d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -index.html -file - - - - -2008-02-29T14:57:44.350895Z -e46d4a7d47d9e851abcb5881a1e2ab3e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -elementindex_resModel.html -file - - - - -2008-02-29T14:57:44.366516Z -986dde4c7d496b92db5411d905a3eaee -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/blank.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/blank.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/blank.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_dataset.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_dataset.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_default.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_default.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_infModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_infModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_model.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_model.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_ontModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_ontModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_rdql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_rdql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_resModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_resModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql-db.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql-db.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_sparql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_syntax.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_syntax.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_utility.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_utility.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_vocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/classtrees_vocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_dataset.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_dataset.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_default.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_default.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_infModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_infModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_model.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_model.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_ontModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_ontModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_rdql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_rdql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_resModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_resModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql-db.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql-db.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_sparql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_syntax.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_syntax.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_utility.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_utility.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_vocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/elementindex_vocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/errors.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/errors.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/errors.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/index.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/index.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_dataset.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_dataset.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_default.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_default.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_infModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_infModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_model.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_model.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_ontModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_ontModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_rdql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_rdql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_resModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_resModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql-db.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql-db.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_sparql.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_syntax.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_syntax.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_utility.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_utility.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_vocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/li_vocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/packages.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/packages.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/packages.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/todolist.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/todolist.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/prop-base/todolist.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/blank.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/blank.html.svn-base deleted file mode 100755 index 5e6f339b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/blank.html.svn-base +++ /dev/null @@ -1,32 +0,0 @@ - - - RAP - Rdf API for PHP - - - - -

    RAP - Rdf API for PHP

    -

    RAP is a software package for parsing, searching, manipulating, serializing and serving RDF models.
    -

    -

    Its features include:

    - -

    Tutorials can be found here.

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_dataset.html.svn-base deleted file mode 100755 index 7e7dbdd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_dataset.html.svn-base +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class Dataset

    - - -

    Root class IteratorAllGraphsDb

    - - -

    Root class IteratorAllGraphsMem

    - - -

    Root class IteratorFindQuadsDb

    - - -

    Root class IteratorFindQuadsMem

    - - -

    Root class NamedGraphDb

    - - -

    Root class NamedGraphMem

    - - -

    Root class Quad

    - - -

    Root class TriXParser

    - - -

    Root class TriXSerializer

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_default.html.svn-base deleted file mode 100755 index 537496b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_default.html.svn-base +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - -

    - -

    -

    Root class MagpieRSS

    - - -

    Root class RSSCache

    - - -

    Root class Snoopy

    - - -

    - Documentation generated on Tue, 01 May 2007 16:43:11 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_infModel.html.svn-base deleted file mode 100755 index 1e44051d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_infModel.html.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class InfModel

    - - -

    Root class InfRule

    - - -

    Root class InfStatement

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_model.html.svn-base deleted file mode 100755 index 065645b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_model.html.svn-base +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class DbStore

    - - -

    Root class Model

    - - - -

    Root class ModelFactory

    - - -

    Root class Node

    - - - -

    Root class Statement

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_ontModel.html.svn-base deleted file mode 100755 index 26161c96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_ontModel.html.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class OntModel

    - - -

    Root class OntResource

    - - -

    Root class OntVocabulary

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_rdql.html.svn-base deleted file mode 100755 index f238590b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_rdql.html.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class RdqlEngine

    - - -

    Root class RdqlParser

    - - -

    Root class RdqlResultIterator

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_resModel.html.svn-base deleted file mode 100755 index 157b060e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_resModel.html.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class ResIterator

    - - -

    Root class ResLiteral

    - - -

    Root class ResModel

    - - -

    Root class ResResource

    - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql-db.html.svn-base deleted file mode 100755 index 7c26105f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql-db.html.svn-base +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - -

    - -

    -

    Root class SparqlEngineDb_FilterGenerator

    - - -

    Root class SparqlEngineDb_FilterGenerator_Value

    - - -

    Root class SparqlEngineDb_Offsetter

    - - -

    Root class SparqlEngineDb_Preparator

    - - -

    Root class SparqlEngineDb_PreparedStatement

    - - -

    Root class SparqlEngineDb_ResultConverter

    - - -

    Root class SparqlEngineDb_ResultRenderer_Default

    - - -

    Root class SparqlEngineDb_ResultRenderer_HTML

    - - -

    Root class SparqlEngineDb_ResultRenderer_XML

    - - -

    Root class SparqlEngineDb_SqlGenerator

    - - -

    Root class SparqlEngineDb_SqlMerger

    - - -

    Root class SparqlEngineDb_TypeSorter

    - - -

    - Documentation generated on Tue, 01 May 2007 16:18:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql.html.svn-base deleted file mode 100755 index 226e6283..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_sparql.html.svn-base +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root interface SparqlEngineDb_ResultRenderer

    - - -

    Root interface SparqlEngine_ResultRenderer

    - - -

    Root class ClientQuery

    - - -

    Root class Constraint

    - - -

    Root class GraphPattern

    - - -

    Root class Query

    - - -

    Root class QueryTriple

    - - -

    Root class SparqlClient

    - - -

    Root class SparqlEngine

    - - -

    Root class SparqlEngineDb

    - - -

    Root class SparqlEngineDb_FilterGenerator

    - - -

    Root class SparqlEngineDb_FilterGenerator_Value

    - - -

    Root class SparqlEngineDb_Offsetter

    - - -

    Root class SparqlEngineDb_Preparator

    - - -

    Root class SparqlEngineDb_ResultConverter

    - - -

    Root class SparqlEngineDb_ResultRenderer_Default

    - - -

    Root class SparqlEngineDb_ResultRenderer_HTML

    - - -

    Root class SparqlEngineDb_ResultRenderer_XML

    - - -

    Root class SparqlEngineDb_SqlGenerator

    - - -

    Root class SparqlEngineDb_SqlMerger

    - - -

    Root class SparqlEngineDb_TypeSorter

    - - -

    Root class SparqlEngine_PreparedStatement

    - - -

    Root class SparqlEngine_ResultConverter

    - - -

    Root class SparqlEngine_ResultRenderer_Default

    - - -

    Root class SparqlEngine_ResultRenderer_HTML

    - - -

    Root class SparqlEngine_ResultRenderer_XML

    - - -

    Root class SparqlParser

    - - -

    Root class SparqlResultParser

    - - -

    Root class Exception

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_syntax.html.svn-base deleted file mode 100755 index 86b583e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_syntax.html.svn-base +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class GRDDLParser

    - - -

    Root class N3Parser

    - - -

    Root class N3Serializer

    - - -

    Root class NTripleSerializer

    - - -

    Root class RdfParser

    - - -

    Root class RdfSerializer

    - - -

    Root class RssParser

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_utility.html.svn-base deleted file mode 100755 index 59a554e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_utility.html.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class IterFind

    - - -

    Root class Object

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_vocabulary.html.svn-base deleted file mode 100755 index 2c6c8046..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/classtrees_vocabulary.html.svn-base +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class ATOM

    - - -

    Root class ATOM_RES

    - - -

    Root class DC

    - - -

    Root class DC_RES

    - - -

    Root class FOAF

    - - -

    Root class FOAF_RES

    - - -

    Root class OWL

    - - -

    Root class OWL_RES

    - - -

    Root class RDF

    - - -

    Root class RDFS

    - - -

    Root class RDFS_RES

    - - -

    Root class RDF_RES

    - - -

    Root class RSS

    - - -

    Root class RSS_RES

    - - -

    Root class VCARD

    - - -

    Root class VCARD_RES

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex.html.svn-base deleted file mode 100755 index e7f5b12c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex.html.svn-base +++ /dev/null @@ -1,14922 +0,0 @@ - - - - - - - - - - - - -

    Full index

    -

    Package indexes

    - -
    -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - x - y - _ -
    - - -
    -
    a
    - -
    -
    -
    -
    - $accept -
    -
    -
    Snoopy::$accept in Snoopy.class.inc
    -
    -
    - $agent -
    -
    -
    Snoopy::$agent in Snoopy.class.inc
    -
    -
    - $anon -
    -
    -
    N3Serializer::$anon in N3Serializer.php
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arPrepared -
    -
    -
    SparqlEngineDb::$arPrepared in SparqlEngineDb.php
    -
    Prepared SQL statements are stored in here.
    -
    -
    - $arrOutput -
    -
    -
    SparqlResultParser::$arrOutput in SparqlResultParser.php
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - ABOUT -
    -
    -
    RDF_RES::ABOUT() in RDF_RES.php
    -
    -
    - ABOUT -
    -
    -
    RDF::ABOUT() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF::ABOUT_EACH() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF_RES::ABOUT_EACH() in RDF_RES.php
    -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABSTRACT_ -
    -
    -
    DC::ABSTRACT_() in DC_C.php
    -
    -
    - ABSTRACT_ -
    -
    -
    DC_RES::ABSTRACT_() in DC_RES.php
    -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF_RES::ACCOUNT_NAME() in FOAF_RES.php
    -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF::ACCOUNT_NAME() in FOAF_C.php
    -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - add -
    -
    -
    InfModel::add() in InfModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    MemModel::add() in MemModel.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelF::add() in InfModelF.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelB::add() in InfModelB.php
    -
    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    -
    -
    - add -
    -
    -
    ResContainer::add() in ResContainer.php
    -
    Add a new value to a container.
    -
    -
    - add -
    -
    -
    ResList::add() in ResList.php
    -
    Add the given value to the end of the list.
    -
    -
    - add -
    -
    -
    DbModel::add() in DbModel.php
    -
    Add a new triple to this DbModel.
    -
    -
    - add -
    -
    -
    ResModel::add() in ResModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - addAll -
    -
    -
    DatasetMem::addAll() in DatasetMem.php
    -
    Adds all named graphs of the other dataset to this dataset.
    -
    -
    - addAll -
    -
    -
    DatasetDb::addAll() in DatasetDb.php
    -
    Add all named graphs of the other dataset to this dataset.
    -
    -
    - addAtIndex -
    -
    -
    ResSeq::addAtIndex() in ResSeq.php
    -
    Insert a new member into the sequence at the specified position.
    -
    -
    - addComment -
    -
    -
    OntResource::addComment() in OntResource.php
    -
    Add the given comment to this resource.
    -
    -
    - addConstraint -
    -
    -
    GraphPattern::addConstraint() in GraphPattern.php
    -
    Adds a Constraint to the GraphPattern.
    -
    -
    - addConstructGraphPattern -
    -
    - -
    Adds a construct graph pattern to the query.
    -
    -
    - addDefaultGraph -
    -
    - -
    Adds a default graph to the query object.
    -
    -
    - addDomain -
    -
    -
    OntProperty::addDomain() in OntProperty.php
    -
    Add a resource representing the domain of this property.
    -
    -
    - addExpression -
    -
    -
    Constraint::addExpression() in Constraint.php
    -
    Adds an expression string.
    -
    -
    - addFrom -
    -
    -
    Query::addFrom() in Query.php
    -
    Adds a graphuri to the from part.
    -
    -
    - addFromNamed -
    -
    - -
    Adds a graphuri to the from named part.
    -
    -
    - addGraphPattern -
    -
    - -
    Adds a graph pattern to the result part.
    -
    -
    - addIsDefinedBy -
    -
    - -
    Add a resource that is declared to provide a definition of this resource.
    -
    -
    - addLabelProperty -
    -
    - -
    Add the given Label to this resource
    -
    -
    - addModel -
    -
    -
    InfModelF::addModel() in InfModelF.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    ResModel::addModel() in ResModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    MemModel::addModel() in MemModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    DbModel::addModel() in DbModel.php
    -
    Add the given model to this DbModel.
    -
    -
    - addNamedGraph -
    -
    -
    ClientQuery::addNamedGraph() in ClientQuery.php
    -
    Adds a named graph to the query object.
    -
    -
    - addNamedGraph -
    -
    - -
    Adds a NamedGraph to the set.
    -
    -
    - addNamedGraph -
    -
    -
    DatasetMem::addNamedGraph() in DatasetMem.php
    -
    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    -
    -
    - addNamespace -
    -
    -
    ResModel::addNamespace() in ResModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    -
    MemModel::addNamespace() in MemModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    - -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespacePrefix -
    -
    - -
    Adds a new prefix/namespace combination.
    -
    -
    - addNSPrefix -
    -
    -
    N3Serializer::addNSPrefix() in N3Serializer.php
    -
    Adds a new namespace prefix to use.
    -
    -
    - addOptional -
    -
    -
    GraphPattern::addOptional() in GraphPattern.php
    -
    Adds a pointer to an optional graphPattern.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addPrefix -
    -
    -
    Query::addPrefix() in Query.php
    -
    Adds a prefix to the list of prefixes.
    -
    -
    - addProperty -
    -
    -
    OntResource::addProperty() in OntResource.php
    -
    Add a property to this resource.
    -
    -
    - addProperty -
    -
    -
    ResResource::addProperty() in ResResource.php
    -
    Add a property to this resource.
    -
    -
    - addQuad -
    -
    -
    DatasetMem::addQuad() in DatasetMem.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addQuad -
    -
    -
    DatasetDb::addQuad() in DatasetDb.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addRange -
    -
    -
    OntProperty::addRange() in OntProperty.php
    -
    Add a resource representing the range of this property.
    -
    -
    - addRDFType -
    -
    -
    OntResource::addRDFType() in OntResource.php
    -
    Add the given class as one of the rdf:type's for this resource.
    -
    -
    - addSeeAlso -
    -
    -
    OntResource::addSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource.
    -
    -
    - addSubClass -
    -
    -
    OntClass::addSubClass() in OntClass.php
    -
    Add a sub-class of this class.
    -
    -
    - addSubProperty -
    -
    - -
    Add a sub-property of this property.
    -
    -
    - addSuperClass -
    -
    - -
    Add a super-class of this class.
    -
    -
    - addSuperProperty -
    -
    - -
    Add a super-property of this property.
    -
    -
    - addTriplePattern -
    -
    - -
    Adds a List of QueryTriples to the GraphPattern.
    -
    -
    - addUnion -
    -
    -
    GraphPattern::addUnion() in GraphPattern.php
    -
    Adds a pointer to a union graphPattern.
    -
    -
    - addVar -
    -
    -
    Query::addVar() in Query.php
    -
    Adds a new variable to the variable list.
    -
    -
    - addVariable -
    -
    - -
    Adds a variable to the list of result variables.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Alias for the method add().
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    -
    -
    - ADODB_DB_DRIVER -
    -
    -
    ADODB_DB_DRIVER in constants.php
    -
    -
    - ADODB_DB_HOST -
    -
    -
    ADODB_DB_HOST in constants.php
    -
    -
    - ADODB_DB_NAME -
    -
    -
    ADODB_DB_NAME in constants.php
    -
    -
    - ADODB_DB_PASSWORD -
    -
    -
    ADODB_DB_PASSWORD in constants.php
    -
    -
    - ADODB_DB_USER -
    -
    -
    ADODB_DB_USER in constants.php
    -
    -
    - ADODB_DEBUG_MODE -
    -
    -
    ADODB_DEBUG_MODE in constants.php
    -
    -
    - ADR -
    -
    -
    VCARD::ADR() in VCARD_C.php
    -
    -
    - ADR -
    -
    -
    VCARD_RES::ADR() in VCARD_RES.php
    -
    -
    - ADRPROPERTIES -
    -
    -
    VCARD::ADRPROPERTIES() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    - -
    -
    - ADRTYPES -
    -
    -
    VCARD_RES::ADRTYPES() in VCARD_RES.php
    -
    -
    - ADRTYPES -
    -
    -
    VCARD::ADRTYPES() in VCARD_C.php
    -
    -
    - AGENT -
    -
    -
    FOAF::AGENT() in FOAF_C.php
    -
    -
    - AGENT -
    -
    -
    VCARD::AGENT() in VCARD_C.php
    -
    -
    - AGENT -
    -
    -
    FOAF_RES::AGENT() in FOAF_RES.php
    -
    -
    - AGENT -
    -
    -
    VCARD_RES::AGENT() in VCARD_RES.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF::AIM_CHAT_ID() in FOAF_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF_RES::AIM_CHAT_ID() in FOAF_RES.php
    -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    -
    OWLVocabulary::ALL_DIFFERENT() in OWLVocabulary.php
    -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALT -
    -
    -
    RDF::ALT() in RDF_C.php
    -
    -
    - ALT -
    -
    -
    RDF_RES::ALT() in RDF_RES.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC_RES::ALTERNATIVE() in DC_RES.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC::ALTERNATIVE() in DC_C.php
    -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - append -
    -
    -
    ResList::append() in ResList.php
    -
    Answer a new list that is formed by adding each element of
    -
    -
    - append -
    -
    -
    MagpieRSS::append() in rss_parse.inc
    -
    -
    - append_content -
    -
    - -
    -
    - array_change_key_case -
    -
    -
    array_change_key_case() in rss_parse.inc
    -
    -
    - asClass -
    -
    -
    OntResource::asClass() in OntResource.php
    -
    Answer a view of this resource as a class
    -
    -
    - asIndividual -
    -
    -
    OntResource::asIndividual() in OntResource.php
    -
    Answer a view of this resource as an Individual
    -
    -
    - asOntProperty -
    -
    -
    OntResource::asOntProperty() in OntResource.php
    -
    Answer a view of this resource as a property
    -
    -
    - ATOM -
    -
    -
    ATOM in ATOM_C.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - ATOM -
    -
    -
    ATOM in rss_parse.inc
    -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_NS -
    -
    -
    ATOM_NS in constants.php
    -
    -
    - ATOM_RES -
    -
    -
    ATOM_RES in ATOM_RES.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - AUDIENCE -
    -
    -
    DC_RES::AUDIENCE() in DC_RES.php
    -
    -
    - AUDIENCE -
    -
    -
    DC::AUDIENCE() in DC_C.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM_RES::AUTHOR() in ATOM_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM::AUTHOR() in ATOM_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC_RES::AVAILABLE() in DC_RES.php
    -
    -
    - AVAILABLE -
    -
    -
    DC::AVAILABLE() in DC_C.php
    -
    -
    - ATOM_C.php -
    -
    -
    ATOM_C.php in ATOM_C.php
    -
    -
    - ATOM_RES.php -
    -
    -
    ATOM_RES.php in ATOM_RES.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $base -
    -
    -
    Query::$base in Query.php
    -
    The BASE part of the SPARQL query.
    -
    -
    - $BASE_CACHE -
    -
    -
    RSSCache::$BASE_CACHE in rss_cache.inc
    -
    -
    - $bncounter -
    -
    -
    SparqlResultParser::$bncounter in SparqlResultParser.php
    -
    -
    - $bNode -
    -
    -
    N3Parser::$bNode in N3Parser.php
    -
    -
    - $bnodeCounter -
    -
    - -
    Blanknode counter.
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bRealPrepared -
    -
    -
    SparqlEngineDb::$bRealPrepared in SparqlEngineDb.php
    -
    If the prepared statement is really prepared, or if we just emulate it.
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BAG -
    -
    -
    RDF::BAG() in RDF_C.php
    -
    -
    - BAG -
    -
    -
    RDF_RES::BAG() in RDF_RES.php
    -
    -
    - BAG_ID -
    -
    -
    RDF_RES::BAG_ID() in RDF_RES.php
    -
    -
    - BAG_ID -
    -
    -
    RDF::BAG_ID() in RDF_C.php
    -
    -
    - balanceTree -
    -
    -
    SparqlParser::balanceTree() in SparqlParser.php
    -
    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF_RES::BASED_NEAR() in FOAF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF::BASED_NEAR() in FOAF_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD::BDAY() in VCARD_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD_RES::BDAY() in VCARD_RES.php
    -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BlankNode -
    -
    -
    BlankNode::BlankNode() in Blanknode.php
    -
    Constructor You can supply a label or You supply a model and a unique ID is gernerated.
    -
    -
    - BlankNode -
    -
    -
    BlankNode in Blanknode.php
    -
    An RDF blank node.
    -
    -
    - bNodeCheck -
    -
    -
    SparqlParser::bNodeCheck() in SparqlParser.php
    -
    Checks if $token is a Blanknode.
    -
    -
    - BNODE_PREFIX -
    -
    -
    BNODE_PREFIX in constants.php
    -
    -
    - BOX -
    -
    -
    DC_RES::BOX() in DC_RES.php
    -
    -
    - BOX -
    -
    -
    DC::BOX() in DC_C.php
    -
    -
    - buildSortArray -
    -
    -
    ModelComparator::buildSortArray() in ModelComparator.php
    -
    Builds a sorted array.
    -
    -
    - buildVarmap -
    -
    -
    SparqlEngine::buildVarmap() in SparqlEngine.php
    -
    Sorts the result table.
    -
    -
    - Blanknode.php -
    -
    -
    Blanknode.php in Blanknode.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $channel -
    -
    -
    MagpieRSS::$channel in rss_parse.inc
    -
    -
    - $constraint -
    -
    -
    GraphPattern::$constraint in GraphPattern.php
    -
    -
    - $constructPattern -
    -
    - -
    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.
    -
    -
    - $cookies -
    -
    -
    Snoopy::$cookies in Snoopy.class.inc
    -
    -
    - $counter -
    -
    -
    SparqlResultParser::$counter in SparqlResultParser.php
    -
    -
    - $curl_path -
    -
    -
    Snoopy::$curl_path in Snoopy.class.inc
    -
    -
    - $current_item -
    -
    -
    MagpieRSS::$current_item in rss_parse.inc
    -
    -
    - $current_literal -
    -
    -
    SparqlResultParser::$current_literal in SparqlResultParser.php
    -
    -
    - $current_namespace -
    -
    - -
    -
    - cache_age -
    -
    -
    RSSCache::cache_age() in rss_cache.inc
    -
    -
    - CARDINALITY -
    -
    -
    OWL_RES::CARDINALITY() in OWL_RES.php
    -
    -
    - CARDINALITY -
    -
    -
    OWLVocabulary::CARDINALITY() in OWLVocabulary.php
    -
    -
    - CARDINALITY -
    -
    -
    OWL::CARDINALITY() in OWL_C.php
    -
    -
    - CASE_LOWER -
    -
    -
    CASE_LOWER in rss_parse.inc
    -
    -
    - CASE_UPPER -
    -
    -
    CASE_UPPER in rss_parse.inc
    -
    -
    - CATEGORIES -
    -
    -
    VCARD::CATEGORIES() in VCARD_C.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD_RES::CATEGORIES() in VCARD_RES.php
    -
    -
    - channel -
    -
    -
    RssParser::channel() in RssParser.php
    -
    Parses the rss channel/ atom feed.
    -
    -
    - CHANNEL -
    -
    -
    RSS_RES::CHANNEL() in RSS_RES.php
    -
    -
    - CHANNEL -
    -
    -
    RSS::CHANNEL() in RSS_C.php
    -
    -
    - checkDtypeLang -
    -
    -
    SparqlParser::checkDtypeLang() in SparqlParser.php
    -
    Checks if there is a datatype given and appends it to the node.
    -
    -
    - checkEntailment -
    -
    - -
    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.
    -
    -
    - checkIntBindings -
    -
    - -
    Checks it there are internal bindings between variables.
    -
    -
    - checkTrigger -
    -
    - -
    Checks, if the statement satisfies the trigger.
    -
    -
    - check_cache -
    -
    -
    RSSCache::check_cache() in rss_cache.inc
    -
    -
    - clear -
    -
    -
    DatasetMem::clear() in DatasetMem.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - clear -
    -
    -
    DatasetDb::clear() in DatasetDb.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - ClientQuery -
    -
    -
    ClientQuery in ClientQuery.php
    -
    ClientQuery Object to run a SPARQL Query against a SPARQL server.
    -
    -
    - close -
    -
    -
    DbModel::close() in DbModel.php
    -
    Close this DbModel
    -
    -
    - close -
    -
    -
    MemModel::close() in MemModel.php
    -
    Close the MemModel and free up resources held.
    -
    -
    - close -
    -
    -
    DbStore::close() in DbStore.php
    -
    Close the DbStore.
    -
    -
    - COLLECTION -
    -
    -
    DC_RES::COLLECTION() in DC_RES.php
    -
    -
    - COLLECTION -
    -
    -
    DC::COLLECTION() in DC_C.php
    -
    -
    - COMMENT -
    -
    -
    RDFS_RES::COMMENT() in RDFS_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS::COMMENT() in RDFS_C.php
    -
    -
    - COMMENT -
    -
    -
    RdfsVocabulary::COMMENT() in RdfsVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMMENT -
    -
    -
    OWLVocabulary::COMMENT() in OWLVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - compare -
    -
    -
    ModelComparator::compare() in ModelComparator.php
    -
    Compares two models.
    -
    -
    - compare -
    -
    -
    Statement::compare() in Statement.php
    -
    Compares two statements and returns integer less than, equal to, or greater than zero.
    -
    -
    - compareTriples -
    -
    -
    ModelComparator::compareTriples() in ModelComparator.php
    -
    Compares the Triples in the lists.
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    -
    OWLVocabulary::COMPLEMENT_OF() in OWLVocabulary.php
    -
    -
    - concat -
    -
    -
    MagpieRSS::concat() in rss_parse.inc
    -
    -
    - concatenate -
    -
    -
    ResList::concatenate() in ResList.php
    -
    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.
    -
    -
    - configSortModel -
    -
    - -
    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.
    -
    -
    - configUseAttributes -
    -
    - -
    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.
    -
    -
    - configUseEntities -
    -
    - -
    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.
    -
    -
    - configUseQnames -
    -
    - -
    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.
    -
    -
    - configUseXmlDeclaration -
    -
    - -
    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.
    -
    -
    - CONFORMS_TO -
    -
    -
    DC::CONFORMS_TO() in DC_C.php
    -
    -
    - CONFORMS_TO -
    -
    -
    DC_RES::CONFORMS_TO() in DC_RES.php
    -
    -
    - cons -
    -
    -
    ResList::cons() in ResList.php
    -
    Return a reference to a new list cell whose head is value and whose tail is this list.
    -
    -
    - constants.php -
    -
    -
    constants.php in constants.php
    -
    -
    - Constraint -
    -
    -
    Constraint in Constraint.php
    -
    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - CONTAINER -
    -
    -
    RDFS_RES::CONTAINER() in RDFS_RES.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS::CONTAINER() in RDFS_C.php
    -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - contains -
    -
    -
    ResContainer::contains() in ResContainer.php
    -
    Determine whether the container contains a value
    -
    -
    - contains -
    -
    -
    ResModel::contains() in ResModel.php
    -
    Tests if the Model contains the given statement.
    -
    -
    - contains -
    -
    -
    ResList::contains() in ResList.php
    -
    Answer true if the given node appears as the value of a value of any of the cells of this list.
    -
    -
    - contains -
    -
    -
    MemModel::contains() in MemModel.php
    -
    Tests if the MemModel contains the given triple.
    -
    -
    - contains -
    -
    -
    InfModelB::contains() in InfModelB.php
    -
    Tests if the Model contains the given triple.
    -
    -
    - contains -
    -
    -
    DbModel::contains() in DbModel.php
    -
    Check if the DbModel contains the given statement.
    -
    -
    - containsAll -
    -
    -
    ResModel::containsAll() in ResModel.php
    -
    Determine if all of the statements in a model are also contained in this model.
    -
    -
    - containsAll -
    -
    -
    DbModel::containsAll() in DbModel.php
    -
    Determine if all of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAll -
    -
    -
    MemModel::containsAll() in MemModel.php
    -
    Determine if all of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAny -
    -
    -
    DbModel::containsAny() in DbModel.php
    -
    Determine if any of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAny -
    -
    -
    ResModel::containsAny() in ResModel.php
    -
    Determine if any of the statements in a model are also contained in this model.
    -
    -
    - containsAny -
    -
    -
    MemModel::containsAny() in MemModel.php
    -
    Determine if any of the statements in a model are also contained in this MemModel.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsQuad -
    -
    -
    DatasetMem::containsQuad() in DatasetMem.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsQuad -
    -
    -
    DatasetDb::containsQuad() in DatasetDb.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsResource -
    -
    - -
    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    -
    -
    - CONTENT -
    -
    -
    ATOM_RES::CONTENT() in ATOM_RES.php
    -
    -
    - CONTENT -
    -
    -
    ATOM::CONTENT() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM::CONTRIBUTOR() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM_RES::CONTRIBUTOR() in ATOM_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC::CONTRIBUTOR() in DC_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC_RES::CONTRIBUTOR() in DC_RES.php
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - copy -
    -
    -
    ResList::copy() in ResList.php
    -
    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM_RES::COPYRIGHT() in ATOM_RES.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM::COPYRIGHT() in ATOM_C.php
    -
    -
    - countGraphs -
    -
    -
    DatasetDb::countGraphs() in DatasetDb.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countGraphs -
    -
    -
    DatasetMem::countGraphs() in DatasetMem.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countQuads -
    -
    -
    DatasetMem::countQuads() in DatasetMem.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countQuads -
    -
    -
    DatasetDb::countQuads() in DatasetDb.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countResults -
    -
    -
    RdqlResultIterator::countResults() in RdqlResultIterator.php
    -
    Returns the number of results.
    -
    -
    - COUNTRY -
    -
    -
    VCARD_RES::COUNTRY() in VCARD_RES.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD::COUNTRY() in VCARD_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC::COVERAGE() in DC_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC_RES::COVERAGE() in DC_RES.php
    -
    -
    - createAlt -
    -
    -
    ResModel::createAlt() in ResModel.php
    -
    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBag -
    -
    -
    ResModel::createBag() in ResModel.php
    -
    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - CREATED -
    -
    -
    DC_RES::CREATED() in DC_RES.php
    -
    -
    - CREATED -
    -
    -
    DC::CREATED() in DC_C.php
    -
    -
    - CREATED -
    -
    -
    ATOM::CREATED() in ATOM_C.php
    -
    -
    - CREATED -
    -
    -
    ATOM_RES::CREATED() in ATOM_RES.php
    -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createGraph -
    -
    -
    DatasetDb::createGraph() in DatasetDb.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    -
    -
    - createGraph -
    -
    -
    DatasetMem::createGraph() in DatasetMem.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    -
    -
    - createIndividual -
    -
    - -
    Answer a resource that represents an Individual node in this model.
    -
    -
    - createInstance -
    -
    - -
    Answer a resource that represents an instance of this OntClass and Individual node in this model.
    -
    -
    - createList -
    -
    -
    ResModel::createList() in ResModel.php
    -
    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createLiteral -
    -
    - -
    Create an untyped literal from a String value with a specified language.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createOntClass -
    -
    - -
    Answer a resource that represents a class description node in this model.
    -
    -
    - createOntProperty -
    -
    - -
    Answer a resource that represents an OntProperty node in this model.
    -
    -
    - createOrd -
    -
    -
    RDFUtil::createOrd() in RdfUtil.php
    -
    Creates ordinal RDF resource out of an integer.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createProperty -
    -
    - -
    Create a new Property associated with this model.
    -
    -
    - createResource -
    -
    - -
    Create a new resource associated with this model.
    -
    -
    - createSeq -
    -
    -
    ResModel::createSeq() in ResModel.php
    -
    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTables -
    -
    - -
    Create tables and indexes for the given database type.
    -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypedLiteral -
    -
    - -
    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.
    -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createValue -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - CREATE_MODEL_WITHOUT_DUPLICATES -
    -
    - -
    -
    - create_parser -
    -
    - -
    return XML parser, and possibly re-encoded source
    -
    -
    - CREATOR -
    -
    -
    DC::CREATOR() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC_RES::CREATOR() in DC_RES.php
    -
    -
    - current -
    -
    -
    IteratorFindQuadsMem::current() in IteratorFindQuadsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    StatementIterator::current() in StatementIterator.php
    -
    Returns the current statement.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsDb::current() in IteratorAllGraphsDb.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    FindIterator::current() in FindIterator.php
    -
    Returns the current matching statement.
    -
    -
    - current -
    -
    -
    IteratorFindQuadsDb::current() in IteratorFindQuadsDb.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsMem::current() in IteratorAllGraphsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    ResIterator::current() in ResIterator.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    RdqlResultIterator::current() in RdqlResultIterator.php
    -
    Returns the current result.
    -
    -
    - current -
    -
    -
    IterFind::current() in IterFind.php
    -
    Returns the current item
    -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - ClientQuery.php -
    -
    -
    ClientQuery.php in ClientQuery.php
    -
    -
    - Constraint.php -
    -
    -
    Constraint.php in Constraint.php
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $DAML_NS -
    -
    -
    N3Parser::$DAML_NS in N3Parser.php
    -
    -
    - $dataset -
    -
    -
    SparqlEngineDb::$dataset in SparqlEngineDb.php
    -
    RDF dataset object.
    -
    -
    - $dataset -
    -
    -
    SparqlEngine::$dataset in SparqlEngine.php
    -
    The RDF Dataset.
    -
    -
    - $dbConn -
    -
    -
    SparqlEngineDb::$dbConn in SparqlEngineDb.php
    -
    Database connection object.
    -
    -
    - $debug -
    -
    -
    NTripleSerializer::$debug in NTripleSerializer.php
    -
    -
    - $debug -
    -
    -
    N3Parser::$debug in N3Parser.php
    -
    -
    - $debug -
    -
    -
    N3Serializer::$debug in N3Serializer.php
    -
    -
    - $default -
    -
    -
    ClientQuery::$default in ClientQuery.php
    -
    -
    - $done -
    -
    -
    N3Serializer::$done in N3Serializer.php
    -
    -
    - $dtype -
    -
    -
    SparqlResultParser::$dtype in SparqlResultParser.php
    -
    -
    - DATASET -
    -
    -
    DC_RES::DATASET() in DC_RES.php
    -
    -
    - DATASET -
    -
    -
    DC::DATASET() in DC_C.php
    -
    -
    - Dataset -
    -
    -
    Dataset in Dataset.php
    -
    Dataset implementation.
    -
    -
    - Dataset.php -
    -
    -
    Dataset.php in Dataset.php
    -
    -
    - DatasetDb.php -
    -
    -
    DatasetDb.php in DatasetDb.php
    -
    -
    - DatasetMem.php -
    -
    -
    DatasetMem.php in DatasetMem.php
    -
    -
    - DatasetP.php -
    -
    -
    DatasetP.php in DatasetP.php
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb in DatasetDb.php
    -
    Dataset implementation.
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb::DatasetDb() in DatasetDb.php
    -
    Constructor You can supply a Dataset name.
    -
    -
    - datasetExists -
    -
    - -
    Check if the Dataset with the given $datasetName is already stored in the database
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem in DatasetMem.php
    -
    In-memory implementation of a RDF dataset.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem::DatasetMem() in DatasetMem.php
    -
    Constructor.
    -
    -
    - DATATYPE -
    -
    -
    RDF_RES::DATATYPE() in RDF_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDF::DATATYPE() in RDF_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWLVocabulary::DATATYPE() in OWLVocabulary.php
    -
    -
    - DATATYPE -
    -
    -
    OWL_RES::DATATYPE() in OWL_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS::DATATYPE() in RDFS_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWL::DATATYPE() in OWL_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS_RES::DATATYPE() in RDFS_RES.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_SHORTCUT_PREFIX -
    -
    -
    DATATYPE_SHORTCUT_PREFIX in constants.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWLVocabulary::DATA_RANGE() in OWLVocabulary.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL::DATA_RANGE() in OWL_C.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL_RES::DATA_RANGE() in OWL_RES.php
    -
    -
    - DATE -
    -
    -
    DC_RES::DATE() in DC_RES.php
    -
    -
    - DATE -
    -
    -
    DC::DATE() in DC_C.php
    -
    -
    - dateTime -
    -
    -
    dateTime() in FilterFunctions.php
    -
    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.
    -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DBMODEL -
    -
    -
    DBMODEL in constants.php
    -
    -
    - DbModel -
    -
    -
    DbModel::DbModel() in DbModel.php
    -
    Constructor Do not call this directly.
    -
    -
    - DbModel -
    -
    -
    DbModel in DbModel.php
    -
    This class provides methods for manipulating DbModels from DbStore.
    -
    -
    - DbStore -
    -
    -
    DbStore::DbStore() in DbStore.php
    -
    Constructor: Set the database connection with the given parameters.
    -
    -
    - DbStore -
    -
    -
    DbStore in DbStore.php
    -
    DbStore is a persistent store of RDF data using relational database technology.
    -
    -
    - DC -
    -
    -
    DC in DC_C.php
    -
    Dublin Core Vocabulary (Resource)
    -
    -
    - dc -
    -
    -
    RssParser::dc() in RssParser.php
    -
    Adds the dc namespace.
    -
    -
    - DCMITYPE_NS -
    -
    -
    DCMITYPE_NS in constants.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC_RES::DCMI_TYPE() in DC_RES.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC::DCMI_TYPE() in DC_C.php
    -
    -
    - DCTERM_NS -
    -
    -
    DCTERM_NS in constants.php
    -
    -
    - DC_NS -
    -
    -
    DC_NS in constants.php
    -
    -
    - DC_RES -
    -
    -
    DC_RES in DC_RES.php
    -
    Dublin Core Vocabulary (ResResource)
    -
    -
    - debug -
    -
    -
    RSSCache::debug() in rss_cache.inc
    -
    -
    - debug -
    -
    -
    debug() in rss_fetch.inc
    -
    -
    - DEFAULT_ALGORITHM -
    -
    -
    DEFAULT_ALGORITHM in constants.php
    -
    -
    - DEFAULT_ENCODING -
    -
    -
    DEFAULT_ENCODING in constants.php
    -
    -
    - delete -
    -
    -
    DbModel::delete() in DbModel.php
    -
    Remove this DbModel from database and clean up.
    -
    -
    - DEPICTION -
    -
    -
    FOAF::DEPICTION() in FOAF_C.php
    -
    -
    - DEPICTION -
    -
    -
    FOAF_RES::DEPICTION() in FOAF_RES.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF::DEPICTS() in FOAF_C.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF_RES::DEPICTS() in FOAF_RES.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - describeGraph -
    -
    - -
    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC_RES::DESCRIPTION() in DC_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS_RES::DESCRIPTION() in RSS_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC::DESCRIPTION() in DC_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF::DESCRIPTION() in RDF_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF_RES::DESCRIPTION() in RDF_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS::DESCRIPTION() in RSS_C.php
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    -
    OWLVocabulary::DIFFERENT_FROM() in OWLVocabulary.php
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIR_SEP -
    -
    -
    DIR_SEP in rss_fetch.inc
    -
    -
    - DISJOINT_WITH -
    -
    -
    OWLVocabulary::DISJOINT_WITH() in OWLVocabulary.php
    -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - distinct -
    -
    -
    SparqlEngine::distinct() in SparqlEngine.php
    -
    Eliminates duplicate results.
    -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF_RES::DNA_CHECKSUM() in FOAF_RES.php
    -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF::DNA_CHECKSUM() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF_RES::DOCUMENT() in FOAF_RES.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF::DOCUMENT() in FOAF_C.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS_RES::DOMAIN() in RDFS_RES.php
    -
    -
    - DOMAIN -
    -
    -
    OWLVocabulary::DOMAIN() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - DOMAIN -
    -
    -
    RDFS::DOMAIN() in RDFS_C.php
    -
    -
    - DOMAIN -
    -
    -
    RdfsVocabulary::DOMAIN() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - dtypeCheck -
    -
    -
    SparqlParser::dtypeCheck() in SparqlParser.php
    -
    Checks if the Node is a typed Literal.
    -
    -
    - DBase.php -
    -
    -
    DBase.php in DBase.php
    -
    -
    - DbModel.php -
    -
    -
    DbModel.php in DbModel.php
    -
    -
    - DbStore.php -
    -
    -
    DbStore.php in DbStore.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - DC.php -
    -
    -
    DC.php in DC.php
    -
    -
    - DC_C.php -
    -
    -
    DC_C.php in DC_C.php
    -
    -
    - DC_RES.php -
    -
    -
    DC_RES.php in DC_RES.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $encoding -
    -
    -
    MagpieRSS::$encoding in rss_parse.inc
    -
    -
    - $error -
    -
    -
    Snoopy::$error in Snoopy.class.inc
    -
    -
    - $ERROR -
    -
    -
    MagpieRSS::$ERROR in rss_parse.inc
    -
    -
    - $ERROR -
    -
    -
    RSSCache::$ERROR in rss_cache.inc
    -
    -
    - $expandlinks -
    -
    -
    Snoopy::$expandlinks in Snoopy.class.inc
    -
    -
    - $expression -
    -
    -
    Constraint::$expression in Constraint.php
    -
    The expression string.
    -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EMAIL -
    -
    -
    VCARD_RES::EMAIL() in VCARD_RES.php
    -
    -
    - EMAIL -
    -
    -
    VCARD::EMAIL() in VCARD_C.php
    -
    -
    - EMAIL -
    -
    -
    ATOM::EMAIL() in ATOM_C.php
    -
    -
    - EMAIL -
    -
    -
    ATOM_RES::EMAIL() in ATOM_RES.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD::EMAILTYPES() in VCARD_C.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD_RES::EMAILTYPES() in VCARD_RES.php
    -
    -
    - entail -
    -
    -
    InfRule::entail() in InfRule.php
    -
    Returns a infered InfStatement by evaluating the statement with the entailment rule.
    -
    -
    - entailStatement -
    -
    - -
    Entails a statement by recursively using the _entailStatementRec method.
    -
    -
    - ENTRY -
    -
    -
    ATOM_RES::ENTRY() in ATOM_RES.php
    -
    -
    - ENTRY -
    -
    -
    ATOM::ENTRY() in ATOM_C.php
    -
    -
    - equals -
    -
    -
    BlankNode::equals() in Blanknode.php
    -
    Checks if two blank nodes are equal.
    -
    -
    - equals -
    -
    -
    Quad::equals() in Quad.php
    -
    Checks if two quads are equal.
    -
    -
    - equals -
    -
    -
    Resource::equals() in Resource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    ResResource::equals() in ResResource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    Literal::equals() in Literal.php
    -
    Checks if ihe literal equals another literal.
    -
    -
    - equals -
    -
    -
    ResModel::equals() in ResModel.php
    -
    Checks if two models are equal.
    -
    -
    - equals -
    -
    -
    Statement::equals() in Statement.php
    -
    Checks if two statements are equal.
    -
    -
    - equals -
    -
    -
    DbModel::equals() in DbModel.php
    -
    Check if two models are equal.
    -
    -
    - equals -
    -
    -
    MemModel::equals() in MemModel.php
    -
    Checks if two models are equal.
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - error -
    -
    -
    MagpieRSS::error() in rss_parse.inc
    -
    -
    - error -
    -
    -
    error() in rss_fetch.inc
    -
    -
    - error -
    -
    -
    SparqlParser::error() in SparqlParser.php
    -
    Error reporting.
    -
    -
    - error -
    -
    -
    RSSCache::error() in rss_cache.inc
    -
    -
    - escapeValue -
    -
    -
    RDFUtil::escapeValue() in RdfUtil.php
    -
    Escapes < > and &
    -
    -
    - EVENT -
    -
    -
    DC::EVENT() in DC_C.php
    -
    -
    - EVENT -
    -
    -
    DC_RES::EVENT() in DC_RES.php
    -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - execute -
    -
    -
    SparqlEngineDb::execute() in SparqlEngineDb.php
    -
    Execute a prepared statement by filling it with variables
    -
    -
    - execute -
    -
    - -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - EXTADD -
    -
    -
    VCARD_RES::EXTADD() in VCARD_RES.php
    -
    -
    - EXTADD -
    -
    -
    VCARD::EXTADD() in VCARD_C.php
    -
    -
    - EXTENT -
    -
    -
    DC_RES::EXTENT() in DC_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC::EXTENT() in DC_C.php
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $feed_type -
    -
    -
    MagpieRSS::$feed_type in rss_parse.inc
    -
    -
    - $feed_version -
    -
    -
    MagpieRSS::$feed_version in rss_parse.inc
    -
    -
    - $fromNamedPart -
    -
    - -
    Contains the FROM NAMED part of the SPARQL query.
    -
    -
    - $fromPart -
    -
    -
    Query::$fromPart in Query.php
    -
    Contains the FROM part of the SPARQL query.
    -
    -
    - factory -
    -
    -
    SparqlEngine::factory() in SparqlEngine.php
    -
    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.
    -
    -
    - FAMILY -
    -
    -
    VCARD::FAMILY() in VCARD_C.php
    -
    -
    - FAMILY -
    -
    -
    VCARD_RES::FAMILY() in VCARD_RES.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF::FAMILY_NAME() in FOAF_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF_RES::FAMILY_NAME() in FOAF_RES.php
    -
    -
    - FEED -
    -
    -
    ATOM::FEED() in ATOM_C.php
    -
    -
    - FEED -
    -
    -
    ATOM_RES::FEED() in ATOM_RES.php
    -
    -
    - feed_cdata -
    -
    -
    MagpieRSS::feed_cdata() in rss_parse.inc
    -
    -
    - feed_end_element -
    -
    - -
    -
    - feed_start_element -
    -
    - -
    -
    - fetch -
    -
    -
    Snoopy::fetch() in Snoopy.class.inc
    -
    -
    - fetch_rss -
    -
    -
    fetch_rss() in rss_fetch.inc
    -
    -
    - file_name -
    -
    -
    RSSCache::file_name() in rss_cache.inc
    -
    -
    - fillConstraintString -
    -
    - -
    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function
    -
    -
    - filterPatterns -
    -
    -
    SparqlEngine::filterPatterns() in SparqlEngine.php
    -
    Filters the pattern results.
    -
    -
    - find -
    -
    -
    InfModelB::find() in InfModelB.php
    -
    General method to search for triples.
    -
    -
    - find -
    -
    -
    DbModel::find() in DbModel.php
    -
    General method to search for triples in the DbModel.
    -
    -
    - find -
    -
    -
    MemModel::find() in MemModel.php
    -
    General method to search for triples.
    -
    -
    - find -
    -
    -
    ResModel::find() in ResModel.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findCount -
    -
    -
    MemModel::findCount() in MemModel.php
    -
    Searches for triples and returns the number of matches.
    -
    -
    - findCount -
    -
    -
    DbModel::findCount() in DbModel.php
    -
    Search for triples and return the number of matches.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Search for triples and return the first matching statement.
    -
    -
    - findForward -
    -
    - -
    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - FindIterator -
    -
    -
    FindIterator in FindIterator.php
    -
    Iterator for traversing statements matching a searchpattern.
    -
    -
    - FindIterator -
    -
    -
    FindIterator::FindIterator() in FindIterator.php
    -
    Constructor
    -
    -
    - findRegex -
    -
    -
    MemModel::findRegex() in MemModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    DbModel::findRegex() in DbModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    InfModel::findRegex() in InfModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findTuplesMatchingOnePattern -
    -
    - -
    Finds Tuples matching one TriplePattern.
    -
    -
    - findVocabulary -
    -
    - -
    Return all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - FIRST -
    -
    -
    RDF_RES::FIRST() in RDF_RES.php
    -
    -
    - FIRST -
    -
    -
    RDF::FIRST() in RDF_C.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF::FIRST_NAME() in FOAF_C.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF_RES::FIRST_NAME() in FOAF_RES.php
    -
    -
    - fixNegationInFuncName -
    -
    - -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FIX_BLANKNODES -
    -
    -
    FIX_BLANKNODES in constants.php
    -
    -
    - FN -
    -
    -
    VCARD::FN() in VCARD_C.php
    -
    -
    - FN -
    -
    -
    VCARD_RES::FN() in VCARD_RES.php
    -
    -
    - FOAF -
    -
    -
    FOAF in FOAF_C.php
    -
    Friend of a Friend (FOAF) Vocabulary (Resource)
    -
    -
    - FOAF_NS -
    -
    -
    FOAF_NS in constants.php
    -
    -
    - FOAF_RES -
    -
    -
    FOAF_RES in FOAF_RES.php
    -
    Friend of a Friend (FOAF) Vocabulary (ResResource)
    -
    -
    - FORMAT -
    -
    -
    DC::FORMAT() in DC_C.php
    -
    -
    - FORMAT -
    -
    -
    DC_RES::FORMAT() in DC_RES.php
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNDED_BY -
    -
    -
    FOAF_RES::FUNDED_BY() in FOAF_RES.php
    -
    -
    - FUNDED_BY -
    -
    -
    FOAF::FUNDED_BY() in FOAF_C.php
    -
    -
    - FilterFunctions.php -
    -
    -
    FilterFunctions.php in FilterFunctions.php
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - FindIterator.php -
    -
    -
    FindIterator.php in FindIterator.php
    -
    -
    - FOAF.php -
    -
    -
    FOAF.php in FOAF.php
    -
    -
    - FOAF_C.php -
    -
    -
    FOAF_C.php in FOAF_C.php
    -
    -
    - FOAF_RES.php -
    -
    -
    FOAF_RES.php in FOAF_RES.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - $graphname -
    -
    -
    GraphPattern::$graphname in GraphPattern.php
    -
    Graphname. 0 if its in the default graph.
    -
    -
    - $graphPatternCounter -
    -
    - -
    GraphPattern counter.
    -
    -
    - GEEKCODE -
    -
    -
    FOAF::GEEKCODE() in FOAF_C.php
    -
    -
    - GEEKCODE -
    -
    -
    FOAF_RES::GEEKCODE() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF_RES::GENDER() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF::GENDER() in FOAF_C.php
    -
    -
    - GENERAL_PREFIX_BASE -
    -
    -
    GENERAL_PREFIX_BASE in constants.php
    -
    -
    - generateModel -
    -
    - -
    Generates a new MemModel from a URI, a file or from memory.
    -
    -
    - generateModel -
    -
    -
    GRDDLParser::generateModel() in GRDDLParser.php
    -
    generates a MemModel and creates the DomDocument.
    -
    -
    - generateModel -
    -
    - -
    Generate a new MemModel from an URI or file.
    -
    -
    - generateModel -
    -
    - -
    Main function
    -
    -
    - GENERATOR -
    -
    -
    ATOM_RES::GENERATOR() in ATOM_RES.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM::GENERATOR() in ATOM_C.php
    -
    -
    - GEO -
    -
    -
    VCARD::GEO() in VCARD_C.php
    -
    -
    - GEO -
    -
    -
    VCARD_RES::GEO() in VCARD_RES.php
    -
    -
    - get -
    -
    -
    ResList::get() in ResList.php
    -
    Returns the value of the list element at the specified position or null.
    -
    -
    - get -
    -
    -
    RSSCache::get() in rss_cache.inc
    -
    -
    - getAllVars -
    -
    -
    Query::getAllVars() in Query.php
    -
    Returns a list with all used variables.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getBase -
    -
    -
    Query::getBase() in Query.php
    -
    Returns the BASE part of the query.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.
    -
    -
    - getBaseURI -
    -
    -
    Model::getBaseURI() in Model.php
    -
    Return current baseURI.
    -
    -
    - getBaseURI -
    -
    -
    ResModel::getBaseURI() in ResModel.php
    -
    Return current baseURI.
    -
    -
    - getBlanknodeLabel -
    -
    - -
    Returns an unused Bnode label.
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getComment -
    -
    -
    OntResource::getComment() in OntResource.php
    -
    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    -
    -
    - getConstraint -
    -
    -
    GraphPattern::getConstraint() in GraphPattern.php
    -
    Returns a constraint if there is one false if not.
    -
    -
    - getConstructPattern -
    -
    - -
    Returns the construvtGraphPattern of the query if there is one.
    -
    -
    - getConstructPatternVariables -
    -
    - -
    Returns a list of variables used in the construct patterns.
    -
    -
    - getContentInArray -
    -
    - -
    Get all values in the list as an array of ResResources
    -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getDataset -
    -
    -
    SparqlEngine::getDataset() in SparqlEngine.php
    -
    -
    - getDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.
    -
    -
    - getDatasetMem -
    -
    -
    ModelFactory::getDatasetMem() in ModelFactory.php
    -
    Returns a NamedGraphSetMem.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatatype -
    -
    -
    Literal::getDatatype() in Literal.php
    -
    Returns the datatype of the literal.
    -
    -
    - getDatatype -
    -
    - -
    Returns the datatype of a variable if it is set.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getDbConn -
    -
    -
    DbModel::getDbConn() in DbModel.php
    -
    Returns the database connection object
    -
    -
    - getDbModel -
    -
    -
    ModelFactory::getDbModel() in ModelFactory.php
    -
    Returns a new DbModel using the database connection supplied by $dbStore.
    -
    -
    - getDbStore -
    -
    -
    ModelFactory::getDbStore() in ModelFactory.php
    -
    Returns a database connection with the given parameters.
    -
    -
    - getDefault -
    -
    -
    ResAlt::getDefault() in ResAlt.php
    -
    Return the default value for this resource
    -
    -
    - getDefaultDbModel -
    -
    - -
    Returns a DbModel with the database connection defined in constants.php.
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph.
    -
    -
    - getDefaultModel -
    -
    - -
    Returns a MemModel.
    -
    -
    - getDomain -
    -
    -
    OntProperty::getDomain() in OntProperty.php
    -
    Answer a OntClass that represents the domain class of this property.
    -
    -
    - getEntailment -
    -
    - -
    -
    - getExpression -
    -
    -
    Constraint::getExpression() in Constraint.php
    -
    Returns the expression string.
    -
    -
    - getFromNamedPart -
    -
    - -
    Returns the FROM NAMED clause of the query.
    -
    -
    - getFromPart -
    -
    - -
    Returns the FROM clause of the query.
    -
    -
    - getFullUri -
    -
    -
    Query::getFullUri() in Query.php
    -
    Gets the full URI of a qname token.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphDb::getGraphName() in NamedGraphDb.php
    -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    - -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphMem::getGraphName() in NamedGraphMem.php
    -
    Returns the graph name.
    -
    -
    - getGraphname -
    -
    -
    GraphPattern::getGraphname() in GraphPattern.php
    -
    Returns the graphname.
    -
    -
    - getHead -
    -
    - -
    -
    - getHead -
    -
    -
    ResList::getHead() in ResList.php
    -
    Get the value that is associated with the head of the list.
    -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getID -
    -
    -
    BlankNode::getID() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getId -
    -
    -
    GraphPattern::getId() in GraphPattern.php
    -
    Returns the GraphPatterns id.
    -
    -
    - getIndexType -
    -
    -
    MemModel::getIndexType() in MemModel.php
    -
    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),
    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.
    -
    -
    - getInfModelB -
    -
    -
    ModelFactory::getInfModelB() in ModelFactory.php
    -
    Returns a InfModelB.
    -
    -
    - getInfModelF -
    -
    -
    ModelFactory::getInfModelF() in ModelFactory.php
    -
    Returns a InfModelF.
    -
    -
    - getInstanceRdfType -
    -
    - -
    returns the rdf:type, that this distinct resource is instance of.
    -
    -
    - getIsAnon -
    -
    -
    ResResource::getIsAnon() in ResResource.php
    -
    Determine whether this resource is an anonymous resource
    -
    -
    - getIsCol -
    -
    - -
    -
    - getIsDefinedBy -
    -
    - -
    Answer a resource that is declared to provide a definition of this resource.
    -
    -
    - getLabel -
    -
    -
    Resource::getLabel() in Resource.php
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    -
    - getLabel -
    -
    -
    BlankNode::getLabel() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getLabel -
    -
    -
    Literal::getLabel() in Literal.php
    -
    Returns the string value of the literal.
    -
    -
    - getLabelObject -
    -
    - -
    Reurns the URI, text or bNode identifier of the statements's object.
    -
    -
    - getLabelPredicate -
    -
    - -
    Returns the URI of the statements's predicate.
    -
    -
    - getLabelProperty -
    -
    - -
    Answer the label ResLiteral for this object.
    -
    -
    - getLabelSubject -
    -
    - -
    Returns the URI or bNode identifier of the statements's subject.
    -
    -
    - getLangCol -
    -
    - -
    -
    - getLanguage -
    -
    -
    Literal::getLanguage() in Literal.php
    -
    Returns the language of the literal.
    -
    -
    - getLanguageTag -
    -
    - -
    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.
    -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getLocalName -
    -
    - -
    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    -
    -
    - getLocalName -
    -
    -
    Resource::getLocalName() in Resource.php
    -
    Returns the local name of the resource.
    -
    -
    - getMember -
    -
    -
    ResSeq::getMember() in ResSeq.php
    -
    Get the member at a given index
    -
    -
    - getMembers -
    -
    -
    ResContainer::getMembers() in ResContainer.php
    -
    Get an array of all resources that are values of this container
    -
    -
    - getMemModel -
    -
    -
    InfModelB::getMemModel() in InfModelB.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.
    -
    -
    - getMemModel -
    -
    -
    InfModelF::getMemModel() in InfModelF.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.
    -
    -
    - getMemModel -
    -
    -
    ModelFactory::getMemModel() in ModelFactory.php
    -
    Returns a MemModel.
    -
    -
    - getMemModel -
    -
    -
    DbModel::getMemModel() in DbModel.php
    -
    Create a MemModel containing all the triples of the current DbModel.
    -
    -
    - getMemModelByRDQL -
    -
    - -
    Perform an RDQL query on this Model. Should work with all types of models.
    -
    -
    - getModel -
    -
    -
    DbStore::getModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getModel -
    -
    -
    ResModel::getModel() in ResModel.php
    -
    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    -
    -
    - getModelID -
    -
    -
    DbModel::getModelID() in DbModel.php
    -
    Returns the model id
    -
    -
    - getModifiedFind -
    -
    - -
    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.
    -
    -
    - getNamedGraph -
    -
    -
    DatasetMem::getNamedGraph() in DatasetMem.php
    -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraph -
    -
    - -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getNamespace -
    -
    - -
    Extracts the namespace prefix out of the URI of a Resource.
    -
    -
    - getNamespace -
    -
    -
    Resource::getNamespace() in Resource.php
    -
    Returns the namespace of the resource. May return null.
    -
    -
    - getNewDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.
    -
    -
    - getNewModel -
    -
    -
    DbStore::getNewModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.
    -
    -
    - getNewNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).
    -
    -
    - getNewPattern -
    -
    - -
    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.
    -
    -
    - getObject -
    -
    -
    Statement::getObject() in Statement.php
    -
    Returns the object of the triple.
    -
    -
    - getObject -
    -
    -
    QueryTriple::getObject() in QueryTriple.php
    -
    Returns the Triples Object.
    -
    -
    - getObject -
    -
    -
    Quad::getObject() in Quad.php
    -
    Returns the object.
    -
    -
    - getOntModel -
    -
    - -
    Returns an OntModel with this model as baseModel.
    -
    -
    - getOntModel -
    -
    -
    ModelFactory::getOntModel() in ModelFactory.php
    -
    Returns an OntModel.
    -
    -
    - getOntModelForBaseModel -
    -
    - -
    Creates an OntModel that wraps an existing base model.
    -
    -
    - getOptional -
    -
    -
    GraphPattern::getOptional() in GraphPattern.php
    -
    Returns a pointer to an optional graph pattern.
    -
    -
    - getOrd -
    -
    -
    RDFUtil::getOrd() in RdfUtil.php
    -
    Converts an ordinal RDF resource to an integer.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPointer -
    -
    -
    SparqlParserException::getPointer() in SparqlParserException.php
    -
    Returns a pointer to the token which caused the exception.
    -
    -
    - getPovs -
    -
    -
    N3Parser::getPovs() in N3Parser.php
    -
    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    -
    -
    - getPredicate -
    -
    -
    QueryTriple::getPredicate() in QueryTriple.php
    -
    Returns the Triples Predicate.
    -
    -
    - getPredicate -
    -
    - -
    Returns the predicate.
    -
    -
    - getPredicate -
    -
    -
    Statement::getPredicate() in Statement.php
    -
    Returns the predicate of the triple.
    -
    -
    - getPrefix -
    -
    -
    RDFUtil::getPrefix() in RdfUtil.php
    -
    Short Prefix for known Namespaces by given URI
    -
    -
    - getPrefixes -
    -
    - -
    Returns the prefix map of the query.
    -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getProperty -
    -
    -
    ResResource::getProperty() in ResResource.php
    -
    Answer some statement (this, p, O) in the associated model.
    -
    -
    - getProperty -
    -
    -
    ResModel::getProperty() in ResModel.php
    -
    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    -
    -
    - getPropertyValue -
    -
    - -
    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.
    -
    -
    - getQuery -
    -
    -
    SparqlEngineDb::getQuery() in SparqlEngineDb.php
    -
    -
    - getQuery -
    -
    -
    SparqlEngine::getQuery() in SparqlEngine.php
    -
    -
    - getRange -
    -
    -
    OntProperty::getRange() in OntProperty.php
    -
    Answer a OntClass that represents the range class of this property.
    -
    -
    - getRDFType -
    -
    -
    OntResource::getRDFType() in OntResource.php
    -
    Answer the rdf:type (ie the class) of this resource.
    -
    -
    - getResModel -
    -
    - -
    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).
    -
    -
    - getResModel -
    -
    -
    ModelFactory::getResModel() in ModelFactory.php
    -
    Returns a ResModel.
    -
    -
    - getResModelForBaseModel -
    -
    - -
    Creates a ResModel that wraps an existing base model.
    -
    -
    - getResultForm -
    -
    - -
    Returns the type the result shall have.
    -
    -
    - getResultLabels -
    -
    -
    RdqlResultIterator::getResultLabels() in RdqlResultIterator.php
    -
    Returns the labels of the result as array.
    -
    -
    - getResultPart -
    -
    - -
    Returns a list containing the graph patterns of the query.
    -
    -
    - getResultVars -
    -
    - -
    Returns a list containing the result vars.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSchema -
    -
    -
    InfModel::getSchema() in InfModel.php
    -
    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.
    -
    -
    - getSeeAlso -
    -
    -
    OntResource::getSeeAlso() in OntResource.php
    -
    Answer a resource that provides additional information about this resource.
    -
    -
    - getSelect -
    -
    - -
    -
    - getSolutionModifier -
    -
    - -
    Gets the solution modifiers of the query.
    -
    -
    - getSparqlClient -
    -
    - -
    Creates a SparqlClient.
    -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlGenerator -
    -
    -
    SparqlEngineDb::getSqlGenerator() in SparqlEngineDb.php
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStatement -
    -
    - -
    Returns the statement(subject,predicate,object).
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the Model.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the MemModel.
    -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getSubClass -
    -
    -
    OntClass::getSubClass() in OntClass.php
    -
    Answer a class that is the sub-class of this class.
    -
    -
    - getSubject -
    -
    -
    Statement::getSubject() in Statement.php
    -
    Returns the subject of the triple.
    -
    -
    - getSubject -
    -
    -
    Quad::getSubject() in Quad.php
    -
    Returns the subject.
    -
    -
    - getSubject -
    -
    -
    QueryTriple::getSubject() in QueryTriple.php
    -
    Returns the Triples Subject.
    -
    -
    - getSubProperty -
    -
    - -
    Answer a property that is the sub-property of this property.
    -
    -
    - getSuperClass -
    -
    - -
    Answer a class that is the super-class of this class.
    -
    -
    - getSuperProperty -
    -
    - -
    Answer a property that is the super-property of this property.
    -
    -
    - getTail -
    -
    -
    ResList::getTail() in ResList.php
    -
    Get the list that is the tail of this list.
    -
    -
    - getTree -
    -
    -
    Constraint::getTree() in Constraint.php
    -
    -
    - getTrigger -
    -
    -
    InfRule::getTrigger() in InfRule.php
    -
    -
    - getTriplePattern -
    -
    - -
    Returns the triple pattern of the graph pattern.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getTypeSorter -
    -
    -
    SparqlEngineDb::getTypeSorter() in SparqlEngineDb.php
    -
    -
    - getUnion -
    -
    -
    GraphPattern::getUnion() in GraphPattern.php
    -
    Returns a pointer to a union graph pattern.
    -
    -
    - getURI -
    -
    -
    Resource::getURI() in Resource.php
    -
    Returns the URI of the resource.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getVariables -
    -
    -
    QueryTriple::getVariables() in QueryTriple.php
    -
    Returns an array of all variables in this triple.
    -
    -
    - getVariables -
    -
    -
    GraphPattern::getVariables() in GraphPattern.php
    -
    Returns an array of all variables used in this graph pattern.
    -
    -
    - getVocabulary -
    -
    -
    OntResource::getVocabulary() in OntResource.php
    -
    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.
    -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - GIVEN -
    -
    -
    VCARD::GIVEN() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD_RES::GIVEN() in VCARD_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF_RES::GIVENNAME() in FOAF_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF::GIVENNAME() in FOAF_C.php
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern::GraphPattern() in GraphPattern.php
    -
    Constructor
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern in GraphPattern.php
    -
    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.
    -
    -
    - GRAPHVIZ_FORMAT -
    -
    -
    GRAPHVIZ_FORMAT in constants.php
    -
    -
    - GRAPHVIZ_PATH -
    -
    -
    GRAPHVIZ_PATH in constants.php
    -
    -
    - GRAPHVIZ_STAT -
    -
    -
    GRAPHVIZ_STAT in constants.php
    -
    -
    - GRAPHVIZ_TEMP -
    -
    -
    GRAPHVIZ_TEMP in constants.php
    -
    -
    - GRAPHVIZ_URI -
    -
    -
    GRAPHVIZ_URI in constants.php
    -
    -
    - GRDDLParser -
    -
    -
    GRDDLParser in GRDDLParser.php
    -
    A GRDDLParser.
    -
    -
    - GROUP -
    -
    -
    VCARD_RES::GROUP() in VCARD_RES.php
    -
    -
    - GROUP -
    -
    -
    VCARD::GROUP() in VCARD_C.php
    -
    -
    - GROUP -
    -
    -
    FOAF_RES::GROUP() in FOAF_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF::GROUP() in FOAF_C.php
    -
    -
    - guessName -
    -
    -
    RDFUtil::guessName() in RdfUtil.php
    -
    Delivers the name out of the URI (without the namespace prefix).
    -
    -
    - guessNamespace -
    -
    - -
    Extracts the namespace prefix out of a URI.
    -
    -
    - guessPrefix -
    -
    -
    RDFUtil::guessPrefix() in RdfUtil.php
    -
    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found
    -
    -
    - GraphPattern.php -
    -
    -
    GraphPattern.php in GraphPattern.php
    -
    -
    - GRDDLParser.php -
    -
    -
    GRDDLParser.php in GRDDLParser.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - $headers -
    -
    -
    Snoopy::$headers in Snoopy.class.inc
    -
    -
    - $host -
    -
    -
    Snoopy::$host in Snoopy.class.inc
    -
    ** Public variables ***
    -
    -
    - hasComment -
    -
    -
    OntResource::hasComment() in OntResource.php
    -
    Answer true if this resource has the given comment.
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if an defaultGraph exists. False otherwise .
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if a defaultGraph exists. False otherwise.
    -
    -
    - hasDomain -
    -
    -
    OntProperty::hasDomain() in OntProperty.php
    -
    Answer true if the given resource a class specifying the domain of this property.
    -
    -
    - hashCode -
    -
    -
    Statement::hashCode() in Statement.php
    -
    Retruns the hash code of the triple.
    -
    -
    - hasLabelProperty -
    -
    - -
    Answer true if this resource has the given label.
    -
    -
    - hasNext -
    -
    -
    RdqlResultIterator::hasNext() in RdqlResultIterator.php
    -
    Returns TRUE if there are more results.
    -
    -
    - hasNext -
    -
    -
    StatementIterator::hasNext() in StatementIterator.php
    -
    Returns TRUE if there are more statements.
    -
    -
    - hasNext -
    -
    -
    FindIterator::hasNext() in FindIterator.php
    -
    Returns TRUE if there are more matching statements.
    -
    -
    - hasPrevious -
    -
    -
    RdqlResultIterator::hasPrevious() in RdqlResultIterator.php
    -
    Returns TRUE if the first result has not been reached.
    -
    -
    - hasPrevious -
    -
    -
    StatementIterator::hasPrevious() in StatementIterator.php
    -
    Returns TRUE if the first statement has not been reached.
    -
    -
    - hasProperty -
    -
    -
    ResResource::hasProperty() in ResResource.php
    -
    Determine whether this resource has any values for a given property.
    -
    -
    - hasRange -
    -
    -
    OntProperty::hasRange() in OntProperty.php
    -
    Answer true if the given resource a class specifying the range of this property.
    -
    -
    - hasRDFType -
    -
    -
    OntResource::hasRDFType() in OntResource.php
    -
    Answer true if this resource has the given rdf:type.
    -
    -
    - hasSeeAlso -
    -
    -
    OntResource::hasSeeAlso() in OntResource.php
    -
    Answer true if this resource has the given resource as a source of additional information.
    -
    -
    - hasSubclass -
    -
    -
    OntClass::hasSubclass() in OntClass.php
    -
    Answer true if the given class is a sub-class of this class.
    -
    -
    - hasSubProperty -
    -
    - -
    Answer true if the given property is a sub-property of this property.
    -
    -
    - hasSuperClass -
    -
    - -
    Answer true if the given class is a super-class of this class.
    -
    -
    - hasSuperProperty -
    -
    - -
    Answer true if the given property is a super-property of this property.
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM_RES::HAS_CHILD() in ATOM_RES.php
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM::HAS_CHILD() in ATOM_C.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM_RES::HAS_ENTRY() in ATOM_RES.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM::HAS_ENTRY() in ATOM_C.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC_RES::HAS_FORMAT() in DC_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC::HAS_FORMAT() in DC_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM::HAS_LINK() in ATOM_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM_RES::HAS_LINK() in ATOM_RES.php
    -
    -
    - HAS_PART -
    -
    -
    DC::HAS_PART() in DC_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC_RES::HAS_PART() in DC_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM_RES::HAS_TITLE() in ATOM_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM::HAS_TITLE() in ATOM_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL::HAS_VALUE() in OWL_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWLVocabulary::HAS_VALUE() in OWLVocabulary.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL_RES::HAS_VALUE() in OWL_RES.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC::HAS_VERSION() in DC_C.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC_RES::HAS_VERSION() in DC_RES.php
    -
    -
    - HIDE_ADVERTISE -
    -
    -
    HIDE_ADVERTISE in constants.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    -
    FOAF::HOLDS_ACCOUNT() in FOAF_C.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    - -
    -
    - HOMEPAGE -
    -
    -
    FOAF::HOMEPAGE() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF_RES::HOMEPAGE() in FOAF_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM::HREF() in ATOM_C.php
    -
    -
    - HREF -
    -
    -
    ATOM_RES::HREF() in ATOM_RES.php
    -
    -
    - HTML_TABLE_BNODE_COLOR -
    -
    -
    HTML_TABLE_BNODE_COLOR in constants.php
    -
    -
    - HTML_TABLE_HEADER_COLOR -
    -
    -
    HTML_TABLE_HEADER_COLOR in constants.php
    -
    -
    - HTML_TABLE_LITERAL_COLOR -
    -
    -
    HTML_TABLE_LITERAL_COLOR in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR0 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR0 in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR1 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR1 in constants.php
    -
    -
    - HTML_TABLE_RDF_NS_COLOR -
    -
    -
    HTML_TABLE_RDF_NS_COLOR in constants.php
    -
    -
    - HTML_TABLE_RESOURCE_COLOR -
    -
    -
    HTML_TABLE_RESOURCE_COLOR in constants.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $image -
    -
    -
    MagpieRSS::$image in rss_parse.inc
    -
    -
    - $inchannel -
    -
    -
    MagpieRSS::$inchannel in rss_parse.inc
    -
    -
    - $incontent -
    -
    -
    MagpieRSS::$incontent in rss_parse.inc
    -
    -
    - $inimage -
    -
    -
    MagpieRSS::$inimage in rss_parse.inc
    -
    -
    - $initem -
    -
    -
    MagpieRSS::$initem in rss_parse.inc
    -
    -
    - $intextinput -
    -
    -
    MagpieRSS::$intextinput in rss_parse.inc
    -
    -
    - $isConstructPattern -
    -
    - -
    -
    - $isEmpty -
    -
    -
    Query::$isEmpty in Query.php
    -
    TRUE if the query is empty FALSE if not.
    -
    -
    - $items -
    -
    -
    MagpieRSS::$items in rss_parse.inc
    -
    -
    - IteratorAllGraphsDb.php -
    -
    -
    IteratorAllGraphsDb.php in IteratorAllGraphsDb.php
    -
    -
    - IteratorAllGraphsMem.php -
    -
    -
    IteratorAllGraphsMem.php in IteratorAllGraphsMem.php
    -
    -
    - IteratorFindQuadsDb.php -
    -
    -
    IteratorFindQuadsDb.php in IteratorFindQuadsDb.php
    -
    -
    - IteratorFindQuadsMem.php -
    -
    -
    IteratorFindQuadsMem.php in IteratorFindQuadsMem.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF_RES::ICQ_CHAT_ID() in FOAF_RES.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF::ICQ_CHAT_ID() in FOAF_C.php
    -
    -
    - ID -
    -
    -
    RDF_RES::ID() in RDF_RES.php
    -
    -
    - ID -
    -
    -
    RDF::ID() in RDF_C.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC_RES::IDENTIFIER() in DC_RES.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC::IDENTIFIER() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS_RES::IMAGE() in RSS_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC_RES::IMAGE() in DC_RES.php
    -
    -
    - IMAGE -
    -
    -
    FOAF_RES::IMAGE() in FOAF_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC::IMAGE() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    FOAF::IMAGE() in FOAF_C.php
    -
    -
    - image -
    -
    -
    RssParser::image() in RssParser.php
    -
    Parses the image if there is one.
    -
    -
    - IMAGE -
    -
    -
    RSS::IMAGE() in RSS_C.php
    -
    -
    - IMG -
    -
    -
    FOAF_RES::IMG() in FOAF_RES.php
    -
    -
    - IMG -
    -
    -
    FOAF::IMG() in FOAF_C.php
    -
    -
    - IMPORTS -
    -
    -
    OWLVocabulary::IMPORTS() in OWLVocabulary.php
    -
    -
    - IMPORTS -
    -
    -
    OWL_RES::IMPORTS() in OWL_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL::IMPORTS() in OWL_C.php
    -
    -
    - IMT -
    -
    -
    DC_RES::IMT() in DC_RES.php
    -
    -
    - IMT -
    -
    -
    DC::IMT() in DC_C.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INDENTATION -
    -
    -
    INDENTATION in constants.php
    -
    -
    - index -
    -
    -
    MemModel::index() in MemModel.php
    -
    Builds a search index for the statements in the MemModel.
    -
    -
    - indexOf -
    -
    -
    ResList::indexOf() in ResList.php
    -
    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.
    -
    -
    - indexOf -
    -
    -
    ResSeq::indexOf() in ResSeq.php
    -
    Return the index of a given member of the sequence.
    -
    -
    - INDEX_TYPE -
    -
    -
    INDEX_TYPE in constants.php
    -
    -
    - Individual -
    -
    -
    Individual::Individual() in Individual.php
    -
    Constructor You can supply a uri
    -
    -
    - Individual -
    -
    -
    Individual in Individual.php
    -
    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.
    -
    -
    - IND_DEF -
    -
    -
    IND_DEF in constants.php
    -
    -
    - IND_SO -
    -
    -
    IND_SO in constants.php
    -
    -
    - IND_SP -
    -
    -
    IND_SP in constants.php
    -
    -
    - IND_SPO -
    -
    -
    IND_SPO in constants.php
    -
    -
    - InfModel -
    -
    -
    InfModel::InfModel() in InfModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModel -
    -
    -
    InfModel in InfModel.php
    -
    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.
    -
    -
    - InfModel.php -
    -
    -
    InfModel.php in InfModel.php
    -
    -
    - InfModelB.php -
    -
    -
    InfModelB.php in InfModelB.php
    -
    -
    - InfModelF.php -
    -
    -
    InfModelF.php in InfModelF.php
    -
    -
    - InfModelP.php -
    -
    -
    InfModelP.php in InfModelP.php
    -
    -
    - InfRule.php -
    -
    -
    InfRule.php in InfRule.php
    -
    -
    - InfStatement.php -
    -
    -
    InfStatement.php in InfStatement.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB::InfModelB() in InfModelB.php
    -
    Constructor You can supply a base_uri
    -
    -
    - INFMODELB -
    -
    -
    INFMODELB in constants.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB in InfModelB.php
    -
    A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    -
    -
    - InfModelF -
    -
    -
    InfModelF::InfModelF() in InfModelF.php
    -
    Constructor You can supply a base_uri.
    -
    -
    - InfModelF -
    -
    -
    InfModelF in InfModelF.php
    -
    A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    -
    -
    - INFMODELF -
    -
    -
    INFMODELF in constants.php
    -
    -
    - INFO -
    -
    -
    ATOM_RES::INFO() in ATOM_RES.php
    -
    -
    - INFO -
    -
    -
    ATOM::INFO() in ATOM_C.php
    -
    -
    - InfRule -
    -
    -
    InfRule in InfRule.php
    -
    This class represents a single rule in a RDFS inference model.
    -
    -
    - infRule -
    -
    -
    InfRule::infRule() in InfRule.php
    -
    Constructor
    -
    -
    - InfStatement -
    -
    -
    InfStatement in InfStatement.php
    -
    An RDF statement which was entailed by a inference rule.
    -
    -
    - INF_RES_DOMAIN -
    -
    -
    INF_RES_DOMAIN in constants.php
    -
    -
    - INF_RES_OWL_INVERSEOF -
    -
    -
    INF_RES_OWL_INVERSEOF in constants.php
    -
    -
    - INF_RES_OWL_SAMEAS -
    -
    -
    INF_RES_OWL_SAMEAS in constants.php
    -
    -
    - INF_RES_RANGE -
    -
    -
    INF_RES_RANGE in constants.php
    -
    -
    - INF_RES_RULE_RDFS6 -
    -
    -
    INF_RES_RULE_RDFS6 in constants.php
    -
    -
    - INF_RES_RULE_RDFS8 -
    -
    -
    INF_RES_RULE_RDFS8 in constants.php
    -
    -
    - INF_RES_RULE_RDFS10 -
    -
    -
    INF_RES_RULE_RDFS10 in constants.php
    -
    -
    - INF_RES_RULE_RDFS12 -
    -
    -
    INF_RES_RULE_RDFS12 in constants.php
    -
    -
    - INF_RES_RULE_RDFS13 -
    -
    -
    INF_RES_RULE_RDFS13 in constants.php
    -
    -
    - INF_RES_SUBCLASSOF -
    -
    -
    INF_RES_SUBCLASSOF in constants.php
    -
    -
    - INF_RES_SUBPROPERTYOF -
    -
    -
    INF_RES_SUBPROPERTYOF in constants.php
    -
    -
    - init -
    -
    -
    init() in rss_fetch.inc
    -
    -
    - INTERACTIVERESOURCE -
    -
    - -
    -
    - INTERACTIVE_RESOURCE -
    -
    - -
    -
    - INTEREST -
    -
    -
    FOAF::INTEREST() in FOAF_C.php
    -
    -
    - INTEREST -
    -
    -
    FOAF_RES::INTEREST() in FOAF_RES.php
    -
    -
    - intersect -
    -
    -
    ResModel::intersect() in ResModel.php
    -
    Returns a new model containing all the statements which are in both this model and another.
    -
    -
    - intersect -
    -
    -
    MemModel::intersect() in MemModel.php
    -
    Returns a new MemModel containing all the statements which are in both this MemModel and another.
    -
    -
    - intersect -
    -
    -
    DbModel::intersect() in DbModel.php
    -
    Return a new MemModel containing all the statements which are in both this model and the given model.
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWLVocabulary::INVERSE_OF() in OWLVocabulary.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL::INVERSE_OF() in OWL_C.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL_RES::INVERSE_OF() in OWL_RES.php
    -
    -
    - IN_DESCRIPTION -
    -
    -
    IN_DESCRIPTION in constants.php
    -
    -
    - IN_PROPERTY_EMPTY_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_LITERAL -
    -
    -
    IN_PROPERTY_LITERAL in constants.php
    -
    -
    - IN_PROPERTY_PARSE_TYPE_COLLECTION -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_LITERAL -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_RESOURCE -
    -
    -
    IN_PROPERTY_RESOURCE in constants.php
    -
    -
    - IN_PROPERTY_UNKNOWN_OBJECT -
    -
    - -
    -
    - IN_RDF -
    -
    -
    IN_RDF in constants.php
    -
    -
    - IN_TOP_LEVEL -
    -
    -
    IN_TOP_LEVEL in constants.php
    -
    -
    - IN_UNKNOWN -
    -
    -
    IN_UNKNOWN in constants.php
    -
    -
    - IN_XML -
    -
    -
    IN_XML in constants.php
    -
    -
    - iriCheck -
    -
    -
    SparqlParser::iriCheck() in SparqlParser.php
    -
    Checks if $token is an IRI.
    -
    -
    - isAlt -
    -
    -
    ResContainer::isAlt() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Alt
    -
    -
    - isBag -
    -
    -
    ResContainer::isBag() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Bag
    -
    -
    - isDefinedBy -
    -
    -
    OntResource::isDefinedBy() in OntResource.php
    -
    Answer true if this resource is defined by the given resource.
    -
    -
    - isEmpty -
    -
    -
    Query::isEmpty() in Query.php
    -
    Returns $isEmpty variable
    -
    -
    - isEmpty -
    -
    -
    DatasetMem::isEmpty() in DatasetMem.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    DbModel::isEmpty() in DbModel.php
    -
    Check if this DbModel is empty.
    -
    -
    - isEmpty -
    -
    -
    DatasetDb::isEmpty() in DatasetDb.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    MemModel::isEmpty() in MemModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    ResList::isEmpty() in ResList.php
    -
    Returns true, if this list is empty
    -
    -
    - isEmpty -
    -
    -
    ResModel::isEmpty() in ResModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isIndexed -
    -
    -
    MemModel::isIndexed() in MemModel.php
    -
    Returns true if there is an index, false if not.
    -
    -
    - isNumber -
    -
    - -
    -
    - ISO639_2 -
    -
    -
    DC::ISO639_2() in DC_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC_RES::ISO639_2() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC_RES::ISO3166() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC::ISO3166() in DC_C.php
    -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isOuterFilter -
    -
    -
    Constraint::isOuterFilter() in Constraint.php
    -
    Returns true if this constraint is an outer filter- false if not.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isRDF -
    -
    -
    RDFUtil::isRDF() in RdfUtil.php
    -
    Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSeq -
    -
    -
    ResContainer::isSeq() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Seq
    -
    -
    - isSetup -
    -
    -
    DbStore::isSetup() in DbStore.php
    -
    Checks if tables are setup for RAP
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - ISSUED -
    -
    -
    ATOM_RES::ISSUED() in ATOM_RES.php
    -
    -
    - ISSUED -
    -
    -
    ATOM::ISSUED() in ATOM_C.php
    -
    -
    - ISSUED -
    -
    -
    DC_RES::ISSUED() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC::ISSUED() in DC_C.php
    -
    -
    - isValid -
    -
    -
    ResList::isValid() in ResList.php
    -
    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - is_atom -
    -
    -
    MagpieRSS::is_atom() in rss_parse.inc
    -
    -
    - is_client_error -
    -
    -
    is_client_error() in rss_fetch.inc
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RDFS::IS_DEFINED_BY() in RDFS_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    -
    OWLVocabulary::IS_DEFINED_BY() in OWLVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RdfsVocabulary::IS_DEFINED_BY() in RdfsVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    - -
    -
    - is_error -
    -
    -
    is_error() in rss_fetch.inc
    -
    -
    - IS_FORMAT_OF -
    -
    -
    DC::IS_FORMAT_OF() in DC_C.php
    -
    -
    - IS_FORMAT_OF -
    -
    - -
    -
    - is_info -
    -
    -
    is_info() in rss_fetch.inc
    -
    -
    - IS_PART_OF -
    -
    -
    DC::IS_PART_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC_RES::IS_PART_OF() in DC_RES.php
    -
    -
    - is_redirect -
    -
    -
    is_redirect() in rss_fetch.inc
    -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - is_rss -
    -
    -
    MagpieRSS::is_rss() in rss_parse.inc
    -
    -
    - is_server_error -
    -
    -
    is_server_error() in rss_fetch.inc
    -
    -
    - is_success -
    -
    -
    is_success() in rss_fetch.inc
    -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - ITEM -
    -
    -
    RSS::ITEM() in RSS_C.php
    -
    -
    - ITEM -
    -
    -
    RSS_RES::ITEM() in RSS_RES.php
    -
    -
    - items -
    -
    -
    RssParser::items() in RssParser.php
    -
    Parses the rss items/ atom entries.
    -
    -
    - ITEMS -
    -
    -
    RSS::ITEMS() in RSS_C.php
    -
    -
    - ITEMS -
    -
    -
    RSS_RES::ITEMS() in RSS_RES.php
    -
    -
    - IteratorAllGraphsDb -
    -
    -
    IteratorAllGraphsDb in IteratorAllGraphsDb.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    -
    IteratorAllGraphsMem in IteratorAllGraphsMem.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorFindQuadsDb -
    -
    -
    IteratorFindQuadsDb in IteratorFindQuadsDb.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsMem -
    -
    -
    IteratorFindQuadsMem in IteratorFindQuadsMem.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsMem -
    -
    - -
    Constructor.
    -
    -
    - IterFind -
    -
    -
    IterFind in IterFind.php
    -
    Implementation of a find-iterator which delivers statements or quads.
    -
    -
    - iterFind -
    -
    -
    MemModel::iterFind() in MemModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - iterFind -
    -
    -
    DbModel::iterFind() in DbModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - IterFind -
    -
    -
    IterFind::IterFind() in IterFind.php
    -
    Constructor.
    -
    -
    - Individual.php -
    -
    -
    Individual.php in Individual.php
    -
    -
    - IterFind.php -
    -
    -
    IterFind.php in IterFind.php
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - JABBER_ID -
    -
    -
    FOAF_RES::JABBER_ID() in FOAF_RES.php
    -
    -
    - JABBER_ID -
    -
    -
    FOAF::JABBER_ID() in FOAF_C.php
    -
    -
    - joinOptionalTuples -
    -
    - -
    Joins OPTIONAL pattern results.
    -
    -
    - joinResults -
    -
    -
    SparqlEngine::joinResults() in SparqlEngine.php
    -
    Joins the results of the different Graphpatterns.
    -
    -
    - joinTuples -
    -
    -
    SparqlEngine::joinTuples() in SparqlEngine.php
    -
    Perform an SQL-like inner join on two resultSets.
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    ResIterator::key() in ResIterator.php
    -
    Returns the key of the current item
    -
    -
    - KEY -
    -
    -
    VCARD::KEY() in VCARD_C.php
    -
    -
    - KEY -
    -
    -
    VCARD_RES::KEY() in VCARD_RES.php
    -
    -
    - key -
    -
    -
    IterFind::key() in IterFind.php
    -
    Returns the key of the current item
    -
    -
    - key -
    -
    -
    IteratorFindQuadsMem::key() in IteratorFindQuadsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsDb::key() in IteratorAllGraphsDb.php
    -
    Returns the key of the current item
    -
    -
    - key -
    -
    -
    IteratorAllGraphsMem::key() in IteratorAllGraphsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorFindQuadsDb::key() in IteratorFindQuadsDb.php
    -
    Returns the key of the current item.
    -
    -
    - known_encoding -
    -
    - -
    -
    - KNOWS -
    -
    -
    FOAF_RES::KNOWS() in FOAF_RES.php
    -
    -
    - KNOWS -
    -
    -
    FOAF::KNOWS() in FOAF_C.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lang -
    -
    -
    SparqlResultParser::$lang in SparqlResultParser.php
    -
    -
    - $lastredirectaddr -
    -
    -
    Snoopy::$lastredirectaddr in Snoopy.class.inc
    -
    -
    - LABEL -
    -
    -
    VCARD_RES::LABEL() in VCARD_RES.php
    -
    -
    - LABEL -
    -
    -
    VCARD::LABEL() in VCARD_C.php
    -
    -
    - LABEL -
    -
    -
    RDFS_RES::LABEL() in RDFS_RES.php
    -
    -
    - LABEL -
    -
    -
    RdfsVocabulary::LABEL() in RdfsVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LABEL -
    -
    -
    RDFS::LABEL() in RDFS_C.php
    -
    -
    - LABEL -
    -
    -
    OWLVocabulary::LABEL() in OWLVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LANG -
    -
    -
    ATOM::LANG() in ATOM_C.php
    -
    -
    - lang -
    -
    -
    lang() in FilterFunctions.php
    -
    Evaluates the lang() function. Returns lang tag of a Literal.
    -
    -
    - LANG -
    -
    -
    ATOM_RES::LANG() in ATOM_RES.php
    -
    -
    - langMatches -
    -
    -
    langMatches() in FilterFunctions.php
    -
    Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    -
    -
    - LANGUAGE -
    -
    -
    DC_RES::LANGUAGE() in DC_RES.php
    -
    -
    - LANGUAGE -
    -
    -
    DC::LANGUAGE() in DC_C.php
    -
    -
    - LCC -
    -
    -
    DC_RES::LCC() in DC_RES.php
    -
    -
    - LCC -
    -
    -
    DC::LCC() in DC_C.php
    -
    -
    - LCSH -
    -
    -
    DC_RES::LCSH() in DC_RES.php
    -
    -
    - LCSH -
    -
    -
    DC::LCSH() in DC_C.php
    -
    -
    - LI -
    -
    -
    RDF::LI() in RDF_C.php
    -
    -
    - LI -
    -
    -
    RDF_RES::LI() in RDF_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC_RES::LICENSE() in DC_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC::LICENSE() in DC_C.php
    -
    -
    - LINEFEED -
    -
    -
    LINEFEED in constants.php
    -
    -
    - LINK -
    -
    -
    ATOM_RES::LINK() in ATOM_RES.php
    -
    -
    - LINK -
    -
    -
    ATOM::LINK() in ATOM_C.php
    -
    -
    - LINK -
    -
    -
    RSS::LINK() in RSS_C.php
    -
    -
    - LINK -
    -
    -
    RSS_RES::LINK() in RSS_RES.php
    -
    -
    - listClasses -
    -
    -
    OntModel::listClasses() in OntModel.php
    -
    Answer an array that ranges over all of the various forms of class description resource in this model.
    -
    -
    - listComments -
    -
    -
    OntResource::listComments() in OntResource.php
    -
    Answer an array of all of the comment literals for this resource.
    -
    -
    - listDomain -
    -
    -
    OntProperty::listDomain() in OntProperty.php
    -
    Answer an array of all of the declared domain classes of this property.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listInstances -
    -
    - -
    Answer an ResIterator over the individuals in the model that have this class among their types.
    -
    -
    - listIsDefinedBy -
    -
    - -
    Answer an array of all of the resources that are declared to define this resource.
    -
    -
    - listLabelProperties -
    -
    - -
    Answer an array of all of the label literals for this resource, with the given language, if $language is set.
    -
    -
    - listModels -
    -
    -
    DbStore::listModels() in DbStore.php
    -
    List all DbModels stored in the database.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listObjects -
    -
    -
    ResModel::listObjects() in ResModel.php
    -
    Returns a ResIterator with all objects in a model.
    -
    -
    - listObjectsOfProperty -
    -
    - -
    Returns a ResIterator with all objects with a given property and property value.
    -
    -
    - listProperties -
    -
    - -
    List all the values with the property p as statements in an array.
    -
    -
    - listProperty -
    -
    -
    OntResource::listProperty() in OntResource.php
    -
    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.
    -
    -
    - listRange -
    -
    -
    OntProperty::listRange() in OntProperty.php
    -
    Answer an array of all of the declared range classes of this property.
    -
    -
    - listRDFTypes -
    -
    -
    OntResource::listRDFTypes() in OntResource.php
    -
    Answer an array of the RDF classes to which this resource belongs.
    -
    -
    - listSeeAlso -
    -
    -
    OntResource::listSeeAlso() in OntResource.php
    -
    Answer an array of all of the resources that are declared to provide addition information about this resource.
    -
    -
    - listSubClasses -
    -
    - -
    Answer an array over the classes that are declared to be sub-classes of this class.
    -
    -
    - listSubjects -
    -
    -
    ResModel::listSubjects() in ResModel.php
    -
    Returns a ResIterator with all subjects in a model.
    -
    -
    - listSubjectsWithProperty -
    -
    - -
    Returns a ResIterator with all subjects with a given property and property value.
    -
    -
    - listSubProperties -
    -
    - -
    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - listSuperClasses -
    -
    - -
    Answer an array over the classes that are declared to be super-classes of this class.
    -
    -
    - listSuperProperties -
    -
    - -
    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - LITERAL -
    -
    -
    RDFS::LITERAL() in RDFS_C.php
    -
    -
    - LITERAL -
    -
    -
    RDFS_RES::LITERAL() in RDFS_RES.php
    -
    -
    - Literal -
    -
    -
    Literal::Literal() in Literal.php
    -
    Constructor
    -
    -
    - Literal -
    -
    -
    Literal in Literal.php
    -
    An RDF literal.
    -
    -
    - LITERAL -
    -
    -
    RDF::LITERAL() in RDF_C.php
    -
    -
    - LITERAL -
    -
    -
    RDF_RES::LITERAL() in RDF_RES.php
    -
    -
    - literalCheck -
    -
    -
    SparqlParser::literalCheck() in SparqlParser.php
    -
    Checks if $token is a Literal.
    -
    -
    - load -
    -
    -
    Model::load() in Model.php
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    -
    - load -
    -
    -
    InfModelF::load() in InfModelF.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - load -
    -
    -
    ResModel::load() in ResModel.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadFromFile -
    -
    - -
    Load a Dataset from a File
    -
    -
    - loadFromString -
    -
    - -
    Load a Datset from a string
    -
    -
    - LOCALITY -
    -
    -
    VCARD_RES::LOCALITY() in VCARD_RES.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD::LOCALITY() in VCARD_C.php
    -
    -
    - LOGO -
    -
    -
    FOAF::LOGO() in FOAF_C.php
    -
    -
    - LOGO -
    -
    -
    FOAF_RES::LOGO() in FOAF_RES.php
    -
    -
    - Literal.php -
    -
    -
    Literal.php in Literal.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $maxframes -
    -
    -
    Snoopy::$maxframes in Snoopy.class.inc
    -
    -
    - $maxlength -
    -
    -
    Snoopy::$maxlength in Snoopy.class.inc
    -
    -
    - $maxredirs -
    -
    -
    Snoopy::$maxredirs in Snoopy.class.inc
    -
    -
    - $MAX_AGE -
    -
    -
    RSSCache::$MAX_AGE in rss_cache.inc
    -
    -
    - $mode -
    -
    -
    SparqlResultParser::$mode in SparqlResultParser.php
    -
    -
    - $model -
    -
    -
    N3Serializer::$model in N3Serializer.php
    -
    -
    - $model -
    -
    -
    RdfParser::$model in RdfParser.php
    -
    -
    - $model -
    -
    -
    NTripleSerializer::$model in NTripleSerializer.php
    -
    -
    - $modelID -
    -
    -
    SparqlEngineDb::$modelID in SparqlEngineDb.php
    -
    Internal ID for our graph model.
    -
    -
    - $m_attributeStatements -
    -
    - -
    -
    - $m_baseURI -
    -
    -
    RdfSerializer::$m_baseURI in RdfSerializer.php
    -
    -
    - $m_contentStatements -
    -
    - -
    -
    - $m_currentSubject -
    -
    - -
    -
    - $m_defaultNamespaces -
    -
    - -
    -
    - $m_groupTypeStatement -
    -
    - -
    -
    - $m_namespaces -
    -
    -
    RdfSerializer::$m_namespaces in RdfSerializer.php
    -
    -
    - $m_nextAutomaticPrefixIndex -
    -
    - -
    -
    - $m_out -
    -
    -
    RdfSerializer::$m_out in RdfSerializer.php
    -
    -
    - $m_rdfAboutElementText -
    -
    - -
    -
    - $m_rdfIDElementText -
    -
    - -
    -
    - $m_rdfResourceElementText -
    -
    - -
    -
    - $m_statements -
    -
    -
    RdfSerializer::$m_statements in RdfSerializer.php
    -
    -
    - MADE -
    -
    -
    FOAF_RES::MADE() in FOAF_RES.php
    -
    -
    - MADE -
    -
    -
    FOAF::MADE() in FOAF_C.php
    -
    -
    - MAGIC_STRING -
    -
    -
    MAGIC_STRING in N3Serializer.php
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS in rss_parse.inc
    -
    Hybrid parser, and object, takes RSS as a string and returns a simple object.
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS::MagpieRSS() in rss_parse.inc
    -
    Set up XML parser, parse source, and return populated RSS object..
    -
    -
    - MAGPIE_CACHE_AGE -
    -
    -
    MAGPIE_CACHE_AGE in magpie_debug.php
    -
    -
    - MAGPIE_DEBUG -
    -
    -
    MAGPIE_DEBUG in magpie_debug.php
    -
    -
    - MAGPIE_DIR -
    -
    -
    MAGPIE_DIR in rss_fetch.inc
    -
    -
    - magpie_error -
    -
    -
    magpie_error() in rss_fetch.inc
    -
    -
    - MAGPIE_EXTLIB -
    -
    -
    MAGPIE_EXTLIB in rss_fetch.inc
    -
    -
    - MAGPIE_OUTPUT_ENCODING -
    -
    -
    MAGPIE_OUTPUT_ENCODING in magpie_debug.php
    -
    -
    - MAGPIE_VERSION -
    -
    -
    MAGPIE_VERSION in rss_fetch.inc
    -
    -
    - MAILER -
    -
    -
    VCARD::MAILER() in VCARD_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD_RES::MAILER() in VCARD_RES.php
    -
    -
    - MAKER -
    -
    -
    FOAF::MAKER() in FOAF_C.php
    -
    -
    - MAKER -
    -
    -
    FOAF_RES::MAKER() in FOAF_RES.php
    -
    -
    - map_attrs -
    -
    -
    map_attrs() in rss_parse.inc
    -
    -
    - matchPattern -
    -
    -
    SparqlEngine::matchPattern() in SparqlEngine.php
    -
    Finds tuples that match one graph pattern.
    -
    -
    - matchPatterns -
    -
    -
    SparqlEngine::matchPatterns() in SparqlEngine.php
    -
    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.
    -
    -
    - MAX_ALLOWED_ABBREVIATED_LENGTH -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MBOX -
    -
    -
    FOAF_RES::MBOX() in FOAF_RES.php
    -
    -
    - MBOX -
    -
    -
    FOAF::MBOX() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF::MBOX_SHA1SUM() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF_RES::MBOX_SHA1SUM() in FOAF_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC_RES::MEDIATOR() in DC_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC::MEDIATOR() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC_RES::MEDIUM() in DC_RES.php
    -
    -
    - MEDIUM -
    -
    -
    DC::MEDIUM() in DC_C.php
    -
    -
    - MEMBER -
    -
    -
    RDFS::MEMBER() in RDFS_C.php
    -
    -
    - MEMBER -
    -
    -
    FOAF_RES::MEMBER() in FOAF_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS_RES::MEMBER() in RDFS_RES.php
    -
    -
    - MEMBER -
    -
    -
    FOAF::MEMBER() in FOAF_C.php
    -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MemModel -
    -
    -
    MemModel in MemModel.php
    -
    A MemModel is an RDF Model, which is stored in the main memory.
    -
    -
    - MemModel -
    -
    -
    MemModel::MemModel() in MemModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - MEMMODEL -
    -
    -
    MEMMODEL in constants.php
    -
    -
    - MESH -
    -
    -
    DC::MESH() in DC_C.php
    -
    -
    - MESH -
    -
    -
    DC_RES::MESH() in DC_RES.php
    -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - mkVal -
    -
    - -
    -
    - MODE -
    -
    -
    ATOM_RES::MODE() in ATOM_RES.php
    -
    -
    - MODE -
    -
    -
    ATOM::MODE() in ATOM_C.php
    -
    -
    - Model -
    -
    -
    Model::Model() in Model.php
    -
    Notice for people who are used to work with older versions of RAP.
    -
    -
    - Model -
    -
    -
    Model in Model.php
    -
    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    -
    -
    - MemModel.php -
    -
    -
    MemModel.php in MemModel.php
    -
    -
    - Model.php -
    -
    -
    Model.php in Model.php
    -
    -
    - ModelFactory.php -
    -
    -
    ModelFactory.php in ModelFactory.php
    -
    -
    - ModelP.php -
    -
    -
    ModelP.php in ModelP.php
    -
    -
    - ModelComparator -
    -
    -
    ModelComparator in ModelComparator.php
    -
    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.
    -
    -
    - modelExists -
    -
    -
    DbStore::modelExists() in DbStore.php
    -
    Check if the DbModel with the given modelURI is already stored in the database
    -
    -
    - ModelFactory -
    -
    -
    ModelFactory in ModelFactory.php
    -
    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.
    -
    -
    - MODIFIED -
    -
    -
    ATOM::MODIFIED() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    DC::MODIFIED() in DC_C.php
    -
    -
    - MODIFIED -
    -
    -
    DC_RES::MODIFIED() in DC_RES.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM_RES::MODIFIED() in ATOM_RES.php
    -
    -
    - moveFirst -
    -
    -
    RdqlResultIterator::moveFirst() in RdqlResultIterator.php
    -
    Moves the pointer to the first result.
    -
    -
    - moveFirst -
    -
    -
    StatementIterator::moveFirst() in StatementIterator.php
    -
    Moves the pointer to the first statement.
    -
    -
    - moveLast -
    -
    -
    StatementIterator::moveLast() in StatementIterator.php
    -
    Moves the pointer to the last statement.
    -
    -
    - moveLast -
    -
    -
    RdqlResultIterator::moveLast() in RdqlResultIterator.php
    -
    Moves the pointer to the last result.
    -
    -
    - moveTo -
    -
    -
    RdqlResultIterator::moveTo() in RdqlResultIterator.php
    -
    Moves the pointer to a specific result.
    -
    -
    - moveTo -
    -
    -
    StatementIterator::moveTo() in StatementIterator.php
    -
    Moves the pointer to a specific statement.
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC::MOVINGIMAGE() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC_RES::MOVINGIMAGE() in DC_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF::MSN_CHAT_ID() in FOAF_C.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF_RES::MSN_CHAT_ID() in FOAF_RES.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF::MYERS_BRIGGS() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF_RES::MYERS_BRIGGS() in FOAF_RES.php
    -
    -
    - magpie_debug.php -
    -
    -
    magpie_debug.php in magpie_debug.php
    -
    -
    - magpie_simple.php -
    -
    -
    magpie_simple.php in magpie_simple.php
    -
    -
    - magpie_slashbox.php -
    -
    -
    magpie_slashbox.php in magpie_slashbox.php
    -
    -
    - modifier.rss_date_parse.php -
    -
    -
    modifier.rss_date_parse.php in modifier.rss_date_parse.php
    -
    -
    - ModelComparator.php -
    -
    -
    ModelComparator.php in ModelComparator.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $named -
    -
    -
    ClientQuery::$named in ClientQuery.php
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - NamedGraphDb.php -
    -
    -
    NamedGraphDb.php in NamedGraphDb.php
    -
    -
    - NamedGraphMem.php -
    -
    -
    NamedGraphMem.php in NamedGraphMem.php
    -
    -
    - Node.php -
    -
    -
    Node.php in Node.php
    -
    -
    - N -
    -
    -
    VCARD_RES::N() in VCARD_RES.php
    -
    -
    - N -
    -
    -
    VCARD::N() in VCARD_C.php
    -
    -
    - N3Parser -
    -
    -
    N3Parser in N3Parser.php
    -
    PHP Notation3 Parser
    -
    -
    - N3Parser -
    -
    -
    N3Parser::N3Parser() in N3Parser.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer::N3Serializer() in N3Serializer.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer in N3Serializer.php
    -
    An abstract object.
    -
    -
    - N3SER_BNODE_SHORT -
    -
    -
    N3SER_BNODE_SHORT in constants.php
    -
    -
    - NAME -
    -
    -
    VCARD_RES::NAME() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS_RES::NAME() in RSS_RES.php
    -
    -
    - NAME -
    -
    -
    VCARD::NAME() in VCARD_C.php
    -
    -
    - NAME -
    -
    -
    ATOM_RES::NAME() in ATOM_RES.php
    -
    -
    - NAME -
    -
    -
    RSS::NAME() in RSS_C.php
    -
    -
    - NAME -
    -
    -
    ATOM::NAME() in ATOM_C.php
    -
    -
    - NAME -
    -
    -
    FOAF_RES::NAME() in FOAF_RES.php
    -
    -
    - NAME -
    -
    -
    FOAF::NAME() in FOAF_C.php
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb in NamedGraphDb.php
    -
    Persistent NamedGraph implementation that extends a DbModel.
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb::NamedGraphDb() in NamedGraphDb.php
    -
    Constructor Do not call this directly.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem::NamedGraphMem() in NamedGraphMem.php
    -
    Constructor You have to supply a graph name. You can supply a URI.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem in NamedGraphMem.php
    -
    NamedGraph implementation that extends a MemModel with a name.
    -
    -
    - NAMESPACE -
    -
    -
    OWLVocabulary::NAMESPACE() in OWLVocabulary.php
    -
    -
    - NAMESPACE -
    -
    -
    RdfsVocabulary::NAMESPACE() in RdfsVocabulary.php
    -
    Answer the string that is the namespace prefix for this vocabulary
    -
    -
    - NAMESPACE_SEPARATOR_CHAR -
    -
    -
    NAMESPACE_SEPARATOR_CHAR in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_STRING -
    -
    - -
    -
    - next -
    -
    -
    IteratorAllGraphsDb::next() in IteratorAllGraphsDb.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    RdqlResultIterator::next() in RdqlResultIterator.php
    -
    Returns the next result array.
    -
    -
    - next -
    -
    -
    ResIterator::next() in ResIterator.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    StatementIterator::next() in StatementIterator.php
    -
    Returns the next statement.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsMem::next() in IteratorAllGraphsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsMem::next() in IteratorFindQuadsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IterFind::next() in IterFind.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    IteratorFindQuadsDb::next() in IteratorFindQuadsDb.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    FindIterator::next() in FindIterator.php
    -
    Returns the next matching statement.
    -
    -
    - NICK -
    -
    -
    FOAF::NICK() in FOAF_C.php
    -
    -
    - NICK -
    -
    -
    FOAF_RES::NICK() in FOAF_RES.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD::NICKNAME() in VCARD_C.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD_RES::NICKNAME() in VCARD_RES.php
    -
    -
    - NIL -
    -
    -
    RDF::NIL() in RDF_C.php
    -
    -
    - NIL -
    -
    -
    RDF_RES::NIL() in RDF_RES.php
    -
    -
    - Node -
    -
    -
    Node in Node.php
    -
    An abstract RDF node.
    -
    -
    - NODE_ID -
    -
    -
    RDF::NODE_ID() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF_RES::NODE_ID() in RDF_RES.php
    -
    -
    - normalize -
    -
    -
    MagpieRSS::normalize() in rss_parse.inc
    -
    -
    - NOTHING -
    -
    -
    OWL::NOTHING() in OWL_C.php
    -
    -
    - NOTHING -
    -
    -
    OWL_RES::NOTHING() in OWL_RES.php
    -
    -
    - NOTHING -
    -
    -
    OWLVocabulary::NOTHING() in OWLVocabulary.php
    -
    -
    - NO_INDEX -
    -
    -
    NO_INDEX in constants.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD::NPROPERTIES() in VCARD_C.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD_RES::NPROPERTIES() in VCARD_RES.php
    -
    -
    - NTripleSerializer -
    -
    -
    NTripleSerializer in NTripleSerializer.php
    -
    PHP N-Triple Serializer
    -
    -
    - NTripleSerializer -
    -
    - -
    Constructor
    -
    -
    - N3Parser.php -
    -
    -
    N3Parser.php in N3Parser.php
    -
    -
    - N3Serializer.php -
    -
    -
    N3Serializer.php in N3Serializer.php
    -
    -
    - NTripleSerializer.php -
    -
    -
    NTripleSerializer.php in NTripleSerializer.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    QueryTriple::$object in QueryTriple.php
    -
    The QueryTriples Object.
    -
    -
    - $object -
    -
    -
    FindIterator::$object in FindIterator.php
    -
    -
    - $offsiteok -
    -
    -
    Snoopy::$offsiteok in Snoopy.class.inc
    -
    -
    - $open -
    -
    -
    GraphPattern::$open in GraphPattern.php
    -
    -
    - $operatorPrecedence -
    -
    - -
    Which order operators are to be treated.
    -
    -
    - $optional -
    -
    -
    GraphPattern::$optional in GraphPattern.php
    -
    -
    - $outer -
    -
    -
    Constraint::$outer in Constraint.php
    -
    True if it is an outer filter, false if not.
    -
    -
    - $output -
    -
    -
    SparqlClient::$output in SparqlClient.php
    -
    -
    - $OWL_NS -
    -
    -
    N3Parser::$OWL_NS in N3Parser.php
    -
    -
    - Object -
    -
    -
    Object in Object.php
    -
    An abstract object.
    -
    -
    - OBJECT -
    -
    -
    RDF_RES::OBJECT() in RDF_RES.php
    -
    -
    - object -
    -
    -
    Statement::object() in Statement.php
    -
    Alias for getObject()
    -
    -
    - OBJECT -
    -
    -
    RDF::OBJECT() in RDF_C.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWLVocabulary::OBJECT_CLASS() in OWLVocabulary.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWL::OBJECT_CLASS() in OWL_C.php
    -
    -
    - OBJECT_CLASS -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWL_RES::ONE_OF() in OWL_RES.php
    -
    -
    - ONE_OF -
    -
    -
    OWL::ONE_OF() in OWL_C.php
    -
    -
    - ONE_OF -
    -
    -
    OWLVocabulary::ONE_OF() in OWLVocabulary.php
    -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - OntClass -
    -
    -
    OntClass::OntClass() in OntClass.php
    -
    Constructor You can supply a uri
    -
    -
    - ONTCLASS -
    -
    -
    RdfsVocabulary::ONTCLASS() in RdfsVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - ONTCLASS -
    -
    -
    OWLVocabulary::ONTCLASS() in OWLVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass in OntClass.php
    -
    Class that represents an ontology node characterising a class description.
    -
    -
    - ONTMODEL -
    -
    -
    ONTMODEL in constants.php
    -
    -
    - OntModel -
    -
    -
    OntModel::OntModel() in OntModel.php
    -
    Constructor.
    -
    -
    - OntModel -
    -
    -
    OntModel in OntModel.php
    -
    Enhanced view of the model that is known to contain ontology data, under a
    -
    -
    - OntClass.php -
    -
    -
    OntClass.php in OntClass.php
    -
    -
    - OntModel.php -
    -
    -
    OntModel.php in OntModel.php
    -
    -
    - OntModelP.php -
    -
    -
    OntModelP.php in OntModelP.php
    -
    -
    - OntProperty.php -
    -
    -
    OntProperty.php in OntProperty.php
    -
    -
    - OntResource.php -
    -
    -
    OntResource.php in OntResource.php
    -
    -
    - OntVocabulary.php -
    -
    -
    OntVocabulary.php in OntVocabulary.php
    -
    -
    - OWLVocabulary.php -
    -
    -
    OWLVocabulary.php in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL::ONTOLOGY() in OWL_C.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWLVocabulary::ONTOLOGY() in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL_RES::ONTOLOGY() in OWL_RES.php
    -
    -
    - OntProperty -
    -
    -
    OntProperty in OntProperty.php
    -
    Class encapsulating a property in an ontology.
    -
    -
    - OntProperty -
    -
    -
    OntProperty::OntProperty() in OntProperty.php
    -
    Constructor.
    -
    -
    - OntResource -
    -
    -
    OntResource in OntResource.php
    -
    Provides a common super-type for all of the abstractions in this ontology representation package.
    -
    -
    - OntResource -
    -
    -
    OntResource::OntResource() in OntResource.php
    -
    Constructor You can supply a uri
    -
    -
    - OntVocabulary -
    -
    -
    OntVocabulary in OntVocabulary.php
    -
    Base Class that encapsulates the elements of a general vocabulary
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL_RES::ON_PROPERTY() in OWL_RES.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWLVocabulary::ON_PROPERTY() in OWLVocabulary.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL::ON_PROPERTY() in OWL_C.php
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF::ORGANIZATION() in FOAF_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF_RES::ORGANIZATION() in FOAF_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD_RES::ORGNAME() in VCARD_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD::ORGNAME() in VCARD_C.php
    -
    -
    - ORGPROPERTIES -
    -
    - -
    -
    - ORGPROPERTIES -
    -
    -
    VCARD::ORGPROPERTIES() in VCARD_C.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD_RES::ORGUNIT() in VCARD_RES.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD::ORGUNIT() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD::OTHER() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD_RES::OTHER() in VCARD_RES.php
    -
    -
    - OWL -
    -
    -
    OWL in OWL_C.php
    -
    OWL Vocabulary (Resource)
    -
    -
    - OWLVocabulary -
    -
    -
    OWLVocabulary in OWLVocabulary.php
    -
    OWL vocabulary items
    -
    -
    - OWL_CLASS -
    -
    -
    OWL_RES::OWL_CLASS() in OWL_RES.php
    -
    -
    - OWL_CLASS -
    -
    -
    OWL::OWL_CLASS() in OWL_C.php
    -
    -
    - OWL_INVERSE_OF -
    -
    -
    OWL_INVERSE_OF in constants.php
    -
    -
    - OWL_NS -
    -
    -
    OWL_NS in constants.php
    -
    -
    - OWL_PREFIX -
    -
    -
    OWL_PREFIX in constants.php
    -
    -
    - OWL_RES -
    -
    -
    OWL_RES in OWL_RES.php
    -
    OWL Vocabulary (ResResource)
    -
    -
    - OWL_SAME_AS -
    -
    -
    OWL_SAME_AS in constants.php
    -
    -
    - OWL_URI -
    -
    -
    OWL_URI in constants.php
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - Object.php -
    -
    -
    Object.php in Object.php
    -
    -
    - OWL.php -
    -
    -
    OWL.php in OWL.php
    -
    -
    - OWL_C.php -
    -
    -
    OWL_C.php in OWL_C.php
    -
    -
    - OWL_RES.php -
    -
    -
    OWL_RES.php in OWL_RES.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parsedNamespaces -
    -
    - -
    -
    - $parseError -
    -
    -
    N3Parser::$parseError in N3Parser.php
    -
    -
    - $parser -
    -
    -
    MagpieRSS::$parser in rss_parse.inc
    -
    -
    - $pass -
    -
    -
    Snoopy::$pass in Snoopy.class.inc
    -
    -
    - $passcookies -
    -
    -
    Snoopy::$passcookies in Snoopy.class.inc
    -
    -
    - $patternId -
    -
    -
    GraphPattern::$patternId in GraphPattern.php
    -
    -
    - $port -
    -
    -
    Snoopy::$port in Snoopy.class.inc
    -
    -
    - $pr -
    -
    -
    SparqlEngineDb::$pr in SparqlEngineDb.php
    -
    Prepared statments preparator instance
    -
    -
    - $predicate -
    -
    -
    QueryTriple::$predicate in QueryTriple.php
    -
    The QueryTriples Predicate.
    -
    -
    - $predicate -
    -
    -
    FindIterator::$predicate in FindIterator.php
    -
    -
    - $prefixes -
    -
    -
    N3Serializer::$prefixes in N3Serializer.php
    -
    -
    - $prefixes -
    -
    -
    Query::$prefixes in Query.php
    -
    Array that contains used prefixes and namespaces.
    -
    -
    - $prefixes -
    -
    -
    ClientQuery::$prefixes in ClientQuery.php
    -
    -
    - $proxy_host -
    -
    -
    Snoopy::$proxy_host in Snoopy.class.inc
    -
    -
    - $proxy_port -
    -
    -
    Snoopy::$proxy_port in Snoopy.class.inc
    -
    -
    - PACKAGE_DATASET -
    -
    -
    PACKAGE_DATASET in constants.php
    -
    -
    - PACKAGE_DBASE -
    -
    -
    PACKAGE_DBASE in constants.php
    -
    -
    - PACKAGE_INFMODEL -
    -
    -
    PACKAGE_INFMODEL in constants.php
    -
    -
    - PACKAGE_MODEL -
    -
    -
    PACKAGE_MODEL in constants.php
    -
    -
    - PACKAGE_ONTMODEL -
    -
    -
    PACKAGE_ONTMODEL in constants.php
    -
    -
    - PACKAGE_RDQL -
    -
    -
    PACKAGE_RDQL in constants.php
    -
    -
    - PACKAGE_RESMODEL -
    -
    -
    PACKAGE_RESMODEL in constants.php
    -
    -
    - PACKAGE_SPARQL -
    -
    -
    PACKAGE_SPARQL in constants.php
    -
    -
    - PACKAGE_SYNTAX_GRDDL -
    -
    -
    PACKAGE_SYNTAX_GRDDL in constants.php
    -
    -
    - PACKAGE_SYNTAX_N3 -
    -
    -
    PACKAGE_SYNTAX_N3 in constants.php
    -
    -
    - PACKAGE_SYNTAX_RDF -
    -
    -
    PACKAGE_SYNTAX_RDF in constants.php
    -
    -
    - PACKAGE_SYNTAX_RSS -
    -
    -
    PACKAGE_SYNTAX_RSS in constants.php
    -
    -
    - PACKAGE_SYNTAX_SPARQLRES -
    -
    -
    PACKAGE_SYNTAX_SPARQLRES in constants.php
    -
    -
    - PACKAGE_UTILITY -
    -
    -
    PACKAGE_UTILITY in constants.php
    -
    -
    - PACKAGE_VOCABULARY -
    -
    -
    PACKAGE_VOCABULARY in constants.php
    -
    -
    - PAGE -
    -
    -
    FOAF_RES::PAGE() in FOAF_RES.php
    -
    -
    - PAGE -
    -
    -
    FOAF::PAGE() in FOAF_C.php
    -
    -
    - parse -
    -
    -
    SparqlResultParser::parse() in SparqlResultParser.php
    -
    Main function of SparqlResultParser
    -
    -
    - parse -
    -
    -
    SparqlParser::parse() in SparqlParser.php
    -
    Main function of SparqlParser. Parses a query string.
    -
    -
    - parse -
    -
    -
    N3Parser::parse() in N3Parser.php
    -
    This parses a N3 string and prints out the triples
    -
    -
    - parse2model -
    -
    -
    N3Parser::parse2model() in N3Parser.php
    -
    This parses a N3 string and returns a memmodel
    -
    -
    - parseAsk -
    -
    -
    SparqlParser::parseAsk() in SparqlParser.php
    -
    Sets result form to 'ASK' and 'COUNT'.
    -
    -
    - parseBase -
    -
    -
    SparqlParser::parseBase() in SparqlParser.php
    -
    Parses the BASE part of the query.
    -
    -
    - parseBrackettedExpression -
    -
    - -
    Parses a bracketted expression.
    -
    -
    - parseCollection -
    -
    - -
    Parses an RDF collection.
    -
    -
    - parseConstraint -
    -
    - -
    Parses a value constraint.
    -
    -
    - parseConstraintTree -
    -
    - -
    Parses a constraint string recursively.
    -
    -
    - parseConstruct -
    -
    -
    SparqlParser::parseConstruct() in SparqlParser.php
    -
    Parses the CONSTRUCT clause.
    -
    -
    - parseDescribe -
    -
    -
    SparqlParser::parseDescribe() in SparqlParser.php
    -
    Adds a new variable to the query and sets result form to 'DESCRIBE'.
    -
    -
    - parseExpression -
    -
    - -
    Parses an expression.
    -
    -
    - parseFile -
    -
    -
    TriXParser::parseFile() in TriXParser.php
    -
    Parse from a file
    -
    -
    - parseFrom -
    -
    -
    SparqlParser::parseFrom() in SparqlParser.php
    -
    Parses the FROM clause.
    -
    -
    - parseGraph -
    -
    -
    SparqlParser::parseGraph() in SparqlParser.php
    -
    Parses a GRAPH clause.
    -
    -
    - parseGraphPattern -
    -
    - -
    Parses a graph pattern.
    -
    -
    - parseLiteral -
    -
    -
    SparqlParser::parseLiteral() in SparqlParser.php
    -
    Parses a literal.
    -
    -
    - parseModifier -
    -
    -
    SparqlParser::parseModifier() in SparqlParser.php
    -
    Parses the solution modifiers of a query.
    -
    -
    - parseNode -
    -
    -
    SparqlParser::parseNode() in SparqlParser.php
    -
    Parses a String to an RDF node.
    -
    -
    - parseOrderCondition -
    -
    - -
    Parses order conditions of a query.
    -
    -
    - parsePrefix -
    -
    -
    SparqlParser::parsePrefix() in SparqlParser.php
    -
    Adds a new namespace prefix to the query object.
    -
    -
    - parseQuery -
    -
    -
    RdqlParser::parseQuery() in RdqlParser.php
    -
    Parse the given RDQL query string and return an array with query variables and constraints.
    -
    -
    - parseQuery -
    -
    -
    SparqlParser::parseQuery() in SparqlParser.php
    -
    Starts parsing the tokenized SPARQL Query.
    -
    -
    - parseResult -
    -
    -
    SparqlClient::parseResult() in SparqlClient.php
    -
    -
    - parseSelect -
    -
    -
    SparqlParser::parseSelect() in SparqlParser.php
    -
    Parses the SELECT part of a query.
    -
    -
    - parseString -
    -
    -
    TriXParser::parseString() in TriXParser.php
    -
    Parse an XML string
    -
    -
    - parseTriplePattern -
    -
    - -
    Parses a triple pattern.
    -
    -
    - parseWhere -
    -
    -
    SparqlParser::parseWhere() in SparqlParser.php
    -
    Parses the WHERE clause.
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF::PARSE_TYPE() in RDF_C.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF_RES::PARSE_TYPE() in RDF_RES.php
    -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - parse_w3cdtf -
    -
    -
    parse_w3cdtf() in rss_utils.inc
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF_RES::PAST_PROJECT() in FOAF_RES.php
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF::PAST_PROJECT() in FOAF_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD::PCODE() in VCARD_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD_RES::PCODE() in VCARD_RES.php
    -
    -
    - PERIOD -
    -
    -
    DC_RES::PERIOD() in DC_RES.php
    -
    -
    - PERIOD -
    -
    -
    DC::PERIOD() in DC_C.php
    -
    -
    - PERSON -
    -
    -
    ATOM_RES::PERSON() in ATOM_RES.php
    -
    -
    - PERSON -
    -
    -
    ATOM::PERSON() in ATOM_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF::PERSON() in FOAF_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF_RES::PERSON() in FOAF_RES.php
    -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PHONE -
    -
    -
    FOAF_RES::PHONE() in FOAF_RES.php
    -
    -
    - PHONE -
    -
    -
    FOAF::PHONE() in FOAF_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD::PHOTO() in VCARD_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD_RES::PHOTO() in VCARD_RES.php
    -
    -
    - php4_create_parser -
    -
    - -
    Instaniate an XML parser under PHP4
    -
    -
    - php5_create_parser -
    -
    - -
    Instantiate an XML parser under PHP5
    -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PLAN -
    -
    -
    FOAF_RES::PLAN() in FOAF_RES.php
    -
    -
    - PLAN -
    -
    -
    FOAF::PLAN() in FOAF_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD::POBOX() in VCARD_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD_RES::POBOX() in VCARD_RES.php
    -
    -
    - POINT -
    -
    -
    DC::POINT() in DC_C.php
    -
    -
    - POINT -
    -
    -
    DC_RES::POINT() in DC_RES.php
    -
    -
    - PREDICATE -
    -
    -
    RDF::PREDICATE() in RDF_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF_RES::PREDICATE() in RDF_RES.php
    -
    -
    - predicate -
    -
    -
    Statement::predicate() in Statement.php
    -
    Alias for getPredicate()
    -
    -
    - PREFIX -
    -
    -
    VCARD_RES::PREFIX() in VCARD_RES.php
    -
    -
    - PREFIX -
    -
    -
    VCARD::PREFIX() in VCARD_C.php
    -
    -
    - prepare -
    -
    -
    SparqlParser::prepare() in SparqlParser.php
    -
    Set all internal variables to a clear state before we start parsing.
    -
    -
    - prepare -
    -
    -
    SparqlEngineDb::prepare() in SparqlEngineDb.php
    -
    Create a prepared statement that can be executed later.
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - preselectGraphs -
    -
    - -
    Looks in from and from named part of the query and adds the graphs to the graphlist.
    -
    -
    - previous -
    -
    -
    StatementIterator::previous() in StatementIterator.php
    -
    Returns the previous statement.
    -
    -
    - previous -
    -
    -
    RdqlResultIterator::previous() in RdqlResultIterator.php
    -
    Returns the previous result.
    -
    -
    - PRIMARY_TOPIC -
    -
    -
    FOAF::PRIMARY_TOPIC() in FOAF_C.php
    -
    -
    - PRIMARY_TOPIC -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    -
    OWLVocabulary::PRIOR_VERSION() in OWLVocabulary.php
    -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRODID -
    -
    -
    VCARD::PRODID() in VCARD_C.php
    -
    -
    - PRODID -
    -
    -
    VCARD_RES::PRODID() in VCARD_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF_RES::PROJECT() in FOAF_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF::PROJECT() in FOAF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF::PROPERTY() in RDF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF_RES::PROPERTY() in RDF_RES.php
    -
    -
    - PROPERTY -
    -
    -
    OWLVocabulary::PROPERTY() in OWLVocabulary.php
    -
    -
    - PROPERTY -
    -
    -
    OWL::PROPERTY() in OWL_C.php
    -
    -
    - PROPERTY -
    -
    -
    OWL_RES::PROPERTY() in OWL_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF_RES::PUBLICATIONS() in FOAF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF::PUBLICATIONS() in FOAF_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC::PUBLISHER() in DC_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC_RES::PUBLISHER() in DC_RES.php
    -
    -
    - putModel -
    -
    -
    DbStore::putModel() in DbStore.php
    -
    Store a MemModel or another DbModel from a different DbStore in the database.
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    - -
    -
    - $query -
    -
    -
    SparqlEngineDb::$query in SparqlEngineDb.php
    -
    Sparql Query object.
    -
    -
    - $query -
    -
    -
    ClientQuery::$query in ClientQuery.php
    -
    -
    - $query -
    -
    -
    SparqlParser::$query in SparqlParser.php
    -
    The query Object
    -
    -
    - $query -
    -
    -
    SparqlEngine::$query in SparqlEngine.php
    -
    The query object.
    -
    -
    - $queryParser -
    -
    -
    Model::$queryParser in Model.php
    -
    SparqlParser so we can re-use it
    -
    -
    - $querystring -
    -
    -
    SparqlParser::$querystring in SparqlParser.php
    -
    The Querystring
    -
    -
    - Quad.php -
    -
    -
    Quad.php in Quad.php
    -
    -
    - qnameCheck -
    -
    -
    SparqlParser::qnameCheck() in SparqlParser.php
    -
    Checks if $token is a qname.
    -
    -
    - Quad -
    -
    -
    Quad::Quad() in Quad.php
    -
    Constructor Creates a Quad from four Nodes.
    -
    -
    - Quad -
    -
    -
    Quad in Quad.php
    -
    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.
    -
    -
    - query -
    -
    -
    SparqlClient::query() in SparqlClient.php
    -
    Main function of SparqlClient.
    -
    -
    - Query -
    -
    -
    Query::Query() in Query.php
    -
    Constructor
    -
    -
    - query -
    -
    -
    ClientQuery::query() in ClientQuery.php
    -
    Adds the SPARQL query string to the query object.
    -
    -
    - Query -
    -
    -
    Query in Query.php
    -
    The Class Query represents a SPARQL query.
    -
    -
    - queryDb -
    -
    -
    SparqlEngineDb::queryDb() in SparqlEngineDb.php
    -
    Sends the sql to the database and returns the results.
    -
    -
    - queryModel -
    -
    -
    SparqlEngineDb::queryModel() in SparqlEngineDb.php
    -
    Query the database with the given SPARQL query.
    -
    -
    - queryModel -
    -
    -
    RdqlDbEngine::queryModel() in RdqlDbEngine.php
    -
    Perform an RDQL Query on the given DbModel.
    -
    -
    - queryModel -
    -
    -
    SparqlEngine::queryModel() in SparqlEngine.php
    -
    The query engine's main method.
    -
    -
    - queryModel -
    -
    -
    RdqlMemEngine::queryModel() in RdqlMemEngine.php
    -
    Perform an RDQL Query on the given MemModel.
    -
    -
    - queryMultiple -
    -
    -
    SparqlEngineDb::queryMultiple() in SparqlEngineDb.php
    -
    Executes multiple SQL queries and returns an array of results.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple in QueryTriple.php
    -
    Represents a query triple.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple::QueryTriple() in QueryTriple.php
    -
    Constructor
    -
    -
    - Query.php -
    -
    -
    Query.php in Query.php
    -
    -
    - QueryTriple.php -
    -
    -
    QueryTriple.php in QueryTriple.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $rawheaders -
    -
    -
    Snoopy::$rawheaders in Snoopy.class.inc
    -
    -
    - $RDF_NS -
    -
    -
    N3Parser::$RDF_NS in N3Parser.php
    -
    -
    - $rdf_parser -
    -
    -
    RdfParser::$rdf_parser in RdfParser.php
    -
    -
    - $rdf_qnames -
    -
    -
    RdfSerializer::$rdf_qnames in RdfSerializer.php
    -
    -
    - $rdf_qname_prefix -
    -
    - -
    -
    - $read_timeout -
    -
    -
    Snoopy::$read_timeout in Snoopy.class.inc
    -
    -
    - $referer -
    -
    -
    Snoopy::$referer in Snoopy.class.inc
    -
    -
    - $res -
    -
    -
    NTripleSerializer::$res in NTripleSerializer.php
    -
    -
    - $res -
    -
    -
    N3Serializer::$res in N3Serializer.php
    -
    -
    - $resourcetext -
    -
    -
    N3Serializer::$resourcetext in N3Serializer.php
    -
    -
    - $resourcetext_taken -
    -
    - -
    -
    - $resParser -
    -
    -
    SparqlResultParser::$resParser in SparqlResultParser.php
    -
    -
    - $response_code -
    -
    -
    Snoopy::$response_code in Snoopy.class.inc
    -
    -
    - $resultForm -
    -
    -
    Query::$resultForm in Query.php
    -
    What form/type of result should be returned.
    -
    -
    - $resultPart -
    -
    -
    Query::$resultPart in Query.php
    -
    Contains the result part of the SPARQL query.
    -
    -
    - $results -
    -
    -
    Snoopy::$results in Snoopy.class.inc
    -
    -
    - $resultVars -
    -
    -
    Query::$resultVars in Query.php
    -
    Array of result variables that shall be returned.
    -
    -
    - Resource.php -
    -
    -
    Resource.php in Resource.php
    -
    -
    - RdfsVocabulary.php -
    -
    -
    RdfsVocabulary.php in RdfsVocabulary.php
    -
    -
    - RANGE -
    -
    -
    OWLVocabulary::RANGE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RDFS_RES::RANGE() in RDFS_RES.php
    -
    -
    - RANGE -
    -
    -
    RdfsVocabulary::RANGE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RDFS::RANGE() in RDFS_C.php
    -
    -
    - RDF -
    -
    -
    RDF in RDF_C.php
    -
    Resource Description Framework (RDF) Vocabulary (Resource)
    -
    -
    - RdfAPI.php -
    -
    -
    RdfAPI.php in RdfAPI.php
    -
    -
    - RDFAPI_ERROR -
    -
    -
    RDFAPI_ERROR in constants.php
    -
    -
    - RdfParser -
    -
    -
    RdfParser in RdfParser.php
    -
    An RDF paser.
    -
    -
    - RDFS -
    -
    -
    RDFS in RDFS_C.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer::RdfSerializer() in RdfSerializer.php
    -
    Constructor
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer in RdfSerializer.php
    -
    An RDF seralizer.
    -
    -
    - RdfsVocabulary -
    -
    -
    RdfsVocabulary in RdfsVocabulary.php
    -
    RDFS vocabulary items
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_CLASS in constants.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS::RDFS_CLASS() in RDFS_C.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_RES::RDFS_CLASS() in RDFS_RES.php
    -
    -
    - RDFS_COMMENT -
    -
    -
    RDFS_COMMENT in constants.php
    -
    -
    - RDFS_DATATYPE -
    -
    -
    RDFS_DATATYPE in constants.php
    -
    -
    - RDFS_DOMAIN -
    -
    -
    RDFS_DOMAIN in constants.php
    -
    -
    - RDFS_IS_DEFINED_BY -
    -
    -
    RDFS_IS_DEFINED_BY in constants.php
    -
    -
    - RDFS_LABEL -
    -
    -
    RDFS_LABEL in constants.php
    -
    -
    - RDFS_LITERAL -
    -
    -
    RDFS_LITERAL in constants.php
    -
    -
    - RDFS_RANGE -
    -
    -
    RDFS_RANGE in constants.php
    -
    -
    - RDFS_RES -
    -
    -
    RDFS_RES in RDFS_RES.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    -
    -
    - RDFS_RESOURCE -
    -
    -
    RDFS_RESOURCE in constants.php
    -
    -
    - RDFS_SEE_ALSO -
    -
    -
    RDFS_SEE_ALSO in constants.php
    -
    -
    - RDFS_SUBCLASSOF -
    -
    -
    RDFS_SUBCLASSOF in constants.php
    -
    -
    - RDFS_SUBPROPERTYOF -
    -
    -
    RDFS_SUBPROPERTYOF in constants.php
    -
    -
    - RDFS_VOCABULARY -
    -
    -
    RDFS_VOCABULARY in constants.php
    -
    -
    - RDFUtil -
    -
    -
    RDFUtil in RdfUtil.php
    -
    Useful utility methods.
    -
    -
    - RDF_ABOUT -
    -
    -
    RDF_ABOUT in constants.php
    -
    -
    - RDF_ABOUT_EACH -
    -
    -
    RDF_ABOUT_EACH in constants.php
    -
    -
    - RDF_ABOUT_EACH_PREFIX -
    -
    -
    RDF_ABOUT_EACH_PREFIX in constants.php
    -
    -
    - RDF_ALT -
    -
    -
    RDF_ALT in constants.php
    -
    -
    - RDF_BAG -
    -
    -
    RDF_BAG in constants.php
    -
    -
    - RDF_BAG_ID -
    -
    -
    RDF_BAG_ID in constants.php
    -
    -
    - RDF_DATATYPE -
    -
    -
    RDF_DATATYPE in constants.php
    -
    -
    - RDF_DATATYPE_SCHEMA_URI -
    -
    -
    RDF_DATATYPE_SCHEMA_URI in constants.php
    -
    -
    - RDF_DESCRIPTION -
    -
    -
    RDF_DESCRIPTION in constants.php
    -
    -
    - RDF_FIRST -
    -
    -
    RDF_FIRST in constants.php
    -
    -
    - RDF_ID -
    -
    -
    RDF_ID in constants.php
    -
    -
    - RDF_LI -
    -
    -
    RDF_LI in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_RES::RDF_LIST() in RDF_RES.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_LIST in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF::RDF_LIST() in RDF_C.php
    -
    -
    - RDF_NAMESPACE_PREFIX -
    -
    -
    RDF_NAMESPACE_PREFIX in constants.php
    -
    -
    - RDF_NAMESPACE_URI -
    -
    -
    RDF_NAMESPACE_URI in constants.php
    -
    -
    - RDF_NIL -
    -
    -
    RDF_NIL in constants.php
    -
    -
    - RDF_NODEID -
    -
    -
    RDF_NODEID in constants.php
    -
    -
    - RDF_OBJECT -
    -
    -
    RDF_OBJECT in constants.php
    -
    -
    - RDF_OBJECT_TYPE_BNODE -
    -
    -
    RDF_OBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_LITERAL -
    -
    -
    RDF_OBJECT_TYPE_LITERAL in constants.php
    -
    -
    - RDF_OBJECT_TYPE_RESOURCE -
    -
    -
    RDF_OBJECT_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_XML -
    -
    -
    RDF_OBJECT_TYPE_XML in constants.php
    -
    -
    - RDF_PARSE_TYPE -
    -
    -
    RDF_PARSE_TYPE in constants.php
    -
    -
    - RDF_PARSE_TYPE_COLLECTION -
    -
    -
    RDF_PARSE_TYPE_COLLECTION in constants.php
    -
    -
    - RDF_PARSE_TYPE_LITERAL -
    -
    -
    RDF_PARSE_TYPE_LITERAL in constants.php
    -
    -
    - RDF_PARSE_TYPE_RESOURCE -
    -
    -
    RDF_PARSE_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_PREDICATE -
    -
    -
    RDF_PREDICATE in constants.php
    -
    -
    - RDF_PROPERTY -
    -
    -
    RDF_PROPERTY in constants.php
    -
    -
    - RDF_RDF -
    -
    -
    RDF_RDF in constants.php
    -
    -
    - RDF_RES -
    -
    -
    RDF_RES in RDF_RES.php
    -
    Resource Description Framework (RDF) Vocabulary (ResResource)
    -
    -
    - RDF_RESOURCE -
    -
    -
    RDF_RESOURCE in constants.php
    -
    -
    - RDF_REST -
    -
    -
    RDF_REST in constants.php
    -
    -
    - RDF_SCHEMA_PREFIX -
    -
    -
    RDF_SCHEMA_PREFIX in constants.php
    -
    -
    - RDF_SCHEMA_URI -
    -
    -
    RDF_SCHEMA_URI in constants.php
    -
    -
    - RDF_SEEALSO -
    -
    -
    RDF_SEEALSO in constants.php
    -
    -
    - RDF_SEQ -
    -
    -
    RDF_SEQ in constants.php
    -
    -
    - RDF_STATEMENT -
    -
    -
    RDF_STATEMENT in constants.php
    -
    -
    - RDF_SUBJECT -
    -
    -
    RDF_SUBJECT in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_ANONYMOUS -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_BNODE -
    -
    -
    RDF_SUBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_DISTRIBUTED -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_PREFIX -
    -
    -
    RDF_SUBJECT_TYPE_PREFIX in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_URI -
    -
    -
    RDF_SUBJECT_TYPE_URI in constants.php
    -
    -
    - RDF_TYPE -
    -
    -
    RDF_TYPE in constants.php
    -
    -
    - RDF_VALUE -
    -
    -
    RDF_VALUE in constants.php
    -
    -
    - RDF_XMLLITERAL -
    -
    -
    RDF_XMLLITERAL in constants.php
    -
    -
    - RDQL.php -
    -
    -
    RDQL.php in RDQL.php
    -
    -
    - RdqlDbEngine.php -
    -
    -
    RdqlDbEngine.php in RdqlDbEngine.php
    -
    -
    - RdqlEngine.php -
    -
    -
    RdqlEngine.php in RdqlEngine.php
    -
    -
    - RdqlMemEngine.php -
    -
    -
    RdqlMemEngine.php in RdqlMemEngine.php
    -
    -
    - RdqlParser.php -
    -
    -
    RdqlParser.php in RdqlParser.php
    -
    -
    - RdqlResultIterator.php -
    -
    -
    RdqlResultIterator.php in RdqlResultIterator.php
    -
    -
    - RdqlDbEngine -
    -
    -
    RdqlDbEngine in RdqlDbEngine.php
    -
    This class performs as RDQL query on a DbModel.
    -
    -
    - RdqlEngine -
    -
    -
    RdqlEngine in RdqlEngine.php
    -
    Some general methods common for RdqlMemEngine and RdqlDbEngine
    -
    -
    - RdqlMemEngine -
    -
    -
    RdqlMemEngine in RdqlMemEngine.php
    -
    This class performes as RDQL query on a MemModel.
    -
    -
    - RdqlParser -
    -
    -
    RdqlParser in RdqlParser.php
    -
    This class contains methods for parsing an Rdql query string into PHP variables.
    -
    -
    - rdqlQuery -
    -
    -
    MemModel::rdqlQuery() in MemModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    ResModel::rdqlQuery() in ResModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    DbModel::rdqlQuery() in DbModel.php
    -
    Perform an RDQL query on this DbModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this DBModel.
    -
    -
    - RdqlResultIterator -
    -
    - -
    Constructor
    -
    -
    - RdqlResultIterator -
    -
    -
    RdqlResultIterator in RdqlResultIterator.php
    -
    Iterator for traversing Rdql results.
    -
    -
    - RDQL_AND_ERR -
    -
    -
    RDQL_AND_ERR in constants.php
    -
    -
    - RDQL_ERR -
    -
    -
    RDQL_ERR in constants.php
    -
    -
    - RDQL_SEL_ERR -
    -
    -
    RDQL_SEL_ERR in constants.php
    -
    -
    - RDQL_SRC_ERR -
    -
    -
    RDQL_SRC_ERR in constants.php
    -
    -
    - RDQL_SYN_ERR -
    -
    -
    RDQL_SYN_ERR in constants.php
    -
    -
    - RDQL_USG_ERR -
    -
    -
    RDQL_USG_ERR in constants.php
    -
    -
    - RDQL_WHR_ERR -
    -
    -
    RDQL_WHR_ERR in constants.php
    -
    -
    - REFERENCES -
    -
    -
    DC::REFERENCES() in DC_C.php
    -
    -
    - REFERENCES -
    -
    -
    DC_RES::REFERENCES() in DC_RES.php
    -
    -
    - regex -
    -
    -
    regex() in FilterFunctions.php
    -
    Evaluates the regex() function. Returns true if the regex is matched false if not.
    -
    -
    - REGION -
    -
    -
    VCARD::REGION() in VCARD_C.php
    -
    -
    - REGION -
    -
    -
    VCARD_RES::REGION() in VCARD_RES.php
    -
    -
    - reify -
    -
    -
    MemModel::reify() in MemModel.php
    -
    Reifies the MemModel.
    -
    -
    - reify -
    -
    -
    Statement::reify() in Statement.php
    -
    Reifies a statement.
    -
    -
    - reify -
    -
    -
    DbModel::reify() in DbModel.php
    -
    Reify the DbModel.
    -
    -
    - REL -
    -
    -
    ATOM::REL() in ATOM_C.php
    -
    -
    - REL -
    -
    -
    ATOM_RES::REL() in ATOM_RES.php
    -
    -
    - remove -
    -
    -
    ResModel::remove() in ResModel.php
    -
    Removes the statement of ResResources(ResTriples) from the MemModel.
    -
    -
    - remove -
    -
    -
    InfModelF::remove() in InfModelF.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    ResList::remove() in ResList.php
    -
    Remove the given value from this list.
    -
    -
    - remove -
    -
    -
    MemModel::remove() in MemModel.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    DbModel::remove() in DbModel.php
    -
    Remove the given triple from this DbModel.
    -
    -
    - remove -
    -
    -
    ResContainer::remove() in ResContainer.php
    -
    Remove a value from the container.
    -
    -
    - remove -
    -
    -
    InfModelB::remove() in InfModelB.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeAll -
    -
    -
    ResResource::removeAll() in ResResource.php
    -
    Delete all the statements with predicate p for this resource from its associated model.
    -
    -
    - removeAtIndex -
    -
    - -
    Remove the member at the specified index.
    -
    -
    - removeComment -
    -
    -
    OntResource::removeComment() in OntResource.php
    -
    Remove the statement that the given ResLiteral is a comment on this resource.
    -
    -
    - removeDefinedBy -
    -
    - -
    Remove the statement that this resource is defined by the given resource.
    -
    -
    - removeDomain -
    -
    -
    OntProperty::removeDomain() in OntProperty.php
    -
    Remove the given class from the stated domain(s) of this property.
    -
    -
    - removeHead -
    -
    -
    ResList::removeHead() in ResList.php
    -
    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.
    -
    -
    - removeInfered -
    -
    - -
    Removes all infered statements from the model but keeps the infernece rules.
    -
    -
    - removeLabelProperty -
    -
    - -
    Remove the statement that the given ResLiteral is a label on this resource.
    -
    -
    - removeList -
    -
    -
    ResList::removeList() in ResList.php
    -
    Remove all of the components of this list from the model.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraphDb -
    -
    - -
    Removes the graph with all statements from the database.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - removeProperties -
    -
    - -
    Delete all the properties for this resource from the associated model.
    -
    -
    - removeProperty -
    -
    - -
    Remove the specific property-value pair from this resource.
    -
    -
    - removeQuad -
    -
    -
    DatasetMem::removeQuad() in DatasetMem.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeQuad -
    -
    -
    DatasetDb::removeQuad() in DatasetDb.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeRange -
    -
    -
    OntProperty::removeRange() in OntProperty.php
    -
    Remove the given class from the stated range(es) of this property.
    -
    -
    - removeRDFType -
    -
    -
    OntResource::removeRDFType() in OntResource.php
    -
    Remove the statement that this resource is of the given RDF type.
    -
    -
    - removeSeeAlso -
    -
    -
    OntResource::removeSeeAlso() in OntResource.php
    -
    Remove the statement indicating the given resource as a source of additional information about this resource.
    -
    -
    - removeSubClass -
    -
    - -
    Remove the given class from the sub-classes of this class.
    -
    -
    - removeSubProperty -
    -
    - -
    Remove the given property from the sub-properties of this property.
    -
    -
    - removeSuperClass -
    -
    - -
    Remove the given class from the super-classes of this class.
    -
    -
    - removeSuperProperty -
    -
    - -
    Remove the given property from the super-properties of this property.
    -
    -
    - renameBlanks -
    -
    -
    ModelComparator::renameBlanks() in ModelComparator.php
    -
    Renames the models Blanknodes.
    -
    -
    - replace -
    -
    -
    ResList::replace() in ResList.php
    -
    Replace the value at the i'th position in the list with the given value
    -
    -
    - replace -
    -
    -
    DbModel::replace() in DbModel.php
    -
    General method to replace nodes of a DbModel.
    -
    -
    - replace -
    -
    -
    MemModel::replace() in MemModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replace -
    -
    -
    InfModel::replace() in InfModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - REPLACES -
    -
    -
    DC::REPLACES() in DC_C.php
    -
    -
    - REPLACES -
    -
    -
    DC_RES::REPLACES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC::REQUIRES() in DC_C.php
    -
    -
    - REQUIRES -
    -
    -
    DC_RES::REQUIRES() in DC_RES.php
    -
    -
    - ResAlt -
    -
    -
    ResAlt::ResAlt() in ResAlt.php
    -
    Constructor You can supply a URI
    -
    -
    - ResAlt -
    -
    -
    ResAlt in ResAlt.php
    -
    This interface defines methods for accessing RDF Alternative resources.
    -
    -
    - ResBag -
    -
    -
    ResBag::ResBag() in ResBag.php
    -
    Constructor You can supply a URI
    -
    -
    - ResBag -
    -
    -
    ResBag in ResBag.php
    -
    This interface defines methods for accessing RDF Bag resources.
    -
    -
    - ResContainer -
    -
    -
    ResContainer in ResContainer.php
    -
    An RDF Container.
    -
    -
    - ResContainer -
    -
    -
    ResContainer::ResContainer() in ResContainer.php
    -
    Constructor You can supply a URI
    -
    -
    - ResIterator -
    -
    -
    ResIterator::ResIterator() in ResIterator.php
    -
    Constructor.
    -
    -
    - ResIterator -
    -
    -
    ResIterator in ResIterator.php
    -
    Implementation of a resource iterator.
    -
    -
    - ResList -
    -
    -
    ResList in ResList.php
    -
    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.
    -
    -
    - ResList -
    -
    -
    ResList::ResList() in ResList.php
    -
    Constructor You can supply a URI
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral in ResLiteral.php
    -
    An RDF literal.
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral::ResLiteral() in ResLiteral.php
    -
    Constructor You have to supply a string.
    -
    -
    - ResModel -
    -
    -
    ResModel in ResModel.php
    -
    A ResModel provides an resource centric view on an underlying RDF model.
    -
    -
    - ResModel -
    -
    -
    ResModel::ResModel() in ResModel.php
    -
    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.
    -
    -
    - RESMODEL -
    -
    -
    RESMODEL in constants.php
    -
    -
    - ResAlt.php -
    -
    -
    ResAlt.php in ResAlt.php
    -
    -
    - ResBag.php -
    -
    -
    ResBag.php in ResBag.php
    -
    -
    - ResContainer.php -
    -
    -
    ResContainer.php in ResContainer.php
    -
    -
    - ResIterator.php -
    -
    -
    ResIterator.php in ResIterator.php
    -
    -
    - ResList.php -
    -
    -
    ResList.php in ResList.php
    -
    -
    - ResLiteral.php -
    -
    -
    ResLiteral.php in ResLiteral.php
    -
    -
    - ResModel.php -
    -
    -
    ResModel.php in ResModel.php
    -
    -
    - ResModelP.php -
    -
    -
    ResModelP.php in ResModelP.php
    -
    -
    - ResProperty.php -
    -
    -
    ResProperty.php in ResProperty.php
    -
    -
    - ResResource.php -
    -
    -
    ResResource.php in ResResource.php
    -
    -
    - ResSeq.php -
    -
    -
    ResSeq.php in ResSeq.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS::RESOURCE() in RDFS_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF_RES::RESOURCE() in RDF_RES.php
    -
    -
    - RESOURCE -
    -
    -
    RDF::RESOURCE() in RDF_C.php
    -
    -
    - Resource -
    -
    -
    Resource::Resource() in Resource.php
    -
    Constructor Takes an URI or a namespace/localname combination
    -
    -
    - RESOURCE -
    -
    -
    RDFS_RES::RESOURCE() in RDFS_RES.php
    -
    -
    - Resource -
    -
    -
    Resource in Resource.php
    -
    An RDF resource.
    -
    -
    - ResProperty -
    -
    -
    ResProperty::ResProperty() in ResProperty.php
    -
    Constructor You can supply a URI
    -
    -
    - ResProperty -
    -
    -
    ResProperty in ResProperty.php
    -
    An RDF Property.
    -
    -
    - ResResource -
    -
    -
    ResResource in ResResource.php
    -
    An RDF Resource.
    -
    -
    - ResResource -
    -
    -
    ResResource::ResResource() in ResResource.php
    -
    Constructor You can supply a uri
    -
    -
    - ResSeq -
    -
    -
    ResSeq in ResSeq.php
    -
    This interface defines methods for accessing RDF Sequence resources.
    -
    -
    - ResSeq -
    -
    -
    ResSeq::ResSeq() in ResSeq.php
    -
    Constructor You can supply a URI
    -
    -
    - REST -
    -
    -
    RDF_RES::REST() in RDF_RES.php
    -
    -
    - REST -
    -
    -
    RDF::REST() in RDF_C.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL_RES::RESTRICTION() in OWL_RES.php
    -
    -
    - RESTRICTION -
    -
    -
    OWLVocabulary::RESTRICTION() in OWLVocabulary.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL::RESTRICTION() in OWL_C.php
    -
    -
    - returnResult -
    -
    -
    SparqlClient::returnResult() in SparqlClient.php
    -
    Returns the query result.
    -
    -
    - REV -
    -
    -
    VCARD_RES::REV() in VCARD_RES.php
    -
    -
    - REV -
    -
    -
    VCARD::REV() in VCARD_C.php
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsDb::rewind() in IteratorAllGraphsDb.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    ResIterator::rewind() in ResIterator.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsMem::rewind() in IteratorAllGraphsMem.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsDb::rewind() in IteratorFindQuadsDb.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsMem::rewind() in IteratorFindQuadsMem.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IterFind::rewind() in IterFind.php
    -
    Resets iterator list to start
    -
    -
    - RFC1766 -
    -
    -
    DC_RES::RFC1766() in DC_RES.php
    -
    -
    - RFC1766 -
    -
    -
    DC::RFC1766() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC::RFC3066() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC_RES::RFC3066() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC_RES::RIGHTS() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC::RIGHTS() in DC_C.php
    -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - ROLE -
    -
    -
    VCARD::ROLE() in VCARD_C.php
    -
    -
    - ROLE -
    -
    -
    VCARD_RES::ROLE() in VCARD_RES.php
    -
    -
    - RSS -
    -
    -
    RSS in rss_parse.inc
    -
    Project: MagpieRSS: a simple RSS integration tool File: rss_parse.inc - parse an RSS or Atom feed return as a simple object.
    -
    -
    - RSS -
    -
    -
    RSS in RSS_C.php
    -
    RSS Vocabulary (Resource)
    -
    -
    - RSSCache -
    -
    -
    RSSCache::RSSCache() in rss_cache.inc
    -
    -
    - RSSCache -
    -
    -
    RSSCache in rss_cache.inc
    -
    -
    - RssParser -
    -
    -
    RssParser in RssParser.php
    -
    RSS/ATOM Parser
    -
    -
    - RSS_NS -
    -
    -
    RSS_NS in constants.php
    -
    -
    - RSS_RES -
    -
    -
    RSS_RES in RSS_RES.php
    -
    RSS Vocabulary (ResResource)
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - RdfParser.php -
    -
    -
    RdfParser.php in RdfParser.php
    -
    -
    - RdfSerializer.php -
    -
    -
    RdfSerializer.php in RdfSerializer.php
    -
    -
    - RssParser.php -
    -
    -
    RssParser.php in RssParser.php
    -
    -
    - rss_cache.inc -
    -
    -
    rss_cache.inc in rss_cache.inc
    -
    -
    - rss_fetch.inc -
    -
    -
    rss_fetch.inc in rss_fetch.inc
    -
    -
    - rss_parse.inc -
    -
    -
    rss_parse.inc in rss_parse.inc
    -
    -
    - rss_utils.inc -
    -
    -
    rss_utils.inc in rss_utils.inc
    -
    -
    - RdfUtil.php -
    -
    -
    RdfUtil.php in RdfUtil.php
    -
    -
    - RDF.php -
    -
    -
    RDF.php in RDF.php
    -
    -
    - RDFS.php -
    -
    -
    RDFS.php in RDFS.php
    -
    -
    - RDFS_C.php -
    -
    -
    RDFS_C.php in RDFS_C.php
    -
    -
    - RDFS_RES.php -
    -
    -
    RDFS_RES.php in RDFS_RES.php
    -
    -
    - RDF_C.php -
    -
    -
    RDF_C.php in RDF_C.php
    -
    -
    - RDF_RES.php -
    -
    -
    RDF_RES.php in RDF_RES.php
    -
    -
    - RSS.php -
    -
    -
    RSS.php in RSS.php
    -
    -
    - RSS_C.php -
    -
    -
    RSS_C.php in RSS_C.php
    -
    -
    - RSS_RES.php -
    -
    -
    RSS_RES.php in RSS_RES.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $server -
    -
    -
    SparqlClient::$server in SparqlClient.php
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sg -
    -
    -
    SparqlEngineDb::$sg in SparqlEngineDb.php
    -
    SQL generator instance
    -
    -
    - $solutionModifier -
    -
    - -
    Optional solution modifier of the query.
    -
    -
    - $sops -
    -
    -
    SparqlParser::$sops in SparqlParser.php
    -
    Operators introduced by sparql
    -
    -
    - $sort_model -
    -
    -
    RdfSerializer::$sort_model in RdfSerializer.php
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - $stack -
    -
    -
    MagpieRSS::$stack in rss_parse.inc
    -
    -
    - $status -
    -
    -
    Snoopy::$status in Snoopy.class.inc
    -
    -
    - $strXmlData -
    -
    -
    SparqlResultParser::$strXmlData in SparqlResultParser.php
    -
    -
    - $subject -
    -
    -
    QueryTriple::$subject in QueryTriple.php
    -
    The QueryTriples Subject.
    -
    -
    - Statement.php -
    -
    -
    Statement.php in Statement.php
    -
    -
    - sameListAs -
    -
    -
    ResList::sameListAs() in ResList.php
    -
    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.
    -
    -
    - SAME_AS -
    -
    -
    OWL_RES::SAME_AS() in OWL_RES.php
    -
    -
    - SAME_AS -
    -
    -
    OWLVocabulary::SAME_AS() in OWLVocabulary.php
    -
    -
    - SAME_AS -
    -
    -
    OWL::SAME_AS() in OWL_C.php
    -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    -
    OWLVocabulary::SAME_CLASS_AS() in OWLVocabulary.php
    -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - saveAs -
    -
    -
    RdfSerializer::saveAs() in RdfSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    InfModelB::saveAs() in InfModelB.php
    -
    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.
    -
    -
    - saveAs -
    -
    -
    MemModel::saveAs() in MemModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - saveAs -
    -
    -
    NTripleSerializer::saveAs() in NTripleSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    ResModel::saveAs() in ResModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - saveAs -
    -
    -
    DbModel::saveAs() in DbModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    -
    -
    - saveAs -
    -
    -
    N3Serializer::saveAs() in N3Serializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SEEALSO -
    -
    -
    RDFS::SEEALSO() in RDFS_C.php
    -
    -
    - SEEALSO -
    -
    -
    RDFS_RES::SEEALSO() in RDFS_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF::SEE_ALSO() in RDF_C.php
    -
    -
    - SEE_ALSO -
    -
    -
    RdfsVocabulary::SEE_ALSO() in RdfsVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    OWLVocabulary::SEE_ALSO() in OWLVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    RDF_RES::SEE_ALSO() in RDF_RES.php
    -
    -
    - selectVars -
    -
    -
    SparqlEngine::selectVars() in SparqlEngine.php
    -
    Selects the result variables and builds a result table.
    -
    -
    - SEQ -
    -
    -
    RDF_RES::SEQ() in RDF_RES.php
    -
    -
    - SEQ -
    -
    -
    RDF::SEQ() in RDF_C.php
    -
    -
    - serialize -
    -
    -
    NTripleSerializer::serialize() in NTripleSerializer.php
    -
    Serializes a model to N Triple syntax.
    -
    -
    - serialize -
    -
    -
    RSSCache::serialize() in rss_cache.inc
    -
    -
    - serialize -
    -
    -
    N3Serializer::serialize() in N3Serializer.php
    -
    Serializes a model to N3 syntax.
    -
    -
    - serialize -
    -
    -
    RdfSerializer::serialize() in RdfSerializer.php
    -
    Serializes a model to RDF syntax.
    -
    -
    - serializeToFile -
    -
    - -
    Serialize the Dataset to File
    -
    -
    - serializeToFile -
    -
    -
    TriXSerializer::serializeToFile() in TriXSerializer.php
    -
    Serialize the dataset to a TriX string and save in file
    -
    -
    - serializeToString -
    -
    - -
    Serialize the Dataset to string
    -
    -
    - serializeToString -
    -
    - -
    Serialize the dataset to a TriX string
    -
    -
    - SERVICE -
    -
    -
    DC::SERVICE() in DC_C.php
    -
    -
    - SERVICE -
    -
    -
    DC_RES::SERVICE() in DC_RES.php
    -
    -
    - SER_RDF_QNAMES -
    -
    -
    SER_RDF_QNAMES in constants.php
    -
    -
    - SER_SORT_MODEL -
    -
    -
    SER_SORT_MODEL in constants.php
    -
    -
    - SER_USE_ATTRIBUTES -
    -
    -
    SER_USE_ATTRIBUTES in constants.php
    -
    -
    - SER_USE_ENTITIES -
    -
    -
    SER_USE_ENTITIES in constants.php
    -
    -
    - SER_XML_DECLARATION -
    -
    -
    SER_XML_DECLARATION in constants.php
    -
    -
    - set -
    -
    -
    ResSeq::set() in ResSeq.php
    -
    Set the value at a given index in the sequence.
    -
    -
    - set -
    -
    -
    RSSCache::set() in rss_cache.inc
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setBase -
    -
    -
    Query::setBase() in Query.php
    -
    Sets the base part.
    -
    -
    - setBaseURI -
    -
    -
    MemModel::setBaseURI() in MemModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    ResModel::setBaseURI() in ResModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    DbModel::setBaseURI() in DbModel.php
    -
    Set a base URI for the DbModel.
    -
    -
    - setComment -
    -
    -
    OntResource::setComment() in OntResource.php
    -
    Assert that the given string is the comment on this resource.
    -
    -
    - setcookies -
    -
    -
    Snoopy::setcookies() in Snoopy.class.inc
    -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Datasets name.
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Dataset name. Return true on success, false otherwise.
    -
    -
    - setDatatype -
    -
    -
    Literal::setDatatype() in Literal.php
    -
    Sets the datatype of the literal.
    -
    -
    - setDefault -
    -
    -
    ResAlt::setDefault() in ResAlt.php
    -
    Set the default value of this container.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDomain -
    -
    -
    OntProperty::setDomain() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.
    -
    -
    - setEntailment -
    -
    - -
    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setFindLiteralWithLang -
    -
    - -
    Sets that only Literals with the matching language should be returned
    -
    -
    - setFixBnodes -
    -
    -
    N3Parser::setFixBnodes() in N3Parser.php
    -
    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    -
    -
    - setGraphname -
    -
    -
    GraphPattern::setGraphname() in GraphPattern.php
    -
    Sets the graphname.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphMem::setGraphName() in NamedGraphMem.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphDb::setGraphName() in NamedGraphDb.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    - -
    Sets the graph name.
    -
    -
    - setHead -
    -
    -
    ResList::setHead() in ResList.php
    -
    Update the head of the list to have the given value, and return the previous value.
    -
    -
    - setId -
    -
    -
    GraphPattern::setId() in GraphPattern.php
    -
    Sets the GraphPatterns Id.
    -
    -
    - setInstanceRdfType -
    -
    - -
    Sets the rdf:type, that this distinct resource is instance of.
    -
    -
    - setIsAnon -
    -
    -
    ResResource::setIsAnon() in ResResource.php
    -
    Set whether this resource is an anonymous resource
    -
    -
    - setIsDefinedBy -
    -
    - -
    Assert that the given resource provides a source of definitions about this resource.
    -
    -
    - setLabelProperty -
    -
    - -
    Assert that the given string is the label on this resource.
    -
    -
    - setLanguage -
    -
    -
    Literal::setLanguage() in Literal.php
    -
    Sets the language of the literal.
    -
    -
    - setOuterFilter -
    -
    - -
    Sets the filter type to outer or inner filter.
    -
    -
    - setOutputFormat -
    -
    - -
    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.
    -
    -
    - setPropertyValue -
    -
    - -
    Set the value of the given property of this ontology resource to the given value.
    -
    -
    - setRange -
    -
    -
    OntProperty::setRange() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.
    -
    -
    - setRDFType -
    -
    -
    OntResource::setRDFType() in OntResource.php
    -
    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.
    -
    -
    - setResultForm -
    -
    - -
    Sets the result form.
    -
    -
    - setSeeAlso -
    -
    -
    OntResource::setSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource
    -
    -
    - setSolutionModifier -
    -
    - -
    Sets a solution modifier.
    -
    -
    - setSubClass -
    -
    -
    OntClass::setSubClass() in OntClass.php
    -
    Assert that this class is super-class of the given class.
    -
    -
    - setSubProperty -
    -
    - -
    Assert that this property is super-property of the given property.
    -
    -
    - setSuperClass -
    -
    - -
    Assert that this class is sub-class of the given class.
    -
    -
    - setSuperProperty -
    -
    - -
    Assert that this property is sub-property of the given property.
    -
    -
    - setTail -
    -
    -
    ResList::setTail() in ResList.php
    -
    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.
    -
    -
    - setTree -
    -
    -
    Constraint::setTree() in Constraint.php
    -
    -
    - setTrigger -
    -
    -
    InfRule::setTrigger() in InfRule.php
    -
    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setURI -
    -
    -
    ResResource::setURI() in ResResource.php
    -
    Sets the URI of this resource
    -
    -
    - setVocabulary -
    -
    -
    OntResource::setVocabulary() in OntResource.php
    -
    Sets the reference to the assoiated vocabulary
    -
    -
    - SHA1 -
    -
    -
    FOAF::SHA1() in FOAF_C.php
    -
    -
    - SHA1 -
    -
    -
    FOAF_RES::SHA1() in FOAF_RES.php
    -
    -
    - size -
    -
    -
    MemModel::size() in MemModel.php
    -
    Number of triples in the MemModel
    -
    -
    - size -
    -
    -
    DbModel::size() in DbModel.php
    -
    Return the number of statements in this DbModel.
    -
    -
    - size -
    -
    -
    InfModelB::size() in InfModelB.php
    -
    Number of all inferable triples in the Model.
    -
    -
    - size -
    -
    -
    ResModel::size() in ResModel.php
    -
    Number of statements in the MemModel
    -
    -
    - size -
    -
    -
    ResContainer::size() in ResContainer.php
    -
    Returns the number values in the container.
    -
    -
    - slashbox -
    -
    -
    slashbox() in magpie_slashbox.php
    -
    -
    - SMARTY_DIR -
    -
    -
    SMARTY_DIR in simple_smarty.php
    -
    -
    - smarty_modifier_rss_date_parse -
    -
    -
    smarty_modifier_rss_date_parse() in modifier.rss_date_parse.php
    -
    -
    - Snoopy -
    -
    -
    Snoopy in Snoopy.class.inc
    -
    ***********************************************
    -
    -
    - SOFTWARE -
    -
    -
    DC_RES::SOFTWARE() in DC_RES.php
    -
    -
    - SOFTWARE -
    -
    -
    DC::SOFTWARE() in DC_C.php
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - sortVars -
    -
    -
    SparqlEngine::sortVars() in SparqlEngine.php
    -
    Sorts the results.
    -
    -
    - SORT_STRING -
    -
    -
    VCARD::SORT_STRING() in VCARD_C.php
    -
    -
    - SORT_STRING -
    -
    -
    VCARD_RES::SORT_STRING() in VCARD_RES.php
    -
    -
    - SOUND -
    -
    -
    DC::SOUND() in DC_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD::SOUND() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD_RES::SOUND() in VCARD_RES.php
    -
    -
    - SOUND -
    -
    -
    DC_RES::SOUND() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    DC::SOURCE() in DC_C.php
    -
    -
    - SOURCE -
    -
    -
    VCARD::SOURCE() in VCARD_C.php
    -
    -
    - SOURCE -
    -
    -
    DC_RES::SOURCE() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD_RES::SOURCE() in VCARD_RES.php
    -
    -
    - SPARQL.php -
    -
    -
    SPARQL.php in SPARQL.php
    -
    -
    - SparqlClient.php -
    -
    -
    SparqlClient.php in SparqlClient.php
    -
    -
    - SparqlEngine.php -
    -
    -
    SparqlEngine.php in SparqlEngine.php
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlGeneratorException.php -
    -
    -
    SqlGeneratorException.php in SqlGeneratorException.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb.php -
    -
    -
    SparqlEngineDb.php in SparqlEngineDb.php
    -
    -
    - SparqlParser.php -
    -
    -
    SparqlParser.php in SparqlParser.php
    -
    -
    - SparqlParserException.php -
    -
    -
    SparqlParserException.php in SparqlParserException.php
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient::SparqlClient() in SparqlClient.php
    -
    Constructor of SparlClient.
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient in SparqlClient.php
    -
    Client for querying a sparql server.
    -
    -
    - SparqlEngine -
    -
    -
    SparqlEngine in SparqlEngine.php
    -
    This engine executes SPARQL queries against an RDF Datatset.
    -
    -
    - SparqlEngineDb -
    -
    -
    SparqlEngineDb in SparqlEngineDb.php
    -
    SPARQL engine optimized for databases.
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer -
    -
    -
    SparqlEngineDb_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlGeneratorException -
    -
    -
    SparqlEngineDb_SqlGeneratorException in SqlGeneratorException.php
    -
    Exception when generating the SQL statement
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - SparqlEngine_PreparedStatement -
    -
    -
    SparqlEngine_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngine_ResultConverter -
    -
    -
    SparqlEngine_ResultConverter in ResultConverter.php
    -
    Converts a memory result into a proper rdf statement triple array
    -
    -
    - SparqlEngine_ResultRenderer -
    -
    -
    SparqlEngine_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngine_ResultRenderer_Default -
    -
    - -
    Default result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_HTML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_XML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser in SparqlParser.php
    -
    Parses a SPARQL Query string and returns a Query Object.
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser::SparqlParser() in SparqlParser.php
    -
    Constructor of SparqlParser
    -
    -
    - SparqlParserException -
    -
    -
    SparqlParserException in SparqlParserException.php
    -
    A SPARQL Parser Execption for better errorhandling.
    -
    -
    - sparqlPrepare -
    -
    - -
    Prepares a sparql query and returns a prepared statement that can be executed with data later on.
    -
    -
    - sparqlQuery -
    -
    -
    Dataset::sparqlQuery() in Dataset.php
    -
    Performs a SPARQL query against an RDF Dataset.
    -
    -
    - sparqlQuery -
    -
    - -
    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.
    -
    -
    - SparqlResultParser -
    -
    -
    SparqlResultParser in SparqlResultParser.php
    -
    Parses an xml document in SPARQL Result XML Format.
    -
    -
    - SPATIAL -
    -
    -
    DC_RES::SPATIAL() in DC_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC::SPATIAL() in DC_C.php
    -
    -
    - Statement -
    -
    -
    Statement in Statement.php
    -
    An RDF statement.
    -
    -
    - Statement -
    -
    -
    Statement::Statement() in Statement.php
    -
    The parameters to constructor are instances of classes and not just strings
    -
    -
    - STATEMENT -
    -
    -
    RDF_RES::STATEMENT() in RDF_RES.php
    -
    -
    - STATEMENT -
    -
    -
    RDF::STATEMENT() in RDF_C.php
    -
    -
    - StatementIterator -
    -
    -
    StatementIterator in StatementIterator.php
    -
    Iterator for traversing models.
    -
    -
    - StatementIterator -
    -
    - -
    Constructor
    -
    -
    - STILLIMAGE -
    -
    -
    DC_RES::STILLIMAGE() in DC_RES.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC::STILLIMAGE() in DC_C.php
    -
    -
    - str -
    -
    -
    str() in FilterFunctions.php
    -
    Evaluates the str() function. Returns the string representation of a variable or RDF term.
    -
    -
    - STREET -
    -
    -
    VCARD_RES::STREET() in VCARD_RES.php
    -
    -
    - STREET -
    -
    -
    VCARD::STREET() in VCARD_C.php
    -
    -
    - subject -
    -
    -
    Statement::subject() in Statement.php
    -
    Alias for getSubject()
    -
    -
    - SUBJECT -
    -
    -
    DC::SUBJECT() in DC_C.php
    -
    -
    - SUBJECT -
    -
    -
    DC_RES::SUBJECT() in DC_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF_RES::SUBJECT() in RDF_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF::SUBJECT() in RDF_C.php
    -
    -
    - subtract -
    -
    -
    DbModel::subtract() in DbModel.php
    -
    Return a new MemModel that is the subtraction of another model from this DbModel.
    -
    -
    - subtract -
    -
    -
    ResModel::subtract() in ResModel.php
    -
    Returns a new model that is the subtraction of another model from this model.
    -
    -
    - subtract -
    -
    -
    MemModel::subtract() in MemModel.php
    -
    Returns a new MemModel that is the subtraction of another model from this MemModel.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    OWLVocabulary::SUB_CLASS_OF() in OWLVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RdfsVocabulary::SUB_CLASS_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS::SUB_CLASS_OF() in RDFS_C.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS_RES::SUB_CLASS_OF() in RDFS_RES.php
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    -
    RdfsVocabulary::SUB_PROPERTY_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUFFIX -
    -
    -
    VCARD::SUFFIX() in VCARD_C.php
    -
    -
    - SUFFIX -
    -
    -
    VCARD_RES::SUFFIX() in VCARD_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM_RES::SUMMARY() in ATOM_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM::SUMMARY() in ATOM_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF::SURNAME() in FOAF_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF_RES::SURNAME() in FOAF_RES.php
    -
    -
    - switchOperator -
    -
    - -
    -
    - sy -
    -
    -
    RssParser::sy() in RssParser.php
    -
    Adds the sy namespace.
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SparqlResultParser.php -
    -
    -
    SparqlResultParser.php in SparqlResultParser.php
    -
    -
    - SyntaxGRDDL.php -
    -
    -
    SyntaxGRDDL.php in SyntaxGRDDL.php
    -
    -
    - SyntaxN3.php -
    -
    -
    SyntaxN3.php in SyntaxN3.php
    -
    -
    - SyntaxRDF.php -
    -
    -
    SyntaxRDF.php in SyntaxRDF.php
    -
    -
    - SyntaxRSS.php -
    -
    -
    SyntaxRSS.php in SyntaxRSS.php
    -
    -
    - SyntaxSparqlRes.php -
    -
    -
    SyntaxSparqlRes.php in SyntaxSparqlRes.php
    -
    -
    - Snoopy.class.inc -
    -
    -
    Snoopy.class.inc in Snoopy.class.inc
    -
    -
    - simple_smarty.php -
    -
    -
    simple_smarty.php in simple_smarty.php
    -
    -
    - StatementIterator.php -
    -
    -
    StatementIterator.php in StatementIterator.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $textinput -
    -
    -
    MagpieRSS::$textinput in rss_parse.inc
    -
    -
    - $timed_out -
    -
    -
    Snoopy::$timed_out in Snoopy.class.inc
    -
    -
    - $tmp -
    -
    -
    SparqlParser::$tmp in SparqlParser.php
    -
    Last parsed graphPattern
    -
    -
    - $Tokens -
    -
    -
    N3Parser::$Tokens in N3Parser.php
    -
    -
    - $tokens -
    -
    -
    SparqlParser::$tokens in SparqlParser.php
    -
    The tokenized Query
    -
    -
    - $tree -
    -
    -
    Constraint::$tree in Constraint.php
    -
    The expression tree
    -
    -
    - $triplePattern -
    -
    -
    GraphPattern::$triplePattern in GraphPattern.php
    -
    -
    - $ts -
    -
    -
    SparqlEngineDb::$ts in SparqlEngineDb.php
    -
    Type sorting instance
    -
    -
    - $type -
    -
    - -
    -
    - $type -
    -
    -
    RssParser::$type in RssParser.php
    -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - TriXParser.php -
    -
    -
    TriXParser.php in TriXParser.php
    -
    -
    - TriXSerializer.php -
    -
    -
    TriXSerializer.php in TriXSerializer.php
    -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - tagClosed -
    -
    -
    SparqlResultParser::tagClosed() in SparqlResultParser.php
    -
    -
    - tagData -
    -
    -
    SparqlResultParser::tagData() in SparqlResultParser.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM_RES::TAGLINE() in ATOM_RES.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM::TAGLINE() in ATOM_C.php
    -
    -
    - tagOpen -
    -
    -
    SparqlResultParser::tagOpen() in SparqlResultParser.php
    -
    -
    - TEL -
    -
    -
    VCARD_RES::TEL() in VCARD_RES.php
    -
    -
    - TEL -
    -
    -
    VCARD::TEL() in VCARD_C.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD::TELTYPES() in VCARD_C.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD_RES::TELTYPES() in VCARD_RES.php
    -
    -
    - TEMPORAL -
    -
    -
    DC::TEMPORAL() in DC_C.php
    -
    -
    - TEMPORAL -
    -
    -
    DC_RES::TEMPORAL() in DC_RES.php
    -
    -
    - test_library_support -
    -
    -
    test_library_support() in magpie_debug.php
    -
    -
    - TEXT -
    -
    -
    DC_RES::TEXT() in DC_RES.php
    -
    -
    - TEXT -
    -
    -
    DC::TEXT() in DC_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS::TEXTINPUT() in RSS_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS_RES::TEXTINPUT() in RSS_RES.php
    -
    -
    - TGN -
    -
    -
    DC::TGN() in DC_C.php
    -
    -
    - TGN -
    -
    -
    DC_RES::TGN() in DC_RES.php
    -
    -
    - THEME -
    -
    -
    FOAF::THEME() in FOAF_C.php
    -
    -
    - THEME -
    -
    -
    FOAF_RES::THEME() in FOAF_RES.php
    -
    -
    - THING -
    -
    -
    OWL::THING() in OWL_C.php
    -
    -
    - THING -
    -
    -
    OWL_RES::THING() in OWL_RES.php
    -
    -
    - THING -
    -
    -
    OWLVocabulary::THING() in OWLVocabulary.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF_RES::THUMBNAIL() in FOAF_RES.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF::THUMBNAIL() in FOAF_C.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF_RES::TIPJAR() in FOAF_RES.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF::TIPJAR() in FOAF_C.php
    -
    -
    - TITLE -
    -
    -
    RSS_RES::TITLE() in RSS_RES.php
    -
    -
    - TITLE -
    -
    -
    RSS::TITLE() in RSS_C.php
    -
    -
    - TITLE -
    -
    -
    FOAF_RES::TITLE() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    DC::TITLE() in DC_C.php
    -
    -
    - TITLE -
    -
    -
    VCARD_RES::TITLE() in VCARD_RES.php
    -
    -
    - TITLE -
    -
    -
    ATOM::TITLE() in ATOM_C.php
    -
    -
    - TITLE -
    -
    -
    ATOM_RES::TITLE() in ATOM_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD::TITLE() in VCARD_C.php
    -
    -
    - TITLE -
    -
    -
    DC_RES::TITLE() in DC_RES.php
    -
    -
    - TITLE -
    -
    -
    FOAF::TITLE() in FOAF_C.php
    -
    -
    - tokenize -
    -
    -
    SparqlParser::tokenize() in SparqlParser.php
    -
    Tokenizes the querystring.
    -
    -
    - TOPIC -
    -
    -
    FOAF_RES::TOPIC() in FOAF_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF::TOPIC() in FOAF_C.php
    -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - toString -
    -
    -
    DbModel::toString() in DbModel.php
    -
    Short dump of the DbModel.
    -
    -
    - toString -
    -
    -
    BlankNode::toString() in Blanknode.php
    -
    Dumps bNode.
    -
    -
    - toString -
    -
    -
    Quad::toString() in Quad.php
    -
    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.
    -
    -
    - toString -
    -
    -
    MemModel::toString() in MemModel.php
    -
    Short Dump of the MemModel.
    -
    -
    - toString -
    -
    -
    InfModelF::toString() in InfModelF.php
    -
    Short Dump of the InfModelF.
    -
    -
    - toString -
    -
    -
    InfModelB::toString() in InfModelB.php
    -
    Short Dump of the InfModelB.
    -
    -
    - toString -
    -
    -
    Object::toString() in Object.php
    -
    Serializes a object into a string
    -
    -
    - toString -
    -
    -
    Literal::toString() in Literal.php
    -
    Dumps literal.
    -
    -
    - toString -
    -
    -
    Statement::toString() in Statement.php
    -
    Dumps the triple.
    -
    -
    - toString -
    -
    -
    Resource::toString() in Resource.php
    -
    Dumps resource.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the MemModel including all triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the InfModelB including ALL inferable triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dump of the DbModel including all triples.
    -
    -
    - toStringObject -
    -
    - -
    Reurns a toString() serialization of the statements's object.
    -
    -
    - toStringPredicate -
    -
    - -
    Returns a toString() serialization of the statements's predicate.
    -
    -
    - toStringSubject -
    -
    - -
    Returns a toString() serialization of the statements's subject.
    -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TriXParser -
    -
    -
    TriXParser in TriXParser.php
    -
    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.
    -
    -
    - TriXParser -
    -
    -
    TriXParser::TriXParser() in TriXParser.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer::TriXSerializer() in TriXSerializer.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer in TriXSerializer.php
    -
    Temporary implementation of a TriX-Serializer
    -
    -
    - TYPE -
    -
    -
    RDF_RES::TYPE() in RDF_RES.php
    -
    -
    - TYPE -
    -
    -
    RDF::TYPE() in RDF_C.php
    -
    -
    - TYPE -
    -
    -
    ATOM_RES::TYPE() in ATOM_RES.php
    -
    -
    - TYPE -
    -
    -
    ATOM::TYPE() in ATOM_C.php
    -
    -
    - TYPE -
    -
    -
    DC::TYPE() in DC_C.php
    -
    -
    - TYPE -
    -
    -
    RdfsVocabulary::TYPE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TYPE -
    -
    -
    DC_RES::TYPE() in DC_RES.php
    -
    -
    - TYPE -
    -
    -
    OWLVocabulary::TYPE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TZ -
    -
    -
    VCARD_RES::TZ() in VCARD_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD::TZ() in VCARD_C.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD_RES::TZTYPES() in VCARD_RES.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD::TZTYPES() in VCARD_C.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $union -
    -
    -
    GraphPattern::$union in GraphPattern.php
    -
    -
    - $usedVars -
    -
    -
    Query::$usedVars in Query.php
    -
    List of all vars used in the query.
    -
    -
    - $user -
    -
    -
    Snoopy::$user in Snoopy.class.inc
    -
    -
    - $use_attributes -
    -
    -
    RdfSerializer::$use_attributes in RdfSerializer.php
    -
    -
    - $use_entities -
    -
    -
    RdfSerializer::$use_entities in RdfSerializer.php
    -
    -
    - $use_gzip -
    -
    -
    Snoopy::$use_gzip in Snoopy.class.inc
    -
    -
    - $use_xml_declaration -
    -
    - -
    -
    - UDC -
    -
    -
    DC_RES::UDC() in DC_RES.php
    -
    -
    - UDC -
    -
    -
    DC::UDC() in DC_C.php
    -
    -
    - UID -
    -
    -
    VCARD_RES::UID() in VCARD_RES.php
    -
    -
    - UID -
    -
    -
    VCARD::UID() in VCARD_C.php
    -
    -
    - uncomment -
    -
    -
    SparqlParser::uncomment() in SparqlParser.php
    -
    Removes comments in the query string. Comments are indicated by '#'.
    -
    -
    - UNIC_RDF -
    -
    -
    UNIC_RDF in constants.php
    -
    -
    - UNION_OF -
    -
    -
    OWL_RES::UNION_OF() in OWL_RES.php
    -
    -
    - UNION_OF -
    -
    -
    OWL::UNION_OF() in OWL_C.php
    -
    -
    - UNION_OF -
    -
    -
    OWLVocabulary::UNION_OF() in OWLVocabulary.php
    -
    -
    - unite -
    -
    -
    MemModel::unite() in MemModel.php
    -
    Returns a new MemModel that is the set-union of the MemModel with another model.
    -
    -
    - unite -
    -
    -
    DbModel::unite() in DbModel.php
    -
    Return a new MemModel that is the set-union the model with another model.
    -
    -
    - unite -
    -
    -
    ResModel::unite() in ResModel.php
    -
    Returns a new Model that is the set-union of the model with another model.
    -
    -
    - unserialize -
    -
    -
    RSSCache::unserialize() in rss_cache.inc
    -
    -
    - uparse -
    -
    -
    N3Parser::uparse() in N3Parser.php
    -
    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    -
    -
    - URI -
    -
    -
    DC_RES::URI() in DC_RES.php
    -
    -
    - URI -
    -
    -
    DC::URI() in DC_C.php
    -
    -
    - URL -
    -
    -
    ATOM_RES::URL() in ATOM_RES.php
    -
    -
    - URL -
    -
    -
    RSS_RES::URL() in RSS_RES.php
    -
    -
    - URL -
    -
    -
    RSS::URL() in RSS_C.php
    -
    -
    - URL -
    -
    -
    ATOM::URL() in ATOM_C.php
    -
    -
    - USE_ANY_QUOTE -
    -
    -
    USE_ANY_QUOTE in constants.php
    -
    -
    - USE_CDATA -
    -
    -
    USE_CDATA in constants.php
    -
    -
    - Utility.php -
    -
    -
    Utility.php in Utility.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - $varDatatypes -
    -
    - -
    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.
    -
    -
    - $varLanguages -
    -
    - -
    Language of variables. NULL if the variable has no language tag (e.g. @en) set.
    -
    -
    - $varlist -
    -
    -
    SparqlResultParser::$varlist in SparqlResultParser.php
    -
    -
    - $varname -
    -
    -
    SparqlResultParser::$varname in SparqlResultParser.php
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsMem::valid() in IteratorFindQuadsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IterFind::valid() in IterFind.php
    -
    Says if there are additional items left in the list
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsMem::valid() in IteratorAllGraphsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    ResIterator::valid() in ResIterator.php
    -
    Says if there are additional items left in the list
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsDb::valid() in IteratorFindQuadsDb.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsDb::valid() in IteratorAllGraphsDb.php
    -
    Says if there are additional items left in the list
    -
    -
    - VALID -
    -
    -
    DC::VALID() in DC_C.php
    -
    -
    - VALID -
    -
    -
    DC_RES::VALID() in DC_RES.php
    -
    -
    - VALIDATE_IDS -
    -
    -
    VALIDATE_IDS in constants.php
    -
    -
    - VALUE -
    -
    -
    ATOM::VALUE() in ATOM_C.php
    -
    -
    - VALUE -
    -
    -
    ATOM_RES::VALUE() in ATOM_RES.php
    -
    -
    - varCheck -
    -
    -
    SparqlParser::varCheck() in SparqlParser.php
    -
    Checks if $token is a variable.
    -
    -
    - VCARD -
    -
    -
    VCARD in VCARD_C.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (Resource)
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD::VCARD_CLASS() in VCARD_C.php
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD_RES::VCARD_CLASS() in VCARD_RES.php
    -
    -
    - VCARD_NS -
    -
    -
    VCARD_NS in constants.php
    -
    -
    - VCARD_RES -
    -
    -
    VCARD_RES in VCARD_RES.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    -
    -
    - VERSION -
    -
    -
    ATOM::VERSION() in ATOM_C.php
    -
    -
    - VERSION -
    -
    -
    ATOM_RES::VERSION() in ATOM_RES.php
    -
    -
    - VERSION_INFO -
    -
    - -
    -
    - VERSION_INFO -
    -
    -
    OWL::VERSION_INFO() in OWL_C.php
    -
    -
    - VERSION_INFO -
    -
    -
    OWLVocabulary::VERSION_INFO() in OWLVocabulary.php
    -
    -
    - visualize -
    -
    -
    Model::visualize() in Model.php
    -
    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    -
    -
    - visualizeGraph -
    -
    - -
    Generates a dot-file for drawing graphical output with the
    -
    -
    - VCARD.php -
    -
    -
    VCARD.php in VCARD.php
    -
    -
    - VCARD_C.php -
    -
    -
    VCARD_C.php in VCARD_C.php
    -
    -
    - VCARD_RES.php -
    -
    -
    VCARD_RES.php in VCARD_RES.php
    -
    -
    - Vocabulary.php -
    -
    -
    Vocabulary.php in Vocabulary.php
    -
    -
    - VocabularyClass.php -
    -
    -
    VocabularyClass.php in VocabularyClass.php
    -
    -
    - VocabularyRes.php -
    -
    -
    VocabularyRes.php in VocabularyRes.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - $WARNING -
    -
    -
    MagpieRSS::$WARNING in rss_parse.inc
    -
    -
    - W3CDTF -
    -
    -
    DC_RES::W3CDTF() in DC_RES.php
    -
    -
    - W3CDTF -
    -
    -
    DC::W3CDTF() in DC_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF_RES::WEBLOG() in FOAF_RES.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF::WEBLOG() in FOAF_C.php
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - writeAsHtml -
    -
    -
    MemModel::writeAsHtml() in MemModel.php
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    DbModel::writeAsHtml() in DbModel.php
    -
    Write the RDF serialization of the _DbModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    InfModelB::writeAsHtml() in InfModelB.php
    -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML.
    -
    -
    - writeAsHTMLTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Write the RDF serialization of the DbModel as HTML table.
    -
    -
    - writeHTMLTable -
    -
    - -
    Prints a MemModel as HTML table.
    -
    -
    - writeQueryResultAsHtmlTable -
    -
    - -
    Prints a query result as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Write the RDF serialization of the DbModel to string.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML_LANG -
    -
    -
    XML_LANG in constants.php
    -
    -
    - XML_NAMESPACE_DECLARATION_PREFIX -
    -
    - -
    -
    - XML_NAMESPACE_PREFIX -
    -
    -
    XML_NAMESPACE_PREFIX in constants.php
    -
    -
    - XML_NAMESPACE_URI -
    -
    -
    XML_NAMESPACE_URI in constants.php
    -
    -
    - XML_SCHEMA -
    -
    -
    XML_SCHEMA in constants.php
    -
    -
    - -
    -
    y
    - -
    -
    -
    -
    - YAHOO_CHAT_ID -
    -
    - -
    -
    - YAHOO_CHAT_ID -
    -
    -
    FOAF::YAHOO_CHAT_ID() in FOAF_C.php
    -
    -
    - -
    -
    _
    - -
    -
    -
    -
    - $_CONTENT_CONSTRUCTS -
    -
    - -
    -
    - $_fp_timeout -
    -
    -
    Snoopy::$_fp_timeout in Snoopy.class.inc
    -
    -
    - $_framedepth -
    -
    -
    Snoopy::$_framedepth in Snoopy.class.inc
    -
    -
    - $_frameurls -
    -
    -
    Snoopy::$_frameurls in Snoopy.class.inc
    -
    -
    - $_httpmethod -
    -
    -
    Snoopy::$_httpmethod in Snoopy.class.inc
    -
    -
    - $_httpversion -
    -
    -
    Snoopy::$_httpversion in Snoopy.class.inc
    -
    -
    - $_isproxy -
    -
    -
    Snoopy::$_isproxy in Snoopy.class.inc
    -
    -
    - $_KNOWN_ENCODINGS -
    -
    - -
    -
    - $_maxlinelen -
    -
    -
    Snoopy::$_maxlinelen in Snoopy.class.inc
    -
    ** Private variables ***
    -
    -
    - $_mime_boundary -
    -
    -
    Snoopy::$_mime_boundary in Snoopy.class.inc
    -
    -
    - $_redirectaddr -
    -
    -
    Snoopy::$_redirectaddr in Snoopy.class.inc
    -
    -
    - $_redirectdepth -
    -
    -
    Snoopy::$_redirectdepth in Snoopy.class.inc
    -
    -
    - $_source_encoding -
    -
    - -
    -
    - $_submit_method -
    -
    -
    Snoopy::$_submit_method in Snoopy.class.inc
    -
    -
    - $_submit_type -
    -
    -
    Snoopy::$_submit_type in Snoopy.class.inc
    -
    -
    - _buildIntBindings -
    -
    - -
    Marks triples with internal bindings.
    -
    -
    - _buildResultSet -
    -
    - -
    Builds the resultset.
    -
    -
    - _buildurl -
    -
    -
    SparqlClient::_buildurl() in SparqlClient.php
    -
    Helper function that builds the url.
    -
    -
    - _checkGraphs -
    -
    -
    SparqlEngine::_checkGraphs() in SparqlEngine.php
    -
    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.
    -
    -
    - _check_timeout -
    -
    -
    Snoopy::_check_timeout() in Snoopy.class.inc
    -
    -
    - _connect -
    -
    -
    Snoopy::_connect() in Snoopy.class.inc
    -
    -
    - _determineType -
    -
    - -
    Tries to determine the rdf:type of the variable.
    -
    -
    - _disconnect -
    -
    -
    Snoopy::_disconnect() in Snoopy.class.inc
    -
    -
    - _expandlinks -
    -
    -
    Snoopy::_expandlinks() in Snoopy.class.inc
    -
    -
    - _fastForward -
    -
    -
    SparqlParser::_fastForward() in SparqlParser.php
    -
    FastForward until next token which is not blank.
    -
    -
    - _fetch_remote_file -
    -
    -
    _fetch_remote_file() in rss_fetch.inc
    -
    -
    - _generateRDF -
    -
    -
    GRDDLParser::_generateRDF() in GRDDLParser.php
    -
    -
    - _getAttributes -
    -
    - -
    Search the attributes listed in $list in the dataset.
    -
    -
    - _getBindingString -
    -
    - -
    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.
    -
    -
    - _httprequest -
    -
    -
    Snoopy::_httprequest() in Snoopy.class.inc
    -
    -
    - _httpsrequest -
    -
    -
    Snoopy::_httpsrequest() in Snoopy.class.inc
    -
    -
    - _http_get -
    -
    -
    SparqlClient::_http_get() in SparqlClient.php
    -
    Executes the GET Request.
    -
    -
    - _is_forbidden_rdf_property_attribute -
    -
    - -
    -
    - _parseSparqlQuery -
    -
    - -
    Parses an query and returns the parsed form.
    -
    -
    - _parse_uri -
    -
    -
    RdfParser::_parse_uri() in RdfParser.php
    -
    -
    - _prepareSparql -
    -
    - -
    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...
    -
    -
    - _prepare_post_body -
    -
    -
    Snoopy::_prepare_post_body() in Snoopy.class.inc
    -
    -
    - _report_error -
    -
    - -
    -
    - _response_to_rss -
    -
    -
    _response_to_rss() in rss_fetch.inc
    -
    -
    - _rewind -
    -
    -
    SparqlParser::_rewind() in SparqlParser.php
    -
    Rewind until next token which is not blank.
    -
    -
    - _stripform -
    -
    -
    Snoopy::_stripform() in Snoopy.class.inc
    -
    -
    - _striplinks -
    -
    -
    Snoopy::_striplinks() in Snoopy.class.inc
    -
    -
    - _striptext -
    -
    -
    Snoopy::_striptext() in Snoopy.class.inc
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlParserException::__construct() in SparqlParserException.php
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlEngineDb::__construct() in SparqlEngineDb.php
    -
    Use SparqlEngine::factory() to create the instance
    -
    -
    - __construct -
    -
    -
    SparqlEngine::__construct() in SparqlEngine.php
    -
    Use SparqlEngine::factory() instead of this constructor.
    -
    -
    - __toString -
    -
    - -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - x - y - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_dataset.html.svn-base deleted file mode 100755 index c4917f6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_dataset.html.svn-base +++ /dev/null @@ -1,1028 +0,0 @@ - - - - - - - - - - - - -

    [dataset] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - d - e - f - g - h - i - k - l - n - p - q - r - s - t - v -
    - - -
    -
    a
    - -
    -
    -
    -
    - addAll -
    -
    -
    DatasetMem::addAll() in DatasetMem.php
    -
    Adds all named graphs of the other dataset to this dataset.
    -
    -
    - addAll -
    -
    -
    DatasetDb::addAll() in DatasetDb.php
    -
    Add all named graphs of the other dataset to this dataset.
    -
    -
    - addNamedGraph -
    -
    -
    DatasetMem::addNamedGraph() in DatasetMem.php
    -
    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    -
    -
    - addNamedGraph -
    -
    - -
    Adds a NamedGraph to the set.
    -
    -
    - addQuad -
    -
    -
    DatasetMem::addQuad() in DatasetMem.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addQuad -
    -
    -
    DatasetDb::addQuad() in DatasetDb.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - clear -
    -
    -
    DatasetDb::clear() in DatasetDb.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - clear -
    -
    -
    DatasetMem::clear() in DatasetMem.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsQuad -
    -
    -
    DatasetMem::containsQuad() in DatasetMem.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsQuad -
    -
    -
    DatasetDb::containsQuad() in DatasetDb.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - countGraphs -
    -
    -
    DatasetDb::countGraphs() in DatasetDb.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countGraphs -
    -
    -
    DatasetMem::countGraphs() in DatasetMem.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countQuads -
    -
    -
    DatasetMem::countQuads() in DatasetMem.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countQuads -
    -
    -
    DatasetDb::countQuads() in DatasetDb.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - createGraph -
    -
    -
    DatasetDb::createGraph() in DatasetDb.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    -
    -
    - createGraph -
    -
    -
    DatasetMem::createGraph() in DatasetMem.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    -
    -
    - current -
    -
    -
    IteratorFindQuadsMem::current() in IteratorFindQuadsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorFindQuadsDb::current() in IteratorFindQuadsDb.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsMem::current() in IteratorAllGraphsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsDb::current() in IteratorAllGraphsDb.php
    -
    Returns the current item
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - Dataset -
    -
    -
    Dataset in Dataset.php
    -
    Dataset implementation.
    -
    -
    - Dataset.php -
    -
    -
    Dataset.php in Dataset.php
    -
    -
    - DatasetMem.php -
    -
    -
    DatasetMem.php in DatasetMem.php
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb::DatasetDb() in DatasetDb.php
    -
    Constructor You can supply a Dataset name.
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb in DatasetDb.php
    -
    Dataset implementation.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem::DatasetMem() in DatasetMem.php
    -
    Constructor.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem in DatasetMem.php
    -
    In-memory implementation of a RDF dataset.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    Quad::equals() in Quad.php
    -
    Checks if two quads are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphMem::getGraphName() in NamedGraphMem.php
    -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    - -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphDb::getGraphName() in NamedGraphDb.php
    -
    Returns the graph name.
    -
    -
    - getNamedGraph -
    -
    - -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraph -
    -
    -
    DatasetMem::getNamedGraph() in DatasetMem.php
    -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getObject -
    -
    -
    Quad::getObject() in Quad.php
    -
    Returns the object.
    -
    -
    - getPredicate -
    -
    - -
    Returns the predicate.
    -
    -
    - getStatement -
    -
    - -
    Returns the statement(subject,predicate,object).
    -
    -
    - getSubject -
    -
    -
    Quad::getSubject() in Quad.php
    -
    Returns the subject.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if an defaultGraph exists. False otherwise .
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if a defaultGraph exists. False otherwise.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - IteratorAllGraphsDb.php -
    -
    -
    IteratorAllGraphsDb.php in IteratorAllGraphsDb.php
    -
    -
    - IteratorAllGraphsMem.php -
    -
    -
    IteratorAllGraphsMem.php in IteratorAllGraphsMem.php
    -
    -
    - IteratorFindQuadsDb.php -
    -
    -
    IteratorFindQuadsDb.php in IteratorFindQuadsDb.php
    -
    -
    - IteratorFindQuadsMem.php -
    -
    -
    IteratorFindQuadsMem.php in IteratorFindQuadsMem.php
    -
    -
    - isEmpty -
    -
    -
    DatasetDb::isEmpty() in DatasetDb.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    DatasetMem::isEmpty() in DatasetMem.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - IteratorAllGraphsDb -
    -
    -
    IteratorAllGraphsDb in IteratorAllGraphsDb.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    -
    IteratorAllGraphsMem in IteratorAllGraphsMem.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsDb -
    -
    -
    IteratorFindQuadsDb in IteratorFindQuadsDb.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsMem -
    -
    -
    IteratorFindQuadsMem in IteratorFindQuadsMem.php
    -
    Implementation of a quad iterator.
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    IteratorFindQuadsMem::key() in IteratorFindQuadsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorFindQuadsDb::key() in IteratorFindQuadsDb.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsMem::key() in IteratorAllGraphsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsDb::key() in IteratorAllGraphsDb.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - loadFromFile -
    -
    - -
    Load a Dataset from a File
    -
    -
    - loadFromString -
    -
    - -
    Load a Datset from a string
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - NamedGraphDb.php -
    -
    -
    NamedGraphDb.php in NamedGraphDb.php
    -
    -
    - NamedGraphMem.php -
    -
    -
    NamedGraphMem.php in NamedGraphMem.php
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb::NamedGraphDb() in NamedGraphDb.php
    -
    Constructor Do not call this directly.
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb in NamedGraphDb.php
    -
    Persistent NamedGraph implementation that extends a DbModel.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem in NamedGraphMem.php
    -
    NamedGraph implementation that extends a MemModel with a name.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem::NamedGraphMem() in NamedGraphMem.php
    -
    Constructor You have to supply a graph name. You can supply a URI.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsDb::next() in IteratorFindQuadsDb.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsMem::next() in IteratorFindQuadsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsMem::next() in IteratorAllGraphsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsDb::next() in IteratorAllGraphsDb.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - parseFile -
    -
    -
    TriXParser::parseFile() in TriXParser.php
    -
    Parse from a file
    -
    -
    - parseString -
    -
    -
    TriXParser::parseString() in TriXParser.php
    -
    Parse an XML string
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - Quad.php -
    -
    -
    Quad.php in Quad.php
    -
    -
    - Quad -
    -
    -
    Quad::Quad() in Quad.php
    -
    Constructor Creates a Quad from four Nodes.
    -
    -
    - Quad -
    -
    -
    Quad in Quad.php
    -
    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeQuad -
    -
    -
    DatasetMem::removeQuad() in DatasetMem.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeQuad -
    -
    -
    DatasetDb::removeQuad() in DatasetDb.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsMem::rewind() in IteratorFindQuadsMem.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsDb::rewind() in IteratorAllGraphsDb.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsMem::rewind() in IteratorAllGraphsMem.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsDb::rewind() in IteratorFindQuadsDb.php
    -
    Resets iterator list to start.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - serializeToFile -
    -
    - -
    Serialize the Dataset to File
    -
    -
    - serializeToFile -
    -
    -
    TriXSerializer::serializeToFile() in TriXSerializer.php
    -
    Serialize the dataset to a TriX string and save in file
    -
    -
    - serializeToString -
    -
    - -
    Serialize the Dataset to string
    -
    -
    - serializeToString -
    -
    - -
    Serialize the dataset to a TriX string
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Datasets name.
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Dataset name. Return true on success, false otherwise.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setGraphName -
    -
    - -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphMem::setGraphName() in NamedGraphMem.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphDb::setGraphName() in NamedGraphDb.php
    -
    Sets the graph name.
    -
    -
    - sparqlQuery -
    -
    -
    Dataset::sparqlQuery() in Dataset.php
    -
    Performs a SPARQL query against an RDF Dataset.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - TriXParser.php -
    -
    -
    TriXParser.php in TriXParser.php
    -
    -
    - TriXSerializer.php -
    -
    -
    TriXSerializer.php in TriXSerializer.php
    -
    -
    - toString -
    -
    -
    Quad::toString() in Quad.php
    -
    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.
    -
    -
    - TriXParser -
    -
    -
    TriXParser::TriXParser() in TriXParser.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXParser -
    -
    -
    TriXParser in TriXParser.php
    -
    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer::TriXSerializer() in TriXSerializer.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer in TriXSerializer.php
    -
    Temporary implementation of a TriX-Serializer
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsMem::valid() in IteratorFindQuadsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsDb::valid() in IteratorFindQuadsDb.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsMem::valid() in IteratorAllGraphsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsDb::valid() in IteratorAllGraphsDb.php
    -
    Says if there are additional items left in the list
    -
    -
    - -
    - a - c - d - e - f - g - h - i - k - l - n - p - q - r - s - t - v -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_default.html.svn-base deleted file mode 100755 index b614fc28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_default.html.svn-base +++ /dev/null @@ -1,2285 +0,0 @@ - - - - - - - - - - - - -

    [default] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - r - s - t - u - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - $_CONTENT_CONSTRUCTS -
    -
    - -
    -
    - $_fp_timeout -
    -
    -
    Snoopy::$_fp_timeout in Snoopy.class.inc
    -
    -
    - $_framedepth -
    -
    -
    Snoopy::$_framedepth in Snoopy.class.inc
    -
    -
    - $_frameurls -
    -
    -
    Snoopy::$_frameurls in Snoopy.class.inc
    -
    -
    - $_httpmethod -
    -
    -
    Snoopy::$_httpmethod in Snoopy.class.inc
    -
    -
    - $_httpversion -
    -
    -
    Snoopy::$_httpversion in Snoopy.class.inc
    -
    -
    - $_isproxy -
    -
    -
    Snoopy::$_isproxy in Snoopy.class.inc
    -
    -
    - $_KNOWN_ENCODINGS -
    -
    - -
    -
    - $_maxlinelen -
    -
    -
    Snoopy::$_maxlinelen in Snoopy.class.inc
    -
    ** Private variables ***
    -
    -
    - $_mime_boundary -
    -
    -
    Snoopy::$_mime_boundary in Snoopy.class.inc
    -
    -
    - $_redirectaddr -
    -
    -
    Snoopy::$_redirectaddr in Snoopy.class.inc
    -
    -
    - $_redirectdepth -
    -
    -
    Snoopy::$_redirectdepth in Snoopy.class.inc
    -
    -
    - $_source_encoding -
    -
    - -
    -
    - $_submit_method -
    -
    -
    Snoopy::$_submit_method in Snoopy.class.inc
    -
    -
    - $_submit_type -
    -
    -
    Snoopy::$_submit_type in Snoopy.class.inc
    -
    -
    - _check_timeout -
    -
    -
    Snoopy::_check_timeout() in Snoopy.class.inc
    -
    -
    - _connect -
    -
    -
    Snoopy::_connect() in Snoopy.class.inc
    -
    -
    - _disconnect -
    -
    -
    Snoopy::_disconnect() in Snoopy.class.inc
    -
    -
    - _expandlinks -
    -
    -
    Snoopy::_expandlinks() in Snoopy.class.inc
    -
    -
    - _fetch_remote_file -
    -
    -
    _fetch_remote_file() in rss_fetch.inc
    -
    -
    - _httprequest -
    -
    -
    Snoopy::_httprequest() in Snoopy.class.inc
    -
    -
    - _httpsrequest -
    -
    -
    Snoopy::_httpsrequest() in Snoopy.class.inc
    -
    -
    - _prepare_post_body -
    -
    -
    Snoopy::_prepare_post_body() in Snoopy.class.inc
    -
    -
    - _response_to_rss -
    -
    -
    _response_to_rss() in rss_fetch.inc
    -
    -
    - _stripform -
    -
    -
    Snoopy::_stripform() in Snoopy.class.inc
    -
    -
    - _striplinks -
    -
    -
    Snoopy::_striplinks() in Snoopy.class.inc
    -
    -
    - _striptext -
    -
    -
    Snoopy::_striptext() in Snoopy.class.inc
    -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $accept -
    -
    -
    Snoopy::$accept in Snoopy.class.inc
    -
    -
    - $agent -
    -
    -
    Snoopy::$agent in Snoopy.class.inc
    -
    -
    - ADODB_DB_DRIVER -
    -
    -
    ADODB_DB_DRIVER in constants.php
    -
    -
    - ADODB_DB_HOST -
    -
    -
    ADODB_DB_HOST in constants.php
    -
    -
    - ADODB_DB_NAME -
    -
    -
    ADODB_DB_NAME in constants.php
    -
    -
    - ADODB_DB_PASSWORD -
    -
    -
    ADODB_DB_PASSWORD in constants.php
    -
    -
    - ADODB_DB_USER -
    -
    -
    ADODB_DB_USER in constants.php
    -
    -
    - ADODB_DEBUG_MODE -
    -
    -
    ADODB_DEBUG_MODE in constants.php
    -
    -
    - append -
    -
    -
    MagpieRSS::append() in rss_parse.inc
    -
    -
    - append_content -
    -
    - -
    -
    - array_change_key_case -
    -
    -
    array_change_key_case() in rss_parse.inc
    -
    -
    - ATOM -
    -
    -
    ATOM in rss_parse.inc
    -
    -
    - ATOM_NS -
    -
    -
    ATOM_NS in constants.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $BASE_CACHE -
    -
    -
    RSSCache::$BASE_CACHE in rss_cache.inc
    -
    -
    - BNODE_PREFIX -
    -
    -
    BNODE_PREFIX in constants.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $channel -
    -
    -
    MagpieRSS::$channel in rss_parse.inc
    -
    -
    - $cookies -
    -
    -
    Snoopy::$cookies in Snoopy.class.inc
    -
    -
    - $curl_path -
    -
    -
    Snoopy::$curl_path in Snoopy.class.inc
    -
    -
    - $current_item -
    -
    -
    MagpieRSS::$current_item in rss_parse.inc
    -
    -
    - $current_namespace -
    -
    - -
    -
    - cache_age -
    -
    -
    RSSCache::cache_age() in rss_cache.inc
    -
    -
    - CASE_LOWER -
    -
    -
    CASE_LOWER in rss_parse.inc
    -
    -
    - CASE_UPPER -
    -
    -
    CASE_UPPER in rss_parse.inc
    -
    -
    - check_cache -
    -
    -
    RSSCache::check_cache() in rss_cache.inc
    -
    -
    - concat -
    -
    -
    MagpieRSS::concat() in rss_parse.inc
    -
    -
    - constants.php -
    -
    -
    constants.php in constants.php
    -
    -
    - CREATE_MODEL_WITHOUT_DUPLICATES -
    -
    - -
    -
    - create_parser -
    -
    - -
    return XML parser, and possibly re-encoded source
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DatasetDb.php -
    -
    -
    DatasetDb.php in DatasetDb.php
    -
    -
    - DatasetP.php -
    -
    -
    DatasetP.php in DatasetP.php
    -
    -
    - DATATYPE_SHORTCUT_PREFIX -
    -
    -
    DATATYPE_SHORTCUT_PREFIX in constants.php
    -
    -
    - DBMODEL -
    -
    -
    DBMODEL in constants.php
    -
    -
    - DCMITYPE_NS -
    -
    -
    DCMITYPE_NS in constants.php
    -
    -
    - DCTERM_NS -
    -
    -
    DCTERM_NS in constants.php
    -
    -
    - DC_NS -
    -
    -
    DC_NS in constants.php
    -
    -
    - debug -
    -
    -
    debug() in rss_fetch.inc
    -
    -
    - debug -
    -
    -
    RSSCache::debug() in rss_cache.inc
    -
    -
    - DEFAULT_ALGORITHM -
    -
    -
    DEFAULT_ALGORITHM in constants.php
    -
    -
    - DEFAULT_ENCODING -
    -
    -
    DEFAULT_ENCODING in constants.php
    -
    -
    - DIR_SEP -
    -
    -
    DIR_SEP in rss_fetch.inc
    -
    -
    - DBase.php -
    -
    -
    DBase.php in DBase.php
    -
    -
    - DC.php -
    -
    -
    DC.php in DC.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $encoding -
    -
    -
    MagpieRSS::$encoding in rss_parse.inc
    -
    -
    - $error -
    -
    -
    Snoopy::$error in Snoopy.class.inc
    -
    -
    - $ERROR -
    -
    -
    RSSCache::$ERROR in rss_cache.inc
    -
    -
    - $ERROR -
    -
    -
    MagpieRSS::$ERROR in rss_parse.inc
    -
    -
    - $expandlinks -
    -
    -
    Snoopy::$expandlinks in Snoopy.class.inc
    -
    -
    - error -
    -
    -
    error() in rss_fetch.inc
    -
    -
    - error -
    -
    -
    MagpieRSS::error() in rss_parse.inc
    -
    -
    - error -
    -
    -
    RSSCache::error() in rss_cache.inc
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $feed_type -
    -
    -
    MagpieRSS::$feed_type in rss_parse.inc
    -
    -
    - $feed_version -
    -
    -
    MagpieRSS::$feed_version in rss_parse.inc
    -
    -
    - feed_cdata -
    -
    -
    MagpieRSS::feed_cdata() in rss_parse.inc
    -
    -
    - feed_end_element -
    -
    - -
    -
    - feed_start_element -
    -
    - -
    -
    - fetch -
    -
    -
    Snoopy::fetch() in Snoopy.class.inc
    -
    -
    - fetch_rss -
    -
    -
    fetch_rss() in rss_fetch.inc
    -
    -
    - file_name -
    -
    -
    RSSCache::file_name() in rss_cache.inc
    -
    -
    - FIX_BLANKNODES -
    -
    -
    FIX_BLANKNODES in constants.php
    -
    -
    - FOAF_NS -
    -
    -
    FOAF_NS in constants.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - GENERAL_PREFIX_BASE -
    -
    -
    GENERAL_PREFIX_BASE in constants.php
    -
    -
    - get -
    -
    -
    RSSCache::get() in rss_cache.inc
    -
    -
    - GRAPHVIZ_FORMAT -
    -
    -
    GRAPHVIZ_FORMAT in constants.php
    -
    -
    - GRAPHVIZ_PATH -
    -
    -
    GRAPHVIZ_PATH in constants.php
    -
    -
    - GRAPHVIZ_STAT -
    -
    -
    GRAPHVIZ_STAT in constants.php
    -
    -
    - GRAPHVIZ_TEMP -
    -
    -
    GRAPHVIZ_TEMP in constants.php
    -
    -
    - GRAPHVIZ_URI -
    -
    -
    GRAPHVIZ_URI in constants.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - $headers -
    -
    -
    Snoopy::$headers in Snoopy.class.inc
    -
    -
    - $host -
    -
    -
    Snoopy::$host in Snoopy.class.inc
    -
    ** Public variables ***
    -
    -
    - HIDE_ADVERTISE -
    -
    -
    HIDE_ADVERTISE in constants.php
    -
    -
    - HTML_TABLE_BNODE_COLOR -
    -
    -
    HTML_TABLE_BNODE_COLOR in constants.php
    -
    -
    - HTML_TABLE_HEADER_COLOR -
    -
    -
    HTML_TABLE_HEADER_COLOR in constants.php
    -
    -
    - HTML_TABLE_LITERAL_COLOR -
    -
    -
    HTML_TABLE_LITERAL_COLOR in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR0 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR0 in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR1 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR1 in constants.php
    -
    -
    - HTML_TABLE_RDF_NS_COLOR -
    -
    -
    HTML_TABLE_RDF_NS_COLOR in constants.php
    -
    -
    - HTML_TABLE_RESOURCE_COLOR -
    -
    -
    HTML_TABLE_RESOURCE_COLOR in constants.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $image -
    -
    -
    MagpieRSS::$image in rss_parse.inc
    -
    -
    - $inchannel -
    -
    -
    MagpieRSS::$inchannel in rss_parse.inc
    -
    -
    - $incontent -
    -
    -
    MagpieRSS::$incontent in rss_parse.inc
    -
    -
    - $inimage -
    -
    -
    MagpieRSS::$inimage in rss_parse.inc
    -
    -
    - $initem -
    -
    -
    MagpieRSS::$initem in rss_parse.inc
    -
    -
    - $intextinput -
    -
    -
    MagpieRSS::$intextinput in rss_parse.inc
    -
    -
    - $items -
    -
    -
    MagpieRSS::$items in rss_parse.inc
    -
    -
    - INDENTATION -
    -
    -
    INDENTATION in constants.php
    -
    -
    - INDEX_TYPE -
    -
    -
    INDEX_TYPE in constants.php
    -
    -
    - IND_DEF -
    -
    -
    IND_DEF in constants.php
    -
    -
    - IND_SO -
    -
    -
    IND_SO in constants.php
    -
    -
    - IND_SP -
    -
    -
    IND_SP in constants.php
    -
    -
    - IND_SPO -
    -
    -
    IND_SPO in constants.php
    -
    -
    - InfModelP.php -
    -
    -
    InfModelP.php in InfModelP.php
    -
    -
    - INFMODELB -
    -
    -
    INFMODELB in constants.php
    -
    -
    - INFMODELF -
    -
    -
    INFMODELF in constants.php
    -
    -
    - INF_RES_DOMAIN -
    -
    -
    INF_RES_DOMAIN in constants.php
    -
    -
    - INF_RES_OWL_INVERSEOF -
    -
    -
    INF_RES_OWL_INVERSEOF in constants.php
    -
    -
    - INF_RES_OWL_SAMEAS -
    -
    -
    INF_RES_OWL_SAMEAS in constants.php
    -
    -
    - INF_RES_RANGE -
    -
    -
    INF_RES_RANGE in constants.php
    -
    -
    - INF_RES_RULE_RDFS6 -
    -
    -
    INF_RES_RULE_RDFS6 in constants.php
    -
    -
    - INF_RES_RULE_RDFS8 -
    -
    -
    INF_RES_RULE_RDFS8 in constants.php
    -
    -
    - INF_RES_RULE_RDFS10 -
    -
    -
    INF_RES_RULE_RDFS10 in constants.php
    -
    -
    - INF_RES_RULE_RDFS12 -
    -
    -
    INF_RES_RULE_RDFS12 in constants.php
    -
    -
    - INF_RES_RULE_RDFS13 -
    -
    -
    INF_RES_RULE_RDFS13 in constants.php
    -
    -
    - INF_RES_SUBCLASSOF -
    -
    -
    INF_RES_SUBCLASSOF in constants.php
    -
    -
    - INF_RES_SUBPROPERTYOF -
    -
    -
    INF_RES_SUBPROPERTYOF in constants.php
    -
    -
    - init -
    -
    -
    init() in rss_fetch.inc
    -
    -
    - IN_DESCRIPTION -
    -
    -
    IN_DESCRIPTION in constants.php
    -
    -
    - IN_PROPERTY_EMPTY_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_LITERAL -
    -
    -
    IN_PROPERTY_LITERAL in constants.php
    -
    -
    - IN_PROPERTY_PARSE_TYPE_COLLECTION -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_LITERAL -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_RESOURCE -
    -
    -
    IN_PROPERTY_RESOURCE in constants.php
    -
    -
    - IN_PROPERTY_UNKNOWN_OBJECT -
    -
    - -
    -
    - IN_RDF -
    -
    -
    IN_RDF in constants.php
    -
    -
    - IN_TOP_LEVEL -
    -
    -
    IN_TOP_LEVEL in constants.php
    -
    -
    - IN_UNKNOWN -
    -
    -
    IN_UNKNOWN in constants.php
    -
    -
    - IN_XML -
    -
    -
    IN_XML in constants.php
    -
    -
    - is_atom -
    -
    -
    MagpieRSS::is_atom() in rss_parse.inc
    -
    -
    - is_client_error -
    -
    -
    is_client_error() in rss_fetch.inc
    -
    -
    - is_error -
    -
    -
    is_error() in rss_fetch.inc
    -
    -
    - is_info -
    -
    -
    is_info() in rss_fetch.inc
    -
    -
    - is_redirect -
    -
    -
    is_redirect() in rss_fetch.inc
    -
    -
    - is_rss -
    -
    -
    MagpieRSS::is_rss() in rss_parse.inc
    -
    -
    - is_server_error -
    -
    -
    is_server_error() in rss_fetch.inc
    -
    -
    - is_success -
    -
    -
    is_success() in rss_fetch.inc
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - known_encoding -
    -
    - -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lastredirectaddr -
    -
    -
    Snoopy::$lastredirectaddr in Snoopy.class.inc
    -
    -
    - LINEFEED -
    -
    -
    LINEFEED in constants.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $maxframes -
    -
    -
    Snoopy::$maxframes in Snoopy.class.inc
    -
    -
    - $maxlength -
    -
    -
    Snoopy::$maxlength in Snoopy.class.inc
    -
    -
    - $maxredirs -
    -
    -
    Snoopy::$maxredirs in Snoopy.class.inc
    -
    -
    - $MAX_AGE -
    -
    -
    RSSCache::$MAX_AGE in rss_cache.inc
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS in rss_parse.inc
    -
    Hybrid parser, and object, takes RSS as a string and returns a simple object.
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS::MagpieRSS() in rss_parse.inc
    -
    Set up XML parser, parse source, and return populated RSS object..
    -
    -
    - MAGPIE_CACHE_AGE -
    -
    -
    MAGPIE_CACHE_AGE in magpie_debug.php
    -
    -
    - MAGPIE_DEBUG -
    -
    -
    MAGPIE_DEBUG in magpie_debug.php
    -
    -
    - MAGPIE_DIR -
    -
    -
    MAGPIE_DIR in magpie_slashbox.php
    -
    -
    - magpie_error -
    -
    -
    magpie_error() in rss_fetch.inc
    -
    -
    - MAGPIE_EXTLIB -
    -
    -
    MAGPIE_EXTLIB in rss_fetch.inc
    -
    -
    - MAGPIE_OUTPUT_ENCODING -
    -
    -
    MAGPIE_OUTPUT_ENCODING in magpie_debug.php
    -
    -
    - MAGPIE_VERSION -
    -
    -
    MAGPIE_VERSION in rss_fetch.inc
    -
    -
    - map_attrs -
    -
    -
    map_attrs() in rss_parse.inc
    -
    -
    - MAX_ALLOWED_ABBREVIATED_LENGTH -
    -
    - -
    -
    - MEMMODEL -
    -
    -
    MEMMODEL in constants.php
    -
    -
    - ModelP.php -
    -
    -
    ModelP.php in ModelP.php
    -
    -
    - magpie_debug.php -
    -
    -
    magpie_debug.php in magpie_debug.php
    -
    -
    - magpie_simple.php -
    -
    -
    magpie_simple.php in magpie_simple.php
    -
    -
    - magpie_slashbox.php -
    -
    -
    magpie_slashbox.php in magpie_slashbox.php
    -
    -
    - modifier.rss_date_parse.php -
    -
    -
    modifier.rss_date_parse.php in modifier.rss_date_parse.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N3SER_BNODE_SHORT -
    -
    -
    N3SER_BNODE_SHORT in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_CHAR -
    -
    -
    NAMESPACE_SEPARATOR_CHAR in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_STRING -
    -
    - -
    -
    - normalize -
    -
    -
    MagpieRSS::normalize() in rss_parse.inc
    -
    -
    - NO_INDEX -
    -
    -
    NO_INDEX in constants.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $offsiteok -
    -
    -
    Snoopy::$offsiteok in Snoopy.class.inc
    -
    -
    - ONTMODEL -
    -
    -
    ONTMODEL in constants.php
    -
    -
    - OWL_INVERSE_OF -
    -
    -
    OWL_INVERSE_OF in constants.php
    -
    -
    - OWL_NS -
    -
    -
    OWL_NS in constants.php
    -
    -
    - OWL_PREFIX -
    -
    -
    OWL_PREFIX in constants.php
    -
    -
    - OWL_SAME_AS -
    -
    -
    OWL_SAME_AS in constants.php
    -
    -
    - OWL_URI -
    -
    -
    OWL_URI in constants.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parser -
    -
    -
    MagpieRSS::$parser in rss_parse.inc
    -
    -
    - $pass -
    -
    -
    Snoopy::$pass in Snoopy.class.inc
    -
    -
    - $passcookies -
    -
    -
    Snoopy::$passcookies in Snoopy.class.inc
    -
    -
    - $port -
    -
    -
    Snoopy::$port in Snoopy.class.inc
    -
    -
    - $proxy_host -
    -
    -
    Snoopy::$proxy_host in Snoopy.class.inc
    -
    -
    - $proxy_port -
    -
    -
    Snoopy::$proxy_port in Snoopy.class.inc
    -
    -
    - PACKAGE_DATASET -
    -
    -
    PACKAGE_DATASET in constants.php
    -
    -
    - PACKAGE_DBASE -
    -
    -
    PACKAGE_DBASE in constants.php
    -
    -
    - PACKAGE_INFMODEL -
    -
    -
    PACKAGE_INFMODEL in constants.php
    -
    -
    - PACKAGE_MODEL -
    -
    -
    PACKAGE_MODEL in constants.php
    -
    -
    - PACKAGE_ONTMODEL -
    -
    -
    PACKAGE_ONTMODEL in constants.php
    -
    -
    - PACKAGE_RDQL -
    -
    -
    PACKAGE_RDQL in constants.php
    -
    -
    - PACKAGE_RESMODEL -
    -
    -
    PACKAGE_RESMODEL in constants.php
    -
    -
    - PACKAGE_SPARQL -
    -
    -
    PACKAGE_SPARQL in constants.php
    -
    -
    - PACKAGE_SYNTAX_GRDDL -
    -
    -
    PACKAGE_SYNTAX_GRDDL in constants.php
    -
    -
    - PACKAGE_SYNTAX_N3 -
    -
    -
    PACKAGE_SYNTAX_N3 in constants.php
    -
    -
    - PACKAGE_SYNTAX_RDF -
    -
    -
    PACKAGE_SYNTAX_RDF in constants.php
    -
    -
    - PACKAGE_SYNTAX_RSS -
    -
    -
    PACKAGE_SYNTAX_RSS in constants.php
    -
    -
    - PACKAGE_SYNTAX_SPARQLRES -
    -
    -
    PACKAGE_SYNTAX_SPARQLRES in constants.php
    -
    -
    - PACKAGE_UTILITY -
    -
    -
    PACKAGE_UTILITY in constants.php
    -
    -
    - PACKAGE_VOCABULARY -
    -
    -
    PACKAGE_VOCABULARY in constants.php
    -
    -
    - parse_w3cdtf -
    -
    -
    parse_w3cdtf() in rss_utils.inc
    -
    -
    - php4_create_parser -
    -
    - -
    Instaniate an XML parser under PHP4
    -
    -
    - php5_create_parser -
    -
    - -
    Instantiate an XML parser under PHP5
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $rawheaders -
    -
    -
    Snoopy::$rawheaders in Snoopy.class.inc
    -
    -
    - $read_timeout -
    -
    -
    Snoopy::$read_timeout in Snoopy.class.inc
    -
    -
    - $referer -
    -
    -
    Snoopy::$referer in Snoopy.class.inc
    -
    -
    - $response_code -
    -
    -
    Snoopy::$response_code in Snoopy.class.inc
    -
    -
    - $results -
    -
    -
    Snoopy::$results in Snoopy.class.inc
    -
    -
    - RdfAPI.php -
    -
    -
    RdfAPI.php in RdfAPI.php
    -
    -
    - RDFAPI_ERROR -
    -
    -
    RDFAPI_ERROR in constants.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_CLASS in constants.php
    -
    -
    - RDFS_COMMENT -
    -
    -
    RDFS_COMMENT in constants.php
    -
    -
    - RDFS_DATATYPE -
    -
    -
    RDFS_DATATYPE in constants.php
    -
    -
    - RDFS_DOMAIN -
    -
    -
    RDFS_DOMAIN in constants.php
    -
    -
    - RDFS_IS_DEFINED_BY -
    -
    -
    RDFS_IS_DEFINED_BY in constants.php
    -
    -
    - RDFS_LABEL -
    -
    -
    RDFS_LABEL in constants.php
    -
    -
    - RDFS_LITERAL -
    -
    -
    RDFS_LITERAL in constants.php
    -
    -
    - RDFS_RANGE -
    -
    -
    RDFS_RANGE in constants.php
    -
    -
    - RDFS_RESOURCE -
    -
    -
    RDFS_RESOURCE in constants.php
    -
    -
    - RDFS_SEE_ALSO -
    -
    -
    RDFS_SEE_ALSO in constants.php
    -
    -
    - RDFS_SUBCLASSOF -
    -
    -
    RDFS_SUBCLASSOF in constants.php
    -
    -
    - RDFS_SUBPROPERTYOF -
    -
    -
    RDFS_SUBPROPERTYOF in constants.php
    -
    -
    - RDFS_VOCABULARY -
    -
    -
    RDFS_VOCABULARY in constants.php
    -
    -
    - RDF_ABOUT -
    -
    -
    RDF_ABOUT in constants.php
    -
    -
    - RDF_ABOUT_EACH -
    -
    -
    RDF_ABOUT_EACH in constants.php
    -
    -
    - RDF_ABOUT_EACH_PREFIX -
    -
    -
    RDF_ABOUT_EACH_PREFIX in constants.php
    -
    -
    - RDF_ALT -
    -
    -
    RDF_ALT in constants.php
    -
    -
    - RDF_BAG -
    -
    -
    RDF_BAG in constants.php
    -
    -
    - RDF_BAG_ID -
    -
    -
    RDF_BAG_ID in constants.php
    -
    -
    - RDF_DATATYPE -
    -
    -
    RDF_DATATYPE in constants.php
    -
    -
    - RDF_DATATYPE_SCHEMA_URI -
    -
    -
    RDF_DATATYPE_SCHEMA_URI in constants.php
    -
    -
    - RDF_DESCRIPTION -
    -
    -
    RDF_DESCRIPTION in constants.php
    -
    -
    - RDF_FIRST -
    -
    -
    RDF_FIRST in constants.php
    -
    -
    - RDF_ID -
    -
    -
    RDF_ID in constants.php
    -
    -
    - RDF_LI -
    -
    -
    RDF_LI in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_LIST in constants.php
    -
    -
    - RDF_NAMESPACE_PREFIX -
    -
    -
    RDF_NAMESPACE_PREFIX in constants.php
    -
    -
    - RDF_NAMESPACE_URI -
    -
    -
    RDF_NAMESPACE_URI in constants.php
    -
    -
    - RDF_NIL -
    -
    -
    RDF_NIL in constants.php
    -
    -
    - RDF_NODEID -
    -
    -
    RDF_NODEID in constants.php
    -
    -
    - RDF_OBJECT -
    -
    -
    RDF_OBJECT in constants.php
    -
    -
    - RDF_OBJECT_TYPE_BNODE -
    -
    -
    RDF_OBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_LITERAL -
    -
    -
    RDF_OBJECT_TYPE_LITERAL in constants.php
    -
    -
    - RDF_OBJECT_TYPE_RESOURCE -
    -
    -
    RDF_OBJECT_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_XML -
    -
    -
    RDF_OBJECT_TYPE_XML in constants.php
    -
    -
    - RDF_PARSE_TYPE -
    -
    -
    RDF_PARSE_TYPE in constants.php
    -
    -
    - RDF_PARSE_TYPE_COLLECTION -
    -
    -
    RDF_PARSE_TYPE_COLLECTION in constants.php
    -
    -
    - RDF_PARSE_TYPE_LITERAL -
    -
    -
    RDF_PARSE_TYPE_LITERAL in constants.php
    -
    -
    - RDF_PARSE_TYPE_RESOURCE -
    -
    -
    RDF_PARSE_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_PREDICATE -
    -
    -
    RDF_PREDICATE in constants.php
    -
    -
    - RDF_PROPERTY -
    -
    -
    RDF_PROPERTY in constants.php
    -
    -
    - RDF_RDF -
    -
    -
    RDF_RDF in constants.php
    -
    -
    - RDF_RESOURCE -
    -
    -
    RDF_RESOURCE in constants.php
    -
    -
    - RDF_REST -
    -
    -
    RDF_REST in constants.php
    -
    -
    - RDF_SCHEMA_PREFIX -
    -
    -
    RDF_SCHEMA_PREFIX in constants.php
    -
    -
    - RDF_SCHEMA_URI -
    -
    -
    RDF_SCHEMA_URI in constants.php
    -
    -
    - RDF_SEEALSO -
    -
    -
    RDF_SEEALSO in constants.php
    -
    -
    - RDF_SEQ -
    -
    -
    RDF_SEQ in constants.php
    -
    -
    - RDF_STATEMENT -
    -
    -
    RDF_STATEMENT in constants.php
    -
    -
    - RDF_SUBJECT -
    -
    -
    RDF_SUBJECT in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_ANONYMOUS -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_BNODE -
    -
    -
    RDF_SUBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_DISTRIBUTED -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_PREFIX -
    -
    -
    RDF_SUBJECT_TYPE_PREFIX in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_URI -
    -
    -
    RDF_SUBJECT_TYPE_URI in constants.php
    -
    -
    - RDF_TYPE -
    -
    -
    RDF_TYPE in constants.php
    -
    -
    - RDF_VALUE -
    -
    -
    RDF_VALUE in constants.php
    -
    -
    - RDF_XMLLITERAL -
    -
    -
    RDF_XMLLITERAL in constants.php
    -
    -
    - RDQL.php -
    -
    -
    RDQL.php in RDQL.php
    -
    -
    - RDQL_AND_ERR -
    -
    -
    RDQL_AND_ERR in constants.php
    -
    -
    - RDQL_ERR -
    -
    -
    RDQL_ERR in constants.php
    -
    -
    - RDQL_SEL_ERR -
    -
    -
    RDQL_SEL_ERR in constants.php
    -
    -
    - RDQL_SRC_ERR -
    -
    -
    RDQL_SRC_ERR in constants.php
    -
    -
    - RDQL_SYN_ERR -
    -
    -
    RDQL_SYN_ERR in constants.php
    -
    -
    - RDQL_USG_ERR -
    -
    -
    RDQL_USG_ERR in constants.php
    -
    -
    - RDQL_WHR_ERR -
    -
    -
    RDQL_WHR_ERR in constants.php
    -
    -
    - RESMODEL -
    -
    -
    RESMODEL in constants.php
    -
    -
    - ResModelP.php -
    -
    -
    ResModelP.php in ResModelP.php
    -
    -
    - RSS -
    -
    -
    RSS in rss_parse.inc
    -
    Project: MagpieRSS: a simple RSS integration tool File: rss_parse.inc - parse an RSS or Atom feed return as a simple object.
    -
    -
    - RSSCache -
    -
    -
    RSSCache::RSSCache() in rss_cache.inc
    -
    -
    - RSSCache -
    -
    -
    RSSCache in rss_cache.inc
    -
    -
    - RSS_NS -
    -
    -
    RSS_NS in constants.php
    -
    -
    - rss_cache.inc -
    -
    -
    rss_cache.inc in rss_cache.inc
    -
    -
    - rss_fetch.inc -
    -
    -
    rss_fetch.inc in rss_fetch.inc
    -
    -
    - rss_parse.inc -
    -
    -
    rss_parse.inc in rss_parse.inc
    -
    -
    - rss_utils.inc -
    -
    -
    rss_utils.inc in rss_utils.inc
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $stack -
    -
    -
    MagpieRSS::$stack in rss_parse.inc
    -
    -
    - $status -
    -
    -
    Snoopy::$status in Snoopy.class.inc
    -
    -
    - serialize -
    -
    -
    RSSCache::serialize() in rss_cache.inc
    -
    -
    - SER_RDF_QNAMES -
    -
    -
    SER_RDF_QNAMES in constants.php
    -
    -
    - SER_SORT_MODEL -
    -
    -
    SER_SORT_MODEL in constants.php
    -
    -
    - SER_USE_ATTRIBUTES -
    -
    -
    SER_USE_ATTRIBUTES in constants.php
    -
    -
    - SER_USE_ENTITIES -
    -
    -
    SER_USE_ENTITIES in constants.php
    -
    -
    - SER_XML_DECLARATION -
    -
    -
    SER_XML_DECLARATION in constants.php
    -
    -
    - set -
    -
    -
    RSSCache::set() in rss_cache.inc
    -
    -
    - setcookies -
    -
    -
    Snoopy::setcookies() in Snoopy.class.inc
    -
    -
    - slashbox -
    -
    -
    slashbox() in magpie_slashbox.php
    -
    -
    - SMARTY_DIR -
    -
    -
    SMARTY_DIR in simple_smarty.php
    -
    -
    - smarty_modifier_rss_date_parse -
    -
    -
    smarty_modifier_rss_date_parse() in modifier.rss_date_parse.php
    -
    -
    - Snoopy -
    -
    -
    Snoopy in Snoopy.class.inc
    -
    ***********************************************
    -
    -
    - SPARQL.php -
    -
    -
    SPARQL.php in SPARQL.php
    -
    -
    - SyntaxGRDDL.php -
    -
    -
    SyntaxGRDDL.php in SyntaxGRDDL.php
    -
    -
    - SyntaxN3.php -
    -
    -
    SyntaxN3.php in SyntaxN3.php
    -
    -
    - SyntaxRDF.php -
    -
    -
    SyntaxRDF.php in SyntaxRDF.php
    -
    -
    - SyntaxRSS.php -
    -
    -
    SyntaxRSS.php in SyntaxRSS.php
    -
    -
    - SyntaxSparqlRes.php -
    -
    -
    SyntaxSparqlRes.php in SyntaxSparqlRes.php
    -
    -
    - Snoopy.class.inc -
    -
    -
    Snoopy.class.inc in Snoopy.class.inc
    -
    -
    - simple_smarty.php -
    -
    -
    simple_smarty.php in simple_smarty.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $textinput -
    -
    -
    MagpieRSS::$textinput in rss_parse.inc
    -
    -
    - $timed_out -
    -
    -
    Snoopy::$timed_out in Snoopy.class.inc
    -
    -
    - test_library_support -
    -
    -
    test_library_support() in magpie_debug.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $user -
    -
    -
    Snoopy::$user in Snoopy.class.inc
    -
    -
    - $use_gzip -
    -
    -
    Snoopy::$use_gzip in Snoopy.class.inc
    -
    -
    - UNIC_RDF -
    -
    -
    UNIC_RDF in constants.php
    -
    -
    - unserialize -
    -
    -
    RSSCache::unserialize() in rss_cache.inc
    -
    -
    - USE_ANY_QUOTE -
    -
    -
    USE_ANY_QUOTE in constants.php
    -
    -
    - USE_CDATA -
    -
    -
    USE_CDATA in constants.php
    -
    -
    - Utility.php -
    -
    -
    Utility.php in Utility.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VALIDATE_IDS -
    -
    -
    VALIDATE_IDS in constants.php
    -
    -
    - VCARD_NS -
    -
    -
    VCARD_NS in constants.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - $WARNING -
    -
    -
    MagpieRSS::$WARNING in rss_parse.inc
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML_LANG -
    -
    -
    XML_LANG in constants.php
    -
    -
    - XML_NAMESPACE_DECLARATION_PREFIX -
    -
    - -
    -
    - XML_NAMESPACE_PREFIX -
    -
    -
    XML_NAMESPACE_PREFIX in constants.php
    -
    -
    - XML_NAMESPACE_URI -
    -
    -
    XML_NAMESPACE_URI in constants.php
    -
    -
    - XML_SCHEMA -
    -
    -
    XML_SCHEMA in constants.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - r - s - t - u - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_infModel.html.svn-base deleted file mode 100755 index 693337cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_infModel.html.svn-base +++ /dev/null @@ -1,510 +0,0 @@ - - - - - - - - - - - - -

    [infModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - e - f - g - i - l - r - s - t - w -
    - - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    InfModel::add() in InfModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    InfModelF::add() in InfModelF.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelB::add() in InfModelB.php
    -
    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    -
    -
    - addModel -
    -
    -
    InfModelF::addModel() in InfModelF.php
    -
    Adds another model to this MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - checkEntailment -
    -
    - -
    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.
    -
    -
    - checkTrigger -
    -
    - -
    Checks, if the statement satisfies the trigger.
    -
    -
    - contains -
    -
    -
    InfModelB::contains() in InfModelB.php
    -
    Tests if the Model contains the given triple.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - entail -
    -
    -
    InfRule::entail() in InfRule.php
    -
    Returns a infered InfStatement by evaluating the statement with the entailment rule.
    -
    -
    - entailStatement -
    -
    - -
    Entails a statement by recursively using the _entailStatementRec method.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    InfModelB::find() in InfModelB.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findRegex -
    -
    -
    InfModel::findRegex() in InfModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.
    -
    -
    - getEntailment -
    -
    - -
    -
    - getMemModel -
    -
    -
    InfModelB::getMemModel() in InfModelB.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.
    -
    -
    - getMemModel -
    -
    -
    InfModelF::getMemModel() in InfModelF.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.
    -
    -
    - getModifiedFind -
    -
    - -
    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.
    -
    -
    - getSchema -
    -
    -
    InfModel::getSchema() in InfModel.php
    -
    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the Model.
    -
    -
    - getTrigger -
    -
    -
    InfRule::getTrigger() in InfRule.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - InfModel -
    -
    -
    InfModel::InfModel() in InfModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModel -
    -
    -
    InfModel in InfModel.php
    -
    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.
    -
    -
    - InfModel.php -
    -
    -
    InfModel.php in InfModel.php
    -
    -
    - InfModelB.php -
    -
    -
    InfModelB.php in InfModelB.php
    -
    -
    - InfModelF.php -
    -
    -
    InfModelF.php in InfModelF.php
    -
    -
    - InfRule.php -
    -
    -
    InfRule.php in InfRule.php
    -
    -
    - InfStatement.php -
    -
    -
    InfStatement.php in InfStatement.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB in InfModelB.php
    -
    A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    -
    -
    - InfModelB -
    -
    -
    InfModelB::InfModelB() in InfModelB.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModelF -
    -
    -
    InfModelF in InfModelF.php
    -
    A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    -
    -
    - InfModelF -
    -
    -
    InfModelF::InfModelF() in InfModelF.php
    -
    Constructor You can supply a base_uri.
    -
    -
    - infRule -
    -
    -
    InfRule::infRule() in InfRule.php
    -
    Constructor
    -
    -
    - InfRule -
    -
    -
    InfRule in InfRule.php
    -
    This class represents a single rule in a RDFS inference model.
    -
    -
    - InfStatement -
    -
    -
    InfStatement in InfStatement.php
    -
    An RDF statement which was entailed by a inference rule.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - load -
    -
    -
    InfModelF::load() in InfModelF.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - remove -
    -
    -
    InfModelF::remove() in InfModelF.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    InfModelB::remove() in InfModelB.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeInfered -
    -
    - -
    Removes all infered statements from the model but keeps the infernece rules.
    -
    -
    - replace -
    -
    -
    InfModel::replace() in InfModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - saveAs -
    -
    -
    InfModelB::saveAs() in InfModelB.php
    -
    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.
    -
    -
    - setEntailment -
    -
    - -
    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setTrigger -
    -
    -
    InfRule::setTrigger() in InfRule.php
    -
    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - size -
    -
    -
    InfModelB::size() in InfModelB.php
    -
    Number of all inferable triples in the Model.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    InfModelB::toString() in InfModelB.php
    -
    Short Dump of the InfModelB.
    -
    -
    - toString -
    -
    -
    InfModelF::toString() in InfModelF.php
    -
    Short Dump of the InfModelF.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the InfModelB including ALL inferable triples.
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHtml -
    -
    -
    InfModelB::writeAsHtml() in InfModelB.php
    -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples.
    -
    -
    - -
    - a - c - e - f - g - i - l - r - s - t - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_model.html.svn-base deleted file mode 100755 index c82de8ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_model.html.svn-base +++ /dev/null @@ -1,1506 +0,0 @@ - - - - - - - - - - - - -

    [model] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - u - v - w - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _parseSparqlQuery -
    -
    - -
    Parses an query and returns the parsed form.
    -
    -
    - _prepareSparql -
    -
    - -
    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...
    -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    MemModel::add() in MemModel.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    DbModel::add() in DbModel.php
    -
    Add a new triple to this DbModel.
    -
    -
    - addModel -
    -
    -
    MemModel::addModel() in MemModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    DbModel::addModel() in DbModel.php
    -
    Add the given model to this DbModel.
    -
    -
    - addNamespace -
    -
    -
    MemModel::addNamespace() in MemModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    - -
    Adds a namespace and prefix to the model.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Alias for the method add().
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BlankNode -
    -
    -
    BlankNode::BlankNode() in Blanknode.php
    -
    Constructor You can supply a label or You supply a model and a unique ID is gernerated.
    -
    -
    - BlankNode -
    -
    -
    BlankNode in Blanknode.php
    -
    An RDF blank node.
    -
    -
    - Blanknode.php -
    -
    -
    Blanknode.php in Blanknode.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - close -
    -
    -
    MemModel::close() in MemModel.php
    -
    Close the MemModel and free up resources held.
    -
    -
    - close -
    -
    -
    DbModel::close() in DbModel.php
    -
    Close this DbModel
    -
    -
    - close -
    -
    -
    DbStore::close() in DbStore.php
    -
    Close the DbStore.
    -
    -
    - compare -
    -
    -
    Statement::compare() in Statement.php
    -
    Compares two statements and returns integer less than, equal to, or greater than zero.
    -
    -
    - contains -
    -
    -
    MemModel::contains() in MemModel.php
    -
    Tests if the MemModel contains the given triple.
    -
    -
    - contains -
    -
    -
    DbModel::contains() in DbModel.php
    -
    Check if the DbModel contains the given statement.
    -
    -
    - containsAll -
    -
    -
    MemModel::containsAll() in MemModel.php
    -
    Determine if all of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAll -
    -
    -
    DbModel::containsAll() in DbModel.php
    -
    Determine if all of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAny -
    -
    -
    MemModel::containsAny() in MemModel.php
    -
    Determine if any of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAny -
    -
    -
    DbModel::containsAny() in DbModel.php
    -
    Determine if any of the statements in the given model are also contained in this DbModel.
    -
    -
    - createTables -
    -
    - -
    Create tables and indexes for the given database type.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - datasetExists -
    -
    - -
    Check if the Dataset with the given $datasetName is already stored in the database
    -
    -
    - DbModel -
    -
    -
    DbModel::DbModel() in DbModel.php
    -
    Constructor Do not call this directly.
    -
    -
    - DbModel -
    -
    -
    DbModel in DbModel.php
    -
    This class provides methods for manipulating DbModels from DbStore.
    -
    -
    - DbStore -
    -
    -
    DbStore::DbStore() in DbStore.php
    -
    Constructor: Set the database connection with the given parameters.
    -
    -
    - DbStore -
    -
    -
    DbStore in DbStore.php
    -
    DbStore is a persistent store of RDF data using relational database technology.
    -
    -
    - delete -
    -
    -
    DbModel::delete() in DbModel.php
    -
    Remove this DbModel from database and clean up.
    -
    -
    - DbModel.php -
    -
    -
    DbModel.php in DbModel.php
    -
    -
    - DbStore.php -
    -
    -
    DbStore.php in DbStore.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    Resource::equals() in Resource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    Statement::equals() in Statement.php
    -
    Checks if two statements are equal.
    -
    -
    - equals -
    -
    -
    MemModel::equals() in MemModel.php
    -
    Checks if two models are equal.
    -
    -
    - equals -
    -
    -
    Literal::equals() in Literal.php
    -
    Checks if ihe literal equals another literal.
    -
    -
    - equals -
    -
    -
    DbModel::equals() in DbModel.php
    -
    Check if two models are equal.
    -
    -
    - equals -
    -
    -
    BlankNode::equals() in Blanknode.php
    -
    Checks if two blank nodes are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    DbModel::find() in DbModel.php
    -
    General method to search for triples in the DbModel.
    -
    -
    - find -
    -
    -
    MemModel::find() in MemModel.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findCount -
    -
    -
    DbModel::findCount() in DbModel.php
    -
    Search for triples and return the number of matches.
    -
    -
    - findCount -
    -
    -
    MemModel::findCount() in MemModel.php
    -
    Searches for triples and returns the number of matches.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Search for triples and return the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findForward -
    -
    - -
    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.
    -
    -
    - findRegex -
    -
    -
    DbModel::findRegex() in DbModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    MemModel::findRegex() in MemModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findVocabulary -
    -
    - -
    Return all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getBaseURI -
    -
    -
    Model::getBaseURI() in Model.php
    -
    Return current baseURI.
    -
    -
    - getDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.
    -
    -
    - getDatasetMem -
    -
    -
    ModelFactory::getDatasetMem() in ModelFactory.php
    -
    Returns a NamedGraphSetMem.
    -
    -
    - getDatatype -
    -
    -
    Literal::getDatatype() in Literal.php
    -
    Returns the datatype of the literal.
    -
    -
    - getDbConn -
    -
    -
    DbModel::getDbConn() in DbModel.php
    -
    Returns the database connection object
    -
    -
    - getDbModel -
    -
    -
    ModelFactory::getDbModel() in ModelFactory.php
    -
    Returns a new DbModel using the database connection supplied by $dbStore.
    -
    -
    - getDbStore -
    -
    -
    ModelFactory::getDbStore() in ModelFactory.php
    -
    Returns a database connection with the given parameters.
    -
    -
    - getDefaultDbModel -
    -
    - -
    Returns a DbModel with the database connection defined in constants.php.
    -
    -
    - getDefaultModel -
    -
    - -
    Returns a MemModel.
    -
    -
    - getID -
    -
    -
    BlankNode::getID() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getIndexType -
    -
    -
    MemModel::getIndexType() in MemModel.php
    -
    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),
    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.
    -
    -
    - getInfModelB -
    -
    -
    ModelFactory::getInfModelB() in ModelFactory.php
    -
    Returns a InfModelB.
    -
    -
    - getInfModelF -
    -
    -
    ModelFactory::getInfModelF() in ModelFactory.php
    -
    Returns a InfModelF.
    -
    -
    - getLabel -
    -
    -
    BlankNode::getLabel() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getLabel -
    -
    -
    Literal::getLabel() in Literal.php
    -
    Returns the string value of the literal.
    -
    -
    - getLabel -
    -
    -
    Resource::getLabel() in Resource.php
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    -
    - getLabelObject -
    -
    - -
    Reurns the URI, text or bNode identifier of the statements's object.
    -
    -
    - getLabelPredicate -
    -
    - -
    Returns the URI of the statements's predicate.
    -
    -
    - getLabelSubject -
    -
    - -
    Returns the URI or bNode identifier of the statements's subject.
    -
    -
    - getLanguage -
    -
    -
    Literal::getLanguage() in Literal.php
    -
    Returns the language of the literal.
    -
    -
    - getLocalName -
    -
    -
    Resource::getLocalName() in Resource.php
    -
    Returns the local name of the resource.
    -
    -
    - getMemModel -
    -
    -
    ModelFactory::getMemModel() in ModelFactory.php
    -
    Returns a MemModel.
    -
    -
    - getMemModel -
    -
    -
    DbModel::getMemModel() in DbModel.php
    -
    Create a MemModel containing all the triples of the current DbModel.
    -
    -
    - getMemModelByRDQL -
    -
    - -
    Perform an RDQL query on this Model. Should work with all types of models.
    -
    -
    - getModel -
    -
    -
    DbStore::getModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getModelID -
    -
    -
    DbModel::getModelID() in DbModel.php
    -
    Returns the model id
    -
    -
    - getNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getNamespace -
    -
    -
    Resource::getNamespace() in Resource.php
    -
    Returns the namespace of the resource. May return null.
    -
    -
    - getNewDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.
    -
    -
    - getNewModel -
    -
    -
    DbStore::getNewModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.
    -
    -
    - getNewNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).
    -
    -
    - getObject -
    -
    -
    Statement::getObject() in Statement.php
    -
    Returns the object of the triple.
    -
    -
    - getOntModel -
    -
    - -
    Returns an OntModel with this model as baseModel.
    -
    -
    - getOntModel -
    -
    -
    ModelFactory::getOntModel() in ModelFactory.php
    -
    Returns an OntModel.
    -
    -
    - getOntModelForBaseModel -
    -
    - -
    Creates an OntModel that wraps an existing base model.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getPredicate -
    -
    -
    Statement::getPredicate() in Statement.php
    -
    Returns the predicate of the triple.
    -
    -
    - getResModel -
    -
    - -
    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).
    -
    -
    - getResModel -
    -
    -
    ModelFactory::getResModel() in ModelFactory.php
    -
    Returns a ResModel.
    -
    -
    - getResModelForBaseModel -
    -
    - -
    Creates a ResModel that wraps an existing base model.
    -
    -
    - getSparqlClient -
    -
    - -
    Creates a SparqlClient.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the MemModel.
    -
    -
    - getSubject -
    -
    -
    Statement::getSubject() in Statement.php
    -
    Returns the subject of the triple.
    -
    -
    - getURI -
    -
    -
    Resource::getURI() in Resource.php
    -
    Returns the URI of the resource.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hashCode -
    -
    -
    Statement::hashCode() in Statement.php
    -
    Retruns the hash code of the triple.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - index -
    -
    -
    MemModel::index() in MemModel.php
    -
    Builds a search index for the statements in the MemModel.
    -
    -
    - intersect -
    -
    -
    MemModel::intersect() in MemModel.php
    -
    Returns a new MemModel containing all the statements which are in both this MemModel and another.
    -
    -
    - intersect -
    -
    -
    DbModel::intersect() in DbModel.php
    -
    Return a new MemModel containing all the statements which are in both this model and the given model.
    -
    -
    - isEmpty -
    -
    -
    MemModel::isEmpty() in MemModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    DbModel::isEmpty() in DbModel.php
    -
    Check if this DbModel is empty.
    -
    -
    - isIndexed -
    -
    -
    MemModel::isIndexed() in MemModel.php
    -
    Returns true if there is an index, false if not.
    -
    -
    - isSetup -
    -
    -
    DbStore::isSetup() in DbStore.php
    -
    Checks if tables are setup for RAP
    -
    -
    - iterFind -
    -
    -
    MemModel::iterFind() in MemModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - iterFind -
    -
    -
    DbModel::iterFind() in DbModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listModels -
    -
    -
    DbStore::listModels() in DbStore.php
    -
    List all DbModels stored in the database.
    -
    -
    - Literal -
    -
    -
    Literal::Literal() in Literal.php
    -
    Constructor
    -
    -
    - Literal -
    -
    -
    Literal in Literal.php
    -
    An RDF literal.
    -
    -
    - load -
    -
    -
    Model::load() in Model.php
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    -
    - Literal.php -
    -
    -
    Literal.php in Literal.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MemModel -
    -
    -
    MemModel::MemModel() in MemModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - MemModel -
    -
    -
    MemModel in MemModel.php
    -
    A MemModel is an RDF Model, which is stored in the main memory.
    -
    -
    - Model -
    -
    -
    Model in Model.php
    -
    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    -
    -
    - Model -
    -
    -
    Model::Model() in Model.php
    -
    Notice for people who are used to work with older versions of RAP.
    -
    -
    - MemModel.php -
    -
    -
    MemModel.php in MemModel.php
    -
    -
    - Model.php -
    -
    -
    Model.php in Model.php
    -
    -
    - ModelFactory.php -
    -
    -
    ModelFactory.php in ModelFactory.php
    -
    -
    - modelExists -
    -
    -
    DbStore::modelExists() in DbStore.php
    -
    Check if the DbModel with the given modelURI is already stored in the database
    -
    -
    - ModelFactory -
    -
    -
    ModelFactory in ModelFactory.php
    -
    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - Node.php -
    -
    -
    Node.php in Node.php
    -
    -
    - Node -
    -
    -
    Node in Node.php
    -
    An abstract RDF node.
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - object -
    -
    -
    Statement::object() in Statement.php
    -
    Alias for getObject()
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - predicate -
    -
    -
    Statement::predicate() in Statement.php
    -
    Alias for getPredicate()
    -
    -
    - putModel -
    -
    -
    DbStore::putModel() in DbStore.php
    -
    Store a MemModel or another DbModel from a different DbStore in the database.
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $queryParser -
    -
    -
    Model::$queryParser in Model.php
    -
    SparqlParser so we can re-use it
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - Resource.php -
    -
    -
    Resource.php in Resource.php
    -
    -
    - rdqlQuery -
    -
    -
    MemModel::rdqlQuery() in MemModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    DbModel::rdqlQuery() in DbModel.php
    -
    Perform an RDQL query on this DbModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this DBModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - reify -
    -
    -
    Statement::reify() in Statement.php
    -
    Reifies a statement.
    -
    -
    - reify -
    -
    -
    DbModel::reify() in DbModel.php
    -
    Reify the DbModel.
    -
    -
    - reify -
    -
    -
    MemModel::reify() in MemModel.php
    -
    Reifies the MemModel.
    -
    -
    - remove -
    -
    -
    DbModel::remove() in DbModel.php
    -
    Remove the given triple from this DbModel.
    -
    -
    - remove -
    -
    -
    MemModel::remove() in MemModel.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeNamedGraphDb -
    -
    - -
    Removes the graph with all statements from the database.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - replace -
    -
    -
    MemModel::replace() in MemModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replace -
    -
    -
    DbModel::replace() in DbModel.php
    -
    General method to replace nodes of a DbModel.
    -
    -
    - Resource -
    -
    -
    Resource::Resource() in Resource.php
    -
    Constructor Takes an URI or a namespace/localname combination
    -
    -
    - Resource -
    -
    -
    Resource in Resource.php
    -
    An RDF resource.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - Statement.php -
    -
    -
    Statement.php in Statement.php
    -
    -
    - saveAs -
    -
    -
    DbModel::saveAs() in DbModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    -
    -
    - saveAs -
    -
    -
    MemModel::saveAs() in MemModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - setBaseURI -
    -
    -
    MemModel::setBaseURI() in MemModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    DbModel::setBaseURI() in DbModel.php
    -
    Set a base URI for the DbModel.
    -
    -
    - setDatatype -
    -
    -
    Literal::setDatatype() in Literal.php
    -
    Sets the datatype of the literal.
    -
    -
    - setLanguage -
    -
    -
    Literal::setLanguage() in Literal.php
    -
    Sets the language of the literal.
    -
    -
    - size -
    -
    -
    MemModel::size() in MemModel.php
    -
    Number of triples in the MemModel
    -
    -
    - size -
    -
    -
    DbModel::size() in DbModel.php
    -
    Return the number of statements in this DbModel.
    -
    -
    - sparqlPrepare -
    -
    - -
    Prepares a sparql query and returns a prepared statement that can be executed with data later on.
    -
    -
    - sparqlQuery -
    -
    - -
    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.
    -
    -
    - Statement -
    -
    -
    Statement::Statement() in Statement.php
    -
    The parameters to constructor are instances of classes and not just strings
    -
    -
    - Statement -
    -
    -
    Statement in Statement.php
    -
    An RDF statement.
    -
    -
    - subject -
    -
    -
    Statement::subject() in Statement.php
    -
    Alias for getSubject()
    -
    -
    - subtract -
    -
    -
    MemModel::subtract() in MemModel.php
    -
    Returns a new MemModel that is the subtraction of another model from this MemModel.
    -
    -
    - subtract -
    -
    -
    DbModel::subtract() in DbModel.php
    -
    Return a new MemModel that is the subtraction of another model from this DbModel.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    MemModel::toString() in MemModel.php
    -
    Short Dump of the MemModel.
    -
    -
    - toString -
    -
    -
    BlankNode::toString() in Blanknode.php
    -
    Dumps bNode.
    -
    -
    - toString -
    -
    -
    Literal::toString() in Literal.php
    -
    Dumps literal.
    -
    -
    - toString -
    -
    -
    Statement::toString() in Statement.php
    -
    Dumps the triple.
    -
    -
    - toString -
    -
    -
    DbModel::toString() in DbModel.php
    -
    Short dump of the DbModel.
    -
    -
    - toString -
    -
    -
    Resource::toString() in Resource.php
    -
    Dumps resource.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the MemModel including all triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dump of the DbModel including all triples.
    -
    -
    - toStringObject -
    -
    - -
    Reurns a toString() serialization of the statements's object.
    -
    -
    - toStringPredicate -
    -
    - -
    Returns a toString() serialization of the statements's predicate.
    -
    -
    - toStringSubject -
    -
    - -
    Returns a toString() serialization of the statements's subject.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - unite -
    -
    -
    MemModel::unite() in MemModel.php
    -
    Returns a new MemModel that is the set-union of the MemModel with another model.
    -
    -
    - unite -
    -
    -
    DbModel::unite() in DbModel.php
    -
    Return a new MemModel that is the set-union the model with another model.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - visualize -
    -
    -
    Model::visualize() in Model.php
    -
    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHtml -
    -
    -
    MemModel::writeAsHtml() in MemModel.php
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    DbModel::writeAsHtml() in DbModel.php
    -
    Write the RDF serialization of the _DbModel as HTML.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Write the RDF serialization of the DbModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Write the RDF serialization of the DbModel to string.
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - u - v - w - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_ontModel.html.svn-base deleted file mode 100755 index 224ea000..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_ontModel.html.svn-base +++ /dev/null @@ -1,1388 +0,0 @@ - - - - - - - - - - - - -

    [ontModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - u - v -
    - - -
    -
    a
    - -
    -
    -
    -
    - addComment -
    -
    -
    OntResource::addComment() in OntResource.php
    -
    Add the given comment to this resource.
    -
    -
    - addDomain -
    -
    -
    OntProperty::addDomain() in OntProperty.php
    -
    Add a resource representing the domain of this property.
    -
    -
    - addIsDefinedBy -
    -
    - -
    Add a resource that is declared to provide a definition of this resource.
    -
    -
    - addLabelProperty -
    -
    - -
    Add the given Label to this resource
    -
    -
    - addProperty -
    -
    -
    OntResource::addProperty() in OntResource.php
    -
    Add a property to this resource.
    -
    -
    - addRange -
    -
    -
    OntProperty::addRange() in OntProperty.php
    -
    Add a resource representing the range of this property.
    -
    -
    - addRDFType -
    -
    -
    OntResource::addRDFType() in OntResource.php
    -
    Add the given class as one of the rdf:type's for this resource.
    -
    -
    - addSeeAlso -
    -
    -
    OntResource::addSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource.
    -
    -
    - addSubClass -
    -
    -
    OntClass::addSubClass() in OntClass.php
    -
    Add a sub-class of this class.
    -
    -
    - addSubProperty -
    -
    - -
    Add a sub-property of this property.
    -
    -
    - addSuperClass -
    -
    - -
    Add a super-class of this class.
    -
    -
    - addSuperProperty -
    -
    - -
    Add a super-property of this property.
    -
    -
    - ALL_DIFFERENT -
    -
    -
    OWLVocabulary::ALL_DIFFERENT() in OWLVocabulary.php
    -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - asClass -
    -
    -
    OntResource::asClass() in OntResource.php
    -
    Answer a view of this resource as a class
    -
    -
    - asIndividual -
    -
    -
    OntResource::asIndividual() in OntResource.php
    -
    Answer a view of this resource as an Individual
    -
    -
    - asOntProperty -
    -
    -
    OntResource::asOntProperty() in OntResource.php
    -
    Answer a view of this resource as a property
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - CARDINALITY -
    -
    -
    OWLVocabulary::CARDINALITY() in OWLVocabulary.php
    -
    -
    - COMMENT -
    -
    -
    OWLVocabulary::COMMENT() in OWLVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMMENT -
    -
    -
    RdfsVocabulary::COMMENT() in RdfsVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMPLEMENT_OF -
    -
    -
    OWLVocabulary::COMPLEMENT_OF() in OWLVocabulary.php
    -
    -
    - createIndividual -
    -
    - -
    Answer a resource that represents an Individual node in this model.
    -
    -
    - createInstance -
    -
    - -
    Answer a resource that represents an instance of this OntClass and Individual node in this model.
    -
    -
    - createOntClass -
    -
    - -
    Answer a resource that represents a class description node in this model.
    -
    -
    - createOntProperty -
    -
    - -
    Answer a resource that represents an OntProperty node in this model.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DATATYPE -
    -
    -
    OWLVocabulary::DATATYPE() in OWLVocabulary.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATA_RANGE -
    -
    -
    OWLVocabulary::DATA_RANGE() in OWLVocabulary.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    -
    OWLVocabulary::DIFFERENT_FROM() in OWLVocabulary.php
    -
    -
    - DISJOINT_WITH -
    -
    -
    OWLVocabulary::DISJOINT_WITH() in OWLVocabulary.php
    -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DOMAIN -
    -
    -
    RdfsVocabulary::DOMAIN() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - DOMAIN -
    -
    -
    OWLVocabulary::DOMAIN() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getComment -
    -
    -
    OntResource::getComment() in OntResource.php
    -
    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    -
    -
    - getDomain -
    -
    -
    OntProperty::getDomain() in OntProperty.php
    -
    Answer a OntClass that represents the domain class of this property.
    -
    -
    - getInstanceRdfType -
    -
    - -
    returns the rdf:type, that this distinct resource is instance of.
    -
    -
    - getIsDefinedBy -
    -
    - -
    Answer a resource that is declared to provide a definition of this resource.
    -
    -
    - getLabelProperty -
    -
    - -
    Answer the label ResLiteral for this object.
    -
    -
    - getPropertyValue -
    -
    - -
    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.
    -
    -
    - getRange -
    -
    -
    OntProperty::getRange() in OntProperty.php
    -
    Answer a OntClass that represents the range class of this property.
    -
    -
    - getRDFType -
    -
    -
    OntResource::getRDFType() in OntResource.php
    -
    Answer the rdf:type (ie the class) of this resource.
    -
    -
    - getSeeAlso -
    -
    -
    OntResource::getSeeAlso() in OntResource.php
    -
    Answer a resource that provides additional information about this resource.
    -
    -
    - getSubClass -
    -
    -
    OntClass::getSubClass() in OntClass.php
    -
    Answer a class that is the sub-class of this class.
    -
    -
    - getSubProperty -
    -
    - -
    Answer a property that is the sub-property of this property.
    -
    -
    - getSuperClass -
    -
    - -
    Answer a class that is the super-class of this class.
    -
    -
    - getSuperProperty -
    -
    - -
    Answer a property that is the super-property of this property.
    -
    -
    - getVocabulary -
    -
    -
    OntResource::getVocabulary() in OntResource.php
    -
    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasComment -
    -
    -
    OntResource::hasComment() in OntResource.php
    -
    Answer true if this resource has the given comment.
    -
    -
    - hasDomain -
    -
    -
    OntProperty::hasDomain() in OntProperty.php
    -
    Answer true if the given resource a class specifying the domain of this property.
    -
    -
    - hasLabelProperty -
    -
    - -
    Answer true if this resource has the given label.
    -
    -
    - hasRange -
    -
    -
    OntProperty::hasRange() in OntProperty.php
    -
    Answer true if the given resource a class specifying the range of this property.
    -
    -
    - hasRDFType -
    -
    -
    OntResource::hasRDFType() in OntResource.php
    -
    Answer true if this resource has the given rdf:type.
    -
    -
    - hasSeeAlso -
    -
    -
    OntResource::hasSeeAlso() in OntResource.php
    -
    Answer true if this resource has the given resource as a source of additional information.
    -
    -
    - hasSubclass -
    -
    -
    OntClass::hasSubclass() in OntClass.php
    -
    Answer true if the given class is a sub-class of this class.
    -
    -
    - hasSubProperty -
    -
    - -
    Answer true if the given property is a sub-property of this property.
    -
    -
    - hasSuperClass -
    -
    - -
    Answer true if the given class is a super-class of this class.
    -
    -
    - hasSuperProperty -
    -
    - -
    Answer true if the given property is a super-property of this property.
    -
    -
    - HAS_VALUE -
    -
    -
    OWLVocabulary::HAS_VALUE() in OWLVocabulary.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - IMPORTS -
    -
    -
    OWLVocabulary::IMPORTS() in OWLVocabulary.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - Individual -
    -
    -
    Individual::Individual() in Individual.php
    -
    Constructor You can supply a uri
    -
    -
    - Individual -
    -
    -
    Individual in Individual.php
    -
    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWLVocabulary::INVERSE_OF() in OWLVocabulary.php
    -
    -
    - isDefinedBy -
    -
    -
    OntResource::isDefinedBy() in OntResource.php
    -
    Answer true if this resource is defined by the given resource.
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RdfsVocabulary::IS_DEFINED_BY() in RdfsVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    -
    OWLVocabulary::IS_DEFINED_BY() in OWLVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - Individual.php -
    -
    -
    Individual.php in Individual.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - LABEL -
    -
    -
    RdfsVocabulary::LABEL() in RdfsVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LABEL -
    -
    -
    OWLVocabulary::LABEL() in OWLVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - listClasses -
    -
    -
    OntModel::listClasses() in OntModel.php
    -
    Answer an array that ranges over all of the various forms of class description resource in this model.
    -
    -
    - listComments -
    -
    -
    OntResource::listComments() in OntResource.php
    -
    Answer an array of all of the comment literals for this resource.
    -
    -
    - listDomain -
    -
    -
    OntProperty::listDomain() in OntProperty.php
    -
    Answer an array of all of the declared domain classes of this property.
    -
    -
    - listInstances -
    -
    - -
    Answer an ResIterator over the individuals in the model that have this class among their types.
    -
    -
    - listIsDefinedBy -
    -
    - -
    Answer an array of all of the resources that are declared to define this resource.
    -
    -
    - listLabelProperties -
    -
    - -
    Answer an array of all of the label literals for this resource, with the given language, if $language is set.
    -
    -
    - listProperty -
    -
    -
    OntResource::listProperty() in OntResource.php
    -
    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.
    -
    -
    - listRange -
    -
    -
    OntProperty::listRange() in OntProperty.php
    -
    Answer an array of all of the declared range classes of this property.
    -
    -
    - listRDFTypes -
    -
    -
    OntResource::listRDFTypes() in OntResource.php
    -
    Answer an array of the RDF classes to which this resource belongs.
    -
    -
    - listSeeAlso -
    -
    -
    OntResource::listSeeAlso() in OntResource.php
    -
    Answer an array of all of the resources that are declared to provide addition information about this resource.
    -
    -
    - listSubClasses -
    -
    - -
    Answer an array over the classes that are declared to be sub-classes of this class.
    -
    -
    - listSubProperties -
    -
    - -
    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - listSuperClasses -
    -
    - -
    Answer an array over the classes that are declared to be super-classes of this class.
    -
    -
    - listSuperProperties -
    -
    - -
    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - NAMESPACE -
    -
    -
    OWLVocabulary::NAMESPACE() in OWLVocabulary.php
    -
    -
    - NAMESPACE -
    -
    -
    RdfsVocabulary::NAMESPACE() in RdfsVocabulary.php
    -
    Answer the string that is the namespace prefix for this vocabulary
    -
    -
    - NOTHING -
    -
    -
    OWLVocabulary::NOTHING() in OWLVocabulary.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWLVocabulary::OBJECT_CLASS() in OWLVocabulary.php
    -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWLVocabulary::ONE_OF() in OWLVocabulary.php
    -
    -
    - ONTCLASS -
    -
    -
    RdfsVocabulary::ONTCLASS() in RdfsVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass in OntClass.php
    -
    Class that represents an ontology node characterising a class description.
    -
    -
    - ONTCLASS -
    -
    -
    OWLVocabulary::ONTCLASS() in OWLVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass::OntClass() in OntClass.php
    -
    Constructor You can supply a uri
    -
    -
    - OntModel -
    -
    -
    OntModel::OntModel() in OntModel.php
    -
    Constructor.
    -
    -
    - OntModel -
    -
    -
    OntModel in OntModel.php
    -
    Enhanced view of the model that is known to contain ontology data, under a
    -
    -
    - OntClass.php -
    -
    -
    OntClass.php in OntClass.php
    -
    -
    - OntModel.php -
    -
    -
    OntModel.php in OntModel.php
    -
    -
    - OntModelP.php -
    -
    -
    OntModelP.php in OntModelP.php
    -
    -
    - OntProperty.php -
    -
    -
    OntProperty.php in OntProperty.php
    -
    -
    - OntResource.php -
    -
    -
    OntResource.php in OntResource.php
    -
    -
    - OntVocabulary.php -
    -
    -
    OntVocabulary.php in OntVocabulary.php
    -
    -
    - OWLVocabulary.php -
    -
    -
    OWLVocabulary.php in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWLVocabulary::ONTOLOGY() in OWLVocabulary.php
    -
    -
    - OntProperty -
    -
    -
    OntProperty::OntProperty() in OntProperty.php
    -
    Constructor.
    -
    -
    - OntProperty -
    -
    -
    OntProperty in OntProperty.php
    -
    Class encapsulating a property in an ontology.
    -
    -
    - OntResource -
    -
    -
    OntResource::OntResource() in OntResource.php
    -
    Constructor You can supply a uri
    -
    -
    - OntResource -
    -
    -
    OntResource in OntResource.php
    -
    Provides a common super-type for all of the abstractions in this ontology representation package.
    -
    -
    - OntVocabulary -
    -
    -
    OntVocabulary in OntVocabulary.php
    -
    Base Class that encapsulates the elements of a general vocabulary
    -
    -
    - ON_PROPERTY -
    -
    -
    OWLVocabulary::ON_PROPERTY() in OWLVocabulary.php
    -
    -
    - OWLVocabulary -
    -
    -
    OWLVocabulary in OWLVocabulary.php
    -
    OWL vocabulary items
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - PRIOR_VERSION -
    -
    -
    OWLVocabulary::PRIOR_VERSION() in OWLVocabulary.php
    -
    -
    - PROPERTY -
    -
    -
    OWLVocabulary::PROPERTY() in OWLVocabulary.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RdfsVocabulary.php -
    -
    -
    RdfsVocabulary.php in RdfsVocabulary.php
    -
    -
    - RANGE -
    -
    -
    OWLVocabulary::RANGE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RdfsVocabulary::RANGE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RdfsVocabulary -
    -
    -
    RdfsVocabulary in RdfsVocabulary.php
    -
    RDFS vocabulary items
    -
    -
    - removeComment -
    -
    -
    OntResource::removeComment() in OntResource.php
    -
    Remove the statement that the given ResLiteral is a comment on this resource.
    -
    -
    - removeDefinedBy -
    -
    - -
    Remove the statement that this resource is defined by the given resource.
    -
    -
    - removeDomain -
    -
    -
    OntProperty::removeDomain() in OntProperty.php
    -
    Remove the given class from the stated domain(s) of this property.
    -
    -
    - removeLabelProperty -
    -
    - -
    Remove the statement that the given ResLiteral is a label on this resource.
    -
    -
    - removeProperty -
    -
    - -
    Remove the specific property-value pair from this resource.
    -
    -
    - removeRange -
    -
    -
    OntProperty::removeRange() in OntProperty.php
    -
    Remove the given class from the stated range(es) of this property.
    -
    -
    - removeRDFType -
    -
    -
    OntResource::removeRDFType() in OntResource.php
    -
    Remove the statement that this resource is of the given RDF type.
    -
    -
    - removeSeeAlso -
    -
    -
    OntResource::removeSeeAlso() in OntResource.php
    -
    Remove the statement indicating the given resource as a source of additional information about this resource.
    -
    -
    - removeSubClass -
    -
    - -
    Remove the given class from the sub-classes of this class.
    -
    -
    - removeSubProperty -
    -
    - -
    Remove the given property from the sub-properties of this property.
    -
    -
    - removeSuperClass -
    -
    - -
    Remove the given class from the super-classes of this class.
    -
    -
    - removeSuperProperty -
    -
    - -
    Remove the given property from the super-properties of this property.
    -
    -
    - RESTRICTION -
    -
    -
    OWLVocabulary::RESTRICTION() in OWLVocabulary.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - SAME_AS -
    -
    -
    OWLVocabulary::SAME_AS() in OWLVocabulary.php
    -
    -
    - SAME_CLASS_AS -
    -
    -
    OWLVocabulary::SAME_CLASS_AS() in OWLVocabulary.php
    -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SEE_ALSO -
    -
    -
    OWLVocabulary::SEE_ALSO() in OWLVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    RdfsVocabulary::SEE_ALSO() in RdfsVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - setComment -
    -
    -
    OntResource::setComment() in OntResource.php
    -
    Assert that the given string is the comment on this resource.
    -
    -
    - setDomain -
    -
    -
    OntProperty::setDomain() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.
    -
    -
    - setInstanceRdfType -
    -
    - -
    Sets the rdf:type, that this distinct resource is instance of.
    -
    -
    - setIsDefinedBy -
    -
    - -
    Assert that the given resource provides a source of definitions about this resource.
    -
    -
    - setLabelProperty -
    -
    - -
    Assert that the given string is the label on this resource.
    -
    -
    - setPropertyValue -
    -
    - -
    Set the value of the given property of this ontology resource to the given value.
    -
    -
    - setRange -
    -
    -
    OntProperty::setRange() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.
    -
    -
    - setRDFType -
    -
    -
    OntResource::setRDFType() in OntResource.php
    -
    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.
    -
    -
    - setSeeAlso -
    -
    -
    OntResource::setSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource
    -
    -
    - setSubClass -
    -
    -
    OntClass::setSubClass() in OntClass.php
    -
    Assert that this class is super-class of the given class.
    -
    -
    - setSubProperty -
    -
    - -
    Assert that this property is super-property of the given property.
    -
    -
    - setSuperClass -
    -
    - -
    Assert that this class is sub-class of the given class.
    -
    -
    - setSuperProperty -
    -
    - -
    Assert that this property is sub-property of the given property.
    -
    -
    - setVocabulary -
    -
    -
    OntResource::setVocabulary() in OntResource.php
    -
    Sets the reference to the assoiated vocabulary
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SUB_CLASS_OF -
    -
    -
    RdfsVocabulary::SUB_CLASS_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    OWLVocabulary::SUB_CLASS_OF() in OWLVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    -
    RdfsVocabulary::SUB_PROPERTY_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - THING -
    -
    -
    OWLVocabulary::THING() in OWLVocabulary.php
    -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TYPE -
    -
    -
    RdfsVocabulary::TYPE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TYPE -
    -
    -
    OWLVocabulary::TYPE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - UNION_OF -
    -
    -
    OWLVocabulary::UNION_OF() in OWLVocabulary.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VERSION_INFO -
    -
    -
    OWLVocabulary::VERSION_INFO() in OWLVocabulary.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - u - v -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_rdql.html.svn-base deleted file mode 100755 index 6f910eb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_rdql.html.svn-base +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - - - - - - -

    [rdql] element index

    -

    Package indexes

    - -All elements -
    -
    - c - g - h - m - n - p - q - r -
    - - -
    -
    c
    - -
    -
    -
    -
    - countResults -
    -
    -
    RdqlResultIterator::countResults() in RdqlResultIterator.php
    -
    Returns the number of results.
    -
    -
    - current -
    -
    -
    RdqlResultIterator::current() in RdqlResultIterator.php
    -
    Returns the current result.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getResultLabels -
    -
    -
    RdqlResultIterator::getResultLabels() in RdqlResultIterator.php
    -
    Returns the labels of the result as array.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasNext -
    -
    -
    RdqlResultIterator::hasNext() in RdqlResultIterator.php
    -
    Returns TRUE if there are more results.
    -
    -
    - hasPrevious -
    -
    -
    RdqlResultIterator::hasPrevious() in RdqlResultIterator.php
    -
    Returns TRUE if the first result has not been reached.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - moveFirst -
    -
    -
    RdqlResultIterator::moveFirst() in RdqlResultIterator.php
    -
    Moves the pointer to the first result.
    -
    -
    - moveLast -
    -
    -
    RdqlResultIterator::moveLast() in RdqlResultIterator.php
    -
    Moves the pointer to the last result.
    -
    -
    - moveTo -
    -
    -
    RdqlResultIterator::moveTo() in RdqlResultIterator.php
    -
    Moves the pointer to a specific result.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    RdqlResultIterator::next() in RdqlResultIterator.php
    -
    Returns the next result array.
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - parseQuery -
    -
    -
    RdqlParser::parseQuery() in RdqlParser.php
    -
    Parse the given RDQL query string and return an array with query variables and constraints.
    -
    -
    - previous -
    -
    -
    RdqlResultIterator::previous() in RdqlResultIterator.php
    -
    Returns the previous result.
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - queryModel -
    -
    -
    RdqlMemEngine::queryModel() in RdqlMemEngine.php
    -
    Perform an RDQL Query on the given MemModel.
    -
    -
    - queryModel -
    -
    -
    RdqlDbEngine::queryModel() in RdqlDbEngine.php
    -
    Perform an RDQL Query on the given DbModel.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RdqlDbEngine.php -
    -
    -
    RdqlDbEngine.php in RdqlDbEngine.php
    -
    -
    - RdqlEngine.php -
    -
    -
    RdqlEngine.php in RdqlEngine.php
    -
    -
    - RdqlMemEngine.php -
    -
    -
    RdqlMemEngine.php in RdqlMemEngine.php
    -
    -
    - RdqlParser.php -
    -
    -
    RdqlParser.php in RdqlParser.php
    -
    -
    - RdqlResultIterator.php -
    -
    -
    RdqlResultIterator.php in RdqlResultIterator.php
    -
    -
    - RdqlDbEngine -
    -
    -
    RdqlDbEngine in RdqlDbEngine.php
    -
    This class performs as RDQL query on a DbModel.
    -
    -
    - RdqlEngine -
    -
    -
    RdqlEngine in RdqlEngine.php
    -
    Some general methods common for RdqlMemEngine and RdqlDbEngine
    -
    -
    - RdqlMemEngine -
    -
    -
    RdqlMemEngine in RdqlMemEngine.php
    -
    This class performes as RDQL query on a MemModel.
    -
    -
    - RdqlParser -
    -
    -
    RdqlParser in RdqlParser.php
    -
    This class contains methods for parsing an Rdql query string into PHP variables.
    -
    -
    - RdqlResultIterator -
    -
    - -
    Constructor
    -
    -
    - RdqlResultIterator -
    -
    -
    RdqlResultIterator in RdqlResultIterator.php
    -
    Iterator for traversing Rdql results.
    -
    -
    - -
    - c - g - h - m - n - p - q - r -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_resModel.html.svn-base deleted file mode 100755 index b7844625..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_resModel.html.svn-base +++ /dev/null @@ -1,1065 +0,0 @@ - - - - - - - - - - - - -

    [resModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - e - f - g - h - i - k - l - n - r - s - u - v - w -
    - - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    ResModel::add() in ResModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    ResList::add() in ResList.php
    -
    Add the given value to the end of the list.
    -
    -
    - add -
    -
    -
    ResContainer::add() in ResContainer.php
    -
    Add a new value to a container.
    -
    -
    - addAtIndex -
    -
    -
    ResSeq::addAtIndex() in ResSeq.php
    -
    Insert a new member into the sequence at the specified position.
    -
    -
    - addModel -
    -
    -
    ResModel::addModel() in ResModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addNamespace -
    -
    -
    ResModel::addNamespace() in ResModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addProperty -
    -
    -
    ResResource::addProperty() in ResResource.php
    -
    Add a property to this resource.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    -
    -
    - append -
    -
    -
    ResList::append() in ResList.php
    -
    Answer a new list that is formed by adding each element of
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - concatenate -
    -
    -
    ResList::concatenate() in ResList.php
    -
    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.
    -
    -
    - cons -
    -
    -
    ResList::cons() in ResList.php
    -
    Return a reference to a new list cell whose head is value and whose tail is this list.
    -
    -
    - contains -
    -
    -
    ResList::contains() in ResList.php
    -
    Answer true if the given node appears as the value of a value of any of the cells of this list.
    -
    -
    - contains -
    -
    -
    ResContainer::contains() in ResContainer.php
    -
    Determine whether the container contains a value
    -
    -
    - contains -
    -
    -
    ResModel::contains() in ResModel.php
    -
    Tests if the Model contains the given statement.
    -
    -
    - containsAll -
    -
    -
    ResModel::containsAll() in ResModel.php
    -
    Determine if all of the statements in a model are also contained in this model.
    -
    -
    - containsAny -
    -
    -
    ResModel::containsAny() in ResModel.php
    -
    Determine if any of the statements in a model are also contained in this model.
    -
    -
    - containsResource -
    -
    - -
    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    -
    -
    - copy -
    -
    -
    ResList::copy() in ResList.php
    -
    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.
    -
    -
    - createAlt -
    -
    -
    ResModel::createAlt() in ResModel.php
    -
    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBag -
    -
    -
    ResModel::createBag() in ResModel.php
    -
    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createList -
    -
    -
    ResModel::createList() in ResModel.php
    -
    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createLiteral -
    -
    - -
    Create an untyped literal from a String value with a specified language.
    -
    -
    - createProperty -
    -
    - -
    Create a new Property associated with this model.
    -
    -
    - createResource -
    -
    - -
    Create a new resource associated with this model.
    -
    -
    - createSeq -
    -
    -
    ResModel::createSeq() in ResModel.php
    -
    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createTypedLiteral -
    -
    - -
    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.
    -
    -
    - current -
    -
    -
    ResIterator::current() in ResIterator.php
    -
    Returns the current item
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    ResResource::equals() in ResResource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    ResModel::equals() in ResModel.php
    -
    Checks if two models are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    ResModel::find() in ResModel.php
    -
    General method to search for triples.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - get -
    -
    -
    ResList::get() in ResList.php
    -
    Returns the value of the list element at the specified position or null.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getBaseURI -
    -
    -
    ResModel::getBaseURI() in ResModel.php
    -
    Return current baseURI.
    -
    -
    - getContentInArray -
    -
    - -
    Get all values in the list as an array of ResResources
    -
    -
    - getDefault -
    -
    -
    ResAlt::getDefault() in ResAlt.php
    -
    Return the default value for this resource
    -
    -
    - getHead -
    -
    -
    ResList::getHead() in ResList.php
    -
    Get the value that is associated with the head of the list.
    -
    -
    - getIsAnon -
    -
    -
    ResResource::getIsAnon() in ResResource.php
    -
    Determine whether this resource is an anonymous resource
    -
    -
    - getMember -
    -
    -
    ResSeq::getMember() in ResSeq.php
    -
    Get the member at a given index
    -
    -
    - getMembers -
    -
    -
    ResContainer::getMembers() in ResContainer.php
    -
    Get an array of all resources that are values of this container
    -
    -
    - getModel -
    -
    -
    ResModel::getModel() in ResModel.php
    -
    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getProperty -
    -
    -
    ResModel::getProperty() in ResModel.php
    -
    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    -
    -
    - getProperty -
    -
    -
    ResResource::getProperty() in ResResource.php
    -
    Answer some statement (this, p, O) in the associated model.
    -
    -
    - getTail -
    -
    -
    ResList::getTail() in ResList.php
    -
    Get the list that is the tail of this list.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasProperty -
    -
    -
    ResResource::hasProperty() in ResResource.php
    -
    Determine whether this resource has any values for a given property.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - indexOf -
    -
    -
    ResList::indexOf() in ResList.php
    -
    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.
    -
    -
    - indexOf -
    -
    -
    ResSeq::indexOf() in ResSeq.php
    -
    Return the index of a given member of the sequence.
    -
    -
    - intersect -
    -
    -
    ResModel::intersect() in ResModel.php
    -
    Returns a new model containing all the statements which are in both this model and another.
    -
    -
    - isAlt -
    -
    -
    ResContainer::isAlt() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Alt
    -
    -
    - isBag -
    -
    -
    ResContainer::isBag() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Bag
    -
    -
    - isEmpty -
    -
    -
    ResModel::isEmpty() in ResModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    ResList::isEmpty() in ResList.php
    -
    Returns true, if this list is empty
    -
    -
    - isSeq -
    -
    -
    ResContainer::isSeq() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Seq
    -
    -
    - isValid -
    -
    -
    ResList::isValid() in ResList.php
    -
    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    ResIterator::key() in ResIterator.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listObjects -
    -
    -
    ResModel::listObjects() in ResModel.php
    -
    Returns a ResIterator with all objects in a model.
    -
    -
    - listObjectsOfProperty -
    -
    - -
    Returns a ResIterator with all objects with a given property and property value.
    -
    -
    - listProperties -
    -
    - -
    List all the values with the property p as statements in an array.
    -
    -
    - listSubjects -
    -
    -
    ResModel::listSubjects() in ResModel.php
    -
    Returns a ResIterator with all subjects in a model.
    -
    -
    - listSubjectsWithProperty -
    -
    - -
    Returns a ResIterator with all subjects with a given property and property value.
    -
    -
    - load -
    -
    -
    ResModel::load() in ResModel.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    ResIterator::next() in ResIterator.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - rdqlQuery -
    -
    -
    ResModel::rdqlQuery() in ResModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - remove -
    -
    -
    ResList::remove() in ResList.php
    -
    Remove the given value from this list.
    -
    -
    - remove -
    -
    -
    ResModel::remove() in ResModel.php
    -
    Removes the statement of ResResources(ResTriples) from the MemModel.
    -
    -
    - remove -
    -
    -
    ResContainer::remove() in ResContainer.php
    -
    Remove a value from the container.
    -
    -
    - removeAll -
    -
    -
    ResResource::removeAll() in ResResource.php
    -
    Delete all the statements with predicate p for this resource from its associated model.
    -
    -
    - removeAtIndex -
    -
    - -
    Remove the member at the specified index.
    -
    -
    - removeHead -
    -
    -
    ResList::removeHead() in ResList.php
    -
    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.
    -
    -
    - removeList -
    -
    -
    ResList::removeList() in ResList.php
    -
    Remove all of the components of this list from the model.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeProperties -
    -
    - -
    Delete all the properties for this resource from the associated model.
    -
    -
    - replace -
    -
    -
    ResList::replace() in ResList.php
    -
    Replace the value at the i'th position in the list with the given value
    -
    -
    - ResAlt -
    -
    -
    ResAlt::ResAlt() in ResAlt.php
    -
    Constructor You can supply a URI
    -
    -
    - ResAlt -
    -
    -
    ResAlt in ResAlt.php
    -
    This interface defines methods for accessing RDF Alternative resources.
    -
    -
    - ResBag -
    -
    -
    ResBag in ResBag.php
    -
    This interface defines methods for accessing RDF Bag resources.
    -
    -
    - ResBag -
    -
    -
    ResBag::ResBag() in ResBag.php
    -
    Constructor You can supply a URI
    -
    -
    - ResContainer -
    -
    -
    ResContainer in ResContainer.php
    -
    An RDF Container.
    -
    -
    - ResContainer -
    -
    -
    ResContainer::ResContainer() in ResContainer.php
    -
    Constructor You can supply a URI
    -
    -
    - ResIterator -
    -
    -
    ResIterator::ResIterator() in ResIterator.php
    -
    Constructor.
    -
    -
    - ResIterator -
    -
    -
    ResIterator in ResIterator.php
    -
    Implementation of a resource iterator.
    -
    -
    - ResList -
    -
    -
    ResList in ResList.php
    -
    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.
    -
    -
    - ResList -
    -
    -
    ResList::ResList() in ResList.php
    -
    Constructor You can supply a URI
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral::ResLiteral() in ResLiteral.php
    -
    Constructor You have to supply a string.
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral in ResLiteral.php
    -
    An RDF literal.
    -
    -
    - ResModel -
    -
    -
    ResModel::ResModel() in ResModel.php
    -
    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.
    -
    -
    - ResModel -
    -
    -
    ResModel in ResModel.php
    -
    A ResModel provides an resource centric view on an underlying RDF model.
    -
    -
    - ResAlt.php -
    -
    -
    ResAlt.php in ResAlt.php
    -
    -
    - ResBag.php -
    -
    -
    ResBag.php in ResBag.php
    -
    -
    - ResContainer.php -
    -
    -
    ResContainer.php in ResContainer.php
    -
    -
    - ResIterator.php -
    -
    -
    ResIterator.php in ResIterator.php
    -
    -
    - ResList.php -
    -
    -
    ResList.php in ResList.php
    -
    -
    - ResLiteral.php -
    -
    -
    ResLiteral.php in ResLiteral.php
    -
    -
    - ResModel.php -
    -
    -
    ResModel.php in ResModel.php
    -
    -
    - ResProperty.php -
    -
    -
    ResProperty.php in ResProperty.php
    -
    -
    - ResResource.php -
    -
    -
    ResResource.php in ResResource.php
    -
    -
    - ResSeq.php -
    -
    -
    ResSeq.php in ResSeq.php
    -
    -
    - ResProperty -
    -
    -
    ResProperty in ResProperty.php
    -
    An RDF Property.
    -
    -
    - ResProperty -
    -
    -
    ResProperty::ResProperty() in ResProperty.php
    -
    Constructor You can supply a URI
    -
    -
    - ResResource -
    -
    -
    ResResource::ResResource() in ResResource.php
    -
    Constructor You can supply a uri
    -
    -
    - ResResource -
    -
    -
    ResResource in ResResource.php
    -
    An RDF Resource.
    -
    -
    - ResSeq -
    -
    -
    ResSeq::ResSeq() in ResSeq.php
    -
    Constructor You can supply a URI
    -
    -
    - ResSeq -
    -
    -
    ResSeq in ResSeq.php
    -
    This interface defines methods for accessing RDF Sequence resources.
    -
    -
    - rewind -
    -
    -
    ResIterator::rewind() in ResIterator.php
    -
    Resets iterator list to start
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - sameListAs -
    -
    -
    ResList::sameListAs() in ResList.php
    -
    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.
    -
    -
    - saveAs -
    -
    -
    ResModel::saveAs() in ResModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - set -
    -
    -
    ResSeq::set() in ResSeq.php
    -
    Set the value at a given index in the sequence.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setBaseURI -
    -
    -
    ResModel::setBaseURI() in ResModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setDefault -
    -
    -
    ResAlt::setDefault() in ResAlt.php
    -
    Set the default value of this container.
    -
    -
    - setFindLiteralWithLang -
    -
    - -
    Sets that only Literals with the matching language should be returned
    -
    -
    - setHead -
    -
    -
    ResList::setHead() in ResList.php
    -
    Update the head of the list to have the given value, and return the previous value.
    -
    -
    - setIsAnon -
    -
    -
    ResResource::setIsAnon() in ResResource.php
    -
    Set whether this resource is an anonymous resource
    -
    -
    - setTail -
    -
    -
    ResList::setTail() in ResList.php
    -
    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.
    -
    -
    - setURI -
    -
    -
    ResResource::setURI() in ResResource.php
    -
    Sets the URI of this resource
    -
    -
    - size -
    -
    -
    ResModel::size() in ResModel.php
    -
    Number of statements in the MemModel
    -
    -
    - size -
    -
    -
    ResContainer::size() in ResContainer.php
    -
    Returns the number values in the container.
    -
    -
    - subtract -
    -
    -
    ResModel::subtract() in ResModel.php
    -
    Returns a new model that is the subtraction of another model from this model.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - unite -
    -
    -
    ResModel::unite() in ResModel.php
    -
    Returns a new Model that is the set-union of the model with another model.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    ResIterator::valid() in ResIterator.php
    -
    Says if there are additional items left in the list
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHTMLTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - -
    - a - c - e - f - g - h - i - k - l - n - r - s - u - v - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql-db.html.svn-base deleted file mode 100755 index cdd9e4e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql-db.html.svn-base +++ /dev/null @@ -1,1412 +0,0 @@ - - - - - - - - - - - - -

    [sparql-db] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __toString -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getHead -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getIsCol -
    -
    - -
    -
    - getLangCol -
    -
    - -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSelect -
    -
    - -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isNumber -
    -
    - -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - mkVal -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    - -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - switchOperator -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $type -
    -
    - -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql.html.svn-base deleted file mode 100755 index a9f0627c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_sparql.html.svn-base +++ /dev/null @@ -1,3237 +0,0 @@ - - - - - - - - - - - - -

    [sparql] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - j - l - m - n - o - p - q - r - s - t - u - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _buildIntBindings -
    -
    - -
    Marks triples with internal bindings.
    -
    -
    - _buildResultSet -
    -
    - -
    Builds the resultset.
    -
    -
    - _buildurl -
    -
    -
    SparqlClient::_buildurl() in SparqlClient.php
    -
    Helper function that builds the url.
    -
    -
    - _checkGraphs -
    -
    -
    SparqlEngine::_checkGraphs() in SparqlEngine.php
    -
    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.
    -
    -
    - _determineType -
    -
    - -
    Tries to determine the rdf:type of the variable.
    -
    -
    - _fastForward -
    -
    -
    SparqlParser::_fastForward() in SparqlParser.php
    -
    FastForward until next token which is not blank.
    -
    -
    - _getAttributes -
    -
    - -
    Search the attributes listed in $list in the dataset.
    -
    -
    - _getBindingString -
    -
    - -
    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.
    -
    -
    - _http_get -
    -
    -
    SparqlClient::_http_get() in SparqlClient.php
    -
    Executes the GET Request.
    -
    -
    - _rewind -
    -
    -
    SparqlParser::_rewind() in SparqlParser.php
    -
    Rewind until next token which is not blank.
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlParserException::__construct() in SparqlParserException.php
    -
    -
    - __construct -
    -
    -
    SparqlEngineDb::__construct() in SparqlEngineDb.php
    -
    Use SparqlEngine::factory() to create the instance
    -
    -
    - __construct -
    -
    -
    SparqlEngine::__construct() in SparqlEngine.php
    -
    Use SparqlEngine::factory() instead of this constructor.
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __toString -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arPrepared -
    -
    -
    SparqlEngineDb::$arPrepared in SparqlEngineDb.php
    -
    Prepared SQL statements are stored in here.
    -
    -
    - $arrOutput -
    -
    -
    SparqlResultParser::$arrOutput in SparqlResultParser.php
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - addConstraint -
    -
    -
    GraphPattern::addConstraint() in GraphPattern.php
    -
    Adds a Constraint to the GraphPattern.
    -
    -
    - addConstructGraphPattern -
    -
    - -
    Adds a construct graph pattern to the query.
    -
    -
    - addDefaultGraph -
    -
    - -
    Adds a default graph to the query object.
    -
    -
    - addExpression -
    -
    -
    Constraint::addExpression() in Constraint.php
    -
    Adds an expression string.
    -
    -
    - addFrom -
    -
    -
    Query::addFrom() in Query.php
    -
    Adds a graphuri to the from part.
    -
    -
    - addFromNamed -
    -
    - -
    Adds a graphuri to the from named part.
    -
    -
    - addGraphPattern -
    -
    - -
    Adds a graph pattern to the result part.
    -
    -
    - addNamedGraph -
    -
    -
    ClientQuery::addNamedGraph() in ClientQuery.php
    -
    Adds a named graph to the query object.
    -
    -
    - addOptional -
    -
    -
    GraphPattern::addOptional() in GraphPattern.php
    -
    Adds a pointer to an optional graphPattern.
    -
    -
    - addPrefix -
    -
    -
    Query::addPrefix() in Query.php
    -
    Adds a prefix to the list of prefixes.
    -
    -
    - addTriplePattern -
    -
    - -
    Adds a List of QueryTriples to the GraphPattern.
    -
    -
    - addUnion -
    -
    -
    GraphPattern::addUnion() in GraphPattern.php
    -
    Adds a pointer to a union graphPattern.
    -
    -
    - addVar -
    -
    -
    Query::addVar() in Query.php
    -
    Adds a new variable to the variable list.
    -
    -
    - addVariable -
    -
    - -
    Adds a variable to the list of result variables.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $base -
    -
    -
    Query::$base in Query.php
    -
    The BASE part of the SPARQL query.
    -
    -
    - $bncounter -
    -
    -
    SparqlResultParser::$bncounter in SparqlResultParser.php
    -
    -
    - $bnodeCounter -
    -
    - -
    Blanknode counter.
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bRealPrepared -
    -
    -
    SparqlEngineDb::$bRealPrepared in SparqlEngineDb.php
    -
    If the prepared statement is really prepared, or if we just emulate it.
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - balanceTree -
    -
    -
    SparqlParser::balanceTree() in SparqlParser.php
    -
    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.
    -
    -
    - bNodeCheck -
    -
    -
    SparqlParser::bNodeCheck() in SparqlParser.php
    -
    Checks if $token is a Blanknode.
    -
    -
    - buildVarmap -
    -
    -
    SparqlEngine::buildVarmap() in SparqlEngine.php
    -
    Sorts the result table.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $constraint -
    -
    -
    GraphPattern::$constraint in GraphPattern.php
    -
    -
    - $constructPattern -
    -
    - -
    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.
    -
    -
    - $counter -
    -
    -
    SparqlResultParser::$counter in SparqlResultParser.php
    -
    -
    - $current_literal -
    -
    -
    SparqlResultParser::$current_literal in SparqlResultParser.php
    -
    -
    - checkDtypeLang -
    -
    -
    SparqlParser::checkDtypeLang() in SparqlParser.php
    -
    Checks if there is a datatype given and appends it to the node.
    -
    -
    - checkIntBindings -
    -
    - -
    Checks it there are internal bindings between variables.
    -
    -
    - ClientQuery -
    -
    -
    ClientQuery in ClientQuery.php
    -
    ClientQuery Object to run a SPARQL Query against a SPARQL server.
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - Constraint -
    -
    -
    Constraint in Constraint.php
    -
    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - ClientQuery.php -
    -
    -
    ClientQuery.php in ClientQuery.php
    -
    -
    - Constraint.php -
    -
    -
    Constraint.php in Constraint.php
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $dataset -
    -
    -
    SparqlEngineDb::$dataset in SparqlEngineDb.php
    -
    RDF dataset object.
    -
    -
    - $dataset -
    -
    -
    SparqlEngine::$dataset in SparqlEngine.php
    -
    The RDF Dataset.
    -
    -
    - $dbConn -
    -
    -
    SparqlEngineDb::$dbConn in SparqlEngineDb.php
    -
    Database connection object.
    -
    -
    - $default -
    -
    -
    ClientQuery::$default in ClientQuery.php
    -
    -
    - $dtype -
    -
    -
    SparqlResultParser::$dtype in SparqlResultParser.php
    -
    -
    - dateTime -
    -
    -
    dateTime() in FilterFunctions.php
    -
    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.
    -
    -
    - describeGraph -
    -
    - -
    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - distinct -
    -
    -
    SparqlEngine::distinct() in SparqlEngine.php
    -
    Eliminates duplicate results.
    -
    -
    - dtypeCheck -
    -
    -
    SparqlParser::dtypeCheck() in SparqlParser.php
    -
    Checks if the Node is a typed Literal.
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $expression -
    -
    -
    Constraint::$expression in Constraint.php
    -
    The expression string.
    -
    -
    - error -
    -
    -
    SparqlParser::error() in SparqlParser.php
    -
    Error reporting.
    -
    -
    - execute -
    -
    -
    SparqlEngineDb::execute() in SparqlEngineDb.php
    -
    Execute a prepared statement by filling it with variables
    -
    -
    - execute -
    -
    - -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $fromNamedPart -
    -
    - -
    Contains the FROM NAMED part of the SPARQL query.
    -
    -
    - $fromPart -
    -
    -
    Query::$fromPart in Query.php
    -
    Contains the FROM part of the SPARQL query.
    -
    -
    - factory -
    -
    -
    SparqlEngine::factory() in SparqlEngine.php
    -
    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.
    -
    -
    - fillConstraintString -
    -
    - -
    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function
    -
    -
    - filterPatterns -
    -
    -
    SparqlEngine::filterPatterns() in SparqlEngine.php
    -
    Filters the pattern results.
    -
    -
    - findTuplesMatchingOnePattern -
    -
    - -
    Finds Tuples matching one TriplePattern.
    -
    -
    - fixNegationInFuncName -
    -
    - -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FilterFunctions.php -
    -
    -
    FilterFunctions.php in FilterFunctions.php
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - $graphname -
    -
    -
    GraphPattern::$graphname in GraphPattern.php
    -
    Graphname. 0 if its in the default graph.
    -
    -
    - $graphPatternCounter -
    -
    - -
    GraphPattern counter.
    -
    -
    - getAllVars -
    -
    -
    Query::getAllVars() in Query.php
    -
    Returns a list with all used variables.
    -
    -
    - getBase -
    -
    -
    Query::getBase() in Query.php
    -
    Returns the BASE part of the query.
    -
    -
    - getBlanknodeLabel -
    -
    - -
    Returns an unused Bnode label.
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getConstraint -
    -
    -
    GraphPattern::getConstraint() in GraphPattern.php
    -
    Returns a constraint if there is one false if not.
    -
    -
    - getConstructPattern -
    -
    - -
    Returns the construvtGraphPattern of the query if there is one.
    -
    -
    - getConstructPatternVariables -
    -
    - -
    Returns a list of variables used in the construct patterns.
    -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getDataset -
    -
    -
    SparqlEngine::getDataset() in SparqlEngine.php
    -
    -
    - getDatatype -
    -
    - -
    Returns the datatype of a variable if it is set.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getExpression -
    -
    -
    Constraint::getExpression() in Constraint.php
    -
    Returns the expression string.
    -
    -
    - getFromNamedPart -
    -
    - -
    Returns the FROM NAMED clause of the query.
    -
    -
    - getFromPart -
    -
    - -
    Returns the FROM clause of the query.
    -
    -
    - getFullUri -
    -
    -
    Query::getFullUri() in Query.php
    -
    Gets the full URI of a qname token.
    -
    -
    - getGraphname -
    -
    -
    GraphPattern::getGraphname() in GraphPattern.php
    -
    Returns the graphname.
    -
    -
    - getHead -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getId -
    -
    -
    GraphPattern::getId() in GraphPattern.php
    -
    Returns the GraphPatterns id.
    -
    -
    - getIsCol -
    -
    - -
    -
    - getLangCol -
    -
    - -
    -
    - getLanguageTag -
    -
    - -
    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.
    -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getNewPattern -
    -
    - -
    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.
    -
    -
    - getObject -
    -
    -
    QueryTriple::getObject() in QueryTriple.php
    -
    Returns the Triples Object.
    -
    -
    - getOptional -
    -
    -
    GraphPattern::getOptional() in GraphPattern.php
    -
    Returns a pointer to an optional graph pattern.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPointer -
    -
    -
    SparqlParserException::getPointer() in SparqlParserException.php
    -
    Returns a pointer to the token which caused the exception.
    -
    -
    - getPredicate -
    -
    -
    QueryTriple::getPredicate() in QueryTriple.php
    -
    Returns the Triples Predicate.
    -
    -
    - getPrefixes -
    -
    - -
    Returns the prefix map of the query.
    -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getQuery -
    -
    -
    SparqlEngineDb::getQuery() in SparqlEngineDb.php
    -
    -
    - getQuery -
    -
    -
    SparqlEngine::getQuery() in SparqlEngine.php
    -
    -
    - getResultForm -
    -
    - -
    Returns the type the result shall have.
    -
    -
    - getResultPart -
    -
    - -
    Returns a list containing the graph patterns of the query.
    -
    -
    - getResultVars -
    -
    - -
    Returns a list containing the result vars.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSelect -
    -
    - -
    -
    - getSolutionModifier -
    -
    - -
    Gets the solution modifiers of the query.
    -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlGenerator -
    -
    -
    SparqlEngineDb::getSqlGenerator() in SparqlEngineDb.php
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getSubject -
    -
    -
    QueryTriple::getSubject() in QueryTriple.php
    -
    Returns the Triples Subject.
    -
    -
    - getTree -
    -
    -
    Constraint::getTree() in Constraint.php
    -
    -
    - getTriplePattern -
    -
    - -
    Returns the triple pattern of the graph pattern.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getTypeSorter -
    -
    -
    SparqlEngineDb::getTypeSorter() in SparqlEngineDb.php
    -
    -
    - getUnion -
    -
    -
    GraphPattern::getUnion() in GraphPattern.php
    -
    Returns a pointer to a union graph pattern.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getVariables -
    -
    -
    QueryTriple::getVariables() in QueryTriple.php
    -
    Returns an array of all variables in this triple.
    -
    -
    - getVariables -
    -
    -
    GraphPattern::getVariables() in GraphPattern.php
    -
    Returns an array of all variables used in this graph pattern.
    -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern in GraphPattern.php
    -
    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern::GraphPattern() in GraphPattern.php
    -
    Constructor
    -
    -
    - GraphPattern.php -
    -
    -
    GraphPattern.php in GraphPattern.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $isConstructPattern -
    -
    - -
    -
    - $isEmpty -
    -
    -
    Query::$isEmpty in Query.php
    -
    TRUE if the query is empty FALSE if not.
    -
    -
    - iriCheck -
    -
    -
    SparqlParser::iriCheck() in SparqlParser.php
    -
    Checks if $token is an IRI.
    -
    -
    - isEmpty -
    -
    -
    Query::isEmpty() in Query.php
    -
    Returns $isEmpty variable
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isNumber -
    -
    - -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isOuterFilter -
    -
    -
    Constraint::isOuterFilter() in Constraint.php
    -
    Returns true if this constraint is an outer filter- false if not.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - joinOptionalTuples -
    -
    - -
    Joins OPTIONAL pattern results.
    -
    -
    - joinResults -
    -
    -
    SparqlEngine::joinResults() in SparqlEngine.php
    -
    Joins the results of the different Graphpatterns.
    -
    -
    - joinTuples -
    -
    -
    SparqlEngine::joinTuples() in SparqlEngine.php
    -
    Perform an SQL-like inner join on two resultSets.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lang -
    -
    -
    SparqlResultParser::$lang in SparqlResultParser.php
    -
    -
    - lang -
    -
    -
    lang() in FilterFunctions.php
    -
    Evaluates the lang() function. Returns lang tag of a Literal.
    -
    -
    - langMatches -
    -
    -
    langMatches() in FilterFunctions.php
    -
    Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    -
    -
    - literalCheck -
    -
    -
    SparqlParser::literalCheck() in SparqlParser.php
    -
    Checks if $token is a Literal.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $mode -
    -
    -
    SparqlResultParser::$mode in SparqlResultParser.php
    -
    -
    - $modelID -
    -
    -
    SparqlEngineDb::$modelID in SparqlEngineDb.php
    -
    Internal ID for our graph model.
    -
    -
    - matchPattern -
    -
    -
    SparqlEngine::matchPattern() in SparqlEngine.php
    -
    Finds tuples that match one graph pattern.
    -
    -
    - matchPatterns -
    -
    -
    SparqlEngine::matchPatterns() in SparqlEngine.php
    -
    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.
    -
    -
    - mkVal -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $named -
    -
    -
    ClientQuery::$named in ClientQuery.php
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    QueryTriple::$object in QueryTriple.php
    -
    The QueryTriples Object.
    -
    -
    - $open -
    -
    -
    GraphPattern::$open in GraphPattern.php
    -
    -
    - $operatorPrecedence -
    -
    - -
    Which order operators are to be treated.
    -
    -
    - $optional -
    -
    -
    GraphPattern::$optional in GraphPattern.php
    -
    -
    - $outer -
    -
    -
    Constraint::$outer in Constraint.php
    -
    True if it is an outer filter, false if not.
    -
    -
    - $output -
    -
    -
    SparqlClient::$output in SparqlClient.php
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $patternId -
    -
    -
    GraphPattern::$patternId in GraphPattern.php
    -
    -
    - $pr -
    -
    -
    SparqlEngineDb::$pr in SparqlEngineDb.php
    -
    Prepared statments preparator instance
    -
    -
    - $predicate -
    -
    -
    QueryTriple::$predicate in QueryTriple.php
    -
    The QueryTriples Predicate.
    -
    -
    - $prefixes -
    -
    -
    ClientQuery::$prefixes in ClientQuery.php
    -
    -
    - $prefixes -
    -
    -
    Query::$prefixes in Query.php
    -
    Array that contains used prefixes and namespaces.
    -
    -
    - parse -
    -
    -
    SparqlParser::parse() in SparqlParser.php
    -
    Main function of SparqlParser. Parses a query string.
    -
    -
    - parse -
    -
    -
    SparqlResultParser::parse() in SparqlResultParser.php
    -
    Main function of SparqlResultParser
    -
    -
    - parseAsk -
    -
    -
    SparqlParser::parseAsk() in SparqlParser.php
    -
    Sets result form to 'ASK' and 'COUNT'.
    -
    -
    - parseBase -
    -
    -
    SparqlParser::parseBase() in SparqlParser.php
    -
    Parses the BASE part of the query.
    -
    -
    - parseBrackettedExpression -
    -
    - -
    Parses a bracketted expression.
    -
    -
    - parseCollection -
    -
    - -
    Parses an RDF collection.
    -
    -
    - parseConstraint -
    -
    - -
    Parses a value constraint.
    -
    -
    - parseConstraintTree -
    -
    - -
    Parses a constraint string recursively.
    -
    -
    - parseConstruct -
    -
    -
    SparqlParser::parseConstruct() in SparqlParser.php
    -
    Parses the CONSTRUCT clause.
    -
    -
    - parseDescribe -
    -
    -
    SparqlParser::parseDescribe() in SparqlParser.php
    -
    Adds a new variable to the query and sets result form to 'DESCRIBE'.
    -
    -
    - parseExpression -
    -
    - -
    Parses an expression.
    -
    -
    - parseFrom -
    -
    -
    SparqlParser::parseFrom() in SparqlParser.php
    -
    Parses the FROM clause.
    -
    -
    - parseGraph -
    -
    -
    SparqlParser::parseGraph() in SparqlParser.php
    -
    Parses a GRAPH clause.
    -
    -
    - parseGraphPattern -
    -
    - -
    Parses a graph pattern.
    -
    -
    - parseLiteral -
    -
    -
    SparqlParser::parseLiteral() in SparqlParser.php
    -
    Parses a literal.
    -
    -
    - parseModifier -
    -
    -
    SparqlParser::parseModifier() in SparqlParser.php
    -
    Parses the solution modifiers of a query.
    -
    -
    - parseNode -
    -
    -
    SparqlParser::parseNode() in SparqlParser.php
    -
    Parses a String to an RDF node.
    -
    -
    - parseOrderCondition -
    -
    - -
    Parses order conditions of a query.
    -
    -
    - parsePrefix -
    -
    -
    SparqlParser::parsePrefix() in SparqlParser.php
    -
    Adds a new namespace prefix to the query object.
    -
    -
    - parseQuery -
    -
    -
    SparqlParser::parseQuery() in SparqlParser.php
    -
    Starts parsing the tokenized SPARQL Query.
    -
    -
    - parseResult -
    -
    -
    SparqlClient::parseResult() in SparqlClient.php
    -
    -
    - parseSelect -
    -
    -
    SparqlParser::parseSelect() in SparqlParser.php
    -
    Parses the SELECT part of a query.
    -
    -
    - parseTriplePattern -
    -
    - -
    Parses a triple pattern.
    -
    -
    - parseWhere -
    -
    -
    SparqlParser::parseWhere() in SparqlParser.php
    -
    Parses the WHERE clause.
    -
    -
    - prepare -
    -
    -
    SparqlParser::prepare() in SparqlParser.php
    -
    Set all internal variables to a clear state before we start parsing.
    -
    -
    - prepare -
    -
    -
    SparqlEngineDb::prepare() in SparqlEngineDb.php
    -
    Create a prepared statement that can be executed later.
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - preselectGraphs -
    -
    - -
    Looks in from and from named part of the query and adds the graphs to the graphlist.
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    -
    SparqlEngineDb::$query in SparqlEngineDb.php
    -
    Sparql Query object.
    -
    -
    - $query -
    -
    -
    SparqlParser::$query in SparqlParser.php
    -
    The query Object
    -
    -
    - $query -
    -
    - -
    -
    - $query -
    -
    -
    ClientQuery::$query in ClientQuery.php
    -
    -
    - $query -
    -
    -
    SparqlEngine::$query in SparqlEngine.php
    -
    The query object.
    -
    -
    - $querystring -
    -
    -
    SparqlParser::$querystring in SparqlParser.php
    -
    The Querystring
    -
    -
    - qnameCheck -
    -
    -
    SparqlParser::qnameCheck() in SparqlParser.php
    -
    Checks if $token is a qname.
    -
    -
    - query -
    -
    -
    ClientQuery::query() in ClientQuery.php
    -
    Adds the SPARQL query string to the query object.
    -
    -
    - Query -
    -
    -
    Query::Query() in Query.php
    -
    Constructor
    -
    -
    - Query -
    -
    -
    Query in Query.php
    -
    The Class Query represents a SPARQL query.
    -
    -
    - query -
    -
    -
    SparqlClient::query() in SparqlClient.php
    -
    Main function of SparqlClient.
    -
    -
    - queryDb -
    -
    -
    SparqlEngineDb::queryDb() in SparqlEngineDb.php
    -
    Sends the sql to the database and returns the results.
    -
    -
    - queryModel -
    -
    -
    SparqlEngineDb::queryModel() in SparqlEngineDb.php
    -
    Query the database with the given SPARQL query.
    -
    -
    - queryModel -
    -
    -
    SparqlEngine::queryModel() in SparqlEngine.php
    -
    The query engine's main method.
    -
    -
    - queryMultiple -
    -
    -
    SparqlEngineDb::queryMultiple() in SparqlEngineDb.php
    -
    Executes multiple SQL queries and returns an array of results.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple in QueryTriple.php
    -
    Represents a query triple.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple::QueryTriple() in QueryTriple.php
    -
    Constructor
    -
    -
    - Query.php -
    -
    -
    Query.php in Query.php
    -
    -
    - QueryTriple.php -
    -
    -
    QueryTriple.php in QueryTriple.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $resParser -
    -
    -
    SparqlResultParser::$resParser in SparqlResultParser.php
    -
    -
    - $resultForm -
    -
    -
    Query::$resultForm in Query.php
    -
    What form/type of result should be returned.
    -
    -
    - $resultPart -
    -
    -
    Query::$resultPart in Query.php
    -
    Contains the result part of the SPARQL query.
    -
    -
    - $resultVars -
    -
    -
    Query::$resultVars in Query.php
    -
    Array of result variables that shall be returned.
    -
    -
    - regex -
    -
    -
    regex() in FilterFunctions.php
    -
    Evaluates the regex() function. Returns true if the regex is matched false if not.
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - returnResult -
    -
    -
    SparqlClient::returnResult() in SparqlClient.php
    -
    Returns the query result.
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $server -
    -
    -
    SparqlClient::$server in SparqlClient.php
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sg -
    -
    -
    SparqlEngineDb::$sg in SparqlEngineDb.php
    -
    SQL generator instance
    -
    -
    - $solutionModifier -
    -
    - -
    Optional solution modifier of the query.
    -
    -
    - $sops -
    -
    -
    SparqlParser::$sops in SparqlParser.php
    -
    Operators introduced by sparql
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - $strXmlData -
    -
    -
    SparqlResultParser::$strXmlData in SparqlResultParser.php
    -
    -
    - $subject -
    -
    -
    QueryTriple::$subject in QueryTriple.php
    -
    The QueryTriples Subject.
    -
    -
    - selectVars -
    -
    -
    SparqlEngine::selectVars() in SparqlEngine.php
    -
    Selects the result variables and builds a result table.
    -
    -
    - setBase -
    -
    -
    Query::setBase() in Query.php
    -
    Sets the base part.
    -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - setGraphname -
    -
    -
    GraphPattern::setGraphname() in GraphPattern.php
    -
    Sets the graphname.
    -
    -
    - setId -
    -
    -
    GraphPattern::setId() in GraphPattern.php
    -
    Sets the GraphPatterns Id.
    -
    -
    - setOuterFilter -
    -
    - -
    Sets the filter type to outer or inner filter.
    -
    -
    - setOutputFormat -
    -
    - -
    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.
    -
    -
    - setResultForm -
    -
    - -
    Sets the result form.
    -
    -
    - setSolutionModifier -
    -
    - -
    Sets a solution modifier.
    -
    -
    - setTree -
    -
    -
    Constraint::setTree() in Constraint.php
    -
    -
    - sortVars -
    -
    -
    SparqlEngine::sortVars() in SparqlEngine.php
    -
    Sorts the results.
    -
    -
    - SparqlClient.php -
    -
    -
    SparqlClient.php in SparqlClient.php
    -
    -
    - SparqlEngine.php -
    -
    -
    SparqlEngine.php in SparqlEngine.php
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlGeneratorException.php -
    -
    -
    SqlGeneratorException.php in SqlGeneratorException.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb.php -
    -
    -
    SparqlEngineDb.php in SparqlEngineDb.php
    -
    -
    - SparqlParser.php -
    -
    -
    SparqlParser.php in SparqlParser.php
    -
    -
    - SparqlParserException.php -
    -
    -
    SparqlParserException.php in SparqlParserException.php
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient::SparqlClient() in SparqlClient.php
    -
    Constructor of SparlClient.
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient in SparqlClient.php
    -
    Client for querying a sparql server.
    -
    -
    - SparqlEngine -
    -
    -
    SparqlEngine in SparqlEngine.php
    -
    This engine executes SPARQL queries against an RDF Datatset.
    -
    -
    - SparqlEngineDb -
    -
    -
    SparqlEngineDb in SparqlEngineDb.php
    -
    SPARQL engine optimized for databases.
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer -
    -
    -
    SparqlEngineDb_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlGeneratorException -
    -
    -
    SparqlEngineDb_SqlGeneratorException in SqlGeneratorException.php
    -
    Exception when generating the SQL statement
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - SparqlEngine_PreparedStatement -
    -
    -
    SparqlEngine_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngine_ResultConverter -
    -
    -
    SparqlEngine_ResultConverter in ResultConverter.php
    -
    Converts a memory result into a proper rdf statement triple array
    -
    -
    - SparqlEngine_ResultRenderer -
    -
    -
    SparqlEngine_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngine_ResultRenderer_Default -
    -
    - -
    Default result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_HTML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_XML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser::SparqlParser() in SparqlParser.php
    -
    Constructor of SparqlParser
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser in SparqlParser.php
    -
    Parses a SPARQL Query string and returns a Query Object.
    -
    -
    - SparqlParserException -
    -
    -
    SparqlParserException in SparqlParserException.php
    -
    A SPARQL Parser Execption for better errorhandling.
    -
    -
    - SparqlResultParser -
    -
    -
    SparqlResultParser in SparqlResultParser.php
    -
    Parses an xml document in SPARQL Result XML Format.
    -
    -
    - str -
    -
    -
    str() in FilterFunctions.php
    -
    Evaluates the str() function. Returns the string representation of a variable or RDF term.
    -
    -
    - switchOperator -
    -
    - -
    -
    - SparqlResultParser.php -
    -
    -
    SparqlResultParser.php in SparqlResultParser.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $tmp -
    -
    -
    SparqlParser::$tmp in SparqlParser.php
    -
    Last parsed graphPattern
    -
    -
    - $tokens -
    -
    -
    SparqlParser::$tokens in SparqlParser.php
    -
    The tokenized Query
    -
    -
    - $tree -
    -
    -
    Constraint::$tree in Constraint.php
    -
    The expression tree
    -
    -
    - $triplePattern -
    -
    -
    GraphPattern::$triplePattern in GraphPattern.php
    -
    -
    - $ts -
    -
    -
    SparqlEngineDb::$ts in SparqlEngineDb.php
    -
    Type sorting instance
    -
    -
    - $type -
    -
    - -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - tagClosed -
    -
    -
    SparqlResultParser::tagClosed() in SparqlResultParser.php
    -
    -
    - tagData -
    -
    -
    SparqlResultParser::tagData() in SparqlResultParser.php
    -
    -
    - tagOpen -
    -
    -
    SparqlResultParser::tagOpen() in SparqlResultParser.php
    -
    -
    - tokenize -
    -
    -
    SparqlParser::tokenize() in SparqlParser.php
    -
    Tokenizes the querystring.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $union -
    -
    -
    GraphPattern::$union in GraphPattern.php
    -
    -
    - $usedVars -
    -
    -
    Query::$usedVars in Query.php
    -
    List of all vars used in the query.
    -
    -
    - uncomment -
    -
    -
    SparqlParser::uncomment() in SparqlParser.php
    -
    Removes comments in the query string. Comments are indicated by '#'.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - $varDatatypes -
    -
    - -
    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.
    -
    -
    - $varLanguages -
    -
    - -
    Language of variables. NULL if the variable has no language tag (e.g. @en) set.
    -
    -
    - $varlist -
    -
    -
    SparqlResultParser::$varlist in SparqlResultParser.php
    -
    -
    - $varname -
    -
    -
    SparqlResultParser::$varname in SparqlResultParser.php
    -
    -
    - varCheck -
    -
    -
    SparqlParser::varCheck() in SparqlParser.php
    -
    Checks if $token is a variable.
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - writeQueryResultAsHtmlTable -
    -
    - -
    Prints a query result as HTML table.
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - l - m - n - o - p - q - r - s - t - u - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_syntax.html.svn-base deleted file mode 100755 index 1137d49d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_syntax.html.svn-base +++ /dev/null @@ -1,770 +0,0 @@ - - - - - - - - - - - - -

    [syntax] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - g - i - m - n - o - p - r - s - t - u - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _generateRDF -
    -
    -
    GRDDLParser::_generateRDF() in GRDDLParser.php
    -
    -
    - _is_forbidden_rdf_property_attribute -
    -
    - -
    -
    - _parse_uri -
    -
    -
    RdfParser::_parse_uri() in RdfParser.php
    -
    -
    - _report_error -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $anon -
    -
    -
    N3Serializer::$anon in N3Serializer.php
    -
    -
    - addNamespacePrefix -
    -
    - -
    Adds a new prefix/namespace combination.
    -
    -
    - addNSPrefix -
    -
    -
    N3Serializer::addNSPrefix() in N3Serializer.php
    -
    Adds a new namespace prefix to use.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $bNode -
    -
    -
    N3Parser::$bNode in N3Parser.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - channel -
    -
    -
    RssParser::channel() in RssParser.php
    -
    Parses the rss channel/ atom feed.
    -
    -
    - configSortModel -
    -
    - -
    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.
    -
    -
    - configUseAttributes -
    -
    - -
    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.
    -
    -
    - configUseEntities -
    -
    - -
    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.
    -
    -
    - configUseQnames -
    -
    - -
    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.
    -
    -
    - configUseXmlDeclaration -
    -
    - -
    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $DAML_NS -
    -
    -
    N3Parser::$DAML_NS in N3Parser.php
    -
    -
    - $debug -
    -
    -
    NTripleSerializer::$debug in NTripleSerializer.php
    -
    -
    - $debug -
    -
    -
    N3Serializer::$debug in N3Serializer.php
    -
    -
    - $debug -
    -
    -
    N3Parser::$debug in N3Parser.php
    -
    -
    - $done -
    -
    -
    N3Serializer::$done in N3Serializer.php
    -
    -
    - dc -
    -
    -
    RssParser::dc() in RssParser.php
    -
    Adds the dc namespace.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - generateModel -
    -
    - -
    Main function
    -
    -
    - generateModel -
    -
    - -
    Generates a new MemModel from a URI, a file or from memory.
    -
    -
    - generateModel -
    -
    - -
    Generate a new MemModel from an URI or file.
    -
    -
    - generateModel -
    -
    -
    GRDDLParser::generateModel() in GRDDLParser.php
    -
    generates a MemModel and creates the DomDocument.
    -
    -
    - getPovs -
    -
    -
    N3Parser::getPovs() in N3Parser.php
    -
    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    -
    -
    - GRDDLParser -
    -
    -
    GRDDLParser in GRDDLParser.php
    -
    A GRDDLParser.
    -
    -
    - GRDDLParser.php -
    -
    -
    GRDDLParser.php in GRDDLParser.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - image -
    -
    -
    RssParser::image() in RssParser.php
    -
    Parses the image if there is one.
    -
    -
    - items -
    -
    -
    RssParser::items() in RssParser.php
    -
    Parses the rss items/ atom entries.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $model -
    -
    -
    NTripleSerializer::$model in NTripleSerializer.php
    -
    -
    - $model -
    -
    -
    RdfParser::$model in RdfParser.php
    -
    -
    - $model -
    -
    -
    N3Serializer::$model in N3Serializer.php
    -
    -
    - $m_attributeStatements -
    -
    - -
    -
    - $m_baseURI -
    -
    -
    RdfSerializer::$m_baseURI in RdfSerializer.php
    -
    -
    - $m_contentStatements -
    -
    - -
    -
    - $m_currentSubject -
    -
    - -
    -
    - $m_defaultNamespaces -
    -
    - -
    -
    - $m_groupTypeStatement -
    -
    - -
    -
    - $m_namespaces -
    -
    -
    RdfSerializer::$m_namespaces in RdfSerializer.php
    -
    -
    - $m_nextAutomaticPrefixIndex -
    -
    - -
    -
    - $m_out -
    -
    -
    RdfSerializer::$m_out in RdfSerializer.php
    -
    -
    - $m_rdfAboutElementText -
    -
    - -
    -
    - $m_rdfIDElementText -
    -
    - -
    -
    - $m_rdfResourceElementText -
    -
    - -
    -
    - $m_statements -
    -
    -
    RdfSerializer::$m_statements in RdfSerializer.php
    -
    -
    - MAGIC_STRING -
    -
    -
    MAGIC_STRING in N3Serializer.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N3Parser -
    -
    -
    N3Parser::N3Parser() in N3Parser.php
    -
    Constructor
    -
    -
    - N3Parser -
    -
    -
    N3Parser in N3Parser.php
    -
    PHP Notation3 Parser
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer::N3Serializer() in N3Serializer.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer in N3Serializer.php
    -
    An abstract object.
    -
    -
    - NTripleSerializer -
    -
    -
    NTripleSerializer in NTripleSerializer.php
    -
    PHP N-Triple Serializer
    -
    -
    - NTripleSerializer -
    -
    - -
    Constructor
    -
    -
    - N3Parser.php -
    -
    -
    N3Parser.php in N3Parser.php
    -
    -
    - N3Serializer.php -
    -
    -
    N3Serializer.php in N3Serializer.php
    -
    -
    - NTripleSerializer.php -
    -
    -
    NTripleSerializer.php in NTripleSerializer.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $OWL_NS -
    -
    -
    N3Parser::$OWL_NS in N3Parser.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parsedNamespaces -
    -
    - -
    -
    - $parseError -
    -
    -
    N3Parser::$parseError in N3Parser.php
    -
    -
    - $prefixes -
    -
    -
    N3Serializer::$prefixes in N3Serializer.php
    -
    -
    - parse -
    -
    -
    N3Parser::parse() in N3Parser.php
    -
    This parses a N3 string and prints out the triples
    -
    -
    - parse2model -
    -
    -
    N3Parser::parse2model() in N3Parser.php
    -
    This parses a N3 string and returns a memmodel
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $RDF_NS -
    -
    -
    N3Parser::$RDF_NS in N3Parser.php
    -
    -
    - $rdf_parser -
    -
    -
    RdfParser::$rdf_parser in RdfParser.php
    -
    -
    - $rdf_qnames -
    -
    -
    RdfSerializer::$rdf_qnames in RdfSerializer.php
    -
    -
    - $rdf_qname_prefix -
    -
    - -
    -
    - $res -
    -
    -
    NTripleSerializer::$res in NTripleSerializer.php
    -
    -
    - $res -
    -
    -
    N3Serializer::$res in N3Serializer.php
    -
    -
    - $resourcetext -
    -
    -
    N3Serializer::$resourcetext in N3Serializer.php
    -
    -
    - $resourcetext_taken -
    -
    - -
    -
    - RdfParser -
    -
    -
    RdfParser in RdfParser.php
    -
    An RDF paser.
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer::RdfSerializer() in RdfSerializer.php
    -
    Constructor
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer in RdfSerializer.php
    -
    An RDF seralizer.
    -
    -
    - RssParser -
    -
    -
    RssParser in RssParser.php
    -
    RSS/ATOM Parser
    -
    -
    - RdfParser.php -
    -
    -
    RdfParser.php in RdfParser.php
    -
    -
    - RdfSerializer.php -
    -
    -
    RdfSerializer.php in RdfSerializer.php
    -
    -
    - RssParser.php -
    -
    -
    RssParser.php in RssParser.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $sort_model -
    -
    -
    RdfSerializer::$sort_model in RdfSerializer.php
    -
    -
    - saveAs -
    -
    -
    NTripleSerializer::saveAs() in NTripleSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    N3Serializer::saveAs() in N3Serializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    RdfSerializer::saveAs() in RdfSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - serialize -
    -
    -
    RdfSerializer::serialize() in RdfSerializer.php
    -
    Serializes a model to RDF syntax.
    -
    -
    - serialize -
    -
    -
    NTripleSerializer::serialize() in NTripleSerializer.php
    -
    Serializes a model to N Triple syntax.
    -
    -
    - serialize -
    -
    -
    N3Serializer::serialize() in N3Serializer.php
    -
    Serializes a model to N3 syntax.
    -
    -
    - setFixBnodes -
    -
    -
    N3Parser::setFixBnodes() in N3Parser.php
    -
    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    -
    -
    - sy -
    -
    -
    RssParser::sy() in RssParser.php
    -
    Adds the sy namespace.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $Tokens -
    -
    -
    N3Parser::$Tokens in N3Parser.php
    -
    -
    - $type -
    -
    -
    RssParser::$type in RssParser.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $use_attributes -
    -
    -
    RdfSerializer::$use_attributes in RdfSerializer.php
    -
    -
    - $use_entities -
    -
    -
    RdfSerializer::$use_entities in RdfSerializer.php
    -
    -
    - $use_xml_declaration -
    -
    - -
    -
    - uparse -
    -
    -
    N3Parser::uparse() in N3Parser.php
    -
    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    -
    -
    - -
    - a - b - c - d - g - i - m - n - o - p - r - s - t - u - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_utility.html.svn-base deleted file mode 100755 index 07e6373b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_utility.html.svn-base +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - - - - - - -

    [utility] element index

    -

    Package indexes

    - -All elements -
    -
    - b - c - e - f - g - h - i - k - m - n - o - p - r - s - t - v - w -
    - - -
    -
    b
    - -
    -
    -
    -
    - buildSortArray -
    -
    -
    ModelComparator::buildSortArray() in ModelComparator.php
    -
    Builds a sorted array.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - compare -
    -
    -
    ModelComparator::compare() in ModelComparator.php
    -
    Compares two models.
    -
    -
    - compareTriples -
    -
    -
    ModelComparator::compareTriples() in ModelComparator.php
    -
    Compares the Triples in the lists.
    -
    -
    - createOrd -
    -
    -
    RDFUtil::createOrd() in RdfUtil.php
    -
    Creates ordinal RDF resource out of an integer.
    -
    -
    - current -
    -
    -
    StatementIterator::current() in StatementIterator.php
    -
    Returns the current statement.
    -
    -
    - current -
    -
    -
    IterFind::current() in IterFind.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    FindIterator::current() in FindIterator.php
    -
    Returns the current matching statement.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - escapeValue -
    -
    -
    RDFUtil::escapeValue() in RdfUtil.php
    -
    Escapes < > and &
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FindIterator -
    -
    -
    FindIterator::FindIterator() in FindIterator.php
    -
    Constructor
    -
    -
    - FindIterator -
    -
    -
    FindIterator in FindIterator.php
    -
    Iterator for traversing statements matching a searchpattern.
    -
    -
    - FindIterator.php -
    -
    -
    FindIterator.php in FindIterator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getLocalName -
    -
    - -
    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    -
    -
    - getNamespace -
    -
    - -
    Extracts the namespace prefix out of the URI of a Resource.
    -
    -
    - getOrd -
    -
    -
    RDFUtil::getOrd() in RdfUtil.php
    -
    Converts an ordinal RDF resource to an integer.
    -
    -
    - getPrefix -
    -
    -
    RDFUtil::getPrefix() in RdfUtil.php
    -
    Short Prefix for known Namespaces by given URI
    -
    -
    - guessName -
    -
    -
    RDFUtil::guessName() in RdfUtil.php
    -
    Delivers the name out of the URI (without the namespace prefix).
    -
    -
    - guessNamespace -
    -
    - -
    Extracts the namespace prefix out of a URI.
    -
    -
    - guessPrefix -
    -
    -
    RDFUtil::guessPrefix() in RdfUtil.php
    -
    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasNext -
    -
    -
    FindIterator::hasNext() in FindIterator.php
    -
    Returns TRUE if there are more matching statements.
    -
    -
    - hasNext -
    -
    -
    StatementIterator::hasNext() in StatementIterator.php
    -
    Returns TRUE if there are more statements.
    -
    -
    - hasPrevious -
    -
    -
    StatementIterator::hasPrevious() in StatementIterator.php
    -
    Returns TRUE if the first statement has not been reached.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - isRDF -
    -
    -
    RDFUtil::isRDF() in RdfUtil.php
    -
    Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    -
    -
    - IterFind -
    -
    -
    IterFind::IterFind() in IterFind.php
    -
    Constructor.
    -
    -
    - IterFind -
    -
    -
    IterFind in IterFind.php
    -
    Implementation of a find-iterator which delivers statements or quads.
    -
    -
    - IterFind.php -
    -
    -
    IterFind.php in IterFind.php
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    IterFind::key() in IterFind.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - ModelComparator -
    -
    -
    ModelComparator in ModelComparator.php
    -
    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.
    -
    -
    - moveFirst -
    -
    -
    StatementIterator::moveFirst() in StatementIterator.php
    -
    Moves the pointer to the first statement.
    -
    -
    - moveLast -
    -
    -
    StatementIterator::moveLast() in StatementIterator.php
    -
    Moves the pointer to the last statement.
    -
    -
    - moveTo -
    -
    -
    StatementIterator::moveTo() in StatementIterator.php
    -
    Moves the pointer to a specific statement.
    -
    -
    - ModelComparator.php -
    -
    -
    ModelComparator.php in ModelComparator.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    StatementIterator::next() in StatementIterator.php
    -
    Returns the next statement.
    -
    -
    - next -
    -
    -
    IterFind::next() in IterFind.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    FindIterator::next() in FindIterator.php
    -
    Returns the next matching statement.
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    FindIterator::$object in FindIterator.php
    -
    -
    - Object -
    -
    -
    Object in Object.php
    -
    An abstract object.
    -
    -
    - Object.php -
    -
    -
    Object.php in Object.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $predicate -
    -
    -
    FindIterator::$predicate in FindIterator.php
    -
    -
    - previous -
    -
    -
    StatementIterator::previous() in StatementIterator.php
    -
    Returns the previous statement.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RDFUtil -
    -
    -
    RDFUtil in RdfUtil.php
    -
    Useful utility methods.
    -
    -
    - renameBlanks -
    -
    -
    ModelComparator::renameBlanks() in ModelComparator.php
    -
    Renames the models Blanknodes.
    -
    -
    - rewind -
    -
    -
    IterFind::rewind() in IterFind.php
    -
    Resets iterator list to start
    -
    -
    - RdfUtil.php -
    -
    -
    RdfUtil.php in RdfUtil.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - StatementIterator -
    -
    - -
    Constructor
    -
    -
    - StatementIterator -
    -
    -
    StatementIterator in StatementIterator.php
    -
    Iterator for traversing models.
    -
    -
    - StatementIterator.php -
    -
    -
    StatementIterator.php in StatementIterator.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    Object::toString() in Object.php
    -
    Serializes a object into a string
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    IterFind::valid() in IterFind.php
    -
    Says if there are additional items left in the list
    -
    -
    - visualizeGraph -
    -
    - -
    Generates a dot-file for drawing graphical output with the
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeHTMLTable -
    -
    - -
    Prints a MemModel as HTML table.
    -
    -
    - -
    - b - c - e - f - g - h - i - k - m - n - o - p - r - s - t - v - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_vocabulary.html.svn-base deleted file mode 100755 index fe50ecd3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/elementindex_vocabulary.html.svn-base +++ /dev/null @@ -1,4332 +0,0 @@ - - - - - - - - - - - - -

    [vocabulary] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - u - v - w - y -
    - - -
    -
    a
    - -
    -
    -
    -
    - ABOUT -
    -
    -
    RDF_RES::ABOUT() in RDF_RES.php
    -
    -
    - ABOUT -
    -
    -
    RDF::ABOUT() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF::ABOUT_EACH() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF_RES::ABOUT_EACH() in RDF_RES.php
    -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABSTRACT_ -
    -
    -
    DC::ABSTRACT_() in DC_C.php
    -
    -
    - ABSTRACT_ -
    -
    -
    DC_RES::ABSTRACT_() in DC_RES.php
    -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF::ACCOUNT_NAME() in FOAF_C.php
    -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF_RES::ACCOUNT_NAME() in FOAF_RES.php
    -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ADR -
    -
    -
    VCARD_RES::ADR() in VCARD_RES.php
    -
    -
    - ADR -
    -
    -
    VCARD::ADR() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    -
    VCARD::ADRPROPERTIES() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    - -
    -
    - ADRTYPES -
    -
    -
    VCARD::ADRTYPES() in VCARD_C.php
    -
    -
    - ADRTYPES -
    -
    -
    VCARD_RES::ADRTYPES() in VCARD_RES.php
    -
    -
    - AGENT -
    -
    -
    FOAF_RES::AGENT() in FOAF_RES.php
    -
    -
    - AGENT -
    -
    -
    FOAF::AGENT() in FOAF_C.php
    -
    -
    - AGENT -
    -
    -
    VCARD_RES::AGENT() in VCARD_RES.php
    -
    -
    - AGENT -
    -
    -
    VCARD::AGENT() in VCARD_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF::AIM_CHAT_ID() in FOAF_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF_RES::AIM_CHAT_ID() in FOAF_RES.php
    -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALT -
    -
    -
    RDF_RES::ALT() in RDF_RES.php
    -
    -
    - ALT -
    -
    -
    RDF::ALT() in RDF_C.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC::ALTERNATIVE() in DC_C.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC_RES::ALTERNATIVE() in DC_RES.php
    -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ATOM -
    -
    -
    ATOM in ATOM_C.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_RES -
    -
    -
    ATOM_RES in ATOM_RES.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - AUDIENCE -
    -
    -
    DC::AUDIENCE() in DC_C.php
    -
    -
    - AUDIENCE -
    -
    -
    DC_RES::AUDIENCE() in DC_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM_RES::AUTHOR() in ATOM_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM::AUTHOR() in ATOM_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC::AVAILABLE() in DC_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC_RES::AVAILABLE() in DC_RES.php
    -
    -
    - ATOM_C.php -
    -
    -
    ATOM_C.php in ATOM_C.php
    -
    -
    - ATOM_RES.php -
    -
    -
    ATOM_RES.php in ATOM_RES.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BAG -
    -
    -
    RDF_RES::BAG() in RDF_RES.php
    -
    -
    - BAG -
    -
    -
    RDF::BAG() in RDF_C.php
    -
    -
    - BAG_ID -
    -
    -
    RDF::BAG_ID() in RDF_C.php
    -
    -
    - BAG_ID -
    -
    -
    RDF_RES::BAG_ID() in RDF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF_RES::BASED_NEAR() in FOAF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF::BASED_NEAR() in FOAF_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD_RES::BDAY() in VCARD_RES.php
    -
    -
    - BDAY -
    -
    -
    VCARD::BDAY() in VCARD_C.php
    -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BOX -
    -
    -
    DC::BOX() in DC_C.php
    -
    -
    - BOX -
    -
    -
    DC_RES::BOX() in DC_RES.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - CARDINALITY -
    -
    -
    OWL::CARDINALITY() in OWL_C.php
    -
    -
    - CARDINALITY -
    -
    -
    OWL_RES::CARDINALITY() in OWL_RES.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD_RES::CATEGORIES() in VCARD_RES.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD::CATEGORIES() in VCARD_C.php
    -
    -
    - CHANNEL -
    -
    -
    RSS::CHANNEL() in RSS_C.php
    -
    -
    - CHANNEL -
    -
    -
    RSS_RES::CHANNEL() in RSS_RES.php
    -
    -
    - COLLECTION -
    -
    -
    DC::COLLECTION() in DC_C.php
    -
    -
    - COLLECTION -
    -
    -
    DC_RES::COLLECTION() in DC_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS_RES::COMMENT() in RDFS_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS::COMMENT() in RDFS_C.php
    -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - CONFORMS_TO -
    -
    -
    DC_RES::CONFORMS_TO() in DC_RES.php
    -
    -
    - CONFORMS_TO -
    -
    -
    DC::CONFORMS_TO() in DC_C.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS_RES::CONTAINER() in RDFS_RES.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS::CONTAINER() in RDFS_C.php
    -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTENT -
    -
    -
    ATOM_RES::CONTENT() in ATOM_RES.php
    -
    -
    - CONTENT -
    -
    -
    ATOM::CONTENT() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM_RES::CONTRIBUTOR() in ATOM_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC::CONTRIBUTOR() in DC_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC_RES::CONTRIBUTOR() in DC_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM::CONTRIBUTOR() in ATOM_C.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM_RES::COPYRIGHT() in ATOM_RES.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM::COPYRIGHT() in ATOM_C.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD_RES::COUNTRY() in VCARD_RES.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD::COUNTRY() in VCARD_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC_RES::COVERAGE() in DC_RES.php
    -
    -
    - COVERAGE -
    -
    -
    DC::COVERAGE() in DC_C.php
    -
    -
    - CREATED -
    -
    -
    DC_RES::CREATED() in DC_RES.php
    -
    -
    - CREATED -
    -
    -
    ATOM_RES::CREATED() in ATOM_RES.php
    -
    -
    - CREATED -
    -
    -
    ATOM::CREATED() in ATOM_C.php
    -
    -
    - CREATED -
    -
    -
    DC::CREATED() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC::CREATOR() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC_RES::CREATOR() in DC_RES.php
    -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DATASET -
    -
    -
    DC_RES::DATASET() in DC_RES.php
    -
    -
    - DATASET -
    -
    -
    DC::DATASET() in DC_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWL_RES::DATATYPE() in OWL_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS::DATATYPE() in RDFS_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDF::DATATYPE() in RDF_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDF_RES::DATATYPE() in RDF_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS_RES::DATATYPE() in RDFS_RES.php
    -
    -
    - DATATYPE -
    -
    -
    OWL::DATATYPE() in OWL_C.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATA_RANGE -
    -
    -
    OWL::DATA_RANGE() in OWL_C.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL_RES::DATA_RANGE() in OWL_RES.php
    -
    -
    - DATE -
    -
    -
    DC::DATE() in DC_C.php
    -
    -
    - DATE -
    -
    -
    DC_RES::DATE() in DC_RES.php
    -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DC -
    -
    -
    DC in DC_C.php
    -
    Dublin Core Vocabulary (Resource)
    -
    -
    - DCMI_TYPE -
    -
    -
    DC::DCMI_TYPE() in DC_C.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC_RES::DCMI_TYPE() in DC_RES.php
    -
    -
    - DC_RES -
    -
    -
    DC_RES in DC_RES.php
    -
    Dublin Core Vocabulary (ResResource)
    -
    -
    - DEPICTION -
    -
    -
    FOAF::DEPICTION() in FOAF_C.php
    -
    -
    - DEPICTION -
    -
    -
    FOAF_RES::DEPICTION() in FOAF_RES.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF::DEPICTS() in FOAF_C.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF_RES::DEPICTS() in FOAF_RES.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DESCRIPTION -
    -
    -
    RDF::DESCRIPTION() in RDF_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC_RES::DESCRIPTION() in DC_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF_RES::DESCRIPTION() in RDF_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC::DESCRIPTION() in DC_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS_RES::DESCRIPTION() in RSS_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS::DESCRIPTION() in RSS_C.php
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF_RES::DNA_CHECKSUM() in FOAF_RES.php
    -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF::DNA_CHECKSUM() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF::DOCUMENT() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF_RES::DOCUMENT() in FOAF_RES.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS_RES::DOMAIN() in RDFS_RES.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS::DOMAIN() in RDFS_C.php
    -
    -
    - DC_C.php -
    -
    -
    DC_C.php in DC_C.php
    -
    -
    - DC_RES.php -
    -
    -
    DC_RES.php in DC_RES.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EMAIL -
    -
    -
    VCARD_RES::EMAIL() in VCARD_RES.php
    -
    -
    - EMAIL -
    -
    -
    ATOM_RES::EMAIL() in ATOM_RES.php
    -
    -
    - EMAIL -
    -
    -
    ATOM::EMAIL() in ATOM_C.php
    -
    -
    - EMAIL -
    -
    -
    VCARD::EMAIL() in VCARD_C.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD_RES::EMAILTYPES() in VCARD_RES.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD::EMAILTYPES() in VCARD_C.php
    -
    -
    - ENTRY -
    -
    -
    ATOM_RES::ENTRY() in ATOM_RES.php
    -
    -
    - ENTRY -
    -
    -
    ATOM::ENTRY() in ATOM_C.php
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EVENT -
    -
    -
    DC_RES::EVENT() in DC_RES.php
    -
    -
    - EVENT -
    -
    -
    DC::EVENT() in DC_C.php
    -
    -
    - EXTADD -
    -
    -
    VCARD::EXTADD() in VCARD_C.php
    -
    -
    - EXTADD -
    -
    -
    VCARD_RES::EXTADD() in VCARD_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC_RES::EXTENT() in DC_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC::EXTENT() in DC_C.php
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FAMILY -
    -
    -
    VCARD_RES::FAMILY() in VCARD_RES.php
    -
    -
    - FAMILY -
    -
    -
    VCARD::FAMILY() in VCARD_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF::FAMILY_NAME() in FOAF_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF_RES::FAMILY_NAME() in FOAF_RES.php
    -
    -
    - FEED -
    -
    -
    ATOM::FEED() in ATOM_C.php
    -
    -
    - FEED -
    -
    -
    ATOM_RES::FEED() in ATOM_RES.php
    -
    -
    - FIRST -
    -
    -
    RDF::FIRST() in RDF_C.php
    -
    -
    - FIRST -
    -
    -
    RDF_RES::FIRST() in RDF_RES.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF_RES::FIRST_NAME() in FOAF_RES.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF::FIRST_NAME() in FOAF_C.php
    -
    -
    - FN -
    -
    -
    VCARD::FN() in VCARD_C.php
    -
    -
    - FN -
    -
    -
    VCARD_RES::FN() in VCARD_RES.php
    -
    -
    - FOAF -
    -
    -
    FOAF in FOAF_C.php
    -
    Friend of a Friend (FOAF) Vocabulary (Resource)
    -
    -
    - FOAF_RES -
    -
    -
    FOAF_RES in FOAF_RES.php
    -
    Friend of a Friend (FOAF) Vocabulary (ResResource)
    -
    -
    - FORMAT -
    -
    -
    DC_RES::FORMAT() in DC_RES.php
    -
    -
    - FORMAT -
    -
    -
    DC::FORMAT() in DC_C.php
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNDED_BY -
    -
    -
    FOAF::FUNDED_BY() in FOAF_C.php
    -
    -
    - FUNDED_BY -
    -
    -
    FOAF_RES::FUNDED_BY() in FOAF_RES.php
    -
    -
    - FOAF.php -
    -
    -
    FOAF.php in FOAF.php
    -
    -
    - FOAF_C.php -
    -
    -
    FOAF_C.php in FOAF_C.php
    -
    -
    - FOAF_RES.php -
    -
    -
    FOAF_RES.php in FOAF_RES.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - GEEKCODE -
    -
    -
    FOAF::GEEKCODE() in FOAF_C.php
    -
    -
    - GEEKCODE -
    -
    -
    FOAF_RES::GEEKCODE() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF::GENDER() in FOAF_C.php
    -
    -
    - GENDER -
    -
    -
    FOAF_RES::GENDER() in FOAF_RES.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM::GENERATOR() in ATOM_C.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM_RES::GENERATOR() in ATOM_RES.php
    -
    -
    - GEO -
    -
    -
    VCARD_RES::GEO() in VCARD_RES.php
    -
    -
    - GEO -
    -
    -
    VCARD::GEO() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD::GIVEN() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD_RES::GIVEN() in VCARD_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF_RES::GIVENNAME() in FOAF_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF::GIVENNAME() in FOAF_C.php
    -
    -
    - GROUP -
    -
    -
    VCARD_RES::GROUP() in VCARD_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF_RES::GROUP() in FOAF_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF::GROUP() in FOAF_C.php
    -
    -
    - GROUP -
    -
    -
    VCARD::GROUP() in VCARD_C.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM::HAS_CHILD() in ATOM_C.php
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM_RES::HAS_CHILD() in ATOM_RES.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM::HAS_ENTRY() in ATOM_C.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM_RES::HAS_ENTRY() in ATOM_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC_RES::HAS_FORMAT() in DC_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC::HAS_FORMAT() in DC_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM_RES::HAS_LINK() in ATOM_RES.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM::HAS_LINK() in ATOM_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC::HAS_PART() in DC_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC_RES::HAS_PART() in DC_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM_RES::HAS_TITLE() in ATOM_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM::HAS_TITLE() in ATOM_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL_RES::HAS_VALUE() in OWL_RES.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL::HAS_VALUE() in OWL_C.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC_RES::HAS_VERSION() in DC_RES.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC::HAS_VERSION() in DC_C.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    - -
    -
    - HOLDS_ACCOUNT -
    -
    -
    FOAF::HOLDS_ACCOUNT() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF::HOMEPAGE() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF_RES::HOMEPAGE() in FOAF_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM_RES::HREF() in ATOM_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM::HREF() in ATOM_C.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF::ICQ_CHAT_ID() in FOAF_C.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF_RES::ICQ_CHAT_ID() in FOAF_RES.php
    -
    -
    - ID -
    -
    -
    RDF_RES::ID() in RDF_RES.php
    -
    -
    - ID -
    -
    -
    RDF::ID() in RDF_C.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC_RES::IDENTIFIER() in DC_RES.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC::IDENTIFIER() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    FOAF_RES::IMAGE() in FOAF_RES.php
    -
    -
    - IMAGE -
    -
    -
    FOAF::IMAGE() in FOAF_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS::IMAGE() in RSS_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS_RES::IMAGE() in RSS_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC_RES::IMAGE() in DC_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC::IMAGE() in DC_C.php
    -
    -
    - IMG -
    -
    -
    FOAF::IMG() in FOAF_C.php
    -
    -
    - IMG -
    -
    -
    FOAF_RES::IMG() in FOAF_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL_RES::IMPORTS() in OWL_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL::IMPORTS() in OWL_C.php
    -
    -
    - IMT -
    -
    -
    DC::IMT() in DC_C.php
    -
    -
    - IMT -
    -
    -
    DC_RES::IMT() in DC_RES.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INFO -
    -
    -
    ATOM_RES::INFO() in ATOM_RES.php
    -
    -
    - INFO -
    -
    -
    ATOM::INFO() in ATOM_C.php
    -
    -
    - INTERACTIVERESOURCE -
    -
    - -
    -
    - INTERACTIVE_RESOURCE -
    -
    - -
    -
    - INTEREST -
    -
    -
    FOAF_RES::INTEREST() in FOAF_RES.php
    -
    -
    - INTEREST -
    -
    -
    FOAF::INTEREST() in FOAF_C.php
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWL_RES::INVERSE_OF() in OWL_RES.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL::INVERSE_OF() in OWL_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC::ISO639_2() in DC_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC_RES::ISO639_2() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC::ISO3166() in DC_C.php
    -
    -
    - ISO3166 -
    -
    -
    DC_RES::ISO3166() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC_RES::ISSUED() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    ATOM_RES::ISSUED() in ATOM_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC::ISSUED() in DC_C.php
    -
    -
    - ISSUED -
    -
    -
    ATOM::ISSUED() in ATOM_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RDFS::IS_DEFINED_BY() in RDFS_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    - -
    -
    - IS_FORMAT_OF -
    -
    - -
    -
    - IS_FORMAT_OF -
    -
    -
    DC::IS_FORMAT_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC::IS_PART_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC_RES::IS_PART_OF() in DC_RES.php
    -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - ITEM -
    -
    -
    RSS_RES::ITEM() in RSS_RES.php
    -
    -
    - ITEM -
    -
    -
    RSS::ITEM() in RSS_C.php
    -
    -
    - ITEMS -
    -
    -
    RSS_RES::ITEMS() in RSS_RES.php
    -
    -
    - ITEMS -
    -
    -
    RSS::ITEMS() in RSS_C.php
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - JABBER_ID -
    -
    -
    FOAF_RES::JABBER_ID() in FOAF_RES.php
    -
    -
    - JABBER_ID -
    -
    -
    FOAF::JABBER_ID() in FOAF_C.php
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - KEY -
    -
    -
    VCARD_RES::KEY() in VCARD_RES.php
    -
    -
    - KEY -
    -
    -
    VCARD::KEY() in VCARD_C.php
    -
    -
    - KNOWS -
    -
    -
    FOAF_RES::KNOWS() in FOAF_RES.php
    -
    -
    - KNOWS -
    -
    -
    FOAF::KNOWS() in FOAF_C.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - LABEL -
    -
    -
    RDFS_RES::LABEL() in RDFS_RES.php
    -
    -
    - LABEL -
    -
    -
    VCARD::LABEL() in VCARD_C.php
    -
    -
    - LABEL -
    -
    -
    RDFS::LABEL() in RDFS_C.php
    -
    -
    - LABEL -
    -
    -
    VCARD_RES::LABEL() in VCARD_RES.php
    -
    -
    - LANG -
    -
    -
    ATOM_RES::LANG() in ATOM_RES.php
    -
    -
    - LANG -
    -
    -
    ATOM::LANG() in ATOM_C.php
    -
    -
    - LANGUAGE -
    -
    -
    DC::LANGUAGE() in DC_C.php
    -
    -
    - LANGUAGE -
    -
    -
    DC_RES::LANGUAGE() in DC_RES.php
    -
    -
    - LCC -
    -
    -
    DC::LCC() in DC_C.php
    -
    -
    - LCC -
    -
    -
    DC_RES::LCC() in DC_RES.php
    -
    -
    - LCSH -
    -
    -
    DC::LCSH() in DC_C.php
    -
    -
    - LCSH -
    -
    -
    DC_RES::LCSH() in DC_RES.php
    -
    -
    - LI -
    -
    -
    RDF::LI() in RDF_C.php
    -
    -
    - LI -
    -
    -
    RDF_RES::LI() in RDF_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC_RES::LICENSE() in DC_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC::LICENSE() in DC_C.php
    -
    -
    - LINK -
    -
    -
    RSS::LINK() in RSS_C.php
    -
    -
    - LINK -
    -
    -
    ATOM::LINK() in ATOM_C.php
    -
    -
    - LINK -
    -
    -
    RSS_RES::LINK() in RSS_RES.php
    -
    -
    - LINK -
    -
    -
    ATOM_RES::LINK() in ATOM_RES.php
    -
    -
    - LITERAL -
    -
    -
    RDFS::LITERAL() in RDFS_C.php
    -
    -
    - LITERAL -
    -
    -
    RDF::LITERAL() in RDF_C.php
    -
    -
    - LITERAL -
    -
    -
    RDFS_RES::LITERAL() in RDFS_RES.php
    -
    -
    - LITERAL -
    -
    -
    RDF_RES::LITERAL() in RDF_RES.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD::LOCALITY() in VCARD_C.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD_RES::LOCALITY() in VCARD_RES.php
    -
    -
    - LOGO -
    -
    -
    FOAF_RES::LOGO() in FOAF_RES.php
    -
    -
    - LOGO -
    -
    -
    FOAF::LOGO() in FOAF_C.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MADE -
    -
    -
    FOAF_RES::MADE() in FOAF_RES.php
    -
    -
    - MADE -
    -
    -
    FOAF::MADE() in FOAF_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD::MAILER() in VCARD_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD_RES::MAILER() in VCARD_RES.php
    -
    -
    - MAKER -
    -
    -
    FOAF::MAKER() in FOAF_C.php
    -
    -
    - MAKER -
    -
    -
    FOAF_RES::MAKER() in FOAF_RES.php
    -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MBOX -
    -
    -
    FOAF_RES::MBOX() in FOAF_RES.php
    -
    -
    - MBOX -
    -
    -
    FOAF::MBOX() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF::MBOX_SHA1SUM() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF_RES::MBOX_SHA1SUM() in FOAF_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC_RES::MEDIATOR() in DC_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC::MEDIATOR() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC::MEDIUM() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC_RES::MEDIUM() in DC_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS_RES::MEMBER() in RDFS_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS::MEMBER() in RDFS_C.php
    -
    -
    - MEMBER -
    -
    -
    FOAF_RES::MEMBER() in FOAF_RES.php
    -
    -
    - MEMBER -
    -
    -
    FOAF::MEMBER() in FOAF_C.php
    -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MESH -
    -
    -
    DC::MESH() in DC_C.php
    -
    -
    - MESH -
    -
    -
    DC_RES::MESH() in DC_RES.php
    -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MODE -
    -
    -
    ATOM_RES::MODE() in ATOM_RES.php
    -
    -
    - MODE -
    -
    -
    ATOM::MODE() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM::MODIFIED() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM_RES::MODIFIED() in ATOM_RES.php
    -
    -
    - MODIFIED -
    -
    -
    DC_RES::MODIFIED() in DC_RES.php
    -
    -
    - MODIFIED -
    -
    -
    DC::MODIFIED() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC::MOVINGIMAGE() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC_RES::MOVINGIMAGE() in DC_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF_RES::MSN_CHAT_ID() in FOAF_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF::MSN_CHAT_ID() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF::MYERS_BRIGGS() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF_RES::MYERS_BRIGGS() in FOAF_RES.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N -
    -
    -
    VCARD::N() in VCARD_C.php
    -
    -
    - N -
    -
    -
    VCARD_RES::N() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS_RES::NAME() in RSS_RES.php
    -
    -
    - NAME -
    -
    -
    VCARD_RES::NAME() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS::NAME() in RSS_C.php
    -
    -
    - NAME -
    -
    -
    FOAF_RES::NAME() in FOAF_RES.php
    -
    -
    - NAME -
    -
    -
    ATOM_RES::NAME() in ATOM_RES.php
    -
    -
    - NAME -
    -
    -
    FOAF::NAME() in FOAF_C.php
    -
    -
    - NAME -
    -
    -
    VCARD::NAME() in VCARD_C.php
    -
    -
    - NAME -
    -
    -
    ATOM::NAME() in ATOM_C.php
    -
    -
    - NICK -
    -
    -
    FOAF_RES::NICK() in FOAF_RES.php
    -
    -
    - NICK -
    -
    -
    FOAF::NICK() in FOAF_C.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD_RES::NICKNAME() in VCARD_RES.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD::NICKNAME() in VCARD_C.php
    -
    -
    - NIL -
    -
    -
    RDF_RES::NIL() in RDF_RES.php
    -
    -
    - NIL -
    -
    -
    RDF::NIL() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF::NODE_ID() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF_RES::NODE_ID() in RDF_RES.php
    -
    -
    - NOTHING -
    -
    -
    OWL::NOTHING() in OWL_C.php
    -
    -
    - NOTHING -
    -
    -
    OWL_RES::NOTHING() in OWL_RES.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD_RES::NPROPERTIES() in VCARD_RES.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD::NPROPERTIES() in VCARD_C.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - OBJECT -
    -
    -
    RDF_RES::OBJECT() in RDF_RES.php
    -
    -
    - OBJECT -
    -
    -
    RDF::OBJECT() in RDF_C.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWL::OBJECT_CLASS() in OWL_C.php
    -
    -
    - OBJECT_CLASS -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWL_RES::ONE_OF() in OWL_RES.php
    -
    -
    - ONE_OF -
    -
    -
    OWL::ONE_OF() in OWL_C.php
    -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONTOLOGY -
    -
    -
    OWL_RES::ONTOLOGY() in OWL_RES.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL::ONTOLOGY() in OWL_C.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL_RES::ON_PROPERTY() in OWL_RES.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL::ON_PROPERTY() in OWL_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF::ORGANIZATION() in FOAF_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF_RES::ORGANIZATION() in FOAF_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD::ORGNAME() in VCARD_C.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD_RES::ORGNAME() in VCARD_RES.php
    -
    -
    - ORGPROPERTIES -
    -
    -
    VCARD::ORGPROPERTIES() in VCARD_C.php
    -
    -
    - ORGPROPERTIES -
    -
    - -
    -
    - ORGUNIT -
    -
    -
    VCARD_RES::ORGUNIT() in VCARD_RES.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD::ORGUNIT() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD::OTHER() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD_RES::OTHER() in VCARD_RES.php
    -
    -
    - OWL -
    -
    -
    OWL in OWL_C.php
    -
    OWL Vocabulary (Resource)
    -
    -
    - OWL_CLASS -
    -
    -
    OWL::OWL_CLASS() in OWL_C.php
    -
    -
    - OWL_CLASS -
    -
    -
    OWL_RES::OWL_CLASS() in OWL_RES.php
    -
    -
    - OWL_RES -
    -
    -
    OWL_RES in OWL_RES.php
    -
    OWL Vocabulary (ResResource)
    -
    -
    - OWL.php -
    -
    -
    OWL.php in OWL.php
    -
    -
    - OWL_C.php -
    -
    -
    OWL_C.php in OWL_C.php
    -
    -
    - OWL_RES.php -
    -
    -
    OWL_RES.php in OWL_RES.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - PAGE -
    -
    -
    FOAF::PAGE() in FOAF_C.php
    -
    -
    - PAGE -
    -
    -
    FOAF_RES::PAGE() in FOAF_RES.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF_RES::PARSE_TYPE() in RDF_RES.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF::PARSE_TYPE() in RDF_C.php
    -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PAST_PROJECT -
    -
    -
    FOAF_RES::PAST_PROJECT() in FOAF_RES.php
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF::PAST_PROJECT() in FOAF_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD_RES::PCODE() in VCARD_RES.php
    -
    -
    - PCODE -
    -
    -
    VCARD::PCODE() in VCARD_C.php
    -
    -
    - PERIOD -
    -
    -
    DC::PERIOD() in DC_C.php
    -
    -
    - PERIOD -
    -
    -
    DC_RES::PERIOD() in DC_RES.php
    -
    -
    - PERSON -
    -
    -
    ATOM::PERSON() in ATOM_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF::PERSON() in FOAF_C.php
    -
    -
    - PERSON -
    -
    -
    ATOM_RES::PERSON() in ATOM_RES.php
    -
    -
    - PERSON -
    -
    -
    FOAF_RES::PERSON() in FOAF_RES.php
    -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PHONE -
    -
    -
    FOAF_RES::PHONE() in FOAF_RES.php
    -
    -
    - PHONE -
    -
    -
    FOAF::PHONE() in FOAF_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD_RES::PHOTO() in VCARD_RES.php
    -
    -
    - PHOTO -
    -
    -
    VCARD::PHOTO() in VCARD_C.php
    -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PLAN -
    -
    -
    FOAF_RES::PLAN() in FOAF_RES.php
    -
    -
    - PLAN -
    -
    -
    FOAF::PLAN() in FOAF_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD::POBOX() in VCARD_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD_RES::POBOX() in VCARD_RES.php
    -
    -
    - POINT -
    -
    -
    DC_RES::POINT() in DC_RES.php
    -
    -
    - POINT -
    -
    -
    DC::POINT() in DC_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF::PREDICATE() in RDF_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF_RES::PREDICATE() in RDF_RES.php
    -
    -
    - PREFIX -
    -
    -
    VCARD::PREFIX() in VCARD_C.php
    -
    -
    - PREFIX -
    -
    -
    VCARD_RES::PREFIX() in VCARD_RES.php
    -
    -
    - PRIMARY_TOPIC -
    -
    -
    FOAF::PRIMARY_TOPIC() in FOAF_C.php
    -
    -
    - PRIMARY_TOPIC -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRODID -
    -
    -
    VCARD::PRODID() in VCARD_C.php
    -
    -
    - PRODID -
    -
    -
    VCARD_RES::PRODID() in VCARD_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF::PROJECT() in FOAF_C.php
    -
    -
    - PROJECT -
    -
    -
    FOAF_RES::PROJECT() in FOAF_RES.php
    -
    -
    - PROPERTY -
    -
    -
    OWL::PROPERTY() in OWL_C.php
    -
    -
    - PROPERTY -
    -
    -
    OWL_RES::PROPERTY() in OWL_RES.php
    -
    -
    - PROPERTY -
    -
    -
    RDF::PROPERTY() in RDF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF_RES::PROPERTY() in RDF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF_RES::PUBLICATIONS() in FOAF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF::PUBLICATIONS() in FOAF_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC::PUBLISHER() in DC_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC_RES::PUBLISHER() in DC_RES.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RANGE -
    -
    -
    RDFS_RES::RANGE() in RDFS_RES.php
    -
    -
    - RANGE -
    -
    -
    RDFS::RANGE() in RDFS_C.php
    -
    -
    - RDF -
    -
    -
    RDF in RDF_C.php
    -
    Resource Description Framework (RDF) Vocabulary (Resource)
    -
    -
    - RDFS -
    -
    -
    RDFS in RDFS_C.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS::RDFS_CLASS() in RDFS_C.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_RES::RDFS_CLASS() in RDFS_RES.php
    -
    -
    - RDFS_RES -
    -
    -
    RDFS_RES in RDFS_RES.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    -
    -
    - RDF_LIST -
    -
    -
    RDF_RES::RDF_LIST() in RDF_RES.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF::RDF_LIST() in RDF_C.php
    -
    -
    - RDF_RES -
    -
    -
    RDF_RES in RDF_RES.php
    -
    Resource Description Framework (RDF) Vocabulary (ResResource)
    -
    -
    - REFERENCES -
    -
    -
    DC_RES::REFERENCES() in DC_RES.php
    -
    -
    - REFERENCES -
    -
    -
    DC::REFERENCES() in DC_C.php
    -
    -
    - REGION -
    -
    -
    VCARD_RES::REGION() in VCARD_RES.php
    -
    -
    - REGION -
    -
    -
    VCARD::REGION() in VCARD_C.php
    -
    -
    - REL -
    -
    -
    ATOM::REL() in ATOM_C.php
    -
    -
    - REL -
    -
    -
    ATOM_RES::REL() in ATOM_RES.php
    -
    -
    - REPLACES -
    -
    -
    DC::REPLACES() in DC_C.php
    -
    -
    - REPLACES -
    -
    -
    DC_RES::REPLACES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC_RES::REQUIRES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC::REQUIRES() in DC_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF_RES::RESOURCE() in RDF_RES.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS::RESOURCE() in RDFS_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF::RESOURCE() in RDF_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS_RES::RESOURCE() in RDFS_RES.php
    -
    -
    - REST -
    -
    -
    RDF_RES::REST() in RDF_RES.php
    -
    -
    - REST -
    -
    -
    RDF::REST() in RDF_C.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL_RES::RESTRICTION() in OWL_RES.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL::RESTRICTION() in OWL_C.php
    -
    -
    - REV -
    -
    -
    VCARD_RES::REV() in VCARD_RES.php
    -
    -
    - REV -
    -
    -
    VCARD::REV() in VCARD_C.php
    -
    -
    - RFC1766 -
    -
    -
    DC_RES::RFC1766() in DC_RES.php
    -
    -
    - RFC1766 -
    -
    -
    DC::RFC1766() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC_RES::RFC3066() in DC_RES.php
    -
    -
    - RFC3066 -
    -
    -
    DC::RFC3066() in DC_C.php
    -
    -
    - RIGHTS -
    -
    -
    DC_RES::RIGHTS() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC::RIGHTS() in DC_C.php
    -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - ROLE -
    -
    -
    VCARD::ROLE() in VCARD_C.php
    -
    -
    - ROLE -
    -
    -
    VCARD_RES::ROLE() in VCARD_RES.php
    -
    -
    - RSS -
    -
    -
    RSS in RSS_C.php
    -
    RSS Vocabulary (Resource)
    -
    -
    - RSS_RES -
    -
    -
    RSS_RES in RSS_RES.php
    -
    RSS Vocabulary (ResResource)
    -
    -
    - RDF.php -
    -
    -
    RDF.php in RDF.php
    -
    -
    - RDFS.php -
    -
    -
    RDFS.php in RDFS.php
    -
    -
    - RDFS_C.php -
    -
    -
    RDFS_C.php in RDFS_C.php
    -
    -
    - RDFS_RES.php -
    -
    -
    RDFS_RES.php in RDFS_RES.php
    -
    -
    - RDF_C.php -
    -
    -
    RDF_C.php in RDF_C.php
    -
    -
    - RDF_RES.php -
    -
    -
    RDF_RES.php in RDF_RES.php
    -
    -
    - RSS.php -
    -
    -
    RSS.php in RSS.php
    -
    -
    - RSS_C.php -
    -
    -
    RSS_C.php in RSS_C.php
    -
    -
    - RSS_RES.php -
    -
    -
    RSS_RES.php in RSS_RES.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - SAME_AS -
    -
    -
    OWL::SAME_AS() in OWL_C.php
    -
    -
    - SAME_AS -
    -
    -
    OWL_RES::SAME_AS() in OWL_RES.php
    -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SEEALSO -
    -
    -
    RDFS::SEEALSO() in RDFS_C.php
    -
    -
    - SEEALSO -
    -
    -
    RDFS_RES::SEEALSO() in RDFS_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF_RES::SEE_ALSO() in RDF_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF::SEE_ALSO() in RDF_C.php
    -
    -
    - SEQ -
    -
    -
    RDF::SEQ() in RDF_C.php
    -
    -
    - SEQ -
    -
    -
    RDF_RES::SEQ() in RDF_RES.php
    -
    -
    - SERVICE -
    -
    -
    DC::SERVICE() in DC_C.php
    -
    -
    - SERVICE -
    -
    -
    DC_RES::SERVICE() in DC_RES.php
    -
    -
    - SHA1 -
    -
    -
    FOAF_RES::SHA1() in FOAF_RES.php
    -
    -
    - SHA1 -
    -
    -
    FOAF::SHA1() in FOAF_C.php
    -
    -
    - SOFTWARE -
    -
    -
    DC_RES::SOFTWARE() in DC_RES.php
    -
    -
    - SOFTWARE -
    -
    -
    DC::SOFTWARE() in DC_C.php
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SORT_STRING -
    -
    -
    VCARD_RES::SORT_STRING() in VCARD_RES.php
    -
    -
    - SORT_STRING -
    -
    -
    VCARD::SORT_STRING() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    DC_RES::SOUND() in DC_RES.php
    -
    -
    - SOUND -
    -
    -
    VCARD::SOUND() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    DC::SOUND() in DC_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD_RES::SOUND() in VCARD_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD::SOURCE() in VCARD_C.php
    -
    -
    - SOURCE -
    -
    -
    DC::SOURCE() in DC_C.php
    -
    -
    - SOURCE -
    -
    -
    DC_RES::SOURCE() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD_RES::SOURCE() in VCARD_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC_RES::SPATIAL() in DC_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC::SPATIAL() in DC_C.php
    -
    -
    - STATEMENT -
    -
    -
    RDF_RES::STATEMENT() in RDF_RES.php
    -
    -
    - STATEMENT -
    -
    -
    RDF::STATEMENT() in RDF_C.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC_RES::STILLIMAGE() in DC_RES.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC::STILLIMAGE() in DC_C.php
    -
    -
    - STREET -
    -
    -
    VCARD::STREET() in VCARD_C.php
    -
    -
    - STREET -
    -
    -
    VCARD_RES::STREET() in VCARD_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF_RES::SUBJECT() in RDF_RES.php
    -
    -
    - SUBJECT -
    -
    -
    DC::SUBJECT() in DC_C.php
    -
    -
    - SUBJECT -
    -
    -
    RDF::SUBJECT() in RDF_C.php
    -
    -
    - SUBJECT -
    -
    -
    DC_RES::SUBJECT() in DC_RES.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS::SUB_CLASS_OF() in RDFS_C.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS_RES::SUB_CLASS_OF() in RDFS_RES.php
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUFFIX -
    -
    -
    VCARD::SUFFIX() in VCARD_C.php
    -
    -
    - SUFFIX -
    -
    -
    VCARD_RES::SUFFIX() in VCARD_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM_RES::SUMMARY() in ATOM_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM::SUMMARY() in ATOM_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF::SURNAME() in FOAF_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF_RES::SURNAME() in FOAF_RES.php
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TAGLINE -
    -
    -
    ATOM_RES::TAGLINE() in ATOM_RES.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM::TAGLINE() in ATOM_C.php
    -
    -
    - TEL -
    -
    -
    VCARD::TEL() in VCARD_C.php
    -
    -
    - TEL -
    -
    -
    VCARD_RES::TEL() in VCARD_RES.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD_RES::TELTYPES() in VCARD_RES.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD::TELTYPES() in VCARD_C.php
    -
    -
    - TEMPORAL -
    -
    -
    DC_RES::TEMPORAL() in DC_RES.php
    -
    -
    - TEMPORAL -
    -
    -
    DC::TEMPORAL() in DC_C.php
    -
    -
    - TEXT -
    -
    -
    DC_RES::TEXT() in DC_RES.php
    -
    -
    - TEXT -
    -
    -
    DC::TEXT() in DC_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS::TEXTINPUT() in RSS_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS_RES::TEXTINPUT() in RSS_RES.php
    -
    -
    - TGN -
    -
    -
    DC_RES::TGN() in DC_RES.php
    -
    -
    - TGN -
    -
    -
    DC::TGN() in DC_C.php
    -
    -
    - THEME -
    -
    -
    FOAF::THEME() in FOAF_C.php
    -
    -
    - THEME -
    -
    -
    FOAF_RES::THEME() in FOAF_RES.php
    -
    -
    - THING -
    -
    -
    OWL_RES::THING() in OWL_RES.php
    -
    -
    - THING -
    -
    -
    OWL::THING() in OWL_C.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF::THUMBNAIL() in FOAF_C.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF_RES::THUMBNAIL() in FOAF_RES.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF::TIPJAR() in FOAF_C.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF_RES::TIPJAR() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD_RES::TITLE() in VCARD_RES.php
    -
    -
    - TITLE -
    -
    -
    ATOM::TITLE() in ATOM_C.php
    -
    -
    - TITLE -
    -
    -
    ATOM_RES::TITLE() in ATOM_RES.php
    -
    -
    - TITLE -
    -
    -
    RSS::TITLE() in RSS_C.php
    -
    -
    - TITLE -
    -
    -
    RSS_RES::TITLE() in RSS_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD::TITLE() in VCARD_C.php
    -
    -
    - TITLE -
    -
    -
    FOAF_RES::TITLE() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    FOAF::TITLE() in FOAF_C.php
    -
    -
    - TITLE -
    -
    -
    DC::TITLE() in DC_C.php
    -
    -
    - TITLE -
    -
    -
    DC_RES::TITLE() in DC_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF_RES::TOPIC() in FOAF_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF::TOPIC() in FOAF_C.php
    -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TYPE -
    -
    -
    ATOM::TYPE() in ATOM_C.php
    -
    -
    - TYPE -
    -
    -
    DC_RES::TYPE() in DC_RES.php
    -
    -
    - TYPE -
    -
    -
    DC::TYPE() in DC_C.php
    -
    -
    - TYPE -
    -
    -
    RDF::TYPE() in RDF_C.php
    -
    -
    - TYPE -
    -
    -
    ATOM_RES::TYPE() in ATOM_RES.php
    -
    -
    - TYPE -
    -
    -
    RDF_RES::TYPE() in RDF_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD_RES::TZ() in VCARD_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD::TZ() in VCARD_C.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD_RES::TZTYPES() in VCARD_RES.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD::TZTYPES() in VCARD_C.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - UDC -
    -
    -
    DC_RES::UDC() in DC_RES.php
    -
    -
    - UDC -
    -
    -
    DC::UDC() in DC_C.php
    -
    -
    - UID -
    -
    -
    VCARD_RES::UID() in VCARD_RES.php
    -
    -
    - UID -
    -
    -
    VCARD::UID() in VCARD_C.php
    -
    -
    - UNION_OF -
    -
    -
    OWL_RES::UNION_OF() in OWL_RES.php
    -
    -
    - UNION_OF -
    -
    -
    OWL::UNION_OF() in OWL_C.php
    -
    -
    - URI -
    -
    -
    DC_RES::URI() in DC_RES.php
    -
    -
    - URI -
    -
    -
    DC::URI() in DC_C.php
    -
    -
    - URL -
    -
    -
    ATOM_RES::URL() in ATOM_RES.php
    -
    -
    - URL -
    -
    -
    RSS_RES::URL() in RSS_RES.php
    -
    -
    - URL -
    -
    -
    RSS::URL() in RSS_C.php
    -
    -
    - URL -
    -
    -
    ATOM::URL() in ATOM_C.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VALID -
    -
    -
    DC::VALID() in DC_C.php
    -
    -
    - VALID -
    -
    -
    DC_RES::VALID() in DC_RES.php
    -
    -
    - VALUE -
    -
    -
    ATOM_RES::VALUE() in ATOM_RES.php
    -
    -
    - VALUE -
    -
    -
    ATOM::VALUE() in ATOM_C.php
    -
    -
    - VCARD -
    -
    -
    VCARD in VCARD_C.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (Resource)
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD_RES::VCARD_CLASS() in VCARD_RES.php
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD::VCARD_CLASS() in VCARD_C.php
    -
    -
    - VCARD_RES -
    -
    -
    VCARD_RES in VCARD_RES.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    -
    -
    - VERSION -
    -
    -
    ATOM_RES::VERSION() in ATOM_RES.php
    -
    -
    - VERSION -
    -
    -
    ATOM::VERSION() in ATOM_C.php
    -
    -
    - VERSION_INFO -
    -
    -
    OWL::VERSION_INFO() in OWL_C.php
    -
    -
    - VERSION_INFO -
    -
    - -
    -
    - VCARD.php -
    -
    -
    VCARD.php in VCARD.php
    -
    -
    - VCARD_C.php -
    -
    -
    VCARD_C.php in VCARD_C.php
    -
    -
    - VCARD_RES.php -
    -
    -
    VCARD_RES.php in VCARD_RES.php
    -
    -
    - Vocabulary.php -
    -
    -
    Vocabulary.php in Vocabulary.php
    -
    -
    - VocabularyClass.php -
    -
    -
    VocabularyClass.php in VocabularyClass.php
    -
    -
    - VocabularyRes.php -
    -
    -
    VocabularyRes.php in VocabularyRes.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - W3CDTF -
    -
    -
    DC_RES::W3CDTF() in DC_RES.php
    -
    -
    - W3CDTF -
    -
    -
    DC::W3CDTF() in DC_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF::WEBLOG() in FOAF_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF_RES::WEBLOG() in FOAF_RES.php
    -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - -
    -
    y
    - -
    -
    -
    -
    - YAHOO_CHAT_ID -
    -
    - -
    -
    - YAHOO_CHAT_ID -
    -
    -
    FOAF::YAHOO_CHAT_ID() in FOAF_C.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - u - v - w - y -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/errors.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/errors.html.svn-base deleted file mode 100755 index 44032653..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/errors.html.svn-base +++ /dev/null @@ -1,747 +0,0 @@ - - - - - - phpDocumentor Parser Errors and Warnings - - - - - -Post-parsing
    -ATOM_RES.php
    -Blanknode.php
    -ClientQuery.php
    -constants.php
    -Constraint.php
    -Dataset.php
    -DatasetDb.php
    -DatasetMem.php
    -DatasetP.php
    -DBase.php
    -DbModel.php
    -DbStore.php
    -DC.php
    -DC_C.php
    -DC_RES.php
    -Default.php
    -FilterGenerator.php
    -FindIterator.php
    -FOAF_C.php
    -FOAF_RES.php
    -GraphPattern.php
    -GRDDLParser.php
    -HTML.php
    -Individual.php
    -InfModel.php
    -InfModelB.php
    -InfModelF.php
    -InfModelP.php
    -InfRule.php
    -InfStatement.php
    -IteratorAllGraphsDb.php
    -IteratorAllGraphsMem.php
    -IteratorFindQuadsDb.php
    -IteratorFindQuadsMem.php
    -IterFind.php
    -Literal.php
    -magpie_debug.php
    -magpie_simple.php
    -magpie_slashbox.php
    -MemModel.php
    -Model.php
    -ModelComparator.php
    -ModelFactory.php
    -ModelP.php
    -modifier.rss_date_parse.php
    -N3Parser.php
    -N3Serializer.php
    -NamedGraphDb.php
    -NamedGraphMem.php
    -Node.php
    -NTripleSerializer.php
    -Object.php
    -Offsetter.php
    -OntClass.php
    -OntModel.php
    -OntModelP.php
    -OntProperty.php
    -OntResource.php
    -OntVocabulary.php
    -OWLVocabulary.php
    -OWL_C.php
    -OWL_RES.php
    -Preparator.php
    -PreparedStatement.php
    -Quad.php
    -Query.php
    -QueryTriple.php
    -RdfAPI.php
    -RdfParser.php
    -RdfSerializer.php
    -RdfsVocabulary.php
    -RDFS_C.php
    -RDFS_RES.php
    -RdfUtil.php
    -RDF_C.php
    -RDF_RES.php
    -RDQL.php
    -RdqlDbEngine.php
    -RdqlEngine.php
    -RdqlMemEngine.php
    -RdqlParser.php
    -RdqlResultIterator.php
    -ResAlt.php
    -ResBag.php
    -ResContainer.php
    -ResList.php
    -ResLiteral.php
    -ResModel.php
    -ResModelP.php
    -Resource.php
    -ResProperty.php
    -ResSeq.php
    -ResultConverter.php
    -ResultRenderer.php
    -RssParser.php
    -RSS_C.php
    -rss_cache.inc
    -rss_fetch.inc
    -rss_parse.inc
    -RSS_RES.php
    -rss_utils.inc
    -simple_smarty.php
    -Snoopy.class.inc
    -SPARQL.php
    -SparqlClient.php
    -SparqlEngine.php
    -SparqlEngineDb.php
    -SparqlParser.php
    -SparqlParserException.php
    -SparqlResultParser.php
    -SqlGenerator.php
    -SqlGeneratorException.php
    -SqlMerger.php
    -Statement.php
    -StatementIterator.php
    -SyntaxGRDDL.php
    -SyntaxN3.php
    -SyntaxRDF.php
    -SyntaxRSS.php
    -SyntaxSparqlRes.php
    -TriXParser.php
    -TriXSerializer.php
    -TypeSorter.php
    -Utility.php
    -VCARD_C.php
    -VCARD_RES.php
    -Vocabulary.php
    -VocabularyClass.php
    -VocabularyRes.php
    -XML.php
    - -

    Post-parsing

    -

    Warnings:


    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\simple_smarty.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_slashbox.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_simple.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_debug.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - class SparqlParserException in package sparql parent not found in @see parent::__construct()
    -Warning - class SparqlParserException in package sparql parent not found in @see parent::__construct()
    - -

    ATOM_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ATOM", use another DocBlock to document the file
    - -

    ATOM_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ATOM_RES", use another DocBlock to document the file
    - -

    Blanknode.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "BlankNode", use another DocBlock to document the file
    -Warning on line 22 - Unknown tag "@authors" used
    - -

    ClientQuery.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ClientQuery", use another DocBlock to document the file
    - -

    constants.php

    -

    Warnings:


    -Warning on line 285 - -duplicate define element "ADODB_DB_DRIVER" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 286 - -duplicate define element "ADODB_DB_HOST" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 287 - -duplicate define element "ADODB_DB_NAME" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 288 - -duplicate define element "ADODB_DB_USER" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 289 - -duplicate define element "ADODB_DB_PASSWORD" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 415 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Constraint.php

    -

    Warnings:


    -Warning on line 93 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\Constraint.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Dataset.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "Dataset", use another DocBlock to document the file
    - -

    DatasetDb.php

    -

    Warnings:


    -Warning on line 22 - no @package tag was used in a DocBlock for class DatasetDb
    -Warning on line 443 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetDb.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -

    Errors:


    -Error on line 19 - require_once include's DocBlock has @package tag, illegal. ignoring tag "@package dataset"
    - -

    DatasetMem.php

    -

    Warnings:


    -Warning on line 393 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DatasetP.php

    -

    Warnings:


    -Warning on line 24 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DBase.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DBase.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DbModel.php

    -

    Warnings:


    -Warning on line 1301 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DbModel.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DbStore.php

    -

    Warnings:


    -Warning on line 707 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DbStore.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DC.php

    -

    Warnings:


    -Warning on line 79 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\vocabulary\DC.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DC_C.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "DC", use another DocBlock to document the file
    - -

    DC_RES.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "DC_RES", use another DocBlock to document the file
    - -

    Default.php

    -

    Warnings:


    -Warning on line 260 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\Default.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 333 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\Default.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    FilterGenerator.php

    -

    Warnings:


    -Warning on line 10 - DocBlock would be page-level, but precedes class "SparqlEngineDb_FilterGenerator", use another DocBlock to document the file
    -Warning on line 819 - no @package tag was used in a DocBlock for class SparqlEngineDb_FilterGenerator_Value
    - -

    FindIterator.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "FindIterator", use another DocBlock to document the file
    - -

    FOAF_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "FOAF", use another DocBlock to document the file
    - -

    FOAF_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "FOAF_RES", use another DocBlock to document the file
    - -

    GraphPattern.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "GraphPattern", use another DocBlock to document the file
    - -

    GRDDLParser.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "GRDDLParser", use another DocBlock to document the file
    - -

    HTML.php

    -

    Warnings:


    -Warning on line 197 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\HTML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 291 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\HTML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Individual.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "Individual", use another DocBlock to document the file
    - -

    InfModel.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "InfModel", use another DocBlock to document the file
    - -

    InfModelB.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "InfModelB", use another DocBlock to document the file
    - -

    InfModelF.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "InfModelF", use another DocBlock to document the file
    - -

    InfModelP.php

    -

    Warnings:


    -Warning on line 18 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\infModel\InfModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    InfRule.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "InfRule", use another DocBlock to document the file
    - -

    InfStatement.php

    -

    Warnings:


    -Warning on line 13 - DocBlock would be page-level, but precedes class "InfStatement", use another DocBlock to document the file
    - -

    IteratorAllGraphsDb.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "IteratorAllGraphsDb", use another DocBlock to document the file
    - -

    IteratorAllGraphsMem.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "IteratorAllGraphsMem", use another DocBlock to document the file
    - -

    IteratorFindQuadsDb.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "IteratorFindQuadsDb", use another DocBlock to document the file
    - -

    IteratorFindQuadsMem.php

    -

    Warnings:


    -Warning on line 216 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\IteratorFindQuadsMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    IterFind.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "IterFind", use another DocBlock to document the file
    - -

    Literal.php

    -

    Warnings:


    -Warning on line 171 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Literal.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_debug.php

    -

    Warnings:


    -Warning on line 79 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_debug.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_simple.php

    -

    Warnings:


    -Warning on line 28 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_simple.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_slashbox.php

    -

    Warnings:


    -Warning on line 65 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_slashbox.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    MemModel.php

    -

    Warnings:


    -Warning on line 1459 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\MemModel.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Model.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "Model", use another DocBlock to document the file
    - -

    ModelComparator.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "ModelComparator", use another DocBlock to document the file
    - -

    ModelFactory.php

    -

    Warnings:


    -Warning on line 287 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\ModelFactory.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ModelP.php

    -

    Warnings:


    -Warning on line 26 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\ModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    modifier.rss_date_parse.php

    -

    Warnings:


    -Warning on line 30 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\smarty_plugin\modifier.rss_date_parse.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    N3Parser.php

    -

    Warnings:


    -Warning on line 645 - Unknown tag "@acces" used
    -Warning on line 1056 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\N3Parser.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    N3Serializer.php

    -

    Warnings:


    -Warning on line 31 - Page-level DocBlock precedes "define MAGIC_STRING", use another DocBlock to document the source element
    -Warning on line 33 - no @package tag was used in a DocBlock for class N3Serializer
    - -

    NamedGraphDb.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "NamedGraphDb", use another DocBlock to document the file
    - -

    NamedGraphMem.php

    -

    Warnings:


    -Warning on line 65 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\NamedGraphMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Node.php

    -

    Warnings:


    -Warning on line 24 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Node.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    NTripleSerializer.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "NTripleSerializer", use another DocBlock to document the file
    -

    Errors:


    -Error on line 98 - DocBlock has multiple @access tags, illegal. ignoring additional tag "@access public"
    - -

    Object.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "Object", use another DocBlock to document the file
    - -

    Offsetter.php

    -

    Warnings:


    -Warning on line 100 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\Offsetter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    OntClass.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "OntClass", use another DocBlock to document the file
    - -

    OntModel.php

    -

    Warnings:


    -Warning on line 32 - DocBlock would be page-level, but precedes class "OntModel", use another DocBlock to document the file
    - -

    OntModelP.php

    -

    Warnings:


    -Warning on line 14 - Page-level DocBlock precedes "include_once RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL", use another DocBlock to document the source element
    - -

    OntProperty.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "OntProperty", use another DocBlock to document the file
    - -

    OntResource.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "OntResource", use another DocBlock to document the file
    - -

    OntVocabulary.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "OntVocabulary", use another DocBlock to document the file
    - -

    OWLVocabulary.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "OWLVocabulary", use another DocBlock to document the file
    - -

    OWL_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "OWL", use another DocBlock to document the file
    - -

    OWL_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "OWL_RES", use another DocBlock to document the file
    - -

    Preparator.php

    -

    Warnings:


    -Warning on line 227 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\Preparator.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    PreparedStatement.php

    -

    Warnings:


    -Warning on line 8 - DocBlock would be page-level, but precedes class "SparqlEngine_PreparedStatement", use another DocBlock to document the file
    -Warning on line 36 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\PreparedStatement.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Quad.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "Quad", use another DocBlock to document the file
    - -

    Query.php

    -

    Warnings:


    -Warning on line 32 - example file "array(8) { - ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#" - ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#" - }" does not exist
    -Warning on line 516 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\Query.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    QueryTriple.php

    -

    Warnings:


    -Warning on line 95 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\QueryTriple.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdfAPI.php

    -

    Warnings:


    -Warning on line 18 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\RdfAPI.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdfParser.php

    -

    Warnings:


    -Warning on line 27 - DocBlock would be page-level, but precedes class "RdfParser", use another DocBlock to document the file
    - -

    RdfSerializer.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RdfSerializer", use another DocBlock to document the file
    - -

    RdfsVocabulary.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "RdfsVocabulary", use another DocBlock to document the file
    - -

    RDFS_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDFS", use another DocBlock to document the file
    - -

    RDFS_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDFS_RES", use another DocBlock to document the file
    - -

    RdfUtil.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "RDFUtil", use another DocBlock to document the file
    - -

    RDF_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDF", use another DocBlock to document the file
    - -

    RDF_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDF_RES", use another DocBlock to document the file
    - -

    RDQL.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\rdql\RDQL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdqlDbEngine.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RdqlDbEngine", use another DocBlock to document the file
    - -

    RdqlEngine.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "RdqlEngine", use another DocBlock to document the file
    - -

    RdqlMemEngine.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "RdqlMemEngine", use another DocBlock to document the file
    - -

    RdqlParser.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "RdqlParser", use another DocBlock to document the file
    - -

    RdqlResultIterator.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "RdqlResultIterator", use another DocBlock to document the file
    - -

    ResAlt.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResAlt", use another DocBlock to document the file
    - -

    ResBag.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResBag", use another DocBlock to document the file
    - -

    ResContainer.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "ResContainer", use another DocBlock to document the file
    - -

    ResList.php

    -

    Warnings:


    -Warning on line 28 - DocBlock would be page-level, but precedes class "ResList", use another DocBlock to document the file
    - -

    ResLiteral.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "ResLiteral", use another DocBlock to document the file
    - -

    ResModel.php

    -

    Warnings:


    -Warning on line 26 - DocBlock would be page-level, but precedes class "ResModel", use another DocBlock to document the file
    - -

    ResModelP.php

    -

    Warnings:


    -Warning on line 23 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\resModel\ResModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Resource.php

    -

    Warnings:


    -Warning on line 130 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Resource.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ResProperty.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "ResProperty", use another DocBlock to document the file
    - -

    ResSeq.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResSeq", use another DocBlock to document the file
    - -

    ResultConverter.php

    -

    Warnings:


    -Warning on line 113 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultConverter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 113 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultConverter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ResultRenderer.php

    -

    Warnings:


    -Warning on line 13 - DocBlock would be page-level, but precedes class "SparqlEngineDb_ResultRenderer", use another DocBlock to document the file
    -Warning on line 13 - DocBlock would be page-level, but precedes class "SparqlEngine_ResultRenderer", use another DocBlock to document the file
    - -

    RssParser.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RssParser", use another DocBlock to document the file
    - -

    RSS_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RSS", use another DocBlock to document the file
    - -

    rss_cache.inc

    -

    Warnings:


    -Warning on line 18 - no @package tag was used in a DocBlock for class RSSCache
    -Warning on line 199 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_cache.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    rss_fetch.inc

    -

    Warnings:


    -Warning on line 457 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_fetch.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    rss_parse.inc

    -

    Warnings:


    -Warning on line 33 - no @package tag was used in a DocBlock for class MagpieRSS
    -Warning on line 604 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_parse.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RSS_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RSS_RES", use another DocBlock to document the file
    - -

    rss_utils.inc

    -

    Warnings:


    -Warning on line 66 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_utils.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    simple_smarty.php

    -

    Warnings:


    -Warning on line 57 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\simple_smarty.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Snoopy.class.inc

    -

    Warnings:


    -Warning on line 38 - no @package tag was used in a DocBlock for class Snoopy
    -Warning on line 899 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\extlib\Snoopy.class.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SPARQL.php

    -

    Warnings:


    -Warning on line 19 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SPARQL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlClient.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "SparqlClient", use another DocBlock to document the file
    - -

    SparqlEngine.php

    -

    Warnings:


    -Warning on line 1167 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlEngineDb.php

    -

    Warnings:


    -Warning on line 348 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlParser.php

    -

    Warnings:


    -Warning on line 1420 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlParser.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlParserException.php

    -

    Warnings:


    -Warning on line 12 - DocBlock would be page-level, but precedes class "SparqlParserException", use another DocBlock to document the file
    - -

    SparqlResultParser.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "SparqlResultParser", use another DocBlock to document the file
    - -

    SqlGenerator.php

    -

    Warnings:


    -Warning on line 36 - example file " table t2." does not exist
    -Warning on line 50 - example file "array( - '?person' => 't0.subject' - )" does not exist
    -Warning on line 71 - example file "array( - 0 => array( - '?person' => 's', - '?p' => 'o' - ), - 1 => array( - '?person' => 's', - '?mbox' => 'o' - ) - )" does not exist
    -Warning on line 90 - example file "array( - '?person' => array( - 's' => true - ), - '?mbox' => array( - 'o' => true - ) - )" does not exist
    -Warning on line 893 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\SqlGenerator.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SqlGeneratorException.php

    -

    Warnings:


    -Warning on line 9 - DocBlock would be page-level, but precedes class "SparqlEngineDb_SqlGeneratorException", use another DocBlock to document the file
    - -

    SqlMerger.php

    -

    Warnings:


    -Warning on line 10 - DocBlock would be page-level, but precedes class "SparqlEngineDb_SqlMerger", use another DocBlock to document the file
    - -

    Statement.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "Statement", use another DocBlock to document the file
    - -

    StatementIterator.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "StatementIterator", use another DocBlock to document the file
    - -

    SyntaxGRDDL.php

    -

    Warnings:


    -Warning on line 15 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxGRDDL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxN3.php

    -

    Warnings:


    -Warning on line 17 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxN3.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxRDF.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxRDF.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxRSS.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxRSS.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxSparqlRes.php

    -

    Warnings:


    -Warning on line 14 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxSparqlRes.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    TriXParser.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "TriXParser", use another DocBlock to document the file
    - -

    TriXSerializer.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "TriXSerializer", use another DocBlock to document the file
    - -

    TypeSorter.php

    -

    Warnings:


    -Warning on line 9 - DocBlock would be page-level, but precedes class "SparqlEngineDb_TypeSorter", use another DocBlock to document the file
    - -

    Utility.php

    -

    Warnings:


    -Warning on line 19 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\Utility.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    VCARD_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "VCARD", use another DocBlock to document the file
    - -

    VCARD_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "VCARD_RES", use another DocBlock to document the file
    - -

    Vocabulary.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "require_once RDFAPI_INCLUDE_DIR.'vocabulary/RDF.php'", use another DocBlock to document the source element
    - -

    VocabularyClass.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "require_once RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_C.php'", use another DocBlock to document the source element
    - -

    VocabularyRes.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "include_once RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL)", use another DocBlock to document the source element
    - -

    XML.php

    -

    Warnings:


    -Warning on line 123 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\XML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 321 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\XML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/index.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/index.html.svn-base deleted file mode 100755 index 19a1e9cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/index.html.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - RAP - Rdf API for PHP - - - - - - - - - - - <H2>Frame Alert</H2> - <P>This document is designed to be viewed using the frames feature. - If you see this message, you are using a non-frame-capable web client.</P> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_dataset.html.svn-base deleted file mode 100755 index dbb653b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_dataset.html.svn-base +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - -
    dataset
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_default.html.svn-base deleted file mode 100755 index 2a821881..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_default.html.svn-base +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - -
    default
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_infModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_infModel.html.svn-base deleted file mode 100755 index 61679145..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_infModel.html.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -
    infModel
    -
    - -
    - -
    Description
    -
    - Class trees
    - Index of elements
    -
    - - - -
    Interfaces
    -
    Classes
    -
    InfModel
    -
    InfModelB
    -
    InfModelF
    -
    InfRule
    -
    InfStatement
    -
    Files
    -
    InfModel.php
    -
    InfModelB.php
    -
    InfModelF.php
    -
    InfRule.php
    -
    InfStatement.php
    - - -
    -
    -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_model.html.svn-base deleted file mode 100755 index 52b15c9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_model.html.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -
    model
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_ontModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_ontModel.html.svn-base deleted file mode 100755 index 65d38d23..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_ontModel.html.svn-base +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - -
    ontModel
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_rdql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_rdql.html.svn-base deleted file mode 100755 index d004d829..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_rdql.html.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -
    rdql
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_resModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_resModel.html.svn-base deleted file mode 100755 index 89686fd4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_resModel.html.svn-base +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -
    resModel
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql-db.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql-db.html.svn-base deleted file mode 100755 index 668c094d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql-db.html.svn-base +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - -
    sparql-db
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql.html.svn-base deleted file mode 100755 index 443a7a72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_sparql.html.svn-base +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - -
    sparql
    -
    - -
    - -
    Description
    -
    - Class trees
    - Index of elements
    -
    - - - -
    Interfaces
    -
    SparqlEngineDb_ResultRenderer
    -
    SparqlEngine_ResultRenderer
    -
    Classes
    -
    ClientQuery
    -
    Constraint
    -
    GraphPattern
    -
    Query
    -
    QueryTriple
    -
    SparqlClient
    -
    SparqlEngine
    -
    SparqlEngineDb
    -
    SparqlEngineDb_FilterGenerator
    -
    SparqlEngineDb_FilterGenerator_Value
    -
    SparqlEngineDb_Offsetter
    -
    SparqlEngineDb_Preparator
    -
    SparqlEngineDb_PreparedStatement
    -
    SparqlEngineDb_ResultConverter
    -
    SparqlEngineDb_ResultRenderer_Default
    -
    SparqlEngineDb_ResultRenderer_HTML
    -
    SparqlEngineDb_ResultRenderer_XML
    -
    SparqlEngineDb_SqlGenerator
    -
    SparqlEngineDb_SqlGeneratorException
    -
    SparqlEngineDb_SqlMerger
    -
    SparqlEngineDb_TypeSorter
    -
    SparqlEngine_PreparedStatement
    -
    SparqlEngine_ResultConverter
    -
    SparqlEngine_ResultRenderer_Default
    -
    SparqlEngine_ResultRenderer_HTML
    -
    SparqlEngine_ResultRenderer_XML
    -
    SparqlParser
    -
    SparqlParserException
    -
    SparqlResultParser
    -
    Functions
    -
    dateTime
    -
    lang
    -
    langMatches
    -
    regex
    -
    str
    -
    Files
    -
    ClientQuery.php
    -
    Constraint.php
    -
    Default.php
    -
    Default.php
    -
    FilterFunctions.php
    -
    FilterGenerator.php
    -
    GraphPattern.php
    -
    HTML.php
    -
    HTML.php
    -
    Offsetter.php
    -
    Preparator.php
    -
    PreparedStatement.php
    -
    PreparedStatement.php
    -
    Query.php
    -
    QueryTriple.php
    -
    ResultConverter.php
    -
    ResultConverter.php
    -
    ResultRenderer.php
    -
    ResultRenderer.php
    -
    SparqlClient.php
    -
    SparqlEngine.php
    -
    SparqlEngineDb.php
    -
    SparqlParser.php
    -
    SparqlParserException.php
    -
    SparqlResultParser.php
    -
    SqlGenerator.php
    -
    SqlGeneratorException.php
    -
    SqlMerger.php
    -
    TypeSorter.php
    -
    XML.php
    -
    XML.php
    - - -
    -
    -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_syntax.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_syntax.html.svn-base deleted file mode 100755 index 77bbafd3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_syntax.html.svn-base +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - -
    syntax
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_utility.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_utility.html.svn-base deleted file mode 100755 index bfc3f298..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_utility.html.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - -
    utility
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_vocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_vocabulary.html.svn-base deleted file mode 100755 index 979b9699..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/li_vocabulary.html.svn-base +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - -
    vocabulary
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/packages.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/packages.html.svn-base deleted file mode 100755 index 5a13f572..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/packages.html.svn-base +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/todolist.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/todolist.html.svn-base deleted file mode 100755 index 05c18493..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/.svn/text-base/todolist.html.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Todo List - - - - -

    Todo List

    -

    rdql

    -

    RdqlParser::parseAnd()

    -
      -
    • clear comments
    • -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:26:26 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/all-wcprops deleted file mode 100755 index 065e734a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/all-wcprops +++ /dev/null @@ -1,893 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource -END -fsource_model__modelModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelModel.php.html -END -fsource_default__syntaxSyntaxN3.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxN3.php.html -END -fsource_sparql__sparqlSparqlParserException.php.html -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParserException.php.html -END -fsource_sparql__sparqlSparqlEngineDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDb.php.html -END -fsource_model__modelDbStore.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelDbStore.php.html -END -fsource_vocabulary__vocabularyFOAF_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_RES.php.html -END -fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html -K 25 -svn:wc:ra_dav:version-url -V 134 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html -END -fsource_syntax__syntaxRdfParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfParser.php.html -END -fsource_default__modelModelP.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__modelModelP.php.html -END -fsource_model__sparqlSPARQL.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/310/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__sparqlSPARQL.php.html -END -fsource_sparql__sparqlSparqlClient.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlClient.php.html -END -fsource_default__utilmagpiescriptsmagpie_simple.php.html -K 25 -svn:wc:ra_dav:version-url -V 130 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_simple.php.html -END -fsource_default__utilmagpieextlibSnoopy.class.inc.html -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpieextlibSnoopy.class.inc.html -END -fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html -K 25 -svn:wc:ra_dav:version-url -V 137 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html -END -fsource_default__syntaxSyntaxGRDDL.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxGRDDL.php.html -END -fsource_dataset__datasetNamedGraphMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphMem.php.html -END -fsource_sparql__sparqlFilterFunctions.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlFilterFunctions.php.html -END -fsource_vocabulary__vocabularyVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabulary.php.html -END -fsource_resModel__resModelResSeq.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResSeq.php.html -END -fsource_model__modelModelFactory.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelModelFactory.php.html -END -fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html -K 25 -svn:wc:ra_dav:version-url -V 133 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html -END -fsource_default__syntaxSyntaxSparqlRes.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxSparqlRes.php.html -END -fsource_default__infModelInfModelP.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__infModelInfModelP.php.html -END -fsource_vocabulary__vocabularyVocabularyRes.php.html -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyRes.php.html -END -fsource_vocabulary__vocabularyRDF_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_RES.php.html -END -fsource_model__modelDbModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelDbModel.php.html -END -fsource_default__utilmagpierss_parse.inc.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpierss_parse.inc.html -END -fsource_resModel__resModelResList.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResList.php.html -END -fsource_vocabulary__vocabularyRDFS_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_C.php.html -END -fsource_default__constants.php.html -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__constants.php.html -END -fsource_default__vocabularyDC.php.html -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__vocabularyDC.php.html -END -fsource_sparql__sparqlSparqlParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParser.php.html -END -fsource_model__modelNode.php.html -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelNode.php.html -END -fsource_utility__utilObject.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilObject.php.html -END -fsource_dataset__datasetNamedGraphDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphDb.php.html -END -fsource_infModel__infModelInfModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_infModel__infModelInfModel.php.html -END -fsource_vocabulary__vocabularyRSS_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_C.php.html -END -fsource_default__resModelResModelP.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__resModelResModelP.php.html -END -fsource_model__modelLiteral.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelLiteral.php.html -END -fsource_resModel__resModelResModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResModel.php.html -END -fsource_sparql__sparqlGraphPattern.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlGraphPattern.php.html -END -fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 134 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html -END -fsource_default__utilUtility.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilUtility.php.html -END -fsource_dataset__datasetDatasetDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/310/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetDb.php.html -END -fsource_ontModel__ontModelOntProperty.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntProperty.php.html -END -fsource_syntax__syntaxN3Parser.php.html -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Parser.php.html -END -fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html -END -fsource_default__utilmagpiescriptssimple_smarty.php.html -K 25 -svn:wc:ra_dav:version-url -V 130 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssimple_smarty.php.html -END -fsource_vocabulary__vocabularyRDFS_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_RES.php.html -END -fsource_vocabulary__vocabularyATOM_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_RES.php.html -END -fsource_resModel__resModelResBag.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResBag.php.html -END -fsource_model__modelResource.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelResource.php.html -END -fsource_default__syntaxSyntaxRSS.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRSS.php.html -END -fsource_default__sparqlSPARQL.php.html -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__sparqlSPARQL.php.html -END -fsource_ontModel__ontModelRdfsVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelRdfsVocabulary.php.html -END -fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html -K 25 -svn:wc:ra_dav:version-url -V 131 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html -END -fsource_sparql__sparqlQueryTriple.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlQueryTriple.php.html -END -fsource_ontModel__ontModelIndividual.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelIndividual.php.html -END -fsource_dataset__syntaxTriXSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXSerializer.php.html -END -fsource_infModel__infModelInfStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_infModel__infModelInfStatement.php.html -END -fsource_sparql__sparqlSparqlEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngine.php.html -END -fsource_dataset__datasetIteratorAllGraphsMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsMem.php.html -END -fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html -K 25 -svn:wc:ra_dav:version-url -V 153 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html -END -fsource_dataset__datasetIteratorAllGraphsDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsDb.php.html -END -fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html -K 25 -svn:wc:ra_dav:version-url -V 136 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html -END -fsource_ontModel__ontModelOntResource.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntResource.php.html -END -fsource_utility__utilFindIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilFindIterator.php.html -END -fsource_resModel__resModelResAlt.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResAlt.php.html -END -fsource_vocabulary__vocabularyVCARD_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_C.php.html -END -fsource_vocabulary__vocabularyOWL.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL.php.html -END -fsource_vocabulary__vocabularyRSS.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS.php.html -END -fsource_syntax__syntaxGRDDLParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxGRDDLParser.php.html -END -fsource_syntax__syntaxN3Serializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Serializer.php.html -END -fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html -K 25 -svn:wc:ra_dav:version-url -V 138 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html -END -fsource_ontModel__ontModelOntClass.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntClass.php.html -END -fsource_infModel__infModelInfModelB.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelB.php.html -END -fsource_model__modelBlanknode.php.html -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelBlanknode.php.html -END -fsource_default__utilmagpierss_utils.inc.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpierss_utils.inc.html -END -fsource_model__modelMemModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelMemModel.php.html -END -fsource_default__utilmagpierss_cache.inc.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpierss_cache.inc.html -END -fsource_syntax__syntaxRssParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxRssParser.php.html -END -fsource_default__utilmagpiescriptsmagpie_slashbox.php.html -K 25 -svn:wc:ra_dav:version-url -V 132 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html -END -fsource_default__modelDBase.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__modelDBase.php.html -END -fsource_ontModel__ontModelOntModelP.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModelP.php.html -END -fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html -K 25 -svn:wc:ra_dav:version-url -V 129 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html -END -fsource_vocabulary__vocabularyDC_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_C.php.html -END -fsource_dataset__datasetIteratorFindQuadsDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsDb.php.html -END -fsource_sparql__sparqlQuery.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlQuery.php.html -END -fsource_default__datasetDatasetP.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__datasetDatasetP.php.html -END -fsource_resModel__resModelResContainer.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResContainer.php.html -END -fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html -END -fsource_vocabulary__vocabularyOWL_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_RES.php.html -END -fsource_default__rdqlRDQL.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__rdqlRDQL.php.html -END -fsource_sparql__sparqlConstraint.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlConstraint.php.html -END -fsource_vocabulary__vocabularyFOAF_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_C.php.html -END -fsource_vocabulary__vocabularyRSS_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_RES.php.html -END -fsource_dataset__datasetIteratorFindQuadsMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsMem.php.html -END -fsource_rdql__rdqlRdqlDbEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlDbEngine.php.html -END -fsource_sparql__sparqlSparqlEngineDbPreparator.php.html -K 25 -svn:wc:ra_dav:version-url -V 129 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html -END -fsource_model__modelStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_model__modelStatement.php.html -END -fsource_dataset__datasetQuad.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetQuad.php.html -END -fsource_sparql__syntaxSparqlResultParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__syntaxSparqlResultParser.php.html -END -fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 136 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html -END -fsource_vocabulary__vocabularyRDFS.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS.php.html -END -fsource_vocabulary__vocabularyVCARD.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD.php.html -END -fsource_vocabulary__vocabularyDC_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_RES.php.html -END -fsource_dataset__syntaxTriXParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXParser.php.html -END -fsource_vocabulary__vocabularyATOM_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_C.php.html -END -fsource_vocabulary__vocabularyOWL_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_C.php.html -END -fsource_syntax__syntaxRdfSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfSerializer.php.html -END -fsource_resModel__resModelResProperty.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResProperty.php.html -END -fsource_utility__utilIterFind.php.html -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilIterFind.php.html -END -fsource_resModel__resModelResIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResIterator.php.html -END -fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html -K 25 -svn:wc:ra_dav:version-url -V 134 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html -END -fsource_ontModel__ontModelOntVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntVocabulary.php.html -END -fsource_vocabulary__vocabularyRDF_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_C.php.html -END -fsource_utility__utilStatementIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilStatementIterator.php.html -END -fsource_default__datasetDatasetDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__datasetDatasetDb.php.html -END -fsource_utility__utilModelComparator.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilModelComparator.php.html -END -fsource_rdql__rdqlRdqlParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlParser.php.html -END -fsource_sparql__sparqlSparqlEngineResultConverter.php.html -K 25 -svn:wc:ra_dav:version-url -V 132 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultConverter.php.html -END -fsource_resModel__resModelResResource.php.html -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResResource.php.html -END -fsource_vocabulary__vocabularyVCARD_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_RES.php.html -END -fsource_vocabulary__vocabularyFOAF.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF.php.html -END -fsource_default__syntaxSyntaxRDF.php.html -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRDF.php.html -END -fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html -K 25 -svn:wc:ra_dav:version-url -V 140 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html -END -fsource_infModel__infModelInfRule.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_infModel__infModelInfRule.php.html -END -fsource_dataset__datasetDataset.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetDataset.php.html -END -fsource_default__utilmagpiescriptsmagpie_debug.php.html -K 25 -svn:wc:ra_dav:version-url -V 129 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_debug.php.html -END -fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html -K 25 -svn:wc:ra_dav:version-url -V 135 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html -END -fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html -K 25 -svn:wc:ra_dav:version-url -V 140 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html -END -fsource_sparql__sparqlClientQuery.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlClientQuery.php.html -END -fsource_default__RdfAPI.php.html -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__RdfAPI.php.html -END -fsource_vocabulary__vocabularyVocabularyClass.php.html -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyClass.php.html -END -fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html -K 25 -svn:wc:ra_dav:version-url -V 134 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html -END -fsource_rdql__rdqlRdqlResultIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlResultIterator.php.html -END -fsource_sparql__sparqlSparqlEngineResultRenderer.php.html -K 25 -svn:wc:ra_dav:version-url -V 131 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html -END -fsource_syntax__syntaxNTripleSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_syntax__syntaxNTripleSerializer.php.html -END -fsource_ontModel__ontModelOntModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModel.php.html -END -fsource_default__utilmagpierss_fetch.inc.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/430/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_default__utilmagpierss_fetch.inc.html -END -fsource_utility__utilRdfUtil.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_utility__utilRdfUtil.php.html -END -fsource_vocabulary__vocabularyRDF.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF.php.html -END -fsource_resModel__resModelResLiteral.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_resModel__resModelResLiteral.php.html -END -fsource_rdql__rdqlRdqlMemEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlMemEngine.php.html -END -fsource_ontModel__ontModelOWLVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_ontModel__ontModelOWLVocabulary.php.html -END -fsource_rdql__rdqlRdqlEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlEngine.php.html -END -fsource_infModel__infModelInfModelF.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelF.php.html -END -fsource_dataset__datasetDatasetMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetMem.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/entries deleted file mode 100755 index 641ac92e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/entries +++ /dev/null @@ -1,1952 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/__filesource -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -fsource_model__modelModel.php.html -file - - - - -2008-02-29T14:57:39.336683Z -28f869b783d9c9e0e691a747d4498ed5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__syntaxSyntaxN3.php.html -file - - - - -2008-02-29T14:57:39.336683Z -94c0fb404e993a3d7a743cb603619c5c -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlSparqlParserException.php.html -file - - - - -2008-02-29T14:57:39.352303Z -60e671e6813d42c0f4c81456fb759c17 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDb.php.html -file - - - - -2008-02-29T14:57:39.352303Z -da18f1ac1a5f1aa6c0f80e69873ea0f4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelDbStore.php.html -file - - - - -2008-02-29T14:57:39.367924Z -4b7ef83ad75e9dd9d2f24fe00c0307f2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyFOAF_RES.php.html -file - - - - -2008-02-29T14:57:39.383544Z -63ac1d35a3e824e858f10950dea61b4a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html -file - - - - -2008-02-29T14:57:39.399165Z -54f7a25d7520fc2e17674cb274413549 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxRdfParser.php.html -file - - - - -2008-02-29T14:57:39.414786Z -c343476966a15723002355a1aabb3706 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__modelModelP.php.html -file - - - - -2008-02-29T14:57:39.430406Z -1e410bb5afe169671f095314f0c8c94b -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_model__sparqlSPARQL.php.html -file - - - - -2008-02-29T14:57:39.430406Z -205a62e2febb429d1f1e9851fb82b1c0 -2006-06-26T12:34:22.000000Z -310 -tgauss -has-props - -fsource_sparql__sparqlSparqlClient.php.html -file - - - - -2008-02-29T14:57:39.446027Z -2777953f6955926812ef7fd5ddab7f5c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpiescriptsmagpie_simple.php.html -file - - - - -2008-02-29T14:57:39.446027Z -60fc7837f71d1b5bbc5371f2feae5cd6 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_default__utilmagpieextlibSnoopy.class.inc.html -file - - - - -2008-02-29T14:57:39.461647Z -3841f8b09f674aa7c5cf1237ced1fe3e -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html -file - - - - -2008-02-29T14:57:39.477268Z -2c9bd987f142bd16e07ac1c25201bf9b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__syntaxSyntaxGRDDL.php.html -file - - - - -2008-02-29T14:57:39.492889Z -2ffe5d7e9e0034c3a07501af9cb478e9 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_dataset__datasetNamedGraphMem.php.html -file - - - - -2008-02-29T14:57:39.492889Z -74e19908aadce2e08f75aedad767ca6b -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_sparql__sparqlFilterFunctions.php.html -file - - - - -2008-02-29T14:57:39.508509Z -d4b8e410b8131385546bc69772e9a07d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyVocabulary.php.html -file - - - - -2008-02-29T14:57:39.524130Z -6b2a08eed115870dcf79dfa5db82d115 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResSeq.php.html -file - - - - -2008-02-29T14:57:39.524130Z -6b9c5e2ed7cda9537644c241598a4990 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelModelFactory.php.html -file - - - - -2008-02-29T14:57:39.539750Z -994046bb91671f52e33126af6568f468 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html -file - - - - -2008-02-29T14:57:39.539750Z -68e39a11bba5584145c824ed561974ef -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__syntaxSyntaxSparqlRes.php.html -file - - - - -2008-02-29T14:57:39.555371Z -93011f917533292019c6f985a112bdd7 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_default__infModelInfModelP.php.html -file - - - - -2008-02-29T14:57:39.570992Z -394f9f167253248dac941509d3a6ee70 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_vocabulary__vocabularyVocabularyRes.php.html -file - - - - -2008-02-29T14:57:39.570992Z -c3cb8eb6f7663450c854d173b1ebb242 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRDF_RES.php.html -file - - - - -2008-02-29T14:57:39.586612Z -1c9703c19ba3aad16a9dae88bc2dd9ef -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelDbModel.php.html -file - - - - -2008-02-29T14:57:39.602233Z -1800f044ba9a98b7317a007f08bced8c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpierss_parse.inc.html -file - - - - -2008-02-29T14:57:39.617853Z -e13722d3be3f3f37186ad0af2272b8ca -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_resModel__resModelResList.php.html -file - - - - -2008-02-29T14:57:39.633474Z -b0218f105950131b0bad22902ccd82f8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRDFS_C.php.html -file - - - - -2008-02-29T14:57:39.633474Z -0d6f676158f6bed2a9016a75ea621915 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__constants.php.html -file - - - - -2008-02-29T14:57:39.649095Z -181e75b32857a44515bbfb0a9c0d94f2 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_default__vocabularyDC.php.html -file - - - - -2008-02-29T14:57:39.664715Z -60d7365ae89c47d7ceac6117e28f7e31 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlSparqlParser.php.html -file - - - - -2008-02-29T14:57:39.977127Z -d5ca37d5dc8d4aac364b2431466af1f7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelNode.php.html -file - - - - -2008-02-29T14:57:40.023989Z -4cd8541645dbe92fac31f5250cc16e82 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_utility__utilObject.php.html -file - - - - -2008-02-29T14:57:40.055230Z -93ccac64136f3eff6f1e05e5f8ea7830 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetNamedGraphDb.php.html -file - - - - -2008-02-29T14:57:40.055230Z -66ed2b5c58ce5e61c56abddf60bfe16e -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_infModel__infModelInfModel.php.html -file - - - - -2008-02-29T14:57:40.070851Z -1d8693a41ffa0ef9a485d2a5dfe8fdd7 -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_vocabulary__vocabularyRSS_C.php.html -file - - - - -2008-02-29T14:57:40.086471Z -a6cea5d5c9e8e727b2a20312432b6aad -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__resModelResModelP.php.html -file - - - - -2008-02-29T14:57:40.102092Z -fb09037c8e90142ae01d4345086ca3b6 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_model__modelLiteral.php.html -file - - - - -2008-02-29T14:57:40.102092Z -64471d96864848505f6a1d6a6ca6253e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResModel.php.html -file - - - - -2008-02-29T14:57:40.117713Z -380a78f6e27d05a15e9eef29a3a12ec3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlGraphPattern.php.html -file - - - - -2008-02-29T14:57:40.133333Z -1d5e4c0e13e5545ef48e31a265e71b07 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html -file - - - - -2008-02-29T14:57:40.148954Z -acdb7dd641ad491cbeb00d82ad07d5f1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilUtility.php.html -file - - - - -2008-02-29T14:57:40.148954Z -9047435c2d1262871a5c3f8e656cd2bc -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_dataset__datasetDatasetDb.php.html -file - - - - -2008-02-29T14:57:40.164574Z -b88841f6b2f40e31ffe684d58fee4b75 -2006-06-26T12:34:22.000000Z -310 -tgauss -has-props - -fsource_ontModel__ontModelOntProperty.php.html -file - - - - -2008-02-29T14:57:40.180195Z -710ec35624ddd919b910538d00cf44cc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxN3Parser.php.html -file - - - - -2008-02-29T14:57:40.180195Z -85edf8ab33522d9574312ea5d7424605 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html -file - - - - -2008-02-29T14:57:40.195816Z -f48bb092aaea423546c7fdf8e9db4357 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpiescriptssimple_smarty.php.html -file - - - - -2008-02-29T14:57:40.211436Z -9692e357d00331547a375e4490aa74d9 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_vocabulary__vocabularyRDFS_RES.php.html -file - - - - -2008-02-29T14:57:40.227057Z -33f4721f244bbda5b2fd14e25355de47 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyATOM_RES.php.html -file - - - - -2008-02-29T14:57:40.227057Z -0ba4183080f83e1b5024f8f9fd2f8903 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResBag.php.html -file - - - - -2008-02-29T14:57:40.242677Z -098edf74cc988def34ccebb7449317a3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelResource.php.html -file - - - - -2008-02-29T14:57:40.242677Z -82d9bd4dec7360a0bb90923d71e0651a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__syntaxSyntaxRSS.php.html -file - - - - -2008-02-29T14:57:40.258298Z -389f8d0ee2e8ebc9ba42d2913141d5a9 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_default__sparqlSPARQL.php.html -file - - - - -2008-02-29T14:57:40.273919Z -73568e8bb480f9ef2c9e709bdecf3344 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_ontModel__ontModelRdfsVocabulary.php.html -file - - - - -2008-02-29T14:57:40.273919Z -6421bdadc4ba4d72beb72909f7acbb04 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html -file - - - - -2008-02-29T14:57:40.289539Z -5a258449d5547824b66dd420297eaab8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlQueryTriple.php.html -file - - - - -2008-02-29T14:57:40.305160Z -f825784f45fdb0c2b09b8e6b6ac4cc7f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelIndividual.php.html -file - - - - -2008-02-29T14:57:40.305160Z -c90d988656b0b1a0e0c04a1db885c04c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__syntaxTriXSerializer.php.html -file - - - - -2008-02-29T14:57:40.320780Z -ff0ffdf1452130799dd574e894b3eeba -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_infModel__infModelInfStatement.php.html -file - - - - -2008-02-29T14:57:40.336401Z -d643badf8eb30fd417137d35108da295 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngine.php.html -file - - - - -2008-02-29T14:57:40.352022Z -3de4814b6b2e2cc3a15f190342adb8cf -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetIteratorAllGraphsMem.php.html -file - - - - -2008-02-29T14:57:40.352022Z -d95e15a6adc967ae6f6013104f5ccd32 -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html -file - - - - -2008-02-29T14:57:40.367642Z -0a384eb47efe4853acda7514c11f9b68 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_dataset__datasetIteratorAllGraphsDb.php.html -file - - - - -2008-02-29T14:57:40.383263Z -aa347b46fba8f2956bf5ffc90d297dfe -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html -file - - - - -2008-02-29T14:57:40.383263Z -f8673e803c54dd71fabc3d0129d33e5a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelOntResource.php.html -file - - - - -2008-02-29T14:57:40.414504Z -68e6ec8e4af6d79fcb820429d1cb2e4e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_utility__utilFindIterator.php.html -file - - - - -2008-02-29T14:57:40.398883Z -48b3cb9d742cf452428b8b14bcc1a837 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResAlt.php.html -file - - - - -2008-02-29T14:57:40.430125Z -952b3c759cbd24bfb3b4319d1d556b4d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyVCARD_C.php.html -file - - - - -2008-02-29T14:57:40.445745Z -0e291d43edb5015188493174d72203bc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyOWL.php.html -file - - - - -2008-02-29T14:57:40.430125Z -bb3ce4b22547b9cd57e340118e926d4c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRSS.php.html -file - - - - -2008-02-29T14:57:40.461366Z -4c472ad3840400e20383ab27cfd532f6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxGRDDLParser.php.html -file - - - - -2008-02-29T14:57:40.461366Z -03b3822a0754aeffe5bf76914dbfd235 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxN3Serializer.php.html -file - - - - -2008-02-29T14:57:40.476986Z -997541665075ff1e26886ece4faea168 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html -file - - - - -2008-02-29T14:57:40.492607Z -418baf790e59e218a6413ce34713d8e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelOntClass.php.html -file - - - - -2008-02-29T14:57:40.492607Z -91a41fc8874a545a01dc97ef611170ea -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_infModel__infModelInfModelB.php.html -file - - - - -2008-02-29T14:57:40.508228Z -da3dfe1de99c6a50651d2543ce72dc30 -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_model__modelBlanknode.php.html -file - - - - -2008-02-29T14:57:40.539469Z -118f61db7c18bbb255b7525c99dfb113 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpierss_utils.inc.html -file - - - - -2008-02-29T14:57:40.523848Z -7447e7485fc65b5e6cee6e169a279b21 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_model__modelMemModel.php.html -file - - - - -2008-02-29T14:57:40.555089Z -b5487306f0957989b250f1c6f9c6defd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpierss_cache.inc.html -file - - - - -2008-02-29T14:57:40.570710Z -311ef3619df5ad117278a78fb8970db1 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_syntax__syntaxRssParser.php.html -file - - - - -2008-02-29T14:57:40.555089Z -ff69e14afeaf762b8a01975170a88384 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpiescriptsmagpie_slashbox.php.html -file - - - - -2008-02-29T14:57:40.586331Z -6be505795954f675d1d92fbbcead86b0 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_default__modelDBase.php.html -file - - - - -2008-02-29T14:57:40.586331Z -b1555013fc029cfee5aa903130bf01e0 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_ontModel__ontModelOntModelP.php.html -file - - - - -2008-02-29T14:57:40.617572Z -5bc9737a3b45f17540d8d3d082746d55 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html -file - - - - -2008-02-29T14:57:40.601951Z -7207d27abecb8cca59a6b37d5b76b838 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyDC_C.php.html -file - - - - -2008-02-29T14:57:40.617572Z -d42eb741fa3c255b59dda4dadd482b9b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetIteratorFindQuadsDb.php.html -file - - - - -2008-02-29T14:57:40.633192Z -651c23982d174f1a539d0a02f8f1364d -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_sparql__sparqlQuery.php.html -file - - - - -2008-02-29T14:57:40.648813Z -a5818026307c269bd774aef6d0d6f9d4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__datasetDatasetP.php.html -file - - - - -2008-02-29T14:57:40.664434Z -759677047d097883d115efc4c563f931 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_resModel__resModelResContainer.php.html -file - - - - -2008-02-29T14:57:40.680054Z -e298e77b344db7b21ed2b15f08336912 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html -file - - - - -2008-02-29T14:57:40.680054Z -4d7be8621ffa92577124d6a8f236abc3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyOWL_RES.php.html -file - - - - -2008-02-29T14:57:40.711295Z -44ec2349d27664e190b64c1f2bd47a9a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__rdqlRDQL.php.html -file - - - - -2008-02-29T14:57:40.711295Z -1f3113d2a6f904559099d769889da320 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlConstraint.php.html -file - - - - -2008-02-29T14:57:40.695675Z -1d281521edfdfce0fd64700e0383fc87 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyFOAF_C.php.html -file - - - - -2008-02-29T14:57:40.726916Z -7ac480eb40d98a4764deae0354b086e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRSS_RES.php.html -file - - - - -2008-02-29T14:57:40.742537Z -4d3202e4790a80597e7d7fa87acfcb61 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetIteratorFindQuadsMem.php.html -file - - - - -2008-02-29T14:57:40.758157Z -2475928b771195421de7a1686ca0e884 -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_rdql__rdqlRdqlDbEngine.php.html -file - - - - -2008-02-29T14:57:40.773778Z -740d3aba15c5126be2eee385c76bbf4f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbPreparator.php.html -file - - - - -2008-02-29T14:57:40.758157Z -0385a65e54bb876f0b64f67d957289fd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_model__modelStatement.php.html -file - - - - -2008-02-29T14:57:40.820640Z -a3fcf5b7dd1e567715d4b83b52bacde0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetQuad.php.html -file - - - - -2008-02-29T14:57:40.789398Z -a882a68e2fda1d12d8baf07d82154543 -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_sparql__syntaxSparqlResultParser.php.html -file - - - - -2008-02-29T14:57:40.820640Z -33d6d045a650847dedcd91ff9bccfdbb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html -file - - - - -2008-02-29T14:57:40.836260Z -60d0153be880f5dbdc0f6746f958a978 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRDFS.php.html -file - - - - -2008-02-29T14:57:40.851881Z -862723c6c6171349cd9bd79a968de2d3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyVCARD.php.html -file - - - - -2008-02-29T14:57:40.867501Z -3fc3046cb1c8f1d7fccef990de3c69e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyDC_RES.php.html -file - - - - -2008-02-29T14:57:40.851881Z -f14bf94b6c734de67dba19d8302c1dce -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__syntaxTriXParser.php.html -file - - - - -2008-02-29T14:57:40.883122Z -6b0a895c05f948254ba90fbaad5957bb -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_vocabulary__vocabularyATOM_C.php.html -file - - - - -2008-02-29T14:57:40.883122Z -1bae69c440c5a0acaec94b13a771fed7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyOWL_C.php.html -file - - - - -2008-02-29T14:57:40.914363Z -5b8bd7fa87cceccf1a3168fe10ea8064 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxRdfSerializer.php.html -file - - - - -2008-02-29T14:57:40.898743Z -69960109853ce91aec09618db3789394 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResProperty.php.html -file - - - - -2008-02-29T14:57:40.929984Z -40fb9c2ab660e096b54a8dba2b84fe54 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_utility__utilIterFind.php.html -file - - - - -2008-02-29T14:57:40.929984Z -06075b6ab6ae471f820025f978756b15 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResIterator.php.html -file - - - - -2008-02-29T14:57:40.945604Z -8d18fe67383353fe40dec8c4eafacc98 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html -file - - - - -2008-02-29T14:57:40.961225Z -a167edf452e2ccd4845275ec30d43884 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelOntVocabulary.php.html -file - - - - -2008-02-29T14:57:40.961225Z -c378109a73c4d8b61468166170e00a15 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRDF_C.php.html -file - - - - -2008-02-29T14:57:40.976846Z -849c0f0f8ccfce0b334cc50a56e19186 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_utility__utilStatementIterator.php.html -file - - - - -2008-02-29T14:57:40.992466Z -da8bdfb491115024bd781d7bc386125f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__datasetDatasetDb.php.html -file - - - - -2008-02-29T14:57:40.992466Z -e1731770580e2cece29e183218382d2a -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_utility__utilModelComparator.php.html -file - - - - -2008-02-29T14:57:41.008087Z -c7f55ff0ea12158e57260590bf10ba7f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_rdql__rdqlRdqlParser.php.html -file - - - - -2008-02-29T14:57:41.039328Z -94dcfa335b6e93fd60dd6b53ed2065f4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineResultConverter.php.html -file - - - - -2008-02-29T14:57:41.023707Z -4e05a180d93ef0a66262bd5f67018cbb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResResource.php.html -file - - - - -2008-02-29T14:57:41.054949Z -ea3a77b9b2133fb33aba649b0e0d1df1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyVCARD_RES.php.html -file - - - - -2008-02-29T14:57:41.054949Z -0d1a5ef1960d3dc5bb7a4e70643d50f0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyFOAF.php.html -file - - - - -2008-02-29T14:57:41.070569Z -bb3c8c8be7ccbec57a6e7d387e3b1715 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__syntaxSyntaxRDF.php.html -file - - - - -2008-02-29T14:57:41.086190Z -74c940e01908d405f7d09e567ba0a4e2 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html -file - - - - -2008-02-29T14:57:41.086190Z -82b6d09efb76ee14a63752e58eaeefdd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_infModel__infModelInfRule.php.html -file - - - - -2008-02-29T14:57:41.101810Z -c967ab1d054410032d0c0352dbd62f49 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetDataset.php.html -file - - - - -2008-02-29T14:57:41.117431Z -62d55861d0fc260767022e959ccbf9bb -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -fsource_default__utilmagpiescriptsmagpie_debug.php.html -file - - - - -2008-02-29T14:57:41.133052Z -6dcaff2e3420d298be45e8e722b2543b -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html -file - - - - -2008-02-29T14:57:41.133052Z -1ecf62c4bcb1794b531d9aa4efb67547 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html -file - - - - -2008-02-29T14:57:41.148672Z -8735df0bab16d6a692c5a289a3f67586 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlClientQuery.php.html -file - - - - -2008-02-29T14:57:41.164293Z -e6f6ccf55f5b1bb7e8935be1862f07ce -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__RdfAPI.php.html -file - - - - -2008-02-29T14:57:41.164293Z -50a7e4f6d49c66d4676aa46b1516e927 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_vocabulary__vocabularyVocabularyClass.php.html -file - - - - -2008-02-29T14:57:41.179913Z -c4f7ca6bd3a0f4ae854e73a3028379e1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html -file - - - - -2008-02-29T14:57:41.179913Z -cd54e2a927f4dc55aeb6147d3966d3e2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_rdql__rdqlRdqlResultIterator.php.html -file - - - - -2008-02-29T14:57:41.195534Z -0f4c29a34a5e8e95e2b5496600339be7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_sparql__sparqlSparqlEngineResultRenderer.php.html -file - - - - -2008-02-29T14:57:41.211155Z -41479955922bfc49772857ef6847f1af -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_syntax__syntaxNTripleSerializer.php.html -file - - - - -2008-02-29T14:57:41.211155Z -b48110fae742a2686f6658d981f4a4aa -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelOntModel.php.html -file - - - - -2008-02-29T14:57:41.226775Z -acafa68789149d75491df372c1649c62 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_default__utilmagpierss_fetch.inc.html -file - - - - -2008-02-29T14:57:41.242396Z -75f57eba801be09cf801d36bb7dff146 -2007-05-01T15:47:21.000000Z -430 -cweiske -has-props - -fsource_utility__utilRdfUtil.php.html -file - - - - -2008-02-29T14:57:41.258016Z -53e3e338d0b3dfd110f096f07fc3c1ee -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_vocabulary__vocabularyRDF.php.html -file - - - - -2008-02-29T14:57:41.258016Z -c457c773a9e192773c5945c3a0be2f81 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_resModel__resModelResLiteral.php.html -file - - - - -2008-02-29T14:57:41.273637Z -7dec03ee1f40fb67149ba021be059a7d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_rdql__rdqlRdqlMemEngine.php.html -file - - - - -2008-02-29T14:57:41.289258Z -f67d76491438a1c5265ca06474006049 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_ontModel__ontModelOWLVocabulary.php.html -file - - - - -2008-02-29T14:57:41.304878Z -494a55d05a97ae414064e1e2fb99ff1a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_rdql__rdqlRdqlEngine.php.html -file - - - - -2008-02-29T14:57:41.320499Z -a0584904be0a13a62db0d32aaecab15e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_infModel__infModelInfModelF.php.html -file - - - - -2008-02-29T14:57:41.351740Z -ab3259fae040e7d5834587f1bf87a31b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -fsource_dataset__datasetDatasetMem.php.html -file - - - - -2008-02-29T14:57:41.367361Z -bf5f363e32ddf2f40160c87b74d4b82a -2007-06-01T16:19:26.000000Z -442 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDataset.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDataset.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDataset.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetDatasetMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetQuad.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetQuad.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__datasetQuad.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__RdfAPI.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__RdfAPI.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__RdfAPI.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__constants.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__constants.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__constants.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__datasetDatasetP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__infModelInfModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__infModelInfModelP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__infModelInfModelP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelDBase.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelDBase.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelDBase.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelModelP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__modelModelP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__rdqlRDQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__rdqlRDQL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__rdqlRDQL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__resModelResModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__resModelResModelP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__resModelResModelP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__sparqlSPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__sparqlSPARQL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__sparqlSPARQL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxN3.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxN3.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxN3.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilUtility.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilUtility.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilUtility.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_cache.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_cache.inc.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_cache.inc.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_parse.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_parse.inc.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_parse.inc.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_utils.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_utils.inc.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpierss_utils.inc.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__vocabularyDC.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__vocabularyDC.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_default__vocabularyDC.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelB.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelB.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelB.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfModelF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfRule.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfRule.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfRule.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_infModel__infModelInfStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelBlanknode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelBlanknode.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelBlanknode.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbStore.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbStore.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelDbStore.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelLiteral.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelLiteral.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelMemModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelMemModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelMemModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModelFactory.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModelFactory.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelModelFactory.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelNode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelNode.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelNode.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelResource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelResource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__modelStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__sparqlSPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__sparqlSPARQL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_model__sparqlSPARQL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelIndividual.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelIndividual.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelIndividual.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntClass.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntClass.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntResource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntResource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResAlt.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResAlt.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResAlt.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResBag.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResBag.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResBag.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResContainer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResContainer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResContainer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResList.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResList.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResList.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResLiteral.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResLiteral.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResProperty.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResProperty.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResResource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResResource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResSeq.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResSeq.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_resModel__resModelResSeq.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlClientQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlClientQuery.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlClientQuery.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlConstraint.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlConstraint.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlConstraint.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQuery.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQuery.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Parser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Parser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Parser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRssParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRssParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_syntax__syntaxRssParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilFindIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilFindIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilFindIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilIterFind.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilIterFind.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilIterFind.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilModelComparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilModelComparator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilModelComparator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilObject.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilObject.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilObject.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilRdfUtil.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilRdfUtil.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilRdfUtil.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilStatementIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilStatementIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_utility__utilStatementIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/prop-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDataset.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDataset.php.html.svn-base deleted file mode 100755 index 514c582a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDataset.php.html.svn-base +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - File Source for Dataset.php - - - - - -

    Source for file Dataset.php

    -

    Documentation is available at Dataset.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Dataset
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Dataset implementation.
    14. -
    15. * Superclass of datasetMem and datasetDb which contains shared functionality.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal (http://www.d-westphal.de)
    22. -
    23. @author Chris Bizer <chris@bizer.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33.  
    34. -
    35. class Dataset
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Load a Dataset from a File
    42. -
    43.     *
    44. -
    45.     * @param string 
    46. -
    47.     * @access    public
    48. -
    49.     */
    50. -
    51.     function loadFromFile($file)
    52. -
    53.     {
    54. -
    55.         $parsernew TriXParser($this);
    56. -
    57.         $parser->parseFile($file);
    58. -
    59.     }
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Load a Datset from a string
    66. -
    67.     *
    68. -
    69.     * @param string 
    70. -
    71.     * @access    public
    72. -
    73.     */
    74. -
    75.     function loadFromString($string)
    76. -
    77.     {
    78. -
    79.         $parsernew TriXParser($this);
    80. -
    81.         $parser->parseString($string);
    82. -
    83.     }
    84. -
    85.  
    86. -
    87.     /**
    88. -
    89.     * Serialize the Dataset to File
    90. -
    91.     *
    92. -
    93.     * @param  string 
    94. -
    95.     * @access    public
    96. -
    97.     */
    98. -
    99.     function serializeToFile($fileName)
    100. -
    101.     {
    102. -
    103.         $serializernew TriXSerializer($this);
    104. -
    105.         $serializer->serializeToFile($fileName);
    106. -
    107.     }
    108. -
    109.  
    110. -
    111.     /**
    112. -
    113.     * Serialize the Dataset to string
    114. -
    115.     *
    116. -
    117.     * @return string 
    118. -
    119.     * @access    public
    120. -
    121.     */
    122. -
    123.     function serializeToString()
    124. -
    125.     {
    126. -
    127.         $serializernew TriXSerializer($this);
    128. -
    129.         return $serializer->serializeToString();
    130. -
    131.     }
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Performs a SPARQL query against an RDF Dataset.
    138. -
    139.     * The result can be retrived in SPARQL Query Results XML Format or
    140. -
    141.     * as an array containing the variables an their bindings.
    142. -
    143.     *
    144. -
    145.     * @param  String $query      the sparql query string
    146. -
    147.     * @param  String $resultform the result form ('xml' for SPARQL Query Results XML Format)
    148. -
    149.     * @return String/array 
    150. -
    151.     */
    152. -
    153.     function sparqlQuery($query,$resultform false){
    154. -
    155.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SPARQL);
    156. -
    157.         $parser new SparqlParser();
    158. -
    159.         $q $parser->parse($query);
    160. -
    161.  
    162. -
    163.         $eng SparqlEngine::factory();
    164. -
    165.         return $eng->queryModel($this,$q,$resultform);
    166. -
    167.     }
    168. -
    169.  
    170. -
    171.  
    172. -
    173.  
    174. -
    175. }
    176. -
    177. ?>
    178. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetDb.php.html.svn-base deleted file mode 100755 index 25925aff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetDb.php.html.svn-base +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - File Source for DatasetDb.php - - - - -

    Source for file DatasetDb.php

    -

    Documentation is available at DatasetDb.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: DatasetDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Persistent implementation of a Dataset in a database.
    14. -
    15. * A RDF dataset is a collection of named RDF graphs.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal (http://www.d-westphal.de)
    22. -
    23. @author Chris Bizer <chris@bizer.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    34. -
    35.  
    36. -
    37. class DatasetDb extends Dataset 
    38. -
    39. {
    40. -
    41.         
    42. -
    43.     /**
    44. -
    45.     * Reference to databse connection.
    46. -
    47.     *
    48. -
    49.     * @var        resource dbConnection
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $dbConnection;
    56. -
    57.     
    58. -
    59.     /**
    60. -
    61.     * Reference to the dbStore Object.
    62. -
    63.     *
    64. -
    65.     * @var        $dbStore dbStore
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $dbStore;
    72. -
    73.     
    74. -
    75.     
    76. -
    77.     /**
    78. -
    79.     * Name of the Dataset
    80. -
    81.     *
    82. -
    83.     * @var        string 
    84. -
    85.     * @access    private
    86. -
    87.     */
    88. -
    89.     var $setName;
    90. -
    91.     
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * Constructor
    98. -
    99.     * You can supply a Dataset name.
    100. -
    101.     *
    102. -
    103.     * @param  ADODBConnection 
    104. -
    105.     * @param  DbStore 
    106. -
    107.     * @param  string 
    108. -
    109.     * @access    public
    110. -
    111.     */        
    112. -
    113.     function DatasetDb(&$dbConnection,&$dbStore,$datasetName)
    114. -
    115.     {
    116. -
    117.         $this->dbConnection=$dbConnection;
    118. -
    119.         $this->dbStore=&$dbStore;
    120. -
    121.         $this->setName$datasetName;
    122. -
    123.         $this->_initialize();
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Initialize
    132. -
    133.     * Read all needed data into the set.
    134. -
    135.     *
    136. -
    137.     * 
    138. -
    139.     * @access    private
    140. -
    141.     */        
    142. -
    143.     function _initialize()
    144. -
    145.     {
    146. -
    147.         $recordSet =$this->dbConnection->execute("SELECT defaultModelUri
    148. -
    149.                                          FROM datasets where datasetName='".$this->setName."'");
    150. -
    151.         
    152. -
    153.            $this->defaultGraph=$this->dbStore->getModel($recordSet->fields[0]);
    154. -
    155.     }
    156. -
    157.  
    158. -
    159.  
    160. -
    161.     
    162. -
    163. //    === Graph level methods ========================
    164. -
    165.     
    166. -
    167.         
    168. -
    169.     /**
    170. -
    171.     * Sets the Dataset name. Return true on success, false otherwise.
    172. -
    173.     *
    174. -
    175.     * @param  string 
    176. -
    177.     * @access    public
    178. -
    179.     */    
    180. -
    181.     function setDatasetName($datasetName)
    182. -
    183.     {
    184. -
    185.         if ($this->dbStore->datasetExists($datasetName))
    186. -
    187.             return false;
    188. -
    189.             
    190. -
    191.         $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."'
    192. -
    193.                                       where datasetName='".$this->setName."'");
    194. -
    195.         
    196. -
    197.         $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."'
    198. -
    199.                                       where datasetName='".$this->setName."'");
    200. -
    201.         $this->setName=$datasetName;
    202. -
    203.         return true;
    204. -
    205.     }
    206. -
    207.     
    208. -
    209.     /**
    210. -
    211.     * Returns the Datasets name.
    212. -
    213.     *
    214. -
    215.     * @return string 
    216. -
    217.     * @access    public
    218. -
    219.     */
    220. -
    221.     function getDatasetName()
    222. -
    223.     {
    224. -
    225.         return $this->setName;
    226. -
    227.     }
    228. -
    229.     
    230. -
    231.     /**
    232. -
    233.      * Adds a NamedGraph to the set.
    234. -
    235.      *
    236. -
    237.      * @param NamedGraphDb 
    238. -
    239.      */
    240. -
    241.     function addNamedGraph(&$graph)
    242. -
    243.     {
    244. -
    245.         $graphNameURI=$graph->getGraphName();
    246. -
    247.         $this->removeNamedGraph($graphNameURI);
    248. -
    249.         $this->dbConnection->execute('INSERT INTO dataset_model VALUES("'.$this->setName.'",'.$graph->modelID.',"'.$graphNameURI.'")');
    250. -
    251.     }
    252. -
    253.     
    254. -
    255.         
    256. -
    257.     /**
    258. -
    259.      * Overwrites the existting default graph.
    260. -
    261.      *
    262. -
    263.      * @param DbModel 
    264. -
    265.      */
    266. -
    267.     function setDefaultGraph(&$graph)
    268. -
    269.     {
    270. -
    271.         $this->dbConnection->execute('UPDATE datasets SET defaultModelUri ="'.$graph->modelURI.'"  WHERE datasetName ="'.$this->setName.'"');
    272. -
    273.     }
    274. -
    275.     
    276. -
    277.     /**
    278. -
    279.      * Returns a reference to the defaultGraph.
    280. -
    281.      *     
    282. -
    283.      * @return NamedGraphDb 
    284. -
    285.      */
    286. -
    287.     function getDefaultGraph()
    288. -
    289.     {
    290. -
    291.         $defaultGraphURI $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'");
    292. -
    293.         return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName));
    294. -
    295.     }
    296. -
    297.     
    298. -
    299.     /**
    300. -
    301.      * Returns true, if a defaultGraph exists. False otherwise.
    302. -
    303.      *     
    304. -
    305.      * @return boolean 
    306. -
    307.      */    
    308. -
    309.     function hasDefaultGraph()
    310. -
    311.     {
    312. -
    313.         return true;
    314. -
    315.     }
    316. -
    317.     
    318. -
    319.     /**
    320. -
    321.      * Removes a NamedGraph from the set. Nothing happens
    322. -
    323.      * if no graph with that name is contained in the set.
    324. -
    325.      *
    326. -
    327.      * @param string 
    328. -
    329.      */
    330. -
    331.     function removeNamedGraph($graphName)
    332. -
    333.     {
    334. -
    335.         $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    336. -
    337.     }
    338. -
    339.     
    340. -
    341.     /**
    342. -
    343.      * Tells wether the Dataset contains a NamedGraph.
    344. -
    345.      *
    346. -
    347.      * @param  string 
    348. -
    349.      * @return boolean 
    350. -
    351.      */
    352. -
    353.     function containsNamedGraph($graphName)
    354. -
    355.     {
    356. -
    357.         $count$this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    358. -
    359.         return ($count>0);    
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.      * Returns the NamedGraph with a specific name from the Dataset.
    368. -
    369.      * Changes to the graph will be reflected in the set.
    370. -
    371.      *
    372. -
    373.      * @param string 
    374. -
    375.      * @return NamedGraphDb or null
    376. -
    377.      */
    378. -
    379.     function &getNamedGraph($graphName)
    380. -
    381.     {
    382. -
    383.         if(!$this->containsNamedGraph($graphName))
    384. -
    385.             return null;
    386. -
    387.             
    388. -
    389.         $modelVars =$this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI
    390. -
    391.                                                     FROM models, dataset_model
    392. -
    393.                                                     WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID");
    394. -
    395.     
    396. -
    397.         return new NamedGraphDb($this->dbConnection$modelVars->fields[0],
    398. -
    399.                                  $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    400. -
    401.     }
    402. -
    403.     
    404. -
    405.     /**
    406. -
    407.      * Returns the names of the namedGraphs in this set as strings in an array.
    408. -
    409.      *
    410. -
    411.      * @return Array 
    412. -
    413.      */
    414. -
    415.     function listGraphNames()
    416. -
    417.     {
    418. -
    419.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    420. -
    421.  
    422. -
    423.         $return=array();
    424. -
    425.         while (!$recordSet->EOF
    426. -
    427.         {
    428. -
    429.           $return[$recordSet->fields[0];
    430. -
    431.           $recordSet->moveNext();
    432. -
    433.         }
    434. -
    435.         return $return;
    436. -
    437.     }
    438. -
    439.  
    440. -
    441.     /**
    442. -
    443.      * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    444. -
    445.      *
    446. -
    447.      * @param  string 
    448. -
    449.      * @param  string 
    450. -
    451.      * @return NamedGraphDb 
    452. -
    453.      */
    454. -
    455.     function &createGraph($graphName,$baseURI null)
    456. -
    457.     {
    458. -
    459.         $graph =$this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI);
    460. -
    461.         $this->addNamedGraph(&$graph);
    462. -
    463.         
    464. -
    465.         return $graph;
    466. -
    467.     }
    468. -
    469.     
    470. -
    471.     /**
    472. -
    473.      * Deletes all NamedGraphs from the set.
    474. -
    475.      */
    476. -
    477.     function clear()
    478. -
    479.     {
    480. -
    481.         $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'");    
    482. -
    483.     }
    484. -
    485.  
    486. -
    487.     /** 
    488. -
    489.      * Returns the number of NamedGraphs in the set. Empty graphs are counted.
    490. -
    491.      *
    492. -
    493.      * @return int 
    494. -
    495.      */
    496. -
    497.     function countGraphs(
    498. -
    499.     {
    500. -
    501.         return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'"));    
    502. -
    503.     }
    504. -
    505.     
    506. -
    507.     /**
    508. -
    509.      * Returns an iterator over all {@link NamedGraph}s in the set.
    510. -
    511.      *
    512. -
    513.      * @return IteratorAllGraphsDb 
    514. -
    515.      */
    516. -
    517.     function &listNamedGraphs()
    518. -
    519.     {
    520. -
    521.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    522. -
    523.         return (new IteratorAllGraphsDb(&$recordSet,&$this));
    524. -
    525.     }
    526. -
    527.     
    528. -
    529.     /**
    530. -
    531.      * Tells wether the set contains any NamedGraphs.
    532. -
    533.      *
    534. -
    535.      * @return boolean 
    536. -
    537.      */
    538. -
    539.     function isEmpty()
    540. -
    541.     {
    542. -
    543.         return ($this->countGraphs()==0);    
    544. -
    545.     }
    546. -
    547.  
    548. -
    549.     /**
    550. -
    551.      * Add all named graphs of the other dataset to this dataset.
    552. -
    553.      *
    554. -
    555.      * @param Dataset 
    556. -
    557.      */
    558. -
    559.     function addAll($otherDataset)
    560. -
    561.     {
    562. -
    563.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next()) 
    564. -
    565.         {
    566. -
    567.             $this->addNamedGraph($iterator->current());
    568. -
    569.          };
    570. -
    571.          
    572. -
    573.          if ($otherDataset->hasDefaultGraph())
    574. -
    575.          {
    576. -
    577.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());    
    578. -
    579.          }
    580. -
    581.     }
    582. -
    583.     
    584. -
    585. //    === Quad level methods ========================
    586. -
    587.  
    588. -
    589.     
    590. -
    591.     /**
    592. -
    593.      * Adds a quad to the Dataset. The argument must not contain any
    594. -
    595.      * wildcards. If the quad is already present, nothing happens. A new
    596. -
    597.      * named graph will automatically be created if necessary.
    598. -
    599.      *
    600. -
    601.      * @param Quad 
    602. -
    603.      */
    604. -
    605.     function addQuad(&$quad)
    606. -
    607.     {
    608. -
    609.         $graphName=$quad->getGraphName();
    610. -
    611.         $graphName=$graphName->getLabel();
    612. -
    613.         
    614. -
    615.         $graph=$this->getNamedGraph($graphName);
    616. -
    617.         
    618. -
    619.         if ($graph===null)
    620. -
    621.             $graph=$this->createGraph($graphName);
    622. -
    623.         
    624. -
    625.         $statement=$quad->getStatement();
    626. -
    627.         $graph->add($statement);
    628. -
    629.     }
    630. -
    631.     
    632. -
    633.     /**
    634. -
    635.      * Tells wether the Dataset contains a quad or
    636. -
    637.      * quads matching a pattern.
    638. -
    639.      * 
    640. -
    641.      * @param Resource 
    642. -
    643.      * @param Resource 
    644. -
    645.      * @param Resource 
    646. -
    647.      * @param Resource 
    648. -
    649.      * @return boolean 
    650. -
    651.      */
    652. -
    653.     function containsQuad($graphName,$subject,$predicate,$object)
    654. -
    655.     {
    656. -
    657.         // static part of the sql statement
    658. -
    659.         $sql "SELECT count(*)
    660. -
    661.                   FROM statements, dataset_model
    662. -
    663.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    664. -
    665.  
    666. -
    667.         if($graphName!=null)
    668. -
    669.         {
    670. -
    671.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    672. -
    673.         }
    674. -
    675.         
    676. -
    677.         // dynamic part of the sql statement
    678. -
    679.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    680. -
    681.  
    682. -
    683.         return (($this->dbConnection->GetOne($sql))>0);
    684. -
    685.     
    686. -
    687.     
    688. -
    689.     /**
    690. -
    691.      * Deletes a Quad from the RDF dataset.
    692. -
    693.      *
    694. -
    695.      * @param Quad 
    696. -
    697.      */
    698. -
    699.     function removeQuad($quad)
    700. -
    701.     {
    702. -
    703.         $graphName=$quad->getGraphName();$graphName=$graphName->getLabel();
    704. -
    705.         //find namedGraph IDs
    706. -
    707.         $graphID $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'");
    708. -
    709.  
    710. -
    711.         // static part of the sql statement
    712. -
    713.         $sql "DELETE FROM statements WHERE modelID = $graphID";
    714. -
    715.  
    716. -
    717.         // dynamic part of the sql statement
    718. -
    719.         $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject()$quad->getPredicate()$quad->getObject());
    720. -
    721.  
    722. -
    723.         // execute the query
    724. -
    725.         if($graphID)
    726. -
    727.             $recordSet =$this->dbConnection->execute($sql);
    728. -
    729.     }
    730. -
    731.     
    732. -
    733.     /**
    734. -
    735.      * Counts the Quads in the RDF dataset. Identical Triples in
    736. -
    737.      * different NamedGraphs are counted individually.
    738. -
    739.      *
    740. -
    741.      * @return int 
    742. -
    743.      */
    744. -
    745.     function countQuads()
    746. -
    747.     {
    748. -
    749.         $sql "SELECT count(*)
    750. -
    751.                   FROM statements, dataset_model
    752. -
    753.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    754. -
    755.         
    756. -
    757.         return ((int)$this->dbConnection->GetOne($sql));
    758. -
    759.     }
    760. -
    761.     
    762. -
    763.     /**
    764. -
    765.      * Finds Statements that match a quad pattern. The argument may contain
    766. -
    767.      * wildcards.
    768. -
    769.      *
    770. -
    771.      * @param Resource or null
    772. -
    773.      * @param Resource or null
    774. -
    775.      * @param Resource or null
    776. -
    777.      * @param Resource or null
    778. -
    779.      * @return IteratorFindQuadsDb 
    780. -
    781.      */
    782. -
    783.     function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false )
    784. -
    785.     {
    786. -
    787.         // static part of the sql statement
    788. -
    789.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI
    790. -
    791.                   FROM statements, dataset_model
    792. -
    793.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    794. -
    795.  
    796. -
    797.         if($graphName!=null)
    798. -
    799.         {
    800. -
    801.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    802. -
    803.         }
    804. -
    805.         
    806. -
    807.         // dynamic part of the sql statement
    808. -
    809.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    810. -
    811.  
    812. -
    813.         // execute the query
    814. -
    815.         $recordSet =$this->dbConnection->execute($sql);
    816. -
    817.         
    818. -
    819.  
    820. -
    821.         return new IteratorFindQuadsDb(&$recordSet,&$this,$returnAsTriples);
    822. -
    823.     }
    824. -
    825.     
    826. -
    827.     /**
    828. -
    829.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    830. -
    831.      * wildcards.
    832. -
    833.      *
    834. -
    835.      * @param Resource or null
    836. -
    837.      * @param Resource or null
    838. -
    839.      * @param Resource or null
    840. -
    841.      * @return IteratorFindQuadsDb 
    842. -
    843.      */
    844. -
    845.     function &findInDefaultGraph($subject,$predicate,$object)
    846. -
    847.     {
    848. -
    849.         $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI");
    850. -
    851.         // static part of the sql statement
    852. -
    853.         $sql "SELECT subjectpredicateobjectl_languagel_datatypesubject_isobject_is
    854. -
    855.                   FROM statements
    856. -
    857.                    WHERE modelID ='$defaultGraphID'";
    858. -
    859.         
    860. -
    861.         // dynamic part of the sql statement
    862. -
    863.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    864. -
    865.  
    866. -
    867.         // execute the query
    868. -
    869.         $recordSet =$this->dbConnection->execute($sql);
    870. -
    871.         
    872. -
    873.         return new IteratorFindQuadsDb(&$recordSet,&$this,true);
    874. -
    875.     }
    876. -
    877. }
    878. -
    879. ?>
    880. -
    -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:25:20 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetMem.php.html.svn-base deleted file mode 100755 index 56a78049..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetDatasetMem.php.html.svn-base +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - File Source for DatasetMem.php - - - - - -

    Source for file DatasetMem.php

    -

    Documentation is available at DatasetMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Dataset.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'dataset/NamedGraphMem.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DatasetMem
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * In-memory implementation of a RDF dataset.
    20. -
    21. * A RDF dataset set is a collection of named RDF graphs.
    22. -
    23. *
    24. -
    25. @version  $Id$
    26. -
    27. @author Daniel Westphal (http://www.d-westphal.de)
    28. -
    29. @author Chris Bizer <chris@bizer.de>
    30. -
    31. *
    32. -
    33. @package     dataset
    34. -
    35. @access    public
    36. -
    37. ***/
    38. -
    39.  
    40. -
    41. class DatasetMem extends Dataset
    42. -
    43. {
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * Reference to a Memmodel that holds the default graph.
    50. -
    51.     *
    52. -
    53.     * @var        resource Memmodel
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $defaultGraph;
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Name of the DatasetMem.
    68. -
    69.     *
    70. -
    71.     * @var        string 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $setName;
    78. -
    79.  
    80. -
    81.     /**
    82. -
    83.     * List of all NamedGraphs.
    84. -
    85.     *
    86. -
    87.     * @var        array 
    88. -
    89.     * @access    private
    90. -
    91.     */
    92. -
    93.     var $graphs=array();
    94. -
    95.  
    96. -
    97.     /**
    98. -
    99.     * Constructor.
    100. -
    101.     * You can supply a Dataset name.
    102. -
    103.     *
    104. -
    105.     * @param string 
    106. -
    107.     * @access    public
    108. -
    109.     */
    110. -
    111.     function DatasetMem($datasetName null)
    112. -
    113.     {
    114. -
    115.         $this->setDatasetName($datasetName);
    116. -
    117.         $this->defaultGraph=new MemModel();
    118. -
    119.     }
    120. -
    121.  
    122. -
    123. //    === Graph level methods ========================
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     * Sets the Datasets name.
    130. -
    131.     *
    132. -
    133.     * @param  string 
    134. -
    135.     * @access    public
    136. -
    137.     */
    138. -
    139.     function setDatasetName($datasetName)
    140. -
    141.     {
    142. -
    143.         $this->setName=$datasetName;
    144. -
    145.     }
    146. -
    147.  
    148. -
    149.     /**
    150. -
    151.     * Returns the Datasets name.
    152. -
    153.     *
    154. -
    155.     * @return string 
    156. -
    157.     * @access    public
    158. -
    159.     */
    160. -
    161.     function getDatasetName()
    162. -
    163.     {
    164. -
    165.         return $this->setName;
    166. -
    167.     }
    168. -
    169.  
    170. -
    171.     /**
    172. -
    173.      * Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    174. -
    175.      *
    176. -
    177.      * @param NamedGraphMem 
    178. -
    179.      */
    180. -
    181.     function addNamedGraph(&$graph)
    182. -
    183.     {
    184. -
    185.         $graphNameURI=$graph->getGraphName();
    186. -
    187.         $this->graphs[$graphNameURI]=&$graph;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.      * Overwrites the existting default graph.
    196. -
    197.      *
    198. -
    199.      * @param MemModel 
    200. -
    201.      */
    202. -
    203.     function setDefaultGraph(&$graph)
    204. -
    205.     {
    206. -
    207.         $this->defaultGraph=&$graph;
    208. -
    209.     }
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.      * Returns a reference to the defaultGraph
    216. -
    217.      * @return Model 
    218. -
    219.     */
    220. -
    221.     function &getDefaultGraph()
    222. -
    223.     {
    224. -
    225.         return $this->defaultGraph;
    226. -
    227.     }
    228. -
    229.  
    230. -
    231.     /**
    232. -
    233.      * Returns true, if an defaultGraph exists. False otherwise    .
    234. -
    235.      *
    236. -
    237.      * @return boolean 
    238. -
    239.     */
    240. -
    241.     function hasDefaultGraph()
    242. -
    243.     {
    244. -
    245.         return $this->defaultGraph != null;
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     /**
    252. -
    253.      * Removes a NamedGraph from the set. Nothing happens
    254. -
    255.      * if no graph with that name is contained in the set.
    256. -
    257.      *
    258. -
    259.      * @param string 
    260. -
    261.      */
    262. -
    263.     function removeNamedGraph($graphName)
    264. -
    265.     {
    266. -
    267.         unset($this->graphs[$graphName]);
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     /**
    274. -
    275.      * Tells wether the Dataset contains a NamedGraph.
    276. -
    277.      *
    278. -
    279.      * @param  string 
    280. -
    281.      * @return boolean 
    282. -
    283.      */
    284. -
    285.     function containsNamedGraph($graphName)
    286. -
    287.     {
    288. -
    289.         return isset($this->graphs[$graphName]=== true;
    290. -
    291.     }
    292. -
    293.  
    294. -
    295.     /**
    296. -
    297.      * Returns the NamedGraph with a specific name from the Dataset.
    298. -
    299.      * Changes to the graph will be reflected in the set.
    300. -
    301.      *
    302. -
    303.      * @param string 
    304. -
    305.      * @return NamedGraphMem or NULL
    306. -
    307.      */
    308. -
    309.     function &getNamedGraph($graphName)
    310. -
    311.     {
    312. -
    313.         if (!isset($this->graphs[$graphName])) return NULL;
    314. -
    315.         return $this->graphs[$graphName];
    316. -
    317.     }
    318. -
    319.  
    320. -
    321.     /**
    322. -
    323.      * Returns the names of the namedGraphs in this set as strings in an array.
    324. -
    325.      *
    326. -
    327.      * @return Array 
    328. -
    329.      */
    330. -
    331.     function listGraphNames()
    332. -
    333.     {
    334. -
    335.         return array_keys($this->graphs);
    336. -
    337.     }
    338. -
    339.  
    340. -
    341.     /**
    342. -
    343.      * Creates a new NamedGraph and adds it to the set. An existing
    344. -
    345.      * graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    346. -
    347.      *
    348. -
    349.      * @param  string 
    350. -
    351.      * @param  string 
    352. -
    353.      * @return NamedGraphMem 
    354. -
    355.      */
    356. -
    357.     function &createGraph($graphName,$baseURI null)
    358. -
    359.     {
    360. -
    361.         $this->graphs[$graphName]=new NamedGraphMem($graphName,$baseURI);
    362. -
    363.         return $this->getNamedGraph($graphName);
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.      * Deletes all NamedGraphs from the set.
    372. -
    373.      */
    374. -
    375.     function clear()
    376. -
    377.     {
    378. -
    379.         $this->graphs array();
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     /**
    386. -
    387.      * Returns the number of NamedGraphs in the set. Empty graphs
    388. -
    389.      * are counted.
    390. -
    391.      *
    392. -
    393.      * @return int 
    394. -
    395.      */
    396. -
    397.     function countGraphs()
    398. -
    399.     {
    400. -
    401.         return count($this->graphs);
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     /**
    408. -
    409.      * Returns the NamedGraph with a specific offset in the dataset.
    410. -
    411.      * Changes to the graph will be reflected in the set.
    412. -
    413.      *
    414. -
    415.      * @param int 
    416. -
    417.      * @return NamedGraphMem or null
    418. -
    419.      * @access    private
    420. -
    421.      */
    422. -
    423.     function &getGraphWithOffset($offset)
    424. -
    425.     {
    426. -
    427.         $i=0;
    428. -
    429.         foreach ($this->graphs as $graph)
    430. -
    431.         {
    432. -
    433.             if (($i++)==$offset)
    434. -
    435.                 return $graph;
    436. -
    437.         }
    438. -
    439.         $n null;
    440. -
    441.         return $n;
    442. -
    443.     }
    444. -
    445.  
    446. -
    447.     /**
    448. -
    449.      * Returns an iterator over all {@link NamedGraph}s in the set.
    450. -
    451.      *
    452. -
    453.      * @return IteratorAllGraphsMem 
    454. -
    455.      */
    456. -
    457.     function &listNamedGraphs()
    458. -
    459.     {
    460. -
    461.         require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsMem.php';
    462. -
    463.         $m new IteratorAllGraphsMem($this);
    464. -
    465.         return $m;
    466. -
    467.     }
    468. -
    469.  
    470. -
    471.     /**
    472. -
    473.      * Tells wether the set contains any NamedGraphs.
    474. -
    475.      *
    476. -
    477.      * @return boolean 
    478. -
    479.      */
    480. -
    481.     function isEmpty()
    482. -
    483.     {
    484. -
    485.         return $this->countGraphs(== 0;
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     /**
    492. -
    493.      * Adds all named graphs of the other dataset to this dataset.
    494. -
    495.      *
    496. -
    497.      * @param Dataset 
    498. -
    499.      */
    500. -
    501.     function addAll($otherDataset)
    502. -
    503.     {
    504. -
    505.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next())
    506. -
    507.         {
    508. -
    509.             $current=$iterator->current();
    510. -
    511.             $this->graphs[$current->getGraphName()]=$current;
    512. -
    513.          }
    514. -
    515.  
    516. -
    517.          if ($otherDataset->hasDefaultGraph())
    518. -
    519.          {
    520. -
    521.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());
    522. -
    523.          }
    524. -
    525.     }
    526. -
    527.  
    528. -
    529. //    === Quad level methods ========================
    530. -
    531.  
    532. -
    533.     /**
    534. -
    535.      * Adds a quad to the Dataset. The argument must not contain any
    536. -
    537.      * wildcards. If the quad is already present, nothing happens. A new
    538. -
    539.      * named graph will automatically be created if necessary.
    540. -
    541.      *
    542. -
    543.      * @param Quad 
    544. -
    545.      */
    546. -
    547.     function addQuad(&$quad)
    548. -
    549.     {
    550. -
    551.         $graphName=$quad->getGraphName();
    552. -
    553.         if ($this->containsNamedGraph($graphName->getLabel())===false)
    554. -
    555.             $this->createGraph($graphName->getLabel());
    556. -
    557.  
    558. -
    559.         $this->graphs[$graphName->getLabel()]->add($quad->getStatement());
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.  
    566. -
    567.     /**
    568. -
    569.      * Tells wether the Dataset contains a quad or
    570. -
    571.      * quads matching a pattern.
    572. -
    573.      *
    574. -
    575.      * @param Resource $graphName 
    576. -
    577.      * @param Resource $subject 
    578. -
    579.      * @param Resource $predicate 
    580. -
    581.      * @param Resource $object 
    582. -
    583.      * @return boolean 
    584. -
    585.      */
    586. -
    587.     function containsQuad($graphName,$subject,$predicate,$object)
    588. -
    589.     {
    590. -
    591.         if($graphName!=null)
    592. -
    593.         {
    594. -
    595.             if ($this->containsNamedGraph($graphName->getLabel())!==true)
    596. -
    597.                 return false;
    598. -
    599.  
    600. -
    601.             return ($this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject,$predicate,$object)!=null);
    602. -
    603.         }
    604. -
    605.  
    606. -
    607.         foreach ($this->graphs as $graph)
    608. -
    609.         {
    610. -
    611.             if ($graph->findFirstMatchingStatement($subject,$predicate,$object)!=null)
    612. -
    613.                 return true;
    614. -
    615.         };
    616. -
    617.  
    618. -
    619.         return false;
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     /**
    626. -
    627.      * Deletes a Quad from the RDF dataset.
    628. -
    629.      *
    630. -
    631.      * @param Quad 
    632. -
    633.      */
    634. -
    635.     function removeQuad($quad)
    636. -
    637.     {
    638. -
    639.             $graphName=$quad->getGraphName();
    640. -
    641.  
    642. -
    643.             if($graphName!=null)
    644. -
    645.             {
    646. -
    647.                 if ($this->containsNamedGraph($graphName->getLabel())!==true)
    648. -
    649.                     return;
    650. -
    651.  
    652. -
    653.                 return ($this->graphs[$graphName->getLabel()]->remove($quad->getStatement())!=null);
    654. -
    655.  
    656. -
    657.             }
    658. -
    659.             foreach ($this->graphs as $graph)
    660. -
    661.             {
    662. -
    663.                 $graph->remove($quad->getStatement());
    664. -
    665.             };
    666. -
    667.     }
    668. -
    669.  
    670. -
    671.     /**
    672. -
    673.      * Counts the Quads in the RDF dataset. Identical Triples in
    674. -
    675.      * different NamedGraphs are counted individually.
    676. -
    677.      *
    678. -
    679.      * @return int 
    680. -
    681.      */
    682. -
    683.     function countQuads()
    684. -
    685.     {
    686. -
    687.         $count=0;
    688. -
    689.         foreach ($this->graphs as $graph)
    690. -
    691.         {
    692. -
    693.             $count+=$graph->size();
    694. -
    695.         }
    696. -
    697.         return $count;
    698. -
    699.     }
    700. -
    701.  
    702. -
    703.     /**
    704. -
    705.      * Finds Statements that match a quad pattern. The argument may contain
    706. -
    707.      * wildcards.
    708. -
    709.      *
    710. -
    711.      * @param Resource or Null
    712. -
    713.      * @param Resourceor Null
    714. -
    715.      * @param Resource or Null
    716. -
    717.      * @param Resource or Null
    718. -
    719.      * @return Iterator 
    720. -
    721.      */
    722. -
    723.     function &findInNamedGraphs($graph,$subject,$predicate,$object,$returnAsTriples false)
    724. -
    725.     {
    726. -
    727.  
    728. -
    729.         if ($graph!=null)
    730. -
    731.         {
    732. -
    733.             $findGraph=&$this->getNamedGraph($graph->getLabel());
    734. -
    735.             if($findGraph==null)
    736. -
    737.                 $findGraph=new MemModel();
    738. -
    739.  
    740. -
    741.             return $findGraph->iterFind($subject,$predicate,$object);
    742. -
    743.         }
    744. -
    745.  
    746. -
    747.  
    748. -
    749.         require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsMem.php';
    750. -
    751.         $m new IteratorFindQuadsMem($subject,$predicate,$object,$this->listNamedGraphs(),$returnAsTriples);
    752. -
    753.         return $m;
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     /**
    760. -
    761.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    762. -
    763.      * wildcards.
    764. -
    765.      *
    766. -
    767.      * @param Resource or Null
    768. -
    769.      * @param Resource or Null
    770. -
    771.      * @param Resource or Null
    772. -
    773.      * @return Iterator 
    774. -
    775.      */
    776. -
    777.     function &findInDefaultGraph($subject,$predicate,$object)
    778. -
    779.     {
    780. -
    781.         return $this->defaultGraph->iterFind($subject,$predicate,$object);
    782. -
    783.     }
    784. -
    785. }
    786. -
    787. ?>
    788. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:42 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base deleted file mode 100755 index 5b0f0943..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsDb.php.html.svn-base +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - File Source for IteratorAllGraphsDb.php - - - - - -

    Source for file IteratorAllGraphsDb.php

    -

    Documentation is available at IteratorAllGraphsDb.php

    -
    -
    1. <?php 
    2. -
    3. //----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorAllGraphsDb
    6. -
    7. //----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a Graph iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used in a for-loop like:
    20. -
    21. * for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentResource=$iterator->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. @version  $Id$
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     dataset
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Holds a reference to the associated DB resultSet
    51. -
    52.     * @var        $dbResultSets ADODB result
    53. -
    54.     * @access    private
    55. -
    56.     */
    57. -
    58.     var $dbResultSet;
    59. -
    60.     
    61. -
    62.     /**
    63. -
    64.     * Holds a reference to the associated datasetDb
    65. -
    66.     * @var        datasetDb 
    67. -
    68.     * @access    private
    69. -
    70.     */
    71. -
    72.     var $datasetDb;
    73. -
    74.     
    75. -
    76.     
    77. -
    78.     /**
    79. -
    80.     * The current position
    81. -
    82.     * @var        integer 
    83. -
    84.     * @access    private
    85. -
    86.     */
    87. -
    88.     var $key;
    89. -
    90.     
    91. -
    92.     
    93. -
    94.     /**
    95. -
    96.     * The current NamedGraph
    97. -
    98.     * @var obejct NamedGraph
    99. -
    100.     * @access    private
    101. -
    102.     */
    103. -
    104.     var $current;
    105. -
    106.     
    107. -
    108.     
    109. -
    110.     
    111. -
    112.     /**
    113. -
    114.     * Constructor.
    115. -
    116.     *
    117. -
    118.     *
    119. -
    120.     * @param ADODBResultSet 
    121. -
    122.     * @param DatasetDb 
    123. -
    124.     * @access    public
    125. -
    126.     */
    127. -
    128.     function IteratorAllGraphsDb(&$dbResultSet,&$datasetDb)
    129. -
    130.     {
    131. -
    132.         $this->dbResultSet=$dbResultSet;
    133. -
    134.         $this->datasetDb=$datasetDb;
    135. -
    136.         $this->current $this->dbResultSet->fields[0];
    137. -
    138.     }
    139. -
    140.     
    141. -
    142.     /**
    143. -
    144.     * Resets iterator list to start
    145. -
    146.     *
    147. -
    148.     * @access public
    149. -
    150.     */
    151. -
    152.     function rewind()
    153. -
    154.     {
    155. -
    156.         //not supported
    157. -
    158.     }
    159. -
    160.     
    161. -
    162.     /**
    163. -
    164.     * Says if there are additional items left in the list
    165. -
    166.     *
    167. -
    168.     * @return    boolean 
    169. -
    170.     * @access    public
    171. -
    172.     */
    173. -
    174.     function valid()
    175. -
    176.     {
    177. -
    178.         return (!$this->dbResultSet->EOF);
    179. -
    180.     }
    181. -
    182.     
    183. -
    184.     /**
    185. -
    186.     * Moves Iterator to the next item in the list
    187. -
    188.     *
    189. -
    190.     * @access    public
    191. -
    192.     */
    193. -
    194.     function next()
    195. -
    196.     {
    197. -
    198.         $this->dbResultSet->moveNext();
    199. -
    200.         $this->current $this->dbResultSet->fields[0];
    201. -
    202.     }
    203. -
    204.     
    205. -
    206.     /**
    207. -
    208.     * Returns the current item
    209. -
    210.     *
    211. -
    212.     * @return    mixed 
    213. -
    214.     * @access    public
    215. -
    216.     */
    217. -
    218.     function &current()
    219. -
    220.     {
    221. -
    222.         return ($this->datasetDb->getNamedGraph($this->current));
    223. -
    224.     }
    225. -
    226.     
    227. -
    228.     
    229. -
    230.     /**
    231. -
    232.     * Returns the key of the current item
    233. -
    234.     *
    235. -
    236.     * @return    integer 
    237. -
    238.     * @access    public
    239. -
    240.     */
    241. -
    242.     function key()
    243. -
    244.     {
    245. -
    246.         return $this->dbResultSet->_currentRow;
    247. -
    248.     }
    249. -
    250. }
    251. -
    252. ?>
    253. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base deleted file mode 100755 index 18fcc843..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorAllGraphsMem.php.html.svn-base +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - File Source for IteratorAllGraphsMem.php - - - - - -

    Source for file IteratorAllGraphsMem.php

    -

    Documentation is available at IteratorAllGraphsMem.php

    -
    -
    1. <?php 
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorAllGraphsMem
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a Graph iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used in a for-loop like:
    20. -
    21. * for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentResource=$it->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. @version  $Id$
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     dataset
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Holds a reference to the associated RDF dataset
    51. -
    52.     *
    53. -
    54.     * @var        object dataset 
    55. -
    56.     * @access    private
    57. -
    58.     */
    59. -
    60.     var $associatedGraphSet;
    61. -
    62.     
    63. -
    64.     /**
    65. -
    66.     * The current position
    67. -
    68.     *
    69. -
    70.     * @var        integer 
    71. -
    72.     * @access    private
    73. -
    74.     */
    75. -
    76.     var $key;
    77. -
    78.     
    79. -
    80.     /**
    81. -
    82.     * If the current resource is valid
    83. -
    84.     *
    85. -
    86.     * @var        boolean 
    87. -
    88.     * @access    private
    89. -
    90.     */
    91. -
    92.     var $valid;
    93. -
    94.     
    95. -
    96.     /**
    97. -
    98.     * The current NamedGraph
    99. -
    100.     *
    101. -
    102.     * @var obejct NamedGraph
    103. -
    104.     * @access    private
    105. -
    106.     */
    107. -
    108.     var $current;
    109. -
    110.     
    111. -
    112.     
    113. -
    114.     /**
    115. -
    116.     * Constructor.
    117. -
    118.     *
    119. -
    120.     * @param dataset 
    121. -
    122.     * @access    public
    123. -
    124.     */
    125. -
    126.     function IteratorAllGraphsMem(&$namedGraphSet)
    127. -
    128.     {
    129. -
    130.         $this->associatedGraphSet=&$namedGraphSet;
    131. -
    132.         $this->rewind();
    133. -
    134.     }
    135. -
    136.     
    137. -
    138.     /**
    139. -
    140.     * Resets iterator list to start
    141. -
    142.     *
    143. -
    144.     * @access public
    145. -
    146.     */
    147. -
    148.     function rewind()
    149. -
    150.     {
    151. -
    152.         $this->key = -1;
    153. -
    154.         $this->next();
    155. -
    156.     }
    157. -
    158.     
    159. -
    160.     /**
    161. -
    162.     * Says if there are additional items left in the list.
    163. -
    164.     *
    165. -
    166.     * @return    boolean 
    167. -
    168.     * @access    public
    169. -
    170.     */
    171. -
    172.     function valid()
    173. -
    174.     {
    175. -
    176.         return $this->valid;
    177. -
    178.     }
    179. -
    180.     
    181. -
    182.     /**
    183. -
    184.     * Moves Iterator to the next item in the list.
    185. -
    186.     *
    187. -
    188.     * @access    public
    189. -
    190.     */
    191. -
    192.     function next()
    193. -
    194.     {
    195. -
    196.         $this->current &$this->associatedGraphSet->getGraphWithOffset(++$this->key);
    197. -
    198.         $this->valid=($this->current!=NULL);
    199. -
    200.     }
    201. -
    202.     
    203. -
    204.     /**
    205. -
    206.     * Returns the current item.
    207. -
    208.     *
    209. -
    210.     * @return    mixed 
    211. -
    212.     * @access    public
    213. -
    214.     */
    215. -
    216.     function &current()
    217. -
    218.     {
    219. -
    220.         return $this->current;
    221. -
    222.     }
    223. -
    224.     
    225. -
    226.     /**
    227. -
    228.     * Returns the key of the current item.
    229. -
    230.     *
    231. -
    232.     * @return    integer 
    233. -
    234.     * @access    public
    235. -
    236.     */
    237. -
    238.     function key()
    239. -
    240.     {
    241. -
    242.         return $this->key;
    243. -
    244.     }
    245. -
    246. }
    247. -
    248. ?>
    249. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base deleted file mode 100755 index ee0c2bbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsDb.php.html.svn-base +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - File Source for IteratorFindQuadsDb.php - - - - - -

    Source for file IteratorFindQuadsDb.php

    -

    Documentation is available at IteratorFindQuadsDb.php

    -
    -
    1. <?php 
    2. -
    3. //----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorFindQuadsDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a quad iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used like:
    20. -
    21. * for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentQuad=$iterator->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. *
    32. -
    33. @version  $Id$
    34. -
    35. @author Daniel Westphal (http://www.d-westphal.de)
    36. -
    37. *
    38. -
    39. *
    40. -
    41. @package     dataset
    42. -
    43. @access    public
    44. -
    45. ***/
    46. -
    47. -
    48. {
    49. -
    50.     /**
    51. -
    52.     * Holds a reference to the associated DB resultSet.
    53. -
    54.     *
    55. -
    56.     * @var        $dbResultSets ADODB result
    57. -
    58.     * @access    private
    59. -
    60.     */
    61. -
    62.     var $dbResultSet;
    63. -
    64.     
    65. -
    66.     /**
    67. -
    68.     * Holds a reference to the associated datasetDb.
    69. -
    70.     *
    71. -
    72.     * @var        $datasetDb datasetDb
    73. -
    74.     * @access    private
    75. -
    76.     */
    77. -
    78.     var $datasetDb;
    79. -
    80.  
    81. -
    82.     /**
    83. -
    84.     * boolean value, if the results should be returned as triples.
    85. -
    86.     *
    87. -
    88.     * @var        boolean 
    89. -
    90.     * @access    private
    91. -
    92.     */
    93. -
    94.     var $returnAsTriples;
    95. -
    96.     
    97. -
    98.     /**
    99. -
    100.     * Constructor.
    101. -
    102.     *
    103. -
    104.     * @param dataset 
    105. -
    106.     * @access    public
    107. -
    108.     */
    109. -
    110.     function IteratorFindQuadsDb(&$dbResultSet,&$datasetDb,$returnAsTriples=false)
    111. -
    112.     {
    113. -
    114.         $this->dbResultSet=$dbResultSet;
    115. -
    116.         $this->datasetDb=$datasetDb;
    117. -
    118.         $this->returnAsTriples=$returnAsTriples;
    119. -
    120.     }
    121. -
    122.     
    123. -
    124.     /**
    125. -
    126.     * Resets iterator list to start.
    127. -
    128.     *
    129. -
    130.     * @access public
    131. -
    132.     */
    133. -
    134.     function rewind()
    135. -
    136.     {
    137. -
    138.         //not supported
    139. -
    140.     }
    141. -
    142.     
    143. -
    144.     /**
    145. -
    146.     * Says if there are additional items left in the list.
    147. -
    148.     *
    149. -
    150.     * @return    boolean 
    151. -
    152.     * @access    public
    153. -
    154.     */
    155. -
    156.     function valid()
    157. -
    158.     {
    159. -
    160.         if (($this->dbResultSet ===falseOR ($this->dbResultSet->EOF) )
    161. -
    162.             return false;
    163. -
    164.         
    165. -
    166.         return true;
    167. -
    168.     }
    169. -
    170.     
    171. -
    172.     /**
    173. -
    174.     * Moves Iterator to the next item in the list.
    175. -
    176.     *
    177. -
    178.     * @access    public
    179. -
    180.     */
    181. -
    182.     function next()
    183. -
    184.     {
    185. -
    186.         if ($this->dbResultSet!==false)
    187. -
    188.             $this->dbResultSet->moveNext();
    189. -
    190.     }
    191. -
    192.     
    193. -
    194.     /**
    195. -
    196.     * Returns the current item.
    197. -
    198.     *
    199. -
    200.     * @return    mixed 
    201. -
    202.     * @access    public
    203. -
    204.     */
    205. -
    206.     function &current()
    207. -
    208.     {
    209. -
    210.         if ($this->dbResultSet===false)
    211. -
    212.             return null;
    213. -
    214.         // subject
    215. -
    216.         if ($this->dbResultSet->fields[5== 'r')
    217. -
    218.         $sub new Resource($this->dbResultSet->fields[0]);
    219. -
    220.         else
    221. -
    222.         $sub new BlankNode($this->dbResultSet->fields[0]);
    223. -
    224.  
    225. -
    226.         // predicate
    227. -
    228.         $pred new Resource($this->dbResultSet->fields[1]);
    229. -
    230.  
    231. -
    232.         // object
    233. -
    234.         if ($this->dbResultSet->fields[6== 'r')
    235. -
    236.         $obj new Resource($this->dbResultSet->fields[2]);
    237. -
    238.         elseif ($this->dbResultSet->fields[6== 'b')
    239. -
    240.         $obj new BlankNode($this->dbResultSet->fields[2]);
    241. -
    242.         else {
    243. -
    244.             $obj new Literal($this->dbResultSet->fields[2]$this->dbResultSet->fields[3]);
    245. -
    246.             if ($this->dbResultSet->fields[4])
    247. -
    248.             $obj->setDatatype($this->dbResultSet->fields[4]);
    249. -
    250.         }
    251. -
    252.  
    253. -
    254.         if($this->returnAsTriples)
    255. -
    256.             return (new Statement($sub$pred$obj));
    257. -
    258.  
    259. -
    260.         return (new Quad(new Resource($this->dbResultSet->fields[7]),$sub,$pred,$obj));
    261. -
    262.     }
    263. -
    264.     
    265. -
    266.     /**
    267. -
    268.     * Returns the key of the current item.
    269. -
    270.     *
    271. -
    272.     * @return    integer 
    273. -
    274.     * @access    public
    275. -
    276.     */
    277. -
    278.     function key()
    279. -
    280.     {
    281. -
    282.         return $this->dbResultSet->_currentRow;
    283. -
    284.     }
    285. -
    286. }
    287. -
    288. ?>
    289. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base deleted file mode 100755 index 66784ee9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetIteratorFindQuadsMem.php.html.svn-base +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - File Source for IteratorFindQuadsMem.php - - - - - -

    Source for file IteratorFindQuadsMem.php

    -

    Documentation is available at IteratorFindQuadsMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Quad.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: IteratorFindQuadsMem
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * Implementation of a quad iterator.
    20. -
    21. *
    22. -
    23. * This Iterator should be used like:
    24. -
    25. * for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    26. -
    27. * {
    28. -
    29. *    $currentQuad=$it->current();
    30. -
    31. * };
    32. -
    33. *
    34. -
    35. @version  $Id$
    36. -
    37. @author Daniel Westphal (http://d-westphal.de)
    38. -
    39. *
    40. -
    41. *
    42. -
    43. @package     dataset
    44. -
    45. @access    public
    46. -
    47. ***/
    48. -
    49. -
    50. {
    51. -
    52.     /**
    53. -
    54.     * key value in the current graph.
    55. -
    56.     *
    57. -
    58.     * @var     dataset 
    59. -
    60.     * @access    private
    61. -
    62.     */
    63. -
    64.     var $graphKey;
    65. -
    66.  
    67. -
    68.     /**
    69. -
    70.     * boolean value, if the results should be returned as triples.
    71. -
    72.     *
    73. -
    74.     * @var        boolean 
    75. -
    76.     * @access    private
    77. -
    78.     */
    79. -
    80.     var $returnAsTriples;
    81. -
    82.  
    83. -
    84.     /**
    85. -
    86.     * The current position.
    87. -
    88.     *
    89. -
    90.     * @var        integer 
    91. -
    92.     * @access    private
    93. -
    94.     */
    95. -
    96.     var $key;
    97. -
    98.  
    99. -
    100.     /**
    101. -
    102.     * If the current resource is valid.
    103. -
    104.     *
    105. -
    106.     * @var        boolean 
    107. -
    108.     * @access    private
    109. -
    110.     */
    111. -
    112.     var $valid;
    113. -
    114.  
    115. -
    116.     /**
    117. -
    118.     * The current NamedGraph.
    119. -
    120.     *
    121. -
    122.     * @var  NamedGraph 
    123. -
    124.     * @access    private
    125. -
    126.     */
    127. -
    128.     var $current;
    129. -
    130.  
    131. -
    132.     /**
    133. -
    134.     * The graphName Resource to search for.
    135. -
    136.     *
    137. -
    138.     * @var string 
    139. -
    140.     * @access    private
    141. -
    142.     */
    143. -
    144.     var $findGraphName;
    145. -
    146.  
    147. -
    148.     /**
    149. -
    150.     * The subject Resource to search for.
    151. -
    152.     *
    153. -
    154.     * @var string 
    155. -
    156.     * @access    private
    157. -
    158.     */
    159. -
    160.     var $findSubject;
    161. -
    162.  
    163. -
    164.     /**
    165. -
    166.     * The predicate Resource to search for.
    167. -
    168.     *
    169. -
    170.     * @var string 
    171. -
    172.     * @access    private
    173. -
    174.     */
    175. -
    176.     var $findPredicate;
    177. -
    178.  
    179. -
    180.     /**
    181. -
    182.     * The object Resource to search for.
    183. -
    184.     *
    185. -
    186.     * @var string 
    187. -
    188.     * @access    private
    189. -
    190.     */
    191. -
    192.     var $findObject;
    193. -
    194.  
    195. -
    196.     /**
    197. -
    198.     * Iterator over all graphs of the RDF dataset.
    199. -
    200.     *
    201. -
    202.     * @var string 
    203. -
    204.     * @access    private
    205. -
    206.     */
    207. -
    208.     var $graphIterator;
    209. -
    210.  
    211. -
    212.  
    213. -
    214.     /**
    215. -
    216.     * Constructor.
    217. -
    218.     *
    219. -
    220.     * $subject, $predicate, and $object are used like find().
    221. -
    222.     * $getSPO supports the strings 's', 'p', and 'o' to return
    223. -
    224.     * either the subject, predicate, or object of the result statements.
    225. -
    226.     *
    227. -
    228.     *
    229. -
    230.     * @param Resource 
    231. -
    232.     * @param Resource 
    233. -
    234.     * @param Resource 
    235. -
    236.     * @param dataset 
    237. -
    238.     * @param Boolean 
    239. -
    240.     * @access    public
    241. -
    242.     */
    243. -
    244.     function IteratorFindQuadsMem($subject,$predicate,$object,&$graphIterator$returnAsTriples=false)
    245. -
    246.     {
    247. -
    248.         $this->findSubject=$subject;
    249. -
    250.         $this->findPredicate=$predicate;
    251. -
    252.         $this->findObject=$object;
    253. -
    254.         $this->graphIterator=&$graphIterator;
    255. -
    256.         $this->rewind();
    257. -
    258.         $this->returnAsTriples=$returnAsTriples;
    259. -
    260.     }
    261. -
    262.  
    263. -
    264.     /**
    265. -
    266.     * Resets iterator list to start.
    267. -
    268.     *
    269. -
    270.     * @access    public
    271. -
    272.     */
    273. -
    274.     function rewind()
    275. -
    276.     {
    277. -
    278.         $this->graphIterator->rewind();
    279. -
    280.         $this->key = -1;
    281. -
    282.         $this->graphKey=-1;
    283. -
    284.         $this->next();
    285. -
    286.     }
    287. -
    288.  
    289. -
    290.     /**
    291. -
    292.     * Says if there are additional items left in the list.
    293. -
    294.     *
    295. -
    296.     * @return    boolean 
    297. -
    298.     * @access    public
    299. -
    300.     */
    301. -
    302.     function valid()
    303. -
    304.     {
    305. -
    306.         return $this->valid;
    307. -
    308.     }
    309. -
    310.  
    311. -
    312.     /**
    313. -
    314.     * Moves Iterator to the next item in the list.
    315. -
    316.     *
    317. -
    318.     * @access    public
    319. -
    320.     */
    321. -
    322.     function next()
    323. -
    324.     {
    325. -
    326.         if($this->graphIterator->valid()===false)
    327. -
    328.         {
    329. -
    330.             $this->valid=false;
    331. -
    332.             return;
    333. -
    334.         }
    335. -
    336.  
    337. -
    338.         $currentGraph=&$this->graphIterator->current();
    339. -
    340.         $this->current$currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
    341. -
    342.         if($this->current==null)
    343. -
    344.         {
    345. -
    346.             do
    347. -
    348.             {
    349. -
    350.                 $this->graphIterator->next();
    351. -
    352.                 if($this->graphIterator->valid()===false)
    353. -
    354.                 {
    355. -
    356.                     $this->valid=false;
    357. -
    358.                     return;
    359. -
    360.                 }
    361. -
    362.                 $currentGraph=&$this->graphIterator->current();
    363. -
    364.                 $this->graphKey=-1;
    365. -
    366.                 $this->current$currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
    367. -
    368.  
    369. -
    370.             while ($this->current==null);
    371. -
    372.         }
    373. -
    374.         $this->key++;
    375. -
    376.         $this->valid=true;
    377. -
    378.     }
    379. -
    380.  
    381. -
    382.     /**
    383. -
    384.     * Returns the current item.
    385. -
    386.     *
    387. -
    388.     * @return    mixed 
    389. -
    390.     * @access    public
    391. -
    392.     */
    393. -
    394.     function current()
    395. -
    396.     {
    397. -
    398.         if($this->returnAsTriplesreturn $this->current;
    399. -
    400.  
    401. -
    402.         $currentGraph=&$this->graphIterator->current();
    403. -
    404.         return new Quad(new Resource($currentGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
    405. -
    406.     }
    407. -
    408.  
    409. -
    410.     /**
    411. -
    412.     * Returns the key of the current item.
    413. -
    414.     *
    415. -
    416.     * @return    integer 
    417. -
    418.     * @access    public
    419. -
    420.     */
    421. -
    422.     function key()
    423. -
    424.     {
    425. -
    426.         return $this->key;
    427. -
    428.     }
    429. -
    430. }
    431. -
    432. ?>
    433. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base deleted file mode 100755 index a64b3737..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphDb.php.html.svn-base +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - File Source for NamedGraphDb.php - - - - - -

    Source for file NamedGraphDb.php

    -

    Documentation is available at NamedGraphDb.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: NamedGraphDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Persistent NamedGraph implementation that extends a {@link DbModel}.
    14. -
    15. * The graphName is not stored in the database. As soon as the namedGraph is added
    16. -
    17. * to a RDF dataset the graphName is saved.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class NamedGraphDb extends DbModel  
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphDb
    42. -
    43.     *
    44. -
    45.     * @var        string 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Constructor
    58. -
    59.     * Do not call this directly.
    60. -
    61.     * Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.
    62. -
    63.     *
    64. -
    65.     * @param   ADODBConnection 
    66. -
    67.     * @param   string 
    68. -
    69.     * @param   string 
    70. -
    71.     * @param   string 
    72. -
    73.     * @access    public
    74. -
    75.     */        
    76. -
    77.     function NamedGraphDb(&$dbConnection$modelURI$modelID,$graphName$baseURI=NULL)
    78. -
    79.     {
    80. -
    81.         $this->dbConn =$dbConnection;
    82. -
    83.         $this->modelURI $modelURI;
    84. -
    85.         $this->modelID $modelID;
    86. -
    87.         $this->baseURI $this->_checkBaseURI($baseURI);
    88. -
    89.         $this->graphName $graphName;
    90. -
    91.     }
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * Sets the graph name.
    98. -
    99.     *
    100. -
    101.     * @param string 
    102. -
    103.     * @access    public
    104. -
    105.     */    
    106. -
    107.     function setGraphName($graphName)
    108. -
    109.     {
    110. -
    111.         $this->graphName=$graphName;
    112. -
    113.     }
    114. -
    115.     
    116. -
    117.     /**
    118. -
    119.     * Returns the graph name.
    120. -
    121.     *
    122. -
    123.     * @return string 
    124. -
    125.     * @access    public
    126. -
    127.     */
    128. -
    129.     function getGraphName()
    130. -
    131.     {
    132. -
    133.         return $this->graphName;
    134. -
    135.     }
    136. -
    137. }
    138. -
    139. ?>
    140. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base deleted file mode 100755 index 6f2ae235..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetNamedGraphMem.php.html.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for NamedGraphMem.php - - - - - -

    Source for file NamedGraphMem.php

    -

    Documentation is available at NamedGraphMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: NamedGraphMem
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * NamedGraph implementation that extends a {@link MemModel}
    16. -
    17. * with a name.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <http://www.d-westphal.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class NamedGraphMem extends MemModel
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphMem.
    42. -
    43.     *
    44. -
    45.     * @var         string 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.  
    54. -
    55.  
    56. -
    57.     /**
    58. -
    59.     * Constructor
    60. -
    61.     * You have to supply a graph name. You can supply a URI.
    62. -
    63.     *
    64. -
    65.     * @param  string 
    66. -
    67.     * @param  string 
    68. -
    69.     * @access    public
    70. -
    71.     */
    72. -
    73.     function NamedGraphMem($graphName,$baseURI null)
    74. -
    75.     {
    76. -
    77.         $this->setBaseURI($baseURI);
    78. -
    79.         $this->indexed INDEX_TYPE;
    80. -
    81.         $this->setGraphName($graphName);
    82. -
    83.     }
    84. -
    85.  
    86. -
    87.     /**
    88. -
    89.     * Sets the graph name.
    90. -
    91.     *
    92. -
    93.     * @param  string 
    94. -
    95.     * @access    public
    96. -
    97.     */
    98. -
    99.     function setGraphName($graphName)
    100. -
    101.     {
    102. -
    103.         $this->graphName=$graphName;
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     /**
    110. -
    111.     * Returns the graph name.
    112. -
    113.     *
    114. -
    115.     * @return string 
    116. -
    117.     * @access    public
    118. -
    119.     */
    120. -
    121.     function getGraphName()
    122. -
    123.     {
    124. -
    125.         return $this->graphName;
    126. -
    127.     }
    128. -
    129. }
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetQuad.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetQuad.php.html.svn-base deleted file mode 100755 index 322b5075..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__datasetQuad.php.html.svn-base +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - File Source for Quad.php - - - - - -

    Source for file Quad.php

    -

    Documentation is available at Quad.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Quad
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. *
    14. -
    15. * A Triple in a RDF dataset, consisting of four Jena Nodes: graphName,
    16. -
    17. * subject, predicate, and object.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class Quad  
    34. -
    35. {
    36. -
    37.     
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphMem.
    42. -
    43.     *
    44. -
    45.     * @var        Resource 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Statement
    58. -
    59.     *
    60. -
    61.     * @var        Statement 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $statement;
    68. -
    69.     
    70. -
    71.     /**
    72. -
    73.     * Constructor
    74. -
    75.     * Creates a Quad from four Nodes.
    76. -
    77.      *
    78. -
    79.     * @param Resource 
    80. -
    81.     * @param Resource 
    82. -
    83.     * @param Resource 
    84. -
    85.     * @param Resource 
    86. -
    87.     * @access    public
    88. -
    89.     */        
    90. -
    91.     function Quad($graphName,$subject,$predicate,$object)
    92. -
    93.     {
    94. -
    95.         if (!is_a($graphName'Resource')) 
    96. -
    97.         {
    98. -
    99.             $errmsg RDFAPI_ERROR 
    100. -
    101.                   '(class: Quad; method: new): Resource expected as graphName.';
    102. -
    103.             trigger_error($errmsgE_USER_ERROR)
    104. -
    105.         }
    106. -
    107.         $this->statement=new Statement($subject,$predicate,$object);
    108. -
    109.         $this->graphName=$graphName;
    110. -
    111.     }
    112. -
    113.     
    114. -
    115.     /**
    116. -
    117.     * Sets the graph name.
    118. -
    119.     *
    120. -
    121.     * @param Resource 
    122. -
    123.     * @access    public
    124. -
    125.     */    
    126. -
    127.     function setGraphName($graphName)
    128. -
    129.     {
    130. -
    131.         $this->graphName=$graphName;
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * Returns the graph name.
    140. -
    141.     *
    142. -
    143.     * @return Resource 
    144. -
    145.     * @access    public
    146. -
    147.     */
    148. -
    149.     function getGraphName()
    150. -
    151.     {
    152. -
    153.         return $this->graphName;
    154. -
    155.     }
    156. -
    157.     
    158. -
    159.     /**
    160. -
    161.      * Return a human-readable (sort of) string "graphname { s p o . }"
    162. -
    163.      * describing the quad.
    164. -
    165.      *
    166. -
    167.      * @return string 
    168. -
    169.      */
    170. -
    171.     function toString(
    172. -
    173.     {    
    174. -
    175.         return 'GraphName('.$this->graphName->getLabel().') '.$this->statement->toString();
    176. -
    177.     }
    178. -
    179.         
    180. -
    181.     /**
    182. -
    183.     * Returns the subject.
    184. -
    185.     *
    186. -
    187.     * @return Resource 
    188. -
    189.     * @access    public
    190. -
    191.     */
    192. -
    193.     function getSubject()
    194. -
    195.     {
    196. -
    197.         return $this->statement->getSubject();    
    198. -
    199.     }
    200. -
    201.         
    202. -
    203.     /**
    204. -
    205.     * Returns the predicate.
    206. -
    207.     *
    208. -
    209.     * @return Resource 
    210. -
    211.     * @access    public
    212. -
    213.     */
    214. -
    215.     function getPredicate()
    216. -
    217.     {
    218. -
    219.         return $this->statement->getPredicate();    
    220. -
    221.     }
    222. -
    223.         
    224. -
    225.     /**
    226. -
    227.     * Returns the object.
    228. -
    229.     *
    230. -
    231.     * @return Resource 
    232. -
    233.     * @access    public
    234. -
    235.     */
    236. -
    237.     function getObject()
    238. -
    239.     {
    240. -
    241.         return $this->statement->getObject();    
    242. -
    243.     }
    244. -
    245.         
    246. -
    247.     /**
    248. -
    249.     * Returns the statement(subject,predicate,object).
    250. -
    251.     *
    252. -
    253.     * @return statement 
    254. -
    255.     * @access    public
    256. -
    257.     */
    258. -
    259.     function getStatement()
    260. -
    261.     {
    262. -
    263.         return $this->statement;    
    264. -
    265.     }
    266. -
    267.         
    268. -
    269.     /**
    270. -
    271.     * Checks if two quads are equal.
    272. -
    273.     *
    274. -
    275.     * @param  Quad 
    276. -
    277.     * @return boolean 
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function equals($quad)
    284. -
    285.     {
    286. -
    287.         return ($this->graphName->equals($quad->getGraphName()) && $this->statement->equals($quad->getStatement()));    
    288. -
    289.     }
    290. -
    291. }
    292. -
    293. ?>
    294. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXParser.php.html.svn-base deleted file mode 100755 index ec26f2ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXParser.php.html.svn-base +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - File Source for TriXParser.php - - - - - -

    Source for file TriXParser.php

    -

    Documentation is available at TriXParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: TriXParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Temporary implementation of a TriX-Parser (Usable only with PHP > V5)
    14. -
    15. * Currently, it doesn't support any namespaces and has problems with typed literals.
    16. -
    17. * So this parser only works with TRIX documents where the default namespace is the TRIX namespace.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class TriXParser  
    34. -
    35. {
    36. -
    37.     /**
    38. -
    39.     * Reference to the graphSet
    40. -
    41.     *
    42. -
    43.     * @var        GraphSet 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $graphSet;
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Constructor
    56. -
    57.     * Needs a reference to a graphSet
    58. -
    59.     *
    60. -
    61.     * @param    GraphSet 
    62. -
    63.     * @access    public
    64. -
    65.     */        
    66. -
    67.     function TriXParser(&$graphSet)
    68. -
    69.     {
    70. -
    71.         $this->graphSet=&$graphSet;    
    72. -
    73.     }
    74. -
    75.  
    76. -
    77.     /**
    78. -
    79.     * Parse an XML string
    80. -
    81.     *
    82. -
    83.     * @param   string 
    84. -
    85.     * @access    public
    86. -
    87.     */
    88. -
    89.     function parseString($string)
    90. -
    91.     {
    92. -
    93.         $this->_populateGraphSet(simplexml_load_string($string));
    94. -
    95.     }
    96. -
    97.     
    98. -
    99.     /**
    100. -
    101.     * Parse from a file
    102. -
    103.     *
    104. -
    105.     * @param   string 
    106. -
    107.     * @access    public
    108. -
    109.     */
    110. -
    111.     function parseFile($pathToFile)
    112. -
    113.     {
    114. -
    115.         $this->_populateGraphSet(simplexml_load_file($pathToFile));
    116. -
    117.     }
    118. -
    119.     
    120. -
    121.     /**
    122. -
    123.     * Populates the graphSet with namedGraphs and triples.
    124. -
    125.     *
    126. -
    127.     * @param   object simpleXMLModel  $xmlModel 
    128. -
    129.     * @access    private
    130. -
    131.     */
    132. -
    133.     function _populateGraphSet(&$xmlModel)
    134. -
    135.     {
    136. -
    137.         $defaultGraphOccurred=false;
    138. -
    139.         
    140. -
    141.         foreach ($xmlModel->graph as $graph
    142. -
    143.         {
    144. -
    145.             if (isset($graph->uri)) 
    146. -
    147.             {
    148. -
    149.                 $graphName=(string)$graph->uri;
    150. -
    151.                 $namedGraph=$this->graphSet->getNamedGraph($graphName);
    152. -
    153.                 if ($namedGraph ==null)
    154. -
    155.                     $namedGraph=$this->graphSet->createGraph($graphName);
    156. -
    157.             else 
    158. -
    159.             {
    160. -
    161.                 if ($defaultGraphOccurred)
    162. -
    163.                     trigger_error('Only one unnamed Graph per file allowed'E_USER_ERROR);
    164. -
    165.                 
    166. -
    167.                 $namedGraph=$this->graphSet->getDefaultGraph();
    168. -
    169.                 $defaultGraphOccurred=true;
    170. -
    171.             }    
    172. -
    173.                         
    174. -
    175.             foreach ($graph->triple as $triple)
    176. -
    177.             {
    178. -
    179.                 $tripleCount=0;
    180. -
    181.                 $tripleArray=array();
    182. -
    183.                 foreach ($triple->children(as $tag => $value)
    184. -
    185.                 {
    186. -
    187.                     $tripleArray[$tripleCount++]=$this->_element2Resource((string)$tag,$value);
    188. -
    189.                 };
    190. -
    191.                 $namedGraph->add(new Statement($tripleArray[0],$tripleArray[1],$tripleArray[2]));    
    192. -
    193.             };
    194. -
    195.         };
    196. -
    197.     }
    198. -
    199.     
    200. -
    201.     /**
    202. -
    203.     * return a mathing resource tyoe
    204. -
    205.     *
    206. -
    207.     * @param   string 
    208. -
    209.     * @param   object simpleXMLNode $value 
    210. -
    211.     * @access    private
    212. -
    213.     */
    214. -
    215.     function _element2Resource($tag,$value)
    216. -
    217.     {
    218. -
    219.         switch ($tag
    220. -
    221.         {
    222. -
    223.                 case 'uri':
    224. -
    225.                     return new Resource((string)$value);
    226. -
    227.                 break;
    228. -
    229.         
    230. -
    231.                 case 'id':
    232. -
    233.                     return new BlankNode((string)$value);
    234. -
    235.                 break;
    236. -
    237.                 
    238. -
    239.                 case 'typedLiteral':
    240. -
    241.                     $literal=new Literal((string)$value);
    242. -
    243.                     $literal->setDatatype((string)$value['datatype']);
    244. -
    245.                     return $literal;
    246. -
    247.                 break;
    248. -
    249.                     
    250. -
    251.                 case 'plainLiteral':
    252. -
    253.                     $literal=new Literal((string)$value);
    254. -
    255.                     if(isset($value['xml:lang']))
    256. -
    257.                         $literal->setLanguage((string)$value['xml:lang']);
    258. -
    259.                     return $literal;
    260. -
    261.                 break;
    262. -
    263.         }
    264. -
    265.     }
    266. -
    267. }
    268. -
    269. ?>
    270. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base deleted file mode 100755 index ea504330..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_dataset__syntaxTriXSerializer.php.html.svn-base +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - File Source for TriXSerializer.php - - - - - -

    Source for file TriXSerializer.php

    -

    Documentation is available at TriXSerializer.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: TriXSerializer
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Temporary implementation of a TriX-Serializer
    14. -
    15. -
    16. @version  $Id$
    17. -
    18. @author Daniel Westphal (http://www.d-westphal.de)
    19. -
    20. *
    21. -
    22. @package     dataset
    23. -
    24. @access    public
    25. -
    26. ***/
    27. -
    28. class TriXSerializer  
    29. -
    30. {
    31. -
    32.     
    33. -
    34.     /**
    35. -
    36.     * Reference to the graphSet
    37. -
    38.     *
    39. -
    40.     * @var        object GraphSet 
    41. -
    42.     * @access    private
    43. -
    44.     */
    45. -
    46.     var $graphSet;
    47. -
    48.     
    49. -
    50.  
    51. -
    52.     /**
    53. -
    54.     * Constructor
    55. -
    56.     * Needs a reference to a graphSet
    57. -
    58.     *
    59. -
    60.     * @param    GraphSet 
    61. -
    62.     * @access    public
    63. -
    64.     */        
    65. -
    66.     function TriXSerializer(&$graphSet)
    67. -
    68.     {
    69. -
    70.         $this->graphSet=&$graphSet;
    71. -
    72.     }
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     * Serialize the dataset to a TriX string
    79. -
    80.     *
    81. -
    82.     * @return   string 
    83. -
    84.     * @access    public
    85. -
    86.     */
    87. -
    88.     function serializeToString()
    89. -
    90.     {
    91. -
    92.         return $this->_serialize();
    93. -
    94.     }
    95. -
    96.     
    97. -
    98.     /**
    99. -
    100.     * Serialize the dataset to a TriX string and save in file
    101. -
    102.     *
    103. -
    104.     * @param   string 
    105. -
    106.     * @access    public
    107. -
    108.     */
    109. -
    110.     function serializeToFile($fileName)
    111. -
    112.     {
    113. -
    114.         $serializedString=&$this->_serialize();
    115. -
    116.         $handle fopen($fileName'w');
    117. -
    118.            fwrite($handle$serializedString);
    119. -
    120.         fclose($handle);
    121. -
    122.     }
    123. -
    124.     
    125. -
    126.     
    127. -
    128.     /**
    129. -
    130.     * Serialize the dataset to a TriX string
    131. -
    132.     *
    133. -
    134.     * @return   string 
    135. -
    136.     * @access    private
    137. -
    138.     */
    139. -
    140.     function _serialize()
    141. -
    142.     {
    143. -
    144.         //Trix header
    145. -
    146.         $serializedString=
    147. -
    148.             '<?xml version="1.0" encoding="utf-8"?>'.
    149. -
    150.             '<TriX xmlns="http://www.w3.org/2004/03/trix/trix-1/">';
    151. -
    152.         
    153. -
    154.         //serialize defaultGraph if it is not empty
    155. -
    156.         $defaultGraph=$this->graphSet->getDefaultGraph();
    157. -
    158.         if ($defaultGraph->isEmpty()===false)
    159. -
    160.         {
    161. -
    162.             $serializedString.='<graph>';
    163. -
    164.             for($iterator $this->graphSet->findInDefaultGraph(null,null,null)$iterator->valid()$iterator->next()) 
    165. -
    166.             {
    167. -
    168.                 $serializedString.='<triple>';
    169. -
    170.                 
    171. -
    172.                 $statement=$iterator->current();
    173. -
    174.                 
    175. -
    176.                 $serializedString.=$this->_node2string($statement->getSubject());
    177. -
    178.                 $serializedString.=$this->_node2string($statement->getPredicate());
    179. -
    180.                 $serializedString.=$this->_node2string($statement->getObject());
    181. -
    182.                 
    183. -
    184.                 $serializedString.='</triple>';
    185. -
    186.             };
    187. -
    188.             $serializedString.='</graph>';
    189. -
    190.         }        
    191. -
    192.             
    193. -
    194.         //serialize namedGraphs    
    195. -
    196.         foreach ($this->graphSet->listGraphNames(as $graphName)
    197. -
    198.         {
    199. -
    200.             $serializedString.='<graph>';
    201. -
    202.             $serializedString.='<uri>'.$graphName.'</uri>';
    203. -
    204.             for($iterator $this->graphSet->findInNamedGraphs(new Resource($graphName),null,null,null)$iterator->valid()$iterator->next()) 
    205. -
    206.             {
    207. -
    208.                 $serializedString.='<triple>';
    209. -
    210.                 
    211. -
    212.                 $statement=$iterator->current();
    213. -
    214.                 
    215. -
    216.                 $serializedString.=$this->_node2string($statement->getSubject());
    217. -
    218.                 $serializedString.=$this->_node2string($statement->getPredicate());
    219. -
    220.                 $serializedString.=$this->_node2string($statement->getObject());
    221. -
    222.                 
    223. -
    224.                 $serializedString.='</triple>';
    225. -
    226.             };
    227. -
    228.             $serializedString.='</graph>';
    229. -
    230.         };        
    231. -
    232.         //TriX footer    
    233. -
    234.         $serializedString.='</TriX>';    
    235. -
    236.         return $serializedString;
    237. -
    238.     }
    239. -
    240.     
    241. -
    242.     /**
    243. -
    244.     * Serialize node to a TriX string
    245. -
    246.     *
    247. -
    248.     * @param Node 
    249. -
    250.     * @return   string 
    251. -
    252.     * @access    private
    253. -
    254.     */
    255. -
    256.     function _node2string($node)
    257. -
    258.     {
    259. -
    260.         switch ($node)
    261. -
    262.         {
    263. -
    264.             case (is_a($node,'BlankNode')):
    265. -
    266.                 return ('<id>'.$node->getLabel().'</id>');
    267. -
    268.             
    269. -
    270.             case (is_a($node,'Resource')):
    271. -
    272.                 return ('<uri>'.$node->getLabel().'</uri>');
    273. -
    274.             
    275. -
    276.             case (is_a($node,'Literal')):
    277. -
    278.             
    279. -
    280.                 if ($node->dtype!=null)
    281. -
    282.                     return ('<typedLiteral datatype="'.htmlentities($node->dtype).'">'.$node->getLabel().'</typedLiteral>');
    283. -
    284.  
    285. -
    286.                 if ($node->lang!=null)
    287. -
    288.                     return ('<plainLiteral xml:lang="'.htmlentities($node->lang).'">'.$node->getLabel().'</plainLiteral>');
    289. -
    290.                     
    291. -
    292.                 return ('<plainLiteral>'.htmlentities($node->getLabel()).'</plainLiteral>');
    293. -
    294.         }
    295. -
    296.     }
    297. -
    298. }
    299. -
    300. ?>
    301. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__RdfAPI.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__RdfAPI.php.html.svn-base deleted file mode 100755 index 3038adf8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__RdfAPI.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for RdfAPI.php - - - - - -

    Source for file RdfAPI.php

    -

    Documentation is available at RdfAPI.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // RDF API for PHP 
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // @version                  : $Id$
    12. -
    13. // Authors                   : Chris Bizer (chris@bizer.de),
    14. -
    15. //                             Radoslaw Oldakowski (radol@gmx.de)
    16. -
    17. // Description               : This file includes constatns and model package.
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Constants and base Object
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'constants.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/Object.php' );
    30. -
    31. include_onceRDFAPI_INCLUDE_DIR PACKAGE_MODEL);
    32. -
    33.  
    34. -
    35.  
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__constants.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__constants.php.html.svn-base deleted file mode 100755 index c30c01f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__constants.php.html.svn-base +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - File Source for constants.php - - - - - -

    Source for file constants.php

    -

    Documentation is available at constants.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Constants
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // @version                  : $Id$
    10. -
    11. // Authors                   : Chris Bizer (chris@bizer.de),
    12. -
    13. //                             Daniel Westphal (dawe@gmx.de),
    14. -
    15. //                               Leandro Mariano Lopez (llopez@xinergiaargentina.com),
    16. -
    17. //                             Radoslaw Oldakowski (radol@gmx.de)
    18. -
    19. //
    20. -
    21. // Description               : Constants and default configuration
    22. -
    23. // ----------------------------------------------------------------------------------
    24. -
    25.  
    26. -
    27.  
    28. -
    29.  
    30. -
    31. // ----------------------------------------------------------------------------------
    32. -
    33. // General
    34. -
    35. // ----------------------------------------------------------------------------------
    36. -
    37.  
    38. -
    39. define('RDFAPI_ERROR''RDFAPI error ');
    40. -
    41. define('DEFAULT_ALGORITHM''MD5');
    42. -
    43. define('DEFAULT_ENCODING''UTF-8');
    44. -
    45. define('INDENTATION''   ');
    46. -
    47. define('LINEFEED'chr(10));
    48. -
    49.  
    50. -
    51. // ----------------------------------------------------------------------------------
    52. -
    53. // RAP Packages
    54. -
    55. // ----------------------------------------------------------------------------------
    56. -
    57. define('PACKAGE_MODEL','model/ModelP.php');
    58. -
    59. define('PACKAGE_UTILITY','util/Utility.php');
    60. -
    61. define('PACKAGE_DBASE','model/DBase.php');
    62. -
    63. define('PACKAGE_SYNTAX_RDF','syntax/SyntaxRDF.php');
    64. -
    65. define('PACKAGE_SYNTAX_N3','syntax/SyntaxN3.php');
    66. -
    67. define('PACKAGE_SYNTAX_GRDDL','syntax/SyntaxGRDDL.php');
    68. -
    69. define('PACKAGE_VOCABULARY','vocabulary/Vocabulary.php');
    70. -
    71. define('PACKAGE_RDQL','rdql/RDQL.php');
    72. -
    73. define('PACKAGE_INFMODEL','infModel/InfModelP.php');
    74. -
    75. define('PACKAGE_RESMODEL','resModel/ResModelP.php');
    76. -
    77. define('PACKAGE_ONTMODEL','ontModel/OntModelP.php');
    78. -
    79. define('PACKAGE_DATASET','dataset/DatasetP.php');
    80. -
    81. define('PACKAGE_SPARQL','sparql/SPARQL.php');
    82. -
    83. define('PACKAGE_SYNTAX_RSS','syntax/SyntaxRSS.php');
    84. -
    85. define('PACKAGE_SYNTAX_SPARQLRES','syntax/SyntaxSparqlRes.php');
    86. -
    87.  
    88. -
    89. // ----------------------------------------------------------------------------------
    90. -
    91. // Model
    92. -
    93. // ----------------------------------------------------------------------------------
    94. -
    95.  
    96. -
    97. // Defines a prefix used in the ID of automatically created bNodes.
    98. -
    99. define('BNODE_PREFIX''bNode');
    100. -
    101.  
    102. -
    103. // Sets the index of MemModell:
    104. -
    105. // IND_DEF: Defaultindex over subject, predicate, obeject seperate.
    106. -
    107. // IND_SPO: Index over subject+predicate+object.
    108. -
    109. // IND_SP:  Index over subject+predicate.
    110. -
    111. // IND_SO:  Index over subject+object.
    112. -
    113. define('NO_INDEX',-1);
    114. -
    115. define('IND_DEF',0);
    116. -
    117. define('IND_SPO',1);
    118. -
    119. define('IND_SP',2);
    120. -
    121. define('IND_SO',3);
    122. -
    123. define('INDEX_TYPE',IND_DEF);
    124. -
    125.  
    126. -
    127. // ----------------------------------------------------------------------------------
    128. -
    129. // ModelFactory
    130. -
    131. // ----------------------------------------------------------------------------------
    132. -
    133.  
    134. -
    135. define ('MEMMODEL','MemModel');
    136. -
    137. define ('DBMODEL','DbModel');
    138. -
    139. define ('INFMODELF','InfModelF');
    140. -
    141. define ('INFMODELB','InfModelB');
    142. -
    143. define ('ONTMODEL','OntModel');
    144. -
    145. define ('RESMODEL','ResModel');
    146. -
    147. define ('RDFS_VOCABULARY','RdfsVocabulary.php');
    148. -
    149.  
    150. -
    151. // ----------------------------------------------------------------------------------
    152. -
    153. // Parser
    154. -
    155. // ----------------------------------------------------------------------------------
    156. -
    157.  
    158. -
    159. // RdfParser: Set this option to false if you want to use IDs containing CombiningChars or
    160. -
    161. // Extenders (see http://www.w3.org/TR/REC-xml-names/#NT-NCName). If set to TRUE, they're assumed to be invalid.
    162. -
    163. define('VALIDATE_IDS'TRUE);
    164. -
    165.  
    166. -
    167. // RdfParser: Set this option to true if you want to parse UNICODE documents.
    168. -
    169. // WARNING: Setting the option TRUE significantly slows down the RDF-parser.
    170. -
    171. define('UNIC_RDF'FALSE);
    172. -
    173.  
    174. -
    175. // RdfParser: Set this option to true if you want to make sure that the created RDF-model doesnt contain
    176. -
    177. // duplicate RDF-statements. WARNING: Setting the option TRUE significantly slows down the RDF-parser.
    178. -
    179. define('CREATE_MODEL_WITHOUT_DUPLICATES'FALSE);
    180. -
    181.  
    182. -
    183. // N3 and N-Triple-Parser: Set this option to true in order to override the given bnode
    184. -
    185. // labels and rename them to the defined BNODE_PREFIX
    186. -
    187. define('FIX_BLANKNODES'TRUE);
    188. -
    189.  
    190. -
    191. define('NAMESPACE_SEPARATOR_CHAR','^');
    192. -
    193. define('NAMESPACE_SEPARATOR_STRING','^');
    194. -
    195. define('IN_TOP_LEVEL',0);
    196. -
    197. define('IN_RDF',1);
    198. -
    199. define('IN_DESCRIPTION',2);
    200. -
    201. define('IN_PROPERTY_UNKNOWN_OBJECT',3);
    202. -
    203. define('IN_PROPERTY_RESOURCE',4);
    204. -
    205. define('IN_PROPERTY_EMPTY_RESOURCE',5);
    206. -
    207. define('IN_PROPERTY_LITERAL',6);
    208. -
    209. define('IN_PROPERTY_PARSE_TYPE_LITERAL',7);
    210. -
    211. define('IN_PROPERTY_PARSE_TYPE_RESOURCE',8);
    212. -
    213. define('IN_XML',9);
    214. -
    215. define('IN_UNKNOWN',10);
    216. -
    217. define('IN_PROPERTY_PARSE_TYPE_COLLECTION'11);
    218. -
    219. define('RDF_SUBJECT_TYPE_URI',0);
    220. -
    221. define('RDF_SUBJECT_TYPE_DISTRIBUTED',1);
    222. -
    223. define('RDF_SUBJECT_TYPE_PREFIX',2);
    224. -
    225. define('RDF_SUBJECT_TYPE_ANONYMOUS',3);
    226. -
    227. define('RDF_SUBJECT_TYPE_BNODE',4);
    228. -
    229. define('RDF_OBJECT_TYPE_RESOURCE',0);
    230. -
    231. define('RDF_OBJECT_TYPE_LITERAL',1);
    232. -
    233. define('RDF_OBJECT_TYPE_XML',2);
    234. -
    235. define('RDF_OBJECT_TYPE_BNODE',3);
    236. -
    237.  
    238. -
    239. // ----------------------------------------------------------------------------------
    240. -
    241. // Serializer
    242. -
    243. // ----------------------------------------------------------------------------------
    244. -
    245.  
    246. -
    247. // RDF, N3, N-Triple Serializer: set to TRUE in oder to suppres the "Generated by RAP"
    248. -
    249. // comment in the output files.
    250. -
    251. define('HIDE_ADVERTISE',FALSE);
    252. -
    253.  
    254. -
    255. // RDF Serializer: Set to TRUE, if the serializer should use entities for URIs.
    256. -
    257. define('SER_USE_ENTITIES'FALSE );
    258. -
    259.  
    260. -
    261. // RDF Serializer: Set to TRUE, if the serializer should serialize triples as XML
    262. -
    263. // attributes where possible.
    264. -
    265. define('SER_USE_ATTRIBUTES'FALSE );
    266. -
    267.  
    268. -
    269. // RDF Serializer: Set to TRUE in order to sort the statements of a model before
    270. -
    271. // serializing them.
    272. -
    273. define('SER_SORT_MODEL'FALSE );
    274. -
    275.  
    276. -
    277.  
    278. -
    279.  
    280. -
    281. // RDF Serializer: Set to TRUE, if the serializer should use qualified names for RDF
    282. -
    283. // reserved words.
    284. -
    285. // NOTE: There is only one default namespace allowed within an XML document.
    286. -
    287. //       Therefore if SER_RDF_QNAMES in is set to FALSE and you pass the parameter
    288. -
    289. //       $xml_default_namespace to the method serialize() of class RdfSerializer,
    290. -
    291. //       the model will be serialized as if SER_RDF_QNAMES were set to TRUE.
    292. -
    293. define('SER_RDF_QNAMES'TRUE );
    294. -
    295.  
    296. -
    297. // RDF Serializer: Set to TRUE, if the serializer should start documents with the
    298. -
    299. // xml declaration <?xml version="1.0" encoding="UTF-8" >.
    300. -
    301. define('SER_XML_DECLARATION'TRUE );
    302. -
    303.  
    304. -
    305. // N3 Serializer: Set to TRUE, if the N3 serializer should try to compress the blank node
    306. -
    307. // syntax using [] whereever possible.
    308. -
    309. define('N3SER_BNODE_SHORT'FALSE);
    310. -
    311.  
    312. -
    313. // RDF Serializer: Set to TRUE, if the serializer should write text values always as
    314. -
    315. // escaped CDATA.
    316. -
    317. define('USE_CDATA'FALSE);
    318. -
    319.  
    320. -
    321. define('USE_ANY_QUOTE'FALSE);
    322. -
    323. define('GENERAL_PREFIX_BASE','ns');
    324. -
    325. define('MAX_ALLOWED_ABBREVIATED_LENGTH',60);
    326. -
    327.  
    328. -
    329. // ----------------------------------------------------------------------------------
    330. -
    331. // Util
    332. -
    333. // ----------------------------------------------------------------------------------
    334. -
    335.  
    336. -
    337. // Definition of the colors used by the method RDFUtil:writeHTMLTable
    338. -
    339. define('HTML_TABLE_HEADER_COLOR''#FFFFFF');
    340. -
    341. define('HTML_TABLE_RESOURCE_COLOR''#FFFFCC');
    342. -
    343. define('HTML_TABLE_LITERAL_COLOR''#E7E7EF');
    344. -
    345. define('HTML_TABLE_BNODE_COLOR''#FFCCFF');
    346. -
    347. define('HTML_TABLE_RDF_NS_COLOR''#CCFFCC');
    348. -
    349. define('HTML_TABLE_NS_ROW_COLOR1''#FFFFFF');
    350. -
    351. define('HTML_TABLE_NS_ROW_COLOR0''#E7E7EF');
    352. -
    353.  
    354. -
    355. // ----------------------------------------------------------------------------------
    356. -
    357. // RDF
    358. -
    359. // ----------------------------------------------------------------------------------
    360. -
    361.  
    362. -
    363. define('RDF_NAMESPACE_URI','http://www.w3.org/1999/02/22-rdf-syntax-ns#' );
    364. -
    365. define('RDF_NAMESPACE_PREFIX','rdf' );
    366. -
    367. define('RDF_RDF','RDF');
    368. -
    369. define('RDF_DESCRIPTION','Description');
    370. -
    371. define('RDF_ID','ID');
    372. -
    373. define('RDF_ABOUT','about');
    374. -
    375. define('RDF_ABOUT_EACH','aboutEach');
    376. -
    377. define('RDF_ABOUT_EACH_PREFIX','aboutEachPrefix');
    378. -
    379. define('RDF_BAG_ID','bagID');
    380. -
    381. define('RDF_RESOURCE','resource');
    382. -
    383. define('RDF_VALUE','value');
    384. -
    385. define('RDF_PARSE_TYPE','parseType');
    386. -
    387. define('RDF_PARSE_TYPE_LITERAL','Literal');
    388. -
    389. define('RDF_PARSE_TYPE_RESOURCE','Resource');
    390. -
    391. define('RDF_PARSE_TYPE_COLLECTION''Collection');
    392. -
    393. define('RDF_TYPE','type');
    394. -
    395. define('RDF_BAG','Bag');
    396. -
    397. define('RDF_SEQ','Seq');
    398. -
    399. define('RDF_ALT','Alt');
    400. -
    401. define('RDF_LI','li');
    402. -
    403. define('RDF_STATEMENT','Statement');
    404. -
    405. define('RDF_SUBJECT','subject');
    406. -
    407. define('RDF_PREDICATE','predicate');
    408. -
    409. define('RDF_OBJECT','object');
    410. -
    411. define('RDF_NODEID','nodeID');
    412. -
    413. define('RDF_DATATYPE','datatype');
    414. -
    415. define('RDF_SEEALSO','seeAlso');
    416. -
    417. define('RDF_PROPERTY','Property');
    418. -
    419. define('RDF_LIST','List');
    420. -
    421. define('RDF_NIL','nil');
    422. -
    423. define('RDF_REST','rest');
    424. -
    425. define('RDF_FIRST','first');
    426. -
    427. define('RDF_XMLLITERAL''XMLLiteral');
    428. -
    429.  
    430. -
    431. // ----------------------------------------------------------------------------------
    432. -
    433. // RDF Schema
    434. -
    435. // ----------------------------------------------------------------------------------
    436. -
    437.  
    438. -
    439. define('RDF_SCHEMA_URI','http://www.w3.org/2000/01/rdf-schema#' );
    440. -
    441. define('RDF_DATATYPE_SCHEMA_URI','http://www.w3.org/TR/xmlschema-2' );
    442. -
    443. define('RDF_SCHEMA_PREFIX''rdfs');
    444. -
    445. define('RDFS_SUBCLASSOF','subClassOf');
    446. -
    447. define('RDFS_SUBPROPERTYOF','subPropertyOf');
    448. -
    449. define('RDFS_RANGE','range');
    450. -
    451. define('RDFS_DOMAIN','domain');
    452. -
    453. define('RDFS_CLASS','Class');
    454. -
    455. define('RDFS_RESOURCE','Resource');
    456. -
    457. define('RDFS_DATATYPE','Datatype');
    458. -
    459. define('RDFS_LITERAL','Literal');
    460. -
    461. define('RDFS_SEE_ALSO','seeAlso');
    462. -
    463. define('RDFS_IS_DEFINED_BY','isDefinedBy');
    464. -
    465. define('RDFS_LABEL','label');
    466. -
    467. define('RDFS_COMMENT','comment');
    468. -
    469.  
    470. -
    471.  
    472. -
    473. // ----------------------------------------------------------------------------------
    474. -
    475. // OWL
    476. -
    477. // ----------------------------------------------------------------------------------
    478. -
    479.  
    480. -
    481. define('OWL_URI','http://www.w3.org/2002/07/owl#' );
    482. -
    483. define('OWL_PREFIX''owl');
    484. -
    485. define('OWL_SAME_AS','sameAs');
    486. -
    487. define('OWL_INVERSE_OF','inverseOf');
    488. -
    489.  
    490. -
    491.  
    492. -
    493. // ----------------------------------------------------------------------------------
    494. -
    495. // XML
    496. -
    497. // ----------------------------------------------------------------------------------
    498. -
    499.  
    500. -
    501. define('XML_NAMESPACE_PREFIX''xml');
    502. -
    503. define('XML_NAMESPACE_DECLARATION_PREFIX''xmlns');
    504. -
    505. define('XML_NAMESPACE_URI','http://www.w3.org/XML/1998/namespace' );
    506. -
    507. define('XML_LANG','lang');
    508. -
    509. define('DATATYPE_SHORTCUT_PREFIX','datatype:');
    510. -
    511. define('XML_SCHEMA','http://www.w3.org/2001/XMLSchema#');
    512. -
    513.  
    514. -
    515. // ----------------------------------------------------------------------------------
    516. -
    517. // RDF DATATYPE SHORTCUTS (extends datatype shortcuts to the full XML datatype URIs)
    518. -
    519. // ----------------------------------------------------------------------------------
    520. -
    521.  
    522. -
    523. $short_datatype array(
    524. -
    525.     'STRING'    => RDF_DATATYPE_SCHEMA_URI '#string',
    526. -
    527.     'DECIMAL'   => RDF_DATATYPE_SCHEMA_URI '#decimal',
    528. -
    529.     'INTEGER'   => RDF_DATATYPE_SCHEMA_URI '#integer',
    530. -
    531.     'INT'       => RDF_DATATYPE_SCHEMA_URI '#int',
    532. -
    533.     'SHORT'     => RDF_DATATYPE_SCHEMA_URI '#short',
    534. -
    535.     'BYTE'      => RDF_DATATYPE_SCHEMA_URI '#byte',
    536. -
    537.     'LONG'      => RDF_DATATYPE_SCHEMA_URI '#long',
    538. -
    539.     'LANGUAGE'  => RDF_DATATYPE_SCHEMA_URI '#language',
    540. -
    541.     'NAME'      => RDF_DATATYPE_SCHEMA_URI '#name'
    542. -
    543. );
    544. -
    545.  
    546. -
    547. // ----------------------------------------------------------------------------------
    548. -
    549. // Database
    550. -
    551. // ----------------------------------------------------------------------------------
    552. -
    553.  
    554. -
    555. if (!defined('ADODB_DB_DRIVER')) {
    556. -
    557.     if (isset($GLOBALS['dbConf'])) {
    558. -
    559.         define('ADODB_DB_DRIVER'$GLOBALS['dbConf']['type']);
    560. -
    561.         define('ADODB_DB_HOST'  $GLOBALS['dbConf']['host']);
    562. -
    563.         define('ADODB_DB_NAME'  $GLOBALS['dbConf']['database']);
    564. -
    565.         define('ADODB_DB_USER'  $GLOBALS['dbConf']['user']);
    566. -
    567.         define('ADODB_DB_PASSWORD'$GLOBALS['dbConf']['password']);
    568. -
    569.     else {
    570. -
    571.         define('ADODB_DB_DRIVER''mysql');
    572. -
    573.         define('ADODB_DB_HOST'  'localhost');
    574. -
    575.         define('ADODB_DB_NAME'  'kbrdfdb');
    576. -
    577.         define('ADODB_DB_USER'  'kbrdf');
    578. -
    579.         define('ADODB_DB_PASSWORD''db1');
    580. -
    581.     }
    582. -
    583. }
    584. -
    585. if (!defined('ADODB_DEBUG_MODE')) {
    586. -
    587.     define('ADODB_DEBUG_MODE''0');
    588. -
    589. }
    590. -
    591.  
    592. -
    593.  
    594. -
    595. // ----------------------------------------------------------------------------------
    596. -
    597. // RDQL Error Messages
    598. -
    599. // ----------------------------------------------------------------------------------
    600. -
    601.  
    602. -
    603. define('RDQL_ERR','RDQL error ');
    604. -
    605. define('RDQL_SYN_ERR','RDQL syntax error ');
    606. -
    607. define('RDQL_SEL_ERR'RDQL_ERR .'in the SELECT clause: ');
    608. -
    609. define('RDQL_SRC_ERR'RDQL_ERR .'in the SOURCE clause: ');
    610. -
    611. define('RDQL_WHR_ERR'RDQL_ERR .'in the WHERE clause: ');
    612. -
    613. define('RDQL_AND_ERR'RDQL_ERR .'in the AND clause: ');
    614. -
    615. define('RDQL_USG_ERR'RDQL_ERR .'in the USING clause: ');
    616. -
    617.  
    618. -
    619.  
    620. -
    621. // ----------------------------------------------------------------------------------
    622. -
    623. // Vocabulary
    624. -
    625. // ----------------------------------------------------------------------------------
    626. -
    627. // namespace declarations
    628. -
    629. define('ATOM_NS'    'http://purl.org/atom/ns#');
    630. -
    631. define('DC_NS'      'http://purl.org/dc/elements/1.1/');
    632. -
    633. define('DCTERM_NS'  'http://purl.org/dc/terms/');
    634. -
    635. define('DCMITYPE_NS''http://purl.org/dc/dcmitype/');
    636. -
    637. define('FOAF_NS'    'http://xmlns.com/foaf/0.1/');
    638. -
    639. define('OWL_NS'     'http://www.w3.org/2002/07/owl#');
    640. -
    641. define('RSS_NS'     'http://purl.org/rss/1.0/');
    642. -
    643. define('VCARD_NS'   'http://www.w3.org/2001/vcard-rdf/3.0#');
    644. -
    645.  
    646. -
    647.  
    648. -
    649.  
    650. -
    651. // ----------------------------------------------------------------------------------
    652. -
    653. // RDQL, SPARQL and parser default namespace prefixes
    654. -
    655. // ----------------------------------------------------------------------------------
    656. -
    657.  
    658. -
    659. $default_prefixes array(
    660. -
    661. -
    662. -
    663.    'xsd'  => 'http://www.w3.org/2001/XMLSchema#',
    664. -
    665.    OWL_PREFIX => OWL_URI,
    666. -
    667.    'dc' => 'http://purl.org/dc/elements/1.1/',
    668. -
    669.    'dcterms' => 'http://purl.org/dc/terms/',
    670. -
    671.    'vcard' => 'http://www.w3.org/2001/vcard-rdf/3.0#'
    672. -
    673. );
    674. -
    675.  
    676. -
    677.  
    678. -
    679.  
    680. -
    681. // ----------------------------------------------------------------------------------
    682. -
    683. // InfModel
    684. -
    685. // ----------------------------------------------------------------------------------
    686. -
    687.  
    688. -
    689. //activate / deactivate reasoning for the following schema constructs
    690. -
    691. //rdfs:subclass
    692. -
    693. define('INF_RES_SUBCLASSOF',true);
    694. -
    695. //rdfs:subproperty
    696. -
    697. define('INF_RES_SUBPROPERTYOF',true);
    698. -
    699. //rdfs:range
    700. -
    701. define('INF_RES_RANGE',true);
    702. -
    703. //rdfs:domain
    704. -
    705. define('INF_RES_DOMAIN',true);
    706. -
    707. //owl:sameAs
    708. -
    709. define('INF_RES_OWL_SAMEAS',true);
    710. -
    711. //owl:inverseOf
    712. -
    713. define('INF_RES_OWL_INVERSEOF',true);
    714. -
    715.  
    716. -
    717. //generic RDFS Rules from the RDF Schema doc:
    718. -
    719. //see: http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules
    720. -
    721. define('INF_RES_RULE_RDFS12',false);
    722. -
    723. define('INF_RES_RULE_RDFS6',false);
    724. -
    725. define('INF_RES_RULE_RDFS8',false);
    726. -
    727. define('INF_RES_RULE_RDFS10',false);
    728. -
    729. define('INF_RES_RULE_RDFS13',false);
    730. -
    731.  
    732. -
    733. // ----------------------------------------------------------------------------------
    734. -
    735. // GRAPHVIZ
    736. -
    737. // ----------------------------------------------------------------------------------
    738. -
    739.  
    740. -
    741. // path to the dot binary
    742. -
    743. define('GRAPHVIZ_PATH''C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe');
    744. -
    745.  
    746. -
    747. // directory for temporary files
    748. -
    749. // Attention: must be write-/readable by the webserver
    750. -
    751. define('GRAPHVIZ_TEMP''C:\/');
    752. -
    753.  
    754. -
    755. // display statistical data in generated images
    756. -
    757. // currently only number of statements drawn
    758. -
    759. define('GRAPHVIZ_STAT'TRUE);
    760. -
    761.  
    762. -
    763. // allowed file formats
    764. -
    765. // for security reasons (to prevent code injection)
    766. -
    767. define('GRAPHVIZ_FORMAT''svg, dot, jpg, png, gif, vrml');
    768. -
    769.  
    770. -
    771. // enable clickable URIs
    772. -
    773. // only supported by certain formats (e.g. SVG)
    774. -
    775. define('GRAPHVIZ_URI'FALSE);
    776. -
    777.  
    778. -
    779. // define parameters for the graphical output
    780. -
    781. // if a paramter is undefined, the default value of graphviz is used
    782. -
    783. // for further information see: http://www.graphviz.org/Documentation.php
    784. -
    785. $graphviz_param array(
    786. -
    787.    'GRAPH_STYLE'     => 'rankdir="TB"',
    788. -
    789.    'RESOURCE_STYLE'  => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"',
    790. -
    791.    'LITERAL_STYLE'   => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"',
    792. -
    793.    'PREDICATE_STYLE' => 'fontname="Courier",fontsize="10"',
    794. -
    795.    'INFERRED_STYLE'  => 'style="dotted",fontname="Courier",fontsize="10"',
    796. -
    797.    'BLANKNODE_STYLE' => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"',
    798. -
    799.    'BOX_STYLE'       => 'fontname="Courier",fontsize="8",color="#BBBBBB"'
    800. -
    801. );
    802. -
    803.  
    804. -
    805.  
    806. -
    807. // ----------------------------------------------------------------------------------
    808. -
    809. // SPARQL
    810. -
    811. // ----------------------------------------------------------------------------------
    812. -
    813.  
    814. -
    815. // Attribute lists for describing Resources. ['resource type'] = array(att1, att2, att3, ...).
    816. -
    817. //
    818. -
    819.  
    820. -
    821. $sparql_describe array(
    822. -
    823.     FOAF_NS.'person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox')
    824. -
    825. );
    826. -
    827.  
    828. -
    829. ?>
    830. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:24 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetDb.php.html.svn-base deleted file mode 100755 index 60e4886c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetDb.php.html.svn-base +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - File Source for DatasetDb.php - - - - - -

    Source for file DatasetDb.php

    -

    Documentation is available at DatasetDb.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Dataset.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'model/DbModel.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsDb.php';
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DatasetDb
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * Persistent implementation of a Dataset in a database.
    20. -
    21. * A RDF dataset is a collection of named RDF graphs.
    22. -
    23. *
    24. -
    25. @version  $Id$
    26. -
    27. @author Daniel Westphal (http://www.d-westphal.de)
    28. -
    29. @author Chris Bizer <chris@bizer.de>
    30. -
    31. *
    32. -
    33. @package     dataset
    34. -
    35. @access    public
    36. -
    37. ***/
    38. -
    39. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    40. -
    41.  
    42. -
    43. class DatasetDb extends Dataset
    44. -
    45. {
    46. -
    47.  
    48. -
    49.     /**
    50. -
    51.     * Reference to databse connection.
    52. -
    53.     *
    54. -
    55.     * @var        resource dbConnection
    56. -
    57.     * @access    private
    58. -
    59.     */
    60. -
    61.     var $dbConnection;
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Reference to the dbStore Object.
    68. -
    69.     *
    70. -
    71.     * @var        $dbStore dbStore
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $dbStore;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Name of the Dataset
    86. -
    87.     *
    88. -
    89.     * @var        string 
    90. -
    91.     * @access    private
    92. -
    93.     */
    94. -
    95.     var $setName;
    96. -
    97.  
    98. -
    99.  
    100. -
    101.     /**
    102. -
    103.     * Constructor
    104. -
    105.     * You can supply a Dataset name.
    106. -
    107.     *
    108. -
    109.     * @param  ADODBConnection 
    110. -
    111.     * @param  DbStore 
    112. -
    113.     * @param  string 
    114. -
    115.     * @access    public
    116. -
    117.     */
    118. -
    119.     function DatasetDb(&$dbConnection,&$dbStore,$datasetName)
    120. -
    121.     {
    122. -
    123.         $this->dbConnection=$dbConnection;
    124. -
    125.         $this->dbStore=&$dbStore;
    126. -
    127.         $this->setName$datasetName;
    128. -
    129.         $this->_initialize();
    130. -
    131.     }
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Initialize
    138. -
    139.     * Read all needed data into the set.
    140. -
    141.     *
    142. -
    143.     *
    144. -
    145.     * @access    private
    146. -
    147.     */
    148. -
    149.     function _initialize()
    150. -
    151.     {
    152. -
    153.         $recordSet =$this->dbConnection->execute("SELECT defaultModelUri
    154. -
    155.                                          FROM datasets where datasetName='".$this->setName."'");
    156. -
    157.  
    158. -
    159.            $this->defaultGraph=$this->dbStore->getModel($recordSet->fields[0]);
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.  
    166. -
    167.  
    168. -
    169. //    === Graph level methods ========================
    170. -
    171.  
    172. -
    173.     /**
    174. -
    175.     * Sets the Dataset name. Return true on success, false otherwise.
    176. -
    177.     *
    178. -
    179.     * @param  string 
    180. -
    181.     * @access    public
    182. -
    183.     */
    184. -
    185.     function setDatasetName($datasetName)
    186. -
    187.     {
    188. -
    189.         if ($this->dbStore->datasetExists($datasetName))
    190. -
    191.             return false;
    192. -
    193.  
    194. -
    195.         $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."'
    196. -
    197.                                       where datasetName='".$this->setName."'");
    198. -
    199.  
    200. -
    201.         $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."'
    202. -
    203.                                       where datasetName='".$this->setName."'");
    204. -
    205.         $this->setName=$datasetName;
    206. -
    207.         return true;
    208. -
    209.     }
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.     * Returns the Datasets name.
    216. -
    217.     *
    218. -
    219.     * @return string 
    220. -
    221.     * @access    public
    222. -
    223.     */
    224. -
    225.     function getDatasetName()
    226. -
    227.     {
    228. -
    229.         return $this->setName;
    230. -
    231.     }
    232. -
    233.  
    234. -
    235.     /**
    236. -
    237.      * Adds a NamedGraph to the set.
    238. -
    239.      *
    240. -
    241.      * @param NamedGraphDb 
    242. -
    243.      */
    244. -
    245.     function addNamedGraph(&$graph)
    246. -
    247.     {
    248. -
    249.         $graphNameURI=$graph->getGraphName();
    250. -
    251.         $this->removeNamedGraph($graphNameURI);
    252. -
    253.         $this->dbConnection->execute('INSERT INTO dataset_model VALUES("'.$this->setName.'",'.$graph->modelID.',"'.$graphNameURI.'")');
    254. -
    255.     }
    256. -
    257.  
    258. -
    259.  
    260. -
    261.     /**
    262. -
    263.      * Overwrites the existting default graph.
    264. -
    265.      *
    266. -
    267.      * @param DbModel 
    268. -
    269.      */
    270. -
    271.     function setDefaultGraph(&$graph)
    272. -
    273.     {
    274. -
    275.         $this->dbConnection->execute('UPDATE datasets SET defaultModelUri ="'.$graph->modelURI.'"  WHERE datasetName ="'.$this->setName.'"');
    276. -
    277.     }
    278. -
    279.  
    280. -
    281.     /**
    282. -
    283.      * Returns a reference to the defaultGraph.
    284. -
    285.      *
    286. -
    287.      * @return NamedGraphDb 
    288. -
    289.      */
    290. -
    291.     function getDefaultGraph()
    292. -
    293.     {
    294. -
    295.         $defaultGraphURI $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'");
    296. -
    297.         return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName));
    298. -
    299.     }
    300. -
    301.  
    302. -
    303.     /**
    304. -
    305.      * Returns true, if a defaultGraph exists. False otherwise.
    306. -
    307.      *
    308. -
    309.      * @return boolean 
    310. -
    311.      */
    312. -
    313.     function hasDefaultGraph()
    314. -
    315.     {
    316. -
    317.         return true;
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     /**
    324. -
    325.      * Removes a NamedGraph from the set. Nothing happens
    326. -
    327.      * if no graph with that name is contained in the set.
    328. -
    329.      *
    330. -
    331.      * @param string 
    332. -
    333.      */
    334. -
    335.     function removeNamedGraph($graphName)
    336. -
    337.     {
    338. -
    339.         $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    340. -
    341.     }
    342. -
    343.  
    344. -
    345.     /**
    346. -
    347.      * Tells wether the Dataset contains a NamedGraph.
    348. -
    349.      *
    350. -
    351.      * @param  string 
    352. -
    353.      * @return boolean 
    354. -
    355.      */
    356. -
    357.     function containsNamedGraph($graphName)
    358. -
    359.     {
    360. -
    361.         $count$this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    362. -
    363.         return ($count>0);
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.      * Returns the NamedGraph with a specific name from the Dataset.
    372. -
    373.      * Changes to the graph will be reflected in the set.
    374. -
    375.      *
    376. -
    377.      * @param string 
    378. -
    379.      * @return NamedGraphDb or null
    380. -
    381.      */
    382. -
    383.     function &getNamedGraph($graphName)
    384. -
    385.     {
    386. -
    387.         if(!$this->containsNamedGraph($graphName))
    388. -
    389.             return null;
    390. -
    391.  
    392. -
    393.         $modelVars =$this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI
    394. -
    395.                                                     FROM models, dataset_model
    396. -
    397.                                                     WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID");
    398. -
    399.  
    400. -
    401.         return new NamedGraphDb($this->dbConnection$modelVars->fields[0],
    402. -
    403.                                  $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     /**
    410. -
    411.      * Returns the names of the namedGraphs in this set as strings in an array.
    412. -
    413.      *
    414. -
    415.      * @return Array 
    416. -
    417.      */
    418. -
    419.     function listGraphNames()
    420. -
    421.     {
    422. -
    423.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    424. -
    425.  
    426. -
    427.         $return=array();
    428. -
    429.         while (!$recordSet->EOF)
    430. -
    431.         {
    432. -
    433.           $return[$recordSet->fields[0];
    434. -
    435.           $recordSet->moveNext();
    436. -
    437.         }
    438. -
    439.         return $return;
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     /**
    446. -
    447.      * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    448. -
    449.      *
    450. -
    451.      * @param  string 
    452. -
    453.      * @param  string 
    454. -
    455.      * @return NamedGraphDb 
    456. -
    457.      */
    458. -
    459.     function &createGraph($graphName,$baseURI null)
    460. -
    461.     {
    462. -
    463.         $graph =$this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI);
    464. -
    465.         $this->addNamedGraph($graph);
    466. -
    467.  
    468. -
    469.         return $graph;
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.     /**
    476. -
    477.      * Deletes all NamedGraphs from the set.
    478. -
    479.      */
    480. -
    481.     function clear()
    482. -
    483.     {
    484. -
    485.         $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'");
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     /**
    492. -
    493.      * Returns the number of NamedGraphs in the set. Empty graphs are counted.
    494. -
    495.      *
    496. -
    497.      * @return int 
    498. -
    499.      */
    500. -
    501.     function countGraphs()
    502. -
    503.     {
    504. -
    505.         return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'"));
    506. -
    507.     }
    508. -
    509.  
    510. -
    511.     /**
    512. -
    513.      * Returns an iterator over all {@link NamedGraph}s in the set.
    514. -
    515.      *
    516. -
    517.      * @return IteratorAllGraphsDb 
    518. -
    519.      */
    520. -
    521.     function &listNamedGraphs()
    522. -
    523.     {
    524. -
    525.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    526. -
    527.         $it new IteratorAllGraphsDb($recordSet$this);
    528. -
    529.         return $it;
    530. -
    531.     }
    532. -
    533.  
    534. -
    535.     /**
    536. -
    537.      * Tells wether the set contains any NamedGraphs.
    538. -
    539.      *
    540. -
    541.      * @return boolean 
    542. -
    543.      */
    544. -
    545.     function isEmpty()
    546. -
    547.     {
    548. -
    549.         return ($this->countGraphs()==0);
    550. -
    551.     }
    552. -
    553.  
    554. -
    555.     /**
    556. -
    557.      * Add all named graphs of the other dataset to this dataset.
    558. -
    559.      *
    560. -
    561.      * @param Dataset 
    562. -
    563.      */
    564. -
    565.     function addAll($otherDataset)
    566. -
    567.     {
    568. -
    569.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next())
    570. -
    571.         {
    572. -
    573.             $this->addNamedGraph($iterator->current());
    574. -
    575.          };
    576. -
    577.  
    578. -
    579.          if ($otherDataset->hasDefaultGraph())
    580. -
    581.          {
    582. -
    583.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());
    584. -
    585.          }
    586. -
    587.     }
    588. -
    589.  
    590. -
    591. //    === Quad level methods ========================
    592. -
    593.  
    594. -
    595.     /**
    596. -
    597.      * Adds a quad to the Dataset. The argument must not contain any
    598. -
    599.      * wildcards. If the quad is already present, nothing happens. A new
    600. -
    601.      * named graph will automatically be created if necessary.
    602. -
    603.      *
    604. -
    605.      * @param Quad 
    606. -
    607.      */
    608. -
    609.     function addQuad(&$quad)
    610. -
    611.     {
    612. -
    613.         $graphName=$quad->getGraphName();
    614. -
    615.         $graphName=$graphName->getLabel();
    616. -
    617.  
    618. -
    619.         $graph=$this->getNamedGraph($graphName);
    620. -
    621.  
    622. -
    623.         if ($graph===null)
    624. -
    625.             $graph=$this->createGraph($graphName);
    626. -
    627.  
    628. -
    629.         $statement=$quad->getStatement();
    630. -
    631.         $graph->add($statement);
    632. -
    633.     }
    634. -
    635.  
    636. -
    637.     /**
    638. -
    639.      * Tells wether the Dataset contains a quad or
    640. -
    641.      * quads matching a pattern.
    642. -
    643.      *
    644. -
    645.      * @param Resource 
    646. -
    647.      * @param Resource 
    648. -
    649.      * @param Resource 
    650. -
    651.      * @param Resource 
    652. -
    653.      * @return boolean 
    654. -
    655.      */
    656. -
    657.     function containsQuad($graphName,$subject,$predicate,$object)
    658. -
    659.     {
    660. -
    661.         // static part of the sql statement
    662. -
    663.         $sql "SELECT count(*)
    664. -
    665.                   FROM statements, dataset_model
    666. -
    667.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    668. -
    669.  
    670. -
    671.         if($graphName!=null)
    672. -
    673.         {
    674. -
    675.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    676. -
    677.         }
    678. -
    679.  
    680. -
    681.         // dynamic part of the sql statement
    682. -
    683.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    684. -
    685.  
    686. -
    687.         return (($this->dbConnection->GetOne($sql))>0);
    688. -
    689.     }
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.      * Deletes a Quad from the RDF dataset.
    696. -
    697.      *
    698. -
    699.      * @param Quad 
    700. -
    701.      */
    702. -
    703.     function removeQuad($quad)
    704. -
    705.     {
    706. -
    707.         $graphName=$quad->getGraphName();$graphName=$graphName->getLabel();
    708. -
    709.         //find namedGraph IDs
    710. -
    711.         $graphID $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'");
    712. -
    713.  
    714. -
    715.         // static part of the sql statement
    716. -
    717.         $sql "DELETE FROM statements WHERE modelID = $graphID";
    718. -
    719.  
    720. -
    721.         // dynamic part of the sql statement
    722. -
    723.         $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject()$quad->getPredicate()$quad->getObject());
    724. -
    725.  
    726. -
    727.         // execute the query
    728. -
    729.         if($graphID)
    730. -
    731.             $recordSet =$this->dbConnection->execute($sql);
    732. -
    733.     }
    734. -
    735.  
    736. -
    737.     /**
    738. -
    739.      * Counts the Quads in the RDF dataset. Identical Triples in
    740. -
    741.      * different NamedGraphs are counted individually.
    742. -
    743.      *
    744. -
    745.      * @return int 
    746. -
    747.      */
    748. -
    749.     function countQuads()
    750. -
    751.     {
    752. -
    753.         $sql "SELECT count(*)
    754. -
    755.                   FROM statements, dataset_model
    756. -
    757.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    758. -
    759.  
    760. -
    761.         return ((int)$this->dbConnection->GetOne($sql));
    762. -
    763.     }
    764. -
    765.  
    766. -
    767.     /**
    768. -
    769.      * Finds Statements that match a quad pattern. The argument may contain
    770. -
    771.      * wildcards.
    772. -
    773.      *
    774. -
    775.      * @param Resource or null
    776. -
    777.      * @param Resource or null
    778. -
    779.      * @param Resource or null
    780. -
    781.      * @param Resource or null
    782. -
    783.      * @return IteratorFindQuadsDb 
    784. -
    785.      */
    786. -
    787.     function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false )
    788. -
    789.     {
    790. -
    791.         // static part of the sql statement
    792. -
    793.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI
    794. -
    795.                   FROM statements, dataset_model
    796. -
    797.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    798. -
    799.  
    800. -
    801.         if($graphName!=null)
    802. -
    803.         {
    804. -
    805.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    806. -
    807.         }
    808. -
    809.  
    810. -
    811.         // dynamic part of the sql statement
    812. -
    813.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    814. -
    815.  
    816. -
    817.         // execute the query
    818. -
    819.         $recordSet =$this->dbConnection->execute($sql);
    820. -
    821.  
    822. -
    823.  
    824. -
    825.         $it new IteratorFindQuadsDb($recordSet$this$returnAsTriples);
    826. -
    827.         return $it;
    828. -
    829.     }
    830. -
    831.  
    832. -
    833.     /**
    834. -
    835.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    836. -
    837.      * wildcards.
    838. -
    839.      *
    840. -
    841.      * @param Resource or null
    842. -
    843.      * @param Resource or null
    844. -
    845.      * @param Resource or null
    846. -
    847.      * @return IteratorFindQuadsDb 
    848. -
    849.      */
    850. -
    851.     function &findInDefaultGraph($subject,$predicate,$object)
    852. -
    853.     {
    854. -
    855.         $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI");
    856. -
    857.         // static part of the sql statement
    858. -
    859.         $sql "SELECT subjectpredicateobjectl_languagel_datatypesubject_isobject_is
    860. -
    861.                   FROM statements
    862. -
    863.                    WHERE modelID ='$defaultGraphID'";
    864. -
    865.  
    866. -
    867.         // dynamic part of the sql statement
    868. -
    869.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    870. -
    871.  
    872. -
    873.         // execute the query
    874. -
    875.         $recordSet =$this->dbConnection->execute($sql);
    876. -
    877.  
    878. -
    879.         $it new IteratorFindQuadsDb($recordSet$thistrue);
    880. -
    881.         return $it;
    882. -
    883.     }
    884. -
    885. }
    886. -
    887. ?>
    888. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetP.php.html.svn-base deleted file mode 100755 index 6e06e49e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__datasetDatasetP.php.html.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for DatasetP.php - - - - - -

    Source for file DatasetP.php

    -

    Documentation is available at DatasetP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // dataset Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : dataset package
    12. -
    13. //
    14. -
    15. // Author: Daniel Westphal    <http://www.d-westphal.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23. // Include ResModel classes
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'dataset/Dataset.php');
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'dataset/DatasetDb.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'dataset/NamedGraphMem.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'dataset/NamedGraphDb.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsMem.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsDb.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'dataset/Quad.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsMem.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsDb.php');
    44. -
    45. require_onceRDFAPI_INCLUDE_DIR 'syntax/TriXParser.php');
    46. -
    47. require_onceRDFAPI_INCLUDE_DIR 'syntax/TriXSerializer.php');
    48. -
    49. ?>
    50. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__infModelInfModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__infModelInfModelP.php.html.svn-base deleted file mode 100755 index c78517fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__infModelInfModelP.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for InfModelP.php - - - - - -

    Source for file InfModelP.php

    -

    Documentation is available at InfModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // InfModel Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : InfModel package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Daniel Westphal    <mail at d-westphal dot de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include InfModel classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfRule.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfStatement.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModel.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModelB.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModelF.php');
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelDBase.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelDBase.php.html.svn-base deleted file mode 100755 index 1b50b6d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelDBase.php.html.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for DBase.php - - - - - -

    Source for file DBase.php

    -

    Documentation is available at DBase.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // DBase
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : DBase package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include DBase class
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'model/DbModel.php' );
    28. -
    29. // include adodb classes
    30. -
    31. require_once(RDFAPI_INCLUDE_DIR .'util/adodb/adodb.inc.php');
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelModelP.php.html.svn-base deleted file mode 100755 index eac19d74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__modelModelP.php.html.svn-base +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - File Source for ModelP.php - - - - - -

    Source for file ModelP.php

    -

    Documentation is available at ModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Model
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Model package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include Model classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'model/Node.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'model/Literal.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'model/Resource.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'model/Blanknode.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'model/Statement.php' );
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'model/Model.php' );
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'model/MemModel.php' );
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'model/DbStore.php' );
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'util/StatementIterator.php' );
    44. -
    45. require_onceRDFAPI_INCLUDE_DIR 'model/ModelFactory.php' );
    46. -
    47. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlClient.php' );
    48. -
    49. require_onceRDFAPI_INCLUDE_DIR 'sparql/ClientQuery.php' );
    50. -
    51.  
    52. -
    53. ?>
    54. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__rdqlRDQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__rdqlRDQL.php.html.svn-base deleted file mode 100755 index c9e45a7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__rdqlRDQL.php.html.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for RDQL.php - - - - - -

    Source for file RDQL.php

    -

    Documentation is available at RDQL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // RDQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Rdql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17.  
    18. -
    19. // include RDQL classes
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlParser.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlEngine.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlDbEngine.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlMemEngine.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlResultIterator.php' );
    30. -
    31.  
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:46:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__resModelResModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__resModelResModelP.php.html.svn-base deleted file mode 100755 index 90166d25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__resModelResModelP.php.html.svn-base +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - File Source for ResModelP.php - - - - - -

    Source for file ResModelP.php

    -

    Documentation is available at ResModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // ResModel Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : ResModel package
    12. -
    13. //
    14. -
    15. // Author: Daniel Westphal    <mail at d-westphal dot de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23. // Include ResModel classes
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResModel.php');
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResResource.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResContainer.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResAlt.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResBag.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResLiteral.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResProperty.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResSeq.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResIterator.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResList.php');
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:46:57 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__sparqlSPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__sparqlSPARQL.php.html.svn-base deleted file mode 100755 index 77dc06da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__sparqlSPARQL.php.html.svn-base +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for SPARQL.php - - - - - -

    Source for file SPARQL.php

    -

    Documentation is available at SPARQL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // SPARQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Sparql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. // include SPARQL classes
    18. -
    19. require_onceRDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php' );
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'sparql/Constraint.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'sparql/Query.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb.php' );
    36. -
    37.  
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base deleted file mode 100755 index e2f55035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxGRDDL.php.html.svn-base +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - File Source for SyntaxGRDDL.php - - - - - -

    Source for file SyntaxGRDDL.php

    -

    Documentation is available at SyntaxGRDDL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RDF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RDF package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25.  
    26. -
    27. // Include Syntax classes
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/GRDDLParser.php' );
    30. -
    31. ?>
    32. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxN3.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxN3.php.html.svn-base deleted file mode 100755 index 7ec2648e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxN3.php.html.svn-base +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - File Source for SyntaxN3.php - - - - - -

    Source for file SyntaxN3.php

    -

    Documentation is available at SyntaxN3.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax N3 and NTriple
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax N3 and NTriple package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25.  
    26. -
    27. // Include Syntax classes
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/N3Parser.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/N3Serializer.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'syntax/NTripleSerializer.php' );
    34. -
    35. ?>
    36. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base deleted file mode 100755 index f6a62222..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRDF.php.html.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for SyntaxRDF.php - - - - - -

    Source for file SyntaxRDF.php

    -

    Documentation is available at SyntaxRDF.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RDF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RDF package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'syntax/RdfParser.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/RdfSerializer.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/NTripleSerializer.php' );
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base deleted file mode 100755 index d98d2bb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxRSS.php.html.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for SyntaxRSS.php - - - - - -

    Source for file SyntaxRSS.php

    -

    Documentation is available at SyntaxRSS.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RSS
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RSS package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'util/magpie/rss_fetch.inc' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/magpie/rss_parse.inc' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/RssParser.php' );
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base deleted file mode 100755 index 6f4704e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__syntaxSyntaxSparqlRes.php.html.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - File Source for SyntaxSparqlRes.php - - - - - -

    Source for file SyntaxSparqlRes.php

    -

    Documentation is available at SyntaxSparqlRes.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax SparqlRes
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax Sparql Result package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'syntax/SparqlResultParser.php' );
    28. -
    29. ?>
    30. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilUtility.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilUtility.php.html.svn-base deleted file mode 100755 index 7ec030e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilUtility.php.html.svn-base +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for Utility.php - - - - - -

    Source for file Utility.php

    -

    Documentation is available at Utility.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Utility
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Utility package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // include utility classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'util/RdfUtil.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/FindIterator.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'util/IterFind.php' );
    32. -
    33.  
    34. -
    35. // experimental
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'util/ModelComparator.php' );
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:54 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base deleted file mode 100755 index ad4b5cfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpieextlibSnoopy.class.inc.html.svn-base +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - File Source for Snoopy.class.inc - - - - - -

    Source for file Snoopy.class.inc

    -

    Documentation is available at Snoopy.class.inc

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /*************************************************
    6. -
    7.  
    8. -
    9. Snoopy - the PHP net client
    10. -
    11. Author: Monte Ohrt <monte@ispi.net>
    12. -
    13. Copyright (c): 1999-2000 ispi, all rights reserved
    14. -
    15. Version: 1.0
    16. -
    17.  
    18. -
    19.  * This library is free software; you can redistribute it and/or
    20. -
    21.  * modify it under the terms of the GNU Lesser General Public
    22. -
    23.  * License as published by the Free Software Foundation; either
    24. -
    25.  * version 2.1 of the License, or (at your option) any later version.
    26. -
    27.  *
    28. -
    29.  * This library is distributed in the hope that it will be useful,
    30. -
    31.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    32. -
    33.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    34. -
    35.  * Lesser General Public License for more details.
    36. -
    37.  *
    38. -
    39.  * You should have received a copy of the GNU Lesser General Public
    40. -
    41.  * License along with this library; if not, write to the Free Software
    42. -
    43.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    44. -
    45.  
    46. -
    47. You may contact the author of Snoopy by e-mail at:
    48. -
    49. monte@ispi.net
    50. -
    51.  
    52. -
    53. Or, write to:
    54. -
    55. Monte Ohrt
    56. -
    57. CTO, ispi
    58. -
    59. 237 S. 70th suite 220
    60. -
    61. Lincoln, NE 68510
    62. -
    63.  
    64. -
    65. The latest version of Snoopy can be obtained from:
    66. -
    67. http://snoopy.sourceforge.com
    68. -
    69.  
    70. -
    71. *************************************************/
    72. -
    73.  
    74. -
    75. class Snoopy
    76. -
    77. {
    78. -
    79.     /**** Public variables ****/
    80. -
    81.     
    82. -
    83.     /* user definable vars */
    84. -
    85.  
    86. -
    87.     var $host            =    "www.php.net";        // host name we are connecting to
    88. -
    89.     var $port            =    80;                    // port we are connecting to
    90. -
    91.     var $proxy_host        =    "";                    // proxy host to use
    92. -
    93.     var $proxy_port        =    "";                    // proxy port to use
    94. -
    95.     var $agent            =    "Snoopy v1.0";        // agent we masquerade as
    96. -
    97.     var    $referer        =    "";                    // referer info to pass
    98. -
    99.     var $cookies        =    array();            // array of cookies to pass
    100. -
    101.                                                 // $cookies["username"]="joe";
    102. -
    103.     var    $rawheaders        =    array();            // array of raw headers to send
    104. -
    105.                                                 // $rawheaders["Content-type"]="text/html";
    106. -
    107.  
    108. -
    109.     var $maxredirs        =    5;                    // http redirection depth maximum. 0 = disallow
    110. -
    111.     var $lastredirectaddr    =    "";                // contains address of last redirected address
    112. -
    113.     var    $offsiteok        =    true;                // allows redirection off-site
    114. -
    115.     var $maxframes        =    0;                    // frame content depth maximum. 0 = disallow
    116. -
    117.     var $expandlinks    =    true;                // expand links to fully qualified URLs.
    118. -
    119.                                                 // this only applies to fetchlinks()
    120. -
    121.                                                 // or submitlinks()
    122. -
    123.     var $passcookies    =    true;                // pass set cookies back through redirects
    124. -
    125.                                                 // NOTE: this currently does not respect
    126. -
    127.                                                 // dates, domains or paths.
    128. -
    129.     
    130. -
    131.     var    $user            =    "";                    // user for http authentication
    132. -
    133.     var    $pass            =    "";                    // password for http authentication
    134. -
    135.     
    136. -
    137.     // http accept types
    138. -
    139.     var $accept            =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
    140. -
    141.     
    142. -
    143.     var $results        =    "";                    // where the content is put
    144. -
    145.         
    146. -
    147.     var $error            =    "";                    // error messages sent here
    148. -
    149.     var    $response_code    =    "";                    // response code returned from server
    150. -
    151.     var    $headers        =    array();            // headers returned from server sent here
    152. -
    153.     var    $maxlength        =    500000;                // max return data length (body)
    154. -
    155.     var $read_timeout    =    0;                    // timeout on read operations, in seconds
    156. -
    157.                                                 // supported only since PHP 4 Beta 4
    158. -
    159.                                                 // set to 0 to disallow timeouts
    160. -
    161.     var $timed_out        =    false;                // if a read operation timed out
    162. -
    163.     var    $status            =    0;                    // http request status
    164. -
    165.     
    166. -
    167.     var    $curl_path        =    "/usr/bin/curl";
    168. -
    169.                                                 // Snoopy will use cURL for fetching
    170. -
    171.                                                 // SSL content if a full system path to
    172. -
    173.                                                 // the cURL binary is supplied here.
    174. -
    175.                                                 // set to false if you do not have
    176. -
    177.                                                 // cURL installed. See http://curl.haxx.se
    178. -
    179.                                                 // for details on installing cURL.
    180. -
    181.                                                 // Snoopy does *not* use the cURL
    182. -
    183.                                                 // library functions built into php,
    184. -
    185.                                                 // as these functions are not stable
    186. -
    187.                                                 // as of this Snoopy release.
    188. -
    189.     
    190. -
    191.     // send Accept-encoding: gzip?
    192. -
    193.     var $use_gzip        = true;    
    194. -
    195.     
    196. -
    197.     /**** Private variables ****/    
    198. -
    199.     
    200. -
    201.     var    $_maxlinelen    =    4096;                // max line length (headers)
    202. -
    203.     
    204. -
    205.     var $_httpmethod    =    "GET";                // default http request method
    206. -
    207.     var $_httpversion    =    "HTTP/1.0";            // default http request version
    208. -
    209.     var $_submit_method    =    "POST";                // default submit method
    210. -
    211.     var $_submit_type    =    "application/x-www-form-urlencoded";    // default submit type
    212. -
    213.     var $_mime_boundary    =   "";                    // MIME boundary for multipart/form-data submit type
    214. -
    215.     var $_redirectaddr    =    false;                // will be set if page fetched is a redirect
    216. -
    217.     var $_redirectdepth    =    0;                    // increments on an http redirect
    218. -
    219.     var $_frameurls        =     array();            // frame src urls
    220. -
    221.     var $_framedepth    =    0;                    // increments on frame depth
    222. -
    223.     
    224. -
    225.     var $_isproxy        =    false;                // set if using a proxy server
    226. -
    227.     var $_fp_timeout    =    30;                    // timeout for socket connection
    228. -
    229.  
    230. -
    231. /*======================================================================*\
    232. -
    233.     Function:    fetch
    234. -
    235.     Purpose:    fetch the contents of a web page
    236. -
    237.                 (and possibly other protocols in the
    238. -
    239.                 future like ftp, nntp, gopher, etc.)
    240. -
    241.     Input:        $URI    the location of the page to fetch
    242. -
    243.     Output:        $this->results    the output text from the fetch
    244. -
    245. \*======================================================================*/
    246. -
    247.  
    248. -
    249.     function fetch($URI)
    250. -
    251.     {
    252. -
    253.     
    254. -
    255.         //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
    256. -
    257.         $URI_PARTS parse_url($URI);
    258. -
    259.         if (!empty($URI_PARTS["user"]))
    260. -
    261.             $this->user = $URI_PARTS["user"];
    262. -
    263.         if (!empty($URI_PARTS["pass"]))
    264. -
    265.             $this->pass = $URI_PARTS["pass"];
    266. -
    267.                 
    268. -
    269.         switch($URI_PARTS["scheme"])
    270. -
    271.         {
    272. -
    273.             case "http":
    274. -
    275.                 $this->host = $URI_PARTS["host"];
    276. -
    277.                 if(!empty($URI_PARTS["port"]))
    278. -
    279.                     $this->port = $URI_PARTS["port"];
    280. -
    281.                 if($this->_connect($fp))
    282. -
    283.                 {
    284. -
    285.                     if($this->_isproxy)
    286. -
    287.                     {
    288. -
    289.                         // using proxy, send entire URI
    290. -
    291.                         $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
    292. -
    293.                     }
    294. -
    295.                     else
    296. -
    297.                     {
    298. -
    299.                         $path $URI_PARTS["path"].(isset($URI_PARTS["query"]"?".$URI_PARTS["query""");
    300. -
    301.                         // no proxy, send only the path
    302. -
    303.                         $this->_httprequest($path$fp$URI$this->_httpmethod);
    304. -
    305.                     }
    306. -
    307.                     
    308. -
    309.                     $this->_disconnect($fp);
    310. -
    311.  
    312. -
    313.                     if($this->_redirectaddr)
    314. -
    315.                     {
    316. -
    317.                         /* url was redirected, check if we've hit the max depth */
    318. -
    319.                         if($this->maxredirs > $this->_redirectdepth)
    320. -
    321.                         {
    322. -
    323.                             // only follow redirect if it's on this site, or offsiteok is true
    324. -
    325.                             if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr|| $this->offsiteok)
    326. -
    327.                             {
    328. -
    329.                                 /* follow the redirect */
    330. -
    331.                                 $this->_redirectdepth++;
    332. -
    333.                                 $this->lastredirectaddr=$this->_redirectaddr;
    334. -
    335.                                 $this->fetch($this->_redirectaddr);
    336. -
    337.                             }
    338. -
    339.                         }
    340. -
    341.                     }
    342. -
    343.  
    344. -
    345.                     if($this->_framedepth < $this->maxframes && count($this->_frameurls0)
    346. -
    347.                     {
    348. -
    349.                         $frameurls $this->_frameurls;
    350. -
    351.                         $this->_frameurls = array();
    352. -
    353.                         
    354. -
    355.                         while(list(,$frameurleach($frameurls))
    356. -
    357.                         {
    358. -
    359.                             if($this->_framedepth < $this->maxframes)
    360. -
    361.                             {
    362. -
    363.                                 $this->fetch($frameurl);
    364. -
    365.                                 $this->_framedepth++;
    366. -
    367.                             }
    368. -
    369.                             else
    370. -
    371.                                 break;
    372. -
    373.                         }
    374. -
    375.                     }                    
    376. -
    377.                 }
    378. -
    379.                 else
    380. -
    381.                 {
    382. -
    383.                     return false;
    384. -
    385.                 }
    386. -
    387.                 return true;                    
    388. -
    389.                 break;
    390. -
    391.             case "https":
    392. -
    393.                 if(!$this->curl_path || (!is_executable($this->curl_path))) {
    394. -
    395.                     $this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n";
    396. -
    397.                     return false;
    398. -
    399.                 }
    400. -
    401.                 $this->host = $URI_PARTS["host"];
    402. -
    403.                 if(!empty($URI_PARTS["port"]))
    404. -
    405.                     $this->port = $URI_PARTS["port"];
    406. -
    407.                 if($this->_isproxy)
    408. -
    409.                 {
    410. -
    411.                     // using proxy, send entire URI
    412. -
    413.                     $this->_httpsrequest($URI,$URI,$this->_httpmethod);
    414. -
    415.                 }
    416. -
    417.                 else
    418. -
    419.                 {
    420. -
    421.                     $path $URI_PARTS["path"].($URI_PARTS["query""?".$URI_PARTS["query""");
    422. -
    423.                     // no proxy, send only the path
    424. -
    425.                     $this->_httpsrequest($path$URI$this->_httpmethod);
    426. -
    427.                 }
    428. -
    429.  
    430. -
    431.                 if($this->_redirectaddr)
    432. -
    433.                 {
    434. -
    435.                     /* url was redirected, check if we've hit the max depth */
    436. -
    437.                     if($this->maxredirs > $this->_redirectdepth)
    438. -
    439.                     {
    440. -
    441.                         // only follow redirect if it's on this site, or offsiteok is true
    442. -
    443.                         if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr|| $this->offsiteok)
    444. -
    445.                         {
    446. -
    447.                             /* follow the redirect */
    448. -
    449.                             $this->_redirectdepth++;
    450. -
    451.                             $this->lastredirectaddr=$this->_redirectaddr;
    452. -
    453.                             $this->fetch($this->_redirectaddr);
    454. -
    455.                         }
    456. -
    457.                     }
    458. -
    459.                 }
    460. -
    461.  
    462. -
    463.                 if($this->_framedepth < $this->maxframes && count($this->_frameurls0)
    464. -
    465.                 {
    466. -
    467.                     $frameurls $this->_frameurls;
    468. -
    469.                     $this->_frameurls = array();
    470. -
    471.  
    472. -
    473.                     while(list(,$frameurleach($frameurls))
    474. -
    475.                     {
    476. -
    477.                         if($this->_framedepth < $this->maxframes)
    478. -
    479.                         {
    480. -
    481.                             $this->fetch($frameurl);
    482. -
    483.                             $this->_framedepth++;
    484. -
    485.                         }
    486. -
    487.                         else
    488. -
    489.                             break;
    490. -
    491.                     }
    492. -
    493.                 }                    
    494. -
    495.                 return true;                    
    496. -
    497.                 break;
    498. -
    499.             default:
    500. -
    501.                 // not a valid protocol
    502. -
    503.                 $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
    504. -
    505.                 return false;
    506. -
    507.                 break;
    508. -
    509.         }        
    510. -
    511.         return true;
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.  
    518. -
    519.  
    520. -
    521. /*======================================================================*\
    522. -
    523.     Private functions
    524. -
    525. \*======================================================================*/
    526. -
    527.     
    528. -
    529.     
    530. -
    531. /*======================================================================*\
    532. -
    533.     Function:    _striplinks
    534. -
    535.     Purpose:    strip the hyperlinks from an html document
    536. -
    537.     Input:        $document    document to strip.
    538. -
    539.     Output:        $match        an array of the links
    540. -
    541. \*======================================================================*/
    542. -
    543.  
    544. -
    545.     function _striplinks($document)
    546. -
    547.     {    
    548. -
    549.         preg_match_all("'<\s*a\s+.*href\s*=\s*            # find <a href=
    550. -
    551.                         ([\"\'])?                    # find single or double quote
    552. -
    553.                         (?(1) (.*?)\\1 | ([^\s\>]+))        # if quote found, match up to next matching
    554. -
    555.                                                     # quote, otherwise match up to next space
    556. -
    557.                         'isx",$document,$links);
    558. -
    559.                         
    560. -
    561.  
    562. -
    563.         // catenate the non-empty matches from the conditional subpattern
    564. -
    565.  
    566. -
    567.         while(list($key,$valeach($links[2]))
    568. -
    569.         {
    570. -
    571.             if(!empty($val))
    572. -
    573.                 $match[$val;
    574. -
    575.         }                
    576. -
    577.         
    578. -
    579.         while(list($key,$valeach($links[3]))
    580. -
    581.         {
    582. -
    583.             if(!empty($val))
    584. -
    585.                 $match[$val;
    586. -
    587.         }        
    588. -
    589.         
    590. -
    591.         // return the links
    592. -
    593.         return $match;
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. /*======================================================================*\
    600. -
    601.     Function:    _stripform
    602. -
    603.     Purpose:    strip the form elements from an html document
    604. -
    605.     Input:        $document    document to strip.
    606. -
    607.     Output:        $match        an array of the links
    608. -
    609. \*======================================================================*/
    610. -
    611.  
    612. -
    613.     function _stripform($document)
    614. -
    615.     {    
    616. -
    617.         preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
    618. -
    619.         
    620. -
    621.         // catenate the matches
    622. -
    623.         $match implode("\r\n",$elements[0]);
    624. -
    625.                 
    626. -
    627.         // return the links
    628. -
    629.         return $match;
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     
    636. -
    637.     
    638. -
    639. /*======================================================================*\
    640. -
    641.     Function:    _striptext
    642. -
    643.     Purpose:    strip the text from an html document
    644. -
    645.     Input:        $document    document to strip.
    646. -
    647.     Output:        $text        the resulting text
    648. -
    649. \*======================================================================*/
    650. -
    651.  
    652. -
    653.     function _striptext($document)
    654. -
    655.     {
    656. -
    657.         
    658. -
    659.         // I didn't use preg eval (//e) since that is only available in PHP 4.0.
    660. -
    661.         // so, list your entities one by one here. I included some of the
    662. -
    663.         // more common ones.
    664. -
    665.                                 
    666. -
    667.         $search array("'<script[^>]*?>.*?</script>'si",    // strip out javascript
    668. -
    669.                         "'<[\/\!]*?[^<>]*?>'si",            // strip out html tags
    670. -
    671.                         "'([\r\n])[\s]+'",                    // strip out white space
    672. -
    673.                         "'&(quote|#34);'i",                    // replace html entities
    674. -
    675.                         "'&(amp|#38);'i",
    676. -
    677.                         "'&(lt|#60);'i",
    678. -
    679.                         "'&(gt|#62);'i",
    680. -
    681.                         "'&(nbsp|#160);'i",
    682. -
    683.                         "'&(iexcl|#161);'i",
    684. -
    685.                         "'&(cent|#162);'i",
    686. -
    687.                         "'&(pound|#163);'i",
    688. -
    689.                         "'&(copy|#169);'i"
    690. -
    691.                         );                
    692. -
    693.         $replace array(    "",
    694. -
    695.                             "",
    696. -
    697.                             "\\1",
    698. -
    699.                             "\"",
    700. -
    701.                             "&",
    702. -
    703.                             "<",
    704. -
    705.                             ">",
    706. -
    707.                             " ",
    708. -
    709.                             chr(161),
    710. -
    711.                             chr(162),
    712. -
    713.                             chr(163),
    714. -
    715.                             chr(169));
    716. -
    717.                     
    718. -
    719.         $text preg_replace($search,$replace,$document);
    720. -
    721.                                 
    722. -
    723.         return $text;
    724. -
    725.     }
    726. -
    727.  
    728. -
    729. /*======================================================================*\
    730. -
    731.     Function:    _expandlinks
    732. -
    733.     Purpose:    expand each link into a fully qualified URL
    734. -
    735.     Input:        $links            the links to qualify
    736. -
    737.                 $URI            the full URI to get the base from
    738. -
    739.     Output:        $expandedLinks    the expanded links
    740. -
    741. \*======================================================================*/
    742. -
    743.  
    744. -
    745.     function _expandlinks($links,$URI)
    746. -
    747.     {
    748. -
    749.         
    750. -
    751.         preg_match("/^[^\?]+/",$URI,$match);
    752. -
    753.  
    754. -
    755.         $match preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
    756. -
    757.                 
    758. -
    759.         $search array(     "|^http://".preg_quote($this->host)."|i",
    760. -
    761.                             "|^(?!http://)(\/)?(?!mailto:)|i",
    762. -
    763.                             "|/\./|",
    764. -
    765.                             "|/[^\/]+/\.\./|"
    766. -
    767.                         );
    768. -
    769.                         
    770. -
    771.         $replace array(    "",
    772. -
    773.                             $match."/",
    774. -
    775.                             "/",
    776. -
    777.                             "/"
    778. -
    779.                         );            
    780. -
    781.                 
    782. -
    783.         $expandedLinks preg_replace($search,$replace,$links);
    784. -
    785.  
    786. -
    787.         return $expandedLinks;
    788. -
    789.     }
    790. -
    791.  
    792. -
    793. /*======================================================================*\
    794. -
    795.     Function:    _httprequest
    796. -
    797.     Purpose:    go get the http data from the server
    798. -
    799.     Input:        $url        the url to fetch
    800. -
    801.                 $fp            the current open file pointer
    802. -
    803.                 $URI        the full URI
    804. -
    805.                 $body        body contents to send if any (POST)
    806. -
    807.     Output:        
    808. -
    809. \*======================================================================*/
    810. -
    811.     
    812. -
    813.     function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
    814. -
    815.     {
    816. -
    817.         if($this->passcookies && $this->_redirectaddr)
    818. -
    819.             $this->setcookies();
    820. -
    821.             
    822. -
    823.         $URI_PARTS parse_url($URI);
    824. -
    825.         if(empty($url))
    826. -
    827.             $url "/";
    828. -
    829.         $headers $http_method." ".$url." ".$this->_httpversion."\r\n";        
    830. -
    831.         if(!empty($this->agent))
    832. -
    833.             $headers .= "User-Agent: ".$this->agent."\r\n";
    834. -
    835.         if(!empty($this->host&& !isset($this->rawheaders['Host']))
    836. -
    837.             $headers .= "Host: ".$this->host."\r\n";
    838. -
    839.         if(!empty($this->accept))
    840. -
    841.             $headers .= "Accept: ".$this->accept."\r\n";
    842. -
    843.         
    844. -
    845.         if($this->use_gzip{
    846. -
    847.             // make sure PHP was built with --with-zlib
    848. -
    849.             // and we can handle gzipp'ed data
    850. -
    851.             if function_exists(gzinflate) ) {
    852. -
    853.                $headers .= "Accept-encoding: gzip\r\n";
    854. -
    855.             }
    856. -
    857.             else {
    858. -
    859.                trigger_error(
    860. -
    861.                    "use_gzip is on, but PHP was built without zlib support.".
    862. -
    863.                 "  Requesting file(s) without gzip encoding."
    864. -
    865.                 E_USER_NOTICE);
    866. -
    867.             }
    868. -
    869.         }
    870. -
    871.         
    872. -
    873.         if(!empty($this->referer))
    874. -
    875.             $headers .= "Referer: ".$this->referer."\r\n";
    876. -
    877.         if(!empty($this->cookies))
    878. -
    879.         {            
    880. -
    881.             if(!is_array($this->cookies))
    882. -
    883.                 $this->cookies = (array)$this->cookies;
    884. -
    885.     
    886. -
    887.             reset($this->cookies);
    888. -
    889.             if count($this->cookies{
    890. -
    891.                 $cookie_headers .= 'Cookie: ';
    892. -
    893.                 foreach $this->cookies as $cookieKey => $cookieVal {
    894. -
    895.                 $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
    896. -
    897.                 }
    898. -
    899.                 $headers .= substr($cookie_headers,0,-2"\r\n";
    900. -
    901.             
    902. -
    903.         }
    904. -
    905.         if(!empty($this->rawheaders))
    906. -
    907.         {
    908. -
    909.             if(!is_array($this->rawheaders))
    910. -
    911.                 $this->rawheaders = (array)$this->rawheaders;
    912. -
    913.             while(list($headerKey,$headerValeach($this->rawheaders))
    914. -
    915.                 $headers .= $headerKey.": ".$headerVal."\r\n";
    916. -
    917.         }
    918. -
    919.         if(!empty($content_type)) {
    920. -
    921.             $headers .= "Content-type$content_type";
    922. -
    923.             if ($content_type == "multipart/form-data")
    924. -
    925.                 $headers .= "; boundary=".$this->_mime_boundary;
    926. -
    927.             $headers .= "\r\n";
    928. -
    929.         }
    930. -
    931.         if(!empty($body))    
    932. -
    933.             $headers .= "Content-length: ".strlen($body)."\r\n";
    934. -
    935.         if(!empty($this->user|| !empty($this->pass))    
    936. -
    937.             $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
    938. -
    939.  
    940. -
    941.         $headers .= "\r\n";
    942. -
    943.         
    944. -
    945.         // set the read timeout if needed
    946. -
    947.         if ($this->read_timeout > 0)
    948. -
    949.             socket_set_timeout($fp$this->read_timeout);
    950. -
    951.         $this->timed_out = false;
    952. -
    953.         
    954. -
    955.         fwrite($fp,$headers.$body,strlen($headers.$body));
    956. -
    957.         
    958. -
    959.         $this->_redirectaddr = false;
    960. -
    961.         unset($this->headers);
    962. -
    963.         
    964. -
    965.         // content was returned gzip encoded?
    966. -
    967.         $is_gzipped false;
    968. -
    969.                         
    970. -
    971.         while($currentHeader fgets($fp,$this->_maxlinelen))
    972. -
    973.         {
    974. -
    975.             if ($this->read_timeout > && $this->_check_timeout($fp))
    976. -
    977.             {
    978. -
    979.                 $this->status=-100;
    980. -
    981.                 return false;
    982. -
    983.             }
    984. -
    985.                 
    986. -
    987.         //    if($currentHeader == "\r\n")
    988. -
    989.             if(preg_match("/^\r?\n$/"$currentHeader) )
    990. -
    991.                   break;
    992. -
    993.                         
    994. -
    995.             // if a header begins with Location: or URI:, set the redirect
    996. -
    997.             if(preg_match("/^(Location:|URI:)/i",$currentHeader))
    998. -
    999.             {
    1000. -
    1001.                 // get URL portion of the redirect
    1002. -
    1003.                 preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
    1004. -
    1005.                 // look for :// in the Location header to see if hostname is included
    1006. -
    1007.                 if(!preg_match("|\:\/\/|",$matches[2]))
    1008. -
    1009.                 {
    1010. -
    1011.                     // no host in the path, so prepend
    1012. -
    1013.                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    1014. -
    1015.                     // eliminate double slash
    1016. -
    1017.                     if(!preg_match("|^/|",$matches[2]))
    1018. -
    1019.                             $this->_redirectaddr .= "/".$matches[2];
    1020. -
    1021.                     else
    1022. -
    1023.                             $this->_redirectaddr .= $matches[2];
    1024. -
    1025.                 }
    1026. -
    1027.                 else
    1028. -
    1029.                     $this->_redirectaddr = $matches[2];
    1030. -
    1031.             }
    1032. -
    1033.         
    1034. -
    1035.             if(preg_match("|^HTTP/|",$currentHeader))
    1036. -
    1037.             {
    1038. -
    1039.                 if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader$status))
    1040. -
    1041.                 {
    1042. -
    1043.                     $this->status$status[1];
    1044. -
    1045.                 }                
    1046. -
    1047.                 $this->response_code = $currentHeader;
    1048. -
    1049.             }
    1050. -
    1051.             
    1052. -
    1053.             if (preg_match("/Content-Encoding: gzip/"$currentHeader) ) {
    1054. -
    1055.                 $is_gzipped true;
    1056. -
    1057.             }
    1058. -
    1059.             
    1060. -
    1061.             $this->headers[$currentHeader;
    1062. -
    1063.         }
    1064. -
    1065.  
    1066. -
    1067.         # $results = fread($fp, $this->maxlength);
    1068. -
    1069.         $results "";
    1070. -
    1071.         while $data fread($fp$this->maxlength) ) {
    1072. -
    1073.             $results .= $data;
    1074. -
    1075.             if (
    1076. -
    1077.                 strlen($results$this->maxlength {
    1078. -
    1079.                 break;
    1080. -
    1081.             }
    1082. -
    1083.         }
    1084. -
    1085.         
    1086. -
    1087.         // gunzip
    1088. -
    1089.         if $is_gzipped {
    1090. -
    1091.             // per http://www.php.net/manual/en/function.gzencode.php
    1092. -
    1093.             $results substr($results10);
    1094. -
    1095.             $results gzinflate($results);
    1096. -
    1097.         }
    1098. -
    1099.         
    1100. -
    1101.         if ($this->read_timeout > && $this->_check_timeout($fp))
    1102. -
    1103.         {
    1104. -
    1105.             $this->status=-100;
    1106. -
    1107.             return false;
    1108. -
    1109.         }
    1110. -
    1111.         
    1112. -
    1113.         // check if there is a a redirect meta tag
    1114. -
    1115.         
    1116. -
    1117.         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    1118. -
    1119.         {
    1120. -
    1121.             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);    
    1122. -
    1123.         }
    1124. -
    1125.  
    1126. -
    1127.         // have we hit our frame depth and is there frame src to fetch?
    1128. -
    1129.         if(($this->_framedepth < $this->maxframes&& preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    1130. -
    1131.         {
    1132. -
    1133.             $this->results[$results;
    1134. -
    1135.             for($x=0$x<count($match[1])$x++)
    1136. -
    1137.                 $this->_frameurls[$this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    1138. -
    1139.         }
    1140. -
    1141.         // have we already fetched framed content?
    1142. -
    1143.         elseif(is_array($this->results))
    1144. -
    1145.             $this->results[$results;
    1146. -
    1147.         // no framed content
    1148. -
    1149.         else
    1150. -
    1151.             $this->results = $results;
    1152. -
    1153.         
    1154. -
    1155.         return true;
    1156. -
    1157.     }
    1158. -
    1159.  
    1160. -
    1161. /*======================================================================*\
    1162. -
    1163.     Function:    _httpsrequest
    1164. -
    1165.     Purpose:    go get the https data from the server using curl
    1166. -
    1167.     Input:        $url        the url to fetch
    1168. -
    1169.                 $URI        the full URI
    1170. -
    1171.                 $body        body contents to send if any (POST)
    1172. -
    1173.     Output:        
    1174. -
    1175. \*======================================================================*/
    1176. -
    1177.     
    1178. -
    1179.     function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
    1180. -
    1181.     {
    1182. -
    1183.         if($this->passcookies && $this->_redirectaddr)
    1184. -
    1185.             $this->setcookies();
    1186. -
    1187.  
    1188. -
    1189.         $headers array();        
    1190. -
    1191.                     
    1192. -
    1193.         $URI_PARTS parse_url($URI);
    1194. -
    1195.         if(empty($url))
    1196. -
    1197.             $url "/";
    1198. -
    1199.         // GET ... header not needed for curl
    1200. -
    1201.         //$headers[] = $http_method." ".$url." ".$this->_httpversion;        
    1202. -
    1203.         if(!empty($this->agent))
    1204. -
    1205.             $headers["User-Agent: ".$this->agent;
    1206. -
    1207.         if(!empty($this->host))
    1208. -
    1209.             $headers["Host: ".$this->host;
    1210. -
    1211.         if(!empty($this->accept))
    1212. -
    1213.             $headers["Accept: ".$this->accept;
    1214. -
    1215.         if(!empty($this->referer))
    1216. -
    1217.             $headers["Referer: ".$this->referer;
    1218. -
    1219.         if(!empty($this->cookies))
    1220. -
    1221.         {            
    1222. -
    1223.             if(!is_array($this->cookies))
    1224. -
    1225.                 $this->cookies = (array)$this->cookies;
    1226. -
    1227.     
    1228. -
    1229.             reset($this->cookies);
    1230. -
    1231.             if count($this->cookies{
    1232. -
    1233.                 $cookie_str 'Cookie: ';
    1234. -
    1235.                 foreach $this->cookies as $cookieKey => $cookieVal {
    1236. -
    1237.                 $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
    1238. -
    1239.                 }
    1240. -
    1241.                 $headers[substr($cookie_str,0,-2);
    1242. -
    1243.             }
    1244. -
    1245.         }
    1246. -
    1247.         if(!empty($this->rawheaders))
    1248. -
    1249.         {
    1250. -
    1251.             if(!is_array($this->rawheaders))
    1252. -
    1253.                 $this->rawheaders = (array)$this->rawheaders;
    1254. -
    1255.             while(list($headerKey,$headerValeach($this->rawheaders))
    1256. -
    1257.                 $headers[$headerKey.": ".$headerVal;
    1258. -
    1259.         }
    1260. -
    1261.         if(!empty($content_type)) {
    1262. -
    1263.             if ($content_type == "multipart/form-data")
    1264. -
    1265.                 $headers["Content-type$content_typeboundary=".$this->_mime_boundary;
    1266. -
    1267.             else
    1268. -
    1269.                 $headers["Content-type$content_type";
    1270. -
    1271.         }
    1272. -
    1273.         if(!empty($body))    
    1274. -
    1275.             $headers["Content-length: ".strlen($body);
    1276. -
    1277.         if(!empty($this->user|| !empty($this->pass))    
    1278. -
    1279.             $headers["Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
    1280. -
    1281.             
    1282. -
    1283.         for($curr_header 0$curr_header count($headers)$curr_header++{
    1284. -
    1285.             $cmdline_params .= " -H \"".$headers[$curr_header]."\"";
    1286. -
    1287.         }
    1288. -
    1289.                                            
    1290. -
    1291.         if(!empty($body))
    1292. -
    1293.             $cmdline_params .= " -d \"$body\"";
    1294. -
    1295.         
    1296. -
    1297.         if($this->read_timeout > 0)
    1298. -
    1299.             $cmdline_params .= " -m ".$this->read_timeout;
    1300. -
    1301.         
    1302. -
    1303.         $headerfile uniqid(time());
    1304. -
    1305.         
    1306. -
    1307.         # accept self-signed certs
    1308. -
    1309.         $cmdline_params .= " -k"
    1310. -
    1311.         exec($this->curl_path." -D \"/tmp/$headerfile\"".escapeshellcmd($cmdline_params)." ".escapeshellcmd($URI),$results,$return);
    1312. -
    1313.         
    1314. -
    1315.         if($return)
    1316. -
    1317.         {
    1318. -
    1319.             $this->error = "ErrorcURL could not retrieve the documenterror $return.";
    1320. -
    1321.             return false;
    1322. -
    1323.         }
    1324. -
    1325.             
    1326. -
    1327.             
    1328. -
    1329.         $results implode("\r\n",$results);
    1330. -
    1331.         
    1332. -
    1333.         $result_headers file("/tmp/$headerfile");
    1334. -
    1335.                         
    1336. -
    1337.         $this->_redirectaddr = false;
    1338. -
    1339.         unset($this->headers);
    1340. -
    1341.                         
    1342. -
    1343.         for($currentHeader 0$currentHeader count($result_headers)$currentHeader++)
    1344. -
    1345.         {
    1346. -
    1347.             
    1348. -
    1349.             // if a header begins with Location: or URI:, set the redirect
    1350. -
    1351.             if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
    1352. -
    1353.             {
    1354. -
    1355.                 // get URL portion of the redirect
    1356. -
    1357.                 preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
    1358. -
    1359.                 // look for :// in the Location header to see if hostname is included
    1360. -
    1361.                 if(!preg_match("|\:\/\/|",$matches[2]))
    1362. -
    1363.                 {
    1364. -
    1365.                     // no host in the path, so prepend
    1366. -
    1367.                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    1368. -
    1369.                     // eliminate double slash
    1370. -
    1371.                     if(!preg_match("|^/|",$matches[2]))
    1372. -
    1373.                             $this->_redirectaddr .= "/".$matches[2];
    1374. -
    1375.                     else
    1376. -
    1377.                             $this->_redirectaddr .= $matches[2];
    1378. -
    1379.                 }
    1380. -
    1381.                 else
    1382. -
    1383.                     $this->_redirectaddr = $matches[2];
    1384. -
    1385.             }
    1386. -
    1387.         
    1388. -
    1389.             if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
    1390. -
    1391.             {
    1392. -
    1393.                 $this->response_code = $result_headers[$currentHeader];
    1394. -
    1395.                 if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code$match))
    1396. -
    1397.                 {
    1398. -
    1399.                 $this->status$match[1];
    1400. -
    1401.                         }
    1402. -
    1403.             }
    1404. -
    1405.             $this->headers[$result_headers[$currentHeader];
    1406. -
    1407.         }
    1408. -
    1409.  
    1410. -
    1411.         // check if there is a a redirect meta tag
    1412. -
    1413.         
    1414. -
    1415.         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    1416. -
    1417.         {
    1418. -
    1419.             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);    
    1420. -
    1421.         }
    1422. -
    1423.  
    1424. -
    1425.         // have we hit our frame depth and is there frame src to fetch?
    1426. -
    1427.         if(($this->_framedepth < $this->maxframes&& preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    1428. -
    1429.         {
    1430. -
    1431.             $this->results[$results;
    1432. -
    1433.             for($x=0$x<count($match[1])$x++)
    1434. -
    1435.                 $this->_frameurls[$this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    1436. -
    1437.         }
    1438. -
    1439.         // have we already fetched framed content?
    1440. -
    1441.         elseif(is_array($this->results))
    1442. -
    1443.             $this->results[$results;
    1444. -
    1445.         // no framed content
    1446. -
    1447.         else
    1448. -
    1449.             $this->results = $results;
    1450. -
    1451.  
    1452. -
    1453.         unlink("/tmp/$headerfile");
    1454. -
    1455.         
    1456. -
    1457.         return true;
    1458. -
    1459.     }
    1460. -
    1461.  
    1462. -
    1463. /*======================================================================*\
    1464. -
    1465.     Function:    setcookies()
    1466. -
    1467.     Purpose:    set cookies for a redirection
    1468. -
    1469. \*======================================================================*/
    1470. -
    1471.     
    1472. -
    1473.     function setcookies()
    1474. -
    1475.     {
    1476. -
    1477.         for($x=0$x<count($this->headers)$x++)
    1478. -
    1479.         {
    1480. -
    1481.         if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i"$this->headers[$x],$match))
    1482. -
    1483.             $this->cookies[$match[1]] $match[2];
    1484. -
    1485.         }
    1486. -
    1487.     }
    1488. -
    1489.  
    1490. -
    1491.     
    1492. -
    1493. /*======================================================================*\
    1494. -
    1495.     Function:    _check_timeout
    1496. -
    1497.     Purpose:    checks whether timeout has occurred
    1498. -
    1499.     Input:        $fp    file pointer
    1500. -
    1501. \*======================================================================*/
    1502. -
    1503.  
    1504. -
    1505.     function _check_timeout($fp)
    1506. -
    1507.     {
    1508. -
    1509.         if ($this->read_timeout > 0{
    1510. -
    1511.             $fp_status socket_get_status($fp);
    1512. -
    1513.             if ($fp_status["timed_out"]{
    1514. -
    1515.                 $this->timed_out = true;
    1516. -
    1517.                 return true;
    1518. -
    1519.             }
    1520. -
    1521.         }
    1522. -
    1523.         return false;
    1524. -
    1525.     }
    1526. -
    1527.  
    1528. -
    1529. /*======================================================================*\
    1530. -
    1531.     Function:    _connect
    1532. -
    1533.     Purpose:    make a socket connection
    1534. -
    1535.     Input:        $fp    file pointer
    1536. -
    1537. \*======================================================================*/
    1538. -
    1539.     
    1540. -
    1541.     function _connect(&$fp)
    1542. -
    1543.     {
    1544. -
    1545.         if(!empty($this->proxy_host&& !empty($this->proxy_port))
    1546. -
    1547.             {
    1548. -
    1549.                 $this->_isproxy = true;
    1550. -
    1551.                 $host $this->proxy_host;
    1552. -
    1553.                 $port $this->proxy_port;
    1554. -
    1555.             }
    1556. -
    1557.         else
    1558. -
    1559.         {
    1560. -
    1561.             $host $this->host;
    1562. -
    1563.             $port $this->port;
    1564. -
    1565.         }
    1566. -
    1567.     
    1568. -
    1569.         $this->status = 0;
    1570. -
    1571.         
    1572. -
    1573.         if($fp fsockopen(
    1574. -
    1575.                     $host,
    1576. -
    1577.                     $port,
    1578. -
    1579.                     $errno,
    1580. -
    1581.                     $errstr,
    1582. -
    1583.                     $this->_fp_timeout
    1584. -
    1585.                     ))
    1586. -
    1587.         {
    1588. -
    1589.             // socket connection succeeded
    1590. -
    1591.  
    1592. -
    1593.             return true;
    1594. -
    1595.         }
    1596. -
    1597.         else
    1598. -
    1599.         {
    1600. -
    1601.             // socket connection failed
    1602. -
    1603.             $this->status = $errno;
    1604. -
    1605.             switch($errno)
    1606. -
    1607.             {
    1608. -
    1609.                 case -3:
    1610. -
    1611.                     $this->error="socket creation failed (-3)";
    1612. -
    1613.                 case -4:
    1614. -
    1615.                     $this->error="dns lookup failure (-4)";
    1616. -
    1617.                 case -5:
    1618. -
    1619.                     $this->error="connection refused or timed out (-5)";
    1620. -
    1621.                 default:
    1622. -
    1623.                     $this->error="connection failed (".$errno.")";
    1624. -
    1625.             }
    1626. -
    1627.             return false;
    1628. -
    1629.         }
    1630. -
    1631.     }
    1632. -
    1633. /*======================================================================*\
    1634. -
    1635.     Function:    _disconnect
    1636. -
    1637.     Purpose:    disconnect a socket connection
    1638. -
    1639.     Input:        $fp    file pointer
    1640. -
    1641. \*======================================================================*/
    1642. -
    1643.     
    1644. -
    1645.     function _disconnect($fp)
    1646. -
    1647.     {
    1648. -
    1649.         return(fclose($fp));
    1650. -
    1651.     }
    1652. -
    1653.  
    1654. -
    1655.     
    1656. -
    1657. /*======================================================================*\
    1658. -
    1659.     Function:    _prepare_post_body
    1660. -
    1661.     Purpose:    Prepare post body according to encoding type
    1662. -
    1663.     Input:        $formvars  - form variables
    1664. -
    1665.                 $formfiles - form upload files
    1666. -
    1667.     Output:        post body
    1668. -
    1669. \*======================================================================*/
    1670. -
    1671.     
    1672. -
    1673.     function _prepare_post_body($formvars$formfiles)
    1674. -
    1675.     {
    1676. -
    1677.         settype($formvars"array");
    1678. -
    1679.         settype($formfiles"array");
    1680. -
    1681.  
    1682. -
    1683.         if (count($formvars== && count($formfiles== 0)
    1684. -
    1685.             return;
    1686. -
    1687.         
    1688. -
    1689.         switch ($this->_submit_type{
    1690. -
    1691.             case "application/x-www-form-urlencoded":
    1692. -
    1693.                 reset($formvars);
    1694. -
    1695.                 while(list($key,$valeach($formvars)) {
    1696. -
    1697.                     if (is_array($val|| is_object($val)) {
    1698. -
    1699.                         while (list($cur_key$cur_valeach($val)) {
    1700. -
    1701.                             $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
    1702. -
    1703.                         }
    1704. -
    1705.                     else
    1706. -
    1707.                         $postdata .= urlencode($key)."=".urlencode($val)."&";
    1708. -
    1709.                 }
    1710. -
    1711.                 break;
    1712. -
    1713.  
    1714. -
    1715.             case "multipart/form-data":
    1716. -
    1717.                 $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
    1718. -
    1719.                 
    1720. -
    1721.                 reset($formvars);
    1722. -
    1723.                 while(list($key,$valeach($formvars)) {
    1724. -
    1725.                     if (is_array($val|| is_object($val)) {
    1726. -
    1727.                         while (list($cur_key$cur_valeach($val)) {
    1728. -
    1729.                             $postdata .= "--".$this->_mime_boundary."\r\n";
    1730. -
    1731.                             $postdata .= "Content-Dispositionform-dataname=\"$key\[\]\"\r\n\r\n";
    1732. -
    1733.                             $postdata .= "$cur_val\r\n";
    1734. -
    1735.                         }
    1736. -
    1737.                     else {
    1738. -
    1739.                         $postdata .= "--".$this->_mime_boundary."\r\n";
    1740. -
    1741.                         $postdata .= "Content-Dispositionform-dataname=\"$key\"\r\n\r\n";
    1742. -
    1743.                         $postdata .= "$val\r\n";
    1744. -
    1745.                     }
    1746. -
    1747.                 }
    1748. -
    1749.                 
    1750. -
    1751.                 reset($formfiles);
    1752. -
    1753.                 while (list($field_name$file_nameseach($formfiles)) {
    1754. -
    1755.                     settype($file_names"array");
    1756. -
    1757.                     while (list($file_nameeach($file_names)) {
    1758. -
    1759.                         if (!is_readable($file_name)) continue;
    1760. -
    1761.  
    1762. -
    1763.                         $fp fopen($file_name"r");
    1764. -
    1765.                         $file_content fread($fpfilesize($file_name));
    1766. -
    1767.                         fclose($fp);
    1768. -
    1769.                         $base_name basename($file_name);
    1770. -
    1771.  
    1772. -
    1773.                         $postdata .= "--".$this->_mime_boundary."\r\n";
    1774. -
    1775.                         $postdata .= "Content-Dispositionform-dataname=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
    1776. -
    1777.                         $postdata .= "$file_content\r\n";
    1778. -
    1779.                     }
    1780. -
    1781.                 }
    1782. -
    1783.                 $postdata .= "--".$this->_mime_boundary."--\r\n";
    1784. -
    1785.                 break;
    1786. -
    1787.         }
    1788. -
    1789.  
    1790. -
    1791.         return $postdata;
    1792. -
    1793.     }
    1794. -
    1795. }
    1796. -
    1797.  
    1798. -
    1799. ?>
    1800. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_cache.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_cache.inc.html.svn-base deleted file mode 100755 index d3c93035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_cache.inc.html.svn-base +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - File Source for rss_cache.inc - - - - - -

    Source for file rss_cache.inc

    -

    Documentation is available at rss_cache.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_cache.inc, a simple, rolling(no GC), cache 
    8. -
    9.  *              for RSS objects, keyed on URL.
    10. -
    11.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    12. -
    13.  * Version:     0.51
    14. -
    15.  * License:     GPL
    16. -
    17.  *
    18. -
    19.  * The lastest version of MagpieRSS can be obtained from:
    20. -
    21.  * http://magpierss.sourceforge.net
    22. -
    23.  *
    24. -
    25.  * For questions, help, comments, discussion, etc., please join the
    26. -
    27.  * Magpie mailing list:
    28. -
    29.  * http://lists.sourceforge.net/lists/listinfo/magpierss-general
    30. -
    31.  *
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. class RSSCache {
    38. -
    39.     var $BASE_CACHE = './cache';    // where the cache files are stored
    40. -
    41.     var $MAX_AGE    = 3600;         // when are files stale, default one hour
    42. -
    43.     var $ERROR      = "";           // accumulate error messages
    44. -
    45.     
    46. -
    47.     function RSSCache ($base=''$age=''{
    48. -
    49.         if $base {
    50. -
    51.             $this->BASE_CACHE = $base;
    52. -
    53.         }
    54. -
    55.         if $age {
    56. -
    57.             $this->MAX_AGE = $age;
    58. -
    59.         }
    60. -
    61.         
    62. -
    63.         // attempt to make the cache directory
    64. -
    65.         if file_exists$this->BASE_CACHE ) ) {
    66. -
    67.             $status @mkdir$this->BASE_CACHE0755 );
    68. -
    69.             
    70. -
    71.             // if make failed 
    72. -
    73.             if $status {
    74. -
    75.                 $this->error(
    76. -
    77.                     "Cache couldn't make dir '" $this->BASE_CACHE . "'."
    78. -
    79.                 );
    80. -
    81.             }
    82. -
    83.         }
    84. -
    85.     }
    86. -
    87.     
    88. -
    89. /*=======================================================================*\
    90. -
    91.     Function:   set
    92. -
    93.     Purpose:    add an item to the cache, keyed on url
    94. -
    95.     Input:      url from wich the rss file was fetched
    96. -
    97.     Output:     true on sucess  
    98. -
    99. \*=======================================================================*/
    100. -
    101.     function set ($url$rss{
    102. -
    103.         $this->ERROR = "";
    104. -
    105.         $cache_file $this->file_name$url );
    106. -
    107.         $fp @fopen$cache_file'w' );
    108. -
    109.         
    110. -
    111.         if $fp {
    112. -
    113.             $this->error(
    114. -
    115.                 "Cache unable to open file for writing$cache_file"
    116. -
    117.             );
    118. -
    119.             return 0;
    120. -
    121.         }
    122. -
    123.         
    124. -
    125.         
    126. -
    127.         $data $this->serialize$rss );
    128. -
    129.         fwrite$fp$data );
    130. -
    131.         fclose$fp );
    132. -
    133.         
    134. -
    135.         return $cache_file;
    136. -
    137.     }
    138. -
    139.     
    140. -
    141. /*=======================================================================*\
    142. -
    143.     Function:   get
    144. -
    145.     Purpose:    fetch an item from the cache
    146. -
    147.     Input:      url from wich the rss file was fetched
    148. -
    149.     Output:     cached object on HIT, false on MISS 
    150. -
    151. \*=======================================================================*/ 
    152. -
    153.     function get ($url{
    154. -
    155.         $this->ERROR = "";
    156. -
    157.         $cache_file $this->file_name$url );
    158. -
    159.         
    160. -
    161.         if file_exists$cache_file ) ) {
    162. -
    163.             $this->debug
    164. -
    165.                 "Cache doesn't contain$url (cache file$cache_file)"
    166. -
    167.             );
    168. -
    169.             return 0;
    170. -
    171.         }
    172. -
    173.         
    174. -
    175.         $fp @fopen($cache_file'r');
    176. -
    177.         if $fp {
    178. -
    179.             $this->error(
    180. -
    181.                 "Failed to open cache file for reading$cache_file"
    182. -
    183.             );
    184. -
    185.             return 0;
    186. -
    187.         }
    188. -
    189.         
    190. -
    191.         if ($filesize filesize($cache_file) ) {
    192. -
    193.             $data fread$fpfilesize($cache_file) );
    194. -
    195.             $rss $this->unserialize$data );
    196. -
    197.         
    198. -
    199.             return $rss;
    200. -
    201.         }
    202. -
    203.         
    204. -
    205.         return 0;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211. /*=======================================================================*\
    212. -
    213.     Function:   check_cache
    214. -
    215.     Purpose:    check a url for membership in the cache
    216. -
    217.                 and whether the object is older then MAX_AGE (ie. STALE)
    218. -
    219.     Input:      url from wich the rss file was fetched
    220. -
    221.     Output:     cached object on HIT, false on MISS 
    222. -
    223. \*=======================================================================*/     
    224. -
    225.     function check_cache $url {
    226. -
    227.         $this->ERROR = "";
    228. -
    229.         $filename $this->file_name$url );
    230. -
    231.         
    232. -
    233.         if file_exists$filename ) ) {
    234. -
    235.             // find how long ago the file was added to the cache
    236. -
    237.             // and whether that is longer then MAX_AGE
    238. -
    239.             $mtime filemtime$filename );
    240. -
    241.             $age time($mtime;
    242. -
    243.             if $this->MAX_AGE > $age {
    244. -
    245.                 // object exists and is current
    246. -
    247.                 return 'HIT';
    248. -
    249.             }
    250. -
    251.             else {
    252. -
    253.                 // object exists but is old
    254. -
    255.                 return 'STALE';
    256. -
    257.             }
    258. -
    259.         }
    260. -
    261.         else {
    262. -
    263.             // object does not exist
    264. -
    265.             return 'MISS';
    266. -
    267.         }
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     function cache_age$cache_key {
    274. -
    275.         $filename $this->file_name$url );
    276. -
    277.         if file_exists$filename ) ) {
    278. -
    279.             $mtime filemtime$filename );
    280. -
    281.             $age time($mtime;
    282. -
    283.             return $age;
    284. -
    285.         }
    286. -
    287.         else {
    288. -
    289.             return -1;    
    290. -
    291.         }
    292. -
    293.     }
    294. -
    295.     
    296. -
    297. /*=======================================================================*\
    298. -
    299.     Function:   serialize
    300. -
    301. \*=======================================================================*/     
    302. -
    303.     function serialize $rss {
    304. -
    305.         return serialize$rss );
    306. -
    307.     }
    308. -
    309.  
    310. -
    311. /*=======================================================================*\
    312. -
    313.     Function:   unserialize
    314. -
    315. \*=======================================================================*/     
    316. -
    317.     function unserialize $data {
    318. -
    319.         return unserialize$data );
    320. -
    321.     }
    322. -
    323.     
    324. -
    325. /*=======================================================================*\
    326. -
    327.     Function:   file_name
    328. -
    329.     Purpose:    map url to location in cache
    330. -
    331.     Input:      url from wich the rss file was fetched
    332. -
    333.     Output:     a file name
    334. -
    335. \*=======================================================================*/     
    336. -
    337.     function file_name ($url{
    338. -
    339.         $filename md5$url );
    340. -
    341.         return joinDIRECTORY_SEPARATORarray$this->BASE_CACHE$filename ) );
    342. -
    343.     }
    344. -
    345.  
    346. -
    347. /*=======================================================================*\
    348. -
    349.     Function:   error
    350. -
    351.     Purpose:    register error
    352. -
    353. \*=======================================================================*/         
    354. -
    355.     function error ($errormsg$lvl=E_USER_WARNING{
    356. -
    357.         // append PHP's error message if track_errors enabled
    358. -
    359.         if isset($php_errormsg) ) 
    360. -
    361.             $errormsg .= " ($php_errormsg)";
    362. -
    363.         }
    364. -
    365.         $this->ERROR = $errormsg;
    366. -
    367.         if MAGPIE_DEBUG {
    368. -
    369.             trigger_error$errormsg$lvl);
    370. -
    371.         }
    372. -
    373.         else {
    374. -
    375.             error_log$errormsg0);
    376. -
    377.         }
    378. -
    379.     }
    380. -
    381.     
    382. -
    383.     function debug ($debugmsg$lvl=E_USER_NOTICE{
    384. -
    385.         if MAGPIE_DEBUG {
    386. -
    387.             $this->error("MagpieRSS [debug] $debugmsg"$lvl);
    388. -
    389.         }
    390. -
    391.     }
    392. -
    393.  
    394. -
    395. }
    396. -
    397.  
    398. -
    399. ?>
    400. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base deleted file mode 100755 index 912e0b6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_fetch.inc.html.svn-base +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - File Source for rss_fetch.inc - - - - - -

    Source for file rss_fetch.inc

    -

    Documentation is available at rss_fetch.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_fetch.inc, a simple functional interface
    8. -
    9.                 to fetching and parsing RSS files, via the
    10. -
    11.                 function fetch_rss()
    12. -
    13.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    14. -
    15.  * License:     GPL
    16. -
    17.  *
    18. -
    19.  * The lastest version of MagpieRSS can be obtained from:
    20. -
    21.  * http://magpierss.sourceforge.net
    22. -
    23.  *
    24. -
    25.  * For questions, help, comments, discussion, etc., please join the
    26. -
    27.  * Magpie mailing list:
    28. -
    29.  * magpierss-general@lists.sourceforge.net
    30. -
    31.  *
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. // Setup MAGPIE_DIR for use on hosts that don't include
    38. -
    39. // the current path in include_path.
    40. -
    41. // with thanks to rajiv and smarty
    42. -
    43. if (!defined('DIR_SEP')) {
    44. -
    45.     define('DIR_SEP'DIRECTORY_SEPARATOR);
    46. -
    47. }
    48. -
    49.  
    50. -
    51. if (!defined('MAGPIE_DIR')) {
    52. -
    53.     define('MAGPIE_DIR'dirname(__FILE__DIR_SEP);
    54. -
    55. }
    56. -
    57.  
    58. -
    59. require_onceMAGPIE_DIR 'rss_parse.inc' );
    60. -
    61. require_onceMAGPIE_DIR 'rss_cache.inc' );
    62. -
    63.  
    64. -
    65. // for including 3rd party libraries
    66. -
    67. define('MAGPIE_EXTLIB'MAGPIE_DIR 'extlib' DIR_SEP);
    68. -
    69. require_onceMAGPIE_EXTLIB 'Snoopy.class.inc');
    70. -
    71.  
    72. -
    73.  
    74. -
    75. /* 
    76. -
    77.  * CONSTANTS - redefine these in your script to change the
    78. -
    79.  * behaviour of fetch_rss() currently, most options effect the cache
    80. -
    81.  *
    82. -
    83.  * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? 
    84. -
    85.  * For me a built in cache was essential to creating a "PHP-like" 
    86. -
    87.  * feel to Magpie, see rss_cache.inc for rationale
    88. -
    89.  *
    90. -
    91.  *
    92. -
    93.  * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects?
    94. -
    95.  * This should be a location that the webserver can write to.   If this 
    96. -
    97.  * directory does not already exist Mapie will try to be smart and create 
    98. -
    99.  * it.  This will often fail for permissions reasons.
    100. -
    101.  *
    102. -
    103.  *
    104. -
    105.  * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds.
    106. -
    107.  *
    108. -
    109.  *
    110. -
    111.  * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error
    112. -
    113.  * instead of returning stale object?
    114. -
    115.  *
    116. -
    117.  * MAGPIE_DEBUG - Display debugging notices?
    118. -
    119.  *
    120. -
    121. */
    122. -
    123.  
    124. -
    125.  
    126. -
    127. /*=======================================================================*\
    128. -
    129.     Function: fetch_rss: 
    130. -
    131.     Purpose:  return RSS object for the give url
    132. -
    133.               maintain the cache
    134. -
    135.     Input:    url of RSS file
    136. -
    137.     Output:   parsed RSS object (see rss_parse.inc)
    138. -
    139.  
    140. -
    141.     NOTES ON CACHEING:  
    142. -
    143.     If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache.
    144. -
    145.     
    146. -
    147.     NOTES ON RETRIEVING REMOTE FILES:
    148. -
    149.     If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will
    150. -
    151.     return a cached object, and touch the cache object upon recieving a
    152. -
    153.     304.
    154. -
    155.     
    156. -
    157.     NOTES ON FAILED REQUESTS:
    158. -
    159.     If there is an HTTP error while fetching an RSS object, the cached
    160. -
    161.     version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
    162. -
    163. \*=======================================================================*/
    164. -
    165.  
    166. -
    167. define('MAGPIE_VERSION''0.72');
    168. -
    169.  
    170. -
    171. $MAGPIE_ERROR "";
    172. -
    173.  
    174. -
    175. function fetch_rss ($url{
    176. -
    177.     // initialize constants
    178. -
    179.     init();
    180. -
    181.     
    182. -
    183.     if !isset($url) ) {
    184. -
    185.         error("fetch_rss called without a url");
    186. -
    187.         return false;
    188. -
    189.     }
    190. -
    191.     
    192. -
    193.     // if cache is disabled
    194. -
    195.     if !MAGPIE_CACHE_ON {
    196. -
    197.         // fetch file, and parse it
    198. -
    199.         $resp _fetch_remote_file$url );
    200. -
    201.         if is_success$resp->status ) ) {
    202. -
    203.             return _response_to_rss$resp );
    204. -
    205.         }
    206. -
    207.         else {
    208. -
    209.             error("Failed to fetch $url and cache is off");
    210. -
    211.             return false;
    212. -
    213.         }
    214. -
    215.     
    216. -
    217.     // else cache is ON
    218. -
    219.     else {
    220. -
    221.         // Flow
    222. -
    223.         // 1. check cache
    224. -
    225.         // 2. if there is a hit, make sure its fresh
    226. -
    227.         // 3. if cached obj fails freshness check, fetch remote
    228. -
    229.         // 4. if remote fails, return stale object, or error
    230. -
    231.         
    232. -
    233.         $cache new RSSCacheMAGPIE_CACHE_DIRMAGPIE_CACHE_AGE );
    234. -
    235.         
    236. -
    237.         if (MAGPIE_DEBUG and $cache->ERROR{
    238. -
    239.             debug($cache->ERRORE_USER_WARNING);
    240. -
    241.         }
    242. -
    243.         
    244. -
    245.         
    246. -
    247.         $cache_status    0;       // response of check_cache
    248. -
    249.         $request_headers array()// HTTP headers to send with fetch
    250. -
    251.         $rss             0;       // parsed RSS object
    252. -
    253.         $errormsg        0;       // errors, if any
    254. -
    255.         
    256. -
    257.         // store parsed XML by desired output encoding
    258. -
    259.         // as character munging happens at parse time
    260. -
    261.         $cache_key       $url MAGPIE_OUTPUT_ENCODING;
    262. -
    263.         
    264. -
    265.         if (!$cache->ERROR{
    266. -
    267.             // return cache HIT, MISS, or STALE
    268. -
    269.             $cache_status $cache->check_cache$cache_key);
    270. -
    271.         }
    272. -
    273.                 
    274. -
    275.         // if object cached, and cache is fresh, return cached obj
    276. -
    277.         if $cache_status == 'HIT' {
    278. -
    279.             $rss $cache->get$cache_key );
    280. -
    281.             if isset($rssand $rss {
    282. -
    283.                 // should be cache age
    284. -
    285.                 $rss->from_cache 1;
    286. -
    287.                 if MAGPIE_DEBUG 1{
    288. -
    289.                     debug("MagpieRSS: Cache HIT"E_USER_NOTICE);
    290. -
    291.                 }
    292. -
    293.                 return $rss;
    294. -
    295.             }
    296. -
    297.         }
    298. -
    299.         
    300. -
    301.         // else attempt a conditional get
    302. -
    303.         
    304. -
    305.         // setup headers
    306. -
    307.         if $cache_status == 'STALE' {
    308. -
    309.             $rss $cache->get$cache_key );
    310. -
    311.             if $rss and $rss->etag and $rss->last_modified {
    312. -
    313.                 $request_headers['If-None-Match'$rss->etag;
    314. -
    315.                 $request_headers['If-Last-Modified'$rss->last_modified;
    316. -
    317.             }
    318. -
    319.         }
    320. -
    321.         
    322. -
    323.         $resp _fetch_remote_file$url$request_headers );
    324. -
    325.         
    326. -
    327.         if (isset($respand $resp{
    328. -
    329.           if ($resp->status == '304' {
    330. -
    331.                 // we have the most current copy
    332. -
    333.                 if MAGPIE_DEBUG 1{
    334. -
    335.                     debug("Got 304 for $url");
    336. -
    337.                 }
    338. -
    339.                 // reset cache on 304 (at minutillo insistent prodding)
    340. -
    341.                 $cache->set($cache_key$rss);
    342. -
    343.                 return $rss;
    344. -
    345.             }
    346. -
    347.             elseif is_success$resp->status ) ) {
    348. -
    349.                 $rss _response_to_rss$resp );
    350. -
    351.                 if $rss {
    352. -
    353.                     if (MAGPIE_DEBUG 1{
    354. -
    355.                         debug("Fetch successful");
    356. -
    357.                     }
    358. -
    359.                     // add object to cache
    360. -
    361.                     $cache->set$cache_key$rss );
    362. -
    363.                     return $rss;
    364. -
    365.                 }
    366. -
    367.             }
    368. -
    369.             else {
    370. -
    371.                 $errormsg "Failed to fetch $url ";
    372. -
    373.                 if $resp->status == '-100' {
    374. -
    375.                     $errormsg .= "(Request timed out after " MAGPIE_FETCH_TIME_OUT " seconds)";
    376. -
    377.                 }
    378. -
    379.                 elseif $resp->error {
    380. -
    381.                     # compensate for Snoopy's annoying habbit to tacking
    382. -
    383.                     # on '\n'
    384. -
    385.                     $http_error substr($resp->error0-2)
    386. -
    387.                     $errormsg .= "(HTTP Error$http_error)";
    388. -
    389.                 }
    390. -
    391.                 else {
    392. -
    393.                     $errormsg .=  "(HTTP Response: " $resp->response_code .')';
    394. -
    395.                 }
    396. -
    397.             }
    398. -
    399.         }
    400. -
    401.         else {
    402. -
    403.             $errormsg "Unable to retrieve RSS file for unknown reasons.";
    404. -
    405.         }
    406. -
    407.         
    408. -
    409.         // else fetch failed
    410. -
    411.         
    412. -
    413.         // attempt to return cached object
    414. -
    415.         if ($rss{
    416. -
    417.             if MAGPIE_DEBUG {
    418. -
    419.                 debug("Returning STALE object for $url");
    420. -
    421.             }
    422. -
    423.             return $rss;
    424. -
    425.         }
    426. -
    427.         
    428. -
    429.         // else we totally failed
    430. -
    431.         error$errormsg )
    432. -
    433.         
    434. -
    435.         return false;
    436. -
    437.         
    438. -
    439.     // end if ( !MAGPIE_CACHE_ON ) {
    440. -
    441. // end fetch_rss()
    442. -
    443.  
    444. -
    445. /*=======================================================================*\
    446. -
    447.     Function:   error
    448. -
    449.     Purpose:    set MAGPIE_ERROR, and trigger error
    450. -
    451. \*=======================================================================*/
    452. -
    453.  
    454. -
    455. function error ($errormsg$lvl=E_USER_WARNING{
    456. -
    457.         global $MAGPIE_ERROR;
    458. -
    459.         
    460. -
    461.         // append PHP's error message if track_errors enabled
    462. -
    463.         if isset($php_errormsg) ) 
    464. -
    465.             $errormsg .= " ($php_errormsg)";
    466. -
    467.         }
    468. -
    469.         if $errormsg {
    470. -
    471.             $errormsg "MagpieRSS$errormsg";
    472. -
    473.             $MAGPIE_ERROR $errormsg;
    474. -
    475.             trigger_error$errormsg$lvl);                
    476. -
    477.         }
    478. -
    479. }
    480. -
    481.  
    482. -
    483. function debug ($debugmsg$lvl=E_USER_NOTICE{
    484. -
    485.     trigger_error("MagpieRSS [debug] $debugmsg"$lvl);
    486. -
    487. }
    488. -
    489.             
    490. -
    491. /*=======================================================================*\
    492. -
    493.     Function:   magpie_error
    494. -
    495.     Purpose:    accessor for the magpie error variable
    496. -
    497. \*=======================================================================*/
    498. -
    499. function magpie_error ($errormsg=""{
    500. -
    501.     global $MAGPIE_ERROR;
    502. -
    503.     
    504. -
    505.     if isset($errormsgand $errormsg 
    506. -
    507.         $MAGPIE_ERROR $errormsg;
    508. -
    509.     }
    510. -
    511.     
    512. -
    513.     return $MAGPIE_ERROR;   
    514. -
    515. }
    516. -
    517.  
    518. -
    519. /*=======================================================================*\
    520. -
    521.     Function:   _fetch_remote_file
    522. -
    523.     Purpose:    retrieve an arbitrary remote file
    524. -
    525.     Input:      url of the remote file
    526. -
    527.                 headers to send along with the request (optional)
    528. -
    529.     Output:     an HTTP response object (see Snoopy.class.inc)  
    530. -
    531. \*=======================================================================*/
    532. -
    533. function _fetch_remote_file ($url$headers "" {
    534. -
    535.     // Snoopy is an HTTP client in PHP
    536. -
    537.     $client new Snoopy();
    538. -
    539.     $client->agent MAGPIE_USER_AGENT;
    540. -
    541.     $client->read_timeout MAGPIE_FETCH_TIME_OUT;
    542. -
    543.     $client->use_gzip MAGPIE_USE_GZIP;
    544. -
    545.     if (is_array($headers) ) {
    546. -
    547.         $client->rawheaders $headers;
    548. -
    549.     }
    550. -
    551.     
    552. -
    553.     @$client->fetch($url);
    554. -
    555.     return $client;
    556. -
    557.  
    558. -
    559. }
    560. -
    561.  
    562. -
    563. /*=======================================================================*\
    564. -
    565.     Function:   _response_to_rss
    566. -
    567.     Purpose:    parse an HTTP response object into an RSS object
    568. -
    569.     Input:      an HTTP response object (see Snoopy)
    570. -
    571.     Output:     parsed RSS object (see rss_parse)
    572. -
    573. \*=======================================================================*/
    574. -
    575. function _response_to_rss ($resp{
    576. -
    577.     $rss new MagpieRSS$resp->resultsMAGPIE_OUTPUT_ENCODINGMAGPIE_INPUT_ENCODINGMAGPIE_DETECT_ENCODING );
    578. -
    579.     
    580. -
    581.     // if RSS parsed successfully       
    582. -
    583.     if $rss and !$rss->ERROR{
    584. -
    585.         
    586. -
    587.         // find Etag, and Last-Modified
    588. -
    589.         foreach($resp->headers as $h{
    590. -
    591.             // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
    592. -
    593.             if (strpos($h": ")) {
    594. -
    595.                 list($field$valexplode(": "$h2);
    596. -
    597.             }
    598. -
    599.             else {
    600. -
    601.                 $field $h;
    602. -
    603.                 $val "";
    604. -
    605.             }
    606. -
    607.             
    608. -
    609.             if $field == 'ETag' {
    610. -
    611.                 $rss->etag $val;
    612. -
    613.             }
    614. -
    615.             
    616. -
    617.             if $field == 'Last-Modified' {
    618. -
    619.                 $rss->last_modified $val;
    620. -
    621.             }
    622. -
    623.         }
    624. -
    625.         
    626. -
    627.         return $rss;    
    628. -
    629.     // else construct error message
    630. -
    631.     else {
    632. -
    633.         $errormsg "Failed to parse RSS file.";
    634. -
    635.         
    636. -
    637.         if ($rss{
    638. -
    639.             $errormsg .= " (" $rss->ERROR ")";
    640. -
    641.         }
    642. -
    643.         error($errormsg);
    644. -
    645.         
    646. -
    647.         return false;
    648. -
    649.     // end if ($rss and !$rss->error)
    650. -
    651. }
    652. -
    653.  
    654. -
    655. /*=======================================================================*\
    656. -
    657.     Function:   init
    658. -
    659.     Purpose:    setup constants with default values
    660. -
    661.                 check for user overrides
    662. -
    663. \*=======================================================================*/
    664. -
    665. function init ({
    666. -
    667.     if defined('MAGPIE_INITALIZED') ) {
    668. -
    669.         return;
    670. -
    671.     }
    672. -
    673.     else {
    674. -
    675.         define('MAGPIE_INITALIZED'true);
    676. -
    677.     }
    678. -
    679.     
    680. -
    681.     if !defined('MAGPIE_CACHE_ON') ) {
    682. -
    683.         define('MAGPIE_CACHE_ON'true);
    684. -
    685.     }
    686. -
    687.  
    688. -
    689.     if !defined('MAGPIE_CACHE_DIR') ) {
    690. -
    691.         define('MAGPIE_CACHE_DIR''./cache');
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.     if !defined('MAGPIE_CACHE_AGE') ) {
    698. -
    699.         define('MAGPIE_CACHE_AGE'60*60)// one hour
    700. -
    701.     }
    702. -
    703.  
    704. -
    705.     if !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
    706. -
    707.         define('MAGPIE_CACHE_FRESH_ONLY'false);
    708. -
    709.     }
    710. -
    711.  
    712. -
    713.     if !defined('MAGPIE_OUTPUT_ENCODING') ) {
    714. -
    715.         define('MAGPIE_OUTPUT_ENCODING''ISO-8859-1');
    716. -
    717.     }
    718. -
    719.     
    720. -
    721.     if !defined('MAGPIE_INPUT_ENCODING') ) {
    722. -
    723.         define('MAGPIE_INPUT_ENCODING'null);
    724. -
    725.     }
    726. -
    727.     
    728. -
    729.     if !defined('MAGPIE_DETECT_ENCODING') ) {
    730. -
    731.         define('MAGPIE_DETECT_ENCODING'true);
    732. -
    733.     }
    734. -
    735.     
    736. -
    737.     if !defined('MAGPIE_DEBUG') ) {
    738. -
    739.         define('MAGPIE_DEBUG'0);
    740. -
    741.     }
    742. -
    743.     
    744. -
    745.     if !defined('MAGPIE_USER_AGENT') ) {
    746. -
    747.         $ua 'MagpieRSS/'MAGPIE_VERSION ' (+http://magpierss.sf.net';
    748. -
    749.         
    750. -
    751.         if MAGPIE_CACHE_ON {
    752. -
    753.             $ua $ua ')';
    754. -
    755.         }
    756. -
    757.         else {
    758. -
    759.             $ua $ua '; No cache)';
    760. -
    761.         }
    762. -
    763.         
    764. -
    765.         define('MAGPIE_USER_AGENT'$ua);
    766. -
    767.     }
    768. -
    769.     
    770. -
    771.     if !defined('MAGPIE_FETCH_TIME_OUT') ) {
    772. -
    773.         define('MAGPIE_FETCH_TIME_OUT'5)// 5 second timeout
    774. -
    775.     }
    776. -
    777.     
    778. -
    779.     // use gzip encoding to fetch rss files if supported?
    780. -
    781.     if !defined('MAGPIE_USE_GZIP') ) {
    782. -
    783.         define('MAGPIE_USE_GZIP'true);    
    784. -
    785.     }
    786. -
    787. }
    788. -
    789.  
    790. -
    791. // NOTE: the following code should really be in Snoopy, or at least
    792. -
    793. // somewhere other then rss_fetch!
    794. -
    795.  
    796. -
    797. /*=======================================================================*\
    798. -
    799.     HTTP STATUS CODE PREDICATES
    800. -
    801.     These functions attempt to classify an HTTP status code
    802. -
    803.     based on RFC 2616 and RFC 2518.
    804. -
    805.     
    806. -
    807.     All of them take an HTTP status code as input, and return true or false
    808. -
    809.  
    810. -
    811.     All this code is adapted from LWP's HTTP::Status.
    812. -
    813. \*=======================================================================*/
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /*=======================================================================*\
    820. -
    821.     Function:   is_info
    822. -
    823.     Purpose:    return true if Informational status code
    824. -
    825. \*=======================================================================*/
    826. -
    827. function is_info ($sc
    828. -
    829.     return $sc >= 100 && $sc 200
    830. -
    831. }
    832. -
    833.  
    834. -
    835. /*=======================================================================*\
    836. -
    837.     Function:   is_success
    838. -
    839.     Purpose:    return true if Successful status code
    840. -
    841. \*=======================================================================*/
    842. -
    843. function is_success ($sc
    844. -
    845.     return $sc >= 200 && $sc 300
    846. -
    847. }
    848. -
    849.  
    850. -
    851. /*=======================================================================*\
    852. -
    853.     Function:   is_redirect
    854. -
    855.     Purpose:    return true if Redirection status code
    856. -
    857. \*=======================================================================*/
    858. -
    859. function is_redirect ($sc
    860. -
    861.     return $sc >= 300 && $sc 400
    862. -
    863. }
    864. -
    865.  
    866. -
    867. /*=======================================================================*\
    868. -
    869.     Function:   is_error
    870. -
    871.     Purpose:    return true if Error status code
    872. -
    873. \*=======================================================================*/
    874. -
    875. function is_error ($sc
    876. -
    877.     return $sc >= 400 && $sc 600
    878. -
    879. }
    880. -
    881.  
    882. -
    883. /*=======================================================================*\
    884. -
    885.     Function:   is_client_error
    886. -
    887.     Purpose:    return true if Error status code, and its a client error
    888. -
    889. \*=======================================================================*/
    890. -
    891. function is_client_error ($sc
    892. -
    893.     return $sc >= 400 && $sc 500
    894. -
    895. }
    896. -
    897.  
    898. -
    899. /*=======================================================================*\
    900. -
    901.     Function:   is_client_error
    902. -
    903.     Purpose:    return true if Error status code, and its a server error
    904. -
    905. \*=======================================================================*/
    906. -
    907. function is_server_error ($sc
    908. -
    909.     return $sc >= 500 && $sc 600
    910. -
    911. }
    912. -
    913.  
    914. -
    915. ?>
    916. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:09 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_parse.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_parse.inc.html.svn-base deleted file mode 100755 index 28dc7007..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_parse.inc.html.svn-base +++ /dev/null @@ -1,626 +0,0 @@ - - - - - - File Source for rss_parse.inc - - - - - -

    Source for file rss_parse.inc

    -

    Documentation is available at rss_parse.inc

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. * Project:     MagpieRSS: a simple RSS integration tool
    8. -
    9. * File:        rss_parse.inc  - parse an RSS or Atom feed
    10. -
    11. *               return as a simple object.
    12. -
    13. *
    14. -
    15. * Handles RSS 0.9x, RSS 2.0, RSS 1.0, and Atom 0.3
    16. -
    17. *
    18. -
    19. * The lastest version of MagpieRSS can be obtained from:
    20. -
    21. * http://magpierss.sourceforge.net
    22. -
    23. *
    24. -
    25. * For questions, help, comments, discussion, etc., please join the
    26. -
    27. * Magpie mailing list:
    28. -
    29. * magpierss-general@lists.sourceforge.net
    30. -
    31. *
    32. -
    33. @author           Kellan Elliott-McCrea <kellan@protest.net>
    34. -
    35. @version          0.7a
    36. -
    37. @license          GPL
    38. -
    39. *
    40. -
    41. */
    42. -
    43.  
    44. -
    45. define('RSS''RSS');
    46. -
    47. define('ATOM''Atom');
    48. -
    49.  
    50. -
    51. require_once (MAGPIE_DIR 'rss_utils.inc');
    52. -
    53.  
    54. -
    55. /**
    56. -
    57. * Hybrid parser, and object, takes RSS as a string and returns a simple object.
    58. -
    59. *
    60. -
    61. * see: rss_fetch.inc for a simpler interface with integrated caching support
    62. -
    63. *
    64. -
    65. */
    66. -
    67. class MagpieRSS {
    68. -
    69.     var $parser;
    70. -
    71.     
    72. -
    73.     var $current_item   = array();  // item currently being parsed
    74. -
    75.     var $items          = array();  // collection of parsed items
    76. -
    77.     var $channel        = array();  // hash of channel fields
    78. -
    79.     var $textinput      = array();
    80. -
    81.     var $image          = array();
    82. -
    83.     var $feed_type;
    84. -
    85.     var $feed_version;
    86. -
    87.     var $encoding       = '';       // output encoding of parsed rss
    88. -
    89.     
    90. -
    91.     var $_source_encoding = '';     // only set if we have to parse xml prolog
    92. -
    93.     
    94. -
    95.     var $ERROR = "";
    96. -
    97.     var $WARNING = "";
    98. -
    99.     
    100. -
    101.     // define some constants
    102. -
    103.     
    104. -
    105.     var $_CONTENT_CONSTRUCTS = array('content''summary''info''title''tagline''copyright');
    106. -
    107.     var $_KNOWN_ENCODINGS    = array('UTF-8''US-ASCII''ISO-8859-1');
    108. -
    109.  
    110. -
    111.     // parser variables, useless if you're not a parser, treat as private
    112. -
    113.     var $stack              = array()// parser stack
    114. -
    115.     var $inchannel          = false;
    116. -
    117.     var $initem             = false;
    118. -
    119.     var $incontent          = false// if in Atom <content mode="xml"> field 
    120. -
    121.     var $intextinput        = false;
    122. -
    123.     var $inimage            = false;
    124. -
    125.     var $current_namespace  = false;
    126. -
    127.     
    128. -
    129.  
    130. -
    131.     /**
    132. -
    133.      *  Set up XML parser, parse source, and return populated RSS object..
    134. -
    135.      *   
    136. -
    137.      *  @param string $source           string containing the RSS to be parsed
    138. -
    139.      *
    140. -
    141.      *   NOTE:  Probably a good idea to leave the encoding options alone unless
    142. -
    143.      *          you know what you're doing as PHP's character set support is
    144. -
    145.      *          a little weird.
    146. -
    147.      *
    148. -
    149.      *   NOTE:  A lot of this is unnecessary but harmless with PHP5
    150. -
    151.      *
    152. -
    153.      *
    154. -
    155.      *  @param string $output_encoding  output the parsed RSS in this character
    156. -
    157.      *                                   set defaults to ISO-8859-1 as this is PHP's
    158. -
    159.      *                                   default.
    160. -
    161.      *
    162. -
    163.      *                                   NOTE: might be changed to UTF-8 in future
    164. -
    165.      *                                   versions.
    166. -
    167.      *                               
    168. -
    169.      *  @param string $input_encoding   the character set of the incoming RSS source.
    170. -
    171.      *                                   Leave blank and Magpie will try to figure it
    172. -
    173.      *                                   out.
    174. -
    175.      *                                  
    176. -
    177.      *                                   
    178. -
    179.      *  @param bool   $detect_encoding  if false Magpie won't attempt to detect
    180. -
    181.      *                                   source encoding. (caveat emptor)
    182. -
    183.      *
    184. -
    185.      */
    186. -
    187.     function MagpieRSS ($source$output_encoding='ISO-8859-1'
    188. -
    189.                         $input_encoding=null$detect_encoding=true
    190. -
    191.     {   
    192. -
    193.         # if PHP xml isn't compiled in, die
    194. -
    195.         #
    196. -
    197.         if (!function_exists('xml_parser_create')) {
    198. -
    199.             $this->error"Failed to load PHP's XML Extension. " 
    200. -
    201.                           "http://www.php.net/manual/en/ref.xml.php",
    202. -
    203.                            E_USER_ERROR );
    204. -
    205.         }
    206. -
    207.         
    208. -
    209.         list($parser$source$this->create_parser($source
    210. -
    211.                 $output_encoding$input_encoding$detect_encoding);
    212. -
    213.         
    214. -
    215.         
    216. -
    217.         if (!is_resource($parser)) {
    218. -
    219.             $this->error"Failed to create an instance of PHP's XML parser. " .
    220. -
    221.                           "http://www.php.net/manual/en/ref.xml.php",
    222. -
    223.                           E_USER_ERROR );
    224. -
    225.         }
    226. -
    227.  
    228. -
    229.         
    230. -
    231.         $this->parser = $parser;
    232. -
    233.         
    234. -
    235.         # pass in parser, and a reference to this object
    236. -
    237.         # setup handlers
    238. -
    239.         #
    240. -
    241.         xml_set_object$this->parser$this );
    242. -
    243.         xml_set_element_handler($this->parser
    244. -
    245.                 'feed_start_element''feed_end_element' );
    246. -
    247.                         
    248. -
    249.         xml_set_character_data_handler$this->parser'feed_cdata' )
    250. -
    251.     
    252. -
    253.         $status xml_parse$this->parser$source );
    254. -
    255.         
    256. -
    257.         if ($status {
    258. -
    259.             $errorcode xml_get_error_code$this->parser );
    260. -
    261.             if $errorcode != XML_ERROR_NONE {
    262. -
    263.                 $xml_error xml_error_string$errorcode );
    264. -
    265.                 $error_line xml_get_current_line_number($this->parser);
    266. -
    267.                 $error_col xml_get_current_column_number($this->parser);
    268. -
    269.                 $errormsg "$xml_error at line $error_linecolumn $error_col";
    270. -
    271.  
    272. -
    273.                 $this->error$errormsg );
    274. -
    275.             }
    276. -
    277.         }
    278. -
    279.         
    280. -
    281.         xml_parser_free$this->parser );
    282. -
    283.  
    284. -
    285.         $this->normalize();
    286. -
    287.     }
    288. -
    289.     
    290. -
    291.     function feed_start_element($p$element&$attrs{
    292. -
    293.         $el $element strtolower($element);
    294. -
    295.         $attrs array_change_key_case($attrsCASE_LOWER);
    296. -
    297.         
    298. -
    299.         // check for a namespace, and split if found
    300. -
    301.         $ns false;
    302. -
    303.         if strpos$element':' ) ) {
    304. -
    305.             list($ns$elsplit':'$element2)
    306. -
    307.         }
    308. -
    309.         if $ns and $ns != 'rdf' {
    310. -
    311.             $this->current_namespace = $ns;
    312. -
    313.         }
    314. -
    315.             
    316. -
    317.         # if feed type isn't set, then this is first element of feed
    318. -
    319.         # identify feed from root element
    320. -
    321.         #
    322. -
    323.         if (!isset($this->feed_type) ) {
    324. -
    325.             if $el == 'rdf' {
    326. -
    327.                 $this->feed_type = RSS;
    328. -
    329.                 $this->feed_version = '1.0';
    330. -
    331.             }
    332. -
    333.             elseif $el == 'rss' {
    334. -
    335.                 $this->feed_type = RSS;
    336. -
    337.                 $this->feed_version = $attrs['version'];
    338. -
    339.             }
    340. -
    341.             elseif $el == 'feed' {
    342. -
    343.                 $this->feed_type = ATOM;
    344. -
    345.                 $this->feed_version = $attrs['version'];
    346. -
    347.                 $this->inchannel = true;
    348. -
    349.             }
    350. -
    351.             return;
    352. -
    353.         }
    354. -
    355.     
    356. -
    357.         if $el == 'channel' 
    358. -
    359.         {
    360. -
    361.             $this->inchannel = true;
    362. -
    363.         }
    364. -
    365.         elseif ($el == 'item' or $el == 'entry' 
    366. -
    367.         {
    368. -
    369.             $this->initem = true;
    370. -
    371.             if isset($attrs['rdf:about']) ) {
    372. -
    373.                 $this->current_item['about'$attrs['rdf:about']
    374. -
    375.             }
    376. -
    377.         }
    378. -
    379.         
    380. -
    381.         // if we're in the default namespace of an RSS feed,
    382. -
    383.         //  record textinput or image fields
    384. -
    385.         elseif 
    386. -
    387.             $this->feed_type == RSS and 
    388. -
    389.             $this->current_namespace == '' and 
    390. -
    391.             $el == 'textinput' 
    392. -
    393.         {
    394. -
    395.             $this->intextinput = true;
    396. -
    397.         }
    398. -
    399.         
    400. -
    401.         elseif (
    402. -
    403.             $this->feed_type == RSS and 
    404. -
    405.             $this->current_namespace == '' and 
    406. -
    407.             $el == 'image' 
    408. -
    409.         {
    410. -
    411.             $this->inimage = true;
    412. -
    413.         }
    414. -
    415.         
    416. -
    417.         # handle atom content constructs
    418. -
    419.         elseif $this->feed_type == ATOM and in_array($el$this->_CONTENT_CONSTRUCTS) )
    420. -
    421.         {
    422. -
    423.             // avoid clashing w/ RSS mod_content
    424. -
    425.             if ($el == 'content' {
    426. -
    427.                 $el 'atom_content';
    428. -
    429.             }
    430. -
    431.             
    432. -
    433.             $this->incontent = $el;
    434. -
    435.             
    436. -
    437.             
    438. -
    439.         }
    440. -
    441.         
    442. -
    443.         // if inside an Atom content construct (e.g. content or summary) field treat tags as text
    444. -
    445.         elseif ($this->feed_type == ATOM and $this->incontent 
    446. -
    447.         {
    448. -
    449.             // if tags are inlined, then flatten
    450. -
    451.             $attrs_str join(' '
    452. -
    453.                     array_map('map_attrs'
    454. -
    455.                     array_keys($attrs)
    456. -
    457.                     array_values($attrs) ) );
    458. -
    459.             
    460. -
    461.             $this->append_content"<$element $attrs_str>"  );
    462. -
    463.                     
    464. -
    465.             array_unshift$this->stack$el );
    466. -
    467.         }
    468. -
    469.         
    470. -
    471.         // Atom support many links per containging element.
    472. -
    473.         // Magpie treats link elements of type rel='alternate'
    474. -
    475.         // as being equivalent to RSS's simple link element.
    476. -
    477.         //
    478. -
    479.         elseif ($this->feed_type == ATOM and $el == 'link' 
    480. -
    481.         {
    482. -
    483.             if isset($attrs['rel']and $attrs['rel'== 'alternate' 
    484. -
    485.             {
    486. -
    487.                 $link_el 'link';
    488. -
    489.             }
    490. -
    491.             else {
    492. -
    493.                 $link_el 'link_' $attrs['rel'];
    494. -
    495.             }
    496. -
    497.             
    498. -
    499.             $this->append($link_el$attrs['href']);
    500. -
    501.         }
    502. -
    503.         // set stack[0] to current element
    504. -
    505.         else {
    506. -
    507.             array_unshift($this->stack$el);
    508. -
    509.         }
    510. -
    511.     }
    512. -
    513.     
    514. -
    515.  
    516. -
    517.     
    518. -
    519.     function feed_cdata ($p$text{
    520. -
    521.         if ($this->feed_type == ATOM and $this->incontent
    522. -
    523.         {
    524. -
    525.             $this->append_content$text );
    526. -
    527.         }
    528. -
    529.         else {
    530. -
    531.             $current_el join('_'array_reverse($this->stack));
    532. -
    533.             $this->append($current_el$text);
    534. -
    535.         }
    536. -
    537.     }
    538. -
    539.     
    540. -
    541.     function feed_end_element ($p$el{
    542. -
    543.         $el strtolower($el);
    544. -
    545.         
    546. -
    547.         if $el == 'item' or $el == 'entry' 
    548. -
    549.         {
    550. -
    551.             $this->items[$this->current_item;
    552. -
    553.             $this->current_item = array();
    554. -
    555.             $this->initem = false;
    556. -
    557.         }
    558. -
    559.         elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' 
    560. -
    561.         {
    562. -
    563.             $this->intextinput = false;
    564. -
    565.         }
    566. -
    567.         elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' 
    568. -
    569.         {
    570. -
    571.             $this->inimage = false;
    572. -
    573.         }
    574. -
    575.         elseif ($this->feed_type == ATOM and in_array($el$this->_CONTENT_CONSTRUCTS) )
    576. -
    577.         {   
    578. -
    579.             $this->incontent = false;
    580. -
    581.         }
    582. -
    583.         elseif ($el == 'channel' or $el == 'feed' 
    584. -
    585.         {
    586. -
    587.             $this->inchannel = false;
    588. -
    589.         }
    590. -
    591.         elseif ($this->feed_type == ATOM and $this->incontent  {
    592. -
    593.             // balance tags properly
    594. -
    595.             // note:  i don't think this is actually neccessary
    596. -
    597.             if $this->stack[0== $el 
    598. -
    599.             {
    600. -
    601.                 $this->append_content("</$el>");
    602. -
    603.             }
    604. -
    605.             else {
    606. -
    607.                 $this->append_content("<$el />");
    608. -
    609.             }
    610. -
    611.  
    612. -
    613.             array_shift$this->stack );
    614. -
    615.         }
    616. -
    617.         else {
    618. -
    619.             array_shift$this->stack );
    620. -
    621.         }
    622. -
    623.         
    624. -
    625.         $this->current_namespace = false;
    626. -
    627.     }
    628. -
    629.     
    630. -
    631.     function concat (&$str1$str2=""{
    632. -
    633.         if (!isset($str1) ) {
    634. -
    635.             $str1="";
    636. -
    637.         }
    638. -
    639.         $str1 .= $str2;
    640. -
    641.     }
    642. -
    643.     
    644. -
    645.     
    646. -
    647.     
    648. -
    649.     function append_content($text{
    650. -
    651.         if $this->initem {
    652. -
    653.             $this->concat$this->current_item$this->incontent ]$text );
    654. -
    655.         }
    656. -
    657.         elseif $this->inchannel {
    658. -
    659.             $this->concat$this->channel$this->incontent ]$text );
    660. -
    661.         }
    662. -
    663.     }
    664. -
    665.     
    666. -
    667.     // smart append - field and namespace aware
    668. -
    669.     function append($el$text{
    670. -
    671.         if (!$el{
    672. -
    673.             return;
    674. -
    675.         }
    676. -
    677.         if $this->current_namespace 
    678. -
    679.         {
    680. -
    681.             if $this->initem {
    682. -
    683.                 $this->concat(
    684. -
    685.                     $this->current_item$this->current_namespace ]$el ]$text);
    686. -
    687.             }
    688. -
    689.             elseif ($this->inchannel{
    690. -
    691.                 $this->concat(
    692. -
    693.                     $this->channel$this->current_namespace]$el ]$text );
    694. -
    695.             }
    696. -
    697.             elseif ($this->intextinput{
    698. -
    699.                 $this->concat(
    700. -
    701.                     $this->textinput$this->current_namespace]$el ]$text );
    702. -
    703.             }
    704. -
    705.             elseif ($this->inimage{
    706. -
    707.                 $this->concat(
    708. -
    709.                     $this->image$this->current_namespace ]$el ]$text );
    710. -
    711.             }
    712. -
    713.         }
    714. -
    715.         else {
    716. -
    717.             if $this->initem {
    718. -
    719.                 $this->concat(
    720. -
    721.                     $this->current_item$el ]$text);
    722. -
    723.             }
    724. -
    725.             elseif ($this->intextinput{
    726. -
    727.                 $this->concat(
    728. -
    729.                     $this->textinput$el ]$text );
    730. -
    731.             }
    732. -
    733.             elseif ($this->inimage{
    734. -
    735.                 $this->concat(
    736. -
    737.                     $this->image$el ]$text );
    738. -
    739.             }
    740. -
    741.             elseif ($this->inchannel{
    742. -
    743.                 $this->concat(
    744. -
    745.                     $this->channel$el ]$text );
    746. -
    747.             }
    748. -
    749.             
    750. -
    751.         }
    752. -
    753.     }
    754. -
    755.     
    756. -
    757.     function normalize ({
    758. -
    759.         // if atom populate rss fields
    760. -
    761.         if $this->is_atom() ) {
    762. -
    763.             $this->channel['description'$this->channel['tagline'];
    764. -
    765.             for $i 0$i count($this->items)$i++{
    766. -
    767.                 $item $this->items[$i];
    768. -
    769.                 if isset($item['summary']) )
    770. -
    771.                     $item['description'$item['summary'];
    772. -
    773.                 if isset($item['atom_content']))
    774. -
    775.                     $item['content']['encoded'$item['atom_content'];
    776. -
    777.                 
    778. -
    779.                 $atom_date (isset($item['issued']) ) $item['issued'$item['modified'];
    780. -
    781.                 if $atom_date {
    782. -
    783.                     $epoch @parse_w3cdtf($atom_date);
    784. -
    785.                     if ($epoch and $epoch 0{
    786. -
    787.                         $item['date_timestamp'$epoch;
    788. -
    789.                     }
    790. -
    791.                 }
    792. -
    793.                 
    794. -
    795.                 $this->items[$i$item;
    796. -
    797.             }       
    798. -
    799.         }
    800. -
    801.         elseif $this->is_rss() ) {
    802. -
    803.             $this->channel['tagline'$this->channel['description'];
    804. -
    805.             for $i 0$i count($this->items)$i++{
    806. -
    807.                 $item $this->items[$i];
    808. -
    809.                 if isset($item['description']))
    810. -
    811.                     $item['summary'$item['description'];
    812. -
    813.                 if isset($item['content']['encoded') )
    814. -
    815.                     $item['atom_content'$item['content']['encoded'];
    816. -
    817.                 
    818. -
    819.                 if $this->is_rss(== '1.0' and isset($item['dc']['date']) ) {
    820. -
    821.                     $epoch @parse_w3cdtf($item['dc']['date']);
    822. -
    823.                     if ($epoch and $epoch 0{
    824. -
    825.                         $item['date_timestamp'$epoch;
    826. -
    827.                     }
    828. -
    829.                 }
    830. -
    831.                 elseif isset($item['pubdate']) ) {
    832. -
    833.                     $epoch @strtotime($item['pubdate']);
    834. -
    835.                     if ($epoch 0{
    836. -
    837.                         $item['date_timestamp'$epoch;
    838. -
    839.                     }
    840. -
    841.                 }
    842. -
    843.                 
    844. -
    845.                 $this->items[$i$item;
    846. -
    847.             }
    848. -
    849.         }
    850. -
    851.     }
    852. -
    853.     
    854. -
    855.     
    856. -
    857.     function is_rss ({
    858. -
    859.         if $this->feed_type == RSS {
    860. -
    861.             return $this->feed_version
    862. -
    863.         }
    864. -
    865.         else {
    866. -
    867.             return false;
    868. -
    869.         }
    870. -
    871.     }
    872. -
    873.     
    874. -
    875.     function is_atom({
    876. -
    877.         if $this->feed_type == ATOM {
    878. -
    879.             return $this->feed_version;
    880. -
    881.         }
    882. -
    883.         else {
    884. -
    885.             return false;
    886. -
    887.         }
    888. -
    889.     }
    890. -
    891.  
    892. -
    893.     /**
    894. -
    895.     * return XML parser, and possibly re-encoded source
    896. -
    897.     *
    898. -
    899.     */
    900. -
    901.     function create_parser($source$out_enc$in_enc$detect{
    902. -
    903.         if substr(phpversion(),0,1== 5{
    904. -
    905.             $parser $this->php5_create_parser($in_enc$detect);
    906. -
    907.         }
    908. -
    909.         else {
    910. -
    911.             list($parser$source$this->php4_create_parser($source$in_enc$detect);
    912. -
    913.         }
    914. -
    915.         if ($out_enc{
    916. -
    917.             $this->encoding = $out_enc;
    918. -
    919.             xml_parser_set_option($parserXML_OPTION_TARGET_ENCODING$out_enc);
    920. -
    921.         }
    922. -
    923.         
    924. -
    925.         return array($parser$source);
    926. -
    927.     }
    928. -
    929.     
    930. -
    931.     /**
    932. -
    933.     * Instantiate an XML parser under PHP5
    934. -
    935.     *
    936. -
    937.     * PHP5 will do a fine job of detecting input encoding
    938. -
    939.     * if passed an empty string as the encoding.
    940. -
    941.     *
    942. -
    943.     * All hail libxml2!
    944. -
    945.     *
    946. -
    947.     */
    948. -
    949.     function php5_create_parser($in_enc$detect{
    950. -
    951.         // by default php5 does a fine job of detecting input encodings
    952. -
    953.         if(!$detect && $in_enc{
    954. -
    955.             return xml_parser_create($in_enc);
    956. -
    957.         }
    958. -
    959.         else {
    960. -
    961.             return xml_parser_create('');
    962. -
    963.         }
    964. -
    965.     }
    966. -
    967.     
    968. -
    969.     /**
    970. -
    971.     * Instaniate an XML parser under PHP4
    972. -
    973.     *
    974. -
    975.     * Unfortunately PHP4's support for character encodings
    976. -
    977.     * and especially XML and character encodings sucks.  As
    978. -
    979.     * long as the documents you parse only contain characters
    980. -
    981.     * from the ISO-8859-1 character set (a superset of ASCII,
    982. -
    983.     * and a subset of UTF-8) you're fine.  However once you
    984. -
    985.     * step out of that comfy little world things get mad, bad,
    986. -
    987.     * and dangerous to know.
    988. -
    989.     *
    990. -
    991.     * The following code is based on SJM's work with FoF
    992. -
    993.     * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
    994. -
    995.     *
    996. -
    997.     */
    998. -
    999.     function php4_create_parser($source$in_enc$detect{
    1000. -
    1001.         if !$detect {
    1002. -
    1003.             return array(xml_parser_create($in_enc)$source);
    1004. -
    1005.         }
    1006. -
    1007.         
    1008. -
    1009.         if (!$in_enc{
    1010. -
    1011.             if (preg_match('/<?xml.*encoding=[\'"](.*?)[\'"].*?>/m'$source$m)) {
    1012. -
    1013.                 $in_enc strtoupper($m[1]);
    1014. -
    1015.                 $this->source_encoding $in_enc;
    1016. -
    1017.             }
    1018. -
    1019.             else {
    1020. -
    1021.                 $in_enc 'UTF-8';
    1022. -
    1023.             }
    1024. -
    1025.         }
    1026. -
    1027.         
    1028. -
    1029.         if ($this->known_encoding($in_enc)) {
    1030. -
    1031.             return array(xml_parser_create($in_enc)$source);
    1032. -
    1033.         }
    1034. -
    1035.         
    1036. -
    1037.         // the dectected encoding is not one of the simple encodings PHP knows
    1038. -
    1039.         
    1040. -
    1041.         // attempt to use the iconv extension to
    1042. -
    1043.         // cast the XML to a known encoding
    1044. -
    1045.         // @see http://php.net/iconv
    1046. -
    1047.        
    1048. -
    1049.         if (function_exists('iconv'))  {
    1050. -
    1051.             $encoded_source iconv($in_enc,'UTF-8'$source);
    1052. -
    1053.             if ($encoded_source{
    1054. -
    1055.                 return array(xml_parser_create('UTF-8')$encoded_source);
    1056. -
    1057.             }
    1058. -
    1059.         }
    1060. -
    1061.         
    1062. -
    1063.         // iconv didn't work, try mb_convert_encoding
    1064. -
    1065.         // @see http://php.net/mbstring
    1066. -
    1067.         if(function_exists('mb_convert_encoding')) {
    1068. -
    1069.             $encoded_source mb_convert_encoding($source'UTF-8'$in_enc );
    1070. -
    1071.             if ($encoded_source{
    1072. -
    1073.                 return array(xml_parser_create('UTF-8')$encoded_source);
    1074. -
    1075.             }
    1076. -
    1077.         }
    1078. -
    1079.         
    1080. -
    1081.         // else 
    1082. -
    1083.         $this->error("Feed is in an unsupported character encoding. ($in_enc.
    1084. -
    1085.                      "You may see strange artifacts, and mangled characters.",
    1086. -
    1087.                      E_USER_NOTICE);
    1088. -
    1089.             
    1090. -
    1091.         return array(xml_parser_create()$source);
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     function known_encoding($enc{
    1098. -
    1099.         $enc strtoupper($enc);
    1100. -
    1101.         if in_array($enc$this->_KNOWN_ENCODINGS) ) {
    1102. -
    1103.             return $enc;
    1104. -
    1105.         }
    1106. -
    1107.         else {
    1108. -
    1109.             return false;
    1110. -
    1111.         }
    1112. -
    1113.     }
    1114. -
    1115.  
    1116. -
    1117.     function error ($errormsg$lvl=E_USER_WARNING{
    1118. -
    1119.         // append PHP's error message if track_errors enabled
    1120. -
    1121.         if isset($php_errormsg) ) 
    1122. -
    1123.             $errormsg .= " ($php_errormsg)";
    1124. -
    1125.         }
    1126. -
    1127.         if MAGPIE_DEBUG {
    1128. -
    1129.             trigger_error$errormsg$lvl);        
    1130. -
    1131.         }
    1132. -
    1133.         else {
    1134. -
    1135.             error_log$errormsg0);
    1136. -
    1137.         }
    1138. -
    1139.         
    1140. -
    1141.         $notices E_USER_NOTICE|E_NOTICE;
    1142. -
    1143.         if $lvl&$notices {
    1144. -
    1145.             $this->WARNING = $errormsg;
    1146. -
    1147.         else {
    1148. -
    1149.             $this->ERROR = $errormsg;
    1150. -
    1151.         }
    1152. -
    1153.     }
    1154. -
    1155.     
    1156. -
    1157.     
    1158. -
    1159. // end class RSS
    1160. -
    1161.  
    1162. -
    1163. function map_attrs($k$v{
    1164. -
    1165.     return "$k=\"$v\"";
    1166. -
    1167. }
    1168. -
    1169.  
    1170. -
    1171. // patch to support medieval versions of PHP4.1.x, 
    1172. -
    1173. // courtesy, Ryan Currie, ryan@digibliss.com
    1174. -
    1175.  
    1176. -
    1177. if (!function_exists('array_change_key_case')) {
    1178. -
    1179.     define("CASE_UPPER",1);
    1180. -
    1181.     define("CASE_LOWER",0);
    1182. -
    1183.  
    1184. -
    1185.  
    1186. -
    1187.     function array_change_key_case($array,$case=CASE_LOWER{
    1188. -
    1189.        if ($case=CASE_LOWER$cmd=strtolower;
    1190. -
    1191.        elseif ($case=CASE_UPPER$cmd=strtoupper;
    1192. -
    1193.        foreach($array as $key=>$value{
    1194. -
    1195.                $output[$cmd($key)]=$value;
    1196. -
    1197.        }
    1198. -
    1199.        return $output;
    1200. -
    1201.     }
    1202. -
    1203.  
    1204. -
    1205. }
    1206. -
    1207.  
    1208. -
    1209. ?>
    1210. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:12 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_utils.inc.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_utils.inc.html.svn-base deleted file mode 100755 index f31e5382..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpierss_utils.inc.html.svn-base +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - File Source for rss_utils.inc - - - - - -

    Source for file rss_utils.inc

    -

    Documentation is available at rss_utils.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_utils.inc, utility methods for working with RSS
    8. -
    9.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    10. -
    11.  * Version:     0.51
    12. -
    13.  * License:     GPL
    14. -
    15.  *
    16. -
    17.  * The lastest version of MagpieRSS can be obtained from:
    18. -
    19.  * http://magpierss.sourceforge.net
    20. -
    21.  *
    22. -
    23.  * For questions, help, comments, discussion, etc., please join the
    24. -
    25.  * Magpie mailing list:
    26. -
    27.  * magpierss-general@lists.sourceforge.net
    28. -
    29.  */
    30. -
    31.  
    32. -
    33.  
    34. -
    35. /*======================================================================*\
    36. -
    37.     Function: parse_w3cdtf
    38. -
    39.     Purpose:  parse a W3CDTF date into unix epoch
    40. -
    41.  
    42. -
    43.     NOTE: http://www.w3.org/TR/NOTE-datetime
    44. -
    45. \*======================================================================*/
    46. -
    47.  
    48. -
    49. function parse_w3cdtf $date_str {
    50. -
    51.     
    52. -
    53.     # regex to match wc3dtf
    54. -
    55.     $pat "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
    56. -
    57.     
    58. -
    59.     if preg_match$pat$date_str$match ) ) {
    60. -
    61.         list$year$month$day$hours$minutes$seconds
    62. -
    63.             array$match[1]$match[2]$match[3]$match[4]$match[5]$match[6]);
    64. -
    65.         
    66. -
    67.         # calc epoch for current date assuming GMT
    68. -
    69.         $epoch gmmktime$hours$minutes$seconds$month$day$year);
    70. -
    71.         
    72. -
    73.         $offset 0;
    74. -
    75.         if $match[10== 'Z' {
    76. -
    77.             # zulu time, aka GMT
    78. -
    79.         }
    80. -
    81.         else {
    82. -
    83.             list$tz_mod$tz_hour$tz_min =
    84. -
    85.                 array$match[8]$match[9]$match[10]);
    86. -
    87.             
    88. -
    89.             # zero out the variables
    90. -
    91.             if $tz_hour $tz_hour 0}
    92. -
    93.             if $tz_min $tz_min 0}
    94. -
    95.         
    96. -
    97.             $offset_secs (($tz_hour*60)+$tz_min)*60;
    98. -
    99.             
    100. -
    101.             # is timezone ahead of GMT?  then subtract offset
    102. -
    103.             #
    104. -
    105.             if $tz_mod == '+' {
    106. -
    107.                 $offset_secs $offset_secs * -1;
    108. -
    109.             }
    110. -
    111.             
    112. -
    113.             $offset $offset_secs
    114. -
    115.         }
    116. -
    117.         $epoch $epoch $offset;
    118. -
    119.         return $epoch;
    120. -
    121.     }
    122. -
    123.     else {
    124. -
    125.         return -1;
    126. -
    127.     }
    128. -
    129. }
    130. -
    131.  
    132. -
    133. ?>
    134. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:13 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base deleted file mode 100755 index 8f298559..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_debug.php.html.svn-base +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for magpie_debug.php - - - - - -

    Source for file magpie_debug.php

    -

    Documentation is available at magpie_debug.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. ini_set('display_errors'1);
    6. -
    7. ini_set('error_reporting'E_ALL);
    8. -
    9. define('MAGPIE_OUTPUT_ENCODING''UTF-8');
    10. -
    11. define('MAGPIE_DIR''../');
    12. -
    13. define('MAGPIE_DEBUG'1);
    14. -
    15.  
    16. -
    17. // flush cache quickly for debugging purposes, don't do this on a live site
    18. -
    19. define('MAGPIE_CACHE_AGE'10);
    20. -
    21.  
    22. -
    23. require_once(MAGPIE_DIR.'rss_fetch.inc');
    24. -
    25.  
    26. -
    27.  
    28. -
    29. if isset($_GET['url']) ) {
    30. -
    31.     $url $_GET['url'];
    32. -
    33. }
    34. -
    35. else {
    36. -
    37.     $url 'http://magpierss.sf.net/test.rss';
    38. -
    39. }
    40. -
    41.  
    42. -
    43.  
    44. -
    45. -
    46.  
    47. -
    48. $rss fetch_rss$url );
    49. -
    50.     
    51. -
    52. if ($rss{
    53. -
    54.     echo "<h3>Example Output</h3>";
    55. -
    56.     echo "Channel: " $rss->channel['title'"<p>";
    57. -
    58.     echo "<ul>";
    59. -
    60.     foreach ($rss->items as $item{
    61. -
    62.         $href $item['link'];
    63. -
    64.         $title $item['title'];    
    65. -
    66.         echo "<li><a href=$href>$title</a></li>";
    67. -
    68.     }
    69. -
    70.     echo "</ul>";
    71. -
    72. }
    73. -
    74. else {
    75. -
    76.     echo "Error: " magpie_error();
    77. -
    78. }
    79. -
    80. ?>
    81. -
    82.  
    83. -
    84. <form>
    85. -
    86.     RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
    87. -
    88.     <input type="submit" value="Parse RSS">
    89. -
    90. </form>
    91. -
    92.  
    93. -
    94. <h3>Parsed Results (var_dump'ed)</h3>
    95. -
    96. <pre>
    97. -
    98. <?php var_dump($rss)?>
    99. -
    100. </pre>
    101. -
    102.  
    103. -
    104. <?php
    105. -
    106.  
    107. -
    108. function test_library_support({
    109. -
    110.    if (!function_exists('xml_parser_create')) {
    111. -
    112.        echo "<b>Error:</b> PHP compiled without XML support (--with-xml), Mapgie won't work without PHP support for XML.<br />\n";
    113. -
    114.        exit;
    115. -
    116.    }
    117. -
    118.    else {
    119. -
    120.        echo "<b>OK:</b> Found an XML parser. <br />\n";
    121. -
    122.    }
    123. -
    124.    
    125. -
    126.    if function_exists('gzinflate') ) {
    127. -
    128.        echo "<b>Warning:</b>  PHP compiled without Zlib support (--with-zlib). No support for GZIP encoding.<br />\n";
    129. -
    130.    }
    131. -
    132.    else {
    133. -
    134.        echo "<b>OK:</b>  Support for GZIP encoding.<br />\n";
    135. -
    136.    }
    137. -
    138.    
    139. -
    140.    if (function_exists('iconv'and function_exists('mb_convert_encoding') ) ) {
    141. -
    142.        echo "<b>Warning:</b>  No support for iconv (--with-iconv) or multi-byte strings (--enable-mbstring)." .  
    143. -
    144.            "No support character set munging.<br />\n";
    145. -
    146.    }
    147. -
    148.    else {
    149. -
    150.        echo "<b>OK:</b>  Support for character munging.<br />\n";
    151. -
    152.    }
    153. -
    154. }
    155. -
    156.  
    157. -
    158. ?>
    159. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base deleted file mode 100755 index 1f17f02d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_simple.php.html.svn-base +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - File Source for magpie_simple.php - - - - - -

    Source for file magpie_simple.php

    -

    Documentation is available at magpie_simple.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. define('MAGPIE_DIR''../');
    6. -
    7. require_once(MAGPIE_DIR.'rss_fetch.inc');
    8. -
    9.  
    10. -
    11. $url $_GET['url'];
    12. -
    13.  
    14. -
    15. if $url {
    16. -
    17.     $rss fetch_rss$url );
    18. -
    19.     echo "Channel: " $rss->channel['title'"<p>";
    20. -
    21.     echo "<ul>";
    22. -
    23.     foreach ($rss->items as $item{
    24. -
    25.         $href $item['link'];
    26. -
    27.         $title $item['title'];    
    28. -
    29.         echo "<li><a href=$href>$title</a></li>";
    30. -
    31.     }
    32. -
    33.     echo "</ul>";
    34. -
    35. }
    36. -
    37. ?>
    38. -
    39.  
    40. -
    41. <form>
    42. -
    43.     RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
    44. -
    45.     <input type="submit" value="Parse RSS">
    46. -
    47. </form>
    48. -
    49.   
    50. -
    51. <p>
    52. -
    53. <h2>Security Note:</h2>
    54. -
    55. This is a simple <b>example</b> script.  If this was a <b>real</b> script we probably wouldn't allow  strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL.  Additionally its a bad idea to leave this example script lying around.
    56. -
    57. </p>
    58. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base deleted file mode 100755 index 3b66f375..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for magpie_slashbox.php - - - - - -

    Source for file magpie_slashbox.php

    -

    Documentation is available at magpie_slashbox.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. define('MAGPIE_DIR''../');
    6. -
    7. require_once(MAGPIE_DIR.'rss_fetch.inc');
    8. -
    9.     
    10. -
    11. $url $_GET['rss_url'];
    12. -
    13.  
    14. -
    15. ?>
    16. -
    17.  
    18. -
    19. <html
    20. -
    21. <body LINK="#999999" VLINK="#000000">
    22. -
    23.  
    24. -
    25. <form>
    26. -
    27. <input type="text" name="rss_url" size="40" value="<?php echo $url ?>"><input type="Submit">
    28. -
    29. </form>
    30. -
    31.  
    32. -
    33. <?php
    34. -
    35.  
    36. -
    37. if $url {
    38. -
    39.     echo "displaying$url<p>";
    40. -
    41.     $rss fetch_rss$url );
    42. -
    43.     echo slashbox ($rss);
    44. -
    45. }
    46. -
    47.  
    48. -
    49. echo "<pre>";
    50. -
    51. print_r($rss);
    52. -
    53. echo "</pre>";
    54. -
    55. ?>
    56. -
    57.  
    58. -
    59. </body>
    60. -
    61. </html>
    62. -
    63.  
    64. -
    65. <?php
    66. -
    67.  
    68. -
    69. # just some quick and ugly php to generate html
    70. -
    71. #
    72. -
    73. #
    74. -
    75. function slashbox ($rss{
    76. -
    77.     echo "<table cellpadding=2 cellspacing=0><tr>";
    78. -
    79.     echo "<td bgcolor=#006666>";
    80. -
    81.     
    82. -
    83.     # get the channel title and link properties off of the rss object
    84. -
    85.     #
    86. -
    87.     $title $rss->channel['title'];
    88. -
    89.     $link $rss->channel['link'];
    90. -
    91.     
    92. -
    93.     echo "<a href=$link><font color=#FFFFFF><b>$title</b></font></a>";
    94. -
    95.     echo "</td></tr>";
    96. -
    97.     
    98. -
    99.     # foreach over each item in the array.
    100. -
    101.     # displaying simple links
    102. -
    103.     #
    104. -
    105.     # we could be doing all sorts of neat things with the dublin core
    106. -
    107.     # info, or the event info, or what not, but keeping it simple for now.
    108. -
    109.     #
    110. -
    111.     foreach ($rss->items as $item {
    112. -
    113.         echo "<tr><td bgcolor=#cccccc>";
    114. -
    115.         echo "<a href=$item[link]>";
    116. -
    117.         echo $item['title'];
    118. -
    119.         echo "</a></td></tr>";
    120. -
    121.     }        
    122. -
    123.     
    124. -
    125.     echo "</table>";
    126. -
    127. }
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:47 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base deleted file mode 100755 index 37c27763..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssimple_smarty.php.html.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - File Source for simple_smarty.php - - - - - -

    Source for file simple_smarty.php

    -

    Documentation is available at simple_smarty.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // Define path to Smarty files (don't forget trailing slash)
    6. -
    7. // and load library.  (you'll want to change this value)
    8. -
    9. //
    10. -
    11. // NOTE:  you can also simply add Smarty to your include path
    12. -
    13. define('SMARTY_DIR''/home/kellan/projs/magpierss/scripts/Smarty/');
    14. -
    15. require_once(SMARTY_DIR.'Smarty.class.php');
    16. -
    17.  
    18. -
    19. // define path to Magpie files and load library
    20. -
    21. // (you'll want to change this value)
    22. -
    23. //
    24. -
    25. // NOTE: you can also simple add MagpieRSS to your include path
    26. -
    27. define('MAGPIE_DIR''/home/kellan/projs/magpierss/');
    28. -
    29. require_once(MAGPIE_DIR.'rss_fetch.inc');
    30. -
    31. require_once(MAGPIE_DIR.'rss_utils.inc');
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // optionally show lots of debugging info
    38. -
    39. # define('MAGPIE_DEBUG', 2);
    40. -
    41.  
    42. -
    43. // optionally flush cache quickly for debugging purposes, 
    44. -
    45. // don't do this on a live site
    46. -
    47. # define('MAGPIE_CACHE_AGE', 10);
    48. -
    49.  
    50. -
    51. // use cache?  default is yes.  see rss_fetch for other Magpie options
    52. -
    53. # define('MAGPIE_CACHE_ON', 1)
    54. -
    55.  
    56. -
    57. // setup template object
    58. -
    59. $smarty new Smarty;
    60. -
    61. $smarty->compile_check true;
    62. -
    63.  
    64. -
    65. // url of an rss file
    66. -
    67. $url $_GET['rss_url'];
    68. -
    69.  
    70. -
    71.  
    72. -
    73. if $url {
    74. -
    75.     // assign a variable to smarty for use in the template
    76. -
    77.     $smarty->assign('rss_url'$url);
    78. -
    79.     
    80. -
    81.     // use MagpieRSS to fetch remote RSS file, and parse it
    82. -
    83.     $rss fetch_rss$url );
    84. -
    85.     
    86. -
    87.     // if fetch_rss returned false, we encountered an error
    88. -
    89.     if !$rss {
    90. -
    91.         $smarty->assign'error'magpie_error() );
    92. -
    93.     }
    94. -
    95.     $smarty->assign('rss'$rss );
    96. -
    97.     
    98. -
    99.     $item $rss->items[0];
    100. -
    101.     $date parse_w3cdtf$item['dc']['date');
    102. -
    103.     $smarty->assign'date'$date );
    104. -
    105. }
    106. -
    107.  
    108. -
    109. // parse smarty template, and display using the variables we assigned
    110. -
    111. $smarty->display('simple.smarty');
    112. -
    113.  
    114. -
    115. ?>
    116. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:13 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base deleted file mode 100755 index ae75ccb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html.svn-base +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - File Source for modifier.rss_date_parse.php - - - - - -

    Source for file modifier.rss_date_parse.php

    -

    Documentation is available at modifier.rss_date_parse.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /*
    6. -
    7.  * Smarty plugin
    8. -
    9.  * -------------------------------------------------------------
    10. -
    11.  * Type:     modifier
    12. -
    13.  * Name:     rss_date_parse
    14. -
    15.  * Purpose:  parse rss date into unix epoch
    16. -
    17.  * Input:    string: rss date
    18. -
    19.  *             default_date:  default date if $rss_date is empty
    20. -
    21.  *
    22. -
    23.  * NOTE!!!  parse_w3cdtf provided by MagpieRSS's rss_utils.inc
    24. -
    25.  *          this file needs to be included somewhere in your script
    26. -
    27.  * -------------------------------------------------------------
    28. -
    29.  */
    30. -
    31.  
    32. -
    33. function smarty_modifier_rss_date_parse ($rss_date$default_date=null)
    34. -
    35. {
    36. -
    37.     if($rss_date != ''{
    38. -
    39.         return parse_w3cdtf$rss_date );
    40. -
    41.     elseif (isset($default_date&& $default_date != ''{        
    42. -
    43.         return parse_w3cdtf$default_date );
    44. -
    45.     else {
    46. -
    47.         return;
    48. -
    49.     }
    50. -
    51. }
    52. -
    53.  
    54. -
    55.  
    56. -
    57.  
    58. -
    59.  
    60. -
    61. ?>
    62. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__vocabularyDC.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__vocabularyDC.php.html.svn-base deleted file mode 100755 index d9b50034..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_default__vocabularyDC.php.html.svn-base +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for DC.php - - - - - -

    Source for file DC.php

    -

    Documentation is available at DC.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Dublin Core Vocabulary
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // @version                  : $Id$
    10. -
    11. // Authors                   : Chris Bizer (chris@bizer.de)
    12. -
    13. //
    14. -
    15. // Description               : Wrapper, defining resources for all terms of the Dublin 
    16. -
    17. //                               Core Vocabulary. For details about DC see: http://dublincore.org/
    18. -
    19. //                                Using the wrapper allows you to define all aspects of 
    20. -
    21. //                             the vocabulary in one spot, simplifing implementation and 
    22. -
    23. //                             maintainence. Working with the vocabulary, you should use 
    24. -
    25. //                             these resources as shortcuts in your code. 
    26. -
    27. //                               
    28. -
    29.  
    30. -
    31.  
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // DC concepts
    38. -
    39. $DC_contributor new Resource(DC_NS 'contributor');    
    40. -
    41. $DC_coverage new Resource(DC_NS 'coverage');  
    42. -
    43. $DC_creator new Resource(DC_NS 'creator');  
    44. -
    45. $DC_date new Resource(DC_NS 'date');  
    46. -
    47. $DC_description new Resource(DC_NS 'description');  
    48. -
    49. $DC_format new Resource(DC_NS 'format');  
    50. -
    51. $DC_identifier new Resource(DC_NS 'identifier');  
    52. -
    53. $DC_language new Resource(DC_NS 'language');  
    54. -
    55. $DC_publisher new Resource(DC_NS 'publisher');  
    56. -
    57. $DC_rights new Resource(DC_NS 'rights');  
    58. -
    59. $DC_source new Resource(DC_NS 'source');  
    60. -
    61. $DC_subject new Resource(DC_NS 'subject');  
    62. -
    63. $DC_title new Resource(DC_NS 'title');  
    64. -
    65. $DC_type new Resource(DC_NS 'type');  
    66. -
    67.  
    68. -
    69. // Dublin Core Metadata Element Set (DCMES) 1.1
    70. -
    71. $DCMES_name array('contributor''coverage''creator''date',
    72. -
    73.             'description''format''identifier''language'
    74. -
    75.             'publisher''relation''rights''source'
    76. -
    77.             'subject''title''type');
    78. -
    79.  
    80. -
    81. foreach ($DCMES_name as $name{
    82. -
    83.     $DCMES[$namenew Resource(DC_NS $name);
    84. -
    85.     $GLOBALS['DC_' $name$DCMES[$name];
    86. -
    87. }
    88. -
    89.  
    90. -
    91. // Other Elements and Element Refinements
    92. -
    93. $DCTERM_name array('abstract''accessRights''alternative''audience'
    94. -
    95.              'available''bibliographicCitation''conformsTo',
    96. -
    97.              'created''dateAccepted''dateCopyrighted'
    98. -
    99.              'dateSubmitted''educationLevel''extent',
    100. -
    101.              'hasFormat''hasPart''hasVersion'
    102. -
    103.              'isFormatOf''isPartOf''isReferencedBy''isReplacedBy',
    104. -
    105.              'isRequiredBy''issued''isVersionOf''license',
    106. -
    107.              'mediator''medium''modified''references',
    108. -
    109.              'replaces''requires''rightsHolder''spatial',
    110. -
    111.              'tableOfContents''temporal''valid');
    112. -
    113. foreach ($DCTERM_name as $name{
    114. -
    115.     $DCTERM[$namenew Resource(DCTERM_NS $name);
    116. -
    117. }
    118. -
    119.  
    120. -
    121. // Encoding schemes
    122. -
    123. $scheme_name array('Box''DCMIType''IMT''ISO3166''ISO639-2',
    124. -
    125.              'LCC''LCSH''MESH''Period''Point',
    126. -
    127.              'RFC1766''RFC3066''TGN''UDC''URI',
    128. -
    129.              'W3CDTF');
    130. -
    131.  
    132. -
    133. foreach ($scheme_name as $name{
    134. -
    135.    $DCTERM[$namenew Resource(DCTERM_NS $name);
    136. -
    137. }
    138. -
    139.  
    140. -
    141. // DCMI Type Vocabulary
    142. -
    143. $DCMITYPE_names array('Collection''Dataset''Event''Image',
    144. -
    145.             'InteractiveResource''MovingImage''PhysicalObject',
    146. -
    147.             'Service''Software''Sound''StillImage''Text');
    148. -
    149.  
    150. -
    151. foreach ($DCMITYPE_names as $name{
    152. -
    153.     $DCMITYPE[$namenew Resource(DCMITYPE_NS $name);
    154. -
    155. }
    156. -
    157.  
    158. -
    159. ?>
    160. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModel.php.html.svn-base deleted file mode 100755 index 6c44c5ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModel.php.html.svn-base +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - File Source for InfModel.php - - - - - -

    Source for file InfModel.php

    -

    Documentation is available at InfModel.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: infModel
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * A InfModel Model extends a MemModel , by adding the ability to infer statements from
    14. -
    15.  * known statements and RDFS/OWL-Schematas.
    16. -
    17.  * It uses the same interface as MemModel, thus making the
    18. -
    19.  * infererence process hidden.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id$
    24. -
    25.  * @author Daniel Westphal <mail at d-westphal dot de>
    26. -
    27.  *
    28. -
    29.  * @package infModel
    30. -
    31.  * @access    public
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. class InfModel extends MemModel 
    38. -
    39. {
    40. -
    41.     /**
    42. -
    43.     * Array that holds the objects of the class Infrule,
    44. -
    45.     * which were assigned by the _addToInference() function
    46. -
    47.     *
    48. -
    49.     * @var        array 
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $infRules;
    56. -
    57.  
    58. -
    59.     /**
    60. -
    61.     * Array of URI-Strings that produces Infrules.
    62. -
    63.     *
    64. -
    65.     * @var        array 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $supportedInference;
    72. -
    73.     
    74. -
    75.     /**
    76. -
    77.     * Array of the connection between the infrules and the statement
    78. -
    79.     * that assigned those rules.
    80. -
    81.     * array[2][3]=true;array[2][5]=true means, that statement 2
    82. -
    83.     * assigned rule 3 & 5 to the model.
    84. -
    85.     *
    86. -
    87.     * @var        array 
    88. -
    89.     * @access    private
    90. -
    91.     */    
    92. -
    93.     var $statementRuleIndex;
    94. -
    95.     
    96. -
    97.     /**
    98. -
    99.     * Array of the infRule triggers and the matching infrules.
    100. -
    101.     * $this->infRulesTriggerIndex['s'] for subject index, ['p'] for predicates,
    102. -
    103.     * and ['o'] for objects.
    104. -
    105.     *
    106. -
    107.     * @var        array 
    108. -
    109.     * @access    private
    110. -
    111.     */    
    112. -
    113.     var $infRulesTriggerIndex;
    114. -
    115.     
    116. -
    117.     /**
    118. -
    119.     * Array of the infRule entailments and the matching infrules.
    120. -
    121.     * $this->infRulesEntailIndex['s'] for subject index, ['p'] for predicates,
    122. -
    123.     * and ['o'] for objects.
    124. -
    125.     *
    126. -
    127.     * @var        array 
    128. -
    129.     * @access    private
    130. -
    131.     */    
    132. -
    133.     var $infRulesEntailIndex;
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  
    140. -
    141.    /**
    142. -
    143.     * Constructor
    144. -
    145.     * You can supply a base_uri
    146. -
    147.     *
    148. -
    149.     * @param string $baseURI 
    150. -
    151.     * @access    public
    152. -
    153.     */    
    154. -
    155.     function InfModel ($baseURI NULL
    156. -
    157.     {
    158. -
    159.         //call the memmodel constructor method
    160. -
    161.         parent::MemModel($baseURI);
    162. -
    163.         //initialise vars
    164. -
    165.         $this->infRulesTriggerIndex['s']=array();
    166. -
    167.         $this->infRulesTriggerIndex['p']=array();
    168. -
    169.         $this->infRulesTriggerIndex['o']=array();
    170. -
    171.         $this->infRulesEntailIndex['s']=array();
    172. -
    173.         $this->infRulesEntailIndex['p']=array();
    174. -
    175.         $this->infRulesEntailIndex['o']=array();
    176. -
    177.         $this->infRules=array();
    178. -
    179.         $this->statementRuleIndex array();
    180. -
    181.         //arraylist of predicate labels that shall add inference rules 
    182. -
    183.         //to the model
    184. -
    185.         //The constants, wich statements will create rules can be configured in constants.php
    186. -
    187.         if (INF_RES_SUBCLASSOF)
    188. -
    189.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_SUBCLASSOF;
    190. -
    191.             
    192. -
    193.         if (INF_RES_SUBPROPERTYOF)
    194. -
    195.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF;
    196. -
    197.  
    198. -
    199.         if (INF_RES_RANGE)
    200. -
    201.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_RANGE;
    202. -
    203.  
    204. -
    205.         if (INF_RES_DOMAIN)
    206. -
    207.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_DOMAIN;
    208. -
    209.  
    210. -
    211.         if (INF_RES_OWL_SAMEAS)
    212. -
    213.             $this->supportedInference[OWL_URI.OWL_SAME_AS;
    214. -
    215.  
    216. -
    217.         if (INF_RES_OWL_INVERSEOF)
    218. -
    219.             $this->supportedInference[OWL_URI.OWL_INVERSE_OF;
    220. -
    221.  
    222. -
    223.         //Rule: rdfs12    
    224. -
    225.         if (INF_RES_RULE_RDFS12)
    226. -
    227.         {
    228. -
    229.             $infRule=new InfRule();
    230. -
    231.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.'ContainerMembershipProperty'));
    232. -
    233.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),new Resource(RDF_SCHEMA_URI.'member'));
    234. -
    235.             $this->_addInfRule($infRule,'base');
    236. -
    237.         }
    238. -
    239.     
    240. -
    241.         //Rule: rdfs6
    242. -
    243.         if (INF_RES_RULE_RDFS6)
    244. -
    245.         {
    246. -
    247.             $infRule=new InfRule();
    248. -
    249.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_NAMESPACE_URI.RDF_PROPERTY));
    250. -
    251.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),'<s>');
    252. -
    253.             $this->_addInfRule($infRule,'base');
    254. -
    255.         }
    256. -
    257.             
    258. -
    259.         //Rule: rdfs8
    260. -
    261.         if (INF_RES_RULE_RDFS8)
    262. -
    263.         {
    264. -
    265.             $infRule=new InfRule();
    266. -
    267.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
    268. -
    269.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_RESOURCE));
    270. -
    271.             $this->_addInfRule($infRule,'base');
    272. -
    273.             
    274. -
    275.         }
    276. -
    277.         
    278. -
    279.         //Rule: rdfs10
    280. -
    281.         if (INF_RES_RULE_RDFS10)
    282. -
    283.         {
    284. -
    285.             $infRule=new InfRule();
    286. -
    287.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
    288. -
    289.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),'<s>');
    290. -
    291.             $this->_addInfRule($infRule,'base');
    292. -
    293.         }
    294. -
    295.                 
    296. -
    297.         //Rule: rdfs13
    298. -
    299.         if (INF_RES_RULE_RDFS13)
    300. -
    301.         {
    302. -
    303.             $infRule=new InfRule();
    304. -
    305.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_DATATYPE));
    306. -
    307.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_LITERAL));
    308. -
    309.             $this->_addInfRule($infRule,'base');
    310. -
    311.         }
    312. -
    313.                 
    314. -
    315.     }
    316. -
    317.     
    318. -
    319.      /**
    320. -
    321.        * Adds a new triple to the Model without checking if the statement
    322. -
    323.        * is already in the Model.
    324. -
    325.        * So if you want a duplicate free MemModel use the addWithoutDuplicates()
    326. -
    327.        * function (which is slower then add())
    328. -
    329.        * If the statement's predicate label is supported by the inference,
    330. -
    331.        * the matching rules are added.
    332. -
    333.        *
    334. -
    335.        * @param    object Statement    $statement 
    336. -
    337.        * @access    public
    338. -
    339.        * @throws    PhpError
    340. -
    341.        */    
    342. -
    343.     function add($statement)
    344. -
    345.     {
    346. -
    347.         parent::add($statement);
    348. -
    349.         //if the predicate is supported by the inference
    350. -
    351.         if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    352. -
    353.         {
    354. -
    355.                 $this->_addToInference($statement);
    356. -
    357.         };
    358. -
    359.     }
    360. -
    361.  
    362. -
    363.     /**
    364. -
    365.     * This function analyses the statement's predicate and adds the
    366. -
    367.     * matching infrule to the model.
    368. -
    369.     *
    370. -
    371.        * @param    object Statement    $statement 
    372. -
    373.        * @access    private
    374. -
    375.        */
    376. -
    377.     function _addToInference($statement)
    378. -
    379.     {
    380. -
    381.         $predicateLabel=$statement->getLabelPredicate();
    382. -
    383.         //get the position of the the statement in the model
    384. -
    385.         end($this->triples);
    386. -
    387.         $statementPosition=key($this->triples);
    388. -
    389.         
    390. -
    391.         switch ($predicateLabel)
    392. -
    393.         {
    394. -
    395.             case RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF :
    396. -
    397.                 //create a new rule
    398. -
    399.                 $infRule=new InfRule();
    400. -
    401.                 //set the trigger to match all statements, having a 
    402. -
    403.                 //predicate, that matches the subject of the statement that 
    404. -
    405.                 //created this rule.
    406. -
    407.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    408. -
    409.                 //set the infrule to return a statement, having the same 
    410. -
    411.                 //subject and object as the statement, that asked for an 
    412. -
    413.                 //entailment, and having the object of the statement, 
    414. -
    415.                 //that created this rule as predicate.
    416. -
    417.                 $infRule->setEntailment('<s>',$statement->getObject(),'<o>');
    418. -
    419.                 //add the infule to Model, Statement/Rule-Index, 
    420. -
    421.                 //and Rule/Trigger (or Rule/Entailment) index
    422. -
    423.                 $this->_addInfRule($infRule,$statementPosition);
    424. -
    425.             break;
    426. -
    427.             
    428. -
    429.             case RDF_SCHEMA_URI.RDFS_SUBCLASSOF :
    430. -
    431.                 $infRule=new InfRule();
    432. -
    433.                 $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getSubject());
    434. -
    435.                 $infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    436. -
    437.                 $this->infRules[]=$infRule;
    438. -
    439.                 $this->_addInfRule($infRule,$statementPosition);
    440. -
    441.             break;
    442. -
    443.             
    444. -
    445.             case RDF_SCHEMA_URI.RDFS_DOMAIN :
    446. -
    447.                 $infRule=new InfRule();
    448. -
    449.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    450. -
    451.                 $infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    452. -
    453.                 $this->infRules[]=$infRule;
    454. -
    455.                 $this->_addInfRule($infRule,$statementPosition);
    456. -
    457.             break;
    458. -
    459.             
    460. -
    461.             case RDF_SCHEMA_URI.RDFS_RANGE :
    462. -
    463.                 $infRule=new InfRule();
    464. -
    465.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    466. -
    467.                 $infRule->setEntailment('<o>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    468. -
    469.                 $this->infRules[]=$infRule;
    470. -
    471.                 $this->_addInfRule($infRule,$statementPosition);
    472. -
    473.             break;
    474. -
    475.             
    476. -
    477.             case OWL_URI.OWL_INVERSE_OF :
    478. -
    479.                 $infRule=new InfRule();
    480. -
    481.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    482. -
    483.                 $infRule->setEntailment('<o>',$statement->getObject(),'<s>');
    484. -
    485.                 $this->infRules[]=$infRule;
    486. -
    487.                 $this->_addInfRule($infRule,$statementPosition);
    488. -
    489.             
    490. -
    491.                 $infRule=new InfRule();
    492. -
    493.                 $infRule->setTrigger(null,$statement->getObject(),null);
    494. -
    495.                 $infRule->setEntailment('<o>',$statement->getSubject(),'<s>');
    496. -
    497.                 $this->infRules[]=$infRule;            
    498. -
    499.                 $this->_addInfRule($infRule,$statementPosition);                
    500. -
    501.             break;
    502. -
    503.             
    504. -
    505.             case OWL_URI.OWL_SAME_AS :
    506. -
    507.                 $infRule=new InfRule();
    508. -
    509.                 $infRule->setTrigger($statement->getSubject(),null,null);
    510. -
    511.                 $infRule->setEntailment($statement->getObject(),'<p>','<o>');
    512. -
    513.                 $this->_addInfRule($infRule,$statementPosition);
    514. -
    515.             
    516. -
    517.                 $infRule=new InfRule();
    518. -
    519.                 $infRule->setTrigger($statement->getObject(),null,null);
    520. -
    521.                 $infRule->setEntailment($statement->getSubject(),'<p>','<o>');
    522. -
    523.                 $this->_addInfRule($infRule,$statementPosition);
    524. -
    525.             
    526. -
    527.                 $infRule=new InfRule();
    528. -
    529.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    530. -
    531.                 $infRule->setEntailment('<s>',$statement->getObject(),'<o>');
    532. -
    533.                 $this->_addInfRule($infRule,$statementPosition);
    534. -
    535.             
    536. -
    537.                 $infRule=new InfRule();
    538. -
    539.                 $infRule->setTrigger(null,$statement->getObject(),null);
    540. -
    541.                 $infRule->setEntailment('<s>',$statement->getSubject(),'<o>');
    542. -
    543.                 $this->_addInfRule($infRule,$statementPosition);
    544. -
    545.             
    546. -
    547.                 $infRule=new InfRule();
    548. -
    549.                 $infRule->setTrigger(null,null,$statement->getSubject());
    550. -
    551.                 $infRule->setEntailment('<s>','<p>',$statement->getObject());
    552. -
    553.                 $this->_addInfRule($infRule,$statementPosition);
    554. -
    555.             
    556. -
    557.                 $infRule=new InfRule();
    558. -
    559.                 $infRule->setTrigger(null,null,$statement->getObject());
    560. -
    561.                 $infRule->setEntailment('<s>','<p>',$statement->getSubject());
    562. -
    563.                 $this->_addInfRule($infRule,$statementPosition);        
    564. -
    565.             break;
    566. -
    567.         };    
    568. -
    569.     }
    570. -
    571.  
    572. -
    573.     /**
    574. -
    575.     * This function checks, which infrules were added by the statement and
    576. -
    577.     * removes those.
    578. -
    579.     *
    580. -
    581.        * @param    object Statement    $statement 
    582. -
    583.        * @return    integer 
    584. -
    585.        * @access    private
    586. -
    587.        */
    588. -
    589.     function _removeFromInference($statement)
    590. -
    591.     {
    592. -
    593.         $returnarray();
    594. -
    595.         $statementPosition=-1;
    596. -
    597.         do
    598. -
    599.         {
    600. -
    601.             //get the position of the statement that should be removed
    602. -
    603.             $statementPosition=$this->findFirstMatchOff($statement->getSubject(),
    604. -
    605.                                                     $statement->getPredicate(),
    606. -
    607.                                                     $statement->getObject(),
    608. -
    609.                                                     $statementPosition+1);                        
    610. -
    611.             if ($statementPosition!=-1)
    612. -
    613.             {
    614. -
    615.                 //if it added any rules
    616. -
    617.                 if (isset ($this->statementRuleIndex[$statementPosition]))
    618. -
    619.                 {
    620. -
    621.                     //remove all rules 
    622. -
    623.                     foreach ($this->statementRuleIndex[$statementPositionas $key => $value)
    624. -
    625.                     {
    626. -
    627.                         //remove from Rule-Trigger Index
    628. -
    629.                         if (is_a($this,'InfModelF'))
    630. -
    631.                         {
    632. -
    633.                             $trigger=$this->infRules[$key]->getTrigger();
    634. -
    635.                             
    636. -
    637.                             if(is_a($trigger['s'],'Node'))
    638. -
    639.                             {
    640. -
    641.                                 $subjectLabel=$trigger['s']->getLabel();
    642. -
    643.                             else 
    644. -
    645.                             {
    646. -
    647.                                 $subjectLabel='null';
    648. -
    649.                             }
    650. -
    651.                             unset ($this->infRulesTriggerIndex['s'][$subjectLabel][array_search($key,$this->infRulesTriggerIndex['s'][$subjectLabel])]);
    652. -
    653.                             
    654. -
    655.                             if(is_a($trigger['p'],'Node'))
    656. -
    657.                             {
    658. -
    659.                                 $predicateLabel=$trigger['p']->getLabel();
    660. -
    661.                             else 
    662. -
    663.                             {
    664. -
    665.                                 $predicateLabel='null';
    666. -
    667.                             }
    668. -
    669.                             unset ($this->infRulesTriggerIndex['p'][$predicateLabel][array_search($key,$this->infRulesTriggerIndex['p'][$predicateLabel])]);
    670. -
    671.                             
    672. -
    673.                             if(is_a($trigger['o'],'Node'))
    674. -
    675.                             {
    676. -
    677.                                 $objectLabel=$trigger['o']->getLabel();
    678. -
    679.                             else 
    680. -
    681.                             {
    682. -
    683.                                 $objectLabel='null';
    684. -
    685.                             }
    686. -
    687.                             unset ($this->infRulesTriggerIndex['o'][$objectLabel][array_search($key,$this->infRulesTriggerIndex['o'][$objectLabel])]);
    688. -
    689.                         else
    690. -
    691.                         //remove from Rule-Entailment Index
    692. -
    693.                         {    
    694. -
    695.                             $entailment=$this->infRules[$key]->getEntailment();
    696. -
    697.                             
    698. -
    699.                             if(is_a($entailment['s'],'Node'))
    700. -
    701.                             {
    702. -
    703.                                 $subjectLabel=$entailment['s']->getLabel();
    704. -
    705.                             else 
    706. -
    707.                             {
    708. -
    709.                                 $subjectLabel='null';
    710. -
    711.                             }
    712. -
    713.                             unset ($this->infRulesEntailIndex['s'][$subjectLabel][array_search($key,$this->infRulesEntailIndex['s'][$subjectLabel])]);
    714. -
    715.                             
    716. -
    717.                             
    718. -
    719.                             if(is_a($entailment['p'],'Node'))
    720. -
    721.                             {
    722. -
    723.                                 $predicateLabel=$entailment['p']->getLabel();
    724. -
    725.                             else 
    726. -
    727.                             {
    728. -
    729.                                 $predicateLabel='null';
    730. -
    731.                             }
    732. -
    733.                             unset ($this->infRulesEntailIndex['p'][$predicateLabel][array_search($key,$this->infRulesEntailIndex['p'][$predicateLabel])]);
    734. -
    735.                             
    736. -
    737.                             if(is_a($entailment['o'],'Node'))
    738. -
    739.                             {
    740. -
    741.                                 $objectLabel=$entailment['o']->getLabel();
    742. -
    743.                             else 
    744. -
    745.                             {
    746. -
    747.                                 $objectLabel='null';
    748. -
    749.                             }
    750. -
    751.                             unset ($this->infRulesEntailIndex['o'][$objectLabel][array_search($key,$this->infRulesEntailIndex['o'][$objectLabel])]);
    752. -
    753.                         }    
    754. -
    755.                         //remove from statement-Rule Index
    756. -
    757.                         unset ($this->infRules[$key]);
    758. -
    759.                     }
    760. -
    761.                     unset($this->statementRuleIndex[$statementPosition]);
    762. -
    763.                     $return[]=$statementPosition;
    764. -
    765.                 };
    766. -
    767.             }
    768. -
    769.             
    770. -
    771.         while($statementPosition!=-1);
    772. -
    773.         
    774. -
    775.         //return the positions of the statements to be removed OR emty array 
    776. -
    777.         //if nothing was found.
    778. -
    779.         return $return;
    780. -
    781.     }
    782. -
    783.  
    784. -
    785.     /**
    786. -
    787.     * Returns a model, containing all Statements, having a Predicate, that
    788. -
    789.     * is supported by the inference.
    790. -
    791.     * 
    792. -
    793.     * @return    object Model 
    794. -
    795.     * @access    public
    796. -
    797.     */
    798. -
    799.     function getSchema(
    800. -
    801.     {
    802. -
    803.         $res=new MemModel();
    804. -
    805.         //Search the base-model for all statements, having a Predicate, that 
    806. -
    807.         //is supported by the inference.
    808. -
    809.         foreach ($this->supportedInference as $inferencePredicateLabel)
    810. -
    811.         {
    812. -
    813.             $res->addModel($this->find(nullnew Resource($inferencePredicateLabel)null));        
    814. -
    815.         }
    816. -
    817.         return $res;
    818. -
    819.     }
    820. -
    821.     
    822. -
    823.     /**
    824. -
    825.     * General method to replace nodes of a MemModel.
    826. -
    827.     * This function is disabled in the Inference Model.
    828. -
    829.     *
    830. -
    831.     * @param    object Node    $subject 
    832. -
    833.     * @param    object Node    $predicate 
    834. -
    835.     * @param    object Node    $object 
    836. -
    837.     * @param    object Node    $replacement 
    838. -
    839.     * @access    public
    840. -
    841.     * @throws    PhpError
    842. -
    843.     */
    844. -
    845.     function replace($subject$predicate$object$replacement
    846. -
    847.     {
    848. -
    849.     
    850. -
    851.        $errmsg RDFAPI_ERROR '(class: InfModel; method: replace): This function is disabled in the Inference Model';
    852. -
    853.        trigger_error($errmsgE_USER_ERROR)
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     /**
    860. -
    861.     * Method to search for triples using Perl-style regular expressions.
    862. -
    863.     * NULL input for any parameter will match anything.
    864. -
    865.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    866. -
    867.     * Finds all triples where the label of the object node matches the regular
    868. -
    869.     * expression.
    870. -
    871.     * Returns an empty MemModel if nothing is found.
    872. -
    873.     * 
    874. -
    875.     * This function is disabled in the Inference Model
    876. -
    877.     *
    878. -
    879.     * @param    string    $subject_regex 
    880. -
    881.     * @param    string    $predicate_regex 
    882. -
    883.     * @param    string    $object_regex 
    884. -
    885.     * @return    object MemModel 
    886. -
    887.     * @access    public
    888. -
    889.     */
    890. -
    891.     function findRegex($subject_regex$predicate_regex$object_regex
    892. -
    893.     {
    894. -
    895.  
    896. -
    897.         $errmsg RDFAPI_ERROR '(class: InfModel; method: findRegex): 
    898. -
    899.                                     This function is disabled in the  
    900. -
    901.                                     Inference Model';
    902. -
    903.            trigger_error($errmsgE_USER_ERROR)
    904. -
    905.     
    906. -
    907.    
    908. -
    909.     /**
    910. -
    911.     * Returns all tripels of a certain vocabulary.
    912. -
    913.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at
    914. -
    915.     * the end.
    916. -
    917.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    918. -
    919.     * Returns an empty MemModel if nothing is found.
    920. -
    921.     *
    922. -
    923.     * This function is disabled in the Inference Model.
    924. -
    925.     *
    926. -
    927.     * @param    string    $vocabulary 
    928. -
    929.     * @return    object MemModel 
    930. -
    931.     * @access    public
    932. -
    933.     */
    934. -
    935.     function findVocabulary($vocabulary
    936. -
    937.     {
    938. -
    939.         
    940. -
    941.         $errmsg RDFAPI_ERROR '(class: InfModel; method: findVocabulary): 
    942. -
    943.                                     This function is disabled in the  
    944. -
    945.                                     Inference Model';
    946. -
    947.         trigger_error($errmsgE_USER_ERROR)
    948. -
    949.     
    950. -
    951.  
    952. -
    953.     
    954. -
    955.     /**
    956. -
    957.      * Adds the URI or NULL to the Infrule trigger or entailment index.
    958. -
    959.     * 
    960. -
    961.     *
    962. -
    963.     * @param    object infrule    $infRule 
    964. -
    965.     * @param    integer    $infRulePosition 
    966. -
    967.     * @access    private
    968. -
    969.     */
    970. -
    971.     function _addInfruleToIndex($infRule,$infRulePosition)
    972. -
    973.     {
    974. -
    975.         //Add the rule only to the trigger index, if it is a InfFModel
    976. -
    977.         if (is_a($this,'InfModelF'))
    978. -
    979.         {
    980. -
    981.             //get the trigger
    982. -
    983.             $trigger $infRule->getTrigger();
    984. -
    985.             //evaluate and set the index
    986. -
    987.             if ($trigger['s'== null)
    988. -
    989.             {
    990. -
    991.                 $this->infRulesTriggerIndex['s']['null'][]=$infRulePosition;
    992. -
    993.             else 
    994. -
    995.             {
    996. -
    997.                 $this->infRulesTriggerIndex['s'][$trigger['s']->getLabel()][]=$infRulePosition;
    998. -
    999.             };
    1000. -
    1001.             
    1002. -
    1003.             if ($trigger['p'== null)
    1004. -
    1005.             {
    1006. -
    1007.                 $this->infRulesTriggerIndex['p']['null'][]=$infRulePosition;
    1008. -
    1009.             else 
    1010. -
    1011.             {
    1012. -
    1013.                 $this->infRulesTriggerIndex['p'][$trigger['p']->getLabel()][]=$infRulePosition;
    1014. -
    1015.             };
    1016. -
    1017.             
    1018. -
    1019.             if ($trigger['o'== null)
    1020. -
    1021.             {
    1022. -
    1023.                 $this->infRulesTriggerIndex['o']['null'][]=$infRulePosition;
    1024. -
    1025.             else 
    1026. -
    1027.             {
    1028. -
    1029.                 $this->infRulesTriggerIndex['o'][$trigger['o']->getLabel()][]=$infRulePosition;
    1030. -
    1031.             };
    1032. -
    1033.         else 
    1034. -
    1035.         //add to entailment Index if it is a BModel
    1036. -
    1037.         {        
    1038. -
    1039.             //get the entailment
    1040. -
    1041.             $entailment $infRule->getEntailment();
    1042. -
    1043.             //evaluate the entailment and add to index
    1044. -
    1045.             if (!is_a($entailment['s'],'Node'))
    1046. -
    1047.             {
    1048. -
    1049.                 $this->infRulesEntailIndex['s']['null'][]=$infRulePosition;
    1050. -
    1051.             else 
    1052. -
    1053.             {
    1054. -
    1055.                 $this->infRulesEntailIndex['s'][$entailment['s']->getLabel()][]=$infRulePosition;
    1056. -
    1057.             };
    1058. -
    1059.             
    1060. -
    1061.             if (!is_a($entailment['p'],'Node'))
    1062. -
    1063.             {
    1064. -
    1065.                 $this->infRulesEntailIndex['p']['null'][]=$infRulePosition;
    1066. -
    1067.             else 
    1068. -
    1069.             {
    1070. -
    1071.                 $this->infRulesEntailIndex['p'][$entailment['p']->getLabel()][]=$infRulePosition;
    1072. -
    1073.             };
    1074. -
    1075.             
    1076. -
    1077.             if (!is_a($entailment['o'],'Node'))
    1078. -
    1079.             {
    1080. -
    1081.                 $this->infRulesEntailIndex['o']['null'][]=$infRulePosition;
    1082. -
    1083.             else 
    1084. -
    1085.             {
    1086. -
    1087.                 $this->infRulesEntailIndex['o'][$entailment['o']->getLabel()][]=$infRulePosition;
    1088. -
    1089.             };
    1090. -
    1091.         };    
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     /**
    1098. -
    1099.      * Searches the trigger-index for a matching trigger and returns an
    1100. -
    1101.      * array of infRule positions.
    1102. -
    1103.     * 
    1104. -
    1105.     *
    1106. -
    1107.     * @param    object infrule    $infRule 
    1108. -
    1109.     * @return    array    integer
    1110. -
    1111.     * @access    private
    1112. -
    1113.     */
    1114. -
    1115.     function _findRuleTriggerInIndex($statement)
    1116. -
    1117.     {
    1118. -
    1119.         $return=array();
    1120. -
    1121.         //a statement's subject matches all triggers with null and the same URI
    1122. -
    1123.         $subjectLabel=$statement->getLabelSubject();
    1124. -
    1125.         $inIndexS=array();
    1126. -
    1127.         if (isset($this->infRulesTriggerIndex['s']['null'])) 
    1128. -
    1129.             $inIndexS=array_values($this->infRulesTriggerIndex['s']['null']);
    1130. -
    1131.         if (isset($this->infRulesTriggerIndex['s'][$subjectLabel])) 
    1132. -
    1133.             $inIndexSarray_merge($inIndexS,array_values($this->infRulesTriggerIndex['s'][$subjectLabel]));
    1134. -
    1135.         
    1136. -
    1137.             //a statement's predicate matches all triggers with null and the same URI
    1138. -
    1139.         $predicateLabel=$statement->getLabelPredicate();
    1140. -
    1141.         $inIndexP=array();
    1142. -
    1143.         if (isset($this->infRulesTriggerIndex['p']['null'])) 
    1144. -
    1145.             $inIndexP=array_values($this->infRulesTriggerIndex['p']['null']);
    1146. -
    1147.         if (isset($this->infRulesTriggerIndex['p'][$predicateLabel])) 
    1148. -
    1149.             $inIndexParray_merge($inIndexP,array_values($this->infRulesTriggerIndex['p'][$predicateLabel]));
    1150. -
    1151.         
    1152. -
    1153.         //a statement's object matches all triggers with null and the same URI    
    1154. -
    1155.         $objectLabel=$statement->getLabelObject();
    1156. -
    1157.         $inIndexO=array();
    1158. -
    1159.         if (isset($this->infRulesTriggerIndex['o']['null'])) 
    1160. -
    1161.             $inIndexO=array_values($this->infRulesTriggerIndex['o']['null']);
    1162. -
    1163.         if (isset($this->infRulesTriggerIndex['o'][$objectLabel])) 
    1164. -
    1165.             $inIndexOarray_merge($inIndexO,array_values($this->infRulesTriggerIndex['o'][$objectLabel]));
    1166. -
    1167.  
    1168. -
    1169.         //if an infrule position occurs in subject, predicate, and object index, add to result array.        
    1170. -
    1171.         foreach ($inIndexP as $positionP)
    1172. -
    1173.         {
    1174. -
    1175.             if (in_array($positionP,$inIndexO))
    1176. -
    1177.                 if (in_array($positionP,$inIndexS))
    1178. -
    1179.                     $return[]=$positionP;
    1180. -
    1181.         }
    1182. -
    1183.         return $return;
    1184. -
    1185.     }
    1186. -
    1187.     
    1188. -
    1189.     /**
    1190. -
    1191.      * Searches the Entailment-index for a matching Entailment and returns an
    1192. -
    1193.      * array of infRule positions.
    1194. -
    1195.     * 
    1196. -
    1197.     *
    1198. -
    1199.     * @param    node or null    $subject
    1200. -
    1201.     * @param    node or null    $predicate
    1202. -
    1203.     * @param    node or null    $object
    1204. -
    1205.     * @return    array    integer
    1206. -
    1207.     * @access    private
    1208. -
    1209.     */
    1210. -
    1211.     function _findRuleEntailmentInIndex($subject,$predicate,$object)
    1212. -
    1213.     {
    1214. -
    1215.         $return=array();
    1216. -
    1217.         //a node matches all entailments with NULL or a matching URI
    1218. -
    1219.         if(is_a($subject,'Node'))
    1220. -
    1221.         {
    1222. -
    1223.             $subjectLabel=$subject->getLabel();
    1224. -
    1225.             $inIndexS=array();
    1226. -
    1227.             if (isset($this->infRulesEntailIndex['s']['null'])) $inIndexS=array_values($this->infRulesEntailIndex['s']['null']);
    1228. -
    1229.             if (isset($this->infRulesEntailIndex['s'][$subjectLabel])) $inIndexSarray_merge($inIndexS,array_values($this->infRulesEntailIndex['s'][$subjectLabel]));
    1230. -
    1231.         else 
    1232. -
    1233.         //if the subject search pattern is NULL, every rule will match the subject search patter
    1234. -
    1235.         {
    1236. -
    1237.             $inIndexS=array_keys($this->infRules);
    1238. -
    1239.         }
    1240. -
    1241.         
    1242. -
    1243.         if(is_a($predicate,'Node'))
    1244. -
    1245.         {
    1246. -
    1247.             $predicateLabel=$predicate->getLabel();
    1248. -
    1249.             $inIndexP=array();
    1250. -
    1251.             if (isset($this->infRulesEntailIndex['p']['null'])) $inIndexP=array_values($this->infRulesEntailIndex['p']['null']);
    1252. -
    1253.             if (isset($this->infRulesEntailIndex['p'][$predicateLabel])) $inIndexParray_merge($inIndexP,array_values($this->infRulesEntailIndex['p'][$predicateLabel]));
    1254. -
    1255.         }  else 
    1256. -
    1257.         {
    1258. -
    1259.             $inIndexP=array_keys($this->infRules);
    1260. -
    1261.         }
    1262. -
    1263.         
    1264. -
    1265.         if(is_a($object,'Node'))
    1266. -
    1267.         {
    1268. -
    1269.             $objectLabel=$object->getLabel();
    1270. -
    1271.             $inIndexO=array();
    1272. -
    1273.             if (isset($this->infRulesEntailIndex['o']['null'])) $inIndexO=array_values($this->infRulesEntailIndex['o']['null']);
    1274. -
    1275.             if (isset($this->infRulesEntailIndex['o'][$objectLabel])) $inIndexOarray_merge($inIndexO,array_values($this->infRulesEntailIndex['o'][$objectLabel]));
    1276. -
    1277.         else 
    1278. -
    1279.         {
    1280. -
    1281.             $inIndexO=array_keys($this->infRules);
    1282. -
    1283.         }    
    1284. -
    1285.         
    1286. -
    1287.         //if an infrule position occurs in subject, predicate, and object index, add to result array.    
    1288. -
    1289.         foreach ($inIndexP as $positionP)
    1290. -
    1291.         {
    1292. -
    1293.             if (in_array($positionP,$inIndexO))
    1294. -
    1295.                 if (in_array($positionP,$inIndexS))
    1296. -
    1297.                     $return[]=$positionP;
    1298. -
    1299.         }
    1300. -
    1301.         return $return;
    1302. -
    1303.     }
    1304. -
    1305.     
    1306. -
    1307.     /**
    1308. -
    1309.      * Adds an InfRule to the InfModel.
    1310. -
    1311.      * $statementPosition states the positiion of the statement, that created
    1312. -
    1313.      * this rule, in the model->triples array.
    1314. -
    1315.     * 
    1316. -
    1317.     *
    1318. -
    1319.     * @param    object Infrule    $infRule 
    1320. -
    1321.     * @param    integer    $statementPosition 
    1322. -
    1323.     * @access    private
    1324. -
    1325.     */
    1326. -
    1327.     function _addInfRule($infRule$statementPosition)
    1328. -
    1329.     {
    1330. -
    1331.         //add the rule
    1332. -
    1333.         $this->infRules[]=$infRule;            
    1334. -
    1335.         //get the position of the added rule in the model
    1336. -
    1337.         end($this->infRules);
    1338. -
    1339.         $rulePosition=key($this->infRules);
    1340. -
    1341.         //add the information to the index, that this statement 
    1342. -
    1343.         //added this rule.
    1344. -
    1345.         $this->statementRuleIndex[$statementPosition][$rulePosition]=true;
    1346. -
    1347.         //add informations to index over trigger & entailment
    1348. -
    1349.         $this->_addInfruleToIndex($infRule,$rulePosition);
    1350. -
    1351.     }
    1352. -
    1353.  }
    1354. -
    1355. ?>
    1356. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelB.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelB.php.html.svn-base deleted file mode 100755 index 445bd1e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelB.php.html.svn-base +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - File Source for InfModelB.php - - - - - -

    Source for file InfModelB.php

    -

    Documentation is available at InfModelB.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfModelB
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    14. -
    15. * Only the loaded or added base-triples are stored.
    16. -
    17. * A find-query evaluates the inference rules and recursively tries to find the statements.
    18. -
    19. * InfModelB memorises "Dead-Ends" until the next add() command, thus
    20. -
    21. * makin a second find much faster.
    22. -
    23. * InfModelB is safe for loops in Ontologies, that would cause infinite loops.
    24. -
    25. * WARNING: A find(null,null,null) might take very long.
    26. -
    27. *
    28. -
    29. @version  $Id$
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33.  
    34. -
    35. *
    36. -
    37. @package infModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43.  
    44. -
    45. class InfModelB extends InfModel 
    46. -
    47. {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Array that holds combinations of inference rules with distinct
    54. -
    55.     * find-querys, that don't lead to any inference.
    56. -
    57.     *
    58. -
    59.     * @var        array 
    60. -
    61.     * @access    private
    62. -
    63.     */
    64. -
    65.      var $findDeadEnds;
    66. -
    67.      
    68. -
    69.          
    70. -
    71.        /**
    72. -
    73.     * Constructor
    74. -
    75.     * You can supply a base_uri
    76. -
    77.     *
    78. -
    79.     * @param string $baseURI 
    80. -
    81.     * @access    public
    82. -
    83.     */    
    84. -
    85.      function InfModelB($baseURI null)
    86. -
    87.      {
    88. -
    89.          parent::InfModel($baseURI);
    90. -
    91.          $this->findDeadEnds=array();    
    92. -
    93.      }
    94. -
    95.     
    96. -
    97.     /**
    98. -
    99.     * Adds a new triple to the Model without checking, if the statement
    100. -
    101.     * is already in the Model. So if you want a duplicate free Model use
    102. -
    103.     * the addWithoutDuplicates() function (which is slower then add())
    104. -
    105.     *
    106. -
    107.     * @param    object Statement    $statement 
    108. -
    109.     * @access    public
    110. -
    111.     * @throws    PhpError
    112. -
    113.     */     
    114. -
    115.      function add($statement)
    116. -
    117.      {
    118. -
    119.          parent::add($statement);
    120. -
    121.          //Reset the found dead-ends.
    122. -
    123.          $this->findDeadEnds=array();    
    124. -
    125.      }
    126. -
    127.      
    128. -
    129.     /**
    130. -
    131.     * General method to search for triples.
    132. -
    133.     * NULL input for any parameter will match anything.
    134. -
    135.     * Example:  $result = $m->find( NULL, NULL, $node );
    136. -
    137.     * Finds all triples with $node as object.
    138. -
    139.     * Returns an empty MemModel if nothing is found.
    140. -
    141.     * To improve the search speed with big Models, call index(INDEX_TYPE)
    142. -
    143.     * before seaching.
    144. -
    145.      *
    146. -
    147.     * It recursively searches in the statements and rules to find
    148. -
    149.     * matching statements.
    150. -
    151.     *
    152. -
    153.     * @param    object Node    $subject 
    154. -
    155.     * @param    object Node    $predicate 
    156. -
    157.     * @param    object Node    $object 
    158. -
    159.     * @return    object MemModel 
    160. -
    161.     * @access    public
    162. -
    163.     * @throws    PhpError
    164. -
    165.     */
    166. -
    167.     function find($subject,$predicate,$object
    168. -
    169.     {
    170. -
    171.         $searchStringIndex=array();
    172. -
    173.         $resultModel=new MemModel();
    174. -
    175.         
    176. -
    177.         //add all infered statements without duplicates to the result model
    178. -
    179.         foreach ($this->_infFind($subject,$predicate,$object,array())as $statement)
    180. -
    181.         {
    182. -
    183.             $resultModel->addWithoutDuplicates($statement);    
    184. -
    185.         };
    186. -
    187.         return $resultModel;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.      * This is the main inference method of the InfModelB
    196. -
    197.      * The algorithm works as follows:
    198. -
    199.      * Find all statements in the base model, that matches the current
    200. -
    201.      * find-query.
    202. -
    203.      * Check all rules, if they are able to deliver infered statements,
    204. -
    205.      * that match the current find-query. Don't use rules with queries,
    206. -
    207.      * that lead to dead-ends and don't use a rule-query-combination that
    208. -
    209.      * was used before in this branch (ontology loops).
    210. -
    211.      * If a rule is possible do deliver such statements, get a new
    212. -
    213.      * find-query, that is possible to find those statements, that are able
    214. -
    215.      * to trigger this rule.
    216. -
    217.      * Call this _infFind method wirh the new find-query and entail the
    218. -
    219.      * resulting statements.
    220. -
    221.      * If this rule, wasn't able to return any statements with this distinct
    222. -
    223.      * query, add this combination to the dead-ends.
    224. -
    225.      * Return the statements from the base triples and those, which were infered.
    226. -
    227.      *
    228. -
    229.      * If $findOnlyFirstMatching is set to true, only the first match in
    230. -
    231.      * the base-statements is entailed an returned (used in contains() and
    232. -
    233.      * findFirstMatchingStatement() methods).
    234. -
    235.      *
    236. -
    237.      * You can set an offset to look for the first matching statement by setting the
    238. -
    239.      * $offset var.
    240. -
    241.      * 
    242. -
    243.     * It recursively searches in the statements and rules to find matching
    244. -
    245.     * statements
    246. -
    247.     *
    248. -
    249.     * @param    object Node    $subject 
    250. -
    251.     * @param    object Node    $predicate 
    252. -
    253.     * @param    object Node    $object 
    254. -
    255.     * @param    array        $searchStringIndex 
    256. -
    257.     * @param    boolean     $findOnlyFirstMatching 
    258. -
    259.     * @param    integer     $offset 
    260. -
    261.     * @param    integer     $resultCount 
    262. -
    263.     * @return    object array Statements
    264. -
    265.     * @access    private
    266. -
    267.     */
    268. -
    269.     function _infFind ($subject,$predicate,$object$searchStringIndex$findOnlyFirstMatching false$offset 0,$resultCount )
    270. -
    271.     {
    272. -
    273.         $return=array();
    274. -
    275.         //Find all matching statements in the base statements
    276. -
    277.         $findResult=parent::find($subject,$predicate,$object);
    278. -
    279.         //For all found statements
    280. -
    281.         foreach ($findResult->triples as $statement)
    282. -
    283.             {
    284. -
    285.                 $return[]=$statement;
    286. -
    287.                 $resultCount++;
    288. -
    289.  
    290. -
    291.                 //Return, if only the firstMatchingStatement was wanted
    292. -
    293.                 if ($findOnlyFirstMatching && $resultCount $offset)
    294. -
    295.                     return $return;
    296. -
    297.             };
    298. -
    299.             
    300. -
    301.         //Don't infer statements about the schema (rdfs:subClass, etc..)
    302. -
    303.         //is false
    304. -
    305.         if ($predicate == null || 
    306. -
    307.             (is_a($predicate,'Node'&& 
    308. -
    309.             !in_array($predicate->getLabel(),$this->supportedInference))
    310. -
    311.             )
    312. -
    313.             //Check only Rules, that the EntailmentIndex returned.
    314. -
    315.                foreach ($this->_findRuleEntailmentInIndex($subject,$predicate,$objectas $ruleKey)
    316. -
    317.             {
    318. -
    319.                 $infRule=$this->infRules[$ruleKey];
    320. -
    321.                 $serializedRuleStatement=$ruleKey.serialize($subject).serialize($predicate).serialize($object);
    322. -
    323.                 //If it is to ontology loop and no dead-end
    324. -
    325.                 if (!in_array($serializedRuleStatement$searchStringIndex&& 
    326. -
    327.                     !in_array($serializedRuleStatement$this->findDeadEnds))
    328. -
    329.                 {    
    330. -
    331.                     //Keep this distinct rule query cobination for 
    332. -
    333.                     //this branch to detect loops
    334. -
    335.                     $searchStringIndex[]=$serializedRuleStatement;    
    336. -
    337.                     
    338. -
    339.                     //If the rule is able to deliver statements that match 
    340. -
    341.                     //this query
    342. -
    343.                     if ($infRule->checkEntailment($subject,$predicate,$object))
    344. -
    345.                     {
    346. -
    347.                         //Get a modified find-query, that matches statements, 
    348. -
    349.                         //that trigger this rule
    350. -
    351.                         $modefiedFind=$infRule->getModifiedFind($subject,$predicate,$object);
    352. -
    353.                         //Call this method with the new find-query
    354. -
    355.                         $infFindResult=$this->_infFind($modefiedFind['s'],
    356. -
    357.                                                         $modefiedFind['p'],
    358. -
    359.                                                         $modefiedFind['o']
    360. -
    361.                                                         $searchStringIndex
    362. -
    363.                                                         $findOnlyFirstMatching,
    364. -
    365.                                                         $offset,
    366. -
    367.                                                         $resultCount;
    368. -
    369.                         //If it deliverd statements that matches the trigger
    370. -
    371.                         if (isset($infFindResult[0]))
    372. -
    373.                         {
    374. -
    375.                             foreach ($infFindResult as $statement)
    376. -
    377.                             {    
    378. -
    379.                                 //Entail the statements and check, if they are not about the 
    380. -
    381.                                 //ontology
    382. -
    383.                                 $newStatement=$infRule->entail($statement);
    384. -
    385.                                 if (!in_array($newStatement->getLabelPredicate(),$this->supportedInference))
    386. -
    387.                                     //Check if, the entailed statements are, what we are looking for
    388. -
    389.                                     if($this->_nodeEqualsFind($subject,$newStatement->getSubject()) && 
    390. -
    391.                                         $this->_nodeEqualsFind($predicate,$newStatement->getPredicate()) && 
    392. -
    393.                                         $this->_nodeEqualsFind($object,$newStatement->getObject() ) )
    394. -
    395.                                     {
    396. -
    397.                                         //Add to results
    398. -
    399.                                         $return[]=$newStatement;
    400. -
    401.                                         $resultCount++;
    402. -
    403.                                         
    404. -
    405.                                         //or return at once
    406. -
    407.                                         if ($findOnlyFirstMatching && $resultCount $offset)
    408. -
    409.                                             return $return;
    410. -
    411.                                     }
    412. -
    413.                                }
    414. -
    415.                         else 
    416. -
    417.                         {
    418. -
    419.                             //If there were no results of the rule-query-combination, 
    420. -
    421.                             //mark this combination as a dead-end.
    422. -
    423.                             $this->findDeadEnds[]=$serializedRuleStatement;
    424. -
    425.                         }
    426. -
    427.                     }
    428. -
    429.                 }    
    430. -
    431.         }
    432. -
    433.         //Return the array of the found statements
    434. -
    435.         return $return;    
    436. -
    437.     }
    438. -
    439.     
    440. -
    441.      /**
    442. -
    443.     * Tests if the Model contains the given triple.
    444. -
    445.     * TRUE if the triple belongs to the Model;
    446. -
    447.     * FALSE otherwise.
    448. -
    449.     * 
    450. -
    451.     * @param    object Statement    &$statement 
    452. -
    453.     * @return    boolean 
    454. -
    455.     * @access    public
    456. -
    457.     */
    458. -
    459.     function contains(&$statement
    460. -
    461.     {
    462. -
    463.     //throws an error, if $statement is not of class Statement
    464. -
    465.     if(!is_a($statement,'Statement'))
    466. -
    467.         trigger_error(RDFAPI_ERROR '(class: InfModelB; method: contains): 
    468. -
    469.             $statement has to be object of class Statement'E_USER_ERROR);    
    470. -
    471.     
    472. -
    473.     //Call the _infFind method, but let it stop, if it finds the first match.    
    474. -
    475.     if (count$this->_infFind($statement->getSubject(),
    476. -
    477.                                 $statement->getPredicate(),
    478. -
    479.                                 $statement->getObject(),
    480. -
    481.                                 array(),true) ) >0)
    482. -
    483.         {
    484. -
    485.             return true;
    486. -
    487.         else 
    488. -
    489.         {
    490. -
    491.             return false;
    492. -
    493.         };
    494. -
    495.     }
    496. -
    497.     
    498. -
    499.   /**
    500. -
    501.    * Searches for triples and returns the first matching statement.
    502. -
    503.    * NULL input for any parameter will match anything.
    504. -
    505.    * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    506. -
    507.    * Returns the first statement of the MemModel where the object equals $node.
    508. -
    509.    * Returns an NULL if nothing is found.
    510. -
    511.    * You can define an offset to search for. Default = 0
    512. -
    513.    *
    514. -
    515.    * @param    object Node    $subject 
    516. -
    517.    * @param    object Node    $predicate 
    518. -
    519.    * @param    object Node    $object 
    520. -
    521.    * @param    integer    $offset 
    522. -
    523.    * @return    object Statement 
    524. -
    525.    * @access    public
    526. -
    527.    */
    528. -
    529.    function findFirstMatchingStatement($subject$predicate$object$offset 0
    530. -
    531.     {
    532. -
    533.         //Call the _infFind method, but let it stop, if it finds the 
    534. -
    535.         //first match.    
    536. -
    537.            $res$this->_infFind($subject,$predicate,$object,array(),true,$offset);
    538. -
    539.                
    540. -
    541.         if (isset($res[$offset]))
    542. -
    543.         {
    544. -
    545.             return $res[$offset];
    546. -
    547.         else 
    548. -
    549.         {
    550. -
    551.             return NULL;
    552. -
    553.         };
    554. -
    555.     }  
    556. -
    557.  
    558. -
    559.     /**
    560. -
    561.     * Returns a StatementIterator for traversing the Model.
    562. -
    563.     *
    564. -
    565.     * @access    public
    566. -
    567.     * @return    object    StatementIterator 
    568. -
    569.     */  
    570. -
    571.     function getStatementIterator(
    572. -
    573.     {
    574. -
    575.         // Import Package Utility
    576. -
    577.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    578. -
    579.         // Gets a MemModel by executing a find(null,null,null) to get a 
    580. -
    581.         //inferable statements.    
    582. -
    583.         // WARNING: might be slow
    584. -
    585.         return new StatementIterator($this->getMemModel());
    586. -
    587.     }    
    588. -
    589.     
    590. -
    591.     /**
    592. -
    593.     * Number of all inferable triples in the Model.
    594. -
    595.     * WARNING: uses a find(null,null,null) to find all statements! (might take a while)
    596. -
    597.     * 
    598. -
    599.     * @param     boolean 
    600. -
    601.     * @return    integer 
    602. -
    603.     * @access    public
    604. -
    605.     */
    606. -
    607.     function size()
    608. -
    609.     {
    610. -
    611.         // Gets a MemModel by executing a find(null,null,null) to get a 
    612. -
    613.         //inferable statements.    
    614. -
    615.         // WARNING: might be slow
    616. -
    617.            $res $this->getMemModel();
    618. -
    619.            return $res->size();
    620. -
    621.     }
    622. -
    623.         
    624. -
    625.     /**
    626. -
    627.     * Create a MemModel containing all the triples (including inferred
    628. -
    629.     * statements) of the current InfModelB.
    630. -
    631.     *
    632. -
    633.     * @return object MemModel 
    634. -
    635.     * @access public
    636. -
    637.     */
    638. -
    639.     function getMemModel(
    640. -
    641.     {
    642. -
    643.         
    644. -
    645.         $return=$this->find(null,null,null);
    646. -
    647.         $return->setBaseURI($this->baseURI);
    648. -
    649.         $return->addParsedNamespaces($this->getParsedNamespaces());
    650. -
    651.         return $return;
    652. -
    653.     }
    654. -
    655.  
    656. -
    657.     /**
    658. -
    659.     * Create a MemModel containing only the base triples (without inferred
    660. -
    661.     * statements) of the current InfModelB.
    662. -
    663.     *
    664. -
    665.     * @return object MemModel 
    666. -
    667.     * @access public
    668. -
    669.     */
    670. -
    671.     function getBaseMemModel(
    672. -
    673.     {
    674. -
    675.         $returnnew MemModel();
    676. -
    677.         $return->setBaseURI($this->baseURI);
    678. -
    679.         foreach ($this->triples as $statement)
    680. -
    681.             $return->add($statement);
    682. -
    683.             
    684. -
    685.         $retun->addParsedNamespaces($this->getParsedNamespaces());
    686. -
    687.         return $return;
    688. -
    689.     }
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.     * Short Dump of the  InfModelB.
    696. -
    697.     *
    698. -
    699.     * @access    public
    700. -
    701.     * @return    string 
    702. -
    703.     */  
    704. -
    705.     function toString(
    706. -
    707.     {
    708. -
    709.        return 'InfModelB[baseURI=' $this->getBaseURI(';  size=' $this->size(true']';
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.     /**
    716. -
    717.     * Dumps of the InfModelB including ALL inferable triples.
    718. -
    719.     *
    720. -
    721.     * @access    public
    722. -
    723.     * @return    string 
    724. -
    725.     */  
    726. -
    727.     function toStringIncludingTriples(
    728. -
    729.     {
    730. -
    731.            $dump $this->toString(chr(13);
    732. -
    733.            $stateIt=new StatementIterator($this->find(null,null,null));
    734. -
    735.         while($statement=$stateIt->next())
    736. -
    737.         {
    738. -
    739.                $dump .= $statement->toString(chr(13);
    740. -
    741.            }
    742. -
    743.            return $dump;
    744. -
    745.     }  
    746. -
    747.  
    748. -
    749.     /**
    750. -
    751.     * Saves the RDF,N3 or N-Triple serialization of the full InfModelB
    752. -
    753.     * (including inferred triples) to a file.
    754. -
    755.     * You can decide to which format the model should be serialized by
    756. -
    757.     * using a corresponding suffix-string as $type parameter. If no $type
    758. -
    759.     * parameter is placed this method will serialize the model to XML/RDF
    760. -
    761.     * format.
    762. -
    763.     * Returns FALSE if the InfModelB couldn't be saved to the file.
    764. -
    765.     *
    766. -
    767.     * @access    public
    768. -
    769.     * @param     string     $filename 
    770. -
    771.     * @param     string     $type 
    772. -
    773.     * @throws   PhpError
    774. -
    775.     * @return    boolean 
    776. -
    777.     */  
    778. -
    779.     function saveAs($filename$type ='rdf'
    780. -
    781.     {
    782. -
    783.     
    784. -
    785.         $memmodel=$this->getMemModel();
    786. -
    787.         return $memmodel->saveAs($filename$type);
    788. -
    789.     
    790. -
    791.  
    792. -
    793.     /**
    794. -
    795.     * Writes the RDF serialization of the Model including ALL inferable
    796. -
    797.     * triples as HTML.
    798. -
    799.     *
    800. -
    801.     * @access    public
    802. -
    803.     */  
    804. -
    805.     function writeAsHtml(
    806. -
    807.     {
    808. -
    809.             require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    810. -
    811.         $ser new RdfSerializer();
    812. -
    813.         $rdf =$ser->serialize($this->getMemModel());
    814. -
    815.         $rdf htmlspecialchars($rdfENT_QUOTES);
    816. -
    817.         $rdf str_replace(' ''&nbsp;'$rdf);
    818. -
    819.         $rdf nl2br($rdf);
    820. -
    821.         echo $rdf
    822. -
    823.     }  
    824. -
    825.  
    826. -
    827.     /**
    828. -
    829.     * Writes the RDF serialization of the Model including ALL inferable
    830. -
    831.     * triples as HTML table.
    832. -
    833.     *
    834. -
    835.     * @access    public
    836. -
    837.     */  
    838. -
    839.     function writeAsHtmlTable(
    840. -
    841.     {
    842. -
    843.             // Import Package Utility
    844. -
    845.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);               
    846. -
    847.         RDFUtil::writeHTMLTable($this->getMemModel());
    848. -
    849.     }  
    850. -
    851.     
    852. -
    853.     
    854. -
    855.     /**
    856. -
    857.     * Writes the RDF serialization of the Model including ALL inferable
    858. -
    859.     * triples.
    860. -
    861.     *
    862. -
    863.     * @access    public
    864. -
    865.     * @return    string 
    866. -
    867.     */  
    868. -
    869.     function writeRdfToString(
    870. -
    871.     {
    872. -
    873.            // Import Package Syntax
    874. -
    875.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);           
    876. -
    877.         $ser new RdfSerializer();
    878. -
    879.         $rdf =$ser->serialize($this->getMemModel());
    880. -
    881.         return $rdf;
    882. -
    883.     }    
    884. -
    885.  
    886. -
    887.     /**
    888. -
    889.     * Removes the triple from the MemModel.
    890. -
    891.     * TRUE if the triple is removed.
    892. -
    893.     * FALSE otherwise.
    894. -
    895.     *
    896. -
    897.     * Checks, if it touches any statements, that added inference rules
    898. -
    899.     * to the model.
    900. -
    901.     *
    902. -
    903.     * @param    object Statement    $statement 
    904. -
    905.     * @return   boolean 
    906. -
    907.     * @access    public
    908. -
    909.     * @throws    PhpError
    910. -
    911.     */
    912. -
    913.     function remove($statement)
    914. -
    915.     {
    916. -
    917.         if (parent::contains($statement))
    918. -
    919.         {
    920. -
    921.             if (in_array($statement->getLabelPredicate(),$this->supportedInference));
    922. -
    923.                 while (count($this->_removeFromInference($statement))>0);
    924. -
    925.                 
    926. -
    927.             $this->findDeadEnds=array();
    928. -
    929.             return parent::remove($statement);
    930. -
    931.         else 
    932. -
    933.         {
    934. -
    935.             return false;
    936. -
    937.         }
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     /**
    944. -
    945.     * Checks, if a single node matches a single find pattern.
    946. -
    947.     * TRUE if the node matches.
    948. -
    949.     * FALSE otherwise.
    950. -
    951.     *
    952. -
    953.     * Checks, if it touches any statements, that added inference rules
    954. -
    955.     * to the model.
    956. -
    957.     *
    958. -
    959.     * @param    object Statement    $statement 
    960. -
    961.     * @return   boolean 
    962. -
    963.     * @access    private
    964. -
    965.     */
    966. -
    967.     function _nodeEqualsFind($find$node)
    968. -
    969.     {
    970. -
    971.         //If the find pattern is a node, use the nodes equal-method and 
    972. -
    973.         //return the result.
    974. -
    975.         if (is_a($find,'Node'))
    976. -
    977.             return $node->equals($find);
    978. -
    979.         
    980. -
    981.         //Null-pattern matches anything.
    982. -
    983.         if ($find == null)
    984. -
    985.         {
    986. -
    987.             return true;
    988. -
    989.         else 
    990. -
    991.         {
    992. -
    993.             return false;
    994. -
    995.         }
    996. -
    997.     }
    998. -
    999.     
    1000. -
    1001.     /**
    1002. -
    1003.     * Returns a FindIterator for traversing the MemModel.
    1004. -
    1005.     * Disabled in InfModelB.
    1006. -
    1007.     *
    1008. -
    1009.     * @access    public
    1010. -
    1011.     * @return    object    FindIterator 
    1012. -
    1013.     */  
    1014. -
    1015.     function findAsIterator($sub=null,$pred=null,$obj=null{
    1016. -
    1017.         $errmsg RDFAPI_ERROR '(class: InfModelB; method: findAsIterator): 
    1018. -
    1019.                                     This function is disabled in the
    1020. -
    1021.                                     Inference Model';
    1022. -
    1023.         trigger_error($errmsgE_USER_ERROR)
    1024. -
    1025.     }      
    1026. -
    1027. }
    1028. -
    1029. ?>
    1030. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:27 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelF.php.html.svn-base deleted file mode 100755 index 7f0da94d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfModelF.php.html.svn-base +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - File Source for InfModelF.php - - - - - -

    Source for file InfModelF.php

    -

    Documentation is available at InfModelF.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfModelF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    14. -
    15. * If a new statement is added, it is enferd at
    16. -
    17. * once and all the entailed statements are added too.
    18. -
    19. * When adding or removing a statement, that produced a new inference rule,
    20. -
    21. * all entailed statements are discarded and the whole base model is infered
    22. -
    23. * again.
    24. -
    25. * The InfModelF is safe for loops in Ontologies, that would cause infinite loops.
    26. -
    27. *
    28. -
    29. @version  $Id$
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33.  
    34. -
    35. *
    36. -
    37. @package infModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43.  
    44. -
    45. class InfModelF extends InfModel 
    46. -
    47. {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Array that holds the position of the infered statements in the model.
    54. -
    55.     *
    56. -
    57.     * @var        array 
    58. -
    59.     * @access    private
    60. -
    61.     */    
    62. -
    63.     var $infPos;
    64. -
    65.     
    66. -
    67.     
    68. -
    69.     /**
    70. -
    71.     * Variable that influences the habbit when adding statements.
    72. -
    73.     * Used by the loadModel method to increase performance.
    74. -
    75.     *
    76. -
    77.     * @var        boolean 
    78. -
    79.     * @access    private
    80. -
    81.     */
    82. -
    83.     var $inferenceEnabled;
    84. -
    85.     
    86. -
    87.         
    88. -
    89.        /**
    90. -
    91.     * Constructor
    92. -
    93.     * You can supply a base_uri.
    94. -
    95.     *
    96. -
    97.     * @param string $baseURI 
    98. -
    99.     * @access    public
    100. -
    101.     */        
    102. -
    103.     function InfModelF($baseURI NULL)
    104. -
    105.     {
    106. -
    107.         parent::InfModel($baseURI);
    108. -
    109.         $this->infPos=array();
    110. -
    111.         $this->inferenceEnabled=true;    
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Adds a new triple to the MemModel without checking if the statement
    120. -
    121.     * is already in the MemModel.
    122. -
    123.     * So if you want a duplicate free MemModel use the addWithoutDuplicates()
    124. -
    125.     * function (which is slower then add())
    126. -
    127.     * The statement is infered and all entailed statements are added.
    128. -
    129.     *
    130. -
    131.     * @param    object Statement    $statement 
    132. -
    133.     * @access    public
    134. -
    135.     * @throws    PhpError
    136. -
    137.     */
    138. -
    139.     function add ($statement)
    140. -
    141.     {
    142. -
    143.         parent::add($statement);
    144. -
    145.         if ($this->inferenceEnabled)
    146. -
    147.         {
    148. -
    149.             foreach ($this->entailStatement($statementas $state)
    150. -
    151.             {
    152. -
    153.                 //a addWithoutDublicates construct
    154. -
    155.                 if(!$this->contains($state))
    156. -
    157.                 {
    158. -
    159.             
    160. -
    161.                     parent::add($state);
    162. -
    163.                     //save the position of the infered statements
    164. -
    165.                     end($this->triples);
    166. -
    167.                     $this->infPos[]=key($this->triples);
    168. -
    169.                 };
    170. -
    171.             }
    172. -
    173.         //apply the complete inference to the model, if the added statement was able to add a rule
    174. -
    175.         if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    176. -
    177.             $this->applyInference();
    178. -
    179.         }
    180. -
    181.     }
    182. -
    183.     
    184. -
    185.  
    186. -
    187.     /**
    188. -
    189.     * Checks if a new statement is already in the MemModel and adds
    190. -
    191.     * the statement, if it is not in the MemModel.
    192. -
    193.     * addWithoutDuplicates() is significantly slower then add().
    194. -
    195.     * Retruns TRUE if the statement is added.
    196. -
    197.     * FALSE otherwise.
    198. -
    199.     * The statement is infered and all entailed statements are added.
    200. -
    201.     *
    202. -
    203.     * @param    object Statement    $statement 
    204. -
    205.     * @return   boolean 
    206. -
    207.     * @access    public
    208. -
    209.     * @throws    PhpError
    210. -
    211.     */    
    212. -
    213.      function addWithoutDuplicates($statement
    214. -
    215.      {
    216. -
    217.         if(!$this->contains($statement))
    218. -
    219.         {
    220. -
    221.              parent::add($statement);
    222. -
    223.              if ($this->inferenceEnabled)
    224. -
    225.              {
    226. -
    227.                 foreach ($this->entailStatement($statementas $statement)
    228. -
    229.                 {
    230. -
    231.                     if(!$this->contains($statement))
    232. -
    233.                         {
    234. -
    235.                             parent::add($statement);
    236. -
    237.                             //save the position of the infered statements
    238. -
    239.                             end($this->triples);
    240. -
    241.                             $this->infPos[]=key($this->triples);
    242. -
    243.                         };
    244. -
    245.                 };
    246. -
    247.             if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    248. -
    249.                 $this->applyInference();
    250. -
    251.              }
    252. -
    253.             return true;
    254. -
    255.          }
    256. -
    257.          return false;
    258. -
    259.      }
    260. -
    261.  
    262. -
    263.     
    264. -
    265.  
    266. -
    267.     /**
    268. -
    269.     * Entails every statement and adds the entailments if not already
    270. -
    271.     * in the model.
    272. -
    273.     *
    274. -
    275.     * @access    private
    276. -
    277.     */        
    278. -
    279.     function applyInference()
    280. -
    281.     {
    282. -
    283.         //check every statement in the model
    284. -
    285.         foreach ($this->triples as $statement)
    286. -
    287.         {
    288. -
    289.             //gat all statements, that it recursively entails
    290. -
    291.             foreach ($this->entailStatement($statementas $statement)
    292. -
    293.             {
    294. -
    295.                 if (!$this->contains($statement))
    296. -
    297.                 {
    298. -
    299.                     parent::add($statement);
    300. -
    301.                     //add the InfStatement position to the index
    302. -
    303.                     end($this->triples);
    304. -
    305.                     $this->infPos[]=key($this->triples);
    306. -
    307.                 };
    308. -
    309.             };
    310. -
    311.         };
    312. -
    313.     }
    314. -
    315.     
    316. -
    317.  
    318. -
    319.     /**
    320. -
    321.     * Entails a statement by recursively using the _entailStatementRec
    322. -
    323.     * method.
    324. -
    325.     * 
    326. -
    327.     * @param    object Statement    $statement 
    328. -
    329.     * @return   array of statements
    330. -
    331.     * @access    public
    332. -
    333.     */            
    334. -
    335.     function entailStatement ($statement)
    336. -
    337.     {
    338. -
    339.         $infStatementsIndex=array();
    340. -
    341.         return $this->_entailStatementRec($statement,$infStatementsIndex);
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Recursive method, that checks the statement with the trigger of
    350. -
    351.     * every rule. If the trigger matches and entails new statements,
    352. -
    353.     * those statements are recursively infered too.
    354. -
    355.     * The $infStatementsIndex array holds lready infered statements
    356. -
    357.     * to prevent infinite loops.
    358. -
    359.     *
    360. -
    361.     * 
    362. -
    363.     * @param    object Statement $statement 
    364. -
    365.     * @param    array $infStatementsIndex 
    366. -
    367.     * @return   array of statements
    368. -
    369.     * @access    private
    370. -
    371.     */
    372. -
    373.     function _entailStatementRec $statement,$infStatementsIndex)
    374. -
    375.     {
    376. -
    377.         $infStatements array();
    378. -
    379.         $return array();
    380. -
    381.         
    382. -
    383.         //dont entail statements about the supported inference-schema
    384. -
    385.         if (!in_array($statement->getLabelPredicate(),$this->supportedInference))
    386. -
    387.         {
    388. -
    389.             //check only the rules, that were returned by the index
    390. -
    391.             foreach ($this->_findRuleTriggerInIndex($statementas $key )
    392. -
    393.             {
    394. -
    395.                 $infRule=$this->infRules[$key];
    396. -
    397.     
    398. -
    399.                 $stateString=$key.serialize($statement);
    400. -
    401.                 //If the statement wasn't infered before
    402. -
    403.                 if (!in_array($stateString,$infStatementsIndex))
    404. -
    405.                 {
    406. -
    407.                     $infStatementsIndex[]=$stateString;
    408. -
    409.                     //Check, if the Statements triggers this rule
    410. -
    411.                     if($infRule->checkTrigger($statement))
    412. -
    413.                     {
    414. -
    415.                         $infStatement=$infRule->entail($statement);
    416. -
    417.                         #if(!$this->contains($infStatement))
    418. -
    419.                         {
    420. -
    421.                             $return[]=$infStatement;
    422. -
    423.                             $return=array_merge($return,
    424. -
    425.                                                 $this->_entailStatementRec($infStatement
    426. -
    427.                                                                             $infStatementsIndex));
    428. -
    429.                         };    
    430. -
    431.                                                                         
    432. -
    433.                     };
    434. -
    435.                 };
    436. -
    437.             };
    438. -
    439.         };    
    440. -
    441.         return $return;
    442. -
    443.     }
    444. -
    445.     
    446. -
    447.     /**
    448. -
    449.     * Removes all infered statements from the model but keeps the
    450. -
    451.     * infernece rules.
    452. -
    453.     *
    454. -
    455.     * @access    public
    456. -
    457.     */     
    458. -
    459.     function removeInfered()
    460. -
    461.     {
    462. -
    463.         $indexTmp=$this->indexed;
    464. -
    465.         $this->index(-1);
    466. -
    467.         foreach ($this->infPos as $key)
    468. -
    469.         {
    470. -
    471.             unset($this->triples[$key]);
    472. -
    473.         };
    474. -
    475.         $this->infPos=array();
    476. -
    477.         $this->index($indexTmp);
    478. -
    479.     }    
    480. -
    481.      
    482. -
    483.      
    484. -
    485.     /**
    486. -
    487.     * Load a model from a file containing RDF, N3 or N-Triples.
    488. -
    489.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    490. -
    491.     * calls a suitable parser, if no $type is given as string
    492. -
    493.     * ("rdf" "n3" "nt");
    494. -
    495.     * If the model is not empty, the contents of the file is added to
    496. -
    497.     * this DbModel.
    498. -
    499.     *
    500. -
    501.     * While loading the model, the inference entailing is disabled, but
    502. -
    503.     * new inference rules are added to increase performance.
    504. -
    505.     * 
    506. -
    507.     * @param     string     $filename 
    508. -
    509.     * @param     string     $type 
    510. -
    511.     * @access    public
    512. -
    513.     */
    514. -
    515.     function load($filename$type NULL
    516. -
    517.     {
    518. -
    519.         //Disable entailing to increase performance
    520. -
    521.          $this->inferenceEnabled=false;
    522. -
    523.          parent::load($filename$type);
    524. -
    525.          //Enable entailing
    526. -
    527.          $this->inferenceEnabled=true;
    528. -
    529.          //Entail all statements
    530. -
    531.          $this->applyInference();
    532. -
    533.      }
    534. -
    535.     
    536. -
    537.     /**
    538. -
    539.     * Short Dump of the InfModelF.
    540. -
    541.     *
    542. -
    543.     * @access    public
    544. -
    545.     * @return    string 
    546. -
    547.     */  
    548. -
    549.     function toString({
    550. -
    551.        return 'InfModelF[baseURI=' $this->getBaseURI(';  
    552. -
    553.                    size=' $this->size(true']';
    554. -
    555.     }
    556. -
    557.         
    558. -
    559.     /**
    560. -
    561.     * Create a MemModel containing all the triples (including inferred
    562. -
    563.     * statements) of the current InfModelF.
    564. -
    565.     *
    566. -
    567.     * @return object MemModel 
    568. -
    569.     * @access public
    570. -
    571.     */
    572. -
    573.     function getMemModel(
    574. -
    575.     {
    576. -
    577.         $returnnew MemModel();
    578. -
    579.         $return->setBaseURI($this->baseURI);
    580. -
    581.         foreach ($this->triples as $statement)
    582. -
    583.             $return->add($statement);
    584. -
    585.         
    586. -
    587.         $return->addParsedNamespaces($this->getParsedNamespaces());    
    588. -
    589.         return $return;
    590. -
    591.     }
    592. -
    593.       
    594. -
    595.     /**
    596. -
    597.     * Create a MemModel containing only the base triples
    598. -
    599.     * (without inferred statements) of the current InfModelF.
    600. -
    601.     *
    602. -
    603.     * @return object MemModel 
    604. -
    605.     * @access public
    606. -
    607.     */
    608. -
    609.     function  getBaseMemModel(
    610. -
    611.     {
    612. -
    613.         $returnnew MemModel();
    614. -
    615.         $return->setBaseURI($this->baseURI);
    616. -
    617.         foreach ($this->triples as $key => $statement)
    618. -
    619.             if (!in_array($key,$this->infPos))
    620. -
    621.                 $return->add($statement);
    622. -
    623.         $retun->addParsedNamespaces($this->getParsedNamespaces());
    624. -
    625.         return $return;
    626. -
    627.     }
    628. -
    629.     
    630. -
    631.     
    632. -
    633.     /**
    634. -
    635.     * Removes the triple from the MemModel.
    636. -
    637.     * TRUE if the triple is removed.
    638. -
    639.     * FALSE otherwise.
    640. -
    641.     *
    642. -
    643.     * Checks, if it touches any statements, that added inference rules
    644. -
    645.     * to the model
    646. -
    647.     *
    648. -
    649.     * @param    object Statement    $statement 
    650. -
    651.     * @return   boolean 
    652. -
    653.     * @access    public
    654. -
    655.     * @throws    PhpError
    656. -
    657.     */
    658. -
    659.     function remove($statement)
    660. -
    661.     {
    662. -
    663.         //If the statement is in the model
    664. -
    665.         if($this->contains($statement))
    666. -
    667.         {
    668. -
    669.             $inferenceRulesWereTouched=false;
    670. -
    671.             //If the statement was able to add inference rules
    672. -
    673.             if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    674. -
    675.             {
    676. -
    677.                 $statementPositions=$this->_removeFromInference($statement);
    678. -
    679.                 $inferenceRulesWereTouched=true;
    680. -
    681.             else 
    682. -
    683.             //get the position of all matching statements
    684. -
    685.             {
    686. -
    687.                 $statementPositions=array();
    688. -
    689.                 //find the positions of the statements
    690. -
    691.                 $statementPosition=-1;
    692. -
    693.                 do
    694. -
    695.                 {
    696. -
    697.                     
    698. -
    699.                     $statementPosition =
    700. -
    701.                     $this->findFirstMatchOff($statement->getSubject(),
    702. -
    703.                                                 $statement->getPredicate(),
    704. -
    705.                                                 $statement->getObject(),
    706. -
    707.                                                 $statementPosition+1);
    708. -
    709.                                                 
    710. -
    711.                     if ($statementPosition!=-1)
    712. -
    713.                         $statementPositions[]=$statementPosition;                            
    714. -
    715.                                                 
    716. -
    717.                 }    while ($statementPosition != -1);            
    718. -
    719.             }
    720. -
    721.             
    722. -
    723.             //remove matching statements
    724. -
    725.             parent::remove($statement);
    726. -
    727.             foreach ($statementPositions as $statementPosition)
    728. -
    729.             {
    730. -
    731.                 //if the statement was infered, remove it from the index of the infered statements.
    732. -
    733.                 if (in_array($statementPosition,$this->infPos))
    734. -
    735.                     unset ($this->infPos[$statementPosition]);
    736. -
    737.             }
    738. -
    739.             if ($inferenceRulesWereTouched)
    740. -
    741.             {
    742. -
    743.                 //remove the statement and re-entail the model
    744. -
    745.                 $this->removeInfered();
    746. -
    747.                 $this->applyInference();
    748. -
    749.             }
    750. -
    751.             return true;
    752. -
    753.         else 
    754. -
    755.         {
    756. -
    757.             return false;    
    758. -
    759.         }
    760. -
    761.     }
    762. -
    763.     
    764. -
    765.     /** 
    766. -
    767.     * Adds another model to this MemModel.
    768. -
    769.     * Duplicate statements are not removed.
    770. -
    771.     * If you don't want duplicates, use unite().
    772. -
    773.     * If any statement of the model to be added to this model contains a blankNode
    774. -
    775.     * with an identifier already existing in this model, a new blankNode is generated.
    776. -
    777.     *
    778. -
    779.     * @param    object Model    $model 
    780. -
    781.     * @access    public
    782. -
    783.     * @throws phpErrpr
    784. -
    785.     *
    786. -
    787.     */
    788. -
    789.     function addModel(&$model)  
    790. -
    791.     {
    792. -
    793.         //Disable entailing to increase performance
    794. -
    795.          $this->inferenceEnabled=false;
    796. -
    797.          parent::addModel($model);
    798. -
    799.          //Enable entailing
    800. -
    801.          $this->inferenceEnabled=true;
    802. -
    803.          //Entail all statements
    804. -
    805.          $this->applyInference();
    806. -
    807.     }
    808. -
    809. };
    810. -
    811. ?>
    812. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfRule.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfRule.php.html.svn-base deleted file mode 100755 index 95b117f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfRule.php.html.svn-base +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - File Source for InfRule.php - - - - - -

    Source for file InfRule.php

    -

    Documentation is available at InfRule.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfRule
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * This class represents a single rule in a RDFS inference model.
    14. -
    15.  * It primary constists of a trigger and an entailment.
    16. -
    17.  * In the forward-chaining mode (RDFSFModel) a statement is checked,
    18. -
    19.  * if it satisfies the trigger. If it does, a new statement is returned.
    20. -
    21.  * In the backward-chaining mode (RDFSBModel) a find-query is checked
    22. -
    23.  * with the entailment. If this entailment could satify the find-query,
    24. -
    25.  * a new find-query is returned, that searches for statements that
    26. -
    27.  * satisfy the trigger of this rule.
    28. -
    29.  * 
    30. -
    31.  * @version  $Id$
    32. -
    33.  * @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35.  
    36. -
    37.  *
    38. -
    39.  * @package infModel
    40. -
    41.  * @access    public
    42. -
    43.  ***/
    44. -
    45.  
    46. -
    47. class InfRule 
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Array, that hold the trigger subject in key ['s'], the trigger
    56. -
    57.     * predicate in ['p'], and the trigger object in ['o'].
    58. -
    59.     * The array values can be NULL to match anything or be a node that
    60. -
    61.     * has to be matched.
    62. -
    63.     *
    64. -
    65.     * @var        array 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $trigger;
    72. -
    73.  
    74. -
    75.     /**
    76. -
    77.     * Array, that hold the entailment subject in key ['s'], the
    78. -
    79.     * entailment predicate in ['p'], and the entailment object in ['o'].
    80. -
    81.     * The array values can be a node that will be inserted in the
    82. -
    83.     * returning statement, or '<s>' to insert the subject,'<p>' to insert
    84. -
    85.     * the predicate, or '<o>' to insert the object of the checked statement
    86. -
    87.     * to this position in the new returned statement.
    88. -
    89.     *
    90. -
    91.     * @var        array 
    92. -
    93.     * @access    private
    94. -
    95.     */    
    96. -
    97.      var $entailment;
    98. -
    99.     
    100. -
    101.      
    102. -
    103.    /**
    104. -
    105.     * Constructor
    106. -
    107.     * 
    108. -
    109.     * 
    110. -
    111.     * @access    public
    112. -
    113.     */         
    114. -
    115.      function infRule()
    116. -
    117.      {
    118. -
    119.         //initialising vars
    120. -
    121.         $this->trigger=array();
    122. -
    123.         $this->entailment=array();
    124. -
    125.      }
    126. -
    127.      
    128. -
    129.      /**
    130. -
    131.     * Sets the trigger of this rule
    132. -
    133.     * The values can be NULL to match anything or be a node that has to
    134. -
    135.     * be matched.
    136. -
    137.     *
    138. -
    139.     * @param    object Node OR NULL    $subject
    140. -
    141.        * @param    object Node OR NULL    $predicate
    142. -
    143.        * @param    object Node OR NULL    $object
    144. -
    145.     * @access    public
    146. -
    147.     * @throws    PhpError
    148. -
    149.     */    
    150. -
    151.      function setTrigger ($subject$predicate$object)
    152. -
    153.      {
    154. -
    155.          //throw an error if subject, predicate, or object are neither 
    156. -
    157.          //node, nor null.
    158. -
    159.         if(!is_a($subject,'Node'&& $subject != null
    160. -
    161.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    162. -
    163.                 setTrigger): $subject has to be null or of class Node'
    164. -
    165.                 E_USER_ERROR);
    166. -
    167.         if(!is_a($predicate,'Node'&& $predicate != null
    168. -
    169.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    170. -
    171.                 setTrigger): $predicate has to be null or of class Node'
    172. -
    173.                 E_USER_ERROR);
    174. -
    175.         if(!is_a($object,'Node'&& $object != null
    176. -
    177.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    178. -
    179.                 setTrigger): $object has to be null or of class Node'
    180. -
    181.                 E_USER_ERROR);
    182. -
    183.              
    184. -
    185.          //set the trigger
    186. -
    187.         $this->trigger['s']=$subject;
    188. -
    189.         $this->trigger['p']=$predicate;
    190. -
    191.         $this->trigger['o']=$object;        
    192. -
    193.      
    194. -
    195.  
    196. -
    197.      /**
    198. -
    199.     * Sets the entailment of this rule
    200. -
    201.     * The values can be NULL to match anything or be a node that has to
    202. -
    203.     * be matched.
    204. -
    205.     *
    206. -
    207.     * @param    object Node OR NULL    $subject
    208. -
    209.        * @param    object Node OR NULL    $predicate
    210. -
    211.        * @param    object Node OR NULL    $object
    212. -
    213.     * @access    public
    214. -
    215.     * @throws    PhpError
    216. -
    217.     */         
    218. -
    219.     function setEntailment($subject,$predicate,$object)
    220. -
    221.     {
    222. -
    223.         //throw an error if subject, predicate, or object are neither node, 
    224. -
    225.         //nor <s>,<p>,<o>.
    226. -
    227.         if(!is_a($subject,'Node'&& !ereg('<[spo]>'$subject)) 
    228. -
    229.             trigger_error(RDFAPI_ERROR '(class: Infrule; method:  
    230. -
    231.                 setEntailment): $subject has to be <s>,<p>,or <o> or of class Node'
    232. -
    233.                 E_USER_ERROR);
    234. -
    235.         if(!is_a($predicate,'Node'&& !ereg('<[spo]>'$predicate)) 
    236. -
    237.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    238. -
    239.                 setEntailment): $predicate has to be <s>,<p>,or <o> or of class Node'
    240. -
    241.                 E_USER_ERROR);
    242. -
    243.         if(!is_a($object,'Node'&& !ereg('<[spo]>'$object)) 
    244. -
    245.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    246. -
    247.                 setEntailment): $object has to be <s>,<p>,or <o> or of class Node'
    248. -
    249.                 E_USER_ERROR);
    250. -
    251.         
    252. -
    253.         $this->entailment['s']=$subject;    
    254. -
    255.         $this->entailment['p']=$predicate;
    256. -
    257.         $this->entailment['o']=$object;
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.      /**
    264. -
    265.     * Checks, if the statement satisfies the trigger.
    266. -
    267.     *
    268. -
    269.        * @param    object Statement 
    270. -
    271.     * @return     boolean 
    272. -
    273.     * @access    public
    274. -
    275.     * @throws    PhpError
    276. -
    277.     */
    278. -
    279.      function checkTrigger($statement)
    280. -
    281.      {    
    282. -
    283.          //is true, if the trigger is null to match anything 
    284. -
    285.          //or equals the statement's subject
    286. -
    287.          $shouldFireS =     $this->trigger['s'==  null || 
    288. -
    289.                          $this->trigger['s']->equals($statement->getSubject());
    290. -
    291.                          
    292. -
    293.          //is true, if the trigger is null to match anything 
    294. -
    295.          //or equals the statement's predicate
    296. -
    297.          $shouldFireP =     $this->trigger['p'==  null || 
    298. -
    299.                          $this->trigger['p']->equals($statement->getPredicate());
    300. -
    301.  
    302. -
    303.          //is true, if the trigger is null to match anything 
    304. -
    305.          //or equals the statement's object
    306. -
    307.          $shouldFireO =     $this->trigger['o'==  null || 
    308. -
    309.                          $this->trigger['o']->equals($statement->getObject());
    310. -
    311.  
    312. -
    313.          //returns true, if ALL are true
    314. -
    315.          return $shouldFireS && $shouldFireP && $shouldFireO;
    316. -
    317.      }
    318. -
    319.  
    320. -
    321.      /**
    322. -
    323.     * Checks, if this rule could entail a statement that matches
    324. -
    325.     * a find of $subject,$predicate,$object.
    326. -
    327.     *
    328. -
    329.        * @param    object Statement 
    330. -
    331.     * @return     boolean 
    332. -
    333.     * @access    public
    334. -
    335.     * @throws    PhpError
    336. -
    337.     */     
    338. -
    339.      function checkEntailment ($subject$predicate$object)
    340. -
    341.      {
    342. -
    343.         //true, if $subject is null, the entailment's subject matches
    344. -
    345.         //anything, or the $subject equals the entailment-subject.
    346. -
    347.          $matchesS=    $subject ==  null ||
    348. -
    349.                      !is_a($this->entailment['s'],'Node'||
    350. -
    351.                      $this->entailment['s']->equals($subject);
    352. -
    353.  
    354. -
    355.         //true, if $predicate is null, the entailment's predicate matches 
    356. -
    357.         //anything, or the $predicate equals the entailment-predicate.                     
    358. -
    359.          $matchesP=    $predicate ==  null ||
    360. -
    361.                      !is_a($this->entailment['p'],'Node'||
    362. -
    363.                      $this->entailment['p']->equals($predicate);
    364. -
    365.  
    366. -
    367.         //true, if $object is null, the entailment's object matches 
    368. -
    369.         //anything, or the $object equals the entailment-object.                                          
    370. -
    371.         $matchesO=    $object ==  null ||
    372. -
    373.                      !is_a($this->entailment['o'],'Node'||
    374. -
    375.                      $this->entailment['o']->equals($object);
    376. -
    377.           
    378. -
    379.          //returns true, if ALL are true
    380. -
    381.          return $matchesS && $matchesP && $matchesO;
    382. -
    383.     }
    384. -
    385.     
    386. -
    387.      /**
    388. -
    389.     * Returns a infered InfStatement by evaluating the statement with
    390. -
    391.     * the entailment rule.
    392. -
    393.     *
    394. -
    395.        * @param    object Statement 
    396. -
    397.     * @return     object InfStatement 
    398. -
    399.     * @access    public
    400. -
    401.     * @throws    PhpError
    402. -
    403.     */      
    404. -
    405.      function entail($statement)
    406. -
    407.      {
    408. -
    409.          //if the entailment's subject is <s>,<p>,or <o>, put the statements 
    410. -
    411.          //subject,predicate,or object into the subject of the 
    412. -
    413.          //entailed statement. If the entailment's subject is a node, 
    414. -
    415.          //add that node to the statement.    
    416. -
    417.          switch ($this->entailment['s'])
    418. -
    419.         {
    420. -
    421.         case '<s>':
    422. -
    423.              $entailedSubject=$statement->getSubject();
    424. -
    425.          break;
    426. -
    427.         case '<p>':
    428. -
    429.              $entailedSubject=$statement->getPredicate();
    430. -
    431.         break;    
    432. -
    433.          case '<o>':
    434. -
    435.              $entailedSubject=$statement->getObject();
    436. -
    437.          break;
    438. -
    439.         default:
    440. -
    441.              $entailedSubject=$this->entailment['s'];
    442. -
    443.         };
    444. -
    445.         
    446. -
    447.          //if the entailment's predicate is <s>,<p>,or <o>, put the 
    448. -
    449.          //statements subject,predicate,or object into the predicate of 
    450. -
    451.          //the entailed statement. If the entailment's predicate is a node, 
    452. -
    453.          //add that node to the statement.            
    454. -
    455.         switch ($this->entailment['p'])
    456. -
    457.         {
    458. -
    459.         case '<s>':
    460. -
    461.              $entailedPredicate=$statement->getSubject();
    462. -
    463.          break;
    464. -
    465.         case '<p>':
    466. -
    467.              $entailedPredicate=$statement->getPredicate();
    468. -
    469.          break;    
    470. -
    471.          case '<o>':
    472. -
    473.              $entailedPredicate=$statement->getObject();
    474. -
    475.          break;
    476. -
    477.         default:
    478. -
    479.              $entailedPredicate=$this->entailment['p'];
    480. -
    481.         };
    482. -
    483.         
    484. -
    485.          //if the entailment's object is <s>,<p>,or <o>, put the 
    486. -
    487.          //statements subject,predicate,or object into the object of 
    488. -
    489.          //the entailed statement. If the entailment's object is a node,
    490. -
    491.          //add that node to the statement.            
    492. -
    493.         switch ($this->entailment['o'])
    494. -
    495.         {
    496. -
    497.         case '<s>':
    498. -
    499.              $entailedObject=$statement->getSubject();
    500. -
    501.          break;
    502. -
    503.         case '<p>':
    504. -
    505.              $entailedObject=$statement->getPredicate();
    506. -
    507.          break;    
    508. -
    509.          case '<o>':
    510. -
    511.              $entailedObject=$statement->getObject();
    512. -
    513.          break;
    514. -
    515.         default:
    516. -
    517.              $entailedObject=$this->entailment['o'];
    518. -
    519.         };
    520. -
    521.         
    522. -
    523.         //return the infered statement
    524. -
    525.         return (new InfStatement($entailedSubject,$entailedPredicate,$entailedObject));
    526. -
    527.      }
    528. -
    529.      
    530. -
    531.      /**
    532. -
    533.     * Returns a find-query that matches statements, whose entailed
    534. -
    535.     * statements would match the supplied find query.
    536. -
    537.     *
    538. -
    539.        * @param    Node OR null $subject
    540. -
    541.        * @param    Node OR null $predicate
    542. -
    543.        * @param    Node OR null $object
    544. -
    545.     * @return     array 
    546. -
    547.     * @access    public
    548. -
    549.     * @throws    PhpError
    550. -
    551.     */           
    552. -
    553.      function getModifiedFind$subject$predicate$object)
    554. -
    555.      {            
    556. -
    557.          $findSubject=$this->trigger['s'];
    558. -
    559.          $findPredicate=$this->trigger['p'];
    560. -
    561.          $findObject=$this->trigger['o'];
    562. -
    563.          
    564. -
    565.          switch ($this->entailment['s'])
    566. -
    567.              {
    568. -
    569.              case '<s>':
    570. -
    571.                   $findSubject=$subject;
    572. -
    573.              break;
    574. -
    575.              case '<p>':
    576. -
    577.                   $findPredicate=$subject;
    578. -
    579.              break;    
    580. -
    581.              case '<o>':
    582. -
    583.                  $findObject=$subject;
    584. -
    585.              break;
    586. -
    587.              };
    588. -
    589.              
    590. -
    591.          switch ($this->entailment['p'])
    592. -
    593.              {
    594. -
    595.              case '<s>':
    596. -
    597.                   $findSubject=$predicate;
    598. -
    599.              break;
    600. -
    601.              case '<p>':
    602. -
    603.                   $findPredicate=$predicate;
    604. -
    605.              break;    
    606. -
    607.              case '<o>':
    608. -
    609.                  $findObject=$predicate;
    610. -
    611.              break;
    612. -
    613.              };
    614. -
    615.              
    616. -
    617.          switch ($this->entailment['o'])
    618. -
    619.              {
    620. -
    621.              case '<s>':
    622. -
    623.                   $findSubject=$object;
    624. -
    625.              break;
    626. -
    627.              case '<p>':
    628. -
    629.                   $findPredicate=$object;
    630. -
    631.              break;    
    632. -
    633.              case '<o>':
    634. -
    635.                  $findObject=$object;
    636. -
    637.              break;
    638. -
    639.              };
    640. -
    641.     
    642. -
    643.          return array('s' => $findSubject,
    644. -
    645.                       'p' => $findPredicate,
    646. -
    647.                       'o' => $findObject );    
    648. -
    649.      }
    650. -
    651.      
    652. -
    653.      function getTrigger()
    654. -
    655.      {
    656. -
    657.          return array     (    's' => $this->trigger['s'],
    658. -
    659.                              'p' => $this->trigger['p'],    
    660. -
    661.                              'o' => $this->trigger['o'],
    662. -
    663.                          );
    664. -
    665.      }
    666. -
    667.      
    668. -
    669.      function getEntailment()
    670. -
    671.      {
    672. -
    673.          return array     (    's' => $this->entailment['s'],
    674. -
    675.                              'p' => $this->entailment['p'],    
    676. -
    677.                              'o' => $this->entailment['o'],
    678. -
    679.                          );
    680. -
    681.      }
    682. -
    683. }
    684. -
    685. ?>
    686. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfStatement.php.html.svn-base deleted file mode 100755 index 8b6eaedb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_infModel__infModelInfStatement.php.html.svn-base +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - File Source for InfStatement.php - - - - - -

    Source for file InfStatement.php

    -

    Documentation is available at InfStatement.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfStatement
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * An RDF statement which was entailed by a inference rule.
    14. -
    15.  * See Statement Class for further information.
    16. -
    17.  *  
    18. -
    19.  * @author Daniel Westphal <mail at d-westphal dot de>
    20. -
    21.  * @version  $Id$
    22. -
    23.  * @package infModel
    24. -
    25.  */
    26. -
    27. class InfStatement extends Statement  {
    28. -
    29.     
    30. -
    31. }
    32. -
    33.     
    34. -
    35. ?>
    36. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelBlanknode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelBlanknode.php.html.svn-base deleted file mode 100755 index 1c3dafba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelBlanknode.php.html.svn-base +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - File Source for Blanknode.php - - - - - -

    Source for file Blanknode.php

    -

    Documentation is available at Blanknode.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: BlankNode
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF blank node.
    18. -
    19.  * In model theory, blank nodes are considered to be drawn from some set of
    20. -
    21.  * 'anonymous' entities which have no label but are unique to the graph.
    22. -
    23.  * For serialization they are labeled with a URI or a _:X identifier.
    24. -
    25.  * 
    26. -
    27.  *
    28. -
    29.  * @version  $Id$
    30. -
    31.  * @authors Chris Bizer <chris@bizer.de>,
    32. -
    33.  *           Radoslaw Oldakowski <radol@gmx.de>
    34. -
    35.  *
    36. -
    37.  * @package model
    38. -
    39.  * @access    public
    40. -
    41.  *
    42. -
    43.  */ 
    44. -
    45.  class BlankNode extends Resource {
    46. -
    47.   
    48. -
    49.    /**
    50. -
    51.     * Constructor
    52. -
    53.     * You can supply a label or You supply a model and a unique ID is gernerated.
    54. -
    55.     *
    56. -
    57.     * @param    mixed    $namespace_or_uri_or_model 
    58. -
    59.      * @param     string $localName 
    60. -
    61.     * @access    public
    62. -
    63.     */
    64. -
    65.     function BlankNode($namespace_or_uri_or_model $localName NULL{
    66. -
    67.         
    68. -
    69.         if (is_a($namespace_or_uri_or_model'Model')) {
    70. -
    71.             // generate identifier
    72. -
    73.             $id $namespace_or_uri_or_model->getUniqueResourceURI(BNODE_PREFIX);
    74. -
    75.             
    76. -
    77.             $this->uri $id;
    78. -
    79.  
    80. -
    81.         else {
    82. -
    83.             // set identifier
    84. -
    85.             if ($localName == NULL{
    86. -
    87.                 $this->uri $namespace_or_uri_or_model;
    88. -
    89.               else {
    90. -
    91.                 $this->uri $namespace_or_uri_or_model $localName;
    92. -
    93.               }
    94. -
    95.          }
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.   /**
    102. -
    103.    * Returns the ID of the blank node.
    104. -
    105.    *
    106. -
    107.    * @return     string 
    108. -
    109.    * @access    public
    110. -
    111.    */    
    112. -
    113.   function getID({
    114. -
    115.               return $this->uri;
    116. -
    117.    }
    118. -
    119.  
    120. -
    121.   /**
    122. -
    123.    * Returns the ID of the blank node.
    124. -
    125.    *
    126. -
    127.    * @return     string 
    128. -
    129.    * @access    public
    130. -
    131.    */    
    132. -
    133.   function getLabel({
    134. -
    135.           return $this->uri;
    136. -
    137.    }
    138. -
    139.  
    140. -
    141.   /**
    142. -
    143.    * Dumps bNode.
    144. -
    145.    *
    146. -
    147.    * @access    public
    148. -
    149.    * @return    string 
    150. -
    151.    */  
    152. -
    153.   function toString({
    154. -
    155.  
    156. -
    157.         return 'bNode("' $this->uri '")';
    158. -
    159.   }
    160. -
    161.     
    162. -
    163.   /**
    164. -
    165.    * Checks if two blank nodes are equal.
    166. -
    167.    * Two blank nodes are equal, if they have the same temporary ID.
    168. -
    169.    *
    170. -
    171.    * @access    public
    172. -
    173.    * @param        object    resource $that 
    174. -
    175.    * @return    boolean 
    176. -
    177.    */  
    178. -
    179.    function equals ($that{
    180. -
    181.     
    182. -
    183.         if ($this == $that{
    184. -
    185.           return true;
    186. -
    187.         }
    188. -
    189.         if (($that == NULLor !(is_a($that'BlankNode'))) {
    190. -
    191.           return false;
    192. -
    193.         }
    194. -
    195.             
    196. -
    197.         if ($this->getURI(== $that->getURI()) {
    198. -
    199.           return true;
    200. -
    201.         }
    202. -
    203.     
    204. -
    205.         return false;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211. // end: BlankNode 
    212. -
    213.  
    214. -
    215.  
    216. -
    217. ?>
    218. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbModel.php.html.svn-base deleted file mode 100755 index d46fea2d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbModel.php.html.svn-base +++ /dev/null @@ -1,1323 +0,0 @@ - - - - - - File Source for DbModel.php - - - - - -

    Source for file DbModel.php

    -

    Documentation is available at DbModel.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Model.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: DbModel
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * This class provides methods for manipulating DbModels from DbStore.
    18. -
    19. * A DbModel is an RDF Model, which is persistently stored in a relational database.
    20. -
    21. * This Class uses the ADOdb Database Abstraction Library for PHP (http://adodb.sourceforge.net/).
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @version  $Id$
    28. -
    29. @author   Radoslaw Oldakowski <radol@gmx.de>
    30. -
    31. *
    32. -
    33. @package model
    34. -
    35. @access    public
    36. -
    37. */
    38. -
    39.  
    40. -
    41.  
    42. -
    43. class DbModel extends Model{
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * Database connection object.
    50. -
    51.     *
    52. -
    53.     * @var     object ADOConnection 
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $dbConn;
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Unique model URI.
    66. -
    67.     * Used to identify the DbModel.
    68. -
    69.     *
    70. -
    71.     * @var     string 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $modelURI;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Database internal modelID.
    86. -
    87.     * Used to avoid JOINs.
    88. -
    89.     *
    90. -
    91.     * @var     string 
    92. -
    93.     * @access    private
    94. -
    95.     */
    96. -
    97.     var $modelID;
    98. -
    99.  
    100. -
    101.  
    102. -
    103.  
    104. -
    105.  
    106. -
    107.     /**
    108. -
    109.     * Constructor
    110. -
    111.     * Do not call this directly.
    112. -
    113.     * Use the method getModel,getNewModel or putModel of the Class DbStore instead.
    114. -
    115.     *
    116. -
    117.     * @param   object ADOConnection  &$dbConnection 
    118. -
    119.     * @param   string   $modelURI 
    120. -
    121.     * @param   string   $modelID 
    122. -
    123.     * @param   string   $baseURI 
    124. -
    125.     * @access    public
    126. -
    127.     */
    128. -
    129.     function DbModel(&$dbConnection$modelURI$modelID$baseURI=NULL{
    130. -
    131.  
    132. -
    133.         $this->dbConn =$dbConnection;
    134. -
    135.         $this->modelURI $modelURI;
    136. -
    137.         $this->modelID $modelID;
    138. -
    139.         $this->baseURI $this->_checkBaseURI($baseURI);
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.  
    146. -
    147.     /**
    148. -
    149.     * Set a base URI for the DbModel.
    150. -
    151.     * Affects creating of new resources and serialization syntax.
    152. -
    153.     *
    154. -
    155.     * @param    string    $uri 
    156. -
    157.     * @throws  SqlError
    158. -
    159.     * @access    public
    160. -
    161.     */
    162. -
    163.     function setBaseURI($uri{
    164. -
    165.  
    166. -
    167.         $this->baseURI $this->_checkBaseURI($uri);
    168. -
    169.  
    170. -
    171.         $rs $this->dbConn->execute("UPDATE models SET baseURI='" .$this->baseURI ."'
    172. -
    173.                                  WHERE modelID=" .$this->modelID);
    174. -
    175.         if (!$rs)
    176. -
    177.         $this->dbConn->errorMsg();
    178. -
    179.     }
    180. -
    181.  
    182. -
    183.  
    184. -
    185.     /**
    186. -
    187.     * Return the number of statements in this DbModel.
    188. -
    189.     *
    190. -
    191.     * @return    integer 
    192. -
    193.     * @access    public
    194. -
    195.     */
    196. -
    197.     function size({
    198. -
    199.  
    200. -
    201.         $count =$this->dbConn->getOne('SELECT COUNT(modelID) FROM statements
    202. -
    203.                                     WHERE modelID = ' .$this->modelID);
    204. -
    205.         return $count;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.     * Check if this DbModel is empty.
    216. -
    217.     *
    218. -
    219.     * @return    boolean 
    220. -
    221.     * @access    public
    222. -
    223.     */
    224. -
    225.     function isEmpty({
    226. -
    227.  
    228. -
    229.         if ($this->size(== 0)
    230. -
    231.         return TRUE;
    232. -
    233.         return FALSE;
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Add a new triple to this DbModel.
    244. -
    245.     *
    246. -
    247.     * @param    object Statement    &$statement 
    248. -
    249.     * @throws    PhpError
    250. -
    251.     * @throws  SqlError
    252. -
    253.     * @access    public
    254. -
    255.     * @return mixed   true on success, false if the statement is already in the model,
    256. -
    257.     *                  error message (string) on failure
    258. -
    259.     */
    260. -
    261.     function add(&$statement{
    262. -
    263.  
    264. -
    265.         if (!is_a($statement'Statement')) {
    266. -
    267.             $errmsg RDFAPI_ERROR '(class: DbModel; method: add): Statement expected.';
    268. -
    269.             trigger_error($errmsgE_USER_ERROR);
    270. -
    271.         }
    272. -
    273.  
    274. -
    275.         if (!$this->contains($statement)) {
    276. -
    277.  
    278. -
    279.             $subject_is $this->_getNodeFlag($statement->subject());
    280. -
    281.             $sql "INSERT INTO statements
    282. -
    283.                     (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is)
    284. -
    285.                     VALUES
    286. -
    287.                     (" .$this->modelID .","
    288. -
    289.             ."'" .$statement->getLabelSubject(."',"
    290. -
    291.             ."'" .$statement->getLabelPredicate(."',";
    292. -
    293.  
    294. -
    295.             if (is_a($statement->object()'Literal')) {
    296. -
    297.                 $quotedLiteral $this->dbConn->qstr($statement->obj->getLabel());
    298. -
    299.                 $sql .=        $quotedLiteral .","
    300. -
    301.                 ."'" .$statement->obj->getLanguage(."',"
    302. -
    303.                 ."'" .$statement->obj->getDatatype(."',"
    304. -
    305.                 ."'" .$subject_is ."',"
    306. -
    307.                 ."'l')";
    308. -
    309.             }else{
    310. -
    311.                 $object_is $this->_getNodeFlag($statement->object());
    312. -
    313.                 $sql .=   "'" .$statement->obj->getLabel(."',"
    314. -
    315.                 ."'',"
    316. -
    317.                 ."'',"
    318. -
    319.                 ."'" .$subject_is ."',"
    320. -
    321.                 ."'" .$object_is ."')";
    322. -
    323.             }
    324. -
    325.             $rs =$this->dbConn->execute($sql);
    326. -
    327.             if (!$rs{
    328. -
    329.                 return $this->dbConn->errorMsg();
    330. -
    331.             else {
    332. -
    333.                 return true;
    334. -
    335.             }
    336. -
    337.         else {
    338. -
    339.             return false;
    340. -
    341.         }
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.  
    348. -
    349.     /**
    350. -
    351.     * Alias for the method add().
    352. -
    353.     *
    354. -
    355.     * @param    object Statement    &$statement 
    356. -
    357.     * @throws    PhpError
    358. -
    359.     * @throws  SqlError
    360. -
    361.     * @access    public
    362. -
    363.     */
    364. -
    365.     function addWithoutDuplicates(&$statement{
    366. -
    367.  
    368. -
    369.         $this->add($statement);
    370. -
    371.     }
    372. -
    373.  
    374. -
    375.  
    376. -
    377.     /**
    378. -
    379.     * Remove the given triple from this DbModel.
    380. -
    381.     *
    382. -
    383.     * @param    object Statement    &$statement 
    384. -
    385.     * @throws    PhpError
    386. -
    387.     * @throws  SqlError
    388. -
    389.     * @access    public
    390. -
    391.     */
    392. -
    393.     function remove(&$statement{
    394. -
    395.  
    396. -
    397.         if (!is_a($statement'Statement')) {
    398. -
    399.             $errmsg RDFAPI_ERROR '(class: DbModel; method: remove): Statement expected.';
    400. -
    401.             trigger_error($errmsgE_USER_ERROR);
    402. -
    403.         }
    404. -
    405.  
    406. -
    407.         $sql 'DELETE FROM statements
    408. -
    409.            WHERE modelID=' .$this->modelID;
    410. -
    411.         $sql .= $this->_createDynSqlPart_SPO ($statement->subj$statement->pred$statement->obj);
    412. -
    413.  
    414. -
    415.         $rs =$this->dbConn->execute($sql);
    416. -
    417.         if (!$rs)
    418. -
    419.         $this->dbConn->errorMsg();
    420. -
    421.     }
    422. -
    423.  
    424. -
    425.  
    426. -
    427.     /**
    428. -
    429.     * Short dump of the DbModel.
    430. -
    431.     *
    432. -
    433.     * @return    string 
    434. -
    435.     * @access    public
    436. -
    437.     */
    438. -
    439.     function toString({
    440. -
    441.  
    442. -
    443.         return 'DbModel[modelURI=' .$this->modelURI .'; baseURI=' .$this->getBaseURI(.';  size=' .$this->size(.']';
    444. -
    445.     }
    446. -
    447.  
    448. -
    449.  
    450. -
    451.     /**
    452. -
    453.     * Dump of the DbModel including all triples.
    454. -
    455.     *
    456. -
    457.     * @return    string 
    458. -
    459.     * @access    public
    460. -
    461.     */
    462. -
    463.     function toStringIncludingTriples({
    464. -
    465.  
    466. -
    467.         $memModel =$this->getMemModel();
    468. -
    469.         return $memModel->toStringIncludingTriples();
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.  
    476. -
    477.  
    478. -
    479.     /**
    480. -
    481.     * Create a MemModel containing all the triples of the current DbModel.
    482. -
    483.     *
    484. -
    485.     * @return object MemModel 
    486. -
    487.     * @access public
    488. -
    489.     */
    490. -
    491.     function getMemModel({
    492. -
    493.  
    494. -
    495.         $recordSet $this->_getRecordSet($this);
    496. -
    497.         return $this->_convertRecordSetToMemModel($recordSet);
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.  
    504. -
    505.  
    506. -
    507.     /**
    508. -
    509.     * Returns the model id
    510. -
    511.     *
    512. -
    513.     * @return int Model id number
    514. -
    515.     * @access public
    516. -
    517.     */
    518. -
    519.     function getModelID()
    520. -
    521.     {
    522. -
    523.         return $this->modelID;
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.  
    530. -
    531.  
    532. -
    533.     /**
    534. -
    535.     * Returns the database connection object
    536. -
    537.     *
    538. -
    539.     * @return ADOdb Database object
    540. -
    541.     * @access public
    542. -
    543.     */
    544. -
    545.     function &getDbConn()
    546. -
    547.     {
    548. -
    549.         return $this->dbConn;
    550. -
    551.     }
    552. -
    553.  
    554. -
    555.  
    556. -
    557.  
    558. -
    559.     /**
    560. -
    561.     * Write the RDF serialization of the _DbModel as HTML.
    562. -
    563.     *
    564. -
    565.     * @access    public
    566. -
    567.     */
    568. -
    569.     function writeAsHtml({
    570. -
    571.  
    572. -
    573.         $memModel =$this->getMemModel();
    574. -
    575.         $memModel->writeAsHtml();
    576. -
    577.     }
    578. -
    579.  
    580. -
    581.  
    582. -
    583.     /**
    584. -
    585.     * Write the RDF serialization of the DbModel as HTML table.
    586. -
    587.     *
    588. -
    589.     * @access    public
    590. -
    591.     */
    592. -
    593.     function writeAsHtmlTable({
    594. -
    595.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    596. -
    597.         $memModel =$this->getMemModel();
    598. -
    599.         RDFUtil::writeHTMLTable($memModel);
    600. -
    601.     }
    602. -
    603.  
    604. -
    605.  
    606. -
    607.     /**
    608. -
    609.     * Write the RDF serialization of the DbModel to string.
    610. -
    611.     *
    612. -
    613.     * @return    string 
    614. -
    615.     * @access    public
    616. -
    617.     */
    618. -
    619.     function writeRdfToString({
    620. -
    621.  
    622. -
    623.         $memModel =$this->getMemModel();
    624. -
    625.         return $memModel->writeRdfToString();
    626. -
    627.     }
    628. -
    629.  
    630. -
    631.  
    632. -
    633.     /**
    634. -
    635.     * Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    636. -
    637.     * You can decide to which format the model should be serialized by using a
    638. -
    639.     * corresponding suffix-string as $type parameter. If no $type parameter
    640. -
    641.     * is placed this method will serialize the model to XML/RDF format.
    642. -
    643.     * Returns FALSE if the DbModel couldn't be saved to the file.
    644. -
    645.     *
    646. -
    647.     * @access    public
    648. -
    649.     * @param     string     $filename 
    650. -
    651.     * @param     string     $type 
    652. -
    653.     * @throws   PhpError
    654. -
    655.     * @return    boolean 
    656. -
    657.     */
    658. -
    659.     function saveAs($filename$type ='rdf'{
    660. -
    661.  
    662. -
    663.         $memModel $this->getMemModel();
    664. -
    665.         $memModel->saveAs($filename$type);
    666. -
    667.  
    668. -
    669.     }
    670. -
    671.  
    672. -
    673.  
    674. -
    675.     /**
    676. -
    677.     * Check if the DbModel contains the given statement.
    678. -
    679.     *
    680. -
    681.     * @param object Statement  &$statement 
    682. -
    683.     * @return    boolean 
    684. -
    685.     * @access    public
    686. -
    687.     */
    688. -
    689.     function contains(&$statement{
    690. -
    691.  
    692. -
    693.         $sql 'SELECT modelID FROM statements
    694. -
    695.            WHERE modelID = ' .$this->modelID;
    696. -
    697.         $sql .= $this->_createDynSqlPart_SPO($statement->subj$statement->pred$statement->obj);
    698. -
    699.  
    700. -
    701.         $res =$this->dbConn->getOne($sql);
    702. -
    703.  
    704. -
    705.         if (!$res)
    706. -
    707.         return FALSE;
    708. -
    709.         return TRUE;
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.  
    716. -
    717.     /**
    718. -
    719.     * Determine if all of the statements in the given model are also contained in this DbModel.
    720. -
    721.     *
    722. -
    723.     * @param    object Model    &$model 
    724. -
    725.     * @return    boolean 
    726. -
    727.     * @access    public
    728. -
    729.     */
    730. -
    731.     function containsAll(&$model{
    732. -
    733.  
    734. -
    735.         if (is_a($model'MemModel')) {
    736. -
    737.  
    738. -
    739.             foreach($model->triples as $statement)
    740. -
    741.             if(!$this->contains($statement))
    742. -
    743.             return FALSE;
    744. -
    745.             return TRUE;
    746. -
    747.         }
    748. -
    749.  
    750. -
    751.         elseif (is_a($model'DbModel')) {
    752. -
    753.  
    754. -
    755.             $recordSet =$this->_getRecordSet($model);
    756. -
    757.             while (!$recordSet->EOF{
    758. -
    759.                 if (!$this->_containsRow($recordSet->fields))
    760. -
    761.                 return FALSE;
    762. -
    763.                 $recordSet->moveNext();
    764. -
    765.             }
    766. -
    767.             return TRUE;
    768. -
    769.         }
    770. -
    771.  
    772. -
    773.         $errmsg RDFAPI_ERROR '(class: DbModel; method: containsAll): Model expected.';
    774. -
    775.         trigger_error($errmsgE_USER_ERROR);
    776. -
    777.     }
    778. -
    779.  
    780. -
    781.  
    782. -
    783.     /**
    784. -
    785.     * Determine if any of the statements in the given model are also contained in this DbModel.
    786. -
    787.     *
    788. -
    789.     * @param    object Model    &$model 
    790. -
    791.     * @return    boolean 
    792. -
    793.     * @access    public
    794. -
    795.     */
    796. -
    797.     function containsAny(&$model{
    798. -
    799.  
    800. -
    801.         if (is_a($model'MemModel')) {
    802. -
    803.  
    804. -
    805.             foreach($model->triples as $statement)
    806. -
    807.             if($this->contains($statement))
    808. -
    809.             return TRUE;
    810. -
    811.             return FALSE;
    812. -
    813.         }
    814. -
    815.  
    816. -
    817.         elseif (is_a($model'DbModel')) {
    818. -
    819.  
    820. -
    821.             $recordSet =$this->_getRecordSet($model);
    822. -
    823.             while (!$recordSet->EOF{
    824. -
    825.                 if ($this->_containsRow($recordSet->fields))
    826. -
    827.                 return TRUE;
    828. -
    829.                 $recordSet->moveNext();
    830. -
    831.             }
    832. -
    833.             return FALSE;
    834. -
    835.         }
    836. -
    837.  
    838. -
    839.         $errmsg RDFAPI_ERROR '(class: DbModel; method: containsAny): Model expected.';
    840. -
    841.         trigger_error($errmsgE_USER_ERROR);
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.  
    848. -
    849.     /**
    850. -
    851.     * General method to search for triples in the DbModel.
    852. -
    853.     * NULL input for any parameter will match anything.
    854. -
    855.     * Example:  $result = $m->find( NULL, NULL, $node );
    856. -
    857.     *           Finds all triples with $node as object.
    858. -
    859.     *
    860. -
    861.     * @param    object Resource    $subject 
    862. -
    863.     * @param    object Resource    $predicate 
    864. -
    865.     * @param    object Node    $object 
    866. -
    867.     * @return    object MemModel 
    868. -
    869.     * @throws    PhpError
    870. -
    871.     * @throws  SqlError
    872. -
    873.     * @access    public
    874. -
    875.     */
    876. -
    877.     function find($subject$predicate$object{
    878. -
    879.  
    880. -
    881.         if ((!is_a($subject'Resource'&& $subject != NULL||
    882. -
    883.         (!is_a($predicate'Resource'&& $predicate != NULL||
    884. -
    885.         (!is_a($object'Node'&& $object != NULL)) {
    886. -
    887.  
    888. -
    889.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    890. -
    891.             trigger_error($errmsgE_USER_ERROR);
    892. -
    893.         }
    894. -
    895.  
    896. -
    897.         // static part of the sql statement
    898. -
    899.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    900. -
    901.            FROM statements
    902. -
    903.            WHERE modelID = ' .$this->modelID;
    904. -
    905.  
    906. -
    907.         // dynamic part of the sql statement
    908. -
    909.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    910. -
    911.  
    912. -
    913.         // execute the query
    914. -
    915.         $recordSet =$this->dbConn->execute($sql);
    916. -
    917.  
    918. -
    919.         if (!$recordSet)
    920. -
    921.         echo $this->dbConn->errorMsg();
    922. -
    923.  
    924. -
    925.         // write the recordSet into memory Model
    926. -
    927.         else
    928. -
    929.         return $this->_convertRecordSetToMemModel($recordSet);
    930. -
    931.     }
    932. -
    933.  
    934. -
    935.  
    936. -
    937.     /**
    938. -
    939.     * Method to search for triples using Perl-style regular expressions.
    940. -
    941.     * NULL input for any parameter will match anything.
    942. -
    943.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    944. -
    945.     *           Finds all triples where the label of the object node matches
    946. -
    947.     *the regular expression.
    948. -
    949.     * Return an empty MemModel if nothing is found.
    950. -
    951.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    952. -
    953.     * WARNING: Mhis method loads a DbModel into memory and performs the search
    954. -
    955.     *          on a MemModel, which can be slow with large models.
    956. -
    957.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    958. -
    959.     *
    960. -
    961.     * @param    string    $subject_regex 
    962. -
    963.     * @param    string    $predicate_regex 
    964. -
    965.     * @param    string    $object_regex 
    966. -
    967.     * @return    object MemModel 
    968. -
    969.     * @throws    PhpError
    970. -
    971.     * @throws  SqlError
    972. -
    973.     * @access    public
    974. -
    975.     */
    976. -
    977.     function findRegex($subject_regex$predicate_regex$object_regex{
    978. -
    979.  
    980. -
    981.         $mm =$this->getMemModel();
    982. -
    983.  
    984. -
    985.         return $mm->findRegex($subject_regex$predicate_regex$object_regex);
    986. -
    987.     }
    988. -
    989.  
    990. -
    991.  
    992. -
    993.     /**
    994. -
    995.     * Return all tripels of a certain vocabulary.
    996. -
    997.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
    998. -
    999.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    1000. -
    1001.     * Return an empty model if nothing is found.
    1002. -
    1003.     *
    1004. -
    1005.     * @param    string    $vocabulary 
    1006. -
    1007.     * @return    object MemModel 
    1008. -
    1009.     * @throws    PhpError
    1010. -
    1011.     * @throws  SqlError
    1012. -
    1013.     * @access    public
    1014. -
    1015.     */
    1016. -
    1017.     function findVocabulary($vocabulary{
    1018. -
    1019.  
    1020. -
    1021.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    1022. -
    1023.            FROM statements
    1024. -
    1025.            WHERE modelID = " .$this->modelID ."
    1026. -
    1027.            AND predicate LIKE '" .$vocabulary ."%'";
    1028. -
    1029.  
    1030. -
    1031.         $recordSet =$this->dbConn->execute($sql);
    1032. -
    1033.  
    1034. -
    1035.         if (!$recordSet)
    1036. -
    1037.         echo $this->dbConn->errorMsg();
    1038. -
    1039.  
    1040. -
    1041.         // write the recordSet into memory Model
    1042. -
    1043.         else
    1044. -
    1045.         return $this->_convertRecordSetToMemModel($recordSet);
    1046. -
    1047.     }
    1048. -
    1049.  
    1050. -
    1051.  
    1052. -
    1053.     /**
    1054. -
    1055.     * Search for triples and return the first matching statement.
    1056. -
    1057.     * NULL input for any parameter will match anything.
    1058. -
    1059.     * Return an NULL if nothing is found.
    1060. -
    1061.     * You can set an search offset with $offset.
    1062. -
    1063.     *
    1064. -
    1065.     * @param    object Resource    $subject 
    1066. -
    1067.     * @param    object Resource    $predicate 
    1068. -
    1069.     * @param    object Node    $object 
    1070. -
    1071.     * @param    integer    $offset 
    1072. -
    1073.     * @return    object Statement 
    1074. -
    1075.     * @throws  PhpError
    1076. -
    1077.     * @throws  SqlError
    1078. -
    1079.     * @access    public
    1080. -
    1081.     */
    1082. -
    1083.     function findFirstMatchingStatement($subject$predicate$object$offset = -1{
    1084. -
    1085.  
    1086. -
    1087.         if ((!is_a($subject'Resource'&& $subject != NULL||
    1088. -
    1089.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1090. -
    1091.         (!is_a($object'Node'&& $object != NULL)) {
    1092. -
    1093.  
    1094. -
    1095.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    1096. -
    1097.             trigger_error($errmsgE_USER_ERROR);
    1098. -
    1099.         }
    1100. -
    1101.  
    1102. -
    1103.         // static part of the sql statement
    1104. -
    1105.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    1106. -
    1107.            FROM statements
    1108. -
    1109.            WHERE modelID = ' .$this->modelID;
    1110. -
    1111.  
    1112. -
    1113.         // dynamic part of the sql statement
    1114. -
    1115.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1116. -
    1117.  
    1118. -
    1119.         // execute the query
    1120. -
    1121.         $recordSet =$this->dbConn->selectLimit($sql,1,($offset));
    1122. -
    1123.  
    1124. -
    1125.         if (!$recordSet)
    1126. -
    1127.         echo $this->dbConn->errorMsg();
    1128. -
    1129.         else {
    1130. -
    1131.             if (!$recordSet->fields)
    1132. -
    1133.             return NULL;
    1134. -
    1135.             else {
    1136. -
    1137.                 $memModel $this->_convertRecordSetToMemModel($recordSet);
    1138. -
    1139.                 return $memModel->triples[0];
    1140. -
    1141.             }
    1142. -
    1143.         }
    1144. -
    1145.     }
    1146. -
    1147.  
    1148. -
    1149.  
    1150. -
    1151.     /**
    1152. -
    1153.     * Search for triples and return the number of matches.
    1154. -
    1155.     * NULL input for any parameter will match anything.
    1156. -
    1157.     *
    1158. -
    1159.     * @param    object Resource    $subject 
    1160. -
    1161.     * @param    object Resource    $predicate 
    1162. -
    1163.     * @param    object Node      $object 
    1164. -
    1165.     * @return    integer 
    1166. -
    1167.     * @throws    PhpError
    1168. -
    1169.     * @throws  SqlError
    1170. -
    1171.     * @access    public
    1172. -
    1173.     */
    1174. -
    1175.     function findCount($subject$predicate$object{
    1176. -
    1177.  
    1178. -
    1179.         if ((!is_a($subject'Resource'&& $subject != NULL||
    1180. -
    1181.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1182. -
    1183.         (!is_a($object'Node'&& $object != NULL)) {
    1184. -
    1185.  
    1186. -
    1187.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    1188. -
    1189.             trigger_error($errmsgE_USER_ERROR);
    1190. -
    1191.         }
    1192. -
    1193.  
    1194. -
    1195.         // static part of the sql statement
    1196. -
    1197.         $sql 'SELECT COUNT(*)
    1198. -
    1199.            FROM statements
    1200. -
    1201.            WHERE modelID = ' .$this->modelID;
    1202. -
    1203.  
    1204. -
    1205.         // dynamic part of the sql statement
    1206. -
    1207.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1208. -
    1209.  
    1210. -
    1211.         // execute the query
    1212. -
    1213.         $recordSet =$this->dbConn->execute($sql);
    1214. -
    1215.  
    1216. -
    1217.         if (!$recordSet)
    1218. -
    1219.         echo $this->dbConn->errorMsg();
    1220. -
    1221.         else
    1222. -
    1223.         return $recordSet->fields[0];
    1224. -
    1225.     }
    1226. -
    1227.  
    1228. -
    1229.  
    1230. -
    1231.     /**
    1232. -
    1233.     * Perform an RDQL query on this DbModel.
    1234. -
    1235.     * This method returns an associative array of variable bindings.
    1236. -
    1237.     * The values of the query variables can either be RAP's objects (instances of Node)
    1238. -
    1239.     * if $returnNodes set to TRUE, or their string serialization.
    1240. -
    1241.     *
    1242. -
    1243.     * @access    public
    1244. -
    1245.     * @param string $queryString 
    1246. -
    1247.     * @param boolean $returnNodes 
    1248. -
    1249.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1250. -
    1251.     *       OR  array   [][?VARNAME] = string
    1252. -
    1253.     *
    1254. -
    1255.     */
    1256. -
    1257.     function rdqlQuery($queryString$returnNodes TRUE{
    1258. -
    1259.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1260. -
    1261.         $parser new RdqlParser();
    1262. -
    1263.         $parsedQuery =$parser->parseQuery($queryString);
    1264. -
    1265.  
    1266. -
    1267.         // this method can only query this DbModel
    1268. -
    1269.         // if another model was specified in the from clause throw an error
    1270. -
    1271.         if (isset($parsedQuery['sources'][0]))
    1272. -
    1273.         if($parsedQuery['sources'][0!= $this->modelURI{
    1274. -
    1275.             $errmsg RDFAPI_ERROR '(class: DbModel; method: rdqlQuery):';
    1276. -
    1277.             $errmsg .= ' this method can only query this DbModel';
    1278. -
    1279.             trigger_error($errmsgE_USER_ERROR);
    1280. -
    1281.         }
    1282. -
    1283.  
    1284. -
    1285.         $engine new RdqlDbEngine();
    1286. -
    1287.         $res =$engine->queryModel($this$parsedQuery$returnNodes);
    1288. -
    1289.  
    1290. -
    1291.         return $res;
    1292. -
    1293.     }
    1294. -
    1295.  
    1296. -
    1297.  
    1298. -
    1299.     /**
    1300. -
    1301.     * Perform an RDQL query on this DBModel.
    1302. -
    1303.     * This method returns an RdqlResultIterator of variable bindings.
    1304. -
    1305.     * The values of the query variables can either be RAP's objects (instances of Node)
    1306. -
    1307.     * if $returnNodes set to TRUE, or their string serialization.
    1308. -
    1309.     *
    1310. -
    1311.     * @access    public
    1312. -
    1313.     * @param string $queryString 
    1314. -
    1315.     * @param boolean $returnNodes 
    1316. -
    1317.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1318. -
    1319.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1320. -
    1321.     *
    1322. -
    1323.     */
    1324. -
    1325.     function rdqlQueryAsIterator($queryString$returnNodes TRUE{
    1326. -
    1327.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1328. -
    1329.         return new RdqlResultIterator($this->rdqlQuery($queryString$returnNodes));
    1330. -
    1331.     }
    1332. -
    1333.  
    1334. -
    1335.     /**
    1336. -
    1337.     * General method to replace nodes of a DbModel.
    1338. -
    1339.     * NULL input for any parameter will match nothing.
    1340. -
    1341.     * Example:  $m->replace($resource, NULL, $node, $replacement);
    1342. -
    1343.     *           Replaces all $node objects beeing subject or object in
    1344. -
    1345.     *           any triple of the model with the $replacement node.
    1346. -
    1347.     * Throw an error in case of a paramter mismatch.
    1348. -
    1349.     *
    1350. -
    1351.     * @param    object Resource    $subject 
    1352. -
    1353.     * @param    object Resource    $predicate 
    1354. -
    1355.     * @param    object Node    $object 
    1356. -
    1357.     * @param    object Node    $replacement 
    1358. -
    1359.     * @throws    PhpError
    1360. -
    1361.     * @throws  SqlError
    1362. -
    1363.     * @access    public
    1364. -
    1365.     */
    1366. -
    1367.     function replace($subject$predicate$object$replacement{
    1368. -
    1369.  
    1370. -
    1371.         // check the correctness of the passed parameters
    1372. -
    1373.         if ( ((!is_a($subject'Resource'&& $subject != NULL||
    1374. -
    1375.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1376. -
    1377.         (!is_a($object'Node'&& $object != NULL)) ||
    1378. -
    1379.         (($subject != NULL && is_a($replacement'Literal')) ||
    1380. -
    1381.         ($predicate != NULL && (is_a($replacement'Literal'||
    1382. -
    1383.         is_a($replacement'BlankNode')))) )
    1384. -
    1385.         {
    1386. -
    1387.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameter mismatch';
    1388. -
    1389.             trigger_error($errmsgE_USER_ERROR);
    1390. -
    1391.         }
    1392. -
    1393.  
    1394. -
    1395.         if (!(!$subject && !$predicate && !$object)) {
    1396. -
    1397.  
    1398. -
    1399.             // create an update sql statement
    1400. -
    1401.             $comma '';
    1402. -
    1403.             $sql 'UPDATE statements
    1404. -
    1405.              SET ';
    1406. -
    1407.             if ($subject{
    1408. -
    1409.                 $sql .= " subject ='" .$replacement->getLabel(."', "
    1410. -
    1411.                 ." subject_is='" .$this->_getNodeFlag($replacement."' ";
    1412. -
    1413.                 $comma ',';
    1414. -
    1415.             }
    1416. -
    1417.             if ($predicate{
    1418. -
    1419.                 $sql .= $comma ." predicate='" .$replacement->getLabel(."' ";
    1420. -
    1421.                 $comma ',';
    1422. -
    1423.             }
    1424. -
    1425.             if ($object{
    1426. -
    1427.                 $quotedObject $this->dbConn->qstr($replacement->getLabel());
    1428. -
    1429.                 $sql .= $comma .' object=' .$quotedObject
    1430. -
    1431.                 .", object_is='" .$this->_getNodeFlag($replacement."' ";
    1432. -
    1433.                 if (is_a($replacement'Literal')) {
    1434. -
    1435.                     $sql .= ", l_language='" .$replacement->getLanguage(."' "
    1436. -
    1437.                     .", l_datatype='" .$replacement->getDataType(."' ";
    1438. -
    1439.                 }
    1440. -
    1441.             }
    1442. -
    1443.             $sql .= 'WHERE modelID = ' .$this->modelID;
    1444. -
    1445.             $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1446. -
    1447.  
    1448. -
    1449.             // execute the query
    1450. -
    1451.             $rs =$this->dbConn->execute($sql);
    1452. -
    1453.  
    1454. -
    1455.             if (!$rs)
    1456. -
    1457.             echo $this->dbConn->errorMsg();
    1458. -
    1459.         }
    1460. -
    1461.     }
    1462. -
    1463.  
    1464. -
    1465.  
    1466. -
    1467.     /**
    1468. -
    1469.     * Check if two models are equal.
    1470. -
    1471.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    1472. -
    1473.     *
    1474. -
    1475.     * Warning: This method doesn't work correct with models where the same blank node has different
    1476. -
    1477.     * identifiers in the two models. We will correct this in a future version.
    1478. -
    1479.     *
    1480. -
    1481.     * @param    object    model &$that 
    1482. -
    1483.     * @return    boolean 
    1484. -
    1485.     * @throws  PhpError
    1486. -
    1487.     * @access    public
    1488. -
    1489.     */
    1490. -
    1491.  
    1492. -
    1493.     function equals(&$that)  {
    1494. -
    1495.  
    1496. -
    1497.         if (!is_a($that'Model')) {
    1498. -
    1499.             $errmsg RDFAPI_ERROR '(class: DbModel; method: equals): Model expected.';
    1500. -
    1501.             trigger_error($errmsgE_USER_ERROR);
    1502. -
    1503.         }
    1504. -
    1505.  
    1506. -
    1507.         if ($this->size(!= $that->size())
    1508. -
    1509.         return FALSE;
    1510. -
    1511.  
    1512. -
    1513.         include_once(RDFAPI_INCLUDE_DIR"util/ModelComparator.php");
    1514. -
    1515.         return ModelComparator::compare($this,$that);
    1516. -
    1517.     }
    1518. -
    1519.  
    1520. -
    1521.  
    1522. -
    1523.     /**
    1524. -
    1525.     * Return a new MemModel that is the set-union the model with another model.
    1526. -
    1527.     *
    1528. -
    1529.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    1530. -
    1531.     * is another graph, which we will call the merge of the graphs.
    1532. -
    1533.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    1534. -
    1535.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    1536. -
    1537.     * graphs become a single node in the union graph (since by definition they are the same
    1538. -
    1539.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    1540. -
    1541.     * never merged. In particular, this means that every blank node in a merged graph can be
    1542. -
    1543.     * identified as coming from one particular graph in the original set of graphs.
    1544. -
    1545.     *
    1546. -
    1547.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    1548. -
    1549.     * their corresponding N-triples documents and constructing the graph described by the merged
    1550. -
    1551.     * document, since if some of the documents use the same node identifiers, the merged document
    1552. -
    1553.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    1554. -
    1555.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    1556. -
    1557.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    1558. -
    1559.     * documents. (Not implemented yet !!!!!!!!!!!)
    1560. -
    1561.     *
    1562. -
    1563.     * @param    object Model    $model 
    1564. -
    1565.     * @return    object MemModel 
    1566. -
    1567.     * @throws PhpError
    1568. -
    1569.     * @access    public
    1570. -
    1571.     *
    1572. -
    1573.     */
    1574. -
    1575.     function unite(&$model)  {
    1576. -
    1577.  
    1578. -
    1579.         if (!is_a($model'Model')) {
    1580. -
    1581.             $errmsg RDFAPI_ERROR '(class: DbModel; method: unite): Model expected.';
    1582. -
    1583.             trigger_error($errmsgE_USER_ERROR);
    1584. -
    1585.         }
    1586. -
    1587.  
    1588. -
    1589.         if (is_a($model'MemModel')) {
    1590. -
    1591.  
    1592. -
    1593.             $thisModel =$this->getMemModel();
    1594. -
    1595.             return $thisModel->unite($model);
    1596. -
    1597.         }
    1598. -
    1599.  
    1600. -
    1601.         elseif (is_a($model'DbModel')) {
    1602. -
    1603.  
    1604. -
    1605.             $thisModel =$this->getMemModel();
    1606. -
    1607.             $thatModel =$model->getMemModel();
    1608. -
    1609.             return $thisModel->unite($thatModel);
    1610. -
    1611.         }
    1612. -
    1613.     }
    1614. -
    1615.  
    1616. -
    1617.  
    1618. -
    1619.     /**
    1620. -
    1621.     * Return a new MemModel that is the subtraction of another model from this DbModel.
    1622. -
    1623.     *
    1624. -
    1625.     * @param    object Model    $model 
    1626. -
    1627.     * @return    object MemModel 
    1628. -
    1629.     * @throws PhpError
    1630. -
    1631.     * @access    public
    1632. -
    1633.     */
    1634. -
    1635.  
    1636. -
    1637.     function subtract(&$model)  {
    1638. -
    1639.  
    1640. -
    1641.         if (!is_a($model'Model')) {
    1642. -
    1643.             $errmsg RDFAPI_ERROR '(class: DbModel; method: subtract): Model expected.';
    1644. -
    1645.             trigger_error($errmsgE_USER_ERROR);
    1646. -
    1647.         }
    1648. -
    1649.  
    1650. -
    1651.         if (is_a($model'MemModel')) {
    1652. -
    1653.  
    1654. -
    1655.             $thisModel =$this->getMemModel();
    1656. -
    1657.             return $thisModel->subtract($model);
    1658. -
    1659.         }
    1660. -
    1661.  
    1662. -
    1663.         elseif (is_a($model'DbModel')) {
    1664. -
    1665.  
    1666. -
    1667.             $thisModel =$this->getMemModel();
    1668. -
    1669.             $thatModel =$model->getMemModel();
    1670. -
    1671.             return $thisModel->subtract($thatModel);
    1672. -
    1673.         }
    1674. -
    1675.     }
    1676. -
    1677.  
    1678. -
    1679.  
    1680. -
    1681.     /**
    1682. -
    1683.     * Return a new MemModel containing all the statements which are in both
    1684. -
    1685.     * this model and the given model.
    1686. -
    1687.     *
    1688. -
    1689.     * @param    object Model    $model 
    1690. -
    1691.     * @return    object MemModel 
    1692. -
    1693.     * @throws  PhpError
    1694. -
    1695.     * @access    public
    1696. -
    1697.     */
    1698. -
    1699.     function intersect(&$model)  {
    1700. -
    1701.  
    1702. -
    1703.         if (is_a($model'MemModel')) {
    1704. -
    1705.  
    1706. -
    1707.             $thisModel =$this->getMemModel();
    1708. -
    1709.             return $thisModel->intersect($model);
    1710. -
    1711.         }
    1712. -
    1713.  
    1714. -
    1715.         elseif (is_a($model'DbModel')) {
    1716. -
    1717.  
    1718. -
    1719.             $thisModel =$this->getMemModel();
    1720. -
    1721.             $thatModel =$model->getMemModel();
    1722. -
    1723.             return $thisModel->intersect($thatModel);
    1724. -
    1725.         }
    1726. -
    1727.  
    1728. -
    1729.         $errmsg RDFAPI_ERROR '(class: DbModel; method: intersect: Model expected.';
    1730. -
    1731.         trigger_error($errmsgE_USER_ERROR);
    1732. -
    1733.     }
    1734. -
    1735.  
    1736. -
    1737.  
    1738. -
    1739.     /**
    1740. -
    1741.     * Add the given model to this DbModel.
    1742. -
    1743.     * This function monitors for SQL errors, and will commit if no errors have occured,
    1744. -
    1745.     * otherwise it will rollback.
    1746. -
    1747.     * If any statement of the model to be added to this model contains a blankNode
    1748. -
    1749.     * with an identifier already existing in this model, a new blankNode is generated.
    1750. -
    1751.     *
    1752. -
    1753.     * @param    object Model    $model 
    1754. -
    1755.     * @throws  PhpError
    1756. -
    1757.     * @access    public
    1758. -
    1759.     */
    1760. -
    1761.     function addModel(&$model)  {
    1762. -
    1763.  
    1764. -
    1765.         if (!is_a($model'Model')) {
    1766. -
    1767.             $errmsg RDFAPI_ERROR '(class: DbModel; method: addModel): Model expected.';
    1768. -
    1769.             trigger_error($errmsgE_USER_ERROR);
    1770. -
    1771.         }
    1772. -
    1773.  
    1774. -
    1775.         $blankNodes_tmp array();
    1776. -
    1777.  
    1778. -
    1779.         if (is_a($model'MemModel')) {
    1780. -
    1781.  
    1782. -
    1783.             $this->dbConn->startTrans();
    1784. -
    1785.             foreach ($model->triples as $statement)
    1786. -
    1787.             $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    1788. -
    1789.             $this->addParsedNamespaces($model->getParsedNamespaces());
    1790. -
    1791.  
    1792. -
    1793.             $this->dbConn->completeTrans();
    1794. -
    1795.         }
    1796. -
    1797.  
    1798. -
    1799.         elseif (is_a($model'DbModel')) {
    1800. -
    1801.  
    1802. -
    1803.             $this->dbConn->startTrans();
    1804. -
    1805.             $memModel =$model->getMemModel();
    1806. -
    1807.             foreach($memModel->triples as $statement)
    1808. -
    1809.             $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    1810. -
    1811.             $this->addParsedNamespaces($model->getParsedNamespaces());
    1812. -
    1813.             $this->dbConn->completeTrans();
    1814. -
    1815.         }
    1816. -
    1817.     }
    1818. -
    1819.  
    1820. -
    1821.  
    1822. -
    1823.     /**
    1824. -
    1825.     * Reify the DbModel.
    1826. -
    1827.     * Return a new MemModel that contains the reifications of all statements of this DbModel.
    1828. -
    1829.     *
    1830. -
    1831.     * @return    object    MemModel 
    1832. -
    1833.     * @access    public
    1834. -
    1835.     */
    1836. -
    1837.     function reify({
    1838. -
    1839.  
    1840. -
    1841.         $memModel =$this->getMemModel();
    1842. -
    1843.         return $memModel->reify();
    1844. -
    1845.     }
    1846. -
    1847.  
    1848. -
    1849.     /**
    1850. -
    1851.     * Remove this DbModel from database and clean up.
    1852. -
    1853.     * This function monitors for SQL errors, and will commit if no errors have occured,
    1854. -
    1855.     * otherwise it will rollback.
    1856. -
    1857.     *
    1858. -
    1859.     * @throws  SqlError
    1860. -
    1861.     * @access    public
    1862. -
    1863.     */
    1864. -
    1865.     function delete({
    1866. -
    1867.  
    1868. -
    1869.         $this->dbConn->startTrans();
    1870. -
    1871.         $this->dbConn->execute('DELETE FROM models
    1872. -
    1873.                                   WHERE modelID=' .$this->modelID);
    1874. -
    1875.         $this->dbConn->execute('DELETE FROM statements
    1876. -
    1877.                                   WHERE modelID=' .$this->modelID);
    1878. -
    1879.  
    1880. -
    1881.         if (!$this->dbConn->completeTrans())
    1882. -
    1883.         echo $this->dbConn->errorMsg();
    1884. -
    1885.         else
    1886. -
    1887.         $this->close();
    1888. -
    1889.     }
    1890. -
    1891.  
    1892. -
    1893.  
    1894. -
    1895.     /**
    1896. -
    1897.     * Close this DbModel
    1898. -
    1899.     *
    1900. -
    1901.     * @access    public
    1902. -
    1903.     */
    1904. -
    1905.     function close({
    1906. -
    1907.  
    1908. -
    1909.         unset($this);
    1910. -
    1911.     }
    1912. -
    1913.  
    1914. -
    1915.  
    1916. -
    1917.     // =============================================================================
    1918. -
    1919.     // **************************** private methods ********************************
    1920. -
    1921.     // =============================================================================
    1922. -
    1923.  
    1924. -
    1925.  
    1926. -
    1927.  
    1928. -
    1929.  
    1930. -
    1931.  
    1932. -
    1933.     /**
    1934. -
    1935.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    1936. -
    1937.     * Used at setting the baseURI of this DbModel.
    1938. -
    1939.     *
    1940. -
    1941.     * @param   string  $uri 
    1942. -
    1943.     * @return  string 
    1944. -
    1945.     * @access    private
    1946. -
    1947.     */
    1948. -
    1949.     function _checkBaseURI($uri)  {
    1950. -
    1951.  
    1952. -
    1953.         if ($uri != NULL{
    1954. -
    1955.             $c substr($uristrlen($uri)-,1);
    1956. -
    1957.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    1958. -
    1959.             $uri .= '#';
    1960. -
    1961.         }
    1962. -
    1963.         return $uri;
    1964. -
    1965.     }
    1966. -
    1967.  
    1968. -
    1969.  
    1970. -
    1971.     /**'
    1972. -
    1973.     * Return the flag of the Node object.
    1974. -
    1975.     * r - Resource, b - BlankNode, l - Literal
    1976. -
    1977.     *
    1978. -
    1979.     * @param   object Node $object
    1980. -
    1981.     * @return  string
    1982. -
    1983.     * @access    private
    1984. -
    1985.     */
    1986. -
    1987.     function _getNodeFlag($object)  {
    1988. -
    1989.  
    1990. -
    1991.         return is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
    1992. -
    1993.     }
    1994. -
    1995.  
    1996. -
    1997.  
    1998. -
    1999.     /**
    2000. -
    2001.     * Convert an ADORecordSet to a memory Model.
    2002. -
    2003.     *
    2004. -
    2005.     * Every successful database query returns an ADORecordSet object which is actually
    2006. -
    2007.     * a cursor that holds the current row in the array fields[].
    2008. -
    2009.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2010. -
    2011.     * !!! This method can only be applied to a RecordSet with array fields[]
    2012. -
    2013.     * !!! containing a representation of the database table: statements,
    2014. -
    2015.     * !!! with an index corresponding to following table columns:
    2016. -
    2017.     * !!! [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2018. -
    2019.     * !!! [4] - l_datatype, [5] - subject_is, [6] - object_is
    2020. -
    2021.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2022. -
    2023.     *
    2024. -
    2025.     * @param   object  ADORecordSet 
    2026. -
    2027.     * @return  object  MemModel 
    2028. -
    2029.     * @access    private
    2030. -
    2031.     */
    2032. -
    2033.     function _convertRecordSetToMemModel(&$recordSet)  {
    2034. -
    2035.  
    2036. -
    2037.         $res new MemModel($this->baseURI);
    2038. -
    2039.         while (!$recordSet->EOF{
    2040. -
    2041.  
    2042. -
    2043.             // subject
    2044. -
    2045.             if ($recordSet->fields[5== 'r')
    2046. -
    2047.             $sub new Resource($recordSet->fields[0]);
    2048. -
    2049.             else
    2050. -
    2051.             $sub new BlankNode($recordSet->fields[0]);
    2052. -
    2053.  
    2054. -
    2055.             // predicate
    2056. -
    2057.             $pred new Resource($recordSet->fields[1]);
    2058. -
    2059.  
    2060. -
    2061.             // object
    2062. -
    2063.             if ($recordSet->fields[6== 'r')
    2064. -
    2065.             $obj new Resource($recordSet->fields[2]);
    2066. -
    2067.             elseif ($recordSet->fields[6== 'b')
    2068. -
    2069.             $obj new BlankNode($recordSet->fields[2]);
    2070. -
    2071.             else {
    2072. -
    2073.                 $obj new Literal($recordSet->fields[2]$recordSet->fields[3]);
    2074. -
    2075.                 if ($recordSet->fields[4])
    2076. -
    2077.                 $obj->setDatatype($recordSet->fields[4]);
    2078. -
    2079.             }
    2080. -
    2081.  
    2082. -
    2083.             $statement new Statement($sub$pred$obj);
    2084. -
    2085.             $res->add($statement);
    2086. -
    2087.  
    2088. -
    2089.             $recordSet->moveNext();
    2090. -
    2091.         }
    2092. -
    2093.         $res->addParsedNamespaces($this->getParsedNamespaces());
    2094. -
    2095.         return $res;
    2096. -
    2097.     }
    2098. -
    2099.  
    2100. -
    2101.  
    2102. -
    2103.     /**
    2104. -
    2105.     * Create the dynamic part of an sql statement selecting triples with the
    2106. -
    2107.     * given parameters ($subject, $predicate, $object).
    2108. -
    2109.     *
    2110. -
    2111.     * @param    object Resource    $subject 
    2112. -
    2113.     * @param    object Resource    $predicate 
    2114. -
    2115.     * @param    object Node    $object 
    2116. -
    2117.     * @return  string 
    2118. -
    2119.     * @access    private
    2120. -
    2121.     */
    2122. -
    2123.     function _createDynSqlPart_SPO($subject$predicate$object{
    2124. -
    2125.  
    2126. -
    2127.         // conditions derived from the parameters passed to the function
    2128. -
    2129.  
    2130. -
    2131.         $subject_is=is_a($subject,'BlankNode')?'b':(is_a($subject,'Resource')?'r':'l');
    2132. -
    2133.         $sql='';
    2134. -
    2135.         if ($subject != NULL)
    2136. -
    2137.         $sql .= " AND subject='" .$subject->getLabel(."'
    2138. -
    2139.                 AND subject_is='" .$subject_is ."'";
    2140. -
    2141.         if ($predicate != NULL)
    2142. -
    2143.         $sql .= " AND predicate='" .$predicate->getLabel(."'";
    2144. -
    2145.         if ($object != NULL{
    2146. -
    2147.             $object_is is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
    2148. -
    2149.             if (is_a($object'Resource'))
    2150. -
    2151.             $sql .= " AND object='" .$object->getLabel(."'
    2152. -
    2153.                    AND object_is ='" .$object_is ."'";
    2154. -
    2155.             else  {
    2156. -
    2157.                 $quotedLiteral $this->dbConn->qstr($object->getLabel());
    2158. -
    2159.                 $sql .= " AND object=" .$quotedLiteral ."
    2160. -
    2161.                    AND l_language='" .$object->getLanguage(."'
    2162. -
    2163.                    AND l_datatype='" .$object->getDataType(."'
    2164. -
    2165.                    AND object_is ='" .$object_is ."'";
    2166. -
    2167.             }
    2168. -
    2169.         }
    2170. -
    2171.         return $sql;
    2172. -
    2173.     }
    2174. -
    2175.  
    2176. -
    2177.  
    2178. -
    2179.     /**
    2180. -
    2181.     * Get an ADORecordSet with array fields[] containing a representation of
    2182. -
    2183.     * the given DbModel stored in the table: statements, with an index corresponding
    2184. -
    2185.     * to following table columns:
    2186. -
    2187.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2188. -
    2189.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2190. -
    2191.     * (This method operates on data from a DbModel without loading it into a memory model
    2192. -
    2193.     *  in order to save resources and improve speed).
    2194. -
    2195.     *
    2196. -
    2197.     * @param    object DbModel    $DbModel 
    2198. -
    2199.     * @return  object ADORecordSet 
    2200. -
    2201.     * @access    private
    2202. -
    2203.     */
    2204. -
    2205.     function _getRecordSet (&$dbModel{
    2206. -
    2207.  
    2208. -
    2209.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    2210. -
    2211.            FROM statements
    2212. -
    2213.            WHERE modelID = ' .$dbModel->modelID;
    2214. -
    2215.  
    2216. -
    2217.         return $recordSet =$this->dbConn->execute($sql);
    2218. -
    2219.     }
    2220. -
    2221.  
    2222. -
    2223.  
    2224. -
    2225.     /**
    2226. -
    2227.     * Check if this DbModel contains the given row from the array fields[] of an ADORecordSet
    2228. -
    2229.     * The array index corresponds to following table columns:
    2230. -
    2231.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2232. -
    2233.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2234. -
    2235.     *
    2236. -
    2237.     * @param   array  $row 
    2238. -
    2239.     * @return  boolean 
    2240. -
    2241.     * @access    private
    2242. -
    2243.     */
    2244. -
    2245.     function _containsRow ($row{
    2246. -
    2247.  
    2248. -
    2249.         $quotedObject $this->dbConn->qstr($row[2]);
    2250. -
    2251.         $sql "SELECT modelID FROM statements
    2252. -
    2253.            WHERE modelID = " .$this->modelID ."
    2254. -
    2255.            AND subject ='" .$row[0."'
    2256. -
    2257.            AND predicate ='" .$row[1."'
    2258. -
    2259.            AND object =" .$quotedObject ."
    2260. -
    2261.            AND l_language='" .$row[3."'
    2262. -
    2263.            AND l_datatype='" .$row[4."'
    2264. -
    2265.            AND subject_is='" .$row[5."'
    2266. -
    2267.            AND object_is='" .$row[6."'";
    2268. -
    2269.  
    2270. -
    2271.         $res =$this->dbConn->getOne($sql);
    2272. -
    2273.  
    2274. -
    2275.         if (!$res)
    2276. -
    2277.         return FALSE;
    2278. -
    2279.         return TRUE;
    2280. -
    2281.     }
    2282. -
    2283.  
    2284. -
    2285.  
    2286. -
    2287.  
    2288. -
    2289.  
    2290. -
    2291.  
    2292. -
    2293.     /**
    2294. -
    2295.     * Returns the models namespaces.
    2296. -
    2297.     *
    2298. -
    2299.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2300. -
    2301.     * @access   public
    2302. -
    2303.     * @return   Array 
    2304. -
    2305.     */
    2306. -
    2307.     function getParsedNamespaces(){
    2308. -
    2309.         $sql "SELECT * FROM namespaces
    2310. -
    2311.            WHERE modelID = " .$this->modelID;
    2312. -
    2313.         $temp=false;
    2314. -
    2315.         $res $this->dbConn->execute($sql);
    2316. -
    2317.         if($res){
    2318. -
    2319.             while (!$res->EOF{
    2320. -
    2321.                 $temp[$res->fields[1]]=$res->fields[2];
    2322. -
    2323.                 $res->moveNext();
    2324. -
    2325.             }
    2326. -
    2327.         }
    2328. -
    2329.         return $temp;
    2330. -
    2331.     }
    2332. -
    2333.  
    2334. -
    2335.  
    2336. -
    2337.  
    2338. -
    2339.     /**
    2340. -
    2341.     * Adds the namespaces to the model. This method is called by
    2342. -
    2343.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    2344. -
    2345.     * added namespaces in the model !!!!
    2346. -
    2347.     *
    2348. -
    2349.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2350. -
    2351.     * @access   public
    2352. -
    2353.     * @param    Array $newNs 
    2354. -
    2355.     */
    2356. -
    2357.     function addParsedNamespaces($newNs){
    2358. -
    2359.         if($newNs)
    2360. -
    2361.         foreach($newNs as $namespace => $prefix){
    2362. -
    2363.             $this->addNamespace($prefix$namespace);
    2364. -
    2365.         }
    2366. -
    2367.     }
    2368. -
    2369.  
    2370. -
    2371.  
    2372. -
    2373.     /**
    2374. -
    2375.     * Adds a namespace and prefix to the model.
    2376. -
    2377.     *
    2378. -
    2379.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2380. -
    2381.     * @access   public
    2382. -
    2383.     * @param    String $prefix, String $nmsp
    2384. -
    2385.     */
    2386. -
    2387.     function addNamespace($prefix,$nmsp){
    2388. -
    2389.  
    2390. -
    2391.         if($nmsp != '' && $prefix !=''){
    2392. -
    2393.             if($this->_checkNamespace($nmsp)){
    2394. -
    2395.                 $sql "UPDATE namespaces SET prefix='".$prefix."' WHERE
    2396. -
    2397.                 modelID=".$this->modelID." AND namespace='".$nmsp."'";
    2398. -
    2399.             }else{
    2400. -
    2401.                 $sql "INSERT INTO namespaces
    2402. -
    2403.                     (modelID, namespace, prefix)
    2404. -
    2405.                     VALUES
    2406. -
    2407.                     (" .$this->modelID .","
    2408. -
    2409.                 ."'" .$nmsp ."',"
    2410. -
    2411.                 ."'" .$prefix."')";
    2412. -
    2413.             }
    2414. -
    2415.  
    2416. -
    2417.             $rs =$this->dbConn->execute($sql);
    2418. -
    2419.             if (!$rs)
    2420. -
    2421.             $this->dbConn->errorMsg();
    2422. -
    2423.         }
    2424. -
    2425.     }
    2426. -
    2427.  
    2428. -
    2429.     /**
    2430. -
    2431.     * checks if a namespace is already in the model.
    2432. -
    2433.     *
    2434. -
    2435.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2436. -
    2437.     * @access   private
    2438. -
    2439.     * @param    Array $newNs 
    2440. -
    2441.     */
    2442. -
    2443.     function _checkNamespace($nmsp){
    2444. -
    2445.         $res true;
    2446. -
    2447.         $sql "SELECT * FROM namespaces
    2448. -
    2449.                WHERE modelID = " .$this->modelID." AND
    2450. -
    2451.             namespace='".$nmsp."'" ;
    2452. -
    2453.         $rs =$this->dbConn->execute($sql);
    2454. -
    2455.         if (!$rs){
    2456. -
    2457.             $this->dbConn->errorMsg();
    2458. -
    2459.         }else{
    2460. -
    2461.             if($rs->fields == false)
    2462. -
    2463.             $res false;
    2464. -
    2465.         }
    2466. -
    2467.         return $res;
    2468. -
    2469.  
    2470. -
    2471.  
    2472. -
    2473.     }
    2474. -
    2475.  
    2476. -
    2477.     /**
    2478. -
    2479.     * Returns a FindIterator for traversing the MemModel.
    2480. -
    2481.     * @access    public
    2482. -
    2483.     * @return    object    FindIterator 
    2484. -
    2485.     */
    2486. -
    2487.     function iterFind($sub=null,$pred=null,$obj=null{
    2488. -
    2489.         // Import Package Utility
    2490. -
    2491.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    2492. -
    2493.  
    2494. -
    2495.         $if new IterFind($this,$sub,$pred,$obj);
    2496. -
    2497.         return $if;
    2498. -
    2499.     }
    2500. -
    2501.  
    2502. -
    2503.     /**
    2504. -
    2505.     * removes a single namespace from the model
    2506. -
    2507.     *
    2508. -
    2509.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2510. -
    2511.     * @access   public
    2512. -
    2513.     * @param    String $nmsp 
    2514. -
    2515.     */
    2516. -
    2517.     function removeNamespace($nmsp){
    2518. -
    2519.  
    2520. -
    2521.         $sql 'DELETE FROM namespaces
    2522. -
    2523.            WHERE modelID=' .$this->modelID." AND namespace='".$nmsp."'";
    2524. -
    2525.  
    2526. -
    2527.         $rs =$this->dbConn->execute($sql);
    2528. -
    2529.         if (!$rs)
    2530. -
    2531.         $this->dbConn->errorMsg();
    2532. -
    2533.     }
    2534. -
    2535.  
    2536. -
    2537.  
    2538. -
    2539.  
    2540. -
    2541.  
    2542. -
    2543.     /**
    2544. -
    2545.     * Add the given row from the array fields[] of an ADORecordSet to this DbModel
    2546. -
    2547.     * The array index corresponds to following table columns:
    2548. -
    2549.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2550. -
    2551.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2552. -
    2553.     *
    2554. -
    2555.     * @param   array  $row 
    2556. -
    2557.     * @throws  SqlError
    2558. -
    2559.     * @access    private
    2560. -
    2561.     *
    2562. -
    2563.     function _insertRow ($row) {
    2564. -
    2565.  
    2566. -
    2567.     $quotedObject = $this->dbConn->qstr($row[2]);
    2568. -
    2569.     $sql = "INSERT INTO statements VALUES
    2570. -
    2571.     (" .$this->modelID .","
    2572. -
    2573.     ."'" .$row[0] ."',"
    2574. -
    2575.     ."'" .$row[1] ."',"
    2576. -
    2577.     .""  .$quotedObject .","
    2578. -
    2579.     ."'" .$row[3] ."',"
    2580. -
    2581.     ."'" .$row[4] ."',"
    2582. -
    2583.     ."'" .$row[5] ."',"
    2584. -
    2585.     ."'" .$row[6] ."')";
    2586. -
    2587.  
    2588. -
    2589.     $rs =& $this->dbConn->execute($sql);
    2590. -
    2591.     if (!$rs)
    2592. -
    2593.     $this->dbConn->errorMsg();
    2594. -
    2595.     }
    2596. -
    2597.     */
    2598. -
    2599.  
    2600. -
    2601. // end: Class DbModel
    2602. -
    2603. ?>
    2604. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbStore.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbStore.php.html.svn-base deleted file mode 100755 index e0f99467..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelDbStore.php.html.svn-base +++ /dev/null @@ -1,729 +0,0 @@ - - - - - - File Source for DbStore.php - - - - - -

    Source for file DbStore.php

    -

    Documentation is available at DbStore.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'constants.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    6. -
    7.  
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DbStore
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19.  * DbStore is a persistent store of RDF data using relational database technology.
    20. -
    21.  * DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB),
    22. -
    23.  * which allows to connect to multiple databases in a portable manner.
    24. -
    25.  * This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server.
    26. -
    27.  * If you want to use other databases, you will have to create tables by yourself
    28. -
    29.  * according to the abstract database schema described in the API documentation.
    30. -
    31.  *
    32. -
    33.  * You can activate debug mode by defining ADODB_DEBUG_MODE to "1".
    34. -
    35.  *
    36. -
    37.  *
    38. -
    39.  * @version  $Id$
    40. -
    41.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    42. -
    43.  * @author   Daniel Westphal (http://www.d-westphal.de)
    44. -
    45.  *
    46. -
    47.  * @package model
    48. -
    49.  * @access    public
    50. -
    51.  */
    52. -
    53.  
    54. -
    55.  
    56. -
    57. class DbStore extends Object{
    58. -
    59.  
    60. -
    61. /**
    62. -
    63.  * Database connection object
    64. -
    65.  *
    66. -
    67.  * @var     object ADOConnection 
    68. -
    69.  * @access    private
    70. -
    71.  */
    72. -
    73.  var $dbConn;
    74. -
    75.  
    76. -
    77.  
    78. -
    79. /**
    80. -
    81.  * Constructor:
    82. -
    83.  * Set the database connection with the given parameters.
    84. -
    85.  *
    86. -
    87.  * @param   string   $dbDriver 
    88. -
    89.  * @param   string   $host 
    90. -
    91.  * @param   string   $dbName 
    92. -
    93.  * @param   string   $user 
    94. -
    95.  * @param   string   $password 
    96. -
    97.  * @access    public
    98. -
    99.  */
    100. -
    101.  function DbStore ($dbDriver=ADODB_DB_DRIVER$host=ADODB_DB_HOST$dbName=ADODB_DB_NAME,
    102. -
    103.                    $user=ADODB_DB_USER$password=ADODB_DB_PASSWORD{
    104. -
    105.  
    106. -
    107.    // include DBase Package
    108. -
    109.    require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    110. -
    111.  
    112. -
    113.    // create a new connection object
    114. -
    115.    $this->dbConn =ADONewConnection($dbDriver);
    116. -
    117.  
    118. -
    119.    //activate the ADOdb DEBUG mode
    120. -
    121.    if (ADODB_DEBUG_MODE == '1')
    122. -
    123.         $this->dbConn->debug true;
    124. -
    125.  
    126. -
    127.    // connect to database
    128. -
    129.    $r $this->dbConn->connect($host$user$password$dbName);
    130. -
    131.    if ($r !== true{
    132. -
    133.       throw new Exception('Could not connect to database');
    134. -
    135.    }
    136. -
    137.  
    138. -
    139.    // optimized for speed
    140. -
    141.    $this->dbConn->setFetchMode(ADODB_FETCH_NUM);
    142. -
    143.    //$ADODB_COUNTRECS = FALSE;
    144. -
    145.  }
    146. -
    147.  
    148. -
    149.  
    150. -
    151. /**
    152. -
    153.  * Create tables and indexes for the given database type.
    154. -
    155.  * Currently supported: MsAccess and MySQL.
    156. -
    157.  * If you want to use other databases, you will have to create tables by yourself
    158. -
    159.  * according to the abstract <a href="database_schema.html">database schema</a>
    160. -
    161.  * described in the API documentation.
    162. -
    163.  *
    164. -
    165.  * @param   string  $databaseType 
    166. -
    167.  * @throws    PhpError
    168. -
    169.  * @access    public
    170. -
    171.  */
    172. -
    173.  function createTables($databaseType{
    174. -
    175.  
    176. -
    177.    if (!strcasecmp($databaseType'MsAccess'))
    178. -
    179.    $this->_createTables_MsAccess();
    180. -
    181.    elseif (!strcasecmp($databaseType'MySQL'))
    182. -
    183.        $this->_createTables_MySql();
    184. -
    185.    elseif (!strcasecmp($databaseType'MSSQL'))
    186. -
    187.            $this->_createTables_mssql();
    188. -
    189.    else {
    190. -
    191.        $errmsg RDFAPI_ERROR "(classDbStoremethodcreateTables('$databaseType')):
    192. -
    193.                                   Currently only MsAccesMySQL and MSSQL supported.";
    194. -
    195.        trigger_error($errmsgE_USER_ERROR);
    196. -
    197.    }
    198. -
    199.  }
    200. -
    201.  
    202. -
    203.  
    204. -
    205. /**
    206. -
    207.  * List all DbModels stored in the database.
    208. -
    209.  *
    210. -
    211.  * @return  array 
    212. -
    213.  * @throws    SqlError
    214. -
    215.  * @access    public
    216. -
    217.  */
    218. -
    219.  function listModels({
    220. -
    221.  
    222. -
    223.    $recordSet =$this->dbConn->execute("SELECT modelURI, baseURI
    224. -
    225.                                          FROM models");
    226. -
    227.    if (!$recordSet)
    228. -
    229.       echo $this->dbConn->errorMsg();
    230. -
    231.    else {
    232. -
    233.       $models array();
    234. -
    235.       $i=0;
    236. -
    237.       while (!$recordSet->EOF{
    238. -
    239.  
    240. -
    241.           $models[$i]['modelURI'$recordSet->fields[0];
    242. -
    243.           $models[$i]['baseURI'$recordSet->fields[1];
    244. -
    245.  
    246. -
    247.           ++$i;
    248. -
    249.           $recordSet->moveNext();
    250. -
    251.       }
    252. -
    253.       return $models;
    254. -
    255.    }
    256. -
    257.  }
    258. -
    259.  
    260. -
    261.  
    262. -
    263. /**
    264. -
    265.  * Check if the DbModel with the given modelURI is already stored in the database
    266. -
    267.  *
    268. -
    269.  * @param   string   $modelURI 
    270. -
    271.  * @return  boolean 
    272. -
    273.  * @throws    SqlError
    274. -
    275.  * @access    public
    276. -
    277.  */
    278. -
    279.  function modelExists($modelURI{
    280. -
    281.  
    282. -
    283.    $res =$this->dbConn->execute("SELECT COUNT(*) FROM models
    284. -
    285.                                    WHERE modelURI = '" .$modelURI ."'");
    286. -
    287.    if (!$res)
    288. -
    289.       echo $this->dbConn->errorMsg();
    290. -
    291.    else {
    292. -
    293.       if (!$res->fields[0]{
    294. -
    295.           $res->Close();
    296. -
    297.          return FALSE;
    298. -
    299.       else {
    300. -
    301.           $res->Close();
    302. -
    303.           return TRUE;
    304. -
    305.       }
    306. -
    307.    }
    308. -
    309.  }
    310. -
    311.  
    312. -
    313.  
    314. -
    315. /**
    316. -
    317.  * Create a new instance of DbModel with the given $modelURI and
    318. -
    319.  * load the corresponding values of modelID and baseURI from the database.
    320. -
    321.  * Return FALSE if the DbModel does not exist.
    322. -
    323.  *
    324. -
    325.  * @param   string   $modelURI 
    326. -
    327.  * @return  object DbModel 
    328. -
    329.  * @access    public
    330. -
    331.  */
    332. -
    333.  function getModel($modelURI{
    334. -
    335.  
    336. -
    337.    if (!$this->modelExists($modelURI))
    338. -
    339.       return FALSE;
    340. -
    341.    else {
    342. -
    343.       $modelVars =$this->dbConn->execute("SELECT modelURI, modelID, baseURI
    344. -
    345.                                             FROM models
    346. -
    347.                                             WHERE modelURI='" .$modelURI ."'");
    348. -
    349.  
    350. -
    351.       return new DbModel($this->dbConn$modelVars->fields[0],
    352. -
    353.                          $modelVars->fields[1]$modelVars->fields[2]);
    354. -
    355.    }
    356. -
    357.  }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. /**
    364. -
    365.  * Create a new instance of DbModel with the given $modelURI
    366. -
    367.  * and insert the DbModel variables into the database.
    368. -
    369.  * Return FALSE if there is already a model with the given URI.
    370. -
    371.  *
    372. -
    373.  * @param   string   $modelURI 
    374. -
    375.  * @param   string   $baseURI 
    376. -
    377.  * @return  object DbModel 
    378. -
    379.  * @throws  SqlError
    380. -
    381.  * @access    public
    382. -
    383.  */
    384. -
    385.  function getNewModel($modelURI$baseURI=NULL{
    386. -
    387.  
    388. -
    389.    if ($this->modelExists($modelURI))
    390. -
    391.       return FALSE;
    392. -
    393.    else {
    394. -
    395.       $modelID $this->_createUniqueModelID();
    396. -
    397.  
    398. -
    399.       $rs =$this->dbConn->execute("INSERT INTO models
    400. -
    401.                                             (modelID, modelURI, baseURI)
    402. -
    403.                                             VALUES ('" .$modelID ."',
    404. -
    405.                                                     '" .$modelURI ."',
    406. -
    407.                                                     '" .$baseURI ."')");
    408. -
    409.       if (!$rs)
    410. -
    411.          $this->dbConn->errorMsg();
    412. -
    413.       else
    414. -
    415.          return new DbModel($this->dbConn$modelURI$modelID$baseURI);
    416. -
    417.    }
    418. -
    419.  }
    420. -
    421.  
    422. -
    423.  
    424. -
    425. /**
    426. -
    427.  * Store a MemModel or another DbModel from a different DbStore in the database.
    428. -
    429.  * Return FALSE if there is already a model with modelURI matching the modelURI
    430. -
    431.  * of the given model.
    432. -
    433.  *
    434. -
    435.  * @param   object Model  &$model 
    436. -
    437.  * @param   string $modelURI 
    438. -
    439.  * @return  boolean 
    440. -
    441.  * @access    public
    442. -
    443.  */
    444. -
    445.  function putModel(&$model$modelURI=NULL{
    446. -
    447.  
    448. -
    449.    if (!$modelURI{
    450. -
    451.       if (is_a($model'MemModel'))
    452. -
    453.          $modelURI 'DbModel-' .$this->_createUniqueModelID();
    454. -
    455.       else
    456. -
    457.          $modelURI $model->modelURI;
    458. -
    459.    }else
    460. -
    461.       if ($this->modelExists($modelURI))
    462. -
    463.          return FALSE;
    464. -
    465.  
    466. -
    467.  
    468. -
    469.    $newDbModel $this->getNewModel($modelURI$model->getBaseURI());
    470. -
    471.    $newDbModel->addModel($model);
    472. -
    473.  }
    474. -
    475.  
    476. -
    477.  
    478. -
    479. /**
    480. -
    481.  * Close the DbStore.
    482. -
    483.  * !!! Warning: If you close the DbStore all active instances of DbModel from this
    484. -
    485.  * !!!          DbStore will lose their database connection !!!
    486. -
    487.  *
    488. -
    489.  * @access    public
    490. -
    491.  */
    492. -
    493.  function close({
    494. -
    495.  
    496. -
    497.    $this->dbConn->close();
    498. -
    499.    unset($this);
    500. -
    501.  }
    502. -
    503.  
    504. -
    505.  
    506. -
    507. // =============================================================================
    508. -
    509. // **************************** private methods ********************************
    510. -
    511. // =============================================================================
    512. -
    513.  
    514. -
    515.  
    516. -
    517. /**
    518. -
    519.  * Create a unique ID for the DbModel to be insert into the models table.
    520. -
    521.  * This method was implemented because some databases do not support auto-increment.
    522. -
    523.  *
    524. -
    525.  * @return  integer 
    526. -
    527.  * @access    private
    528. -
    529.  */
    530. -
    531.  function _createUniqueModelID({
    532. -
    533.  
    534. -
    535.    $maxModelID =$this->dbConn->GetOne('SELECT MAX(modelID) FROM models');
    536. -
    537.    return ++$maxModelID;
    538. -
    539.  }
    540. -
    541.  
    542. -
    543.  /**
    544. -
    545.  * Create a unique ID for the dataset to be insert into the datasets table.
    546. -
    547.  * This method was implemented because some databases do not support auto-increment.
    548. -
    549.  *
    550. -
    551.  * @return  integer 
    552. -
    553.  * @access    private
    554. -
    555.  */
    556. -
    557.  function _createUniqueDatasetID({
    558. -
    559.  
    560. -
    561.    $maxDatasetID =$this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets');
    562. -
    563.    return ++$maxDatasetID;
    564. -
    565.  }
    566. -
    567.  
    568. -
    569.  
    570. -
    571. /**
    572. -
    573.  * Create tables and indexes for MsAccess database
    574. -
    575.  *
    576. -
    577.  * @throws  SqlError
    578. -
    579.  * @access    private
    580. -
    581.  */
    582. -
    583.  function _createTables_MsAccess({
    584. -
    585.  
    586. -
    587.    $this->dbConn->startTrans();
    588. -
    589.  
    590. -
    591.    $this->dbConn->execute('CREATE TABLE models
    592. -
    593.                            (modelID long primary key,
    594. -
    595.                             modelURI varchar not null,
    596. -
    597.                             baseURI varchar)');
    598. -
    599.  
    600. -
    601.    $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
    602. -
    603.  
    604. -
    605.    $this->dbConn->execute('CREATE TABLE statements
    606. -
    607.                            (modelID long,
    608. -
    609.                             subject varchar,
    610. -
    611.                             predicate varchar,
    612. -
    613.                             object Memo,
    614. -
    615.                             l_language varchar,
    616. -
    617.                             l_datatype varchar,
    618. -
    619.                             subject_is varchar(1),
    620. -
    621.                             object_is varchar(1),
    622. -
    623.                             primary key (modelID, subject, predicate, object,
    624. -
    625.                                          l_language, l_datatype))');
    626. -
    627.  
    628. -
    629.    $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
    630. -
    631.    $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)');
    632. -
    633.    $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)');
    634. -
    635.    $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)');
    636. -
    637.  
    638. -
    639.      $this->dbConn->execute('CREATE TABLE namespaces
    640. -
    641.                            (modelID long,
    642. -
    643.                             namespace varchar,
    644. -
    645.                             prefix varchar,
    646. -
    647.                             primary key (modelID, namespace, prefix))');
    648. -
    649.  
    650. -
    651.    $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)');
    652. -
    653.    $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)');
    654. -
    655.  
    656. -
    657.      $this->dbConn->execute("CREATE TABLE datasets
    658. -
    659.                            (datasetName varchar,
    660. -
    661.                               defaultModelUri varchar,
    662. -
    663.                             primary key (datasetName))");
    664. -
    665.  
    666. -
    667.    $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)');
    668. -
    669.  
    670. -
    671.  
    672. -
    673.    $this->dbConn->execute("CREATE TABLE `dataset_model` (
    674. -
    675.                               datasetName varchar,
    676. -
    677.                               modelId long,
    678. -
    679.                             graphURI varchar,
    680. -
    681.                             PRIMARY KEY  (modelId,datasetName))");
    682. -
    683.  
    684. -
    685.  
    686. -
    687.    if (!$this->dbConn->completeTrans())
    688. -
    689.       echo $this->dbConn->errorMsg();
    690. -
    691.  }
    692. -
    693.  
    694. -
    695.  
    696. -
    697. /**
    698. -
    699.  * Create tables and indexes for MySQL database
    700. -
    701.  *
    702. -
    703.  * @throws  SqlError
    704. -
    705.  * @access    private
    706. -
    707.  */
    708. -
    709.  function _createTables_MySql({
    710. -
    711.  
    712. -
    713.    $this->dbConn->startTrans();
    714. -
    715.  
    716. -
    717.    $this->dbConn->execute("CREATE TABLE models
    718. -
    719.                            (modelID bigint NOT NULL,
    720. -
    721.                             modelURI varchar(255) NOT NULL,
    722. -
    723.                             baseURI varchar(255) DEFAULT '',
    724. -
    725.                             primary key (modelID))");
    726. -
    727.  
    728. -
    729.    $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
    730. -
    731.  
    732. -
    733.    $this->dbConn->execute("CREATE TABLE statements
    734. -
    735.                            (modelID bigint NOT NULL,
    736. -
    737.                             subject varchar(255) NOT NULL,
    738. -
    739.                             predicate varchar(255) NOT NULL,
    740. -
    741.                             object text,
    742. -
    743.                             l_language varchar(255) DEFAULT '',
    744. -
    745.                             l_datatype varchar(255) DEFAULT '',
    746. -
    747.                             subject_is varchar(1) NOT NULL,
    748. -
    749.                             object_is varchar(1) NOT NULL)");
    750. -
    751.  
    752. -
    753.    $this->dbConn->execute("CREATE TABLE namespaces
    754. -
    755.                            (modelID bigint NOT NULL,
    756. -
    757.                             namespace varchar(255) NOT NULL,
    758. -
    759.                             prefix varchar(255) NOT NULL,
    760. -
    761.                                primary key (modelID,namespace))");
    762. -
    763.  
    764. -
    765.   $this->dbConn->execute("CREATE TABLE `dataset_model` (
    766. -
    767.                               `datasetName` varchar(255) NOT NULL default '0',
    768. -
    769.                               `modelId` bigint(20) NOT NULL default '0',
    770. -
    771.                             `graphURI` varchar(255) NOT NULL default '',
    772. -
    773.                              PRIMARY KEY  (`modelId`,`datasetName`))");
    774. -
    775.  
    776. -
    777.   $this->dbConn->execute("CREATE TABLE `datasets` (
    778. -
    779.                               `datasetName` varchar(255) NOT NULL default '',
    780. -
    781.                             `defaultModelUri` varchar(255) NOT NULL default '0',
    782. -
    783.                              PRIMARY KEY  (`datasetName`),
    784. -
    785.                              KEY `datasetName` (`datasetName`))");
    786. -
    787.  
    788. -
    789.    $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
    790. -
    791.    $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)');
    792. -
    793.  
    794. -
    795.    $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements
    796. -
    797.                           (subject(200),predicate(200))');
    798. -
    799.  
    800. -
    801.    $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject(200))');
    802. -
    803.    $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate(200))');
    804. -
    805.    $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))');
    806. -
    807.  
    808. -
    809.    $this->dbConn->execute('CREATE FULLTEXT INDEX s_obj_ftidx ON statements (object)');
    810. -
    811.  
    812. -
    813.    if (!$this->dbConn->completeTrans())
    814. -
    815.       echo $this->dbConn->errorMsg();
    816. -
    817.  }
    818. -
    819.  
    820. -
    821.  /**
    822. -
    823.  * Create tables and indexes for MSSQL database
    824. -
    825.  *
    826. -
    827.  * @throws  SqlError
    828. -
    829.  * @access    private
    830. -
    831.  */
    832. -
    833.  function _createTables_mssql(){
    834. -
    835.  
    836. -
    837.    $this->dbConn->startTrans();
    838. -
    839.  
    840. -
    841.    $this->dbConn->execute("CREATE TABLE [dbo].[models] (
    842. -
    843.                             [modelID] [int] NOT NULL ,
    844. -
    845.                             [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    846. -
    847.                             [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    848. -
    849.                             ) ON [PRIMARY]");
    850. -
    851.  
    852. -
    853.    $this->dbConn->execute("CREATE TABLE [dbo].[statements] (
    854. -
    855.                             [modelID] [int] NOT NULL ,
    856. -
    857.                             [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    858. -
    859.                             [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    860. -
    861.                             [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    862. -
    863.                             [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    864. -
    865.                             [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    866. -
    867.                             [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    868. -
    869.                             [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    870. -
    871.                             ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]");
    872. -
    873.  
    874. -
    875.  
    876. -
    877.     $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] (
    878. -
    879.                             [modelID] [int] NOT NULL ,
    880. -
    881.                             [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    882. -
    883.                             [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    884. -
    885.                             ) ON [PRIMARY]");
    886. -
    887.  
    888. -
    889.    $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD
    890. -
    891.                             CONSTRAINT [PK_models] PRIMARY KEY  CLUSTERED
    892. -
    893.                             (
    894. -
    895.                                 [modelID]
    896. -
    897.                             )  ON [PRIMARY] ");
    898. -
    899.    $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD
    900. -
    901.                             CONSTRAINT [PK_namespaces] PRIMARY KEY  CLUSTERED
    902. -
    903.                             (
    904. -
    905.                                 [modelID],[namespace]
    906. -
    907.                             )  ON [PRIMARY] ");
    908. -
    909.  
    910. -
    911.    $this->dbConn->execute("CREATE  INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]");
    912. -
    913.  
    914. -
    915.  
    916. -
    917.    if (!$this->dbConn->completeTrans())
    918. -
    919.        echo $this->dbConn->errorMsg();
    920. -
    921.  
    922. -
    923.  }
    924. -
    925.  
    926. -
    927.  
    928. -
    929.   /**
    930. -
    931.   * Checks if tables are setup for RAP
    932. -
    933.   *
    934. -
    935.   * @param   string  $databaseType 
    936. -
    937.   * @throws SqlError
    938. -
    939.   * @access public
    940. -
    941.   ***/
    942. -
    943.  function isSetup($databaseType="MySQL"{
    944. -
    945.    if ($databaseType=="MySQL")
    946. -
    947.      return $this->_isSetup_MySql();
    948. -
    949.     if ($databaseType=="MSSQL")
    950. -
    951.      return $this->_isSetup_MSSQL();
    952. -
    953.    else {
    954. -
    955.        if ($databaseType=='MsAccess'){
    956. -
    957.            return $this->_isSetup_MsAccess();
    958. -
    959.        }else{
    960. -
    961.      $errmsg=RDFAPI_ERROR."(classDbStoremethod isSetup('$databaseType')):\nCurrently only MySQLMsAccess and MSSQL are supported!";
    962. -
    963.      trigger_error($errmsgE_USER_ERROR);}
    964. -
    965.    }
    966. -
    967.  }
    968. -
    969.  
    970. -
    971.  /**
    972. -
    973.   * Checks if tables are setup for RAP (MySql)
    974. -
    975.   *
    976. -
    977.   * @throws SqlError
    978. -
    979.   * @access private
    980. -
    981.   ***/
    982. -
    983.  function _isSetup_MySql({
    984. -
    985.    $recordSet =$this->dbConn->execute("SHOW TABLES");
    986. -
    987.    if (!$recordSet)
    988. -
    989.      echo $this->dbConn->errorMsg();
    990. -
    991.    else {
    992. -
    993.      $tables array();
    994. -
    995.      while (!$recordSet->EOF{
    996. -
    997.  
    998. -
    999.        $tables[]$recordSet->fields[0];
    1000. -
    1001.  
    1002. -
    1003.        if(isset($i)){++$i;}
    1004. -
    1005.        $recordSet->moveNext();
    1006. -
    1007.      }
    1008. -
    1009.      if (in_array("models",$tables&& in_array("statements",$tables)&& in_array("namespaces",$tables)) return true;
    1010. -
    1011.    }
    1012. -
    1013.    return false;
    1014. -
    1015.  
    1016. -
    1017.  }
    1018. -
    1019.  
    1020. -
    1021.  
    1022. -
    1023.   /**
    1024. -
    1025.   * Checks if tables are setup for RAP (MsAccess)
    1026. -
    1027.   *
    1028. -
    1029.   * @throws SqlError
    1030. -
    1031.   * @access private
    1032. -
    1033.   ***/
    1034. -
    1035.  function _isSetup_MsAccess({
    1036. -
    1037.        $tables =$this->dbConn->MetaTables();
    1038. -
    1039.        if (!$tables)
    1040. -
    1041.      echo $this->dbConn->errorMsg();
    1042. -
    1043.    if (count($tables)==0){
    1044. -
    1045.      return false;}
    1046. -
    1047.    else {
    1048. -
    1049.            if (in_array("models",$tables&& in_array("statements",$tables&& in_array("namespaces",$tables))return true;
    1050. -
    1051.            }else{return false;}
    1052. -
    1053.    }
    1054. -
    1055.  }
    1056. -
    1057.  
    1058. -
    1059.   /**
    1060. -
    1061.   * Checks if tables are setup for RAP (MSSQL)
    1062. -
    1063.   *
    1064. -
    1065.   * @throws SqlError
    1066. -
    1067.   * @access private
    1068. -
    1069.   ***/
    1070. -
    1071.  function _isSetup_MSSQL({
    1072. -
    1073.        $tables =$this->dbConn->MetaTables();
    1074. -
    1075.        if (!$tables)
    1076. -
    1077.      echo $this->dbConn->errorMsg();
    1078. -
    1079.    if (count($tables)==0){
    1080. -
    1081.      return false;}
    1082. -
    1083.    else {
    1084. -
    1085.            if (in_array("models",$tables&& in_array("statements",$tables&& in_array("namespaces",$tables))return true;
    1086. -
    1087.            }else{return false;}
    1088. -
    1089.    }
    1090. -
    1091.  }
    1092. -
    1093.  
    1094. -
    1095.  
    1096. -
    1097.  /**
    1098. -
    1099.  * Create a new instance of DatasetDb with the given $datasetName
    1100. -
    1101.  * and insert the DatasetDb variables into the database.
    1102. -
    1103.  * Return FALSE if there is already a model with the given URI.
    1104. -
    1105.  *
    1106. -
    1107.  * @param   $datasetName string
    1108. -
    1109.  * @return  object DatasetDB 
    1110. -
    1111.  * @throws  SqlError
    1112. -
    1113.  * @access    public
    1114. -
    1115.  */
    1116. -
    1117.  function getNewDatasetDb($datasetName)
    1118. -
    1119.  {
    1120. -
    1121.  
    1122. -
    1123.      require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1124. -
    1125.  
    1126. -
    1127.    if ($this->datasetExists($datasetName))
    1128. -
    1129.       return FALSE;
    1130. -
    1131.    else
    1132. -
    1133.    {
    1134. -
    1135.            $defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_');
    1136. -
    1137.            $defaultModel=$this->getNewModel($defaultModelUri);
    1138. -
    1139.  
    1140. -
    1141.           $rs =$this->dbConn->execute("INSERT INTO datasets
    1142. -
    1143.                                             VALUES ('" .$datasetName ."',
    1144. -
    1145.                                                     '" .$defaultModelUri."')");
    1146. -
    1147.  
    1148. -
    1149.       if (!$rs)
    1150. -
    1151.          $this->dbConn->errorMsg();
    1152. -
    1153.       else
    1154. -
    1155.         $return=new DatasetDb($this->dbConn$this$datasetName);
    1156. -
    1157.            return ($return);
    1158. -
    1159.    }
    1160. -
    1161.  }
    1162. -
    1163.  
    1164. -
    1165.  /**
    1166. -
    1167.  * Check if the Dataset with the given $datasetName is already stored in the database
    1168. -
    1169.  *
    1170. -
    1171.  * @param   $datasetName string
    1172. -
    1173.  * @return  boolean 
    1174. -
    1175.  * @throws    SqlError
    1176. -
    1177.  * @access    public
    1178. -
    1179.  */
    1180. -
    1181. function datasetExists($datasetName{
    1182. -
    1183.  
    1184. -
    1185.    $res =$this->dbConn->execute("SELECT COUNT(*) FROM datasets
    1186. -
    1187.                                    WHERE datasetName = '" .$datasetName ."'");
    1188. -
    1189.    if (!$res)
    1190. -
    1191.       echo $this->dbConn->errorMsg();
    1192. -
    1193.    else {
    1194. -
    1195.       if (!$res->fields[0])
    1196. -
    1197.          return FALSE;
    1198. -
    1199.       return TRUE;
    1200. -
    1201.    }
    1202. -
    1203.  }
    1204. -
    1205.  
    1206. -
    1207.  
    1208. -
    1209.  /**
    1210. -
    1211.  * Create a new instance of DatasetDb with the given $datasetName and
    1212. -
    1213.  * load the corresponding values from the database.
    1214. -
    1215.  * Return FALSE if the DbModel does not exist.
    1216. -
    1217.  *
    1218. -
    1219.  * @param   $datasetId string
    1220. -
    1221.  * @return  object DatasetDb 
    1222. -
    1223.  * @access    public
    1224. -
    1225.  */
    1226. -
    1227.  function &getDatasetDb($datasetName{
    1228. -
    1229.     require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1230. -
    1231.  
    1232. -
    1233.     if (!$this->datasetExists($datasetName)) {
    1234. -
    1235.         return FALSE;
    1236. -
    1237.     else {
    1238. -
    1239.         $return new DatasetDb($this->dbConn$this$datasetName);
    1240. -
    1241.         return ($return);
    1242. -
    1243.     }
    1244. -
    1245.  }
    1246. -
    1247.  
    1248. -
    1249.  /**
    1250. -
    1251.  * Create a new instance of namedGraphDb with the given $modelURI and graphName and
    1252. -
    1253.  * load the corresponding values of modelID and baseURI from the database.
    1254. -
    1255.  * Return FALSE if the DbModel does not exist.
    1256. -
    1257.  *
    1258. -
    1259.  * @param   $modelURI string
    1260. -
    1261.  * @param   $graphName string
    1262. -
    1263.  * @return  object NamedGraphMem 
    1264. -
    1265.  * @access    public
    1266. -
    1267.  */
    1268. -
    1269.  function getNamedGraphDb($modelURI$graphName)
    1270. -
    1271.  {
    1272. -
    1273.     require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1274. -
    1275.  
    1276. -
    1277.    if (!$this->modelExists($modelURI))
    1278. -
    1279.       return FALSE;
    1280. -
    1281.    else {
    1282. -
    1283.       $modelVars =$this->dbConn->execute("SELECT modelURI, modelID, baseURI
    1284. -
    1285.                                             FROM models
    1286. -
    1287.                                             WHERE modelURI='" .$modelURI ."'");
    1288. -
    1289.  
    1290. -
    1291.       return new NamedGraphDb($this->dbConn$modelVars->fields[0],
    1292. -
    1293.                          $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    1294. -
    1295.    }
    1296. -
    1297.  }
    1298. -
    1299.  
    1300. -
    1301.  /**
    1302. -
    1303.  * Create a new instance of namedGraphDb with the given $modelURI and graphName
    1304. -
    1305.  * and insert the DbModel variables into the database (not the graphName. This
    1306. -
    1307.  * is only stored persistently, when added to dataset).
    1308. -
    1309.  * Return FALSE if there is already a model with the given URI.
    1310. -
    1311.  *
    1312. -
    1313.  * @param   $modelURI string
    1314. -
    1315.  * @param      $graphName string
    1316. -
    1317.  * @param   $baseURI string
    1318. -
    1319.  * @return  object namedGraphDb 
    1320. -
    1321.  * @throws  SqlError
    1322. -
    1323.  * @access    public
    1324. -
    1325.  */
    1326. -
    1327.  function getNewNamedGraphDb($modelURI$graphName$baseURI=NULL{
    1328. -
    1329.  
    1330. -
    1331.    if ($this->modelExists($modelURI))
    1332. -
    1333.       return FALSE;
    1334. -
    1335.    else {
    1336. -
    1337.       $modelID $this->_createUniqueModelID();
    1338. -
    1339.  
    1340. -
    1341.       $rs =$this->dbConn->execute("INSERT INTO models
    1342. -
    1343.                                             (modelID, modelURI, baseURI)
    1344. -
    1345.                                             VALUES ('" .$modelID ."',
    1346. -
    1347.                                                     '" .$modelURI ."',
    1348. -
    1349.                                                     '" .$baseURI ."')");
    1350. -
    1351.       if (!$rs)
    1352. -
    1353.          $this->dbConn->errorMsg();
    1354. -
    1355.       else
    1356. -
    1357.          return new NamedGraphDb($this->dbConn$modelURI$modelID$graphName$baseURI);
    1358. -
    1359.    }
    1360. -
    1361.  }
    1362. -
    1363.  
    1364. -
    1365.  /**
    1366. -
    1367.  * Removes the graph with all statements from the database.
    1368. -
    1369.  * Warning: A single namedGraph can be added to several datasets. So it'll be
    1370. -
    1371.  * removed from all datasets.
    1372. -
    1373.  *
    1374. -
    1375.  * @param   $modelURI string
    1376. -
    1377.  * @return  boolean 
    1378. -
    1379.  * @throws  SqlError
    1380. -
    1381.  * @access    public
    1382. -
    1383.  */
    1384. -
    1385.  function removeNamedGraphDb($modelURI)
    1386. -
    1387.  {
    1388. -
    1389.     if (!$this->modelExists($modelURI))
    1390. -
    1391.         return FALSE;
    1392. -
    1393.  
    1394. -
    1395.     $modelID $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'");
    1396. -
    1397.  
    1398. -
    1399.     $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID);
    1400. -
    1401.     $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID);
    1402. -
    1403.     $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID);
    1404. -
    1405.  
    1406. -
    1407.     return true;
    1408. -
    1409.  }
    1410. -
    1411.  
    1412. -
    1413. // end: Class DbStore
    1414. -
    1415. ?>
    1416. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelLiteral.php.html.svn-base deleted file mode 100755 index 729f8373..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelLiteral.php.html.svn-base +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - File Source for Literal.php - - - - - -

    Source for file Literal.php

    -

    Documentation is available at Literal.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Node.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Literal
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF literal.
    18. -
    19.  * The literal supports the xml:lang and rdf:datatype property.
    20. -
    21.  * For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
    22. -
    23.  *
    24. -
    25.  * @version  $Id$
    26. -
    27.  * @author Chris Bizer <chris@bizer.de>
    28. -
    29.  * @author Daniel Westphal <dawe@gmx.de>
    30. -
    31.  *
    32. -
    33.  * @package model
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  */
    40. -
    41.  class Literal extends Node {
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Label of the literal
    48. -
    49.     * @var        string 
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $label;
    56. -
    57.    /**
    58. -
    59.     * Language of the literal
    60. -
    61.     * @var        string 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $lang;
    68. -
    69.  
    70. -
    71.    /**
    72. -
    73.     * Datatype of the literal
    74. -
    75.     * @var        string 
    76. -
    77.     * @access    private
    78. -
    79.     */
    80. -
    81.     var $dtype;
    82. -
    83.  
    84. -
    85.  
    86. -
    87.    /**
    88. -
    89.     * Constructor
    90. -
    91.     *
    92. -
    93.     * @param    string    $str            label of the literal
    94. -
    95.     * @param     string $language        optional language identifier
    96. -
    97.     *
    98. -
    99.     */
    100. -
    101.     function Literal($str$language NULL{
    102. -
    103.         $this->dtype NULL;
    104. -
    105.         $this->label $str;
    106. -
    107.  
    108. -
    109.         if ($language != NULL{
    110. -
    111.             $this->lang $language;
    112. -
    113.         else {
    114. -
    115.             $this->lang NULL;
    116. -
    117.         }
    118. -
    119.  
    120. -
    121.  
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.   /**
    128. -
    129.    * Returns the string value of the literal.
    130. -
    131.    *
    132. -
    133.    * @access    public
    134. -
    135.    * @return    string value of the literal
    136. -
    137.    */
    138. -
    139.   function getLabel({
    140. -
    141.  
    142. -
    143.     return $this->label;
    144. -
    145.   }
    146. -
    147.  
    148. -
    149.   /**
    150. -
    151.    * Returns the language of the literal.
    152. -
    153.    *
    154. -
    155.    * @access    public
    156. -
    157.    * @return    string language of the literal
    158. -
    159.    */
    160. -
    161.   function getLanguage({
    162. -
    163.  
    164. -
    165.     return $this->lang;
    166. -
    167.   }
    168. -
    169.  
    170. -
    171.   /**
    172. -
    173.    * Sets the language of the literal.
    174. -
    175.    *
    176. -
    177.    * @access    public
    178. -
    179.    * @param        string $lang 
    180. -
    181.    */
    182. -
    183.   function setLanguage($lang{
    184. -
    185.  
    186. -
    187.     $this->lang $lang;
    188. -
    189.   }
    190. -
    191.  
    192. -
    193.   /**
    194. -
    195.    * Returns the datatype of the literal.
    196. -
    197.    *
    198. -
    199.    * @access    public
    200. -
    201.    * @return    string datatype of the literal
    202. -
    203.    */
    204. -
    205.   function getDatatype({
    206. -
    207.  
    208. -
    209.     return $this->dtype;
    210. -
    211.   }
    212. -
    213.  
    214. -
    215.   /**
    216. -
    217.    * Sets the datatype of the literal.
    218. -
    219.    * Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER.
    220. -
    221.    * The array $short_datatype with the possible shortcuts is definded in ../constants.php
    222. -
    223.    *
    224. -
    225.    * @access    public
    226. -
    227.    * @param        string URI of XML datatype or datatype shortcut
    228. -
    229.    *
    230. -
    231.    */
    232. -
    233.   function setDatatype($datatype{
    234. -
    235.     GLOBAL $short_datatype;
    236. -
    237.     if  (stristr($datatype,DATATYPE_SHORTCUT_PREFIX))  {
    238. -
    239.         $this->dtype $short_datatype[substr($datatype,strlen(DATATYPE_SHORTCUT_PREFIX)) ];}
    240. -
    241.     else
    242. -
    243.         $this->dtype $datatype;
    244. -
    245.   }
    246. -
    247.  
    248. -
    249.   /**
    250. -
    251.    * Checks if ihe literal equals another literal.
    252. -
    253.    * Two literals are equal, if they have the same label and they
    254. -
    255.    * have the same language/datatype or both have no language/datatype property set.
    256. -
    257.    *
    258. -
    259.    * @access    public
    260. -
    261.    * @param        object    literal $that 
    262. -
    263.    * @return    boolean 
    264. -
    265.    */
    266. -
    267.   function equals ($that{
    268. -
    269.  
    270. -
    271.     if (($that == NULLor !(is_a($that'Literal'))) {
    272. -
    273.       return false;
    274. -
    275.     }
    276. -
    277.  
    278. -
    279.     if ( ($this->label == $that->getLabel()) && ( ( ($this->lang == $that->getLanguage()) ||
    280. -
    281.        ($this->lang == NULL && $that->getLanguage(== NULL) )  &&
    282. -
    283.  
    284. -
    285.        (
    286. -
    287.        ($this->dtype == $that->getDatatype(||
    288. -
    289.        ($this->dtype == NULL && $that->getDatatype(== NULL)) ) ) )
    290. -
    291.          {
    292. -
    293.             return true;
    294. -
    295.          }
    296. -
    297.  
    298. -
    299.     return false;
    300. -
    301.   }
    302. -
    303.  
    304. -
    305.   /**
    306. -
    307.    * Dumps literal.
    308. -
    309.    *
    310. -
    311.    * @access    public
    312. -
    313.    * @return    string 
    314. -
    315.    */
    316. -
    317.   function toString({
    318. -
    319.     $dump 'Literal("' $this->label .'"';
    320. -
    321.     if ($this->lang != NULL)
    322. -
    323.         $dump .= ', lang="' $this->lang .'"';
    324. -
    325.     if ($this->dtype != NULL)
    326. -
    327.         $dump .= ', datatype="' $this->dtype .'"';
    328. -
    329.     $dump .= ')';
    330. -
    331.     return $dump;
    332. -
    333.   }
    334. -
    335.  
    336. -
    337.  
    338. -
    339. // end: Literal
    340. -
    341.  
    342. -
    343. ?>
    344. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelMemModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelMemModel.php.html.svn-base deleted file mode 100755 index c986efe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelMemModel.php.html.svn-base +++ /dev/null @@ -1,1481 +0,0 @@ - - - - - - File Source for MemModel.php - - - - - -

    Source for file MemModel.php

    -

    Documentation is available at MemModel.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Model.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: MemModel
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * A MemModel is an RDF Model, which is stored in the main memory.
    16. -
    17. * This class provides methods for manipulating MemModels.
    18. -
    19. *
    20. -
    21. *
    22. -
    23. *
    24. -
    25. @version  $Id$
    26. -
    27. @author Chris Bizer <chris@bizer.de>
    28. -
    29. @author Gunnar AAstrand Grimnes <ggrimnes@csd.abdn.ac.uk>
    30. -
    31. @author Radoslaw Oldakowski <radol@gmx.de>
    32. -
    33. @author Daniel Westphal <mail@d-westphal.de>
    34. -
    35. @author Tobias Gauß <tobias.gauss@web.de>
    36. -
    37. *
    38. -
    39. @package model
    40. -
    41. @access    public
    42. -
    43. */
    44. -
    45.  
    46. -
    47. class MemModel extends Model {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Triples of the MemModel
    54. -
    55.     * @var        array 
    56. -
    57.     * @access    private
    58. -
    59.     */
    60. -
    61.     var $triples array();
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Array containing the search indices
    68. -
    69.     * @var        array['INDEX_TYPE'][]['label'][]['PosInModel'] 
    70. -
    71.     *
    72. -
    73.     * @access   private
    74. -
    75.     */
    76. -
    77.     var $indexArr ;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * depending on which index is used this variable is -1,0,1,2 or 3
    86. -
    87.     *
    88. -
    89.     * -1 : no index
    90. -
    91.     *  0 : default indices over subject, predicate, object separate
    92. -
    93.     *  1 : index over subject+predicate+object
    94. -
    95.     *  2 : index over subject+predicate
    96. -
    97.     *  3 : index over subject+object
    98. -
    99.     *
    100. -
    101.     * @var        int 
    102. -
    103.     * @access    private
    104. -
    105.     */
    106. -
    107.     var $indexed;
    108. -
    109.  
    110. -
    111.  
    112. -
    113.  
    114. -
    115.     /**
    116. -
    117.     * Array of namespaces
    118. -
    119.     *
    120. -
    121.     * @var     array 
    122. -
    123.     * @access    private
    124. -
    125.     */
    126. -
    127.     var $parsedNamespaces=array();
    128. -
    129.  
    130. -
    131.  
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Constructor
    138. -
    139.     * You can supply a base_uri
    140. -
    141.     *
    142. -
    143.     * @param string $baseURI 
    144. -
    145.     * @access    public
    146. -
    147.     */
    148. -
    149.     function MemModel($baseURI NULL{
    150. -
    151.         $this->setBaseURI($baseURI);
    152. -
    153.         $this->indexed INDEX_TYPE;
    154. -
    155.     }
    156. -
    157.  
    158. -
    159.     /**
    160. -
    161.     * Set a base URI for the MemModel.
    162. -
    163.     * Affects creating of new resources and serialization syntax.
    164. -
    165.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    166. -
    167.     * @param    string    $uri 
    168. -
    169.     * @access    public
    170. -
    171.     */
    172. -
    173.     function setBaseURI($uri{
    174. -
    175.  
    176. -
    177.         if ($uri != NULL{
    178. -
    179.             $c substr($uristrlen($uri)-,1);
    180. -
    181.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    182. -
    183.             $uri .= '#';
    184. -
    185.         }
    186. -
    187.         $this->baseURI $uri;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.  
    194. -
    195.     /**
    196. -
    197.     * Number of triples in the MemModel
    198. -
    199.     *
    200. -
    201.     * @return    integer 
    202. -
    203.     * @access    public
    204. -
    205.     */
    206. -
    207.     function size({
    208. -
    209.         return count($this->triples);
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     /**
    216. -
    217.     * Checks if MemModel is empty
    218. -
    219.     *
    220. -
    221.     * @return    boolean 
    222. -
    223.     * @access    public
    224. -
    225.     */
    226. -
    227.     function isEmpty({
    228. -
    229.         if (count($this->triples== 0{
    230. -
    231.             return TRUE;
    232. -
    233.         else {
    234. -
    235.             return FALSE;
    236. -
    237.         };
    238. -
    239.     }
    240. -
    241.  
    242. -
    243.  
    244. -
    245.     /**
    246. -
    247.     * Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    248. -
    249.     * So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add())
    250. -
    251.     *
    252. -
    253.     * @param        object Statement    $statement 
    254. -
    255.     * @access    public
    256. -
    257.     * @throws    PhpError
    258. -
    259.     */
    260. -
    261.     function add($statement{
    262. -
    263.         if (!is_a($statement'Statement')) {
    264. -
    265.             $errmsg RDFAPI_ERROR '(class: MemModel; method: add): Statement expected.';
    266. -
    267.             trigger_error($errmsgE_USER_ERROR);
    268. -
    269.         }
    270. -
    271.  
    272. -
    273.         if($this->indexed != -1){
    274. -
    275.             $this->triples[$statement;
    276. -
    277.             end($this->triples);
    278. -
    279.             $k=key($this->triples);
    280. -
    281.             if($this->indexed==0){
    282. -
    283.                 // index over S
    284. -
    285.                 $this->_indexOpr($statement,$k,4,1);
    286. -
    287.                 // index over P
    288. -
    289.                 $this->_indexOpr($statement,$k,5,1);
    290. -
    291.                 // index over O
    292. -
    293.                 $this->_indexOpr($statement,$k,6,1);
    294. -
    295.             }else{
    296. -
    297.                 $this->_indexOpr($statement,$k,$this->indexed,1);
    298. -
    299.             }
    300. -
    301.  
    302. -
    303.         }else{
    304. -
    305.             $this->triples[$statement;
    306. -
    307.         }
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  
    316. -
    317.     /**
    318. -
    319.     * Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    320. -
    321.     * addWithoutDuplicates() is significantly slower then add().
    322. -
    323.     * Retruns TRUE if the statement is added.
    324. -
    325.     * FALSE otherwise.
    326. -
    327.     *
    328. -
    329.     * @param    object Statement    $statement 
    330. -
    331.     * @return    boolean 
    332. -
    333.     * @access    public
    334. -
    335.     * @throws    PhpError
    336. -
    337.     */
    338. -
    339.     function addWithoutDuplicates($statement{
    340. -
    341.  
    342. -
    343.         if (!is_a($statement'Statement')) {
    344. -
    345.             $errmsg RDFAPI_ERROR '(class: MemModel; method: addWithoutDuplicates): Statement expected.';
    346. -
    347.             trigger_error($errmsgE_USER_ERROR);
    348. -
    349.         }
    350. -
    351.  
    352. -
    353.         if (!$this->contains($statement)) {
    354. -
    355.             $this->add($statement);
    356. -
    357.             return true;
    358. -
    359.         }else{
    360. -
    361.             return false;
    362. -
    363.         }
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.     * Removes the triple from the MemModel.
    372. -
    373.     * TRUE if the triple is removed.
    374. -
    375.     * FALSE otherwise.
    376. -
    377.     *
    378. -
    379.     * @param        object Statement    $statement 
    380. -
    381.     * @return    boolean 
    382. -
    383.     * @access    public
    384. -
    385.     * @throws    PhpError
    386. -
    387.     */
    388. -
    389.     function remove($statement{
    390. -
    391.  
    392. -
    393.         if (!is_a($statement'Statement')) {
    394. -
    395.             $errmsg RDFAPI_ERROR '(class: MemModel; method: remove): Statement expected.';
    396. -
    397.             trigger_error($errmsgE_USER_ERROR);
    398. -
    399.         }
    400. -
    401.         if($this->indexed==-1){
    402. -
    403.             $pass=false;
    404. -
    405.             foreach($this->triples as $key => $value{
    406. -
    407.                 if ($this->matchStatement($value$statement->subject()$statement->predicate()$statement->object())) {
    408. -
    409.                     unset($this->triples[$key]);
    410. -
    411.                     $passtrue;
    412. -
    413.                 }
    414. -
    415.             }
    416. -
    417.             return $pass;
    418. -
    419.         }else{
    420. -
    421.             $knull;
    422. -
    423.             if($this->indexed==0){
    424. -
    425.                 $pass=false;
    426. -
    427.                 $del=false;
    428. -
    429.                 while($del!=-1){
    430. -
    431.                     // index over S
    432. -
    433.                     $del=$this->_indexOpr($statement,$k,4,0);
    434. -
    435.                     // index over P
    436. -
    437.                     $this->_indexOpr($statement,$k,5,0);
    438. -
    439.                     // index over O
    440. -
    441.                     $this->_indexOpr($statement,$k,6,0);
    442. -
    443.                     if($del!=-1){
    444. -
    445.                         unset($this->triples[$del]);
    446. -
    447.                         $pass=true;
    448. -
    449.                     }
    450. -
    451.                 }
    452. -
    453.                 return $pass;
    454. -
    455.             }else{
    456. -
    457.                 $pass=false;
    458. -
    459.                 $del=false;
    460. -
    461.                 while($del!=-1){
    462. -
    463.                     $del=$this->_indexOpr($statement,$k,$this->indexed,0);
    464. -
    465.                     if($del!=-1){
    466. -
    467.                         unset($this->triples[$del]);
    468. -
    469.                         $pass=true;
    470. -
    471.                     }
    472. -
    473.                 }
    474. -
    475.                 return $pass;
    476. -
    477.             }
    478. -
    479.         }
    480. -
    481.     }
    482. -
    483.  
    484. -
    485.     /**
    486. -
    487.     * Short Dump of the MemModel.
    488. -
    489.     *
    490. -
    491.     * @access    public
    492. -
    493.     * @return    string 
    494. -
    495.     */
    496. -
    497.     function toString({
    498. -
    499.         return 'MemModel[baseURI=' $this->getBaseURI(';  size=' $this->size(']';
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     /**
    506. -
    507.     * Dumps of the MemModel including all triples.
    508. -
    509.     *
    510. -
    511.     * @access    public
    512. -
    513.     * @return    string 
    514. -
    515.     */
    516. -
    517.     function toStringIncludingTriples({
    518. -
    519.         $dump $this->toString(chr(13);
    520. -
    521.         foreach($this->triples as $value{
    522. -
    523.             $dump .= $value->toString(chr(13);
    524. -
    525.         }
    526. -
    527.         return $dump;
    528. -
    529.     }
    530. -
    531.  
    532. -
    533.  
    534. -
    535.  
    536. -
    537.  
    538. -
    539.     /**
    540. -
    541.     * Writes the RDF serialization of the MemModel as HTML.
    542. -
    543.     *
    544. -
    545.     * @access    public
    546. -
    547.     */
    548. -
    549.     function writeAsHtml({
    550. -
    551.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    552. -
    553.         $ser new RdfSerializer();
    554. -
    555.         $rdf =$ser->serialize($this);
    556. -
    557.         $rdf htmlspecialchars($rdfENT_QUOTES);
    558. -
    559.         $rdf str_replace(' ''&nbsp;'$rdf);
    560. -
    561.         $rdf nl2br($rdf);
    562. -
    563.         echo $rdf;
    564. -
    565.     }
    566. -
    567.  
    568. -
    569.     /**
    570. -
    571.     * Writes the RDF serialization of the MemModel as HTML table.
    572. -
    573.     *
    574. -
    575.     * @access    public
    576. -
    577.     */
    578. -
    579.     function writeAsHtmlTable({
    580. -
    581.         // Import Package Utility
    582. -
    583.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    584. -
    585.         RDFUtil::writeHTMLTable($this);
    586. -
    587.     }
    588. -
    589.  
    590. -
    591.  
    592. -
    593.     /**
    594. -
    595.     * Writes the RDF serialization of the MemModel as HTML table.
    596. -
    597.     *
    598. -
    599.     * @access    public
    600. -
    601.     * @return    string 
    602. -
    603.     */
    604. -
    605.     function writeRdfToString({
    606. -
    607.         // Import Package Syntax
    608. -
    609.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    610. -
    611.         $ser new RdfSerializer();
    612. -
    613.         $rdf =$ser->serialize($this);
    614. -
    615.         return $rdf;
    616. -
    617.     }
    618. -
    619.  
    620. -
    621.  
    622. -
    623.     /**
    624. -
    625.     * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    626. -
    627.     * You can decide to which format the model should be serialized by using a
    628. -
    629.     * corresponding suffix-string as $type parameter. If no $type parameter
    630. -
    631.     * is placed this method will serialize the model to XML/RDF format.
    632. -
    633.     * Returns FALSE if the MemModel couldn't be saved to the file.
    634. -
    635.     *
    636. -
    637.     * @access    public
    638. -
    639.     * @param     string     $filename 
    640. -
    641.     * @param     string     $type 
    642. -
    643.     * @throws   PhpError
    644. -
    645.     * @return    boolean 
    646. -
    647.     */
    648. -
    649.     function saveAs($filename$type ='rdf'{
    650. -
    651.  
    652. -
    653.  
    654. -
    655.         // get suffix and create a corresponding serializer
    656. -
    657.         if ($type=='rdf'{
    658. -
    659.             // Import Package Syntax
    660. -
    661.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    662. -
    663.             $ser=new RdfSerializer();
    664. -
    665.         }elseif ($type=='nt'{
    666. -
    667.             // Import Package Syntax
    668. -
    669.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    670. -
    671.             $ser=new NTripleSerializer();
    672. -
    673.         }elseif ($type=='n3'{
    674. -
    675.             // Import Package Syntax
    676. -
    677.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    678. -
    679.             $ser=new N3Serializer();
    680. -
    681.         }else {
    682. -
    683.             print ('Serializer type not properly defined. Use the strings "rdf","n3" or "nt".');
    684. -
    685.             return false;
    686. -
    687.         };
    688. -
    689.  
    690. -
    691.         return $ser->saveAs($this$filename);
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.  
    698. -
    699.     /**
    700. -
    701.     * Tests if the MemModel contains the given triple.
    702. -
    703.     * TRUE if the triple belongs to the MemModel;
    704. -
    705.     * FALSE otherwise.
    706. -
    707.     *
    708. -
    709.     * @param    object Statement    &$statement 
    710. -
    711.     * @return    boolean 
    712. -
    713.     * @access    public
    714. -
    715.     */
    716. -
    717.     function contains(&$statement{
    718. -
    719.  
    720. -
    721.         // no index ->linear contains
    722. -
    723.         if ($this->indexed==-1){
    724. -
    725.             foreach($this->triples as $value{
    726. -
    727.                 if ($value->equals($statement)){
    728. -
    729.                     return TRUE}
    730. -
    731.             }
    732. -
    733.             return false;
    734. -
    735.         }
    736. -
    737.         if ($this->indexed==0){
    738. -
    739.             $res $this->_containsIndex($statement,4);
    740. -
    741.             return $res;
    742. -
    743.         }else{
    744. -
    745.             return $this->_containsIndex($statement,$this->indexed);
    746. -
    747.         }
    748. -
    749.     }
    750. -
    751.  
    752. -
    753.  
    754. -
    755.     /**
    756. -
    757.     * Determine if all of the statements in a model are also contained in this MemModel.
    758. -
    759.     * True if all of the statements in $model are also contained in this MemModel and false otherwise.
    760. -
    761.     *
    762. -
    763.     * @param    object Model    &$model 
    764. -
    765.     * @return    boolean 
    766. -
    767.     * @access    public
    768. -
    769.     */
    770. -
    771.     function containsAll(&$model{
    772. -
    773.  
    774. -
    775.         if (is_a($model'MemModel')) {
    776. -
    777.  
    778. -
    779.             foreach($model->triples as $statement)
    780. -
    781.             if(!$this->contains($statement))
    782. -
    783.             return FALSE;
    784. -
    785.             return TRUE;
    786. -
    787.  
    788. -
    789.         }elseif (is_a($model'DbModel'))
    790. -
    791.  
    792. -
    793.         return $model->containsAll($this);
    794. -
    795.  
    796. -
    797.         $errmsg RDFAPI_ERROR '(class: MemModel; method: containsAll): Model expected.';
    798. -
    799.         trigger_error($errmsgE_USER_ERROR);
    800. -
    801.     }
    802. -
    803.  
    804. -
    805.     /**
    806. -
    807.     * Determine if any of the statements in a model are also contained in this MemModel.
    808. -
    809.     * True if any of the statements in $model are also contained in this MemModel and false otherwise.
    810. -
    811.     *
    812. -
    813.     * @param    object Model    &$model 
    814. -
    815.     * @return    boolean 
    816. -
    817.     * @access    public
    818. -
    819.     */
    820. -
    821.     function containsAny(&$model{
    822. -
    823.  
    824. -
    825.         if (is_a($model'MemModel')) {
    826. -
    827.  
    828. -
    829.             foreach($model->triples as $modelStatement)
    830. -
    831.             if($this->contains($modelStatement))
    832. -
    833.             return TRUE;
    834. -
    835.             return FALSE;
    836. -
    837.  
    838. -
    839.         }elseif (is_a($model'DbModel'))
    840. -
    841.  
    842. -
    843.         return $model->containsAny($this);
    844. -
    845.  
    846. -
    847.         $errmsg RDFAPI_ERROR '(class: MemModel; method: containsAll): Model expected.';
    848. -
    849.         trigger_error($errmsgE_USER_ERROR);
    850. -
    851.     }
    852. -
    853.  
    854. -
    855.  
    856. -
    857.     /**
    858. -
    859.     * Builds a search index for the statements in the MemModel.
    860. -
    861.     * The index is used by the find(),contains(),add() and remove() functions.
    862. -
    863.     * Performance example using a model with 43000 statements on a Linux machine:
    864. -
    865.     * Find without index takes 1.7 seconds.
    866. -
    867.     * Indexing takes 1.8 seconds.
    868. -
    869.     * Find with index takes 0.001 seconds.
    870. -
    871.     * So if you want to query a model more then once, build a index first.
    872. -
    873.     * The defaultindex is indices over subject, predicate, object seperate.
    874. -
    875.     *
    876. -
    877.     * mode = 0    : indices over subject,predicate,object (default)
    878. -
    879.     * mode = 1     : index over subject+predicate+object
    880. -
    881.     * mode = 2      : index over subject+predicate
    882. -
    883.     * mode = 3     : index over subject+object
    884. -
    885.     *
    886. -
    887.     * @param     int $mode 
    888. -
    889.     * @access    public
    890. -
    891.     */
    892. -
    893.     function index($mode{
    894. -
    895.  
    896. -
    897.         unset($this->indexArr);
    898. -
    899.         $this->indexArr=array();
    900. -
    901.         switch($mode){
    902. -
    903.             // unset indices
    904. -
    905.             case -1:
    906. -
    907.             $this->indexed=-1;
    908. -
    909.             unset($this->indexArr);
    910. -
    911.             break;
    912. -
    913.             // index over SPO
    914. -
    915.             case 0:
    916. -
    917.             $this->indexed=0;
    918. -
    919.             foreach($this->triples as $k => $t{
    920. -
    921.                 // index over S
    922. -
    923.                 $this->_indexOpr($t,$k,4,1);
    924. -
    925.                 // index over P
    926. -
    927.                 $this->_indexOpr($t,$k,5,1);
    928. -
    929.                 // index over O
    930. -
    931.                 $this->_indexOpr($t,$k,6,1);
    932. -
    933.             }
    934. -
    935.             break;
    936. -
    937.             default:
    938. -
    939.             $this->indexed=$mode;
    940. -
    941.             foreach($this->triples as $k => $t{
    942. -
    943.                 $this->_indexOpr($t,$k,$this->indexed,1);
    944. -
    945.             }
    946. -
    947.             break;
    948. -
    949.         }
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.  
    956. -
    957.     /**
    958. -
    959.     * Returns     true if there is an index, false if not.
    960. -
    961.     *
    962. -
    963.     * @return    boolean 
    964. -
    965.     * @access    public
    966. -
    967.     */
    968. -
    969.     function isIndexed({
    970. -
    971.         if($this->indexed!=-1){
    972. -
    973.             return TRUE;
    974. -
    975.         }else{
    976. -
    977.             return FALSE;
    978. -
    979.         }
    980. -
    981.     }
    982. -
    983.  
    984. -
    985.     /**
    986. -
    987.     * Returns the indextype:
    988. -
    989.     * -1 if there is no index, 0 if there are indices over S,P,O(separate),
    990. -
    991.     * 1 if there is an index over SPO, 2 if there is an index over SP and 3 if
    992. -
    993.     * there is an index over SO.
    994. -
    995.     *
    996. -
    997.     * @return int 
    998. -
    999.     * @access public
    1000. -
    1001.     *
    1002. -
    1003.     */
    1004. -
    1005.     function getIndexType(){
    1006. -
    1007.         return $this->indexed;
    1008. -
    1009.     }
    1010. -
    1011.  
    1012. -
    1013.     /**
    1014. -
    1015.     * General method to search for triples.
    1016. -
    1017.     * NULL input for any parameter will match anything.
    1018. -
    1019.     * Example:  $result = $m->find( NULL, NULL, $node );
    1020. -
    1021.     * Finds all triples with $node as object.
    1022. -
    1023.     * Returns an empty MemModel if nothing is found.
    1024. -
    1025.     *
    1026. -
    1027.     * @param    object Node    $subject 
    1028. -
    1029.     * @param    object Node    $predicate 
    1030. -
    1031.     * @param    object Node    $object 
    1032. -
    1033.     * @return    object MemModel 
    1034. -
    1035.     * @access    public
    1036. -
    1037.     * @throws    PhpError
    1038. -
    1039.     */
    1040. -
    1041.  
    1042. -
    1043.     function find($subject,$predicate,$object{
    1044. -
    1045.  
    1046. -
    1047.         if (
    1048. -
    1049.         (!is_a($subject'Resource'&& $subject != NULL||
    1050. -
    1051.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1052. -
    1053.         (!is_a($object'Node'&& $object != NULL)
    1054. -
    1055.         {
    1056. -
    1057.             $errmsg RDFAPI_ERROR '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
    1058. -
    1059.             trigger_error($errmsgE_USER_ERROR);
    1060. -
    1061.         }
    1062. -
    1063.  
    1064. -
    1065.         $res new MemModel($this->getBaseURI());
    1066. -
    1067.         $res->indexed=-1;
    1068. -
    1069.  
    1070. -
    1071.         if($this->isEmpty())
    1072. -
    1073.         return $res;
    1074. -
    1075.  
    1076. -
    1077.         if($subject == NULL && $predicate == NULL && $object == NULL)
    1078. -
    1079.         return $this;
    1080. -
    1081.  
    1082. -
    1083.         switch($this->indexed){
    1084. -
    1085.             case 1:
    1086. -
    1087.             if($subject!=NULL && $predicate != NULL && $object != NULL){
    1088. -
    1089.                 $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
    1090. -
    1091.                 return $this->_findInIndex($pos,$subject,$predicate,$object,1);
    1092. -
    1093.             }else{
    1094. -
    1095.                 break;
    1096. -
    1097.             }
    1098. -
    1099.  
    1100. -
    1101.             case 2:
    1102. -
    1103.             if($subject!=NULL && $predicate != NULL){
    1104. -
    1105.                 $pos=$subject->getLabel().$predicate->getLabel();
    1106. -
    1107.                 return $this->_findInIndex($pos,$subject,$predicate,$object,2);
    1108. -
    1109.             }else{
    1110. -
    1111.                 break;
    1112. -
    1113.             }
    1114. -
    1115.  
    1116. -
    1117.             case 3:
    1118. -
    1119.             if($subject!=NULL && $object != NULL){
    1120. -
    1121.                 $pos=$subject->getLabel().$object->getLabel();
    1122. -
    1123.                 return $this->_findInIndex($pos,$subject,$predicate,$object,3);
    1124. -
    1125.             }else{
    1126. -
    1127.                 break;
    1128. -
    1129.             }
    1130. -
    1131.             case 0:
    1132. -
    1133.             if($subject!= null){
    1134. -
    1135.                 $pos=$subject->getLabel();
    1136. -
    1137.                 return $this->_findInIndex($pos,$subject,$predicate,$object,4);
    1138. -
    1139.             }
    1140. -
    1141.             if($predicate!= null){
    1142. -
    1143.                 $pos=$predicate->getLabel();
    1144. -
    1145.                 return $this->_findInIndex($pos,$subject,$predicate,$object,5);
    1146. -
    1147.             }
    1148. -
    1149.             if($object!= null){
    1150. -
    1151.                 $pos=$object->getLabel();
    1152. -
    1153.                 return $this->_findInIndex($pos,$subject,$predicate,$object,6);
    1154. -
    1155.             }
    1156. -
    1157.         }
    1158. -
    1159.         // if no index: linear search
    1160. -
    1161.         foreach($this->triples as $value{
    1162. -
    1163.             if ($this->matchStatement($value$subject$predicate$object))
    1164. -
    1165.             $res->add($value);
    1166. -
    1167.         }
    1168. -
    1169.         return $res;
    1170. -
    1171.  
    1172. -
    1173.     }
    1174. -
    1175.  
    1176. -
    1177.  
    1178. -
    1179.  
    1180. -
    1181.  
    1182. -
    1183.  
    1184. -
    1185.     /**
    1186. -
    1187.     * Method to search for triples using Perl-style regular expressions.
    1188. -
    1189.     * NULL input for any parameter will match anything.
    1190. -
    1191.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    1192. -
    1193.     * Finds all triples where the label of the object node matches the regular expression.
    1194. -
    1195.     * Returns an empty MemModel if nothing is found.
    1196. -
    1197.     *
    1198. -
    1199.     * @param    string    $subject_regex 
    1200. -
    1201.     * @param    string    $predicate_regex 
    1202. -
    1203.     * @param    string    $object_regex 
    1204. -
    1205.     * @return    object MemModel 
    1206. -
    1207.     * @access    public
    1208. -
    1209.     */
    1210. -
    1211.     function findRegex($subject_regex$predicate_regex$object_regex{
    1212. -
    1213.  
    1214. -
    1215.         $res new MemModel($this->getBaseURI());
    1216. -
    1217.  
    1218. -
    1219.         if($this->size(== 0)
    1220. -
    1221.         return $res;
    1222. -
    1223.  
    1224. -
    1225.         if($subject_regex == NULL && $predicate_regex == NULL && $object_regex == NULL)
    1226. -
    1227.         return $this;
    1228. -
    1229.  
    1230. -
    1231.         foreach($this->triples as $value{
    1232. -
    1233.             if (
    1234. -
    1235.             ($subject_regex == NULL || preg_match($subject_regex$value->subj->getLabel())) &&
    1236. -
    1237.             ($predicate_regex == NULL || preg_match($predicate_regex$value->pred->getLabel())) &&
    1238. -
    1239.             ($object_regex == NULL || preg_match($object_regex$value->obj->getLabel()))
    1240. -
    1241.             $res->add($value);
    1242. -
    1243.         }
    1244. -
    1245.  
    1246. -
    1247.         return $res;
    1248. -
    1249.  
    1250. -
    1251.     }
    1252. -
    1253.  
    1254. -
    1255.     /**
    1256. -
    1257.     * Returns all tripels of a certain vocabulary.
    1258. -
    1259.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
    1260. -
    1261.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    1262. -
    1263.     * Returns an empty MemModel if nothing is found.
    1264. -
    1265.     *
    1266. -
    1267.     * @param    string    $vocabulary 
    1268. -
    1269.     * @return    object MemModel 
    1270. -
    1271.     * @access    public
    1272. -
    1273.     */
    1274. -
    1275.     function findVocabulary($vocabulary{
    1276. -
    1277.  
    1278. -
    1279.         if($this->size(== 0)
    1280. -
    1281.         return new MemModel();
    1282. -
    1283.         if($vocabulary == NULL || $vocabulary == '')
    1284. -
    1285.         return $this;
    1286. -
    1287.  
    1288. -
    1289.         $res new MemModel($this->getBaseURI());
    1290. -
    1291.         if($this->indexed==0){
    1292. -
    1293.             foreach($this->indexArr[5as $key => $value){
    1294. -
    1295.                 $pos=strpos($key,'#')+1;
    1296. -
    1297.                 if(substr($key,0,$pos)==$vocabulary){
    1298. -
    1299.                     for($i=1;$i<=$value[0];$i++){
    1300. -
    1301.                         $res->add($this->triples[$value[$i]]);
    1302. -
    1303.                     }
    1304. -
    1305.                 }
    1306. -
    1307.             }
    1308. -
    1309.             return $res;
    1310. -
    1311.         }else{
    1312. -
    1313.             // Import Package Utility
    1314. -
    1315.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    1316. -
    1317.             foreach($this->triples as $value{
    1318. -
    1319.                 if (RDFUtil::getNamespace($value->getPredicate()) == $vocabulary)
    1320. -
    1321.                 $res->add($value);
    1322. -
    1323.             }
    1324. -
    1325.             return $res;
    1326. -
    1327.         }
    1328. -
    1329.     }
    1330. -
    1331.  
    1332. -
    1333.     /**
    1334. -
    1335.     * Searches for triples and returns the first matching statement.
    1336. -
    1337.     * NULL input for any parameter will match anything.
    1338. -
    1339.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    1340. -
    1341.     * Returns the first statement of the MemModel where the object equals $node.
    1342. -
    1343.     * Returns an NULL if nothing is found.
    1344. -
    1345.     * You can define an offset to search for. Default = 0
    1346. -
    1347.     *
    1348. -
    1349.     * @param    object Node    $subject 
    1350. -
    1351.     * @param    object Node    $predicate 
    1352. -
    1353.     * @param    object Node    $object 
    1354. -
    1355.     * @param    integer    $offset 
    1356. -
    1357.     * @return    object Statement 
    1358. -
    1359.     * @access    public
    1360. -
    1361.     */
    1362. -
    1363.     function findFirstMatchingStatement($subject$predicate$object$offset 0{
    1364. -
    1365.  
    1366. -
    1367.         $currentOffset 0;
    1368. -
    1369.         for($i=0;$i<=$offset;$i++)
    1370. -
    1371.         {
    1372. -
    1373.             $res $this->findFirstMatchOff($subject$predicate$object$currentOffset);
    1374. -
    1375.             $currentOffset=$res+1;
    1376. -
    1377.         }
    1378. -
    1379.         if ($res != -1{
    1380. -
    1381.             return $this->triples[$res];
    1382. -
    1383.         else {
    1384. -
    1385.             return NULL;
    1386. -
    1387.         }
    1388. -
    1389.     }
    1390. -
    1391.  
    1392. -
    1393.  
    1394. -
    1395.  
    1396. -
    1397.  
    1398. -
    1399.     /**
    1400. -
    1401.     * Searches for triples and returns the first matching statement from a given offset.
    1402. -
    1403.     * This method is used by the util/findIterator. NULL input for any parameter will match anything.
    1404. -
    1405.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node, $off );
    1406. -
    1407.     * Returns the position of the first statement of the MemModel where the object equals $node from the given
    1408. -
    1409.     * offset.
    1410. -
    1411.     * Returns an -1 if nothing is found.
    1412. -
    1413.     *
    1414. -
    1415.     * @param    object Node    $subject 
    1416. -
    1417.     * @param    object Node    $predicate 
    1418. -
    1419.     * @param    object Node    $object 
    1420. -
    1421.     * @param int         $off 
    1422. -
    1423.     * @return    int 
    1424. -
    1425.     * @access    private
    1426. -
    1427.     */
    1428. -
    1429.     function findFirstMatchOff($subject,$predicate$object,$off{
    1430. -
    1431.  
    1432. -
    1433.         if (
    1434. -
    1435.         (!is_a($subject'Resource'&& $subject != NULL||
    1436. -
    1437.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1438. -
    1439.         (!is_a($object'Node'&& $object != NULL)
    1440. -
    1441.         {
    1442. -
    1443.             $errmsg RDFAPI_ERROR '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
    1444. -
    1445.             trigger_error($errmsgE_USER_ERROR);
    1446. -
    1447.         }
    1448. -
    1449.  
    1450. -
    1451.         $match=-1;
    1452. -
    1453.         $ind=$this->indexed;
    1454. -
    1455.         if($subject == NULL && $predicate == NULL && $object == NULL)
    1456. -
    1457.         {
    1458. -
    1459.             foreach ($this->triples as $key => $statement)
    1460. -
    1461.             {
    1462. -
    1463.                 if ($key >= $off)
    1464. -
    1465.                     return $key;
    1466. -
    1467.             }
    1468. -
    1469.             return -1;
    1470. -
    1471.         }
    1472. -
    1473.  
    1474. -
    1475.         switch($ind){
    1476. -
    1477.             case 1:
    1478. -
    1479.             if($subject!=NULL && $predicate != NULL && $object != NULL){
    1480. -
    1481.                 $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
    1482. -
    1483.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,1,$off);
    1484. -
    1485.             }else{
    1486. -
    1487.                 break;
    1488. -
    1489.             }
    1490. -
    1491.  
    1492. -
    1493.             case 2:
    1494. -
    1495.             if($subject!=NULL && $predicate != NULL){
    1496. -
    1497.                 $pos=$subject->getLabel().$predicate->getLabel();
    1498. -
    1499.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,2,$off);
    1500. -
    1501.             }else{
    1502. -
    1503.                 break;
    1504. -
    1505.             }
    1506. -
    1507.  
    1508. -
    1509.             case 3:
    1510. -
    1511.             if($subject!=NULL && $object != NULL){
    1512. -
    1513.                 $pos=$subject->getLabel().$object->getLabel();
    1514. -
    1515.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,3,$off);
    1516. -
    1517.             }else{
    1518. -
    1519.                 break;
    1520. -
    1521.             }
    1522. -
    1523.             case 0:
    1524. -
    1525.             if($subject!= null){
    1526. -
    1527.                 $pos=$subject->getLabel();
    1528. -
    1529.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,4,$off);
    1530. -
    1531.             }
    1532. -
    1533.             if($predicate!= null){
    1534. -
    1535.                 $pos=$predicate->getLabel();
    1536. -
    1537.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,5,$off);
    1538. -
    1539.             }
    1540. -
    1541.             if($object!= null){
    1542. -
    1543.                 $pos=$object->getLabel();
    1544. -
    1545.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,6,$off);
    1546. -
    1547.             }
    1548. -
    1549.             break;
    1550. -
    1551.         }
    1552. -
    1553.         // if no index: linear search
    1554. -
    1555.         foreach($this->triples as $key => $value){
    1556. -
    1557.             if ($this->matchStatement($value$subject$predicate$object)){
    1558. -
    1559.                 if($off<=$key){
    1560. -
    1561.                     $match=$key;
    1562. -
    1563.                     break;
    1564. -
    1565.                 }
    1566. -
    1567.             }
    1568. -
    1569.         }
    1570. -
    1571.         return $match;
    1572. -
    1573.     }
    1574. -
    1575.  
    1576. -
    1577.  
    1578. -
    1579.     /**
    1580. -
    1581.     * Searches for triples and returns the number of matches.
    1582. -
    1583.     * NULL input for any parameter will match anything.
    1584. -
    1585.     * Example:  $result = $m->findCount( NULL, NULL, $node );
    1586. -
    1587.     * Finds all triples with $node as object.
    1588. -
    1589.     *
    1590. -
    1591.     * @param    object Node    $subject 
    1592. -
    1593.     * @param    object Node    $predicate 
    1594. -
    1595.     * @param    object Node    $object 
    1596. -
    1597.     * @return    integer 
    1598. -
    1599.     * @access    public
    1600. -
    1601.     */
    1602. -
    1603.     function findCount($subject$predicate$object{
    1604. -
    1605.  
    1606. -
    1607.         $res $this->find($subject$predicate$object);
    1608. -
    1609.         return $res->size();
    1610. -
    1611.  
    1612. -
    1613.     }
    1614. -
    1615.  
    1616. -
    1617.  
    1618. -
    1619.     /**
    1620. -
    1621.     * Perform an RDQL query on this MemModel.
    1622. -
    1623.     * This method returns an associative array of variable bindings.
    1624. -
    1625.     * The values of the query variables can either be RAP's objects (instances of Node)
    1626. -
    1627.     * if $returnNodes set to TRUE, or their string serialization.
    1628. -
    1629.     *
    1630. -
    1631.     * @access    public
    1632. -
    1633.     * @param string $queryString 
    1634. -
    1635.     * @param boolean $returnNodes 
    1636. -
    1637.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1638. -
    1639.     *       OR  array   [][?VARNAME] = string
    1640. -
    1641.     *
    1642. -
    1643.     */
    1644. -
    1645.     function rdqlQuery($queryString$returnNodes TRUE{
    1646. -
    1647.  
    1648. -
    1649.         // Import RDQL Package
    1650. -
    1651.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1652. -
    1653.  
    1654. -
    1655.         $parser new RdqlParser();
    1656. -
    1657.         $parsedQuery =$parser->parseQuery($queryString);
    1658. -
    1659.  
    1660. -
    1661.         // this method can only query this MemModel
    1662. -
    1663.         // if another model was specified in the from clause throw an error
    1664. -
    1665.         if (isset($parsedQuery['sources'][1])) {
    1666. -
    1667.             $errmsg RDFAPI_ERROR '(class: MemModel; method: rdqlQuery):';
    1668. -
    1669.             $errmsg .= ' this method can only query this MemModel';
    1670. -
    1671.             trigger_error($errmsgE_USER_ERROR);
    1672. -
    1673.         }
    1674. -
    1675.  
    1676. -
    1677.         $engine new RdqlMemEngine();
    1678. -
    1679.         $res =$engine->queryModel($this$parsedQuery$returnNodes);
    1680. -
    1681.  
    1682. -
    1683.         return $res;
    1684. -
    1685.     }
    1686. -
    1687.  
    1688. -
    1689.     /**
    1690. -
    1691.     * Perform an RDQL query on this MemModel.
    1692. -
    1693.     * This method returns an RdqlResultIterator of variable bindings.
    1694. -
    1695.     * The values of the query variables can either be RAP's objects (instances of Node)
    1696. -
    1697.     * if $returnNodes set to TRUE, or their string serialization.
    1698. -
    1699.     *
    1700. -
    1701.     * @access    public
    1702. -
    1703.     * @param string $queryString 
    1704. -
    1705.     * @param boolean $returnNodes 
    1706. -
    1707.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1708. -
    1709.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1710. -
    1711.     *
    1712. -
    1713.     */
    1714. -
    1715.     function rdqlQueryAsIterator($queryString$returnNodes TRUE{
    1716. -
    1717.         // Import RDQL Package
    1718. -
    1719.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1720. -
    1721.         return new RdqlResultIterator($this->rdqlQuery($queryString$returnNodes));
    1722. -
    1723.     }
    1724. -
    1725.  
    1726. -
    1727.     /**
    1728. -
    1729.     * General method to replace nodes of a MemModel.
    1730. -
    1731.     * NULL input for any parameter will match nothing.
    1732. -
    1733.     * Example:  $m->replace($node, NULL, $node, $replacement);
    1734. -
    1735.     * Replaces all $node objects beeing subject or object in
    1736. -
    1737.     * any triple of the MemModel with the $needle node.
    1738. -
    1739.     *
    1740. -
    1741.     * @param    object Node    $subject 
    1742. -
    1743.     * @param    object Node    $predicate 
    1744. -
    1745.     * @param    object Node    $object 
    1746. -
    1747.     * @param    object Node    $replacement 
    1748. -
    1749.     * @access    public
    1750. -
    1751.     * @throws    PhpError
    1752. -
    1753.     */
    1754. -
    1755.     function replace($subject$predicate$object$replacement{
    1756. -
    1757.  
    1758. -
    1759.         if (
    1760. -
    1761.         (!is_a($replacement'Node')) ||
    1762. -
    1763.         (!is_a($subject'Resource'&& $subject != NULL||
    1764. -
    1765.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1766. -
    1767.         (!is_a($object'Node'&& $object != NULL)
    1768. -
    1769.         {
    1770. -
    1771.             $errmsg RDFAPI_ERROR '(class: MemModel; method: replace): Parameters must be subclasses of Node or NULL';
    1772. -
    1773.             trigger_error($errmsgE_USER_ERROR);
    1774. -
    1775.         }
    1776. -
    1777.  
    1778. -
    1779.         if($this->size(== 0)
    1780. -
    1781.         break;
    1782. -
    1783.         foreach($this->triples as $key => $value{
    1784. -
    1785.             if ($this->triples[$key]->subj->equals($subject)) {
    1786. -
    1787.                 $this->triples[$key]->subj $replacement;
    1788. -
    1789.             }
    1790. -
    1791.             if ($this->triples[$key]->pred->equals($predicate))
    1792. -
    1793.             $this->triples[$key]->pred $replacement;
    1794. -
    1795.             if ($this->triples[$key]->obj->equals($object))
    1796. -
    1797.             $this->triples[$key]->obj $replacement;
    1798. -
    1799.  
    1800. -
    1801.         }
    1802. -
    1803.         $this->index($this->indexed);
    1804. -
    1805.     }
    1806. -
    1807.  
    1808. -
    1809.  
    1810. -
    1811.     /**
    1812. -
    1813.     * Internal method that checks, if a statement matches a S, P, O or NULL combination.
    1814. -
    1815.     * NULL input for any parameter will match anything.
    1816. -
    1817.     *
    1818. -
    1819.     * @param    object Statement    $statement 
    1820. -
    1821.     * @param    object Node    $subject 
    1822. -
    1823.     * @param    object Node    $predicate 
    1824. -
    1825.     * @param    object Node    $object 
    1826. -
    1827.     * @return    boolean 
    1828. -
    1829.     * @access    private
    1830. -
    1831.     */
    1832. -
    1833.     function matchStatement($statement$subject$predicate$object)  {
    1834. -
    1835.  
    1836. -
    1837.         if(($subject != NULLAND !($statement->subj->equals($subject)))
    1838. -
    1839.         return false;
    1840. -
    1841.  
    1842. -
    1843.         if($predicate != NULL && !($statement->pred->equals($predicate)))
    1844. -
    1845.         return false;
    1846. -
    1847.  
    1848. -
    1849.         if($object != NULL && !($statement->obj->equals($object)))
    1850. -
    1851.         return false;
    1852. -
    1853.  
    1854. -
    1855.         return true;
    1856. -
    1857.     }
    1858. -
    1859.  
    1860. -
    1861.  
    1862. -
    1863.  
    1864. -
    1865.  
    1866. -
    1867.     /**
    1868. -
    1869.     * Checks if two models are equal.
    1870. -
    1871.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    1872. -
    1873.     *
    1874. -
    1875.     * @access    public
    1876. -
    1877.     * @param        object    model &$that 
    1878. -
    1879.     * @throws    phpErrpr
    1880. -
    1881.     * @return    boolean 
    1882. -
    1883.     */
    1884. -
    1885.  
    1886. -
    1887.     function equals(&$that)  {
    1888. -
    1889.  
    1890. -
    1891.         if (!is_a($that'Model')) {
    1892. -
    1893.             $errmsg RDFAPI_ERROR '(class: MemModel; method: equals): Model expected.';
    1894. -
    1895.             trigger_error($errmsgE_USER_ERROR);
    1896. -
    1897.         }
    1898. -
    1899.  
    1900. -
    1901.         if ($this->size(!= $that->size())
    1902. -
    1903.         return FALSE;
    1904. -
    1905.         /*
    1906. -
    1907.         if (!$this->containsAll($that))
    1908. -
    1909.         return FALSE;
    1910. -
    1911.         return TRUE;
    1912. -
    1913.         */
    1914. -
    1915.         include_once(RDFAPI_INCLUDE_DIR"util/ModelComparator.php");
    1916. -
    1917.         return ModelComparator::compare($this,$that);
    1918. -
    1919.     }
    1920. -
    1921.  
    1922. -
    1923.     /**
    1924. -
    1925.     * Returns a new MemModel that is the set-union of the MemModel with another model.
    1926. -
    1927.     * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
    1928. -
    1929.     *
    1930. -
    1931.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    1932. -
    1933.     * is another graph, which we will call the merge of the graphs.
    1934. -
    1935.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    1936. -
    1937.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    1938. -
    1939.     * graphs become a single node in the union graph (since by definition they are the same
    1940. -
    1941.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    1942. -
    1943.     * never merged. In particular, this means that every blank node in a merged graph can be
    1944. -
    1945.     * identified as coming from one particular graph in the original set of graphs.
    1946. -
    1947.     *
    1948. -
    1949.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    1950. -
    1951.     * their corresponding N-triples documents and constructing the graph described by the merged
    1952. -
    1953.     * document, since if some of the documents use the same node identifiers, the merged document
    1954. -
    1955.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    1956. -
    1957.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    1958. -
    1959.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    1960. -
    1961.     * documents. (Not implemented yet !!!!!!!!!!!)
    1962. -
    1963.     *
    1964. -
    1965.     * @param    object Model    $model 
    1966. -
    1967.     * @return    object MemModel 
    1968. -
    1969.     * @access    public
    1970. -
    1971.     * @throws phpErrpr
    1972. -
    1973.     *
    1974. -
    1975.     */
    1976. -
    1977.     function unite(&$model)  {
    1978. -
    1979.  
    1980. -
    1981.         if (!is_a($model'Model')) {
    1982. -
    1983.             $errmsg RDFAPI_ERROR '(class: MemModel; method: unite): Model expected.';
    1984. -
    1985.             trigger_error($errmsgE_USER_ERROR);
    1986. -
    1987.         }
    1988. -
    1989.  
    1990. -
    1991.         $res $this;
    1992. -
    1993.  
    1994. -
    1995.         if (is_a($model'MemModel')) {
    1996. -
    1997.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    1998. -
    1999.             $stateIt=new StatementIterator($model);
    2000. -
    2001.             while($statement=$stateIt->next())
    2002. -
    2003.             {
    2004. -
    2005.                 $res->addWithoutDuplicates($statement);
    2006. -
    2007.             }
    2008. -
    2009.         }
    2010. -
    2011.  
    2012. -
    2013.         elseif (is_a($model'DbModel')) {
    2014. -
    2015.             $memModel =$model->getMemModel();
    2016. -
    2017.             foreach($memModel->triples as $value)
    2018. -
    2019.             $res->addWithoutDuplicates($value);
    2020. -
    2021.         }
    2022. -
    2023.  
    2024. -
    2025.         return $res;
    2026. -
    2027.     }
    2028. -
    2029.  
    2030. -
    2031.     /**
    2032. -
    2033.     * Returns a new MemModel that is the subtraction of another model from this MemModel.
    2034. -
    2035.     *
    2036. -
    2037.     * @param    object Model    $model 
    2038. -
    2039.     * @return    object MemModel 
    2040. -
    2041.     * @access    public
    2042. -
    2043.     * @throws phpErrpr
    2044. -
    2045.     */
    2046. -
    2047.  
    2048. -
    2049.     function subtract(&$model)  {
    2050. -
    2051.  
    2052. -
    2053.         if (!is_a($model'Model')) {
    2054. -
    2055.             $errmsg RDFAPI_ERROR '(class: MemModel; method: subtract): Model expected.';
    2056. -
    2057.             trigger_error($errmsgE_USER_ERROR);
    2058. -
    2059.         }
    2060. -
    2061.  
    2062. -
    2063.         $res $this;
    2064. -
    2065.  
    2066. -
    2067.  
    2068. -
    2069.         if (is_a($model'MemModel'))
    2070. -
    2071.         {
    2072. -
    2073.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2074. -
    2075.             $stateIt=new StatementIterator($model);
    2076. -
    2077.             while($statement=$stateIt->next())
    2078. -
    2079.             {
    2080. -
    2081.                 $res->remove($statement);
    2082. -
    2083.             }
    2084. -
    2085.         }
    2086. -
    2087.         elseif (is_a($model'DbModel'))
    2088. -
    2089.         {
    2090. -
    2091.             $memModel =$model->getMemModel();
    2092. -
    2093.             foreach($memModel->triples as $value)
    2094. -
    2095.             $res->remove($value);
    2096. -
    2097.         }
    2098. -
    2099.  
    2100. -
    2101.  
    2102. -
    2103.         return $res;
    2104. -
    2105.     }
    2106. -
    2107.  
    2108. -
    2109.     /**
    2110. -
    2111.     * Returns a new MemModel containing all the statements which are in both this MemModel and another.
    2112. -
    2113.     *
    2114. -
    2115.     * @param    object Model    $model 
    2116. -
    2117.     * @return    object MemModel 
    2118. -
    2119.     * @access    public
    2120. -
    2121.     * @throws phpErrpr
    2122. -
    2123.     */
    2124. -
    2125.     function intersect(&$model)  {
    2126. -
    2127.  
    2128. -
    2129.         if (!is_a($model'Model')) {
    2130. -
    2131.             $errmsg RDFAPI_ERROR '(class: MemModel; method: intersect: Model expected.';
    2132. -
    2133.             trigger_error($errmsgE_USER_ERROR);
    2134. -
    2135.         }
    2136. -
    2137.  
    2138. -
    2139.         $res new MemModel($this->getBaseURI());
    2140. -
    2141.  
    2142. -
    2143.         if (is_a($model'DbModel'|| is_a($model'RDFSBModel'))
    2144. -
    2145.         {
    2146. -
    2147.             $memModel =$model->getMemModel();
    2148. -
    2149.             foreach($memModel->triples as $value{
    2150. -
    2151.                 if ($this->contains($value))
    2152. -
    2153.                 $res->add($value);
    2154. -
    2155.             }
    2156. -
    2157.         }
    2158. -
    2159.  
    2160. -
    2161.         elseif (is_a($model'MemModel'))
    2162. -
    2163.         {
    2164. -
    2165.             foreach($model->triples as $value{
    2166. -
    2167.                 if ($this->contains($value))
    2168. -
    2169.                 $res->add($value);
    2170. -
    2171.             }
    2172. -
    2173.         }
    2174. -
    2175.  
    2176. -
    2177.  
    2178. -
    2179.  
    2180. -
    2181.         return $res;
    2182. -
    2183.     }
    2184. -
    2185.  
    2186. -
    2187.  
    2188. -
    2189.     /**
    2190. -
    2191.     * Adds another model to this MemModel.
    2192. -
    2193.     * Duplicate statements are not removed.
    2194. -
    2195.     * If you don't want duplicates, use unite().
    2196. -
    2197.     * If any statement of the model to be added to this model contains a blankNode
    2198. -
    2199.     * with an identifier already existing in this model, a new blankNode is generated.
    2200. -
    2201.     *
    2202. -
    2203.     * @param    object Model    $model 
    2204. -
    2205.     * @access    public
    2206. -
    2207.     * @throws phpErrpr
    2208. -
    2209.     *
    2210. -
    2211.     */
    2212. -
    2213.     function addModel(&$model)  {
    2214. -
    2215.  
    2216. -
    2217.         if (!is_a($model'Model')) {
    2218. -
    2219.             $errmsg RDFAPI_ERROR '(class: MemModel; method: addModel): Model expected.';
    2220. -
    2221.             trigger_error($errmsgE_USER_ERROR);
    2222. -
    2223.         }
    2224. -
    2225.  
    2226. -
    2227.         $blankNodes_tmp array();
    2228. -
    2229.  
    2230. -
    2231.         if (is_a($model'MemModel')) {
    2232. -
    2233.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2234. -
    2235.             $stateIt=new StatementIterator($model);
    2236. -
    2237.             while($statement=$stateIt->next())
    2238. -
    2239.             {
    2240. -
    2241.                 $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    2242. -
    2243.             };
    2244. -
    2245.             $this->addParsedNamespaces($model->getParsedNamespaces());
    2246. -
    2247.         }
    2248. -
    2249.  
    2250. -
    2251.         elseif (is_a($model'DbModel')) {
    2252. -
    2253.             $memModel =$model->getMemModel();
    2254. -
    2255.             foreach($memModel->triples as $value)
    2256. -
    2257.             $this->_addStatementFromAnotherModel($value$blankNodes_tmp);
    2258. -
    2259.         }
    2260. -
    2261.         $this->index($this->indexed);
    2262. -
    2263.     }
    2264. -
    2265.  
    2266. -
    2267.  
    2268. -
    2269.     /**
    2270. -
    2271.     * Reifies the MemModel.
    2272. -
    2273.     * Returns a new MemModel that contains the reifications of all statements of this MemModel.
    2274. -
    2275.     *
    2276. -
    2277.     * @access    public
    2278. -
    2279.     * @return    object    MemModel 
    2280. -
    2281.     */
    2282. -
    2283.     function reify({
    2284. -
    2285.         $res new MemModel($this->getBaseURI());
    2286. -
    2287.  
    2288. -
    2289.         $stateIt=$this->getStatementIterator();
    2290. -
    2291.         while($statement=$stateIt->next())
    2292. -
    2293.         {
    2294. -
    2295.             $pointer =$statement->reify($res);
    2296. -
    2297.             $res->addModel($pointer);
    2298. -
    2299.         };
    2300. -
    2301.  
    2302. -
    2303.         return $res;
    2304. -
    2305.     }
    2306. -
    2307.  
    2308. -
    2309.     /**
    2310. -
    2311.     * Returns a StatementIterator for traversing the MemModel.
    2312. -
    2313.     * @access    public
    2314. -
    2315.     * @return    object    StatementIterator 
    2316. -
    2317.     */
    2318. -
    2319.     function getStatementIterator({
    2320. -
    2321.         // Import Package Utility
    2322. -
    2323.         require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2324. -
    2325.  
    2326. -
    2327.         $si new StatementIterator($this);
    2328. -
    2329.         return $si;
    2330. -
    2331.     }
    2332. -
    2333.  
    2334. -
    2335.     /**
    2336. -
    2337.     * Returns a FindIterator for traversing the MemModel.
    2338. -
    2339.     * @access    public
    2340. -
    2341.     * @return    object    FindIterator 
    2342. -
    2343.     */
    2344. -
    2345.     function findAsIterator($sub=null,$pred=null,$obj=null{
    2346. -
    2347.         // Import Package Utility
    2348. -
    2349.         require_once RDFAPI_INCLUDE_DIR 'util/FindIterator.php';
    2350. -
    2351.  
    2352. -
    2353.         $if new FindIterator($this,$sub,$pred,$obj);
    2354. -
    2355.         return $if;
    2356. -
    2357.     }
    2358. -
    2359.  
    2360. -
    2361.     /**
    2362. -
    2363.     * Returns a FindIterator for traversing the MemModel.
    2364. -
    2365.     * @access    public
    2366. -
    2367.     * @return    object    FindIterator 
    2368. -
    2369.     */
    2370. -
    2371.     function iterFind($sub=null,$pred=null,$obj=null{
    2372. -
    2373.         // Import Package Utility
    2374. -
    2375.         require_once RDFAPI_INCLUDE_DIR 'util/IterFind.php';
    2376. -
    2377.  
    2378. -
    2379.         $if new IterFind($this,$sub,$pred,$obj);
    2380. -
    2381.         return $if;
    2382. -
    2383.     }
    2384. -
    2385.  
    2386. -
    2387.  
    2388. -
    2389.     /**
    2390. -
    2391.     * Returns the models namespaces.
    2392. -
    2393.     *
    2394. -
    2395.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2396. -
    2397.     * @access   public
    2398. -
    2399.     * @return   Array 
    2400. -
    2401.     */
    2402. -
    2403.     function getParsedNamespaces(){
    2404. -
    2405.         if(count($this->parsedNamespaces)!=0){
    2406. -
    2407.             return $this->parsedNamespaces;
    2408. -
    2409.         }else{
    2410. -
    2411.             return false;
    2412. -
    2413.         }
    2414. -
    2415.     }
    2416. -
    2417.  
    2418. -
    2419.  
    2420. -
    2421.  
    2422. -
    2423.     /**
    2424. -
    2425.     * Adds the namespaces to the model. This method is called by
    2426. -
    2427.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    2428. -
    2429.     * added namespaces in the model !!!!
    2430. -
    2431.     *
    2432. -
    2433.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2434. -
    2435.     * @access   public
    2436. -
    2437.     * @param    Array $newNs 
    2438. -
    2439.     */
    2440. -
    2441.     function addParsedNamespaces($newNs){
    2442. -
    2443.         if($newNs)
    2444. -
    2445.         $this->parsedNamespaces $this->parsedNamespaces $newNs;
    2446. -
    2447.     }
    2448. -
    2449.  
    2450. -
    2451.  
    2452. -
    2453.     /**
    2454. -
    2455.     * Adds a namespace and prefix to the model.
    2456. -
    2457.     *
    2458. -
    2459.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2460. -
    2461.     * @access   public
    2462. -
    2463.     * @param    String 
    2464. -
    2465.     * @param    String 
    2466. -
    2467.     */
    2468. -
    2469.     function addNamespace($prefix$nmsp){
    2470. -
    2471.         $this->parsedNamespaces[$nmsp]=$prefix;
    2472. -
    2473.     }
    2474. -
    2475.  
    2476. -
    2477.     /**
    2478. -
    2479.     * removes a single namespace from the model
    2480. -
    2481.     *
    2482. -
    2483.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2484. -
    2485.     * @access   public
    2486. -
    2487.     * @param    String $nmsp 
    2488. -
    2489.     */
    2490. -
    2491.     function removeNamespace($nmsp){
    2492. -
    2493.         if(isset($this->parsedNamespaces[$nmsp])){
    2494. -
    2495.             unset($this->parsedNamespaces[$nmsp]);
    2496. -
    2497.             return true;
    2498. -
    2499.         }else{
    2500. -
    2501.             return false;
    2502. -
    2503.         }
    2504. -
    2505.     }
    2506. -
    2507.  
    2508. -
    2509.  
    2510. -
    2511.  
    2512. -
    2513.     /**
    2514. -
    2515.     * Close the MemModel and free up resources held.
    2516. -
    2517.     *
    2518. -
    2519.     * @access    public
    2520. -
    2521.     */
    2522. -
    2523.     function close({
    2524. -
    2525.         unset$this->baseURI );
    2526. -
    2527.         unset$this->triples );
    2528. -
    2529.     }
    2530. -
    2531.  
    2532. -
    2533.     // =============================================================================
    2534. -
    2535.     // *************************** helper functions ********************************
    2536. -
    2537.     // =============================================================================
    2538. -
    2539.     /**
    2540. -
    2541.     * Checks if $statement is in index
    2542. -
    2543.     *
    2544. -
    2545.     * @param  int $ind 
    2546. -
    2547.     * @param  Statement &$statement 
    2548. -
    2549.     * @return boolean 
    2550. -
    2551.     * @access private
    2552. -
    2553.     */
    2554. -
    2555.     function _containsIndex(&$statement,$ind){
    2556. -
    2557.         switch($ind){
    2558. -
    2559.             case 4:
    2560. -
    2561.             $sub=$statement->getSubject();
    2562. -
    2563.             $pos=$sub->getLabel();
    2564. -
    2565.             break;
    2566. -
    2567.             case 1:
    2568. -
    2569.             $sub=$statement->getSubject();
    2570. -
    2571.             $pred=$statement->getPredicate();
    2572. -
    2573.             $obj=$statement->getObject();
    2574. -
    2575.             $pos=$sub->getLabel().$pred->getLabel().$obj->getLabel();
    2576. -
    2577.             break;
    2578. -
    2579.             case 2:
    2580. -
    2581.             $sub=$statement->getSubject();
    2582. -
    2583.             $pred=$statement->getPredicate();
    2584. -
    2585.             $pos=$sub->getLabel().$pred->getLabel();
    2586. -
    2587.             break;
    2588. -
    2589.             case 3:
    2590. -
    2591.             $sub=$statement->getSubject();
    2592. -
    2593.             $obj=$statement->getObject();
    2594. -
    2595.             $pos=$sub->getLabel().$obj->getLabel();
    2596. -
    2597.             break;
    2598. -
    2599.         }
    2600. -
    2601.  
    2602. -
    2603.         if (!isset($this->indexArr[$ind][$pos]))
    2604. -
    2605.         return FALSE;
    2606. -
    2607.         foreach ($this->indexArr[$ind][$posas $key => $value{
    2608. -
    2609.             $t=$this->triples[$value];
    2610. -
    2611.             if ($t->equals($statement))
    2612. -
    2613.             return TRUE;
    2614. -
    2615.         }
    2616. -
    2617.         return FALSE;
    2618. -
    2619.     }
    2620. -
    2621.  
    2622. -
    2623.  
    2624. -
    2625.  
    2626. -
    2627.  
    2628. -
    2629.  
    2630. -
    2631.     /**
    2632. -
    2633.     * finds a statement in an index. $pos is the Position in the index
    2634. -
    2635.     * and $ind the adequate searchindex
    2636. -
    2637.     *
    2638. -
    2639.     * @param    String            $pos 
    2640. -
    2641.     * @param    Object Subject    &$subject
    2642. -
    2643.     * @param    Object Predicate  &$predicate
    2644. -
    2645.     * @param    Object Object     &$object
    2646. -
    2647.     * @param    int                 &ind
    2648. -
    2649.     * @return   MemModel          $res
    2650. -
    2651.     * @access   private
    2652. -
    2653.     */
    2654. -
    2655.     function _findInIndex($pos,&$subject,&$predicate,&$object,$ind){
    2656. -
    2657.         $res new MemModel($this->getBaseURI());
    2658. -
    2659.         $res->indexed=-1;
    2660. -
    2661.         if (!isset($this->indexArr[$ind][$pos]))
    2662. -
    2663.         return $res;
    2664. -
    2665.         foreach($this->indexArr[$ind][$posas $key =>$value){
    2666. -
    2667.             $t=$this->triples[$value];
    2668. -
    2669.             if ($this->matchStatement($t,$subject,$predicate,$object))
    2670. -
    2671.             $res->add($t);
    2672. -
    2673.         }
    2674. -
    2675.         return $res;
    2676. -
    2677.     }
    2678. -
    2679.     /**
    2680. -
    2681.     * adds/removes a statement into/from an index.
    2682. -
    2683.     * mode=0 removes the statement from the index;
    2684. -
    2685.     * mode=1 adds the statement into the index.
    2686. -
    2687.     * returns the statements position.
    2688. -
    2689.     *
    2690. -
    2691.     * @param Object Statement &$statement
    2692. -
    2693.     *    @param int              $k 
    2694. -
    2695.     *    @param int              $ind 
    2696. -
    2697.     * @param int                $mode 
    2698. -
    2699.     * @return int             $k
    2700. -
    2701.     * @access private
    2702. -
    2703.     */
    2704. -
    2705.     function _indexOpr(&$statement,$k,$ind,$mode){
    2706. -
    2707.         // determine position in adequate index
    2708. -
    2709.         switch($ind){
    2710. -
    2711.             case 1:
    2712. -
    2713.             $s=$statement->getSubject();
    2714. -
    2715.             $p=$statement->getPredicate();
    2716. -
    2717.             $o=$statement->getObject();
    2718. -
    2719.             $pos=$s->getLabel().$p->getLabel().$o->getLabel();
    2720. -
    2721.             break;
    2722. -
    2723.             case 2:
    2724. -
    2725.             $s=$statement->getSubject();
    2726. -
    2727.             $p=$statement->getPredicate();
    2728. -
    2729.             $pos=$s->getLabel().$p->getLabel();
    2730. -
    2731.             break;
    2732. -
    2733.             case 3:
    2734. -
    2735.             $s=$statement->getSubject();
    2736. -
    2737.             $o=$statement->getObject();
    2738. -
    2739.             $pos=$s->getLabel().$o->getLabel();
    2740. -
    2741.             break;
    2742. -
    2743.             case 4:
    2744. -
    2745.             $s=$statement->getSubject();
    2746. -
    2747.             $pos=$s->getLabel();
    2748. -
    2749.             break;
    2750. -
    2751.             case 5:
    2752. -
    2753.             $p=$statement->getPredicate();
    2754. -
    2755.             $pos=$p->getLabel();
    2756. -
    2757.             break;
    2758. -
    2759.             case 6:
    2760. -
    2761.             $o=$statement->getObject();
    2762. -
    2763.             $pos=$o->getLabel();
    2764. -
    2765.             break;
    2766. -
    2767.         }
    2768. -
    2769.         switch($mode){
    2770. -
    2771.             // add in Index
    2772. -
    2773.             case 1:
    2774. -
    2775.             if(isset($this->indexArr[$ind][$pos])){
    2776. -
    2777.                 $this->indexArr[$ind][$pos][$k;
    2778. -
    2779.             }else{
    2780. -
    2781.                 $this->indexArr[$ind][$pos][0$k;
    2782. -
    2783.             }
    2784. -
    2785.             break;
    2786. -
    2787.             // remove from Index
    2788. -
    2789.             case 0:
    2790. -
    2791.             $subject=$statement->getSubject();
    2792. -
    2793.             $predicate=$statement->getPredicate();
    2794. -
    2795.             $object=$statement->getObject();
    2796. -
    2797.             $k=-1;
    2798. -
    2799.             if(!isset($this->indexArr[$ind][$pos])){
    2800. -
    2801.                 return -1;
    2802. -
    2803.             }
    2804. -
    2805.             $num=count($this->indexArr[$ind][$pos]);
    2806. -
    2807.             foreach($this->indexArr[$ind][$posas $key => $value){
    2808. -
    2809.                 $t=$this->triples[$value];
    2810. -
    2811.                 if($this->matchStatement($t,$subject,$predicate,$object)){
    2812. -
    2813.                     $k=$value;
    2814. -
    2815.                     if($num==1){
    2816. -
    2817.                         unset($this->indexArr[$ind][$pos]);
    2818. -
    2819.                     }else{
    2820. -
    2821.                         unset($this->indexArr[$ind][$pos][$key]);
    2822. -
    2823.                     }
    2824. -
    2825.                     return $k;
    2826. -
    2827.                 }
    2828. -
    2829.             }
    2830. -
    2831.             break;
    2832. -
    2833.         }
    2834. -
    2835.         return $k;
    2836. -
    2837.     }
    2838. -
    2839.  
    2840. -
    2841.  
    2842. -
    2843.     /**
    2844. -
    2845.     * finds next or previous matching statement.
    2846. -
    2847.     * Returns Position in model or -1 if there is no match.
    2848. -
    2849.     *
    2850. -
    2851.     *
    2852. -
    2853.     * @param        String 
    2854. -
    2855.     * @param     object  Subject 
    2856. -
    2857.     * @param        object    Predicate 
    2858. -
    2859.     * @param     object  Object 
    2860. -
    2861.     * @param     integer 
    2862. -
    2863.     * @param     integer 
    2864. -
    2865.     * @return    integer 
    2866. -
    2867.     * @access    private
    2868. -
    2869.     */
    2870. -
    2871.     function _findMatchIndex($pos,&$s,&$p,&$o,$ind,$off){
    2872. -
    2873.         $match=-1;
    2874. -
    2875.         if (!isset($this->indexArr[$ind][$pos])) {
    2876. -
    2877.             return $match;}
    2878. -
    2879.             foreach($this->indexArr[$ind][$posas $key =>$value){
    2880. -
    2881.                 $t=$this->triples[$value];
    2882. -
    2883.                 if ($this->matchStatement($t,$s,$p,$o)){
    2884. -
    2885.                     if($off <= $value){
    2886. -
    2887.                         $match$value;
    2888. -
    2889.                         return $match;
    2890. -
    2891.                     }
    2892. -
    2893.                 }
    2894. -
    2895.             }
    2896. -
    2897.  
    2898. -
    2899.             return $match;
    2900. -
    2901.  
    2902. -
    2903.     }
    2904. -
    2905.  
    2906. -
    2907.  
    2908. -
    2909.  
    2910. -
    2911.  
    2912. -
    2913. // end: MemModel
    2914. -
    2915.  
    2916. -
    2917.  
    2918. -
    2919. ?>
    2920. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModel.php.html.svn-base deleted file mode 100755 index 444c40a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModel.php.html.svn-base +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - File Source for Model.php - - - - - -

    Source for file Model.php

    -

    Documentation is available at Model.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Model
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    16. -
    17.  * An RDF graph is a directed labeled graph, as described in http://www.w3.org/TR/rdf-mt/.
    18. -
    19.  * It can be defined as a set of <S, P, O> triples, where P is a uriref, S is either
    20. -
    21.  * a uriref or a blank node, and O is either a uriref, a blank node, or a literal.
    22. -
    23.  *
    24. -
    25.  *
    26. -
    27.  * @version  $Id$
    28. -
    29.  * @author Radoslaw Oldakowski <radol@gmx.de>
    30. -
    31.  * @author Daniel Westphal <mail@d-westphal.de>
    32. -
    33.  *
    34. -
    35.  * @package model
    36. -
    37.  * @access    public
    38. -
    39.  */
    40. -
    41. class Model extends Object
    42. -
    43. {
    44. -
    45.     /**
    46. -
    47.     * Base URI of the Model.
    48. -
    49.     * Affects creating of new resources and serialization syntax.
    50. -
    51.     *
    52. -
    53.     * @var     string 
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $baseURI;
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Number of the last assigned bNode.
    66. -
    67.     *
    68. -
    69.     * @var     integer 
    70. -
    71.     * @access    private
    72. -
    73.     */
    74. -
    75.     var $bNodeCount;
    76. -
    77.  
    78. -
    79.     /**
    80. -
    81.     *   SparqlParser so we can re-use it
    82. -
    83.     *   @var Parser 
    84. -
    85.     */
    86. -
    87.     var $queryParser = null;
    88. -
    89.  
    90. -
    91.  
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Notice for people who are used to work with older versions of RAP.
    98. -
    99.     *
    100. -
    101.     * @throws  PHPError
    102. -
    103.     * @access    public
    104. -
    105.     */
    106. -
    107.     function Model()
    108. -
    109.     {
    110. -
    111.  
    112. -
    113.         $errmsg  'Since RAP 0.6 the class for manipulating memory models has been renamed to MemModel.';
    114. -
    115.         $errmsg .= '<br>Sorry for this inconvenience.<br>';
    116. -
    117.  
    118. -
    119.         trigger_error($errmsgE_USER_ERROR);
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * Return current baseURI.
    132. -
    133.     *
    134. -
    135.     * @return  string 
    136. -
    137.     * @access    public
    138. -
    139.     */
    140. -
    141.     function getBaseURI()
    142. -
    143.     {
    144. -
    145.         return $this->baseURI;
    146. -
    147.     }
    148. -
    149.  
    150. -
    151.  
    152. -
    153.  
    154. -
    155.     /**
    156. -
    157.     * Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    158. -
    159.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    160. -
    161.     * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
    162. -
    163.     * If the model is not empty, the contents of the file is added to this DbModel.
    164. -
    165.     *
    166. -
    167.     * @param     string     $filename 
    168. -
    169.     * @param     string     $type 
    170. -
    171.     * @param   boolean $stream 
    172. -
    173.     * @access    public
    174. -
    175.     */
    176. -
    177.     function load($filename$type NULL$stream=false)
    178. -
    179.     {
    180. -
    181.         if ((isset($type)) && ($type =='n3'OR ($type =='nt')) {
    182. -
    183.             // Import Package Syntax
    184. -
    185.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    186. -
    187.             $parser new N3Parser();
    188. -
    189.         }elseif ((isset($type)) && ($type =='rdf')) {
    190. -
    191.             // Import Package Syntax
    192. -
    193.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    194. -
    195.             $parser new RdfParser();
    196. -
    197.         }elseif ((isset($type)) && ($type =='grddl')) {
    198. -
    199.             // Import Package Syntax
    200. -
    201.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
    202. -
    203.             $parser new GRDDLParser();
    204. -
    205.         }elseif ((isset($type)) && ($type =='rss')) {
    206. -
    207.             // Import Package Syntax
    208. -
    209.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS);
    210. -
    211.             $parser new RssParser();
    212. -
    213.         }else {
    214. -
    215.             // create a parser according to the suffix of the filename
    216. -
    217.             // if there is no suffix assume the file to be XML/RDF
    218. -
    219.             preg_match("/\.([a-zA-Z0-9_]+)$/"$filename$suffix);
    220. -
    221.             if (isset($suffix[1]&& (strtolower($suffix[1]== 'n3' OR strtolower($suffix[1]== 'nt')){
    222. -
    223.                 // Import Package Syntax
    224. -
    225.                 include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    226. -
    227.                 $parser new N3Parser();
    228. -
    229.             }elseif (isset($suffix[1]&& (strtolower($suffix[1]== 'htm' OR strtolower($suffix[1]== 'html' OR strtolower($suffix[1]== 'xhtml')){
    230. -
    231.                     include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
    232. -
    233.                     $parser new GRDDLParser();
    234. -
    235.             }else{
    236. -
    237.                 // Import Package Syntax
    238. -
    239.                 include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    240. -
    241.                 $parser new RdfParser();
    242. -
    243.             }
    244. -
    245.         };
    246. -
    247.  
    248. -
    249.         if (($stream && $type=='rdf')||($stream && $type=='n3')) {
    250. -
    251.                 $temp=&$parser->generateModel($filename,false,$this);
    252. -
    253.         else{
    254. -
    255.                 $temp=&$parser->generateModel($filename);
    256. -
    257.         }
    258. -
    259.         $this->addModel($temp);
    260. -
    261.         if($this->getBaseURI()== null)
    262. -
    263.             $this->setBaseURI($temp->getBaseURI());
    264. -
    265.     }
    266. -
    267.  
    268. -
    269.  
    270. -
    271.  
    272. -
    273.     /**
    274. -
    275.     * Adds a statement from another model to this model.
    276. -
    277.     * If the statement to be added contains a blankNode with an identifier
    278. -
    279.     * already existing in this model, a new blankNode is generated.
    280. -
    281.     *
    282. -
    283.     * @param     Object Statement   $statement
    284. -
    285.     * @access    private
    286. -
    287.     */
    288. -
    289.     function _addStatementFromAnotherModel($statement&$blankNodes_tmp)
    290. -
    291.     {
    292. -
    293.         $subject $statement->getSubject();
    294. -
    295.         $object $statement->getObject();
    296. -
    297.  
    298. -
    299.         if (is_a($subject"BlankNode")) {
    300. -
    301.             $label $subject->getLabel();
    302. -
    303.             if (!array_key_exists($label$blankNodes_tmp))
    304. -
    305.             {
    306. -
    307.                 if ($this->findFirstMatchingStatement($subjectNULLNULL)
    308. -
    309.                 || $this->findFirstMatchingStatement(NULLNULL$subject))
    310. -
    311.                 {
    312. -
    313.                 $blankNodes_tmp[$labelnew BlankNode($this);
    314. -
    315.                 $statement->subj $blankNodes_tmp[$label];
    316. -
    317.                 else {
    318. -
    319.                 $blankNodes_tmp[$label$subject;
    320. -
    321.                 }
    322. -
    323.             else
    324. -
    325.                 $statement->subj $blankNodes_tmp[$label];
    326. -
    327.         }
    328. -
    329.  
    330. -
    331.         if (is_a($object"BlankNode")) {
    332. -
    333.             $label $object->getLabel();
    334. -
    335.             if (!array_key_exists($label$blankNodes_tmp))
    336. -
    337.             {
    338. -
    339.                 if ($this->findFirstMatchingStatement($objectNULLNULL)
    340. -
    341.                 || $this->findFirstMatchingStatement(NULLNULL$object))
    342. -
    343.                 {
    344. -
    345.                 $blankNodes_tmp[$labelnew BlankNode($this);
    346. -
    347.                 $statement->obj $blankNodes_tmp[$label];
    348. -
    349.                 else {
    350. -
    351.                 $blankNodes_tmp[$label$object;
    352. -
    353.                 }
    354. -
    355.             else
    356. -
    357.                 $statement->obj $blankNodes_tmp[$label];
    358. -
    359.         }
    360. -
    361.         $this->add($statement);
    362. -
    363.     }
    364. -
    365.  
    366. -
    367.  
    368. -
    369.  
    370. -
    371.     /**
    372. -
    373.     * Internal method, that returns a resource URI that is unique for the Model.
    374. -
    375.     * URIs are generated using the base_uri of the DbModel, the prefix and a unique number.
    376. -
    377.     * If no prefix is defined, the bNode prefix, defined in constants.php, is used.
    378. -
    379.     *
    380. -
    381.     * @param    string    $prefix 
    382. -
    383.     * @return    string 
    384. -
    385.     * @access    private
    386. -
    387.     */
    388. -
    389.     function getUniqueResourceURI($prefix false)
    390. -
    391.     {
    392. -
    393.         static $bNodeCount;
    394. -
    395.         if(!$bNodeCount)
    396. -
    397.             $bNodeCount 0;
    398. -
    399.  
    400. -
    401.         if(!$prefix)
    402. -
    403.             $prefix=BNODE_PREFIX;
    404. -
    405.  
    406. -
    407.         return $prefix.++$bNodeCount;
    408. -
    409.     }
    410. -
    411.  
    412. -
    413.  
    414. -
    415.  
    416. -
    417.     /**
    418. -
    419.     * Returns a ResModel with this model as baseModel. This is the same as
    420. -
    421.     * ModelFactory::getResModelForBaseModel($this).
    422. -
    423.     *
    424. -
    425.     * @return    object    ResModel 
    426. -
    427.     * @access    public
    428. -
    429.     */
    430. -
    431.     function getResModel()
    432. -
    433.     {
    434. -
    435.         return ModelFactory::getResModelForBaseModel($this);
    436. -
    437.     }
    438. -
    439.  
    440. -
    441.  
    442. -
    443.  
    444. -
    445.     /**
    446. -
    447.     * Returns an OntModel with this model as baseModel.
    448. -
    449.     * $vocabulary has to be one of the following constants (currently only one is supported):
    450. -
    451.     * RDFS_VOCABULARY to select a RDFS Vocabulary.
    452. -
    453.     *
    454. -
    455.     * This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary).
    456. -
    457.     *
    458. -
    459.     * @param   constant  $vocabulary 
    460. -
    461.     * @return    object    OntModel 
    462. -
    463.     * @access    public
    464. -
    465.     */
    466. -
    467.     function getOntModel($vocabulary)
    468. -
    469.     {
    470. -
    471.         return ModelFactory::getOntModelForBaseModel($this$vocabulary);
    472. -
    473.     }
    474. -
    475.  
    476. -
    477.  
    478. -
    479.  
    480. -
    481.     /**
    482. -
    483.     * Searches for triples using find() and tracks forward blank nodes
    484. -
    485.     * until the final objects in the retrieved subgraphs are all named resources.
    486. -
    487.     * The method calls itself recursivly until the result is complete.
    488. -
    489.     * NULL input for subject, predicate or object will match anything.
    490. -
    491.     * Inputparameters are ignored for recursivly found statements.
    492. -
    493.     * Returns a new MemModel or adds (without checking for duplicates)
    494. -
    495.     * the found statements to a given MemModel.
    496. -
    497.     * Returns an empty MemModel, if nothing is found.
    498. -
    499.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    500. -
    501.     * WARNING: This method can be slow with large models.
    502. -
    503.     * NOTE:    Blank nodes are not renamed, they keep the same nodeIDs
    504. -
    505.     *          as in the queried model!
    506. -
    507.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    508. -
    509.     *
    510. -
    511.     * @author   Anton Koestlbacher <anton1@koestlbacher.de>
    512. -
    513.     * @param    object Node     $subject 
    514. -
    515.     * @param    object Node     $predicate 
    516. -
    517.     * @param    object Node     $object 
    518. -
    519.     * @param    object MemModel $object 
    520. -
    521.     * @return   object MemModel 
    522. -
    523.     * @access   public
    524. -
    525.     * @throws   PhpError
    526. -
    527.     */
    528. -
    529.     function findForward($subject$predicate$object&$newModel NULL)
    530. -
    531.     {
    532. -
    533.         if (!is_a($newModel"MemModel"))
    534. -
    535.         {
    536. -
    537.             $newModel New MemModel;
    538. -
    539.         }
    540. -
    541.  
    542. -
    543.         if (is_a($this"DbModel"))
    544. -
    545.         {
    546. -
    547.             $model $this;
    548. -
    549.             $res   $model->find($subject$predicate$object);
    550. -
    551.             $it    $res->getStatementIterator();
    552. -
    553.         }
    554. -
    555.         elseif (is_a($this"MemModel")) {
    556. -
    557.             $model $this;
    558. -
    559.             $it    $model->findAsIterator($subject$predicate$object);
    560. -
    561.         }
    562. -
    563.         elseif (is_a($this"ResModel")) {
    564. -
    565.             $model $this->model;
    566. -
    567.             $it    $model->findAsIterator($subject$predicate$object);
    568. -
    569.         }
    570. -
    571.  
    572. -
    573.         while ($it->hasNext())
    574. -
    575.         {
    576. -
    577.             $statement $it->next();
    578. -
    579.             $newModel->add($statement);
    580. -
    581.             if (is_a($statement->object(),'BlankNode'))
    582. -
    583.             {
    584. -
    585.                 $model->findForward($statement->object()NULLNULL$newModel);
    586. -
    587.             }
    588. -
    589.         }
    590. -
    591.         return $newModel;
    592. -
    593.     }
    594. -
    595.  
    596. -
    597.  
    598. -
    599.  
    600. -
    601.     /**
    602. -
    603.     * Perform an RDQL query on this Model. Should work with all types of models.
    604. -
    605.     * This method returns a MemModel containing the result statements.
    606. -
    607.     * If $closure is set to TRUE, the result will additionally contain
    608. -
    609.     * statements found by the findForward-method for blank nodes.
    610. -
    611.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    612. -
    613.     * WARNING: If called with $closure = TRUE this method
    614. -
    615.     *          can be slow with large models.
    616. -
    617.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    618. -
    619.     *
    620. -
    621.     * @author   Anton K�tlbacher <anton1@koestlbacher.de>
    622. -
    623.     * @author   code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer
    624. -
    625.     * @access   public
    626. -
    627.     * @param    string $queryString 
    628. -
    629.     * @param    boolean $closure 
    630. -
    631.     * @return   object MemModel 
    632. -
    633.     *
    634. -
    635.     */
    636. -
    637.     function getMemModelByRDQL($queryString$closure FALSE)
    638. -
    639.     {
    640. -
    641.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    642. -
    643.         $parser new RdqlParser();
    644. -
    645.         $parsedQuery =$parser->parseQuery($queryString);
    646. -
    647.  
    648. -
    649.         // If there are variables used in the pattern but not
    650. -
    651.         // in the select clause, add them to the select clause
    652. -
    653.         foreach ($parsedQuery['patterns'as $n => $pattern)
    654. -
    655.         {
    656. -
    657.             foreach ($pattern as $key => $val_1)
    658. -
    659.             {
    660. -
    661.                 if ($val_1['value']{0}=='?')
    662. -
    663.                 {
    664. -
    665.                     if (!in_array($val_1['value'],$parsedQuery['selectVars']))
    666. -
    667.                     {
    668. -
    669.                     array_push($parsedQuery['selectVars'],$val_1['value']);
    670. -
    671.                     }
    672. -
    673.                 }
    674. -
    675.             }
    676. -
    677.         }
    678. -
    679.  
    680. -
    681.         if (is_a($this"DbModel"))
    682. -
    683.         {
    684. -
    685.             $engine new RdqlDbEngine();
    686. -
    687.             $model  $this;
    688. -
    689.         }
    690. -
    691.         elseif (is_a($this"MemModel"))
    692. -
    693.         {
    694. -
    695.             $engine new RdqlMemEngine();
    696. -
    697.             $model  $this;
    698. -
    699.         }
    700. -
    701.         elseif (is_a($this"ResModel"))
    702. -
    703.         {
    704. -
    705.             $engine new RdqlMemEngine();
    706. -
    707.             $model  $this->model;
    708. -
    709.         }
    710. -
    711.  
    712. -
    713.         $res $engine->queryModel($model,$parsedQuery,TRUE);
    714. -
    715.         $rdqlIter new RdqlResultIterator($res);
    716. -
    717.         $newModel new MemModel();
    718. -
    719.  
    720. -
    721.         // Build statements from RdqlResultIterator
    722. -
    723.         while ($rdqlIter->hasNext()) {
    724. -
    725.             $result $rdqlIter->next();
    726. -
    727.             foreach ($parsedQuery['patterns'as $n => $pattern)
    728. -
    729.             {
    730. -
    731.                 if (substr($pattern['subject']['value']01== '?')
    732. -
    733.                 {
    734. -
    735.                     $subj $result[$pattern['subject']['value']];
    736. -
    737.                 }
    738. -
    739.                 else
    740. -
    741.                 {
    742. -
    743.                     $subj new Resource($pattern['subject']['value']);
    744. -
    745.                 }
    746. -
    747.                 if (substr($pattern['predicate']['value']01== '?')
    748. -
    749.                 {
    750. -
    751.                     $pred $result[$pattern['predicate']['value']];
    752. -
    753.                 }
    754. -
    755.                 else
    756. -
    757.                 {
    758. -
    759.                     $pred new Resource($pattern['predicate']['value']);
    760. -
    761.                 }
    762. -
    763.  
    764. -
    765.                 if (substr($pattern['object']['value']01== '?')
    766. -
    767.                 {
    768. -
    769.                     $obj $result[$pattern['object']['value']];
    770. -
    771.                 }
    772. -
    773.                 else
    774. -
    775.                 {
    776. -
    777.                     if (isset($pattern['object']['is_literal']))
    778. -
    779.                     {
    780. -
    781.                         $obj new Literal($pattern['object']['value']);
    782. -
    783.                         $obj->setDatatype($pattern['object']['l_dtype']);
    784. -
    785.                         $obj->setLanguage($pattern['object']['l_lang']);
    786. -
    787.                     }
    788. -
    789.                     else
    790. -
    791.                     {
    792. -
    793.                         $obj new Resource($pattern['object']['value']);
    794. -
    795.                     }
    796. -
    797.                 }
    798. -
    799.  
    800. -
    801.                 $statement new Statement($subj,$pred,$obj);
    802. -
    803.                 $newModel->add($statement);
    804. -
    805.  
    806. -
    807.                 // findForward() Statements containing an eventually given blank node
    808. -
    809.                 // and add them to the result, if closure = true
    810. -
    811.                 if (is_a($statement->object(),'BlankNode'&& $closure == True)
    812. -
    813.                 {
    814. -
    815.                     $newModel $model->findForward($statement->object(),NULL,NULL$newModel);
    816. -
    817.                 }
    818. -
    819.                 if (is_a($statement->subject(),'BlankNode'&& $closure == True)
    820. -
    821.                 {
    822. -
    823.                     $newModel $model->findForward($statement->subject(),NULL,NULL$newModel);
    824. -
    825.                 }
    826. -
    827.             }
    828. -
    829.         }
    830. -
    831.         return $newModel;
    832. -
    833.     }
    834. -
    835.  
    836. -
    837.  
    838. -
    839.  
    840. -
    841.     /**
    842. -
    843.     * Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    844. -
    845.     *
    846. -
    847.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    848. -
    849.     * Note: See RDFUtil for further Information.
    850. -
    851.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    852. -
    853.     *
    854. -
    855.     * @author   Anton K�tlbacher <anton1@koestlbacher.de>
    856. -
    857.     * @param    string  $format 
    858. -
    859.     * @param    boolean $short_prefix 
    860. -
    861.     * @return   string, binary
    862. -
    863.     * @access   public
    864. -
    865.     * @throws   PhpError
    866. -
    867.     */
    868. -
    869.     function visualize($format "dot"$short_prefix TRUE)
    870. -
    871.     {
    872. -
    873.         return RDFUtil::visualizeGraph($this$format$short_prefix);
    874. -
    875.     }
    876. -
    877.  
    878. -
    879.  
    880. -
    881.     /**
    882. -
    883.     * Performs a SPARQL query against a model. The model is converted to
    884. -
    885.     * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or
    886. -
    887.     * as an array containing the variables an their bindings.
    888. -
    889.     *
    890. -
    891.     * @param  string $query      the sparql query string
    892. -
    893.     * @param  string $resultform the result form ('xml' for SPARQL Query Results XML Format)
    894. -
    895.     * @return string/array 
    896. -
    897.     */
    898. -
    899.     function sparqlQuery($query$resultform false)
    900. -
    901.     {
    902. -
    903.         list($engine$dataset$this->_prepareSparql();
    904. -
    905.         return $engine->queryModel(
    906. -
    907.             $dataset,
    908. -
    909.             $this->_parseSparqlQuery($query),
    910. -
    911.             $resultform
    912. -
    913.         );
    914. -
    915.     }//function sparqlQuery($query,$resultform = false)
    916. -
    917.  
    918. -
    919.  
    920. -
    921.  
    922. -
    923.     /**
    924. -
    925.     *   Prepares a sparql query and returns a prepared statement
    926. -
    927.     *   that can be executed with data later on.
    928. -
    929.     *
    930. -
    931.     *   @param string $query Sparql query to prepare.
    932. -
    933.     *   @return SparqlEngine_PreparedStatement  prepared statement object
    934. -
    935.     */
    936. -
    937.     function sparqlPrepare($query)
    938. -
    939.     {
    940. -
    941.         list($engine$dataset$this->_prepareSparql();
    942. -
    943.         return $engine->prepare(
    944. -
    945.             $dataset,
    946. -
    947.             $this->_parseSparqlQuery($query)
    948. -
    949.          );
    950. -
    951.     }//function sparqlPrepare($query)
    952. -
    953.  
    954. -
    955.  
    956. -
    957.  
    958. -
    959.     /**
    960. -
    961.     *   Prepares everything for SparqlEngine-usage
    962. -
    963.     *   Loads the files, creates instances for SparqlEngine and
    964. -
    965.     *   Dataset...
    966. -
    967.     *
    968. -
    969.     *   @return array First value is the sparql engine, second the dataset
    970. -
    971.     */
    972. -
    973.     function _prepareSparql()
    974. -
    975.     {
    976. -
    977.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php';
    978. -
    979.         require_once RDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php';
    980. -
    981.  
    982. -
    983.         $dataset new DatasetMem();
    984. -
    985.         $dataset->setDefaultGraph($this);
    986. -
    987.  
    988. -
    989.         return array(
    990. -
    991.             SparqlEngine::factory($this),
    992. -
    993.             $dataset
    994. -
    995.         );
    996. -
    997.     }//function _prepareSparql()
    998. -
    999.  
    1000. -
    1001.  
    1002. -
    1003.  
    1004. -
    1005.     /**
    1006. -
    1007.     *   Parses an query and returns the parsed form.
    1008. -
    1009.     *   If the query is not a string but a Query object,
    1010. -
    1011.     *   it will just be returned.
    1012. -
    1013.     *
    1014. -
    1015.     *   @param $query mixed String or Query object
    1016. -
    1017.     *   @return Query query object
    1018. -
    1019.     *   @throws Exception If $query is no string and no Query object
    1020. -
    1021.     */
    1022. -
    1023.     function _parseSparqlQuery($query)
    1024. -
    1025.     {
    1026. -
    1027.         if ($this->queryParser === null{
    1028. -
    1029.             require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php';
    1030. -
    1031.             $this->queryParser = new SparqlParser();
    1032. -
    1033.         }
    1034. -
    1035.         return $this->queryParser->parse($query);
    1036. -
    1037.     }//function _parseSparqlQuery($query)
    1038. -
    1039.  
    1040. -
    1041. // end: Model
    1042. -
    1043.  
    1044. -
    1045. ?>
    1046. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModelFactory.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModelFactory.php.html.svn-base deleted file mode 100755 index 34a225e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelModelFactory.php.html.svn-base +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - File Source for ModelFactory.php - - - - - -

    Source for file ModelFactory.php

    -

    Documentation is available at ModelFactory.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/DbStore.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: ModelFactory
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * ModelFactory is a static class which provides methods for creating different
    20. -
    21. * types of RAP models. RAP models have to be created trough a ModelFactory
    22. -
    23. * instead of creating them directly with the 'new' operator because of RAP's
    24. -
    25. * dynamic code inclusion mechanism.
    26. -
    27. *
    28. -
    29. @version  $Id$
    30. -
    31. @author Daniel Westphal <mail at d-westphal.de>
    32. -
    33. @author Richard Cyganiak <richard@cyganiak.de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     model
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Returns a MemModel.
    51. -
    52.     * You can supply a base URI
    53. -
    54.     *
    55. -
    56.     * @param   string  $baseURI 
    57. -
    58.     * @return    object    MemModel 
    59. -
    60.     * @access    public
    61. -
    62.     */
    63. -
    64.     function getDefaultModel($baseURI null)
    65. -
    66.     {
    67. -
    68.         return ModelFactory::getMemModel($baseURI);
    69. -
    70.     }
    71. -
    72.  
    73. -
    74.     /**
    75. -
    76.     * Returns a NamedGraphSetMem.
    77. -
    78.     * You can supply a GraphSet name.
    79. -
    80.     *
    81. -
    82.     * @param string $graphSetId 
    83. -
    84.     * @param string $uri 
    85. -
    86.     * @access    public
    87. -
    88.     */
    89. -
    90.     function getDatasetMem($graphSetId null)
    91. -
    92.     {
    93. -
    94.         require_once RDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php';
    95. -
    96.         $m new DatasetMem($graphSetId);
    97. -
    98.         return $m;
    99. -
    100.     }
    101. -
    102.  
    103. -
    104.     /**
    105. -
    106.     * Returns a MemModel.
    107. -
    108.     * You can supply a base URI
    109. -
    110.     *
    111. -
    112.     * @param   string  $baseURI 
    113. -
    114.     * @return    object    MemModel 
    115. -
    116.     * @access    public
    117. -
    118.     */
    119. -
    120.     function getMemModel($baseURI null)
    121. -
    122.     {
    123. -
    124.         require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    125. -
    126.         $m new MemModel($baseURI);
    127. -
    128.         return $m;
    129. -
    130.     }
    131. -
    132.  
    133. -
    134.     /**
    135. -
    136.     * Returns a DbModel with the database connection
    137. -
    138.     * defined in constants.php.
    139. -
    140.     * You can supply a base URI. If a model with the given base
    141. -
    142.     * URI exists in the DbStore, it'll be opened.
    143. -
    144.     * If not, a new model will be created.
    145. -
    146.     *
    147. -
    148.     * @param   string  $baseURI 
    149. -
    150.     * @return    object    DbModel 
    151. -
    152.     * @access    public
    153. -
    154.     */
    155. -
    156.     function getDefaultDbModel($baseURI null)
    157. -
    158.     {
    159. -
    160.         $dbStore ModelFactory::getDbStore();
    161. -
    162.         $m ModelFactory::getDbModel($dbStore,$baseURI);
    163. -
    164.         return $m;
    165. -
    166.     }
    167. -
    168.  
    169. -
    170.     /**
    171. -
    172.     * Returns a new DbModel using the database connection
    173. -
    174.     * supplied by $dbStore.
    175. -
    176.     * You can supply a base URI. If a model with the given base
    177. -
    178.     * URI exists in the DbStore, it'll be opened.
    179. -
    180.     * If not, a new model will be created.
    181. -
    182.     *
    183. -
    184.     * @param   object    DbStore  $dbStore 
    185. -
    186.     * @param   string  $baseURI 
    187. -
    188.     * @return    object    DbModel 
    189. -
    190.     * @access    public
    191. -
    192.     */
    193. -
    194.     function getDbModel($dbStore$baseURI null)
    195. -
    196.     {
    197. -
    198.         if ($dbStore->modelExists($baseURI)) {
    199. -
    200.             return $dbStore->getModel($baseURI);
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         return $dbStore->getNewModel($baseURI);
    207. -
    208.     }
    209. -
    210.  
    211. -
    212.     /**
    213. -
    214.     * Returns a database connection with the given parameters.
    215. -
    216.     * Paramters, which are not defined are taken from the constants.php
    217. -
    218.     *
    219. -
    220.     * @param   string   $dbDriver 
    221. -
    222.     * @param   string   $host 
    223. -
    224.     * @param   string   $dbName 
    225. -
    226.     * @param   string   $user 
    227. -
    228.     * @param   string   $password 
    229. -
    230.     * @return    object    DbStore 
    231. -
    232.     * @access    public
    233. -
    234.     */
    235. -
    236.     function getDbStore($dbDriver=ADODB_DB_DRIVER$host=ADODB_DB_HOST$dbName=ADODB_DB_NAME,
    237. -
    238.                            $user=ADODB_DB_USER$password=ADODB_DB_PASSWORD)
    239. -
    240.     {
    241. -
    242.         $dbs new DbStore($dbDriver$host$dbName,$user$password);
    243. -
    244.         return $dbs;
    245. -
    246.     }
    247. -
    248.  
    249. -
    250.     /**
    251. -
    252.     * Returns a InfModelF.
    253. -
    254.     * (MemModel with forward chaining inference engine)
    255. -
    256.     * Configurations can be done in constants.php
    257. -
    258.     * You can supply a base URI
    259. -
    260.     *
    261. -
    262.     * @param   string  $baseURI 
    263. -
    264.     * @return    object    MemModel 
    265. -
    266.     * @access    public
    267. -
    268.     */
    269. -
    270.     function getInfModelF($baseURI null)
    271. -
    272.     {
    273. -
    274.         require_once RDFAPI_INCLUDE_DIR 'infModel/InfModelF.php';
    275. -
    276.         $mod new InfModelF($baseURI);
    277. -
    278.         return $mod;
    279. -
    280.     }
    281. -
    282.  
    283. -
    284.     /**
    285. -
    286.     * Returns a InfModelB.
    287. -
    288.     * (MemModel with backward chaining inference engine)
    289. -
    290.     * Configurations can be done in constants.php
    291. -
    292.     * You can supply a base URI
    293. -
    294.     *
    295. -
    296.     * @param   string  $baseURI 
    297. -
    298.     * @return    object    MemModel 
    299. -
    300.     * @access    public
    301. -
    302.     */
    303. -
    304.     function getInfModelB($baseURI null)
    305. -
    306.     {
    307. -
    308.         require_once RDFAPI_INCLUDE_DIR 'infModel/InfModelB.php';
    309. -
    310.         $mod new InfModelB($baseURI);
    311. -
    312.         return $mod;
    313. -
    314.     }
    315. -
    316.  
    317. -
    318.     /**
    319. -
    320.     * Returns a ResModel.
    321. -
    322.     * $modelType has to be one of the following constants:
    323. -
    324.     * MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new
    325. -
    326.     * model from defined type.
    327. -
    328.     * You can supply a base URI
    329. -
    330.     *
    331. -
    332.     * @param   constant  $modelType 
    333. -
    334.     * @param   string  $baseURI 
    335. -
    336.     * @return    object    ResModel 
    337. -
    338.     * @access    public
    339. -
    340.     */
    341. -
    342.     function getResModel($modelType$baseURI null)
    343. -
    344.     {
    345. -
    346.         switch ($modelType{
    347. -
    348.             case DBMODEL:
    349. -
    350.                 $baseModel ModelFactory::getDefaultDbModel($baseURI);
    351. -
    352.                 break;
    353. -
    354.  
    355. -
    356.             case INFMODELF:
    357. -
    358.                 $baseModel ModelFactory::getInfModelF($baseURI);
    359. -
    360.                 break;
    361. -
    362.  
    363. -
    364.             case INFMODELB:
    365. -
    366.                 $baseModel ModelFactory::getInfModelB($baseURI);
    367. -
    368.                 break;
    369. -
    370.  
    371. -
    372.             default:
    373. -
    374.                 $baseModel ModelFactory::getMemModel($baseURI);
    375. -
    376.                 break;
    377. -
    378.         }
    379. -
    380.         return ModelFactory::getResModelForBaseModel($baseModel);
    381. -
    382.     }
    383. -
    384.  
    385. -
    386.     /**
    387. -
    388.     * Creates a ResModel that wraps an existing base model.
    389. -
    390.     *
    391. -
    392.     * @param       object  Model    $baseModel 
    393. -
    394.     * @return    object    ResModel 
    395. -
    396.     * @access    public
    397. -
    398.     */
    399. -
    400.     function &getResModelForBaseModel(&$baseModel{
    401. -
    402.         require_once RDFAPI_INCLUDE_DIR 'resModel/ResModel.php';
    403. -
    404.         $mod new ResModel($baseModel);
    405. -
    406.         return $mod;
    407. -
    408.     }
    409. -
    410.  
    411. -
    412.     /**
    413. -
    414.     * Returns an OntModel.
    415. -
    416.     * $modelType has to be one of the following constants:
    417. -
    418.     * MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel
    419. -
    420.     * with a new model from defined type.
    421. -
    422.     * $vocabulary defines the ontology language. Currently only
    423. -
    424.     * RDFS_VOCABULARY is supported. You can supply a model base URI.
    425. -
    426.     *
    427. -
    428.     * @param       constant      $modelType 
    429. -
    430.     * @param       constant      $vocabulary 
    431. -
    432.     * @param       string      $baseURI 
    433. -
    434.     * @return    object        OntModel 
    435. -
    436.     * @access    public
    437. -
    438.     */
    439. -
    440.     function getOntModel($modelType,$vocabulary$baseURI null)
    441. -
    442.     {
    443. -
    444.         switch ($modelType)
    445. -
    446.         {
    447. -
    448.             case DBMODEL:
    449. -
    450.                 $baseModel ModelFactory::getDefaultDbModel($baseURI);
    451. -
    452.                 break;
    453. -
    454.  
    455. -
    456.             case INFMODELF:
    457. -
    458.                 $baseModel ModelFactory::getInfModelF($baseURI);
    459. -
    460.                 break;
    461. -
    462.  
    463. -
    464.             case INFMODELB:
    465. -
    466.                 $baseModel ModelFactory::getInfModelB($baseURI);
    467. -
    468.                 break;
    469. -
    470.  
    471. -
    472.             default:
    473. -
    474.                 $baseModel ModelFactory::getMemModel($baseURI);;
    475. -
    476.         }
    477. -
    478.  
    479. -
    480.         $mod ModelFactory::getOntModelForBaseModel($baseModel$vocabulary);
    481. -
    482.         return $mod;
    483. -
    484.     }
    485. -
    486.  
    487. -
    488.     /**
    489. -
    490.     * Creates an OntModel that wraps an existing base model.
    491. -
    492.     * $vocabulary defines the ontology language. Currently only
    493. -
    494.     * RDFS_VOCABULARY is supported.
    495. -
    496.     *
    497. -
    498.     * @param       object  Model    $baseModel 
    499. -
    500.     * @param       constant      $vocabulary 
    501. -
    502.     * @return    object        OntModel 
    503. -
    504.     * @access    public
    505. -
    506.     */
    507. -
    508.     function &getOntModelForBaseModel(&$baseModel$vocabulary)
    509. -
    510.     {
    511. -
    512.         require_once RDFAPI_INCLUDE_DIR 'ontModel/OntModel.php';
    513. -
    514.  
    515. -
    516.         switch ($vocabulary)
    517. -
    518.         {
    519. -
    520.             case RDFS_VOCABULARY:
    521. -
    522.                 require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.RDFS_VOCABULARY);
    523. -
    524.                 $vocab_object new RdfsVocabulary();
    525. -
    526.                 break;
    527. -
    528.             default:
    529. -
    530.                 trigger_error("Unknown vocabulary constant '$vocabulary'; only RDFS_VOCABULARY is supported"E_USER_WARNING);
    531. -
    532.                 $vocab_object null;
    533. -
    534.                 break;
    535. -
    536.         }
    537. -
    538.         $mod new OntModel($baseModel$vocab_object);
    539. -
    540.         return $mod;
    541. -
    542.     }
    543. -
    544.  
    545. -
    546.  
    547. -
    548.  
    549. -
    550.     /**
    551. -
    552.     * Creates a SparqlClient.
    553. -
    554.     *
    555. -
    556.     * @param       String  $server    Link to a SPARQL endpoint.
    557. -
    558.     * @return    SparqlClient the SparqlClient object.
    559. -
    560.     * @access    public
    561. -
    562.     */
    563. -
    564.     function getSparqlClient($server){
    565. -
    566.         $cl new SparqlClient($server);
    567. -
    568.         return $cl;
    569. -
    570.     }
    571. -
    572. }
    573. -
    574. ?>
    575. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelNode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelNode.php.html.svn-base deleted file mode 100755 index 6bda40ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelNode.php.html.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for Node.php - - - - - -

    Source for file Node.php

    -

    Documentation is available at Node.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR '/util/Object.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Node
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An abstract RDF node.
    18. -
    19.  * Can either be resource, literal or blank node.
    20. -
    21.  * Node is used in some comparisons like is_a($obj, "Node"),
    22. -
    23.  * meaning is $obj a resource, blank node or literal.
    24. -
    25.  *
    26. -
    27.  *
    28. -
    29.  * @version $Id$
    30. -
    31.  * @author Chris Bizer <chris@bizer.de>
    32. -
    33.  * @package model
    34. -
    35.  * @abstract
    36. -
    37.  *
    38. -
    39.  */
    40. -
    41.  class Node extends Object {
    42. -
    43.  // end:RDFNode
    44. -
    45.  
    46. -
    47.  
    48. -
    49. ?>
    50. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelResource.php.html.svn-base deleted file mode 100755 index 203d747a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelResource.php.html.svn-base +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - File Source for Resource.php - - - - - -

    Source for file Resource.php

    -

    Documentation is available at Resource.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Node.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Resource
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF resource.
    18. -
    19.  * Every RDF resource must have a URIref.
    20. -
    21.  * URIrefs are treated as logical constants, i.e. as names which denote something
    22. -
    23.  * (the things are called 'resources', but no assumptions are made about the nature of resources.)
    24. -
    25.  * Many RDF resources are pieces of vocabulary. They typically have a namespace
    26. -
    27.  * and a local name. In this case, a URI is composed as a
    28. -
    29.  * concatenation of the namespace and the local name.
    30. -
    31.  *
    32. -
    33.  *
    34. -
    35.  * @version  $Id$
    36. -
    37.  * @author Chris Bizer <chris@bizer.de>
    38. -
    39.  *
    40. -
    41.  * @package model
    42. -
    43.  * @access    public
    44. -
    45.  *
    46. -
    47.  */
    48. -
    49.  class Resource extends Node {
    50. -
    51.  
    52. -
    53.      /**
    54. -
    55.     * URIref to the resource
    56. -
    57.     * @var        string 
    58. -
    59.     * @access    private
    60. -
    61.     */
    62. -
    63.     var $uri;
    64. -
    65.  
    66. -
    67.  
    68. -
    69.    /**
    70. -
    71.     * Constructor
    72. -
    73.     * Takes an URI or a namespace/localname combination
    74. -
    75.     *
    76. -
    77.     * @param    string    $namespace_or_uri 
    78. -
    79.      * @param string $localName 
    80. -
    81.     * @access    public
    82. -
    83.     */
    84. -
    85.     function Resource($namespace_or_uri $localName NULL{
    86. -
    87.         if ($localName == NULL{
    88. -
    89.             $this->uri $namespace_or_uri;
    90. -
    91.           else {
    92. -
    93.             $this->uri $namespace_or_uri $localName;
    94. -
    95.           }
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.  
    102. -
    103.   /**
    104. -
    105.    * Returns the URI of the resource.
    106. -
    107.    * @return string 
    108. -
    109.    * @access    public
    110. -
    111.    */
    112. -
    113.   function getURI({
    114. -
    115.               return $this->uri;
    116. -
    117.    }
    118. -
    119.  
    120. -
    121.     /**
    122. -
    123.      * Returns the label of the resource, which is the URI of the resource.
    124. -
    125.      * @access    public
    126. -
    127.      * @return string 
    128. -
    129.      */
    130. -
    131.     function getLabel({
    132. -
    133.         return $this->getURI();
    134. -
    135.     }
    136. -
    137.  
    138. -
    139.   /**
    140. -
    141.    * Returns the namespace of the resource. May return null.
    142. -
    143.    * @access    public
    144. -
    145.    * @return string 
    146. -
    147.    */
    148. -
    149.   function getNamespace({
    150. -
    151.       // Import Package Utility
    152. -
    153.        include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    154. -
    155.  
    156. -
    157.        return RDFUtil::guessNamespace($this->uri);
    158. -
    159.   }
    160. -
    161.  
    162. -
    163.   /**
    164. -
    165.    * Returns the local name of the resource.
    166. -
    167.    * @access    public
    168. -
    169.    * @return string 
    170. -
    171.    */
    172. -
    173.     function getLocalName({
    174. -
    175.         // Import Package Utility
    176. -
    177.            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    178. -
    179.  
    180. -
    181.         return RDFUtil::guessName($this->uri);
    182. -
    183.       }
    184. -
    185.  
    186. -
    187.   /**
    188. -
    189.    * Dumps resource.
    190. -
    191.    * @access    public
    192. -
    193.    * @return string 
    194. -
    195.    */
    196. -
    197.   function toString({
    198. -
    199.     return 'Resource("' $this->uri .'")';
    200. -
    201.   }
    202. -
    203.  
    204. -
    205.   /**
    206. -
    207.    * Checks if the resource equals another resource.
    208. -
    209.    * Two resources are equal, if they have the same URI
    210. -
    211.    *
    212. -
    213.    * @access    public
    214. -
    215.    * @param        object    resource $that 
    216. -
    217.    * @return    boolean 
    218. -
    219.    */
    220. -
    221.    function equals ($that{
    222. -
    223.  
    224. -
    225.         if ($this == $that{
    226. -
    227.           return true;
    228. -
    229.         }
    230. -
    231.  
    232. -
    233.         if (($that == NULLor !(is_a($that'Resource')) or (is_a($that'BlankNode'))) {
    234. -
    235.           return false;
    236. -
    237.         }
    238. -
    239.  
    240. -
    241.         if ($this->getURI(== $that->getURI()) {
    242. -
    243.           return true;
    244. -
    245.         }
    246. -
    247.  
    248. -
    249.         return false;
    250. -
    251.     }
    252. -
    253.  
    254. -
    255.  
    256. -
    257. }
    258. -
    259.  
    260. -
    261. ?>
    262. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelStatement.php.html.svn-base deleted file mode 100755 index 48061786..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__modelStatement.php.html.svn-base +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - File Source for Statement.php - - - - - -

    Source for file Statement.php

    -

    Documentation is available at Statement.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Statement
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * An RDF statement.
    16. -
    17.  * In this implementation, a statement is not itself a resource.
    18. -
    19.  * If you want to use a a statement as subject or object of other statements,
    20. -
    21.  * you have to reify it first.
    22. -
    23.  *  
    24. -
    25.  * @author Chris Bizer <chris@bizer.de>
    26. -
    27.  * @version  $Id$
    28. -
    29.  * @package model
    30. -
    31.  */
    32. -
    33. class Statement extends Object {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Subject of the statement
    40. -
    41.     *
    42. -
    43.     * @var        object resource 
    44. -
    45.     * @access    private
    46. -
    47.     */    
    48. -
    49.      var $subj;
    50. -
    51.  
    52. -
    53.     /**
    54. -
    55.     * Predicate of the statement
    56. -
    57.     *
    58. -
    59.     * @var        object resource 
    60. -
    61.     * @access    private
    62. -
    63.     */        
    64. -
    65.     var $pred;
    66. -
    67.     
    68. -
    69.       /**
    70. -
    71.     * Object of the statement
    72. -
    73.     *
    74. -
    75.     * @var        object node 
    76. -
    77.     * @access    private
    78. -
    79.     */        
    80. -
    81.     var $obj;
    82. -
    83.  
    84. -
    85.   /**
    86. -
    87.    * The parameters to constructor are instances of classes and not just strings
    88. -
    89.    *
    90. -
    91.    * @param    object    node $subj 
    92. -
    93.    * @param    object    node $pred 
    94. -
    95.    * @param    object    node $obj 
    96. -
    97.     * @throws    PhpError
    98. -
    99.    */
    100. -
    101.   function Statement($subj$pred$obj{
    102. -
    103.  
    104. -
    105.     if (!is_a($subj'Resource')) {
    106. -
    107.         $errmsg RDFAPI_ERROR 
    108. -
    109.                   '(class: Statement; method: new): Resource expected as subject.';
    110. -
    111.         trigger_error($errmsgE_USER_ERROR)
    112. -
    113.     }
    114. -
    115.     if (!is_a($pred'Resource'|| is_a($pred'BlankNode')) {
    116. -
    117.         $errmsg RDFAPI_ERROR 
    118. -
    119.                   '(class: Statement; method: new): Resource expected as predicate, no blank node allowed.';
    120. -
    121.         trigger_error($errmsgE_USER_ERROR)
    122. -
    123.     }
    124. -
    125.     if (!(is_a($obj'Resource'or is_a($obj'Literal'))) {
    126. -
    127.         $errmsg RDFAPI_ERROR 
    128. -
    129.                   '(class: Statement; method: new): Resource or Literal expected as object.';
    130. -
    131.         trigger_error($errmsgE_USER_ERROR)
    132. -
    133.     }
    134. -
    135.         
    136. -
    137.     $this->pred $pred;
    138. -
    139.     $this->subj $subj;
    140. -
    141.     $this->obj $obj;
    142. -
    143.   }
    144. -
    145.  
    146. -
    147.   /**
    148. -
    149.    * Returns the subject of the triple.
    150. -
    151.    * @access    public
    152. -
    153.    * @return    object node 
    154. -
    155.    */
    156. -
    157.   function getSubject({
    158. -
    159.     return $this->subj;
    160. -
    161.   }
    162. -
    163.  
    164. -
    165.   /**
    166. -
    167.    * Returns the predicate of the triple.
    168. -
    169.    * @access    public
    170. -
    171.    * @return    object node 
    172. -
    173.    */
    174. -
    175.     function getPredicate({
    176. -
    177.     return $this->pred;
    178. -
    179.   }
    180. -
    181.  
    182. -
    183.   /**
    184. -
    185.    * Returns the object of the triple.
    186. -
    187.    * @access    public
    188. -
    189.    * @return    object node 
    190. -
    191.    */
    192. -
    193.    function getObject({
    194. -
    195.      return $this->obj;
    196. -
    197.    }
    198. -
    199.   
    200. -
    201.   /**
    202. -
    203.    * Alias for getSubject()
    204. -
    205.    * @access    public
    206. -
    207.    * @return    object node 
    208. -
    209.    */
    210. -
    211.   function subject({
    212. -
    213.     return $this->subj;
    214. -
    215.   }
    216. -
    217.  
    218. -
    219.   /**
    220. -
    221.    * Alias for getPredicate()
    222. -
    223.    * @access    public
    224. -
    225.    * @return    object node 
    226. -
    227.    */
    228. -
    229.     function predicate({
    230. -
    231.     return $this->pred;
    232. -
    233.   }
    234. -
    235.  
    236. -
    237.   /**
    238. -
    239.    * Alias for getObject()
    240. -
    241.    * @access    public
    242. -
    243.    * @return object node 
    244. -
    245.    */
    246. -
    247.    function object({
    248. -
    249.      return $this->obj;
    250. -
    251.    }
    252. -
    253.     /**
    254. -
    255.    * Retruns the hash code of the triple.
    256. -
    257.    * @access    public
    258. -
    259.    * @return string 
    260. -
    261.    */
    262. -
    263.    function hashCode()  {
    264. -
    265.       return md5($this->subj->getLabel($this->pred->getLabel()  $this->obj->getLabel());
    266. -
    267.    }
    268. -
    269.  
    270. -
    271.   /**
    272. -
    273.    * Dumps the triple.
    274. -
    275.    * @access    public
    276. -
    277.    * @return string 
    278. -
    279.    */  
    280. -
    281.  
    282. -
    283.   function toString(
    284. -
    285.     return  'Triple(' $this->subj->toString(', ' $this->pred->toString(', ' $this->obj->toString(')';
    286. -
    287.     
    288. -
    289.   }
    290. -
    291.  
    292. -
    293.   /**
    294. -
    295.    * Returns a toString() serialization of the statements's subject.
    296. -
    297.    *
    298. -
    299.    * @access    public
    300. -
    301.    * @return    string 
    302. -
    303.    */  
    304. -
    305.    function toStringSubject({
    306. -
    307.        return $this->subj->toString();
    308. -
    309.    }
    310. -
    311.  
    312. -
    313.   /**
    314. -
    315.    * Returns a toString() serialization of the statements's predicate.
    316. -
    317.    *
    318. -
    319.    * @access    public
    320. -
    321.    * @return    string 
    322. -
    323.    */  
    324. -
    325.    function toStringPredicate({
    326. -
    327.        return $this->pred->toString();
    328. -
    329.    }
    330. -
    331.  
    332. -
    333.   /**
    334. -
    335.    * Reurns a toString() serialization of the statements's object.
    336. -
    337.    *
    338. -
    339.    * @access    public
    340. -
    341.    * @return    string 
    342. -
    343.    */  
    344. -
    345.    function toStringObject({
    346. -
    347.        return $this->obj->toString();
    348. -
    349.    }
    350. -
    351.  
    352. -
    353.   /**
    354. -
    355.    * Returns the URI or bNode identifier of the statements's subject.
    356. -
    357.    *
    358. -
    359.    * @access    public
    360. -
    361.    * @return    string 
    362. -
    363.    */  
    364. -
    365.    function getLabelSubject({
    366. -
    367.        return $this->subj->getLabel();
    368. -
    369.    }
    370. -
    371.  
    372. -
    373.   /**
    374. -
    375.    * Returns the URI of the statements's predicate.
    376. -
    377.    *
    378. -
    379.    * @access    public
    380. -
    381.    * @return    string 
    382. -
    383.    */  
    384. -
    385.    function getLabelPredicate({
    386. -
    387.        return $this->pred->getLabel();
    388. -
    389.    }
    390. -
    391.  
    392. -
    393.   /**
    394. -
    395.    * Reurns the URI, text or bNode identifier of the statements's object.
    396. -
    397.    *
    398. -
    399.    * @access    public
    400. -
    401.    * @return    string 
    402. -
    403.    */  
    404. -
    405.    function getLabelObject({
    406. -
    407.        return $this->obj->getLabel();
    408. -
    409.    }
    410. -
    411.   
    412. -
    413.   /**
    414. -
    415.    * Checks if two statements are equal.
    416. -
    417.    * Two statements are considered to be equal if they have the
    418. -
    419.    * same subject, predicate and object. A statement can only be equal
    420. -
    421.    * to another statement object.
    422. -
    423.    * @access    public
    424. -
    425.    * @param        object    statement $that 
    426. -
    427.    * @return    boolean 
    428. -
    429.    */  
    430. -
    431.  
    432. -
    433.   function equals ($that{
    434. -
    435.     
    436. -
    437.         if ($this == $that{
    438. -
    439.           return true;
    440. -
    441.         }
    442. -
    443.         if ($that == NULL || !(is_a($that'Statement'))) {
    444. -
    445.           return false;
    446. -
    447.         }
    448. -
    449.   
    450. -
    451.         return
    452. -
    453.         $this->subj->equals($that->subject()) &&
    454. -
    455.         $this->pred->equals($that->predicate()) &&
    456. -
    457.         $this->obj->equals($that->object());
    458. -
    459.       }
    460. -
    461.  
    462. -
    463.   /**
    464. -
    465.    * Compares two statements and returns integer less than, equal to, or greater than zero.
    466. -
    467.    * Can be used for writing sorting function for models or with the PHP function usort().
    468. -
    469.    *
    470. -
    471.    * @access    public
    472. -
    473.    * @param        object    statement &$that 
    474. -
    475.    * @return    boolean 
    476. -
    477.    */  
    478. -
    479.  
    480. -
    481.   function compare(&$that{
    482. -
    483.       return statementsorter($this$that);
    484. -
    485.       // statementsorter function see below
    486. -
    487.   
    488. -
    489.       
    490. -
    491.       
    492. -
    493.   /**
    494. -
    495.    * Reifies a statement.
    496. -
    497.    * Returns a new MemModel that is the reification of the statement.
    498. -
    499.    * For naming the statement's bNode a Model or bNodeID must be passed to the method.
    500. -
    501.    *
    502. -
    503.    * @access    public
    504. -
    505.    * @param        mixed    &$model_or_bNodeID 
    506. -
    507.    * @return    object    model 
    508. -
    509.    */  
    510. -
    511.  
    512. -
    513.   function reify(&$model_or_bNodeID{
    514. -
    515.         
    516. -
    517.         if (is_a($model_or_bNodeID'MemModel')) {
    518. -
    519.             // parameter is model
    520. -
    521.             $statementModel new MemModel($model_or_bNodeID->getBaseURI());
    522. -
    523.             $thisStatement new BlankNode($model_or_bNodeID);
    524. -
    525.         else {
    526. -
    527.             // parameter is bNodeID
    528. -
    529.             $statementModel new MemModel();
    530. -
    531.             $thisStatement &$model_or_bNodeID;
    532. -
    533.         
    534. -
    535.         
    536. -
    537.         $RDFstatement new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    538. -
    539.         $RDFtype new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    540. -
    541.         $RDFsubject new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    542. -
    543.         $RDFpredicate new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    544. -
    545.         $RDFobject new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    546. -
    547.         
    548. -
    549.         $statementModel->add(new Statement($thisStatement$RDFtype$RDFstatement));
    550. -
    551.         $statementModel->add(new Statement($thisStatement$RDFsubject$this->getSubject()));
    552. -
    553.         $statementModel->add(new Statement($thisStatement$RDFpredicate$this->getPredicate()));
    554. -
    555.         $statementModel->add(new Statement($thisStatement$RDFobject$this->Object()));
    556. -
    557.         
    558. -
    559.         return $statementModel;
    560. -
    561.   }
    562. -
    563.   
    564. -
    565. // end: Statement
    566. -
    567.  
    568. -
    569.  
    570. -
    571. /**
    572. -
    573. * Comparison function for comparing two statements.
    574. -
    575. * statementsorter() is used by the PHP function usort ( array array, callback cmp_function)
    576. -
    577. *
    578. -
    579. @access    private
    580. -
    581. @param        object Statement    $a 
    582. -
    583. @param        object Statement    $b 
    584. -
    585. @return    integer less than, equal to, or greater than zero
    586. -
    587. @throws phpErrpr
    588. -
    589. */  
    590. -
    591. function statementsorter($a,$b{
    592. -
    593.       //Compare subjects
    594. -
    595.       $x=$a->getSubject();
    596. -
    597.       $y=$b->getSubject();
    598. -
    599.       $r=strcmp($x->getLabel(),$y->getLabel());
    600. -
    601.       if ($r!=0return $r;
    602. -
    603.       //Compare predicates
    604. -
    605.       $x=$a->getPredicate();
    606. -
    607.       $y=$b->getPredicate();
    608. -
    609.       $r=strcmp($x->getURI(),$y->getURI());
    610. -
    611.       if ($r!=0return $r;
    612. -
    613.       //Final resort, compare objects
    614. -
    615.       $x=$a->getObject();
    616. -
    617.       $y=$b->getObject();
    618. -
    619.       return strcmp($x->toString(),$y->toString());
    620. -
    621. }
    622. -
    623.     
    624. -
    625. ?>
    626. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__sparqlSPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__sparqlSPARQL.php.html.svn-base deleted file mode 100755 index 2ff346c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_model__sparqlSPARQL.php.html.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - File Source for SPARQL.php - - - - -

    Source for file SPARQL.php

    -

    Documentation is available at SPARQL.php

    -
    -
    1. <?PHP
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // SPARQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Sparql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17.  
    18. -
    19. // include SPARQL classes
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'sparql/Constraint.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'sparql/Query.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php' );
    36. -
    37.  
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:26:13 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelIndividual.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelIndividual.php.html.svn-base deleted file mode 100755 index 070df119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelIndividual.php.html.svn-base +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - File Source for Individual.php - - - - - -

    Source for file Individual.php

    -

    Documentation is available at Individual.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Individual
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Interface that encapsulates an individual in an ontology, sometimes referred
    18. -
    19. * to as a fact or assertion.
    20. -
    21. * In order to be recognised as an individual, rather than a generic resource,
    22. -
    23. * at least one rdf:type statement, referring to a known class, must be present
    24. -
    25. * in the model.
    26. -
    27. *
    28. -
    29.  
    30. -
    31. @version  $Id$
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     ontModel
    40. -
    41. @access    public
    42. -
    43. ***/    
    44. -
    45.  
    46. -
    47. class Individual extends OntResource   
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Constructor
    56. -
    57.     * You can supply a uri
    58. -
    59.     *
    60. -
    61.     * @param string $uri 
    62. -
    63.     * @access    public
    64. -
    65.     */        
    66. -
    67.     function Individual($uri null)
    68. -
    69.     {
    70. -
    71.         parent::OntResource($uri);
    72. -
    73.     }
    74. -
    75. -
    76. ?>
    77. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base deleted file mode 100755 index 0a608c4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOWLVocabulary.php.html.svn-base +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - File Source for OWLVocabulary.php - - - - - -

    Source for file OWLVocabulary.php

    -

    Documentation is available at OWLVocabulary.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OWLVocabulary
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * OWL vocabulary items
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @package     ontModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class OWLVocabulary extends OntVocabulary 
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Answer the resource that represents the class 'class' in this vocabulary.
    42. -
    43.     *
    44. -
    45.        * @return    object ResResource 
    46. -
    47.        * @access    public
    48. -
    49.        */
    50. -
    51.     function ONTCLASS()
    52. -
    53.     {
    54. -
    55.         return new ResResource(OWL_NS.'Class');    
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     * Answer the predicate that denotes the domain of a property.
    64. -
    65.     *
    66. -
    67.        * @return    object ResProperty 
    68. -
    69.        * @access    public
    70. -
    71.        */
    72. -
    73.     function DOMAIN()
    74. -
    75.     {
    76. -
    77.         return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);    
    78. -
    79.     }
    80. -
    81.     
    82. -
    83.      
    84. -
    85.      /**
    86. -
    87.     * Answer the predicate that denotes comment annotation on an ontology element.
    88. -
    89.     *
    90. -
    91.        * @return    object ResProperty 
    92. -
    93.        * @access    public
    94. -
    95.        */
    96. -
    97.     function COMMENT()
    98. -
    99.     {
    100. -
    101.         return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);    
    102. -
    103.     }
    104. -
    105.     
    106. -
    107.      /**
    108. -
    109.     * Answer the predicate that denotes isDefinedBy annotation on an ontology element
    110. -
    111.     *
    112. -
    113.        * @return    object ResProperty 
    114. -
    115.        * @access    public
    116. -
    117.        */
    118. -
    119.     function IS_DEFINED_BY()
    120. -
    121.     {
    122. -
    123.         return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Answer the predicate that denotes label annotation on an ontology element
    132. -
    133.     *
    134. -
    135.        * @return    object ResProperty 
    136. -
    137.        * @access    public
    138. -
    139.        */
    140. -
    141.     function LABEL()
    142. -
    143.     {
    144. -
    145.         return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
    146. -
    147.     }
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * Answer the predicate that denotes the domain of a property.
    154. -
    155.     *
    156. -
    157.        * @return    object ResProperty 
    158. -
    159.        * @access    public
    160. -
    161.        */
    162. -
    163.     function RANGE()
    164. -
    165.     {
    166. -
    167.         return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
    168. -
    169.     }
    170. -
    171.     
    172. -
    173.     /**
    174. -
    175.     * Answer the predicate that denotes seeAlso annotation on an ontology element
    176. -
    177.     *
    178. -
    179.        * @return    object ResProperty 
    180. -
    181.        * @access    public
    182. -
    183.        */
    184. -
    185.     function SEE_ALSO()
    186. -
    187.     {
    188. -
    189.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
    190. -
    191.     }
    192. -
    193.     
    194. -
    195.     /**
    196. -
    197.     * Answer the predicate that denotes that one class is a sub-class of another.
    198. -
    199.     *
    200. -
    201.        * @return    object ResProperty 
    202. -
    203.        * @access    public
    204. -
    205.        */
    206. -
    207.     function SUB_CLASS_OF()
    208. -
    209.     {
    210. -
    211.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
    212. -
    213.     }
    214. -
    215.     
    216. -
    217.     /**
    218. -
    219.     * Answer the predicate that denotes that one property is a sub-property of another.
    220. -
    221.     *
    222. -
    223.        * @return    object ResProperty 
    224. -
    225.        * @access    public
    226. -
    227.        */
    228. -
    229.     function SUB_PROPERTY_OF()
    230. -
    231.     {
    232. -
    233.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
    234. -
    235.     }
    236. -
    237.     
    238. -
    239.     
    240. -
    241.     
    242. -
    243.     function ANNOTATION_PROPERTY()
    244. -
    245.     {
    246. -
    247.         return new ResProperty(OWL_NS 'AnnotationProperty');    
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function ALL_DIFFERENT()
    254. -
    255.     {
    256. -
    257.         return new ResProperty(OWL_NS 'AllDifferent');    
    258. -
    259.     }
    260. -
    261.     
    262. -
    263.     function ALL_VALUES_FROM()
    264. -
    265.     {
    266. -
    267.         return new ResProperty(OWL_NS 'allValuesFrom');
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     function BACKWARD_COMPATIBLE_WITH()
    274. -
    275.     {
    276. -
    277.         return new ResProperty(OWL_NS 'backwardCompatibleWith');
    278. -
    279.     }
    280. -
    281.     
    282. -
    283.     function CARDINALITY()
    284. -
    285.     {
    286. -
    287.         return new ResProperty(OWL_NS 'cardinality');
    288. -
    289.     }
    290. -
    291.  
    292. -
    293.     function COMPLEMENT_OF()
    294. -
    295.     {
    296. -
    297.         return new ResProperty(OWL_NS 'complementOf');
    298. -
    299.     }
    300. -
    301.     
    302. -
    303.     function DATATYPE()
    304. -
    305.     {
    306. -
    307.         return new ResProperty(OWL_NS 'Datatype');
    308. -
    309.     }
    310. -
    311.     
    312. -
    313.     function DATATYPE_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return new ResProperty(OWL_NS 'DatatypeProperty');
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATA_RANGE()
    324. -
    325.     {
    326. -
    327.         return new ResProperty(OWL_NS 'DataRange');
    328. -
    329.     }
    330. -
    331.  
    332. -
    333.     function DATATYPE_RESTRICTION()
    334. -
    335.     {
    336. -
    337.         return new ResProperty(OWL_NS 'DatatypeRestriction');
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.     function DEPRECATED_CLASS()
    344. -
    345.     {
    346. -
    347.         return new ResProperty(OWL_NS 'DeprecatedClass');
    348. -
    349.     }
    350. -
    351.  
    352. -
    353.     function DEPRECATED_PROPERTY()
    354. -
    355.     {
    356. -
    357.         return new ResProperty(OWL_NS 'DeprecatedProperty');
    358. -
    359.     }
    360. -
    361.  
    362. -
    363.     function DISTINCT_MEMBERS()
    364. -
    365.     {
    366. -
    367.         return new ResProperty(OWL_NS 'distinctMembers');
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function DIFFERENT_FROM()
    374. -
    375.     {
    376. -
    377.         return new ResProperty(OWL_NS 'differentFrom');
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function DISJOINT_WITH()
    384. -
    385.     {
    386. -
    387.         return new ResProperty(OWL_NS 'disjointWith');
    388. -
    389.     }
    390. -
    391.  
    392. -
    393.     function EQUIVALENT_CLASS()
    394. -
    395.     {
    396. -
    397.         return new ResProperty(OWL_NS 'equivalentClass');
    398. -
    399.     }
    400. -
    401.  
    402. -
    403.     function EQUIVALENT_PROPERTY()
    404. -
    405.     {
    406. -
    407.         return new ResProperty(OWL_NS 'equivalentProperty');
    408. -
    409.     }
    410. -
    411.  
    412. -
    413.     function FUNCTIONAL_PROPERTY()
    414. -
    415.     {
    416. -
    417.         return new ResProperty(OWL_NS 'FunctionalProperty');
    418. -
    419.     }
    420. -
    421.  
    422. -
    423.     function HAS_VALUE()
    424. -
    425.     {
    426. -
    427.         return new ResProperty(OWL_NS 'hasValue');
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function INCOMPATIBLE_WITH()
    434. -
    435.     {
    436. -
    437.         return new ResProperty(OWL_NS 'incompatibleWith');
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IMPORTS()
    444. -
    445.     {
    446. -
    447.         return new ResProperty(OWL_NS 'imports');
    448. -
    449.     }
    450. -
    451.  
    452. -
    453.     function INTERSECTION_OF()
    454. -
    455.     {
    456. -
    457.         return new ResProperty(OWL_NS 'intersectionOf');
    458. -
    459.     }
    460. -
    461.  
    462. -
    463.     function INVERSE_FUNCTIONAL_PROPERTY()
    464. -
    465.     {
    466. -
    467.         return new ResProperty(OWL_NS 'InverseFunctionalProperty');
    468. -
    469.     }
    470. -
    471.  
    472. -
    473.     function INVERSE_OF()
    474. -
    475.     {
    476. -
    477.         return new ResProperty(OWL_NS 'inverseOf');
    478. -
    479.     }
    480. -
    481.  
    482. -
    483.     function MAX_CARDINALITY()
    484. -
    485.     {
    486. -
    487.         return new ResProperty(OWL_NS 'maxCardinality');
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function MIN_CARDINALITY()
    494. -
    495.     {
    496. -
    497.         return new ResProperty(OWL_NS 'minCardinality');
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function NOTHING()
    504. -
    505.     {
    506. -
    507.         return new ResProperty(OWL_NS 'Nothing');
    508. -
    509.     }
    510. -
    511.  
    512. -
    513.     function OBJECT_CLASS()
    514. -
    515.     {
    516. -
    517.         return new ResProperty(OWL_NS 'ObjectClass');
    518. -
    519.     }
    520. -
    521.  
    522. -
    523.     function OBJECT_PROPERTY()
    524. -
    525.     {
    526. -
    527.         return new ResProperty(OWL_NS 'ObjectProperty');
    528. -
    529.     }
    530. -
    531.  
    532. -
    533.     function OBJECT_RESTRICTION()
    534. -
    535.     {
    536. -
    537.         return new ResProperty(OWL_NS 'ObjectRestriction');
    538. -
    539.     }
    540. -
    541.  
    542. -
    543.     function ONE_OF()
    544. -
    545.     {
    546. -
    547.         return new ResProperty(OWL_NS 'oneOf');
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function ON_PROPERTY()
    554. -
    555.     {
    556. -
    557.         return new ResProperty(OWL_NS 'onProperty');
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function ONTOLOGY()
    564. -
    565.     {
    566. -
    567.         return new ResProperty(OWL_NS 'Ontology');
    568. -
    569.         
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function PRIOR_VERSION()
    576. -
    577.     {
    578. -
    579.         return new ResProperty(OWL_NS 'priorVersion');
    580. -
    581.     }
    582. -
    583.  
    584. -
    585.     function PROPERTY()
    586. -
    587.     {
    588. -
    589.         return new ResProperty(OWL_NS 'Property');
    590. -
    591.     }
    592. -
    593.  
    594. -
    595.     function RESTRICTION()
    596. -
    597.     {
    598. -
    599.         return new ResProperty(OWL_NS 'Restriction');
    600. -
    601.     }
    602. -
    603.  
    604. -
    605.     function SAME_AS()
    606. -
    607.     {
    608. -
    609.         return new ResProperty(OWL_NS 'sameAs');
    610. -
    611.     }
    612. -
    613.  
    614. -
    615.     function SAME_CLASS_AS()
    616. -
    617.     {
    618. -
    619.         return new ResProperty(OWL_NS 'sameClassAs');
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     function SAME_INDIVIDUAL_AS()
    626. -
    627.     {
    628. -
    629.         return new ResProperty(OWL_NS 'sameIndividualAs');
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     function SAME_PROPERTY_AS()
    636. -
    637.     {
    638. -
    639.         return new ResProperty(OWL_NS 'samePropertyAs');
    640. -
    641.     }
    642. -
    643.  
    644. -
    645.     function SOME_VALUES_FROM()
    646. -
    647.     {
    648. -
    649.         return new ResProperty(OWL_NS 'someValuesFrom');
    650. -
    651.     }
    652. -
    653.  
    654. -
    655.     function SYMMETRIC_PROPERTY()
    656. -
    657.     {
    658. -
    659.         return new ResProperty(OWL_NS 'SymmetricProperty');
    660. -
    661.     }
    662. -
    663.  
    664. -
    665.     function THING()
    666. -
    667.     {
    668. -
    669.         return new ResProperty(OWL_NS 'Thing');
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function TRANSITIVE_PROPERTY()
    676. -
    677.     {
    678. -
    679.         return new ResProperty(OWL_NS 'TransitiveProperty');
    680. -
    681.     }
    682. -
    683.  
    684. -
    685.     function UNION_OF()
    686. -
    687.     {
    688. -
    689.         return new ResProperty(OWL_NS 'unionOf');
    690. -
    691.     }
    692. -
    693.  
    694. -
    695.     function VERSION_INFO()
    696. -
    697.     {
    698. -
    699.         return new ResProperty(OWL_NS 'versionInfo');
    700. -
    701.     }
    702. -
    703.  
    704. -
    705.     function NAMESPACE()
    706. -
    707.     {
    708. -
    709.         return OWL_NS;
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.     /**
    716. -
    717.     * Answer the predicate that denotes the rdf:type property.
    718. -
    719.     *
    720. -
    721.        * @return    object ResProperty 
    722. -
    723.        * @access    public
    724. -
    725.        */
    726. -
    727.     function TYPE()
    728. -
    729.     {
    730. -
    731.         return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
    732. -
    733.     }
    734. -
    735. -
    736. ?>
    737. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntClass.php.html.svn-base deleted file mode 100755 index c8d501d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntClass.php.html.svn-base +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - File Source for OntClass.php - - - - - -

    Source for file OntClass.php

    -

    Documentation is available at OntClass.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntClass
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Class that represents an ontology node characterising a class description.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class OntClass extends OntResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Constructor
    42. -
    43.     * You can supply a uri
    44. -
    45.     *
    46. -
    47.     * @param string $uri 
    48. -
    49.     * @access    public
    50. -
    51.     */        
    52. -
    53.     function OntClass($uri null)
    54. -
    55.     {
    56. -
    57.         parent::OntResource($uri);
    58. -
    59.     }
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Add a sub-class of this class.
    66. -
    67.     *
    68. -
    69.        * @param    object ResResource        $resResource 
    70. -
    71.        * @return    boolean 
    72. -
    73.        * @access    public
    74. -
    75.        */
    76. -
    77.     function addSubClass($resResource)
    78. -
    79.     {
    80. -
    81.         return $resResource->addProperty($this->vocabulary->SUB_CLASS_OF(),$this);
    82. -
    83.     }
    84. -
    85.     
    86. -
    87.     /**
    88. -
    89.     * Add a super-class of this class.
    90. -
    91.     *
    92. -
    93.        * @param    object ResResource        $resResource 
    94. -
    95.        * @return    boolean 
    96. -
    97.        * @access    public
    98. -
    99.        */
    100. -
    101.     function addSuperClass($resResource)
    102. -
    103.     {
    104. -
    105.         return $this->addProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    106. -
    107.     }
    108. -
    109.     
    110. -
    111.     /**
    112. -
    113.     * Answer a class that is the sub-class of this class.
    114. -
    115.     * If there is more than one such class, an arbitrary selection is made.
    116. -
    117.     *
    118. -
    119.        * @return    object OntClass or NULL
    120. -
    121.        * @access    public
    122. -
    123.        */
    124. -
    125.     function getSubClass()
    126. -
    127.     {
    128. -
    129.         $statement $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_CLASS_OF(),$this);
    130. -
    131.         if ($statement !== null)
    132. -
    133.             return $this->model->createOntClass($statement->getLabelSubject());
    134. -
    135.         
    136. -
    137.         return null;
    138. -
    139.     }
    140. -
    141.     
    142. -
    143.     /**
    144. -
    145.     * Answer a class that is the super-class of this class.
    146. -
    147.     * If there is more than one such class, an arbitrary selection is made.
    148. -
    149.     *
    150. -
    151.        * @return    object OntClass or NULL
    152. -
    153.        * @access    public
    154. -
    155.        */
    156. -
    157.     function getSuperClass()
    158. -
    159.     {
    160. -
    161.         return $this->getPropertyValue($this->vocabulary->SUB_CLASS_OF(),'OntClass');
    162. -
    163.     }
    164. -
    165.     
    166. -
    167.     /**
    168. -
    169.     * Answer true if the given class is a sub-class of this class.
    170. -
    171.     * $direct - If true, only search the classes that are directly
    172. -
    173.     * adjacent to this class in the class hierarchy.
    174. -
    175.     *
    176. -
    177.        * @param    object ResResource        $resResource 
    178. -
    179.       * @param    boolean            $direct 
    180. -
    181.        * @return    boolean 
    182. -
    183.        * @access    public
    184. -
    185.        */
    186. -
    187.     function hasSubclass($resResource$direct true)
    188. -
    189.     {
    190. -
    191.         if ($direct)
    192. -
    193.             return $resResource->hasProperty($this->vocabulary->SUB_CLASS_OF(),$this);
    194. -
    195.         
    196. -
    197.         $index=array();
    198. -
    199.         return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource=== true);
    200. -
    201.     }
    202. -
    203.     
    204. -
    205.     /**
    206. -
    207.     * Answer true if the given class is a super-class of this class.
    208. -
    209.     * $direct - If true, only search the classes that are directly
    210. -
    211.     * adjacent to this class in the class hierarchy.
    212. -
    213.     *
    214. -
    215.        * @param    object ResResource        $resResource 
    216. -
    217.       * @param    boolean            $direct 
    218. -
    219.        * @return    boolean 
    220. -
    221.        * @access    public
    222. -
    223.        */
    224. -
    225.     function hasSuperClass($resResource$direct true)
    226. -
    227.     {
    228. -
    229.         if ($direct)
    230. -
    231.             return $this->hasProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    232. -
    233.         
    234. -
    235.         $index=array();
    236. -
    237.         return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource=== true);
    238. -
    239.     }
    240. -
    241.     
    242. -
    243.     /**
    244. -
    245.     * Answer an ResIterator over the individuals in the model that have this class
    246. -
    247.     * among their types.
    248. -
    249.     *
    250. -
    251.        * @return    object ResIterator 
    252. -
    253.        * @access    public
    254. -
    255.        */
    256. -
    257.     function listInstances()
    258. -
    259.     {
    260. -
    261.         /*
    262. -
    263.         $statements= $this->model->find(null,$this->vocabulary->TYPE(),$this);
    264. -
    265.         $return = array();
    266. -
    267.         $returnIndex=array();
    268. -
    269.         foreach ($statements as $statement) 
    270. -
    271.         {
    272. -
    273.             $subjectLabel=$statement->getLabelSubject();
    274. -
    275.             if (!in_array($subjectLabel,$returnIndex))
    276. -
    277.             {
    278. -
    279.                 $returnIndex[]=$subjectLabel;
    280. -
    281.                 $return[]=$statement->getSubject();
    282. -
    283.             }    
    284. -
    285.         }    
    286. -
    287.         return $return;    
    288. -
    289.         */
    290. -
    291.         return new ResIterator(null,$this->vocabulary->TYPE(),$this,'s',$this->model,'Individual');
    292. -
    293.     
    294. -
    295.     }
    296. -
    297.     
    298. -
    299.     /**
    300. -
    301.     * Answer an array over the classes that are declared to be sub-classes of this class.
    302. -
    303.     * Each element of the array will be an OntClass.
    304. -
    305.     * $direct - If true, only search the classes that are directly
    306. -
    307.     * adjacent to this class in the class hierarchy.
    308. -
    309.     *
    310. -
    311.        * @param    boolean        $direct 
    312. -
    313.        * @return    array 
    314. -
    315.        * @access    public
    316. -
    317.        */
    318. -
    319.     function listSubClasses($direct true)
    320. -
    321.     {
    322. -
    323.         $return array();
    324. -
    325.         if ($direct)
    326. -
    327.         {
    328. -
    329.             $statements $this->model->find(null,$this->vocabulary->SUB_CLASS_OF(),$this);
    330. -
    331.         else 
    332. -
    333.         {
    334. -
    335.             $index array();
    336. -
    337.             $statements $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
    338. -
    339.         }
    340. -
    341.         
    342. -
    343.         $returnIndex=array();
    344. -
    345.         foreach ($statements as $statement
    346. -
    347.         {
    348. -
    349.             $subjectLabel=$statement->getLabelSubject();
    350. -
    351.             if (!in_array($subjectLabel,$returnIndex))
    352. -
    353.             {
    354. -
    355.                 $returnIndex[]=$subjectLabel;
    356. -
    357.                 $return[]=$this->model->createOntClass($subjectLabel);
    358. -
    359.             }    
    360. -
    361.         }    
    362. -
    363.         return $return;    
    364. -
    365.     }
    366. -
    367.     
    368. -
    369.     /**
    370. -
    371.     * Answer an array over the classes that are declared to be super-classes of this class.
    372. -
    373.     * Each element of the array will be an OntClass.
    374. -
    375.     * $direct - If true, only search the classes that are directly
    376. -
    377.     * adjacent to this class in the class hierarchy.
    378. -
    379.     *
    380. -
    381.        * @param    boolean        $direct 
    382. -
    383.        * @return    array 
    384. -
    385.        * @access    public
    386. -
    387.        */
    388. -
    389.     function listSuperClasses($direct true)
    390. -
    391.     {
    392. -
    393.         $return array();
    394. -
    395.         if ($direct)
    396. -
    397.             return $this->listProperty($this->vocabulary->SUB_CLASS_OF(),'OntClass');
    398. -
    399.             
    400. -
    401.         $index=array();    
    402. -
    403.         $statements $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
    404. -
    405.         $returnIndex=array();
    406. -
    407.         foreach ($statements as $statement
    408. -
    409.         {
    410. -
    411.             $objectLabel=$statement->getLabelObject();
    412. -
    413.             if (!in_array($objectLabel,$returnIndex))
    414. -
    415.             {
    416. -
    417.                 $returnIndex[]=$objectLabel;
    418. -
    419.                 $return[]=$this->model->createOntClass($objectLabel);
    420. -
    421.             }    
    422. -
    423.         }    
    424. -
    425.         return $return;    
    426. -
    427.     }
    428. -
    429.     
    430. -
    431.     /**
    432. -
    433.     * Remove the given class from the sub-classes of this class.
    434. -
    435.     *
    436. -
    437.        * @param    object ResResource    $resResource 
    438. -
    439.        * @return    boolean 
    440. -
    441.        * @access    public
    442. -
    443.        */
    444. -
    445.     function removeSubClass($resResource)
    446. -
    447.     {
    448. -
    449.         return    $this->model->remove(new Statement($resResource,$this->vocabulary->SUB_CLASS_OF(),$this));
    450. -
    451.     }
    452. -
    453.     
    454. -
    455.     /**
    456. -
    457.     * Remove the given class from the super-classes of this class.
    458. -
    459.     *
    460. -
    461.        * @param    object ResResource        $resResource 
    462. -
    463.        * @return    boolean 
    464. -
    465.        * @access    public
    466. -
    467.        */
    468. -
    469.     function removeSuperClass($resResource)
    470. -
    471.     {
    472. -
    473.         return $this->removeProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    474. -
    475.     }
    476. -
    477.     
    478. -
    479.     /**
    480. -
    481.     * Assert that this class is super-class of the given class.
    482. -
    483.     * Any existing statements for subClassOf on prop will be removed.
    484. -
    485.     *
    486. -
    487.        * @param    object ResResource        $resResource 
    488. -
    489.        * @access    public
    490. -
    491.        */
    492. -
    493.     function setSubClass($resResource)
    494. -
    495.     {
    496. -
    497.         foreach ($this->listSubClasses(as $oldRes
    498. -
    499.         {
    500. -
    501.             $this->removeSubClass($oldRes);
    502. -
    503.         }
    504. -
    505.         $this->addSubClass($resResource);
    506. -
    507.     }
    508. -
    509.     
    510. -
    511.     /**
    512. -
    513.     * Assert that this class is sub-class of the given class.
    514. -
    515.     * Any existing statements for subClassOf on prop will be removed.
    516. -
    517.     *
    518. -
    519.        * @param    object ResResource        $resResource 
    520. -
    521.        * @access    public
    522. -
    523.        */
    524. -
    525.     function setSuperClass($resResource)
    526. -
    527.     {
    528. -
    529.         $this->setPropertyValue($this->vocabulary->SUB_CLASS_OF(),$resResource);
    530. -
    531.     }
    532. -
    533.     
    534. -
    535.     /**
    536. -
    537.     * Answer a resource that represents an instance of this OntClass and Individual
    538. -
    539.     * node in this model.
    540. -
    541.     * If a resource with the given uri exists in the model, it will be re-used.
    542. -
    543.     * If not, a new one is created in the updateable sub-model of the ontology model.
    544. -
    545.     *
    546. -
    547.        * @param    string    $uri 
    548. -
    549.        * @return    object Individual 
    550. -
    551.        * @access    public
    552. -
    553.        */    
    554. -
    555.     function createInstance($uri null)
    556. -
    557.     {
    558. -
    559.         $instance $this->model->createIndividual($uri);
    560. -
    561.         $instance->setInstanceRdfType($this);
    562. -
    563.         return $instance;
    564. -
    565.     }
    566. -
    567. -
    568. ?>
    569. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModel.php.html.svn-base deleted file mode 100755 index cc27c214..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModel.php.html.svn-base +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - File Source for OntModel.php - - - - - -

    Source for file OntModel.php

    -

    Documentation is available at OntModel.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OntModel
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Enhanced view of the model that is known to contain ontology data, under a
    18. -
    19. * given ontology vocabulary (such as RDFS). OntModel together with OntClass
    20. -
    21. * and OntResource provide ontology specific methods like addSubClass(),
    22. -
    23. * listSubClasses(), hasSuperProperty(), addDomain() and  listInstances(). This class does not by
    24. -
    25. * itself compute the deductive extension of the graph under the semantic
    26. -
    27. * rules of the language. Instead, we wrap an underlying model with this
    28. -
    29. * ontology interface, that presents a convenience syntax for accessing the
    30. -
    31. * language elements. Depending on the inference capability of the underlying
    32. -
    33. * model, the OntModel will appear to contain more or less triples.
    34. -
    35. * For example, if this class is used to wrap a MemModel or DBModel, only the
    36. -
    37. * relationships asserted by the document will be reported through this
    38. -
    39. * convenience API.
    40. -
    41. * Alternatively, if the OntModel wraps an InfModel (InfModelF / InfModelB),
    42. -
    43. * the inferred triples from the extension will be reported as well.
    44. -
    45. *
    46. -
    47. *
    48. -
    49. @version  $Id$
    50. -
    51. @author Daniel Westphal <mail at d-westphal dot de>
    52. -
    53. *
    54. -
    55. *
    56. -
    57. @package     ontModel
    58. -
    59. @access    public
    60. -
    61. ***/
    62. -
    63. class OntModel extends ResModel 
    64. -
    65. {
    66. -
    67.     /**
    68. -
    69.     * Holds a reference to the assoiated vocabulary.
    70. -
    71.     * @var        object 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $vocabulary;
    78. -
    79.     
    80. -
    81.     
    82. -
    83.     /**
    84. -
    85.     * Constructor.
    86. -
    87.     * You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary
    88. -
    89.     *
    90. -
    91.     * @param object Model $model 
    92. -
    93.     * @access    public
    94. -
    95.     */    
    96. -
    97.     function OntModel($model,$vocabulary)
    98. -
    99.     {
    100. -
    101.         parent::ResModel($model);
    102. -
    103.         $this->vocabulary $vocabulary;
    104. -
    105.     }
    106. -
    107.     
    108. -
    109.     /**
    110. -
    111.     * Answer a resource that represents a class description node in this model.
    112. -
    113.     * If a resource with the given uri exists in the model, it will be re-used.
    114. -
    115.     * If not, a new one is created in the updateable sub-model of the ontology model.
    116. -
    117.     *
    118. -
    119.        * @param    string    $uri 
    120. -
    121.        * @return    object OntClass 
    122. -
    123.        * @access    public
    124. -
    125.        */
    126. -
    127.     function createOntClass($uri null)
    128. -
    129.     {
    130. -
    131.         $class new OntClass($uri);
    132. -
    133.         $class->setAssociatedModel($this);
    134. -
    135.         $class->setVocabulary($this->vocabulary);
    136. -
    137.         $class->setInstanceRdfType($this->vocabulary->ONTCLASS());
    138. -
    139.         return $class;
    140. -
    141.     }
    142. -
    143.     
    144. -
    145.     /**
    146. -
    147.     * Answer a resource that represents an Individual node in this model.
    148. -
    149.     * If a resource with the given uri exists in the model, it will be re-used.
    150. -
    151.     * If not, a new one is created in the updateable sub-model of the ontology model.
    152. -
    153.     *
    154. -
    155.        * @param    string    $uri 
    156. -
    157.        * @return    object Individual 
    158. -
    159.        * @access    public
    160. -
    161.        */
    162. -
    163.     function createIndividual($uri null)
    164. -
    165.     {
    166. -
    167.         $individual new Individual($uri);
    168. -
    169.         $individual->setAssociatedModel($this);
    170. -
    171.         $individual->setVocabulary($this->vocabulary);
    172. -
    173.         return $individual;
    174. -
    175.     }
    176. -
    177.     
    178. -
    179.     /**
    180. -
    181.     * Answer a resource that represents an OntProperty node in this model.
    182. -
    183.     * If a resource with the given uri exists in the model, it will be re-used.
    184. -
    185.     * If not, a new one is created in the updateable sub-model of the ontology model.
    186. -
    187.     *
    188. -
    189.        * @param    string    $uri 
    190. -
    191.        * @return    object OntProperty 
    192. -
    193.        * @access    public
    194. -
    195.        */
    196. -
    197.     function createOntProperty($uri null)
    198. -
    199.     {
    200. -
    201.         $ontProperty new OntProperty($uri);
    202. -
    203.         $ontProperty->setAssociatedModel($this);
    204. -
    205.         $ontProperty->setVocabulary($this->vocabulary);
    206. -
    207.         $ontProperty->setInstanceRdfType($this->createResource(RDF_NAMESPACE_URI.RDF_PROPERTY));
    208. -
    209.         return $ontProperty;    
    210. -
    211.     }
    212. -
    213.     
    214. -
    215.     /**
    216. -
    217.     * Answer an array that ranges over all of the various forms of class
    218. -
    219.     * description resource in this model.
    220. -
    221.     * Class descriptions include  domain/range definitions, named  classes and subClass constructs.
    222. -
    223.     *
    224. -
    225.        * @return    array of object ResResource
    226. -
    227.        * @access    public
    228. -
    229.        */
    230. -
    231.     function listClasses()
    232. -
    233.     {
    234. -
    235.         //get all statements, with an rdf:type as property
    236. -
    237.         $statements$this->find(null,$this->vocabulary->TYPE(),null);
    238. -
    239.         $return array();
    240. -
    241.         $returnIndex=array();
    242. -
    243.         foreach ($statements as $statement
    244. -
    245.         {
    246. -
    247.             $objectLabel=$statement->getLabelObject();
    248. -
    249.             //if it's about a typed Individual    
    250. -
    251.             if ($objectLabel!=RDF_SCHEMA_URI.RDFS_CLASS)
    252. -
    253.             {
    254. -
    255.                 if (!in_array($objectLabel,$returnIndex))
    256. -
    257.                 {
    258. -
    259.                     $returnIndex[]=$objectLabel;
    260. -
    261.                     $return[]=$statement->getObject();
    262. -
    263.                 }
    264. -
    265.             else 
    266. -
    267.             //if it's a "class1 rdf:type rdf:class" construct
    268. -
    269.             {
    270. -
    271.                 $subjectLabel=$statement->getLabelSubject();
    272. -
    273.                 if (!in_array($subjectLabel,$returnIndex))
    274. -
    275.                 {
    276. -
    277.                     $returnIndex[]=$subjectLabel;
    278. -
    279.                     $return[]=$statement->getSubject();
    280. -
    281.                 }
    282. -
    283.             }    
    284. -
    285.         }
    286. -
    287.         //find all statements about SubClassConstructs
    288. -
    289.         $statements$this->find(null,$this->vocabulary->SUB_CLASS_OF(),null);
    290. -
    291.         foreach ($statements as $statement
    292. -
    293.         {
    294. -
    295.             //add the statements object to the result
    296. -
    297.             $objectLabel=$statement->getLabelObject();
    298. -
    299.             if (!in_array($objectLabel,$returnIndex))
    300. -
    301.             {
    302. -
    303.                 $returnIndex[]=$objectLabel;
    304. -
    305.                 $return[]=$statement->getObject();
    306. -
    307.             }    
    308. -
    309.         }    
    310. -
    311.         foreach ($statements as $statement
    312. -
    313.         {
    314. -
    315.             //add the statements subject to the result
    316. -
    317.             $objectLabel=$statement->getLabelSubject();
    318. -
    319.             if (!in_array($objectLabel,$returnIndex))
    320. -
    321.             {
    322. -
    323.                 $returnIndex[]=$objectLabel;
    324. -
    325.                 $return[]=$statement->getSubject();
    326. -
    327.             }    
    328. -
    329.         }
    330. -
    331.         return $return;    
    332. -
    333.     }
    334. -
    335. -
    336. ?>
    337. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base deleted file mode 100755 index 87b7a378..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntModelP.php.html.svn-base +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - File Source for OntModelP.php - - - - - -

    Source for file OntModelP.php

    -

    Documentation is available at OntModelP.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * OntModel Package
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. *
    12. -
    13. * Description               : OntModel package
    14. -
    15. *
    16. -
    17. * Author: Daniel Westphal    <mail at d-westphal dot de>
    18. -
    19. @package ontModel
    20. -
    21. *
    22. -
    23. *  ----------------------------------------------------------------------------------
    24. -
    25. */
    26. -
    27. // Include OntModel classes
    28. -
    29. include_onceRDFAPI_INCLUDE_DIR PACKAGE_RESMODEL);
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntVocabulary.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'ontModel/RdfsVocabulary.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntModel.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntResource.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntProperty.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntClass.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'ontModel/Individual.php');
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base deleted file mode 100755 index a55d5d42..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntProperty.php.html.svn-base +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - File Source for OntProperty.php - - - - - -

    Source for file OntProperty.php

    -

    Documentation is available at OntProperty.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OntProperty
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Class encapsulating a property in an ontology.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35.  
    36. -
    37. class OntProperty extends OntResource    
    38. -
    39. {
    40. -
    41.     /**
    42. -
    43.     * Constructor.
    44. -
    45.     * You can supply a URI.
    46. -
    47.     *
    48. -
    49.     * @param string $uri 
    50. -
    51.     * @access    public
    52. -
    53.     */
    54. -
    55.     function OntProperty($uri null)
    56. -
    57.     {
    58. -
    59.         parent::OntResource($uri);
    60. -
    61.     }
    62. -
    63.     
    64. -
    65.     /**
    66. -
    67.     * Add a resource representing the domain of this property.
    68. -
    69.     *
    70. -
    71.        * @param    object ResResource    $resResource 
    72. -
    73.        * @return    boolean 
    74. -
    75.        * @access    public
    76. -
    77.        */
    78. -
    79.     function addDomain($resResource)
    80. -
    81.     {
    82. -
    83.         return $this->addProperty($this->vocabulary->DOMAIN(),$resResource);
    84. -
    85.     }
    86. -
    87.     
    88. -
    89.     /**
    90. -
    91.     * Add a resource representing the range of this property.
    92. -
    93.     *
    94. -
    95.        * @param    object ResResource    $resResource 
    96. -
    97.        * @return    boolean 
    98. -
    99.        * @access    public
    100. -
    101.        */
    102. -
    103.     function addRange($resResource)
    104. -
    105.     {
    106. -
    107.         return $this->addProperty($this->vocabulary->RANGE(),$resResource);
    108. -
    109.     }
    110. -
    111.     
    112. -
    113.     /**
    114. -
    115.     * Add a sub-property of this property.
    116. -
    117.     *
    118. -
    119.        * @param    object ResProperty    $resProperty 
    120. -
    121.        * @return    boolean 
    122. -
    123.        * @access    public
    124. -
    125.        */    
    126. -
    127.     function addSubProperty($resProperty)
    128. -
    129.     {
    130. -
    131.         return $resProperty->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * Add a super-property of this property.
    140. -
    141.     *
    142. -
    143.        * @param    object ResProperty    $resProperty 
    144. -
    145.        * @return    boolean 
    146. -
    147.        * @access    public
    148. -
    149.        */
    150. -
    151.     function addSuperProperty($resProperty)
    152. -
    153.     {
    154. -
    155.         return $this->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    156. -
    157.     }
    158. -
    159.     
    160. -
    161.     /**
    162. -
    163.     * Answer a OntClass that represents the domain class of this property.
    164. -
    165.     * If there is more than one such resource, an arbitrary selection is made.
    166. -
    167.     *
    168. -
    169.        * @return    object OntClass 
    170. -
    171.        * @access    public
    172. -
    173.        */
    174. -
    175.     function getDomain()
    176. -
    177.     {
    178. -
    179.         return $this->getPropertyValue($this->vocabulary->DOMAIN(),'OntClass');
    180. -
    181.     }
    182. -
    183.  
    184. -
    185.     /**
    186. -
    187.     * Answer a OntClass that represents the range class of this property.
    188. -
    189.     * If there is more than one such resource, an arbitrary selection is made.
    190. -
    191.     *
    192. -
    193.        * @return    object OntClass 
    194. -
    195.        * @access    public
    196. -
    197.        */
    198. -
    199.     function getRange()
    200. -
    201.     {
    202. -
    203.         return $this->getPropertyValue($this->vocabulary->RANGE(),'OntClass');
    204. -
    205.     }
    206. -
    207.     
    208. -
    209.     /**
    210. -
    211.     * Answer a property that is the sub-property of this property.
    212. -
    213.     * If there is more than one such property, an arbitrary selection is made.
    214. -
    215.     *
    216. -
    217.        * @return    object OntProperty 
    218. -
    219.        * @access    public
    220. -
    221.        */
    222. -
    223.     function getSubProperty()
    224. -
    225.     {
    226. -
    227.         $statement $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
    228. -
    229.         if ($statement !== null)
    230. -
    231.             return new OntProperty($statement->getLabelSubject());
    232. -
    233.         
    234. -
    235.         return null;
    236. -
    237.     }
    238. -
    239.     
    240. -
    241.     /**
    242. -
    243.     * Answer a property that is the super-property of this property.
    244. -
    245.     * If there is more than one such property, an arbitrary selection is made.
    246. -
    247.     *
    248. -
    249.        * @return    object OntProperty 
    250. -
    251.        * @access    public
    252. -
    253.        */
    254. -
    255.     function getSuperProperty()
    256. -
    257.     {
    258. -
    259.         return $this->getPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
    260. -
    261.     }
    262. -
    263.     
    264. -
    265.     /**
    266. -
    267.     * Answer true if the given resource a class specifying the domain of this property.
    268. -
    269.     *
    270. -
    271.        * @param    object ResResource    $resResource 
    272. -
    273.        * @return    boolean 
    274. -
    275.        * @access    public
    276. -
    277.        */
    278. -
    279.     function hasDomain($resResource)
    280. -
    281.     {
    282. -
    283.         return $this->hasProperty($this->vocabulary->DOMAIN(),$resResource);
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Answer true if the given resource a class specifying the range of this property.
    292. -
    293.     *
    294. -
    295.        * @param    object ResResource    $resResource 
    296. -
    297.        * @return    boolean 
    298. -
    299.        * @access    public
    300. -
    301.        */
    302. -
    303.     function hasRange($resResource)
    304. -
    305.     {
    306. -
    307.         return $this->hasProperty($this->vocabulary->RANGE(),$resResource);
    308. -
    309.     }
    310. -
    311.     
    312. -
    313.     /**
    314. -
    315.     * Answer true if the given property is a sub-property of this property.
    316. -
    317.     * If $direct is set to true, only consider the direcly adjacent
    318. -
    319.     * properties in the property hierarchy
    320. -
    321.     *
    322. -
    323.        * @param    object ResResource    $resProperty 
    324. -
    325.        * @param    boolean    $direct 
    326. -
    327.        * @return    boolean 
    328. -
    329.        * @access    public
    330. -
    331.        */
    332. -
    333.     function hasSubProperty($resProperty$direct true)
    334. -
    335.     {
    336. -
    337.         if ($direct)
    338. -
    339.             return $resProperty->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
    340. -
    341.         
    342. -
    343.         $index=array();
    344. -
    345.         return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty=== true);
    346. -
    347.     }
    348. -
    349.     
    350. -
    351.     /**
    352. -
    353.     * Answer true if the given property is a super-property of this property.
    354. -
    355.     * If $direct is set to true, only consider the direcly adjacent
    356. -
    357.     * properties in the property hierarchy
    358. -
    359.     *
    360. -
    361.        * @param    object ResResource    $resProperty 
    362. -
    363.        * @param    boolean    $direct 
    364. -
    365.        * @return    boolean 
    366. -
    367.        * @access    public
    368. -
    369.        */
    370. -
    371.     function hasSuperProperty($resProperty$direct true)
    372. -
    373.     {
    374. -
    375.         if ($direct)
    376. -
    377.             return $this->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    378. -
    379.         
    380. -
    381.         $index=array();
    382. -
    383.         return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty=== true);
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Answer an array of all of the declared domain classes of this property.
    392. -
    393.     * Each element of the iterator will be an OntClass.
    394. -
    395.     *
    396. -
    397.        * @return    array of OntClasses
    398. -
    399.        * @access    public
    400. -
    401.        */
    402. -
    403.     function listDomain()
    404. -
    405.     {
    406. -
    407.         return $this->listProperty($this->vocabulary->DOMAIN(),'OntClass');
    408. -
    409.     }
    410. -
    411.     
    412. -
    413.     /**
    414. -
    415.     * Answer an array of all of the declared range classes of this property.
    416. -
    417.     * Each element of the iterator will be an OntClass.
    418. -
    419.     *
    420. -
    421.        * @return    array of OntClasses
    422. -
    423.        * @access    public
    424. -
    425.        */
    426. -
    427.     function listRange()
    428. -
    429.     {
    430. -
    431.         return $this->listProperty($this->vocabulary->RANGE(),'OntClass');
    432. -
    433.     }
    434. -
    435.     
    436. -
    437.     /**
    438. -
    439.     * Answer an array of all the properties that are declared to be
    440. -
    441.     * sub-properties of this property. Each element of the iterator will be an
    442. -
    443.     * OntProperty.
    444. -
    445.     * If $direct is set to true, only consider the direcly adjacent
    446. -
    447.     * properties in the property hierarchy
    448. -
    449.     *
    450. -
    451.        * @param    boolean    $direct 
    452. -
    453.        * @return    array of OntProperties
    454. -
    455.        * @access    public
    456. -
    457.        */
    458. -
    459.     function listSubProperties($direct true)
    460. -
    461.     {
    462. -
    463.         $return array();
    464. -
    465.         if ($direct)
    466. -
    467.         {
    468. -
    469.             $statements $this->model->find(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
    470. -
    471.         else 
    472. -
    473.         {
    474. -
    475.             $index array();
    476. -
    477.             $statements $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
    478. -
    479.         }
    480. -
    481.         
    482. -
    483.         $returnIndex=array();
    484. -
    485.         foreach ($statements as $statement
    486. -
    487.         {
    488. -
    489.             $objectLabel=$statement->getLabelSubject();
    490. -
    491.             if (!in_array($objectLabel,$returnIndex))
    492. -
    493.             {
    494. -
    495.                 $returnIndex[]=$objectLabel;
    496. -
    497.                 $return[]=new OntProperty($statement->getLabelSubject());
    498. -
    499.             }    
    500. -
    501.         }    
    502. -
    503.         return $return;    
    504. -
    505.     }
    506. -
    507.     
    508. -
    509.     /**
    510. -
    511.     * Answer an array of all the properties that are declared to be
    512. -
    513.     * super-properties of this property. Each element of the iterator will be an
    514. -
    515.     * OntProperty.
    516. -
    517.     * If $direct is set to true, only consider the direcly adjacent
    518. -
    519.     * properties in the property hierarchy
    520. -
    521.     *
    522. -
    523.        * @param    boolean    $direct 
    524. -
    525.        * @return    array of OntProperties
    526. -
    527.        * @access    public
    528. -
    529.        */
    530. -
    531.     function listSuperProperties($direct true)
    532. -
    533.     {
    534. -
    535.         $return array();
    536. -
    537.         if ($direct)
    538. -
    539.             return $this->listProperty($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
    540. -
    541.             
    542. -
    543.         $index=array();    
    544. -
    545.         $statements $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
    546. -
    547.         $returnIndex=array();
    548. -
    549.         foreach ($statements as $statement
    550. -
    551.         {
    552. -
    553.             $objectLabel=$statement->getLabelObject();
    554. -
    555.             if (!in_array($objectLabel,$returnIndex))
    556. -
    557.             {
    558. -
    559.                 $returnIndex[]=$objectLabel;
    560. -
    561.                 $return[]=new OntProperty($statement->getLabelObject());
    562. -
    563.             }    
    564. -
    565.         }    
    566. -
    567.         return $return;    
    568. -
    569.     }
    570. -
    571.     
    572. -
    573.     /**
    574. -
    575.     * Remove the given class from the stated domain(s) of this property.
    576. -
    577.     *
    578. -
    579.        * @param    object ResResource $resResource 
    580. -
    581.        * @return    boolean 
    582. -
    583.        * @access    public
    584. -
    585.        */
    586. -
    587.     function removeDomain($resResource)
    588. -
    589.     {
    590. -
    591.         return $this->removeProperty($this->vocabulary->DOMAIN(),$resResource);
    592. -
    593.     }
    594. -
    595.     
    596. -
    597.     /**
    598. -
    599.     * Remove the given class from the stated range(es) of this property.
    600. -
    601.     *
    602. -
    603.        * @param    object ResResource $resResource 
    604. -
    605.        * @return    boolean 
    606. -
    607.        * @access    public
    608. -
    609.        */
    610. -
    611.     function removeRange($resResource)
    612. -
    613.     {
    614. -
    615.         return $this->removeProperty($this->vocabulary->RANGE(),$resResource);
    616. -
    617.     }
    618. -
    619.     
    620. -
    621.     /**
    622. -
    623.     * Remove the given property from the sub-properties of this property.
    624. -
    625.     *
    626. -
    627.        * @param    object ResProperty $resProperty 
    628. -
    629.        * @return    boolean 
    630. -
    631.        * @access    public
    632. -
    633.        */
    634. -
    635.     function removeSubProperty($resProperty)
    636. -
    637.     {
    638. -
    639.         return    $this->model->remove(new Statement($resProperty,$this->vocabulary->SUB_PROPERTY_OF(),$this));
    640. -
    641.     }
    642. -
    643.     
    644. -
    645.     /**
    646. -
    647.     * Remove the given property from the super-properties of this property.
    648. -
    649.     *
    650. -
    651.        * @param    object ResProperty $resProperty 
    652. -
    653.        * @return    boolean 
    654. -
    655.        * @access    public
    656. -
    657.        */
    658. -
    659.     function removeSuperProperty($resProperty)
    660. -
    661.     {
    662. -
    663.         return $this->removeProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    664. -
    665.     }
    666. -
    667.  
    668. -
    669.     /**
    670. -
    671.     * Assert that the given resource represents the class of individuals
    672. -
    673.     * that form the domain of this property. Any existing domain statements
    674. -
    675.     * for this property are removed.
    676. -
    677.     *
    678. -
    679.        * @param    object ResResource $resResource 
    680. -
    681.        * @access    public
    682. -
    683.        */
    684. -
    685.     function setDomain($resResource)
    686. -
    687.     {
    688. -
    689.         $this->setPropertyValue($this->vocabulary->DOMAIN(),$resResource);
    690. -
    691.     }
    692. -
    693.     
    694. -
    695.     /**
    696. -
    697.     * Assert that the given resource represents the class of individuals
    698. -
    699.     * that form the range of this property. Any existing range statements
    700. -
    701.     * for this property are removed.
    702. -
    703.     *
    704. -
    705.        * @param    object ResResource $resResource 
    706. -
    707.        * @access    public
    708. -
    709.        */
    710. -
    711.     function setRange($resResource)
    712. -
    713.     {
    714. -
    715.         $this->setPropertyValue($this->vocabulary->RANGE(),$resResource);
    716. -
    717.     }
    718. -
    719.     
    720. -
    721.     /**
    722. -
    723.     * Assert that this property is super-property of the given property.
    724. -
    725.     * Any existing statements for superPropertyOf on prop will be removed.
    726. -
    727.     *
    728. -
    729.        * @param    object ResProperty $resProperty 
    730. -
    731.        * @access    public
    732. -
    733.        */
    734. -
    735.     function setSubProperty($resProperty)
    736. -
    737.     {
    738. -
    739.         foreach ($this->listSubProperties(as $oldResProperty
    740. -
    741.         {
    742. -
    743.             $this->removeSubProperty($oldResProperty);
    744. -
    745.         }
    746. -
    747.         
    748. -
    749.         $this->addSubProperty($resProperty);
    750. -
    751.     }
    752. -
    753.     
    754. -
    755.     /**
    756. -
    757.     * Assert that this property is sub-property of the given property.
    758. -
    759.     * Any existing statements for subPropertyOf on prop will be removed.
    760. -
    761.     *
    762. -
    763.        * @param    object ResProperty $resProperty 
    764. -
    765.        * @access    public
    766. -
    767.        */
    768. -
    769.     function setSuperProperty($resProperty)
    770. -
    771.     {
    772. -
    773.         $this->setPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    774. -
    775.     }
    776. -
    777. -
    778. ?>
    779. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:10 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntResource.php.html.svn-base deleted file mode 100755 index 5c34fc0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntResource.php.html.svn-base +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - File Source for OntResource.php - - - - - -

    Source for file OntResource.php

    -

    Documentation is available at OntResource.php

    -
    -
    1. <?php 
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntResource
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Provides a common super-type for all of the abstractions in
    16. -
    17. * this ontology representation package.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class OntResource extends ResResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Holds a reference to the assoiated vocabulary
    42. -
    43.     * @var        object 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $vocabulary;
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Holds a resResource of the type, which is this ontResource of.
    56. -
    57.     * If this value is set, the ontModel will add an additional
    58. -
    59.     * statement about this resource and the fiven rdf:type
    60. -
    61.     * @var        object 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $rdfType;
    68. -
    69.     
    70. -
    71.     
    72. -
    73.     /**
    74. -
    75.     * Constructor
    76. -
    77.     * You can supply a uri
    78. -
    79.     *
    80. -
    81.     * @param string $uri 
    82. -
    83.     * @access    public
    84. -
    85.     */
    86. -
    87.     function OntResource($uri null)
    88. -
    89.     {
    90. -
    91.         $this->rdfType=false;
    92. -
    93.         parent::ResResource($uri);
    94. -
    95.     }
    96. -
    97.     
    98. -
    99.     /**
    100. -
    101.     * Sets the reference to the assoiated vocabulary
    102. -
    103.     *
    104. -
    105.        * @param    object OntVocabulary    $vocabulary 
    106. -
    107.        * @access    public
    108. -
    109.        */
    110. -
    111.     function setVocabulary($vocabulary)
    112. -
    113.     {
    114. -
    115.         $this->vocabulary $vocabulary;
    116. -
    117.     }
    118. -
    119.     
    120. -
    121.     /**
    122. -
    123.     * Add the given comment to this resource.
    124. -
    125.     *
    126. -
    127.        * @param    object ResLiteral    $comment 
    128. -
    129.        * @return    boolean 
    130. -
    131.        * @access    public
    132. -
    133.        */
    134. -
    135.     function addComment($comment)
    136. -
    137.     {
    138. -
    139.         return $this->addProperty($this->vocabulary->COMMENT(),$comment);
    140. -
    141.     }
    142. -
    143.     
    144. -
    145.     /**
    146. -
    147.     * Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    148. -
    149.     *
    150. -
    151.        * @return    object ResLiteral or NULL
    152. -
    153.        * @access    public
    154. -
    155.        */
    156. -
    157.     function getComment()
    158. -
    159.     {
    160. -
    161.         return $this->getPropertyValue($this->vocabulary->COMMENT());
    162. -
    163.     }
    164. -
    165.     
    166. -
    167.     /**
    168. -
    169.     * Add a resource that is declared to provide a definition of this resource.
    170. -
    171.     *
    172. -
    173.        * @param    object ResResource    $resResource 
    174. -
    175.        * @return    boolean 
    176. -
    177.        * @access    public
    178. -
    179.        */
    180. -
    181.     function addIsDefinedBy($resResource)
    182. -
    183.     {
    184. -
    185.         return $this->addProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    186. -
    187.     }
    188. -
    189.     
    190. -
    191.     /**
    192. -
    193.     * Answer a resource that is declared to provide a definition of this resource.
    194. -
    195.     * If there is more than one such resource, an arbitrary selection is made.
    196. -
    197.     *
    198. -
    199.        * @return    object ResResource 
    200. -
    201.        * @access    public
    202. -
    203.        */
    204. -
    205.     function getIsDefinedBy()
    206. -
    207.     {
    208. -
    209.         return $this->getPropertyValue($this->vocabulary->IS_DEFINED_BY());
    210. -
    211.     }
    212. -
    213.     
    214. -
    215.     /**
    216. -
    217.     * Add the given Label to this resource
    218. -
    219.     *
    220. -
    221.        * @param    object ResLiteral    $resLiteral 
    222. -
    223.        * @return    boolean 
    224. -
    225.        * @access    public
    226. -
    227.        */
    228. -
    229.     function addLabelProperty($resLiteral)
    230. -
    231.     {
    232. -
    233.         return $this->addProperty($this->vocabulary->LABEL(),$resLiteral);
    234. -
    235.     }
    236. -
    237.     
    238. -
    239.     /**
    240. -
    241.     * Answer the label ResLiteral for this object.
    242. -
    243.     * If there is more than one such resource, an arbitrary selection is made.
    244. -
    245.     *
    246. -
    247.        * @param    string    $uri 
    248. -
    249.        * @return    object ResResource 
    250. -
    251.        * @access    public
    252. -
    253.        */
    254. -
    255.     function getLabelProperty()
    256. -
    257.     {
    258. -
    259.         return $this->getPropertyValue($this->vocabulary->LABEL());
    260. -
    261.     }
    262. -
    263.     
    264. -
    265.     /**
    266. -
    267.     * Add the given class as one of the rdf:type's for this resource.
    268. -
    269.     *
    270. -
    271.        * @param    object ResResource    $resResource 
    272. -
    273.        * @return    boolean 
    274. -
    275.        * @access    public
    276. -
    277.        */
    278. -
    279.     function addRDFType($resResource)
    280. -
    281.     {
    282. -
    283.         return $this->addProperty($this->vocabulary->TYPE(),$resResource);
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Answer the rdf:type (ie the class) of this resource.
    292. -
    293.     * If there is more than one type for this resource, the return value will
    294. -
    295.     * be one of the values, but it is not specified which one
    296. -
    297.     * (nor that it will consistently be the same one each time).
    298. -
    299.     *
    300. -
    301.        * @return    object ResResource 
    302. -
    303.        * @access    public
    304. -
    305.        */
    306. -
    307.     function getRDFType()
    308. -
    309.     {
    310. -
    311.         return $this->getPropertyValue($this->vocabulary->TYPE());
    312. -
    313.     }
    314. -
    315.     
    316. -
    317.     /**
    318. -
    319.     * Add a resource that is declared to provided additional
    320. -
    321.     * information about the definition of this resource.
    322. -
    323.     *
    324. -
    325.        * @param    object ResResource    $resResource 
    326. -
    327.        * @return    boolean 
    328. -
    329.        * @access    public
    330. -
    331.        */
    332. -
    333.     function addSeeAlso($resResource)
    334. -
    335.     {
    336. -
    337.         return $this->addProperty($this->vocabulary->SEE_ALSO(),$resResource);
    338. -
    339.     }
    340. -
    341.     
    342. -
    343.     /**
    344. -
    345.     * Answer a resource that provides additional information about this resource.
    346. -
    347.     * If more than one such resource is defined, make an arbitrary choice.
    348. -
    349.     *
    350. -
    351.        * @return    object ResResource 
    352. -
    353.        * @access    public
    354. -
    355.        */
    356. -
    357.     function getSeeAlso()
    358. -
    359.     {
    360. -
    361.         return $this->getPropertyValue($this->vocabulary->SEE_ALSO());
    362. -
    363.     }
    364. -
    365.     
    366. -
    367.     /**
    368. -
    369.     * Answer a view of this resource as a class
    370. -
    371.     *
    372. -
    373.        * @return    object OntClass 
    374. -
    375.        * @access    public
    376. -
    377.        */
    378. -
    379.     function asClass()
    380. -
    381.     {
    382. -
    383.         return  $this->model->createOntClass($this->uri);
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Answer a view of this resource as an Individual
    392. -
    393.     *
    394. -
    395.        * @return    object Individual 
    396. -
    397.        * @access    public
    398. -
    399.        */
    400. -
    401.     function asIndividual()
    402. -
    403.     {
    404. -
    405.         return  $this->model->createIndividual($this->uri);
    406. -
    407.     }
    408. -
    409.     
    410. -
    411.     /**
    412. -
    413.     * Answer a view of this resource as a property
    414. -
    415.     *
    416. -
    417.        * @return    object OntProperty 
    418. -
    419.        * @access    public
    420. -
    421.        */
    422. -
    423.     function asOntProperty()
    424. -
    425.     {
    426. -
    427.         return  $this->model->createOntProperty($this->uri);
    428. -
    429.     }
    430. -
    431.     
    432. -
    433.     /**
    434. -
    435.     * Answer a reference to the ontology language profile that governs the
    436. -
    437.     * ontology model to which this ontology resource is attached.
    438. -
    439.     *
    440. -
    441.        * @param    string    $uri 
    442. -
    443.        * @return    object OntClass 
    444. -
    445.        * @access    public
    446. -
    447.        */
    448. -
    449.     function getVocabulary()
    450. -
    451.     {
    452. -
    453.         return $this->vocabulary ;
    454. -
    455.     }
    456. -
    457.     
    458. -
    459.     /**
    460. -
    461.     * Answer the value of a given RDF property for this resource as $returnType, or null
    462. -
    463.     * if it doesn't have one. If there is more than one RDF statement with
    464. -
    465.     * the given property for the current value, it is not defined which of
    466. -
    467.     * the values will be returned.
    468. -
    469.     * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
    470. -
    471.     * Default is 'ResResource'
    472. -
    473.     *
    474. -
    475.        * @param    object ResResource    $property 
    476. -
    477.        * @param    string    $returnType 
    478. -
    479.        * @return    object OntClass 
    480. -
    481.        * @access    public
    482. -
    483.        */
    484. -
    485.     function getPropertyValue($property$returnType 'ResResource')
    486. -
    487.     {
    488. -
    489.         $statement=$this->getProperty($property);
    490. -
    491.         if ($statement===null)
    492. -
    493.             return null;
    494. -
    495.             
    496. -
    497.             switch ($returnType
    498. -
    499.             {
    500. -
    501.                 case 'OntClass':
    502. -
    503.                     return $this->model->createOntClass($statement->getLabelObject());        
    504. -
    505.                     break;
    506. -
    507.                     
    508. -
    509.                 case 'OntProperty':
    510. -
    511.                     return $this->model->createOntProperty($statement->getLabelObject());        
    512. -
    513.                     break;
    514. -
    515.                 
    516. -
    517.                 case 'Individual':
    518. -
    519.                     return $this->model->createIndividual($statement->getLabelObject());        
    520. -
    521.                     break;
    522. -
    523.             
    524. -
    525.                 default:
    526. -
    527.                     return $statement->getObject();
    528. -
    529.                     break;    
    530. -
    531.             }    
    532. -
    533.     }
    534. -
    535.     
    536. -
    537.     /**
    538. -
    539.     * Answer true if this resource has the given comment.
    540. -
    541.     *
    542. -
    543.        * @param    object ResLiteral    $resLiteral 
    544. -
    545.        * @return    boolean 
    546. -
    547.        * @access    public
    548. -
    549.        */
    550. -
    551.     function hasComment($resLiteral)
    552. -
    553.     {
    554. -
    555.         return $this->hasProperty($this->vocabulary->COMMENT(),$resLiteral);
    556. -
    557.     }
    558. -
    559.     
    560. -
    561.     /**
    562. -
    563.     * Answer true if this resource has the given label.
    564. -
    565.     *
    566. -
    567.        * @param    object ResLiteral    $resLiteral 
    568. -
    569.        * @return    boolean 
    570. -
    571.        * @access    public
    572. -
    573.        */
    574. -
    575.     function hasLabelProperty($resLiteral)
    576. -
    577.     {
    578. -
    579.         return $this->hasProperty($this->vocabulary->LABEL(),$resLiteral);
    580. -
    581.     }
    582. -
    583.     
    584. -
    585.     /**
    586. -
    587.     * Answer true if this resource has the given rdf:type.
    588. -
    589.     *
    590. -
    591.        * @param    object ResResource    $ontClass 
    592. -
    593.        * @return    boolean 
    594. -
    595.        * @access    public
    596. -
    597.        */
    598. -
    599.     function hasRDFType($ontClass)
    600. -
    601.     {
    602. -
    603.         return $this->hasProperty($this->vocabulary->TYPE(),$ontClass);
    604. -
    605.     }
    606. -
    607.     
    608. -
    609.     /**
    610. -
    611.     * Answer true if this resource has the given resource as a source
    612. -
    613.     * of additional information.
    614. -
    615.     *
    616. -
    617.        * @param    object ResResource    $resResource 
    618. -
    619.        * @return    boolean 
    620. -
    621.        * @access    public
    622. -
    623.        */
    624. -
    625.     function hasSeeAlso($resResource)
    626. -
    627.     {
    628. -
    629.         return $this->hasProperty($this->vocabulary->SEE_ALSO(),$resResource);
    630. -
    631.     }
    632. -
    633.     
    634. -
    635.     /**
    636. -
    637.     * Answer true if this resource is defined by the given resource.
    638. -
    639.     *
    640. -
    641.        * @param    object ResResource    $resResource 
    642. -
    643.        * @return    boolean 
    644. -
    645.        * @access    public
    646. -
    647.        */
    648. -
    649.     function isDefinedBy($resResource)
    650. -
    651.     {
    652. -
    653.         return $this->hasProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    654. -
    655.     }
    656. -
    657.     
    658. -
    659.     /**
    660. -
    661.     * Answer an array of all of the comment literals for this resource.
    662. -
    663.     *
    664. -
    665.        * @param    string    $language 
    666. -
    667.        * @return    array 
    668. -
    669.        * @access    public
    670. -
    671.        */
    672. -
    673.     function listComments($language)
    674. -
    675.     {
    676. -
    677.         $return=$this->listProperty($this->vocabulary->COMMENT());
    678. -
    679.         if ($language === false)
    680. -
    681.             return $return;
    682. -
    683.                     
    684. -
    685.         foreach ($return as $key => $resLiteral
    686. -
    687.         {
    688. -
    689.             if (!is_a($resLiteral,'ResLiteral'|| $resLiteral->getLanguage(!= $language)
    690. -
    691.                 unset ($return[$key]);    
    692. -
    693.         }
    694. -
    695.         return $return;    
    696. -
    697.     }
    698. -
    699.     
    700. -
    701.     /**
    702. -
    703.     * Answer an array of all of the resources that are declared to define this resource.
    704. -
    705.     *
    706. -
    707.        * @return    array 
    708. -
    709.        * @access    public
    710. -
    711.        */
    712. -
    713.     function listIsDefinedBy()
    714. -
    715.     {
    716. -
    717.         return $this->listProperty($this->vocabulary->IS_DEFINED_BY());
    718. -
    719.     }
    720. -
    721.     
    722. -
    723.     /**
    724. -
    725.     * Answer an array of all of the label literals for this resource, with the given
    726. -
    727.     * language, if $language is set.
    728. -
    729.     *
    730. -
    731.        * @return    array 
    732. -
    733.        * @access    public
    734. -
    735.        */
    736. -
    737.     function listLabelProperties($language false)
    738. -
    739.     {
    740. -
    741.         $return=$this->listProperty($this->vocabulary->LABEL());
    742. -
    743.         if ($language === false)
    744. -
    745.             return $return;
    746. -
    747.                     
    748. -
    749.         foreach ($return as $key => $resLiteral
    750. -
    751.         {
    752. -
    753.             if (!is_a($resLiteral,'ResLiteral'|| $resLiteral->getLanguage(!= $language)
    754. -
    755.                 unset ($return[$key]);    
    756. -
    757.         }
    758. -
    759.         return $return;    
    760. -
    761.     
    762. -
    763.     }
    764. -
    765.     
    766. -
    767.     /**
    768. -
    769.     * Answer an array of the RDF classes to which this resource belongs.
    770. -
    771.     * If $direct is true, only answer those resources that are direct types of
    772. -
    773.     * this resource, not the super-classes of the class etc.
    774. -
    775.     * 
    776. -
    777.        * @param    boolean    $direct 
    778. -
    779.        * @return    array Array of ResResources
    780. -
    781.        * @access    public
    782. -
    783.        */
    784. -
    785.     function listRDFTypes($direct true)
    786. -
    787.     {
    788. -
    789.         return $this->listProperty($this->vocabulary->TYPE());        
    790. -
    791.     }
    792. -
    793.     
    794. -
    795.     /**
    796. -
    797.     * Answer an array of all of the resources that are declared to
    798. -
    799.     * provide addition information about this resource.
    800. -
    801.     *    
    802. -
    803.        * @return    array Array of ResResources
    804. -
    805.        * @access    public
    806. -
    807.        */
    808. -
    809.     function listSeeAlso()
    810. -
    811.     {
    812. -
    813.         return $this->listProperty($this->vocabulary->SEE_ALSO());    
    814. -
    815.     }
    816. -
    817.     
    818. -
    819.     /**
    820. -
    821.     * Answer an array of values of a given RDF property for this resource as $returnType, or null
    822. -
    823.     * if it doesn't have one.
    824. -
    825.     * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
    826. -
    827.     * Default is 'ResResource'
    828. -
    829.     *
    830. -
    831.        * @param    object ResResource    $property 
    832. -
    833.        * @param    string    $returnType 
    834. -
    835.        * @return    array of ResResources
    836. -
    837.        * @access    public
    838. -
    839.        */
    840. -
    841.     function listProperty($property$returnType 'OntResource')
    842. -
    843.     {
    844. -
    845.         $return=array();
    846. -
    847.         $resArray $this->listProperties($property);
    848. -
    849.         foreach ($resArray as $statement
    850. -
    851.         {
    852. -
    853.             switch ($returnType
    854. -
    855.             {
    856. -
    857.                 case 'OntClass':
    858. -
    859.                     $return[]=$this->model->createOntClass($statement->getLabelObject());        
    860. -
    861.                     break;
    862. -
    863.                     
    864. -
    865.                 case 'OntProperty':
    866. -
    867.                     $return[]=$this->model->createOntProperty($statement->getLabelObject());        
    868. -
    869.                     break;
    870. -
    871.                 
    872. -
    873.                 case 'Individual':
    874. -
    875.                     $return[]=$this->model->createIndividual($statement->getLabelObject());        
    876. -
    877.                     break;
    878. -
    879.             
    880. -
    881.                 default:
    882. -
    883.                     $return[]=$statement->getObject();
    884. -
    885.                     break;
    886. -
    887.             }    
    888. -
    889.         }
    890. -
    891.         return $return;    
    892. -
    893.     }
    894. -
    895.     
    896. -
    897.     /**
    898. -
    899.     * Remove the statement that the given ResLiteral is a comment on this resource.
    900. -
    901.     * Returns true, if a statement was removed
    902. -
    903.     *
    904. -
    905.        * @param    object ResLiteral $resLiteral 
    906. -
    907.        * @return    boolean 
    908. -
    909.        * @access    public
    910. -
    911.        */
    912. -
    913.     function removeComment($resLiteral)
    914. -
    915.     {
    916. -
    917.         return $this->removeProperty($this->vocabulary->COMMENT(),$resLiteral);
    918. -
    919.     }
    920. -
    921.     
    922. -
    923.     /**
    924. -
    925.     * Remove the statement that this resource is defined by the given resource.
    926. -
    927.     *
    928. -
    929.        * @param    object ResResource $resResource 
    930. -
    931.        * @return    boolean 
    932. -
    933.        * @access    public
    934. -
    935.        */
    936. -
    937.     function removeDefinedBy($resResource)
    938. -
    939.     {
    940. -
    941.         return $this->removeProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    942. -
    943.     }
    944. -
    945.     
    946. -
    947.     /**
    948. -
    949.     * Remove the statement that the given ResLiteral is a label on this resource.
    950. -
    951.     * Returns true, if a statement was removed
    952. -
    953.     *
    954. -
    955.        * @param    object ResLiteral $resLiteral 
    956. -
    957.        * @return    boolean 
    958. -
    959.        * @access    public
    960. -
    961.        */
    962. -
    963.     function removeLabelProperty($resLiteral)
    964. -
    965.     {
    966. -
    967.         return $this->removeProperty($this->vocabulary->LABEL(),$resLiteral);
    968. -
    969.     }
    970. -
    971.     
    972. -
    973.     /**
    974. -
    975.     * Remove the specific property-value pair from this resource.
    976. -
    977.     *
    978. -
    979.        * @param    object ResResource    $property 
    980. -
    981.        * @param    object ResResource    $value 
    982. -
    983.        * @return    boolean 
    984. -
    985.        * @access    public
    986. -
    987.        */
    988. -
    989.     function removeProperty($property$value)
    990. -
    991.     {
    992. -
    993.         return $this->model->remove(new Statement($this,$property,$value));
    994. -
    995.     }
    996. -
    997.     
    998. -
    999.     /**
    1000. -
    1001.     * Remove the statement that this resource is of the given RDF type.
    1002. -
    1003.     *
    1004. -
    1005.        * @param    object ResResource $resResource 
    1006. -
    1007.        * @return    boolean 
    1008. -
    1009.        * @access    public
    1010. -
    1011.        */
    1012. -
    1013.     function removeRDFType($resResource)
    1014. -
    1015.     {
    1016. -
    1017.         return $this->removeProperty($this->vocabulary->TYPE(),$resResource);
    1018. -
    1019.     }
    1020. -
    1021.     
    1022. -
    1023.     /**
    1024. -
    1025.     * Remove the statement indicating the given resource as a source of
    1026. -
    1027.     * additional information about this resource.
    1028. -
    1029.     *
    1030. -
    1031.        * @param    object ResResource $resResource 
    1032. -
    1033.        * @return    boolean 
    1034. -
    1035.        * @access    public
    1036. -
    1037.        */
    1038. -
    1039.     function removeSeeAlso($resResource)
    1040. -
    1041.     {
    1042. -
    1043.         return $this->removeProperty($this->vocabulary->SEE_ALSO(),$resResource);
    1044. -
    1045.     }
    1046. -
    1047.     
    1048. -
    1049.     /**
    1050. -
    1051.     * Assert that the given string is the comment on this resource.
    1052. -
    1053.     * Any existing statements for comment will be removed.
    1054. -
    1055.     *
    1056. -
    1057.        * @param    object ResLiteral    $resLiteral 
    1058. -
    1059.        * @access    public
    1060. -
    1061.        */
    1062. -
    1063.     function setComment($resLiteral)
    1064. -
    1065.     {
    1066. -
    1067.         $this->setPropertyValue($this->vocabulary->COMMENT(),$resLiteral);
    1068. -
    1069.     }
    1070. -
    1071.     
    1072. -
    1073.     /**
    1074. -
    1075.     * Assert that the given resource provides a source of definitions about this resource.
    1076. -
    1077.     * Any existing statements for isDefinedBy will be removed.
    1078. -
    1079.     *
    1080. -
    1081.        * @param    object ResResource    $resResource 
    1082. -
    1083.        * @access    public
    1084. -
    1085.        */
    1086. -
    1087.     function setIsDefinedBy($resResource)
    1088. -
    1089.     {
    1090. -
    1091.         $this->setPropertyValue($this->vocabulary->IS_DEFINED_BY(),$resResource);
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     /**
    1098. -
    1099.     * Assert that the given string is the label on this resource.
    1100. -
    1101.     * Any existing statements for comment will be removed.
    1102. -
    1103.     *
    1104. -
    1105.        * @param    object ResLiteral    $resLiteral 
    1106. -
    1107.        * @access    public
    1108. -
    1109.        */
    1110. -
    1111.     function setLabelProperty($resLiteral)
    1112. -
    1113.     {
    1114. -
    1115.         $this->setPropertyValue($this->vocabulary->LABEL(),$resLiteral);
    1116. -
    1117.     }
    1118. -
    1119.     
    1120. -
    1121.     /**
    1122. -
    1123.     * Set the value of the given property of this ontology resource to the given value.
    1124. -
    1125.     * Maintains the invariant that there is at most one value of the property for a
    1126. -
    1127.     * given resource, so existing property values are first removed.
    1128. -
    1129.     * To add multiple properties, use addProperty.
    1130. -
    1131.     *
    1132. -
    1133.        * @param    object ResResource    $property 
    1134. -
    1135.        * @param    object ResResource    $value 
    1136. -
    1137.        * @access    public
    1138. -
    1139.        */
    1140. -
    1141.     function setPropertyValue($property$value)
    1142. -
    1143.     {
    1144. -
    1145.         $this->removeAll($property);
    1146. -
    1147.         $this->addProperty($property,$value);
    1148. -
    1149.     }
    1150. -
    1151.     
    1152. -
    1153.     /**
    1154. -
    1155.     * Set the RDF type (ie the class) for this resource,
    1156. -
    1157.     * replacing any existing rdf:type property. Any existing statements
    1158. -
    1159.     * for the RDF type will first be removed.
    1160. -
    1161.     *
    1162. -
    1163.        * @param    object ResResource    $resResource 
    1164. -
    1165.        * @access    public
    1166. -
    1167.        */
    1168. -
    1169.     function setRDFType($resResource)
    1170. -
    1171.     {
    1172. -
    1173.         $this->setPropertyValue($this->vocabulary->TYPE(),$resResource);
    1174. -
    1175.     }
    1176. -
    1177.     
    1178. -
    1179.     /**
    1180. -
    1181.     * Add a resource that is declared to provided additional information
    1182. -
    1183.     * about the definition of this resource
    1184. -
    1185.     *
    1186. -
    1187.        * @param    object ResResource    $resResource 
    1188. -
    1189.        * @access    public
    1190. -
    1191.        */
    1192. -
    1193.     function setSeeAlso($resResource)
    1194. -
    1195.     {
    1196. -
    1197.         $this->setPropertyValue($this->vocabulary->SEE_ALSO(),$resResource);
    1198. -
    1199.     }
    1200. -
    1201.     
    1202. -
    1203.     /**
    1204. -
    1205.     * Returns an array of ResResources that are recursively connected by $attribute
    1206. -
    1207.     * in superProperty direction.
    1208. -
    1209.     * If $onlyFindThisResResource is set to a ResResource, this function returns boolean
    1210. -
    1211.     * if this distinct resource recursively is connected to the $startResource.
    1212. -
    1213.     *
    1214. -
    1215.        * @param    object ResResource    $startResource 
    1216. -
    1217.        * @param    object ResResource    $attribute 
    1218. -
    1219.     * @param    array                $attribute 
    1220. -
    1221.     * @param    object ResResource    $onlyFindThisResResource 
    1222. -
    1223.        * @return    array OR boolean
    1224. -
    1225.        * @access    private
    1226. -
    1227.        */
    1228. -
    1229.     function _getSuperAttributeStatementsRec($startResource,$attribute,$attributeIndex$onlyFindThisResResource false)
    1230. -
    1231.     {
    1232. -
    1233.  
    1234. -
    1235.         $return $startResource->listProperties($attribute);
    1236. -
    1237.         
    1238. -
    1239.         if ($onlyFindThisResResource)
    1240. -
    1241.         {
    1242. -
    1243.             foreach ($return as $statement)
    1244. -
    1245.             {
    1246. -
    1247.                 if ($onlyFindThisResResource->equals($statement->getObject()))
    1248. -
    1249.                     return true;
    1250. -
    1251.             }    
    1252. -
    1253.         }
    1254. -
    1255.         
    1256. -
    1257.         foreach ($return as $statement)
    1258. -
    1259.         {
    1260. -
    1261.             $attributeLabel=$statement->getLabelObject();
    1262. -
    1263.             if (!in_array($attributeLabel,$attributeIndex))
    1264. -
    1265.             {
    1266. -
    1267.                 $attributeIndex[]=$attributeLabel;
    1268. -
    1269.                 $subReturn $this->_getSuperAttributeStatementsRec($statement->getObject()$attribute$attributeIndex$onlyFindThisResResource);
    1270. -
    1271.             
    1272. -
    1273.         }
    1274. -
    1275.         if (isset($subReturn))
    1276. -
    1277.         {
    1278. -
    1279.             if ($subReturn === true)
    1280. -
    1281.                 return true;
    1282. -
    1283.             return array_merge($return,$subReturn);
    1284. -
    1285.         }    
    1286. -
    1287.         
    1288. -
    1289.         return $return;
    1290. -
    1291.     }
    1292. -
    1293.     
    1294. -
    1295.     /**
    1296. -
    1297.     * Returns an array of ResResources that are recursively connected by $attribute
    1298. -
    1299.     * in subProperty direction.
    1300. -
    1301.     * If $onlyFindThisResResource is set to a ResResource, this function returns boolean
    1302. -
    1303.     * if this distinct resource recursively is connected to the $startResource.
    1304. -
    1305.     *
    1306. -
    1307.        * @param    object ResResource    $startResource 
    1308. -
    1309.        * @param    object ResResource    $attribute 
    1310. -
    1311.     * @param    array                $attribute 
    1312. -
    1313.     * @param    object ResResource    $onlyFindThisResResource 
    1314. -
    1315.        * @return    array OR boolean
    1316. -
    1317.        * @access    private
    1318. -
    1319.        */
    1320. -
    1321.     function _getSubAttributeStatementsRec($startResource,$attribute,$attributeIndex$onlyFindThisResResource false)
    1322. -
    1323.     {
    1324. -
    1325.  
    1326. -
    1327.         $return $this->model->find(null,$attribute,$startResource);
    1328. -
    1329.         
    1330. -
    1331.         if ($onlyFindThisResResource)
    1332. -
    1333.         {
    1334. -
    1335.             foreach ($return as $statement)
    1336. -
    1337.             {
    1338. -
    1339.                 if ($onlyFindThisResResource->equals($statement->getSubject()))
    1340. -
    1341.                     return true;
    1342. -
    1343.             }    
    1344. -
    1345.         }
    1346. -
    1347.         
    1348. -
    1349.         foreach ($return as $statement)
    1350. -
    1351.         {
    1352. -
    1353.             $attributeLabel=$statement->getLabelSubject();
    1354. -
    1355.             if (!in_array($attributeLabel,$attributeIndex))
    1356. -
    1357.             {
    1358. -
    1359.                 $attributeIndex[]=$attributeLabel;
    1360. -
    1361.                 $subReturn $this->_getSubAttributeStatementsRec($statement->getSubject()$attribute$attributeIndex$onlyFindThisResResource);
    1362. -
    1363.             
    1364. -
    1365.         }
    1366. -
    1367.         if (isset($subReturn))
    1368. -
    1369.         {
    1370. -
    1371.             if ($subReturn === true)
    1372. -
    1373.                 return true;
    1374. -
    1375.             return array_merge($return,$subReturn);
    1376. -
    1377.         }
    1378. -
    1379.             
    1380. -
    1381.         return $return;
    1382. -
    1383.     }
    1384. -
    1385.     
    1386. -
    1387.     /**
    1388. -
    1389.     * Add a property to this resource.
    1390. -
    1391.     * A statement with this resource as the subject, p as the predicate and o
    1392. -
    1393.     * as the object is added to the model associated with this resource.
    1394. -
    1395.     * If $this->rdfType is set, an additional statement about it's type
    1396. -
    1397.     * is added.
    1398. -
    1399.     *
    1400. -
    1401.        * @param    ResResource                $property 
    1402. -
    1403.        * @param    ResResource/ResLiteral    $object 
    1404. -
    1405.        * @return    object ResResource 
    1406. -
    1407.        * @access    public
    1408. -
    1409.        */
    1410. -
    1411.     function addProperty($property,$object)
    1412. -
    1413.     {
    1414. -
    1415.         if ($this->rdfType !== false)
    1416. -
    1417.             if (!$this->hasRDFType($this->rdfType))
    1418. -
    1419.                     $this->model->add(new Statement($this,$this->vocabulary->TYPE(),$this->rdfType));
    1420. -
    1421.     
    1422. -
    1423.         return parent:: addProperty($property,$object);
    1424. -
    1425.     }
    1426. -
    1427.     
    1428. -
    1429.     /**
    1430. -
    1431.     * Sets the rdf:type, that this distinct resource is instance of.
    1432. -
    1433.     * If this value is set, the ontModel will add an additional
    1434. -
    1435.     * statement about this resource and the fiven rdf:type
    1436. -
    1437.     *
    1438. -
    1439.     * @param object ResResource $resResource 
    1440. -
    1441.     * @access    public
    1442. -
    1443.     */
    1444. -
    1445.     function setInstanceRdfType($resResource)
    1446. -
    1447.     {
    1448. -
    1449.         $this->rdfType $resResource;
    1450. -
    1451.     }
    1452. -
    1453.     
    1454. -
    1455.     /**
    1456. -
    1457.     * returns the rdf:type, that this distinct resource is instance of.
    1458. -
    1459.     *
    1460. -
    1461.     * @return object ResResource $resResource
    1462. -
    1463.     * @access    public
    1464. -
    1465.     */
    1466. -
    1467.     function getInstanceRdfType()
    1468. -
    1469.     {
    1470. -
    1471.         return $this->rdfType;
    1472. -
    1473.     }
    1474. -
    1475. -
    1476. ?>
    1477. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:14 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base deleted file mode 100755 index fb4d7d99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelOntVocabulary.php.html.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for OntVocabulary.php - - - - - -

    Source for file OntVocabulary.php

    -

    Documentation is available at OntVocabulary.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntVocabulary
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Base Class that encapsulates the elements of a general vocabulary
    16. -
    17. * corresponding to a particular ontology language. The intent is that,
    18. -
    19. * using a given vocabulary, a given RDF model can be processed as an
    20. -
    21. * ontology description, without binding knowledge of the vocabulary
    22. -
    23. * into this Class
    24. -
    25. *
    26. -
    27. @version  $Id$
    28. -
    29. @author Daniel Westphal <mail at d-westphal dot de>
    30. -
    31. *
    32. -
    33. *
    34. -
    35. @package     ontModel
    36. -
    37. @access    public
    38. -
    39. ***/
    40. -
    41. -
    42. {
    43. -
    44.     
    45. -
    46. }
    47. -
    48. ?>
    49. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base deleted file mode 100755 index 0e19fee4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_ontModel__ontModelRdfsVocabulary.php.html.svn-base +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - File Source for RdfsVocabulary.php - - - - - -

    Source for file RdfsVocabulary.php

    -

    Documentation is available at RdfsVocabulary.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdfsVocabulary
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * RDFS vocabulary items
    16. -
    17. *
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class RdfsVocabulary extends OntVocabulary 
    36. -
    37. {
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Answer the resource that represents the class 'class' in this vocabulary.
    44. -
    45.     *
    46. -
    47.        * @return    object ResResource 
    48. -
    49.        * @access    public
    50. -
    51.        */
    52. -
    53.     function ONTCLASS()
    54. -
    55.     {
    56. -
    57.         return new ResResource(RDF_SCHEMA_URI.RDFS_CLASS);    
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     * Answer the predicate that denotes the domain of a property.
    66. -
    67.     *
    68. -
    69.        * @return    object ResProperty 
    70. -
    71.        * @access    public
    72. -
    73.        */
    74. -
    75.     function DOMAIN()
    76. -
    77.     {
    78. -
    79.         return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);    
    80. -
    81.     }
    82. -
    83.     
    84. -
    85.      
    86. -
    87.      /**
    88. -
    89.     * Answer the predicate that denotes comment annotation on an ontology element.
    90. -
    91.     *
    92. -
    93.        * @return    object ResProperty 
    94. -
    95.        * @access    public
    96. -
    97.        */
    98. -
    99.     function COMMENT()
    100. -
    101.     {
    102. -
    103.         return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);    
    104. -
    105.     }
    106. -
    107.     
    108. -
    109.      /**
    110. -
    111.     * Answer the predicate that denotes isDefinedBy annotation on an ontology element
    112. -
    113.     *
    114. -
    115.        * @return    object ResProperty 
    116. -
    117.        * @access    public
    118. -
    119.        */
    120. -
    121.     function IS_DEFINED_BY()
    122. -
    123.     {
    124. -
    125.         return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
    126. -
    127.     }
    128. -
    129.     
    130. -
    131.     /**
    132. -
    133.     * Answer the predicate that denotes label annotation on an ontology element
    134. -
    135.     *
    136. -
    137.        * @return    object ResProperty 
    138. -
    139.        * @access    public
    140. -
    141.        */
    142. -
    143.     function LABEL()
    144. -
    145.     {
    146. -
    147.         return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
    148. -
    149.     }
    150. -
    151.     
    152. -
    153.     /**
    154. -
    155.     * Answer the predicate that denotes the domain of a property.
    156. -
    157.     *
    158. -
    159.        * @return    object ResProperty 
    160. -
    161.        * @access    public
    162. -
    163.        */
    164. -
    165.     function RANGE()
    166. -
    167.     {
    168. -
    169.         return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
    170. -
    171.     }
    172. -
    173.     
    174. -
    175.     /**
    176. -
    177.     * Answer the predicate that denotes seeAlso annotation on an ontology element
    178. -
    179.     *
    180. -
    181.        * @return    object ResProperty 
    182. -
    183.        * @access    public
    184. -
    185.        */
    186. -
    187.     function SEE_ALSO()
    188. -
    189.     {
    190. -
    191.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
    192. -
    193.     }
    194. -
    195.     
    196. -
    197.     /**
    198. -
    199.     * Answer the predicate that denotes that one class is a sub-class of another.
    200. -
    201.     *
    202. -
    203.        * @return    object ResProperty 
    204. -
    205.        * @access    public
    206. -
    207.        */
    208. -
    209.     function SUB_CLASS_OF()
    210. -
    211.     {
    212. -
    213.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
    214. -
    215.     }
    216. -
    217.     
    218. -
    219.     /**
    220. -
    221.     * Answer the predicate that denotes that one property is a sub-property of another.
    222. -
    223.     *
    224. -
    225.        * @return    object ResProperty 
    226. -
    227.        * @access    public
    228. -
    229.        */
    230. -
    231.     function SUB_PROPERTY_OF()
    232. -
    233.     {
    234. -
    235.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Answer the string that is the namespace prefix for this vocabulary
    244. -
    245.     *
    246. -
    247.        * @return    string 
    248. -
    249.        * @access    public
    250. -
    251.        */
    252. -
    253.     function NAMESPACE()
    254. -
    255.     {
    256. -
    257.         return RDF_SCHEMA_URI;
    258. -
    259.     }
    260. -
    261.     
    262. -
    263.     /**
    264. -
    265.     * Answer the predicate that denotes the rdf:type property.
    266. -
    267.     *
    268. -
    269.        * @return    object ResProperty 
    270. -
    271.        * @access    public
    272. -
    273.        */
    274. -
    275.     function TYPE()
    276. -
    277.     {
    278. -
    279.         return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
    280. -
    281.     }
    282. -
    283. -
    284. ?>
    285. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base deleted file mode 100755 index 51d7d162..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlDbEngine.php.html.svn-base +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - File Source for RdqlDbEngine.php - - - - - -

    Source for file RdqlDbEngine.php

    -

    Documentation is available at RdqlDbEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlDbEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class performs as RDQL query on a DbModel.
    16. -
    17.  *
    18. -
    19.  * Provided an rdql query parsed into an array of php variables and constraints
    20. -
    21.  * at first the engine generates an sql statement and queries the database for
    22. -
    23.  * tuples matching all patterns from the WHERE clause of the given RDQL query.
    24. -
    25.  * Subsequently the result set is is filtered with evaluated boolean expressions
    26. -
    27.  * from the AND clause of the given RDQL query.
    28. -
    29.  *
    30. -
    31.  * @version  $Id$
    32. -
    33.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    34. -
    35.  *
    36. -
    37.  * @package rdql
    38. -
    39.  * @access public
    40. -
    41.  */
    42. -
    43.  
    44. -
    45. Class RdqlDbEngine extends RdqlEngine {
    46. -
    47.  
    48. -
    49.  
    50. -
    51. /**
    52. -
    53.  * Parsed query variables and constraints.
    54. -
    55.  *
    56. -
    57.  * @var     array   ['selectVars'][] = ?VARNAME
    58. -
    59.  *                   ['sources'][] = URI
    60. -
    61.  *                   ['patterns'][]['subject']['value'] = VARorURI
    62. -
    63.  *                                 ['predicate']['value'] = VARorURI
    64. -
    65.  *                                 ['object']['value'] = VARorURIorLiterl
    66. -
    67.  *                                           ['is_literal'] = boolean
    68. -
    69.  *                                           ['l_lang'] = string
    70. -
    71.  *                                           ['l_dtype'] = string
    72. -
    73.  *                   ['filters'][]['string'] = string
    74. -
    75.  *                                ['evalFilterStr'] = string
    76. -
    77.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    78. -
    79.  *                                                  ['operator'] = (eq | ne)
    80. -
    81.  *                                                  ['regex'] = string
    82. -
    83.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    84. -
    85.  *                                                ['operator'] = (eq | ne)
    86. -
    87.  *                                                ['value'] = string
    88. -
    89.  *                                                ['value_type'] = ('variable' | 'URI' | 'Literal')
    90. -
    91.  *                                                ['value_lang'] = string
    92. -
    93.  *                                                ['value_dtype'] = string
    94. -
    95.  *                                ['numExpr']['vars'][] = ?VARNAME
    96. -
    97.  *                          ( [] stands for an integer index - 0..N )
    98. -
    99.  * @access    private
    100. -
    101.  */
    102. -
    103.  var $parsedQuery;
    104. -
    105.  
    106. -
    107.  
    108. -
    109. /**
    110. -
    111.  * When an RDQL query is performed on a DbModel, in first step the engine searches
    112. -
    113.  * in database for triples matching the Rdql-WHERE clause. A recordSet is returned.
    114. -
    115.  * $rsIndexes maps select and filter variables to their corresponding indexes
    116. -
    117.  * in the returned recordSet.
    118. -
    119.  *
    120. -
    121.  * @var     array [?VARNAME]['value'] = integer
    122. -
    123.  *                           ['nType'] = integer
    124. -
    125.  *                           ['l_lang'] = integer
    126. -
    127.  *                           ['l_dtype'] = integer
    128. -
    129.  * @access    private
    130. -
    131.  */
    132. -
    133.  var $rsIndexes;
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  /**
    140. -
    141.  * Perform an RDQL Query on the given DbModel.
    142. -
    143.  *
    144. -
    145.  * @param   object  DbModel $dbModel 
    146. -
    147.  * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
    148. -
    149.  * @param   boolean $returnNodes 
    150. -
    151.  * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    152. -
    153.  *       OR  array   [][?VARNAME] = string
    154. -
    155.  * @access  public
    156. -
    157.  */
    158. -
    159.  function queryModel(&$dbModel&$parsedQuery$returnNodes TRUE{
    160. -
    161.  
    162. -
    163.    $this->parsedQuery &$parsedQuery;
    164. -
    165.  
    166. -
    167.    $sql $this->generateSql($dbModel->modelID);
    168. -
    169.    $recordSet =$dbModel->dbConn->execute($sql);
    170. -
    171.    $queryResult $this->filterQueryResult($recordSet);
    172. -
    173.  
    174. -
    175.    if ($returnNodes)
    176. -
    177.       return $this->toNodes($queryResult);
    178. -
    179.    else
    180. -
    181.       return $this->toString($queryResult);
    182. -
    183.  }
    184. -
    185.  
    186. -
    187.  
    188. -
    189.  /**
    190. -
    191.  * Generate an SQL string to query the database for tuples matching all patterns
    192. -
    193.  * of $parsedQuery.
    194. -
    195.  *
    196. -
    197.  * @param   integer $modelID 
    198. -
    199.  * @return  string 
    200. -
    201.  * @access    private
    202. -
    203.  */
    204. -
    205.  function generateSql($modelID{
    206. -
    207.  
    208. -
    209.    $sql  $this->generateSql_SelectClause();
    210. -
    211.    $sql .= $this->generateSql_FromClause();
    212. -
    213.    $sql .= $this->generateSql_WhereClause($modelID);
    214. -
    215.    return $sql;
    216. -
    217.  }
    218. -
    219.  
    220. -
    221.  
    222. -
    223. /**
    224. -
    225.  * Generate SQL SELECT clause.
    226. -
    227.  *
    228. -
    229.  * @return  string 
    230. -
    231.  * @throws  PHPError
    232. -
    233.  * @access    private
    234. -
    235.  */
    236. -
    237.  function generateSql_SelectClause({
    238. -
    239.  
    240. -
    241.    $sql_select 'SELECT';
    242. -
    243.    $index 0;
    244. -
    245.    $this->rsIndexes array();
    246. -
    247.  
    248. -
    249.    foreach ($this->parsedQuery['selectVars'as $var)
    250. -
    251.      $sql_select .= $this->_generateSql_SelectVar($var$index);
    252. -
    253.  
    254. -
    255.    if (isset($this->parsedQuery['filters'])) {
    256. -
    257.        foreach ($this->parsedQuery['filters'as $n => $filter{
    258. -
    259.  
    260. -
    261.          // variables from numeric expressions
    262. -
    263.          foreach ($filter['numExprVars'as $numVar)
    264. -
    265.            $sql_select .= $this->_generateSql_SelectVar($numVar$index);
    266. -
    267.  
    268. -
    269.          // variables from regex equality expressions
    270. -
    271.          foreach ($filter['regexEqExprs'as $regexEqExpr)
    272. -
    273.            $sql_select .= $this->_generateSql_SelectVar($regexEqExpr['var']$index);
    274. -
    275.  
    276. -
    277.          // variables from string equality expressions
    278. -
    279.          foreach ($filter['strEqExprs'as $strEqVar)
    280. -
    281.              $sql_select .= $this->_generateSql_SelectVar($strEqVar['var']$index);
    282. -
    283.        }
    284. -
    285.    }
    286. -
    287.  
    288. -
    289.    return rtrim($sql_select" , ");
    290. -
    291.  }
    292. -
    293.  
    294. -
    295.  
    296. -
    297. /**
    298. -
    299.  * Generate SQL FROM clause
    300. -
    301.  *
    302. -
    303.  * @return  string 
    304. -
    305.  * @access    private
    306. -
    307.  */
    308. -
    309.  function generateSql_FromClause({
    310. -
    311.  
    312. -
    313.    $sql_from ' FROM';
    314. -
    315.    foreach ($this->parsedQuery['patterns'as $n => $v)
    316. -
    317.      $sql_from .= ' statements s' .($n+1.' , ';
    318. -
    319.  
    320. -
    321.    return rtrim($sql_from' , ');
    322. -
    323.  }
    324. -
    325.  
    326. -
    327.  
    328. -
    329. /**
    330. -
    331.  * Generate an SQL WHERE clause
    332. -
    333.  *
    334. -
    335.  * @param   integer $modelID 
    336. -
    337.  * @return  string 
    338. -
    339.  * @access    private
    340. -
    341.  */
    342. -
    343.  function generateSql_WhereClause($modelID{
    344. -
    345.  
    346. -
    347.    $sql_where ' WHERE';
    348. -
    349.    $count_patterns count($this->parsedQuery['patterns']);
    350. -
    351.    foreach ($this->parsedQuery['patterns'as $n => $pattern{
    352. -
    353.      $sql_where .= ' s' .($n+1.'.modelID=' .$modelID .' AND';
    354. -
    355.      foreach ($pattern as $key => $val_1)
    356. -
    357.        if ($val_1['value'&& $val_1['value']{0}=='?'{
    358. -
    359.          $sql_tmp ' s' .($n+1.'.' .$key .'=';
    360. -
    361.          // find internal bindings
    362. -
    363.          switch ($key{
    364. -
    365.            case 'subject':
    366. -
    367.                     if ($pattern['subject']['value'== $pattern['predicate']['value'])
    368. -
    369.                        $sql_where .= $sql_tmp .'s' .($n+1.'.predicate AND';
    370. -
    371.                     elseif ($pattern['subject']['value'== $pattern['object']['value'])
    372. -
    373.                        $sql_where .= $sql_tmp .'s' .($n+1.'.object AND';
    374. -
    375.                     break;
    376. -
    377.            case 'predicate':
    378. -
    379.                     if ($pattern['predicate']['value'== $pattern['object']['value'])
    380. -
    381.                        $sql_where .= $sql_tmp .'s' .($n+1.'.object AND';
    382. -
    383.          }
    384. -
    385.          // find external bindings
    386. -
    387.          for ($i=$n+1$i<$count_patterns$i++)
    388. -
    389.              foreach ($this->parsedQuery['patterns'][$ias $key2 => $val_2)
    390. -
    391.                if ($val_1['value']==$val_2['value']{
    392. -
    393.                   $sql_where .= $sql_tmp .'s' .($i+1.'.' .$key2 .' AND';
    394. -
    395.                   break 2;
    396. -
    397.                }
    398. -
    399.        }else {
    400. -
    401.           $sql_where .= ' s' .($n+1.'.' .$key ."='" .$val_1['value'."' AND";
    402. -
    403.           if ($key == 'object' && isset($val_1['is_literal'])) {
    404. -
    405.               $sql_where .= ' s' .($n+1.".object_is='l' AND";
    406. -
    407.               $sql_where .= ' s' .($n+1.".l_datatype='" .$val_1['l_dtype'."' AND";
    408. -
    409.               $sql_where .= ' s' .($n+1.".l_language='" .$val_1['l_lang'."' AND";
    410. -
    411.           }
    412. -
    413.        }
    414. -
    415.    }
    416. -
    417.    return rtrim($sql_where' AND');
    418. -
    419.  }
    420. -
    421.  
    422. -
    423.  
    424. -
    425. /**
    426. -
    427.  * Filter tuples containing variables matching all patterns from the WHERE clause
    428. -
    429.  * of an RDQL query. As a result of a database query using ADOdb these tuples
    430. -
    431.  * are returned as an ADORecordSet object, which is then passed to this function.
    432. -
    433.  *
    434. -
    435.  * @param   object ADORecordSet &$recordSet 
    436. -
    437.  * @return  array  [][?VARNAME]['value']   = string
    438. -
    439.  *                              ['nType']   = string
    440. -
    441.  *                              ['l_lang']  = string
    442. -
    443.  *                              ['l_dtype'] = string
    444. -
    445.  * @access    private
    446. -
    447.  */
    448. -
    449.  function filterQueryResult(&$recordSet{
    450. -
    451.    $queryResult=array();
    452. -
    453.  
    454. -
    455.    if (isset($this->parsedQuery['filters'])) {
    456. -
    457.  
    458. -
    459.        while (!$recordSet->EOF{
    460. -
    461.  
    462. -
    463.          foreach ($this->parsedQuery['filters'as $filter{
    464. -
    465.  
    466. -
    467.            $evalFilterStr $filter['evalFilterStr'];
    468. -
    469.  
    470. -
    471.            // evaluate regex equality expressions of each filter
    472. -
    473.            foreach ($filter['regexEqExprs'as $i => $expr{
    474. -
    475.                preg_match($expr['regex']$recordSet->fields[$this->rsIndexes[$expr['var']]['value']]$match);
    476. -
    477.                $op substr($expr['operator']0,1);
    478. -
    479.                if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
    480. -
    481.                   $evalFilterStr str_replace("##RegEx_$i##"'FALSE'$evalFilterStr);
    482. -
    483.                else
    484. -
    485.                   $evalFilterStr str_replace("##RegEx_$i##"'TRUE'$evalFilterStr);
    486. -
    487.            }
    488. -
    489.  
    490. -
    491.            // evaluate string equality expressions
    492. -
    493.            foreach ($filter['strEqExprs'as $i => $expr{
    494. -
    495.  
    496. -
    497.              $exprBoolVal 'FALSE';
    498. -
    499.  
    500. -
    501.              switch ($expr['value_type']{
    502. -
    503.  
    504. -
    505.                case 'variable':
    506. -
    507.                     if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
    508. -
    509.                            $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
    510. -
    511.                          $expr['operator'== 'eq'||
    512. -
    513.                         ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
    514. -
    515.                            $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
    516. -
    517.                          $expr['operator'== 'ne'))
    518. -
    519.  
    520. -
    521.                        $exprBoolVal 'TRUE';
    522. -
    523.                     break;
    524. -
    525.  
    526. -
    527.                case 'URI':
    528. -
    529.  
    530. -
    531.                       if (isset($this->rsIndexes[$expr['var']]['nType']&&
    532. -
    533.                            $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] == 'l'{
    534. -
    535.  
    536. -
    537.                          if ($expr['operator'== 'ne')
    538. -
    539.                             $exprBoolVal 'TRUE';
    540. -
    541.                          break;
    542. -
    543.                       }
    544. -
    545.  
    546. -
    547.                     if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
    548. -
    549.                            $expr['value'&& $expr['operator'== 'eq'||
    550. -
    551.                         ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
    552. -
    553.                            $expr['value'&& $expr['operator'== 'ne'))
    554. -
    555.                        $exprBoolVal 'TRUE';
    556. -
    557.                     break;
    558. -
    559.  
    560. -
    561.                case 'Literal':
    562. -
    563.  
    564. -
    565.                     if (!isset($this->rsIndexes[$expr['var']]['nType']||
    566. -
    567.                            $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] != 'l'{
    568. -
    569.  
    570. -
    571.                        if ($expr['operator'== 'ne')
    572. -
    573.                           $exprBoolVal 'TRUE';
    574. -
    575.                        break;
    576. -
    577.                     }
    578. -
    579.  
    580. -
    581.                     $filterLiteralnew Literal($expr['value'],$expr['value_lang']);
    582. -
    583.                     $filterLiteral->setDatatype($expr['value_dtype']);
    584. -
    585.  
    586. -
    587.                     $resultLiteral=new Literal($recordSet->fields[$this->rsIndexes[$expr['var']]['value']]);
    588. -
    589.                     $resultLiteral->setDatatype($recordSet->fields[$this->rsIndexes[$expr['var']]['l_dtype']]);
    590. -
    591.                     $resultLiteral->setLanguage($recordSet->fields[$this->rsIndexes[$expr['var']]['l_lang']]);
    592. -
    593.  
    594. -
    595.                     $equal=$resultLiteral->equals($filterLiteral);
    596. -
    597.  
    598. -
    599.                     if (($equal && $expr['operator'== 'eq'||
    600. -
    601.                         (!$equal && $expr['operator'== 'ne'))
    602. -
    603.                        $exprBoolVal 'TRUE';
    604. -
    605.                     else
    606. -
    607.                        $exprBoolVal 'FALSE';
    608. -
    609.  
    610. -
    611.              }
    612. -
    613.  
    614. -
    615.              $evalFilterStr str_replace("##strEqExpr_$i##"$exprBoolVal$evalFilterStr);
    616. -
    617.           }
    618. -
    619.  
    620. -
    621.           // evaluate numerical expressions
    622. -
    623.           foreach ($filter['numExprVars'as $varName{
    624. -
    625.             $varValue "'" .$recordSet->fields[$this->rsIndexes[$varName]['value']] ."'";
    626. -
    627.             $evalFilterStr str_replace($varName$varValue$evalFilterStr);
    628. -
    629.           }
    630. -
    631.  
    632. -
    633.           eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
    634. -
    635.           if (!isset($eval_filter_ok))
    636. -
    637.              trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']."'"E_USER_ERROR);
    638. -
    639.  
    640. -
    641.           if (!$filterBoolVal{
    642. -
    643.              $recordSet->MoveNext();
    644. -
    645.              continue 2;
    646. -
    647.           }
    648. -
    649.  
    650. -
    651.         }
    652. -
    653.         $queryResult[$this->_convertRsRowToQueryResultRow($recordSet->fields);
    654. -
    655.         $recordSet->MoveNext();
    656. -
    657.       }
    658. -
    659.  
    660. -
    661.    }else
    662. -
    663.       while (!$recordSet->EOF{
    664. -
    665.         $queryResult[$this->_convertRsRowToQueryResultRow($recordSet->fields);
    666. -
    667.         $recordSet->MoveNext();
    668. -
    669.       }
    670. -
    671.    return $queryResult;
    672. -
    673.  }
    674. -
    675.  
    676. -
    677.  
    678. -
    679. /**
    680. -
    681.  * Serialize variable values of $queryResult to string.
    682. -
    683.  *
    684. -
    685.  * @param   array  &$queryResult [][?VARNAME]['value']   = string
    686. -
    687.  *                                            ['nType']   = string
    688. -
    689.  *                                            ['l_lang']  = string
    690. -
    691.  *                                            ['l_dtype'] = string
    692. -
    693.  * @return  array  [][?VARNAME] = string
    694. -
    695.  * @access    private
    696. -
    697.  */
    698. -
    699.  function toString(&$queryResult{
    700. -
    701.  
    702. -
    703.    // if a result set is empty return only variable sames
    704. -
    705.    if (count($queryResult== 0{
    706. -
    707.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    708. -
    709.          $res[0][$selectVarNULL;
    710. -
    711.       return $res;
    712. -
    713.    }
    714. -
    715.  
    716. -
    717.    $res array();
    718. -
    719.    foreach ($queryResult as $n => $var)
    720. -
    721.      foreach ($var as $varname => $varProperties)
    722. -
    723.        if ($varProperties['nType'== 'r' || $varProperties['nType'== 'b')
    724. -
    725.           $res[$n][$varname'<' .$varProperties['value'.'>';
    726. -
    727.        else {
    728. -
    729.           $res[$n][$varname'"' .$varProperties['value'.'"';
    730. -
    731.           if ($varProperties['l_lang'!= NULL)
    732. -
    733.              $res[$n][$varname.= ' (xml:lang="' .$varProperties['l_lang'.'")';
    734. -
    735.           if ($varProperties['l_dtype'!= NULL)
    736. -
    737.              $res[$n][$varname.= ' (rdf:datatype="' .$varProperties['l_dtype'.'")';
    738. -
    739.        }
    740. -
    741.    return $res;
    742. -
    743.  }
    744. -
    745.  
    746. -
    747.  
    748. -
    749. /**
    750. -
    751.  * Convert variable values of $queryResult to objects (Node).
    752. -
    753.  *
    754. -
    755.  * @param   array  &$queryResult [][?VARNAME]['value']   = string
    756. -
    757.  *                                            ['nType']   = string
    758. -
    759.  *                                            ['l_lang']  = string
    760. -
    761.  *                                            ['l_dtype'] = string
    762. -
    763.  * @return  array  [][?VARNAME] = object Node
    764. -
    765.  * @access    private
    766. -
    767.  */
    768. -
    769.  function toNodes(&$queryResult{
    770. -
    771.  
    772. -
    773.    // if a result set is empty return only variable sames
    774. -
    775.    if (count($queryResult== 0{
    776. -
    777.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    778. -
    779.          $res[0][$selectVarNULL;
    780. -
    781.       return $res;
    782. -
    783.    }
    784. -
    785.  
    786. -
    787.    $res array();
    788. -
    789.    foreach ($queryResult as $n => $var)
    790. -
    791.      foreach ($var as $varname => $varProperties)
    792. -
    793.        if ($varProperties['nType'== 'r')
    794. -
    795.           $res[$n][$varnamenew Resource($varProperties['value']);
    796. -
    797.        elseif ($varProperties['nType'== 'b')
    798. -
    799.           $res[$n][$varnamenew BlankNode($varProperties['value']);
    800. -
    801.        else {
    802. -
    803.           $res[$n][$varnamenew Literal($varProperties['value']$varProperties['l_lang']);
    804. -
    805.           if ($varProperties['l_dtype'!= NULL)
    806. -
    807.              $res[$n][$varname]->setDataType($varProperties['l_dtype']);
    808. -
    809.        }
    810. -
    811.    return $res;
    812. -
    813.  }
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /**
    820. -
    821.  * Generate a piece of an sql select statement for a variable.
    822. -
    823.  * Look first if the given variable is defined as a pattern object.
    824. -
    825.  * (So you can select the node type, literal lang and dtype)
    826. -
    827.  * If not found - look for subjects and select node label and type.
    828. -
    829.  * If there is no result either go to predicates.
    830. -
    831.  * Predicates are always resources therefore select only the node label.
    832. -
    833.  *
    834. -
    835.  * @param   string $varName 
    836. -
    837.  * @return  string 
    838. -
    839.  * @access    private
    840. -
    841.  */
    842. -
    843. function _generateSql_SelectVar ($varName&$index{
    844. -
    845.  
    846. -
    847.   $sql_select '';
    848. -
    849.  
    850. -
    851.   if (array_key_exists($varName$this->rsIndexes))
    852. -
    853.      return NULL;
    854. -
    855.  
    856. -
    857.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    858. -
    859.     if ($varName == $pattern['object']['value']{
    860. -
    861.  
    862. -
    863.        // select the object label
    864. -
    865.        $sql_select .= " s" .++$n .".object as _" .ltrim($varName"?"." , ";
    866. -
    867.        $this->rsIndexes[$varName]['value'$index++;
    868. -
    869.        // select the node type
    870. -
    871.        $sql_select .= " s" .$n .".object_is , ";
    872. -
    873.        $this->rsIndexes[$varName]['nType'$index++;
    874. -
    875.        // select the object language
    876. -
    877.        $sql_select .= " s" .$n .".l_language , ";
    878. -
    879.        $this->rsIndexes[$varName]['l_lang'$index++;
    880. -
    881.        // select the object dtype
    882. -
    883.        $sql_select .= " s" .$n .".l_datatype , ";
    884. -
    885.        $this->rsIndexes[$varName]['l_dtype'$index++;
    886. -
    887.  
    888. -
    889.        return $sql_select;
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    896. -
    897.     if ($varName == $pattern['subject']['value']{
    898. -
    899.  
    900. -
    901.        // select the object label
    902. -
    903.        $sql_select .= " s" .++$n .".subject as _" .ltrim($varName"?"." , ";
    904. -
    905.        $this->rsIndexes[$varName]['value'$index++;
    906. -
    907.        // select the node type
    908. -
    909.        $sql_select .= " s" .$n .".subject_is , ";
    910. -
    911.        $this->rsIndexes[$varName]['nType'$index++;
    912. -
    913.  
    914. -
    915.        return $sql_select;
    916. -
    917.     }
    918. -
    919.  
    920. -
    921.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    922. -
    923.     if ($varName == $pattern['predicate']['value']{
    924. -
    925.  
    926. -
    927.        // select the object label
    928. -
    929.        $sql_select .= " s" .++$n .".predicate as _" .ltrim($varName"?"." , ";
    930. -
    931.        $this->rsIndexes[$varName]['value'$index++;
    932. -
    933.  
    934. -
    935.        return $sql_select;
    936. -
    937.     }
    938. -
    939.  }
    940. -
    941.  
    942. -
    943.  
    944. -
    945. /**
    946. -
    947.  * Converts a single row of ADORecordSet->fields array to the format of
    948. -
    949.  * $queryResult array using pointers to indexes ($this->rsIndexes) in RecordSet->fields.
    950. -
    951.  *
    952. -
    953.  * @param   array  &$record [] = string
    954. -
    955.  * @return  array  [?VARNAME]['value']   = string
    956. -
    957.  *                            ['nType']   = string
    958. -
    959.  *                            ['l_lang']  = string
    960. -
    961.  *                            ['l_dtype'] = string
    962. -
    963.  * @access    private
    964. -
    965.  */
    966. -
    967.  function _convertRsRowToQueryResultRow(&$record{
    968. -
    969.  
    970. -
    971.    // return only select variables (without conditional variables from the AND clause)
    972. -
    973.    foreach ($this->parsedQuery['selectVars'as $selectVar{
    974. -
    975.      $resultRow[$selectVar]['value'$record[$this->rsIndexes[$selectVar]['value']];
    976. -
    977.      if (isset($this->rsIndexes[$selectVar]['nType']))
    978. -
    979.         $resultRow[$selectVar]['nType'$record[$this->rsIndexes[$selectVar]['nType']];
    980. -
    981.      // is a predicate then
    982. -
    983.      else
    984. -
    985.         $resultRow[$selectVar]['nType''r';
    986. -
    987.  
    988. -
    989.      if ($resultRow[$selectVar]['nType'== 'l'{
    990. -
    991.         $resultRow[$selectVar]['l_lang'$record[$this->rsIndexes[$selectVar]['l_lang']];
    992. -
    993.         $resultRow[$selectVar]['l_dtype'$record[$this->rsIndexes[$selectVar]['l_dtype']];
    994. -
    995.      }
    996. -
    997.    }
    998. -
    999.    return $resultRow;
    1000. -
    1001.  }
    1002. -
    1003.  
    1004. -
    1005. // end: Class RdqlDbEngine
    1006. -
    1007.  
    1008. -
    1009. ?>
    1010. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base deleted file mode 100755 index 43d8c1bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlEngine.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - File Source for RdqlEngine.php - - - - - -

    Source for file RdqlEngine.php

    -

    Documentation is available at RdqlEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Some general methods common for RdqlMemEngine and RdqlDbEngine
    16. -
    17.  *
    18. -
    19.  * @version  $Id$
    20. -
    21.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    22. -
    23.  *
    24. -
    25.  * @package rdql
    26. -
    27.  * @access public
    28. -
    29.  */
    30. -
    31.  
    32. -
    33. Class RdqlEngine extends Object{
    34. -
    35.  
    36. -
    37.     
    38. -
    39.  
    40. -
    41. /**
    42. -
    43.  * Prints a query result as HTML table.
    44. -
    45.  * You can change the colors in the configuration file.
    46. -
    47.  *
    48. -
    49.  * @param array $queryResult [][?VARNAME] = object Node
    50. -
    51.  * @access private
    52. -
    53.  */
    54. -
    55.  function writeQueryResultAsHtmlTable($queryResult{
    56. -
    57.        // Import Package Utility
    58. -
    59.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    60. -
    61.  
    62. -
    63.    if (current($queryResult[0]== NULL{
    64. -
    65.       echo 'no match<br>';
    66. -
    67.       return;
    68. -
    69.    }
    70. -
    71.  
    72. -
    73.         echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
    74. -
    75.    foreach ($queryResult[0as $varName => $value)
    76. -
    77.      echo "<td align='center'><b>$varName</b></td>";
    78. -
    79.      echo '</tr>';
    80. -
    81.  
    82. -
    83.    foreach ($queryResult as $n => $var{
    84. -
    85.  
    86. -
    87.            
    88. -
    89.      echo '<tr><td width="20" align="right">' .($n 1.'.</td>';
    90. -
    91.      foreach ($var as $varName => $value{
    92. -
    93.        echo INDENTATION INDENTATION '<td bgcolor="';
    94. -
    95.           echo RDFUtil::chooseColor($value);
    96. -
    97.        echo '">';
    98. -
    99.        echo '<p>';
    100. -
    101.  
    102. -
    103.        $lang  NULL;
    104. -
    105.        $dtype NULL;
    106. -
    107.        if (is_a($value'Literal')) {
    108. -
    109.            if ($value->getLanguage(!= NULL)
    110. -
    111.                $lang ' <b>(xml:lang="' $value->getLanguage('") </b> ';
    112. -
    113.            if ($value->getDatatype(!= NULL)
    114. -
    115.                 $dtype ' <b>(rdf:datatype="' $value->getDatatype('") </b> ';
    116. -
    117.        }
    118. -
    119.          echo  RDFUtil::getNodeTypeName($value.$value->getLabel($lang $dtype .'</p>';
    120. -
    121.      }
    122. -
    123.      echo '</tr>';
    124. -
    125.    }
    126. -
    127.    echo '</table>';
    128. -
    129.  }
    130. -
    131.  
    132. -
    133. // end: Class RdqlEngine
    134. -
    135.  
    136. -
    137. ?>
    138. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base deleted file mode 100755 index eb8ad0af..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlMemEngine.php.html.svn-base +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - File Source for RdqlMemEngine.php - - - - - -

    Source for file RdqlMemEngine.php

    -

    Documentation is available at RdqlMemEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlMemEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class performes as RDQL query on a MemModel.
    16. -
    17.  *
    18. -
    19.  * Provided an rdql query parsed into an array of php variables and constraints
    20. -
    21.  * at first the engine searches for tuples matching all patterns from the WHERE clause
    22. -
    23.  * of the given RDQL query. Then the query result set is filtered with evaluated
    24. -
    25.  * boolean expressions from the AND clause of the given RDQL query.
    26. -
    27.  *
    28. -
    29.  * @version  $Id$
    30. -
    31.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    32. -
    33.  *
    34. -
    35.  * @package rdql
    36. -
    37.  * @access public
    38. -
    39.  */
    40. -
    41.  
    42. -
    43. Class RdqlMemEngine extends RdqlEngine {
    44. -
    45.  
    46. -
    47.  
    48. -
    49. /**
    50. -
    51.  * Parsed query variables and constraints.
    52. -
    53.  *
    54. -
    55.  * @var     array   ['selectVars'][] = ?VARNAME
    56. -
    57.  *                   ['sources'][] = URI
    58. -
    59.  *                   ['patterns'][]['subject']['value'] = VARorURI
    60. -
    61.  *                                 ['predicate']['value'] = VARorURI
    62. -
    63.  *                                 ['object']['value'] = VARorURIorLiterl
    64. -
    65.  *                                           ['is_literal'] = boolean
    66. -
    67.  *                                           ['l_lang'] = string
    68. -
    69.  *                                           ['l_dtype'] = string
    70. -
    71.  *                   ['filters'][]['string'] = string
    72. -
    73.  *                                ['evalFilterStr'] = string
    74. -
    75.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    76. -
    77.  *                                                  ['operator'] = (eq | ne)
    78. -
    79.  *                                                  ['regex'] = string
    80. -
    81.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    82. -
    83.  *                                                ['operator'] = (eq | ne)
    84. -
    85.  *                                                ['value'] = string
    86. -
    87.  *                                                ['value_type'] = ('variable' | 'URI' | 'Literal')
    88. -
    89.  *                                                ['value_lang'] = string
    90. -
    91.  *                                                ['value_dtype'] = string
    92. -
    93.  *                                ['numExpr']['vars'][] = ?VARNAME
    94. -
    95.  *                          ( [] stands for an integer index - 0..N )
    96. -
    97.  * @access    private
    98. -
    99.  */
    100. -
    101.  var $parsedQuery;
    102. -
    103.  
    104. -
    105.  
    106. -
    107.  /**
    108. -
    109.  * Perform an RDQL Query on the given MemModel.
    110. -
    111.  *
    112. -
    113.  * @param   object  MemModel &$memModel 
    114. -
    115.  * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
    116. -
    117.  * @param   boolean $returnNodes 
    118. -
    119.  * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    120. -
    121.  *       OR  array   [][?VARNAME] = string
    122. -
    123.  *
    124. -
    125.  * @access  public
    126. -
    127.  */
    128. -
    129.  function queryModel(&$memModel&$parsedQuery$returnNodes TRUE{
    130. -
    131.  
    132. -
    133.    $this->parsedQuery $parsedQuery;
    134. -
    135.  
    136. -
    137.    // find tuples matching all patterns
    138. -
    139.    $res $this->findTuplesMatchingAllPatterns($memModel);
    140. -
    141.  
    142. -
    143.    // filter tuples
    144. -
    145.    if (isset($parsedQuery['filters']))
    146. -
    147.       $res $this->filterTuples($res);
    148. -
    149.  
    150. -
    151.    // select variables to be returned
    152. -
    153.    $res $this->selectVariables($res);
    154. -
    155.  
    156. -
    157.    if(!$returnNodes)
    158. -
    159.      return $this->toString($res);
    160. -
    161.  
    162. -
    163.    return $res;
    164. -
    165.  }
    166. -
    167.  
    168. -
    169.  
    170. -
    171.  /**
    172. -
    173.  * Find triples matching all patterns of an RDQL query and return an array
    174. -
    175.  * with variables from all patterns and their corresponding values.
    176. -
    177.  * The variable values returned are instances of object Node.
    178. -
    179.  *
    180. -
    181.  * @param   object  MemModel  &$memModel 
    182. -
    183.  * @return  array   [][?VARNAME] = object Node
    184. -
    185.  *
    186. -
    187.  * @access  private
    188. -
    189.  */
    190. -
    191.  function findTuplesMatchingAllPatterns(&$memModel{
    192. -
    193.  
    194. -
    195.    $resultSet $this->findTuplesMatchingOnePattern($memModel$this->parsedQuery['patterns'][0]);
    196. -
    197.    for ($i=1$i<count($this->parsedQuery['patterns'])$i++{
    198. -
    199.        $rs $this->findTuplesMatchingOnePattern($memModel$this->parsedQuery['patterns'][$i]);
    200. -
    201.        $resultSet $this->joinTuples($resultSet$rs);
    202. -
    203.    }
    204. -
    205.    return $resultSet;
    206. -
    207.  }
    208. -
    209.  
    210. -
    211.  
    212. -
    213. /**
    214. -
    215.  * Find tuples matching one pattern and return an array with pattern
    216. -
    217.  * variables and their corresponding values (instances of object Node).
    218. -
    219.  *
    220. -
    221.  * @param   object  MemModel &$memModel 
    222. -
    223.  * @param   array  &$pattern ['subject']['value'] = VARorURI
    224. -
    225.  *                            ['predicate']['value'] = VARorURI
    226. -
    227.  *                            ['object']['value'] = VARorURIorLiterl
    228. -
    229.  *                                      ['is_literal'] = boolean
    230. -
    231.  *                                      ['l_lang'] = string
    232. -
    233.  *                                      ['l_dtype'] = string
    234. -
    235.  * @return  array   [][?VARNAME] = object Node
    236. -
    237.  *
    238. -
    239.  * @access  private
    240. -
    241.  */
    242. -
    243.  function findTuplesMatchingOnePattern(&$memModel&$pattern{
    244. -
    245.  
    246. -
    247.    $resultSet array();
    248. -
    249.    $i 0;
    250. -
    251.    // parameters to be passed to the method findTriplesMatchingPattern
    252. -
    253.    foreach ($pattern as $key => $v{     
    254. -
    255.      if ($v['value'&& $v['value']{0== '?'{
    256. -
    257.         if ($key == 'object'{
    258. -
    259.             $param['object']['is_a''ANY';
    260. -
    261.             $param['object']['string''ANY';
    262. -
    263.             $param['object']['lang'NULL;
    264. -
    265.             $param['object']['dtype'NULL;
    266. -
    267.         else             
    268. -
    269.              $param[$key'ANY';
    270. -
    271.         $var[$i]['key'$key;
    272. -
    273.         $var[$i++]['val'$v['value'];
    274. -
    275.      }else
    276. -
    277.         if (isset($v['is_literal'])) {
    278. -
    279.           $param[$key]['is_a''Literal';
    280. -
    281.           $param[$key]['string'$v['value'];
    282. -
    283.           $param[$key]['lang'$v['l_lang'];
    284. -
    285.           $param[$key]['dtype'$v['l_dtype'];
    286. -
    287.         }else{
    288. -
    289.           if ($key == 'object'{
    290. -
    291.              $param[$key]['is_a''Resource';
    292. -
    293.              $param[$key]['string'$v['value'];
    294. -
    295.              $param[$key]['lang'NULL;
    296. -
    297.              $param[$key]['dtype'NULL;
    298. -
    299.           }else
    300. -
    301.             $param[$key$v['value'];
    302. -
    303.         }
    304. -
    305.    }
    306. -
    307.    
    308. -
    309.    // find pattern internal bindings e.g. (?x, ?z, ?x)
    310. -
    311.    $intBindings NULL;
    312. -
    313.    for ($i=0$i<count($var)$i++)
    314. -
    315.        foreach($var as $n => $v)
    316. -
    317.          if ($i != $n && $var[$i]['val'== $v['val'])
    318. -
    319.             $intBindings[$var[$i]['key'];
    320. -
    321.  
    322. -
    323.    // find triples of the $memModel matching $pattern
    324. -
    325.    $resModel $this->findTriplesMatchingPattern($memModel$param['subject'],
    326. -
    327.                                                             $param['predicate'],
    328. -
    329.                                                             $param['object']['is_a'],
    330. -
    331.                                                             $param['object']['string'],
    332. -
    333.                                                             $param['object']['lang'],
    334. -
    335.                                                             $param['object']['dtype'],
    336. -
    337.                                                  $intBindings);
    338. -
    339.  
    340. -
    341.    // set values of the pattern variables to be returned
    342. -
    343.    if ($pattern['subject']['value']{0== '?'{
    344. -
    345.       $n 0;
    346. -
    347.       foreach ($resModel->triples as $triple)
    348. -
    349.         $resultSet[$n++][$pattern['subject']['value']] $triple->subj;
    350. -
    351.    }
    352. -
    353.    if ($pattern['predicate']['value']{0== '?'{
    354. -
    355.       $n 0;
    356. -
    357.       foreach ($resModel->triples as $triple)
    358. -
    359.         $resultSet[$n++][$pattern['predicate']['value']] $triple->pred;
    360. -
    361.    }
    362. -
    363.    if ($pattern['object']['value'&& $pattern['object']['value']{0== '?'{
    364. -
    365.       $n 0;
    366. -
    367.       foreach ($resModel->triples as $triple)
    368. -
    369.         $resultSet[$n++][$pattern['object']['value']] $triple->obj;
    370. -
    371.    }
    372. -
    373.    return $resultSet;
    374. -
    375.  }
    376. -
    377.  
    378. -
    379.  
    380. -
    381. /**
    382. -
    383.  * Search in $memModel for triples matching one pattern from the WHERE clause.
    384. -
    385.  * 'ANY' input for $subjLabel..$objLabel, $obj_is will match anything.
    386. -
    387.  * NULL input for $objDtype will only match obj->dtype = NULL
    388. -
    389.  * NULL input for $objLanguage will match obj->lang = NULL or anything if a
    390. -
    391.  * literal is datatyped (except for XMLLiterals and plain literals)
    392. -
    393.  * This method also checks internal bindings if provided.
    394. -
    395.  *
    396. -
    397.  * @param   object MemModel $memModel 
    398. -
    399.  * @param   string $subjLabel 
    400. -
    401.  * @param   string $predLabel 
    402. -
    403.  * @param   string $objLabel 
    404. -
    405.  * @param   string $obj_is 
    406. -
    407.  * @param   string $objLanguage 
    408. -
    409.  * @param   string $objDtype 
    410. -
    411.  * @param   array  $intBindings [] = string
    412. -
    413.  * @return  object MemModel 
    414. -
    415.  * @access    private
    416. -
    417.  */
    418. -
    419.  function findTriplesMatchingPattern(&$memModel$subjLabel$predLabel$obj_is,
    420. -
    421.                                       $objLabel$objLang$objDtype&$intBindings{
    422. -
    423.  
    424. -
    425.    $res new MemModel();
    426. -
    427.  
    428. -
    429.    if($memModel->isEmpty())
    430. -
    431.     return $res;
    432. -
    433.  
    434. -
    435.    if ($subjLabel=='ANY')
    436. -
    437.    {
    438. -
    439.        $subj=NULL;
    440. -
    441.    else
    442. -
    443.    {
    444. -
    445.        $subj=new Resource($subjLabel);
    446. -
    447.    };
    448. -
    449.    if ($predLabel=='ANY')
    450. -
    451.    {
    452. -
    453.        $pred=NULL;
    454. -
    455.    else
    456. -
    457.    {
    458. -
    459.        $pred=new Resource($predLabel);
    460. -
    461.    }
    462. -
    463.             
    464. -
    465.    if ($objLabel=='ANY')
    466. -
    467.    {
    468. -
    469.        $obj=NULL;
    470. -
    471.    else
    472. -
    473.    {
    474. -
    475.        if ($obj_is == 'Literal')
    476. -
    477.        {
    478. -
    479.            $obj=new Literal($objLabel);
    480. -
    481.            $obj->setDatatype($objDtype);
    482. -
    483.            $obj->setLanguage($objLang);
    484. -
    485.        else {
    486. -
    487.            $obj=new Resource($objLabel);
    488. -
    489.        }
    490. -
    491.    };
    492. -
    493.    
    494. -
    495.    $res=$memModel->find($subj,$pred,$obj);
    496. -
    497.  
    498. -
    499.      if ($intBindings)
    500. -
    501.               foreach ($res->triples as $triple)
    502. -
    503.         {
    504. -
    505.             if (!$this->_checkIntBindings($triple$intBindings))
    506. -
    507.             {
    508. -
    509.                   $res->remove($triple);
    510. -
    511.             }
    512. -
    513.         }
    514. -
    515.  
    516. -
    517.   return $res;
    518. -
    519. }
    520. -
    521.  
    522. -
    523.  
    524. -
    525. /**
    526. -
    527.  * Perform an SQL-like inner join on two resultSets.
    528. -
    529.  *
    530. -
    531.  * @param   array   &$finalRes [][?VARNAME] = object Node
    532. -
    533.  * @param   array   &$res      [][?VARNAME] = object Node
    534. -
    535.  * @return  array              [][?VARNAME] = object Node
    536. -
    537.  *
    538. -
    539.  * @access  private
    540. -
    541.  */
    542. -
    543.  function joinTuples(&$finalRes&$res{
    544. -
    545.  
    546. -
    547.    if (count($finalRes== || count($res== 0)
    548. -
    549.       return array();
    550. -
    551.  
    552. -
    553.    // find joint variables and new variables to be added to $finalRes
    554. -
    555.    $jointVars array();
    556. -
    557.    $newVars array();
    558. -
    559.    foreach ($res[0as $varname => $node{
    560. -
    561.      if (array_key_exists($varname$finalRes[0]))
    562. -
    563.         $jointVars[$varname;
    564. -
    565.      else
    566. -
    567.         $newVars[$varname;
    568. -
    569.    }
    570. -
    571.  
    572. -
    573.    // eliminate rows of $finalRes in which the values of $jointVars do not have
    574. -
    575.    // a corresponding row in $res.
    576. -
    577.    foreach ($finalRes as $n => $fRes{
    578. -
    579.      foreach ($res as $i => $r{
    580. -
    581.        $ok TRUE;
    582. -
    583.        foreach ($jointVars as $j_varname)
    584. -
    585.          if ($r[$j_varname!= $fRes[$j_varname]{
    586. -
    587.             $ok FALSE;
    588. -
    589.             break;
    590. -
    591.          }
    592. -
    593.        if ($ok)
    594. -
    595.           break;
    596. -
    597.      }
    598. -
    599.      if (!$ok)
    600. -
    601.         unset($finalRes[$n]);
    602. -
    603.    }
    604. -
    605.  
    606. -
    607.    // join $res and $finalRes
    608. -
    609.    $joinedRes array();
    610. -
    611.    foreach ($res as $i => $r{
    612. -
    613.      foreach ($finalRes as $n => $fRes{
    614. -
    615.        $ok TRUE;
    616. -
    617.        foreach ($jointVars as $j_varname)
    618. -
    619.          if ($r[$j_varname!= $fRes[$j_varname]{
    620. -
    621.             $ok FALSE;
    622. -
    623.             break;
    624. -
    625.          }
    626. -
    627.        if ($ok{
    628. -
    629.           $joinedRow $finalRes[$n];
    630. -
    631.           foreach($newVars as $n_varname)
    632. -
    633.             $joinedRow[$n_varname$r[$n_varname];
    634. -
    635.           $joinedRes[$joinedRow;
    636. -
    637.        }
    638. -
    639.      }
    640. -
    641.    }
    642. -
    643.    
    644. -
    645.    return $joinedRes;
    646. -
    647.  }
    648. -
    649.  
    650. -
    651.  
    652. -
    653. /**
    654. -
    655.  * Filter the result-set of query variables by evaluating each filter from the
    656. -
    657.  * AND clause of the RDQL query.
    658. -
    659.  *
    660. -
    661.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    662. -
    663.  * @return  array  [][?VARNAME] = object Node
    664. -
    665.  * @access    private
    666. -
    667.  */
    668. -
    669.  function filterTuples(&$finalRes{
    670. -
    671.  
    672. -
    673.    foreach ($this->parsedQuery['filters'as $filter{
    674. -
    675.  
    676. -
    677.       foreach ($finalRes as $n => $fRes{
    678. -
    679.         $evalFilterStr $filter['evalFilterStr'];
    680. -
    681.  
    682. -
    683.         // evaluate regex equality expressions of each filter
    684. -
    685.         foreach ($filter['regexEqExprs'as $i => $expr{
    686. -
    687.  
    688. -
    689.           preg_match($expr['regex']$fRes[$expr['var']]->getLabel()$match);
    690. -
    691.           $op substr($expr['operator']0,1);
    692. -
    693.           if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
    694. -
    695.              $evalFilterStr str_replace("##RegEx_$i##"'FALSE'$evalFilterStr);
    696. -
    697.           else
    698. -
    699.              $evalFilterStr str_replace("##RegEx_$i##"'TRUE'$evalFilterStr);
    700. -
    701.  
    702. -
    703.         }
    704. -
    705.  
    706. -
    707.         // evaluate string equality expressions
    708. -
    709.         foreach ($filter['strEqExprs'as $i => $expr{
    710. -
    711.  
    712. -
    713.           $exprBoolVal 'FALSE';
    714. -
    715.           
    716. -
    717.           switch ($expr['value_type']{
    718. -
    719.  
    720. -
    721.             case 'variable':
    722. -
    723.                  if (($fRes[$expr['var']] == $fRes[$expr['value']] && $expr['operator'== 'eq'||
    724. -
    725.                      ($fRes[$expr['var']] != $fRes[$expr['value']] && $expr['operator'== 'ne'))
    726. -
    727.                     $exprBoolVal 'TRUE';
    728. -
    729.                  break;
    730. -
    731.                  
    732. -
    733.             case 'URI':
    734. -
    735.  
    736. -
    737.                  if (is_a($fRes[$expr['var']]'Literal')) {
    738. -
    739.                     if ($expr['operator'== 'ne')
    740. -
    741.                        $exprBoolVal 'TRUE';
    742. -
    743.                     break;
    744. -
    745.                  }
    746. -
    747.  
    748. -
    749.                  if (($fRes[$expr['var']]->getLabel(== $expr['value'&& $expr['operator'== 'eq'||
    750. -
    751.                      ($fRes[$expr['var']]->getLabel(!= $expr['value'&& $expr['operator'== 'ne'))
    752. -
    753.                     $exprBoolVal 'TRUE';
    754. -
    755.                  break;
    756. -
    757.                  
    758. -
    759.             case 'Literal':
    760. -
    761.  
    762. -
    763.                  if (!is_a($fRes[$expr['var']]'Literal')) {
    764. -
    765.                     if ($expr['operator'== 'ne')
    766. -
    767.                        $exprBoolVal 'TRUE';
    768. -
    769.                     break;
    770. -
    771.                  }
    772. -
    773.  
    774. -
    775.                  $filterLiteralnew Literal($expr['value'],$expr['value_lang']);
    776. -
    777.                  $filterLiteral->setDatatype($expr['value_dtype']);
    778. -
    779.                  
    780. -
    781.                 $equal=$fRes[$expr['var']]->equals($filterLiteral);
    782. -
    783. /*                 if ($fRes[$expr['var']]->getLabel() == $expr['value'] &&
    784. -
    785.                      $fRes[$expr['var']]->getDatatype() == $expr['value_dtype']) {
    786. -
    787.                      
    788. -
    789.                     $equal = TRUE;
    790. -
    791.                      
    792. -
    793.                     // Lang tags only differentiate literals in rdf:XMLLiterals and plain literals.
    794. -
    795.                     // Therefore if a literal is datatyped ignore the language tag.
    796. -
    797.                     if ((($expr['value_dtype'] == NULL) ||
    798. -
    799.                          ($expr['value_dtype'] == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') ||
    800. -
    801.                          ($expr['value_dtype'] == 'http://www.w3.org/2001/XMLSchema#string')) &&
    802. -
    803.                         (($fRes[$expr['var']]->getLanguage() != $expr['value_lang'])))
    804. -
    805.                         
    806. -
    807.                         $equal = FALSE;
    808. -
    809.                  }else
    810. -
    811.                     $equal = FALSE;
    812. -
    813.      */               
    814. -
    815.                  if (($equal && $expr['operator'== 'eq'||
    816. -
    817.                      (!$equal && $expr['operator'== 'ne'))
    818. -
    819.                     $exprBoolVal 'TRUE';
    820. -
    821.                  else
    822. -
    823.                     $exprBoolVal 'FALSE';
    824. -
    825.  
    826. -
    827.           }
    828. -
    829.           $evalFilterStr str_replace("##strEqExpr_$i##"$exprBoolVal$evalFilterStr);
    830. -
    831.        }
    832. -
    833.  
    834. -
    835.         // evaluate numerical expressions
    836. -
    837.         foreach ($filter['numExprVars'as $varName{
    838. -
    839.           $varValue "'" .$fRes[$varName]->getLabel(."'";
    840. -
    841.           $evalFilterStr str_replace($varName$varValue$evalFilterStr);
    842. -
    843.         }
    844. -
    845.  
    846. -
    847.         eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
    848. -
    849.         if (!isset($eval_filter_ok))
    850. -
    851.            trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']."'"E_USER_ERROR);
    852. -
    853.  
    854. -
    855.         if (!$filterBoolVal)
    856. -
    857.            unset($finalRes[$n]);
    858. -
    859.       }
    860. -
    861.    }
    862. -
    863.  
    864. -
    865.    return $finalRes;
    866. -
    867.  }
    868. -
    869.  
    870. -
    871.  
    872. -
    873. /**
    874. -
    875.  * Remove all conditional variables from the result-set and leave only variables
    876. -
    877.  * specified in the SELECT clause of the RDQL query.
    878. -
    879.  *
    880. -
    881.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    882. -
    883.  * @return  array  [][?VARNAME] = object Node
    884. -
    885.  * @access    private
    886. -
    887.  */
    888. -
    889.  function selectVariables(&$finalRes{
    890. -
    891.  
    892. -
    893.    // if nothing has been found return only one row of $finalRes
    894. -
    895.    // with select variables having empty values
    896. -
    897.    if (count($finalRes== 0{
    898. -
    899.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    900. -
    901.          $finalRes[0][$selectVarNULL;
    902. -
    903.       return $finalRes;
    904. -
    905.    }
    906. -
    907.    
    908. -
    909.    // return only selectVars in the same order as given in the RDQL query
    910. -
    911.    // and reindex $finalRes.
    912. -
    913.    $n 0;
    914. -
    915.    foreach($finalRes as $key => $val{
    916. -
    917.      foreach ($this->parsedQuery['selectVars'as $selectVar)
    918. -
    919.        $resultSet[$n][$selectVar$val[$selectVar];
    920. -
    921.      unset($finalRes[$key]);
    922. -
    923.      ++$n;
    924. -
    925.    }
    926. -
    927.  
    928. -
    929.    return $resultSet;
    930. -
    931.  }
    932. -
    933.  
    934. -
    935.  
    936. -
    937. /**
    938. -
    939.  * Convert the variable values of $finalRes from objects to their string serialization.
    940. -
    941.  *
    942. -
    943.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    944. -
    945.  * @return  array  [][?VARNAME] = string
    946. -
    947.  * @access    private
    948. -
    949.  */
    950. -
    951.  function toString(&$finalRes{
    952. -
    953.  
    954. -
    955.    foreach ($finalRes as $n => $tuple)
    956. -
    957.      foreach ($tuple as $varname => $node{
    958. -
    959.        if (is_a($node'Resource'))
    960. -
    961.           $res[$n][$varname'<' .$node->getLabel(.'>';
    962. -
    963.        elseif (is_a($node'Literal')) {
    964. -
    965.           $res[$n][$varname'"' .$node->getLabel(.'"';
    966. -
    967.           if ($node->getLanguage())
    968. -
    969.              $res[$n][$varname.= ' (xml:lang="' .$node->getLanguage(.'")';
    970. -
    971.           if ($node->getDatatype())
    972. -
    973.              $res[$n][$varname.= ' (rdf:datatype="' .$node->getDatatype(.'")';
    974. -
    975.        }else
    976. -
    977.           $res[$n][$varname$node;
    978. -
    979.      }
    980. -
    981.    return $res;
    982. -
    983.  }
    984. -
    985.  
    986. -
    987.  
    988. -
    989. /**
    990. -
    991.  * Check if the given triple meets pattern internal bindings
    992. -
    993.  * e.g. (?x, ?z, ?x) ==> statement subject must be identical with the statement object
    994. -
    995.  *
    996. -
    997.  * @param   object statement &$triple 
    998. -
    999.  * @param   array  &$intBindings [] = string
    1000. -
    1001.  * @return  boolean 
    1002. -
    1003.  * @access    private
    1004. -
    1005.  */
    1006. -
    1007.  function _checkIntBindings (&$triple&$intBindings{
    1008. -
    1009.  
    1010. -
    1011.    if (in_array('subject'$intBindings)) {
    1012. -
    1013.       if (in_array('predicate'$intBindings))
    1014. -
    1015.          if ($triple->subj != $triple->pred)
    1016. -
    1017.             return FALSE;
    1018. -
    1019.       if (in_array('object'$intBindings)) {
    1020. -
    1021.          if (is_a($triple->obj'Literal'))
    1022. -
    1023.             return FALSE;
    1024. -
    1025.          elseif ($triple->subj != $triple->obj)
    1026. -
    1027.             return FALSE;
    1028. -
    1029.       }
    1030. -
    1031.       return TRUE;
    1032. -
    1033.    }
    1034. -
    1035.    if (in_array('predicate'$intBindings)) {
    1036. -
    1037.       if (is_a($triple->obj'Literal'))
    1038. -
    1039.          return FALSE;
    1040. -
    1041.       elseif ($triple->pred != $triple->obj)
    1042. -
    1043.              return FALSE;
    1044. -
    1045.       return TRUE;
    1046. -
    1047.    }
    1048. -
    1049.  }
    1050. -
    1051.  
    1052. -
    1053.  
    1054. -
    1055. /**
    1056. -
    1057.  * Check if the lang and dtype of the passed object Literal are equal $lang and $dtype
    1058. -
    1059.  * !!! Language only differentiates literals in rdf:XMLLiterals and plain literals (xsd:string).
    1060. -
    1061.  * !!! Therefore if a literal is datatyped ignore the language.
    1062. -
    1063.  *
    1064. -
    1065.  * @param  object  Literal $literal 
    1066. -
    1067.  * @param  string  $dtype1 
    1068. -
    1069.  * @param  string  $dtype2 
    1070. -
    1071.  * @return boolean 
    1072. -
    1073.  * @access private
    1074. -
    1075.  */
    1076. -
    1077.  function _equalsLangDtype ($literal$lang$dtype{
    1078. -
    1079.  
    1080. -
    1081.    if ($dtype == $literal->getDatatype()) {
    1082. -
    1083.       if (($dtype == NULL ||
    1084. -
    1085.            $dtype == 'http://www.w3.org/2001/XMLSchema#string' ||
    1086. -
    1087.            $dtype == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'&&
    1088. -
    1089.           ($lang != $literal->getLanguage()))
    1090. -
    1091.          return FALSE;
    1092. -
    1093.       return TRUE;
    1094. -
    1095.    }
    1096. -
    1097.    return FALSE;
    1098. -
    1099.  }
    1100. -
    1101.  
    1102. -
    1103.  
    1104. -
    1105. // end: Class RdqlMemEngine
    1106. -
    1107.  
    1108. -
    1109. ?>
    1110. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base deleted file mode 100755 index 278dcb81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlParser.php.html.svn-base +++ /dev/null @@ -1,1084 +0,0 @@ - - - - - - File Source for RdqlParser.php - - - - - -

    Source for file RdqlParser.php

    -

    Documentation is available at RdqlParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlParser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class contains methods for parsing an Rdql query string into PHP variables.
    16. -
    17.  * The output of the RdqlParser is an array with variables and constraints
    18. -
    19.  * of each query clause (Select, From, Where, And, Using).
    20. -
    21.  * To perform an RDQL query this array has to be passed to the RdqlEngine.
    22. -
    23.  *
    24. -
    25.  * @version  $Id$
    26. -
    27.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    28. -
    29.  *
    30. -
    31.  * @package rdql
    32. -
    33.  * @access public
    34. -
    35.  */
    36. -
    37.  
    38. -
    39.  
    40. -
    41. Class RdqlParser extends Object{
    42. -
    43.  
    44. -
    45. /**
    46. -
    47.  * Parsed query variables and constraints.
    48. -
    49.  * { } are only used within the parser class and are not returned as parsed query.
    50. -
    51.  * ( [] stands for an integer index - 0..N )
    52. -
    53.  *
    54. -
    55.  * @var     array   ['selectVars'][] = ?VARNAME
    56. -
    57.  *                   ['sources'][]{['value']} = URI | QName
    58. -
    59.  *                                  {['is_qname'] = boolean}
    60. -
    61.  *                   ['patterns'][]['subject']['value'] = VARorURI
    62. -
    63.  *                                             {['is_qname'] = boolean}
    64. -
    65.  *                                 ['predicate']['value'] = VARorURI
    66. -
    67.  *                                               {['is_qname'] = boolean}
    68. -
    69.  *                                 ['object']['value'] = VARorURIorLiterl
    70. -
    71.  *                                             {['is_qname'] = boolean}
    72. -
    73.  *                                           ['is_literal'] = boolean
    74. -
    75.  *                                           ['l_lang'] = string
    76. -
    77.  *                                           ['l_dtype'] = string
    78. -
    79.  *                                          {['l_dtype_is_qname'] = boolean}
    80. -
    81.  *                   ['filters'][]['string'] = string
    82. -
    83.  *                                ['evalFilterStr'] = string
    84. -
    85.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    86. -
    87.  *                                                  ['operator'] = (eq | ne)
    88. -
    89.  *                                                  ['regex'] = string
    90. -
    91.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    92. -
    93.  *                                                ['operator'] = (eq | ne)
    94. -
    95.  *                                                ['value'] = string
    96. -
    97.  *                                                ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal')
    98. -
    99.  *                                                ['value_lang'] = string
    100. -
    101.  *                                                ['value_dtype'] = string
    102. -
    103.  *                                               {['value_dtype_is_qname'] = boolean}
    104. -
    105.  *                                ['numExpr']['vars'][] = ?VARNAME
    106. -
    107.  *                  {['ns'][PREFIX] = NAMESPACE}
    108. -
    109.  * @access    private
    110. -
    111.  */
    112. -
    113.  var $parsedQuery;
    114. -
    115.  
    116. -
    117.  
    118. -
    119. /**
    120. -
    121.  * Query string divided into a sequence of tokens.
    122. -
    123.  * A token is either: ' ' or "\n" or "\r" or "\t" or ',' or '(' or ')'
    124. -
    125.  * or a string containing any characters except from the above.
    126. -
    127.  *
    128. -
    129.  * @var     array 
    130. -
    131.  * @access    private
    132. -
    133.  */
    134. -
    135.  var $tokens;
    136. -
    137.  
    138. -
    139.  
    140. -
    141. /**
    142. -
    143.  * Parse the given RDQL query string and return an array with query variables and constraints.
    144. -
    145.  *
    146. -
    147.  * @param   string  $queryString 
    148. -
    149.  * @return  array   $this->parsedQuery
    150. -
    151.  * @access    public
    152. -
    153.  */
    154. -
    155.  function parseQuery($queryString{
    156. -
    157.  
    158. -
    159.    $cleanQueryString $this->removeComments($queryString);
    160. -
    161.    $this->tokenize($cleanQueryString);
    162. -
    163.    $this->startParsing();
    164. -
    165.    if ($this->parsedQuery['selectVars'][0== '*')
    166. -
    167.       $this->parsedQuery['selectVars'$this->findAllQueryVariables();
    168. -
    169.    else
    170. -
    171.       $this->_checkSelectVars();
    172. -
    173.    $this->replaceNamespacePrefixes();
    174. -
    175.  
    176. -
    177.    return $this->parsedQuery;
    178. -
    179.  }
    180. -
    181.  
    182. -
    183.  
    184. -
    185. /**
    186. -
    187.  *  Remove comments from the passed query string.
    188. -
    189.  *
    190. -
    191.  *  @param  string  $query 
    192. -
    193.  *  @return string 
    194. -
    195.  *  @throws PHPError
    196. -
    197.  *  @access private
    198. -
    199.  */
    200. -
    201.  function removeComments($query{
    202. -
    203.  
    204. -
    205.    $last strlen($query)-1;
    206. -
    207.    $query .= ' ';
    208. -
    209.    $clean '';
    210. -
    211.    for ($i=0$i<=$last$i++{
    212. -
    213.      // don't search for comments inside a 'literal'@lang^^dtype or "literal"@lang^^dtype
    214. -
    215.      if ($query{$i== "'" || $query{$i== '"'{
    216. -
    217.         $quotMark $query{$i};
    218. -
    219.         do
    220. -
    221.           $clean .= $query{$i++};
    222. -
    223.         while($i $last && $query{$i!= $quotMark);
    224. -
    225.         $clean .= $query{$i};
    226. -
    227.         // language
    228. -
    229.         if ($query{$i+1== '@'{
    230. -
    231.            do{
    232. -
    233.              if ($query{$i+1== '^' && $query{$i+2== '^')
    234. -
    235.                 break;
    236. -
    237.              $clean .= $query{++$i};
    238. -
    239.            }while ($i $last && $query{$i!= ' '  && $query{$i!= "\t"
    240. -
    241.                               && $query{$i!= "\n" && $query{$i!= "\r");
    242. -
    243.         }
    244. -
    245.         // datatype
    246. -
    247.         if ($query{$i+1== '^' && $query{$i+2== '^'{
    248. -
    249.             do
    250. -
    251.               $clean .= $query{++$i};
    252. -
    253.             while ($i $last && $query{$i!= ' '  && $query{$i!= "\t"
    254. -
    255.                              && $query{$i!= "\n" && $query{$i!= "\r" );
    256. -
    257.         }
    258. -
    259.      // don't search for comments inside an <URI> either
    260. -
    261.      }elseif ($query{$i== '<'{
    262. -
    263.         do{
    264. -
    265.            $clean .= $query{$i++};
    266. -
    267.         }while($i $last && $query{$i!= '>');
    268. -
    269.         $clean .= $query{$i};
    270. -
    271.      }elseif ($query{$i== '/'{
    272. -
    273.         // clear: // comment
    274. -
    275.         if ($i $last && $query{$i+1== '/'{
    276. -
    277.             while($i $last && $query{$i!= "\n" && $query{$i!= "\r")
    278. -
    279.               ++$i;
    280. -
    281.             $clean .= ' ';
    282. -
    283.         // clear: /*comment*/
    284. -
    285.         }elseif ($i $last-&& $query{$i+1== '*'{
    286. -
    287.             $i += 2;
    288. -
    289.             while($i $last  && ($query{$i!= '*' || $query{$i+1!= '/'))
    290. -
    291.               ++$i;
    292. -
    293.             if ($i >= $last && ($query{$last-1!= '*' || $query{$last!= '/'))
    294. -
    295.                trigger_error(RDQL_SYN_ERR .": unterminated comment - '*/' missing"E_USER_ERROR);
    296. -
    297.             ++$i;
    298. -
    299.         }else
    300. -
    301.           $clean .= $query{$i};
    302. -
    303.      }else
    304. -
    305.         $clean .= $query{$i};
    306. -
    307.    }
    308. -
    309.    return $clean;
    310. -
    311.  }
    312. -
    313.  
    314. -
    315.  
    316. -
    317. /**
    318. -
    319.  * Divide the query string into tokens.
    320. -
    321.  * A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')'
    322. -
    323.  * or a string containing any character except from the above.
    324. -
    325.  *
    326. -
    327.  * @param   string  $queryString 
    328. -
    329.  * @access    private
    330. -
    331.  */
    332. -
    333.  function tokenize($queryString{
    334. -
    335.  
    336. -
    337.    $queryString trim($queryString" \r\n\t");
    338. -
    339.    $specialChars array (" ""\t""\r""\n"",""("")");
    340. -
    341.    $len strlen($queryString);
    342. -
    343.    $this->tokens[0]='';
    344. -
    345.    $n 0;
    346. -
    347.  
    348. -
    349.    for ($i=0$i<$len++$i{
    350. -
    351.        if (!in_array($queryString{$i}$specialChars))
    352. -
    353.           $this->tokens[$n.= $queryString{$i};
    354. -
    355.        else {
    356. -
    357.           if ($this->tokens[$n!= '')
    358. -
    359.              ++$n;
    360. -
    361.           $this->tokens[$n$queryString{$i};
    362. -
    363.           $this->tokens[++$n'';
    364. -
    365.        }
    366. -
    367.    }
    368. -
    369.  }
    370. -
    371.  
    372. -
    373.  
    374. -
    375. /**
    376. -
    377.  * Start parsing of the tokenized query string.
    378. -
    379.  *
    380. -
    381.  * @access private
    382. -
    383.  */
    384. -
    385.  function startParsing({
    386. -
    387.  
    388. -
    389.    $this->parseSelect();
    390. -
    391.  }
    392. -
    393.  
    394. -
    395.  
    396. -
    397. /**
    398. -
    399.  * Parse the SELECT clause of an Rdql query.
    400. -
    401.  * When the parsing of the SELECT clause is finished, this method will call
    402. -
    403.  * a suitable method to parse the subsequent clause.
    404. -
    405.  *
    406. -
    407.  * @throws    PhpError
    408. -
    409.  * @access    private
    410. -
    411.  */
    412. -
    413.   function parseSelect({
    414. -
    415.  
    416. -
    417.    $this->_clearWhiteSpaces();
    418. -
    419.  
    420. -
    421.    // Check if the queryString contains a "SELECT" token
    422. -
    423.    if (strcasecmp('SELECT'current($this->tokens)))
    424. -
    425.       trigger_error(RDQL_SEL_ERR  ."'" .current($this->tokens)
    426. -
    427.                                   ."' - SELECT keyword expected"E_USER_ERROR);
    428. -
    429.    unset($this->tokens[key($this->tokens)]);
    430. -
    431.    $this->_clearWhiteSpaces();
    432. -
    433.  
    434. -
    435.    // Parse SELECT *
    436. -
    437.    if (current($this->tokens== '*'{
    438. -
    439.       unset($this->tokens[key($this->tokens)]);
    440. -
    441.       $this->parsedQuery['selectVars'][0'*';
    442. -
    443.       $this->_clearWhiteSpaces();
    444. -
    445.       if (strcasecmp('FROM'current($this->tokens))
    446. -
    447.           && strcasecmp('SOURCE'current($this->tokens))
    448. -
    449.           && strcasecmp('WHERE'current($this->tokens)))
    450. -
    451.         trigger_error(RDQL_SYN_ERR .": '" .htmlspecialchars(current($this->tokens))
    452. -
    453.                                ."' - SOURCE or WHERE clause expected"E_USER_ERROR);
    454. -
    455.    }
    456. -
    457.  
    458. -
    459.    // Parse SELECT ?Var (, ?Var)*
    460. -
    461.    $commaExpected FALSE;
    462. -
    463.    $comma FALSE;
    464. -
    465.    while (current($this->tokens!= NULL{
    466. -
    467.      $k key($this->tokens);
    468. -
    469.      $token $this->tokens[$k];
    470. -
    471.  
    472. -
    473.      switch ($token{
    474. -
    475.         case ','if (!$commaExpected)
    476. -
    477.                      trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    478. -
    479.                   $comma TRUE;
    480. -
    481.                   $commaExpected FALSE;
    482. -
    483.                   break;
    484. -
    485.         case '(':
    486. -
    487.         case ')'trigger_error(RDQL_SEL_ERR ." '$token' - illegal input"E_USER_ERROR);
    488. -
    489.                   break;
    490. -
    491.         default :
    492. -
    493.                   if (!strcasecmp('FROM'$token|| !strcasecmp('SOURCE'$token)) {
    494. -
    495.                      if ($comma)
    496. -
    497.                         trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    498. -
    499.                      unset($this->tokens[$k]);
    500. -
    501.                      return $this->parseFrom();
    502. -
    503.                   }elseif (!strcasecmp('WHERE'$token&& !$comma{
    504. -
    505.                      if ($comma)
    506. -
    507.                         trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    508. -
    509.                      unset($this->tokens[$k]);
    510. -
    511.                      return $this->parseWhere();
    512. -
    513.                   }
    514. -
    515.                   if ($token{0== '?'{
    516. -
    517.                      $this->parsedQuery['selectVars'][$this->_validateVar($tokenRDQL_SEL_ERR);
    518. -
    519.                      $commaExpected TRUE;
    520. -
    521.                      $comma FALSE;
    522. -
    523.                   }else
    524. -
    525.                      trigger_error(RDQL_SEL_ERR ." '$token' - '?' missing"E_USER_ERROR);
    526. -
    527.      }
    528. -
    529.      unset($this->tokens[$k]);
    530. -
    531.      $this->_clearWhiteSpaces();
    532. -
    533.    }
    534. -
    535.    trigger_error(RDQL_SYN_ERR ': WHERE clause missing'E_USER_ERROR);
    536. -
    537.  }
    538. -
    539.  
    540. -
    541.  
    542. -
    543. /**
    544. -
    545.  * Parse the FROM/SOURCES clause of an Rdql query
    546. -
    547.  * When the parsing of this clause is finished, parseWhere() will be called.
    548. -
    549.  *
    550. -
    551.  * @throws    PhpError
    552. -
    553.  * @access    private
    554. -
    555.  */
    556. -
    557.  function parseFrom({
    558. -
    559.  
    560. -
    561.    $comma FALSE;
    562. -
    563.    $commaExpected FALSE;
    564. -
    565.    $i = -1;
    566. -
    567.    while (current($this->tokens!= NULL{
    568. -
    569.  
    570. -
    571.       $this->_clearWhiteSpaces();
    572. -
    573.       if (!strcasecmp('WHERE'current($this->tokens)) && count($this->parsedQuery['sources']!= 0{
    574. -
    575.          if ($comma)
    576. -
    577.             trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    578. -
    579.          unset($this->tokens[key($this->tokens)]);
    580. -
    581.          return $this->parseWhere();
    582. -
    583.       }
    584. -
    585.       if (current($this->tokens== ','{
    586. -
    587.          if ($commaExpected{
    588. -
    589.             $comma TRUE;
    590. -
    591.             $commaExpected FALSE;
    592. -
    593.             unset($this->tokens[key($this->tokens)]);
    594. -
    595.          }else
    596. -
    597.             trigger_error(RDQL_SRC_ERR ."',' - unecpected comma"E_USER_ERROR);
    598. -
    599.       }else{
    600. -
    601.         $token current($this->tokens);
    602. -
    603.         $this->parsedQuery['sources'][++$i]['value'$this->_validateURI($tokenRDQL_SRC_ERR);
    604. -
    605.         if ($token{0!= '<')
    606. -
    607.             $this->parsedQuery['sources'][$i]['is_qname'TRUE;
    608. -
    609.         $commaExpected TRUE;
    610. -
    611.         $comma FALSE;
    612. -
    613.       }
    614. -
    615.    }
    616. -
    617.    trigger_error(RDQL_SYN_ERR .': WHERE clause missing'E_USER_ERROR);
    618. -
    619.  }
    620. -
    621.  
    622. -
    623.  
    624. -
    625. /**'
    626. -
    627.  * Parse the WHERE clause of an Rdql query.
    628. -
    629.  * When the parsing of the WHERE clause is finished, this method will call
    630. -
    631.  * a suitable method to parse the subsequent clause if provided.
    632. -
    633.  *
    634. -
    635.  * @throws    PhpError
    636. -
    637.  * @access    private
    638. -
    639.  */
    640. -
    641.  function parseWhere({
    642. -
    643.  
    644. -
    645.    $comma FALSE;
    646. -
    647.    $commaExpected FALSE;
    648. -
    649.    $i=0;
    650. -
    651.  
    652. -
    653.    do {
    654. -
    655.      $this->_clearWhiteSpaces();
    656. -
    657.      if (!strcasecmp('AND'current($this->tokens))
    658. -
    659.          && count($this->parsedQuery['patterns']!= 0){
    660. -
    661.         if ($comma)
    662. -
    663.             trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    664. -
    665.         unset($this->tokens[key($this->tokens)]);
    666. -
    667.         return $this->parseAnd();
    668. -
    669.      }elseif (!strcasecmp('USING'current($this->tokens))
    670. -
    671.               && count($this->parsedQuery['patterns']!= 0{
    672. -
    673.         if ($comma)
    674. -
    675.             trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    676. -
    677.         unset($this->tokens[key($this->tokens)]);
    678. -
    679.         return $this->parseUsing();
    680. -
    681.      }
    682. -
    683.  
    684. -
    685.      if (current($this->tokens== ','{
    686. -
    687.         $comma TRUE;
    688. -
    689.         $this->_checkComma($commaExpectedRDQL_WHR_ERR);
    690. -
    691.  
    692. -
    693.      }else{
    694. -
    695.  
    696. -
    697.         if (current($this->tokens!= '(')
    698. -
    699.            trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens)
    700. -
    701.                                       ."' - '(' expected"E_USER_ERROR);
    702. -
    703.         unset($this->tokens[key($this->tokens)]);
    704. -
    705.         $this->_clearWhiteSpaces();
    706. -
    707.  
    708. -
    709.         $this->parsedQuery['patterns'][$i]['subject'$this->_validateVarUri(current($this->tokens));
    710. -
    711.         $this->_checkComma(TRUERDQL_WHR_ERR);
    712. -
    713.         $this->parsedQuery['patterns'][$i]['predicate'$this->_validateVarUri(current($this->tokens));
    714. -
    715.         $this->_checkComma(TRUERDQL_WHR_ERR);
    716. -
    717.         $this->parsedQuery['patterns'][$i++]['object'$this->_validateVarUriLiteral(current($this->tokens));
    718. -
    719.         $this->_clearWhiteSpaces();
    720. -
    721.  
    722. -
    723.        if (current($this->tokens!= ')')
    724. -
    725.           trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens."' - ')' expected"E_USER_ERROR);
    726. -
    727.        unset($this->tokens[key($this->tokens)]);
    728. -
    729.        $this->_clearWhiteSpaces();
    730. -
    731.        $commaExpected TRUE;
    732. -
    733.        $comma FALSE;
    734. -
    735.      }
    736. -
    737.    }while(current($this->tokens!= NULL);
    738. -
    739.  
    740. -
    741.    if ($comma)
    742. -
    743.       trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    744. -
    745.  }
    746. -
    747.  
    748. -
    749.  
    750. -
    751. /**
    752. -
    753.  * Parse the AND clause of an Rdql query
    754. -
    755.  *
    756. -
    757.  * @throws    PhpError
    758. -
    759.  * @access    private
    760. -
    761.  * @todo clear comments
    762. -
    763.  */
    764. -
    765.  function parseAnd({
    766. -
    767.  
    768. -
    769.    $this->_clearWhiteSpaces();
    770. -
    771.    $n 0;
    772. -
    773.    $filterStr '';
    774. -
    775.  
    776. -
    777.    while(current($this->tokens!= NULL{
    778. -
    779.      $k key($this->tokens);
    780. -
    781.      $token $this->tokens[$k];
    782. -
    783.  
    784. -
    785.      if (!strcasecmp('USING'$token)) {
    786. -
    787.         $this->parseFilter($n$filterStr);
    788. -
    789.         unset($this->tokens[$k]);
    790. -
    791.         return $this->parseUsing();
    792. -
    793.      }elseif ($token == ','{
    794. -
    795.         $this->parseFilter($n$filterStr);
    796. -
    797.         $filterStr '';
    798. -
    799.         $token '';
    800. -
    801.         ++$n;
    802. -
    803.      }
    804. -
    805.      $filterStr .= $token;
    806. -
    807.      unset($this->tokens[$k]);
    808. -
    809.    }
    810. -
    811.    $this->parseFilter($n$filterStr);
    812. -
    813.  }
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /**
    820. -
    821.  * Parse the USING clause of an Rdql query
    822. -
    823.  *
    824. -
    825.  * @throws    PhpError
    826. -
    827.  * @access    private
    828. -
    829.  */
    830. -
    831.  function parseUsing({
    832. -
    833.  
    834. -
    835.   $commaExpected FALSE;
    836. -
    837.   $comma FALSE;
    838. -
    839.  
    840. -
    841.   do {
    842. -
    843.     $this->_clearWhiteSpaces();
    844. -
    845.     if (current($this->tokens== ','{
    846. -
    847.         $comma TRUE;
    848. -
    849.         $this->_checkComma($commaExpectedRDQL_USG_ERR);
    850. -
    851.     }else{
    852. -
    853.        $prefix $this->_validatePrefix(current($this->tokens));
    854. -
    855.        $this->_clearWhiteSpaces();
    856. -
    857.  
    858. -
    859.        if (strcasecmp('FOR'current($this->tokens)))
    860. -
    861.           trigger_error(RDQL_USG_ERR ." keyword: 'FOR' missing in the namespace declaration: '"E_USER_ERROR);
    862. -
    863.        unset($this->tokens[key($this->tokens)]);
    864. -
    865.        $this->_clearWhiteSpaces();
    866. -
    867.  
    868. -
    869.        $this->parsedQuery['ns'][$prefix$this->_validateUri(current($this->tokens)RDQL_USG_ERR);
    870. -
    871.        $this->_clearWhiteSpaces();
    872. -
    873.        $commaExpected TRUE;
    874. -
    875.        $comma FALSE;
    876. -
    877.     }
    878. -
    879.   }while(current($this->tokens!= NULL);
    880. -
    881.  
    882. -
    883.   if ($comma)
    884. -
    885.       trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    886. -
    887.  }
    888. -
    889.  
    890. -
    891.  
    892. -
    893. /**
    894. -
    895.  * Check if a filter from the AND clause contains an equal number of '(' and ')'
    896. -
    897.  * and parse filter expressions.
    898. -
    899.  *
    900. -
    901.  * @param   integer $n 
    902. -
    903.  * @param   string  $filter 
    904. -
    905.  * @throws  PHPError
    906. -
    907.  * @access    private
    908. -
    909.  */
    910. -
    911.  function parseFilter($n$filter{
    912. -
    913.  
    914. -
    915.    if ($filter == NULL)
    916. -
    917.       trigger_error(RDQL_AND_ERR ." ',' - unexpected comma"E_USER_ERROR);
    918. -
    919.    $paren substr_count($filter'('substr_count($filter')');
    920. -
    921.    if ($paren != 0{
    922. -
    923.       if ($paren 0)
    924. -
    925.          $errorMsg "'" .htmlspecialchars($filter."' - ')' missing ";
    926. -
    927.       elseif ($paren 0)
    928. -
    929.          $errorMsg "'" .htmlspecialchars($filter."' - too many ')' ";
    930. -
    931.       trigger_error(RDQL_AND_ERR .$errorMsgE_USER_ERROR);
    932. -
    933.    }
    934. -
    935.  
    936. -
    937.    $this->parsedQuery['filters'][$n$this->parseExpressions($filter);
    938. -
    939.  }
    940. -
    941.  
    942. -
    943.  
    944. -
    945. /**
    946. -
    947.  * Parse expressions inside the passed filter:
    948. -
    949.  * 1)  regex equality expressions:    ?var [~~ | =~ | !~ ] REG_EX
    950. -
    951.  * 2a) string equality expressions:   ?var  [eq | ne] "literal"@lang^^dtype.
    952. -
    953.  * 2b) string equality expressions:   ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
    954. -
    955.  * 3)  numerical expressions: e.q.    (?var1 - ?var2)*4 >= 20
    956. -
    957.  *
    958. -
    959.  * In cases 1-2 parse each expression of the given filter into an array of variables.
    960. -
    961.  * For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr.
    962. -
    963.  * The RDQLengine will then replace each place holder with the outcomming boolean value
    964. -
    965.  * of the corresponding expression.
    966. -
    967.  * The remaining filterStr contains only numerical expressions and place holders.
    968. -
    969.  *
    970. -
    971.  * @param   string  $filteStr 
    972. -
    973.  * @return  array   ['string'] = string
    974. -
    975.  *                   ['evalFilterStr'] = string
    976. -
    977.  *                   ['reqexEqExprs'][]['var'] = ?VARNAME
    978. -
    979.  *                                     ['operator'] = (eq | ne)
    980. -
    981.  *                                     ['regex'] = string
    982. -
    983.  *                   ['strEqExprs'][]['var'] = ?VARNAME
    984. -
    985.  *                                  ['operator'] = (eq | ne)
    986. -
    987.  *                                  ['value'] = string
    988. -
    989.  *                                  ['value_type'] = ('variable' | 'URI' | 'QName'| 'Literal')
    990. -
    991.  *                                  ['value_lang'] = string
    992. -
    993.  *                                  ['value_dtype'] = string
    994. -
    995.  *                                    ['value_dtype_is_qname'] = boolean
    996. -
    997.  *                   ['numExpr']['vars'][] = ?VARNAME
    998. -
    999.  * @access    private
    1000. -
    1001.  */
    1002. -
    1003.  function parseExpressions($filterStr{
    1004. -
    1005.  
    1006. -
    1007.    $parsedFilter['string'$filterStr;
    1008. -
    1009.    $parsedFilter['regexEqExprs'array();
    1010. -
    1011.    $parsedFilter['strEqExprs'array();
    1012. -
    1013.    $parsedFilter['numExprVars'array();
    1014. -
    1015.  
    1016. -
    1017.    // parse regex string equality expressions, e.g. ?x ~~ !//foo.com/r!i
    1018. -
    1019.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+([~!=]~)\s+(['|\"])?([^\s'\"]+)(['|\"])?/";
    1020. -
    1021.    preg_match_all($reg_ex$filterStr$eqExprs);
    1022. -
    1023.    foreach ($eqExprs[0as $i => $eqExpr{
    1024. -
    1025.      $this->_checkRegExQuotation($filterStr$eqExprs[3][$i]$eqExprs[5][$i]);
    1026. -
    1027.      $parsedFilter['regexEqExprs'][$i]['var'$this->_isDefined($eqExprs[1][$i]);
    1028. -
    1029.      $parsedFilter['regexEqExprs'][$i]['operator'$eqExprs[2][$i];
    1030. -
    1031.      $parsedFilter['regexEqExprs'][$i]['regex'$eqExprs[4][$i];
    1032. -
    1033.  
    1034. -
    1035.      $filterStr str_replace($eqExpr" ##RegEx_$i## "$filterStr);
    1036. -
    1037.    }
    1038. -
    1039.  
    1040. -
    1041.    // parse ?var  [eq | ne] "literal"@lang^^dtype
    1042. -
    1043.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\'[^\']*\'|\"[^\"]*\")";
    1044. -
    1045.    $reg_ex .= "(@[a-zA-Z]+)?(\^{2}\S+:?\S+)?/i";
    1046. -
    1047.    preg_match_all($reg_ex$filterStr$eqExprs);
    1048. -
    1049.    foreach ($eqExprs[0as $i => $eqExpr{
    1050. -
    1051.      $parsedFilter['strEqExprs'][$i]['var'$this->_isDefined($eqExprs[1][$i]);#
    1052. -
    1053.      $parsedFilter['strEqExprs'][$i]['operator'strtolower($eqExprs[2][$i]);
    1054. -
    1055.      $parsedFilter['strEqExprs'][$i]['value'trim($eqExprs[3][$i],"'\"");
    1056. -
    1057.      $parsedFilter['strEqExprs'][$i]['value_type''Literal';
    1058. -
    1059.      $parsedFilter['strEqExprs'][$i]['value_lang'substr($eqExprs[4][$i]1);     
    1060. -
    1061.      $dtype substr($eqExprs[5][$i]2);
    1062. -
    1063.      if ($dtype{
    1064. -
    1065.         $parsedFilter['strEqExprs'][$i]['value_dtype'$this->_validateUri($dtypeRDQL_AND_ERR);
    1066. -
    1067.         if ($dtype{0!= '<')
    1068. -
    1069.            $parsedFilter['strEqExprs'][$i]['value_dtype_is_qname'TRUE;      
    1070. -
    1071.      }else 
    1072. -
    1073.         $parsedFilter['strEqExprs'][$i]['value_dtype''';
    1074. -
    1075.  
    1076. -
    1077.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$i## "$filterStr);
    1078. -
    1079.    }
    1080. -
    1081.    
    1082. -
    1083.    // parse ?var [eq | ne] ?var
    1084. -
    1085.    $ii count($parsedFilter['strEqExprs']);
    1086. -
    1087.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\?[a-zA-Z0-9_]+)/i";
    1088. -
    1089.    preg_match_all($reg_ex$filterStr$eqExprs);
    1090. -
    1091.    foreach ($eqExprs[0as $i => $eqExpr{
    1092. -
    1093.      $parsedFilter['strEqExprs'][$ii]['var'$this->_isDefined($eqExprs[1][$i]);
    1094. -
    1095.      $parsedFilter['strEqExprs'][$ii]['operator'strtolower($eqExprs[2][$i]);
    1096. -
    1097.      $parsedFilter['strEqExprs'][$ii]['value'$this->_isDefined($eqExprs[3][$i]);
    1098. -
    1099.      $parsedFilter['strEqExprs'][$ii]['value_type''variable';
    1100. -
    1101.  
    1102. -
    1103.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$ii## "$filterStr);
    1104. -
    1105.      $ii++;
    1106. -
    1107.    }
    1108. -
    1109.  
    1110. -
    1111.    // parse ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
    1112. -
    1113.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+((<\S+>)|(\S+:\S*))/i";
    1114. -
    1115.    preg_match_all($reg_ex$filterStr$eqExprs);
    1116. -
    1117.    foreach ($eqExprs[0as $i => $eqExpr{
    1118. -
    1119.      $parsedFilter['strEqExprs'][$ii]['var'$this->_isDefined($eqExprs[1][$i]);
    1120. -
    1121.      $parsedFilter['strEqExprs'][$ii]['operator'strtolower($eqExprs[2][$i]);
    1122. -
    1123.      if ($eqExprs[4][$i]{
    1124. -
    1125.          $parsedFilter['strEqExprs'][$ii]['value'trim($eqExprs[4][$i]"<>");
    1126. -
    1127.          $parsedFilter['strEqExprs'][$ii]['value_type''URI';
    1128. -
    1129.      }else if($eqExprs[5][$i]){
    1130. -
    1131.          $this->_validateQName($eqExprs[5][$i]RDQL_AND_ERR);
    1132. -
    1133.          $parsedFilter['strEqExprs'][$ii]['value'$eqExprs[5][$i];
    1134. -
    1135.          $parsedFilter['strEqExprs'][$ii]['value_type''QName';
    1136. -
    1137.      }
    1138. -
    1139.  
    1140. -
    1141.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$ii## "$filterStr);
    1142. -
    1143.      $ii++;
    1144. -
    1145.    }  
    1146. -
    1147.    
    1148. -
    1149.    $parsedFilter['evalFilterStr'$filterStr;
    1150. -
    1151.  
    1152. -
    1153.    // all that is left are numerical expressions and place holders for the above expressions
    1154. -
    1155.    preg_match_all("/\?[a-zA-Z0-9_]+/"$filterStr$vars);
    1156. -
    1157.    foreach ($vars[0as $var{
    1158. -
    1159.      $parsedFilter['numExprVars'][$this->_isDefined($var);
    1160. -
    1161.    }
    1162. -
    1163.  
    1164. -
    1165.    return $parsedFilter;
    1166. -
    1167.  }
    1168. -
    1169.  
    1170. -
    1171.  
    1172. -
    1173. /**
    1174. -
    1175.  * Find all query variables used in the WHERE clause.
    1176. -
    1177.  *
    1178. -
    1179.  * @return  array [] = ?VARNAME
    1180. -
    1181.  * @access    private
    1182. -
    1183.  */
    1184. -
    1185.  function findAllQueryVariables({
    1186. -
    1187.  
    1188. -
    1189.    $vars array();
    1190. -
    1191.    foreach ($this->parsedQuery['patterns'as $pattern{
    1192. -
    1193.      $count 0;
    1194. -
    1195.      foreach ($pattern as $v{
    1196. -
    1197.        if ($v['value'&& $v['value']{0== '?'{
    1198. -
    1199.           ++$count;
    1200. -
    1201.           if (!in_array($v['value']$vars))
    1202. -
    1203.              $vars[$v['value'];
    1204. -
    1205.        }
    1206. -
    1207.      }
    1208. -
    1209.      if (!$count)
    1210. -
    1211.         trigger_error(RDQL_WHR_ERR .'pattern contains no variables'E_USER_ERROR);
    1212. -
    1213.    }
    1214. -
    1215.  
    1216. -
    1217.    return $vars;
    1218. -
    1219.  }
    1220. -
    1221.  
    1222. -
    1223.  
    1224. -
    1225. /**
    1226. -
    1227.  * Replace all namespace prefixes in the pattern and constraint clause of an rdql query
    1228. -
    1229.  * with the namespaces declared in the USING clause and default namespaces.
    1230. -
    1231.  *
    1232. -
    1233.  * @access    private
    1234. -
    1235.  */
    1236. -
    1237.  function replaceNamespacePrefixes({
    1238. -
    1239.  
    1240. -
    1241.    global $default_prefixes;
    1242. -
    1243.  
    1244. -
    1245.    if (!isset($this->parsedQuery['ns']))
    1246. -
    1247.       $this->parsedQuery['ns'array();
    1248. -
    1249.  
    1250. -
    1251.    // add default namespaces
    1252. -
    1253.    // if in an rdql query a reserved prefix (e.g. rdf: rdfs:) is used
    1254. -
    1255.    // it will be overridden by the default namespace defined in constants.php
    1256. -
    1257.    $this->parsedQuery['ns'array_merge($this->parsedQuery['ns']$default_prefixes);
    1258. -
    1259.  
    1260. -
    1261.    // replace namespace prefixes in the FROM clause
    1262. -
    1263.    if (isset($this->parsedQuery['sources']))
    1264. -
    1265.          foreach ($this->parsedQuery['sources'as $n => $source{
    1266. -
    1267.              if (isset($source['is_qname']))
    1268. -
    1269.                 $this->parsedQuery['sources'][$n$this->_replaceNamespacePrefix($source['value']RDQL_SRC_ERR);
    1270. -
    1271.              else {
    1272. -
    1273.                 foreach ($this->parsedQuery['ns'as $prefix => $uri
    1274. -
    1275.                   $source['value'eregi_replace("$prefix:"$uri$source['value']);                                            
    1276. -
    1277.                 $this->parsedQuery['sources'][$n$source['value'];
    1278. -
    1279.              }                
    1280. -
    1281.                 
    1282. -
    1283.          }
    1284. -
    1285.    
    1286. -
    1287.    // replace namespace prefixes in the where clause
    1288. -
    1289.    foreach ($this->parsedQuery['patterns'as $n => $pattern{
    1290. -
    1291.      foreach ($pattern as $key => $v)
    1292. -
    1293.        if ($v['value'&& $v['value']{0!= '?'{
    1294. -
    1295.              if (isset($v['is_qname'])) {                                 
    1296. -
    1297.                $this->parsedQuery['patterns'][$n][$key]['value']
    1298. -
    1299.                    = $this->_replaceNamespacePrefix($v['value']RDQL_WHR_ERR);
    1300. -
    1301.                unset($this->parsedQuery['patterns'][$n][$key]['is_qname']);     
    1302. -
    1303.              else // is quoted URI (== <URI>) or Literal              
    1304. -
    1305.               if (isset($this->parsedQuery['patterns'][$n][$key]['is_literal'])) {
    1306. -
    1307.                    if (isset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname'])) {   
    1308. -
    1309.                        $this->parsedQuery['patterns'][$n][$key]['l_dtype']
    1310. -
    1311.                            = $this->_replaceNamespacePrefix($v['l_dtype']RDQL_WHR_ERR);                           
    1312. -
    1313.                        unset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname']);    
    1314. -
    1315.                    }else {
    1316. -
    1317.                      foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1318. -
    1319.                      $this->parsedQuery['patterns'][$n][$key]['l_dtype']
    1320. -
    1321.                        = eregi_replace("$prefix:"$uri$this->parsedQuery['patterns'][$n][$key]['l_dtype']);
    1322. -
    1323.                    }     
    1324. -
    1325.                  }else {
    1326. -
    1327.                  foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1328. -
    1329.                       $this->parsedQuery['patterns'][$n][$key]['value']
    1330. -
    1331.                      = eregi_replace("$prefix:"$uri$this->parsedQuery['patterns'][$n][$key]['value']);
    1332. -
    1333.               }
    1334. -
    1335.              }
    1336. -
    1337.        }
    1338. -
    1339.    }
    1340. -
    1341.  
    1342. -
    1343.    // replace prefixes in the constraint clause
    1344. -
    1345.    if (isset($this->parsedQuery['filters']))
    1346. -
    1347.       foreach ($this->parsedQuery['filters'as $n => $filter)
    1348. -
    1349.         foreach ($filter['strEqExprs'as $i => $expr{
    1350. -
    1351.           if ($expr['value_type'== 'QName'{             
    1352. -
    1353.                $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
    1354. -
    1355.                    = $this->_replaceNamespacePrefix($expr['value']RDQL_AND_ERR);                 
    1356. -
    1357.              $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_type''URI';                        
    1358. -
    1359.           }
    1360. -
    1361.           if ($expr['value_type'== 'URI')
    1362. -
    1363.              foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1364. -
    1365.                $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
    1366. -
    1367.                  = eregi_replace("$prefix:"$uri,
    1368. -
    1369.                     $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']);
    1370. -
    1371.           elseif ($expr['value_type'== 'Literal'{
    1372. -
    1373.                if (isset($expr['value_dtype_is_qname'])) {
    1374. -
    1375.                    $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
    1376. -
    1377.                       = $this->_replaceNamespacePrefix($expr['value_dtype']RDQL_AND_ERR);                      
    1378. -
    1379.                    unset($this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype_is_qname']);        
    1380. -
    1381.                else {
    1382. -
    1383.                foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1384. -
    1385.                  $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
    1386. -
    1387.                    = eregi_replace("$prefix:"$uri,
    1388. -
    1389.                       $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']);
    1390. -
    1391.                }
    1392. -
    1393.           }
    1394. -
    1395.         }
    1396. -
    1397.  
    1398. -
    1399.    unset($this->parsedQuery['ns']);
    1400. -
    1401.  }
    1402. -
    1403.  
    1404. -
    1405.  
    1406. -
    1407. // =============================================================================
    1408. -
    1409. // *************************** helper functions ********************************
    1410. -
    1411. // =============================================================================
    1412. -
    1413.  
    1414. -
    1415.  
    1416. -
    1417. /**
    1418. -
    1419.  * Remove whitespace-tokens from the array $this->tokens
    1420. -
    1421.  *
    1422. -
    1423.  * @access    private
    1424. -
    1425.  */
    1426. -
    1427.  function _clearWhiteSpaces({
    1428. -
    1429.  
    1430. -
    1431.    while (current($this->tokens== ' '  ||
    1432. -
    1433.           current($this->tokens== "\n" ||
    1434. -
    1435.           current($this->tokens== "\t" ||
    1436. -
    1437.           current($this->tokens== "\r")
    1438. -
    1439.  
    1440. -
    1441.       unset($this->tokens[key($this->tokens)]);
    1442. -
    1443.  }
    1444. -
    1445.  
    1446. -
    1447.  
    1448. -
    1449. /**
    1450. -
    1451.  * Check if the query string of the given clause contains an undesired ','.
    1452. -
    1453.  * If a comma was correctly placed then remove it and clear all whitespaces.
    1454. -
    1455.  *
    1456. -
    1457.  * @param   string  $commaExpected 
    1458. -
    1459.  * @param   string  $clause_error 
    1460. -
    1461.  * @throws  PHPError
    1462. -
    1463.  * @access  private
    1464. -
    1465.  */
    1466. -
    1467.  function _checkComma($commaExpected$clause_error{
    1468. -
    1469.  
    1470. -
    1471.    $this->_clearWhiteSpaces();
    1472. -
    1473.    if (current($this->tokens== ','{
    1474. -
    1475.       if (!$commaExpected)
    1476. -
    1477.          trigger_error($clause_error ."',' - unexpected comma"E_USER_ERROR);
    1478. -
    1479.       else {
    1480. -
    1481.          unset($this->tokens[key($this->tokens)]);
    1482. -
    1483.          $this->_checkComma(FALSE$clause_error);
    1484. -
    1485.       }
    1486. -
    1487.    }
    1488. -
    1489.  }
    1490. -
    1491.  
    1492. -
    1493.  
    1494. -
    1495. /**
    1496. -
    1497.  * Check if the given token is either a variable (?var) or the first token of an URI (<URI>).
    1498. -
    1499.  * In case of an URI this function returns the whole URI string.
    1500. -
    1501.  *
    1502. -
    1503.  * @param   string  $token 
    1504. -
    1505.  * @return  array ['value'] = string
    1506. -
    1507.  * @throws  PHPError
    1508. -
    1509.  * @access    private
    1510. -
    1511.  */
    1512. -
    1513.  function _validateVarUri($token{
    1514. -
    1515.      
    1516. -
    1517.    if ($token{0== '?'{
    1518. -
    1519.       $token_res['value'$this->_validateVar($tokenRDQL_WHR_ERR);
    1520. -
    1521.    else {
    1522. -
    1523.          $token_res['value'$this->_validateUri($tokenRDQL_WHR_ERR);
    1524. -
    1525.          if ($token{0!= '<')
    1526. -
    1527.              $token_res['is_qname'TRUE;         
    1528. -
    1529.    }           
    1530. -
    1531.    return $token_res;
    1532. -
    1533.  }
    1534. -
    1535.  
    1536. -
    1537.  
    1538. -
    1539. /**
    1540. -
    1541.  * Check if the given token is either a variable (?var) or the first token
    1542. -
    1543.  * of either an URI (<URI>) or a literal ("Literal").
    1544. -
    1545.  * In case of a literal return an array with literal properties (value, language, datatype).
    1546. -
    1547.  * In case of a variable or an URI return only ['value'] = string.
    1548. -
    1549.  *
    1550. -
    1551.  * @param   string  $token 
    1552. -
    1553.  * @return  array ['value'] = string
    1554. -
    1555.  *                   ['is_qname'] = boolean
    1556. -
    1557.  *                 ['is_literal'] = boolean
    1558. -
    1559.  *                 ['l_lang'] = string
    1560. -
    1561.  *                 ['l_dtype'] = string
    1562. -
    1563.  * @throws  PHPError
    1564. -
    1565.  * @access    private
    1566. -
    1567.  */
    1568. -
    1569.  function _validateVarUriLiteral($token{
    1570. -
    1571.  
    1572. -
    1573.    if ($token{0== '?')
    1574. -
    1575.       $statement_object['value'$this->_validateVar($tokenRDQL_WHR_ERR);   
    1576. -
    1577.    elseif ($token{0== "'" || $token{0== '"')
    1578. -
    1579.       $statement_object $this->_validateLiteral($token);
    1580. -
    1581.    elseif ($token{0== '<')
    1582. -
    1583.       $statement_object['value'$this->_validateUri($tokenRDQL_WHR_ERR);      
    1584. -
    1585.    elseif (ereg(':'$token)) {
    1586. -
    1587.          $statement_object['value'$this->_validateUri($tokenRDQL_WHR_ERR);
    1588. -
    1589.          $statement_object['is_qname'TRUE;
    1590. -
    1591.    }else
    1592. -
    1593.          trigger_error(RDQL_WHR_ERR ." '$token' - ?Variable, &lt;URI&gt;, QNameor \"LITERAL\" expected"E_USER_ERROR);   
    1594. -
    1595.    return $statement_object;      
    1596. -
    1597.  }
    1598. -
    1599.  
    1600. -
    1601.  
    1602. -
    1603. /**
    1604. -
    1605.  * Check if the given token is a valid variable name (?var).
    1606. -
    1607.  *
    1608. -
    1609.  * @param   string  $token 
    1610. -
    1611.  * @param   string  $clause_error 
    1612. -
    1613.  * @return  string 
    1614. -
    1615.  * @throws  PHPError
    1616. -
    1617.  * @access    private
    1618. -
    1619.  */
    1620. -
    1621.  function _validateVar($token$clause_error{
    1622. -
    1623.  
    1624. -
    1625.    preg_match("/\?[a-zA-Z0-9_]+/"$token$match);
    1626. -
    1627.    if (!isset($match[0]|| $match[0!= $token)
    1628. -
    1629.       trigger_error($clause_error ."'" .htmlspecialchars($token)
    1630. -
    1631.                     ."' - variable name contains illegal characters"E_USER_ERROR);
    1632. -
    1633.    unset($this->tokens[key($this->tokens)]);
    1634. -
    1635.    return $token;
    1636. -
    1637.  }
    1638. -
    1639.  
    1640. -
    1641.  
    1642. -
    1643. /**
    1644. -
    1645.  * Check if $token is the first token of a valid URI (<URI>) and return the whole URI string
    1646. -
    1647.  *
    1648. -
    1649.  * @param   string  $token 
    1650. -
    1651.  * @param   string  $clause_error 
    1652. -
    1653.  * @return  string 
    1654. -
    1655.  * @throws  PHPError
    1656. -
    1657.  * @access    private
    1658. -
    1659.  */
    1660. -
    1661.  function _validateUri($token$clause_error{
    1662. -
    1663.  
    1664. -
    1665.    if ($token{0!= '<'{
    1666. -
    1667.       if (strpos($token':'&& $this->_validateQName($token$clause_error)) {
    1668. -
    1669.           unset($this->tokens[key($this->tokens)]);
    1670. -
    1671.           return rtrim($token':');
    1672. -
    1673.       }
    1674. -
    1675.       $errmsg $clause_error .'\'' .htmlspecialchars($token.'\' ';
    1676. -
    1677.       if ($clause_error == RDQL_WHR_ERR)
    1678. -
    1679.          $errmsg .= "- ?Variable or &lt;URI&gt; or QName expected";
    1680. -
    1681.       else
    1682. -
    1683.          $errmsg .= "- &lt;URI&gt; or QName expected";
    1684. -
    1685.       trigger_error($errmsgE_USER_ERROR);
    1686. -
    1687.    }else{
    1688. -
    1689.       $token_res $token;
    1690. -
    1691.       while($token{strlen($token)-1!= '>' && $token != NULL{
    1692. -
    1693.         if ($token == '(' || $token == ')' || $token == ',' ||
    1694. -
    1695.             $token == ' ' || $token == "\n" || $token == "\r"{
    1696. -
    1697.            trigger_error($clause_error .'\'' .htmlspecialchars($token_res)
    1698. -
    1699.                           ."' - illegal input: '$token' - '>' missing"E_USER_ERROR);
    1700. -
    1701.         }
    1702. -
    1703.         unset($this->tokens[key($this->tokens)]);
    1704. -
    1705.         $token current($this->tokens);
    1706. -
    1707.         $token_res .= $token;
    1708. -
    1709.       }
    1710. -
    1711.       if ($token == NULL)
    1712. -
    1713.          trigger_error($clause_error .'\'' .htmlspecialchars($token_res."' - '>' missing"E_USER_ERROR);
    1714. -
    1715.       unset($this->tokens[key($this->tokens)]);
    1716. -
    1717.       return trim($token_res'<>');
    1718. -
    1719.    }
    1720. -
    1721.  }
    1722. -
    1723.  
    1724. -
    1725.  
    1726. -
    1727. /**
    1728. -
    1729.  * Check if $token is the first token of a valid literal ("LITERAL") and
    1730. -
    1731.  * return an array with literal properties (value, language, datatype).
    1732. -
    1733.  *
    1734. -
    1735.  * @param   string  $token 
    1736. -
    1737.  * @return  array   ['value'] = string
    1738. -
    1739.  *                   ['is_literal'] = boolean
    1740. -
    1741.  *                   ['l_lang'] = string
    1742. -
    1743.  *                   ['l_dtype'] = string
    1744. -
    1745.  *                     ['l_dtype_is_qname'] = boolean
    1746. -
    1747.  * @throws  PHPError
    1748. -
    1749.  * @access    private
    1750. -
    1751.  */
    1752. -
    1753.  function _validateLiteral($token{
    1754. -
    1755.  
    1756. -
    1757.    $quotation_mark $token{0};
    1758. -
    1759.    $statement_object array ('value' => '',
    1760. -
    1761.                               'is_literal' => TRUE,
    1762. -
    1763.                               'l_lang' => '',
    1764. -
    1765.                               'l_dtype' => '');
    1766. -
    1767.    $this->tokens[key($this->tokens)substr($token,1);
    1768. -
    1769.  
    1770. -
    1771.    $return FALSE;
    1772. -
    1773.    foreach ($this->tokens as $k => $token{
    1774. -
    1775.  
    1776. -
    1777.      if ($token != NULL && $token{strlen($token)-1== $quotation_mark{
    1778. -
    1779.          $token rtrim($token$quotation_mark);
    1780. -
    1781.          $return TRUE;
    1782. -
    1783.  
    1784. -
    1785.       // parse @language(^^datatype)?
    1786. -
    1787.      }elseif (strpos($token$quotation_mark .'@'|| substr($token02)  == $quotation_mark .'@'{
    1788. -
    1789.         $lang substr($tokenstrpos($token$quotation_mark .'@')+2);
    1790. -
    1791.         if (strpos($lang'^^'|| substr($lang0,2== '^^'{
    1792. -
    1793.            $dtype substr($langstrpos($lang'^^')+2);
    1794. -
    1795.            if (!$dtype)
    1796. -
    1797.               trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1798. -
    1799.                                          .$token  ." - datatype expected" ,E_USER_ERROR);
    1800. -
    1801.                                          
    1802. -
    1803.            $statement_object['l_dtype'$this->_validateUri($dtypeRDQL_WHR_ERR);
    1804. -
    1805.            if ($dtype{0!= '<')
    1806. -
    1807.               $statement_object['l_dtype_is_qname'TRUE;              
    1808. -
    1809.         
    1810. -
    1811.            $lang substr($lang0strpos($lang'^^'));
    1812. -
    1813.         }
    1814. -
    1815.         if (!$lang)
    1816. -
    1817.            trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1818. -
    1819.                                       .$token ." - language expected" ,E_USER_ERROR);
    1820. -
    1821.         $statement_object['l_lang'$lang;
    1822. -
    1823.         $token substr($token0strpos($token$quotation_mark .'@'));
    1824. -
    1825.         $return TRUE;
    1826. -
    1827.  
    1828. -
    1829.      // parse ^^datatype
    1830. -
    1831.      }elseif (strpos($token$quotation_mark .'^^'|| substr($token03)  == $quotation_mark .'^^'{
    1832. -
    1833.         $dtype substr($tokenstrpos($token$quotation_mark .'^^')+3);
    1834. -
    1835.         if (!$dtype)
    1836. -
    1837.            trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1838. -
    1839.                                       .$token  ." - datatype expected" ,E_USER_ERROR);       
    1840. -
    1841.  
    1842. -
    1843.         $statement_object['l_dtype'$this->_validateUri($dtypeRDQL_WHR_ERR);
    1844. -
    1845.         if ($dtype{0!= '<')
    1846. -
    1847.            $statement_object['l_dtype_is_qname'TRUE;           
    1848. -
    1849.  
    1850. -
    1851.         $token substr($token0strpos($token$quotation_mark .'^^'));
    1852. -
    1853.         $return TRUE;
    1854. -
    1855.      }elseif (strpos($token$quotation_mark))
    1856. -
    1857.         trigger_error(RDQL_WHR_ERR ."'$token' - illegal input"E_USER_ERROR);
    1858. -
    1859.      $statement_object['value'.= $token;
    1860. -
    1861.      unset($this->tokens[$k]);
    1862. -
    1863.      if ($return)
    1864. -
    1865.         return $statement_object;
    1866. -
    1867.    }
    1868. -
    1869.    trigger_error(RDQL_WHR_ERR ."quotation end mark$quotation_mark missing"E_USER_ERROR);
    1870. -
    1871.  }
    1872. -
    1873.  
    1874. -
    1875.  
    1876. -
    1877. /**
    1878. -
    1879.  * Check if the given token is a valid QName.
    1880. -
    1881.  *
    1882. -
    1883.  * @param   string  $token 
    1884. -
    1885.  * @param   string  $clause_error 
    1886. -
    1887.  * @return  boolean 
    1888. -
    1889.  * @throws  PHPError
    1890. -
    1891.  * @access    private
    1892. -
    1893.  */
    1894. -
    1895. function _validateQName($token$clause_error{
    1896. -
    1897.  
    1898. -
    1899.   $parts explode(':'$token);
    1900. -
    1901.   if (count($parts2)
    1902. -
    1903.       trigger_error($clause_error ."illegal QName: '$token'"E_USER_ERROR);
    1904. -
    1905.   if (!$this->_validateNCName($parts[0]))
    1906. -
    1907.       trigger_error($clause_error ."illegal prefix in QName: '$token'"E_USER_ERROR);
    1908. -
    1909.   if ($parts[1&& !$this->_validateNCName($parts[1]))
    1910. -
    1911.       trigger_error($clause_error ."illegal local part in QName: '$token'"E_USER_ERROR);
    1912. -
    1913.       
    1914. -
    1915.   return TRUE;
    1916. -
    1917. }
    1918. -
    1919.  
    1920. -
    1921.  
    1922. -
    1923. /**
    1924. -
    1925.  * Check if the given token is a valid NCName.
    1926. -
    1927.  *
    1928. -
    1929.  * @param   string  $token 
    1930. -
    1931.  * @return  boolean 
    1932. -
    1933.  * @access    private
    1934. -
    1935.  */ 
    1936. -
    1937. function _validateNCName($token{
    1938. -
    1939.     
    1940. -
    1941.   preg_match("/[a-zA-Z_]+[a-zA-Z_0-9.\-]*/"$token$match);
    1942. -
    1943.   if (isset($match[0]&& $match[0== $token)
    1944. -
    1945.       return TRUE;
    1946. -
    1947.   return FALSE;    
    1948. -
    1949. }
    1950. -
    1951.  
    1952. -
    1953.  
    1954. -
    1955. /**
    1956. -
    1957.  * Check if the given token is a valid namespace prefix.
    1958. -
    1959.  *
    1960. -
    1961.  * @param   string  $token 
    1962. -
    1963.  * @return  string 
    1964. -
    1965.  * @throws  PHPError
    1966. -
    1967.  * @access    private
    1968. -
    1969.  */
    1970. -
    1971.  function _validatePrefix($token{
    1972. -
    1973.  
    1974. -
    1975.    if (!$this->_validateNCName($token))
    1976. -
    1977.       trigger_error(RDQL_USG_ERR ."'" .htmlspecialchars($token)
    1978. -
    1979.                                  ."' - illegal input, namespace prefix expected"E_USER_ERROR);
    1980. -
    1981.    unset($this->tokens[key($this->tokens)]);
    1982. -
    1983.    return $token;
    1984. -
    1985.  }
    1986. -
    1987.  
    1988. -
    1989. /**
    1990. -
    1991.  * Replace a prefix in a given QName and return a full URI.
    1992. -
    1993.  *
    1994. -
    1995.  * @param   string  $qName 
    1996. -
    1997.  * @param   string  $clasue_error 
    1998. -
    1999.  * @return  string 
    2000. -
    2001.  * @throws  PHPError
    2002. -
    2003.  * @access    private
    2004. -
    2005.  */ 
    2006. -
    2007.  function _replaceNamespacePrefix($qName$clause_error{
    2008. -
    2009.  
    2010. -
    2011.    $qName_parts explode(':'$qName);
    2012. -
    2013.    if (!array_key_exists($qName_parts[0]$this->parsedQuery['ns']))
    2014. -
    2015.       trigger_error($clause_error .'undefined prefix: \'' .$qName_parts[0.'\' in: \'' .$qName .'\''E_USER_ERROR);
    2016. -
    2017.    return $this->parsedQuery['ns'][$qName_parts[0]] .$qName_parts[1];
    2018. -
    2019.  
    2020. -
    2021.                    
    2022. -
    2023.                    
    2024. -
    2025. /**
    2026. -
    2027.  * Check if all variables from the SELECT clause are defined in the WHERE clause
    2028. -
    2029.  *
    2030. -
    2031.  * @access private
    2032. -
    2033.  */
    2034. -
    2035.  function _checkSelectVars({
    2036. -
    2037.  
    2038. -
    2039.    foreach ($this->parsedQuery['selectVars'as $var)
    2040. -
    2041.      $this->_isDefined($var);
    2042. -
    2043.  }
    2044. -
    2045.  
    2046. -
    2047.  
    2048. -
    2049. /**
    2050. -
    2051.  * Check if the given variable is defined in the WHERE clause.
    2052. -
    2053.  *
    2054. -
    2055.  * @param $var string
    2056. -
    2057.  * @return     string 
    2058. -
    2059.  * @throws PHPError
    2060. -
    2061.  * @access private
    2062. -
    2063.  */
    2064. -
    2065.  function _isDefined($var{
    2066. -
    2067.  
    2068. -
    2069.    $allQueryVars $this->findAllQueryVariables();
    2070. -
    2071.  
    2072. -
    2073.    if (!in_array($var$allQueryVars))
    2074. -
    2075.       trigger_error(RDQL_SYN_ERR .": '$var' - variable must be defined in the WHERE clause"E_USER_ERROR);
    2076. -
    2077.    return $var;
    2078. -
    2079.  }
    2080. -
    2081.  
    2082. -
    2083.  
    2084. -
    2085. /**
    2086. -
    2087.  * Throw an error if the regular expression from the AND clause is not quoted.
    2088. -
    2089.  *
    2090. -
    2091.  * @param  string $filterString 
    2092. -
    2093.  * @param  string $lQuotMark 
    2094. -
    2095.  * @param  string $rQuotMark 
    2096. -
    2097.  * @throws PHPError
    2098. -
    2099.  * @access private
    2100. -
    2101.  */
    2102. -
    2103.  function _checkRegExQuotation($filterString$lQuotMark$rQuotMark{
    2104. -
    2105.  
    2106. -
    2107.    if (!$lQuotMark)
    2108. -
    2109.       trigger_error(RDQL_AND_ERR ."'$filterString' - regular expressions must be quoted"E_USER_ERROR);
    2110. -
    2111.  
    2112. -
    2113.    if ($lQuotMark != $rQuotMark)
    2114. -
    2115.       trigger_error(RDQL_AND_ERR ."'$filterString' - quotation end mark in the regular expression missing"E_USER_ERROR);
    2116. -
    2117.  }
    2118. -
    2119.  
    2120. -
    2121. // end: Class RdqlParser
    2122. -
    2123.  
    2124. -
    2125. ?>
    2126. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base deleted file mode 100755 index 8efc0f53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_rdql__rdqlRdqlResultIterator.php.html.svn-base +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - File Source for RdqlResultIterator.php - - - - - -

    Source for file RdqlResultIterator.php

    -

    Documentation is available at RdqlResultIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlResultIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing Rdql results.
    16. -
    17.  * This class can be used for iterating forward and backward trough Rdql results.
    18. -
    19.  * It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id$
    24. -
    25.  * @author Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
    26. -
    27.  *
    28. -
    29.  * @package rdql
    30. -
    31.  * @access    public
    32. -
    33.  *
    34. -
    35.  */ 
    36. -
    37.  class RdqlResultIterator extends Object {
    38. -
    39.  
    40. -
    41.      /**
    42. -
    43.     * Reference to the Rdql result
    44. -
    45.     * @var        array RdqlResult
    46. -
    47.     * @access    private
    48. -
    49.     */    
    50. -
    51.     var $RdqlResult;
    52. -
    53.  
    54. -
    55.      /**
    56. -
    57.     * Current position
    58. -
    59.     * RdqlResultIterator does not use the build in PHP array iterator,
    60. -
    61.     * so you can use serveral iterators on a single Rdql result.
    62. -
    63.     * @var        integer 
    64. -
    65.     * @access    private
    66. -
    67.     */    
    68. -
    69.     var $position;
    70. -
    71.    
    72. -
    73.   
    74. -
    75.    /**
    76. -
    77.     * Constructor
    78. -
    79.     *
    80. -
    81.     * @param    object RdqlResult 
    82. -
    83.     * @access    public
    84. -
    85.     */
    86. -
    87.     function RdqlResultIterator(&$RdqlResult{
    88. -
    89.         
    90. -
    91.          $noResult TRUE;
    92. -
    93.         foreach($RdqlResult[0as $value
    94. -
    95.               if ($value != NULL{
    96. -
    97.                      $noResult FALSE;
    98. -
    99.                      break;
    100. -
    101.               }     
    102. -
    103.               
    104. -
    105.           if($noResult)               
    106. -
    107.                $this->RdqlResult NULL;
    108. -
    109.            else 
    110. -
    111.                $this->RdqlResult $RdqlResult;    
    112. -
    113.  
    114. -
    115.         $this->position = -1;
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.   /**
    122. -
    123.    * Returns the labels of the result as array.
    124. -
    125.    * @return    array of strings with the result labels OR null if there are no results.
    126. -
    127.    * @access    public
    128. -
    129.    */
    130. -
    131.   function getResultLabels({
    132. -
    133.         if(count($this->RdqlResult)>0{
    134. -
    135.               return array_keys($this->RdqlResult[0]);
    136. -
    137.         else return null;
    138. -
    139.    }
    140. -
    141.  
    142. -
    143.    /**
    144. -
    145.    * Returns the number of results.
    146. -
    147.    * @return    integer 
    148. -
    149.    * @access    public
    150. -
    151.    */
    152. -
    153.   function countResults({
    154. -
    155.         
    156. -
    157.               return count($this->RdqlResult);
    158. -
    159.  
    160. -
    161.    }
    162. -
    163.   /**
    164. -
    165.    * Returns TRUE if there are more results.
    166. -
    167.    * @return    boolean 
    168. -
    169.    * @access    public
    170. -
    171.    */
    172. -
    173.   function hasNext({
    174. -
    175.           if ($this->position count($this->RdqlResult{            
    176. -
    177.               return TRUE;
    178. -
    179.         else {
    180. -
    181.             return FALSE;
    182. -
    183.         }
    184. -
    185.    }
    186. -
    187.  
    188. -
    189.   /**
    190. -
    191.    * Returns TRUE if the first result has not been reached.
    192. -
    193.    * @return    boolean 
    194. -
    195.    * @access    public
    196. -
    197.    */
    198. -
    199.   function hasPrevious({
    200. -
    201.           if ($this->position 0{
    202. -
    203.             return TRUE;
    204. -
    205.         else {
    206. -
    207.             return FALSE;
    208. -
    209.         }   }   
    210. -
    211.    
    212. -
    213.   /**
    214. -
    215.    * Returns the next result array.
    216. -
    217.    * @param     integer $element 
    218. -
    219.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    220. -
    221.    * @access    public
    222. -
    223.    */
    224. -
    225.   function next($element null{
    226. -
    227.           if ($this->position count($this->RdqlResult1{
    228. -
    229.               $this->position++;
    230. -
    231.             if ($element{return $this->RdqlResult[$this->position][$element];}
    232. -
    233.                   else return $this->RdqlResult[$this->position];
    234. -
    235.         else {
    236. -
    237.             return NULL;
    238. -
    239.         }
    240. -
    241.    }
    242. -
    243.  
    244. -
    245.   /**
    246. -
    247.    * Returns the previous result.
    248. -
    249.    * @param     integer $element 
    250. -
    251.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    252. -
    253.    * @access    public
    254. -
    255.    */
    256. -
    257.   function previous($element null{
    258. -
    259.         if ($this->position 0{
    260. -
    261.               $this->position--;
    262. -
    263.             if ($element{return $this->RdqlResult[$this->position][$element];}
    264. -
    265.                   else return $this->RdqlResult[$this->position];
    266. -
    267.         else {
    268. -
    269.             return NULL;
    270. -
    271.         }   
    272. -
    273.   }
    274. -
    275.  
    276. -
    277.   /**
    278. -
    279.    * Returns the current result.
    280. -
    281.    * @param     integer $element 
    282. -
    283.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    284. -
    285.    * @access    public
    286. -
    287.    */
    288. -
    289.   function current($element null{
    290. -
    291.           if (($this->position >= 0&& ($this->position count($this->RdqlResult))) {
    292. -
    293.             if ($element{return $this->RdqlResult[$this->position][$element];}
    294. -
    295.                   else return $this->RdqlResult[$this->position];
    296. -
    297.         else {
    298. -
    299.             return NULL;
    300. -
    301.         
    302. -
    303.    }
    304. -
    305.    
    306. -
    307.   /**
    308. -
    309.    * Moves the pointer to the first result.
    310. -
    311.    * @return    void 
    312. -
    313.    * @access    public
    314. -
    315.    */
    316. -
    317.   function moveFirst({
    318. -
    319.               $this->position 0;
    320. -
    321.    }
    322. -
    323.  
    324. -
    325.   /**
    326. -
    327.    * Moves the pointer to the last result.
    328. -
    329.    * @return    void 
    330. -
    331.    * @access    public
    332. -
    333.    */
    334. -
    335.   function moveLast({
    336. -
    337.               $this->position count($this->RdqlResult1;
    338. -
    339.    }
    340. -
    341.    
    342. -
    343.      /**
    344. -
    345.    * Moves the pointer to a specific result.
    346. -
    347.    * If you set an off-bounds value, next(), previous() and current() will return NULL
    348. -
    349.    * @return    void 
    350. -
    351.    * @access    public
    352. -
    353.    */
    354. -
    355.   function moveTo($position{
    356. -
    357.               $this->position $position;
    358. -
    359.    }
    360. -
    361.    
    362. -
    363.      /**
    364. -
    365.    * Returns the current position of the iterator.
    366. -
    367.    * @return    integer 
    368. -
    369.    * @access    public
    370. -
    371.    */
    372. -
    373.   function getCurrentPosition({
    374. -
    375.                return $this->position;
    376. -
    377.    }
    378. -
    379.   
    380. -
    381. -
    382.  
    383. -
    384. ?>
    385. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResAlt.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResAlt.php.html.svn-base deleted file mode 100755 index 1ff17831..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResAlt.php.html.svn-base +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - File Source for ResAlt.php - - - - - -

    Source for file ResAlt.php

    -

    Documentation is available at ResAlt.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResAlt
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Alternative resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResAlt extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */    
    50. -
    51.     function ResAlt($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_ALT);
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     *  Return the default value for this resource
    66. -
    67.     *
    68. -
    69.        * @return    object ResResource/ResLiteral 
    70. -
    71.        * @access    public
    72. -
    73.        */
    74. -
    75.     function getDefault()
    76. -
    77.     {
    78. -
    79.         //get the first memeber
    80. -
    81.         $statements=$this->listProperties($this->_getMembershipPropertyWithIndex(1));
    82. -
    83.         if(isset($statements[0]))
    84. -
    85.         {
    86. -
    87.             //return the value
    88. -
    89.             return $statements[0]->getObject();
    90. -
    91.         else 
    92. -
    93.         {
    94. -
    95.             return null;
    96. -
    97.         }
    98. -
    99.     }
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     *  Set the default value of this container.
    106. -
    107.     *
    108. -
    109.        * @param    object ResResource/ResLiteral $object 
    110. -
    111.        * @access    public
    112. -
    113.        */
    114. -
    115.     function setDefault($object)
    116. -
    117.     {
    118. -
    119.         //remember the old default value
    120. -
    121.         $oldDefaultObject=$this->getDefault();
    122. -
    123.         //if there wasn't a default value before
    124. -
    125.         if($oldDefaultObject === null)
    126. -
    127.         {
    128. -
    129.             //add the new value
    130. -
    131.             $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
    132. -
    133.         else 
    134. -
    135.         {
    136. -
    137.             //remove the old value
    138. -
    139.             $this->removeAll($this->_getMembershipPropertyWithIndex(1));
    140. -
    141.             //set the new value
    142. -
    143.             $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
    144. -
    145.             //add the old default value at the end
    146. -
    147.             $this->add($oldDefaultObject);
    148. -
    149.         }
    150. -
    151.     }
    152. -
    153. }
    154. -
    155. ?>
    156. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResBag.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResBag.php.html.svn-base deleted file mode 100755 index 90325ae8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResBag.php.html.svn-base +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for ResBag.php - - - - - -

    Source for file ResBag.php

    -

    Documentation is available at ResBag.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResBag
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Bag resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResBag extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */        
    50. -
    51.     function ResBag($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_BAG);
    58. -
    59.     }
    60. -
    61. }
    62. -
    63. ?>
    64. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResContainer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResContainer.php.html.svn-base deleted file mode 100755 index 0aba8644..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResContainer.php.html.svn-base +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - File Source for ResContainer.php - - - - - -

    Source for file ResContainer.php

    -

    Documentation is available at ResContainer.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResContainer
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF Container.
    14. -
    15. * This Class defines methods for accessing RDF container resources.
    16. -
    17. * These methods operate on the RDF statements contained in a model.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. @package     resModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33.  
    34. -
    35. class ResContainer extends ResResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Holds a ResResource of this container type rdf:Seq, rdf:Alt, or rdf:Bag
    42. -
    43.     * @var        ResResource 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $containerType;
    50. -
    51.     
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Constructor
    58. -
    59.     * You can supply a URI
    60. -
    61.     *
    62. -
    63.     * @param string $uri 
    64. -
    65.     * @access    public
    66. -
    67.     */    
    68. -
    69.     function ResContainer($uri null)
    70. -
    71.     {
    72. -
    73.         parent::ResResource($uri);
    74. -
    75.     }    
    76. -
    77.     
    78. -
    79.     /**
    80. -
    81.     * Add a new value to a container.
    82. -
    83.     * The new value is added as the last element of the container.
    84. -
    85.     *
    86. -
    87.        * @param    object ResResource/ResLiteral    $object 
    88. -
    89.        * @access    public
    90. -
    91.        */
    92. -
    93.     function add($object)
    94. -
    95.     {
    96. -
    97.         //type this container, if it isn't already typed
    98. -
    99.         if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
    100. -
    101.             $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
    102. -
    103.         //get the current size
    104. -
    105.         $actualSize=$this->size();
    106. -
    107.         //add the object to the last position
    108. -
    109.         $this->addProperty(new ResResource(RDF_NAMESPACE_URI.'_'.($actualSize+1)),$object);
    110. -
    111.     }
    112. -
    113.     
    114. -
    115.     /**
    116. -
    117.     * Determine whether the container contains a value
    118. -
    119.     *
    120. -
    121.        * @param    obejct ResResource/ResLiteral    $resResource
    122. -
    123.        * @return    boolean 
    124. -
    125.        * @access    public
    126. -
    127.        */
    128. -
    129.     function contains($resResource)
    130. -
    131.     {
    132. -
    133.         //get all container's properties 
    134. -
    135.         foreach ($this->listProperties(as $statement)
    136. -
    137.         {
    138. -
    139.             //if the property matches a container membership property
    140. -
    141.             if ($this->_predicateLabelMatchesMembershipProperty($statement->getLabelPredicate()))
    142. -
    143.             {
    144. -
    145.                 //check, if it's the value, we're looking for. 
    146. -
    147.                 if ($resResource->equals($statement->getObject()))
    148. -
    149.                     return true;
    150. -
    151.             }    
    152. -
    153.         }
    154. -
    155.         return false;
    156. -
    157.     }
    158. -
    159.     
    160. -
    161.     /**
    162. -
    163.     * Returns true, if this resource is a container from type rdf:Alt
    164. -
    165.     *
    166. -
    167.        * @return    boolean 
    168. -
    169.        * @access    public
    170. -
    171.        */    
    172. -
    173.     function isAlt()
    174. -
    175.     {
    176. -
    177.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_ALT);
    178. -
    179.     }
    180. -
    181.     
    182. -
    183.     /**
    184. -
    185.     * Returns true, if this resource is a container from type rdf:Bag
    186. -
    187.     *
    188. -
    189.        * @return    boolean 
    190. -
    191.        * @access    public
    192. -
    193.        */    
    194. -
    195.     function isBag()
    196. -
    197.     {
    198. -
    199.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_BAG);
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     /**
    206. -
    207.     * Returns true, if this resource is a container from type rdf:Seq
    208. -
    209.     *
    210. -
    211.        * @return    boolean 
    212. -
    213.        * @access    public
    214. -
    215.        */    
    216. -
    217.     function isSeq()
    218. -
    219.     {
    220. -
    221.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_SEQ);
    222. -
    223.     }
    224. -
    225.     
    226. -
    227.     /**
    228. -
    229.     * Get an array of all resources that are values of this container
    230. -
    231.     *
    232. -
    233.        * @return    array 
    234. -
    235.        * @access    public
    236. -
    237.        */    
    238. -
    239.     function getMembers()
    240. -
    241.     {
    242. -
    243.         $return=array();
    244. -
    245.         foreach ($this->listProperties(as $statement)
    246. -
    247.         {
    248. -
    249.             $predicateLabel=$statement->getLabelPredicate();
    250. -
    251.             if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
    252. -
    253.             {
    254. -
    255.                 $return[$this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)$statement->getObject();
    256. -
    257.             }    
    258. -
    259.         }
    260. -
    261.         return $return;
    262. -
    263.     }
    264. -
    265.     
    266. -
    267.     /**
    268. -
    269.     * Remove a value from the container.
    270. -
    271.     * 
    272. -
    273.     * Once removed, the values in the container with a higher ordinal value are renumbered.
    274. -
    275.     * The renumbering algorithm depends on the type of container.
    276. -
    277.     *
    278. -
    279.        * @param    obejct ResResource/ResLiteral    $resResource
    280. -
    281.        * @access    public
    282. -
    283.        */
    284. -
    285.     function remove($object)
    286. -
    287.     {
    288. -
    289.         $deleteFromIndex=array();
    290. -
    291.         //get all container members
    292. -
    293.         $memberIndex=$this->getMembers();
    294. -
    295.         
    296. -
    297.         //check each container member if it equals the resoure to be removed
    298. -
    299.         foreach ($memberIndex as $key => $value)
    300. -
    301.         {
    302. -
    303.             //save the statements positio in the container
    304. -
    305.             if($object->equals($value))
    306. -
    307.                     $deleteFromIndex[]=$key;    
    308. -
    309.         }
    310. -
    311.  
    312. -
    313.         //delete all found container members
    314. -
    315.         foreach ($deleteFromIndex as $index)
    316. -
    317.         {
    318. -
    319.             $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    320. -
    321.  
    322. -
    323.             //renumber all members with higher ordinal numbers than the deleted one
    324. -
    325.             for ($i $index;$i count($memberIndex)$i++)
    326. -
    327.             {
    328. -
    329.                 $this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
    330. -
    331.                 $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
    332. -
    333.             }        
    334. -
    335.         }
    336. -
    337.         
    338. -
    339.     }
    340. -
    341.     
    342. -
    343.     /**
    344. -
    345.     * Returns the number values in the container.
    346. -
    347.     *
    348. -
    349.        * @return    integer 
    350. -
    351.        * @access    public
    352. -
    353.        */    
    354. -
    355.     function size()
    356. -
    357.     {
    358. -
    359.         return count($this->getMembers());
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Checks, if a predicate label fits a container membership property rdf:_n
    368. -
    369.     *
    370. -
    371.        * @param    string    $predicateLabel 
    372. -
    373.        * @return    boolean 
    374. -
    375.        * @access    private
    376. -
    377.        */
    378. -
    379.     function _predicateLabelMatchesMembershipProperty($predicateLabel)
    380. -
    381.     {
    382. -
    383.         return substr($predicateLabel,0,strlen(RDF_NAMESPACE_URI.'_')) == RDF_NAMESPACE_URI.'_';
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Get the ordinal number from a membership property rdf:_n
    392. -
    393.     *
    394. -
    395.        * @param    string    $predicateLabel 
    396. -
    397.        * @return    integer 
    398. -
    399.        * @access    private
    400. -
    401.        */
    402. -
    403.     function _getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)
    404. -
    405.     {
    406. -
    407.         return (int)substr($predicateLabel,strlen(RDF_NAMESPACE_URI.'_'));
    408. -
    409.     }
    410. -
    411.     
    412. -
    413.     /**
    414. -
    415.     * Get a membership property rdf:_n with index $int
    416. -
    417.     *
    418. -
    419.        * @param    intger    $int 
    420. -
    421.        * @return    string 
    422. -
    423.        * @access    private
    424. -
    425.        */
    426. -
    427.     function _getMembershipPropertyWithIndex($int)
    428. -
    429.     {
    430. -
    431.         return new ResResource(RDF_NAMESPACE_URI.'_'.$int);    
    432. -
    433.     }
    434. -
    435. }
    436. -
    437. ?>
    438. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResIterator.php.html.svn-base deleted file mode 100755 index 40e23c98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResIterator.php.html.svn-base +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - File Source for ResIterator.php - - - - - -

    Source for file ResIterator.php

    -

    Documentation is available at ResIterator.php

    -
    -
    1. <?php 
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * Class: ResIterator
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. *
    12. -
    13. @package     resModel
    14. -
    15. */
    16. -
    17.  
    18. -
    19.  
    20. -
    21. /**
    22. -
    23. * Implementation of a resource iterator.
    24. -
    25. *
    26. -
    27. * This Iterator should be used in a for-loop like:
    28. -
    29. * $it = $ontClass->listInstances();
    30. -
    31. * for ($it->rewind(); $it->valid(); $it->next())
    32. -
    33. * {
    34. -
    35. *    $currentResource=$it->current();
    36. -
    37. * };
    38. -
    39. *
    40. -
    41. *
    42. -
    43. @version  $Id$
    44. -
    45. @author Daniel Westphal <mail at d-westphal dot de>
    46. -
    47. *
    48. -
    49. *
    50. -
    51. @package     resModel
    52. -
    53. @access    public
    54. -
    55. ***/
    56. -
    57. -
    58. {
    59. -
    60.     /**
    61. -
    62.     * Holds a reference to the assoiated ResModel / OntModel
    63. -
    64.     * @var        object Model 
    65. -
    66.     * @access    private
    67. -
    68.     */
    69. -
    70.     var $associatedModel;
    71. -
    72.     
    73. -
    74.     /**
    75. -
    76.     * The current position
    77. -
    78.     * @var        integer 
    79. -
    80.     * @access    private
    81. -
    82.     */
    83. -
    84.     var $key;
    85. -
    86.     
    87. -
    88.     /**
    89. -
    90.     * If the current resource is valid
    91. -
    92.     * @var        boolean 
    93. -
    94.     * @access    private
    95. -
    96.     */
    97. -
    98.     var $valid;
    99. -
    100.     
    101. -
    102.     /**
    103. -
    104.     * The current resource
    105. -
    106.     * @var obejct ResResource
    107. -
    108.     * @access    private
    109. -
    110.     */
    111. -
    112.     var $currentResource;
    113. -
    114.     
    115. -
    116.     /**
    117. -
    118.     * The subject to search for.
    119. -
    120.     * @var        object ResResource 
    121. -
    122.     * @access    private
    123. -
    124.     */
    125. -
    126.     var $searchSubject;
    127. -
    128.     
    129. -
    130.     /**
    131. -
    132.     * The predicate to search for.
    133. -
    134.     * @var        object ResResource 
    135. -
    136.     * @access    private
    137. -
    138.     */
    139. -
    140.     var $searchPredicate;
    141. -
    142.     
    143. -
    144.     /**
    145. -
    146.     * The object to search for.
    147. -
    148.     * @var        object ResResource 
    149. -
    150.     * @access    private
    151. -
    152.     */
    153. -
    154.     var $searchObject;
    155. -
    156.     
    157. -
    158.     /**
    159. -
    160.     * If the resource, we're intrested in is the subject (s), predicate(p),
    161. -
    162.     * or object (o) of the found statements
    163. -
    164.     * 
    165. -
    166.     * @var        string 
    167. -
    168.     * @access    private
    169. -
    170.     */
    171. -
    172.     var $getSPO;
    173. -
    174.     
    175. -
    176.     /**
    177. -
    178.     * Defines the type of resource, we'd like to receive.
    179. -
    180.     * 
    181. -
    182.     * @var        string 
    183. -
    184.     * @access    private
    185. -
    186.     */
    187. -
    188.     var $returnType;
    189. -
    190.     
    191. -
    192.     /**
    193. -
    194.     * If set, each resource will first be checked, if it's
    195. -
    196.     * language fits.
    197. -
    198.     * 
    199. -
    200.     * @var        string 
    201. -
    202.     * @access    private
    203. -
    204.     */
    205. -
    206.     var $findLiteralWithLang;
    207. -
    208.     
    209. -
    210.     
    211. -
    212.     /**
    213. -
    214.     * Constructor.
    215. -
    216.     *
    217. -
    218.     * $subject, $predicate, and $object are used like inf find().
    219. -
    220.     * $getSPO supports the strings 's', 'p', and 'o' to return
    221. -
    222.     * either the subject, predicate, or object of the result statements.
    223. -
    224.     * $returnType supports the strings 'ResProperty', 'ResLiteral',
    225. -
    226.     * 'OntProperty', 'OntClass', and 'Individual' and returns the resources
    227. -
    228.     * as the matching type.
    229. -
    230.     *
    231. -
    232.     * @param object ResResource  $subject 
    233. -
    234.     * @param object ResResource  $predicate 
    235. -
    236.     * @param object ResResource  $object 
    237. -
    238.     * @param string                 $getSPO 
    239. -
    240.     * @param object ResModel     $associatedModel 
    241. -
    242.     * @param string                 $returnType 
    243. -
    244.     * @access    public
    245. -
    246.     */
    247. -
    248.     function ResIterator($subject,$predicate,$object,$getSPO,$associatedModel,$returnType false)
    249. -
    250.     {
    251. -
    252.         $this->searchSubject =$subject;
    253. -
    254.         $this->searchPredicate =$predicate;
    255. -
    256.         $this->searchObject =$object;
    257. -
    258.         $this->getSPO $getSPO;
    259. -
    260.         $this->returnType $returnType;
    261. -
    262.         $this->associatedModel =$associatedModel;
    263. -
    264.         $this->findLiteralWithLang false;
    265. -
    266.     }
    267. -
    268.     
    269. -
    270.     /**
    271. -
    272.     * Resets iterator list to start
    273. -
    274.     *
    275. -
    276.     * @access    public
    277. -
    278.     */
    279. -
    280.     function rewind()
    281. -
    282.     {
    283. -
    284.         $this->key = -1;
    285. -
    286.         $this->next();
    287. -
    288.     }
    289. -
    290.     
    291. -
    292.     /**
    293. -
    294.     * Says if there are additional items left in the list
    295. -
    296.     *
    297. -
    298.     * @return    boolean 
    299. -
    300.     * @access    public
    301. -
    302.     */
    303. -
    304.     function valid()
    305. -
    306.     {
    307. -
    308.         return $this->valid;
    309. -
    310.     }
    311. -
    312.     
    313. -
    314.     /**
    315. -
    316.     * Moves Iterator to the next item in the list
    317. -
    318.     *
    319. -
    320.     * @access    public
    321. -
    322.     */
    323. -
    324.     function next()
    325. -
    326.     {
    327. -
    328.         $this->key++;
    329. -
    330.         $this->valid=($this->_getNextResource());
    331. -
    332.     }
    333. -
    334.     
    335. -
    336.     /**
    337. -
    338.     * Returns the current item
    339. -
    340.     *
    341. -
    342.     * @return    mixed 
    343. -
    344.     * @access    public
    345. -
    346.     */
    347. -
    348.     function current()
    349. -
    350.     {
    351. -
    352.         return $this->currentResource;
    353. -
    354.     }
    355. -
    356.     
    357. -
    358.     /**
    359. -
    360.     * Returns the next Resource (subject, predicate,
    361. -
    362.     * or object of the next matching statement).
    363. -
    364.     *
    365. -
    366.     * @return    object resResource 
    367. -
    368.     * @access    private
    369. -
    370.     */
    371. -
    372.     function _getNextResource()
    373. -
    374.     {
    375. -
    376.         if ($this->findLiteralWithLang)
    377. -
    378.         
    379. -
    380.             do 
    381. -
    382.             {
    383. -
    384.                 $nextStatement $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
    385. -
    386.                 if ($nextStatement === null)
    387. -
    388.                     return false;
    389. -
    390.                     
    391. -
    392.                 $object $nextStatement->getObject();
    393. -
    394.                 if ($object->getLanguage(!= $this->findLiteralWithLang)
    395. -
    396.                 {
    397. -
    398.                     $hasCorrectLanguage=false;
    399. -
    400.                     $this->key++;
    401. -
    402.                 else 
    403. -
    404.                 {
    405. -
    406.                     $hasCorrectLanguage=true;
    407. -
    408.                 }
    409. -
    410.                     
    411. -
    412.             while (!$hasCorrectLanguage);
    413. -
    414.         else 
    415. -
    416.         {
    417. -
    418.             $nextStatement $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
    419. -
    420.         }
    421. -
    422.         if ($nextStatement === null)
    423. -
    424.             return false;
    425. -
    426.         
    427. -
    428.         switch ($this->getSPO
    429. -
    430.         {
    431. -
    432.             case 's':
    433. -
    434.                  $this->currentResource $this->_getResourceAs($nextStatement->getSubject());
    435. -
    436.                 break;
    437. -
    438.  
    439. -
    440.             case 'p':
    441. -
    442.                  $this->currentResource $this->_getResourceAs($nextStatement->getPredicate());
    443. -
    444.                 break;
    445. -
    446.                 
    447. -
    448.             case 'o':
    449. -
    450.                  $this->currentResource $this->_getResourceAs($nextStatement->getObject());
    451. -
    452.                 break;
    453. -
    454.         }
    455. -
    456.         return (true);
    457. -
    458.     }
    459. -
    460.     
    461. -
    462.     /**
    463. -
    464.     * Returns the key of the current item
    465. -
    466.     *
    467. -
    468.     * @return    integer 
    469. -
    470.     * @access    public
    471. -
    472.     */
    473. -
    474.     function key()
    475. -
    476.     {
    477. -
    478.         return $this->key;
    479. -
    480.     }
    481. -
    482.     
    483. -
    484.     /**
    485. -
    486.     * Sets that only Literals with the matching
    487. -
    488.     * language should be returned
    489. -
    490.     *
    491. -
    492.     * @param    string 
    493. -
    494.     * @access    public
    495. -
    496.     */
    497. -
    498.     function setFindLiteralWithLang($language)
    499. -
    500.     {
    501. -
    502.         $this->findLiteralWithLang $language;
    503. -
    504.     }
    505. -
    506.     
    507. -
    508.     /**
    509. -
    510.     * Returns the $resource as an instance of the type
    511. -
    512.     * specified in $this->returnType.
    513. -
    514.     *
    515. -
    516.     * @param    object ResResource 
    517. -
    518.     * @return    object ResResource 
    519. -
    520.     * @access    private
    521. -
    522.     */
    523. -
    524.     function _getResourceAs($resource)
    525. -
    526.     {
    527. -
    528.         if ($this->findLiteralWithLang && $resource->getLanguage(!= $this->findLiteralWithLang)
    529. -
    530.             $this->_getNextResource();
    531. -
    532.  
    533. -
    534.         if($this->returnType)    
    535. -
    536.             switch ($this->returnType{
    537. -
    538.         
    539. -
    540.                 case 'ResProperty':
    541. -
    542.                         return $this->associatedModel->createProperty($resource->getLabel());
    543. -
    544.                     break;
    545. -
    546.                     
    547. -
    548.                 case 'ResLiteral':
    549. -
    550.                         $newLiteral $this->associatedModel->createLiteral($resource->getLabel(),$resource->getLanguage());
    551. -
    552.                         $newLiteral->setDatatype($resource->getDatatype());
    553. -
    554.                         return $newLiteral;
    555. -
    556.                     break;
    557. -
    558.                     
    559. -
    560.                 case 'OntProperty':
    561. -
    562.                         return $this->associatedModel->createOntProperty($resource->getLabel());
    563. -
    564.                     break;
    565. -
    566.                     
    567. -
    568.                 case 'OntClass':
    569. -
    570.                         return $this->associatedModel->createOntClass($resource->getLabel());
    571. -
    572.                     break;
    573. -
    574.                     
    575. -
    576.                 case 'Individual':
    577. -
    578.                     return $this->associatedModel->createIndividual($resource->getLabel());
    579. -
    580.                 break;
    581. -
    582.             }
    583. -
    584.         return $resource;
    585. -
    586.     }
    587. -
    588. }
    589. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResList.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResList.php.html.svn-base deleted file mode 100755 index a30703c3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResList.php.html.svn-base +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - File Source for ResList.php - - - - - -

    Source for file ResList.php

    -

    Documentation is available at ResList.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResList
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Implementation of an rdf:Collection (rdf:List)
    14. -
    15. * Provides a convenience encapsulation for lists formed from
    16. -
    17. * chains of RDF statements arranged to form a head/tail cons-cell
    18. -
    19. * structure.
    20. -
    21. -
    22. * A well-formed list has cells that are made up of three statements:
    23. -
    24. * one denoting the rdf:type of the list cell, one denoting the link
    25. -
    26. * to the value of the list at that point, and one pointing to the
    27. -
    28. * list tail. If a list cell is not well-formed, list operations may
    29. -
    30. * fail in unpredictable ways. However, to explicitly check that the
    31. -
    32. * list is well-formed at all times is expensive, but you can call
    33. -
    34. * the isValid() method to manually check, if the list is well formed.
    35. -
    36. *
    37. -
    38. *
    39. -
    40. @version  $Id$
    41. -
    42. @author Daniel Westphal <mail at d-westphal dot de>
    43. -
    44.  
    45. -
    46. *
    47. -
    48. @package resModel
    49. -
    50. @access    public
    51. -
    52. */
    53. -
    54. class ResList extends ResResource 
    55. -
    56. {
    57. -
    58.     /**
    59. -
    60.     * Holds a ResResource with the uri rdf:rest
    61. -
    62.     * @var        ResResource 
    63. -
    64.     * @access    private
    65. -
    66.     */
    67. -
    68.     var $rdfRestResource;
    69. -
    70.     
    71. -
    72.     /**
    73. -
    74.     * Holds a ResResource with the uri rdf:first
    75. -
    76.     * @var        ResResource 
    77. -
    78.     * @access    private
    79. -
    80.     */
    81. -
    82.     var $rdfFirstResource;
    83. -
    84.         
    85. -
    86.     /**
    87. -
    88.     * Holds a ResResource with the uri rdf:nil
    89. -
    90.     * @var        ResResource 
    91. -
    92.     * @access    private
    93. -
    94.     */
    95. -
    96.     var $rdfNilResource;
    97. -
    98.     
    99. -
    100.     
    101. -
    102.     /**
    103. -
    104.     * Constructor
    105. -
    106.     * You can supply a URI
    107. -
    108.     *
    109. -
    110.     * @param string $uri 
    111. -
    112.     * @access    public
    113. -
    114.     */        
    115. -
    116.     function ResList($uri null)
    117. -
    118.     {
    119. -
    120.         //call the parent's constructor
    121. -
    122.         parent::ResResource($uri);
    123. -
    124.         //initialize vars
    125. -
    126.         $this->rdfRestResource new ResResource(RDF_NAMESPACE_URI.RDF_REST);
    127. -
    128.         $this->rdfFirstResource new ResResource(RDF_NAMESPACE_URI.RDF_FIRST);
    129. -
    130.         $this->rdfNilResource new ResResource(RDF_NAMESPACE_URI.RDF_NIL);
    131. -
    132.     }
    133. -
    134.  
    135. -
    136.     /**
    137. -
    138.     * Returns the value of the list element at the specified position or null.
    139. -
    140.     *
    141. -
    142.        * @param    integer    $position 
    143. -
    144.        * @return    ResResource 
    145. -
    146.        * @access    public
    147. -
    148.        */
    149. -
    150.     function get($position)
    151. -
    152.     {
    153. -
    154.         //init
    155. -
    156.         $listElement=$this;
    157. -
    158.         //walk through the list until the position in the list is reached
    159. -
    160.         for ($i=0;$i<$position;$i++)
    161. -
    162.         {
    163. -
    164.             $listElement=$this->_getRestElement($listElement);
    165. -
    166.             if($listElement===null)
    167. -
    168.                 return null;    
    169. -
    170.         }
    171. -
    172.         //return the associated value
    173. -
    174.         return $this->_getValue($listElement);    
    175. -
    176.     }    
    177. -
    178.  
    179. -
    180.     /**
    181. -
    182.     *  Add the given value to the end of the list.
    183. -
    184.     *  it is only defined if this is not the empty list.
    185. -
    186.     *
    187. -
    188.        * @param    object ResResource    $resource 
    189. -
    190.        * @return    boolean 
    191. -
    192.        * @access    public
    193. -
    194.        */
    195. -
    196.     function add($resource)
    197. -
    198.     {
    199. -
    200.         //return false if this list is the empty list
    201. -
    202.         if($this->uri==RDF_NAMESPACE_URI.RDF_NIL)
    203. -
    204.             return false;
    205. -
    206.         
    207. -
    208.         //if this is the first value    
    209. -
    210.         if ($this->isEmpty())
    211. -
    212.         {
    213. -
    214.             $newLastElement =$this;
    215. -
    216.         else
    217. -
    218.         //if there are other values in the list 
    219. -
    220.         {
    221. -
    222.             //get the last list element
    223. -
    224.             $lastElement=$this->_getListElement();
    225. -
    226.             //remove the rdf:rest property
    227. -
    228.             $lastElement->removeAll($this->rdfRestResource);
    229. -
    230.             //create a new list element
    231. -
    232.             $newLastElement=$this->model->createResource();
    233. -
    234.             //concatenate the new list element with the list
    235. -
    236.             $lastElement->addProperty($this->rdfRestResource,$newLastElement);
    237. -
    238.         }
    239. -
    240.         //add the value
    241. -
    242.         $newLastElement->addProperty($this->rdfFirstResource,$resource);
    243. -
    244.         //ad the rdf:nil property to the last list element
    245. -
    246.         $newLastElement->addProperty($this->rdfRestResource,$this->rdfNilResource);
    247. -
    248.         
    249. -
    250.         return true;
    251. -
    252.     }
    253. -
    254.     
    255. -
    256.     /**
    257. -
    258.     *  Update the head of the list to have the given value,
    259. -
    260.     *  and return the previous value.
    261. -
    262.     *
    263. -
    264.        * @param    object ResResource    $value 
    265. -
    266.        * @return    ResResource 
    267. -
    268.        * @access    public
    269. -
    270.        */
    271. -
    272.     //todo: error handling, when empty list
    273. -
    274.     function setHead($value)
    275. -
    276.     {    
    277. -
    278.         //save the old value    
    279. -
    280.         $oldValue=$this->getHead();
    281. -
    282.         //remove the old value
    283. -
    284.         $this->removeAll($this->rdfFirstResource);
    285. -
    286.         //add the new value
    287. -
    288.         $this->addProperty($this->rdfFirstResource,$value);
    289. -
    290.         
    291. -
    292.         //return the old value
    293. -
    294.         return $oldValue;
    295. -
    296.     }
    297. -
    298.     
    299. -
    300.     /**
    301. -
    302.     * Get the value that is associated with the head of the list.
    303. -
    304.     *
    305. -
    306.        * @return    ResResource 
    307. -
    308.        * @access    public
    309. -
    310.        */
    311. -
    312.     //todo: error handling, falls empty list
    313. -
    314.     function getHead()
    315. -
    316.     {
    317. -
    318.         return $this->_getValue($this);
    319. -
    320.     }
    321. -
    322.     
    323. -
    324.     /**
    325. -
    326.     *  Remove the head of the list. The tail of the list
    327. -
    328.     *  remains in the model. Note that no changes are made to
    329. -
    330.     *  list cells that point to this list cell as their tail.
    331. -
    332.     *
    333. -
    334.        * @return    ResList 
    335. -
    336.        * @access    public
    337. -
    338.        */
    339. -
    340.     function removeHead()
    341. -
    342.     {
    343. -
    344.         //get the second list element
    345. -
    346.         $rest=$this->_getRestElement($this);
    347. -
    348.         //remove the first element
    349. -
    350.         $this->removeAll($this->rdfFirstResource);
    351. -
    352.         $this->removeAll($this->rdfRestResource);
    353. -
    354.         //change this Resource URI to that of the second list element
    355. -
    356.         //thus makin it the fist element
    357. -
    358.         $this->uri=$rest->getURI();
    359. -
    360.         
    361. -
    362.         //return the new list
    363. -
    364.         return $this;
    365. -
    366.     }    
    367. -
    368.  
    369. -
    370.     /**
    371. -
    372.     * Get the Position of the first occurrence of the given value in the list,
    373. -
    374.     * or -1 if the value is not in the list.
    375. -
    376.     * You can supply an offset to search for values. (First element has offset 0)
    377. -
    378.     * Default is 0
    379. -
    380.     *
    381. -
    382.        * @param    object ResResource    $resource 
    383. -
    384.     * @param    integer    $offset 
    385. -
    386.        * @return    integer 
    387. -
    388.        * @access    public
    389. -
    390.        */
    391. -
    392.     function indexOf($resource$offset 0)
    393. -
    394.     {
    395. -
    396.         //init
    397. -
    398.         $element=$this;
    399. -
    400.         $actualIndex=0;
    401. -
    402.  
    403. -
    404.         //walk through the list until the value is found and the position is higher than
    405. -
    406.         //the offset
    407. -
    408.         while ($actualIndex $offset || !$resource->equals($this->_getValue($element)))
    409. -
    410.         {
    411. -
    412.             //get next list element
    413. -
    414.             $element=$this->_getRestElement($element);
    415. -
    416.             $actualIndex++;
    417. -
    418.             
    419. -
    420.             //if the end of the list is reached and the value isn't found
    421. -
    422.             if ($element===null)
    423. -
    424.                 return null;
    425. -
    426.         }
    427. -
    428.         //return the index value
    429. -
    430.         return $actualIndex;    
    431. -
    432.     }
    433. -
    434.     
    435. -
    436.     /**
    437. -
    438.     * Replace the value at the i'th position in the list with the given value
    439. -
    440.     *
    441. -
    442.        * @param    integer                $index 
    443. -
    444.        * @param    object ResResource    $resource 
    445. -
    446.        * @return    object ResResource 
    447. -
    448.        * @access    public
    449. -
    450.        */
    451. -
    452.     function replace($index$resource)
    453. -
    454.     {
    455. -
    456.         //get the list element at the $index position
    457. -
    458.         $listElement=$this->_getListElement($index);
    459. -
    460.         //get the old value
    461. -
    462.         $oldValue=$this->_getValue($listElement);
    463. -
    464.         //remove the old value
    465. -
    466.         $listElement->removeAll($this->rdfFirstResource);
    467. -
    468.         //add the new value
    469. -
    470.         $listElement->addProperty($this->rdfFirstResource,$resource);
    471. -
    472.         //return the old value
    473. -
    474.         return $oldValue;
    475. -
    476.     }
    477. -
    478.     
    479. -
    480.     /**
    481. -
    482.     * Answer true if the given node appears as the value of a value
    483. -
    484.     * of any of the cells of this list.
    485. -
    486.     *
    487. -
    488.        * @param    object ResResource    $value 
    489. -
    490.        * @return    boolean 
    491. -
    492.        * @access    public
    493. -
    494.        */
    495. -
    496.     function contains($value)
    497. -
    498.     {
    499. -
    500.         //return true, if a position was found.
    501. -
    502.         $result=$this->indexOf($value);
    503. -
    504.         return ($result!==null);
    505. -
    506.     }
    507. -
    508.     
    509. -
    510.     /**
    511. -
    512.     * Get the list that is the tail of this list.
    513. -
    514.     *
    515. -
    516.        * @return    object ResList 
    517. -
    518.        * @access    public
    519. -
    520.        */
    521. -
    522.     function getTail()
    523. -
    524.     {
    525. -
    526.         //get the second list element
    527. -
    528.         $nextListElement$this->_getRestElement($this);
    529. -
    530.         //return the second element as new list
    531. -
    532.         return $this->model->createList($nextListElement->getURI());    
    533. -
    534.     }
    535. -
    536.     
    537. -
    538.     /**
    539. -
    540.     * Remove all of the components of this list from the model.
    541. -
    542.     * Note that this is operation is only removing the list cells
    543. -
    544.     * themselves, not the resources referenced by the list -
    545. -
    546.     * unless being the object of an rdf:first  statement is the
    547. -
    548.     * only mention of that resource in the model.
    549. -
    550.     *
    551. -
    552.        * @return    boolean 
    553. -
    554.        * @access    public
    555. -
    556.        */
    557. -
    558.     function removeList()
    559. -
    560.     {
    561. -
    562.         $element=$this;
    563. -
    564.  
    565. -
    566.         while ($element!==null)
    567. -
    568.         {
    569. -
    570.             $nextElement=$this->_getRestElement($element);
    571. -
    572.             
    573. -
    574.             $element->removeAll($this->rdfFirstResource);
    575. -
    576.             $element->removeAll($this->rdfRestResource);
    577. -
    578.                     
    579. -
    580.             if (($nextElement !== null&& ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
    581. -
    582.             {
    583. -
    584.                 $element=$nextElement;
    585. -
    586.             else 
    587. -
    588.             {
    589. -
    590.                 return true;
    591. -
    592.             }
    593. -
    594.         }
    595. -
    596.         return false;
    597. -
    598.     }
    599. -
    600.     
    601. -
    602.     /**
    603. -
    604.     * Returns true, if this list is empty
    605. -
    606.     *
    607. -
    608.        * @param    object Statement    $statement 
    609. -
    610.        * @return    integer 
    611. -
    612.        * @access    public
    613. -
    614.        */
    615. -
    616.     function isEmpty()
    617. -
    618.     {
    619. -
    620.         return !$this->hasProperty($this->rdfFirstResource);
    621. -
    622.     }
    623. -
    624.     
    625. -
    626.     /**
    627. -
    628.     * Get all values in the list as an array of ResResources
    629. -
    630.     *
    631. -
    632.        * @return    array 
    633. -
    634.        * @access    public
    635. -
    636.        */
    637. -
    638.     function getContentInArray()
    639. -
    640.     {
    641. -
    642.         $result=array();
    643. -
    644.         $element=$this;
    645. -
    646.  
    647. -
    648.         while ($element!==null)
    649. -
    650.         {
    651. -
    652.             //add the value of the current element to the result if is set.
    653. -
    654.             $value=$this->_getValue($element);
    655. -
    656.             if ($value!==null)
    657. -
    658.                 $result[]=$value;
    659. -
    660.             
    661. -
    662.             //walk through the list until it's end        
    663. -
    664.             $nextElement=$this->_getRestElement($element);
    665. -
    666.             if (($nextElement !== null&& ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
    667. -
    668.             {
    669. -
    670.                 $element=$nextElement;
    671. -
    672.             else 
    673. -
    674.             {
    675. -
    676.                 break;
    677. -
    678.             }
    679. -
    680.         }
    681. -
    682.         //return the result
    683. -
    684.         return $result;
    685. -
    686.     }
    687. -
    688.     
    689. -
    690.     /**
    691. -
    692.     * Change the tail of this list to point to the given list, so that this list
    693. -
    694.     * becomes the list of the concatenation of the elements of
    695. -
    696.     * both lists. This is a side-effecting operation on this list;
    697. -
    698.     * for a non side-effecting alternative, see append.
    699. -
    700.     * 
    701. -
    702.     *
    703. -
    704.        * @param    object ResList    $ResList 
    705. -
    706.        * @access    public
    707. -
    708.        */
    709. -
    710.     function concatenate($ResList)
    711. -
    712.     {
    713. -
    714.         //get the last list element
    715. -
    716.         $lastElement=$this->_getListElement();
    717. -
    718.         //remove the old tail (rdf:nil)
    719. -
    720.         $lastElement->removeAll($this->rdfRestResource);
    721. -
    722.         //add the $ResList as new tail
    723. -
    724.         $lastElement->addProperty($this->rdfRestResource,$ResList);
    725. -
    726.     }
    727. -
    728.     
    729. -
    730.     /**
    731. -
    732.     * Answer a new list that is formed by adding each element of
    733. -
    734.     * this list to the head of the given list. This is a non
    735. -
    736.     * side-effecting operation on either this list or the given
    737. -
    738.     * list, but generates a copy of this list. For a more storage
    739. -
    740.     * efficient alternative, see concatenate
    741. -
    742.     *
    743. -
    744.        * @param    object ResList    $ResList 
    745. -
    746.        * @return    object ResList 
    747. -
    748.        * @access    public
    749. -
    750.        */
    751. -
    752.     function append($resList)
    753. -
    754.     {
    755. -
    756.         //get a copy of this list
    757. -
    758.         $newList=$this->copy();
    759. -
    760.         
    761. -
    762.         //add all values from the $resList to the new list
    763. -
    764.         foreach ($resList->getContentInArray(as $value)
    765. -
    766.         {
    767. -
    768.             $newList->add($value);    
    769. -
    770.         }
    771. -
    772.         //return the new list
    773. -
    774.         return $newList;
    775. -
    776.     }
    777. -
    778.     
    779. -
    780.     /**
    781. -
    782.     * Answer a list that contains all of the elements of this
    783. -
    784.     * list in the same order, but is a duplicate copy in the
    785. -
    786.     * underlying model.
    787. -
    788.     *
    789. -
    790.        * @return    object ResList 
    791. -
    792.        * @access    public
    793. -
    794.        */
    795. -
    796.     function copy()
    797. -
    798.     {
    799. -
    800.         //create a new list in the model
    801. -
    802.         $newList=$this->model->createList();
    803. -
    804.         //add all values from this list to the new list
    805. -
    806.         foreach ($this->getContentInArray(as $value)
    807. -
    808.         {
    809. -
    810.             $newList->add($value);    
    811. -
    812.         }
    813. -
    814.         //return the new list
    815. -
    816.         return $newList;
    817. -
    818.     }
    819. -
    820.     
    821. -
    822.     /**
    823. -
    824.     * Return a reference to a new list cell whose head is value
    825. -
    826.     * and whose tail is this list.
    827. -
    828.     *
    829. -
    830.        * @param    object ResResource    $value 
    831. -
    832.        * @return    object ResList 
    833. -
    834.        * @access    public
    835. -
    836.        */
    837. -
    838.     function cons($value)
    839. -
    840.     {
    841. -
    842.         //create a new list
    843. -
    844.         $newList=$this->model->createList();
    845. -
    846.         //add the new value
    847. -
    848.         $newList->add($value);
    849. -
    850.         //set this list as the tail of the new list
    851. -
    852.         $newList->setTail($this);
    853. -
    854.         
    855. -
    856.         //return the new list
    857. -
    858.         return $newList;
    859. -
    860.     }
    861. -
    862.     
    863. -
    864.     /**
    865. -
    866.     * Update the list cell at the front of the list to have the
    867. -
    868.     * given list as tail. The old tail is returned, and remains
    869. -
    870.     * in the model.
    871. -
    872.     *
    873. -
    874.        * @param    object ResList    $resList 
    875. -
    876.        * @return    object Reslist 
    877. -
    878.        * @access    public
    879. -
    880.        */
    881. -
    882.     function setTail($resList)
    883. -
    884.     {
    885. -
    886.         //save the old tail
    887. -
    888.         $oldTail=$this->getTail();
    889. -
    890.         //remove the old tail
    891. -
    892.         $this->removeAll($this->rdfRestResource);
    893. -
    894.         //add the $resList as new Tail
    895. -
    896.         $this->addProperty($this->rdfRestResource,$resList);
    897. -
    898.         
    899. -
    900.         //return the old tail
    901. -
    902.         return $oldTail;
    903. -
    904.     }
    905. -
    906.     
    907. -
    908.     /**
    909. -
    910.     * Answer true if this list has the same elements in the
    911. -
    912.     * same order as the given list. Note that the standard equals
    913. -
    914.     * test just tests for equality of two given list cells.
    915. -
    916.     * While such a test is sufficient for many purposes, this
    917. -
    918.     * test provides a broader equality definition, but is
    919. -
    920.     * correspondingly more expensive to test.
    921. -
    922.     *
    923. -
    924.        * @param    object ResList    $resList 
    925. -
    926.        * @return    boolean 
    927. -
    928.        * @access    public
    929. -
    930.        */
    931. -
    932.     function sameListAs($resList)
    933. -
    934.     {
    935. -
    936.         //init
    937. -
    938.         $indexPos=0;
    939. -
    940.         do
    941. -
    942.         {
    943. -
    944.             //get the values for both lists at the actual position
    945. -
    946.             $thisValue=$this->get($indexPos);
    947. -
    948.             $thatValue=$resList->get($indexPos);
    949. -
    950.             //if the values aren't equal, return false
    951. -
    952.             if (($thisValue !== null&& !$thisValue->equals($thatValue))
    953. -
    954.                 return false;
    955. -
    956.                 
    957. -
    958.             $indexPos++;
    959. -
    960.             //walk until this list reaches a null value (end)    
    961. -
    962.         while ($thisValue!==null);
    963. -
    964.         
    965. -
    966.         //if the other list has a null value at this position too, return true
    967. -
    968.         //else return false
    969. -
    970.         return ($thatValue===null);
    971. -
    972.     }
    973. -
    974.     
    975. -
    976.     /**
    977. -
    978.     * Remove the given value from this list.
    979. -
    980.     * If value does not occur in the list, no action is taken. Since removing the
    981. -
    982.     * head of the list will invalidate the list head cell, in
    983. -
    984.     * general the list must return the list that results from
    985. -
    986.     * this operation. However, in many cases the return value
    987. -
    988.     * will be the same as the object that this method is invoked
    989. -
    990.     * on.
    991. -
    992.     *
    993. -
    994.        * @param    object ResResource    $value 
    995. -
    996.        * @return    object ResList 
    997. -
    998.        * @access    public
    999. -
    1000.        */
    1001. -
    1002.     function remove($value)
    1003. -
    1004.     {
    1005. -
    1006.         //if the value is the value of the first list element(head)
    1007. -
    1008.         //call the remove head position and return the new head
    1009. -
    1010.         if ($value->equals($this->_getValue($this)))
    1011. -
    1012.             return $this->removeHead();
    1013. -
    1014.     
    1015. -
    1016.         $element=$this;
    1017. -
    1018.         do
    1019. -
    1020.         {    
    1021. -
    1022.             $newElement=$this->_getRestElement($element);
    1023. -
    1024.             
    1025. -
    1026.             //if the value equals the value of the current list element
    1027. -
    1028.             if ($newElement !== null && $value->equals($this->_getValue($newElement)))
    1029. -
    1030.             {
    1031. -
    1032.                 //remove the link to the list element to be removed
    1033. -
    1034.                 $element->removeAll($this->rdfRestResource);
    1035. -
    1036.                 //add a link to the list element AFTER the element to be deleted
    1037. -
    1038.                 $element->addProperty($this->rdfRestResource,$this->_getRestElement($newElement));
    1039. -
    1040.                 //remove the list element with values
    1041. -
    1042.                 $newElement->removeAll($this->rdfFirstResource);
    1043. -
    1044.                 $newElement->removeAll($this->rdfRestResource);
    1045. -
    1046.                 //return this ResList
    1047. -
    1048.                 return $this;    
    1049. -
    1050.             }
    1051. -
    1052.             $element=$newElement;
    1053. -
    1054.         while ($element!==null);
    1055. -
    1056.         //return this list
    1057. -
    1058.         return $this;    
    1059. -
    1060.     }
    1061. -
    1062.     
    1063. -
    1064.     /**
    1065. -
    1066.     * Answer true if the list is well-formed, by checking that each
    1067. -
    1068.     * node is correctly typed, and has a head and tail pointer from
    1069. -
    1070.     * the correct vocabulary
    1071. -
    1072.     *
    1073. -
    1074.        * @return    boolean 
    1075. -
    1076.        * @access    public
    1077. -
    1078.        */
    1079. -
    1080.     function isValid()
    1081. -
    1082.     {
    1083. -
    1084.         $element=$this;    
    1085. -
    1086.         if ($this->_getValue($this)=== null && $this->_getRestElement($this=== null)
    1087. -
    1088.             return true;
    1089. -
    1090.         do 
    1091. -
    1092.         {
    1093. -
    1094.             //return true if the last element is a rdf:nil
    1095. -
    1096.             if ($element->getURI(== RDF_NAMESPACE_URI.RDF_NIL)
    1097. -
    1098.                 return true;
    1099. -
    1100.             //return false, if the current element has no associated value
    1101. -
    1102.             if ($this->_getValue($element=== null)
    1103. -
    1104.                 return false;
    1105. -
    1106.                         
    1107. -
    1108.             $element=$this->_getRestElement($element);    
    1109. -
    1110.         while ($element !== null);
    1111. -
    1112.         //return false, if the current element has no rdf:rest property
    1113. -
    1114.         return false;
    1115. -
    1116.     }
    1117. -
    1118.     
    1119. -
    1120.     /**
    1121. -
    1122.     * Get the associated rdf:rest Resource from the suplied ResList element
    1123. -
    1124.     *
    1125. -
    1126.        * @param    object ResList    $listElement 
    1127. -
    1128.        * @return    object ResList 
    1129. -
    1130.        * @access    private
    1131. -
    1132.        */
    1133. -
    1134.     function _getRestElement($listElement)
    1135. -
    1136.     {
    1137. -
    1138.         //get the rdf:rest property
    1139. -
    1140.         $statement$this->model->getProperty($listElement,$this->rdfRestResource);
    1141. -
    1142.         //return null, if this property isn't set
    1143. -
    1144.         if ($statement === null)
    1145. -
    1146.             return null;
    1147. -
    1148.             
    1149. -
    1150.         //return the value of the rdf:rest property    
    1151. -
    1152.         return $statement->getObject();    
    1153. -
    1154.     }
    1155. -
    1156.     
    1157. -
    1158.     /**
    1159. -
    1160.     * Returns the list element at the $index position.
    1161. -
    1162.     *
    1163. -
    1164.     * If to $index is suplied, the last list element will be returned
    1165. -
    1166.     
    1167. -
    1168.        * @param    integer    $index 
    1169. -
    1170.        * @return    object ResResource 
    1171. -
    1172.        * @access    private
    1173. -
    1174.        */
    1175. -
    1176.     function _getListElement($index null)
    1177. -
    1178.     {
    1179. -
    1180.         $element=$this;
    1181. -
    1182.         $actualIndex=0;
    1183. -
    1184.  
    1185. -
    1186.         while ($element!=null)
    1187. -
    1188.         {
    1189. -
    1190.             //return the current element if index matches the current index
    1191. -
    1192.             if ($actualIndex === $index)
    1193. -
    1194.                 return $element;
    1195. -
    1196.             
    1197. -
    1198.             //return the current element if it the last one        
    1199. -
    1200.             if ($element->hasProperty($this->rdfRestResource,$this->rdfNilResource))
    1201. -
    1202.                 return $element;
    1203. -
    1204.             
    1205. -
    1206.             $nextElement=$this->_getRestElement($element);
    1207. -
    1208.             
    1209. -
    1210.             if ($nextElement!==null)
    1211. -
    1212.             {
    1213. -
    1214.                 $element=$nextElement;
    1215. -
    1216.                 $actualIndex++;
    1217. -
    1218.             else 
    1219. -
    1220.             {
    1221. -
    1222.                 break;
    1223. -
    1224.             }
    1225. -
    1226.         }
    1227. -
    1228.         return $element;
    1229. -
    1230.     }
    1231. -
    1232.     
    1233. -
    1234.     /**
    1235. -
    1236.     * Get the value associated to the $listResource by the rdf:first property
    1237. -
    1238.     *
    1239. -
    1240.        * @param    object ResList    $listResource 
    1241. -
    1242.        * @return    object ResResource 
    1243. -
    1244.        * @access    private
    1245. -
    1246.        */
    1247. -
    1248.     function _getValue($listResource)
    1249. -
    1250.     {
    1251. -
    1252.         //Return the value of the rdf:first property or null, if it isn't set
    1253. -
    1254.         $statement=$this->model->getProperty($listResource,$this->rdfFirstResource);
    1255. -
    1256.         if ($statement===null)
    1257. -
    1258.             return null;
    1259. -
    1260.  
    1261. -
    1262.         return $statement->getObject();    
    1263. -
    1264.     }
    1265. -
    1266. }
    1267. -
    1268. ?>
    1269. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResLiteral.php.html.svn-base deleted file mode 100755 index 08b16069..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResLiteral.php.html.svn-base +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - File Source for ResLiteral.php - - - - - -

    Source for file ResLiteral.php

    -

    Documentation is available at ResLiteral.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResLiteral
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF literal.
    14. -
    15. * The literal supports the xml:lang and rdf:datatype property.
    16. -
    17. * For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
    18. -
    19. -
    20. @version  $Id$
    21. -
    22. @author Daniel Westphal <mail at d-westphal dot de>
    23. -
    24.  
    25. -
    26. *
    27. -
    28. @package resModel
    29. -
    30. @access    public
    31. -
    32. ***/
    33. -
    34.  
    35. -
    36. class ResLiteral extends Literal 
    37. -
    38. {
    39. -
    40.     /**
    41. -
    42.     * Holds a reference to the associated model
    43. -
    44.     * @var        ResModel 
    45. -
    46.     * @access    private
    47. -
    48.     */
    49. -
    50.     var $model;
    51. -
    52.     
    53. -
    54.     
    55. -
    56.     /**
    57. -
    58.     * Constructor
    59. -
    60.     * You have to supply a string.
    61. -
    62.     *
    63. -
    64.     * @param    string    $str        label of the literal
    65. -
    66.     * @param     string $language    optional language identifier
    67. -
    68.     */    
    69. -
    70.     function ResLiteral($str,$language null)
    71. -
    72.     {
    73. -
    74.         parent::Literal($str,$language);
    75. -
    76.  
    77. -
    78.     }
    79. -
    80.     
    81. -
    82.     /**
    83. -
    84.     * Sets the reference to the assocoated model.
    85. -
    86.     *
    87. -
    88.     * @param    object model    $model 
    89. -
    90.     * @access public
    91. -
    92.     */
    93. -
    94.     function setAssociatedModel($model)
    95. -
    96.     {
    97. -
    98.         $this->model=$model;
    99. -
    100.     }
    101. -
    102.     
    103. -
    104.     /**
    105. -
    106.     * Get the reference to the assocoated model.
    107. -
    108.     *
    109. -
    110.     * @return    object model    $model
    111. -
    112.     * @access public
    113. -
    114.     */
    115. -
    116.     function getAssociatedModel()
    117. -
    118.     {
    119. -
    120.         return $this->model;
    121. -
    122.     }
    123. -
    124.  
    125. -
    126. -
    127. ?>
    128. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResModel.php.html.svn-base deleted file mode 100755 index 22f5031d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResModel.php.html.svn-base +++ /dev/null @@ -1,894 +0,0 @@ - - - - - - File Source for ResModel.php - - - - - -

    Source for file ResModel.php

    -

    Documentation is available at ResModel.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResModel
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A ResModel provides an resource centric view on an underlying RDF model.
    14. -
    15. * ResModels show information not as statements but as resources with
    16. -
    17. * properties, similar to Jena models. ResModels may create Resources [URI
    18. -
    19. * nodes and bnodes]. Creating a Resource does not make the Resource visible to
    20. -
    21. * the model; Resources are only "in" Models if Statements about them are added
    22. -
    23. * to the Model. Similarly the only way to "remove" a Resource from a Model is
    24. -
    25. * to remove all the Statements that mention it.
    26. -
    27. -
    28. * When a Resource or Literal is created by a Model, the Model is free to re-use an existing
    29. -
    30. * Resource or Literal object with the correct values, or it may create a fresh one.
    31. -
    32. *
    33. -
    34. @version  $Id$
    35. -
    36. @author Daniel Westphal <mail at d-westphal dot de>
    37. -
    38. *
    39. -
    40. *
    41. -
    42. @package     resModel
    43. -
    44. @access    public
    45. -
    46. ***/
    47. -
    48.  
    49. -
    50. class ResModel
    51. -
    52. {
    53. -
    54.     
    55. -
    56.     /**
    57. -
    58.     * Holds a reference to the assoiated memmodel/dbmodel/infmodel
    59. -
    60.     * @var        ResResource 
    61. -
    62.     * @access    private
    63. -
    64.     */
    65. -
    66.     var $model;
    67. -
    68.  
    69. -
    70.     
    71. -
    72.     /**
    73. -
    74.     * Constructor
    75. -
    76.     * You have to supply a memmodel/dbmodel/infmodel to save the statements.
    77. -
    78.     *
    79. -
    80.     * @param object model $model 
    81. -
    82.     * @access    public
    83. -
    84.     */    
    85. -
    86.     function ResModel($model)
    87. -
    88.     {
    89. -
    90.         if (!is_a($model,'Model'))
    91. -
    92.             trigger_error(RDFAPI_ERROR '(class: ResourceLayer; method: ResourceLayer): 
    93. -
    94.                 $model has to be object of class Model'E_USER_ERROR);    
    95. -
    96.         
    97. -
    98.         $this->model =$model;            
    99. -
    100.     }
    101. -
    102.     
    103. -
    104.     /**
    105. -
    106.     * Create a new resource associated with this model.
    107. -
    108.     * If the uri string isn't set, this creates a bnode.
    109. -
    110.     * Otherwise it creates a URI node.
    111. -
    112.     * A URI resource is .equals() to any other URI Resource with the same URI
    113. -
    114.     * (even in a different model - be warned).
    115. -
    116.     * 
    117. -
    118.     * This method may return an existing Resource with the correct URI and model,
    119. -
    120.     * or it may construct a fresh one, as it sees fit.
    121. -
    122.     *
    123. -
    124.     * Operations on the result Resource may change this model.
    125. -
    126.     *
    127. -
    128.        * @param    string    $uri 
    129. -
    130.        * @return    object ResResource 
    131. -
    132.        * @access    public
    133. -
    134.        */
    135. -
    136.     function createResource($uri null)
    137. -
    138.     {
    139. -
    140.         $resResource new ResResource($uri);
    141. -
    142.         //associate the resource with this model, and get a unique identifier
    143. -
    144.         //if it is bnode.
    145. -
    146.         $resResource->setAssociatedModel($this);
    147. -
    148.         
    149. -
    150.         return $resResource;
    151. -
    152.     
    153. -
    154.     
    155. -
    156.     /**
    157. -
    158.     * Create a new Property associated with this model.
    159. -
    160.     * This method may return an existing property with the correct URI and model,
    161. -
    162.     * or it may construct a fresh one, as it sees fit.
    163. -
    164.     *
    165. -
    166.     * Subsequent operations on the returned property may modify this model.
    167. -
    168.     *  
    169. -
    170.     *
    171. -
    172.        * @param    string    $uri 
    173. -
    174.        * @return    object ResProperty 
    175. -
    176.        * @access    public
    177. -
    178.        */
    179. -
    180.     function createProperty($uri null)
    181. -
    182.     {
    183. -
    184.         $resProperty new ResProperty($uri);
    185. -
    186.         $resProperty->setAssociatedModel($this);
    187. -
    188.             
    189. -
    190.         return $resProperty;
    191. -
    192.     }
    193. -
    194.     
    195. -
    196.     /**
    197. -
    198.     * Create an untyped literal from a String value with a specified language.
    199. -
    200.     *
    201. -
    202.     * If you want to type this literal, you have to set a datatype before
    203. -
    204.     * adding it to the model.
    205. -
    206.     *  
    207. -
    208.     *
    209. -
    210.        * @param    string    $label 
    211. -
    212.        * @param    string    $languageTag 
    213. -
    214.        * @return    object ResLiteral 
    215. -
    216.        * @access    public
    217. -
    218.        */    
    219. -
    220.     function createLiteral($label,$languageTag null)
    221. -
    222.     {
    223. -
    224.         $resLiteral new ResLiteral($label,$languageTag);
    225. -
    226.         $resLiteral->setAssociatedModel($this);
    227. -
    228.         
    229. -
    230.         return $resLiteral;
    231. -
    232.     }
    233. -
    234.     
    235. -
    236.     /**
    237. -
    238.     * General method to search for triples.
    239. -
    240.     * NULL input for any parameter will match anything.
    241. -
    242.     * Example:  $result = $m->find( NULL, NULL, $node );
    243. -
    244.     * Finds all Statements with $node as object.
    245. -
    246.     * Returns an array of statements with ResResources.
    247. -
    248.     *
    249. -
    250.     * @param    object ResResource    $subject 
    251. -
    252.     * @param    object ResResource    $predicate 
    253. -
    254.     * @param    object ResResource    $object 
    255. -
    256.     * @return    array 
    257. -
    258.     * @access    public
    259. -
    260.     * @throws    PhpError
    261. -
    262.     */
    263. -
    264.     function find($subject,$predicate$object)
    265. -
    266.     {
    267. -
    268.         $result=array();
    269. -
    270.         //convert ResResources to Resources and Blanknodes
    271. -
    272.         $resmodel=$this->model->find(    $this->_resNode2Node($subject),
    273. -
    274.                                         $this->_resNode2Node($predicate),
    275. -
    276.                                         $this->_resNode2Node($object)
    277. -
    278.                                      );
    279. -
    280.         //convert Resources, Blanknodes to ResResources                             
    281. -
    282.         foreach ($resmodel->triples as $statement
    283. -
    284.         {
    285. -
    286.             $result[]=new Statement($this->_node2ResNode($statement->getSubject()),
    287. -
    288.                                     $this->_node2ResNode($statement->getPredicate(),true),
    289. -
    290.                                     $this->_node2ResNode($statement->getObject())
    291. -
    292.                                     );
    293. -
    294.         };
    295. -
    296.         return $result;
    297. -
    298.         
    299. -
    300.     }
    301. -
    302.     
    303. -
    304.     /**
    305. -
    306.     * Searches for triples and returns the first matching statement.
    307. -
    308.     * NULL input for any parameter will match anything.
    309. -
    310.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    311. -
    312.     * Returns the first statement with ResResources of the Model where the object equals $node.
    313. -
    314.     * Returns an NULL if nothing is found.
    315. -
    316.     * You can define an offset to search.
    317. -
    318.     *
    319. -
    320.     * @param    object Node    $subject 
    321. -
    322.     * @param    object Node    $predicate 
    323. -
    324.     * @param    object Node    $object 
    325. -
    326.     * @param    integer $offset 
    327. -
    328.     * @return    object Statement 
    329. -
    330.     * @access    public
    331. -
    332.     */
    333. -
    334.     function findFirstMatchingStatement($subject,$predicate,$object,$offset 0)
    335. -
    336.     {
    337. -
    338.     
    339. -
    340.         $statement $this->model->findFirstMatchingStatement(    $this->_resNode2Node($subject),
    341. -
    342.                                                                 $this->_resNode2Node($predicate),
    343. -
    344.                                                                 $this->_resNode2Node($object),
    345. -
    346.                                                                 $offset
    347. -
    348.                                                               );
    349. -
    350.         if ($statement!==null)
    351. -
    352.         {                                            
    353. -
    354.             return new Statement(    $this->_node2ResNode($statement->getSubject()),
    355. -
    356.                                     $this->_node2ResNode($statement->getPredicate(),true),
    357. -
    358.                                     $this->_node2ResNode($statement->getObject())
    359. -
    360.                                 );
    361. -
    362.         else 
    363. -
    364.         {
    365. -
    366.             return null;
    367. -
    368.         }
    369. -
    370.     }
    371. -
    372.     
    373. -
    374.     /**
    375. -
    376.     * Adds a new triple to the Model without checking if the statement is already in the Model.
    377. -
    378.     * So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    379. -
    380.     * Expects a statements with ResResources(ResLiterals)
    381. -
    382.     *
    383. -
    384.     * @param    object Statement    $statement 
    385. -
    386.     * @access    public
    387. -
    388.     * @throws    PhpError
    389. -
    390.     */
    391. -
    392.     function add($statement)
    393. -
    394.     {
    395. -
    396.         return $this->model->add(new Statement(    $this->_resNode2Node($statement->getSubject()),
    397. -
    398.                                                 $this->_resNode2Node($statement->getPredicate()),
    399. -
    400.                                                 $this->_resNode2Node($statement->getObject()))
    401. -
    402.                                                );        
    403. -
    404.     }
    405. -
    406.     /**
    407. -
    408.     * Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    409. -
    410.     * addWithoutDuplicates() is significantly slower then add().
    411. -
    412.     * Retruns TRUE if the statement is added.
    413. -
    414.     * FALSE otherwise.
    415. -
    416.     * Expects a statements with ResResources(ResLiterals)
    417. -
    418.     *
    419. -
    420.     * @param    object Statement    $statement 
    421. -
    422.     * @return   boolean 
    423. -
    424.     * @access    public
    425. -
    426.     * @throws    PhpError
    427. -
    428.     */
    429. -
    430.     function addWithoutDuplicates($statement)
    431. -
    432.     {
    433. -
    434.         return $this->model->addWithoutDuplicates(new Statement($this->_resNode2Node($statement->getSubject()),
    435. -
    436.                                                                 $this->_resNode2Node($statement->getPredicate()),
    437. -
    438.                                                                 $this->_resNode2Node($statement->getObject()))
    439. -
    440.                                                                 );    
    441. -
    442.     }
    443. -
    444.     
    445. -
    446.     /**
    447. -
    448.     * Tests if the Model contains the given statement.
    449. -
    450.     * TRUE if the statement belongs to the model;
    451. -
    452.     * FALSE otherwise.
    453. -
    454.     * Expects a statement of ResResources(ResLiterals)
    455. -
    456.     *
    457. -
    458.     * @param    object Statement    $statement 
    459. -
    460.     * @return    boolean 
    461. -
    462.     * @access    public
    463. -
    464.     */
    465. -
    466.     function contains($statement)
    467. -
    468.     {
    469. -
    470.         
    471. -
    472.         return $this->model->contains(new Statement($this->_resNode2Node($statement->getSubject()),
    473. -
    474.                                                     $this->_resNode2Node($statement->getPredicate()),
    475. -
    476.                                                     $this->_resNode2Node($statement->getObject()))
    477. -
    478.                                                     );
    479. -
    480.     }
    481. -
    482.     
    483. -
    484.     /**
    485. -
    486.     * Determine if all of the statements in a model are also contained in this model.
    487. -
    488.     * True if all of the statements in $model are also contained in this model and false otherwise.
    489. -
    490.     *
    491. -
    492.     * @param    object Model    &$model 
    493. -
    494.     * @return    boolean 
    495. -
    496.     * @access    public
    497. -
    498.     */
    499. -
    500.     function containsAll($model)
    501. -
    502.     {
    503. -
    504.         if (is_a($model,'ResModel'))
    505. -
    506.             return $this->model->containsAll($model->getModel());
    507. -
    508.         
    509. -
    510.         return $this->model->containsAll($model);
    511. -
    512.     }
    513. -
    514.     
    515. -
    516.     /**
    517. -
    518.     * Determine if any of the statements in a model are also contained in this model.
    519. -
    520.     * True if any of the statements in $model are also contained in this model and false otherwise.
    521. -
    522.     *
    523. -
    524.     * @param    object Model    &$model 
    525. -
    526.     * @return    boolean 
    527. -
    528.     * @access    public
    529. -
    530.     */    
    531. -
    532.     function containsAny($model)
    533. -
    534.     {
    535. -
    536.         if (is_a($model,'ResModel'))
    537. -
    538.             return $this->model->containsAny($model->getModel());
    539. -
    540.         return $this->model->containsAny($model);
    541. -
    542.     }
    543. -
    544.     
    545. -
    546.     /**
    547. -
    548.     * Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    549. -
    550.     *
    551. -
    552.     * @param    object Node    &$node 
    553. -
    554.     * @return    boolean 
    555. -
    556.     * @access    public
    557. -
    558.     */    
    559. -
    560.     function containsResource($node)
    561. -
    562.     {
    563. -
    564.         if ($this->findFirstMatchingStatement($node,null,null=== null)
    565. -
    566.             if ($this->findFirstMatchingStatement(null,$node,null=== null)
    567. -
    568.                 if ($this->findFirstMatchingStatement(null,null,$node=== null)
    569. -
    570.                     return false;
    571. -
    572.                     
    573. -
    574.         return true;
    575. -
    576.     }
    577. -
    578.     
    579. -
    580.     /**
    581. -
    582.     * Create a literal from a String value with the $dtype Datatype
    583. -
    584.     * An existing literal of the right value may be returned, or a fresh one created.
    585. -
    586.     *
    587. -
    588.     * @param    string    $value 
    589. -
    590.     * @param    string     $dtype 
    591. -
    592.     * @return     object ResLiteral 
    593. -
    594.     * @access    public
    595. -
    596.     */
    597. -
    598.     function createTypedLiteral($value,$dtype)
    599. -
    600.     {
    601. -
    602.         $resLiteral new ResLiteral($value);
    603. -
    604.         $resLiteral->setDatatype($dtype);
    605. -
    606.         $resLiteral->setAssociatedModel($this);
    607. -
    608.         
    609. -
    610.         return $resLiteral;
    611. -
    612.     }
    613. -
    614.     
    615. -
    616.     /**
    617. -
    618.     * Checks if two models are equal.
    619. -
    620.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    621. -
    622.     * 
    623. -
    624.     * Warning: This method doesn't work correct with models where the same blank node has different
    625. -
    626.     * identifiers in the two models. We will correct this in a future version.
    627. -
    628.     *
    629. -
    630.     * @access    public
    631. -
    632.     * @param    object    model &$that 
    633. -
    634.     * @throws    phpErrpr
    635. -
    636.     * @return    boolean 
    637. -
    638.     */        
    639. -
    640.     function equals($that)
    641. -
    642.     {
    643. -
    644.         if (is_a($that,'ResModel'))
    645. -
    646.             return $this->model->equals($that->getModel());
    647. -
    648.         return $this->model->equals($that);    
    649. -
    650.     }
    651. -
    652.     
    653. -
    654.     /** 
    655. -
    656.     * Returns a new model that is the subtraction of another model from this model.
    657. -
    658.     *
    659. -
    660.     * @param    object Model $model 
    661. -
    662.     * @return    object MemModel 
    663. -
    664.     * @access    public
    665. -
    666.     * @throws phpErrpr
    667. -
    668.     */ 
    669. -
    670.     function subtract($model)
    671. -
    672.     {
    673. -
    674.         if (is_a($model,'ResModel'))
    675. -
    676.             return $this->model->subtract($model->getModel());
    677. -
    678.         return $this->model->subtract($model);
    679. -
    680.     }
    681. -
    682.     
    683. -
    684.     /** 
    685. -
    686.     * Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    687. -
    688.     * If none exist, return null; if several exist, pick one arbitrarily.
    689. -
    690.     *
    691. -
    692.     * @param    object ResResource $subject 
    693. -
    694.     * @param    object ResResource $property 
    695. -
    696.     * @return    object Statement 
    697. -
    698.     * @access    public
    699. -
    700.     * @throws phpErrpr
    701. -
    702.     */ 
    703. -
    704.     function getProperty($subject,$property)
    705. -
    706.     {
    707. -
    708.     
    709. -
    710.         $statement$this->model->findFirstMatchingStatement(    $this->_resNode2Node($subject),
    711. -
    712.                                                                 $this->_resNode2Node($property),
    713. -
    714.                                                                 null
    715. -
    716.                                                             );
    717. -
    718.         if ($statement === null)
    719. -
    720.             return null;
    721. -
    722.                                                                 
    723. -
    724.         return new Statement($this->_node2ResNode($statement->getSubject()),
    725. -
    726.                                     $this->_node2ResNode($statement->getPredicate(),true),
    727. -
    728.                                     $this->_node2ResNode($statement->getObject())
    729. -
    730.                             );
    731. -
    732.                                                     
    733. -
    734.     }
    735. -
    736.     
    737. -
    738.     /**
    739. -
    740.     * Checks if MemModel is empty
    741. -
    742.     *
    743. -
    744.     * @return    boolean 
    745. -
    746.     * @access    public
    747. -
    748.     */
    749. -
    750.     function isEmpty()
    751. -
    752.     {
    753. -
    754.         return $this->model->isEmpty();
    755. -
    756.     }
    757. -
    758.     
    759. -
    760.     /** 
    761. -
    762.     * Returns a ResIterator with all objects in a model.
    763. -
    764.     *
    765. -
    766.     * @return    object ResIterator 
    767. -
    768.     * @access    public
    769. -
    770.     * @throws phpErrpr
    771. -
    772.     */
    773. -
    774.     function listObjects()
    775. -
    776.     {
    777. -
    778.         return $this->listObjectsOfProperty(null);
    779. -
    780.     }
    781. -
    782.     
    783. -
    784.     /** 
    785. -
    786.     * Returns a ResIterator with all objects with a given property and property value.
    787. -
    788.     *
    789. -
    790.     * @param    object ResResource    $property 
    791. -
    792.     * @param    object ResResource    $value 
    793. -
    794.     * @return    object ResIterator 
    795. -
    796.     * @access    public
    797. -
    798.     */
    799. -
    800.     function listObjectsOfProperty($property$value null)
    801. -
    802.     {
    803. -
    804.         return new ResIterator(null,$property,$value,'o',$this);
    805. -
    806.     }
    807. -
    808.  
    809. -
    810.     
    811. -
    812.     /** 
    813. -
    814.     * Returns a ResIterator with all subjects in a model.
    815. -
    816.     *
    817. -
    818.     * @return    object ResIterator 
    819. -
    820.     * @access    public
    821. -
    822.     * @throws phpErrpr
    823. -
    824.     */
    825. -
    826.     function listSubjects()
    827. -
    828.     {
    829. -
    830.         return $this->listSubjectsWithProperty(null);
    831. -
    832.     }
    833. -
    834.     
    835. -
    836.     /** 
    837. -
    838.     * Returns a ResIterator with all subjects with a given property and property value.
    839. -
    840.     *
    841. -
    842.     * @param    object ResResource    $property 
    843. -
    844.     * @param    object ResResource    $value 
    845. -
    846.     * @return    object ResIterator 
    847. -
    848.     * @access    public
    849. -
    850.     * @throws phpErrpr
    851. -
    852.     */
    853. -
    854.     function listSubjectsWithProperty($property,$value null)
    855. -
    856.     {
    857. -
    858.         return new ResIterator(null,$property,$value,'s',$this);
    859. -
    860.     }
    861. -
    862.     
    863. -
    864.     /**
    865. -
    866.     * Removes the statement of ResResources(ResTriples) from the MemModel.
    867. -
    868.     * TRUE if the statement is removed.
    869. -
    870.     * FALSE otherwise.
    871. -
    872.     *
    873. -
    874.     * @param    object Statement    $statement 
    875. -
    876.     * @return   boolean 
    877. -
    878.     * @access    public
    879. -
    880.     * @throws    PhpError
    881. -
    882.     */    
    883. -
    884.     function remove($statement)
    885. -
    886.     {
    887. -
    888.         return $this->model->remove(new Statement(    $this->_resNode2Node($statement->getSubject()),
    889. -
    890.                                                     $this->_resNode2Node($statement->getPredicate()),
    891. -
    892.                                                     $this->_resNode2Node($statement->getObject())
    893. -
    894.                                                   ));
    895. -
    896.     }
    897. -
    898.     
    899. -
    900.     /**
    901. -
    902.     * Number of statements in the MemModel
    903. -
    904.     *
    905. -
    906.     * @return    integer 
    907. -
    908.     * @access    public
    909. -
    910.     */
    911. -
    912.     function size()
    913. -
    914.     {
    915. -
    916.         return $this->model->size();
    917. -
    918.     }
    919. -
    920.     
    921. -
    922.     /** 
    923. -
    924.     * Returns a new Model that is the set-union of the model with another model.
    925. -
    926.     * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
    927. -
    928.     *
    929. -
    930.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    931. -
    932.     * is another graph, which we will call the merge of the graphs.
    933. -
    934.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    935. -
    936.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    937. -
    938.     * graphs become a single node in the union graph (since by definition they are the same
    939. -
    940.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    941. -
    942.     * never merged. In particular, this means that every blank node in a merged graph can be
    943. -
    944.     * identified as coming from one particular graph in the original set of graphs.
    945. -
    946.     * 
    947. -
    948.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    949. -
    950.     * their corresponding N-triples documents and constructing the graph described by the merged
    951. -
    952.     * document, since if some of the documents use the same node identifiers, the merged document
    953. -
    954.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    955. -
    956.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    957. -
    958.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    959. -
    960.     * documents. (Not implemented yet !!!!!!!!!!!)
    961. -
    962.     *
    963. -
    964.     * @param    object Model    $model 
    965. -
    966.     * @return    object MemModel 
    967. -
    968.     * @access    public
    969. -
    970.     * @throws phpErrpr
    971. -
    972.     *
    973. -
    974.     */
    975. -
    976.     function unite($model)
    977. -
    978.     {
    979. -
    980.         if (is_a($model,'ResModel'))
    981. -
    982.             return $this->model->unite($model->getModel());
    983. -
    984.         return $this->model->unite($model);
    985. -
    986.     }
    987. -
    988.     
    989. -
    990.     /** 
    991. -
    992.     * Adds another model to this MemModel.
    993. -
    994.     * Duplicate statements are not removed.
    995. -
    996.     * If you don't want duplicates, use unite().
    997. -
    998.     * If any statement of the model to be added to this model contains a blankNode
    999. -
    1000.     * with an identifier already existing in this model, a new blankNode is generated.
    1001. -
    1002.     *
    1003. -
    1004.     * @param    object Model    $model 
    1005. -
    1006.     * @access    public
    1007. -
    1008.     * @throws phpErrpr
    1009. -
    1010.     *
    1011. -
    1012.     */
    1013. -
    1014.     function addModel(&$model)  
    1015. -
    1016.     {
    1017. -
    1018.         if (is_a($model,'ResModel'))
    1019. -
    1020.             return $this->model->addModel($model->getModel());
    1021. -
    1022.         return $this->model->addModel($model);
    1023. -
    1024.     }
    1025. -
    1026.     
    1027. -
    1028.     /**
    1029. -
    1030.     * Create a new RDF Container from type rdf:Alt
    1031. -
    1032.     * This method may return an existing container with the correct URI and model,
    1033. -
    1034.     * or it may construct a fresh one, as it sees fit.
    1035. -
    1036.     *
    1037. -
    1038.     * Subsequent operations on the returned Container may modify this model.
    1039. -
    1040.     *  
    1041. -
    1042.     *
    1043. -
    1044.        * @param    string    $uri 
    1045. -
    1046.        * @return    object ResProperty 
    1047. -
    1048.        * @access    public
    1049. -
    1050.        */
    1051. -
    1052.     function createAlt($uri null)
    1053. -
    1054.     {
    1055. -
    1056.         $resAlt new ResAlt($uri);
    1057. -
    1058.         $resAlt->setAssociatedModel($this);
    1059. -
    1060.             
    1061. -
    1062.         return $resAlt;        
    1063. -
    1064.     }
    1065. -
    1066.     
    1067. -
    1068.     /**
    1069. -
    1070.     * Create a new RDF Container from type rdf:Bag
    1071. -
    1072.     * This method may return an existing container with the correct URI and model,
    1073. -
    1074.     * or it may construct a fresh one, as it sees fit.
    1075. -
    1076.     *
    1077. -
    1078.     * Subsequent operations on the returned Container may modify this model.
    1079. -
    1080.     *  
    1081. -
    1082.     *
    1083. -
    1084.        * @param    string    $uri 
    1085. -
    1086.        * @return    object ResProperty 
    1087. -
    1088.        * @access    public
    1089. -
    1090.        */
    1091. -
    1092.     function createBag($uri null)
    1093. -
    1094.     {
    1095. -
    1096.         $resBag new ResBag($uri);
    1097. -
    1098.         $resBag->setAssociatedModel($this);
    1099. -
    1100.             
    1101. -
    1102.         return $resBag;
    1103. -
    1104.     }
    1105. -
    1106.     
    1107. -
    1108.     /**
    1109. -
    1110.     * Create a new RDF Container from type rdf:Seq
    1111. -
    1112.     * This method may return an existing container with the correct URI and model,
    1113. -
    1114.     * or it may construct a fresh one, as it sees fit.
    1115. -
    1116.     *
    1117. -
    1118.     * Subsequent operations on the returned Container may modify this model.
    1119. -
    1120.     *  
    1121. -
    1122.     *
    1123. -
    1124.        * @param    string    $uri 
    1125. -
    1126.        * @return    object ResProperty 
    1127. -
    1128.        * @access    public
    1129. -
    1130.        */
    1131. -
    1132.     function createSeq($uri null)
    1133. -
    1134.     {
    1135. -
    1136.         $resSeq new ResSeq($uri);
    1137. -
    1138.         $resSeq->setAssociatedModel($this);
    1139. -
    1140.             
    1141. -
    1142.         return $resSeq;
    1143. -
    1144.     }    
    1145. -
    1146.     
    1147. -
    1148.     /**
    1149. -
    1150.     * Create a new RDF Collection from type rdf:List
    1151. -
    1152.     * This method may return an existing container with the correct URI and model,
    1153. -
    1154.     * or it may construct a fresh one, as it sees fit.
    1155. -
    1156.     *
    1157. -
    1158.     * Subsequent operations on the returned Container may modify this model.
    1159. -
    1160.     *  
    1161. -
    1162.     *
    1163. -
    1164.        * @param    string    $uri 
    1165. -
    1166.        * @return    object ResProperty 
    1167. -
    1168.        * @access    public
    1169. -
    1170.        */
    1171. -
    1172.     function createList($uri null)
    1173. -
    1174.     {
    1175. -
    1176.         $resList new ResList($uri);
    1177. -
    1178.         $resList->setAssociatedModel($this);
    1179. -
    1180.             
    1181. -
    1182.         return $resList;    
    1183. -
    1184.     }
    1185. -
    1186.     
    1187. -
    1188.     /**
    1189. -
    1190.     * Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    1191. -
    1192.     *  
    1193. -
    1194.     *
    1195. -
    1196.        * @return    object Model 
    1197. -
    1198.        * @access    public
    1199. -
    1200.        */    
    1201. -
    1202.     function getModel()
    1203. -
    1204.     {
    1205. -
    1206.         return  $this->model;
    1207. -
    1208.     }
    1209. -
    1210.     
    1211. -
    1212.     
    1213. -
    1214.     /**
    1215. -
    1216.     * Internal method, that returns a resource URI that is unique for the Model.
    1217. -
    1218.     * URIs are generated using the base_uri of the Model, the prefix and a unique number.
    1219. -
    1220.     * If no prefix is defined, the bNode prefix, defined in constants.php, is used.
    1221. -
    1222.     *
    1223. -
    1224.     * @param    string    $prefix 
    1225. -
    1226.     * @return    string 
    1227. -
    1228.     * @access    private
    1229. -
    1230.     */
    1231. -
    1232.     function getUniqueResourceURI($bnodePrefix)
    1233. -
    1234.     {
    1235. -
    1236.         return $this->model->getUniqueResourceURI($bnodePrefix);
    1237. -
    1238.     }
    1239. -
    1240.     
    1241. -
    1242.     /**
    1243. -
    1244.     * Load a model from a file containing RDF, N3 or N-Triples.
    1245. -
    1246.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    1247. -
    1248.     * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
    1249. -
    1250.     * If the model is not empty, the contents of the file is added to this DbModel.
    1251. -
    1252.     *
    1253. -
    1254.     * @param     string     $filename 
    1255. -
    1256.     * @param     string     $type 
    1257. -
    1258.     * @param   boolean $stream 
    1259. -
    1260.     * @access    public
    1261. -
    1262.     */
    1263. -
    1264.     function load($filename$type NULL$stream=false)
    1265. -
    1266.     {
    1267. -
    1268.         $this->model->load($filename$type NULL$stream=false);
    1269. -
    1270.     }
    1271. -
    1272.     
    1273. -
    1274.     /**
    1275. -
    1276.     * Return current baseURI.
    1277. -
    1278.     *
    1279. -
    1280.     * @return  string 
    1281. -
    1282.     * @access    public
    1283. -
    1284.     */
    1285. -
    1286.     function getBaseURI()  
    1287. -
    1288.     {
    1289. -
    1290.         return $this->model->getBaseURI();
    1291. -
    1292.     }
    1293. -
    1294.  
    1295. -
    1296.     /**
    1297. -
    1298.     * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    1299. -
    1300.     * You can decide to which format the model should be serialized by using a
    1301. -
    1302.     * corresponding suffix-string as $type parameter. If no $type parameter
    1303. -
    1304.     * is placed this method will serialize the model to XML/RDF format.
    1305. -
    1306.     * Returns FALSE if the MemModel couldn't be saved to the file.
    1307. -
    1308.     *
    1309. -
    1310.     * @access    public
    1311. -
    1312.     * @param     string     $filename 
    1313. -
    1314.     * @param     string     $type 
    1315. -
    1316.     * @throws   PhpError
    1317. -
    1318.     * @return    boolean 
    1319. -
    1320.     */  
    1321. -
    1322.     function saveAs($filename$type ='rdf'
    1323. -
    1324.     {
    1325. -
    1326.         return $this->model->saveAs($filename$type ='rdf');
    1327. -
    1328.     }
    1329. -
    1330.     
    1331. -
    1332.     /**
    1333. -
    1334.     * Writes the RDF serialization of the MemModel as HTML table.
    1335. -
    1336.     *
    1337. -
    1338.     * @access    public
    1339. -
    1340.     */  
    1341. -
    1342.     function writeAsHTMLTable()
    1343. -
    1344.     {
    1345. -
    1346.         $this->model->writeAsHtmlTable();
    1347. -
    1348.     }
    1349. -
    1350.     
    1351. -
    1352.     /** 
    1353. -
    1354.     * Returns a new model containing all the statements which are in both this model and another.
    1355. -
    1356.     *
    1357. -
    1358.     * @param    object Model    $model 
    1359. -
    1360.     * @return    object MemModel 
    1361. -
    1362.     * @access    public
    1363. -
    1364.     * @throws phpErrpr
    1365. -
    1366.     */ 
    1367. -
    1368.     function intersect($model)
    1369. -
    1370.     {
    1371. -
    1372.         if (is_a($model,'ResModel'))
    1373. -
    1374.             return $this->model->intersect($model->getModel());
    1375. -
    1376.         return $this->model->intersect($model);
    1377. -
    1378.     }
    1379. -
    1380.     
    1381. -
    1382.     /** 
    1383. -
    1384.     * converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral
    1385. -
    1386.     *
    1387. -
    1388.     * @param    object Node    $node 
    1389. -
    1390.     * @param    boolean        $isProperty 
    1391. -
    1392.     * @return    object ResResource / ResProperty / ResLiteral
    1393. -
    1394.     * @access    private
    1395. -
    1396.     * @throws phpErrpr
    1397. -
    1398.     */ 
    1399. -
    1400.     function _node2ResNode($node$isProperty false)
    1401. -
    1402.     {
    1403. -
    1404.         if (is_a($node,'Literal'))
    1405. -
    1406.         {
    1407. -
    1408.             $returnnew ResLiteral($node->getLabel(),$node->getLanguage());
    1409. -
    1410.             $return->setDatatype($node->getDatatype());
    1411. -
    1412.             $return->setAssociatedModel($this);
    1413. -
    1414.  
    1415. -
    1416.             return $return;
    1417. -
    1418.         }
    1419. -
    1420.         if (is_a($node,'Resource'))
    1421. -
    1422.         {
    1423. -
    1424.             if ($isProperty)
    1425. -
    1426.             {
    1427. -
    1428.                 $resnew ResProperty($node->getLabel());
    1429. -
    1430.             else 
    1431. -
    1432.             {
    1433. -
    1434.                 $resnew ResResource($node->getLabel());
    1435. -
    1436.             }
    1437. -
    1438.             $res->setAssociatedModel($this);
    1439. -
    1440.             if (is_a($node,'Blanknode'))
    1441. -
    1442.                 $res->setIsAnon(true);    
    1443. -
    1444.         
    1445. -
    1446.             return $res;
    1447. -
    1448.         }
    1449. -
    1450.     }
    1451. -
    1452.     
    1453. -
    1454.     /** 
    1455. -
    1456.     * converts a ResResource, ResProperty, or ResLiteral into a Resource, Blanknode, or Literal
    1457. -
    1458.     *
    1459. -
    1460.     * @param    object ResNode    $resNode 
    1461. -
    1462.     * @return    object Node 
    1463. -
    1464.     * @access    private
    1465. -
    1466.     * @throws phpErrpr
    1467. -
    1468.     */ 
    1469. -
    1470.     function _resNode2Node($resNode)
    1471. -
    1472.     {
    1473. -
    1474.         if (is_a($resNode,'ResResource'))
    1475. -
    1476.         {
    1477. -
    1478.             if ($resNode->getIsAnon())    
    1479. -
    1480.             {
    1481. -
    1482.                 $return=new BlankNode($resNode->getURI());
    1483. -
    1484.             else 
    1485. -
    1486.             {
    1487. -
    1488.                 $return=new Resource($resNode->getURI());    
    1489. -
    1490.             }    
    1491. -
    1492.         return $return;    
    1493. -
    1494.         }
    1495. -
    1496.         
    1497. -
    1498.         if (is_a($resNode,'ResLiteral'))
    1499. -
    1500.         {
    1501. -
    1502.             $literal=new Literal($resNode->getLabel(),$resNode->getLanguage());
    1503. -
    1504.             if ($resNode->getDatatype(!= null)
    1505. -
    1506.                 $literal->setDatatype($resNode->getDatatype());
    1507. -
    1508.             return $literal;
    1509. -
    1510.         }
    1511. -
    1512.     }
    1513. -
    1514.     
    1515. -
    1516.     /**
    1517. -
    1518.     * Set a base URI for the MemModel.
    1519. -
    1520.     * Affects creating of new resources and serialization syntax.
    1521. -
    1522.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    1523. -
    1524.     * @param    string    $uri 
    1525. -
    1526.     * @access    public
    1527. -
    1528.     */
    1529. -
    1530.     function setBaseURI($uri
    1531. -
    1532.     {
    1533. -
    1534.         $this->model->setBaseURI($uri);
    1535. -
    1536.     }
    1537. -
    1538.     
    1539. -
    1540.     /**
    1541. -
    1542.     * Writes the RDF serialization of the MemModel as HTML table.
    1543. -
    1544.     *
    1545. -
    1546.     * @access    public
    1547. -
    1548.     * @return    string 
    1549. -
    1550.     */  
    1551. -
    1552.     function writeRdfToString(
    1553. -
    1554.     {
    1555. -
    1556.         return $this->model->writeRdfToString();    
    1557. -
    1558.     }
    1559. -
    1560.     
    1561. -
    1562.     /**
    1563. -
    1564.     * Perform an RDQL query on this MemModel.
    1565. -
    1566.     * This method returns an associative array of variable bindings.
    1567. -
    1568.     * The values of the query variables can either be RAP's objects (instances of Node)
    1569. -
    1570.     * if $returnNodes set to TRUE, or their string serialization.
    1571. -
    1572.     *
    1573. -
    1574.     * @access    public
    1575. -
    1576.     * @param string $queryString 
    1577. -
    1578.     * @param boolean $returnNodes 
    1579. -
    1580.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1581. -
    1582.     *       OR  array   [][?VARNAME] = string
    1583. -
    1584.     *
    1585. -
    1586.     */
    1587. -
    1588.     function rdqlQuery($queryString$returnNodes TRUE
    1589. -
    1590.     {
    1591. -
    1592.         return $this->model->rdqlQuery($queryString$returnNodes);
    1593. -
    1594.     }
    1595. -
    1596.     
    1597. -
    1598.     /**
    1599. -
    1600.     * Perform an RDQL query on this MemModel.
    1601. -
    1602.     * This method returns an RdqlResultIterator of variable bindings.
    1603. -
    1604.     * The values of the query variables can either be RAP's objects (instances of Node)
    1605. -
    1606.     * if $returnNodes set to TRUE, or their string serialization.
    1607. -
    1608.     *
    1609. -
    1610.     * @access    public
    1611. -
    1612.     * @param string $queryString 
    1613. -
    1614.     * @param boolean $returnNodes 
    1615. -
    1616.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1617. -
    1618.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1619. -
    1620.     *
    1621. -
    1622.     */
    1623. -
    1624.     function rdqlQueryAsIterator($queryString$returnNodes TRUE
    1625. -
    1626.     {
    1627. -
    1628.         return $this->model->rdqlQueryAsIterator($queryString$returnNodes);
    1629. -
    1630.     }
    1631. -
    1632.     
    1633. -
    1634.     
    1635. -
    1636.     /**
    1637. -
    1638.     * Returns the models namespaces.
    1639. -
    1640.     *
    1641. -
    1642.     * @author   Tobias Gau <tobias.gauss@web.de>
    1643. -
    1644.     * @access   public
    1645. -
    1646.     * @return   Array 
    1647. -
    1648.     */
    1649. -
    1650.     function getParsedNamespaces(){
    1651. -
    1652.         return $this->model->getParsedNamespaces();
    1653. -
    1654.     }
    1655. -
    1656.  
    1657. -
    1658.  
    1659. -
    1660.  
    1661. -
    1662.     /**
    1663. -
    1664.     * Adds the namespaces to the model. This method is called by
    1665. -
    1666.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    1667. -
    1668.     * added namespaces in the model !!!!
    1669. -
    1670.     *
    1671. -
    1672.     * @author   Tobias Gau <tobias.gauss@web.de>
    1673. -
    1674.     * @access   public
    1675. -
    1676.     * @param    Array $newNs 
    1677. -
    1678.     */
    1679. -
    1680.     function addParsedNamespaces($newNs){
    1681. -
    1682.         $this->model->addParsedNamespaces($newNs);
    1683. -
    1684.     }
    1685. -
    1686.  
    1687. -
    1688.  
    1689. -
    1690.     /**
    1691. -
    1692.     * Adds a namespace and prefix to the model.
    1693. -
    1694.     *
    1695. -
    1696.     * @author   Tobias Gau <tobias.gauss@web.de>
    1697. -
    1698.     * @access   public
    1699. -
    1700.     * @param    String $prefix, String $nmsp
    1701. -
    1702.     */
    1703. -
    1704.     function addNamespace($prefix$namespace){
    1705. -
    1706.         $this->model->addNamespace($prefix$namespace);
    1707. -
    1708.     }
    1709. -
    1710.     
    1711. -
    1712.     /**
    1713. -
    1714.     * removes a single namespace from the model
    1715. -
    1716.     *
    1717. -
    1718.     * @author   Tobias Gau <tobias.gauss@web.de>
    1719. -
    1720.     * @access   public
    1721. -
    1722.     * @param    String $nmsp 
    1723. -
    1724.     */
    1725. -
    1726.     function removeNamespace($nmsp){
    1727. -
    1728.         return $this->model->removeNamespace($nmsp);
    1729. -
    1730.     }
    1731. -
    1732.  
    1733. -
    1734.     
    1735. -
    1736.     
    1737. -
    1738.     
    1739. -
    1740.     
    1741. -
    1742.     
    1743. -
    1744. }
    1745. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResProperty.php.html.svn-base deleted file mode 100755 index f6a1e534..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResProperty.php.html.svn-base +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for ResProperty.php - - - - - -

    Source for file ResProperty.php

    -

    Documentation is available at ResProperty.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResProperty
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF Property.
    14. -
    15. *
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @package resModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class ResProperty extends ResResource  
    34. -
    35. {
    36. -
    37.     
    38. -
    39.     /**
    40. -
    41.     * Constructor
    42. -
    43.     * You can supply a URI
    44. -
    45.     *
    46. -
    47.     * @param string $uri 
    48. -
    49.     * @access    public
    50. -
    51.     */    
    52. -
    53.     function ResProperty($uri)
    54. -
    55.     {
    56. -
    57.         parent::ResResource($uri);
    58. -
    59.     }
    60. -
    61. -
    62. ?>
    63. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResResource.php.html.svn-base deleted file mode 100755 index 0a704dd5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResResource.php.html.svn-base +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - File Source for ResResource.php - - - - - -

    Source for file ResResource.php

    -

    Documentation is available at ResResource.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * Class: ResResource
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. @package resModel
    12. -
    13. ***/
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * An RDF Resource.
    20. -
    21. * Resource instances, when created, are associated with a specific model. They support a
    22. -
    23. * range of methods, such as getProperty() and addProperty() which will access or modify
    24. -
    25. * that model. This enables the programmer to write code in a compact and easy style.
    26. -
    27. *
    28. -
    29. @version  $Id$
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33. *
    34. -
    35. *
    36. -
    37. @package resModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43. class ResResource extends Resource 
    44. -
    45. {
    46. -
    47.     /**
    48. -
    49.     * Holds a reference to the associated model
    50. -
    51.     * @var        ResModel 
    52. -
    53.     * @access    private
    54. -
    55.     */
    56. -
    57.     var $model;
    58. -
    59.     
    60. -
    61.     /**
    62. -
    63.     * Is true, if this resource is an anonymous node.
    64. -
    65.     * @var        boolean 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $isAnon;
    72. -
    73.     
    74. -
    75.     
    76. -
    77.     /**
    78. -
    79.     * Constructor
    80. -
    81.     * You can supply a uri
    82. -
    83.     *
    84. -
    85.     * @param string $uri 
    86. -
    87.     * @access    public
    88. -
    89.     */        
    90. -
    91.     function ResResource($uri)
    92. -
    93.     {
    94. -
    95.             parent::Resource($uri);
    96. -
    97.             $this->isAnon ($uri === null);        
    98. -
    99.     }
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     * Sets the reference to the assocoated model.
    106. -
    107.     *
    108. -
    109.     * @param    object Model    $model 
    110. -
    111.     * @access public
    112. -
    113.     */    
    114. -
    115.     function setAssociatedModel($model)
    116. -
    117.     {
    118. -
    119.         $this->model=$model;
    120. -
    121.         if ($this->isAnon)
    122. -
    123.             $this->uri=$this->model->getUniqueResourceURI(BNODE_PREFIX);
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Get the reference to the assocoated model.
    132. -
    133.     *
    134. -
    135.     * @return    object Model    $model
    136. -
    137.     * @access public
    138. -
    139.     */
    140. -
    141.     function getAssociatedModel()
    142. -
    143.     {
    144. -
    145.         return $this->model;
    146. -
    147.     }
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * Sets the URI of this resource
    154. -
    155.     *
    156. -
    157.     * @param    string $uri 
    158. -
    159.     * @access public
    160. -
    161.     */    
    162. -
    163.     function setURI($uri)
    164. -
    165.     {
    166. -
    167.         $this->uri $uri;
    168. -
    169.     }
    170. -
    171.     
    172. -
    173.     /**
    174. -
    175.     * Add a property to this resource.
    176. -
    177.     * A statement with this resource as the subject, p as the predicate and o
    178. -
    179.     * as the object is added to the model associated with this resource.
    180. -
    181.     *
    182. -
    183.        * @param    ResResource                $property 
    184. -
    185.        * @param    ResResource/ResLiteral    $object 
    186. -
    187.        * @return    object ResResource 
    188. -
    189.        * @access    public
    190. -
    191.        */
    192. -
    193.     function addProperty($property,$object)
    194. -
    195.     {
    196. -
    197.         $this->model->add(new Statement($this,$property,$object));
    198. -
    199.  
    200. -
    201.         return $this;
    202. -
    203.     }
    204. -
    205.     
    206. -
    207.     /**
    208. -
    209.     * List all the values with the property p as statements in an array.
    210. -
    211.     *
    212. -
    213.        * @param    ResResource        $property 
    214. -
    215.        * @return    ResIterator 
    216. -
    217.        * @access    public
    218. -
    219.        */
    220. -
    221.     function listProperties($property null)
    222. -
    223.     {
    224. -
    225.         return $this->model->find($this,$property,null);
    226. -
    227.     }
    228. -
    229.     
    230. -
    231.     /**
    232. -
    233.     * Answer some statement (this, p, O) in the associated model.
    234. -
    235.     * If there are several such statements, any one of them may be returned.
    236. -
    237.     * If no such statements exist, null is returned.
    238. -
    239.     *
    240. -
    241.        * @param    ResResource                $property 
    242. -
    243.        * @return    object ResResource 
    244. -
    245.        * @access    public
    246. -
    247.        */    
    248. -
    249.     function getProperty($property)
    250. -
    251.     {
    252. -
    253.         return $this->model->getProperty($this,$property);
    254. -
    255.     }
    256. -
    257.     
    258. -
    259.     /**
    260. -
    261.     * Determine whether this resource has any values for a given property.
    262. -
    263.     *
    264. -
    265.        * @param    ResResource        $property 
    266. -
    267.        * @param    ResResource        $value 
    268. -
    269.        * @return    object ResResource 
    270. -
    271.        * @access    public
    272. -
    273.        */    
    274. -
    275.     function hasProperty($property$value null)
    276. -
    277.     {
    278. -
    279.         $ret$this->model->findFirstMatchingStatement($this,$property,$value);
    280. -
    281.         
    282. -
    283.         return ($ret!==null);    
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Determine whether this resource is an anonymous resource
    292. -
    293.     *
    294. -
    295.        * @return    boolean 
    296. -
    297.        * @access    public
    298. -
    299.        */        
    300. -
    301.     function getIsAnon()
    302. -
    303.     {
    304. -
    305.         return $this->isAnon;    
    306. -
    307.     }
    308. -
    309.     
    310. -
    311.     /**
    312. -
    313.     * Set whether this resource is an anonymous resource
    314. -
    315.     *
    316. -
    317.        * @param    boolean 
    318. -
    319.        * @access    public
    320. -
    321.        */    
    322. -
    323.     function setIsAnon($isAnon)
    324. -
    325.     {
    326. -
    327.          $this->isAnon=$isAnon;    
    328. -
    329.     }
    330. -
    331.         
    332. -
    333.     /**
    334. -
    335.     * Checks if the resource equals another resource.
    336. -
    337.     * Two resources are equal, if they have the same URI
    338. -
    339.     *
    340. -
    341.     * @access    public
    342. -
    343.     * @param    object    resource $that 
    344. -
    345.     * @return    boolean 
    346. -
    347.     */  
    348. -
    349.     function equals ($that
    350. -
    351.     {
    352. -
    353.         if (is_a($that,'ResLiteral'))
    354. -
    355.             return $that->equals($this);
    356. -
    357.             
    358. -
    359.         return ($that!==null && ($this->getURI(== $that->getURI()));
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Delete all the statements with predicate p for this resource from
    368. -
    369.     * its associated model.
    370. -
    371.     *
    372. -
    373.     * @access    public
    374. -
    375.     * @param    object    resource $property 
    376. -
    377.     * @return    object ResResource 
    378. -
    379.     */ 
    380. -
    381.     function removeAll($property null)
    382. -
    383.     {    
    384. -
    385.         foreach ($this->model->find($this,$property,nullas $statement)
    386. -
    387.         {
    388. -
    389.             $this->model->remove($statement);    
    390. -
    391.         }
    392. -
    393.         return $this;
    394. -
    395.     }
    396. -
    397.     
    398. -
    399.     /**
    400. -
    401.     * Delete all the properties for this resource from the associated model.
    402. -
    403.     *
    404. -
    405.     * @access    public
    406. -
    407.     * @return    object ResResource 
    408. -
    409.     */ 
    410. -
    411.     function removeProperties()
    412. -
    413.     {
    414. -
    415.         $this->removeAll();
    416. -
    417.         return $this;
    418. -
    419.     }
    420. -
    421. }
    422. -
    423. ?>
    424. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResSeq.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResSeq.php.html.svn-base deleted file mode 100755 index 91a5c2a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_resModel__resModelResSeq.php.html.svn-base +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - File Source for ResSeq.php - - - - - -

    Source for file ResSeq.php

    -

    Documentation is available at ResSeq.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResSeq
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Sequence resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResSeq extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */        
    50. -
    51.     function ResSeq($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_SEQ);
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     * Insert a new member into the sequence at the specified position.
    66. -
    67.     * The existing member at that position, and all others with higher indexes,
    68. -
    69.     * have their index increased by one.
    70. -
    71.     *
    72. -
    73.     * @param     integer    $index 
    74. -
    75.        * @param    object ResResource/ResLiteral    $resResource 
    76. -
    77.        * @return    boolean 
    78. -
    79.        * @access    public
    80. -
    81.        */
    82. -
    83.     function addAtIndex($index$object)
    84. -
    85.     {
    86. -
    87.         //get a members index
    88. -
    89.         $memberIndex$this->getMembers();
    90. -
    91.                 
    92. -
    93.         //type this container, if it isn't already typed
    94. -
    95.         if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
    96. -
    97.             $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
    98. -
    99.         
    100. -
    101.         //renumber all higher members
    102. -
    103.         for ($i count($memberIndex);$i >= $index $i--)
    104. -
    105.         {
    106. -
    107.             $this->removeAll($this->_getMembershipPropertyWithIndex($i));
    108. -
    109.             $this->addProperty($this->_getMembershipPropertyWithIndex($i+1),$memberIndex[$i]);
    110. -
    111.         }    
    112. -
    113.         //remove the old value at this position
    114. -
    115.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    116. -
    117.         //add the new value
    118. -
    119.         $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
    120. -
    121.                 
    122. -
    123.         return $this;
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Get the member at a given index
    132. -
    133.     *
    134. -
    135.     * @param     integer    $index 
    136. -
    137.        * @return    object ResResource/ResLiteral 
    138. -
    139.        * @access    public
    140. -
    141.        */
    142. -
    143.     function getMember($index)
    144. -
    145.     {
    146. -
    147.         $result=$this->listProperties($this->_getMembershipPropertyWithIndex($index));
    148. -
    149.         if (isset($result[0]))
    150. -
    151.         {
    152. -
    153.             return $result[0];
    154. -
    155.         
    156. -
    157.         else 
    158. -
    159.         {
    160. -
    161.             return null;
    162. -
    163.         }
    164. -
    165.     }
    166. -
    167.     
    168. -
    169.     /**
    170. -
    171.     * Return the index of a given member of the sequence.
    172. -
    173.     * If the same value appears more than once in the sequence, it is undefined
    174. -
    175.     * which of the indexes will be returned.
    176. -
    177.     * If the member is not found in this sequence, a value of 0 is returned.
    178. -
    179.     *
    180. -
    181.     * @param     object ResResource/ResLiteral $object 
    182. -
    183.        * @return    integer 
    184. -
    185.        * @access    public
    186. -
    187.        */
    188. -
    189.     function indexOf($object)
    190. -
    191.     {
    192. -
    193.         //check all members, until $object is found
    194. -
    195.         foreach ($this->listProperties(as $statement)
    196. -
    197.         {
    198. -
    199.             $predicateLabel=$statement->getLabelPredicate();
    200. -
    201.             if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
    202. -
    203.             {
    204. -
    205.                 if($object->equals($statement->getObject()))
    206. -
    207.                     //analyze the container membership property and return the index
    208. -
    209.                     return $this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel);
    210. -
    211.             }    
    212. -
    213.         }
    214. -
    215.         //return 0 if $object wasn't found
    216. -
    217.         return 0;
    218. -
    219.     }
    220. -
    221.     
    222. -
    223.     /**
    224. -
    225.     * Remove the member at the specified index.
    226. -
    227.     * All other members with a higher index will have their index reduced by one.
    228. -
    229.     *
    230. -
    231.     * @param     integer    $index 
    232. -
    233.        * @access    public
    234. -
    235.        */
    236. -
    237.     function removeAtIndex($index)
    238. -
    239.     {
    240. -
    241.         $memberIndex$this->getMembers();
    242. -
    243.  
    244. -
    245.  
    246. -
    247.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    248. -
    249.  
    250. -
    251.         for ($i $index;$i count($memberIndex)$i++)
    252. -
    253.         {
    254. -
    255.             $this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
    256. -
    257.             $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
    258. -
    259.         }        
    260. -
    261.         return $this;
    262. -
    263.     }
    264. -
    265.     
    266. -
    267.     /**
    268. -
    269.     * Set the value at a given index in the sequence.
    270. -
    271.     *
    272. -
    273.     * If the index is not in the range of the sequence, false is returned
    274. -
    275.     *
    276. -
    277.     * @param     integer    $index 
    278. -
    279.        * @return    boolean 
    280. -
    281.        * @access    public
    282. -
    283.        */
    284. -
    285.     function set($index$object)
    286. -
    287.     {
    288. -
    289.         if (!$this->hasProperty($this->_getMembershipPropertyWithIndex($index)))
    290. -
    291.             return false;
    292. -
    293.             
    294. -
    295.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    296. -
    297.         $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
    298. -
    299.         return true;
    300. -
    301.     }
    302. -
    303. }
    304. -
    305. ?>
    306. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlClientQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlClientQuery.php.html.svn-base deleted file mode 100755 index c4657a7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlClientQuery.php.html.svn-base +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - File Source for ClientQuery.php - - - - - -

    Source for file ClientQuery.php

    -

    Documentation is available at ClientQuery.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: ClientQuery
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * ClientQuery Object to run a SPARQL Query against a SPARQL server.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author   Tobias Gau <tobias.gauss@web.de>
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class ClientQuery extends Object {
    32. -
    33.  
    34. -
    35.     var $default  = array();
    36. -
    37.     var $named    = array();
    38. -
    39.     var $prefixes = array();
    40. -
    41.     var $query;
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Adds a default graph to the query object.
    48. -
    49.     *
    50. -
    51.     * @param String  $default  default graph name
    52. -
    53.     */
    54. -
    55.     function addDefaultGraph($default){
    56. -
    57.         if(!in_array($this->named,$this->default))
    58. -
    59.         $this->default[$default;
    60. -
    61.     }
    62. -
    63.     /**
    64. -
    65.     * Adds a named graph to the query object.
    66. -
    67.     *
    68. -
    69.     * @param String  $default  named graph name
    70. -
    71.     */
    72. -
    73.     function addNamedGraph($named){
    74. -
    75.         if(!in_array($named,$this->named))
    76. -
    77.         $this->named[$named;
    78. -
    79.     }
    80. -
    81.     /**
    82. -
    83.     * Adds the SPARQL query string to the query object.
    84. -
    85.     *
    86. -
    87.     * @param String  $query the query string
    88. -
    89.     */
    90. -
    91.     function query($query){
    92. -
    93.         $this->query = $query;
    94. -
    95.     }
    96. -
    97.  
    98. -
    99. }
    100. -
    101.  
    102. -
    103.  
    104. -
    105.  
    106. -
    107.  
    108. -
    109. ?>
    110. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlConstraint.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlConstraint.php.html.svn-base deleted file mode 100755 index 9b1c96ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlConstraint.php.html.svn-base +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - File Source for Constraint.php - - - - - -

    Source for file Constraint.php

    -

    Documentation is available at Constraint.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. // ---------------------------------------------
    6. -
    7. // class: Constraint.php
    8. -
    9. // ---------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Represents a constraint. A value constraint is a boolean- valued expression
    18. -
    19. * of variables and RDF Terms.
    20. -
    21. *
    22. -
    23. @author   Tobias Gauss <tobias.gauss@web.de>
    24. -
    25. @version     $Id$
    26. -
    27. *
    28. -
    29. @package sparql
    30. -
    31. */
    32. -
    33. Class Constraint extends Object{
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     * The expression string.
    40. -
    41.     * @var string 
    42. -
    43.     */
    44. -
    45.     protected $expression;
    46. -
    47.  
    48. -
    49.     /**
    50. -
    51.     *  True if it is an outer filter, false if not.
    52. -
    53.     * @var boolean 
    54. -
    55.     */
    56. -
    57.     protected $outer;
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     *   The expression tree
    64. -
    65.     *   @var array 
    66. -
    67.     */
    68. -
    69.     protected $tree = null;
    70. -
    71.  
    72. -
    73.     /**
    74. -
    75.     * Adds an expression string.
    76. -
    77.     *
    78. -
    79.     * @param  String $exp the expression String
    80. -
    81.     * @return void 
    82. -
    83.     */
    84. -
    85.     public function addExpression($exp)
    86. -
    87.     {
    88. -
    89.         $this->expression = $exp;
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Returns the expression string.
    98. -
    99.     *
    100. -
    101.     * @return String  the expression String
    102. -
    103.     */
    104. -
    105.     public function getExpression()
    106. -
    107.     {
    108. -
    109.         return $this->expression;
    110. -
    111.     }
    112. -
    113.  
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Sets the filter type to outer or inner filter.
    120. -
    121.     * True for outer false for inner.
    122. -
    123.     *
    124. -
    125.     * @param  boolean $boolean 
    126. -
    127.     * @return void 
    128. -
    129.     */
    130. -
    131.     public function setOuterFilter($boolean)
    132. -
    133.     {
    134. -
    135.         $this->outer = $boolean;
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     /**
    142. -
    143.     * Returns true if this constraint is an outer filter- false if not.
    144. -
    145.     *
    146. -
    147.     * @return boolean 
    148. -
    149.     */
    150. -
    151.     public function isOuterFilter()
    152. -
    153.     {
    154. -
    155.         return $this->outer;
    156. -
    157.     }
    158. -
    159.  
    160. -
    161.  
    162. -
    163.     public function getTree()
    164. -
    165.     {
    166. -
    167.         return $this->tree;
    168. -
    169.     }//public function getTree()
    170. -
    171.  
    172. -
    173.     public function setTree($tree)
    174. -
    175.     {
    176. -
    177.         $this->tree = $tree;
    178. -
    179.     }//public function setTree($tree)
    180. -
    181.  
    182. -
    183. }
    184. -
    185. // end class: Constraint.php
    186. -
    187. ?>
    188. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base deleted file mode 100755 index 4a5d9ecd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlFilterFunctions.php.html.svn-base +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - File Source for FilterFunctions.php - - - - - -

    Source for file FilterFunctions.php

    -

    Documentation is available at FilterFunctions.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * List of functions used to evaluate the FILTER statements in
    6. -
    7. * SPARQL queries.
    8. -
    9. *
    10. -
    11. @package sparql
    12. -
    13. @author   Tobias Gauss <tobias.gauss@web.de>
    14. -
    15. @version     $Id$
    16. -
    17. *
    18. -
    19. */
    20. -
    21.  
    22. -
    23.  
    24. -
    25.  
    26. -
    27.  
    28. -
    29. /**
    30. -
    31. * Evaluates the regex() function. Returns true if the regex is matched false if not.
    32. -
    33. *
    34. -
    35. @param String  $string   the string which has to be evaluated
    36. -
    37. @param String  $pattern  the regex pattern
    38. -
    39. @param String  $flags    additional flags like "i"
    40. -
    41. @return boolean 
    42. -
    43. */
    44. -
    45. function regex($string,$pattern,$flags ''){
    46. -
    47.     $string trim($string);
    48. -
    49.     $pattern trim($pattern);
    50. -
    51.     if(strpos($string,"str_")===0){
    52. -
    53.         $string substr($string,4);
    54. -
    55.         $pattern substr($pattern,4);
    56. -
    57.         $flags substr($flags,4);
    58. -
    59.     }else{
    60. -
    61.         return false;
    62. -
    63.     }
    64. -
    65.     if(preg_match('/'.$pattern.'/'.$flags,$string))
    66. -
    67.     return true;
    68. -
    69.     else
    70. -
    71.     return false;
    72. -
    73. }
    74. -
    75.  
    76. -
    77. /**
    78. -
    79. * Evaluates the dateTime() function.Tries to convert a date string into
    80. -
    81. * a unix timestamp.
    82. -
    83. *
    84. -
    85. @param  String $string the date string
    86. -
    87. @return integer        the corresponding unix timestamp
    88. -
    89. */
    90. -
    91. function dateTime($string){
    92. -
    93.     $string trim($string);
    94. -
    95.     if(strpos($string,"str_")===0)
    96. -
    97.     $string substr($string,4);
    98. -
    99.  
    100. -
    101.     $time strtotime($string);
    102. -
    103.     if($time == -1)
    104. -
    105.     return $string;
    106. -
    107.     else
    108. -
    109.     return $time;
    110. -
    111. }
    112. -
    113.  
    114. -
    115.  
    116. -
    117. /**
    118. -
    119. * Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    120. -
    121. *
    122. -
    123. @param String $lang_range the string.
    124. -
    125. @param String $lang_tag the regex pattern
    126. -
    127. @return boolean 
    128. -
    129. */
    130. -
    131. function langMatches($lang_range,$lang_tag){
    132. -
    133.  
    134. -
    135.     if($lang_range == null)
    136. -
    137.     return false;
    138. -
    139.  
    140. -
    141.     if(strpos($lang_range,"str_")===0)
    142. -
    143.     $lang_range substr($lang_range,4);
    144. -
    145.     if(strpos($lang_tag,"str_")===0)
    146. -
    147.     $lang_tag substr($lang_tag,4);
    148. -
    149.  
    150. -
    151.     if(strtolower($lang_range== strtolower($lang_tag))
    152. -
    153.     return true;
    154. -
    155.     $tags =  preg_match_all("/[^\-\s].[^\-\s]*/",$lang_range,$hits);
    156. -
    157.     if($tags){
    158. -
    159.         if($lang_tag == '*')
    160. -
    161.         return true;
    162. -
    163.         foreach($hits[0as $tag){
    164. -
    165.             if(strtolower($tag== strtolower($lang_tag))
    166. -
    167.             return true;
    168. -
    169.         }
    170. -
    171.         return false;
    172. -
    173.     }else{
    174. -
    175.         return false;
    176. -
    177.     }
    178. -
    179. }
    180. -
    181.  
    182. -
    183. /**
    184. -
    185. * Evaluates the str() function. Returns the string representation of a
    186. -
    187. * variable or RDF term.
    188. -
    189. *
    190. -
    191. @param  String $string the string
    192. -
    193. @return boolean 
    194. -
    195. */
    196. -
    197. function str($string){
    198. -
    199.     $str preg_match("/\".[^\"]*\"|\'.[^\']*\'/",$string,$hits);
    200. -
    201.     if($str != 0){
    202. -
    203.         return "str_".$hits[0];
    204. -
    205.     }else{
    206. -
    207.         if(strpos($string,"str_")===0){
    208. -
    209.             return $string;
    210. -
    211.         }else{
    212. -
    213.             if(strpos($string,"uri_")===0)
    214. -
    215.                 return "str_".substr($string,4);
    216. -
    217.             if(strpos($string,'<')==0)
    218. -
    219.                 return "str_".substr($string,1,-1);
    220. -
    221.         }
    222. -
    223.     }
    224. -
    225.     return false;
    226. -
    227. }
    228. -
    229.  
    230. -
    231. /**
    232. -
    233. * Evaluates the lang() function. Returns lang tag of a Literal.
    234. -
    235. *
    236. -
    237. @param  String $string the string.
    238. -
    239. @return String the lang tag or false if there is no language tag.
    240. -
    241. */
    242. -
    243. function lang($string){
    244. -
    245.     $str preg_match("/\".[^\"]*\"@(.[^\s]*)|\'.[^\']*\'@(.[^\s]*)/",$string,$hits);
    246. -
    247.     if($str){
    248. -
    249.         if($hits[1!= null)
    250. -
    251.         return $hits[1];
    252. -
    253.         else
    254. -
    255.         return $hits[2];
    256. -
    257.     }else{
    258. -
    259.         return false;
    260. -
    261.     }
    262. -
    263. }
    264. -
    265.  
    266. -
    267.  
    268. -
    269.  
    270. -
    271. ?>
    272. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base deleted file mode 100755 index 20098616..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlGraphPattern.php.html.svn-base +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - File Source for GraphPattern.php - - - - - -

    Source for file GraphPattern.php

    -

    Documentation is available at GraphPattern.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // class: GraphPattern
    6. -
    7. // ---------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A graph pattern which consists of triple patterns, optional
    14. -
    15. * or union graph patterns and filters.
    16. -
    17. *
    18. -
    19. @author   Tobias Gauss <tobias.gauss@web.de>
    20. -
    21. @version     $Id$
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class GraphPattern extends Object{
    32. -
    33.  
    34. -
    35.     /**
    36. -
    37.     * Graphname. 0 if its in the default graph.
    38. -
    39.     */
    40. -
    41.     protected $graphname;
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * @var array The TriplePattern.
    48. -
    49.     */
    50. -
    51.     protected $triplePattern;
    52. -
    53.  
    54. -
    55.     /**
    56. -
    57.     * @var array A List of Constraints.
    58. -
    59.     */
    60. -
    61.     protected $constraint = array();
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * @var int Pointer to optional patterns.
    68. -
    69.     */
    70. -
    71.     protected $optional;
    72. -
    73.  
    74. -
    75.     /**
    76. -
    77.     * @var int Pointer to union patterns.
    78. -
    79.     */
    80. -
    81.     protected $union;
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * @var boolean TRUE if the pattern is open- FALSE if closed.
    88. -
    89.     */
    90. -
    91.     public $open;
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * @var boolean TRUE if the GraphPattern is a construct pattern.
    98. -
    99.     */
    100. -
    101.     public $isConstructPattern;
    102. -
    103.  
    104. -
    105.  
    106. -
    107.     /**
    108. -
    109.     * @var int The GraphPatterns id.
    110. -
    111.     */
    112. -
    113.     public $patternId;
    114. -
    115.  
    116. -
    117.  
    118. -
    119.     /**
    120. -
    121.     * Constructor
    122. -
    123.     */
    124. -
    125.     public function GraphPattern(){
    126. -
    127.         $this->open               = true ;
    128. -
    129.         $this->isConstructPattern = false;
    130. -
    131.         $this->constraint         = false;
    132. -
    133.         $this->triplePattern      = false;
    134. -
    135.     }
    136. -
    137.  
    138. -
    139.     /**
    140. -
    141.     * Returns the graphname.
    142. -
    143.     *
    144. -
    145.     * @return String 
    146. -
    147.     */
    148. -
    149.     public function getGraphname(){
    150. -
    151.         return $this->graphname;
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     /**
    158. -
    159.     * Returns the triple pattern of the graph pattern.
    160. -
    161.     *
    162. -
    163.     * @return Array 
    164. -
    165.     */
    166. -
    167.     public function getTriplePattern(){
    168. -
    169.         return $this->triplePattern;
    170. -
    171.     }
    172. -
    173.  
    174. -
    175.     /**
    176. -
    177.     * Returns a constraint if there is one false if not.
    178. -
    179.     *
    180. -
    181.     * @return Constraint 
    182. -
    183.     */
    184. -
    185.     public function getConstraint(){
    186. -
    187.         return $this->constraint;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.     * Returns a pointer to an optional graph pattern.
    196. -
    197.     *
    198. -
    199.     * @return integer 
    200. -
    201.     */
    202. -
    203.     public function getOptional(){
    204. -
    205.         return $this->optional;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211.     /**
    212. -
    213.     * Returns a pointer to a union graph pattern.
    214. -
    215.     *
    216. -
    217.     * @return integer 
    218. -
    219.     */
    220. -
    221.     public function getUnion(){
    222. -
    223.         return $this->union;
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     /**
    230. -
    231.     * Sets the graphname.
    232. -
    233.     *
    234. -
    235.     * @param  String $name 
    236. -
    237.     * @return void 
    238. -
    239.     */
    240. -
    241.     public function setGraphname($name){
    242. -
    243.         $this->graphname = $name;
    244. -
    245.     }
    246. -
    247.     /**
    248. -
    249.     * Adds a List of QueryTriples to the GraphPattern.
    250. -
    251.     *
    252. -
    253.     * @param  array $trpP 
    254. -
    255.     * @return void 
    256. -
    257.     */
    258. -
    259.     public function addTriplePattern($trpP){
    260. -
    261.         $this->triplePattern = $trpP;
    262. -
    263.     }
    264. -
    265.  
    266. -
    267.     /**
    268. -
    269.     * Adds a Constraint to the GraphPattern.
    270. -
    271.     *
    272. -
    273.     * @param  Constraint $cons 
    274. -
    275.     * @return void 
    276. -
    277.     */
    278. -
    279.     public function addConstraint(&$cons){
    280. -
    281.         $this->constraint[$cons;
    282. -
    283.     }
    284. -
    285.     /**
    286. -
    287.     * Adds a pointer to an optional graphPattern.
    288. -
    289.     *
    290. -
    291.     * @param  integer $pattern 
    292. -
    293.     * @return void 
    294. -
    295.     */
    296. -
    297.     public function addOptional($pattern){
    298. -
    299.         $this->optional = &$pattern;
    300. -
    301.     }
    302. -
    303.  
    304. -
    305.     /**
    306. -
    307.     * Adds a pointer to a union graphPattern.
    308. -
    309.     *
    310. -
    311.     * @param  integer $pattern 
    312. -
    313.     * @return void 
    314. -
    315.     */
    316. -
    317.     public function addUnion($pattern){
    318. -
    319.         $this->union = &$pattern;
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.  
    326. -
    327.     /**
    328. -
    329.     * Sets the GraphPatterns Id.
    330. -
    331.     *
    332. -
    333.     * @param  integer $id 
    334. -
    335.     * @return void 
    336. -
    337.     */
    338. -
    339.     public function setId($id){
    340. -
    341.         $this->patternId = $id;
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Returns the GraphPatterns id.
    350. -
    351.     *
    352. -
    353.     * @return integer 
    354. -
    355.     */
    356. -
    357.     public function getId(){
    358. -
    359.         return $this->patternId;
    360. -
    361.     }
    362. -
    363.  
    364. -
    365.  
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.     *   Returns an array of all variables used in this
    372. -
    373.     *   graph pattern.
    374. -
    375.     *   All variables are listed only once (unique).
    376. -
    377.     *
    378. -
    379.     *   @return array   Array of variable names
    380. -
    381.     */
    382. -
    383.     public function getVariables()
    384. -
    385.     {
    386. -
    387.         $arVars array();
    388. -
    389.  
    390. -
    391.         foreach ($this->triplePattern as $pattern{
    392. -
    393.             $arVars array_merge($arVars$pattern->getVariables());
    394. -
    395.         }
    396. -
    397.  
    398. -
    399.         return array_unique($arVars);
    400. -
    401.     }//public function getVariables()
    402. -
    403.  
    404. -
    405. }// end class: GraphPattern.php
    406. -
    407. ?>
    408. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQuery.php.html.svn-base deleted file mode 100755 index 0014f2a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQuery.php.html.svn-base +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - File Source for Query.php - - - - - -

    Source for file Query.php

    -

    Documentation is available at Query.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. * The Class Query represents a SPARQL query.
    10. -
    11. *
    12. -
    13. *
    14. -
    15. @author   Tobias Gauss <tobias.gauss@web.de>
    16. -
    17. @version     $Id$
    18. -
    19. *
    20. -
    21. @package sparql
    22. -
    23. */
    24. -
    25. class Query extends Object
    26. -
    27. {
    28. -
    29.     /**
    30. -
    31.     * The BASE part of the SPARQL query.
    32. -
    33.     * @var string 
    34. -
    35.     */
    36. -
    37.     protected $base;
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Array that contains used prefixes and namespaces.
    44. -
    45.     * Key is the prefix, value the namespace.
    46. -
    47.     *
    48. -
    49.     * @example
    50. -
    51.     *  array(8) {
    52. -
    53.     *   ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    54. -
    55.     *   ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#"
    56. -
    57.     *  }
    58. -
    59.     *
    60. -
    61.     * @var array 
    62. -
    63.     */
    64. -
    65.     public $prefixes = array();
    66. -
    67.  
    68. -
    69.     /**
    70. -
    71.     * Array of result variables that shall be returned.
    72. -
    73.     * E.g. "?name", "?mbox"
    74. -
    75.     *
    76. -
    77.     * @var array 
    78. -
    79.     */
    80. -
    81.     protected $resultVars = array();
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * What form/type of result should be returned.
    88. -
    89.     *
    90. -
    91.     * One of:
    92. -
    93.     * - "ask"
    94. -
    95.     * - "count"
    96. -
    97.     * - "construct"
    98. -
    99.     * - "describe"
    100. -
    101.     * - "select"
    102. -
    103.     * - "select distinct"
    104. -
    105.     *
    106. -
    107.     * @var string 
    108. -
    109.     * @see http://www.w3.org/TR/rdf-sparql-query/#QueryForms
    110. -
    111.     */
    112. -
    113.     protected $resultForm;
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Contains the result part of the SPARQL query.
    120. -
    121.     * Array of GraphPattern
    122. -
    123.     *
    124. -
    125.     * @var array 
    126. -
    127.     */
    128. -
    129.     protected $resultPart;
    130. -
    131.  
    132. -
    133.     /**
    134. -
    135.     *  Contains the FROM part of the SPARQL query.
    136. -
    137.     * @var array 
    138. -
    139.     */
    140. -
    141.     protected $fromPart = array();
    142. -
    143.  
    144. -
    145.     /**
    146. -
    147.     * Contains the FROM NAMED part of the SPARQL query.
    148. -
    149.     * @var array 
    150. -
    151.     */
    152. -
    153.     protected $fromNamedPart = array();
    154. -
    155.  
    156. -
    157.     /**
    158. -
    159.     * Optional solution modifier of the query.
    160. -
    161.     * Array with three keys:
    162. -
    163.     *  "order by", "limit", "offset"
    164. -
    165.     * If they are not set, their value is null
    166. -
    167.     *
    168. -
    169.     * "order by" can be an array with subarrays, each of those
    170. -
    171.     *  subarrays having two keys: "val" and "type".
    172. -
    173.     *  "val" determines the variable ("?mbox"), "type" is
    174. -
    175.     *  "asc" or "desc"
    176. -
    177.     *
    178. -
    179.     * @var array 
    180. -
    181.     */
    182. -
    183.     protected $solutionModifier = array();
    184. -
    185.  
    186. -
    187.     /**
    188. -
    189.     *  Blanknode counter.
    190. -
    191.     * How many blank nodes are in $resultPart
    192. -
    193.     *
    194. -
    195.     * @var int 
    196. -
    197.     */
    198. -
    199.     protected $bnodeCounter;
    200. -
    201.  
    202. -
    203.     /**
    204. -
    205.     * GraphPattern counter.
    206. -
    207.     * How many GraphPattern are in $resultPart
    208. -
    209.     *
    210. -
    211.     * @var int 
    212. -
    213.     */
    214. -
    215.     public $graphPatternCounter;
    216. -
    217.  
    218. -
    219.     /**
    220. -
    221.     * List of all vars used in the query.
    222. -
    223.     * Key is the variable (e.g. "?x"), value
    224. -
    225.     * is boolean true
    226. -
    227.     *
    228. -
    229.     * @var array 
    230. -
    231.     */
    232. -
    233.     public $usedVars;
    234. -
    235.  
    236. -
    237.     /**
    238. -
    239.     * If the query type is CONSTRUCT this variable contains the
    240. -
    241.     * CONSTRUCT graph pattern.
    242. -
    243.     */
    244. -
    245.     protected $constructPattern;
    246. -
    247.  
    248. -
    249.     /**
    250. -
    251.     * TRUE if the query is empty FALSE if not.
    252. -
    253.     *
    254. -
    255.     * @var boolean 
    256. -
    257.     */
    258. -
    259.     public $isEmpty;
    260. -
    261.  
    262. -
    263.     /**
    264. -
    265.     *   Language of variables. NULL if the variable has no
    266. -
    267.     *   language tag (e.g. @en) set.
    268. -
    269.     *   $varname => $language tag
    270. -
    271.     *   @var array 
    272. -
    273.     */
    274. -
    275.     public $varLanguages = array();
    276. -
    277.  
    278. -
    279.     /**
    280. -
    281.     *   Datatype of variables. NULL if the variable has no
    282. -
    283.     *   data type (e.g. ^^xsd::integer) set.
    284. -
    285.     *   $varname => $datatype
    286. -
    287.     *   @var array 
    288. -
    289.     */
    290. -
    291.     public $varDatatypes = array();
    292. -
    293.  
    294. -
    295.  
    296. -
    297.  
    298. -
    299.     /**
    300. -
    301.     * Constructor
    302. -
    303.     */
    304. -
    305.     public function Query(){
    306. -
    307.         $this->resultForm = false;
    308. -
    309.         $this->solutionModifier['order by'null;
    310. -
    311.         $this->solutionModifier['limit']    null;
    312. -
    313.         $this->solutionModifier['offset']   null;
    314. -
    315.         $this->bnodeCounter = 0;
    316. -
    317.         $this->graphPatternCounter = 0;
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     /**
    326. -
    327.     * Returns the BASE part of the query.
    328. -
    329.     *
    330. -
    331.     * @return String 
    332. -
    333.     */
    334. -
    335.     public function getBase(){
    336. -
    337.         return $this->base;
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.     /**
    344. -
    345.     * Returns the prefix map of the query.
    346. -
    347.     *
    348. -
    349.     * @return Array 
    350. -
    351.     */
    352. -
    353.     public function getPrefixes(){
    354. -
    355.         return $this->prefixes;
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     /**
    362. -
    363.     * Returns a list containing the result vars.
    364. -
    365.     *
    366. -
    367.     * @return Array 
    368. -
    369.     */
    370. -
    371.     public function getResultVars(){
    372. -
    373.         return $this->resultVars;
    374. -
    375.     }
    376. -
    377.  
    378. -
    379.     /**
    380. -
    381.     * Returns the type the result shall have.
    382. -
    383.     * E.g. "select", "select distinct", "ask", ...
    384. -
    385.     *
    386. -
    387.     * @see $resultForm
    388. -
    389.     *
    390. -
    391.     * @return string 
    392. -
    393.     */
    394. -
    395.     public function getResultForm(){
    396. -
    397.         return $this->resultForm;
    398. -
    399.     }
    400. -
    401.  
    402. -
    403.     /**
    404. -
    405.     * Returns a list containing the graph patterns of the query.
    406. -
    407.     *
    408. -
    409.     * @return Array 
    410. -
    411.     */
    412. -
    413.     public function getResultPart(){
    414. -
    415.         return $this->resultPart;
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     /**
    422. -
    423.     * Returns the FROM clause of the query.
    424. -
    425.     *
    426. -
    427.     * @return String 
    428. -
    429.     */
    430. -
    431.     public function getFromPart(){
    432. -
    433.         return $this->fromPart;
    434. -
    435.     }
    436. -
    437.  
    438. -
    439.     /**
    440. -
    441.     * Returns the FROM NAMED clause of the query.
    442. -
    443.     *
    444. -
    445.     * @return Array 
    446. -
    447.     */
    448. -
    449.     public function getFromNamedPart(){
    450. -
    451.         return $this->fromNamedPart;
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     /**
    458. -
    459.     * Returns $isEmpty variable
    460. -
    461.     * @return boolean 
    462. -
    463.     */
    464. -
    465.     public function isEmpty({
    466. -
    467.         return $this->isEmpty;
    468. -
    469.     }
    470. -
    471.  
    472. -
    473.     /**
    474. -
    475.     * Returns an unused Bnode label.
    476. -
    477.     *
    478. -
    479.     * @return String 
    480. -
    481.     */
    482. -
    483.     public function getBlanknodeLabel(){
    484. -
    485.         return "_:bN".$this->bnodeCounter++;
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.  
    492. -
    493.     /**
    494. -
    495.     * Sets the base part.
    496. -
    497.     *
    498. -
    499.     * @param String $base 
    500. -
    501.     * @return void 
    502. -
    503.     */
    504. -
    505.     public function setBase($base){
    506. -
    507.         $this->base = $base;
    508. -
    509.     }
    510. -
    511.  
    512. -
    513.  
    514. -
    515.     /**
    516. -
    517.     * Adds a prefix to the list of prefixes.
    518. -
    519.     *
    520. -
    521.     * @param  String $prefix 
    522. -
    523.     * @param  String $label 
    524. -
    525.     * @return void 
    526. -
    527.     */
    528. -
    529.     public function addPrefix($prefix$label){
    530. -
    531.         $this->prefixes[$prefix]$label;
    532. -
    533.     }
    534. -
    535.  
    536. -
    537.     /**
    538. -
    539.     * Adds a variable to the list of result variables.
    540. -
    541.     *
    542. -
    543.     * @param  String $var 
    544. -
    545.     * @return void 
    546. -
    547.     */
    548. -
    549.     public function addVariable($var){
    550. -
    551.         $this->resultVars[]$var;
    552. -
    553.         $this->varLanguages[$varself::getLanguageTag($var);
    554. -
    555.         $this->varDatatypes[$var$this->getDatatype($var);
    556. -
    557.     }
    558. -
    559.  
    560. -
    561.  
    562. -
    563.     /**
    564. -
    565.     * Sets the result form.
    566. -
    567.     *
    568. -
    569.     * @param  String $form 
    570. -
    571.     * @return void 
    572. -
    573.     */
    574. -
    575.     public function setResultForm($form){
    576. -
    577.         $this->resultForm = strtolower($form);
    578. -
    579.     }
    580. -
    581.  
    582. -
    583.     /**
    584. -
    585.     * Adds a graph pattern to the result part.
    586. -
    587.     *
    588. -
    589.     * @param  GraphPattern $pattern 
    590. -
    591.     * @return void 
    592. -
    593.     */
    594. -
    595.     public function addGraphPattern($pattern){
    596. -
    597.         $pattern->setId($this->graphPatternCounter);
    598. -
    599.         $this->resultPart[$pattern;
    600. -
    601.         $this->graphPatternCounter++;
    602. -
    603.     }
    604. -
    605.  
    606. -
    607.     /**
    608. -
    609.     * Adds a construct graph pattern to the query.
    610. -
    611.     *
    612. -
    613.     * @param  GraphPattern $pattern 
    614. -
    615.     * @return void 
    616. -
    617.     */
    618. -
    619.     public function addConstructGraphPattern($pattern){
    620. -
    621.         $this->constructPattern = $pattern;
    622. -
    623.     }
    624. -
    625.  
    626. -
    627.  
    628. -
    629.     /**
    630. -
    631.     * Adds a graphuri to the from part.
    632. -
    633.     *
    634. -
    635.     * @param  String $graphURI 
    636. -
    637.     * @return void 
    638. -
    639.     */
    640. -
    641.     public function addFrom($graphURI){
    642. -
    643.         $this->fromPart = $graphURI;
    644. -
    645.     }
    646. -
    647.  
    648. -
    649.     /**
    650. -
    651.     * Adds a graphuri to the from named part.
    652. -
    653.     *
    654. -
    655.     * @param  String $graphURI 
    656. -
    657.     * @return void 
    658. -
    659.     */
    660. -
    661.     public function addFromNamed($graphURI){
    662. -
    663.         $this->fromNamedPart[$graphURI;
    664. -
    665.     }
    666. -
    667.  
    668. -
    669.     /**
    670. -
    671.     * Sets a solution modifier.
    672. -
    673.     *
    674. -
    675.     * @param  String $name 
    676. -
    677.     * @param  Value  $value 
    678. -
    679.     * @return void 
    680. -
    681.     */
    682. -
    683.     public function setSolutionModifier($name$value){
    684. -
    685.         $this->solutionModifier[$name$value;
    686. -
    687.     }
    688. -
    689.  
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.     * Generates a new GraphPattern. If it is a CONSTRUCT graph pattern
    696. -
    697.     * $constr has to set to TRUE, FALSE if not.
    698. -
    699.     *
    700. -
    701.     * @param  boolean $constr 
    702. -
    703.     * @return GraphPattern 
    704. -
    705.     */
    706. -
    707.     public function getNewPattern($constr false){
    708. -
    709.         $pattern new GraphPattern();
    710. -
    711.         if ($constr{
    712. -
    713.             $this->addConstructGraphPattern($pattern);
    714. -
    715.         else {
    716. -
    717.             $this->addGraphPattern($pattern);
    718. -
    719.         }
    720. -
    721.         return $pattern;
    722. -
    723.     }
    724. -
    725.  
    726. -
    727.     /**
    728. -
    729.     * Adds a new variable to the variable list.
    730. -
    731.     *
    732. -
    733.     * @param  String $var 
    734. -
    735.     * @return void 
    736. -
    737.     */
    738. -
    739.     public function addVar($var){
    740. -
    741.         $this->usedVars[$var]=true;
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     /**
    748. -
    749.     * Returns a list with all used variables.
    750. -
    751.     *
    752. -
    753.     * @return Array 
    754. -
    755.     */
    756. -
    757.     public function getAllVars(){
    758. -
    759.         return array_keys($this->usedVars);
    760. -
    761.     }
    762. -
    763.  
    764. -
    765.     /**
    766. -
    767.     * Gets the solution modifiers of the query.
    768. -
    769.     * $solutionModifier['order by'] = value
    770. -
    771.     *                  ['limit']    = vlaue
    772. -
    773.     *                  ['offset']   = value
    774. -
    775.     *
    776. -
    777.     *
    778. -
    779.     * @return Array 
    780. -
    781.     */
    782. -
    783.     public function getSolutionModifier(){
    784. -
    785.         return $this->solutionModifier;
    786. -
    787.     }
    788. -
    789.  
    790. -
    791.  
    792. -
    793.     /**
    794. -
    795.     * Returns the construvtGraphPattern of the query if there is one.
    796. -
    797.     *
    798. -
    799.     * @return GraphPattern 
    800. -
    801.     */
    802. -
    803.     public function getConstructPattern(){
    804. -
    805.         return $this->constructPattern;
    806. -
    807.     }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.  
    814. -
    815.     /**
    816. -
    817.     *   Returns a list of variables used in the construct patterns.
    818. -
    819.     *
    820. -
    821.     *   @return array Array of variable names, unique.
    822. -
    823.     */
    824. -
    825.     public function getConstructPatternVariables()
    826. -
    827.     {
    828. -
    829.         $arVars array();
    830. -
    831. /*
    832. -
    833.         if (count($this->resultPart) > 0) {
    834. -
    835.             foreach ($this->resultPart as $pattern) {
    836. -
    837.                 $arVars = array_merge($arVars, $pattern->getVariables());
    838. -
    839.             }
    840. -
    841.         }
    842. -
    843. */
    844. -
    845.         if ($this->constructPattern{
    846. -
    847.             $arVars array_merge($arVars$this->constructPattern->getVariables());
    848. -
    849.         }
    850. -
    851.  
    852. -
    853.         return array_unique($arVars);
    854. -
    855.     }//public function getConstructPatternVariables()
    856. -
    857.  
    858. -
    859.  
    860. -
    861.  
    862. -
    863.     /**
    864. -
    865.     *   Returns the language of a variable if the tag is set (e.g. @en)
    866. -
    867.     *   Returns NULL if no language is set.
    868. -
    869.     *
    870. -
    871.     *   @param string Sparql variable name
    872. -
    873.     *   @return mixed NULL or language tag
    874. -
    875.     */
    876. -
    877.     public static function getLanguageTag($var)
    878. -
    879.     {
    880. -
    881.         $nAt strpos($var'@');
    882. -
    883.         if ($nAt === false{
    884. -
    885.             return null;
    886. -
    887.         }
    888. -
    889.         //in case @ and ^^ are combined
    890. -
    891.         $nHatHat strpos($var'^^'$nAt 1);
    892. -
    893.         if ($nHatHat === false{
    894. -
    895.             $tag substr($var$nAt 1);
    896. -
    897.         else {
    898. -
    899.             $tag substr($var$nAt 1$nHatHat $nAt 1);
    900. -
    901.         }
    902. -
    903.         return $tag;
    904. -
    905.     }//public static function getLanguageTag($var)
    906. -
    907.  
    908. -
    909.  
    910. -
    911.  
    912. -
    913.     /**
    914. -
    915.     *   Returns the datatype of a variable if it is set.
    916. -
    917.     *
    918. -
    919.     *   @param string Sparql variable name
    920. -
    921.     *   @return mixed NULL or datatype
    922. -
    923.     */
    924. -
    925.     public function getDatatype($var)
    926. -
    927.     {
    928. -
    929.         $nHatHat strpos($var'^^');
    930. -
    931.         if ($nHatHat === false{
    932. -
    933.             return null;
    934. -
    935.         }
    936. -
    937.         $nAt strpos($var'@'$nHatHat 2);
    938. -
    939.         if ($nAt === false{
    940. -
    941.             $type substr($var$nHatHat 2);
    942. -
    943.         else {
    944. -
    945.             $type substr($var$nHatHat 2$nAt $nHatHat 2);
    946. -
    947.         }
    948. -
    949.  
    950. -
    951.         $fullUri $this->getFullUri($type);
    952. -
    953.         if ($fullUri === false{
    954. -
    955.             $fullUri $type;
    956. -
    957.             if ($fullUri[0== '<' && substr($fullUri-1== '>'{
    958. -
    959.                 $fullUri substr($fullUri1-1);
    960. -
    961.             }
    962. -
    963.         }
    964. -
    965.  
    966. -
    967.         return $fullUri;
    968. -
    969.     }//public function getDatatype($var)
    970. -
    971.  
    972. -
    973.  
    974. -
    975.  
    976. -
    977.     /**
    978. -
    979.     * Gets the full URI of a qname token.
    980. -
    981.     *
    982. -
    983.     * @param  string $token 
    984. -
    985.     * @return string The complete URI of a given token, false if $token is not
    986. -
    987.     *                 a qname or the prefix is not defined
    988. -
    989.     */
    990. -
    991.     public function getFullUri($token)
    992. -
    993.     {
    994. -
    995.         $pattern="/^([^:]*):([^:]*)$/";
    996. -
    997.         if (preg_match($pattern$token$hits0{
    998. -
    999.  
    1000. -
    1001.             if (isset($this->prefixes{$hits{1}})) {
    1002. -
    1003.                 return substr($this->base1-1)
    1004. -
    1005.                      . $this->prefixes{$hits{1}}
    1006. -
    1007.                      . $hits{2};
    1008. -
    1009.             }
    1010. -
    1011.             if ($hits{1}=='_'{
    1012. -
    1013.                 return "_".$hits{2};
    1014. -
    1015.             }
    1016. -
    1017.         }
    1018. -
    1019.  
    1020. -
    1021.         return false;
    1022. -
    1023.     }
    1024. -
    1025.  
    1026. -
    1027. }
    1028. -
    1029. // end class: Query.php
    1030. -
    1031.  
    1032. -
    1033. ?>
    1034. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:27 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base deleted file mode 100755 index 09568f4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlQueryTriple.php.html.svn-base +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - File Source for QueryTriple.php - - - - - -

    Source for file QueryTriple.php

    -

    Documentation is available at QueryTriple.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // Class: QueryTriple
    6. -
    7. // ---------------------------------------------
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGenerator.php';
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Represents a query triple.
    16. -
    17. *
    18. -
    19. @author   Tobias Gauss <tobias.gauss@web.de>
    20. -
    21. @version    $Id$
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29. Class QueryTriple extends Object{
    30. -
    31.  
    32. -
    33.     /**
    34. -
    35.     * The QueryTriples Subject.
    36. -
    37.     */
    38. -
    39.     protected $subject;
    40. -
    41.  
    42. -
    43.     /**
    44. -
    45.     * The QueryTriples Predicate.
    46. -
    47.     */
    48. -
    49.     protected $predicate;
    50. -
    51.  
    52. -
    53.     /**
    54. -
    55.     * The QueryTriples Object.
    56. -
    57.     */
    58. -
    59.     protected $object;
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Constructor
    68. -
    69.     */
    70. -
    71.     public function QueryTriple($sub,$pred,$ob)
    72. -
    73.     {
    74. -
    75.         $this->subject   = $sub;
    76. -
    77.         $this->predicate = $pred;
    78. -
    79.         $this->object    = $ob;
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * Returns the Triples Subject.
    88. -
    89.     *
    90. -
    91.     * @return Node 
    92. -
    93.     */
    94. -
    95.     public function getSubject()
    96. -
    97.     {
    98. -
    99.         return $this->subject;
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     /**
    106. -
    107.     * Returns the Triples Predicate.
    108. -
    109.     *
    110. -
    111.     * @return Node 
    112. -
    113.     */
    114. -
    115.     public function getPredicate()
    116. -
    117.     {
    118. -
    119.         return $this->predicate;
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.     /**
    126. -
    127.     * Returns the Triples Object.
    128. -
    129.     *
    130. -
    131.     * @return Node 
    132. -
    133.     */
    134. -
    135.     public function getObject()
    136. -
    137.     {
    138. -
    139.         return $this->object;
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.  
    146. -
    147.  
    148. -
    149.     /**
    150. -
    151.     *   Returns an array of all variables in this triple.
    152. -
    153.     *
    154. -
    155.     *   @return array   Array of variable names
    156. -
    157.     */
    158. -
    159.     public function getVariables()
    160. -
    161.     {
    162. -
    163.         $arVars array();
    164. -
    165.  
    166. -
    167.         foreach (array('subject''predicate''object'as $strVar{
    168. -
    169.             if (SparqlEngineDb_SqlGenerator::isVariable($this->$strVar)) {
    170. -
    171.                 $arVars[$this->$strVar;
    172. -
    173.             }
    174. -
    175.         }
    176. -
    177.  
    178. -
    179.         return $arVars;
    180. -
    181.     }
    182. -
    183.  
    184. -
    185. }
    186. -
    187.  
    188. -
    189. // end class: QueryTriple.php
    190. -
    191. ?>
    192. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base deleted file mode 100755 index fbc75d70..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlClient.php.html.svn-base +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - File Source for SparqlClient.php - - - - - -

    Source for file SparqlClient.php

    -

    Documentation is available at SparqlClient.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: SparqlEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Client for querying a sparql server.
    16. -
    17. *
    18. -
    19. @version  $Id$
    20. -
    21. @author   Tobias Gauß <tobias.gauss@web.de>
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class SparqlClient extends Object {
    32. -
    33.  
    34. -
    35.     var $server;
    36. -
    37.     var $output;    
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Constructor of SparlClient.
    44. -
    45.     *
    46. -
    47.     * @param String  $server   server address.
    48. -
    49.     */
    50. -
    51.     function SparqlClient($server){
    52. -
    53.         $this->server = $server;
    54. -
    55.         $this->output = "array";
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Sets the output format for a SELECT or ASK query. Possible formats are "xml" for
    66. -
    67.     * Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array
    68. -
    69.     * for the format described in our SparqlEngine.
    70. -
    71.     *
    72. -
    73.     * @param String  $format   the format.
    74. -
    75.     */
    76. -
    77.     function setOutputFormat($format){
    78. -
    79.         if(strtolower($format)=="xml")
    80. -
    81.         $this->output = "xml";
    82. -
    83.         if(strtolower($format)=="array")
    84. -
    85.         $this->output = "array";
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     /**
    94. -
    95.     * Main function of SparqlClient.
    96. -
    97.     *
    98. -
    99.     * @param ClientQuery  $query   the ClientQuery object.
    100. -
    101.     * @return mixed returns an array that contains the variables an their bindings or a MemModel
    102. -
    103.     *
    104. -
    105.     */
    106. -
    107.     function query($query){
    108. -
    109.         if(!is_a($query,"ClientQuery"))
    110. -
    111.         die;//ErrorHandling
    112. -
    113.  
    114. -
    115.         $url    $this->_buildurl($query);
    116. -
    117.         $result $this->_http_get($url);
    118. -
    119.         return $this->returnResult($result);
    120. -
    121.  
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * Helper function that builds the url.
    132. -
    133.     *
    134. -
    135.     * @param ClientQuery  $query   the ClientQuery Object.
    136. -
    137.     */
    138. -
    139.  
    140. -
    141.     function _buildurl($query){
    142. -
    143.         $url "";
    144. -
    145.         $url $this->server."?query=".urlencode($query->query);
    146. -
    147.         foreach($query->default as $defaultg){
    148. -
    149.             $url $url."&default-graph-uri=".$defaultg;
    150. -
    151.         }
    152. -
    153.         foreach($query->named as $namedg){
    154. -
    155.             $url $url."&named-graph-uri=".$namedg;
    156. -
    157.         }
    158. -
    159.  
    160. -
    161.         return $url;
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     /**
    170. -
    171.     * Returns the query result.
    172. -
    173.     *
    174. -
    175.     * @param String  $result  the result.
    176. -
    177.     * @return mixed 
    178. -
    179.     */
    180. -
    181.     function returnResult($result){
    182. -
    183.  
    184. -
    185.         if(strpos($result,"<rdf:RDF")){
    186. -
    187.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    188. -
    189.             $parser new RdfParser();
    190. -
    191.             return $parser->generateModel(substr($result,strpos($result,"<rdf:RDF")));
    192. -
    193.         }
    194. -
    195.  
    196. -
    197.         if($this->output == "xml"){
    198. -
    199.             $pos strpos($result,"<?xml");
    200. -
    201.             return substr($result,$pos);
    202. -
    203.         }
    204. -
    205.         if($this->output == "array"){
    206. -
    207.             //    $pos = strpos($buffer,"<?xml");
    208. -
    209.             return $this->parseResult($result);
    210. -
    211.         }
    212. -
    213.         return $result;
    214. -
    215.     }
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     function parseResult($buffer){
    222. -
    223.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_SPARQLRES);
    224. -
    225.         $parser new SparqlResultParser();
    226. -
    227.         return $parser->parse($buffer);
    228. -
    229.     }
    230. -
    231.  
    232. -
    233.  
    234. -
    235.     /**
    236. -
    237.     * Executes the GET Request.
    238. -
    239.     *
    240. -
    241.     * @param String  $url  the url.
    242. -
    243.     * @return String result.
    244. -
    245.     */
    246. -
    247.     function _http_get($url)
    248. -
    249.     {
    250. -
    251.         $url parse_url($url);
    252. -
    253.         $port = isset($url['port']$url['port'80;
    254. -
    255.  
    256. -
    257.         $fp fsockopen($url['host']$port);
    258. -
    259.  
    260. -
    261.         $replace $url['path'];
    262. -
    263.  
    264. -
    265.         fputs($fp"GET ".$replace."?".$url['query']." HTTP/1.0\n");
    266. -
    267.         fputs($fp"Host:"$url['host']." \r\n");
    268. -
    269.         fputs($fp"Accept: application/sparql-results+xml, application/rdf+xml\r\n");
    270. -
    271.         fputs($fp"Connection: close\n\n");
    272. -
    273.  
    274. -
    275.         $buffer "";
    276. -
    277.         while ($tmp fread($fp1024))
    278. -
    279.         {
    280. -
    281.             $buffer .= $tmp;
    282. -
    283.         }
    284. -
    285.  
    286. -
    287.         $pos1 strpos($buffer,"\r\n\r\n");
    288. -
    289.         $pos2 strpos($buffer,"\n\n");
    290. -
    291.         if ($pos1 === false{
    292. -
    293.             $pos $pos2;
    294. -
    295.         else {
    296. -
    297.             $pos $pos1;
    298. -
    299.         }
    300. -
    301.             
    302. -
    303.         return substr($buffer,$pos);
    304. -
    305.  
    306. -
    307.     }
    308. -
    309. }
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  
    316. -
    317. ?>
    318. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:59 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base deleted file mode 100755 index 3d05de20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngine.php.html.svn-base +++ /dev/null @@ -1,1189 +0,0 @@ - - - - - - File Source for SparqlEngine.php - - - - - -

    Source for file SparqlEngine.php

    -

    Documentation is available at SparqlEngine.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/ResultConverter.php';
    8. -
    9.  
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13. // Class: SparqlEngine
    14. -
    15. // ----------------------------------------------------------------------------------
    16. -
    17.  
    18. -
    19. /**
    20. -
    21. * This engine executes SPARQL queries against an RDF Datatset.
    22. -
    23. *
    24. -
    25. @version  $Id$
    26. -
    27. @author   Tobias Gauß <tobias.gauss@web.de>
    28. -
    29. *
    30. -
    31. @package sparql
    32. -
    33. */
    34. -
    35.  
    36. -
    37. Class SparqlEngine extends Object{
    38. -
    39.  
    40. -
    41.  
    42. -
    43.     /**
    44. -
    45.     *   The query object.
    46. -
    47.     *   @var Query 
    48. -
    49.     */
    50. -
    51.     protected $query;
    52. -
    53.  
    54. -
    55.     /**
    56. -
    57.     *   The RDF Dataset.
    58. -
    59.     *   @var Dataset 
    60. -
    61.     */
    62. -
    63.     protected $dataset;
    64. -
    65.  
    66. -
    67.  
    68. -
    69.  
    70. -
    71.     /**
    72. -
    73.     * Use SparqlEngine::factory() instead of this
    74. -
    75.     * constructor.
    76. -
    77.     */
    78. -
    79.     protected function __construct()
    80. -
    81.     {
    82. -
    83.         //protected to prevent direct instantiation
    84. -
    85.     }
    86. -
    87.  
    88. -
    89.  
    90. -
    91.     /**
    92. -
    93.     * Creates a new instance of the SparqlEngine, depending on the
    94. -
    95.     * given model. For example, if you pass a DbModel, you will
    96. -
    97.     * get a SparqlEngine specialized on databases.
    98. -
    99.     *
    100. -
    101.     * @param Model $model   RDF model that uses the engine
    102. -
    103.     */
    104. -
    105.     public function factory($model null)
    106. -
    107.     {
    108. -
    109.         if ($model !== null && $model instanceof DbModel{
    110. -
    111.             require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb.php';
    112. -
    113.             return new SparqlEngineDb($model);
    114. -
    115.         else {
    116. -
    117.             return new SparqlEngine();
    118. -
    119.         }
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * The query engine's main method.
    132. -
    133.     *
    134. -
    135.     * @param  Dataset       $dataset    the RDF Dataset
    136. -
    137.     * @param  mixed         $query      the parsed SPARQL query
    138. -
    139.     * @param  String        $resultform the result form. If set to 'xml' the result will be
    140. -
    141.     *                                    SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    142. -
    143.     * @return Array/String  Type of the result depends on $resultform.
    144. -
    145.     */
    146. -
    147.     public function queryModel($datasetQuery $query$resultform false)
    148. -
    149.     {
    150. -
    151.         $this->query   = $query;
    152. -
    153.         $this->dataset = $dataset;
    154. -
    155.  
    156. -
    157.         if($this->query->isEmpty){
    158. -
    159.             $vartable[0]['patternResult'null;
    160. -
    161.             return SparqlEngine_ResultConverter::convertFromResult(
    162. -
    163.                 $vartable,
    164. -
    165.                 $this,
    166. -
    167.                 $resultform
    168. -
    169.             );
    170. -
    171.         }
    172. -
    173.  
    174. -
    175.         $graphlist $this->preselectGraphs();
    176. -
    177.         /// match graph patterns against the RDF Dataset
    178. -
    179.         $patternlist $this->matchPatterns($graphlist);
    180. -
    181.         // filter results- apply inner filters
    182. -
    183.         $patternlist $this->filterPatterns($patternlist,false);
    184. -
    185.         // join pattern results
    186. -
    187.         $vartable $this->joinResults($patternlist);
    188. -
    189.         // filter results- apply outer filters
    190. -
    191.         $vartable $this->filterPatterns($vartable,true);
    192. -
    193.  
    194. -
    195.         if ($vartable[0]['patternResult'!= null{
    196. -
    197.             // sort vars (ORDER BY, LIMIT, OFFSET)
    198. -
    199.             $vartable $this->sortVars($vartable[0]['patternResult']);
    200. -
    201.             $qrf      $this->query->getResultForm();
    202. -
    203.             if ($qrf == 'select' || $qrf == 'select distinct'{
    204. -
    205.                 $vars     $this->query->getResultVars();
    206. -
    207.                 $vartable $this->selectVars($vartable$vars);
    208. -
    209.                 if ($qrf == 'select distinct'{
    210. -
    211.                     $vartable $this->distinct($vartable);
    212. -
    213.                 }
    214. -
    215.             }
    216. -
    217.         else {
    218. -
    219.             $vartable null;
    220. -
    221.         }
    222. -
    223.  
    224. -
    225. -
    226.             $vartable,
    227. -
    228.             $this,
    229. -
    230.             $resultform
    231. -
    232.         );
    233. -
    234.     }//public function queryModel($dataset, Query $query, $resultform = false)
    235. -
    236.  
    237. -
    238.  
    239. -
    240.  
    241. -
    242.     /**
    243. -
    244.     * Matches all graph Patterns against the dataset and generates an array which
    245. -
    246.     * contains the result sets for every given GraphPattern.
    247. -
    248.     *
    249. -
    250.     * @param  Array      $graphlist   the graphlist which contains the names of the named
    251. -
    252.     *                     graphs which has to be queried.
    253. -
    254.     * @return Array 
    255. -
    256.     */
    257. -
    258.     protected function matchPatterns($graphlist){
    259. -
    260.         $patternlist array();
    261. -
    262.         // get the result part from the query
    263. -
    264.         $resultPart $this->query->getResultPart();
    265. -
    266.         // for each GrapPattern in the result part
    267. -
    268.         if($resultPart)
    269. -
    270.         foreach($resultPart as $graphPattern){
    271. -
    272.             $this->matchPattern($patternlist$graphlist$graphPattern);
    273. -
    274.         }
    275. -
    276.         return $patternlist;
    277. -
    278.     }
    279. -
    280.  
    281. -
    282.  
    283. -
    284.  
    285. -
    286.     /**
    287. -
    288.     * Finds tuples that match one graph pattern.
    289. -
    290.     *
    291. -
    292.     * @param  Array        $patternlist list that contains the graphPatterns
    293. -
    294.     * @param  array        $graphlist   the graphlist
    295. -
    296.     * @param  GraphPattern $graphPattern the pattern which has to be matched
    297. -
    298.     * @return void 
    299. -
    300.     */
    301. -
    302.     protected function matchPattern(&$patternlist$graphlist&$graphPattern{
    303. -
    304.         // generate an empty result set
    305. -
    306.         $finalRes null;
    307. -
    308.         // if the GraphPattern has triple patterns
    309. -
    310.         if($graphPattern->getTriplePattern()>0){
    311. -
    312.             // check if the pattern has a GRAPH clause and if this Iri is in $graphlist
    313. -
    314.             $newGraphList $this->_checkGraphs($graphPattern,$graphlist);
    315. -
    316.             if($newGraphList){
    317. -
    318.                 $qt $graphPattern->getTriplePattern();
    319. -
    320.                 $resultSet $this->findTuplesMatchingOnePattern($qt[0]$newGraphList);
    321. -
    322.                 for ($i=1$i<count($qt)$i++{
    323. -
    324.                     $rs $this->findTuplesMatchingOnePattern($qt[$i]$newGraphList);
    325. -
    326.                     $resultSet $this->joinTuples($resultSet$rs);
    327. -
    328.                     if(!$resultSet)
    329. -
    330.                     break;
    331. -
    332.                 }
    333. -
    334.                 if($finalRes != null){
    335. -
    336.                     $finalRes $this->joinTuples($finalRes,$resultSet);
    337. -
    338.                 }else{
    339. -
    340.                     $finalRes $resultSet;
    341. -
    342.                 }
    343. -
    344.             }
    345. -
    346.         }
    347. -
    348.         // dependencies between pattern results
    349. -
    350.         $patternlist[$graphPattern->getId()]['hasOptional']     0;
    351. -
    352.         $patternlist[$graphPattern->getId()]['hasUnion']        0;
    353. -
    354.         $patternlist[$graphPattern->getId()]['patternResult']   $finalRes;
    355. -
    356.  
    357. -
    358.         $op $graphPattern->getOptional();
    359. -
    360.         $un $graphPattern->getUnion();
    361. -
    362.  
    363. -
    364.         $patternlist[$graphPattern->getId()]['optionalTo']      $op;
    365. -
    366.         if(is_int($op))
    367. -
    368.         $patternlist[$op]['hasOptional']++;
    369. -
    370.  
    371. -
    372.         $patternlist[$graphPattern->getId()]['unionWith']       $un;
    373. -
    374.         if(is_int($un))
    375. -
    376.         $patternlist[$un]['hasUnion']++;
    377. -
    378.  
    379. -
    380.         $constraint $graphPattern->getConstraint();
    381. -
    382.         if($constraint != null){
    383. -
    384.             foreach($constraint as $constr){
    385. -
    386.                 if($constr->isOuterFilter()){
    387. -
    388.                     $patternlist[$graphPattern->getId()]['outerFilter'][]          $constr;
    389. -
    390.                     $patternlist[$graphPattern->getId()]['innerFilter'][]          null;
    391. -
    392.                 }else{
    393. -
    394.                     $patternlist[$graphPattern->getId()]['innerFilter'][]          $constr;
    395. -
    396.                     $patternlist[$graphPattern->getId()]['outerFilter'][]          null;
    397. -
    398.                 }
    399. -
    400.             }
    401. -
    402.         }else{
    403. -
    404.             $patternlist[$graphPattern->getId()]['innerFilter']          null;
    405. -
    406.             $patternlist[$graphPattern->getId()]['outerFilter']          null;
    407. -
    408.         }
    409. -
    410.     }
    411. -
    412.  
    413. -
    414.  
    415. -
    416.     /**
    417. -
    418.     * Finds Tuples matching one TriplePattern.
    419. -
    420.     *
    421. -
    422.     * @param  TriplePattern $pattern 
    423. -
    424.     * @param  Array         $graphlist 
    425. -
    426.     * @return Array 
    427. -
    428.     */
    429. -
    430.     protected function findTuplesMatchingOnePattern($pattern$graphlist){
    431. -
    432.         $var null;
    433. -
    434.         $sub  $pattern->getSubject();
    435. -
    436.         $pred $pattern->getPredicate();
    437. -
    438.         $obj  $pattern->getObject();
    439. -
    440.  
    441. -
    442.         if(is_string($sub)||$sub instanceof BlankNode){
    443. -
    444.             if(is_string($sub))
    445. -
    446.             $var['sub'$sub;
    447. -
    448.             $sub null;
    449. -
    450.         }
    451. -
    452.         if(is_string($pred)||$pred instanceof BlankNode ){
    453. -
    454.             if(is_string($pred))
    455. -
    456.             $var['pred'$pred;
    457. -
    458.             $pred null;
    459. -
    460.         }
    461. -
    462.         if(is_string($obj)||$obj instanceof BlankNode){
    463. -
    464.             if(is_string($obj))
    465. -
    466.             $var['obj'$obj;
    467. -
    468.             $obj null;
    469. -
    470.         }
    471. -
    472.         $intBindings $this->_buildIntBindings($var);
    473. -
    474.         $k 0;
    475. -
    476.  
    477. -
    478.         $key 0;
    479. -
    480.         // search in named graphs
    481. -
    482.         if($graphlist['var'][0!= null||$graphlist['list'][0!= null){
    483. -
    484.             foreach($graphlist['list'as $key => $graphnode){
    485. -
    486.  
    487. -
    488.                 // query the dataset
    489. -
    490.                 $it $this->dataset->findInNamedGraphs($graphnode,$sub,$pred,$obj,false);
    491. -
    492.                 if($it->valid()){
    493. -
    494.                     // add statements to the result list
    495. -
    496.                     while($it->valid()){
    497. -
    498.                         if($graphnode == null){
    499. -
    500.                             $element $it->current()->getStatement();
    501. -
    502.                             $grname  $it->current()->getGraphname();
    503. -
    504.                         }else{
    505. -
    506.                             if($it->current(instanceof Quad)
    507. -
    508.                                 $element $it->current()->getStatement();
    509. -
    510.                             else
    511. -
    512.                                 $element $it->current();
    513. -
    514.  
    515. -
    516.                             $grname  $graphnode;
    517. -
    518.                         }
    519. -
    520.                         if($this->checkIntBindings($element,$intBindings)){
    521. -
    522.                             $resmodel['trip'][$k]  $element;
    523. -
    524.                             $resmodel['graph'][$k$grname;
    525. -
    526.                         //    $resmodel['graphvar'][$k] = $graphlist['var'][$key];
    527. -
    528.                             $resmodel['graphvar'][$k$graphlist['var'][0];
    529. -
    530.                             $k++;
    531. -
    532.  
    533. -
    534.                         }
    535. -
    536.                         $it->next();
    537. -
    538.                     }
    539. -
    540.                 }
    541. -
    542.  
    543. -
    544.             }
    545. -
    546.         }
    547. -
    548.         // search in the default graph
    549. -
    550.         if($graphlist['list'][0== null && $graphlist['var'][0== null){
    551. -
    552.  
    553. -
    554.  
    555. -
    556.             $gr $this->dataset->getDefaultGraph();
    557. -
    558.  
    559. -
    560.             $res $gr->find($sub,$pred,$obj);
    561. -
    562.  
    563. -
    564.             foreach($res->triples as $innerkey => $element){
    565. -
    566.                 if($this->checkIntBindings($element,$intBindings)){
    567. -
    568.                         $resmodel['trip'][$k]  $element;
    569. -
    570.                         $resmodel['graph'][$knull;
    571. -
    572.                         $resmodel['graphvar'][$k$graphlist['var'][$key];
    573. -
    574.                         $k++;
    575. -
    576.                     }
    577. -
    578.             }
    579. -
    580.         }
    581. -
    582.         if($k == 0)
    583. -
    584.         return false;
    585. -
    586.         return $this->_buildResultSet($pattern,$resmodel);
    587. -
    588.     }
    589. -
    590.  
    591. -
    592.     /**
    593. -
    594.     * Checks it there are internal bindings between variables.
    595. -
    596.     *
    597. -
    598.     * @param  Triple  $trip 
    599. -
    600.     * @param  Array   $intBindings 
    601. -
    602.     * @return boolean 
    603. -
    604.     */
    605. -
    606.     protected function checkIntBindings($trip$intBindings){
    607. -
    608.         switch($intBindings){
    609. -
    610.             case -1:
    611. -
    612.             return true;
    613. -
    614.             break;
    615. -
    616.             case 0:
    617. -
    618.             if($trip->subj != $trip->pred)
    619. -
    620.             return false;
    621. -
    622.             break;
    623. -
    624.             case 1:
    625. -
    626.             if(is_a($trip->obj,'Literal'))
    627. -
    628.             return false;
    629. -
    630.             if($trip->subj != $trip->obj)
    631. -
    632.             return false;
    633. -
    634.             break;
    635. -
    636.             case 2:
    637. -
    638.             if(is_a($trip->obj,'Literal'))
    639. -
    640.             return false;
    641. -
    642.             if($trip->pred != $trip->obj)
    643. -
    644.             return false;
    645. -
    646.             break;
    647. -
    648.             case 3:
    649. -
    650.             if(is_a($trip->obj,'Literal'))
    651. -
    652.             return false;
    653. -
    654.             if($trip->pred != $trip->obj || $trip->pred != $trip->subj )
    655. -
    656.             return false;
    657. -
    658.             break;
    659. -
    660.         }
    661. -
    662.         return true;
    663. -
    664.     }
    665. -
    666.  
    667. -
    668.  
    669. -
    670.     /**
    671. -
    672.     * Perform an SQL-like inner join on two resultSets.
    673. -
    674.     *
    675. -
    676.     * @param   Array   &$finalRes 
    677. -
    678.     * @param   Array   &$res 
    679. -
    680.     * @return  Array 
    681. -
    682.     */
    683. -
    684.     protected function joinTuples(&$finalRes&$res{
    685. -
    686.  
    687. -
    688.         if (!$finalRes || !$res)
    689. -
    690.         return array();
    691. -
    692.  
    693. -
    694.         // find joint variables and new variables to be added to $finalRes
    695. -
    696.         $jointVars array();
    697. -
    698.         $newVars array();
    699. -
    700.         $k key($res);
    701. -
    702.  
    703. -
    704.         foreach ($res[$kas $varname => $node{
    705. -
    706.             if (array_key_exists($varname$finalRes[0]))
    707. -
    708.             $jointVars[$varname;
    709. -
    710.             else
    711. -
    712.             $newVars[$varname;
    713. -
    714.         }
    715. -
    716.  
    717. -
    718.         // eliminate rows of $finalRes in which the values of $jointVars do not have
    719. -
    720.         // a corresponding row in $res.
    721. -
    722.         foreach ($finalRes as $n => $fRes{
    723. -
    724.             foreach ($res as $i => $r{
    725. -
    726.                 $ok TRUE;
    727. -
    728.                 foreach ($jointVars as $j_varname)
    729. -
    730.                 if ($r[$j_varname!= $fRes[$j_varname]{
    731. -
    732.                     $ok FALSE;
    733. -
    734.                     break;
    735. -
    736.                 }
    737. -
    738.                 if ($ok)
    739. -
    740.                 break;
    741. -
    742.             }
    743. -
    744.             if (!$ok)
    745. -
    746.             unset($finalRes[$n]);
    747. -
    748.         }
    749. -
    750.  
    751. -
    752.         // join $res and $finalRes
    753. -
    754.         $joinedRes array();
    755. -
    756.         foreach ($res as $r{
    757. -
    758.             foreach ($finalRes as $n => $fRes{
    759. -
    760.                 $ok TRUE;
    761. -
    762.                 foreach ($jointVars as $j_varname)
    763. -
    764.                 if ($r[$j_varname!= $fRes[$j_varname]{
    765. -
    766.                     $ok FALSE;
    767. -
    768.                     break;
    769. -
    770.                 }
    771. -
    772.                 if ($ok{
    773. -
    774.                     $joinedRow $finalRes[$n];
    775. -
    776.                     foreach($newVars as $n_varname)
    777. -
    778.                     $joinedRow[$n_varname$r[$n_varname];
    779. -
    780.                     $joinedRes[$joinedRow;
    781. -
    782.                 }
    783. -
    784.             }
    785. -
    786.         }
    787. -
    788.         return $joinedRes;
    789. -
    790.     }
    791. -
    792.  
    793. -
    794.  
    795. -
    796.     /**
    797. -
    798.     * Joins OPTIONAL pattern results.
    799. -
    800.     *
    801. -
    802.     * @param   Array   &$finalRes 
    803. -
    804.     * @param   Array   &$res 
    805. -
    806.     * @return  Array    the joined Array
    807. -
    808.     */
    809. -
    810.     protected function joinOptionalTuples(&$finalRes&$res{
    811. -
    812.  
    813. -
    814.         if(!$finalRes && !$res)
    815. -
    816.         return array();
    817. -
    818.  
    819. -
    820.         if(!$finalRes)
    821. -
    822.         return $res;
    823. -
    824.  
    825. -
    826.         if(!$res)
    827. -
    828.         return $finalRes;
    829. -
    830.  
    831. -
    832.         // find joint variables and new variables to be added to $finalRes
    833. -
    834.         $jointVars array();
    835. -
    836.         $newVars array();
    837. -
    838.         $result array();
    839. -
    840.  
    841. -
    842.         $k key($res);
    843. -
    844.  
    845. -
    846.         foreach ($res[$kas $varname => $node{
    847. -
    848.             if (array_key_exists($varname$finalRes[0])){
    849. -
    850.                 $jointVars[$varname;
    851. -
    852.             }else{
    853. -
    854.                 $newVars[$varname;
    855. -
    856.             }
    857. -
    858.         }
    859. -
    860.         $joined array();
    861. -
    862.         $joinc 0;
    863. -
    864.         foreach($finalRes as $i =>$fRes){
    865. -
    866.             foreach($res as $n =>$r){
    867. -
    868.                 $join false;
    869. -
    870.                 foreach($jointVars as $j_varname){
    871. -
    872.                     if($r[$j_varname]==$fRes[$j_varname]){
    873. -
    874.                         $join true;
    875. -
    876.                         //break;
    877. -
    878.                     }else{
    879. -
    880.                         $join false;
    881. -
    882.                     }
    883. -
    884.                 }
    885. -
    886.                 if($join){
    887. -
    888.                     $result[$joinc$fRes;
    889. -
    890.                     foreach($newVars as $n_varname)
    891. -
    892.                     $result[$joinc][$n_varname$r[$n_varname];
    893. -
    894.                     $joined[]=$n;
    895. -
    896.                     $joinc++;
    897. -
    898.                 }
    899. -
    900.  
    901. -
    902.             }
    903. -
    904.         }
    905. -
    906.  
    907. -
    908.         $count count($result);
    909. -
    910.         foreach($res as $k =>$val){
    911. -
    912.             if(!in_array($k,$joined)){
    913. -
    914.                 $result[$count$finalRes[0];
    915. -
    916.                 foreach($result[$countas $varname => $varVal){
    917. -
    918.                     $result[$count][$varname]='';
    919. -
    920.                 }
    921. -
    922.  
    923. -
    924.                 foreach($val as $varname2 => $varVal2){
    925. -
    926.                     $result[$count][$varname2]=$varVal2;
    927. -
    928.                 }
    929. -
    930.                 $count++;
    931. -
    932.             }
    933. -
    934.         }
    935. -
    936.         return $result;
    937. -
    938.     }
    939. -
    940.  
    941. -
    942.  
    943. -
    944.  
    945. -
    946.     /**
    947. -
    948.     * Looks in from and from named part of the query and
    949. -
    950.     * adds the graphs to the graphlist.
    951. -
    952.     *
    953. -
    954.     * @return Array 
    955. -
    956.     */
    957. -
    958.     protected function preselectGraphs(){
    959. -
    960.         $fromNamed $this->query->getFromNamedPart();
    961. -
    962.         if($fromNamed == null)
    963. -
    964.         $fromNamed[null;
    965. -
    966.         return $fromNamed;
    967. -
    968.     }
    969. -
    970.  
    971. -
    972.  
    973. -
    974.     /**
    975. -
    976.     * Evaluates the GRPAH clause if there is one. Checks if
    977. -
    978.     * the GRAPH clause contains an IRI, variable or nothing.
    979. -
    980.     * Returns an array which contains the graphs that has to be matched.
    981. -
    982.     *
    983. -
    984.     * @param  GraphPattern $pattern 
    985. -
    986.     * @param  Array        $graphlist 
    987. -
    988.     * @return Array 
    989. -
    990.     */
    991. -
    992.     protected function _checkGraphs(&$pattern,$graphlist){
    993. -
    994.  
    995. -
    996.         $gr $pattern->getGraphname();
    997. -
    998.         if($gr instanceof Resource ){
    999. -
    1000.             if($graphlist[0]==null || in_array($gr,$graphlist)){
    1001. -
    1002.                 $newGraphList['list'][$gr;
    1003. -
    1004.                 $newGraphList['var'][]  null;
    1005. -
    1006.             }else{
    1007. -
    1008.                 return false;
    1009. -
    1010.             }
    1011. -
    1012.         }elseif (is_string($gr)){
    1013. -
    1014.             $newGraphList['list'$graphlist;
    1015. -
    1016.             $newGraphList['var'][]  $gr;
    1017. -
    1018.         }else{
    1019. -
    1020.             $newGraphList['list'$graphlist;
    1021. -
    1022.             $newGraphList['var'][]  null;
    1023. -
    1024.         }
    1025. -
    1026.         return $newGraphList;
    1027. -
    1028.     }
    1029. -
    1030.  
    1031. -
    1032.     /**
    1033. -
    1034.     * Marks triples with internal bindings.
    1035. -
    1036.     * int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj.
    1037. -
    1038.     *
    1039. -
    1040.     * @param  Array $var 
    1041. -
    1042.     * @return Array 
    1043. -
    1044.     */
    1045. -
    1046.     protected function _buildIntBindings($var){
    1047. -
    1048.         $intBindings = -1;
    1049. -
    1050.         if(!$var)
    1051. -
    1052.         return $intBindings;
    1053. -
    1054.  
    1055. -
    1056.         if(isset($var['sub'])){
    1057. -
    1058.             if(isset($var['pred']))
    1059. -
    1060.             if($var['sub'== $var['pred'])
    1061. -
    1062.             $intBindings 0;
    1063. -
    1064.             if(isset($var['obj']))
    1065. -
    1066.             if($var['sub'== $var['obj']){
    1067. -
    1068.                 if$intBindings == 0){
    1069. -
    1070.                     $intBindings 3;
    1071. -
    1072.                 }else{
    1073. -
    1074.                     $intBindings 1;
    1075. -
    1076.                 }
    1077. -
    1078.             }
    1079. -
    1080.         }
    1081. -
    1082.         if(isset($var['pred'])){
    1083. -
    1084.             if(isset($var['obj']))
    1085. -
    1086.             if($var['pred']==$var['obj']&&$intBindings!=3)
    1087. -
    1088.             $intBindings 2;
    1089. -
    1090.         }
    1091. -
    1092.         return $intBindings;
    1093. -
    1094.     }
    1095. -
    1096.  
    1097. -
    1098.     /**
    1099. -
    1100.     * Builds the resultset.
    1101. -
    1102.     *
    1103. -
    1104.     * @param  GraphPattern $pattern 
    1105. -
    1106.     * @param  Array        $resmodel 
    1107. -
    1108.     * @return Array 
    1109. -
    1110.     */
    1111. -
    1112.     protected function _buildResultSet($pattern,$resmodel){
    1113. -
    1114.         // determine variables and their corresponding values
    1115. -
    1116.         $result null;
    1117. -
    1118.         if(is_string($pattern->getSubject())){
    1119. -
    1120.             $n 0;
    1121. -
    1122.             foreach($resmodel['trip'as $key => $triple){
    1123. -
    1124.                 if(isset($resmodel['graphvar'][$key]))
    1125. -
    1126.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1127. -
    1128.                 $result[$n++][$pattern->getSubject()$triple->subj;
    1129. -
    1130.             }
    1131. -
    1132.         }
    1133. -
    1134.         if(is_string($pattern->getPredicate())){
    1135. -
    1136.             $n 0;
    1137. -
    1138.             foreach($resmodel['trip'as $key => $triple){
    1139. -
    1140.                 if(isset($resmodel['graphvar'][$key]))
    1141. -
    1142.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1143. -
    1144.                 $result[$n++][$pattern->getPredicate()$triple->pred;
    1145. -
    1146.             }
    1147. -
    1148.         }
    1149. -
    1150.         if(is_string($pattern->getObject())){
    1151. -
    1152.             $n 0;
    1153. -
    1154.             foreach($resmodel['trip'as $key => $triple){
    1155. -
    1156.                 if(isset($resmodel['graphvar'][$key]))
    1157. -
    1158.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1159. -
    1160.                 $result[$n++][$pattern->getObject()$triple->obj;
    1161. -
    1162.             }
    1163. -
    1164.         }
    1165. -
    1166.         return $result;
    1167. -
    1168.     }
    1169. -
    1170.  
    1171. -
    1172.     /**
    1173. -
    1174.     * Selects the result variables and builds a result table.
    1175. -
    1176.     *
    1177. -
    1178.     * @param  Array  $table the result table
    1179. -
    1180.     * @param  Array  $vars the result variables
    1181. -
    1182.     * @return Array 
    1183. -
    1184.     */
    1185. -
    1186.     protected function selectVars($table,$vars){
    1187. -
    1188.         if($vars[0]=='*')
    1189. -
    1190.         $vars $this->query->getAllVars();
    1191. -
    1192.         $resTable array();
    1193. -
    1194.         $hits 0;
    1195. -
    1196.         foreach($table as $val){
    1197. -
    1198.             foreach($vars as $var){
    1199. -
    1200.                 if(isset($val[$var])){
    1201. -
    1202.                     $resTable[$hits][$var]=$val[$var];
    1203. -
    1204.                 }else{
    1205. -
    1206.                     $resTable[$hits][$var]="";
    1207. -
    1208.                 }
    1209. -
    1210.             }
    1211. -
    1212.             $hits++;
    1213. -
    1214.         }
    1215. -
    1216.         return $resTable;
    1217. -
    1218.     }
    1219. -
    1220.  
    1221. -
    1222.     /**
    1223. -
    1224.     * Joins the results of the different Graphpatterns.
    1225. -
    1226.     *
    1227. -
    1228.     * @param  Array $patternlist 
    1229. -
    1230.     * @return Array 
    1231. -
    1232.     */
    1233. -
    1234.     protected function joinResults($patternlist){
    1235. -
    1236.         $joined[0]['patternResult'null;
    1237. -
    1238.         $joined[0]['outerFilter'null;
    1239. -
    1240.  
    1241. -
    1242.         while(count($patternlist)>0){
    1243. -
    1244.             foreach($patternlist as $key => $pattern){
    1245. -
    1246.                 if($pattern['hasOptional'== && $pattern['hasUnion'== 0){
    1247. -
    1248.                     if(is_int($pattern['optionalTo'])){
    1249. -
    1250.                         $patternlist[$pattern['optionalTo']]['hasOptional']--;
    1251. -
    1252.                         $patternlist[$pattern['optionalTo']]['patternResult'$this->joinOptionalTuples($pattern['patternResult'],$patternlist[$pattern['optionalTo']]['patternResult']);
    1253. -
    1254.                         unset($patternlist[$key]);
    1255. -
    1256.                         break;
    1257. -
    1258.                     }
    1259. -
    1260.                     else if(is_int($pattern['unionWith'])){
    1261. -
    1262.                         $patternlist[$pattern['unionWith']]['hasUnion']--;
    1263. -
    1264.                         foreach($pattern['patternResult'as $value)
    1265. -
    1266.                         array_push($patternlist[$pattern['unionWith']]['patternResult'],$value);
    1267. -
    1268.                         unset($patternlist[$key]);
    1269. -
    1270.                         break;
    1271. -
    1272.                     }else{
    1273. -
    1274.                         if($joined[0]['patternResult'== null){
    1275. -
    1276.                             $joined[0]['patternResult'$pattern['patternResult'];
    1277. -
    1278.                             if($joined[0]['outerFilter'== null )
    1279. -
    1280.                             $joined[0]['outerFilter']  $pattern['outerFilter'];
    1281. -
    1282.                             unset($patternlist[$key]);
    1283. -
    1284.                             break;
    1285. -
    1286.                         }
    1287. -
    1288.                     //    if($pattern['patternResult'] !=null ){
    1289. -
    1290.                             $joined[0]['patternResult'$this->joinTuples($joined[0]['patternResult'],$pattern['patternResult']);
    1291. -
    1292.                             $joined[0]['outerFilter']   $pattern['outerFilter'];
    1293. -
    1294.                             unset($patternlist[$key]);
    1295. -
    1296.                             break;
    1297. -
    1298.                     //    }
    1299. -
    1300.                     }
    1301. -
    1302.                 }
    1303. -
    1304.             }
    1305. -
    1306.         }
    1307. -
    1308.         return $joined;
    1309. -
    1310.     }
    1311. -
    1312.  
    1313. -
    1314.     /**
    1315. -
    1316.     * Filters the pattern results.
    1317. -
    1318.     *
    1319. -
    1320.     * @param  Array   $patternlist list containing the results of the GraphPatterns
    1321. -
    1322.     * @param  boolean $outer TRUE if its an outer filter FALSE if not
    1323. -
    1324.     * @return Array   the filtered patternlist
    1325. -
    1326.     */
    1327. -
    1328.     protected function filterPatterns($patternlist,$outer){
    1329. -
    1330.         if($outer)
    1331. -
    1332.         $filter 'outerFilter';
    1333. -
    1334.         else
    1335. -
    1336.         $filter 'innerFilter';
    1337. -
    1338.         foreach($patternlist as $patkey => $pattern){
    1339. -
    1340.             // get constraints
    1341. -
    1342.             $constraint $pattern[$filter];
    1343. -
    1344.  
    1345. -
    1346.             if(count($constraint)>0){
    1347. -
    1348.                 foreach($constraint as $constr){
    1349. -
    1350.                     if($constr != null){
    1351. -
    1352.                         // extract Vars and function calls
    1353. -
    1354.                         $evalString $constr->getExpression();
    1355. -
    1356.                         preg_match_all("/\?.[^\s\)\,]*/",$evalString,$vars);
    1357. -
    1358.                         preg_match_all("/bound\((.[^\)]*)\)/i",$evalString,$boundcalls);
    1359. -
    1360.                         preg_match_all("/isuri\((.[^\)]*)\)/i",$evalString,$isUricalls);
    1361. -
    1362.                         preg_match_all("/isblank\((.[^\)]*)\)/i",$evalString,$isBlankcalls);
    1363. -
    1364.                         preg_match_all("/isLiteral\((.[^\)]*)\)/i",$evalString,$isLiteralcalls);
    1365. -
    1366.                         preg_match_all("/lang\((.[^\)]*)\)/i",$evalString,$langcalls);
    1367. -
    1368.                         preg_match_all("/datatype\((.[^\)]*)\)/i",$evalString,$datatypecalls);
    1369. -
    1370.                         preg_match_all("/str\((.[^\)]*)\)/i",$evalString,$stringcalls);
    1371. -
    1372.  
    1373. -
    1374.                         // is Bound
    1375. -
    1376.                         if(count($boundcalls[1])>0)
    1377. -
    1378.                         $function['bound'$boundcalls[1];
    1379. -
    1380.                         else
    1381. -
    1382.                         $function['bound'false;
    1383. -
    1384.  
    1385. -
    1386.                         // is URI
    1387. -
    1388.                         if(count($isUricalls[1])>0)
    1389. -
    1390.                         $function['isUri'$isUricalls[1];
    1391. -
    1392.                         else
    1393. -
    1394.                         $function['isUri'false;
    1395. -
    1396.  
    1397. -
    1398.                         // is Blank
    1399. -
    1400.                         if(count($isBlankcalls[1])>0)
    1401. -
    1402.                         $function['isBlank'$isBlankcalls[1];
    1403. -
    1404.                         else
    1405. -
    1406.                         $function['isBlank'false;
    1407. -
    1408.  
    1409. -
    1410.                         // is Literal
    1411. -
    1412.                         if(count($isLiteralcalls[1])>0)
    1413. -
    1414.                         $function['isLiteral'$isLiteralcalls[1];
    1415. -
    1416.                         else
    1417. -
    1418.                         $function['isLiteral'false;
    1419. -
    1420.  
    1421. -
    1422.                         // lang
    1423. -
    1424.                         if(count($langcalls[1])>0)
    1425. -
    1426.                         $function['lang'$langcalls[1];
    1427. -
    1428.                         else
    1429. -
    1430.                         $function['lang'false;
    1431. -
    1432.  
    1433. -
    1434.                         // datatype
    1435. -
    1436.                         if(count($datatypecalls[1])>0)
    1437. -
    1438.                         $function['datatype'$datatypecalls[1];
    1439. -
    1440.                         else
    1441. -
    1442.                         $function['datatype'false;
    1443. -
    1444.  
    1445. -
    1446.                         // string
    1447. -
    1448.                         if(count($stringcalls[1])>0)
    1449. -
    1450.                         $function['string'$stringcalls[1];
    1451. -
    1452.                         else
    1453. -
    1454.                         $function['string'false;
    1455. -
    1456.  
    1457. -
    1458.  
    1459. -
    1460.                         foreach($pattern['patternResult'as $key => $res){
    1461. -
    1462.                             $result false;
    1463. -
    1464.                             $evalString $this->fillConstraintString($vars,$res,$constr,$function);
    1465. -
    1466.                             $evalString '$result =('.$evalString.');';
    1467. -
    1468.                             // evaluate Constraint
    1469. -
    1470.                             @eval($evalString);
    1471. -
    1472.  
    1473. -
    1474.                             if(!$result)
    1475. -
    1476.                             unset($patternlist[$patkey]['patternResult'][$key]);
    1477. -
    1478.  
    1479. -
    1480.                         }
    1481. -
    1482.                     }
    1483. -
    1484.                 }
    1485. -
    1486.             }
    1487. -
    1488.         }
    1489. -
    1490.         return $patternlist;
    1491. -
    1492.     }
    1493. -
    1494.  
    1495. -
    1496.     /**
    1497. -
    1498.     * Builds an evaluation string to determine wether the result passes
    1499. -
    1500.     * the filter or not. This string is evaluatet by the php buildin eval() function
    1501. -
    1502.     *
    1503. -
    1504.     * @param  Array      $vars a list which contains the used variables
    1505. -
    1506.     * @param  Array      $res  the result part which have to be evaluated
    1507. -
    1508.     * @param  Constraint $constraint the Constrain object
    1509. -
    1510.     * @param  Array      $function an Array which contains the used functions
    1511. -
    1512.     * @return String 
    1513. -
    1514.     */
    1515. -
    1516.  
    1517. -
    1518.     protected function fillConstraintString($vars,$res,$constraint,$function){
    1519. -
    1520.  
    1521. -
    1522.         $boundExpr false;
    1523. -
    1524.         $evalString $constraint->getExpression();
    1525. -
    1526.  
    1527. -
    1528.         // extract Literals
    1529. -
    1530.         $pattern1 "/\".[^\"]*\"[^\^\@]/";
    1531. -
    1532.         $pattern2 "/\'.[^\']*\'[^\^\@]/";
    1533. -
    1534.         preg_match_all($pattern1,$evalString,$hits1);
    1535. -
    1536.         preg_match_all($pattern2,$evalString,$hits2);
    1537. -
    1538.  
    1539. -
    1540.         foreach($hits1[0as $k => $val){
    1541. -
    1542.             $evalString preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED1_'.$k++,$evalString,1);
    1543. -
    1544.         }
    1545. -
    1546.         foreach($hits2[0as $k => $val){
    1547. -
    1548.             $evalString preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED2_'.$k++,$evalString,1);
    1549. -
    1550.         }
    1551. -
    1552.  
    1553. -
    1554.         // replace namespaces
    1555. -
    1556.         $prefs $this->query->getPrefixes();
    1557. -
    1558.         foreach($prefs as $key => $val){
    1559. -
    1560.             if($key == '')
    1561. -
    1562.             $key ' ';
    1563. -
    1564.             $evalString preg_replace("/^(".$key."\:)(.[^\s]*)|([\s\(]?[^\^])(".$key."\:)(.[^\s\)]*)([\s\)]?)/","$3'<".$val."$2$5>'$6",$evalString);
    1565. -
    1566.  
    1567. -
    1568.             $evalString preg_replace("/(\^)(".$key."\:)(.[^\s]*)/","$1<".$val."$3>",$evalString);
    1569. -
    1570.         }
    1571. -
    1572.  
    1573. -
    1574.         $xsd "http\:\/\/www.w3.org\/2001\/XMLSchema\#";
    1575. -
    1576.  
    1577. -
    1578.         // evaluate bound calls
    1579. -
    1580.         if($function['bound']){
    1581. -
    1582.             $boundExpr true;
    1583. -
    1584.             foreach($function['bound'as $var){
    1585. -
    1586.                 if(isset($res[$var]&& $res[$var]!=="")
    1587. -
    1588.                 $replacement 'true';
    1589. -
    1590.                 else
    1591. -
    1592.                 $replacement 'false';
    1593. -
    1594.                 $evalString preg_replace("/bound\(\\".$var."\)/i",$replacement,$evalString);
    1595. -
    1596.             }
    1597. -
    1598.  
    1599. -
    1600.         }
    1601. -
    1602.         // evaluate isBlank calls
    1603. -
    1604.         if($function['isBlank']){
    1605. -
    1606.             foreach($function['isBlank'as $var){
    1607. -
    1608.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof BlankNode )
    1609. -
    1610.                 $replacement 'true';
    1611. -
    1612.                 else
    1613. -
    1614.                 $replacement 'false';
    1615. -
    1616.                 $evalString preg_replace("/isBlank\(\\".$var."\)/i",$replacement,$evalString);
    1617. -
    1618.             }
    1619. -
    1620.  
    1621. -
    1622.         }
    1623. -
    1624.         // evaluate isLiteral calls
    1625. -
    1626.         if($function['isLiteral']){
    1627. -
    1628.             foreach($function['isLiteral'as $var){
    1629. -
    1630.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal  )
    1631. -
    1632.                 $replacement 'true';
    1633. -
    1634.                 else
    1635. -
    1636.                 $replacement 'false';
    1637. -
    1638.                 $evalString preg_replace("/isLiteral\(\\".$var."\)/i",$replacement,$evalString);
    1639. -
    1640.             }
    1641. -
    1642.  
    1643. -
    1644.         }
    1645. -
    1646.         // evaluate isUri calls
    1647. -
    1648.         if($function['isUri']){
    1649. -
    1650.             foreach($function['isUri'as $var){
    1651. -
    1652.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Resource && $res[$var]->getUri(&& !$res[$varinstanceof BlankNode )
    1653. -
    1654.                 $replacement 'true';
    1655. -
    1656.                 else
    1657. -
    1658.                 $replacement 'false';
    1659. -
    1660.                 $evalString preg_replace("/isUri\(\\".$var."\)/i",$replacement,$evalString);
    1661. -
    1662.             }
    1663. -
    1664.         }
    1665. -
    1666.         // evaluate lang calls
    1667. -
    1668.         if($function['lang']){
    1669. -
    1670.             foreach($function['lang'as $var){
    1671. -
    1672.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal && $res[$var]->getLanguage() )
    1673. -
    1674.                 $replacement '"'.$res[$var]->getLanguage().'"';
    1675. -
    1676.                 else
    1677. -
    1678.                 $replacement 'null';
    1679. -
    1680.                 $evalString preg_replace("/lang\(\\".$var."\)/i",$replacement,$evalString);
    1681. -
    1682.             }
    1683. -
    1684.         }
    1685. -
    1686.         // evaluate datatype calls
    1687. -
    1688.         if($function['datatype']){
    1689. -
    1690.             foreach($function['datatype'as $var){
    1691. -
    1692.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal && $res[$var]->getDatatype() )
    1693. -
    1694.                 $replacement '\'<'.$res[$var]->getDatatype().'>\'';
    1695. -
    1696.                 else
    1697. -
    1698.                 $replacement 'false';
    1699. -
    1700.                 $evalString preg_replace("/datatype\(\\".$var."\)/i",$replacement,$evalString);
    1701. -
    1702.             }
    1703. -
    1704.         }
    1705. -
    1706.         // evaluate string calls
    1707. -
    1708.         if($function['string']){
    1709. -
    1710.             foreach($function['string'as $var){
    1711. -
    1712.                 if($var{0}=='?' || $var{0}=='$'){
    1713. -
    1714.                     if(isset($res[$var]&& $res[$var]!==""){
    1715. -
    1716.                         $replacement "'str_".$res[$var]->getLabel()."'";
    1717. -
    1718.                         if($res[$varinstanceof BlankNode)
    1719. -
    1720.                         $replacement "''";
    1721. -
    1722.                     }else{
    1723. -
    1724.                         $replacement 'false';
    1725. -
    1726.                     }
    1727. -
    1728.                     $evalString preg_replace("/str\(\\".$var."\)/i",$replacement,$evalString);
    1729. -
    1730.                 }else{
    1731. -
    1732.                     if($var{0}=='<'){
    1733. -
    1734.                         $evalString preg_replace("/str\(\s*\<(.[^\>]*)\>\s*\)/i","'str_$1'",$evalString);
    1735. -
    1736.                     }
    1737. -
    1738.                     if($var{0}=='"'){
    1739. -
    1740.                         $evalString preg_replace("/str\(\s*\"(.[^\>]*)\"\@[a-z]*\s*\)/i","'str_$1'",$evalString);
    1741. -
    1742.                     }
    1743. -
    1744.                 }
    1745. -
    1746.  
    1747. -
    1748.             }
    1749. -
    1750.         }
    1751. -
    1752.         // evaluate VARS
    1753. -
    1754.         foreach($vars[0as $var){
    1755. -
    1756.             if(isset($res[$var])&&$res[$var]!== ""){
    1757. -
    1758.                 //$replacement = "'".$res[$var]->getLabel()."'";
    1759. -
    1760.                 $replacement '" "';
    1761. -
    1762.                 if($res[$varinstanceof Literal){
    1763. -
    1764.                     if($res[$var]->getDatatype()!= null){
    1765. -
    1766.                         if($res[$var]->getDatatype(== XML_SCHEMA.'boolean')
    1767. -
    1768.                         $replacement $res[$var]->getLabel();
    1769. -
    1770.                         if($res[$var]->getDatatype(== XML_SCHEMA.'double')
    1771. -
    1772.                         $replacement $res[$var]->getLabel();
    1773. -
    1774.                         if($res[$var]->getDatatype(== XML_SCHEMA.'integer')
    1775. -
    1776.                         $replacement $res[$var]->getLabel();
    1777. -
    1778.                         if($res[$var]->getDatatype(== XML_SCHEMA.'dateTime')
    1779. -
    1780.                         $replacement strtotime($res[$var]->getLabel());
    1781. -
    1782.                     }else{
    1783. -
    1784.                         if($res[$var]->getLabel()=="")
    1785. -
    1786.                         $replacement 'false';
    1787. -
    1788.                         else
    1789. -
    1790.                         $replacement "'str_".$res[$var]->getLabel()."'";
    1791. -
    1792.                     }
    1793. -
    1794.                 }else{
    1795. -
    1796.                     if($res[$varinstanceof Resource){
    1797. -
    1798.                         $replacement "'<".$res[$var]->getLabel().">'";
    1799. -
    1800.                     }
    1801. -
    1802.                 }
    1803. -
    1804.                 $evalString preg_replace("/\\".$var."/",$replacement,$evalString);
    1805. -
    1806.             }
    1807. -
    1808.  
    1809. -
    1810.             // problem with PHP: false < 13 is true
    1811. -
    1812.             if(isset($res[$var])){
    1813. -
    1814.                 if($res[$var=== ""){
    1815. -
    1816.                     if($boundExpr)
    1817. -
    1818.                     $evalString preg_replace("/\\".$var."/","false",$evalString);
    1819. -
    1820.                     else
    1821. -
    1822.                     $evalString 'false';
    1823. -
    1824.                 }
    1825. -
    1826.             }else{
    1827. -
    1828.                 $evalString preg_replace("/\\".$var."/","false",$evalString);
    1829. -
    1830.             }
    1831. -
    1832.  
    1833. -
    1834.         }
    1835. -
    1836.  
    1837. -
    1838.         // replace '=' with '=='
    1839. -
    1840.         $evalString preg_replace("/(.[^\=])(\=)(.[^\=])/","$1==$3",$evalString);
    1841. -
    1842.  
    1843. -
    1844.  
    1845. -
    1846.         // rewrite Literals
    1847. -
    1848.         foreach($hits1[0as $k => $val){
    1849. -
    1850.             $pattern '/_REPLACED1_'.$k.'/';
    1851. -
    1852.             $evalString preg_replace($pattern,$hits1[0][$k],$evalString,1);
    1853. -
    1854.         }
    1855. -
    1856.  
    1857. -
    1858.         foreach($hits2[0as $k => $val){
    1859. -
    1860.             $pattern '/_REPLACED2_'.$k.'/';
    1861. -
    1862.             $evalString preg_replace($pattern,$hits2[0][$k],$evalString,1);
    1863. -
    1864.         }
    1865. -
    1866.  
    1867. -
    1868.         // replace xsd:boolean expressions
    1869. -
    1870.         $pattern $pattern '/\"\s?true\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?true\s?\'\^\^xsd:boolean/';
    1871. -
    1872.         $evalString preg_replace($pattern,"true",$evalString);
    1873. -
    1874.  
    1875. -
    1876.         $pattern $pattern '/\"\s?false\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?false\s?\'\^\^xsd:boolean/';
    1877. -
    1878.         $evalString preg_replace($pattern,"false",$evalString);
    1879. -
    1880.  
    1881. -
    1882.         // replace xsd:date expressions
    1883. -
    1884.         $pattern "/\"(.[^\"]*)\"\^\^".$xsd."dateTime/";
    1885. -
    1886.         preg_match_all($pattern,$evalString,$hits);
    1887. -
    1888.  
    1889. -
    1890.         foreach($hits[1as $dummy)
    1891. -
    1892.         $evalString preg_replace("/\".[^\"]*\"\^\^".$xsd."dateTime/",strtotime($dummy),$evalString,1);
    1893. -
    1894.  
    1895. -
    1896.  
    1897. -
    1898.         $evalString preg_replace("/(\'\<".$xsd."dateTime\()(.[^\)]*\))\>\'/","dateTime($2",$evalString);
    1899. -
    1900.  
    1901. -
    1902.         $evalString preg_replace("/(\'\<".$xsd."integer\()(.[^\)]*\))\>\'/","integer($2",$evalString);
    1903. -
    1904.  
    1905. -
    1906.         // tag plain literals
    1907. -
    1908.         $evalString preg_replace("/\"(.[^\"]*)\"([^\^])|\"(.[^\"]*)\"$/","'str_$1$3'$2",$evalString);
    1909. -
    1910.  
    1911. -
    1912.         return $evalString;
    1913. -
    1914.     }
    1915. -
    1916.  
    1917. -
    1918.     /**
    1919. -
    1920.     * Sorts the results.
    1921. -
    1922.     *
    1923. -
    1924.     * @param  Array  $vartable List containing the unsorted result vars
    1925. -
    1926.     * @return Array  List containing the sorted result vars
    1927. -
    1928.     */
    1929. -
    1930.     protected function sortVars($vartable)
    1931. -
    1932.     {
    1933. -
    1934.         $newTable array();
    1935. -
    1936.         $mod $this->query->getSolutionModifier();
    1937. -
    1938.         // if no ORDER BY solution modifier return vartable
    1939. -
    1940.         if($mod['order by']!= null){
    1941. -
    1942.             $order $mod['order by'];
    1943. -
    1944.             $map $this->buildVarmap($order,$vartable);
    1945. -
    1946.             foreach($map as $val){
    1947. -
    1948.                 $newTable[$vartable[$val];
    1949. -
    1950.             }
    1951. -
    1952.         }else{
    1953. -
    1954.             $newTable $vartable;
    1955. -
    1956.         }
    1957. -
    1958.  
    1959. -
    1960.         if($mod['offset'!= null){
    1961. -
    1962.             $newTable array_slice ($newTable$mod['offset']);
    1963. -
    1964.         }
    1965. -
    1966.         if($mod['limit'!= null){
    1967. -
    1968.             $newTable array_slice($newTable,0,$mod['limit']);
    1969. -
    1970.         }
    1971. -
    1972.  
    1973. -
    1974.         return $newTable;
    1975. -
    1976.     }
    1977. -
    1978.  
    1979. -
    1980.     /**
    1981. -
    1982.     * Sorts the result table.
    1983. -
    1984.     *
    1985. -
    1986.     * @param  String $order (ASC/DESC)
    1987. -
    1988.     * @param  Array  $vartable the vartable
    1989. -
    1990.     * @return Array  A map that contains the new order of the result vars
    1991. -
    1992.     */
    1993. -
    1994.     protected function buildVarmap($order$vartable)
    1995. -
    1996.     {
    1997. -
    1998.         $n0;
    1999. -
    2000.         $result array();
    2001. -
    2002.         $num_var array();
    2003. -
    2004.         foreach($order as $variable)
    2005. -
    2006.         $num_var[$variable['val']] 0;
    2007. -
    2008.  
    2009. -
    2010.         foreach($vartable as $k => $x){
    2011. -
    2012.             foreach($order as $value){
    2013. -
    2014.                 // if the value is a typed Literal try to determine if it
    2015. -
    2016.                 // a numeric datatype
    2017. -
    2018.                 if($x[$value['val']] instanceof Literal){
    2019. -
    2020.                     $dtype $x[$value['val']]->getDatatype();
    2021. -
    2022.                     if($dtype){
    2023. -
    2024.                         switch($dtype){
    2025. -
    2026.                             case XML_SCHEMA."integer":
    2027. -
    2028.                             $num_var[$value['val']]++;
    2029. -
    2030.                             break;
    2031. -
    2032.                             case XML_SCHEMA."double":
    2033. -
    2034.                             $num_var[$value['val']]++;
    2035. -
    2036.                             break;
    2037. -
    2038.  
    2039. -
    2040.                         }
    2041. -
    2042.                     }
    2043. -
    2044.                 }
    2045. -
    2046.                 if($x[$value['val']]){
    2047. -
    2048.                     if($x[$value['val']]instanceof Literal){
    2049. -
    2050.                         $pref "2";
    2051. -
    2052.                     }
    2053. -
    2054.                     if($x[$value['val']]instanceof Resource){
    2055. -
    2056.                         $pref "1";
    2057. -
    2058.                     }
    2059. -
    2060.                     if($x[$value['val']]instanceof BlankNode){
    2061. -
    2062.                         $pref "0";
    2063. -
    2064.                     }
    2065. -
    2066.                     $result[$value['val']][$n$pref.$x[$value['val']]->getLabel();
    2067. -
    2068.                 }else{
    2069. -
    2070.                     $result[$value['val']][$n"";
    2071. -
    2072.                 }
    2073. -
    2074.             }
    2075. -
    2076.             $result['oldKey'][$n$k;
    2077. -
    2078.             $n++;
    2079. -
    2080.         }
    2081. -
    2082.         $sortString "";
    2083. -
    2084.         foreach($order as $value){
    2085. -
    2086.             if($num_var[$value['val']] == $n)
    2087. -
    2088.             $sort SORT_NUMERIC;
    2089. -
    2090.             else
    2091. -
    2092.             $sort SORT_STRING;
    2093. -
    2094.  
    2095. -
    2096.             if($value['type'== 'asc')
    2097. -
    2098.             $type SORT_ASC;
    2099. -
    2100.             else
    2101. -
    2102.             $type SORT_DESC;
    2103. -
    2104.  
    2105. -
    2106.             $sortString $sortString.'$result["'.$value['val'].'"],'.$type.','.$sort.',';
    2107. -
    2108.         }
    2109. -
    2110.         $sortString "array_multisort(".$sortString.'$result["oldKey"]);';
    2111. -
    2112.  
    2113. -
    2114.         @eval($sortString);
    2115. -
    2116.         return $result['oldKey'];
    2117. -
    2118.     }
    2119. -
    2120.  
    2121. -
    2122.  
    2123. -
    2124.  
    2125. -
    2126.     /**
    2127. -
    2128.     * Eliminates duplicate results.
    2129. -
    2130.     *
    2131. -
    2132.     * @param  Array  $vartable a table that contains the result vars and their bindings
    2133. -
    2134.     * @return Array the result table without duplicate results
    2135. -
    2136.     */
    2137. -
    2138.     protected function distinct($vartable)
    2139. -
    2140.     {
    2141. -
    2142.         $index array();
    2143. -
    2144.         foreach($vartable as $key => $value){
    2145. -
    2146.             $key_index="";
    2147. -
    2148.             foreach($value as $k => $v)
    2149. -
    2150.             if($v instanceof Object)
    2151. -
    2152.                 $key_index $key_index.$k.$v->toString();
    2153. -
    2154.             if(isset($index[$key_index]))
    2155. -
    2156.             unset($vartable[$key]);
    2157. -
    2158.             else
    2159. -
    2160.             $index[$key_index]1;
    2161. -
    2162.         }
    2163. -
    2164.         return $vartable;
    2165. -
    2166.     }
    2167. -
    2168.  
    2169. -
    2170.  
    2171. -
    2172.     /**
    2173. -
    2174.     * Prints a query result as HTML table.
    2175. -
    2176.     * You can change the colors in the configuration file.
    2177. -
    2178.     *
    2179. -
    2180.     * @param array $queryResult [][?VARNAME] = object Node
    2181. -
    2182.     * @return void 
    2183. -
    2184.     */
    2185. -
    2186.     public function writeQueryResultAsHtmlTable($queryResult{
    2187. -
    2188.         // Import Package Utility
    2189. -
    2190.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    2191. -
    2192.  
    2193. -
    2194.         if $queryResult[0== null{
    2195. -
    2196.             echo 'no match<br>';
    2197. -
    2198.             return;
    2199. -
    2200.         }
    2201. -
    2202.         if $queryResult == 'false'{
    2203. -
    2204.             echo 'boolean: false<br>';
    2205. -
    2206.             return;
    2207. -
    2208.         }
    2209. -
    2210.         if $queryResult == 'true'{
    2211. -
    2212.             echo 'boolean: true<br>';
    2213. -
    2214.             return;
    2215. -
    2216.         }
    2217. -
    2218.  
    2219. -
    2220.  
    2221. -
    2222.         echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
    2223. -
    2224.         foreach ($queryResult[0as $varName => $value)
    2225. -
    2226.         echo "<td align='center'><b>$varName</b></td>";
    2227. -
    2228.         echo '</tr>';
    2229. -
    2230.  
    2231. -
    2232.         foreach ($queryResult as $n => $var{
    2233. -
    2234.  
    2235. -
    2236.  
    2237. -
    2238.             echo '<tr><td width="20" align="right">' .($n 1.'.</td>';
    2239. -
    2240.             foreach ($var as $varName => $value{
    2241. -
    2242.                 if($value !=''){
    2243. -
    2244.                     echo INDENTATION INDENTATION '<td bgcolor="';
    2245. -
    2246.                     echo RDFUtil::chooseColor($value);
    2247. -
    2248.                     echo '">';
    2249. -
    2250.                     echo '<p>';
    2251. -
    2252.  
    2253. -
    2254.                     $lang  NULL;
    2255. -
    2256.                     $dtype NULL;
    2257. -
    2258.                     if (is_a($value'Literal')) {
    2259. -
    2260.                         if ($value->getLanguage(!= NULL)
    2261. -
    2262.                         $lang ' <b>(xml:lang="' $value->getLanguage('") </b> ';
    2263. -
    2264.                         if ($value->getDatatype(!= NULL)
    2265. -
    2266.                         $dtype ' <b>(rdf:datatype="' $value->getDatatype('") </b> ';
    2267. -
    2268.                     }
    2269. -
    2270.                     echo  RDFUtil::getNodeTypeName($value.$value->getLabel($lang $dtype .'</p>';
    2271. -
    2272.                 }else{
    2273. -
    2274.                     echo "<td bgcolor='white'>unbound";
    2275. -
    2276.                 }
    2277. -
    2278.             }
    2279. -
    2280.             echo '</tr>';
    2281. -
    2282.         }
    2283. -
    2284.         echo '</table>';
    2285. -
    2286.     }
    2287. -
    2288.  
    2289. -
    2290.  
    2291. -
    2292.  
    2293. -
    2294.     /*
    2295. -
    2296.     *   Dumb getters
    2297. -
    2298.     */
    2299. -
    2300.  
    2301. -
    2302.  
    2303. -
    2304.  
    2305. -
    2306.     public function getQuery()
    2307. -
    2308.     {
    2309. -
    2310.         return $this->query;
    2311. -
    2312.     }//public function getQuery()
    2313. -
    2314.  
    2315. -
    2316.  
    2317. -
    2318.  
    2319. -
    2320.     public function getDataset()
    2321. -
    2322.     {
    2323. -
    2324.         return $this->dataset;
    2325. -
    2326.     }//public function getDataset()
    2327. -
    2328.  
    2329. -
    2330. // end: Class SparqlEngine
    2331. -
    2332.  
    2333. -
    2334. ?>
    2335. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base deleted file mode 100755 index 22f532e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDb.php.html.svn-base +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - File Source for SparqlEngineDb.php - - - - - -

    Source for file SparqlEngineDb.php

    -

    Documentation is available at SparqlEngineDb.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Offsetter.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultConverter.php';
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGenerator.php';
    10. -
    11. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlMerger.php';
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. *   SPARQL engine optimized for databases.
    18. -
    19. *   Generates SQL statements to directly query the database,
    20. -
    21. *   letting the database system do all the hard work like
    22. -
    23. *   selecting, joining, filtering and ordering results.
    24. -
    25. *
    26. -
    27. *   @author Christian Weiske <cweiske@cweiske.de>
    28. -
    29. *
    30. -
    31. *   @package sparql
    32. -
    33. */
    34. -
    35. -
    36. {
    37. -
    38.     /**
    39. -
    40.     *   Sparql Query object.
    41. -
    42.     *
    43. -
    44.     *   @var Query 
    45. -
    46.     */
    47. -
    48.     protected $query;
    49. -
    50.  
    51. -
    52.     /**
    53. -
    54.     *   RDF dataset object.
    55. -
    56.     *   @var Dataset 
    57. -
    58.     */
    59. -
    60.     protected $dataset;
    61. -
    62.  
    63. -
    64.     /**
    65. -
    66.     *   Database connection object.
    67. -
    68.     *   @var ADOConnection 
    69. -
    70.     */
    71. -
    72.     protected $dbConn;
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     *   Internal ID for our graph model.
    79. -
    80.     *   Stored in the database along the statements.
    81. -
    82.     *   @var int 
    83. -
    84.     */
    85. -
    86.     protected $modelID;
    87. -
    88.  
    89. -
    90.     /**
    91. -
    92.     *   Prepared SQL statements are stored in here.
    93. -
    94.     *   @var array 
    95. -
    96.     */
    97. -
    98.     protected $arPrepared    = null;
    99. -
    100.  
    101. -
    102.     /**
    103. -
    104.     *   If the prepared statement is really prepared, or if we just emulate it.
    105. -
    106.     *   @var boolean 
    107. -
    108.     */
    109. -
    110.     protected $bRealPrepared = false;
    111. -
    112.  
    113. -
    114.     /**
    115. -
    116.     *   SQL generator instance
    117. -
    118.     *   @var SparqlEngineDb_SqlGenerator 
    119. -
    120.     */
    121. -
    122.     protected $sg = null;
    123. -
    124.  
    125. -
    126.     /**
    127. -
    128.     *   Type sorting instance
    129. -
    130.     *   @var SparqlEngineDb_TypeSorter 
    131. -
    132.     */
    133. -
    134.     protected $ts = null;
    135. -
    136.  
    137. -
    138.     /**
    139. -
    140.     *   Prepared statments preparator instance
    141. -
    142.     *   @var SparqlEngineDb_Preparator 
    143. -
    144.     */
    145. -
    146.     protected $pr = null;
    147. -
    148.  
    149. -
    150.  
    151. -
    152.  
    153. -
    154.     /**
    155. -
    156.     *   Use SparqlEngine::factory() to create the instance
    157. -
    158.     */
    159. -
    160.     public function __construct(DbModel $model)
    161. -
    162.     {
    163. -
    164.         //parent::__construct();
    165. -
    166.         $this->dbConn  = $model->getDbConn();
    167. -
    168.         $this->modelID = $model->getModelID();
    169. -
    170.     }//public function __construct(DbModel $model)
    171. -
    172.  
    173. -
    174.  
    175. -
    176.  
    177. -
    178.     /**
    179. -
    180.     *   Query the database with the given SPARQL query.
    181. -
    182.     *
    183. -
    184.     *
    185. -
    186.     *   @param  Dataset       $dataset    RDF Dataset
    187. -
    188.     *   @param  Query         $query      Parsed SPARQL query
    189. -
    190.     *   @param  string        $resultform Result form. If set to 'xml' the result will be
    191. -
    192.     *                                    SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    193. -
    194.     *
    195. -
    196.     *   @return array/string  array of triple arrays, or XML. Format depends on
    197. -
    198.     *                                    $resultform parameter.
    199. -
    200.     */
    201. -
    202.     public function queryModel(Dataset $datasetQuery $query$resultform false)
    203. -
    204.     {
    205. -
    206.         $this->query   = $query;
    207. -
    208.         $this->dataset = $dataset;
    209. -
    210.         $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query$this->dbConn$this->modelID);
    211. -
    212.         $this->rc new SparqlEngineDb_ResultConverter($this->query$this->sg$this);
    213. -
    214.         $this->ts = new SparqlEngineDb_TypeSorter     ($this->query$this->dbConn);
    215. -
    216.  
    217. -
    218.         if($this->query->isEmpty()){
    219. -
    220.             $vartable[0]['patternResult'null;
    221. -
    222.             return $this->returnResult($vartable$resultform);
    223. -
    224.         }
    225. -
    226.  
    227. -
    228.  
    229. -
    230.         $arSqls $this->sg->createSql();
    231. -
    232.         $this->ts->setData($this->sg);
    233. -
    234.  
    235. -
    236.         return
    237. -
    238. -
    239.                 $this->queryMultiple(
    240. -
    241.                     $this->ts->getOrderifiedSqls(
    242. -
    243.                         $arSqls
    244. -
    245.                     )
    246. -
    247.                 ),
    248. -
    249.                 $this,
    250. -
    251.                 $resultform
    252. -
    253.             );
    254. -
    255.     }//public function queryModel(Dataset $dataset, Query $query, $resultform = false)
    256. -
    257.  
    258. -
    259.  
    260. -
    261.  
    262. -
    263.     /**
    264. -
    265.     *   Create a prepared statement that can be executed later.
    266. -
    267.     *
    268. -
    269.     *   @param  Dataset       $dataset    RDF Dataset
    270. -
    271.     *   @param  Query         $query      Parsed SPARQL query
    272. -
    273.     *
    274. -
    275.     *   @return SparqlEngineDb_PreparedStatement Prepared statment that can
    276. -
    277.     *            be execute()d later.
    278. -
    279.     */
    280. -
    281.     public function prepare(Dataset $datasetQuery $query)
    282. -
    283.     {
    284. -
    285.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/PreparedStatement.php';
    286. -
    287.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Preparator.php';
    288. -
    289.  
    290. -
    291.         $this->query   = $query;
    292. -
    293.         $this->dataset = $dataset;
    294. -
    295.         $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query$this->dbConn$this->modelID);
    296. -
    297.         $this->rc new SparqlEngineDb_ResultConverter($this->query$this->sg$this);
    298. -
    299.         $this->ts = new SparqlEngineDb_TypeSorter     ($this->query$this->dbConn);
    300. -
    301.         $this->pr = new SparqlEngineDb_Preparator     ($this->query$this->dbConn);
    302. -
    303.  
    304. -
    305.         $this->arPrepared = $this->sg->createSql();
    306. -
    307.         $this->ts->setData($this->sg);
    308. -
    309.  
    310. -
    311.         if ($this->ts->willBeDataDependent()) {
    312. -
    313.             $this->bRealPrepared = false;
    314. -
    315.         else {
    316. -
    317.             $this->bRealPrepared     = true;
    318. -
    319.             list($strSelect$strFrom$strWhere$this->arPrepared;
    320. -
    321.             $this->arPreparedQueries $this->ts->getOrderifiedSqls(
    322. -
    323.                 $strSelect,
    324. -
    325.                 $strFrom,
    326. -
    327.                 $strWhere
    328. -
    329.             );
    330. -
    331.             $this->arDbStatements    $this->pr->prepareInDb(
    332. -
    333.                 $this->arPreparedQueries,
    334. -
    335.                 $this->sg->getPlaceholders()
    336. -
    337.             );
    338. -
    339.         }
    340. -
    341.  
    342. -
    343.  
    344. -
    345.         return new SparqlEngineDb_PreparedStatement(
    346. -
    347.             $this
    348. -
    349.         );
    350. -
    351.     }//public function prepare(Dataset $dataset, Query $query)
    352. -
    353.  
    354. -
    355.  
    356. -
    357.  
    358. -
    359.     /**
    360. -
    361.     *   Execute a prepared statement by filling it with variables
    362. -
    363.     *
    364. -
    365.     *   @param array $arVariables   Array with (variable name => value) pairs
    366. -
    367.     *   @param string $resultform   Which form the result should have
    368. -
    369.     *
    370. -
    371.     *   @return mixed   Result according to $resultform
    372. -
    373.     */
    374. -
    375.     public function execute($arVariables$resultform false)
    376. -
    377.     {
    378. -
    379.         if ($this->arPrepared === null{
    380. -
    381.             throw new Exception('You need to prepare() the query first.');
    382. -
    383.         }
    384. -
    385.  
    386. -
    387.         if ($this->bRealPrepared{
    388. -
    389.             return
    390. -
    391.                 SparqlEngineDb_ResultConverter::convertFromDbResults(
    392. -
    393.                     $this->pr->execute(
    394. -
    395.                         $this->arDbStatements,
    396. -
    397.                         $arVariables
    398. -
    399.                     ),
    400. -
    401.                     $this,
    402. -
    403.                     $resultform
    404. -
    405.                 );
    406. -
    407.         else {
    408. -
    409.             list($strSelect$strFrom$strWhere$this->arPrepared;
    410. -
    411.  
    412. -
    413.             return SparqlEngineDb_ResultConverter::convertFromDbResults(
    414. -
    415.                 $this->queryMultiple(
    416. -
    417.                     $this->ts->getOrderifiedSqls(
    418. -
    419.                         $strSelect,
    420. -
    421.                         $strFrom,
    422. -
    423.                         $this->pr->replacePlaceholdersWithVariables(
    424. -
    425.                             $strWhere,
    426. -
    427.                             $this->sg->getPlaceholders(),
    428. -
    429.                             $arVariables
    430. -
    431.                         )
    432. -
    433.                     )
    434. -
    435.                 ),
    436. -
    437.                 $this,
    438. -
    439.                 $resultform
    440. -
    441.             );
    442. -
    443.         }
    444. -
    445.     }//public function execute($arVariables, $resultform)
    446. -
    447.  
    448. -
    449.  
    450. -
    451.  
    452. -
    453.     /**
    454. -
    455.     *   Executes multiple SQL queries and returns an array
    456. -
    457.     *   of results.
    458. -
    459.     *
    460. -
    461.     *   @param array $arSqls     Array of SQL queries
    462. -
    463.     *   @return array   Array of query results
    464. -
    465.     */
    466. -
    467.     protected function queryMultiple($arSqls)
    468. -
    469.     {
    470. -
    471.         $arSM $this->query->getSolutionModifier();
    472. -
    473.         if ($arSM['limit'=== null && $arSM['offset'=== null{
    474. -
    475.             $nOffset 0;
    476. -
    477.             $nLimit  null;
    478. -
    479.             $nSql    0;
    480. -
    481.         else {
    482. -
    483.             $offsetter new SparqlEngineDb_Offsetter($this->dbConn$this->query);
    484. -
    485.             list($nSql$nOffset$offsetter->determineOffset($arSqls);
    486. -
    487.             $nLimit    $arSM['limit'];
    488. -
    489.         }
    490. -
    491.  
    492. -
    493.         $nCount    0;
    494. -
    495.         $arResults array();
    496. -
    497.         foreach ($arSqls as $nId => $arSql{
    498. -
    499.             if ($nId $nSqlcontinue}
    500. -
    501.  
    502. -
    503.             if ($nLimit != null{
    504. -
    505.                 $nCurrentLimit $nLimit $nCount;
    506. -
    507.             else {
    508. -
    509.                 $nCurrentLimit null;
    510. -
    511.             }
    512. -
    513.  
    514. -
    515.             $dbResult    $this->queryDb($arSql$nOffset$nCurrentLimit);
    516. -
    517.             $nCount     += $dbResult->RowCount();
    518. -
    519.             $arResults[$dbResult;
    520. -
    521.             $nOffset 0;
    522. -
    523.             if ($nLimit !== null && $nCount >= $nLimit{
    524. -
    525.                 break;
    526. -
    527.             }
    528. -
    529.         }
    530. -
    531.  
    532. -
    533.         return $arResults;
    534. -
    535.         //return array_map(array($this, 'queryDb'), $arSql);
    536. -
    537.     }//protected function queryMultiple($arSql)
    538. -
    539.  
    540. -
    541.  
    542. -
    543.  
    544. -
    545.     /**
    546. -
    547.     *   Sends the sql to the database and returns the results.
    548. -
    549.     *
    550. -
    551.     *   @internal Switches between ADOConnection::Execute() and
    552. -
    553.     *     ADOConnection::SelectLimit() depending on the $query parameter's
    554. -
    555.     *     $solutionModifier "limit" and "offset" settings.
    556. -
    557.     *    Uses $query variable.
    558. -
    559.     *
    560. -
    561.     *   @param array $arSql     Array that gets a SQL query string once imploded
    562. -
    563.     *
    564. -
    565.     *   @return mixed           Anything ADOConnection::Execute() may return
    566. -
    567.     *   @throws Exception       If Database query does not work
    568. -
    569.     */
    570. -
    571.     function queryDb($arSql$nOffset$nLimit)
    572. -
    573.     {
    574. -
    575.         $strSql SparqlEngineDb_SqlMerger::getSelect($this->query$arSql);
    576. -
    577.  
    578. -
    579.         if ($strSql == '()'{
    580. -
    581.             return new ADORecordSet(false);
    582. -
    583.         }
    584. -
    585.  
    586. -
    587.         // I want associative arrays.
    588. -
    589.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    590. -
    591.  
    592. -
    593. //var_dump($strSql);
    594. -
    595.         if ($nLimit === null && $nOffset == 0{
    596. -
    597.             $ret $this->dbConn->execute($strSql);
    598. -
    599.         else if ($nLimit === null{
    600. -
    601.             $ret $this->dbConn->SelectLimit($strSql-1$nOffset);
    602. -
    603.         else {
    604. -
    605.             $ret $this->dbConn->SelectLimit($strSql$nLimit$nOffset);
    606. -
    607.         }
    608. -
    609.  
    610. -
    611.         //... but others maybe not
    612. -
    613.         $this->dbConn->SetFetchMode($oldmode);
    614. -
    615.  
    616. -
    617.         if (!$ret{
    618. -
    619.             //Error occured
    620. -
    621.             throw new Exception(
    622. -
    623.                 'ADOdb error: ' $this->dbConn->ErrorMsg("\n"
    624. -
    625.                 . $strSql
    626. -
    627.             );
    628. -
    629.         }
    630. -
    631.  
    632. -
    633.         return $ret;
    634. -
    635.     }//function queryDb($sql)
    636. -
    637.  
    638. -
    639.  
    640. -
    641.  
    642. -
    643.     /*
    644. -
    645.     *   Dumb getters
    646. -
    647.     */
    648. -
    649.  
    650. -
    651.  
    652. -
    653.  
    654. -
    655.     public function getQuery()
    656. -
    657.     {
    658. -
    659.         return $this->query;
    660. -
    661.     }//public function getQuery()
    662. -
    663.  
    664. -
    665.  
    666. -
    667.  
    668. -
    669.     public function getSqlGenerator()
    670. -
    671.     {
    672. -
    673.         return $this->sg;
    674. -
    675.     }//public function getSqlGenerator()
    676. -
    677.  
    678. -
    679.  
    680. -
    681.  
    682. -
    683.     public function getTypeSorter()
    684. -
    685.     {
    686. -
    687.         return $this->ts;
    688. -
    689.     }//public function getTypeSorter()
    690. -
    691.  
    692. -
    693. }//class SparqlEngineDb
    694. -
    695. ?>
    696. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base deleted file mode 100755 index e2ae044d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html.svn-base +++ /dev/null @@ -1,862 +0,0 @@ - - - - - - File Source for FilterGenerator.php - - - - - -

    Source for file FilterGenerator.php

    -

    Documentation is available at FilterGenerator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Generates SQL from Sparql FILTER parts
    8. -
    9. *
    10. -
    11. *   @author Christian Weiske <cweiske@cweiske.de>
    12. -
    13. *
    14. -
    15. *   @package sparql
    16. -
    17. */
    18. -
    19. -
    20. {
    21. -
    22.     /**
    23. -
    24.     *   SQL Generator
    25. -
    26.     *   @var SparqlEngineDb_SqlGenerator 
    27. -
    28.     */
    29. -
    30.     protected $sg = null;
    31. -
    32.  
    33. -
    34.     /**
    35. -
    36.     *   If the filter is in an optional statement
    37. -
    38.     *   @var boolean 
    39. -
    40.     */
    41. -
    42.     protected $bOptional    = false;
    43. -
    44.  
    45. -
    46.     /**
    47. -
    48.     *   Number of parameters for the functions supported.
    49. -
    50.     *   First value is minimum, second is maximum.
    51. -
    52.     *   @var array 
    53. -
    54.     */
    55. -
    56.     protected static $arFuncParamNumbers array(
    57. -
    58.         'bound'         => array(11),
    59. -
    60.         'datatype'      => array(11),
    61. -
    62.         'isblank'       => array(11),
    63. -
    64.         'isiri'         => array(11),
    65. -
    66.         'isliteral'     => array(11),
    67. -
    68.         'isuri'         => array(11),
    69. -
    70.         'lang'          => array(11),
    71. -
    72.         'langmatches'   => array(22),
    73. -
    74.         'regex'         => array(23),
    75. -
    76.         'sameterm'      => array(22),
    77. -
    78.         'str'           => array(11),
    79. -
    80.         'xsd:datetime'  => array(11),
    81. -
    82.     );
    83. -
    84.  
    85. -
    86.     /**
    87. -
    88.     *   List of operators and their counterpart if operands are switched.
    89. -
    90.     *   (a > b) => (b < a)
    91. -
    92.     *   @var array 
    93. -
    94.     */
    95. -
    96.     protected static $arOperatorSwitches array(
    97. -
    98.         '>'     => '<',
    99. -
    100.         '<'     => '>',
    101. -
    102.         '>='    => '<=',
    103. -
    104.         '<='    => '>=',
    105. -
    106.     );
    107. -
    108.  
    109. -
    110.     protected static $arDumbOperators array(
    111. -
    112.         '&&''||'
    113. -
    114.     );
    115. -
    116.  
    117. -
    118.     protected static $typeXsdBoolean  'http://www.w3.org/2001/XMLSchema#boolean';
    119. -
    120.     protected static $typeXsdDateTime 'http://www.w3.org/2001/XMLSchema#dateTime';
    121. -
    122.     protected static $typeXsdDouble   'http://www.w3.org/2001/XMLSchema#double';
    123. -
    124.     protected static $typeXsdInteger  'http://www.w3.org/2001/XMLSchema#integer';
    125. -
    126.     protected static $typeXsdString   'http://www.w3.org/2001/XMLSchema#string';
    127. -
    128.     protected static $typeVariable    'variable';
    129. -
    130.  
    131. -
    132.  
    133. -
    134.  
    135. -
    136.     public function __construct(SparqlEngineDb_SqlGenerator $sg)
    137. -
    138.     {
    139. -
    140.         $this->sg = $sg;
    141. -
    142.     }//public function __construct(SparqlEngineDb_SqlGenerator $sqlgen)
    143. -
    144.  
    145. -
    146.  
    147. -
    148.  
    149. -
    150.     /**
    151. -
    152.     *   Creates the SQL representing a Sparql FILTER.
    153. -
    154.     *
    155. -
    156.     *   @param array $tree  Filter element tree as returned by
    157. -
    158.     *                        SparqlParser::parseConstraintTree()
    159. -
    160.     *   @param boolean $bOptional   If the filter is in an optional statement
    161. -
    162.     *   @return string  SQL WHERE part with prefixed AND
    163. -
    164.     */
    165. -
    166.     public function createFilterSql($tree$bOptional$nUnionCount)
    167. -
    168.     {
    169. -
    170.         if (count($tree== 0{
    171. -
    172.             //empty filter pattern?
    173. -
    174.             return '';
    175. -
    176.         }
    177. -
    178.  
    179. -
    180.         $this->bOptional = $bOptional;
    181. -
    182.         $this->nUnionCount $nUnionCount;
    183. -
    184.  
    185. -
    186.         return ' AND ' $this->createTreeSql($treenull);
    187. -
    188.     }//public function createFilterSql($tree)
    189. -
    190.  
    191. -
    192.  
    193. -
    194.  
    195. -
    196.     /**
    197. -
    198.     *
    199. -
    200.     */
    201. -
    202.     protected function createTreeSql($tree$parent)
    203. -
    204.     {
    205. -
    206.         switch ($tree['type']{
    207. -
    208.             case 'equation':
    209. -
    210.                 $sql $this->createEquation($tree);
    211. -
    212.                 break;
    213. -
    214.             case 'value':
    215. -
    216.                 if ($parent != null{
    217. -
    218.                     $bDumbParent $parent['type'== 'equation'
    219. -
    220.                         && in_array($parent['operator']self::$arDumbOperators);
    221. -
    222.                 else {
    223. -
    224.                     $bDumbParent true;
    225. -
    226.                 }
    227. -
    228.                 $sql $this->createValue($tree$bDumbParent);
    229. -
    230.                 break;
    231. -
    232.             case 'function':
    233. -
    234.                 $sql $this->createFunction($tree);
    235. -
    236.                 break;
    237. -
    238.             default:
    239. -
    240.                 var_dump($tree);
    241. -
    242.                 throw new Exception('Unsupported tree type: ' $tree['type']);
    243. -
    244.                 break;
    245. -
    246.         }
    247. -
    248.  
    249. -
    250.         if (isset($tree['negated'])) {
    251. -
    252.             $sql '!(' $sql ')';
    253. -
    254.         }
    255. -
    256.  
    257. -
    258.         return $sql;
    259. -
    260.     }//protected function createTreeSql($tree, $strParentType)
    261. -
    262.  
    263. -
    264.  
    265. -
    266.  
    267. -
    268.     /**
    269. -
    270.     *   Creates the sql for an element of type "value".
    271. -
    272.     *
    273. -
    274.     *   @param array $tree  Element
    275. -
    276.     *   @param boolean $bDumbParent True if the parent is a boolean equation or null.
    277. -
    278.     */
    279. -
    280.     protected function createValue($tree$bDumbParent)
    281. -
    282.     {
    283. -
    284.         $strValue stripslashes($tree['value']);
    285. -
    286.         if (SparqlEngineDb_SqlGenerator::isVariable($strValue)) {
    287. -
    288.             if (!isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$strValue])) {
    289. -
    290.                 throw new SparqlEngineDb_SqlGeneratorException(
    291. -
    292.                     'Unknown variable in filter: ' $strValue
    293. -
    294.                 );
    295. -
    296.             }
    297. -
    298.  
    299. -
    300.             if ($bDumbParent{
    301. -
    302.                 return $this->createBooleanValue($tree);
    303. -
    304.             else if ($this->isObject($tree)) {
    305. -
    306.                 //convert datetime to datetime if necessary
    307. -
    308.                 return self::mkVal(
    309. -
    310.                     '(CASE'
    311. -
    312.                     . ' WHEN ' $this->getIsCol($tree' = "' self::$typeXsdDateTime '"'
    313. -
    314.                     . ' THEN ' $this->getDateConversionSql($this->getValueCol($tree))
    315. -
    316.                     . ' ELSE ' $this->getValueCol($tree)
    317. -
    318.                     . ' END)',
    319. -
    320.                     self::$typeVariable
    321. -
    322.                 );
    323. -
    324.             else {
    325. -
    326.                 return self::mkVal(
    327. -
    328.                     $this->getValueCol($tree),
    329. -
    330.                     self::$typeVariable
    331. -
    332.                 );
    333. -
    334.             }
    335. -
    336.         }
    337. -
    338.  
    339. -
    340.         if ($this->isNumber($tree)) {
    341. -
    342.             return $strValue;
    343. -
    344.         else if ($tree['quoted'=== false{
    345. -
    346.             $strValueNew $this->sg->query->getFullUri($strValue);
    347. -
    348.             if ($strValueNew === false{
    349. -
    350.                 if ($strValue[0== '<' && substr($strValue-1== '>'{
    351. -
    352.                     $strValue substr($strValue1-1);
    353. -
    354.                 else {
    355. -
    356.                     throw new SparqlEngineDb_SqlGeneratorException(
    357. -
    358.                         'Unexpected value "' $strValueNew '" (expected datatype)'
    359. -
    360.                     );
    361. -
    362.                 }
    363. -
    364.             else {
    365. -
    366.                 $strValue $strValueNew;
    367. -
    368.             }
    369. -
    370.         else if (isset($tree['datatype'])) {
    371. -
    372.             switch ($tree['datatype']{
    373. -
    374.                 case self::$typeXsdBoolean:
    375. -
    376.                     if (strtolower($strValue== 'false'{
    377. -
    378.                         //fix: (bool)"false" === true
    379. -
    380.                         $strValue false;
    381. -
    382.                     }
    383. -
    384.                     return self::mkVal(
    385. -
    386.                         (bool)$strValue 'TRUE' 'FALSE',
    387. -
    388.                         self::$typeXsdBoolean
    389. -
    390.                     );
    391. -
    392.  
    393. -
    394.                 default:
    395. -
    396.                     throw new SparqlEngineDb_SqlGeneratorException(
    397. -
    398.                         'Unsupported datatype "' $tree['datatype']
    399. -
    400.                     );
    401. -
    402.             }
    403. -
    404.         }
    405. -
    406.  
    407. -
    408.         return self::mkVal(
    409. -
    410.             '"' addslashes($strValue'"',
    411. -
    412.             self::$typeXsdString
    413. -
    414.         );
    415. -
    416.     }//protected function createValue($tree)
    417. -
    418.  
    419. -
    420.  
    421. -
    422.  
    423. -
    424.     protected function createBooleanValue($tree)
    425. -
    426.     {
    427. -
    428.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    429. -
    430.         if (!$this->isObject($tree)) {
    431. -
    432.             //Maybe needs a fix
    433. -
    434.             $strSqlCol SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType]['value'];
    435. -
    436.             return self::mkVal(
    437. -
    438.                 $strTable '.' $strSqlCol ' != ""',
    439. -
    440.                 self::$typeXsdBoolean
    441. -
    442.             );
    443. -
    444.         }
    445. -
    446.  
    447. -
    448.         $cType  $strTable '.l_datatype';
    449. -
    450.         $cValue $strTable '.object';
    451. -
    452.         $xsd    'http://www.w3.org/2001/XMLSchema';
    453. -
    454.  
    455. -
    456.         return self::mkVal(
    457. -
    458.             '('
    459. -
    460.             . "(($cType = '' || $cType = '$xsd#string') AND $cValue != '')"
    461. -
    462.             . " OR ($cType = '$xsd#booleanAND $cValue != 'false')"
    463. -
    464.             . " OR (($cType = '$xsd#integer' || $cType = '$xsd#double') AND CAST($cValue AS DECIMAL) != 0)"
    465. -
    466.             //plain check for all unknown datatypes
    467. -
    468.             . " OR ($cType != '' AND $cType != '$xsd#stringAND $cType != '$xsd#booleanAND $cType != '$xsd#integerAND $cType != '$xsd#doubleAND $cValue != '')"
    469. -
    470.             . ')',
    471. -
    472.             self::$typeXsdBoolean
    473. -
    474.         );
    475. -
    476.     }//protected function createBooleanValue($tree)
    477. -
    478.  
    479. -
    480.  
    481. -
    482.  
    483. -
    484.     protected function createFunction($tree)
    485. -
    486.     {
    487. -
    488.         $strFuncName strtolower($tree['name']);
    489. -
    490.         if (!isset(self::$arFuncParamNumbers[$strFuncName])) {
    491. -
    492.             throw new SparqlEngineDb_SqlGeneratorException(
    493. -
    494.                 'Unsupported FILTER function: ' $strFuncName
    495. -
    496.             );
    497. -
    498.         }
    499. -
    500.  
    501. -
    502.         $nParams     count($tree['parameter']);
    503. -
    504.         if ($nParams self::$arFuncParamNumbers[$strFuncName][0]
    505. -
    506.          || $nParams self::$arFuncParamNumbers[$strFuncName][1]
    507. -
    508.         {
    509. -
    510.             throw new SparqlEngineDb_SqlGeneratorException(
    511. -
    512.                 'Wrong parameter count for FILTER function: ' $strFuncName
    513. -
    514.                 . ' (got ' $nParams ', expected '
    515. -
    516.                 . self::$arFuncParamNumbers[$strFuncName][0]
    517. -
    518.                 . '-' self::$arFuncParamNumbers[$strFuncName][1]
    519. -
    520.             );
    521. -
    522.         }
    523. -
    524.  
    525. -
    526.         $strThisFunc 'createFunction_' str_replace(':''_'$strFuncName);
    527. -
    528.         return $this->$strThisFunc($tree);
    529. -
    530.     }//protected function createFunction($tree)
    531. -
    532.  
    533. -
    534.  
    535. -
    536.  
    537. -
    538.     protected function createEquation($tree)
    539. -
    540.     {
    541. -
    542.         $strExtra       '';
    543. -
    544.         $strIsNull      '';
    545. -
    546.         $strIsNullEnd   '';
    547. -
    548.  
    549. -
    550.         if (($this->isNumber($tree['operand1']|| $this->isPlainString($tree['operand1']))
    551. -
    552.             && $this->isObject($tree['operand2'])
    553. -
    554.         {
    555. -
    556.             //switch operands and operator
    557. -
    558.             $tmp $tree['operand1'];
    559. -
    560.             $tree['operand1'$tree['operand2'];
    561. -
    562.             $tree['operand2'$tmp;
    563. -
    564.             $tree['operator'self::switchOperator($tree['operator']);
    565. -
    566.         }
    567. -
    568.  
    569. -
    570.         $val1 $this->createTreeSql($tree['operand1']$tree);
    571. -
    572.         $val2 $this->createTreeSql($tree['operand2']$tree);
    573. -
    574.  
    575. -
    576.         if ($this->isObject($tree['operand1'])) {
    577. -
    578.             if ($this->bOptional{
    579. -
    580.                 $strIsNull    '(';
    581. -
    582.                 $strIsNullEnd ' OR ' $val1 ' IS NULL)';
    583. -
    584.             }
    585. -
    586.             if (isset($tree['operand2']['language'])) {
    587. -
    588.                 $strColLanguage $this->getLangCol($tree['operand1']);
    589. -
    590.                 $strExtra .= ' AND ' $strColLanguage ' = "'
    591. -
    592.                     . addslashes($tree['operand2']['language'])
    593. -
    594.                     . '"';
    595. -
    596.             }
    597. -
    598.  
    599. -
    600.             if ($this->isNumber($tree['operand2'])) {
    601. -
    602.                 $strColDatatype $this->getDatatypeCol($tree['operand1']);
    603. -
    604.                 $strExtra .= ' AND (' $strColDatatype '  = "' self::$typeXsdDouble '"'
    605. -
    606.                     . ' OR ' $strColDatatype '  = "' self::$typeXsdInteger '"'
    607. -
    608.                     . ')';
    609. -
    610.                 return $strIsNull '('
    611. -
    612.                     . 'CAST(' $val1 ' AS DECIMAL)'
    613. -
    614.                     . ' ' $tree['operator'' '
    615. -
    616.                     . $val2
    617. -
    618.                     . $strExtra
    619. -
    620.                     . ')' $strIsNullEnd;
    621. -
    622.             }
    623. -
    624.         }
    625. -
    626.  
    627. -
    628.         //I don't check the operator since it is already checked in the parser
    629. -
    630.         return $strIsNull '('
    631. -
    632.             . '('
    633. -
    634.                 . $val1
    635. -
    636.                 . ' ' $tree['operator'' '
    637. -
    638.                 . $val2
    639. -
    640.                 . $strExtra
    641. -
    642.             . ')'
    643. -
    644.             . $this->createTypeEquation(
    645. -
    646.                 $tree['operator']$val1$val2,
    647. -
    648.                 $tree['operand1']$tree['operand2']
    649. -
    650.             )
    651. -
    652.             . ')' $strIsNullEnd;
    653. -
    654.     }//protected function createEquation($tree)
    655. -
    656.  
    657. -
    658.  
    659. -
    660.  
    661. -
    662.     /**
    663. -
    664.     *   Generates sql code to make sure the datatypes of the two operands match
    665. -
    666.     */
    667. -
    668.     protected function createTypeEquation($operator$val1$val2$tree1$tree2)
    669. -
    670.     {
    671. -
    672.         if (in_array($operatorarray('&&''||'))) {
    673. -
    674.             return '';
    675. -
    676.         }
    677. -
    678.  
    679. -
    680.         if ($val1->type != self::$typeVariable && $val2->type != self::$typeVariable{
    681. -
    682.             //both are not variables -> type needs to be the same
    683. -
    684.             return $val1->type == $val2->type '' ' AND FALSE';
    685. -
    686.         }
    687. -
    688.         $so1 $this->isObjectOrSubject($tree1);
    689. -
    690.         $so2 $this->isObjectOrSubject($tree2);
    691. -
    692.         $o1  $this->isObject($tree1);
    693. -
    694.         $o2  $this->isObject($tree2);
    695. -
    696.  
    697. -
    698.         if ($so1 && $so2{
    699. -
    700.             $sql ' AND ' $this->getIsCol($tree1' = ' $this->getIsCol($tree2);
    701. -
    702.             if ($o1 && $o2{
    703. -
    704.                 //maybe needs string fix
    705. -
    706.                 $sql .= ' AND ' $this->getDatatypeCol($tree1' = '
    707. -
    708.                     . $this->getDatatypeCol($tree2);
    709. -
    710.             }
    711. -
    712.             return $sql;
    713. -
    714.         }
    715. -
    716.  
    717. -
    718.         if ($o1 && $val2->type != self::$typeVariable{
    719. -
    720.             return $this->createSingleTypeCheck($val2$tree1);
    721. -
    722.         else if ($o2 && $val1->type != self::$typeVariable{
    723. -
    724.             return $this->createSingleTypeCheck($val1$tree2);
    725. -
    726.         }
    727. -
    728.  
    729. -
    730.         //fixme
    731. -
    732.         return '';
    733. -
    734.     }//protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2)
    735. -
    736.  
    737. -
    738.  
    739. -
    740.  
    741. -
    742.     /**
    743. -
    744.     *   Creates sql to ensure the type between $val and variable $tree
    745. -
    746.     *   is the same.
    747. -
    748.     */
    749. -
    750.     protected function createSingleTypeCheck($val$tree)
    751. -
    752.     {
    753. -
    754.         if ($val->type == self::$typeXsdString{
    755. -
    756.             //string can be empty type or xsd type
    757. -
    758.             return ' AND ('
    759. -
    760.                 . $this->getDatatypeCol($tree' = "' $val->type '"'
    761. -
    762.                 . ' OR '
    763. -
    764.                 . $this->getDatatypeCol($tree' = ""'
    765. -
    766.                 . ')';
    767. -
    768.         }
    769. -
    770.         return ' AND ' $this->getDatatypeCol($tree' = "' $val->type '"';
    771. -
    772.     }//protected function createSingleTypeCheck($val, $tree)
    773. -
    774.  
    775. -
    776.  
    777. -
    778.  
    779. -
    780.     /*
    781. -
    782.     *   SQL generation functions
    783. -
    784.     */
    785. -
    786.  
    787. -
    788.  
    789. -
    790.  
    791. -
    792.     /**
    793. -
    794.     *   Creates an sql statement that returns if the element is a blank node
    795. -
    796.     */
    797. -
    798.     protected function createFunction_bound($tree)
    799. -
    800.     {
    801. -
    802.         if ($this->isVariable($tree['parameter'][0])) {
    803. -
    804.             return self::mkVal(
    805. -
    806.                 $this->getValueCol($tree['parameter'][0]' IS NOT NULL',
    807. -
    808.                 self::$typeXsdBoolean
    809. -
    810.             );
    811. -
    812.         }
    813. -
    814.  
    815. -
    816.         //We'll see which other cases occur here
    817. -
    818.         return self::mkVal('TRUE'self::$typeXsdBoolean);
    819. -
    820.     }//protected function createFunction_bound($tree)
    821. -
    822.  
    823. -
    824.  
    825. -
    826.  
    827. -
    828.     protected function createFunction_datatype($tree)
    829. -
    830.     {
    831. -
    832.         if (!$this->isObject($tree['parameter'][0])) {
    833. -
    834.             throw new SparqlEngineDb_SqlGeneratorException(
    835. -
    836.                 'datatype\'s first parameter needs to be an object'
    837. -
    838.             );
    839. -
    840.         }
    841. -
    842.  
    843. -
    844.         return self::mkVal(
    845. -
    846.             $this->getDatatypeCol($tree['parameter'][0]),
    847. -
    848.             self::$typeXsdString
    849. -
    850.         );
    851. -
    852.     }//protected function createFunction_datatype($tree)
    853. -
    854.  
    855. -
    856.  
    857. -
    858.  
    859. -
    860.     /**
    861. -
    862.     *   Creates an sql statement that returns if the element is a blank node
    863. -
    864.     */
    865. -
    866.     protected function createFunction_isblank($tree)
    867. -
    868.     {
    869. -
    870.         if (!$this->isObjectOrSubject($tree['parameter'][0])) {
    871. -
    872.             throw new SparqlEngineDb_SqlGeneratorException(
    873. -
    874.                 'isBlank\'s first parameter needs to be an object or subject'
    875. -
    876.             );
    877. -
    878.         }
    879. -
    880.  
    881. -
    882.         return self::mkVal(
    883. -
    884.             $this->getIsCol($tree['parameter'][0]' = "b"',
    885. -
    886.             self::$typeXsdBoolean
    887. -
    888.         );
    889. -
    890.     }//protected function createFunction_isblank($tree)
    891. -
    892.  
    893. -
    894.  
    895. -
    896.  
    897. -
    898.     protected function createFunction_isiri($tree)
    899. -
    900.     {
    901. -
    902.         return $this->createFunction_isuri($tree);
    903. -
    904.     }//protected function createFunction_isiri($tree)
    905. -
    906.  
    907. -
    908.  
    909. -
    910.  
    911. -
    912.     /**
    913. -
    914.     *   Creates an sql statement that returns the language of the object
    915. -
    916.     */
    917. -
    918.     protected function createFunction_isliteral($tree)
    919. -
    920.     {
    921. -
    922.         if ($this->isObjectOrSubject($tree['parameter'][0])) {
    923. -
    924.             return $this->getIsCol($tree['parameter'][0]' = "l"';
    925. -
    926.         }
    927. -
    928.  
    929. -
    930.         //This does not take combined functions into account (subfunctions)
    931. -
    932.         return self::mkVal(
    933. -
    934.             $this->isPlainString($tree'TRUE' 'FALSE',
    935. -
    936.             self::$typeXsdBoolean
    937. -
    938.         );
    939. -
    940.     }//protected function createFunction_isliteral($tree)
    941. -
    942.  
    943. -
    944.  
    945. -
    946.  
    947. -
    948.     protected function createFunction_isuri($tree)
    949. -
    950.     {
    951. -
    952.         if ($this->isObjectOrSubject($tree['parameter'][0])) {
    953. -
    954.             return self::mkVal(
    955. -
    956.                 $this->getIsCol($tree['parameter'][0]' = "r"',
    957. -
    958.                 self::$typeXsdBoolean
    959. -
    960.             );
    961. -
    962.         else {
    963. -
    964.             //predicates are iris
    965. -
    966.             return self::mkVal('TRUE'self::$typeXsdBoolean);
    967. -
    968.         }
    969. -
    970.     }//protected function createFunction_isuri($tree)
    971. -
    972.  
    973. -
    974.  
    975. -
    976.  
    977. -
    978.     /**
    979. -
    980.     *   Creates an sql statement that returns the language of the object
    981. -
    982.     */
    983. -
    984.     protected function createFunction_lang($tree)
    985. -
    986.     {
    987. -
    988.         if (!$this->isObject($tree['parameter'][0])) {
    989. -
    990.             throw new SparqlEngineDb_SqlGeneratorException(
    991. -
    992.                 'lang\'s first parameter needs to be an object'
    993. -
    994.             );
    995. -
    996.         }
    997. -
    998.         return self::mkVal(
    999. -
    1000.             $this->getLangCol($tree['parameter'][0]),
    1001. -
    1002.             self::$typeXsdString
    1003. -
    1004.         );
    1005. -
    1006.     }//protected function createFunction_lang($tree)
    1007. -
    1008.  
    1009. -
    1010.  
    1011. -
    1012.  
    1013. -
    1014.     /**
    1015. -
    1016.     *   Creates an sql statement that checks if the variable
    1017. -
    1018.     *   matches a given language
    1019. -
    1020.     */
    1021. -
    1022.     protected function createFunction_langmatches($tree)
    1023. -
    1024.     {
    1025. -
    1026.         //those two restrictions are needed until we have a mysql-only
    1027. -
    1028.         // langmatches function
    1029. -
    1030.         if ($tree['parameter'][0]['type'!= 'function'
    1031. -
    1032.          || $tree['parameter'][0]['name'!= 'lang'
    1033. -
    1034.         {
    1035. -
    1036.             throw new SparqlEngineDb_SqlGeneratorException(
    1037. -
    1038.                 'langMatches\' first parameter needs to be a lang() function'
    1039. -
    1040.             );
    1041. -
    1042.         }
    1043. -
    1044.  
    1045. -
    1046.         if (!$this->isPlainString($tree['parameter'][1])) {
    1047. -
    1048.             throw new SparqlEngineDb_SqlGeneratorException(
    1049. -
    1050.                 'langMatches\' second parameter needs to be a string'
    1051. -
    1052.             );
    1053. -
    1054.         }
    1055. -
    1056.  
    1057. -
    1058.         $lang  $tree['parameter'][1]['value'];
    1059. -
    1060.         $col   $this->createTreeSql($tree['parameter'][0]$tree);
    1061. -
    1062.  
    1063. -
    1064.         switch ($lang{
    1065. -
    1066.             case '*':
    1067. -
    1068.                 //anything but nothing
    1069. -
    1070.                 $sql $col ' != ""';
    1071. -
    1072.                 break;
    1073. -
    1074.             case '':
    1075. -
    1076.                 //nothing
    1077. -
    1078.                 $sql $col ' = ""';
    1079. -
    1080.                 break;
    1081. -
    1082.             default:
    1083. -
    1084.                 //language, maybe with different subcode
    1085. -
    1086.                 // en -> en, en-US
    1087. -
    1088.                 $sql '(' $col ' = "' addslashes($lang'" OR '
    1089. -
    1090.                     . $col ' LIKE "' addslashes($lang'-%")';
    1091. -
    1092.                 break;
    1093. -
    1094.         }
    1095. -
    1096.  
    1097. -
    1098.         return self::mkVal($sqlself::$typeXsdBoolean);
    1099. -
    1100.     }//protected function createFunction_isuri($tree)
    1101. -
    1102.  
    1103. -
    1104.  
    1105. -
    1106.  
    1107. -
    1108.     /**
    1109. -
    1110.     *   Creates an sql statement that checks if the given part matches
    1111. -
    1112.     *   an regex
    1113. -
    1114.     */
    1115. -
    1116.     protected function createFunction_regex($tree)
    1117. -
    1118.     {
    1119. -
    1120.         $strVar   $this->createTreeSql($tree['parameter'][0]$tree);
    1121. -
    1122.         $strRegex $this->createTreeSql($tree['parameter'][1]$tree);
    1123. -
    1124.  
    1125. -
    1126.         if (isset($tree['parameter'][2])) {
    1127. -
    1128.             //is quoted
    1129. -
    1130.             $strMod $this->createTreeSql($tree['parameter'][2]$tree);
    1131. -
    1132.             switch ($strMod{
    1133. -
    1134.                 case '':
    1135. -
    1136.                 case '""':
    1137. -
    1138.                     $sql $strVar ' REGEXP ' $strRegex;
    1139. -
    1140.                     break;
    1141. -
    1142.  
    1143. -
    1144.                 case '"i"':
    1145. -
    1146.                     $sql 'CAST(' $strVar ' AS CHAR) REGEXP ' $strRegex;
    1147. -
    1148.                     break;
    1149. -
    1150.  
    1151. -
    1152.                 default:
    1153. -
    1154.                     throw new SparqlEngineDb_SqlGeneratorException(
    1155. -
    1156.                         'Unsupported regex modifier "'
    1157. -
    1158.                         . $strMod
    1159. -
    1160.                         . '"'
    1161. -
    1162.                     );
    1163. -
    1164.             }
    1165. -
    1166.         else {
    1167. -
    1168.             $sql $strVar ' REGEXP ' $strRegex;
    1169. -
    1170.         }
    1171. -
    1172.  
    1173. -
    1174.         if ($this->isObject($tree['parameter'][0])) {
    1175. -
    1176.             $col $this->getIsCol($tree['parameter'][0]);
    1177. -
    1178.             $sql "($sql AND $col = 'l')";
    1179. -
    1180.         }
    1181. -
    1182.  
    1183. -
    1184.         return self::mkVal($sqlself::$typeXsdBoolean);
    1185. -
    1186.     }//protected function createFunction_regex($tree)
    1187. -
    1188.  
    1189. -
    1190.  
    1191. -
    1192.  
    1193. -
    1194.     /**
    1195. -
    1196.     *   Creates an sql statement that checks if both terms are the same
    1197. -
    1198.     */
    1199. -
    1200.     protected function createFunction_sameterm($tree)
    1201. -
    1202.     {
    1203. -
    1204.         //FIXME: dead simple implementation that does not cover all cases
    1205. -
    1206.         return self::mkVal(
    1207. -
    1208.             $this->createTreeSql($tree['parameter'][0]$tree)
    1209. -
    1210.                 . ' = '
    1211. -
    1212.                 . $this->createTreeSql($tree['parameter'][1]$tree),
    1213. -
    1214.             self::$typeXsdBoolean
    1215. -
    1216.         );
    1217. -
    1218.     }//protected function createFunction_sameterm($tree)
    1219. -
    1220.  
    1221. -
    1222.  
    1223. -
    1224.  
    1225. -
    1226.     /**
    1227. -
    1228.     *   Creates an sql statement that returns the string representation
    1229. -
    1230.     *   of the given element
    1231. -
    1232.     */
    1233. -
    1234.     protected function createFunction_str($tree)
    1235. -
    1236.     {
    1237. -
    1238.         if ($this->isObject($tree['parameter'][0])) {
    1239. -
    1240.             return self::mkVal(
    1241. -
    1242.                 '(CASE ' $this->getIsCol($tree['parameter'][0])
    1243. -
    1244.                 . ' WHEN "b" THEN ""'
    1245. -
    1246.                 . ' ELSE ' $this->getValueCol($tree['parameter'][0])
    1247. -
    1248.                 . ' END)',
    1249. -
    1250.                 self::$typeXsdString
    1251. -
    1252.             );
    1253. -
    1254.         }
    1255. -
    1256.  
    1257. -
    1258.         return $this->createTreeSql($tree['parameter'][0]$tree);
    1259. -
    1260.     }//protected function createFunction_str($tree)
    1261. -
    1262.  
    1263. -
    1264.  
    1265. -
    1266.  
    1267. -
    1268.     /**
    1269. -
    1270.     *   Creates an sql statement that returns the datetime representation
    1271. -
    1272.     *   of the given element
    1273. -
    1274.     */
    1275. -
    1276.     protected function createFunction_xsd_datetime($tree)
    1277. -
    1278.     {
    1279. -
    1280.         $val $this->createTreeSql($tree['parameter'][0]$tree);
    1281. -
    1282.         if ($val->type == self::$typeXsdDateTime
    1283. -
    1284.          || $val->type == self::$typeVariable{
    1285. -
    1286.             //no need to cast again
    1287. -
    1288.             return $val;
    1289. -
    1290.         }
    1291. -
    1292.         return self::mkVal(
    1293. -
    1294.             $this->getDateConversionSql($val),
    1295. -
    1296.             self::$typeXsdDateTime
    1297. -
    1298.         );
    1299. -
    1300.     }//protected function createFunction_xsd_datetime($tree)
    1301. -
    1302.  
    1303. -
    1304.  
    1305. -
    1306.  
    1307. -
    1308.  
    1309. -
    1310.     /*
    1311. -
    1312.     *   Helper methods
    1313. -
    1314.     */
    1315. -
    1316.  
    1317. -
    1318.  
    1319. -
    1320.  
    1321. -
    1322.     protected static function mkVal($value$type null{
    1323. -
    1324.         return new SparqlEngineDb_FilterGenerator_Value($value$type);
    1325. -
    1326.     }
    1327. -
    1328.  
    1329. -
    1330.  
    1331. -
    1332.  
    1333. -
    1334.     protected function getCol($tree$type)
    1335. -
    1336.     {
    1337. -
    1338.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1339. -
    1340.         if (!isset(SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type])) {
    1341. -
    1342.             return false;
    1343. -
    1344.         }
    1345. -
    1346.         $strSqlCol SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type];
    1347. -
    1348.         return $strTable '.' $strSqlCol;
    1349. -
    1350.     }
    1351. -
    1352.  
    1353. -
    1354.  
    1355. -
    1356.  
    1357. -
    1358.     protected function getDatatypeCol($tree)
    1359. -
    1360.     {
    1361. -
    1362.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1363. -
    1364.         return $strTable '.l_datatype';
    1365. -
    1366.     }
    1367. -
    1368.  
    1369. -
    1370.  
    1371. -
    1372.  
    1373. -
    1374.     protected function getDateConversionSql($strValue)
    1375. -
    1376.     {
    1377. -
    1378.         return 'STR_TO_DATE(' $strValue ', "%Y-%m-%dT%H:%i:%sZ")';
    1379. -
    1380.     }//protected function getDateConversionSql($strValue)
    1381. -
    1382.  
    1383. -
    1384.  
    1385. -
    1386.  
    1387. -
    1388.     protected function getIsCol($tree)
    1389. -
    1390.     {
    1391. -
    1392.         return $this->getCol($tree'is');
    1393. -
    1394.     }
    1395. -
    1396.  
    1397. -
    1398.  
    1399. -
    1400.  
    1401. -
    1402.     protected function getLangCol($tree)
    1403. -
    1404.     {
    1405. -
    1406.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1407. -
    1408.         return $strTable '.l_language';
    1409. -
    1410.     }
    1411. -
    1412.  
    1413. -
    1414.  
    1415. -
    1416.  
    1417. -
    1418.     protected function getValueCol($tree)
    1419. -
    1420.     {
    1421. -
    1422.         return $this->getCol($tree'value');
    1423. -
    1424.     }
    1425. -
    1426.  
    1427. -
    1428.  
    1429. -
    1430.  
    1431. -
    1432.     protected function isNumber($tree)
    1433. -
    1434.     {
    1435. -
    1436.         return $tree['type'== 'value'
    1437. -
    1438.          && $tree['quoted'=== false
    1439. -
    1440.          && preg_match('#^[0-9.]+$#'$tree['value'])
    1441. -
    1442.          && floatval($tree['value']== $tree['value'];
    1443. -
    1444.     }//protected function isNumber($tree)
    1445. -
    1446.  
    1447. -
    1448.  
    1449. -
    1450.  
    1451. -
    1452.     /**
    1453. -
    1454.     *   Checks if the given tree element is a variable
    1455. -
    1456.     *   and the variable is actually an object in the database.
    1457. -
    1458.     *
    1459. -
    1460.     *   @param array $tree  Tree element
    1461. -
    1462.     *   @return boolean True if the element is an object
    1463. -
    1464.     */
    1465. -
    1466.     protected function isObject($tree)
    1467. -
    1468.     {
    1469. -
    1470.         return $this->isVariable($tree)
    1471. -
    1472.          && $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 'o';
    1473. -
    1474.     }//protected function isVariable($tree)
    1475. -
    1476.  
    1477. -
    1478.  
    1479. -
    1480.  
    1481. -
    1482.     /**
    1483. -
    1484.     *   Checks if the given tree element is a variable
    1485. -
    1486.     *   and the variable is actually an object or a subject in the database.
    1487. -
    1488.     *
    1489. -
    1490.     *   @param array $tree  Tree element
    1491. -
    1492.     *   @return boolean True if the element is an object or an subject
    1493. -
    1494.     */
    1495. -
    1496.     protected function isObjectOrSubject($tree)
    1497. -
    1498.     {
    1499. -
    1500.         return $this->isVariable($tree)
    1501. -
    1502.          && (
    1503. -
    1504.             $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 'o'
    1505. -
    1506.          || $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 's'
    1507. -
    1508.         );
    1509. -
    1510.     }//protected function isObjectOrSubject($tree)
    1511. -
    1512.  
    1513. -
    1514.  
    1515. -
    1516.  
    1517. -
    1518.     /**
    1519. -
    1520.     *   Checks if the given tree element is a plain string (no variable)
    1521. -
    1522.     *
    1523. -
    1524.     *   @param array $tree  Tree element
    1525. -
    1526.     *   @return boolean True if the element is a string
    1527. -
    1528.     */
    1529. -
    1530.     protected function isPlainString($tree)
    1531. -
    1532.     {
    1533. -
    1534.         return $tree['type'== 'value'
    1535. -
    1536.          && $tree['quoted'=== true;
    1537. -
    1538.     }//protected function isPlainString($tree)
    1539. -
    1540.  
    1541. -
    1542.  
    1543. -
    1544.  
    1545. -
    1546.     protected function isValueButNotVariableNorString($tree)
    1547. -
    1548.     {
    1549. -
    1550.         return $tree['type'== 'value'
    1551. -
    1552.          && $tree['type']['quoted'=== false
    1553. -
    1554.          && !SparqlEngineDb_SqlGenerator::isVariable($tree['value']);
    1555. -
    1556.     }//protected function isValueButNotVariableNorString($tree)
    1557. -
    1558.  
    1559. -
    1560.  
    1561. -
    1562.  
    1563. -
    1564.     /**
    1565. -
    1566.     *   Checks if the given tree element is a variable
    1567. -
    1568.     *
    1569. -
    1570.     *   @param array $tree  Tree element
    1571. -
    1572.     *   @return boolean True if the element is a variable
    1573. -
    1574.     */
    1575. -
    1576.     protected function isVariable($tree)
    1577. -
    1578.     {
    1579. -
    1580.         return $tree['type'== 'value'
    1581. -
    1582.          && $tree['quoted'=== false
    1583. -
    1584.          && SparqlEngineDb_SqlGenerator::isVariable($tree['value'])
    1585. -
    1586.          && isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]);
    1587. -
    1588.     }//protected function isVariable($tree)
    1589. -
    1590.  
    1591. -
    1592.  
    1593. -
    1594.  
    1595. -
    1596.     protected static function switchOperator($op)
    1597. -
    1598.     {
    1599. -
    1600.         if (!isset(self::$arOperatorSwitches[$op])) {
    1601. -
    1602.             return $op;
    1603. -
    1604.         else {
    1605. -
    1606.             return self::$arOperatorSwitches[$op];
    1607. -
    1608.         }
    1609. -
    1610.     }//protected static function switchOperator($op)
    1611. -
    1612.  
    1613. -
    1614. }//class SparqlEngineDb_FilterGenerator
    1615. -
    1616.  
    1617. -
    1618.  
    1619. -
    1620.  
    1621. -
    1622.  
    1623. -
    1624. /**
    1625. -
    1626. *   Value class that holds some arbitrary value
    1627. -
    1628. *   and a datatype.
    1629. -
    1630. *   Objects of this class can transparently be used in strings since
    1631. -
    1632. *   its __toString() returns the value.
    1633. -
    1634. */
    1635. -
    1636. -
    1637. {
    1638. -
    1639.     public $value = null;
    1640. -
    1641.     public $type  = null;
    1642. -
    1643.  
    1644. -
    1645.  
    1646. -
    1647.  
    1648. -
    1649.     public function __construct($value$type null)
    1650. -
    1651.     {
    1652. -
    1653.         $this->value = $value;
    1654. -
    1655.         $this->type  = $type;
    1656. -
    1657.     }
    1658. -
    1659.  
    1660. -
    1661.  
    1662. -
    1663.  
    1664. -
    1665.     public function __toString()
    1666. -
    1667.     {
    1668. -
    1669.         return $this->value;
    1670. -
    1671.     }
    1672. -
    1673.  
    1674. -
    1675. }//class SparqlEngineDb_FilterGenerator_Value
    1676. -
    1677.  
    1678. -
    1679. ?>
    1680. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base deleted file mode 100755 index 49428020..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html.svn-base +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - File Source for Offsetter.php - - - - - -

    Source for file Offsetter.php

    -

    Documentation is available at Offsetter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlMerger.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Determines the offset in a row of sql queries.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. -
    22. {
    23. -
    24.     public function __construct(ADOConnection $dbConnQuery $query)
    25. -
    26.     {
    27. -
    28.         $this->dbConn   $dbConn;
    29. -
    30.         $this->query    $query;
    31. -
    32.     }//public function __construct(ADOConnection $dbConn, Query $query)
    33. -
    34.  
    35. -
    36.  
    37. -
    38.  
    39. -
    40.     /**
    41. -
    42.     *   Determines the offset in the sqls, the position to start form.
    43. -
    44.     *
    45. -
    46.     *   @param array $arSqls    Array of SQL query parts as returned by
    47. -
    48.     *                            SparqlEngine_TypeSorter::getOrderifiedSqls()
    49. -
    50.     *   @return array   Array of two values: The first determines the
    51. -
    52.     *                    index of the sql query to begin with, the second
    53. -
    54.     *                    is the row offset that should be used in the final
    55. -
    56.     *                    SQL query.
    57. -
    58.     */
    59. -
    60.     public function determineOffset($arSqls)
    61. -
    62.     {
    63. -
    64.         $arSM $this->query->getSolutionModifier();
    65. -
    66.         if ($arSM['offset'=== null{
    67. -
    68.             return array(00);
    69. -
    70.         }
    71. -
    72.  
    73. -
    74.         $nCount 0;
    75. -
    76.         foreach ($arSqls as $nId => $arSql{
    77. -
    78.             $nCurrentCount $this->getCount($arSql);
    79. -
    80.             if ($nCurrentCount $nCount $arSM['offset']{
    81. -
    82.                 return array($nId$arSM['offset'$nCount);
    83. -
    84.             }
    85. -
    86.             $nCount += $nCurrentCount;
    87. -
    88.         }
    89. -
    90.         //nothing found - no results for this offset
    91. -
    92.         return array(count($arSqls)0);
    93. -
    94.     }//public function determineOffset($arSql)
    95. -
    96.  
    97. -
    98.  
    99. -
    100.  
    101. -
    102.     /**
    103. -
    104.     *   Returns the number of rows that the given query will return.
    105. -
    106.     *
    107. -
    108.     *   @param array $arSql Array with sql parts and at least keys
    109. -
    110.     *                 'from' and 'where' set.
    111. -
    112.     *   @return int     Number of rows returned.
    113. -
    114.     */
    115. -
    116.     protected function getCount($arSql)
    117. -
    118.     {
    119. -
    120.         $sql SparqlEngineDb_SqlMerger::getCount($this->query$arSql);
    121. -
    122.         $dbResult $this->dbConn->execute($sql);
    123. -
    124.  
    125. -
    126.         $nCount 0;
    127. -
    128.         foreach ($dbResult as $row{
    129. -
    130.             $nCount intval($row[0]);
    131. -
    132.             break;
    133. -
    134.         }
    135. -
    136.         return $nCount;
    137. -
    138.     }//protected function getCount($arSql)
    139. -
    140.  
    141. -
    142.  
    143. -
    144.  
    145. -
    146.     /**
    147. -
    148.     *   Creates a sql LIMIT statement if the sparql query needs one.
    149. -
    150.     *   This method is needed because AdoDb does not support limits with
    151. -
    152.     *   prepared statements. It's a pity.
    153. -
    154.     *
    155. -
    156.     *   @return string  SQL command to be appended to a query, to limit
    157. -
    158.     *                    the number of result rows returned.
    159. -
    160.     */
    161. -
    162.     public static function getLimitSql(Query $queryADOConnection $dbConn)
    163. -
    164.     {
    165. -
    166.         $arSM $query->getSolutionModifier();
    167. -
    168.         if ($arSM['limit'=== null && $arSM['offset'=== null{
    169. -
    170.             return '';
    171. -
    172.         }
    173. -
    174.         //this here is mysql syntax. if anyone has problems, write it
    175. -
    176.         //dependent on $dbConn's type
    177. -
    178.         if ($arSM['offset'=== null{
    179. -
    180.             return ' LIMIT ' $arSM['limit'];
    181. -
    182.         else if ($arSM['limit'=== null{
    183. -
    184.             return ' LIMIT ' $arSM['offset'', 18446744073709551615';
    185. -
    186.         else {
    187. -
    188.             return ' LIMIT ' $arSM['offset'', ' $arSM['limit'];
    189. -
    190.         }
    191. -
    192.     }//public static function getLimitSql(Query $query, ADOConnection $dbConn)
    193. -
    194.  
    195. -
    196. }//class SparqlEngineDb_Offsetter
    197. -
    198.  
    199. -
    200. ?>
    201. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base deleted file mode 100755 index 4b07152d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html.svn-base +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - File Source for Preparator.php - - - - - -

    Source for file Preparator.php

    -

    Documentation is available at Preparator.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Offsetter.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   This class takes care of prepared statements:
    10. -
    11. *   Preparing them in the database, replacing
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.  
    27. -
    28.  
    29. -
    30.  
    31. -
    32.     public function __construct(Query $queryADOConnection $dbConn)
    33. -
    34.     {
    35. -
    36.         $this->query        $query;
    37. -
    38.         $this->dbConn       $dbConn;
    39. -
    40.         $this->arPrefixes   $this->query->getPrefixes();
    41. -
    42.     }//public function __construct(Query $query, ADOConnection $dbConn)
    43. -
    44.  
    45. -
    46.  
    47. -
    48.  
    49. -
    50.     /**
    51. -
    52.     *   Converts the given queries into sql prepared statments,
    53. -
    54.     *   calls the prepare command in the database and returns
    55. -
    56.     *   an array consisting of subarrays. They contain
    57. -
    58.     *   the db's prepared statement as first value, and an array
    59. -
    60.     *   of variable positions as second value (key is the position,
    61. -
    62.     *   the sparql variable is the value).
    63. -
    64.     *
    65. -
    66.     *   @param array $arQueries      Array of sql queries part arrays
    67. -
    68.     *   @param array $arPlaceholders Array of sparql (variable name =>
    69. -
    70.     *                                 placeholder name) pairs
    71. -
    72.     *   @return array  Array of (prepared statment, variable positions) pairs
    73. -
    74.     */
    75. -
    76.     public function prepareInDb($arQueries$arPlaceholders)
    77. -
    78.     {
    79. -
    80.         $arDbStatements array();
    81. -
    82.  
    83. -
    84.         foreach ($arQueries as $arQuery{
    85. -
    86.             list($strPrepared$arVariablePositions$this->replacePlaceholders(
    87. -
    88.                 implode(''$arQuery),
    89. -
    90.                 $arPlaceholders
    91. -
    92.             );
    93. -
    94.             if (count($arQueries== 1{
    95. -
    96.                 //I currently haven't seens one case in which the count was > 1
    97. -
    98.                 //if that happens, we will need to add a fix
    99. -
    100.                 $strPrepared .= SparqlEngineDb_Offsetter::getLimitSql(
    101. -
    102.                     $this->query,
    103. -
    104.                     $this->dbConn
    105. -
    106.                 );
    107. -
    108.             }
    109. -
    110.             $stmt $this->dbConn->Prepare($strPrepared);
    111. -
    112.             $arDbStatements[array(
    113. -
    114.                 $stmt,
    115. -
    116.                 $arVariablePositions
    117. -
    118.             );
    119. -
    120.         }
    121. -
    122.  
    123. -
    124.         return $arDbStatements;
    125. -
    126.     }//public function prepareInDb($arQueries, $arPlaceholders)
    127. -
    128.  
    129. -
    130.  
    131. -
    132.  
    133. -
    134.     /**
    135. -
    136.     *   Replaces the placeholders in the given SQL statement with real
    137. -
    138.     *   SQL prepared statements placeholders.
    139. -
    140.     *
    141. -
    142.     *   @param string $strQuery SQL query with placeholders
    143. -
    144.     *   @param array $arPlaceholders Array of sparql (variable name =>
    145. -
    146.     *                                 placeholder name) pairs
    147. -
    148.     *   @return array (prepared sql query string, variable positions) pair
    149. -
    150.     */
    151. -
    152.     protected function replacePlaceholders($strQuery$arPlaceholders)
    153. -
    154.     {
    155. -
    156.         $arVariablePositions array();
    157. -
    158.         $this->arTmpVariablePositions array();
    159. -
    160.         $this->arTmpPlaceholders      $arPlaceholders;
    161. -
    162.         $strQuery preg_replace_callback(
    163. -
    164.             '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
    165. -
    166.             array($this'replacePlaceholdersCb'),
    167. -
    168.             $strQuery
    169. -
    170.         );
    171. -
    172.         return array($strQuery$this->arTmpVariablePositions);
    173. -
    174.     }//protected function replacePlaceholders($strQuery, $arPlaceholders)
    175. -
    176.  
    177. -
    178.  
    179. -
    180.  
    181. -
    182.     /**
    183. -
    184.     *   Callback method internally used by replacePlaceholders() method.
    185. -
    186.     */
    187. -
    188.     protected function replacePlaceholdersCb($matches)
    189. -
    190.     {
    191. -
    192.         $strPlaceholder     $matches[0];
    193. -
    194.         $strSparqlVariable  array_search(
    195. -
    196.             $strPlaceholder,
    197. -
    198.             $this->arTmpPlaceholders
    199. -
    200.         );
    201. -
    202.         $strDbPlaceholder   $this->dbConn->Param($strSparqlVariable);
    203. -
    204.         $this->arTmpVariablePositions[$strSparqlVariable;
    205. -
    206.  
    207. -
    208.         return $strDbPlaceholder;
    209. -
    210.     }//protected function replacePlaceholdersCb($matches)
    211. -
    212.  
    213. -
    214.  
    215. -
    216.  
    217. -
    218.     /**
    219. -
    220.     *   Executes the given prepared statments, filling the placeholders
    221. -
    222.     *   with the given values.
    223. -
    224.     *
    225. -
    226.     *   @param array $arDbStatements    Return value of prepareInDb()
    227. -
    228.     *   @param array $arVariableValues      Array of (variable name, value) pairs
    229. -
    230.     *
    231. -
    232.     *   @return array Array of database results as returned by Execute()
    233. -
    234.     */
    235. -
    236.     public function execute($arDbStatements$arVariableValues)
    237. -
    238.     {
    239. -
    240.         $arResults array();
    241. -
    242.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    243. -
    244.  
    245. -
    246.         foreach ($arDbStatements as $arStatement{
    247. -
    248.             list($stmt$arVariablePositions$arStatement;
    249. -
    250.             $arVariables $this->createVariableArray(
    251. -
    252.                 $arVariablePositions,
    253. -
    254.                 $arVariableValues
    255. -
    256.             );
    257. -
    258.             $arResults[$this->dbConn->Execute($stmt$arVariables);
    259. -
    260.         }
    261. -
    262.  
    263. -
    264.         $this->dbConn->SetFetchMode($oldmode);
    265. -
    266.  
    267. -
    268.         return $arResults;
    269. -
    270.     }//public function execute($arDbStatements, $arVariableValues)
    271. -
    272.  
    273. -
    274.  
    275. -
    276.  
    277. -
    278.     /**
    279. -
    280.     *   Creates an array full of variables to be passed to the Execute() method
    281. -
    282.     *   of the database connection object.
    283. -
    284.     *   Uses the variable positions array to get the positions of the variables
    285. -
    286.     *   in the result array, and the variable value array to get the actual
    287. -
    288.     *   values for the prepared statement.
    289. -
    290.     *
    291. -
    292.     *   @param array $arVariablePositions   Positions of the variables as returned
    293. -
    294.     *                                        by replacePlaceholders().
    295. -
    296.     *   @param array $arVariableValues      Array of (variable name, value) pairs
    297. -
    298.     *
    299. -
    300.     *   @return array Array of variable values
    301. -
    302.     */
    303. -
    304.     protected function createVariableArray($arVariablePositions$arVariableValues)
    305. -
    306.     {
    307. -
    308.         $arVariables array();
    309. -
    310.  
    311. -
    312.         foreach ($arVariablePositions as $nPos => $strVariable{
    313. -
    314.             if (!isset($arVariableValues[$strVariable])) {
    315. -
    316.                 throw new Exception('No value for variable "' $strVariable '" in prepared statement');
    317. -
    318.             }
    319. -
    320.  
    321. -
    322.             $strValue self::replacePrefix(
    323. -
    324.                 $arVariableValues[$strVariable],
    325. -
    326.                 $this->arPrefixes
    327. -
    328.             );
    329. -
    330.  
    331. -
    332.             $arVariables[$nPos$strValue;
    333. -
    334.         }
    335. -
    336.  
    337. -
    338.         return $arVariables;
    339. -
    340.     }//protected function createVariableArray($arVariablePositions, $arVariableValues)
    341. -
    342.  
    343. -
    344.  
    345. -
    346.  
    347. -
    348.     /**
    349. -
    350.     *   Replaces all placeholders with their actual values.
    351. -
    352.     */
    353. -
    354.     public function replacePlaceholdersWithVariables($strQuery$arPlaceholders$arVariableValues)
    355. -
    356.     {
    357. -
    358.         $this->arTmpPlaceholders   $arPlaceholders;
    359. -
    360.         $this->arTmpVariableValues $arVariableValues;
    361. -
    362.  
    363. -
    364.         $strQuery preg_replace_callback(
    365. -
    366.             '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
    367. -
    368.             array($this'replacePlaceholdersWithVariablesCb'),
    369. -
    370.             $strQuery
    371. -
    372.         );
    373. -
    374.  
    375. -
    376.         return $strQuery;
    377. -
    378.     }//public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues)
    379. -
    380.  
    381. -
    382.  
    383. -
    384.  
    385. -
    386.     /**
    387. -
    388.     *   Callback method internally used by
    389. -
    390.     *   replacePlaceholdersWithVariables() method.
    391. -
    392.     */
    393. -
    394.     protected function replacePlaceholdersWithVariablesCb($matches)
    395. -
    396.     {
    397. -
    398.         $strPlaceholder     $matches[0];
    399. -
    400.         $strSparqlVariable  array_search(
    401. -
    402.             $strPlaceholder,
    403. -
    404.             $this->arTmpPlaceholders
    405. -
    406.         );
    407. -
    408.         return $this->dbConn->qstr(
    409. -
    410.             self::replacePrefix(
    411. -
    412.                 $this->arTmpVariableValues[$strSparqlVariable],
    413. -
    414.                 $this->arPrefixes
    415. -
    416.             )
    417. -
    418.         );
    419. -
    420.     }//protected function replacePlaceholdersWithVariablesCb($matches)
    421. -
    422.  
    423. -
    424.  
    425. -
    426.  
    427. -
    428.     protected static function replacePrefix($strValue$arPrefixes)
    429. -
    430.     {
    431. -
    432.         //replace prefixes?
    433. -
    434.         if (count($arParts explode(':'$strValue2)) == 2{
    435. -
    436.             if (isset($arPrefixes[$arParts[0]])) {
    437. -
    438.                 $strValue $arPrefixes[$arParts[0]] $arParts[1];
    439. -
    440.             }
    441. -
    442.         }
    443. -
    444.         return $strValue;
    445. -
    446.     }//protected static function replacePrefix($strValue, $arPrefixes)
    447. -
    448.  
    449. -
    450. }//class SparqlEngineDb_Preparator
    451. -
    452.  
    453. -
    454. ?>
    455. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base deleted file mode 100755 index ebc526e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html.svn-base +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - File Source for PreparedStatement.php - - - - - -

    Source for file PreparedStatement.php

    -

    Documentation is available at PreparedStatement.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/PreparedStatement.php';;
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   A prepared statement that can be execute()d later multiple
    10. -
    11. *   times with different variable values.
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     protected $sparqlEngine = null;
    27. -
    28.  
    29. -
    30.  
    31. -
    32.     public function __construct(SparqlEngineDb $sparqlEngine)
    33. -
    34.     {
    35. -
    36.         $this->sparqlEngine = $sparqlEngine;
    37. -
    38.     }//public function __construct(SparqlEngineDb $sparqlEngine)
    39. -
    40.  
    41. -
    42.  
    43. -
    44.  
    45. -
    46.     /**
    47. -
    48.     *   Execute the prepared statement and returns the result.
    49. -
    50.     *
    51. -
    52.     *   @param array $arVariables   Array of sparql query variables => values
    53. -
    54.     *   @param string $resultform   Which result form you need
    55. -
    56.     *   @return mixed   Anything a sparql query can return
    57. -
    58.     */
    59. -
    60.     public function execute($arVariables$resultform false)
    61. -
    62.     {
    63. -
    64.         return $this->sparqlEngine->execute($arVariables$resultform);
    65. -
    66.     }//public function execute($arVariables, $resultform)
    67. -
    68.  
    69. -
    70. }//class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement
    71. -
    72. ?>
    73. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base deleted file mode 100755 index 9d0111b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html.svn-base +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - File Source for ResultConverter.php - - - - - -

    Source for file ResultConverter.php

    -

    Documentation is available at ResultConverter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Converts a database result into a proper
    10. -
    11. *   rdf statement triple array
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     /**
    27. -
    28.     *   Determines the correct renderer and calls it.
    29. -
    30.     *
    31. -
    32.     *   The $resultform may be:
    33. -
    34.     *   - false: The default renderer is taken then
    35. -
    36.     *   - an object that implements SparqlEngineDb_ResultRenderer interface
    37. -
    38.     *   - a string like "HTML" or "XML". The appropriate renderer is used then.
    39. -
    40.     *   - a full class name, e.g. SparqlEngineDb_ResultRenderer_XML
    41. -
    42.     *
    43. -
    44.     *   @param array    $arRecordSets   Array of anything ADOConnection::Execute() can return
    45. -
    46.     *   @param SparqlEngineDb $engine   Sparql database engine.
    47. -
    48.     *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
    49. -
    50.     *
    51. -
    52.     *   @return mixed   Most likely an array or a boolean value,
    53. -
    54.     *                    or anything else as determined by $resultform
    55. -
    56.     */
    57. -
    58.     public static function convertFromDbResults($arRecordSetsSparqlEngineDb $engine$resultform false)
    59. -
    60.     {
    61. -
    62.         if (is_object($resultform)) {
    63. -
    64.             if ($resultform instanceof SparqlEngineDb_ResultRenderer{
    65. -
    66.                 return $resultform->convertFromDbResults(
    67. -
    68.                     $arRecordSets,
    69. -
    70.                     $engine->getQuery(),
    71. -
    72.                     $engine
    73. -
    74.                 );
    75. -
    76.             else {
    77. -
    78.                 throw new Exception(
    79. -
    80.                     'Result renderer object needs to implement'
    81. -
    82.                     . ' SparqlEngineDb_ResultRenderer interface'
    83. -
    84.                 );
    85. -
    86.             }
    87. -
    88.         }
    89. -
    90.  
    91. -
    92.         if ($resultform === false{
    93. -
    94.             $resultform 'Default';
    95. -
    96.         else if ($resultform == 'xml'{
    97. -
    98.             //kept for BC reasons
    99. -
    100.             $resultform 'XML';
    101. -
    102.         }
    103. -
    104.  
    105. -
    106.         if ($strClass self::loadClass($resultform)) {
    107. -
    108.             $rrObj new $strClass();
    109. -
    110.             if ($rrObj instanceof SparqlEngineDb_ResultRenderer{
    111. -
    112.                 return $rrObj->convertFromDbResults(
    113. -
    114.                     $arRecordSets,
    115. -
    116.                     $engine->getQuery(),
    117. -
    118.                     $engine
    119. -
    120.                 );
    121. -
    122.             else {
    123. -
    124.                 throw new Exception(
    125. -
    126.                     'Result renderer class "' $strClass '" needs to implement'
    127. -
    128.                     . ' SparqlEngineDb_ResultRenderer interface'
    129. -
    130.                 );
    131. -
    132.             }
    133. -
    134.         else {
    135. -
    136.             throw new Exception(
    137. -
    138.                 'Result renderer class "' $resultform '" could not be loaded.'
    139. -
    140.             );
    141. -
    142.         }
    143. -
    144.     }//public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false)
    145. -
    146.  
    147. -
    148.  
    149. -
    150.  
    151. -
    152.     /**
    153. -
    154.     *   Tries to load a given class if it doesn't exist,
    155. -
    156.     *   and returns true if the class can be used.
    157. -
    158.     *
    159. -
    160.     *   @param string $strClass Classname
    161. -
    162.     *   @return mixed Class name if the class is loaded and can be used, false if not.
    163. -
    164.     */
    165. -
    166.     protected static function loadClass($strClass)
    167. -
    168.     {
    169. -
    170.         if (class_exists($strClass)) {
    171. -
    172.             return $strClass;
    173. -
    174.         }
    175. -
    176.  
    177. -
    178.         //RAP style, shortcut notation
    179. -
    180.         $strFile 'SparqlEngineDb/ResultRenderer/' $strClass '.php';
    181. -
    182.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    183. -
    184.         if (class_exists('SparqlEngineDb_ResultRenderer_' $strClass)) {
    185. -
    186.             return 'SparqlEngineDb_ResultRenderer_' $strClass;
    187. -
    188.         }
    189. -
    190.  
    191. -
    192.         //RAP style
    193. -
    194.         $strFile str_replace('_''/'$strClass'.php';
    195. -
    196.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    197. -
    198.         if (class_exists($strClass)) {
    199. -
    200.             return $strClass;
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         //PEAR style
    207. -
    208.         @include_once $strFile;
    209. -
    210.         if (class_exists($strClass)) {
    211. -
    212.             return $strClass;
    213. -
    214.         }
    215. -
    216.  
    217. -
    218.         return false;
    219. -
    220.     }//protected static function loadClass($strClass)
    221. -
    222.  
    223. -
    224. }//class SparqlEngineDb_ResultConverter
    225. -
    226. ?>
    227. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base deleted file mode 100755 index 686b8636..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html.svn-base +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - File Source for ResultRenderer.php - - - - - -

    Source for file ResultRenderer.php

    -

    Documentation is available at ResultRenderer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Result renderer interface that any result renderer needs to implement.
    8. -
    9. *   A result renderer converts the raw database results into a
    10. -
    11. *   - for the user - usable result format, e.g. php arrays, xml, json and
    12. -
    13. *   so on.
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     /**
    29. -
    30.     *   Converts the database results into the desired output format
    31. -
    32.     *   and returns the result.
    33. -
    34.     *
    35. -
    36.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    37. -
    38.     *   @param Query $query     SPARQL query object
    39. -
    40.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    41. -
    42.     *   @return mixed   The result as rendered by the result renderers.
    43. -
    44.     */
    45. -
    46.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine);
    47. -
    48.  
    49. -
    50. }//interface SparqlEngineDb_ResultRenderer
    51. -
    52.  
    53. -
    54. ?>
    55. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base deleted file mode 100755 index 6b7c7fd5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html.svn-base +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - File Source for Default.php - - - - - -

    Source for file Default.php

    -

    Documentation is available at Default.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Default RAP result renderer.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
    22. -
    23. {
    24. -
    25.  
    26. -
    27.     /**
    28. -
    29.     *   Defines the methods needed to create the types
    30. -
    31.     *   in $arVarAssignments.
    32. -
    33.     *   Key is the type (e.g. "s" for subject), and
    34. -
    35.     *   value the method's name.
    36. -
    37.     *
    38. -
    39.     *   @see $arVarAssignments
    40. -
    41.     *
    42. -
    43.     *   @var array 
    44. -
    45.     */
    46. -
    47.     protected $arCreationMethods = array(
    48. -
    49.         's' => 'createSubjectFromDbRecordSetPart',
    50. -
    51.         'p' => 'createPredicateFromDbRecordSetPart',
    52. -
    53.         'o' => 'createObjectFromDbRecordSetPart'
    54. -
    55.     );
    56. -
    57.  
    58. -
    59.  
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     *   Converts the database results into the desired output format
    66. -
    67.     *   and returns the result.
    68. -
    69.     *
    70. -
    71.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    72. -
    73.     *   @param Query $query     SPARQL query object
    74. -
    75.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    76. -
    77.     *   @return mixed   The result as rendered by the result renderers.
    78. -
    79.     */
    80. -
    81.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    82. -
    83.     {
    84. -
    85.         $this->query    $query;
    86. -
    87.         $this->engine   $engine;
    88. -
    89.         $this->sg       $engine->getSqlGenerator();
    90. -
    91.  
    92. -
    93.         $strResultForm $this->query->getResultForm();
    94. -
    95.         switch ($strResultForm{
    96. -
    97.             case 'construct':
    98. -
    99.             case 'select':
    100. -
    101.             case 'select distinct':
    102. -
    103.                 $arResult $this->getVariableArrayFromRecordSets($arRecordSets$strResultForm);
    104. -
    105.  
    106. -
    107.                 //some result forms need more modification
    108. -
    109.                 switch ($strResultForm{
    110. -
    111.                     case 'construct';
    112. -
    113.                         $arResult $this->constructGraph(
    114. -
    115.                             $arResult,
    116. -
    117.                             $this->query->getConstructPattern()
    118. -
    119.                         );
    120. -
    121.                         break;
    122. -
    123.                     case 'describe';
    124. -
    125.                         $arResult $this->describeGraph($arResult);
    126. -
    127.                         break;
    128. -
    129.                 }
    130. -
    131.  
    132. -
    133.                 return $arResult;
    134. -
    135.                 break;
    136. -
    137.  
    138. -
    139.             case 'count':
    140. -
    141.             case 'ask':
    142. -
    143.                 if (count($arRecordSets1{
    144. -
    145.                     throw new Exception(
    146. -
    147.                         'More than one result set for a '
    148. -
    149.                         . $strResultForm ' query!'
    150. -
    151.                     );
    152. -
    153.                 }
    154. -
    155.  
    156. -
    157.                 $nCount 0;
    158. -
    159.                 $dbRecordSet reset($arRecordSets);
    160. -
    161.                 foreach ($dbRecordSet as $row{
    162. -
    163.                     $nCount intval($row['count']);
    164. -
    165.                     break;
    166. -
    167.                 }
    168. -
    169.  
    170. -
    171.                 if ($strResultForm == 'ask'{
    172. -
    173.                     return $nCount 0;
    174. -
    175.                 else {
    176. -
    177.                     return $nCount;
    178. -
    179.                 }
    180. -
    181.                 break;
    182. -
    183.  
    184. -
    185.             case 'describe':
    186. -
    187.             default:
    188. -
    189.                 throw new Exception('Unsupported result form: ' $strResultForm);
    190. -
    191.         }
    192. -
    193.  
    194. -
    195.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    196. -
    197.  
    198. -
    199.  
    200. -
    201.  
    202. -
    203.  
    204. -
    205.     protected function getVariableArrayFromRecordSets($arRecordSets$strResultForm)
    206. -
    207.     {
    208. -
    209.         $arResult array();
    210. -
    211.         foreach ($arRecordSets as $dbRecordSet{
    212. -
    213.             $arResult array_merge(
    214. -
    215.                 $arResult,
    216. -
    217.                 $this->getVariableArrayFromRecordSet($dbRecordSet$strResultForm)
    218. -
    219.             );
    220. -
    221.         }
    222. -
    223.         return $arResult;
    224. -
    225.     }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
    226. -
    227.  
    228. -
    229.  
    230. -
    231.  
    232. -
    233.     /**
    234. -
    235.     *   Converts a ADORecordSet object into an array of "rows" that
    236. -
    237.     *   are subarrays of variable => value pairs.
    238. -
    239.     *
    240. -
    241.     *   @param ADORecordSet $dbRecordSet    Anything ADOConnection::Execute() can return
    242. -
    243.     *   @return array 
    244. -
    245.     */
    246. -
    247.     protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet$strResultForm)
    248. -
    249.     {
    250. -
    251.         $arResult       array();
    252. -
    253.         switch ($strResultForm{
    254. -
    255.             case 'construct':
    256. -
    257.                 $arResultVars $this->query->getConstructPatternVariables();
    258. -
    259.                 break;
    260. -
    261.             default:
    262. -
    263.                 $arResultVars $this->query->getResultVars();
    264. -
    265.                 break;
    266. -
    267.         }
    268. -
    269.  
    270. -
    271.         if (in_array('*'$arResultVars)) {
    272. -
    273.             $arResultVars   array_keys($this->sg->arVarAssignments);
    274. -
    275.         }
    276. -
    277.  
    278. -
    279.         //work around bug in adodb:
    280. -
    281.         // ADORecordSet_empty does not implement php5 iterators
    282. -
    283.         if ($dbRecordSet->RowCount(<= 0{
    284. -
    285.             return array();
    286. -
    287.         }
    288. -
    289.  
    290. -
    291.         foreach ($dbRecordSet as $row{
    292. -
    293.             $arResultRow array();
    294. -
    295.             foreach ($arResultVars as $strVarName{
    296. -
    297.                 if (!isset($this->sg->arVarAssignments[$strVarName])) {
    298. -
    299.                     //variable is in select, but not in result (test: q-select-2)
    300. -
    301.                     $arResultRow[$strVarName'';
    302. -
    303.                 else {
    304. -
    305.                     $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    306. -
    307.                     $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    308. -
    309.                     $arResultRow[$strVarName$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    310. -
    311.                 }
    312. -
    313.             }
    314. -
    315.             $arResult[$arResultRow;
    316. -
    317.         }
    318. -
    319.         return $arResult;
    320. -
    321.     }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet)
    322. -
    323.  
    324. -
    325.  
    326. -
    327.  
    328. -
    329.     /**
    330. -
    331.     *   Creates an RDF Statement object for one of the variables
    332. -
    333.     *   contained in the given $dbRecordSet object.
    334. -
    335.     *
    336. -
    337.     *   @see convertFromDbResult() to understand $strVarBase necessity
    338. -
    339.     *
    340. -
    341.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    342. -
    343.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    344. -
    345.     *
    346. -
    347.     *   @return Statement   RDF statement object
    348. -
    349.     */
    350. -
    351.     protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase)
    352. -
    353.     {
    354. -
    355.         return new Statement(
    356. -
    357.             $this->createSubjectFromDbRecordSetPart  ($dbRecordSet$strVarBase),
    358. -
    359.             $this->createPredicateFromDbRecordSetPart($dbRecordSet$strVarBase),
    360. -
    361.             $this->createObjectFromDbRecordSetPart   ($dbRecordSet$strVarBase)
    362. -
    363.         );
    364. -
    365.     }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
    366. -
    367.  
    368. -
    369.  
    370. -
    371.  
    372. -
    373.     /**
    374. -
    375.     *   Creates an RDF subject object
    376. -
    377.     *   contained in the given $dbRecordSet object.
    378. -
    379.     *
    380. -
    381.     *   @see convertFromDbResult() to understand $strVarBase necessity
    382. -
    383.     *
    384. -
    385.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    386. -
    387.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    388. -
    389.     *
    390. -
    391.     *   @return Resource   RDF triple subject resource object
    392. -
    393.     */
    394. -
    395.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    396. -
    397.     {
    398. -
    399.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    400. -
    401.             //FIXME: should be NULL, but doesn't pass test
    402. -
    403.             return '';
    404. -
    405.         }
    406. -
    407.  
    408. -
    409.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    410. -
    411.             //null should be predicate which is always a resource
    412. -
    413.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    414. -
    415.         {
    416. -
    417.             $subject    new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    418. -
    419.         else {
    420. -
    421.             $subject    new BlankNode($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    422. -
    423.         }
    424. -
    425.         return $subject;
    426. -
    427.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    428. -
    429.  
    430. -
    431.  
    432. -
    433.  
    434. -
    435.     /**
    436. -
    437.     *   Creates an RDF predicate object
    438. -
    439.     *   contained in the given $dbRecordSet object.
    440. -
    441.     *
    442. -
    443.     *   @see convertFromDbResult() to understand $strVarBase necessity
    444. -
    445.     *
    446. -
    447.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    448. -
    449.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    450. -
    451.     *
    452. -
    453.     *   @return Resource   RDF triple predicate resource object
    454. -
    455.     */
    456. -
    457.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    458. -
    459.     {
    460. -
    461.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    462. -
    463.             //FIXME: should be NULL, but doesn't pass test
    464. -
    465.             return '';
    466. -
    467.         }
    468. -
    469.         $predicate      new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    470. -
    471.         return $predicate;
    472. -
    473.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    474. -
    475.  
    476. -
    477.  
    478. -
    479.  
    480. -
    481.     /**
    482. -
    483.     *   Creates an RDF object object
    484. -
    485.     *   contained in the given $dbRecordSet object.
    486. -
    487.     *
    488. -
    489.     *   @see convertFromDbResult() to understand $strVarBase necessity
    490. -
    491.     *
    492. -
    493.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    494. -
    495.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    496. -
    497.     *
    498. -
    499.     *   @return Resource   RDF triple object resource object
    500. -
    501.     */
    502. -
    503.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    504. -
    505.     {
    506. -
    507.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    508. -
    509.             //FIXME: should be NULL, but doesn't pass test
    510. -
    511.             return '';
    512. -
    513.         }
    514. -
    515.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    516. -
    517.             case 'r':
    518. -
    519.                 $object new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    520. -
    521.                 break;
    522. -
    523.             case 'b':
    524. -
    525.                 $object new BlankNode($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    526. -
    527.                 break;
    528. -
    529.             default:
    530. -
    531.                 $object new Literal(
    532. -
    533.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    534. -
    535.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']]
    536. -
    537.                 );
    538. -
    539.                 if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]{
    540. -
    541.                     $object->setDatatype($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]);
    542. -
    543.                 }
    544. -
    545.         }
    546. -
    547.         return $object;
    548. -
    549.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    550. -
    551.  
    552. -
    553.  
    554. -
    555.  
    556. -
    557.     /**
    558. -
    559.     * Constructs a result graph.
    560. -
    561.     *
    562. -
    563.     * @param  array         $arVartable       A table containing the result vars and their bindings
    564. -
    565.     * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
    566. -
    567.     * @return MemModel      The result graph which matches the CONSTRUCT pattern
    568. -
    569.     */
    570. -
    571.     protected function constructGraph($arVartable$constructPattern)
    572. -
    573.     {
    574. -
    575.         $resultGraph new MemModel();
    576. -
    577.  
    578. -
    579.         if (!$arVartable{
    580. -
    581.             return $resultGraph;
    582. -
    583.         }
    584. -
    585.  
    586. -
    587.         $tp $constructPattern->getTriplePattern();
    588. -
    589.  
    590. -
    591.         $bnode 0;
    592. -
    593.         foreach ($arVartable as $value{
    594. -
    595.             foreach ($tp as $triple{
    596. -
    597.                 $sub  $triple->getSubject();
    598. -
    599.                 $pred $triple->getPredicate();
    600. -
    601.                 $obj  $triple->getObject();
    602. -
    603.  
    604. -
    605.                 if (is_string($sub)  && $sub{1== '_'{
    606. -
    607.                     $sub  new BlankNode("_bN".$bnode);
    608. -
    609.                 }
    610. -
    611.                 if (is_string($pred&& $pred{1== '_'{
    612. -
    613.                     $pred new BlankNode("_bN".$bnode);
    614. -
    615.                 }
    616. -
    617.                 if (is_string($obj)  && $obj{1== '_'{
    618. -
    619.                     $obj  new BlankNode("_bN".$bnode);
    620. -
    621.                 }
    622. -
    623.  
    624. -
    625.  
    626. -
    627.                 if (is_string($sub)) {
    628. -
    629.                     $sub  $value[$sub];
    630. -
    631.                 }
    632. -
    633.                 if (is_string($pred)) {
    634. -
    635.                     $pred $value[$pred];
    636. -
    637.                 }
    638. -
    639.                 if (is_string($obj)) {
    640. -
    641.                     $obj  $value[$obj];
    642. -
    643.                 }
    644. -
    645.  
    646. -
    647.                 if ($sub !== "" && $pred !== "" && $obj !== ""{
    648. -
    649.                     $resultGraph->add(new Statement($sub,$pred,$obj));
    650. -
    651.                 }
    652. -
    653.             }
    654. -
    655.             $bnode++;
    656. -
    657.         }
    658. -
    659.         return $resultGraph;
    660. -
    661.     }//protected function constructGraph($arVartable, $constructPattern)
    662. -
    663.  
    664. -
    665. }//class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
    666. -
    667. ?>
    668. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:00 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base deleted file mode 100755 index 1f996fac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html.svn-base +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - File Source for HTML.php - - - - - -

    Source for file HTML.php

    -

    Documentation is available at HTML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Sparql DB HTML result renderer.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
    22. -
    23. {
    24. -
    25.     /**
    26. -
    27.     *   If the result HTML should be wrapped in a div
    28. -
    29.     *   @var boolean 
    30. -
    31.     */
    32. -
    33.     protected $bWrap = true;
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     *   Defines the methods needed to create the types
    40. -
    41.     *   in $arVarAssignments.
    42. -
    43.     *   Key is the type (e.g. "s" for subject), and
    44. -
    45.     *   value the method's name.
    46. -
    47.     *
    48. -
    49.     *   @see $arVarAssignments
    50. -
    51.     *
    52. -
    53.     *   @var array 
    54. -
    55.     */
    56. -
    57.     protected $arCreationMethods = array(
    58. -
    59.         's' => 'createSubjectFromDbRecordSetPart',
    60. -
    61.         'p' => 'createPredicateFromDbRecordSetPart',
    62. -
    63.         'o' => 'createObjectFromDbRecordSetPart'
    64. -
    65.     );
    66. -
    67.  
    68. -
    69.  
    70. -
    71.  
    72. -
    73.     /**
    74. -
    75.     *   Converts the database results into nice HTML.
    76. -
    77.     *
    78. -
    79.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    80. -
    81.     *   @param Query $query     SPARQL query object
    82. -
    83.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    84. -
    85.     *   @return mixed   HTML code
    86. -
    87.     */
    88. -
    89.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    90. -
    91.     {
    92. -
    93.         $this->query $query;
    94. -
    95.         $this->sg    $engine->getSqlGenerator();
    96. -
    97.         $strCode     '';
    98. -
    99.  
    100. -
    101.         $strResultForm $query->getResultForm();
    102. -
    103.         switch ($strResultForm{
    104. -
    105.             case 'select':
    106. -
    107.             case 'select distinct':
    108. -
    109.                 $strCode $this->createTableFromRecords($arRecordSets);
    110. -
    111.                 break;
    112. -
    113.  
    114. -
    115.             case 'construct':
    116. -
    117.             case 'describe':
    118. -
    119.                 throw new Exception(
    120. -
    121.                     'Construct and describe are currently not supported by the'
    122. -
    123.                     . ' HTML renderer'
    124. -
    125.                 );
    126. -
    127.  
    128. -
    129.             case 'count':
    130. -
    131.             case 'ask':
    132. -
    133.                 if (count($arRecordSets1{
    134. -
    135.                     throw new Exception(
    136. -
    137.                         'More than one result set for a '
    138. -
    139.                         . $strResultForm ' query!'
    140. -
    141.                     );
    142. -
    143.                 }
    144. -
    145.  
    146. -
    147.                 $nCount 0;
    148. -
    149.                 $dbRecordSet reset($arRecordSets);
    150. -
    151.                 foreach ($dbRecordSet as $row{
    152. -
    153.                     $nCount intval($row['count']);
    154. -
    155.                     break;
    156. -
    157.                 }
    158. -
    159.  
    160. -
    161.                 if ($strResultForm == 'ask'{
    162. -
    163.                     $strCode 'There were results.';
    164. -
    165.                 else {
    166. -
    167.                     $strCode 'There are ' $nCount ' results.';
    168. -
    169.                 }
    170. -
    171.                 break;
    172. -
    173.  
    174. -
    175.             default:
    176. -
    177.                 throw new Exception('Unsupported result form: ' $strResultForm);
    178. -
    179.         }
    180. -
    181.  
    182. -
    183.         return $this->wrapCode($strCode);
    184. -
    185.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    186. -
    187.  
    188. -
    189.  
    190. -
    191.  
    192. -
    193.     protected function wrapCode($strCode)
    194. -
    195.     {
    196. -
    197.         if (!$this->bWrap{
    198. -
    199.             return $strCode;
    200. -
    201.         }
    202. -
    203.  
    204. -
    205.         return
    206. -
    207.             '<div class="SparqlEngineDb_ResultRenderer_HTML_result">' "\n"
    208. -
    209.             . $strCode "\n"
    210. -
    211.             . "</div>\n";
    212. -
    213.     }//protected function wrapCode($strCode)
    214. -
    215.  
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     protected function createTableFromRecords($arRecordSets)
    222. -
    223.     {
    224. -
    225.         $arResultVars $this->query->getResultVars();
    226. -
    227.  
    228. -
    229.         if (in_array('*'$arResultVars)) {
    230. -
    231.             $arResultVars   array_keys($this->sg->arVarAssignments);
    232. -
    233.         }
    234. -
    235.  
    236. -
    237.         $arResult array();
    238. -
    239.         foreach ($arRecordSets as $dbRecordSet{
    240. -
    241.             //work around bug in adodb:
    242. -
    243.             // ADORecordSet_empty does not implement php5 iterators
    244. -
    245.             if ($dbRecordSet->RowCount(<= 0{
    246. -
    247.                 return array();
    248. -
    249.             }
    250. -
    251.  
    252. -
    253.             foreach ($dbRecordSet as $row{
    254. -
    255.                 $arResultRow array();
    256. -
    257.                 foreach ($arResultVars as $strVarName{
    258. -
    259.                     if (!isset($this->sg->arVarAssignments[$strVarName])) {
    260. -
    261.                         //variable is in select, but not in result (test: q-select-2)
    262. -
    263.                         $arResultRow[$strVarName'';
    264. -
    265.                     else {
    266. -
    267.                         $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    268. -
    269.                         $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    270. -
    271.                         list($strCode$strColor$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    272. -
    273.                         $arResultRow[$strVarName'<td style="background-color: '
    274. -
    275.                             . $strColor '">' $strCode '</td>';
    276. -
    277.                     }
    278. -
    279.                 }
    280. -
    281.                 $arResult[$arResultRow;
    282. -
    283.             }
    284. -
    285.         }
    286. -
    287.  
    288. -
    289.         //I always wanted to to this :)
    290. -
    291.         return
    292. -
    293.             "<table border='1'>\n"
    294. -
    295.             . " <caption>SPARQL result with " count($arResult" rows</caption>\n"
    296. -
    297.             . " <thead><th>"
    298. -
    299.                 . implode('</th><th>'array_keys(reset($arResult)))
    300. -
    301.             . "</th></thead>\n"
    302. -
    303.             . " <tbody>\n  <tr>"
    304. -
    305.             . implode(
    306. -
    307.                 "</tr>\n  <tr>",
    308. -
    309.                 array_map(
    310. -
    311.                     create_function(
    312. -
    313.                         '$ar',
    314. -
    315.                         'return implode("", $ar);'
    316. -
    317.                     ),
    318. -
    319.                     $arResult
    320. -
    321.                 )
    322. -
    323.               )
    324. -
    325.             . "</tr>\n </tbody>\n"
    326. -
    327.             . "</table>\n";
    328. -
    329.     }//protected function createTableFromRecords($arRecordSets)
    330. -
    331.  
    332. -
    333.  
    334. -
    335.  
    336. -
    337.     /**
    338. -
    339.     *   Creates an RDF subject object
    340. -
    341.     *   contained in the given $dbRecordSet object.
    342. -
    343.     *
    344. -
    345.     *   @see convertFromDbResult() to understand $strVarBase necessity
    346. -
    347.     *
    348. -
    349.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    350. -
    351.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    352. -
    353.     *
    354. -
    355.     *   @return string HTML code
    356. -
    357.     */
    358. -
    359.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    360. -
    361.     {
    362. -
    363.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    364. -
    365.             return $this->getHtmlNull();
    366. -
    367.         }
    368. -
    369.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    370. -
    371.             //null should be predicate which is always a resource
    372. -
    373.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    374. -
    375.         {
    376. -
    377.             return $this->getHtmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    378. -
    379.         else {
    380. -
    381.             return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    382. -
    383.         }
    384. -
    385.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    386. -
    387.  
    388. -
    389.  
    390. -
    391.  
    392. -
    393.     /**
    394. -
    395.     *   Creates an RDF predicate object
    396. -
    397.     *   contained in the given $dbRecordSet object.
    398. -
    399.     *
    400. -
    401.     *   @see convertFromDbResult() to understand $strVarBase necessity
    402. -
    403.     *
    404. -
    405.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    406. -
    407.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    408. -
    409.     *
    410. -
    411.     *   @return string HTML code
    412. -
    413.     */
    414. -
    415.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    416. -
    417.     {
    418. -
    419.         if ($dbRecordSet->fields[$strVarBase .  '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    420. -
    421.             return $this->getHtmlNull();
    422. -
    423.         }
    424. -
    425.  
    426. -
    427.         return $this->getHtmlResource($dbRecordSet->fields[$strVarBase .  '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    428. -
    429.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    430. -
    431.  
    432. -
    433.  
    434. -
    435.  
    436. -
    437.     /**
    438. -
    439.     *   Creates an RDF object object
    440. -
    441.     *   contained in the given $dbRecordSet object.
    442. -
    443.     *
    444. -
    445.     *   @see convertFromDbResult() to understand $strVarBase necessity
    446. -
    447.     *
    448. -
    449.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    450. -
    451.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    452. -
    453.     *
    454. -
    455.     *   @return string HTML code
    456. -
    457.     */
    458. -
    459.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    460. -
    461.     {
    462. -
    463.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    464. -
    465.             return $this->getHtmlNull();
    466. -
    467.         }
    468. -
    469.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    470. -
    471.             case 'r':
    472. -
    473.                 return $this->getHtmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    474. -
    475.                 break;
    476. -
    477.             case 'b':
    478. -
    479.                 return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    480. -
    481.                 break;
    482. -
    483.             default:
    484. -
    485.                 return $this->getHtmlLiteral(
    486. -
    487.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    488. -
    489.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']],
    490. -
    491.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]
    492. -
    493.                 );
    494. -
    495.         }
    496. -
    497.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    498. -
    499.  
    500. -
    501.  
    502. -
    503.  
    504. -
    505.     protected function getHtmlNull()
    506. -
    507.     {
    508. -
    509.         return array('<pre>NULL</pre>''#FFF');
    510. -
    511.     }//protected function getHtmlNull()
    512. -
    513.  
    514. -
    515.  
    516. -
    517.  
    518. -
    519.     protected function getHtmlBlank($value)
    520. -
    521.     {
    522. -
    523.         return array('<i>Blank node</i>'HTML_TABLE_BNODE_COLOR);
    524. -
    525.     }//protected function getHtmlBlank($value)
    526. -
    527.  
    528. -
    529.  
    530. -
    531.  
    532. -
    533.     protected function getHtmlResource($value)
    534. -
    535.     {
    536. -
    537.         return array(
    538. -
    539.             htmlspecialchars($value),
    540. -
    541.             HTML_TABLE_RESOURCE_COLOR
    542. -
    543.         );
    544. -
    545.     }//protected function getHtmlResource($value)
    546. -
    547.  
    548. -
    549.  
    550. -
    551.  
    552. -
    553.     protected function getHtmlLiteral($value$language$datatype)
    554. -
    555.     {
    556. -
    557.         $strCode htmlspecialchars($value);
    558. -
    559.         if ($language{
    560. -
    561.             $strCode ' <i>xml:lang</i>=' $language;
    562. -
    563.         }
    564. -
    565.         if ($datatype{
    566. -
    567.             $strCode ' <i>rdf:type</i>=' $datatype;
    568. -
    569.         }
    570. -
    571.         return array($strCodeHTML_TABLE_LITERAL_COLOR);
    572. -
    573.     }//protected function getHtmlLiteral($value, $language, $datatype)
    574. -
    575.  
    576. -
    577.  
    578. -
    579. }//class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
    580. -
    581.  
    582. -
    583. ?>
    584. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base deleted file mode 100755 index 4c75da73..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html.svn-base +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - File Source for XML.php - - - - - -

    Source for file XML.php

    -

    Documentation is available at XML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Sparql DB XML result renderer as defined by
    10. -
    11. *   http://www.w3.org/TR/rdf-sparql-XMLres/
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
    24. -
    25. {
    26. -
    27.  
    28. -
    29.     /**
    30. -
    31.     *   Defines the methods needed to create the types
    32. -
    33.     *   in $arVarAssignments.
    34. -
    35.     *   Key is the type (e.g. "s" for subject), and
    36. -
    37.     *   value the method's name.
    38. -
    39.     *
    40. -
    41.     *   @see $arVarAssignments
    42. -
    43.     *
    44. -
    45.     *   @var array 
    46. -
    47.     */
    48. -
    49.     protected $arCreationMethods = array(
    50. -
    51.         's' => 'createSubjectFromDbRecordSetPart',
    52. -
    53.         'p' => 'createPredicateFromDbRecordSetPart',
    54. -
    55.         'o' => 'createObjectFromDbRecordSetPart'
    56. -
    57.     );
    58. -
    59.  
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     *   Converts the database results into nice HTML.
    68. -
    69.     *
    70. -
    71.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    72. -
    73.     *   @param Query $query     SPARQL query object
    74. -
    75.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    76. -
    77.     *   @return mixed   HTML code
    78. -
    79.     */
    80. -
    81.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    82. -
    83.     {
    84. -
    85.         $this->query $query;
    86. -
    87.         $this->sg    $engine->getSqlGenerator();
    88. -
    89.         $strCode     '';
    90. -
    91.  
    92. -
    93.         $strResultForm $query->getResultForm();
    94. -
    95.         switch ($strResultForm{
    96. -
    97.             case 'select':
    98. -
    99.             case 'select distinct':
    100. -
    101.                 $strCode $this->createFromRecords($arRecordSets$strResultForm);
    102. -
    103.                 break;
    104. -
    105.  
    106. -
    107.             case 'construct':
    108. -
    109.             case 'describe':
    110. -
    111.                 throw new Exception(
    112. -
    113.                     'Construct and describe are not supported by the'
    114. -
    115.                     . ' XML renderer'
    116. -
    117.                 );
    118. -
    119.  
    120. -
    121.             case 'count':
    122. -
    123.             case 'ask':
    124. -
    125.                 if (count($arRecordSets1{
    126. -
    127.                     throw new Exception(
    128. -
    129.                         'More than one result set for a '
    130. -
    131.                         . $strResultForm ' query!'
    132. -
    133.                     );
    134. -
    135.                 }
    136. -
    137.  
    138. -
    139.                 $nCount 0;
    140. -
    141.                 $dbRecordSet reset($arRecordSets);
    142. -
    143.                 foreach ($dbRecordSet as $row{
    144. -
    145.                     $nCount intval($row['count']);
    146. -
    147.                     break;
    148. -
    149.                 }
    150. -
    151.  
    152. -
    153.                 if ($strResultForm == 'ask'{
    154. -
    155.                     $strCode $this->getHead()
    156. -
    157.                         . '  <boolean>'
    158. -
    159.                         . self::getSpokenBoolean($nCount 0)
    160. -
    161.                         . '</boolean>';
    162. -
    163.                 else {
    164. -
    165.                     $strCode $this->getHead()
    166. -
    167.                         . '  <int>'
    168. -
    169.                         . $nCount
    170. -
    171.                         . '</int>';
    172. -
    173.                 }
    174. -
    175.                 break;
    176. -
    177.  
    178. -
    179.             default:
    180. -
    181.                 throw new Exception('Unsupported result form: ' $strResultForm);
    182. -
    183.         }
    184. -
    185.  
    186. -
    187.         return $this->wrapCode($strCode);
    188. -
    189.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    190. -
    191.  
    192. -
    193.  
    194. -
    195.  
    196. -
    197.     protected function wrapCode($strCode)
    198. -
    199.     {
    200. -
    201.         return <<<EOT
    202. -
    203. <?xml version="1.0"?>
    204. -
    205. <sparql xmlns="http://www.w3.org/2005/sparql-results#">
    206. -
    207.  
    208. -
    209. EOT            . $strCode "\n"
    210. -
    211.             . "</sparql>\n";
    212. -
    213.     }//protected function wrapCode($strCode)
    214. -
    215.  
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     protected function getHead($strXml '')
    222. -
    223.     {
    224. -
    225.         return "  <head>\n"
    226. -
    227.             . $strXml
    228. -
    229.             . "  </head>\n";
    230. -
    231.     }//protected function getHead($strXml = '')
    232. -
    233.  
    234. -
    235.  
    236. -
    237.  
    238. -
    239.     protected function createFromRecords($arRecordSets$strResultForm)
    240. -
    241.     {
    242. -
    243.         $arResultVars $this->query->getResultVars();
    244. -
    245.  
    246. -
    247.         if (in_array('*'$arResultVars)) {
    248. -
    249.             $arResultVars   array_keys($this->sg->arVarAssignments);
    250. -
    251.         }
    252. -
    253.  
    254. -
    255.         $strHeadXml $this->getHead(
    256. -
    257.             "    <variable name=\""
    258. -
    259.             . implode(
    260. -
    261.                 "\"/>\n    <variable name=\"",
    262. -
    263.                 $arResultVars
    264. -
    265.             )
    266. -
    267.             . "\"/>\n"
    268. -
    269.         );
    270. -
    271.  
    272. -
    273.         $arResult array();
    274. -
    275.         foreach ($arRecordSets as $dbRecordSet{
    276. -
    277.             //work around bug in adodb:
    278. -
    279.             // ADORecordSet_empty does not implement php5 iterators
    280. -
    281.             if ($dbRecordSet->RowCount(<= 0{
    282. -
    283.                 return array();
    284. -
    285.             }
    286. -
    287.  
    288. -
    289.             foreach ($dbRecordSet as $row{
    290. -
    291.                 $arResultRow array();
    292. -
    293.                 foreach ($arResultVars as $strVarName{
    294. -
    295.                     if (!isset($this->sg->arVarAssignments[$strVarName])) {
    296. -
    297.                         //variable is in select, but not in result (test: q-select-2)
    298. -
    299.                         $arResultRow[$strVarName'';
    300. -
    301.                     else {
    302. -
    303.                         $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    304. -
    305.                         $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    306. -
    307.                         $arResultRow[$strVarName$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    308. -
    309.                     }
    310. -
    311.                 }
    312. -
    313.                 $arResult[$arResultRow;
    314. -
    315.             }
    316. -
    317.         }
    318. -
    319.  
    320. -
    321.  
    322. -
    323.         $arSM $this->query->getSolutionModifier();
    324. -
    325.  
    326. -
    327.         return
    328. -
    329.             $strHeadXml
    330. -
    331.             . '  <results ordered="'
    332. -
    333.                 . self::getSpokenBoolean($arSM['order by'!== null)
    334. -
    335.                 . '" distinct="'
    336. -
    337.                 . self::getSpokenBoolean($strResultForm == 'select distinct')
    338. -
    339.                 . '">' "\n"
    340. -
    341.             . $this->getResultXml($arResult)
    342. -
    343.             . "  </results>\n";
    344. -
    345.     }//protected function createFromRecords($arRecordSets)
    346. -
    347.  
    348. -
    349.  
    350. -
    351.  
    352. -
    353.     protected function getResultXml($arResult)
    354. -
    355.     {
    356. -
    357.         $strCode '';
    358. -
    359.         foreach ($arResult as $arSet{
    360. -
    361.             $strCode .= "    <result>\n";
    362. -
    363.             foreach ($arSet as $strVarName => $strValue{
    364. -
    365.                 if ($strValue !== null{
    366. -
    367.                     $strCode .= '      <binding name="' $strVarName '">'
    368. -
    369.                         . $strValue
    370. -
    371.                         . "</binding>\n";
    372. -
    373.                 }
    374. -
    375.             }
    376. -
    377.             $strCode .= "    </result>\n";
    378. -
    379.         }
    380. -
    381.         return $strCode;
    382. -
    383.     }//protected function getResultXml($arResult)
    384. -
    385.  
    386. -
    387.  
    388. -
    389.  
    390. -
    391.     protected static function getSpokenBoolean($b)
    392. -
    393.     {
    394. -
    395.         return $b 'true' 'false';
    396. -
    397.     }//protected static function getSpokenBoolean($b)
    398. -
    399.  
    400. -
    401.  
    402. -
    403.  
    404. -
    405.     /**
    406. -
    407.     *   Creates an RDF subject object
    408. -
    409.     *   contained in the given $dbRecordSet object.
    410. -
    411.     *
    412. -
    413.     *   @see convertFromDbResult() to understand $strVarBase necessity
    414. -
    415.     *
    416. -
    417.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    418. -
    419.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    420. -
    421.     *
    422. -
    423.     *   @return string HTML code
    424. -
    425.     */
    426. -
    427.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    428. -
    429.     {
    430. -
    431.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    432. -
    433.             return $this->getXmlNull();
    434. -
    435.         }
    436. -
    437.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    438. -
    439.             //null should be predicate which is always a resource
    440. -
    441.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    442. -
    443.         {
    444. -
    445.             return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    446. -
    447.         else {
    448. -
    449.             return $this->getXmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    450. -
    451.         }
    452. -
    453.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    454. -
    455.  
    456. -
    457.  
    458. -
    459.  
    460. -
    461.     /**
    462. -
    463.     *   Creates an RDF predicate object
    464. -
    465.     *   contained in the given $dbRecordSet object.
    466. -
    467.     *
    468. -
    469.     *   @see convertFromDbResult() to understand $strVarBase necessity
    470. -
    471.     *
    472. -
    473.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    474. -
    475.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    476. -
    477.     *
    478. -
    479.     *   @return string HTML code
    480. -
    481.     */
    482. -
    483.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    484. -
    485.     {
    486. -
    487.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    488. -
    489.             return $this->getXmlNull();
    490. -
    491.         }
    492. -
    493.  
    494. -
    495.         return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    496. -
    497.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    498. -
    499.  
    500. -
    501.  
    502. -
    503.  
    504. -
    505.     /**
    506. -
    507.     *   Creates an RDF object object
    508. -
    509.     *   contained in the given $dbRecordSet object.
    510. -
    511.     *
    512. -
    513.     *   @see convertFromDbResult() to understand $strVarBase necessity
    514. -
    515.     *
    516. -
    517.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    518. -
    519.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    520. -
    521.     *
    522. -
    523.     *   @return string HTML code
    524. -
    525.     */
    526. -
    527.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    528. -
    529.     {
    530. -
    531.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    532. -
    533.             return $this->getXmlNull();
    534. -
    535.         }
    536. -
    537.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    538. -
    539.             case 'r':
    540. -
    541.                 return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    542. -
    543.                 break;
    544. -
    545.             case 'b':
    546. -
    547.                 return $this->getXmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    548. -
    549.                 break;
    550. -
    551.             default:
    552. -
    553.                 return $this->getXmlLiteral(
    554. -
    555.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    556. -
    557.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']],
    558. -
    559.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]
    560. -
    561.                 );
    562. -
    563.         }
    564. -
    565.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    566. -
    567.  
    568. -
    569.  
    570. -
    571.  
    572. -
    573.     protected function getXmlNull()
    574. -
    575.     {
    576. -
    577.         return null;
    578. -
    579.     }//protected function getHtmlNull()
    580. -
    581.  
    582. -
    583.  
    584. -
    585.  
    586. -
    587.     protected function getXmlBlank($value)
    588. -
    589.     {
    590. -
    591.         return '<bnode>' $value '</bnode>';
    592. -
    593.     }//protected function getHtmlBlank($value)
    594. -
    595.  
    596. -
    597.  
    598. -
    599.  
    600. -
    601.     protected function getXmlResource($value)
    602. -
    603.     {
    604. -
    605.         return '<uri>' htmlspecialchars($value'</uri>';
    606. -
    607.     }//protected function getHtmlResource($value)
    608. -
    609.  
    610. -
    611.  
    612. -
    613.  
    614. -
    615.     protected function getXmlLiteral($value$language$datatype)
    616. -
    617.     {
    618. -
    619.         $strCode '<literal';
    620. -
    621.         if ($language{
    622. -
    623.             $strCode ' xml:lang="' $language '"';
    624. -
    625.         }
    626. -
    627.         if ($datatype{
    628. -
    629.             $strCode ' datatype="' $datatype '"';
    630. -
    631.         }
    632. -
    633.         $strCode .= '>' htmlspecialchars($value'</literal>';
    634. -
    635.         return $strCode;
    636. -
    637.     }//protected function getHtmlLiteral($value, $language, $datatype)
    638. -
    639.  
    640. -
    641. }//class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
    642. -
    643.  
    644. -
    645. ?>
    646. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base deleted file mode 100755 index 9ed1d1aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html.svn-base +++ /dev/null @@ -1,915 +0,0 @@ - - - - - - File Source for SqlGenerator.php - - - - - -

    Source for file SqlGenerator.php

    -

    Documentation is available at SqlGenerator.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/TypeSorter.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/FilterGenerator.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGeneratorException.php';
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. *   Creates sql statements from a Query object
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     public $query = null;
    29. -
    30.  
    31. -
    32.     /**
    33. -
    34.     *   Determines which variables can be found
    35. -
    36.     *   in which SQL result column.
    37. -
    38.     *   @example
    39. -
    40.     *    array(
    41. -
    42.     *        '?person' => array('t1', 's'),
    43. -
    44.     '       '?p'      => array('t1', 'p'),
    45. -
    46.     *        '?mbox'   => array('t2', 'o')
    47. -
    48.     *    )
    49. -
    50.     *    Would express that variable ?person is the subject
    51. -
    52.     *    in result table t1, and ?mbox is the object in
    53. -
    54.     *    table t2.
    55. -
    56.     *
    57. -
    58.     *   @see $arCreationMethods
    59. -
    60.     *
    61. -
    62.     *   @internal The array is created in createSql()
    63. -
    64.     *    and used in convertFromDbResult().
    65. -
    66.     *
    67. -
    68.     *   @var array 
    69. -
    70.     */
    71. -
    72.     public $arVarAssignments = array();
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     *   Array of variable name => table.col assignments
    79. -
    80.     *   for all variables used in the query not only
    81. -
    82.     *   the ones that shall be returned.
    83. -
    84.     *
    85. -
    86.     *   @example
    87. -
    88.     *    array(
    89. -
    90.     *        '?person'   => 't0.subject'
    91. -
    92.     *    )
    93. -
    94.     *
    95. -
    96.     *   @var array 
    97. -
    98.     */
    99. -
    100.     public $arUsedVarAssignments = array();
    101. -
    102.  
    103. -
    104.     /**
    105. -
    106.     *   Array of arrays that contain all variable names
    107. -
    108.     *   which are to be found in the result of
    109. -
    110.     *   an sql statement in a union.
    111. -
    112.     *
    113. -
    114.     *   @example
    115. -
    116.     *    array(
    117. -
    118.     *        0 => array(
    119. -
    120.     *            '?person' => 's',
    121. -
    122.     *            '?p' => 'o'
    123. -
    124.     *        ),
    125. -
    126.     *        1 => array(
    127. -
    128.     *            '?person' => 's',
    129. -
    130.     *            '?mbox' => 'o'
    131. -
    132.     *        )
    133. -
    134.     *    )
    135. -
    136.     *
    137. -
    138.     *   @var array 
    139. -
    140.     */
    141. -
    142.     public $arUnionVarAssignments = array();
    143. -
    144.  
    145. -
    146.     /**
    147. -
    148.     *   Which variables have been used as which type?
    149. -
    150.     *   key is variable name, value is an array of
    151. -
    152.     *   max. three keys (s, p, o)
    153. -
    154.     *
    155. -
    156.     *   @example
    157. -
    158.     *    array(
    159. -
    160.     *        '?person' => array(
    161. -
    162.     *            's' => true
    163. -
    164.     *        ),
    165. -
    166.     *        '?mbox' => array(
    167. -
    168.     *            'o' => true
    169. -
    170.     *        )
    171. -
    172.     *    )
    173. -
    174.     *
    175. -
    176.     *   @var array 
    177. -
    178.     */
    179. -
    180.     protected $arUsedVarTypes = array();
    181. -
    182.  
    183. -
    184.     /**
    185. -
    186.     *   Array with placeholders of prepared statements variables.
    187. -
    188.     *   key is the variable name (without "??"), value is the
    189. -
    190.     *   placeholder.
    191. -
    192.     *   @var array 
    193. -
    194.     */
    195. -
    196.     protected $arPlaceholders = array();
    197. -
    198.  
    199. -
    200.     /**
    201. -
    202.     *   Column names for subjects, predicates and
    203. -
    204.     *   objects for easy access via their character
    205. -
    206.     *   names (spo).
    207. -
    208.     *
    209. -
    210.     *   @var array 
    211. -
    212.     */
    213. -
    214.     public static $arTableColumnNames array(
    215. -
    216.         's' => array(
    217. -
    218.             'value' => 'subject',
    219. -
    220.             'is'    => 'subject_is'
    221. -
    222.         ),
    223. -
    224.         'p' => array(
    225. -
    226.             'value' => 'predicate'
    227. -
    228.         ),
    229. -
    230.         'o' => array(
    231. -
    232.             'value' => 'object',
    233. -
    234.             'is'    => 'object_is'
    235. -
    236.         )
    237. -
    238.     );
    239. -
    240.  
    241. -
    242.     /**
    243. -
    244.     *   Current UNION part number
    245. -
    246.     *   @var int 
    247. -
    248.     */
    249. -
    250.     protected $nUnionCount = 0;
    251. -
    252.  
    253. -
    254.     protected $nSqlVariableNameCount = 0;
    255. -
    256.  
    257. -
    258.  
    259. -
    260.  
    261. -
    262.     public function __construct(Query $queryADOConnection $dbConn$modelID)
    263. -
    264.     {
    265. -
    266.         $this->query   = $query;
    267. -
    268.         $this->dbConn  $dbConn;
    269. -
    270.         $this->modelID $modelID;
    271. -
    272.     }//public function __construct(Query $query, ADOConnection $dbConn, $modelID)
    273. -
    274.  
    275. -
    276.  
    277. -
    278.  
    279. -
    280.     /**
    281. -
    282.     *   Creates an SQL query string from the given Sparql query object.
    283. -
    284.     *
    285. -
    286.     *   @internal uses $query variable
    287. -
    288.     *
    289. -
    290.     *   @return array       Array of arrays of SQL query string parts: select, from and where
    291. -
    292.     *
    293. -
    294.     *   @throws SparqlEngineDb_SqlGeneratorException   If there is no variable in the result set.
    295. -
    296.     */
    297. -
    298.     function createSql()
    299. -
    300.     {
    301. -
    302. //var_dump($this->query);
    303. -
    304.         $arSelect   array();
    305. -
    306.         $arFrom     array();
    307. -
    308.         $arWhere    array();
    309. -
    310.  
    311. -
    312.         $strResultForm $this->query->getResultForm();
    313. -
    314.         $filterGen     new SparqlEngineDb_FilterGenerator($this);
    315. -
    316.         switch ($strResultForm{
    317. -
    318.             case 'construct':
    319. -
    320.                 $arResultVars $this->query->getConstructPatternVariables();
    321. -
    322.                 break;
    323. -
    324.             default:
    325. -
    326.                 $arResultVars $this->query->getResultVars();
    327. -
    328.                 break;
    329. -
    330.         }
    331. -
    332.  
    333. -
    334.         $this->nTableId                 0;
    335. -
    336.         $this->nGraphPatternCount       0;
    337. -
    338.         $this->nUnionCount              = 0;
    339. -
    340.         $this->nUnionTriplePatternCount 0;
    341. -
    342.         $this->arUnionVarAssignments[0array();
    343. -
    344.  
    345. -
    346.         foreach ($this->query->getResultPart(as $graphPattern{
    347. -
    348.             if (self::isEmptyPattern($graphPattern)) {
    349. -
    350.                 continue;
    351. -
    352.             }
    353. -
    354.             if ($graphPattern->getUnion(!== null{
    355. -
    356.                 ++$this->nUnionCount;
    357. -
    358.                 $this->nUnionTriplePatternCount 0;
    359. -
    360.                 $this->nGraphPatternCount 0;
    361. -
    362.                 $this->arUnionVarAssignments[$this->nUnionCountarray();
    363. -
    364.             }
    365. -
    366.             $this->nTriplePatternCount 0;
    367. -
    368.             $arTriplePattern $graphPattern->getTriplePattern();
    369. -
    370.             if ($arTriplePattern != null{
    371. -
    372.                 foreach ($arTriplePattern as $triplePattern{
    373. -
    374.                     list (
    375. -
    376.                         $arSelect[$this->nUnionCount][],
    377. -
    378.                         $arFrom  [$this->nUnionCount][],
    379. -
    380.                         $arWhere [$this->nUnionCount][]
    381. -
    382.                     =
    383. -
    384.                         $this->getTripleSql(
    385. -
    386.                             $triplePattern,
    387. -
    388.                             $graphPattern,
    389. -
    390.                             $arResultVars
    391. -
    392.                         );
    393. -
    394.                     ++$this->nTableId;
    395. -
    396.                     ++$this->nTriplePatternCount;
    397. -
    398.                     ++$this->nUnionTriplePatternCount;
    399. -
    400.                 }
    401. -
    402.             }
    403. -
    404.             ++$this->nGraphPatternCount;
    405. -
    406.  
    407. -
    408.         }
    409. -
    410.  
    411. -
    412.         //constraints extra. needed, since OPTIONAL parts are put after
    413. -
    414.         // the current pattern while the constraint already refers to variables
    415. -
    416.         // defined in there
    417. -
    418.         $this->nGraphPatternCount       0;
    419. -
    420.         $this->nUnionCount              = 0;
    421. -
    422.         foreach ($this->query->getResultPart(as $graphPattern{
    423. -
    424.             if ($graphPattern->getUnion(!== null{
    425. -
    426.                 ++$this->nUnionCount;
    427. -
    428.             }
    429. -
    430.             $arConstraints $graphPattern->getConstraint();
    431. -
    432.             if ($arConstraints != null{
    433. -
    434.                 foreach ($arConstraints as $constraint{
    435. -
    436.                     $arWhere[$this->nUnionCount][count($arWhere[$this->nUnionCount]1]
    437. -
    438.                      .= $filterGen->createFilterSql(
    439. -
    440.                         $constraint->getTree(),
    441. -
    442.                         $graphPattern->getOptional(!== null,
    443. -
    444.                         $this->nUnionCount
    445. -
    446.                     );
    447. -
    448.                 }
    449. -
    450.             }
    451. -
    452.             ++$this->nGraphPatternCount;
    453. -
    454.         }
    455. -
    456.  
    457. -
    458.         $arSelect    $this->createEqualSelects($arSelect);
    459. -
    460.         $arStrSelect array();
    461. -
    462.  
    463. -
    464.         switch ($strResultForm{
    465. -
    466.             case 'construct':
    467. -
    468.             case 'describe':
    469. -
    470.                 $strSelectType 'SELECT';
    471. -
    472.             case 'select':
    473. -
    474.             case 'select distinct':
    475. -
    476.                 if (!isset($strSelectType)) {
    477. -
    478.                     $strSelectType $strResultForm;
    479. -
    480.                 }
    481. -
    482.                 foreach ($arSelect as $nUnionCount => $arSelectPart{
    483. -
    484.                     $arSelectPart self::removeNull($arSelectPart);
    485. -
    486.                     if (count($arSelectPart== 0{
    487. -
    488.                         throw new SparqlEngineDb_SqlGeneratorException('No variable that could be returned.');
    489. -
    490.                     }
    491. -
    492.                     $arStrSelect[$nUnionCountstrtoupper($strSelectType' ' implode(', '   $arSelectPart);
    493. -
    494.                 }
    495. -
    496.                 break;
    497. -
    498.  
    499. -
    500.             case 'ask':
    501. -
    502.             case 'count':
    503. -
    504.                 $strSelect 'SELECT COUNT(*) as count';
    505. -
    506.                 break;
    507. -
    508.  
    509. -
    510.             default:
    511. -
    512.                 throw new SparqlEngineDb_SqlGeneratorException('Unsupported query type "' $strResultForm '"');
    513. -
    514.                 break;
    515. -
    516.         }
    517. -
    518.  
    519. -
    520.         $arSqls array();
    521. -
    522.         foreach ($arSelect as $nUnionCount => $arSelectPart{
    523. -
    524.             $arSqls[array(
    525. -
    526.                 'select'    => $arStrSelect[$nUnionCount],
    527. -
    528.                 'from'      => ' FROM '  implode(' '    self::removeNull($arFrom[$nUnionCount])),
    529. -
    530.                 'where'     => ' WHERE ' self::fixWhere(
    531. -
    532.                             implode(' '  self::removeNull($arWhere[$nUnionCount]))
    533. -
    534.                 )
    535. -
    536.             );
    537. -
    538.         }
    539. -
    540.         return $arSqls;
    541. -
    542.     }//function createSql()
    543. -
    544.  
    545. -
    546.  
    547. -
    548.  
    549. -
    550.     /**
    551. -
    552.     *   Creates some SQL statements from the given triple pattern
    553. -
    554.     *   array.
    555. -
    556.     *
    557. -
    558.     *   @param QueryTriple  $triple                 Array containing subject, predicate and object
    559. -
    560.     *   @param GraphPattern $graphPattern           Graph pattern object
    561. -
    562.     *
    563. -
    564.     *   @return array   Array consisting of on array and two string values:
    565. -
    566.     *                    SELECT, FROM and WHERE part
    567. -
    568.     */
    569. -
    570.     function getTripleSql(QueryTriple $tripleGraphPattern $graphPattern$arResultVars)
    571. -
    572.     {
    573. -
    574.         $arSelect  array();
    575. -
    576.         $strFrom    null;
    577. -
    578.         $strWhere   null;
    579. -
    580.         $strWhereEquality   '';
    581. -
    582.  
    583. -
    584.         $subject    $triple->getSubject();
    585. -
    586.         $predicate  $triple->getPredicate();
    587. -
    588.         $object     $triple->getObject();
    589. -
    590.  
    591. -
    592.         $arRefVars      array();
    593. -
    594.         $strTablePrefix 't' $this->nTableId;
    595. -
    596.  
    597. -
    598.         /**
    599. -
    600.         *   SELECT part
    601. -
    602.         *   We do select only the columns we need for variables
    603. -
    604.         */
    605. -
    606.         if (self::isVariable($subject)) {
    607. -
    608.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$subject])) {
    609. -
    610.                 //already selected -> add equality check
    611. -
    612.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    613. -
    614.                                 array($strTablePrefix's'),
    615. -
    616.                                 $this->arVarAssignments[$subject]
    617. -
    618.                             );
    619. -
    620.                 $this->arUsedVarTypes[$subject]['s'true;
    621. -
    622.             else {
    623. -
    624.                 if (isset($this->arVarAssignments[$subject][0])) {
    625. -
    626.                     $strTablePrefix $this->arVarAssignments[$subject][0];
    627. -
    628.                 }
    629. -
    630.                 $this->arVarAssignments[$subjectarray($strTablePrefix's');
    631. -
    632.                 $this->arUnionVarAssignments[$this->nUnionCount][$subjectarray($strTablePrefix's');
    633. -
    634.                 $this->arUsedVarTypes[$subject]['s'true;
    635. -
    636.                 if (self::isResultVar($subject$arResultVars)) {
    637. -
    638.                     //new variable that needs to be selected
    639. -
    640.                     $arSelect[$subjectarray(
    641. -
    642.                         $strTablePrefix '.subject as "'    $strTablePrefix '.' $this->getSqlVariableNameValue($subject'"',
    643. -
    644.                         $strTablePrefix '.subject_is as "' $strTablePrefix '.' $this->getSqlVariableNameIs($subject'"'
    645. -
    646.                     );
    647. -
    648.                     if (isset($this->arUsedVarAssignments[$subject])) {
    649. -
    650.                         $arRefVars[$subject$strTablePrefix '.subject';
    651. -
    652.                     else {
    653. -
    654.                         $this->arUsedVarAssignments[$subject$strTablePrefix '.subject';
    655. -
    656.                     }
    657. -
    658.                 }
    659. -
    660.             }
    661. -
    662.         }
    663. -
    664.  
    665. -
    666.         if (self::isVariable($predicate)) {
    667. -
    668.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$predicate])) {
    669. -
    670.                 //already selected -> add equality check
    671. -
    672.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    673. -
    674.                                 array($strTablePrefix'p'),
    675. -
    676.                                 $this->arVarAssignments[$predicate]
    677. -
    678.                             );
    679. -
    680.                 $this->arUsedVarTypes[$predicate]['p'true;
    681. -
    682.             else {
    683. -
    684.                 if (isset($this->arVarAssignments[$predicate][0])) {
    685. -
    686.                     $strTablePrefix $this->arVarAssignments[$predicate][0];
    687. -
    688.                 }
    689. -
    690.                 $this->arVarAssignments[$predicatearray($strTablePrefix'p');
    691. -
    692.                 $this->arUnionVarAssignments[$this->nUnionCount][$predicatearray($strTablePrefix'p');
    693. -
    694.                 $this->arUsedVarTypes[$predicate]['p'true;
    695. -
    696.                 if (self::isResultVar($predicate$arResultVars)) {
    697. -
    698.                     $arSelect[$predicatearray(
    699. -
    700.                         $strTablePrefix '.predicate as "' $strTablePrefix '.' $this->getSqlVariableNameValue($predicate'"'
    701. -
    702.                     );
    703. -
    704.                     if (isset($this->arUsedVarAssignments[$predicate])) {
    705. -
    706.                         $arRefVars[$predicate$strTablePrefix '.predicate';
    707. -
    708.                     else {
    709. -
    710.                         $this->arUsedVarAssignments[$predicate$strTablePrefix '.predicate';
    711. -
    712.                     }
    713. -
    714.                 }
    715. -
    716.             }
    717. -
    718.         }
    719. -
    720.  
    721. -
    722.         if (self::isVariable($object)) {
    723. -
    724.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$object])) {
    725. -
    726.                 //already selected -> add equality check
    727. -
    728.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    729. -
    730.                                 array($strTablePrefix'o'),
    731. -
    732.                                 $this->arVarAssignments[$object]
    733. -
    734.                             );
    735. -
    736.                 $this->arUsedVarTypes[$object]['o'true;
    737. -
    738.             else {
    739. -
    740.                 if (isset($this->arVarAssignments[$object][0])) {
    741. -
    742.                     $strTablePrefix $this->arVarAssignments[$object][0];
    743. -
    744.                 }
    745. -
    746.                 $this->arVarAssignments[$objectarray($strTablePrefix'o');
    747. -
    748.                 $this->arUnionVarAssignments[$this->nUnionCount][$objectarray($strTablePrefix'o');
    749. -
    750.                 $this->arUsedVarTypes[$object]['o'true;
    751. -
    752.                 if (self::isResultVar($object$arResultVars)) {
    753. -
    754.                     $arSelect[$objectarray(
    755. -
    756.                         $strTablePrefix '.object as "'     $strTablePrefix '.' $this->getSqlVariableNameValue($object'"',
    757. -
    758.                         $strTablePrefix '.object_is as "'  $strTablePrefix '.' $this->getSqlVariableNameIs($object'"',
    759. -
    760.                         $strTablePrefix '.l_language as "' $strTablePrefix '.' $this->getSqlVariableNameLanguage($object'"',
    761. -
    762.                         $strTablePrefix '.l_datatype as "' $strTablePrefix '.' $this->getSqlVariableNameDatatype($object'"',
    763. -
    764.                     );
    765. -
    766.                     if (isset($this->arUsedVarAssignments[$object])) {
    767. -
    768.                         $arRefVars[$object$strTablePrefix '.object';
    769. -
    770.                     else {
    771. -
    772.                         $this->arUsedVarAssignments[$object$strTablePrefix '.object';
    773. -
    774.                     }
    775. -
    776.                 }
    777. -
    778.                 if (isset($this->query->varLanguages[$object])
    779. -
    780.                  && $this->query->varLanguages[$object!== null
    781. -
    782.                 {
    783. -
    784.                     $strWhereEquality .=
    785. -
    786.                         ' AND ' $strTablePrefix '.l_language = "'
    787. -
    788.                         . addslashes($this->query->varLanguages[$object]'"';
    789. -
    790.                 }
    791. -
    792.                 if (isset($this->query->varDatatypes[$object])
    793. -
    794.                  && $this->query->varDatatypes[$object!== null
    795. -
    796.                 {
    797. -
    798.                     $strWhereEquality .=
    799. -
    800.                         ' AND ' $strTablePrefix '.l_datatype = "'
    801. -
    802.                         . addslashes($this->query->varDatatypes[$object]'"';
    803. -
    804.                 }
    805. -
    806.             }
    807. -
    808.         }
    809. -
    810.  
    811. -
    812.         /**
    813. -
    814.         *   FROM part
    815. -
    816.         */
    817. -
    818.         if ($this->nUnionTriplePatternCount == 0{
    819. -
    820.             //first FROM
    821. -
    822.             $strFrom    'statements as ' $strTablePrefix;
    823. -
    824.         else {
    825. -
    826.             //normal join
    827. -
    828.             $strFrom    'LEFT JOIN statements as ' $strTablePrefix
    829. -
    830.                         . ' ON t0.modelID = ' $strTablePrefix '.modelID';
    831. -
    832.             foreach ($arRefVars as $strRefVar => $strSqlVar{
    833. -
    834.                 $strFrom .= ' AND ' $this->arUsedVarAssignments[$strRefVar' = ' $strSqlVar;
    835. -
    836.             }
    837. -
    838.  
    839. -
    840.             if ($graphPattern->getOptional(!== null{
    841. -
    842.                 $strFrom .=  $this->getSqlCondition($subject  $strTablePrefix'subject')
    843. -
    844.                            . $this->getSqlCondition($predicate$strTablePrefix'predicate')
    845. -
    846.                            . $this->getSqlCondition($object   $strTablePrefix'object')
    847. -
    848.                            . $strWhereEquality;
    849. -
    850.             }
    851. -
    852.         }
    853. -
    854.  
    855. -
    856.  
    857. -
    858.         /**
    859. -
    860.         *   WHERE part
    861. -
    862.         */
    863. -
    864.         if ($this->nUnionTriplePatternCount == 0{
    865. -
    866.             $strWhere  $strTablePrefix '.modelID = ' intval($this->modelID);
    867. -
    868.         }
    869. -
    870.         if ($graphPattern->getOptional(=== null || $this->nGraphPatternCount == 0{
    871. -
    872.             $strWhere .=  $this->getSqlCondition($subject  $strTablePrefix'subject')
    873. -
    874.                         . $this->getSqlCondition($predicate$strTablePrefix'predicate')
    875. -
    876.                         . $this->getSqlCondition($object   $strTablePrefix'object')
    877. -
    878.                         . $strWhereEquality;
    879. -
    880.         }
    881. -
    882.  
    883. -
    884.         return array($arSelect$strFrom$strWhere);
    885. -
    886.     }//function getTripleSql(QueryTriple $triple)
    887. -
    888.  
    889. -
    890.  
    891. -
    892.  
    893. -
    894.     /**
    895. -
    896.     *   Creates SELECT statements that have the same number of columns.
    897. -
    898.     *   Needed for UNIONs.
    899. -
    900.     *
    901. -
    902.     *   @param array $arSelect  Array of arrays.
    903. -
    904.     *        array(
    905. -
    906.     *            //for each union part one
    907. -
    908.     *            0 => array(
    909. -
    910.     *                //foreach triple pattern
    911. -
    912.     *                0 => array(
    913. -
    914.     *                    '?person'   => array(
    915. -
    916.     *                        't0.subject as "t0.subject"'
    917. -
    918.     *                    )
    919. -
    920.     *                )
    921. -
    922.     *            )
    923. -
    924.     *        )
    925. -
    926.     *   @return array Array of SELECT strings
    927. -
    928.     */
    929. -
    930.     protected function createEqualSelects($arSelect)
    931. -
    932.     {
    933. -
    934.         $arNewSelect array();
    935. -
    936.         if (count($arSelect== 1{
    937. -
    938.             foreach ($arSelect[0as $arTripleVars{
    939. -
    940.                 $ar array();
    941. -
    942.                 foreach ($arTripleVars as $arVarParts{
    943. -
    944.                     $ar[implode(', '$arVarParts);
    945. -
    946.                 }
    947. -
    948.                 if (count($ar0{
    949. -
    950.                     $arNewSelect[0][implode(', '$ar);
    951. -
    952.                 }
    953. -
    954.             }
    955. -
    956.             return $arNewSelect;
    957. -
    958.         }
    959. -
    960.  
    961. -
    962.         $arVars array();
    963. -
    964.          foreach ($arSelect as $arUnionVars{
    965. -
    966.             foreach ($arUnionVars as $arTripleVars{
    967. -
    968.                 $arVars array_merge($arVarsarray_keys($arTripleVars));
    969. -
    970.             }
    971. -
    972.         }
    973. -
    974.         $arVars array_unique($arVars);
    975. -
    976.  
    977. -
    978.         foreach ($arSelect as $nUnionCount => $arUnionVars{
    979. -
    980.             $arSelectVars array();
    981. -
    982.             foreach ($arUnionVars as $arTripleVars{
    983. -
    984.                 foreach ($arTripleVars as $strVar => $arVarParts{
    985. -
    986.                     $arSelectVars[$strVar$arVarParts;
    987. -
    988.                 }
    989. -
    990.             }
    991. -
    992.  
    993. -
    994.             $ars array();
    995. -
    996.             foreach ($arVars as $strVar{
    997. -
    998.                 if (isset($arSelectVars[$strVar])) {
    999. -
    1000.                     $ar     $arSelectVars[$strVar];
    1001. -
    1002.                     $nCount count($arSelectVars[$strVar]);
    1003. -
    1004.                 else {
    1005. -
    1006.                     $ar     array();
    1007. -
    1008.                     $nCount 0;
    1009. -
    1010.                 }
    1011. -
    1012.  
    1013. -
    1014.                 if ($nCount == 0{
    1015. -
    1016.                     //nothing of this variable in this union part
    1017. -
    1018.                     $ar['NULL as '
    1019. -
    1020.                         . '"' $this->arVarAssignments[$strVar][0'.' $this->arVarAssignments[$strVar]['sql_value''"';
    1021. -
    1022.                 }
    1023. -
    1024.                 if ((
    1025. -
    1026.                     isset($this->arUsedVarTypes[$strVar]['o'])
    1027. -
    1028.                     || isset($this->arUsedVarTypes[$strVar]['s'])
    1029. -
    1030.                     && $nCount 2
    1031. -
    1032.                 {
    1033. -
    1034.                     //it's a subject or object, but we don't want the type
    1035. -
    1036.                     $ar['NULL as '
    1037. -
    1038.                         . '"' $this->arVarAssignments[$strVar][0'.' $this->arVarAssignments[$strVar]['sql_is''"';
    1039. -
    1040.                 }
    1041. -
    1042.                 if (isset($this->arUsedVarTypes[$strVar]['o']&& $nCount 4{
    1043. -
    1044.                     //it's a subject or object, but we don't want the type
    1045. -
    1046.                     if (isset($this->arVarAssignments[$strVar]['sql_lang'])) {
    1047. -
    1048.                         $strColLanguage $this->arVarAssignments[$strVar]['sql_lang'];
    1049. -
    1050.                     else {
    1051. -
    1052.                         $strColLanguage 'dummyLang';
    1053. -
    1054.                     }
    1055. -
    1056.                     if (isset($this->arVarAssignments[$strVar]['sql_type'])) {
    1057. -
    1058.                         $strColDatatype $this->arVarAssignments[$strVar]['sql_type'];
    1059. -
    1060.                     else {
    1061. -
    1062.                         $strColDatatype 'dummyType';
    1063. -
    1064.                     }
    1065. -
    1066.                     $ar['NULL as '
    1067. -
    1068.                         . '"' $this->arVarAssignments[$strVar][0'.' $strColLanguage '"';
    1069. -
    1070.                     $ar['NULL as '
    1071. -
    1072.                         . '"' $this->arVarAssignments[$strVar][0'.' $strColDatatype '"';
    1073. -
    1074.                 }
    1075. -
    1076.                 $ars[implode(', '$ar);
    1077. -
    1078.             }
    1079. -
    1080.             $arNewSelect[$nUnionCount$ars;
    1081. -
    1082.         }
    1083. -
    1084.  
    1085. -
    1086.         return $arNewSelect;
    1087. -
    1088.     }//protected function createEqualSelects($arSelect)
    1089. -
    1090.  
    1091. -
    1092.  
    1093. -
    1094.  
    1095. -
    1096.     /**
    1097. -
    1098.     *   Creates an SQL statement that checks for the value
    1099. -
    1100.     *   of some subject/predicate/object
    1101. -
    1102.     *
    1103. -
    1104.     *   @param mixed    $bject          subject|predicate|object
    1105. -
    1106.     *   @param string   $strTablePrefix Table prefix (e.g. "t0")
    1107. -
    1108.     *   @param string   $strType        Type of $bject ('subject'|'predicate'|'object')
    1109. -
    1110.     *   @return string  Part of the SQL query (prefixed with AND)
    1111. -
    1112.     */
    1113. -
    1114.     function getSqlCondition($bject$strTablePrefix$strType)
    1115. -
    1116.     {
    1117. -
    1118.         if (is_string($bject)) {
    1119. -
    1120.             if (self::isVariable($bject)) {
    1121. -
    1122.                 //variable?
    1123. -
    1124.                 if (self::isPreparedVariable($bject)) {
    1125. -
    1126.                     //no, not really
    1127. -
    1128.                     $value $this->getPreparedVariablePlaceholder($bject);
    1129. -
    1130.                 else {
    1131. -
    1132.                     //yes
    1133. -
    1134.                     return null;
    1135. -
    1136.                 }
    1137. -
    1138.             else {
    1139. -
    1140.                 $value $this->dbConn->qstr($bject);
    1141. -
    1142.             }
    1143. -
    1144.             //literal
    1145. -
    1146.             return ' AND ' $strTablePrefix '.' $strType ' = ' $value;
    1147. -
    1148.         }
    1149. -
    1150.  
    1151. -
    1152.         if ($bject instanceof BlankNode{
    1153. -
    1154.             //Blank node
    1155. -
    1156.             throw new SparqlEngineDb_SqlGeneratorException(
    1157. -
    1158.                 'FIXME: Querying for blank nodes not supported'
    1159. -
    1160.             );
    1161. -
    1162.  
    1163. -
    1164.         else if ($bject instanceof Resource{
    1165. -
    1166.             //Resource
    1167. -
    1168.             $r ' AND ' $strTablePrefix '.' $strType ' = '
    1169. -
    1170.                 . $this->dbConn->qstr($bject->getURI());
    1171. -
    1172.             if ($strType !== 'predicate'{
    1173. -
    1174.                 $r .= ' AND ' $strTablePrefix '.' $strType '_is ='
    1175. -
    1176.                 . ' "r"';
    1177. -
    1178.             }
    1179. -
    1180.             return $r;
    1181. -
    1182.  
    1183. -
    1184.         else if ($bject instanceof Literal{
    1185. -
    1186.             //Literal
    1187. -
    1188.             //I'm doubling Filter code here, but what the hell
    1189. -
    1190.             $strColDatatype $strTablePrefix '.l_datatype';
    1191. -
    1192.             if ($bject->dtype == 'http://www.w3.org/2001/XMLSchema#integer'
    1193. -
    1194.              || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#double'
    1195. -
    1196.             {
    1197. -
    1198.                 $strVariable 'CAST(' $strTablePrefix '.' $strType ' AS DECIMAL)';
    1199. -
    1200.                 $strValue    $bject->getLabel();
    1201. -
    1202.             else {
    1203. -
    1204.                 $strVariable $strTablePrefix '.' $strType;
    1205. -
    1206.                 $strValue    $this->dbConn->qstr($bject->getLabel());
    1207. -
    1208.             }
    1209. -
    1210.             $r ' AND ' $strVariable ' = ' $strValue;
    1211. -
    1212.             if ($strType !== 'predicate'{
    1213. -
    1214.                 $r .= ' AND ' $strTablePrefix '.' $strType '_is ='
    1215. -
    1216.                 . ' "l"';
    1217. -
    1218.             }
    1219. -
    1220.  
    1221. -
    1222.             if ($strType == 'object'{
    1223. -
    1224.                 if ($bject->dtype == '' || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#string'{
    1225. -
    1226.                     //string
    1227. -
    1228.                     $r .= ' AND ('
    1229. -
    1230.                         . $strColDatatype ' = ""'
    1231. -
    1232.                         . ' OR ' $strColDatatype ' = "http://www.w3.org/2001/XMLSchema#string"'
    1233. -
    1234.                         . ')';
    1235. -
    1236.                 else {
    1237. -
    1238.                     $r .= ' AND ' $strColDatatype ' = "'
    1239. -
    1240.                         . $bject->dtype
    1241. -
    1242.                         . '"';
    1243. -
    1244.                 }
    1245. -
    1246.             }
    1247. -
    1248.  
    1249. -
    1250.             if ($bject->lang != ''{
    1251. -
    1252.                 $strColLanguage $strTablePrefix '.l_language';
    1253. -
    1254.                 $r .= ' AND ' $strColLanguage ' = '
    1255. -
    1256.                    . $this->dbConn->qstr($bject->lang);
    1257. -
    1258.             }
    1259. -
    1260.             return $r;
    1261. -
    1262.  
    1263. -
    1264.         else {
    1265. -
    1266.             throw new SparqlEngineDb_SqlGeneratorException(
    1267. -
    1268.                 'Unsupported sentence part: ' get_class($bject)
    1269. -
    1270.             );
    1271. -
    1272.         }
    1273. -
    1274.     }//function getSqlCondition($bject, $strTablePrefix, $strType)
    1275. -
    1276.  
    1277. -
    1278.  
    1279. -
    1280.  
    1281. -
    1282.     /**
    1283. -
    1284.     *   Checks if the sentence part (subject, predicate or object) in
    1285. -
    1286.     *   $arNew has the same content as $arOld.
    1287. -
    1288.     *   Required for queries like ":x ?a ?a" where predicate and object
    1289. -
    1290.     *   need to have the same value
    1291. -
    1292.     *
    1293. -
    1294.     *   @param array    $arNew  array($strTablePrefix, $strType = s|p|o)
    1295. -
    1296.     *   @param array    $arOld  array($strTablePrefix, $strType = s|p|o)
    1297. -
    1298.     *   @return string 
    1299. -
    1300.     */
    1301. -
    1302.     protected static function getSqlEqualityCondition($arNew$arOld)
    1303. -
    1304.     {
    1305. -
    1306.         $chTypeNew         $arNew[1]$chTypeOld         $arOld[1];
    1307. -
    1308.         $strTablePrefixNew $arNew[0]$strTablePrefixOld $arOld[0];
    1309. -
    1310.  
    1311. -
    1312.         if ($chTypeNew == 'p' || $chTypeOld == 'p'{
    1313. -
    1314.             //just check value
    1315. -
    1316.             //FIXME: it might be I need to check for resource type in object and subject
    1317. -
    1318.             return
    1319. -
    1320.                   $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['value']
    1321. -
    1322.                 . ' = '
    1323. -
    1324.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['value']
    1325. -
    1326.                 ;
    1327. -
    1328.         else if ($chTypeNew == 's' || $chTypeOld == 's'{
    1329. -
    1330.             //check value and type
    1331. -
    1332.             return
    1333. -
    1334.                   $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['value']
    1335. -
    1336.                 . ' = '
    1337. -
    1338.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['value']
    1339. -
    1340.                 . ' AND '
    1341. -
    1342.                 . $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['is']
    1343. -
    1344.                 . ' = '
    1345. -
    1346.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['is']
    1347. -
    1348.                 ;
    1349. -
    1350.         else {
    1351. -
    1352.             //two objects -> check everything
    1353. -
    1354.             return
    1355. -
    1356.                   $strTablePrefixNew '.object = '     $strTablePrefixOld '.object'
    1357. -
    1358.                 . ' AND '
    1359. -
    1360.                 . $strTablePrefixNew '.object_is = '  $strTablePrefixOld '.object_is'
    1361. -
    1362.                 . ' AND '
    1363. -
    1364.                 . $strTablePrefixNew '.l_language = ' $strTablePrefixOld '.l_language'
    1365. -
    1366.                 . ' AND '
    1367. -
    1368.                 . $strTablePrefixNew '.l_datatype = ' $strTablePrefixOld '.l_datatype'
    1369. -
    1370.                 ;
    1371. -
    1372.         }
    1373. -
    1374.     }//protected static function getSqlEqualityCondition($arNew, $arOld)
    1375. -
    1376.  
    1377. -
    1378.  
    1379. -
    1380.  
    1381. -
    1382.     /**
    1383. -
    1384.     *   Checks if the given variable name is part of the result
    1385. -
    1386.     *   variables list.
    1387. -
    1388.     *   Needed since $arResultVars may contain "*" that captures all variables.
    1389. -
    1390.     *
    1391. -
    1392.     *   @param string   $strVar         Variable name (e.g. "?p")
    1393. -
    1394.     *   @param array    $arResultVars   Array with result variables
    1395. -
    1396.     *   @return boolean     true if it is a result variable
    1397. -
    1398.     */
    1399. -
    1400.     protected static function isResultVar($strVar&$arResultVars)
    1401. -
    1402.     {
    1403. -
    1404.         return in_array('*'$arResultVars|| in_array($strVar$arResultVars);
    1405. -
    1406.     }//protected static function isResultVar($strVar, &$arResultVars)
    1407. -
    1408.  
    1409. -
    1410.  
    1411. -
    1412.  
    1413. -
    1414.     /**
    1415. -
    1416.     *   Checks if the given subject/predicate/object
    1417. -
    1418.     *   is a variable name.
    1419. -
    1420.     *
    1421. -
    1422.     *   @return boolean 
    1423. -
    1424.     */
    1425. -
    1426.     public static function isVariable($bject)
    1427. -
    1428.     {
    1429. -
    1430.         return is_string($bject&& strlen($bject>= 2
    1431. -
    1432.              && ($bject[0== '?' || $bject[0== '$');
    1433. -
    1434.     }//public static function isVariable($bject)
    1435. -
    1436.  
    1437. -
    1438.  
    1439. -
    1440.  
    1441. -
    1442.     /**
    1443. -
    1444.     *   Checks if the given variable is a replacement
    1445. -
    1446.     *   for a prepared statement.
    1447. -
    1448.     *
    1449. -
    1450.     *   @return boolean 
    1451. -
    1452.     */
    1453. -
    1454.     public static function isPreparedVariable($bject)
    1455. -
    1456.     {
    1457. -
    1458.         return is_string($bject&& strlen($bject>= 3
    1459. -
    1460.              && ($bject[0== '?' || $bject[0== '$')
    1461. -
    1462.              && ($bject[1== '?' || $bject[1== '$')
    1463. -
    1464.         ;
    1465. -
    1466.     }//public static function isPreparedVariable($bject)
    1467. -
    1468.  
    1469. -
    1470.  
    1471. -
    1472.  
    1473. -
    1474.     /**
    1475. -
    1476.     *   Returns a placeholder to be included in the sql statement.
    1477. -
    1478.     *   It will be replaced with a real prepared statement variable later on.
    1479. -
    1480.     *   Also adds it to the internal placeholder array.
    1481. -
    1482.     *
    1483. -
    1484.     *   @param string $strVariable  The variable to get a placeholder for
    1485. -
    1486.     *   @return string placeholder
    1487. -
    1488.     */
    1489. -
    1490.     protected function getPreparedVariablePlaceholder($strVariable)
    1491. -
    1492.     {
    1493. -
    1494.         $strName substr($strVariable2);
    1495. -
    1496.         if (!isset($this->arPlaceholders[$strName])) {
    1497. -
    1498.             $this->arPlaceholders[$strName'@$%_PLACEHOLDER_'
    1499. -
    1500.                 . count($this->arPlaceholders'_%$@';
    1501. -
    1502.         }
    1503. -
    1504.         return $this->arPlaceholders[$strName];
    1505. -
    1506.     }//protected function getPreparedVariablePlaceholder($strVariable)
    1507. -
    1508.  
    1509. -
    1510.  
    1511. -
    1512.  
    1513. -
    1514.     public function getPlaceholders()
    1515. -
    1516.     {
    1517. -
    1518.         return $this->arPlaceholders;
    1519. -
    1520.     }//public function getPlaceholders()
    1521. -
    1522.  
    1523. -
    1524.  
    1525. -
    1526.  
    1527. -
    1528.     public function getVarAssignments()
    1529. -
    1530.     {
    1531. -
    1532.         return $this->arVarAssignments;
    1533. -
    1534.     }//public function getVarAssignments()
    1535. -
    1536.  
    1537. -
    1538.  
    1539. -
    1540.  
    1541. -
    1542.     public function getUsedVarAssignments()
    1543. -
    1544.     {
    1545. -
    1546.         return $this->arUsedVarAssignments;
    1547. -
    1548.     }//public function getUsedVarAssignments()
    1549. -
    1550.  
    1551. -
    1552.  
    1553. -
    1554.  
    1555. -
    1556.     public function getUsedVarTypes()
    1557. -
    1558.     {
    1559. -
    1560.         return $this->arUsedVarTypes;
    1561. -
    1562.     }//public function getUsedVarTypes()
    1563. -
    1564.  
    1565. -
    1566.  
    1567. -
    1568.  
    1569. -
    1570.     /**
    1571. -
    1572.     *   Checks if the graph pattern is empty (contains no
    1573. -
    1574.     *   usable data).
    1575. -
    1576.     *   Occurs when using "{}" without pre- or suffixes
    1577. -
    1578.     *   WHERE
    1579. -
    1580.     *   {
    1581. -
    1582.     *    { ?person rdf:type foaf:Person } .
    1583. -
    1584.     *   }
    1585. -
    1586.     *
    1587. -
    1588.     *   @param GraphPattern $graphPattern    Graph pattern to check
    1589. -
    1590.     *   @return boolean     True if the pattern is empty.
    1591. -
    1592.     */
    1593. -
    1594.     protected static function isEmptyPattern(GraphPattern $graphPattern)
    1595. -
    1596.     {
    1597. -
    1598.         return
    1599. -
    1600.                $graphPattern->getTriplePattern(=== false
    1601. -
    1602.             && $graphPattern->getGraphname()     === null
    1603. -
    1604.             && $graphPattern->getConstraint()    === false
    1605. -
    1606.             && $graphPattern->getOptional()      === null
    1607. -
    1608.             && $graphPattern->getUnion()         === null
    1609. -
    1610.         ;
    1611. -
    1612.     }//protected static function isEmptyPattern(GraphPattern $graphPattern)
    1613. -
    1614.  
    1615. -
    1616.  
    1617. -
    1618.  
    1619. -
    1620.     /**
    1621. -
    1622.     *   Removes all NULL values from an array and returns it.
    1623. -
    1624.     *
    1625. -
    1626.     *   @param array $array     Some array
    1627. -
    1628.     *   @return array $array without the NULL values.
    1629. -
    1630.     */
    1631. -
    1632.     protected static function removeNull($array)
    1633. -
    1634.     {
    1635. -
    1636.         foreach ($array as $key => &$value{
    1637. -
    1638.             if ($value === null{
    1639. -
    1640.                 unset($array[$key]);
    1641. -
    1642.             }
    1643. -
    1644.         }
    1645. -
    1646.         return $array;
    1647. -
    1648.     }//protected static function removeNull($array)
    1649. -
    1650.  
    1651. -
    1652.  
    1653. -
    1654.  
    1655. -
    1656.     /**
    1657. -
    1658.     *   Removes a leading AND from the where clause which would render
    1659. -
    1660.     *   the sql illegal.
    1661. -
    1662.     */
    1663. -
    1664.     protected function fixWhere($strWhere)
    1665. -
    1666.     {
    1667. -
    1668.         $strWhere ltrim($strWhere);
    1669. -
    1670.         if (substr($strWhere04== 'AND '{
    1671. -
    1672.             $strWhere substr($strWhere4);
    1673. -
    1674.         }
    1675. -
    1676.         return $strWhere;
    1677. -
    1678.     }//protected function fixWhere($strWhere)
    1679. -
    1680.  
    1681. -
    1682.  
    1683. -
    1684.  
    1685. -
    1686.     protected function getSqlVariableName($strSparqlVar)
    1687. -
    1688.     {
    1689. -
    1690.         if (!isset($this->arVarAssignments[$strSparqlVar]['sqlname'])) {
    1691. -
    1692.             if (preg_match('/[a-zA-Z0-9]+/'substr($strSparqlVar1))) {
    1693. -
    1694.                 $strName 'v_' substr($strSparqlVar1);
    1695. -
    1696.             else {
    1697. -
    1698.                 $strName 'va_' $this->nSqlVariableNameCount++;
    1699. -
    1700.             }
    1701. -
    1702.             $this->arVarAssignments[$strSparqlVar]['sqlname'$strName;
    1703. -
    1704.         }
    1705. -
    1706.         return $this->arVarAssignments[$strSparqlVar]['sqlname'];
    1707. -
    1708.     }//protected function getSqlVariableName($strSparqlVar)
    1709. -
    1710.  
    1711. -
    1712.  
    1713. -
    1714.  
    1715. -
    1716.     protected function getSqlVariableNameValue($strSparqlVar)
    1717. -
    1718.     {
    1719. -
    1720.         $this->arVarAssignments[$strSparqlVar]['sql_value'=
    1721. -
    1722.             'value_' $this->getSqlVariableName($strSparqlVar);
    1723. -
    1724.         return $this->arVarAssignments[$strSparqlVar]['sql_value'];
    1725. -
    1726.     }//protected function getSqlVariableNameValue($strSparqlVar)
    1727. -
    1728.  
    1729. -
    1730.  
    1731. -
    1732.  
    1733. -
    1734.     protected function getSqlVariableNameIs($strSparqlVar)
    1735. -
    1736.     {
    1737. -
    1738.         $this->arVarAssignments[$strSparqlVar]['sql_is'=
    1739. -
    1740.             'is_' $this->getSqlVariableName($strSparqlVar);
    1741. -
    1742.         return $this->arVarAssignments[$strSparqlVar]['sql_is'];
    1743. -
    1744.     }//protected function getSqlVariableNameIs($strSparqlVar)
    1745. -
    1746.  
    1747. -
    1748.  
    1749. -
    1750.  
    1751. -
    1752.     protected function getSqlVariableNameLanguage($strSparqlVar)
    1753. -
    1754.     {
    1755. -
    1756.         $this->arVarAssignments[$strSparqlVar]['sql_lang'=
    1757. -
    1758.             'lang_' $this->getSqlVariableName($strSparqlVar);
    1759. -
    1760.         return $this->arVarAssignments[$strSparqlVar]['sql_lang'];
    1761. -
    1762.     }//protected function getSqlVariableNameLanguage($strSparqlVar)
    1763. -
    1764.  
    1765. -
    1766.  
    1767. -
    1768.  
    1769. -
    1770.     protected function getSqlVariableNameDatatype($strSparqlVar)
    1771. -
    1772.     {
    1773. -
    1774.         $this->arVarAssignments[$strSparqlVar]['sql_type'=
    1775. -
    1776.             'type_' $this->getSqlVariableName($strSparqlVar);
    1777. -
    1778.         return $this->arVarAssignments[$strSparqlVar]['sql_type'];
    1779. -
    1780.     }//protected function getSqlVariableNameDatatype($strSparqlVar)
    1781. -
    1782.  
    1783. -
    1784. }//class SparqlEngineDb_SqlGenerator
    1785. -
    1786. ?>
    1787. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:24 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base deleted file mode 100755 index 0dad4e77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html.svn-base +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - File Source for SqlGeneratorException.php - - - - - -

    Source for file SqlGeneratorException.php

    -

    Documentation is available at SqlGeneratorException.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Exception when generating the SQL statement
    6. -
    7. *
    8. -
    9. *   @author Christian Weiske <cweiske@cweiske.de>
    10. -
    11. *
    12. -
    13. *   @package sparql
    14. -
    15. */
    16. -
    17. class SparqlEngineDb_SqlGeneratorException extends Exception
    18. -
    19. {
    20. -
    21. }
    22. -
    23.  
    24. -
    25. ?>
    26. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base deleted file mode 100755 index f2370053..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html.svn-base +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - File Source for SqlMerger.php - - - - - -

    Source for file SqlMerger.php

    -

    Documentation is available at SqlMerger.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Creates an sql string from an sql array
    8. -
    9. *
    10. -
    11. *   @author Christian Weiske <cweiske@cweiske.de>
    12. -
    13. *
    14. -
    15. *   @package sparql
    16. -
    17. */
    18. -
    19. -
    20. {
    21. -
    22.     public static function getSelect(Query $query$arSqls$strAdditional '')
    23. -
    24.     {
    25. -
    26.         if (count($arSqls== 1{
    27. -
    28.             return implode(''$arSqls[0]$strAdditional;
    29. -
    30.         }
    31. -
    32.  
    33. -
    34.         //union
    35. -
    36.         $strUnion 'UNION' .
    37. -
    38.             ($query->getResultForm(== 'select distinct' '' ' ALL');
    39. -
    40.         $ar array();
    41. -
    42.         foreach ($arSqls as $arSql{
    43. -
    44.             $ar[implode(''$arSql$strAdditional;
    45. -
    46.         }
    47. -
    48.         return '(' implode(') ' $strUnion ' ('$ar')';
    49. -
    50.     }//public static function getSelect(Query $query, $arSqls, $strAdditional = '')
    51. -
    52.  
    53. -
    54.  
    55. -
    56.  
    57. -
    58.     public static function getCount(Query $query$arSqls$strAdditional '')
    59. -
    60.     {
    61. -
    62.         if (count($arSqls== 1{
    63. -
    64.             return 'SELECT COUNT(*) as count ' $arSqls[0]['from'$arSqls[0]['where'$strAdditional;
    65. -
    66.         }
    67. -
    68.  
    69. -
    70.         $ar array();
    71. -
    72.         foreach ($arSqls as $arSql{
    73. -
    74.             $ar[implode(''$arSql$strAdditional;
    75. -
    76.         }
    77. -
    78.         return 'SELECT (' implode(') + ('$ar') as count';
    79. -
    80.     }//public static function getCount(Query $query, $arSqls, $strAdditional = '')
    81. -
    82.  
    83. -
    84. }//class SparqlEngineDb_SqlMerger
    85. -
    86.  
    87. -
    88. ?>
    89. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base deleted file mode 100755 index 20291888..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html.svn-base +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - File Source for TypeSorter.php - - - - - -

    Source for file TypeSorter.php

    -

    Documentation is available at TypeSorter.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Sorts database types as the Sparql specs want it.
    6. -
    7. *
    8. -
    9. *   @author Christian Weiske <cweiske@cweiske.de>
    10. -
    11. *
    12. -
    13. *   @package sparql
    14. -
    15. */
    16. -
    17. -
    18. {
    19. -
    20.     /**
    21. -
    22.     *   Defines the sort order for value types in the database,
    23. -
    24.     *   so that they get sorted correctly as the specs want it.
    25. -
    26.     *   @var array 
    27. -
    28.     */
    29. -
    30.     public static $arTypeNumbers array(
    31. -
    32.         null    => 0,//empty
    33. -
    34.         'b'     => 1,//blank
    35. -
    36.         'r'     => 2,//resource
    37. -
    38.         'l'     => 3,//literal
    39. -
    40.     );
    41. -
    42.  
    43. -
    44.     /**
    45. -
    46.     *   SQL types to cast XSD schema types to, so that they will get
    47. -
    48.     *   sorted correctly.
    49. -
    50.     *   @var array 
    51. -
    52.     */
    53. -
    54.     public static $arCastTypes array(
    55. -
    56.         'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER'
    57. -
    58.     );
    59. -
    60.  
    61. -
    62.  
    63. -
    64.  
    65. -
    66.     public function __construct(Query $queryADOConnection $dbConn)
    67. -
    68.     {
    69. -
    70.         $this->dbConn   $dbConn;
    71. -
    72.         $this->query    $query;
    73. -
    74.     }
    75. -
    76.  
    77. -
    78.  
    79. -
    80.     /**
    81. -
    82.     *   Needs to be executed before getOrderifiedSqls and willBeDataDependent
    83. -
    84.     *
    85. -
    86.     *   @param SparqlEngineDb_SqlGenerator $sg  SQL generator object
    87. -
    88.     */
    89. -
    90.     public function setData(SparqlEngineDb_SqlGenerator $sg)
    91. -
    92.     {
    93. -
    94.         $this->arUsedVarTypes       $sg->getUsedVarTypes();
    95. -
    96.         $this->arUsedVarAssignments $sg->getUsedVarAssignments();
    97. -
    98.         $this->arVarAssignments     $sg->getVarAssignments();
    99. -
    100.     }//public function setData(SparqlEngineDb_SqlGenerator $sg)
    101. -
    102.  
    103. -
    104.  
    105. -
    106.  
    107. -
    108.     /**
    109. -
    110.     *   Returns an array of sql statements that need to be executed
    111. -
    112.     *   and deliver the full result set when combined.
    113. -
    114.     *
    115. -
    116.     *   Execute setData() before this.
    117. -
    118.     *
    119. -
    120.     *   @internal It is not possible (ok, it is - but it would really complicate
    121. -
    122.     *    the queries and the code here) to use UNION to combine the sqls to
    123. -
    124.     *    a single one - UNION merges the results and does not keep the order
    125. -
    126.     *    of the rows. Citing the mysql manual:
    127. -
    128.     *        Use of ORDER BY for individual SELECT statements implies nothing
    129. -
    130.     *        about the order in which the rows appear in the final result because
    131. -
    132.     *        UNION by default produces an unordered set of rows. If ORDER BY
    133. -
    134.     *        appears with LIMIT, it is used to determine the subset of the
    135. -
    136.     *        selected rows to retrieve for the SELECT, but does not necessarily
    137. -
    138.     *        affect the order of those rows in the final UNION result.
    139. -
    140.     *        If ORDER BY appears without LIMIT in a SELECT, it is
    141. -
    142.     *        optimized away because it will have no effect anyway.
    143. -
    144.     *
    145. -
    146.     *   @param string $strSelect    SELECT clause
    147. -
    148.     *   @param string $strFrom      FROM clause
    149. -
    150.     *   @param string $strWhere     WHERE clause
    151. -
    152.     *   @return array   Array of arrays. Imploding an array will give
    153. -
    154.     *                     a complete sql statement. The array will have the keys
    155. -
    156.     *                     select/from/where/order.
    157. -
    158.     */
    159. -
    160.     public function getOrderifiedSqls($arSqls)
    161. -
    162.     {
    163. -
    164.         if (count($arSqls== 0{
    165. -
    166.             return $arSqls;
    167. -
    168.         }
    169. -
    170.  
    171. -
    172.         $strSelect $arSqls[0]['select'];
    173. -
    174.         $strFrom   $arSqls[0]['from'];
    175. -
    176.         $strWhere  $arSqls[0]['where'];
    177. -
    178.  
    179. -
    180.         $strResultForm $this->query->getResultForm();
    181. -
    182.         if ($strResultForm == 'ask' || $strResultForm == 'count'{
    183. -
    184.             return array(
    185. -
    186.                 $arSqls
    187. -
    188.             );
    189. -
    190.         }
    191. -
    192.  
    193. -
    194.         $arSpecial $this->getSpecialOrderVariables();
    195. -
    196.         if (count($arSpecial== 0{
    197. -
    198.             $strOrder $this->getSqlOrderBy();
    199. -
    200.             foreach ($arSqls as &$arSql{
    201. -
    202.                 $arSql['order'$strOrder;
    203. -
    204.             }
    205. -
    206.             return array(
    207. -
    208.                 $arSqls
    209. -
    210.             );
    211. -
    212.         }
    213. -
    214.  
    215. -
    216.         $arTypeSets $this->orderTypeSets(
    217. -
    218.             $this->getTypeSets($arSpecial$strFrom$strWhere)
    219. -
    220.         );
    221. -
    222.  
    223. -
    224.         $arNewSqls array();
    225. -
    226.         foreach ($arTypeSets as $arTypeSet{
    227. -
    228.             $arSqlParts array();
    229. -
    230.             foreach ($arSqls as $arSql{
    231. -
    232.                 $arSql['where'.= $this->getTypesetWhereClause($arTypeSet);
    233. -
    234.                 $arSql['order']  $this->getSqlOrderBy($arTypeSet);
    235. -
    236.                 $arSqlParts[$arSql;
    237. -
    238.             }
    239. -
    240.             $arNewSqls[$arSqlParts;
    241. -
    242.         }
    243. -
    244.  
    245. -
    246.         return $arNewSqls;
    247. -
    248.     }//public function getOrderifiedSqls($arUsedVarAssignments, $strSelect, $strFrom, $strWhere)
    249. -
    250.  
    251. -
    252.  
    253. -
    254.  
    255. -
    256.     /**
    257. -
    258.     *   Returns wether the returned queries will depend on the data or not.
    259. -
    260.     *   If the queries depend on the data, they cannot be prepare()d and
    261. -
    262.     *   thus won't be that fast when executing.
    263. -
    264.     *
    265. -
    266.     *   Execute setData() before this.
    267. -
    268.     *
    269. -
    270.     *   @return boolean 
    271. -
    272.     */
    273. -
    274.     public function willBeDataDependent()
    275. -
    276.     {
    277. -
    278.         $strResultForm $this->query->getResultForm();
    279. -
    280.         return !(
    281. -
    282.             $strResultForm == 'ask' || $strResultForm == 'count'
    283. -
    284.             || count($this->getSpecialOrderVariables()) == 0
    285. -
    286.         );
    287. -
    288.     }//public function willBeDataDependent()
    289. -
    290.  
    291. -
    292.  
    293. -
    294.  
    295. -
    296.     /**
    297. -
    298.     *   Returns an array of variables that the result is going to be
    299. -
    300.     *   ordered by and that need to be sorted multiple times
    301. -
    302.     *   (because they may contain different data types)
    303. -
    304.     *
    305. -
    306.     *   @return array Array of sparql variable names
    307. -
    308.     */
    309. -
    310.     protected function getSpecialOrderVariables()
    311. -
    312.     {
    313. -
    314.         $arSM $this->query->getSolutionModifier();
    315. -
    316.         if ($arSM['order by'=== null{
    317. -
    318.             return array();
    319. -
    320.         }
    321. -
    322.  
    323. -
    324.         $arSpecial array();
    325. -
    326.         foreach ($arSM['order by'as $arVar{
    327. -
    328.             if ($this->isSpecialOrderVariable($arVar['val'])) {
    329. -
    330.                 $arSpecial[$arVar['val'];
    331. -
    332.             }
    333. -
    334.         }
    335. -
    336.         return $arSpecial;
    337. -
    338.     }//protected function getSpecialOrderVariables()
    339. -
    340.  
    341. -
    342.  
    343. -
    344.  
    345. -
    346.     /**
    347. -
    348.     *   Checks if a given variable name is a variable that
    349. -
    350.     *   needs special care when used in ORDER BY statements.
    351. -
    352.     *
    353. -
    354.     *   @param string $strVar SPARQL variable name
    355. -
    356.     *   @return boolean true if the variable needs special care
    357. -
    358.     */
    359. -
    360.     protected function isSpecialOrderVariable($strVar)
    361. -
    362.     {
    363. -
    364.         return !isset($this->arUsedVarTypes[$strVar]['s'])
    365. -
    366.             && !isset($this->arUsedVarTypes[$strVar]['p']);
    367. -
    368.     }//protected function isSpecialOrderVariable($arVar)
    369. -
    370.  
    371. -
    372.  
    373. -
    374.  
    375. -
    376.     /**
    377. -
    378.     *   Determines the type sets in the query results.
    379. -
    380.     *   A type set is a distinct set of variables and their types,
    381. -
    382.     *   e.g. the variable and its type (r/b/l) and its datatype
    383. -
    384.     *   if its an object.
    385. -
    386.     *
    387. -
    388.     *   @param array $arSpecialVars     Special variables as returned by
    389. -
    390.     *                                    getSpecialOrderVariables()
    391. -
    392.     *   @param string $strFrom          FROM part of the sql query
    393. -
    394.     *   @param string $strWhere         WHERE part of the sql query
    395. -
    396.     *
    397. -
    398.     *   @return array   Key is the sparql variable name, value is an
    399. -
    400.     *                    array. This one has one key 'type' with a
    401. -
    402.     *                    value of b/l/r. It might have another key
    403. -
    404.     *                    'datatype' with the resource's datatype.
    405. -
    406.     */
    407. -
    408.     protected function getTypeSets($arSpecialVars$strFrom$strWhere)
    409. -
    410.     {
    411. -
    412.         $arSel array();
    413. -
    414.         foreach ($arSpecialVars as $strSparqlVar{
    415. -
    416.             if ($this->arVarAssignments[$strSparqlVar][1== 'o'{
    417. -
    418.                 $arSel[$this->arVarAssignments[$strSparqlVar][0'.l_datatype'
    419. -
    420.                     . ' as "' $strSparqlVar '-datatype"';
    421. -
    422.             }
    423. -
    424.             $strTypeCol $this->arVarAssignments[$strSparqlVar][1== 'o'
    425. -
    426.                 ? 'object_is' 'subject_is';
    427. -
    428.             $this->arVarAssignments[$strSparqlVar][2$strTypeCol;
    429. -
    430.             $arSel[$this->arVarAssignments[$strSparqlVar][0'.' $strTypeCol
    431. -
    432.                 . ' as "' $strSparqlVar '-type"';
    433. -
    434.         }
    435. -
    436.  
    437. -
    438.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    439. -
    440.         $arResult $this->dbConn->execute(
    441. -
    442.             'SELECT DISTINCT ' implode(', '$arSel' ' $strFrom $strWhere
    443. -
    444.         );
    445. -
    446.         $this->dbConn->SetFetchMode($oldmode);
    447. -
    448.  
    449. -
    450.         $arTypes array();
    451. -
    452.         foreach ($arResult as $arRow{
    453. -
    454.             $nLine count($arTypes);
    455. -
    456.             foreach ($arRow as $key => $value{
    457. -
    458.                 list($strSparqlVar$strTypeexplode('-'$key);
    459. -
    460.                 $arTypes[$nLine][$strSparqlVar][$strType$value;
    461. -
    462.             }
    463. -
    464.         }
    465. -
    466.  
    467. -
    468.         return $arTypes;
    469. -
    470.     }//protected function getTypeSets($arSpecialVars, $strFrom, $strWhere)
    471. -
    472.  
    473. -
    474.  
    475. -
    476.  
    477. -
    478.     /**
    479. -
    480.     *   Takes an array of type sets (as returned by getTypeSets()) and
    481. -
    482.     *   sorts the variables according to the SPARQL specs.
    483. -
    484.     *
    485. -
    486.     *   @param array $arTypes Array of type sets
    487. -
    488.     *   @return array Ordered array of type sets
    489. -
    490.     */
    491. -
    492.     protected function orderTypeSets($arTypes)
    493. -
    494.     {
    495. -
    496.         $arSM $this->query->getSolutionModifier();
    497. -
    498.         if ($arSM['order by'!== null{
    499. -
    500.             $this->arDirection array();
    501. -
    502.             foreach ($arSM['order by'as $arVar{
    503. -
    504.                 $this->arDirection[$arVar['val']] =
    505. -
    506.                     (strtoupper($arVar['type']== 'ASC' : -1);
    507. -
    508.             }
    509. -
    510.         }
    511. -
    512.  
    513. -
    514.         usort($arTypesarray($this'compareTypeSet'));
    515. -
    516.  
    517. -
    518.         return $arTypes;
    519. -
    520.     }//protected function orderTypeSets($arTypes)
    521. -
    522.  
    523. -
    524.  
    525. -
    526.  
    527. -
    528.     /**
    529. -
    530.     *   Compares two type sets. Works like a normal comparision
    531. -
    532.     *   method that returns -1/0/1 for use in usort()
    533. -
    534.     *
    535. -
    536.     *   @param array $arTs1     First typeset
    537. -
    538.     *   @param array $arTs2     Second typeset
    539. -
    540.     *   @return int Comparison value
    541. -
    542.     */
    543. -
    544.     public function compareTypeSet($arTs1$arTs2)
    545. -
    546.     {
    547. -
    548.         foreach ($arTs1 as $strSparqlVar => $arType1{
    549. -
    550.             //compare types
    551. -
    552.             $n self::$arTypeNumbers[$arType1['type']]
    553. -
    554.                 - self::$arTypeNumbers[$arTs2[$strSparqlVar]['type']];
    555. -
    556.             if ($n != 0{
    557. -
    558.                 //and take ASC/DESC into account
    559. -
    560.                 return $n $this->arDirection[$strSparqlVar];
    561. -
    562.             }
    563. -
    564.  
    565. -
    566.             //compare the datatypes
    567. -
    568.             $n self::compareXsdType(
    569. -
    570.                 $arType1['datatype'],
    571. -
    572.                 $arTs2[$strSparqlVar]['datatype']
    573. -
    574.             );
    575. -
    576.             //if they are not equal, return the value
    577. -
    578.             if ($n != 0{
    579. -
    580.                 //and take ASC/DESC into account
    581. -
    582.                 return $n $this->arDirection[$strSparqlVar];
    583. -
    584.             }
    585. -
    586.         }
    587. -
    588.  
    589. -
    590.         //they are equal
    591. -
    592.         return 0;
    593. -
    594.     }//public function compareTypeSet($arTs1, $arTs2)
    595. -
    596.  
    597. -
    598.  
    599. -
    600.  
    601. -
    602.     /**
    603. -
    604.     *   Compares two XSD data types and returns the comparison number.
    605. -
    606.     *
    607. -
    608.     *   @param string $strType1     First data type
    609. -
    610.     *   @param string $strType2     Second data type
    611. -
    612.     *   @return int     Comparison number (<0 if $strType1 is less than
    613. -
    614.     *                    $strType2, 0 if equal, >0 if type2 is greater)
    615. -
    616.     */
    617. -
    618.     public static function compareXsdType($strType1$strType2)
    619. -
    620.     {
    621. -
    622.         return self::getXsdTypeNumber($strType1self::getXsdTypeNumber($strType2);
    623. -
    624.     }//public static function compareXsdType($strType1, $strType2)
    625. -
    626.  
    627. -
    628.  
    629. -
    630.  
    631. -
    632.     /**
    633. -
    634.     *   Returns the type number for an xsd data type.
    635. -
    636.     *
    637. -
    638.     *   @param string $strType  XSD data type
    639. -
    640.     *   @return int  Some integer to compare two types.
    641. -
    642.     */
    643. -
    644.     public static function getXsdTypeNumber($strType)
    645. -
    646.     {
    647. -
    648.         if ($strType === null{
    649. -
    650.             return 0;
    651. -
    652.         else if ($strType == ''{
    653. -
    654.             return 1;
    655. -
    656.         else {
    657. -
    658.             return 2;
    659. -
    660.         }
    661. -
    662.     }//public static function getXsdTypeNumber($strType)
    663. -
    664.  
    665. -
    666.  
    667. -
    668.  
    669. -
    670.     /**
    671. -
    672.     *   Returns the ORDER BY sql query string
    673. -
    674.     *   if neccessary for the query. The returned string
    675. -
    676.     *   already has ORDER BY prefixed.
    677. -
    678.     *
    679. -
    680.     *   @internal Also takes care of casting the data if the type
    681. -
    682.     *    is listed in $arCastTypes. See getCastMethod() for more info.
    683. -
    684.     *
    685. -
    686.     *   @param arrray $arTypeSet Single typeset
    687. -
    688.     *   @return string      ORDER BY ... string or empty string
    689. -
    690.     */
    691. -
    692.     function getSqlOrderBy($arTypeSet array())
    693. -
    694.     {
    695. -
    696.         $arSM $this->query->getSolutionModifier();
    697. -
    698.         if ($arSM['order by'=== null{
    699. -
    700.             return '';
    701. -
    702.         }
    703. -
    704.  
    705. -
    706.         $sqlOrder array();
    707. -
    708.         foreach ($arSM['order by'as $arVar{
    709. -
    710.             $strSparqlVar $arVar['val'];
    711. -
    712.             if (isset($this->arUsedVarAssignments[$strSparqlVar])) {
    713. -
    714.                 if (!isset($arTypeSet[$strSparqlVar]['datatype'])
    715. -
    716.                   || $arTypeSet[$strSparqlVar]['datatype'== ''{
    717. -
    718.                     $sqlOrder[$this->arUsedVarAssignments[$strSparqlVar' ' strtoupper($arVar['type']);
    719. -
    720.                 else {
    721. -
    722.                     $sqlOrder[self::getCastMethod(
    723. -
    724.                         $arTypeSet[$strSparqlVar]['datatype'],
    725. -
    726.                         $this->arUsedVarAssignments[$strSparqlVar]
    727. -
    728.                     ' ' strtoupper($arVar['type']);
    729. -
    730.                 }
    731. -
    732.             }
    733. -
    734.         }
    735. -
    736.  
    737. -
    738.         return ' ORDER BY ' implode(', '$sqlOrder);
    739. -
    740.     }//function getSqlOrderBy($arTypeSet = array())
    741. -
    742.  
    743. -
    744.  
    745. -
    746.  
    747. -
    748.     /**
    749. -
    750.     *   Returns the SQL statement needed to case the given variable to
    751. -
    752.     *   the given type.
    753. -
    754.     *
    755. -
    756.     *   @param string $strType      XML data type
    757. -
    758.     *   @param string $strSqlVar    SQL variable name
    759. -
    760.     *   @return string  SQL command to cast the variable
    761. -
    762.     */
    763. -
    764.     protected static function getCastMethod($strType$strSqlVar)
    765. -
    766.     {
    767. -
    768.         if (isset(self::$arCastTypes[$strType])) {
    769. -
    770.             return 'CAST(' $strSqlVar ' as ' self::$arCastTypes[$strType')';
    771. -
    772.         else {
    773. -
    774.             //unsupported type!
    775. -
    776.             throw new Exception('Unsupported cast type in order by: ' $strType);
    777. -
    778.             return $strSqlVar;
    779. -
    780.         }
    781. -
    782.     }//protected static function getCastMethod($strType, $strSqlVar)
    783. -
    784.  
    785. -
    786.  
    787. -
    788.  
    789. -
    790.     /**
    791. -
    792.     *   Creates and returns the SQL WHERE clauses needed to get only
    793. -
    794.     *   data in the given typeset.
    795. -
    796.     *
    797. -
    798.     *   @param array $arTypeSet     Typeset
    799. -
    800.     *   @return string  Clauses for the WHERE part in an SQL query
    801. -
    802.     */
    803. -
    804.     protected function getTypesetWhereClause($arTypeSet)
    805. -
    806.     {
    807. -
    808.         $strWhereTypes '';
    809. -
    810.         foreach ($arTypeSet as $strSparqlVar => $arType{
    811. -
    812.             //check type
    813. -
    814.             $strWhereTypes .= ' AND ' $this->arVarAssignments[$strSparqlVar][0]
    815. -
    816.                 . '.' $this->arVarAssignments[$strSparqlVar][2]
    817. -
    818.                 . $this->getStringNullComparison($arType['type']);
    819. -
    820.             //check datatype
    821. -
    822.             if (isset($arType['datatype'])) {
    823. -
    824.                 $strWhereTypes .= ' AND ' $this->arVarAssignments[$strSparqlVar][0]
    825. -
    826.                     . '.l_datatype '
    827. -
    828.                     . $this->getStringNullComparison($arType['datatype']);
    829. -
    830.             }
    831. -
    832.         }
    833. -
    834.         return $strWhereTypes;
    835. -
    836.     }//protected function getTypesetWhereClause($arTypeSet)
    837. -
    838.  
    839. -
    840.  
    841. -
    842.  
    843. -
    844.     /**
    845. -
    846.     *   Returns the correct sql string comparison method.
    847. -
    848.     *
    849. -
    850.     *   @internal If the string is NULL, an "IS NULL" sql statment
    851. -
    852.     *    will be returned, and a normal "= 'something'" if it is
    853. -
    854.     *    a normal string.
    855. -
    856.     */
    857. -
    858.     protected function getStringNullComparison($str)
    859. -
    860.     {
    861. -
    862.         if ($str === null{
    863. -
    864.             return ' IS NULL';
    865. -
    866.         else {
    867. -
    868.             return ' = ' $this->dbConn->qstr($str'';
    869. -
    870.         }
    871. -
    872.     }//protected function getStringNullComparison($str)
    873. -
    874.  
    875. -
    876. }//class SparqlEngineDb_TypeSorter
    877. -
    878. ?>
    879. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base deleted file mode 100755 index 2be15ba7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html.svn-base +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - File Source for PreparedStatement.php - - - - - -

    Source for file PreparedStatement.php

    -

    Documentation is available at PreparedStatement.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   A prepared statement that can be execute()d later multiple
    6. -
    7. *   times with different variable values.
    8. -
    9. *
    10. -
    11. *   @package sparql
    12. -
    13. */
    14. -
    15. -
    16. {
    17. -
    18.     public function execute($arVariables$resultform)
    19. -
    20.     {
    21. -
    22.         //FIXME
    23. -
    24.     }
    25. -
    26.  
    27. -
    28. }
    29. -
    30. ?>
    31. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base deleted file mode 100755 index 8b69462d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultConverter.php.html.svn-base +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - File Source for ResultConverter.php - - - - - -

    Source for file ResultConverter.php

    -

    Documentation is available at ResultConverter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Converts a memory result into a proper
    10. -
    11. *   rdf statement triple array
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     /**
    27. -
    28.     *   Determines the correct renderer and calls it.
    29. -
    30.     *
    31. -
    32.     *   The $resultform may be:
    33. -
    34.     *   - false: The default renderer is taken then
    35. -
    36.     *   - an object that implements SparqlEngine_ResultRenderer interface
    37. -
    38.     *   - a string like "HTML" or "XML". The appropriate renderer is used then.
    39. -
    40.     *   - a full class name, e.g. SparqlEngine_ResultRenderer_XML
    41. -
    42.     *
    43. -
    44.     *   @param array $arVartable        Variable table
    45. -
    46.     *   @param SparqlEngine $engine   Sparql database engine.
    47. -
    48.     *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
    49. -
    50.     *
    51. -
    52.     *   @return mixed   Most likely an array or a boolean value,
    53. -
    54.     *                    or anything else as determined by $resultform
    55. -
    56.     */
    57. -
    58.     public static function convertFromResult($arVartableSparqlEngine $engine$resultform false)
    59. -
    60.     {
    61. -
    62.         if (is_object($resultform)) {
    63. -
    64.             if ($resultform instanceof SparqlEngine_ResultRenderer{
    65. -
    66.                 return $resultform->convertFromResult(
    67. -
    68.                     $arVartable,
    69. -
    70.                     $engine->getQuery(),
    71. -
    72.                     $engine
    73. -
    74.                 );
    75. -
    76.             else {
    77. -
    78.                 throw new Exception(
    79. -
    80.                     'Result renderer object needs to implement'
    81. -
    82.                     . ' SparqlEngine_ResultRenderer interface'
    83. -
    84.                 );
    85. -
    86.             }
    87. -
    88.         }
    89. -
    90.  
    91. -
    92.         if ($resultform === false{
    93. -
    94.             $resultform 'Default';
    95. -
    96.         else if ($resultform == 'xml'{
    97. -
    98.             //kept for BC reasons
    99. -
    100.             $resultform 'XML';
    101. -
    102.         }
    103. -
    104.  
    105. -
    106.         if ($strClass self::loadClass($resultform)) {
    107. -
    108.             $rrObj new $strClass();
    109. -
    110.             if ($rrObj instanceof SparqlEngine_ResultRenderer{
    111. -
    112.                 return $rrObj->convertFromResult(
    113. -
    114.                     $arVartable,
    115. -
    116.                     $engine->getQuery(),
    117. -
    118.                     $engine
    119. -
    120.                 );
    121. -
    122.             else {
    123. -
    124.                 throw new Exception(
    125. -
    126.                     'Result renderer class "' $strClass '" needs to implement'
    127. -
    128.                     . ' SparqlEngine_ResultRenderer interface'
    129. -
    130.                 );
    131. -
    132.             }
    133. -
    134.         else {
    135. -
    136.             throw new Exception(
    137. -
    138.                 'Result renderer class "' $resultform '" could not be loaded.'
    139. -
    140.             );
    141. -
    142.         }
    143. -
    144.     }//public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false)
    145. -
    146.  
    147. -
    148.  
    149. -
    150.  
    151. -
    152.     /**
    153. -
    154.     *   Tries to load a given class if it doesn't exist,
    155. -
    156.     *   and returns true if the class can be used.
    157. -
    158.     *
    159. -
    160.     *   @param string $strClass Classname
    161. -
    162.     *   @return mixed Class name if the class is loaded and can be used, false if not.
    163. -
    164.     */
    165. -
    166.     protected static function loadClass($strClass)
    167. -
    168.     {
    169. -
    170.         if (class_exists($strClass)) {
    171. -
    172.             return $strClass;
    173. -
    174.         }
    175. -
    176.  
    177. -
    178.         //RAP style, shortcut notation
    179. -
    180.         $strFile 'SparqlEngine/ResultRenderer/' $strClass '.php';
    181. -
    182.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    183. -
    184.         if (class_exists('SparqlEngine_ResultRenderer_' $strClass)) {
    185. -
    186.             return 'SparqlEngine_ResultRenderer_' $strClass;
    187. -
    188.         }
    189. -
    190.  
    191. -
    192.         //RAP style
    193. -
    194.         $strFile str_replace('_''/'$strClass'.php';
    195. -
    196.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    197. -
    198.         if (class_exists($strClass)) {
    199. -
    200.             return $strClass;
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         //PEAR style
    207. -
    208.         @include_once $strFile;
    209. -
    210.         if (class_exists($strClass)) {
    211. -
    212.             return $strClass;
    213. -
    214.         }
    215. -
    216.  
    217. -
    218.         return false;
    219. -
    220.     }//protected static function loadClass($strClass)
    221. -
    222.  
    223. -
    224. }//class SparqlEngine_ResultConverter
    225. -
    226. ?>
    227. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base deleted file mode 100755 index b312b29a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html.svn-base +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - File Source for ResultRenderer.php - - - - - -

    Source for file ResultRenderer.php

    -

    Documentation is available at ResultRenderer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Result renderer interface that any result renderer needs to implement.
    8. -
    9. *   A result renderer converts results into a
    10. -
    11. *   - for the user - usable result format, e.g. php arrays, xml, json and
    12. -
    13. *   so on.
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     /**
    29. -
    30.     *   Converts the database results into the desired output format
    31. -
    32.     *   and returns the result.
    33. -
    34.     *
    35. -
    36.     *   @param array $arVartable    Variable table
    37. -
    38.     *   @param Query $query         SPARQL query object
    39. -
    40.     *   @param SparqlEngine $engine Sparql Engine to query the database
    41. -
    42.     *   @return mixed   The result as rendered by the result renderers.
    43. -
    44.     */
    45. -
    46.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine);
    47. -
    48.  
    49. -
    50. }//interface SparqlEngine_ResultRenderer
    51. -
    52.  
    53. -
    54. ?>
    55. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base deleted file mode 100755 index 2593e935..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html.svn-base +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - File Source for Default.php - - - - - -

    Source for file Default.php

    -

    Documentation is available at Default.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Default result renderer for SparqlEngine
    10. -
    11. *
    12. -
    13. *   @author Tobias Gauß <tobias.gauss@web.de>
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
    24. -
    25. {
    26. -
    27.     /**
    28. -
    29.     *   Converts the database results into the output format
    30. -
    31.     *   and returns the result.
    32. -
    33.     *
    34. -
    35.     *   @param array $arVartable    Variable table
    36. -
    37.     *   @param Query $query         SPARQL query object
    38. -
    39.     *   @param SparqlEngine $engine Sparql Engine to query the database
    40. -
    41.     *   @return mixed               Most likely an array
    42. -
    43.     */
    44. -
    45.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    46. -
    47.     {
    48. -
    49.         $this->query   $query;
    50. -
    51.         $this->engine  $engine;
    52. -
    53.         $this->dataset $engine->getDataset();
    54. -
    55.  
    56. -
    57.         $result false;
    58. -
    59.         $qrf    $this->query->getResultForm();
    60. -
    61.  
    62. -
    63.         if ($arVartable != null{
    64. -
    65.             switch ($qrf{
    66. -
    67.                 case 'ask':
    68. -
    69.                     if (count($arVartable0{
    70. -
    71.                         $result true;
    72. -
    73.                     else {
    74. -
    75.                         $result false;
    76. -
    77.                     }
    78. -
    79.                     break;
    80. -
    81.                 case 'count':
    82. -
    83.                     $result count($arVartable);
    84. -
    85.                     break;
    86. -
    87.                 case 'construct':
    88. -
    89.                     $result $this->constructGraph(
    90. -
    91.                         $arVartable,
    92. -
    93.                         $this->query->getConstructPattern()
    94. -
    95.                     );
    96. -
    97.                     break;
    98. -
    99.                 case 'describe':
    100. -
    101.                     $result $this->describeGraph($arVartable);
    102. -
    103.                     break;
    104. -
    105.                 default:
    106. -
    107.                     $result $arVartable;
    108. -
    109.                     break;
    110. -
    111.             }
    112. -
    113.         else if ($qrf == 'describe'){
    114. -
    115.             $result $this->describeGraph(null);
    116. -
    117.         else if ($qrf == 'construct'){
    118. -
    119.             $result $this->constructGraph(
    120. -
    121.                 false,
    122. -
    123.                 $this->query->getConstructPattern()
    124. -
    125.             );
    126. -
    127.         }
    128. -
    129.  
    130. -
    131.         return $result;
    132. -
    133.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  
    140. -
    141.     /**
    142. -
    143.     * Constructs a result graph.
    144. -
    145.     *
    146. -
    147.     * @param  array         $arVartable       A table containing the result vars and their bindings
    148. -
    149.     * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
    150. -
    151.     * @return MemModel      The result graph which matches the CONSTRUCT pattern
    152. -
    153.     */
    154. -
    155.     function constructGraph($arVartable$constructPattern)
    156. -
    157.     {
    158. -
    159.         $resultGraph new MemModel();
    160. -
    161.  
    162. -
    163.         if (!$arVartable{
    164. -
    165.             return $resultGraph;
    166. -
    167.         }
    168. -
    169.  
    170. -
    171.         $tp $constructPattern->getTriplePattern();
    172. -
    173.  
    174. -
    175.         $bnode 0;
    176. -
    177.         foreach ($arVartable as $value{
    178. -
    179.             foreach ($tp as $triple{
    180. -
    181.                 $sub  $triple->getSubject();
    182. -
    183.                 $pred $triple->getPredicate();
    184. -
    185.                 $obj  $triple->getObject();
    186. -
    187.  
    188. -
    189.                 if (is_string($sub)  && $sub{1== '_'{
    190. -
    191.                     $sub  new BlankNode("_bN".$bnode);
    192. -
    193.                 }
    194. -
    195.                 if (is_string($pred&& $pred{1== '_'{
    196. -
    197.                     $pred new BlankNode("_bN".$bnode);
    198. -
    199.                 }
    200. -
    201.                 if (is_string($obj)  && $obj{1== '_'{
    202. -
    203.                     $obj  new BlankNode("_bN".$bnode);
    204. -
    205.                 }
    206. -
    207.  
    208. -
    209.  
    210. -
    211.                 if (is_string($sub)) {
    212. -
    213.                     $sub  $value[$sub];
    214. -
    215.                 }
    216. -
    217.                 if (is_string($pred)) {
    218. -
    219.                     $pred $value[$pred];
    220. -
    221.                 }
    222. -
    223.                 if (is_string($obj)) {
    224. -
    225.                     $obj  $value[$obj];
    226. -
    227.                 }
    228. -
    229.  
    230. -
    231.                 if ($sub !== "" && $pred !== "" && $obj !== ""{
    232. -
    233.                     $resultGraph->add(new Statement($sub,$pred,$obj));
    234. -
    235.                 }
    236. -
    237.             }
    238. -
    239.             $bnode++;
    240. -
    241.         }
    242. -
    243.         return $resultGraph;
    244. -
    245.     }//function constructGraph($arVartable, $constructPattern)
    246. -
    247.  
    248. -
    249.  
    250. -
    251.  
    252. -
    253.     /**
    254. -
    255.     * Builds a describing named graph. To define an attribute list for a
    256. -
    257.     * several rdf:type look at constants.php
    258. -
    259.     *
    260. -
    261.     * @param  array      $arVartable 
    262. -
    263.     * @return MemModel 
    264. -
    265.     */
    266. -
    267.     function describeGraph($arVartable)
    268. -
    269.     {
    270. -
    271.         // build empty named graph
    272. -
    273.         $resultGraph new MemModel();
    274. -
    275.         // if no where clause fill $arVartable
    276. -
    277.         $vars $this->query->getResultVars();
    278. -
    279.         if ($arVartable == null{
    280. -
    281.             if ($vars{
    282. -
    283.                 $arVartable[0array('?x' => new Resource(substr($vars[0],1,-1)));
    284. -
    285.                 $vars[0'?x';
    286. -
    287.             }
    288. -
    289.         }
    290. -
    291.         // fetch attribute list from constants.php
    292. -
    293.         global $sparql_describe;
    294. -
    295.         // for each resultset
    296. -
    297.         foreach ($arVartable as $resultset{
    298. -
    299.             foreach ($vars as $varname{
    300. -
    301.                 $varvalue $resultset[$varname];
    302. -
    303.                 // try to determine rdf:type of the variable
    304. -
    305.                 $type $this->_determineType($varvalue$resultGraph);
    306. -
    307.                 // search attribute list defined in constants.php
    308. -
    309.                 $list null;
    310. -
    311.                 if ($type{
    312. -
    313.                     $strLuri strtolower($type->getUri());
    314. -
    315.                     if (isset($sparql_describe[$strLuri])) {
    316. -
    317.                         $list $sparql_describe[$strLuri;
    318. -
    319.                     }
    320. -
    321.                 }
    322. -
    323.                 // search in dataset
    324. -
    325.                 $this->_getAttributes($list$resultGraph$varvalue);
    326. -
    327.             }
    328. -
    329.         }
    330. -
    331.  
    332. -
    333.         return $resultGraph;
    334. -
    335.     }//function describeGraph($arVartable)
    336. -
    337.  
    338. -
    339.  
    340. -
    341.  
    342. -
    343.     /**
    344. -
    345.     * Tries to determine the rdf:type of the variable.
    346. -
    347.     *
    348. -
    349.     * @param  Node       $var The variable
    350. -
    351.     * @param  MemModel   $resultGraph The result graph which describes the Resource
    352. -
    353.     * @return String     Uri of the rdf:type
    354. -
    355.     */
    356. -
    357.     protected function _determineType($var$resultGraph)
    358. -
    359.     {
    360. -
    361.         $type null;
    362. -
    363.         // find in namedGraphs
    364. -
    365.         if (!$var instanceof Literal{
    366. -
    367.             $iter $this->dataset->findInNamedGraphs(
    368. -
    369.                 null,
    370. -
    371.                 $var,
    372. -
    373.                 new Resource(RDF_NAMESPACE_URI.'type'),
    374. -
    375.                 null,
    376. -
    377.                 true
    378. -
    379.             );
    380. -
    381.             while ($iter->valid()) {
    382. -
    383.                 $statement $iter->current();
    384. -
    385.                 $type $statement->getObject();
    386. -
    387.                 $resultGraph->add($iter->current());
    388. -
    389.                 break;
    390. -
    391.             }
    392. -
    393.         }
    394. -
    395.         // if no type information found find in default graph
    396. -
    397.         if (!$type{
    398. -
    399.             if (!$var instanceof Literal{
    400. -
    401.                 $iter1 $this->dataset->findInDefaultGraph(
    402. -
    403.                     $var,
    404. -
    405.                     new Resource(RDF_NAMESPACE_URI.'type'),
    406. -
    407.                     null
    408. -
    409.                 );
    410. -
    411.                 $type null;
    412. -
    413.                 while ($iter1->valid()) {
    414. -
    415.                     $statement $iter1->current();
    416. -
    417.                     $type      $statement->getObject();
    418. -
    419.                     $resultGraph->add($iter1->current());
    420. -
    421.                     break;
    422. -
    423.                 }
    424. -
    425.             }
    426. -
    427.         }
    428. -
    429.         return $type;
    430. -
    431.     }//protected function _determineType($var, $resultGraph)
    432. -
    433.  
    434. -
    435.  
    436. -
    437.  
    438. -
    439.     /**
    440. -
    441.     * Search the attributes listed in $list in the dataset.
    442. -
    443.     * Modifies $resultGraph
    444. -
    445.     *
    446. -
    447.     * @param Array      $list List containing the attributes
    448. -
    449.     * @param MemModel   $resultGraph The result graph which describes the Resource
    450. -
    451.     * @return void 
    452. -
    453.     */
    454. -
    455.     protected function _getAttributes($list$resultGraph$varvalue)
    456. -
    457.     {
    458. -
    459.         if ($list){
    460. -
    461.             foreach ($list as $attribute{
    462. -
    463.                 if (!$varvalue instanceof Literal{
    464. -
    465.                     $iter2 $this->dataset->findInNamedGraphs(
    466. -
    467.                         null,
    468. -
    469.                         $varvalue,
    470. -
    471.                         new Resource($attribute),
    472. -
    473.                         null,
    474. -
    475.                         true
    476. -
    477.                     );
    478. -
    479.                     while ($iter2->valid()) {
    480. -
    481.                         $resultGraph->add($iter2->current());
    482. -
    483.                         $iter2->next();
    484. -
    485.                     }
    486. -
    487.                     $iter3 $this->dataset->findInDefaultGraph(
    488. -
    489.                         $varvalue,
    490. -
    491.                         new Resource($attribute),
    492. -
    493.                         null
    494. -
    495.                     );
    496. -
    497.                     while ($iter3->valid()) {
    498. -
    499.                         $resultGraph->add($iter3->current());
    500. -
    501.                         $iter3->next();
    502. -
    503.                     }
    504. -
    505.                 }
    506. -
    507.             }
    508. -
    509.         }
    510. -
    511.     }//protected function _getAttributes($list, $resultGraph, $varvalue)
    512. -
    513.  
    514. -
    515.  
    516. -
    517. }//class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
    518. -
    519.  
    520. -
    521. ?>
    522. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base deleted file mode 100755 index 24661338..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html.svn-base +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - File Source for HTML.php - - - - - -

    Source for file HTML.php

    -

    Documentation is available at HTML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'util/RdfUtil.php';
    6. -
    7.  
    8. -
    9. /**
    10. -
    11. *   XML result renderer for SparqlEngine
    12. -
    13. *
    14. -
    15. *   @author Tobias Gauß <tobias.gauss@web.de>
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
    26. -
    27. {
    28. -
    29.     /**
    30. -
    31.     *   If the result HTML should be wrapped in a div
    32. -
    33.     *   @var boolean 
    34. -
    35.     */
    36. -
    37.     protected $bWrap = true;
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     *   Converts the database results into the output format
    48. -
    49.     *   and returns the result.
    50. -
    51.     *
    52. -
    53.     *   @param array $arVartable    Variable table
    54. -
    55.     *   @param Query $query         SPARQL query object
    56. -
    57.     *   @param SparqlEngine $engine Sparql Engine to query the database
    58. -
    59.     *   @return string HTML result
    60. -
    61.     */
    62. -
    63.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    64. -
    65.     {
    66. -
    67.         $this->query   $query;
    68. -
    69.         $this->engine  $engine;
    70. -
    71.         $this->dataset $engine->getDataset();
    72. -
    73.  
    74. -
    75.         $strCode     '';
    76. -
    77.  
    78. -
    79.         $strResultForm $query->getResultForm();
    80. -
    81.         switch ($strResultForm{
    82. -
    83.             case 'select':
    84. -
    85.             case 'select distinct':
    86. -
    87.                 $strCode $this->createTableFromRecords($arVartable);
    88. -
    89.                 break;
    90. -
    91.  
    92. -
    93.             case 'construct':
    94. -
    95.             case 'describe':
    96. -
    97.                 throw new Exception(
    98. -
    99.                     'Construct and describe are currently not supported by the'
    100. -
    101.                     . ' HTML renderer'
    102. -
    103.                 );
    104. -
    105.  
    106. -
    107.             case 'count':
    108. -
    109.             case 'ask':
    110. -
    111.                 $nCount count($arVartable);
    112. -
    113.  
    114. -
    115.                 if ($strResultForm == 'ask'{
    116. -
    117.                     $strCode 'There were results.';
    118. -
    119.                 else {
    120. -
    121.                     $strCode 'There are ' $nCount ' results.';
    122. -
    123.                 }
    124. -
    125.                 break;
    126. -
    127.  
    128. -
    129.             default:
    130. -
    131.                 throw new Exception('Unsupported result form: ' $strResultForm);
    132. -
    133.         }
    134. -
    135.  
    136. -
    137.         return $this->wrapCode($strCode);
    138. -
    139.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    140. -
    141.  
    142. -
    143.  
    144. -
    145.  
    146. -
    147.     protected function wrapCode($strCode)
    148. -
    149.     {
    150. -
    151.         if (!$this->bWrap{
    152. -
    153.             return $strCode;
    154. -
    155.         }
    156. -
    157.  
    158. -
    159.         return
    160. -
    161.             '<div class="SparqlEngine_ResultRenderer_HTML_result">' "\n"
    162. -
    163.             . $strCode "\n"
    164. -
    165.             . "</div>\n";
    166. -
    167.     }//protected function wrapCode($strCode)
    168. -
    169.  
    170. -
    171.  
    172. -
    173.  
    174. -
    175.     protected function createTableFromRecords($arVartable)
    176. -
    177.     {
    178. -
    179.         if (count($arVartable== 0{
    180. -
    181.             return 'No result rows.';
    182. -
    183.         }
    184. -
    185.  
    186. -
    187.         $arResult array();
    188. -
    189.         foreach ($arVartable as $row{
    190. -
    191.             $arResultRow array();
    192. -
    193.             foreach ($row as $strVarName => $value{
    194. -
    195.                 $arResultRow[$strVarName$this->createValue($value);
    196. -
    197.             }
    198. -
    199.             $arResult[$arResultRow;
    200. -
    201.         }
    202. -
    203.  
    204. -
    205.         //I always wanted to to this :)
    206. -
    207.         return
    208. -
    209.             "<table border='1'>\n"
    210. -
    211.             . " <caption>SPARQL result with " count($arResult" rows</caption>\n"
    212. -
    213.             . " <thead><th>"
    214. -
    215.                 . implode('</th><th>'array_keys(reset($arResult)))
    216. -
    217.             . "</th></thead>\n"
    218. -
    219.             . " <tbody>\n  <tr>"
    220. -
    221.             . implode(
    222. -
    223.                 "</tr>\n  <tr>",
    224. -
    225.                 array_map(
    226. -
    227.                     create_function(
    228. -
    229.                         '$ar',
    230. -
    231.                         'return implode("", $ar);'
    232. -
    233.                     ),
    234. -
    235.                     $arResult
    236. -
    237.                 )
    238. -
    239.               )
    240. -
    241.             . "</tr>\n </tbody>\n"
    242. -
    243.             . "</table>\n";
    244. -
    245.     }//protected function createTableFromRecords($arRecordSets)
    246. -
    247.  
    248. -
    249.  
    250. -
    251.  
    252. -
    253.     /**
    254. -
    255.     *   Creates an RDF object object
    256. -
    257.     *   contained in the given $dbRecordSet object.
    258. -
    259.     *
    260. -
    261.     *   @see convertFromDbResult() to understand $strVarBase necessity
    262. -
    263.     *
    264. -
    265.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    266. -
    267.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    268. -
    269.     *
    270. -
    271.     *   @return string HTML code
    272. -
    273.     */
    274. -
    275.     protected function createValue($value)
    276. -
    277.     {
    278. -
    279.         if ($value === null{
    280. -
    281.             $strCode $this->getHtmlNull();
    282. -
    283.         }
    284. -
    285.         if ($value instanceof Literal{
    286. -
    287.             $strCode $this->getHtmlLiteral(
    288. -
    289.                 $value->getLabel(),
    290. -
    291.                 $value->getLanguage(),
    292. -
    293.                 $value->getDatatype()
    294. -
    295.             );
    296. -
    297.         else if ($value instanceof Resource{
    298. -
    299.             $strCode $this->getHtmlResource($value->getURI());
    300. -
    301.         else {
    302. -
    303.             $strCode $this->getHtmlBlank();
    304. -
    305.         }
    306. -
    307.  
    308. -
    309.         return '<td style="background-color: '
    310. -
    311.                . RdfUtil::chooseColor($value'">'
    312. -
    313.                . $strCode
    314. -
    315.                . '</td>';
    316. -
    317.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    318. -
    319.  
    320. -
    321.  
    322. -
    323.  
    324. -
    325.     protected function getHtmlNull()
    326. -
    327.     {
    328. -
    329.         return '<pre>NULL</pre>';
    330. -
    331.     }//protected function getHtmlNull()
    332. -
    333.  
    334. -
    335.  
    336. -
    337.  
    338. -
    339.     protected function getHtmlBlank($value)
    340. -
    341.     {
    342. -
    343.         return '<i>Blank node</i>';
    344. -
    345.     }//protected function getHtmlBlank($value)
    346. -
    347.  
    348. -
    349.  
    350. -
    351.  
    352. -
    353.     protected function getHtmlResource($value)
    354. -
    355.     {
    356. -
    357.         return htmlspecialchars($value);
    358. -
    359.     }//protected function getHtmlResource($value)
    360. -
    361.  
    362. -
    363.  
    364. -
    365.  
    366. -
    367.     protected function getHtmlLiteral($value$language$datatype)
    368. -
    369.     {
    370. -
    371.         $strCode htmlspecialchars($value);
    372. -
    373.         if ($language{
    374. -
    375.             $strCode .= '<br/>&nbsp;&nbsp;<i>xml:lang</i>=' $language;
    376. -
    377.         }
    378. -
    379.         if ($datatype{
    380. -
    381.             $strCode .= '<br/>&nbsp;&nbsp;<i>rdf:type</i>=' $datatype;
    382. -
    383.         }
    384. -
    385.         return $strCode;
    386. -
    387.     }//protected function getHtmlLiteral($value, $language, $datatype)
    388. -
    389.  
    390. -
    391. }//class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
    392. -
    393.  
    394. -
    395. ?>
    396. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base deleted file mode 100755 index 0088a8a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html.svn-base +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - File Source for XML.php - - - - - -

    Source for file XML.php

    -

    Documentation is available at XML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   XML result renderer for SparqlEngine
    10. -
    11. *
    12. -
    13. *   @author Tobias Gauß <tobias.gauss@web.de>
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
    24. -
    25. {
    26. -
    27.     /**
    28. -
    29.     *   Converts the database results into the output format
    30. -
    31.     *   and returns the result.
    32. -
    33.     *
    34. -
    35.     *   @param array $arVartable    Variable table
    36. -
    37.     *   @param Query $query         SPARQL query object
    38. -
    39.     *   @param SparqlEngine $engine Sparql Engine to query the database
    40. -
    41.     *   @return string XML result
    42. -
    43.     */
    44. -
    45.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    46. -
    47.     {
    48. -
    49.         $this->query   $query;
    50. -
    51.         $this->engine  $engine;
    52. -
    53.         $this->dataset $engine->getDataset();
    54. -
    55.  
    56. -
    57.         if ($arVartable instanceof NamedGraphMem{
    58. -
    59.             return $arVartable->writeRdfToString();
    60. -
    61.         }
    62. -
    63.  
    64. -
    65.         $result '<sparql xmlns="http://www.w3.org/2005/sparql-results#">';
    66. -
    67.         $header '<head>';
    68. -
    69.  
    70. -
    71.         // build header
    72. -
    73.         if (is_array($arVartable)) {
    74. -
    75.             $vars $this->query->getResultVars();
    76. -
    77.             $header '<head>';
    78. -
    79.             foreach ($vars as $value{
    80. -
    81.                 $header $header
    82. -
    83.                         . '<variable name="' substr($value1'"/>';
    84. -
    85.             }
    86. -
    87.             $header $header '</head>';
    88. -
    89.  
    90. -
    91.             // build results
    92. -
    93.             $solm $this->query->getSolutionModifier();
    94. -
    95.             $sel  $this->query->getResultForm();
    96. -
    97.  
    98. -
    99.             $distinct 'false';
    100. -
    101.             if ($sel == 'select distinct'{
    102. -
    103.                 $distinct 'true';
    104. -
    105.             }
    106. -
    107.  
    108. -
    109.             $ordered 'false';
    110. -
    111.             if ($solm['order by'!= 0{
    112. -
    113.                 $ordered 'true';
    114. -
    115.             }
    116. -
    117.  
    118. -
    119.             $results '<results ordered="'.$ordered.'" distinct="'.$distinct.'">';
    120. -
    121.             foreach ($arVartable as $value{
    122. -
    123.                 $results $results.'<result>';
    124. -
    125.                 foreach ($value as $varname => $varvalue{
    126. -
    127.                     $results $results
    128. -
    129.                             . $this->_getBindingString(
    130. -
    131.                                 substr($varname1),
    132. -
    133.                                 $varvalue
    134. -
    135.                             );
    136. -
    137.                 }
    138. -
    139.                 $results $results '</result>';
    140. -
    141.             }
    142. -
    143.             $results $results '</results>';
    144. -
    145.         else {
    146. -
    147.             $results '</head><boolean>' $vartable '</boolean>';
    148. -
    149.         }
    150. -
    151.  
    152. -
    153.         $result $result $header $results '</sparql>';
    154. -
    155.         $result simplexml_load_string($result);
    156. -
    157.         return $result->asXML();
    158. -
    159.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    160. -
    161.  
    162. -
    163.  
    164. -
    165.  
    166. -
    167.     /**
    168. -
    169.     * Helper Function for function buildXmlResult($vartable). Generates
    170. -
    171.     * an xml string for a single variable an their corresponding value.
    172. -
    173.     *
    174. -
    175.     * @param  String  $varname The variables name
    176. -
    177.     * @param  Node    $varvalue The value of the variable
    178. -
    179.     * @return String  The xml string
    180. -
    181.     */
    182. -
    183.     protected function _getBindingString($varname$varvalue)
    184. -
    185.     {
    186. -
    187.         $binding '<binding name="'.$varname.'">';
    188. -
    189.         $value '<unbound/>';
    190. -
    191.  
    192. -
    193.         if ($varvalue instanceof BlankNode{
    194. -
    195.             $value '<bnode>' $varvalue->getLabel('</bnode>';
    196. -
    197.         else if ($varvalue instanceof Resource{
    198. -
    199.             $value '<uri>' $varvalue->getUri('</uri>';
    200. -
    201.         else if ($varvalue instanceof Literal{
    202. -
    203.             $label htmlspecialchars($varvalue->getLabel());
    204. -
    205.             $value '<literal>'.$label.'</literal>';
    206. -
    207.             if ($varvalue->getDatatype(!= null{
    208. -
    209.                 $value '<literal datatype="'
    210. -
    211.                         . $varvalue->getDatatype('">'
    212. -
    213.                         . $label
    214. -
    215.                         . '</literal>';
    216. -
    217.             }
    218. -
    219.             if ($varvalue->getLanguage(!= null{
    220. -
    221.                 $value '<literal xml:lang="'
    222. -
    223.                         . $varvalue->getLanguage('">'
    224. -
    225.                         . $label
    226. -
    227.                         . '</literal>';
    228. -
    229.             }
    230. -
    231.         }
    232. -
    233.         $binding $binding $value '</binding>';
    234. -
    235.  
    236. -
    237.         return $binding;
    238. -
    239.     }//protected function _getBindingString($varname, $varvalue)
    240. -
    241.  
    242. -
    243. }//class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
    244. -
    245.  
    246. -
    247. ?>
    248. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base deleted file mode 100755 index 78336daa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParser.php.html.svn-base +++ /dev/null @@ -1,1442 +0,0 @@ - - - - - - File Source for SparqlParser.php - - - - - -

    Source for file SparqlParser.php

    -

    Documentation is available at SparqlParser.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // Class: SparqlParser
    6. -
    7. // ---------------------------------------------
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'model/Literal.php';
    10. -
    11. require_once RDFAPI_INCLUDE_DIR 'model/Resource.php';
    12. -
    13. require_once RDFAPI_INCLUDE_DIR 'sparql/Constraint.php';
    14. -
    15. require_once RDFAPI_INCLUDE_DIR 'sparql/Query.php';
    16. -
    17. require_once RDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php';
    18. -
    19. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php';
    20. -
    21.  
    22. -
    23. /**
    24. -
    25. * Parses a SPARQL Query string and returns a Query Object.
    26. -
    27. *
    28. -
    29. @author   Tobias Gauss <tobias.gauss@web.de>
    30. -
    31. @author   Christian Weiske <cweiske@cweiske.de>
    32. -
    33. @version     $Id$
    34. -
    35. *
    36. -
    37. @package sparql
    38. -
    39. */
    40. -
    41. class SparqlParser extends Object
    42. -
    43. {
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * The query Object
    50. -
    51.     * @var Query 
    52. -
    53.     */
    54. -
    55.     protected $query;
    56. -
    57.  
    58. -
    59.     /**
    60. -
    61.     * The Querystring
    62. -
    63.     * @var string 
    64. -
    65.     */
    66. -
    67.     protected $querystring;
    68. -
    69.  
    70. -
    71.     /**
    72. -
    73.     * The tokenized Query
    74. -
    75.     * @var array 
    76. -
    77.     */
    78. -
    79.     protected $tokens = array();
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Last parsed graphPattern
    86. -
    87.     * @var int 
    88. -
    89.     */
    90. -
    91.     protected $tmp;
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Operators introduced by sparql
    98. -
    99.     * @var array 
    100. -
    101.     */
    102. -
    103.     protected static $sops array(
    104. -
    105.         'regex',
    106. -
    107.         'bound',
    108. -
    109.         'isuri',
    110. -
    111.         'isblank',
    112. -
    113.         'isliteral',
    114. -
    115.         'str',
    116. -
    117.         'lang',
    118. -
    119.         'datatype',
    120. -
    121.         'langmatches'
    122. -
    123.     );
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     *   Which order operators are to be treated.
    130. -
    131.     *   (11.3 Operator Mapping)
    132. -
    133.     *   @var array 
    134. -
    135.     */
    136. -
    137.     protected static $operatorPrecedence array(
    138. -
    139.         '||'    => 0,
    140. -
    141.         '&&'    => 1,
    142. -
    143.         '='     => 2,
    144. -
    145.         '!='    => 3,
    146. -
    147.         '<'     => 4,
    148. -
    149.         '>'     => 5,
    150. -
    151.         '<='    => 6,
    152. -
    153.         '>='    => 7,
    154. -
    155.         '*'     => 0,
    156. -
    157.         '/'     => 0,
    158. -
    159.         '+'     => 0,
    160. -
    161.         '-'     => 0,
    162. -
    163.     );
    164. -
    165.  
    166. -
    167.  
    168. -
    169.  
    170. -
    171.     /**
    172. -
    173.     * Constructor of SparqlParser
    174. -
    175.     */
    176. -
    177.     public function SparqlParser()
    178. -
    179.     {
    180. -
    181.     }
    182. -
    183.  
    184. -
    185.  
    186. -
    187.  
    188. -
    189.     /**
    190. -
    191.     * Main function of SparqlParser. Parses a query string.
    192. -
    193.     *
    194. -
    195.     * @param  String $queryString The SPARQL query
    196. -
    197.     * @return Query  The query object
    198. -
    199.     * @throws SparqlParserException
    200. -
    201.     */
    202. -
    203.     public function parse($queryString false)
    204. -
    205.     {
    206. -
    207.         $this->prepare();
    208. -
    209.  
    210. -
    211.         try {
    212. -
    213.             if ($queryString{
    214. -
    215.                 $uncommentedQuery $this->uncomment($queryString);
    216. -
    217.                 $this->tokenize($uncommentedQuery);
    218. -
    219.                 $this->querystring = $uncommentedQuery;
    220. -
    221.                 $this->parseQuery();
    222. -
    223.             else {
    224. -
    225.                 throw new SparqlParserException(
    226. -
    227.                     "Querystring is empty.",
    228. -
    229.                     null,
    230. -
    231.                     key($this->tokens)
    232. -
    233.                 );
    234. -
    235.                 $this->query->isEmpty = true;
    236. -
    237.             }
    238. -
    239.             return $this->query;
    240. -
    241.         catch (SparqlParserException $e{
    242. -
    243.             $this->error($e);
    244. -
    245.             return false;
    246. -
    247.         }
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.  
    254. -
    255.  
    256. -
    257.     /**
    258. -
    259.     *   Set all internal variables to a clear state
    260. -
    261.     *   before we start parsing.
    262. -
    263.     */
    264. -
    265.     protected function prepare()
    266. -
    267.     {
    268. -
    269.         $this->query          = new Query();
    270. -
    271.         $this->querystring    = null;
    272. -
    273.         $this->tokens         = array();
    274. -
    275.         $this->tmp            = null;
    276. -
    277.         // add the default prefixes defined in constants.php
    278. -
    279.         global $default_prefixes;
    280. -
    281.         $this->query->prefixes = $default_prefixes;
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.  
    288. -
    289.  
    290. -
    291.     /**
    292. -
    293.     * Tokenizes the querystring.
    294. -
    295.     *
    296. -
    297.     * @param  String $queryString 
    298. -
    299.     * @return void 
    300. -
    301.     */
    302. -
    303.     protected function tokenize($queryString)
    304. -
    305.     {
    306. -
    307.         $queryString trim($queryString);
    308. -
    309.         $specialChars array(" ""\t""\r""\n"",""("")","{","}",'"',"'",";","[","]");
    310. -
    311.         $len strlen($queryString);
    312. -
    313.         $this->tokens[0]='';
    314. -
    315.         $n 0;
    316. -
    317.         for ($i=0$i<$len++$i{
    318. -
    319.             if (!in_array($queryString{$i}$specialChars)) {
    320. -
    321.                 $this->tokens[$n.= $queryString{$i};
    322. -
    323.             else {
    324. -
    325.                 if ($this->tokens[$n!= ''{
    326. -
    327.                     ++$n;
    328. -
    329.                 }
    330. -
    331.                 $this->tokens[$n$queryString{$i};
    332. -
    333.                 $this->tokens[++$n'';
    334. -
    335.             }
    336. -
    337.         }
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.  
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Removes comments in the query string. Comments are
    350. -
    351.     * indicated by '#'.
    352. -
    353.     *
    354. -
    355.     * @param  String $queryString 
    356. -
    357.     * @return String The uncommented query string
    358. -
    359.     */
    360. -
    361.     protected function uncomment($queryString)
    362. -
    363.     {
    364. -
    365.         // php appears to escape quotes, so unescape them
    366. -
    367.           $queryString str_replace('\"',"'",$queryString);
    368. -
    369.           $queryString str_replace("\'",'"',$queryString);
    370. -
    371.  
    372. -
    373.         $regex ="/((\"[^\"]*\")|(\'[^\']*\')|(\<[^\>]*\>))|(#.*)/";
    374. -
    375.         return preg_replace($regex,'\1',$queryString);
    376. -
    377.     }
    378. -
    379.  
    380. -
    381.     /**
    382. -
    383.     * Starts parsing the tokenized SPARQL Query.
    384. -
    385.     *
    386. -
    387.     * @return void 
    388. -
    389.     */
    390. -
    391.     protected function parseQuery()
    392. -
    393.     {
    394. -
    395.         do {
    396. -
    397.             switch (strtolower(current($this->tokens))) {
    398. -
    399.                 case "base":
    400. -
    401.                     $this->parseBase();
    402. -
    403.                     break;
    404. -
    405.                 case "prefix":
    406. -
    407.                     $this->parsePrefix();
    408. -
    409.                     break;
    410. -
    411.                 case "select":
    412. -
    413.                     $this->parseSelect();
    414. -
    415.                     break;
    416. -
    417.                 case "describe":
    418. -
    419.                     $this->parseDescribe();
    420. -
    421.                     break;
    422. -
    423.                 case "ask":
    424. -
    425.                     $this->parseAsk('ask');
    426. -
    427.                     break;
    428. -
    429.                 case "count":
    430. -
    431.                     $this->parseAsk('count');
    432. -
    433.                     break;
    434. -
    435.                 case "from":
    436. -
    437.                     $this->parseFrom();
    438. -
    439.                     break;
    440. -
    441.                 case "construct":
    442. -
    443.                     $this->parseConstruct();
    444. -
    445.                     break;
    446. -
    447.                 case "where":
    448. -
    449.                     $this->parseWhere();
    450. -
    451.                     $this->parseModifier();
    452. -
    453.                     break;
    454. -
    455.                 case "{":
    456. -
    457.                     prev($this->tokens);
    458. -
    459.                     $this->parseWhere();
    460. -
    461.                     $this->parseModifier();
    462. -
    463.                     break;
    464. -
    465.             }
    466. -
    467.         while (next($this->tokens));
    468. -
    469.  
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.  
    476. -
    477.  
    478. -
    479.     /**
    480. -
    481.     * Parses the BASE part of the query.
    482. -
    483.     *
    484. -
    485.     * @return void 
    486. -
    487.     * @throws SparqlParserException
    488. -
    489.     */
    490. -
    491.     protected function parseBase()
    492. -
    493.     {
    494. -
    495.         $this->_fastForward();
    496. -
    497.         if ($this->iriCheck(current($this->tokens))) {
    498. -
    499.             $this->query->setBase(current($this->tokens));
    500. -
    501.         else {
    502. -
    503.             $msg current($this->tokens);
    504. -
    505.             $msg preg_replace('/</''&lt;'$msg);
    506. -
    507.             throw new SparqlParserException(
    508. -
    509.                 "IRI expected",
    510. -
    511.                 null,
    512. -
    513.                 key($this->tokens)
    514. -
    515.             );
    516. -
    517.         }
    518. -
    519.     }
    520. -
    521.  
    522. -
    523.  
    524. -
    525.  
    526. -
    527.     /**
    528. -
    529.     * Adds a new namespace prefix to the query object.
    530. -
    531.     *
    532. -
    533.     * @return void 
    534. -
    535.     * @throws SparqlParserException
    536. -
    537.     */
    538. -
    539.     protected function parsePrefix()
    540. -
    541.     {
    542. -
    543.         $this->_fastForward();
    544. -
    545.         $prefix substr(current($this->tokens)0-1);
    546. -
    547.         $this->_fastForward();
    548. -
    549.         if ($this->iriCheck(current($this->tokens))) {
    550. -
    551.             $uri substr(current($this->tokens)1-1);
    552. -
    553.             $this->query->addPrefix($prefix$uri);
    554. -
    555.         else {
    556. -
    557.             $msg current($this->tokens);
    558. -
    559.             $msg preg_replace('/</''&lt;'$msg);
    560. -
    561.             throw new SparqlParserException(
    562. -
    563.                 "IRI expected",
    564. -
    565.                 null,
    566. -
    567.                 key($this->tokens)
    568. -
    569.             );
    570. -
    571.         }
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.  
    578. -
    579.  
    580. -
    581.     /**
    582. -
    583.     * Parses the SELECT part of a query.
    584. -
    585.     *
    586. -
    587.     * @return void 
    588. -
    589.     * @throws SparqlParserException
    590. -
    591.     */
    592. -
    593.     protected function parseSelect()
    594. -
    595.     {
    596. -
    597.         while (strtolower(current($this->tokens)) != 'from' &
    598. -
    599.                strtolower(current($this->tokens)) != 'where' &
    600. -
    601.                strtolower(current($this->tokens)) != "{"
    602. -
    603.         ){
    604. -
    605.             $this->_fastForward();
    606. -
    607.             if ($this->varCheck(current($this->tokens))
    608. -
    609.                 | strtolower(current($this->tokens)) == '*'
    610. -
    611.             ){
    612. -
    613.                 $this->query->addVariable(current($this->tokens));
    614. -
    615.                 if (!$this->query->getResultForm()) {
    616. -
    617.                     $this->query->setResultForm('select');
    618. -
    619.                 }
    620. -
    621.             else {
    622. -
    623.                 if (strtolower(current($this->tokens))=='distinct'{
    624. -
    625.                     $this->query->setResultForm('select distinct');
    626. -
    627.                     $this->_fastForward();
    628. -
    629.                     if ($this->varCheck(current($this->tokens))
    630. -
    631.                         | strtolower(current($this->tokens))=='*'
    632. -
    633.                     {
    634. -
    635.                         $this->query->addVariable(current($this->tokens));
    636. -
    637.                     else {
    638. -
    639.                         throw new SparqlParserException(
    640. -
    641.                             "Variable or '*' expected.",
    642. -
    643.                             null,
    644. -
    645.                             key($this->tokens)
    646. -
    647.                         );
    648. -
    649.                     }
    650. -
    651.                 }
    652. -
    653.             }
    654. -
    655.  
    656. -
    657.             if (!current($this->tokens)) {
    658. -
    659.                 throw new SparqlParserException(
    660. -
    661.                     "Unexpected end of File.",
    662. -
    663.                     null,
    664. -
    665.                     key($this->tokens)
    666. -
    667.                 );
    668. -
    669.                 break;
    670. -
    671.             }
    672. -
    673.         }
    674. -
    675.         prev($this->tokens);
    676. -
    677.     }
    678. -
    679.  
    680. -
    681.  
    682. -
    683.     /**
    684. -
    685.     * Adds a new variable to the query and sets result form to 'DESCRIBE'.
    686. -
    687.     *
    688. -
    689.     * @return void 
    690. -
    691.     */
    692. -
    693.     protected function parseDescribe()
    694. -
    695.     {
    696. -
    697.         while(strtolower(current($this->tokens))!='from'strtolower(current($this->tokens))!='where'){
    698. -
    699.             $this->_fastForward();
    700. -
    701.             if($this->varCheck(current($this->tokens))|$this->iriCheck(current($this->tokens))){
    702. -
    703.                 $this->query->addVariable(current($this->tokens));
    704. -
    705.                 if(!$this->query->getResultForm())
    706. -
    707.                     $this->query->setResultForm('describe');
    708. -
    709.             }
    710. -
    711.             if(!current($this->tokens))
    712. -
    713.             break;
    714. -
    715.         }
    716. -
    717.         prev($this->tokens);
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     /**
    724. -
    725.     * Sets result form to 'ASK' and 'COUNT'.
    726. -
    727.     *
    728. -
    729.     * @param string $form  if it's an ASK or COUNT query
    730. -
    731.     * @return void 
    732. -
    733.     */
    734. -
    735.     protected function parseAsk($form){
    736. -
    737.         $this->query->setResultForm($form);
    738. -
    739.         $this->_fastForward();
    740. -
    741.         if(current($this->tokens)=="{")
    742. -
    743.             $this->_rewind();
    744. -
    745.         $this->parseWhere();
    746. -
    747.         $this->parseModifier();
    748. -
    749.     }
    750. -
    751.  
    752. -
    753.     /**
    754. -
    755.     * Parses the FROM clause.
    756. -
    757.     *
    758. -
    759.     * @return void 
    760. -
    761.     * @throws SparqlParserException
    762. -
    763.     */
    764. -
    765.     protected function parseFrom(){
    766. -
    767.         $this->_fastForward();
    768. -
    769.         if(strtolower(current($this->tokens))!='named'){
    770. -
    771.             if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
    772. -
    773.                 $this->query->addFrom(new Resource(substr(current($this->tokens),1,-1)));
    774. -
    775.             }else if($this->varCheck(current($this->tokens))){
    776. -
    777.                 $this->query->addFrom(current($this->tokens));
    778. -
    779.             }else{
    780. -
    781.                 throw new SparqlParserException("Variable, Iri or qname expected in FROM ",null,key($this->tokens));
    782. -
    783.             }
    784. -
    785.             $this->query->addFrom(current($this->tokens));
    786. -
    787.         }else{
    788. -
    789.             $this->_fastForward();
    790. -
    791.             if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
    792. -
    793.                 $this->query->addFromNamed(new Resource(substr(current($this->tokens),1,-1)));
    794. -
    795.             }else if($this->varCheck(current($this->tokens))){
    796. -
    797.                 $this->query->addFromNamed(current($this->tokens));
    798. -
    799.             }else{
    800. -
    801.                 throw new SparqlParserException("Variable, Iri or qname expected in FROM NAMED ",null,key($this->tokens));
    802. -
    803.             }
    804. -
    805.         }
    806. -
    807.     }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.     /**
    814. -
    815.     * Parses the CONSTRUCT clause.
    816. -
    817.     *
    818. -
    819.     * @return void 
    820. -
    821.     * @throws SparqlParserException
    822. -
    823.     */
    824. -
    825.     protected function parseConstruct(){
    826. -
    827.         $this->_fastForward();
    828. -
    829.         $this->query->setResultForm('construct');
    830. -
    831.         if(current($this->tokens)=="{"){
    832. -
    833.             $this->parseGraphPattern(false,false,false,true);
    834. -
    835.         }else{
    836. -
    837.             throw new SparqlParserException("Unable to parse CONSTRUCT part. '{' expected. ",null,key($this->tokens));
    838. -
    839.         }
    840. -
    841.         $this->parseWhere();
    842. -
    843.         $this->parseModifier();
    844. -
    845.     }
    846. -
    847.  
    848. -
    849.  
    850. -
    851.     /**
    852. -
    853.     * Parses the WHERE clause.
    854. -
    855.     *
    856. -
    857.     * @return void 
    858. -
    859.     * @throws SparqlParserException
    860. -
    861.     */
    862. -
    863.     protected function parseWhere(){
    864. -
    865.         $this->_fastForward();
    866. -
    867.         if(current($this->tokens)=="{"){
    868. -
    869.             $this->parseGraphPattern();
    870. -
    871.         }else{
    872. -
    873.             throw new SparqlParserException("Unable to parse WHERE part. '{' expected in Query. ",null,key($this->tokens));
    874. -
    875.         }
    876. -
    877.     }
    878. -
    879.  
    880. -
    881.  
    882. -
    883.  
    884. -
    885.     /**
    886. -
    887.     * Checks if $token is a variable.
    888. -
    889.     *
    890. -
    891.     * @param  String  $token The token
    892. -
    893.     * @return boolean TRUE if the token is a variable false if not
    894. -
    895.     */
    896. -
    897.     protected function varCheck($token)
    898. -
    899.     {
    900. -
    901.         if (isset($token[0]&& ($token{0== '$' || $token{0== '?')) {
    902. -
    903.             $this->query->addVar($token);
    904. -
    905.             return true;
    906. -
    907.         }
    908. -
    909.         return false;
    910. -
    911.     }
    912. -
    913.  
    914. -
    915.     /**
    916. -
    917.     * Checks if $token is an IRI.
    918. -
    919.     *
    920. -
    921.     * @param  String  $token The token
    922. -
    923.     * @return boolean TRUE if the token is an IRI false if not
    924. -
    925.     */
    926. -
    927.     protected function iriCheck($token){
    928. -
    929.         $pattern="/^<[^>]*>\.?$/";
    930. -
    931.         if(preg_match($pattern,$token)>0)
    932. -
    933.         return true;
    934. -
    935.         return false;
    936. -
    937.     }
    938. -
    939.  
    940. -
    941.  
    942. -
    943.     /**
    944. -
    945.     * Checks if $token is a Blanknode.
    946. -
    947.     *
    948. -
    949.     * @param  String  $token The token
    950. -
    951.     * @return boolean TRUE if the token is BNode false if not
    952. -
    953.     */
    954. -
    955.     protected function bNodeCheck($token){
    956. -
    957.         if($token{0== "_")
    958. -
    959.         return true;
    960. -
    961.         else
    962. -
    963.         return false;
    964. -
    965.     }
    966. -
    967.  
    968. -
    969.  
    970. -
    971.     /**
    972. -
    973.     * Checks if $token is a qname.
    974. -
    975.     *
    976. -
    977.     * @param  String  $token The token
    978. -
    979.     * @return boolean TRUE if the token is a qname false if not
    980. -
    981.     * @throws SparqlParserException
    982. -
    983.     */
    984. -
    985.     protected function qnameCheck($token)
    986. -
    987.     {
    988. -
    989.         $pattern="/^([^:^\<]*):([^:]*)$/";
    990. -
    991.         if (preg_match($pattern,$token,$hits)>0{
    992. -
    993.             $prefs $this->query->getPrefixes();
    994. -
    995.             if (isset($prefs{$hits{1}})) {
    996. -
    997.                 return true;
    998. -
    999.             }
    1000. -
    1001.             if ($hits{1== "_"{
    1002. -
    1003.                 return true;
    1004. -
    1005.             }
    1006. -
    1007.             throw new SparqlParserException("Unbound Prefix: <i>".$hits{1}."</i>",null,key($this->tokens));
    1008. -
    1009.         else {
    1010. -
    1011.             return false;
    1012. -
    1013.         }
    1014. -
    1015.     }
    1016. -
    1017.  
    1018. -
    1019.  
    1020. -
    1021.     /**
    1022. -
    1023.     * Checks if $token is a Literal.
    1024. -
    1025.     *
    1026. -
    1027.     * @param  String  $token The token
    1028. -
    1029.     * @return boolean TRUE if the token is a Literal false if not
    1030. -
    1031.     */
    1032. -
    1033.     protected function literalCheck($token){
    1034. -
    1035.         $pattern="/^[\"\'].*$/";
    1036. -
    1037.         if(preg_match($pattern,$token)>0)
    1038. -
    1039.         return true;
    1040. -
    1041.         return false;
    1042. -
    1043.     }
    1044. -
    1045.  
    1046. -
    1047.     /**
    1048. -
    1049.     * FastForward until next token which is not blank.
    1050. -
    1051.     *
    1052. -
    1053.     * @return void 
    1054. -
    1055.     */
    1056. -
    1057.     protected function _fastForward(){
    1058. -
    1059.         next($this->tokens);
    1060. -
    1061.         while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
    1062. -
    1063.             next($this->tokens);
    1064. -
    1065.         }
    1066. -
    1067.         return;
    1068. -
    1069.     }
    1070. -
    1071.  
    1072. -
    1073.     /**
    1074. -
    1075.     * Rewind until next token which is not blank.
    1076. -
    1077.     *
    1078. -
    1079.     * @return void 
    1080. -
    1081.     */
    1082. -
    1083.     protected function _rewind(){
    1084. -
    1085.         prev($this->tokens);
    1086. -
    1087.         while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
    1088. -
    1089.             prev($this->tokens);
    1090. -
    1091.         }
    1092. -
    1093.         return;
    1094. -
    1095.     }
    1096. -
    1097.  
    1098. -
    1099.     /**
    1100. -
    1101.     * Parses a graph pattern.
    1102. -
    1103.     *
    1104. -
    1105.     * @param  int     $optional Optional graph pattern
    1106. -
    1107.     * @param  int     $union    Union graph pattern
    1108. -
    1109.     * @param  string  $graph    Graphname
    1110. -
    1111.     * @param  boolean $constr   TRUE if the pattern is a construct pattern
    1112. -
    1113.     * @return void 
    1114. -
    1115.     */
    1116. -
    1117.     protected function parseGraphPattern($optional false$union false$graph false,$constr false$external false){
    1118. -
    1119.         $pattern $this->query->getNewPattern($constr);
    1120. -
    1121.         if(is_int($optional)){
    1122. -
    1123.             $pattern->addOptional($optional);
    1124. -
    1125.         }else{
    1126. -
    1127.             $this->tmp = $pattern->getId();
    1128. -
    1129.         }
    1130. -
    1131.         if(is_int($union)){
    1132. -
    1133.             $pattern->addUnion($union);
    1134. -
    1135.         }
    1136. -
    1137.         if($graph != false){
    1138. -
    1139.             $pattern->setGraphname($graph);
    1140. -
    1141.         }
    1142. -
    1143.  
    1144. -
    1145.         $this->_fastForward();
    1146. -
    1147.  
    1148. -
    1149.         do {
    1150. -
    1151.             switch (strtolower(current($this->tokens))) {
    1152. -
    1153.                 case "graph":
    1154. -
    1155.                     $this->parseGraph();
    1156. -
    1157.                     break;
    1158. -
    1159.                 case "union":
    1160. -
    1161.                     $this->_fastForward();
    1162. -
    1163.                     $this->parseGraphPattern(false,$this->tmp);
    1164. -
    1165.                     break;
    1166. -
    1167.                 case "optional":
    1168. -
    1169.                     $this->_fastForward();
    1170. -
    1171.                     $this->parseGraphPattern($this->tmp,false);
    1172. -
    1173.                     break;
    1174. -
    1175.                 case "filter":
    1176. -
    1177.                     $this->parseConstraint($pattern,true);
    1178. -
    1179.                     $this->_fastForward();
    1180. -
    1181.                     break;
    1182. -
    1183.                 case ".":
    1184. -
    1185.                     $this->_fastForward();
    1186. -
    1187.                     break;
    1188. -
    1189.                 case "{":
    1190. -
    1191.                     $this->parseGraphPattern(false,false);
    1192. -
    1193.                     break;
    1194. -
    1195.                 case "}":
    1196. -
    1197.                     $pattern->open false;
    1198. -
    1199.                     break;
    1200. -
    1201.                 default:
    1202. -
    1203.                     $this->parseTriplePattern($pattern);
    1204. -
    1205.                     break;
    1206. -
    1207.             }
    1208. -
    1209.         while ($pattern->open);
    1210. -
    1211.  
    1212. -
    1213.         if ($external{
    1214. -
    1215.             return $pattern;
    1216. -
    1217.         }
    1218. -
    1219.         $this->_fastForward();
    1220. -
    1221.     }
    1222. -
    1223.  
    1224. -
    1225.     /**
    1226. -
    1227.     * Parses a triple pattern.
    1228. -
    1229.     *
    1230. -
    1231.     * @param  GraphPattern $pattern 
    1232. -
    1233.     * @return void 
    1234. -
    1235.     */
    1236. -
    1237.     protected function parseTriplePattern(&$pattern)
    1238. -
    1239.     {
    1240. -
    1241.         $trp      Array();
    1242. -
    1243.         $prev     false;
    1244. -
    1245.         $prevPred false;
    1246. -
    1247.         $cont     true;
    1248. -
    1249.         $sub      "";
    1250. -
    1251.         $pre      "";
    1252. -
    1253.         $tmp      "";
    1254. -
    1255.         $tmpPred  "";
    1256. -
    1257.         $obj      "";
    1258. -
    1259.         do {
    1260. -
    1261.             switch (strtolower(current($this->tokens))) {
    1262. -
    1263.                 case false:
    1264. -
    1265.                     $cont          false;
    1266. -
    1267.                     $pattern->open false;
    1268. -
    1269.                     break;
    1270. -
    1271.                 case "filter":
    1272. -
    1273.                     $this->parseConstraint($pattern,false);
    1274. -
    1275.                     $this->_fastForward();
    1276. -
    1277.                     break;
    1278. -
    1279.                 case "optional":
    1280. -
    1281.                     $this->_fastForward();
    1282. -
    1283.                     $this->parseGraphPattern($pattern->getId(),false);
    1284. -
    1285.                     $cont false;
    1286. -
    1287.                     break;
    1288. -
    1289.                 case ";":
    1290. -
    1291.                     $prev true;
    1292. -
    1293.                     $this->_fastForward();
    1294. -
    1295.                     break;
    1296. -
    1297.                 case ".":
    1298. -
    1299.                     $prev false;
    1300. -
    1301.                     $this->_fastForward();
    1302. -
    1303.                     break;
    1304. -
    1305.                 case "graph":
    1306. -
    1307.                     $this->parseGraph();
    1308. -
    1309.                     break;
    1310. -
    1311.                 case ",":
    1312. -
    1313.                     $prev     true;
    1314. -
    1315.                     $prevPred true;
    1316. -
    1317.                     $this->_fastForward();
    1318. -
    1319.                     break;
    1320. -
    1321.                 case "}":
    1322. -
    1323.                     $prev false;
    1324. -
    1325.                     $pattern->open false;
    1326. -
    1327.                     $cont false;
    1328. -
    1329.                     break;
    1330. -
    1331.                 case "[":
    1332. -
    1333.                     $prev true;
    1334. -
    1335.                     $tmp  $this->parseNode($this->query->getBlanknodeLabel());
    1336. -
    1337.                     $this->_fastForward();
    1338. -
    1339.                     break;
    1340. -
    1341.                 case "]":
    1342. -
    1343.                     $prev true;
    1344. -
    1345.                     $this->_fastForward();
    1346. -
    1347.                     break;
    1348. -
    1349.                 case "(":
    1350. -
    1351.                     $prev true;
    1352. -
    1353.                     $tmp $this->parseCollection($trp);
    1354. -
    1355.                     $this->_fastForward();
    1356. -
    1357.                     break;
    1358. -
    1359.                 case false:
    1360. -
    1361.                     $cont false;
    1362. -
    1363.                     $pattern->open false;
    1364. -
    1365.                     break;
    1366. -
    1367.                 default:
    1368. -
    1369.                     if ($prev{
    1370. -
    1371.                         $sub $tmp;
    1372. -
    1373.                     else {
    1374. -
    1375.                         $sub $this->parseNode();
    1376. -
    1377.                         $this->_fastForward();
    1378. -
    1379.                         $tmp     $sub;
    1380. -
    1381.                     }
    1382. -
    1383.                     if ($prevPred{
    1384. -
    1385.                         $pre $tmpPred;
    1386. -
    1387.                     else {
    1388. -
    1389.                         $pre $this->parseNode();
    1390. -
    1391.                         $this->_fastForward();
    1392. -
    1393.                         $tmpPred $pre;
    1394. -
    1395.                     }
    1396. -
    1397.                     if (current($this->tokens)=="["{
    1398. -
    1399.                         $tmp  $this->parseNode($this->query->getBlanknodeLabel());
    1400. -
    1401.                         $prev true;
    1402. -
    1403.                         $obj $tmp;
    1404. -
    1405.                     else if (current($this->tokens)=="("{
    1406. -
    1407.                         $obj $this->parseCollection($trp);
    1408. -
    1409.                     else {
    1410. -
    1411.                         $obj $this->parseNode();
    1412. -
    1413.                     }
    1414. -
    1415.                     $trp[new QueryTriple($sub,$pre,$obj);
    1416. -
    1417.                     $this->_fastForward();
    1418. -
    1419.                     break;
    1420. -
    1421.  
    1422. -
    1423.             }
    1424. -
    1425.         while ($cont);
    1426. -
    1427.         if (count($trp0{
    1428. -
    1429.             $pattern->addTriplePattern($trp);
    1430. -
    1431.         }
    1432. -
    1433.     }
    1434. -
    1435.  
    1436. -
    1437.  
    1438. -
    1439.  
    1440. -
    1441.     /**
    1442. -
    1443.     * Parses a value constraint.
    1444. -
    1445.     *
    1446. -
    1447.     * @param GraphPattern $pattern 
    1448. -
    1449.     * @param boolean $outer     If the constraint is an outer one.
    1450. -
    1451.     * @return void 
    1452. -
    1453.     */
    1454. -
    1455.     protected function parseConstraint(&$pattern$outer)
    1456. -
    1457.     {
    1458. -
    1459.         $constraint new Constraint();
    1460. -
    1461.         $constraint->setOuterFilter($outer);
    1462. -
    1463.         $this->_fastForward();
    1464. -
    1465.         $this->_rewind();
    1466. -
    1467.         $nBeginKey key($this->tokens);
    1468. -
    1469.         $constraint->setTree(
    1470. -
    1471.             $t $this->parseConstraintTree()
    1472. -
    1473.         );
    1474. -
    1475.  
    1476. -
    1477.         $nEndKey key($this->tokens);
    1478. -
    1479.         if (current($this->tokens== '}'{
    1480. -
    1481.             prev($this->tokens);
    1482. -
    1483.         }
    1484. -
    1485.  
    1486. -
    1487.         //for backwards compatibility with the normal sparql engine
    1488. -
    1489.         // which does not use the tree array currently
    1490. -
    1491.         $expression trim(implode(
    1492. -
    1493.             '',
    1494. -
    1495.             array_slice(
    1496. -
    1497.                     $this->tokens,
    1498. -
    1499.                     $nBeginKey 1,
    1500. -
    1501.                     $nEndKey $nBeginKey 1
    1502. -
    1503.             )
    1504. -
    1505.         ));
    1506. -
    1507.         if ($expression[0== '(' && substr($expression-1== ')'{
    1508. -
    1509.             $expression trim(substr($expression1-1));
    1510. -
    1511.         }
    1512. -
    1513.         $constraint->addExpression($expression);
    1514. -
    1515.  
    1516. -
    1517.         $pattern->addConstraint($constraint);
    1518. -
    1519.     }//protected function parseConstraint(&$pattern, $outer)
    1520. -
    1521.  
    1522. -
    1523.  
    1524. -
    1525.  
    1526. -
    1527.     /**
    1528. -
    1529.     *   Parses a constraint string recursively.
    1530. -
    1531.     *
    1532. -
    1533.     *   The result array is one "element" which may contain subelements.
    1534. -
    1535.     *   All elements have one key "type" that determines which other
    1536. -
    1537.     *   array keys the element array has. Valid types are:
    1538. -
    1539.     *   - "value":
    1540. -
    1541.     *       Just a plain value with a value key, nothing else
    1542. -
    1543.     *   - "function"
    1544. -
    1545.     *       A function has a name and an array of parameter(s). Each parameter
    1546. -
    1547.     *       is an element.
    1548. -
    1549.     *   - "equation"
    1550. -
    1551.     *       An equation has an operator, and operand1 and operand2 which
    1552. -
    1553.     *       are elements themselves
    1554. -
    1555.     *   Any element may have the "negated" value set to true, which means
    1556. -
    1557.     *   that is is - negated (!).
    1558. -
    1559.     *
    1560. -
    1561.     *   @internal The functionality of this method is being unit-tested
    1562. -
    1563.     *    in testSparqlParserTests::testParseFilter()
    1564. -
    1565.     *    "equation'-elements have another key "level" which is to be used
    1566. -
    1567.     *    internally only.
    1568. -
    1569.     *
    1570. -
    1571.     *   @return array Nested tree array representing the filter
    1572. -
    1573.     */
    1574. -
    1575.     protected function parseConstraintTree($nLevel 0$bParameter false)
    1576. -
    1577.     {
    1578. -
    1579.         $tree       array();
    1580. -
    1581.         $part       array();
    1582. -
    1583.         $chQuotes   null;
    1584. -
    1585.         $strQuoted  '';
    1586. -
    1587.  
    1588. -
    1589.         while ($tok next($this->tokens)) {
    1590. -
    1591.             if ($chQuotes !== null && $tok != $chQuotes{
    1592. -
    1593.                 $strQuoted .= $tok;
    1594. -
    1595.                 continue;
    1596. -
    1597.             else if ($tok == ')' || $tok == '}' || $tok == '.'{
    1598. -
    1599.                 break;
    1600. -
    1601.             }
    1602. -
    1603.  
    1604. -
    1605.             switch ($tok{
    1606. -
    1607.                 case '"':
    1608. -
    1609.                 case '\'':
    1610. -
    1611.                     if ($chQuotes === null{
    1612. -
    1613.                         $chQuotes  $tok;
    1614. -
    1615.                         $strQuoted '';
    1616. -
    1617.                     else {
    1618. -
    1619.                         $chQuotes null;
    1620. -
    1621.                         $part[array(
    1622. -
    1623.                             'type'  => 'value',
    1624. -
    1625.                             'value' => $strQuoted,
    1626. -
    1627.                             'quoted'=> true
    1628. -
    1629.                         );
    1630. -
    1631.                     }
    1632. -
    1633.                     continue 2;
    1634. -
    1635.                     break;
    1636. -
    1637.  
    1638. -
    1639.                 case '(':
    1640. -
    1641.                     $bFunc1 = isset($part[0]['type']&& $part[0]['type'== 'value';
    1642. -
    1643.                     $bFunc2 = isset($tree['type'])    && $tree['type']    == 'equation'
    1644. -
    1645.                            && isset($tree['operand2']&& isset($tree['operand2']['value']);
    1646. -
    1647.                     $part[$this->parseConstraintTree(
    1648. -
    1649.                         $nLevel 1,
    1650. -
    1651.                         $bFunc1 || $bFunc2
    1652. -
    1653.                     );
    1654. -
    1655.  
    1656. -
    1657.                     if ($bFunc1{
    1658. -
    1659.                         $tree['type']       'function';
    1660. -
    1661.                         $tree['name']       $part[0]['value'];
    1662. -
    1663.                         self::fixNegationInFuncName($tree);
    1664. -
    1665.                         if (isset($part[1]['type'])) {
    1666. -
    1667.                             $part[1array($part[1]);
    1668. -
    1669.                         }
    1670. -
    1671.                         $tree['parameter']  $part[1];
    1672. -
    1673.                         $part array();
    1674. -
    1675.                     else if ($bFunc2{
    1676. -
    1677.                         $tree['operand2']['type']       'function';
    1678. -
    1679.                         $tree['operand2']['name']       $tree['operand2']['value'];
    1680. -
    1681.                         self::fixNegationInFuncName($tree['operand2']);
    1682. -
    1683.                         $tree['operand2']['parameter']  $part[0];
    1684. -
    1685.                         unset($tree['operand2']['value']);
    1686. -
    1687.                         unset($tree['operand2']['quoted']);
    1688. -
    1689.                         $part array();
    1690. -
    1691.                     }
    1692. -
    1693.                     continue 2;
    1694. -
    1695.                     break;
    1696. -
    1697.  
    1698. -
    1699.                 case ' ':
    1700. -
    1701.                 case "\t":
    1702. -
    1703.                     continue 2;
    1704. -
    1705.  
    1706. -
    1707.                 case '=':
    1708. -
    1709.                 case '>':
    1710. -
    1711.                 case '<':
    1712. -
    1713.                 case '<=':
    1714. -
    1715.                 case '>=':
    1716. -
    1717.                 case '!=':
    1718. -
    1719.                 case '&&':
    1720. -
    1721.                 case '||':
    1722. -
    1723.                     if (isset($tree['type']&& $tree['type'== 'equation'
    1724. -
    1725.                         && isset($tree['operand2'])) {
    1726. -
    1727.                         //previous equation open
    1728. -
    1729.                         $part array($tree);
    1730. -
    1731.                     else if (isset($tree['type']&& $tree['type'!= 'equation'{
    1732. -
    1733.                         $part array($tree);
    1734. -
    1735.                         $tree array();
    1736. -
    1737.                     }
    1738. -
    1739.                     $tree['type']       'equation';
    1740. -
    1741.                     $tree['level']      $nLevel;
    1742. -
    1743.                     $tree['operator']   $tok;
    1744. -
    1745.                     $tree['operand1']   $part[0];
    1746. -
    1747.                     unset($tree['operand2']);
    1748. -
    1749.                     $part array();
    1750. -
    1751.                     continue 2;
    1752. -
    1753.                     break;
    1754. -
    1755.  
    1756. -
    1757.                 case '!':
    1758. -
    1759.                     if ($tree != array()) {
    1760. -
    1761.                         throw new SparqlParserException(
    1762. -
    1763.                             'Unexpected "!" negation in constraint.'
    1764. -
    1765.                         );
    1766. -
    1767.                     }
    1768. -
    1769.                     $tree['negated'true;
    1770. -
    1771.                     continue 2;
    1772. -
    1773.  
    1774. -
    1775.                 case ',':
    1776. -
    1777.                     //parameter separator
    1778. -
    1779.                     if (count($part== && !isset($tree['type'])) {
    1780. -
    1781.                         throw new SparqlParserException(
    1782. -
    1783.                             'Unexpected comma'
    1784. -
    1785.                         );
    1786. -
    1787.                     }
    1788. -
    1789.                     $bParameter true;
    1790. -
    1791.                     if (count($part== 0{
    1792. -
    1793.                         $part[$tree;
    1794. -
    1795.                         $tree array();
    1796. -
    1797.                     }
    1798. -
    1799.                     continue 2;
    1800. -
    1801.  
    1802. -
    1803.                 default:
    1804. -
    1805.                     break;
    1806. -
    1807.             }
    1808. -
    1809.  
    1810. -
    1811.             if ($this->varCheck($tok)) {
    1812. -
    1813.                 $part[array(
    1814. -
    1815.                     'type'      => 'value',
    1816. -
    1817.                     'value'     => $tok,
    1818. -
    1819.                     'quoted'    => false
    1820. -
    1821.                 );
    1822. -
    1823.             else if (substr($tok02== '^^'{
    1824. -
    1825.                 $part[count($part1]['datatype']
    1826. -
    1827.                     = $this->query->getFullUri(substr($tok2));
    1828. -
    1829.             else if ($tok[0== '@'{
    1830. -
    1831.                 $part[count($part1]['language'substr($tok1);
    1832. -
    1833.             else {
    1834. -
    1835.                 $part[array(
    1836. -
    1837.                     'type'      => 'value',
    1838. -
    1839.                     'value'     => $tok,
    1840. -
    1841.                     'quoted'    => false
    1842. -
    1843.                 );
    1844. -
    1845.             }
    1846. -
    1847.  
    1848. -
    1849.             if (isset($tree['type']&& $tree['type'== 'equation' && isset($part[0])) {
    1850. -
    1851.                 $tree['operand2'$part[0];
    1852. -
    1853.                 self::balanceTree($tree);
    1854. -
    1855.                 $part array();
    1856. -
    1857.             }
    1858. -
    1859.         }
    1860. -
    1861.  
    1862. -
    1863.         if (!isset($tree['type']&& $bParameter{
    1864. -
    1865.             return $part;
    1866. -
    1867.         else if (isset($tree['type']&& $tree['type'== 'equation'
    1868. -
    1869.             && isset($tree['operand1']&& !isset($tree['operand2'])
    1870. -
    1871.             && isset($part[0])) {
    1872. -
    1873.             $tree['operand2'$part[0];
    1874. -
    1875.             self::balanceTree($tree);
    1876. -
    1877.         }
    1878. -
    1879.  
    1880. -
    1881.         if (!isset($tree['type']&& isset($part[0])) {
    1882. -
    1883.             if (isset($tree['negated'])) {
    1884. -
    1885.                 $part[0]['negated'true;
    1886. -
    1887.             }
    1888. -
    1889.             return $part[0];
    1890. -
    1891.         }
    1892. -
    1893.  
    1894. -
    1895.         return $tree;
    1896. -
    1897.     }//protected function parseConstraintTree($nLevel = 0, $bParameter = false)
    1898. -
    1899.  
    1900. -
    1901.  
    1902. -
    1903.  
    1904. -
    1905.     /**
    1906. -
    1907.     *   "Balances" the filter tree in the way that operators on the same
    1908. -
    1909.     *   level are nested according to their precedence defined in
    1910. -
    1911.     *   $operatorPrecedence array.
    1912. -
    1913.     *
    1914. -
    1915.     *   @param array $tree  Tree to be modified
    1916. -
    1917.     */
    1918. -
    1919.     protected static function balanceTree(&$tree)
    1920. -
    1921.     {
    1922. -
    1923.         if (
    1924. -
    1925.             isset($tree['type']&& $tree['type'== 'equation'
    1926. -
    1927.          && isset($tree['operand1']['type']&& $tree['operand1']['type'== 'equation'
    1928. -
    1929.          && $tree['level'== $tree['operand1']['level']
    1930. -
    1931.          && self::$operatorPrecedence[$tree['operator']] self::$operatorPrecedence[$tree['operand1']['operator']]
    1932. -
    1933.         {
    1934. -
    1935.             $op2 array(
    1936. -
    1937.                 'type'      => 'equation',
    1938. -
    1939.                 'level'     => $tree['level'],
    1940. -
    1941.                 'operator'  => $tree['operator'],
    1942. -
    1943.                 'operand1'  => $tree['operand1']['operand2'],
    1944. -
    1945.                 'operand2'  => $tree['operand2']
    1946. -
    1947.             );
    1948. -
    1949.             $tree['operator']   $tree['operand1']['operator'];
    1950. -
    1951.             $tree['operand1']   $tree['operand1']['operand1'];
    1952. -
    1953.             $tree['operand2']   $op2;
    1954. -
    1955.         }
    1956. -
    1957.     }//protected static function balanceTree(&$tree)
    1958. -
    1959.  
    1960. -
    1961.  
    1962. -
    1963.  
    1964. -
    1965.     protected static function fixNegationInFuncName(&$tree)
    1966. -
    1967.     {
    1968. -
    1969.         if ($tree['type'== 'function' && $tree['name'][0== '!'{
    1970. -
    1971.             $tree['name'substr($tree['name']1);
    1972. -
    1973.             if (!isset($tree['negated'])) {
    1974. -
    1975.                 $tree['negated'true;
    1976. -
    1977.             else {
    1978. -
    1979.                 unset($tree['negated']);
    1980. -
    1981.             }
    1982. -
    1983.             //perhaps more !!
    1984. -
    1985.             self::fixNegationInFuncName($tree);
    1986. -
    1987.         }
    1988. -
    1989.     }//protected static function fixNegationInFuncName(&$tree)
    1990. -
    1991.  
    1992. -
    1993.  
    1994. -
    1995.  
    1996. -
    1997.     /**
    1998. -
    1999.     * Parses a bracketted expression.
    2000. -
    2001.     *
    2002. -
    2003.     * @param  Constraint $constraint 
    2004. -
    2005.     * @return void 
    2006. -
    2007.     * @throws SparqlParserException
    2008. -
    2009.     */
    2010. -
    2011.     protected function parseBrackettedExpression(&$constraint)
    2012. -
    2013.     {
    2014. -
    2015.         $open 1;
    2016. -
    2017.         $exp "";
    2018. -
    2019.         $this->_fastForward();
    2020. -
    2021.         while ($open != && current($this->tokens)!= false{
    2022. -
    2023.             switch (current($this->tokens)) {
    2024. -
    2025.                 case "(":
    2026. -
    2027.                     $open++;
    2028. -
    2029.                     $exp $exp current($this->tokens);
    2030. -
    2031.                     break;
    2032. -
    2033.                 case ")":
    2034. -
    2035.                     $open--;
    2036. -
    2037.                     if($open != 0){
    2038. -
    2039.                         $exp $exp current($this->tokens);
    2040. -
    2041.                     }
    2042. -
    2043.                     break;
    2044. -
    2045.                 case false:
    2046. -
    2047.                     throw new SparqlParserException(
    2048. -
    2049.                         "Unexpected end of query.",
    2050. -
    2051.                         null,
    2052. -
    2053.                         key($this->tokens)
    2054. -
    2055.                     );
    2056. -
    2057.                 default:
    2058. -
    2059.                     $exp $exp current($this->tokens);
    2060. -
    2061.                     break;
    2062. -
    2063.             }
    2064. -
    2065.             next($this->tokens);
    2066. -
    2067.         }
    2068. -
    2069.         $constraint->addExpression($exp);
    2070. -
    2071.     }
    2072. -
    2073.  
    2074. -
    2075.  
    2076. -
    2077.     /**
    2078. -
    2079.     * Parses an expression.
    2080. -
    2081.     *
    2082. -
    2083.     * @param  Constraint  $constrain 
    2084. -
    2085.     * @return void 
    2086. -
    2087.     * @throws SparqlParserException
    2088. -
    2089.     */
    2090. -
    2091.     protected function parseExpression(&$constraint)
    2092. -
    2093.     {
    2094. -
    2095.         $exp "";
    2096. -
    2097.         while (current($this->tokens!= false && current($this->tokens!= "}"{
    2098. -
    2099.             switch (current($this->tokens)) {
    2100. -
    2101.                 case false:
    2102. -
    2103.                     throw new SparqlParserException(
    2104. -
    2105.                         "Unexpected end of query.",
    2106. -
    2107.                         null,
    2108. -
    2109.                         key($this->tokens)
    2110. -
    2111.                     );
    2112. -
    2113.                 case ".":
    2114. -
    2115.                     break;
    2116. -
    2117.                     break;
    2118. -
    2119.                 default:
    2120. -
    2121.                     $exp $exp current($this->tokens);
    2122. -
    2123.                     break;
    2124. -
    2125.             }
    2126. -
    2127.             next($this->tokens);
    2128. -
    2129.         }
    2130. -
    2131.         $constraint->addExpression($exp);
    2132. -
    2133.     }
    2134. -
    2135.  
    2136. -
    2137.     /**
    2138. -
    2139.     * Parses a GRAPH clause.
    2140. -
    2141.     *
    2142. -
    2143.     * @param  GraphPattern $pattern 
    2144. -
    2145.     * @return void 
    2146. -
    2147.     * @throws SparqlParserException
    2148. -
    2149.     */
    2150. -
    2151.     protected function parseGraph(){
    2152. -
    2153.         $this->_fastForward();
    2154. -
    2155.         $name current($this->tokens);
    2156. -
    2157.         if(!$this->varCheck($name)&!$this->iriCheck($name)&&!$this->qnameCheck($name)){
    2158. -
    2159.             $msg $name;
    2160. -
    2161.             $msg preg_replace('/</''&lt;'$msg);
    2162. -
    2163.             throw new SparqlParserException(" IRI or Var expected. ",null,key($this->tokens));
    2164. -
    2165.         }
    2166. -
    2167.         $this->_fastForward();
    2168. -
    2169.  
    2170. -
    2171.         if($this->iriCheck($name)){
    2172. -
    2173.             $name new Resource(substr($name,1,-1));
    2174. -
    2175.         }else if($this->qnameCheck($name)){
    2176. -
    2177.             $name new Resource($this->query->getFullUri($name));
    2178. -
    2179.         }
    2180. -
    2181.         $this->parseGraphPattern(false,false,$name);
    2182. -
    2183.         if(current($this->tokens)=='.')
    2184. -
    2185.         $this->_fastForward();
    2186. -
    2187.     }
    2188. -
    2189.  
    2190. -
    2191.     /**
    2192. -
    2193.     * Parses the solution modifiers of a query.
    2194. -
    2195.     *
    2196. -
    2197.     * @return void 
    2198. -
    2199.     * @throws SparqlParserException
    2200. -
    2201.     */
    2202. -
    2203.     protected function parseModifier(){
    2204. -
    2205.         do{
    2206. -
    2207.             switch(strtolower(current($this->tokens))){
    2208. -
    2209.                 case "order":
    2210. -
    2211.                 $this->_fastForward();
    2212. -
    2213.                 if(strtolower(current($this->tokens))=='by'){
    2214. -
    2215.                     $this->_fastForward();
    2216. -
    2217.                     $this->parseOrderCondition();
    2218. -
    2219.                 }else{
    2220. -
    2221.                     throw new SparqlParserException("'BY' expected.",null,key($this->tokens));
    2222. -
    2223.                 }
    2224. -
    2225.                 break;
    2226. -
    2227.                 case "limit":
    2228. -
    2229.                 $this->_fastForward();
    2230. -
    2231.                 $val current($this->tokens);
    2232. -
    2233.                 $this->query->setSolutionModifier('limit',$val);
    2234. -
    2235.                 break;
    2236. -
    2237.                 case "offset":
    2238. -
    2239.                 $this->_fastForward();
    2240. -
    2241.                 $val current($this->tokens);
    2242. -
    2243.                 $this->query->setSolutionModifier('offset',$val);
    2244. -
    2245.                 break;
    2246. -
    2247.                 default:
    2248. -
    2249.                 break;
    2250. -
    2251.             }
    2252. -
    2253.         }while(next($this->tokens));
    2254. -
    2255.     }
    2256. -
    2257.  
    2258. -
    2259.     /**
    2260. -
    2261.     * Parses order conditions of a query.
    2262. -
    2263.     *
    2264. -
    2265.     * @return void 
    2266. -
    2267.     * @throws SparqlParserException
    2268. -
    2269.     */
    2270. -
    2271.     protected function parseOrderCondition(){
    2272. -
    2273.         $valList array();
    2274. -
    2275.         $val array();
    2276. -
    2277.         while(strtolower(current($this->tokens))!='limit'
    2278. -
    2279.         strtolower(current($this->tokens))!= false
    2280. -
    2281.         strtolower(current($this->tokens))!= 'offset'){
    2282. -
    2283.             switch (strtolower(current($this->tokens))){
    2284. -
    2285.                 case "desc":
    2286. -
    2287.                 $this->_fastForward();
    2288. -
    2289.                 $this->_fastForward();
    2290. -
    2291.                 if($this->varCheck(current($this->tokens))){
    2292. -
    2293.                     $val['val'current($this->tokens);
    2294. -
    2295.                 }else{
    2296. -
    2297.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2298. -
    2299.                 }
    2300. -
    2301.                 $this->_fastForward();
    2302. -
    2303.                 if(current($this->tokens)!=')')
    2304. -
    2305.                 throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
    2306. -
    2307.                 $val['type''desc';
    2308. -
    2309.                 $this->_fastForward();
    2310. -
    2311.                 break;
    2312. -
    2313.                 case "asc" :
    2314. -
    2315.                 $this->_fastForward();
    2316. -
    2317.                 $this->_fastForward();
    2318. -
    2319.                 if($this->varCheck(current($this->tokens))){
    2320. -
    2321.                     $val['val'current($this->tokens);
    2322. -
    2323.                 }else{
    2324. -
    2325.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2326. -
    2327.                 }
    2328. -
    2329.                 $this->_fastForward();
    2330. -
    2331.                 if(current($this->tokens)!=')')
    2332. -
    2333.                 throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
    2334. -
    2335.                 $val['type''asc';
    2336. -
    2337.                 $this->_fastForward();
    2338. -
    2339.                 break;
    2340. -
    2341.                 default:
    2342. -
    2343.                 if($this->varCheck(current($this->tokens))){
    2344. -
    2345.                     $val['val'current($this->tokens);
    2346. -
    2347.                     $val['type''asc';
    2348. -
    2349.                 }else{
    2350. -
    2351.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2352. -
    2353.                 }
    2354. -
    2355.                 $this->_fastForward();
    2356. -
    2357.                 break;
    2358. -
    2359.             }
    2360. -
    2361.             $valList[$val;
    2362. -
    2363.         }
    2364. -
    2365.         prev($this->tokens);
    2366. -
    2367.         $this->query->setSolutionModifier('order by',$valList);
    2368. -
    2369.     }
    2370. -
    2371.  
    2372. -
    2373.     /**
    2374. -
    2375.     * Parses a String to an RDF node.
    2376. -
    2377.     *
    2378. -
    2379.     * @param  String $node 
    2380. -
    2381.     * @return Node   The parsed RDF node
    2382. -
    2383.     * @throws SparqlParserException
    2384. -
    2385.     */
    2386. -
    2387.     protected function parseNode($node false)
    2388. -
    2389.     {
    2390. -
    2391.         $eon false;
    2392. -
    2393.         if ($node{
    2394. -
    2395.             $node $node;
    2396. -
    2397.         else {
    2398. -
    2399.             $node current($this->tokens);
    2400. -
    2401.         }
    2402. -
    2403.         if ($node{strlen($node)-1== '.'{
    2404. -
    2405.             $node substr($node,0,-1);
    2406. -
    2407.         }
    2408. -
    2409.         if ($this->dtypeCheck($node)) {
    2410. -
    2411.             return $node;
    2412. -
    2413.         }
    2414. -
    2415.         if ($this->bNodeCheck($node)) {
    2416. -
    2417.             $node '?'.$node;
    2418. -
    2419.             $this->query->addVar($node);
    2420. -
    2421.             return $node;
    2422. -
    2423.         }
    2424. -
    2425.         if ($node == '['{
    2426. -
    2427.             $node '?' substr($this->query->getBlanknodeLabel()1);
    2428. -
    2429.             $this->query->addVar($node);
    2430. -
    2431.             $this->_fastForward();
    2432. -
    2433.             if(current($this->tokens)!=']'{
    2434. -
    2435.                 prev($this->tokens);
    2436. -
    2437.             }
    2438. -
    2439.             return $node;
    2440. -
    2441.         }
    2442. -
    2443.         if ($this->iriCheck($node)){
    2444. -
    2445.             $base $this->query->getBase();
    2446. -
    2447.             if ($base!=null{
    2448. -
    2449.                 $node new Resource(substr(substr($base,0,-1).substr($node,1),1,-1));
    2450. -
    2451.             else {
    2452. -
    2453.                 $node new Resource(substr($node,1,-1));
    2454. -
    2455.             }
    2456. -
    2457.             return $node;
    2458. -
    2459.         else if ($this->qnameCheck($node)) {
    2460. -
    2461.             $node $this->query->getFullUri($node);
    2462. -
    2463.             $node new Resource($node);
    2464. -
    2465.             return $node;
    2466. -
    2467.         else if ($this->literalCheck($node)) {
    2468. -
    2469.             do {
    2470. -
    2471.                 switch(substr($node,0,1)){
    2472. -
    2473.                     case '"':
    2474. -
    2475.                         $this->parseLiteral($node,'"');
    2476. -
    2477.                         $eon true;
    2478. -
    2479.                         break;
    2480. -
    2481.                     case "'":
    2482. -
    2483.                         $this->parseLiteral($node,"'");
    2484. -
    2485.                         $eon true;
    2486. -
    2487.                         break;
    2488. -
    2489.                 }
    2490. -
    2491.             while(!$eon);
    2492. -
    2493.  
    2494. -
    2495.         else if ($this->varCheck($node)) {
    2496. -
    2497.             $pos strpos($node,'.');
    2498. -
    2499.             if ($pos{
    2500. -
    2501.                 return substr($node,0,$pos);
    2502. -
    2503.             else {
    2504. -
    2505.                 return $node;
    2506. -
    2507.             }
    2508. -
    2509.         else if ($node[0== '<'{
    2510. -
    2511.             //partial IRI? loop tokens until we find a closing >
    2512. -
    2513.             while (next($this->tokens)) {
    2514. -
    2515.                 $node .= current($this->tokens);
    2516. -
    2517.                 if (substr($node-1== '>'{
    2518. -
    2519.                     break;
    2520. -
    2521.                 }
    2522. -
    2523.             }
    2524. -
    2525.             if (substr($node-1!= '>'{
    2526. -
    2527.                 throw new SparqlParserException(
    2528. -
    2529.                     "Unclosed IRI: " $node,
    2530. -
    2531.                     null,
    2532. -
    2533.                     key($this->tokens)
    2534. -
    2535.                 );
    2536. -
    2537.             }
    2538. -
    2539.             return $this->parseNode($node);
    2540. -
    2541.         else {
    2542. -
    2543.             throw new SparqlParserException(
    2544. -
    2545.                 $node " is neither a valid rdf- node nor a variable.",
    2546. -
    2547.                 null,
    2548. -
    2549.                 key($this->tokens)
    2550. -
    2551.             );
    2552. -
    2553.         }
    2554. -
    2555.         return $node;
    2556. -
    2557.     }
    2558. -
    2559.  
    2560. -
    2561.     /**
    2562. -
    2563.     * Checks if there is a datatype given and appends it to the node.
    2564. -
    2565.     *
    2566. -
    2567.     * @param  String $node 
    2568. -
    2569.     * @return void 
    2570. -
    2571.     */
    2572. -
    2573.     protected function checkDtypeLang(&$node)
    2574. -
    2575.     {
    2576. -
    2577.         $this->_fastForward();
    2578. -
    2579.         switch (substr(current($this->tokens)01)) {
    2580. -
    2581.             case '^':
    2582. -
    2583.                 if (substr(current($this->tokens),0,2)=='^^'{
    2584. -
    2585.                     $node new Literal(substr($node,1,-1));
    2586. -
    2587.                     $node->setDatatype(
    2588. -
    2589.                         $this->query->getFullUri(
    2590. -
    2591.                             substr(current($this->tokens)2)
    2592. -
    2593.                         )
    2594. -
    2595.                     );
    2596. -
    2597.                 }
    2598. -
    2599.                 break;
    2600. -
    2601.             case '@':
    2602. -
    2603.                 $node new Literal(
    2604. -
    2605.                     substr($node1-1),
    2606. -
    2607.                     substr(current($this->tokens)1)
    2608. -
    2609.                 );
    2610. -
    2611.                 break;
    2612. -
    2613.             default:
    2614. -
    2615.                 prev($this->tokens);
    2616. -
    2617.                 $node new Literal(substr($node1-1));
    2618. -
    2619.                 break;
    2620. -
    2621.  
    2622. -
    2623.         }
    2624. -
    2625.  
    2626. -
    2627.     }
    2628. -
    2629.  
    2630. -
    2631.     /**
    2632. -
    2633.     * Parses a literal.
    2634. -
    2635.     *
    2636. -
    2637.     * @param String $node 
    2638. -
    2639.     * @param String $sep used separator " or '
    2640. -
    2641.     * @return void 
    2642. -
    2643.     */
    2644. -
    2645.     protected function parseLiteral(&$node$sep)
    2646. -
    2647.     {
    2648. -
    2649.         do {
    2650. -
    2651.             next($this->tokens);
    2652. -
    2653.             $node $node.current($this->tokens);
    2654. -
    2655.         while (current($this->tokens!= $sep);
    2656. -
    2657.         $this->checkDtypeLang($node);
    2658. -
    2659.     }
    2660. -
    2661.  
    2662. -
    2663.     /**
    2664. -
    2665.     * Checks if the Node is a typed Literal.
    2666. -
    2667.     *
    2668. -
    2669.     * @param String $node 
    2670. -
    2671.     * @return boolean TRUE if typed FALSE if not
    2672. -
    2673.     */
    2674. -
    2675.     protected function dtypeCheck(&$node)
    2676. -
    2677.     {
    2678. -
    2679.         $patternInt "/^-?[0-9]+$/";
    2680. -
    2681.         $match preg_match($patternInt,$node,$hits);
    2682. -
    2683.         if($match>0){
    2684. -
    2685.             $node new Literal($hits[0]);
    2686. -
    2687.             $node->setDatatype(XML_SCHEMA.'integer');
    2688. -
    2689.             return true;
    2690. -
    2691.         }
    2692. -
    2693.         $patternBool "/^(true|false)$/";
    2694. -
    2695.         $match preg_match($patternBool,$node,$hits);
    2696. -
    2697.         if($match>0){
    2698. -
    2699.             $node new Literal($hits[0]);
    2700. -
    2701.             $node->setDatatype(XML_SCHEMA.'boolean');
    2702. -
    2703.             return true;
    2704. -
    2705.         }
    2706. -
    2707.         $patternType "/^a$/";
    2708. -
    2709.         $match preg_match($patternType,$node,$hits);
    2710. -
    2711.         if($match>0){
    2712. -
    2713.             $node new Resource(RDF_NAMESPACE_URI.'type');
    2714. -
    2715.             return true;
    2716. -
    2717.         }
    2718. -
    2719.         $patternDouble "/^-?[0-9]+.[0-9]+[e|E]?-?[0-9]*/";
    2720. -
    2721.         $match preg_match($patternDouble,$node,$hits);
    2722. -
    2723.         if($match>0){
    2724. -
    2725.             $node new Literal($hits[0]);
    2726. -
    2727.             $node->setDatatype(XML_SCHEMA.'double');
    2728. -
    2729.             return true;
    2730. -
    2731.         }
    2732. -
    2733.         return false;
    2734. -
    2735.     }
    2736. -
    2737.  
    2738. -
    2739.     /**
    2740. -
    2741.     * Parses an RDF collection.
    2742. -
    2743.     *
    2744. -
    2745.     * @param  TriplePattern $trp 
    2746. -
    2747.     * @return Node          The first parsed label
    2748. -
    2749.     */
    2750. -
    2751.     protected function parseCollection(&$trp)
    2752. -
    2753.     {
    2754. -
    2755.         $tmpLabel $this->query->getBlanknodeLabel();
    2756. -
    2757.         $firstLabel $this->parseNode($tmpLabel);
    2758. -
    2759.         $this->_fastForward();
    2760. -
    2761.         $i 0;
    2762. -
    2763.         while (current($this->tokens)!=")"{
    2764. -
    2765.             if($i>0)
    2766. -
    2767.             $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),$this->parseNode($tmpLabel $this->query->getBlanknodeLabel()));
    2768. -
    2769.             $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),$this->parseNode());
    2770. -
    2771.             $this->_fastForward();
    2772. -
    2773.             $i++;
    2774. -
    2775.         }
    2776. -
    2777.         $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));
    2778. -
    2779.         return $firstLabel;
    2780. -
    2781.     }
    2782. -
    2783.  
    2784. -
    2785.     /**
    2786. -
    2787.     * Error reporting.
    2788. -
    2789.     *
    2790. -
    2791.     * @param SparqlException $e 
    2792. -
    2793.     * @return String 
    2794. -
    2795.     */
    2796. -
    2797.     protected function error($e)
    2798. -
    2799.     {
    2800. -
    2801.         echo "<b>SPARQL PARSER ERROR: </b>".$e->getMessage()."<br>
    2802. -
    2803.             In Query: <br><pre>";
    2804. -
    2805.         if($e->getPointer()) {
    2806. -
    2807.             $end $e->getPointer();
    2808. -
    2809.         else {
    2810. -
    2811.             $end count($this->tokens1;
    2812. -
    2813.         }
    2814. -
    2815.  
    2816. -
    2817.         for ($i 0$i $end$i++{
    2818. -
    2819.             $token preg_replace('/&/''&amp;'$this->tokens[$i]);
    2820. -
    2821.             $token preg_replace('/</''&lt;'$token);
    2822. -
    2823.             echo $token;
    2824. -
    2825.         }
    2826. -
    2827.         $token preg_replace('/&/''&amp;'$this->tokens[$end]);
    2828. -
    2829.         $token preg_replace('/</''&lt;'$token);
    2830. -
    2831.         echo "-><b>".$token."</b><-";
    2832. -
    2833.         "</pre><br>";
    2834. -
    2835.     }
    2836. -
    2837. }// end class: SparqlParser.php
    2838. -
    2839.  
    2840. -
    2841. ?>
    2842. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base deleted file mode 100755 index 7c8e3b3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__sparqlSparqlParserException.php.html.svn-base +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for SparqlParserException.php - - - - - -

    Source for file SparqlParserException.php

    -

    Documentation is available at SparqlParserException.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // class: SparqlParserExecption
    6. -
    7. // ---------------------------------------------
    8. -
    9. /**
    10. -
    11. * A SPARQL Parser Execption for better errorhandling.
    12. -
    13. *
    14. -
    15. @author   Tobias Gauss <tobias.gauss@web.de>
    16. -
    17. @version     $Id$
    18. -
    19. *
    20. -
    21. @package sparql
    22. -
    23. */
    24. -
    25. Class SparqlParserException extends Exception{
    26. -
    27.  
    28. -
    29.     private $tokenPointer;
    30. -
    31.  
    32. -
    33.     public function __construct($message$code 0$pointer){
    34. -
    35.  
    36. -
    37.         $this->tokenPointer $pointer;
    38. -
    39.         parent::__construct($message$code);
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Returns a pointer to the token which caused the exception.
    48. -
    49.     * @return int 
    50. -
    51.     */
    52. -
    53.     public function getPointer(){
    54. -
    55.         return $this->tokenPointer;
    56. -
    57.     }
    58. -
    59.  
    60. -
    61. }
    62. -
    63. ?>
    64. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base deleted file mode 100755 index 8f6db82e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_sparql__syntaxSparqlResultParser.php.html.svn-base +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - File Source for SparqlResultParser.php - - - - - -

    Source for file SparqlResultParser.php

    -

    Documentation is available at SparqlResultParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: SparqlResultParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Parses an xml document in SPARQL Result XML Format.
    14. -
    15. *
    16. -
    17. @version  $Id$
    18. -
    19. @author   Tobias Gau <tobias.gauss@web.de>
    20. -
    21. *
    22. -
    23. @package sparql
    24. -
    25. */
    26. -
    27.  
    28. -
    29. class SparqlResultParser extends Object {
    30. -
    31.  
    32. -
    33.  
    34. -
    35.     var $arrOutput = array();
    36. -
    37.     var $resParser;
    38. -
    39.     var $strXmlData;
    40. -
    41.     var $counter = -1;
    42. -
    43.     var $mode = -1;
    44. -
    45.     var $varname;
    46. -
    47.     var $dtype;
    48. -
    49.     var $lang;
    50. -
    51.     var $varlist;
    52. -
    53.     var $bncounter = 0;
    54. -
    55.     var $current_literal;    
    56. -
    57.     
    58. -
    59.     
    60. -
    61. /**
    62. -
    63. * Main function of SparqlResultParser
    64. -
    65. *
    66. -
    67. @param String  $strInputXML  input document.
    68. -
    69. */
    70. -
    71.     function parse($strInputXML{
    72. -
    73.  
    74. -
    75.         $this->resParser = xml_parser_create ();
    76. -
    77.  
    78. -
    79.         xml_set_object($this->resParser,$this);
    80. -
    81.         xml_set_element_handler($this->resParser"tagOpen""tagClosed");
    82. -
    83.  
    84. -
    85.         xml_set_character_data_handler($this->resParser"tagData");
    86. -
    87.  
    88. -
    89.         $this->strXmlData = xml_parse($this->resParser,$strInputXML );
    90. -
    91.         if(!$this->strXmlData{
    92. -
    93.             echo "unable to parse result<br>".
    94. -
    95.             "server returned: <br>"
    96. -
    97.             .$strInputXML;
    98. -
    99.             
    100. -
    101.             return "false";
    102. -
    103.         
    104. -
    105.         }
    106. -
    107.  
    108. -
    109.         xml_parser_free($this->resParser);
    110. -
    111.  
    112. -
    113.         return $this->arrOutput;
    114. -
    115.     }
    116. -
    117.     
    118. -
    119. // private parser functions from here //    
    120. -
    121.     function tagOpen($parser$name$attrs{
    122. -
    123.         //  $tag=array("name"=>$name,"attrs"=>$attrs);
    124. -
    125.         //  array_push($this->arrOutput,$tag);
    126. -
    127.         if(strtolower($name)=="variable"){
    128. -
    129.             if(isset($attrs['name']))
    130. -
    131.                 $this->varlist[]=$attrs['name'];
    132. -
    133.             if(isset($attrs['NAME']))
    134. -
    135.                 $this->varlist[]=$attrs['NAME'];
    136. -
    137.         }
    138. -
    139.         
    140. -
    141.         if(strtolower($name)=="result"){
    142. -
    143.             $this->counter++;
    144. -
    145.             if($this->counter > -1){
    146. -
    147.                 foreach($this->varlist as $value){
    148. -
    149.                     if(!isset($this->arrOutput[$this->counter][$value]))
    150. -
    151.                         $this->arrOutput[$this->counter]["?".$value]='';
    152. -
    153.                 }    
    154. -
    155.             }
    156. -
    157.             
    158. -
    159.         }
    160. -
    161.         if(strtolower($name)=="boolean"){
    162. -
    163.             $this->counter++;
    164. -
    165.             $this->mode = 3;
    166. -
    167.         }
    168. -
    169.         if(strtolower($name)=="binding"){
    170. -
    171.             $this->varname = null;
    172. -
    173.             $this->dtype   = null;
    174. -
    175.             $this->lang    = null;
    176. -
    177.             
    178. -
    179.             if(isset($attrs['name'])){
    180. -
    181.                 $this->varname = "?".$attrs['name'];
    182. -
    183.             }else{
    184. -
    185.                 $this->varname = "?".$attrs['NAME'];
    186. -
    187.             }
    188. -
    189.         }
    190. -
    191.         if(strtolower($name)=="uri"){
    192. -
    193.             $this->mode = 0;
    194. -
    195.         }
    196. -
    197.         if(strtolower($name)=="literal"){
    198. -
    199.             $this->mode = 1;
    200. -
    201.             $this->current_literal = "";
    202. -
    203.             if(isset($attrs['datatype'])){
    204. -
    205.                 $this->dtype = $attrs['datatype'];
    206. -
    207.             }else if(isset($attrs['DATATYPE'])){
    208. -
    209.                 $this->dtype = $attrs['DATATYPE'];
    210. -
    211.             }
    212. -
    213.             if(isset($attrs['xml:lang'])){
    214. -
    215.                 $this->lang = $attrs['datatype'];
    216. -
    217.             }else if(isset($attrs['XML:lang'])){
    218. -
    219.                 $this->lang = $attrs['XML:lang'];
    220. -
    221.             }else if(isset($attrs['XML:LANG'])){
    222. -
    223.                 $this->lang = $attrs['XML:LANG'];
    224. -
    225.             }else if(isset($attrs['xml:LANG'])){
    226. -
    227.                 $this->lang = $attrs['xml:LANG'];
    228. -
    229.             }
    230. -
    231.         }
    232. -
    233.         if(strtolower($name)=="bnode"){
    234. -
    235.             $this->mode = 2;
    236. -
    237.         }
    238. -
    239.     }
    240. -
    241.  
    242. -
    243.     function tagData($parser$tagData{
    244. -
    245.         switch($this->mode){
    246. -
    247.             case :
    248. -
    249.             $this->arrOutput[$this->counter][$this->varnamenew Resource($tagData);
    250. -
    251.             $this->mode = -1;
    252. -
    253.             break;
    254. -
    255.             case 1:
    256. -
    257.             $this->current_literal .= $tagData;
    258. -
    259.             break;
    260. -
    261.             case 2:
    262. -
    263.             if($tagData=="/"){
    264. -
    265.                 $bn "bNode".$this->bncounter;
    266. -
    267.                 $this->bncounter++;
    268. -
    269.             }else{
    270. -
    271.                 $bn $tagData;
    272. -
    273.             }
    274. -
    275.             $this->arrOutput[$this->counter][$this->varnamenew BlankNode($bn);
    276. -
    277.             $this->mode = -1;
    278. -
    279.             break;
    280. -
    281.             case 3:
    282. -
    283.             $this->arrOutput = $tagData;
    284. -
    285.             $this->mode = -1;
    286. -
    287.             break;
    288. -
    289.  
    290. -
    291.         }
    292. -
    293.         
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function tagClosed($parser$name{
    300. -
    301.         if ($this->mode == 1{
    302. -
    303.             $lit new Literal($this->current_literal);
    304. -
    305.             if($this->lang)
    306. -
    307.                 $lit->setLanguage($this->lang);
    308. -
    309.             if($this->dtype)
    310. -
    311.                 $lit->setDatatype($this->dtype);
    312. -
    313.             $this->arrOutput[$this->counter][$this->varname$lit ;
    314. -
    315.             $this->mode = -1;
    316. -
    317.         }        
    318. -
    319.     }
    320. -
    321. }
    322. -
    323.  
    324. -
    325.  
    326. -
    327. ?>
    328. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base deleted file mode 100755 index 27612128..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxGRDDLParser.php.html.svn-base +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - File Source for GRDDLParser.php - - - - - -

    Source for file GRDDLParser.php

    -

    Documentation is available at GRDDLParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: RdfParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * A GRDDLParser.
    16. -
    17.  * This class extracts rdf data from xhtml documents. It uses the PHP xsltprocessor.
    18. -
    19.  * Gleaning Resource Descriptions from Dialects of Languages (GRDDL):
    20. -
    21.  * (http://www.w3.org/TR/grddl/)
    22. -
    23.  * 
    24. -
    25.  * @version  $Id$
    26. -
    27.  * @author Tobias Gau <tobias.gauss@web.de>,
    28. -
    29.  *
    30. -
    31.  * @package syntax
    32. -
    33.  * @access    public
    34. -
    35.  *
    36. -
    37.  */   
    38. -
    39. class GRDDLParser extends Object{
    40. -
    41.     
    42. -
    43.     
    44. -
    45.     /**
    46. -
    47.      * Document link
    48. -
    49.      * 
    50. -
    51.      *
    52. -
    53.      * @var     String 
    54. -
    55.      * @access    private
    56. -
    57.      */
    58. -
    59.     var $doclink;
    60. -
    61.     
    62. -
    63.     
    64. -
    65.     /**
    66. -
    67.      * Stylesheet link
    68. -
    69.      * 
    70. -
    71.      *
    72. -
    73.      * @var     String[] 
    74. -
    75.      * @access    private
    76. -
    77.      */
    78. -
    79.     var $stylelinks;
    80. -
    81.     
    82. -
    83.     
    84. -
    85.     /**
    86. -
    87.      * DomDocument
    88. -
    89.      * 
    90. -
    91.      * @var     DomDocument 
    92. -
    93.      * @access    private
    94. -
    95.      */
    96. -
    97.     var $domdoc;
    98. -
    99.     
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     * generates a MemModel and creates the DomDocument.
    106. -
    107.     *
    108. -
    109.     * @param String $doc 
    110. -
    111.     * @access public
    112. -
    113.     * @return MemModel $model
    114. -
    115.     */
    116. -
    117.     function generateModel($doc){
    118. -
    119.         $model new MemModel();
    120. -
    121.         $this->doclink=$doc;
    122. -
    123.         $this->domdoc new DomDocument
    124. -
    125.         $this->domdoc->load($doc);
    126. -
    127.         $this->_getStyles();
    128. -
    129.         $model $this->_generateRDF();
    130. -
    131.         return $model;
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.  
    138. -
    139.     /**
    140. -
    141.     * gets the used xsl stylesheets.
    142. -
    143.     *
    144. -
    145.     * @access private
    146. -
    147.     */
    148. -
    149.     function _getStyles(){
    150. -
    151.         $link=$this->domdoc->getElementsByTagName('link');
    152. -
    153.         $i=0;
    154. -
    155.         while($link->item($i)!=''){
    156. -
    157.             $item $link->item($i);
    158. -
    159.             if($item->getAttributeNode('rel')->value=='transformation'){
    160. -
    161.                 $temp $item->getAttributeNode('href')->value;
    162. -
    163.                 if(substr($temp,0,1)=='/'){
    164. -
    165.                     $pos strrpos($this->doclink,'/');
    166. -
    167.                     $part substr($this->doclink,0,$pos);
    168. -
    169.                     $this->stylelink[]=$part.$temp;
    170. -
    171.                 }else{
    172. -
    173.                     $this->stylelink[]=$temp;
    174. -
    175.                 }
    176. -
    177.             }
    178. -
    179.             $i++;
    180. -
    181.         }
    182. -
    183.     }
    184. -
    185.     
    186. -
    187.     /*
    188. -
    189.     * uses the PHP build in xslt processor to
    190. -
    191.     * generate the RDF statements and uses the 
    192. -
    193.     * RDF- Parser to generate the model
    194. -
    195.     *
    196. -
    197.     * @access private
    198. -
    199.     * @return MemModel $model
    200. -
    201.     */
    202. -
    203.     function _generateRDF(){
    204. -
    205.         $model=new MemModel();
    206. -
    207.         $model->setBaseURI($this->doclink);
    208. -
    209.         $proc new xsltprocessor;
    210. -
    211.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    212. -
    213.         $pars=new RdfParser();
    214. -
    215.         foreach($this->stylelink as $key => $value){
    216. -
    217.             $xsl new DomDocument;
    218. -
    219.             $xsl->load($value);
    220. -
    221.             $proc->importStyleSheet($xsl);
    222. -
    223.             $model->addModel($pars->generateModel($proc->transformToXML($this->domdoc),$this->doclink));
    224. -
    225.         }
    226. -
    227.         return $model;
    228. -
    229.     }
    230. -
    231.  
    232. -
    233.     
    234. -
    235.     
    236. -
    237. }
    238. -
    239. ?>
    240. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Parser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Parser.php.html.svn-base deleted file mode 100755 index 278ef030..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Parser.php.html.svn-base +++ /dev/null @@ -1,1078 +0,0 @@ - - - - - - File Source for N3Parser.php - - - - - -

    Source for file N3Parser.php

    -

    Documentation is available at N3Parser.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'model/Resource.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'model/Literal.php';
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'model/Statement.php';
    10. -
    11.  
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15. // Class: N3Parser
    16. -
    17. // ----------------------------------------------------------------------------------
    18. -
    19.  
    20. -
    21.  
    22. -
    23. /**
    24. -
    25.  * PHP Notation3 Parser
    26. -
    27.  *
    28. -
    29.  * This parser can parse a subset of n3, reporting triples to a callback function
    30. -
    31.  * or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )
    32. -
    33.  *
    34. -
    35.  * Supported N3 features:
    36. -
    37.  * <ul>
    38. -
    39.  *   <li>Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')</li>
    40. -
    41.  *   <li>@prefix mappings</li>
    42. -
    43.  *   <li>= maps to owl#sameAs</li>
    44. -
    45.  *   <li>a maps to rdf-syntax-ns#type</li>
    46. -
    47.  *   <li>Literal datytype- and xmlLanguageTag support
    48. -
    49.  * </ul>
    50. -
    51.  * Un-supported N3 Features include:
    52. -
    53.  * <ul>
    54. -
    55.  *   <li>Reification using { }</li>
    56. -
    57.  *   <li>. and ^ operators for tree traversal</li>
    58. -
    59.  *   <li>Any log operators, like log:forAll etc.</li>
    60. -
    61.  * </ul>
    62. -
    63.  *
    64. -
    65.  * This parser is based on n3.py from Epp released 2nd March, 2002.
    66. -
    67.  * by Sean B. Palmer
    68. -
    69.  * ( http://infomesh.net/2002/eep/20020302-013802/n3.py )
    70. -
    71.  *
    72. -
    73.  * This parser is released under the GNU GPL license.
    74. -
    75.  * ( http://www.gnu.org/licenses/gpl.txt )
    76. -
    77.  *
    78. -
    79.  *
    80. -
    81.  *
    82. -
    83.  * @author Sean B. Palmer <sean@mysterylights.com>, Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    84. -
    85.  * @version $Id$
    86. -
    87.  * @package syntax
    88. -
    89.  * @access public
    90. -
    91.  ***/
    92. -
    93.  
    94. -
    95. class N3Parser extends Object {
    96. -
    97.  
    98. -
    99.  
    100. -
    101.   /* ==================== Variables ==================== */
    102. -
    103.  
    104. -
    105.   var $Tokens;
    106. -
    107.   var $bNode;
    108. -
    109.   var $RDF_NS$DAML_NS$OWL_NS;
    110. -
    111.   var $debug;
    112. -
    113.   var $parseError;
    114. -
    115.   var $parsedNamespaces = array();
    116. -
    117.  
    118. -
    119.   /* ==================== Public Methods ==================== */
    120. -
    121.  
    122. -
    123.   /**
    124. -
    125.    * Constructor
    126. -
    127.    * @access public
    128. -
    129.    ***/
    130. -
    131.   function N3Parser({
    132. -
    133.     //Regular expressions:
    134. -
    135.      $Name '[A-Za-z0-9_@\.]+[^\.,;\[\]\s ]*';
    136. -
    137.      $URI '<[^> ]*>';
    138. -
    139.      $bNode '_:'.$Name;
    140. -
    141.      $Univar '\?'.$Name;
    142. -
    143.      $QName '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name;
    144. -
    145.      $Literal '"(\\\"|[^"])*"'# '"(?:\\"|[^"])*"'
    146. -
    147. //   $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"'
    148. -
    149.      $LangTag '@[A-Za-z\-]*[^ \^\.\;\,]';
    150. -
    151.      $Datatype '(\^\^)[^ ,\.;)]+';
    152. -
    153.      $Datatype_URI '(\^\^)'.$URI;
    154. -
    155.      //     $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""';
    156. -
    157.      $LLiteral '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';
    158. -
    159.      //          '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""'
    160. -
    161.      $Comment '#.*$';
    162. -
    163.      $Prefix '(?:[A-Za-z][A-Za-z0-9_]*)?:';
    164. -
    165.      $PrefixDecl '@prefix';
    166. -
    167.      $WS '[ \t]';
    168. -
    169.      $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'# for 'a' keyword
    170. -
    171.      $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'# for '=' keyword
    172. -
    173.      $this->OWL_NS = 'http://www.w3.org/2002/07/owl#';
    174. -
    175.  
    176. -
    177.      //     $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix,
    178. -
    179.      //        $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment);
    180. -
    181.      $t array$Datatype_URI,$Datatype,$LLiteral$URI$Literal$PrefixDecl$QName$bNode$Prefix$Univar'a','=''{''}''\(''\)''\[''\]'','';''\.'$WS$Comment,$LangTag);
    182. -
    183.      $this->Tokens="/(".join($t,"|").")/m";
    184. -
    185.  
    186. -
    187.      $this->bNode=0;
    188. -
    189.      $this->debug=0;
    190. -
    191.      $this->bNodeMap array();
    192. -
    193.      $this->FixBnodes FIX_BLANKNODES;
    194. -
    195.      $this->parseError=false;
    196. -
    197.   }
    198. -
    199.  
    200. -
    201.  
    202. -
    203.   /**
    204. -
    205.    * Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    206. -
    207.    * default is "false" -> the used label in n3 is parsed to the model
    208. -
    209.    * @param boolean 
    210. -
    211.    * @access public
    212. -
    213.    ***/
    214. -
    215.   function setFixBnodes($set{
    216. -
    217.  
    218. -
    219.       if (($set===trueOR ($set===false)) $this->FixBnodes $set;
    220. -
    221.   }
    222. -
    223.  
    224. -
    225.  
    226. -
    227.   /**
    228. -
    229.    * This parses a N3 string and prints out the triples
    230. -
    231.    * @param string $s 
    232. -
    233.    * @access public
    234. -
    235.    ***/
    236. -
    237.   function parse($s{
    238. -
    239.     //   """Get a string, tokenize, create list, convert to Eep store."""
    240. -
    241.     $stat=$this->n3tolist($s);
    242. -
    243.     foreach $stat as $t{
    244. -
    245.  
    246. -
    247.       if (count($t)>3{
    248. -
    249.         $object=$t[2];
    250. -
    251.  
    252. -
    253.         for ($i 3$i 5$i++){
    254. -
    255.           if ($t[$i][0]=='@')$object.=$t[$i];
    256. -
    257.           if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
    258. -
    259.         };
    260. -
    261.       else {$object=$t[2];};
    262. -
    263.  
    264. -
    265.       print '('.$t[0].', '.$t[1].', '.$object.")\n";
    266. -
    267.  
    268. -
    269.     }
    270. -
    271.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    272. -
    273.     //              for t in n3tolist(s)]
    274. -
    275.   }
    276. -
    277.  
    278. -
    279.  
    280. -
    281.   /**
    282. -
    283.    * This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    284. -
    285.    * @param string $s 
    286. -
    287.    * @param string $func 
    288. -
    289.    * @access public
    290. -
    291.    ***/
    292. -
    293.   function uparse($s,$func{
    294. -
    295.     //   """Get a string, tokenize, create list, convert to Eep store."""
    296. -
    297.     $stat=$this->n3tolist($s);
    298. -
    299.     foreach $stat as $t{
    300. -
    301.  
    302. -
    303.         if (count($t)>3{
    304. -
    305.         $object=$t[2];
    306. -
    307.  
    308. -
    309.         for ($i 3$i 5$i++){
    310. -
    311.           if ($t[$i][0]=='@')$object.=$t[$i];
    312. -
    313.           if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
    314. -
    315.         };
    316. -
    317.       else {$object=$t[2];};
    318. -
    319.         //    print "(".$t[0].", ".$t[1].", ".$t[2].")";
    320. -
    321.  
    322. -
    323.       $func($t[0],$t[1],$object);
    324. -
    325.     }
    326. -
    327.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    328. -
    329.     //              for t in n3tolist(s)]
    330. -
    331.   }
    332. -
    333.  
    334. -
    335.  
    336. -
    337.   /**
    338. -
    339.    * This parses a N3 string and returns a memmodel
    340. -
    341.    * @param string $s 
    342. -
    343.    * @access public
    344. -
    345.    * @return object Model 
    346. -
    347.    ***/
    348. -
    349.  
    350. -
    351.   function parse2model($s,$model false{
    352. -
    353.     if($model == false){
    354. -
    355.         $m=new MemModel();
    356. -
    357.     }else{
    358. -
    359.         $m=$model;
    360. -
    361.     }
    362. -
    363.     //   """Get a string, tokenize, create list, convert to Eep store."""
    364. -
    365.     $stat=$this->n3tolist($s);
    366. -
    367.  
    368. -
    369.     foreach $stat as $t{
    370. -
    371.       $s=$this->toRDFNode($t[0],$t);
    372. -
    373.       $p=$this->toRDFNode($t[1],$t);
    374. -
    375.       $o=$this->toRDFNode($t[2],$t);
    376. -
    377.  
    378. -
    379.        $new_statementnew Statement($s,$p,$o);
    380. -
    381.  
    382. -
    383.       $m->add($new_statement);
    384. -
    385.       //    print "(".$t[0].", ".$t[1].", ".$t[2].")";
    386. -
    387.     }
    388. -
    389.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    390. -
    391.     //              for t in n3tolist(s)]
    392. -
    393.     $m->addParsedNamespaces($this->parsedNamespaces);
    394. -
    395.     return $m;
    396. -
    397.   }
    398. -
    399.  
    400. -
    401. /**
    402. -
    403.  * Generate a new MemModel from an URI or file.
    404. -
    405.  *
    406. -
    407.  * @access    public
    408. -
    409.  * @param $path 
    410. -
    411.  * @throws PhpError
    412. -
    413.  * @return object MemModel 
    414. -
    415.  */
    416. -
    417.   function generateModel($path,$dummy=false,$model=false{
    418. -
    419.  
    420. -
    421.     $handle fopen($path,'r'or die("N3 ParserCould not open File: '$path' - Stopped parsing.");
    422. -
    423.     $done=false;
    424. -
    425.     $input="";
    426. -
    427.     while(!$done)
    428. -
    429.     {
    430. -
    431.       $input .= fread$handle512 );
    432. -
    433.       $done feof($handle);
    434. -
    435.  
    436. -
    437.     };
    438. -
    439.  
    440. -
    441.  
    442. -
    443.     fclose($handle);
    444. -
    445.  
    446. -
    447.     $m $this->parse2model($input,$model);
    448. -
    449.     return $m;
    450. -
    451.   }
    452. -
    453.  
    454. -
    455.  
    456. -
    457.   /* ==================== Private Methods from here ==================== */
    458. -
    459.  
    460. -
    461.   //  General list processing functions
    462. -
    463.  
    464. -
    465. /**
    466. -
    467.  * Returns FALSE if argument is a whitespace character
    468. -
    469.  * @access private
    470. -
    471.  * @param string $s 
    472. -
    473.  ***/
    474. -
    475.   function isWS($s{
    476. -
    477.     return !preg_match('/^(#.*|\s*)$/'$s);
    478. -
    479.   }
    480. -
    481.  
    482. -
    483.  
    484. -
    485.  
    486. -
    487.   /**
    488. -
    489.    * Returns true if the string is not a comment
    490. -
    491.    * @access private
    492. -
    493.    * @param string $s 
    494. -
    495.    * @returns boolean
    496. -
    497.    ***/
    498. -
    499.   function notComment($s{
    500. -
    501.     if ($s==""return false;
    502. -
    503.     $N3Comment '^[ \t]*\#';
    504. -
    505.  
    506. -
    507.     if (ereg($N3Comment,$s)) return false;
    508. -
    509.     else return true;
    510. -
    511.   }
    512. -
    513.  
    514. -
    515.   /**
    516. -
    517.    * Removes all whitespace tokens from list
    518. -
    519.    * @access private
    520. -
    521.    * @param array $list 
    522. -
    523.    ***/
    524. -
    525.   function filterWs($list{
    526. -
    527.     //    var_dump($list);
    528. -
    529.     //  """Filter whitespace from a list."""
    530. -
    531.  
    532. -
    533.     return array_filter($listarray($this,"isWS"));
    534. -
    535.   }
    536. -
    537.  
    538. -
    539. /**
    540. -
    541. * converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
    542. -
    543. *
    544. -
    545. @param String $str 
    546. -
    547. @return String 
    548. -
    549. @access private
    550. -
    551. *
    552. -
    553. */
    554. -
    555. function str2unicode_nfc($str=""){
    556. -
    557.     $result="";
    558. -
    559.     /* try to detect encoding */
    560. -
    561.     $tmp=str_replace("?"""$str);
    562. -
    563.     if(strpos(utf8_decode($tmp)"?")===false){
    564. -
    565.         $str=utf8_decode($str);
    566. -
    567.     }
    568. -
    569.     for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
    570. -
    571.         $nr=0;/* unicode dec nr */
    572. -
    573.         /* char */
    574. -
    575.         $char=$str[$i];
    576. -
    577.         /* utf8 binary */
    578. -
    579.         $utf8_char=utf8_encode($char);
    580. -
    581.         $bytes=strlen($utf8_char);
    582. -
    583.         if($bytes==1){
    584. -
    585.             /* 0####### (0-127) */
    586. -
    587.             $nr=ord($utf8_char);
    588. -
    589.         }
    590. -
    591.         elseif($bytes==2){
    592. -
    593.             /* 110##### 10###### = 192+x 128+x */
    594. -
    595.             $nr=((ord($utf8_char[0])-192)*64(ord($utf8_char[1])-128);
    596. -
    597.         }
    598. -
    599.         elseif($bytes==3){
    600. -
    601.             /* 1110#### 10###### 10###### = 224+x 128+x 128+x */
    602. -
    603.             $nr=((ord($utf8_char[0])-224)*4096((ord($utf8_char[1])-128)*64(ord($utf8_char[2])-128);
    604. -
    605.         }
    606. -
    607.         elseif($bytes==4){
    608. -
    609.             /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
    610. -
    611.             $nr=((ord($utf8_char[0])-240)*262144((ord($utf8_char[1])-128)*4096((ord($utf8_char[2])-128)*64(ord($utf8_char[3])-128);
    612. -
    613.         }
    614. -
    615.         /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
    616. -
    617.         if($nr<9){/* #x0-#x8 (0-8) */
    618. -
    619.             $result.="\\u".sprintf("%04X",$nr);
    620. -
    621.         }
    622. -
    623.         elseif($nr==9){/* #x9 (9) */
    624. -
    625.             $result.='\t';
    626. -
    627.         }
    628. -
    629.         elseif($nr==10){/* #xA (10) */
    630. -
    631.             $result.='\n';
    632. -
    633.         }
    634. -
    635.         elseif($nr<13){/* #xB-#xC (11-12) */
    636. -
    637.             $result.="\\u".sprintf("%04X",$nr);
    638. -
    639.         }
    640. -
    641.         elseif($nr==13){/* #xD (13) */
    642. -
    643.             $result.='\t';
    644. -
    645.         }
    646. -
    647.         elseif($nr<32){/* #xE-#x1F (14-31) */
    648. -
    649.             $result.="\\u".sprintf("%04X",$nr);
    650. -
    651.         }
    652. -
    653.         elseif($nr<34){/* #x20-#x21 (32-33) */
    654. -
    655.             $result.=$char;
    656. -
    657.         }
    658. -
    659.         elseif($nr==34){/* #x22 (34) */
    660. -
    661.             $result.='\"';
    662. -
    663.         }
    664. -
    665.         elseif($nr<92){/* #x23-#x5B (35-91) */
    666. -
    667.             $result.=$char;
    668. -
    669.         }
    670. -
    671.         elseif($nr==92){/* #x5C (92) */
    672. -
    673.             $result.='\\';
    674. -
    675.         }
    676. -
    677.         elseif($nr<127){/* #x5D-#x7E (93-126) */
    678. -
    679.             $result.=$char;
    680. -
    681.         }
    682. -
    683.         elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
    684. -
    685.             $result.="\\u".sprintf("%04X",$nr);
    686. -
    687.         }
    688. -
    689.         elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
    690. -
    691.             $result.="\\U".sprintf("%08X",$nr);
    692. -
    693.         }
    694. -
    695.         else{
    696. -
    697.             /* other chars are not defined => ignore */
    698. -
    699.         }
    700. -
    701.     }
    702. -
    703.     return $result;
    704. -
    705. }
    706. -
    707.  
    708. -
    709.  
    710. -
    711.  
    712. -
    713.   /**
    714. -
    715.    * Gets a slice of an array.
    716. -
    717.    * Returns the wanted slice, as well as the remainder of the array.
    718. -
    719.    * e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r'])
    720. -
    721.    * @return array 
    722. -
    723.    * @access private
    724. -
    725.    * @param array $list 
    726. -
    727.    * @param integer $start 
    728. -
    729.    * @param integer $end 
    730. -
    731.    ***/
    732. -
    733.   function getSpan($list$start$end{
    734. -
    735.  
    736. -
    737.     $pre=array_slice($list0$start);
    738. -
    739.     $post=array_slice($list$end);
    740. -
    741.  
    742. -
    743.     return array(array_slice($list$start,$end-$start),$this->array_concat($pre,$post));
    744. -
    745.   }
    746. -
    747.  
    748. -
    749.  
    750. -
    751.   /**
    752. -
    753.    * Concatenates two arrays
    754. -
    755.    * @param array $a 
    756. -
    757.    * @param array $b 
    758. -
    759.    * @returns array
    760. -
    761.    * @access private
    762. -
    763.    ***/
    764. -
    765.   function array_concat($a$b{
    766. -
    767.     array_splice($a,count($a),0,$b);
    768. -
    769.     return $a;
    770. -
    771.   }
    772. -
    773.  
    774. -
    775.   /**
    776. -
    777.    * Returns an array with all indexes where item appears in list
    778. -
    779.    * @param array $list 
    780. -
    781.    * @param string $item 
    782. -
    783.    * @returns array
    784. -
    785.    * @access private
    786. -
    787.    ***/
    788. -
    789.   function posns($list$item{
    790. -
    791.     $res=array();
    792. -
    793.     $i=0;
    794. -
    795.     foreach $list as $k=>$v{
    796. -
    797.       if ($v === $item $res[]=$i;
    798. -
    799.       $i++;
    800. -
    801.     }
    802. -
    803.     $res[]=$i;
    804. -
    805.     return $res;
    806. -
    807.   }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.   /* More N3 specific functions */
    814. -
    815.  
    816. -
    817.   /**
    818. -
    819.    * Returns a list of tokens
    820. -
    821.    * @param string $s 
    822. -
    823.    * @returns array
    824. -
    825.    * @access private
    826. -
    827.    ***/
    828. -
    829.   function toke($s{
    830. -
    831.  
    832. -
    833.     //    print "$s\n";
    834. -
    835.     //   """Notation3 tokenizer. Takes in a string, returns a raw token list."""
    836. -
    837.     if (strlen($s== 0die('Document has no content!');
    838. -
    839.  
    840. -
    841.     $s=str_replace("\r\n","\n",$s);
    842. -
    843.     $s=str_replace("\r","\n",$s);
    844. -
    845.  
    846. -
    847.  
    848. -
    849.     //$lines=explode("\n",$s);
    850. -
    851.  
    852. -
    853.     //$reallines=array_filter($lines, array($this, "notComment"));
    854. -
    855.     //    print "LINES: ".join($reallines, " ")." :LINES\n";
    856. -
    857.     //array_walk($reallines, array($this, "trimLine"));
    858. -
    859.     //$res=array();
    860. -
    861.  
    862. -
    863.     //    foreach ($reallines as $l) {
    864. -
    865.     //preg_match_all($this->Tokens, $l, $newres);
    866. -
    867.     //$res=$this->array_concat($res,$newres[0]);
    868. -
    869.     //}
    870. -
    871.  
    872. -
    873.     $res=array();
    874. -
    875.     preg_match_all($this->Tokens$s$newres);
    876. -
    877.  
    878. -
    879.     $res=$this->array_concat($resarray_map('trim'$newres[0]));
    880. -
    881.  
    882. -
    883.     return $res;
    884. -
    885.   }
    886. -
    887.  
    888. -
    889.   /**
    890. -
    891.    * Returns a list with the elements between start and end as one quoted string
    892. -
    893.    * e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"]
    894. -
    895.    * @param array $list 
    896. -
    897.    * @param integer $start 
    898. -
    899.    * @param integer $end 
    900. -
    901.    * @returns array
    902. -
    903.    * @access private
    904. -
    905.    ***/
    906. -
    907.   function listify($list$start$end{
    908. -
    909.  
    910. -
    911.     //Re-form a list, merge elements start->end into one quoted element
    912. -
    913.     //Start and end are offsets...
    914. -
    915.  
    916. -
    917.     $l=$end-$start;
    918. -
    919.  
    920. -
    921.     $s=array_slice($list0$start);
    922. -
    923.     $m=array_slice($list$start,$l);
    924. -
    925.     $e=array_slice($list$end);
    926. -
    927.  
    928. -
    929.     //  array_push($s,"\"".join($m," ")."\"");
    930. -
    931.     array_push($s,$m);
    932. -
    933.  
    934. -
    935.     return $this->array_concat($s,$e);
    936. -
    937.   }
    938. -
    939.  
    940. -
    941.   /**
    942. -
    943.    * Returns an array with prefixes=>namespace mappings
    944. -
    945.    * @param array $list 
    946. -
    947.    * @access private
    948. -
    949.    * @returns array
    950. -
    951.    ***/
    952. -
    953.   function getPrefixes($list{
    954. -
    955.  
    956. -
    957.     $prefixes=array();
    958. -
    959.     $ns=1;
    960. -
    961.     $name=2;
    962. -
    963.     foreach ($list as $l{
    964. -
    965.       if ($l=='@prefix'{
    966. -
    967.     //   while '@prefix' in list {
    968. -
    969.  
    970. -
    971.     $pos=current($list);
    972. -
    973.     //pos = list.index('@prefix')
    974. -
    975.     $r $this->getSpan($list$pos($pos+4))# processes the prefix tokens
    976. -
    977.     $binding=$r[0];
    978. -
    979.     $list=$r[1];
    980. -
    981.     $prefixes[$binding[$ns]] substr($binding[$name],1,-1);
    982. -
    983.     $this->parsedNamespaces[substr($binding[$name],1,-1)substr($binding[$ns],0,-1);
    984. -
    985.       }
    986. -
    987.     }
    988. -
    989.  
    990. -
    991.     if (count($prefixes)<1$listarray_slice($list,0);
    992. -
    993.  
    994. -
    995.     return array($prefixes$list);
    996. -
    997.   }
    998. -
    999.  
    1000. -
    1001.   /**
    1002. -
    1003.    * Callback function for replacing "a" elements with the right RDF uri.
    1004. -
    1005.    * @param string $l 
    1006. -
    1007.    * @access private
    1008. -
    1009.    ***/
    1010. -
    1011.   function replace_a_type(&$l,$p{
    1012. -
    1013.     if ($l=='a'$l='<'.$this->RDF_NS.'type>';
    1014. -
    1015.   }
    1016. -
    1017.  
    1018. -
    1019.   /**
    1020. -
    1021.    * Callback function for replacing "=" elements with the right DAML+OIL uri.
    1022. -
    1023.    * @param string $l 
    1024. -
    1025.    * @access private
    1026. -
    1027.    ***/
    1028. -
    1029.   function replace_equal(&$l,$p{
    1030. -
    1031.     if ($l=='='$l='<'.$this->OWL_NS.'sameAs>';
    1032. -
    1033.   }
    1034. -
    1035.  
    1036. -
    1037.   /**
    1038. -
    1039.    * Callback function for replacing "this" elements with the right RDF uri.
    1040. -
    1041.    * @param string $l 
    1042. -
    1043.    * @access private
    1044. -
    1045.    ***/
    1046. -
    1047.   function replace_this($l,$p{
    1048. -
    1049.     if ($l=='this'$l='<urn:urn-n:this>';
    1050. -
    1051.   }
    1052. -
    1053.  
    1054. -
    1055.   /**
    1056. -
    1057.    * Applies stuff :)
    1058. -
    1059.    * Expands namespace prefixes etc.
    1060. -
    1061.    * @param array $prefixes 
    1062. -
    1063.    * @param array $list 
    1064. -
    1065.    * @returns $list
    1066. -
    1067.    * @access private
    1068. -
    1069.    ***/
    1070. -
    1071.   function applyStuff($prefixes$list{
    1072. -
    1073.  
    1074. -
    1075.     array_walk($listarray($this'replace_a_type'));
    1076. -
    1077.     array_walk($listarray($this'replace_equal'));
    1078. -
    1079.     array_walk($listarray($this'replace_this'));
    1080. -
    1081.  
    1082. -
    1083.     for ($i=0;$i<count($list);$i++{
    1084. -
    1085.       //   for i in range(len(list)) {
    1086. -
    1087. //      if (!strstr('<_"?.;,{}[]()',$list[$i]{0})) {
    1088. -
    1089.  
    1090. -
    1091.  
    1092. -
    1093. // if a <> resource occours, change it to the parsed filename or local URI + timestamp
    1094. -
    1095.  
    1096. -
    1097.         if ($list[$i]=='<>'{
    1098. -
    1099.             if (!isset($path)) {
    1100. -
    1101.                 if (!isset($_SERVER['SERVER_ADDR'])) $_SERVER['SERVER_ADDR']='localhost';
    1102. -
    1103.                 if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI']='/rdfapi-php';
    1104. -
    1105.                 $list[$i]='<http://'.$_SERVER['SERVER_ADDR'].$_SERVER['REQUEST_URI'].'#generate_timestamp_'.time().'>';
    1106. -
    1107.  
    1108. -
    1109.           }else {$list[$i]='<'.$path.'>';};
    1110. -
    1111.         };
    1112. -
    1113.  
    1114. -
    1115.  
    1116. -
    1117.         if ((!strstr('<_"?.;,{}[]()@',$list[$i]{0}))AND (substr($list[$i],0,3)!='^^<')) {
    1118. -
    1119.       $_rexplode(":",$list[$i]);
    1120. -
    1121.  
    1122. -
    1123.  
    1124. -
    1125.  
    1126. -
    1127.  
    1128. -
    1129.  
    1130. -
    1131.     $ns=$_r[0].':';
    1132. -
    1133.     $name=$_r[1];
    1134. -
    1135.  
    1136. -
    1137.     if (isset($prefixes[$ns])) $list[$i'<'.$prefixes[$ns].$name.'>';
    1138. -
    1139.     else if (isset($prefixes[substr($ns,2)])) $list[$i'^^'.$prefixes[substr($ns,2)].$name.'';
    1140. -
    1141.   else {
    1142. -
    1143.   #die('Prefix not declared:'.$ns);
    1144. -
    1145.       $this->parseError=true;
    1146. -
    1147.     trigger_error('Prefix not declared: '.$nsE_USER_ERROR);
    1148. -
    1149.     break;
    1150. -
    1151.  
    1152. -
    1153.  
    1154. -
    1155.   }
    1156. -
    1157.  
    1158. -
    1159.       else {
    1160. -
    1161.     if ($list[$i]{0== '"'{  // Congratulations - it's a literal!
    1162. -
    1163.       if (substr($list[$i],0,3== '"""'{
    1164. -
    1165.         if (substr($list[$i],-3,3== '"""'// A big literal...
    1166. -
    1167.           $lit substr($list[$i],3,-3);
    1168. -
    1169.           //          print "++$lit++";
    1170. -
    1171.           $lit=str_replace('\n''\\n',$lit);
    1172. -
    1173.  
    1174. -
    1175.           $lit=ereg_replace("[^\\]\"""\\\""$lit);
    1176. -
    1177.  
    1178. -
    1179.           $list[$i'"'.$lit.'"';
    1180. -
    1181.         }
    1182. -
    1183.         else die ('Incorrect string formatting: '.substr($list[$i],-3,3))}
    1184. -
    1185.       else {
    1186. -
    1187.         if (strstr($list[$i],"\n")) die('Newline in literal: '+$list[$i]);
    1188. -
    1189.       }
    1190. -
    1191.     }
    1192. -
    1193.       }
    1194. -
    1195.  
    1196. -
    1197.       if (substr($list[$i],0,2)=='^^'{
    1198. -
    1199.         if ($list[$i][2]!='<'){$list[$i]='^^<'.substr($list[$i],2).'>';};
    1200. -
    1201.       };
    1202. -
    1203.  
    1204. -
    1205.  
    1206. -
    1207.     }
    1208. -
    1209.  
    1210. -
    1211.  
    1212. -
    1213.     return $list;
    1214. -
    1215.   }
    1216. -
    1217.  
    1218. -
    1219.   /**
    1220. -
    1221.    * Returns an array of triples extracted from the list of n3 tokens
    1222. -
    1223.    * @param array $list 
    1224. -
    1225.    * @returns array
    1226. -
    1227.    * @access private
    1228. -
    1229.    ***/
    1230. -
    1231.   function getStatements($list{
    1232. -
    1233.  
    1234. -
    1235.  
    1236. -
    1237.     $statements array();
    1238. -
    1239.  
    1240. -
    1241.     while (in_array('.'$list)) {
    1242. -
    1243.       //  for($i=0;$i<count($list); $i++) {
    1244. -
    1245.       //    if ($list[$i]==".") {
    1246. -
    1247.       //   while '.' in list {
    1248. -
    1249.       $pos=array_search('.',$list);
    1250. -
    1251.  
    1252. -
    1253.       $r=$this->getSpan($list0$pos+1);
    1254. -
    1255.  
    1256. -
    1257.       $statement=$r[0];
    1258. -
    1259.       $list $r[1];
    1260. -
    1261.  
    1262. -
    1263.       array_pop($statement);
    1264. -
    1265.       $statements[]=$statement;
    1266. -
    1267.     }
    1268. -
    1269.  
    1270. -
    1271.     return $statements;
    1272. -
    1273.   }
    1274. -
    1275.  
    1276. -
    1277.   /**
    1278. -
    1279.    * Gets a list of triples with same subject
    1280. -
    1281.    * e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    1282. -
    1283.    * @param array $list 
    1284. -
    1285.    * @returns array
    1286. -
    1287.    * @acces private
    1288. -
    1289.    ***/
    1290. -
    1291.   function getPovs($list{
    1292. -
    1293.     $povs array();
    1294. -
    1295.     while (in_array(';'$list)) {
    1296. -
    1297.       $r=$this->posns($list,';');
    1298. -
    1299.       $pos=array_slice($r,0,2);
    1300. -
    1301.       $r $this->getSpan($list$pos[0]$pos[1]);
    1302. -
    1303.       $pov=$r[0];
    1304. -
    1305.       $list=$r[1];
    1306. -
    1307.  
    1308. -
    1309.       // skip lone semicolons, e.g. "<a> <b> <c> ; ."
    1310. -
    1311.       if (count($pov== 1continue;
    1312. -
    1313.  
    1314. -
    1315.       $povs[]=array_slice($pov,1);
    1316. -
    1317.     }
    1318. -
    1319.  
    1320. -
    1321.     return array($list$povs);
    1322. -
    1323.   }
    1324. -
    1325.  
    1326. -
    1327.   /**
    1328. -
    1329.    * Gets a list of triples with same predicate
    1330. -
    1331.    * e.g. :Gunnar :likes "Cheese", "Wine".
    1332. -
    1333.    * @access private
    1334. -
    1335.    * @param array $list 
    1336. -
    1337.    * @returns array
    1338. -
    1339.    ***/
    1340. -
    1341.   function getObjs($list{
    1342. -
    1343.  
    1344. -
    1345.  
    1346. -
    1347.     $objs array();
    1348. -
    1349.     while (in_array(",",$list)) {
    1350. -
    1351.       $pos=array_search(",",$list);
    1352. -
    1353.       //  for($i=0;$i<count($list); $i++) {
    1354. -
    1355.       //    if ($list[$i]==",") {
    1356. -
    1357.       //   while ',' in list {
    1358. -
    1359.  
    1360. -
    1361.  
    1362. -
    1363.       $get_array_fields=2;
    1364. -
    1365.       if (isset ($list[$pos+2])) {
    1366. -
    1367.           if (@$list[$pos+2][0]=='@'$get_array_fields++;
    1368. -
    1369.         if (@$list[$pos+2][0]=='^'$get_array_fields++;
    1370. -
    1371.       };
    1372. -
    1373.       if (isset ($list[$pos+3])) if (@$list[$pos+3][0]=='^'$get_array_fields++;};
    1374. -
    1375.  
    1376. -
    1377.  
    1378. -
    1379.       $r=$this->getSpan($list$pos($pos+$get_array_fields));
    1380. -
    1381.  
    1382. -
    1383.       $obj=$r[0];
    1384. -
    1385.       if (!isset($obj[2])) $obj[2]=' ';
    1386. -
    1387.       if (!isset($obj[3])) $obj[3]=' ';
    1388. -
    1389.  
    1390. -
    1391.       $list=$r[1];
    1392. -
    1393.  
    1394. -
    1395.  
    1396. -
    1397.       $objs[]=$obj;
    1398. -
    1399.  
    1400. -
    1401.  
    1402. -
    1403.     }
    1404. -
    1405.  
    1406. -
    1407.     return array($list$objs);
    1408. -
    1409.   }
    1410. -
    1411.  
    1412. -
    1413.   /**
    1414. -
    1415.    * Does the real work, returns a list of subject, predicate, object triples.
    1416. -
    1417.    * @param array $list 
    1418. -
    1419.    * @returns array
    1420. -
    1421.    * @access private
    1422. -
    1423.    ***/
    1424. -
    1425.   function statementize($list{
    1426. -
    1427.  
    1428. -
    1429.     if (count($list== && preg_match("/_".BNODE_PREFIX."[0-9]+_/",$list[0])) {
    1430. -
    1431.     if ($this->debugprint "Ignored bNode exists statement$list\n";
    1432. -
    1433.     return array();
    1434. -
    1435.     }
    1436. -
    1437.  
    1438. -
    1439.  
    1440. -
    1441.  
    1442. -
    1443.     if (count($list== 3return array($list);
    1444. -
    1445.     if (count($list3die("Error: statement too short!");
    1446. -
    1447.  
    1448. -
    1449.     //Get all ;
    1450. -
    1451.     $r=$this->getPovs($list);
    1452. -
    1453.     $spo=$r[0];
    1454. -
    1455.     $po=$r[1];
    1456. -
    1457.     $all=array();
    1458. -
    1459.  
    1460. -
    1461.  
    1462. -
    1463.  
    1464. -
    1465.     //      (spo, po), all = getPovs(list), []
    1466. -
    1467.     $subject $spo[0];
    1468. -
    1469.     foreach ($po as $pop{
    1470. -
    1471.       //  for pop in po {
    1472. -
    1473.       $r=$this->getObjs($pop);
    1474. -
    1475.  
    1476. -
    1477.       $myPo=$r[0];
    1478. -
    1479.       $obj=$r[1];
    1480. -
    1481.       //myPo, obj = getObjs(pop)
    1482. -
    1483.  
    1484. -
    1485.       if (!isset($myPo[2])) $myPo[2]=' ';
    1486. -
    1487.       if (!isset($myPo[3])) $myPo[3]=' ';
    1488. -
    1489.  
    1490. -
    1491.  
    1492. -
    1493.       $predicate $myPo[0];
    1494. -
    1495.       $all[]=array($subject,$predicate,$myPo[1],$myPo[2],$myPo[3]);
    1496. -
    1497.       //    all.append([subject, predicate, myPo[1]])
    1498. -
    1499.  
    1500. -
    1501.  
    1502. -
    1503.  
    1504. -
    1505.       foreach ($obj as $o$all[]=array($subject,$predicate$o[1],$o[2],$o[3]);
    1506. -
    1507.       //         for x in obj: all.append([subject, predicate, x])
    1508. -
    1509.  
    1510. -
    1511.     }
    1512. -
    1513.  
    1514. -
    1515.  
    1516. -
    1517.  
    1518. -
    1519.     $r $this->getObjs($spo);
    1520. -
    1521.     $spo=$r[0];
    1522. -
    1523.  
    1524. -
    1525.     $objs=$r[1];
    1526. -
    1527.  
    1528. -
    1529.     //spo, objs = getObjs(spo)
    1530. -
    1531.     $subject=$spo[0];
    1532. -
    1533.     $predicate=$spo[1];
    1534. -
    1535.  
    1536. -
    1537.  
    1538. -
    1539.     if(!isset($spo[3])) $spo[3]=' ';
    1540. -
    1541.     if(!isset($spo[4])) $spo[4]=' ';
    1542. -
    1543.  
    1544. -
    1545.     $all[]=array($subject$predicate$spo[2],$spo[3],$spo[4]);
    1546. -
    1547.  
    1548. -
    1549.     foreach ($objs as $obj$all[]=array($subject$predicate$obj[1],$obj[2],$obj[3]);
    1550. -
    1551.  
    1552. -
    1553.     return $all;
    1554. -
    1555.   }
    1556. -
    1557.  
    1558. -
    1559.   /**
    1560. -
    1561.    * Makes lists of elements in list into a seperate array element.
    1562. -
    1563.    * e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"]
    1564. -
    1565.    * @param array $list 
    1566. -
    1567.    * @param string $schar 
    1568. -
    1569.    * @param string $echar 
    1570. -
    1571.    * @returns array
    1572. -
    1573.    * @access private
    1574. -
    1575.    ***/
    1576. -
    1577.   function doLists($list$schar$echar{
    1578. -
    1579.  
    1580. -
    1581.     while (in_array($schar$list)) {
    1582. -
    1583.       //   while schar in list {
    1584. -
    1585.       $ndict=array();
    1586. -
    1587.       $nestingLevel=0;
    1588. -
    1589.       $biggest=0;
    1590. -
    1591.       for ($i=0;$i<count($list);$i++{
    1592. -
    1593.     if ($list[$i== $schar{
    1594. -
    1595.       $nestingLevel += 1;
    1596. -
    1597.       if (!in_array($nestingLevelarray_keys($ndict))) {
    1598. -
    1599.         $ndict[$nestingLevelarray(array($i));
    1600. -
    1601.       else {
    1602. -
    1603.         $ndict[$nestingLevel][]=array($i);
    1604. -
    1605.       }
    1606. -
    1607.     }
    1608. -
    1609.     if ($list[$i== $echar{
    1610. -
    1611.       if (!in_array($nestingLevelarray_keys($ndict))) {
    1612. -
    1613.         $ndict[$nestingLevel]=array(array($i));
    1614. -
    1615.       else {
    1616. -
    1617.             $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i;
    1618. -
    1619.             $nestingLevel-= 1;
    1620. -
    1621. # elif type(list[i]) == type([]) {
    1622. -
    1623. #    list[i] = doLists(list[i], schar, echar)
    1624. -
    1625.       }
    1626. -
    1627.     }
    1628. -
    1629.       }
    1630. -
    1631.       foreach (array_keys($ndictas $key)
    1632. -
    1633.     if ($key $biggest)  $biggest $key;
    1634. -
    1635.  
    1636. -
    1637.       $tol $ndict[$biggest][0];
    1638. -
    1639.       $list $this->listify($list$tol[0]($tol[1]+1));
    1640. -
    1641.     }
    1642. -
    1643.     return $list;
    1644. -
    1645.   }
    1646. -
    1647.  
    1648. -
    1649.   /**
    1650. -
    1651.    * Apply doLists for all different types of list.
    1652. -
    1653.    * @param array 
    1654. -
    1655.    * @returns array
    1656. -
    1657.    * @access private
    1658. -
    1659.    ***/
    1660. -
    1661.   function listStuff($list{
    1662. -
    1663. # y, z = zip(['[', ']'], ['{', '}'], ['(', ')'])
    1664. -
    1665. # return map(doLists, [list, list, list], y, z).pop()
    1666. -
    1667.     $list $this->doLists($list'['']');
    1668. -
    1669.     $list $this->doLists($list'{''}');
    1670. -
    1671.     return $this->doLists($list'('')');
    1672. -
    1673.   }
    1674. -
    1675.  
    1676. -
    1677.   /**
    1678. -
    1679.    * Generates a new node id.
    1680. -
    1681.    * @access private
    1682. -
    1683.    * @returns string
    1684. -
    1685.    ***/
    1686. -
    1687.   function bnodeID({
    1688. -
    1689.  
    1690. -
    1691.     $this->bNode++;
    1692. -
    1693.     return "_".BNODE_PREFIX.$this->bNode."_";
    1694. -
    1695.   }
    1696. -
    1697.  
    1698. -
    1699.   /**
    1700. -
    1701.    * This makes bNodes out of variables like _:a etc.
    1702. -
    1703.    * @access private
    1704. -
    1705.    * @param array $list 
    1706. -
    1707.    * @returns array
    1708. -
    1709.    ***/
    1710. -
    1711.   function fixAnon($list{
    1712. -
    1713. //    $map=array();
    1714. -
    1715.     for($i=0;$i<count($list);$i++{
    1716. -
    1717.       $l=$list[$i];
    1718. -
    1719.       if (substr($l,0,2)=="_:"{
    1720. -
    1721.       if (!isset($this->bNodeMap[$l])) {
    1722. -
    1723.       $a=$this->bnodeID();
    1724. -
    1725.       $this->bNodeMap[$l]=$a;
    1726. -
    1727.     else $a=$this->bNodeMap[$l];
    1728. -
    1729.     $list[$i]=$a;
    1730. -
    1731.       }
    1732. -
    1733.     }
    1734. -
    1735.     return $list;
    1736. -
    1737.   }
    1738. -
    1739.  
    1740. -
    1741.   /**
    1742. -
    1743.    * This makes [ ] lists into bnodes.
    1744. -
    1745.    * @access private
    1746. -
    1747.    * @param array $list 
    1748. -
    1749.    * @return array 
    1750. -
    1751.    ***/
    1752. -
    1753.   function expandLists($list{
    1754. -
    1755.  
    1756. -
    1757.     for($i=0;$i<count($list);$i++{
    1758. -
    1759.       if (is_array($list[$i])) {
    1760. -
    1761.     if $list[$i][0]=='[' {
    1762. -
    1763.       $bnode=$this->bnodeID();
    1764. -
    1765.       $prop=$list[$i];
    1766. -
    1767.       $list[$i]=$bnode;
    1768. -
    1769.       $list[]=$bnode;
    1770. -
    1771.       $list=$this->array_concat($listarray_slice($prop,1,-1));
    1772. -
    1773.       $list[]='.';
    1774. -
    1775.     }elseif($list[$i][0]=='('{
    1776. -
    1777.  
    1778. -
    1779.         $rdfNil '<'RDF_NAMESPACE_URI RDF_NIL .'>';
    1780. -
    1781.         $rdfFirst '<'RDF_NAMESPACE_URI RDF_FIRST .'>';
    1782. -
    1783.         $rdfRest '<'RDF_NAMESPACE_URI RDF_REST .'>';
    1784. -
    1785.  
    1786. -
    1787.         // local copy of list without "(" and ")"
    1788. -
    1789.         $t_list array_slice($list[$i]1-1);
    1790. -
    1791.  
    1792. -
    1793.         //prepare bnodes
    1794. -
    1795.         $fromBnode $this->bnodeID();
    1796. -
    1797.         $toBnode $this->bnodeID();
    1798. -
    1799.  
    1800. -
    1801.         //link first bnode into graph
    1802. -
    1803.         $list[$i$fromBnode;
    1804. -
    1805.  
    1806. -
    1807.         $count count($t_list);
    1808. -
    1809.  
    1810. -
    1811.         //loop through list, convert to RDF linked list
    1812. -
    1813.         for ($idx 0$idx $count$idx++){
    1814. -
    1815.  
    1816. -
    1817.             // set rdf:first
    1818. -
    1819.             $list[$fromBnode;
    1820. -
    1821.             $list[$rdfFirst;
    1822. -
    1823.             $list[$t_list[$idx];
    1824. -
    1825.             $list['.';
    1826. -
    1827.  
    1828. -
    1829.             // set rdf:rest (nil or next bnode)
    1830. -
    1831.             if ($idx == $count 1{
    1832. -
    1833.                 $list[$fromBnode;
    1834. -
    1835.                 $list[$rdfRest;
    1836. -
    1837.                 $list[$rdfNil;
    1838. -
    1839.                 $list['.';
    1840. -
    1841.             }
    1842. -
    1843.             else {
    1844. -
    1845.                 $list[$fromBnode;
    1846. -
    1847.                 $list[$rdfRest;
    1848. -
    1849.                 $list[$toBnode;
    1850. -
    1851.                 $list['.';
    1852. -
    1853.  
    1854. -
    1855.                 $fromBnode $toBnode;
    1856. -
    1857.                 $toBnode $this->bnodeID();
    1858. -
    1859.             }
    1860. -
    1861.         }
    1862. -
    1863.     }
    1864. -
    1865.     else {
    1866. -
    1867.         die('Only [ ] and () lists are supported!');
    1868. -
    1869.     }
    1870. -
    1871.     }
    1872. -
    1873.  
    1874. -
    1875.  
    1876. -
    1877.     }
    1878. -
    1879.     return $list;
    1880. -
    1881.   }
    1882. -
    1883.  
    1884. -
    1885.   /**
    1886. -
    1887.    * Main work-horse function. This converts a N3 string to a list of statements
    1888. -
    1889.    * @param string $s 
    1890. -
    1891.    * @returns array
    1892. -
    1893.    * @access private
    1894. -
    1895.    ***/
    1896. -
    1897.   function n3tolist($s{
    1898. -
    1899.  
    1900. -
    1901.     //   """Convert an N3 string into a list of triples as strings."""
    1902. -
    1903.     $result array();
    1904. -
    1905.  
    1906. -
    1907.    $t $this->filterWs($this->toke($s))# tokenize the stream, and filter whitespace tokens
    1908. -
    1909.  
    1910. -
    1911.     if ($this->debug{
    1912. -
    1913.       print "Filter WS:\n";
    1914. -
    1915.       var_dump($t);
    1916. -
    1917.     }
    1918. -
    1919.     $r=$this->getPrefixes($t)# get the prefix directives, and add to a dict
    1920. -
    1921.     $prefixes=$r[0];
    1922. -
    1923.     $t=$r[1];
    1924. -
    1925.     if ($this->debug{
    1926. -
    1927.       print "Prefixes:\n";
    1928. -
    1929.       var_dump($prefixes);
    1930. -
    1931.       print "***\n";
    1932. -
    1933.       var_dump($t);
    1934. -
    1935.     }
    1936. -
    1937.     $t=$this->applyStuff($prefixes$t);#apply prefixes, keywords, and string formatting
    1938. -
    1939.     if ($this->debug{
    1940. -
    1941.       print "Stuff applied:\n";
    1942. -
    1943.       var_dump($t);
    1944. -
    1945.     }
    1946. -
    1947.  
    1948. -
    1949.     $t=$this->fixAnon($t)# fix _:a anons
    1950. -
    1951.     if ($this->debug{
    1952. -
    1953.       print "Fix anon:\n";
    1954. -
    1955.       var_dump($t);
    1956. -
    1957.     }
    1958. -
    1959.  
    1960. -
    1961.     $t $this->listStuff($t)# apply list stuff: todo
    1962. -
    1963.     if ($this->debug{
    1964. -
    1965.       print "Lists done:\n";
    1966. -
    1967.       var_dump($t);
    1968. -
    1969.     }
    1970. -
    1971.     $t=$this->expandLists($t);
    1972. -
    1973.     if ($this->debug{
    1974. -
    1975.       print "Lists applied:\n";
    1976. -
    1977.       var_dump($t);
    1978. -
    1979.     }
    1980. -
    1981.     $t $this->getStatements($t)# get all of the "statements" from the stream
    1982. -
    1983.  
    1984. -
    1985.     foreach ($t as $stat{
    1986. -
    1987.       $stats=$this->statementize($stat);
    1988. -
    1989.  
    1990. -
    1991.       foreach ($stats as $y{
    1992. -
    1993.     $result[]=$y;
    1994. -
    1995.       }
    1996. -
    1997.     }
    1998. -
    1999.     //   for x in [statementize(stat) for stat in t] {
    2000. -
    2001.     //      for y in x: result.append(y)
    2002. -
    2003.     return $result;
    2004. -
    2005.   }
    2006. -
    2007.  
    2008. -
    2009.   /**
    2010. -
    2011.    * Constructs a RAP RDFNode from URI/Literal/Bnode
    2012. -
    2013.    * @access private
    2014. -
    2015.    * @param string $s 
    2016. -
    2017.    * @returns object RDFNode
    2018. -
    2019.    ***/
    2020. -
    2021.   function toRDFNode($s,$state{
    2022. -
    2023.     $ins=substr($s,1,-1);
    2024. -
    2025.     if ($s{0}=="\""{
    2026. -
    2027.       $lang=NULL;
    2028. -
    2029.  
    2030. -
    2031.  
    2032. -
    2033.  
    2034. -
    2035.       if (count($state)>3{
    2036. -
    2037.  
    2038. -
    2039.  
    2040. -
    2041.         for ($i 3$i count($state)$i++){
    2042. -
    2043.           if ($state[$i][0]=='@')$lang=substr($state[3],1);
    2044. -
    2045.           if (substr($state[$i],0,2)=='^^'){
    2046. -
    2047.  
    2048. -
    2049.             $dtype=substr($state[$i],2);
    2050. -
    2051.             if ($dtype[0]=='<'$dtypesubstr($dtype,1,-1);
    2052. -
    2053.  
    2054. -
    2055.           };
    2056. -
    2057.  
    2058. -
    2059.         };
    2060. -
    2061.       };
    2062. -
    2063.  
    2064. -
    2065.  
    2066. -
    2067.      if(UNIC_RDF){
    2068. -
    2069.           $ins=$this->str2unicode_nfc($ins);
    2070. -
    2071.       }
    2072. -
    2073.       $new_Literal=new Literal($ins,$lang);
    2074. -
    2075.       if (isset($dtype)) $new_Literal->setDatatype($dtype);
    2076. -
    2077.       return  $new_Literal;
    2078. -
    2079.     };
    2080. -
    2081.  
    2082. -
    2083.     if (strstr($s,'_'.BNODE_PREFIX)) {
    2084. -
    2085.         if (($this->FixBnodesOR (!array_search($s,$this->bNodeMap))) {
    2086. -
    2087.             return new BlankNode($ins);
    2088. -
    2089.         else {return new BlankNode(trim(substr(array_search($s,$this->bNodeMap),2)));
    2090. -
    2091.         };
    2092. -
    2093.     }
    2094. -
    2095.  
    2096. -
    2097.     return new Resource($ins);
    2098. -
    2099.   }
    2100. -
    2101.  
    2102. -
    2103.  
    2104. -
    2105.  
    2106. -
    2107.  
    2108. -
    2109. //end: N3Parser
    2110. -
    2111.  
    2112. -
    2113. ?>
    2114. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base deleted file mode 100755 index b4e07bb8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxN3Serializer.php.html.svn-base +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - File Source for N3Serializer.php - - - - - -

    Source for file N3Serializer.php

    -

    Documentation is available at N3Serializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: N3Serializer
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * PHP Notation3 Serializer
    16. -
    17.  * 
    18. -
    19.  * This class serialises models to N3 Syntax.
    20. -
    21.  * 
    22. -
    23.  * Supported N3 features:
    24. -
    25.  * <ul>
    26. -
    27.  *   <li>Using [ ] for blank nodes, or _: if nescessary</li>
    28. -
    29.  *   <li>Literal datytype- and xmlLanguageTag support</li>
    30. -
    31.  * </ul>
    32. -
    33.  * 
    34. -
    35.  * Un-supported N3 Features include:
    36. -
    37.  * <ul>
    38. -
    39.  *   <li>Reification</li>
    40. -
    41.  * </ul>
    42. -
    43.  *
    44. -
    45.  *
    46. -
    47.  * TODO: * added namespace prefixes are persisent...
    48. -
    49.  *
    50. -
    51.  * @author Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    52. -
    53.  * @version $Id$
    54. -
    55.  * @package syntax
    56. -
    57.  * @access public
    58. -
    59.  ***/
    60. -
    61.  
    62. -
    63. define('MAGIC_STRING''~~~');
    64. -
    65.  
    66. -
    67. class N3Serializer extends Object {
    68. -
    69.  
    70. -
    71.   var $debug
    72. -
    73.  
    74. -
    75.   var $prefixes
    76. -
    77.  
    78. -
    79.   var $done;  // keeps track of already serialized resources
    80. -
    81.   var $resourcetext
    82. -
    83. -
    84.   var $model;
    85. -
    86.   var $res
    87. -
    88.   var $anon;
    89. -
    90.  
    91. -
    92.    /**
    93. -
    94.     * Constructor
    95. -
    96.     *
    97. -
    98.     * @access   public
    99. -
    100.     */
    101. -
    102.   function N3Serializer(
    103. -
    104.     $this->debug=FALSE;
    105. -
    106.   }
    107. -
    108.  
    109. -
    110.  
    111. -
    112.   /** 
    113. -
    114.    * Adds a new namespace prefix to use.
    115. -
    116.    * Unknown namespaces will become ns0, ns1 etc.
    117. -
    118.    * @access public
    119. -
    120.    * @param string $s 
    121. -
    122.    * @returns void
    123. -
    124.    ***/
    125. -
    126.  
    127. -
    128.   function addNSPrefix$ns$prefix
    129. -
    130.     $this->prefixes[$ns]=$prefix
    131. -
    132.   }
    133. -
    134.  
    135. -
    136.   /**
    137. -
    138.    * Serializes a model to N3 syntax.
    139. -
    140.    *
    141. -
    142.    * @param     object Model $model 
    143. -
    144.    * @return    string 
    145. -
    146.    * @access    public
    147. -
    148.    */
    149. -
    150.   function serialize(&$m
    151. -
    152.  
    153. -
    154.     if (is_a($m'DbModel')) 
    155. -
    156.         $m=$m->getMemModel();
    157. -
    158.     
    159. -
    160.     $this->reset();
    161. -
    162.     $this->model=$m;
    163. -
    164.     $this->res=""
    165. -
    166.     
    167. -
    168.     // copy default namespaces
    169. -
    170.     global $default_prefixes;
    171. -
    172.     foreach($default_prefixes as $prefix => $namespace)
    173. -
    174.             $this->addNSPrefix($namespace,$prefix);
    175. -
    176.     
    177. -
    178.     $nps$this->model->getParsedNamespaces()
    179. -
    180.     if($nps!=false){
    181. -
    182.         foreach($nps as $uri => $prefix){
    183. -
    184.             $this->addNSPrefix($uri,$prefix);
    185. -
    186.         }
    187. -
    188.     }
    189. -
    190.     
    191. -
    192.     $namespaces=array();
    193. -
    194.     $count=array();
    195. -
    196.     $resources=array()
    197. -
    198.     foreach ($this->model->triples as $t
    199. -
    200.       $s=$t->getSubject();
    201. -
    202.       if is_a($s'Resource')) 
    203. -
    204.         $namespaces[$s->getNamespace()]=1;
    205. -
    206.  
    207. -
    208.       $p=$t->getPredicate();
    209. -
    210.       if is_a($p'Resource')) 
    211. -
    212.         $namespaces[$p->getNamespace()]=1;
    213. -
    214.  
    215. -
    216.       $o=$t->getObject();
    217. -
    218.       if is_a($o'Resource')) 
    219. -
    220.         $namespaces[$o->getNamespace()]=1;
    221. -
    222.      
    223. -
    224.       $uri=$s->getURI();
    225. -
    226.       
    227. -
    228.       if (isset($count[$uri])) 
    229. -
    230.         $count[$uri]++;
    231. -
    232.       else {     
    233. -
    234.         $count[$uri]=0;
    235. -
    236.         $resources[$uri]=$s;
    237. -
    238.       }
    239. -
    240.     }
    241. -
    242.  
    243. -
    244.     if (!HIDE_ADVERTISE
    245. -
    246.         $this->res .= '# Generated by N3Serializer.php from RDF RAP.'.LINEFEED
    247. -
    248.                      .'# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'
    249. -
    250.                      .LINEFEED.LINEFEED;
    251. -
    252.  
    253. -
    254.     $this->doNamespaces($namespaces)
    255. -
    256.  
    257. -
    258.     $this->res.=LINEFEED.LINEFEED;
    259. -
    260.  
    261. -
    262.     arsort($count);
    263. -
    264.     
    265. -
    266.     foreach $count as $k=>$v
    267. -
    268.       $this->doResource($resources[$k])
    269. -
    270.       //      $this->res.=" .\n";
    271. -
    272.     }
    273. -
    274.  
    275. -
    276.     $c=0;
    277. -
    278.     foreach $this->resourcetext as $r=>$t
    279. -
    280.  
    281. -
    282.       if preg_match_all('/'.MAGIC_STRING.'([^ ]+)'.MAGIC_STRING.'/'$t$msPREG_SET_ORDER)) {
    283. -
    284.  
    285. -
    286.     foreach($ms as $mseach
    287. -
    288.       $rp=$this->resourcetext[$mseach[1]];
    289. -
    290.       $t=preg_replace('/'.MAGIC_STRING.$mseach[1].MAGIC_STRING.'/'$rp$t);
    291. -
    292.     }
    293. -
    294.       }
    295. -
    296.  
    297. -
    298.       if ($this->debug$this->res.=$c.': ';
    299. -
    300.       if !isset($this->resourcetext_taken[$r]&& $this->resourcetext_taken[$r]>0) ) 
    301. -
    302.          $this->res.=$t.' .'.LINEFEED
    303. -
    304.       else if $this->debug 
    305. -
    306.          $this->res.=' Skipping : '.$t.LINEFEED;
    307. -
    308.       $c++;
    309. -
    310.     
    311. -
    312.  
    313. -
    314. //     $max=-1111;
    315. -
    316. //     $maxkey="";
    317. -
    318. //     foreach ($count as $k=>$c) { 
    319. -
    320. //       if ( $c>$max) { $maxkey=$k; $max=$c; }
    321. -
    322. //     }
    323. -
    324.     
    325. -
    326. //     if ($this->debug) { 
    327. -
    328. //       print "$maxkey is subject of most triples! ($max) \n"; 
    329. -
    330. //     }
    331. -
    332.  
    333. -
    334.     return $this->res;
    335. -
    336.   }
    337. -
    338.  
    339. -
    340. /**
    341. -
    342.  * Serializes a model and saves it into a file.
    343. -
    344.  * Returns FALSE if the model couldn't be saved to the file.
    345. -
    346.  *
    347. -
    348.  * @param     object MemModel $model 
    349. -
    350.  * @param     string $filename 
    351. -
    352.  * @return    boolean 
    353. -
    354.  * @access    public
    355. -
    356.  */
    357. -
    358.  function  saveAs(&$model$filename{
    359. -
    360.  
    361. -
    362.    // serialize model
    363. -
    364.    $n3 $this->serialize($model);
    365. -
    366.  
    367. -
    368.    // write serialized model to file
    369. -
    370.    $file_handle @fopen($filename'w');
    371. -
    372.    if ($file_handle{
    373. -
    374.       fwrite($file_handle$n3);
    375. -
    376.       fclose($file_handle);
    377. -
    378.       return TRUE;
    379. -
    380.    }else{
    381. -
    382.       return FALSE;
    383. -
    384.    };
    385. -
    386.  }
    387. -
    388.   
    389. -
    390.  
    391. -
    392.   /* ==================== Private Methods from here ==================== */
    393. -
    394.  
    395. -
    396.  
    397. -
    398. /**
    399. -
    400.  * Readies this object for serializing another model
    401. -
    402.  * @access private
    403. -
    404.  * @param void 
    405. -
    406.  * @returns void
    407. -
    408.  ***/
    409. -
    410.   function reset({
    411. -
    412.     $this->anon=0;
    413. -
    414.     $this->done=array();
    415. -
    416.     $this->resourcetext_taken=array();
    417. -
    418.     $this->resourcetext=array();
    419. -
    420.     $this->res='';
    421. -
    422.     $this->model=NULL;
    423. -
    424.     unset($this->prefixes);
    425. -
    426.   }
    427. -
    428.  
    429. -
    430. /**
    431. -
    432.  * Makes ns0, ns1 etc. prefixes for unknown prefixes.
    433. -
    434.  * Outputs @prefix lines.
    435. -
    436.  * @access private
    437. -
    438.  * @param array $n 
    439. -
    440.  * @returns void
    441. -
    442.  ***/
    443. -
    444.   function doNamespaces(&$n
    445. -
    446.     $c=0;
    447. -
    448.     foreach ($n as $ns => $nonsense
    449. -
    450.       if !$ns continue;  
    451. -
    452.       if isset($this->prefixes[$ns]) ) {
    453. -
    454.     $p=$this->prefixes[$ns];
    455. -
    456.       else 
    457. -
    458.     $p='ns'.$c;
    459. -
    460.     $this->prefixes[$ns]=$p;
    461. -
    462.     $c++;
    463. -
    464.       }
    465. -
    466.       $this->res.="@prefix $p: <".$ns.'> .'.LINEFEED;
    467. -
    468.     }
    469. -
    470.   }
    471. -
    472.  
    473. -
    474. /**
    475. -
    476.  * Fill in $resourcetext for a single resource.
    477. -
    478.  * Will recurse into Objects of triples, but should never look ? (really?)
    479. -
    480.  * @access private
    481. -
    482.  * @param object Resource $r 
    483. -
    484.  * @returns boolean
    485. -
    486.  ***/
    487. -
    488.  
    489. -
    490.   function doResource(&$r
    491. -
    492.     //    print $r->getURI(); 
    493. -
    494.  
    495. -
    496.     $ts=$this->model->find($rnullnull);
    497. -
    498.     if (count($ts->triples)==0return
    499. -
    500.     
    501. -
    502.     $out="";
    503. -
    504.  
    505. -
    506.     if isset($this->done[$r->getURI()]&& $this->done[$r->getURI(){
    507. -
    508.       if is_a($r'BlankNode')) 
    509. -
    510.       
    511. -
    512.           if $this->resourcetext_taken[$r->getURI()== 1
    513. -
    514.               //Oh bother, we must use the _:blah construct. 
    515. -
    516.               $a=$this->resourcetext[$r->getURI()];
    517. -
    518.               $this->resourcetext[$r->getURI()]='_:anon'.$this->anon;
    519. -
    520.               $this->resourcetext['_:anon'.$this->anon]=$this->fixAnon($a'_:anon'.$this->anon);
    521. -
    522.               $this->resourcetext_taken[$r->getURI()]=2
    523. -
    524.               $this->anon++;
    525. -
    526.         }
    527. -
    528.  
    529. -
    530.       }
    531. -
    532.       return false
    533. -
    534.     }
    535. -
    536.  
    537. -
    538.     $this->done[$r->getURI()]=TRUE;
    539. -
    540.  
    541. -
    542.     if is_a($r'Resource') ) {
    543. -
    544.  
    545. -
    546.       if is_a($r'BlankNode') ) 
    547. -
    548.  
    549. -
    550.            //test, if this blanknode is referenced somewhere
    551. -
    552.           $rbn=$this->model->find(nullnull$r);
    553. -
    554.  
    555. -
    556.           if (count($rbn->triples)>!N3SER_BNODE_SHORT{
    557. -
    558.               $out.='_:'.$r->getLabel();
    559. -
    560.           else {
    561. -
    562.               $out.='[ ';
    563. -
    564.           };    
    565. -
    566.       else 
    567. -
    568.  
    569. -
    570.         $this->doURI($r$out);
    571. -
    572.  
    573. -
    574.       };
    575. -
    576.     };
    577. -
    578.   
    579. -
    580.     usort($ts->triples'statementsorter');
    581. -
    582.     $lastp='';
    583. -
    584.  
    585. -
    586.     $out.=' ';
    587. -
    588.  
    589. -
    590.     foreach ($ts->triples as $t
    591. -
    592.       
    593. -
    594.       $p=$t->getPredicate()
    595. -
    596.       
    597. -
    598.       if ($p == $lastp{
    599. -
    600.     $out.=' , '
    601. -
    602.       else 
    603. -
    604.     if ($lastp!=''$out.=' ; '
    605. -
    606.     $this->doURI($p$out);
    607. -
    608.     $lastp=$p;
    609. -
    610.       }
    611. -
    612.  
    613. -
    614.       $out.=' ';
    615. -
    616.       
    617. -
    618.       $o=$t->getObject();
    619. -
    620.       
    621. -
    622.       if is_a($o'Literal')) 
    623. -
    624.     $l=$o->getLabel();
    625. -
    626.     if strpos($lLINEFEED=== FALSE 
    627. -
    628.       $out.="\"$l\"";
    629. -
    630.     else 
    631. -
    632.       $out.="\"\"\"$l\"\"\"";      
    633. -
    634.     }
    635. -
    636.     if $o->getLanguage()!='' 
    637. -
    638.       $out.='@'.$o->getLanguage();
    639. -
    640.     }
    641. -
    642.     if $o->getDatatype()!='' 
    643. -
    644.       $out.='^^<'.$o->getDatatype().'>';
    645. -
    646.     }
    647. -
    648.     
    649. -
    650.       
    651. -
    652.       
    653. -
    654.       if (is_a($o'Resource')) {
    655. -
    656.     if ($this->debugprint 'Doing object: '.$o->getURI().LINEFEED;
    657. -
    658.     if is_a($o,'BlankNode')) {
    659. -
    660.  
    661. -
    662. //    $this->doResource($o);
    663. -
    664. //      $out.=MAGIC_STRING.$o->getURI().MAGIC_STRING; #$this->resourcetext[$o->getURI()];
    665. -
    666. //      $this->resourcetext_taken[$o->getURI()]=1;
    667. -
    668.  
    669. -
    670.     $out .='_:'.$o->getLabel();
    671. -
    672.     else 
    673. -
    674.  
    675. -
    676.       $this->doURI($o$out);
    677. -
    678.     }
    679. -
    680.       }
    681. -
    682.     }
    683. -
    684.  
    685. -
    686.     if (isset($rbn&& !count($rbn->triples)>&& N3SER_BNODE_SHORT{$out.=' ] ';};
    687. -
    688.     $this->resourcetext[$r->getURI()]=$out
    689. -
    690.  
    691. -
    692.     return TRUE;
    693. -
    694.   }
    695. -
    696.  
    697. -
    698.   /** 
    699. -
    700.    * Format a single URI
    701. -
    702.    * @param string $s 
    703. -
    704.    * @access private
    705. -
    706.    * @return void 
    707. -
    708.    ***/
    709. -
    710.   function doURI(&$r&$out
    711. -
    712.     if $r->getURI()=='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'{
    713. -
    714.       $out.='a';
    715. -
    716.       return
    717. -
    718.     }
    719. -
    720.     if ($r->getNamespace()!=''{
    721. -
    722.       $out.=$this->prefixes[$r->getNamespace()].':'.$r->getLocalName();
    723. -
    724.     else 
    725. -
    726.       //Will this ever happen? 
    727. -
    728.       $out.=$r->getURI();
    729. -
    730.     }
    731. -
    732.   }
    733. -
    734.  
    735. -
    736.   
    737. -
    738.   /** 
    739. -
    740.    * Fix the resourcetext for a blanknode where the _: construct was used
    741. -
    742.    * @param string $s 
    743. -
    744.    * @param string $a 
    745. -
    746.    * @access private
    747. -
    748.    * @return void 
    749. -
    750.    ***/
    751. -
    752.   function fixAnon($t,$a
    753. -
    754.     $t=preg_replace("/( \] $|^\[ )/"''$t)
    755. -
    756.  
    757. -
    758.     return $a.$t;
    759. -
    760.   }
    761. -
    762.  
    763. -
    764. }
    765. -
    766.  
    767. -
    768. ?>
    769. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:01 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base deleted file mode 100755 index 4c6b6604..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxNTripleSerializer.php.html.svn-base +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - File Source for NTripleSerializer.php - - - - - -

    Source for file NTripleSerializer.php

    -

    Documentation is available at NTripleSerializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: NTripleSerializer
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * PHP N-Triple Serializer
    18. -
    19.  * 
    20. -
    21.  * This class serialises models to N-Triple Syntax.
    22. -
    23.  * 
    24. -
    25.  *
    26. -
    27.  *
    28. -
    29.  * @author Daniel Westphal <mail@d-westphal.de>
    30. -
    31.  * @version $Id$
    32. -
    33.  * @package syntax
    34. -
    35.  * @access public
    36. -
    37.  ***/
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45. class NTripleSerializer extends Object {
    46. -
    47.  
    48. -
    49.   var $debug
    50. -
    51.   var $model;
    52. -
    53.   var $res
    54. -
    55.  
    56. -
    57.   
    58. -
    59.   
    60. -
    61.   
    62. -
    63.  
    64. -
    65.    /**
    66. -
    67.     * Constructor
    68. -
    69.     *
    70. -
    71.     * @access   public
    72. -
    73.     */
    74. -
    75.   function NTripleSerializer(
    76. -
    77.     $this->debug=FALSE;
    78. -
    79.   }
    80. -
    81.  
    82. -
    83.   /**
    84. -
    85.    * Serializes a model to N Triple syntax.
    86. -
    87.    *
    88. -
    89.    * @param     object Model $model 
    90. -
    91.    * @return    string 
    92. -
    93.    * @access    public
    94. -
    95.    */
    96. -
    97.   function serialize(&$m
    98. -
    99.  
    100. -
    101.         if (is_a($m'DbModel')) $m $m->getMemModel();
    102. -
    103.     
    104. -
    105.     $this->reset();
    106. -
    107.     if (!HIDE_ADVERTISE{
    108. -
    109.         $this->res .= '# Generated by NTripleSerializer.php from RDF RAP.' .
    110. -
    111.             LINEFEED '# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'.
    112. -
    113.             LINEFEED LINEFEED;
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     foreach ($m->triples as $t
    120. -
    121.  
    122. -
    123.       $s=$t->getSubject();
    124. -
    125.       if (is_a($s'Blanknode')) {
    126. -
    127.           $subject='_:'.$s->getURI();
    128. -
    129.       else {
    130. -
    131.           $subject '<' ereg_replace(' '''$s->getURI()) '>';
    132. -
    133.       }
    134. -
    135.  
    136. -
    137.       $p=$t->getPredicate();  
    138. -
    139.       $predicate='<'.ereg_replace(' '''$p->getURI()).'>';
    140. -
    141.  
    142. -
    143.       $o=$t->getObject();     
    144. -
    145.       if (is_a($o'literal')) {
    146. -
    147.           $object='"'.$o->getLabel().'"';
    148. -
    149.           if ($o->getLanguage()!=''$object.='@'.$o->getLanguage();              
    150. -
    151.           if ($o->getDatatype()!=''$object.='^^<'.$o->getDatatype().">";              
    152. -
    153.       elseif (is_a($o'Blanknode')) {
    154. -
    155.         $object='_:'.$o->getURI();
    156. -
    157.       else {$object='<'.ereg_replace(' '''$o->getURI()).'>';};    
    158. -
    159.         
    160. -
    161.       $this->res.=$subject.' '.$predicate.' '.$object.' .';
    162. -
    163.       $this->res.=LINEFEED.LINEFEED;
    164. -
    165.     }
    166. -
    167.    
    168. -
    169.     return $this->res;
    170. -
    171.   
    172. -
    173.   
    174. -
    175.  
    176. -
    177. /**
    178. -
    179.  * Serializes a model and saves it into a file.
    180. -
    181.  * Returns FALSE if the model couldn't be saved to the file.
    182. -
    183.  *
    184. -
    185.  * @access    public
    186. -
    187.  * @param     object MemModel $model 
    188. -
    189.  * @param     string $filename 
    190. -
    191.  * @return    boolean 
    192. -
    193.  * @access    public
    194. -
    195.  */
    196. -
    197.  function  saveAs(&$model$filename{
    198. -
    199.  
    200. -
    201.    // serialize model
    202. -
    203.    $n3 $this->serialize($model);
    204. -
    205.  
    206. -
    207.    // write serialized model to file
    208. -
    209.    $file_handle @fopen($filename'w');
    210. -
    211.    if ($file_handle{
    212. -
    213.       fwrite($file_handle$n3);
    214. -
    215.       fclose($file_handle);
    216. -
    217.       return TRUE;
    218. -
    219.    }else{
    220. -
    221.       return FALSE;
    222. -
    223.    };
    224. -
    225.  }
    226. -
    227.   
    228. -
    229.  
    230. -
    231.   /* ==================== Private Methods from here ==================== */
    232. -
    233.  
    234. -
    235.  
    236. -
    237. /**
    238. -
    239.  * Readies this object for serializing another model
    240. -
    241.  * @access private
    242. -
    243.  * @param void 
    244. -
    245.  * @returns void
    246. -
    247.  ***/
    248. -
    249.   function reset({
    250. -
    251.     $this->res="";
    252. -
    253.     $this->model=NULL;
    254. -
    255.   }
    256. -
    257.  
    258. -
    259. }
    260. -
    261.  
    262. -
    263.  
    264. -
    265. ?>
    266. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfParser.php.html.svn-base deleted file mode 100755 index 1e829f44..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfParser.php.html.svn-base +++ /dev/null @@ -1,2386 +0,0 @@ - - - - - - File Source for RdfParser.php - - - - - -

    Source for file RdfParser.php

    -

    Documentation is available at RdfParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdfParser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF paser.
    18. -
    19.  * This class reads RDF data from files or URIs and generates models out of it. All valid
    20. -
    21.  * RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)
    22. -
    23.  * - W3C Working Draft 10 October 2003
    24. -
    25.  * (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported.
    26. -
    27.  * The parser is based on the PHP version of repat
    28. -
    29.  * (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html)
    30. -
    31.  * by Luis Argerich (lrargerich@yahoo.com).
    32. -
    33.  * 
    34. -
    35.  * @version  $Id$
    36. -
    37.  * @author Luis Argerich <lrargerich@yahoo.com>,
    38. -
    39.  *          Chris Bizer <chris@bizer.de>,
    40. -
    41.  *          Radoslaw Oldakowski <radol@gmx.de>
    42. -
    43.  *            Daniel Westphal <mail@d-westphal.de>
    44. -
    45.  * @package syntax
    46. -
    47.  * @access    public
    48. -
    49.  *
    50. -
    51.  */   
    52. -
    53.   
    54. -
    55. class RdfParser extends Object {
    56. -
    57.  
    58. -
    59. -
    60. var $model;
    61. -
    62.  
    63. -
    64. /* Private Methods */
    65. -
    66.  
    67. -
    68.  
    69. -
    70. /**
    71. -
    72. * converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
    73. -
    74. -
    75. @param String $str 
    76. -
    77. @return String 
    78. -
    79. @access private
    80. -
    81. *
    82. -
    83. */
    84. -
    85. function str2unicode_nfc($str=""){
    86. -
    87.     $result="";
    88. -
    89.     /* try to detect encoding */
    90. -
    91.     $tmp=str_replace("?"""$str);
    92. -
    93.     if(strpos(utf8_decode($tmp)"?")===false){
    94. -
    95.         $str=utf8_decode($str);
    96. -
    97.     }
    98. -
    99.     for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
    100. -
    101.         $nr=0;/* unicode dec nr */
    102. -
    103.         /* char */
    104. -
    105.         $char=$str[$i];
    106. -
    107.         /* utf8 binary */
    108. -
    109.         $utf8_char=utf8_encode($char);
    110. -
    111.         $bytes=strlen($utf8_char);
    112. -
    113.         if($bytes==1){
    114. -
    115.             /* 0####### (0-127) */
    116. -
    117.             $nr=ord($utf8_char);
    118. -
    119.         }
    120. -
    121.         elseif($bytes==2){
    122. -
    123.             /* 110##### 10###### = 192+x 128+x */
    124. -
    125.             $nr=((ord($utf8_char[0])-192)*64(ord($utf8_char[1])-128);
    126. -
    127.         }
    128. -
    129.         elseif($bytes==3){
    130. -
    131.             /* 1110#### 10###### 10###### = 224+x 128+x 128+x */
    132. -
    133.             $nr=((ord($utf8_char[0])-224)*4096((ord($utf8_char[1])-128)*64(ord($utf8_char[2])-128);
    134. -
    135.         }
    136. -
    137.         elseif($bytes==4){
    138. -
    139.             /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
    140. -
    141.             $nr=((ord($utf8_char[0])-240)*262144((ord($utf8_char[1])-128)*4096((ord($utf8_char[2])-128)*64(ord($utf8_char[3])-128);
    142. -
    143.         }
    144. -
    145.         /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
    146. -
    147.         if($nr<9){/* #x0-#x8 (0-8) */
    148. -
    149.             $result.="\\u".sprintf("%04X",$nr);
    150. -
    151.         }
    152. -
    153.         elseif($nr==9){/* #x9 (9) */
    154. -
    155.             $result.='\t';
    156. -
    157.         }
    158. -
    159.         elseif($nr==10){/* #xA (10) */
    160. -
    161.             $result.='\n';
    162. -
    163.         }
    164. -
    165.         elseif($nr<13){/* #xB-#xC (11-12) */
    166. -
    167.             $result.="\\u".sprintf("%04X",$nr);
    168. -
    169.         }
    170. -
    171.         elseif($nr==13){/* #xD (13) */
    172. -
    173.             $result.='\t';
    174. -
    175.         }
    176. -
    177.         elseif($nr<32){/* #xE-#x1F (14-31) */
    178. -
    179.             $result.="\\u".sprintf("%04X",$nr);
    180. -
    181.         }
    182. -
    183.         elseif($nr<34){/* #x20-#x21 (32-33) */
    184. -
    185.             $result.=$char;
    186. -
    187.         }
    188. -
    189.         elseif($nr==34){/* #x22 (34) */
    190. -
    191.             $result.='\"';
    192. -
    193.         }
    194. -
    195.         elseif($nr<92){/* #x23-#x5B (35-91) */
    196. -
    197.             $result.=$char;
    198. -
    199.         }
    200. -
    201.         elseif($nr==92){/* #x5C (92) */
    202. -
    203.             $result.='\\';
    204. -
    205.         }
    206. -
    207.         elseif($nr<127){/* #x5D-#x7E (93-126) */
    208. -
    209.             $result.=$char;
    210. -
    211.         }
    212. -
    213.         elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
    214. -
    215.             $result.="\\u".sprintf("%04X",$nr);
    216. -
    217.         }
    218. -
    219.         elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
    220. -
    221.             $result.="\\U".sprintf("%08X",$nr);
    222. -
    223.         }
    224. -
    225.         else{
    226. -
    227.             /* other chars are not defined => ignore */
    228. -
    229.         }
    230. -
    231.     }
    232. -
    233.     return $result;
    234. -
    235. }
    236. -
    237.  
    238. -
    239.  
    240. -
    241.  
    242. -
    243.  
    244. -
    245. /**
    246. -
    247.  * @access    private
    248. -
    249.  */  
    250. -
    251. function _new_element()
    252. -
    253. {
    254. -
    255.     $e['parent']=Array();  // Parent is a blank Array
    256. -
    257.     $e['state']=0;
    258. -
    259.     $e['has_property_atributes']=0;
    260. -
    261.     $e['has_member_attributes']=0;
    262. -
    263.     $e['subject_type']=0;
    264. -
    265.     $e['subject']='';
    266. -
    267.     $e['predicate']='';
    268. -
    269.     $e['ordinal']=0;
    270. -
    271.     $e['members']=0;
    272. -
    273.     $e['data']='';
    274. -
    275.     $e['xml_lang']='';
    276. -
    277.     $e['bag_id']='';
    278. -
    279.     $e['statements']=0;
    280. -
    281.     $e['statement_id']='';
    282. -
    283.     $e['datatype']='';
    284. -
    285.     $e['element_base_uri''';
    286. -
    287.    
    288. -
    289.     return $e;
    290. -
    291. }
    292. -
    293.  
    294. -
    295. /**
    296. -
    297.  
    298. -
    299.  * @param string $source 
    300. -
    301.  * @param string &$destination 
    302. -
    303.  *
    304. -
    305.  * @access    private
    306. -
    307.  */  
    308. -
    309. function _copy_element($source&$destination )
    310. -
    311. {
    312. -
    313.     if$source )
    314. -
    315.     {
    316. -
    317.         $destination['parent'$source;
    318. -
    319.         $destination['state'$source['state'];
    320. -
    321.         $destination['xml_lang'$source['xml_lang'];
    322. -
    323.         $destination['element_base_uri'$source['element_base_uri'];       
    324. -
    325.     }
    326. -
    327. }
    328. -
    329.  
    330. -
    331.   /**
    332. -
    333.    * @param string &$e 
    334. -
    335.    * @access    private
    336. -
    337.    */  
    338. -
    339. function _clear_element(&$e)
    340. -
    341. {
    342. -
    343.         $e['subject']='';
    344. -
    345.         $e['predicate']='';
    346. -
    347.         $e['data']='';
    348. -
    349.         $e['bag_id']='';
    350. -
    351.         $e['statement_id']='';
    352. -
    353.  
    354. -
    355.         if(isset($e['parent'])) {
    356. -
    357.           if$e['parent')
    358. -
    359.           {
    360. -
    361.               if$e['parent']['xml_lang'!= $e['xml_lang')
    362. -
    363.               {
    364. -
    365.                   $e['xml_lang']='';
    366. -
    367.               }
    368. -
    369.           }
    370. -
    371.           else
    372. -
    373.           {
    374. -
    375.               $e['xml_lang']='';
    376. -
    377.           }
    378. -
    379.         else {
    380. -
    381.             $e['xml_lang']='';
    382. -
    383.         }
    384. -
    385.  
    386. -
    387.         $e['parent']=Array();
    388. -
    389.         $e['state']=0;
    390. -
    391.         $e['has_property_attributes']=0;
    392. -
    393.         $e['has_member_attributes']=0;
    394. -
    395.         $e['subject_type']=0;
    396. -
    397.         $e['subject']='';
    398. -
    399.         $e['predicate']='';
    400. -
    401.         $e['ordinal']=0;
    402. -
    403.         $e['members']=0;
    404. -
    405.         $e['data']='';
    406. -
    407.         $e['xml_lang']='';
    408. -
    409.         $e['bag_id']='';
    410. -
    411.         $e['statements']=0;
    412. -
    413.         $e['statement_id']='';
    414. -
    415.         $e['datatype']='';
    416. -
    417.         $e['element_base_uri''';
    418. -
    419. }
    420. -
    421.  
    422. -
    423.   /**
    424. -
    425.    * @access    private
    426. -
    427.    */  
    428. -
    429. function _push_element()
    430. -
    431. {
    432. -
    433.     if(!isset($this->rdf_parser['free'])) {
    434. -
    435.         $this->rdf_parser['free']=Array();
    436. -
    437.     }
    438. -
    439.     if(count($this->rdf_parser['free'])>0)
    440. -
    441.     {
    442. -
    443.         $e $this->rdf_parser['free'];
    444. -
    445.         if(isset($e['parent'])) {
    446. -
    447.           $this->rdf_parser['free'$e['parent'];
    448. -
    449.         else {
    450. -
    451.           $this->rdf_parser['free']=$this->_new_element();
    452. -
    453.         }
    454. -
    455.     }
    456. -
    457.     else
    458. -
    459.     {
    460. -
    461.         $e $this->_new_element();
    462. -
    463.     }
    464. -
    465.     if(!isset($this->rdf_parser['top'])) {
    466. -
    467.       $this->rdf_parser['top']=Array();
    468. -
    469.     }
    470. -
    471.     $this->_copy_element$this->rdf_parser['top']$e );
    472. -
    473.     $this->rdf_parser['top'$e;
    474. -
    475. }
    476. -
    477.  
    478. -
    479.   /**
    480. -
    481.    * @access    private
    482. -
    483.    */  
    484. -
    485. function _pop_element()
    486. -
    487. {
    488. -
    489.     $e $this->rdf_parser['top'];
    490. -
    491.     $this->rdf_parser['top'$e['parent'];
    492. -
    493.     $this->_clear_element$e );
    494. -
    495.     $this->rdf_parser['free'$e;
    496. -
    497. }
    498. -
    499.  
    500. -
    501.   /**
    502. -
    503.    * @param string $local_name 
    504. -
    505.    * @access    private
    506. -
    507.    */  
    508. -
    509. function _is_rdf_property_attribute_resource($local_name )
    510. -
    511. {
    512. -
    513.     return $local_name == RDF_TYPE );    
    514. -
    515. }
    516. -
    517.  
    518. -
    519.   /**
    520. -
    521.    * @param string $local_name 
    522. -
    523.    * @access    private
    524. -
    525.    */  
    526. -
    527. function _is_rdf_property_attribute_literal($local_name )
    528. -
    529. {
    530. -
    531.     return $local_name == RDF_VALUE )           
    532. -
    533.         || $local_name == RDF_BAG )
    534. -
    535.         || $local_name == RDF_SEQ )
    536. -
    537.         || $local_name == RDF_ALT )
    538. -
    539.         || $local_name == RDF_STATEMENT )
    540. -
    541.         || $local_name == RDF_PROPERTY )
    542. -
    543.         || $local_name == RDF_LIST );      
    544. -
    545. }
    546. -
    547.  
    548. -
    549.   /**
    550. -
    551.    * @param string $local_name 
    552. -
    553.    * @access    private
    554. -
    555.    */  
    556. -
    557. function _is_rdf_ordinal$local_name )
    558. -
    559. {
    560. -
    561.     $ordinal = -1;
    562. -
    563.  
    564. -
    565.     if$local_name{0==  '_'  )
    566. -
    567.     {
    568. -
    569.         $ordinal =  substr($local_name,1;
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     return $ordinal $ordinal 0;
    576. -
    577. }
    578. -
    579.  
    580. -
    581.   /**
    582. -
    583.    * @param string $local_name 
    584. -
    585.    * @access    private
    586. -
    587.    */  
    588. -
    589. function _is_rdf_property_attribute$local_name )
    590. -
    591. {
    592. -
    593.     return $this->_is_rdf_property_attribute_resource$local_name )
    594. -
    595.         || $this->_is_rdf_property_attribute_literal$local_name );
    596. -
    597. }
    598. -
    599.  
    600. -
    601. -
    602. {
    603. -
    604.     return $local_name == RDF_RDF )
    605. -
    606.         || $local_name == RDF_DESCRIPTION)
    607. -
    608.         || $local_name == RDF_ID)                 
    609. -
    610.         || $local_name == RDF_ABOUT )
    611. -
    612.         || $local_name == RDF_BAG_ID )
    613. -
    614.         || $local_name == RDF_PARSE_TYPE )
    615. -
    616.         || $local_name == RDF_RESOURCE )        
    617. -
    618.         || $local_name == RDF_NODEID )
    619. -
    620.         || $local_name == RDF_LI )
    621. -
    622.         || $local_name == RDF_ABOUT_EACH )
    623. -
    624.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    625. -
    626.         || $local_name == RDF_DATATYPE );
    627. -
    628. }
    629. -
    630.  
    631. -
    632.   /**
    633. -
    634.    * @param string $local_name 
    635. -
    636.    * @access    private
    637. -
    638.    */  
    639. -
    640. function _is_rdf_property_element$local_name )
    641. -
    642. {
    643. -
    644.     return (  $local_name == RDF_TYPE )
    645. -
    646.         || (  $local_name == RDF_SUBJECT )
    647. -
    648.         || (  $local_name == RDF_PREDICATE )
    649. -
    650.         || (  $local_name == RDF_OBJECT )
    651. -
    652.         || (  $local_name == RDF_VALUE )
    653. -
    654.         || (  $local_name == RDF_LI )
    655. -
    656.         || (  $local_name == RDF_SEEALSO )             
    657. -
    658.         || $local_name == RDF_BAG )
    659. -
    660.         || $local_name == RDF_SEQ )
    661. -
    662.         || $local_name == RDF_ALT )
    663. -
    664.         || $local_name == RDF_STATEMENT )
    665. -
    666.         || $local_name == RDF_PROPERTY )
    667. -
    668.         || $local_name == RDF_LIST )
    669. -
    670.         || $local_name == RDF_FIRST )        
    671. -
    672.         || $local_name == RDF_REST )
    673. -
    674.         || (  $local_name{0== '_'  );
    675. -
    676. }
    677. -
    678.  
    679. -
    680.   /**
    681. -
    682.    * @param string $local_name 
    683. -
    684.    * @access    private
    685. -
    686.    */  
    687. -
    688. function _is_forbidden_rdf_property_element ($local_name)
    689. -
    690. {
    691. -
    692.     return $local_name == RDF_RDF )
    693. -
    694.         || $local_name == RDF_DESCRIPTION)
    695. -
    696.         || $local_name == RDF_ID)                 
    697. -
    698.         || $local_name == RDF_ABOUT )
    699. -
    700.         || $local_name == RDF_BAG_ID )
    701. -
    702.         || $local_name == RDF_PARSE_TYPE )
    703. -
    704.         || $local_name == RDF_RESOURCE )        
    705. -
    706.         || $local_name == RDF_NODEID )
    707. -
    708.         || $local_name == RDF_ABOUT_EACH )
    709. -
    710.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    711. -
    712.         || $local_name == RDF_DATATYPE );
    713. -
    714. }
    715. -
    716.                 
    717. -
    718.  
    719. -
    720.   /**
    721. -
    722.    * @param string $local_name 
    723. -
    724.    * @access    private
    725. -
    726.    */  
    727. -
    728. function _is_rdf_node_element$local_name )
    729. -
    730. {
    731. -
    732.     return $local_name == RDF_DESCRIPTION )                 
    733. -
    734.         || $local_name == RDF_STATEMENT )
    735. -
    736.         || $local_name == RDF_SUBJECT )
    737. -
    738.         || $local_name == RDF_PREDICATE )
    739. -
    740.         || $local_name == RDF_OBJECT )        
    741. -
    742.         || $local_name == RDF_PROPERTY )
    743. -
    744.         || $local_name == RDF_TYPE )
    745. -
    746.         || $local_name == RDF_VALUE )
    747. -
    748.         || $local_name == RDF_BAG )
    749. -
    750.         || $local_name == RDF_SEQ )
    751. -
    752.         || $local_name == RDF_ALT )        
    753. -
    754.         || $local_name == RDF_SEEALSO )        
    755. -
    756.         || $local_name == RDF_LIST )
    757. -
    758.         || $local_name == RDF_FIRST )        
    759. -
    760.         || $local_name == RDF_REST )        
    761. -
    762.         || $local_name == RDF_NIL )                
    763. -
    764.         || $local_name{0== '_'  );
    765. -
    766. }
    767. -
    768.  
    769. -
    770.   /**
    771. -
    772.    * @param string $local_name 
    773. -
    774.    * @access    private
    775. -
    776.    */  
    777. -
    778. function _is_forbidden_rdf_node_element ($local_name)
    779. -
    780. {
    781. -
    782.     return $local_name == RDF_RDF )
    783. -
    784.         || $local_name == RDF_ID)                 
    785. -
    786.         || $local_name == RDF_ABOUT )
    787. -
    788.         || $local_name == RDF_BAG_ID )
    789. -
    790.         || $local_name == RDF_PARSE_TYPE )
    791. -
    792.         || $local_name == RDF_RESOURCE )        
    793. -
    794.         || $local_name == RDF_NODEID )
    795. -
    796.         || $local_name == RDF_LI )
    797. -
    798.         || $local_name == RDF_ABOUT_EACH )
    799. -
    800.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    801. -
    802.         || $local_name == RDF_DATATYPE );
    803. -
    804. }
    805. -
    806.  
    807. -
    808.   /**
    809. -
    810.    * @param string $val 
    811. -
    812.    * @access    private
    813. -
    814.    */  
    815. -
    816. function _istalnum($val{
    817. -
    818.   return ereg("[A-Za-z0-9]",$val);
    819. -
    820. }
    821. -
    822.   /**
    823. -
    824.    * @param string $val 
    825. -
    826.    * @access    private
    827. -
    828.    */  
    829. -
    830. function _istalpha($val{
    831. -
    832.   return ereg("[A-Za-z]",$val);
    833. -
    834. }
    835. -
    836.  
    837. -
    838.   /**
    839. -
    840.    * @param string $uri 
    841. -
    842.    * @access    private
    843. -
    844.    */  
    845. -
    846. function _is_absolute_uri($uri )
    847. -
    848. {
    849. -
    850.     $result false;
    851. -
    852.         $uri_p=0;
    853. -
    854.     if$uri && $this->_istalpha$uri{$uri_p) )
    855. -
    856.     {
    857. -
    858.         ++$uri_p;
    859. -
    860.  
    861. -
    862.         while( ($uri_p<strlen($uri))
    863. -
    864.             && $this->_istalnum$uri{$uri_p)
    865. -
    866.                 || $uri{$uri_p==  '+'  )
    867. -
    868.                 || $uri{$uri_p== '-'  )
    869. -
    870.                 || $uri{$uri_p==  '.'  ) ) )
    871. -
    872.         {
    873. -
    874.                 ++$uri_p;
    875. -
    876.         }
    877. -
    878.  
    879. -
    880.         $result $uri{$uri_p== ':'  );
    881. -
    882.     }
    883. -
    884.     return $result;
    885. -
    886. }
    887. -
    888.  
    889. -
    890.  
    891. -
    892. /*
    893. -
    894.    * This function returns an associative array returning any of the various components of the URL that are present. This includes the
    895. -
    896.    * $arr=parse_url($url)
    897. -
    898.    * scheme - e.g. http
    899. -
    900.    * host
    901. -
    902.    * port
    903. -
    904.    * user
    905. -
    906.    * pass
    907. -
    908.    * path
    909. -
    910.    * query - after the question mark ?
    911. -
    912.    * fragment - after the hashmark #
    913. -
    914.    *
    915. -
    916.    * @param string $uri
    917. -
    918.    * @param string $buffer
    919. -
    920.    * @param string &$scheme
    921. -
    922.    * @param string &$authority
    923. -
    924.    * @param string &$path
    925. -
    926.    * @param string &$query
    927. -
    928.    * @param string &$fragment
    929. -
    930.    * @access    private 
    931. -
    932. */  
    933. -
    934. function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment {
    935. -
    936.     
    937. -
    938.   $parsed=parse_url($uri);
    939. -
    940.   if(isset($parsed['scheme'])) {
    941. -
    942.     $scheme=$parsed['scheme'];
    943. -
    944.   else {
    945. -
    946.     $scheme='';
    947. -
    948.   }
    949. -
    950.   if(isset($parsed['host'])) {
    951. -
    952.     $host=$parsed['host'];
    953. -
    954.   else {
    955. -
    956.     $host='';
    957. -
    958.   }
    959. -
    960.   if(isset($parsed['host'])) {
    961. -
    962.     $authority=$parsed['host'];
    963. -
    964.   else {
    965. -
    966.     $authority='';
    967. -
    968.   }
    969. -
    970.   if(isset($parsed['path'])) {
    971. -
    972.     $path=$parsed['path'];
    973. -
    974.   else {
    975. -
    976.     $path='';
    977. -
    978.   }
    979. -
    980.   if(isset($parsed['query'])) {
    981. -
    982.     $query=$parsed['query'];
    983. -
    984.   else {
    985. -
    986.     $query='';
    987. -
    988.   }
    989. -
    990.   if(isset($parsed['fragment'])) {
    991. -
    992.     $fragment=$parsed['fragment'];
    993. -
    994.   else {
    995. -
    996.     $fragment='';
    997. -
    998.   }
    999. -
    1000.  
    1001. -
    1002. }
    1003. -
    1004.  
    1005. -
    1006. /**
    1007. -
    1008.    * @param string $base_uri 
    1009. -
    1010.    * @param string $reference_uri 
    1011. -
    1012.    * @param string &$buffer 
    1013. -
    1014.    * @access    private
    1015. -
    1016. */ 
    1017. -
    1018. function _resolve_uri_reference($base_uri,$reference_uri,&$buffer )
    1019. -
    1020. {
    1021. -
    1022.     if ($reference_uri == '')
    1023. -
    1024.         return ($buffer preg_replace("/\#[^\/\\\]*$/"''$base_uri));
    1025. -
    1026.             
    1027. -
    1028.     $base_buffer='';
    1029. -
    1030.     $reference_buffer='';
    1031. -
    1032.     $path_buffer='';
    1033. -
    1034.  
    1035. -
    1036.     $buffer '';
    1037. -
    1038.  
    1039. -
    1040.     $this->_parse_uri($reference_uri,
    1041. -
    1042.                       $reference_buffer,
    1043. -
    1044.                       $reference_scheme,
    1045. -
    1046.                       $reference_authority,
    1047. -
    1048.                       $reference_path,
    1049. -
    1050.                       $reference_query,
    1051. -
    1052.                       $reference_fragment );
    1053. -
    1054.                
    1055. -
    1056.     $this->_parse_uri($base_uri,
    1057. -
    1058.                       $base_buffer,
    1059. -
    1060.                       $base_scheme,
    1061. -
    1062.                       $base_authority,
    1063. -
    1064.                       $base_path,
    1065. -
    1066.                       $base_query,
    1067. -
    1068.                       $base_fragment );     
    1069. -
    1070.         
    1071. -
    1072.     if$reference_scheme == ''
    1073. -
    1074.         && $reference_authority == ''
    1075. -
    1076.         && $reference_path == ''
    1077. -
    1078.         && $reference_query == '' )
    1079. -
    1080.     {
    1081. -
    1082.         $buffer=$base_uri;
    1083. -
    1084.  
    1085. -
    1086.         if$reference_fragment != '' )        
    1087. -
    1088.         {
    1089. -
    1090.             if ($base_path == '' || $base_path == '/' || $base_path == "\\"{
    1091. -
    1092.                $buffer $this->rdf_parser['document_base_uri'];    
    1093. -
    1094.             }
    1095. -
    1096.             else 
    1097. -
    1098.             {
    1099. -
    1100.                 $buffer preg_replace("/\#[^\/\\\]*$/"''$base_uri);
    1101. -
    1102.             }
    1103. -
    1104.            
    1105. -
    1106.             // CB: Changed for base URI
    1107. -
    1108.             $c substr($bufferstrlen($buffer)-,1);
    1109. -
    1110.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    1111. -
    1112.                    $buffer.= '#' ;
    1113. -
    1114.             $buffer.=$reference_fragment;               
    1115. -
    1116.             
    1117. -
    1118.         }
    1119. -
    1120.     }
    1121. -
    1122.     else if$reference_scheme != '' )
    1123. -
    1124.     {
    1125. -
    1126.         $buffer=$reference_uri;
    1127. -
    1128.     }
    1129. -
    1130.     else
    1131. -
    1132.     {                    
    1133. -
    1134.         $result_scheme $base_scheme;
    1135. -
    1136.         $result_path '';
    1137. -
    1138.         
    1139. -
    1140.         if$reference_authority != '' )
    1141. -
    1142.         {
    1143. -
    1144.             $result_authority $reference_authority;            
    1145. -
    1146.         }
    1147. -
    1148.         else
    1149. -
    1150.         {
    1151. -
    1152.             $result_authority $base_authority;
    1153. -
    1154.            
    1155. -
    1156.             if ($reference_path != '')
    1157. -
    1158.             {
    1159. -
    1160.                 if ($reference_path{0== '/' || $reference_path{0== "\\")
    1161. -
    1162.                 {
    1163. -
    1164.                     if ($reference_path{1== '/' || $reference_path{1== "\\")
    1165. -
    1166.                     {
    1167. -
    1168.                         $result_authority '';
    1169. -
    1170.                         $result_path $reference_path;    
    1171. -
    1172.                     }
    1173. -
    1174.                     else
    1175. -
    1176.                         $result_path $reference_path;
    1177. -
    1178.                 }
    1179. -
    1180.                 elseif (substr($reference_path03== '../' ||
    1181. -
    1182.                         substr($reference_path03== '..\\')
    1183. -
    1184.                 {
    1185. -
    1186.                     $slash $reference_path{2};                        
    1187. -
    1188.                     while($base_path != '' && substr($reference_path03== '../' 
    1189. -
    1190.                                              || substr($reference_path03== '..\\'))
    1191. -
    1192.                     {                        
    1193. -
    1194.                           $base_path preg_replace("/((\/)|(\\\))[^\/\\\]*$/"''$base_path);                                                    
    1195. -
    1196.                           if ($base_path != ''{
    1197. -
    1198.                              $base_path preg_replace("/((\/)|(\\\))[^\/\\\]*$/"''$base_path);                                                       
    1199. -
    1200.                              $reference_path substr($reference_path3);
    1201. -
    1202.                           }
    1203. -
    1204.                     }
    1205. -
    1206.                            
    1207. -
    1208.                     $result_path $base_path .$slash .$reference_path;
    1209. -
    1210.                 }
    1211. -
    1212.                 else 
    1213. -
    1214.                 {   
    1215. -
    1216.                     if ($base_path)
    1217. -
    1218.                         $result_path preg_replace("/[^\/\\\]*$/"$reference_path$base_path1);
    1219. -
    1220.                     else 
    1221. -
    1222.                         $result_path '/' .$reference_path;                        
    1223. -
    1224.                 
    1225. -
    1226.             }
    1227. -
    1228.             
    1229. -
    1230.         }
    1231. -
    1232.                                                 
    1233. -
    1234.         if$result_scheme != '' )
    1235. -
    1236.         {
    1237. -
    1238.             $buffer=$result_scheme;
    1239. -
    1240.             $buffer.=':';
    1241. -
    1242.         }
    1243. -
    1244.  
    1245. -
    1246.         if$result_authority != '' )
    1247. -
    1248.         {
    1249. -
    1250.             $buffer.="//";
    1251. -
    1252.             $buffer.=$result_authority;
    1253. -
    1254.         }
    1255. -
    1256.  
    1257. -
    1258.         if$result_path != '' )
    1259. -
    1260.         {
    1261. -
    1262.             $buffer.=$result_path;
    1263. -
    1264.         }
    1265. -
    1266.  
    1267. -
    1268.         if$reference_query != '' )
    1269. -
    1270.         {
    1271. -
    1272.             $buffer.='?';
    1273. -
    1274.             $buffer.=$reference_query;
    1275. -
    1276.         }
    1277. -
    1278.  
    1279. -
    1280.         if$reference_fragment != '' )
    1281. -
    1282.         {
    1283. -
    1284.             $buffer.='#';
    1285. -
    1286.             $buffer.=$reference_fragment;
    1287. -
    1288.         }
    1289. -
    1290.     }  
    1291. -
    1292. }
    1293. -
    1294.  
    1295. -
    1296.  
    1297. -
    1298. /**
    1299. -
    1300.    * IDs which contain CombiningChars or Extenders
    1301. -
    1302.    * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid.
    1303. -
    1304.    * If you want to use IDs containing these characters you can turn off
    1305. -
    1306.    * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php).
    1307. -
    1308.    *
    1309. -
    1310.    * @param string $id 
    1311. -
    1312.    * @access    private
    1313. -
    1314. */ 
    1315. -
    1316. function is_valid_id($id )
    1317. -
    1318. {
    1319. -
    1320.     if (!VALIDATE_IDS)
    1321. -
    1322.         return TRUE;
    1323. -
    1324.     
    1325. -
    1326.     $result FALSE;
    1327. -
    1328.     
    1329. -
    1330.     if$id )
    1331. -
    1332.     {
    1333. -
    1334.         if$this->_istalpha($id{0}|| $id{0== '_')
    1335. -
    1336.         {
    1337. -
    1338.             $result TRUE;
    1339. -
    1340.             $i=0;
    1341. -
    1342.             $len strlen($id);
    1343. -
    1344.             while$result != FALSE && ++$i $len )
    1345. -
    1346.             {
    1347. -
    1348.                 if!($this->_istalnum$id{$i})
    1349. -
    1350.                       || $id{$i== '.'
    1351. -
    1352.                       || $id{$i== '-'
    1353. -
    1354.                       || $id{$i== '_'))
    1355. -
    1356.                 {
    1357. -
    1358.                    $result FALSE
    1359. -
    1360.                 }
    1361. -
    1362.             }
    1363. -
    1364.         }
    1365. -
    1366.     }
    1367. -
    1368.     
    1369. -
    1370.     if (!$result)
    1371. -
    1372.         $this->_report_error('illegal ID, nodeID or bagID attribute value');
    1373. -
    1374.     else    
    1375. -
    1376.         return TRUE;
    1377. -
    1378. }
    1379. -
    1380.  
    1381. -
    1382. /**
    1383. -
    1384.    * @param string $id 
    1385. -
    1386.    * @param string &$buffer 
    1387. -
    1388.    * @access    private
    1389. -
    1390. */ 
    1391. -
    1392. function _resolve_id($id,&$buffer )
    1393. -
    1394. {
    1395. -
    1396.     $id_buffer='';
    1397. -
    1398.  
    1399. -
    1400.     if$this->is_valid_id($id) )
    1401. -
    1402.     {
    1403. -
    1404.         $id_buffer="#$id";
    1405. -
    1406.     }
    1407. -
    1408.  
    1409. -
    1410.     $this->_resolve_uri_reference$this->rdf_get_base()$id_buffer$buffer );
    1411. -
    1412.        
    1413. -
    1414. }
    1415. -
    1416.  
    1417. -
    1418. /**
    1419. -
    1420.    * @param string $name 
    1421. -
    1422.    * @param string &$buffer 
    1423. -
    1424.    * @param string &$namespace_uri 
    1425. -
    1426.    * @param string &$local_name 
    1427. -
    1428.    * @access    private
    1429. -
    1430. */ 
    1431. -
    1432. function _split_name($name&$buffer&$namespace_uri&$local_name )
    1433. -
    1434. {
    1435. -
    1436.     static $nul 0;
    1437. -
    1438.     $buffer=$name;
    1439. -
    1440.  
    1441. -
    1442.         if(  strstr$bufferNAMESPACE_SEPARATOR_CHAR ) )
    1443. -
    1444.         {
    1445. -
    1446.             $cosas=explode(NAMESPACE_SEPARATOR_CHAR,$buffer);
    1447. -
    1448.             $namespace_uri $cosas[0];
    1449. -
    1450.             $local_name $cosas[1];
    1451. -
    1452.         }
    1453. -
    1454.         else
    1455. -
    1456.         {
    1457. -
    1458.             if( ( $buffer==  'x'  )
    1459. -
    1460.                 && $buffer==  'm'  )
    1461. -
    1462.                 && $buffer==  'l'  )
    1463. -
    1464.                 && $buffer==  ':'  ) )
    1465. -
    1466.             {
    1467. -
    1468.                 $namespace_uri XML_NAMESPACE_URI;
    1469. -
    1470.                 $local_name substr($buffer,4);
    1471. -
    1472.             }
    1473. -
    1474.             else
    1475. -
    1476.             {
    1477. -
    1478.                 $namespace_uri '';
    1479. -
    1480.                 $local_name $buffer;
    1481. -
    1482.             }
    1483. -
    1484.         }
    1485. -
    1486. }
    1487. -
    1488. /**
    1489. -
    1490.    * @param string &$buf 
    1491. -
    1492.    * @access    private
    1493. -
    1494. */ 
    1495. -
    1496. function _generate_anonymous_uri(&$buf )
    1497. -
    1498. {
    1499. -
    1500.     $id='';
    1501. -
    1502.     if(!isset($this->rdf_parser['anonymous_id'])) {
    1503. -
    1504.       $this->rdf_parser['anonymous_id']=0;
    1505. -
    1506.     }
    1507. -
    1508.     $this->rdf_parser['anonymous_id']++;
    1509. -
    1510.  
    1511. -
    1512.     $bufBNODE_PREFIX $this->rdf_parser['anonymous_id'];
    1513. -
    1514.  
    1515. -
    1516. }
    1517. -
    1518. /**
    1519. -
    1520.    * @param string $subject_type 
    1521. -
    1522.    * @param string $subject 
    1523. -
    1524.    * @param string $predicate 
    1525. -
    1526.    * @param string $ordinal 
    1527. -
    1528.    * @param string $object_type 
    1529. -
    1530.    * @param string $object 
    1531. -
    1532.    * @param string $xml_lang 
    1533. -
    1534.    * @param string $bag_id 
    1535. -
    1536.    * @param string $statements 
    1537. -
    1538.    * @param string $statement_id 
    1539. -
    1540.    * @access    private
    1541. -
    1542. */ 
    1543. -
    1544. function _report_statement$subject_type$subject$predicate$ordinal$object_type,  $object$xml_lang$bag_id$statements$statement_id$datatype )
    1545. -
    1546. {
    1547. -
    1548.     $statement_id_type RDF_SUBJECT_TYPE_URI;
    1549. -
    1550.     $statement_id_buffer='';
    1551. -
    1552.     $predicate_buffer='';
    1553. -
    1554.     if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang']))
    1555. -
    1556.         $xml_lang $this->rdf_parser['document_xml_lang'];
    1557. -
    1558.     
    1559. -
    1560.      // call add statement
    1561. -
    1562.      $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang$datatype );
    1563. -
    1564.  
    1565. -
    1566.         if$bag_id )
    1567. -
    1568.         {
    1569. -
    1570.             if$statements == '' )
    1571. -
    1572.             {
    1573. -
    1574.                 $this->_report_statement(RDF_SUBJECT_TYPE_URI,
    1575. -
    1576.                     $bag_id,
    1577. -
    1578.                     RDF_NAMESPACE_URI.RDF_TYPE,
    1579. -
    1580.                     0,
    1581. -
    1582.                     RDF_OBJECT_TYPE_RESOURCE,
    1583. -
    1584.                     RDF_NAMESPACE_URI.RDF_BAG,
    1585. -
    1586.                     '',
    1587. -
    1588.                     '',
    1589. -
    1590.                     '',
    1591. -
    1592.                     '',
    1593. -
    1594.                     $datatype );
    1595. -
    1596.             }
    1597. -
    1598.  
    1599. -
    1600.             if$statement_id )
    1601. -
    1602.             {
    1603. -
    1604.                 $statement_id_type RDF_SUBJECT_TYPE_BNODE;
    1605. -
    1606.                 $this->_generate_anonymous_uri$statement_id_buffer );
    1607. -
    1608.                 $statement_id $statement_id_buffer;
    1609. -
    1610.             }
    1611. -
    1612.             $statements++;
    1613. -
    1614.             $predicate_buffer='RDF_NAMESPACE_URI_'.$statements;
    1615. -
    1616.  
    1617. -
    1618.             $this->_report_statement(
    1619. -
    1620.                 RDF_SUBJECT_TYPE_URI,
    1621. -
    1622.                 $bag_id,
    1623. -
    1624.                 $predicate_buffer,
    1625. -
    1626.                 $statements,
    1627. -
    1628.                 RDF_OBJECT_TYPE_BNODE,
    1629. -
    1630.                 $statement_id,
    1631. -
    1632.                 '',
    1633. -
    1634.                 '',
    1635. -
    1636.                 '',
    1637. -
    1638.                 '',
    1639. -
    1640.                 $datatype );
    1641. -
    1642.         }
    1643. -
    1644.  
    1645. -
    1646.         if$statement_id )
    1647. -
    1648.         {
    1649. -
    1650.             // rdf:type = rdf:Statement
    1651. -
    1652.             $this->_report_statement(
    1653. -
    1654.                 $statement_id_type,
    1655. -
    1656.                 $statement_id,
    1657. -
    1658.                 RDF_NAMESPACE_URI.RDF_TYPE,
    1659. -
    1660.                 0,
    1661. -
    1662.                 RDF_OBJECT_TYPE_RESOURCE,
    1663. -
    1664.                 RDF_NAMESPACE_URI.RDF_STATEMENT,
    1665. -
    1666.                 '',
    1667. -
    1668.                 '',
    1669. -
    1670.                 '',
    1671. -
    1672.                 '',
    1673. -
    1674.                 $datatype );
    1675. -
    1676.         
    1677. -
    1678.             if ($subject_type == RDF_SUBJECT_TYPE_BNODE)
    1679. -
    1680.                $obj_type RDF_OBJECT_TYPE_BNODE;
    1681. -
    1682.             else 
    1683. -
    1684.                $obj_type RDF_OBJECT_TYPE_RESOURCE;                              
    1685. -
    1686.                 
    1687. -
    1688.                 
    1689. -
    1690.             // rdf:subject
    1691. -
    1692.             $this->_report_statement(
    1693. -
    1694.                 $statement_id_type,
    1695. -
    1696.                 $statement_id,
    1697. -
    1698.                 RDF_NAMESPACE_URI.RDF_SUBJECT,
    1699. -
    1700.                 0,               
    1701. -
    1702.                 $obj_type,                              
    1703. -
    1704.                 $subject,
    1705. -
    1706.                 '',
    1707. -
    1708.                 '',
    1709. -
    1710.                 '',
    1711. -
    1712.                 '',
    1713. -
    1714.                 $datatype );
    1715. -
    1716.  
    1717. -
    1718.             // rdf:predicate
    1719. -
    1720.             $this->_report_statement(
    1721. -
    1722.                 $statement_id_type,
    1723. -
    1724.                 $statement_id,
    1725. -
    1726.                 RDF_NAMESPACE_URI.RDF_PREDICATE,
    1727. -
    1728.                 0,
    1729. -
    1730.                 RDF_OBJECT_TYPE_RESOURCE,
    1731. -
    1732.                 $predicate,
    1733. -
    1734.                 '',
    1735. -
    1736.                 '',
    1737. -
    1738.                 '',
    1739. -
    1740.                 '',
    1741. -
    1742.                 $datatype );
    1743. -
    1744.  
    1745. -
    1746.             // rdf:object
    1747. -
    1748.             $this->_report_statement(
    1749. -
    1750.                 $statement_id_type,
    1751. -
    1752.                 $statement_id,
    1753. -
    1754.                 RDF_NAMESPACE_URI.RDF_OBJECT,
    1755. -
    1756.                 0,
    1757. -
    1758.                 $object_type,
    1759. -
    1760.                 $object,
    1761. -
    1762.                 '',
    1763. -
    1764.                 '',
    1765. -
    1766.                 '',
    1767. -
    1768.                 '',
    1769. -
    1770.                 $datatype );
    1771. -
    1772.         }
    1773. -
    1774. }
    1775. -
    1776. /**
    1777. -
    1778.    * @param string $subject_type 
    1779. -
    1780.    * @param string $subject 
    1781. -
    1782.    * @param string $attributes 
    1783. -
    1784.    * @param string $xml_lang 
    1785. -
    1786.    * @param string $bag_id 
    1787. -
    1788.    * @param string $statements 
    1789. -
    1790.  * @access    private
    1791. -
    1792. */ 
    1793. -
    1794. function _handle_property_attributes($subject_type$subject$attributes$xml_lang$bag_id$statements )
    1795. -
    1796. {
    1797. -
    1798.     $i=0;
    1799. -
    1800.  
    1801. -
    1802.     $attribute='';
    1803. -
    1804.     $predicate='';
    1805. -
    1806.  
    1807. -
    1808.     $attribute_namespace_uri='';
    1809. -
    1810.     $attribute_local_name='';
    1811. -
    1812.     $attribute_value='';
    1813. -
    1814.  
    1815. -
    1816.     $ordinal=0;
    1817. -
    1818.  
    1819. -
    1820.     for$i 0isset($attributes$i ])$i += )
    1821. -
    1822.     {
    1823. -
    1824.         $this->_split_name(
    1825. -
    1826.             $attributes$i ],
    1827. -
    1828.             $attribute,
    1829. -
    1830.             $attribute_namespace_uri,
    1831. -
    1832.             $attribute_local_name );
    1833. -
    1834.  
    1835. -
    1836.         $attribute_value $attributes$i ];
    1837. -
    1838.  
    1839. -
    1840.         $predicate=$attribute_namespace_uri;
    1841. -
    1842.         $predicate.=$attribute_local_name;
    1843. -
    1844.  
    1845. -
    1846.         ifRDF_NAMESPACE_URI == $attribute_namespace_uri )
    1847. -
    1848.         {
    1849. -
    1850.             if$this->_is_rdf_property_attribute_literal$attribute_local_name ) )
    1851. -
    1852.             {
    1853. -
    1854.                 $this->_report_statement(
    1855. -
    1856.                     $subject_type,
    1857. -
    1858.                     $subject,
    1859. -
    1860.                     $predicate,
    1861. -
    1862.                     0,
    1863. -
    1864.                     RDF_OBJECT_TYPE_LITERAL,
    1865. -
    1866.                     $attribute_value,
    1867. -
    1868.                     $xml_lang,
    1869. -
    1870.                     $bag_id,
    1871. -
    1872.                     $statements,
    1873. -
    1874.                     '',
    1875. -
    1876.                     '');
    1877. -
    1878.             }
    1879. -
    1880.             else if$this->_is_rdf_property_attribute_resource$attribute_local_name ) )
    1881. -
    1882.             {
    1883. -
    1884.                 $this->_report_statement(
    1885. -
    1886.                     $subject_type,
    1887. -
    1888.                     $subject,
    1889. -
    1890.                     $predicate,
    1891. -
    1892.                     0,
    1893. -
    1894.                     RDF_OBJECT_TYPE_RESOURCE,
    1895. -
    1896.                     $attribute_value,
    1897. -
    1898.                     '',
    1899. -
    1900.                     $bag_id,
    1901. -
    1902.                     $statements,
    1903. -
    1904.                     '',
    1905. -
    1906.                     '');
    1907. -
    1908.             }
    1909. -
    1910.             else if( ( $ordinal $this->_is_rdf_ordinal$attribute_local_name ) ) != )
    1911. -
    1912.             {
    1913. -
    1914.                 $this->_report_statement(
    1915. -
    1916.                     $subject_type,
    1917. -
    1918.                     $subject,
    1919. -
    1920.                     $predicate,
    1921. -
    1922.                     $ordinal,
    1923. -
    1924.                     RDF_OBJECT_TYPE_LITERAL,
    1925. -
    1926.                     $attribute_value,
    1927. -
    1928.                     $xml_lang,
    1929. -
    1930.                     $bag_id,
    1931. -
    1932.                     $statements,
    1933. -
    1934.                     '',
    1935. -
    1936.                     '' );
    1937. -
    1938.             }
    1939. -
    1940.             else if (   ($attribute_local_name != RDF_ABOUT)
    1941. -
    1942.                      && ($attribute_local_name != RDF_RDF)
    1943. -
    1944.                      && ($attribute_local_name != RDF_DESCRIPTION)
    1945. -
    1946.                      && ($attribute_local_name != RDF_ID)
    1947. -
    1948.                      && ($attribute_local_name != RDF_ABOUT_EACH)
    1949. -
    1950.                      && ($attribute_local_name != RDF_ABOUT_EACH_PREFIX)
    1951. -
    1952.                      && ($attribute_local_name != RDF_BAG_ID)
    1953. -
    1954.                      && ($attribute_local_name != RDF_RESOURCE)
    1955. -
    1956.                      && ($attribute_local_name != RDF_PARSE_TYPE)
    1957. -
    1958.                      && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL)   
    1959. -
    1960.                      && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE)
    1961. -
    1962.                      && ($attribute_local_name != RDF_LI)
    1963. -
    1964.                      && ($attribute_local_name != RDF_SUBJECT)
    1965. -
    1966.                      && ($attribute_local_name != RDF_PREDICATE)
    1967. -
    1968.                      && ($attribute_local_name != RDF_OBJECT)
    1969. -
    1970.                      && ($attribute_local_name != RDF_NODEID)
    1971. -
    1972.                      && ($attribute_local_name != RDF_DATATYPE)
    1973. -
    1974.                      && ($attribute_local_name != RDF_SEEALSO)
    1975. -
    1976.                      && ($attribute_local_name != RDF_NIL)
    1977. -
    1978.                      && ($attribute_local_name != RDF_REST)
    1979. -
    1980.                      && ($attribute_local_name != RDF_FIRST)
    1981. -
    1982.                     
    1983. -
    1984.             {
    1985. -
    1986.                 $this->_report_statement(
    1987. -
    1988.                     $subject_type,
    1989. -
    1990.                     $subject,
    1991. -
    1992.                     $predicate,
    1993. -
    1994.                     0,
    1995. -
    1996.                     RDF_OBJECT_TYPE_LITERAL,
    1997. -
    1998.                     $attribute_value,
    1999. -
    2000.                     $xml_lang,
    2001. -
    2002.                     $bag_id,
    2003. -
    2004.                     $statements,
    2005. -
    2006.                     '',
    2007. -
    2008.                     '' );
    2009. -
    2010.             }         
    2011. -
    2012.         }
    2013. -
    2014.         else ifXML_NAMESPACE_URI == $attribute_namespace_uri )
    2015. -
    2016.         {
    2017. -
    2018.             if ($attribute_local_name == 'base')
    2019. -
    2020.             {
    2021. -
    2022.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2023. -
    2024.             }              
    2025. -
    2026.         }
    2027. -
    2028.         else if$attribute_namespace_uri )
    2029. -
    2030.         {
    2031. -
    2032.             // is it required that property attributes be in an explicit namespace?
    2033. -
    2034.  
    2035. -
    2036.             $this->_report_statement(
    2037. -
    2038.                 $subject_type,
    2039. -
    2040.                 $subject,
    2041. -
    2042.                 $predicate,
    2043. -
    2044.                 0,
    2045. -
    2046.                 RDF_OBJECT_TYPE_LITERAL,
    2047. -
    2048.                 $attribute_value,
    2049. -
    2050.                 $xml_lang,
    2051. -
    2052.                 $bag_id,
    2053. -
    2054.                 $statements,
    2055. -
    2056.                 '',
    2057. -
    2058.                 '' );
    2059. -
    2060.         }
    2061. -
    2062.     }
    2063. -
    2064. }
    2065. -
    2066.  
    2067. -
    2068.  
    2069. -
    2070.  
    2071. -
    2072. /**
    2073. -
    2074.    * @param string $warning 
    2075. -
    2076.  * @access    private
    2077. -
    2078. */ 
    2079. -
    2080. function _report_warning($warning)
    2081. -
    2082. {
    2083. -
    2084.     $errmsg RDFAPI_ERROR '(class: parser): ' $warning .'.';
    2085. -
    2086.     trigger_error($errmsgE_USER_WARNING)
    2087. -
    2088. }
    2089. -
    2090.  
    2091. -
    2092.  
    2093. -
    2094. function _report_error($error)
    2095. -
    2096. {
    2097. -
    2098.     $errmsg RDFAPI_ERROR '(class: parser): ' $error .'.';
    2099. -
    2100.     trigger_error($errmsgE_USER_ERROR)
    2101. -
    2102. }
    2103. -
    2104.  
    2105. -
    2106.  
    2107. -
    2108. /**
    2109. -
    2110.    * @param string $namespace_uri 
    2111. -
    2112.    * @param string $local_name 
    2113. -
    2114.    * @param string $attributes 
    2115. -
    2116.    * @param string $parent 
    2117. -
    2118.  * @access    private
    2119. -
    2120. */ 
    2121. -
    2122. function _handle_resource_element$namespace_uri$local_name$attributes$parent )
    2123. -
    2124. {
    2125. -
    2126.     $subjects_found 0;
    2127. -
    2128.     $aux=$attributes;
    2129. -
    2130.     $aux2=Array();
    2131. -
    2132.     foreach($attributes as $atkey=>$atvalue{
    2133. -
    2134.       $aux2[]=$atkey;
    2135. -
    2136.       $aux2[]=$atvalue;
    2137. -
    2138.     }
    2139. -
    2140.     $attributes=$aux2;
    2141. -
    2142.     $id '';
    2143. -
    2144.     $about '';
    2145. -
    2146.  
    2147. -
    2148.     $bag_id '';
    2149. -
    2150.     $node_id '';
    2151. -
    2152.     $datatype '';
    2153. -
    2154.  
    2155. -
    2156.     $i=0;
    2157. -
    2158.  
    2159. -
    2160.     $attribute='';
    2161. -
    2162.  
    2163. -
    2164.     $attribute_namespace_uri='';
    2165. -
    2166.     $attribute_local_name='';
    2167. -
    2168.     $attribute_value='';
    2169. -
    2170.  
    2171. -
    2172.     $id_buffer='';
    2173. -
    2174.  
    2175. -
    2176.     $type='';
    2177. -
    2178.  
    2179. -
    2180.     $this->rdf_parser['top']['has_property_attributes'false;
    2181. -
    2182.     $this->rdf_parser['top']['has_member_attributes'false;
    2183. -
    2184.  
    2185. -
    2186.     
    2187. -
    2188.     if$namespace_uri == RDF_NAMESPACE_URI )
    2189. -
    2190.     {
    2191. -
    2192.        if$this->_is_rdf_node_element$local_name ) )
    2193. -
    2194.        {           
    2195. -
    2196.           $msg 'unknown or out of context rdf node element: '.$local_name;    
    2197. -
    2198.           
    2199. -
    2200.           if ($this->_is_forbidden_rdf_node_element($local_name))
    2201. -
    2202.                $this->_report_error($msg);
    2203. -
    2204.           else 
    2205. -
    2206.                $this->_report_warning($msg);                  
    2207. -
    2208.        }             
    2209. -
    2210.     }
    2211. -
    2212.  
    2213. -
    2214.     // examine each attribute for the standard RDF "keywords"
    2215. -
    2216.     for$i 0isset($attributes[$i])$i += )
    2217. -
    2218.     {
    2219. -
    2220.         $this->_split_name(
    2221. -
    2222.             $attributes$i ],
    2223. -
    2224.             $attribute,
    2225. -
    2226.             $attribute_namespace_uri,
    2227. -
    2228.             $attribute_local_name );
    2229. -
    2230.  
    2231. -
    2232.         $attribute_value $attributes$i ];
    2233. -
    2234.  
    2235. -
    2236.         // if the attribute is not in any namespace
    2237. -
    2238.         //   or the attribute is in the RDF namespace
    2239. -
    2240.         if( ( $attribute_namespace_uri == '' )
    2241. -
    2242.             || (  $attribute_namespace_uri == RDF_NAMESPACE_URI  ))
    2243. -
    2244.         {
    2245. -
    2246.             if$attribute_local_name == RDF_ID )
    2247. -
    2248.             {
    2249. -
    2250.                 $id $attribute_value;
    2251. -
    2252.                 ++$subjects_found;
    2253. -
    2254.             else if$attribute_local_name == RDF_ABOUT {
    2255. -
    2256.                 $about '_'.$attribute_value;            
    2257. -
    2258.                 ++$subjects_found;
    2259. -
    2260.             else if$attribute_local_name == RDF_NODEID{
    2261. -
    2262.                 $node_id $attribute_value;
    2263. -
    2264.                 ++$subjects_found;
    2265. -
    2266.             else if(  $attribute_local_name == RDF_ABOUT_EACH {
    2267. -
    2268.                 $error 'aboutEach has been removed from the RDF specifications';
    2269. -
    2270.                 $this->_report_error($error);               
    2271. -
    2272.             else if$attribute_local_name == RDF_ABOUT_EACH_PREFIX {
    2273. -
    2274.                 $error 'aboutEachPrefix has been removed from the RDF specifications';
    2275. -
    2276.                 $this->_report_error($error);
    2277. -
    2278.             else if$attribute_local_name == RDF_BAG_ID{
    2279. -
    2280.                 $bag_id $attribute_value;
    2281. -
    2282.             else if$attribute_local_name == RDF_DATATYPE{
    2283. -
    2284.                 $datatype $attribute_value;
    2285. -
    2286.             else if$this->_is_rdf_property_attribute$attribute_local_name )) {
    2287. -
    2288.                 $this->rdf_parser['top']['has_property_attributes'true;
    2289. -
    2290.             else if$this->_is_rdf_ordinal$attribute_local_name )) {
    2291. -
    2292.                 $this->rdf_parser['top']['has_property_attributes'true;
    2293. -
    2294.                 $this->rdf_parser['top']['has_member_attributes'true;
    2295. -
    2296.             else {
    2297. -
    2298.                 $this->rdf_parser['top']['has_property_attributes'true;
    2299. -
    2300.                 $msg 'unknown or out of context rdf attribute: '.$attribute_local_name;    
    2301. -
    2302.           
    2303. -
    2304.                   if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name))
    2305. -
    2306.                       $this->_report_error($msg);
    2307. -
    2308.                   else 
    2309. -
    2310.                       $this->_report_warning($msg);            
    2311. -
    2312.             }
    2313. -
    2314.         }
    2315. -
    2316.         else if(  $attribute_namespace_uri == XML_NAMESPACE_URI )
    2317. -
    2318.         {
    2319. -
    2320.             if$attribute_local_name == XML_LANG )
    2321. -
    2322.             {
    2323. -
    2324.                 $this->rdf_parser['top']['xml_lang'$attribute_value;
    2325. -
    2326.             }
    2327. -
    2328.             elseif ($attribute_local_name == 'base')
    2329. -
    2330.             {
    2331. -
    2332.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2333. -
    2334.             }                         
    2335. -
    2336.         }
    2337. -
    2338.         else if$attribute_namespace_uri )
    2339. -
    2340.         {
    2341. -
    2342.             $this->rdf_parser['top']['has_property_attributes'true;
    2343. -
    2344.         }
    2345. -
    2346.     }
    2347. -
    2348.  
    2349. -
    2350.     // if no subjects were found, generate one.
    2351. -
    2352.     if$subjects_found == )
    2353. -
    2354.     {
    2355. -
    2356.         $this->_generate_anonymous_uri$id_buffer );
    2357. -
    2358.         $this->rdf_parser['top']['subject']=$id_buffer;
    2359. -
    2360.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    2361. -
    2362.     }
    2363. -
    2364.     else if$subjects_found )
    2365. -
    2366.     {
    2367. -
    2368.          $this->_report_error('ID, about and nodeID are mutually exclusive');      
    2369. -
    2370.     }
    2371. -
    2372.     else if$id )
    2373. -
    2374.     {
    2375. -
    2376.         $this->_resolve_id$id$id_buffer );
    2377. -
    2378.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_URI;
    2379. -
    2380.         $this->rdf_parser['top']['subject']=$id_buffer;
    2381. -
    2382.     }
    2383. -
    2384.     else if$about )
    2385. -
    2386.     {       
    2387. -
    2388.         $this->_resolve_uri_reference$this->rdf_get_base()substr($about,1)$id_buffer );        
    2389. -
    2390.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_URI;
    2391. -
    2392.         $this->rdf_parser['top']['subject']=$id_buffer;
    2393. -
    2394.     }       
    2395. -
    2396.     else if$node_id )
    2397. -
    2398.     {
    2399. -
    2400.         $this->is_valid_id($node_id);
    2401. -
    2402.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    2403. -
    2404.         $this->rdf_parser['top']['subject']=$node_id;
    2405. -
    2406.     }
    2407. -
    2408.     
    2409. -
    2410.     // if the subject is empty, assign it the document uri
    2411. -
    2412.     if$this->rdf_parser['top']['subject'== '' )
    2413. -
    2414.     {
    2415. -
    2416.         $this->rdf_parser['top']['subject']=$this->rdf_get_base();                
    2417. -
    2418.     }
    2419. -
    2420.  
    2421. -
    2422.     if$bag_id )
    2423. -
    2424.     {
    2425. -
    2426.         $this->_resolve_id$bag_id$id_buffer );
    2427. -
    2428.         $this->rdf_parser['top']['bag_id']=$id_buffer;
    2429. -
    2430.     }
    2431. -
    2432.  
    2433. -
    2434.     // only report the type for non-rdf:Description elements.
    2435. -
    2436.     if( ($local_name != RDF_DESCRIPTION )
    2437. -
    2438.         || $namespace_uri != RDF_NAMESPACE_URI ) )
    2439. -
    2440.     {
    2441. -
    2442.         $type=$namespace_uri;
    2443. -
    2444.         $type.=$local_name;
    2445. -
    2446.  
    2447. -
    2448.         $this->_report_statement(
    2449. -
    2450.             $this->rdf_parser['top']['subject_type'],
    2451. -
    2452.             $this->rdf_parser['top']['subject'],
    2453. -
    2454.             RDF_NAMESPACE_URI.RDF_TYPE,
    2455. -
    2456.             0,
    2457. -
    2458.             RDF_OBJECT_TYPE_RESOURCE,
    2459. -
    2460.             $type,
    2461. -
    2462.             '',
    2463. -
    2464.             $this->rdf_parser['top']['bag_id'],
    2465. -
    2466.             $this->rdf_parser['top']['statements'],
    2467. -
    2468.             ''
    2469. -
    2470.             $datatype);
    2471. -
    2472.  
    2473. -
    2474.     }
    2475. -
    2476.  
    2477. -
    2478.     // if this element is the child of some property,
    2479. -
    2480.     //   report the appropriate statement.
    2481. -
    2482.     if$parent )
    2483. -
    2484.     {
    2485. -
    2486.         if ($this->rdf_parser['top']['subject_type'== RDF_SUBJECT_TYPE_BNODE)
    2487. -
    2488.             $objtype RDF_OBJECT_TYPE_BNODE
    2489. -
    2490.         else
    2491. -
    2492.             $objtype RDF_OBJECT_TYPE_RESOURCE;       
    2493. -
    2494.         
    2495. -
    2496.         $this->_report_statement(
    2497. -
    2498.             $parent['parent']['subject_type'],
    2499. -
    2500.             $parent['parent']['subject'],
    2501. -
    2502.             $parent['predicate'],
    2503. -
    2504.             $parent['ordinal'],
    2505. -
    2506.             $objtype,
    2507. -
    2508.             $this->rdf_parser['top']['subject'],
    2509. -
    2510.             '',
    2511. -
    2512.             $parent['parent']['bag_id'],
    2513. -
    2514.             $parent['parent']['statements'],
    2515. -
    2516.             $parent['statement_id']
    2517. -
    2518.             $parent['datatype']);
    2519. -
    2520.  
    2521. -
    2522.     }
    2523. -
    2524.  
    2525. -
    2526.     if$this->rdf_parser['top']['has_property_attributes')
    2527. -
    2528.     {
    2529. -
    2530.         $this->_handle_property_attributes(
    2531. -
    2532.             $this->rdf_parser['top']['subject_type'],
    2533. -
    2534.             $this->rdf_parser['top']['subject'],
    2535. -
    2536.             $attributes,
    2537. -
    2538.             $this->rdf_parser['top']['xml_lang'],
    2539. -
    2540.             $this->rdf_parser['top']['bag_id'],
    2541. -
    2542.             $this->rdf_parser['top']['statements');
    2543. -
    2544.     }
    2545. -
    2546. }
    2547. -
    2548.  
    2549. -
    2550. /**
    2551. -
    2552.    * @param string &$namespace_uri 
    2553. -
    2554.    * @param string &$local_name 
    2555. -
    2556.    * @param string &$attributes 
    2557. -
    2558.  * @access    private
    2559. -
    2560. */ 
    2561. -
    2562. function _handle_property_element&$namespace_uri&$local_name&$attributes )
    2563. -
    2564. {
    2565. -
    2566.     $buffer='';
    2567. -
    2568.  
    2569. -
    2570.     $i=0;
    2571. -
    2572.  
    2573. -
    2574.     $aux=$attributes;
    2575. -
    2576.     $aux2=Array();
    2577. -
    2578.     foreach($attributes as $atkey=>$atvalue{
    2579. -
    2580.       $aux2[]=$atkey;
    2581. -
    2582.       $aux2[]=$atvalue;
    2583. -
    2584.     }
    2585. -
    2586.     $attributes=$aux2;
    2587. -
    2588.  
    2589. -
    2590.     $attribute_namespace_uri='';
    2591. -
    2592.     $attribute_local_name='';
    2593. -
    2594.     $attribute_value '';
    2595. -
    2596.  
    2597. -
    2598.     $resource NULL;
    2599. -
    2600.     $statement_id '';
    2601. -
    2602.     $bag_id '';
    2603. -
    2604.     $parse_type '';
    2605. -
    2606.     $node_id '';
    2607. -
    2608.     $datatype ''
    2609. -
    2610.  
    2611. -
    2612.     $this->rdf_parser['top']['ordinal'0;
    2613. -
    2614.  
    2615. -
    2616.     if$namespace_uri == RDF_NAMESPACE_URI )
    2617. -
    2618.     {
    2619. -
    2620.        if$this->_is_rdf_property_element$local_name ) )
    2621. -
    2622.         {
    2623. -
    2624.             $msg 'unknown or out of context rdf property element: '.$local_name;    
    2625. -
    2626.           
    2627. -
    2628.               if ($this->_is_forbidden_rdf_property_element($local_name))
    2629. -
    2630.                   $this->_report_error($msg);
    2631. -
    2632.               else 
    2633. -
    2634.                   $this->_report_warning($msg);
    2635. -
    2636.         }
    2637. -
    2638.              
    2639. -
    2640.     }
    2641. -
    2642.  
    2643. -
    2644.     $buffer=$namespace_uri;
    2645. -
    2646.  
    2647. -
    2648.     if( ( $namespace_uri == RDF_NAMESPACE_URI )
    2649. -
    2650.         &&  $local_name == RDF_LI ) )
    2651. -
    2652.     {
    2653. -
    2654.         $this->rdf_parser['top']['parent']['members']++;
    2655. -
    2656.         $this->rdf_parser['top']['ordinal'$this->rdf_parser['top']['parent']['members'];
    2657. -
    2658.  
    2659. -
    2660.         $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal'];
    2661. -
    2662.  
    2663. -
    2664.         $buffer.='_'.$this->rdf_parser['top']['ordinal'];
    2665. -
    2666.         
    2667. -
    2668.     }
    2669. -
    2670.     else
    2671. -
    2672.     {
    2673. -
    2674.         $buffer.=$local_name;
    2675. -
    2676.     }
    2677. -
    2678.  
    2679. -
    2680.     $this->rdf_parser['top']['predicate']=$buffer;
    2681. -
    2682.  
    2683. -
    2684.     $this->rdf_parser['top']['has_property_attributes'false;
    2685. -
    2686.     $this->rdf_parser['top']['has_member_attributes'false;
    2687. -
    2688.  
    2689. -
    2690.           
    2691. -
    2692.     for$i 0isset($attributes[$i])$i += )
    2693. -
    2694.     {
    2695. -
    2696.         $this->_split_name(
    2697. -
    2698.             $attributes[$i],
    2699. -
    2700.             $buffer,
    2701. -
    2702.             $attribute_namespace_uri,
    2703. -
    2704.             $attribute_local_name );
    2705. -
    2706.  
    2707. -
    2708.         $attribute_value $attributes[$i 1];
    2709. -
    2710.  
    2711. -
    2712.         // if the attribute is not in any namespace
    2713. -
    2714.         //   or the attribute is in the RDF namespace
    2715. -
    2716.         if( ( $attribute_namespace_uri == '' )
    2717. -
    2718.             || (  $attribute_namespace_uri == RDF_NAMESPACE_URI ) )
    2719. -
    2720.         {
    2721. -
    2722.             if( ( $attribute_local_name == RDF_ID )  )
    2723. -
    2724.             {
    2725. -
    2726.                 $statement_id $attribute_value;                               
    2727. -
    2728.             }
    2729. -
    2730.             else if$attribute_local_name == RDF_PARSE_TYPE )
    2731. -
    2732.             {               
    2733. -
    2734.                 $parse_type $attribute_value;
    2735. -
    2736.             }
    2737. -
    2738.             else if(  $attribute_local_name == RDF_RESOURCE )
    2739. -
    2740.             {
    2741. -
    2742.                 $resource $attribute_value;                                
    2743. -
    2744.             }
    2745. -
    2746.             else if(  $attribute_local_name == RDF_NODEID )
    2747. -
    2748.             {                                
    2749. -
    2750.                 $node_id $attribute_value;        
    2751. -
    2752.             }
    2753. -
    2754.             else if(  $attribute_local_name == RDF_BAG_ID )
    2755. -
    2756.             {
    2757. -
    2758.                 $bag_id $attribute_value;
    2759. -
    2760.             }
    2761. -
    2762.             else if(  $attribute_local_name == RDF_DATATYPE )
    2763. -
    2764.             {
    2765. -
    2766.                 $datatype $attribute_value;
    2767. -
    2768.                 $this->rdf_parser['top']['datatype'$attribute_value;
    2769. -
    2770.             }
    2771. -
    2772.             else if$this->_is_rdf_property_attribute$attribute_local_name ) )
    2773. -
    2774.             {
    2775. -
    2776.                 $this->rdf_parser['top']['has_property_attributes'true;
    2777. -
    2778.             }
    2779. -
    2780.             else
    2781. -
    2782.             {
    2783. -
    2784.                 $this->_report_warning('unknown rdf attribute: '.$attribute_local_name );
    2785. -
    2786.                 return;
    2787. -
    2788.             }            
    2789. -
    2790.         }
    2791. -
    2792.         else if(  $attribute_namespace_uri == XML_NAMESPACE_URI  )
    2793. -
    2794.         {
    2795. -
    2796.             if$attribute_local_name == XML_LANG  )
    2797. -
    2798.             {
    2799. -
    2800.                 $this->rdf_parser['top']['xml_lang'$attribute_value;
    2801. -
    2802.             }
    2803. -
    2804.             elseif ($attribute_local_name == 'base')
    2805. -
    2806.             {
    2807. -
    2808.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2809. -
    2810.             }                         
    2811. -
    2812.         }
    2813. -
    2814.         else if$attribute_namespace_uri )
    2815. -
    2816.         {
    2817. -
    2818.             $this->rdf_parser['top']['has_property_attributes'true;
    2819. -
    2820.         }
    2821. -
    2822.     }    
    2823. -
    2824.  
    2825. -
    2826.     if$statement_id )
    2827. -
    2828.     {
    2829. -
    2830.         $this->_resolve_id($statement_id$buffer );
    2831. -
    2832.         $this->rdf_parser['top']['statement_id']=$buffer;
    2833. -
    2834.     }
    2835. -
    2836.     
    2837. -
    2838.     if ($node_id)
    2839. -
    2840.     {
    2841. -
    2842.         $this->is_valid_id($node_id);
    2843. -
    2844.         
    2845. -
    2846.         if ($resource)
    2847. -
    2848.         {
    2849. -
    2850.             $this->_report_error('nodeID and resource are mutually exclusive');
    2851. -
    2852.         }                
    2853. -
    2854.            if ($statement_id
    2855. -
    2856.            {
    2857. -
    2858.                // reify statement
    2859. -
    2860.                $this->_report_statement(
    2861. -
    2862.                 $this->rdf_parser['top']['parent']['subject_type'],
    2863. -
    2864.                 $this->rdf_parser['top']['parent']['subject'],
    2865. -
    2866.                 $this->rdf_parser['top']['predicate'],
    2867. -
    2868.                 $this->rdf_parser['top']['ordinal'],
    2869. -
    2870.                 RDF_OBJECT_TYPE_BNODE
    2871. -
    2872.                 $node_id
    2873. -
    2874.                 '',
    2875. -
    2876.                 $this->rdf_parser['top']['parent']['bag_id'],
    2877. -
    2878.                 $this->rdf_parser['top']['parent']['statements'],
    2879. -
    2880.                 $this->rdf_parser['top']['statement_id']
    2881. -
    2882.                 '')
    2883. -
    2884.             $statement_id '';         
    2885. -
    2886.            
    2887. -
    2888.            else 
    2889. -
    2890.            {                             
    2891. -
    2892.             $this->_report_statement(
    2893. -
    2894.                $this->rdf_parser['top']['parent']['subject_type'],
    2895. -
    2896.                $this->rdf_parser['top']['parent']['subject'],
    2897. -
    2898.                $this->rdf_parser['top']['predicate'],
    2899. -
    2900.                $this->rdf_parser['top']['ordinal'],
    2901. -
    2902.                RDF_OBJECT_TYPE_BNODE,
    2903. -
    2904.                $node_id,
    2905. -
    2906.                '',
    2907. -
    2908.                $this->rdf_parser['top']['parent']['bag_id'],
    2909. -
    2910.                $this->rdf_parser['top']['parent']['statements'],
    2911. -
    2912.                '',
    2913. -
    2914.                $datatype );    
    2915. -
    2916.            }    
    2917. -
    2918.            
    2919. -
    2920.            $this->rdf_parser['top']['state'IN_PROPERTY_EMPTY_RESOURCE;      
    2921. -
    2922.     }
    2923. -
    2924.     
    2925. -
    2926.     if$parse_type )
    2927. -
    2928.     {
    2929. -
    2930.         if$resource {
    2931. -
    2932.             $this->_report_error('property elements with rdf:parseType do not allow rdf:resource' );
    2933. -
    2934.         }
    2935. -
    2936.  
    2937. -
    2938.         if$bag_id {
    2939. -
    2940.             $this->_report_warning('property elements with rdf:parseType do not allow rdf:bagID' );
    2941. -
    2942.             return;
    2943. -
    2944.         }
    2945. -
    2946.  
    2947. -
    2948.         if$this->rdf_parser['top']['has_property_attributes')
    2949. -
    2950.         {
    2951. -
    2952.                 $this->_report_error('property elements with rdf:parseType do not allow property attributes');
    2953. -
    2954.             return;
    2955. -
    2956.         }
    2957. -
    2958.                 
    2959. -
    2960.         if(  $attribute_value == RDF_PARSE_TYPE_RESOURCE )
    2961. -
    2962.         {
    2963. -
    2964.             $this->_generate_anonymous_uri$buffer );
    2965. -
    2966.             // since we are sure that this is now a resource property we can report it
    2967. -
    2968.             $this->_report_statement(
    2969. -
    2970.                 $this->rdf_parser['top']['parent']['subject_type'],
    2971. -
    2972.                 $this->rdf_parser['top']['parent']['subject'],
    2973. -
    2974.                 $this->rdf_parser['top']['predicate'],
    2975. -
    2976.                 0,
    2977. -
    2978.                 RDF_OBJECT_TYPE_BNODE,
    2979. -
    2980.                 $buffer,
    2981. -
    2982.                 '',
    2983. -
    2984.                 $this->rdf_parser['top']['parent']['bag_id'],
    2985. -
    2986.                 $this->rdf_parser['top']['parent']['statements'],
    2987. -
    2988.                 $this->rdf_parser['top']['statement_id'],
    2989. -
    2990.                 $datatype );
    2991. -
    2992.  
    2993. -
    2994.             $this->_push_element);
    2995. -
    2996.  
    2997. -
    2998.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_RESOURCE;
    2999. -
    3000.             $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    3001. -
    3002.             $this->rdf_parser['top']['subject']=$buffer;
    3003. -
    3004.             $this->rdf_parser['top']['bag_id']='';
    3005. -
    3006.             $this->rdf_parser['top']['datatype']$datatype;
    3007. -
    3008.             
    3009. -
    3010.         }     
    3011. -
    3012.            elseif (  $attribute_value == RDF_PARSE_TYPE_LITERAL )
    3013. -
    3014.            {
    3015. -
    3016.                $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_LITERAL;
    3017. -
    3018.                $this->rdf_parser['top']['datatype']RDF_NAMESPACE_URI .RDF_XMLLITERAL;
    3019. -
    3020.                $this->rdf_parser['xml_literal']['buffer''';       
    3021. -
    3022.                $this->rdf_parser['xml_literal']['depth'0;        
    3023. -
    3024.            }
    3025. -
    3026.         elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION)        
    3027. -
    3028.         {
    3029. -
    3030.             $this->_generate_anonymous_uri$buffer );            
    3031. -
    3032.             $this->_report_statement(
    3033. -
    3034.                 $this->rdf_parser['top']['parent']['subject_type'],
    3035. -
    3036.                 $this->rdf_parser['top']['parent']['subject'],
    3037. -
    3038.                 $this->rdf_parser['top']['predicate'],
    3039. -
    3040.                 0,
    3041. -
    3042.                 RDF_OBJECT_TYPE_BNODE,
    3043. -
    3044.                 $buffer,
    3045. -
    3046.                 '',
    3047. -
    3048.                 $this->rdf_parser['top']['parent']['bag_id'],
    3049. -
    3050.                 $this->rdf_parser['top']['parent']['statements'],
    3051. -
    3052.                 $this->rdf_parser['top']['statement_id'],
    3053. -
    3054.                 $datatype );
    3055. -
    3056.                 
    3057. -
    3058.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_COLLECTION;
    3059. -
    3060.             $this->rdf_parser['top']['collection']['first_blank_node_id'$buffer;
    3061. -
    3062.         }      
    3063. -
    3064.        
    3065. -
    3066.         else
    3067. -
    3068.         {
    3069. -
    3070.                    
    3071. -
    3072.             $this->_report_statement(
    3073. -
    3074.                 $this->rdf_parser['top']['parent']['subject_type'],
    3075. -
    3076.                 $this->rdf_parser['top']['parent']['subject'],
    3077. -
    3078.                 $this->rdf_parser['top']['predicate'],
    3079. -
    3080.                 0,
    3081. -
    3082.                 RDF_OBJECT_TYPE_XML,
    3083. -
    3084.                 '',
    3085. -
    3086.                 '',
    3087. -
    3088.                 $this->rdf_parser['top']['parent']['bag_id'],
    3089. -
    3090.                 $this->rdf_parser['top']['parent']['statements'],
    3091. -
    3092.                 $this->rdf_parser['top']['statement_id'],
    3093. -
    3094.                 $datatype );
    3095. -
    3096.  
    3097. -
    3098.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_LITERAL;
    3099. -
    3100.         }
    3101. -
    3102.     }
    3103. -
    3104.     else if$resource !== NULL || $bag_id || $this->rdf_parser['top']['has_property_attributes')
    3105. -
    3106.         {
    3107. -
    3108.         if$resource !== NULL )
    3109. -
    3110.         {
    3111. -
    3112.             $subject_type RDF_SUBJECT_TYPE_URI;
    3113. -
    3114.             $this->_resolve_uri_reference$this->rdf_get_base()$resource$buffer );
    3115. -
    3116.             $object_type=RDF_OBJECT_TYPE_RESOURCE;
    3117. -
    3118.         }
    3119. -
    3120.         else
    3121. -
    3122.         {
    3123. -
    3124.             $subject_type RDF_SUBJECT_TYPE_BNODE;
    3125. -
    3126.             $this->_generate_anonymous_uri$buffer );
    3127. -
    3128.             $object_type=RDF_OBJECT_TYPE_BNODE;
    3129. -
    3130.         }
    3131. -
    3132.         $this->rdf_parser['top']['state'IN_PROPERTY_EMPTY_RESOURCE;
    3133. -
    3134.  
    3135. -
    3136.         // since we are sure that this is now a resource property we can report it.
    3137. -
    3138.         $this->_report_statement(
    3139. -
    3140.             $this->rdf_parser['top']['parent']['subject_type'],
    3141. -
    3142.             $this->rdf_parser['top']['parent']['subject'],
    3143. -
    3144.             $this->rdf_parser['top']['predicate'],
    3145. -
    3146.             $this->rdf_parser['top']['ordinal'],
    3147. -
    3148.             $object_type,
    3149. -
    3150.             $buffer,
    3151. -
    3152.             '',
    3153. -
    3154.             $this->rdf_parser['top']['parent']['bag_id'],
    3155. -
    3156.             $this->rdf_parser['top']['parent']['statements'],
    3157. -
    3158.             $this->rdf_parser['top']['statement_id'],
    3159. -
    3160.             $datatype )// should we allow IDs?
    3161. -
    3162.             
    3163. -
    3164.         if$bag_id )
    3165. -
    3166.         {
    3167. -
    3168.             $this->_resolve_id$bag_id$buffer );
    3169. -
    3170.             $this->rdf_parser['top']['bag_id']=$buffer;            
    3171. -
    3172.         }
    3173. -
    3174.  
    3175. -
    3176.         if$this->rdf_parser['top']['has_property_attributes')
    3177. -
    3178.         {
    3179. -
    3180.             $this->_handle_property_attributes(
    3181. -
    3182.                 $subject_type,
    3183. -
    3184.                 $buffer,
    3185. -
    3186.                 $attributes,
    3187. -
    3188.                 $this->rdf_parser['top']['xml_lang'],
    3189. -
    3190.                 $this->rdf_parser['top']['bag_id'],
    3191. -
    3192.                 $this->rdf_parser['top']['statements');                
    3193. -
    3194.         }
    3195. -
    3196.     
    3197. -
    3198. }
    3199. -
    3200.        
    3201. -
    3202. /**
    3203. -
    3204.    * @param string &$namespace_uri 
    3205. -
    3206.    * @param string &$local_name 
    3207. -
    3208.    * @param string &$attributes 
    3209. -
    3210.    * @access    private
    3211. -
    3212. */ 
    3213. -
    3214. function _handle_collection_element(&$namespace_uri&$local_name&$attributes)
    3215. -
    3216. {
    3217. -
    3218.     $aux2=Array();
    3219. -
    3220.     foreach($attributes as $atkey=>$atvalue{
    3221. -
    3222.       $aux2[]=$atkey;
    3223. -
    3224.       $aux2[]=$atvalue;
    3225. -
    3226.     }
    3227. -
    3228.     $attributes=$aux2;
    3229. -
    3230. /* collection construction site
    3231. -
    3232. // old:    
    3233. -
    3234.     if (   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
    3235. -
    3236.         && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )
    3237. -
    3238.     {
    3239. -
    3240.         for( $i = 0; isset($attributes[$i]); $i += 2 )
    3241. -
    3242.         {
    3243. -
    3244.             $this->_split_name(
    3245. -
    3246.                 $attributes[ $i ],
    3247. -
    3248.                 $attribute,
    3249. -
    3250.                 $attribute_namespace_uri,
    3251. -
    3252.                 $attribute_local_name );
    3253. -
    3254.  
    3255. -
    3256.             $attribute_value = $attributes[ $i + 1 ];
    3257. -
    3258.             
    3259. -
    3260.             if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
    3261. -
    3262.             {
    3263. -
    3264.                 if( $attribute_local_name == RDF_ABOUT || 
    3265. -
    3266.                     $attribute_local_name == RDF_RESOURCE) 
    3267. -
    3268.                 {
    3269. -
    3270.                     $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE;                    
    3271. -
    3272.                 }
    3273. -
    3274.                 elseif ( $attribute_local_name == RDF_NODEID ) {
    3275. -
    3276.                     $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE;
    3277. -
    3278.                 }
    3279. -
    3280.                 $this->rdf_parser['top']['parent']['collection']['object_label'][] = $attribute_value;
    3281. -
    3282.             }
    3283. -
    3284.         }
    3285. -
    3286.     }
    3287. -
    3288. */
    3289. -
    3290. // new
    3291. -
    3292.  
    3293. -
    3294.         for$i 0isset($attributes[$i])$i += )
    3295. -
    3296.         {
    3297. -
    3298.             $this->_split_name(
    3299. -
    3300.                 $attributes$i ],
    3301. -
    3302.                 $attribute,
    3303. -
    3304.                 $attribute_namespace_uri,
    3305. -
    3306.                 $attribute_local_name );
    3307. -
    3308.  
    3309. -
    3310.             $attribute_value $attributes$i ];
    3311. -
    3312.             
    3313. -
    3314.             if$attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
    3315. -
    3316.             {
    3317. -
    3318.                 $tmp_subject_type RDF_SUBJECT_TYPE_URI;
    3319. -
    3320.                 if$attribute_local_name == RDF_ABOUT || 
    3321. -
    3322.                     $attribute_local_name == RDF_RESOURCE
    3323. -
    3324.                 {
    3325. -
    3326.                     $this->rdf_parser['top']['parent']['collection']['object_type'][RDF_OBJECT_TYPE_RESOURCE;                                        
    3327. -
    3328.                 }
    3329. -
    3330.                 elseif $attribute_local_name == RDF_NODEID {
    3331. -
    3332.                     $this->rdf_parser['top']['parent']['collection']['object_type'][RDF_OBJECT_TYPE_BNODE;
    3333. -
    3334.                     $tmp_subject_type RDF_SUBJECT_TYPE_BNODE;
    3335. -
    3336.                 }
    3337. -
    3338.                 $id_buffer '';
    3339. -
    3340.                 $this->_resolve_uri_reference$this->rdf_get_base()$attribute_value$id_buffer );        
    3341. -
    3342.                 $this->rdf_parser['top']['parent']['collection']['object_label'][$id_buffer;
    3343. -
    3344.                 
    3345. -
    3346.                    if (!(   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
    3347. -
    3348.                        && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ))
    3349. -
    3350.                    {                
    3351. -
    3352.                       $this->_report_statement(
    3353. -
    3354.                             $tmp_subject_type,
    3355. -
    3356.                             $id_buffer,                            
    3357. -
    3358.                             RDF_NAMESPACE_URI.RDF_TYPE,                                                    
    3359. -
    3360.                             '',
    3361. -
    3362.                             RDF_OBJECT_TYPE_RESOURCE,
    3363. -
    3364.                             $namespace_uri.$local_name,
    3365. -
    3366.                             '',
    3367. -
    3368.                             '',
    3369. -
    3370.                             '',
    3371. -
    3372.                             '',
    3373. -
    3374.                             '');
    3375. -
    3376.                    }
    3377. -
    3378.             }
    3379. -
    3380.         }
    3381. -
    3382.  
    3383. -
    3384.  
    3385. -
    3386. // collection construction site    
    3387. -
    3388. }
    3389. -
    3390.  
    3391. -
    3392. /**
    3393. -
    3394.    * @param string &$namespace_uri 
    3395. -
    3396.    * @param string &$local_name 
    3397. -
    3398.    * @param string &$attributes 
    3399. -
    3400.    * @access    private
    3401. -
    3402. */ 
    3403. -
    3404. function _handle_xml_start_element(&$namespace_uri&$local_name&$attributes)
    3405. -
    3406. {
    3407. -
    3408.     $aux2=Array();
    3409. -
    3410.     foreach($attributes as $atkey=>$atvalue{
    3411. -
    3412.       $aux2[]=$atkey;
    3413. -
    3414.       $aux2[]=$atvalue;
    3415. -
    3416.     }
    3417. -
    3418.     $attributes=$aux2;
    3419. -
    3420.     
    3421. -
    3422.     $element '<' .$this->_join_name_and_declare_prefix($namespace_uri$local_name);        
    3423. -
    3424.     
    3425. -
    3426.     for$i 0isset($attributes[$i])$i += )
    3427. -
    3428.         {
    3429. -
    3430.             $this->_split_name(
    3431. -
    3432.                 $attributes$i ],
    3433. -
    3434.                 $attribute,
    3435. -
    3436.                 $attribute_namespace_uri,
    3437. -
    3438.                 $attribute_local_name );
    3439. -
    3440.  
    3441. -
    3442.             $attribute_value $attributes$i ];
    3443. -
    3444.  
    3445. -
    3446.             $element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri$attribute_local_name);
    3447. -
    3448.             $element .= '=\"' .$attribute_value .'\"';     
    3449. -
    3450.         }
    3451. -
    3452.     $element .= '>';
    3453. -
    3454.     
    3455. -
    3456.     $this->rdf_parser['xml_literal']['buffer'.= $element;
    3457. -
    3458. }
    3459. -
    3460.  
    3461. -
    3462. /**
    3463. -
    3464.    * @param string $name 
    3465. -
    3466.    * @access    private
    3467. -
    3468. */ 
    3469. -
    3470. function _handle_xml_end_element($name)
    3471. -
    3472. {
    3473. -
    3474.     $buffer='';
    3475. -
    3476.     $namespace_uri='';
    3477. -
    3478.     $local_name='';
    3479. -
    3480.     
    3481. -
    3482.     $this->_split_name(
    3483. -
    3484.         $name,
    3485. -
    3486.            $buffer,
    3487. -
    3488.            $namespace_uri,
    3489. -
    3490.            $local_name );
    3491. -
    3492.         
    3493. -
    3494.     $element '</';    
    3495. -
    3496.             
    3497. -
    3498.     if ($namespace_uri && isset($this->rdf_parser['default_namespace']
    3499. -
    3500.         &&$namespace_uri != $this->rdf_parser['default_namespace'])
    3501. -
    3502.     {
    3503. -
    3504.          $element .= $this->rdf_parser['namespaces'][$namespace_uri.':';                 
    3505. -
    3506.     }
    3507. -
    3508.         
    3509. -
    3510.     $element .= $local_name .'>';
    3511. -
    3512.         
    3513. -
    3514.     $this->rdf_parser['xml_literal']['buffer'.= $element
    3515. -
    3516.     $depth $this->rdf_parser['xml_literal']['depth']--;
    3517. -
    3518.         
    3519. -
    3520.     if (isset($this->rdf_parser['xml_literal']['declared_ns']))
    3521. -
    3522.           foreach ($this->rdf_parser['xml_literal']['declared_ns'as $prefix => $_depth)
    3523. -
    3524.     {
    3525. -
    3526.         if ($depth == $_depth)
    3527. -
    3528.             unset($this->rdf_parser['xml_literal']['declared_ns'][$prefix]);
    3529. -
    3530.     }
    3531. -
    3532. }
    3533. -
    3534.  
    3535. -
    3536. /**
    3537. -
    3538.    * @param string $namespace_uri 
    3539. -
    3540.    * @param string $local_name 
    3541. -
    3542.    * @access    private
    3543. -
    3544. */ 
    3545. -
    3546. function _join_name_and_declare_prefix($namespace_uri$local_name{
    3547. -
    3548.     
    3549. -
    3550.     $name '';
    3551. -
    3552.     
    3553. -
    3554.     if ($namespace_uri)
    3555. -
    3556.     {                
    3557. -
    3558.         if (isset($this->rdf_parser['default_namespace'])
    3559. -
    3560.             && $namespace_uri == $this->rdf_parser['default_namespace'])
    3561. -
    3562.         {    
    3563. -
    3564.             $name .= $local_name;
    3565. -
    3566.                     
    3567. -
    3568.             if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'])
    3569. -
    3570.                 && $namespace_uri != XML_NAMESPACE_URI)
    3571. -
    3572.             {
    3573. -
    3574.                 $name .= ' xmlns=' '\"' .$namespace_uri .'\"';
    3575. -
    3576.                 
    3577. -
    3578.                 $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'
    3579. -
    3580.                     = $this->rdf_parser['xml_literal']['depth'];
    3581. -
    3582.             }
    3583. -
    3584.         }
    3585. -
    3586.         else
    3587. -
    3588.         {
    3589. -
    3590.             $ns_prefix $this->rdf_parser['namespaces'][$namespace_uri]
    3591. -
    3592.             $name .= $ns_prefix .':' .$local_name;                 
    3593. -
    3594.         
    3595. -
    3596.             if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix])
    3597. -
    3598.                 && $namespace_uri != XML_NAMESPACE_URI)
    3599. -
    3600.             {
    3601. -
    3602.                 $name .= " xmlns:$ns_prefix='\"' .$namespace_uri .'\"';
    3603. -
    3604.                 
    3605. -
    3606.                 $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix
    3607. -
    3608.                     = $this->rdf_parser['xml_literal']['depth'];
    3609. -
    3610.             }
    3611. -
    3612.         }
    3613. -
    3614.             
    3615. -
    3616.     }
    3617. -
    3618.     else
    3619. -
    3620.         $name .= $local_name;
    3621. -
    3622.     
    3623. -
    3624.     return $name;
    3625. -
    3626.     
    3627. -
    3628. }
    3629. -
    3630.  
    3631. -
    3632. /**
    3633. -
    3634.   * @access    private
    3635. -
    3636. */ 
    3637. -
    3638. function _end_collection({
    3639. -
    3640.     
    3641. -
    3642.     if (isset($this->rdf_parser['top']['collection']))
    3643. -
    3644.     {            
    3645. -
    3646.                 
    3647. -
    3648.         $subject $this->rdf_parser['top']['collection']['first_blank_node_id'];
    3649. -
    3650.             
    3651. -
    3652.         for ($i=0isset($this->rdf_parser['top']['collection']['object_label'][$i])$i++
    3653. -
    3654.         {            
    3655. -
    3656.                         
    3657. -
    3658.             $this->_report_statement(
    3659. -
    3660.                 RDF_SUBJECT_TYPE_BNODE
    3661. -
    3662.                 $subject,
    3663. -
    3664.                 RDF_NAMESPACE_URI.RDF_FIRST,
    3665. -
    3666.                 '',
    3667. -
    3668.                 $this->rdf_parser['top']['collection']['object_type'][$i],
    3669. -
    3670.                 $this->rdf_parser['top']['collection']['object_label'][$i],
    3671. -
    3672.                 '',
    3673. -
    3674.                 '',
    3675. -
    3676.                 '',
    3677. -
    3678.                 '',
    3679. -
    3680.                 '');
    3681. -
    3682.  
    3683. -
    3684.             if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1]))
    3685. -
    3686.             {
    3687. -
    3688.                 $obj_type_2 RDF_OBJECT_TYPE_RESOURCE;
    3689. -
    3690.                 $object_2 RDF_NAMESPACE_URI.RDF_NIL;                
    3691. -
    3692.             }
    3693. -
    3694.             else     
    3695. -
    3696.             {
    3697. -
    3698.                 $obj_type_2RDF_OBJECT_TYPE_BNODE;
    3699. -
    3700.                 $this->_generate_anonymous_uri($object_2);
    3701. -
    3702.             }                
    3703. -
    3704.                 
    3705. -
    3706.                 
    3707. -
    3708.             $this->_report_statement(
    3709. -
    3710.                 RDF_SUBJECT_TYPE_BNODE
    3711. -
    3712.                 $subject,
    3713. -
    3714.                 RDF_NAMESPACE_URI.RDF_REST,
    3715. -
    3716.                 '',
    3717. -
    3718.                 $obj_type_2,
    3719. -
    3720.                 $object_2,
    3721. -
    3722.                 '',
    3723. -
    3724.                 '',
    3725. -
    3726.                 '',
    3727. -
    3728.                 '',
    3729. -
    3730.                 '');    
    3731. -
    3732.  
    3733. -
    3734.             $subject $object_2;        
    3735. -
    3736.         }        
    3737. -
    3738.     }
    3739. -
    3740. }
    3741. -
    3742.  
    3743. -
    3744. /**
    3745. -
    3746.    * @param string $parser 
    3747. -
    3748.    * @param string $name 
    3749. -
    3750.    * @param string $attributes 
    3751. -
    3752.    * @access    private
    3753. -
    3754. */ 
    3755. -
    3756. function _start_element_handler($parser$name$attributes )
    3757. -
    3758. {
    3759. -
    3760.     $buffer='';
    3761. -
    3762.  
    3763. -
    3764.     $namespace_uri='';
    3765. -
    3766.     $local_name='';
    3767. -
    3768.  
    3769. -
    3770.     $this->_push_element();
    3771. -
    3772.  
    3773. -
    3774.  
    3775. -
    3776.     $this->_split_name(
    3777. -
    3778.         $name,
    3779. -
    3780.         $buffer,
    3781. -
    3782.         $namespace_uri,
    3783. -
    3784.         $local_name );
    3785. -
    3786.  
    3787. -
    3788.     switch$this->rdf_parser['top']['state')
    3789. -
    3790.     {
    3791. -
    3792.     case IN_TOP_LEVEL:
    3793. -
    3794.         // set base_uri, if possible 
    3795. -
    3796.         foreach ($attributes as $key => $value{
    3797. -
    3798.              if($key == XML_NAMESPACE_URI NAMESPACE_SEPARATOR_CHAR 'base'
    3799. -
    3800.                      $this->rdf_parser['base_uri'$value;
    3801. -
    3802.                     $this->rdf_parser['document_base_uri'$value;                                 
    3803. -
    3804.                     
    3805. -
    3806.                     $c substr($valuestrlen($value)-,1);
    3807. -
    3808.                     if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    3809. -
    3810.                          $this->rdf_parser['normalized_base_uri'$value '#';
    3811. -
    3812.                     else
    3813. -
    3814.                         $this->rdf_parser['normalized_base_uri'$value
    3815. -
    3816.                     
    3817. -
    3818.               }
    3819. -
    3820.               elseif ($key == XML_NAMESPACE_URI NAMESPACE_SEPARATOR_CHAR .'lang')
    3821. -
    3822.                   $this->rdf_parser['document_xml_lang'$value;
    3823. -
    3824. echo "";
    3825. -
    3826.         }
    3827. -
    3828.                       
    3829. -
    3830.             
    3831. -
    3832.         ifRDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name )
    3833. -
    3834.         {            
    3835. -
    3836.             $this->rdf_parser['top']['state'IN_RDF;
    3837. -
    3838.  
    3839. -
    3840.             break;            
    3841. -
    3842.         }        
    3843. -
    3844.     case IN_RDF:
    3845. -
    3846.         $this->rdf_parser['top']['state'IN_DESCRIPTION;
    3847. -
    3848.         $this->_handle_resource_element$namespace_uri$local_name$attributes'' );
    3849. -
    3850.         break;
    3851. -
    3852.     case IN_DESCRIPTION:
    3853. -
    3854. -
    3855.          $this->rdf_parser['top']['state'IN_PROPERTY_UNKNOWN_OBJECT;
    3856. -
    3857.         $this->_handle_property_element$namespace_uri$local_name$attributes );
    3858. -
    3859.         break;
    3860. -
    3861. -
    3862.         $this->_handle_collection_element($namespace_uri$local_name$attributes);
    3863. -
    3864.         break;
    3865. -
    3866. -
    3867.         /* if we're in a property with an unknown object type and we encounter
    3868. -
    3869.            an element, the object must be a resource, */
    3870. -
    3871.         $this->rdf_parser['top']['data']='';
    3872. -
    3873.         $this->rdf_parser['top']['parent']['state'IN_PROPERTY_RESOURCE;
    3874. -
    3875.         $this->rdf_parser['top']['state'IN_DESCRIPTION;
    3876. -
    3877.         $this->_handle_resource_element(
    3878. -
    3879.             $namespace_uri,
    3880. -
    3881.             $local_name,
    3882. -
    3883.             $attributes,
    3884. -
    3885.             $this->rdf_parser['top']['parent');
    3886. -
    3887.         break;
    3888. -
    3889.     case IN_PROPERTY_LITERAL:
    3890. -
    3891.         $this->_report_warning'no markup allowed in literals' );
    3892. -
    3893.         break;
    3894. -
    3895. -
    3896.         $this->rdf_parser['top']['state'IN_XML;
    3897. -
    3898.         /* fall through */
    3899. -
    3900.     case IN_XML:
    3901. -
    3902.         $this->rdf_parser['xml_literal']['depth']++;
    3903. -
    3904.         $this->_handle_xml_start_element($namespace_uri$local_name$attributes);    
    3905. -
    3906.         break;
    3907. -
    3908.     case IN_PROPERTY_RESOURCE:
    3909. -
    3910.         $this->_report_warning(
    3911. -
    3912.                      'only one element allowed inside a property element' );
    3913. -
    3914.         break;
    3915. -
    3916. -
    3917.         $this->_report_warning(
    3918. -
    3919.                     'no content allowed in property with rdf:resource, rdf:bagID, or property attributes' );
    3920. -
    3921.         break;
    3922. -
    3923.     case IN_UNKNOWN:
    3924. -
    3925.         break;
    3926. -
    3927.     }
    3928. -
    3929. }
    3930. -
    3931.  
    3932. -
    3933. /**
    3934. -
    3935.     property elements with text only as content set the state to
    3936. -
    3937.     IN_PROPERTY_LITERAL. as character data is received from expat,
    3938. -
    3939.     it is saved in a buffer and reported when the end tag is
    3940. -
    3941.     received.
    3942. -
    3943.   * @access    private
    3944. -
    3945. */ 
    3946. -
    3947. function _end_literal_property()
    3948. -
    3949. {
    3950. -
    3951.     if(!isset($this->rdf_parser['top']['statement_id'])) {
    3952. -
    3953.       $this->rdf_parser['top']['statement_id']='';
    3954. -
    3955.     }
    3956. -
    3957.     if(!isset($this->rdf_parser['top']['parent']['subject_type'])) {
    3958. -
    3959.       $this->rdf_parser['top']['parent']['subject_type']='';
    3960. -
    3961.     }
    3962. -
    3963.     if(!isset($this->rdf_parser['top']['parent']['subject'])) {
    3964. -
    3965.       $this->rdf_parser['top']['parent']['subject']='';
    3966. -
    3967.     }
    3968. -
    3969.     if(!isset($this->rdf_parser['top']['parent']['bag_id'])) {
    3970. -
    3971.       $this->rdf_parser['top']['parent']['bag_id']='';
    3972. -
    3973.     }
    3974. -
    3975.     if(!isset($this->rdf_parser['top']['parent']['statements'])) {
    3976. -
    3977.       $this->rdf_parser['top']['parent']['statements']=0;
    3978. -
    3979.     }
    3980. -
    3981.     if(!isset($this->rdf_parser['top']['predicate'])) {
    3982. -
    3983.       $this->rdf_parser['top']['predicate']='';
    3984. -
    3985.     }
    3986. -
    3987.     if(!isset($this->rdf_parser['top']['datatype'])) {
    3988. -
    3989.       $this->rdf_parser['top']['datatype']='';
    3990. -
    3991.     }
    3992. -
    3993.     if(!isset($this->rdf_parser['top']['ordinal'])) {
    3994. -
    3995.       $this->rdf_parser['top']['ordinal']=0;
    3996. -
    3997.     }
    3998. -
    3999.     $this->_report_statement(
    4000. -
    4001.         $this->rdf_parser['top']['parent']['subject_type'],
    4002. -
    4003.         $this->rdf_parser['top']['parent']['subject'],
    4004. -
    4005.         $this->rdf_parser['top']['predicate'],
    4006. -
    4007.         $this->rdf_parser['top']['ordinal'],
    4008. -
    4009.         RDF_OBJECT_TYPE_LITERAL,
    4010. -
    4011.         $this->rdf_parser['top']['data'],
    4012. -
    4013.         $this->rdf_parser['top']['xml_lang'],
    4014. -
    4015.         $this->rdf_parser['top']['parent']['bag_id'],
    4016. -
    4017.         $this->rdf_parser['top']['parent']['statements'],
    4018. -
    4019.         $this->rdf_parser['top']['statement_id']
    4020. -
    4021.         $this->rdf_parser['top']['datatype']);
    4022. -
    4023.  
    4024. -
    4025. }
    4026. -
    4027.  
    4028. -
    4029. /**
    4030. -
    4031.    * @param string $parser 
    4032. -
    4033.    * @param string $name 
    4034. -
    4035.    * @access    private
    4036. -
    4037. */ 
    4038. -
    4039. function _end_element_handler$parser$name )
    4040. -
    4041. {
    4042. -
    4043.     switch$this->rdf_parser['top']['state')
    4044. -
    4045.     {
    4046. -
    4047.     case IN_TOP_LEVEL:
    4048. -
    4049.         break;     
    4050. -
    4051.     case IN_XML:
    4052. -
    4053.         $this->_handle_xml_end_element($name);                
    4054. -
    4055.         break;
    4056. -
    4057.     case IN_PROPERTY_UNKNOWN_OBJECT:        
    4058. -
    4059.     case IN_PROPERTY_LITERAL:
    4060. -
    4061.         $this->_end_literal_property);
    4062. -
    4063.         break;
    4064. -
    4065. -
    4066.         $this->_pop_element(  );
    4067. -
    4068.         break;
    4069. -
    4070. -
    4071. //        $search =  array((0) => chr(10), (1) => chr(13), (2) => chr(9));
    4072. -
    4073. //        $replace = array((0) => '\n'   , (1) => '\r'   , (2) => '\t');
    4074. -
    4075. //        $this->rdf_parser["xml_literal"]["buffer"] 
    4076. -
    4077. //            = str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]);
    4078. -
    4079.  
    4080. -
    4081.         $this->rdf_parser['top']['data'$this->rdf_parser['xml_literal']['buffer'];
    4082. -
    4083.         $this->_end_literal_property();     
    4084. -
    4085.         $this->rdf_parser['xml_literal']['buffer''';    
    4086. -
    4087.        
    4088. -
    4089.         break;
    4090. -
    4091. -
    4092.         $this->_end_collection();
    4093. -
    4094.         break;      
    4095. -
    4096.     case IN_RDF:
    4097. -
    4098.     case IN_DESCRIPTION:
    4099. -
    4100.     case IN_PROPERTY_RESOURCE:
    4101. -
    4102. -
    4103.     case IN_UNKNOWN:
    4104. -
    4105.         break;
    4106. -
    4107.     }
    4108. -
    4109.  
    4110. -
    4111.     $this->_pop_element();
    4112. -
    4113. }
    4114. -
    4115.  
    4116. -
    4117. /**
    4118. -
    4119.    * @param string $parser 
    4120. -
    4121.    * @param string $s 
    4122. -
    4123.    * @access    private
    4124. -
    4125. */ 
    4126. -
    4127. function _character_data_handler$parser,$s)
    4128. -
    4129. {
    4130. -
    4131.     $len=strlen($s);
    4132. -
    4133.     switch$this->rdf_parser['top']['state')
    4134. -
    4135.     {
    4136. -
    4137.     case IN_PROPERTY_LITERAL:  
    4138. -
    4139. -
    4140.         ifisset($this->rdf_parser['top']['data']) )
    4141. -
    4142.         {
    4143. -
    4144.             $n strlen$this->rdf_parser['top']['data');
    4145. -
    4146.             $this->rdf_parser['top']['data'].= $s;
    4147. -
    4148.  
    4149. -
    4150.         }
    4151. -
    4152.         else
    4153. -
    4154.         {
    4155. -
    4156.             $this->rdf_parser['top']['data']=$s;
    4157. -
    4158.         }
    4159. -
    4160.  
    4161. -
    4162.         if$this->rdf_parser['top']['state'== IN_PROPERTY_UNKNOWN_OBJECT )
    4163. -
    4164.         {
    4165. -
    4166.             /* look for non-whitespace */
    4167. -
    4168.             for$i 0(( $i $len && (  ereg(" |\n|\t",$s$i }) ))$i++ );            
    4169. -
    4170.             /* if we found non-whitespace, this is a literal */
    4171. -
    4172.             if$i $len )
    4173. -
    4174.             {
    4175. -
    4176.                 $this->rdf_parser['top']['state'IN_PROPERTY_LITERAL;
    4177. -
    4178.             }
    4179. -
    4180.         }
    4181. -
    4182.  
    4183. -
    4184.         break;
    4185. -
    4186.     case IN_TOP_LEVEL:  
    4187. -
    4188.         break;
    4189. -
    4190.     case IN_PROPERTY_PARSE_TYPE_LITERAL:     
    4191. -
    4192.     case IN_XML:                 
    4193. -
    4194.         $this->rdf_parser['xml_literal']['buffer'.= $s;
    4195. -
    4196.         break;           
    4197. -
    4198.     case IN_RDF:
    4199. -
    4200.     case IN_DESCRIPTION:
    4201. -
    4202.     case IN_PROPERTY_RESOURCE:
    4203. -
    4204. -
    4205. -
    4206.     case IN_UNKNOWN:
    4207. -
    4208.         break;
    4209. -
    4210.     }
    4211. -
    4212. }
    4213. -
    4214.  
    4215. -
    4216.  
    4217. -
    4218.   /**
    4219. -
    4220.    * Adds a new statement to the model
    4221. -
    4222.    * This method is called by generateModel().
    4223. -
    4224.    *
    4225. -
    4226.    * @access    private
    4227. -
    4228.    * @param    string    &$user_data 
    4229. -
    4230.    * @param    string    $subject_type 
    4231. -
    4232.    * @param    string    $subject 
    4233. -
    4234.    * @param    string    $predicate 
    4235. -
    4236.    * @param    string    $ordinal 
    4237. -
    4238.    * @param    string    $object_type 
    4239. -
    4240.    * @param    string    $object 
    4241. -
    4242.    * @param    string    $xml_lang )
    4243. -
    4244.    * @return    object MemModel 
    4245. -
    4246.    */  
    4247. -
    4248. function add_statement_to_model(
    4249. -
    4250.     &$user_data,
    4251. -
    4252.     $subject_type,
    4253. -
    4254.     $subject,
    4255. -
    4256.     $predicate,
    4257. -
    4258.     $ordinal,
    4259. -
    4260.     $object_type,
    4261. -
    4262.     $object,
    4263. -
    4264.     $xml_lang,
    4265. -
    4266.     $datatype )
    4267. -
    4268. {
    4269. -
    4270.  
    4271. -
    4272.     // ParseUnicode
    4273. -
    4274.     if(UNIC_RDF){
    4275. -
    4276.         $subject=$this->str2unicode_nfc($subject);
    4277. -
    4278.         $predicate=$this->str2unicode_nfc($predicate);
    4279. -
    4280.         $object=$this->str2unicode_nfc($object);
    4281. -
    4282.     }
    4283. -
    4284.     
    4285. -
    4286.     //create subject
    4287. -
    4288.     if ($subject_type == RDF_SUBJECT_TYPE_BNODE
    4289. -
    4290.             $objsub new BlankNode($subject);
    4291. -
    4292.         else
    4293. -
    4294.             $objsub new Resource($subject);
    4295. -
    4296.          
    4297. -
    4298.     // create predicate    
    4299. -
    4300.     $objpred new Resource($predicate);
    4301. -
    4302.     
    4303. -
    4304.     // create object
    4305. -
    4306.     if (($object_type == RDF_OBJECT_TYPE_RESOURCE|| ($object_type == RDF_OBJECT_TYPE_BNODE)) {
    4307. -
    4308.             if ($object_type == RDF_OBJECT_TYPE_BNODE
    4309. -
    4310.                     $objobj new BlankNode($object);
    4311. -
    4312.                 else
    4313. -
    4314.                     $objobj new Resource($object);        
    4315. -
    4316.     else {
    4317. -
    4318.    
    4319. -
    4320.         $objobj new Literal($object);
    4321. -
    4322.         if ($datatype != ''{
    4323. -
    4324.             $objobj->setDatatype($datatype);
    4325. -
    4326.         }    
    4327. -
    4328.         elseif ($xml_lang !=''{
    4329. -
    4330.             $objobj->setLanguage($xml_lang);
    4331. -
    4332.         }     
    4333. -
    4334.     }
    4335. -
    4336.  
    4337. -
    4338.     // create statement
    4339. -
    4340.     $statement new Statement($objsub$objpred$objobj);
    4341. -
    4342.     
    4343. -
    4344.     // add statement to model
    4345. -
    4346.     if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){
    4347. -
    4348.         $this->model->addWithoutDuplicates($statement);
    4349. -
    4350.     }else 
    4351. -
    4352.         $this->model->add($statement);
    4353. -
    4354.     }
    4355. -
    4356.  
    4357. -
    4358.  
    4359. -
    4360. /* public functions */
    4361. -
    4362.  
    4363. -
    4364.   /**
    4365. -
    4366.    * Generates a new MemModel from a URI, a file or from memory.
    4367. -
    4368.    * If you want to parse an RDF document, pass the URI or location in the filesystem
    4369. -
    4370.    * of the RDF document. You can also pass RDF code direct to the function. If you pass
    4371. -
    4372.    * RDF code directly to the parser and there is no xml:base included, you should set
    4373. -
    4374.    * the base URI manually using the optional second parameter $rdfBaseURI.
    4375. -
    4376.    * Make sure that here are proper namespace declarations in your input document.
    4377. -
    4378.    *
    4379. -
    4380.    * @access    public
    4381. -
    4382.    * @param        string     $base 
    4383. -
    4384.    * @param     boolean  $rdfBaseURI 
    4385. -
    4386.    * @return    object MemModel 
    4387. -
    4388.    */  
    4389. -
    4390. function generateModel($base,$rdfBaseURI false$model false{
    4391. -
    4392.  
    4393. -
    4394.     // Check if $base is a URI or filename or a string containing RDF code.
    4395. -
    4396.     if (substr(ltrim($base),,1!= '<'{
    4397. -
    4398.     
    4399. -
    4400.     // $base is URL or filename
    4401. -
    4402.     $this->model $model?$model:new MemModel($base);
    4403. -
    4404.     
    4405. -
    4406.     $input fopen($base,'r'or die("RDF ParserCould not open File$baseStopped parsing.");
    4407. -
    4408.     $this->rdf_parser_createNULL );
    4409. -
    4410.     $this->rdf_set_base($base);
    4411. -
    4412.     $done=false;
    4413. -
    4414.     while(!$done)
    4415. -
    4416.     {
    4417. -
    4418.       $buf fread$input512 );
    4419. -
    4420.       $done feof($input);
    4421. -
    4422.     
    4423. -
    4424.       if $this->rdf_parse$buffeof($input) ) )
    4425. -
    4426.       {
    4427. -
    4428.         $err_code xml_get_error_code$this->rdf_get_xml_parser());
    4429. -
    4430.         $line xml_get_current_line_number($this->rdf_get_xml_parser() );
    4431. -
    4432.         $errmsg RDFAPI_ERROR '(class: parser; method: generateModel): XML-parser-error ' $err_code .' in Line ' $line .' of input document.';
    4433. -
    4434.         trigger_error($errmsgE_USER_ERROR);
    4435. -
    4436.       }
    4437. -
    4438.     
    4439. -
    4440.     /* close file. */
    4441. -
    4442.     fclose$input );
    4443. -
    4444.     
    4445. -
    4446.     else {
    4447. -
    4448.     // $base is RDF string
    4449. -
    4450.     $this->model $model?$model:new MemModel($base);
    4451. -
    4452.     
    4453. -
    4454.     $this->rdf_parser_createNULL );
    4455. -
    4456.     
    4457. -
    4458.     if ($rdfBaseURI!==false)
    4459. -
    4460.     {
    4461. -
    4462.         $this->rdf_set_base($rdfBaseURI);
    4463. -
    4464.     else
    4465. -
    4466.     {
    4467. -
    4468.         $this->rdf_set_baseNULL );
    4469. -
    4470.     }
    4471. -
    4472.     
    4473. -
    4474.       if $this->rdf_parse$baseTRUE ) )
    4475. -
    4476.       {
    4477. -
    4478.         $err_code xml_get_error_code$this->rdf_get_xml_parser());
    4479. -
    4480.         $line xml_get_current_line_number($this->rdf_get_xml_parser() );
    4481. -
    4482.         $errmsg RDFAPI_ERROR '(class: parser; method: generateModel): XML-parser-error ' $err_code .' in Line ' $line .' of input document.';
    4483. -
    4484.         trigger_error($errmsgE_USER_ERROR)
    4485. -
    4486.       }
    4487. -
    4488.     }
    4489. -
    4490.     // base_uri could have changed while parsing
    4491. -
    4492.     $this->model->setBaseURI($this->rdf_parser['base_uri']);
    4493. -
    4494.  
    4495. -
    4496.     if(isset($this->rdf_parser['namespaces'])){
    4497. -
    4498.         $this->model->addParsedNamespaces($this->rdf_parser['namespaces']);
    4499. -
    4500.     }
    4501. -
    4502.     
    4503. -
    4504.     $this->rdf_parser_free();
    4505. -
    4506.     
    4507. -
    4508.     return $this->model;    
    4509. -
    4510.  
    4511. -
    4512. }
    4513. -
    4514.  
    4515. -
    4516. /**
    4517. -
    4518.  * @param        string     $encoding 
    4519. -
    4520.  
    4521. -
    4522.  * @access    private
    4523. -
    4524. */ 
    4525. -
    4526. function rdf_parser_create$encoding )
    4527. -
    4528. {
    4529. -
    4530.  
    4531. -
    4532.     $parser xml_parser_create_ns$encodingNAMESPACE_SEPARATOR_CHAR );
    4533. -
    4534.  
    4535. -
    4536.     xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0)
    4537. -
    4538.     $this->rdf_parser['xml_parser'$parser;
    4539. -
    4540.  
    4541. -
    4542.     xml_set_object($this->rdf_parser['xml_parser']$this);
    4543. -
    4544.     xml_set_element_handler$this->rdf_parser['xml_parser']'_start_element_handler''_end_element_handler' );
    4545. -
    4546.     xml_set_character_data_handler$this->rdf_parser['xml_parser']'_character_data_handler' );
    4547. -
    4548.     xml_set_start_namespace_decl_handler($this->rdf_parser['xml_parser']'_start_ns_declaration_handler');
    4549. -
    4550.  
    4551. -
    4552.     return $this->rdf_parser;
    4553. -
    4554. }
    4555. -
    4556.  
    4557. -
    4558. /**
    4559. -
    4560.  * @param    resource    &$parser 
    4561. -
    4562.  * @param   string        $ns_prefix 
    4563. -
    4564.  * @param    string        $ns_uri 
    4565. -
    4566.  * @access    private
    4567. -
    4568. */ 
    4569. -
    4570. function _start_ns_declaration_handler(&$parser$ns_prefix$ns_uri)
    4571. -
    4572. {
    4573. -
    4574.     if (!$ns_prefix
    4575. -
    4576.         $this->rdf_parser['default_namespace'$ns_uri;
    4577. -
    4578.     else        
    4579. -
    4580.         $this->rdf_parser['namespaces'][$ns_uri$ns_prefix;
    4581. -
    4582. }
    4583. -
    4584.  
    4585. -
    4586.  
    4587. -
    4588. /**
    4589. -
    4590.  * @access    private
    4591. -
    4592. */ 
    4593. -
    4594. function rdf_parser_free)
    4595. -
    4596. {
    4597. -
    4598.     $z=3;
    4599. -
    4600.  
    4601. -
    4602.     $this->rdf_parser['base_uri']='';
    4603. -
    4604.     $this->rdf_parser['document_base_uri''';                    
    4605. -
    4606.  
    4607. -
    4608.     unset$this->rdf_parser );
    4609. -
    4610. }
    4611. -
    4612.  
    4613. -
    4614. /**
    4615. -
    4616.    * @param        string     $s 
    4617. -
    4618.    * @param        string     $is_final 
    4619. -
    4620.  * @access    private
    4621. -
    4622. */ 
    4623. -
    4624. function rdf_parse$s$is_final )
    4625. -
    4626. {
    4627. -
    4628.     return XML_Parse$this->rdf_parser['xml_parser']$s$is_final );
    4629. -
    4630. }
    4631. -
    4632.  
    4633. -
    4634. /**
    4635. -
    4636.  * @access    private
    4637. -
    4638. */ 
    4639. -
    4640. function rdf_get_xml_parser()
    4641. -
    4642. {
    4643. -
    4644.     return $this->rdf_parser['xml_parser']);
    4645. -
    4646. }
    4647. -
    4648.  
    4649. -
    4650. /**
    4651. -
    4652.    * @param        string     $base 
    4653. -
    4654.  * @access    private
    4655. -
    4656. */ 
    4657. -
    4658. function rdf_set_base($base )
    4659. -
    4660. {
    4661. -
    4662.     
    4663. -
    4664.     $this->rdf_parser['base_uri']=$base;
    4665. -
    4666.     
    4667. -
    4668.     $c substr($basestrlen($base)-,1);
    4669. -
    4670.     if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    4671. -
    4672.          $this->rdf_parser['normalized_base_uri'$base '#';
    4673. -
    4674.     else
    4675. -
    4676.         $this->rdf_parser['normalized_base_uri'$base
    4677. -
    4678.  
    4679. -
    4680.     return 0;
    4681. -
    4682. }
    4683. -
    4684.  
    4685. -
    4686. /**
    4687. -
    4688.  * @access    private
    4689. -
    4690. */ 
    4691. -
    4692. function rdf_get_base()
    4693. -
    4694. {
    4695. -
    4696.         if ($this->rdf_parser['top']['element_base_uri'])
    4697. -
    4698.             return $this->rdf_parser['top']['element_base_uri'];
    4699. -
    4700.         else 
    4701. -
    4702.             return $this->rdf_parser['base_uri'];                          
    4703. -
    4704. }
    4705. -
    4706.  
    4707. -
    4708.  
    4709. -
    4710. // end: rdf_parser
    4711. -
    4712.  
    4713. -
    4714. ?>
    4715. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base deleted file mode 100755 index 084cf7cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRdfSerializer.php.html.svn-base +++ /dev/null @@ -1,740 +0,0 @@ - - - - - - File Source for RdfSerializer.php - - - - - -

    Source for file RdfSerializer.php

    -

    Documentation is available at RdfSerializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: RdfSerializer
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * An RDF seralizer.
    18. -
    19. * Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and
    20. -
    21. * rdf:nodeID directive.
    22. -
    23. * You can choose between different output syntaxes by using the configuration methods
    24. -
    25. * or changing the configuration default values in constants.php.
    26. -
    27. * This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.
    28. -
    29. *
    30. -
    31. @version  $Id$
    32. -
    33. @author Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
    34. -
    35. *
    36. -
    37. @package syntax
    38. -
    39. @access  public
    40. -
    41. *
    42. -
    43. */
    44. -
    45. class RdfSerializer extends Object {
    46. -
    47.  
    48. -
    49.     // configuration
    50. -
    51.     var $use_entities;
    52. -
    53.     var $use_attributes;
    54. -
    55.     var $sort_model;
    56. -
    57.     var $rdf_qnames;
    58. -
    59.     var $use_xml_declaration;
    60. -
    61.  
    62. -
    63.     // properties
    64. -
    65.     var  $m_defaultNamespaces  = array();
    66. -
    67.     var  $m_namespaces = array();
    68. -
    69. -
    70.     var  $m_out;
    71. -
    72.     var  $m_baseURI;
    73. -
    74.     var  $m_statements = array();
    75. -
    76.     var  $m_currentSubject;
    77. -
    78.     var  $m_rdfIDElementText;
    79. -
    80.     var  $m_rdfAboutElementText;
    81. -
    82. -
    83.     var  $m_groupTypeStatement;
    84. -
    85.     var  $m_attributeStatements = array();
    86. -
    87.     var  $m_contentStatements = array();
    88. -
    89.     var  $rdf_qname_prefix;
    90. -
    91.  
    92. -
    93.     /**
    94. -
    95.     * Constructor
    96. -
    97.     *
    98. -
    99.     * @access   public
    100. -
    101.     */
    102. -
    103.     function RdfSerializer({
    104. -
    105.  
    106. -
    107.         // default serializer configuration
    108. -
    109.         $this->use_entities = SER_USE_ENTITIES;
    110. -
    111.         $this->use_attributes = SER_USE_ATTRIBUTES;
    112. -
    113.         $this->sort_model = SER_SORT_MODEL;
    114. -
    115.         $this->rdf_qnames = SER_RDF_QNAMES;
    116. -
    117.         $this->use_xml_declaration = SER_XML_DECLARATION;
    118. -
    119.  
    120. -
    121.         global $default_prefixes;
    122. -
    123.         foreach($default_prefixes as $key => $value){
    124. -
    125.             $this->addNamespacePrefix($key,$value);
    126. -
    127.         }
    128. -
    129.  
    130. -
    131.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    132. -
    133.     }
    134. -
    135.  
    136. -
    137.     /**
    138. -
    139.     * Serializer congiguration: Sort Model
    140. -
    141.     * Flag if the serializer should sort the model by subject before serializing.
    142. -
    143.     * TRUE makes the RDF code more compact.
    144. -
    145.     * TRUE is default. Default can be changed in constants.php.
    146. -
    147.     *
    148. -
    149.     * @param     boolean 
    150. -
    151.     * @access    public
    152. -
    153.     */
    154. -
    155.     function configSortModel($bool{
    156. -
    157.         $this->sort_model = $bool;
    158. -
    159.     }
    160. -
    161.  
    162. -
    163.     /**
    164. -
    165.     * Serializer congiguration: Use Entities
    166. -
    167.     * Flag if the serializer should use entities for URIs.
    168. -
    169.     * TRUE makes the RDF code more compact.
    170. -
    171.     * FALSE is default. Default can be changed in constants.php.
    172. -
    173.     *
    174. -
    175.     * @param     boolean 
    176. -
    177.     * @access    public
    178. -
    179.     */
    180. -
    181.     function configUseEntities($bool{
    182. -
    183.         $this->use_entities = $bool;
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     /**
    190. -
    191.     * Serializer congiguration: Use Attributes
    192. -
    193.     * Flag if the serializer should serialize triples as XML attributes where possible.
    194. -
    195.     * TRUE makes the RDF code more compact.
    196. -
    197.     * FALSE is default. Default can be changed in constants.php.
    198. -
    199.     *
    200. -
    201.     * @param     boolean 
    202. -
    203.     * @access    public
    204. -
    205.     */
    206. -
    207.     function configUseAttributes($bool{
    208. -
    209.         $this->use_attributes = $bool;
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     /**
    216. -
    217.     * Serializer congiguration: Use Qnames
    218. -
    219.     * Flag if the serializer should use qualified names for RDF reserved words.
    220. -
    221.     * TRUE makes the RDF code more compact.
    222. -
    223.     * TRUE is default. Default can be changed in constants.php.
    224. -
    225.     *
    226. -
    227.     * @param     boolean 
    228. -
    229.     * @access    public
    230. -
    231.     */
    232. -
    233.     function configUseQnames($bool{
    234. -
    235.         $this->rdf_qnames = $bool;
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Serializer congiguration: Use XML Declaration
    244. -
    245.     * Flag if the serializer should start documents with the xml declaration
    246. -
    247.     * <?xml version="1.0" encoding="UTF-8" ?>.
    248. -
    249.     * TRUE is default. Default can be changed in constants.php.
    250. -
    251.     *
    252. -
    253.     * @param             boolean 
    254. -
    255.     * @access    public
    256. -
    257.     */
    258. -
    259.     function configUseXmlDeclaration($bool{
    260. -
    261.         $this->use_xml_declaration = $bool;
    262. -
    263.     }
    264. -
    265.  
    266. -
    267.  
    268. -
    269.     /**
    270. -
    271.     * Adds a new prefix/namespace combination.
    272. -
    273.     *
    274. -
    275.     * @param     String $prefix 
    276. -
    277.     * @param     String $namespace 
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function addNamespacePrefix($prefix$namespace{
    284. -
    285.         $this->m_defaultNamespaces[$prefix$namespace;
    286. -
    287.     }
    288. -
    289.  
    290. -
    291.     /**
    292. -
    293.     * Serializes a model to RDF syntax.
    294. -
    295.     * RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean),
    296. -
    297.     * config_sort_model($boolean).
    298. -
    299.     * NOTE: There is only one default namespace allowed within an XML document.
    300. -
    301.     *       Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass
    302. -
    303.     *       another $xml_default_namespace as parameter, the model will be serialized
    304. -
    305.     *       as if SER_RDF_QNAMES were set to TRUE.
    306. -
    307.     *
    308. -
    309.     * @param     object MemModel $model 
    310. -
    311.     * @param     String $encoding 
    312. -
    313.     * @return    string 
    314. -
    315.     * @access    public
    316. -
    317.     */
    318. -
    319.     function serialize(&$model$xml_default_namespace NULL$encoding DEFAULT_ENCODING{
    320. -
    321.  
    322. -
    323.         if ($xml_default_namespace{
    324. -
    325.  
    326. -
    327.             if ($xml_default_namespace == RDF_NAMESPACE_URI{
    328. -
    329.                 $this->rdf_qnames = FALSE;
    330. -
    331.                 unset($this->m_defaultNamespaces[RDF_NAMESPACE_PREFIX]);
    332. -
    333.             }
    334. -
    335.             elseif ($xml_default_namespace == RDF_SCHEMA_URI{
    336. -
    337.                 unset($this->m_defaultNamespaces[RDF_SCHEMA_PREFIX]);
    338. -
    339.             }
    340. -
    341.             elseif (!SER_RDF_QNAMES)
    342. -
    343.             $this->rdf_qnames = TRUE;
    344. -
    345.  
    346. -
    347.             $this->addNamespacePrefix(NULL$xml_default_namespace);
    348. -
    349.         }
    350. -
    351.  
    352. -
    353.         //copy parsed namespaces
    354. -
    355.         $nsps array();
    356. -
    357.         $nsps $model->getParsedNamespaces();
    358. -
    359.         foreach($this->m_defaultNamespaces as $prefix => $namespace){
    360. -
    361.             if(!isset ($nsps[$namespace]))
    362. -
    363.             $nsps[$namespace$prefix;
    364. -
    365.         }
    366. -
    367.  
    368. -
    369.         // define rdf prefix (qname or not)
    370. -
    371.         if ($this->rdf_qnames){
    372. -
    373.             if(isset($nsps[RDF_NAMESPACE_URI])){
    374. -
    375.                 $this->rdf_qname_prefix = $nsps[RDF_NAMESPACE_URI].':';
    376. -
    377.             }else{
    378. -
    379.                 $this->rdf_qname_prefix = RDF_NAMESPACE_PREFIX ':';
    380. -
    381.             }
    382. -
    383.  
    384. -
    385.         }else{
    386. -
    387.             $this->rdf_qname_prefix = '';
    388. -
    389.         }
    390. -
    391.         // check if model is empty
    392. -
    393.         if ($model->size(== 0return "<"$this->rdf_qname_prefix . RDF_RDF ." xmlns:rdf='".RDF_NAMESPACE_URI."' />";
    394. -
    395.  
    396. -
    397.         foreach($nsps as $ns => $pre){
    398. -
    399.             $this->m_namespaces[$pre$ns;
    400. -
    401.         }
    402. -
    403.  
    404. -
    405.  
    406. -
    407.         // set base URI
    408. -
    409.         if ($model->getBaseURI()==NULL)
    410. -
    411.         $this->m_baseURI="opaque:uri";
    412. -
    413.         else
    414. -
    415.         $this->m_baseURI=$model->getBaseURI();
    416. -
    417.  
    418. -
    419.  
    420. -
    421.         if ($this->sort_model{
    422. -
    423.             // sort the array of statements
    424. -
    425.  
    426. -
    427.             foreach($model->triples as $key => $statement{
    428. -
    429.                 $stmkey $statement->subj->getURI(.
    430. -
    431.                 $statement->pred->getURI(.
    432. -
    433.                 (is_a($statement->obj,'Literal')?'"'.$statement->obj->getLabel().'"@'.$statement->obj->getLanguage().'^^'.$statement->obj->getDatatype():$statement->obj->getURI());
    434. -
    435.                 $this->m_statements[$stmkey$statement;
    436. -
    437.             }
    438. -
    439.             ksort($this->m_statements);
    440. -
    441.  
    442. -
    443.             /*
    444. -
    445.             // Sort using the PHP usort() function. Slower :-(
    446. -
    447.             $this->m_statements = $model->triples;
    448. -
    449.             usort($this->m_statements, "statementsorter");
    450. -
    451.             */
    452. -
    453.         else {
    454. -
    455.             $this->m_statements = $model->triples;
    456. -
    457.         }
    458. -
    459.         // collects namespaces
    460. -
    461.         $this->m_nextAutomaticPrefixIndex=0;
    462. -
    463.         $this->collectNamespaces($model);
    464. -
    465.  
    466. -
    467.         // start writing the contents
    468. -
    469.         $this->m_out="";
    470. -
    471.         if ($this->use_xml_declaration)
    472. -
    473.         $this->m_out .= '<?xml version="1.0" encoding="' $encoding '" ?>' LINEFEED;
    474. -
    475.         if (!HIDE_ADVERTISE)
    476. -
    477.         $this->m_out.="<!-- Generated by RdfSerializer.php from RDF RAP.".LINEFEED."# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html !-->".LINEFEED.LINEFEED ;
    478. -
    479.  
    480. -
    481.         // write entitie declarations
    482. -
    483.         if($this->use_entities{
    484. -
    485.             $this->m_out .= '<!DOCTYPE ' $this->rdf_qname_prefix .
    486. -
    487.             RDF_RDF.' [' LINEFEED;
    488. -
    489.             $this->writeEntityDeclarations();
    490. -
    491.             $this->m_out .= LINEFEED ']>' LINEFEED;
    492. -
    493.         }
    494. -
    495.  
    496. -
    497.         // start the RDF text
    498. -
    499.         $this->m_out .= '<' $this->rdf_qname_prefix . RDF_RDF;
    500. -
    501.  
    502. -
    503.         // write the xml:base
    504. -
    505.         if ($model->getBaseURI(!= NULL)
    506. -
    507.         $this->m_out .= LINEFEEDINDENTATION .'xml:base="'.$model->getBaseURI().'"';
    508. -
    509.  
    510. -
    511.         // write namespaces declarations
    512. -
    513.         $this->writeNamespaceDeclarations();
    514. -
    515.         $this->m_out .='>'LINEFEED;
    516. -
    517.  
    518. -
    519.         // write triples
    520. -
    521.         $this->writeDescriptions();
    522. -
    523.  
    524. -
    525.         $this->m_out .= LINEFEED;
    526. -
    527.         $this->m_out .='</' $this->rdf_qname_prefix . RDF_RDF .'>';
    528. -
    529.  
    530. -
    531.         $this->m_namespaces=null;
    532. -
    533.         $this->m_statements=null;
    534. -
    535.         $this->m_currentSubject=null;
    536. -
    537.         $this->m_groupTypeStatement=null;
    538. -
    539.         $this->m_attributeStatements=null;
    540. -
    541.         $this->m_contentStatements=null;
    542. -
    543.         $this->m_rdfResourceElementText=null;
    544. -
    545.  
    546. -
    547.         return $this->m_out;
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     /**
    554. -
    555.     * Serializes a model and saves it into a file.
    556. -
    557.     * Returns FALSE if the model couldn't be saved to the file.
    558. -
    559.     *
    560. -
    561.     * @param     object MemModel $model 
    562. -
    563.     * @param     String $encoding 
    564. -
    565.     * @return    boolean 
    566. -
    567.     * @access    public
    568. -
    569.     */
    570. -
    571.     function  saveAs(&$model$filename$encoding DEFAULT_ENCODING{
    572. -
    573.         // serialize model
    574. -
    575.         $RDF $this->serialize($modelNULL$encoding);
    576. -
    577.  
    578. -
    579.         //write serialized model to file
    580. -
    581.         $file_handle @fopen($filename'w');
    582. -
    583.         if ($file_handle{
    584. -
    585.             fwrite($file_handle$RDF);
    586. -
    587.             fclose($file_handle);
    588. -
    589.             return TRUE;
    590. -
    591.         else {
    592. -
    593.             return FALSE;
    594. -
    595.         };
    596. -
    597.     }
    598. -
    599.  
    600. -
    601.     /**
    602. -
    603.     * @access   private
    604. -
    605.     */
    606. -
    607.     function writeEntityDeclarations({
    608. -
    609.         foreach($this->m_namespaces as $prefix => $namespace{
    610. -
    611.             $this->m_out .= INDENTATION '<!ENTITY '$prefix " '" $namespace ."'>".LINEFEED;
    612. -
    613.         }
    614. -
    615.     }
    616. -
    617.  
    618. -
    619.     /**
    620. -
    621.     * @access   private
    622. -
    623.     */
    624. -
    625.     function writeNamespaceDeclarations({
    626. -
    627.         foreach($this->m_namespaces as $prefix => $namespace{
    628. -
    629.  
    630. -
    631.             if ($prefix == RDF_NAMESPACE_PREFIX && !$this->rdf_qnames{
    632. -
    633.  
    634. -
    635.                 if($this->use_entities{
    636. -
    637.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
    638. -
    639.                     '="&' $prefix ';"';
    640. -
    641.                 else {
    642. -
    643.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
    644. -
    645.                     '="' $namespace '"';
    646. -
    647.                 }
    648. -
    649.             else {
    650. -
    651.                 if ($prefix == NULL)
    652. -
    653.                 $colon_prefix $prefix;
    654. -
    655.                 else
    656. -
    657.                 $colon_prefix ":" .$prefix;
    658. -
    659.  
    660. -
    661.                 if($this->use_entities{
    662. -
    663.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
    664. -
    665.                     .$colon_prefix .'="&' $prefix ';"';
    666. -
    667.                 else {
    668. -
    669.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
    670. -
    671.                     .$colon_prefix .'="' $namespace '"';
    672. -
    673.                 }
    674. -
    675.             }
    676. -
    677.         }
    678. -
    679.     }
    680. -
    681.  
    682. -
    683.     /**
    684. -
    685.     * @access   private
    686. -
    687.     */
    688. -
    689.     function writeDescriptions()  {
    690. -
    691.  
    692. -
    693.         $this->m_groupTypeStatement = NULL;
    694. -
    695.         $this->m_attributeStatements = array();
    696. -
    697.         $this->m_contentStatements = array();
    698. -
    699.         $this->m_currentSubject = NULL;
    700. -
    701.  
    702. -
    703.         foreach($this->m_statements as $key => $statement{
    704. -
    705.             $subject $statement->getSubject();
    706. -
    707.             $predicate $statement->getPredicate();
    708. -
    709.             $object $statement->getobject();
    710. -
    711.  
    712. -
    713.             // write Group and update current subject if nessesary
    714. -
    715.             if ($this->m_currentSubject==NULL || !$this->m_currentSubject->equals($subject)) {
    716. -
    717.                 $this->writeGroup();
    718. -
    719.                 $this->m_currentSubject=$subject;
    720. -
    721.             }
    722. -
    723.  
    724. -
    725.             // classify the statement
    726. -
    727.             if (($predicate->getURI(== RDF_NAMESPACE_URI.RDF_TYPE&& is_a($object'Resource'&& !$this->m_groupTypeStatement{
    728. -
    729.                 $this->writeGroup();
    730. -
    731.                 $this->m_groupTypeStatement = $statement;
    732. -
    733.             
    734. -
    735.             elseif ($this->canAbbreviateValue($object&&
    736. -
    737.             $this->use_attributes &&
    738. -
    739.             $this->checkForDoubleAttributes($predicate))
    740. -
    741.             {
    742. -
    743.                 if (is_a($object'Literal')) {
    744. -
    745.                     if ($object->getDatatype(== NULL{
    746. -
    747.                         $this->m_attributeStatements[$statement;
    748. -
    749.                     else {
    750. -
    751.                         $this->m_contentStatements[$statement;
    752. -
    753.                     }
    754. -
    755.                 else {
    756. -
    757.                     $this->m_attributeStatements[$statement;
    758. -
    759.                 }
    760. -
    761.             else {
    762. -
    763.                 $this->m_contentStatements[$statement;
    764. -
    765.             }
    766. -
    767.         }
    768. -
    769.         $this->writeGroup();
    770. -
    771.     }
    772. -
    773.  
    774. -
    775.     /**
    776. -
    777.     * @access   private
    778. -
    779.     */
    780. -
    781.     function writeGroup({
    782. -
    783.         if ($this->m_currentSubject==NULL || ($this->m_groupTypeStatement==NULL && (count($this->m_attributeStatements)==0&& (count($this->m_contentStatements)==0)))
    784. -
    785.         return;
    786. -
    787.         if ($this->m_groupTypeStatement!=NULL)
    788. -
    789.         $outerElementName=$this->getElementText($this->m_groupTypeStatement->obj->getURI());
    790. -
    791.         else
    792. -
    793.         $outerElementName $this->rdf_qname_prefix . RDF_DESCRIPTION;
    794. -
    795.         $this->m_out .= LINEFEED '<';
    796. -
    797.         $this->m_out .= $outerElementName;
    798. -
    799.  
    800. -
    801.         $this->m_out .= ' ';
    802. -
    803.  
    804. -
    805.  
    806. -
    807.         $this->writeSubjectURI($this->m_currentSubject);
    808. -
    809.  
    810. -
    811.         // attribute Statements
    812. -
    813.         if ($this->use_attributes)
    814. -
    815.         $this->writeAttributeStatements();
    816. -
    817.  
    818. -
    819.         if (count($this->m_contentStatements)==0)
    820. -
    821.         $this->m_out .= '/>' LINEFEED;
    822. -
    823.         else {
    824. -
    825.             $this->m_out .= '>' LINEFEED;
    826. -
    827.  
    828. -
    829.             // content statements
    830. -
    831.             $this->writeContentStatements();
    832. -
    833.  
    834. -
    835.             $this->m_out .= '</';
    836. -
    837.             $this->m_out .= $outerElementName;
    838. -
    839.             $this->m_out .= '>'LINEFEED;
    840. -
    841.         }
    842. -
    843.         $this->m_groupTypeStatement = NULL;
    844. -
    845.         $this->m_attributeStatements = array();
    846. -
    847.         $this->m_contentStatements = array();
    848. -
    849.     }
    850. -
    851.  
    852. -
    853.     /**
    854. -
    855.     * @param object Node $predicate 
    856. -
    857.     * @access   private
    858. -
    859.     */
    860. -
    861.     function checkForDoubleAttributes($predicate{
    862. -
    863.         foreach($this->m_attributeStatements as $key => $statement{
    864. -
    865.             if ($statement->pred->equals($predicate))
    866. -
    867.             return FALSE;
    868. -
    869.         }
    870. -
    871.         return TRUE;
    872. -
    873.     }
    874. -
    875.  
    876. -
    877.     /**
    878. -
    879.     * @param STRING $uri 
    880. -
    881.     * @access   private
    882. -
    883.     */
    884. -
    885.     function relativizeURI($uri{
    886. -
    887.         $uri_namespace RDFUtil::guessNamespace($uri);
    888. -
    889.         if ($uri_namespace == $this->m_baseURI{
    890. -
    891.             return RDFUtil::guessName($uri);
    892. -
    893.         else {
    894. -
    895.             return $uri;
    896. -
    897.         }
    898. -
    899.     }
    900. -
    901.  
    902. -
    903.     /**
    904. -
    905.     * @param object Node $subject_node 
    906. -
    907.     *
    908. -
    909.     * @access   private
    910. -
    911.     */
    912. -
    913.  
    914. -
    915.     function writeSubjectURI($subject_node{
    916. -
    917.         $currentSubjectURI $subject_node->getURI();
    918. -
    919.         $relativizedURI $this->relativizeURI($currentSubjectURI);
    920. -
    921.  
    922. -
    923.         // if submitted subject ist a blank node, use rdf:nodeID
    924. -
    925.         if (is_a($this->m_currentSubject'BlankNode')) {
    926. -
    927.             $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
    928. -
    929.             $this->m_out .= '="';
    930. -
    931.             $this->m_out .= $relativizedURI;
    932. -
    933.         else {
    934. -
    935.  
    936. -
    937.  
    938. -
    939.             if (!($relativizedURI == $currentSubjectURI)) {
    940. -
    941.                 $this->m_out .= $this->rdf_qname_prefix . RDF_ID;
    942. -
    943.                 $this->m_out .= '="';
    944. -
    945.                 $this->m_out .= $relativizedURI;
    946. -
    947.             else {
    948. -
    949.                 $this->m_out .= $this->rdf_qname_prefix . RDF_ABOUT;
    950. -
    951.                 $this->m_out .= '="';
    952. -
    953.                 $this->writeAbsoluteResourceReference($relativizedURI);
    954. -
    955.             };
    956. -
    957.         };
    958. -
    959.         $this->m_out .= '"';
    960. -
    961.     }
    962. -
    963.  
    964. -
    965.     /**
    966. -
    967.     * @access   private
    968. -
    969.     */
    970. -
    971.     function writeAttributeStatements({
    972. -
    973.         foreach($this->m_attributeStatements as $key => $statement{
    974. -
    975.             $this->m_out .= LINEFEED;
    976. -
    977.             $this->m_out .= INDENTATION;
    978. -
    979.             $this->m_out .= $this->getElementText($statement->pred->getURI());
    980. -
    981.             $this->m_out .= '=';
    982. -
    983.             $value=$statement->obj->getLabel();
    984. -
    985.             $quote=$this->getValueQuoteType($value);
    986. -
    987.             $this->m_out .= $quote;
    988. -
    989.             $this->m_out .= $value;
    990. -
    991.             $this->m_out .= $quote;
    992. -
    993.         }
    994. -
    995.     }
    996. -
    997.  
    998. -
    999.     /**
    1000. -
    1001.     * @access   private
    1002. -
    1003.     */
    1004. -
    1005.     function writeContentStatements()  {
    1006. -
    1007.         foreach($this->m_contentStatements as $key => $statement{
    1008. -
    1009.             $this->m_out .= INDENTATION;
    1010. -
    1011.             $this->m_out .= '<';
    1012. -
    1013.             $predicateElementText=$this->getElementText($statement->pred->getURI());
    1014. -
    1015.             $this->m_out .= $predicateElementText;
    1016. -
    1017.  
    1018. -
    1019.             if (is_a($statement->obj'Resource')) {
    1020. -
    1021.                 $this->writeResourceReference($statement->obj);
    1022. -
    1023.                 $this->m_out .= '/>' LINEFEED;
    1024. -
    1025.             else {
    1026. -
    1027.                 if(is_a($statement->obj'Literal')) {
    1028. -
    1029.                     if ($statement->obj->getDatatype()!= NULL)
    1030. -
    1031.                     if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI RDF_XMLLITERAL{
    1032. -
    1033.                         $this->m_out .= ' ' RDF_NAMESPACE_PREFIX ':' RDF_PARSE_TYPE '="' RDF_PARSE_TYPE_LITERAL '"';
    1034. -
    1035.                     else {
    1036. -
    1037.                         $this->m_out .= ' ' RDF_NAMESPACE_PREFIX ':' RDF_DATATYPE '="' $statement->obj->getDatatype('"';
    1038. -
    1039.                     }
    1040. -
    1041.                     if ($statement->obj->getLanguage()!= NULL)
    1042. -
    1043.                     $this->m_out .= ' ' XML_NAMESPACE_PREFIX ':' XML_LANG '="' $statement->obj->getLanguage('"';
    1044. -
    1045.                 };
    1046. -
    1047.                 $this->m_out .= '>';
    1048. -
    1049.                 if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI RDF_XMLLITERAL{
    1050. -
    1051.                     $this->m_out .= $statement->obj->getLabel();
    1052. -
    1053.                 else {
    1054. -
    1055.                     $this->writeTextValue($statement->obj->getLabel());
    1056. -
    1057.                 }
    1058. -
    1059.                 $this->m_out .= '</';
    1060. -
    1061.                 $this->m_out .= $predicateElementText;
    1062. -
    1063.                 $this->m_out .= '>' LINEFEED;
    1064. -
    1065.             }
    1066. -
    1067.         }
    1068. -
    1069.     }
    1070. -
    1071.  
    1072. -
    1073.     /**
    1074. -
    1075.     * @param Object $object_node 
    1076. -
    1077.     * @access   private
    1078. -
    1079.     */
    1080. -
    1081.     function writeResourceReference($object_node)  {
    1082. -
    1083.         $rebaseURI $object_node->getURI();
    1084. -
    1085.         $this->m_out .= ' ';
    1086. -
    1087.         if (is_a($object_node'BlankNode')) {
    1088. -
    1089.             $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
    1090. -
    1091.         else {
    1092. -
    1093.             $this->m_out .= $this->rdf_qname_prefix . RDF_RESOURCE;
    1094. -
    1095.         };
    1096. -
    1097.  
    1098. -
    1099.         $this->m_out .= '="';
    1100. -
    1101.         $relativizedURI $this->relativizeURI($rebaseURI);
    1102. -
    1103.         if (!($relativizedURI == $rebaseURI))
    1104. -
    1105.         if (!is_a($object_node'BlankNode'))
    1106. -
    1107.         $this->m_out .= '#' $relativizedURI;
    1108. -
    1109.         else
    1110. -
    1111.         $this->m_out .=  $relativizedURI;
    1112. -
    1113.         else
    1114. -
    1115.         $this->writeAbsoluteResourceReference($rebaseURI);
    1116. -
    1117.         $this->m_out .= '"';
    1118. -
    1119.     }
    1120. -
    1121.  
    1122. -
    1123.  
    1124. -
    1125.     /**
    1126. -
    1127.     * @param String $rebaseURI 
    1128. -
    1129.     * @access   private
    1130. -
    1131.     */
    1132. -
    1133.     function writeAbsoluteResourceReference($rebaseURI{
    1134. -
    1135.         $namespace=RDFUtil::guessNamespace($rebaseURI);
    1136. -
    1137.         $localName=RDFUtil::guessName($rebaseURI);
    1138. -
    1139.         $text=$rebaseURI;
    1140. -
    1141.         if ($namespace!='' and $this->use_entities{
    1142. -
    1143.             $prefixarray_search($namespace$this->m_namespaces);
    1144. -
    1145.             $text='&'.$prefix.';'.$localName;
    1146. -
    1147.         else $text RDFUtil::escapeValue($text);
    1148. -
    1149.         $this->m_out .= $text;
    1150. -
    1151.     }
    1152. -
    1153.  
    1154. -
    1155.     /**
    1156. -
    1157.     * @param STRING $textValue 
    1158. -
    1159.     * @access   private
    1160. -
    1161.     */
    1162. -
    1163.     function writeTextValue($textValue{
    1164. -
    1165.         if ($this->getValueQuoteType($textValue)==USE_CDATA)
    1166. -
    1167.         $this->writeEscapedCDATA($textValue);
    1168. -
    1169.         else
    1170. -
    1171.         $this->m_out .= $textValue;
    1172. -
    1173.     }
    1174. -
    1175.  
    1176. -
    1177.     /**
    1178. -
    1179.     * @param STRING $textValue 
    1180. -
    1181.     * @access   private
    1182. -
    1183.     */
    1184. -
    1185.     function writeEscapedCDATA($textValue{
    1186. -
    1187.         $this->m_out .= '<![CDATA[' $textValue ']]>';
    1188. -
    1189.     }
    1190. -
    1191.  
    1192. -
    1193.     /**
    1194. -
    1195.     * @param STRING $textValue 
    1196. -
    1197.     * @access   private
    1198. -
    1199.     */
    1200. -
    1201.     function getValueQuoteType($textValue{
    1202. -
    1203.         $quote=USE_ANY_QUOTE;
    1204. -
    1205.         $hasBreaks=FALSE;
    1206. -
    1207.         $whiteSpaceOnly=TRUE;
    1208. -
    1209.         for ($i=0$i<strlen($textValue)$i++{
    1210. -
    1211.             $c=$textValue{$i};
    1212. -
    1213.             if ($c=='<' || $c=='>' || $c=='&')
    1214. -
    1215.             return USE_CDATA;
    1216. -
    1217.             if ($c==LINEFEED)
    1218. -
    1219.             $hasBreaks=TRUE;
    1220. -
    1221.             if ($c=='"' || $c=="\'"{
    1222. -
    1223.                 if ($quote==USE_ANY_QUOTE)
    1224. -
    1225.                 $quote=($c=='"'"\'" "\"";
    1226. -
    1227.                 elseif ($c==$quote)
    1228. -
    1229.                 return USE_CDATA;
    1230. -
    1231.             }
    1232. -
    1233.             if (!($c == ' '))
    1234. -
    1235.             $whiteSpaceOnly FALSE;
    1236. -
    1237.         }
    1238. -
    1239.         if ($whiteSpaceOnly || $hasBreaks)
    1240. -
    1241.         return USE_CDATA;
    1242. -
    1243.         return $quote==USE_ANY_QUOTE '"' $quote;
    1244. -
    1245.     }
    1246. -
    1247.  
    1248. -
    1249.     /**
    1250. -
    1251.     * @param object Node $node 
    1252. -
    1253.     * @access   private
    1254. -
    1255.     */
    1256. -
    1257.     function canAbbreviateValue($node{
    1258. -
    1259.         if (is_a($node'Literal')) {
    1260. -
    1261.             $value$node->getLabel();
    1262. -
    1263.             if (strlen($value)<MAX_ALLOWED_ABBREVIATED_LENGTH{
    1264. -
    1265.                 $c=$this->getValueQuoteType($value);
    1266. -
    1267.                 return $c=='"' || $c=='\'';
    1268. -
    1269.             }
    1270. -
    1271.         }
    1272. -
    1273.         return FALSE;
    1274. -
    1275.     }
    1276. -
    1277.  
    1278. -
    1279.     /**
    1280. -
    1281.     * @param STRING $elementName 
    1282. -
    1283.     * @access   private
    1284. -
    1285.     */
    1286. -
    1287.     function getElementText($elementName)  {
    1288. -
    1289.         $namespace=RDFUtil::guessNamespace($elementName);
    1290. -
    1291.         $localName=RDFUtil::guessName($elementName);
    1292. -
    1293.         if ($namespace=="")
    1294. -
    1295.         return $localName;
    1296. -
    1297.         $prefix=array_search($namespace$this->m_namespaces);
    1298. -
    1299.  
    1300. -
    1301.         if ($prefix===FALSE{
    1302. -
    1303.             $errmsg RDFAPI_ERROR "(class: Serializer; method: getElementText): Prefix for element '" $elementName "' cannot be found.";
    1304. -
    1305.             trigger_error($errmsgE_USER_ERROR);
    1306. -
    1307.         }
    1308. -
    1309.         switch ($prefix{
    1310. -
    1311.             case RDF_NAMESPACE_PREFIX:
    1312. -
    1313.             return $this->rdf_qname_prefix . $localName;
    1314. -
    1315.             case NULL:
    1316. -
    1317.             return $localName;
    1318. -
    1319.             default:
    1320. -
    1321.             return $prefix":" .$localName;
    1322. -
    1323.         }
    1324. -
    1325.     }
    1326. -
    1327.  
    1328. -
    1329.     /**
    1330. -
    1331.     * @param object MemModel $model 
    1332. -
    1333.     * @access   private
    1334. -
    1335.     */
    1336. -
    1337.     function collectNamespaces($model)  {
    1338. -
    1339.         foreach($model->triples as $key => $value{
    1340. -
    1341.  
    1342. -
    1343.             if ($this->use_entities{
    1344. -
    1345.                 $this->collectNamespace($value->getSubject());
    1346. -
    1347.                 if(!is_a($value->getObject()'Literal'))
    1348. -
    1349.                 $this->collectNamespace($value->getObject());
    1350. -
    1351.  
    1352. -
    1353.             else {
    1354. -
    1355.  
    1356. -
    1357.                 if  ($value->pred->getURI(== RDF_NAMESPACE_URI.RDF_TYPE)
    1358. -
    1359.                 $this->collectNamespace($value->getObject());
    1360. -
    1361.                 elseif
    1362. -
    1363.                 (($value->pred->getURI(== RDF_NAMESPACE_URI.RDFS_SUBCLASSOF||
    1364. -
    1365.                 ($value->pred->getURI(== RDF_NAMESPACE_URI.RDFS_SUBPROPERTYOF)) {
    1366. -
    1367.                     $this->collectNamespace($value->getSubject());
    1368. -
    1369.                     $this->collectNamespace($value->getObject());
    1370. -
    1371.                 }
    1372. -
    1373.             }
    1374. -
    1375.  
    1376. -
    1377.             $this->collectNamespace($value->getPredicate());
    1378. -
    1379.  
    1380. -
    1381.         }
    1382. -
    1383.     }
    1384. -
    1385.  
    1386. -
    1387.     /**
    1388. -
    1389.     * @param object Resource $resource 
    1390. -
    1391.     * @access   private
    1392. -
    1393.     */
    1394. -
    1395.     function collectNamespace($resource)  {
    1396. -
    1397.  
    1398. -
    1399.         $namespace=RDFUtil::getNamespace($resource);
    1400. -
    1401.         if (!in_array($namespace$this->m_namespaces)&&$namespace!=''{
    1402. -
    1403.             $prefix array_search$namespace$this->m_defaultNamespaces);
    1404. -
    1405.             if ($prefix===FALSE)
    1406. -
    1407.             $prefix=$this->getNextNamespacePrefix();
    1408. -
    1409.             $this->m_namespaces[$prefix$namespace;
    1410. -
    1411.         }
    1412. -
    1413.     }
    1414. -
    1415.  
    1416. -
    1417.     /**
    1418. -
    1419.     * @access   private
    1420. -
    1421.     */
    1422. -
    1423.     function getNextNamespacePrefix({
    1424. -
    1425.         $this->m_nextAutomaticPrefixIndex++;
    1426. -
    1427.         return GENERAL_PREFIX_BASE $this->m_nextAutomaticPrefixIndex;
    1428. -
    1429.     }
    1430. -
    1431.  
    1432. -
    1433. }
    1434. -
    1435. ?>
    1436. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRssParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRssParser.php.html.svn-base deleted file mode 100755 index 600a7dcc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_syntax__syntaxRssParser.php.html.svn-base +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - File Source for RssParser.php - - - - - -

    Source for file RssParser.php

    -

    Documentation is available at RssParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RSS/ATOM Parser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * RSS/ATOM Parser
    18. -
    19.  * 
    20. -
    21.  * This class uses the MagpieRSS Parser by Kellan Elliott-McCrea <kellan@protest.net>. MagpieRSS is
    22. -
    23.  * compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions).
    24. -
    25.  * Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/)
    26. -
    27.  * 
    28. -
    29.  *
    30. -
    31.  *
    32. -
    33.  * @author Tobias Gau <tobias.gauss@web.de>
    34. -
    35.  * @version $Id$
    36. -
    37.  * @package syntax
    38. -
    39.  * @access public
    40. -
    41.  ***/
    42. -
    43.  
    44. -
    45. class RssParser extends Object {
    46. -
    47.     var $type;
    48. -
    49.     
    50. -
    51.     /**
    52. -
    53.     * Main function
    54. -
    55.     *
    56. -
    57.     * @param $url location of the document
    58. -
    59.     * @return parsed model
    60. -
    61.     */
    62. -
    63.     function generateModel($url){
    64. -
    65.         $rss null;
    66. -
    67.         if(substr($url,0,7)=="http://"){
    68. -
    69.             $rss fetch_rss($url);
    70. -
    71.         }else{
    72. -
    73.                 $string file_get_contents($url);
    74. -
    75.                 $rss new MagpieRSS($string);    
    76. -
    77.         }
    78. -
    79.         
    80. -
    81.         $model ModelFactory::getMemModel();    
    82. -
    83.         $bn new Resource($url);
    84. -
    85.         
    86. -
    87.         $this->type = $rss->feed_type;
    88. -
    89.         $version $rss->feed_version;
    90. -
    91.         
    92. -
    93.         $nmsp null;
    94. -
    95.          if($version == "1.0")
    96. -
    97.                   $nmsp "http://purl.org/rss/1.0/";
    98. -
    99.          if($version == "0.91")
    100. -
    101.                   $nmsp "http://my.netscape.com/publish/formats/rss-spec-0.91.html#";
    102. -
    103.          if($version == "2.0")
    104. -
    105.                   $nmsp "http://purl.org/rss/1.0/";
    106. -
    107.          if($this->type == "Atom")
    108. -
    109.                   $nmsp "http://www.w3.org/2005/Atom";
    110. -
    111.           
    112. -
    113.         if($this->type == "Atom")
    114. -
    115.             $this->channel($model,$rss,$bn,$nmsp,"feed");
    116. -
    117.         else 
    118. -
    119.             $this->channel($model,$rss,$bn,$nmsp,"channel");
    120. -
    121.         $this->image($model,$rss,$bn,$nmsp);
    122. -
    123.         $this->items($model,$rss,$bn,$nmsp);
    124. -
    125.         $model->addNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");
    126. -
    127.         if($nmsp!= null)
    128. -
    129.             $model->addNamespace($this->type,$nmsp);
    130. -
    131.         return $model;
    132. -
    133.     }
    134. -
    135.  
    136. -
    137.     /**
    138. -
    139.     * Parses the image if there is one.
    140. -
    141.     *
    142. -
    143.     * @param $model the model
    144. -
    145.     * @param $rss the magpie parser object
    146. -
    147.     * @param $bnOrg the node which represents the channel
    148. -
    149.     * @param $nmsp the
    150. -
    151.     */
    152. -
    153.     function image(&$model,&$rss,&$bnOrg,&$nmsp){        
    154. -
    155.         if(count($rss->image)>0){
    156. -
    157.             if(isset($rss->image['about'])){
    158. -
    159.                 $bn new Resource($rss->image['about']);
    160. -
    161.             }else if(isset($rss->image['url'])){
    162. -
    163.                 $bn new Resource($rss->image['url']);
    164. -
    165.             }else{
    166. -
    167.                 $bn new BlankNode("image");
    168. -
    169.             }
    170. -
    171.             $model->add(new Statement($bnOrg,new Resource($nmsp."image"),$bn));
    172. -
    173.             $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource($nmsp."image")));
    174. -
    175.         }
    176. -
    177.         foreach($rss->image as $key => $value){
    178. -
    179.         $statement null;    
    180. -
    181.         switch($key){
    182. -
    183.                     case "dc":
    184. -
    185.                         $this->dc($bn,$model,$value);
    186. -
    187.                     break;
    188. -
    189.                     case "sy":
    190. -
    191.                         $this->sy($bn,$model,$value);
    192. -
    193.                     break;
    194. -
    195.                     default :
    196. -
    197.                         $statement new Statement($bn,new Resource($nmsp.$key)new Literal($value));
    198. -
    199.                     break;
    200. -
    201.                 }
    202. -
    203.             if($statement != null){
    204. -
    205.                 $model->add($statement);
    206. -
    207.             }
    208. -
    209.         }
    210. -
    211.     
    212. -
    213.     }
    214. -
    215.     
    216. -
    217.     /**
    218. -
    219.     * Parses the rss items/ atom entries.
    220. -
    221.     *
    222. -
    223.     * @param $model the model
    224. -
    225.     * @param $rss the magpie parser object
    226. -
    227.     * @param $bnOrg the node which represents the channel
    228. -
    229.     * @param $nmsp the
    230. -
    231.     */
    232. -
    233.     function items(&$model,&$rss,&$bnOrg,&$nmsp){        
    234. -
    235.         $items new BlankNode("items");
    236. -
    237.         $model->add(new Statement($bnOrg,new Resource($nmsp."items"),$items));
    238. -
    239.         $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq")));
    240. -
    241.         $i 1;
    242. -
    243.         foreach($rss->items as $outerKey => $outerValue){
    244. -
    245.             if(isset($outerValue['about'])){
    246. -
    247.                 $bn new Resource($outerValue['about']);
    248. -
    249.             }else if(isset($outerValue['guid'])){
    250. -
    251.                 $bn new Resource($outerValue['guid']);
    252. -
    253.             }else if(isset($outerValue['id'])){
    254. -
    255.                 $bn new Resource($outerValue['id']);
    256. -
    257.             }else{
    258. -
    259.                 $bn new Blanknode("item".$i);
    260. -
    261.             }
    262. -
    263.             $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#_".$i),$bn));
    264. -
    265.             if($this->type == "Atom"){
    266. -
    267.                 $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/2005/Atomentry")));
    268. -
    269.             }else{
    270. -
    271.                 $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://purl.org/rss/1.0/item")));
    272. -
    273.             }
    274. -
    275.             foreach($outerValue as $key => $value){
    276. -
    277.                 $statement null;
    278. -
    279.                 switch($key){
    280. -
    281.                     case "about":
    282. -
    283.                         break;
    284. -
    285.                     case "guid":
    286. -
    287.                         break;
    288. -
    289.                     case "dc":
    290. -
    291.                         $this->dc($bn,$model,$value);
    292. -
    293.                     break;
    294. -
    295.                     case "sy":
    296. -
    297.                         $this->sy($bn,$model,$value);
    298. -
    299.                     break;
    300. -
    301.                     default :
    302. -
    303.                         if($value != null)
    304. -
    305.                         $statement new Statement($bn,new Resource($nmsp.$key)new Literal($value));
    306. -
    307.                     break;
    308. -
    309.                 }
    310. -
    311.                 if($statement != null){
    312. -
    313.                     $model->add($statement);
    314. -
    315.                 }
    316. -
    317.             }
    318. -
    319.             $i++;
    320. -
    321.         }
    322. -
    323.         
    324. -
    325.     }
    326. -
    327.     
    328. -
    329.     /**
    330. -
    331.     * Adds the dc namespace.
    332. -
    333.     *
    334. -
    335.     * @param $node the node
    336. -
    337.     * @param $model the model
    338. -
    339.     * @param $dc Array which contains the dc objects
    340. -
    341.     */
    342. -
    343.     function dc(&$node,&$model,&$dc){
    344. -
    345.         $model->addNamespace("dc","http://purl.org/dc/elements/1.1/");
    346. -
    347.         foreach($dc as $key => $value){
    348. -
    349.                 $statement null;
    350. -
    351.                 $statement new Statement($node,new Resource("http://purl.org/dc/elements/1.1/".$key)new Literal($value));
    352. -
    353.             if($statement != null){
    354. -
    355.                 $model->add($statement);
    356. -
    357.             }
    358. -
    359.         }
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Adds the sy namespace.
    368. -
    369.     *
    370. -
    371.     * @param $node the node
    372. -
    373.     * @param $model the model
    374. -
    375.     * @param $sy Array which contains the sy objects
    376. -
    377.     */
    378. -
    379.     function sy(&$node,&$model,&$sy){
    380. -
    381.         $model->addNamespace("sy","http://purl.org/rss/1.0/modules/syndication/");
    382. -
    383.         foreach($sy as $key => $value){
    384. -
    385.                 $statement null;
    386. -
    387.                 $statement new Statement($node,new Resource("http://purl.org/rss/1.0/modules/syndication/".$key)new Literal($value));
    388. -
    389.             if($statement != null){
    390. -
    391.                 $model->add($statement);
    392. -
    393.             }
    394. -
    395.         }
    396. -
    397.         
    398. -
    399.     }
    400. -
    401.     
    402. -
    403.     
    404. -
    405.     /**
    406. -
    407.     * Parses the rss channel/ atom feed.
    408. -
    409.     *
    410. -
    411.     * @param $model the model
    412. -
    413.     * @param $rss the magpie parser object
    414. -
    415.     * @param $node the node which represents the channel
    416. -
    417.     * @param $nmsp the
    418. -
    419.     */
    420. -
    421.     function channel(&$model,&$rss,&$node,&$nmsp,$type){
    422. -
    423.          // Channel
    424. -
    425.          $statement new Statement($node,new Resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')new Resource($nmsp.$type));
    426. -
    427.         $model->add($statement);
    428. -
    429.         
    430. -
    431.          foreach($rss->channel as $key => $value){
    432. -
    433.         $statement null;    
    434. -
    435.         switch($key){
    436. -
    437.                     case "dc":
    438. -
    439.                         $this->dc($node,$model,$value);
    440. -
    441.                     break;
    442. -
    443.                     case "sy":
    444. -
    445.                         $this->sy($node,$model,$value);
    446. -
    447.                     break;
    448. -
    449.                     case "items":    
    450. -
    451.                     break;
    452. -
    453.                     case "tagline":    
    454. -
    455.                     break;
    456. -
    457.                     case "items_seq":
    458. -
    459.                     break;
    460. -
    461.                     default :
    462. -
    463.                         $statement new Statement($node,new Resource($nmsp.$key)new Literal($value));
    464. -
    465.                     break;
    466. -
    467.                 }
    468. -
    469.         if($statement != null){
    470. -
    471.             $model->add($statement);
    472. -
    473.         }
    474. -
    475.     }
    476. -
    477. }
    478. -
    479.  
    480. -
    481.   
    482. -
    483.   
    484. -
    485. //end: RssParser
    486. -
    487.  
    488. -
    489. ?>
    490. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilFindIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilFindIterator.php.html.svn-base deleted file mode 100755 index d8d9b174..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilFindIterator.php.html.svn-base +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - File Source for FindIterator.php - - - - - -

    Source for file FindIterator.php

    -

    Documentation is available at FindIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: FindIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing statements matching a searchpattern.
    16. -
    17.  * FindIterators are returned by model->findAsIterator()
    18. -
    19.  * Using a find iterator is significantly faster than using model->find() which returns
    20. -
    21.  * a new result model.
    22. -
    23.  * 
    24. -
    25.  * 
    26. -
    27.  * @version  $Id$
    28. -
    29.  * @author Tobias Gau <tobias.gauss@web.de>
    30. -
    31.  *
    32. -
    33.  * @package utility
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  */ 
    40. -
    41.  class FindIterator extends Object {
    42. -
    43.  
    44. -
    45.      /**
    46. -
    47.     * Reference to the MemModel
    48. -
    49.     * @var        object MemModel 
    50. -
    51.     * @access    private
    52. -
    53.     */    
    54. -
    55.     var $model;
    56. -
    57.     
    58. -
    59.  
    60. -
    61.  
    62. -
    63.      /**
    64. -
    65.     * Current position
    66. -
    67.     * FindIterator does not use the build in PHP array iterator,
    68. -
    69.     * so you can use serveral iterators on a single MemModel.
    70. -
    71.     * @var        integer 
    72. -
    73.     * @access    private
    74. -
    75.     */    
    76. -
    77.     var $position;
    78. -
    79.     
    80. -
    81.     
    82. -
    83.     /**
    84. -
    85.     * Searchpattern
    86. -
    87.     * 
    88. -
    89.     * @var        Object Subject,Predicate,Object
    90. -
    91.     * @access    private
    92. -
    93.     */    
    94. -
    95.  
    96. -
    97.     var $subject;
    98. -
    99.     var $predicate;
    100. -
    101.     var $object;
    102. -
    103.    
    104. -
    105.     
    106. -
    107.    /**
    108. -
    109.     * Constructor
    110. -
    111.     *
    112. -
    113.     * @param    object    MemModel 
    114. -
    115.     * @param    object  Subject 
    116. -
    117.     * @param    object  Predicate 
    118. -
    119.     * @param    object  Object 
    120. -
    121.     * @access    public
    122. -
    123.     */
    124. -
    125.     function FindIterator(&$model,$sub,$pred,$obj{
    126. -
    127.         $this->model &$model;
    128. -
    129.         $this->subject=$sub;
    130. -
    131.         $this->predicate=$pred;
    132. -
    133.         $this->object=$obj;
    134. -
    135.         $this->position=-1;
    136. -
    137.     }
    138. -
    139.     
    140. -
    141.     
    142. -
    143.      /**
    144. -
    145.     * Returns TRUE if there are more matching statements.
    146. -
    147.     * @return    boolean 
    148. -
    149.     * @access    public
    150. -
    151.     */
    152. -
    153.     function hasNext({
    154. -
    155.           if($this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1)>-1){
    156. -
    157.               return TRUE;
    158. -
    159.           }else{
    160. -
    161.               return FALSE;
    162. -
    163.           }
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.    
    170. -
    171.     /**
    172. -
    173.     * Returns the next matching statement.
    174. -
    175.     * @return    statement or NULL if there is no next matching statement.
    176. -
    177.     * @access    public
    178. -
    179.     */
    180. -
    181.     function next({
    182. -
    183.               $res=$this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1);    
    184. -
    185.               if($res>-1){
    186. -
    187.                   $this->position=$res;
    188. -
    189.                   return $this->model->triples[$res];
    190. -
    191.               }else{
    192. -
    193.                   return Null;
    194. -
    195.               }        
    196. -
    197.     }
    198. -
    199.    
    200. -
    201.    
    202. -
    203.  
    204. -
    205.  
    206. -
    207.     /**
    208. -
    209.     * Returns the current matching statement.
    210. -
    211.     * @return    statement or NULL if there is no current matching statement.
    212. -
    213.     * @access    public
    214. -
    215.     */
    216. -
    217.     function current({
    218. -
    219.           if (($this->position >= -1)&&(isset($this->model->triples[$this->position]))) {
    220. -
    221.             return $this->model->triples[$this->position];
    222. -
    223.         else {
    224. -
    225.             return NULL;
    226. -
    227.         
    228. -
    229.     }  
    230. -
    231.   
    232. -
    233.  
    234. -
    235.  
    236. -
    237. ?>
    238. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilIterFind.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilIterFind.php.html.svn-base deleted file mode 100755 index 035cfe88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilIterFind.php.html.svn-base +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - File Source for IterFind.php - - - - - -

    Source for file IterFind.php

    -

    Documentation is available at IterFind.php

    -
    -
    1. <?php 
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: IterFind
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Implementation of a find-iterator which delivers statements or quads.
    18. -
    19. *
    20. -
    21. * This Iterator should be used in a for-loop like:
    22. -
    23. * for($iterator = $memmodel->iterFind(null,null,null,null); $iterator->valid(); $iterator->next())
    24. -
    25. * {
    26. -
    27. *    $statement=$iterator->current();
    28. -
    29. * };
    30. -
    31. *
    32. -
    33. @version  $Id$
    34. -
    35. @author Daniel Westphal (http://www.d-westphal.de)
    36. -
    37. *
    38. -
    39. *
    40. -
    41. @package     utility
    42. -
    43. @access    public
    44. -
    45. ***/
    46. -
    47. class IterFind
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * The current position
    56. -
    57.     * @var        integer 
    58. -
    59.     * @access    private
    60. -
    61.     */
    62. -
    63.     var $key;
    64. -
    65.     
    66. -
    67.     /**
    68. -
    69.     * boolean value, if the results should be returned as Quads
    70. -
    71.     * @var        boolean 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $returnAsQuads;
    78. -
    79.     
    80. -
    81.     /**
    82. -
    83.     * If the current resource is valid
    84. -
    85.     * @var        boolean 
    86. -
    87.     * @access    private
    88. -
    89.     */
    90. -
    91.     var $valid;
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * The current NamedGraph
    98. -
    99.     * @var obejct NamedGraph
    100. -
    101.     * @access    private
    102. -
    103.     */
    104. -
    105.     var $current;
    106. -
    107.     
    108. -
    109.     /**
    110. -
    111.     * The graph to look in.
    112. -
    113.     * @var string 
    114. -
    115.     * @access    private
    116. -
    117.     */    
    118. -
    119.     var $findGraph;
    120. -
    121.     
    122. -
    123.     /**
    124. -
    125.     * The subject Resource to search for
    126. -
    127.     * @var string 
    128. -
    129.     * @access    private
    130. -
    131.     */    
    132. -
    133.     var $findSubject;
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * The predicate Resource to search for
    140. -
    141.     * @var string 
    142. -
    143.     * @access    private
    144. -
    145.     */    
    146. -
    147.     var $findPredicate;
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * The object Resource to search for
    154. -
    155.     * @var string 
    156. -
    157.     * @access    private
    158. -
    159.     */    
    160. -
    161.     var $findObject;
    162. -
    163.     
    164. -
    165.     
    166. -
    167.     
    168. -
    169.     /**
    170. -
    171.     * Constructor.
    172. -
    173.     *
    174. -
    175.     * $subject, $predicate, and $object are used like find().
    176. -
    177.     * $graph has to be a reference to the graph to search in.
    178. -
    179.     *
    180. -
    181.     * 
    182. -
    183.     *
    184. -
    185.     * @param $graph Resource
    186. -
    187.     * @param $subject Resource
    188. -
    189.     * @param $predicate Resource
    190. -
    191.     * @param $object Resource
    192. -
    193.     * @param $returnAsQuads boolean
    194. -
    195.     * @access    public
    196. -
    197.     */
    198. -
    199.     function IterFind($graph,$subject,$predicate,$object,$returnAsQuads=false)
    200. -
    201.     {
    202. -
    203.         if ($graph==NULL)
    204. -
    205.         {
    206. -
    207.             $this->valid=false;
    208. -
    209.             return;    
    210. -
    211.         }        
    212. -
    213.         $this->findGraph=&$graph;
    214. -
    215.         $this->findSubject=$subject;
    216. -
    217.         $this->findPredicate=$predicate;
    218. -
    219.         $this->findObject=$object;
    220. -
    221.         $this->rewind();
    222. -
    223.         $this->returnAsQuads=$returnAsQuads;
    224. -
    225.     }
    226. -
    227.     
    228. -
    229.     /**
    230. -
    231.     * Resets iterator list to start
    232. -
    233.     *
    234. -
    235.     * @access    public
    236. -
    237.     */
    238. -
    239.     function rewind()
    240. -
    241.     {
    242. -
    243.         $this->key = -1;
    244. -
    245.         $this->next();
    246. -
    247.     }
    248. -
    249.     
    250. -
    251.     /**
    252. -
    253.     * Says if there are additional items left in the list
    254. -
    255.     *
    256. -
    257.     * @return    boolean 
    258. -
    259.     * @access    public
    260. -
    261.     */
    262. -
    263.     function valid()
    264. -
    265.     {
    266. -
    267.         return $this->valid;
    268. -
    269.     }
    270. -
    271.     
    272. -
    273.     /**
    274. -
    275.     * Moves Iterator to the next item in the list
    276. -
    277.     *
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function next()
    284. -
    285.     {
    286. -
    287.         $this->current $this->findGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->key);
    288. -
    289.         $this->valid=($this->current!=NULL);
    290. -
    291.     }
    292. -
    293.     
    294. -
    295.     /**
    296. -
    297.     * Returns the current item
    298. -
    299.     *
    300. -
    301.     * @return    mixed 
    302. -
    303.     * @access    public
    304. -
    305.     */
    306. -
    307.     function current()
    308. -
    309.     {
    310. -
    311.         if($this->returnAsQuads)
    312. -
    313.         return new Quad(new Resource($this->findGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
    314. -
    315.         //else
    316. -
    317.         return $this->current;
    318. -
    319.     }
    320. -
    321.     
    322. -
    323.     
    324. -
    325.     /**
    326. -
    327.     * Returns the key of the current item
    328. -
    329.     *
    330. -
    331.     * @return    integer 
    332. -
    333.     * @access    public
    334. -
    335.     */
    336. -
    337.     function key()
    338. -
    339.     {
    340. -
    341.         return $this->key;
    342. -
    343.     }
    344. -
    345. }
    346. -
    347. ?>
    348. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilModelComparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilModelComparator.php.html.svn-base deleted file mode 100755 index c7553df3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilModelComparator.php.html.svn-base +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - File Source for ModelComparator.php - - - - - -

    Source for file ModelComparator.php

    -

    Documentation is available at ModelComparator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: ModelComparator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * This class compares to models. This comparator bases on the labelling algorithm
    18. -
    19.  * described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href>
    20. -
    21.  * by Jeremy J. Carroll.
    22. -
    23.  *
    24. -
    25.  *
    26. -
    27.  * @version  $Id$
    28. -
    29.  * @author Tobias Gau <tobias.gauss at web.de>
    30. -
    31.  *
    32. -
    33.  * @package utility
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  ***/ 
    40. -
    41.  class ModelComparator extends Object {
    42. -
    43.      
    44. -
    45.      /**
    46. -
    47.      * Compares two models.
    48. -
    49.      *
    50. -
    51.      * @param $thisModel First Model.
    52. -
    53.      * @param $thatModel Second Model.
    54. -
    55.      *
    56. -
    57.      * @return boolean 
    58. -
    59.      */
    60. -
    61.      function compare($thisModel$thatModel){
    62. -
    63.      
    64. -
    65.      $thisModeltriples null;
    66. -
    67.      $thatModeltriples null;
    68. -
    69.      
    70. -
    71.          if(is_a($thisModel,"DbModel")){
    72. -
    73.              $thisModeltriples =     $thisModel->getMemModel();
    74. -
    75.          }else{
    76. -
    77.              $thisModeltriples =     $thisModel;
    78. -
    79.          }
    80. -
    81.          
    82. -
    83.          if(is_a($thatModel,"DbModel")){
    84. -
    85.              $thatModeltriples =     $thatModel->getMemModel();
    86. -
    87.          }else{
    88. -
    89.              $thatModeltriples =     $thatModel;
    90. -
    91.          }
    92. -
    93.              
    94. -
    95.          $sortArray1 ModelComparator::buildSortArray($thisModeltriples->triples);
    96. -
    97.         $sortArray2 ModelComparator::buildSortArray($thatModeltriples->triples);    
    98. -
    99.         
    100. -
    101.         $renamedArray1 ModelComparator::renameBlanks($sortArray1);
    102. -
    103.         $renamedArray2 ModelComparator::renameBlanks($sortArray2);
    104. -
    105.         
    106. -
    107.         return ModelComparator::compareTriples($renamedArray1,$renamedArray2);
    108. -
    109.      }
    110. -
    111.          
    112. -
    113.      
    114. -
    115.      /**
    116. -
    117.      * Builds a sorted array.
    118. -
    119.      *
    120. -
    121.      * @param $tripleList A List that contains the models triples.
    122. -
    123.      *
    124. -
    125.      * @return Array 
    126. -
    127.      */
    128. -
    129.      function buildSortArray($tripleList){
    130. -
    131.          $sortedArray Array();
    132. -
    133.          
    134. -
    135.          foreach($tripleList as $index => $triple){
    136. -
    137.              $sub null;
    138. -
    139.              $obj null;
    140. -
    141.              $orgSub  $triple->getSubject();
    142. -
    143.              $orgObj  $triple->getObject();
    144. -
    145.              
    146. -
    147.              if(is_a($orgSub,"Blanknode")){
    148. -
    149.                  $sub $orgSub->getID();
    150. -
    151.                  $triple->subj new Blanknode("~");
    152. -
    153.              }
    154. -
    155.              if(is_a($orgObj,"Blanknode")){
    156. -
    157.                  $obj $orgObj->getID();
    158. -
    159.                  $triple->obj new Blanknode("~");
    160. -
    161.              }
    162. -
    163.              $sortedArray[$index]['string']  $triple->toString();
    164. -
    165.              $sortedArray[$index]['index']  $index;
    166. -
    167.              $sortedArray[$index]['triple'$triple;
    168. -
    169.              $sortedArray[$index]['sub']    $sub;
    170. -
    171.              $sortedArray[$index]['obj']    $obj;    
    172. -
    173.          }
    174. -
    175.          sort($sortedArray);
    176. -
    177.          return $sortedArray;
    178. -
    179.      }
    180. -
    181.      
    182. -
    183.      /**
    184. -
    185.      * Renames the models Blanknodes.
    186. -
    187.      *
    188. -
    189.      * @param $sortedArray A List that contains the models triples.
    190. -
    191.      *
    192. -
    193.      * @return Array 
    194. -
    195.      */
    196. -
    197.      function renameBlanks($sortedArray){
    198. -
    199.      $i 0;
    200. -
    201.      $labelmap Array();
    202. -
    203.          
    204. -
    205.          foreach ($sortedArray as $value){    
    206. -
    207.              //new label
    208. -
    209.              if($value['sub']!=null){
    210. -
    211.                  $label null;
    212. -
    213.                  if(isset($labelmap[$value['sub']])){
    214. -
    215.                      $label $labelmap[$value['sub']];
    216. -
    217.                      $value['triple']->subj new BlankNode($labelmap[$value['sub']]);
    218. -
    219.                  }else{
    220. -
    221.                      $label $i."Bnode";
    222. -
    223.                      $labelmap[$value['sub']]=$label;
    224. -
    225.                      $value['triple']->subj new BlankNode($labelmap[$value['sub']]);
    226. -
    227.                      $i++;
    228. -
    229.                  }
    230. -
    231.              }
    232. -
    233.              
    234. -
    235.              if($value['obj']!=null){
    236. -
    237.                  $label null;
    238. -
    239.                  if(isset($labelmap[$value['obj']])){
    240. -
    241.                      $label $labelmap[$value['obj']];
    242. -
    243.                      $value['triple']->obj new BlankNode($labelmap[$value['obj']]);
    244. -
    245.                  }else{
    246. -
    247.                      $label $i."Bnode";
    248. -
    249.                      $labelmap[$value['obj']]=$label;
    250. -
    251.                      $value['triple']->obj new BlankNode($labelmap[$value['obj']]);
    252. -
    253.                      $i++;
    254. -
    255.                  }
    256. -
    257.              }
    258. -
    259.              
    260. -
    261.          }
    262. -
    263.          return $sortedArray;
    264. -
    265.      
    266. -
    267.      }
    268. -
    269.      
    270. -
    271.      /**
    272. -
    273.      * Compares the Triples in the lists.
    274. -
    275.      *
    276. -
    277.      * @param $tripleList A List that contains the models triples.
    278. -
    279.      * @param $tripleList A List that contains the models triples.
    280. -
    281.      *
    282. -
    283.      * @return boolean 
    284. -
    285.      */
    286. -
    287.      function compareTriples($array1$array2){
    288. -
    289.          foreach($array1 as $key => $value){
    290. -
    291.              if(!$value['triple']->equals($array2[$key]['triple']))
    292. -
    293.                  return false;
    294. -
    295.          }
    296. -
    297.          return true;
    298. -
    299.      
    300. -
    301.      }
    302. -
    303.      
    304. -
    305.  
    306. -
    307.  }
    308. -
    309.  
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  ?>
    316. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilObject.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilObject.php.html.svn-base deleted file mode 100755 index feba4320..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilObject.php.html.svn-base +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - File Source for Object.php - - - - - -

    Source for file Object.php

    -

    Documentation is available at Object.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Object
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * An abstract object.
    16. -
    17.  * Root object with some general methods, that should be overloaded.
    18. -
    19.  * 
    20. -
    21.  *
    22. -
    23.  * @version  $Id$
    24. -
    25.  * @author Chris Bizer <chris@bizer.de>
    26. -
    27.  *
    28. -
    29.  * @abstract
    30. -
    31.  * @package utility
    32. -
    33.  *
    34. -
    35.  ***/
    36. -
    37.  class Object {
    38. -
    39.  
    40. -
    41.   /**
    42. -
    43.    * Serializes a object into a string
    44. -
    45.    *
    46. -
    47.    * @access    public
    48. -
    49.    * @return    string 
    50. -
    51.    */    
    52. -
    53.     function toString({
    54. -
    55.         $objectvars get_object_vars($this);
    56. -
    57.         foreach($objectvars as $key => $value
    58. -
    59.             $content .= $key ."='"$value"'; ";
    60. -
    61.         return "Instance of " get_class($this."; Properties: "$content;
    62. -
    63.     }
    64. -
    65.  
    66. -
    67.  }
    68. -
    69.  
    70. -
    71.  
    72. -
    73. ?>
    74. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilRdfUtil.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilRdfUtil.php.html.svn-base deleted file mode 100755 index 53322e11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilRdfUtil.php.html.svn-base +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - File Source for RdfUtil.php - - - - - -

    Source for file RdfUtil.php

    -

    Documentation is available at RdfUtil.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RDFUtil
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Useful utility methods.
    16. -
    17. * Static class.
    18. -
    19. *
    20. -
    21. @version  $Id$
    22. -
    23. @author Chris Bizer <chris@bizer.de>, Daniel Westphal <dawe@gmx.de>
    24. -
    25. @author   Anton Kstlbacher <anton1@koestlbacher.de>
    26. -
    27. @package utility
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class RDFUtil extends Object {
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     * Extracts the namespace prefix out of a URI.
    40. -
    41.     *
    42. -
    43.     * @param    String    $uri 
    44. -
    45.     * @return    string 
    46. -
    47.     * @access    public
    48. -
    49.     */
    50. -
    51.     function guessNamespace($uri{
    52. -
    53.         $l RDFUtil::getNamespaceEnd($uri);
    54. -
    55.         return $l substr($uri ,0$l"";
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     * Delivers the name out of the URI (without the namespace prefix).
    64. -
    65.     *
    66. -
    67.     * @param    String    $uri 
    68. -
    69.     * @return    string 
    70. -
    71.     * @access    public
    72. -
    73.     */
    74. -
    75.     function guessName($uri{
    76. -
    77.         return substr($uri,RDFUtil::getNamespaceEnd($uri));
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Extracts the namespace prefix out of the URI of a Resource.
    86. -
    87.     *
    88. -
    89.     * @param    Object Resource    $resource
    90. -
    91.     * @return    string 
    92. -
    93.     * @access    public
    94. -
    95.     */
    96. -
    97.     function getNamespace($resource{
    98. -
    99.         return RDFUtil::guessNamespace($resource->getURI());
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     /**
    106. -
    107.     * Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    108. -
    109.     *
    110. -
    111.     * @param    Object Resource    $resource
    112. -
    113.     * @return    string 
    114. -
    115.     * @access    public
    116. -
    117.     */
    118. -
    119.     function getLocalName($resource{
    120. -
    121.         return RDFUtil::guessName($resource->getURI());
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     * Position of the namespace end
    130. -
    131.     * Method looks for # : and /
    132. -
    133.     * @param    String    $uri 
    134. -
    135.     * @access    private
    136. -
    137.     */
    138. -
    139.     function getNamespaceEnd($uri{
    140. -
    141.         $l strlen($uri)-1;
    142. -
    143.         do {
    144. -
    145.             $c substr($uri$l1);
    146. -
    147.             if($c == '#' || $c == ':' || $c == '/')
    148. -
    149.             break;
    150. -
    151.             $l--;
    152. -
    153.         while ($l >= 0);
    154. -
    155.         $l++;
    156. -
    157.         return $l;
    158. -
    159.     }
    160. -
    161.  
    162. -
    163.         /**
    164. -
    165.     * Short Prefix for known Namespaces by given URI
    166. -
    167.     * @param    String    $uri 
    168. -
    169.     * @access    public
    170. -
    171.     */
    172. -
    173.     function getPrefix($uri{
    174. -
    175.             switch (RDFUtil::guessNamespace($uri))
    176. -
    177.         {
    178. -
    179.                 case RDF_NAMESPACE_URI:
    180. -
    181.                 $prefix RDF_NAMESPACE_PREFIX;
    182. -
    183.                 break;
    184. -
    185.  
    186. -
    187.                 case RDF_SCHEMA_URI:
    188. -
    189.                 $short_p RDF_SCHEMA_PREFIX;
    190. -
    191.                 break;
    192. -
    193.  
    194. -
    195.                 case OWL_URI:
    196. -
    197.                 $short_p OWL_PREFIX;
    198. -
    199.                 break;
    200. -
    201.  
    202. -
    203.                 default:
    204. -
    205.                 $short_p $statement->getLabelPredicate();
    206. -
    207.             }
    208. -
    209.             return $short_p;
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.  
    216. -
    217.     /**
    218. -
    219.     * Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    220. -
    221.     *
    222. -
    223.     * @param    Object Resource    $resource
    224. -
    225.     * @return    boolean 
    226. -
    227.     * @access    public
    228. -
    229.     */
    230. -
    231.     function isRDF($resource{
    232. -
    233.         return ($resource != NULL && RDFUtil::getNamespace($resource== RDF_NAMESPACE_URI);
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     /**
    240. -
    241.     * Escapes < > and &
    242. -
    243.     *
    244. -
    245.     * @param    String    $textValue 
    246. -
    247.     * @return    String 
    248. -
    249.     * @access    public
    250. -
    251.     */
    252. -
    253.     function escapeValue($textValue{
    254. -
    255.  
    256. -
    257.         $textValue str_replace('<''&lt;'$textValue);
    258. -
    259.         $textValue str_replace('>''&gt;'$textValue);
    260. -
    261.         $textValue str_replace('&''&amp;'$textValue);
    262. -
    263.  
    264. -
    265.         return $textValue;
    266. -
    267.     }
    268. -
    269.  
    270. -
    271.     /**
    272. -
    273.     * Converts an ordinal RDF resource to an integer.
    274. -
    275.     * e.g. Resource(RDF:_1) => 1
    276. -
    277.     *
    278. -
    279.     * @param    object Resource    $resource 
    280. -
    281.     * @return    Integer 
    282. -
    283.     * @access    public
    284. -
    285.     */
    286. -
    287.     function getOrd($resource)  {
    288. -
    289.         if($resource == NULL || !is_a($resource'Resource'|| !RDFUtil::isRDF($resource))
    290. -
    291.         return -1;
    292. -
    293.         $name RDFUtil::getLocalName($resource);
    294. -
    295.         echo substr($name1).' '.RDFUtil::getLocalName($resource);
    296. -
    297.         $n substr($name1);
    298. -
    299.         //noch rein : chekcen ob $n Nummer ist !!!!!!!!!!!!!!!!!!!!!!if($n)
    300. -
    301.         return $n;
    302. -
    303.         return -1;
    304. -
    305.     }
    306. -
    307.  
    308. -
    309.     /**
    310. -
    311.     * Creates ordinal RDF resource out of an integer.
    312. -
    313.     *
    314. -
    315.     * @param    Integer    $num 
    316. -
    317.     * @return    object Resource 
    318. -
    319.     * @access    public
    320. -
    321.     */
    322. -
    323.     function createOrd($num)  {
    324. -
    325.         return new Resource(RDF_NAMESPACE_URI '_' $num);
    326. -
    327.     }
    328. -
    329.  
    330. -
    331.     /**
    332. -
    333.     * Prints a MemModel as HTML table.
    334. -
    335.     * You can change the colors in the configuration file.
    336. -
    337.     *
    338. -
    339.     * @param    object MemModel     &$model 
    340. -
    341.     * @access    public
    342. -
    343.     */
    344. -
    345.     function writeHTMLTable(&$model)  {
    346. -
    347.         $nms $model->getParsedNamespaces();
    348. -
    349.         $names '';
    350. -
    351.         $pre '';
    352. -
    353.  
    354. -
    355.  
    356. -
    357.         echo '<table border="1" cellpadding="3" cellspacing="0" width="100%">' LINEFEED;
    358. -
    359.         echo INDENTATION '<tr bgcolor="' HTML_TABLE_HEADER_COLOR '">' LINEFEED INDENTATION INDENTATION '<td td width="68%" colspan="3">';
    360. -
    361.         echo '<p><b>Base URI:</b> ' $model->getBaseURI('</p></td>' LINEFEED;
    362. -
    363.         echo INDENTATION INDENTATION '<td width="32%"><p><b>Size:</b> ' $model->size('</p></td>' LINEFEED INDENTATION '</tr>';
    364. -
    365.  
    366. -
    367.         echo '<tr><td><b>Prefix:</b>'.'<br/></td><td colspan="3"><b>Namespace:</b>'.'<br/></td></tr>';
    368. -
    369.         $i=0;
    370. -
    371.         if($nms != false){
    372. -
    373.             foreach($nms as $namespace => $prefix){
    374. -
    375.                 if($i==0){
    376. -
    377.                     $col HTML_TABLE_NS_ROW_COLOR0;
    378. -
    379.                 }else{
    380. -
    381.                     $col HTML_TABLE_NS_ROW_COLOR1;
    382. -
    383.                 }
    384. -
    385.                 echo '<tr bgcolor="'.$col.'"><td>'.$prefix.'</td><td colspan="3">'.$namespace.'</td></tr>';
    386. -
    387.                 $i++;
    388. -
    389.                 $i%=2;
    390. -
    391.             }
    392. -
    393.         }else{
    394. -
    395.             echo '<tr><td>-</td><td colspan="3">-</td></tr>';
    396. -
    397.         }
    398. -
    399.  
    400. -
    401.  
    402. -
    403.  
    404. -
    405.  
    406. -
    407.         echo INDENTATION '<tr bgcolor="' HTML_TABLE_HEADER_COLOR '">' LINEFEED INDENTATION INDENTATION '<td width="4%"><p align=center><b>No.</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Subject</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Predicate</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Object</b></p></td>' LINEFEED INDENTATION '</tr>' LINEFEED;
    408. -
    409.  
    410. -
    411.         $i 1;
    412. -
    413.         foreach($model->triples as $key => $statement{
    414. -
    415.             $infered='';
    416. -
    417.             if (is_a($statement,'InfStatement')) $infered='<small>(infered)</small>';
    418. -
    419.             echo INDENTATION '<tr valign="top">' LINEFEED INDENTATION INDENTATION '<td><p align=center>' $i '.<BR>'.$infered.'</p></td>' LINEFEED;
    420. -
    421.             // subject
    422. -
    423.             echo INDENTATION INDENTATION '<td bgcolor="';
    424. -
    425.             echo RDFUtil::chooseColor($statement->getSubject());
    426. -
    427.             echo '">';
    428. -
    429.             echo '<p>' .  RDFUtil::getNodeTypeName($statement->getSubject());
    430. -
    431.             if(is_a($statement->subj,'Resource')){
    432. -
    433.                 $ns $statement->subj->getNamespace();
    434. -
    435.                 if(isset($nms[$ns])){
    436. -
    437.                     echo $nms[$ns].':'.RDFUtil::getLocalName($statement->subj);
    438. -
    439.                 }else{
    440. -
    441.                     echo $statement->subj->getLabel();
    442. -
    443.                 }
    444. -
    445.             }
    446. -
    447.             echo '</p></td>' .  LINEFEED;
    448. -
    449.             // predicate
    450. -
    451.             echo INDENTATION INDENTATION '<td bgcolor="';
    452. -
    453.             echo RDFUtil::chooseColor($statement->getPredicate());
    454. -
    455.             echo '">';
    456. -
    457.             echo '<p>' RDFUtil::getNodeTypeName($statement->getPredicate());
    458. -
    459.             if(is_a($statement->pred,'Resource')){
    460. -
    461.                 $ns $statement->pred->getNamespace();
    462. -
    463.                 if(isset($nms[$ns])){
    464. -
    465.                     echo $nms[$ns].':'.RDFUtil::getLocalName($statement->pred);
    466. -
    467.                 }else{
    468. -
    469.                     echo $statement->pred->getLabel();
    470. -
    471.                 }
    472. -
    473.             }
    474. -
    475.             echo '</p></td>' .  LINEFEED;
    476. -
    477.             // object
    478. -
    479.             echo INDENTATION INDENTATION '<td bgcolor="';
    480. -
    481.             echo RDFUtil::chooseColor($statement->getObject());
    482. -
    483.             echo '">';
    484. -
    485.             echo '<p>';
    486. -
    487.             if (is_a($statement->getObject()'Literal')) {
    488. -
    489.                 if ($statement->obj->getLanguage(!= null{
    490. -
    491.                     $lang ' <b>(xml:lang="' $statement->obj->getLanguage('") </b> ';
    492. -
    493.                 ELSE $lang '';
    494. -
    495.                 if ($statement->obj->getDatatype(!= null{
    496. -
    497.                     $dtype ' <b>(rdf:datatype="' $statement->obj->getDatatype('") </b> ';
    498. -
    499.                 ELSE $dtype '';
    500. -
    501.             else {
    502. -
    503.                 $lang '';
    504. -
    505.                 $dtype '';
    506. -
    507.             }
    508. -
    509.             $label $statement->obj->getLabel();
    510. -
    511.             if(is_a($statement->obj,'Resource')){
    512. -
    513.                 $ns $statement->obj->getNamespace();
    514. -
    515.                 if(isset($nms[$ns])){
    516. -
    517.                     $label $nms[$ns].':'.RDFUtil::getLocalName($statement->obj);
    518. -
    519.                 }else{
    520. -
    521.                     $label $statement->obj->getLabel();
    522. -
    523.                 }
    524. -
    525.             }
    526. -
    527.  
    528. -
    529.             echo  RDFUtil::getNodeTypeName($statement->getObject())
    530. -
    531.             .nl2br(htmlspecialchars($label)) $lang $dtype;
    532. -
    533.  
    534. -
    535.             echo '</p></td>' LINEFEED;
    536. -
    537.             echo INDENTATION '</tr>' LINEFEED;
    538. -
    539.             $i++;
    540. -
    541.         }
    542. -
    543.         echo '</table>' LINEFEED;
    544. -
    545.     }
    546. -
    547.  
    548. -
    549.     /**
    550. -
    551.     * Chooses a node color.
    552. -
    553.     * Used by RDFUtil::writeHTMLTable()
    554. -
    555.     *
    556. -
    557.     * @param    object Node    $node 
    558. -
    559.     * @return    object Resource 
    560. -
    561.     * @access    private
    562. -
    563.     */
    564. -
    565.     function chooseColor($node)  {
    566. -
    567.         if (is_a($node'BlankNode'))
    568. -
    569.         return HTML_TABLE_BNODE_COLOR;
    570. -
    571.         elseif (is_a($node'Literal'))
    572. -
    573.         return HTML_TABLE_LITERAL_COLOR;
    574. -
    575.         else {
    576. -
    577.             if (RDFUtil::getNamespace($node== RDF_NAMESPACE_URI ||
    578. -
    579.             RDFUtil::getNamespace($node== RDF_SCHEMA_URI ||
    580. -
    581.             RDFUtil::getNamespace($node== OWL_URI
    582. -
    583.             )
    584. -
    585.  
    586. -
    587.             return HTML_TABLE_RDF_NS_COLOR;
    588. -
    589.         }
    590. -
    591.         return HTML_TABLE_RESOURCE_COLOR;
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     /**
    600. -
    601.     * Get Node Type.
    602. -
    603.     * Used by RDFUtil::writeHTMLTable()
    604. -
    605.     *
    606. -
    607.     * @param    object Node    $node 
    608. -
    609.     * @return    object Resource 
    610. -
    611.     * @access    private
    612. -
    613.     */
    614. -
    615.     function getNodeTypeName($node)  {
    616. -
    617.         if (is_a($node"BlankNode"))
    618. -
    619.         return 'Blank Node: ';
    620. -
    621.         elseif (is_a($node'Literal'))
    622. -
    623.         return 'Literal: ';
    624. -
    625.         else {
    626. -
    627.             if (RDFUtil::getNamespace($node== RDF_NAMESPACE_URI ||
    628. -
    629.             RDFUtil::getNamespace($node== RDF_SCHEMA_URI ||
    630. -
    631.             RDFUtil::getNamespace($node== OWL_URI)
    632. -
    633.             return 'RDF Node: ';
    634. -
    635.         }
    636. -
    637.         return 'Resource: ';
    638. -
    639.  
    640. -
    641.     }
    642. -
    643.  
    644. -
    645.  
    646. -
    647.  /**
    648. -
    649.  * Short Prefix for known and/or parsed Namespaces by given URI and Model
    650. -
    651.  * Uses $default_prefixes defined in constants.php and getParsedNamespaces()
    652. -
    653.  * Returns FALSE if no matching prefix is found
    654. -
    655.  *
    656. -
    657.  * @author   Anton Kstlbacher <anton1@koestlbacher.de>
    658. -
    659.  * @param    string  $uri 
    660. -
    661.  * @param    object $model 
    662. -
    663.  * @return   string, boolean
    664. -
    665.  * @access   public
    666. -
    667.  * @throws   PhpError
    668. -
    669.  */
    670. -
    671.  
    672. -
    673.  function guessPrefix($uri&$model)
    674. -
    675.  {
    676. -
    677.      global $default_prefixes;
    678. -
    679.      $namespace RDFUtil::guessNamespace($uri);
    680. -
    681.      $par_nms   $model->getParsedNamespaces();
    682. -
    683.      if (isset($par_nms[$namespace]))
    684. -
    685.      {
    686. -
    687.          $prefix $par_nms[$namespace];
    688. -
    689.      }
    690. -
    691.      else
    692. -
    693.      {
    694. -
    695.          $prefix array_search($namespace$default_prefixes);
    696. -
    697.      }
    698. -
    699.      if($prefix !== false)
    700. -
    701.      {
    702. -
    703.         return $prefix;
    704. -
    705.      }
    706. -
    707.      else
    708. -
    709.      {
    710. -
    711.         return false;
    712. -
    713.      }
    714. -
    715.  }
    716. -
    717.  
    718. -
    719.  
    720. -
    721.  /**
    722. -
    723.  * Generates a dot-file for drawing graphical output with the
    724. -
    725.  * graphviz-application which can be downloaded at http://www.graphviz.org
    726. -
    727.  * If the graphviz-application is installed and its path is set to the
    728. -
    729.  * correct value in constants.php we can directly generate any
    730. -
    731.  * file format graphviz supports, e.g. SVG, PNG
    732. -
    733.  * Parameters: model to visualize, output format, use prefixes
    734. -
    735.  *
    736. -
    737.  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    738. -
    739.  * WARNING: Graphviz can be slow with large models.
    740. -
    741.  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    742. -
    743.  *
    744. -
    745.  * @author   Anton Kstlbacher <anton1@koestlbacher.de>
    746. -
    747.  * @param    object  Model 
    748. -
    749.  * @param    string  $format 
    750. -
    751.  * @param    boolean $short_prefix 
    752. -
    753.  * @return   string, binary
    754. -
    755.  * @access   public
    756. -
    757.  * @throws   PhpError
    758. -
    759.  */
    760. -
    761.  
    762. -
    763.  function visualizeGraph(&$model$format "input_dot"$short_prefix TRUE)
    764. -
    765.  {
    766. -
    767.      global $graphviz_param;
    768. -
    769.      $i 0;
    770. -
    771.  
    772. -
    773.      foreach ($model->triples as $key => $statement)
    774. -
    775.      {
    776. -
    777.          $subject   $statement->getLabelSubject();
    778. -
    779.          $predicate $statement->getLabelPredicate();
    780. -
    781.          $object    $statement->getLabelObject();
    782. -
    783.  
    784. -
    785.          // format subject
    786. -
    787.          if (!isset($attrib[$subject]))
    788. -
    789.          {
    790. -
    791.              if (is_a($statement->subject(),'BlankNode'))
    792. -
    793.              {
    794. -
    795.                  $attrib[$subject$graphviz_param['BLANKNODE_STYLE'];
    796. -
    797.              }
    798. -
    799.              else
    800. -
    801.              {
    802. -
    803.                  if ($short_prefix == TRUE && RDFUtil::guessPrefix($subject$model!= FALSE)
    804. -
    805.                  {
    806. -
    807.                      $prefix RDFUtil::guessPrefix($subject$model);
    808. -
    809.                      $subject_label $prefix.":".RDFUtil::guessName($subject);
    810. -
    811.                      $attrib[$subject"label=\"".$subject_label."\" ";
    812. -
    813.                      if(!isset($prefix_array[$prefix]))
    814. -
    815.                      {
    816. -
    817.                          $prefix_array[$prefixRDFUtil::guessNamespace($subject);
    818. -
    819.                      }
    820. -
    821.                  }
    822. -
    823.                  if (GRAPHVIZ_URI == TRUE)
    824. -
    825.                  {
    826. -
    827.                      $attrib[$subject.= "URL=\"".$subject."\"";
    828. -
    829.                  }
    830. -
    831.              }
    832. -
    833.          }
    834. -
    835.  
    836. -
    837.          // format predicate
    838. -
    839.          if ($short_prefix == TRUE && RDFUtil::guessPrefix($predicate$model!= FALSE)
    840. -
    841.          {
    842. -
    843.              $prefix RDFUtil::guessPrefix($predicate$model);
    844. -
    845.              $predicate_label "label=\"".$prefix.":".RDFUtil::guessName($predicate)."\"";
    846. -
    847.              if(!isset($prefix_array[$prefix]))
    848. -
    849.              {
    850. -
    851.                  $prefix_array[$prefixRDFUtil::guessNamespace($predicate);
    852. -
    853.              }
    854. -
    855.          }
    856. -
    857.          else
    858. -
    859.          {
    860. -
    861.              $predicate_label "label=\"".$predicate."\"";
    862. -
    863.          }
    864. -
    865.  
    866. -
    867.     if (is_a($statement,'InfStatement'))
    868. -
    869.          {
    870. -
    871.              $predicate_label .= " ".$graphviz_param['INFERRED_STYLE'];
    872. -
    873.          }
    874. -
    875.          else
    876. -
    877.          {
    878. -
    879.              if (GRAPHVIZ_URI == TRUE)
    880. -
    881.              {
    882. -
    883.                  $predicate_label .= "URL=\"".$predicate."\"";
    884. -
    885.              }
    886. -
    887.          }
    888. -
    889.  
    890. -
    891.          // format object
    892. -
    893.          if (!isset($attrib[$object]))
    894. -
    895.          {
    896. -
    897.              if (is_a($statement->object(),'BlankNode'))
    898. -
    899.              {
    900. -
    901.                  $attrib[$object$graphviz_param['BLANKNODE_STYLE'];
    902. -
    903.              }
    904. -
    905.              elseif (is_a($statement->object(),'Literal'))
    906. -
    907.              {
    908. -
    909.                  $object_label $object;
    910. -
    911.                  $object "literal".$i;
    912. -
    913.                  $i++;
    914. -
    915.                  $attrib[$object"label=\"$object_label\" ".$graphviz_param['LITERAL_STYLE'];
    916. -
    917.              }
    918. -
    919.              else
    920. -
    921.              {
    922. -
    923.                  if ($short_prefix == TRUE && RDFUtil::guessPrefix($object$model!= FALSE)
    924. -
    925.                  {
    926. -
    927.                      $prefix RDFUtil::guessPrefix($object$model);
    928. -
    929.                      $object_label $prefix.":".RDFUtil::guessName($object);
    930. -
    931.                      $attrib[$object"label=\"".$object_label."\" ";
    932. -
    933.                      if(!isset($prefix_array[$prefix]))
    934. -
    935.                      {
    936. -
    937.                          $prefix_array[$prefixRDFUtil::guessNamespace($object);
    938. -
    939.                      }
    940. -
    941.                  }
    942. -
    943.                  if (GRAPHVIZ_URI == TRUE)
    944. -
    945.                  {
    946. -
    947.                      $attrib[$object.= "URL=\"".$object."\"";
    948. -
    949.                  }
    950. -
    951.              }
    952. -
    953.          }
    954. -
    955.  
    956. -
    957.          // fill graph array
    958. -
    959.          $graph["\"".$subject."\" -> \"".$object."\" [".$predicate_label."];";
    960. -
    961.      }
    962. -
    963.  
    964. -
    965.      //generate DOT-file
    966. -
    967.      $dot "digraph G { ".$graphviz_param['GRAPH_STYLE']."\n edge [".$graphviz_param['PREDICATE_STYLE']."]\n node [".$graphviz_param['RESOURCE_STYLE']."]\n";
    968. -
    969.      if (isset($attrib))
    970. -
    971.      {
    972. -
    973.          foreach ($attrib AS $key => $value)
    974. -
    975.          {
    976. -
    977.              $dot .= "\"$key\" [$value];\n";
    978. -
    979.          }
    980. -
    981.      }
    982. -
    983.      if (!isset($graph))
    984. -
    985.      {
    986. -
    987.          $dot .= "error [shape=box,label=\"No Statements found!\"]";
    988. -
    989.      }
    990. -
    991.      else
    992. -
    993.      {
    994. -
    995.          $dot .= implode("\n"$graph);
    996. -
    997.      }
    998. -
    999.  
    1000. -
    1001.  
    1002. -
    1003.      if (GRAPHVIZ_STAT == TRUE)
    1004. -
    1005.      {
    1006. -
    1007.          $stat_label "| ".$model->size()." Statements drawn";
    1008. -
    1009.      }
    1010. -
    1011.      if ((strstr($graphviz_param['GRAPH_STYLE']'rankdir="LR"'=== FALSE&& (strstr($graphviz_param['GRAPH_STYLE']'rankdir=LR'=== FALSE))
    1012. -
    1013.      {
    1014. -
    1015.          $sep1 "}";
    1016. -
    1017.          $sep2 "";
    1018. -
    1019.      }
    1020. -
    1021.      else
    1022. -
    1023.      {
    1024. -
    1025.          $sep1 "";
    1026. -
    1027.          $sep2 "}";
    1028. -
    1029.      }
    1030. -
    1031.  
    1032. -
    1033.      if ($short_prefix == TRUE && isset($prefix_array))
    1034. -
    1035.      {
    1036. -
    1037.          $struct_label "{ { Base URI: ".$model->getBaseURI()." $sep1 | { { ".implode("|"array_keys($prefix_array))." } | { ".implode("|"$prefix_array)." } } $stat_label } $sep2";
    1038. -
    1039.      }
    1040. -
    1041.      else
    1042. -
    1043.      {
    1044. -
    1045.          $struct_label "{ { Base URI: ".$model->getBaseURI()."$sep1 ".$stat_label." } }";
    1046. -
    1047.      }
    1048. -
    1049.  
    1050. -
    1051.      $dot .= "\n struct [shape=Mrecord,label=\"$struct_label\",".$graphviz_param['BOX_STYLE']."];\n";
    1052. -
    1053.      $dot .= " vocabulary [style=invis];\n struct -> vocabulary [style=invis];\n}";
    1054. -
    1055.  
    1056. -
    1057.      // if needed call dot.exe
    1058. -
    1059.      if (($format != "input_dot"&& (defined('GRAPHVIZ_PATH')) && (strstr(GRAPHVIZ_FORMAT$format!== FALSE))
    1060. -
    1061.      {
    1062. -
    1063.          mt_srand((double)microtime()*1000000);
    1064. -
    1065.          $filename=GRAPHVIZ_TEMP.md5(uniqid(mt_rand())).".dot";
    1066. -
    1067.          $file_handle @fopen($filename'w');
    1068. -
    1069.          if ($file_handle)
    1070. -
    1071.          {
    1072. -
    1073.              fwrite($file_handle$dot);
    1074. -
    1075.              fclose($file_handle);
    1076. -
    1077.          }
    1078. -
    1079.          $dotinput " -T".$format." ".$filename;
    1080. -
    1081.  
    1082. -
    1083.          ob_start();
    1084. -
    1085.     passthru(GRAPHVIZ_PATH.$dotinput);
    1086. -
    1087.          $output ob_get_contents();
    1088. -
    1089.     ob_end_clean();
    1090. -
    1091.          unlink($filename);
    1092. -
    1093.          echo $output;
    1094. -
    1095.          return TRUE;
    1096. -
    1097.      }
    1098. -
    1099.      elseif ($format == "input_dot")
    1100. -
    1101.      {
    1102. -
    1103.          echo $dot;
    1104. -
    1105.          return TRUE;
    1106. -
    1107.      }
    1108. -
    1109.      else
    1110. -
    1111.      {
    1112. -
    1113.          return FALSE;
    1114. -
    1115.      }
    1116. -
    1117.  }
    1118. -
    1119.  
    1120. -
    1121. // end: RDfUtil
    1122. -
    1123.  
    1124. -
    1125. ?>
    1126. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilStatementIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilStatementIterator.php.html.svn-base deleted file mode 100755 index 4274ea75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_utility__utilStatementIterator.php.html.svn-base +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - File Source for StatementIterator.php - - - - - -

    Source for file StatementIterator.php

    -

    Documentation is available at StatementIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: StatementIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing models.
    16. -
    17.  * This class can be used for iterating forward and backward trough MemModels.
    18. -
    19.  * It should be instanced using the getIterator() method of a MemModel.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id$
    24. -
    25.  * @author Daniel Westphal <mail at d-westphal dot de>
    26. -
    27.  * @author Chris Bizer <chris@bizer.de>
    28. -
    29.  *
    30. -
    31.  * @package utility
    32. -
    33.  * @access    public
    34. -
    35.  *
    36. -
    37.  */ 
    38. -
    39.  class StatementIterator extends Object {
    40. -
    41.  
    42. -
    43.      /**
    44. -
    45.     * Reference to the MemModel
    46. -
    47.     * @var        object MemModel 
    48. -
    49.     * @access    private
    50. -
    51.     */    
    52. -
    53.     var $model;
    54. -
    55.  
    56. -
    57.      /**
    58. -
    59.     * Current position
    60. -
    61.     * StatementIterator does not use the build in PHP array iterator,
    62. -
    63.     * so you can use serveral iterators on a single MemModel.
    64. -
    65.     * @var        integer 
    66. -
    67.     * @access    private
    68. -
    69.     */    
    70. -
    71.     var $position;
    72. -
    73.    
    74. -
    75.   
    76. -
    77.    /**
    78. -
    79.     * Constructor
    80. -
    81.     *
    82. -
    83.     * @param    object    MemModel 
    84. -
    85.     * @access    public
    86. -
    87.     */
    88. -
    89.     function StatementIterator(&$model{
    90. -
    91.         $this->model $model;
    92. -
    93.         reset($this->model->triples);
    94. -
    95.         $this->position = -1;
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.   /**
    102. -
    103.    * Returns TRUE if there are more statements.
    104. -
    105.    * @return    boolean 
    106. -
    107.    * @access    public
    108. -
    109.    */
    110. -
    111.   function hasNext({
    112. -
    113.           if ($this->position == -1)
    114. -
    115.           
    116. -
    117.               if(current($this->model->triples)!=NULL)
    118. -
    119.               {
    120. -
    121.                   return TRUE;    
    122. -
    123.               else 
    124. -
    125.               {
    126. -
    127.                   return FALSE;
    128. -
    129.               }
    130. -
    131.           };
    132. -
    133.  
    134. -
    135.           if (next($this->model->triples)!=NULL 
    136. -
    137.           {    
    138. -
    139.               prev($this->model->triples);        
    140. -
    141.               return TRUE;
    142. -
    143.         else 
    144. -
    145.         {
    146. -
    147.             end($this->model->triples);
    148. -
    149.             return FALSE;
    150. -
    151.         };
    152. -
    153.    }
    154. -
    155.  
    156. -
    157.   /**
    158. -
    159.    * Returns TRUE if the first statement has not been reached.
    160. -
    161.    * @return    boolean 
    162. -
    163.    * @access    public
    164. -
    165.    */
    166. -
    167.   function hasPrevious({
    168. -
    169.           if (prev($this->model->triples)!=NULL
    170. -
    171.           {
    172. -
    173.               next($this->model->triples);
    174. -
    175.             return TRUE;
    176. -
    177.         else {
    178. -
    179.             reset($this->model->triples);
    180. -
    181.             return FALSE;
    182. -
    183.         };
    184. -
    185.   }     
    186. -
    187.    
    188. -
    189.   /**
    190. -
    191.    * Returns the next statement.
    192. -
    193.    * @return    statement or NULL if there is no next statement.
    194. -
    195.    * @access    public
    196. -
    197.    */
    198. -
    199.   function next({
    200. -
    201.           if ($this->position == -1)
    202. -
    203.           
    204. -
    205.               if($return=current($this->model->triples))
    206. -
    207.               {
    208. -
    209.                   $this->position=key($this->model->triples);
    210. -
    211.                   return $return;    
    212. -
    213.               else 
    214. -
    215.               {
    216. -
    217.                   $this->position=key($this->model->triples);
    218. -
    219.                   return NULL;
    220. -
    221.               };
    222. -
    223.           };
    224. -
    225.           
    226. -
    227.           
    228. -
    229.           if ($return=next($this->model->triples)) {
    230. -
    231.               $this->position=key($this->model->triples);
    232. -
    233.             return $return;
    234. -
    235.         else {
    236. -
    237.             $this->position=key($this->model->triples);
    238. -
    239.             return NULL;
    240. -
    241.         };
    242. -
    243.    }
    244. -
    245.  
    246. -
    247.   /**
    248. -
    249.    * Returns the previous statement.
    250. -
    251.    * @return    statement or NULL if there is no previous statement.
    252. -
    253.    * @access    public
    254. -
    255.    */
    256. -
    257.   function previous({
    258. -
    259.           if ($return=prev($this->model->triples)) {
    260. -
    261.               $this->position=key($this->model->triples);
    262. -
    263.             return $return;
    264. -
    265.         else {
    266. -
    267.             $this->position=key($this->model->triples);
    268. -
    269.             return NULL;
    270. -
    271.         }   
    272. -
    273.   }
    274. -
    275.  
    276. -
    277.   /**
    278. -
    279.    * Returns the current statement.
    280. -
    281.    * @return    statement or NULL if there is no current statement.
    282. -
    283.    * @access    public
    284. -
    285.    */
    286. -
    287.   function current({
    288. -
    289.           if ($this->position==-1return NULL;
    290. -
    291.       
    292. -
    293.           if ($return=current($this->model->triples)) {
    294. -
    295.             return $return;
    296. -
    297.         else {
    298. -
    299.             return NULL;
    300. -
    301.         }
    302. -
    303.    }
    304. -
    305.    
    306. -
    307.   /**
    308. -
    309.    * Moves the pointer to the first statement.
    310. -
    311.    * @return    void 
    312. -
    313.    * @access    public
    314. -
    315.    */
    316. -
    317.   function moveFirst({
    318. -
    319.               reset($this->model->triples);
    320. -
    321.               $this->position=0;
    322. -
    323.    }
    324. -
    325.  
    326. -
    327.   /**
    328. -
    329.    * Moves the pointer to the last statement.
    330. -
    331.    * @return    void 
    332. -
    333.    * @access    public
    334. -
    335.    */
    336. -
    337.   function moveLast({
    338. -
    339.               end($this->model->triples);
    340. -
    341.               $this->position=key($this->model->triples);
    342. -
    343.    }
    344. -
    345.    
    346. -
    347.      /**
    348. -
    349.    * Moves the pointer to a specific statement.
    350. -
    351.    * If you set an off-bounds value, the position will be set to the last element
    352. -
    353.    * @param     integer 
    354. -
    355.    * @return    void 
    356. -
    357.    * @access    public
    358. -
    359.    */
    360. -
    361.   function moveTo($position{
    362. -
    363.       
    364. -
    365.               if ($position count($this->model->triples))
    366. -
    367.               {
    368. -
    369.                   end($this->model->triples);
    370. -
    371.               else 
    372. -
    373.               {
    374. -
    375.                   reset($this->model->triples);
    376. -
    377.                   
    378. -
    379.                 for ($i 1$i $position$i++{
    380. -
    381.                    next($this->model->triples);
    382. -
    383.                 }
    384. -
    385.               };
    386. -
    387.               $this->position=key($this->model->triples);
    388. -
    389.    }
    390. -
    391.    
    392. -
    393.      /**
    394. -
    395.    * Returns the current position of the iterator.
    396. -
    397.    * @return    integer 
    398. -
    399.    * @access    public
    400. -
    401.    */
    402. -
    403.   function getCurrentPosition({
    404. -
    405.                return key($this->model->triples);
    406. -
    407.    }
    408. -
    409.   
    410. -
    411. -
    412.  
    413. -
    414. ?>
    415. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base deleted file mode 100755 index 24bcf481..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_C.php.html.svn-base +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - File Source for ATOM_C.php - - - - - -

    Source for file ATOM_C.php

    -

    Documentation is available at ATOM_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   ATOM Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    ATOM Vocabulary;.
    20. -
    21. *    For details about ATOM see: http://semtext.org/atom/atom.html.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class ATOM{
    32. -
    33.  
    34. -
    35.     function TYPE()
    36. -
    37.     {
    38. -
    39.         return  new Resource(ATOM_NS 'type');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function MODE()
    48. -
    49.     {
    50. -
    51.         return  new Resource(ATOM_NS 'mode');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function NAME()
    60. -
    61.     {
    62. -
    63.         return  new Resource(ATOM_NS 'name');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function URL()
    72. -
    73.     {
    74. -
    75.         return  new Resource(ATOM_NS 'url');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function EMAIL()
    84. -
    85.     {
    86. -
    87.         return  new Resource(ATOM_NS 'email');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function REL()
    96. -
    97.     {
    98. -
    99.         return  new Resource(ATOM_NS 'rel');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function HREF()
    108. -
    109.     {
    110. -
    111.         return  new Resource(ATOM_NS 'href');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function TITLE()
    120. -
    121.     {
    122. -
    123.         return  new Resource(ATOM_NS 'title');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ATOM_CONSTRUCT()
    132. -
    133.     {
    134. -
    135.         return  new Resource(ATOM_NS 'AtomConstruct');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function CONTENT()
    144. -
    145.     {
    146. -
    147.         return  new Resource(ATOM_NS 'Content');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSON()
    156. -
    157.     {
    158. -
    159.         return  new Resource(ATOM_NS 'Person');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function VALUE()
    168. -
    169.     {
    170. -
    171.         return  new Resource(ATOM_NS 'value');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function LINK()
    180. -
    181.     {
    182. -
    183.         return  new Resource(ATOM_NS 'Link');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function FEED()
    192. -
    193.     {
    194. -
    195.         return  new Resource(ATOM_NS 'Feed');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function VERSION()
    204. -
    205.     {
    206. -
    207.         return  new Resource(ATOM_NS 'version');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function LANG()
    216. -
    217.     {
    218. -
    219.         return  new Resource(ATOM_NS 'lang');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function AUTHOR()
    228. -
    229.     {
    230. -
    231.         return  new Resource(ATOM_NS 'author');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function CONTRIBUTOR()
    240. -
    241.     {
    242. -
    243.         return  new Resource(ATOM_NS 'contributor');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function TAGLINE()
    252. -
    253.     {
    254. -
    255.         return  new Resource(ATOM_NS 'tagline');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function GENERATOR()
    264. -
    265.     {
    266. -
    267.         return  new Resource(ATOM_NS 'generator');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function COPYRIGHT()
    276. -
    277.     {
    278. -
    279.         return  new Resource(ATOM_NS 'copyright');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function INFO()
    288. -
    289.     {
    290. -
    291.         return  new Resource(ATOM_NS 'info');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function MODIFIED()
    300. -
    301.     {
    302. -
    303.         return  new Resource(ATOM_NS 'modified');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function ENTRY()
    312. -
    313.     {
    314. -
    315.         return  new Resource(ATOM_NS 'Entry');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function HAS_CHILD()
    324. -
    325.     {
    326. -
    327.         return  new Resource(ATOM_NS 'hasChild');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function HAS_ENTRY()
    336. -
    337.     {
    338. -
    339.         return  new Resource(ATOM_NS 'hasEntry');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HAS_LINK()
    348. -
    349.     {
    350. -
    351.         return  new Resource(ATOM_NS 'hasLink');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_TITLE()
    360. -
    361.     {
    362. -
    363.         return  new Resource(ATOM_NS 'hasTitle');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ISSUED()
    372. -
    373.     {
    374. -
    375.         return  new Resource(ATOM_NS 'issued');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function CREATED()
    384. -
    385.     {
    386. -
    387.         return  new Resource(ATOM_NS 'created');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function SUMMARY()
    396. -
    397.     {
    398. -
    399.         return  new Resource(ATOM_NS 'summary');
    400. -
    401.     }
    402. -
    403. }
    404. -
    405.  
    406. -
    407.  
    408. -
    409.  
    410. -
    411. ?>
    412. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base deleted file mode 100755 index edd4bc99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyATOM_RES.php.html.svn-base +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - File Source for ATOM_RES.php - - - - - -

    Source for file ATOM_RES.php

    -

    Documentation is available at ATOM_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   ATOM Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    ATOM Vocabulary;.
    20. -
    21. *    For details about ATOM see: http://semtext.org/atom/atom.html.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class ATOM_RES{
    32. -
    33.  
    34. -
    35.     function TYPE()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(ATOM_NS 'type');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function MODE()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(ATOM_NS 'mode');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function NAME()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(ATOM_NS 'name');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function URL()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(ATOM_NS 'url');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function EMAIL()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(ATOM_NS 'email');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function REL()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(ATOM_NS 'rel');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function HREF()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(ATOM_NS 'href');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function TITLE()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(ATOM_NS 'title');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ATOM_CONSTRUCT()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(ATOM_NS 'AtomConstruct');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function CONTENT()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(ATOM_NS 'Content');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSON()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(ATOM_NS 'Person');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function VALUE()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(ATOM_NS 'value');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function LINK()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(ATOM_NS 'Link');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function FEED()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(ATOM_NS 'Feed');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function VERSION()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(ATOM_NS 'version');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function LANG()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(ATOM_NS 'lang');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function AUTHOR()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(ATOM_NS 'author');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function CONTRIBUTOR()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(ATOM_NS 'contributor');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function TAGLINE()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(ATOM_NS 'tagline');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function GENERATOR()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(ATOM_NS 'generator');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function COPYRIGHT()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(ATOM_NS 'copyright');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function INFO()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(ATOM_NS 'info');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function MODIFIED()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(ATOM_NS 'modified');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function ENTRY()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(ATOM_NS 'Entry');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function HAS_CHILD()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(ATOM_NS 'hasChild');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function HAS_ENTRY()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(ATOM_NS 'hasEntry');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HAS_LINK()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(ATOM_NS 'hasLink');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_TITLE()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(ATOM_NS 'hasTitle');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ISSUED()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(ATOM_NS 'issued');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function CREATED()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(ATOM_NS 'created');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function SUMMARY()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(ATOM_NS 'summary');
    400. -
    401.     }
    402. -
    403. }
    404. -
    405.  
    406. -
    407.  
    408. -
    409.  
    410. -
    411. ?>
    412. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base deleted file mode 100755 index 226a0c15..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_C.php.html.svn-base +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - File Source for DC_C.php - - - - - -

    Source for file DC_C.php

    -

    Documentation is available at DC_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Dublin Core Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Chris Bizer (chris@bizer.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the Dublin
    18. -
    19. *    Core Vocabulary. For details about DC see: http://dublincore.org/
    20. -
    21. *    Using the wrapper allows you to define all aspects of
    22. -
    23. *    the vocabulary in one spot, simplifing implementation and
    24. -
    25. *    maintainence.
    26. -
    27. */
    28. -
    29. class DC{
    30. -
    31.     // DC concepts
    32. -
    33.     function CONTRIBUTOR()
    34. -
    35.     {
    36. -
    37.         return  new Resource(DC_NS 'contributor');
    38. -
    39.  
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     function COVERAGE()
    46. -
    47.     {
    48. -
    49.         return  new Resource(DC_NS 'coverage');
    50. -
    51.  
    52. -
    53.     }
    54. -
    55.  
    56. -
    57.     function CREATOR()
    58. -
    59.     {
    60. -
    61.         return  new Resource(DC_NS 'creator');
    62. -
    63.  
    64. -
    65.     }
    66. -
    67.  
    68. -
    69.     function DATE()
    70. -
    71.     {
    72. -
    73.         return  new Resource(DC_NS 'date');
    74. -
    75.  
    76. -
    77.     }
    78. -
    79.  
    80. -
    81.     function DESCRIPTION()
    82. -
    83.     {
    84. -
    85.         return  new Resource(DC_NS 'description');
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     function FORMAT()
    94. -
    95.     {
    96. -
    97.         return  new Resource(DC_NS 'format');
    98. -
    99.  
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     function IDENTIFIER()
    106. -
    107.     {
    108. -
    109.         return  new Resource(DC_NS 'identifier');
    110. -
    111.  
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     function LANGUAGE()
    118. -
    119.     {
    120. -
    121.         return  new Resource(DC_NS 'language');
    122. -
    123.  
    124. -
    125.     }
    126. -
    127.  
    128. -
    129.     function PUBLISHER()
    130. -
    131.     {
    132. -
    133.         return  new Resource(DC_NS 'publisher');
    134. -
    135.  
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     function RIGHTS()
    142. -
    143.     {
    144. -
    145.         return  new Resource(DC_NS 'rights');
    146. -
    147.  
    148. -
    149.     }
    150. -
    151.  
    152. -
    153.     function SOURCE()
    154. -
    155.     {
    156. -
    157.         return  new Resource(DC_NS 'source');
    158. -
    159.  
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.     function SUBJECT()
    166. -
    167.     {
    168. -
    169.         return  new Resource(DC_NS 'subject');
    170. -
    171.  
    172. -
    173.     }
    174. -
    175.  
    176. -
    177.     function TITLE()
    178. -
    179.     {
    180. -
    181.         return  new Resource(DC_NS 'title');
    182. -
    183.  
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     function TYPE()
    190. -
    191.     {
    192. -
    193.         return  new Resource(DC_NS 'type');
    194. -
    195.     }
    196. -
    197.  
    198. -
    199.  
    200. -
    201.     // Other Elements and Element Refinements
    202. -
    203.     function ABSTRACT_()
    204. -
    205.     {
    206. -
    207.         return  new Resource(DCTERM_NS 'abstract');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function ACCESS_RIGHTS()
    216. -
    217.     {
    218. -
    219.         return  new Resource(DCTERM_NS 'accessRights');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function ALTERNATIVE()
    228. -
    229.     {
    230. -
    231.         return  new Resource(DCTERM_NS 'alternative');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function AUDIENCE()
    240. -
    241.     {
    242. -
    243.         return  new Resource(DCTERM_NS 'audience');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function AVAILABLE()
    252. -
    253.     {
    254. -
    255.         return  new Resource(DCTERM_NS 'available');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function BIBLIOGRAPHIC_CITATION()
    264. -
    265.     {
    266. -
    267.         return  new Resource(DCTERM_NS 'bibliographicCitation');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function CONFORMS_TO()
    276. -
    277.     {
    278. -
    279.         return  new Resource(DCTERM_NS 'conformsTo');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function CREATED()
    288. -
    289.     {
    290. -
    291.         return  new Resource(DCTERM_NS 'created');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function DATE_ACCEPTED()
    300. -
    301.     {
    302. -
    303.         return  new Resource(DCTERM_NS 'dateAccepted');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function DATE_COPYRIGHTED()
    312. -
    313.     {
    314. -
    315.         return  new Resource(DCTERM_NS 'dateCopyrighted');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATE_SUBMITTED()
    324. -
    325.     {
    326. -
    327.         return  new Resource(DCTERM_NS 'dateSubmitted');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function EDUCATION_LEVEL()
    336. -
    337.     {
    338. -
    339.         return  new Resource(DCTERM_NS 'educationLevel');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function EXTENT()
    348. -
    349.     {
    350. -
    351.         return  new Resource(DCTERM_NS 'extent');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_FORMAT()
    360. -
    361.     {
    362. -
    363.         return  new Resource(DCTERM_NS 'hasFormat');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function HAS_PART()
    372. -
    373.     {
    374. -
    375.         return  new Resource(DCTERM_NS 'hasPart');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function HAS_VERSION()
    384. -
    385.     {
    386. -
    387.         return  new Resource(DCTERM_NS 'hasVersion');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function IS_FORMAT_OF()
    396. -
    397.     {
    398. -
    399.         return  new Resource(DCTERM_NS 'isFormatOf');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function IS_PART_OF()
    408. -
    409.     {
    410. -
    411.         return  new Resource(DCTERM_NS 'isPartOf');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function IS_REFERENCED_BY()
    420. -
    421.     {
    422. -
    423.         return  new Resource(DCTERM_NS 'isReferencedBy');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function IS_REPLACED_BY()
    432. -
    433.     {
    434. -
    435.         return  new Resource(DCTERM_NS 'isReplacedBy');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IS_REQUIRED_BY()
    444. -
    445.     {
    446. -
    447.         return  new Resource(DCTERM_NS 'isRequiredBy');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function ISSUED()
    456. -
    457.     {
    458. -
    459.         return  new Resource(DCTERM_NS 'issued');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function IS_VERSION_OF()
    468. -
    469.     {
    470. -
    471.         return  new Resource(DCTERM_NS 'isVersionOf');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function LICENSE()
    480. -
    481.     {
    482. -
    483.         return  new Resource(DCTERM_NS 'license');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEDIATOR()
    492. -
    493.     {
    494. -
    495.         return  new Resource(DCTERM_NS 'mediator');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEDIUM()
    504. -
    505.     {
    506. -
    507.         return  new Resource(DCTERM_NS 'medium');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MODIFIED()
    516. -
    517.     {
    518. -
    519.         return  new Resource(DCTERM_NS 'modified');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function REFERENCES()
    528. -
    529.     {
    530. -
    531.         return  new Resource(DCTERM_NS 'references');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function REPLACES()
    540. -
    541.     {
    542. -
    543.         return  new Resource(DCTERM_NS 'replaces');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function REQUIRES()
    552. -
    553.     {
    554. -
    555.         return  new Resource(DCTERM_NS 'requires');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function RIGHTS_HOLDER()
    564. -
    565.     {
    566. -
    567.         return  new Resource(DCTERM_NS 'rightsHolder');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function SPATIAL()
    576. -
    577.     {
    578. -
    579.         return  new Resource(DCTERM_NS 'spatial');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function TABLE_OF_CONTENTS()
    588. -
    589.     {
    590. -
    591.         return  new Resource(DCTERM_NS 'tableOfContents');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function TEMPORAL()
    600. -
    601.     {
    602. -
    603.         return  new Resource(DCTERM_NS 'temporal');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function VALID()
    612. -
    613.     {
    614. -
    615.         return  new Resource(DCTERM_NS 'valid');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.  
    624. -
    625.     // Encoding schemes
    626. -
    627.     function BOX()
    628. -
    629.     {
    630. -
    631.         return  new Resource(DCTERM_NS 'Box');
    632. -
    633.  
    634. -
    635.     }
    636. -
    637.  
    638. -
    639.     function DCMI_TYPE()
    640. -
    641.     {
    642. -
    643.         return  new Resource(DCTERM_NS 'DCMIType');
    644. -
    645.  
    646. -
    647.     }
    648. -
    649.  
    650. -
    651.     function IMT()
    652. -
    653.     {
    654. -
    655.         return  new Resource(DCTERM_NS 'IMT');
    656. -
    657.  
    658. -
    659.     }
    660. -
    661.  
    662. -
    663.     function ISO3166()
    664. -
    665.     {
    666. -
    667.         return  new Resource(DCTERM_NS 'ISO3166');
    668. -
    669.  
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function ISO639_2()
    676. -
    677.     {
    678. -
    679.         return  new Resource(DCTERM_NS 'ISO639-2');
    680. -
    681.  
    682. -
    683.     }
    684. -
    685.  
    686. -
    687.     function LCC()
    688. -
    689.     {
    690. -
    691.         return  new Resource(DCTERM_NS 'LCC');
    692. -
    693.  
    694. -
    695.     }
    696. -
    697.  
    698. -
    699.     function LCSH()
    700. -
    701.     {
    702. -
    703.         return  new Resource(DCTERM_NS 'LCSH');
    704. -
    705.  
    706. -
    707.     }
    708. -
    709.  
    710. -
    711.     function MESH()
    712. -
    713.     {
    714. -
    715.         return  new Resource(DCTERM_NS 'MESH');
    716. -
    717.  
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     function PERIOD()
    724. -
    725.     {
    726. -
    727.         return  new Resource(DCTERM_NS 'Period');
    728. -
    729.  
    730. -
    731.     }
    732. -
    733.  
    734. -
    735.     function POINT()
    736. -
    737.     {
    738. -
    739.         return  new Resource(DCTERM_NS 'Point');
    740. -
    741.  
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     function RFC1766()
    748. -
    749.     {
    750. -
    751.         return  new Resource(DCTERM_NS 'RFC1766');
    752. -
    753.  
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     function RFC3066()
    760. -
    761.     {
    762. -
    763.         return  new Resource(DCTERM_NS 'RFC3066');
    764. -
    765.  
    766. -
    767.     }
    768. -
    769.  
    770. -
    771.     function TGN()
    772. -
    773.     {
    774. -
    775.         return  new Resource(DCTERM_NS 'TGN');
    776. -
    777.  
    778. -
    779.     }
    780. -
    781.  
    782. -
    783.     function UDC()
    784. -
    785.     {
    786. -
    787.         return  new Resource(DCTERM_NS 'UDC');
    788. -
    789.  
    790. -
    791.     }
    792. -
    793.  
    794. -
    795.     function URI()
    796. -
    797.     {
    798. -
    799.         return  new Resource(DCTERM_NS 'URI');
    800. -
    801.  
    802. -
    803.     }
    804. -
    805.  
    806. -
    807.     function W3CDTF()
    808. -
    809.     {
    810. -
    811.         return  new Resource(DCTERM_NS 'W3CDTF');
    812. -
    813.  
    814. -
    815.     }
    816. -
    817.  
    818. -
    819.  
    820. -
    821.     // DCMI Type Vocabulary
    822. -
    823.     function COLLECTION()
    824. -
    825.     {
    826. -
    827.         return  new Resource(DCMITYPE_NS 'Collection');
    828. -
    829.  
    830. -
    831.     }
    832. -
    833.  
    834. -
    835.     function DATASET()
    836. -
    837.     {
    838. -
    839.         return  new Resource(DCMITYPE_NS 'Dataset');
    840. -
    841.  
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.     function EVENT()
    848. -
    849.     {
    850. -
    851.         return  new Resource(DCMITYPE_NS 'Event');
    852. -
    853.  
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     function IMAGE()
    860. -
    861.     {
    862. -
    863.         return  new Resource(DCMITYPE_NS 'Image');
    864. -
    865.  
    866. -
    867.     }
    868. -
    869.  
    870. -
    871.     function INTERACTIVERESOURCE()
    872. -
    873.     {
    874. -
    875.         return  new Resource(DCMITYPE_NS 'Interactive_Resource');
    876. -
    877.  
    878. -
    879.     }
    880. -
    881.  
    882. -
    883.     function MOVINGIMAGE()
    884. -
    885.     {
    886. -
    887.         return  new Resource(DCMITYPE_NS 'Moving_Image');
    888. -
    889.  
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.     function PHYSICALOBJECT()
    896. -
    897.     {
    898. -
    899.         return  new Resource(DCMITYPE_NS 'Physical_Object');
    900. -
    901.  
    902. -
    903.     }
    904. -
    905.  
    906. -
    907.     function SERVICE()
    908. -
    909.     {
    910. -
    911.         return  new Resource(DCMITYPE_NS 'Service');
    912. -
    913.  
    914. -
    915.     }
    916. -
    917.  
    918. -
    919.     function SOFTWARE()
    920. -
    921.     {
    922. -
    923.         return  new Resource(DCMITYPE_NS 'Software');
    924. -
    925.  
    926. -
    927.     }
    928. -
    929.  
    930. -
    931.     function SOUND()
    932. -
    933.     {
    934. -
    935.         return  new Resource(DCMITYPE_NS 'Sound');
    936. -
    937.  
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     function STILLIMAGE()
    944. -
    945.     {
    946. -
    947.         return  new Resource(DCMITYPE_NS 'Still_Image');
    948. -
    949.  
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.     function TEXT()
    956. -
    957.     {
    958. -
    959.         return  new Resource(DCMITYPE_NS 'Text');
    960. -
    961.     }
    962. -
    963.  
    964. -
    965. }
    966. -
    967.  
    968. -
    969.  
    970. -
    971. ?>
    972. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:55 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base deleted file mode 100755 index 97400ee2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyDC_RES.php.html.svn-base +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - File Source for DC_RES.php - - - - - -

    Source for file DC_RES.php

    -

    Documentation is available at DC_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Dublin Core Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Chris Bizer (chris@bizer.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the Dublin
    18. -
    19. *    Core Vocabulary. For details about DC see: http://dublincore.org/
    20. -
    21. *    Using the wrapper allows you to define all aspects of
    22. -
    23. *    the vocabulary in one spot, simplifing implementation and
    24. -
    25. *    maintainence.
    26. -
    27. */
    28. -
    29. class DC_RES{
    30. -
    31.     // DC concepts
    32. -
    33.     function CONTRIBUTOR()
    34. -
    35.     {
    36. -
    37.         return  new ResResource(DC_NS 'contributor');
    38. -
    39.  
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     function COVERAGE()
    46. -
    47.     {
    48. -
    49.         return  new ResResource(DC_NS 'coverage');
    50. -
    51.  
    52. -
    53.     }
    54. -
    55.  
    56. -
    57.     function CREATOR()
    58. -
    59.     {
    60. -
    61.         return  new ResResource(DC_NS 'creator');
    62. -
    63.  
    64. -
    65.     }
    66. -
    67.  
    68. -
    69.     function DATE()
    70. -
    71.     {
    72. -
    73.         return  new ResResource(DC_NS 'date');
    74. -
    75.  
    76. -
    77.     }
    78. -
    79.  
    80. -
    81.     function DESCRIPTION()
    82. -
    83.     {
    84. -
    85.         return  new ResResource(DC_NS 'description');
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     function FORMAT()
    94. -
    95.     {
    96. -
    97.         return  new ResResource(DC_NS 'format');
    98. -
    99.  
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     function IDENTIFIER()
    106. -
    107.     {
    108. -
    109.         return  new ResResource(DC_NS 'identifier');
    110. -
    111.  
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     function LANGUAGE()
    118. -
    119.     {
    120. -
    121.         return  new ResResource(DC_NS 'language');
    122. -
    123.  
    124. -
    125.     }
    126. -
    127.  
    128. -
    129.     function PUBLISHER()
    130. -
    131.     {
    132. -
    133.         return  new ResResource(DC_NS 'publisher');
    134. -
    135.  
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     function RIGHTS()
    142. -
    143.     {
    144. -
    145.         return  new ResResource(DC_NS 'rights');
    146. -
    147.  
    148. -
    149.     }
    150. -
    151.  
    152. -
    153.     function SOURCE()
    154. -
    155.     {
    156. -
    157.         return  new ResResource(DC_NS 'source');
    158. -
    159.  
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.     function SUBJECT()
    166. -
    167.     {
    168. -
    169.         return  new ResResource(DC_NS 'subject');
    170. -
    171.  
    172. -
    173.     }
    174. -
    175.  
    176. -
    177.     function TITLE()
    178. -
    179.     {
    180. -
    181.         return  new ResResource(DC_NS 'title');
    182. -
    183.  
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     function TYPE()
    190. -
    191.     {
    192. -
    193.         return  new ResResource(DC_NS 'type');
    194. -
    195.     }
    196. -
    197.  
    198. -
    199.  
    200. -
    201.     // Other Elements and Element Refinements
    202. -
    203.     function ABSTRACT_()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(DCTERM_NS 'abstract');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function ACCESS_RIGHTS()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(DCTERM_NS 'accessRights');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function ALTERNATIVE()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(DCTERM_NS 'alternative');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function AUDIENCE()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(DCTERM_NS 'audience');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function AVAILABLE()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(DCTERM_NS 'available');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function BIBLIOGRAPHIC_CITATION()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(DCTERM_NS 'bibliographicCitation');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function CONFORMS_TO()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(DCTERM_NS 'conformsTo');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function CREATED()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(DCTERM_NS 'created');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function DATE_ACCEPTED()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(DCTERM_NS 'dateAccepted');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function DATE_COPYRIGHTED()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(DCTERM_NS 'dateCopyrighted');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATE_SUBMITTED()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(DCTERM_NS 'dateSubmitted');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function EDUCATION_LEVEL()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(DCTERM_NS 'educationLevel');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function EXTENT()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(DCTERM_NS 'extent');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_FORMAT()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(DCTERM_NS 'hasFormat');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function HAS_PART()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(DCTERM_NS 'hasPart');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function HAS_VERSION()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(DCTERM_NS 'hasVersion');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function IS_FORMAT_OF()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(DCTERM_NS 'isFormatOf');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function IS_PART_OF()
    408. -
    409.     {
    410. -
    411.         return  new ResResource(DCTERM_NS 'isPartOf');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function IS_REFERENCED_BY()
    420. -
    421.     {
    422. -
    423.         return  new ResResource(DCTERM_NS 'isReferencedBy');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function IS_REPLACED_BY()
    432. -
    433.     {
    434. -
    435.         return  new ResResource(DCTERM_NS 'isReplacedBy');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IS_REQUIRED_BY()
    444. -
    445.     {
    446. -
    447.         return  new ResResource(DCTERM_NS 'isRequiredBy');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function ISSUED()
    456. -
    457.     {
    458. -
    459.         return  new ResResource(DCTERM_NS 'issued');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function IS_VERSION_OF()
    468. -
    469.     {
    470. -
    471.         return  new ResResource(DCTERM_NS 'isVersionOf');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function LICENSE()
    480. -
    481.     {
    482. -
    483.         return  new ResResource(DCTERM_NS 'license');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEDIATOR()
    492. -
    493.     {
    494. -
    495.         return  new ResResource(DCTERM_NS 'mediator');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEDIUM()
    504. -
    505.     {
    506. -
    507.         return  new ResResource(DCTERM_NS 'medium');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MODIFIED()
    516. -
    517.     {
    518. -
    519.         return  new ResResource(DCTERM_NS 'modified');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function REFERENCES()
    528. -
    529.     {
    530. -
    531.         return  new ResResource(DCTERM_NS 'references');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function REPLACES()
    540. -
    541.     {
    542. -
    543.         return  new ResResource(DCTERM_NS 'replaces');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function REQUIRES()
    552. -
    553.     {
    554. -
    555.         return  new ResResource(DCTERM_NS 'requires');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function RIGHTS_HOLDER()
    564. -
    565.     {
    566. -
    567.         return  new ResResource(DCTERM_NS 'rightsHolder');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function SPATIAL()
    576. -
    577.     {
    578. -
    579.         return  new ResResource(DCTERM_NS 'spatial');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function TABLE_OF_CONTENTS()
    588. -
    589.     {
    590. -
    591.         return  new ResResource(DCTERM_NS 'tableOfContents');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function TEMPORAL()
    600. -
    601.     {
    602. -
    603.         return  new ResResource(DCTERM_NS 'temporal');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function VALID()
    612. -
    613.     {
    614. -
    615.         return  new ResResource(DCTERM_NS 'valid');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.  
    624. -
    625.     // Encoding schemes
    626. -
    627.     function BOX()
    628. -
    629.     {
    630. -
    631.         return  new ResResource(DCTERM_NS 'Box');
    632. -
    633.  
    634. -
    635.     }
    636. -
    637.  
    638. -
    639.     function DCMI_TYPE()
    640. -
    641.     {
    642. -
    643.         return  new ResResource(DCTERM_NS 'DCMIType');
    644. -
    645.  
    646. -
    647.     }
    648. -
    649.  
    650. -
    651.     function IMT()
    652. -
    653.     {
    654. -
    655.         return  new ResResource(DCTERM_NS 'IMT');
    656. -
    657.  
    658. -
    659.     }
    660. -
    661.  
    662. -
    663.     function ISO3166()
    664. -
    665.     {
    666. -
    667.         return  new ResResource(DCTERM_NS 'ISO3166');
    668. -
    669.  
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function ISO639_2()
    676. -
    677.     {
    678. -
    679.         return  new ResResource(DCTERM_NS 'ISO639-2');
    680. -
    681.  
    682. -
    683.     }
    684. -
    685.  
    686. -
    687.     function LCC()
    688. -
    689.     {
    690. -
    691.         return  new ResResource(DCTERM_NS 'LCC');
    692. -
    693.  
    694. -
    695.     }
    696. -
    697.  
    698. -
    699.     function LCSH()
    700. -
    701.     {
    702. -
    703.         return  new ResResource(DCTERM_NS 'LCSH');
    704. -
    705.  
    706. -
    707.     }
    708. -
    709.  
    710. -
    711.     function MESH()
    712. -
    713.     {
    714. -
    715.         return  new ResResource(DCTERM_NS 'MESH');
    716. -
    717.  
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     function PERIOD()
    724. -
    725.     {
    726. -
    727.         return  new ResResource(DCTERM_NS 'Period');
    728. -
    729.  
    730. -
    731.     }
    732. -
    733.  
    734. -
    735.     function POINT()
    736. -
    737.     {
    738. -
    739.         return  new ResResource(DCTERM_NS 'Point');
    740. -
    741.  
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     function RFC1766()
    748. -
    749.     {
    750. -
    751.         return  new ResResource(DCTERM_NS 'RFC1766');
    752. -
    753.  
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     function RFC3066()
    760. -
    761.     {
    762. -
    763.         return  new ResResource(DCTERM_NS 'RFC3066');
    764. -
    765.  
    766. -
    767.     }
    768. -
    769.  
    770. -
    771.     function TGN()
    772. -
    773.     {
    774. -
    775.         return  new ResResource(DCTERM_NS 'TGN');
    776. -
    777.  
    778. -
    779.     }
    780. -
    781.  
    782. -
    783.     function UDC()
    784. -
    785.     {
    786. -
    787.         return  new ResResource(DCTERM_NS 'UDC');
    788. -
    789.  
    790. -
    791.     }
    792. -
    793.  
    794. -
    795.     function URI()
    796. -
    797.     {
    798. -
    799.         return  new ResResource(DCTERM_NS 'URI');
    800. -
    801.  
    802. -
    803.     }
    804. -
    805.  
    806. -
    807.     function W3CDTF()
    808. -
    809.     {
    810. -
    811.         return  new ResResource(DCTERM_NS 'W3CDTF');
    812. -
    813.  
    814. -
    815.     }
    816. -
    817.  
    818. -
    819.  
    820. -
    821.     // DCMI Type Vocabulary
    822. -
    823.     function COLLECTION()
    824. -
    825.     {
    826. -
    827.         return  new ResResource(DCMITYPE_NS 'Collection');
    828. -
    829.  
    830. -
    831.     }
    832. -
    833.  
    834. -
    835.     function DATASET()
    836. -
    837.     {
    838. -
    839.         return  new ResResource(DCMITYPE_NS 'Dataset');
    840. -
    841.  
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.     function EVENT()
    848. -
    849.     {
    850. -
    851.         return  new ResResource(DCMITYPE_NS 'Event');
    852. -
    853.  
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     function IMAGE()
    860. -
    861.     {
    862. -
    863.         return  new ResResource(DCMITYPE_NS 'Image');
    864. -
    865.  
    866. -
    867.     }
    868. -
    869.  
    870. -
    871.     function INTERACTIVE_RESOURCE()
    872. -
    873.     {
    874. -
    875.         return  new ResResource(DCMITYPE_NS 'Interactive_Resource');
    876. -
    877.  
    878. -
    879.     }
    880. -
    881.  
    882. -
    883.     function MOVINGIMAGE()
    884. -
    885.     {
    886. -
    887.         return  new ResResource(DCMITYPE_NS 'Moving_Image');
    888. -
    889.  
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.     function PHYSICALOBJECT()
    896. -
    897.     {
    898. -
    899.         return  new ResResource(DCMITYPE_NS 'Physical_Object');
    900. -
    901.  
    902. -
    903.     }
    904. -
    905.  
    906. -
    907.     function SERVICE()
    908. -
    909.     {
    910. -
    911.         return  new ResResource(DCMITYPE_NS 'Service');
    912. -
    913.  
    914. -
    915.     }
    916. -
    917.  
    918. -
    919.     function SOFTWARE()
    920. -
    921.     {
    922. -
    923.         return  new ResResource(DCMITYPE_NS 'Software');
    924. -
    925.  
    926. -
    927.     }
    928. -
    929.  
    930. -
    931.     function SOUND()
    932. -
    933.     {
    934. -
    935.         return  new Resource(DCMITYPE_NS 'Sound');
    936. -
    937.  
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     function STILLIMAGE()
    944. -
    945.     {
    946. -
    947.         return  new ResResource(DCMITYPE_NS 'Still_Image');
    948. -
    949.  
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.     function TEXT()
    956. -
    957.     {
    958. -
    959.         return  new ResResource(DCMITYPE_NS 'Text');
    960. -
    961.     }
    962. -
    963. }
    964. -
    965.  
    966. -
    967.  
    968. -
    969.  
    970. -
    971. ?>
    972. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:58 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base deleted file mode 100755 index ca478f85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF.php.html.svn-base +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - File Source for FOAF.php - - - - - -

    Source for file FOAF.php

    -

    Documentation is available at FOAF.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // FOAF concepts
    38. -
    39. $FOAF_Agent new Resource(FOAF_NS 'Agent');
    40. -
    41. $FOAF_Document new Resource(FOAF_NS 'Document');
    42. -
    43. $FOAF_Group new Resource(FOAF_NS 'Group');
    44. -
    45. $FOAF_Image new Resource(FOAF_NS 'Image');
    46. -
    47. $FOAF_OnlineAccount new Resource(FOAF_NS 'OnlineAccount');
    48. -
    49. $FOAF_OnlineChatAccount new Resource(FOAF_NS 'OnlineChatAccount');
    50. -
    51. $FOAF_OnlineEcommerceAccount new Resource(FOAF_NS 'OnlineEcommerceAccount');
    52. -
    53. $FOAF_OnlineGamingAccount new Resource(FOAF_NS 'OnlineGamingAccount');
    54. -
    55. $FOAF_Organization new Resource(FOAF_NS 'Organization');
    56. -
    57. $FOAF_Person new Resource(FOAF_NS 'Person');
    58. -
    59. $FOAF_PersonalProfileDocument new Resource(FOAF_NS 'PersonalProfileDocument');
    60. -
    61. $FOAF_Project new Resource(FOAF_NS 'Project');
    62. -
    63. $FOAF_accountName new Resource(FOAF_NS 'accountName');
    64. -
    65. $FOAF_accountServiceHomepage new Resource(FOAF_NS 'accountServiceHomepage');
    66. -
    67. $FOAF_aimChatID new Resource(FOAF_NS 'aimChatID');
    68. -
    69. $FOAF_based_near new Resource(FOAF_NS 'based_near');
    70. -
    71. $FOAF_currentProject new Resource(FOAF_NS 'currentProject');
    72. -
    73. $FOAF_depiction new Resource(FOAF_NS 'depiction');
    74. -
    75. $FOAF_depicts new Resource(FOAF_NS 'depicts');
    76. -
    77. $FOAF_dnaChecksum new Resource(FOAF_NS 'dnaChecksum');
    78. -
    79. $FOAF_family_name new Resource(FOAF_NS 'family_name');
    80. -
    81. $FOAF_firstName new Resource(FOAF_NS 'firstName');
    82. -
    83. $FOAF_fundedBy new Resource(FOAF_NS 'fundedBy');
    84. -
    85. $FAOF_geekcode new Resource(FOAF_NS 'geekcode');
    86. -
    87. $FOAF_gender new Resource(FOAF_NS 'gender');
    88. -
    89. $FOAF_givenname new Resource(FOAF_NS 'givenname');
    90. -
    91. $FOAF_holdsAccount new Resource(FOAF_NS 'holdsAccount');
    92. -
    93. $FOAF_homepage new Resource(FOAF_NS 'homepage');
    94. -
    95. $FOAF_icqChatID new Resource(FOAF_NS 'icqChatID');
    96. -
    97. $FOAF_img new Resource(FOAF_NS 'img');
    98. -
    99. $FOAF_interest new Resource(FOAF_NS 'interest');
    100. -
    101. $FOAF_jabberID new Resource(FOAF_NS 'jabberID');
    102. -
    103. $FOAF_knows new Resource(FOAF_NS 'knows');
    104. -
    105. $FOAF_logo new Resource(FOAF_NS 'logo');
    106. -
    107. $FOAF_made new Resource(FOAF_NS 'made');
    108. -
    109. $FOAF_maker new Resource(FOAF_NS 'maker');
    110. -
    111. $FOAF_mbox new Resource(FOAF_NS 'mbox');
    112. -
    113. $FOAF_mbox_sha1sum new Resource(FOAF_NS 'mbox_sha1sum');
    114. -
    115. $FOAF_member new Resource(FOAF_NS 'member');
    116. -
    117. $FOAF_membershipClass =new Resource(FOAF_NS 'membershipClass');
    118. -
    119. $FOAF_msnChatID new Resource(FOAF_NS 'msnChatID');
    120. -
    121. $FOAF_myersBriggs new Resource(FOAF_NS 'myersBriggs');
    122. -
    123. $FOAF_name new Resource(FOAF_NS 'name');
    124. -
    125. $FOAF_nick new Resource(FOAF_NS 'nick');
    126. -
    127. $FOAF_page new Resource(FOAF_NS 'page');
    128. -
    129. $FOAF_pastProject new Resource(FOAF_NS 'pastProject');
    130. -
    131. $FOAF_phone new Resource(FOAF_NS 'phone');
    132. -
    133. $FOAF_plan new Resource(FOAF_NS 'plan');
    134. -
    135. $FOAF_primaryTopic new Resource(FOAF_NS 'primaryTopic');
    136. -
    137. $FOAF_publications new Resource(FOAF_NS 'publications');
    138. -
    139. $FOAF_schoolHomepage new Resource (FOAF_NS 'schoolHomepage');
    140. -
    141. $FOAF_sha1 new Resource (FOAF_NS 'sha1');
    142. -
    143. $FOAF_surname new Resource (FOAF_NS 'surname');
    144. -
    145. $FOAF_theme new Resource(FOAF_NS 'theme');
    146. -
    147. $FOAF_thumbnail new Resource(FOAF_NS 'thumbnail');
    148. -
    149. $FOAF_tipjar new Resource(FOAF_NS 'tipjar');
    150. -
    151. $FOAF_title new Resource(FOAF_NS 'title');
    152. -
    153. $FOAF_topic new Resource(FOAF_NS 'topic');
    154. -
    155. $FOAF_topic_interest new Resource(FOAF_NS 'topic_interest');
    156. -
    157. $FOAF_weblog new Resource(FOAF_NS 'weblog');
    158. -
    159. $FOAF_workInfoHomepage new Resource(FOAF_NS 'workInfoHomepage');
    160. -
    161. $FOAF_workplaceHomepage new Resource(FOAF_NS 'workplaceHomepage');
    162. -
    163. $FOAF_yahooChatID new Resource(FOAF_NS 'yahooChatID');
    164. -
    165.  
    166. -
    167.  
    168. -
    169.  
    170. -
    171.  
    172. -
    173. ?>
    174. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:09 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base deleted file mode 100755 index 65391fec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_C.php.html.svn-base +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - File Source for FOAF_C.php - - - - - -

    Source for file FOAF_C.php

    -

    Documentation is available at FOAF_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class FOAF{
    32. -
    33.  
    34. -
    35.  
    36. -
    37.     function AGENT()
    38. -
    39.     {
    40. -
    41.         return  new Resource(FOAF_NS 'Agent');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function DOCUMENT()
    50. -
    51.     {
    52. -
    53.         return  new Resource(FOAF_NS 'Document');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function GROUP()
    62. -
    63.     {
    64. -
    65.         return  new Resource(FOAF_NS 'Group');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function IMAGE()
    74. -
    75.     {
    76. -
    77.         return  new Resource(FOAF_NS 'Image');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function ONLINE_ACCOUNT()
    86. -
    87.     {
    88. -
    89.         return  new Resource(FOAF_NS 'OnlineAccount');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function ONLINE_CHAT_ACCOUNT()
    98. -
    99.     {
    100. -
    101.         return  new Resource(FOAF_NS 'OnlineChatAccount');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ONLINE_ECOMMERCE_ACCOUNT()
    110. -
    111.     {
    112. -
    113.         return  new Resource(FOAF_NS 'OnlineEcommerceAccount');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function ONLINE_GAMING_ACCOUNT()
    122. -
    123.     {
    124. -
    125.         return  new Resource(FOAF_NS 'OnlineGamingAccount');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function ORGANIZATION()
    134. -
    135.     {
    136. -
    137.         return  new Resource(FOAF_NS 'Organization');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function PERSON()
    146. -
    147.     {
    148. -
    149.         return  new Resource(FOAF_NS 'Person');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function PERSONAL_PROFILE_DOCUMENT()
    158. -
    159.     {
    160. -
    161.         return  new Resource(FOAF_NS 'PersonalProfileDocument');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PROJECT()
    170. -
    171.     {
    172. -
    173.         return  new Resource(FOAF_NS 'Project');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function ACCOUNT_NAME()
    182. -
    183.     {
    184. -
    185.         return  new Resource(FOAF_NS 'accountName');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function ACCOUNT_SERVICE_HOMEPAGE()
    194. -
    195.     {
    196. -
    197.         return  new Resource(FOAF_NS 'accountServiceHomepage');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function AIM_CHAT_ID()
    206. -
    207.     {
    208. -
    209.         return  new Resource(FOAF_NS 'aimChatID');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function BASED_NEAR()
    218. -
    219.     {
    220. -
    221.         return  new Resource(FOAF_NS 'based_near');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function CURRENT_PROJECT()
    230. -
    231.     {
    232. -
    233.         return  new Resource(FOAF_NS 'currentProject');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function DEPICTION()
    242. -
    243.     {
    244. -
    245.         return  new Resource(FOAF_NS 'depiction');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function DEPICTS()
    254. -
    255.     {
    256. -
    257.         return  new Resource(FOAF_NS 'depicts');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function DNA_CHECKSUM()
    266. -
    267.     {
    268. -
    269.         return  new Resource(FOAF_NS 'dnaChecksum');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FAMILY_NAME()
    278. -
    279.     {
    280. -
    281.         return  new Resource(FOAF_NS 'family_name');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function FIRST_NAME()
    290. -
    291.     {
    292. -
    293.         return  new Resource(FOAF_NS 'firstName');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function FUNDED_BY()
    302. -
    303.     {
    304. -
    305.         return  new Resource(FOAF_NS 'fundedBy');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function GEEKCODE()
    314. -
    315.     {
    316. -
    317.         return  new Resource(FOAF_NS 'geekcode');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function GENDER()
    326. -
    327.     {
    328. -
    329.         return  new Resource(FOAF_NS 'gender');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GIVENNAME()
    338. -
    339.     {
    340. -
    341.         return  new Resource(FOAF_NS 'givenname');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function HOLDS_ACCOUNT()
    350. -
    351.     {
    352. -
    353.         return  new Resource(FOAF_NS 'holdsAccount');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function HOMEPAGE()
    362. -
    363.     {
    364. -
    365.         return  new Resource(FOAF_NS 'homepage');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function ICQ_CHAT_ID()
    374. -
    375.     {
    376. -
    377.         return  new Resource(FOAF_NS 'icqChatID');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function IMG()
    386. -
    387.     {
    388. -
    389.         return  new Resource(FOAF_NS 'img');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function INTEREST()
    398. -
    399.     {
    400. -
    401.         return  new Resource(FOAF_NS 'interest');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function JABBER_ID()
    410. -
    411.     {
    412. -
    413.         return  new Resource(FOAF_NS 'jabberID');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function KNOWS()
    422. -
    423.     {
    424. -
    425.         return  new Resource(FOAF_NS 'knows');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function LOGO()
    434. -
    435.     {
    436. -
    437.         return  new Resource(FOAF_NS 'logo');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function MADE()
    446. -
    447.     {
    448. -
    449.         return  new Resource(FOAF_NS 'made');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function MAKER()
    458. -
    459.     {
    460. -
    461.         return  new Resource(FOAF_NS 'maker');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MBOX()
    470. -
    471.     {
    472. -
    473.         return  new Resource(FOAF_NS 'mbox');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function MBOX_SHA1SUM()
    482. -
    483.     {
    484. -
    485.         return  new Resource(FOAF_NS 'mbox_sha1sum');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function MEMBER()
    494. -
    495.     {
    496. -
    497.         return  new Resource(FOAF_NS 'member');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function MEMBERSHIP_CLASS()
    506. -
    507.     {
    508. -
    509.         return new Resource(FOAF_NS 'membershipClass');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function MSN_CHAT_ID()
    518. -
    519.     {
    520. -
    521.         return  new Resource(FOAF_NS 'msnChatID');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function MYERS_BRIGGS()
    530. -
    531.     {
    532. -
    533.         return  new Resource(FOAF_NS 'myersBriggs');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function NAME()
    542. -
    543.     {
    544. -
    545.         return  new Resource(FOAF_NS 'name');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function NICK()
    554. -
    555.     {
    556. -
    557.         return  new Resource(FOAF_NS 'nick');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function PAGE()
    566. -
    567.     {
    568. -
    569.         return  new Resource(FOAF_NS 'page');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function PAST_PROJECT()
    578. -
    579.     {
    580. -
    581.         return  new Resource(FOAF_NS 'pastProject');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function PHONE()
    590. -
    591.     {
    592. -
    593.         return  new Resource(FOAF_NS 'phone');
    594. -
    595.  
    596. -
    597.     }
    598. -
    599.  
    600. -
    601.     function PLAN()
    602. -
    603.     {
    604. -
    605.         return  new Resource(FOAF_NS 'plan');
    606. -
    607.  
    608. -
    609.     }
    610. -
    611.  
    612. -
    613.     function PRIMARY_TOPIC()
    614. -
    615.     {
    616. -
    617.         return  new Resource(FOAF_NS 'primaryTopic');
    618. -
    619.  
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     function PUBLICATIONS()
    626. -
    627.     {
    628. -
    629.         return  new Resource(FOAF_NS 'publications');
    630. -
    631.  
    632. -
    633.     }
    634. -
    635.  
    636. -
    637.     function SCHOOL_HOMEPAGE()
    638. -
    639.     {
    640. -
    641.         return  new Resource (FOAF_NS 'schoolHomepage');
    642. -
    643.  
    644. -
    645.     }
    646. -
    647.  
    648. -
    649.     function SHA1()
    650. -
    651.     {
    652. -
    653.         return  new Resource (FOAF_NS 'sha1');
    654. -
    655.  
    656. -
    657.     }
    658. -
    659.  
    660. -
    661.     function SURNAME()
    662. -
    663.     {
    664. -
    665.         return  new Resource (FOAF_NS 'surname');
    666. -
    667.  
    668. -
    669.     }
    670. -
    671.  
    672. -
    673.     function THEME()
    674. -
    675.     {
    676. -
    677.         return  new Resource(FOAF_NS 'theme');
    678. -
    679.  
    680. -
    681.     }
    682. -
    683.  
    684. -
    685.     function THUMBNAIL()
    686. -
    687.     {
    688. -
    689.         return  new Resource(FOAF_NS 'thumbnail');
    690. -
    691.  
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.     function TIPJAR()
    698. -
    699.     {
    700. -
    701.         return  new Resource(FOAF_NS 'tipjar');
    702. -
    703.  
    704. -
    705.     }
    706. -
    707.  
    708. -
    709.     function TITLE()
    710. -
    711.     {
    712. -
    713.         return  new Resource(FOAF_NS 'title');
    714. -
    715.  
    716. -
    717.     }
    718. -
    719.  
    720. -
    721.     function TOPIC()
    722. -
    723.     {
    724. -
    725.         return  new Resource(FOAF_NS 'topic');
    726. -
    727.  
    728. -
    729.     }
    730. -
    731.  
    732. -
    733.     function TOPIC_INTEREST()
    734. -
    735.     {
    736. -
    737.         return  new Resource(FOAF_NS 'topic_interest');
    738. -
    739.  
    740. -
    741.     }
    742. -
    743.  
    744. -
    745.     function WEBLOG()
    746. -
    747.     {
    748. -
    749.         return  new Resource(FOAF_NS 'weblog');
    750. -
    751.  
    752. -
    753.     }
    754. -
    755.  
    756. -
    757.     function WORK_INFO_HOMEPAGE()
    758. -
    759.     {
    760. -
    761.         return  new Resource(FOAF_NS 'workInfoHomepage');
    762. -
    763.  
    764. -
    765.     }
    766. -
    767.  
    768. -
    769.     function WORKPLACE_HOMEPAGE()
    770. -
    771.     {
    772. -
    773.         return  new Resource(FOAF_NS 'workplaceHomepage');
    774. -
    775.  
    776. -
    777.     }
    778. -
    779.  
    780. -
    781.     function YAHOO_CHAT_ID()
    782. -
    783.     {
    784. -
    785.         return  new Resource(FOAF_NS 'yahooChatID');
    786. -
    787.     }
    788. -
    789. }
    790. -
    791.  
    792. -
    793.  
    794. -
    795.  
    796. -
    797.  
    798. -
    799.  
    800. -
    801. ?>
    802. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base deleted file mode 100755 index 800735aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyFOAF_RES.php.html.svn-base +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - File Source for FOAF_RES.php - - - - - -

    Source for file FOAF_RES.php

    -

    Documentation is available at FOAF_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class FOAF_RES{
    32. -
    33.  
    34. -
    35.     function AGENT()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(FOAF_NS 'Agent');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function DOCUMENT()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(FOAF_NS 'Document');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function GROUP()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(FOAF_NS 'Group');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function IMAGE()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(FOAF_NS 'Image');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ONLINE_ACCOUNT()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(FOAF_NS 'OnlineAccount');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function ONLINE_CHAT_ACCOUNT()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(FOAF_NS 'OnlineChatAccount');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function ONLINE_ECOMMERCE_ACCOUNT()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(FOAF_NS 'OnlineEcommerceAccount');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function ONLINE_GAMING_ACCOUNT()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(FOAF_NS 'OnlineGamingAccount');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ORGANIZATION()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(FOAF_NS 'Organization');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function PERSON()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(FOAF_NS 'Person');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSONAL_PROFILE_DOCUMENT()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(FOAF_NS 'PersonalProfileDocument');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function PROJECT()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(FOAF_NS 'Project');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function ACCOUNT_NAME()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(FOAF_NS 'accountName');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function ACCOUNT_SERVICE_HOMEPAGE()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(FOAF_NS 'accountServiceHomepage');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function AIM_CHAT_ID()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(FOAF_NS 'aimChatID');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function BASED_NEAR()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(FOAF_NS 'based_near');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function CURRENT_PROJECT()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(FOAF_NS 'currentProject');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function DEPICTION()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(FOAF_NS 'depiction');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function DEPICTS()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(FOAF_NS 'depicts');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function DNA_CHECKSUM()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(FOAF_NS 'dnaChecksum');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function FAMILY_NAME()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(FOAF_NS 'family_name');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function FIRST_NAME()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(FOAF_NS 'firstName');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function FUNDED_BY()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(FOAF_NS 'fundedBy');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function GEEKCODE()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(FOAF_NS 'geekcode');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function GENDER()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(FOAF_NS 'gender');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function GIVENNAME()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(FOAF_NS 'givenname');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HOLDS_ACCOUNT()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(FOAF_NS 'holdsAccount');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HOMEPAGE()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(FOAF_NS 'homepage');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ICQ_CHAT_ID()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(FOAF_NS 'icqChatID');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function IMG()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(FOAF_NS 'img');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function INTEREST()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(FOAF_NS 'interest');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function JABBER_ID()
    408. -
    409.     {
    410. -
    411.         return  new ResResource(FOAF_NS 'jabberID');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function KNOWS()
    420. -
    421.     {
    422. -
    423.         return  new ResResource(FOAF_NS 'knows');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function LOGO()
    432. -
    433.     {
    434. -
    435.         return  new ResResource(FOAF_NS 'logo');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function MADE()
    444. -
    445.     {
    446. -
    447.         return  new ResResource(FOAF_NS 'made');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function MAKER()
    456. -
    457.     {
    458. -
    459.         return  new ResResource(FOAF_NS 'maker');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function MBOX()
    468. -
    469.     {
    470. -
    471.         return  new ResResource(FOAF_NS 'mbox');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function MBOX_SHA1SUM()
    480. -
    481.     {
    482. -
    483.         return  new ResResource(FOAF_NS 'mbox_sha1sum');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEMBER()
    492. -
    493.     {
    494. -
    495.         return  new ResResource(FOAF_NS 'member');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEMBERSHIP_CLASS()
    504. -
    505.     {
    506. -
    507.         return new ResResource(FOAF_NS 'membershipClass');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MSN_CHAT_ID()
    516. -
    517.     {
    518. -
    519.         return  new ResResource(FOAF_NS 'msnChatID');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function MYERS_BRIGGS()
    528. -
    529.     {
    530. -
    531.         return  new ResResource(FOAF_NS 'myersBriggs');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function NAME()
    540. -
    541.     {
    542. -
    543.         return  new ResResource(FOAF_NS 'name');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function NICK()
    552. -
    553.     {
    554. -
    555.         return  new ResResource(FOAF_NS 'nick');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function PAGE()
    564. -
    565.     {
    566. -
    567.         return  new ResResource(FOAF_NS 'page');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function PAST_PROJECT()
    576. -
    577.     {
    578. -
    579.         return  new ResResource(FOAF_NS 'pastProject');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function PHONE()
    588. -
    589.     {
    590. -
    591.         return  new ResResource(FOAF_NS 'phone');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function PLAN()
    600. -
    601.     {
    602. -
    603.         return  new ResResource(FOAF_NS 'plan');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function PRIMARY_TOPIC()
    612. -
    613.     {
    614. -
    615.         return  new ResResource(FOAF_NS 'primaryTopic');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.     function PUBLICATIONS()
    624. -
    625.     {
    626. -
    627.         return  new ResResource(FOAF_NS 'publications');
    628. -
    629.  
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     function SCHOOL_HOMEPAGE()
    636. -
    637.     {
    638. -
    639.         return  new ResResource (FOAF_NS 'schoolHomepage');
    640. -
    641.  
    642. -
    643.     }
    644. -
    645.  
    646. -
    647.     function SHA1()
    648. -
    649.     {
    650. -
    651.         return  new ResResource (FOAF_NS 'sha1');
    652. -
    653.  
    654. -
    655.     }
    656. -
    657.  
    658. -
    659.     function SURNAME()
    660. -
    661.     {
    662. -
    663.         return  new ResResource (FOAF_NS 'surname');
    664. -
    665.  
    666. -
    667.     }
    668. -
    669.  
    670. -
    671.     function THEME()
    672. -
    673.     {
    674. -
    675.         return  new ResResource(FOAF_NS 'theme');
    676. -
    677.  
    678. -
    679.     }
    680. -
    681.  
    682. -
    683.     function THUMBNAIL()
    684. -
    685.     {
    686. -
    687.         return  new ResResource(FOAF_NS 'thumbnail');
    688. -
    689.  
    690. -
    691.     }
    692. -
    693.  
    694. -
    695.     function TIPJAR()
    696. -
    697.     {
    698. -
    699.         return  new ResResource(FOAF_NS 'tipjar');
    700. -
    701.  
    702. -
    703.     }
    704. -
    705.  
    706. -
    707.     function TITLE()
    708. -
    709.     {
    710. -
    711.         return  new ResResource(FOAF_NS 'title');
    712. -
    713.  
    714. -
    715.     }
    716. -
    717.  
    718. -
    719.     function TOPIC()
    720. -
    721.     {
    722. -
    723.         return  new ResResource(FOAF_NS 'topic');
    724. -
    725.  
    726. -
    727.     }
    728. -
    729.  
    730. -
    731.     function TOPIC_INTEREST()
    732. -
    733.     {
    734. -
    735.         return  new ResResource(FOAF_NS 'topic_interest');
    736. -
    737.  
    738. -
    739.     }
    740. -
    741.  
    742. -
    743.     function WEBLOG()
    744. -
    745.     {
    746. -
    747.         return  new ResResource(FOAF_NS 'weblog');
    748. -
    749.  
    750. -
    751.     }
    752. -
    753.  
    754. -
    755.     function WORK_INFO_HOMEPAGE()
    756. -
    757.     {
    758. -
    759.         return  new ResResource(FOAF_NS 'workInfoHomepage');
    760. -
    761.  
    762. -
    763.     }
    764. -
    765.  
    766. -
    767.     function WORKPLACE_HOMEPAGE()
    768. -
    769.     {
    770. -
    771.         return  new ResResource(FOAF_NS 'workplaceHomepage');
    772. -
    773.  
    774. -
    775.     }
    776. -
    777.  
    778. -
    779.     function YAHOO_CHAT_ID()
    780. -
    781.     {
    782. -
    783.         return  new ResResource(FOAF_NS 'yahooChatID');
    784. -
    785.     }
    786. -
    787. }
    788. -
    789.  
    790. -
    791.  
    792. -
    793.  
    794. -
    795.  
    796. -
    797. ?>
    798. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base deleted file mode 100755 index 3cd62362..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL.php.html.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for OWL.php - - - - - -

    Source for file OWL.php

    -

    Documentation is available at OWL.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33. // OWL concepts
    34. -
    35. $OWL_AnnotationProperty new Resource(OWL_NS 'AnnotationProperty');
    36. -
    37. $OWL_AllDifferent new Resource(OWL_NS 'AllDifferent');
    38. -
    39. $OWL_allValuesFrom new Resource(OWL_NS 'allValuesFrom');
    40. -
    41. $OWL_backwardCompatibleWith new Resource(OWL_NS 'backwardCompatibleWith');
    42. -
    43. $OWL_cardinality new Resource(OWL_NS 'cardinality');
    44. -
    45. $OWL_Class new Resource(OWL_NS 'Class');
    46. -
    47. $OWL_complementOf new Resource(OWL_NS 'complementOf');
    48. -
    49. $OWL_Datatype new Resource(OWL_NS 'Datatype');
    50. -
    51. $OWL_DatatypeProperty new Resource(OWL_NS 'DatatypeProperty');
    52. -
    53. $OWL_DataRange new Resource(OWL_NS 'DataRange');
    54. -
    55. $OWL_DatatypeRestriction new Resource(OWL_NS 'DatatypeRestriction');
    56. -
    57. $OWL_DeprecatedClass new Resource(OWL_NS 'DeprecatedClass');
    58. -
    59. $OWL_DeprecatedProperty new Resource(OWL_NS 'DeprecatedProperty');
    60. -
    61. $OWL_distinctMembers new Resource(OWL_NS 'distinctMembers');
    62. -
    63. $OWL_differentFrom new Resource(OWL_NS 'differentFrom');
    64. -
    65. $OWL_disjointWith new Resource(OWL_NS 'disjointWith');
    66. -
    67. $OWL_equivalentClass new Resource(OWL_NS 'equivalentClass');
    68. -
    69. $OWL_equivalentProperty new Resource(OWL_NS 'equivalentProperty');
    70. -
    71. $OWL_FunctionalProperty new Resource(OWL_NS 'FunctionalProperty');
    72. -
    73. $OWL_hasValue new Resource(OWL_NS 'hasValue');
    74. -
    75. $OWL_incompatibleWith new Resource(OWL_NS 'incompatibleWith');
    76. -
    77. $OWL_imports new Resource(OWL_NS 'imports');
    78. -
    79. $OWL_intersectionOf new Resource(OWL_NS 'intersectionOf');
    80. -
    81. $OWL_InverseFunctionalProperty new Resource(OWL_NS 'InverseFunctionalProperty');
    82. -
    83. $OWL_inverseOf new Resource(OWL_NS 'inverseOf');
    84. -
    85. $OWL_maxCardinality new Resource(OWL_NS 'maxCardinality');
    86. -
    87. $OWL_minCardinality new Resource(OWL_NS 'minCardinality');
    88. -
    89. $OWL_Nothing new Resource(OWL_NS 'Nothing');
    90. -
    91. $OWL_ObjectClass new Resource(OWL_NS 'ObjectClass');
    92. -
    93. $OWL_ObjectProperty new Resource(OWL_NS 'ObjectProperty');
    94. -
    95. $OWL_ObjectRestriction new Resource(OWL_NS 'ObjectRestriction');
    96. -
    97. $OWL_oneOf new Resource(OWL_NS 'oneOf');
    98. -
    99. $OWL_onProperty new Resource(OWL_NS 'onProperty');
    100. -
    101. $OWL_Ontology new Resource(OWL_NS 'Ontology');
    102. -
    103. $OWL_priorVersion new Resource(OWL_NS 'priorVersion');
    104. -
    105. $OWL_Property new Resource(OWL_NS 'Property');
    106. -
    107. $OWL_Restriction new Resource(OWL_NS 'Restriction');
    108. -
    109. $OWL_sameAs new Resource(OWL_NS 'sameAs');
    110. -
    111. $OWL_sameClassAs new Resource(OWL_NS 'sameClassAs');
    112. -
    113. $OWL_sameIndividualAs new Resource(OWL_NS 'sameIndividualAs');
    114. -
    115. $OWL_samePropertyAs new Resource(OWL_NS 'samePropertyAs');
    116. -
    117. $OWL_someValuesFrom new Resource(OWL_NS 'someValuesFrom');
    118. -
    119. $OWL_SymmetricProperty new Resource(OWL_NS 'SymmetricProperty');
    120. -
    121. $OWL_Thing new Resource(OWL_NS 'Thing');
    122. -
    123. $OWL_TransitiveProperty new Resource(OWL_NS 'TransitiveProperty');
    124. -
    125. $OWL_unionOf new Resource(OWL_NS 'unionOf');
    126. -
    127. $OWL_versionInfo new Resource(OWL_NS 'versionInfo');
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base deleted file mode 100755 index 56bde13f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_C.php.html.svn-base +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - File Source for OWL_C.php - - - - - -

    Source for file OWL_C.php

    -

    Documentation is available at OWL_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class OWL{
    32. -
    33.  
    34. -
    35.     // OWL concepts
    36. -
    37.     function ANNOTATION_PROPERTY()
    38. -
    39.     {
    40. -
    41.         return  new Resource(OWL_NS 'AnnotationProperty');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ALL_DIFFERENT()
    50. -
    51.     {
    52. -
    53.         return  new Resource(OWL_NS 'AllDifferent');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ALL_VALUES_FROM()
    62. -
    63.     {
    64. -
    65.         return  new Resource(OWL_NS 'allValuesFrom');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function BACKWARD_COMPATIBLE_WITH()
    74. -
    75.     {
    76. -
    77.         return  new Resource(OWL_NS 'backwardCompatibleWith');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function CARDINALITY()
    86. -
    87.     {
    88. -
    89.         return  new Resource(OWL_NS 'cardinality');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function OWL_CLASS()
    98. -
    99.     {
    100. -
    101.         return  new Resource(OWL_NS 'Class');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function COMPLEMENT_OF()
    110. -
    111.     {
    112. -
    113.         return  new Resource(OWL_NS 'complementOf');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function DATATYPE()
    122. -
    123.     {
    124. -
    125.         return  new Resource(OWL_NS 'Datatype');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function DATATYPE_PROPERTY()
    134. -
    135.     {
    136. -
    137.         return  new Resource(OWL_NS 'DatatypeProperty');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function DATA_RANGE()
    146. -
    147.     {
    148. -
    149.         return  new Resource(OWL_NS 'DataRange');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function DATATYPE_RESTRICTION()
    158. -
    159.     {
    160. -
    161.         return  new Resource(OWL_NS 'DatatypeRestriction');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function DEPRECATED_CLASS()
    170. -
    171.     {
    172. -
    173.         return  new Resource(OWL_NS 'DeprecatedClass');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function DEPRECATED_PROPERTY()
    182. -
    183.     {
    184. -
    185.         return  new Resource(OWL_NS 'DeprecatedProperty');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DISTINCT_MEMBERS()
    194. -
    195.     {
    196. -
    197.         return  new Resource(OWL_NS 'distinctMembers');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function DIFFERENT_FROM()
    206. -
    207.     {
    208. -
    209.         return  new Resource(OWL_NS 'differentFrom');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function DISJOINT_WITH()
    218. -
    219.     {
    220. -
    221.         return  new Resource(OWL_NS 'disjointWith');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function EQUIVALENT_CLASS()
    230. -
    231.     {
    232. -
    233.         return  new Resource(OWL_NS 'equivalentClass');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function EQUIVALENT_PROPERTY()
    242. -
    243.     {
    244. -
    245.         return  new Resource(OWL_NS 'equivalentProperty');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function FUNCTIONAL_PROPERTY()
    254. -
    255.     {
    256. -
    257.         return  new Resource(OWL_NS 'FunctionalProperty');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function HAS_VALUE()
    266. -
    267.     {
    268. -
    269.         return  new Resource(OWL_NS 'hasValue');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function INCOMPATIBLE_WITH()
    278. -
    279.     {
    280. -
    281.         return  new Resource(OWL_NS 'incompatibleWith');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function IMPORTS()
    290. -
    291.     {
    292. -
    293.         return  new Resource(OWL_NS 'imports');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function INTERSECTION_OF()
    302. -
    303.     {
    304. -
    305.         return  new Resource(OWL_NS 'intersectionOf');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function INVERSE_FUNCTIONAL_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return  new Resource(OWL_NS 'InverseFunctionalProperty');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function INVERSE_OF()
    326. -
    327.     {
    328. -
    329.         return  new Resource(OWL_NS 'inverseOf');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function MAX_CARDINALITY()
    338. -
    339.     {
    340. -
    341.         return  new Resource(OWL_NS 'maxCardinality');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function MIN_CARDINALITY()
    350. -
    351.     {
    352. -
    353.         return  new Resource(OWL_NS 'minCardinality');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function NOTHING()
    362. -
    363.     {
    364. -
    365.         return  new Resource(OWL_NS 'Nothing');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function OBJECT_CLASS()
    374. -
    375.     {
    376. -
    377.         return  new Resource(OWL_NS 'ObjectClass');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function OBJECT_PROPERTY()
    386. -
    387.     {
    388. -
    389.         return  new Resource(OWL_NS 'ObjectProperty');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function OBJECT_RESTRICTION()
    398. -
    399.     {
    400. -
    401.         return  new Resource(OWL_NS 'ObjectRestriction');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function ONE_OF()
    410. -
    411.     {
    412. -
    413.         return  new Resource(OWL_NS 'oneOf');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ON_PROPERTY()
    422. -
    423.     {
    424. -
    425.         return  new Resource(OWL_NS 'onProperty');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function ONTOLOGY()
    434. -
    435.     {
    436. -
    437.         return  new Resource(OWL_NS 'Ontology');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function PRIOR_VERSION()
    446. -
    447.     {
    448. -
    449.         return  new Resource(OWL_NS 'priorVersion');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function PROPERTY()
    458. -
    459.     {
    460. -
    461.         return  new Resource(OWL_NS 'Property');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function RESTRICTION()
    470. -
    471.     {
    472. -
    473.         return  new Resource(OWL_NS 'Restriction');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function SAME_AS()
    482. -
    483.     {
    484. -
    485.         return  new Resource(OWL_NS 'sameAs');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function SAME_CLASS_AS()
    494. -
    495.     {
    496. -
    497.         return  new Resource(OWL_NS 'sameClassAs');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function SAME_INDIVIDUAL_AS()
    506. -
    507.     {
    508. -
    509.         return  new Resource(OWL_NS 'sameIndividualAs');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function SAME_PROPERTY_AS()
    518. -
    519.     {
    520. -
    521.         return  new Resource(OWL_NS 'samePropertyAs');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function SOME_VALUES_FROM()
    530. -
    531.     {
    532. -
    533.         return  new Resource(OWL_NS 'someValuesFrom');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function SYMMETRIC_PROPERTY()
    542. -
    543.     {
    544. -
    545.         return  new Resource(OWL_NS 'SymmetricProperty');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function THING()
    554. -
    555.     {
    556. -
    557.         return  new Resource(OWL_NS 'Thing');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TRANSITIVE_PROPERTY()
    566. -
    567.     {
    568. -
    569.         return  new Resource(OWL_NS 'TransitiveProperty');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function UNION_OF()
    578. -
    579.     {
    580. -
    581.         return  new Resource(OWL_NS 'unionOf');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function VERSION_INFO()
    590. -
    591.     {
    592. -
    593.         return  new Resource(OWL_NS 'versionInfo');
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. }
    600. -
    601.  
    602. -
    603.  
    604. -
    605. ?>
    606. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base deleted file mode 100755 index 5a0b5404..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyOWL_RES.php.html.svn-base +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - File Source for OWL_RES.php - - - - - -

    Source for file OWL_RES.php

    -

    Documentation is available at OWL_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class OWL_RES{
    32. -
    33.  
    34. -
    35.     // OWL concepts
    36. -
    37.     function ANNOTATION_PROPERTY()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(OWL_NS 'AnnotationProperty');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ALL_DIFFERENT()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(OWL_NS 'AllDifferent');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ALL_VALUES_FROM()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(OWL_NS 'allValuesFrom');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function BACKWARD_COMPATIBLE_WITH()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(OWL_NS 'backwardCompatibleWith');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function CARDINALITY()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(OWL_NS 'cardinality');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function OWL_CLASS()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(OWL_NS 'Class');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function COMPLEMENT_OF()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(OWL_NS 'complementOf');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function DATATYPE()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(OWL_NS 'Datatype');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function DATATYPE_PROPERTY()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(OWL_NS 'DatatypeProperty');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function DATA_RANGE()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(OWL_NS 'DataRange');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function DATATYPE_RESTRICTION()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(OWL_NS 'DatatypeRestriction');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function DEPRECATED_CLASS()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(OWL_NS 'DeprecatedClass');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function DEPRECATED_PROPERTY()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(OWL_NS 'DeprecatedProperty');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DISTINCT_MEMBERS()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(OWL_NS 'distinctMembers');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function DIFFERENT_FROM()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(OWL_NS 'differentFrom');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function DISJOINT_WITH()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(OWL_NS 'disjointWith');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function EQUIVALENT_CLASS()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(OWL_NS 'equivalentClass');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function EQUIVALENT_PROPERTY()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(OWL_NS 'equivalentProperty');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function FUNCTIONAL_PROPERTY()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(OWL_NS 'FunctionalProperty');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function HAS_VALUE()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(OWL_NS 'hasValue');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function INCOMPATIBLE_WITH()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(OWL_NS 'incompatibleWith');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function IMPORTS()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(OWL_NS 'imports');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function INTERSECTION_OF()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(OWL_NS 'intersectionOf');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function INVERSE_FUNCTIONAL_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(OWL_NS 'InverseFunctionalProperty');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function INVERSE_OF()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(OWL_NS 'inverseOf');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function MAX_CARDINALITY()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(OWL_NS 'maxCardinality');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function MIN_CARDINALITY()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(OWL_NS 'minCardinality');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function NOTHING()
    362. -
    363.     {
    364. -
    365.         return  new ResResource(OWL_NS 'Nothing');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function OBJECT_CLASS()
    374. -
    375.     {
    376. -
    377.         return  new ResResource(OWL_NS 'ObjectClass');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function OBJECT_PROPERTY()
    386. -
    387.     {
    388. -
    389.         return  new ResResource(OWL_NS 'ObjectProperty');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function OBJECT_RESTRICTION()
    398. -
    399.     {
    400. -
    401.         return  new ResResource(OWL_NS 'ObjectRestriction');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function ONE_OF()
    410. -
    411.     {
    412. -
    413.         return  new ResResource(OWL_NS 'oneOf');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ON_PROPERTY()
    422. -
    423.     {
    424. -
    425.         return  new ResResource(OWL_NS 'onProperty');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function ONTOLOGY()
    434. -
    435.     {
    436. -
    437.         return  new ResResource(OWL_NS 'Ontology');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function PRIOR_VERSION()
    446. -
    447.     {
    448. -
    449.         return  new ResResource(OWL_NS 'priorVersion');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function PROPERTY()
    458. -
    459.     {
    460. -
    461.         return  new ResResource(OWL_NS 'Property');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function RESTRICTION()
    470. -
    471.     {
    472. -
    473.         return  new ResResource(OWL_NS 'Restriction');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function SAME_AS()
    482. -
    483.     {
    484. -
    485.         return  new ResResource(OWL_NS 'sameAs');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function SAME_CLASS_AS()
    494. -
    495.     {
    496. -
    497.         return  new ResResource(OWL_NS 'sameClassAs');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function SAME_INDIVIDUAL_AS()
    506. -
    507.     {
    508. -
    509.         return  new ResResource(OWL_NS 'sameIndividualAs');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function SAME_PROPERTY_AS()
    518. -
    519.     {
    520. -
    521.         return  new ResResource(OWL_NS 'samePropertyAs');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function SOME_VALUES_FROM()
    530. -
    531.     {
    532. -
    533.         return  new ResResource(OWL_NS 'someValuesFrom');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function SYMMETRIC_PROPERTY()
    542. -
    543.     {
    544. -
    545.         return  new ResResource(OWL_NS 'SymmetricProperty');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function THING()
    554. -
    555.     {
    556. -
    557.         return  new ResResource(OWL_NS 'Thing');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TRANSITIVE_PROPERTY()
    566. -
    567.     {
    568. -
    569.         return  new ResResource(OWL_NS 'TransitiveProperty');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function UNION_OF()
    578. -
    579.     {
    580. -
    581.         return  new ResResource(OWL_NS 'unionOf');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function VERSION_INFO()
    590. -
    591.     {
    592. -
    593.         return  new ResResource(OWL_NS 'versionInfo');
    594. -
    595.     }
    596. -
    597. }
    598. -
    599.  
    600. -
    601.  
    602. -
    603.  
    604. -
    605. ?>
    606. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:23 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base deleted file mode 100755 index 8f4b7cbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF.php.html.svn-base +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - File Source for RDF.php - - - - - -

    Source for file RDF.php

    -

    Documentation is available at RDF.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33.  
    34. -
    35. // RDF concepts (constants are defined in constants.php)
    36. -
    37. $RDF_Alt new Resource(RDF_NAMESPACE_URI RDF_ALT);
    38. -
    39. $RDF_Bag new Resource(RDF_NAMESPACE_URI RDF_BAG);
    40. -
    41. $RDF_Property new Resource(RDF_NAMESPACE_URI RDF_PROPERTY);
    42. -
    43. $RDF_Seq new Resource(RDF_NAMESPACE_URI RDF_SEQ);
    44. -
    45. $RDF_Statement new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    46. -
    47. $RDF_List new Resource(RDF_NAMESPACE_URI RDF_LIST);
    48. -
    49. $RDF_nil new Resource(RDF_NAMESPACE_URI RDF_NIL);
    50. -
    51. $RDF_type new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    52. -
    53. $RDF_rest new Resource(RDF_NAMESPACE_URI RDF_REST);
    54. -
    55. $RDF_first new Resource(RDF_NAMESPACE_URI RDF_FIRST);
    56. -
    57. $RDF_subject new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    58. -
    59. $RDF_predicate new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    60. -
    61. $RDF_object new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    62. -
    63. $RDF_Description new Resource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    64. -
    65. $RDF_ID new Resource(RDF_NAMESPACE_URI RDF_ID);
    66. -
    67. $RDF_about new Resource(RDF_NAMESPACE_URI RDF_ABOUT);
    68. -
    69. $RDF_aboutEach new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    70. -
    71. $RDF_aboutEachPrefix new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    72. -
    73. $RDF_bagID new Resource(RDF_NAMESPACE_URI RDF_BAG_ID);
    74. -
    75. $RDF_resource new Resource(RDF_NAMESPACE_URI RDF_RESOURCE);
    76. -
    77. $RDF_parseType new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    78. -
    79. -
    80. -
    81. $RDF_li new Resource(RDF_NAMESPACE_URI RDF_LI);
    82. -
    83. $RDF_nodeID new Resource(RDF_NAMESPACE_URI RDF_NODEID);
    84. -
    85. $RDF_datatype new Resource(RDF_NAMESPACE_URI RDF_DATATYPE);
    86. -
    87. $RDF_seeAlso new Resource(RDF_NAMESPACE_URI RDF_SEEALSO);
    88. -
    89.  
    90. -
    91.  
    92. -
    93.  
    94. -
    95. ?>
    96. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base deleted file mode 100755 index b862f005..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS.php.html.svn-base +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - File Source for RDFS.php - - - - - -

    Source for file RDFS.php

    -

    Documentation is available at RDFS.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. // RDFS concepts
    32. -
    33. $RDFS_Resource new Resource(RDF_SCHEMA_URI 'Resource');
    34. -
    35. $RDFS_Literal new Resource(RDF_SCHEMA_URI 'Literal');
    36. -
    37. $RDFS_Class new Resource(RDF_SCHEMA_URI 'Class');
    38. -
    39. $RDFS_Datatype new Resource(RDF_SCHEMA_URI 'Datatype');
    40. -
    41. $RDFS_Container new Resource(RDF_SCHEMA_URI 'Container');
    42. -
    43. $RDFS_ContainerMembershipProperty new Resource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    44. -
    45. $RDFS_subClassOf new Resource(RDF_SCHEMA_URI 'subClassOf');
    46. -
    47. $RDFS_subPropertyOf new Resource(RDF_SCHEMA_URI 'subPropertyOf');
    48. -
    49. $RDFS_domain new Resource(RDF_SCHEMA_URI 'domain');
    50. -
    51. $RDFS_range new Resource(RDF_SCHEMA_URI 'range');
    52. -
    53. $RDFS_label new Resource(RDF_SCHEMA_URI 'label');
    54. -
    55. $RDFS_comment new Resource(RDF_SCHEMA_URI 'comment');
    56. -
    57. $RDFS_member new Resource(RDF_SCHEMA_URI 'member');
    58. -
    59. $RDFS_seeAlso new Resource(RDF_SCHEMA_URI 'seeAlso');
    60. -
    61. $RDFS_isDefinedBy new Resource(RDF_SCHEMA_URI 'isDefinedBy');
    62. -
    63.  
    64. -
    65.  
    66. -
    67. ?>
    68. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base deleted file mode 100755 index 25023903..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_C.php.html.svn-base +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - File Source for RDFS_C.php - - - - - -

    Source for file RDFS_C.php

    -

    Documentation is available at RDFS_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDFS{
    32. -
    33.  
    34. -
    35.     function RESOURCE()
    36. -
    37.     {
    38. -
    39.         return  new Resource(RDF_SCHEMA_URI 'Resource');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function LITERAL()
    48. -
    49.     {
    50. -
    51.         return  new Resource(RDF_SCHEMA_URI 'Literal');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function RDFS_CLASS()
    60. -
    61.     {
    62. -
    63.         return  new Resource(RDF_SCHEMA_URI 'Class');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function DATATYPE()
    72. -
    73.     {
    74. -
    75.         return  new Resource(RDF_SCHEMA_URI 'Datatype');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function CONTAINER()
    84. -
    85.     {
    86. -
    87.         return  new Resource(RDF_SCHEMA_URI 'Container');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function CONTAINER_MEMBERSHIP_PROPERTY()
    96. -
    97.     {
    98. -
    99.         return  new Resource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function SUB_CLASS_OF()
    108. -
    109.     {
    110. -
    111.         return  new Resource(RDF_SCHEMA_URI 'subClassOf');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function SUB_PROPERTY_OF()
    120. -
    121.     {
    122. -
    123.         return  new Resource(RDF_SCHEMA_URI 'subPropertyOf');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DOMAIN()
    132. -
    133.     {
    134. -
    135.         return  new Resource(RDF_SCHEMA_URI 'domain');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function RANGE()
    144. -
    145.     {
    146. -
    147.         return  new Resource(RDF_SCHEMA_URI 'range');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function LABEL()
    156. -
    157.     {
    158. -
    159.         return  new Resource(RDF_SCHEMA_URI 'label');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function COMMENT()
    168. -
    169.     {
    170. -
    171.         return  new Resource(RDF_SCHEMA_URI 'comment');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function MEMBER()
    180. -
    181.     {
    182. -
    183.         return  new Resource(RDF_SCHEMA_URI 'member');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function SEEALSO()
    192. -
    193.     {
    194. -
    195.         return  new Resource(RDF_SCHEMA_URI 'seeAlso');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function IS_DEFINED_BY()
    204. -
    205.     {
    206. -
    207.         return  new Resource(RDF_SCHEMA_URI 'isDefinedBy');
    208. -
    209.     }
    210. -
    211.  
    212. -
    213. }
    214. -
    215. ?>
    216. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base deleted file mode 100755 index 3b8db2f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDFS_RES.php.html.svn-base +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - File Source for RDFS_RES.php - - - - - -

    Source for file RDFS_RES.php

    -

    Documentation is available at RDFS_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDFS_RES{
    32. -
    33.  
    34. -
    35.     function RESOURCE()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(RDF_SCHEMA_URI 'Resource');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function LITERAL()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(RDF_SCHEMA_URI 'Literal');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function RDFS_CLASS()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(RDF_SCHEMA_URI 'Class');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function DATATYPE()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(RDF_SCHEMA_URI 'Datatype');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function CONTAINER()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(RDF_SCHEMA_URI 'Container');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function CONTAINER_MEMBERSHIP_PROPERTY()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function SUB_CLASS_OF()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(RDF_SCHEMA_URI 'subClassOf');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function SUB_PROPERTY_OF()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(RDF_SCHEMA_URI 'subPropertyOf');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DOMAIN()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(RDF_SCHEMA_URI 'domain');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function RANGE()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(RDF_SCHEMA_URI 'range');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function LABEL()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(RDF_SCHEMA_URI 'label');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function COMMENT()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(RDF_SCHEMA_URI 'comment');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function MEMBER()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(RDF_SCHEMA_URI 'member');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function SEEALSO()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(RDF_SCHEMA_URI 'seeAlso');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function IS_DEFINED_BY()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(RDF_SCHEMA_URI 'isDefinedBy');
    208. -
    209.     }
    210. -
    211. }
    212. -
    213. ?>
    214. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base deleted file mode 100755 index d7f453eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_C.php.html.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - File Source for RDF_C.php - - - - - -

    Source for file RDF_C.php

    -

    Documentation is available at RDF_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDF{
    32. -
    33.  
    34. -
    35.     // RDF concepts (constants are defined in constants.php)
    36. -
    37.     function ALT()
    38. -
    39.     {
    40. -
    41.         return  new Resource(RDF_NAMESPACE_URI RDF_ALT);
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function BAG()
    50. -
    51.     {
    52. -
    53.         return  new Resource(RDF_NAMESPACE_URI RDF_BAG);
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function PROPERTY()
    62. -
    63.     {
    64. -
    65.         return  new Resource(RDF_NAMESPACE_URI RDF_PROPERTY);
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function SEQ()
    74. -
    75.     {
    76. -
    77.         return  new Resource(RDF_NAMESPACE_URI RDF_SEQ);
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function STATEMENT()
    86. -
    87.     {
    88. -
    89.         return  new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function RDF_LIST()
    98. -
    99.     {
    100. -
    101.         return  new Resource(RDF_NAMESPACE_URI RDF_LIST);
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function NIL()
    110. -
    111.     {
    112. -
    113.         return  new Resource(RDF_NAMESPACE_URI RDF_NIL);
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TYPE()
    122. -
    123.     {
    124. -
    125.         return  new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function REST()
    134. -
    135.     {
    136. -
    137.         return  new Resource(RDF_NAMESPACE_URI RDF_REST);
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function FIRST()
    146. -
    147.     {
    148. -
    149.         return  new Resource(RDF_NAMESPACE_URI RDF_FIRST);
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SUBJECT()
    158. -
    159.     {
    160. -
    161.         return  new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PREDICATE()
    170. -
    171.     {
    172. -
    173.         return  new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function OBJECT()
    182. -
    183.     {
    184. -
    185.         return  new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DESCRIPTION()
    194. -
    195.     {
    196. -
    197.         return  new Resource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ID()
    206. -
    207.     {
    208. -
    209.         return  new Resource(RDF_NAMESPACE_URI RDF_ID);
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function ABOUT()
    218. -
    219.     {
    220. -
    221.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT);
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function ABOUT_EACH()
    230. -
    231.     {
    232. -
    233.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function ABOUT_EACH_PREFIX()
    242. -
    243.     {
    244. -
    245.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function BAG_ID()
    254. -
    255.     {
    256. -
    257.         return  new Resource(RDF_NAMESPACE_URI RDF_BAG_ID);
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function RESOURCE()
    266. -
    267.     {
    268. -
    269.         return  new Resource(RDF_NAMESPACE_URI RDF_RESOURCE);
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function PARSE_TYPE()
    278. -
    279.     {
    280. -
    281.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function LITERAL()
    290. -
    291.     {
    292. -
    293.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_LITERAL);
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function PARSE_TYPE_RESOURCE()
    302. -
    303.     {
    304. -
    305.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_RESOURCE);
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function LI()
    314. -
    315.     {
    316. -
    317.         return  new Resource(RDF_NAMESPACE_URI RDF_LI);
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function NODE_ID()
    326. -
    327.     {
    328. -
    329.         return  new Resource(RDF_NAMESPACE_URI RDF_NODEID);
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function DATATYPE()
    338. -
    339.     {
    340. -
    341.         return  new Resource(RDF_NAMESPACE_URI RDF_DATATYPE);
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function SEE_ALSO()
    350. -
    351.     {
    352. -
    353.         return  new Resource(RDF_NAMESPACE_URI RDF_SEEALSO);
    354. -
    355.     }
    356. -
    357. }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. ?>
    364. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:58 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base deleted file mode 100755 index 8292991d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRDF_RES.php.html.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - File Source for RDF_RES.php - - - - - -

    Source for file RDF_RES.php

    -

    Documentation is available at RDF_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDF_RES{
    32. -
    33.  
    34. -
    35.     // RDF concepts (constants are defined in constants.php)
    36. -
    37.     function ALT()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(RDF_NAMESPACE_URI RDF_ALT);
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function BAG()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(RDF_NAMESPACE_URI RDF_BAG);
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function PROPERTY()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(RDF_NAMESPACE_URI RDF_PROPERTY);
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function SEQ()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(RDF_NAMESPACE_URI RDF_SEQ);
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function STATEMENT()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(RDF_NAMESPACE_URI RDF_STATEMENT);
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function RDF_LIST()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(RDF_NAMESPACE_URI RDF_LIST);
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function NIL()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(RDF_NAMESPACE_URI RDF_NIL);
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TYPE()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(RDF_NAMESPACE_URI RDF_TYPE);
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function REST()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(RDF_NAMESPACE_URI RDF_REST);
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function FIRST()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(RDF_NAMESPACE_URI RDF_FIRST);
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SUBJECT()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(RDF_NAMESPACE_URI RDF_SUBJECT);
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PREDICATE()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(RDF_NAMESPACE_URI RDF_PREDICATE);
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function OBJECT()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(RDF_NAMESPACE_URI RDF_OBJECT);
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DESCRIPTION()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ID()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(RDF_NAMESPACE_URI RDF_ID);
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function ABOUT()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT);
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function ABOUT_EACH()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function ABOUT_EACH_PREFIX()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function BAG_ID()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(RDF_NAMESPACE_URI RDF_BAG_ID);
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function RESOURCE()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(RDF_NAMESPACE_URI RDF_RESOURCE);
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function PARSE_TYPE()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function LITERAL()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_LITERAL);
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function PARSE_TYPE_RESOURCE()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_RESOURCE);
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function LI()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(RDF_NAMESPACE_URI RDF_LI);
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function NODE_ID()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(RDF_NAMESPACE_URI RDF_NODEID);
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function DATATYPE()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(RDF_NAMESPACE_URI RDF_DATATYPE);
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function SEE_ALSO()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(RDF_NAMESPACE_URI RDF_SEEALSO);
    354. -
    355.     }
    356. -
    357. }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. ?>
    364. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:00 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base deleted file mode 100755 index b46d104f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS.php.html.svn-base +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - File Source for RSS.php - - - - - -

    Source for file RSS.php

    -

    Documentation is available at RSS.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. // RSS concepts
    32. -
    33. $RSS_channel new Resource(RSS_NS 'channel');
    34. -
    35. $RSS_image new Resource(RSS_NS 'image');
    36. -
    37. $RSS_item new Resource(RSS_NS 'item');
    38. -
    39. $RSS_textinput new Resource(RSS_NS 'textinput');
    40. -
    41.  
    42. -
    43. $RSS_items new Resource(RSS_NS 'items');
    44. -
    45. $RSS_title new Resource(RSS_NS 'title');
    46. -
    47. $RSS_link new Resource(RSS_NS 'link');
    48. -
    49. $RSS_url new Resource(RSS_NS 'url');
    50. -
    51. $RSS_description new Resource(RSS_NS 'description');
    52. -
    53. $RSS_name new Resource(RSS_NS 'name');
    54. -
    55.  
    56. -
    57.  
    58. -
    59.  
    60. -
    61.  
    62. -
    63.  
    64. -
    65.  
    66. -
    67. ?>
    68. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base deleted file mode 100755 index 659892bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_C.php.html.svn-base +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for RSS_C.php - - - - - -

    Source for file RSS_C.php

    -

    Documentation is available at RSS_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RSS{
    32. -
    33.  
    34. -
    35.     function CHANNEL()
    36. -
    37.     {
    38. -
    39.         return  new Resource(RSS_NS 'channel');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function IMAGE()
    48. -
    49.     {
    50. -
    51.         return  new Resource(RSS_NS 'image');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function ITEM()
    60. -
    61.     {
    62. -
    63.         return  new Resource(RSS_NS 'item');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function TEXTINPUT()
    72. -
    73.     {
    74. -
    75.         return  new Resource(RSS_NS 'textinput');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ITEMS()
    84. -
    85.     {
    86. -
    87.         return  new Resource(RSS_NS 'items');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function TITLE()
    96. -
    97.     {
    98. -
    99.         return  new Resource(RSS_NS 'title');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function LINK()
    108. -
    109.     {
    110. -
    111.         return  new Resource(RSS_NS 'link');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function URL()
    120. -
    121.     {
    122. -
    123.         return  new Resource(RSS_NS 'url');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DESCRIPTION()
    132. -
    133.     {
    134. -
    135.         return  new Resource(RSS_NS 'description');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function NAME()
    144. -
    145.     {
    146. -
    147.         return  new Resource(RSS_NS 'name');
    148. -
    149.     }
    150. -
    151. }
    152. -
    153.  
    154. -
    155.  
    156. -
    157.  
    158. -
    159. ?>
    160. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:44 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base deleted file mode 100755 index d0dbfa03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyRSS_RES.php.html.svn-base +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - File Source for RSS_RES.php - - - - - -

    Source for file RSS_RES.php

    -

    Documentation is available at RSS_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RSS_RES{
    32. -
    33.  
    34. -
    35.     function CHANNEL()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(RSS_NS 'channel');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function IMAGE()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(RSS_NS 'image');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function ITEM()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(RSS_NS 'item');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function TEXTINPUT()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(RSS_NS 'textinput');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ITEMS()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(RSS_NS 'items');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function TITLE()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(RSS_NS 'title');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function LINK()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(RSS_NS 'link');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function URL()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(RSS_NS 'url');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DESCRIPTION()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(RSS_NS 'description');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function NAME()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(RSS_NS 'name');
    148. -
    149.     }
    150. -
    151. }
    152. -
    153.  
    154. -
    155.  
    156. -
    157. ?>
    158. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base deleted file mode 100755 index 7a5defed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD.php.html.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for VCARD.php - - - - - -

    Source for file VCARD.php

    -

    Documentation is available at VCARD.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33. // VCARD concepts
    34. -
    35. $VCARD_UID new Resource(VCARD_NS.'UID');
    36. -
    37. $VCARD_ORGPROPERTIES new Resource(VCARD_NS 'ORGPROPERTIES');
    38. -
    39. $VCARD_ADRTYPES new Resource(VCARD_NS 'ADRTYPES');
    40. -
    41. $VCARD_NPROPERTIES new Resource(VCARD_NS 'NPROPERTIES');
    42. -
    43. $VCARD_EMAILTYPES new Resource(VCARD_NS 'EMAILTYPES');
    44. -
    45. $VCARD_TELTYPES new Resource(VCARD_NS 'TELTYPES');
    46. -
    47. $VCARD_ADRPROPERTIES new Resource(VCARD_NS 'ADRPROPERTIES');
    48. -
    49. $VCARD_TZTYPES new Resource(VCARD_NS 'TZTYPES');
    50. -
    51. $VCARD_Street new Resource(VCARD_NS 'Street');
    52. -
    53. $VCARD_AGENT new Resource(VCARD_NS 'AGENT');
    54. -
    55. $VCARD_SOURCE new Resource(VCARD_NS 'SOURCE');
    56. -
    57. $VCARD_BDAY new Resource(VCARD_NS 'BDAY');
    58. -
    59. $VCARD_REV new Resource(VCARD_NS 'REV');
    60. -
    61. $VCARD_SORT_STRING new Resource(VCARD_NS 'SORT_STRING');
    62. -
    63. $VCARD_Orgname new Resource(VCARD_NS 'Orgname');
    64. -
    65. $VCARD_CATEGORIES new Resource(VCARD_NS 'CATEGORIES');
    66. -
    67. $VCARD_N new Resource(VCARD_NS 'N');
    68. -
    69. $VCARD_Pcode new Resource(VCARD_NS 'Pcode');
    70. -
    71. $VCARD_Prefix new Resource(VCARD_NS 'Prefix');
    72. -
    73. $VCARD_PHOTO new Resource(VCARD_NS 'PHOTO');
    74. -
    75. $VCARD_FN new Resource(VCARD_NS 'FN');
    76. -
    77. $VCARD_Suffix new Resource(VCARD_NS 'Suffix');
    78. -
    79. $VCARD_CLASS new Resource(VCARD_NS 'CLASS');
    80. -
    81. $VCARD_ADR new Resource(VCARD_NS 'ADR');
    82. -
    83. $VCARD_Region new Resource(VCARD_NS 'Region');
    84. -
    85. $VCARD_GEO new Resource(VCARD_NS 'GEO');
    86. -
    87. $VCARD_Extadd new Resource(VCARD_NS 'Extadd');
    88. -
    89. $VCARD_GROUP new Resource(VCARD_NS 'GROUP');
    90. -
    91. $VCARD_EMAIL new Resource(VCARD_NS 'EMAIL');
    92. -
    93. $VCARD_Family new Resource(VCARD_NS 'Family');
    94. -
    95. $VCARD_TZ new Resource(VCARD_NS 'TZ');
    96. -
    97. $VCARD_NAME new Resource(VCARD_NS 'NAME');
    98. -
    99. $VCARD_Orgunit new Resource(VCARD_NS 'Orgunit');
    100. -
    101. $VCARD_Country new Resource(VCARD_NS 'Country');
    102. -
    103. $VCARD_SOUND new Resource(VCARD_NS 'SOUND');
    104. -
    105. $VCARD_TITLE new Resource(VCARD_NS 'TITLE');
    106. -
    107. $VCARD_MAILER new Resource(VCARD_NS 'MAILER');
    108. -
    109. $VCARD_Other new Resource(VCARD_NS 'Other');
    110. -
    111. $VCARD_Locality new Resource(VCARD_NS 'Locality');
    112. -
    113. $VCARD_Pobox new Resource(VCARD_NS 'Pobox');
    114. -
    115. $VCARD_KEY new Resource(VCARD_NS 'KEY');
    116. -
    117. $VCARD_PRODID new Resource(VCARD_NS 'PRODID');
    118. -
    119. $VCARD_Given new Resource(VCARD_NS 'Given');
    120. -
    121. $VCARD_LABEL new Resource(VCARD_NS 'LABEL');
    122. -
    123. $VCARD_TEL new Resource(VCARD_NS 'TEL');
    124. -
    125. $VCARD_NICKNAME new Resource(VCARD_NS 'NICKNAME');
    126. -
    127. $VCARD_ROLE new Resource(VCARD_NS 'ROLE');
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base deleted file mode 100755 index b934e397..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_C.php.html.svn-base +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - File Source for VCARD_C.php - - - - - -

    Source for file VCARD_C.php

    -

    Documentation is available at VCARD_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class VCARD{
    32. -
    33.  
    34. -
    35.     // VCARD concepts
    36. -
    37.     function UID()
    38. -
    39.     {
    40. -
    41.         return  new Resource(VCARD_NS.'UID');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ORGPROPERTIES()
    50. -
    51.     {
    52. -
    53.         return  new Resource(VCARD_NS 'ORGPROPERTIES');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ADRTYPES()
    62. -
    63.     {
    64. -
    65.         return  new Resource(VCARD_NS 'ADRTYPES');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function NPROPERTIES()
    74. -
    75.     {
    76. -
    77.         return  new Resource(VCARD_NS 'NPROPERTIES');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function EMAILTYPES()
    86. -
    87.     {
    88. -
    89.         return  new Resource(VCARD_NS 'EMAILTYPES');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function TELTYPES()
    98. -
    99.     {
    100. -
    101.         return  new Resource(VCARD_NS 'TELTYPES');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ADRPROPERTIES()
    110. -
    111.     {
    112. -
    113.         return  new Resource(VCARD_NS 'ADRPROPERTIES');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TZTYPES()
    122. -
    123.     {
    124. -
    125.         return  new Resource(VCARD_NS 'TZTYPES');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function STREET()
    134. -
    135.     {
    136. -
    137.         return  new Resource(VCARD_NS 'Street');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function AGENT()
    146. -
    147.     {
    148. -
    149.         return  new Resource(VCARD_NS 'AGENT');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SOURCE()
    158. -
    159.     {
    160. -
    161.         return  new Resource(VCARD_NS 'SOURCE');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function BDAY()
    170. -
    171.     {
    172. -
    173.         return  new Resource(VCARD_NS 'BDAY');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function REV()
    182. -
    183.     {
    184. -
    185.         return  new Resource(VCARD_NS 'REV');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function SORT_STRING()
    194. -
    195.     {
    196. -
    197.         return  new Resource(VCARD_NS 'SORT_STRING');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ORGNAME()
    206. -
    207.     {
    208. -
    209.         return  new Resource(VCARD_NS 'Orgname');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function CATEGORIES()
    218. -
    219.     {
    220. -
    221.         return  new Resource(VCARD_NS 'CATEGORIES');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function N()
    230. -
    231.     {
    232. -
    233.         return  new Resource(VCARD_NS 'N');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function PCODE()
    242. -
    243.     {
    244. -
    245.         return  new Resource(VCARD_NS 'Pcode');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function PREFIX()
    254. -
    255.     {
    256. -
    257.         return  new Resource(VCARD_NS 'Prefix');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function PHOTO()
    266. -
    267.     {
    268. -
    269.         return  new Resource(VCARD_NS 'PHOTO');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FN()
    278. -
    279.     {
    280. -
    281.         return  new Resource(VCARD_NS 'FN');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function SUFFIX()
    290. -
    291.     {
    292. -
    293.         return  new Resource(VCARD_NS 'Suffix');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function VCARD_CLASS()
    302. -
    303.     {
    304. -
    305.         return  new Resource(VCARD_NS 'CLASS');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function ADR()
    314. -
    315.     {
    316. -
    317.         return  new Resource(VCARD_NS 'ADR');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function REGION()
    326. -
    327.     {
    328. -
    329.         return  new Resource(VCARD_NS 'Region');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GEO()
    338. -
    339.     {
    340. -
    341.         return  new Resource(VCARD_NS 'GEO');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function EXTADD()
    350. -
    351.     {
    352. -
    353.         return  new Resource(VCARD_NS 'Extadd');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function GROUP()
    362. -
    363.     {
    364. -
    365.         return  new Resource(VCARD_NS 'GROUP');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function EMAIL()
    374. -
    375.     {
    376. -
    377.         return  new Resource(VCARD_NS 'EMAIL');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function FAMILY()
    386. -
    387.     {
    388. -
    389.         return  new Resource(VCARD_NS 'Family');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function TZ()
    398. -
    399.     {
    400. -
    401.         return  new Resource(VCARD_NS 'TZ');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function NAME()
    410. -
    411.     {
    412. -
    413.         return  new Resource(VCARD_NS 'NAME');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ORGUNIT()
    422. -
    423.     {
    424. -
    425.         return  new Resource(VCARD_NS 'Orgunit');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function COUNTRY()
    434. -
    435.     {
    436. -
    437.         return  new Resource(VCARD_NS 'Country');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function SOUND()
    446. -
    447.     {
    448. -
    449.         return  new Resource(VCARD_NS 'SOUND');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function TITLE()
    458. -
    459.     {
    460. -
    461.         return  new Resource(VCARD_NS 'TITLE');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MAILER()
    470. -
    471.     {
    472. -
    473.         return  new Resource(VCARD_NS 'MAILER');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function OTHER()
    482. -
    483.     {
    484. -
    485.         return  new Resource(VCARD_NS 'Other');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function LOCALITY()
    494. -
    495.     {
    496. -
    497.         return  new Resource(VCARD_NS 'Locality');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function POBOX()
    506. -
    507.     {
    508. -
    509.         return  new Resource(VCARD_NS 'Pobox');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function KEY()
    518. -
    519.     {
    520. -
    521.         return  new Resource(VCARD_NS 'KEY');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function PRODID()
    530. -
    531.     {
    532. -
    533.         return  new Resource(VCARD_NS 'PRODID');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function GIVEN()
    542. -
    543.     {
    544. -
    545.         return  new Resource(VCARD_NS 'Given');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function LABEL()
    554. -
    555.     {
    556. -
    557.         return  new Resource(VCARD_NS 'LABEL');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TEL()
    566. -
    567.     {
    568. -
    569.         return  new Resource(VCARD_NS 'TEL');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function NICKNAME()
    578. -
    579.     {
    580. -
    581.         return  new Resource(VCARD_NS 'NICKNAME');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function ROLE()
    590. -
    591.     {
    592. -
    593.         return  new Resource(VCARD_NS 'ROLE');
    594. -
    595.     }
    596. -
    597. }
    598. -
    599.  
    600. -
    601. ?>
    602. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base deleted file mode 100755 index 6d554f49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVCARD_RES.php.html.svn-base +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - File Source for VCARD_RES.php - - - - - -

    Source for file VCARD_RES.php

    -

    Documentation is available at VCARD_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class VCARD_RES{
    32. -
    33.  
    34. -
    35.     // VCARD concepts
    36. -
    37.     function UID()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(VCARD_NS.'UID');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ORGPROPERTIES()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(VCARD_NS 'ORGPROPERTIES');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ADRTYPES()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(VCARD_NS 'ADRTYPES');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function NPROPERTIES()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(VCARD_NS 'NPROPERTIES');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function EMAILTYPES()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(VCARD_NS 'EMAILTYPES');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function TELTYPES()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(VCARD_NS 'TELTYPES');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ADRPROPERTIES()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(VCARD_NS 'ADRPROPERTIES');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TZTYPES()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(VCARD_NS 'TZTYPES');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function STREET()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(VCARD_NS 'Street');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function AGENT()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(VCARD_NS 'AGENT');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SOURCE()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(VCARD_NS 'SOURCE');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function BDAY()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(VCARD_NS 'BDAY');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function REV()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(VCARD_NS 'REV');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function SORT_STRING()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(VCARD_NS 'SORT_STRING');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ORGNAME()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(VCARD_NS 'Orgname');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function CATEGORIES()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(VCARD_NS 'CATEGORIES');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function N()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(VCARD_NS 'N');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function PCODE()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(VCARD_NS 'Pcode');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function PREFIX()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(VCARD_NS 'Prefix');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function PHOTO()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(VCARD_NS 'PHOTO');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FN()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(VCARD_NS 'FN');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function SUFFIX()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(VCARD_NS 'Suffix');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function VCARD_CLASS()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(VCARD_NS 'CLASS');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function ADR()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(VCARD_NS 'ADR');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function REGION()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(VCARD_NS 'Region');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GEO()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(VCARD_NS 'GEO');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function EXTADD()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(VCARD_NS 'Extadd');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function GROUP()
    362. -
    363.     {
    364. -
    365.         return  new ResResource(VCARD_NS 'GROUP');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function EMAIL()
    374. -
    375.     {
    376. -
    377.         return  new ResResource(VCARD_NS 'EMAIL');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function FAMILY()
    386. -
    387.     {
    388. -
    389.         return  new ResResource(VCARD_NS 'Family');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function TZ()
    398. -
    399.     {
    400. -
    401.         return  new ResResource(VCARD_NS 'TZ');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function NAME()
    410. -
    411.     {
    412. -
    413.         return  new ResResource(VCARD_NS 'NAME');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ORGUNIT()
    422. -
    423.     {
    424. -
    425.         return  new ResResource(VCARD_NS 'Orgunit');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function COUNTRY()
    434. -
    435.     {
    436. -
    437.         return  new ResResource(VCARD_NS 'Country');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function SOUND()
    446. -
    447.     {
    448. -
    449.         return  new ResResource(VCARD_NS 'SOUND');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function TITLE()
    458. -
    459.     {
    460. -
    461.         return  new ResResource(VCARD_NS 'TITLE');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MAILER()
    470. -
    471.     {
    472. -
    473.         return  new ResResource(VCARD_NS 'MAILER');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function OTHER()
    482. -
    483.     {
    484. -
    485.         return  new ResResource(VCARD_NS 'Other');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function LOCALITY()
    494. -
    495.     {
    496. -
    497.         return  new ResResource(VCARD_NS 'Locality');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function POBOX()
    506. -
    507.     {
    508. -
    509.         return  new ResResource(VCARD_NS 'Pobox');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function KEY()
    518. -
    519.     {
    520. -
    521.         return  new ResResource(VCARD_NS 'KEY');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function PRODID()
    530. -
    531.     {
    532. -
    533.         return  new ResResource(VCARD_NS 'PRODID');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function GIVEN()
    542. -
    543.     {
    544. -
    545.         return  new ResResource(VCARD_NS 'Given');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function LABEL()
    554. -
    555.     {
    556. -
    557.         return  new ResResource(VCARD_NS 'LABEL');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TEL()
    566. -
    567.     {
    568. -
    569.         return  new ResResource(VCARD_NS 'TEL');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function NICKNAME()
    578. -
    579.     {
    580. -
    581.         return  new ResResource(VCARD_NS 'NICKNAME');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function ROLE()
    590. -
    591.     {
    592. -
    593.         return  new ResResource(VCARD_NS 'ROLE');
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. }
    600. -
    601.  
    602. -
    603. ?>
    604. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base deleted file mode 100755 index 30257979..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabulary.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for Vocabulary.php - - - - - -

    Source for file Vocabulary.php

    -

    Documentation is available at Vocabulary.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF.php';
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS.php';
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:42 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base deleted file mode 100755 index 61058d5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyClass.php.html.svn-base +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for VocabularyClass.php - - - - - -

    Source for file VocabularyClass.php

    -

    Documentation is available at VocabularyClass.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. require_once RDFAPI_INCLUDE_DIR 'vocabulary/ATOM_C.php';
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF_C.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS_C.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL_C.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC_C.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD_C.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF_C.php';
    36. -
    37. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS_C.php';
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base deleted file mode 100755 index 6eb07dab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/.svn/text-base/fsource_vocabulary__vocabularyVocabularyRes.php.html.svn-base +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - File Source for VocabularyRes.php - - - - - -

    Source for file VocabularyRes.php

    -

    Documentation is available at VocabularyRes.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id$
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. include_once RDFAPI_INCLUDE_DIR PACKAGE_RESMODEL);
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/ATOM_RES.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF_RES.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS_RES.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL_RES.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC_RES.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD_RES.php';
    36. -
    37. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF_RES.php';
    38. -
    39. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS_RES.php';
    40. -
    41. ?>
    42. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDataset.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDataset.php.html deleted file mode 100755 index 0f98f620..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDataset.php.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - File Source for Dataset.php - - - - - -

    Source for file Dataset.php

    -

    Documentation is available at Dataset.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Dataset
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Dataset implementation.
    14. -
    15. * Superclass of datasetMem and datasetDb which contains shared functionality.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_dataset__datasetDataset.php.html 442 2007-06-01 16:19:26Z cax $
    20. -
    21. @author Daniel Westphal (http://www.d-westphal.de)
    22. -
    23. @author Chris Bizer <chris@bizer.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33.  
    34. -
    35. class Dataset
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Load a Dataset from a File
    42. -
    43.     *
    44. -
    45.     * @param string 
    46. -
    47.     * @access    public
    48. -
    49.     */
    50. -
    51.     function loadFromFile($file)
    52. -
    53.     {
    54. -
    55.         $parsernew TriXParser($this);
    56. -
    57.         $parser->parseFile($file);
    58. -
    59.     }
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Load a Datset from a string
    66. -
    67.     *
    68. -
    69.     * @param string 
    70. -
    71.     * @access    public
    72. -
    73.     */
    74. -
    75.     function loadFromString($string)
    76. -
    77.     {
    78. -
    79.         $parsernew TriXParser($this);
    80. -
    81.         $parser->parseString($string);
    82. -
    83.     }
    84. -
    85.  
    86. -
    87.     /**
    88. -
    89.     * Serialize the Dataset to File
    90. -
    91.     *
    92. -
    93.     * @param  string 
    94. -
    95.     * @access    public
    96. -
    97.     */
    98. -
    99.     function serializeToFile($fileName)
    100. -
    101.     {
    102. -
    103.         $serializernew TriXSerializer($this);
    104. -
    105.         $serializer->serializeToFile($fileName);
    106. -
    107.     }
    108. -
    109.  
    110. -
    111.     /**
    112. -
    113.     * Serialize the Dataset to string
    114. -
    115.     *
    116. -
    117.     * @return string 
    118. -
    119.     * @access    public
    120. -
    121.     */
    122. -
    123.     function serializeToString()
    124. -
    125.     {
    126. -
    127.         $serializernew TriXSerializer($this);
    128. -
    129.         return $serializer->serializeToString();
    130. -
    131.     }
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Performs a SPARQL query against an RDF Dataset.
    138. -
    139.     * The result can be retrived in SPARQL Query Results XML Format or
    140. -
    141.     * as an array containing the variables an their bindings.
    142. -
    143.     *
    144. -
    145.     * @param  String $query      the sparql query string
    146. -
    147.     * @param  String $resultform the result form ('xml' for SPARQL Query Results XML Format)
    148. -
    149.     * @return String/array 
    150. -
    151.     */
    152. -
    153.     function sparqlQuery($query,$resultform false){
    154. -
    155.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SPARQL);
    156. -
    157.         $parser new SparqlParser();
    158. -
    159.         $q $parser->parse($query);
    160. -
    161.  
    162. -
    163.         $eng SparqlEngine::factory();
    164. -
    165.         return $eng->queryModel($this,$q,$resultform);
    166. -
    167.     }
    168. -
    169.  
    170. -
    171.  
    172. -
    173.  
    174. -
    175. }
    176. -
    177. ?>
    178. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetDb.php.html deleted file mode 100755 index 8aa89805..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetDb.php.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - File Source for DatasetDb.php - - - - -

    Source for file DatasetDb.php

    -

    Documentation is available at DatasetDb.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: DatasetDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Persistent implementation of a Dataset in a database.
    14. -
    15. * A RDF dataset is a collection of named RDF graphs.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_dataset__datasetDatasetDb.php.html 310 2006-06-26 12:34:22Z tgauss $
    20. -
    21. @author Daniel Westphal (http://www.d-westphal.de)
    22. -
    23. @author Chris Bizer <chris@bizer.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    34. -
    35.  
    36. -
    37. class DatasetDb extends Dataset 
    38. -
    39. {
    40. -
    41.         
    42. -
    43.     /**
    44. -
    45.     * Reference to databse connection.
    46. -
    47.     *
    48. -
    49.     * @var        resource dbConnection
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $dbConnection;
    56. -
    57.     
    58. -
    59.     /**
    60. -
    61.     * Reference to the dbStore Object.
    62. -
    63.     *
    64. -
    65.     * @var        $dbStore dbStore
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $dbStore;
    72. -
    73.     
    74. -
    75.     
    76. -
    77.     /**
    78. -
    79.     * Name of the Dataset
    80. -
    81.     *
    82. -
    83.     * @var        string 
    84. -
    85.     * @access    private
    86. -
    87.     */
    88. -
    89.     var $setName;
    90. -
    91.     
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * Constructor
    98. -
    99.     * You can supply a Dataset name.
    100. -
    101.     *
    102. -
    103.     * @param  ADODBConnection 
    104. -
    105.     * @param  DbStore 
    106. -
    107.     * @param  string 
    108. -
    109.     * @access    public
    110. -
    111.     */        
    112. -
    113.     function DatasetDb(&$dbConnection,&$dbStore,$datasetName)
    114. -
    115.     {
    116. -
    117.         $this->dbConnection=$dbConnection;
    118. -
    119.         $this->dbStore=&$dbStore;
    120. -
    121.         $this->setName$datasetName;
    122. -
    123.         $this->_initialize();
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Initialize
    132. -
    133.     * Read all needed data into the set.
    134. -
    135.     *
    136. -
    137.     * 
    138. -
    139.     * @access    private
    140. -
    141.     */        
    142. -
    143.     function _initialize()
    144. -
    145.     {
    146. -
    147.         $recordSet =$this->dbConnection->execute("SELECT defaultModelUri
    148. -
    149.                                          FROM datasets where datasetName='".$this->setName."'");
    150. -
    151.         
    152. -
    153.            $this->defaultGraph=$this->dbStore->getModel($recordSet->fields[0]);
    154. -
    155.     }
    156. -
    157.  
    158. -
    159.  
    160. -
    161.     
    162. -
    163. //    === Graph level methods ========================
    164. -
    165.     
    166. -
    167.         
    168. -
    169.     /**
    170. -
    171.     * Sets the Dataset name. Return true on success, false otherwise.
    172. -
    173.     *
    174. -
    175.     * @param  string 
    176. -
    177.     * @access    public
    178. -
    179.     */    
    180. -
    181.     function setDatasetName($datasetName)
    182. -
    183.     {
    184. -
    185.         if ($this->dbStore->datasetExists($datasetName))
    186. -
    187.             return false;
    188. -
    189.             
    190. -
    191.         $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."'
    192. -
    193.                                       where datasetName='".$this->setName."'");
    194. -
    195.         
    196. -
    197.         $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."'
    198. -
    199.                                       where datasetName='".$this->setName."'");
    200. -
    201.         $this->setName=$datasetName;
    202. -
    203.         return true;
    204. -
    205.     }
    206. -
    207.     
    208. -
    209.     /**
    210. -
    211.     * Returns the Datasets name.
    212. -
    213.     *
    214. -
    215.     * @return string 
    216. -
    217.     * @access    public
    218. -
    219.     */
    220. -
    221.     function getDatasetName()
    222. -
    223.     {
    224. -
    225.         return $this->setName;
    226. -
    227.     }
    228. -
    229.     
    230. -
    231.     /**
    232. -
    233.      * Adds a NamedGraph to the set.
    234. -
    235.      *
    236. -
    237.      * @param NamedGraphDb 
    238. -
    239.      */
    240. -
    241.     function addNamedGraph(&$graph)
    242. -
    243.     {
    244. -
    245.         $graphNameURI=$graph->getGraphName();
    246. -
    247.         $this->removeNamedGraph($graphNameURI);
    248. -
    249.         $this->dbConnection->execute('INSERT INTO dataset_model VALUES("'.$this->setName.'",'.$graph->modelID.',"'.$graphNameURI.'")');
    250. -
    251.     }
    252. -
    253.     
    254. -
    255.         
    256. -
    257.     /**
    258. -
    259.      * Overwrites the existting default graph.
    260. -
    261.      *
    262. -
    263.      * @param DbModel 
    264. -
    265.      */
    266. -
    267.     function setDefaultGraph(&$graph)
    268. -
    269.     {
    270. -
    271.         $this->dbConnection->execute('UPDATE datasets SET defaultModelUri ="'.$graph->modelURI.'"  WHERE datasetName ="'.$this->setName.'"');
    272. -
    273.     }
    274. -
    275.     
    276. -
    277.     /**
    278. -
    279.      * Returns a reference to the defaultGraph.
    280. -
    281.      *     
    282. -
    283.      * @return NamedGraphDb 
    284. -
    285.      */
    286. -
    287.     function getDefaultGraph()
    288. -
    289.     {
    290. -
    291.         $defaultGraphURI $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'");
    292. -
    293.         return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName));
    294. -
    295.     }
    296. -
    297.     
    298. -
    299.     /**
    300. -
    301.      * Returns true, if a defaultGraph exists. False otherwise.
    302. -
    303.      *     
    304. -
    305.      * @return boolean 
    306. -
    307.      */    
    308. -
    309.     function hasDefaultGraph()
    310. -
    311.     {
    312. -
    313.         return true;
    314. -
    315.     }
    316. -
    317.     
    318. -
    319.     /**
    320. -
    321.      * Removes a NamedGraph from the set. Nothing happens
    322. -
    323.      * if no graph with that name is contained in the set.
    324. -
    325.      *
    326. -
    327.      * @param string 
    328. -
    329.      */
    330. -
    331.     function removeNamedGraph($graphName)
    332. -
    333.     {
    334. -
    335.         $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    336. -
    337.     }
    338. -
    339.     
    340. -
    341.     /**
    342. -
    343.      * Tells wether the Dataset contains a NamedGraph.
    344. -
    345.      *
    346. -
    347.      * @param  string 
    348. -
    349.      * @return boolean 
    350. -
    351.      */
    352. -
    353.     function containsNamedGraph($graphName)
    354. -
    355.     {
    356. -
    357.         $count$this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    358. -
    359.         return ($count>0);    
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.      * Returns the NamedGraph with a specific name from the Dataset.
    368. -
    369.      * Changes to the graph will be reflected in the set.
    370. -
    371.      *
    372. -
    373.      * @param string 
    374. -
    375.      * @return NamedGraphDb or null
    376. -
    377.      */
    378. -
    379.     function &getNamedGraph($graphName)
    380. -
    381.     {
    382. -
    383.         if(!$this->containsNamedGraph($graphName))
    384. -
    385.             return null;
    386. -
    387.             
    388. -
    389.         $modelVars =$this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI
    390. -
    391.                                                     FROM models, dataset_model
    392. -
    393.                                                     WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID");
    394. -
    395.     
    396. -
    397.         return new NamedGraphDb($this->dbConnection$modelVars->fields[0],
    398. -
    399.                                  $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    400. -
    401.     }
    402. -
    403.     
    404. -
    405.     /**
    406. -
    407.      * Returns the names of the namedGraphs in this set as strings in an array.
    408. -
    409.      *
    410. -
    411.      * @return Array 
    412. -
    413.      */
    414. -
    415.     function listGraphNames()
    416. -
    417.     {
    418. -
    419.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    420. -
    421.  
    422. -
    423.         $return=array();
    424. -
    425.         while (!$recordSet->EOF
    426. -
    427.         {
    428. -
    429.           $return[$recordSet->fields[0];
    430. -
    431.           $recordSet->moveNext();
    432. -
    433.         }
    434. -
    435.         return $return;
    436. -
    437.     }
    438. -
    439.  
    440. -
    441.     /**
    442. -
    443.      * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    444. -
    445.      *
    446. -
    447.      * @param  string 
    448. -
    449.      * @param  string 
    450. -
    451.      * @return NamedGraphDb 
    452. -
    453.      */
    454. -
    455.     function &createGraph($graphName,$baseURI null)
    456. -
    457.     {
    458. -
    459.         $graph =$this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI);
    460. -
    461.         $this->addNamedGraph(&$graph);
    462. -
    463.         
    464. -
    465.         return $graph;
    466. -
    467.     }
    468. -
    469.     
    470. -
    471.     /**
    472. -
    473.      * Deletes all NamedGraphs from the set.
    474. -
    475.      */
    476. -
    477.     function clear()
    478. -
    479.     {
    480. -
    481.         $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'");    
    482. -
    483.     }
    484. -
    485.  
    486. -
    487.     /** 
    488. -
    489.      * Returns the number of NamedGraphs in the set. Empty graphs are counted.
    490. -
    491.      *
    492. -
    493.      * @return int 
    494. -
    495.      */
    496. -
    497.     function countGraphs(
    498. -
    499.     {
    500. -
    501.         return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'"));    
    502. -
    503.     }
    504. -
    505.     
    506. -
    507.     /**
    508. -
    509.      * Returns an iterator over all {@link NamedGraph}s in the set.
    510. -
    511.      *
    512. -
    513.      * @return IteratorAllGraphsDb 
    514. -
    515.      */
    516. -
    517.     function &listNamedGraphs()
    518. -
    519.     {
    520. -
    521.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    522. -
    523.         return (new IteratorAllGraphsDb(&$recordSet,&$this));
    524. -
    525.     }
    526. -
    527.     
    528. -
    529.     /**
    530. -
    531.      * Tells wether the set contains any NamedGraphs.
    532. -
    533.      *
    534. -
    535.      * @return boolean 
    536. -
    537.      */
    538. -
    539.     function isEmpty()
    540. -
    541.     {
    542. -
    543.         return ($this->countGraphs()==0);    
    544. -
    545.     }
    546. -
    547.  
    548. -
    549.     /**
    550. -
    551.      * Add all named graphs of the other dataset to this dataset.
    552. -
    553.      *
    554. -
    555.      * @param Dataset 
    556. -
    557.      */
    558. -
    559.     function addAll($otherDataset)
    560. -
    561.     {
    562. -
    563.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next()) 
    564. -
    565.         {
    566. -
    567.             $this->addNamedGraph($iterator->current());
    568. -
    569.          };
    570. -
    571.          
    572. -
    573.          if ($otherDataset->hasDefaultGraph())
    574. -
    575.          {
    576. -
    577.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());    
    578. -
    579.          }
    580. -
    581.     }
    582. -
    583.     
    584. -
    585. //    === Quad level methods ========================
    586. -
    587.  
    588. -
    589.     
    590. -
    591.     /**
    592. -
    593.      * Adds a quad to the Dataset. The argument must not contain any
    594. -
    595.      * wildcards. If the quad is already present, nothing happens. A new
    596. -
    597.      * named graph will automatically be created if necessary.
    598. -
    599.      *
    600. -
    601.      * @param Quad 
    602. -
    603.      */
    604. -
    605.     function addQuad(&$quad)
    606. -
    607.     {
    608. -
    609.         $graphName=$quad->getGraphName();
    610. -
    611.         $graphName=$graphName->getLabel();
    612. -
    613.         
    614. -
    615.         $graph=$this->getNamedGraph($graphName);
    616. -
    617.         
    618. -
    619.         if ($graph===null)
    620. -
    621.             $graph=$this->createGraph($graphName);
    622. -
    623.         
    624. -
    625.         $statement=$quad->getStatement();
    626. -
    627.         $graph->add($statement);
    628. -
    629.     }
    630. -
    631.     
    632. -
    633.     /**
    634. -
    635.      * Tells wether the Dataset contains a quad or
    636. -
    637.      * quads matching a pattern.
    638. -
    639.      * 
    640. -
    641.      * @param Resource 
    642. -
    643.      * @param Resource 
    644. -
    645.      * @param Resource 
    646. -
    647.      * @param Resource 
    648. -
    649.      * @return boolean 
    650. -
    651.      */
    652. -
    653.     function containsQuad($graphName,$subject,$predicate,$object)
    654. -
    655.     {
    656. -
    657.         // static part of the sql statement
    658. -
    659.         $sql "SELECT count(*)
    660. -
    661.                   FROM statements, dataset_model
    662. -
    663.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    664. -
    665.  
    666. -
    667.         if($graphName!=null)
    668. -
    669.         {
    670. -
    671.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    672. -
    673.         }
    674. -
    675.         
    676. -
    677.         // dynamic part of the sql statement
    678. -
    679.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    680. -
    681.  
    682. -
    683.         return (($this->dbConnection->GetOne($sql))>0);
    684. -
    685.     
    686. -
    687.     
    688. -
    689.     /**
    690. -
    691.      * Deletes a Quad from the RDF dataset.
    692. -
    693.      *
    694. -
    695.      * @param Quad 
    696. -
    697.      */
    698. -
    699.     function removeQuad($quad)
    700. -
    701.     {
    702. -
    703.         $graphName=$quad->getGraphName();$graphName=$graphName->getLabel();
    704. -
    705.         //find namedGraph IDs
    706. -
    707.         $graphID $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'");
    708. -
    709.  
    710. -
    711.         // static part of the sql statement
    712. -
    713.         $sql "DELETE FROM statements WHERE modelID = $graphID";
    714. -
    715.  
    716. -
    717.         // dynamic part of the sql statement
    718. -
    719.         $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject()$quad->getPredicate()$quad->getObject());
    720. -
    721.  
    722. -
    723.         // execute the query
    724. -
    725.         if($graphID)
    726. -
    727.             $recordSet =$this->dbConnection->execute($sql);
    728. -
    729.     }
    730. -
    731.     
    732. -
    733.     /**
    734. -
    735.      * Counts the Quads in the RDF dataset. Identical Triples in
    736. -
    737.      * different NamedGraphs are counted individually.
    738. -
    739.      *
    740. -
    741.      * @return int 
    742. -
    743.      */
    744. -
    745.     function countQuads()
    746. -
    747.     {
    748. -
    749.         $sql "SELECT count(*)
    750. -
    751.                   FROM statements, dataset_model
    752. -
    753.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    754. -
    755.         
    756. -
    757.         return ((int)$this->dbConnection->GetOne($sql));
    758. -
    759.     }
    760. -
    761.     
    762. -
    763.     /**
    764. -
    765.      * Finds Statements that match a quad pattern. The argument may contain
    766. -
    767.      * wildcards.
    768. -
    769.      *
    770. -
    771.      * @param Resource or null
    772. -
    773.      * @param Resource or null
    774. -
    775.      * @param Resource or null
    776. -
    777.      * @param Resource or null
    778. -
    779.      * @return IteratorFindQuadsDb 
    780. -
    781.      */
    782. -
    783.     function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false )
    784. -
    785.     {
    786. -
    787.         // static part of the sql statement
    788. -
    789.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI
    790. -
    791.                   FROM statements, dataset_model
    792. -
    793.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    794. -
    795.  
    796. -
    797.         if($graphName!=null)
    798. -
    799.         {
    800. -
    801.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    802. -
    803.         }
    804. -
    805.         
    806. -
    807.         // dynamic part of the sql statement
    808. -
    809.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    810. -
    811.  
    812. -
    813.         // execute the query
    814. -
    815.         $recordSet =$this->dbConnection->execute($sql);
    816. -
    817.         
    818. -
    819.  
    820. -
    821.         return new IteratorFindQuadsDb(&$recordSet,&$this,$returnAsTriples);
    822. -
    823.     }
    824. -
    825.     
    826. -
    827.     /**
    828. -
    829.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    830. -
    831.      * wildcards.
    832. -
    833.      *
    834. -
    835.      * @param Resource or null
    836. -
    837.      * @param Resource or null
    838. -
    839.      * @param Resource or null
    840. -
    841.      * @return IteratorFindQuadsDb 
    842. -
    843.      */
    844. -
    845.     function &findInDefaultGraph($subject,$predicate,$object)
    846. -
    847.     {
    848. -
    849.         $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI");
    850. -
    851.         // static part of the sql statement
    852. -
    853.         $sql "SELECT subjectpredicateobjectl_languagel_datatypesubject_isobject_is
    854. -
    855.                   FROM statements
    856. -
    857.                    WHERE modelID ='$defaultGraphID'";
    858. -
    859.         
    860. -
    861.         // dynamic part of the sql statement
    862. -
    863.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    864. -
    865.  
    866. -
    867.         // execute the query
    868. -
    869.         $recordSet =$this->dbConnection->execute($sql);
    870. -
    871.         
    872. -
    873.         return new IteratorFindQuadsDb(&$recordSet,&$this,true);
    874. -
    875.     }
    876. -
    877. }
    878. -
    879. ?>
    880. -
    -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:25:20 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetMem.php.html deleted file mode 100755 index 89df3a11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetDatasetMem.php.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - File Source for DatasetMem.php - - - - - -

    Source for file DatasetMem.php

    -

    Documentation is available at DatasetMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Dataset.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'dataset/NamedGraphMem.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DatasetMem
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * In-memory implementation of a RDF dataset.
    20. -
    21. * A RDF dataset set is a collection of named RDF graphs.
    22. -
    23. *
    24. -
    25. @version  $Id: fsource_dataset__datasetDatasetMem.php.html 442 2007-06-01 16:19:26Z cax $
    26. -
    27. @author Daniel Westphal (http://www.d-westphal.de)
    28. -
    29. @author Chris Bizer <chris@bizer.de>
    30. -
    31. *
    32. -
    33. @package     dataset
    34. -
    35. @access    public
    36. -
    37. ***/
    38. -
    39.  
    40. -
    41. class DatasetMem extends Dataset
    42. -
    43. {
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * Reference to a Memmodel that holds the default graph.
    50. -
    51.     *
    52. -
    53.     * @var        resource Memmodel
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $defaultGraph;
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Name of the DatasetMem.
    68. -
    69.     *
    70. -
    71.     * @var        string 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $setName;
    78. -
    79.  
    80. -
    81.     /**
    82. -
    83.     * List of all NamedGraphs.
    84. -
    85.     *
    86. -
    87.     * @var        array 
    88. -
    89.     * @access    private
    90. -
    91.     */
    92. -
    93.     var $graphs=array();
    94. -
    95.  
    96. -
    97.     /**
    98. -
    99.     * Constructor.
    100. -
    101.     * You can supply a Dataset name.
    102. -
    103.     *
    104. -
    105.     * @param string 
    106. -
    107.     * @access    public
    108. -
    109.     */
    110. -
    111.     function DatasetMem($datasetName null)
    112. -
    113.     {
    114. -
    115.         $this->setDatasetName($datasetName);
    116. -
    117.         $this->defaultGraph=new MemModel();
    118. -
    119.     }
    120. -
    121.  
    122. -
    123. //    === Graph level methods ========================
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     * Sets the Datasets name.
    130. -
    131.     *
    132. -
    133.     * @param  string 
    134. -
    135.     * @access    public
    136. -
    137.     */
    138. -
    139.     function setDatasetName($datasetName)
    140. -
    141.     {
    142. -
    143.         $this->setName=$datasetName;
    144. -
    145.     }
    146. -
    147.  
    148. -
    149.     /**
    150. -
    151.     * Returns the Datasets name.
    152. -
    153.     *
    154. -
    155.     * @return string 
    156. -
    157.     * @access    public
    158. -
    159.     */
    160. -
    161.     function getDatasetName()
    162. -
    163.     {
    164. -
    165.         return $this->setName;
    166. -
    167.     }
    168. -
    169.  
    170. -
    171.     /**
    172. -
    173.      * Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    174. -
    175.      *
    176. -
    177.      * @param NamedGraphMem 
    178. -
    179.      */
    180. -
    181.     function addNamedGraph(&$graph)
    182. -
    183.     {
    184. -
    185.         $graphNameURI=$graph->getGraphName();
    186. -
    187.         $this->graphs[$graphNameURI]=&$graph;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.      * Overwrites the existting default graph.
    196. -
    197.      *
    198. -
    199.      * @param MemModel 
    200. -
    201.      */
    202. -
    203.     function setDefaultGraph(&$graph)
    204. -
    205.     {
    206. -
    207.         $this->defaultGraph=&$graph;
    208. -
    209.     }
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.      * Returns a reference to the defaultGraph
    216. -
    217.      * @return Model 
    218. -
    219.     */
    220. -
    221.     function &getDefaultGraph()
    222. -
    223.     {
    224. -
    225.         return $this->defaultGraph;
    226. -
    227.     }
    228. -
    229.  
    230. -
    231.     /**
    232. -
    233.      * Returns true, if an defaultGraph exists. False otherwise    .
    234. -
    235.      *
    236. -
    237.      * @return boolean 
    238. -
    239.     */
    240. -
    241.     function hasDefaultGraph()
    242. -
    243.     {
    244. -
    245.         return $this->defaultGraph != null;
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     /**
    252. -
    253.      * Removes a NamedGraph from the set. Nothing happens
    254. -
    255.      * if no graph with that name is contained in the set.
    256. -
    257.      *
    258. -
    259.      * @param string 
    260. -
    261.      */
    262. -
    263.     function removeNamedGraph($graphName)
    264. -
    265.     {
    266. -
    267.         unset($this->graphs[$graphName]);
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     /**
    274. -
    275.      * Tells wether the Dataset contains a NamedGraph.
    276. -
    277.      *
    278. -
    279.      * @param  string 
    280. -
    281.      * @return boolean 
    282. -
    283.      */
    284. -
    285.     function containsNamedGraph($graphName)
    286. -
    287.     {
    288. -
    289.         return isset($this->graphs[$graphName]=== true;
    290. -
    291.     }
    292. -
    293.  
    294. -
    295.     /**
    296. -
    297.      * Returns the NamedGraph with a specific name from the Dataset.
    298. -
    299.      * Changes to the graph will be reflected in the set.
    300. -
    301.      *
    302. -
    303.      * @param string 
    304. -
    305.      * @return NamedGraphMem or NULL
    306. -
    307.      */
    308. -
    309.     function &getNamedGraph($graphName)
    310. -
    311.     {
    312. -
    313.         if (!isset($this->graphs[$graphName])) return NULL;
    314. -
    315.         return $this->graphs[$graphName];
    316. -
    317.     }
    318. -
    319.  
    320. -
    321.     /**
    322. -
    323.      * Returns the names of the namedGraphs in this set as strings in an array.
    324. -
    325.      *
    326. -
    327.      * @return Array 
    328. -
    329.      */
    330. -
    331.     function listGraphNames()
    332. -
    333.     {
    334. -
    335.         return array_keys($this->graphs);
    336. -
    337.     }
    338. -
    339.  
    340. -
    341.     /**
    342. -
    343.      * Creates a new NamedGraph and adds it to the set. An existing
    344. -
    345.      * graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    346. -
    347.      *
    348. -
    349.      * @param  string 
    350. -
    351.      * @param  string 
    352. -
    353.      * @return NamedGraphMem 
    354. -
    355.      */
    356. -
    357.     function &createGraph($graphName,$baseURI null)
    358. -
    359.     {
    360. -
    361.         $this->graphs[$graphName]=new NamedGraphMem($graphName,$baseURI);
    362. -
    363.         return $this->getNamedGraph($graphName);
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.      * Deletes all NamedGraphs from the set.
    372. -
    373.      */
    374. -
    375.     function clear()
    376. -
    377.     {
    378. -
    379.         $this->graphs array();
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     /**
    386. -
    387.      * Returns the number of NamedGraphs in the set. Empty graphs
    388. -
    389.      * are counted.
    390. -
    391.      *
    392. -
    393.      * @return int 
    394. -
    395.      */
    396. -
    397.     function countGraphs()
    398. -
    399.     {
    400. -
    401.         return count($this->graphs);
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     /**
    408. -
    409.      * Returns the NamedGraph with a specific offset in the dataset.
    410. -
    411.      * Changes to the graph will be reflected in the set.
    412. -
    413.      *
    414. -
    415.      * @param int 
    416. -
    417.      * @return NamedGraphMem or null
    418. -
    419.      * @access    private
    420. -
    421.      */
    422. -
    423.     function &getGraphWithOffset($offset)
    424. -
    425.     {
    426. -
    427.         $i=0;
    428. -
    429.         foreach ($this->graphs as $graph)
    430. -
    431.         {
    432. -
    433.             if (($i++)==$offset)
    434. -
    435.                 return $graph;
    436. -
    437.         }
    438. -
    439.         $n null;
    440. -
    441.         return $n;
    442. -
    443.     }
    444. -
    445.  
    446. -
    447.     /**
    448. -
    449.      * Returns an iterator over all {@link NamedGraph}s in the set.
    450. -
    451.      *
    452. -
    453.      * @return IteratorAllGraphsMem 
    454. -
    455.      */
    456. -
    457.     function &listNamedGraphs()
    458. -
    459.     {
    460. -
    461.         require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsMem.php';
    462. -
    463.         $m new IteratorAllGraphsMem($this);
    464. -
    465.         return $m;
    466. -
    467.     }
    468. -
    469.  
    470. -
    471.     /**
    472. -
    473.      * Tells wether the set contains any NamedGraphs.
    474. -
    475.      *
    476. -
    477.      * @return boolean 
    478. -
    479.      */
    480. -
    481.     function isEmpty()
    482. -
    483.     {
    484. -
    485.         return $this->countGraphs(== 0;
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     /**
    492. -
    493.      * Adds all named graphs of the other dataset to this dataset.
    494. -
    495.      *
    496. -
    497.      * @param Dataset 
    498. -
    499.      */
    500. -
    501.     function addAll($otherDataset)
    502. -
    503.     {
    504. -
    505.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next())
    506. -
    507.         {
    508. -
    509.             $current=$iterator->current();
    510. -
    511.             $this->graphs[$current->getGraphName()]=$current;
    512. -
    513.          }
    514. -
    515.  
    516. -
    517.          if ($otherDataset->hasDefaultGraph())
    518. -
    519.          {
    520. -
    521.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());
    522. -
    523.          }
    524. -
    525.     }
    526. -
    527.  
    528. -
    529. //    === Quad level methods ========================
    530. -
    531.  
    532. -
    533.     /**
    534. -
    535.      * Adds a quad to the Dataset. The argument must not contain any
    536. -
    537.      * wildcards. If the quad is already present, nothing happens. A new
    538. -
    539.      * named graph will automatically be created if necessary.
    540. -
    541.      *
    542. -
    543.      * @param Quad 
    544. -
    545.      */
    546. -
    547.     function addQuad(&$quad)
    548. -
    549.     {
    550. -
    551.         $graphName=$quad->getGraphName();
    552. -
    553.         if ($this->containsNamedGraph($graphName->getLabel())===false)
    554. -
    555.             $this->createGraph($graphName->getLabel());
    556. -
    557.  
    558. -
    559.         $this->graphs[$graphName->getLabel()]->add($quad->getStatement());
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.  
    566. -
    567.     /**
    568. -
    569.      * Tells wether the Dataset contains a quad or
    570. -
    571.      * quads matching a pattern.
    572. -
    573.      *
    574. -
    575.      * @param Resource $graphName 
    576. -
    577.      * @param Resource $subject 
    578. -
    579.      * @param Resource $predicate 
    580. -
    581.      * @param Resource $object 
    582. -
    583.      * @return boolean 
    584. -
    585.      */
    586. -
    587.     function containsQuad($graphName,$subject,$predicate,$object)
    588. -
    589.     {
    590. -
    591.         if($graphName!=null)
    592. -
    593.         {
    594. -
    595.             if ($this->containsNamedGraph($graphName->getLabel())!==true)
    596. -
    597.                 return false;
    598. -
    599.  
    600. -
    601.             return ($this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject,$predicate,$object)!=null);
    602. -
    603.         }
    604. -
    605.  
    606. -
    607.         foreach ($this->graphs as $graph)
    608. -
    609.         {
    610. -
    611.             if ($graph->findFirstMatchingStatement($subject,$predicate,$object)!=null)
    612. -
    613.                 return true;
    614. -
    615.         };
    616. -
    617.  
    618. -
    619.         return false;
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     /**
    626. -
    627.      * Deletes a Quad from the RDF dataset.
    628. -
    629.      *
    630. -
    631.      * @param Quad 
    632. -
    633.      */
    634. -
    635.     function removeQuad($quad)
    636. -
    637.     {
    638. -
    639.             $graphName=$quad->getGraphName();
    640. -
    641.  
    642. -
    643.             if($graphName!=null)
    644. -
    645.             {
    646. -
    647.                 if ($this->containsNamedGraph($graphName->getLabel())!==true)
    648. -
    649.                     return;
    650. -
    651.  
    652. -
    653.                 return ($this->graphs[$graphName->getLabel()]->remove($quad->getStatement())!=null);
    654. -
    655.  
    656. -
    657.             }
    658. -
    659.             foreach ($this->graphs as $graph)
    660. -
    661.             {
    662. -
    663.                 $graph->remove($quad->getStatement());
    664. -
    665.             };
    666. -
    667.     }
    668. -
    669.  
    670. -
    671.     /**
    672. -
    673.      * Counts the Quads in the RDF dataset. Identical Triples in
    674. -
    675.      * different NamedGraphs are counted individually.
    676. -
    677.      *
    678. -
    679.      * @return int 
    680. -
    681.      */
    682. -
    683.     function countQuads()
    684. -
    685.     {
    686. -
    687.         $count=0;
    688. -
    689.         foreach ($this->graphs as $graph)
    690. -
    691.         {
    692. -
    693.             $count+=$graph->size();
    694. -
    695.         }
    696. -
    697.         return $count;
    698. -
    699.     }
    700. -
    701.  
    702. -
    703.     /**
    704. -
    705.      * Finds Statements that match a quad pattern. The argument may contain
    706. -
    707.      * wildcards.
    708. -
    709.      *
    710. -
    711.      * @param Resource or Null
    712. -
    713.      * @param Resourceor Null
    714. -
    715.      * @param Resource or Null
    716. -
    717.      * @param Resource or Null
    718. -
    719.      * @return Iterator 
    720. -
    721.      */
    722. -
    723.     function &findInNamedGraphs($graph,$subject,$predicate,$object,$returnAsTriples false)
    724. -
    725.     {
    726. -
    727.  
    728. -
    729.         if ($graph!=null)
    730. -
    731.         {
    732. -
    733.             $findGraph=&$this->getNamedGraph($graph->getLabel());
    734. -
    735.             if($findGraph==null)
    736. -
    737.                 $findGraph=new MemModel();
    738. -
    739.  
    740. -
    741.             return $findGraph->iterFind($subject,$predicate,$object);
    742. -
    743.         }
    744. -
    745.  
    746. -
    747.  
    748. -
    749.         require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsMem.php';
    750. -
    751.         $m new IteratorFindQuadsMem($subject,$predicate,$object,$this->listNamedGraphs(),$returnAsTriples);
    752. -
    753.         return $m;
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     /**
    760. -
    761.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    762. -
    763.      * wildcards.
    764. -
    765.      *
    766. -
    767.      * @param Resource or Null
    768. -
    769.      * @param Resource or Null
    770. -
    771.      * @param Resource or Null
    772. -
    773.      * @return Iterator 
    774. -
    775.      */
    776. -
    777.     function &findInDefaultGraph($subject,$predicate,$object)
    778. -
    779.     {
    780. -
    781.         return $this->defaultGraph->iterFind($subject,$predicate,$object);
    782. -
    783.     }
    784. -
    785. }
    786. -
    787. ?>
    788. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:42 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsDb.php.html deleted file mode 100755 index fd01375d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsDb.php.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - File Source for IteratorAllGraphsDb.php - - - - - -

    Source for file IteratorAllGraphsDb.php

    -

    Documentation is available at IteratorAllGraphsDb.php

    -
    -
    1. <?php 
    2. -
    3. //----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorAllGraphsDb
    6. -
    7. //----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a Graph iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used in a for-loop like:
    20. -
    21. * for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentResource=$iterator->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. @version  $Id: fsource_dataset__datasetIteratorAllGraphsDb.php.html 442 2007-06-01 16:19:26Z cax $
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     dataset
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Holds a reference to the associated DB resultSet
    51. -
    52.     * @var        $dbResultSets ADODB result
    53. -
    54.     * @access    private
    55. -
    56.     */
    57. -
    58.     var $dbResultSet;
    59. -
    60.     
    61. -
    62.     /**
    63. -
    64.     * Holds a reference to the associated datasetDb
    65. -
    66.     * @var        datasetDb 
    67. -
    68.     * @access    private
    69. -
    70.     */
    71. -
    72.     var $datasetDb;
    73. -
    74.     
    75. -
    76.     
    77. -
    78.     /**
    79. -
    80.     * The current position
    81. -
    82.     * @var        integer 
    83. -
    84.     * @access    private
    85. -
    86.     */
    87. -
    88.     var $key;
    89. -
    90.     
    91. -
    92.     
    93. -
    94.     /**
    95. -
    96.     * The current NamedGraph
    97. -
    98.     * @var obejct NamedGraph
    99. -
    100.     * @access    private
    101. -
    102.     */
    103. -
    104.     var $current;
    105. -
    106.     
    107. -
    108.     
    109. -
    110.     
    111. -
    112.     /**
    113. -
    114.     * Constructor.
    115. -
    116.     *
    117. -
    118.     *
    119. -
    120.     * @param ADODBResultSet 
    121. -
    122.     * @param DatasetDb 
    123. -
    124.     * @access    public
    125. -
    126.     */
    127. -
    128.     function IteratorAllGraphsDb(&$dbResultSet,&$datasetDb)
    129. -
    130.     {
    131. -
    132.         $this->dbResultSet=$dbResultSet;
    133. -
    134.         $this->datasetDb=$datasetDb;
    135. -
    136.         $this->current $this->dbResultSet->fields[0];
    137. -
    138.     }
    139. -
    140.     
    141. -
    142.     /**
    143. -
    144.     * Resets iterator list to start
    145. -
    146.     *
    147. -
    148.     * @access public
    149. -
    150.     */
    151. -
    152.     function rewind()
    153. -
    154.     {
    155. -
    156.         //not supported
    157. -
    158.     }
    159. -
    160.     
    161. -
    162.     /**
    163. -
    164.     * Says if there are additional items left in the list
    165. -
    166.     *
    167. -
    168.     * @return    boolean 
    169. -
    170.     * @access    public
    171. -
    172.     */
    173. -
    174.     function valid()
    175. -
    176.     {
    177. -
    178.         return (!$this->dbResultSet->EOF);
    179. -
    180.     }
    181. -
    182.     
    183. -
    184.     /**
    185. -
    186.     * Moves Iterator to the next item in the list
    187. -
    188.     *
    189. -
    190.     * @access    public
    191. -
    192.     */
    193. -
    194.     function next()
    195. -
    196.     {
    197. -
    198.         $this->dbResultSet->moveNext();
    199. -
    200.         $this->current $this->dbResultSet->fields[0];
    201. -
    202.     }
    203. -
    204.     
    205. -
    206.     /**
    207. -
    208.     * Returns the current item
    209. -
    210.     *
    211. -
    212.     * @return    mixed 
    213. -
    214.     * @access    public
    215. -
    216.     */
    217. -
    218.     function &current()
    219. -
    220.     {
    221. -
    222.         return ($this->datasetDb->getNamedGraph($this->current));
    223. -
    224.     }
    225. -
    226.     
    227. -
    228.     
    229. -
    230.     /**
    231. -
    232.     * Returns the key of the current item
    233. -
    234.     *
    235. -
    236.     * @return    integer 
    237. -
    238.     * @access    public
    239. -
    240.     */
    241. -
    242.     function key()
    243. -
    244.     {
    245. -
    246.         return $this->dbResultSet->_currentRow;
    247. -
    248.     }
    249. -
    250. }
    251. -
    252. ?>
    253. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsMem.php.html deleted file mode 100755 index eed2db91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorAllGraphsMem.php.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - File Source for IteratorAllGraphsMem.php - - - - - -

    Source for file IteratorAllGraphsMem.php

    -

    Documentation is available at IteratorAllGraphsMem.php

    -
    -
    1. <?php 
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorAllGraphsMem
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a Graph iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used in a for-loop like:
    20. -
    21. * for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentResource=$it->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. @version  $Id: fsource_dataset__datasetIteratorAllGraphsMem.php.html 442 2007-06-01 16:19:26Z cax $
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     dataset
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Holds a reference to the associated RDF dataset
    51. -
    52.     *
    53. -
    54.     * @var        object dataset 
    55. -
    56.     * @access    private
    57. -
    58.     */
    59. -
    60.     var $associatedGraphSet;
    61. -
    62.     
    63. -
    64.     /**
    65. -
    66.     * The current position
    67. -
    68.     *
    69. -
    70.     * @var        integer 
    71. -
    72.     * @access    private
    73. -
    74.     */
    75. -
    76.     var $key;
    77. -
    78.     
    79. -
    80.     /**
    81. -
    82.     * If the current resource is valid
    83. -
    84.     *
    85. -
    86.     * @var        boolean 
    87. -
    88.     * @access    private
    89. -
    90.     */
    91. -
    92.     var $valid;
    93. -
    94.     
    95. -
    96.     /**
    97. -
    98.     * The current NamedGraph
    99. -
    100.     *
    101. -
    102.     * @var obejct NamedGraph
    103. -
    104.     * @access    private
    105. -
    106.     */
    107. -
    108.     var $current;
    109. -
    110.     
    111. -
    112.     
    113. -
    114.     /**
    115. -
    116.     * Constructor.
    117. -
    118.     *
    119. -
    120.     * @param dataset 
    121. -
    122.     * @access    public
    123. -
    124.     */
    125. -
    126.     function IteratorAllGraphsMem(&$namedGraphSet)
    127. -
    128.     {
    129. -
    130.         $this->associatedGraphSet=&$namedGraphSet;
    131. -
    132.         $this->rewind();
    133. -
    134.     }
    135. -
    136.     
    137. -
    138.     /**
    139. -
    140.     * Resets iterator list to start
    141. -
    142.     *
    143. -
    144.     * @access public
    145. -
    146.     */
    147. -
    148.     function rewind()
    149. -
    150.     {
    151. -
    152.         $this->key = -1;
    153. -
    154.         $this->next();
    155. -
    156.     }
    157. -
    158.     
    159. -
    160.     /**
    161. -
    162.     * Says if there are additional items left in the list.
    163. -
    164.     *
    165. -
    166.     * @return    boolean 
    167. -
    168.     * @access    public
    169. -
    170.     */
    171. -
    172.     function valid()
    173. -
    174.     {
    175. -
    176.         return $this->valid;
    177. -
    178.     }
    179. -
    180.     
    181. -
    182.     /**
    183. -
    184.     * Moves Iterator to the next item in the list.
    185. -
    186.     *
    187. -
    188.     * @access    public
    189. -
    190.     */
    191. -
    192.     function next()
    193. -
    194.     {
    195. -
    196.         $this->current &$this->associatedGraphSet->getGraphWithOffset(++$this->key);
    197. -
    198.         $this->valid=($this->current!=NULL);
    199. -
    200.     }
    201. -
    202.     
    203. -
    204.     /**
    205. -
    206.     * Returns the current item.
    207. -
    208.     *
    209. -
    210.     * @return    mixed 
    211. -
    212.     * @access    public
    213. -
    214.     */
    215. -
    216.     function &current()
    217. -
    218.     {
    219. -
    220.         return $this->current;
    221. -
    222.     }
    223. -
    224.     
    225. -
    226.     /**
    227. -
    228.     * Returns the key of the current item.
    229. -
    230.     *
    231. -
    232.     * @return    integer 
    233. -
    234.     * @access    public
    235. -
    236.     */
    237. -
    238.     function key()
    239. -
    240.     {
    241. -
    242.         return $this->key;
    243. -
    244.     }
    245. -
    246. }
    247. -
    248. ?>
    249. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsDb.php.html deleted file mode 100755 index ae2bd197..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsDb.php.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - File Source for IteratorFindQuadsDb.php - - - - - -

    Source for file IteratorFindQuadsDb.php

    -

    Documentation is available at IteratorFindQuadsDb.php

    -
    -
    1. <?php 
    2. -
    3. //----------------------------------------------------------------------------------
    4. -
    5. // Class: IteratorFindQuadsDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Implementation of a quad iterator.
    16. -
    17. *
    18. -
    19. * This Iterator should be used like:
    20. -
    21. * for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    22. -
    23. * {
    24. -
    25. *    $currentQuad=$iterator->current();
    26. -
    27. * };
    28. -
    29. *
    30. -
    31. *
    32. -
    33. @version  $Id: fsource_dataset__datasetIteratorFindQuadsDb.php.html 442 2007-06-01 16:19:26Z cax $
    34. -
    35. @author Daniel Westphal (http://www.d-westphal.de)
    36. -
    37. *
    38. -
    39. *
    40. -
    41. @package     dataset
    42. -
    43. @access    public
    44. -
    45. ***/
    46. -
    47. -
    48. {
    49. -
    50.     /**
    51. -
    52.     * Holds a reference to the associated DB resultSet.
    53. -
    54.     *
    55. -
    56.     * @var        $dbResultSets ADODB result
    57. -
    58.     * @access    private
    59. -
    60.     */
    61. -
    62.     var $dbResultSet;
    63. -
    64.     
    65. -
    66.     /**
    67. -
    68.     * Holds a reference to the associated datasetDb.
    69. -
    70.     *
    71. -
    72.     * @var        $datasetDb datasetDb
    73. -
    74.     * @access    private
    75. -
    76.     */
    77. -
    78.     var $datasetDb;
    79. -
    80.  
    81. -
    82.     /**
    83. -
    84.     * boolean value, if the results should be returned as triples.
    85. -
    86.     *
    87. -
    88.     * @var        boolean 
    89. -
    90.     * @access    private
    91. -
    92.     */
    93. -
    94.     var $returnAsTriples;
    95. -
    96.     
    97. -
    98.     /**
    99. -
    100.     * Constructor.
    101. -
    102.     *
    103. -
    104.     * @param dataset 
    105. -
    106.     * @access    public
    107. -
    108.     */
    109. -
    110.     function IteratorFindQuadsDb(&$dbResultSet,&$datasetDb,$returnAsTriples=false)
    111. -
    112.     {
    113. -
    114.         $this->dbResultSet=$dbResultSet;
    115. -
    116.         $this->datasetDb=$datasetDb;
    117. -
    118.         $this->returnAsTriples=$returnAsTriples;
    119. -
    120.     }
    121. -
    122.     
    123. -
    124.     /**
    125. -
    126.     * Resets iterator list to start.
    127. -
    128.     *
    129. -
    130.     * @access public
    131. -
    132.     */
    133. -
    134.     function rewind()
    135. -
    136.     {
    137. -
    138.         //not supported
    139. -
    140.     }
    141. -
    142.     
    143. -
    144.     /**
    145. -
    146.     * Says if there are additional items left in the list.
    147. -
    148.     *
    149. -
    150.     * @return    boolean 
    151. -
    152.     * @access    public
    153. -
    154.     */
    155. -
    156.     function valid()
    157. -
    158.     {
    159. -
    160.         if (($this->dbResultSet ===falseOR ($this->dbResultSet->EOF) )
    161. -
    162.             return false;
    163. -
    164.         
    165. -
    166.         return true;
    167. -
    168.     }
    169. -
    170.     
    171. -
    172.     /**
    173. -
    174.     * Moves Iterator to the next item in the list.
    175. -
    176.     *
    177. -
    178.     * @access    public
    179. -
    180.     */
    181. -
    182.     function next()
    183. -
    184.     {
    185. -
    186.         if ($this->dbResultSet!==false)
    187. -
    188.             $this->dbResultSet->moveNext();
    189. -
    190.     }
    191. -
    192.     
    193. -
    194.     /**
    195. -
    196.     * Returns the current item.
    197. -
    198.     *
    199. -
    200.     * @return    mixed 
    201. -
    202.     * @access    public
    203. -
    204.     */
    205. -
    206.     function &current()
    207. -
    208.     {
    209. -
    210.         if ($this->dbResultSet===false)
    211. -
    212.             return null;
    213. -
    214.         // subject
    215. -
    216.         if ($this->dbResultSet->fields[5== 'r')
    217. -
    218.         $sub new Resource($this->dbResultSet->fields[0]);
    219. -
    220.         else
    221. -
    222.         $sub new BlankNode($this->dbResultSet->fields[0]);
    223. -
    224.  
    225. -
    226.         // predicate
    227. -
    228.         $pred new Resource($this->dbResultSet->fields[1]);
    229. -
    230.  
    231. -
    232.         // object
    233. -
    234.         if ($this->dbResultSet->fields[6== 'r')
    235. -
    236.         $obj new Resource($this->dbResultSet->fields[2]);
    237. -
    238.         elseif ($this->dbResultSet->fields[6== 'b')
    239. -
    240.         $obj new BlankNode($this->dbResultSet->fields[2]);
    241. -
    242.         else {
    243. -
    244.             $obj new Literal($this->dbResultSet->fields[2]$this->dbResultSet->fields[3]);
    245. -
    246.             if ($this->dbResultSet->fields[4])
    247. -
    248.             $obj->setDatatype($this->dbResultSet->fields[4]);
    249. -
    250.         }
    251. -
    252.  
    253. -
    254.         if($this->returnAsTriples)
    255. -
    256.             return (new Statement($sub$pred$obj));
    257. -
    258.  
    259. -
    260.         return (new Quad(new Resource($this->dbResultSet->fields[7]),$sub,$pred,$obj));
    261. -
    262.     }
    263. -
    264.     
    265. -
    266.     /**
    267. -
    268.     * Returns the key of the current item.
    269. -
    270.     *
    271. -
    272.     * @return    integer 
    273. -
    274.     * @access    public
    275. -
    276.     */
    277. -
    278.     function key()
    279. -
    280.     {
    281. -
    282.         return $this->dbResultSet->_currentRow;
    283. -
    284.     }
    285. -
    286. }
    287. -
    288. ?>
    289. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsMem.php.html deleted file mode 100755 index d57ae6e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetIteratorFindQuadsMem.php.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - File Source for IteratorFindQuadsMem.php - - - - - -

    Source for file IteratorFindQuadsMem.php

    -

    Documentation is available at IteratorFindQuadsMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Quad.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: IteratorFindQuadsMem
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * Implementation of a quad iterator.
    20. -
    21. *
    22. -
    23. * This Iterator should be used like:
    24. -
    25. * for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    26. -
    27. * {
    28. -
    29. *    $currentQuad=$it->current();
    30. -
    31. * };
    32. -
    33. *
    34. -
    35. @version  $Id: fsource_dataset__datasetIteratorFindQuadsMem.php.html 442 2007-06-01 16:19:26Z cax $
    36. -
    37. @author Daniel Westphal (http://d-westphal.de)
    38. -
    39. *
    40. -
    41. *
    42. -
    43. @package     dataset
    44. -
    45. @access    public
    46. -
    47. ***/
    48. -
    49. -
    50. {
    51. -
    52.     /**
    53. -
    54.     * key value in the current graph.
    55. -
    56.     *
    57. -
    58.     * @var     dataset 
    59. -
    60.     * @access    private
    61. -
    62.     */
    63. -
    64.     var $graphKey;
    65. -
    66.  
    67. -
    68.     /**
    69. -
    70.     * boolean value, if the results should be returned as triples.
    71. -
    72.     *
    73. -
    74.     * @var        boolean 
    75. -
    76.     * @access    private
    77. -
    78.     */
    79. -
    80.     var $returnAsTriples;
    81. -
    82.  
    83. -
    84.     /**
    85. -
    86.     * The current position.
    87. -
    88.     *
    89. -
    90.     * @var        integer 
    91. -
    92.     * @access    private
    93. -
    94.     */
    95. -
    96.     var $key;
    97. -
    98.  
    99. -
    100.     /**
    101. -
    102.     * If the current resource is valid.
    103. -
    104.     *
    105. -
    106.     * @var        boolean 
    107. -
    108.     * @access    private
    109. -
    110.     */
    111. -
    112.     var $valid;
    113. -
    114.  
    115. -
    116.     /**
    117. -
    118.     * The current NamedGraph.
    119. -
    120.     *
    121. -
    122.     * @var  NamedGraph 
    123. -
    124.     * @access    private
    125. -
    126.     */
    127. -
    128.     var $current;
    129. -
    130.  
    131. -
    132.     /**
    133. -
    134.     * The graphName Resource to search for.
    135. -
    136.     *
    137. -
    138.     * @var string 
    139. -
    140.     * @access    private
    141. -
    142.     */
    143. -
    144.     var $findGraphName;
    145. -
    146.  
    147. -
    148.     /**
    149. -
    150.     * The subject Resource to search for.
    151. -
    152.     *
    153. -
    154.     * @var string 
    155. -
    156.     * @access    private
    157. -
    158.     */
    159. -
    160.     var $findSubject;
    161. -
    162.  
    163. -
    164.     /**
    165. -
    166.     * The predicate Resource to search for.
    167. -
    168.     *
    169. -
    170.     * @var string 
    171. -
    172.     * @access    private
    173. -
    174.     */
    175. -
    176.     var $findPredicate;
    177. -
    178.  
    179. -
    180.     /**
    181. -
    182.     * The object Resource to search for.
    183. -
    184.     *
    185. -
    186.     * @var string 
    187. -
    188.     * @access    private
    189. -
    190.     */
    191. -
    192.     var $findObject;
    193. -
    194.  
    195. -
    196.     /**
    197. -
    198.     * Iterator over all graphs of the RDF dataset.
    199. -
    200.     *
    201. -
    202.     * @var string 
    203. -
    204.     * @access    private
    205. -
    206.     */
    207. -
    208.     var $graphIterator;
    209. -
    210.  
    211. -
    212.  
    213. -
    214.     /**
    215. -
    216.     * Constructor.
    217. -
    218.     *
    219. -
    220.     * $subject, $predicate, and $object are used like find().
    221. -
    222.     * $getSPO supports the strings 's', 'p', and 'o' to return
    223. -
    224.     * either the subject, predicate, or object of the result statements.
    225. -
    226.     *
    227. -
    228.     *
    229. -
    230.     * @param Resource 
    231. -
    232.     * @param Resource 
    233. -
    234.     * @param Resource 
    235. -
    236.     * @param dataset 
    237. -
    238.     * @param Boolean 
    239. -
    240.     * @access    public
    241. -
    242.     */
    243. -
    244.     function IteratorFindQuadsMem($subject,$predicate,$object,&$graphIterator$returnAsTriples=false)
    245. -
    246.     {
    247. -
    248.         $this->findSubject=$subject;
    249. -
    250.         $this->findPredicate=$predicate;
    251. -
    252.         $this->findObject=$object;
    253. -
    254.         $this->graphIterator=&$graphIterator;
    255. -
    256.         $this->rewind();
    257. -
    258.         $this->returnAsTriples=$returnAsTriples;
    259. -
    260.     }
    261. -
    262.  
    263. -
    264.     /**
    265. -
    266.     * Resets iterator list to start.
    267. -
    268.     *
    269. -
    270.     * @access    public
    271. -
    272.     */
    273. -
    274.     function rewind()
    275. -
    276.     {
    277. -
    278.         $this->graphIterator->rewind();
    279. -
    280.         $this->key = -1;
    281. -
    282.         $this->graphKey=-1;
    283. -
    284.         $this->next();
    285. -
    286.     }
    287. -
    288.  
    289. -
    290.     /**
    291. -
    292.     * Says if there are additional items left in the list.
    293. -
    294.     *
    295. -
    296.     * @return    boolean 
    297. -
    298.     * @access    public
    299. -
    300.     */
    301. -
    302.     function valid()
    303. -
    304.     {
    305. -
    306.         return $this->valid;
    307. -
    308.     }
    309. -
    310.  
    311. -
    312.     /**
    313. -
    314.     * Moves Iterator to the next item in the list.
    315. -
    316.     *
    317. -
    318.     * @access    public
    319. -
    320.     */
    321. -
    322.     function next()
    323. -
    324.     {
    325. -
    326.         if($this->graphIterator->valid()===false)
    327. -
    328.         {
    329. -
    330.             $this->valid=false;
    331. -
    332.             return;
    333. -
    334.         }
    335. -
    336.  
    337. -
    338.         $currentGraph=&$this->graphIterator->current();
    339. -
    340.         $this->current$currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
    341. -
    342.         if($this->current==null)
    343. -
    344.         {
    345. -
    346.             do
    347. -
    348.             {
    349. -
    350.                 $this->graphIterator->next();
    351. -
    352.                 if($this->graphIterator->valid()===false)
    353. -
    354.                 {
    355. -
    356.                     $this->valid=false;
    357. -
    358.                     return;
    359. -
    360.                 }
    361. -
    362.                 $currentGraph=&$this->graphIterator->current();
    363. -
    364.                 $this->graphKey=-1;
    365. -
    366.                 $this->current$currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
    367. -
    368.  
    369. -
    370.             while ($this->current==null);
    371. -
    372.         }
    373. -
    374.         $this->key++;
    375. -
    376.         $this->valid=true;
    377. -
    378.     }
    379. -
    380.  
    381. -
    382.     /**
    383. -
    384.     * Returns the current item.
    385. -
    386.     *
    387. -
    388.     * @return    mixed 
    389. -
    390.     * @access    public
    391. -
    392.     */
    393. -
    394.     function current()
    395. -
    396.     {
    397. -
    398.         if($this->returnAsTriplesreturn $this->current;
    399. -
    400.  
    401. -
    402.         $currentGraph=&$this->graphIterator->current();
    403. -
    404.         return new Quad(new Resource($currentGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
    405. -
    406.     }
    407. -
    408.  
    409. -
    410.     /**
    411. -
    412.     * Returns the key of the current item.
    413. -
    414.     *
    415. -
    416.     * @return    integer 
    417. -
    418.     * @access    public
    419. -
    420.     */
    421. -
    422.     function key()
    423. -
    424.     {
    425. -
    426.         return $this->key;
    427. -
    428.     }
    429. -
    430. }
    431. -
    432. ?>
    433. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphDb.php.html deleted file mode 100755 index 649a0e0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphDb.php.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - File Source for NamedGraphDb.php - - - - - -

    Source for file NamedGraphDb.php

    -

    Documentation is available at NamedGraphDb.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: NamedGraphDb
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Persistent NamedGraph implementation that extends a {@link DbModel}.
    14. -
    15. * The graphName is not stored in the database. As soon as the namedGraph is added
    16. -
    17. * to a RDF dataset the graphName is saved.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_dataset__datasetNamedGraphDb.php.html 442 2007-06-01 16:19:26Z cax $
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class NamedGraphDb extends DbModel  
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphDb
    42. -
    43.     *
    44. -
    45.     * @var        string 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Constructor
    58. -
    59.     * Do not call this directly.
    60. -
    61.     * Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.
    62. -
    63.     *
    64. -
    65.     * @param   ADODBConnection 
    66. -
    67.     * @param   string 
    68. -
    69.     * @param   string 
    70. -
    71.     * @param   string 
    72. -
    73.     * @access    public
    74. -
    75.     */        
    76. -
    77.     function NamedGraphDb(&$dbConnection$modelURI$modelID,$graphName$baseURI=NULL)
    78. -
    79.     {
    80. -
    81.         $this->dbConn =$dbConnection;
    82. -
    83.         $this->modelURI $modelURI;
    84. -
    85.         $this->modelID $modelID;
    86. -
    87.         $this->baseURI $this->_checkBaseURI($baseURI);
    88. -
    89.         $this->graphName $graphName;
    90. -
    91.     }
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * Sets the graph name.
    98. -
    99.     *
    100. -
    101.     * @param string 
    102. -
    103.     * @access    public
    104. -
    105.     */    
    106. -
    107.     function setGraphName($graphName)
    108. -
    109.     {
    110. -
    111.         $this->graphName=$graphName;
    112. -
    113.     }
    114. -
    115.     
    116. -
    117.     /**
    118. -
    119.     * Returns the graph name.
    120. -
    121.     *
    122. -
    123.     * @return string 
    124. -
    125.     * @access    public
    126. -
    127.     */
    128. -
    129.     function getGraphName()
    130. -
    131.     {
    132. -
    133.         return $this->graphName;
    134. -
    135.     }
    136. -
    137. }
    138. -
    139. ?>
    140. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphMem.php.html deleted file mode 100755 index 5a7308f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetNamedGraphMem.php.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for NamedGraphMem.php - - - - - -

    Source for file NamedGraphMem.php

    -

    Documentation is available at NamedGraphMem.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: NamedGraphMem
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * NamedGraph implementation that extends a {@link MemModel}
    16. -
    17. * with a name.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_dataset__datasetNamedGraphMem.php.html 442 2007-06-01 16:19:26Z cax $
    22. -
    23. @author Daniel Westphal <http://www.d-westphal.de>
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class NamedGraphMem extends MemModel
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphMem.
    42. -
    43.     *
    44. -
    45.     * @var         string 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.  
    54. -
    55.  
    56. -
    57.     /**
    58. -
    59.     * Constructor
    60. -
    61.     * You have to supply a graph name. You can supply a URI.
    62. -
    63.     *
    64. -
    65.     * @param  string 
    66. -
    67.     * @param  string 
    68. -
    69.     * @access    public
    70. -
    71.     */
    72. -
    73.     function NamedGraphMem($graphName,$baseURI null)
    74. -
    75.     {
    76. -
    77.         $this->setBaseURI($baseURI);
    78. -
    79.         $this->indexed INDEX_TYPE;
    80. -
    81.         $this->setGraphName($graphName);
    82. -
    83.     }
    84. -
    85.  
    86. -
    87.     /**
    88. -
    89.     * Sets the graph name.
    90. -
    91.     *
    92. -
    93.     * @param  string 
    94. -
    95.     * @access    public
    96. -
    97.     */
    98. -
    99.     function setGraphName($graphName)
    100. -
    101.     {
    102. -
    103.         $this->graphName=$graphName;
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     /**
    110. -
    111.     * Returns the graph name.
    112. -
    113.     *
    114. -
    115.     * @return string 
    116. -
    117.     * @access    public
    118. -
    119.     */
    120. -
    121.     function getGraphName()
    122. -
    123.     {
    124. -
    125.         return $this->graphName;
    126. -
    127.     }
    128. -
    129. }
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetQuad.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetQuad.php.html deleted file mode 100755 index a9481664..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__datasetQuad.php.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - File Source for Quad.php - - - - - -

    Source for file Quad.php

    -

    Documentation is available at Quad.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Quad
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. *
    14. -
    15. * A Triple in a RDF dataset, consisting of four Jena Nodes: graphName,
    16. -
    17. * subject, predicate, and object.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_dataset__datasetQuad.php.html 442 2007-06-01 16:19:26Z cax $
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class Quad  
    34. -
    35. {
    36. -
    37.     
    38. -
    39.     /**
    40. -
    41.     * Name of the NamedGraphMem.
    42. -
    43.     *
    44. -
    45.     * @var        Resource 
    46. -
    47.     * @access    private
    48. -
    49.     */
    50. -
    51.     var $graphName;
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Statement
    58. -
    59.     *
    60. -
    61.     * @var        Statement 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $statement;
    68. -
    69.     
    70. -
    71.     /**
    72. -
    73.     * Constructor
    74. -
    75.     * Creates a Quad from four Nodes.
    76. -
    77.      *
    78. -
    79.     * @param Resource 
    80. -
    81.     * @param Resource 
    82. -
    83.     * @param Resource 
    84. -
    85.     * @param Resource 
    86. -
    87.     * @access    public
    88. -
    89.     */        
    90. -
    91.     function Quad($graphName,$subject,$predicate,$object)
    92. -
    93.     {
    94. -
    95.         if (!is_a($graphName'Resource')) 
    96. -
    97.         {
    98. -
    99.             $errmsg RDFAPI_ERROR 
    100. -
    101.                   '(class: Quad; method: new): Resource expected as graphName.';
    102. -
    103.             trigger_error($errmsgE_USER_ERROR)
    104. -
    105.         }
    106. -
    107.         $this->statement=new Statement($subject,$predicate,$object);
    108. -
    109.         $this->graphName=$graphName;
    110. -
    111.     }
    112. -
    113.     
    114. -
    115.     /**
    116. -
    117.     * Sets the graph name.
    118. -
    119.     *
    120. -
    121.     * @param Resource 
    122. -
    123.     * @access    public
    124. -
    125.     */    
    126. -
    127.     function setGraphName($graphName)
    128. -
    129.     {
    130. -
    131.         $this->graphName=$graphName;
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * Returns the graph name.
    140. -
    141.     *
    142. -
    143.     * @return Resource 
    144. -
    145.     * @access    public
    146. -
    147.     */
    148. -
    149.     function getGraphName()
    150. -
    151.     {
    152. -
    153.         return $this->graphName;
    154. -
    155.     }
    156. -
    157.     
    158. -
    159.     /**
    160. -
    161.      * Return a human-readable (sort of) string "graphname { s p o . }"
    162. -
    163.      * describing the quad.
    164. -
    165.      *
    166. -
    167.      * @return string 
    168. -
    169.      */
    170. -
    171.     function toString(
    172. -
    173.     {    
    174. -
    175.         return 'GraphName('.$this->graphName->getLabel().') '.$this->statement->toString();
    176. -
    177.     }
    178. -
    179.         
    180. -
    181.     /**
    182. -
    183.     * Returns the subject.
    184. -
    185.     *
    186. -
    187.     * @return Resource 
    188. -
    189.     * @access    public
    190. -
    191.     */
    192. -
    193.     function getSubject()
    194. -
    195.     {
    196. -
    197.         return $this->statement->getSubject();    
    198. -
    199.     }
    200. -
    201.         
    202. -
    203.     /**
    204. -
    205.     * Returns the predicate.
    206. -
    207.     *
    208. -
    209.     * @return Resource 
    210. -
    211.     * @access    public
    212. -
    213.     */
    214. -
    215.     function getPredicate()
    216. -
    217.     {
    218. -
    219.         return $this->statement->getPredicate();    
    220. -
    221.     }
    222. -
    223.         
    224. -
    225.     /**
    226. -
    227.     * Returns the object.
    228. -
    229.     *
    230. -
    231.     * @return Resource 
    232. -
    233.     * @access    public
    234. -
    235.     */
    236. -
    237.     function getObject()
    238. -
    239.     {
    240. -
    241.         return $this->statement->getObject();    
    242. -
    243.     }
    244. -
    245.         
    246. -
    247.     /**
    248. -
    249.     * Returns the statement(subject,predicate,object).
    250. -
    251.     *
    252. -
    253.     * @return statement 
    254. -
    255.     * @access    public
    256. -
    257.     */
    258. -
    259.     function getStatement()
    260. -
    261.     {
    262. -
    263.         return $this->statement;    
    264. -
    265.     }
    266. -
    267.         
    268. -
    269.     /**
    270. -
    271.     * Checks if two quads are equal.
    272. -
    273.     *
    274. -
    275.     * @param  Quad 
    276. -
    277.     * @return boolean 
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function equals($quad)
    284. -
    285.     {
    286. -
    287.         return ($this->graphName->equals($quad->getGraphName()) && $this->statement->equals($quad->getStatement()));    
    288. -
    289.     }
    290. -
    291. }
    292. -
    293. ?>
    294. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXParser.php.html deleted file mode 100755 index 90f468cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXParser.php.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - File Source for TriXParser.php - - - - - -

    Source for file TriXParser.php

    -

    Documentation is available at TriXParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: TriXParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Temporary implementation of a TriX-Parser (Usable only with PHP > V5)
    14. -
    15. * Currently, it doesn't support any namespaces and has problems with typed literals.
    16. -
    17. * So this parser only works with TRIX documents where the default namespace is the TRIX namespace.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_dataset__syntaxTriXParser.php.html 442 2007-06-01 16:19:26Z cax $
    22. -
    23. @author Daniel Westphal (http://www.d-westphal.de)
    24. -
    25. *
    26. -
    27. @package     dataset
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class TriXParser  
    34. -
    35. {
    36. -
    37.     /**
    38. -
    39.     * Reference to the graphSet
    40. -
    41.     *
    42. -
    43.     * @var        GraphSet 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $graphSet;
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Constructor
    56. -
    57.     * Needs a reference to a graphSet
    58. -
    59.     *
    60. -
    61.     * @param    GraphSet 
    62. -
    63.     * @access    public
    64. -
    65.     */        
    66. -
    67.     function TriXParser(&$graphSet)
    68. -
    69.     {
    70. -
    71.         $this->graphSet=&$graphSet;    
    72. -
    73.     }
    74. -
    75.  
    76. -
    77.     /**
    78. -
    79.     * Parse an XML string
    80. -
    81.     *
    82. -
    83.     * @param   string 
    84. -
    85.     * @access    public
    86. -
    87.     */
    88. -
    89.     function parseString($string)
    90. -
    91.     {
    92. -
    93.         $this->_populateGraphSet(simplexml_load_string($string));
    94. -
    95.     }
    96. -
    97.     
    98. -
    99.     /**
    100. -
    101.     * Parse from a file
    102. -
    103.     *
    104. -
    105.     * @param   string 
    106. -
    107.     * @access    public
    108. -
    109.     */
    110. -
    111.     function parseFile($pathToFile)
    112. -
    113.     {
    114. -
    115.         $this->_populateGraphSet(simplexml_load_file($pathToFile));
    116. -
    117.     }
    118. -
    119.     
    120. -
    121.     /**
    122. -
    123.     * Populates the graphSet with namedGraphs and triples.
    124. -
    125.     *
    126. -
    127.     * @param   object simpleXMLModel  $xmlModel 
    128. -
    129.     * @access    private
    130. -
    131.     */
    132. -
    133.     function _populateGraphSet(&$xmlModel)
    134. -
    135.     {
    136. -
    137.         $defaultGraphOccurred=false;
    138. -
    139.         
    140. -
    141.         foreach ($xmlModel->graph as $graph
    142. -
    143.         {
    144. -
    145.             if (isset($graph->uri)) 
    146. -
    147.             {
    148. -
    149.                 $graphName=(string)$graph->uri;
    150. -
    151.                 $namedGraph=$this->graphSet->getNamedGraph($graphName);
    152. -
    153.                 if ($namedGraph ==null)
    154. -
    155.                     $namedGraph=$this->graphSet->createGraph($graphName);
    156. -
    157.             else 
    158. -
    159.             {
    160. -
    161.                 if ($defaultGraphOccurred)
    162. -
    163.                     trigger_error('Only one unnamed Graph per file allowed'E_USER_ERROR);
    164. -
    165.                 
    166. -
    167.                 $namedGraph=$this->graphSet->getDefaultGraph();
    168. -
    169.                 $defaultGraphOccurred=true;
    170. -
    171.             }    
    172. -
    173.                         
    174. -
    175.             foreach ($graph->triple as $triple)
    176. -
    177.             {
    178. -
    179.                 $tripleCount=0;
    180. -
    181.                 $tripleArray=array();
    182. -
    183.                 foreach ($triple->children(as $tag => $value)
    184. -
    185.                 {
    186. -
    187.                     $tripleArray[$tripleCount++]=$this->_element2Resource((string)$tag,$value);
    188. -
    189.                 };
    190. -
    191.                 $namedGraph->add(new Statement($tripleArray[0],$tripleArray[1],$tripleArray[2]));    
    192. -
    193.             };
    194. -
    195.         };
    196. -
    197.     }
    198. -
    199.     
    200. -
    201.     /**
    202. -
    203.     * return a mathing resource tyoe
    204. -
    205.     *
    206. -
    207.     * @param   string 
    208. -
    209.     * @param   object simpleXMLNode $value 
    210. -
    211.     * @access    private
    212. -
    213.     */
    214. -
    215.     function _element2Resource($tag,$value)
    216. -
    217.     {
    218. -
    219.         switch ($tag
    220. -
    221.         {
    222. -
    223.                 case 'uri':
    224. -
    225.                     return new Resource((string)$value);
    226. -
    227.                 break;
    228. -
    229.         
    230. -
    231.                 case 'id':
    232. -
    233.                     return new BlankNode((string)$value);
    234. -
    235.                 break;
    236. -
    237.                 
    238. -
    239.                 case 'typedLiteral':
    240. -
    241.                     $literal=new Literal((string)$value);
    242. -
    243.                     $literal->setDatatype((string)$value['datatype']);
    244. -
    245.                     return $literal;
    246. -
    247.                 break;
    248. -
    249.                     
    250. -
    251.                 case 'plainLiteral':
    252. -
    253.                     $literal=new Literal((string)$value);
    254. -
    255.                     if(isset($value['xml:lang']))
    256. -
    257.                         $literal->setLanguage((string)$value['xml:lang']);
    258. -
    259.                     return $literal;
    260. -
    261.                 break;
    262. -
    263.         }
    264. -
    265.     }
    266. -
    267. }
    268. -
    269. ?>
    270. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXSerializer.php.html deleted file mode 100755 index 47fc3326..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_dataset__syntaxTriXSerializer.php.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - File Source for TriXSerializer.php - - - - - -

    Source for file TriXSerializer.php

    -

    Documentation is available at TriXSerializer.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: TriXSerializer
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Temporary implementation of a TriX-Serializer
    14. -
    15. -
    16. @version  $Id: fsource_dataset__syntaxTriXSerializer.php.html 442 2007-06-01 16:19:26Z cax $
    17. -
    18. @author Daniel Westphal (http://www.d-westphal.de)
    19. -
    20. *
    21. -
    22. @package     dataset
    23. -
    24. @access    public
    25. -
    26. ***/
    27. -
    28. class TriXSerializer  
    29. -
    30. {
    31. -
    32.     
    33. -
    34.     /**
    35. -
    36.     * Reference to the graphSet
    37. -
    38.     *
    39. -
    40.     * @var        object GraphSet 
    41. -
    42.     * @access    private
    43. -
    44.     */
    45. -
    46.     var $graphSet;
    47. -
    48.     
    49. -
    50.  
    51. -
    52.     /**
    53. -
    54.     * Constructor
    55. -
    56.     * Needs a reference to a graphSet
    57. -
    58.     *
    59. -
    60.     * @param    GraphSet 
    61. -
    62.     * @access    public
    63. -
    64.     */        
    65. -
    66.     function TriXSerializer(&$graphSet)
    67. -
    68.     {
    69. -
    70.         $this->graphSet=&$graphSet;
    71. -
    72.     }
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     * Serialize the dataset to a TriX string
    79. -
    80.     *
    81. -
    82.     * @return   string 
    83. -
    84.     * @access    public
    85. -
    86.     */
    87. -
    88.     function serializeToString()
    89. -
    90.     {
    91. -
    92.         return $this->_serialize();
    93. -
    94.     }
    95. -
    96.     
    97. -
    98.     /**
    99. -
    100.     * Serialize the dataset to a TriX string and save in file
    101. -
    102.     *
    103. -
    104.     * @param   string 
    105. -
    106.     * @access    public
    107. -
    108.     */
    109. -
    110.     function serializeToFile($fileName)
    111. -
    112.     {
    113. -
    114.         $serializedString=&$this->_serialize();
    115. -
    116.         $handle fopen($fileName'w');
    117. -
    118.            fwrite($handle$serializedString);
    119. -
    120.         fclose($handle);
    121. -
    122.     }
    123. -
    124.     
    125. -
    126.     
    127. -
    128.     /**
    129. -
    130.     * Serialize the dataset to a TriX string
    131. -
    132.     *
    133. -
    134.     * @return   string 
    135. -
    136.     * @access    private
    137. -
    138.     */
    139. -
    140.     function _serialize()
    141. -
    142.     {
    143. -
    144.         //Trix header
    145. -
    146.         $serializedString=
    147. -
    148.             '<?xml version="1.0" encoding="utf-8"?>'.
    149. -
    150.             '<TriX xmlns="http://www.w3.org/2004/03/trix/trix-1/">';
    151. -
    152.         
    153. -
    154.         //serialize defaultGraph if it is not empty
    155. -
    156.         $defaultGraph=$this->graphSet->getDefaultGraph();
    157. -
    158.         if ($defaultGraph->isEmpty()===false)
    159. -
    160.         {
    161. -
    162.             $serializedString.='<graph>';
    163. -
    164.             for($iterator $this->graphSet->findInDefaultGraph(null,null,null)$iterator->valid()$iterator->next()) 
    165. -
    166.             {
    167. -
    168.                 $serializedString.='<triple>';
    169. -
    170.                 
    171. -
    172.                 $statement=$iterator->current();
    173. -
    174.                 
    175. -
    176.                 $serializedString.=$this->_node2string($statement->getSubject());
    177. -
    178.                 $serializedString.=$this->_node2string($statement->getPredicate());
    179. -
    180.                 $serializedString.=$this->_node2string($statement->getObject());
    181. -
    182.                 
    183. -
    184.                 $serializedString.='</triple>';
    185. -
    186.             };
    187. -
    188.             $serializedString.='</graph>';
    189. -
    190.         }        
    191. -
    192.             
    193. -
    194.         //serialize namedGraphs    
    195. -
    196.         foreach ($this->graphSet->listGraphNames(as $graphName)
    197. -
    198.         {
    199. -
    200.             $serializedString.='<graph>';
    201. -
    202.             $serializedString.='<uri>'.$graphName.'</uri>';
    203. -
    204.             for($iterator $this->graphSet->findInNamedGraphs(new Resource($graphName),null,null,null)$iterator->valid()$iterator->next()) 
    205. -
    206.             {
    207. -
    208.                 $serializedString.='<triple>';
    209. -
    210.                 
    211. -
    212.                 $statement=$iterator->current();
    213. -
    214.                 
    215. -
    216.                 $serializedString.=$this->_node2string($statement->getSubject());
    217. -
    218.                 $serializedString.=$this->_node2string($statement->getPredicate());
    219. -
    220.                 $serializedString.=$this->_node2string($statement->getObject());
    221. -
    222.                 
    223. -
    224.                 $serializedString.='</triple>';
    225. -
    226.             };
    227. -
    228.             $serializedString.='</graph>';
    229. -
    230.         };        
    231. -
    232.         //TriX footer    
    233. -
    234.         $serializedString.='</TriX>';    
    235. -
    236.         return $serializedString;
    237. -
    238.     }
    239. -
    240.     
    241. -
    242.     /**
    243. -
    244.     * Serialize node to a TriX string
    245. -
    246.     *
    247. -
    248.     * @param Node 
    249. -
    250.     * @return   string 
    251. -
    252.     * @access    private
    253. -
    254.     */
    255. -
    256.     function _node2string($node)
    257. -
    258.     {
    259. -
    260.         switch ($node)
    261. -
    262.         {
    263. -
    264.             case (is_a($node,'BlankNode')):
    265. -
    266.                 return ('<id>'.$node->getLabel().'</id>');
    267. -
    268.             
    269. -
    270.             case (is_a($node,'Resource')):
    271. -
    272.                 return ('<uri>'.$node->getLabel().'</uri>');
    273. -
    274.             
    275. -
    276.             case (is_a($node,'Literal')):
    277. -
    278.             
    279. -
    280.                 if ($node->dtype!=null)
    281. -
    282.                     return ('<typedLiteral datatype="'.htmlentities($node->dtype).'">'.$node->getLabel().'</typedLiteral>');
    283. -
    284.  
    285. -
    286.                 if ($node->lang!=null)
    287. -
    288.                     return ('<plainLiteral xml:lang="'.htmlentities($node->lang).'">'.$node->getLabel().'</plainLiteral>');
    289. -
    290.                     
    291. -
    292.                 return ('<plainLiteral>'.htmlentities($node->getLabel()).'</plainLiteral>');
    293. -
    294.         }
    295. -
    296.     }
    297. -
    298. }
    299. -
    300. ?>
    301. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__RdfAPI.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__RdfAPI.php.html deleted file mode 100755 index abfc0032..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__RdfAPI.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for RdfAPI.php - - - - - -

    Source for file RdfAPI.php

    -

    Documentation is available at RdfAPI.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // RDF API for PHP 
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // @version                  : $Id: fsource_default__RdfAPI.php.html 430 2007-05-01 15:47:21Z cweiske $
    12. -
    13. // Authors                   : Chris Bizer (chris@bizer.de),
    14. -
    15. //                             Radoslaw Oldakowski (radol@gmx.de)
    16. -
    17. // Description               : This file includes constatns and model package.
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Constants and base Object
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'constants.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/Object.php' );
    30. -
    31. include_onceRDFAPI_INCLUDE_DIR PACKAGE_MODEL);
    32. -
    33.  
    34. -
    35.  
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__constants.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__constants.php.html deleted file mode 100755 index a4c7038e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__constants.php.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - File Source for constants.php - - - - - -

    Source for file constants.php

    -

    Documentation is available at constants.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Constants
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // @version                  : $Id: fsource_default__constants.php.html 430 2007-05-01 15:47:21Z cweiske $
    10. -
    11. // Authors                   : Chris Bizer (chris@bizer.de),
    12. -
    13. //                             Daniel Westphal (dawe@gmx.de),
    14. -
    15. //                               Leandro Mariano Lopez (llopez@xinergiaargentina.com),
    16. -
    17. //                             Radoslaw Oldakowski (radol@gmx.de)
    18. -
    19. //
    20. -
    21. // Description               : Constants and default configuration
    22. -
    23. // ----------------------------------------------------------------------------------
    24. -
    25.  
    26. -
    27.  
    28. -
    29.  
    30. -
    31. // ----------------------------------------------------------------------------------
    32. -
    33. // General
    34. -
    35. // ----------------------------------------------------------------------------------
    36. -
    37.  
    38. -
    39. define('RDFAPI_ERROR''RDFAPI error ');
    40. -
    41. define('DEFAULT_ALGORITHM''MD5');
    42. -
    43. define('DEFAULT_ENCODING''UTF-8');
    44. -
    45. define('INDENTATION''   ');
    46. -
    47. define('LINEFEED'chr(10));
    48. -
    49.  
    50. -
    51. // ----------------------------------------------------------------------------------
    52. -
    53. // RAP Packages
    54. -
    55. // ----------------------------------------------------------------------------------
    56. -
    57. define('PACKAGE_MODEL','model/ModelP.php');
    58. -
    59. define('PACKAGE_UTILITY','util/Utility.php');
    60. -
    61. define('PACKAGE_DBASE','model/DBase.php');
    62. -
    63. define('PACKAGE_SYNTAX_RDF','syntax/SyntaxRDF.php');
    64. -
    65. define('PACKAGE_SYNTAX_N3','syntax/SyntaxN3.php');
    66. -
    67. define('PACKAGE_SYNTAX_GRDDL','syntax/SyntaxGRDDL.php');
    68. -
    69. define('PACKAGE_VOCABULARY','vocabulary/Vocabulary.php');
    70. -
    71. define('PACKAGE_RDQL','rdql/RDQL.php');
    72. -
    73. define('PACKAGE_INFMODEL','infModel/InfModelP.php');
    74. -
    75. define('PACKAGE_RESMODEL','resModel/ResModelP.php');
    76. -
    77. define('PACKAGE_ONTMODEL','ontModel/OntModelP.php');
    78. -
    79. define('PACKAGE_DATASET','dataset/DatasetP.php');
    80. -
    81. define('PACKAGE_SPARQL','sparql/SPARQL.php');
    82. -
    83. define('PACKAGE_SYNTAX_RSS','syntax/SyntaxRSS.php');
    84. -
    85. define('PACKAGE_SYNTAX_SPARQLRES','syntax/SyntaxSparqlRes.php');
    86. -
    87.  
    88. -
    89. // ----------------------------------------------------------------------------------
    90. -
    91. // Model
    92. -
    93. // ----------------------------------------------------------------------------------
    94. -
    95.  
    96. -
    97. // Defines a prefix used in the ID of automatically created bNodes.
    98. -
    99. define('BNODE_PREFIX''bNode');
    100. -
    101.  
    102. -
    103. // Sets the index of MemModell:
    104. -
    105. // IND_DEF: Defaultindex over subject, predicate, obeject seperate.
    106. -
    107. // IND_SPO: Index over subject+predicate+object.
    108. -
    109. // IND_SP:  Index over subject+predicate.
    110. -
    111. // IND_SO:  Index over subject+object.
    112. -
    113. define('NO_INDEX',-1);
    114. -
    115. define('IND_DEF',0);
    116. -
    117. define('IND_SPO',1);
    118. -
    119. define('IND_SP',2);
    120. -
    121. define('IND_SO',3);
    122. -
    123. define('INDEX_TYPE',IND_DEF);
    124. -
    125.  
    126. -
    127. // ----------------------------------------------------------------------------------
    128. -
    129. // ModelFactory
    130. -
    131. // ----------------------------------------------------------------------------------
    132. -
    133.  
    134. -
    135. define ('MEMMODEL','MemModel');
    136. -
    137. define ('DBMODEL','DbModel');
    138. -
    139. define ('INFMODELF','InfModelF');
    140. -
    141. define ('INFMODELB','InfModelB');
    142. -
    143. define ('ONTMODEL','OntModel');
    144. -
    145. define ('RESMODEL','ResModel');
    146. -
    147. define ('RDFS_VOCABULARY','RdfsVocabulary.php');
    148. -
    149.  
    150. -
    151. // ----------------------------------------------------------------------------------
    152. -
    153. // Parser
    154. -
    155. // ----------------------------------------------------------------------------------
    156. -
    157.  
    158. -
    159. // RdfParser: Set this option to false if you want to use IDs containing CombiningChars or
    160. -
    161. // Extenders (see http://www.w3.org/TR/REC-xml-names/#NT-NCName). If set to TRUE, they're assumed to be invalid.
    162. -
    163. define('VALIDATE_IDS'TRUE);
    164. -
    165.  
    166. -
    167. // RdfParser: Set this option to true if you want to parse UNICODE documents.
    168. -
    169. // WARNING: Setting the option TRUE significantly slows down the RDF-parser.
    170. -
    171. define('UNIC_RDF'FALSE);
    172. -
    173.  
    174. -
    175. // RdfParser: Set this option to true if you want to make sure that the created RDF-model doesnt contain
    176. -
    177. // duplicate RDF-statements. WARNING: Setting the option TRUE significantly slows down the RDF-parser.
    178. -
    179. define('CREATE_MODEL_WITHOUT_DUPLICATES'FALSE);
    180. -
    181.  
    182. -
    183. // N3 and N-Triple-Parser: Set this option to true in order to override the given bnode
    184. -
    185. // labels and rename them to the defined BNODE_PREFIX
    186. -
    187. define('FIX_BLANKNODES'TRUE);
    188. -
    189.  
    190. -
    191. define('NAMESPACE_SEPARATOR_CHAR','^');
    192. -
    193. define('NAMESPACE_SEPARATOR_STRING','^');
    194. -
    195. define('IN_TOP_LEVEL',0);
    196. -
    197. define('IN_RDF',1);
    198. -
    199. define('IN_DESCRIPTION',2);
    200. -
    201. define('IN_PROPERTY_UNKNOWN_OBJECT',3);
    202. -
    203. define('IN_PROPERTY_RESOURCE',4);
    204. -
    205. define('IN_PROPERTY_EMPTY_RESOURCE',5);
    206. -
    207. define('IN_PROPERTY_LITERAL',6);
    208. -
    209. define('IN_PROPERTY_PARSE_TYPE_LITERAL',7);
    210. -
    211. define('IN_PROPERTY_PARSE_TYPE_RESOURCE',8);
    212. -
    213. define('IN_XML',9);
    214. -
    215. define('IN_UNKNOWN',10);
    216. -
    217. define('IN_PROPERTY_PARSE_TYPE_COLLECTION'11);
    218. -
    219. define('RDF_SUBJECT_TYPE_URI',0);
    220. -
    221. define('RDF_SUBJECT_TYPE_DISTRIBUTED',1);
    222. -
    223. define('RDF_SUBJECT_TYPE_PREFIX',2);
    224. -
    225. define('RDF_SUBJECT_TYPE_ANONYMOUS',3);
    226. -
    227. define('RDF_SUBJECT_TYPE_BNODE',4);
    228. -
    229. define('RDF_OBJECT_TYPE_RESOURCE',0);
    230. -
    231. define('RDF_OBJECT_TYPE_LITERAL',1);
    232. -
    233. define('RDF_OBJECT_TYPE_XML',2);
    234. -
    235. define('RDF_OBJECT_TYPE_BNODE',3);
    236. -
    237.  
    238. -
    239. // ----------------------------------------------------------------------------------
    240. -
    241. // Serializer
    242. -
    243. // ----------------------------------------------------------------------------------
    244. -
    245.  
    246. -
    247. // RDF, N3, N-Triple Serializer: set to TRUE in oder to suppres the "Generated by RAP"
    248. -
    249. // comment in the output files.
    250. -
    251. define('HIDE_ADVERTISE',FALSE);
    252. -
    253.  
    254. -
    255. // RDF Serializer: Set to TRUE, if the serializer should use entities for URIs.
    256. -
    257. define('SER_USE_ENTITIES'FALSE );
    258. -
    259.  
    260. -
    261. // RDF Serializer: Set to TRUE, if the serializer should serialize triples as XML
    262. -
    263. // attributes where possible.
    264. -
    265. define('SER_USE_ATTRIBUTES'FALSE );
    266. -
    267.  
    268. -
    269. // RDF Serializer: Set to TRUE in order to sort the statements of a model before
    270. -
    271. // serializing them.
    272. -
    273. define('SER_SORT_MODEL'FALSE );
    274. -
    275.  
    276. -
    277.  
    278. -
    279.  
    280. -
    281. // RDF Serializer: Set to TRUE, if the serializer should use qualified names for RDF
    282. -
    283. // reserved words.
    284. -
    285. // NOTE: There is only one default namespace allowed within an XML document.
    286. -
    287. //       Therefore if SER_RDF_QNAMES in is set to FALSE and you pass the parameter
    288. -
    289. //       $xml_default_namespace to the method serialize() of class RdfSerializer,
    290. -
    291. //       the model will be serialized as if SER_RDF_QNAMES were set to TRUE.
    292. -
    293. define('SER_RDF_QNAMES'TRUE );
    294. -
    295.  
    296. -
    297. // RDF Serializer: Set to TRUE, if the serializer should start documents with the
    298. -
    299. // xml declaration <?xml version="1.0" encoding="UTF-8" >.
    300. -
    301. define('SER_XML_DECLARATION'TRUE );
    302. -
    303.  
    304. -
    305. // N3 Serializer: Set to TRUE, if the N3 serializer should try to compress the blank node
    306. -
    307. // syntax using [] whereever possible.
    308. -
    309. define('N3SER_BNODE_SHORT'FALSE);
    310. -
    311.  
    312. -
    313. // RDF Serializer: Set to TRUE, if the serializer should write text values always as
    314. -
    315. // escaped CDATA.
    316. -
    317. define('USE_CDATA'FALSE);
    318. -
    319.  
    320. -
    321. define('USE_ANY_QUOTE'FALSE);
    322. -
    323. define('GENERAL_PREFIX_BASE','ns');
    324. -
    325. define('MAX_ALLOWED_ABBREVIATED_LENGTH',60);
    326. -
    327.  
    328. -
    329. // ----------------------------------------------------------------------------------
    330. -
    331. // Util
    332. -
    333. // ----------------------------------------------------------------------------------
    334. -
    335.  
    336. -
    337. // Definition of the colors used by the method RDFUtil:writeHTMLTable
    338. -
    339. define('HTML_TABLE_HEADER_COLOR''#FFFFFF');
    340. -
    341. define('HTML_TABLE_RESOURCE_COLOR''#FFFFCC');
    342. -
    343. define('HTML_TABLE_LITERAL_COLOR''#E7E7EF');
    344. -
    345. define('HTML_TABLE_BNODE_COLOR''#FFCCFF');
    346. -
    347. define('HTML_TABLE_RDF_NS_COLOR''#CCFFCC');
    348. -
    349. define('HTML_TABLE_NS_ROW_COLOR1''#FFFFFF');
    350. -
    351. define('HTML_TABLE_NS_ROW_COLOR0''#E7E7EF');
    352. -
    353.  
    354. -
    355. // ----------------------------------------------------------------------------------
    356. -
    357. // RDF
    358. -
    359. // ----------------------------------------------------------------------------------
    360. -
    361.  
    362. -
    363. define('RDF_NAMESPACE_URI','http://www.w3.org/1999/02/22-rdf-syntax-ns#' );
    364. -
    365. define('RDF_NAMESPACE_PREFIX','rdf' );
    366. -
    367. define('RDF_RDF','RDF');
    368. -
    369. define('RDF_DESCRIPTION','Description');
    370. -
    371. define('RDF_ID','ID');
    372. -
    373. define('RDF_ABOUT','about');
    374. -
    375. define('RDF_ABOUT_EACH','aboutEach');
    376. -
    377. define('RDF_ABOUT_EACH_PREFIX','aboutEachPrefix');
    378. -
    379. define('RDF_BAG_ID','bagID');
    380. -
    381. define('RDF_RESOURCE','resource');
    382. -
    383. define('RDF_VALUE','value');
    384. -
    385. define('RDF_PARSE_TYPE','parseType');
    386. -
    387. define('RDF_PARSE_TYPE_LITERAL','Literal');
    388. -
    389. define('RDF_PARSE_TYPE_RESOURCE','Resource');
    390. -
    391. define('RDF_PARSE_TYPE_COLLECTION''Collection');
    392. -
    393. define('RDF_TYPE','type');
    394. -
    395. define('RDF_BAG','Bag');
    396. -
    397. define('RDF_SEQ','Seq');
    398. -
    399. define('RDF_ALT','Alt');
    400. -
    401. define('RDF_LI','li');
    402. -
    403. define('RDF_STATEMENT','Statement');
    404. -
    405. define('RDF_SUBJECT','subject');
    406. -
    407. define('RDF_PREDICATE','predicate');
    408. -
    409. define('RDF_OBJECT','object');
    410. -
    411. define('RDF_NODEID','nodeID');
    412. -
    413. define('RDF_DATATYPE','datatype');
    414. -
    415. define('RDF_SEEALSO','seeAlso');
    416. -
    417. define('RDF_PROPERTY','Property');
    418. -
    419. define('RDF_LIST','List');
    420. -
    421. define('RDF_NIL','nil');
    422. -
    423. define('RDF_REST','rest');
    424. -
    425. define('RDF_FIRST','first');
    426. -
    427. define('RDF_XMLLITERAL''XMLLiteral');
    428. -
    429.  
    430. -
    431. // ----------------------------------------------------------------------------------
    432. -
    433. // RDF Schema
    434. -
    435. // ----------------------------------------------------------------------------------
    436. -
    437.  
    438. -
    439. define('RDF_SCHEMA_URI','http://www.w3.org/2000/01/rdf-schema#' );
    440. -
    441. define('RDF_DATATYPE_SCHEMA_URI','http://www.w3.org/TR/xmlschema-2' );
    442. -
    443. define('RDF_SCHEMA_PREFIX''rdfs');
    444. -
    445. define('RDFS_SUBCLASSOF','subClassOf');
    446. -
    447. define('RDFS_SUBPROPERTYOF','subPropertyOf');
    448. -
    449. define('RDFS_RANGE','range');
    450. -
    451. define('RDFS_DOMAIN','domain');
    452. -
    453. define('RDFS_CLASS','Class');
    454. -
    455. define('RDFS_RESOURCE','Resource');
    456. -
    457. define('RDFS_DATATYPE','Datatype');
    458. -
    459. define('RDFS_LITERAL','Literal');
    460. -
    461. define('RDFS_SEE_ALSO','seeAlso');
    462. -
    463. define('RDFS_IS_DEFINED_BY','isDefinedBy');
    464. -
    465. define('RDFS_LABEL','label');
    466. -
    467. define('RDFS_COMMENT','comment');
    468. -
    469.  
    470. -
    471.  
    472. -
    473. // ----------------------------------------------------------------------------------
    474. -
    475. // OWL
    476. -
    477. // ----------------------------------------------------------------------------------
    478. -
    479.  
    480. -
    481. define('OWL_URI','http://www.w3.org/2002/07/owl#' );
    482. -
    483. define('OWL_PREFIX''owl');
    484. -
    485. define('OWL_SAME_AS','sameAs');
    486. -
    487. define('OWL_INVERSE_OF','inverseOf');
    488. -
    489.  
    490. -
    491.  
    492. -
    493. // ----------------------------------------------------------------------------------
    494. -
    495. // XML
    496. -
    497. // ----------------------------------------------------------------------------------
    498. -
    499.  
    500. -
    501. define('XML_NAMESPACE_PREFIX''xml');
    502. -
    503. define('XML_NAMESPACE_DECLARATION_PREFIX''xmlns');
    504. -
    505. define('XML_NAMESPACE_URI','http://www.w3.org/XML/1998/namespace' );
    506. -
    507. define('XML_LANG','lang');
    508. -
    509. define('DATATYPE_SHORTCUT_PREFIX','datatype:');
    510. -
    511. define('XML_SCHEMA','http://www.w3.org/2001/XMLSchema#');
    512. -
    513.  
    514. -
    515. // ----------------------------------------------------------------------------------
    516. -
    517. // RDF DATATYPE SHORTCUTS (extends datatype shortcuts to the full XML datatype URIs)
    518. -
    519. // ----------------------------------------------------------------------------------
    520. -
    521.  
    522. -
    523. $short_datatype array(
    524. -
    525.     'STRING'    => RDF_DATATYPE_SCHEMA_URI '#string',
    526. -
    527.     'DECIMAL'   => RDF_DATATYPE_SCHEMA_URI '#decimal',
    528. -
    529.     'INTEGER'   => RDF_DATATYPE_SCHEMA_URI '#integer',
    530. -
    531.     'INT'       => RDF_DATATYPE_SCHEMA_URI '#int',
    532. -
    533.     'SHORT'     => RDF_DATATYPE_SCHEMA_URI '#short',
    534. -
    535.     'BYTE'      => RDF_DATATYPE_SCHEMA_URI '#byte',
    536. -
    537.     'LONG'      => RDF_DATATYPE_SCHEMA_URI '#long',
    538. -
    539.     'LANGUAGE'  => RDF_DATATYPE_SCHEMA_URI '#language',
    540. -
    541.     'NAME'      => RDF_DATATYPE_SCHEMA_URI '#name'
    542. -
    543. );
    544. -
    545.  
    546. -
    547. // ----------------------------------------------------------------------------------
    548. -
    549. // Database
    550. -
    551. // ----------------------------------------------------------------------------------
    552. -
    553.  
    554. -
    555. if (!defined('ADODB_DB_DRIVER')) {
    556. -
    557.     if (isset($GLOBALS['dbConf'])) {
    558. -
    559.         define('ADODB_DB_DRIVER'$GLOBALS['dbConf']['type']);
    560. -
    561.         define('ADODB_DB_HOST'  $GLOBALS['dbConf']['host']);
    562. -
    563.         define('ADODB_DB_NAME'  $GLOBALS['dbConf']['database']);
    564. -
    565.         define('ADODB_DB_USER'  $GLOBALS['dbConf']['user']);
    566. -
    567.         define('ADODB_DB_PASSWORD'$GLOBALS['dbConf']['password']);
    568. -
    569.     else {
    570. -
    571.         define('ADODB_DB_DRIVER''mysql');
    572. -
    573.         define('ADODB_DB_HOST'  'localhost');
    574. -
    575.         define('ADODB_DB_NAME'  'kbrdfdb');
    576. -
    577.         define('ADODB_DB_USER'  'kbrdf');
    578. -
    579.         define('ADODB_DB_PASSWORD''db1');
    580. -
    581.     }
    582. -
    583. }
    584. -
    585. if (!defined('ADODB_DEBUG_MODE')) {
    586. -
    587.     define('ADODB_DEBUG_MODE''0');
    588. -
    589. }
    590. -
    591.  
    592. -
    593.  
    594. -
    595. // ----------------------------------------------------------------------------------
    596. -
    597. // RDQL Error Messages
    598. -
    599. // ----------------------------------------------------------------------------------
    600. -
    601.  
    602. -
    603. define('RDQL_ERR','RDQL error ');
    604. -
    605. define('RDQL_SYN_ERR','RDQL syntax error ');
    606. -
    607. define('RDQL_SEL_ERR'RDQL_ERR .'in the SELECT clause: ');
    608. -
    609. define('RDQL_SRC_ERR'RDQL_ERR .'in the SOURCE clause: ');
    610. -
    611. define('RDQL_WHR_ERR'RDQL_ERR .'in the WHERE clause: ');
    612. -
    613. define('RDQL_AND_ERR'RDQL_ERR .'in the AND clause: ');
    614. -
    615. define('RDQL_USG_ERR'RDQL_ERR .'in the USING clause: ');
    616. -
    617.  
    618. -
    619.  
    620. -
    621. // ----------------------------------------------------------------------------------
    622. -
    623. // Vocabulary
    624. -
    625. // ----------------------------------------------------------------------------------
    626. -
    627. // namespace declarations
    628. -
    629. define('ATOM_NS'    'http://purl.org/atom/ns#');
    630. -
    631. define('DC_NS'      'http://purl.org/dc/elements/1.1/');
    632. -
    633. define('DCTERM_NS'  'http://purl.org/dc/terms/');
    634. -
    635. define('DCMITYPE_NS''http://purl.org/dc/dcmitype/');
    636. -
    637. define('FOAF_NS'    'http://xmlns.com/foaf/0.1/');
    638. -
    639. define('OWL_NS'     'http://www.w3.org/2002/07/owl#');
    640. -
    641. define('RSS_NS'     'http://purl.org/rss/1.0/');
    642. -
    643. define('VCARD_NS'   'http://www.w3.org/2001/vcard-rdf/3.0#');
    644. -
    645.  
    646. -
    647.  
    648. -
    649.  
    650. -
    651. // ----------------------------------------------------------------------------------
    652. -
    653. // RDQL, SPARQL and parser default namespace prefixes
    654. -
    655. // ----------------------------------------------------------------------------------
    656. -
    657.  
    658. -
    659. $default_prefixes array(
    660. -
    661. -
    662. -
    663.    'xsd'  => 'http://www.w3.org/2001/XMLSchema#',
    664. -
    665.    OWL_PREFIX => OWL_URI,
    666. -
    667.    'dc' => 'http://purl.org/dc/elements/1.1/',
    668. -
    669.    'dcterms' => 'http://purl.org/dc/terms/',
    670. -
    671.    'vcard' => 'http://www.w3.org/2001/vcard-rdf/3.0#'
    672. -
    673. );
    674. -
    675.  
    676. -
    677.  
    678. -
    679.  
    680. -
    681. // ----------------------------------------------------------------------------------
    682. -
    683. // InfModel
    684. -
    685. // ----------------------------------------------------------------------------------
    686. -
    687.  
    688. -
    689. //activate / deactivate reasoning for the following schema constructs
    690. -
    691. //rdfs:subclass
    692. -
    693. define('INF_RES_SUBCLASSOF',true);
    694. -
    695. //rdfs:subproperty
    696. -
    697. define('INF_RES_SUBPROPERTYOF',true);
    698. -
    699. //rdfs:range
    700. -
    701. define('INF_RES_RANGE',true);
    702. -
    703. //rdfs:domain
    704. -
    705. define('INF_RES_DOMAIN',true);
    706. -
    707. //owl:sameAs
    708. -
    709. define('INF_RES_OWL_SAMEAS',true);
    710. -
    711. //owl:inverseOf
    712. -
    713. define('INF_RES_OWL_INVERSEOF',true);
    714. -
    715.  
    716. -
    717. //generic RDFS Rules from the RDF Schema doc:
    718. -
    719. //see: http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules
    720. -
    721. define('INF_RES_RULE_RDFS12',false);
    722. -
    723. define('INF_RES_RULE_RDFS6',false);
    724. -
    725. define('INF_RES_RULE_RDFS8',false);
    726. -
    727. define('INF_RES_RULE_RDFS10',false);
    728. -
    729. define('INF_RES_RULE_RDFS13',false);
    730. -
    731.  
    732. -
    733. // ----------------------------------------------------------------------------------
    734. -
    735. // GRAPHVIZ
    736. -
    737. // ----------------------------------------------------------------------------------
    738. -
    739.  
    740. -
    741. // path to the dot binary
    742. -
    743. define('GRAPHVIZ_PATH''C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe');
    744. -
    745.  
    746. -
    747. // directory for temporary files
    748. -
    749. // Attention: must be write-/readable by the webserver
    750. -
    751. define('GRAPHVIZ_TEMP''C:\/');
    752. -
    753.  
    754. -
    755. // display statistical data in generated images
    756. -
    757. // currently only number of statements drawn
    758. -
    759. define('GRAPHVIZ_STAT'TRUE);
    760. -
    761.  
    762. -
    763. // allowed file formats
    764. -
    765. // for security reasons (to prevent code injection)
    766. -
    767. define('GRAPHVIZ_FORMAT''svg, dot, jpg, png, gif, vrml');
    768. -
    769.  
    770. -
    771. // enable clickable URIs
    772. -
    773. // only supported by certain formats (e.g. SVG)
    774. -
    775. define('GRAPHVIZ_URI'FALSE);
    776. -
    777.  
    778. -
    779. // define parameters for the graphical output
    780. -
    781. // if a paramter is undefined, the default value of graphviz is used
    782. -
    783. // for further information see: http://www.graphviz.org/Documentation.php
    784. -
    785. $graphviz_param array(
    786. -
    787.    'GRAPH_STYLE'     => 'rankdir="TB"',
    788. -
    789.    'RESOURCE_STYLE'  => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"',
    790. -
    791.    'LITERAL_STYLE'   => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"',
    792. -
    793.    'PREDICATE_STYLE' => 'fontname="Courier",fontsize="10"',
    794. -
    795.    'INFERRED_STYLE'  => 'style="dotted",fontname="Courier",fontsize="10"',
    796. -
    797.    'BLANKNODE_STYLE' => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"',
    798. -
    799.    'BOX_STYLE'       => 'fontname="Courier",fontsize="8",color="#BBBBBB"'
    800. -
    801. );
    802. -
    803.  
    804. -
    805.  
    806. -
    807. // ----------------------------------------------------------------------------------
    808. -
    809. // SPARQL
    810. -
    811. // ----------------------------------------------------------------------------------
    812. -
    813.  
    814. -
    815. // Attribute lists for describing Resources. ['resource type'] = array(att1, att2, att3, ...).
    816. -
    817. //
    818. -
    819.  
    820. -
    821. $sparql_describe array(
    822. -
    823.     FOAF_NS.'person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox')
    824. -
    825. );
    826. -
    827.  
    828. -
    829. ?>
    830. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:24 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetDb.php.html deleted file mode 100755 index bdbb0cad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetDb.php.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - File Source for DatasetDb.php - - - - - -

    Source for file DatasetDb.php

    -

    Documentation is available at DatasetDb.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'dataset/Dataset.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'model/DbModel.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsDb.php';
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DatasetDb
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * Persistent implementation of a Dataset in a database.
    20. -
    21. * A RDF dataset is a collection of named RDF graphs.
    22. -
    23. *
    24. -
    25. @version  $Id: fsource_default__datasetDatasetDb.php.html 430 2007-05-01 15:47:21Z cweiske $
    26. -
    27. @author Daniel Westphal (http://www.d-westphal.de)
    28. -
    29. @author Chris Bizer <chris@bizer.de>
    30. -
    31. *
    32. -
    33. @package     dataset
    34. -
    35. @access    public
    36. -
    37. ***/
    38. -
    39. require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    40. -
    41.  
    42. -
    43. class DatasetDb extends Dataset
    44. -
    45. {
    46. -
    47.  
    48. -
    49.     /**
    50. -
    51.     * Reference to databse connection.
    52. -
    53.     *
    54. -
    55.     * @var        resource dbConnection
    56. -
    57.     * @access    private
    58. -
    59.     */
    60. -
    61.     var $dbConnection;
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Reference to the dbStore Object.
    68. -
    69.     *
    70. -
    71.     * @var        $dbStore dbStore
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $dbStore;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Name of the Dataset
    86. -
    87.     *
    88. -
    89.     * @var        string 
    90. -
    91.     * @access    private
    92. -
    93.     */
    94. -
    95.     var $setName;
    96. -
    97.  
    98. -
    99.  
    100. -
    101.     /**
    102. -
    103.     * Constructor
    104. -
    105.     * You can supply a Dataset name.
    106. -
    107.     *
    108. -
    109.     * @param  ADODBConnection 
    110. -
    111.     * @param  DbStore 
    112. -
    113.     * @param  string 
    114. -
    115.     * @access    public
    116. -
    117.     */
    118. -
    119.     function DatasetDb(&$dbConnection,&$dbStore,$datasetName)
    120. -
    121.     {
    122. -
    123.         $this->dbConnection=$dbConnection;
    124. -
    125.         $this->dbStore=&$dbStore;
    126. -
    127.         $this->setName$datasetName;
    128. -
    129.         $this->_initialize();
    130. -
    131.     }
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Initialize
    138. -
    139.     * Read all needed data into the set.
    140. -
    141.     *
    142. -
    143.     *
    144. -
    145.     * @access    private
    146. -
    147.     */
    148. -
    149.     function _initialize()
    150. -
    151.     {
    152. -
    153.         $recordSet =$this->dbConnection->execute("SELECT defaultModelUri
    154. -
    155.                                          FROM datasets where datasetName='".$this->setName."'");
    156. -
    157.  
    158. -
    159.            $this->defaultGraph=$this->dbStore->getModel($recordSet->fields[0]);
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.  
    166. -
    167.  
    168. -
    169. //    === Graph level methods ========================
    170. -
    171.  
    172. -
    173.     /**
    174. -
    175.     * Sets the Dataset name. Return true on success, false otherwise.
    176. -
    177.     *
    178. -
    179.     * @param  string 
    180. -
    181.     * @access    public
    182. -
    183.     */
    184. -
    185.     function setDatasetName($datasetName)
    186. -
    187.     {
    188. -
    189.         if ($this->dbStore->datasetExists($datasetName))
    190. -
    191.             return false;
    192. -
    193.  
    194. -
    195.         $this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."'
    196. -
    197.                                       where datasetName='".$this->setName."'");
    198. -
    199.  
    200. -
    201.         $this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."'
    202. -
    203.                                       where datasetName='".$this->setName."'");
    204. -
    205.         $this->setName=$datasetName;
    206. -
    207.         return true;
    208. -
    209.     }
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.     * Returns the Datasets name.
    216. -
    217.     *
    218. -
    219.     * @return string 
    220. -
    221.     * @access    public
    222. -
    223.     */
    224. -
    225.     function getDatasetName()
    226. -
    227.     {
    228. -
    229.         return $this->setName;
    230. -
    231.     }
    232. -
    233.  
    234. -
    235.     /**
    236. -
    237.      * Adds a NamedGraph to the set.
    238. -
    239.      *
    240. -
    241.      * @param NamedGraphDb 
    242. -
    243.      */
    244. -
    245.     function addNamedGraph(&$graph)
    246. -
    247.     {
    248. -
    249.         $graphNameURI=$graph->getGraphName();
    250. -
    251.         $this->removeNamedGraph($graphNameURI);
    252. -
    253.         $this->dbConnection->execute('INSERT INTO dataset_model VALUES("'.$this->setName.'",'.$graph->modelID.',"'.$graphNameURI.'")');
    254. -
    255.     }
    256. -
    257.  
    258. -
    259.  
    260. -
    261.     /**
    262. -
    263.      * Overwrites the existting default graph.
    264. -
    265.      *
    266. -
    267.      * @param DbModel 
    268. -
    269.      */
    270. -
    271.     function setDefaultGraph(&$graph)
    272. -
    273.     {
    274. -
    275.         $this->dbConnection->execute('UPDATE datasets SET defaultModelUri ="'.$graph->modelURI.'"  WHERE datasetName ="'.$this->setName.'"');
    276. -
    277.     }
    278. -
    279.  
    280. -
    281.     /**
    282. -
    283.      * Returns a reference to the defaultGraph.
    284. -
    285.      *
    286. -
    287.      * @return NamedGraphDb 
    288. -
    289.      */
    290. -
    291.     function getDefaultGraph()
    292. -
    293.     {
    294. -
    295.         $defaultGraphURI $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'");
    296. -
    297.         return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName));
    298. -
    299.     }
    300. -
    301.  
    302. -
    303.     /**
    304. -
    305.      * Returns true, if a defaultGraph exists. False otherwise.
    306. -
    307.      *
    308. -
    309.      * @return boolean 
    310. -
    311.      */
    312. -
    313.     function hasDefaultGraph()
    314. -
    315.     {
    316. -
    317.         return true;
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     /**
    324. -
    325.      * Removes a NamedGraph from the set. Nothing happens
    326. -
    327.      * if no graph with that name is contained in the set.
    328. -
    329.      *
    330. -
    331.      * @param string 
    332. -
    333.      */
    334. -
    335.     function removeNamedGraph($graphName)
    336. -
    337.     {
    338. -
    339.         $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    340. -
    341.     }
    342. -
    343.  
    344. -
    345.     /**
    346. -
    347.      * Tells wether the Dataset contains a NamedGraph.
    348. -
    349.      *
    350. -
    351.      * @param  string 
    352. -
    353.      * @return boolean 
    354. -
    355.      */
    356. -
    357.     function containsNamedGraph($graphName)
    358. -
    359.     {
    360. -
    361.         $count$this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
    362. -
    363.         return ($count>0);
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.      * Returns the NamedGraph with a specific name from the Dataset.
    372. -
    373.      * Changes to the graph will be reflected in the set.
    374. -
    375.      *
    376. -
    377.      * @param string 
    378. -
    379.      * @return NamedGraphDb or null
    380. -
    381.      */
    382. -
    383.     function &getNamedGraph($graphName)
    384. -
    385.     {
    386. -
    387.         if(!$this->containsNamedGraph($graphName))
    388. -
    389.             return null;
    390. -
    391.  
    392. -
    393.         $modelVars =$this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI
    394. -
    395.                                                     FROM models, dataset_model
    396. -
    397.                                                     WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID");
    398. -
    399.  
    400. -
    401.         return new NamedGraphDb($this->dbConnection$modelVars->fields[0],
    402. -
    403.                                  $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     /**
    410. -
    411.      * Returns the names of the namedGraphs in this set as strings in an array.
    412. -
    413.      *
    414. -
    415.      * @return Array 
    416. -
    417.      */
    418. -
    419.     function listGraphNames()
    420. -
    421.     {
    422. -
    423.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    424. -
    425.  
    426. -
    427.         $return=array();
    428. -
    429.         while (!$recordSet->EOF)
    430. -
    431.         {
    432. -
    433.           $return[$recordSet->fields[0];
    434. -
    435.           $recordSet->moveNext();
    436. -
    437.         }
    438. -
    439.         return $return;
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     /**
    446. -
    447.      * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    448. -
    449.      *
    450. -
    451.      * @param  string 
    452. -
    453.      * @param  string 
    454. -
    455.      * @return NamedGraphDb 
    456. -
    457.      */
    458. -
    459.     function &createGraph($graphName,$baseURI null)
    460. -
    461.     {
    462. -
    463.         $graph =$this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI);
    464. -
    465.         $this->addNamedGraph($graph);
    466. -
    467.  
    468. -
    469.         return $graph;
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.     /**
    476. -
    477.      * Deletes all NamedGraphs from the set.
    478. -
    479.      */
    480. -
    481.     function clear()
    482. -
    483.     {
    484. -
    485.         $this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'");
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     /**
    492. -
    493.      * Returns the number of NamedGraphs in the set. Empty graphs are counted.
    494. -
    495.      *
    496. -
    497.      * @return int 
    498. -
    499.      */
    500. -
    501.     function countGraphs()
    502. -
    503.     {
    504. -
    505.         return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'"));
    506. -
    507.     }
    508. -
    509.  
    510. -
    511.     /**
    512. -
    513.      * Returns an iterator over all {@link NamedGraph}s in the set.
    514. -
    515.      *
    516. -
    517.      * @return IteratorAllGraphsDb 
    518. -
    519.      */
    520. -
    521.     function &listNamedGraphs()
    522. -
    523.     {
    524. -
    525.         $recordSet =$this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
    526. -
    527.         $it new IteratorAllGraphsDb($recordSet$this);
    528. -
    529.         return $it;
    530. -
    531.     }
    532. -
    533.  
    534. -
    535.     /**
    536. -
    537.      * Tells wether the set contains any NamedGraphs.
    538. -
    539.      *
    540. -
    541.      * @return boolean 
    542. -
    543.      */
    544. -
    545.     function isEmpty()
    546. -
    547.     {
    548. -
    549.         return ($this->countGraphs()==0);
    550. -
    551.     }
    552. -
    553.  
    554. -
    555.     /**
    556. -
    557.      * Add all named graphs of the other dataset to this dataset.
    558. -
    559.      *
    560. -
    561.      * @param Dataset 
    562. -
    563.      */
    564. -
    565.     function addAll($otherDataset)
    566. -
    567.     {
    568. -
    569.         for($iterator $otherDataset->listNamedGraphs()$iterator->valid()$iterator->next())
    570. -
    571.         {
    572. -
    573.             $this->addNamedGraph($iterator->current());
    574. -
    575.          };
    576. -
    577.  
    578. -
    579.          if ($otherDataset->hasDefaultGraph())
    580. -
    581.          {
    582. -
    583.              $this->defaultGraph $this->defaultGraph->unite($otherDataset->getDefaultGraph());
    584. -
    585.          }
    586. -
    587.     }
    588. -
    589.  
    590. -
    591. //    === Quad level methods ========================
    592. -
    593.  
    594. -
    595.     /**
    596. -
    597.      * Adds a quad to the Dataset. The argument must not contain any
    598. -
    599.      * wildcards. If the quad is already present, nothing happens. A new
    600. -
    601.      * named graph will automatically be created if necessary.
    602. -
    603.      *
    604. -
    605.      * @param Quad 
    606. -
    607.      */
    608. -
    609.     function addQuad(&$quad)
    610. -
    611.     {
    612. -
    613.         $graphName=$quad->getGraphName();
    614. -
    615.         $graphName=$graphName->getLabel();
    616. -
    617.  
    618. -
    619.         $graph=$this->getNamedGraph($graphName);
    620. -
    621.  
    622. -
    623.         if ($graph===null)
    624. -
    625.             $graph=$this->createGraph($graphName);
    626. -
    627.  
    628. -
    629.         $statement=$quad->getStatement();
    630. -
    631.         $graph->add($statement);
    632. -
    633.     }
    634. -
    635.  
    636. -
    637.     /**
    638. -
    639.      * Tells wether the Dataset contains a quad or
    640. -
    641.      * quads matching a pattern.
    642. -
    643.      *
    644. -
    645.      * @param Resource 
    646. -
    647.      * @param Resource 
    648. -
    649.      * @param Resource 
    650. -
    651.      * @param Resource 
    652. -
    653.      * @return boolean 
    654. -
    655.      */
    656. -
    657.     function containsQuad($graphName,$subject,$predicate,$object)
    658. -
    659.     {
    660. -
    661.         // static part of the sql statement
    662. -
    663.         $sql "SELECT count(*)
    664. -
    665.                   FROM statements, dataset_model
    666. -
    667.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    668. -
    669.  
    670. -
    671.         if($graphName!=null)
    672. -
    673.         {
    674. -
    675.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    676. -
    677.         }
    678. -
    679.  
    680. -
    681.         // dynamic part of the sql statement
    682. -
    683.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    684. -
    685.  
    686. -
    687.         return (($this->dbConnection->GetOne($sql))>0);
    688. -
    689.     }
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.      * Deletes a Quad from the RDF dataset.
    696. -
    697.      *
    698. -
    699.      * @param Quad 
    700. -
    701.      */
    702. -
    703.     function removeQuad($quad)
    704. -
    705.     {
    706. -
    707.         $graphName=$quad->getGraphName();$graphName=$graphName->getLabel();
    708. -
    709.         //find namedGraph IDs
    710. -
    711.         $graphID $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'");
    712. -
    713.  
    714. -
    715.         // static part of the sql statement
    716. -
    717.         $sql "DELETE FROM statements WHERE modelID = $graphID";
    718. -
    719.  
    720. -
    721.         // dynamic part of the sql statement
    722. -
    723.         $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject()$quad->getPredicate()$quad->getObject());
    724. -
    725.  
    726. -
    727.         // execute the query
    728. -
    729.         if($graphID)
    730. -
    731.             $recordSet =$this->dbConnection->execute($sql);
    732. -
    733.     }
    734. -
    735.  
    736. -
    737.     /**
    738. -
    739.      * Counts the Quads in the RDF dataset. Identical Triples in
    740. -
    741.      * different NamedGraphs are counted individually.
    742. -
    743.      *
    744. -
    745.      * @return int 
    746. -
    747.      */
    748. -
    749.     function countQuads()
    750. -
    751.     {
    752. -
    753.         $sql "SELECT count(*)
    754. -
    755.                   FROM statements, dataset_model
    756. -
    757.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    758. -
    759.  
    760. -
    761.         return ((int)$this->dbConnection->GetOne($sql));
    762. -
    763.     }
    764. -
    765.  
    766. -
    767.     /**
    768. -
    769.      * Finds Statements that match a quad pattern. The argument may contain
    770. -
    771.      * wildcards.
    772. -
    773.      *
    774. -
    775.      * @param Resource or null
    776. -
    777.      * @param Resource or null
    778. -
    779.      * @param Resource or null
    780. -
    781.      * @param Resource or null
    782. -
    783.      * @return IteratorFindQuadsDb 
    784. -
    785.      */
    786. -
    787.     function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false )
    788. -
    789.     {
    790. -
    791.         // static part of the sql statement
    792. -
    793.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI
    794. -
    795.                   FROM statements, dataset_model
    796. -
    797.                    WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
    798. -
    799.  
    800. -
    801.         if($graphName!=null)
    802. -
    803.         {
    804. -
    805.             $sql.= " AND graphURI ='".$graphName->getLabel()."'";
    806. -
    807.         }
    808. -
    809.  
    810. -
    811.         // dynamic part of the sql statement
    812. -
    813.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    814. -
    815.  
    816. -
    817.         // execute the query
    818. -
    819.         $recordSet =$this->dbConnection->execute($sql);
    820. -
    821.  
    822. -
    823.  
    824. -
    825.         $it new IteratorFindQuadsDb($recordSet$this$returnAsTriples);
    826. -
    827.         return $it;
    828. -
    829.     }
    830. -
    831.  
    832. -
    833.     /**
    834. -
    835.      * Finds Statements that match a pattern in the default Graph. The argument may contain
    836. -
    837.      * wildcards.
    838. -
    839.      *
    840. -
    841.      * @param Resource or null
    842. -
    843.      * @param Resource or null
    844. -
    845.      * @param Resource or null
    846. -
    847.      * @return IteratorFindQuadsDb 
    848. -
    849.      */
    850. -
    851.     function &findInDefaultGraph($subject,$predicate,$object)
    852. -
    853.     {
    854. -
    855.         $defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI");
    856. -
    857.         // static part of the sql statement
    858. -
    859.         $sql "SELECT subjectpredicateobjectl_languagel_datatypesubject_isobject_is
    860. -
    861.                   FROM statements
    862. -
    863.                    WHERE modelID ='$defaultGraphID'";
    864. -
    865.  
    866. -
    867.         // dynamic part of the sql statement
    868. -
    869.         $sql .= DbModel::_createDynSqlPart_SPO($subject$predicate$object);
    870. -
    871.  
    872. -
    873.         // execute the query
    874. -
    875.         $recordSet =$this->dbConnection->execute($sql);
    876. -
    877.  
    878. -
    879.         $it new IteratorFindQuadsDb($recordSet$thistrue);
    880. -
    881.         return $it;
    882. -
    883.     }
    884. -
    885. }
    886. -
    887. ?>
    888. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetP.php.html deleted file mode 100755 index 196ac6db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__datasetDatasetP.php.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for DatasetP.php - - - - - -

    Source for file DatasetP.php

    -

    Documentation is available at DatasetP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // dataset Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : dataset package
    12. -
    13. //
    14. -
    15. // Author: Daniel Westphal    <http://www.d-westphal.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23. // Include ResModel classes
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'dataset/Dataset.php');
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'dataset/DatasetDb.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'dataset/NamedGraphMem.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'dataset/NamedGraphDb.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsMem.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorAllGraphsDb.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'dataset/Quad.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsMem.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'dataset/IteratorFindQuadsDb.php');
    44. -
    45. require_onceRDFAPI_INCLUDE_DIR 'syntax/TriXParser.php');
    46. -
    47. require_onceRDFAPI_INCLUDE_DIR 'syntax/TriXSerializer.php');
    48. -
    49. ?>
    50. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__infModelInfModelP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__infModelInfModelP.php.html deleted file mode 100755 index 95d4c149..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__infModelInfModelP.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for InfModelP.php - - - - - -

    Source for file InfModelP.php

    -

    Documentation is available at InfModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // InfModel Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : InfModel package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Daniel Westphal    <mail at d-westphal dot de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include InfModel classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfRule.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfStatement.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModel.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModelB.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'infModel/InfModelF.php');
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelDBase.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelDBase.php.html deleted file mode 100755 index fb602b51..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelDBase.php.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for DBase.php - - - - - -

    Source for file DBase.php

    -

    Documentation is available at DBase.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // DBase
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : DBase package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include DBase class
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'model/DbModel.php' );
    28. -
    29. // include adodb classes
    30. -
    31. require_once(RDFAPI_INCLUDE_DIR .'util/adodb/adodb.inc.php');
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelModelP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelModelP.php.html deleted file mode 100755 index 6185b777..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__modelModelP.php.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - File Source for ModelP.php - - - - - -

    Source for file ModelP.php

    -

    Documentation is available at ModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Model
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Model package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // Include Model classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'model/Node.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'model/Literal.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'model/Resource.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'model/Blanknode.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'model/Statement.php' );
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'model/Model.php' );
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'model/MemModel.php' );
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'model/DbStore.php' );
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'util/StatementIterator.php' );
    44. -
    45. require_onceRDFAPI_INCLUDE_DIR 'model/ModelFactory.php' );
    46. -
    47. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlClient.php' );
    48. -
    49. require_onceRDFAPI_INCLUDE_DIR 'sparql/ClientQuery.php' );
    50. -
    51.  
    52. -
    53. ?>
    54. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__rdqlRDQL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__rdqlRDQL.php.html deleted file mode 100755 index 6b1358e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__rdqlRDQL.php.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for RDQL.php - - - - - -

    Source for file RDQL.php

    -

    Documentation is available at RDQL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // RDQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Rdql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17.  
    18. -
    19. // include RDQL classes
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlParser.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlEngine.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlDbEngine.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlMemEngine.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'rdql/RdqlResultIterator.php' );
    30. -
    31.  
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:46:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__resModelResModelP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__resModelResModelP.php.html deleted file mode 100755 index 3cbc80fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__resModelResModelP.php.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - File Source for ResModelP.php - - - - - -

    Source for file ResModelP.php

    -

    Documentation is available at ResModelP.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // ResModel Package
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : ResModel package
    12. -
    13. //
    14. -
    15. // Author: Daniel Westphal    <mail at d-westphal dot de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23. // Include ResModel classes
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResModel.php');
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResResource.php');
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResContainer.php');
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResAlt.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResBag.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResLiteral.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResProperty.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResSeq.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResIterator.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'resModel/ResList.php');
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:46:57 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__sparqlSPARQL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__sparqlSPARQL.php.html deleted file mode 100755 index 70180a10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__sparqlSPARQL.php.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for SPARQL.php - - - - - -

    Source for file SPARQL.php

    -

    Documentation is available at SPARQL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // SPARQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Sparql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. // include SPARQL classes
    18. -
    19. require_onceRDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php' );
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'sparql/Constraint.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'sparql/Query.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb.php' );
    36. -
    37.  
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxGRDDL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxGRDDL.php.html deleted file mode 100755 index 573417cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxGRDDL.php.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - File Source for SyntaxGRDDL.php - - - - - -

    Source for file SyntaxGRDDL.php

    -

    Documentation is available at SyntaxGRDDL.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RDF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RDF package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25.  
    26. -
    27. // Include Syntax classes
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/GRDDLParser.php' );
    30. -
    31. ?>
    32. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxN3.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxN3.php.html deleted file mode 100755 index d7b2b223..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxN3.php.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - File Source for SyntaxN3.php - - - - - -

    Source for file SyntaxN3.php

    -

    Documentation is available at SyntaxN3.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax N3 and NTriple
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax N3 and NTriple package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25.  
    26. -
    27. // Include Syntax classes
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/N3Parser.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/N3Serializer.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'syntax/NTripleSerializer.php' );
    34. -
    35. ?>
    36. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRDF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRDF.php.html deleted file mode 100755 index 48f27346..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRDF.php.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for SyntaxRDF.php - - - - - -

    Source for file SyntaxRDF.php

    -

    Documentation is available at SyntaxRDF.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RDF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RDF package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'syntax/RdfParser.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'syntax/RdfSerializer.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/NTripleSerializer.php' );
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRSS.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRSS.php.html deleted file mode 100755 index db5408fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxRSS.php.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - File Source for SyntaxRSS.php - - - - - -

    Source for file SyntaxRSS.php

    -

    Documentation is available at SyntaxRSS.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax RSS
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax RSS package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'util/magpie/rss_fetch.inc' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/magpie/rss_parse.inc' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'syntax/RssParser.php' );
    32. -
    33. ?>
    34. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxSparqlRes.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxSparqlRes.php.html deleted file mode 100755 index 489695d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__syntaxSyntaxSparqlRes.php.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - File Source for SyntaxSparqlRes.php - - - - - -

    Source for file SyntaxSparqlRes.php

    -

    Documentation is available at SyntaxSparqlRes.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Syntax SparqlRes
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Syntax Sparql Result package
    12. -
    13. //
    14. -
    15. // Author: Tobias Gau    <tobias.gauss@web.de>
    16. -
    17. //
    18. -
    19. // ----------------------------------------------------------------------------------
    20. -
    21.  
    22. -
    23.  
    24. -
    25. // Include Syntax classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'syntax/SparqlResultParser.php' );
    28. -
    29. ?>
    30. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilUtility.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilUtility.php.html deleted file mode 100755 index b5dc42d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilUtility.php.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for Utility.php - - - - - -

    Source for file Utility.php

    -

    Documentation is available at Utility.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Utility
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Utility package
    12. -
    13. //
    14. -
    15. //
    16. -
    17. // Author: Tobias Gau    <tobias.gauss@web.de>
    18. -
    19. //
    20. -
    21. // ----------------------------------------------------------------------------------
    22. -
    23.  
    24. -
    25. // include utility classes
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'util/RdfUtil.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'util/FindIterator.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'util/IterFind.php' );
    32. -
    33.  
    34. -
    35. // experimental
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'util/ModelComparator.php' );
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:54 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpieextlibSnoopy.class.inc.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpieextlibSnoopy.class.inc.html deleted file mode 100755 index 3e155b8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpieextlibSnoopy.class.inc.html +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - File Source for Snoopy.class.inc - - - - - -

    Source for file Snoopy.class.inc

    -

    Documentation is available at Snoopy.class.inc

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /*************************************************
    6. -
    7.  
    8. -
    9. Snoopy - the PHP net client
    10. -
    11. Author: Monte Ohrt <monte@ispi.net>
    12. -
    13. Copyright (c): 1999-2000 ispi, all rights reserved
    14. -
    15. Version: 1.0
    16. -
    17.  
    18. -
    19.  * This library is free software; you can redistribute it and/or
    20. -
    21.  * modify it under the terms of the GNU Lesser General Public
    22. -
    23.  * License as published by the Free Software Foundation; either
    24. -
    25.  * version 2.1 of the License, or (at your option) any later version.
    26. -
    27.  *
    28. -
    29.  * This library is distributed in the hope that it will be useful,
    30. -
    31.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    32. -
    33.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    34. -
    35.  * Lesser General Public License for more details.
    36. -
    37.  *
    38. -
    39.  * You should have received a copy of the GNU Lesser General Public
    40. -
    41.  * License along with this library; if not, write to the Free Software
    42. -
    43.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    44. -
    45.  
    46. -
    47. You may contact the author of Snoopy by e-mail at:
    48. -
    49. monte@ispi.net
    50. -
    51.  
    52. -
    53. Or, write to:
    54. -
    55. Monte Ohrt
    56. -
    57. CTO, ispi
    58. -
    59. 237 S. 70th suite 220
    60. -
    61. Lincoln, NE 68510
    62. -
    63.  
    64. -
    65. The latest version of Snoopy can be obtained from:
    66. -
    67. http://snoopy.sourceforge.com
    68. -
    69.  
    70. -
    71. *************************************************/
    72. -
    73.  
    74. -
    75. class Snoopy
    76. -
    77. {
    78. -
    79.     /**** Public variables ****/
    80. -
    81.     
    82. -
    83.     /* user definable vars */
    84. -
    85.  
    86. -
    87.     var $host            =    "www.php.net";        // host name we are connecting to
    88. -
    89.     var $port            =    80;                    // port we are connecting to
    90. -
    91.     var $proxy_host        =    "";                    // proxy host to use
    92. -
    93.     var $proxy_port        =    "";                    // proxy port to use
    94. -
    95.     var $agent            =    "Snoopy v1.0";        // agent we masquerade as
    96. -
    97.     var    $referer        =    "";                    // referer info to pass
    98. -
    99.     var $cookies        =    array();            // array of cookies to pass
    100. -
    101.                                                 // $cookies["username"]="joe";
    102. -
    103.     var    $rawheaders        =    array();            // array of raw headers to send
    104. -
    105.                                                 // $rawheaders["Content-type"]="text/html";
    106. -
    107.  
    108. -
    109.     var $maxredirs        =    5;                    // http redirection depth maximum. 0 = disallow
    110. -
    111.     var $lastredirectaddr    =    "";                // contains address of last redirected address
    112. -
    113.     var    $offsiteok        =    true;                // allows redirection off-site
    114. -
    115.     var $maxframes        =    0;                    // frame content depth maximum. 0 = disallow
    116. -
    117.     var $expandlinks    =    true;                // expand links to fully qualified URLs.
    118. -
    119.                                                 // this only applies to fetchlinks()
    120. -
    121.                                                 // or submitlinks()
    122. -
    123.     var $passcookies    =    true;                // pass set cookies back through redirects
    124. -
    125.                                                 // NOTE: this currently does not respect
    126. -
    127.                                                 // dates, domains or paths.
    128. -
    129.     
    130. -
    131.     var    $user            =    "";                    // user for http authentication
    132. -
    133.     var    $pass            =    "";                    // password for http authentication
    134. -
    135.     
    136. -
    137.     // http accept types
    138. -
    139.     var $accept            =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
    140. -
    141.     
    142. -
    143.     var $results        =    "";                    // where the content is put
    144. -
    145.         
    146. -
    147.     var $error            =    "";                    // error messages sent here
    148. -
    149.     var    $response_code    =    "";                    // response code returned from server
    150. -
    151.     var    $headers        =    array();            // headers returned from server sent here
    152. -
    153.     var    $maxlength        =    500000;                // max return data length (body)
    154. -
    155.     var $read_timeout    =    0;                    // timeout on read operations, in seconds
    156. -
    157.                                                 // supported only since PHP 4 Beta 4
    158. -
    159.                                                 // set to 0 to disallow timeouts
    160. -
    161.     var $timed_out        =    false;                // if a read operation timed out
    162. -
    163.     var    $status            =    0;                    // http request status
    164. -
    165.     
    166. -
    167.     var    $curl_path        =    "/usr/bin/curl";
    168. -
    169.                                                 // Snoopy will use cURL for fetching
    170. -
    171.                                                 // SSL content if a full system path to
    172. -
    173.                                                 // the cURL binary is supplied here.
    174. -
    175.                                                 // set to false if you do not have
    176. -
    177.                                                 // cURL installed. See http://curl.haxx.se
    178. -
    179.                                                 // for details on installing cURL.
    180. -
    181.                                                 // Snoopy does *not* use the cURL
    182. -
    183.                                                 // library functions built into php,
    184. -
    185.                                                 // as these functions are not stable
    186. -
    187.                                                 // as of this Snoopy release.
    188. -
    189.     
    190. -
    191.     // send Accept-encoding: gzip?
    192. -
    193.     var $use_gzip        = true;    
    194. -
    195.     
    196. -
    197.     /**** Private variables ****/    
    198. -
    199.     
    200. -
    201.     var    $_maxlinelen    =    4096;                // max line length (headers)
    202. -
    203.     
    204. -
    205.     var $_httpmethod    =    "GET";                // default http request method
    206. -
    207.     var $_httpversion    =    "HTTP/1.0";            // default http request version
    208. -
    209.     var $_submit_method    =    "POST";                // default submit method
    210. -
    211.     var $_submit_type    =    "application/x-www-form-urlencoded";    // default submit type
    212. -
    213.     var $_mime_boundary    =   "";                    // MIME boundary for multipart/form-data submit type
    214. -
    215.     var $_redirectaddr    =    false;                // will be set if page fetched is a redirect
    216. -
    217.     var $_redirectdepth    =    0;                    // increments on an http redirect
    218. -
    219.     var $_frameurls        =     array();            // frame src urls
    220. -
    221.     var $_framedepth    =    0;                    // increments on frame depth
    222. -
    223.     
    224. -
    225.     var $_isproxy        =    false;                // set if using a proxy server
    226. -
    227.     var $_fp_timeout    =    30;                    // timeout for socket connection
    228. -
    229.  
    230. -
    231. /*======================================================================*\
    232. -
    233.     Function:    fetch
    234. -
    235.     Purpose:    fetch the contents of a web page
    236. -
    237.                 (and possibly other protocols in the
    238. -
    239.                 future like ftp, nntp, gopher, etc.)
    240. -
    241.     Input:        $URI    the location of the page to fetch
    242. -
    243.     Output:        $this->results    the output text from the fetch
    244. -
    245. \*======================================================================*/
    246. -
    247.  
    248. -
    249.     function fetch($URI)
    250. -
    251.     {
    252. -
    253.     
    254. -
    255.         //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
    256. -
    257.         $URI_PARTS parse_url($URI);
    258. -
    259.         if (!empty($URI_PARTS["user"]))
    260. -
    261.             $this->user = $URI_PARTS["user"];
    262. -
    263.         if (!empty($URI_PARTS["pass"]))
    264. -
    265.             $this->pass = $URI_PARTS["pass"];
    266. -
    267.                 
    268. -
    269.         switch($URI_PARTS["scheme"])
    270. -
    271.         {
    272. -
    273.             case "http":
    274. -
    275.                 $this->host = $URI_PARTS["host"];
    276. -
    277.                 if(!empty($URI_PARTS["port"]))
    278. -
    279.                     $this->port = $URI_PARTS["port"];
    280. -
    281.                 if($this->_connect($fp))
    282. -
    283.                 {
    284. -
    285.                     if($this->_isproxy)
    286. -
    287.                     {
    288. -
    289.                         // using proxy, send entire URI
    290. -
    291.                         $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
    292. -
    293.                     }
    294. -
    295.                     else
    296. -
    297.                     {
    298. -
    299.                         $path $URI_PARTS["path"].(isset($URI_PARTS["query"]"?".$URI_PARTS["query""");
    300. -
    301.                         // no proxy, send only the path
    302. -
    303.                         $this->_httprequest($path$fp$URI$this->_httpmethod);
    304. -
    305.                     }
    306. -
    307.                     
    308. -
    309.                     $this->_disconnect($fp);
    310. -
    311.  
    312. -
    313.                     if($this->_redirectaddr)
    314. -
    315.                     {
    316. -
    317.                         /* url was redirected, check if we've hit the max depth */
    318. -
    319.                         if($this->maxredirs > $this->_redirectdepth)
    320. -
    321.                         {
    322. -
    323.                             // only follow redirect if it's on this site, or offsiteok is true
    324. -
    325.                             if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr|| $this->offsiteok)
    326. -
    327.                             {
    328. -
    329.                                 /* follow the redirect */
    330. -
    331.                                 $this->_redirectdepth++;
    332. -
    333.                                 $this->lastredirectaddr=$this->_redirectaddr;
    334. -
    335.                                 $this->fetch($this->_redirectaddr);
    336. -
    337.                             }
    338. -
    339.                         }
    340. -
    341.                     }
    342. -
    343.  
    344. -
    345.                     if($this->_framedepth < $this->maxframes && count($this->_frameurls0)
    346. -
    347.                     {
    348. -
    349.                         $frameurls $this->_frameurls;
    350. -
    351.                         $this->_frameurls = array();
    352. -
    353.                         
    354. -
    355.                         while(list(,$frameurleach($frameurls))
    356. -
    357.                         {
    358. -
    359.                             if($this->_framedepth < $this->maxframes)
    360. -
    361.                             {
    362. -
    363.                                 $this->fetch($frameurl);
    364. -
    365.                                 $this->_framedepth++;
    366. -
    367.                             }
    368. -
    369.                             else
    370. -
    371.                                 break;
    372. -
    373.                         }
    374. -
    375.                     }                    
    376. -
    377.                 }
    378. -
    379.                 else
    380. -
    381.                 {
    382. -
    383.                     return false;
    384. -
    385.                 }
    386. -
    387.                 return true;                    
    388. -
    389.                 break;
    390. -
    391.             case "https":
    392. -
    393.                 if(!$this->curl_path || (!is_executable($this->curl_path))) {
    394. -
    395.                     $this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n";
    396. -
    397.                     return false;
    398. -
    399.                 }
    400. -
    401.                 $this->host = $URI_PARTS["host"];
    402. -
    403.                 if(!empty($URI_PARTS["port"]))
    404. -
    405.                     $this->port = $URI_PARTS["port"];
    406. -
    407.                 if($this->_isproxy)
    408. -
    409.                 {
    410. -
    411.                     // using proxy, send entire URI
    412. -
    413.                     $this->_httpsrequest($URI,$URI,$this->_httpmethod);
    414. -
    415.                 }
    416. -
    417.                 else
    418. -
    419.                 {
    420. -
    421.                     $path $URI_PARTS["path"].($URI_PARTS["query""?".$URI_PARTS["query""");
    422. -
    423.                     // no proxy, send only the path
    424. -
    425.                     $this->_httpsrequest($path$URI$this->_httpmethod);
    426. -
    427.                 }
    428. -
    429.  
    430. -
    431.                 if($this->_redirectaddr)
    432. -
    433.                 {
    434. -
    435.                     /* url was redirected, check if we've hit the max depth */
    436. -
    437.                     if($this->maxredirs > $this->_redirectdepth)
    438. -
    439.                     {
    440. -
    441.                         // only follow redirect if it's on this site, or offsiteok is true
    442. -
    443.                         if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr|| $this->offsiteok)
    444. -
    445.                         {
    446. -
    447.                             /* follow the redirect */
    448. -
    449.                             $this->_redirectdepth++;
    450. -
    451.                             $this->lastredirectaddr=$this->_redirectaddr;
    452. -
    453.                             $this->fetch($this->_redirectaddr);
    454. -
    455.                         }
    456. -
    457.                     }
    458. -
    459.                 }
    460. -
    461.  
    462. -
    463.                 if($this->_framedepth < $this->maxframes && count($this->_frameurls0)
    464. -
    465.                 {
    466. -
    467.                     $frameurls $this->_frameurls;
    468. -
    469.                     $this->_frameurls = array();
    470. -
    471.  
    472. -
    473.                     while(list(,$frameurleach($frameurls))
    474. -
    475.                     {
    476. -
    477.                         if($this->_framedepth < $this->maxframes)
    478. -
    479.                         {
    480. -
    481.                             $this->fetch($frameurl);
    482. -
    483.                             $this->_framedepth++;
    484. -
    485.                         }
    486. -
    487.                         else
    488. -
    489.                             break;
    490. -
    491.                     }
    492. -
    493.                 }                    
    494. -
    495.                 return true;                    
    496. -
    497.                 break;
    498. -
    499.             default:
    500. -
    501.                 // not a valid protocol
    502. -
    503.                 $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
    504. -
    505.                 return false;
    506. -
    507.                 break;
    508. -
    509.         }        
    510. -
    511.         return true;
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.  
    518. -
    519.  
    520. -
    521. /*======================================================================*\
    522. -
    523.     Private functions
    524. -
    525. \*======================================================================*/
    526. -
    527.     
    528. -
    529.     
    530. -
    531. /*======================================================================*\
    532. -
    533.     Function:    _striplinks
    534. -
    535.     Purpose:    strip the hyperlinks from an html document
    536. -
    537.     Input:        $document    document to strip.
    538. -
    539.     Output:        $match        an array of the links
    540. -
    541. \*======================================================================*/
    542. -
    543.  
    544. -
    545.     function _striplinks($document)
    546. -
    547.     {    
    548. -
    549.         preg_match_all("'<\s*a\s+.*href\s*=\s*            # find <a href=
    550. -
    551.                         ([\"\'])?                    # find single or double quote
    552. -
    553.                         (?(1) (.*?)\\1 | ([^\s\>]+))        # if quote found, match up to next matching
    554. -
    555.                                                     # quote, otherwise match up to next space
    556. -
    557.                         'isx",$document,$links);
    558. -
    559.                         
    560. -
    561.  
    562. -
    563.         // catenate the non-empty matches from the conditional subpattern
    564. -
    565.  
    566. -
    567.         while(list($key,$valeach($links[2]))
    568. -
    569.         {
    570. -
    571.             if(!empty($val))
    572. -
    573.                 $match[$val;
    574. -
    575.         }                
    576. -
    577.         
    578. -
    579.         while(list($key,$valeach($links[3]))
    580. -
    581.         {
    582. -
    583.             if(!empty($val))
    584. -
    585.                 $match[$val;
    586. -
    587.         }        
    588. -
    589.         
    590. -
    591.         // return the links
    592. -
    593.         return $match;
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. /*======================================================================*\
    600. -
    601.     Function:    _stripform
    602. -
    603.     Purpose:    strip the form elements from an html document
    604. -
    605.     Input:        $document    document to strip.
    606. -
    607.     Output:        $match        an array of the links
    608. -
    609. \*======================================================================*/
    610. -
    611.  
    612. -
    613.     function _stripform($document)
    614. -
    615.     {    
    616. -
    617.         preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
    618. -
    619.         
    620. -
    621.         // catenate the matches
    622. -
    623.         $match implode("\r\n",$elements[0]);
    624. -
    625.                 
    626. -
    627.         // return the links
    628. -
    629.         return $match;
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     
    636. -
    637.     
    638. -
    639. /*======================================================================*\
    640. -
    641.     Function:    _striptext
    642. -
    643.     Purpose:    strip the text from an html document
    644. -
    645.     Input:        $document    document to strip.
    646. -
    647.     Output:        $text        the resulting text
    648. -
    649. \*======================================================================*/
    650. -
    651.  
    652. -
    653.     function _striptext($document)
    654. -
    655.     {
    656. -
    657.         
    658. -
    659.         // I didn't use preg eval (//e) since that is only available in PHP 4.0.
    660. -
    661.         // so, list your entities one by one here. I included some of the
    662. -
    663.         // more common ones.
    664. -
    665.                                 
    666. -
    667.         $search array("'<script[^>]*?>.*?</script>'si",    // strip out javascript
    668. -
    669.                         "'<[\/\!]*?[^<>]*?>'si",            // strip out html tags
    670. -
    671.                         "'([\r\n])[\s]+'",                    // strip out white space
    672. -
    673.                         "'&(quote|#34);'i",                    // replace html entities
    674. -
    675.                         "'&(amp|#38);'i",
    676. -
    677.                         "'&(lt|#60);'i",
    678. -
    679.                         "'&(gt|#62);'i",
    680. -
    681.                         "'&(nbsp|#160);'i",
    682. -
    683.                         "'&(iexcl|#161);'i",
    684. -
    685.                         "'&(cent|#162);'i",
    686. -
    687.                         "'&(pound|#163);'i",
    688. -
    689.                         "'&(copy|#169);'i"
    690. -
    691.                         );                
    692. -
    693.         $replace array(    "",
    694. -
    695.                             "",
    696. -
    697.                             "\\1",
    698. -
    699.                             "\"",
    700. -
    701.                             "&",
    702. -
    703.                             "<",
    704. -
    705.                             ">",
    706. -
    707.                             " ",
    708. -
    709.                             chr(161),
    710. -
    711.                             chr(162),
    712. -
    713.                             chr(163),
    714. -
    715.                             chr(169));
    716. -
    717.                     
    718. -
    719.         $text preg_replace($search,$replace,$document);
    720. -
    721.                                 
    722. -
    723.         return $text;
    724. -
    725.     }
    726. -
    727.  
    728. -
    729. /*======================================================================*\
    730. -
    731.     Function:    _expandlinks
    732. -
    733.     Purpose:    expand each link into a fully qualified URL
    734. -
    735.     Input:        $links            the links to qualify
    736. -
    737.                 $URI            the full URI to get the base from
    738. -
    739.     Output:        $expandedLinks    the expanded links
    740. -
    741. \*======================================================================*/
    742. -
    743.  
    744. -
    745.     function _expandlinks($links,$URI)
    746. -
    747.     {
    748. -
    749.         
    750. -
    751.         preg_match("/^[^\?]+/",$URI,$match);
    752. -
    753.  
    754. -
    755.         $match preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
    756. -
    757.                 
    758. -
    759.         $search array(     "|^http://".preg_quote($this->host)."|i",
    760. -
    761.                             "|^(?!http://)(\/)?(?!mailto:)|i",
    762. -
    763.                             "|/\./|",
    764. -
    765.                             "|/[^\/]+/\.\./|"
    766. -
    767.                         );
    768. -
    769.                         
    770. -
    771.         $replace array(    "",
    772. -
    773.                             $match."/",
    774. -
    775.                             "/",
    776. -
    777.                             "/"
    778. -
    779.                         );            
    780. -
    781.                 
    782. -
    783.         $expandedLinks preg_replace($search,$replace,$links);
    784. -
    785.  
    786. -
    787.         return $expandedLinks;
    788. -
    789.     }
    790. -
    791.  
    792. -
    793. /*======================================================================*\
    794. -
    795.     Function:    _httprequest
    796. -
    797.     Purpose:    go get the http data from the server
    798. -
    799.     Input:        $url        the url to fetch
    800. -
    801.                 $fp            the current open file pointer
    802. -
    803.                 $URI        the full URI
    804. -
    805.                 $body        body contents to send if any (POST)
    806. -
    807.     Output:        
    808. -
    809. \*======================================================================*/
    810. -
    811.     
    812. -
    813.     function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
    814. -
    815.     {
    816. -
    817.         if($this->passcookies && $this->_redirectaddr)
    818. -
    819.             $this->setcookies();
    820. -
    821.             
    822. -
    823.         $URI_PARTS parse_url($URI);
    824. -
    825.         if(empty($url))
    826. -
    827.             $url "/";
    828. -
    829.         $headers $http_method." ".$url." ".$this->_httpversion."\r\n";        
    830. -
    831.         if(!empty($this->agent))
    832. -
    833.             $headers .= "User-Agent: ".$this->agent."\r\n";
    834. -
    835.         if(!empty($this->host&& !isset($this->rawheaders['Host']))
    836. -
    837.             $headers .= "Host: ".$this->host."\r\n";
    838. -
    839.         if(!empty($this->accept))
    840. -
    841.             $headers .= "Accept: ".$this->accept."\r\n";
    842. -
    843.         
    844. -
    845.         if($this->use_gzip{
    846. -
    847.             // make sure PHP was built with --with-zlib
    848. -
    849.             // and we can handle gzipp'ed data
    850. -
    851.             if function_exists(gzinflate) ) {
    852. -
    853.                $headers .= "Accept-encoding: gzip\r\n";
    854. -
    855.             }
    856. -
    857.             else {
    858. -
    859.                trigger_error(
    860. -
    861.                    "use_gzip is on, but PHP was built without zlib support.".
    862. -
    863.                 "  Requesting file(s) without gzip encoding."
    864. -
    865.                 E_USER_NOTICE);
    866. -
    867.             }
    868. -
    869.         }
    870. -
    871.         
    872. -
    873.         if(!empty($this->referer))
    874. -
    875.             $headers .= "Referer: ".$this->referer."\r\n";
    876. -
    877.         if(!empty($this->cookies))
    878. -
    879.         {            
    880. -
    881.             if(!is_array($this->cookies))
    882. -
    883.                 $this->cookies = (array)$this->cookies;
    884. -
    885.     
    886. -
    887.             reset($this->cookies);
    888. -
    889.             if count($this->cookies{
    890. -
    891.                 $cookie_headers .= 'Cookie: ';
    892. -
    893.                 foreach $this->cookies as $cookieKey => $cookieVal {
    894. -
    895.                 $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
    896. -
    897.                 }
    898. -
    899.                 $headers .= substr($cookie_headers,0,-2"\r\n";
    900. -
    901.             
    902. -
    903.         }
    904. -
    905.         if(!empty($this->rawheaders))
    906. -
    907.         {
    908. -
    909.             if(!is_array($this->rawheaders))
    910. -
    911.                 $this->rawheaders = (array)$this->rawheaders;
    912. -
    913.             while(list($headerKey,$headerValeach($this->rawheaders))
    914. -
    915.                 $headers .= $headerKey.": ".$headerVal."\r\n";
    916. -
    917.         }
    918. -
    919.         if(!empty($content_type)) {
    920. -
    921.             $headers .= "Content-type$content_type";
    922. -
    923.             if ($content_type == "multipart/form-data")
    924. -
    925.                 $headers .= "; boundary=".$this->_mime_boundary;
    926. -
    927.             $headers .= "\r\n";
    928. -
    929.         }
    930. -
    931.         if(!empty($body))    
    932. -
    933.             $headers .= "Content-length: ".strlen($body)."\r\n";
    934. -
    935.         if(!empty($this->user|| !empty($this->pass))    
    936. -
    937.             $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
    938. -
    939.  
    940. -
    941.         $headers .= "\r\n";
    942. -
    943.         
    944. -
    945.         // set the read timeout if needed
    946. -
    947.         if ($this->read_timeout > 0)
    948. -
    949.             socket_set_timeout($fp$this->read_timeout);
    950. -
    951.         $this->timed_out = false;
    952. -
    953.         
    954. -
    955.         fwrite($fp,$headers.$body,strlen($headers.$body));
    956. -
    957.         
    958. -
    959.         $this->_redirectaddr = false;
    960. -
    961.         unset($this->headers);
    962. -
    963.         
    964. -
    965.         // content was returned gzip encoded?
    966. -
    967.         $is_gzipped false;
    968. -
    969.                         
    970. -
    971.         while($currentHeader fgets($fp,$this->_maxlinelen))
    972. -
    973.         {
    974. -
    975.             if ($this->read_timeout > && $this->_check_timeout($fp))
    976. -
    977.             {
    978. -
    979.                 $this->status=-100;
    980. -
    981.                 return false;
    982. -
    983.             }
    984. -
    985.                 
    986. -
    987.         //    if($currentHeader == "\r\n")
    988. -
    989.             if(preg_match("/^\r?\n$/"$currentHeader) )
    990. -
    991.                   break;
    992. -
    993.                         
    994. -
    995.             // if a header begins with Location: or URI:, set the redirect
    996. -
    997.             if(preg_match("/^(Location:|URI:)/i",$currentHeader))
    998. -
    999.             {
    1000. -
    1001.                 // get URL portion of the redirect
    1002. -
    1003.                 preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
    1004. -
    1005.                 // look for :// in the Location header to see if hostname is included
    1006. -
    1007.                 if(!preg_match("|\:\/\/|",$matches[2]))
    1008. -
    1009.                 {
    1010. -
    1011.                     // no host in the path, so prepend
    1012. -
    1013.                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    1014. -
    1015.                     // eliminate double slash
    1016. -
    1017.                     if(!preg_match("|^/|",$matches[2]))
    1018. -
    1019.                             $this->_redirectaddr .= "/".$matches[2];
    1020. -
    1021.                     else
    1022. -
    1023.                             $this->_redirectaddr .= $matches[2];
    1024. -
    1025.                 }
    1026. -
    1027.                 else
    1028. -
    1029.                     $this->_redirectaddr = $matches[2];
    1030. -
    1031.             }
    1032. -
    1033.         
    1034. -
    1035.             if(preg_match("|^HTTP/|",$currentHeader))
    1036. -
    1037.             {
    1038. -
    1039.                 if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader$status))
    1040. -
    1041.                 {
    1042. -
    1043.                     $this->status$status[1];
    1044. -
    1045.                 }                
    1046. -
    1047.                 $this->response_code = $currentHeader;
    1048. -
    1049.             }
    1050. -
    1051.             
    1052. -
    1053.             if (preg_match("/Content-Encoding: gzip/"$currentHeader) ) {
    1054. -
    1055.                 $is_gzipped true;
    1056. -
    1057.             }
    1058. -
    1059.             
    1060. -
    1061.             $this->headers[$currentHeader;
    1062. -
    1063.         }
    1064. -
    1065.  
    1066. -
    1067.         # $results = fread($fp, $this->maxlength);
    1068. -
    1069.         $results "";
    1070. -
    1071.         while $data fread($fp$this->maxlength) ) {
    1072. -
    1073.             $results .= $data;
    1074. -
    1075.             if (
    1076. -
    1077.                 strlen($results$this->maxlength {
    1078. -
    1079.                 break;
    1080. -
    1081.             }
    1082. -
    1083.         }
    1084. -
    1085.         
    1086. -
    1087.         // gunzip
    1088. -
    1089.         if $is_gzipped {
    1090. -
    1091.             // per http://www.php.net/manual/en/function.gzencode.php
    1092. -
    1093.             $results substr($results10);
    1094. -
    1095.             $results gzinflate($results);
    1096. -
    1097.         }
    1098. -
    1099.         
    1100. -
    1101.         if ($this->read_timeout > && $this->_check_timeout($fp))
    1102. -
    1103.         {
    1104. -
    1105.             $this->status=-100;
    1106. -
    1107.             return false;
    1108. -
    1109.         }
    1110. -
    1111.         
    1112. -
    1113.         // check if there is a a redirect meta tag
    1114. -
    1115.         
    1116. -
    1117.         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    1118. -
    1119.         {
    1120. -
    1121.             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);    
    1122. -
    1123.         }
    1124. -
    1125.  
    1126. -
    1127.         // have we hit our frame depth and is there frame src to fetch?
    1128. -
    1129.         if(($this->_framedepth < $this->maxframes&& preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    1130. -
    1131.         {
    1132. -
    1133.             $this->results[$results;
    1134. -
    1135.             for($x=0$x<count($match[1])$x++)
    1136. -
    1137.                 $this->_frameurls[$this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    1138. -
    1139.         }
    1140. -
    1141.         // have we already fetched framed content?
    1142. -
    1143.         elseif(is_array($this->results))
    1144. -
    1145.             $this->results[$results;
    1146. -
    1147.         // no framed content
    1148. -
    1149.         else
    1150. -
    1151.             $this->results = $results;
    1152. -
    1153.         
    1154. -
    1155.         return true;
    1156. -
    1157.     }
    1158. -
    1159.  
    1160. -
    1161. /*======================================================================*\
    1162. -
    1163.     Function:    _httpsrequest
    1164. -
    1165.     Purpose:    go get the https data from the server using curl
    1166. -
    1167.     Input:        $url        the url to fetch
    1168. -
    1169.                 $URI        the full URI
    1170. -
    1171.                 $body        body contents to send if any (POST)
    1172. -
    1173.     Output:        
    1174. -
    1175. \*======================================================================*/
    1176. -
    1177.     
    1178. -
    1179.     function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
    1180. -
    1181.     {
    1182. -
    1183.         if($this->passcookies && $this->_redirectaddr)
    1184. -
    1185.             $this->setcookies();
    1186. -
    1187.  
    1188. -
    1189.         $headers array();        
    1190. -
    1191.                     
    1192. -
    1193.         $URI_PARTS parse_url($URI);
    1194. -
    1195.         if(empty($url))
    1196. -
    1197.             $url "/";
    1198. -
    1199.         // GET ... header not needed for curl
    1200. -
    1201.         //$headers[] = $http_method." ".$url." ".$this->_httpversion;        
    1202. -
    1203.         if(!empty($this->agent))
    1204. -
    1205.             $headers["User-Agent: ".$this->agent;
    1206. -
    1207.         if(!empty($this->host))
    1208. -
    1209.             $headers["Host: ".$this->host;
    1210. -
    1211.         if(!empty($this->accept))
    1212. -
    1213.             $headers["Accept: ".$this->accept;
    1214. -
    1215.         if(!empty($this->referer))
    1216. -
    1217.             $headers["Referer: ".$this->referer;
    1218. -
    1219.         if(!empty($this->cookies))
    1220. -
    1221.         {            
    1222. -
    1223.             if(!is_array($this->cookies))
    1224. -
    1225.                 $this->cookies = (array)$this->cookies;
    1226. -
    1227.     
    1228. -
    1229.             reset($this->cookies);
    1230. -
    1231.             if count($this->cookies{
    1232. -
    1233.                 $cookie_str 'Cookie: ';
    1234. -
    1235.                 foreach $this->cookies as $cookieKey => $cookieVal {
    1236. -
    1237.                 $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
    1238. -
    1239.                 }
    1240. -
    1241.                 $headers[substr($cookie_str,0,-2);
    1242. -
    1243.             }
    1244. -
    1245.         }
    1246. -
    1247.         if(!empty($this->rawheaders))
    1248. -
    1249.         {
    1250. -
    1251.             if(!is_array($this->rawheaders))
    1252. -
    1253.                 $this->rawheaders = (array)$this->rawheaders;
    1254. -
    1255.             while(list($headerKey,$headerValeach($this->rawheaders))
    1256. -
    1257.                 $headers[$headerKey.": ".$headerVal;
    1258. -
    1259.         }
    1260. -
    1261.         if(!empty($content_type)) {
    1262. -
    1263.             if ($content_type == "multipart/form-data")
    1264. -
    1265.                 $headers["Content-type$content_typeboundary=".$this->_mime_boundary;
    1266. -
    1267.             else
    1268. -
    1269.                 $headers["Content-type$content_type";
    1270. -
    1271.         }
    1272. -
    1273.         if(!empty($body))    
    1274. -
    1275.             $headers["Content-length: ".strlen($body);
    1276. -
    1277.         if(!empty($this->user|| !empty($this->pass))    
    1278. -
    1279.             $headers["Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
    1280. -
    1281.             
    1282. -
    1283.         for($curr_header 0$curr_header count($headers)$curr_header++{
    1284. -
    1285.             $cmdline_params .= " -H \"".$headers[$curr_header]."\"";
    1286. -
    1287.         }
    1288. -
    1289.                                            
    1290. -
    1291.         if(!empty($body))
    1292. -
    1293.             $cmdline_params .= " -d \"$body\"";
    1294. -
    1295.         
    1296. -
    1297.         if($this->read_timeout > 0)
    1298. -
    1299.             $cmdline_params .= " -m ".$this->read_timeout;
    1300. -
    1301.         
    1302. -
    1303.         $headerfile uniqid(time());
    1304. -
    1305.         
    1306. -
    1307.         # accept self-signed certs
    1308. -
    1309.         $cmdline_params .= " -k"
    1310. -
    1311.         exec($this->curl_path." -D \"/tmp/$headerfile\"".escapeshellcmd($cmdline_params)." ".escapeshellcmd($URI),$results,$return);
    1312. -
    1313.         
    1314. -
    1315.         if($return)
    1316. -
    1317.         {
    1318. -
    1319.             $this->error = "ErrorcURL could not retrieve the documenterror $return.";
    1320. -
    1321.             return false;
    1322. -
    1323.         }
    1324. -
    1325.             
    1326. -
    1327.             
    1328. -
    1329.         $results implode("\r\n",$results);
    1330. -
    1331.         
    1332. -
    1333.         $result_headers file("/tmp/$headerfile");
    1334. -
    1335.                         
    1336. -
    1337.         $this->_redirectaddr = false;
    1338. -
    1339.         unset($this->headers);
    1340. -
    1341.                         
    1342. -
    1343.         for($currentHeader 0$currentHeader count($result_headers)$currentHeader++)
    1344. -
    1345.         {
    1346. -
    1347.             
    1348. -
    1349.             // if a header begins with Location: or URI:, set the redirect
    1350. -
    1351.             if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
    1352. -
    1353.             {
    1354. -
    1355.                 // get URL portion of the redirect
    1356. -
    1357.                 preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
    1358. -
    1359.                 // look for :// in the Location header to see if hostname is included
    1360. -
    1361.                 if(!preg_match("|\:\/\/|",$matches[2]))
    1362. -
    1363.                 {
    1364. -
    1365.                     // no host in the path, so prepend
    1366. -
    1367.                     $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
    1368. -
    1369.                     // eliminate double slash
    1370. -
    1371.                     if(!preg_match("|^/|",$matches[2]))
    1372. -
    1373.                             $this->_redirectaddr .= "/".$matches[2];
    1374. -
    1375.                     else
    1376. -
    1377.                             $this->_redirectaddr .= $matches[2];
    1378. -
    1379.                 }
    1380. -
    1381.                 else
    1382. -
    1383.                     $this->_redirectaddr = $matches[2];
    1384. -
    1385.             }
    1386. -
    1387.         
    1388. -
    1389.             if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
    1390. -
    1391.             {
    1392. -
    1393.                 $this->response_code = $result_headers[$currentHeader];
    1394. -
    1395.                 if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code$match))
    1396. -
    1397.                 {
    1398. -
    1399.                 $this->status$match[1];
    1400. -
    1401.                         }
    1402. -
    1403.             }
    1404. -
    1405.             $this->headers[$result_headers[$currentHeader];
    1406. -
    1407.         }
    1408. -
    1409.  
    1410. -
    1411.         // check if there is a a redirect meta tag
    1412. -
    1413.         
    1414. -
    1415.         if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
    1416. -
    1417.         {
    1418. -
    1419.             $this->_redirectaddr = $this->_expandlinks($match[1],$URI);    
    1420. -
    1421.         }
    1422. -
    1423.  
    1424. -
    1425.         // have we hit our frame depth and is there frame src to fetch?
    1426. -
    1427.         if(($this->_framedepth < $this->maxframes&& preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
    1428. -
    1429.         {
    1430. -
    1431.             $this->results[$results;
    1432. -
    1433.             for($x=0$x<count($match[1])$x++)
    1434. -
    1435.                 $this->_frameurls[$this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
    1436. -
    1437.         }
    1438. -
    1439.         // have we already fetched framed content?
    1440. -
    1441.         elseif(is_array($this->results))
    1442. -
    1443.             $this->results[$results;
    1444. -
    1445.         // no framed content
    1446. -
    1447.         else
    1448. -
    1449.             $this->results = $results;
    1450. -
    1451.  
    1452. -
    1453.         unlink("/tmp/$headerfile");
    1454. -
    1455.         
    1456. -
    1457.         return true;
    1458. -
    1459.     }
    1460. -
    1461.  
    1462. -
    1463. /*======================================================================*\
    1464. -
    1465.     Function:    setcookies()
    1466. -
    1467.     Purpose:    set cookies for a redirection
    1468. -
    1469. \*======================================================================*/
    1470. -
    1471.     
    1472. -
    1473.     function setcookies()
    1474. -
    1475.     {
    1476. -
    1477.         for($x=0$x<count($this->headers)$x++)
    1478. -
    1479.         {
    1480. -
    1481.         if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i"$this->headers[$x],$match))
    1482. -
    1483.             $this->cookies[$match[1]] $match[2];
    1484. -
    1485.         }
    1486. -
    1487.     }
    1488. -
    1489.  
    1490. -
    1491.     
    1492. -
    1493. /*======================================================================*\
    1494. -
    1495.     Function:    _check_timeout
    1496. -
    1497.     Purpose:    checks whether timeout has occurred
    1498. -
    1499.     Input:        $fp    file pointer
    1500. -
    1501. \*======================================================================*/
    1502. -
    1503.  
    1504. -
    1505.     function _check_timeout($fp)
    1506. -
    1507.     {
    1508. -
    1509.         if ($this->read_timeout > 0{
    1510. -
    1511.             $fp_status socket_get_status($fp);
    1512. -
    1513.             if ($fp_status["timed_out"]{
    1514. -
    1515.                 $this->timed_out = true;
    1516. -
    1517.                 return true;
    1518. -
    1519.             }
    1520. -
    1521.         }
    1522. -
    1523.         return false;
    1524. -
    1525.     }
    1526. -
    1527.  
    1528. -
    1529. /*======================================================================*\
    1530. -
    1531.     Function:    _connect
    1532. -
    1533.     Purpose:    make a socket connection
    1534. -
    1535.     Input:        $fp    file pointer
    1536. -
    1537. \*======================================================================*/
    1538. -
    1539.     
    1540. -
    1541.     function _connect(&$fp)
    1542. -
    1543.     {
    1544. -
    1545.         if(!empty($this->proxy_host&& !empty($this->proxy_port))
    1546. -
    1547.             {
    1548. -
    1549.                 $this->_isproxy = true;
    1550. -
    1551.                 $host $this->proxy_host;
    1552. -
    1553.                 $port $this->proxy_port;
    1554. -
    1555.             }
    1556. -
    1557.         else
    1558. -
    1559.         {
    1560. -
    1561.             $host $this->host;
    1562. -
    1563.             $port $this->port;
    1564. -
    1565.         }
    1566. -
    1567.     
    1568. -
    1569.         $this->status = 0;
    1570. -
    1571.         
    1572. -
    1573.         if($fp fsockopen(
    1574. -
    1575.                     $host,
    1576. -
    1577.                     $port,
    1578. -
    1579.                     $errno,
    1580. -
    1581.                     $errstr,
    1582. -
    1583.                     $this->_fp_timeout
    1584. -
    1585.                     ))
    1586. -
    1587.         {
    1588. -
    1589.             // socket connection succeeded
    1590. -
    1591.  
    1592. -
    1593.             return true;
    1594. -
    1595.         }
    1596. -
    1597.         else
    1598. -
    1599.         {
    1600. -
    1601.             // socket connection failed
    1602. -
    1603.             $this->status = $errno;
    1604. -
    1605.             switch($errno)
    1606. -
    1607.             {
    1608. -
    1609.                 case -3:
    1610. -
    1611.                     $this->error="socket creation failed (-3)";
    1612. -
    1613.                 case -4:
    1614. -
    1615.                     $this->error="dns lookup failure (-4)";
    1616. -
    1617.                 case -5:
    1618. -
    1619.                     $this->error="connection refused or timed out (-5)";
    1620. -
    1621.                 default:
    1622. -
    1623.                     $this->error="connection failed (".$errno.")";
    1624. -
    1625.             }
    1626. -
    1627.             return false;
    1628. -
    1629.         }
    1630. -
    1631.     }
    1632. -
    1633. /*======================================================================*\
    1634. -
    1635.     Function:    _disconnect
    1636. -
    1637.     Purpose:    disconnect a socket connection
    1638. -
    1639.     Input:        $fp    file pointer
    1640. -
    1641. \*======================================================================*/
    1642. -
    1643.     
    1644. -
    1645.     function _disconnect($fp)
    1646. -
    1647.     {
    1648. -
    1649.         return(fclose($fp));
    1650. -
    1651.     }
    1652. -
    1653.  
    1654. -
    1655.     
    1656. -
    1657. /*======================================================================*\
    1658. -
    1659.     Function:    _prepare_post_body
    1660. -
    1661.     Purpose:    Prepare post body according to encoding type
    1662. -
    1663.     Input:        $formvars  - form variables
    1664. -
    1665.                 $formfiles - form upload files
    1666. -
    1667.     Output:        post body
    1668. -
    1669. \*======================================================================*/
    1670. -
    1671.     
    1672. -
    1673.     function _prepare_post_body($formvars$formfiles)
    1674. -
    1675.     {
    1676. -
    1677.         settype($formvars"array");
    1678. -
    1679.         settype($formfiles"array");
    1680. -
    1681.  
    1682. -
    1683.         if (count($formvars== && count($formfiles== 0)
    1684. -
    1685.             return;
    1686. -
    1687.         
    1688. -
    1689.         switch ($this->_submit_type{
    1690. -
    1691.             case "application/x-www-form-urlencoded":
    1692. -
    1693.                 reset($formvars);
    1694. -
    1695.                 while(list($key,$valeach($formvars)) {
    1696. -
    1697.                     if (is_array($val|| is_object($val)) {
    1698. -
    1699.                         while (list($cur_key$cur_valeach($val)) {
    1700. -
    1701.                             $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
    1702. -
    1703.                         }
    1704. -
    1705.                     else
    1706. -
    1707.                         $postdata .= urlencode($key)."=".urlencode($val)."&";
    1708. -
    1709.                 }
    1710. -
    1711.                 break;
    1712. -
    1713.  
    1714. -
    1715.             case "multipart/form-data":
    1716. -
    1717.                 $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
    1718. -
    1719.                 
    1720. -
    1721.                 reset($formvars);
    1722. -
    1723.                 while(list($key,$valeach($formvars)) {
    1724. -
    1725.                     if (is_array($val|| is_object($val)) {
    1726. -
    1727.                         while (list($cur_key$cur_valeach($val)) {
    1728. -
    1729.                             $postdata .= "--".$this->_mime_boundary."\r\n";
    1730. -
    1731.                             $postdata .= "Content-Dispositionform-dataname=\"$key\[\]\"\r\n\r\n";
    1732. -
    1733.                             $postdata .= "$cur_val\r\n";
    1734. -
    1735.                         }
    1736. -
    1737.                     else {
    1738. -
    1739.                         $postdata .= "--".$this->_mime_boundary."\r\n";
    1740. -
    1741.                         $postdata .= "Content-Dispositionform-dataname=\"$key\"\r\n\r\n";
    1742. -
    1743.                         $postdata .= "$val\r\n";
    1744. -
    1745.                     }
    1746. -
    1747.                 }
    1748. -
    1749.                 
    1750. -
    1751.                 reset($formfiles);
    1752. -
    1753.                 while (list($field_name$file_nameseach($formfiles)) {
    1754. -
    1755.                     settype($file_names"array");
    1756. -
    1757.                     while (list($file_nameeach($file_names)) {
    1758. -
    1759.                         if (!is_readable($file_name)) continue;
    1760. -
    1761.  
    1762. -
    1763.                         $fp fopen($file_name"r");
    1764. -
    1765.                         $file_content fread($fpfilesize($file_name));
    1766. -
    1767.                         fclose($fp);
    1768. -
    1769.                         $base_name basename($file_name);
    1770. -
    1771.  
    1772. -
    1773.                         $postdata .= "--".$this->_mime_boundary."\r\n";
    1774. -
    1775.                         $postdata .= "Content-Dispositionform-dataname=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
    1776. -
    1777.                         $postdata .= "$file_content\r\n";
    1778. -
    1779.                     }
    1780. -
    1781.                 }
    1782. -
    1783.                 $postdata .= "--".$this->_mime_boundary."--\r\n";
    1784. -
    1785.                 break;
    1786. -
    1787.         }
    1788. -
    1789.  
    1790. -
    1791.         return $postdata;
    1792. -
    1793.     }
    1794. -
    1795. }
    1796. -
    1797.  
    1798. -
    1799. ?>
    1800. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_cache.inc.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_cache.inc.html deleted file mode 100755 index 864abe3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_cache.inc.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - File Source for rss_cache.inc - - - - - -

    Source for file rss_cache.inc

    -

    Documentation is available at rss_cache.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_cache.inc, a simple, rolling(no GC), cache 
    8. -
    9.  *              for RSS objects, keyed on URL.
    10. -
    11.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    12. -
    13.  * Version:     0.51
    14. -
    15.  * License:     GPL
    16. -
    17.  *
    18. -
    19.  * The lastest version of MagpieRSS can be obtained from:
    20. -
    21.  * http://magpierss.sourceforge.net
    22. -
    23.  *
    24. -
    25.  * For questions, help, comments, discussion, etc., please join the
    26. -
    27.  * Magpie mailing list:
    28. -
    29.  * http://lists.sourceforge.net/lists/listinfo/magpierss-general
    30. -
    31.  *
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. class RSSCache {
    38. -
    39.     var $BASE_CACHE = './cache';    // where the cache files are stored
    40. -
    41.     var $MAX_AGE    = 3600;         // when are files stale, default one hour
    42. -
    43.     var $ERROR      = "";           // accumulate error messages
    44. -
    45.     
    46. -
    47.     function RSSCache ($base=''$age=''{
    48. -
    49.         if $base {
    50. -
    51.             $this->BASE_CACHE = $base;
    52. -
    53.         }
    54. -
    55.         if $age {
    56. -
    57.             $this->MAX_AGE = $age;
    58. -
    59.         }
    60. -
    61.         
    62. -
    63.         // attempt to make the cache directory
    64. -
    65.         if file_exists$this->BASE_CACHE ) ) {
    66. -
    67.             $status @mkdir$this->BASE_CACHE0755 );
    68. -
    69.             
    70. -
    71.             // if make failed 
    72. -
    73.             if $status {
    74. -
    75.                 $this->error(
    76. -
    77.                     "Cache couldn't make dir '" $this->BASE_CACHE . "'."
    78. -
    79.                 );
    80. -
    81.             }
    82. -
    83.         }
    84. -
    85.     }
    86. -
    87.     
    88. -
    89. /*=======================================================================*\
    90. -
    91.     Function:   set
    92. -
    93.     Purpose:    add an item to the cache, keyed on url
    94. -
    95.     Input:      url from wich the rss file was fetched
    96. -
    97.     Output:     true on sucess  
    98. -
    99. \*=======================================================================*/
    100. -
    101.     function set ($url$rss{
    102. -
    103.         $this->ERROR = "";
    104. -
    105.         $cache_file $this->file_name$url );
    106. -
    107.         $fp @fopen$cache_file'w' );
    108. -
    109.         
    110. -
    111.         if $fp {
    112. -
    113.             $this->error(
    114. -
    115.                 "Cache unable to open file for writing$cache_file"
    116. -
    117.             );
    118. -
    119.             return 0;
    120. -
    121.         }
    122. -
    123.         
    124. -
    125.         
    126. -
    127.         $data $this->serialize$rss );
    128. -
    129.         fwrite$fp$data );
    130. -
    131.         fclose$fp );
    132. -
    133.         
    134. -
    135.         return $cache_file;
    136. -
    137.     }
    138. -
    139.     
    140. -
    141. /*=======================================================================*\
    142. -
    143.     Function:   get
    144. -
    145.     Purpose:    fetch an item from the cache
    146. -
    147.     Input:      url from wich the rss file was fetched
    148. -
    149.     Output:     cached object on HIT, false on MISS 
    150. -
    151. \*=======================================================================*/ 
    152. -
    153.     function get ($url{
    154. -
    155.         $this->ERROR = "";
    156. -
    157.         $cache_file $this->file_name$url );
    158. -
    159.         
    160. -
    161.         if file_exists$cache_file ) ) {
    162. -
    163.             $this->debug
    164. -
    165.                 "Cache doesn't contain$url (cache file$cache_file)"
    166. -
    167.             );
    168. -
    169.             return 0;
    170. -
    171.         }
    172. -
    173.         
    174. -
    175.         $fp @fopen($cache_file'r');
    176. -
    177.         if $fp {
    178. -
    179.             $this->error(
    180. -
    181.                 "Failed to open cache file for reading$cache_file"
    182. -
    183.             );
    184. -
    185.             return 0;
    186. -
    187.         }
    188. -
    189.         
    190. -
    191.         if ($filesize filesize($cache_file) ) {
    192. -
    193.             $data fread$fpfilesize($cache_file) );
    194. -
    195.             $rss $this->unserialize$data );
    196. -
    197.         
    198. -
    199.             return $rss;
    200. -
    201.         }
    202. -
    203.         
    204. -
    205.         return 0;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211. /*=======================================================================*\
    212. -
    213.     Function:   check_cache
    214. -
    215.     Purpose:    check a url for membership in the cache
    216. -
    217.                 and whether the object is older then MAX_AGE (ie. STALE)
    218. -
    219.     Input:      url from wich the rss file was fetched
    220. -
    221.     Output:     cached object on HIT, false on MISS 
    222. -
    223. \*=======================================================================*/     
    224. -
    225.     function check_cache $url {
    226. -
    227.         $this->ERROR = "";
    228. -
    229.         $filename $this->file_name$url );
    230. -
    231.         
    232. -
    233.         if file_exists$filename ) ) {
    234. -
    235.             // find how long ago the file was added to the cache
    236. -
    237.             // and whether that is longer then MAX_AGE
    238. -
    239.             $mtime filemtime$filename );
    240. -
    241.             $age time($mtime;
    242. -
    243.             if $this->MAX_AGE > $age {
    244. -
    245.                 // object exists and is current
    246. -
    247.                 return 'HIT';
    248. -
    249.             }
    250. -
    251.             else {
    252. -
    253.                 // object exists but is old
    254. -
    255.                 return 'STALE';
    256. -
    257.             }
    258. -
    259.         }
    260. -
    261.         else {
    262. -
    263.             // object does not exist
    264. -
    265.             return 'MISS';
    266. -
    267.         }
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     function cache_age$cache_key {
    274. -
    275.         $filename $this->file_name$url );
    276. -
    277.         if file_exists$filename ) ) {
    278. -
    279.             $mtime filemtime$filename );
    280. -
    281.             $age time($mtime;
    282. -
    283.             return $age;
    284. -
    285.         }
    286. -
    287.         else {
    288. -
    289.             return -1;    
    290. -
    291.         }
    292. -
    293.     }
    294. -
    295.     
    296. -
    297. /*=======================================================================*\
    298. -
    299.     Function:   serialize
    300. -
    301. \*=======================================================================*/     
    302. -
    303.     function serialize $rss {
    304. -
    305.         return serialize$rss );
    306. -
    307.     }
    308. -
    309.  
    310. -
    311. /*=======================================================================*\
    312. -
    313.     Function:   unserialize
    314. -
    315. \*=======================================================================*/     
    316. -
    317.     function unserialize $data {
    318. -
    319.         return unserialize$data );
    320. -
    321.     }
    322. -
    323.     
    324. -
    325. /*=======================================================================*\
    326. -
    327.     Function:   file_name
    328. -
    329.     Purpose:    map url to location in cache
    330. -
    331.     Input:      url from wich the rss file was fetched
    332. -
    333.     Output:     a file name
    334. -
    335. \*=======================================================================*/     
    336. -
    337.     function file_name ($url{
    338. -
    339.         $filename md5$url );
    340. -
    341.         return joinDIRECTORY_SEPARATORarray$this->BASE_CACHE$filename ) );
    342. -
    343.     }
    344. -
    345.  
    346. -
    347. /*=======================================================================*\
    348. -
    349.     Function:   error
    350. -
    351.     Purpose:    register error
    352. -
    353. \*=======================================================================*/         
    354. -
    355.     function error ($errormsg$lvl=E_USER_WARNING{
    356. -
    357.         // append PHP's error message if track_errors enabled
    358. -
    359.         if isset($php_errormsg) ) 
    360. -
    361.             $errormsg .= " ($php_errormsg)";
    362. -
    363.         }
    364. -
    365.         $this->ERROR = $errormsg;
    366. -
    367.         if MAGPIE_DEBUG {
    368. -
    369.             trigger_error$errormsg$lvl);
    370. -
    371.         }
    372. -
    373.         else {
    374. -
    375.             error_log$errormsg0);
    376. -
    377.         }
    378. -
    379.     }
    380. -
    381.     
    382. -
    383.     function debug ($debugmsg$lvl=E_USER_NOTICE{
    384. -
    385.         if MAGPIE_DEBUG {
    386. -
    387.             $this->error("MagpieRSS [debug] $debugmsg"$lvl);
    388. -
    389.         }
    390. -
    391.     }
    392. -
    393.  
    394. -
    395. }
    396. -
    397.  
    398. -
    399. ?>
    400. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_fetch.inc.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_fetch.inc.html deleted file mode 100755 index 6c2f9472..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_fetch.inc.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - File Source for rss_fetch.inc - - - - - -

    Source for file rss_fetch.inc

    -

    Documentation is available at rss_fetch.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_fetch.inc, a simple functional interface
    8. -
    9.                 to fetching and parsing RSS files, via the
    10. -
    11.                 function fetch_rss()
    12. -
    13.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    14. -
    15.  * License:     GPL
    16. -
    17.  *
    18. -
    19.  * The lastest version of MagpieRSS can be obtained from:
    20. -
    21.  * http://magpierss.sourceforge.net
    22. -
    23.  *
    24. -
    25.  * For questions, help, comments, discussion, etc., please join the
    26. -
    27.  * Magpie mailing list:
    28. -
    29.  * magpierss-general@lists.sourceforge.net
    30. -
    31.  *
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. // Setup MAGPIE_DIR for use on hosts that don't include
    38. -
    39. // the current path in include_path.
    40. -
    41. // with thanks to rajiv and smarty
    42. -
    43. if (!defined('DIR_SEP')) {
    44. -
    45.     define('DIR_SEP'DIRECTORY_SEPARATOR);
    46. -
    47. }
    48. -
    49.  
    50. -
    51. if (!defined('MAGPIE_DIR')) {
    52. -
    53.     define('MAGPIE_DIR'dirname(__FILE__DIR_SEP);
    54. -
    55. }
    56. -
    57.  
    58. -
    59. require_onceMAGPIE_DIR 'rss_parse.inc' );
    60. -
    61. require_onceMAGPIE_DIR 'rss_cache.inc' );
    62. -
    63.  
    64. -
    65. // for including 3rd party libraries
    66. -
    67. define('MAGPIE_EXTLIB'MAGPIE_DIR 'extlib' DIR_SEP);
    68. -
    69. require_onceMAGPIE_EXTLIB 'Snoopy.class.inc');
    70. -
    71.  
    72. -
    73.  
    74. -
    75. /* 
    76. -
    77.  * CONSTANTS - redefine these in your script to change the
    78. -
    79.  * behaviour of fetch_rss() currently, most options effect the cache
    80. -
    81.  *
    82. -
    83.  * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? 
    84. -
    85.  * For me a built in cache was essential to creating a "PHP-like" 
    86. -
    87.  * feel to Magpie, see rss_cache.inc for rationale
    88. -
    89.  *
    90. -
    91.  *
    92. -
    93.  * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects?
    94. -
    95.  * This should be a location that the webserver can write to.   If this 
    96. -
    97.  * directory does not already exist Mapie will try to be smart and create 
    98. -
    99.  * it.  This will often fail for permissions reasons.
    100. -
    101.  *
    102. -
    103.  *
    104. -
    105.  * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds.
    106. -
    107.  *
    108. -
    109.  *
    110. -
    111.  * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error
    112. -
    113.  * instead of returning stale object?
    114. -
    115.  *
    116. -
    117.  * MAGPIE_DEBUG - Display debugging notices?
    118. -
    119.  *
    120. -
    121. */
    122. -
    123.  
    124. -
    125.  
    126. -
    127. /*=======================================================================*\
    128. -
    129.     Function: fetch_rss: 
    130. -
    131.     Purpose:  return RSS object for the give url
    132. -
    133.               maintain the cache
    134. -
    135.     Input:    url of RSS file
    136. -
    137.     Output:   parsed RSS object (see rss_parse.inc)
    138. -
    139.  
    140. -
    141.     NOTES ON CACHEING:  
    142. -
    143.     If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache.
    144. -
    145.     
    146. -
    147.     NOTES ON RETRIEVING REMOTE FILES:
    148. -
    149.     If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will
    150. -
    151.     return a cached object, and touch the cache object upon recieving a
    152. -
    153.     304.
    154. -
    155.     
    156. -
    157.     NOTES ON FAILED REQUESTS:
    158. -
    159.     If there is an HTTP error while fetching an RSS object, the cached
    160. -
    161.     version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
    162. -
    163. \*=======================================================================*/
    164. -
    165.  
    166. -
    167. define('MAGPIE_VERSION''0.72');
    168. -
    169.  
    170. -
    171. $MAGPIE_ERROR "";
    172. -
    173.  
    174. -
    175. function fetch_rss ($url{
    176. -
    177.     // initialize constants
    178. -
    179.     init();
    180. -
    181.     
    182. -
    183.     if !isset($url) ) {
    184. -
    185.         error("fetch_rss called without a url");
    186. -
    187.         return false;
    188. -
    189.     }
    190. -
    191.     
    192. -
    193.     // if cache is disabled
    194. -
    195.     if !MAGPIE_CACHE_ON {
    196. -
    197.         // fetch file, and parse it
    198. -
    199.         $resp _fetch_remote_file$url );
    200. -
    201.         if is_success$resp->status ) ) {
    202. -
    203.             return _response_to_rss$resp );
    204. -
    205.         }
    206. -
    207.         else {
    208. -
    209.             error("Failed to fetch $url and cache is off");
    210. -
    211.             return false;
    212. -
    213.         }
    214. -
    215.     
    216. -
    217.     // else cache is ON
    218. -
    219.     else {
    220. -
    221.         // Flow
    222. -
    223.         // 1. check cache
    224. -
    225.         // 2. if there is a hit, make sure its fresh
    226. -
    227.         // 3. if cached obj fails freshness check, fetch remote
    228. -
    229.         // 4. if remote fails, return stale object, or error
    230. -
    231.         
    232. -
    233.         $cache new RSSCacheMAGPIE_CACHE_DIRMAGPIE_CACHE_AGE );
    234. -
    235.         
    236. -
    237.         if (MAGPIE_DEBUG and $cache->ERROR{
    238. -
    239.             debug($cache->ERRORE_USER_WARNING);
    240. -
    241.         }
    242. -
    243.         
    244. -
    245.         
    246. -
    247.         $cache_status    0;       // response of check_cache
    248. -
    249.         $request_headers array()// HTTP headers to send with fetch
    250. -
    251.         $rss             0;       // parsed RSS object
    252. -
    253.         $errormsg        0;       // errors, if any
    254. -
    255.         
    256. -
    257.         // store parsed XML by desired output encoding
    258. -
    259.         // as character munging happens at parse time
    260. -
    261.         $cache_key       $url MAGPIE_OUTPUT_ENCODING;
    262. -
    263.         
    264. -
    265.         if (!$cache->ERROR{
    266. -
    267.             // return cache HIT, MISS, or STALE
    268. -
    269.             $cache_status $cache->check_cache$cache_key);
    270. -
    271.         }
    272. -
    273.                 
    274. -
    275.         // if object cached, and cache is fresh, return cached obj
    276. -
    277.         if $cache_status == 'HIT' {
    278. -
    279.             $rss $cache->get$cache_key );
    280. -
    281.             if isset($rssand $rss {
    282. -
    283.                 // should be cache age
    284. -
    285.                 $rss->from_cache 1;
    286. -
    287.                 if MAGPIE_DEBUG 1{
    288. -
    289.                     debug("MagpieRSS: Cache HIT"E_USER_NOTICE);
    290. -
    291.                 }
    292. -
    293.                 return $rss;
    294. -
    295.             }
    296. -
    297.         }
    298. -
    299.         
    300. -
    301.         // else attempt a conditional get
    302. -
    303.         
    304. -
    305.         // setup headers
    306. -
    307.         if $cache_status == 'STALE' {
    308. -
    309.             $rss $cache->get$cache_key );
    310. -
    311.             if $rss and $rss->etag and $rss->last_modified {
    312. -
    313.                 $request_headers['If-None-Match'$rss->etag;
    314. -
    315.                 $request_headers['If-Last-Modified'$rss->last_modified;
    316. -
    317.             }
    318. -
    319.         }
    320. -
    321.         
    322. -
    323.         $resp _fetch_remote_file$url$request_headers );
    324. -
    325.         
    326. -
    327.         if (isset($respand $resp{
    328. -
    329.           if ($resp->status == '304' {
    330. -
    331.                 // we have the most current copy
    332. -
    333.                 if MAGPIE_DEBUG 1{
    334. -
    335.                     debug("Got 304 for $url");
    336. -
    337.                 }
    338. -
    339.                 // reset cache on 304 (at minutillo insistent prodding)
    340. -
    341.                 $cache->set($cache_key$rss);
    342. -
    343.                 return $rss;
    344. -
    345.             }
    346. -
    347.             elseif is_success$resp->status ) ) {
    348. -
    349.                 $rss _response_to_rss$resp );
    350. -
    351.                 if $rss {
    352. -
    353.                     if (MAGPIE_DEBUG 1{
    354. -
    355.                         debug("Fetch successful");
    356. -
    357.                     }
    358. -
    359.                     // add object to cache
    360. -
    361.                     $cache->set$cache_key$rss );
    362. -
    363.                     return $rss;
    364. -
    365.                 }
    366. -
    367.             }
    368. -
    369.             else {
    370. -
    371.                 $errormsg "Failed to fetch $url ";
    372. -
    373.                 if $resp->status == '-100' {
    374. -
    375.                     $errormsg .= "(Request timed out after " MAGPIE_FETCH_TIME_OUT " seconds)";
    376. -
    377.                 }
    378. -
    379.                 elseif $resp->error {
    380. -
    381.                     # compensate for Snoopy's annoying habbit to tacking
    382. -
    383.                     # on '\n'
    384. -
    385.                     $http_error substr($resp->error0-2)
    386. -
    387.                     $errormsg .= "(HTTP Error$http_error)";
    388. -
    389.                 }
    390. -
    391.                 else {
    392. -
    393.                     $errormsg .=  "(HTTP Response: " $resp->response_code .')';
    394. -
    395.                 }
    396. -
    397.             }
    398. -
    399.         }
    400. -
    401.         else {
    402. -
    403.             $errormsg "Unable to retrieve RSS file for unknown reasons.";
    404. -
    405.         }
    406. -
    407.         
    408. -
    409.         // else fetch failed
    410. -
    411.         
    412. -
    413.         // attempt to return cached object
    414. -
    415.         if ($rss{
    416. -
    417.             if MAGPIE_DEBUG {
    418. -
    419.                 debug("Returning STALE object for $url");
    420. -
    421.             }
    422. -
    423.             return $rss;
    424. -
    425.         }
    426. -
    427.         
    428. -
    429.         // else we totally failed
    430. -
    431.         error$errormsg )
    432. -
    433.         
    434. -
    435.         return false;
    436. -
    437.         
    438. -
    439.     // end if ( !MAGPIE_CACHE_ON ) {
    440. -
    441. // end fetch_rss()
    442. -
    443.  
    444. -
    445. /*=======================================================================*\
    446. -
    447.     Function:   error
    448. -
    449.     Purpose:    set MAGPIE_ERROR, and trigger error
    450. -
    451. \*=======================================================================*/
    452. -
    453.  
    454. -
    455. function error ($errormsg$lvl=E_USER_WARNING{
    456. -
    457.         global $MAGPIE_ERROR;
    458. -
    459.         
    460. -
    461.         // append PHP's error message if track_errors enabled
    462. -
    463.         if isset($php_errormsg) ) 
    464. -
    465.             $errormsg .= " ($php_errormsg)";
    466. -
    467.         }
    468. -
    469.         if $errormsg {
    470. -
    471.             $errormsg "MagpieRSS$errormsg";
    472. -
    473.             $MAGPIE_ERROR $errormsg;
    474. -
    475.             trigger_error$errormsg$lvl);                
    476. -
    477.         }
    478. -
    479. }
    480. -
    481.  
    482. -
    483. function debug ($debugmsg$lvl=E_USER_NOTICE{
    484. -
    485.     trigger_error("MagpieRSS [debug] $debugmsg"$lvl);
    486. -
    487. }
    488. -
    489.             
    490. -
    491. /*=======================================================================*\
    492. -
    493.     Function:   magpie_error
    494. -
    495.     Purpose:    accessor for the magpie error variable
    496. -
    497. \*=======================================================================*/
    498. -
    499. function magpie_error ($errormsg=""{
    500. -
    501.     global $MAGPIE_ERROR;
    502. -
    503.     
    504. -
    505.     if isset($errormsgand $errormsg 
    506. -
    507.         $MAGPIE_ERROR $errormsg;
    508. -
    509.     }
    510. -
    511.     
    512. -
    513.     return $MAGPIE_ERROR;   
    514. -
    515. }
    516. -
    517.  
    518. -
    519. /*=======================================================================*\
    520. -
    521.     Function:   _fetch_remote_file
    522. -
    523.     Purpose:    retrieve an arbitrary remote file
    524. -
    525.     Input:      url of the remote file
    526. -
    527.                 headers to send along with the request (optional)
    528. -
    529.     Output:     an HTTP response object (see Snoopy.class.inc)  
    530. -
    531. \*=======================================================================*/
    532. -
    533. function _fetch_remote_file ($url$headers "" {
    534. -
    535.     // Snoopy is an HTTP client in PHP
    536. -
    537.     $client new Snoopy();
    538. -
    539.     $client->agent MAGPIE_USER_AGENT;
    540. -
    541.     $client->read_timeout MAGPIE_FETCH_TIME_OUT;
    542. -
    543.     $client->use_gzip MAGPIE_USE_GZIP;
    544. -
    545.     if (is_array($headers) ) {
    546. -
    547.         $client->rawheaders $headers;
    548. -
    549.     }
    550. -
    551.     
    552. -
    553.     @$client->fetch($url);
    554. -
    555.     return $client;
    556. -
    557.  
    558. -
    559. }
    560. -
    561.  
    562. -
    563. /*=======================================================================*\
    564. -
    565.     Function:   _response_to_rss
    566. -
    567.     Purpose:    parse an HTTP response object into an RSS object
    568. -
    569.     Input:      an HTTP response object (see Snoopy)
    570. -
    571.     Output:     parsed RSS object (see rss_parse)
    572. -
    573. \*=======================================================================*/
    574. -
    575. function _response_to_rss ($resp{
    576. -
    577.     $rss new MagpieRSS$resp->resultsMAGPIE_OUTPUT_ENCODINGMAGPIE_INPUT_ENCODINGMAGPIE_DETECT_ENCODING );
    578. -
    579.     
    580. -
    581.     // if RSS parsed successfully       
    582. -
    583.     if $rss and !$rss->ERROR{
    584. -
    585.         
    586. -
    587.         // find Etag, and Last-Modified
    588. -
    589.         foreach($resp->headers as $h{
    590. -
    591.             // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
    592. -
    593.             if (strpos($h": ")) {
    594. -
    595.                 list($field$valexplode(": "$h2);
    596. -
    597.             }
    598. -
    599.             else {
    600. -
    601.                 $field $h;
    602. -
    603.                 $val "";
    604. -
    605.             }
    606. -
    607.             
    608. -
    609.             if $field == 'ETag' {
    610. -
    611.                 $rss->etag $val;
    612. -
    613.             }
    614. -
    615.             
    616. -
    617.             if $field == 'Last-Modified' {
    618. -
    619.                 $rss->last_modified $val;
    620. -
    621.             }
    622. -
    623.         }
    624. -
    625.         
    626. -
    627.         return $rss;    
    628. -
    629.     // else construct error message
    630. -
    631.     else {
    632. -
    633.         $errormsg "Failed to parse RSS file.";
    634. -
    635.         
    636. -
    637.         if ($rss{
    638. -
    639.             $errormsg .= " (" $rss->ERROR ")";
    640. -
    641.         }
    642. -
    643.         error($errormsg);
    644. -
    645.         
    646. -
    647.         return false;
    648. -
    649.     // end if ($rss and !$rss->error)
    650. -
    651. }
    652. -
    653.  
    654. -
    655. /*=======================================================================*\
    656. -
    657.     Function:   init
    658. -
    659.     Purpose:    setup constants with default values
    660. -
    661.                 check for user overrides
    662. -
    663. \*=======================================================================*/
    664. -
    665. function init ({
    666. -
    667.     if defined('MAGPIE_INITALIZED') ) {
    668. -
    669.         return;
    670. -
    671.     }
    672. -
    673.     else {
    674. -
    675.         define('MAGPIE_INITALIZED'true);
    676. -
    677.     }
    678. -
    679.     
    680. -
    681.     if !defined('MAGPIE_CACHE_ON') ) {
    682. -
    683.         define('MAGPIE_CACHE_ON'true);
    684. -
    685.     }
    686. -
    687.  
    688. -
    689.     if !defined('MAGPIE_CACHE_DIR') ) {
    690. -
    691.         define('MAGPIE_CACHE_DIR''./cache');
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.     if !defined('MAGPIE_CACHE_AGE') ) {
    698. -
    699.         define('MAGPIE_CACHE_AGE'60*60)// one hour
    700. -
    701.     }
    702. -
    703.  
    704. -
    705.     if !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
    706. -
    707.         define('MAGPIE_CACHE_FRESH_ONLY'false);
    708. -
    709.     }
    710. -
    711.  
    712. -
    713.     if !defined('MAGPIE_OUTPUT_ENCODING') ) {
    714. -
    715.         define('MAGPIE_OUTPUT_ENCODING''ISO-8859-1');
    716. -
    717.     }
    718. -
    719.     
    720. -
    721.     if !defined('MAGPIE_INPUT_ENCODING') ) {
    722. -
    723.         define('MAGPIE_INPUT_ENCODING'null);
    724. -
    725.     }
    726. -
    727.     
    728. -
    729.     if !defined('MAGPIE_DETECT_ENCODING') ) {
    730. -
    731.         define('MAGPIE_DETECT_ENCODING'true);
    732. -
    733.     }
    734. -
    735.     
    736. -
    737.     if !defined('MAGPIE_DEBUG') ) {
    738. -
    739.         define('MAGPIE_DEBUG'0);
    740. -
    741.     }
    742. -
    743.     
    744. -
    745.     if !defined('MAGPIE_USER_AGENT') ) {
    746. -
    747.         $ua 'MagpieRSS/'MAGPIE_VERSION ' (+http://magpierss.sf.net';
    748. -
    749.         
    750. -
    751.         if MAGPIE_CACHE_ON {
    752. -
    753.             $ua $ua ')';
    754. -
    755.         }
    756. -
    757.         else {
    758. -
    759.             $ua $ua '; No cache)';
    760. -
    761.         }
    762. -
    763.         
    764. -
    765.         define('MAGPIE_USER_AGENT'$ua);
    766. -
    767.     }
    768. -
    769.     
    770. -
    771.     if !defined('MAGPIE_FETCH_TIME_OUT') ) {
    772. -
    773.         define('MAGPIE_FETCH_TIME_OUT'5)// 5 second timeout
    774. -
    775.     }
    776. -
    777.     
    778. -
    779.     // use gzip encoding to fetch rss files if supported?
    780. -
    781.     if !defined('MAGPIE_USE_GZIP') ) {
    782. -
    783.         define('MAGPIE_USE_GZIP'true);    
    784. -
    785.     }
    786. -
    787. }
    788. -
    789.  
    790. -
    791. // NOTE: the following code should really be in Snoopy, or at least
    792. -
    793. // somewhere other then rss_fetch!
    794. -
    795.  
    796. -
    797. /*=======================================================================*\
    798. -
    799.     HTTP STATUS CODE PREDICATES
    800. -
    801.     These functions attempt to classify an HTTP status code
    802. -
    803.     based on RFC 2616 and RFC 2518.
    804. -
    805.     
    806. -
    807.     All of them take an HTTP status code as input, and return true or false
    808. -
    809.  
    810. -
    811.     All this code is adapted from LWP's HTTP::Status.
    812. -
    813. \*=======================================================================*/
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /*=======================================================================*\
    820. -
    821.     Function:   is_info
    822. -
    823.     Purpose:    return true if Informational status code
    824. -
    825. \*=======================================================================*/
    826. -
    827. function is_info ($sc
    828. -
    829.     return $sc >= 100 && $sc 200
    830. -
    831. }
    832. -
    833.  
    834. -
    835. /*=======================================================================*\
    836. -
    837.     Function:   is_success
    838. -
    839.     Purpose:    return true if Successful status code
    840. -
    841. \*=======================================================================*/
    842. -
    843. function is_success ($sc
    844. -
    845.     return $sc >= 200 && $sc 300
    846. -
    847. }
    848. -
    849.  
    850. -
    851. /*=======================================================================*\
    852. -
    853.     Function:   is_redirect
    854. -
    855.     Purpose:    return true if Redirection status code
    856. -
    857. \*=======================================================================*/
    858. -
    859. function is_redirect ($sc
    860. -
    861.     return $sc >= 300 && $sc 400
    862. -
    863. }
    864. -
    865.  
    866. -
    867. /*=======================================================================*\
    868. -
    869.     Function:   is_error
    870. -
    871.     Purpose:    return true if Error status code
    872. -
    873. \*=======================================================================*/
    874. -
    875. function is_error ($sc
    876. -
    877.     return $sc >= 400 && $sc 600
    878. -
    879. }
    880. -
    881.  
    882. -
    883. /*=======================================================================*\
    884. -
    885.     Function:   is_client_error
    886. -
    887.     Purpose:    return true if Error status code, and its a client error
    888. -
    889. \*=======================================================================*/
    890. -
    891. function is_client_error ($sc
    892. -
    893.     return $sc >= 400 && $sc 500
    894. -
    895. }
    896. -
    897.  
    898. -
    899. /*=======================================================================*\
    900. -
    901.     Function:   is_client_error
    902. -
    903.     Purpose:    return true if Error status code, and its a server error
    904. -
    905. \*=======================================================================*/
    906. -
    907. function is_server_error ($sc
    908. -
    909.     return $sc >= 500 && $sc 600
    910. -
    911. }
    912. -
    913.  
    914. -
    915. ?>
    916. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:09 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_parse.inc.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_parse.inc.html deleted file mode 100755 index a60c34e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_parse.inc.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - - - File Source for rss_parse.inc - - - - - -

    Source for file rss_parse.inc

    -

    Documentation is available at rss_parse.inc

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. * Project:     MagpieRSS: a simple RSS integration tool
    8. -
    9. * File:        rss_parse.inc  - parse an RSS or Atom feed
    10. -
    11. *               return as a simple object.
    12. -
    13. *
    14. -
    15. * Handles RSS 0.9x, RSS 2.0, RSS 1.0, and Atom 0.3
    16. -
    17. *
    18. -
    19. * The lastest version of MagpieRSS can be obtained from:
    20. -
    21. * http://magpierss.sourceforge.net
    22. -
    23. *
    24. -
    25. * For questions, help, comments, discussion, etc., please join the
    26. -
    27. * Magpie mailing list:
    28. -
    29. * magpierss-general@lists.sourceforge.net
    30. -
    31. *
    32. -
    33. @author           Kellan Elliott-McCrea <kellan@protest.net>
    34. -
    35. @version          0.7a
    36. -
    37. @license          GPL
    38. -
    39. *
    40. -
    41. */
    42. -
    43.  
    44. -
    45. define('RSS''RSS');
    46. -
    47. define('ATOM''Atom');
    48. -
    49.  
    50. -
    51. require_once (MAGPIE_DIR 'rss_utils.inc');
    52. -
    53.  
    54. -
    55. /**
    56. -
    57. * Hybrid parser, and object, takes RSS as a string and returns a simple object.
    58. -
    59. *
    60. -
    61. * see: rss_fetch.inc for a simpler interface with integrated caching support
    62. -
    63. *
    64. -
    65. */
    66. -
    67. class MagpieRSS {
    68. -
    69.     var $parser;
    70. -
    71.     
    72. -
    73.     var $current_item   = array();  // item currently being parsed
    74. -
    75.     var $items          = array();  // collection of parsed items
    76. -
    77.     var $channel        = array();  // hash of channel fields
    78. -
    79.     var $textinput      = array();
    80. -
    81.     var $image          = array();
    82. -
    83.     var $feed_type;
    84. -
    85.     var $feed_version;
    86. -
    87.     var $encoding       = '';       // output encoding of parsed rss
    88. -
    89.     
    90. -
    91.     var $_source_encoding = '';     // only set if we have to parse xml prolog
    92. -
    93.     
    94. -
    95.     var $ERROR = "";
    96. -
    97.     var $WARNING = "";
    98. -
    99.     
    100. -
    101.     // define some constants
    102. -
    103.     
    104. -
    105.     var $_CONTENT_CONSTRUCTS = array('content''summary''info''title''tagline''copyright');
    106. -
    107.     var $_KNOWN_ENCODINGS    = array('UTF-8''US-ASCII''ISO-8859-1');
    108. -
    109.  
    110. -
    111.     // parser variables, useless if you're not a parser, treat as private
    112. -
    113.     var $stack              = array()// parser stack
    114. -
    115.     var $inchannel          = false;
    116. -
    117.     var $initem             = false;
    118. -
    119.     var $incontent          = false// if in Atom <content mode="xml"> field 
    120. -
    121.     var $intextinput        = false;
    122. -
    123.     var $inimage            = false;
    124. -
    125.     var $current_namespace  = false;
    126. -
    127.     
    128. -
    129.  
    130. -
    131.     /**
    132. -
    133.      *  Set up XML parser, parse source, and return populated RSS object..
    134. -
    135.      *   
    136. -
    137.      *  @param string $source           string containing the RSS to be parsed
    138. -
    139.      *
    140. -
    141.      *   NOTE:  Probably a good idea to leave the encoding options alone unless
    142. -
    143.      *          you know what you're doing as PHP's character set support is
    144. -
    145.      *          a little weird.
    146. -
    147.      *
    148. -
    149.      *   NOTE:  A lot of this is unnecessary but harmless with PHP5
    150. -
    151.      *
    152. -
    153.      *
    154. -
    155.      *  @param string $output_encoding  output the parsed RSS in this character
    156. -
    157.      *                                   set defaults to ISO-8859-1 as this is PHP's
    158. -
    159.      *                                   default.
    160. -
    161.      *
    162. -
    163.      *                                   NOTE: might be changed to UTF-8 in future
    164. -
    165.      *                                   versions.
    166. -
    167.      *                               
    168. -
    169.      *  @param string $input_encoding   the character set of the incoming RSS source.
    170. -
    171.      *                                   Leave blank and Magpie will try to figure it
    172. -
    173.      *                                   out.
    174. -
    175.      *                                  
    176. -
    177.      *                                   
    178. -
    179.      *  @param bool   $detect_encoding  if false Magpie won't attempt to detect
    180. -
    181.      *                                   source encoding. (caveat emptor)
    182. -
    183.      *
    184. -
    185.      */
    186. -
    187.     function MagpieRSS ($source$output_encoding='ISO-8859-1'
    188. -
    189.                         $input_encoding=null$detect_encoding=true
    190. -
    191.     {   
    192. -
    193.         # if PHP xml isn't compiled in, die
    194. -
    195.         #
    196. -
    197.         if (!function_exists('xml_parser_create')) {
    198. -
    199.             $this->error"Failed to load PHP's XML Extension. " 
    200. -
    201.                           "http://www.php.net/manual/en/ref.xml.php",
    202. -
    203.                            E_USER_ERROR );
    204. -
    205.         }
    206. -
    207.         
    208. -
    209.         list($parser$source$this->create_parser($source
    210. -
    211.                 $output_encoding$input_encoding$detect_encoding);
    212. -
    213.         
    214. -
    215.         
    216. -
    217.         if (!is_resource($parser)) {
    218. -
    219.             $this->error"Failed to create an instance of PHP's XML parser. " .
    220. -
    221.                           "http://www.php.net/manual/en/ref.xml.php",
    222. -
    223.                           E_USER_ERROR );
    224. -
    225.         }
    226. -
    227.  
    228. -
    229.         
    230. -
    231.         $this->parser = $parser;
    232. -
    233.         
    234. -
    235.         # pass in parser, and a reference to this object
    236. -
    237.         # setup handlers
    238. -
    239.         #
    240. -
    241.         xml_set_object$this->parser$this );
    242. -
    243.         xml_set_element_handler($this->parser
    244. -
    245.                 'feed_start_element''feed_end_element' );
    246. -
    247.                         
    248. -
    249.         xml_set_character_data_handler$this->parser'feed_cdata' )
    250. -
    251.     
    252. -
    253.         $status xml_parse$this->parser$source );
    254. -
    255.         
    256. -
    257.         if ($status {
    258. -
    259.             $errorcode xml_get_error_code$this->parser );
    260. -
    261.             if $errorcode != XML_ERROR_NONE {
    262. -
    263.                 $xml_error xml_error_string$errorcode );
    264. -
    265.                 $error_line xml_get_current_line_number($this->parser);
    266. -
    267.                 $error_col xml_get_current_column_number($this->parser);
    268. -
    269.                 $errormsg "$xml_error at line $error_linecolumn $error_col";
    270. -
    271.  
    272. -
    273.                 $this->error$errormsg );
    274. -
    275.             }
    276. -
    277.         }
    278. -
    279.         
    280. -
    281.         xml_parser_free$this->parser );
    282. -
    283.  
    284. -
    285.         $this->normalize();
    286. -
    287.     }
    288. -
    289.     
    290. -
    291.     function feed_start_element($p$element&$attrs{
    292. -
    293.         $el $element strtolower($element);
    294. -
    295.         $attrs array_change_key_case($attrsCASE_LOWER);
    296. -
    297.         
    298. -
    299.         // check for a namespace, and split if found
    300. -
    301.         $ns false;
    302. -
    303.         if strpos$element':' ) ) {
    304. -
    305.             list($ns$elsplit':'$element2)
    306. -
    307.         }
    308. -
    309.         if $ns and $ns != 'rdf' {
    310. -
    311.             $this->current_namespace = $ns;
    312. -
    313.         }
    314. -
    315.             
    316. -
    317.         # if feed type isn't set, then this is first element of feed
    318. -
    319.         # identify feed from root element
    320. -
    321.         #
    322. -
    323.         if (!isset($this->feed_type) ) {
    324. -
    325.             if $el == 'rdf' {
    326. -
    327.                 $this->feed_type = RSS;
    328. -
    329.                 $this->feed_version = '1.0';
    330. -
    331.             }
    332. -
    333.             elseif $el == 'rss' {
    334. -
    335.                 $this->feed_type = RSS;
    336. -
    337.                 $this->feed_version = $attrs['version'];
    338. -
    339.             }
    340. -
    341.             elseif $el == 'feed' {
    342. -
    343.                 $this->feed_type = ATOM;
    344. -
    345.                 $this->feed_version = $attrs['version'];
    346. -
    347.                 $this->inchannel = true;
    348. -
    349.             }
    350. -
    351.             return;
    352. -
    353.         }
    354. -
    355.     
    356. -
    357.         if $el == 'channel' 
    358. -
    359.         {
    360. -
    361.             $this->inchannel = true;
    362. -
    363.         }
    364. -
    365.         elseif ($el == 'item' or $el == 'entry' 
    366. -
    367.         {
    368. -
    369.             $this->initem = true;
    370. -
    371.             if isset($attrs['rdf:about']) ) {
    372. -
    373.                 $this->current_item['about'$attrs['rdf:about']
    374. -
    375.             }
    376. -
    377.         }
    378. -
    379.         
    380. -
    381.         // if we're in the default namespace of an RSS feed,
    382. -
    383.         //  record textinput or image fields
    384. -
    385.         elseif 
    386. -
    387.             $this->feed_type == RSS and 
    388. -
    389.             $this->current_namespace == '' and 
    390. -
    391.             $el == 'textinput' 
    392. -
    393.         {
    394. -
    395.             $this->intextinput = true;
    396. -
    397.         }
    398. -
    399.         
    400. -
    401.         elseif (
    402. -
    403.             $this->feed_type == RSS and 
    404. -
    405.             $this->current_namespace == '' and 
    406. -
    407.             $el == 'image' 
    408. -
    409.         {
    410. -
    411.             $this->inimage = true;
    412. -
    413.         }
    414. -
    415.         
    416. -
    417.         # handle atom content constructs
    418. -
    419.         elseif $this->feed_type == ATOM and in_array($el$this->_CONTENT_CONSTRUCTS) )
    420. -
    421.         {
    422. -
    423.             // avoid clashing w/ RSS mod_content
    424. -
    425.             if ($el == 'content' {
    426. -
    427.                 $el 'atom_content';
    428. -
    429.             }
    430. -
    431.             
    432. -
    433.             $this->incontent = $el;
    434. -
    435.             
    436. -
    437.             
    438. -
    439.         }
    440. -
    441.         
    442. -
    443.         // if inside an Atom content construct (e.g. content or summary) field treat tags as text
    444. -
    445.         elseif ($this->feed_type == ATOM and $this->incontent 
    446. -
    447.         {
    448. -
    449.             // if tags are inlined, then flatten
    450. -
    451.             $attrs_str join(' '
    452. -
    453.                     array_map('map_attrs'
    454. -
    455.                     array_keys($attrs)
    456. -
    457.                     array_values($attrs) ) );
    458. -
    459.             
    460. -
    461.             $this->append_content"<$element $attrs_str>"  );
    462. -
    463.                     
    464. -
    465.             array_unshift$this->stack$el );
    466. -
    467.         }
    468. -
    469.         
    470. -
    471.         // Atom support many links per containging element.
    472. -
    473.         // Magpie treats link elements of type rel='alternate'
    474. -
    475.         // as being equivalent to RSS's simple link element.
    476. -
    477.         //
    478. -
    479.         elseif ($this->feed_type == ATOM and $el == 'link' 
    480. -
    481.         {
    482. -
    483.             if isset($attrs['rel']and $attrs['rel'== 'alternate' 
    484. -
    485.             {
    486. -
    487.                 $link_el 'link';
    488. -
    489.             }
    490. -
    491.             else {
    492. -
    493.                 $link_el 'link_' $attrs['rel'];
    494. -
    495.             }
    496. -
    497.             
    498. -
    499.             $this->append($link_el$attrs['href']);
    500. -
    501.         }
    502. -
    503.         // set stack[0] to current element
    504. -
    505.         else {
    506. -
    507.             array_unshift($this->stack$el);
    508. -
    509.         }
    510. -
    511.     }
    512. -
    513.     
    514. -
    515.  
    516. -
    517.     
    518. -
    519.     function feed_cdata ($p$text{
    520. -
    521.         if ($this->feed_type == ATOM and $this->incontent
    522. -
    523.         {
    524. -
    525.             $this->append_content$text );
    526. -
    527.         }
    528. -
    529.         else {
    530. -
    531.             $current_el join('_'array_reverse($this->stack));
    532. -
    533.             $this->append($current_el$text);
    534. -
    535.         }
    536. -
    537.     }
    538. -
    539.     
    540. -
    541.     function feed_end_element ($p$el{
    542. -
    543.         $el strtolower($el);
    544. -
    545.         
    546. -
    547.         if $el == 'item' or $el == 'entry' 
    548. -
    549.         {
    550. -
    551.             $this->items[$this->current_item;
    552. -
    553.             $this->current_item = array();
    554. -
    555.             $this->initem = false;
    556. -
    557.         }
    558. -
    559.         elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' 
    560. -
    561.         {
    562. -
    563.             $this->intextinput = false;
    564. -
    565.         }
    566. -
    567.         elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' 
    568. -
    569.         {
    570. -
    571.             $this->inimage = false;
    572. -
    573.         }
    574. -
    575.         elseif ($this->feed_type == ATOM and in_array($el$this->_CONTENT_CONSTRUCTS) )
    576. -
    577.         {   
    578. -
    579.             $this->incontent = false;
    580. -
    581.         }
    582. -
    583.         elseif ($el == 'channel' or $el == 'feed' 
    584. -
    585.         {
    586. -
    587.             $this->inchannel = false;
    588. -
    589.         }
    590. -
    591.         elseif ($this->feed_type == ATOM and $this->incontent  {
    592. -
    593.             // balance tags properly
    594. -
    595.             // note:  i don't think this is actually neccessary
    596. -
    597.             if $this->stack[0== $el 
    598. -
    599.             {
    600. -
    601.                 $this->append_content("</$el>");
    602. -
    603.             }
    604. -
    605.             else {
    606. -
    607.                 $this->append_content("<$el />");
    608. -
    609.             }
    610. -
    611.  
    612. -
    613.             array_shift$this->stack );
    614. -
    615.         }
    616. -
    617.         else {
    618. -
    619.             array_shift$this->stack );
    620. -
    621.         }
    622. -
    623.         
    624. -
    625.         $this->current_namespace = false;
    626. -
    627.     }
    628. -
    629.     
    630. -
    631.     function concat (&$str1$str2=""{
    632. -
    633.         if (!isset($str1) ) {
    634. -
    635.             $str1="";
    636. -
    637.         }
    638. -
    639.         $str1 .= $str2;
    640. -
    641.     }
    642. -
    643.     
    644. -
    645.     
    646. -
    647.     
    648. -
    649.     function append_content($text{
    650. -
    651.         if $this->initem {
    652. -
    653.             $this->concat$this->current_item$this->incontent ]$text );
    654. -
    655.         }
    656. -
    657.         elseif $this->inchannel {
    658. -
    659.             $this->concat$this->channel$this->incontent ]$text );
    660. -
    661.         }
    662. -
    663.     }
    664. -
    665.     
    666. -
    667.     // smart append - field and namespace aware
    668. -
    669.     function append($el$text{
    670. -
    671.         if (!$el{
    672. -
    673.             return;
    674. -
    675.         }
    676. -
    677.         if $this->current_namespace 
    678. -
    679.         {
    680. -
    681.             if $this->initem {
    682. -
    683.                 $this->concat(
    684. -
    685.                     $this->current_item$this->current_namespace ]$el ]$text);
    686. -
    687.             }
    688. -
    689.             elseif ($this->inchannel{
    690. -
    691.                 $this->concat(
    692. -
    693.                     $this->channel$this->current_namespace]$el ]$text );
    694. -
    695.             }
    696. -
    697.             elseif ($this->intextinput{
    698. -
    699.                 $this->concat(
    700. -
    701.                     $this->textinput$this->current_namespace]$el ]$text );
    702. -
    703.             }
    704. -
    705.             elseif ($this->inimage{
    706. -
    707.                 $this->concat(
    708. -
    709.                     $this->image$this->current_namespace ]$el ]$text );
    710. -
    711.             }
    712. -
    713.         }
    714. -
    715.         else {
    716. -
    717.             if $this->initem {
    718. -
    719.                 $this->concat(
    720. -
    721.                     $this->current_item$el ]$text);
    722. -
    723.             }
    724. -
    725.             elseif ($this->intextinput{
    726. -
    727.                 $this->concat(
    728. -
    729.                     $this->textinput$el ]$text );
    730. -
    731.             }
    732. -
    733.             elseif ($this->inimage{
    734. -
    735.                 $this->concat(
    736. -
    737.                     $this->image$el ]$text );
    738. -
    739.             }
    740. -
    741.             elseif ($this->inchannel{
    742. -
    743.                 $this->concat(
    744. -
    745.                     $this->channel$el ]$text );
    746. -
    747.             }
    748. -
    749.             
    750. -
    751.         }
    752. -
    753.     }
    754. -
    755.     
    756. -
    757.     function normalize ({
    758. -
    759.         // if atom populate rss fields
    760. -
    761.         if $this->is_atom() ) {
    762. -
    763.             $this->channel['description'$this->channel['tagline'];
    764. -
    765.             for $i 0$i count($this->items)$i++{
    766. -
    767.                 $item $this->items[$i];
    768. -
    769.                 if isset($item['summary']) )
    770. -
    771.                     $item['description'$item['summary'];
    772. -
    773.                 if isset($item['atom_content']))
    774. -
    775.                     $item['content']['encoded'$item['atom_content'];
    776. -
    777.                 
    778. -
    779.                 $atom_date (isset($item['issued']) ) $item['issued'$item['modified'];
    780. -
    781.                 if $atom_date {
    782. -
    783.                     $epoch @parse_w3cdtf($atom_date);
    784. -
    785.                     if ($epoch and $epoch 0{
    786. -
    787.                         $item['date_timestamp'$epoch;
    788. -
    789.                     }
    790. -
    791.                 }
    792. -
    793.                 
    794. -
    795.                 $this->items[$i$item;
    796. -
    797.             }       
    798. -
    799.         }
    800. -
    801.         elseif $this->is_rss() ) {
    802. -
    803.             $this->channel['tagline'$this->channel['description'];
    804. -
    805.             for $i 0$i count($this->items)$i++{
    806. -
    807.                 $item $this->items[$i];
    808. -
    809.                 if isset($item['description']))
    810. -
    811.                     $item['summary'$item['description'];
    812. -
    813.                 if isset($item['content']['encoded') )
    814. -
    815.                     $item['atom_content'$item['content']['encoded'];
    816. -
    817.                 
    818. -
    819.                 if $this->is_rss(== '1.0' and isset($item['dc']['date']) ) {
    820. -
    821.                     $epoch @parse_w3cdtf($item['dc']['date']);
    822. -
    823.                     if ($epoch and $epoch 0{
    824. -
    825.                         $item['date_timestamp'$epoch;
    826. -
    827.                     }
    828. -
    829.                 }
    830. -
    831.                 elseif isset($item['pubdate']) ) {
    832. -
    833.                     $epoch @strtotime($item['pubdate']);
    834. -
    835.                     if ($epoch 0{
    836. -
    837.                         $item['date_timestamp'$epoch;
    838. -
    839.                     }
    840. -
    841.                 }
    842. -
    843.                 
    844. -
    845.                 $this->items[$i$item;
    846. -
    847.             }
    848. -
    849.         }
    850. -
    851.     }
    852. -
    853.     
    854. -
    855.     
    856. -
    857.     function is_rss ({
    858. -
    859.         if $this->feed_type == RSS {
    860. -
    861.             return $this->feed_version
    862. -
    863.         }
    864. -
    865.         else {
    866. -
    867.             return false;
    868. -
    869.         }
    870. -
    871.     }
    872. -
    873.     
    874. -
    875.     function is_atom({
    876. -
    877.         if $this->feed_type == ATOM {
    878. -
    879.             return $this->feed_version;
    880. -
    881.         }
    882. -
    883.         else {
    884. -
    885.             return false;
    886. -
    887.         }
    888. -
    889.     }
    890. -
    891.  
    892. -
    893.     /**
    894. -
    895.     * return XML parser, and possibly re-encoded source
    896. -
    897.     *
    898. -
    899.     */
    900. -
    901.     function create_parser($source$out_enc$in_enc$detect{
    902. -
    903.         if substr(phpversion(),0,1== 5{
    904. -
    905.             $parser $this->php5_create_parser($in_enc$detect);
    906. -
    907.         }
    908. -
    909.         else {
    910. -
    911.             list($parser$source$this->php4_create_parser($source$in_enc$detect);
    912. -
    913.         }
    914. -
    915.         if ($out_enc{
    916. -
    917.             $this->encoding = $out_enc;
    918. -
    919.             xml_parser_set_option($parserXML_OPTION_TARGET_ENCODING$out_enc);
    920. -
    921.         }
    922. -
    923.         
    924. -
    925.         return array($parser$source);
    926. -
    927.     }
    928. -
    929.     
    930. -
    931.     /**
    932. -
    933.     * Instantiate an XML parser under PHP5
    934. -
    935.     *
    936. -
    937.     * PHP5 will do a fine job of detecting input encoding
    938. -
    939.     * if passed an empty string as the encoding.
    940. -
    941.     *
    942. -
    943.     * All hail libxml2!
    944. -
    945.     *
    946. -
    947.     */
    948. -
    949.     function php5_create_parser($in_enc$detect{
    950. -
    951.         // by default php5 does a fine job of detecting input encodings
    952. -
    953.         if(!$detect && $in_enc{
    954. -
    955.             return xml_parser_create($in_enc);
    956. -
    957.         }
    958. -
    959.         else {
    960. -
    961.             return xml_parser_create('');
    962. -
    963.         }
    964. -
    965.     }
    966. -
    967.     
    968. -
    969.     /**
    970. -
    971.     * Instaniate an XML parser under PHP4
    972. -
    973.     *
    974. -
    975.     * Unfortunately PHP4's support for character encodings
    976. -
    977.     * and especially XML and character encodings sucks.  As
    978. -
    979.     * long as the documents you parse only contain characters
    980. -
    981.     * from the ISO-8859-1 character set (a superset of ASCII,
    982. -
    983.     * and a subset of UTF-8) you're fine.  However once you
    984. -
    985.     * step out of that comfy little world things get mad, bad,
    986. -
    987.     * and dangerous to know.
    988. -
    989.     *
    990. -
    991.     * The following code is based on SJM's work with FoF
    992. -
    993.     * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
    994. -
    995.     *
    996. -
    997.     */
    998. -
    999.     function php4_create_parser($source$in_enc$detect{
    1000. -
    1001.         if !$detect {
    1002. -
    1003.             return array(xml_parser_create($in_enc)$source);
    1004. -
    1005.         }
    1006. -
    1007.         
    1008. -
    1009.         if (!$in_enc{
    1010. -
    1011.             if (preg_match('/<?xml.*encoding=[\'"](.*?)[\'"].*?>/m'$source$m)) {
    1012. -
    1013.                 $in_enc strtoupper($m[1]);
    1014. -
    1015.                 $this->source_encoding $in_enc;
    1016. -
    1017.             }
    1018. -
    1019.             else {
    1020. -
    1021.                 $in_enc 'UTF-8';
    1022. -
    1023.             }
    1024. -
    1025.         }
    1026. -
    1027.         
    1028. -
    1029.         if ($this->known_encoding($in_enc)) {
    1030. -
    1031.             return array(xml_parser_create($in_enc)$source);
    1032. -
    1033.         }
    1034. -
    1035.         
    1036. -
    1037.         // the dectected encoding is not one of the simple encodings PHP knows
    1038. -
    1039.         
    1040. -
    1041.         // attempt to use the iconv extension to
    1042. -
    1043.         // cast the XML to a known encoding
    1044. -
    1045.         // @see http://php.net/iconv
    1046. -
    1047.        
    1048. -
    1049.         if (function_exists('iconv'))  {
    1050. -
    1051.             $encoded_source iconv($in_enc,'UTF-8'$source);
    1052. -
    1053.             if ($encoded_source{
    1054. -
    1055.                 return array(xml_parser_create('UTF-8')$encoded_source);
    1056. -
    1057.             }
    1058. -
    1059.         }
    1060. -
    1061.         
    1062. -
    1063.         // iconv didn't work, try mb_convert_encoding
    1064. -
    1065.         // @see http://php.net/mbstring
    1066. -
    1067.         if(function_exists('mb_convert_encoding')) {
    1068. -
    1069.             $encoded_source mb_convert_encoding($source'UTF-8'$in_enc );
    1070. -
    1071.             if ($encoded_source{
    1072. -
    1073.                 return array(xml_parser_create('UTF-8')$encoded_source);
    1074. -
    1075.             }
    1076. -
    1077.         }
    1078. -
    1079.         
    1080. -
    1081.         // else 
    1082. -
    1083.         $this->error("Feed is in an unsupported character encoding. ($in_enc.
    1084. -
    1085.                      "You may see strange artifacts, and mangled characters.",
    1086. -
    1087.                      E_USER_NOTICE);
    1088. -
    1089.             
    1090. -
    1091.         return array(xml_parser_create()$source);
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     function known_encoding($enc{
    1098. -
    1099.         $enc strtoupper($enc);
    1100. -
    1101.         if in_array($enc$this->_KNOWN_ENCODINGS) ) {
    1102. -
    1103.             return $enc;
    1104. -
    1105.         }
    1106. -
    1107.         else {
    1108. -
    1109.             return false;
    1110. -
    1111.         }
    1112. -
    1113.     }
    1114. -
    1115.  
    1116. -
    1117.     function error ($errormsg$lvl=E_USER_WARNING{
    1118. -
    1119.         // append PHP's error message if track_errors enabled
    1120. -
    1121.         if isset($php_errormsg) ) 
    1122. -
    1123.             $errormsg .= " ($php_errormsg)";
    1124. -
    1125.         }
    1126. -
    1127.         if MAGPIE_DEBUG {
    1128. -
    1129.             trigger_error$errormsg$lvl);        
    1130. -
    1131.         }
    1132. -
    1133.         else {
    1134. -
    1135.             error_log$errormsg0);
    1136. -
    1137.         }
    1138. -
    1139.         
    1140. -
    1141.         $notices E_USER_NOTICE|E_NOTICE;
    1142. -
    1143.         if $lvl&$notices {
    1144. -
    1145.             $this->WARNING = $errormsg;
    1146. -
    1147.         else {
    1148. -
    1149.             $this->ERROR = $errormsg;
    1150. -
    1151.         }
    1152. -
    1153.     }
    1154. -
    1155.     
    1156. -
    1157.     
    1158. -
    1159. // end class RSS
    1160. -
    1161.  
    1162. -
    1163. function map_attrs($k$v{
    1164. -
    1165.     return "$k=\"$v\"";
    1166. -
    1167. }
    1168. -
    1169.  
    1170. -
    1171. // patch to support medieval versions of PHP4.1.x, 
    1172. -
    1173. // courtesy, Ryan Currie, ryan@digibliss.com
    1174. -
    1175.  
    1176. -
    1177. if (!function_exists('array_change_key_case')) {
    1178. -
    1179.     define("CASE_UPPER",1);
    1180. -
    1181.     define("CASE_LOWER",0);
    1182. -
    1183.  
    1184. -
    1185.  
    1186. -
    1187.     function array_change_key_case($array,$case=CASE_LOWER{
    1188. -
    1189.        if ($case=CASE_LOWER$cmd=strtolower;
    1190. -
    1191.        elseif ($case=CASE_UPPER$cmd=strtoupper;
    1192. -
    1193.        foreach($array as $key=>$value{
    1194. -
    1195.                $output[$cmd($key)]=$value;
    1196. -
    1197.        }
    1198. -
    1199.        return $output;
    1200. -
    1201.     }
    1202. -
    1203.  
    1204. -
    1205. }
    1206. -
    1207.  
    1208. -
    1209. ?>
    1210. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:12 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_utils.inc.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_utils.inc.html deleted file mode 100755 index 1c5433b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpierss_utils.inc.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - File Source for rss_utils.inc - - - - - -

    Source for file rss_utils.inc

    -

    Documentation is available at rss_utils.inc

    -
    -
    1. <?php
    2. -
    3. /*
    4. -
    5.  * Project:     MagpieRSS: a simple RSS integration tool
    6. -
    7.  * File:        rss_utils.inc, utility methods for working with RSS
    8. -
    9.  * Author:      Kellan Elliott-McCrea <kellan@protest.net>
    10. -
    11.  * Version:     0.51
    12. -
    13.  * License:     GPL
    14. -
    15.  *
    16. -
    17.  * The lastest version of MagpieRSS can be obtained from:
    18. -
    19.  * http://magpierss.sourceforge.net
    20. -
    21.  *
    22. -
    23.  * For questions, help, comments, discussion, etc., please join the
    24. -
    25.  * Magpie mailing list:
    26. -
    27.  * magpierss-general@lists.sourceforge.net
    28. -
    29.  */
    30. -
    31.  
    32. -
    33.  
    34. -
    35. /*======================================================================*\
    36. -
    37.     Function: parse_w3cdtf
    38. -
    39.     Purpose:  parse a W3CDTF date into unix epoch
    40. -
    41.  
    42. -
    43.     NOTE: http://www.w3.org/TR/NOTE-datetime
    44. -
    45. \*======================================================================*/
    46. -
    47.  
    48. -
    49. function parse_w3cdtf $date_str {
    50. -
    51.     
    52. -
    53.     # regex to match wc3dtf
    54. -
    55.     $pat "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
    56. -
    57.     
    58. -
    59.     if preg_match$pat$date_str$match ) ) {
    60. -
    61.         list$year$month$day$hours$minutes$seconds
    62. -
    63.             array$match[1]$match[2]$match[3]$match[4]$match[5]$match[6]);
    64. -
    65.         
    66. -
    67.         # calc epoch for current date assuming GMT
    68. -
    69.         $epoch gmmktime$hours$minutes$seconds$month$day$year);
    70. -
    71.         
    72. -
    73.         $offset 0;
    74. -
    75.         if $match[10== 'Z' {
    76. -
    77.             # zulu time, aka GMT
    78. -
    79.         }
    80. -
    81.         else {
    82. -
    83.             list$tz_mod$tz_hour$tz_min =
    84. -
    85.                 array$match[8]$match[9]$match[10]);
    86. -
    87.             
    88. -
    89.             # zero out the variables
    90. -
    91.             if $tz_hour $tz_hour 0}
    92. -
    93.             if $tz_min $tz_min 0}
    94. -
    95.         
    96. -
    97.             $offset_secs (($tz_hour*60)+$tz_min)*60;
    98. -
    99.             
    100. -
    101.             # is timezone ahead of GMT?  then subtract offset
    102. -
    103.             #
    104. -
    105.             if $tz_mod == '+' {
    106. -
    107.                 $offset_secs $offset_secs * -1;
    108. -
    109.             }
    110. -
    111.             
    112. -
    113.             $offset $offset_secs
    114. -
    115.         }
    116. -
    117.         $epoch $epoch $offset;
    118. -
    119.         return $epoch;
    120. -
    121.     }
    122. -
    123.     else {
    124. -
    125.         return -1;
    126. -
    127.     }
    128. -
    129. }
    130. -
    131.  
    132. -
    133. ?>
    134. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:13 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_debug.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_debug.php.html deleted file mode 100755 index 210d2c3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_debug.php.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for magpie_debug.php - - - - - -

    Source for file magpie_debug.php

    -

    Documentation is available at magpie_debug.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. ini_set('display_errors'1);
    6. -
    7. ini_set('error_reporting'E_ALL);
    8. -
    9. define('MAGPIE_OUTPUT_ENCODING''UTF-8');
    10. -
    11. define('MAGPIE_DIR''../');
    12. -
    13. define('MAGPIE_DEBUG'1);
    14. -
    15.  
    16. -
    17. // flush cache quickly for debugging purposes, don't do this on a live site
    18. -
    19. define('MAGPIE_CACHE_AGE'10);
    20. -
    21.  
    22. -
    23. require_once(MAGPIE_DIR.'rss_fetch.inc');
    24. -
    25.  
    26. -
    27.  
    28. -
    29. if isset($_GET['url']) ) {
    30. -
    31.     $url $_GET['url'];
    32. -
    33. }
    34. -
    35. else {
    36. -
    37.     $url 'http://magpierss.sf.net/test.rss';
    38. -
    39. }
    40. -
    41.  
    42. -
    43.  
    44. -
    45. -
    46.  
    47. -
    48. $rss fetch_rss$url );
    49. -
    50.     
    51. -
    52. if ($rss{
    53. -
    54.     echo "<h3>Example Output</h3>";
    55. -
    56.     echo "Channel: " $rss->channel['title'"<p>";
    57. -
    58.     echo "<ul>";
    59. -
    60.     foreach ($rss->items as $item{
    61. -
    62.         $href $item['link'];
    63. -
    64.         $title $item['title'];    
    65. -
    66.         echo "<li><a href=$href>$title</a></li>";
    67. -
    68.     }
    69. -
    70.     echo "</ul>";
    71. -
    72. }
    73. -
    74. else {
    75. -
    76.     echo "Error: " magpie_error();
    77. -
    78. }
    79. -
    80. ?>
    81. -
    82.  
    83. -
    84. <form>
    85. -
    86.     RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
    87. -
    88.     <input type="submit" value="Parse RSS">
    89. -
    90. </form>
    91. -
    92.  
    93. -
    94. <h3>Parsed Results (var_dump'ed)</h3>
    95. -
    96. <pre>
    97. -
    98. <?php var_dump($rss)?>
    99. -
    100. </pre>
    101. -
    102.  
    103. -
    104. <?php
    105. -
    106.  
    107. -
    108. function test_library_support({
    109. -
    110.    if (!function_exists('xml_parser_create')) {
    111. -
    112.        echo "<b>Error:</b> PHP compiled without XML support (--with-xml), Mapgie won't work without PHP support for XML.<br />\n";
    113. -
    114.        exit;
    115. -
    116.    }
    117. -
    118.    else {
    119. -
    120.        echo "<b>OK:</b> Found an XML parser. <br />\n";
    121. -
    122.    }
    123. -
    124.    
    125. -
    126.    if function_exists('gzinflate') ) {
    127. -
    128.        echo "<b>Warning:</b>  PHP compiled without Zlib support (--with-zlib). No support for GZIP encoding.<br />\n";
    129. -
    130.    }
    131. -
    132.    else {
    133. -
    134.        echo "<b>OK:</b>  Support for GZIP encoding.<br />\n";
    135. -
    136.    }
    137. -
    138.    
    139. -
    140.    if (function_exists('iconv'and function_exists('mb_convert_encoding') ) ) {
    141. -
    142.        echo "<b>Warning:</b>  No support for iconv (--with-iconv) or multi-byte strings (--enable-mbstring)." .  
    143. -
    144.            "No support character set munging.<br />\n";
    145. -
    146.    }
    147. -
    148.    else {
    149. -
    150.        echo "<b>OK:</b>  Support for character munging.<br />\n";
    151. -
    152.    }
    153. -
    154. }
    155. -
    156.  
    157. -
    158. ?>
    159. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_simple.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_simple.php.html deleted file mode 100755 index 6083b37a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_simple.php.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - File Source for magpie_simple.php - - - - - -

    Source for file magpie_simple.php

    -

    Documentation is available at magpie_simple.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. define('MAGPIE_DIR''../');
    6. -
    7. require_once(MAGPIE_DIR.'rss_fetch.inc');
    8. -
    9.  
    10. -
    11. $url $_GET['url'];
    12. -
    13.  
    14. -
    15. if $url {
    16. -
    17.     $rss fetch_rss$url );
    18. -
    19.     echo "Channel: " $rss->channel['title'"<p>";
    20. -
    21.     echo "<ul>";
    22. -
    23.     foreach ($rss->items as $item{
    24. -
    25.         $href $item['link'];
    26. -
    27.         $title $item['title'];    
    28. -
    29.         echo "<li><a href=$href>$title</a></li>";
    30. -
    31.     }
    32. -
    33.     echo "</ul>";
    34. -
    35. }
    36. -
    37. ?>
    38. -
    39.  
    40. -
    41. <form>
    42. -
    43.     RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
    44. -
    45.     <input type="submit" value="Parse RSS">
    46. -
    47. </form>
    48. -
    49.   
    50. -
    51. <p>
    52. -
    53. <h2>Security Note:</h2>
    54. -
    55. This is a simple <b>example</b> script.  If this was a <b>real</b> script we probably wouldn't allow  strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL.  Additionally its a bad idea to leave this example script lying around.
    56. -
    57. </p>
    58. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html deleted file mode 100755 index ea1aac62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptsmagpie_slashbox.php.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for magpie_slashbox.php - - - - - -

    Source for file magpie_slashbox.php

    -

    Documentation is available at magpie_slashbox.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. define('MAGPIE_DIR''../');
    6. -
    7. require_once(MAGPIE_DIR.'rss_fetch.inc');
    8. -
    9.     
    10. -
    11. $url $_GET['rss_url'];
    12. -
    13.  
    14. -
    15. ?>
    16. -
    17.  
    18. -
    19. <html
    20. -
    21. <body LINK="#999999" VLINK="#000000">
    22. -
    23.  
    24. -
    25. <form>
    26. -
    27. <input type="text" name="rss_url" size="40" value="<?php echo $url ?>"><input type="Submit">
    28. -
    29. </form>
    30. -
    31.  
    32. -
    33. <?php
    34. -
    35.  
    36. -
    37. if $url {
    38. -
    39.     echo "displaying$url<p>";
    40. -
    41.     $rss fetch_rss$url );
    42. -
    43.     echo slashbox ($rss);
    44. -
    45. }
    46. -
    47.  
    48. -
    49. echo "<pre>";
    50. -
    51. print_r($rss);
    52. -
    53. echo "</pre>";
    54. -
    55. ?>
    56. -
    57.  
    58. -
    59. </body>
    60. -
    61. </html>
    62. -
    63.  
    64. -
    65. <?php
    66. -
    67.  
    68. -
    69. # just some quick and ugly php to generate html
    70. -
    71. #
    72. -
    73. #
    74. -
    75. function slashbox ($rss{
    76. -
    77.     echo "<table cellpadding=2 cellspacing=0><tr>";
    78. -
    79.     echo "<td bgcolor=#006666>";
    80. -
    81.     
    82. -
    83.     # get the channel title and link properties off of the rss object
    84. -
    85.     #
    86. -
    87.     $title $rss->channel['title'];
    88. -
    89.     $link $rss->channel['link'];
    90. -
    91.     
    92. -
    93.     echo "<a href=$link><font color=#FFFFFF><b>$title</b></font></a>";
    94. -
    95.     echo "</td></tr>";
    96. -
    97.     
    98. -
    99.     # foreach over each item in the array.
    100. -
    101.     # displaying simple links
    102. -
    103.     #
    104. -
    105.     # we could be doing all sorts of neat things with the dublin core
    106. -
    107.     # info, or the event info, or what not, but keeping it simple for now.
    108. -
    109.     #
    110. -
    111.     foreach ($rss->items as $item {
    112. -
    113.         echo "<tr><td bgcolor=#cccccc>";
    114. -
    115.         echo "<a href=$item[link]>";
    116. -
    117.         echo $item['title'];
    118. -
    119.         echo "</a></td></tr>";
    120. -
    121.     }        
    122. -
    123.     
    124. -
    125.     echo "</table>";
    126. -
    127. }
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:44:47 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssimple_smarty.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssimple_smarty.php.html deleted file mode 100755 index 789dd4ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssimple_smarty.php.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - File Source for simple_smarty.php - - - - - -

    Source for file simple_smarty.php

    -

    Documentation is available at simple_smarty.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // Define path to Smarty files (don't forget trailing slash)
    6. -
    7. // and load library.  (you'll want to change this value)
    8. -
    9. //
    10. -
    11. // NOTE:  you can also simply add Smarty to your include path
    12. -
    13. define('SMARTY_DIR''/home/kellan/projs/magpierss/scripts/Smarty/');
    14. -
    15. require_once(SMARTY_DIR.'Smarty.class.php');
    16. -
    17.  
    18. -
    19. // define path to Magpie files and load library
    20. -
    21. // (you'll want to change this value)
    22. -
    23. //
    24. -
    25. // NOTE: you can also simple add MagpieRSS to your include path
    26. -
    27. define('MAGPIE_DIR''/home/kellan/projs/magpierss/');
    28. -
    29. require_once(MAGPIE_DIR.'rss_fetch.inc');
    30. -
    31. require_once(MAGPIE_DIR.'rss_utils.inc');
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // optionally show lots of debugging info
    38. -
    39. # define('MAGPIE_DEBUG', 2);
    40. -
    41.  
    42. -
    43. // optionally flush cache quickly for debugging purposes, 
    44. -
    45. // don't do this on a live site
    46. -
    47. # define('MAGPIE_CACHE_AGE', 10);
    48. -
    49.  
    50. -
    51. // use cache?  default is yes.  see rss_fetch for other Magpie options
    52. -
    53. # define('MAGPIE_CACHE_ON', 1)
    54. -
    55.  
    56. -
    57. // setup template object
    58. -
    59. $smarty new Smarty;
    60. -
    61. $smarty->compile_check true;
    62. -
    63.  
    64. -
    65. // url of an rss file
    66. -
    67. $url $_GET['rss_url'];
    68. -
    69.  
    70. -
    71.  
    72. -
    73. if $url {
    74. -
    75.     // assign a variable to smarty for use in the template
    76. -
    77.     $smarty->assign('rss_url'$url);
    78. -
    79.     
    80. -
    81.     // use MagpieRSS to fetch remote RSS file, and parse it
    82. -
    83.     $rss fetch_rss$url );
    84. -
    85.     
    86. -
    87.     // if fetch_rss returned false, we encountered an error
    88. -
    89.     if !$rss {
    90. -
    91.         $smarty->assign'error'magpie_error() );
    92. -
    93.     }
    94. -
    95.     $smarty->assign('rss'$rss );
    96. -
    97.     
    98. -
    99.     $item $rss->items[0];
    100. -
    101.     $date parse_w3cdtf$item['dc']['date');
    102. -
    103.     $smarty->assign'date'$date );
    104. -
    105. }
    106. -
    107.  
    108. -
    109. // parse smarty template, and display using the variables we assigned
    110. -
    111. $smarty->display('simple.smarty');
    112. -
    113.  
    114. -
    115. ?>
    116. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:47:13 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html deleted file mode 100755 index 54e19265..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__utilmagpiescriptssmarty_pluginmodifier.rss_date_parse.php.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - File Source for modifier.rss_date_parse.php - - - - - -

    Source for file modifier.rss_date_parse.php

    -

    Documentation is available at modifier.rss_date_parse.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /*
    6. -
    7.  * Smarty plugin
    8. -
    9.  * -------------------------------------------------------------
    10. -
    11.  * Type:     modifier
    12. -
    13.  * Name:     rss_date_parse
    14. -
    15.  * Purpose:  parse rss date into unix epoch
    16. -
    17.  * Input:    string: rss date
    18. -
    19.  *             default_date:  default date if $rss_date is empty
    20. -
    21.  *
    22. -
    23.  * NOTE!!!  parse_w3cdtf provided by MagpieRSS's rss_utils.inc
    24. -
    25.  *          this file needs to be included somewhere in your script
    26. -
    27.  * -------------------------------------------------------------
    28. -
    29.  */
    30. -
    31.  
    32. -
    33. function smarty_modifier_rss_date_parse ($rss_date$default_date=null)
    34. -
    35. {
    36. -
    37.     if($rss_date != ''{
    38. -
    39.         return parse_w3cdtf$rss_date );
    40. -
    41.     elseif (isset($default_date&& $default_date != ''{        
    42. -
    43.         return parse_w3cdtf$default_date );
    44. -
    45.     else {
    46. -
    47.         return;
    48. -
    49.     }
    50. -
    51. }
    52. -
    53.  
    54. -
    55.  
    56. -
    57.  
    58. -
    59.  
    60. -
    61. ?>
    62. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:45:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__vocabularyDC.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__vocabularyDC.php.html deleted file mode 100755 index 8465aa70..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_default__vocabularyDC.php.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for DC.php - - - - - -

    Source for file DC.php

    -

    Documentation is available at DC.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Dublin Core Vocabulary
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // @version                  : $Id: fsource_default__vocabularyDC.php.html 430 2007-05-01 15:47:21Z cweiske $
    10. -
    11. // Authors                   : Chris Bizer (chris@bizer.de)
    12. -
    13. //
    14. -
    15. // Description               : Wrapper, defining resources for all terms of the Dublin 
    16. -
    17. //                               Core Vocabulary. For details about DC see: http://dublincore.org/
    18. -
    19. //                                Using the wrapper allows you to define all aspects of 
    20. -
    21. //                             the vocabulary in one spot, simplifing implementation and 
    22. -
    23. //                             maintainence. Working with the vocabulary, you should use 
    24. -
    25. //                             these resources as shortcuts in your code. 
    26. -
    27. //                               
    28. -
    29.  
    30. -
    31.  
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // DC concepts
    38. -
    39. $DC_contributor new Resource(DC_NS 'contributor');    
    40. -
    41. $DC_coverage new Resource(DC_NS 'coverage');  
    42. -
    43. $DC_creator new Resource(DC_NS 'creator');  
    44. -
    45. $DC_date new Resource(DC_NS 'date');  
    46. -
    47. $DC_description new Resource(DC_NS 'description');  
    48. -
    49. $DC_format new Resource(DC_NS 'format');  
    50. -
    51. $DC_identifier new Resource(DC_NS 'identifier');  
    52. -
    53. $DC_language new Resource(DC_NS 'language');  
    54. -
    55. $DC_publisher new Resource(DC_NS 'publisher');  
    56. -
    57. $DC_rights new Resource(DC_NS 'rights');  
    58. -
    59. $DC_source new Resource(DC_NS 'source');  
    60. -
    61. $DC_subject new Resource(DC_NS 'subject');  
    62. -
    63. $DC_title new Resource(DC_NS 'title');  
    64. -
    65. $DC_type new Resource(DC_NS 'type');  
    66. -
    67.  
    68. -
    69. // Dublin Core Metadata Element Set (DCMES) 1.1
    70. -
    71. $DCMES_name array('contributor''coverage''creator''date',
    72. -
    73.             'description''format''identifier''language'
    74. -
    75.             'publisher''relation''rights''source'
    76. -
    77.             'subject''title''type');
    78. -
    79.  
    80. -
    81. foreach ($DCMES_name as $name{
    82. -
    83.     $DCMES[$namenew Resource(DC_NS $name);
    84. -
    85.     $GLOBALS['DC_' $name$DCMES[$name];
    86. -
    87. }
    88. -
    89.  
    90. -
    91. // Other Elements and Element Refinements
    92. -
    93. $DCTERM_name array('abstract''accessRights''alternative''audience'
    94. -
    95.              'available''bibliographicCitation''conformsTo',
    96. -
    97.              'created''dateAccepted''dateCopyrighted'
    98. -
    99.              'dateSubmitted''educationLevel''extent',
    100. -
    101.              'hasFormat''hasPart''hasVersion'
    102. -
    103.              'isFormatOf''isPartOf''isReferencedBy''isReplacedBy',
    104. -
    105.              'isRequiredBy''issued''isVersionOf''license',
    106. -
    107.              'mediator''medium''modified''references',
    108. -
    109.              'replaces''requires''rightsHolder''spatial',
    110. -
    111.              'tableOfContents''temporal''valid');
    112. -
    113. foreach ($DCTERM_name as $name{
    114. -
    115.     $DCTERM[$namenew Resource(DCTERM_NS $name);
    116. -
    117. }
    118. -
    119.  
    120. -
    121. // Encoding schemes
    122. -
    123. $scheme_name array('Box''DCMIType''IMT''ISO3166''ISO639-2',
    124. -
    125.              'LCC''LCSH''MESH''Period''Point',
    126. -
    127.              'RFC1766''RFC3066''TGN''UDC''URI',
    128. -
    129.              'W3CDTF');
    130. -
    131.  
    132. -
    133. foreach ($scheme_name as $name{
    134. -
    135.    $DCTERM[$namenew Resource(DCTERM_NS $name);
    136. -
    137. }
    138. -
    139.  
    140. -
    141. // DCMI Type Vocabulary
    142. -
    143. $DCMITYPE_names array('Collection''Dataset''Event''Image',
    144. -
    145.             'InteractiveResource''MovingImage''PhysicalObject',
    146. -
    147.             'Service''Software''Sound''StillImage''Text');
    148. -
    149.  
    150. -
    151. foreach ($DCMITYPE_names as $name{
    152. -
    153.     $DCMITYPE[$namenew Resource(DCMITYPE_NS $name);
    154. -
    155. }
    156. -
    157.  
    158. -
    159. ?>
    160. -
    -
    -

    - Documentation generated on Tue, 01 May 2007 16:43:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModel.php.html deleted file mode 100755 index 87a6454b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModel.php.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - File Source for InfModel.php - - - - - -

    Source for file InfModel.php

    -

    Documentation is available at InfModel.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: infModel
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * A InfModel Model extends a MemModel , by adding the ability to infer statements from
    14. -
    15.  * known statements and RDFS/OWL-Schematas.
    16. -
    17.  * It uses the same interface as MemModel, thus making the
    18. -
    19.  * infererence process hidden.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id: fsource_infModel__infModelInfModel.php.html 442 2007-06-01 16:19:26Z cax $
    24. -
    25.  * @author Daniel Westphal <mail at d-westphal dot de>
    26. -
    27.  *
    28. -
    29.  * @package infModel
    30. -
    31.  * @access    public
    32. -
    33.  */
    34. -
    35.  
    36. -
    37. class InfModel extends MemModel 
    38. -
    39. {
    40. -
    41.     /**
    42. -
    43.     * Array that holds the objects of the class Infrule,
    44. -
    45.     * which were assigned by the _addToInference() function
    46. -
    47.     *
    48. -
    49.     * @var        array 
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $infRules;
    56. -
    57.  
    58. -
    59.     /**
    60. -
    61.     * Array of URI-Strings that produces Infrules.
    62. -
    63.     *
    64. -
    65.     * @var        array 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $supportedInference;
    72. -
    73.     
    74. -
    75.     /**
    76. -
    77.     * Array of the connection between the infrules and the statement
    78. -
    79.     * that assigned those rules.
    80. -
    81.     * array[2][3]=true;array[2][5]=true means, that statement 2
    82. -
    83.     * assigned rule 3 & 5 to the model.
    84. -
    85.     *
    86. -
    87.     * @var        array 
    88. -
    89.     * @access    private
    90. -
    91.     */    
    92. -
    93.     var $statementRuleIndex;
    94. -
    95.     
    96. -
    97.     /**
    98. -
    99.     * Array of the infRule triggers and the matching infrules.
    100. -
    101.     * $this->infRulesTriggerIndex['s'] for subject index, ['p'] for predicates,
    102. -
    103.     * and ['o'] for objects.
    104. -
    105.     *
    106. -
    107.     * @var        array 
    108. -
    109.     * @access    private
    110. -
    111.     */    
    112. -
    113.     var $infRulesTriggerIndex;
    114. -
    115.     
    116. -
    117.     /**
    118. -
    119.     * Array of the infRule entailments and the matching infrules.
    120. -
    121.     * $this->infRulesEntailIndex['s'] for subject index, ['p'] for predicates,
    122. -
    123.     * and ['o'] for objects.
    124. -
    125.     *
    126. -
    127.     * @var        array 
    128. -
    129.     * @access    private
    130. -
    131.     */    
    132. -
    133.     var $infRulesEntailIndex;
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  
    140. -
    141.    /**
    142. -
    143.     * Constructor
    144. -
    145.     * You can supply a base_uri
    146. -
    147.     *
    148. -
    149.     * @param string $baseURI 
    150. -
    151.     * @access    public
    152. -
    153.     */    
    154. -
    155.     function InfModel ($baseURI NULL
    156. -
    157.     {
    158. -
    159.         //call the memmodel constructor method
    160. -
    161.         parent::MemModel($baseURI);
    162. -
    163.         //initialise vars
    164. -
    165.         $this->infRulesTriggerIndex['s']=array();
    166. -
    167.         $this->infRulesTriggerIndex['p']=array();
    168. -
    169.         $this->infRulesTriggerIndex['o']=array();
    170. -
    171.         $this->infRulesEntailIndex['s']=array();
    172. -
    173.         $this->infRulesEntailIndex['p']=array();
    174. -
    175.         $this->infRulesEntailIndex['o']=array();
    176. -
    177.         $this->infRules=array();
    178. -
    179.         $this->statementRuleIndex array();
    180. -
    181.         //arraylist of predicate labels that shall add inference rules 
    182. -
    183.         //to the model
    184. -
    185.         //The constants, wich statements will create rules can be configured in constants.php
    186. -
    187.         if (INF_RES_SUBCLASSOF)
    188. -
    189.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_SUBCLASSOF;
    190. -
    191.             
    192. -
    193.         if (INF_RES_SUBPROPERTYOF)
    194. -
    195.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF;
    196. -
    197.  
    198. -
    199.         if (INF_RES_RANGE)
    200. -
    201.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_RANGE;
    202. -
    203.  
    204. -
    205.         if (INF_RES_DOMAIN)
    206. -
    207.             $this->supportedInference[RDF_SCHEMA_URI.RDFS_DOMAIN;
    208. -
    209.  
    210. -
    211.         if (INF_RES_OWL_SAMEAS)
    212. -
    213.             $this->supportedInference[OWL_URI.OWL_SAME_AS;
    214. -
    215.  
    216. -
    217.         if (INF_RES_OWL_INVERSEOF)
    218. -
    219.             $this->supportedInference[OWL_URI.OWL_INVERSE_OF;
    220. -
    221.  
    222. -
    223.         //Rule: rdfs12    
    224. -
    225.         if (INF_RES_RULE_RDFS12)
    226. -
    227.         {
    228. -
    229.             $infRule=new InfRule();
    230. -
    231.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.'ContainerMembershipProperty'));
    232. -
    233.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),new Resource(RDF_SCHEMA_URI.'member'));
    234. -
    235.             $this->_addInfRule($infRule,'base');
    236. -
    237.         }
    238. -
    239.     
    240. -
    241.         //Rule: rdfs6
    242. -
    243.         if (INF_RES_RULE_RDFS6)
    244. -
    245.         {
    246. -
    247.             $infRule=new InfRule();
    248. -
    249.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_NAMESPACE_URI.RDF_PROPERTY));
    250. -
    251.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),'<s>');
    252. -
    253.             $this->_addInfRule($infRule,'base');
    254. -
    255.         }
    256. -
    257.             
    258. -
    259.         //Rule: rdfs8
    260. -
    261.         if (INF_RES_RULE_RDFS8)
    262. -
    263.         {
    264. -
    265.             $infRule=new InfRule();
    266. -
    267.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
    268. -
    269.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_RESOURCE));
    270. -
    271.             $this->_addInfRule($infRule,'base');
    272. -
    273.             
    274. -
    275.         }
    276. -
    277.         
    278. -
    279.         //Rule: rdfs10
    280. -
    281.         if (INF_RES_RULE_RDFS10)
    282. -
    283.         {
    284. -
    285.             $infRule=new InfRule();
    286. -
    287.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
    288. -
    289.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),'<s>');
    290. -
    291.             $this->_addInfRule($infRule,'base');
    292. -
    293.         }
    294. -
    295.                 
    296. -
    297.         //Rule: rdfs13
    298. -
    299.         if (INF_RES_RULE_RDFS13)
    300. -
    301.         {
    302. -
    303.             $infRule=new InfRule();
    304. -
    305.             $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_DATATYPE));
    306. -
    307.             $infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_LITERAL));
    308. -
    309.             $this->_addInfRule($infRule,'base');
    310. -
    311.         }
    312. -
    313.                 
    314. -
    315.     }
    316. -
    317.     
    318. -
    319.      /**
    320. -
    321.        * Adds a new triple to the Model without checking if the statement
    322. -
    323.        * is already in the Model.
    324. -
    325.        * So if you want a duplicate free MemModel use the addWithoutDuplicates()
    326. -
    327.        * function (which is slower then add())
    328. -
    329.        * If the statement's predicate label is supported by the inference,
    330. -
    331.        * the matching rules are added.
    332. -
    333.        *
    334. -
    335.        * @param    object Statement    $statement 
    336. -
    337.        * @access    public
    338. -
    339.        * @throws    PhpError
    340. -
    341.        */    
    342. -
    343.     function add($statement)
    344. -
    345.     {
    346. -
    347.         parent::add($statement);
    348. -
    349.         //if the predicate is supported by the inference
    350. -
    351.         if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    352. -
    353.         {
    354. -
    355.                 $this->_addToInference($statement);
    356. -
    357.         };
    358. -
    359.     }
    360. -
    361.  
    362. -
    363.     /**
    364. -
    365.     * This function analyses the statement's predicate and adds the
    366. -
    367.     * matching infrule to the model.
    368. -
    369.     *
    370. -
    371.        * @param    object Statement    $statement 
    372. -
    373.        * @access    private
    374. -
    375.        */
    376. -
    377.     function _addToInference($statement)
    378. -
    379.     {
    380. -
    381.         $predicateLabel=$statement->getLabelPredicate();
    382. -
    383.         //get the position of the the statement in the model
    384. -
    385.         end($this->triples);
    386. -
    387.         $statementPosition=key($this->triples);
    388. -
    389.         
    390. -
    391.         switch ($predicateLabel)
    392. -
    393.         {
    394. -
    395.             case RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF :
    396. -
    397.                 //create a new rule
    398. -
    399.                 $infRule=new InfRule();
    400. -
    401.                 //set the trigger to match all statements, having a 
    402. -
    403.                 //predicate, that matches the subject of the statement that 
    404. -
    405.                 //created this rule.
    406. -
    407.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    408. -
    409.                 //set the infrule to return a statement, having the same 
    410. -
    411.                 //subject and object as the statement, that asked for an 
    412. -
    413.                 //entailment, and having the object of the statement, 
    414. -
    415.                 //that created this rule as predicate.
    416. -
    417.                 $infRule->setEntailment('<s>',$statement->getObject(),'<o>');
    418. -
    419.                 //add the infule to Model, Statement/Rule-Index, 
    420. -
    421.                 //and Rule/Trigger (or Rule/Entailment) index
    422. -
    423.                 $this->_addInfRule($infRule,$statementPosition);
    424. -
    425.             break;
    426. -
    427.             
    428. -
    429.             case RDF_SCHEMA_URI.RDFS_SUBCLASSOF :
    430. -
    431.                 $infRule=new InfRule();
    432. -
    433.                 $infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getSubject());
    434. -
    435.                 $infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    436. -
    437.                 $this->infRules[]=$infRule;
    438. -
    439.                 $this->_addInfRule($infRule,$statementPosition);
    440. -
    441.             break;
    442. -
    443.             
    444. -
    445.             case RDF_SCHEMA_URI.RDFS_DOMAIN :
    446. -
    447.                 $infRule=new InfRule();
    448. -
    449.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    450. -
    451.                 $infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    452. -
    453.                 $this->infRules[]=$infRule;
    454. -
    455.                 $this->_addInfRule($infRule,$statementPosition);
    456. -
    457.             break;
    458. -
    459.             
    460. -
    461.             case RDF_SCHEMA_URI.RDFS_RANGE :
    462. -
    463.                 $infRule=new InfRule();
    464. -
    465.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    466. -
    467.                 $infRule->setEntailment('<o>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
    468. -
    469.                 $this->infRules[]=$infRule;
    470. -
    471.                 $this->_addInfRule($infRule,$statementPosition);
    472. -
    473.             break;
    474. -
    475.             
    476. -
    477.             case OWL_URI.OWL_INVERSE_OF :
    478. -
    479.                 $infRule=new InfRule();
    480. -
    481.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    482. -
    483.                 $infRule->setEntailment('<o>',$statement->getObject(),'<s>');
    484. -
    485.                 $this->infRules[]=$infRule;
    486. -
    487.                 $this->_addInfRule($infRule,$statementPosition);
    488. -
    489.             
    490. -
    491.                 $infRule=new InfRule();
    492. -
    493.                 $infRule->setTrigger(null,$statement->getObject(),null);
    494. -
    495.                 $infRule->setEntailment('<o>',$statement->getSubject(),'<s>');
    496. -
    497.                 $this->infRules[]=$infRule;            
    498. -
    499.                 $this->_addInfRule($infRule,$statementPosition);                
    500. -
    501.             break;
    502. -
    503.             
    504. -
    505.             case OWL_URI.OWL_SAME_AS :
    506. -
    507.                 $infRule=new InfRule();
    508. -
    509.                 $infRule->setTrigger($statement->getSubject(),null,null);
    510. -
    511.                 $infRule->setEntailment($statement->getObject(),'<p>','<o>');
    512. -
    513.                 $this->_addInfRule($infRule,$statementPosition);
    514. -
    515.             
    516. -
    517.                 $infRule=new InfRule();
    518. -
    519.                 $infRule->setTrigger($statement->getObject(),null,null);
    520. -
    521.                 $infRule->setEntailment($statement->getSubject(),'<p>','<o>');
    522. -
    523.                 $this->_addInfRule($infRule,$statementPosition);
    524. -
    525.             
    526. -
    527.                 $infRule=new InfRule();
    528. -
    529.                 $infRule->setTrigger(null,$statement->getSubject(),null);
    530. -
    531.                 $infRule->setEntailment('<s>',$statement->getObject(),'<o>');
    532. -
    533.                 $this->_addInfRule($infRule,$statementPosition);
    534. -
    535.             
    536. -
    537.                 $infRule=new InfRule();
    538. -
    539.                 $infRule->setTrigger(null,$statement->getObject(),null);
    540. -
    541.                 $infRule->setEntailment('<s>',$statement->getSubject(),'<o>');
    542. -
    543.                 $this->_addInfRule($infRule,$statementPosition);
    544. -
    545.             
    546. -
    547.                 $infRule=new InfRule();
    548. -
    549.                 $infRule->setTrigger(null,null,$statement->getSubject());
    550. -
    551.                 $infRule->setEntailment('<s>','<p>',$statement->getObject());
    552. -
    553.                 $this->_addInfRule($infRule,$statementPosition);
    554. -
    555.             
    556. -
    557.                 $infRule=new InfRule();
    558. -
    559.                 $infRule->setTrigger(null,null,$statement->getObject());
    560. -
    561.                 $infRule->setEntailment('<s>','<p>',$statement->getSubject());
    562. -
    563.                 $this->_addInfRule($infRule,$statementPosition);        
    564. -
    565.             break;
    566. -
    567.         };    
    568. -
    569.     }
    570. -
    571.  
    572. -
    573.     /**
    574. -
    575.     * This function checks, which infrules were added by the statement and
    576. -
    577.     * removes those.
    578. -
    579.     *
    580. -
    581.        * @param    object Statement    $statement 
    582. -
    583.        * @return    integer 
    584. -
    585.        * @access    private
    586. -
    587.        */
    588. -
    589.     function _removeFromInference($statement)
    590. -
    591.     {
    592. -
    593.         $returnarray();
    594. -
    595.         $statementPosition=-1;
    596. -
    597.         do
    598. -
    599.         {
    600. -
    601.             //get the position of the statement that should be removed
    602. -
    603.             $statementPosition=$this->findFirstMatchOff($statement->getSubject(),
    604. -
    605.                                                     $statement->getPredicate(),
    606. -
    607.                                                     $statement->getObject(),
    608. -
    609.                                                     $statementPosition+1);                        
    610. -
    611.             if ($statementPosition!=-1)
    612. -
    613.             {
    614. -
    615.                 //if it added any rules
    616. -
    617.                 if (isset ($this->statementRuleIndex[$statementPosition]))
    618. -
    619.                 {
    620. -
    621.                     //remove all rules 
    622. -
    623.                     foreach ($this->statementRuleIndex[$statementPositionas $key => $value)
    624. -
    625.                     {
    626. -
    627.                         //remove from Rule-Trigger Index
    628. -
    629.                         if (is_a($this,'InfModelF'))
    630. -
    631.                         {
    632. -
    633.                             $trigger=$this->infRules[$key]->getTrigger();
    634. -
    635.                             
    636. -
    637.                             if(is_a($trigger['s'],'Node'))
    638. -
    639.                             {
    640. -
    641.                                 $subjectLabel=$trigger['s']->getLabel();
    642. -
    643.                             else 
    644. -
    645.                             {
    646. -
    647.                                 $subjectLabel='null';
    648. -
    649.                             }
    650. -
    651.                             unset ($this->infRulesTriggerIndex['s'][$subjectLabel][array_search($key,$this->infRulesTriggerIndex['s'][$subjectLabel])]);
    652. -
    653.                             
    654. -
    655.                             if(is_a($trigger['p'],'Node'))
    656. -
    657.                             {
    658. -
    659.                                 $predicateLabel=$trigger['p']->getLabel();
    660. -
    661.                             else 
    662. -
    663.                             {
    664. -
    665.                                 $predicateLabel='null';
    666. -
    667.                             }
    668. -
    669.                             unset ($this->infRulesTriggerIndex['p'][$predicateLabel][array_search($key,$this->infRulesTriggerIndex['p'][$predicateLabel])]);
    670. -
    671.                             
    672. -
    673.                             if(is_a($trigger['o'],'Node'))
    674. -
    675.                             {
    676. -
    677.                                 $objectLabel=$trigger['o']->getLabel();
    678. -
    679.                             else 
    680. -
    681.                             {
    682. -
    683.                                 $objectLabel='null';
    684. -
    685.                             }
    686. -
    687.                             unset ($this->infRulesTriggerIndex['o'][$objectLabel][array_search($key,$this->infRulesTriggerIndex['o'][$objectLabel])]);
    688. -
    689.                         else
    690. -
    691.                         //remove from Rule-Entailment Index
    692. -
    693.                         {    
    694. -
    695.                             $entailment=$this->infRules[$key]->getEntailment();
    696. -
    697.                             
    698. -
    699.                             if(is_a($entailment['s'],'Node'))
    700. -
    701.                             {
    702. -
    703.                                 $subjectLabel=$entailment['s']->getLabel();
    704. -
    705.                             else 
    706. -
    707.                             {
    708. -
    709.                                 $subjectLabel='null';
    710. -
    711.                             }
    712. -
    713.                             unset ($this->infRulesEntailIndex['s'][$subjectLabel][array_search($key,$this->infRulesEntailIndex['s'][$subjectLabel])]);
    714. -
    715.                             
    716. -
    717.                             
    718. -
    719.                             if(is_a($entailment['p'],'Node'))
    720. -
    721.                             {
    722. -
    723.                                 $predicateLabel=$entailment['p']->getLabel();
    724. -
    725.                             else 
    726. -
    727.                             {
    728. -
    729.                                 $predicateLabel='null';
    730. -
    731.                             }
    732. -
    733.                             unset ($this->infRulesEntailIndex['p'][$predicateLabel][array_search($key,$this->infRulesEntailIndex['p'][$predicateLabel])]);
    734. -
    735.                             
    736. -
    737.                             if(is_a($entailment['o'],'Node'))
    738. -
    739.                             {
    740. -
    741.                                 $objectLabel=$entailment['o']->getLabel();
    742. -
    743.                             else 
    744. -
    745.                             {
    746. -
    747.                                 $objectLabel='null';
    748. -
    749.                             }
    750. -
    751.                             unset ($this->infRulesEntailIndex['o'][$objectLabel][array_search($key,$this->infRulesEntailIndex['o'][$objectLabel])]);
    752. -
    753.                         }    
    754. -
    755.                         //remove from statement-Rule Index
    756. -
    757.                         unset ($this->infRules[$key]);
    758. -
    759.                     }
    760. -
    761.                     unset($this->statementRuleIndex[$statementPosition]);
    762. -
    763.                     $return[]=$statementPosition;
    764. -
    765.                 };
    766. -
    767.             }
    768. -
    769.             
    770. -
    771.         while($statementPosition!=-1);
    772. -
    773.         
    774. -
    775.         //return the positions of the statements to be removed OR emty array 
    776. -
    777.         //if nothing was found.
    778. -
    779.         return $return;
    780. -
    781.     }
    782. -
    783.  
    784. -
    785.     /**
    786. -
    787.     * Returns a model, containing all Statements, having a Predicate, that
    788. -
    789.     * is supported by the inference.
    790. -
    791.     * 
    792. -
    793.     * @return    object Model 
    794. -
    795.     * @access    public
    796. -
    797.     */
    798. -
    799.     function getSchema(
    800. -
    801.     {
    802. -
    803.         $res=new MemModel();
    804. -
    805.         //Search the base-model for all statements, having a Predicate, that 
    806. -
    807.         //is supported by the inference.
    808. -
    809.         foreach ($this->supportedInference as $inferencePredicateLabel)
    810. -
    811.         {
    812. -
    813.             $res->addModel($this->find(nullnew Resource($inferencePredicateLabel)null));        
    814. -
    815.         }
    816. -
    817.         return $res;
    818. -
    819.     }
    820. -
    821.     
    822. -
    823.     /**
    824. -
    825.     * General method to replace nodes of a MemModel.
    826. -
    827.     * This function is disabled in the Inference Model.
    828. -
    829.     *
    830. -
    831.     * @param    object Node    $subject 
    832. -
    833.     * @param    object Node    $predicate 
    834. -
    835.     * @param    object Node    $object 
    836. -
    837.     * @param    object Node    $replacement 
    838. -
    839.     * @access    public
    840. -
    841.     * @throws    PhpError
    842. -
    843.     */
    844. -
    845.     function replace($subject$predicate$object$replacement
    846. -
    847.     {
    848. -
    849.     
    850. -
    851.        $errmsg RDFAPI_ERROR '(class: InfModel; method: replace): This function is disabled in the Inference Model';
    852. -
    853.        trigger_error($errmsgE_USER_ERROR)
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     /**
    860. -
    861.     * Method to search for triples using Perl-style regular expressions.
    862. -
    863.     * NULL input for any parameter will match anything.
    864. -
    865.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    866. -
    867.     * Finds all triples where the label of the object node matches the regular
    868. -
    869.     * expression.
    870. -
    871.     * Returns an empty MemModel if nothing is found.
    872. -
    873.     * 
    874. -
    875.     * This function is disabled in the Inference Model
    876. -
    877.     *
    878. -
    879.     * @param    string    $subject_regex 
    880. -
    881.     * @param    string    $predicate_regex 
    882. -
    883.     * @param    string    $object_regex 
    884. -
    885.     * @return    object MemModel 
    886. -
    887.     * @access    public
    888. -
    889.     */
    890. -
    891.     function findRegex($subject_regex$predicate_regex$object_regex
    892. -
    893.     {
    894. -
    895.  
    896. -
    897.         $errmsg RDFAPI_ERROR '(class: InfModel; method: findRegex): 
    898. -
    899.                                     This function is disabled in the  
    900. -
    901.                                     Inference Model';
    902. -
    903.            trigger_error($errmsgE_USER_ERROR)
    904. -
    905.     
    906. -
    907.    
    908. -
    909.     /**
    910. -
    911.     * Returns all tripels of a certain vocabulary.
    912. -
    913.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at
    914. -
    915.     * the end.
    916. -
    917.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    918. -
    919.     * Returns an empty MemModel if nothing is found.
    920. -
    921.     *
    922. -
    923.     * This function is disabled in the Inference Model.
    924. -
    925.     *
    926. -
    927.     * @param    string    $vocabulary 
    928. -
    929.     * @return    object MemModel 
    930. -
    931.     * @access    public
    932. -
    933.     */
    934. -
    935.     function findVocabulary($vocabulary
    936. -
    937.     {
    938. -
    939.         
    940. -
    941.         $errmsg RDFAPI_ERROR '(class: InfModel; method: findVocabulary): 
    942. -
    943.                                     This function is disabled in the  
    944. -
    945.                                     Inference Model';
    946. -
    947.         trigger_error($errmsgE_USER_ERROR)
    948. -
    949.     
    950. -
    951.  
    952. -
    953.     
    954. -
    955.     /**
    956. -
    957.      * Adds the URI or NULL to the Infrule trigger or entailment index.
    958. -
    959.     * 
    960. -
    961.     *
    962. -
    963.     * @param    object infrule    $infRule 
    964. -
    965.     * @param    integer    $infRulePosition 
    966. -
    967.     * @access    private
    968. -
    969.     */
    970. -
    971.     function _addInfruleToIndex($infRule,$infRulePosition)
    972. -
    973.     {
    974. -
    975.         //Add the rule only to the trigger index, if it is a InfFModel
    976. -
    977.         if (is_a($this,'InfModelF'))
    978. -
    979.         {
    980. -
    981.             //get the trigger
    982. -
    983.             $trigger $infRule->getTrigger();
    984. -
    985.             //evaluate and set the index
    986. -
    987.             if ($trigger['s'== null)
    988. -
    989.             {
    990. -
    991.                 $this->infRulesTriggerIndex['s']['null'][]=$infRulePosition;
    992. -
    993.             else 
    994. -
    995.             {
    996. -
    997.                 $this->infRulesTriggerIndex['s'][$trigger['s']->getLabel()][]=$infRulePosition;
    998. -
    999.             };
    1000. -
    1001.             
    1002. -
    1003.             if ($trigger['p'== null)
    1004. -
    1005.             {
    1006. -
    1007.                 $this->infRulesTriggerIndex['p']['null'][]=$infRulePosition;
    1008. -
    1009.             else 
    1010. -
    1011.             {
    1012. -
    1013.                 $this->infRulesTriggerIndex['p'][$trigger['p']->getLabel()][]=$infRulePosition;
    1014. -
    1015.             };
    1016. -
    1017.             
    1018. -
    1019.             if ($trigger['o'== null)
    1020. -
    1021.             {
    1022. -
    1023.                 $this->infRulesTriggerIndex['o']['null'][]=$infRulePosition;
    1024. -
    1025.             else 
    1026. -
    1027.             {
    1028. -
    1029.                 $this->infRulesTriggerIndex['o'][$trigger['o']->getLabel()][]=$infRulePosition;
    1030. -
    1031.             };
    1032. -
    1033.         else 
    1034. -
    1035.         //add to entailment Index if it is a BModel
    1036. -
    1037.         {        
    1038. -
    1039.             //get the entailment
    1040. -
    1041.             $entailment $infRule->getEntailment();
    1042. -
    1043.             //evaluate the entailment and add to index
    1044. -
    1045.             if (!is_a($entailment['s'],'Node'))
    1046. -
    1047.             {
    1048. -
    1049.                 $this->infRulesEntailIndex['s']['null'][]=$infRulePosition;
    1050. -
    1051.             else 
    1052. -
    1053.             {
    1054. -
    1055.                 $this->infRulesEntailIndex['s'][$entailment['s']->getLabel()][]=$infRulePosition;
    1056. -
    1057.             };
    1058. -
    1059.             
    1060. -
    1061.             if (!is_a($entailment['p'],'Node'))
    1062. -
    1063.             {
    1064. -
    1065.                 $this->infRulesEntailIndex['p']['null'][]=$infRulePosition;
    1066. -
    1067.             else 
    1068. -
    1069.             {
    1070. -
    1071.                 $this->infRulesEntailIndex['p'][$entailment['p']->getLabel()][]=$infRulePosition;
    1072. -
    1073.             };
    1074. -
    1075.             
    1076. -
    1077.             if (!is_a($entailment['o'],'Node'))
    1078. -
    1079.             {
    1080. -
    1081.                 $this->infRulesEntailIndex['o']['null'][]=$infRulePosition;
    1082. -
    1083.             else 
    1084. -
    1085.             {
    1086. -
    1087.                 $this->infRulesEntailIndex['o'][$entailment['o']->getLabel()][]=$infRulePosition;
    1088. -
    1089.             };
    1090. -
    1091.         };    
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     /**
    1098. -
    1099.      * Searches the trigger-index for a matching trigger and returns an
    1100. -
    1101.      * array of infRule positions.
    1102. -
    1103.     * 
    1104. -
    1105.     *
    1106. -
    1107.     * @param    object infrule    $infRule 
    1108. -
    1109.     * @return    array    integer
    1110. -
    1111.     * @access    private
    1112. -
    1113.     */
    1114. -
    1115.     function _findRuleTriggerInIndex($statement)
    1116. -
    1117.     {
    1118. -
    1119.         $return=array();
    1120. -
    1121.         //a statement's subject matches all triggers with null and the same URI
    1122. -
    1123.         $subjectLabel=$statement->getLabelSubject();
    1124. -
    1125.         $inIndexS=array();
    1126. -
    1127.         if (isset($this->infRulesTriggerIndex['s']['null'])) 
    1128. -
    1129.             $inIndexS=array_values($this->infRulesTriggerIndex['s']['null']);
    1130. -
    1131.         if (isset($this->infRulesTriggerIndex['s'][$subjectLabel])) 
    1132. -
    1133.             $inIndexSarray_merge($inIndexS,array_values($this->infRulesTriggerIndex['s'][$subjectLabel]));
    1134. -
    1135.         
    1136. -
    1137.             //a statement's predicate matches all triggers with null and the same URI
    1138. -
    1139.         $predicateLabel=$statement->getLabelPredicate();
    1140. -
    1141.         $inIndexP=array();
    1142. -
    1143.         if (isset($this->infRulesTriggerIndex['p']['null'])) 
    1144. -
    1145.             $inIndexP=array_values($this->infRulesTriggerIndex['p']['null']);
    1146. -
    1147.         if (isset($this->infRulesTriggerIndex['p'][$predicateLabel])) 
    1148. -
    1149.             $inIndexParray_merge($inIndexP,array_values($this->infRulesTriggerIndex['p'][$predicateLabel]));
    1150. -
    1151.         
    1152. -
    1153.         //a statement's object matches all triggers with null and the same URI    
    1154. -
    1155.         $objectLabel=$statement->getLabelObject();
    1156. -
    1157.         $inIndexO=array();
    1158. -
    1159.         if (isset($this->infRulesTriggerIndex['o']['null'])) 
    1160. -
    1161.             $inIndexO=array_values($this->infRulesTriggerIndex['o']['null']);
    1162. -
    1163.         if (isset($this->infRulesTriggerIndex['o'][$objectLabel])) 
    1164. -
    1165.             $inIndexOarray_merge($inIndexO,array_values($this->infRulesTriggerIndex['o'][$objectLabel]));
    1166. -
    1167.  
    1168. -
    1169.         //if an infrule position occurs in subject, predicate, and object index, add to result array.        
    1170. -
    1171.         foreach ($inIndexP as $positionP)
    1172. -
    1173.         {
    1174. -
    1175.             if (in_array($positionP,$inIndexO))
    1176. -
    1177.                 if (in_array($positionP,$inIndexS))
    1178. -
    1179.                     $return[]=$positionP;
    1180. -
    1181.         }
    1182. -
    1183.         return $return;
    1184. -
    1185.     }
    1186. -
    1187.     
    1188. -
    1189.     /**
    1190. -
    1191.      * Searches the Entailment-index for a matching Entailment and returns an
    1192. -
    1193.      * array of infRule positions.
    1194. -
    1195.     * 
    1196. -
    1197.     *
    1198. -
    1199.     * @param    node or null    $subject
    1200. -
    1201.     * @param    node or null    $predicate
    1202. -
    1203.     * @param    node or null    $object
    1204. -
    1205.     * @return    array    integer
    1206. -
    1207.     * @access    private
    1208. -
    1209.     */
    1210. -
    1211.     function _findRuleEntailmentInIndex($subject,$predicate,$object)
    1212. -
    1213.     {
    1214. -
    1215.         $return=array();
    1216. -
    1217.         //a node matches all entailments with NULL or a matching URI
    1218. -
    1219.         if(is_a($subject,'Node'))
    1220. -
    1221.         {
    1222. -
    1223.             $subjectLabel=$subject->getLabel();
    1224. -
    1225.             $inIndexS=array();
    1226. -
    1227.             if (isset($this->infRulesEntailIndex['s']['null'])) $inIndexS=array_values($this->infRulesEntailIndex['s']['null']);
    1228. -
    1229.             if (isset($this->infRulesEntailIndex['s'][$subjectLabel])) $inIndexSarray_merge($inIndexS,array_values($this->infRulesEntailIndex['s'][$subjectLabel]));
    1230. -
    1231.         else 
    1232. -
    1233.         //if the subject search pattern is NULL, every rule will match the subject search patter
    1234. -
    1235.         {
    1236. -
    1237.             $inIndexS=array_keys($this->infRules);
    1238. -
    1239.         }
    1240. -
    1241.         
    1242. -
    1243.         if(is_a($predicate,'Node'))
    1244. -
    1245.         {
    1246. -
    1247.             $predicateLabel=$predicate->getLabel();
    1248. -
    1249.             $inIndexP=array();
    1250. -
    1251.             if (isset($this->infRulesEntailIndex['p']['null'])) $inIndexP=array_values($this->infRulesEntailIndex['p']['null']);
    1252. -
    1253.             if (isset($this->infRulesEntailIndex['p'][$predicateLabel])) $inIndexParray_merge($inIndexP,array_values($this->infRulesEntailIndex['p'][$predicateLabel]));
    1254. -
    1255.         }  else 
    1256. -
    1257.         {
    1258. -
    1259.             $inIndexP=array_keys($this->infRules);
    1260. -
    1261.         }
    1262. -
    1263.         
    1264. -
    1265.         if(is_a($object,'Node'))
    1266. -
    1267.         {
    1268. -
    1269.             $objectLabel=$object->getLabel();
    1270. -
    1271.             $inIndexO=array();
    1272. -
    1273.             if (isset($this->infRulesEntailIndex['o']['null'])) $inIndexO=array_values($this->infRulesEntailIndex['o']['null']);
    1274. -
    1275.             if (isset($this->infRulesEntailIndex['o'][$objectLabel])) $inIndexOarray_merge($inIndexO,array_values($this->infRulesEntailIndex['o'][$objectLabel]));
    1276. -
    1277.         else 
    1278. -
    1279.         {
    1280. -
    1281.             $inIndexO=array_keys($this->infRules);
    1282. -
    1283.         }    
    1284. -
    1285.         
    1286. -
    1287.         //if an infrule position occurs in subject, predicate, and object index, add to result array.    
    1288. -
    1289.         foreach ($inIndexP as $positionP)
    1290. -
    1291.         {
    1292. -
    1293.             if (in_array($positionP,$inIndexO))
    1294. -
    1295.                 if (in_array($positionP,$inIndexS))
    1296. -
    1297.                     $return[]=$positionP;
    1298. -
    1299.         }
    1300. -
    1301.         return $return;
    1302. -
    1303.     }
    1304. -
    1305.     
    1306. -
    1307.     /**
    1308. -
    1309.      * Adds an InfRule to the InfModel.
    1310. -
    1311.      * $statementPosition states the positiion of the statement, that created
    1312. -
    1313.      * this rule, in the model->triples array.
    1314. -
    1315.     * 
    1316. -
    1317.     *
    1318. -
    1319.     * @param    object Infrule    $infRule 
    1320. -
    1321.     * @param    integer    $statementPosition 
    1322. -
    1323.     * @access    private
    1324. -
    1325.     */
    1326. -
    1327.     function _addInfRule($infRule$statementPosition)
    1328. -
    1329.     {
    1330. -
    1331.         //add the rule
    1332. -
    1333.         $this->infRules[]=$infRule;            
    1334. -
    1335.         //get the position of the added rule in the model
    1336. -
    1337.         end($this->infRules);
    1338. -
    1339.         $rulePosition=key($this->infRules);
    1340. -
    1341.         //add the information to the index, that this statement 
    1342. -
    1343.         //added this rule.
    1344. -
    1345.         $this->statementRuleIndex[$statementPosition][$rulePosition]=true;
    1346. -
    1347.         //add informations to index over trigger & entailment
    1348. -
    1349.         $this->_addInfruleToIndex($infRule,$rulePosition);
    1350. -
    1351.     }
    1352. -
    1353.  }
    1354. -
    1355. ?>
    1356. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelB.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelB.php.html deleted file mode 100755 index 7e756355..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelB.php.html +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - File Source for InfModelB.php - - - - - -

    Source for file InfModelB.php

    -

    Documentation is available at InfModelB.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfModelB
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    14. -
    15. * Only the loaded or added base-triples are stored.
    16. -
    17. * A find-query evaluates the inference rules and recursively tries to find the statements.
    18. -
    19. * InfModelB memorises "Dead-Ends" until the next add() command, thus
    20. -
    21. * makin a second find much faster.
    22. -
    23. * InfModelB is safe for loops in Ontologies, that would cause infinite loops.
    24. -
    25. * WARNING: A find(null,null,null) might take very long.
    26. -
    27. *
    28. -
    29. @version  $Id: fsource_infModel__infModelInfModelB.php.html 442 2007-06-01 16:19:26Z cax $
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33.  
    34. -
    35. *
    36. -
    37. @package infModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43.  
    44. -
    45. class InfModelB extends InfModel 
    46. -
    47. {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Array that holds combinations of inference rules with distinct
    54. -
    55.     * find-querys, that don't lead to any inference.
    56. -
    57.     *
    58. -
    59.     * @var        array 
    60. -
    61.     * @access    private
    62. -
    63.     */
    64. -
    65.      var $findDeadEnds;
    66. -
    67.      
    68. -
    69.          
    70. -
    71.        /**
    72. -
    73.     * Constructor
    74. -
    75.     * You can supply a base_uri
    76. -
    77.     *
    78. -
    79.     * @param string $baseURI 
    80. -
    81.     * @access    public
    82. -
    83.     */    
    84. -
    85.      function InfModelB($baseURI null)
    86. -
    87.      {
    88. -
    89.          parent::InfModel($baseURI);
    90. -
    91.          $this->findDeadEnds=array();    
    92. -
    93.      }
    94. -
    95.     
    96. -
    97.     /**
    98. -
    99.     * Adds a new triple to the Model without checking, if the statement
    100. -
    101.     * is already in the Model. So if you want a duplicate free Model use
    102. -
    103.     * the addWithoutDuplicates() function (which is slower then add())
    104. -
    105.     *
    106. -
    107.     * @param    object Statement    $statement 
    108. -
    109.     * @access    public
    110. -
    111.     * @throws    PhpError
    112. -
    113.     */     
    114. -
    115.      function add($statement)
    116. -
    117.      {
    118. -
    119.          parent::add($statement);
    120. -
    121.          //Reset the found dead-ends.
    122. -
    123.          $this->findDeadEnds=array();    
    124. -
    125.      }
    126. -
    127.      
    128. -
    129.     /**
    130. -
    131.     * General method to search for triples.
    132. -
    133.     * NULL input for any parameter will match anything.
    134. -
    135.     * Example:  $result = $m->find( NULL, NULL, $node );
    136. -
    137.     * Finds all triples with $node as object.
    138. -
    139.     * Returns an empty MemModel if nothing is found.
    140. -
    141.     * To improve the search speed with big Models, call index(INDEX_TYPE)
    142. -
    143.     * before seaching.
    144. -
    145.      *
    146. -
    147.     * It recursively searches in the statements and rules to find
    148. -
    149.     * matching statements.
    150. -
    151.     *
    152. -
    153.     * @param    object Node    $subject 
    154. -
    155.     * @param    object Node    $predicate 
    156. -
    157.     * @param    object Node    $object 
    158. -
    159.     * @return    object MemModel 
    160. -
    161.     * @access    public
    162. -
    163.     * @throws    PhpError
    164. -
    165.     */
    166. -
    167.     function find($subject,$predicate,$object
    168. -
    169.     {
    170. -
    171.         $searchStringIndex=array();
    172. -
    173.         $resultModel=new MemModel();
    174. -
    175.         
    176. -
    177.         //add all infered statements without duplicates to the result model
    178. -
    179.         foreach ($this->_infFind($subject,$predicate,$object,array())as $statement)
    180. -
    181.         {
    182. -
    183.             $resultModel->addWithoutDuplicates($statement);    
    184. -
    185.         };
    186. -
    187.         return $resultModel;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.      * This is the main inference method of the InfModelB
    196. -
    197.      * The algorithm works as follows:
    198. -
    199.      * Find all statements in the base model, that matches the current
    200. -
    201.      * find-query.
    202. -
    203.      * Check all rules, if they are able to deliver infered statements,
    204. -
    205.      * that match the current find-query. Don't use rules with queries,
    206. -
    207.      * that lead to dead-ends and don't use a rule-query-combination that
    208. -
    209.      * was used before in this branch (ontology loops).
    210. -
    211.      * If a rule is possible do deliver such statements, get a new
    212. -
    213.      * find-query, that is possible to find those statements, that are able
    214. -
    215.      * to trigger this rule.
    216. -
    217.      * Call this _infFind method wirh the new find-query and entail the
    218. -
    219.      * resulting statements.
    220. -
    221.      * If this rule, wasn't able to return any statements with this distinct
    222. -
    223.      * query, add this combination to the dead-ends.
    224. -
    225.      * Return the statements from the base triples and those, which were infered.
    226. -
    227.      *
    228. -
    229.      * If $findOnlyFirstMatching is set to true, only the first match in
    230. -
    231.      * the base-statements is entailed an returned (used in contains() and
    232. -
    233.      * findFirstMatchingStatement() methods).
    234. -
    235.      *
    236. -
    237.      * You can set an offset to look for the first matching statement by setting the
    238. -
    239.      * $offset var.
    240. -
    241.      * 
    242. -
    243.     * It recursively searches in the statements and rules to find matching
    244. -
    245.     * statements
    246. -
    247.     *
    248. -
    249.     * @param    object Node    $subject 
    250. -
    251.     * @param    object Node    $predicate 
    252. -
    253.     * @param    object Node    $object 
    254. -
    255.     * @param    array        $searchStringIndex 
    256. -
    257.     * @param    boolean     $findOnlyFirstMatching 
    258. -
    259.     * @param    integer     $offset 
    260. -
    261.     * @param    integer     $resultCount 
    262. -
    263.     * @return    object array Statements
    264. -
    265.     * @access    private
    266. -
    267.     */
    268. -
    269.     function _infFind ($subject,$predicate,$object$searchStringIndex$findOnlyFirstMatching false$offset 0,$resultCount )
    270. -
    271.     {
    272. -
    273.         $return=array();
    274. -
    275.         //Find all matching statements in the base statements
    276. -
    277.         $findResult=parent::find($subject,$predicate,$object);
    278. -
    279.         //For all found statements
    280. -
    281.         foreach ($findResult->triples as $statement)
    282. -
    283.             {
    284. -
    285.                 $return[]=$statement;
    286. -
    287.                 $resultCount++;
    288. -
    289.  
    290. -
    291.                 //Return, if only the firstMatchingStatement was wanted
    292. -
    293.                 if ($findOnlyFirstMatching && $resultCount $offset)
    294. -
    295.                     return $return;
    296. -
    297.             };
    298. -
    299.             
    300. -
    301.         //Don't infer statements about the schema (rdfs:subClass, etc..)
    302. -
    303.         //is false
    304. -
    305.         if ($predicate == null || 
    306. -
    307.             (is_a($predicate,'Node'&& 
    308. -
    309.             !in_array($predicate->getLabel(),$this->supportedInference))
    310. -
    311.             )
    312. -
    313.             //Check only Rules, that the EntailmentIndex returned.
    314. -
    315.                foreach ($this->_findRuleEntailmentInIndex($subject,$predicate,$objectas $ruleKey)
    316. -
    317.             {
    318. -
    319.                 $infRule=$this->infRules[$ruleKey];
    320. -
    321.                 $serializedRuleStatement=$ruleKey.serialize($subject).serialize($predicate).serialize($object);
    322. -
    323.                 //If it is to ontology loop and no dead-end
    324. -
    325.                 if (!in_array($serializedRuleStatement$searchStringIndex&& 
    326. -
    327.                     !in_array($serializedRuleStatement$this->findDeadEnds))
    328. -
    329.                 {    
    330. -
    331.                     //Keep this distinct rule query cobination for 
    332. -
    333.                     //this branch to detect loops
    334. -
    335.                     $searchStringIndex[]=$serializedRuleStatement;    
    336. -
    337.                     
    338. -
    339.                     //If the rule is able to deliver statements that match 
    340. -
    341.                     //this query
    342. -
    343.                     if ($infRule->checkEntailment($subject,$predicate,$object))
    344. -
    345.                     {
    346. -
    347.                         //Get a modified find-query, that matches statements, 
    348. -
    349.                         //that trigger this rule
    350. -
    351.                         $modefiedFind=$infRule->getModifiedFind($subject,$predicate,$object);
    352. -
    353.                         //Call this method with the new find-query
    354. -
    355.                         $infFindResult=$this->_infFind($modefiedFind['s'],
    356. -
    357.                                                         $modefiedFind['p'],
    358. -
    359.                                                         $modefiedFind['o']
    360. -
    361.                                                         $searchStringIndex
    362. -
    363.                                                         $findOnlyFirstMatching,
    364. -
    365.                                                         $offset,
    366. -
    367.                                                         $resultCount;
    368. -
    369.                         //If it deliverd statements that matches the trigger
    370. -
    371.                         if (isset($infFindResult[0]))
    372. -
    373.                         {
    374. -
    375.                             foreach ($infFindResult as $statement)
    376. -
    377.                             {    
    378. -
    379.                                 //Entail the statements and check, if they are not about the 
    380. -
    381.                                 //ontology
    382. -
    383.                                 $newStatement=$infRule->entail($statement);
    384. -
    385.                                 if (!in_array($newStatement->getLabelPredicate(),$this->supportedInference))
    386. -
    387.                                     //Check if, the entailed statements are, what we are looking for
    388. -
    389.                                     if($this->_nodeEqualsFind($subject,$newStatement->getSubject()) && 
    390. -
    391.                                         $this->_nodeEqualsFind($predicate,$newStatement->getPredicate()) && 
    392. -
    393.                                         $this->_nodeEqualsFind($object,$newStatement->getObject() ) )
    394. -
    395.                                     {
    396. -
    397.                                         //Add to results
    398. -
    399.                                         $return[]=$newStatement;
    400. -
    401.                                         $resultCount++;
    402. -
    403.                                         
    404. -
    405.                                         //or return at once
    406. -
    407.                                         if ($findOnlyFirstMatching && $resultCount $offset)
    408. -
    409.                                             return $return;
    410. -
    411.                                     }
    412. -
    413.                                }
    414. -
    415.                         else 
    416. -
    417.                         {
    418. -
    419.                             //If there were no results of the rule-query-combination, 
    420. -
    421.                             //mark this combination as a dead-end.
    422. -
    423.                             $this->findDeadEnds[]=$serializedRuleStatement;
    424. -
    425.                         }
    426. -
    427.                     }
    428. -
    429.                 }    
    430. -
    431.         }
    432. -
    433.         //Return the array of the found statements
    434. -
    435.         return $return;    
    436. -
    437.     }
    438. -
    439.     
    440. -
    441.      /**
    442. -
    443.     * Tests if the Model contains the given triple.
    444. -
    445.     * TRUE if the triple belongs to the Model;
    446. -
    447.     * FALSE otherwise.
    448. -
    449.     * 
    450. -
    451.     * @param    object Statement    &$statement 
    452. -
    453.     * @return    boolean 
    454. -
    455.     * @access    public
    456. -
    457.     */
    458. -
    459.     function contains(&$statement
    460. -
    461.     {
    462. -
    463.     //throws an error, if $statement is not of class Statement
    464. -
    465.     if(!is_a($statement,'Statement'))
    466. -
    467.         trigger_error(RDFAPI_ERROR '(class: InfModelB; method: contains): 
    468. -
    469.             $statement has to be object of class Statement'E_USER_ERROR);    
    470. -
    471.     
    472. -
    473.     //Call the _infFind method, but let it stop, if it finds the first match.    
    474. -
    475.     if (count$this->_infFind($statement->getSubject(),
    476. -
    477.                                 $statement->getPredicate(),
    478. -
    479.                                 $statement->getObject(),
    480. -
    481.                                 array(),true) ) >0)
    482. -
    483.         {
    484. -
    485.             return true;
    486. -
    487.         else 
    488. -
    489.         {
    490. -
    491.             return false;
    492. -
    493.         };
    494. -
    495.     }
    496. -
    497.     
    498. -
    499.   /**
    500. -
    501.    * Searches for triples and returns the first matching statement.
    502. -
    503.    * NULL input for any parameter will match anything.
    504. -
    505.    * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    506. -
    507.    * Returns the first statement of the MemModel where the object equals $node.
    508. -
    509.    * Returns an NULL if nothing is found.
    510. -
    511.    * You can define an offset to search for. Default = 0
    512. -
    513.    *
    514. -
    515.    * @param    object Node    $subject 
    516. -
    517.    * @param    object Node    $predicate 
    518. -
    519.    * @param    object Node    $object 
    520. -
    521.    * @param    integer    $offset 
    522. -
    523.    * @return    object Statement 
    524. -
    525.    * @access    public
    526. -
    527.    */
    528. -
    529.    function findFirstMatchingStatement($subject$predicate$object$offset 0
    530. -
    531.     {
    532. -
    533.         //Call the _infFind method, but let it stop, if it finds the 
    534. -
    535.         //first match.    
    536. -
    537.            $res$this->_infFind($subject,$predicate,$object,array(),true,$offset);
    538. -
    539.                
    540. -
    541.         if (isset($res[$offset]))
    542. -
    543.         {
    544. -
    545.             return $res[$offset];
    546. -
    547.         else 
    548. -
    549.         {
    550. -
    551.             return NULL;
    552. -
    553.         };
    554. -
    555.     }  
    556. -
    557.  
    558. -
    559.     /**
    560. -
    561.     * Returns a StatementIterator for traversing the Model.
    562. -
    563.     *
    564. -
    565.     * @access    public
    566. -
    567.     * @return    object    StatementIterator 
    568. -
    569.     */  
    570. -
    571.     function getStatementIterator(
    572. -
    573.     {
    574. -
    575.         // Import Package Utility
    576. -
    577.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    578. -
    579.         // Gets a MemModel by executing a find(null,null,null) to get a 
    580. -
    581.         //inferable statements.    
    582. -
    583.         // WARNING: might be slow
    584. -
    585.         return new StatementIterator($this->getMemModel());
    586. -
    587.     }    
    588. -
    589.     
    590. -
    591.     /**
    592. -
    593.     * Number of all inferable triples in the Model.
    594. -
    595.     * WARNING: uses a find(null,null,null) to find all statements! (might take a while)
    596. -
    597.     * 
    598. -
    599.     * @param     boolean 
    600. -
    601.     * @return    integer 
    602. -
    603.     * @access    public
    604. -
    605.     */
    606. -
    607.     function size()
    608. -
    609.     {
    610. -
    611.         // Gets a MemModel by executing a find(null,null,null) to get a 
    612. -
    613.         //inferable statements.    
    614. -
    615.         // WARNING: might be slow
    616. -
    617.            $res $this->getMemModel();
    618. -
    619.            return $res->size();
    620. -
    621.     }
    622. -
    623.         
    624. -
    625.     /**
    626. -
    627.     * Create a MemModel containing all the triples (including inferred
    628. -
    629.     * statements) of the current InfModelB.
    630. -
    631.     *
    632. -
    633.     * @return object MemModel 
    634. -
    635.     * @access public
    636. -
    637.     */
    638. -
    639.     function getMemModel(
    640. -
    641.     {
    642. -
    643.         
    644. -
    645.         $return=$this->find(null,null,null);
    646. -
    647.         $return->setBaseURI($this->baseURI);
    648. -
    649.         $return->addParsedNamespaces($this->getParsedNamespaces());
    650. -
    651.         return $return;
    652. -
    653.     }
    654. -
    655.  
    656. -
    657.     /**
    658. -
    659.     * Create a MemModel containing only the base triples (without inferred
    660. -
    661.     * statements) of the current InfModelB.
    662. -
    663.     *
    664. -
    665.     * @return object MemModel 
    666. -
    667.     * @access public
    668. -
    669.     */
    670. -
    671.     function getBaseMemModel(
    672. -
    673.     {
    674. -
    675.         $returnnew MemModel();
    676. -
    677.         $return->setBaseURI($this->baseURI);
    678. -
    679.         foreach ($this->triples as $statement)
    680. -
    681.             $return->add($statement);
    682. -
    683.             
    684. -
    685.         $retun->addParsedNamespaces($this->getParsedNamespaces());
    686. -
    687.         return $return;
    688. -
    689.     }
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.     * Short Dump of the  InfModelB.
    696. -
    697.     *
    698. -
    699.     * @access    public
    700. -
    701.     * @return    string 
    702. -
    703.     */  
    704. -
    705.     function toString(
    706. -
    707.     {
    708. -
    709.        return 'InfModelB[baseURI=' $this->getBaseURI(';  size=' $this->size(true']';
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.     /**
    716. -
    717.     * Dumps of the InfModelB including ALL inferable triples.
    718. -
    719.     *
    720. -
    721.     * @access    public
    722. -
    723.     * @return    string 
    724. -
    725.     */  
    726. -
    727.     function toStringIncludingTriples(
    728. -
    729.     {
    730. -
    731.            $dump $this->toString(chr(13);
    732. -
    733.            $stateIt=new StatementIterator($this->find(null,null,null));
    734. -
    735.         while($statement=$stateIt->next())
    736. -
    737.         {
    738. -
    739.                $dump .= $statement->toString(chr(13);
    740. -
    741.            }
    742. -
    743.            return $dump;
    744. -
    745.     }  
    746. -
    747.  
    748. -
    749.     /**
    750. -
    751.     * Saves the RDF,N3 or N-Triple serialization of the full InfModelB
    752. -
    753.     * (including inferred triples) to a file.
    754. -
    755.     * You can decide to which format the model should be serialized by
    756. -
    757.     * using a corresponding suffix-string as $type parameter. If no $type
    758. -
    759.     * parameter is placed this method will serialize the model to XML/RDF
    760. -
    761.     * format.
    762. -
    763.     * Returns FALSE if the InfModelB couldn't be saved to the file.
    764. -
    765.     *
    766. -
    767.     * @access    public
    768. -
    769.     * @param     string     $filename 
    770. -
    771.     * @param     string     $type 
    772. -
    773.     * @throws   PhpError
    774. -
    775.     * @return    boolean 
    776. -
    777.     */  
    778. -
    779.     function saveAs($filename$type ='rdf'
    780. -
    781.     {
    782. -
    783.     
    784. -
    785.         $memmodel=$this->getMemModel();
    786. -
    787.         return $memmodel->saveAs($filename$type);
    788. -
    789.     
    790. -
    791.  
    792. -
    793.     /**
    794. -
    795.     * Writes the RDF serialization of the Model including ALL inferable
    796. -
    797.     * triples as HTML.
    798. -
    799.     *
    800. -
    801.     * @access    public
    802. -
    803.     */  
    804. -
    805.     function writeAsHtml(
    806. -
    807.     {
    808. -
    809.             require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    810. -
    811.         $ser new RdfSerializer();
    812. -
    813.         $rdf =$ser->serialize($this->getMemModel());
    814. -
    815.         $rdf htmlspecialchars($rdfENT_QUOTES);
    816. -
    817.         $rdf str_replace(' ''&nbsp;'$rdf);
    818. -
    819.         $rdf nl2br($rdf);
    820. -
    821.         echo $rdf
    822. -
    823.     }  
    824. -
    825.  
    826. -
    827.     /**
    828. -
    829.     * Writes the RDF serialization of the Model including ALL inferable
    830. -
    831.     * triples as HTML table.
    832. -
    833.     *
    834. -
    835.     * @access    public
    836. -
    837.     */  
    838. -
    839.     function writeAsHtmlTable(
    840. -
    841.     {
    842. -
    843.             // Import Package Utility
    844. -
    845.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);               
    846. -
    847.         RDFUtil::writeHTMLTable($this->getMemModel());
    848. -
    849.     }  
    850. -
    851.     
    852. -
    853.     
    854. -
    855.     /**
    856. -
    857.     * Writes the RDF serialization of the Model including ALL inferable
    858. -
    859.     * triples.
    860. -
    861.     *
    862. -
    863.     * @access    public
    864. -
    865.     * @return    string 
    866. -
    867.     */  
    868. -
    869.     function writeRdfToString(
    870. -
    871.     {
    872. -
    873.            // Import Package Syntax
    874. -
    875.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);           
    876. -
    877.         $ser new RdfSerializer();
    878. -
    879.         $rdf =$ser->serialize($this->getMemModel());
    880. -
    881.         return $rdf;
    882. -
    883.     }    
    884. -
    885.  
    886. -
    887.     /**
    888. -
    889.     * Removes the triple from the MemModel.
    890. -
    891.     * TRUE if the triple is removed.
    892. -
    893.     * FALSE otherwise.
    894. -
    895.     *
    896. -
    897.     * Checks, if it touches any statements, that added inference rules
    898. -
    899.     * to the model.
    900. -
    901.     *
    902. -
    903.     * @param    object Statement    $statement 
    904. -
    905.     * @return   boolean 
    906. -
    907.     * @access    public
    908. -
    909.     * @throws    PhpError
    910. -
    911.     */
    912. -
    913.     function remove($statement)
    914. -
    915.     {
    916. -
    917.         if (parent::contains($statement))
    918. -
    919.         {
    920. -
    921.             if (in_array($statement->getLabelPredicate(),$this->supportedInference));
    922. -
    923.                 while (count($this->_removeFromInference($statement))>0);
    924. -
    925.                 
    926. -
    927.             $this->findDeadEnds=array();
    928. -
    929.             return parent::remove($statement);
    930. -
    931.         else 
    932. -
    933.         {
    934. -
    935.             return false;
    936. -
    937.         }
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     /**
    944. -
    945.     * Checks, if a single node matches a single find pattern.
    946. -
    947.     * TRUE if the node matches.
    948. -
    949.     * FALSE otherwise.
    950. -
    951.     *
    952. -
    953.     * Checks, if it touches any statements, that added inference rules
    954. -
    955.     * to the model.
    956. -
    957.     *
    958. -
    959.     * @param    object Statement    $statement 
    960. -
    961.     * @return   boolean 
    962. -
    963.     * @access    private
    964. -
    965.     */
    966. -
    967.     function _nodeEqualsFind($find$node)
    968. -
    969.     {
    970. -
    971.         //If the find pattern is a node, use the nodes equal-method and 
    972. -
    973.         //return the result.
    974. -
    975.         if (is_a($find,'Node'))
    976. -
    977.             return $node->equals($find);
    978. -
    979.         
    980. -
    981.         //Null-pattern matches anything.
    982. -
    983.         if ($find == null)
    984. -
    985.         {
    986. -
    987.             return true;
    988. -
    989.         else 
    990. -
    991.         {
    992. -
    993.             return false;
    994. -
    995.         }
    996. -
    997.     }
    998. -
    999.     
    1000. -
    1001.     /**
    1002. -
    1003.     * Returns a FindIterator for traversing the MemModel.
    1004. -
    1005.     * Disabled in InfModelB.
    1006. -
    1007.     *
    1008. -
    1009.     * @access    public
    1010. -
    1011.     * @return    object    FindIterator 
    1012. -
    1013.     */  
    1014. -
    1015.     function findAsIterator($sub=null,$pred=null,$obj=null{
    1016. -
    1017.         $errmsg RDFAPI_ERROR '(class: InfModelB; method: findAsIterator): 
    1018. -
    1019.                                     This function is disabled in the
    1020. -
    1021.                                     Inference Model';
    1022. -
    1023.         trigger_error($errmsgE_USER_ERROR)
    1024. -
    1025.     }      
    1026. -
    1027. }
    1028. -
    1029. ?>
    1030. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:27 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelF.php.html deleted file mode 100755 index bd2fd4f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfModelF.php.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - File Source for InfModelF.php - - - - - -

    Source for file InfModelF.php

    -

    Documentation is available at InfModelF.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfModelF
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    14. -
    15. * If a new statement is added, it is enferd at
    16. -
    17. * once and all the entailed statements are added too.
    18. -
    19. * When adding or removing a statement, that produced a new inference rule,
    20. -
    21. * all entailed statements are discarded and the whole base model is infered
    22. -
    23. * again.
    24. -
    25. * The InfModelF is safe for loops in Ontologies, that would cause infinite loops.
    26. -
    27. *
    28. -
    29. @version  $Id: fsource_infModel__infModelInfModelF.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33.  
    34. -
    35. *
    36. -
    37. @package infModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43.  
    44. -
    45. class InfModelF extends InfModel 
    46. -
    47. {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Array that holds the position of the infered statements in the model.
    54. -
    55.     *
    56. -
    57.     * @var        array 
    58. -
    59.     * @access    private
    60. -
    61.     */    
    62. -
    63.     var $infPos;
    64. -
    65.     
    66. -
    67.     
    68. -
    69.     /**
    70. -
    71.     * Variable that influences the habbit when adding statements.
    72. -
    73.     * Used by the loadModel method to increase performance.
    74. -
    75.     *
    76. -
    77.     * @var        boolean 
    78. -
    79.     * @access    private
    80. -
    81.     */
    82. -
    83.     var $inferenceEnabled;
    84. -
    85.     
    86. -
    87.         
    88. -
    89.        /**
    90. -
    91.     * Constructor
    92. -
    93.     * You can supply a base_uri.
    94. -
    95.     *
    96. -
    97.     * @param string $baseURI 
    98. -
    99.     * @access    public
    100. -
    101.     */        
    102. -
    103.     function InfModelF($baseURI NULL)
    104. -
    105.     {
    106. -
    107.         parent::InfModel($baseURI);
    108. -
    109.         $this->infPos=array();
    110. -
    111.         $this->inferenceEnabled=true;    
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Adds a new triple to the MemModel without checking if the statement
    120. -
    121.     * is already in the MemModel.
    122. -
    123.     * So if you want a duplicate free MemModel use the addWithoutDuplicates()
    124. -
    125.     * function (which is slower then add())
    126. -
    127.     * The statement is infered and all entailed statements are added.
    128. -
    129.     *
    130. -
    131.     * @param    object Statement    $statement 
    132. -
    133.     * @access    public
    134. -
    135.     * @throws    PhpError
    136. -
    137.     */
    138. -
    139.     function add ($statement)
    140. -
    141.     {
    142. -
    143.         parent::add($statement);
    144. -
    145.         if ($this->inferenceEnabled)
    146. -
    147.         {
    148. -
    149.             foreach ($this->entailStatement($statementas $state)
    150. -
    151.             {
    152. -
    153.                 //a addWithoutDublicates construct
    154. -
    155.                 if(!$this->contains($state))
    156. -
    157.                 {
    158. -
    159.             
    160. -
    161.                     parent::add($state);
    162. -
    163.                     //save the position of the infered statements
    164. -
    165.                     end($this->triples);
    166. -
    167.                     $this->infPos[]=key($this->triples);
    168. -
    169.                 };
    170. -
    171.             }
    172. -
    173.         //apply the complete inference to the model, if the added statement was able to add a rule
    174. -
    175.         if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    176. -
    177.             $this->applyInference();
    178. -
    179.         }
    180. -
    181.     }
    182. -
    183.     
    184. -
    185.  
    186. -
    187.     /**
    188. -
    189.     * Checks if a new statement is already in the MemModel and adds
    190. -
    191.     * the statement, if it is not in the MemModel.
    192. -
    193.     * addWithoutDuplicates() is significantly slower then add().
    194. -
    195.     * Retruns TRUE if the statement is added.
    196. -
    197.     * FALSE otherwise.
    198. -
    199.     * The statement is infered and all entailed statements are added.
    200. -
    201.     *
    202. -
    203.     * @param    object Statement    $statement 
    204. -
    205.     * @return   boolean 
    206. -
    207.     * @access    public
    208. -
    209.     * @throws    PhpError
    210. -
    211.     */    
    212. -
    213.      function addWithoutDuplicates($statement
    214. -
    215.      {
    216. -
    217.         if(!$this->contains($statement))
    218. -
    219.         {
    220. -
    221.              parent::add($statement);
    222. -
    223.              if ($this->inferenceEnabled)
    224. -
    225.              {
    226. -
    227.                 foreach ($this->entailStatement($statementas $statement)
    228. -
    229.                 {
    230. -
    231.                     if(!$this->contains($statement))
    232. -
    233.                         {
    234. -
    235.                             parent::add($statement);
    236. -
    237.                             //save the position of the infered statements
    238. -
    239.                             end($this->triples);
    240. -
    241.                             $this->infPos[]=key($this->triples);
    242. -
    243.                         };
    244. -
    245.                 };
    246. -
    247.             if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    248. -
    249.                 $this->applyInference();
    250. -
    251.              }
    252. -
    253.             return true;
    254. -
    255.          }
    256. -
    257.          return false;
    258. -
    259.      }
    260. -
    261.  
    262. -
    263.     
    264. -
    265.  
    266. -
    267.     /**
    268. -
    269.     * Entails every statement and adds the entailments if not already
    270. -
    271.     * in the model.
    272. -
    273.     *
    274. -
    275.     * @access    private
    276. -
    277.     */        
    278. -
    279.     function applyInference()
    280. -
    281.     {
    282. -
    283.         //check every statement in the model
    284. -
    285.         foreach ($this->triples as $statement)
    286. -
    287.         {
    288. -
    289.             //gat all statements, that it recursively entails
    290. -
    291.             foreach ($this->entailStatement($statementas $statement)
    292. -
    293.             {
    294. -
    295.                 if (!$this->contains($statement))
    296. -
    297.                 {
    298. -
    299.                     parent::add($statement);
    300. -
    301.                     //add the InfStatement position to the index
    302. -
    303.                     end($this->triples);
    304. -
    305.                     $this->infPos[]=key($this->triples);
    306. -
    307.                 };
    308. -
    309.             };
    310. -
    311.         };
    312. -
    313.     }
    314. -
    315.     
    316. -
    317.  
    318. -
    319.     /**
    320. -
    321.     * Entails a statement by recursively using the _entailStatementRec
    322. -
    323.     * method.
    324. -
    325.     * 
    326. -
    327.     * @param    object Statement    $statement 
    328. -
    329.     * @return   array of statements
    330. -
    331.     * @access    public
    332. -
    333.     */            
    334. -
    335.     function entailStatement ($statement)
    336. -
    337.     {
    338. -
    339.         $infStatementsIndex=array();
    340. -
    341.         return $this->_entailStatementRec($statement,$infStatementsIndex);
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Recursive method, that checks the statement with the trigger of
    350. -
    351.     * every rule. If the trigger matches and entails new statements,
    352. -
    353.     * those statements are recursively infered too.
    354. -
    355.     * The $infStatementsIndex array holds lready infered statements
    356. -
    357.     * to prevent infinite loops.
    358. -
    359.     *
    360. -
    361.     * 
    362. -
    363.     * @param    object Statement $statement 
    364. -
    365.     * @param    array $infStatementsIndex 
    366. -
    367.     * @return   array of statements
    368. -
    369.     * @access    private
    370. -
    371.     */
    372. -
    373.     function _entailStatementRec $statement,$infStatementsIndex)
    374. -
    375.     {
    376. -
    377.         $infStatements array();
    378. -
    379.         $return array();
    380. -
    381.         
    382. -
    383.         //dont entail statements about the supported inference-schema
    384. -
    385.         if (!in_array($statement->getLabelPredicate(),$this->supportedInference))
    386. -
    387.         {
    388. -
    389.             //check only the rules, that were returned by the index
    390. -
    391.             foreach ($this->_findRuleTriggerInIndex($statementas $key )
    392. -
    393.             {
    394. -
    395.                 $infRule=$this->infRules[$key];
    396. -
    397.     
    398. -
    399.                 $stateString=$key.serialize($statement);
    400. -
    401.                 //If the statement wasn't infered before
    402. -
    403.                 if (!in_array($stateString,$infStatementsIndex))
    404. -
    405.                 {
    406. -
    407.                     $infStatementsIndex[]=$stateString;
    408. -
    409.                     //Check, if the Statements triggers this rule
    410. -
    411.                     if($infRule->checkTrigger($statement))
    412. -
    413.                     {
    414. -
    415.                         $infStatement=$infRule->entail($statement);
    416. -
    417.                         #if(!$this->contains($infStatement))
    418. -
    419.                         {
    420. -
    421.                             $return[]=$infStatement;
    422. -
    423.                             $return=array_merge($return,
    424. -
    425.                                                 $this->_entailStatementRec($infStatement
    426. -
    427.                                                                             $infStatementsIndex));
    428. -
    429.                         };    
    430. -
    431.                                                                         
    432. -
    433.                     };
    434. -
    435.                 };
    436. -
    437.             };
    438. -
    439.         };    
    440. -
    441.         return $return;
    442. -
    443.     }
    444. -
    445.     
    446. -
    447.     /**
    448. -
    449.     * Removes all infered statements from the model but keeps the
    450. -
    451.     * infernece rules.
    452. -
    453.     *
    454. -
    455.     * @access    public
    456. -
    457.     */     
    458. -
    459.     function removeInfered()
    460. -
    461.     {
    462. -
    463.         $indexTmp=$this->indexed;
    464. -
    465.         $this->index(-1);
    466. -
    467.         foreach ($this->infPos as $key)
    468. -
    469.         {
    470. -
    471.             unset($this->triples[$key]);
    472. -
    473.         };
    474. -
    475.         $this->infPos=array();
    476. -
    477.         $this->index($indexTmp);
    478. -
    479.     }    
    480. -
    481.      
    482. -
    483.      
    484. -
    485.     /**
    486. -
    487.     * Load a model from a file containing RDF, N3 or N-Triples.
    488. -
    489.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    490. -
    491.     * calls a suitable parser, if no $type is given as string
    492. -
    493.     * ("rdf" "n3" "nt");
    494. -
    495.     * If the model is not empty, the contents of the file is added to
    496. -
    497.     * this DbModel.
    498. -
    499.     *
    500. -
    501.     * While loading the model, the inference entailing is disabled, but
    502. -
    503.     * new inference rules are added to increase performance.
    504. -
    505.     * 
    506. -
    507.     * @param     string     $filename 
    508. -
    509.     * @param     string     $type 
    510. -
    511.     * @access    public
    512. -
    513.     */
    514. -
    515.     function load($filename$type NULL
    516. -
    517.     {
    518. -
    519.         //Disable entailing to increase performance
    520. -
    521.          $this->inferenceEnabled=false;
    522. -
    523.          parent::load($filename$type);
    524. -
    525.          //Enable entailing
    526. -
    527.          $this->inferenceEnabled=true;
    528. -
    529.          //Entail all statements
    530. -
    531.          $this->applyInference();
    532. -
    533.      }
    534. -
    535.     
    536. -
    537.     /**
    538. -
    539.     * Short Dump of the InfModelF.
    540. -
    541.     *
    542. -
    543.     * @access    public
    544. -
    545.     * @return    string 
    546. -
    547.     */  
    548. -
    549.     function toString({
    550. -
    551.        return 'InfModelF[baseURI=' $this->getBaseURI(';  
    552. -
    553.                    size=' $this->size(true']';
    554. -
    555.     }
    556. -
    557.         
    558. -
    559.     /**
    560. -
    561.     * Create a MemModel containing all the triples (including inferred
    562. -
    563.     * statements) of the current InfModelF.
    564. -
    565.     *
    566. -
    567.     * @return object MemModel 
    568. -
    569.     * @access public
    570. -
    571.     */
    572. -
    573.     function getMemModel(
    574. -
    575.     {
    576. -
    577.         $returnnew MemModel();
    578. -
    579.         $return->setBaseURI($this->baseURI);
    580. -
    581.         foreach ($this->triples as $statement)
    582. -
    583.             $return->add($statement);
    584. -
    585.         
    586. -
    587.         $return->addParsedNamespaces($this->getParsedNamespaces());    
    588. -
    589.         return $return;
    590. -
    591.     }
    592. -
    593.       
    594. -
    595.     /**
    596. -
    597.     * Create a MemModel containing only the base triples
    598. -
    599.     * (without inferred statements) of the current InfModelF.
    600. -
    601.     *
    602. -
    603.     * @return object MemModel 
    604. -
    605.     * @access public
    606. -
    607.     */
    608. -
    609.     function  getBaseMemModel(
    610. -
    611.     {
    612. -
    613.         $returnnew MemModel();
    614. -
    615.         $return->setBaseURI($this->baseURI);
    616. -
    617.         foreach ($this->triples as $key => $statement)
    618. -
    619.             if (!in_array($key,$this->infPos))
    620. -
    621.                 $return->add($statement);
    622. -
    623.         $retun->addParsedNamespaces($this->getParsedNamespaces());
    624. -
    625.         return $return;
    626. -
    627.     }
    628. -
    629.     
    630. -
    631.     
    632. -
    633.     /**
    634. -
    635.     * Removes the triple from the MemModel.
    636. -
    637.     * TRUE if the triple is removed.
    638. -
    639.     * FALSE otherwise.
    640. -
    641.     *
    642. -
    643.     * Checks, if it touches any statements, that added inference rules
    644. -
    645.     * to the model
    646. -
    647.     *
    648. -
    649.     * @param    object Statement    $statement 
    650. -
    651.     * @return   boolean 
    652. -
    653.     * @access    public
    654. -
    655.     * @throws    PhpError
    656. -
    657.     */
    658. -
    659.     function remove($statement)
    660. -
    661.     {
    662. -
    663.         //If the statement is in the model
    664. -
    665.         if($this->contains($statement))
    666. -
    667.         {
    668. -
    669.             $inferenceRulesWereTouched=false;
    670. -
    671.             //If the statement was able to add inference rules
    672. -
    673.             if (in_array($statement->getLabelPredicate(),$this->supportedInference))
    674. -
    675.             {
    676. -
    677.                 $statementPositions=$this->_removeFromInference($statement);
    678. -
    679.                 $inferenceRulesWereTouched=true;
    680. -
    681.             else 
    682. -
    683.             //get the position of all matching statements
    684. -
    685.             {
    686. -
    687.                 $statementPositions=array();
    688. -
    689.                 //find the positions of the statements
    690. -
    691.                 $statementPosition=-1;
    692. -
    693.                 do
    694. -
    695.                 {
    696. -
    697.                     
    698. -
    699.                     $statementPosition =
    700. -
    701.                     $this->findFirstMatchOff($statement->getSubject(),
    702. -
    703.                                                 $statement->getPredicate(),
    704. -
    705.                                                 $statement->getObject(),
    706. -
    707.                                                 $statementPosition+1);
    708. -
    709.                                                 
    710. -
    711.                     if ($statementPosition!=-1)
    712. -
    713.                         $statementPositions[]=$statementPosition;                            
    714. -
    715.                                                 
    716. -
    717.                 }    while ($statementPosition != -1);            
    718. -
    719.             }
    720. -
    721.             
    722. -
    723.             //remove matching statements
    724. -
    725.             parent::remove($statement);
    726. -
    727.             foreach ($statementPositions as $statementPosition)
    728. -
    729.             {
    730. -
    731.                 //if the statement was infered, remove it from the index of the infered statements.
    732. -
    733.                 if (in_array($statementPosition,$this->infPos))
    734. -
    735.                     unset ($this->infPos[$statementPosition]);
    736. -
    737.             }
    738. -
    739.             if ($inferenceRulesWereTouched)
    740. -
    741.             {
    742. -
    743.                 //remove the statement and re-entail the model
    744. -
    745.                 $this->removeInfered();
    746. -
    747.                 $this->applyInference();
    748. -
    749.             }
    750. -
    751.             return true;
    752. -
    753.         else 
    754. -
    755.         {
    756. -
    757.             return false;    
    758. -
    759.         }
    760. -
    761.     }
    762. -
    763.     
    764. -
    765.     /** 
    766. -
    767.     * Adds another model to this MemModel.
    768. -
    769.     * Duplicate statements are not removed.
    770. -
    771.     * If you don't want duplicates, use unite().
    772. -
    773.     * If any statement of the model to be added to this model contains a blankNode
    774. -
    775.     * with an identifier already existing in this model, a new blankNode is generated.
    776. -
    777.     *
    778. -
    779.     * @param    object Model    $model 
    780. -
    781.     * @access    public
    782. -
    783.     * @throws phpErrpr
    784. -
    785.     *
    786. -
    787.     */
    788. -
    789.     function addModel(&$model)  
    790. -
    791.     {
    792. -
    793.         //Disable entailing to increase performance
    794. -
    795.          $this->inferenceEnabled=false;
    796. -
    797.          parent::addModel($model);
    798. -
    799.          //Enable entailing
    800. -
    801.          $this->inferenceEnabled=true;
    802. -
    803.          //Entail all statements
    804. -
    805.          $this->applyInference();
    806. -
    807.     }
    808. -
    809. };
    810. -
    811. ?>
    812. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfRule.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfRule.php.html deleted file mode 100755 index 58fbdc25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfRule.php.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - File Source for InfRule.php - - - - - -

    Source for file InfRule.php

    -

    Documentation is available at InfRule.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfRule
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * This class represents a single rule in a RDFS inference model.
    14. -
    15.  * It primary constists of a trigger and an entailment.
    16. -
    17.  * In the forward-chaining mode (RDFSFModel) a statement is checked,
    18. -
    19.  * if it satisfies the trigger. If it does, a new statement is returned.
    20. -
    21.  * In the backward-chaining mode (RDFSBModel) a find-query is checked
    22. -
    23.  * with the entailment. If this entailment could satify the find-query,
    24. -
    25.  * a new find-query is returned, that searches for statements that
    26. -
    27.  * satisfy the trigger of this rule.
    28. -
    29.  * 
    30. -
    31.  * @version  $Id: fsource_infModel__infModelInfRule.php.html 443 2007-06-01 16:25:38Z cax $
    32. -
    33.  * @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35.  
    36. -
    37.  *
    38. -
    39.  * @package infModel
    40. -
    41.  * @access    public
    42. -
    43.  ***/
    44. -
    45.  
    46. -
    47. class InfRule 
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Array, that hold the trigger subject in key ['s'], the trigger
    56. -
    57.     * predicate in ['p'], and the trigger object in ['o'].
    58. -
    59.     * The array values can be NULL to match anything or be a node that
    60. -
    61.     * has to be matched.
    62. -
    63.     *
    64. -
    65.     * @var        array 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $trigger;
    72. -
    73.  
    74. -
    75.     /**
    76. -
    77.     * Array, that hold the entailment subject in key ['s'], the
    78. -
    79.     * entailment predicate in ['p'], and the entailment object in ['o'].
    80. -
    81.     * The array values can be a node that will be inserted in the
    82. -
    83.     * returning statement, or '<s>' to insert the subject,'<p>' to insert
    84. -
    85.     * the predicate, or '<o>' to insert the object of the checked statement
    86. -
    87.     * to this position in the new returned statement.
    88. -
    89.     *
    90. -
    91.     * @var        array 
    92. -
    93.     * @access    private
    94. -
    95.     */    
    96. -
    97.      var $entailment;
    98. -
    99.     
    100. -
    101.      
    102. -
    103.    /**
    104. -
    105.     * Constructor
    106. -
    107.     * 
    108. -
    109.     * 
    110. -
    111.     * @access    public
    112. -
    113.     */         
    114. -
    115.      function infRule()
    116. -
    117.      {
    118. -
    119.         //initialising vars
    120. -
    121.         $this->trigger=array();
    122. -
    123.         $this->entailment=array();
    124. -
    125.      }
    126. -
    127.      
    128. -
    129.      /**
    130. -
    131.     * Sets the trigger of this rule
    132. -
    133.     * The values can be NULL to match anything or be a node that has to
    134. -
    135.     * be matched.
    136. -
    137.     *
    138. -
    139.     * @param    object Node OR NULL    $subject
    140. -
    141.        * @param    object Node OR NULL    $predicate
    142. -
    143.        * @param    object Node OR NULL    $object
    144. -
    145.     * @access    public
    146. -
    147.     * @throws    PhpError
    148. -
    149.     */    
    150. -
    151.      function setTrigger ($subject$predicate$object)
    152. -
    153.      {
    154. -
    155.          //throw an error if subject, predicate, or object are neither 
    156. -
    157.          //node, nor null.
    158. -
    159.         if(!is_a($subject,'Node'&& $subject != null
    160. -
    161.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    162. -
    163.                 setTrigger): $subject has to be null or of class Node'
    164. -
    165.                 E_USER_ERROR);
    166. -
    167.         if(!is_a($predicate,'Node'&& $predicate != null
    168. -
    169.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    170. -
    171.                 setTrigger): $predicate has to be null or of class Node'
    172. -
    173.                 E_USER_ERROR);
    174. -
    175.         if(!is_a($object,'Node'&& $object != null
    176. -
    177.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    178. -
    179.                 setTrigger): $object has to be null or of class Node'
    180. -
    181.                 E_USER_ERROR);
    182. -
    183.              
    184. -
    185.          //set the trigger
    186. -
    187.         $this->trigger['s']=$subject;
    188. -
    189.         $this->trigger['p']=$predicate;
    190. -
    191.         $this->trigger['o']=$object;        
    192. -
    193.      
    194. -
    195.  
    196. -
    197.      /**
    198. -
    199.     * Sets the entailment of this rule
    200. -
    201.     * The values can be NULL to match anything or be a node that has to
    202. -
    203.     * be matched.
    204. -
    205.     *
    206. -
    207.     * @param    object Node OR NULL    $subject
    208. -
    209.        * @param    object Node OR NULL    $predicate
    210. -
    211.        * @param    object Node OR NULL    $object
    212. -
    213.     * @access    public
    214. -
    215.     * @throws    PhpError
    216. -
    217.     */         
    218. -
    219.     function setEntailment($subject,$predicate,$object)
    220. -
    221.     {
    222. -
    223.         //throw an error if subject, predicate, or object are neither node, 
    224. -
    225.         //nor <s>,<p>,<o>.
    226. -
    227.         if(!is_a($subject,'Node'&& !ereg('<[spo]>'$subject)) 
    228. -
    229.             trigger_error(RDFAPI_ERROR '(class: Infrule; method:  
    230. -
    231.                 setEntailment): $subject has to be <s>,<p>,or <o> or of class Node'
    232. -
    233.                 E_USER_ERROR);
    234. -
    235.         if(!is_a($predicate,'Node'&& !ereg('<[spo]>'$predicate)) 
    236. -
    237.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    238. -
    239.                 setEntailment): $predicate has to be <s>,<p>,or <o> or of class Node'
    240. -
    241.                 E_USER_ERROR);
    242. -
    243.         if(!is_a($object,'Node'&& !ereg('<[spo]>'$object)) 
    244. -
    245.             trigger_error(RDFAPI_ERROR '(class: Infrule; method: 
    246. -
    247.                 setEntailment): $object has to be <s>,<p>,or <o> or of class Node'
    248. -
    249.                 E_USER_ERROR);
    250. -
    251.         
    252. -
    253.         $this->entailment['s']=$subject;    
    254. -
    255.         $this->entailment['p']=$predicate;
    256. -
    257.         $this->entailment['o']=$object;
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.      /**
    264. -
    265.     * Checks, if the statement satisfies the trigger.
    266. -
    267.     *
    268. -
    269.        * @param    object Statement 
    270. -
    271.     * @return     boolean 
    272. -
    273.     * @access    public
    274. -
    275.     * @throws    PhpError
    276. -
    277.     */
    278. -
    279.      function checkTrigger($statement)
    280. -
    281.      {    
    282. -
    283.          //is true, if the trigger is null to match anything 
    284. -
    285.          //or equals the statement's subject
    286. -
    287.          $shouldFireS =     $this->trigger['s'==  null || 
    288. -
    289.                          $this->trigger['s']->equals($statement->getSubject());
    290. -
    291.                          
    292. -
    293.          //is true, if the trigger is null to match anything 
    294. -
    295.          //or equals the statement's predicate
    296. -
    297.          $shouldFireP =     $this->trigger['p'==  null || 
    298. -
    299.                          $this->trigger['p']->equals($statement->getPredicate());
    300. -
    301.  
    302. -
    303.          //is true, if the trigger is null to match anything 
    304. -
    305.          //or equals the statement's object
    306. -
    307.          $shouldFireO =     $this->trigger['o'==  null || 
    308. -
    309.                          $this->trigger['o']->equals($statement->getObject());
    310. -
    311.  
    312. -
    313.          //returns true, if ALL are true
    314. -
    315.          return $shouldFireS && $shouldFireP && $shouldFireO;
    316. -
    317.      }
    318. -
    319.  
    320. -
    321.      /**
    322. -
    323.     * Checks, if this rule could entail a statement that matches
    324. -
    325.     * a find of $subject,$predicate,$object.
    326. -
    327.     *
    328. -
    329.        * @param    object Statement 
    330. -
    331.     * @return     boolean 
    332. -
    333.     * @access    public
    334. -
    335.     * @throws    PhpError
    336. -
    337.     */     
    338. -
    339.      function checkEntailment ($subject$predicate$object)
    340. -
    341.      {
    342. -
    343.         //true, if $subject is null, the entailment's subject matches
    344. -
    345.         //anything, or the $subject equals the entailment-subject.
    346. -
    347.          $matchesS=    $subject ==  null ||
    348. -
    349.                      !is_a($this->entailment['s'],'Node'||
    350. -
    351.                      $this->entailment['s']->equals($subject);
    352. -
    353.  
    354. -
    355.         //true, if $predicate is null, the entailment's predicate matches 
    356. -
    357.         //anything, or the $predicate equals the entailment-predicate.                     
    358. -
    359.          $matchesP=    $predicate ==  null ||
    360. -
    361.                      !is_a($this->entailment['p'],'Node'||
    362. -
    363.                      $this->entailment['p']->equals($predicate);
    364. -
    365.  
    366. -
    367.         //true, if $object is null, the entailment's object matches 
    368. -
    369.         //anything, or the $object equals the entailment-object.                                          
    370. -
    371.         $matchesO=    $object ==  null ||
    372. -
    373.                      !is_a($this->entailment['o'],'Node'||
    374. -
    375.                      $this->entailment['o']->equals($object);
    376. -
    377.           
    378. -
    379.          //returns true, if ALL are true
    380. -
    381.          return $matchesS && $matchesP && $matchesO;
    382. -
    383.     }
    384. -
    385.     
    386. -
    387.      /**
    388. -
    389.     * Returns a infered InfStatement by evaluating the statement with
    390. -
    391.     * the entailment rule.
    392. -
    393.     *
    394. -
    395.        * @param    object Statement 
    396. -
    397.     * @return     object InfStatement 
    398. -
    399.     * @access    public
    400. -
    401.     * @throws    PhpError
    402. -
    403.     */      
    404. -
    405.      function entail($statement)
    406. -
    407.      {
    408. -
    409.          //if the entailment's subject is <s>,<p>,or <o>, put the statements 
    410. -
    411.          //subject,predicate,or object into the subject of the 
    412. -
    413.          //entailed statement. If the entailment's subject is a node, 
    414. -
    415.          //add that node to the statement.    
    416. -
    417.          switch ($this->entailment['s'])
    418. -
    419.         {
    420. -
    421.         case '<s>':
    422. -
    423.              $entailedSubject=$statement->getSubject();
    424. -
    425.          break;
    426. -
    427.         case '<p>':
    428. -
    429.              $entailedSubject=$statement->getPredicate();
    430. -
    431.         break;    
    432. -
    433.          case '<o>':
    434. -
    435.              $entailedSubject=$statement->getObject();
    436. -
    437.          break;
    438. -
    439.         default:
    440. -
    441.              $entailedSubject=$this->entailment['s'];
    442. -
    443.         };
    444. -
    445.         
    446. -
    447.          //if the entailment's predicate is <s>,<p>,or <o>, put the 
    448. -
    449.          //statements subject,predicate,or object into the predicate of 
    450. -
    451.          //the entailed statement. If the entailment's predicate is a node, 
    452. -
    453.          //add that node to the statement.            
    454. -
    455.         switch ($this->entailment['p'])
    456. -
    457.         {
    458. -
    459.         case '<s>':
    460. -
    461.              $entailedPredicate=$statement->getSubject();
    462. -
    463.          break;
    464. -
    465.         case '<p>':
    466. -
    467.              $entailedPredicate=$statement->getPredicate();
    468. -
    469.          break;    
    470. -
    471.          case '<o>':
    472. -
    473.              $entailedPredicate=$statement->getObject();
    474. -
    475.          break;
    476. -
    477.         default:
    478. -
    479.              $entailedPredicate=$this->entailment['p'];
    480. -
    481.         };
    482. -
    483.         
    484. -
    485.          //if the entailment's object is <s>,<p>,or <o>, put the 
    486. -
    487.          //statements subject,predicate,or object into the object of 
    488. -
    489.          //the entailed statement. If the entailment's object is a node,
    490. -
    491.          //add that node to the statement.            
    492. -
    493.         switch ($this->entailment['o'])
    494. -
    495.         {
    496. -
    497.         case '<s>':
    498. -
    499.              $entailedObject=$statement->getSubject();
    500. -
    501.          break;
    502. -
    503.         case '<p>':
    504. -
    505.              $entailedObject=$statement->getPredicate();
    506. -
    507.          break;    
    508. -
    509.          case '<o>':
    510. -
    511.              $entailedObject=$statement->getObject();
    512. -
    513.          break;
    514. -
    515.         default:
    516. -
    517.              $entailedObject=$this->entailment['o'];
    518. -
    519.         };
    520. -
    521.         
    522. -
    523.         //return the infered statement
    524. -
    525.         return (new InfStatement($entailedSubject,$entailedPredicate,$entailedObject));
    526. -
    527.      }
    528. -
    529.      
    530. -
    531.      /**
    532. -
    533.     * Returns a find-query that matches statements, whose entailed
    534. -
    535.     * statements would match the supplied find query.
    536. -
    537.     *
    538. -
    539.        * @param    Node OR null $subject
    540. -
    541.        * @param    Node OR null $predicate
    542. -
    543.        * @param    Node OR null $object
    544. -
    545.     * @return     array 
    546. -
    547.     * @access    public
    548. -
    549.     * @throws    PhpError
    550. -
    551.     */           
    552. -
    553.      function getModifiedFind$subject$predicate$object)
    554. -
    555.      {            
    556. -
    557.          $findSubject=$this->trigger['s'];
    558. -
    559.          $findPredicate=$this->trigger['p'];
    560. -
    561.          $findObject=$this->trigger['o'];
    562. -
    563.          
    564. -
    565.          switch ($this->entailment['s'])
    566. -
    567.              {
    568. -
    569.              case '<s>':
    570. -
    571.                   $findSubject=$subject;
    572. -
    573.              break;
    574. -
    575.              case '<p>':
    576. -
    577.                   $findPredicate=$subject;
    578. -
    579.              break;    
    580. -
    581.              case '<o>':
    582. -
    583.                  $findObject=$subject;
    584. -
    585.              break;
    586. -
    587.              };
    588. -
    589.              
    590. -
    591.          switch ($this->entailment['p'])
    592. -
    593.              {
    594. -
    595.              case '<s>':
    596. -
    597.                   $findSubject=$predicate;
    598. -
    599.              break;
    600. -
    601.              case '<p>':
    602. -
    603.                   $findPredicate=$predicate;
    604. -
    605.              break;    
    606. -
    607.              case '<o>':
    608. -
    609.                  $findObject=$predicate;
    610. -
    611.              break;
    612. -
    613.              };
    614. -
    615.              
    616. -
    617.          switch ($this->entailment['o'])
    618. -
    619.              {
    620. -
    621.              case '<s>':
    622. -
    623.                   $findSubject=$object;
    624. -
    625.              break;
    626. -
    627.              case '<p>':
    628. -
    629.                   $findPredicate=$object;
    630. -
    631.              break;    
    632. -
    633.              case '<o>':
    634. -
    635.                  $findObject=$object;
    636. -
    637.              break;
    638. -
    639.              };
    640. -
    641.     
    642. -
    643.          return array('s' => $findSubject,
    644. -
    645.                       'p' => $findPredicate,
    646. -
    647.                       'o' => $findObject );    
    648. -
    649.      }
    650. -
    651.      
    652. -
    653.      function getTrigger()
    654. -
    655.      {
    656. -
    657.          return array     (    's' => $this->trigger['s'],
    658. -
    659.                              'p' => $this->trigger['p'],    
    660. -
    661.                              'o' => $this->trigger['o'],
    662. -
    663.                          );
    664. -
    665.      }
    666. -
    667.      
    668. -
    669.      function getEntailment()
    670. -
    671.      {
    672. -
    673.          return array     (    's' => $this->entailment['s'],
    674. -
    675.                              'p' => $this->entailment['p'],    
    676. -
    677.                              'o' => $this->entailment['o'],
    678. -
    679.                          );
    680. -
    681.      }
    682. -
    683. }
    684. -
    685. ?>
    686. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfStatement.php.html deleted file mode 100755 index 35ead650..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_infModel__infModelInfStatement.php.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - File Source for InfStatement.php - - - - - -

    Source for file InfStatement.php

    -

    Documentation is available at InfStatement.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: InfStatement
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13.  * An RDF statement which was entailed by a inference rule.
    14. -
    15.  * See Statement Class for further information.
    16. -
    17.  *  
    18. -
    19.  * @author Daniel Westphal <mail at d-westphal dot de>
    20. -
    21.  * @version  $Id: fsource_infModel__infModelInfStatement.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23.  * @package infModel
    24. -
    25.  */
    26. -
    27. class InfStatement extends Statement  {
    28. -
    29.     
    30. -
    31. }
    32. -
    33.     
    34. -
    35. ?>
    36. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelBlanknode.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelBlanknode.php.html deleted file mode 100755 index b2da75ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelBlanknode.php.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - File Source for Blanknode.php - - - - - -

    Source for file Blanknode.php

    -

    Documentation is available at Blanknode.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: BlankNode
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF blank node.
    18. -
    19.  * In model theory, blank nodes are considered to be drawn from some set of
    20. -
    21.  * 'anonymous' entities which have no label but are unique to the graph.
    22. -
    23.  * For serialization they are labeled with a URI or a _:X identifier.
    24. -
    25.  * 
    26. -
    27.  *
    28. -
    29.  * @version  $Id: fsource_model__modelBlanknode.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31.  * @authors Chris Bizer <chris@bizer.de>,
    32. -
    33.  *           Radoslaw Oldakowski <radol@gmx.de>
    34. -
    35.  *
    36. -
    37.  * @package model
    38. -
    39.  * @access    public
    40. -
    41.  *
    42. -
    43.  */ 
    44. -
    45.  class BlankNode extends Resource {
    46. -
    47.   
    48. -
    49.    /**
    50. -
    51.     * Constructor
    52. -
    53.     * You can supply a label or You supply a model and a unique ID is gernerated.
    54. -
    55.     *
    56. -
    57.     * @param    mixed    $namespace_or_uri_or_model 
    58. -
    59.      * @param     string $localName 
    60. -
    61.     * @access    public
    62. -
    63.     */
    64. -
    65.     function BlankNode($namespace_or_uri_or_model $localName NULL{
    66. -
    67.         
    68. -
    69.         if (is_a($namespace_or_uri_or_model'Model')) {
    70. -
    71.             // generate identifier
    72. -
    73.             $id $namespace_or_uri_or_model->getUniqueResourceURI(BNODE_PREFIX);
    74. -
    75.             
    76. -
    77.             $this->uri $id;
    78. -
    79.  
    80. -
    81.         else {
    82. -
    83.             // set identifier
    84. -
    85.             if ($localName == NULL{
    86. -
    87.                 $this->uri $namespace_or_uri_or_model;
    88. -
    89.               else {
    90. -
    91.                 $this->uri $namespace_or_uri_or_model $localName;
    92. -
    93.               }
    94. -
    95.          }
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.   /**
    102. -
    103.    * Returns the ID of the blank node.
    104. -
    105.    *
    106. -
    107.    * @return     string 
    108. -
    109.    * @access    public
    110. -
    111.    */    
    112. -
    113.   function getID({
    114. -
    115.               return $this->uri;
    116. -
    117.    }
    118. -
    119.  
    120. -
    121.   /**
    122. -
    123.    * Returns the ID of the blank node.
    124. -
    125.    *
    126. -
    127.    * @return     string 
    128. -
    129.    * @access    public
    130. -
    131.    */    
    132. -
    133.   function getLabel({
    134. -
    135.           return $this->uri;
    136. -
    137.    }
    138. -
    139.  
    140. -
    141.   /**
    142. -
    143.    * Dumps bNode.
    144. -
    145.    *
    146. -
    147.    * @access    public
    148. -
    149.    * @return    string 
    150. -
    151.    */  
    152. -
    153.   function toString({
    154. -
    155.  
    156. -
    157.         return 'bNode("' $this->uri '")';
    158. -
    159.   }
    160. -
    161.     
    162. -
    163.   /**
    164. -
    165.    * Checks if two blank nodes are equal.
    166. -
    167.    * Two blank nodes are equal, if they have the same temporary ID.
    168. -
    169.    *
    170. -
    171.    * @access    public
    172. -
    173.    * @param        object    resource $that 
    174. -
    175.    * @return    boolean 
    176. -
    177.    */  
    178. -
    179.    function equals ($that{
    180. -
    181.     
    182. -
    183.         if ($this == $that{
    184. -
    185.           return true;
    186. -
    187.         }
    188. -
    189.         if (($that == NULLor !(is_a($that'BlankNode'))) {
    190. -
    191.           return false;
    192. -
    193.         }
    194. -
    195.             
    196. -
    197.         if ($this->getURI(== $that->getURI()) {
    198. -
    199.           return true;
    200. -
    201.         }
    202. -
    203.     
    204. -
    205.         return false;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211. // end: BlankNode 
    212. -
    213.  
    214. -
    215.  
    216. -
    217. ?>
    218. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbModel.php.html deleted file mode 100755 index 68ce03d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbModel.php.html +++ /dev/null @@ -1,1323 +0,0 @@ - - - - - - File Source for DbModel.php - - - - - -

    Source for file DbModel.php

    -

    Documentation is available at DbModel.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Model.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: DbModel
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * This class provides methods for manipulating DbModels from DbStore.
    18. -
    19. * A DbModel is an RDF Model, which is persistently stored in a relational database.
    20. -
    21. * This Class uses the ADOdb Database Abstraction Library for PHP (http://adodb.sourceforge.net/).
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @version  $Id: fsource_model__modelDbModel.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29. @author   Radoslaw Oldakowski <radol@gmx.de>
    30. -
    31. *
    32. -
    33. @package model
    34. -
    35. @access    public
    36. -
    37. */
    38. -
    39.  
    40. -
    41.  
    42. -
    43. class DbModel extends Model{
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * Database connection object.
    50. -
    51.     *
    52. -
    53.     * @var     object ADOConnection 
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $dbConn;
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Unique model URI.
    66. -
    67.     * Used to identify the DbModel.
    68. -
    69.     *
    70. -
    71.     * @var     string 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $modelURI;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Database internal modelID.
    86. -
    87.     * Used to avoid JOINs.
    88. -
    89.     *
    90. -
    91.     * @var     string 
    92. -
    93.     * @access    private
    94. -
    95.     */
    96. -
    97.     var $modelID;
    98. -
    99.  
    100. -
    101.  
    102. -
    103.  
    104. -
    105.  
    106. -
    107.     /**
    108. -
    109.     * Constructor
    110. -
    111.     * Do not call this directly.
    112. -
    113.     * Use the method getModel,getNewModel or putModel of the Class DbStore instead.
    114. -
    115.     *
    116. -
    117.     * @param   object ADOConnection  &$dbConnection 
    118. -
    119.     * @param   string   $modelURI 
    120. -
    121.     * @param   string   $modelID 
    122. -
    123.     * @param   string   $baseURI 
    124. -
    125.     * @access    public
    126. -
    127.     */
    128. -
    129.     function DbModel(&$dbConnection$modelURI$modelID$baseURI=NULL{
    130. -
    131.  
    132. -
    133.         $this->dbConn =$dbConnection;
    134. -
    135.         $this->modelURI $modelURI;
    136. -
    137.         $this->modelID $modelID;
    138. -
    139.         $this->baseURI $this->_checkBaseURI($baseURI);
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.  
    146. -
    147.     /**
    148. -
    149.     * Set a base URI for the DbModel.
    150. -
    151.     * Affects creating of new resources and serialization syntax.
    152. -
    153.     *
    154. -
    155.     * @param    string    $uri 
    156. -
    157.     * @throws  SqlError
    158. -
    159.     * @access    public
    160. -
    161.     */
    162. -
    163.     function setBaseURI($uri{
    164. -
    165.  
    166. -
    167.         $this->baseURI $this->_checkBaseURI($uri);
    168. -
    169.  
    170. -
    171.         $rs $this->dbConn->execute("UPDATE models SET baseURI='" .$this->baseURI ."'
    172. -
    173.                                  WHERE modelID=" .$this->modelID);
    174. -
    175.         if (!$rs)
    176. -
    177.         $this->dbConn->errorMsg();
    178. -
    179.     }
    180. -
    181.  
    182. -
    183.  
    184. -
    185.     /**
    186. -
    187.     * Return the number of statements in this DbModel.
    188. -
    189.     *
    190. -
    191.     * @return    integer 
    192. -
    193.     * @access    public
    194. -
    195.     */
    196. -
    197.     function size({
    198. -
    199.  
    200. -
    201.         $count =$this->dbConn->getOne('SELECT COUNT(modelID) FROM statements
    202. -
    203.                                     WHERE modelID = ' .$this->modelID);
    204. -
    205.         return $count;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211.  
    212. -
    213.     /**
    214. -
    215.     * Check if this DbModel is empty.
    216. -
    217.     *
    218. -
    219.     * @return    boolean 
    220. -
    221.     * @access    public
    222. -
    223.     */
    224. -
    225.     function isEmpty({
    226. -
    227.  
    228. -
    229.         if ($this->size(== 0)
    230. -
    231.         return TRUE;
    232. -
    233.         return FALSE;
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Add a new triple to this DbModel.
    244. -
    245.     *
    246. -
    247.     * @param    object Statement    &$statement 
    248. -
    249.     * @throws    PhpError
    250. -
    251.     * @throws  SqlError
    252. -
    253.     * @access    public
    254. -
    255.     * @return mixed   true on success, false if the statement is already in the model,
    256. -
    257.     *                  error message (string) on failure
    258. -
    259.     */
    260. -
    261.     function add(&$statement{
    262. -
    263.  
    264. -
    265.         if (!is_a($statement'Statement')) {
    266. -
    267.             $errmsg RDFAPI_ERROR '(class: DbModel; method: add): Statement expected.';
    268. -
    269.             trigger_error($errmsgE_USER_ERROR);
    270. -
    271.         }
    272. -
    273.  
    274. -
    275.         if (!$this->contains($statement)) {
    276. -
    277.  
    278. -
    279.             $subject_is $this->_getNodeFlag($statement->subject());
    280. -
    281.             $sql "INSERT INTO statements
    282. -
    283.                     (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is)
    284. -
    285.                     VALUES
    286. -
    287.                     (" .$this->modelID .","
    288. -
    289.             ."'" .$statement->getLabelSubject(."',"
    290. -
    291.             ."'" .$statement->getLabelPredicate(."',";
    292. -
    293.  
    294. -
    295.             if (is_a($statement->object()'Literal')) {
    296. -
    297.                 $quotedLiteral $this->dbConn->qstr($statement->obj->getLabel());
    298. -
    299.                 $sql .=        $quotedLiteral .","
    300. -
    301.                 ."'" .$statement->obj->getLanguage(."',"
    302. -
    303.                 ."'" .$statement->obj->getDatatype(."',"
    304. -
    305.                 ."'" .$subject_is ."',"
    306. -
    307.                 ."'l')";
    308. -
    309.             }else{
    310. -
    311.                 $object_is $this->_getNodeFlag($statement->object());
    312. -
    313.                 $sql .=   "'" .$statement->obj->getLabel(."',"
    314. -
    315.                 ."'',"
    316. -
    317.                 ."'',"
    318. -
    319.                 ."'" .$subject_is ."',"
    320. -
    321.                 ."'" .$object_is ."')";
    322. -
    323.             }
    324. -
    325.             $rs =$this->dbConn->execute($sql);
    326. -
    327.             if (!$rs{
    328. -
    329.                 return $this->dbConn->errorMsg();
    330. -
    331.             else {
    332. -
    333.                 return true;
    334. -
    335.             }
    336. -
    337.         else {
    338. -
    339.             return false;
    340. -
    341.         }
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.  
    348. -
    349.     /**
    350. -
    351.     * Alias for the method add().
    352. -
    353.     *
    354. -
    355.     * @param    object Statement    &$statement 
    356. -
    357.     * @throws    PhpError
    358. -
    359.     * @throws  SqlError
    360. -
    361.     * @access    public
    362. -
    363.     */
    364. -
    365.     function addWithoutDuplicates(&$statement{
    366. -
    367.  
    368. -
    369.         $this->add($statement);
    370. -
    371.     }
    372. -
    373.  
    374. -
    375.  
    376. -
    377.     /**
    378. -
    379.     * Remove the given triple from this DbModel.
    380. -
    381.     *
    382. -
    383.     * @param    object Statement    &$statement 
    384. -
    385.     * @throws    PhpError
    386. -
    387.     * @throws  SqlError
    388. -
    389.     * @access    public
    390. -
    391.     */
    392. -
    393.     function remove(&$statement{
    394. -
    395.  
    396. -
    397.         if (!is_a($statement'Statement')) {
    398. -
    399.             $errmsg RDFAPI_ERROR '(class: DbModel; method: remove): Statement expected.';
    400. -
    401.             trigger_error($errmsgE_USER_ERROR);
    402. -
    403.         }
    404. -
    405.  
    406. -
    407.         $sql 'DELETE FROM statements
    408. -
    409.            WHERE modelID=' .$this->modelID;
    410. -
    411.         $sql .= $this->_createDynSqlPart_SPO ($statement->subj$statement->pred$statement->obj);
    412. -
    413.  
    414. -
    415.         $rs =$this->dbConn->execute($sql);
    416. -
    417.         if (!$rs)
    418. -
    419.         $this->dbConn->errorMsg();
    420. -
    421.     }
    422. -
    423.  
    424. -
    425.  
    426. -
    427.     /**
    428. -
    429.     * Short dump of the DbModel.
    430. -
    431.     *
    432. -
    433.     * @return    string 
    434. -
    435.     * @access    public
    436. -
    437.     */
    438. -
    439.     function toString({
    440. -
    441.  
    442. -
    443.         return 'DbModel[modelURI=' .$this->modelURI .'; baseURI=' .$this->getBaseURI(.';  size=' .$this->size(.']';
    444. -
    445.     }
    446. -
    447.  
    448. -
    449.  
    450. -
    451.     /**
    452. -
    453.     * Dump of the DbModel including all triples.
    454. -
    455.     *
    456. -
    457.     * @return    string 
    458. -
    459.     * @access    public
    460. -
    461.     */
    462. -
    463.     function toStringIncludingTriples({
    464. -
    465.  
    466. -
    467.         $memModel =$this->getMemModel();
    468. -
    469.         return $memModel->toStringIncludingTriples();
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.  
    476. -
    477.  
    478. -
    479.     /**
    480. -
    481.     * Create a MemModel containing all the triples of the current DbModel.
    482. -
    483.     *
    484. -
    485.     * @return object MemModel 
    486. -
    487.     * @access public
    488. -
    489.     */
    490. -
    491.     function getMemModel({
    492. -
    493.  
    494. -
    495.         $recordSet $this->_getRecordSet($this);
    496. -
    497.         return $this->_convertRecordSetToMemModel($recordSet);
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.  
    504. -
    505.  
    506. -
    507.     /**
    508. -
    509.     * Returns the model id
    510. -
    511.     *
    512. -
    513.     * @return int Model id number
    514. -
    515.     * @access public
    516. -
    517.     */
    518. -
    519.     function getModelID()
    520. -
    521.     {
    522. -
    523.         return $this->modelID;
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.  
    530. -
    531.  
    532. -
    533.     /**
    534. -
    535.     * Returns the database connection object
    536. -
    537.     *
    538. -
    539.     * @return ADOdb Database object
    540. -
    541.     * @access public
    542. -
    543.     */
    544. -
    545.     function &getDbConn()
    546. -
    547.     {
    548. -
    549.         return $this->dbConn;
    550. -
    551.     }
    552. -
    553.  
    554. -
    555.  
    556. -
    557.  
    558. -
    559.     /**
    560. -
    561.     * Write the RDF serialization of the _DbModel as HTML.
    562. -
    563.     *
    564. -
    565.     * @access    public
    566. -
    567.     */
    568. -
    569.     function writeAsHtml({
    570. -
    571.  
    572. -
    573.         $memModel =$this->getMemModel();
    574. -
    575.         $memModel->writeAsHtml();
    576. -
    577.     }
    578. -
    579.  
    580. -
    581.  
    582. -
    583.     /**
    584. -
    585.     * Write the RDF serialization of the DbModel as HTML table.
    586. -
    587.     *
    588. -
    589.     * @access    public
    590. -
    591.     */
    592. -
    593.     function writeAsHtmlTable({
    594. -
    595.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    596. -
    597.         $memModel =$this->getMemModel();
    598. -
    599.         RDFUtil::writeHTMLTable($memModel);
    600. -
    601.     }
    602. -
    603.  
    604. -
    605.  
    606. -
    607.     /**
    608. -
    609.     * Write the RDF serialization of the DbModel to string.
    610. -
    611.     *
    612. -
    613.     * @return    string 
    614. -
    615.     * @access    public
    616. -
    617.     */
    618. -
    619.     function writeRdfToString({
    620. -
    621.  
    622. -
    623.         $memModel =$this->getMemModel();
    624. -
    625.         return $memModel->writeRdfToString();
    626. -
    627.     }
    628. -
    629.  
    630. -
    631.  
    632. -
    633.     /**
    634. -
    635.     * Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    636. -
    637.     * You can decide to which format the model should be serialized by using a
    638. -
    639.     * corresponding suffix-string as $type parameter. If no $type parameter
    640. -
    641.     * is placed this method will serialize the model to XML/RDF format.
    642. -
    643.     * Returns FALSE if the DbModel couldn't be saved to the file.
    644. -
    645.     *
    646. -
    647.     * @access    public
    648. -
    649.     * @param     string     $filename 
    650. -
    651.     * @param     string     $type 
    652. -
    653.     * @throws   PhpError
    654. -
    655.     * @return    boolean 
    656. -
    657.     */
    658. -
    659.     function saveAs($filename$type ='rdf'{
    660. -
    661.  
    662. -
    663.         $memModel $this->getMemModel();
    664. -
    665.         $memModel->saveAs($filename$type);
    666. -
    667.  
    668. -
    669.     }
    670. -
    671.  
    672. -
    673.  
    674. -
    675.     /**
    676. -
    677.     * Check if the DbModel contains the given statement.
    678. -
    679.     *
    680. -
    681.     * @param object Statement  &$statement 
    682. -
    683.     * @return    boolean 
    684. -
    685.     * @access    public
    686. -
    687.     */
    688. -
    689.     function contains(&$statement{
    690. -
    691.  
    692. -
    693.         $sql 'SELECT modelID FROM statements
    694. -
    695.            WHERE modelID = ' .$this->modelID;
    696. -
    697.         $sql .= $this->_createDynSqlPart_SPO($statement->subj$statement->pred$statement->obj);
    698. -
    699.  
    700. -
    701.         $res =$this->dbConn->getOne($sql);
    702. -
    703.  
    704. -
    705.         if (!$res)
    706. -
    707.         return FALSE;
    708. -
    709.         return TRUE;
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.  
    716. -
    717.     /**
    718. -
    719.     * Determine if all of the statements in the given model are also contained in this DbModel.
    720. -
    721.     *
    722. -
    723.     * @param    object Model    &$model 
    724. -
    725.     * @return    boolean 
    726. -
    727.     * @access    public
    728. -
    729.     */
    730. -
    731.     function containsAll(&$model{
    732. -
    733.  
    734. -
    735.         if (is_a($model'MemModel')) {
    736. -
    737.  
    738. -
    739.             foreach($model->triples as $statement)
    740. -
    741.             if(!$this->contains($statement))
    742. -
    743.             return FALSE;
    744. -
    745.             return TRUE;
    746. -
    747.         }
    748. -
    749.  
    750. -
    751.         elseif (is_a($model'DbModel')) {
    752. -
    753.  
    754. -
    755.             $recordSet =$this->_getRecordSet($model);
    756. -
    757.             while (!$recordSet->EOF{
    758. -
    759.                 if (!$this->_containsRow($recordSet->fields))
    760. -
    761.                 return FALSE;
    762. -
    763.                 $recordSet->moveNext();
    764. -
    765.             }
    766. -
    767.             return TRUE;
    768. -
    769.         }
    770. -
    771.  
    772. -
    773.         $errmsg RDFAPI_ERROR '(class: DbModel; method: containsAll): Model expected.';
    774. -
    775.         trigger_error($errmsgE_USER_ERROR);
    776. -
    777.     }
    778. -
    779.  
    780. -
    781.  
    782. -
    783.     /**
    784. -
    785.     * Determine if any of the statements in the given model are also contained in this DbModel.
    786. -
    787.     *
    788. -
    789.     * @param    object Model    &$model 
    790. -
    791.     * @return    boolean 
    792. -
    793.     * @access    public
    794. -
    795.     */
    796. -
    797.     function containsAny(&$model{
    798. -
    799.  
    800. -
    801.         if (is_a($model'MemModel')) {
    802. -
    803.  
    804. -
    805.             foreach($model->triples as $statement)
    806. -
    807.             if($this->contains($statement))
    808. -
    809.             return TRUE;
    810. -
    811.             return FALSE;
    812. -
    813.         }
    814. -
    815.  
    816. -
    817.         elseif (is_a($model'DbModel')) {
    818. -
    819.  
    820. -
    821.             $recordSet =$this->_getRecordSet($model);
    822. -
    823.             while (!$recordSet->EOF{
    824. -
    825.                 if ($this->_containsRow($recordSet->fields))
    826. -
    827.                 return TRUE;
    828. -
    829.                 $recordSet->moveNext();
    830. -
    831.             }
    832. -
    833.             return FALSE;
    834. -
    835.         }
    836. -
    837.  
    838. -
    839.         $errmsg RDFAPI_ERROR '(class: DbModel; method: containsAny): Model expected.';
    840. -
    841.         trigger_error($errmsgE_USER_ERROR);
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.  
    848. -
    849.     /**
    850. -
    851.     * General method to search for triples in the DbModel.
    852. -
    853.     * NULL input for any parameter will match anything.
    854. -
    855.     * Example:  $result = $m->find( NULL, NULL, $node );
    856. -
    857.     *           Finds all triples with $node as object.
    858. -
    859.     *
    860. -
    861.     * @param    object Resource    $subject 
    862. -
    863.     * @param    object Resource    $predicate 
    864. -
    865.     * @param    object Node    $object 
    866. -
    867.     * @return    object MemModel 
    868. -
    869.     * @throws    PhpError
    870. -
    871.     * @throws  SqlError
    872. -
    873.     * @access    public
    874. -
    875.     */
    876. -
    877.     function find($subject$predicate$object{
    878. -
    879.  
    880. -
    881.         if ((!is_a($subject'Resource'&& $subject != NULL||
    882. -
    883.         (!is_a($predicate'Resource'&& $predicate != NULL||
    884. -
    885.         (!is_a($object'Node'&& $object != NULL)) {
    886. -
    887.  
    888. -
    889.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    890. -
    891.             trigger_error($errmsgE_USER_ERROR);
    892. -
    893.         }
    894. -
    895.  
    896. -
    897.         // static part of the sql statement
    898. -
    899.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    900. -
    901.            FROM statements
    902. -
    903.            WHERE modelID = ' .$this->modelID;
    904. -
    905.  
    906. -
    907.         // dynamic part of the sql statement
    908. -
    909.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    910. -
    911.  
    912. -
    913.         // execute the query
    914. -
    915.         $recordSet =$this->dbConn->execute($sql);
    916. -
    917.  
    918. -
    919.         if (!$recordSet)
    920. -
    921.         echo $this->dbConn->errorMsg();
    922. -
    923.  
    924. -
    925.         // write the recordSet into memory Model
    926. -
    927.         else
    928. -
    929.         return $this->_convertRecordSetToMemModel($recordSet);
    930. -
    931.     }
    932. -
    933.  
    934. -
    935.  
    936. -
    937.     /**
    938. -
    939.     * Method to search for triples using Perl-style regular expressions.
    940. -
    941.     * NULL input for any parameter will match anything.
    942. -
    943.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    944. -
    945.     *           Finds all triples where the label of the object node matches
    946. -
    947.     *the regular expression.
    948. -
    949.     * Return an empty MemModel if nothing is found.
    950. -
    951.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    952. -
    953.     * WARNING: Mhis method loads a DbModel into memory and performs the search
    954. -
    955.     *          on a MemModel, which can be slow with large models.
    956. -
    957.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    958. -
    959.     *
    960. -
    961.     * @param    string    $subject_regex 
    962. -
    963.     * @param    string    $predicate_regex 
    964. -
    965.     * @param    string    $object_regex 
    966. -
    967.     * @return    object MemModel 
    968. -
    969.     * @throws    PhpError
    970. -
    971.     * @throws  SqlError
    972. -
    973.     * @access    public
    974. -
    975.     */
    976. -
    977.     function findRegex($subject_regex$predicate_regex$object_regex{
    978. -
    979.  
    980. -
    981.         $mm =$this->getMemModel();
    982. -
    983.  
    984. -
    985.         return $mm->findRegex($subject_regex$predicate_regex$object_regex);
    986. -
    987.     }
    988. -
    989.  
    990. -
    991.  
    992. -
    993.     /**
    994. -
    995.     * Return all tripels of a certain vocabulary.
    996. -
    997.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
    998. -
    999.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    1000. -
    1001.     * Return an empty model if nothing is found.
    1002. -
    1003.     *
    1004. -
    1005.     * @param    string    $vocabulary 
    1006. -
    1007.     * @return    object MemModel 
    1008. -
    1009.     * @throws    PhpError
    1010. -
    1011.     * @throws  SqlError
    1012. -
    1013.     * @access    public
    1014. -
    1015.     */
    1016. -
    1017.     function findVocabulary($vocabulary{
    1018. -
    1019.  
    1020. -
    1021.         $sql "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    1022. -
    1023.            FROM statements
    1024. -
    1025.            WHERE modelID = " .$this->modelID ."
    1026. -
    1027.            AND predicate LIKE '" .$vocabulary ."%'";
    1028. -
    1029.  
    1030. -
    1031.         $recordSet =$this->dbConn->execute($sql);
    1032. -
    1033.  
    1034. -
    1035.         if (!$recordSet)
    1036. -
    1037.         echo $this->dbConn->errorMsg();
    1038. -
    1039.  
    1040. -
    1041.         // write the recordSet into memory Model
    1042. -
    1043.         else
    1044. -
    1045.         return $this->_convertRecordSetToMemModel($recordSet);
    1046. -
    1047.     }
    1048. -
    1049.  
    1050. -
    1051.  
    1052. -
    1053.     /**
    1054. -
    1055.     * Search for triples and return the first matching statement.
    1056. -
    1057.     * NULL input for any parameter will match anything.
    1058. -
    1059.     * Return an NULL if nothing is found.
    1060. -
    1061.     * You can set an search offset with $offset.
    1062. -
    1063.     *
    1064. -
    1065.     * @param    object Resource    $subject 
    1066. -
    1067.     * @param    object Resource    $predicate 
    1068. -
    1069.     * @param    object Node    $object 
    1070. -
    1071.     * @param    integer    $offset 
    1072. -
    1073.     * @return    object Statement 
    1074. -
    1075.     * @throws  PhpError
    1076. -
    1077.     * @throws  SqlError
    1078. -
    1079.     * @access    public
    1080. -
    1081.     */
    1082. -
    1083.     function findFirstMatchingStatement($subject$predicate$object$offset = -1{
    1084. -
    1085.  
    1086. -
    1087.         if ((!is_a($subject'Resource'&& $subject != NULL||
    1088. -
    1089.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1090. -
    1091.         (!is_a($object'Node'&& $object != NULL)) {
    1092. -
    1093.  
    1094. -
    1095.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    1096. -
    1097.             trigger_error($errmsgE_USER_ERROR);
    1098. -
    1099.         }
    1100. -
    1101.  
    1102. -
    1103.         // static part of the sql statement
    1104. -
    1105.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    1106. -
    1107.            FROM statements
    1108. -
    1109.            WHERE modelID = ' .$this->modelID;
    1110. -
    1111.  
    1112. -
    1113.         // dynamic part of the sql statement
    1114. -
    1115.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1116. -
    1117.  
    1118. -
    1119.         // execute the query
    1120. -
    1121.         $recordSet =$this->dbConn->selectLimit($sql,1,($offset));
    1122. -
    1123.  
    1124. -
    1125.         if (!$recordSet)
    1126. -
    1127.         echo $this->dbConn->errorMsg();
    1128. -
    1129.         else {
    1130. -
    1131.             if (!$recordSet->fields)
    1132. -
    1133.             return NULL;
    1134. -
    1135.             else {
    1136. -
    1137.                 $memModel $this->_convertRecordSetToMemModel($recordSet);
    1138. -
    1139.                 return $memModel->triples[0];
    1140. -
    1141.             }
    1142. -
    1143.         }
    1144. -
    1145.     }
    1146. -
    1147.  
    1148. -
    1149.  
    1150. -
    1151.     /**
    1152. -
    1153.     * Search for triples and return the number of matches.
    1154. -
    1155.     * NULL input for any parameter will match anything.
    1156. -
    1157.     *
    1158. -
    1159.     * @param    object Resource    $subject 
    1160. -
    1161.     * @param    object Resource    $predicate 
    1162. -
    1163.     * @param    object Node      $object 
    1164. -
    1165.     * @return    integer 
    1166. -
    1167.     * @throws    PhpError
    1168. -
    1169.     * @throws  SqlError
    1170. -
    1171.     * @access    public
    1172. -
    1173.     */
    1174. -
    1175.     function findCount($subject$predicate$object{
    1176. -
    1177.  
    1178. -
    1179.         if ((!is_a($subject'Resource'&& $subject != NULL||
    1180. -
    1181.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1182. -
    1183.         (!is_a($object'Node'&& $object != NULL)) {
    1184. -
    1185.  
    1186. -
    1187.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
    1188. -
    1189.             trigger_error($errmsgE_USER_ERROR);
    1190. -
    1191.         }
    1192. -
    1193.  
    1194. -
    1195.         // static part of the sql statement
    1196. -
    1197.         $sql 'SELECT COUNT(*)
    1198. -
    1199.            FROM statements
    1200. -
    1201.            WHERE modelID = ' .$this->modelID;
    1202. -
    1203.  
    1204. -
    1205.         // dynamic part of the sql statement
    1206. -
    1207.         $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1208. -
    1209.  
    1210. -
    1211.         // execute the query
    1212. -
    1213.         $recordSet =$this->dbConn->execute($sql);
    1214. -
    1215.  
    1216. -
    1217.         if (!$recordSet)
    1218. -
    1219.         echo $this->dbConn->errorMsg();
    1220. -
    1221.         else
    1222. -
    1223.         return $recordSet->fields[0];
    1224. -
    1225.     }
    1226. -
    1227.  
    1228. -
    1229.  
    1230. -
    1231.     /**
    1232. -
    1233.     * Perform an RDQL query on this DbModel.
    1234. -
    1235.     * This method returns an associative array of variable bindings.
    1236. -
    1237.     * The values of the query variables can either be RAP's objects (instances of Node)
    1238. -
    1239.     * if $returnNodes set to TRUE, or their string serialization.
    1240. -
    1241.     *
    1242. -
    1243.     * @access    public
    1244. -
    1245.     * @param string $queryString 
    1246. -
    1247.     * @param boolean $returnNodes 
    1248. -
    1249.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1250. -
    1251.     *       OR  array   [][?VARNAME] = string
    1252. -
    1253.     *
    1254. -
    1255.     */
    1256. -
    1257.     function rdqlQuery($queryString$returnNodes TRUE{
    1258. -
    1259.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1260. -
    1261.         $parser new RdqlParser();
    1262. -
    1263.         $parsedQuery =$parser->parseQuery($queryString);
    1264. -
    1265.  
    1266. -
    1267.         // this method can only query this DbModel
    1268. -
    1269.         // if another model was specified in the from clause throw an error
    1270. -
    1271.         if (isset($parsedQuery['sources'][0]))
    1272. -
    1273.         if($parsedQuery['sources'][0!= $this->modelURI{
    1274. -
    1275.             $errmsg RDFAPI_ERROR '(class: DbModel; method: rdqlQuery):';
    1276. -
    1277.             $errmsg .= ' this method can only query this DbModel';
    1278. -
    1279.             trigger_error($errmsgE_USER_ERROR);
    1280. -
    1281.         }
    1282. -
    1283.  
    1284. -
    1285.         $engine new RdqlDbEngine();
    1286. -
    1287.         $res =$engine->queryModel($this$parsedQuery$returnNodes);
    1288. -
    1289.  
    1290. -
    1291.         return $res;
    1292. -
    1293.     }
    1294. -
    1295.  
    1296. -
    1297.  
    1298. -
    1299.     /**
    1300. -
    1301.     * Perform an RDQL query on this DBModel.
    1302. -
    1303.     * This method returns an RdqlResultIterator of variable bindings.
    1304. -
    1305.     * The values of the query variables can either be RAP's objects (instances of Node)
    1306. -
    1307.     * if $returnNodes set to TRUE, or their string serialization.
    1308. -
    1309.     *
    1310. -
    1311.     * @access    public
    1312. -
    1313.     * @param string $queryString 
    1314. -
    1315.     * @param boolean $returnNodes 
    1316. -
    1317.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1318. -
    1319.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1320. -
    1321.     *
    1322. -
    1323.     */
    1324. -
    1325.     function rdqlQueryAsIterator($queryString$returnNodes TRUE{
    1326. -
    1327.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1328. -
    1329.         return new RdqlResultIterator($this->rdqlQuery($queryString$returnNodes));
    1330. -
    1331.     }
    1332. -
    1333.  
    1334. -
    1335.     /**
    1336. -
    1337.     * General method to replace nodes of a DbModel.
    1338. -
    1339.     * NULL input for any parameter will match nothing.
    1340. -
    1341.     * Example:  $m->replace($resource, NULL, $node, $replacement);
    1342. -
    1343.     *           Replaces all $node objects beeing subject or object in
    1344. -
    1345.     *           any triple of the model with the $replacement node.
    1346. -
    1347.     * Throw an error in case of a paramter mismatch.
    1348. -
    1349.     *
    1350. -
    1351.     * @param    object Resource    $subject 
    1352. -
    1353.     * @param    object Resource    $predicate 
    1354. -
    1355.     * @param    object Node    $object 
    1356. -
    1357.     * @param    object Node    $replacement 
    1358. -
    1359.     * @throws    PhpError
    1360. -
    1361.     * @throws  SqlError
    1362. -
    1363.     * @access    public
    1364. -
    1365.     */
    1366. -
    1367.     function replace($subject$predicate$object$replacement{
    1368. -
    1369.  
    1370. -
    1371.         // check the correctness of the passed parameters
    1372. -
    1373.         if ( ((!is_a($subject'Resource'&& $subject != NULL||
    1374. -
    1375.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1376. -
    1377.         (!is_a($object'Node'&& $object != NULL)) ||
    1378. -
    1379.         (($subject != NULL && is_a($replacement'Literal')) ||
    1380. -
    1381.         ($predicate != NULL && (is_a($replacement'Literal'||
    1382. -
    1383.         is_a($replacement'BlankNode')))) )
    1384. -
    1385.         {
    1386. -
    1387.             $errmsg RDFAPI_ERROR '(class: DbModel; method: find): Parameter mismatch';
    1388. -
    1389.             trigger_error($errmsgE_USER_ERROR);
    1390. -
    1391.         }
    1392. -
    1393.  
    1394. -
    1395.         if (!(!$subject && !$predicate && !$object)) {
    1396. -
    1397.  
    1398. -
    1399.             // create an update sql statement
    1400. -
    1401.             $comma '';
    1402. -
    1403.             $sql 'UPDATE statements
    1404. -
    1405.              SET ';
    1406. -
    1407.             if ($subject{
    1408. -
    1409.                 $sql .= " subject ='" .$replacement->getLabel(."', "
    1410. -
    1411.                 ." subject_is='" .$this->_getNodeFlag($replacement."' ";
    1412. -
    1413.                 $comma ',';
    1414. -
    1415.             }
    1416. -
    1417.             if ($predicate{
    1418. -
    1419.                 $sql .= $comma ." predicate='" .$replacement->getLabel(."' ";
    1420. -
    1421.                 $comma ',';
    1422. -
    1423.             }
    1424. -
    1425.             if ($object{
    1426. -
    1427.                 $quotedObject $this->dbConn->qstr($replacement->getLabel());
    1428. -
    1429.                 $sql .= $comma .' object=' .$quotedObject
    1430. -
    1431.                 .", object_is='" .$this->_getNodeFlag($replacement."' ";
    1432. -
    1433.                 if (is_a($replacement'Literal')) {
    1434. -
    1435.                     $sql .= ", l_language='" .$replacement->getLanguage(."' "
    1436. -
    1437.                     .", l_datatype='" .$replacement->getDataType(."' ";
    1438. -
    1439.                 }
    1440. -
    1441.             }
    1442. -
    1443.             $sql .= 'WHERE modelID = ' .$this->modelID;
    1444. -
    1445.             $sql .= $this->_createDynSqlPart_SPO($subject$predicate$object);
    1446. -
    1447.  
    1448. -
    1449.             // execute the query
    1450. -
    1451.             $rs =$this->dbConn->execute($sql);
    1452. -
    1453.  
    1454. -
    1455.             if (!$rs)
    1456. -
    1457.             echo $this->dbConn->errorMsg();
    1458. -
    1459.         }
    1460. -
    1461.     }
    1462. -
    1463.  
    1464. -
    1465.  
    1466. -
    1467.     /**
    1468. -
    1469.     * Check if two models are equal.
    1470. -
    1471.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    1472. -
    1473.     *
    1474. -
    1475.     * Warning: This method doesn't work correct with models where the same blank node has different
    1476. -
    1477.     * identifiers in the two models. We will correct this in a future version.
    1478. -
    1479.     *
    1480. -
    1481.     * @param    object    model &$that 
    1482. -
    1483.     * @return    boolean 
    1484. -
    1485.     * @throws  PhpError
    1486. -
    1487.     * @access    public
    1488. -
    1489.     */
    1490. -
    1491.  
    1492. -
    1493.     function equals(&$that)  {
    1494. -
    1495.  
    1496. -
    1497.         if (!is_a($that'Model')) {
    1498. -
    1499.             $errmsg RDFAPI_ERROR '(class: DbModel; method: equals): Model expected.';
    1500. -
    1501.             trigger_error($errmsgE_USER_ERROR);
    1502. -
    1503.         }
    1504. -
    1505.  
    1506. -
    1507.         if ($this->size(!= $that->size())
    1508. -
    1509.         return FALSE;
    1510. -
    1511.  
    1512. -
    1513.         include_once(RDFAPI_INCLUDE_DIR"util/ModelComparator.php");
    1514. -
    1515.         return ModelComparator::compare($this,$that);
    1516. -
    1517.     }
    1518. -
    1519.  
    1520. -
    1521.  
    1522. -
    1523.     /**
    1524. -
    1525.     * Return a new MemModel that is the set-union the model with another model.
    1526. -
    1527.     *
    1528. -
    1529.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    1530. -
    1531.     * is another graph, which we will call the merge of the graphs.
    1532. -
    1533.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    1534. -
    1535.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    1536. -
    1537.     * graphs become a single node in the union graph (since by definition they are the same
    1538. -
    1539.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    1540. -
    1541.     * never merged. In particular, this means that every blank node in a merged graph can be
    1542. -
    1543.     * identified as coming from one particular graph in the original set of graphs.
    1544. -
    1545.     *
    1546. -
    1547.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    1548. -
    1549.     * their corresponding N-triples documents and constructing the graph described by the merged
    1550. -
    1551.     * document, since if some of the documents use the same node identifiers, the merged document
    1552. -
    1553.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    1554. -
    1555.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    1556. -
    1557.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    1558. -
    1559.     * documents. (Not implemented yet !!!!!!!!!!!)
    1560. -
    1561.     *
    1562. -
    1563.     * @param    object Model    $model 
    1564. -
    1565.     * @return    object MemModel 
    1566. -
    1567.     * @throws PhpError
    1568. -
    1569.     * @access    public
    1570. -
    1571.     *
    1572. -
    1573.     */
    1574. -
    1575.     function unite(&$model)  {
    1576. -
    1577.  
    1578. -
    1579.         if (!is_a($model'Model')) {
    1580. -
    1581.             $errmsg RDFAPI_ERROR '(class: DbModel; method: unite): Model expected.';
    1582. -
    1583.             trigger_error($errmsgE_USER_ERROR);
    1584. -
    1585.         }
    1586. -
    1587.  
    1588. -
    1589.         if (is_a($model'MemModel')) {
    1590. -
    1591.  
    1592. -
    1593.             $thisModel =$this->getMemModel();
    1594. -
    1595.             return $thisModel->unite($model);
    1596. -
    1597.         }
    1598. -
    1599.  
    1600. -
    1601.         elseif (is_a($model'DbModel')) {
    1602. -
    1603.  
    1604. -
    1605.             $thisModel =$this->getMemModel();
    1606. -
    1607.             $thatModel =$model->getMemModel();
    1608. -
    1609.             return $thisModel->unite($thatModel);
    1610. -
    1611.         }
    1612. -
    1613.     }
    1614. -
    1615.  
    1616. -
    1617.  
    1618. -
    1619.     /**
    1620. -
    1621.     * Return a new MemModel that is the subtraction of another model from this DbModel.
    1622. -
    1623.     *
    1624. -
    1625.     * @param    object Model    $model 
    1626. -
    1627.     * @return    object MemModel 
    1628. -
    1629.     * @throws PhpError
    1630. -
    1631.     * @access    public
    1632. -
    1633.     */
    1634. -
    1635.  
    1636. -
    1637.     function subtract(&$model)  {
    1638. -
    1639.  
    1640. -
    1641.         if (!is_a($model'Model')) {
    1642. -
    1643.             $errmsg RDFAPI_ERROR '(class: DbModel; method: subtract): Model expected.';
    1644. -
    1645.             trigger_error($errmsgE_USER_ERROR);
    1646. -
    1647.         }
    1648. -
    1649.  
    1650. -
    1651.         if (is_a($model'MemModel')) {
    1652. -
    1653.  
    1654. -
    1655.             $thisModel =$this->getMemModel();
    1656. -
    1657.             return $thisModel->subtract($model);
    1658. -
    1659.         }
    1660. -
    1661.  
    1662. -
    1663.         elseif (is_a($model'DbModel')) {
    1664. -
    1665.  
    1666. -
    1667.             $thisModel =$this->getMemModel();
    1668. -
    1669.             $thatModel =$model->getMemModel();
    1670. -
    1671.             return $thisModel->subtract($thatModel);
    1672. -
    1673.         }
    1674. -
    1675.     }
    1676. -
    1677.  
    1678. -
    1679.  
    1680. -
    1681.     /**
    1682. -
    1683.     * Return a new MemModel containing all the statements which are in both
    1684. -
    1685.     * this model and the given model.
    1686. -
    1687.     *
    1688. -
    1689.     * @param    object Model    $model 
    1690. -
    1691.     * @return    object MemModel 
    1692. -
    1693.     * @throws  PhpError
    1694. -
    1695.     * @access    public
    1696. -
    1697.     */
    1698. -
    1699.     function intersect(&$model)  {
    1700. -
    1701.  
    1702. -
    1703.         if (is_a($model'MemModel')) {
    1704. -
    1705.  
    1706. -
    1707.             $thisModel =$this->getMemModel();
    1708. -
    1709.             return $thisModel->intersect($model);
    1710. -
    1711.         }
    1712. -
    1713.  
    1714. -
    1715.         elseif (is_a($model'DbModel')) {
    1716. -
    1717.  
    1718. -
    1719.             $thisModel =$this->getMemModel();
    1720. -
    1721.             $thatModel =$model->getMemModel();
    1722. -
    1723.             return $thisModel->intersect($thatModel);
    1724. -
    1725.         }
    1726. -
    1727.  
    1728. -
    1729.         $errmsg RDFAPI_ERROR '(class: DbModel; method: intersect: Model expected.';
    1730. -
    1731.         trigger_error($errmsgE_USER_ERROR);
    1732. -
    1733.     }
    1734. -
    1735.  
    1736. -
    1737.  
    1738. -
    1739.     /**
    1740. -
    1741.     * Add the given model to this DbModel.
    1742. -
    1743.     * This function monitors for SQL errors, and will commit if no errors have occured,
    1744. -
    1745.     * otherwise it will rollback.
    1746. -
    1747.     * If any statement of the model to be added to this model contains a blankNode
    1748. -
    1749.     * with an identifier already existing in this model, a new blankNode is generated.
    1750. -
    1751.     *
    1752. -
    1753.     * @param    object Model    $model 
    1754. -
    1755.     * @throws  PhpError
    1756. -
    1757.     * @access    public
    1758. -
    1759.     */
    1760. -
    1761.     function addModel(&$model)  {
    1762. -
    1763.  
    1764. -
    1765.         if (!is_a($model'Model')) {
    1766. -
    1767.             $errmsg RDFAPI_ERROR '(class: DbModel; method: addModel): Model expected.';
    1768. -
    1769.             trigger_error($errmsgE_USER_ERROR);
    1770. -
    1771.         }
    1772. -
    1773.  
    1774. -
    1775.         $blankNodes_tmp array();
    1776. -
    1777.  
    1778. -
    1779.         if (is_a($model'MemModel')) {
    1780. -
    1781.  
    1782. -
    1783.             $this->dbConn->startTrans();
    1784. -
    1785.             foreach ($model->triples as $statement)
    1786. -
    1787.             $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    1788. -
    1789.             $this->addParsedNamespaces($model->getParsedNamespaces());
    1790. -
    1791.  
    1792. -
    1793.             $this->dbConn->completeTrans();
    1794. -
    1795.         }
    1796. -
    1797.  
    1798. -
    1799.         elseif (is_a($model'DbModel')) {
    1800. -
    1801.  
    1802. -
    1803.             $this->dbConn->startTrans();
    1804. -
    1805.             $memModel =$model->getMemModel();
    1806. -
    1807.             foreach($memModel->triples as $statement)
    1808. -
    1809.             $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    1810. -
    1811.             $this->addParsedNamespaces($model->getParsedNamespaces());
    1812. -
    1813.             $this->dbConn->completeTrans();
    1814. -
    1815.         }
    1816. -
    1817.     }
    1818. -
    1819.  
    1820. -
    1821.  
    1822. -
    1823.     /**
    1824. -
    1825.     * Reify the DbModel.
    1826. -
    1827.     * Return a new MemModel that contains the reifications of all statements of this DbModel.
    1828. -
    1829.     *
    1830. -
    1831.     * @return    object    MemModel 
    1832. -
    1833.     * @access    public
    1834. -
    1835.     */
    1836. -
    1837.     function reify({
    1838. -
    1839.  
    1840. -
    1841.         $memModel =$this->getMemModel();
    1842. -
    1843.         return $memModel->reify();
    1844. -
    1845.     }
    1846. -
    1847.  
    1848. -
    1849.     /**
    1850. -
    1851.     * Remove this DbModel from database and clean up.
    1852. -
    1853.     * This function monitors for SQL errors, and will commit if no errors have occured,
    1854. -
    1855.     * otherwise it will rollback.
    1856. -
    1857.     *
    1858. -
    1859.     * @throws  SqlError
    1860. -
    1861.     * @access    public
    1862. -
    1863.     */
    1864. -
    1865.     function delete({
    1866. -
    1867.  
    1868. -
    1869.         $this->dbConn->startTrans();
    1870. -
    1871.         $this->dbConn->execute('DELETE FROM models
    1872. -
    1873.                                   WHERE modelID=' .$this->modelID);
    1874. -
    1875.         $this->dbConn->execute('DELETE FROM statements
    1876. -
    1877.                                   WHERE modelID=' .$this->modelID);
    1878. -
    1879.  
    1880. -
    1881.         if (!$this->dbConn->completeTrans())
    1882. -
    1883.         echo $this->dbConn->errorMsg();
    1884. -
    1885.         else
    1886. -
    1887.         $this->close();
    1888. -
    1889.     }
    1890. -
    1891.  
    1892. -
    1893.  
    1894. -
    1895.     /**
    1896. -
    1897.     * Close this DbModel
    1898. -
    1899.     *
    1900. -
    1901.     * @access    public
    1902. -
    1903.     */
    1904. -
    1905.     function close({
    1906. -
    1907.  
    1908. -
    1909.         unset($this);
    1910. -
    1911.     }
    1912. -
    1913.  
    1914. -
    1915.  
    1916. -
    1917.     // =============================================================================
    1918. -
    1919.     // **************************** private methods ********************************
    1920. -
    1921.     // =============================================================================
    1922. -
    1923.  
    1924. -
    1925.  
    1926. -
    1927.  
    1928. -
    1929.  
    1930. -
    1931.  
    1932. -
    1933.     /**
    1934. -
    1935.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    1936. -
    1937.     * Used at setting the baseURI of this DbModel.
    1938. -
    1939.     *
    1940. -
    1941.     * @param   string  $uri 
    1942. -
    1943.     * @return  string 
    1944. -
    1945.     * @access    private
    1946. -
    1947.     */
    1948. -
    1949.     function _checkBaseURI($uri)  {
    1950. -
    1951.  
    1952. -
    1953.         if ($uri != NULL{
    1954. -
    1955.             $c substr($uristrlen($uri)-,1);
    1956. -
    1957.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    1958. -
    1959.             $uri .= '#';
    1960. -
    1961.         }
    1962. -
    1963.         return $uri;
    1964. -
    1965.     }
    1966. -
    1967.  
    1968. -
    1969.  
    1970. -
    1971.     /**'
    1972. -
    1973.     * Return the flag of the Node object.
    1974. -
    1975.     * r - Resource, b - BlankNode, l - Literal
    1976. -
    1977.     *
    1978. -
    1979.     * @param   object Node $object
    1980. -
    1981.     * @return  string
    1982. -
    1983.     * @access    private
    1984. -
    1985.     */
    1986. -
    1987.     function _getNodeFlag($object)  {
    1988. -
    1989.  
    1990. -
    1991.         return is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
    1992. -
    1993.     }
    1994. -
    1995.  
    1996. -
    1997.  
    1998. -
    1999.     /**
    2000. -
    2001.     * Convert an ADORecordSet to a memory Model.
    2002. -
    2003.     *
    2004. -
    2005.     * Every successful database query returns an ADORecordSet object which is actually
    2006. -
    2007.     * a cursor that holds the current row in the array fields[].
    2008. -
    2009.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2010. -
    2011.     * !!! This method can only be applied to a RecordSet with array fields[]
    2012. -
    2013.     * !!! containing a representation of the database table: statements,
    2014. -
    2015.     * !!! with an index corresponding to following table columns:
    2016. -
    2017.     * !!! [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2018. -
    2019.     * !!! [4] - l_datatype, [5] - subject_is, [6] - object_is
    2020. -
    2021.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2022. -
    2023.     *
    2024. -
    2025.     * @param   object  ADORecordSet 
    2026. -
    2027.     * @return  object  MemModel 
    2028. -
    2029.     * @access    private
    2030. -
    2031.     */
    2032. -
    2033.     function _convertRecordSetToMemModel(&$recordSet)  {
    2034. -
    2035.  
    2036. -
    2037.         $res new MemModel($this->baseURI);
    2038. -
    2039.         while (!$recordSet->EOF{
    2040. -
    2041.  
    2042. -
    2043.             // subject
    2044. -
    2045.             if ($recordSet->fields[5== 'r')
    2046. -
    2047.             $sub new Resource($recordSet->fields[0]);
    2048. -
    2049.             else
    2050. -
    2051.             $sub new BlankNode($recordSet->fields[0]);
    2052. -
    2053.  
    2054. -
    2055.             // predicate
    2056. -
    2057.             $pred new Resource($recordSet->fields[1]);
    2058. -
    2059.  
    2060. -
    2061.             // object
    2062. -
    2063.             if ($recordSet->fields[6== 'r')
    2064. -
    2065.             $obj new Resource($recordSet->fields[2]);
    2066. -
    2067.             elseif ($recordSet->fields[6== 'b')
    2068. -
    2069.             $obj new BlankNode($recordSet->fields[2]);
    2070. -
    2071.             else {
    2072. -
    2073.                 $obj new Literal($recordSet->fields[2]$recordSet->fields[3]);
    2074. -
    2075.                 if ($recordSet->fields[4])
    2076. -
    2077.                 $obj->setDatatype($recordSet->fields[4]);
    2078. -
    2079.             }
    2080. -
    2081.  
    2082. -
    2083.             $statement new Statement($sub$pred$obj);
    2084. -
    2085.             $res->add($statement);
    2086. -
    2087.  
    2088. -
    2089.             $recordSet->moveNext();
    2090. -
    2091.         }
    2092. -
    2093.         $res->addParsedNamespaces($this->getParsedNamespaces());
    2094. -
    2095.         return $res;
    2096. -
    2097.     }
    2098. -
    2099.  
    2100. -
    2101.  
    2102. -
    2103.     /**
    2104. -
    2105.     * Create the dynamic part of an sql statement selecting triples with the
    2106. -
    2107.     * given parameters ($subject, $predicate, $object).
    2108. -
    2109.     *
    2110. -
    2111.     * @param    object Resource    $subject 
    2112. -
    2113.     * @param    object Resource    $predicate 
    2114. -
    2115.     * @param    object Node    $object 
    2116. -
    2117.     * @return  string 
    2118. -
    2119.     * @access    private
    2120. -
    2121.     */
    2122. -
    2123.     function _createDynSqlPart_SPO($subject$predicate$object{
    2124. -
    2125.  
    2126. -
    2127.         // conditions derived from the parameters passed to the function
    2128. -
    2129.  
    2130. -
    2131.         $subject_is=is_a($subject,'BlankNode')?'b':(is_a($subject,'Resource')?'r':'l');
    2132. -
    2133.         $sql='';
    2134. -
    2135.         if ($subject != NULL)
    2136. -
    2137.         $sql .= " AND subject='" .$subject->getLabel(."'
    2138. -
    2139.                 AND subject_is='" .$subject_is ."'";
    2140. -
    2141.         if ($predicate != NULL)
    2142. -
    2143.         $sql .= " AND predicate='" .$predicate->getLabel(."'";
    2144. -
    2145.         if ($object != NULL{
    2146. -
    2147.             $object_is is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
    2148. -
    2149.             if (is_a($object'Resource'))
    2150. -
    2151.             $sql .= " AND object='" .$object->getLabel(."'
    2152. -
    2153.                    AND object_is ='" .$object_is ."'";
    2154. -
    2155.             else  {
    2156. -
    2157.                 $quotedLiteral $this->dbConn->qstr($object->getLabel());
    2158. -
    2159.                 $sql .= " AND object=" .$quotedLiteral ."
    2160. -
    2161.                    AND l_language='" .$object->getLanguage(."'
    2162. -
    2163.                    AND l_datatype='" .$object->getDataType(."'
    2164. -
    2165.                    AND object_is ='" .$object_is ."'";
    2166. -
    2167.             }
    2168. -
    2169.         }
    2170. -
    2171.         return $sql;
    2172. -
    2173.     }
    2174. -
    2175.  
    2176. -
    2177.  
    2178. -
    2179.     /**
    2180. -
    2181.     * Get an ADORecordSet with array fields[] containing a representation of
    2182. -
    2183.     * the given DbModel stored in the table: statements, with an index corresponding
    2184. -
    2185.     * to following table columns:
    2186. -
    2187.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2188. -
    2189.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2190. -
    2191.     * (This method operates on data from a DbModel without loading it into a memory model
    2192. -
    2193.     *  in order to save resources and improve speed).
    2194. -
    2195.     *
    2196. -
    2197.     * @param    object DbModel    $DbModel 
    2198. -
    2199.     * @return  object ADORecordSet 
    2200. -
    2201.     * @access    private
    2202. -
    2203.     */
    2204. -
    2205.     function _getRecordSet (&$dbModel{
    2206. -
    2207.  
    2208. -
    2209.         $sql 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
    2210. -
    2211.            FROM statements
    2212. -
    2213.            WHERE modelID = ' .$dbModel->modelID;
    2214. -
    2215.  
    2216. -
    2217.         return $recordSet =$this->dbConn->execute($sql);
    2218. -
    2219.     }
    2220. -
    2221.  
    2222. -
    2223.  
    2224. -
    2225.     /**
    2226. -
    2227.     * Check if this DbModel contains the given row from the array fields[] of an ADORecordSet
    2228. -
    2229.     * The array index corresponds to following table columns:
    2230. -
    2231.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2232. -
    2233.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2234. -
    2235.     *
    2236. -
    2237.     * @param   array  $row 
    2238. -
    2239.     * @return  boolean 
    2240. -
    2241.     * @access    private
    2242. -
    2243.     */
    2244. -
    2245.     function _containsRow ($row{
    2246. -
    2247.  
    2248. -
    2249.         $quotedObject $this->dbConn->qstr($row[2]);
    2250. -
    2251.         $sql "SELECT modelID FROM statements
    2252. -
    2253.            WHERE modelID = " .$this->modelID ."
    2254. -
    2255.            AND subject ='" .$row[0."'
    2256. -
    2257.            AND predicate ='" .$row[1."'
    2258. -
    2259.            AND object =" .$quotedObject ."
    2260. -
    2261.            AND l_language='" .$row[3."'
    2262. -
    2263.            AND l_datatype='" .$row[4."'
    2264. -
    2265.            AND subject_is='" .$row[5."'
    2266. -
    2267.            AND object_is='" .$row[6."'";
    2268. -
    2269.  
    2270. -
    2271.         $res =$this->dbConn->getOne($sql);
    2272. -
    2273.  
    2274. -
    2275.         if (!$res)
    2276. -
    2277.         return FALSE;
    2278. -
    2279.         return TRUE;
    2280. -
    2281.     }
    2282. -
    2283.  
    2284. -
    2285.  
    2286. -
    2287.  
    2288. -
    2289.  
    2290. -
    2291.  
    2292. -
    2293.     /**
    2294. -
    2295.     * Returns the models namespaces.
    2296. -
    2297.     *
    2298. -
    2299.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2300. -
    2301.     * @access   public
    2302. -
    2303.     * @return   Array 
    2304. -
    2305.     */
    2306. -
    2307.     function getParsedNamespaces(){
    2308. -
    2309.         $sql "SELECT * FROM namespaces
    2310. -
    2311.            WHERE modelID = " .$this->modelID;
    2312. -
    2313.         $temp=false;
    2314. -
    2315.         $res $this->dbConn->execute($sql);
    2316. -
    2317.         if($res){
    2318. -
    2319.             while (!$res->EOF{
    2320. -
    2321.                 $temp[$res->fields[1]]=$res->fields[2];
    2322. -
    2323.                 $res->moveNext();
    2324. -
    2325.             }
    2326. -
    2327.         }
    2328. -
    2329.         return $temp;
    2330. -
    2331.     }
    2332. -
    2333.  
    2334. -
    2335.  
    2336. -
    2337.  
    2338. -
    2339.     /**
    2340. -
    2341.     * Adds the namespaces to the model. This method is called by
    2342. -
    2343.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    2344. -
    2345.     * added namespaces in the model !!!!
    2346. -
    2347.     *
    2348. -
    2349.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2350. -
    2351.     * @access   public
    2352. -
    2353.     * @param    Array $newNs 
    2354. -
    2355.     */
    2356. -
    2357.     function addParsedNamespaces($newNs){
    2358. -
    2359.         if($newNs)
    2360. -
    2361.         foreach($newNs as $namespace => $prefix){
    2362. -
    2363.             $this->addNamespace($prefix$namespace);
    2364. -
    2365.         }
    2366. -
    2367.     }
    2368. -
    2369.  
    2370. -
    2371.  
    2372. -
    2373.     /**
    2374. -
    2375.     * Adds a namespace and prefix to the model.
    2376. -
    2377.     *
    2378. -
    2379.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2380. -
    2381.     * @access   public
    2382. -
    2383.     * @param    String $prefix, String $nmsp
    2384. -
    2385.     */
    2386. -
    2387.     function addNamespace($prefix,$nmsp){
    2388. -
    2389.  
    2390. -
    2391.         if($nmsp != '' && $prefix !=''){
    2392. -
    2393.             if($this->_checkNamespace($nmsp)){
    2394. -
    2395.                 $sql "UPDATE namespaces SET prefix='".$prefix."' WHERE
    2396. -
    2397.                 modelID=".$this->modelID." AND namespace='".$nmsp."'";
    2398. -
    2399.             }else{
    2400. -
    2401.                 $sql "INSERT INTO namespaces
    2402. -
    2403.                     (modelID, namespace, prefix)
    2404. -
    2405.                     VALUES
    2406. -
    2407.                     (" .$this->modelID .","
    2408. -
    2409.                 ."'" .$nmsp ."',"
    2410. -
    2411.                 ."'" .$prefix."')";
    2412. -
    2413.             }
    2414. -
    2415.  
    2416. -
    2417.             $rs =$this->dbConn->execute($sql);
    2418. -
    2419.             if (!$rs)
    2420. -
    2421.             $this->dbConn->errorMsg();
    2422. -
    2423.         }
    2424. -
    2425.     }
    2426. -
    2427.  
    2428. -
    2429.     /**
    2430. -
    2431.     * checks if a namespace is already in the model.
    2432. -
    2433.     *
    2434. -
    2435.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2436. -
    2437.     * @access   private
    2438. -
    2439.     * @param    Array $newNs 
    2440. -
    2441.     */
    2442. -
    2443.     function _checkNamespace($nmsp){
    2444. -
    2445.         $res true;
    2446. -
    2447.         $sql "SELECT * FROM namespaces
    2448. -
    2449.                WHERE modelID = " .$this->modelID." AND
    2450. -
    2451.             namespace='".$nmsp."'" ;
    2452. -
    2453.         $rs =$this->dbConn->execute($sql);
    2454. -
    2455.         if (!$rs){
    2456. -
    2457.             $this->dbConn->errorMsg();
    2458. -
    2459.         }else{
    2460. -
    2461.             if($rs->fields == false)
    2462. -
    2463.             $res false;
    2464. -
    2465.         }
    2466. -
    2467.         return $res;
    2468. -
    2469.  
    2470. -
    2471.  
    2472. -
    2473.     }
    2474. -
    2475.  
    2476. -
    2477.     /**
    2478. -
    2479.     * Returns a FindIterator for traversing the MemModel.
    2480. -
    2481.     * @access    public
    2482. -
    2483.     * @return    object    FindIterator 
    2484. -
    2485.     */
    2486. -
    2487.     function iterFind($sub=null,$pred=null,$obj=null{
    2488. -
    2489.         // Import Package Utility
    2490. -
    2491.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    2492. -
    2493.  
    2494. -
    2495.         $if new IterFind($this,$sub,$pred,$obj);
    2496. -
    2497.         return $if;
    2498. -
    2499.     }
    2500. -
    2501.  
    2502. -
    2503.     /**
    2504. -
    2505.     * removes a single namespace from the model
    2506. -
    2507.     *
    2508. -
    2509.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2510. -
    2511.     * @access   public
    2512. -
    2513.     * @param    String $nmsp 
    2514. -
    2515.     */
    2516. -
    2517.     function removeNamespace($nmsp){
    2518. -
    2519.  
    2520. -
    2521.         $sql 'DELETE FROM namespaces
    2522. -
    2523.            WHERE modelID=' .$this->modelID." AND namespace='".$nmsp."'";
    2524. -
    2525.  
    2526. -
    2527.         $rs =$this->dbConn->execute($sql);
    2528. -
    2529.         if (!$rs)
    2530. -
    2531.         $this->dbConn->errorMsg();
    2532. -
    2533.     }
    2534. -
    2535.  
    2536. -
    2537.  
    2538. -
    2539.  
    2540. -
    2541.  
    2542. -
    2543.     /**
    2544. -
    2545.     * Add the given row from the array fields[] of an ADORecordSet to this DbModel
    2546. -
    2547.     * The array index corresponds to following table columns:
    2548. -
    2549.     * [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
    2550. -
    2551.     * [4] - l_datatype, [5] - subject_is, [6] - object_is
    2552. -
    2553.     *
    2554. -
    2555.     * @param   array  $row 
    2556. -
    2557.     * @throws  SqlError
    2558. -
    2559.     * @access    private
    2560. -
    2561.     *
    2562. -
    2563.     function _insertRow ($row) {
    2564. -
    2565.  
    2566. -
    2567.     $quotedObject = $this->dbConn->qstr($row[2]);
    2568. -
    2569.     $sql = "INSERT INTO statements VALUES
    2570. -
    2571.     (" .$this->modelID .","
    2572. -
    2573.     ."'" .$row[0] ."',"
    2574. -
    2575.     ."'" .$row[1] ."',"
    2576. -
    2577.     .""  .$quotedObject .","
    2578. -
    2579.     ."'" .$row[3] ."',"
    2580. -
    2581.     ."'" .$row[4] ."',"
    2582. -
    2583.     ."'" .$row[5] ."',"
    2584. -
    2585.     ."'" .$row[6] ."')";
    2586. -
    2587.  
    2588. -
    2589.     $rs =& $this->dbConn->execute($sql);
    2590. -
    2591.     if (!$rs)
    2592. -
    2593.     $this->dbConn->errorMsg();
    2594. -
    2595.     }
    2596. -
    2597.     */
    2598. -
    2599.  
    2600. -
    2601. // end: Class DbModel
    2602. -
    2603. ?>
    2604. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbStore.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbStore.php.html deleted file mode 100755 index f6d1829f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelDbStore.php.html +++ /dev/null @@ -1,729 +0,0 @@ - - - - - - File Source for DbStore.php - - - - - -

    Source for file DbStore.php

    -

    Documentation is available at DbStore.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'constants.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    6. -
    7.  
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11. // Class: DbStore
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17. /**
    18. -
    19.  * DbStore is a persistent store of RDF data using relational database technology.
    20. -
    21.  * DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB),
    22. -
    23.  * which allows to connect to multiple databases in a portable manner.
    24. -
    25.  * This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server.
    26. -
    27.  * If you want to use other databases, you will have to create tables by yourself
    28. -
    29.  * according to the abstract database schema described in the API documentation.
    30. -
    31.  *
    32. -
    33.  * You can activate debug mode by defining ADODB_DEBUG_MODE to "1".
    34. -
    35.  *
    36. -
    37.  *
    38. -
    39.  * @version  $Id: fsource_model__modelDbStore.php.html 443 2007-06-01 16:25:38Z cax $
    40. -
    41.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    42. -
    43.  * @author   Daniel Westphal (http://www.d-westphal.de)
    44. -
    45.  *
    46. -
    47.  * @package model
    48. -
    49.  * @access    public
    50. -
    51.  */
    52. -
    53.  
    54. -
    55.  
    56. -
    57. class DbStore extends Object{
    58. -
    59.  
    60. -
    61. /**
    62. -
    63.  * Database connection object
    64. -
    65.  *
    66. -
    67.  * @var     object ADOConnection 
    68. -
    69.  * @access    private
    70. -
    71.  */
    72. -
    73.  var $dbConn;
    74. -
    75.  
    76. -
    77.  
    78. -
    79. /**
    80. -
    81.  * Constructor:
    82. -
    83.  * Set the database connection with the given parameters.
    84. -
    85.  *
    86. -
    87.  * @param   string   $dbDriver 
    88. -
    89.  * @param   string   $host 
    90. -
    91.  * @param   string   $dbName 
    92. -
    93.  * @param   string   $user 
    94. -
    95.  * @param   string   $password 
    96. -
    97.  * @access    public
    98. -
    99.  */
    100. -
    101.  function DbStore ($dbDriver=ADODB_DB_DRIVER$host=ADODB_DB_HOST$dbName=ADODB_DB_NAME,
    102. -
    103.                    $user=ADODB_DB_USER$password=ADODB_DB_PASSWORD{
    104. -
    105.  
    106. -
    107.    // include DBase Package
    108. -
    109.    require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
    110. -
    111.  
    112. -
    113.    // create a new connection object
    114. -
    115.    $this->dbConn =ADONewConnection($dbDriver);
    116. -
    117.  
    118. -
    119.    //activate the ADOdb DEBUG mode
    120. -
    121.    if (ADODB_DEBUG_MODE == '1')
    122. -
    123.         $this->dbConn->debug true;
    124. -
    125.  
    126. -
    127.    // connect to database
    128. -
    129.    $r $this->dbConn->connect($host$user$password$dbName);
    130. -
    131.    if ($r !== true{
    132. -
    133.       throw new Exception('Could not connect to database');
    134. -
    135.    }
    136. -
    137.  
    138. -
    139.    // optimized for speed
    140. -
    141.    $this->dbConn->setFetchMode(ADODB_FETCH_NUM);
    142. -
    143.    //$ADODB_COUNTRECS = FALSE;
    144. -
    145.  }
    146. -
    147.  
    148. -
    149.  
    150. -
    151. /**
    152. -
    153.  * Create tables and indexes for the given database type.
    154. -
    155.  * Currently supported: MsAccess and MySQL.
    156. -
    157.  * If you want to use other databases, you will have to create tables by yourself
    158. -
    159.  * according to the abstract <a href="database_schema.html">database schema</a>
    160. -
    161.  * described in the API documentation.
    162. -
    163.  *
    164. -
    165.  * @param   string  $databaseType 
    166. -
    167.  * @throws    PhpError
    168. -
    169.  * @access    public
    170. -
    171.  */
    172. -
    173.  function createTables($databaseType{
    174. -
    175.  
    176. -
    177.    if (!strcasecmp($databaseType'MsAccess'))
    178. -
    179.    $this->_createTables_MsAccess();
    180. -
    181.    elseif (!strcasecmp($databaseType'MySQL'))
    182. -
    183.        $this->_createTables_MySql();
    184. -
    185.    elseif (!strcasecmp($databaseType'MSSQL'))
    186. -
    187.            $this->_createTables_mssql();
    188. -
    189.    else {
    190. -
    191.        $errmsg RDFAPI_ERROR "(classDbStoremethodcreateTables('$databaseType')):
    192. -
    193.                                   Currently only MsAccesMySQL and MSSQL supported.";
    194. -
    195.        trigger_error($errmsgE_USER_ERROR);
    196. -
    197.    }
    198. -
    199.  }
    200. -
    201.  
    202. -
    203.  
    204. -
    205. /**
    206. -
    207.  * List all DbModels stored in the database.
    208. -
    209.  *
    210. -
    211.  * @return  array 
    212. -
    213.  * @throws    SqlError
    214. -
    215.  * @access    public
    216. -
    217.  */
    218. -
    219.  function listModels({
    220. -
    221.  
    222. -
    223.    $recordSet =$this->dbConn->execute("SELECT modelURI, baseURI
    224. -
    225.                                          FROM models");
    226. -
    227.    if (!$recordSet)
    228. -
    229.       echo $this->dbConn->errorMsg();
    230. -
    231.    else {
    232. -
    233.       $models array();
    234. -
    235.       $i=0;
    236. -
    237.       while (!$recordSet->EOF{
    238. -
    239.  
    240. -
    241.           $models[$i]['modelURI'$recordSet->fields[0];
    242. -
    243.           $models[$i]['baseURI'$recordSet->fields[1];
    244. -
    245.  
    246. -
    247.           ++$i;
    248. -
    249.           $recordSet->moveNext();
    250. -
    251.       }
    252. -
    253.       return $models;
    254. -
    255.    }
    256. -
    257.  }
    258. -
    259.  
    260. -
    261.  
    262. -
    263. /**
    264. -
    265.  * Check if the DbModel with the given modelURI is already stored in the database
    266. -
    267.  *
    268. -
    269.  * @param   string   $modelURI 
    270. -
    271.  * @return  boolean 
    272. -
    273.  * @throws    SqlError
    274. -
    275.  * @access    public
    276. -
    277.  */
    278. -
    279.  function modelExists($modelURI{
    280. -
    281.  
    282. -
    283.    $res =$this->dbConn->execute("SELECT COUNT(*) FROM models
    284. -
    285.                                    WHERE modelURI = '" .$modelURI ."'");
    286. -
    287.    if (!$res)
    288. -
    289.       echo $this->dbConn->errorMsg();
    290. -
    291.    else {
    292. -
    293.       if (!$res->fields[0]{
    294. -
    295.           $res->Close();
    296. -
    297.          return FALSE;
    298. -
    299.       else {
    300. -
    301.           $res->Close();
    302. -
    303.           return TRUE;
    304. -
    305.       }
    306. -
    307.    }
    308. -
    309.  }
    310. -
    311.  
    312. -
    313.  
    314. -
    315. /**
    316. -
    317.  * Create a new instance of DbModel with the given $modelURI and
    318. -
    319.  * load the corresponding values of modelID and baseURI from the database.
    320. -
    321.  * Return FALSE if the DbModel does not exist.
    322. -
    323.  *
    324. -
    325.  * @param   string   $modelURI 
    326. -
    327.  * @return  object DbModel 
    328. -
    329.  * @access    public
    330. -
    331.  */
    332. -
    333.  function getModel($modelURI{
    334. -
    335.  
    336. -
    337.    if (!$this->modelExists($modelURI))
    338. -
    339.       return FALSE;
    340. -
    341.    else {
    342. -
    343.       $modelVars =$this->dbConn->execute("SELECT modelURI, modelID, baseURI
    344. -
    345.                                             FROM models
    346. -
    347.                                             WHERE modelURI='" .$modelURI ."'");
    348. -
    349.  
    350. -
    351.       return new DbModel($this->dbConn$modelVars->fields[0],
    352. -
    353.                          $modelVars->fields[1]$modelVars->fields[2]);
    354. -
    355.    }
    356. -
    357.  }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. /**
    364. -
    365.  * Create a new instance of DbModel with the given $modelURI
    366. -
    367.  * and insert the DbModel variables into the database.
    368. -
    369.  * Return FALSE if there is already a model with the given URI.
    370. -
    371.  *
    372. -
    373.  * @param   string   $modelURI 
    374. -
    375.  * @param   string   $baseURI 
    376. -
    377.  * @return  object DbModel 
    378. -
    379.  * @throws  SqlError
    380. -
    381.  * @access    public
    382. -
    383.  */
    384. -
    385.  function getNewModel($modelURI$baseURI=NULL{
    386. -
    387.  
    388. -
    389.    if ($this->modelExists($modelURI))
    390. -
    391.       return FALSE;
    392. -
    393.    else {
    394. -
    395.       $modelID $this->_createUniqueModelID();
    396. -
    397.  
    398. -
    399.       $rs =$this->dbConn->execute("INSERT INTO models
    400. -
    401.                                             (modelID, modelURI, baseURI)
    402. -
    403.                                             VALUES ('" .$modelID ."',
    404. -
    405.                                                     '" .$modelURI ."',
    406. -
    407.                                                     '" .$baseURI ."')");
    408. -
    409.       if (!$rs)
    410. -
    411.          $this->dbConn->errorMsg();
    412. -
    413.       else
    414. -
    415.          return new DbModel($this->dbConn$modelURI$modelID$baseURI);
    416. -
    417.    }
    418. -
    419.  }
    420. -
    421.  
    422. -
    423.  
    424. -
    425. /**
    426. -
    427.  * Store a MemModel or another DbModel from a different DbStore in the database.
    428. -
    429.  * Return FALSE if there is already a model with modelURI matching the modelURI
    430. -
    431.  * of the given model.
    432. -
    433.  *
    434. -
    435.  * @param   object Model  &$model 
    436. -
    437.  * @param   string $modelURI 
    438. -
    439.  * @return  boolean 
    440. -
    441.  * @access    public
    442. -
    443.  */
    444. -
    445.  function putModel(&$model$modelURI=NULL{
    446. -
    447.  
    448. -
    449.    if (!$modelURI{
    450. -
    451.       if (is_a($model'MemModel'))
    452. -
    453.          $modelURI 'DbModel-' .$this->_createUniqueModelID();
    454. -
    455.       else
    456. -
    457.          $modelURI $model->modelURI;
    458. -
    459.    }else
    460. -
    461.       if ($this->modelExists($modelURI))
    462. -
    463.          return FALSE;
    464. -
    465.  
    466. -
    467.  
    468. -
    469.    $newDbModel $this->getNewModel($modelURI$model->getBaseURI());
    470. -
    471.    $newDbModel->addModel($model);
    472. -
    473.  }
    474. -
    475.  
    476. -
    477.  
    478. -
    479. /**
    480. -
    481.  * Close the DbStore.
    482. -
    483.  * !!! Warning: If you close the DbStore all active instances of DbModel from this
    484. -
    485.  * !!!          DbStore will lose their database connection !!!
    486. -
    487.  *
    488. -
    489.  * @access    public
    490. -
    491.  */
    492. -
    493.  function close({
    494. -
    495.  
    496. -
    497.    $this->dbConn->close();
    498. -
    499.    unset($this);
    500. -
    501.  }
    502. -
    503.  
    504. -
    505.  
    506. -
    507. // =============================================================================
    508. -
    509. // **************************** private methods ********************************
    510. -
    511. // =============================================================================
    512. -
    513.  
    514. -
    515.  
    516. -
    517. /**
    518. -
    519.  * Create a unique ID for the DbModel to be insert into the models table.
    520. -
    521.  * This method was implemented because some databases do not support auto-increment.
    522. -
    523.  *
    524. -
    525.  * @return  integer 
    526. -
    527.  * @access    private
    528. -
    529.  */
    530. -
    531.  function _createUniqueModelID({
    532. -
    533.  
    534. -
    535.    $maxModelID =$this->dbConn->GetOne('SELECT MAX(modelID) FROM models');
    536. -
    537.    return ++$maxModelID;
    538. -
    539.  }
    540. -
    541.  
    542. -
    543.  /**
    544. -
    545.  * Create a unique ID for the dataset to be insert into the datasets table.
    546. -
    547.  * This method was implemented because some databases do not support auto-increment.
    548. -
    549.  *
    550. -
    551.  * @return  integer 
    552. -
    553.  * @access    private
    554. -
    555.  */
    556. -
    557.  function _createUniqueDatasetID({
    558. -
    559.  
    560. -
    561.    $maxDatasetID =$this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets');
    562. -
    563.    return ++$maxDatasetID;
    564. -
    565.  }
    566. -
    567.  
    568. -
    569.  
    570. -
    571. /**
    572. -
    573.  * Create tables and indexes for MsAccess database
    574. -
    575.  *
    576. -
    577.  * @throws  SqlError
    578. -
    579.  * @access    private
    580. -
    581.  */
    582. -
    583.  function _createTables_MsAccess({
    584. -
    585.  
    586. -
    587.    $this->dbConn->startTrans();
    588. -
    589.  
    590. -
    591.    $this->dbConn->execute('CREATE TABLE models
    592. -
    593.                            (modelID long primary key,
    594. -
    595.                             modelURI varchar not null,
    596. -
    597.                             baseURI varchar)');
    598. -
    599.  
    600. -
    601.    $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
    602. -
    603.  
    604. -
    605.    $this->dbConn->execute('CREATE TABLE statements
    606. -
    607.                            (modelID long,
    608. -
    609.                             subject varchar,
    610. -
    611.                             predicate varchar,
    612. -
    613.                             object Memo,
    614. -
    615.                             l_language varchar,
    616. -
    617.                             l_datatype varchar,
    618. -
    619.                             subject_is varchar(1),
    620. -
    621.                             object_is varchar(1),
    622. -
    623.                             primary key (modelID, subject, predicate, object,
    624. -
    625.                                          l_language, l_datatype))');
    626. -
    627.  
    628. -
    629.    $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
    630. -
    631.    $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)');
    632. -
    633.    $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)');
    634. -
    635.    $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)');
    636. -
    637.  
    638. -
    639.      $this->dbConn->execute('CREATE TABLE namespaces
    640. -
    641.                            (modelID long,
    642. -
    643.                             namespace varchar,
    644. -
    645.                             prefix varchar,
    646. -
    647.                             primary key (modelID, namespace, prefix))');
    648. -
    649.  
    650. -
    651.    $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)');
    652. -
    653.    $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)');
    654. -
    655.  
    656. -
    657.      $this->dbConn->execute("CREATE TABLE datasets
    658. -
    659.                            (datasetName varchar,
    660. -
    661.                               defaultModelUri varchar,
    662. -
    663.                             primary key (datasetName))");
    664. -
    665.  
    666. -
    667.    $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)');
    668. -
    669.  
    670. -
    671.  
    672. -
    673.    $this->dbConn->execute("CREATE TABLE `dataset_model` (
    674. -
    675.                               datasetName varchar,
    676. -
    677.                               modelId long,
    678. -
    679.                             graphURI varchar,
    680. -
    681.                             PRIMARY KEY  (modelId,datasetName))");
    682. -
    683.  
    684. -
    685.  
    686. -
    687.    if (!$this->dbConn->completeTrans())
    688. -
    689.       echo $this->dbConn->errorMsg();
    690. -
    691.  }
    692. -
    693.  
    694. -
    695.  
    696. -
    697. /**
    698. -
    699.  * Create tables and indexes for MySQL database
    700. -
    701.  *
    702. -
    703.  * @throws  SqlError
    704. -
    705.  * @access    private
    706. -
    707.  */
    708. -
    709.  function _createTables_MySql({
    710. -
    711.  
    712. -
    713.    $this->dbConn->startTrans();
    714. -
    715.  
    716. -
    717.    $this->dbConn->execute("CREATE TABLE models
    718. -
    719.                            (modelID bigint NOT NULL,
    720. -
    721.                             modelURI varchar(255) NOT NULL,
    722. -
    723.                             baseURI varchar(255) DEFAULT '',
    724. -
    725.                             primary key (modelID))");
    726. -
    727.  
    728. -
    729.    $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
    730. -
    731.  
    732. -
    733.    $this->dbConn->execute("CREATE TABLE statements
    734. -
    735.                            (modelID bigint NOT NULL,
    736. -
    737.                             subject varchar(255) NOT NULL,
    738. -
    739.                             predicate varchar(255) NOT NULL,
    740. -
    741.                             object text,
    742. -
    743.                             l_language varchar(255) DEFAULT '',
    744. -
    745.                             l_datatype varchar(255) DEFAULT '',
    746. -
    747.                             subject_is varchar(1) NOT NULL,
    748. -
    749.                             object_is varchar(1) NOT NULL)");
    750. -
    751.  
    752. -
    753.    $this->dbConn->execute("CREATE TABLE namespaces
    754. -
    755.                            (modelID bigint NOT NULL,
    756. -
    757.                             namespace varchar(255) NOT NULL,
    758. -
    759.                             prefix varchar(255) NOT NULL,
    760. -
    761.                                primary key (modelID,namespace))");
    762. -
    763.  
    764. -
    765.   $this->dbConn->execute("CREATE TABLE `dataset_model` (
    766. -
    767.                               `datasetName` varchar(255) NOT NULL default '0',
    768. -
    769.                               `modelId` bigint(20) NOT NULL default '0',
    770. -
    771.                             `graphURI` varchar(255) NOT NULL default '',
    772. -
    773.                              PRIMARY KEY  (`modelId`,`datasetName`))");
    774. -
    775.  
    776. -
    777.   $this->dbConn->execute("CREATE TABLE `datasets` (
    778. -
    779.                               `datasetName` varchar(255) NOT NULL default '',
    780. -
    781.                             `defaultModelUri` varchar(255) NOT NULL default '0',
    782. -
    783.                              PRIMARY KEY  (`datasetName`),
    784. -
    785.                              KEY `datasetName` (`datasetName`))");
    786. -
    787.  
    788. -
    789.    $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
    790. -
    791.    $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)');
    792. -
    793.  
    794. -
    795.    $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements
    796. -
    797.                           (subject(200),predicate(200))');
    798. -
    799.  
    800. -
    801.    $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject(200))');
    802. -
    803.    $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate(200))');
    804. -
    805.    $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))');
    806. -
    807.  
    808. -
    809.    $this->dbConn->execute('CREATE FULLTEXT INDEX s_obj_ftidx ON statements (object)');
    810. -
    811.  
    812. -
    813.    if (!$this->dbConn->completeTrans())
    814. -
    815.       echo $this->dbConn->errorMsg();
    816. -
    817.  }
    818. -
    819.  
    820. -
    821.  /**
    822. -
    823.  * Create tables and indexes for MSSQL database
    824. -
    825.  *
    826. -
    827.  * @throws  SqlError
    828. -
    829.  * @access    private
    830. -
    831.  */
    832. -
    833.  function _createTables_mssql(){
    834. -
    835.  
    836. -
    837.    $this->dbConn->startTrans();
    838. -
    839.  
    840. -
    841.    $this->dbConn->execute("CREATE TABLE [dbo].[models] (
    842. -
    843.                             [modelID] [int] NOT NULL ,
    844. -
    845.                             [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    846. -
    847.                             [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    848. -
    849.                             ) ON [PRIMARY]");
    850. -
    851.  
    852. -
    853.    $this->dbConn->execute("CREATE TABLE [dbo].[statements] (
    854. -
    855.                             [modelID] [int] NOT NULL ,
    856. -
    857.                             [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    858. -
    859.                             [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    860. -
    861.                             [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    862. -
    863.                             [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    864. -
    865.                             [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    866. -
    867.                             [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    868. -
    869.                             [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    870. -
    871.                             ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]");
    872. -
    873.  
    874. -
    875.  
    876. -
    877.     $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] (
    878. -
    879.                             [modelID] [int] NOT NULL ,
    880. -
    881.                             [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    882. -
    883.                             [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    884. -
    885.                             ) ON [PRIMARY]");
    886. -
    887.  
    888. -
    889.    $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD
    890. -
    891.                             CONSTRAINT [PK_models] PRIMARY KEY  CLUSTERED
    892. -
    893.                             (
    894. -
    895.                                 [modelID]
    896. -
    897.                             )  ON [PRIMARY] ");
    898. -
    899.    $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD
    900. -
    901.                             CONSTRAINT [PK_namespaces] PRIMARY KEY  CLUSTERED
    902. -
    903.                             (
    904. -
    905.                                 [modelID],[namespace]
    906. -
    907.                             )  ON [PRIMARY] ");
    908. -
    909.  
    910. -
    911.    $this->dbConn->execute("CREATE  INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]");
    912. -
    913.  
    914. -
    915.  
    916. -
    917.    if (!$this->dbConn->completeTrans())
    918. -
    919.        echo $this->dbConn->errorMsg();
    920. -
    921.  
    922. -
    923.  }
    924. -
    925.  
    926. -
    927.  
    928. -
    929.   /**
    930. -
    931.   * Checks if tables are setup for RAP
    932. -
    933.   *
    934. -
    935.   * @param   string  $databaseType 
    936. -
    937.   * @throws SqlError
    938. -
    939.   * @access public
    940. -
    941.   ***/
    942. -
    943.  function isSetup($databaseType="MySQL"{
    944. -
    945.    if ($databaseType=="MySQL")
    946. -
    947.      return $this->_isSetup_MySql();
    948. -
    949.     if ($databaseType=="MSSQL")
    950. -
    951.      return $this->_isSetup_MSSQL();
    952. -
    953.    else {
    954. -
    955.        if ($databaseType=='MsAccess'){
    956. -
    957.            return $this->_isSetup_MsAccess();
    958. -
    959.        }else{
    960. -
    961.      $errmsg=RDFAPI_ERROR."(classDbStoremethod isSetup('$databaseType')):\nCurrently only MySQLMsAccess and MSSQL are supported!";
    962. -
    963.      trigger_error($errmsgE_USER_ERROR);}
    964. -
    965.    }
    966. -
    967.  }
    968. -
    969.  
    970. -
    971.  /**
    972. -
    973.   * Checks if tables are setup for RAP (MySql)
    974. -
    975.   *
    976. -
    977.   * @throws SqlError
    978. -
    979.   * @access private
    980. -
    981.   ***/
    982. -
    983.  function _isSetup_MySql({
    984. -
    985.    $recordSet =$this->dbConn->execute("SHOW TABLES");
    986. -
    987.    if (!$recordSet)
    988. -
    989.      echo $this->dbConn->errorMsg();
    990. -
    991.    else {
    992. -
    993.      $tables array();
    994. -
    995.      while (!$recordSet->EOF{
    996. -
    997.  
    998. -
    999.        $tables[]$recordSet->fields[0];
    1000. -
    1001.  
    1002. -
    1003.        if(isset($i)){++$i;}
    1004. -
    1005.        $recordSet->moveNext();
    1006. -
    1007.      }
    1008. -
    1009.      if (in_array("models",$tables&& in_array("statements",$tables)&& in_array("namespaces",$tables)) return true;
    1010. -
    1011.    }
    1012. -
    1013.    return false;
    1014. -
    1015.  
    1016. -
    1017.  }
    1018. -
    1019.  
    1020. -
    1021.  
    1022. -
    1023.   /**
    1024. -
    1025.   * Checks if tables are setup for RAP (MsAccess)
    1026. -
    1027.   *
    1028. -
    1029.   * @throws SqlError
    1030. -
    1031.   * @access private
    1032. -
    1033.   ***/
    1034. -
    1035.  function _isSetup_MsAccess({
    1036. -
    1037.        $tables =$this->dbConn->MetaTables();
    1038. -
    1039.        if (!$tables)
    1040. -
    1041.      echo $this->dbConn->errorMsg();
    1042. -
    1043.    if (count($tables)==0){
    1044. -
    1045.      return false;}
    1046. -
    1047.    else {
    1048. -
    1049.            if (in_array("models",$tables&& in_array("statements",$tables&& in_array("namespaces",$tables))return true;
    1050. -
    1051.            }else{return false;}
    1052. -
    1053.    }
    1054. -
    1055.  }
    1056. -
    1057.  
    1058. -
    1059.   /**
    1060. -
    1061.   * Checks if tables are setup for RAP (MSSQL)
    1062. -
    1063.   *
    1064. -
    1065.   * @throws SqlError
    1066. -
    1067.   * @access private
    1068. -
    1069.   ***/
    1070. -
    1071.  function _isSetup_MSSQL({
    1072. -
    1073.        $tables =$this->dbConn->MetaTables();
    1074. -
    1075.        if (!$tables)
    1076. -
    1077.      echo $this->dbConn->errorMsg();
    1078. -
    1079.    if (count($tables)==0){
    1080. -
    1081.      return false;}
    1082. -
    1083.    else {
    1084. -
    1085.            if (in_array("models",$tables&& in_array("statements",$tables&& in_array("namespaces",$tables))return true;
    1086. -
    1087.            }else{return false;}
    1088. -
    1089.    }
    1090. -
    1091.  }
    1092. -
    1093.  
    1094. -
    1095.  
    1096. -
    1097.  /**
    1098. -
    1099.  * Create a new instance of DatasetDb with the given $datasetName
    1100. -
    1101.  * and insert the DatasetDb variables into the database.
    1102. -
    1103.  * Return FALSE if there is already a model with the given URI.
    1104. -
    1105.  *
    1106. -
    1107.  * @param   $datasetName string
    1108. -
    1109.  * @return  object DatasetDB 
    1110. -
    1111.  * @throws  SqlError
    1112. -
    1113.  * @access    public
    1114. -
    1115.  */
    1116. -
    1117.  function getNewDatasetDb($datasetName)
    1118. -
    1119.  {
    1120. -
    1121.  
    1122. -
    1123.      require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1124. -
    1125.  
    1126. -
    1127.    if ($this->datasetExists($datasetName))
    1128. -
    1129.       return FALSE;
    1130. -
    1131.    else
    1132. -
    1133.    {
    1134. -
    1135.            $defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_');
    1136. -
    1137.            $defaultModel=$this->getNewModel($defaultModelUri);
    1138. -
    1139.  
    1140. -
    1141.           $rs =$this->dbConn->execute("INSERT INTO datasets
    1142. -
    1143.                                             VALUES ('" .$datasetName ."',
    1144. -
    1145.                                                     '" .$defaultModelUri."')");
    1146. -
    1147.  
    1148. -
    1149.       if (!$rs)
    1150. -
    1151.          $this->dbConn->errorMsg();
    1152. -
    1153.       else
    1154. -
    1155.         $return=new DatasetDb($this->dbConn$this$datasetName);
    1156. -
    1157.            return ($return);
    1158. -
    1159.    }
    1160. -
    1161.  }
    1162. -
    1163.  
    1164. -
    1165.  /**
    1166. -
    1167.  * Check if the Dataset with the given $datasetName is already stored in the database
    1168. -
    1169.  *
    1170. -
    1171.  * @param   $datasetName string
    1172. -
    1173.  * @return  boolean 
    1174. -
    1175.  * @throws    SqlError
    1176. -
    1177.  * @access    public
    1178. -
    1179.  */
    1180. -
    1181. function datasetExists($datasetName{
    1182. -
    1183.  
    1184. -
    1185.    $res =$this->dbConn->execute("SELECT COUNT(*) FROM datasets
    1186. -
    1187.                                    WHERE datasetName = '" .$datasetName ."'");
    1188. -
    1189.    if (!$res)
    1190. -
    1191.       echo $this->dbConn->errorMsg();
    1192. -
    1193.    else {
    1194. -
    1195.       if (!$res->fields[0])
    1196. -
    1197.          return FALSE;
    1198. -
    1199.       return TRUE;
    1200. -
    1201.    }
    1202. -
    1203.  }
    1204. -
    1205.  
    1206. -
    1207.  
    1208. -
    1209.  /**
    1210. -
    1211.  * Create a new instance of DatasetDb with the given $datasetName and
    1212. -
    1213.  * load the corresponding values from the database.
    1214. -
    1215.  * Return FALSE if the DbModel does not exist.
    1216. -
    1217.  *
    1218. -
    1219.  * @param   $datasetId string
    1220. -
    1221.  * @return  object DatasetDb 
    1222. -
    1223.  * @access    public
    1224. -
    1225.  */
    1226. -
    1227.  function &getDatasetDb($datasetName{
    1228. -
    1229.     require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1230. -
    1231.  
    1232. -
    1233.     if (!$this->datasetExists($datasetName)) {
    1234. -
    1235.         return FALSE;
    1236. -
    1237.     else {
    1238. -
    1239.         $return new DatasetDb($this->dbConn$this$datasetName);
    1240. -
    1241.         return ($return);
    1242. -
    1243.     }
    1244. -
    1245.  }
    1246. -
    1247.  
    1248. -
    1249.  /**
    1250. -
    1251.  * Create a new instance of namedGraphDb with the given $modelURI and graphName and
    1252. -
    1253.  * load the corresponding values of modelID and baseURI from the database.
    1254. -
    1255.  * Return FALSE if the DbModel does not exist.
    1256. -
    1257.  *
    1258. -
    1259.  * @param   $modelURI string
    1260. -
    1261.  * @param   $graphName string
    1262. -
    1263.  * @return  object NamedGraphMem 
    1264. -
    1265.  * @access    public
    1266. -
    1267.  */
    1268. -
    1269.  function getNamedGraphDb($modelURI$graphName)
    1270. -
    1271.  {
    1272. -
    1273.     require_once(RDFAPI_INCLUDE_DIR PACKAGE_DATASET);
    1274. -
    1275.  
    1276. -
    1277.    if (!$this->modelExists($modelURI))
    1278. -
    1279.       return FALSE;
    1280. -
    1281.    else {
    1282. -
    1283.       $modelVars =$this->dbConn->execute("SELECT modelURI, modelID, baseURI
    1284. -
    1285.                                             FROM models
    1286. -
    1287.                                             WHERE modelURI='" .$modelURI ."'");
    1288. -
    1289.  
    1290. -
    1291.       return new NamedGraphDb($this->dbConn$modelVars->fields[0],
    1292. -
    1293.                          $modelVars->fields[1]$graphName ,$modelVars->fields[2]);
    1294. -
    1295.    }
    1296. -
    1297.  }
    1298. -
    1299.  
    1300. -
    1301.  /**
    1302. -
    1303.  * Create a new instance of namedGraphDb with the given $modelURI and graphName
    1304. -
    1305.  * and insert the DbModel variables into the database (not the graphName. This
    1306. -
    1307.  * is only stored persistently, when added to dataset).
    1308. -
    1309.  * Return FALSE if there is already a model with the given URI.
    1310. -
    1311.  *
    1312. -
    1313.  * @param   $modelURI string
    1314. -
    1315.  * @param      $graphName string
    1316. -
    1317.  * @param   $baseURI string
    1318. -
    1319.  * @return  object namedGraphDb 
    1320. -
    1321.  * @throws  SqlError
    1322. -
    1323.  * @access    public
    1324. -
    1325.  */
    1326. -
    1327.  function getNewNamedGraphDb($modelURI$graphName$baseURI=NULL{
    1328. -
    1329.  
    1330. -
    1331.    if ($this->modelExists($modelURI))
    1332. -
    1333.       return FALSE;
    1334. -
    1335.    else {
    1336. -
    1337.       $modelID $this->_createUniqueModelID();
    1338. -
    1339.  
    1340. -
    1341.       $rs =$this->dbConn->execute("INSERT INTO models
    1342. -
    1343.                                             (modelID, modelURI, baseURI)
    1344. -
    1345.                                             VALUES ('" .$modelID ."',
    1346. -
    1347.                                                     '" .$modelURI ."',
    1348. -
    1349.                                                     '" .$baseURI ."')");
    1350. -
    1351.       if (!$rs)
    1352. -
    1353.          $this->dbConn->errorMsg();
    1354. -
    1355.       else
    1356. -
    1357.          return new NamedGraphDb($this->dbConn$modelURI$modelID$graphName$baseURI);
    1358. -
    1359.    }
    1360. -
    1361.  }
    1362. -
    1363.  
    1364. -
    1365.  /**
    1366. -
    1367.  * Removes the graph with all statements from the database.
    1368. -
    1369.  * Warning: A single namedGraph can be added to several datasets. So it'll be
    1370. -
    1371.  * removed from all datasets.
    1372. -
    1373.  *
    1374. -
    1375.  * @param   $modelURI string
    1376. -
    1377.  * @return  boolean 
    1378. -
    1379.  * @throws  SqlError
    1380. -
    1381.  * @access    public
    1382. -
    1383.  */
    1384. -
    1385.  function removeNamedGraphDb($modelURI)
    1386. -
    1387.  {
    1388. -
    1389.     if (!$this->modelExists($modelURI))
    1390. -
    1391.         return FALSE;
    1392. -
    1393.  
    1394. -
    1395.     $modelID $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'");
    1396. -
    1397.  
    1398. -
    1399.     $this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID);
    1400. -
    1401.     $this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID);
    1402. -
    1403.     $this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID);
    1404. -
    1405.  
    1406. -
    1407.     return true;
    1408. -
    1409.  }
    1410. -
    1411.  
    1412. -
    1413. // end: Class DbStore
    1414. -
    1415. ?>
    1416. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelLiteral.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelLiteral.php.html deleted file mode 100755 index bc0c2975..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelLiteral.php.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - File Source for Literal.php - - - - - -

    Source for file Literal.php

    -

    Documentation is available at Literal.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Node.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Literal
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF literal.
    18. -
    19.  * The literal supports the xml:lang and rdf:datatype property.
    20. -
    21.  * For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
    22. -
    23.  *
    24. -
    25.  * @version  $Id: fsource_model__modelLiteral.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27.  * @author Chris Bizer <chris@bizer.de>
    28. -
    29.  * @author Daniel Westphal <dawe@gmx.de>
    30. -
    31.  *
    32. -
    33.  * @package model
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  */
    40. -
    41.  class Literal extends Node {
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Label of the literal
    48. -
    49.     * @var        string 
    50. -
    51.     * @access    private
    52. -
    53.     */
    54. -
    55.     var $label;
    56. -
    57.    /**
    58. -
    59.     * Language of the literal
    60. -
    61.     * @var        string 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $lang;
    68. -
    69.  
    70. -
    71.    /**
    72. -
    73.     * Datatype of the literal
    74. -
    75.     * @var        string 
    76. -
    77.     * @access    private
    78. -
    79.     */
    80. -
    81.     var $dtype;
    82. -
    83.  
    84. -
    85.  
    86. -
    87.    /**
    88. -
    89.     * Constructor
    90. -
    91.     *
    92. -
    93.     * @param    string    $str            label of the literal
    94. -
    95.     * @param     string $language        optional language identifier
    96. -
    97.     *
    98. -
    99.     */
    100. -
    101.     function Literal($str$language NULL{
    102. -
    103.         $this->dtype NULL;
    104. -
    105.         $this->label $str;
    106. -
    107.  
    108. -
    109.         if ($language != NULL{
    110. -
    111.             $this->lang $language;
    112. -
    113.         else {
    114. -
    115.             $this->lang NULL;
    116. -
    117.         }
    118. -
    119.  
    120. -
    121.  
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.   /**
    128. -
    129.    * Returns the string value of the literal.
    130. -
    131.    *
    132. -
    133.    * @access    public
    134. -
    135.    * @return    string value of the literal
    136. -
    137.    */
    138. -
    139.   function getLabel({
    140. -
    141.  
    142. -
    143.     return $this->label;
    144. -
    145.   }
    146. -
    147.  
    148. -
    149.   /**
    150. -
    151.    * Returns the language of the literal.
    152. -
    153.    *
    154. -
    155.    * @access    public
    156. -
    157.    * @return    string language of the literal
    158. -
    159.    */
    160. -
    161.   function getLanguage({
    162. -
    163.  
    164. -
    165.     return $this->lang;
    166. -
    167.   }
    168. -
    169.  
    170. -
    171.   /**
    172. -
    173.    * Sets the language of the literal.
    174. -
    175.    *
    176. -
    177.    * @access    public
    178. -
    179.    * @param        string $lang 
    180. -
    181.    */
    182. -
    183.   function setLanguage($lang{
    184. -
    185.  
    186. -
    187.     $this->lang $lang;
    188. -
    189.   }
    190. -
    191.  
    192. -
    193.   /**
    194. -
    195.    * Returns the datatype of the literal.
    196. -
    197.    *
    198. -
    199.    * @access    public
    200. -
    201.    * @return    string datatype of the literal
    202. -
    203.    */
    204. -
    205.   function getDatatype({
    206. -
    207.  
    208. -
    209.     return $this->dtype;
    210. -
    211.   }
    212. -
    213.  
    214. -
    215.   /**
    216. -
    217.    * Sets the datatype of the literal.
    218. -
    219.    * Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER.
    220. -
    221.    * The array $short_datatype with the possible shortcuts is definded in ../constants.php
    222. -
    223.    *
    224. -
    225.    * @access    public
    226. -
    227.    * @param        string URI of XML datatype or datatype shortcut
    228. -
    229.    *
    230. -
    231.    */
    232. -
    233.   function setDatatype($datatype{
    234. -
    235.     GLOBAL $short_datatype;
    236. -
    237.     if  (stristr($datatype,DATATYPE_SHORTCUT_PREFIX))  {
    238. -
    239.         $this->dtype $short_datatype[substr($datatype,strlen(DATATYPE_SHORTCUT_PREFIX)) ];}
    240. -
    241.     else
    242. -
    243.         $this->dtype $datatype;
    244. -
    245.   }
    246. -
    247.  
    248. -
    249.   /**
    250. -
    251.    * Checks if ihe literal equals another literal.
    252. -
    253.    * Two literals are equal, if they have the same label and they
    254. -
    255.    * have the same language/datatype or both have no language/datatype property set.
    256. -
    257.    *
    258. -
    259.    * @access    public
    260. -
    261.    * @param        object    literal $that 
    262. -
    263.    * @return    boolean 
    264. -
    265.    */
    266. -
    267.   function equals ($that{
    268. -
    269.  
    270. -
    271.     if (($that == NULLor !(is_a($that'Literal'))) {
    272. -
    273.       return false;
    274. -
    275.     }
    276. -
    277.  
    278. -
    279.     if ( ($this->label == $that->getLabel()) && ( ( ($this->lang == $that->getLanguage()) ||
    280. -
    281.        ($this->lang == NULL && $that->getLanguage(== NULL) )  &&
    282. -
    283.  
    284. -
    285.        (
    286. -
    287.        ($this->dtype == $that->getDatatype(||
    288. -
    289.        ($this->dtype == NULL && $that->getDatatype(== NULL)) ) ) )
    290. -
    291.          {
    292. -
    293.             return true;
    294. -
    295.          }
    296. -
    297.  
    298. -
    299.     return false;
    300. -
    301.   }
    302. -
    303.  
    304. -
    305.   /**
    306. -
    307.    * Dumps literal.
    308. -
    309.    *
    310. -
    311.    * @access    public
    312. -
    313.    * @return    string 
    314. -
    315.    */
    316. -
    317.   function toString({
    318. -
    319.     $dump 'Literal("' $this->label .'"';
    320. -
    321.     if ($this->lang != NULL)
    322. -
    323.         $dump .= ', lang="' $this->lang .'"';
    324. -
    325.     if ($this->dtype != NULL)
    326. -
    327.         $dump .= ', datatype="' $this->dtype .'"';
    328. -
    329.     $dump .= ')';
    330. -
    331.     return $dump;
    332. -
    333.   }
    334. -
    335.  
    336. -
    337.  
    338. -
    339. // end: Literal
    340. -
    341.  
    342. -
    343. ?>
    344. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelMemModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelMemModel.php.html deleted file mode 100755 index 5c381a43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelMemModel.php.html +++ /dev/null @@ -1,1481 +0,0 @@ - - - - - - File Source for MemModel.php - - - - - -

    Source for file MemModel.php

    -

    Documentation is available at MemModel.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Model.php';
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: MemModel
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * A MemModel is an RDF Model, which is stored in the main memory.
    16. -
    17. * This class provides methods for manipulating MemModels.
    18. -
    19. *
    20. -
    21. *
    22. -
    23. *
    24. -
    25. @version  $Id: fsource_model__modelMemModel.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27. @author Chris Bizer <chris@bizer.de>
    28. -
    29. @author Gunnar AAstrand Grimnes <ggrimnes@csd.abdn.ac.uk>
    30. -
    31. @author Radoslaw Oldakowski <radol@gmx.de>
    32. -
    33. @author Daniel Westphal <mail@d-westphal.de>
    34. -
    35. @author Tobias Gauß <tobias.gauss@web.de>
    36. -
    37. *
    38. -
    39. @package model
    40. -
    41. @access    public
    42. -
    43. */
    44. -
    45.  
    46. -
    47. class MemModel extends Model {
    48. -
    49.  
    50. -
    51.     /**
    52. -
    53.     * Triples of the MemModel
    54. -
    55.     * @var        array 
    56. -
    57.     * @access    private
    58. -
    59.     */
    60. -
    61.     var $triples array();
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Array containing the search indices
    68. -
    69.     * @var        array['INDEX_TYPE'][]['label'][]['PosInModel'] 
    70. -
    71.     *
    72. -
    73.     * @access   private
    74. -
    75.     */
    76. -
    77.     var $indexArr ;
    78. -
    79.  
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * depending on which index is used this variable is -1,0,1,2 or 3
    86. -
    87.     *
    88. -
    89.     * -1 : no index
    90. -
    91.     *  0 : default indices over subject, predicate, object separate
    92. -
    93.     *  1 : index over subject+predicate+object
    94. -
    95.     *  2 : index over subject+predicate
    96. -
    97.     *  3 : index over subject+object
    98. -
    99.     *
    100. -
    101.     * @var        int 
    102. -
    103.     * @access    private
    104. -
    105.     */
    106. -
    107.     var $indexed;
    108. -
    109.  
    110. -
    111.  
    112. -
    113.  
    114. -
    115.     /**
    116. -
    117.     * Array of namespaces
    118. -
    119.     *
    120. -
    121.     * @var     array 
    122. -
    123.     * @access    private
    124. -
    125.     */
    126. -
    127.     var $parsedNamespaces=array();
    128. -
    129.  
    130. -
    131.  
    132. -
    133.  
    134. -
    135.     /**
    136. -
    137.     * Constructor
    138. -
    139.     * You can supply a base_uri
    140. -
    141.     *
    142. -
    143.     * @param string $baseURI 
    144. -
    145.     * @access    public
    146. -
    147.     */
    148. -
    149.     function MemModel($baseURI NULL{
    150. -
    151.         $this->setBaseURI($baseURI);
    152. -
    153.         $this->indexed INDEX_TYPE;
    154. -
    155.     }
    156. -
    157.  
    158. -
    159.     /**
    160. -
    161.     * Set a base URI for the MemModel.
    162. -
    163.     * Affects creating of new resources and serialization syntax.
    164. -
    165.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    166. -
    167.     * @param    string    $uri 
    168. -
    169.     * @access    public
    170. -
    171.     */
    172. -
    173.     function setBaseURI($uri{
    174. -
    175.  
    176. -
    177.         if ($uri != NULL{
    178. -
    179.             $c substr($uristrlen($uri)-,1);
    180. -
    181.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    182. -
    183.             $uri .= '#';
    184. -
    185.         }
    186. -
    187.         $this->baseURI $uri;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.  
    194. -
    195.     /**
    196. -
    197.     * Number of triples in the MemModel
    198. -
    199.     *
    200. -
    201.     * @return    integer 
    202. -
    203.     * @access    public
    204. -
    205.     */
    206. -
    207.     function size({
    208. -
    209.         return count($this->triples);
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     /**
    216. -
    217.     * Checks if MemModel is empty
    218. -
    219.     *
    220. -
    221.     * @return    boolean 
    222. -
    223.     * @access    public
    224. -
    225.     */
    226. -
    227.     function isEmpty({
    228. -
    229.         if (count($this->triples== 0{
    230. -
    231.             return TRUE;
    232. -
    233.         else {
    234. -
    235.             return FALSE;
    236. -
    237.         };
    238. -
    239.     }
    240. -
    241.  
    242. -
    243.  
    244. -
    245.     /**
    246. -
    247.     * Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    248. -
    249.     * So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add())
    250. -
    251.     *
    252. -
    253.     * @param        object Statement    $statement 
    254. -
    255.     * @access    public
    256. -
    257.     * @throws    PhpError
    258. -
    259.     */
    260. -
    261.     function add($statement{
    262. -
    263.         if (!is_a($statement'Statement')) {
    264. -
    265.             $errmsg RDFAPI_ERROR '(class: MemModel; method: add): Statement expected.';
    266. -
    267.             trigger_error($errmsgE_USER_ERROR);
    268. -
    269.         }
    270. -
    271.  
    272. -
    273.         if($this->indexed != -1){
    274. -
    275.             $this->triples[$statement;
    276. -
    277.             end($this->triples);
    278. -
    279.             $k=key($this->triples);
    280. -
    281.             if($this->indexed==0){
    282. -
    283.                 // index over S
    284. -
    285.                 $this->_indexOpr($statement,$k,4,1);
    286. -
    287.                 // index over P
    288. -
    289.                 $this->_indexOpr($statement,$k,5,1);
    290. -
    291.                 // index over O
    292. -
    293.                 $this->_indexOpr($statement,$k,6,1);
    294. -
    295.             }else{
    296. -
    297.                 $this->_indexOpr($statement,$k,$this->indexed,1);
    298. -
    299.             }
    300. -
    301.  
    302. -
    303.         }else{
    304. -
    305.             $this->triples[$statement;
    306. -
    307.         }
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  
    316. -
    317.     /**
    318. -
    319.     * Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    320. -
    321.     * addWithoutDuplicates() is significantly slower then add().
    322. -
    323.     * Retruns TRUE if the statement is added.
    324. -
    325.     * FALSE otherwise.
    326. -
    327.     *
    328. -
    329.     * @param    object Statement    $statement 
    330. -
    331.     * @return    boolean 
    332. -
    333.     * @access    public
    334. -
    335.     * @throws    PhpError
    336. -
    337.     */
    338. -
    339.     function addWithoutDuplicates($statement{
    340. -
    341.  
    342. -
    343.         if (!is_a($statement'Statement')) {
    344. -
    345.             $errmsg RDFAPI_ERROR '(class: MemModel; method: addWithoutDuplicates): Statement expected.';
    346. -
    347.             trigger_error($errmsgE_USER_ERROR);
    348. -
    349.         }
    350. -
    351.  
    352. -
    353.         if (!$this->contains($statement)) {
    354. -
    355.             $this->add($statement);
    356. -
    357.             return true;
    358. -
    359.         }else{
    360. -
    361.             return false;
    362. -
    363.         }
    364. -
    365.     }
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.     * Removes the triple from the MemModel.
    372. -
    373.     * TRUE if the triple is removed.
    374. -
    375.     * FALSE otherwise.
    376. -
    377.     *
    378. -
    379.     * @param        object Statement    $statement 
    380. -
    381.     * @return    boolean 
    382. -
    383.     * @access    public
    384. -
    385.     * @throws    PhpError
    386. -
    387.     */
    388. -
    389.     function remove($statement{
    390. -
    391.  
    392. -
    393.         if (!is_a($statement'Statement')) {
    394. -
    395.             $errmsg RDFAPI_ERROR '(class: MemModel; method: remove): Statement expected.';
    396. -
    397.             trigger_error($errmsgE_USER_ERROR);
    398. -
    399.         }
    400. -
    401.         if($this->indexed==-1){
    402. -
    403.             $pass=false;
    404. -
    405.             foreach($this->triples as $key => $value{
    406. -
    407.                 if ($this->matchStatement($value$statement->subject()$statement->predicate()$statement->object())) {
    408. -
    409.                     unset($this->triples[$key]);
    410. -
    411.                     $passtrue;
    412. -
    413.                 }
    414. -
    415.             }
    416. -
    417.             return $pass;
    418. -
    419.         }else{
    420. -
    421.             $knull;
    422. -
    423.             if($this->indexed==0){
    424. -
    425.                 $pass=false;
    426. -
    427.                 $del=false;
    428. -
    429.                 while($del!=-1){
    430. -
    431.                     // index over S
    432. -
    433.                     $del=$this->_indexOpr($statement,$k,4,0);
    434. -
    435.                     // index over P
    436. -
    437.                     $this->_indexOpr($statement,$k,5,0);
    438. -
    439.                     // index over O
    440. -
    441.                     $this->_indexOpr($statement,$k,6,0);
    442. -
    443.                     if($del!=-1){
    444. -
    445.                         unset($this->triples[$del]);
    446. -
    447.                         $pass=true;
    448. -
    449.                     }
    450. -
    451.                 }
    452. -
    453.                 return $pass;
    454. -
    455.             }else{
    456. -
    457.                 $pass=false;
    458. -
    459.                 $del=false;
    460. -
    461.                 while($del!=-1){
    462. -
    463.                     $del=$this->_indexOpr($statement,$k,$this->indexed,0);
    464. -
    465.                     if($del!=-1){
    466. -
    467.                         unset($this->triples[$del]);
    468. -
    469.                         $pass=true;
    470. -
    471.                     }
    472. -
    473.                 }
    474. -
    475.                 return $pass;
    476. -
    477.             }
    478. -
    479.         }
    480. -
    481.     }
    482. -
    483.  
    484. -
    485.     /**
    486. -
    487.     * Short Dump of the MemModel.
    488. -
    489.     *
    490. -
    491.     * @access    public
    492. -
    493.     * @return    string 
    494. -
    495.     */
    496. -
    497.     function toString({
    498. -
    499.         return 'MemModel[baseURI=' $this->getBaseURI(';  size=' $this->size(']';
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     /**
    506. -
    507.     * Dumps of the MemModel including all triples.
    508. -
    509.     *
    510. -
    511.     * @access    public
    512. -
    513.     * @return    string 
    514. -
    515.     */
    516. -
    517.     function toStringIncludingTriples({
    518. -
    519.         $dump $this->toString(chr(13);
    520. -
    521.         foreach($this->triples as $value{
    522. -
    523.             $dump .= $value->toString(chr(13);
    524. -
    525.         }
    526. -
    527.         return $dump;
    528. -
    529.     }
    530. -
    531.  
    532. -
    533.  
    534. -
    535.  
    536. -
    537.  
    538. -
    539.     /**
    540. -
    541.     * Writes the RDF serialization of the MemModel as HTML.
    542. -
    543.     *
    544. -
    545.     * @access    public
    546. -
    547.     */
    548. -
    549.     function writeAsHtml({
    550. -
    551.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    552. -
    553.         $ser new RdfSerializer();
    554. -
    555.         $rdf =$ser->serialize($this);
    556. -
    557.         $rdf htmlspecialchars($rdfENT_QUOTES);
    558. -
    559.         $rdf str_replace(' ''&nbsp;'$rdf);
    560. -
    561.         $rdf nl2br($rdf);
    562. -
    563.         echo $rdf;
    564. -
    565.     }
    566. -
    567.  
    568. -
    569.     /**
    570. -
    571.     * Writes the RDF serialization of the MemModel as HTML table.
    572. -
    573.     *
    574. -
    575.     * @access    public
    576. -
    577.     */
    578. -
    579.     function writeAsHtmlTable({
    580. -
    581.         // Import Package Utility
    582. -
    583.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    584. -
    585.         RDFUtil::writeHTMLTable($this);
    586. -
    587.     }
    588. -
    589.  
    590. -
    591.  
    592. -
    593.     /**
    594. -
    595.     * Writes the RDF serialization of the MemModel as HTML table.
    596. -
    597.     *
    598. -
    599.     * @access    public
    600. -
    601.     * @return    string 
    602. -
    603.     */
    604. -
    605.     function writeRdfToString({
    606. -
    607.         // Import Package Syntax
    608. -
    609.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    610. -
    611.         $ser new RdfSerializer();
    612. -
    613.         $rdf =$ser->serialize($this);
    614. -
    615.         return $rdf;
    616. -
    617.     }
    618. -
    619.  
    620. -
    621.  
    622. -
    623.     /**
    624. -
    625.     * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    626. -
    627.     * You can decide to which format the model should be serialized by using a
    628. -
    629.     * corresponding suffix-string as $type parameter. If no $type parameter
    630. -
    631.     * is placed this method will serialize the model to XML/RDF format.
    632. -
    633.     * Returns FALSE if the MemModel couldn't be saved to the file.
    634. -
    635.     *
    636. -
    637.     * @access    public
    638. -
    639.     * @param     string     $filename 
    640. -
    641.     * @param     string     $type 
    642. -
    643.     * @throws   PhpError
    644. -
    645.     * @return    boolean 
    646. -
    647.     */
    648. -
    649.     function saveAs($filename$type ='rdf'{
    650. -
    651.  
    652. -
    653.  
    654. -
    655.         // get suffix and create a corresponding serializer
    656. -
    657.         if ($type=='rdf'{
    658. -
    659.             // Import Package Syntax
    660. -
    661.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    662. -
    663.             $ser=new RdfSerializer();
    664. -
    665.         }elseif ($type=='nt'{
    666. -
    667.             // Import Package Syntax
    668. -
    669.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    670. -
    671.             $ser=new NTripleSerializer();
    672. -
    673.         }elseif ($type=='n3'{
    674. -
    675.             // Import Package Syntax
    676. -
    677.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    678. -
    679.             $ser=new N3Serializer();
    680. -
    681.         }else {
    682. -
    683.             print ('Serializer type not properly defined. Use the strings "rdf","n3" or "nt".');
    684. -
    685.             return false;
    686. -
    687.         };
    688. -
    689.  
    690. -
    691.         return $ser->saveAs($this$filename);
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.  
    698. -
    699.     /**
    700. -
    701.     * Tests if the MemModel contains the given triple.
    702. -
    703.     * TRUE if the triple belongs to the MemModel;
    704. -
    705.     * FALSE otherwise.
    706. -
    707.     *
    708. -
    709.     * @param    object Statement    &$statement 
    710. -
    711.     * @return    boolean 
    712. -
    713.     * @access    public
    714. -
    715.     */
    716. -
    717.     function contains(&$statement{
    718. -
    719.  
    720. -
    721.         // no index ->linear contains
    722. -
    723.         if ($this->indexed==-1){
    724. -
    725.             foreach($this->triples as $value{
    726. -
    727.                 if ($value->equals($statement)){
    728. -
    729.                     return TRUE}
    730. -
    731.             }
    732. -
    733.             return false;
    734. -
    735.         }
    736. -
    737.         if ($this->indexed==0){
    738. -
    739.             $res $this->_containsIndex($statement,4);
    740. -
    741.             return $res;
    742. -
    743.         }else{
    744. -
    745.             return $this->_containsIndex($statement,$this->indexed);
    746. -
    747.         }
    748. -
    749.     }
    750. -
    751.  
    752. -
    753.  
    754. -
    755.     /**
    756. -
    757.     * Determine if all of the statements in a model are also contained in this MemModel.
    758. -
    759.     * True if all of the statements in $model are also contained in this MemModel and false otherwise.
    760. -
    761.     *
    762. -
    763.     * @param    object Model    &$model 
    764. -
    765.     * @return    boolean 
    766. -
    767.     * @access    public
    768. -
    769.     */
    770. -
    771.     function containsAll(&$model{
    772. -
    773.  
    774. -
    775.         if (is_a($model'MemModel')) {
    776. -
    777.  
    778. -
    779.             foreach($model->triples as $statement)
    780. -
    781.             if(!$this->contains($statement))
    782. -
    783.             return FALSE;
    784. -
    785.             return TRUE;
    786. -
    787.  
    788. -
    789.         }elseif (is_a($model'DbModel'))
    790. -
    791.  
    792. -
    793.         return $model->containsAll($this);
    794. -
    795.  
    796. -
    797.         $errmsg RDFAPI_ERROR '(class: MemModel; method: containsAll): Model expected.';
    798. -
    799.         trigger_error($errmsgE_USER_ERROR);
    800. -
    801.     }
    802. -
    803.  
    804. -
    805.     /**
    806. -
    807.     * Determine if any of the statements in a model are also contained in this MemModel.
    808. -
    809.     * True if any of the statements in $model are also contained in this MemModel and false otherwise.
    810. -
    811.     *
    812. -
    813.     * @param    object Model    &$model 
    814. -
    815.     * @return    boolean 
    816. -
    817.     * @access    public
    818. -
    819.     */
    820. -
    821.     function containsAny(&$model{
    822. -
    823.  
    824. -
    825.         if (is_a($model'MemModel')) {
    826. -
    827.  
    828. -
    829.             foreach($model->triples as $modelStatement)
    830. -
    831.             if($this->contains($modelStatement))
    832. -
    833.             return TRUE;
    834. -
    835.             return FALSE;
    836. -
    837.  
    838. -
    839.         }elseif (is_a($model'DbModel'))
    840. -
    841.  
    842. -
    843.         return $model->containsAny($this);
    844. -
    845.  
    846. -
    847.         $errmsg RDFAPI_ERROR '(class: MemModel; method: containsAll): Model expected.';
    848. -
    849.         trigger_error($errmsgE_USER_ERROR);
    850. -
    851.     }
    852. -
    853.  
    854. -
    855.  
    856. -
    857.     /**
    858. -
    859.     * Builds a search index for the statements in the MemModel.
    860. -
    861.     * The index is used by the find(),contains(),add() and remove() functions.
    862. -
    863.     * Performance example using a model with 43000 statements on a Linux machine:
    864. -
    865.     * Find without index takes 1.7 seconds.
    866. -
    867.     * Indexing takes 1.8 seconds.
    868. -
    869.     * Find with index takes 0.001 seconds.
    870. -
    871.     * So if you want to query a model more then once, build a index first.
    872. -
    873.     * The defaultindex is indices over subject, predicate, object seperate.
    874. -
    875.     *
    876. -
    877.     * mode = 0    : indices over subject,predicate,object (default)
    878. -
    879.     * mode = 1     : index over subject+predicate+object
    880. -
    881.     * mode = 2      : index over subject+predicate
    882. -
    883.     * mode = 3     : index over subject+object
    884. -
    885.     *
    886. -
    887.     * @param     int $mode 
    888. -
    889.     * @access    public
    890. -
    891.     */
    892. -
    893.     function index($mode{
    894. -
    895.  
    896. -
    897.         unset($this->indexArr);
    898. -
    899.         $this->indexArr=array();
    900. -
    901.         switch($mode){
    902. -
    903.             // unset indices
    904. -
    905.             case -1:
    906. -
    907.             $this->indexed=-1;
    908. -
    909.             unset($this->indexArr);
    910. -
    911.             break;
    912. -
    913.             // index over SPO
    914. -
    915.             case 0:
    916. -
    917.             $this->indexed=0;
    918. -
    919.             foreach($this->triples as $k => $t{
    920. -
    921.                 // index over S
    922. -
    923.                 $this->_indexOpr($t,$k,4,1);
    924. -
    925.                 // index over P
    926. -
    927.                 $this->_indexOpr($t,$k,5,1);
    928. -
    929.                 // index over O
    930. -
    931.                 $this->_indexOpr($t,$k,6,1);
    932. -
    933.             }
    934. -
    935.             break;
    936. -
    937.             default:
    938. -
    939.             $this->indexed=$mode;
    940. -
    941.             foreach($this->triples as $k => $t{
    942. -
    943.                 $this->_indexOpr($t,$k,$this->indexed,1);
    944. -
    945.             }
    946. -
    947.             break;
    948. -
    949.         }
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.  
    956. -
    957.     /**
    958. -
    959.     * Returns     true if there is an index, false if not.
    960. -
    961.     *
    962. -
    963.     * @return    boolean 
    964. -
    965.     * @access    public
    966. -
    967.     */
    968. -
    969.     function isIndexed({
    970. -
    971.         if($this->indexed!=-1){
    972. -
    973.             return TRUE;
    974. -
    975.         }else{
    976. -
    977.             return FALSE;
    978. -
    979.         }
    980. -
    981.     }
    982. -
    983.  
    984. -
    985.     /**
    986. -
    987.     * Returns the indextype:
    988. -
    989.     * -1 if there is no index, 0 if there are indices over S,P,O(separate),
    990. -
    991.     * 1 if there is an index over SPO, 2 if there is an index over SP and 3 if
    992. -
    993.     * there is an index over SO.
    994. -
    995.     *
    996. -
    997.     * @return int 
    998. -
    999.     * @access public
    1000. -
    1001.     *
    1002. -
    1003.     */
    1004. -
    1005.     function getIndexType(){
    1006. -
    1007.         return $this->indexed;
    1008. -
    1009.     }
    1010. -
    1011.  
    1012. -
    1013.     /**
    1014. -
    1015.     * General method to search for triples.
    1016. -
    1017.     * NULL input for any parameter will match anything.
    1018. -
    1019.     * Example:  $result = $m->find( NULL, NULL, $node );
    1020. -
    1021.     * Finds all triples with $node as object.
    1022. -
    1023.     * Returns an empty MemModel if nothing is found.
    1024. -
    1025.     *
    1026. -
    1027.     * @param    object Node    $subject 
    1028. -
    1029.     * @param    object Node    $predicate 
    1030. -
    1031.     * @param    object Node    $object 
    1032. -
    1033.     * @return    object MemModel 
    1034. -
    1035.     * @access    public
    1036. -
    1037.     * @throws    PhpError
    1038. -
    1039.     */
    1040. -
    1041.  
    1042. -
    1043.     function find($subject,$predicate,$object{
    1044. -
    1045.  
    1046. -
    1047.         if (
    1048. -
    1049.         (!is_a($subject'Resource'&& $subject != NULL||
    1050. -
    1051.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1052. -
    1053.         (!is_a($object'Node'&& $object != NULL)
    1054. -
    1055.         {
    1056. -
    1057.             $errmsg RDFAPI_ERROR '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
    1058. -
    1059.             trigger_error($errmsgE_USER_ERROR);
    1060. -
    1061.         }
    1062. -
    1063.  
    1064. -
    1065.         $res new MemModel($this->getBaseURI());
    1066. -
    1067.         $res->indexed=-1;
    1068. -
    1069.  
    1070. -
    1071.         if($this->isEmpty())
    1072. -
    1073.         return $res;
    1074. -
    1075.  
    1076. -
    1077.         if($subject == NULL && $predicate == NULL && $object == NULL)
    1078. -
    1079.         return $this;
    1080. -
    1081.  
    1082. -
    1083.         switch($this->indexed){
    1084. -
    1085.             case 1:
    1086. -
    1087.             if($subject!=NULL && $predicate != NULL && $object != NULL){
    1088. -
    1089.                 $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
    1090. -
    1091.                 return $this->_findInIndex($pos,$subject,$predicate,$object,1);
    1092. -
    1093.             }else{
    1094. -
    1095.                 break;
    1096. -
    1097.             }
    1098. -
    1099.  
    1100. -
    1101.             case 2:
    1102. -
    1103.             if($subject!=NULL && $predicate != NULL){
    1104. -
    1105.                 $pos=$subject->getLabel().$predicate->getLabel();
    1106. -
    1107.                 return $this->_findInIndex($pos,$subject,$predicate,$object,2);
    1108. -
    1109.             }else{
    1110. -
    1111.                 break;
    1112. -
    1113.             }
    1114. -
    1115.  
    1116. -
    1117.             case 3:
    1118. -
    1119.             if($subject!=NULL && $object != NULL){
    1120. -
    1121.                 $pos=$subject->getLabel().$object->getLabel();
    1122. -
    1123.                 return $this->_findInIndex($pos,$subject,$predicate,$object,3);
    1124. -
    1125.             }else{
    1126. -
    1127.                 break;
    1128. -
    1129.             }
    1130. -
    1131.             case 0:
    1132. -
    1133.             if($subject!= null){
    1134. -
    1135.                 $pos=$subject->getLabel();
    1136. -
    1137.                 return $this->_findInIndex($pos,$subject,$predicate,$object,4);
    1138. -
    1139.             }
    1140. -
    1141.             if($predicate!= null){
    1142. -
    1143.                 $pos=$predicate->getLabel();
    1144. -
    1145.                 return $this->_findInIndex($pos,$subject,$predicate,$object,5);
    1146. -
    1147.             }
    1148. -
    1149.             if($object!= null){
    1150. -
    1151.                 $pos=$object->getLabel();
    1152. -
    1153.                 return $this->_findInIndex($pos,$subject,$predicate,$object,6);
    1154. -
    1155.             }
    1156. -
    1157.         }
    1158. -
    1159.         // if no index: linear search
    1160. -
    1161.         foreach($this->triples as $value{
    1162. -
    1163.             if ($this->matchStatement($value$subject$predicate$object))
    1164. -
    1165.             $res->add($value);
    1166. -
    1167.         }
    1168. -
    1169.         return $res;
    1170. -
    1171.  
    1172. -
    1173.     }
    1174. -
    1175.  
    1176. -
    1177.  
    1178. -
    1179.  
    1180. -
    1181.  
    1182. -
    1183.  
    1184. -
    1185.     /**
    1186. -
    1187.     * Method to search for triples using Perl-style regular expressions.
    1188. -
    1189.     * NULL input for any parameter will match anything.
    1190. -
    1191.     * Example:  $result = $m->find_regex( NULL, NULL, $regex );
    1192. -
    1193.     * Finds all triples where the label of the object node matches the regular expression.
    1194. -
    1195.     * Returns an empty MemModel if nothing is found.
    1196. -
    1197.     *
    1198. -
    1199.     * @param    string    $subject_regex 
    1200. -
    1201.     * @param    string    $predicate_regex 
    1202. -
    1203.     * @param    string    $object_regex 
    1204. -
    1205.     * @return    object MemModel 
    1206. -
    1207.     * @access    public
    1208. -
    1209.     */
    1210. -
    1211.     function findRegex($subject_regex$predicate_regex$object_regex{
    1212. -
    1213.  
    1214. -
    1215.         $res new MemModel($this->getBaseURI());
    1216. -
    1217.  
    1218. -
    1219.         if($this->size(== 0)
    1220. -
    1221.         return $res;
    1222. -
    1223.  
    1224. -
    1225.         if($subject_regex == NULL && $predicate_regex == NULL && $object_regex == NULL)
    1226. -
    1227.         return $this;
    1228. -
    1229.  
    1230. -
    1231.         foreach($this->triples as $value{
    1232. -
    1233.             if (
    1234. -
    1235.             ($subject_regex == NULL || preg_match($subject_regex$value->subj->getLabel())) &&
    1236. -
    1237.             ($predicate_regex == NULL || preg_match($predicate_regex$value->pred->getLabel())) &&
    1238. -
    1239.             ($object_regex == NULL || preg_match($object_regex$value->obj->getLabel()))
    1240. -
    1241.             $res->add($value);
    1242. -
    1243.         }
    1244. -
    1245.  
    1246. -
    1247.         return $res;
    1248. -
    1249.  
    1250. -
    1251.     }
    1252. -
    1253.  
    1254. -
    1255.     /**
    1256. -
    1257.     * Returns all tripels of a certain vocabulary.
    1258. -
    1259.     * $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
    1260. -
    1261.     * e.g. http://www.w3.org/2000/01/rdf-schema#
    1262. -
    1263.     * Returns an empty MemModel if nothing is found.
    1264. -
    1265.     *
    1266. -
    1267.     * @param    string    $vocabulary 
    1268. -
    1269.     * @return    object MemModel 
    1270. -
    1271.     * @access    public
    1272. -
    1273.     */
    1274. -
    1275.     function findVocabulary($vocabulary{
    1276. -
    1277.  
    1278. -
    1279.         if($this->size(== 0)
    1280. -
    1281.         return new MemModel();
    1282. -
    1283.         if($vocabulary == NULL || $vocabulary == '')
    1284. -
    1285.         return $this;
    1286. -
    1287.  
    1288. -
    1289.         $res new MemModel($this->getBaseURI());
    1290. -
    1291.         if($this->indexed==0){
    1292. -
    1293.             foreach($this->indexArr[5as $key => $value){
    1294. -
    1295.                 $pos=strpos($key,'#')+1;
    1296. -
    1297.                 if(substr($key,0,$pos)==$vocabulary){
    1298. -
    1299.                     for($i=1;$i<=$value[0];$i++){
    1300. -
    1301.                         $res->add($this->triples[$value[$i]]);
    1302. -
    1303.                     }
    1304. -
    1305.                 }
    1306. -
    1307.             }
    1308. -
    1309.             return $res;
    1310. -
    1311.         }else{
    1312. -
    1313.             // Import Package Utility
    1314. -
    1315.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    1316. -
    1317.             foreach($this->triples as $value{
    1318. -
    1319.                 if (RDFUtil::getNamespace($value->getPredicate()) == $vocabulary)
    1320. -
    1321.                 $res->add($value);
    1322. -
    1323.             }
    1324. -
    1325.             return $res;
    1326. -
    1327.         }
    1328. -
    1329.     }
    1330. -
    1331.  
    1332. -
    1333.     /**
    1334. -
    1335.     * Searches for triples and returns the first matching statement.
    1336. -
    1337.     * NULL input for any parameter will match anything.
    1338. -
    1339.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    1340. -
    1341.     * Returns the first statement of the MemModel where the object equals $node.
    1342. -
    1343.     * Returns an NULL if nothing is found.
    1344. -
    1345.     * You can define an offset to search for. Default = 0
    1346. -
    1347.     *
    1348. -
    1349.     * @param    object Node    $subject 
    1350. -
    1351.     * @param    object Node    $predicate 
    1352. -
    1353.     * @param    object Node    $object 
    1354. -
    1355.     * @param    integer    $offset 
    1356. -
    1357.     * @return    object Statement 
    1358. -
    1359.     * @access    public
    1360. -
    1361.     */
    1362. -
    1363.     function findFirstMatchingStatement($subject$predicate$object$offset 0{
    1364. -
    1365.  
    1366. -
    1367.         $currentOffset 0;
    1368. -
    1369.         for($i=0;$i<=$offset;$i++)
    1370. -
    1371.         {
    1372. -
    1373.             $res $this->findFirstMatchOff($subject$predicate$object$currentOffset);
    1374. -
    1375.             $currentOffset=$res+1;
    1376. -
    1377.         }
    1378. -
    1379.         if ($res != -1{
    1380. -
    1381.             return $this->triples[$res];
    1382. -
    1383.         else {
    1384. -
    1385.             return NULL;
    1386. -
    1387.         }
    1388. -
    1389.     }
    1390. -
    1391.  
    1392. -
    1393.  
    1394. -
    1395.  
    1396. -
    1397.  
    1398. -
    1399.     /**
    1400. -
    1401.     * Searches for triples and returns the first matching statement from a given offset.
    1402. -
    1403.     * This method is used by the util/findIterator. NULL input for any parameter will match anything.
    1404. -
    1405.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node, $off );
    1406. -
    1407.     * Returns the position of the first statement of the MemModel where the object equals $node from the given
    1408. -
    1409.     * offset.
    1410. -
    1411.     * Returns an -1 if nothing is found.
    1412. -
    1413.     *
    1414. -
    1415.     * @param    object Node    $subject 
    1416. -
    1417.     * @param    object Node    $predicate 
    1418. -
    1419.     * @param    object Node    $object 
    1420. -
    1421.     * @param int         $off 
    1422. -
    1423.     * @return    int 
    1424. -
    1425.     * @access    private
    1426. -
    1427.     */
    1428. -
    1429.     function findFirstMatchOff($subject,$predicate$object,$off{
    1430. -
    1431.  
    1432. -
    1433.         if (
    1434. -
    1435.         (!is_a($subject'Resource'&& $subject != NULL||
    1436. -
    1437.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1438. -
    1439.         (!is_a($object'Node'&& $object != NULL)
    1440. -
    1441.         {
    1442. -
    1443.             $errmsg RDFAPI_ERROR '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
    1444. -
    1445.             trigger_error($errmsgE_USER_ERROR);
    1446. -
    1447.         }
    1448. -
    1449.  
    1450. -
    1451.         $match=-1;
    1452. -
    1453.         $ind=$this->indexed;
    1454. -
    1455.         if($subject == NULL && $predicate == NULL && $object == NULL)
    1456. -
    1457.         {
    1458. -
    1459.             foreach ($this->triples as $key => $statement)
    1460. -
    1461.             {
    1462. -
    1463.                 if ($key >= $off)
    1464. -
    1465.                     return $key;
    1466. -
    1467.             }
    1468. -
    1469.             return -1;
    1470. -
    1471.         }
    1472. -
    1473.  
    1474. -
    1475.         switch($ind){
    1476. -
    1477.             case 1:
    1478. -
    1479.             if($subject!=NULL && $predicate != NULL && $object != NULL){
    1480. -
    1481.                 $pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
    1482. -
    1483.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,1,$off);
    1484. -
    1485.             }else{
    1486. -
    1487.                 break;
    1488. -
    1489.             }
    1490. -
    1491.  
    1492. -
    1493.             case 2:
    1494. -
    1495.             if($subject!=NULL && $predicate != NULL){
    1496. -
    1497.                 $pos=$subject->getLabel().$predicate->getLabel();
    1498. -
    1499.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,2,$off);
    1500. -
    1501.             }else{
    1502. -
    1503.                 break;
    1504. -
    1505.             }
    1506. -
    1507.  
    1508. -
    1509.             case 3:
    1510. -
    1511.             if($subject!=NULL && $object != NULL){
    1512. -
    1513.                 $pos=$subject->getLabel().$object->getLabel();
    1514. -
    1515.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,3,$off);
    1516. -
    1517.             }else{
    1518. -
    1519.                 break;
    1520. -
    1521.             }
    1522. -
    1523.             case 0:
    1524. -
    1525.             if($subject!= null){
    1526. -
    1527.                 $pos=$subject->getLabel();
    1528. -
    1529.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,4,$off);
    1530. -
    1531.             }
    1532. -
    1533.             if($predicate!= null){
    1534. -
    1535.                 $pos=$predicate->getLabel();
    1536. -
    1537.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,5,$off);
    1538. -
    1539.             }
    1540. -
    1541.             if($object!= null){
    1542. -
    1543.                 $pos=$object->getLabel();
    1544. -
    1545.                 return $this->_findMatchIndex($pos,$subject,$predicate,$object,6,$off);
    1546. -
    1547.             }
    1548. -
    1549.             break;
    1550. -
    1551.         }
    1552. -
    1553.         // if no index: linear search
    1554. -
    1555.         foreach($this->triples as $key => $value){
    1556. -
    1557.             if ($this->matchStatement($value$subject$predicate$object)){
    1558. -
    1559.                 if($off<=$key){
    1560. -
    1561.                     $match=$key;
    1562. -
    1563.                     break;
    1564. -
    1565.                 }
    1566. -
    1567.             }
    1568. -
    1569.         }
    1570. -
    1571.         return $match;
    1572. -
    1573.     }
    1574. -
    1575.  
    1576. -
    1577.  
    1578. -
    1579.     /**
    1580. -
    1581.     * Searches for triples and returns the number of matches.
    1582. -
    1583.     * NULL input for any parameter will match anything.
    1584. -
    1585.     * Example:  $result = $m->findCount( NULL, NULL, $node );
    1586. -
    1587.     * Finds all triples with $node as object.
    1588. -
    1589.     *
    1590. -
    1591.     * @param    object Node    $subject 
    1592. -
    1593.     * @param    object Node    $predicate 
    1594. -
    1595.     * @param    object Node    $object 
    1596. -
    1597.     * @return    integer 
    1598. -
    1599.     * @access    public
    1600. -
    1601.     */
    1602. -
    1603.     function findCount($subject$predicate$object{
    1604. -
    1605.  
    1606. -
    1607.         $res $this->find($subject$predicate$object);
    1608. -
    1609.         return $res->size();
    1610. -
    1611.  
    1612. -
    1613.     }
    1614. -
    1615.  
    1616. -
    1617.  
    1618. -
    1619.     /**
    1620. -
    1621.     * Perform an RDQL query on this MemModel.
    1622. -
    1623.     * This method returns an associative array of variable bindings.
    1624. -
    1625.     * The values of the query variables can either be RAP's objects (instances of Node)
    1626. -
    1627.     * if $returnNodes set to TRUE, or their string serialization.
    1628. -
    1629.     *
    1630. -
    1631.     * @access    public
    1632. -
    1633.     * @param string $queryString 
    1634. -
    1635.     * @param boolean $returnNodes 
    1636. -
    1637.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1638. -
    1639.     *       OR  array   [][?VARNAME] = string
    1640. -
    1641.     *
    1642. -
    1643.     */
    1644. -
    1645.     function rdqlQuery($queryString$returnNodes TRUE{
    1646. -
    1647.  
    1648. -
    1649.         // Import RDQL Package
    1650. -
    1651.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1652. -
    1653.  
    1654. -
    1655.         $parser new RdqlParser();
    1656. -
    1657.         $parsedQuery =$parser->parseQuery($queryString);
    1658. -
    1659.  
    1660. -
    1661.         // this method can only query this MemModel
    1662. -
    1663.         // if another model was specified in the from clause throw an error
    1664. -
    1665.         if (isset($parsedQuery['sources'][1])) {
    1666. -
    1667.             $errmsg RDFAPI_ERROR '(class: MemModel; method: rdqlQuery):';
    1668. -
    1669.             $errmsg .= ' this method can only query this MemModel';
    1670. -
    1671.             trigger_error($errmsgE_USER_ERROR);
    1672. -
    1673.         }
    1674. -
    1675.  
    1676. -
    1677.         $engine new RdqlMemEngine();
    1678. -
    1679.         $res =$engine->queryModel($this$parsedQuery$returnNodes);
    1680. -
    1681.  
    1682. -
    1683.         return $res;
    1684. -
    1685.     }
    1686. -
    1687.  
    1688. -
    1689.     /**
    1690. -
    1691.     * Perform an RDQL query on this MemModel.
    1692. -
    1693.     * This method returns an RdqlResultIterator of variable bindings.
    1694. -
    1695.     * The values of the query variables can either be RAP's objects (instances of Node)
    1696. -
    1697.     * if $returnNodes set to TRUE, or their string serialization.
    1698. -
    1699.     *
    1700. -
    1701.     * @access    public
    1702. -
    1703.     * @param string $queryString 
    1704. -
    1705.     * @param boolean $returnNodes 
    1706. -
    1707.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1708. -
    1709.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1710. -
    1711.     *
    1712. -
    1713.     */
    1714. -
    1715.     function rdqlQueryAsIterator($queryString$returnNodes TRUE{
    1716. -
    1717.         // Import RDQL Package
    1718. -
    1719.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    1720. -
    1721.         return new RdqlResultIterator($this->rdqlQuery($queryString$returnNodes));
    1722. -
    1723.     }
    1724. -
    1725.  
    1726. -
    1727.     /**
    1728. -
    1729.     * General method to replace nodes of a MemModel.
    1730. -
    1731.     * NULL input for any parameter will match nothing.
    1732. -
    1733.     * Example:  $m->replace($node, NULL, $node, $replacement);
    1734. -
    1735.     * Replaces all $node objects beeing subject or object in
    1736. -
    1737.     * any triple of the MemModel with the $needle node.
    1738. -
    1739.     *
    1740. -
    1741.     * @param    object Node    $subject 
    1742. -
    1743.     * @param    object Node    $predicate 
    1744. -
    1745.     * @param    object Node    $object 
    1746. -
    1747.     * @param    object Node    $replacement 
    1748. -
    1749.     * @access    public
    1750. -
    1751.     * @throws    PhpError
    1752. -
    1753.     */
    1754. -
    1755.     function replace($subject$predicate$object$replacement{
    1756. -
    1757.  
    1758. -
    1759.         if (
    1760. -
    1761.         (!is_a($replacement'Node')) ||
    1762. -
    1763.         (!is_a($subject'Resource'&& $subject != NULL||
    1764. -
    1765.         (!is_a($predicate'Resource'&& $predicate != NULL||
    1766. -
    1767.         (!is_a($object'Node'&& $object != NULL)
    1768. -
    1769.         {
    1770. -
    1771.             $errmsg RDFAPI_ERROR '(class: MemModel; method: replace): Parameters must be subclasses of Node or NULL';
    1772. -
    1773.             trigger_error($errmsgE_USER_ERROR);
    1774. -
    1775.         }
    1776. -
    1777.  
    1778. -
    1779.         if($this->size(== 0)
    1780. -
    1781.         break;
    1782. -
    1783.         foreach($this->triples as $key => $value{
    1784. -
    1785.             if ($this->triples[$key]->subj->equals($subject)) {
    1786. -
    1787.                 $this->triples[$key]->subj $replacement;
    1788. -
    1789.             }
    1790. -
    1791.             if ($this->triples[$key]->pred->equals($predicate))
    1792. -
    1793.             $this->triples[$key]->pred $replacement;
    1794. -
    1795.             if ($this->triples[$key]->obj->equals($object))
    1796. -
    1797.             $this->triples[$key]->obj $replacement;
    1798. -
    1799.  
    1800. -
    1801.         }
    1802. -
    1803.         $this->index($this->indexed);
    1804. -
    1805.     }
    1806. -
    1807.  
    1808. -
    1809.  
    1810. -
    1811.     /**
    1812. -
    1813.     * Internal method that checks, if a statement matches a S, P, O or NULL combination.
    1814. -
    1815.     * NULL input for any parameter will match anything.
    1816. -
    1817.     *
    1818. -
    1819.     * @param    object Statement    $statement 
    1820. -
    1821.     * @param    object Node    $subject 
    1822. -
    1823.     * @param    object Node    $predicate 
    1824. -
    1825.     * @param    object Node    $object 
    1826. -
    1827.     * @return    boolean 
    1828. -
    1829.     * @access    private
    1830. -
    1831.     */
    1832. -
    1833.     function matchStatement($statement$subject$predicate$object)  {
    1834. -
    1835.  
    1836. -
    1837.         if(($subject != NULLAND !($statement->subj->equals($subject)))
    1838. -
    1839.         return false;
    1840. -
    1841.  
    1842. -
    1843.         if($predicate != NULL && !($statement->pred->equals($predicate)))
    1844. -
    1845.         return false;
    1846. -
    1847.  
    1848. -
    1849.         if($object != NULL && !($statement->obj->equals($object)))
    1850. -
    1851.         return false;
    1852. -
    1853.  
    1854. -
    1855.         return true;
    1856. -
    1857.     }
    1858. -
    1859.  
    1860. -
    1861.  
    1862. -
    1863.  
    1864. -
    1865.  
    1866. -
    1867.     /**
    1868. -
    1869.     * Checks if two models are equal.
    1870. -
    1871.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    1872. -
    1873.     *
    1874. -
    1875.     * @access    public
    1876. -
    1877.     * @param        object    model &$that 
    1878. -
    1879.     * @throws    phpErrpr
    1880. -
    1881.     * @return    boolean 
    1882. -
    1883.     */
    1884. -
    1885.  
    1886. -
    1887.     function equals(&$that)  {
    1888. -
    1889.  
    1890. -
    1891.         if (!is_a($that'Model')) {
    1892. -
    1893.             $errmsg RDFAPI_ERROR '(class: MemModel; method: equals): Model expected.';
    1894. -
    1895.             trigger_error($errmsgE_USER_ERROR);
    1896. -
    1897.         }
    1898. -
    1899.  
    1900. -
    1901.         if ($this->size(!= $that->size())
    1902. -
    1903.         return FALSE;
    1904. -
    1905.         /*
    1906. -
    1907.         if (!$this->containsAll($that))
    1908. -
    1909.         return FALSE;
    1910. -
    1911.         return TRUE;
    1912. -
    1913.         */
    1914. -
    1915.         include_once(RDFAPI_INCLUDE_DIR"util/ModelComparator.php");
    1916. -
    1917.         return ModelComparator::compare($this,$that);
    1918. -
    1919.     }
    1920. -
    1921.  
    1922. -
    1923.     /**
    1924. -
    1925.     * Returns a new MemModel that is the set-union of the MemModel with another model.
    1926. -
    1927.     * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
    1928. -
    1929.     *
    1930. -
    1931.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    1932. -
    1933.     * is another graph, which we will call the merge of the graphs.
    1934. -
    1935.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    1936. -
    1937.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    1938. -
    1939.     * graphs become a single node in the union graph (since by definition they are the same
    1940. -
    1941.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    1942. -
    1943.     * never merged. In particular, this means that every blank node in a merged graph can be
    1944. -
    1945.     * identified as coming from one particular graph in the original set of graphs.
    1946. -
    1947.     *
    1948. -
    1949.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    1950. -
    1951.     * their corresponding N-triples documents and constructing the graph described by the merged
    1952. -
    1953.     * document, since if some of the documents use the same node identifiers, the merged document
    1954. -
    1955.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    1956. -
    1957.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    1958. -
    1959.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    1960. -
    1961.     * documents. (Not implemented yet !!!!!!!!!!!)
    1962. -
    1963.     *
    1964. -
    1965.     * @param    object Model    $model 
    1966. -
    1967.     * @return    object MemModel 
    1968. -
    1969.     * @access    public
    1970. -
    1971.     * @throws phpErrpr
    1972. -
    1973.     *
    1974. -
    1975.     */
    1976. -
    1977.     function unite(&$model)  {
    1978. -
    1979.  
    1980. -
    1981.         if (!is_a($model'Model')) {
    1982. -
    1983.             $errmsg RDFAPI_ERROR '(class: MemModel; method: unite): Model expected.';
    1984. -
    1985.             trigger_error($errmsgE_USER_ERROR);
    1986. -
    1987.         }
    1988. -
    1989.  
    1990. -
    1991.         $res $this;
    1992. -
    1993.  
    1994. -
    1995.         if (is_a($model'MemModel')) {
    1996. -
    1997.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    1998. -
    1999.             $stateIt=new StatementIterator($model);
    2000. -
    2001.             while($statement=$stateIt->next())
    2002. -
    2003.             {
    2004. -
    2005.                 $res->addWithoutDuplicates($statement);
    2006. -
    2007.             }
    2008. -
    2009.         }
    2010. -
    2011.  
    2012. -
    2013.         elseif (is_a($model'DbModel')) {
    2014. -
    2015.             $memModel =$model->getMemModel();
    2016. -
    2017.             foreach($memModel->triples as $value)
    2018. -
    2019.             $res->addWithoutDuplicates($value);
    2020. -
    2021.         }
    2022. -
    2023.  
    2024. -
    2025.         return $res;
    2026. -
    2027.     }
    2028. -
    2029.  
    2030. -
    2031.     /**
    2032. -
    2033.     * Returns a new MemModel that is the subtraction of another model from this MemModel.
    2034. -
    2035.     *
    2036. -
    2037.     * @param    object Model    $model 
    2038. -
    2039.     * @return    object MemModel 
    2040. -
    2041.     * @access    public
    2042. -
    2043.     * @throws phpErrpr
    2044. -
    2045.     */
    2046. -
    2047.  
    2048. -
    2049.     function subtract(&$model)  {
    2050. -
    2051.  
    2052. -
    2053.         if (!is_a($model'Model')) {
    2054. -
    2055.             $errmsg RDFAPI_ERROR '(class: MemModel; method: subtract): Model expected.';
    2056. -
    2057.             trigger_error($errmsgE_USER_ERROR);
    2058. -
    2059.         }
    2060. -
    2061.  
    2062. -
    2063.         $res $this;
    2064. -
    2065.  
    2066. -
    2067.  
    2068. -
    2069.         if (is_a($model'MemModel'))
    2070. -
    2071.         {
    2072. -
    2073.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2074. -
    2075.             $stateIt=new StatementIterator($model);
    2076. -
    2077.             while($statement=$stateIt->next())
    2078. -
    2079.             {
    2080. -
    2081.                 $res->remove($statement);
    2082. -
    2083.             }
    2084. -
    2085.         }
    2086. -
    2087.         elseif (is_a($model'DbModel'))
    2088. -
    2089.         {
    2090. -
    2091.             $memModel =$model->getMemModel();
    2092. -
    2093.             foreach($memModel->triples as $value)
    2094. -
    2095.             $res->remove($value);
    2096. -
    2097.         }
    2098. -
    2099.  
    2100. -
    2101.  
    2102. -
    2103.         return $res;
    2104. -
    2105.     }
    2106. -
    2107.  
    2108. -
    2109.     /**
    2110. -
    2111.     * Returns a new MemModel containing all the statements which are in both this MemModel and another.
    2112. -
    2113.     *
    2114. -
    2115.     * @param    object Model    $model 
    2116. -
    2117.     * @return    object MemModel 
    2118. -
    2119.     * @access    public
    2120. -
    2121.     * @throws phpErrpr
    2122. -
    2123.     */
    2124. -
    2125.     function intersect(&$model)  {
    2126. -
    2127.  
    2128. -
    2129.         if (!is_a($model'Model')) {
    2130. -
    2131.             $errmsg RDFAPI_ERROR '(class: MemModel; method: intersect: Model expected.';
    2132. -
    2133.             trigger_error($errmsgE_USER_ERROR);
    2134. -
    2135.         }
    2136. -
    2137.  
    2138. -
    2139.         $res new MemModel($this->getBaseURI());
    2140. -
    2141.  
    2142. -
    2143.         if (is_a($model'DbModel'|| is_a($model'RDFSBModel'))
    2144. -
    2145.         {
    2146. -
    2147.             $memModel =$model->getMemModel();
    2148. -
    2149.             foreach($memModel->triples as $value{
    2150. -
    2151.                 if ($this->contains($value))
    2152. -
    2153.                 $res->add($value);
    2154. -
    2155.             }
    2156. -
    2157.         }
    2158. -
    2159.  
    2160. -
    2161.         elseif (is_a($model'MemModel'))
    2162. -
    2163.         {
    2164. -
    2165.             foreach($model->triples as $value{
    2166. -
    2167.                 if ($this->contains($value))
    2168. -
    2169.                 $res->add($value);
    2170. -
    2171.             }
    2172. -
    2173.         }
    2174. -
    2175.  
    2176. -
    2177.  
    2178. -
    2179.  
    2180. -
    2181.         return $res;
    2182. -
    2183.     }
    2184. -
    2185.  
    2186. -
    2187.  
    2188. -
    2189.     /**
    2190. -
    2191.     * Adds another model to this MemModel.
    2192. -
    2193.     * Duplicate statements are not removed.
    2194. -
    2195.     * If you don't want duplicates, use unite().
    2196. -
    2197.     * If any statement of the model to be added to this model contains a blankNode
    2198. -
    2199.     * with an identifier already existing in this model, a new blankNode is generated.
    2200. -
    2201.     *
    2202. -
    2203.     * @param    object Model    $model 
    2204. -
    2205.     * @access    public
    2206. -
    2207.     * @throws phpErrpr
    2208. -
    2209.     *
    2210. -
    2211.     */
    2212. -
    2213.     function addModel(&$model)  {
    2214. -
    2215.  
    2216. -
    2217.         if (!is_a($model'Model')) {
    2218. -
    2219.             $errmsg RDFAPI_ERROR '(class: MemModel; method: addModel): Model expected.';
    2220. -
    2221.             trigger_error($errmsgE_USER_ERROR);
    2222. -
    2223.         }
    2224. -
    2225.  
    2226. -
    2227.         $blankNodes_tmp array();
    2228. -
    2229.  
    2230. -
    2231.         if (is_a($model'MemModel')) {
    2232. -
    2233.             require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2234. -
    2235.             $stateIt=new StatementIterator($model);
    2236. -
    2237.             while($statement=$stateIt->next())
    2238. -
    2239.             {
    2240. -
    2241.                 $this->_addStatementFromAnotherModel($statement$blankNodes_tmp);
    2242. -
    2243.             };
    2244. -
    2245.             $this->addParsedNamespaces($model->getParsedNamespaces());
    2246. -
    2247.         }
    2248. -
    2249.  
    2250. -
    2251.         elseif (is_a($model'DbModel')) {
    2252. -
    2253.             $memModel =$model->getMemModel();
    2254. -
    2255.             foreach($memModel->triples as $value)
    2256. -
    2257.             $this->_addStatementFromAnotherModel($value$blankNodes_tmp);
    2258. -
    2259.         }
    2260. -
    2261.         $this->index($this->indexed);
    2262. -
    2263.     }
    2264. -
    2265.  
    2266. -
    2267.  
    2268. -
    2269.     /**
    2270. -
    2271.     * Reifies the MemModel.
    2272. -
    2273.     * Returns a new MemModel that contains the reifications of all statements of this MemModel.
    2274. -
    2275.     *
    2276. -
    2277.     * @access    public
    2278. -
    2279.     * @return    object    MemModel 
    2280. -
    2281.     */
    2282. -
    2283.     function reify({
    2284. -
    2285.         $res new MemModel($this->getBaseURI());
    2286. -
    2287.  
    2288. -
    2289.         $stateIt=$this->getStatementIterator();
    2290. -
    2291.         while($statement=$stateIt->next())
    2292. -
    2293.         {
    2294. -
    2295.             $pointer =$statement->reify($res);
    2296. -
    2297.             $res->addModel($pointer);
    2298. -
    2299.         };
    2300. -
    2301.  
    2302. -
    2303.         return $res;
    2304. -
    2305.     }
    2306. -
    2307.  
    2308. -
    2309.     /**
    2310. -
    2311.     * Returns a StatementIterator for traversing the MemModel.
    2312. -
    2313.     * @access    public
    2314. -
    2315.     * @return    object    StatementIterator 
    2316. -
    2317.     */
    2318. -
    2319.     function getStatementIterator({
    2320. -
    2321.         // Import Package Utility
    2322. -
    2323.         require_once RDFAPI_INCLUDE_DIR 'util/StatementIterator.php';
    2324. -
    2325.  
    2326. -
    2327.         $si new StatementIterator($this);
    2328. -
    2329.         return $si;
    2330. -
    2331.     }
    2332. -
    2333.  
    2334. -
    2335.     /**
    2336. -
    2337.     * Returns a FindIterator for traversing the MemModel.
    2338. -
    2339.     * @access    public
    2340. -
    2341.     * @return    object    FindIterator 
    2342. -
    2343.     */
    2344. -
    2345.     function findAsIterator($sub=null,$pred=null,$obj=null{
    2346. -
    2347.         // Import Package Utility
    2348. -
    2349.         require_once RDFAPI_INCLUDE_DIR 'util/FindIterator.php';
    2350. -
    2351.  
    2352. -
    2353.         $if new FindIterator($this,$sub,$pred,$obj);
    2354. -
    2355.         return $if;
    2356. -
    2357.     }
    2358. -
    2359.  
    2360. -
    2361.     /**
    2362. -
    2363.     * Returns a FindIterator for traversing the MemModel.
    2364. -
    2365.     * @access    public
    2366. -
    2367.     * @return    object    FindIterator 
    2368. -
    2369.     */
    2370. -
    2371.     function iterFind($sub=null,$pred=null,$obj=null{
    2372. -
    2373.         // Import Package Utility
    2374. -
    2375.         require_once RDFAPI_INCLUDE_DIR 'util/IterFind.php';
    2376. -
    2377.  
    2378. -
    2379.         $if new IterFind($this,$sub,$pred,$obj);
    2380. -
    2381.         return $if;
    2382. -
    2383.     }
    2384. -
    2385.  
    2386. -
    2387.  
    2388. -
    2389.     /**
    2390. -
    2391.     * Returns the models namespaces.
    2392. -
    2393.     *
    2394. -
    2395.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2396. -
    2397.     * @access   public
    2398. -
    2399.     * @return   Array 
    2400. -
    2401.     */
    2402. -
    2403.     function getParsedNamespaces(){
    2404. -
    2405.         if(count($this->parsedNamespaces)!=0){
    2406. -
    2407.             return $this->parsedNamespaces;
    2408. -
    2409.         }else{
    2410. -
    2411.             return false;
    2412. -
    2413.         }
    2414. -
    2415.     }
    2416. -
    2417.  
    2418. -
    2419.  
    2420. -
    2421.  
    2422. -
    2423.     /**
    2424. -
    2425.     * Adds the namespaces to the model. This method is called by
    2426. -
    2427.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    2428. -
    2429.     * added namespaces in the model !!!!
    2430. -
    2431.     *
    2432. -
    2433.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2434. -
    2435.     * @access   public
    2436. -
    2437.     * @param    Array $newNs 
    2438. -
    2439.     */
    2440. -
    2441.     function addParsedNamespaces($newNs){
    2442. -
    2443.         if($newNs)
    2444. -
    2445.         $this->parsedNamespaces $this->parsedNamespaces $newNs;
    2446. -
    2447.     }
    2448. -
    2449.  
    2450. -
    2451.  
    2452. -
    2453.     /**
    2454. -
    2455.     * Adds a namespace and prefix to the model.
    2456. -
    2457.     *
    2458. -
    2459.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2460. -
    2461.     * @access   public
    2462. -
    2463.     * @param    String 
    2464. -
    2465.     * @param    String 
    2466. -
    2467.     */
    2468. -
    2469.     function addNamespace($prefix$nmsp){
    2470. -
    2471.         $this->parsedNamespaces[$nmsp]=$prefix;
    2472. -
    2473.     }
    2474. -
    2475.  
    2476. -
    2477.     /**
    2478. -
    2479.     * removes a single namespace from the model
    2480. -
    2481.     *
    2482. -
    2483.     * @author   Tobias Gau�<tobias.gauss@web.de>
    2484. -
    2485.     * @access   public
    2486. -
    2487.     * @param    String $nmsp 
    2488. -
    2489.     */
    2490. -
    2491.     function removeNamespace($nmsp){
    2492. -
    2493.         if(isset($this->parsedNamespaces[$nmsp])){
    2494. -
    2495.             unset($this->parsedNamespaces[$nmsp]);
    2496. -
    2497.             return true;
    2498. -
    2499.         }else{
    2500. -
    2501.             return false;
    2502. -
    2503.         }
    2504. -
    2505.     }
    2506. -
    2507.  
    2508. -
    2509.  
    2510. -
    2511.  
    2512. -
    2513.     /**
    2514. -
    2515.     * Close the MemModel and free up resources held.
    2516. -
    2517.     *
    2518. -
    2519.     * @access    public
    2520. -
    2521.     */
    2522. -
    2523.     function close({
    2524. -
    2525.         unset$this->baseURI );
    2526. -
    2527.         unset$this->triples );
    2528. -
    2529.     }
    2530. -
    2531.  
    2532. -
    2533.     // =============================================================================
    2534. -
    2535.     // *************************** helper functions ********************************
    2536. -
    2537.     // =============================================================================
    2538. -
    2539.     /**
    2540. -
    2541.     * Checks if $statement is in index
    2542. -
    2543.     *
    2544. -
    2545.     * @param  int $ind 
    2546. -
    2547.     * @param  Statement &$statement 
    2548. -
    2549.     * @return boolean 
    2550. -
    2551.     * @access private
    2552. -
    2553.     */
    2554. -
    2555.     function _containsIndex(&$statement,$ind){
    2556. -
    2557.         switch($ind){
    2558. -
    2559.             case 4:
    2560. -
    2561.             $sub=$statement->getSubject();
    2562. -
    2563.             $pos=$sub->getLabel();
    2564. -
    2565.             break;
    2566. -
    2567.             case 1:
    2568. -
    2569.             $sub=$statement->getSubject();
    2570. -
    2571.             $pred=$statement->getPredicate();
    2572. -
    2573.             $obj=$statement->getObject();
    2574. -
    2575.             $pos=$sub->getLabel().$pred->getLabel().$obj->getLabel();
    2576. -
    2577.             break;
    2578. -
    2579.             case 2:
    2580. -
    2581.             $sub=$statement->getSubject();
    2582. -
    2583.             $pred=$statement->getPredicate();
    2584. -
    2585.             $pos=$sub->getLabel().$pred->getLabel();
    2586. -
    2587.             break;
    2588. -
    2589.             case 3:
    2590. -
    2591.             $sub=$statement->getSubject();
    2592. -
    2593.             $obj=$statement->getObject();
    2594. -
    2595.             $pos=$sub->getLabel().$obj->getLabel();
    2596. -
    2597.             break;
    2598. -
    2599.         }
    2600. -
    2601.  
    2602. -
    2603.         if (!isset($this->indexArr[$ind][$pos]))
    2604. -
    2605.         return FALSE;
    2606. -
    2607.         foreach ($this->indexArr[$ind][$posas $key => $value{
    2608. -
    2609.             $t=$this->triples[$value];
    2610. -
    2611.             if ($t->equals($statement))
    2612. -
    2613.             return TRUE;
    2614. -
    2615.         }
    2616. -
    2617.         return FALSE;
    2618. -
    2619.     }
    2620. -
    2621.  
    2622. -
    2623.  
    2624. -
    2625.  
    2626. -
    2627.  
    2628. -
    2629.  
    2630. -
    2631.     /**
    2632. -
    2633.     * finds a statement in an index. $pos is the Position in the index
    2634. -
    2635.     * and $ind the adequate searchindex
    2636. -
    2637.     *
    2638. -
    2639.     * @param    String            $pos 
    2640. -
    2641.     * @param    Object Subject    &$subject
    2642. -
    2643.     * @param    Object Predicate  &$predicate
    2644. -
    2645.     * @param    Object Object     &$object
    2646. -
    2647.     * @param    int                 &ind
    2648. -
    2649.     * @return   MemModel          $res
    2650. -
    2651.     * @access   private
    2652. -
    2653.     */
    2654. -
    2655.     function _findInIndex($pos,&$subject,&$predicate,&$object,$ind){
    2656. -
    2657.         $res new MemModel($this->getBaseURI());
    2658. -
    2659.         $res->indexed=-1;
    2660. -
    2661.         if (!isset($this->indexArr[$ind][$pos]))
    2662. -
    2663.         return $res;
    2664. -
    2665.         foreach($this->indexArr[$ind][$posas $key =>$value){
    2666. -
    2667.             $t=$this->triples[$value];
    2668. -
    2669.             if ($this->matchStatement($t,$subject,$predicate,$object))
    2670. -
    2671.             $res->add($t);
    2672. -
    2673.         }
    2674. -
    2675.         return $res;
    2676. -
    2677.     }
    2678. -
    2679.     /**
    2680. -
    2681.     * adds/removes a statement into/from an index.
    2682. -
    2683.     * mode=0 removes the statement from the index;
    2684. -
    2685.     * mode=1 adds the statement into the index.
    2686. -
    2687.     * returns the statements position.
    2688. -
    2689.     *
    2690. -
    2691.     * @param Object Statement &$statement
    2692. -
    2693.     *    @param int              $k 
    2694. -
    2695.     *    @param int              $ind 
    2696. -
    2697.     * @param int                $mode 
    2698. -
    2699.     * @return int             $k
    2700. -
    2701.     * @access private
    2702. -
    2703.     */
    2704. -
    2705.     function _indexOpr(&$statement,$k,$ind,$mode){
    2706. -
    2707.         // determine position in adequate index
    2708. -
    2709.         switch($ind){
    2710. -
    2711.             case 1:
    2712. -
    2713.             $s=$statement->getSubject();
    2714. -
    2715.             $p=$statement->getPredicate();
    2716. -
    2717.             $o=$statement->getObject();
    2718. -
    2719.             $pos=$s->getLabel().$p->getLabel().$o->getLabel();
    2720. -
    2721.             break;
    2722. -
    2723.             case 2:
    2724. -
    2725.             $s=$statement->getSubject();
    2726. -
    2727.             $p=$statement->getPredicate();
    2728. -
    2729.             $pos=$s->getLabel().$p->getLabel();
    2730. -
    2731.             break;
    2732. -
    2733.             case 3:
    2734. -
    2735.             $s=$statement->getSubject();
    2736. -
    2737.             $o=$statement->getObject();
    2738. -
    2739.             $pos=$s->getLabel().$o->getLabel();
    2740. -
    2741.             break;
    2742. -
    2743.             case 4:
    2744. -
    2745.             $s=$statement->getSubject();
    2746. -
    2747.             $pos=$s->getLabel();
    2748. -
    2749.             break;
    2750. -
    2751.             case 5:
    2752. -
    2753.             $p=$statement->getPredicate();
    2754. -
    2755.             $pos=$p->getLabel();
    2756. -
    2757.             break;
    2758. -
    2759.             case 6:
    2760. -
    2761.             $o=$statement->getObject();
    2762. -
    2763.             $pos=$o->getLabel();
    2764. -
    2765.             break;
    2766. -
    2767.         }
    2768. -
    2769.         switch($mode){
    2770. -
    2771.             // add in Index
    2772. -
    2773.             case 1:
    2774. -
    2775.             if(isset($this->indexArr[$ind][$pos])){
    2776. -
    2777.                 $this->indexArr[$ind][$pos][$k;
    2778. -
    2779.             }else{
    2780. -
    2781.                 $this->indexArr[$ind][$pos][0$k;
    2782. -
    2783.             }
    2784. -
    2785.             break;
    2786. -
    2787.             // remove from Index
    2788. -
    2789.             case 0:
    2790. -
    2791.             $subject=$statement->getSubject();
    2792. -
    2793.             $predicate=$statement->getPredicate();
    2794. -
    2795.             $object=$statement->getObject();
    2796. -
    2797.             $k=-1;
    2798. -
    2799.             if(!isset($this->indexArr[$ind][$pos])){
    2800. -
    2801.                 return -1;
    2802. -
    2803.             }
    2804. -
    2805.             $num=count($this->indexArr[$ind][$pos]);
    2806. -
    2807.             foreach($this->indexArr[$ind][$posas $key => $value){
    2808. -
    2809.                 $t=$this->triples[$value];
    2810. -
    2811.                 if($this->matchStatement($t,$subject,$predicate,$object)){
    2812. -
    2813.                     $k=$value;
    2814. -
    2815.                     if($num==1){
    2816. -
    2817.                         unset($this->indexArr[$ind][$pos]);
    2818. -
    2819.                     }else{
    2820. -
    2821.                         unset($this->indexArr[$ind][$pos][$key]);
    2822. -
    2823.                     }
    2824. -
    2825.                     return $k;
    2826. -
    2827.                 }
    2828. -
    2829.             }
    2830. -
    2831.             break;
    2832. -
    2833.         }
    2834. -
    2835.         return $k;
    2836. -
    2837.     }
    2838. -
    2839.  
    2840. -
    2841.  
    2842. -
    2843.     /**
    2844. -
    2845.     * finds next or previous matching statement.
    2846. -
    2847.     * Returns Position in model or -1 if there is no match.
    2848. -
    2849.     *
    2850. -
    2851.     *
    2852. -
    2853.     * @param        String 
    2854. -
    2855.     * @param     object  Subject 
    2856. -
    2857.     * @param        object    Predicate 
    2858. -
    2859.     * @param     object  Object 
    2860. -
    2861.     * @param     integer 
    2862. -
    2863.     * @param     integer 
    2864. -
    2865.     * @return    integer 
    2866. -
    2867.     * @access    private
    2868. -
    2869.     */
    2870. -
    2871.     function _findMatchIndex($pos,&$s,&$p,&$o,$ind,$off){
    2872. -
    2873.         $match=-1;
    2874. -
    2875.         if (!isset($this->indexArr[$ind][$pos])) {
    2876. -
    2877.             return $match;}
    2878. -
    2879.             foreach($this->indexArr[$ind][$posas $key =>$value){
    2880. -
    2881.                 $t=$this->triples[$value];
    2882. -
    2883.                 if ($this->matchStatement($t,$s,$p,$o)){
    2884. -
    2885.                     if($off <= $value){
    2886. -
    2887.                         $match$value;
    2888. -
    2889.                         return $match;
    2890. -
    2891.                     }
    2892. -
    2893.                 }
    2894. -
    2895.             }
    2896. -
    2897.  
    2898. -
    2899.             return $match;
    2900. -
    2901.  
    2902. -
    2903.     }
    2904. -
    2905.  
    2906. -
    2907.  
    2908. -
    2909.  
    2910. -
    2911.  
    2912. -
    2913. // end: MemModel
    2914. -
    2915.  
    2916. -
    2917.  
    2918. -
    2919. ?>
    2920. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:48 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModel.php.html deleted file mode 100755 index df3b308e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModel.php.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - File Source for Model.php - - - - - -

    Source for file Model.php

    -

    Documentation is available at Model.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Model
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    16. -
    17.  * An RDF graph is a directed labeled graph, as described in http://www.w3.org/TR/rdf-mt/.
    18. -
    19.  * It can be defined as a set of <S, P, O> triples, where P is a uriref, S is either
    20. -
    21.  * a uriref or a blank node, and O is either a uriref, a blank node, or a literal.
    22. -
    23.  *
    24. -
    25.  *
    26. -
    27.  * @version  $Id: fsource_model__modelModel.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29.  * @author Radoslaw Oldakowski <radol@gmx.de>
    30. -
    31.  * @author Daniel Westphal <mail@d-westphal.de>
    32. -
    33.  *
    34. -
    35.  * @package model
    36. -
    37.  * @access    public
    38. -
    39.  */
    40. -
    41. class Model extends Object
    42. -
    43. {
    44. -
    45.     /**
    46. -
    47.     * Base URI of the Model.
    48. -
    49.     * Affects creating of new resources and serialization syntax.
    50. -
    51.     *
    52. -
    53.     * @var     string 
    54. -
    55.     * @access    private
    56. -
    57.     */
    58. -
    59.     var $baseURI;
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Number of the last assigned bNode.
    66. -
    67.     *
    68. -
    69.     * @var     integer 
    70. -
    71.     * @access    private
    72. -
    73.     */
    74. -
    75.     var $bNodeCount;
    76. -
    77.  
    78. -
    79.     /**
    80. -
    81.     *   SparqlParser so we can re-use it
    82. -
    83.     *   @var Parser 
    84. -
    85.     */
    86. -
    87.     var $queryParser = null;
    88. -
    89.  
    90. -
    91.  
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Notice for people who are used to work with older versions of RAP.
    98. -
    99.     *
    100. -
    101.     * @throws  PHPError
    102. -
    103.     * @access    public
    104. -
    105.     */
    106. -
    107.     function Model()
    108. -
    109.     {
    110. -
    111.  
    112. -
    113.         $errmsg  'Since RAP 0.6 the class for manipulating memory models has been renamed to MemModel.';
    114. -
    115.         $errmsg .= '<br>Sorry for this inconvenience.<br>';
    116. -
    117.  
    118. -
    119.         trigger_error($errmsgE_USER_ERROR);
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * Return current baseURI.
    132. -
    133.     *
    134. -
    135.     * @return  string 
    136. -
    137.     * @access    public
    138. -
    139.     */
    140. -
    141.     function getBaseURI()
    142. -
    143.     {
    144. -
    145.         return $this->baseURI;
    146. -
    147.     }
    148. -
    149.  
    150. -
    151.  
    152. -
    153.  
    154. -
    155.     /**
    156. -
    157.     * Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    158. -
    159.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    160. -
    161.     * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
    162. -
    163.     * If the model is not empty, the contents of the file is added to this DbModel.
    164. -
    165.     *
    166. -
    167.     * @param     string     $filename 
    168. -
    169.     * @param     string     $type 
    170. -
    171.     * @param   boolean $stream 
    172. -
    173.     * @access    public
    174. -
    175.     */
    176. -
    177.     function load($filename$type NULL$stream=false)
    178. -
    179.     {
    180. -
    181.         if ((isset($type)) && ($type =='n3'OR ($type =='nt')) {
    182. -
    183.             // Import Package Syntax
    184. -
    185.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    186. -
    187.             $parser new N3Parser();
    188. -
    189.         }elseif ((isset($type)) && ($type =='rdf')) {
    190. -
    191.             // Import Package Syntax
    192. -
    193.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    194. -
    195.             $parser new RdfParser();
    196. -
    197.         }elseif ((isset($type)) && ($type =='grddl')) {
    198. -
    199.             // Import Package Syntax
    200. -
    201.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
    202. -
    203.             $parser new GRDDLParser();
    204. -
    205.         }elseif ((isset($type)) && ($type =='rss')) {
    206. -
    207.             // Import Package Syntax
    208. -
    209.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS);
    210. -
    211.             $parser new RssParser();
    212. -
    213.         }else {
    214. -
    215.             // create a parser according to the suffix of the filename
    216. -
    217.             // if there is no suffix assume the file to be XML/RDF
    218. -
    219.             preg_match("/\.([a-zA-Z0-9_]+)$/"$filename$suffix);
    220. -
    221.             if (isset($suffix[1]&& (strtolower($suffix[1]== 'n3' OR strtolower($suffix[1]== 'nt')){
    222. -
    223.                 // Import Package Syntax
    224. -
    225.                 include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
    226. -
    227.                 $parser new N3Parser();
    228. -
    229.             }elseif (isset($suffix[1]&& (strtolower($suffix[1]== 'htm' OR strtolower($suffix[1]== 'html' OR strtolower($suffix[1]== 'xhtml')){
    230. -
    231.                     include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
    232. -
    233.                     $parser new GRDDLParser();
    234. -
    235.             }else{
    236. -
    237.                 // Import Package Syntax
    238. -
    239.                 include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    240. -
    241.                 $parser new RdfParser();
    242. -
    243.             }
    244. -
    245.         };
    246. -
    247.  
    248. -
    249.         if (($stream && $type=='rdf')||($stream && $type=='n3')) {
    250. -
    251.                 $temp=&$parser->generateModel($filename,false,$this);
    252. -
    253.         else{
    254. -
    255.                 $temp=&$parser->generateModel($filename);
    256. -
    257.         }
    258. -
    259.         $this->addModel($temp);
    260. -
    261.         if($this->getBaseURI()== null)
    262. -
    263.             $this->setBaseURI($temp->getBaseURI());
    264. -
    265.     }
    266. -
    267.  
    268. -
    269.  
    270. -
    271.  
    272. -
    273.     /**
    274. -
    275.     * Adds a statement from another model to this model.
    276. -
    277.     * If the statement to be added contains a blankNode with an identifier
    278. -
    279.     * already existing in this model, a new blankNode is generated.
    280. -
    281.     *
    282. -
    283.     * @param     Object Statement   $statement
    284. -
    285.     * @access    private
    286. -
    287.     */
    288. -
    289.     function _addStatementFromAnotherModel($statement&$blankNodes_tmp)
    290. -
    291.     {
    292. -
    293.         $subject $statement->getSubject();
    294. -
    295.         $object $statement->getObject();
    296. -
    297.  
    298. -
    299.         if (is_a($subject"BlankNode")) {
    300. -
    301.             $label $subject->getLabel();
    302. -
    303.             if (!array_key_exists($label$blankNodes_tmp))
    304. -
    305.             {
    306. -
    307.                 if ($this->findFirstMatchingStatement($subjectNULLNULL)
    308. -
    309.                 || $this->findFirstMatchingStatement(NULLNULL$subject))
    310. -
    311.                 {
    312. -
    313.                 $blankNodes_tmp[$labelnew BlankNode($this);
    314. -
    315.                 $statement->subj $blankNodes_tmp[$label];
    316. -
    317.                 else {
    318. -
    319.                 $blankNodes_tmp[$label$subject;
    320. -
    321.                 }
    322. -
    323.             else
    324. -
    325.                 $statement->subj $blankNodes_tmp[$label];
    326. -
    327.         }
    328. -
    329.  
    330. -
    331.         if (is_a($object"BlankNode")) {
    332. -
    333.             $label $object->getLabel();
    334. -
    335.             if (!array_key_exists($label$blankNodes_tmp))
    336. -
    337.             {
    338. -
    339.                 if ($this->findFirstMatchingStatement($objectNULLNULL)
    340. -
    341.                 || $this->findFirstMatchingStatement(NULLNULL$object))
    342. -
    343.                 {
    344. -
    345.                 $blankNodes_tmp[$labelnew BlankNode($this);
    346. -
    347.                 $statement->obj $blankNodes_tmp[$label];
    348. -
    349.                 else {
    350. -
    351.                 $blankNodes_tmp[$label$object;
    352. -
    353.                 }
    354. -
    355.             else
    356. -
    357.                 $statement->obj $blankNodes_tmp[$label];
    358. -
    359.         }
    360. -
    361.         $this->add($statement);
    362. -
    363.     }
    364. -
    365.  
    366. -
    367.  
    368. -
    369.  
    370. -
    371.     /**
    372. -
    373.     * Internal method, that returns a resource URI that is unique for the Model.
    374. -
    375.     * URIs are generated using the base_uri of the DbModel, the prefix and a unique number.
    376. -
    377.     * If no prefix is defined, the bNode prefix, defined in constants.php, is used.
    378. -
    379.     *
    380. -
    381.     * @param    string    $prefix 
    382. -
    383.     * @return    string 
    384. -
    385.     * @access    private
    386. -
    387.     */
    388. -
    389.     function getUniqueResourceURI($prefix false)
    390. -
    391.     {
    392. -
    393.         static $bNodeCount;
    394. -
    395.         if(!$bNodeCount)
    396. -
    397.             $bNodeCount 0;
    398. -
    399.  
    400. -
    401.         if(!$prefix)
    402. -
    403.             $prefix=BNODE_PREFIX;
    404. -
    405.  
    406. -
    407.         return $prefix.++$bNodeCount;
    408. -
    409.     }
    410. -
    411.  
    412. -
    413.  
    414. -
    415.  
    416. -
    417.     /**
    418. -
    419.     * Returns a ResModel with this model as baseModel. This is the same as
    420. -
    421.     * ModelFactory::getResModelForBaseModel($this).
    422. -
    423.     *
    424. -
    425.     * @return    object    ResModel 
    426. -
    427.     * @access    public
    428. -
    429.     */
    430. -
    431.     function getResModel()
    432. -
    433.     {
    434. -
    435.         return ModelFactory::getResModelForBaseModel($this);
    436. -
    437.     }
    438. -
    439.  
    440. -
    441.  
    442. -
    443.  
    444. -
    445.     /**
    446. -
    447.     * Returns an OntModel with this model as baseModel.
    448. -
    449.     * $vocabulary has to be one of the following constants (currently only one is supported):
    450. -
    451.     * RDFS_VOCABULARY to select a RDFS Vocabulary.
    452. -
    453.     *
    454. -
    455.     * This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary).
    456. -
    457.     *
    458. -
    459.     * @param   constant  $vocabulary 
    460. -
    461.     * @return    object    OntModel 
    462. -
    463.     * @access    public
    464. -
    465.     */
    466. -
    467.     function getOntModel($vocabulary)
    468. -
    469.     {
    470. -
    471.         return ModelFactory::getOntModelForBaseModel($this$vocabulary);
    472. -
    473.     }
    474. -
    475.  
    476. -
    477.  
    478. -
    479.  
    480. -
    481.     /**
    482. -
    483.     * Searches for triples using find() and tracks forward blank nodes
    484. -
    485.     * until the final objects in the retrieved subgraphs are all named resources.
    486. -
    487.     * The method calls itself recursivly until the result is complete.
    488. -
    489.     * NULL input for subject, predicate or object will match anything.
    490. -
    491.     * Inputparameters are ignored for recursivly found statements.
    492. -
    493.     * Returns a new MemModel or adds (without checking for duplicates)
    494. -
    495.     * the found statements to a given MemModel.
    496. -
    497.     * Returns an empty MemModel, if nothing is found.
    498. -
    499.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    500. -
    501.     * WARNING: This method can be slow with large models.
    502. -
    503.     * NOTE:    Blank nodes are not renamed, they keep the same nodeIDs
    504. -
    505.     *          as in the queried model!
    506. -
    507.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    508. -
    509.     *
    510. -
    511.     * @author   Anton Koestlbacher <anton1@koestlbacher.de>
    512. -
    513.     * @param    object Node     $subject 
    514. -
    515.     * @param    object Node     $predicate 
    516. -
    517.     * @param    object Node     $object 
    518. -
    519.     * @param    object MemModel $object 
    520. -
    521.     * @return   object MemModel 
    522. -
    523.     * @access   public
    524. -
    525.     * @throws   PhpError
    526. -
    527.     */
    528. -
    529.     function findForward($subject$predicate$object&$newModel NULL)
    530. -
    531.     {
    532. -
    533.         if (!is_a($newModel"MemModel"))
    534. -
    535.         {
    536. -
    537.             $newModel New MemModel;
    538. -
    539.         }
    540. -
    541.  
    542. -
    543.         if (is_a($this"DbModel"))
    544. -
    545.         {
    546. -
    547.             $model $this;
    548. -
    549.             $res   $model->find($subject$predicate$object);
    550. -
    551.             $it    $res->getStatementIterator();
    552. -
    553.         }
    554. -
    555.         elseif (is_a($this"MemModel")) {
    556. -
    557.             $model $this;
    558. -
    559.             $it    $model->findAsIterator($subject$predicate$object);
    560. -
    561.         }
    562. -
    563.         elseif (is_a($this"ResModel")) {
    564. -
    565.             $model $this->model;
    566. -
    567.             $it    $model->findAsIterator($subject$predicate$object);
    568. -
    569.         }
    570. -
    571.  
    572. -
    573.         while ($it->hasNext())
    574. -
    575.         {
    576. -
    577.             $statement $it->next();
    578. -
    579.             $newModel->add($statement);
    580. -
    581.             if (is_a($statement->object(),'BlankNode'))
    582. -
    583.             {
    584. -
    585.                 $model->findForward($statement->object()NULLNULL$newModel);
    586. -
    587.             }
    588. -
    589.         }
    590. -
    591.         return $newModel;
    592. -
    593.     }
    594. -
    595.  
    596. -
    597.  
    598. -
    599.  
    600. -
    601.     /**
    602. -
    603.     * Perform an RDQL query on this Model. Should work with all types of models.
    604. -
    605.     * This method returns a MemModel containing the result statements.
    606. -
    607.     * If $closure is set to TRUE, the result will additionally contain
    608. -
    609.     * statements found by the findForward-method for blank nodes.
    610. -
    611.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    612. -
    613.     * WARNING: If called with $closure = TRUE this method
    614. -
    615.     *          can be slow with large models.
    616. -
    617.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    618. -
    619.     *
    620. -
    621.     * @author   Anton K�tlbacher <anton1@koestlbacher.de>
    622. -
    623.     * @author   code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer
    624. -
    625.     * @access   public
    626. -
    627.     * @param    string $queryString 
    628. -
    629.     * @param    boolean $closure 
    630. -
    631.     * @return   object MemModel 
    632. -
    633.     *
    634. -
    635.     */
    636. -
    637.     function getMemModelByRDQL($queryString$closure FALSE)
    638. -
    639.     {
    640. -
    641.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
    642. -
    643.         $parser new RdqlParser();
    644. -
    645.         $parsedQuery =$parser->parseQuery($queryString);
    646. -
    647.  
    648. -
    649.         // If there are variables used in the pattern but not
    650. -
    651.         // in the select clause, add them to the select clause
    652. -
    653.         foreach ($parsedQuery['patterns'as $n => $pattern)
    654. -
    655.         {
    656. -
    657.             foreach ($pattern as $key => $val_1)
    658. -
    659.             {
    660. -
    661.                 if ($val_1['value']{0}=='?')
    662. -
    663.                 {
    664. -
    665.                     if (!in_array($val_1['value'],$parsedQuery['selectVars']))
    666. -
    667.                     {
    668. -
    669.                     array_push($parsedQuery['selectVars'],$val_1['value']);
    670. -
    671.                     }
    672. -
    673.                 }
    674. -
    675.             }
    676. -
    677.         }
    678. -
    679.  
    680. -
    681.         if (is_a($this"DbModel"))
    682. -
    683.         {
    684. -
    685.             $engine new RdqlDbEngine();
    686. -
    687.             $model  $this;
    688. -
    689.         }
    690. -
    691.         elseif (is_a($this"MemModel"))
    692. -
    693.         {
    694. -
    695.             $engine new RdqlMemEngine();
    696. -
    697.             $model  $this;
    698. -
    699.         }
    700. -
    701.         elseif (is_a($this"ResModel"))
    702. -
    703.         {
    704. -
    705.             $engine new RdqlMemEngine();
    706. -
    707.             $model  $this->model;
    708. -
    709.         }
    710. -
    711.  
    712. -
    713.         $res $engine->queryModel($model,$parsedQuery,TRUE);
    714. -
    715.         $rdqlIter new RdqlResultIterator($res);
    716. -
    717.         $newModel new MemModel();
    718. -
    719.  
    720. -
    721.         // Build statements from RdqlResultIterator
    722. -
    723.         while ($rdqlIter->hasNext()) {
    724. -
    725.             $result $rdqlIter->next();
    726. -
    727.             foreach ($parsedQuery['patterns'as $n => $pattern)
    728. -
    729.             {
    730. -
    731.                 if (substr($pattern['subject']['value']01== '?')
    732. -
    733.                 {
    734. -
    735.                     $subj $result[$pattern['subject']['value']];
    736. -
    737.                 }
    738. -
    739.                 else
    740. -
    741.                 {
    742. -
    743.                     $subj new Resource($pattern['subject']['value']);
    744. -
    745.                 }
    746. -
    747.                 if (substr($pattern['predicate']['value']01== '?')
    748. -
    749.                 {
    750. -
    751.                     $pred $result[$pattern['predicate']['value']];
    752. -
    753.                 }
    754. -
    755.                 else
    756. -
    757.                 {
    758. -
    759.                     $pred new Resource($pattern['predicate']['value']);
    760. -
    761.                 }
    762. -
    763.  
    764. -
    765.                 if (substr($pattern['object']['value']01== '?')
    766. -
    767.                 {
    768. -
    769.                     $obj $result[$pattern['object']['value']];
    770. -
    771.                 }
    772. -
    773.                 else
    774. -
    775.                 {
    776. -
    777.                     if (isset($pattern['object']['is_literal']))
    778. -
    779.                     {
    780. -
    781.                         $obj new Literal($pattern['object']['value']);
    782. -
    783.                         $obj->setDatatype($pattern['object']['l_dtype']);
    784. -
    785.                         $obj->setLanguage($pattern['object']['l_lang']);
    786. -
    787.                     }
    788. -
    789.                     else
    790. -
    791.                     {
    792. -
    793.                         $obj new Resource($pattern['object']['value']);
    794. -
    795.                     }
    796. -
    797.                 }
    798. -
    799.  
    800. -
    801.                 $statement new Statement($subj,$pred,$obj);
    802. -
    803.                 $newModel->add($statement);
    804. -
    805.  
    806. -
    807.                 // findForward() Statements containing an eventually given blank node
    808. -
    809.                 // and add them to the result, if closure = true
    810. -
    811.                 if (is_a($statement->object(),'BlankNode'&& $closure == True)
    812. -
    813.                 {
    814. -
    815.                     $newModel $model->findForward($statement->object(),NULL,NULL$newModel);
    816. -
    817.                 }
    818. -
    819.                 if (is_a($statement->subject(),'BlankNode'&& $closure == True)
    820. -
    821.                 {
    822. -
    823.                     $newModel $model->findForward($statement->subject(),NULL,NULL$newModel);
    824. -
    825.                 }
    826. -
    827.             }
    828. -
    829.         }
    830. -
    831.         return $newModel;
    832. -
    833.     }
    834. -
    835.  
    836. -
    837.  
    838. -
    839.  
    840. -
    841.     /**
    842. -
    843.     * Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    844. -
    845.     *
    846. -
    847.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    848. -
    849.     * Note: See RDFUtil for further Information.
    850. -
    851.     * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    852. -
    853.     *
    854. -
    855.     * @author   Anton K�tlbacher <anton1@koestlbacher.de>
    856. -
    857.     * @param    string  $format 
    858. -
    859.     * @param    boolean $short_prefix 
    860. -
    861.     * @return   string, binary
    862. -
    863.     * @access   public
    864. -
    865.     * @throws   PhpError
    866. -
    867.     */
    868. -
    869.     function visualize($format "dot"$short_prefix TRUE)
    870. -
    871.     {
    872. -
    873.         return RDFUtil::visualizeGraph($this$format$short_prefix);
    874. -
    875.     }
    876. -
    877.  
    878. -
    879.  
    880. -
    881.     /**
    882. -
    883.     * Performs a SPARQL query against a model. The model is converted to
    884. -
    885.     * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or
    886. -
    887.     * as an array containing the variables an their bindings.
    888. -
    889.     *
    890. -
    891.     * @param  string $query      the sparql query string
    892. -
    893.     * @param  string $resultform the result form ('xml' for SPARQL Query Results XML Format)
    894. -
    895.     * @return string/array 
    896. -
    897.     */
    898. -
    899.     function sparqlQuery($query$resultform false)
    900. -
    901.     {
    902. -
    903.         list($engine$dataset$this->_prepareSparql();
    904. -
    905.         return $engine->queryModel(
    906. -
    907.             $dataset,
    908. -
    909.             $this->_parseSparqlQuery($query),
    910. -
    911.             $resultform
    912. -
    913.         );
    914. -
    915.     }//function sparqlQuery($query,$resultform = false)
    916. -
    917.  
    918. -
    919.  
    920. -
    921.  
    922. -
    923.     /**
    924. -
    925.     *   Prepares a sparql query and returns a prepared statement
    926. -
    927.     *   that can be executed with data later on.
    928. -
    929.     *
    930. -
    931.     *   @param string $query Sparql query to prepare.
    932. -
    933.     *   @return SparqlEngine_PreparedStatement  prepared statement object
    934. -
    935.     */
    936. -
    937.     function sparqlPrepare($query)
    938. -
    939.     {
    940. -
    941.         list($engine$dataset$this->_prepareSparql();
    942. -
    943.         return $engine->prepare(
    944. -
    945.             $dataset,
    946. -
    947.             $this->_parseSparqlQuery($query)
    948. -
    949.          );
    950. -
    951.     }//function sparqlPrepare($query)
    952. -
    953.  
    954. -
    955.  
    956. -
    957.  
    958. -
    959.     /**
    960. -
    961.     *   Prepares everything for SparqlEngine-usage
    962. -
    963.     *   Loads the files, creates instances for SparqlEngine and
    964. -
    965.     *   Dataset...
    966. -
    967.     *
    968. -
    969.     *   @return array First value is the sparql engine, second the dataset
    970. -
    971.     */
    972. -
    973.     function _prepareSparql()
    974. -
    975.     {
    976. -
    977.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php';
    978. -
    979.         require_once RDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php';
    980. -
    981.  
    982. -
    983.         $dataset new DatasetMem();
    984. -
    985.         $dataset->setDefaultGraph($this);
    986. -
    987.  
    988. -
    989.         return array(
    990. -
    991.             SparqlEngine::factory($this),
    992. -
    993.             $dataset
    994. -
    995.         );
    996. -
    997.     }//function _prepareSparql()
    998. -
    999.  
    1000. -
    1001.  
    1002. -
    1003.  
    1004. -
    1005.     /**
    1006. -
    1007.     *   Parses an query and returns the parsed form.
    1008. -
    1009.     *   If the query is not a string but a Query object,
    1010. -
    1011.     *   it will just be returned.
    1012. -
    1013.     *
    1014. -
    1015.     *   @param $query mixed String or Query object
    1016. -
    1017.     *   @return Query query object
    1018. -
    1019.     *   @throws Exception If $query is no string and no Query object
    1020. -
    1021.     */
    1022. -
    1023.     function _parseSparqlQuery($query)
    1024. -
    1025.     {
    1026. -
    1027.         if ($this->queryParser === null{
    1028. -
    1029.             require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php';
    1030. -
    1031.             $this->queryParser = new SparqlParser();
    1032. -
    1033.         }
    1034. -
    1035.         return $this->queryParser->parse($query);
    1036. -
    1037.     }//function _parseSparqlQuery($query)
    1038. -
    1039.  
    1040. -
    1041. // end: Model
    1042. -
    1043.  
    1044. -
    1045. ?>
    1046. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModelFactory.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModelFactory.php.html deleted file mode 100755 index f0018e9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelModelFactory.php.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - File Source for ModelFactory.php - - - - - -

    Source for file ModelFactory.php

    -

    Documentation is available at ModelFactory.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/DbStore.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: ModelFactory
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * ModelFactory is a static class which provides methods for creating different
    20. -
    21. * types of RAP models. RAP models have to be created trough a ModelFactory
    22. -
    23. * instead of creating them directly with the 'new' operator because of RAP's
    24. -
    25. * dynamic code inclusion mechanism.
    26. -
    27. *
    28. -
    29. @version  $Id: fsource_model__modelModelFactory.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31. @author Daniel Westphal <mail at d-westphal.de>
    32. -
    33. @author Richard Cyganiak <richard@cyganiak.de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     model
    40. -
    41. @access    public
    42. -
    43. ***/
    44. -
    45. -
    46. {
    47. -
    48.     /**
    49. -
    50.     * Returns a MemModel.
    51. -
    52.     * You can supply a base URI
    53. -
    54.     *
    55. -
    56.     * @param   string  $baseURI 
    57. -
    58.     * @return    object    MemModel 
    59. -
    60.     * @access    public
    61. -
    62.     */
    63. -
    64.     function getDefaultModel($baseURI null)
    65. -
    66.     {
    67. -
    68.         return ModelFactory::getMemModel($baseURI);
    69. -
    70.     }
    71. -
    72.  
    73. -
    74.     /**
    75. -
    76.     * Returns a NamedGraphSetMem.
    77. -
    78.     * You can supply a GraphSet name.
    79. -
    80.     *
    81. -
    82.     * @param string $graphSetId 
    83. -
    84.     * @param string $uri 
    85. -
    86.     * @access    public
    87. -
    88.     */
    89. -
    90.     function getDatasetMem($graphSetId null)
    91. -
    92.     {
    93. -
    94.         require_once RDFAPI_INCLUDE_DIR 'dataset/DatasetMem.php';
    95. -
    96.         $m new DatasetMem($graphSetId);
    97. -
    98.         return $m;
    99. -
    100.     }
    101. -
    102.  
    103. -
    104.     /**
    105. -
    106.     * Returns a MemModel.
    107. -
    108.     * You can supply a base URI
    109. -
    110.     *
    111. -
    112.     * @param   string  $baseURI 
    113. -
    114.     * @return    object    MemModel 
    115. -
    116.     * @access    public
    117. -
    118.     */
    119. -
    120.     function getMemModel($baseURI null)
    121. -
    122.     {
    123. -
    124.         require_once RDFAPI_INCLUDE_DIR 'model/MemModel.php';
    125. -
    126.         $m new MemModel($baseURI);
    127. -
    128.         return $m;
    129. -
    130.     }
    131. -
    132.  
    133. -
    134.     /**
    135. -
    136.     * Returns a DbModel with the database connection
    137. -
    138.     * defined in constants.php.
    139. -
    140.     * You can supply a base URI. If a model with the given base
    141. -
    142.     * URI exists in the DbStore, it'll be opened.
    143. -
    144.     * If not, a new model will be created.
    145. -
    146.     *
    147. -
    148.     * @param   string  $baseURI 
    149. -
    150.     * @return    object    DbModel 
    151. -
    152.     * @access    public
    153. -
    154.     */
    155. -
    156.     function getDefaultDbModel($baseURI null)
    157. -
    158.     {
    159. -
    160.         $dbStore ModelFactory::getDbStore();
    161. -
    162.         $m ModelFactory::getDbModel($dbStore,$baseURI);
    163. -
    164.         return $m;
    165. -
    166.     }
    167. -
    168.  
    169. -
    170.     /**
    171. -
    172.     * Returns a new DbModel using the database connection
    173. -
    174.     * supplied by $dbStore.
    175. -
    176.     * You can supply a base URI. If a model with the given base
    177. -
    178.     * URI exists in the DbStore, it'll be opened.
    179. -
    180.     * If not, a new model will be created.
    181. -
    182.     *
    183. -
    184.     * @param   object    DbStore  $dbStore 
    185. -
    186.     * @param   string  $baseURI 
    187. -
    188.     * @return    object    DbModel 
    189. -
    190.     * @access    public
    191. -
    192.     */
    193. -
    194.     function getDbModel($dbStore$baseURI null)
    195. -
    196.     {
    197. -
    198.         if ($dbStore->modelExists($baseURI)) {
    199. -
    200.             return $dbStore->getModel($baseURI);
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         return $dbStore->getNewModel($baseURI);
    207. -
    208.     }
    209. -
    210.  
    211. -
    212.     /**
    213. -
    214.     * Returns a database connection with the given parameters.
    215. -
    216.     * Paramters, which are not defined are taken from the constants.php
    217. -
    218.     *
    219. -
    220.     * @param   string   $dbDriver 
    221. -
    222.     * @param   string   $host 
    223. -
    224.     * @param   string   $dbName 
    225. -
    226.     * @param   string   $user 
    227. -
    228.     * @param   string   $password 
    229. -
    230.     * @return    object    DbStore 
    231. -
    232.     * @access    public
    233. -
    234.     */
    235. -
    236.     function getDbStore($dbDriver=ADODB_DB_DRIVER$host=ADODB_DB_HOST$dbName=ADODB_DB_NAME,
    237. -
    238.                            $user=ADODB_DB_USER$password=ADODB_DB_PASSWORD)
    239. -
    240.     {
    241. -
    242.         $dbs new DbStore($dbDriver$host$dbName,$user$password);
    243. -
    244.         return $dbs;
    245. -
    246.     }
    247. -
    248.  
    249. -
    250.     /**
    251. -
    252.     * Returns a InfModelF.
    253. -
    254.     * (MemModel with forward chaining inference engine)
    255. -
    256.     * Configurations can be done in constants.php
    257. -
    258.     * You can supply a base URI
    259. -
    260.     *
    261. -
    262.     * @param   string  $baseURI 
    263. -
    264.     * @return    object    MemModel 
    265. -
    266.     * @access    public
    267. -
    268.     */
    269. -
    270.     function getInfModelF($baseURI null)
    271. -
    272.     {
    273. -
    274.         require_once RDFAPI_INCLUDE_DIR 'infModel/InfModelF.php';
    275. -
    276.         $mod new InfModelF($baseURI);
    277. -
    278.         return $mod;
    279. -
    280.     }
    281. -
    282.  
    283. -
    284.     /**
    285. -
    286.     * Returns a InfModelB.
    287. -
    288.     * (MemModel with backward chaining inference engine)
    289. -
    290.     * Configurations can be done in constants.php
    291. -
    292.     * You can supply a base URI
    293. -
    294.     *
    295. -
    296.     * @param   string  $baseURI 
    297. -
    298.     * @return    object    MemModel 
    299. -
    300.     * @access    public
    301. -
    302.     */
    303. -
    304.     function getInfModelB($baseURI null)
    305. -
    306.     {
    307. -
    308.         require_once RDFAPI_INCLUDE_DIR 'infModel/InfModelB.php';
    309. -
    310.         $mod new InfModelB($baseURI);
    311. -
    312.         return $mod;
    313. -
    314.     }
    315. -
    316.  
    317. -
    318.     /**
    319. -
    320.     * Returns a ResModel.
    321. -
    322.     * $modelType has to be one of the following constants:
    323. -
    324.     * MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new
    325. -
    326.     * model from defined type.
    327. -
    328.     * You can supply a base URI
    329. -
    330.     *
    331. -
    332.     * @param   constant  $modelType 
    333. -
    334.     * @param   string  $baseURI 
    335. -
    336.     * @return    object    ResModel 
    337. -
    338.     * @access    public
    339. -
    340.     */
    341. -
    342.     function getResModel($modelType$baseURI null)
    343. -
    344.     {
    345. -
    346.         switch ($modelType{
    347. -
    348.             case DBMODEL:
    349. -
    350.                 $baseModel ModelFactory::getDefaultDbModel($baseURI);
    351. -
    352.                 break;
    353. -
    354.  
    355. -
    356.             case INFMODELF:
    357. -
    358.                 $baseModel ModelFactory::getInfModelF($baseURI);
    359. -
    360.                 break;
    361. -
    362.  
    363. -
    364.             case INFMODELB:
    365. -
    366.                 $baseModel ModelFactory::getInfModelB($baseURI);
    367. -
    368.                 break;
    369. -
    370.  
    371. -
    372.             default:
    373. -
    374.                 $baseModel ModelFactory::getMemModel($baseURI);
    375. -
    376.                 break;
    377. -
    378.         }
    379. -
    380.         return ModelFactory::getResModelForBaseModel($baseModel);
    381. -
    382.     }
    383. -
    384.  
    385. -
    386.     /**
    387. -
    388.     * Creates a ResModel that wraps an existing base model.
    389. -
    390.     *
    391. -
    392.     * @param       object  Model    $baseModel 
    393. -
    394.     * @return    object    ResModel 
    395. -
    396.     * @access    public
    397. -
    398.     */
    399. -
    400.     function &getResModelForBaseModel(&$baseModel{
    401. -
    402.         require_once RDFAPI_INCLUDE_DIR 'resModel/ResModel.php';
    403. -
    404.         $mod new ResModel($baseModel);
    405. -
    406.         return $mod;
    407. -
    408.     }
    409. -
    410.  
    411. -
    412.     /**
    413. -
    414.     * Returns an OntModel.
    415. -
    416.     * $modelType has to be one of the following constants:
    417. -
    418.     * MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel
    419. -
    420.     * with a new model from defined type.
    421. -
    422.     * $vocabulary defines the ontology language. Currently only
    423. -
    424.     * RDFS_VOCABULARY is supported. You can supply a model base URI.
    425. -
    426.     *
    427. -
    428.     * @param       constant      $modelType 
    429. -
    430.     * @param       constant      $vocabulary 
    431. -
    432.     * @param       string      $baseURI 
    433. -
    434.     * @return    object        OntModel 
    435. -
    436.     * @access    public
    437. -
    438.     */
    439. -
    440.     function getOntModel($modelType,$vocabulary$baseURI null)
    441. -
    442.     {
    443. -
    444.         switch ($modelType)
    445. -
    446.         {
    447. -
    448.             case DBMODEL:
    449. -
    450.                 $baseModel ModelFactory::getDefaultDbModel($baseURI);
    451. -
    452.                 break;
    453. -
    454.  
    455. -
    456.             case INFMODELF:
    457. -
    458.                 $baseModel ModelFactory::getInfModelF($baseURI);
    459. -
    460.                 break;
    461. -
    462.  
    463. -
    464.             case INFMODELB:
    465. -
    466.                 $baseModel ModelFactory::getInfModelB($baseURI);
    467. -
    468.                 break;
    469. -
    470.  
    471. -
    472.             default:
    473. -
    474.                 $baseModel ModelFactory::getMemModel($baseURI);;
    475. -
    476.         }
    477. -
    478.  
    479. -
    480.         $mod ModelFactory::getOntModelForBaseModel($baseModel$vocabulary);
    481. -
    482.         return $mod;
    483. -
    484.     }
    485. -
    486.  
    487. -
    488.     /**
    489. -
    490.     * Creates an OntModel that wraps an existing base model.
    491. -
    492.     * $vocabulary defines the ontology language. Currently only
    493. -
    494.     * RDFS_VOCABULARY is supported.
    495. -
    496.     *
    497. -
    498.     * @param       object  Model    $baseModel 
    499. -
    500.     * @param       constant      $vocabulary 
    501. -
    502.     * @return    object        OntModel 
    503. -
    504.     * @access    public
    505. -
    506.     */
    507. -
    508.     function &getOntModelForBaseModel(&$baseModel$vocabulary)
    509. -
    510.     {
    511. -
    512.         require_once RDFAPI_INCLUDE_DIR 'ontModel/OntModel.php';
    513. -
    514.  
    515. -
    516.         switch ($vocabulary)
    517. -
    518.         {
    519. -
    520.             case RDFS_VOCABULARY:
    521. -
    522.                 require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.RDFS_VOCABULARY);
    523. -
    524.                 $vocab_object new RdfsVocabulary();
    525. -
    526.                 break;
    527. -
    528.             default:
    529. -
    530.                 trigger_error("Unknown vocabulary constant '$vocabulary'; only RDFS_VOCABULARY is supported"E_USER_WARNING);
    531. -
    532.                 $vocab_object null;
    533. -
    534.                 break;
    535. -
    536.         }
    537. -
    538.         $mod new OntModel($baseModel$vocab_object);
    539. -
    540.         return $mod;
    541. -
    542.     }
    543. -
    544.  
    545. -
    546.  
    547. -
    548.  
    549. -
    550.     /**
    551. -
    552.     * Creates a SparqlClient.
    553. -
    554.     *
    555. -
    556.     * @param       String  $server    Link to a SPARQL endpoint.
    557. -
    558.     * @return    SparqlClient the SparqlClient object.
    559. -
    560.     * @access    public
    561. -
    562.     */
    563. -
    564.     function getSparqlClient($server){
    565. -
    566.         $cl new SparqlClient($server);
    567. -
    568.         return $cl;
    569. -
    570.     }
    571. -
    572. }
    573. -
    574. ?>
    575. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelNode.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelNode.php.html deleted file mode 100755 index d6b66b03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelNode.php.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for Node.php - - - - - -

    Source for file Node.php

    -

    Documentation is available at Node.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR '/util/Object.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Node
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An abstract RDF node.
    18. -
    19.  * Can either be resource, literal or blank node.
    20. -
    21.  * Node is used in some comparisons like is_a($obj, "Node"),
    22. -
    23.  * meaning is $obj a resource, blank node or literal.
    24. -
    25.  *
    26. -
    27.  *
    28. -
    29.  * @version $Id: fsource_model__modelNode.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31.  * @author Chris Bizer <chris@bizer.de>
    32. -
    33.  * @package model
    34. -
    35.  * @abstract
    36. -
    37.  *
    38. -
    39.  */
    40. -
    41.  class Node extends Object {
    42. -
    43.  // end:RDFNode
    44. -
    45.  
    46. -
    47.  
    48. -
    49. ?>
    50. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelResource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelResource.php.html deleted file mode 100755 index 04a03767..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelResource.php.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - File Source for Resource.php - - - - - -

    Source for file Resource.php

    -

    Documentation is available at Resource.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'model/Node.php';
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: Resource
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF resource.
    18. -
    19.  * Every RDF resource must have a URIref.
    20. -
    21.  * URIrefs are treated as logical constants, i.e. as names which denote something
    22. -
    23.  * (the things are called 'resources', but no assumptions are made about the nature of resources.)
    24. -
    25.  * Many RDF resources are pieces of vocabulary. They typically have a namespace
    26. -
    27.  * and a local name. In this case, a URI is composed as a
    28. -
    29.  * concatenation of the namespace and the local name.
    30. -
    31.  *
    32. -
    33.  *
    34. -
    35.  * @version  $Id: fsource_model__modelResource.php.html 443 2007-06-01 16:25:38Z cax $
    36. -
    37.  * @author Chris Bizer <chris@bizer.de>
    38. -
    39.  *
    40. -
    41.  * @package model
    42. -
    43.  * @access    public
    44. -
    45.  *
    46. -
    47.  */
    48. -
    49.  class Resource extends Node {
    50. -
    51.  
    52. -
    53.      /**
    54. -
    55.     * URIref to the resource
    56. -
    57.     * @var        string 
    58. -
    59.     * @access    private
    60. -
    61.     */
    62. -
    63.     var $uri;
    64. -
    65.  
    66. -
    67.  
    68. -
    69.    /**
    70. -
    71.     * Constructor
    72. -
    73.     * Takes an URI or a namespace/localname combination
    74. -
    75.     *
    76. -
    77.     * @param    string    $namespace_or_uri 
    78. -
    79.      * @param string $localName 
    80. -
    81.     * @access    public
    82. -
    83.     */
    84. -
    85.     function Resource($namespace_or_uri $localName NULL{
    86. -
    87.         if ($localName == NULL{
    88. -
    89.             $this->uri $namespace_or_uri;
    90. -
    91.           else {
    92. -
    93.             $this->uri $namespace_or_uri $localName;
    94. -
    95.           }
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.  
    102. -
    103.   /**
    104. -
    105.    * Returns the URI of the resource.
    106. -
    107.    * @return string 
    108. -
    109.    * @access    public
    110. -
    111.    */
    112. -
    113.   function getURI({
    114. -
    115.               return $this->uri;
    116. -
    117.    }
    118. -
    119.  
    120. -
    121.     /**
    122. -
    123.      * Returns the label of the resource, which is the URI of the resource.
    124. -
    125.      * @access    public
    126. -
    127.      * @return string 
    128. -
    129.      */
    130. -
    131.     function getLabel({
    132. -
    133.         return $this->getURI();
    134. -
    135.     }
    136. -
    137.  
    138. -
    139.   /**
    140. -
    141.    * Returns the namespace of the resource. May return null.
    142. -
    143.    * @access    public
    144. -
    145.    * @return string 
    146. -
    147.    */
    148. -
    149.   function getNamespace({
    150. -
    151.       // Import Package Utility
    152. -
    153.        include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    154. -
    155.  
    156. -
    157.        return RDFUtil::guessNamespace($this->uri);
    158. -
    159.   }
    160. -
    161.  
    162. -
    163.   /**
    164. -
    165.    * Returns the local name of the resource.
    166. -
    167.    * @access    public
    168. -
    169.    * @return string 
    170. -
    171.    */
    172. -
    173.     function getLocalName({
    174. -
    175.         // Import Package Utility
    176. -
    177.            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    178. -
    179.  
    180. -
    181.         return RDFUtil::guessName($this->uri);
    182. -
    183.       }
    184. -
    185.  
    186. -
    187.   /**
    188. -
    189.    * Dumps resource.
    190. -
    191.    * @access    public
    192. -
    193.    * @return string 
    194. -
    195.    */
    196. -
    197.   function toString({
    198. -
    199.     return 'Resource("' $this->uri .'")';
    200. -
    201.   }
    202. -
    203.  
    204. -
    205.   /**
    206. -
    207.    * Checks if the resource equals another resource.
    208. -
    209.    * Two resources are equal, if they have the same URI
    210. -
    211.    *
    212. -
    213.    * @access    public
    214. -
    215.    * @param        object    resource $that 
    216. -
    217.    * @return    boolean 
    218. -
    219.    */
    220. -
    221.    function equals ($that{
    222. -
    223.  
    224. -
    225.         if ($this == $that{
    226. -
    227.           return true;
    228. -
    229.         }
    230. -
    231.  
    232. -
    233.         if (($that == NULLor !(is_a($that'Resource')) or (is_a($that'BlankNode'))) {
    234. -
    235.           return false;
    236. -
    237.         }
    238. -
    239.  
    240. -
    241.         if ($this->getURI(== $that->getURI()) {
    242. -
    243.           return true;
    244. -
    245.         }
    246. -
    247.  
    248. -
    249.         return false;
    250. -
    251.     }
    252. -
    253.  
    254. -
    255.  
    256. -
    257. }
    258. -
    259.  
    260. -
    261. ?>
    262. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelStatement.php.html deleted file mode 100755 index 18c51dfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__modelStatement.php.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - File Source for Statement.php - - - - - -

    Source for file Statement.php

    -

    Documentation is available at Statement.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Statement
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * An RDF statement.
    16. -
    17.  * In this implementation, a statement is not itself a resource.
    18. -
    19.  * If you want to use a a statement as subject or object of other statements,
    20. -
    21.  * you have to reify it first.
    22. -
    23.  *  
    24. -
    25.  * @author Chris Bizer <chris@bizer.de>
    26. -
    27.  * @version  $Id: fsource_model__modelStatement.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29.  * @package model
    30. -
    31.  */
    32. -
    33. class Statement extends Object {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Subject of the statement
    40. -
    41.     *
    42. -
    43.     * @var        object resource 
    44. -
    45.     * @access    private
    46. -
    47.     */    
    48. -
    49.      var $subj;
    50. -
    51.  
    52. -
    53.     /**
    54. -
    55.     * Predicate of the statement
    56. -
    57.     *
    58. -
    59.     * @var        object resource 
    60. -
    61.     * @access    private
    62. -
    63.     */        
    64. -
    65.     var $pred;
    66. -
    67.     
    68. -
    69.       /**
    70. -
    71.     * Object of the statement
    72. -
    73.     *
    74. -
    75.     * @var        object node 
    76. -
    77.     * @access    private
    78. -
    79.     */        
    80. -
    81.     var $obj;
    82. -
    83.  
    84. -
    85.   /**
    86. -
    87.    * The parameters to constructor are instances of classes and not just strings
    88. -
    89.    *
    90. -
    91.    * @param    object    node $subj 
    92. -
    93.    * @param    object    node $pred 
    94. -
    95.    * @param    object    node $obj 
    96. -
    97.     * @throws    PhpError
    98. -
    99.    */
    100. -
    101.   function Statement($subj$pred$obj{
    102. -
    103.  
    104. -
    105.     if (!is_a($subj'Resource')) {
    106. -
    107.         $errmsg RDFAPI_ERROR 
    108. -
    109.                   '(class: Statement; method: new): Resource expected as subject.';
    110. -
    111.         trigger_error($errmsgE_USER_ERROR)
    112. -
    113.     }
    114. -
    115.     if (!is_a($pred'Resource'|| is_a($pred'BlankNode')) {
    116. -
    117.         $errmsg RDFAPI_ERROR 
    118. -
    119.                   '(class: Statement; method: new): Resource expected as predicate, no blank node allowed.';
    120. -
    121.         trigger_error($errmsgE_USER_ERROR)
    122. -
    123.     }
    124. -
    125.     if (!(is_a($obj'Resource'or is_a($obj'Literal'))) {
    126. -
    127.         $errmsg RDFAPI_ERROR 
    128. -
    129.                   '(class: Statement; method: new): Resource or Literal expected as object.';
    130. -
    131.         trigger_error($errmsgE_USER_ERROR)
    132. -
    133.     }
    134. -
    135.         
    136. -
    137.     $this->pred $pred;
    138. -
    139.     $this->subj $subj;
    140. -
    141.     $this->obj $obj;
    142. -
    143.   }
    144. -
    145.  
    146. -
    147.   /**
    148. -
    149.    * Returns the subject of the triple.
    150. -
    151.    * @access    public
    152. -
    153.    * @return    object node 
    154. -
    155.    */
    156. -
    157.   function getSubject({
    158. -
    159.     return $this->subj;
    160. -
    161.   }
    162. -
    163.  
    164. -
    165.   /**
    166. -
    167.    * Returns the predicate of the triple.
    168. -
    169.    * @access    public
    170. -
    171.    * @return    object node 
    172. -
    173.    */
    174. -
    175.     function getPredicate({
    176. -
    177.     return $this->pred;
    178. -
    179.   }
    180. -
    181.  
    182. -
    183.   /**
    184. -
    185.    * Returns the object of the triple.
    186. -
    187.    * @access    public
    188. -
    189.    * @return    object node 
    190. -
    191.    */
    192. -
    193.    function getObject({
    194. -
    195.      return $this->obj;
    196. -
    197.    }
    198. -
    199.   
    200. -
    201.   /**
    202. -
    203.    * Alias for getSubject()
    204. -
    205.    * @access    public
    206. -
    207.    * @return    object node 
    208. -
    209.    */
    210. -
    211.   function subject({
    212. -
    213.     return $this->subj;
    214. -
    215.   }
    216. -
    217.  
    218. -
    219.   /**
    220. -
    221.    * Alias for getPredicate()
    222. -
    223.    * @access    public
    224. -
    225.    * @return    object node 
    226. -
    227.    */
    228. -
    229.     function predicate({
    230. -
    231.     return $this->pred;
    232. -
    233.   }
    234. -
    235.  
    236. -
    237.   /**
    238. -
    239.    * Alias for getObject()
    240. -
    241.    * @access    public
    242. -
    243.    * @return object node 
    244. -
    245.    */
    246. -
    247.    function object({
    248. -
    249.      return $this->obj;
    250. -
    251.    }
    252. -
    253.     /**
    254. -
    255.    * Retruns the hash code of the triple.
    256. -
    257.    * @access    public
    258. -
    259.    * @return string 
    260. -
    261.    */
    262. -
    263.    function hashCode()  {
    264. -
    265.       return md5($this->subj->getLabel($this->pred->getLabel()  $this->obj->getLabel());
    266. -
    267.    }
    268. -
    269.  
    270. -
    271.   /**
    272. -
    273.    * Dumps the triple.
    274. -
    275.    * @access    public
    276. -
    277.    * @return string 
    278. -
    279.    */  
    280. -
    281.  
    282. -
    283.   function toString(
    284. -
    285.     return  'Triple(' $this->subj->toString(', ' $this->pred->toString(', ' $this->obj->toString(')';
    286. -
    287.     
    288. -
    289.   }
    290. -
    291.  
    292. -
    293.   /**
    294. -
    295.    * Returns a toString() serialization of the statements's subject.
    296. -
    297.    *
    298. -
    299.    * @access    public
    300. -
    301.    * @return    string 
    302. -
    303.    */  
    304. -
    305.    function toStringSubject({
    306. -
    307.        return $this->subj->toString();
    308. -
    309.    }
    310. -
    311.  
    312. -
    313.   /**
    314. -
    315.    * Returns a toString() serialization of the statements's predicate.
    316. -
    317.    *
    318. -
    319.    * @access    public
    320. -
    321.    * @return    string 
    322. -
    323.    */  
    324. -
    325.    function toStringPredicate({
    326. -
    327.        return $this->pred->toString();
    328. -
    329.    }
    330. -
    331.  
    332. -
    333.   /**
    334. -
    335.    * Reurns a toString() serialization of the statements's object.
    336. -
    337.    *
    338. -
    339.    * @access    public
    340. -
    341.    * @return    string 
    342. -
    343.    */  
    344. -
    345.    function toStringObject({
    346. -
    347.        return $this->obj->toString();
    348. -
    349.    }
    350. -
    351.  
    352. -
    353.   /**
    354. -
    355.    * Returns the URI or bNode identifier of the statements's subject.
    356. -
    357.    *
    358. -
    359.    * @access    public
    360. -
    361.    * @return    string 
    362. -
    363.    */  
    364. -
    365.    function getLabelSubject({
    366. -
    367.        return $this->subj->getLabel();
    368. -
    369.    }
    370. -
    371.  
    372. -
    373.   /**
    374. -
    375.    * Returns the URI of the statements's predicate.
    376. -
    377.    *
    378. -
    379.    * @access    public
    380. -
    381.    * @return    string 
    382. -
    383.    */  
    384. -
    385.    function getLabelPredicate({
    386. -
    387.        return $this->pred->getLabel();
    388. -
    389.    }
    390. -
    391.  
    392. -
    393.   /**
    394. -
    395.    * Reurns the URI, text or bNode identifier of the statements's object.
    396. -
    397.    *
    398. -
    399.    * @access    public
    400. -
    401.    * @return    string 
    402. -
    403.    */  
    404. -
    405.    function getLabelObject({
    406. -
    407.        return $this->obj->getLabel();
    408. -
    409.    }
    410. -
    411.   
    412. -
    413.   /**
    414. -
    415.    * Checks if two statements are equal.
    416. -
    417.    * Two statements are considered to be equal if they have the
    418. -
    419.    * same subject, predicate and object. A statement can only be equal
    420. -
    421.    * to another statement object.
    422. -
    423.    * @access    public
    424. -
    425.    * @param        object    statement $that 
    426. -
    427.    * @return    boolean 
    428. -
    429.    */  
    430. -
    431.  
    432. -
    433.   function equals ($that{
    434. -
    435.     
    436. -
    437.         if ($this == $that{
    438. -
    439.           return true;
    440. -
    441.         }
    442. -
    443.         if ($that == NULL || !(is_a($that'Statement'))) {
    444. -
    445.           return false;
    446. -
    447.         }
    448. -
    449.   
    450. -
    451.         return
    452. -
    453.         $this->subj->equals($that->subject()) &&
    454. -
    455.         $this->pred->equals($that->predicate()) &&
    456. -
    457.         $this->obj->equals($that->object());
    458. -
    459.       }
    460. -
    461.  
    462. -
    463.   /**
    464. -
    465.    * Compares two statements and returns integer less than, equal to, or greater than zero.
    466. -
    467.    * Can be used for writing sorting function for models or with the PHP function usort().
    468. -
    469.    *
    470. -
    471.    * @access    public
    472. -
    473.    * @param        object    statement &$that 
    474. -
    475.    * @return    boolean 
    476. -
    477.    */  
    478. -
    479.  
    480. -
    481.   function compare(&$that{
    482. -
    483.       return statementsorter($this$that);
    484. -
    485.       // statementsorter function see below
    486. -
    487.   
    488. -
    489.       
    490. -
    491.       
    492. -
    493.   /**
    494. -
    495.    * Reifies a statement.
    496. -
    497.    * Returns a new MemModel that is the reification of the statement.
    498. -
    499.    * For naming the statement's bNode a Model or bNodeID must be passed to the method.
    500. -
    501.    *
    502. -
    503.    * @access    public
    504. -
    505.    * @param        mixed    &$model_or_bNodeID 
    506. -
    507.    * @return    object    model 
    508. -
    509.    */  
    510. -
    511.  
    512. -
    513.   function reify(&$model_or_bNodeID{
    514. -
    515.         
    516. -
    517.         if (is_a($model_or_bNodeID'MemModel')) {
    518. -
    519.             // parameter is model
    520. -
    521.             $statementModel new MemModel($model_or_bNodeID->getBaseURI());
    522. -
    523.             $thisStatement new BlankNode($model_or_bNodeID);
    524. -
    525.         else {
    526. -
    527.             // parameter is bNodeID
    528. -
    529.             $statementModel new MemModel();
    530. -
    531.             $thisStatement &$model_or_bNodeID;
    532. -
    533.         
    534. -
    535.         
    536. -
    537.         $RDFstatement new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    538. -
    539.         $RDFtype new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    540. -
    541.         $RDFsubject new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    542. -
    543.         $RDFpredicate new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    544. -
    545.         $RDFobject new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    546. -
    547.         
    548. -
    549.         $statementModel->add(new Statement($thisStatement$RDFtype$RDFstatement));
    550. -
    551.         $statementModel->add(new Statement($thisStatement$RDFsubject$this->getSubject()));
    552. -
    553.         $statementModel->add(new Statement($thisStatement$RDFpredicate$this->getPredicate()));
    554. -
    555.         $statementModel->add(new Statement($thisStatement$RDFobject$this->Object()));
    556. -
    557.         
    558. -
    559.         return $statementModel;
    560. -
    561.   }
    562. -
    563.   
    564. -
    565. // end: Statement
    566. -
    567.  
    568. -
    569.  
    570. -
    571. /**
    572. -
    573. * Comparison function for comparing two statements.
    574. -
    575. * statementsorter() is used by the PHP function usort ( array array, callback cmp_function)
    576. -
    577. *
    578. -
    579. @access    private
    580. -
    581. @param        object Statement    $a 
    582. -
    583. @param        object Statement    $b 
    584. -
    585. @return    integer less than, equal to, or greater than zero
    586. -
    587. @throws phpErrpr
    588. -
    589. */  
    590. -
    591. function statementsorter($a,$b{
    592. -
    593.       //Compare subjects
    594. -
    595.       $x=$a->getSubject();
    596. -
    597.       $y=$b->getSubject();
    598. -
    599.       $r=strcmp($x->getLabel(),$y->getLabel());
    600. -
    601.       if ($r!=0return $r;
    602. -
    603.       //Compare predicates
    604. -
    605.       $x=$a->getPredicate();
    606. -
    607.       $y=$b->getPredicate();
    608. -
    609.       $r=strcmp($x->getURI(),$y->getURI());
    610. -
    611.       if ($r!=0return $r;
    612. -
    613.       //Final resort, compare objects
    614. -
    615.       $x=$a->getObject();
    616. -
    617.       $y=$b->getObject();
    618. -
    619.       return strcmp($x->toString(),$y->toString());
    620. -
    621. }
    622. -
    623.     
    624. -
    625. ?>
    626. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__sparqlSPARQL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__sparqlSPARQL.php.html deleted file mode 100755 index 1010b022..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_model__sparqlSPARQL.php.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - File Source for SPARQL.php - - - - -

    Source for file SPARQL.php

    -

    Documentation is available at SPARQL.php

    -
    -
    1. <?PHP
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // SPARQL
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. //
    10. -
    11. // Description               : Sparql package
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15.  
    16. -
    17.  
    18. -
    19. // include SPARQL classes
    20. -
    21. require_onceRDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php' );
    22. -
    23. require_onceRDFAPI_INCLUDE_DIR 'sparql/Constraint.php' );
    24. -
    25. require_onceRDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php' );
    26. -
    27. require_onceRDFAPI_INCLUDE_DIR 'sparql/Query.php' );
    28. -
    29. require_onceRDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php' );
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php' );
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlParser.php' );
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php' );
    36. -
    37.  
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:26:13 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelIndividual.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelIndividual.php.html deleted file mode 100755 index 612f7f8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelIndividual.php.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - File Source for Individual.php - - - - - -

    Source for file Individual.php

    -

    Documentation is available at Individual.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: Individual
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Interface that encapsulates an individual in an ontology, sometimes referred
    18. -
    19. * to as a fact or assertion.
    20. -
    21. * In order to be recognised as an individual, rather than a generic resource,
    22. -
    23. * at least one rdf:type statement, referring to a known class, must be present
    24. -
    25. * in the model.
    26. -
    27. *
    28. -
    29.  
    30. -
    31. @version  $Id: fsource_ontModel__ontModelIndividual.php.html 443 2007-06-01 16:25:38Z cax $
    32. -
    33. @author Daniel Westphal <mail at d-westphal dot de>
    34. -
    35. *
    36. -
    37. *
    38. -
    39. @package     ontModel
    40. -
    41. @access    public
    42. -
    43. ***/    
    44. -
    45.  
    46. -
    47. class Individual extends OntResource   
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Constructor
    56. -
    57.     * You can supply a uri
    58. -
    59.     *
    60. -
    61.     * @param string $uri 
    62. -
    63.     * @access    public
    64. -
    65.     */        
    66. -
    67.     function Individual($uri null)
    68. -
    69.     {
    70. -
    71.         parent::OntResource($uri);
    72. -
    73.     }
    74. -
    75. -
    76. ?>
    77. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOWLVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOWLVocabulary.php.html deleted file mode 100755 index 99588bce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOWLVocabulary.php.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - File Source for OWLVocabulary.php - - - - - -

    Source for file OWLVocabulary.php

    -

    Documentation is available at OWLVocabulary.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OWLVocabulary
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * OWL vocabulary items
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_ontModel__ontModelOWLVocabulary.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @package     ontModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class OWLVocabulary extends OntVocabulary 
    34. -
    35. {
    36. -
    37.  
    38. -
    39.     /**
    40. -
    41.     * Answer the resource that represents the class 'class' in this vocabulary.
    42. -
    43.     *
    44. -
    45.        * @return    object ResResource 
    46. -
    47.        * @access    public
    48. -
    49.        */
    50. -
    51.     function ONTCLASS()
    52. -
    53.     {
    54. -
    55.         return new ResResource(OWL_NS.'Class');    
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     * Answer the predicate that denotes the domain of a property.
    64. -
    65.     *
    66. -
    67.        * @return    object ResProperty 
    68. -
    69.        * @access    public
    70. -
    71.        */
    72. -
    73.     function DOMAIN()
    74. -
    75.     {
    76. -
    77.         return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);    
    78. -
    79.     }
    80. -
    81.     
    82. -
    83.      
    84. -
    85.      /**
    86. -
    87.     * Answer the predicate that denotes comment annotation on an ontology element.
    88. -
    89.     *
    90. -
    91.        * @return    object ResProperty 
    92. -
    93.        * @access    public
    94. -
    95.        */
    96. -
    97.     function COMMENT()
    98. -
    99.     {
    100. -
    101.         return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);    
    102. -
    103.     }
    104. -
    105.     
    106. -
    107.      /**
    108. -
    109.     * Answer the predicate that denotes isDefinedBy annotation on an ontology element
    110. -
    111.     *
    112. -
    113.        * @return    object ResProperty 
    114. -
    115.        * @access    public
    116. -
    117.        */
    118. -
    119.     function IS_DEFINED_BY()
    120. -
    121.     {
    122. -
    123.         return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Answer the predicate that denotes label annotation on an ontology element
    132. -
    133.     *
    134. -
    135.        * @return    object ResProperty 
    136. -
    137.        * @access    public
    138. -
    139.        */
    140. -
    141.     function LABEL()
    142. -
    143.     {
    144. -
    145.         return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
    146. -
    147.     }
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * Answer the predicate that denotes the domain of a property.
    154. -
    155.     *
    156. -
    157.        * @return    object ResProperty 
    158. -
    159.        * @access    public
    160. -
    161.        */
    162. -
    163.     function RANGE()
    164. -
    165.     {
    166. -
    167.         return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
    168. -
    169.     }
    170. -
    171.     
    172. -
    173.     /**
    174. -
    175.     * Answer the predicate that denotes seeAlso annotation on an ontology element
    176. -
    177.     *
    178. -
    179.        * @return    object ResProperty 
    180. -
    181.        * @access    public
    182. -
    183.        */
    184. -
    185.     function SEE_ALSO()
    186. -
    187.     {
    188. -
    189.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
    190. -
    191.     }
    192. -
    193.     
    194. -
    195.     /**
    196. -
    197.     * Answer the predicate that denotes that one class is a sub-class of another.
    198. -
    199.     *
    200. -
    201.        * @return    object ResProperty 
    202. -
    203.        * @access    public
    204. -
    205.        */
    206. -
    207.     function SUB_CLASS_OF()
    208. -
    209.     {
    210. -
    211.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
    212. -
    213.     }
    214. -
    215.     
    216. -
    217.     /**
    218. -
    219.     * Answer the predicate that denotes that one property is a sub-property of another.
    220. -
    221.     *
    222. -
    223.        * @return    object ResProperty 
    224. -
    225.        * @access    public
    226. -
    227.        */
    228. -
    229.     function SUB_PROPERTY_OF()
    230. -
    231.     {
    232. -
    233.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
    234. -
    235.     }
    236. -
    237.     
    238. -
    239.     
    240. -
    241.     
    242. -
    243.     function ANNOTATION_PROPERTY()
    244. -
    245.     {
    246. -
    247.         return new ResProperty(OWL_NS 'AnnotationProperty');    
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function ALL_DIFFERENT()
    254. -
    255.     {
    256. -
    257.         return new ResProperty(OWL_NS 'AllDifferent');    
    258. -
    259.     }
    260. -
    261.     
    262. -
    263.     function ALL_VALUES_FROM()
    264. -
    265.     {
    266. -
    267.         return new ResProperty(OWL_NS 'allValuesFrom');
    268. -
    269.     }
    270. -
    271.  
    272. -
    273.     function BACKWARD_COMPATIBLE_WITH()
    274. -
    275.     {
    276. -
    277.         return new ResProperty(OWL_NS 'backwardCompatibleWith');
    278. -
    279.     }
    280. -
    281.     
    282. -
    283.     function CARDINALITY()
    284. -
    285.     {
    286. -
    287.         return new ResProperty(OWL_NS 'cardinality');
    288. -
    289.     }
    290. -
    291.  
    292. -
    293.     function COMPLEMENT_OF()
    294. -
    295.     {
    296. -
    297.         return new ResProperty(OWL_NS 'complementOf');
    298. -
    299.     }
    300. -
    301.     
    302. -
    303.     function DATATYPE()
    304. -
    305.     {
    306. -
    307.         return new ResProperty(OWL_NS 'Datatype');
    308. -
    309.     }
    310. -
    311.     
    312. -
    313.     function DATATYPE_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return new ResProperty(OWL_NS 'DatatypeProperty');
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATA_RANGE()
    324. -
    325.     {
    326. -
    327.         return new ResProperty(OWL_NS 'DataRange');
    328. -
    329.     }
    330. -
    331.  
    332. -
    333.     function DATATYPE_RESTRICTION()
    334. -
    335.     {
    336. -
    337.         return new ResProperty(OWL_NS 'DatatypeRestriction');
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.     function DEPRECATED_CLASS()
    344. -
    345.     {
    346. -
    347.         return new ResProperty(OWL_NS 'DeprecatedClass');
    348. -
    349.     }
    350. -
    351.  
    352. -
    353.     function DEPRECATED_PROPERTY()
    354. -
    355.     {
    356. -
    357.         return new ResProperty(OWL_NS 'DeprecatedProperty');
    358. -
    359.     }
    360. -
    361.  
    362. -
    363.     function DISTINCT_MEMBERS()
    364. -
    365.     {
    366. -
    367.         return new ResProperty(OWL_NS 'distinctMembers');
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function DIFFERENT_FROM()
    374. -
    375.     {
    376. -
    377.         return new ResProperty(OWL_NS 'differentFrom');
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function DISJOINT_WITH()
    384. -
    385.     {
    386. -
    387.         return new ResProperty(OWL_NS 'disjointWith');
    388. -
    389.     }
    390. -
    391.  
    392. -
    393.     function EQUIVALENT_CLASS()
    394. -
    395.     {
    396. -
    397.         return new ResProperty(OWL_NS 'equivalentClass');
    398. -
    399.     }
    400. -
    401.  
    402. -
    403.     function EQUIVALENT_PROPERTY()
    404. -
    405.     {
    406. -
    407.         return new ResProperty(OWL_NS 'equivalentProperty');
    408. -
    409.     }
    410. -
    411.  
    412. -
    413.     function FUNCTIONAL_PROPERTY()
    414. -
    415.     {
    416. -
    417.         return new ResProperty(OWL_NS 'FunctionalProperty');
    418. -
    419.     }
    420. -
    421.  
    422. -
    423.     function HAS_VALUE()
    424. -
    425.     {
    426. -
    427.         return new ResProperty(OWL_NS 'hasValue');
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function INCOMPATIBLE_WITH()
    434. -
    435.     {
    436. -
    437.         return new ResProperty(OWL_NS 'incompatibleWith');
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IMPORTS()
    444. -
    445.     {
    446. -
    447.         return new ResProperty(OWL_NS 'imports');
    448. -
    449.     }
    450. -
    451.  
    452. -
    453.     function INTERSECTION_OF()
    454. -
    455.     {
    456. -
    457.         return new ResProperty(OWL_NS 'intersectionOf');
    458. -
    459.     }
    460. -
    461.  
    462. -
    463.     function INVERSE_FUNCTIONAL_PROPERTY()
    464. -
    465.     {
    466. -
    467.         return new ResProperty(OWL_NS 'InverseFunctionalProperty');
    468. -
    469.     }
    470. -
    471.  
    472. -
    473.     function INVERSE_OF()
    474. -
    475.     {
    476. -
    477.         return new ResProperty(OWL_NS 'inverseOf');
    478. -
    479.     }
    480. -
    481.  
    482. -
    483.     function MAX_CARDINALITY()
    484. -
    485.     {
    486. -
    487.         return new ResProperty(OWL_NS 'maxCardinality');
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function MIN_CARDINALITY()
    494. -
    495.     {
    496. -
    497.         return new ResProperty(OWL_NS 'minCardinality');
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function NOTHING()
    504. -
    505.     {
    506. -
    507.         return new ResProperty(OWL_NS 'Nothing');
    508. -
    509.     }
    510. -
    511.  
    512. -
    513.     function OBJECT_CLASS()
    514. -
    515.     {
    516. -
    517.         return new ResProperty(OWL_NS 'ObjectClass');
    518. -
    519.     }
    520. -
    521.  
    522. -
    523.     function OBJECT_PROPERTY()
    524. -
    525.     {
    526. -
    527.         return new ResProperty(OWL_NS 'ObjectProperty');
    528. -
    529.     }
    530. -
    531.  
    532. -
    533.     function OBJECT_RESTRICTION()
    534. -
    535.     {
    536. -
    537.         return new ResProperty(OWL_NS 'ObjectRestriction');
    538. -
    539.     }
    540. -
    541.  
    542. -
    543.     function ONE_OF()
    544. -
    545.     {
    546. -
    547.         return new ResProperty(OWL_NS 'oneOf');
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function ON_PROPERTY()
    554. -
    555.     {
    556. -
    557.         return new ResProperty(OWL_NS 'onProperty');
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function ONTOLOGY()
    564. -
    565.     {
    566. -
    567.         return new ResProperty(OWL_NS 'Ontology');
    568. -
    569.         
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function PRIOR_VERSION()
    576. -
    577.     {
    578. -
    579.         return new ResProperty(OWL_NS 'priorVersion');
    580. -
    581.     }
    582. -
    583.  
    584. -
    585.     function PROPERTY()
    586. -
    587.     {
    588. -
    589.         return new ResProperty(OWL_NS 'Property');
    590. -
    591.     }
    592. -
    593.  
    594. -
    595.     function RESTRICTION()
    596. -
    597.     {
    598. -
    599.         return new ResProperty(OWL_NS 'Restriction');
    600. -
    601.     }
    602. -
    603.  
    604. -
    605.     function SAME_AS()
    606. -
    607.     {
    608. -
    609.         return new ResProperty(OWL_NS 'sameAs');
    610. -
    611.     }
    612. -
    613.  
    614. -
    615.     function SAME_CLASS_AS()
    616. -
    617.     {
    618. -
    619.         return new ResProperty(OWL_NS 'sameClassAs');
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     function SAME_INDIVIDUAL_AS()
    626. -
    627.     {
    628. -
    629.         return new ResProperty(OWL_NS 'sameIndividualAs');
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     function SAME_PROPERTY_AS()
    636. -
    637.     {
    638. -
    639.         return new ResProperty(OWL_NS 'samePropertyAs');
    640. -
    641.     }
    642. -
    643.  
    644. -
    645.     function SOME_VALUES_FROM()
    646. -
    647.     {
    648. -
    649.         return new ResProperty(OWL_NS 'someValuesFrom');
    650. -
    651.     }
    652. -
    653.  
    654. -
    655.     function SYMMETRIC_PROPERTY()
    656. -
    657.     {
    658. -
    659.         return new ResProperty(OWL_NS 'SymmetricProperty');
    660. -
    661.     }
    662. -
    663.  
    664. -
    665.     function THING()
    666. -
    667.     {
    668. -
    669.         return new ResProperty(OWL_NS 'Thing');
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function TRANSITIVE_PROPERTY()
    676. -
    677.     {
    678. -
    679.         return new ResProperty(OWL_NS 'TransitiveProperty');
    680. -
    681.     }
    682. -
    683.  
    684. -
    685.     function UNION_OF()
    686. -
    687.     {
    688. -
    689.         return new ResProperty(OWL_NS 'unionOf');
    690. -
    691.     }
    692. -
    693.  
    694. -
    695.     function VERSION_INFO()
    696. -
    697.     {
    698. -
    699.         return new ResProperty(OWL_NS 'versionInfo');
    700. -
    701.     }
    702. -
    703.  
    704. -
    705.     function NAMESPACE()
    706. -
    707.     {
    708. -
    709.         return OWL_NS;
    710. -
    711.     }
    712. -
    713.  
    714. -
    715.     /**
    716. -
    717.     * Answer the predicate that denotes the rdf:type property.
    718. -
    719.     *
    720. -
    721.        * @return    object ResProperty 
    722. -
    723.        * @access    public
    724. -
    725.        */
    726. -
    727.     function TYPE()
    728. -
    729.     {
    730. -
    731.         return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
    732. -
    733.     }
    734. -
    735. -
    736. ?>
    737. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntClass.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntClass.php.html deleted file mode 100755 index 6acc9828..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntClass.php.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - File Source for OntClass.php - - - - - -

    Source for file OntClass.php

    -

    Documentation is available at OntClass.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntClass
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Class that represents an ontology node characterising a class description.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_ontModel__ontModelOntClass.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class OntClass extends OntResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Constructor
    42. -
    43.     * You can supply a uri
    44. -
    45.     *
    46. -
    47.     * @param string $uri 
    48. -
    49.     * @access    public
    50. -
    51.     */        
    52. -
    53.     function OntClass($uri null)
    54. -
    55.     {
    56. -
    57.         parent::OntResource($uri);
    58. -
    59.     }
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Add a sub-class of this class.
    66. -
    67.     *
    68. -
    69.        * @param    object ResResource        $resResource 
    70. -
    71.        * @return    boolean 
    72. -
    73.        * @access    public
    74. -
    75.        */
    76. -
    77.     function addSubClass($resResource)
    78. -
    79.     {
    80. -
    81.         return $resResource->addProperty($this->vocabulary->SUB_CLASS_OF(),$this);
    82. -
    83.     }
    84. -
    85.     
    86. -
    87.     /**
    88. -
    89.     * Add a super-class of this class.
    90. -
    91.     *
    92. -
    93.        * @param    object ResResource        $resResource 
    94. -
    95.        * @return    boolean 
    96. -
    97.        * @access    public
    98. -
    99.        */
    100. -
    101.     function addSuperClass($resResource)
    102. -
    103.     {
    104. -
    105.         return $this->addProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    106. -
    107.     }
    108. -
    109.     
    110. -
    111.     /**
    112. -
    113.     * Answer a class that is the sub-class of this class.
    114. -
    115.     * If there is more than one such class, an arbitrary selection is made.
    116. -
    117.     *
    118. -
    119.        * @return    object OntClass or NULL
    120. -
    121.        * @access    public
    122. -
    123.        */
    124. -
    125.     function getSubClass()
    126. -
    127.     {
    128. -
    129.         $statement $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_CLASS_OF(),$this);
    130. -
    131.         if ($statement !== null)
    132. -
    133.             return $this->model->createOntClass($statement->getLabelSubject());
    134. -
    135.         
    136. -
    137.         return null;
    138. -
    139.     }
    140. -
    141.     
    142. -
    143.     /**
    144. -
    145.     * Answer a class that is the super-class of this class.
    146. -
    147.     * If there is more than one such class, an arbitrary selection is made.
    148. -
    149.     *
    150. -
    151.        * @return    object OntClass or NULL
    152. -
    153.        * @access    public
    154. -
    155.        */
    156. -
    157.     function getSuperClass()
    158. -
    159.     {
    160. -
    161.         return $this->getPropertyValue($this->vocabulary->SUB_CLASS_OF(),'OntClass');
    162. -
    163.     }
    164. -
    165.     
    166. -
    167.     /**
    168. -
    169.     * Answer true if the given class is a sub-class of this class.
    170. -
    171.     * $direct - If true, only search the classes that are directly
    172. -
    173.     * adjacent to this class in the class hierarchy.
    174. -
    175.     *
    176. -
    177.        * @param    object ResResource        $resResource 
    178. -
    179.       * @param    boolean            $direct 
    180. -
    181.        * @return    boolean 
    182. -
    183.        * @access    public
    184. -
    185.        */
    186. -
    187.     function hasSubclass($resResource$direct true)
    188. -
    189.     {
    190. -
    191.         if ($direct)
    192. -
    193.             return $resResource->hasProperty($this->vocabulary->SUB_CLASS_OF(),$this);
    194. -
    195.         
    196. -
    197.         $index=array();
    198. -
    199.         return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource=== true);
    200. -
    201.     }
    202. -
    203.     
    204. -
    205.     /**
    206. -
    207.     * Answer true if the given class is a super-class of this class.
    208. -
    209.     * $direct - If true, only search the classes that are directly
    210. -
    211.     * adjacent to this class in the class hierarchy.
    212. -
    213.     *
    214. -
    215.        * @param    object ResResource        $resResource 
    216. -
    217.       * @param    boolean            $direct 
    218. -
    219.        * @return    boolean 
    220. -
    221.        * @access    public
    222. -
    223.        */
    224. -
    225.     function hasSuperClass($resResource$direct true)
    226. -
    227.     {
    228. -
    229.         if ($direct)
    230. -
    231.             return $this->hasProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    232. -
    233.         
    234. -
    235.         $index=array();
    236. -
    237.         return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource=== true);
    238. -
    239.     }
    240. -
    241.     
    242. -
    243.     /**
    244. -
    245.     * Answer an ResIterator over the individuals in the model that have this class
    246. -
    247.     * among their types.
    248. -
    249.     *
    250. -
    251.        * @return    object ResIterator 
    252. -
    253.        * @access    public
    254. -
    255.        */
    256. -
    257.     function listInstances()
    258. -
    259.     {
    260. -
    261.         /*
    262. -
    263.         $statements= $this->model->find(null,$this->vocabulary->TYPE(),$this);
    264. -
    265.         $return = array();
    266. -
    267.         $returnIndex=array();
    268. -
    269.         foreach ($statements as $statement) 
    270. -
    271.         {
    272. -
    273.             $subjectLabel=$statement->getLabelSubject();
    274. -
    275.             if (!in_array($subjectLabel,$returnIndex))
    276. -
    277.             {
    278. -
    279.                 $returnIndex[]=$subjectLabel;
    280. -
    281.                 $return[]=$statement->getSubject();
    282. -
    283.             }    
    284. -
    285.         }    
    286. -
    287.         return $return;    
    288. -
    289.         */
    290. -
    291.         return new ResIterator(null,$this->vocabulary->TYPE(),$this,'s',$this->model,'Individual');
    292. -
    293.     
    294. -
    295.     }
    296. -
    297.     
    298. -
    299.     /**
    300. -
    301.     * Answer an array over the classes that are declared to be sub-classes of this class.
    302. -
    303.     * Each element of the array will be an OntClass.
    304. -
    305.     * $direct - If true, only search the classes that are directly
    306. -
    307.     * adjacent to this class in the class hierarchy.
    308. -
    309.     *
    310. -
    311.        * @param    boolean        $direct 
    312. -
    313.        * @return    array 
    314. -
    315.        * @access    public
    316. -
    317.        */
    318. -
    319.     function listSubClasses($direct true)
    320. -
    321.     {
    322. -
    323.         $return array();
    324. -
    325.         if ($direct)
    326. -
    327.         {
    328. -
    329.             $statements $this->model->find(null,$this->vocabulary->SUB_CLASS_OF(),$this);
    330. -
    331.         else 
    332. -
    333.         {
    334. -
    335.             $index array();
    336. -
    337.             $statements $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
    338. -
    339.         }
    340. -
    341.         
    342. -
    343.         $returnIndex=array();
    344. -
    345.         foreach ($statements as $statement
    346. -
    347.         {
    348. -
    349.             $subjectLabel=$statement->getLabelSubject();
    350. -
    351.             if (!in_array($subjectLabel,$returnIndex))
    352. -
    353.             {
    354. -
    355.                 $returnIndex[]=$subjectLabel;
    356. -
    357.                 $return[]=$this->model->createOntClass($subjectLabel);
    358. -
    359.             }    
    360. -
    361.         }    
    362. -
    363.         return $return;    
    364. -
    365.     }
    366. -
    367.     
    368. -
    369.     /**
    370. -
    371.     * Answer an array over the classes that are declared to be super-classes of this class.
    372. -
    373.     * Each element of the array will be an OntClass.
    374. -
    375.     * $direct - If true, only search the classes that are directly
    376. -
    377.     * adjacent to this class in the class hierarchy.
    378. -
    379.     *
    380. -
    381.        * @param    boolean        $direct 
    382. -
    383.        * @return    array 
    384. -
    385.        * @access    public
    386. -
    387.        */
    388. -
    389.     function listSuperClasses($direct true)
    390. -
    391.     {
    392. -
    393.         $return array();
    394. -
    395.         if ($direct)
    396. -
    397.             return $this->listProperty($this->vocabulary->SUB_CLASS_OF(),'OntClass');
    398. -
    399.             
    400. -
    401.         $index=array();    
    402. -
    403.         $statements $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
    404. -
    405.         $returnIndex=array();
    406. -
    407.         foreach ($statements as $statement
    408. -
    409.         {
    410. -
    411.             $objectLabel=$statement->getLabelObject();
    412. -
    413.             if (!in_array($objectLabel,$returnIndex))
    414. -
    415.             {
    416. -
    417.                 $returnIndex[]=$objectLabel;
    418. -
    419.                 $return[]=$this->model->createOntClass($objectLabel);
    420. -
    421.             }    
    422. -
    423.         }    
    424. -
    425.         return $return;    
    426. -
    427.     }
    428. -
    429.     
    430. -
    431.     /**
    432. -
    433.     * Remove the given class from the sub-classes of this class.
    434. -
    435.     *
    436. -
    437.        * @param    object ResResource    $resResource 
    438. -
    439.        * @return    boolean 
    440. -
    441.        * @access    public
    442. -
    443.        */
    444. -
    445.     function removeSubClass($resResource)
    446. -
    447.     {
    448. -
    449.         return    $this->model->remove(new Statement($resResource,$this->vocabulary->SUB_CLASS_OF(),$this));
    450. -
    451.     }
    452. -
    453.     
    454. -
    455.     /**
    456. -
    457.     * Remove the given class from the super-classes of this class.
    458. -
    459.     *
    460. -
    461.        * @param    object ResResource        $resResource 
    462. -
    463.        * @return    boolean 
    464. -
    465.        * @access    public
    466. -
    467.        */
    468. -
    469.     function removeSuperClass($resResource)
    470. -
    471.     {
    472. -
    473.         return $this->removeProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
    474. -
    475.     }
    476. -
    477.     
    478. -
    479.     /**
    480. -
    481.     * Assert that this class is super-class of the given class.
    482. -
    483.     * Any existing statements for subClassOf on prop will be removed.
    484. -
    485.     *
    486. -
    487.        * @param    object ResResource        $resResource 
    488. -
    489.        * @access    public
    490. -
    491.        */
    492. -
    493.     function setSubClass($resResource)
    494. -
    495.     {
    496. -
    497.         foreach ($this->listSubClasses(as $oldRes
    498. -
    499.         {
    500. -
    501.             $this->removeSubClass($oldRes);
    502. -
    503.         }
    504. -
    505.         $this->addSubClass($resResource);
    506. -
    507.     }
    508. -
    509.     
    510. -
    511.     /**
    512. -
    513.     * Assert that this class is sub-class of the given class.
    514. -
    515.     * Any existing statements for subClassOf on prop will be removed.
    516. -
    517.     *
    518. -
    519.        * @param    object ResResource        $resResource 
    520. -
    521.        * @access    public
    522. -
    523.        */
    524. -
    525.     function setSuperClass($resResource)
    526. -
    527.     {
    528. -
    529.         $this->setPropertyValue($this->vocabulary->SUB_CLASS_OF(),$resResource);
    530. -
    531.     }
    532. -
    533.     
    534. -
    535.     /**
    536. -
    537.     * Answer a resource that represents an instance of this OntClass and Individual
    538. -
    539.     * node in this model.
    540. -
    541.     * If a resource with the given uri exists in the model, it will be re-used.
    542. -
    543.     * If not, a new one is created in the updateable sub-model of the ontology model.
    544. -
    545.     *
    546. -
    547.        * @param    string    $uri 
    548. -
    549.        * @return    object Individual 
    550. -
    551.        * @access    public
    552. -
    553.        */    
    554. -
    555.     function createInstance($uri null)
    556. -
    557.     {
    558. -
    559.         $instance $this->model->createIndividual($uri);
    560. -
    561.         $instance->setInstanceRdfType($this);
    562. -
    563.         return $instance;
    564. -
    565.     }
    566. -
    567. -
    568. ?>
    569. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModel.php.html deleted file mode 100755 index 12fb04cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModel.php.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - File Source for OntModel.php - - - - - -

    Source for file OntModel.php

    -

    Documentation is available at OntModel.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OntModel
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Enhanced view of the model that is known to contain ontology data, under a
    18. -
    19. * given ontology vocabulary (such as RDFS). OntModel together with OntClass
    20. -
    21. * and OntResource provide ontology specific methods like addSubClass(),
    22. -
    23. * listSubClasses(), hasSuperProperty(), addDomain() and  listInstances(). This class does not by
    24. -
    25. * itself compute the deductive extension of the graph under the semantic
    26. -
    27. * rules of the language. Instead, we wrap an underlying model with this
    28. -
    29. * ontology interface, that presents a convenience syntax for accessing the
    30. -
    31. * language elements. Depending on the inference capability of the underlying
    32. -
    33. * model, the OntModel will appear to contain more or less triples.
    34. -
    35. * For example, if this class is used to wrap a MemModel or DBModel, only the
    36. -
    37. * relationships asserted by the document will be reported through this
    38. -
    39. * convenience API.
    40. -
    41. * Alternatively, if the OntModel wraps an InfModel (InfModelF / InfModelB),
    42. -
    43. * the inferred triples from the extension will be reported as well.
    44. -
    45. *
    46. -
    47. *
    48. -
    49. @version  $Id: fsource_ontModel__ontModelOntModel.php.html 443 2007-06-01 16:25:38Z cax $
    50. -
    51. @author Daniel Westphal <mail at d-westphal dot de>
    52. -
    53. *
    54. -
    55. *
    56. -
    57. @package     ontModel
    58. -
    59. @access    public
    60. -
    61. ***/
    62. -
    63. class OntModel extends ResModel 
    64. -
    65. {
    66. -
    67.     /**
    68. -
    69.     * Holds a reference to the assoiated vocabulary.
    70. -
    71.     * @var        object 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $vocabulary;
    78. -
    79.     
    80. -
    81.     
    82. -
    83.     /**
    84. -
    85.     * Constructor.
    86. -
    87.     * You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary
    88. -
    89.     *
    90. -
    91.     * @param object Model $model 
    92. -
    93.     * @access    public
    94. -
    95.     */    
    96. -
    97.     function OntModel($model,$vocabulary)
    98. -
    99.     {
    100. -
    101.         parent::ResModel($model);
    102. -
    103.         $this->vocabulary $vocabulary;
    104. -
    105.     }
    106. -
    107.     
    108. -
    109.     /**
    110. -
    111.     * Answer a resource that represents a class description node in this model.
    112. -
    113.     * If a resource with the given uri exists in the model, it will be re-used.
    114. -
    115.     * If not, a new one is created in the updateable sub-model of the ontology model.
    116. -
    117.     *
    118. -
    119.        * @param    string    $uri 
    120. -
    121.        * @return    object OntClass 
    122. -
    123.        * @access    public
    124. -
    125.        */
    126. -
    127.     function createOntClass($uri null)
    128. -
    129.     {
    130. -
    131.         $class new OntClass($uri);
    132. -
    133.         $class->setAssociatedModel($this);
    134. -
    135.         $class->setVocabulary($this->vocabulary);
    136. -
    137.         $class->setInstanceRdfType($this->vocabulary->ONTCLASS());
    138. -
    139.         return $class;
    140. -
    141.     }
    142. -
    143.     
    144. -
    145.     /**
    146. -
    147.     * Answer a resource that represents an Individual node in this model.
    148. -
    149.     * If a resource with the given uri exists in the model, it will be re-used.
    150. -
    151.     * If not, a new one is created in the updateable sub-model of the ontology model.
    152. -
    153.     *
    154. -
    155.        * @param    string    $uri 
    156. -
    157.        * @return    object Individual 
    158. -
    159.        * @access    public
    160. -
    161.        */
    162. -
    163.     function createIndividual($uri null)
    164. -
    165.     {
    166. -
    167.         $individual new Individual($uri);
    168. -
    169.         $individual->setAssociatedModel($this);
    170. -
    171.         $individual->setVocabulary($this->vocabulary);
    172. -
    173.         return $individual;
    174. -
    175.     }
    176. -
    177.     
    178. -
    179.     /**
    180. -
    181.     * Answer a resource that represents an OntProperty node in this model.
    182. -
    183.     * If a resource with the given uri exists in the model, it will be re-used.
    184. -
    185.     * If not, a new one is created in the updateable sub-model of the ontology model.
    186. -
    187.     *
    188. -
    189.        * @param    string    $uri 
    190. -
    191.        * @return    object OntProperty 
    192. -
    193.        * @access    public
    194. -
    195.        */
    196. -
    197.     function createOntProperty($uri null)
    198. -
    199.     {
    200. -
    201.         $ontProperty new OntProperty($uri);
    202. -
    203.         $ontProperty->setAssociatedModel($this);
    204. -
    205.         $ontProperty->setVocabulary($this->vocabulary);
    206. -
    207.         $ontProperty->setInstanceRdfType($this->createResource(RDF_NAMESPACE_URI.RDF_PROPERTY));
    208. -
    209.         return $ontProperty;    
    210. -
    211.     }
    212. -
    213.     
    214. -
    215.     /**
    216. -
    217.     * Answer an array that ranges over all of the various forms of class
    218. -
    219.     * description resource in this model.
    220. -
    221.     * Class descriptions include  domain/range definitions, named  classes and subClass constructs.
    222. -
    223.     *
    224. -
    225.        * @return    array of object ResResource
    226. -
    227.        * @access    public
    228. -
    229.        */
    230. -
    231.     function listClasses()
    232. -
    233.     {
    234. -
    235.         //get all statements, with an rdf:type as property
    236. -
    237.         $statements$this->find(null,$this->vocabulary->TYPE(),null);
    238. -
    239.         $return array();
    240. -
    241.         $returnIndex=array();
    242. -
    243.         foreach ($statements as $statement
    244. -
    245.         {
    246. -
    247.             $objectLabel=$statement->getLabelObject();
    248. -
    249.             //if it's about a typed Individual    
    250. -
    251.             if ($objectLabel!=RDF_SCHEMA_URI.RDFS_CLASS)
    252. -
    253.             {
    254. -
    255.                 if (!in_array($objectLabel,$returnIndex))
    256. -
    257.                 {
    258. -
    259.                     $returnIndex[]=$objectLabel;
    260. -
    261.                     $return[]=$statement->getObject();
    262. -
    263.                 }
    264. -
    265.             else 
    266. -
    267.             //if it's a "class1 rdf:type rdf:class" construct
    268. -
    269.             {
    270. -
    271.                 $subjectLabel=$statement->getLabelSubject();
    272. -
    273.                 if (!in_array($subjectLabel,$returnIndex))
    274. -
    275.                 {
    276. -
    277.                     $returnIndex[]=$subjectLabel;
    278. -
    279.                     $return[]=$statement->getSubject();
    280. -
    281.                 }
    282. -
    283.             }    
    284. -
    285.         }
    286. -
    287.         //find all statements about SubClassConstructs
    288. -
    289.         $statements$this->find(null,$this->vocabulary->SUB_CLASS_OF(),null);
    290. -
    291.         foreach ($statements as $statement
    292. -
    293.         {
    294. -
    295.             //add the statements object to the result
    296. -
    297.             $objectLabel=$statement->getLabelObject();
    298. -
    299.             if (!in_array($objectLabel,$returnIndex))
    300. -
    301.             {
    302. -
    303.                 $returnIndex[]=$objectLabel;
    304. -
    305.                 $return[]=$statement->getObject();
    306. -
    307.             }    
    308. -
    309.         }    
    310. -
    311.         foreach ($statements as $statement
    312. -
    313.         {
    314. -
    315.             //add the statements subject to the result
    316. -
    317.             $objectLabel=$statement->getLabelSubject();
    318. -
    319.             if (!in_array($objectLabel,$returnIndex))
    320. -
    321.             {
    322. -
    323.                 $returnIndex[]=$objectLabel;
    324. -
    325.                 $return[]=$statement->getSubject();
    326. -
    327.             }    
    328. -
    329.         }
    330. -
    331.         return $return;    
    332. -
    333.     }
    334. -
    335. -
    336. ?>
    337. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModelP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModelP.php.html deleted file mode 100755 index 08b8c031..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntModelP.php.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - File Source for OntModelP.php - - - - - -

    Source for file OntModelP.php

    -

    Documentation is available at OntModelP.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * OntModel Package
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. *
    12. -
    13. * Description               : OntModel package
    14. -
    15. *
    16. -
    17. * Author: Daniel Westphal    <mail at d-westphal dot de>
    18. -
    19. @package ontModel
    20. -
    21. *
    22. -
    23. *  ----------------------------------------------------------------------------------
    24. -
    25. */
    26. -
    27. // Include OntModel classes
    28. -
    29. include_onceRDFAPI_INCLUDE_DIR PACKAGE_RESMODEL);
    30. -
    31. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntVocabulary.php');
    32. -
    33. require_onceRDFAPI_INCLUDE_DIR 'ontModel/RdfsVocabulary.php');
    34. -
    35. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntModel.php');
    36. -
    37. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntResource.php');
    38. -
    39. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntProperty.php');
    40. -
    41. require_onceRDFAPI_INCLUDE_DIR 'ontModel/OntClass.php');
    42. -
    43. require_onceRDFAPI_INCLUDE_DIR 'ontModel/Individual.php');
    44. -
    45.  
    46. -
    47. ?>
    48. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntProperty.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntProperty.php.html deleted file mode 100755 index dc6bc0df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntProperty.php.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - File Source for OntProperty.php - - - - - -

    Source for file OntProperty.php

    -

    Documentation is available at OntProperty.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: OntProperty
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Class encapsulating a property in an ontology.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_ontModel__ontModelOntProperty.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35.  
    36. -
    37. class OntProperty extends OntResource    
    38. -
    39. {
    40. -
    41.     /**
    42. -
    43.     * Constructor.
    44. -
    45.     * You can supply a URI.
    46. -
    47.     *
    48. -
    49.     * @param string $uri 
    50. -
    51.     * @access    public
    52. -
    53.     */
    54. -
    55.     function OntProperty($uri null)
    56. -
    57.     {
    58. -
    59.         parent::OntResource($uri);
    60. -
    61.     }
    62. -
    63.     
    64. -
    65.     /**
    66. -
    67.     * Add a resource representing the domain of this property.
    68. -
    69.     *
    70. -
    71.        * @param    object ResResource    $resResource 
    72. -
    73.        * @return    boolean 
    74. -
    75.        * @access    public
    76. -
    77.        */
    78. -
    79.     function addDomain($resResource)
    80. -
    81.     {
    82. -
    83.         return $this->addProperty($this->vocabulary->DOMAIN(),$resResource);
    84. -
    85.     }
    86. -
    87.     
    88. -
    89.     /**
    90. -
    91.     * Add a resource representing the range of this property.
    92. -
    93.     *
    94. -
    95.        * @param    object ResResource    $resResource 
    96. -
    97.        * @return    boolean 
    98. -
    99.        * @access    public
    100. -
    101.        */
    102. -
    103.     function addRange($resResource)
    104. -
    105.     {
    106. -
    107.         return $this->addProperty($this->vocabulary->RANGE(),$resResource);
    108. -
    109.     }
    110. -
    111.     
    112. -
    113.     /**
    114. -
    115.     * Add a sub-property of this property.
    116. -
    117.     *
    118. -
    119.        * @param    object ResProperty    $resProperty 
    120. -
    121.        * @return    boolean 
    122. -
    123.        * @access    public
    124. -
    125.        */    
    126. -
    127.     function addSubProperty($resProperty)
    128. -
    129.     {
    130. -
    131.         return $resProperty->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * Add a super-property of this property.
    140. -
    141.     *
    142. -
    143.        * @param    object ResProperty    $resProperty 
    144. -
    145.        * @return    boolean 
    146. -
    147.        * @access    public
    148. -
    149.        */
    150. -
    151.     function addSuperProperty($resProperty)
    152. -
    153.     {
    154. -
    155.         return $this->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    156. -
    157.     }
    158. -
    159.     
    160. -
    161.     /**
    162. -
    163.     * Answer a OntClass that represents the domain class of this property.
    164. -
    165.     * If there is more than one such resource, an arbitrary selection is made.
    166. -
    167.     *
    168. -
    169.        * @return    object OntClass 
    170. -
    171.        * @access    public
    172. -
    173.        */
    174. -
    175.     function getDomain()
    176. -
    177.     {
    178. -
    179.         return $this->getPropertyValue($this->vocabulary->DOMAIN(),'OntClass');
    180. -
    181.     }
    182. -
    183.  
    184. -
    185.     /**
    186. -
    187.     * Answer a OntClass that represents the range class of this property.
    188. -
    189.     * If there is more than one such resource, an arbitrary selection is made.
    190. -
    191.     *
    192. -
    193.        * @return    object OntClass 
    194. -
    195.        * @access    public
    196. -
    197.        */
    198. -
    199.     function getRange()
    200. -
    201.     {
    202. -
    203.         return $this->getPropertyValue($this->vocabulary->RANGE(),'OntClass');
    204. -
    205.     }
    206. -
    207.     
    208. -
    209.     /**
    210. -
    211.     * Answer a property that is the sub-property of this property.
    212. -
    213.     * If there is more than one such property, an arbitrary selection is made.
    214. -
    215.     *
    216. -
    217.        * @return    object OntProperty 
    218. -
    219.        * @access    public
    220. -
    221.        */
    222. -
    223.     function getSubProperty()
    224. -
    225.     {
    226. -
    227.         $statement $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
    228. -
    229.         if ($statement !== null)
    230. -
    231.             return new OntProperty($statement->getLabelSubject());
    232. -
    233.         
    234. -
    235.         return null;
    236. -
    237.     }
    238. -
    239.     
    240. -
    241.     /**
    242. -
    243.     * Answer a property that is the super-property of this property.
    244. -
    245.     * If there is more than one such property, an arbitrary selection is made.
    246. -
    247.     *
    248. -
    249.        * @return    object OntProperty 
    250. -
    251.        * @access    public
    252. -
    253.        */
    254. -
    255.     function getSuperProperty()
    256. -
    257.     {
    258. -
    259.         return $this->getPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
    260. -
    261.     }
    262. -
    263.     
    264. -
    265.     /**
    266. -
    267.     * Answer true if the given resource a class specifying the domain of this property.
    268. -
    269.     *
    270. -
    271.        * @param    object ResResource    $resResource 
    272. -
    273.        * @return    boolean 
    274. -
    275.        * @access    public
    276. -
    277.        */
    278. -
    279.     function hasDomain($resResource)
    280. -
    281.     {
    282. -
    283.         return $this->hasProperty($this->vocabulary->DOMAIN(),$resResource);
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Answer true if the given resource a class specifying the range of this property.
    292. -
    293.     *
    294. -
    295.        * @param    object ResResource    $resResource 
    296. -
    297.        * @return    boolean 
    298. -
    299.        * @access    public
    300. -
    301.        */
    302. -
    303.     function hasRange($resResource)
    304. -
    305.     {
    306. -
    307.         return $this->hasProperty($this->vocabulary->RANGE(),$resResource);
    308. -
    309.     }
    310. -
    311.     
    312. -
    313.     /**
    314. -
    315.     * Answer true if the given property is a sub-property of this property.
    316. -
    317.     * If $direct is set to true, only consider the direcly adjacent
    318. -
    319.     * properties in the property hierarchy
    320. -
    321.     *
    322. -
    323.        * @param    object ResResource    $resProperty 
    324. -
    325.        * @param    boolean    $direct 
    326. -
    327.        * @return    boolean 
    328. -
    329.        * @access    public
    330. -
    331.        */
    332. -
    333.     function hasSubProperty($resProperty$direct true)
    334. -
    335.     {
    336. -
    337.         if ($direct)
    338. -
    339.             return $resProperty->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
    340. -
    341.         
    342. -
    343.         $index=array();
    344. -
    345.         return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty=== true);
    346. -
    347.     }
    348. -
    349.     
    350. -
    351.     /**
    352. -
    353.     * Answer true if the given property is a super-property of this property.
    354. -
    355.     * If $direct is set to true, only consider the direcly adjacent
    356. -
    357.     * properties in the property hierarchy
    358. -
    359.     *
    360. -
    361.        * @param    object ResResource    $resProperty 
    362. -
    363.        * @param    boolean    $direct 
    364. -
    365.        * @return    boolean 
    366. -
    367.        * @access    public
    368. -
    369.        */
    370. -
    371.     function hasSuperProperty($resProperty$direct true)
    372. -
    373.     {
    374. -
    375.         if ($direct)
    376. -
    377.             return $this->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    378. -
    379.         
    380. -
    381.         $index=array();
    382. -
    383.         return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty=== true);
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Answer an array of all of the declared domain classes of this property.
    392. -
    393.     * Each element of the iterator will be an OntClass.
    394. -
    395.     *
    396. -
    397.        * @return    array of OntClasses
    398. -
    399.        * @access    public
    400. -
    401.        */
    402. -
    403.     function listDomain()
    404. -
    405.     {
    406. -
    407.         return $this->listProperty($this->vocabulary->DOMAIN(),'OntClass');
    408. -
    409.     }
    410. -
    411.     
    412. -
    413.     /**
    414. -
    415.     * Answer an array of all of the declared range classes of this property.
    416. -
    417.     * Each element of the iterator will be an OntClass.
    418. -
    419.     *
    420. -
    421.        * @return    array of OntClasses
    422. -
    423.        * @access    public
    424. -
    425.        */
    426. -
    427.     function listRange()
    428. -
    429.     {
    430. -
    431.         return $this->listProperty($this->vocabulary->RANGE(),'OntClass');
    432. -
    433.     }
    434. -
    435.     
    436. -
    437.     /**
    438. -
    439.     * Answer an array of all the properties that are declared to be
    440. -
    441.     * sub-properties of this property. Each element of the iterator will be an
    442. -
    443.     * OntProperty.
    444. -
    445.     * If $direct is set to true, only consider the direcly adjacent
    446. -
    447.     * properties in the property hierarchy
    448. -
    449.     *
    450. -
    451.        * @param    boolean    $direct 
    452. -
    453.        * @return    array of OntProperties
    454. -
    455.        * @access    public
    456. -
    457.        */
    458. -
    459.     function listSubProperties($direct true)
    460. -
    461.     {
    462. -
    463.         $return array();
    464. -
    465.         if ($direct)
    466. -
    467.         {
    468. -
    469.             $statements $this->model->find(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
    470. -
    471.         else 
    472. -
    473.         {
    474. -
    475.             $index array();
    476. -
    477.             $statements $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
    478. -
    479.         }
    480. -
    481.         
    482. -
    483.         $returnIndex=array();
    484. -
    485.         foreach ($statements as $statement
    486. -
    487.         {
    488. -
    489.             $objectLabel=$statement->getLabelSubject();
    490. -
    491.             if (!in_array($objectLabel,$returnIndex))
    492. -
    493.             {
    494. -
    495.                 $returnIndex[]=$objectLabel;
    496. -
    497.                 $return[]=new OntProperty($statement->getLabelSubject());
    498. -
    499.             }    
    500. -
    501.         }    
    502. -
    503.         return $return;    
    504. -
    505.     }
    506. -
    507.     
    508. -
    509.     /**
    510. -
    511.     * Answer an array of all the properties that are declared to be
    512. -
    513.     * super-properties of this property. Each element of the iterator will be an
    514. -
    515.     * OntProperty.
    516. -
    517.     * If $direct is set to true, only consider the direcly adjacent
    518. -
    519.     * properties in the property hierarchy
    520. -
    521.     *
    522. -
    523.        * @param    boolean    $direct 
    524. -
    525.        * @return    array of OntProperties
    526. -
    527.        * @access    public
    528. -
    529.        */
    530. -
    531.     function listSuperProperties($direct true)
    532. -
    533.     {
    534. -
    535.         $return array();
    536. -
    537.         if ($direct)
    538. -
    539.             return $this->listProperty($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
    540. -
    541.             
    542. -
    543.         $index=array();    
    544. -
    545.         $statements $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
    546. -
    547.         $returnIndex=array();
    548. -
    549.         foreach ($statements as $statement
    550. -
    551.         {
    552. -
    553.             $objectLabel=$statement->getLabelObject();
    554. -
    555.             if (!in_array($objectLabel,$returnIndex))
    556. -
    557.             {
    558. -
    559.                 $returnIndex[]=$objectLabel;
    560. -
    561.                 $return[]=new OntProperty($statement->getLabelObject());
    562. -
    563.             }    
    564. -
    565.         }    
    566. -
    567.         return $return;    
    568. -
    569.     }
    570. -
    571.     
    572. -
    573.     /**
    574. -
    575.     * Remove the given class from the stated domain(s) of this property.
    576. -
    577.     *
    578. -
    579.        * @param    object ResResource $resResource 
    580. -
    581.        * @return    boolean 
    582. -
    583.        * @access    public
    584. -
    585.        */
    586. -
    587.     function removeDomain($resResource)
    588. -
    589.     {
    590. -
    591.         return $this->removeProperty($this->vocabulary->DOMAIN(),$resResource);
    592. -
    593.     }
    594. -
    595.     
    596. -
    597.     /**
    598. -
    599.     * Remove the given class from the stated range(es) of this property.
    600. -
    601.     *
    602. -
    603.        * @param    object ResResource $resResource 
    604. -
    605.        * @return    boolean 
    606. -
    607.        * @access    public
    608. -
    609.        */
    610. -
    611.     function removeRange($resResource)
    612. -
    613.     {
    614. -
    615.         return $this->removeProperty($this->vocabulary->RANGE(),$resResource);
    616. -
    617.     }
    618. -
    619.     
    620. -
    621.     /**
    622. -
    623.     * Remove the given property from the sub-properties of this property.
    624. -
    625.     *
    626. -
    627.        * @param    object ResProperty $resProperty 
    628. -
    629.        * @return    boolean 
    630. -
    631.        * @access    public
    632. -
    633.        */
    634. -
    635.     function removeSubProperty($resProperty)
    636. -
    637.     {
    638. -
    639.         return    $this->model->remove(new Statement($resProperty,$this->vocabulary->SUB_PROPERTY_OF(),$this));
    640. -
    641.     }
    642. -
    643.     
    644. -
    645.     /**
    646. -
    647.     * Remove the given property from the super-properties of this property.
    648. -
    649.     *
    650. -
    651.        * @param    object ResProperty $resProperty 
    652. -
    653.        * @return    boolean 
    654. -
    655.        * @access    public
    656. -
    657.        */
    658. -
    659.     function removeSuperProperty($resProperty)
    660. -
    661.     {
    662. -
    663.         return $this->removeProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    664. -
    665.     }
    666. -
    667.  
    668. -
    669.     /**
    670. -
    671.     * Assert that the given resource represents the class of individuals
    672. -
    673.     * that form the domain of this property. Any existing domain statements
    674. -
    675.     * for this property are removed.
    676. -
    677.     *
    678. -
    679.        * @param    object ResResource $resResource 
    680. -
    681.        * @access    public
    682. -
    683.        */
    684. -
    685.     function setDomain($resResource)
    686. -
    687.     {
    688. -
    689.         $this->setPropertyValue($this->vocabulary->DOMAIN(),$resResource);
    690. -
    691.     }
    692. -
    693.     
    694. -
    695.     /**
    696. -
    697.     * Assert that the given resource represents the class of individuals
    698. -
    699.     * that form the range of this property. Any existing range statements
    700. -
    701.     * for this property are removed.
    702. -
    703.     *
    704. -
    705.        * @param    object ResResource $resResource 
    706. -
    707.        * @access    public
    708. -
    709.        */
    710. -
    711.     function setRange($resResource)
    712. -
    713.     {
    714. -
    715.         $this->setPropertyValue($this->vocabulary->RANGE(),$resResource);
    716. -
    717.     }
    718. -
    719.     
    720. -
    721.     /**
    722. -
    723.     * Assert that this property is super-property of the given property.
    724. -
    725.     * Any existing statements for superPropertyOf on prop will be removed.
    726. -
    727.     *
    728. -
    729.        * @param    object ResProperty $resProperty 
    730. -
    731.        * @access    public
    732. -
    733.        */
    734. -
    735.     function setSubProperty($resProperty)
    736. -
    737.     {
    738. -
    739.         foreach ($this->listSubProperties(as $oldResProperty
    740. -
    741.         {
    742. -
    743.             $this->removeSubProperty($oldResProperty);
    744. -
    745.         }
    746. -
    747.         
    748. -
    749.         $this->addSubProperty($resProperty);
    750. -
    751.     }
    752. -
    753.     
    754. -
    755.     /**
    756. -
    757.     * Assert that this property is sub-property of the given property.
    758. -
    759.     * Any existing statements for subPropertyOf on prop will be removed.
    760. -
    761.     *
    762. -
    763.        * @param    object ResProperty $resProperty 
    764. -
    765.        * @access    public
    766. -
    767.        */
    768. -
    769.     function setSuperProperty($resProperty)
    770. -
    771.     {
    772. -
    773.         $this->setPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
    774. -
    775.     }
    776. -
    777. -
    778. ?>
    779. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:10 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntResource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntResource.php.html deleted file mode 100755 index 7b8c69c4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntResource.php.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - File Source for OntResource.php - - - - - -

    Source for file OntResource.php

    -

    Documentation is available at OntResource.php

    -
    -
    1. <?php 
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntResource
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Provides a common super-type for all of the abstractions in
    16. -
    17. * this ontology representation package.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_ontModel__ontModelOntResource.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class OntResource extends ResResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Holds a reference to the assoiated vocabulary
    42. -
    43.     * @var        object 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $vocabulary;
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * Holds a resResource of the type, which is this ontResource of.
    56. -
    57.     * If this value is set, the ontModel will add an additional
    58. -
    59.     * statement about this resource and the fiven rdf:type
    60. -
    61.     * @var        object 
    62. -
    63.     * @access    private
    64. -
    65.     */
    66. -
    67.     var $rdfType;
    68. -
    69.     
    70. -
    71.     
    72. -
    73.     /**
    74. -
    75.     * Constructor
    76. -
    77.     * You can supply a uri
    78. -
    79.     *
    80. -
    81.     * @param string $uri 
    82. -
    83.     * @access    public
    84. -
    85.     */
    86. -
    87.     function OntResource($uri null)
    88. -
    89.     {
    90. -
    91.         $this->rdfType=false;
    92. -
    93.         parent::ResResource($uri);
    94. -
    95.     }
    96. -
    97.     
    98. -
    99.     /**
    100. -
    101.     * Sets the reference to the assoiated vocabulary
    102. -
    103.     *
    104. -
    105.        * @param    object OntVocabulary    $vocabulary 
    106. -
    107.        * @access    public
    108. -
    109.        */
    110. -
    111.     function setVocabulary($vocabulary)
    112. -
    113.     {
    114. -
    115.         $this->vocabulary $vocabulary;
    116. -
    117.     }
    118. -
    119.     
    120. -
    121.     /**
    122. -
    123.     * Add the given comment to this resource.
    124. -
    125.     *
    126. -
    127.        * @param    object ResLiteral    $comment 
    128. -
    129.        * @return    boolean 
    130. -
    131.        * @access    public
    132. -
    133.        */
    134. -
    135.     function addComment($comment)
    136. -
    137.     {
    138. -
    139.         return $this->addProperty($this->vocabulary->COMMENT(),$comment);
    140. -
    141.     }
    142. -
    143.     
    144. -
    145.     /**
    146. -
    147.     * Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    148. -
    149.     *
    150. -
    151.        * @return    object ResLiteral or NULL
    152. -
    153.        * @access    public
    154. -
    155.        */
    156. -
    157.     function getComment()
    158. -
    159.     {
    160. -
    161.         return $this->getPropertyValue($this->vocabulary->COMMENT());
    162. -
    163.     }
    164. -
    165.     
    166. -
    167.     /**
    168. -
    169.     * Add a resource that is declared to provide a definition of this resource.
    170. -
    171.     *
    172. -
    173.        * @param    object ResResource    $resResource 
    174. -
    175.        * @return    boolean 
    176. -
    177.        * @access    public
    178. -
    179.        */
    180. -
    181.     function addIsDefinedBy($resResource)
    182. -
    183.     {
    184. -
    185.         return $this->addProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    186. -
    187.     }
    188. -
    189.     
    190. -
    191.     /**
    192. -
    193.     * Answer a resource that is declared to provide a definition of this resource.
    194. -
    195.     * If there is more than one such resource, an arbitrary selection is made.
    196. -
    197.     *
    198. -
    199.        * @return    object ResResource 
    200. -
    201.        * @access    public
    202. -
    203.        */
    204. -
    205.     function getIsDefinedBy()
    206. -
    207.     {
    208. -
    209.         return $this->getPropertyValue($this->vocabulary->IS_DEFINED_BY());
    210. -
    211.     }
    212. -
    213.     
    214. -
    215.     /**
    216. -
    217.     * Add the given Label to this resource
    218. -
    219.     *
    220. -
    221.        * @param    object ResLiteral    $resLiteral 
    222. -
    223.        * @return    boolean 
    224. -
    225.        * @access    public
    226. -
    227.        */
    228. -
    229.     function addLabelProperty($resLiteral)
    230. -
    231.     {
    232. -
    233.         return $this->addProperty($this->vocabulary->LABEL(),$resLiteral);
    234. -
    235.     }
    236. -
    237.     
    238. -
    239.     /**
    240. -
    241.     * Answer the label ResLiteral for this object.
    242. -
    243.     * If there is more than one such resource, an arbitrary selection is made.
    244. -
    245.     *
    246. -
    247.        * @param    string    $uri 
    248. -
    249.        * @return    object ResResource 
    250. -
    251.        * @access    public
    252. -
    253.        */
    254. -
    255.     function getLabelProperty()
    256. -
    257.     {
    258. -
    259.         return $this->getPropertyValue($this->vocabulary->LABEL());
    260. -
    261.     }
    262. -
    263.     
    264. -
    265.     /**
    266. -
    267.     * Add the given class as one of the rdf:type's for this resource.
    268. -
    269.     *
    270. -
    271.        * @param    object ResResource    $resResource 
    272. -
    273.        * @return    boolean 
    274. -
    275.        * @access    public
    276. -
    277.        */
    278. -
    279.     function addRDFType($resResource)
    280. -
    281.     {
    282. -
    283.         return $this->addProperty($this->vocabulary->TYPE(),$resResource);
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Answer the rdf:type (ie the class) of this resource.
    292. -
    293.     * If there is more than one type for this resource, the return value will
    294. -
    295.     * be one of the values, but it is not specified which one
    296. -
    297.     * (nor that it will consistently be the same one each time).
    298. -
    299.     *
    300. -
    301.        * @return    object ResResource 
    302. -
    303.        * @access    public
    304. -
    305.        */
    306. -
    307.     function getRDFType()
    308. -
    309.     {
    310. -
    311.         return $this->getPropertyValue($this->vocabulary->TYPE());
    312. -
    313.     }
    314. -
    315.     
    316. -
    317.     /**
    318. -
    319.     * Add a resource that is declared to provided additional
    320. -
    321.     * information about the definition of this resource.
    322. -
    323.     *
    324. -
    325.        * @param    object ResResource    $resResource 
    326. -
    327.        * @return    boolean 
    328. -
    329.        * @access    public
    330. -
    331.        */
    332. -
    333.     function addSeeAlso($resResource)
    334. -
    335.     {
    336. -
    337.         return $this->addProperty($this->vocabulary->SEE_ALSO(),$resResource);
    338. -
    339.     }
    340. -
    341.     
    342. -
    343.     /**
    344. -
    345.     * Answer a resource that provides additional information about this resource.
    346. -
    347.     * If more than one such resource is defined, make an arbitrary choice.
    348. -
    349.     *
    350. -
    351.        * @return    object ResResource 
    352. -
    353.        * @access    public
    354. -
    355.        */
    356. -
    357.     function getSeeAlso()
    358. -
    359.     {
    360. -
    361.         return $this->getPropertyValue($this->vocabulary->SEE_ALSO());
    362. -
    363.     }
    364. -
    365.     
    366. -
    367.     /**
    368. -
    369.     * Answer a view of this resource as a class
    370. -
    371.     *
    372. -
    373.        * @return    object OntClass 
    374. -
    375.        * @access    public
    376. -
    377.        */
    378. -
    379.     function asClass()
    380. -
    381.     {
    382. -
    383.         return  $this->model->createOntClass($this->uri);
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Answer a view of this resource as an Individual
    392. -
    393.     *
    394. -
    395.        * @return    object Individual 
    396. -
    397.        * @access    public
    398. -
    399.        */
    400. -
    401.     function asIndividual()
    402. -
    403.     {
    404. -
    405.         return  $this->model->createIndividual($this->uri);
    406. -
    407.     }
    408. -
    409.     
    410. -
    411.     /**
    412. -
    413.     * Answer a view of this resource as a property
    414. -
    415.     *
    416. -
    417.        * @return    object OntProperty 
    418. -
    419.        * @access    public
    420. -
    421.        */
    422. -
    423.     function asOntProperty()
    424. -
    425.     {
    426. -
    427.         return  $this->model->createOntProperty($this->uri);
    428. -
    429.     }
    430. -
    431.     
    432. -
    433.     /**
    434. -
    435.     * Answer a reference to the ontology language profile that governs the
    436. -
    437.     * ontology model to which this ontology resource is attached.
    438. -
    439.     *
    440. -
    441.        * @param    string    $uri 
    442. -
    443.        * @return    object OntClass 
    444. -
    445.        * @access    public
    446. -
    447.        */
    448. -
    449.     function getVocabulary()
    450. -
    451.     {
    452. -
    453.         return $this->vocabulary ;
    454. -
    455.     }
    456. -
    457.     
    458. -
    459.     /**
    460. -
    461.     * Answer the value of a given RDF property for this resource as $returnType, or null
    462. -
    463.     * if it doesn't have one. If there is more than one RDF statement with
    464. -
    465.     * the given property for the current value, it is not defined which of
    466. -
    467.     * the values will be returned.
    468. -
    469.     * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
    470. -
    471.     * Default is 'ResResource'
    472. -
    473.     *
    474. -
    475.        * @param    object ResResource    $property 
    476. -
    477.        * @param    string    $returnType 
    478. -
    479.        * @return    object OntClass 
    480. -
    481.        * @access    public
    482. -
    483.        */
    484. -
    485.     function getPropertyValue($property$returnType 'ResResource')
    486. -
    487.     {
    488. -
    489.         $statement=$this->getProperty($property);
    490. -
    491.         if ($statement===null)
    492. -
    493.             return null;
    494. -
    495.             
    496. -
    497.             switch ($returnType
    498. -
    499.             {
    500. -
    501.                 case 'OntClass':
    502. -
    503.                     return $this->model->createOntClass($statement->getLabelObject());        
    504. -
    505.                     break;
    506. -
    507.                     
    508. -
    509.                 case 'OntProperty':
    510. -
    511.                     return $this->model->createOntProperty($statement->getLabelObject());        
    512. -
    513.                     break;
    514. -
    515.                 
    516. -
    517.                 case 'Individual':
    518. -
    519.                     return $this->model->createIndividual($statement->getLabelObject());        
    520. -
    521.                     break;
    522. -
    523.             
    524. -
    525.                 default:
    526. -
    527.                     return $statement->getObject();
    528. -
    529.                     break;    
    530. -
    531.             }    
    532. -
    533.     }
    534. -
    535.     
    536. -
    537.     /**
    538. -
    539.     * Answer true if this resource has the given comment.
    540. -
    541.     *
    542. -
    543.        * @param    object ResLiteral    $resLiteral 
    544. -
    545.        * @return    boolean 
    546. -
    547.        * @access    public
    548. -
    549.        */
    550. -
    551.     function hasComment($resLiteral)
    552. -
    553.     {
    554. -
    555.         return $this->hasProperty($this->vocabulary->COMMENT(),$resLiteral);
    556. -
    557.     }
    558. -
    559.     
    560. -
    561.     /**
    562. -
    563.     * Answer true if this resource has the given label.
    564. -
    565.     *
    566. -
    567.        * @param    object ResLiteral    $resLiteral 
    568. -
    569.        * @return    boolean 
    570. -
    571.        * @access    public
    572. -
    573.        */
    574. -
    575.     function hasLabelProperty($resLiteral)
    576. -
    577.     {
    578. -
    579.         return $this->hasProperty($this->vocabulary->LABEL(),$resLiteral);
    580. -
    581.     }
    582. -
    583.     
    584. -
    585.     /**
    586. -
    587.     * Answer true if this resource has the given rdf:type.
    588. -
    589.     *
    590. -
    591.        * @param    object ResResource    $ontClass 
    592. -
    593.        * @return    boolean 
    594. -
    595.        * @access    public
    596. -
    597.        */
    598. -
    599.     function hasRDFType($ontClass)
    600. -
    601.     {
    602. -
    603.         return $this->hasProperty($this->vocabulary->TYPE(),$ontClass);
    604. -
    605.     }
    606. -
    607.     
    608. -
    609.     /**
    610. -
    611.     * Answer true if this resource has the given resource as a source
    612. -
    613.     * of additional information.
    614. -
    615.     *
    616. -
    617.        * @param    object ResResource    $resResource 
    618. -
    619.        * @return    boolean 
    620. -
    621.        * @access    public
    622. -
    623.        */
    624. -
    625.     function hasSeeAlso($resResource)
    626. -
    627.     {
    628. -
    629.         return $this->hasProperty($this->vocabulary->SEE_ALSO(),$resResource);
    630. -
    631.     }
    632. -
    633.     
    634. -
    635.     /**
    636. -
    637.     * Answer true if this resource is defined by the given resource.
    638. -
    639.     *
    640. -
    641.        * @param    object ResResource    $resResource 
    642. -
    643.        * @return    boolean 
    644. -
    645.        * @access    public
    646. -
    647.        */
    648. -
    649.     function isDefinedBy($resResource)
    650. -
    651.     {
    652. -
    653.         return $this->hasProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    654. -
    655.     }
    656. -
    657.     
    658. -
    659.     /**
    660. -
    661.     * Answer an array of all of the comment literals for this resource.
    662. -
    663.     *
    664. -
    665.        * @param    string    $language 
    666. -
    667.        * @return    array 
    668. -
    669.        * @access    public
    670. -
    671.        */
    672. -
    673.     function listComments($language)
    674. -
    675.     {
    676. -
    677.         $return=$this->listProperty($this->vocabulary->COMMENT());
    678. -
    679.         if ($language === false)
    680. -
    681.             return $return;
    682. -
    683.                     
    684. -
    685.         foreach ($return as $key => $resLiteral
    686. -
    687.         {
    688. -
    689.             if (!is_a($resLiteral,'ResLiteral'|| $resLiteral->getLanguage(!= $language)
    690. -
    691.                 unset ($return[$key]);    
    692. -
    693.         }
    694. -
    695.         return $return;    
    696. -
    697.     }
    698. -
    699.     
    700. -
    701.     /**
    702. -
    703.     * Answer an array of all of the resources that are declared to define this resource.
    704. -
    705.     *
    706. -
    707.        * @return    array 
    708. -
    709.        * @access    public
    710. -
    711.        */
    712. -
    713.     function listIsDefinedBy()
    714. -
    715.     {
    716. -
    717.         return $this->listProperty($this->vocabulary->IS_DEFINED_BY());
    718. -
    719.     }
    720. -
    721.     
    722. -
    723.     /**
    724. -
    725.     * Answer an array of all of the label literals for this resource, with the given
    726. -
    727.     * language, if $language is set.
    728. -
    729.     *
    730. -
    731.        * @return    array 
    732. -
    733.        * @access    public
    734. -
    735.        */
    736. -
    737.     function listLabelProperties($language false)
    738. -
    739.     {
    740. -
    741.         $return=$this->listProperty($this->vocabulary->LABEL());
    742. -
    743.         if ($language === false)
    744. -
    745.             return $return;
    746. -
    747.                     
    748. -
    749.         foreach ($return as $key => $resLiteral
    750. -
    751.         {
    752. -
    753.             if (!is_a($resLiteral,'ResLiteral'|| $resLiteral->getLanguage(!= $language)
    754. -
    755.                 unset ($return[$key]);    
    756. -
    757.         }
    758. -
    759.         return $return;    
    760. -
    761.     
    762. -
    763.     }
    764. -
    765.     
    766. -
    767.     /**
    768. -
    769.     * Answer an array of the RDF classes to which this resource belongs.
    770. -
    771.     * If $direct is true, only answer those resources that are direct types of
    772. -
    773.     * this resource, not the super-classes of the class etc.
    774. -
    775.     * 
    776. -
    777.        * @param    boolean    $direct 
    778. -
    779.        * @return    array Array of ResResources
    780. -
    781.        * @access    public
    782. -
    783.        */
    784. -
    785.     function listRDFTypes($direct true)
    786. -
    787.     {
    788. -
    789.         return $this->listProperty($this->vocabulary->TYPE());        
    790. -
    791.     }
    792. -
    793.     
    794. -
    795.     /**
    796. -
    797.     * Answer an array of all of the resources that are declared to
    798. -
    799.     * provide addition information about this resource.
    800. -
    801.     *    
    802. -
    803.        * @return    array Array of ResResources
    804. -
    805.        * @access    public
    806. -
    807.        */
    808. -
    809.     function listSeeAlso()
    810. -
    811.     {
    812. -
    813.         return $this->listProperty($this->vocabulary->SEE_ALSO());    
    814. -
    815.     }
    816. -
    817.     
    818. -
    819.     /**
    820. -
    821.     * Answer an array of values of a given RDF property for this resource as $returnType, or null
    822. -
    823.     * if it doesn't have one.
    824. -
    825.     * The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
    826. -
    827.     * Default is 'ResResource'
    828. -
    829.     *
    830. -
    831.        * @param    object ResResource    $property 
    832. -
    833.        * @param    string    $returnType 
    834. -
    835.        * @return    array of ResResources
    836. -
    837.        * @access    public
    838. -
    839.        */
    840. -
    841.     function listProperty($property$returnType 'OntResource')
    842. -
    843.     {
    844. -
    845.         $return=array();
    846. -
    847.         $resArray $this->listProperties($property);
    848. -
    849.         foreach ($resArray as $statement
    850. -
    851.         {
    852. -
    853.             switch ($returnType
    854. -
    855.             {
    856. -
    857.                 case 'OntClass':
    858. -
    859.                     $return[]=$this->model->createOntClass($statement->getLabelObject());        
    860. -
    861.                     break;
    862. -
    863.                     
    864. -
    865.                 case 'OntProperty':
    866. -
    867.                     $return[]=$this->model->createOntProperty($statement->getLabelObject());        
    868. -
    869.                     break;
    870. -
    871.                 
    872. -
    873.                 case 'Individual':
    874. -
    875.                     $return[]=$this->model->createIndividual($statement->getLabelObject());        
    876. -
    877.                     break;
    878. -
    879.             
    880. -
    881.                 default:
    882. -
    883.                     $return[]=$statement->getObject();
    884. -
    885.                     break;
    886. -
    887.             }    
    888. -
    889.         }
    890. -
    891.         return $return;    
    892. -
    893.     }
    894. -
    895.     
    896. -
    897.     /**
    898. -
    899.     * Remove the statement that the given ResLiteral is a comment on this resource.
    900. -
    901.     * Returns true, if a statement was removed
    902. -
    903.     *
    904. -
    905.        * @param    object ResLiteral $resLiteral 
    906. -
    907.        * @return    boolean 
    908. -
    909.        * @access    public
    910. -
    911.        */
    912. -
    913.     function removeComment($resLiteral)
    914. -
    915.     {
    916. -
    917.         return $this->removeProperty($this->vocabulary->COMMENT(),$resLiteral);
    918. -
    919.     }
    920. -
    921.     
    922. -
    923.     /**
    924. -
    925.     * Remove the statement that this resource is defined by the given resource.
    926. -
    927.     *
    928. -
    929.        * @param    object ResResource $resResource 
    930. -
    931.        * @return    boolean 
    932. -
    933.        * @access    public
    934. -
    935.        */
    936. -
    937.     function removeDefinedBy($resResource)
    938. -
    939.     {
    940. -
    941.         return $this->removeProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
    942. -
    943.     }
    944. -
    945.     
    946. -
    947.     /**
    948. -
    949.     * Remove the statement that the given ResLiteral is a label on this resource.
    950. -
    951.     * Returns true, if a statement was removed
    952. -
    953.     *
    954. -
    955.        * @param    object ResLiteral $resLiteral 
    956. -
    957.        * @return    boolean 
    958. -
    959.        * @access    public
    960. -
    961.        */
    962. -
    963.     function removeLabelProperty($resLiteral)
    964. -
    965.     {
    966. -
    967.         return $this->removeProperty($this->vocabulary->LABEL(),$resLiteral);
    968. -
    969.     }
    970. -
    971.     
    972. -
    973.     /**
    974. -
    975.     * Remove the specific property-value pair from this resource.
    976. -
    977.     *
    978. -
    979.        * @param    object ResResource    $property 
    980. -
    981.        * @param    object ResResource    $value 
    982. -
    983.        * @return    boolean 
    984. -
    985.        * @access    public
    986. -
    987.        */
    988. -
    989.     function removeProperty($property$value)
    990. -
    991.     {
    992. -
    993.         return $this->model->remove(new Statement($this,$property,$value));
    994. -
    995.     }
    996. -
    997.     
    998. -
    999.     /**
    1000. -
    1001.     * Remove the statement that this resource is of the given RDF type.
    1002. -
    1003.     *
    1004. -
    1005.        * @param    object ResResource $resResource 
    1006. -
    1007.        * @return    boolean 
    1008. -
    1009.        * @access    public
    1010. -
    1011.        */
    1012. -
    1013.     function removeRDFType($resResource)
    1014. -
    1015.     {
    1016. -
    1017.         return $this->removeProperty($this->vocabulary->TYPE(),$resResource);
    1018. -
    1019.     }
    1020. -
    1021.     
    1022. -
    1023.     /**
    1024. -
    1025.     * Remove the statement indicating the given resource as a source of
    1026. -
    1027.     * additional information about this resource.
    1028. -
    1029.     *
    1030. -
    1031.        * @param    object ResResource $resResource 
    1032. -
    1033.        * @return    boolean 
    1034. -
    1035.        * @access    public
    1036. -
    1037.        */
    1038. -
    1039.     function removeSeeAlso($resResource)
    1040. -
    1041.     {
    1042. -
    1043.         return $this->removeProperty($this->vocabulary->SEE_ALSO(),$resResource);
    1044. -
    1045.     }
    1046. -
    1047.     
    1048. -
    1049.     /**
    1050. -
    1051.     * Assert that the given string is the comment on this resource.
    1052. -
    1053.     * Any existing statements for comment will be removed.
    1054. -
    1055.     *
    1056. -
    1057.        * @param    object ResLiteral    $resLiteral 
    1058. -
    1059.        * @access    public
    1060. -
    1061.        */
    1062. -
    1063.     function setComment($resLiteral)
    1064. -
    1065.     {
    1066. -
    1067.         $this->setPropertyValue($this->vocabulary->COMMENT(),$resLiteral);
    1068. -
    1069.     }
    1070. -
    1071.     
    1072. -
    1073.     /**
    1074. -
    1075.     * Assert that the given resource provides a source of definitions about this resource.
    1076. -
    1077.     * Any existing statements for isDefinedBy will be removed.
    1078. -
    1079.     *
    1080. -
    1081.        * @param    object ResResource    $resResource 
    1082. -
    1083.        * @access    public
    1084. -
    1085.        */
    1086. -
    1087.     function setIsDefinedBy($resResource)
    1088. -
    1089.     {
    1090. -
    1091.         $this->setPropertyValue($this->vocabulary->IS_DEFINED_BY(),$resResource);
    1092. -
    1093.     }
    1094. -
    1095.     
    1096. -
    1097.     /**
    1098. -
    1099.     * Assert that the given string is the label on this resource.
    1100. -
    1101.     * Any existing statements for comment will be removed.
    1102. -
    1103.     *
    1104. -
    1105.        * @param    object ResLiteral    $resLiteral 
    1106. -
    1107.        * @access    public
    1108. -
    1109.        */
    1110. -
    1111.     function setLabelProperty($resLiteral)
    1112. -
    1113.     {
    1114. -
    1115.         $this->setPropertyValue($this->vocabulary->LABEL(),$resLiteral);
    1116. -
    1117.     }
    1118. -
    1119.     
    1120. -
    1121.     /**
    1122. -
    1123.     * Set the value of the given property of this ontology resource to the given value.
    1124. -
    1125.     * Maintains the invariant that there is at most one value of the property for a
    1126. -
    1127.     * given resource, so existing property values are first removed.
    1128. -
    1129.     * To add multiple properties, use addProperty.
    1130. -
    1131.     *
    1132. -
    1133.        * @param    object ResResource    $property 
    1134. -
    1135.        * @param    object ResResource    $value 
    1136. -
    1137.        * @access    public
    1138. -
    1139.        */
    1140. -
    1141.     function setPropertyValue($property$value)
    1142. -
    1143.     {
    1144. -
    1145.         $this->removeAll($property);
    1146. -
    1147.         $this->addProperty($property,$value);
    1148. -
    1149.     }
    1150. -
    1151.     
    1152. -
    1153.     /**
    1154. -
    1155.     * Set the RDF type (ie the class) for this resource,
    1156. -
    1157.     * replacing any existing rdf:type property. Any existing statements
    1158. -
    1159.     * for the RDF type will first be removed.
    1160. -
    1161.     *
    1162. -
    1163.        * @param    object ResResource    $resResource 
    1164. -
    1165.        * @access    public
    1166. -
    1167.        */
    1168. -
    1169.     function setRDFType($resResource)
    1170. -
    1171.     {
    1172. -
    1173.         $this->setPropertyValue($this->vocabulary->TYPE(),$resResource);
    1174. -
    1175.     }
    1176. -
    1177.     
    1178. -
    1179.     /**
    1180. -
    1181.     * Add a resource that is declared to provided additional information
    1182. -
    1183.     * about the definition of this resource
    1184. -
    1185.     *
    1186. -
    1187.        * @param    object ResResource    $resResource 
    1188. -
    1189.        * @access    public
    1190. -
    1191.        */
    1192. -
    1193.     function setSeeAlso($resResource)
    1194. -
    1195.     {
    1196. -
    1197.         $this->setPropertyValue($this->vocabulary->SEE_ALSO(),$resResource);
    1198. -
    1199.     }
    1200. -
    1201.     
    1202. -
    1203.     /**
    1204. -
    1205.     * Returns an array of ResResources that are recursively connected by $attribute
    1206. -
    1207.     * in superProperty direction.
    1208. -
    1209.     * If $onlyFindThisResResource is set to a ResResource, this function returns boolean
    1210. -
    1211.     * if this distinct resource recursively is connected to the $startResource.
    1212. -
    1213.     *
    1214. -
    1215.        * @param    object ResResource    $startResource 
    1216. -
    1217.        * @param    object ResResource    $attribute 
    1218. -
    1219.     * @param    array                $attribute 
    1220. -
    1221.     * @param    object ResResource    $onlyFindThisResResource 
    1222. -
    1223.        * @return    array OR boolean
    1224. -
    1225.        * @access    private
    1226. -
    1227.        */
    1228. -
    1229.     function _getSuperAttributeStatementsRec($startResource,$attribute,$attributeIndex$onlyFindThisResResource false)
    1230. -
    1231.     {
    1232. -
    1233.  
    1234. -
    1235.         $return $startResource->listProperties($attribute);
    1236. -
    1237.         
    1238. -
    1239.         if ($onlyFindThisResResource)
    1240. -
    1241.         {
    1242. -
    1243.             foreach ($return as $statement)
    1244. -
    1245.             {
    1246. -
    1247.                 if ($onlyFindThisResResource->equals($statement->getObject()))
    1248. -
    1249.                     return true;
    1250. -
    1251.             }    
    1252. -
    1253.         }
    1254. -
    1255.         
    1256. -
    1257.         foreach ($return as $statement)
    1258. -
    1259.         {
    1260. -
    1261.             $attributeLabel=$statement->getLabelObject();
    1262. -
    1263.             if (!in_array($attributeLabel,$attributeIndex))
    1264. -
    1265.             {
    1266. -
    1267.                 $attributeIndex[]=$attributeLabel;
    1268. -
    1269.                 $subReturn $this->_getSuperAttributeStatementsRec($statement->getObject()$attribute$attributeIndex$onlyFindThisResResource);
    1270. -
    1271.             
    1272. -
    1273.         }
    1274. -
    1275.         if (isset($subReturn))
    1276. -
    1277.         {
    1278. -
    1279.             if ($subReturn === true)
    1280. -
    1281.                 return true;
    1282. -
    1283.             return array_merge($return,$subReturn);
    1284. -
    1285.         }    
    1286. -
    1287.         
    1288. -
    1289.         return $return;
    1290. -
    1291.     }
    1292. -
    1293.     
    1294. -
    1295.     /**
    1296. -
    1297.     * Returns an array of ResResources that are recursively connected by $attribute
    1298. -
    1299.     * in subProperty direction.
    1300. -
    1301.     * If $onlyFindThisResResource is set to a ResResource, this function returns boolean
    1302. -
    1303.     * if this distinct resource recursively is connected to the $startResource.
    1304. -
    1305.     *
    1306. -
    1307.        * @param    object ResResource    $startResource 
    1308. -
    1309.        * @param    object ResResource    $attribute 
    1310. -
    1311.     * @param    array                $attribute 
    1312. -
    1313.     * @param    object ResResource    $onlyFindThisResResource 
    1314. -
    1315.        * @return    array OR boolean
    1316. -
    1317.        * @access    private
    1318. -
    1319.        */
    1320. -
    1321.     function _getSubAttributeStatementsRec($startResource,$attribute,$attributeIndex$onlyFindThisResResource false)
    1322. -
    1323.     {
    1324. -
    1325.  
    1326. -
    1327.         $return $this->model->find(null,$attribute,$startResource);
    1328. -
    1329.         
    1330. -
    1331.         if ($onlyFindThisResResource)
    1332. -
    1333.         {
    1334. -
    1335.             foreach ($return as $statement)
    1336. -
    1337.             {
    1338. -
    1339.                 if ($onlyFindThisResResource->equals($statement->getSubject()))
    1340. -
    1341.                     return true;
    1342. -
    1343.             }    
    1344. -
    1345.         }
    1346. -
    1347.         
    1348. -
    1349.         foreach ($return as $statement)
    1350. -
    1351.         {
    1352. -
    1353.             $attributeLabel=$statement->getLabelSubject();
    1354. -
    1355.             if (!in_array($attributeLabel,$attributeIndex))
    1356. -
    1357.             {
    1358. -
    1359.                 $attributeIndex[]=$attributeLabel;
    1360. -
    1361.                 $subReturn $this->_getSubAttributeStatementsRec($statement->getSubject()$attribute$attributeIndex$onlyFindThisResResource);
    1362. -
    1363.             
    1364. -
    1365.         }
    1366. -
    1367.         if (isset($subReturn))
    1368. -
    1369.         {
    1370. -
    1371.             if ($subReturn === true)
    1372. -
    1373.                 return true;
    1374. -
    1375.             return array_merge($return,$subReturn);
    1376. -
    1377.         }
    1378. -
    1379.             
    1380. -
    1381.         return $return;
    1382. -
    1383.     }
    1384. -
    1385.     
    1386. -
    1387.     /**
    1388. -
    1389.     * Add a property to this resource.
    1390. -
    1391.     * A statement with this resource as the subject, p as the predicate and o
    1392. -
    1393.     * as the object is added to the model associated with this resource.
    1394. -
    1395.     * If $this->rdfType is set, an additional statement about it's type
    1396. -
    1397.     * is added.
    1398. -
    1399.     *
    1400. -
    1401.        * @param    ResResource                $property 
    1402. -
    1403.        * @param    ResResource/ResLiteral    $object 
    1404. -
    1405.        * @return    object ResResource 
    1406. -
    1407.        * @access    public
    1408. -
    1409.        */
    1410. -
    1411.     function addProperty($property,$object)
    1412. -
    1413.     {
    1414. -
    1415.         if ($this->rdfType !== false)
    1416. -
    1417.             if (!$this->hasRDFType($this->rdfType))
    1418. -
    1419.                     $this->model->add(new Statement($this,$this->vocabulary->TYPE(),$this->rdfType));
    1420. -
    1421.     
    1422. -
    1423.         return parent:: addProperty($property,$object);
    1424. -
    1425.     }
    1426. -
    1427.     
    1428. -
    1429.     /**
    1430. -
    1431.     * Sets the rdf:type, that this distinct resource is instance of.
    1432. -
    1433.     * If this value is set, the ontModel will add an additional
    1434. -
    1435.     * statement about this resource and the fiven rdf:type
    1436. -
    1437.     *
    1438. -
    1439.     * @param object ResResource $resResource 
    1440. -
    1441.     * @access    public
    1442. -
    1443.     */
    1444. -
    1445.     function setInstanceRdfType($resResource)
    1446. -
    1447.     {
    1448. -
    1449.         $this->rdfType $resResource;
    1450. -
    1451.     }
    1452. -
    1453.     
    1454. -
    1455.     /**
    1456. -
    1457.     * returns the rdf:type, that this distinct resource is instance of.
    1458. -
    1459.     *
    1460. -
    1461.     * @return object ResResource $resResource
    1462. -
    1463.     * @access    public
    1464. -
    1465.     */
    1466. -
    1467.     function getInstanceRdfType()
    1468. -
    1469.     {
    1470. -
    1471.         return $this->rdfType;
    1472. -
    1473.     }
    1474. -
    1475. -
    1476. ?>
    1477. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:14 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntVocabulary.php.html deleted file mode 100755 index 02a65f02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelOntVocabulary.php.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - File Source for OntVocabulary.php - - - - - -

    Source for file OntVocabulary.php

    -

    Documentation is available at OntVocabulary.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: OntVocabulary
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Base Class that encapsulates the elements of a general vocabulary
    16. -
    17. * corresponding to a particular ontology language. The intent is that,
    18. -
    19. * using a given vocabulary, a given RDF model can be processed as an
    20. -
    21. * ontology description, without binding knowledge of the vocabulary
    22. -
    23. * into this Class
    24. -
    25. *
    26. -
    27. @version  $Id: fsource_ontModel__ontModelOntVocabulary.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29. @author Daniel Westphal <mail at d-westphal dot de>
    30. -
    31. *
    32. -
    33. *
    34. -
    35. @package     ontModel
    36. -
    37. @access    public
    38. -
    39. ***/
    40. -
    41. -
    42. {
    43. -
    44.     
    45. -
    46. }
    47. -
    48. ?>
    49. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelRdfsVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelRdfsVocabulary.php.html deleted file mode 100755 index 516b822f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_ontModel__ontModelRdfsVocabulary.php.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - File Source for RdfsVocabulary.php - - - - - -

    Source for file RdfsVocabulary.php

    -

    Documentation is available at RdfsVocabulary.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdfsVocabulary
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * RDFS vocabulary items
    16. -
    17. *
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_ontModel__ontModelRdfsVocabulary.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. *
    28. -
    29. @package     ontModel
    30. -
    31. @access    public
    32. -
    33. ***/
    34. -
    35. class RdfsVocabulary extends OntVocabulary 
    36. -
    37. {
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Answer the resource that represents the class 'class' in this vocabulary.
    44. -
    45.     *
    46. -
    47.        * @return    object ResResource 
    48. -
    49.        * @access    public
    50. -
    51.        */
    52. -
    53.     function ONTCLASS()
    54. -
    55.     {
    56. -
    57.         return new ResResource(RDF_SCHEMA_URI.RDFS_CLASS);    
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     * Answer the predicate that denotes the domain of a property.
    66. -
    67.     *
    68. -
    69.        * @return    object ResProperty 
    70. -
    71.        * @access    public
    72. -
    73.        */
    74. -
    75.     function DOMAIN()
    76. -
    77.     {
    78. -
    79.         return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);    
    80. -
    81.     }
    82. -
    83.     
    84. -
    85.      
    86. -
    87.      /**
    88. -
    89.     * Answer the predicate that denotes comment annotation on an ontology element.
    90. -
    91.     *
    92. -
    93.        * @return    object ResProperty 
    94. -
    95.        * @access    public
    96. -
    97.        */
    98. -
    99.     function COMMENT()
    100. -
    101.     {
    102. -
    103.         return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);    
    104. -
    105.     }
    106. -
    107.     
    108. -
    109.      /**
    110. -
    111.     * Answer the predicate that denotes isDefinedBy annotation on an ontology element
    112. -
    113.     *
    114. -
    115.        * @return    object ResProperty 
    116. -
    117.        * @access    public
    118. -
    119.        */
    120. -
    121.     function IS_DEFINED_BY()
    122. -
    123.     {
    124. -
    125.         return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
    126. -
    127.     }
    128. -
    129.     
    130. -
    131.     /**
    132. -
    133.     * Answer the predicate that denotes label annotation on an ontology element
    134. -
    135.     *
    136. -
    137.        * @return    object ResProperty 
    138. -
    139.        * @access    public
    140. -
    141.        */
    142. -
    143.     function LABEL()
    144. -
    145.     {
    146. -
    147.         return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
    148. -
    149.     }
    150. -
    151.     
    152. -
    153.     /**
    154. -
    155.     * Answer the predicate that denotes the domain of a property.
    156. -
    157.     *
    158. -
    159.        * @return    object ResProperty 
    160. -
    161.        * @access    public
    162. -
    163.        */
    164. -
    165.     function RANGE()
    166. -
    167.     {
    168. -
    169.         return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
    170. -
    171.     }
    172. -
    173.     
    174. -
    175.     /**
    176. -
    177.     * Answer the predicate that denotes seeAlso annotation on an ontology element
    178. -
    179.     *
    180. -
    181.        * @return    object ResProperty 
    182. -
    183.        * @access    public
    184. -
    185.        */
    186. -
    187.     function SEE_ALSO()
    188. -
    189.     {
    190. -
    191.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
    192. -
    193.     }
    194. -
    195.     
    196. -
    197.     /**
    198. -
    199.     * Answer the predicate that denotes that one class is a sub-class of another.
    200. -
    201.     *
    202. -
    203.        * @return    object ResProperty 
    204. -
    205.        * @access    public
    206. -
    207.        */
    208. -
    209.     function SUB_CLASS_OF()
    210. -
    211.     {
    212. -
    213.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
    214. -
    215.     }
    216. -
    217.     
    218. -
    219.     /**
    220. -
    221.     * Answer the predicate that denotes that one property is a sub-property of another.
    222. -
    223.     *
    224. -
    225.        * @return    object ResProperty 
    226. -
    227.        * @access    public
    228. -
    229.        */
    230. -
    231.     function SUB_PROPERTY_OF()
    232. -
    233.     {
    234. -
    235.         return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Answer the string that is the namespace prefix for this vocabulary
    244. -
    245.     *
    246. -
    247.        * @return    string 
    248. -
    249.        * @access    public
    250. -
    251.        */
    252. -
    253.     function NAMESPACE()
    254. -
    255.     {
    256. -
    257.         return RDF_SCHEMA_URI;
    258. -
    259.     }
    260. -
    261.     
    262. -
    263.     /**
    264. -
    265.     * Answer the predicate that denotes the rdf:type property.
    266. -
    267.     *
    268. -
    269.        * @return    object ResProperty 
    270. -
    271.        * @access    public
    272. -
    273.        */
    274. -
    275.     function TYPE()
    276. -
    277.     {
    278. -
    279.         return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
    280. -
    281.     }
    282. -
    283. -
    284. ?>
    285. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlDbEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlDbEngine.php.html deleted file mode 100755 index 80cd955f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlDbEngine.php.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - File Source for RdqlDbEngine.php - - - - - -

    Source for file RdqlDbEngine.php

    -

    Documentation is available at RdqlDbEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlDbEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class performs as RDQL query on a DbModel.
    16. -
    17.  *
    18. -
    19.  * Provided an rdql query parsed into an array of php variables and constraints
    20. -
    21.  * at first the engine generates an sql statement and queries the database for
    22. -
    23.  * tuples matching all patterns from the WHERE clause of the given RDQL query.
    24. -
    25.  * Subsequently the result set is is filtered with evaluated boolean expressions
    26. -
    27.  * from the AND clause of the given RDQL query.
    28. -
    29.  *
    30. -
    31.  * @version  $Id: fsource_rdql__rdqlRdqlDbEngine.php.html 443 2007-06-01 16:25:38Z cax $
    32. -
    33.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    34. -
    35.  *
    36. -
    37.  * @package rdql
    38. -
    39.  * @access public
    40. -
    41.  */
    42. -
    43.  
    44. -
    45. Class RdqlDbEngine extends RdqlEngine {
    46. -
    47.  
    48. -
    49.  
    50. -
    51. /**
    52. -
    53.  * Parsed query variables and constraints.
    54. -
    55.  *
    56. -
    57.  * @var     array   ['selectVars'][] = ?VARNAME
    58. -
    59.  *                   ['sources'][] = URI
    60. -
    61.  *                   ['patterns'][]['subject']['value'] = VARorURI
    62. -
    63.  *                                 ['predicate']['value'] = VARorURI
    64. -
    65.  *                                 ['object']['value'] = VARorURIorLiterl
    66. -
    67.  *                                           ['is_literal'] = boolean
    68. -
    69.  *                                           ['l_lang'] = string
    70. -
    71.  *                                           ['l_dtype'] = string
    72. -
    73.  *                   ['filters'][]['string'] = string
    74. -
    75.  *                                ['evalFilterStr'] = string
    76. -
    77.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    78. -
    79.  *                                                  ['operator'] = (eq | ne)
    80. -
    81.  *                                                  ['regex'] = string
    82. -
    83.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    84. -
    85.  *                                                ['operator'] = (eq | ne)
    86. -
    87.  *                                                ['value'] = string
    88. -
    89.  *                                                ['value_type'] = ('variable' | 'URI' | 'Literal')
    90. -
    91.  *                                                ['value_lang'] = string
    92. -
    93.  *                                                ['value_dtype'] = string
    94. -
    95.  *                                ['numExpr']['vars'][] = ?VARNAME
    96. -
    97.  *                          ( [] stands for an integer index - 0..N )
    98. -
    99.  * @access    private
    100. -
    101.  */
    102. -
    103.  var $parsedQuery;
    104. -
    105.  
    106. -
    107.  
    108. -
    109. /**
    110. -
    111.  * When an RDQL query is performed on a DbModel, in first step the engine searches
    112. -
    113.  * in database for triples matching the Rdql-WHERE clause. A recordSet is returned.
    114. -
    115.  * $rsIndexes maps select and filter variables to their corresponding indexes
    116. -
    117.  * in the returned recordSet.
    118. -
    119.  *
    120. -
    121.  * @var     array [?VARNAME]['value'] = integer
    122. -
    123.  *                           ['nType'] = integer
    124. -
    125.  *                           ['l_lang'] = integer
    126. -
    127.  *                           ['l_dtype'] = integer
    128. -
    129.  * @access    private
    130. -
    131.  */
    132. -
    133.  var $rsIndexes;
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  /**
    140. -
    141.  * Perform an RDQL Query on the given DbModel.
    142. -
    143.  *
    144. -
    145.  * @param   object  DbModel $dbModel 
    146. -
    147.  * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
    148. -
    149.  * @param   boolean $returnNodes 
    150. -
    151.  * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    152. -
    153.  *       OR  array   [][?VARNAME] = string
    154. -
    155.  * @access  public
    156. -
    157.  */
    158. -
    159.  function queryModel(&$dbModel&$parsedQuery$returnNodes TRUE{
    160. -
    161.  
    162. -
    163.    $this->parsedQuery &$parsedQuery;
    164. -
    165.  
    166. -
    167.    $sql $this->generateSql($dbModel->modelID);
    168. -
    169.    $recordSet =$dbModel->dbConn->execute($sql);
    170. -
    171.    $queryResult $this->filterQueryResult($recordSet);
    172. -
    173.  
    174. -
    175.    if ($returnNodes)
    176. -
    177.       return $this->toNodes($queryResult);
    178. -
    179.    else
    180. -
    181.       return $this->toString($queryResult);
    182. -
    183.  }
    184. -
    185.  
    186. -
    187.  
    188. -
    189.  /**
    190. -
    191.  * Generate an SQL string to query the database for tuples matching all patterns
    192. -
    193.  * of $parsedQuery.
    194. -
    195.  *
    196. -
    197.  * @param   integer $modelID 
    198. -
    199.  * @return  string 
    200. -
    201.  * @access    private
    202. -
    203.  */
    204. -
    205.  function generateSql($modelID{
    206. -
    207.  
    208. -
    209.    $sql  $this->generateSql_SelectClause();
    210. -
    211.    $sql .= $this->generateSql_FromClause();
    212. -
    213.    $sql .= $this->generateSql_WhereClause($modelID);
    214. -
    215.    return $sql;
    216. -
    217.  }
    218. -
    219.  
    220. -
    221.  
    222. -
    223. /**
    224. -
    225.  * Generate SQL SELECT clause.
    226. -
    227.  *
    228. -
    229.  * @return  string 
    230. -
    231.  * @throws  PHPError
    232. -
    233.  * @access    private
    234. -
    235.  */
    236. -
    237.  function generateSql_SelectClause({
    238. -
    239.  
    240. -
    241.    $sql_select 'SELECT';
    242. -
    243.    $index 0;
    244. -
    245.    $this->rsIndexes array();
    246. -
    247.  
    248. -
    249.    foreach ($this->parsedQuery['selectVars'as $var)
    250. -
    251.      $sql_select .= $this->_generateSql_SelectVar($var$index);
    252. -
    253.  
    254. -
    255.    if (isset($this->parsedQuery['filters'])) {
    256. -
    257.        foreach ($this->parsedQuery['filters'as $n => $filter{
    258. -
    259.  
    260. -
    261.          // variables from numeric expressions
    262. -
    263.          foreach ($filter['numExprVars'as $numVar)
    264. -
    265.            $sql_select .= $this->_generateSql_SelectVar($numVar$index);
    266. -
    267.  
    268. -
    269.          // variables from regex equality expressions
    270. -
    271.          foreach ($filter['regexEqExprs'as $regexEqExpr)
    272. -
    273.            $sql_select .= $this->_generateSql_SelectVar($regexEqExpr['var']$index);
    274. -
    275.  
    276. -
    277.          // variables from string equality expressions
    278. -
    279.          foreach ($filter['strEqExprs'as $strEqVar)
    280. -
    281.              $sql_select .= $this->_generateSql_SelectVar($strEqVar['var']$index);
    282. -
    283.        }
    284. -
    285.    }
    286. -
    287.  
    288. -
    289.    return rtrim($sql_select" , ");
    290. -
    291.  }
    292. -
    293.  
    294. -
    295.  
    296. -
    297. /**
    298. -
    299.  * Generate SQL FROM clause
    300. -
    301.  *
    302. -
    303.  * @return  string 
    304. -
    305.  * @access    private
    306. -
    307.  */
    308. -
    309.  function generateSql_FromClause({
    310. -
    311.  
    312. -
    313.    $sql_from ' FROM';
    314. -
    315.    foreach ($this->parsedQuery['patterns'as $n => $v)
    316. -
    317.      $sql_from .= ' statements s' .($n+1.' , ';
    318. -
    319.  
    320. -
    321.    return rtrim($sql_from' , ');
    322. -
    323.  }
    324. -
    325.  
    326. -
    327.  
    328. -
    329. /**
    330. -
    331.  * Generate an SQL WHERE clause
    332. -
    333.  *
    334. -
    335.  * @param   integer $modelID 
    336. -
    337.  * @return  string 
    338. -
    339.  * @access    private
    340. -
    341.  */
    342. -
    343.  function generateSql_WhereClause($modelID{
    344. -
    345.  
    346. -
    347.    $sql_where ' WHERE';
    348. -
    349.    $count_patterns count($this->parsedQuery['patterns']);
    350. -
    351.    foreach ($this->parsedQuery['patterns'as $n => $pattern{
    352. -
    353.      $sql_where .= ' s' .($n+1.'.modelID=' .$modelID .' AND';
    354. -
    355.      foreach ($pattern as $key => $val_1)
    356. -
    357.        if ($val_1['value'&& $val_1['value']{0}=='?'{
    358. -
    359.          $sql_tmp ' s' .($n+1.'.' .$key .'=';
    360. -
    361.          // find internal bindings
    362. -
    363.          switch ($key{
    364. -
    365.            case 'subject':
    366. -
    367.                     if ($pattern['subject']['value'== $pattern['predicate']['value'])
    368. -
    369.                        $sql_where .= $sql_tmp .'s' .($n+1.'.predicate AND';
    370. -
    371.                     elseif ($pattern['subject']['value'== $pattern['object']['value'])
    372. -
    373.                        $sql_where .= $sql_tmp .'s' .($n+1.'.object AND';
    374. -
    375.                     break;
    376. -
    377.            case 'predicate':
    378. -
    379.                     if ($pattern['predicate']['value'== $pattern['object']['value'])
    380. -
    381.                        $sql_where .= $sql_tmp .'s' .($n+1.'.object AND';
    382. -
    383.          }
    384. -
    385.          // find external bindings
    386. -
    387.          for ($i=$n+1$i<$count_patterns$i++)
    388. -
    389.              foreach ($this->parsedQuery['patterns'][$ias $key2 => $val_2)
    390. -
    391.                if ($val_1['value']==$val_2['value']{
    392. -
    393.                   $sql_where .= $sql_tmp .'s' .($i+1.'.' .$key2 .' AND';
    394. -
    395.                   break 2;
    396. -
    397.                }
    398. -
    399.        }else {
    400. -
    401.           $sql_where .= ' s' .($n+1.'.' .$key ."='" .$val_1['value'."' AND";
    402. -
    403.           if ($key == 'object' && isset($val_1['is_literal'])) {
    404. -
    405.               $sql_where .= ' s' .($n+1.".object_is='l' AND";
    406. -
    407.               $sql_where .= ' s' .($n+1.".l_datatype='" .$val_1['l_dtype'."' AND";
    408. -
    409.               $sql_where .= ' s' .($n+1.".l_language='" .$val_1['l_lang'."' AND";
    410. -
    411.           }
    412. -
    413.        }
    414. -
    415.    }
    416. -
    417.    return rtrim($sql_where' AND');
    418. -
    419.  }
    420. -
    421.  
    422. -
    423.  
    424. -
    425. /**
    426. -
    427.  * Filter tuples containing variables matching all patterns from the WHERE clause
    428. -
    429.  * of an RDQL query. As a result of a database query using ADOdb these tuples
    430. -
    431.  * are returned as an ADORecordSet object, which is then passed to this function.
    432. -
    433.  *
    434. -
    435.  * @param   object ADORecordSet &$recordSet 
    436. -
    437.  * @return  array  [][?VARNAME]['value']   = string
    438. -
    439.  *                              ['nType']   = string
    440. -
    441.  *                              ['l_lang']  = string
    442. -
    443.  *                              ['l_dtype'] = string
    444. -
    445.  * @access    private
    446. -
    447.  */
    448. -
    449.  function filterQueryResult(&$recordSet{
    450. -
    451.    $queryResult=array();
    452. -
    453.  
    454. -
    455.    if (isset($this->parsedQuery['filters'])) {
    456. -
    457.  
    458. -
    459.        while (!$recordSet->EOF{
    460. -
    461.  
    462. -
    463.          foreach ($this->parsedQuery['filters'as $filter{
    464. -
    465.  
    466. -
    467.            $evalFilterStr $filter['evalFilterStr'];
    468. -
    469.  
    470. -
    471.            // evaluate regex equality expressions of each filter
    472. -
    473.            foreach ($filter['regexEqExprs'as $i => $expr{
    474. -
    475.                preg_match($expr['regex']$recordSet->fields[$this->rsIndexes[$expr['var']]['value']]$match);
    476. -
    477.                $op substr($expr['operator']0,1);
    478. -
    479.                if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
    480. -
    481.                   $evalFilterStr str_replace("##RegEx_$i##"'FALSE'$evalFilterStr);
    482. -
    483.                else
    484. -
    485.                   $evalFilterStr str_replace("##RegEx_$i##"'TRUE'$evalFilterStr);
    486. -
    487.            }
    488. -
    489.  
    490. -
    491.            // evaluate string equality expressions
    492. -
    493.            foreach ($filter['strEqExprs'as $i => $expr{
    494. -
    495.  
    496. -
    497.              $exprBoolVal 'FALSE';
    498. -
    499.  
    500. -
    501.              switch ($expr['value_type']{
    502. -
    503.  
    504. -
    505.                case 'variable':
    506. -
    507.                     if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
    508. -
    509.                            $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
    510. -
    511.                          $expr['operator'== 'eq'||
    512. -
    513.                         ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
    514. -
    515.                            $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
    516. -
    517.                          $expr['operator'== 'ne'))
    518. -
    519.  
    520. -
    521.                        $exprBoolVal 'TRUE';
    522. -
    523.                     break;
    524. -
    525.  
    526. -
    527.                case 'URI':
    528. -
    529.  
    530. -
    531.                       if (isset($this->rsIndexes[$expr['var']]['nType']&&
    532. -
    533.                            $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] == 'l'{
    534. -
    535.  
    536. -
    537.                          if ($expr['operator'== 'ne')
    538. -
    539.                             $exprBoolVal 'TRUE';
    540. -
    541.                          break;
    542. -
    543.                       }
    544. -
    545.  
    546. -
    547.                     if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
    548. -
    549.                            $expr['value'&& $expr['operator'== 'eq'||
    550. -
    551.                         ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
    552. -
    553.                            $expr['value'&& $expr['operator'== 'ne'))
    554. -
    555.                        $exprBoolVal 'TRUE';
    556. -
    557.                     break;
    558. -
    559.  
    560. -
    561.                case 'Literal':
    562. -
    563.  
    564. -
    565.                     if (!isset($this->rsIndexes[$expr['var']]['nType']||
    566. -
    567.                            $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] != 'l'{
    568. -
    569.  
    570. -
    571.                        if ($expr['operator'== 'ne')
    572. -
    573.                           $exprBoolVal 'TRUE';
    574. -
    575.                        break;
    576. -
    577.                     }
    578. -
    579.  
    580. -
    581.                     $filterLiteralnew Literal($expr['value'],$expr['value_lang']);
    582. -
    583.                     $filterLiteral->setDatatype($expr['value_dtype']);
    584. -
    585.  
    586. -
    587.                     $resultLiteral=new Literal($recordSet->fields[$this->rsIndexes[$expr['var']]['value']]);
    588. -
    589.                     $resultLiteral->setDatatype($recordSet->fields[$this->rsIndexes[$expr['var']]['l_dtype']]);
    590. -
    591.                     $resultLiteral->setLanguage($recordSet->fields[$this->rsIndexes[$expr['var']]['l_lang']]);
    592. -
    593.  
    594. -
    595.                     $equal=$resultLiteral->equals($filterLiteral);
    596. -
    597.  
    598. -
    599.                     if (($equal && $expr['operator'== 'eq'||
    600. -
    601.                         (!$equal && $expr['operator'== 'ne'))
    602. -
    603.                        $exprBoolVal 'TRUE';
    604. -
    605.                     else
    606. -
    607.                        $exprBoolVal 'FALSE';
    608. -
    609.  
    610. -
    611.              }
    612. -
    613.  
    614. -
    615.              $evalFilterStr str_replace("##strEqExpr_$i##"$exprBoolVal$evalFilterStr);
    616. -
    617.           }
    618. -
    619.  
    620. -
    621.           // evaluate numerical expressions
    622. -
    623.           foreach ($filter['numExprVars'as $varName{
    624. -
    625.             $varValue "'" .$recordSet->fields[$this->rsIndexes[$varName]['value']] ."'";
    626. -
    627.             $evalFilterStr str_replace($varName$varValue$evalFilterStr);
    628. -
    629.           }
    630. -
    631.  
    632. -
    633.           eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
    634. -
    635.           if (!isset($eval_filter_ok))
    636. -
    637.              trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']."'"E_USER_ERROR);
    638. -
    639.  
    640. -
    641.           if (!$filterBoolVal{
    642. -
    643.              $recordSet->MoveNext();
    644. -
    645.              continue 2;
    646. -
    647.           }
    648. -
    649.  
    650. -
    651.         }
    652. -
    653.         $queryResult[$this->_convertRsRowToQueryResultRow($recordSet->fields);
    654. -
    655.         $recordSet->MoveNext();
    656. -
    657.       }
    658. -
    659.  
    660. -
    661.    }else
    662. -
    663.       while (!$recordSet->EOF{
    664. -
    665.         $queryResult[$this->_convertRsRowToQueryResultRow($recordSet->fields);
    666. -
    667.         $recordSet->MoveNext();
    668. -
    669.       }
    670. -
    671.    return $queryResult;
    672. -
    673.  }
    674. -
    675.  
    676. -
    677.  
    678. -
    679. /**
    680. -
    681.  * Serialize variable values of $queryResult to string.
    682. -
    683.  *
    684. -
    685.  * @param   array  &$queryResult [][?VARNAME]['value']   = string
    686. -
    687.  *                                            ['nType']   = string
    688. -
    689.  *                                            ['l_lang']  = string
    690. -
    691.  *                                            ['l_dtype'] = string
    692. -
    693.  * @return  array  [][?VARNAME] = string
    694. -
    695.  * @access    private
    696. -
    697.  */
    698. -
    699.  function toString(&$queryResult{
    700. -
    701.  
    702. -
    703.    // if a result set is empty return only variable sames
    704. -
    705.    if (count($queryResult== 0{
    706. -
    707.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    708. -
    709.          $res[0][$selectVarNULL;
    710. -
    711.       return $res;
    712. -
    713.    }
    714. -
    715.  
    716. -
    717.    $res array();
    718. -
    719.    foreach ($queryResult as $n => $var)
    720. -
    721.      foreach ($var as $varname => $varProperties)
    722. -
    723.        if ($varProperties['nType'== 'r' || $varProperties['nType'== 'b')
    724. -
    725.           $res[$n][$varname'<' .$varProperties['value'.'>';
    726. -
    727.        else {
    728. -
    729.           $res[$n][$varname'"' .$varProperties['value'.'"';
    730. -
    731.           if ($varProperties['l_lang'!= NULL)
    732. -
    733.              $res[$n][$varname.= ' (xml:lang="' .$varProperties['l_lang'.'")';
    734. -
    735.           if ($varProperties['l_dtype'!= NULL)
    736. -
    737.              $res[$n][$varname.= ' (rdf:datatype="' .$varProperties['l_dtype'.'")';
    738. -
    739.        }
    740. -
    741.    return $res;
    742. -
    743.  }
    744. -
    745.  
    746. -
    747.  
    748. -
    749. /**
    750. -
    751.  * Convert variable values of $queryResult to objects (Node).
    752. -
    753.  *
    754. -
    755.  * @param   array  &$queryResult [][?VARNAME]['value']   = string
    756. -
    757.  *                                            ['nType']   = string
    758. -
    759.  *                                            ['l_lang']  = string
    760. -
    761.  *                                            ['l_dtype'] = string
    762. -
    763.  * @return  array  [][?VARNAME] = object Node
    764. -
    765.  * @access    private
    766. -
    767.  */
    768. -
    769.  function toNodes(&$queryResult{
    770. -
    771.  
    772. -
    773.    // if a result set is empty return only variable sames
    774. -
    775.    if (count($queryResult== 0{
    776. -
    777.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    778. -
    779.          $res[0][$selectVarNULL;
    780. -
    781.       return $res;
    782. -
    783.    }
    784. -
    785.  
    786. -
    787.    $res array();
    788. -
    789.    foreach ($queryResult as $n => $var)
    790. -
    791.      foreach ($var as $varname => $varProperties)
    792. -
    793.        if ($varProperties['nType'== 'r')
    794. -
    795.           $res[$n][$varnamenew Resource($varProperties['value']);
    796. -
    797.        elseif ($varProperties['nType'== 'b')
    798. -
    799.           $res[$n][$varnamenew BlankNode($varProperties['value']);
    800. -
    801.        else {
    802. -
    803.           $res[$n][$varnamenew Literal($varProperties['value']$varProperties['l_lang']);
    804. -
    805.           if ($varProperties['l_dtype'!= NULL)
    806. -
    807.              $res[$n][$varname]->setDataType($varProperties['l_dtype']);
    808. -
    809.        }
    810. -
    811.    return $res;
    812. -
    813.  }
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /**
    820. -
    821.  * Generate a piece of an sql select statement for a variable.
    822. -
    823.  * Look first if the given variable is defined as a pattern object.
    824. -
    825.  * (So you can select the node type, literal lang and dtype)
    826. -
    827.  * If not found - look for subjects and select node label and type.
    828. -
    829.  * If there is no result either go to predicates.
    830. -
    831.  * Predicates are always resources therefore select only the node label.
    832. -
    833.  *
    834. -
    835.  * @param   string $varName 
    836. -
    837.  * @return  string 
    838. -
    839.  * @access    private
    840. -
    841.  */
    842. -
    843. function _generateSql_SelectVar ($varName&$index{
    844. -
    845.  
    846. -
    847.   $sql_select '';
    848. -
    849.  
    850. -
    851.   if (array_key_exists($varName$this->rsIndexes))
    852. -
    853.      return NULL;
    854. -
    855.  
    856. -
    857.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    858. -
    859.     if ($varName == $pattern['object']['value']{
    860. -
    861.  
    862. -
    863.        // select the object label
    864. -
    865.        $sql_select .= " s" .++$n .".object as _" .ltrim($varName"?"." , ";
    866. -
    867.        $this->rsIndexes[$varName]['value'$index++;
    868. -
    869.        // select the node type
    870. -
    871.        $sql_select .= " s" .$n .".object_is , ";
    872. -
    873.        $this->rsIndexes[$varName]['nType'$index++;
    874. -
    875.        // select the object language
    876. -
    877.        $sql_select .= " s" .$n .".l_language , ";
    878. -
    879.        $this->rsIndexes[$varName]['l_lang'$index++;
    880. -
    881.        // select the object dtype
    882. -
    883.        $sql_select .= " s" .$n .".l_datatype , ";
    884. -
    885.        $this->rsIndexes[$varName]['l_dtype'$index++;
    886. -
    887.  
    888. -
    889.        return $sql_select;
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    896. -
    897.     if ($varName == $pattern['subject']['value']{
    898. -
    899.  
    900. -
    901.        // select the object label
    902. -
    903.        $sql_select .= " s" .++$n .".subject as _" .ltrim($varName"?"." , ";
    904. -
    905.        $this->rsIndexes[$varName]['value'$index++;
    906. -
    907.        // select the node type
    908. -
    909.        $sql_select .= " s" .$n .".subject_is , ";
    910. -
    911.        $this->rsIndexes[$varName]['nType'$index++;
    912. -
    913.  
    914. -
    915.        return $sql_select;
    916. -
    917.     }
    918. -
    919.  
    920. -
    921.   foreach ($this->parsedQuery['patterns'as $n => $pattern)
    922. -
    923.     if ($varName == $pattern['predicate']['value']{
    924. -
    925.  
    926. -
    927.        // select the object label
    928. -
    929.        $sql_select .= " s" .++$n .".predicate as _" .ltrim($varName"?"." , ";
    930. -
    931.        $this->rsIndexes[$varName]['value'$index++;
    932. -
    933.  
    934. -
    935.        return $sql_select;
    936. -
    937.     }
    938. -
    939.  }
    940. -
    941.  
    942. -
    943.  
    944. -
    945. /**
    946. -
    947.  * Converts a single row of ADORecordSet->fields array to the format of
    948. -
    949.  * $queryResult array using pointers to indexes ($this->rsIndexes) in RecordSet->fields.
    950. -
    951.  *
    952. -
    953.  * @param   array  &$record [] = string
    954. -
    955.  * @return  array  [?VARNAME]['value']   = string
    956. -
    957.  *                            ['nType']   = string
    958. -
    959.  *                            ['l_lang']  = string
    960. -
    961.  *                            ['l_dtype'] = string
    962. -
    963.  * @access    private
    964. -
    965.  */
    966. -
    967.  function _convertRsRowToQueryResultRow(&$record{
    968. -
    969.  
    970. -
    971.    // return only select variables (without conditional variables from the AND clause)
    972. -
    973.    foreach ($this->parsedQuery['selectVars'as $selectVar{
    974. -
    975.      $resultRow[$selectVar]['value'$record[$this->rsIndexes[$selectVar]['value']];
    976. -
    977.      if (isset($this->rsIndexes[$selectVar]['nType']))
    978. -
    979.         $resultRow[$selectVar]['nType'$record[$this->rsIndexes[$selectVar]['nType']];
    980. -
    981.      // is a predicate then
    982. -
    983.      else
    984. -
    985.         $resultRow[$selectVar]['nType''r';
    986. -
    987.  
    988. -
    989.      if ($resultRow[$selectVar]['nType'== 'l'{
    990. -
    991.         $resultRow[$selectVar]['l_lang'$record[$this->rsIndexes[$selectVar]['l_lang']];
    992. -
    993.         $resultRow[$selectVar]['l_dtype'$record[$this->rsIndexes[$selectVar]['l_dtype']];
    994. -
    995.      }
    996. -
    997.    }
    998. -
    999.    return $resultRow;
    1000. -
    1001.  }
    1002. -
    1003.  
    1004. -
    1005. // end: Class RdqlDbEngine
    1006. -
    1007.  
    1008. -
    1009. ?>
    1010. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlEngine.php.html deleted file mode 100755 index 22a0f1dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlEngine.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - File Source for RdqlEngine.php - - - - - -

    Source for file RdqlEngine.php

    -

    Documentation is available at RdqlEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Some general methods common for RdqlMemEngine and RdqlDbEngine
    16. -
    17.  *
    18. -
    19.  * @version  $Id: fsource_rdql__rdqlRdqlEngine.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    22. -
    23.  *
    24. -
    25.  * @package rdql
    26. -
    27.  * @access public
    28. -
    29.  */
    30. -
    31.  
    32. -
    33. Class RdqlEngine extends Object{
    34. -
    35.  
    36. -
    37.     
    38. -
    39.  
    40. -
    41. /**
    42. -
    43.  * Prints a query result as HTML table.
    44. -
    45.  * You can change the colors in the configuration file.
    46. -
    47.  *
    48. -
    49.  * @param array $queryResult [][?VARNAME] = object Node
    50. -
    51.  * @access private
    52. -
    53.  */
    54. -
    55.  function writeQueryResultAsHtmlTable($queryResult{
    56. -
    57.        // Import Package Utility
    58. -
    59.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    60. -
    61.  
    62. -
    63.    if (current($queryResult[0]== NULL{
    64. -
    65.       echo 'no match<br>';
    66. -
    67.       return;
    68. -
    69.    }
    70. -
    71.  
    72. -
    73.         echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
    74. -
    75.    foreach ($queryResult[0as $varName => $value)
    76. -
    77.      echo "<td align='center'><b>$varName</b></td>";
    78. -
    79.      echo '</tr>';
    80. -
    81.  
    82. -
    83.    foreach ($queryResult as $n => $var{
    84. -
    85.  
    86. -
    87.            
    88. -
    89.      echo '<tr><td width="20" align="right">' .($n 1.'.</td>';
    90. -
    91.      foreach ($var as $varName => $value{
    92. -
    93.        echo INDENTATION INDENTATION '<td bgcolor="';
    94. -
    95.           echo RDFUtil::chooseColor($value);
    96. -
    97.        echo '">';
    98. -
    99.        echo '<p>';
    100. -
    101.  
    102. -
    103.        $lang  NULL;
    104. -
    105.        $dtype NULL;
    106. -
    107.        if (is_a($value'Literal')) {
    108. -
    109.            if ($value->getLanguage(!= NULL)
    110. -
    111.                $lang ' <b>(xml:lang="' $value->getLanguage('") </b> ';
    112. -
    113.            if ($value->getDatatype(!= NULL)
    114. -
    115.                 $dtype ' <b>(rdf:datatype="' $value->getDatatype('") </b> ';
    116. -
    117.        }
    118. -
    119.          echo  RDFUtil::getNodeTypeName($value.$value->getLabel($lang $dtype .'</p>';
    120. -
    121.      }
    122. -
    123.      echo '</tr>';
    124. -
    125.    }
    126. -
    127.    echo '</table>';
    128. -
    129.  }
    130. -
    131.  
    132. -
    133. // end: Class RdqlEngine
    134. -
    135.  
    136. -
    137. ?>
    138. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlMemEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlMemEngine.php.html deleted file mode 100755 index 0cc40927..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlMemEngine.php.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - File Source for RdqlMemEngine.php - - - - - -

    Source for file RdqlMemEngine.php

    -

    Documentation is available at RdqlMemEngine.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlMemEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class performes as RDQL query on a MemModel.
    16. -
    17.  *
    18. -
    19.  * Provided an rdql query parsed into an array of php variables and constraints
    20. -
    21.  * at first the engine searches for tuples matching all patterns from the WHERE clause
    22. -
    23.  * of the given RDQL query. Then the query result set is filtered with evaluated
    24. -
    25.  * boolean expressions from the AND clause of the given RDQL query.
    26. -
    27.  *
    28. -
    29.  * @version  $Id: fsource_rdql__rdqlRdqlMemEngine.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    32. -
    33.  *
    34. -
    35.  * @package rdql
    36. -
    37.  * @access public
    38. -
    39.  */
    40. -
    41.  
    42. -
    43. Class RdqlMemEngine extends RdqlEngine {
    44. -
    45.  
    46. -
    47.  
    48. -
    49. /**
    50. -
    51.  * Parsed query variables and constraints.
    52. -
    53.  *
    54. -
    55.  * @var     array   ['selectVars'][] = ?VARNAME
    56. -
    57.  *                   ['sources'][] = URI
    58. -
    59.  *                   ['patterns'][]['subject']['value'] = VARorURI
    60. -
    61.  *                                 ['predicate']['value'] = VARorURI
    62. -
    63.  *                                 ['object']['value'] = VARorURIorLiterl
    64. -
    65.  *                                           ['is_literal'] = boolean
    66. -
    67.  *                                           ['l_lang'] = string
    68. -
    69.  *                                           ['l_dtype'] = string
    70. -
    71.  *                   ['filters'][]['string'] = string
    72. -
    73.  *                                ['evalFilterStr'] = string
    74. -
    75.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    76. -
    77.  *                                                  ['operator'] = (eq | ne)
    78. -
    79.  *                                                  ['regex'] = string
    80. -
    81.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    82. -
    83.  *                                                ['operator'] = (eq | ne)
    84. -
    85.  *                                                ['value'] = string
    86. -
    87.  *                                                ['value_type'] = ('variable' | 'URI' | 'Literal')
    88. -
    89.  *                                                ['value_lang'] = string
    90. -
    91.  *                                                ['value_dtype'] = string
    92. -
    93.  *                                ['numExpr']['vars'][] = ?VARNAME
    94. -
    95.  *                          ( [] stands for an integer index - 0..N )
    96. -
    97.  * @access    private
    98. -
    99.  */
    100. -
    101.  var $parsedQuery;
    102. -
    103.  
    104. -
    105.  
    106. -
    107.  /**
    108. -
    109.  * Perform an RDQL Query on the given MemModel.
    110. -
    111.  *
    112. -
    113.  * @param   object  MemModel &$memModel 
    114. -
    115.  * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
    116. -
    117.  * @param   boolean $returnNodes 
    118. -
    119.  * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    120. -
    121.  *       OR  array   [][?VARNAME] = string
    122. -
    123.  *
    124. -
    125.  * @access  public
    126. -
    127.  */
    128. -
    129.  function queryModel(&$memModel&$parsedQuery$returnNodes TRUE{
    130. -
    131.  
    132. -
    133.    $this->parsedQuery $parsedQuery;
    134. -
    135.  
    136. -
    137.    // find tuples matching all patterns
    138. -
    139.    $res $this->findTuplesMatchingAllPatterns($memModel);
    140. -
    141.  
    142. -
    143.    // filter tuples
    144. -
    145.    if (isset($parsedQuery['filters']))
    146. -
    147.       $res $this->filterTuples($res);
    148. -
    149.  
    150. -
    151.    // select variables to be returned
    152. -
    153.    $res $this->selectVariables($res);
    154. -
    155.  
    156. -
    157.    if(!$returnNodes)
    158. -
    159.      return $this->toString($res);
    160. -
    161.  
    162. -
    163.    return $res;
    164. -
    165.  }
    166. -
    167.  
    168. -
    169.  
    170. -
    171.  /**
    172. -
    173.  * Find triples matching all patterns of an RDQL query and return an array
    174. -
    175.  * with variables from all patterns and their corresponding values.
    176. -
    177.  * The variable values returned are instances of object Node.
    178. -
    179.  *
    180. -
    181.  * @param   object  MemModel  &$memModel 
    182. -
    183.  * @return  array   [][?VARNAME] = object Node
    184. -
    185.  *
    186. -
    187.  * @access  private
    188. -
    189.  */
    190. -
    191.  function findTuplesMatchingAllPatterns(&$memModel{
    192. -
    193.  
    194. -
    195.    $resultSet $this->findTuplesMatchingOnePattern($memModel$this->parsedQuery['patterns'][0]);
    196. -
    197.    for ($i=1$i<count($this->parsedQuery['patterns'])$i++{
    198. -
    199.        $rs $this->findTuplesMatchingOnePattern($memModel$this->parsedQuery['patterns'][$i]);
    200. -
    201.        $resultSet $this->joinTuples($resultSet$rs);
    202. -
    203.    }
    204. -
    205.    return $resultSet;
    206. -
    207.  }
    208. -
    209.  
    210. -
    211.  
    212. -
    213. /**
    214. -
    215.  * Find tuples matching one pattern and return an array with pattern
    216. -
    217.  * variables and their corresponding values (instances of object Node).
    218. -
    219.  *
    220. -
    221.  * @param   object  MemModel &$memModel 
    222. -
    223.  * @param   array  &$pattern ['subject']['value'] = VARorURI
    224. -
    225.  *                            ['predicate']['value'] = VARorURI
    226. -
    227.  *                            ['object']['value'] = VARorURIorLiterl
    228. -
    229.  *                                      ['is_literal'] = boolean
    230. -
    231.  *                                      ['l_lang'] = string
    232. -
    233.  *                                      ['l_dtype'] = string
    234. -
    235.  * @return  array   [][?VARNAME] = object Node
    236. -
    237.  *
    238. -
    239.  * @access  private
    240. -
    241.  */
    242. -
    243.  function findTuplesMatchingOnePattern(&$memModel&$pattern{
    244. -
    245.  
    246. -
    247.    $resultSet array();
    248. -
    249.    $i 0;
    250. -
    251.    // parameters to be passed to the method findTriplesMatchingPattern
    252. -
    253.    foreach ($pattern as $key => $v{     
    254. -
    255.      if ($v['value'&& $v['value']{0== '?'{
    256. -
    257.         if ($key == 'object'{
    258. -
    259.             $param['object']['is_a''ANY';
    260. -
    261.             $param['object']['string''ANY';
    262. -
    263.             $param['object']['lang'NULL;
    264. -
    265.             $param['object']['dtype'NULL;
    266. -
    267.         else             
    268. -
    269.              $param[$key'ANY';
    270. -
    271.         $var[$i]['key'$key;
    272. -
    273.         $var[$i++]['val'$v['value'];
    274. -
    275.      }else
    276. -
    277.         if (isset($v['is_literal'])) {
    278. -
    279.           $param[$key]['is_a''Literal';
    280. -
    281.           $param[$key]['string'$v['value'];
    282. -
    283.           $param[$key]['lang'$v['l_lang'];
    284. -
    285.           $param[$key]['dtype'$v['l_dtype'];
    286. -
    287.         }else{
    288. -
    289.           if ($key == 'object'{
    290. -
    291.              $param[$key]['is_a''Resource';
    292. -
    293.              $param[$key]['string'$v['value'];
    294. -
    295.              $param[$key]['lang'NULL;
    296. -
    297.              $param[$key]['dtype'NULL;
    298. -
    299.           }else
    300. -
    301.             $param[$key$v['value'];
    302. -
    303.         }
    304. -
    305.    }
    306. -
    307.    
    308. -
    309.    // find pattern internal bindings e.g. (?x, ?z, ?x)
    310. -
    311.    $intBindings NULL;
    312. -
    313.    for ($i=0$i<count($var)$i++)
    314. -
    315.        foreach($var as $n => $v)
    316. -
    317.          if ($i != $n && $var[$i]['val'== $v['val'])
    318. -
    319.             $intBindings[$var[$i]['key'];
    320. -
    321.  
    322. -
    323.    // find triples of the $memModel matching $pattern
    324. -
    325.    $resModel $this->findTriplesMatchingPattern($memModel$param['subject'],
    326. -
    327.                                                             $param['predicate'],
    328. -
    329.                                                             $param['object']['is_a'],
    330. -
    331.                                                             $param['object']['string'],
    332. -
    333.                                                             $param['object']['lang'],
    334. -
    335.                                                             $param['object']['dtype'],
    336. -
    337.                                                  $intBindings);
    338. -
    339.  
    340. -
    341.    // set values of the pattern variables to be returned
    342. -
    343.    if ($pattern['subject']['value']{0== '?'{
    344. -
    345.       $n 0;
    346. -
    347.       foreach ($resModel->triples as $triple)
    348. -
    349.         $resultSet[$n++][$pattern['subject']['value']] $triple->subj;
    350. -
    351.    }
    352. -
    353.    if ($pattern['predicate']['value']{0== '?'{
    354. -
    355.       $n 0;
    356. -
    357.       foreach ($resModel->triples as $triple)
    358. -
    359.         $resultSet[$n++][$pattern['predicate']['value']] $triple->pred;
    360. -
    361.    }
    362. -
    363.    if ($pattern['object']['value'&& $pattern['object']['value']{0== '?'{
    364. -
    365.       $n 0;
    366. -
    367.       foreach ($resModel->triples as $triple)
    368. -
    369.         $resultSet[$n++][$pattern['object']['value']] $triple->obj;
    370. -
    371.    }
    372. -
    373.    return $resultSet;
    374. -
    375.  }
    376. -
    377.  
    378. -
    379.  
    380. -
    381. /**
    382. -
    383.  * Search in $memModel for triples matching one pattern from the WHERE clause.
    384. -
    385.  * 'ANY' input for $subjLabel..$objLabel, $obj_is will match anything.
    386. -
    387.  * NULL input for $objDtype will only match obj->dtype = NULL
    388. -
    389.  * NULL input for $objLanguage will match obj->lang = NULL or anything if a
    390. -
    391.  * literal is datatyped (except for XMLLiterals and plain literals)
    392. -
    393.  * This method also checks internal bindings if provided.
    394. -
    395.  *
    396. -
    397.  * @param   object MemModel $memModel 
    398. -
    399.  * @param   string $subjLabel 
    400. -
    401.  * @param   string $predLabel 
    402. -
    403.  * @param   string $objLabel 
    404. -
    405.  * @param   string $obj_is 
    406. -
    407.  * @param   string $objLanguage 
    408. -
    409.  * @param   string $objDtype 
    410. -
    411.  * @param   array  $intBindings [] = string
    412. -
    413.  * @return  object MemModel 
    414. -
    415.  * @access    private
    416. -
    417.  */
    418. -
    419.  function findTriplesMatchingPattern(&$memModel$subjLabel$predLabel$obj_is,
    420. -
    421.                                       $objLabel$objLang$objDtype&$intBindings{
    422. -
    423.  
    424. -
    425.    $res new MemModel();
    426. -
    427.  
    428. -
    429.    if($memModel->isEmpty())
    430. -
    431.     return $res;
    432. -
    433.  
    434. -
    435.    if ($subjLabel=='ANY')
    436. -
    437.    {
    438. -
    439.        $subj=NULL;
    440. -
    441.    else
    442. -
    443.    {
    444. -
    445.        $subj=new Resource($subjLabel);
    446. -
    447.    };
    448. -
    449.    if ($predLabel=='ANY')
    450. -
    451.    {
    452. -
    453.        $pred=NULL;
    454. -
    455.    else
    456. -
    457.    {
    458. -
    459.        $pred=new Resource($predLabel);
    460. -
    461.    }
    462. -
    463.             
    464. -
    465.    if ($objLabel=='ANY')
    466. -
    467.    {
    468. -
    469.        $obj=NULL;
    470. -
    471.    else
    472. -
    473.    {
    474. -
    475.        if ($obj_is == 'Literal')
    476. -
    477.        {
    478. -
    479.            $obj=new Literal($objLabel);
    480. -
    481.            $obj->setDatatype($objDtype);
    482. -
    483.            $obj->setLanguage($objLang);
    484. -
    485.        else {
    486. -
    487.            $obj=new Resource($objLabel);
    488. -
    489.        }
    490. -
    491.    };
    492. -
    493.    
    494. -
    495.    $res=$memModel->find($subj,$pred,$obj);
    496. -
    497.  
    498. -
    499.      if ($intBindings)
    500. -
    501.               foreach ($res->triples as $triple)
    502. -
    503.         {
    504. -
    505.             if (!$this->_checkIntBindings($triple$intBindings))
    506. -
    507.             {
    508. -
    509.                   $res->remove($triple);
    510. -
    511.             }
    512. -
    513.         }
    514. -
    515.  
    516. -
    517.   return $res;
    518. -
    519. }
    520. -
    521.  
    522. -
    523.  
    524. -
    525. /**
    526. -
    527.  * Perform an SQL-like inner join on two resultSets.
    528. -
    529.  *
    530. -
    531.  * @param   array   &$finalRes [][?VARNAME] = object Node
    532. -
    533.  * @param   array   &$res      [][?VARNAME] = object Node
    534. -
    535.  * @return  array              [][?VARNAME] = object Node
    536. -
    537.  *
    538. -
    539.  * @access  private
    540. -
    541.  */
    542. -
    543.  function joinTuples(&$finalRes&$res{
    544. -
    545.  
    546. -
    547.    if (count($finalRes== || count($res== 0)
    548. -
    549.       return array();
    550. -
    551.  
    552. -
    553.    // find joint variables and new variables to be added to $finalRes
    554. -
    555.    $jointVars array();
    556. -
    557.    $newVars array();
    558. -
    559.    foreach ($res[0as $varname => $node{
    560. -
    561.      if (array_key_exists($varname$finalRes[0]))
    562. -
    563.         $jointVars[$varname;
    564. -
    565.      else
    566. -
    567.         $newVars[$varname;
    568. -
    569.    }
    570. -
    571.  
    572. -
    573.    // eliminate rows of $finalRes in which the values of $jointVars do not have
    574. -
    575.    // a corresponding row in $res.
    576. -
    577.    foreach ($finalRes as $n => $fRes{
    578. -
    579.      foreach ($res as $i => $r{
    580. -
    581.        $ok TRUE;
    582. -
    583.        foreach ($jointVars as $j_varname)
    584. -
    585.          if ($r[$j_varname!= $fRes[$j_varname]{
    586. -
    587.             $ok FALSE;
    588. -
    589.             break;
    590. -
    591.          }
    592. -
    593.        if ($ok)
    594. -
    595.           break;
    596. -
    597.      }
    598. -
    599.      if (!$ok)
    600. -
    601.         unset($finalRes[$n]);
    602. -
    603.    }
    604. -
    605.  
    606. -
    607.    // join $res and $finalRes
    608. -
    609.    $joinedRes array();
    610. -
    611.    foreach ($res as $i => $r{
    612. -
    613.      foreach ($finalRes as $n => $fRes{
    614. -
    615.        $ok TRUE;
    616. -
    617.        foreach ($jointVars as $j_varname)
    618. -
    619.          if ($r[$j_varname!= $fRes[$j_varname]{
    620. -
    621.             $ok FALSE;
    622. -
    623.             break;
    624. -
    625.          }
    626. -
    627.        if ($ok{
    628. -
    629.           $joinedRow $finalRes[$n];
    630. -
    631.           foreach($newVars as $n_varname)
    632. -
    633.             $joinedRow[$n_varname$r[$n_varname];
    634. -
    635.           $joinedRes[$joinedRow;
    636. -
    637.        }
    638. -
    639.      }
    640. -
    641.    }
    642. -
    643.    
    644. -
    645.    return $joinedRes;
    646. -
    647.  }
    648. -
    649.  
    650. -
    651.  
    652. -
    653. /**
    654. -
    655.  * Filter the result-set of query variables by evaluating each filter from the
    656. -
    657.  * AND clause of the RDQL query.
    658. -
    659.  *
    660. -
    661.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    662. -
    663.  * @return  array  [][?VARNAME] = object Node
    664. -
    665.  * @access    private
    666. -
    667.  */
    668. -
    669.  function filterTuples(&$finalRes{
    670. -
    671.  
    672. -
    673.    foreach ($this->parsedQuery['filters'as $filter{
    674. -
    675.  
    676. -
    677.       foreach ($finalRes as $n => $fRes{
    678. -
    679.         $evalFilterStr $filter['evalFilterStr'];
    680. -
    681.  
    682. -
    683.         // evaluate regex equality expressions of each filter
    684. -
    685.         foreach ($filter['regexEqExprs'as $i => $expr{
    686. -
    687.  
    688. -
    689.           preg_match($expr['regex']$fRes[$expr['var']]->getLabel()$match);
    690. -
    691.           $op substr($expr['operator']0,1);
    692. -
    693.           if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
    694. -
    695.              $evalFilterStr str_replace("##RegEx_$i##"'FALSE'$evalFilterStr);
    696. -
    697.           else
    698. -
    699.              $evalFilterStr str_replace("##RegEx_$i##"'TRUE'$evalFilterStr);
    700. -
    701.  
    702. -
    703.         }
    704. -
    705.  
    706. -
    707.         // evaluate string equality expressions
    708. -
    709.         foreach ($filter['strEqExprs'as $i => $expr{
    710. -
    711.  
    712. -
    713.           $exprBoolVal 'FALSE';
    714. -
    715.           
    716. -
    717.           switch ($expr['value_type']{
    718. -
    719.  
    720. -
    721.             case 'variable':
    722. -
    723.                  if (($fRes[$expr['var']] == $fRes[$expr['value']] && $expr['operator'== 'eq'||
    724. -
    725.                      ($fRes[$expr['var']] != $fRes[$expr['value']] && $expr['operator'== 'ne'))
    726. -
    727.                     $exprBoolVal 'TRUE';
    728. -
    729.                  break;
    730. -
    731.                  
    732. -
    733.             case 'URI':
    734. -
    735.  
    736. -
    737.                  if (is_a($fRes[$expr['var']]'Literal')) {
    738. -
    739.                     if ($expr['operator'== 'ne')
    740. -
    741.                        $exprBoolVal 'TRUE';
    742. -
    743.                     break;
    744. -
    745.                  }
    746. -
    747.  
    748. -
    749.                  if (($fRes[$expr['var']]->getLabel(== $expr['value'&& $expr['operator'== 'eq'||
    750. -
    751.                      ($fRes[$expr['var']]->getLabel(!= $expr['value'&& $expr['operator'== 'ne'))
    752. -
    753.                     $exprBoolVal 'TRUE';
    754. -
    755.                  break;
    756. -
    757.                  
    758. -
    759.             case 'Literal':
    760. -
    761.  
    762. -
    763.                  if (!is_a($fRes[$expr['var']]'Literal')) {
    764. -
    765.                     if ($expr['operator'== 'ne')
    766. -
    767.                        $exprBoolVal 'TRUE';
    768. -
    769.                     break;
    770. -
    771.                  }
    772. -
    773.  
    774. -
    775.                  $filterLiteralnew Literal($expr['value'],$expr['value_lang']);
    776. -
    777.                  $filterLiteral->setDatatype($expr['value_dtype']);
    778. -
    779.                  
    780. -
    781.                 $equal=$fRes[$expr['var']]->equals($filterLiteral);
    782. -
    783. /*                 if ($fRes[$expr['var']]->getLabel() == $expr['value'] &&
    784. -
    785.                      $fRes[$expr['var']]->getDatatype() == $expr['value_dtype']) {
    786. -
    787.                      
    788. -
    789.                     $equal = TRUE;
    790. -
    791.                      
    792. -
    793.                     // Lang tags only differentiate literals in rdf:XMLLiterals and plain literals.
    794. -
    795.                     // Therefore if a literal is datatyped ignore the language tag.
    796. -
    797.                     if ((($expr['value_dtype'] == NULL) ||
    798. -
    799.                          ($expr['value_dtype'] == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') ||
    800. -
    801.                          ($expr['value_dtype'] == 'http://www.w3.org/2001/XMLSchema#string')) &&
    802. -
    803.                         (($fRes[$expr['var']]->getLanguage() != $expr['value_lang'])))
    804. -
    805.                         
    806. -
    807.                         $equal = FALSE;
    808. -
    809.                  }else
    810. -
    811.                     $equal = FALSE;
    812. -
    813.      */               
    814. -
    815.                  if (($equal && $expr['operator'== 'eq'||
    816. -
    817.                      (!$equal && $expr['operator'== 'ne'))
    818. -
    819.                     $exprBoolVal 'TRUE';
    820. -
    821.                  else
    822. -
    823.                     $exprBoolVal 'FALSE';
    824. -
    825.  
    826. -
    827.           }
    828. -
    829.           $evalFilterStr str_replace("##strEqExpr_$i##"$exprBoolVal$evalFilterStr);
    830. -
    831.        }
    832. -
    833.  
    834. -
    835.         // evaluate numerical expressions
    836. -
    837.         foreach ($filter['numExprVars'as $varName{
    838. -
    839.           $varValue "'" .$fRes[$varName]->getLabel(."'";
    840. -
    841.           $evalFilterStr str_replace($varName$varValue$evalFilterStr);
    842. -
    843.         }
    844. -
    845.  
    846. -
    847.         eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
    848. -
    849.         if (!isset($eval_filter_ok))
    850. -
    851.            trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']."'"E_USER_ERROR);
    852. -
    853.  
    854. -
    855.         if (!$filterBoolVal)
    856. -
    857.            unset($finalRes[$n]);
    858. -
    859.       }
    860. -
    861.    }
    862. -
    863.  
    864. -
    865.    return $finalRes;
    866. -
    867.  }
    868. -
    869.  
    870. -
    871.  
    872. -
    873. /**
    874. -
    875.  * Remove all conditional variables from the result-set and leave only variables
    876. -
    877.  * specified in the SELECT clause of the RDQL query.
    878. -
    879.  *
    880. -
    881.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    882. -
    883.  * @return  array  [][?VARNAME] = object Node
    884. -
    885.  * @access    private
    886. -
    887.  */
    888. -
    889.  function selectVariables(&$finalRes{
    890. -
    891.  
    892. -
    893.    // if nothing has been found return only one row of $finalRes
    894. -
    895.    // with select variables having empty values
    896. -
    897.    if (count($finalRes== 0{
    898. -
    899.       foreach ($this->parsedQuery['selectVars'as $selectVar)
    900. -
    901.          $finalRes[0][$selectVarNULL;
    902. -
    903.       return $finalRes;
    904. -
    905.    }
    906. -
    907.    
    908. -
    909.    // return only selectVars in the same order as given in the RDQL query
    910. -
    911.    // and reindex $finalRes.
    912. -
    913.    $n 0;
    914. -
    915.    foreach($finalRes as $key => $val{
    916. -
    917.      foreach ($this->parsedQuery['selectVars'as $selectVar)
    918. -
    919.        $resultSet[$n][$selectVar$val[$selectVar];
    920. -
    921.      unset($finalRes[$key]);
    922. -
    923.      ++$n;
    924. -
    925.    }
    926. -
    927.  
    928. -
    929.    return $resultSet;
    930. -
    931.  }
    932. -
    933.  
    934. -
    935.  
    936. -
    937. /**
    938. -
    939.  * Convert the variable values of $finalRes from objects to their string serialization.
    940. -
    941.  *
    942. -
    943.  * @param   array  &$finalRes  [][?VARNAME] = object Node
    944. -
    945.  * @return  array  [][?VARNAME] = string
    946. -
    947.  * @access    private
    948. -
    949.  */
    950. -
    951.  function toString(&$finalRes{
    952. -
    953.  
    954. -
    955.    foreach ($finalRes as $n => $tuple)
    956. -
    957.      foreach ($tuple as $varname => $node{
    958. -
    959.        if (is_a($node'Resource'))
    960. -
    961.           $res[$n][$varname'<' .$node->getLabel(.'>';
    962. -
    963.        elseif (is_a($node'Literal')) {
    964. -
    965.           $res[$n][$varname'"' .$node->getLabel(.'"';
    966. -
    967.           if ($node->getLanguage())
    968. -
    969.              $res[$n][$varname.= ' (xml:lang="' .$node->getLanguage(.'")';
    970. -
    971.           if ($node->getDatatype())
    972. -
    973.              $res[$n][$varname.= ' (rdf:datatype="' .$node->getDatatype(.'")';
    974. -
    975.        }else
    976. -
    977.           $res[$n][$varname$node;
    978. -
    979.      }
    980. -
    981.    return $res;
    982. -
    983.  }
    984. -
    985.  
    986. -
    987.  
    988. -
    989. /**
    990. -
    991.  * Check if the given triple meets pattern internal bindings
    992. -
    993.  * e.g. (?x, ?z, ?x) ==> statement subject must be identical with the statement object
    994. -
    995.  *
    996. -
    997.  * @param   object statement &$triple 
    998. -
    999.  * @param   array  &$intBindings [] = string
    1000. -
    1001.  * @return  boolean 
    1002. -
    1003.  * @access    private
    1004. -
    1005.  */
    1006. -
    1007.  function _checkIntBindings (&$triple&$intBindings{
    1008. -
    1009.  
    1010. -
    1011.    if (in_array('subject'$intBindings)) {
    1012. -
    1013.       if (in_array('predicate'$intBindings))
    1014. -
    1015.          if ($triple->subj != $triple->pred)
    1016. -
    1017.             return FALSE;
    1018. -
    1019.       if (in_array('object'$intBindings)) {
    1020. -
    1021.          if (is_a($triple->obj'Literal'))
    1022. -
    1023.             return FALSE;
    1024. -
    1025.          elseif ($triple->subj != $triple->obj)
    1026. -
    1027.             return FALSE;
    1028. -
    1029.       }
    1030. -
    1031.       return TRUE;
    1032. -
    1033.    }
    1034. -
    1035.    if (in_array('predicate'$intBindings)) {
    1036. -
    1037.       if (is_a($triple->obj'Literal'))
    1038. -
    1039.          return FALSE;
    1040. -
    1041.       elseif ($triple->pred != $triple->obj)
    1042. -
    1043.              return FALSE;
    1044. -
    1045.       return TRUE;
    1046. -
    1047.    }
    1048. -
    1049.  }
    1050. -
    1051.  
    1052. -
    1053.  
    1054. -
    1055. /**
    1056. -
    1057.  * Check if the lang and dtype of the passed object Literal are equal $lang and $dtype
    1058. -
    1059.  * !!! Language only differentiates literals in rdf:XMLLiterals and plain literals (xsd:string).
    1060. -
    1061.  * !!! Therefore if a literal is datatyped ignore the language.
    1062. -
    1063.  *
    1064. -
    1065.  * @param  object  Literal $literal 
    1066. -
    1067.  * @param  string  $dtype1 
    1068. -
    1069.  * @param  string  $dtype2 
    1070. -
    1071.  * @return boolean 
    1072. -
    1073.  * @access private
    1074. -
    1075.  */
    1076. -
    1077.  function _equalsLangDtype ($literal$lang$dtype{
    1078. -
    1079.  
    1080. -
    1081.    if ($dtype == $literal->getDatatype()) {
    1082. -
    1083.       if (($dtype == NULL ||
    1084. -
    1085.            $dtype == 'http://www.w3.org/2001/XMLSchema#string' ||
    1086. -
    1087.            $dtype == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'&&
    1088. -
    1089.           ($lang != $literal->getLanguage()))
    1090. -
    1091.          return FALSE;
    1092. -
    1093.       return TRUE;
    1094. -
    1095.    }
    1096. -
    1097.    return FALSE;
    1098. -
    1099.  }
    1100. -
    1101.  
    1102. -
    1103.  
    1104. -
    1105. // end: Class RdqlMemEngine
    1106. -
    1107.  
    1108. -
    1109. ?>
    1110. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlParser.php.html deleted file mode 100755 index d85c0ddb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlParser.php.html +++ /dev/null @@ -1,1084 +0,0 @@ - - - - - - File Source for RdqlParser.php - - - - - -

    Source for file RdqlParser.php

    -

    Documentation is available at RdqlParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlParser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * This class contains methods for parsing an Rdql query string into PHP variables.
    16. -
    17.  * The output of the RdqlParser is an array with variables and constraints
    18. -
    19.  * of each query clause (Select, From, Where, And, Using).
    20. -
    21.  * To perform an RDQL query this array has to be passed to the RdqlEngine.
    22. -
    23.  *
    24. -
    25.  * @version  $Id: fsource_rdql__rdqlRdqlParser.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27.  * @author   Radoslaw Oldakowski <radol@gmx.de>
    28. -
    29.  *
    30. -
    31.  * @package rdql
    32. -
    33.  * @access public
    34. -
    35.  */
    36. -
    37.  
    38. -
    39.  
    40. -
    41. Class RdqlParser extends Object{
    42. -
    43.  
    44. -
    45. /**
    46. -
    47.  * Parsed query variables and constraints.
    48. -
    49.  * { } are only used within the parser class and are not returned as parsed query.
    50. -
    51.  * ( [] stands for an integer index - 0..N )
    52. -
    53.  *
    54. -
    55.  * @var     array   ['selectVars'][] = ?VARNAME
    56. -
    57.  *                   ['sources'][]{['value']} = URI | QName
    58. -
    59.  *                                  {['is_qname'] = boolean}
    60. -
    61.  *                   ['patterns'][]['subject']['value'] = VARorURI
    62. -
    63.  *                                             {['is_qname'] = boolean}
    64. -
    65.  *                                 ['predicate']['value'] = VARorURI
    66. -
    67.  *                                               {['is_qname'] = boolean}
    68. -
    69.  *                                 ['object']['value'] = VARorURIorLiterl
    70. -
    71.  *                                             {['is_qname'] = boolean}
    72. -
    73.  *                                           ['is_literal'] = boolean
    74. -
    75.  *                                           ['l_lang'] = string
    76. -
    77.  *                                           ['l_dtype'] = string
    78. -
    79.  *                                          {['l_dtype_is_qname'] = boolean}
    80. -
    81.  *                   ['filters'][]['string'] = string
    82. -
    83.  *                                ['evalFilterStr'] = string
    84. -
    85.  *                                ['reqexEqExprs'][]['var'] = ?VARNAME
    86. -
    87.  *                                                  ['operator'] = (eq | ne)
    88. -
    89.  *                                                  ['regex'] = string
    90. -
    91.  *                                ['strEqExprs'][]['var'] = ?VARNAME
    92. -
    93.  *                                                ['operator'] = (eq | ne)
    94. -
    95.  *                                                ['value'] = string
    96. -
    97.  *                                                ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal')
    98. -
    99.  *                                                ['value_lang'] = string
    100. -
    101.  *                                                ['value_dtype'] = string
    102. -
    103.  *                                               {['value_dtype_is_qname'] = boolean}
    104. -
    105.  *                                ['numExpr']['vars'][] = ?VARNAME
    106. -
    107.  *                  {['ns'][PREFIX] = NAMESPACE}
    108. -
    109.  * @access    private
    110. -
    111.  */
    112. -
    113.  var $parsedQuery;
    114. -
    115.  
    116. -
    117.  
    118. -
    119. /**
    120. -
    121.  * Query string divided into a sequence of tokens.
    122. -
    123.  * A token is either: ' ' or "\n" or "\r" or "\t" or ',' or '(' or ')'
    124. -
    125.  * or a string containing any characters except from the above.
    126. -
    127.  *
    128. -
    129.  * @var     array 
    130. -
    131.  * @access    private
    132. -
    133.  */
    134. -
    135.  var $tokens;
    136. -
    137.  
    138. -
    139.  
    140. -
    141. /**
    142. -
    143.  * Parse the given RDQL query string and return an array with query variables and constraints.
    144. -
    145.  *
    146. -
    147.  * @param   string  $queryString 
    148. -
    149.  * @return  array   $this->parsedQuery
    150. -
    151.  * @access    public
    152. -
    153.  */
    154. -
    155.  function parseQuery($queryString{
    156. -
    157.  
    158. -
    159.    $cleanQueryString $this->removeComments($queryString);
    160. -
    161.    $this->tokenize($cleanQueryString);
    162. -
    163.    $this->startParsing();
    164. -
    165.    if ($this->parsedQuery['selectVars'][0== '*')
    166. -
    167.       $this->parsedQuery['selectVars'$this->findAllQueryVariables();
    168. -
    169.    else
    170. -
    171.       $this->_checkSelectVars();
    172. -
    173.    $this->replaceNamespacePrefixes();
    174. -
    175.  
    176. -
    177.    return $this->parsedQuery;
    178. -
    179.  }
    180. -
    181.  
    182. -
    183.  
    184. -
    185. /**
    186. -
    187.  *  Remove comments from the passed query string.
    188. -
    189.  *
    190. -
    191.  *  @param  string  $query 
    192. -
    193.  *  @return string 
    194. -
    195.  *  @throws PHPError
    196. -
    197.  *  @access private
    198. -
    199.  */
    200. -
    201.  function removeComments($query{
    202. -
    203.  
    204. -
    205.    $last strlen($query)-1;
    206. -
    207.    $query .= ' ';
    208. -
    209.    $clean '';
    210. -
    211.    for ($i=0$i<=$last$i++{
    212. -
    213.      // don't search for comments inside a 'literal'@lang^^dtype or "literal"@lang^^dtype
    214. -
    215.      if ($query{$i== "'" || $query{$i== '"'{
    216. -
    217.         $quotMark $query{$i};
    218. -
    219.         do
    220. -
    221.           $clean .= $query{$i++};
    222. -
    223.         while($i $last && $query{$i!= $quotMark);
    224. -
    225.         $clean .= $query{$i};
    226. -
    227.         // language
    228. -
    229.         if ($query{$i+1== '@'{
    230. -
    231.            do{
    232. -
    233.              if ($query{$i+1== '^' && $query{$i+2== '^')
    234. -
    235.                 break;
    236. -
    237.              $clean .= $query{++$i};
    238. -
    239.            }while ($i $last && $query{$i!= ' '  && $query{$i!= "\t"
    240. -
    241.                               && $query{$i!= "\n" && $query{$i!= "\r");
    242. -
    243.         }
    244. -
    245.         // datatype
    246. -
    247.         if ($query{$i+1== '^' && $query{$i+2== '^'{
    248. -
    249.             do
    250. -
    251.               $clean .= $query{++$i};
    252. -
    253.             while ($i $last && $query{$i!= ' '  && $query{$i!= "\t"
    254. -
    255.                              && $query{$i!= "\n" && $query{$i!= "\r" );
    256. -
    257.         }
    258. -
    259.      // don't search for comments inside an <URI> either
    260. -
    261.      }elseif ($query{$i== '<'{
    262. -
    263.         do{
    264. -
    265.            $clean .= $query{$i++};
    266. -
    267.         }while($i $last && $query{$i!= '>');
    268. -
    269.         $clean .= $query{$i};
    270. -
    271.      }elseif ($query{$i== '/'{
    272. -
    273.         // clear: // comment
    274. -
    275.         if ($i $last && $query{$i+1== '/'{
    276. -
    277.             while($i $last && $query{$i!= "\n" && $query{$i!= "\r")
    278. -
    279.               ++$i;
    280. -
    281.             $clean .= ' ';
    282. -
    283.         // clear: /*comment*/
    284. -
    285.         }elseif ($i $last-&& $query{$i+1== '*'{
    286. -
    287.             $i += 2;
    288. -
    289.             while($i $last  && ($query{$i!= '*' || $query{$i+1!= '/'))
    290. -
    291.               ++$i;
    292. -
    293.             if ($i >= $last && ($query{$last-1!= '*' || $query{$last!= '/'))
    294. -
    295.                trigger_error(RDQL_SYN_ERR .": unterminated comment - '*/' missing"E_USER_ERROR);
    296. -
    297.             ++$i;
    298. -
    299.         }else
    300. -
    301.           $clean .= $query{$i};
    302. -
    303.      }else
    304. -
    305.         $clean .= $query{$i};
    306. -
    307.    }
    308. -
    309.    return $clean;
    310. -
    311.  }
    312. -
    313.  
    314. -
    315.  
    316. -
    317. /**
    318. -
    319.  * Divide the query string into tokens.
    320. -
    321.  * A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')'
    322. -
    323.  * or a string containing any character except from the above.
    324. -
    325.  *
    326. -
    327.  * @param   string  $queryString 
    328. -
    329.  * @access    private
    330. -
    331.  */
    332. -
    333.  function tokenize($queryString{
    334. -
    335.  
    336. -
    337.    $queryString trim($queryString" \r\n\t");
    338. -
    339.    $specialChars array (" ""\t""\r""\n"",""("")");
    340. -
    341.    $len strlen($queryString);
    342. -
    343.    $this->tokens[0]='';
    344. -
    345.    $n 0;
    346. -
    347.  
    348. -
    349.    for ($i=0$i<$len++$i{
    350. -
    351.        if (!in_array($queryString{$i}$specialChars))
    352. -
    353.           $this->tokens[$n.= $queryString{$i};
    354. -
    355.        else {
    356. -
    357.           if ($this->tokens[$n!= '')
    358. -
    359.              ++$n;
    360. -
    361.           $this->tokens[$n$queryString{$i};
    362. -
    363.           $this->tokens[++$n'';
    364. -
    365.        }
    366. -
    367.    }
    368. -
    369.  }
    370. -
    371.  
    372. -
    373.  
    374. -
    375. /**
    376. -
    377.  * Start parsing of the tokenized query string.
    378. -
    379.  *
    380. -
    381.  * @access private
    382. -
    383.  */
    384. -
    385.  function startParsing({
    386. -
    387.  
    388. -
    389.    $this->parseSelect();
    390. -
    391.  }
    392. -
    393.  
    394. -
    395.  
    396. -
    397. /**
    398. -
    399.  * Parse the SELECT clause of an Rdql query.
    400. -
    401.  * When the parsing of the SELECT clause is finished, this method will call
    402. -
    403.  * a suitable method to parse the subsequent clause.
    404. -
    405.  *
    406. -
    407.  * @throws    PhpError
    408. -
    409.  * @access    private
    410. -
    411.  */
    412. -
    413.   function parseSelect({
    414. -
    415.  
    416. -
    417.    $this->_clearWhiteSpaces();
    418. -
    419.  
    420. -
    421.    // Check if the queryString contains a "SELECT" token
    422. -
    423.    if (strcasecmp('SELECT'current($this->tokens)))
    424. -
    425.       trigger_error(RDQL_SEL_ERR  ."'" .current($this->tokens)
    426. -
    427.                                   ."' - SELECT keyword expected"E_USER_ERROR);
    428. -
    429.    unset($this->tokens[key($this->tokens)]);
    430. -
    431.    $this->_clearWhiteSpaces();
    432. -
    433.  
    434. -
    435.    // Parse SELECT *
    436. -
    437.    if (current($this->tokens== '*'{
    438. -
    439.       unset($this->tokens[key($this->tokens)]);
    440. -
    441.       $this->parsedQuery['selectVars'][0'*';
    442. -
    443.       $this->_clearWhiteSpaces();
    444. -
    445.       if (strcasecmp('FROM'current($this->tokens))
    446. -
    447.           && strcasecmp('SOURCE'current($this->tokens))
    448. -
    449.           && strcasecmp('WHERE'current($this->tokens)))
    450. -
    451.         trigger_error(RDQL_SYN_ERR .": '" .htmlspecialchars(current($this->tokens))
    452. -
    453.                                ."' - SOURCE or WHERE clause expected"E_USER_ERROR);
    454. -
    455.    }
    456. -
    457.  
    458. -
    459.    // Parse SELECT ?Var (, ?Var)*
    460. -
    461.    $commaExpected FALSE;
    462. -
    463.    $comma FALSE;
    464. -
    465.    while (current($this->tokens!= NULL{
    466. -
    467.      $k key($this->tokens);
    468. -
    469.      $token $this->tokens[$k];
    470. -
    471.  
    472. -
    473.      switch ($token{
    474. -
    475.         case ','if (!$commaExpected)
    476. -
    477.                      trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    478. -
    479.                   $comma TRUE;
    480. -
    481.                   $commaExpected FALSE;
    482. -
    483.                   break;
    484. -
    485.         case '(':
    486. -
    487.         case ')'trigger_error(RDQL_SEL_ERR ." '$token' - illegal input"E_USER_ERROR);
    488. -
    489.                   break;
    490. -
    491.         default :
    492. -
    493.                   if (!strcasecmp('FROM'$token|| !strcasecmp('SOURCE'$token)) {
    494. -
    495.                      if ($comma)
    496. -
    497.                         trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    498. -
    499.                      unset($this->tokens[$k]);
    500. -
    501.                      return $this->parseFrom();
    502. -
    503.                   }elseif (!strcasecmp('WHERE'$token&& !$comma{
    504. -
    505.                      if ($comma)
    506. -
    507.                         trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    508. -
    509.                      unset($this->tokens[$k]);
    510. -
    511.                      return $this->parseWhere();
    512. -
    513.                   }
    514. -
    515.                   if ($token{0== '?'{
    516. -
    517.                      $this->parsedQuery['selectVars'][$this->_validateVar($tokenRDQL_SEL_ERR);
    518. -
    519.                      $commaExpected TRUE;
    520. -
    521.                      $comma FALSE;
    522. -
    523.                   }else
    524. -
    525.                      trigger_error(RDQL_SEL_ERR ." '$token' - '?' missing"E_USER_ERROR);
    526. -
    527.      }
    528. -
    529.      unset($this->tokens[$k]);
    530. -
    531.      $this->_clearWhiteSpaces();
    532. -
    533.    }
    534. -
    535.    trigger_error(RDQL_SYN_ERR ': WHERE clause missing'E_USER_ERROR);
    536. -
    537.  }
    538. -
    539.  
    540. -
    541.  
    542. -
    543. /**
    544. -
    545.  * Parse the FROM/SOURCES clause of an Rdql query
    546. -
    547.  * When the parsing of this clause is finished, parseWhere() will be called.
    548. -
    549.  *
    550. -
    551.  * @throws    PhpError
    552. -
    553.  * @access    private
    554. -
    555.  */
    556. -
    557.  function parseFrom({
    558. -
    559.  
    560. -
    561.    $comma FALSE;
    562. -
    563.    $commaExpected FALSE;
    564. -
    565.    $i = -1;
    566. -
    567.    while (current($this->tokens!= NULL{
    568. -
    569.  
    570. -
    571.       $this->_clearWhiteSpaces();
    572. -
    573.       if (!strcasecmp('WHERE'current($this->tokens)) && count($this->parsedQuery['sources']!= 0{
    574. -
    575.          if ($comma)
    576. -
    577.             trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma"E_USER_ERROR);
    578. -
    579.          unset($this->tokens[key($this->tokens)]);
    580. -
    581.          return $this->parseWhere();
    582. -
    583.       }
    584. -
    585.       if (current($this->tokens== ','{
    586. -
    587.          if ($commaExpected{
    588. -
    589.             $comma TRUE;
    590. -
    591.             $commaExpected FALSE;
    592. -
    593.             unset($this->tokens[key($this->tokens)]);
    594. -
    595.          }else
    596. -
    597.             trigger_error(RDQL_SRC_ERR ."',' - unecpected comma"E_USER_ERROR);
    598. -
    599.       }else{
    600. -
    601.         $token current($this->tokens);
    602. -
    603.         $this->parsedQuery['sources'][++$i]['value'$this->_validateURI($tokenRDQL_SRC_ERR);
    604. -
    605.         if ($token{0!= '<')
    606. -
    607.             $this->parsedQuery['sources'][$i]['is_qname'TRUE;
    608. -
    609.         $commaExpected TRUE;
    610. -
    611.         $comma FALSE;
    612. -
    613.       }
    614. -
    615.    }
    616. -
    617.    trigger_error(RDQL_SYN_ERR .': WHERE clause missing'E_USER_ERROR);
    618. -
    619.  }
    620. -
    621.  
    622. -
    623.  
    624. -
    625. /**'
    626. -
    627.  * Parse the WHERE clause of an Rdql query.
    628. -
    629.  * When the parsing of the WHERE clause is finished, this method will call
    630. -
    631.  * a suitable method to parse the subsequent clause if provided.
    632. -
    633.  *
    634. -
    635.  * @throws    PhpError
    636. -
    637.  * @access    private
    638. -
    639.  */
    640. -
    641.  function parseWhere({
    642. -
    643.  
    644. -
    645.    $comma FALSE;
    646. -
    647.    $commaExpected FALSE;
    648. -
    649.    $i=0;
    650. -
    651.  
    652. -
    653.    do {
    654. -
    655.      $this->_clearWhiteSpaces();
    656. -
    657.      if (!strcasecmp('AND'current($this->tokens))
    658. -
    659.          && count($this->parsedQuery['patterns']!= 0){
    660. -
    661.         if ($comma)
    662. -
    663.             trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    664. -
    665.         unset($this->tokens[key($this->tokens)]);
    666. -
    667.         return $this->parseAnd();
    668. -
    669.      }elseif (!strcasecmp('USING'current($this->tokens))
    670. -
    671.               && count($this->parsedQuery['patterns']!= 0{
    672. -
    673.         if ($comma)
    674. -
    675.             trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    676. -
    677.         unset($this->tokens[key($this->tokens)]);
    678. -
    679.         return $this->parseUsing();
    680. -
    681.      }
    682. -
    683.  
    684. -
    685.      if (current($this->tokens== ','{
    686. -
    687.         $comma TRUE;
    688. -
    689.         $this->_checkComma($commaExpectedRDQL_WHR_ERR);
    690. -
    691.  
    692. -
    693.      }else{
    694. -
    695.  
    696. -
    697.         if (current($this->tokens!= '(')
    698. -
    699.            trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens)
    700. -
    701.                                       ."' - '(' expected"E_USER_ERROR);
    702. -
    703.         unset($this->tokens[key($this->tokens)]);
    704. -
    705.         $this->_clearWhiteSpaces();
    706. -
    707.  
    708. -
    709.         $this->parsedQuery['patterns'][$i]['subject'$this->_validateVarUri(current($this->tokens));
    710. -
    711.         $this->_checkComma(TRUERDQL_WHR_ERR);
    712. -
    713.         $this->parsedQuery['patterns'][$i]['predicate'$this->_validateVarUri(current($this->tokens));
    714. -
    715.         $this->_checkComma(TRUERDQL_WHR_ERR);
    716. -
    717.         $this->parsedQuery['patterns'][$i++]['object'$this->_validateVarUriLiteral(current($this->tokens));
    718. -
    719.         $this->_clearWhiteSpaces();
    720. -
    721.  
    722. -
    723.        if (current($this->tokens!= ')')
    724. -
    725.           trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens."' - ')' expected"E_USER_ERROR);
    726. -
    727.        unset($this->tokens[key($this->tokens)]);
    728. -
    729.        $this->_clearWhiteSpaces();
    730. -
    731.        $commaExpected TRUE;
    732. -
    733.        $comma FALSE;
    734. -
    735.      }
    736. -
    737.    }while(current($this->tokens!= NULL);
    738. -
    739.  
    740. -
    741.    if ($comma)
    742. -
    743.       trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    744. -
    745.  }
    746. -
    747.  
    748. -
    749.  
    750. -
    751. /**
    752. -
    753.  * Parse the AND clause of an Rdql query
    754. -
    755.  *
    756. -
    757.  * @throws    PhpError
    758. -
    759.  * @access    private
    760. -
    761.  * @todo clear comments
    762. -
    763.  */
    764. -
    765.  function parseAnd({
    766. -
    767.  
    768. -
    769.    $this->_clearWhiteSpaces();
    770. -
    771.    $n 0;
    772. -
    773.    $filterStr '';
    774. -
    775.  
    776. -
    777.    while(current($this->tokens!= NULL{
    778. -
    779.      $k key($this->tokens);
    780. -
    781.      $token $this->tokens[$k];
    782. -
    783.  
    784. -
    785.      if (!strcasecmp('USING'$token)) {
    786. -
    787.         $this->parseFilter($n$filterStr);
    788. -
    789.         unset($this->tokens[$k]);
    790. -
    791.         return $this->parseUsing();
    792. -
    793.      }elseif ($token == ','{
    794. -
    795.         $this->parseFilter($n$filterStr);
    796. -
    797.         $filterStr '';
    798. -
    799.         $token '';
    800. -
    801.         ++$n;
    802. -
    803.      }
    804. -
    805.      $filterStr .= $token;
    806. -
    807.      unset($this->tokens[$k]);
    808. -
    809.    }
    810. -
    811.    $this->parseFilter($n$filterStr);
    812. -
    813.  }
    814. -
    815.  
    816. -
    817.  
    818. -
    819. /**
    820. -
    821.  * Parse the USING clause of an Rdql query
    822. -
    823.  *
    824. -
    825.  * @throws    PhpError
    826. -
    827.  * @access    private
    828. -
    829.  */
    830. -
    831.  function parseUsing({
    832. -
    833.  
    834. -
    835.   $commaExpected FALSE;
    836. -
    837.   $comma FALSE;
    838. -
    839.  
    840. -
    841.   do {
    842. -
    843.     $this->_clearWhiteSpaces();
    844. -
    845.     if (current($this->tokens== ','{
    846. -
    847.         $comma TRUE;
    848. -
    849.         $this->_checkComma($commaExpectedRDQL_USG_ERR);
    850. -
    851.     }else{
    852. -
    853.        $prefix $this->_validatePrefix(current($this->tokens));
    854. -
    855.        $this->_clearWhiteSpaces();
    856. -
    857.  
    858. -
    859.        if (strcasecmp('FOR'current($this->tokens)))
    860. -
    861.           trigger_error(RDQL_USG_ERR ." keyword: 'FOR' missing in the namespace declaration: '"E_USER_ERROR);
    862. -
    863.        unset($this->tokens[key($this->tokens)]);
    864. -
    865.        $this->_clearWhiteSpaces();
    866. -
    867.  
    868. -
    869.        $this->parsedQuery['ns'][$prefix$this->_validateUri(current($this->tokens)RDQL_USG_ERR);
    870. -
    871.        $this->_clearWhiteSpaces();
    872. -
    873.        $commaExpected TRUE;
    874. -
    875.        $comma FALSE;
    876. -
    877.     }
    878. -
    879.   }while(current($this->tokens!= NULL);
    880. -
    881.  
    882. -
    883.   if ($comma)
    884. -
    885.       trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma"E_USER_ERROR);
    886. -
    887.  }
    888. -
    889.  
    890. -
    891.  
    892. -
    893. /**
    894. -
    895.  * Check if a filter from the AND clause contains an equal number of '(' and ')'
    896. -
    897.  * and parse filter expressions.
    898. -
    899.  *
    900. -
    901.  * @param   integer $n 
    902. -
    903.  * @param   string  $filter 
    904. -
    905.  * @throws  PHPError
    906. -
    907.  * @access    private
    908. -
    909.  */
    910. -
    911.  function parseFilter($n$filter{
    912. -
    913.  
    914. -
    915.    if ($filter == NULL)
    916. -
    917.       trigger_error(RDQL_AND_ERR ." ',' - unexpected comma"E_USER_ERROR);
    918. -
    919.    $paren substr_count($filter'('substr_count($filter')');
    920. -
    921.    if ($paren != 0{
    922. -
    923.       if ($paren 0)
    924. -
    925.          $errorMsg "'" .htmlspecialchars($filter."' - ')' missing ";
    926. -
    927.       elseif ($paren 0)
    928. -
    929.          $errorMsg "'" .htmlspecialchars($filter."' - too many ')' ";
    930. -
    931.       trigger_error(RDQL_AND_ERR .$errorMsgE_USER_ERROR);
    932. -
    933.    }
    934. -
    935.  
    936. -
    937.    $this->parsedQuery['filters'][$n$this->parseExpressions($filter);
    938. -
    939.  }
    940. -
    941.  
    942. -
    943.  
    944. -
    945. /**
    946. -
    947.  * Parse expressions inside the passed filter:
    948. -
    949.  * 1)  regex equality expressions:    ?var [~~ | =~ | !~ ] REG_EX
    950. -
    951.  * 2a) string equality expressions:   ?var  [eq | ne] "literal"@lang^^dtype.
    952. -
    953.  * 2b) string equality expressions:   ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
    954. -
    955.  * 3)  numerical expressions: e.q.    (?var1 - ?var2)*4 >= 20
    956. -
    957.  *
    958. -
    959.  * In cases 1-2 parse each expression of the given filter into an array of variables.
    960. -
    961.  * For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr.
    962. -
    963.  * The RDQLengine will then replace each place holder with the outcomming boolean value
    964. -
    965.  * of the corresponding expression.
    966. -
    967.  * The remaining filterStr contains only numerical expressions and place holders.
    968. -
    969.  *
    970. -
    971.  * @param   string  $filteStr 
    972. -
    973.  * @return  array   ['string'] = string
    974. -
    975.  *                   ['evalFilterStr'] = string
    976. -
    977.  *                   ['reqexEqExprs'][]['var'] = ?VARNAME
    978. -
    979.  *                                     ['operator'] = (eq | ne)
    980. -
    981.  *                                     ['regex'] = string
    982. -
    983.  *                   ['strEqExprs'][]['var'] = ?VARNAME
    984. -
    985.  *                                  ['operator'] = (eq | ne)
    986. -
    987.  *                                  ['value'] = string
    988. -
    989.  *                                  ['value_type'] = ('variable' | 'URI' | 'QName'| 'Literal')
    990. -
    991.  *                                  ['value_lang'] = string
    992. -
    993.  *                                  ['value_dtype'] = string
    994. -
    995.  *                                    ['value_dtype_is_qname'] = boolean
    996. -
    997.  *                   ['numExpr']['vars'][] = ?VARNAME
    998. -
    999.  * @access    private
    1000. -
    1001.  */
    1002. -
    1003.  function parseExpressions($filterStr{
    1004. -
    1005.  
    1006. -
    1007.    $parsedFilter['string'$filterStr;
    1008. -
    1009.    $parsedFilter['regexEqExprs'array();
    1010. -
    1011.    $parsedFilter['strEqExprs'array();
    1012. -
    1013.    $parsedFilter['numExprVars'array();
    1014. -
    1015.  
    1016. -
    1017.    // parse regex string equality expressions, e.g. ?x ~~ !//foo.com/r!i
    1018. -
    1019.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+([~!=]~)\s+(['|\"])?([^\s'\"]+)(['|\"])?/";
    1020. -
    1021.    preg_match_all($reg_ex$filterStr$eqExprs);
    1022. -
    1023.    foreach ($eqExprs[0as $i => $eqExpr{
    1024. -
    1025.      $this->_checkRegExQuotation($filterStr$eqExprs[3][$i]$eqExprs[5][$i]);
    1026. -
    1027.      $parsedFilter['regexEqExprs'][$i]['var'$this->_isDefined($eqExprs[1][$i]);
    1028. -
    1029.      $parsedFilter['regexEqExprs'][$i]['operator'$eqExprs[2][$i];
    1030. -
    1031.      $parsedFilter['regexEqExprs'][$i]['regex'$eqExprs[4][$i];
    1032. -
    1033.  
    1034. -
    1035.      $filterStr str_replace($eqExpr" ##RegEx_$i## "$filterStr);
    1036. -
    1037.    }
    1038. -
    1039.  
    1040. -
    1041.    // parse ?var  [eq | ne] "literal"@lang^^dtype
    1042. -
    1043.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\'[^\']*\'|\"[^\"]*\")";
    1044. -
    1045.    $reg_ex .= "(@[a-zA-Z]+)?(\^{2}\S+:?\S+)?/i";
    1046. -
    1047.    preg_match_all($reg_ex$filterStr$eqExprs);
    1048. -
    1049.    foreach ($eqExprs[0as $i => $eqExpr{
    1050. -
    1051.      $parsedFilter['strEqExprs'][$i]['var'$this->_isDefined($eqExprs[1][$i]);#
    1052. -
    1053.      $parsedFilter['strEqExprs'][$i]['operator'strtolower($eqExprs[2][$i]);
    1054. -
    1055.      $parsedFilter['strEqExprs'][$i]['value'trim($eqExprs[3][$i],"'\"");
    1056. -
    1057.      $parsedFilter['strEqExprs'][$i]['value_type''Literal';
    1058. -
    1059.      $parsedFilter['strEqExprs'][$i]['value_lang'substr($eqExprs[4][$i]1);     
    1060. -
    1061.      $dtype substr($eqExprs[5][$i]2);
    1062. -
    1063.      if ($dtype{
    1064. -
    1065.         $parsedFilter['strEqExprs'][$i]['value_dtype'$this->_validateUri($dtypeRDQL_AND_ERR);
    1066. -
    1067.         if ($dtype{0!= '<')
    1068. -
    1069.            $parsedFilter['strEqExprs'][$i]['value_dtype_is_qname'TRUE;      
    1070. -
    1071.      }else 
    1072. -
    1073.         $parsedFilter['strEqExprs'][$i]['value_dtype''';
    1074. -
    1075.  
    1076. -
    1077.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$i## "$filterStr);
    1078. -
    1079.    }
    1080. -
    1081.    
    1082. -
    1083.    // parse ?var [eq | ne] ?var
    1084. -
    1085.    $ii count($parsedFilter['strEqExprs']);
    1086. -
    1087.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\?[a-zA-Z0-9_]+)/i";
    1088. -
    1089.    preg_match_all($reg_ex$filterStr$eqExprs);
    1090. -
    1091.    foreach ($eqExprs[0as $i => $eqExpr{
    1092. -
    1093.      $parsedFilter['strEqExprs'][$ii]['var'$this->_isDefined($eqExprs[1][$i]);
    1094. -
    1095.      $parsedFilter['strEqExprs'][$ii]['operator'strtolower($eqExprs[2][$i]);
    1096. -
    1097.      $parsedFilter['strEqExprs'][$ii]['value'$this->_isDefined($eqExprs[3][$i]);
    1098. -
    1099.      $parsedFilter['strEqExprs'][$ii]['value_type''variable';
    1100. -
    1101.  
    1102. -
    1103.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$ii## "$filterStr);
    1104. -
    1105.      $ii++;
    1106. -
    1107.    }
    1108. -
    1109.  
    1110. -
    1111.    // parse ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
    1112. -
    1113.    $reg_ex  "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+((<\S+>)|(\S+:\S*))/i";
    1114. -
    1115.    preg_match_all($reg_ex$filterStr$eqExprs);
    1116. -
    1117.    foreach ($eqExprs[0as $i => $eqExpr{
    1118. -
    1119.      $parsedFilter['strEqExprs'][$ii]['var'$this->_isDefined($eqExprs[1][$i]);
    1120. -
    1121.      $parsedFilter['strEqExprs'][$ii]['operator'strtolower($eqExprs[2][$i]);
    1122. -
    1123.      if ($eqExprs[4][$i]{
    1124. -
    1125.          $parsedFilter['strEqExprs'][$ii]['value'trim($eqExprs[4][$i]"<>");
    1126. -
    1127.          $parsedFilter['strEqExprs'][$ii]['value_type''URI';
    1128. -
    1129.      }else if($eqExprs[5][$i]){
    1130. -
    1131.          $this->_validateQName($eqExprs[5][$i]RDQL_AND_ERR);
    1132. -
    1133.          $parsedFilter['strEqExprs'][$ii]['value'$eqExprs[5][$i];
    1134. -
    1135.          $parsedFilter['strEqExprs'][$ii]['value_type''QName';
    1136. -
    1137.      }
    1138. -
    1139.  
    1140. -
    1141.      $filterStr str_replace($eqExprs[0][$i]" ##strEqExpr_$ii## "$filterStr);
    1142. -
    1143.      $ii++;
    1144. -
    1145.    }  
    1146. -
    1147.    
    1148. -
    1149.    $parsedFilter['evalFilterStr'$filterStr;
    1150. -
    1151.  
    1152. -
    1153.    // all that is left are numerical expressions and place holders for the above expressions
    1154. -
    1155.    preg_match_all("/\?[a-zA-Z0-9_]+/"$filterStr$vars);
    1156. -
    1157.    foreach ($vars[0as $var{
    1158. -
    1159.      $parsedFilter['numExprVars'][$this->_isDefined($var);
    1160. -
    1161.    }
    1162. -
    1163.  
    1164. -
    1165.    return $parsedFilter;
    1166. -
    1167.  }
    1168. -
    1169.  
    1170. -
    1171.  
    1172. -
    1173. /**
    1174. -
    1175.  * Find all query variables used in the WHERE clause.
    1176. -
    1177.  *
    1178. -
    1179.  * @return  array [] = ?VARNAME
    1180. -
    1181.  * @access    private
    1182. -
    1183.  */
    1184. -
    1185.  function findAllQueryVariables({
    1186. -
    1187.  
    1188. -
    1189.    $vars array();
    1190. -
    1191.    foreach ($this->parsedQuery['patterns'as $pattern{
    1192. -
    1193.      $count 0;
    1194. -
    1195.      foreach ($pattern as $v{
    1196. -
    1197.        if ($v['value'&& $v['value']{0== '?'{
    1198. -
    1199.           ++$count;
    1200. -
    1201.           if (!in_array($v['value']$vars))
    1202. -
    1203.              $vars[$v['value'];
    1204. -
    1205.        }
    1206. -
    1207.      }
    1208. -
    1209.      if (!$count)
    1210. -
    1211.         trigger_error(RDQL_WHR_ERR .'pattern contains no variables'E_USER_ERROR);
    1212. -
    1213.    }
    1214. -
    1215.  
    1216. -
    1217.    return $vars;
    1218. -
    1219.  }
    1220. -
    1221.  
    1222. -
    1223.  
    1224. -
    1225. /**
    1226. -
    1227.  * Replace all namespace prefixes in the pattern and constraint clause of an rdql query
    1228. -
    1229.  * with the namespaces declared in the USING clause and default namespaces.
    1230. -
    1231.  *
    1232. -
    1233.  * @access    private
    1234. -
    1235.  */
    1236. -
    1237.  function replaceNamespacePrefixes({
    1238. -
    1239.  
    1240. -
    1241.    global $default_prefixes;
    1242. -
    1243.  
    1244. -
    1245.    if (!isset($this->parsedQuery['ns']))
    1246. -
    1247.       $this->parsedQuery['ns'array();
    1248. -
    1249.  
    1250. -
    1251.    // add default namespaces
    1252. -
    1253.    // if in an rdql query a reserved prefix (e.g. rdf: rdfs:) is used
    1254. -
    1255.    // it will be overridden by the default namespace defined in constants.php
    1256. -
    1257.    $this->parsedQuery['ns'array_merge($this->parsedQuery['ns']$default_prefixes);
    1258. -
    1259.  
    1260. -
    1261.    // replace namespace prefixes in the FROM clause
    1262. -
    1263.    if (isset($this->parsedQuery['sources']))
    1264. -
    1265.          foreach ($this->parsedQuery['sources'as $n => $source{
    1266. -
    1267.              if (isset($source['is_qname']))
    1268. -
    1269.                 $this->parsedQuery['sources'][$n$this->_replaceNamespacePrefix($source['value']RDQL_SRC_ERR);
    1270. -
    1271.              else {
    1272. -
    1273.                 foreach ($this->parsedQuery['ns'as $prefix => $uri
    1274. -
    1275.                   $source['value'eregi_replace("$prefix:"$uri$source['value']);                                            
    1276. -
    1277.                 $this->parsedQuery['sources'][$n$source['value'];
    1278. -
    1279.              }                
    1280. -
    1281.                 
    1282. -
    1283.          }
    1284. -
    1285.    
    1286. -
    1287.    // replace namespace prefixes in the where clause
    1288. -
    1289.    foreach ($this->parsedQuery['patterns'as $n => $pattern{
    1290. -
    1291.      foreach ($pattern as $key => $v)
    1292. -
    1293.        if ($v['value'&& $v['value']{0!= '?'{
    1294. -
    1295.              if (isset($v['is_qname'])) {                                 
    1296. -
    1297.                $this->parsedQuery['patterns'][$n][$key]['value']
    1298. -
    1299.                    = $this->_replaceNamespacePrefix($v['value']RDQL_WHR_ERR);
    1300. -
    1301.                unset($this->parsedQuery['patterns'][$n][$key]['is_qname']);     
    1302. -
    1303.              else // is quoted URI (== <URI>) or Literal              
    1304. -
    1305.               if (isset($this->parsedQuery['patterns'][$n][$key]['is_literal'])) {
    1306. -
    1307.                    if (isset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname'])) {   
    1308. -
    1309.                        $this->parsedQuery['patterns'][$n][$key]['l_dtype']
    1310. -
    1311.                            = $this->_replaceNamespacePrefix($v['l_dtype']RDQL_WHR_ERR);                           
    1312. -
    1313.                        unset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname']);    
    1314. -
    1315.                    }else {
    1316. -
    1317.                      foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1318. -
    1319.                      $this->parsedQuery['patterns'][$n][$key]['l_dtype']
    1320. -
    1321.                        = eregi_replace("$prefix:"$uri$this->parsedQuery['patterns'][$n][$key]['l_dtype']);
    1322. -
    1323.                    }     
    1324. -
    1325.                  }else {
    1326. -
    1327.                  foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1328. -
    1329.                       $this->parsedQuery['patterns'][$n][$key]['value']
    1330. -
    1331.                      = eregi_replace("$prefix:"$uri$this->parsedQuery['patterns'][$n][$key]['value']);
    1332. -
    1333.               }
    1334. -
    1335.              }
    1336. -
    1337.        }
    1338. -
    1339.    }
    1340. -
    1341.  
    1342. -
    1343.    // replace prefixes in the constraint clause
    1344. -
    1345.    if (isset($this->parsedQuery['filters']))
    1346. -
    1347.       foreach ($this->parsedQuery['filters'as $n => $filter)
    1348. -
    1349.         foreach ($filter['strEqExprs'as $i => $expr{
    1350. -
    1351.           if ($expr['value_type'== 'QName'{             
    1352. -
    1353.                $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
    1354. -
    1355.                    = $this->_replaceNamespacePrefix($expr['value']RDQL_AND_ERR);                 
    1356. -
    1357.              $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_type''URI';                        
    1358. -
    1359.           }
    1360. -
    1361.           if ($expr['value_type'== 'URI')
    1362. -
    1363.              foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1364. -
    1365.                $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
    1366. -
    1367.                  = eregi_replace("$prefix:"$uri,
    1368. -
    1369.                     $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']);
    1370. -
    1371.           elseif ($expr['value_type'== 'Literal'{
    1372. -
    1373.                if (isset($expr['value_dtype_is_qname'])) {
    1374. -
    1375.                    $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
    1376. -
    1377.                       = $this->_replaceNamespacePrefix($expr['value_dtype']RDQL_AND_ERR);                      
    1378. -
    1379.                    unset($this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype_is_qname']);        
    1380. -
    1381.                else {
    1382. -
    1383.                foreach ($this->parsedQuery['ns'as $prefix => $uri)
    1384. -
    1385.                  $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
    1386. -
    1387.                    = eregi_replace("$prefix:"$uri,
    1388. -
    1389.                       $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']);
    1390. -
    1391.                }
    1392. -
    1393.           }
    1394. -
    1395.         }
    1396. -
    1397.  
    1398. -
    1399.    unset($this->parsedQuery['ns']);
    1400. -
    1401.  }
    1402. -
    1403.  
    1404. -
    1405.  
    1406. -
    1407. // =============================================================================
    1408. -
    1409. // *************************** helper functions ********************************
    1410. -
    1411. // =============================================================================
    1412. -
    1413.  
    1414. -
    1415.  
    1416. -
    1417. /**
    1418. -
    1419.  * Remove whitespace-tokens from the array $this->tokens
    1420. -
    1421.  *
    1422. -
    1423.  * @access    private
    1424. -
    1425.  */
    1426. -
    1427.  function _clearWhiteSpaces({
    1428. -
    1429.  
    1430. -
    1431.    while (current($this->tokens== ' '  ||
    1432. -
    1433.           current($this->tokens== "\n" ||
    1434. -
    1435.           current($this->tokens== "\t" ||
    1436. -
    1437.           current($this->tokens== "\r")
    1438. -
    1439.  
    1440. -
    1441.       unset($this->tokens[key($this->tokens)]);
    1442. -
    1443.  }
    1444. -
    1445.  
    1446. -
    1447.  
    1448. -
    1449. /**
    1450. -
    1451.  * Check if the query string of the given clause contains an undesired ','.
    1452. -
    1453.  * If a comma was correctly placed then remove it and clear all whitespaces.
    1454. -
    1455.  *
    1456. -
    1457.  * @param   string  $commaExpected 
    1458. -
    1459.  * @param   string  $clause_error 
    1460. -
    1461.  * @throws  PHPError
    1462. -
    1463.  * @access  private
    1464. -
    1465.  */
    1466. -
    1467.  function _checkComma($commaExpected$clause_error{
    1468. -
    1469.  
    1470. -
    1471.    $this->_clearWhiteSpaces();
    1472. -
    1473.    if (current($this->tokens== ','{
    1474. -
    1475.       if (!$commaExpected)
    1476. -
    1477.          trigger_error($clause_error ."',' - unexpected comma"E_USER_ERROR);
    1478. -
    1479.       else {
    1480. -
    1481.          unset($this->tokens[key($this->tokens)]);
    1482. -
    1483.          $this->_checkComma(FALSE$clause_error);
    1484. -
    1485.       }
    1486. -
    1487.    }
    1488. -
    1489.  }
    1490. -
    1491.  
    1492. -
    1493.  
    1494. -
    1495. /**
    1496. -
    1497.  * Check if the given token is either a variable (?var) or the first token of an URI (<URI>).
    1498. -
    1499.  * In case of an URI this function returns the whole URI string.
    1500. -
    1501.  *
    1502. -
    1503.  * @param   string  $token 
    1504. -
    1505.  * @return  array ['value'] = string
    1506. -
    1507.  * @throws  PHPError
    1508. -
    1509.  * @access    private
    1510. -
    1511.  */
    1512. -
    1513.  function _validateVarUri($token{
    1514. -
    1515.      
    1516. -
    1517.    if ($token{0== '?'{
    1518. -
    1519.       $token_res['value'$this->_validateVar($tokenRDQL_WHR_ERR);
    1520. -
    1521.    else {
    1522. -
    1523.          $token_res['value'$this->_validateUri($tokenRDQL_WHR_ERR);
    1524. -
    1525.          if ($token{0!= '<')
    1526. -
    1527.              $token_res['is_qname'TRUE;         
    1528. -
    1529.    }           
    1530. -
    1531.    return $token_res;
    1532. -
    1533.  }
    1534. -
    1535.  
    1536. -
    1537.  
    1538. -
    1539. /**
    1540. -
    1541.  * Check if the given token is either a variable (?var) or the first token
    1542. -
    1543.  * of either an URI (<URI>) or a literal ("Literal").
    1544. -
    1545.  * In case of a literal return an array with literal properties (value, language, datatype).
    1546. -
    1547.  * In case of a variable or an URI return only ['value'] = string.
    1548. -
    1549.  *
    1550. -
    1551.  * @param   string  $token 
    1552. -
    1553.  * @return  array ['value'] = string
    1554. -
    1555.  *                   ['is_qname'] = boolean
    1556. -
    1557.  *                 ['is_literal'] = boolean
    1558. -
    1559.  *                 ['l_lang'] = string
    1560. -
    1561.  *                 ['l_dtype'] = string
    1562. -
    1563.  * @throws  PHPError
    1564. -
    1565.  * @access    private
    1566. -
    1567.  */
    1568. -
    1569.  function _validateVarUriLiteral($token{
    1570. -
    1571.  
    1572. -
    1573.    if ($token{0== '?')
    1574. -
    1575.       $statement_object['value'$this->_validateVar($tokenRDQL_WHR_ERR);   
    1576. -
    1577.    elseif ($token{0== "'" || $token{0== '"')
    1578. -
    1579.       $statement_object $this->_validateLiteral($token);
    1580. -
    1581.    elseif ($token{0== '<')
    1582. -
    1583.       $statement_object['value'$this->_validateUri($tokenRDQL_WHR_ERR);      
    1584. -
    1585.    elseif (ereg(':'$token)) {
    1586. -
    1587.          $statement_object['value'$this->_validateUri($tokenRDQL_WHR_ERR);
    1588. -
    1589.          $statement_object['is_qname'TRUE;
    1590. -
    1591.    }else
    1592. -
    1593.          trigger_error(RDQL_WHR_ERR ." '$token' - ?Variable, &lt;URI&gt;, QNameor \"LITERAL\" expected"E_USER_ERROR);   
    1594. -
    1595.    return $statement_object;      
    1596. -
    1597.  }
    1598. -
    1599.  
    1600. -
    1601.  
    1602. -
    1603. /**
    1604. -
    1605.  * Check if the given token is a valid variable name (?var).
    1606. -
    1607.  *
    1608. -
    1609.  * @param   string  $token 
    1610. -
    1611.  * @param   string  $clause_error 
    1612. -
    1613.  * @return  string 
    1614. -
    1615.  * @throws  PHPError
    1616. -
    1617.  * @access    private
    1618. -
    1619.  */
    1620. -
    1621.  function _validateVar($token$clause_error{
    1622. -
    1623.  
    1624. -
    1625.    preg_match("/\?[a-zA-Z0-9_]+/"$token$match);
    1626. -
    1627.    if (!isset($match[0]|| $match[0!= $token)
    1628. -
    1629.       trigger_error($clause_error ."'" .htmlspecialchars($token)
    1630. -
    1631.                     ."' - variable name contains illegal characters"E_USER_ERROR);
    1632. -
    1633.    unset($this->tokens[key($this->tokens)]);
    1634. -
    1635.    return $token;
    1636. -
    1637.  }
    1638. -
    1639.  
    1640. -
    1641.  
    1642. -
    1643. /**
    1644. -
    1645.  * Check if $token is the first token of a valid URI (<URI>) and return the whole URI string
    1646. -
    1647.  *
    1648. -
    1649.  * @param   string  $token 
    1650. -
    1651.  * @param   string  $clause_error 
    1652. -
    1653.  * @return  string 
    1654. -
    1655.  * @throws  PHPError
    1656. -
    1657.  * @access    private
    1658. -
    1659.  */
    1660. -
    1661.  function _validateUri($token$clause_error{
    1662. -
    1663.  
    1664. -
    1665.    if ($token{0!= '<'{
    1666. -
    1667.       if (strpos($token':'&& $this->_validateQName($token$clause_error)) {
    1668. -
    1669.           unset($this->tokens[key($this->tokens)]);
    1670. -
    1671.           return rtrim($token':');
    1672. -
    1673.       }
    1674. -
    1675.       $errmsg $clause_error .'\'' .htmlspecialchars($token.'\' ';
    1676. -
    1677.       if ($clause_error == RDQL_WHR_ERR)
    1678. -
    1679.          $errmsg .= "- ?Variable or &lt;URI&gt; or QName expected";
    1680. -
    1681.       else
    1682. -
    1683.          $errmsg .= "- &lt;URI&gt; or QName expected";
    1684. -
    1685.       trigger_error($errmsgE_USER_ERROR);
    1686. -
    1687.    }else{
    1688. -
    1689.       $token_res $token;
    1690. -
    1691.       while($token{strlen($token)-1!= '>' && $token != NULL{
    1692. -
    1693.         if ($token == '(' || $token == ')' || $token == ',' ||
    1694. -
    1695.             $token == ' ' || $token == "\n" || $token == "\r"{
    1696. -
    1697.            trigger_error($clause_error .'\'' .htmlspecialchars($token_res)
    1698. -
    1699.                           ."' - illegal input: '$token' - '>' missing"E_USER_ERROR);
    1700. -
    1701.         }
    1702. -
    1703.         unset($this->tokens[key($this->tokens)]);
    1704. -
    1705.         $token current($this->tokens);
    1706. -
    1707.         $token_res .= $token;
    1708. -
    1709.       }
    1710. -
    1711.       if ($token == NULL)
    1712. -
    1713.          trigger_error($clause_error .'\'' .htmlspecialchars($token_res."' - '>' missing"E_USER_ERROR);
    1714. -
    1715.       unset($this->tokens[key($this->tokens)]);
    1716. -
    1717.       return trim($token_res'<>');
    1718. -
    1719.    }
    1720. -
    1721.  }
    1722. -
    1723.  
    1724. -
    1725.  
    1726. -
    1727. /**
    1728. -
    1729.  * Check if $token is the first token of a valid literal ("LITERAL") and
    1730. -
    1731.  * return an array with literal properties (value, language, datatype).
    1732. -
    1733.  *
    1734. -
    1735.  * @param   string  $token 
    1736. -
    1737.  * @return  array   ['value'] = string
    1738. -
    1739.  *                   ['is_literal'] = boolean
    1740. -
    1741.  *                   ['l_lang'] = string
    1742. -
    1743.  *                   ['l_dtype'] = string
    1744. -
    1745.  *                     ['l_dtype_is_qname'] = boolean
    1746. -
    1747.  * @throws  PHPError
    1748. -
    1749.  * @access    private
    1750. -
    1751.  */
    1752. -
    1753.  function _validateLiteral($token{
    1754. -
    1755.  
    1756. -
    1757.    $quotation_mark $token{0};
    1758. -
    1759.    $statement_object array ('value' => '',
    1760. -
    1761.                               'is_literal' => TRUE,
    1762. -
    1763.                               'l_lang' => '',
    1764. -
    1765.                               'l_dtype' => '');
    1766. -
    1767.    $this->tokens[key($this->tokens)substr($token,1);
    1768. -
    1769.  
    1770. -
    1771.    $return FALSE;
    1772. -
    1773.    foreach ($this->tokens as $k => $token{
    1774. -
    1775.  
    1776. -
    1777.      if ($token != NULL && $token{strlen($token)-1== $quotation_mark{
    1778. -
    1779.          $token rtrim($token$quotation_mark);
    1780. -
    1781.          $return TRUE;
    1782. -
    1783.  
    1784. -
    1785.       // parse @language(^^datatype)?
    1786. -
    1787.      }elseif (strpos($token$quotation_mark .'@'|| substr($token02)  == $quotation_mark .'@'{
    1788. -
    1789.         $lang substr($tokenstrpos($token$quotation_mark .'@')+2);
    1790. -
    1791.         if (strpos($lang'^^'|| substr($lang0,2== '^^'{
    1792. -
    1793.            $dtype substr($langstrpos($lang'^^')+2);
    1794. -
    1795.            if (!$dtype)
    1796. -
    1797.               trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1798. -
    1799.                                          .$token  ." - datatype expected" ,E_USER_ERROR);
    1800. -
    1801.                                          
    1802. -
    1803.            $statement_object['l_dtype'$this->_validateUri($dtypeRDQL_WHR_ERR);
    1804. -
    1805.            if ($dtype{0!= '<')
    1806. -
    1807.               $statement_object['l_dtype_is_qname'TRUE;              
    1808. -
    1809.         
    1810. -
    1811.            $lang substr($lang0strpos($lang'^^'));
    1812. -
    1813.         }
    1814. -
    1815.         if (!$lang)
    1816. -
    1817.            trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1818. -
    1819.                                       .$token ." - language expected" ,E_USER_ERROR);
    1820. -
    1821.         $statement_object['l_lang'$lang;
    1822. -
    1823.         $token substr($token0strpos($token$quotation_mark .'@'));
    1824. -
    1825.         $return TRUE;
    1826. -
    1827.  
    1828. -
    1829.      // parse ^^datatype
    1830. -
    1831.      }elseif (strpos($token$quotation_mark .'^^'|| substr($token03)  == $quotation_mark .'^^'{
    1832. -
    1833.         $dtype substr($tokenstrpos($token$quotation_mark .'^^')+3);
    1834. -
    1835.         if (!$dtype)
    1836. -
    1837.            trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
    1838. -
    1839.                                       .$token  ." - datatype expected" ,E_USER_ERROR);       
    1840. -
    1841.  
    1842. -
    1843.         $statement_object['l_dtype'$this->_validateUri($dtypeRDQL_WHR_ERR);
    1844. -
    1845.         if ($dtype{0!= '<')
    1846. -
    1847.            $statement_object['l_dtype_is_qname'TRUE;           
    1848. -
    1849.  
    1850. -
    1851.         $token substr($token0strpos($token$quotation_mark .'^^'));
    1852. -
    1853.         $return TRUE;
    1854. -
    1855.      }elseif (strpos($token$quotation_mark))
    1856. -
    1857.         trigger_error(RDQL_WHR_ERR ."'$token' - illegal input"E_USER_ERROR);
    1858. -
    1859.      $statement_object['value'.= $token;
    1860. -
    1861.      unset($this->tokens[$k]);
    1862. -
    1863.      if ($return)
    1864. -
    1865.         return $statement_object;
    1866. -
    1867.    }
    1868. -
    1869.    trigger_error(RDQL_WHR_ERR ."quotation end mark$quotation_mark missing"E_USER_ERROR);
    1870. -
    1871.  }
    1872. -
    1873.  
    1874. -
    1875.  
    1876. -
    1877. /**
    1878. -
    1879.  * Check if the given token is a valid QName.
    1880. -
    1881.  *
    1882. -
    1883.  * @param   string  $token 
    1884. -
    1885.  * @param   string  $clause_error 
    1886. -
    1887.  * @return  boolean 
    1888. -
    1889.  * @throws  PHPError
    1890. -
    1891.  * @access    private
    1892. -
    1893.  */
    1894. -
    1895. function _validateQName($token$clause_error{
    1896. -
    1897.  
    1898. -
    1899.   $parts explode(':'$token);
    1900. -
    1901.   if (count($parts2)
    1902. -
    1903.       trigger_error($clause_error ."illegal QName: '$token'"E_USER_ERROR);
    1904. -
    1905.   if (!$this->_validateNCName($parts[0]))
    1906. -
    1907.       trigger_error($clause_error ."illegal prefix in QName: '$token'"E_USER_ERROR);
    1908. -
    1909.   if ($parts[1&& !$this->_validateNCName($parts[1]))
    1910. -
    1911.       trigger_error($clause_error ."illegal local part in QName: '$token'"E_USER_ERROR);
    1912. -
    1913.       
    1914. -
    1915.   return TRUE;
    1916. -
    1917. }
    1918. -
    1919.  
    1920. -
    1921.  
    1922. -
    1923. /**
    1924. -
    1925.  * Check if the given token is a valid NCName.
    1926. -
    1927.  *
    1928. -
    1929.  * @param   string  $token 
    1930. -
    1931.  * @return  boolean 
    1932. -
    1933.  * @access    private
    1934. -
    1935.  */ 
    1936. -
    1937. function _validateNCName($token{
    1938. -
    1939.     
    1940. -
    1941.   preg_match("/[a-zA-Z_]+[a-zA-Z_0-9.\-]*/"$token$match);
    1942. -
    1943.   if (isset($match[0]&& $match[0== $token)
    1944. -
    1945.       return TRUE;
    1946. -
    1947.   return FALSE;    
    1948. -
    1949. }
    1950. -
    1951.  
    1952. -
    1953.  
    1954. -
    1955. /**
    1956. -
    1957.  * Check if the given token is a valid namespace prefix.
    1958. -
    1959.  *
    1960. -
    1961.  * @param   string  $token 
    1962. -
    1963.  * @return  string 
    1964. -
    1965.  * @throws  PHPError
    1966. -
    1967.  * @access    private
    1968. -
    1969.  */
    1970. -
    1971.  function _validatePrefix($token{
    1972. -
    1973.  
    1974. -
    1975.    if (!$this->_validateNCName($token))
    1976. -
    1977.       trigger_error(RDQL_USG_ERR ."'" .htmlspecialchars($token)
    1978. -
    1979.                                  ."' - illegal input, namespace prefix expected"E_USER_ERROR);
    1980. -
    1981.    unset($this->tokens[key($this->tokens)]);
    1982. -
    1983.    return $token;
    1984. -
    1985.  }
    1986. -
    1987.  
    1988. -
    1989. /**
    1990. -
    1991.  * Replace a prefix in a given QName and return a full URI.
    1992. -
    1993.  *
    1994. -
    1995.  * @param   string  $qName 
    1996. -
    1997.  * @param   string  $clasue_error 
    1998. -
    1999.  * @return  string 
    2000. -
    2001.  * @throws  PHPError
    2002. -
    2003.  * @access    private
    2004. -
    2005.  */ 
    2006. -
    2007.  function _replaceNamespacePrefix($qName$clause_error{
    2008. -
    2009.  
    2010. -
    2011.    $qName_parts explode(':'$qName);
    2012. -
    2013.    if (!array_key_exists($qName_parts[0]$this->parsedQuery['ns']))
    2014. -
    2015.       trigger_error($clause_error .'undefined prefix: \'' .$qName_parts[0.'\' in: \'' .$qName .'\''E_USER_ERROR);
    2016. -
    2017.    return $this->parsedQuery['ns'][$qName_parts[0]] .$qName_parts[1];
    2018. -
    2019.  
    2020. -
    2021.                    
    2022. -
    2023.                    
    2024. -
    2025. /**
    2026. -
    2027.  * Check if all variables from the SELECT clause are defined in the WHERE clause
    2028. -
    2029.  *
    2030. -
    2031.  * @access private
    2032. -
    2033.  */
    2034. -
    2035.  function _checkSelectVars({
    2036. -
    2037.  
    2038. -
    2039.    foreach ($this->parsedQuery['selectVars'as $var)
    2040. -
    2041.      $this->_isDefined($var);
    2042. -
    2043.  }
    2044. -
    2045.  
    2046. -
    2047.  
    2048. -
    2049. /**
    2050. -
    2051.  * Check if the given variable is defined in the WHERE clause.
    2052. -
    2053.  *
    2054. -
    2055.  * @param $var string
    2056. -
    2057.  * @return     string 
    2058. -
    2059.  * @throws PHPError
    2060. -
    2061.  * @access private
    2062. -
    2063.  */
    2064. -
    2065.  function _isDefined($var{
    2066. -
    2067.  
    2068. -
    2069.    $allQueryVars $this->findAllQueryVariables();
    2070. -
    2071.  
    2072. -
    2073.    if (!in_array($var$allQueryVars))
    2074. -
    2075.       trigger_error(RDQL_SYN_ERR .": '$var' - variable must be defined in the WHERE clause"E_USER_ERROR);
    2076. -
    2077.    return $var;
    2078. -
    2079.  }
    2080. -
    2081.  
    2082. -
    2083.  
    2084. -
    2085. /**
    2086. -
    2087.  * Throw an error if the regular expression from the AND clause is not quoted.
    2088. -
    2089.  *
    2090. -
    2091.  * @param  string $filterString 
    2092. -
    2093.  * @param  string $lQuotMark 
    2094. -
    2095.  * @param  string $rQuotMark 
    2096. -
    2097.  * @throws PHPError
    2098. -
    2099.  * @access private
    2100. -
    2101.  */
    2102. -
    2103.  function _checkRegExQuotation($filterString$lQuotMark$rQuotMark{
    2104. -
    2105.  
    2106. -
    2107.    if (!$lQuotMark)
    2108. -
    2109.       trigger_error(RDQL_AND_ERR ."'$filterString' - regular expressions must be quoted"E_USER_ERROR);
    2110. -
    2111.  
    2112. -
    2113.    if ($lQuotMark != $rQuotMark)
    2114. -
    2115.       trigger_error(RDQL_AND_ERR ."'$filterString' - quotation end mark in the regular expression missing"E_USER_ERROR);
    2116. -
    2117.  }
    2118. -
    2119.  
    2120. -
    2121. // end: Class RdqlParser
    2122. -
    2123.  
    2124. -
    2125. ?>
    2126. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlResultIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlResultIterator.php.html deleted file mode 100755 index 75c6d2d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_rdql__rdqlRdqlResultIterator.php.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - File Source for RdqlResultIterator.php - - - - - -

    Source for file RdqlResultIterator.php

    -

    Documentation is available at RdqlResultIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdqlResultIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing Rdql results.
    16. -
    17.  * This class can be used for iterating forward and backward trough Rdql results.
    18. -
    19.  * It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id: fsource_rdql__rdqlRdqlResultIterator.php.html 443 2007-06-01 16:25:38Z cax $
    24. -
    25.  * @author Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
    26. -
    27.  *
    28. -
    29.  * @package rdql
    30. -
    31.  * @access    public
    32. -
    33.  *
    34. -
    35.  */ 
    36. -
    37.  class RdqlResultIterator extends Object {
    38. -
    39.  
    40. -
    41.      /**
    42. -
    43.     * Reference to the Rdql result
    44. -
    45.     * @var        array RdqlResult
    46. -
    47.     * @access    private
    48. -
    49.     */    
    50. -
    51.     var $RdqlResult;
    52. -
    53.  
    54. -
    55.      /**
    56. -
    57.     * Current position
    58. -
    59.     * RdqlResultIterator does not use the build in PHP array iterator,
    60. -
    61.     * so you can use serveral iterators on a single Rdql result.
    62. -
    63.     * @var        integer 
    64. -
    65.     * @access    private
    66. -
    67.     */    
    68. -
    69.     var $position;
    70. -
    71.    
    72. -
    73.   
    74. -
    75.    /**
    76. -
    77.     * Constructor
    78. -
    79.     *
    80. -
    81.     * @param    object RdqlResult 
    82. -
    83.     * @access    public
    84. -
    85.     */
    86. -
    87.     function RdqlResultIterator(&$RdqlResult{
    88. -
    89.         
    90. -
    91.          $noResult TRUE;
    92. -
    93.         foreach($RdqlResult[0as $value
    94. -
    95.               if ($value != NULL{
    96. -
    97.                      $noResult FALSE;
    98. -
    99.                      break;
    100. -
    101.               }     
    102. -
    103.               
    104. -
    105.           if($noResult)               
    106. -
    107.                $this->RdqlResult NULL;
    108. -
    109.            else 
    110. -
    111.                $this->RdqlResult $RdqlResult;    
    112. -
    113.  
    114. -
    115.         $this->position = -1;
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.   /**
    122. -
    123.    * Returns the labels of the result as array.
    124. -
    125.    * @return    array of strings with the result labels OR null if there are no results.
    126. -
    127.    * @access    public
    128. -
    129.    */
    130. -
    131.   function getResultLabels({
    132. -
    133.         if(count($this->RdqlResult)>0{
    134. -
    135.               return array_keys($this->RdqlResult[0]);
    136. -
    137.         else return null;
    138. -
    139.    }
    140. -
    141.  
    142. -
    143.    /**
    144. -
    145.    * Returns the number of results.
    146. -
    147.    * @return    integer 
    148. -
    149.    * @access    public
    150. -
    151.    */
    152. -
    153.   function countResults({
    154. -
    155.         
    156. -
    157.               return count($this->RdqlResult);
    158. -
    159.  
    160. -
    161.    }
    162. -
    163.   /**
    164. -
    165.    * Returns TRUE if there are more results.
    166. -
    167.    * @return    boolean 
    168. -
    169.    * @access    public
    170. -
    171.    */
    172. -
    173.   function hasNext({
    174. -
    175.           if ($this->position count($this->RdqlResult{            
    176. -
    177.               return TRUE;
    178. -
    179.         else {
    180. -
    181.             return FALSE;
    182. -
    183.         }
    184. -
    185.    }
    186. -
    187.  
    188. -
    189.   /**
    190. -
    191.    * Returns TRUE if the first result has not been reached.
    192. -
    193.    * @return    boolean 
    194. -
    195.    * @access    public
    196. -
    197.    */
    198. -
    199.   function hasPrevious({
    200. -
    201.           if ($this->position 0{
    202. -
    203.             return TRUE;
    204. -
    205.         else {
    206. -
    207.             return FALSE;
    208. -
    209.         }   }   
    210. -
    211.    
    212. -
    213.   /**
    214. -
    215.    * Returns the next result array.
    216. -
    217.    * @param     integer $element 
    218. -
    219.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    220. -
    221.    * @access    public
    222. -
    223.    */
    224. -
    225.   function next($element null{
    226. -
    227.           if ($this->position count($this->RdqlResult1{
    228. -
    229.               $this->position++;
    230. -
    231.             if ($element{return $this->RdqlResult[$this->position][$element];}
    232. -
    233.                   else return $this->RdqlResult[$this->position];
    234. -
    235.         else {
    236. -
    237.             return NULL;
    238. -
    239.         }
    240. -
    241.    }
    242. -
    243.  
    244. -
    245.   /**
    246. -
    247.    * Returns the previous result.
    248. -
    249.    * @param     integer $element 
    250. -
    251.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    252. -
    253.    * @access    public
    254. -
    255.    */
    256. -
    257.   function previous($element null{
    258. -
    259.         if ($this->position 0{
    260. -
    261.               $this->position--;
    262. -
    263.             if ($element{return $this->RdqlResult[$this->position][$element];}
    264. -
    265.                   else return $this->RdqlResult[$this->position];
    266. -
    267.         else {
    268. -
    269.             return NULL;
    270. -
    271.         }   
    272. -
    273.   }
    274. -
    275.  
    276. -
    277.   /**
    278. -
    279.    * Returns the current result.
    280. -
    281.    * @param     integer $element 
    282. -
    283.    * @return    result array OR single result if $element was specified OR NULL if there is no next result.
    284. -
    285.    * @access    public
    286. -
    287.    */
    288. -
    289.   function current($element null{
    290. -
    291.           if (($this->position >= 0&& ($this->position count($this->RdqlResult))) {
    292. -
    293.             if ($element{return $this->RdqlResult[$this->position][$element];}
    294. -
    295.                   else return $this->RdqlResult[$this->position];
    296. -
    297.         else {
    298. -
    299.             return NULL;
    300. -
    301.         
    302. -
    303.    }
    304. -
    305.    
    306. -
    307.   /**
    308. -
    309.    * Moves the pointer to the first result.
    310. -
    311.    * @return    void 
    312. -
    313.    * @access    public
    314. -
    315.    */
    316. -
    317.   function moveFirst({
    318. -
    319.               $this->position 0;
    320. -
    321.    }
    322. -
    323.  
    324. -
    325.   /**
    326. -
    327.    * Moves the pointer to the last result.
    328. -
    329.    * @return    void 
    330. -
    331.    * @access    public
    332. -
    333.    */
    334. -
    335.   function moveLast({
    336. -
    337.               $this->position count($this->RdqlResult1;
    338. -
    339.    }
    340. -
    341.    
    342. -
    343.      /**
    344. -
    345.    * Moves the pointer to a specific result.
    346. -
    347.    * If you set an off-bounds value, next(), previous() and current() will return NULL
    348. -
    349.    * @return    void 
    350. -
    351.    * @access    public
    352. -
    353.    */
    354. -
    355.   function moveTo($position{
    356. -
    357.               $this->position $position;
    358. -
    359.    }
    360. -
    361.    
    362. -
    363.      /**
    364. -
    365.    * Returns the current position of the iterator.
    366. -
    367.    * @return    integer 
    368. -
    369.    * @access    public
    370. -
    371.    */
    372. -
    373.   function getCurrentPosition({
    374. -
    375.                return $this->position;
    376. -
    377.    }
    378. -
    379.   
    380. -
    381. -
    382.  
    383. -
    384. ?>
    385. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResAlt.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResAlt.php.html deleted file mode 100755 index 1a8740d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResAlt.php.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - File Source for ResAlt.php - - - - - -

    Source for file ResAlt.php

    -

    Documentation is available at ResAlt.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResAlt
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Alternative resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_resModel__resModelResAlt.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResAlt extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */    
    50. -
    51.     function ResAlt($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_ALT);
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     *  Return the default value for this resource
    66. -
    67.     *
    68. -
    69.        * @return    object ResResource/ResLiteral 
    70. -
    71.        * @access    public
    72. -
    73.        */
    74. -
    75.     function getDefault()
    76. -
    77.     {
    78. -
    79.         //get the first memeber
    80. -
    81.         $statements=$this->listProperties($this->_getMembershipPropertyWithIndex(1));
    82. -
    83.         if(isset($statements[0]))
    84. -
    85.         {
    86. -
    87.             //return the value
    88. -
    89.             return $statements[0]->getObject();
    90. -
    91.         else 
    92. -
    93.         {
    94. -
    95.             return null;
    96. -
    97.         }
    98. -
    99.     }
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     *  Set the default value of this container.
    106. -
    107.     *
    108. -
    109.        * @param    object ResResource/ResLiteral $object 
    110. -
    111.        * @access    public
    112. -
    113.        */
    114. -
    115.     function setDefault($object)
    116. -
    117.     {
    118. -
    119.         //remember the old default value
    120. -
    121.         $oldDefaultObject=$this->getDefault();
    122. -
    123.         //if there wasn't a default value before
    124. -
    125.         if($oldDefaultObject === null)
    126. -
    127.         {
    128. -
    129.             //add the new value
    130. -
    131.             $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
    132. -
    133.         else 
    134. -
    135.         {
    136. -
    137.             //remove the old value
    138. -
    139.             $this->removeAll($this->_getMembershipPropertyWithIndex(1));
    140. -
    141.             //set the new value
    142. -
    143.             $this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
    144. -
    145.             //add the old default value at the end
    146. -
    147.             $this->add($oldDefaultObject);
    148. -
    149.         }
    150. -
    151.     }
    152. -
    153. }
    154. -
    155. ?>
    156. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResBag.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResBag.php.html deleted file mode 100755 index 7ec937e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResBag.php.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for ResBag.php - - - - - -

    Source for file ResBag.php

    -

    Documentation is available at ResBag.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResBag
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Bag resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_resModel__resModelResBag.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResBag extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */        
    50. -
    51.     function ResBag($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_BAG);
    58. -
    59.     }
    60. -
    61. }
    62. -
    63. ?>
    64. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResContainer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResContainer.php.html deleted file mode 100755 index 166830a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResContainer.php.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - File Source for ResContainer.php - - - - - -

    Source for file ResContainer.php

    -

    Documentation is available at ResContainer.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResContainer
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF Container.
    14. -
    15. * This Class defines methods for accessing RDF container resources.
    16. -
    17. * These methods operate on the RDF statements contained in a model.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_resModel__resModelResContainer.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Daniel Westphal <mail at d-westphal dot de>
    24. -
    25. *
    26. -
    27. @package     resModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33.  
    34. -
    35. class ResContainer extends ResResource 
    36. -
    37. {
    38. -
    39.     /**
    40. -
    41.     * Holds a ResResource of this container type rdf:Seq, rdf:Alt, or rdf:Bag
    42. -
    43.     * @var        ResResource 
    44. -
    45.     * @access    private
    46. -
    47.     */
    48. -
    49.     var $containerType;
    50. -
    51.     
    52. -
    53.     
    54. -
    55.     /**
    56. -
    57.     * Constructor
    58. -
    59.     * You can supply a URI
    60. -
    61.     *
    62. -
    63.     * @param string $uri 
    64. -
    65.     * @access    public
    66. -
    67.     */    
    68. -
    69.     function ResContainer($uri null)
    70. -
    71.     {
    72. -
    73.         parent::ResResource($uri);
    74. -
    75.     }    
    76. -
    77.     
    78. -
    79.     /**
    80. -
    81.     * Add a new value to a container.
    82. -
    83.     * The new value is added as the last element of the container.
    84. -
    85.     *
    86. -
    87.        * @param    object ResResource/ResLiteral    $object 
    88. -
    89.        * @access    public
    90. -
    91.        */
    92. -
    93.     function add($object)
    94. -
    95.     {
    96. -
    97.         //type this container, if it isn't already typed
    98. -
    99.         if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
    100. -
    101.             $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
    102. -
    103.         //get the current size
    104. -
    105.         $actualSize=$this->size();
    106. -
    107.         //add the object to the last position
    108. -
    109.         $this->addProperty(new ResResource(RDF_NAMESPACE_URI.'_'.($actualSize+1)),$object);
    110. -
    111.     }
    112. -
    113.     
    114. -
    115.     /**
    116. -
    117.     * Determine whether the container contains a value
    118. -
    119.     *
    120. -
    121.        * @param    obejct ResResource/ResLiteral    $resResource
    122. -
    123.        * @return    boolean 
    124. -
    125.        * @access    public
    126. -
    127.        */
    128. -
    129.     function contains($resResource)
    130. -
    131.     {
    132. -
    133.         //get all container's properties 
    134. -
    135.         foreach ($this->listProperties(as $statement)
    136. -
    137.         {
    138. -
    139.             //if the property matches a container membership property
    140. -
    141.             if ($this->_predicateLabelMatchesMembershipProperty($statement->getLabelPredicate()))
    142. -
    143.             {
    144. -
    145.                 //check, if it's the value, we're looking for. 
    146. -
    147.                 if ($resResource->equals($statement->getObject()))
    148. -
    149.                     return true;
    150. -
    151.             }    
    152. -
    153.         }
    154. -
    155.         return false;
    156. -
    157.     }
    158. -
    159.     
    160. -
    161.     /**
    162. -
    163.     * Returns true, if this resource is a container from type rdf:Alt
    164. -
    165.     *
    166. -
    167.        * @return    boolean 
    168. -
    169.        * @access    public
    170. -
    171.        */    
    172. -
    173.     function isAlt()
    174. -
    175.     {
    176. -
    177.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_ALT);
    178. -
    179.     }
    180. -
    181.     
    182. -
    183.     /**
    184. -
    185.     * Returns true, if this resource is a container from type rdf:Bag
    186. -
    187.     *
    188. -
    189.        * @return    boolean 
    190. -
    191.        * @access    public
    192. -
    193.        */    
    194. -
    195.     function isBag()
    196. -
    197.     {
    198. -
    199.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_BAG);
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     /**
    206. -
    207.     * Returns true, if this resource is a container from type rdf:Seq
    208. -
    209.     *
    210. -
    211.        * @return    boolean 
    212. -
    213.        * @access    public
    214. -
    215.        */    
    216. -
    217.     function isSeq()
    218. -
    219.     {
    220. -
    221.         return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_SEQ);
    222. -
    223.     }
    224. -
    225.     
    226. -
    227.     /**
    228. -
    229.     * Get an array of all resources that are values of this container
    230. -
    231.     *
    232. -
    233.        * @return    array 
    234. -
    235.        * @access    public
    236. -
    237.        */    
    238. -
    239.     function getMembers()
    240. -
    241.     {
    242. -
    243.         $return=array();
    244. -
    245.         foreach ($this->listProperties(as $statement)
    246. -
    247.         {
    248. -
    249.             $predicateLabel=$statement->getLabelPredicate();
    250. -
    251.             if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
    252. -
    253.             {
    254. -
    255.                 $return[$this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)$statement->getObject();
    256. -
    257.             }    
    258. -
    259.         }
    260. -
    261.         return $return;
    262. -
    263.     }
    264. -
    265.     
    266. -
    267.     /**
    268. -
    269.     * Remove a value from the container.
    270. -
    271.     * 
    272. -
    273.     * Once removed, the values in the container with a higher ordinal value are renumbered.
    274. -
    275.     * The renumbering algorithm depends on the type of container.
    276. -
    277.     *
    278. -
    279.        * @param    obejct ResResource/ResLiteral    $resResource
    280. -
    281.        * @access    public
    282. -
    283.        */
    284. -
    285.     function remove($object)
    286. -
    287.     {
    288. -
    289.         $deleteFromIndex=array();
    290. -
    291.         //get all container members
    292. -
    293.         $memberIndex=$this->getMembers();
    294. -
    295.         
    296. -
    297.         //check each container member if it equals the resoure to be removed
    298. -
    299.         foreach ($memberIndex as $key => $value)
    300. -
    301.         {
    302. -
    303.             //save the statements positio in the container
    304. -
    305.             if($object->equals($value))
    306. -
    307.                     $deleteFromIndex[]=$key;    
    308. -
    309.         }
    310. -
    311.  
    312. -
    313.         //delete all found container members
    314. -
    315.         foreach ($deleteFromIndex as $index)
    316. -
    317.         {
    318. -
    319.             $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    320. -
    321.  
    322. -
    323.             //renumber all members with higher ordinal numbers than the deleted one
    324. -
    325.             for ($i $index;$i count($memberIndex)$i++)
    326. -
    327.             {
    328. -
    329.                 $this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
    330. -
    331.                 $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
    332. -
    333.             }        
    334. -
    335.         }
    336. -
    337.         
    338. -
    339.     }
    340. -
    341.     
    342. -
    343.     /**
    344. -
    345.     * Returns the number values in the container.
    346. -
    347.     *
    348. -
    349.        * @return    integer 
    350. -
    351.        * @access    public
    352. -
    353.        */    
    354. -
    355.     function size()
    356. -
    357.     {
    358. -
    359.         return count($this->getMembers());
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Checks, if a predicate label fits a container membership property rdf:_n
    368. -
    369.     *
    370. -
    371.        * @param    string    $predicateLabel 
    372. -
    373.        * @return    boolean 
    374. -
    375.        * @access    private
    376. -
    377.        */
    378. -
    379.     function _predicateLabelMatchesMembershipProperty($predicateLabel)
    380. -
    381.     {
    382. -
    383.         return substr($predicateLabel,0,strlen(RDF_NAMESPACE_URI.'_')) == RDF_NAMESPACE_URI.'_';
    384. -
    385.     }
    386. -
    387.     
    388. -
    389.     /**
    390. -
    391.     * Get the ordinal number from a membership property rdf:_n
    392. -
    393.     *
    394. -
    395.        * @param    string    $predicateLabel 
    396. -
    397.        * @return    integer 
    398. -
    399.        * @access    private
    400. -
    401.        */
    402. -
    403.     function _getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)
    404. -
    405.     {
    406. -
    407.         return (int)substr($predicateLabel,strlen(RDF_NAMESPACE_URI.'_'));
    408. -
    409.     }
    410. -
    411.     
    412. -
    413.     /**
    414. -
    415.     * Get a membership property rdf:_n with index $int
    416. -
    417.     *
    418. -
    419.        * @param    intger    $int 
    420. -
    421.        * @return    string 
    422. -
    423.        * @access    private
    424. -
    425.        */
    426. -
    427.     function _getMembershipPropertyWithIndex($int)
    428. -
    429.     {
    430. -
    431.         return new ResResource(RDF_NAMESPACE_URI.'_'.$int);    
    432. -
    433.     }
    434. -
    435. }
    436. -
    437. ?>
    438. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResIterator.php.html deleted file mode 100755 index 3b756bab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResIterator.php.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - File Source for ResIterator.php - - - - - -

    Source for file ResIterator.php

    -

    Documentation is available at ResIterator.php

    -
    -
    1. <?php 
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * Class: ResIterator
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. *
    12. -
    13. @package     resModel
    14. -
    15. */
    16. -
    17.  
    18. -
    19.  
    20. -
    21. /**
    22. -
    23. * Implementation of a resource iterator.
    24. -
    25. *
    26. -
    27. * This Iterator should be used in a for-loop like:
    28. -
    29. * $it = $ontClass->listInstances();
    30. -
    31. * for ($it->rewind(); $it->valid(); $it->next())
    32. -
    33. * {
    34. -
    35. *    $currentResource=$it->current();
    36. -
    37. * };
    38. -
    39. *
    40. -
    41. *
    42. -
    43. @version  $Id: fsource_resModel__resModelResIterator.php.html 443 2007-06-01 16:25:38Z cax $
    44. -
    45. @author Daniel Westphal <mail at d-westphal dot de>
    46. -
    47. *
    48. -
    49. *
    50. -
    51. @package     resModel
    52. -
    53. @access    public
    54. -
    55. ***/
    56. -
    57. -
    58. {
    59. -
    60.     /**
    61. -
    62.     * Holds a reference to the assoiated ResModel / OntModel
    63. -
    64.     * @var        object Model 
    65. -
    66.     * @access    private
    67. -
    68.     */
    69. -
    70.     var $associatedModel;
    71. -
    72.     
    73. -
    74.     /**
    75. -
    76.     * The current position
    77. -
    78.     * @var        integer 
    79. -
    80.     * @access    private
    81. -
    82.     */
    83. -
    84.     var $key;
    85. -
    86.     
    87. -
    88.     /**
    89. -
    90.     * If the current resource is valid
    91. -
    92.     * @var        boolean 
    93. -
    94.     * @access    private
    95. -
    96.     */
    97. -
    98.     var $valid;
    99. -
    100.     
    101. -
    102.     /**
    103. -
    104.     * The current resource
    105. -
    106.     * @var obejct ResResource
    107. -
    108.     * @access    private
    109. -
    110.     */
    111. -
    112.     var $currentResource;
    113. -
    114.     
    115. -
    116.     /**
    117. -
    118.     * The subject to search for.
    119. -
    120.     * @var        object ResResource 
    121. -
    122.     * @access    private
    123. -
    124.     */
    125. -
    126.     var $searchSubject;
    127. -
    128.     
    129. -
    130.     /**
    131. -
    132.     * The predicate to search for.
    133. -
    134.     * @var        object ResResource 
    135. -
    136.     * @access    private
    137. -
    138.     */
    139. -
    140.     var $searchPredicate;
    141. -
    142.     
    143. -
    144.     /**
    145. -
    146.     * The object to search for.
    147. -
    148.     * @var        object ResResource 
    149. -
    150.     * @access    private
    151. -
    152.     */
    153. -
    154.     var $searchObject;
    155. -
    156.     
    157. -
    158.     /**
    159. -
    160.     * If the resource, we're intrested in is the subject (s), predicate(p),
    161. -
    162.     * or object (o) of the found statements
    163. -
    164.     * 
    165. -
    166.     * @var        string 
    167. -
    168.     * @access    private
    169. -
    170.     */
    171. -
    172.     var $getSPO;
    173. -
    174.     
    175. -
    176.     /**
    177. -
    178.     * Defines the type of resource, we'd like to receive.
    179. -
    180.     * 
    181. -
    182.     * @var        string 
    183. -
    184.     * @access    private
    185. -
    186.     */
    187. -
    188.     var $returnType;
    189. -
    190.     
    191. -
    192.     /**
    193. -
    194.     * If set, each resource will first be checked, if it's
    195. -
    196.     * language fits.
    197. -
    198.     * 
    199. -
    200.     * @var        string 
    201. -
    202.     * @access    private
    203. -
    204.     */
    205. -
    206.     var $findLiteralWithLang;
    207. -
    208.     
    209. -
    210.     
    211. -
    212.     /**
    213. -
    214.     * Constructor.
    215. -
    216.     *
    217. -
    218.     * $subject, $predicate, and $object are used like inf find().
    219. -
    220.     * $getSPO supports the strings 's', 'p', and 'o' to return
    221. -
    222.     * either the subject, predicate, or object of the result statements.
    223. -
    224.     * $returnType supports the strings 'ResProperty', 'ResLiteral',
    225. -
    226.     * 'OntProperty', 'OntClass', and 'Individual' and returns the resources
    227. -
    228.     * as the matching type.
    229. -
    230.     *
    231. -
    232.     * @param object ResResource  $subject 
    233. -
    234.     * @param object ResResource  $predicate 
    235. -
    236.     * @param object ResResource  $object 
    237. -
    238.     * @param string                 $getSPO 
    239. -
    240.     * @param object ResModel     $associatedModel 
    241. -
    242.     * @param string                 $returnType 
    243. -
    244.     * @access    public
    245. -
    246.     */
    247. -
    248.     function ResIterator($subject,$predicate,$object,$getSPO,$associatedModel,$returnType false)
    249. -
    250.     {
    251. -
    252.         $this->searchSubject =$subject;
    253. -
    254.         $this->searchPredicate =$predicate;
    255. -
    256.         $this->searchObject =$object;
    257. -
    258.         $this->getSPO $getSPO;
    259. -
    260.         $this->returnType $returnType;
    261. -
    262.         $this->associatedModel =$associatedModel;
    263. -
    264.         $this->findLiteralWithLang false;
    265. -
    266.     }
    267. -
    268.     
    269. -
    270.     /**
    271. -
    272.     * Resets iterator list to start
    273. -
    274.     *
    275. -
    276.     * @access    public
    277. -
    278.     */
    279. -
    280.     function rewind()
    281. -
    282.     {
    283. -
    284.         $this->key = -1;
    285. -
    286.         $this->next();
    287. -
    288.     }
    289. -
    290.     
    291. -
    292.     /**
    293. -
    294.     * Says if there are additional items left in the list
    295. -
    296.     *
    297. -
    298.     * @return    boolean 
    299. -
    300.     * @access    public
    301. -
    302.     */
    303. -
    304.     function valid()
    305. -
    306.     {
    307. -
    308.         return $this->valid;
    309. -
    310.     }
    311. -
    312.     
    313. -
    314.     /**
    315. -
    316.     * Moves Iterator to the next item in the list
    317. -
    318.     *
    319. -
    320.     * @access    public
    321. -
    322.     */
    323. -
    324.     function next()
    325. -
    326.     {
    327. -
    328.         $this->key++;
    329. -
    330.         $this->valid=($this->_getNextResource());
    331. -
    332.     }
    333. -
    334.     
    335. -
    336.     /**
    337. -
    338.     * Returns the current item
    339. -
    340.     *
    341. -
    342.     * @return    mixed 
    343. -
    344.     * @access    public
    345. -
    346.     */
    347. -
    348.     function current()
    349. -
    350.     {
    351. -
    352.         return $this->currentResource;
    353. -
    354.     }
    355. -
    356.     
    357. -
    358.     /**
    359. -
    360.     * Returns the next Resource (subject, predicate,
    361. -
    362.     * or object of the next matching statement).
    363. -
    364.     *
    365. -
    366.     * @return    object resResource 
    367. -
    368.     * @access    private
    369. -
    370.     */
    371. -
    372.     function _getNextResource()
    373. -
    374.     {
    375. -
    376.         if ($this->findLiteralWithLang)
    377. -
    378.         
    379. -
    380.             do 
    381. -
    382.             {
    383. -
    384.                 $nextStatement $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
    385. -
    386.                 if ($nextStatement === null)
    387. -
    388.                     return false;
    389. -
    390.                     
    391. -
    392.                 $object $nextStatement->getObject();
    393. -
    394.                 if ($object->getLanguage(!= $this->findLiteralWithLang)
    395. -
    396.                 {
    397. -
    398.                     $hasCorrectLanguage=false;
    399. -
    400.                     $this->key++;
    401. -
    402.                 else 
    403. -
    404.                 {
    405. -
    406.                     $hasCorrectLanguage=true;
    407. -
    408.                 }
    409. -
    410.                     
    411. -
    412.             while (!$hasCorrectLanguage);
    413. -
    414.         else 
    415. -
    416.         {
    417. -
    418.             $nextStatement $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
    419. -
    420.         }
    421. -
    422.         if ($nextStatement === null)
    423. -
    424.             return false;
    425. -
    426.         
    427. -
    428.         switch ($this->getSPO
    429. -
    430.         {
    431. -
    432.             case 's':
    433. -
    434.                  $this->currentResource $this->_getResourceAs($nextStatement->getSubject());
    435. -
    436.                 break;
    437. -
    438.  
    439. -
    440.             case 'p':
    441. -
    442.                  $this->currentResource $this->_getResourceAs($nextStatement->getPredicate());
    443. -
    444.                 break;
    445. -
    446.                 
    447. -
    448.             case 'o':
    449. -
    450.                  $this->currentResource $this->_getResourceAs($nextStatement->getObject());
    451. -
    452.                 break;
    453. -
    454.         }
    455. -
    456.         return (true);
    457. -
    458.     }
    459. -
    460.     
    461. -
    462.     /**
    463. -
    464.     * Returns the key of the current item
    465. -
    466.     *
    467. -
    468.     * @return    integer 
    469. -
    470.     * @access    public
    471. -
    472.     */
    473. -
    474.     function key()
    475. -
    476.     {
    477. -
    478.         return $this->key;
    479. -
    480.     }
    481. -
    482.     
    483. -
    484.     /**
    485. -
    486.     * Sets that only Literals with the matching
    487. -
    488.     * language should be returned
    489. -
    490.     *
    491. -
    492.     * @param    string 
    493. -
    494.     * @access    public
    495. -
    496.     */
    497. -
    498.     function setFindLiteralWithLang($language)
    499. -
    500.     {
    501. -
    502.         $this->findLiteralWithLang $language;
    503. -
    504.     }
    505. -
    506.     
    507. -
    508.     /**
    509. -
    510.     * Returns the $resource as an instance of the type
    511. -
    512.     * specified in $this->returnType.
    513. -
    514.     *
    515. -
    516.     * @param    object ResResource 
    517. -
    518.     * @return    object ResResource 
    519. -
    520.     * @access    private
    521. -
    522.     */
    523. -
    524.     function _getResourceAs($resource)
    525. -
    526.     {
    527. -
    528.         if ($this->findLiteralWithLang && $resource->getLanguage(!= $this->findLiteralWithLang)
    529. -
    530.             $this->_getNextResource();
    531. -
    532.  
    533. -
    534.         if($this->returnType)    
    535. -
    536.             switch ($this->returnType{
    537. -
    538.         
    539. -
    540.                 case 'ResProperty':
    541. -
    542.                         return $this->associatedModel->createProperty($resource->getLabel());
    543. -
    544.                     break;
    545. -
    546.                     
    547. -
    548.                 case 'ResLiteral':
    549. -
    550.                         $newLiteral $this->associatedModel->createLiteral($resource->getLabel(),$resource->getLanguage());
    551. -
    552.                         $newLiteral->setDatatype($resource->getDatatype());
    553. -
    554.                         return $newLiteral;
    555. -
    556.                     break;
    557. -
    558.                     
    559. -
    560.                 case 'OntProperty':
    561. -
    562.                         return $this->associatedModel->createOntProperty($resource->getLabel());
    563. -
    564.                     break;
    565. -
    566.                     
    567. -
    568.                 case 'OntClass':
    569. -
    570.                         return $this->associatedModel->createOntClass($resource->getLabel());
    571. -
    572.                     break;
    573. -
    574.                     
    575. -
    576.                 case 'Individual':
    577. -
    578.                     return $this->associatedModel->createIndividual($resource->getLabel());
    579. -
    580.                 break;
    581. -
    582.             }
    583. -
    584.         return $resource;
    585. -
    586.     }
    587. -
    588. }
    589. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResList.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResList.php.html deleted file mode 100755 index 123af625..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResList.php.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - File Source for ResList.php - - - - - -

    Source for file ResList.php

    -

    Documentation is available at ResList.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResList
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Implementation of an rdf:Collection (rdf:List)
    14. -
    15. * Provides a convenience encapsulation for lists formed from
    16. -
    17. * chains of RDF statements arranged to form a head/tail cons-cell
    18. -
    19. * structure.
    20. -
    21. -
    22. * A well-formed list has cells that are made up of three statements:
    23. -
    24. * one denoting the rdf:type of the list cell, one denoting the link
    25. -
    26. * to the value of the list at that point, and one pointing to the
    27. -
    28. * list tail. If a list cell is not well-formed, list operations may
    29. -
    30. * fail in unpredictable ways. However, to explicitly check that the
    31. -
    32. * list is well-formed at all times is expensive, but you can call
    33. -
    34. * the isValid() method to manually check, if the list is well formed.
    35. -
    36. *
    37. -
    38. *
    39. -
    40. @version  $Id: fsource_resModel__resModelResList.php.html 443 2007-06-01 16:25:38Z cax $
    41. -
    42. @author Daniel Westphal <mail at d-westphal dot de>
    43. -
    44.  
    45. -
    46. *
    47. -
    48. @package resModel
    49. -
    50. @access    public
    51. -
    52. */
    53. -
    54. class ResList extends ResResource 
    55. -
    56. {
    57. -
    58.     /**
    59. -
    60.     * Holds a ResResource with the uri rdf:rest
    61. -
    62.     * @var        ResResource 
    63. -
    64.     * @access    private
    65. -
    66.     */
    67. -
    68.     var $rdfRestResource;
    69. -
    70.     
    71. -
    72.     /**
    73. -
    74.     * Holds a ResResource with the uri rdf:first
    75. -
    76.     * @var        ResResource 
    77. -
    78.     * @access    private
    79. -
    80.     */
    81. -
    82.     var $rdfFirstResource;
    83. -
    84.         
    85. -
    86.     /**
    87. -
    88.     * Holds a ResResource with the uri rdf:nil
    89. -
    90.     * @var        ResResource 
    91. -
    92.     * @access    private
    93. -
    94.     */
    95. -
    96.     var $rdfNilResource;
    97. -
    98.     
    99. -
    100.     
    101. -
    102.     /**
    103. -
    104.     * Constructor
    105. -
    106.     * You can supply a URI
    107. -
    108.     *
    109. -
    110.     * @param string $uri 
    111. -
    112.     * @access    public
    113. -
    114.     */        
    115. -
    116.     function ResList($uri null)
    117. -
    118.     {
    119. -
    120.         //call the parent's constructor
    121. -
    122.         parent::ResResource($uri);
    123. -
    124.         //initialize vars
    125. -
    126.         $this->rdfRestResource new ResResource(RDF_NAMESPACE_URI.RDF_REST);
    127. -
    128.         $this->rdfFirstResource new ResResource(RDF_NAMESPACE_URI.RDF_FIRST);
    129. -
    130.         $this->rdfNilResource new ResResource(RDF_NAMESPACE_URI.RDF_NIL);
    131. -
    132.     }
    133. -
    134.  
    135. -
    136.     /**
    137. -
    138.     * Returns the value of the list element at the specified position or null.
    139. -
    140.     *
    141. -
    142.        * @param    integer    $position 
    143. -
    144.        * @return    ResResource 
    145. -
    146.        * @access    public
    147. -
    148.        */
    149. -
    150.     function get($position)
    151. -
    152.     {
    153. -
    154.         //init
    155. -
    156.         $listElement=$this;
    157. -
    158.         //walk through the list until the position in the list is reached
    159. -
    160.         for ($i=0;$i<$position;$i++)
    161. -
    162.         {
    163. -
    164.             $listElement=$this->_getRestElement($listElement);
    165. -
    166.             if($listElement===null)
    167. -
    168.                 return null;    
    169. -
    170.         }
    171. -
    172.         //return the associated value
    173. -
    174.         return $this->_getValue($listElement);    
    175. -
    176.     }    
    177. -
    178.  
    179. -
    180.     /**
    181. -
    182.     *  Add the given value to the end of the list.
    183. -
    184.     *  it is only defined if this is not the empty list.
    185. -
    186.     *
    187. -
    188.        * @param    object ResResource    $resource 
    189. -
    190.        * @return    boolean 
    191. -
    192.        * @access    public
    193. -
    194.        */
    195. -
    196.     function add($resource)
    197. -
    198.     {
    199. -
    200.         //return false if this list is the empty list
    201. -
    202.         if($this->uri==RDF_NAMESPACE_URI.RDF_NIL)
    203. -
    204.             return false;
    205. -
    206.         
    207. -
    208.         //if this is the first value    
    209. -
    210.         if ($this->isEmpty())
    211. -
    212.         {
    213. -
    214.             $newLastElement =$this;
    215. -
    216.         else
    217. -
    218.         //if there are other values in the list 
    219. -
    220.         {
    221. -
    222.             //get the last list element
    223. -
    224.             $lastElement=$this->_getListElement();
    225. -
    226.             //remove the rdf:rest property
    227. -
    228.             $lastElement->removeAll($this->rdfRestResource);
    229. -
    230.             //create a new list element
    231. -
    232.             $newLastElement=$this->model->createResource();
    233. -
    234.             //concatenate the new list element with the list
    235. -
    236.             $lastElement->addProperty($this->rdfRestResource,$newLastElement);
    237. -
    238.         }
    239. -
    240.         //add the value
    241. -
    242.         $newLastElement->addProperty($this->rdfFirstResource,$resource);
    243. -
    244.         //ad the rdf:nil property to the last list element
    245. -
    246.         $newLastElement->addProperty($this->rdfRestResource,$this->rdfNilResource);
    247. -
    248.         
    249. -
    250.         return true;
    251. -
    252.     }
    253. -
    254.     
    255. -
    256.     /**
    257. -
    258.     *  Update the head of the list to have the given value,
    259. -
    260.     *  and return the previous value.
    261. -
    262.     *
    263. -
    264.        * @param    object ResResource    $value 
    265. -
    266.        * @return    ResResource 
    267. -
    268.        * @access    public
    269. -
    270.        */
    271. -
    272.     //todo: error handling, when empty list
    273. -
    274.     function setHead($value)
    275. -
    276.     {    
    277. -
    278.         //save the old value    
    279. -
    280.         $oldValue=$this->getHead();
    281. -
    282.         //remove the old value
    283. -
    284.         $this->removeAll($this->rdfFirstResource);
    285. -
    286.         //add the new value
    287. -
    288.         $this->addProperty($this->rdfFirstResource,$value);
    289. -
    290.         
    291. -
    292.         //return the old value
    293. -
    294.         return $oldValue;
    295. -
    296.     }
    297. -
    298.     
    299. -
    300.     /**
    301. -
    302.     * Get the value that is associated with the head of the list.
    303. -
    304.     *
    305. -
    306.        * @return    ResResource 
    307. -
    308.        * @access    public
    309. -
    310.        */
    311. -
    312.     //todo: error handling, falls empty list
    313. -
    314.     function getHead()
    315. -
    316.     {
    317. -
    318.         return $this->_getValue($this);
    319. -
    320.     }
    321. -
    322.     
    323. -
    324.     /**
    325. -
    326.     *  Remove the head of the list. The tail of the list
    327. -
    328.     *  remains in the model. Note that no changes are made to
    329. -
    330.     *  list cells that point to this list cell as their tail.
    331. -
    332.     *
    333. -
    334.        * @return    ResList 
    335. -
    336.        * @access    public
    337. -
    338.        */
    339. -
    340.     function removeHead()
    341. -
    342.     {
    343. -
    344.         //get the second list element
    345. -
    346.         $rest=$this->_getRestElement($this);
    347. -
    348.         //remove the first element
    349. -
    350.         $this->removeAll($this->rdfFirstResource);
    351. -
    352.         $this->removeAll($this->rdfRestResource);
    353. -
    354.         //change this Resource URI to that of the second list element
    355. -
    356.         //thus makin it the fist element
    357. -
    358.         $this->uri=$rest->getURI();
    359. -
    360.         
    361. -
    362.         //return the new list
    363. -
    364.         return $this;
    365. -
    366.     }    
    367. -
    368.  
    369. -
    370.     /**
    371. -
    372.     * Get the Position of the first occurrence of the given value in the list,
    373. -
    374.     * or -1 if the value is not in the list.
    375. -
    376.     * You can supply an offset to search for values. (First element has offset 0)
    377. -
    378.     * Default is 0
    379. -
    380.     *
    381. -
    382.        * @param    object ResResource    $resource 
    383. -
    384.     * @param    integer    $offset 
    385. -
    386.        * @return    integer 
    387. -
    388.        * @access    public
    389. -
    390.        */
    391. -
    392.     function indexOf($resource$offset 0)
    393. -
    394.     {
    395. -
    396.         //init
    397. -
    398.         $element=$this;
    399. -
    400.         $actualIndex=0;
    401. -
    402.  
    403. -
    404.         //walk through the list until the value is found and the position is higher than
    405. -
    406.         //the offset
    407. -
    408.         while ($actualIndex $offset || !$resource->equals($this->_getValue($element)))
    409. -
    410.         {
    411. -
    412.             //get next list element
    413. -
    414.             $element=$this->_getRestElement($element);
    415. -
    416.             $actualIndex++;
    417. -
    418.             
    419. -
    420.             //if the end of the list is reached and the value isn't found
    421. -
    422.             if ($element===null)
    423. -
    424.                 return null;
    425. -
    426.         }
    427. -
    428.         //return the index value
    429. -
    430.         return $actualIndex;    
    431. -
    432.     }
    433. -
    434.     
    435. -
    436.     /**
    437. -
    438.     * Replace the value at the i'th position in the list with the given value
    439. -
    440.     *
    441. -
    442.        * @param    integer                $index 
    443. -
    444.        * @param    object ResResource    $resource 
    445. -
    446.        * @return    object ResResource 
    447. -
    448.        * @access    public
    449. -
    450.        */
    451. -
    452.     function replace($index$resource)
    453. -
    454.     {
    455. -
    456.         //get the list element at the $index position
    457. -
    458.         $listElement=$this->_getListElement($index);
    459. -
    460.         //get the old value
    461. -
    462.         $oldValue=$this->_getValue($listElement);
    463. -
    464.         //remove the old value
    465. -
    466.         $listElement->removeAll($this->rdfFirstResource);
    467. -
    468.         //add the new value
    469. -
    470.         $listElement->addProperty($this->rdfFirstResource,$resource);
    471. -
    472.         //return the old value
    473. -
    474.         return $oldValue;
    475. -
    476.     }
    477. -
    478.     
    479. -
    480.     /**
    481. -
    482.     * Answer true if the given node appears as the value of a value
    483. -
    484.     * of any of the cells of this list.
    485. -
    486.     *
    487. -
    488.        * @param    object ResResource    $value 
    489. -
    490.        * @return    boolean 
    491. -
    492.        * @access    public
    493. -
    494.        */
    495. -
    496.     function contains($value)
    497. -
    498.     {
    499. -
    500.         //return true, if a position was found.
    501. -
    502.         $result=$this->indexOf($value);
    503. -
    504.         return ($result!==null);
    505. -
    506.     }
    507. -
    508.     
    509. -
    510.     /**
    511. -
    512.     * Get the list that is the tail of this list.
    513. -
    514.     *
    515. -
    516.        * @return    object ResList 
    517. -
    518.        * @access    public
    519. -
    520.        */
    521. -
    522.     function getTail()
    523. -
    524.     {
    525. -
    526.         //get the second list element
    527. -
    528.         $nextListElement$this->_getRestElement($this);
    529. -
    530.         //return the second element as new list
    531. -
    532.         return $this->model->createList($nextListElement->getURI());    
    533. -
    534.     }
    535. -
    536.     
    537. -
    538.     /**
    539. -
    540.     * Remove all of the components of this list from the model.
    541. -
    542.     * Note that this is operation is only removing the list cells
    543. -
    544.     * themselves, not the resources referenced by the list -
    545. -
    546.     * unless being the object of an rdf:first  statement is the
    547. -
    548.     * only mention of that resource in the model.
    549. -
    550.     *
    551. -
    552.        * @return    boolean 
    553. -
    554.        * @access    public
    555. -
    556.        */
    557. -
    558.     function removeList()
    559. -
    560.     {
    561. -
    562.         $element=$this;
    563. -
    564.  
    565. -
    566.         while ($element!==null)
    567. -
    568.         {
    569. -
    570.             $nextElement=$this->_getRestElement($element);
    571. -
    572.             
    573. -
    574.             $element->removeAll($this->rdfFirstResource);
    575. -
    576.             $element->removeAll($this->rdfRestResource);
    577. -
    578.                     
    579. -
    580.             if (($nextElement !== null&& ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
    581. -
    582.             {
    583. -
    584.                 $element=$nextElement;
    585. -
    586.             else 
    587. -
    588.             {
    589. -
    590.                 return true;
    591. -
    592.             }
    593. -
    594.         }
    595. -
    596.         return false;
    597. -
    598.     }
    599. -
    600.     
    601. -
    602.     /**
    603. -
    604.     * Returns true, if this list is empty
    605. -
    606.     *
    607. -
    608.        * @param    object Statement    $statement 
    609. -
    610.        * @return    integer 
    611. -
    612.        * @access    public
    613. -
    614.        */
    615. -
    616.     function isEmpty()
    617. -
    618.     {
    619. -
    620.         return !$this->hasProperty($this->rdfFirstResource);
    621. -
    622.     }
    623. -
    624.     
    625. -
    626.     /**
    627. -
    628.     * Get all values in the list as an array of ResResources
    629. -
    630.     *
    631. -
    632.        * @return    array 
    633. -
    634.        * @access    public
    635. -
    636.        */
    637. -
    638.     function getContentInArray()
    639. -
    640.     {
    641. -
    642.         $result=array();
    643. -
    644.         $element=$this;
    645. -
    646.  
    647. -
    648.         while ($element!==null)
    649. -
    650.         {
    651. -
    652.             //add the value of the current element to the result if is set.
    653. -
    654.             $value=$this->_getValue($element);
    655. -
    656.             if ($value!==null)
    657. -
    658.                 $result[]=$value;
    659. -
    660.             
    661. -
    662.             //walk through the list until it's end        
    663. -
    664.             $nextElement=$this->_getRestElement($element);
    665. -
    666.             if (($nextElement !== null&& ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
    667. -
    668.             {
    669. -
    670.                 $element=$nextElement;
    671. -
    672.             else 
    673. -
    674.             {
    675. -
    676.                 break;
    677. -
    678.             }
    679. -
    680.         }
    681. -
    682.         //return the result
    683. -
    684.         return $result;
    685. -
    686.     }
    687. -
    688.     
    689. -
    690.     /**
    691. -
    692.     * Change the tail of this list to point to the given list, so that this list
    693. -
    694.     * becomes the list of the concatenation of the elements of
    695. -
    696.     * both lists. This is a side-effecting operation on this list;
    697. -
    698.     * for a non side-effecting alternative, see append.
    699. -
    700.     * 
    701. -
    702.     *
    703. -
    704.        * @param    object ResList    $ResList 
    705. -
    706.        * @access    public
    707. -
    708.        */
    709. -
    710.     function concatenate($ResList)
    711. -
    712.     {
    713. -
    714.         //get the last list element
    715. -
    716.         $lastElement=$this->_getListElement();
    717. -
    718.         //remove the old tail (rdf:nil)
    719. -
    720.         $lastElement->removeAll($this->rdfRestResource);
    721. -
    722.         //add the $ResList as new tail
    723. -
    724.         $lastElement->addProperty($this->rdfRestResource,$ResList);
    725. -
    726.     }
    727. -
    728.     
    729. -
    730.     /**
    731. -
    732.     * Answer a new list that is formed by adding each element of
    733. -
    734.     * this list to the head of the given list. This is a non
    735. -
    736.     * side-effecting operation on either this list or the given
    737. -
    738.     * list, but generates a copy of this list. For a more storage
    739. -
    740.     * efficient alternative, see concatenate
    741. -
    742.     *
    743. -
    744.        * @param    object ResList    $ResList 
    745. -
    746.        * @return    object ResList 
    747. -
    748.        * @access    public
    749. -
    750.        */
    751. -
    752.     function append($resList)
    753. -
    754.     {
    755. -
    756.         //get a copy of this list
    757. -
    758.         $newList=$this->copy();
    759. -
    760.         
    761. -
    762.         //add all values from the $resList to the new list
    763. -
    764.         foreach ($resList->getContentInArray(as $value)
    765. -
    766.         {
    767. -
    768.             $newList->add($value);    
    769. -
    770.         }
    771. -
    772.         //return the new list
    773. -
    774.         return $newList;
    775. -
    776.     }
    777. -
    778.     
    779. -
    780.     /**
    781. -
    782.     * Answer a list that contains all of the elements of this
    783. -
    784.     * list in the same order, but is a duplicate copy in the
    785. -
    786.     * underlying model.
    787. -
    788.     *
    789. -
    790.        * @return    object ResList 
    791. -
    792.        * @access    public
    793. -
    794.        */
    795. -
    796.     function copy()
    797. -
    798.     {
    799. -
    800.         //create a new list in the model
    801. -
    802.         $newList=$this->model->createList();
    803. -
    804.         //add all values from this list to the new list
    805. -
    806.         foreach ($this->getContentInArray(as $value)
    807. -
    808.         {
    809. -
    810.             $newList->add($value);    
    811. -
    812.         }
    813. -
    814.         //return the new list
    815. -
    816.         return $newList;
    817. -
    818.     }
    819. -
    820.     
    821. -
    822.     /**
    823. -
    824.     * Return a reference to a new list cell whose head is value
    825. -
    826.     * and whose tail is this list.
    827. -
    828.     *
    829. -
    830.        * @param    object ResResource    $value 
    831. -
    832.        * @return    object ResList 
    833. -
    834.        * @access    public
    835. -
    836.        */
    837. -
    838.     function cons($value)
    839. -
    840.     {
    841. -
    842.         //create a new list
    843. -
    844.         $newList=$this->model->createList();
    845. -
    846.         //add the new value
    847. -
    848.         $newList->add($value);
    849. -
    850.         //set this list as the tail of the new list
    851. -
    852.         $newList->setTail($this);
    853. -
    854.         
    855. -
    856.         //return the new list
    857. -
    858.         return $newList;
    859. -
    860.     }
    861. -
    862.     
    863. -
    864.     /**
    865. -
    866.     * Update the list cell at the front of the list to have the
    867. -
    868.     * given list as tail. The old tail is returned, and remains
    869. -
    870.     * in the model.
    871. -
    872.     *
    873. -
    874.        * @param    object ResList    $resList 
    875. -
    876.        * @return    object Reslist 
    877. -
    878.        * @access    public
    879. -
    880.        */
    881. -
    882.     function setTail($resList)
    883. -
    884.     {
    885. -
    886.         //save the old tail
    887. -
    888.         $oldTail=$this->getTail();
    889. -
    890.         //remove the old tail
    891. -
    892.         $this->removeAll($this->rdfRestResource);
    893. -
    894.         //add the $resList as new Tail
    895. -
    896.         $this->addProperty($this->rdfRestResource,$resList);
    897. -
    898.         
    899. -
    900.         //return the old tail
    901. -
    902.         return $oldTail;
    903. -
    904.     }
    905. -
    906.     
    907. -
    908.     /**
    909. -
    910.     * Answer true if this list has the same elements in the
    911. -
    912.     * same order as the given list. Note that the standard equals
    913. -
    914.     * test just tests for equality of two given list cells.
    915. -
    916.     * While such a test is sufficient for many purposes, this
    917. -
    918.     * test provides a broader equality definition, but is
    919. -
    920.     * correspondingly more expensive to test.
    921. -
    922.     *
    923. -
    924.        * @param    object ResList    $resList 
    925. -
    926.        * @return    boolean 
    927. -
    928.        * @access    public
    929. -
    930.        */
    931. -
    932.     function sameListAs($resList)
    933. -
    934.     {
    935. -
    936.         //init
    937. -
    938.         $indexPos=0;
    939. -
    940.         do
    941. -
    942.         {
    943. -
    944.             //get the values for both lists at the actual position
    945. -
    946.             $thisValue=$this->get($indexPos);
    947. -
    948.             $thatValue=$resList->get($indexPos);
    949. -
    950.             //if the values aren't equal, return false
    951. -
    952.             if (($thisValue !== null&& !$thisValue->equals($thatValue))
    953. -
    954.                 return false;
    955. -
    956.                 
    957. -
    958.             $indexPos++;
    959. -
    960.             //walk until this list reaches a null value (end)    
    961. -
    962.         while ($thisValue!==null);
    963. -
    964.         
    965. -
    966.         //if the other list has a null value at this position too, return true
    967. -
    968.         //else return false
    969. -
    970.         return ($thatValue===null);
    971. -
    972.     }
    973. -
    974.     
    975. -
    976.     /**
    977. -
    978.     * Remove the given value from this list.
    979. -
    980.     * If value does not occur in the list, no action is taken. Since removing the
    981. -
    982.     * head of the list will invalidate the list head cell, in
    983. -
    984.     * general the list must return the list that results from
    985. -
    986.     * this operation. However, in many cases the return value
    987. -
    988.     * will be the same as the object that this method is invoked
    989. -
    990.     * on.
    991. -
    992.     *
    993. -
    994.        * @param    object ResResource    $value 
    995. -
    996.        * @return    object ResList 
    997. -
    998.        * @access    public
    999. -
    1000.        */
    1001. -
    1002.     function remove($value)
    1003. -
    1004.     {
    1005. -
    1006.         //if the value is the value of the first list element(head)
    1007. -
    1008.         //call the remove head position and return the new head
    1009. -
    1010.         if ($value->equals($this->_getValue($this)))
    1011. -
    1012.             return $this->removeHead();
    1013. -
    1014.     
    1015. -
    1016.         $element=$this;
    1017. -
    1018.         do
    1019. -
    1020.         {    
    1021. -
    1022.             $newElement=$this->_getRestElement($element);
    1023. -
    1024.             
    1025. -
    1026.             //if the value equals the value of the current list element
    1027. -
    1028.             if ($newElement !== null && $value->equals($this->_getValue($newElement)))
    1029. -
    1030.             {
    1031. -
    1032.                 //remove the link to the list element to be removed
    1033. -
    1034.                 $element->removeAll($this->rdfRestResource);
    1035. -
    1036.                 //add a link to the list element AFTER the element to be deleted
    1037. -
    1038.                 $element->addProperty($this->rdfRestResource,$this->_getRestElement($newElement));
    1039. -
    1040.                 //remove the list element with values
    1041. -
    1042.                 $newElement->removeAll($this->rdfFirstResource);
    1043. -
    1044.                 $newElement->removeAll($this->rdfRestResource);
    1045. -
    1046.                 //return this ResList
    1047. -
    1048.                 return $this;    
    1049. -
    1050.             }
    1051. -
    1052.             $element=$newElement;
    1053. -
    1054.         while ($element!==null);
    1055. -
    1056.         //return this list
    1057. -
    1058.         return $this;    
    1059. -
    1060.     }
    1061. -
    1062.     
    1063. -
    1064.     /**
    1065. -
    1066.     * Answer true if the list is well-formed, by checking that each
    1067. -
    1068.     * node is correctly typed, and has a head and tail pointer from
    1069. -
    1070.     * the correct vocabulary
    1071. -
    1072.     *
    1073. -
    1074.        * @return    boolean 
    1075. -
    1076.        * @access    public
    1077. -
    1078.        */
    1079. -
    1080.     function isValid()
    1081. -
    1082.     {
    1083. -
    1084.         $element=$this;    
    1085. -
    1086.         if ($this->_getValue($this)=== null && $this->_getRestElement($this=== null)
    1087. -
    1088.             return true;
    1089. -
    1090.         do 
    1091. -
    1092.         {
    1093. -
    1094.             //return true if the last element is a rdf:nil
    1095. -
    1096.             if ($element->getURI(== RDF_NAMESPACE_URI.RDF_NIL)
    1097. -
    1098.                 return true;
    1099. -
    1100.             //return false, if the current element has no associated value
    1101. -
    1102.             if ($this->_getValue($element=== null)
    1103. -
    1104.                 return false;
    1105. -
    1106.                         
    1107. -
    1108.             $element=$this->_getRestElement($element);    
    1109. -
    1110.         while ($element !== null);
    1111. -
    1112.         //return false, if the current element has no rdf:rest property
    1113. -
    1114.         return false;
    1115. -
    1116.     }
    1117. -
    1118.     
    1119. -
    1120.     /**
    1121. -
    1122.     * Get the associated rdf:rest Resource from the suplied ResList element
    1123. -
    1124.     *
    1125. -
    1126.        * @param    object ResList    $listElement 
    1127. -
    1128.        * @return    object ResList 
    1129. -
    1130.        * @access    private
    1131. -
    1132.        */
    1133. -
    1134.     function _getRestElement($listElement)
    1135. -
    1136.     {
    1137. -
    1138.         //get the rdf:rest property
    1139. -
    1140.         $statement$this->model->getProperty($listElement,$this->rdfRestResource);
    1141. -
    1142.         //return null, if this property isn't set
    1143. -
    1144.         if ($statement === null)
    1145. -
    1146.             return null;
    1147. -
    1148.             
    1149. -
    1150.         //return the value of the rdf:rest property    
    1151. -
    1152.         return $statement->getObject();    
    1153. -
    1154.     }
    1155. -
    1156.     
    1157. -
    1158.     /**
    1159. -
    1160.     * Returns the list element at the $index position.
    1161. -
    1162.     *
    1163. -
    1164.     * If to $index is suplied, the last list element will be returned
    1165. -
    1166.     
    1167. -
    1168.        * @param    integer    $index 
    1169. -
    1170.        * @return    object ResResource 
    1171. -
    1172.        * @access    private
    1173. -
    1174.        */
    1175. -
    1176.     function _getListElement($index null)
    1177. -
    1178.     {
    1179. -
    1180.         $element=$this;
    1181. -
    1182.         $actualIndex=0;
    1183. -
    1184.  
    1185. -
    1186.         while ($element!=null)
    1187. -
    1188.         {
    1189. -
    1190.             //return the current element if index matches the current index
    1191. -
    1192.             if ($actualIndex === $index)
    1193. -
    1194.                 return $element;
    1195. -
    1196.             
    1197. -
    1198.             //return the current element if it the last one        
    1199. -
    1200.             if ($element->hasProperty($this->rdfRestResource,$this->rdfNilResource))
    1201. -
    1202.                 return $element;
    1203. -
    1204.             
    1205. -
    1206.             $nextElement=$this->_getRestElement($element);
    1207. -
    1208.             
    1209. -
    1210.             if ($nextElement!==null)
    1211. -
    1212.             {
    1213. -
    1214.                 $element=$nextElement;
    1215. -
    1216.                 $actualIndex++;
    1217. -
    1218.             else 
    1219. -
    1220.             {
    1221. -
    1222.                 break;
    1223. -
    1224.             }
    1225. -
    1226.         }
    1227. -
    1228.         return $element;
    1229. -
    1230.     }
    1231. -
    1232.     
    1233. -
    1234.     /**
    1235. -
    1236.     * Get the value associated to the $listResource by the rdf:first property
    1237. -
    1238.     *
    1239. -
    1240.        * @param    object ResList    $listResource 
    1241. -
    1242.        * @return    object ResResource 
    1243. -
    1244.        * @access    private
    1245. -
    1246.        */
    1247. -
    1248.     function _getValue($listResource)
    1249. -
    1250.     {
    1251. -
    1252.         //Return the value of the rdf:first property or null, if it isn't set
    1253. -
    1254.         $statement=$this->model->getProperty($listResource,$this->rdfFirstResource);
    1255. -
    1256.         if ($statement===null)
    1257. -
    1258.             return null;
    1259. -
    1260.  
    1261. -
    1262.         return $statement->getObject();    
    1263. -
    1264.     }
    1265. -
    1266. }
    1267. -
    1268. ?>
    1269. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResLiteral.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResLiteral.php.html deleted file mode 100755 index 0ac00d89..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResLiteral.php.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - File Source for ResLiteral.php - - - - - -

    Source for file ResLiteral.php

    -

    Documentation is available at ResLiteral.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResLiteral
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF literal.
    14. -
    15. * The literal supports the xml:lang and rdf:datatype property.
    16. -
    17. * For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
    18. -
    19. -
    20. @version  $Id: fsource_resModel__resModelResLiteral.php.html 443 2007-06-01 16:25:38Z cax $
    21. -
    22. @author Daniel Westphal <mail at d-westphal dot de>
    23. -
    24.  
    25. -
    26. *
    27. -
    28. @package resModel
    29. -
    30. @access    public
    31. -
    32. ***/
    33. -
    34.  
    35. -
    36. class ResLiteral extends Literal 
    37. -
    38. {
    39. -
    40.     /**
    41. -
    42.     * Holds a reference to the associated model
    43. -
    44.     * @var        ResModel 
    45. -
    46.     * @access    private
    47. -
    48.     */
    49. -
    50.     var $model;
    51. -
    52.     
    53. -
    54.     
    55. -
    56.     /**
    57. -
    58.     * Constructor
    59. -
    60.     * You have to supply a string.
    61. -
    62.     *
    63. -
    64.     * @param    string    $str        label of the literal
    65. -
    66.     * @param     string $language    optional language identifier
    67. -
    68.     */    
    69. -
    70.     function ResLiteral($str,$language null)
    71. -
    72.     {
    73. -
    74.         parent::Literal($str,$language);
    75. -
    76.  
    77. -
    78.     }
    79. -
    80.     
    81. -
    82.     /**
    83. -
    84.     * Sets the reference to the assocoated model.
    85. -
    86.     *
    87. -
    88.     * @param    object model    $model 
    89. -
    90.     * @access public
    91. -
    92.     */
    93. -
    94.     function setAssociatedModel($model)
    95. -
    96.     {
    97. -
    98.         $this->model=$model;
    99. -
    100.     }
    101. -
    102.     
    103. -
    104.     /**
    105. -
    106.     * Get the reference to the assocoated model.
    107. -
    108.     *
    109. -
    110.     * @return    object model    $model
    111. -
    112.     * @access public
    113. -
    114.     */
    115. -
    116.     function getAssociatedModel()
    117. -
    118.     {
    119. -
    120.         return $this->model;
    121. -
    122.     }
    123. -
    124.  
    125. -
    126. -
    127. ?>
    128. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResModel.php.html deleted file mode 100755 index 79621ee1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResModel.php.html +++ /dev/null @@ -1,894 +0,0 @@ - - - - - - File Source for ResModel.php - - - - - -

    Source for file ResModel.php

    -

    Documentation is available at ResModel.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResModel
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A ResModel provides an resource centric view on an underlying RDF model.
    14. -
    15. * ResModels show information not as statements but as resources with
    16. -
    17. * properties, similar to Jena models. ResModels may create Resources [URI
    18. -
    19. * nodes and bnodes]. Creating a Resource does not make the Resource visible to
    20. -
    21. * the model; Resources are only "in" Models if Statements about them are added
    22. -
    23. * to the Model. Similarly the only way to "remove" a Resource from a Model is
    24. -
    25. * to remove all the Statements that mention it.
    26. -
    27. -
    28. * When a Resource or Literal is created by a Model, the Model is free to re-use an existing
    29. -
    30. * Resource or Literal object with the correct values, or it may create a fresh one.
    31. -
    32. *
    33. -
    34. @version  $Id: fsource_resModel__resModelResModel.php.html 443 2007-06-01 16:25:38Z cax $
    35. -
    36. @author Daniel Westphal <mail at d-westphal dot de>
    37. -
    38. *
    39. -
    40. *
    41. -
    42. @package     resModel
    43. -
    44. @access    public
    45. -
    46. ***/
    47. -
    48.  
    49. -
    50. class ResModel
    51. -
    52. {
    53. -
    54.     
    55. -
    56.     /**
    57. -
    58.     * Holds a reference to the assoiated memmodel/dbmodel/infmodel
    59. -
    60.     * @var        ResResource 
    61. -
    62.     * @access    private
    63. -
    64.     */
    65. -
    66.     var $model;
    67. -
    68.  
    69. -
    70.     
    71. -
    72.     /**
    73. -
    74.     * Constructor
    75. -
    76.     * You have to supply a memmodel/dbmodel/infmodel to save the statements.
    77. -
    78.     *
    79. -
    80.     * @param object model $model 
    81. -
    82.     * @access    public
    83. -
    84.     */    
    85. -
    86.     function ResModel($model)
    87. -
    88.     {
    89. -
    90.         if (!is_a($model,'Model'))
    91. -
    92.             trigger_error(RDFAPI_ERROR '(class: ResourceLayer; method: ResourceLayer): 
    93. -
    94.                 $model has to be object of class Model'E_USER_ERROR);    
    95. -
    96.         
    97. -
    98.         $this->model =$model;            
    99. -
    100.     }
    101. -
    102.     
    103. -
    104.     /**
    105. -
    106.     * Create a new resource associated with this model.
    107. -
    108.     * If the uri string isn't set, this creates a bnode.
    109. -
    110.     * Otherwise it creates a URI node.
    111. -
    112.     * A URI resource is .equals() to any other URI Resource with the same URI
    113. -
    114.     * (even in a different model - be warned).
    115. -
    116.     * 
    117. -
    118.     * This method may return an existing Resource with the correct URI and model,
    119. -
    120.     * or it may construct a fresh one, as it sees fit.
    121. -
    122.     *
    123. -
    124.     * Operations on the result Resource may change this model.
    125. -
    126.     *
    127. -
    128.        * @param    string    $uri 
    129. -
    130.        * @return    object ResResource 
    131. -
    132.        * @access    public
    133. -
    134.        */
    135. -
    136.     function createResource($uri null)
    137. -
    138.     {
    139. -
    140.         $resResource new ResResource($uri);
    141. -
    142.         //associate the resource with this model, and get a unique identifier
    143. -
    144.         //if it is bnode.
    145. -
    146.         $resResource->setAssociatedModel($this);
    147. -
    148.         
    149. -
    150.         return $resResource;
    151. -
    152.     
    153. -
    154.     
    155. -
    156.     /**
    157. -
    158.     * Create a new Property associated with this model.
    159. -
    160.     * This method may return an existing property with the correct URI and model,
    161. -
    162.     * or it may construct a fresh one, as it sees fit.
    163. -
    164.     *
    165. -
    166.     * Subsequent operations on the returned property may modify this model.
    167. -
    168.     *  
    169. -
    170.     *
    171. -
    172.        * @param    string    $uri 
    173. -
    174.        * @return    object ResProperty 
    175. -
    176.        * @access    public
    177. -
    178.        */
    179. -
    180.     function createProperty($uri null)
    181. -
    182.     {
    183. -
    184.         $resProperty new ResProperty($uri);
    185. -
    186.         $resProperty->setAssociatedModel($this);
    187. -
    188.             
    189. -
    190.         return $resProperty;
    191. -
    192.     }
    193. -
    194.     
    195. -
    196.     /**
    197. -
    198.     * Create an untyped literal from a String value with a specified language.
    199. -
    200.     *
    201. -
    202.     * If you want to type this literal, you have to set a datatype before
    203. -
    204.     * adding it to the model.
    205. -
    206.     *  
    207. -
    208.     *
    209. -
    210.        * @param    string    $label 
    211. -
    212.        * @param    string    $languageTag 
    213. -
    214.        * @return    object ResLiteral 
    215. -
    216.        * @access    public
    217. -
    218.        */    
    219. -
    220.     function createLiteral($label,$languageTag null)
    221. -
    222.     {
    223. -
    224.         $resLiteral new ResLiteral($label,$languageTag);
    225. -
    226.         $resLiteral->setAssociatedModel($this);
    227. -
    228.         
    229. -
    230.         return $resLiteral;
    231. -
    232.     }
    233. -
    234.     
    235. -
    236.     /**
    237. -
    238.     * General method to search for triples.
    239. -
    240.     * NULL input for any parameter will match anything.
    241. -
    242.     * Example:  $result = $m->find( NULL, NULL, $node );
    243. -
    244.     * Finds all Statements with $node as object.
    245. -
    246.     * Returns an array of statements with ResResources.
    247. -
    248.     *
    249. -
    250.     * @param    object ResResource    $subject 
    251. -
    252.     * @param    object ResResource    $predicate 
    253. -
    254.     * @param    object ResResource    $object 
    255. -
    256.     * @return    array 
    257. -
    258.     * @access    public
    259. -
    260.     * @throws    PhpError
    261. -
    262.     */
    263. -
    264.     function find($subject,$predicate$object)
    265. -
    266.     {
    267. -
    268.         $result=array();
    269. -
    270.         //convert ResResources to Resources and Blanknodes
    271. -
    272.         $resmodel=$this->model->find(    $this->_resNode2Node($subject),
    273. -
    274.                                         $this->_resNode2Node($predicate),
    275. -
    276.                                         $this->_resNode2Node($object)
    277. -
    278.                                      );
    279. -
    280.         //convert Resources, Blanknodes to ResResources                             
    281. -
    282.         foreach ($resmodel->triples as $statement
    283. -
    284.         {
    285. -
    286.             $result[]=new Statement($this->_node2ResNode($statement->getSubject()),
    287. -
    288.                                     $this->_node2ResNode($statement->getPredicate(),true),
    289. -
    290.                                     $this->_node2ResNode($statement->getObject())
    291. -
    292.                                     );
    293. -
    294.         };
    295. -
    296.         return $result;
    297. -
    298.         
    299. -
    300.     }
    301. -
    302.     
    303. -
    304.     /**
    305. -
    306.     * Searches for triples and returns the first matching statement.
    307. -
    308.     * NULL input for any parameter will match anything.
    309. -
    310.     * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
    311. -
    312.     * Returns the first statement with ResResources of the Model where the object equals $node.
    313. -
    314.     * Returns an NULL if nothing is found.
    315. -
    316.     * You can define an offset to search.
    317. -
    318.     *
    319. -
    320.     * @param    object Node    $subject 
    321. -
    322.     * @param    object Node    $predicate 
    323. -
    324.     * @param    object Node    $object 
    325. -
    326.     * @param    integer $offset 
    327. -
    328.     * @return    object Statement 
    329. -
    330.     * @access    public
    331. -
    332.     */
    333. -
    334.     function findFirstMatchingStatement($subject,$predicate,$object,$offset 0)
    335. -
    336.     {
    337. -
    338.     
    339. -
    340.         $statement $this->model->findFirstMatchingStatement(    $this->_resNode2Node($subject),
    341. -
    342.                                                                 $this->_resNode2Node($predicate),
    343. -
    344.                                                                 $this->_resNode2Node($object),
    345. -
    346.                                                                 $offset
    347. -
    348.                                                               );
    349. -
    350.         if ($statement!==null)
    351. -
    352.         {                                            
    353. -
    354.             return new Statement(    $this->_node2ResNode($statement->getSubject()),
    355. -
    356.                                     $this->_node2ResNode($statement->getPredicate(),true),
    357. -
    358.                                     $this->_node2ResNode($statement->getObject())
    359. -
    360.                                 );
    361. -
    362.         else 
    363. -
    364.         {
    365. -
    366.             return null;
    367. -
    368.         }
    369. -
    370.     }
    371. -
    372.     
    373. -
    374.     /**
    375. -
    376.     * Adds a new triple to the Model without checking if the statement is already in the Model.
    377. -
    378.     * So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    379. -
    380.     * Expects a statements with ResResources(ResLiterals)
    381. -
    382.     *
    383. -
    384.     * @param    object Statement    $statement 
    385. -
    386.     * @access    public
    387. -
    388.     * @throws    PhpError
    389. -
    390.     */
    391. -
    392.     function add($statement)
    393. -
    394.     {
    395. -
    396.         return $this->model->add(new Statement(    $this->_resNode2Node($statement->getSubject()),
    397. -
    398.                                                 $this->_resNode2Node($statement->getPredicate()),
    399. -
    400.                                                 $this->_resNode2Node($statement->getObject()))
    401. -
    402.                                                );        
    403. -
    404.     }
    405. -
    406.     /**
    407. -
    408.     * Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    409. -
    410.     * addWithoutDuplicates() is significantly slower then add().
    411. -
    412.     * Retruns TRUE if the statement is added.
    413. -
    414.     * FALSE otherwise.
    415. -
    416.     * Expects a statements with ResResources(ResLiterals)
    417. -
    418.     *
    419. -
    420.     * @param    object Statement    $statement 
    421. -
    422.     * @return   boolean 
    423. -
    424.     * @access    public
    425. -
    426.     * @throws    PhpError
    427. -
    428.     */
    429. -
    430.     function addWithoutDuplicates($statement)
    431. -
    432.     {
    433. -
    434.         return $this->model->addWithoutDuplicates(new Statement($this->_resNode2Node($statement->getSubject()),
    435. -
    436.                                                                 $this->_resNode2Node($statement->getPredicate()),
    437. -
    438.                                                                 $this->_resNode2Node($statement->getObject()))
    439. -
    440.                                                                 );    
    441. -
    442.     }
    443. -
    444.     
    445. -
    446.     /**
    447. -
    448.     * Tests if the Model contains the given statement.
    449. -
    450.     * TRUE if the statement belongs to the model;
    451. -
    452.     * FALSE otherwise.
    453. -
    454.     * Expects a statement of ResResources(ResLiterals)
    455. -
    456.     *
    457. -
    458.     * @param    object Statement    $statement 
    459. -
    460.     * @return    boolean 
    461. -
    462.     * @access    public
    463. -
    464.     */
    465. -
    466.     function contains($statement)
    467. -
    468.     {
    469. -
    470.         
    471. -
    472.         return $this->model->contains(new Statement($this->_resNode2Node($statement->getSubject()),
    473. -
    474.                                                     $this->_resNode2Node($statement->getPredicate()),
    475. -
    476.                                                     $this->_resNode2Node($statement->getObject()))
    477. -
    478.                                                     );
    479. -
    480.     }
    481. -
    482.     
    483. -
    484.     /**
    485. -
    486.     * Determine if all of the statements in a model are also contained in this model.
    487. -
    488.     * True if all of the statements in $model are also contained in this model and false otherwise.
    489. -
    490.     *
    491. -
    492.     * @param    object Model    &$model 
    493. -
    494.     * @return    boolean 
    495. -
    496.     * @access    public
    497. -
    498.     */
    499. -
    500.     function containsAll($model)
    501. -
    502.     {
    503. -
    504.         if (is_a($model,'ResModel'))
    505. -
    506.             return $this->model->containsAll($model->getModel());
    507. -
    508.         
    509. -
    510.         return $this->model->containsAll($model);
    511. -
    512.     }
    513. -
    514.     
    515. -
    516.     /**
    517. -
    518.     * Determine if any of the statements in a model are also contained in this model.
    519. -
    520.     * True if any of the statements in $model are also contained in this model and false otherwise.
    521. -
    522.     *
    523. -
    524.     * @param    object Model    &$model 
    525. -
    526.     * @return    boolean 
    527. -
    528.     * @access    public
    529. -
    530.     */    
    531. -
    532.     function containsAny($model)
    533. -
    534.     {
    535. -
    536.         if (is_a($model,'ResModel'))
    537. -
    538.             return $this->model->containsAny($model->getModel());
    539. -
    540.         return $this->model->containsAny($model);
    541. -
    542.     }
    543. -
    544.     
    545. -
    546.     /**
    547. -
    548.     * Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    549. -
    550.     *
    551. -
    552.     * @param    object Node    &$node 
    553. -
    554.     * @return    boolean 
    555. -
    556.     * @access    public
    557. -
    558.     */    
    559. -
    560.     function containsResource($node)
    561. -
    562.     {
    563. -
    564.         if ($this->findFirstMatchingStatement($node,null,null=== null)
    565. -
    566.             if ($this->findFirstMatchingStatement(null,$node,null=== null)
    567. -
    568.                 if ($this->findFirstMatchingStatement(null,null,$node=== null)
    569. -
    570.                     return false;
    571. -
    572.                     
    573. -
    574.         return true;
    575. -
    576.     }
    577. -
    578.     
    579. -
    580.     /**
    581. -
    582.     * Create a literal from a String value with the $dtype Datatype
    583. -
    584.     * An existing literal of the right value may be returned, or a fresh one created.
    585. -
    586.     *
    587. -
    588.     * @param    string    $value 
    589. -
    590.     * @param    string     $dtype 
    591. -
    592.     * @return     object ResLiteral 
    593. -
    594.     * @access    public
    595. -
    596.     */
    597. -
    598.     function createTypedLiteral($value,$dtype)
    599. -
    600.     {
    601. -
    602.         $resLiteral new ResLiteral($value);
    603. -
    604.         $resLiteral->setDatatype($dtype);
    605. -
    606.         $resLiteral->setAssociatedModel($this);
    607. -
    608.         
    609. -
    610.         return $resLiteral;
    611. -
    612.     }
    613. -
    614.     
    615. -
    616.     /**
    617. -
    618.     * Checks if two models are equal.
    619. -
    620.     * Two models are equal if and only if the two RDF graphs they represent are isomorphic.
    621. -
    622.     * 
    623. -
    624.     * Warning: This method doesn't work correct with models where the same blank node has different
    625. -
    626.     * identifiers in the two models. We will correct this in a future version.
    627. -
    628.     *
    629. -
    630.     * @access    public
    631. -
    632.     * @param    object    model &$that 
    633. -
    634.     * @throws    phpErrpr
    635. -
    636.     * @return    boolean 
    637. -
    638.     */        
    639. -
    640.     function equals($that)
    641. -
    642.     {
    643. -
    644.         if (is_a($that,'ResModel'))
    645. -
    646.             return $this->model->equals($that->getModel());
    647. -
    648.         return $this->model->equals($that);    
    649. -
    650.     }
    651. -
    652.     
    653. -
    654.     /** 
    655. -
    656.     * Returns a new model that is the subtraction of another model from this model.
    657. -
    658.     *
    659. -
    660.     * @param    object Model $model 
    661. -
    662.     * @return    object MemModel 
    663. -
    664.     * @access    public
    665. -
    666.     * @throws phpErrpr
    667. -
    668.     */ 
    669. -
    670.     function subtract($model)
    671. -
    672.     {
    673. -
    674.         if (is_a($model,'ResModel'))
    675. -
    676.             return $this->model->subtract($model->getModel());
    677. -
    678.         return $this->model->subtract($model);
    679. -
    680.     }
    681. -
    682.     
    683. -
    684.     /** 
    685. -
    686.     * Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    687. -
    688.     * If none exist, return null; if several exist, pick one arbitrarily.
    689. -
    690.     *
    691. -
    692.     * @param    object ResResource $subject 
    693. -
    694.     * @param    object ResResource $property 
    695. -
    696.     * @return    object Statement 
    697. -
    698.     * @access    public
    699. -
    700.     * @throws phpErrpr
    701. -
    702.     */ 
    703. -
    704.     function getProperty($subject,$property)
    705. -
    706.     {
    707. -
    708.     
    709. -
    710.         $statement$this->model->findFirstMatchingStatement(    $this->_resNode2Node($subject),
    711. -
    712.                                                                 $this->_resNode2Node($property),
    713. -
    714.                                                                 null
    715. -
    716.                                                             );
    717. -
    718.         if ($statement === null)
    719. -
    720.             return null;
    721. -
    722.                                                                 
    723. -
    724.         return new Statement($this->_node2ResNode($statement->getSubject()),
    725. -
    726.                                     $this->_node2ResNode($statement->getPredicate(),true),
    727. -
    728.                                     $this->_node2ResNode($statement->getObject())
    729. -
    730.                             );
    731. -
    732.                                                     
    733. -
    734.     }
    735. -
    736.     
    737. -
    738.     /**
    739. -
    740.     * Checks if MemModel is empty
    741. -
    742.     *
    743. -
    744.     * @return    boolean 
    745. -
    746.     * @access    public
    747. -
    748.     */
    749. -
    750.     function isEmpty()
    751. -
    752.     {
    753. -
    754.         return $this->model->isEmpty();
    755. -
    756.     }
    757. -
    758.     
    759. -
    760.     /** 
    761. -
    762.     * Returns a ResIterator with all objects in a model.
    763. -
    764.     *
    765. -
    766.     * @return    object ResIterator 
    767. -
    768.     * @access    public
    769. -
    770.     * @throws phpErrpr
    771. -
    772.     */
    773. -
    774.     function listObjects()
    775. -
    776.     {
    777. -
    778.         return $this->listObjectsOfProperty(null);
    779. -
    780.     }
    781. -
    782.     
    783. -
    784.     /** 
    785. -
    786.     * Returns a ResIterator with all objects with a given property and property value.
    787. -
    788.     *
    789. -
    790.     * @param    object ResResource    $property 
    791. -
    792.     * @param    object ResResource    $value 
    793. -
    794.     * @return    object ResIterator 
    795. -
    796.     * @access    public
    797. -
    798.     */
    799. -
    800.     function listObjectsOfProperty($property$value null)
    801. -
    802.     {
    803. -
    804.         return new ResIterator(null,$property,$value,'o',$this);
    805. -
    806.     }
    807. -
    808.  
    809. -
    810.     
    811. -
    812.     /** 
    813. -
    814.     * Returns a ResIterator with all subjects in a model.
    815. -
    816.     *
    817. -
    818.     * @return    object ResIterator 
    819. -
    820.     * @access    public
    821. -
    822.     * @throws phpErrpr
    823. -
    824.     */
    825. -
    826.     function listSubjects()
    827. -
    828.     {
    829. -
    830.         return $this->listSubjectsWithProperty(null);
    831. -
    832.     }
    833. -
    834.     
    835. -
    836.     /** 
    837. -
    838.     * Returns a ResIterator with all subjects with a given property and property value.
    839. -
    840.     *
    841. -
    842.     * @param    object ResResource    $property 
    843. -
    844.     * @param    object ResResource    $value 
    845. -
    846.     * @return    object ResIterator 
    847. -
    848.     * @access    public
    849. -
    850.     * @throws phpErrpr
    851. -
    852.     */
    853. -
    854.     function listSubjectsWithProperty($property,$value null)
    855. -
    856.     {
    857. -
    858.         return new ResIterator(null,$property,$value,'s',$this);
    859. -
    860.     }
    861. -
    862.     
    863. -
    864.     /**
    865. -
    866.     * Removes the statement of ResResources(ResTriples) from the MemModel.
    867. -
    868.     * TRUE if the statement is removed.
    869. -
    870.     * FALSE otherwise.
    871. -
    872.     *
    873. -
    874.     * @param    object Statement    $statement 
    875. -
    876.     * @return   boolean 
    877. -
    878.     * @access    public
    879. -
    880.     * @throws    PhpError
    881. -
    882.     */    
    883. -
    884.     function remove($statement)
    885. -
    886.     {
    887. -
    888.         return $this->model->remove(new Statement(    $this->_resNode2Node($statement->getSubject()),
    889. -
    890.                                                     $this->_resNode2Node($statement->getPredicate()),
    891. -
    892.                                                     $this->_resNode2Node($statement->getObject())
    893. -
    894.                                                   ));
    895. -
    896.     }
    897. -
    898.     
    899. -
    900.     /**
    901. -
    902.     * Number of statements in the MemModel
    903. -
    904.     *
    905. -
    906.     * @return    integer 
    907. -
    908.     * @access    public
    909. -
    910.     */
    911. -
    912.     function size()
    913. -
    914.     {
    915. -
    916.         return $this->model->size();
    917. -
    918.     }
    919. -
    920.     
    921. -
    922.     /** 
    923. -
    924.     * Returns a new Model that is the set-union of the model with another model.
    925. -
    926.     * Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
    927. -
    928.     *
    929. -
    930.     * The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
    931. -
    932.     * is another graph, which we will call the merge of the graphs.
    933. -
    934.     * Each of the original graphs is a subgraph of the merged graph. Notice that when forming
    935. -
    936.     * a merged graph, two occurrences of a given uriref or literal as nodes in two different
    937. -
    938.     * graphs become a single node in the union graph (since by definition they are the same
    939. -
    940.     * uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
    941. -
    942.     * never merged. In particular, this means that every blank node in a merged graph can be
    943. -
    944.     * identified as coming from one particular graph in the original set of graphs.
    945. -
    946.     * 
    947. -
    948.     * Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
    949. -
    950.     * their corresponding N-triples documents and constructing the graph described by the merged
    951. -
    952.     * document, since if some of the documents use the same node identifiers, the merged document
    953. -
    954.     * will describe a graph in which some of the blank nodes have been 'accidentally' merged.
    955. -
    956.     * To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
    957. -
    958.     * more documents, and to replace it with a distinct nodeID in each of them, before merging the
    959. -
    960.     * documents. (Not implemented yet !!!!!!!!!!!)
    961. -
    962.     *
    963. -
    964.     * @param    object Model    $model 
    965. -
    966.     * @return    object MemModel 
    967. -
    968.     * @access    public
    969. -
    970.     * @throws phpErrpr
    971. -
    972.     *
    973. -
    974.     */
    975. -
    976.     function unite($model)
    977. -
    978.     {
    979. -
    980.         if (is_a($model,'ResModel'))
    981. -
    982.             return $this->model->unite($model->getModel());
    983. -
    984.         return $this->model->unite($model);
    985. -
    986.     }
    987. -
    988.     
    989. -
    990.     /** 
    991. -
    992.     * Adds another model to this MemModel.
    993. -
    994.     * Duplicate statements are not removed.
    995. -
    996.     * If you don't want duplicates, use unite().
    997. -
    998.     * If any statement of the model to be added to this model contains a blankNode
    999. -
    1000.     * with an identifier already existing in this model, a new blankNode is generated.
    1001. -
    1002.     *
    1003. -
    1004.     * @param    object Model    $model 
    1005. -
    1006.     * @access    public
    1007. -
    1008.     * @throws phpErrpr
    1009. -
    1010.     *
    1011. -
    1012.     */
    1013. -
    1014.     function addModel(&$model)  
    1015. -
    1016.     {
    1017. -
    1018.         if (is_a($model,'ResModel'))
    1019. -
    1020.             return $this->model->addModel($model->getModel());
    1021. -
    1022.         return $this->model->addModel($model);
    1023. -
    1024.     }
    1025. -
    1026.     
    1027. -
    1028.     /**
    1029. -
    1030.     * Create a new RDF Container from type rdf:Alt
    1031. -
    1032.     * This method may return an existing container with the correct URI and model,
    1033. -
    1034.     * or it may construct a fresh one, as it sees fit.
    1035. -
    1036.     *
    1037. -
    1038.     * Subsequent operations on the returned Container may modify this model.
    1039. -
    1040.     *  
    1041. -
    1042.     *
    1043. -
    1044.        * @param    string    $uri 
    1045. -
    1046.        * @return    object ResProperty 
    1047. -
    1048.        * @access    public
    1049. -
    1050.        */
    1051. -
    1052.     function createAlt($uri null)
    1053. -
    1054.     {
    1055. -
    1056.         $resAlt new ResAlt($uri);
    1057. -
    1058.         $resAlt->setAssociatedModel($this);
    1059. -
    1060.             
    1061. -
    1062.         return $resAlt;        
    1063. -
    1064.     }
    1065. -
    1066.     
    1067. -
    1068.     /**
    1069. -
    1070.     * Create a new RDF Container from type rdf:Bag
    1071. -
    1072.     * This method may return an existing container with the correct URI and model,
    1073. -
    1074.     * or it may construct a fresh one, as it sees fit.
    1075. -
    1076.     *
    1077. -
    1078.     * Subsequent operations on the returned Container may modify this model.
    1079. -
    1080.     *  
    1081. -
    1082.     *
    1083. -
    1084.        * @param    string    $uri 
    1085. -
    1086.        * @return    object ResProperty 
    1087. -
    1088.        * @access    public
    1089. -
    1090.        */
    1091. -
    1092.     function createBag($uri null)
    1093. -
    1094.     {
    1095. -
    1096.         $resBag new ResBag($uri);
    1097. -
    1098.         $resBag->setAssociatedModel($this);
    1099. -
    1100.             
    1101. -
    1102.         return $resBag;
    1103. -
    1104.     }
    1105. -
    1106.     
    1107. -
    1108.     /**
    1109. -
    1110.     * Create a new RDF Container from type rdf:Seq
    1111. -
    1112.     * This method may return an existing container with the correct URI and model,
    1113. -
    1114.     * or it may construct a fresh one, as it sees fit.
    1115. -
    1116.     *
    1117. -
    1118.     * Subsequent operations on the returned Container may modify this model.
    1119. -
    1120.     *  
    1121. -
    1122.     *
    1123. -
    1124.        * @param    string    $uri 
    1125. -
    1126.        * @return    object ResProperty 
    1127. -
    1128.        * @access    public
    1129. -
    1130.        */
    1131. -
    1132.     function createSeq($uri null)
    1133. -
    1134.     {
    1135. -
    1136.         $resSeq new ResSeq($uri);
    1137. -
    1138.         $resSeq->setAssociatedModel($this);
    1139. -
    1140.             
    1141. -
    1142.         return $resSeq;
    1143. -
    1144.     }    
    1145. -
    1146.     
    1147. -
    1148.     /**
    1149. -
    1150.     * Create a new RDF Collection from type rdf:List
    1151. -
    1152.     * This method may return an existing container with the correct URI and model,
    1153. -
    1154.     * or it may construct a fresh one, as it sees fit.
    1155. -
    1156.     *
    1157. -
    1158.     * Subsequent operations on the returned Container may modify this model.
    1159. -
    1160.     *  
    1161. -
    1162.     *
    1163. -
    1164.        * @param    string    $uri 
    1165. -
    1166.        * @return    object ResProperty 
    1167. -
    1168.        * @access    public
    1169. -
    1170.        */
    1171. -
    1172.     function createList($uri null)
    1173. -
    1174.     {
    1175. -
    1176.         $resList new ResList($uri);
    1177. -
    1178.         $resList->setAssociatedModel($this);
    1179. -
    1180.             
    1181. -
    1182.         return $resList;    
    1183. -
    1184.     }
    1185. -
    1186.     
    1187. -
    1188.     /**
    1189. -
    1190.     * Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    1191. -
    1192.     *  
    1193. -
    1194.     *
    1195. -
    1196.        * @return    object Model 
    1197. -
    1198.        * @access    public
    1199. -
    1200.        */    
    1201. -
    1202.     function getModel()
    1203. -
    1204.     {
    1205. -
    1206.         return  $this->model;
    1207. -
    1208.     }
    1209. -
    1210.     
    1211. -
    1212.     
    1213. -
    1214.     /**
    1215. -
    1216.     * Internal method, that returns a resource URI that is unique for the Model.
    1217. -
    1218.     * URIs are generated using the base_uri of the Model, the prefix and a unique number.
    1219. -
    1220.     * If no prefix is defined, the bNode prefix, defined in constants.php, is used.
    1221. -
    1222.     *
    1223. -
    1224.     * @param    string    $prefix 
    1225. -
    1226.     * @return    string 
    1227. -
    1228.     * @access    private
    1229. -
    1230.     */
    1231. -
    1232.     function getUniqueResourceURI($bnodePrefix)
    1233. -
    1234.     {
    1235. -
    1236.         return $this->model->getUniqueResourceURI($bnodePrefix);
    1237. -
    1238.     }
    1239. -
    1240.     
    1241. -
    1242.     /**
    1243. -
    1244.     * Load a model from a file containing RDF, N3 or N-Triples.
    1245. -
    1246.     * This function recognizes the suffix of the filename (.n3 or .rdf) and
    1247. -
    1248.     * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
    1249. -
    1250.     * If the model is not empty, the contents of the file is added to this DbModel.
    1251. -
    1252.     *
    1253. -
    1254.     * @param     string     $filename 
    1255. -
    1256.     * @param     string     $type 
    1257. -
    1258.     * @param   boolean $stream 
    1259. -
    1260.     * @access    public
    1261. -
    1262.     */
    1263. -
    1264.     function load($filename$type NULL$stream=false)
    1265. -
    1266.     {
    1267. -
    1268.         $this->model->load($filename$type NULL$stream=false);
    1269. -
    1270.     }
    1271. -
    1272.     
    1273. -
    1274.     /**
    1275. -
    1276.     * Return current baseURI.
    1277. -
    1278.     *
    1279. -
    1280.     * @return  string 
    1281. -
    1282.     * @access    public
    1283. -
    1284.     */
    1285. -
    1286.     function getBaseURI()  
    1287. -
    1288.     {
    1289. -
    1290.         return $this->model->getBaseURI();
    1291. -
    1292.     }
    1293. -
    1294.  
    1295. -
    1296.     /**
    1297. -
    1298.     * Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    1299. -
    1300.     * You can decide to which format the model should be serialized by using a
    1301. -
    1302.     * corresponding suffix-string as $type parameter. If no $type parameter
    1303. -
    1304.     * is placed this method will serialize the model to XML/RDF format.
    1305. -
    1306.     * Returns FALSE if the MemModel couldn't be saved to the file.
    1307. -
    1308.     *
    1309. -
    1310.     * @access    public
    1311. -
    1312.     * @param     string     $filename 
    1313. -
    1314.     * @param     string     $type 
    1315. -
    1316.     * @throws   PhpError
    1317. -
    1318.     * @return    boolean 
    1319. -
    1320.     */  
    1321. -
    1322.     function saveAs($filename$type ='rdf'
    1323. -
    1324.     {
    1325. -
    1326.         return $this->model->saveAs($filename$type ='rdf');
    1327. -
    1328.     }
    1329. -
    1330.     
    1331. -
    1332.     /**
    1333. -
    1334.     * Writes the RDF serialization of the MemModel as HTML table.
    1335. -
    1336.     *
    1337. -
    1338.     * @access    public
    1339. -
    1340.     */  
    1341. -
    1342.     function writeAsHTMLTable()
    1343. -
    1344.     {
    1345. -
    1346.         $this->model->writeAsHtmlTable();
    1347. -
    1348.     }
    1349. -
    1350.     
    1351. -
    1352.     /** 
    1353. -
    1354.     * Returns a new model containing all the statements which are in both this model and another.
    1355. -
    1356.     *
    1357. -
    1358.     * @param    object Model    $model 
    1359. -
    1360.     * @return    object MemModel 
    1361. -
    1362.     * @access    public
    1363. -
    1364.     * @throws phpErrpr
    1365. -
    1366.     */ 
    1367. -
    1368.     function intersect($model)
    1369. -
    1370.     {
    1371. -
    1372.         if (is_a($model,'ResModel'))
    1373. -
    1374.             return $this->model->intersect($model->getModel());
    1375. -
    1376.         return $this->model->intersect($model);
    1377. -
    1378.     }
    1379. -
    1380.     
    1381. -
    1382.     /** 
    1383. -
    1384.     * converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral
    1385. -
    1386.     *
    1387. -
    1388.     * @param    object Node    $node 
    1389. -
    1390.     * @param    boolean        $isProperty 
    1391. -
    1392.     * @return    object ResResource / ResProperty / ResLiteral
    1393. -
    1394.     * @access    private
    1395. -
    1396.     * @throws phpErrpr
    1397. -
    1398.     */ 
    1399. -
    1400.     function _node2ResNode($node$isProperty false)
    1401. -
    1402.     {
    1403. -
    1404.         if (is_a($node,'Literal'))
    1405. -
    1406.         {
    1407. -
    1408.             $returnnew ResLiteral($node->getLabel(),$node->getLanguage());
    1409. -
    1410.             $return->setDatatype($node->getDatatype());
    1411. -
    1412.             $return->setAssociatedModel($this);
    1413. -
    1414.  
    1415. -
    1416.             return $return;
    1417. -
    1418.         }
    1419. -
    1420.         if (is_a($node,'Resource'))
    1421. -
    1422.         {
    1423. -
    1424.             if ($isProperty)
    1425. -
    1426.             {
    1427. -
    1428.                 $resnew ResProperty($node->getLabel());
    1429. -
    1430.             else 
    1431. -
    1432.             {
    1433. -
    1434.                 $resnew ResResource($node->getLabel());
    1435. -
    1436.             }
    1437. -
    1438.             $res->setAssociatedModel($this);
    1439. -
    1440.             if (is_a($node,'Blanknode'))
    1441. -
    1442.                 $res->setIsAnon(true);    
    1443. -
    1444.         
    1445. -
    1446.             return $res;
    1447. -
    1448.         }
    1449. -
    1450.     }
    1451. -
    1452.     
    1453. -
    1454.     /** 
    1455. -
    1456.     * converts a ResResource, ResProperty, or ResLiteral into a Resource, Blanknode, or Literal
    1457. -
    1458.     *
    1459. -
    1460.     * @param    object ResNode    $resNode 
    1461. -
    1462.     * @return    object Node 
    1463. -
    1464.     * @access    private
    1465. -
    1466.     * @throws phpErrpr
    1467. -
    1468.     */ 
    1469. -
    1470.     function _resNode2Node($resNode)
    1471. -
    1472.     {
    1473. -
    1474.         if (is_a($resNode,'ResResource'))
    1475. -
    1476.         {
    1477. -
    1478.             if ($resNode->getIsAnon())    
    1479. -
    1480.             {
    1481. -
    1482.                 $return=new BlankNode($resNode->getURI());
    1483. -
    1484.             else 
    1485. -
    1486.             {
    1487. -
    1488.                 $return=new Resource($resNode->getURI());    
    1489. -
    1490.             }    
    1491. -
    1492.         return $return;    
    1493. -
    1494.         }
    1495. -
    1496.         
    1497. -
    1498.         if (is_a($resNode,'ResLiteral'))
    1499. -
    1500.         {
    1501. -
    1502.             $literal=new Literal($resNode->getLabel(),$resNode->getLanguage());
    1503. -
    1504.             if ($resNode->getDatatype(!= null)
    1505. -
    1506.                 $literal->setDatatype($resNode->getDatatype());
    1507. -
    1508.             return $literal;
    1509. -
    1510.         }
    1511. -
    1512.     }
    1513. -
    1514.     
    1515. -
    1516.     /**
    1517. -
    1518.     * Set a base URI for the MemModel.
    1519. -
    1520.     * Affects creating of new resources and serialization syntax.
    1521. -
    1522.     * If the URI doesn't end with # : or /, then a # is added to the URI.
    1523. -
    1524.     * @param    string    $uri 
    1525. -
    1526.     * @access    public
    1527. -
    1528.     */
    1529. -
    1530.     function setBaseURI($uri
    1531. -
    1532.     {
    1533. -
    1534.         $this->model->setBaseURI($uri);
    1535. -
    1536.     }
    1537. -
    1538.     
    1539. -
    1540.     /**
    1541. -
    1542.     * Writes the RDF serialization of the MemModel as HTML table.
    1543. -
    1544.     *
    1545. -
    1546.     * @access    public
    1547. -
    1548.     * @return    string 
    1549. -
    1550.     */  
    1551. -
    1552.     function writeRdfToString(
    1553. -
    1554.     {
    1555. -
    1556.         return $this->model->writeRdfToString();    
    1557. -
    1558.     }
    1559. -
    1560.     
    1561. -
    1562.     /**
    1563. -
    1564.     * Perform an RDQL query on this MemModel.
    1565. -
    1566.     * This method returns an associative array of variable bindings.
    1567. -
    1568.     * The values of the query variables can either be RAP's objects (instances of Node)
    1569. -
    1570.     * if $returnNodes set to TRUE, or their string serialization.
    1571. -
    1572.     *
    1573. -
    1574.     * @access    public
    1575. -
    1576.     * @param string $queryString 
    1577. -
    1578.     * @param boolean $returnNodes 
    1579. -
    1580.     * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
    1581. -
    1582.     *       OR  array   [][?VARNAME] = string
    1583. -
    1584.     *
    1585. -
    1586.     */
    1587. -
    1588.     function rdqlQuery($queryString$returnNodes TRUE
    1589. -
    1590.     {
    1591. -
    1592.         return $this->model->rdqlQuery($queryString$returnNodes);
    1593. -
    1594.     }
    1595. -
    1596.     
    1597. -
    1598.     /**
    1599. -
    1600.     * Perform an RDQL query on this MemModel.
    1601. -
    1602.     * This method returns an RdqlResultIterator of variable bindings.
    1603. -
    1604.     * The values of the query variables can either be RAP's objects (instances of Node)
    1605. -
    1606.     * if $returnNodes set to TRUE, or their string serialization.
    1607. -
    1608.     *
    1609. -
    1610.     * @access    public
    1611. -
    1612.     * @param string $queryString 
    1613. -
    1614.     * @param boolean $returnNodes 
    1615. -
    1616.     * @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
    1617. -
    1618.     *       OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    1619. -
    1620.     *
    1621. -
    1622.     */
    1623. -
    1624.     function rdqlQueryAsIterator($queryString$returnNodes TRUE
    1625. -
    1626.     {
    1627. -
    1628.         return $this->model->rdqlQueryAsIterator($queryString$returnNodes);
    1629. -
    1630.     }
    1631. -
    1632.     
    1633. -
    1634.     
    1635. -
    1636.     /**
    1637. -
    1638.     * Returns the models namespaces.
    1639. -
    1640.     *
    1641. -
    1642.     * @author   Tobias Gau <tobias.gauss@web.de>
    1643. -
    1644.     * @access   public
    1645. -
    1646.     * @return   Array 
    1647. -
    1648.     */
    1649. -
    1650.     function getParsedNamespaces(){
    1651. -
    1652.         return $this->model->getParsedNamespaces();
    1653. -
    1654.     }
    1655. -
    1656.  
    1657. -
    1658.  
    1659. -
    1660.  
    1661. -
    1662.     /**
    1663. -
    1664.     * Adds the namespaces to the model. This method is called by
    1665. -
    1666.     * the parser. !!!! addParsedNamespaces() not overwrites manual
    1667. -
    1668.     * added namespaces in the model !!!!
    1669. -
    1670.     *
    1671. -
    1672.     * @author   Tobias Gau <tobias.gauss@web.de>
    1673. -
    1674.     * @access   public
    1675. -
    1676.     * @param    Array $newNs 
    1677. -
    1678.     */
    1679. -
    1680.     function addParsedNamespaces($newNs){
    1681. -
    1682.         $this->model->addParsedNamespaces($newNs);
    1683. -
    1684.     }
    1685. -
    1686.  
    1687. -
    1688.  
    1689. -
    1690.     /**
    1691. -
    1692.     * Adds a namespace and prefix to the model.
    1693. -
    1694.     *
    1695. -
    1696.     * @author   Tobias Gau <tobias.gauss@web.de>
    1697. -
    1698.     * @access   public
    1699. -
    1700.     * @param    String $prefix, String $nmsp
    1701. -
    1702.     */
    1703. -
    1704.     function addNamespace($prefix$namespace){
    1705. -
    1706.         $this->model->addNamespace($prefix$namespace);
    1707. -
    1708.     }
    1709. -
    1710.     
    1711. -
    1712.     /**
    1713. -
    1714.     * removes a single namespace from the model
    1715. -
    1716.     *
    1717. -
    1718.     * @author   Tobias Gau <tobias.gauss@web.de>
    1719. -
    1720.     * @access   public
    1721. -
    1722.     * @param    String $nmsp 
    1723. -
    1724.     */
    1725. -
    1726.     function removeNamespace($nmsp){
    1727. -
    1728.         return $this->model->removeNamespace($nmsp);
    1729. -
    1730.     }
    1731. -
    1732.  
    1733. -
    1734.     
    1735. -
    1736.     
    1737. -
    1738.     
    1739. -
    1740.     
    1741. -
    1742.     
    1743. -
    1744. }
    1745. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResProperty.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResProperty.php.html deleted file mode 100755 index 4debf404..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResProperty.php.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for ResProperty.php - - - - - -

    Source for file ResProperty.php

    -

    Documentation is available at ResProperty.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResProperty
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * An RDF Property.
    14. -
    15. *
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_resModel__resModelResProperty.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. *
    26. -
    27. @package resModel
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class ResProperty extends ResResource  
    34. -
    35. {
    36. -
    37.     
    38. -
    39.     /**
    40. -
    41.     * Constructor
    42. -
    43.     * You can supply a URI
    44. -
    45.     *
    46. -
    47.     * @param string $uri 
    48. -
    49.     * @access    public
    50. -
    51.     */    
    52. -
    53.     function ResProperty($uri)
    54. -
    55.     {
    56. -
    57.         parent::ResResource($uri);
    58. -
    59.     }
    60. -
    61. -
    62. ?>
    63. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResResource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResResource.php.html deleted file mode 100755 index 49a8616f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResResource.php.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - File Source for ResResource.php - - - - - -

    Source for file ResResource.php

    -

    Documentation is available at ResResource.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * ----------------------------------------------------------------------------------
    6. -
    7. * Class: ResResource
    8. -
    9. * ----------------------------------------------------------------------------------
    10. -
    11. @package resModel
    12. -
    13. ***/
    14. -
    15.  
    16. -
    17. /**
    18. -
    19. * An RDF Resource.
    20. -
    21. * Resource instances, when created, are associated with a specific model. They support a
    22. -
    23. * range of methods, such as getProperty() and addProperty() which will access or modify
    24. -
    25. * that model. This enables the programmer to write code in a compact and easy style.
    26. -
    27. *
    28. -
    29. @version  $Id: fsource_resModel__resModelResResource.php.html 443 2007-06-01 16:25:38Z cax $
    30. -
    31. @author Daniel Westphal <mail at d-westphal dot de>
    32. -
    33. *
    34. -
    35. *
    36. -
    37. @package resModel
    38. -
    39. @access    public
    40. -
    41. ***/
    42. -
    43. class ResResource extends Resource 
    44. -
    45. {
    46. -
    47.     /**
    48. -
    49.     * Holds a reference to the associated model
    50. -
    51.     * @var        ResModel 
    52. -
    53.     * @access    private
    54. -
    55.     */
    56. -
    57.     var $model;
    58. -
    59.     
    60. -
    61.     /**
    62. -
    63.     * Is true, if this resource is an anonymous node.
    64. -
    65.     * @var        boolean 
    66. -
    67.     * @access    private
    68. -
    69.     */
    70. -
    71.     var $isAnon;
    72. -
    73.     
    74. -
    75.     
    76. -
    77.     /**
    78. -
    79.     * Constructor
    80. -
    81.     * You can supply a uri
    82. -
    83.     *
    84. -
    85.     * @param string $uri 
    86. -
    87.     * @access    public
    88. -
    89.     */        
    90. -
    91.     function ResResource($uri)
    92. -
    93.     {
    94. -
    95.             parent::Resource($uri);
    96. -
    97.             $this->isAnon ($uri === null);        
    98. -
    99.     }
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     * Sets the reference to the assocoated model.
    106. -
    107.     *
    108. -
    109.     * @param    object Model    $model 
    110. -
    111.     * @access public
    112. -
    113.     */    
    114. -
    115.     function setAssociatedModel($model)
    116. -
    117.     {
    118. -
    119.         $this->model=$model;
    120. -
    121.         if ($this->isAnon)
    122. -
    123.             $this->uri=$this->model->getUniqueResourceURI(BNODE_PREFIX);
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Get the reference to the assocoated model.
    132. -
    133.     *
    134. -
    135.     * @return    object Model    $model
    136. -
    137.     * @access public
    138. -
    139.     */
    140. -
    141.     function getAssociatedModel()
    142. -
    143.     {
    144. -
    145.         return $this->model;
    146. -
    147.     }
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * Sets the URI of this resource
    154. -
    155.     *
    156. -
    157.     * @param    string $uri 
    158. -
    159.     * @access public
    160. -
    161.     */    
    162. -
    163.     function setURI($uri)
    164. -
    165.     {
    166. -
    167.         $this->uri $uri;
    168. -
    169.     }
    170. -
    171.     
    172. -
    173.     /**
    174. -
    175.     * Add a property to this resource.
    176. -
    177.     * A statement with this resource as the subject, p as the predicate and o
    178. -
    179.     * as the object is added to the model associated with this resource.
    180. -
    181.     *
    182. -
    183.        * @param    ResResource                $property 
    184. -
    185.        * @param    ResResource/ResLiteral    $object 
    186. -
    187.        * @return    object ResResource 
    188. -
    189.        * @access    public
    190. -
    191.        */
    192. -
    193.     function addProperty($property,$object)
    194. -
    195.     {
    196. -
    197.         $this->model->add(new Statement($this,$property,$object));
    198. -
    199.  
    200. -
    201.         return $this;
    202. -
    203.     }
    204. -
    205.     
    206. -
    207.     /**
    208. -
    209.     * List all the values with the property p as statements in an array.
    210. -
    211.     *
    212. -
    213.        * @param    ResResource        $property 
    214. -
    215.        * @return    ResIterator 
    216. -
    217.        * @access    public
    218. -
    219.        */
    220. -
    221.     function listProperties($property null)
    222. -
    223.     {
    224. -
    225.         return $this->model->find($this,$property,null);
    226. -
    227.     }
    228. -
    229.     
    230. -
    231.     /**
    232. -
    233.     * Answer some statement (this, p, O) in the associated model.
    234. -
    235.     * If there are several such statements, any one of them may be returned.
    236. -
    237.     * If no such statements exist, null is returned.
    238. -
    239.     *
    240. -
    241.        * @param    ResResource                $property 
    242. -
    243.        * @return    object ResResource 
    244. -
    245.        * @access    public
    246. -
    247.        */    
    248. -
    249.     function getProperty($property)
    250. -
    251.     {
    252. -
    253.         return $this->model->getProperty($this,$property);
    254. -
    255.     }
    256. -
    257.     
    258. -
    259.     /**
    260. -
    261.     * Determine whether this resource has any values for a given property.
    262. -
    263.     *
    264. -
    265.        * @param    ResResource        $property 
    266. -
    267.        * @param    ResResource        $value 
    268. -
    269.        * @return    object ResResource 
    270. -
    271.        * @access    public
    272. -
    273.        */    
    274. -
    275.     function hasProperty($property$value null)
    276. -
    277.     {
    278. -
    279.         $ret$this->model->findFirstMatchingStatement($this,$property,$value);
    280. -
    281.         
    282. -
    283.         return ($ret!==null);    
    284. -
    285.     }
    286. -
    287.     
    288. -
    289.     /**
    290. -
    291.     * Determine whether this resource is an anonymous resource
    292. -
    293.     *
    294. -
    295.        * @return    boolean 
    296. -
    297.        * @access    public
    298. -
    299.        */        
    300. -
    301.     function getIsAnon()
    302. -
    303.     {
    304. -
    305.         return $this->isAnon;    
    306. -
    307.     }
    308. -
    309.     
    310. -
    311.     /**
    312. -
    313.     * Set whether this resource is an anonymous resource
    314. -
    315.     *
    316. -
    317.        * @param    boolean 
    318. -
    319.        * @access    public
    320. -
    321.        */    
    322. -
    323.     function setIsAnon($isAnon)
    324. -
    325.     {
    326. -
    327.          $this->isAnon=$isAnon;    
    328. -
    329.     }
    330. -
    331.         
    332. -
    333.     /**
    334. -
    335.     * Checks if the resource equals another resource.
    336. -
    337.     * Two resources are equal, if they have the same URI
    338. -
    339.     *
    340. -
    341.     * @access    public
    342. -
    343.     * @param    object    resource $that 
    344. -
    345.     * @return    boolean 
    346. -
    347.     */  
    348. -
    349.     function equals ($that
    350. -
    351.     {
    352. -
    353.         if (is_a($that,'ResLiteral'))
    354. -
    355.             return $that->equals($this);
    356. -
    357.             
    358. -
    359.         return ($that!==null && ($this->getURI(== $that->getURI()));
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Delete all the statements with predicate p for this resource from
    368. -
    369.     * its associated model.
    370. -
    371.     *
    372. -
    373.     * @access    public
    374. -
    375.     * @param    object    resource $property 
    376. -
    377.     * @return    object ResResource 
    378. -
    379.     */ 
    380. -
    381.     function removeAll($property null)
    382. -
    383.     {    
    384. -
    385.         foreach ($this->model->find($this,$property,nullas $statement)
    386. -
    387.         {
    388. -
    389.             $this->model->remove($statement);    
    390. -
    391.         }
    392. -
    393.         return $this;
    394. -
    395.     }
    396. -
    397.     
    398. -
    399.     /**
    400. -
    401.     * Delete all the properties for this resource from the associated model.
    402. -
    403.     *
    404. -
    405.     * @access    public
    406. -
    407.     * @return    object ResResource 
    408. -
    409.     */ 
    410. -
    411.     function removeProperties()
    412. -
    413.     {
    414. -
    415.         $this->removeAll();
    416. -
    417.         return $this;
    418. -
    419.     }
    420. -
    421. }
    422. -
    423. ?>
    424. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResSeq.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResSeq.php.html deleted file mode 100755 index 867ecb88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_resModel__resModelResSeq.php.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - File Source for ResSeq.php - - - - - -

    Source for file ResSeq.php

    -

    Documentation is available at ResSeq.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: ResSeq
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * This interface defines methods for accessing RDF Sequence resources.
    14. -
    15. * These methods operate on the RDF statements contained in a model.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_resModel__resModelResSeq.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author Daniel Westphal <mail at d-westphal dot de>
    22. -
    23. *
    24. -
    25. @package     resModel
    26. -
    27. @access    public
    28. -
    29. ***/
    30. -
    31. class ResSeq extends ResContainer 
    32. -
    33. {
    34. -
    35.     
    36. -
    37.     /**
    38. -
    39.     * Constructor
    40. -
    41.     * You can supply a URI
    42. -
    43.     *
    44. -
    45.     * @param string $uri 
    46. -
    47.     * @access    public
    48. -
    49.     */        
    50. -
    51.     function ResSeq($uri null)
    52. -
    53.     {
    54. -
    55.         parent::ResContainer($uri);
    56. -
    57.         $this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_SEQ);
    58. -
    59.     }
    60. -
    61.     
    62. -
    63.     /**
    64. -
    65.     * Insert a new member into the sequence at the specified position.
    66. -
    67.     * The existing member at that position, and all others with higher indexes,
    68. -
    69.     * have their index increased by one.
    70. -
    71.     *
    72. -
    73.     * @param     integer    $index 
    74. -
    75.        * @param    object ResResource/ResLiteral    $resResource 
    76. -
    77.        * @return    boolean 
    78. -
    79.        * @access    public
    80. -
    81.        */
    82. -
    83.     function addAtIndex($index$object)
    84. -
    85.     {
    86. -
    87.         //get a members index
    88. -
    89.         $memberIndex$this->getMembers();
    90. -
    91.                 
    92. -
    93.         //type this container, if it isn't already typed
    94. -
    95.         if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
    96. -
    97.             $this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
    98. -
    99.         
    100. -
    101.         //renumber all higher members
    102. -
    103.         for ($i count($memberIndex);$i >= $index $i--)
    104. -
    105.         {
    106. -
    107.             $this->removeAll($this->_getMembershipPropertyWithIndex($i));
    108. -
    109.             $this->addProperty($this->_getMembershipPropertyWithIndex($i+1),$memberIndex[$i]);
    110. -
    111.         }    
    112. -
    113.         //remove the old value at this position
    114. -
    115.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    116. -
    117.         //add the new value
    118. -
    119.         $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
    120. -
    121.                 
    122. -
    123.         return $this;
    124. -
    125.     }
    126. -
    127.     
    128. -
    129.     /**
    130. -
    131.     * Get the member at a given index
    132. -
    133.     *
    134. -
    135.     * @param     integer    $index 
    136. -
    137.        * @return    object ResResource/ResLiteral 
    138. -
    139.        * @access    public
    140. -
    141.        */
    142. -
    143.     function getMember($index)
    144. -
    145.     {
    146. -
    147.         $result=$this->listProperties($this->_getMembershipPropertyWithIndex($index));
    148. -
    149.         if (isset($result[0]))
    150. -
    151.         {
    152. -
    153.             return $result[0];
    154. -
    155.         
    156. -
    157.         else 
    158. -
    159.         {
    160. -
    161.             return null;
    162. -
    163.         }
    164. -
    165.     }
    166. -
    167.     
    168. -
    169.     /**
    170. -
    171.     * Return the index of a given member of the sequence.
    172. -
    173.     * If the same value appears more than once in the sequence, it is undefined
    174. -
    175.     * which of the indexes will be returned.
    176. -
    177.     * If the member is not found in this sequence, a value of 0 is returned.
    178. -
    179.     *
    180. -
    181.     * @param     object ResResource/ResLiteral $object 
    182. -
    183.        * @return    integer 
    184. -
    185.        * @access    public
    186. -
    187.        */
    188. -
    189.     function indexOf($object)
    190. -
    191.     {
    192. -
    193.         //check all members, until $object is found
    194. -
    195.         foreach ($this->listProperties(as $statement)
    196. -
    197.         {
    198. -
    199.             $predicateLabel=$statement->getLabelPredicate();
    200. -
    201.             if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
    202. -
    203.             {
    204. -
    205.                 if($object->equals($statement->getObject()))
    206. -
    207.                     //analyze the container membership property and return the index
    208. -
    209.                     return $this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel);
    210. -
    211.             }    
    212. -
    213.         }
    214. -
    215.         //return 0 if $object wasn't found
    216. -
    217.         return 0;
    218. -
    219.     }
    220. -
    221.     
    222. -
    223.     /**
    224. -
    225.     * Remove the member at the specified index.
    226. -
    227.     * All other members with a higher index will have their index reduced by one.
    228. -
    229.     *
    230. -
    231.     * @param     integer    $index 
    232. -
    233.        * @access    public
    234. -
    235.        */
    236. -
    237.     function removeAtIndex($index)
    238. -
    239.     {
    240. -
    241.         $memberIndex$this->getMembers();
    242. -
    243.  
    244. -
    245.  
    246. -
    247.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    248. -
    249.  
    250. -
    251.         for ($i $index;$i count($memberIndex)$i++)
    252. -
    253.         {
    254. -
    255.             $this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
    256. -
    257.             $this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
    258. -
    259.         }        
    260. -
    261.         return $this;
    262. -
    263.     }
    264. -
    265.     
    266. -
    267.     /**
    268. -
    269.     * Set the value at a given index in the sequence.
    270. -
    271.     *
    272. -
    273.     * If the index is not in the range of the sequence, false is returned
    274. -
    275.     *
    276. -
    277.     * @param     integer    $index 
    278. -
    279.        * @return    boolean 
    280. -
    281.        * @access    public
    282. -
    283.        */
    284. -
    285.     function set($index$object)
    286. -
    287.     {
    288. -
    289.         if (!$this->hasProperty($this->_getMembershipPropertyWithIndex($index)))
    290. -
    291.             return false;
    292. -
    293.             
    294. -
    295.         $this->removeAll($this->_getMembershipPropertyWithIndex($index));
    296. -
    297.         $this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
    298. -
    299.         return true;
    300. -
    301.     }
    302. -
    303. }
    304. -
    305. ?>
    306. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlClientQuery.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlClientQuery.php.html deleted file mode 100755 index d53c6e8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlClientQuery.php.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - File Source for ClientQuery.php - - - - - -

    Source for file ClientQuery.php

    -

    Documentation is available at ClientQuery.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: ClientQuery
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * ClientQuery Object to run a SPARQL Query against a SPARQL server.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_sparql__sparqlClientQuery.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author   Tobias Gau <tobias.gauss@web.de>
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class ClientQuery extends Object {
    32. -
    33.  
    34. -
    35.     var $default  = array();
    36. -
    37.     var $named    = array();
    38. -
    39.     var $prefixes = array();
    40. -
    41.     var $query;
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Adds a default graph to the query object.
    48. -
    49.     *
    50. -
    51.     * @param String  $default  default graph name
    52. -
    53.     */
    54. -
    55.     function addDefaultGraph($default){
    56. -
    57.         if(!in_array($this->named,$this->default))
    58. -
    59.         $this->default[$default;
    60. -
    61.     }
    62. -
    63.     /**
    64. -
    65.     * Adds a named graph to the query object.
    66. -
    67.     *
    68. -
    69.     * @param String  $default  named graph name
    70. -
    71.     */
    72. -
    73.     function addNamedGraph($named){
    74. -
    75.         if(!in_array($named,$this->named))
    76. -
    77.         $this->named[$named;
    78. -
    79.     }
    80. -
    81.     /**
    82. -
    83.     * Adds the SPARQL query string to the query object.
    84. -
    85.     *
    86. -
    87.     * @param String  $query the query string
    88. -
    89.     */
    90. -
    91.     function query($query){
    92. -
    93.         $this->query = $query;
    94. -
    95.     }
    96. -
    97.  
    98. -
    99. }
    100. -
    101.  
    102. -
    103.  
    104. -
    105.  
    106. -
    107.  
    108. -
    109. ?>
    110. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:34 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlConstraint.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlConstraint.php.html deleted file mode 100755 index f4e05ddb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlConstraint.php.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - File Source for Constraint.php - - - - - -

    Source for file Constraint.php

    -

    Documentation is available at Constraint.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. // ---------------------------------------------
    6. -
    7. // class: Constraint.php
    8. -
    9. // ---------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Represents a constraint. A value constraint is a boolean- valued expression
    18. -
    19. * of variables and RDF Terms.
    20. -
    21. *
    22. -
    23. @author   Tobias Gauss <tobias.gauss@web.de>
    24. -
    25. @version     $Id: fsource_sparql__sparqlConstraint.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27. *
    28. -
    29. @package sparql
    30. -
    31. */
    32. -
    33. Class Constraint extends Object{
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     * The expression string.
    40. -
    41.     * @var string 
    42. -
    43.     */
    44. -
    45.     protected $expression;
    46. -
    47.  
    48. -
    49.     /**
    50. -
    51.     *  True if it is an outer filter, false if not.
    52. -
    53.     * @var boolean 
    54. -
    55.     */
    56. -
    57.     protected $outer;
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     *   The expression tree
    64. -
    65.     *   @var array 
    66. -
    67.     */
    68. -
    69.     protected $tree = null;
    70. -
    71.  
    72. -
    73.     /**
    74. -
    75.     * Adds an expression string.
    76. -
    77.     *
    78. -
    79.     * @param  String $exp the expression String
    80. -
    81.     * @return void 
    82. -
    83.     */
    84. -
    85.     public function addExpression($exp)
    86. -
    87.     {
    88. -
    89.         $this->expression = $exp;
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Returns the expression string.
    98. -
    99.     *
    100. -
    101.     * @return String  the expression String
    102. -
    103.     */
    104. -
    105.     public function getExpression()
    106. -
    107.     {
    108. -
    109.         return $this->expression;
    110. -
    111.     }
    112. -
    113.  
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Sets the filter type to outer or inner filter.
    120. -
    121.     * True for outer false for inner.
    122. -
    123.     *
    124. -
    125.     * @param  boolean $boolean 
    126. -
    127.     * @return void 
    128. -
    129.     */
    130. -
    131.     public function setOuterFilter($boolean)
    132. -
    133.     {
    134. -
    135.         $this->outer = $boolean;
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     /**
    142. -
    143.     * Returns true if this constraint is an outer filter- false if not.
    144. -
    145.     *
    146. -
    147.     * @return boolean 
    148. -
    149.     */
    150. -
    151.     public function isOuterFilter()
    152. -
    153.     {
    154. -
    155.         return $this->outer;
    156. -
    157.     }
    158. -
    159.  
    160. -
    161.  
    162. -
    163.     public function getTree()
    164. -
    165.     {
    166. -
    167.         return $this->tree;
    168. -
    169.     }//public function getTree()
    170. -
    171.  
    172. -
    173.     public function setTree($tree)
    174. -
    175.     {
    176. -
    177.         $this->tree = $tree;
    178. -
    179.     }//public function setTree($tree)
    180. -
    181.  
    182. -
    183. }
    184. -
    185. // end class: Constraint.php
    186. -
    187. ?>
    188. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlFilterFunctions.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlFilterFunctions.php.html deleted file mode 100755 index a6144eae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlFilterFunctions.php.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - File Source for FilterFunctions.php - - - - - -

    Source for file FilterFunctions.php

    -

    Documentation is available at FilterFunctions.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. * List of functions used to evaluate the FILTER statements in
    6. -
    7. * SPARQL queries.
    8. -
    9. *
    10. -
    11. @package sparql
    12. -
    13. @author   Tobias Gauss <tobias.gauss@web.de>
    14. -
    15. @version     $Id: fsource_sparql__sparqlFilterFunctions.php.html 443 2007-06-01 16:25:38Z cax $
    16. -
    17. *
    18. -
    19. */
    20. -
    21.  
    22. -
    23.  
    24. -
    25.  
    26. -
    27.  
    28. -
    29. /**
    30. -
    31. * Evaluates the regex() function. Returns true if the regex is matched false if not.
    32. -
    33. *
    34. -
    35. @param String  $string   the string which has to be evaluated
    36. -
    37. @param String  $pattern  the regex pattern
    38. -
    39. @param String  $flags    additional flags like "i"
    40. -
    41. @return boolean 
    42. -
    43. */
    44. -
    45. function regex($string,$pattern,$flags ''){
    46. -
    47.     $string trim($string);
    48. -
    49.     $pattern trim($pattern);
    50. -
    51.     if(strpos($string,"str_")===0){
    52. -
    53.         $string substr($string,4);
    54. -
    55.         $pattern substr($pattern,4);
    56. -
    57.         $flags substr($flags,4);
    58. -
    59.     }else{
    60. -
    61.         return false;
    62. -
    63.     }
    64. -
    65.     if(preg_match('/'.$pattern.'/'.$flags,$string))
    66. -
    67.     return true;
    68. -
    69.     else
    70. -
    71.     return false;
    72. -
    73. }
    74. -
    75.  
    76. -
    77. /**
    78. -
    79. * Evaluates the dateTime() function.Tries to convert a date string into
    80. -
    81. * a unix timestamp.
    82. -
    83. *
    84. -
    85. @param  String $string the date string
    86. -
    87. @return integer        the corresponding unix timestamp
    88. -
    89. */
    90. -
    91. function dateTime($string){
    92. -
    93.     $string trim($string);
    94. -
    95.     if(strpos($string,"str_")===0)
    96. -
    97.     $string substr($string,4);
    98. -
    99.  
    100. -
    101.     $time strtotime($string);
    102. -
    103.     if($time == -1)
    104. -
    105.     return $string;
    106. -
    107.     else
    108. -
    109.     return $time;
    110. -
    111. }
    112. -
    113.  
    114. -
    115.  
    116. -
    117. /**
    118. -
    119. * Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    120. -
    121. *
    122. -
    123. @param String $lang_range the string.
    124. -
    125. @param String $lang_tag the regex pattern
    126. -
    127. @return boolean 
    128. -
    129. */
    130. -
    131. function langMatches($lang_range,$lang_tag){
    132. -
    133.  
    134. -
    135.     if($lang_range == null)
    136. -
    137.     return false;
    138. -
    139.  
    140. -
    141.     if(strpos($lang_range,"str_")===0)
    142. -
    143.     $lang_range substr($lang_range,4);
    144. -
    145.     if(strpos($lang_tag,"str_")===0)
    146. -
    147.     $lang_tag substr($lang_tag,4);
    148. -
    149.  
    150. -
    151.     if(strtolower($lang_range== strtolower($lang_tag))
    152. -
    153.     return true;
    154. -
    155.     $tags =  preg_match_all("/[^\-\s].[^\-\s]*/",$lang_range,$hits);
    156. -
    157.     if($tags){
    158. -
    159.         if($lang_tag == '*')
    160. -
    161.         return true;
    162. -
    163.         foreach($hits[0as $tag){
    164. -
    165.             if(strtolower($tag== strtolower($lang_tag))
    166. -
    167.             return true;
    168. -
    169.         }
    170. -
    171.         return false;
    172. -
    173.     }else{
    174. -
    175.         return false;
    176. -
    177.     }
    178. -
    179. }
    180. -
    181.  
    182. -
    183. /**
    184. -
    185. * Evaluates the str() function. Returns the string representation of a
    186. -
    187. * variable or RDF term.
    188. -
    189. *
    190. -
    191. @param  String $string the string
    192. -
    193. @return boolean 
    194. -
    195. */
    196. -
    197. function str($string){
    198. -
    199.     $str preg_match("/\".[^\"]*\"|\'.[^\']*\'/",$string,$hits);
    200. -
    201.     if($str != 0){
    202. -
    203.         return "str_".$hits[0];
    204. -
    205.     }else{
    206. -
    207.         if(strpos($string,"str_")===0){
    208. -
    209.             return $string;
    210. -
    211.         }else{
    212. -
    213.             if(strpos($string,"uri_")===0)
    214. -
    215.                 return "str_".substr($string,4);
    216. -
    217.             if(strpos($string,'<')==0)
    218. -
    219.                 return "str_".substr($string,1,-1);
    220. -
    221.         }
    222. -
    223.     }
    224. -
    225.     return false;
    226. -
    227. }
    228. -
    229.  
    230. -
    231. /**
    232. -
    233. * Evaluates the lang() function. Returns lang tag of a Literal.
    234. -
    235. *
    236. -
    237. @param  String $string the string.
    238. -
    239. @return String the lang tag or false if there is no language tag.
    240. -
    241. */
    242. -
    243. function lang($string){
    244. -
    245.     $str preg_match("/\".[^\"]*\"@(.[^\s]*)|\'.[^\']*\'@(.[^\s]*)/",$string,$hits);
    246. -
    247.     if($str){
    248. -
    249.         if($hits[1!= null)
    250. -
    251.         return $hits[1];
    252. -
    253.         else
    254. -
    255.         return $hits[2];
    256. -
    257.     }else{
    258. -
    259.         return false;
    260. -
    261.     }
    262. -
    263. }
    264. -
    265.  
    266. -
    267.  
    268. -
    269.  
    270. -
    271. ?>
    272. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:03 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlGraphPattern.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlGraphPattern.php.html deleted file mode 100755 index 19d3797c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlGraphPattern.php.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - File Source for GraphPattern.php - - - - - -

    Source for file GraphPattern.php

    -

    Documentation is available at GraphPattern.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // class: GraphPattern
    6. -
    7. // ---------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * A graph pattern which consists of triple patterns, optional
    14. -
    15. * or union graph patterns and filters.
    16. -
    17. *
    18. -
    19. @author   Tobias Gauss <tobias.gauss@web.de>
    20. -
    21. @version     $Id: fsource_sparql__sparqlGraphPattern.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class GraphPattern extends Object{
    32. -
    33.  
    34. -
    35.     /**
    36. -
    37.     * Graphname. 0 if its in the default graph.
    38. -
    39.     */
    40. -
    41.     protected $graphname;
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * @var array The TriplePattern.
    48. -
    49.     */
    50. -
    51.     protected $triplePattern;
    52. -
    53.  
    54. -
    55.     /**
    56. -
    57.     * @var array A List of Constraints.
    58. -
    59.     */
    60. -
    61.     protected $constraint = array();
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * @var int Pointer to optional patterns.
    68. -
    69.     */
    70. -
    71.     protected $optional;
    72. -
    73.  
    74. -
    75.     /**
    76. -
    77.     * @var int Pointer to union patterns.
    78. -
    79.     */
    80. -
    81.     protected $union;
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * @var boolean TRUE if the pattern is open- FALSE if closed.
    88. -
    89.     */
    90. -
    91.     public $open;
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * @var boolean TRUE if the GraphPattern is a construct pattern.
    98. -
    99.     */
    100. -
    101.     public $isConstructPattern;
    102. -
    103.  
    104. -
    105.  
    106. -
    107.     /**
    108. -
    109.     * @var int The GraphPatterns id.
    110. -
    111.     */
    112. -
    113.     public $patternId;
    114. -
    115.  
    116. -
    117.  
    118. -
    119.     /**
    120. -
    121.     * Constructor
    122. -
    123.     */
    124. -
    125.     public function GraphPattern(){
    126. -
    127.         $this->open               = true ;
    128. -
    129.         $this->isConstructPattern = false;
    130. -
    131.         $this->constraint         = false;
    132. -
    133.         $this->triplePattern      = false;
    134. -
    135.     }
    136. -
    137.  
    138. -
    139.     /**
    140. -
    141.     * Returns the graphname.
    142. -
    143.     *
    144. -
    145.     * @return String 
    146. -
    147.     */
    148. -
    149.     public function getGraphname(){
    150. -
    151.         return $this->graphname;
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     /**
    158. -
    159.     * Returns the triple pattern of the graph pattern.
    160. -
    161.     *
    162. -
    163.     * @return Array 
    164. -
    165.     */
    166. -
    167.     public function getTriplePattern(){
    168. -
    169.         return $this->triplePattern;
    170. -
    171.     }
    172. -
    173.  
    174. -
    175.     /**
    176. -
    177.     * Returns a constraint if there is one false if not.
    178. -
    179.     *
    180. -
    181.     * @return Constraint 
    182. -
    183.     */
    184. -
    185.     public function getConstraint(){
    186. -
    187.         return $this->constraint;
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     /**
    194. -
    195.     * Returns a pointer to an optional graph pattern.
    196. -
    197.     *
    198. -
    199.     * @return integer 
    200. -
    201.     */
    202. -
    203.     public function getOptional(){
    204. -
    205.         return $this->optional;
    206. -
    207.     }
    208. -
    209.  
    210. -
    211.     /**
    212. -
    213.     * Returns a pointer to a union graph pattern.
    214. -
    215.     *
    216. -
    217.     * @return integer 
    218. -
    219.     */
    220. -
    221.     public function getUnion(){
    222. -
    223.         return $this->union;
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     /**
    230. -
    231.     * Sets the graphname.
    232. -
    233.     *
    234. -
    235.     * @param  String $name 
    236. -
    237.     * @return void 
    238. -
    239.     */
    240. -
    241.     public function setGraphname($name){
    242. -
    243.         $this->graphname = $name;
    244. -
    245.     }
    246. -
    247.     /**
    248. -
    249.     * Adds a List of QueryTriples to the GraphPattern.
    250. -
    251.     *
    252. -
    253.     * @param  array $trpP 
    254. -
    255.     * @return void 
    256. -
    257.     */
    258. -
    259.     public function addTriplePattern($trpP){
    260. -
    261.         $this->triplePattern = $trpP;
    262. -
    263.     }
    264. -
    265.  
    266. -
    267.     /**
    268. -
    269.     * Adds a Constraint to the GraphPattern.
    270. -
    271.     *
    272. -
    273.     * @param  Constraint $cons 
    274. -
    275.     * @return void 
    276. -
    277.     */
    278. -
    279.     public function addConstraint(&$cons){
    280. -
    281.         $this->constraint[$cons;
    282. -
    283.     }
    284. -
    285.     /**
    286. -
    287.     * Adds a pointer to an optional graphPattern.
    288. -
    289.     *
    290. -
    291.     * @param  integer $pattern 
    292. -
    293.     * @return void 
    294. -
    295.     */
    296. -
    297.     public function addOptional($pattern){
    298. -
    299.         $this->optional = &$pattern;
    300. -
    301.     }
    302. -
    303.  
    304. -
    305.     /**
    306. -
    307.     * Adds a pointer to a union graphPattern.
    308. -
    309.     *
    310. -
    311.     * @param  integer $pattern 
    312. -
    313.     * @return void 
    314. -
    315.     */
    316. -
    317.     public function addUnion($pattern){
    318. -
    319.         $this->union = &$pattern;
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.  
    326. -
    327.     /**
    328. -
    329.     * Sets the GraphPatterns Id.
    330. -
    331.     *
    332. -
    333.     * @param  integer $id 
    334. -
    335.     * @return void 
    336. -
    337.     */
    338. -
    339.     public function setId($id){
    340. -
    341.         $this->patternId = $id;
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Returns the GraphPatterns id.
    350. -
    351.     *
    352. -
    353.     * @return integer 
    354. -
    355.     */
    356. -
    357.     public function getId(){
    358. -
    359.         return $this->patternId;
    360. -
    361.     }
    362. -
    363.  
    364. -
    365.  
    366. -
    367.  
    368. -
    369.     /**
    370. -
    371.     *   Returns an array of all variables used in this
    372. -
    373.     *   graph pattern.
    374. -
    375.     *   All variables are listed only once (unique).
    376. -
    377.     *
    378. -
    379.     *   @return array   Array of variable names
    380. -
    381.     */
    382. -
    383.     public function getVariables()
    384. -
    385.     {
    386. -
    387.         $arVars array();
    388. -
    389.  
    390. -
    391.         foreach ($this->triplePattern as $pattern{
    392. -
    393.             $arVars array_merge($arVars$pattern->getVariables());
    394. -
    395.         }
    396. -
    397.  
    398. -
    399.         return array_unique($arVars);
    400. -
    401.     }//public function getVariables()
    402. -
    403.  
    404. -
    405. }// end class: GraphPattern.php
    406. -
    407. ?>
    408. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQuery.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQuery.php.html deleted file mode 100755 index 1e108eee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQuery.php.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - File Source for Query.php - - - - - -

    Source for file Query.php

    -

    Documentation is available at Query.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/GraphPattern.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. * The Class Query represents a SPARQL query.
    10. -
    11. *
    12. -
    13. *
    14. -
    15. @author   Tobias Gauss <tobias.gauss@web.de>
    16. -
    17. @version     $Id: fsource_sparql__sparqlQuery.php.html 443 2007-06-01 16:25:38Z cax $
    18. -
    19. *
    20. -
    21. @package sparql
    22. -
    23. */
    24. -
    25. class Query extends Object
    26. -
    27. {
    28. -
    29.     /**
    30. -
    31.     * The BASE part of the SPARQL query.
    32. -
    33.     * @var string 
    34. -
    35.     */
    36. -
    37.     protected $base;
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Array that contains used prefixes and namespaces.
    44. -
    45.     * Key is the prefix, value the namespace.
    46. -
    47.     *
    48. -
    49.     * @example
    50. -
    51.     *  array(8) {
    52. -
    53.     *   ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    54. -
    55.     *   ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#"
    56. -
    57.     *  }
    58. -
    59.     *
    60. -
    61.     * @var array 
    62. -
    63.     */
    64. -
    65.     public $prefixes = array();
    66. -
    67.  
    68. -
    69.     /**
    70. -
    71.     * Array of result variables that shall be returned.
    72. -
    73.     * E.g. "?name", "?mbox"
    74. -
    75.     *
    76. -
    77.     * @var array 
    78. -
    79.     */
    80. -
    81.     protected $resultVars = array();
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * What form/type of result should be returned.
    88. -
    89.     *
    90. -
    91.     * One of:
    92. -
    93.     * - "ask"
    94. -
    95.     * - "count"
    96. -
    97.     * - "construct"
    98. -
    99.     * - "describe"
    100. -
    101.     * - "select"
    102. -
    103.     * - "select distinct"
    104. -
    105.     *
    106. -
    107.     * @var string 
    108. -
    109.     * @see http://www.w3.org/TR/rdf-sparql-query/#QueryForms
    110. -
    111.     */
    112. -
    113.     protected $resultForm;
    114. -
    115.  
    116. -
    117.     /**
    118. -
    119.     * Contains the result part of the SPARQL query.
    120. -
    121.     * Array of GraphPattern
    122. -
    123.     *
    124. -
    125.     * @var array 
    126. -
    127.     */
    128. -
    129.     protected $resultPart;
    130. -
    131.  
    132. -
    133.     /**
    134. -
    135.     *  Contains the FROM part of the SPARQL query.
    136. -
    137.     * @var array 
    138. -
    139.     */
    140. -
    141.     protected $fromPart = array();
    142. -
    143.  
    144. -
    145.     /**
    146. -
    147.     * Contains the FROM NAMED part of the SPARQL query.
    148. -
    149.     * @var array 
    150. -
    151.     */
    152. -
    153.     protected $fromNamedPart = array();
    154. -
    155.  
    156. -
    157.     /**
    158. -
    159.     * Optional solution modifier of the query.
    160. -
    161.     * Array with three keys:
    162. -
    163.     *  "order by", "limit", "offset"
    164. -
    165.     * If they are not set, their value is null
    166. -
    167.     *
    168. -
    169.     * "order by" can be an array with subarrays, each of those
    170. -
    171.     *  subarrays having two keys: "val" and "type".
    172. -
    173.     *  "val" determines the variable ("?mbox"), "type" is
    174. -
    175.     *  "asc" or "desc"
    176. -
    177.     *
    178. -
    179.     * @var array 
    180. -
    181.     */
    182. -
    183.     protected $solutionModifier = array();
    184. -
    185.  
    186. -
    187.     /**
    188. -
    189.     *  Blanknode counter.
    190. -
    191.     * How many blank nodes are in $resultPart
    192. -
    193.     *
    194. -
    195.     * @var int 
    196. -
    197.     */
    198. -
    199.     protected $bnodeCounter;
    200. -
    201.  
    202. -
    203.     /**
    204. -
    205.     * GraphPattern counter.
    206. -
    207.     * How many GraphPattern are in $resultPart
    208. -
    209.     *
    210. -
    211.     * @var int 
    212. -
    213.     */
    214. -
    215.     public $graphPatternCounter;
    216. -
    217.  
    218. -
    219.     /**
    220. -
    221.     * List of all vars used in the query.
    222. -
    223.     * Key is the variable (e.g. "?x"), value
    224. -
    225.     * is boolean true
    226. -
    227.     *
    228. -
    229.     * @var array 
    230. -
    231.     */
    232. -
    233.     public $usedVars;
    234. -
    235.  
    236. -
    237.     /**
    238. -
    239.     * If the query type is CONSTRUCT this variable contains the
    240. -
    241.     * CONSTRUCT graph pattern.
    242. -
    243.     */
    244. -
    245.     protected $constructPattern;
    246. -
    247.  
    248. -
    249.     /**
    250. -
    251.     * TRUE if the query is empty FALSE if not.
    252. -
    253.     *
    254. -
    255.     * @var boolean 
    256. -
    257.     */
    258. -
    259.     public $isEmpty;
    260. -
    261.  
    262. -
    263.     /**
    264. -
    265.     *   Language of variables. NULL if the variable has no
    266. -
    267.     *   language tag (e.g. @en) set.
    268. -
    269.     *   $varname => $language tag
    270. -
    271.     *   @var array 
    272. -
    273.     */
    274. -
    275.     public $varLanguages = array();
    276. -
    277.  
    278. -
    279.     /**
    280. -
    281.     *   Datatype of variables. NULL if the variable has no
    282. -
    283.     *   data type (e.g. ^^xsd::integer) set.
    284. -
    285.     *   $varname => $datatype
    286. -
    287.     *   @var array 
    288. -
    289.     */
    290. -
    291.     public $varDatatypes = array();
    292. -
    293.  
    294. -
    295.  
    296. -
    297.  
    298. -
    299.     /**
    300. -
    301.     * Constructor
    302. -
    303.     */
    304. -
    305.     public function Query(){
    306. -
    307.         $this->resultForm = false;
    308. -
    309.         $this->solutionModifier['order by'null;
    310. -
    311.         $this->solutionModifier['limit']    null;
    312. -
    313.         $this->solutionModifier['offset']   null;
    314. -
    315.         $this->bnodeCounter = 0;
    316. -
    317.         $this->graphPatternCounter = 0;
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     /**
    326. -
    327.     * Returns the BASE part of the query.
    328. -
    329.     *
    330. -
    331.     * @return String 
    332. -
    333.     */
    334. -
    335.     public function getBase(){
    336. -
    337.         return $this->base;
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.     /**
    344. -
    345.     * Returns the prefix map of the query.
    346. -
    347.     *
    348. -
    349.     * @return Array 
    350. -
    351.     */
    352. -
    353.     public function getPrefixes(){
    354. -
    355.         return $this->prefixes;
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     /**
    362. -
    363.     * Returns a list containing the result vars.
    364. -
    365.     *
    366. -
    367.     * @return Array 
    368. -
    369.     */
    370. -
    371.     public function getResultVars(){
    372. -
    373.         return $this->resultVars;
    374. -
    375.     }
    376. -
    377.  
    378. -
    379.     /**
    380. -
    381.     * Returns the type the result shall have.
    382. -
    383.     * E.g. "select", "select distinct", "ask", ...
    384. -
    385.     *
    386. -
    387.     * @see $resultForm
    388. -
    389.     *
    390. -
    391.     * @return string 
    392. -
    393.     */
    394. -
    395.     public function getResultForm(){
    396. -
    397.         return $this->resultForm;
    398. -
    399.     }
    400. -
    401.  
    402. -
    403.     /**
    404. -
    405.     * Returns a list containing the graph patterns of the query.
    406. -
    407.     *
    408. -
    409.     * @return Array 
    410. -
    411.     */
    412. -
    413.     public function getResultPart(){
    414. -
    415.         return $this->resultPart;
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     /**
    422. -
    423.     * Returns the FROM clause of the query.
    424. -
    425.     *
    426. -
    427.     * @return String 
    428. -
    429.     */
    430. -
    431.     public function getFromPart(){
    432. -
    433.         return $this->fromPart;
    434. -
    435.     }
    436. -
    437.  
    438. -
    439.     /**
    440. -
    441.     * Returns the FROM NAMED clause of the query.
    442. -
    443.     *
    444. -
    445.     * @return Array 
    446. -
    447.     */
    448. -
    449.     public function getFromNamedPart(){
    450. -
    451.         return $this->fromNamedPart;
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     /**
    458. -
    459.     * Returns $isEmpty variable
    460. -
    461.     * @return boolean 
    462. -
    463.     */
    464. -
    465.     public function isEmpty({
    466. -
    467.         return $this->isEmpty;
    468. -
    469.     }
    470. -
    471.  
    472. -
    473.     /**
    474. -
    475.     * Returns an unused Bnode label.
    476. -
    477.     *
    478. -
    479.     * @return String 
    480. -
    481.     */
    482. -
    483.     public function getBlanknodeLabel(){
    484. -
    485.         return "_:bN".$this->bnodeCounter++;
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.  
    492. -
    493.     /**
    494. -
    495.     * Sets the base part.
    496. -
    497.     *
    498. -
    499.     * @param String $base 
    500. -
    501.     * @return void 
    502. -
    503.     */
    504. -
    505.     public function setBase($base){
    506. -
    507.         $this->base = $base;
    508. -
    509.     }
    510. -
    511.  
    512. -
    513.  
    514. -
    515.     /**
    516. -
    517.     * Adds a prefix to the list of prefixes.
    518. -
    519.     *
    520. -
    521.     * @param  String $prefix 
    522. -
    523.     * @param  String $label 
    524. -
    525.     * @return void 
    526. -
    527.     */
    528. -
    529.     public function addPrefix($prefix$label){
    530. -
    531.         $this->prefixes[$prefix]$label;
    532. -
    533.     }
    534. -
    535.  
    536. -
    537.     /**
    538. -
    539.     * Adds a variable to the list of result variables.
    540. -
    541.     *
    542. -
    543.     * @param  String $var 
    544. -
    545.     * @return void 
    546. -
    547.     */
    548. -
    549.     public function addVariable($var){
    550. -
    551.         $this->resultVars[]$var;
    552. -
    553.         $this->varLanguages[$varself::getLanguageTag($var);
    554. -
    555.         $this->varDatatypes[$var$this->getDatatype($var);
    556. -
    557.     }
    558. -
    559.  
    560. -
    561.  
    562. -
    563.     /**
    564. -
    565.     * Sets the result form.
    566. -
    567.     *
    568. -
    569.     * @param  String $form 
    570. -
    571.     * @return void 
    572. -
    573.     */
    574. -
    575.     public function setResultForm($form){
    576. -
    577.         $this->resultForm = strtolower($form);
    578. -
    579.     }
    580. -
    581.  
    582. -
    583.     /**
    584. -
    585.     * Adds a graph pattern to the result part.
    586. -
    587.     *
    588. -
    589.     * @param  GraphPattern $pattern 
    590. -
    591.     * @return void 
    592. -
    593.     */
    594. -
    595.     public function addGraphPattern($pattern){
    596. -
    597.         $pattern->setId($this->graphPatternCounter);
    598. -
    599.         $this->resultPart[$pattern;
    600. -
    601.         $this->graphPatternCounter++;
    602. -
    603.     }
    604. -
    605.  
    606. -
    607.     /**
    608. -
    609.     * Adds a construct graph pattern to the query.
    610. -
    611.     *
    612. -
    613.     * @param  GraphPattern $pattern 
    614. -
    615.     * @return void 
    616. -
    617.     */
    618. -
    619.     public function addConstructGraphPattern($pattern){
    620. -
    621.         $this->constructPattern = $pattern;
    622. -
    623.     }
    624. -
    625.  
    626. -
    627.  
    628. -
    629.     /**
    630. -
    631.     * Adds a graphuri to the from part.
    632. -
    633.     *
    634. -
    635.     * @param  String $graphURI 
    636. -
    637.     * @return void 
    638. -
    639.     */
    640. -
    641.     public function addFrom($graphURI){
    642. -
    643.         $this->fromPart = $graphURI;
    644. -
    645.     }
    646. -
    647.  
    648. -
    649.     /**
    650. -
    651.     * Adds a graphuri to the from named part.
    652. -
    653.     *
    654. -
    655.     * @param  String $graphURI 
    656. -
    657.     * @return void 
    658. -
    659.     */
    660. -
    661.     public function addFromNamed($graphURI){
    662. -
    663.         $this->fromNamedPart[$graphURI;
    664. -
    665.     }
    666. -
    667.  
    668. -
    669.     /**
    670. -
    671.     * Sets a solution modifier.
    672. -
    673.     *
    674. -
    675.     * @param  String $name 
    676. -
    677.     * @param  Value  $value 
    678. -
    679.     * @return void 
    680. -
    681.     */
    682. -
    683.     public function setSolutionModifier($name$value){
    684. -
    685.         $this->solutionModifier[$name$value;
    686. -
    687.     }
    688. -
    689.  
    690. -
    691.  
    692. -
    693.     /**
    694. -
    695.     * Generates a new GraphPattern. If it is a CONSTRUCT graph pattern
    696. -
    697.     * $constr has to set to TRUE, FALSE if not.
    698. -
    699.     *
    700. -
    701.     * @param  boolean $constr 
    702. -
    703.     * @return GraphPattern 
    704. -
    705.     */
    706. -
    707.     public function getNewPattern($constr false){
    708. -
    709.         $pattern new GraphPattern();
    710. -
    711.         if ($constr{
    712. -
    713.             $this->addConstructGraphPattern($pattern);
    714. -
    715.         else {
    716. -
    717.             $this->addGraphPattern($pattern);
    718. -
    719.         }
    720. -
    721.         return $pattern;
    722. -
    723.     }
    724. -
    725.  
    726. -
    727.     /**
    728. -
    729.     * Adds a new variable to the variable list.
    730. -
    731.     *
    732. -
    733.     * @param  String $var 
    734. -
    735.     * @return void 
    736. -
    737.     */
    738. -
    739.     public function addVar($var){
    740. -
    741.         $this->usedVars[$var]=true;
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     /**
    748. -
    749.     * Returns a list with all used variables.
    750. -
    751.     *
    752. -
    753.     * @return Array 
    754. -
    755.     */
    756. -
    757.     public function getAllVars(){
    758. -
    759.         return array_keys($this->usedVars);
    760. -
    761.     }
    762. -
    763.  
    764. -
    765.     /**
    766. -
    767.     * Gets the solution modifiers of the query.
    768. -
    769.     * $solutionModifier['order by'] = value
    770. -
    771.     *                  ['limit']    = vlaue
    772. -
    773.     *                  ['offset']   = value
    774. -
    775.     *
    776. -
    777.     *
    778. -
    779.     * @return Array 
    780. -
    781.     */
    782. -
    783.     public function getSolutionModifier(){
    784. -
    785.         return $this->solutionModifier;
    786. -
    787.     }
    788. -
    789.  
    790. -
    791.  
    792. -
    793.     /**
    794. -
    795.     * Returns the construvtGraphPattern of the query if there is one.
    796. -
    797.     *
    798. -
    799.     * @return GraphPattern 
    800. -
    801.     */
    802. -
    803.     public function getConstructPattern(){
    804. -
    805.         return $this->constructPattern;
    806. -
    807.     }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.  
    814. -
    815.     /**
    816. -
    817.     *   Returns a list of variables used in the construct patterns.
    818. -
    819.     *
    820. -
    821.     *   @return array Array of variable names, unique.
    822. -
    823.     */
    824. -
    825.     public function getConstructPatternVariables()
    826. -
    827.     {
    828. -
    829.         $arVars array();
    830. -
    831. /*
    832. -
    833.         if (count($this->resultPart) > 0) {
    834. -
    835.             foreach ($this->resultPart as $pattern) {
    836. -
    837.                 $arVars = array_merge($arVars, $pattern->getVariables());
    838. -
    839.             }
    840. -
    841.         }
    842. -
    843. */
    844. -
    845.         if ($this->constructPattern{
    846. -
    847.             $arVars array_merge($arVars$this->constructPattern->getVariables());
    848. -
    849.         }
    850. -
    851.  
    852. -
    853.         return array_unique($arVars);
    854. -
    855.     }//public function getConstructPatternVariables()
    856. -
    857.  
    858. -
    859.  
    860. -
    861.  
    862. -
    863.     /**
    864. -
    865.     *   Returns the language of a variable if the tag is set (e.g. @en)
    866. -
    867.     *   Returns NULL if no language is set.
    868. -
    869.     *
    870. -
    871.     *   @param string Sparql variable name
    872. -
    873.     *   @return mixed NULL or language tag
    874. -
    875.     */
    876. -
    877.     public static function getLanguageTag($var)
    878. -
    879.     {
    880. -
    881.         $nAt strpos($var'@');
    882. -
    883.         if ($nAt === false{
    884. -
    885.             return null;
    886. -
    887.         }
    888. -
    889.         //in case @ and ^^ are combined
    890. -
    891.         $nHatHat strpos($var'^^'$nAt 1);
    892. -
    893.         if ($nHatHat === false{
    894. -
    895.             $tag substr($var$nAt 1);
    896. -
    897.         else {
    898. -
    899.             $tag substr($var$nAt 1$nHatHat $nAt 1);
    900. -
    901.         }
    902. -
    903.         return $tag;
    904. -
    905.     }//public static function getLanguageTag($var)
    906. -
    907.  
    908. -
    909.  
    910. -
    911.  
    912. -
    913.     /**
    914. -
    915.     *   Returns the datatype of a variable if it is set.
    916. -
    917.     *
    918. -
    919.     *   @param string Sparql variable name
    920. -
    921.     *   @return mixed NULL or datatype
    922. -
    923.     */
    924. -
    925.     public function getDatatype($var)
    926. -
    927.     {
    928. -
    929.         $nHatHat strpos($var'^^');
    930. -
    931.         if ($nHatHat === false{
    932. -
    933.             return null;
    934. -
    935.         }
    936. -
    937.         $nAt strpos($var'@'$nHatHat 2);
    938. -
    939.         if ($nAt === false{
    940. -
    941.             $type substr($var$nHatHat 2);
    942. -
    943.         else {
    944. -
    945.             $type substr($var$nHatHat 2$nAt $nHatHat 2);
    946. -
    947.         }
    948. -
    949.  
    950. -
    951.         $fullUri $this->getFullUri($type);
    952. -
    953.         if ($fullUri === false{
    954. -
    955.             $fullUri $type;
    956. -
    957.             if ($fullUri[0== '<' && substr($fullUri-1== '>'{
    958. -
    959.                 $fullUri substr($fullUri1-1);
    960. -
    961.             }
    962. -
    963.         }
    964. -
    965.  
    966. -
    967.         return $fullUri;
    968. -
    969.     }//public function getDatatype($var)
    970. -
    971.  
    972. -
    973.  
    974. -
    975.  
    976. -
    977.     /**
    978. -
    979.     * Gets the full URI of a qname token.
    980. -
    981.     *
    982. -
    983.     * @param  string $token 
    984. -
    985.     * @return string The complete URI of a given token, false if $token is not
    986. -
    987.     *                 a qname or the prefix is not defined
    988. -
    989.     */
    990. -
    991.     public function getFullUri($token)
    992. -
    993.     {
    994. -
    995.         $pattern="/^([^:]*):([^:]*)$/";
    996. -
    997.         if (preg_match($pattern$token$hits0{
    998. -
    999.  
    1000. -
    1001.             if (isset($this->prefixes{$hits{1}})) {
    1002. -
    1003.                 return substr($this->base1-1)
    1004. -
    1005.                      . $this->prefixes{$hits{1}}
    1006. -
    1007.                      . $hits{2};
    1008. -
    1009.             }
    1010. -
    1011.             if ($hits{1}=='_'{
    1012. -
    1013.                 return "_".$hits{2};
    1014. -
    1015.             }
    1016. -
    1017.         }
    1018. -
    1019.  
    1020. -
    1021.         return false;
    1022. -
    1023.     }
    1024. -
    1025.  
    1026. -
    1027. }
    1028. -
    1029. // end class: Query.php
    1030. -
    1031.  
    1032. -
    1033. ?>
    1034. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:27 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQueryTriple.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQueryTriple.php.html deleted file mode 100755 index cdd77d14..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlQueryTriple.php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - File Source for QueryTriple.php - - - - - -

    Source for file QueryTriple.php

    -

    Documentation is available at QueryTriple.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // Class: QueryTriple
    6. -
    7. // ---------------------------------------------
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGenerator.php';
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Represents a query triple.
    16. -
    17. *
    18. -
    19. @author   Tobias Gauss <tobias.gauss@web.de>
    20. -
    21. @version    $Id: fsource_sparql__sparqlQueryTriple.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29. Class QueryTriple extends Object{
    30. -
    31.  
    32. -
    33.     /**
    34. -
    35.     * The QueryTriples Subject.
    36. -
    37.     */
    38. -
    39.     protected $subject;
    40. -
    41.  
    42. -
    43.     /**
    44. -
    45.     * The QueryTriples Predicate.
    46. -
    47.     */
    48. -
    49.     protected $predicate;
    50. -
    51.  
    52. -
    53.     /**
    54. -
    55.     * The QueryTriples Object.
    56. -
    57.     */
    58. -
    59.     protected $object;
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     * Constructor
    68. -
    69.     */
    70. -
    71.     public function QueryTriple($sub,$pred,$ob)
    72. -
    73.     {
    74. -
    75.         $this->subject   = $sub;
    76. -
    77.         $this->predicate = $pred;
    78. -
    79.         $this->object    = $ob;
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     /**
    86. -
    87.     * Returns the Triples Subject.
    88. -
    89.     *
    90. -
    91.     * @return Node 
    92. -
    93.     */
    94. -
    95.     public function getSubject()
    96. -
    97.     {
    98. -
    99.         return $this->subject;
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     /**
    106. -
    107.     * Returns the Triples Predicate.
    108. -
    109.     *
    110. -
    111.     * @return Node 
    112. -
    113.     */
    114. -
    115.     public function getPredicate()
    116. -
    117.     {
    118. -
    119.         return $this->predicate;
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.     /**
    126. -
    127.     * Returns the Triples Object.
    128. -
    129.     *
    130. -
    131.     * @return Node 
    132. -
    133.     */
    134. -
    135.     public function getObject()
    136. -
    137.     {
    138. -
    139.         return $this->object;
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.  
    146. -
    147.  
    148. -
    149.     /**
    150. -
    151.     *   Returns an array of all variables in this triple.
    152. -
    153.     *
    154. -
    155.     *   @return array   Array of variable names
    156. -
    157.     */
    158. -
    159.     public function getVariables()
    160. -
    161.     {
    162. -
    163.         $arVars array();
    164. -
    165.  
    166. -
    167.         foreach (array('subject''predicate''object'as $strVar{
    168. -
    169.             if (SparqlEngineDb_SqlGenerator::isVariable($this->$strVar)) {
    170. -
    171.                 $arVars[$this->$strVar;
    172. -
    173.             }
    174. -
    175.         }
    176. -
    177.  
    178. -
    179.         return $arVars;
    180. -
    181.     }
    182. -
    183.  
    184. -
    185. }
    186. -
    187.  
    188. -
    189. // end class: QueryTriple.php
    190. -
    191. ?>
    192. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlClient.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlClient.php.html deleted file mode 100755 index 4ed0d968..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlClient.php.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - File Source for SparqlClient.php - - - - - -

    Source for file SparqlClient.php

    -

    Documentation is available at SparqlClient.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: SparqlEngine
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Client for querying a sparql server.
    16. -
    17. *
    18. -
    19. @version  $Id: fsource_sparql__sparqlSparqlClient.php.html 443 2007-06-01 16:25:38Z cax $
    20. -
    21. @author   Tobias Gauß <tobias.gauss@web.de>
    22. -
    23. *
    24. -
    25. @package sparql
    26. -
    27. */
    28. -
    29.  
    30. -
    31. class SparqlClient extends Object {
    32. -
    33.  
    34. -
    35.     var $server;
    36. -
    37.     var $output;    
    38. -
    39.  
    40. -
    41.     /**
    42. -
    43.     * Constructor of SparlClient.
    44. -
    45.     *
    46. -
    47.     * @param String  $server   server address.
    48. -
    49.     */
    50. -
    51.     function SparqlClient($server){
    52. -
    53.         $this->server = $server;
    54. -
    55.         $this->output = "array";
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     * Sets the output format for a SELECT or ASK query. Possible formats are "xml" for
    66. -
    67.     * Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array
    68. -
    69.     * for the format described in our SparqlEngine.
    70. -
    71.     *
    72. -
    73.     * @param String  $format   the format.
    74. -
    75.     */
    76. -
    77.     function setOutputFormat($format){
    78. -
    79.         if(strtolower($format)=="xml")
    80. -
    81.         $this->output = "xml";
    82. -
    83.         if(strtolower($format)=="array")
    84. -
    85.         $this->output = "array";
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     /**
    94. -
    95.     * Main function of SparqlClient.
    96. -
    97.     *
    98. -
    99.     * @param ClientQuery  $query   the ClientQuery object.
    100. -
    101.     * @return mixed returns an array that contains the variables an their bindings or a MemModel
    102. -
    103.     *
    104. -
    105.     */
    106. -
    107.     function query($query){
    108. -
    109.         if(!is_a($query,"ClientQuery"))
    110. -
    111.         die;//ErrorHandling
    112. -
    113.  
    114. -
    115.         $url    $this->_buildurl($query);
    116. -
    117.         $result $this->_http_get($url);
    118. -
    119.         return $this->returnResult($result);
    120. -
    121.  
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * Helper function that builds the url.
    132. -
    133.     *
    134. -
    135.     * @param ClientQuery  $query   the ClientQuery Object.
    136. -
    137.     */
    138. -
    139.  
    140. -
    141.     function _buildurl($query){
    142. -
    143.         $url "";
    144. -
    145.         $url $this->server."?query=".urlencode($query->query);
    146. -
    147.         foreach($query->default as $defaultg){
    148. -
    149.             $url $url."&default-graph-uri=".$defaultg;
    150. -
    151.         }
    152. -
    153.         foreach($query->named as $namedg){
    154. -
    155.             $url $url."&named-graph-uri=".$namedg;
    156. -
    157.         }
    158. -
    159.  
    160. -
    161.         return $url;
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     /**
    170. -
    171.     * Returns the query result.
    172. -
    173.     *
    174. -
    175.     * @param String  $result  the result.
    176. -
    177.     * @return mixed 
    178. -
    179.     */
    180. -
    181.     function returnResult($result){
    182. -
    183.  
    184. -
    185.         if(strpos($result,"<rdf:RDF")){
    186. -
    187.             include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    188. -
    189.             $parser new RdfParser();
    190. -
    191.             return $parser->generateModel(substr($result,strpos($result,"<rdf:RDF")));
    192. -
    193.         }
    194. -
    195.  
    196. -
    197.         if($this->output == "xml"){
    198. -
    199.             $pos strpos($result,"<?xml");
    200. -
    201.             return substr($result,$pos);
    202. -
    203.         }
    204. -
    205.         if($this->output == "array"){
    206. -
    207.             //    $pos = strpos($buffer,"<?xml");
    208. -
    209.             return $this->parseResult($result);
    210. -
    211.         }
    212. -
    213.         return $result;
    214. -
    215.     }
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     function parseResult($buffer){
    222. -
    223.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_SPARQLRES);
    224. -
    225.         $parser new SparqlResultParser();
    226. -
    227.         return $parser->parse($buffer);
    228. -
    229.     }
    230. -
    231.  
    232. -
    233.  
    234. -
    235.     /**
    236. -
    237.     * Executes the GET Request.
    238. -
    239.     *
    240. -
    241.     * @param String  $url  the url.
    242. -
    243.     * @return String result.
    244. -
    245.     */
    246. -
    247.     function _http_get($url)
    248. -
    249.     {
    250. -
    251.         $url parse_url($url);
    252. -
    253.         $port = isset($url['port']$url['port'80;
    254. -
    255.  
    256. -
    257.         $fp fsockopen($url['host']$port);
    258. -
    259.  
    260. -
    261.         $replace $url['path'];
    262. -
    263.  
    264. -
    265.         fputs($fp"GET ".$replace."?".$url['query']." HTTP/1.0\n");
    266. -
    267.         fputs($fp"Host:"$url['host']." \r\n");
    268. -
    269.         fputs($fp"Accept: application/sparql-results+xml, application/rdf+xml\r\n");
    270. -
    271.         fputs($fp"Connection: close\n\n");
    272. -
    273.  
    274. -
    275.         $buffer "";
    276. -
    277.         while ($tmp fread($fp1024))
    278. -
    279.         {
    280. -
    281.             $buffer .= $tmp;
    282. -
    283.         }
    284. -
    285.  
    286. -
    287.         $pos1 strpos($buffer,"\r\n\r\n");
    288. -
    289.         $pos2 strpos($buffer,"\n\n");
    290. -
    291.         if ($pos1 === false{
    292. -
    293.             $pos $pos2;
    294. -
    295.         else {
    296. -
    297.             $pos $pos1;
    298. -
    299.         }
    300. -
    301.             
    302. -
    303.         return substr($buffer,$pos);
    304. -
    305.  
    306. -
    307.     }
    308. -
    309. }
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  
    316. -
    317. ?>
    318. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:59 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngine.php.html deleted file mode 100755 index 6d10ecca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngine.php.html +++ /dev/null @@ -1,1189 +0,0 @@ - - - - - - File Source for SparqlEngine.php - - - - - -

    Source for file SparqlEngine.php

    -

    Documentation is available at SparqlEngine.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/FilterFunctions.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/ResultConverter.php';
    8. -
    9.  
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13. // Class: SparqlEngine
    14. -
    15. // ----------------------------------------------------------------------------------
    16. -
    17.  
    18. -
    19. /**
    20. -
    21. * This engine executes SPARQL queries against an RDF Datatset.
    22. -
    23. *
    24. -
    25. @version  $Id: fsource_sparql__sparqlSparqlEngine.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27. @author   Tobias Gauß <tobias.gauss@web.de>
    28. -
    29. *
    30. -
    31. @package sparql
    32. -
    33. */
    34. -
    35.  
    36. -
    37. Class SparqlEngine extends Object{
    38. -
    39.  
    40. -
    41.  
    42. -
    43.     /**
    44. -
    45.     *   The query object.
    46. -
    47.     *   @var Query 
    48. -
    49.     */
    50. -
    51.     protected $query;
    52. -
    53.  
    54. -
    55.     /**
    56. -
    57.     *   The RDF Dataset.
    58. -
    59.     *   @var Dataset 
    60. -
    61.     */
    62. -
    63.     protected $dataset;
    64. -
    65.  
    66. -
    67.  
    68. -
    69.  
    70. -
    71.     /**
    72. -
    73.     * Use SparqlEngine::factory() instead of this
    74. -
    75.     * constructor.
    76. -
    77.     */
    78. -
    79.     protected function __construct()
    80. -
    81.     {
    82. -
    83.         //protected to prevent direct instantiation
    84. -
    85.     }
    86. -
    87.  
    88. -
    89.  
    90. -
    91.     /**
    92. -
    93.     * Creates a new instance of the SparqlEngine, depending on the
    94. -
    95.     * given model. For example, if you pass a DbModel, you will
    96. -
    97.     * get a SparqlEngine specialized on databases.
    98. -
    99.     *
    100. -
    101.     * @param Model $model   RDF model that uses the engine
    102. -
    103.     */
    104. -
    105.     public function factory($model null)
    106. -
    107.     {
    108. -
    109.         if ($model !== null && $model instanceof DbModel{
    110. -
    111.             require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb.php';
    112. -
    113.             return new SparqlEngineDb($model);
    114. -
    115.         else {
    116. -
    117.             return new SparqlEngine();
    118. -
    119.         }
    120. -
    121.     }
    122. -
    123.  
    124. -
    125.  
    126. -
    127.  
    128. -
    129.     /**
    130. -
    131.     * The query engine's main method.
    132. -
    133.     *
    134. -
    135.     * @param  Dataset       $dataset    the RDF Dataset
    136. -
    137.     * @param  mixed         $query      the parsed SPARQL query
    138. -
    139.     * @param  String        $resultform the result form. If set to 'xml' the result will be
    140. -
    141.     *                                    SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    142. -
    143.     * @return Array/String  Type of the result depends on $resultform.
    144. -
    145.     */
    146. -
    147.     public function queryModel($datasetQuery $query$resultform false)
    148. -
    149.     {
    150. -
    151.         $this->query   = $query;
    152. -
    153.         $this->dataset = $dataset;
    154. -
    155.  
    156. -
    157.         if($this->query->isEmpty){
    158. -
    159.             $vartable[0]['patternResult'null;
    160. -
    161.             return SparqlEngine_ResultConverter::convertFromResult(
    162. -
    163.                 $vartable,
    164. -
    165.                 $this,
    166. -
    167.                 $resultform
    168. -
    169.             );
    170. -
    171.         }
    172. -
    173.  
    174. -
    175.         $graphlist $this->preselectGraphs();
    176. -
    177.         /// match graph patterns against the RDF Dataset
    178. -
    179.         $patternlist $this->matchPatterns($graphlist);
    180. -
    181.         // filter results- apply inner filters
    182. -
    183.         $patternlist $this->filterPatterns($patternlist,false);
    184. -
    185.         // join pattern results
    186. -
    187.         $vartable $this->joinResults($patternlist);
    188. -
    189.         // filter results- apply outer filters
    190. -
    191.         $vartable $this->filterPatterns($vartable,true);
    192. -
    193.  
    194. -
    195.         if ($vartable[0]['patternResult'!= null{
    196. -
    197.             // sort vars (ORDER BY, LIMIT, OFFSET)
    198. -
    199.             $vartable $this->sortVars($vartable[0]['patternResult']);
    200. -
    201.             $qrf      $this->query->getResultForm();
    202. -
    203.             if ($qrf == 'select' || $qrf == 'select distinct'{
    204. -
    205.                 $vars     $this->query->getResultVars();
    206. -
    207.                 $vartable $this->selectVars($vartable$vars);
    208. -
    209.                 if ($qrf == 'select distinct'{
    210. -
    211.                     $vartable $this->distinct($vartable);
    212. -
    213.                 }
    214. -
    215.             }
    216. -
    217.         else {
    218. -
    219.             $vartable null;
    220. -
    221.         }
    222. -
    223.  
    224. -
    225. -
    226.             $vartable,
    227. -
    228.             $this,
    229. -
    230.             $resultform
    231. -
    232.         );
    233. -
    234.     }//public function queryModel($dataset, Query $query, $resultform = false)
    235. -
    236.  
    237. -
    238.  
    239. -
    240.  
    241. -
    242.     /**
    243. -
    244.     * Matches all graph Patterns against the dataset and generates an array which
    245. -
    246.     * contains the result sets for every given GraphPattern.
    247. -
    248.     *
    249. -
    250.     * @param  Array      $graphlist   the graphlist which contains the names of the named
    251. -
    252.     *                     graphs which has to be queried.
    253. -
    254.     * @return Array 
    255. -
    256.     */
    257. -
    258.     protected function matchPatterns($graphlist){
    259. -
    260.         $patternlist array();
    261. -
    262.         // get the result part from the query
    263. -
    264.         $resultPart $this->query->getResultPart();
    265. -
    266.         // for each GrapPattern in the result part
    267. -
    268.         if($resultPart)
    269. -
    270.         foreach($resultPart as $graphPattern){
    271. -
    272.             $this->matchPattern($patternlist$graphlist$graphPattern);
    273. -
    274.         }
    275. -
    276.         return $patternlist;
    277. -
    278.     }
    279. -
    280.  
    281. -
    282.  
    283. -
    284.  
    285. -
    286.     /**
    287. -
    288.     * Finds tuples that match one graph pattern.
    289. -
    290.     *
    291. -
    292.     * @param  Array        $patternlist list that contains the graphPatterns
    293. -
    294.     * @param  array        $graphlist   the graphlist
    295. -
    296.     * @param  GraphPattern $graphPattern the pattern which has to be matched
    297. -
    298.     * @return void 
    299. -
    300.     */
    301. -
    302.     protected function matchPattern(&$patternlist$graphlist&$graphPattern{
    303. -
    304.         // generate an empty result set
    305. -
    306.         $finalRes null;
    307. -
    308.         // if the GraphPattern has triple patterns
    309. -
    310.         if($graphPattern->getTriplePattern()>0){
    311. -
    312.             // check if the pattern has a GRAPH clause and if this Iri is in $graphlist
    313. -
    314.             $newGraphList $this->_checkGraphs($graphPattern,$graphlist);
    315. -
    316.             if($newGraphList){
    317. -
    318.                 $qt $graphPattern->getTriplePattern();
    319. -
    320.                 $resultSet $this->findTuplesMatchingOnePattern($qt[0]$newGraphList);
    321. -
    322.                 for ($i=1$i<count($qt)$i++{
    323. -
    324.                     $rs $this->findTuplesMatchingOnePattern($qt[$i]$newGraphList);
    325. -
    326.                     $resultSet $this->joinTuples($resultSet$rs);
    327. -
    328.                     if(!$resultSet)
    329. -
    330.                     break;
    331. -
    332.                 }
    333. -
    334.                 if($finalRes != null){
    335. -
    336.                     $finalRes $this->joinTuples($finalRes,$resultSet);
    337. -
    338.                 }else{
    339. -
    340.                     $finalRes $resultSet;
    341. -
    342.                 }
    343. -
    344.             }
    345. -
    346.         }
    347. -
    348.         // dependencies between pattern results
    349. -
    350.         $patternlist[$graphPattern->getId()]['hasOptional']     0;
    351. -
    352.         $patternlist[$graphPattern->getId()]['hasUnion']        0;
    353. -
    354.         $patternlist[$graphPattern->getId()]['patternResult']   $finalRes;
    355. -
    356.  
    357. -
    358.         $op $graphPattern->getOptional();
    359. -
    360.         $un $graphPattern->getUnion();
    361. -
    362.  
    363. -
    364.         $patternlist[$graphPattern->getId()]['optionalTo']      $op;
    365. -
    366.         if(is_int($op))
    367. -
    368.         $patternlist[$op]['hasOptional']++;
    369. -
    370.  
    371. -
    372.         $patternlist[$graphPattern->getId()]['unionWith']       $un;
    373. -
    374.         if(is_int($un))
    375. -
    376.         $patternlist[$un]['hasUnion']++;
    377. -
    378.  
    379. -
    380.         $constraint $graphPattern->getConstraint();
    381. -
    382.         if($constraint != null){
    383. -
    384.             foreach($constraint as $constr){
    385. -
    386.                 if($constr->isOuterFilter()){
    387. -
    388.                     $patternlist[$graphPattern->getId()]['outerFilter'][]          $constr;
    389. -
    390.                     $patternlist[$graphPattern->getId()]['innerFilter'][]          null;
    391. -
    392.                 }else{
    393. -
    394.                     $patternlist[$graphPattern->getId()]['innerFilter'][]          $constr;
    395. -
    396.                     $patternlist[$graphPattern->getId()]['outerFilter'][]          null;
    397. -
    398.                 }
    399. -
    400.             }
    401. -
    402.         }else{
    403. -
    404.             $patternlist[$graphPattern->getId()]['innerFilter']          null;
    405. -
    406.             $patternlist[$graphPattern->getId()]['outerFilter']          null;
    407. -
    408.         }
    409. -
    410.     }
    411. -
    412.  
    413. -
    414.  
    415. -
    416.     /**
    417. -
    418.     * Finds Tuples matching one TriplePattern.
    419. -
    420.     *
    421. -
    422.     * @param  TriplePattern $pattern 
    423. -
    424.     * @param  Array         $graphlist 
    425. -
    426.     * @return Array 
    427. -
    428.     */
    429. -
    430.     protected function findTuplesMatchingOnePattern($pattern$graphlist){
    431. -
    432.         $var null;
    433. -
    434.         $sub  $pattern->getSubject();
    435. -
    436.         $pred $pattern->getPredicate();
    437. -
    438.         $obj  $pattern->getObject();
    439. -
    440.  
    441. -
    442.         if(is_string($sub)||$sub instanceof BlankNode){
    443. -
    444.             if(is_string($sub))
    445. -
    446.             $var['sub'$sub;
    447. -
    448.             $sub null;
    449. -
    450.         }
    451. -
    452.         if(is_string($pred)||$pred instanceof BlankNode ){
    453. -
    454.             if(is_string($pred))
    455. -
    456.             $var['pred'$pred;
    457. -
    458.             $pred null;
    459. -
    460.         }
    461. -
    462.         if(is_string($obj)||$obj instanceof BlankNode){
    463. -
    464.             if(is_string($obj))
    465. -
    466.             $var['obj'$obj;
    467. -
    468.             $obj null;
    469. -
    470.         }
    471. -
    472.         $intBindings $this->_buildIntBindings($var);
    473. -
    474.         $k 0;
    475. -
    476.  
    477. -
    478.         $key 0;
    479. -
    480.         // search in named graphs
    481. -
    482.         if($graphlist['var'][0!= null||$graphlist['list'][0!= null){
    483. -
    484.             foreach($graphlist['list'as $key => $graphnode){
    485. -
    486.  
    487. -
    488.                 // query the dataset
    489. -
    490.                 $it $this->dataset->findInNamedGraphs($graphnode,$sub,$pred,$obj,false);
    491. -
    492.                 if($it->valid()){
    493. -
    494.                     // add statements to the result list
    495. -
    496.                     while($it->valid()){
    497. -
    498.                         if($graphnode == null){
    499. -
    500.                             $element $it->current()->getStatement();
    501. -
    502.                             $grname  $it->current()->getGraphname();
    503. -
    504.                         }else{
    505. -
    506.                             if($it->current(instanceof Quad)
    507. -
    508.                                 $element $it->current()->getStatement();
    509. -
    510.                             else
    511. -
    512.                                 $element $it->current();
    513. -
    514.  
    515. -
    516.                             $grname  $graphnode;
    517. -
    518.                         }
    519. -
    520.                         if($this->checkIntBindings($element,$intBindings)){
    521. -
    522.                             $resmodel['trip'][$k]  $element;
    523. -
    524.                             $resmodel['graph'][$k$grname;
    525. -
    526.                         //    $resmodel['graphvar'][$k] = $graphlist['var'][$key];
    527. -
    528.                             $resmodel['graphvar'][$k$graphlist['var'][0];
    529. -
    530.                             $k++;
    531. -
    532.  
    533. -
    534.                         }
    535. -
    536.                         $it->next();
    537. -
    538.                     }
    539. -
    540.                 }
    541. -
    542.  
    543. -
    544.             }
    545. -
    546.         }
    547. -
    548.         // search in the default graph
    549. -
    550.         if($graphlist['list'][0== null && $graphlist['var'][0== null){
    551. -
    552.  
    553. -
    554.  
    555. -
    556.             $gr $this->dataset->getDefaultGraph();
    557. -
    558.  
    559. -
    560.             $res $gr->find($sub,$pred,$obj);
    561. -
    562.  
    563. -
    564.             foreach($res->triples as $innerkey => $element){
    565. -
    566.                 if($this->checkIntBindings($element,$intBindings)){
    567. -
    568.                         $resmodel['trip'][$k]  $element;
    569. -
    570.                         $resmodel['graph'][$knull;
    571. -
    572.                         $resmodel['graphvar'][$k$graphlist['var'][$key];
    573. -
    574.                         $k++;
    575. -
    576.                     }
    577. -
    578.             }
    579. -
    580.         }
    581. -
    582.         if($k == 0)
    583. -
    584.         return false;
    585. -
    586.         return $this->_buildResultSet($pattern,$resmodel);
    587. -
    588.     }
    589. -
    590.  
    591. -
    592.     /**
    593. -
    594.     * Checks it there are internal bindings between variables.
    595. -
    596.     *
    597. -
    598.     * @param  Triple  $trip 
    599. -
    600.     * @param  Array   $intBindings 
    601. -
    602.     * @return boolean 
    603. -
    604.     */
    605. -
    606.     protected function checkIntBindings($trip$intBindings){
    607. -
    608.         switch($intBindings){
    609. -
    610.             case -1:
    611. -
    612.             return true;
    613. -
    614.             break;
    615. -
    616.             case 0:
    617. -
    618.             if($trip->subj != $trip->pred)
    619. -
    620.             return false;
    621. -
    622.             break;
    623. -
    624.             case 1:
    625. -
    626.             if(is_a($trip->obj,'Literal'))
    627. -
    628.             return false;
    629. -
    630.             if($trip->subj != $trip->obj)
    631. -
    632.             return false;
    633. -
    634.             break;
    635. -
    636.             case 2:
    637. -
    638.             if(is_a($trip->obj,'Literal'))
    639. -
    640.             return false;
    641. -
    642.             if($trip->pred != $trip->obj)
    643. -
    644.             return false;
    645. -
    646.             break;
    647. -
    648.             case 3:
    649. -
    650.             if(is_a($trip->obj,'Literal'))
    651. -
    652.             return false;
    653. -
    654.             if($trip->pred != $trip->obj || $trip->pred != $trip->subj )
    655. -
    656.             return false;
    657. -
    658.             break;
    659. -
    660.         }
    661. -
    662.         return true;
    663. -
    664.     }
    665. -
    666.  
    667. -
    668.  
    669. -
    670.     /**
    671. -
    672.     * Perform an SQL-like inner join on two resultSets.
    673. -
    674.     *
    675. -
    676.     * @param   Array   &$finalRes 
    677. -
    678.     * @param   Array   &$res 
    679. -
    680.     * @return  Array 
    681. -
    682.     */
    683. -
    684.     protected function joinTuples(&$finalRes&$res{
    685. -
    686.  
    687. -
    688.         if (!$finalRes || !$res)
    689. -
    690.         return array();
    691. -
    692.  
    693. -
    694.         // find joint variables and new variables to be added to $finalRes
    695. -
    696.         $jointVars array();
    697. -
    698.         $newVars array();
    699. -
    700.         $k key($res);
    701. -
    702.  
    703. -
    704.         foreach ($res[$kas $varname => $node{
    705. -
    706.             if (array_key_exists($varname$finalRes[0]))
    707. -
    708.             $jointVars[$varname;
    709. -
    710.             else
    711. -
    712.             $newVars[$varname;
    713. -
    714.         }
    715. -
    716.  
    717. -
    718.         // eliminate rows of $finalRes in which the values of $jointVars do not have
    719. -
    720.         // a corresponding row in $res.
    721. -
    722.         foreach ($finalRes as $n => $fRes{
    723. -
    724.             foreach ($res as $i => $r{
    725. -
    726.                 $ok TRUE;
    727. -
    728.                 foreach ($jointVars as $j_varname)
    729. -
    730.                 if ($r[$j_varname!= $fRes[$j_varname]{
    731. -
    732.                     $ok FALSE;
    733. -
    734.                     break;
    735. -
    736.                 }
    737. -
    738.                 if ($ok)
    739. -
    740.                 break;
    741. -
    742.             }
    743. -
    744.             if (!$ok)
    745. -
    746.             unset($finalRes[$n]);
    747. -
    748.         }
    749. -
    750.  
    751. -
    752.         // join $res and $finalRes
    753. -
    754.         $joinedRes array();
    755. -
    756.         foreach ($res as $r{
    757. -
    758.             foreach ($finalRes as $n => $fRes{
    759. -
    760.                 $ok TRUE;
    761. -
    762.                 foreach ($jointVars as $j_varname)
    763. -
    764.                 if ($r[$j_varname!= $fRes[$j_varname]{
    765. -
    766.                     $ok FALSE;
    767. -
    768.                     break;
    769. -
    770.                 }
    771. -
    772.                 if ($ok{
    773. -
    774.                     $joinedRow $finalRes[$n];
    775. -
    776.                     foreach($newVars as $n_varname)
    777. -
    778.                     $joinedRow[$n_varname$r[$n_varname];
    779. -
    780.                     $joinedRes[$joinedRow;
    781. -
    782.                 }
    783. -
    784.             }
    785. -
    786.         }
    787. -
    788.         return $joinedRes;
    789. -
    790.     }
    791. -
    792.  
    793. -
    794.  
    795. -
    796.     /**
    797. -
    798.     * Joins OPTIONAL pattern results.
    799. -
    800.     *
    801. -
    802.     * @param   Array   &$finalRes 
    803. -
    804.     * @param   Array   &$res 
    805. -
    806.     * @return  Array    the joined Array
    807. -
    808.     */
    809. -
    810.     protected function joinOptionalTuples(&$finalRes&$res{
    811. -
    812.  
    813. -
    814.         if(!$finalRes && !$res)
    815. -
    816.         return array();
    817. -
    818.  
    819. -
    820.         if(!$finalRes)
    821. -
    822.         return $res;
    823. -
    824.  
    825. -
    826.         if(!$res)
    827. -
    828.         return $finalRes;
    829. -
    830.  
    831. -
    832.         // find joint variables and new variables to be added to $finalRes
    833. -
    834.         $jointVars array();
    835. -
    836.         $newVars array();
    837. -
    838.         $result array();
    839. -
    840.  
    841. -
    842.         $k key($res);
    843. -
    844.  
    845. -
    846.         foreach ($res[$kas $varname => $node{
    847. -
    848.             if (array_key_exists($varname$finalRes[0])){
    849. -
    850.                 $jointVars[$varname;
    851. -
    852.             }else{
    853. -
    854.                 $newVars[$varname;
    855. -
    856.             }
    857. -
    858.         }
    859. -
    860.         $joined array();
    861. -
    862.         $joinc 0;
    863. -
    864.         foreach($finalRes as $i =>$fRes){
    865. -
    866.             foreach($res as $n =>$r){
    867. -
    868.                 $join false;
    869. -
    870.                 foreach($jointVars as $j_varname){
    871. -
    872.                     if($r[$j_varname]==$fRes[$j_varname]){
    873. -
    874.                         $join true;
    875. -
    876.                         //break;
    877. -
    878.                     }else{
    879. -
    880.                         $join false;
    881. -
    882.                     }
    883. -
    884.                 }
    885. -
    886.                 if($join){
    887. -
    888.                     $result[$joinc$fRes;
    889. -
    890.                     foreach($newVars as $n_varname)
    891. -
    892.                     $result[$joinc][$n_varname$r[$n_varname];
    893. -
    894.                     $joined[]=$n;
    895. -
    896.                     $joinc++;
    897. -
    898.                 }
    899. -
    900.  
    901. -
    902.             }
    903. -
    904.         }
    905. -
    906.  
    907. -
    908.         $count count($result);
    909. -
    910.         foreach($res as $k =>$val){
    911. -
    912.             if(!in_array($k,$joined)){
    913. -
    914.                 $result[$count$finalRes[0];
    915. -
    916.                 foreach($result[$countas $varname => $varVal){
    917. -
    918.                     $result[$count][$varname]='';
    919. -
    920.                 }
    921. -
    922.  
    923. -
    924.                 foreach($val as $varname2 => $varVal2){
    925. -
    926.                     $result[$count][$varname2]=$varVal2;
    927. -
    928.                 }
    929. -
    930.                 $count++;
    931. -
    932.             }
    933. -
    934.         }
    935. -
    936.         return $result;
    937. -
    938.     }
    939. -
    940.  
    941. -
    942.  
    943. -
    944.  
    945. -
    946.     /**
    947. -
    948.     * Looks in from and from named part of the query and
    949. -
    950.     * adds the graphs to the graphlist.
    951. -
    952.     *
    953. -
    954.     * @return Array 
    955. -
    956.     */
    957. -
    958.     protected function preselectGraphs(){
    959. -
    960.         $fromNamed $this->query->getFromNamedPart();
    961. -
    962.         if($fromNamed == null)
    963. -
    964.         $fromNamed[null;
    965. -
    966.         return $fromNamed;
    967. -
    968.     }
    969. -
    970.  
    971. -
    972.  
    973. -
    974.     /**
    975. -
    976.     * Evaluates the GRPAH clause if there is one. Checks if
    977. -
    978.     * the GRAPH clause contains an IRI, variable or nothing.
    979. -
    980.     * Returns an array which contains the graphs that has to be matched.
    981. -
    982.     *
    983. -
    984.     * @param  GraphPattern $pattern 
    985. -
    986.     * @param  Array        $graphlist 
    987. -
    988.     * @return Array 
    989. -
    990.     */
    991. -
    992.     protected function _checkGraphs(&$pattern,$graphlist){
    993. -
    994.  
    995. -
    996.         $gr $pattern->getGraphname();
    997. -
    998.         if($gr instanceof Resource ){
    999. -
    1000.             if($graphlist[0]==null || in_array($gr,$graphlist)){
    1001. -
    1002.                 $newGraphList['list'][$gr;
    1003. -
    1004.                 $newGraphList['var'][]  null;
    1005. -
    1006.             }else{
    1007. -
    1008.                 return false;
    1009. -
    1010.             }
    1011. -
    1012.         }elseif (is_string($gr)){
    1013. -
    1014.             $newGraphList['list'$graphlist;
    1015. -
    1016.             $newGraphList['var'][]  $gr;
    1017. -
    1018.         }else{
    1019. -
    1020.             $newGraphList['list'$graphlist;
    1021. -
    1022.             $newGraphList['var'][]  null;
    1023. -
    1024.         }
    1025. -
    1026.         return $newGraphList;
    1027. -
    1028.     }
    1029. -
    1030.  
    1031. -
    1032.     /**
    1033. -
    1034.     * Marks triples with internal bindings.
    1035. -
    1036.     * int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj.
    1037. -
    1038.     *
    1039. -
    1040.     * @param  Array $var 
    1041. -
    1042.     * @return Array 
    1043. -
    1044.     */
    1045. -
    1046.     protected function _buildIntBindings($var){
    1047. -
    1048.         $intBindings = -1;
    1049. -
    1050.         if(!$var)
    1051. -
    1052.         return $intBindings;
    1053. -
    1054.  
    1055. -
    1056.         if(isset($var['sub'])){
    1057. -
    1058.             if(isset($var['pred']))
    1059. -
    1060.             if($var['sub'== $var['pred'])
    1061. -
    1062.             $intBindings 0;
    1063. -
    1064.             if(isset($var['obj']))
    1065. -
    1066.             if($var['sub'== $var['obj']){
    1067. -
    1068.                 if$intBindings == 0){
    1069. -
    1070.                     $intBindings 3;
    1071. -
    1072.                 }else{
    1073. -
    1074.                     $intBindings 1;
    1075. -
    1076.                 }
    1077. -
    1078.             }
    1079. -
    1080.         }
    1081. -
    1082.         if(isset($var['pred'])){
    1083. -
    1084.             if(isset($var['obj']))
    1085. -
    1086.             if($var['pred']==$var['obj']&&$intBindings!=3)
    1087. -
    1088.             $intBindings 2;
    1089. -
    1090.         }
    1091. -
    1092.         return $intBindings;
    1093. -
    1094.     }
    1095. -
    1096.  
    1097. -
    1098.     /**
    1099. -
    1100.     * Builds the resultset.
    1101. -
    1102.     *
    1103. -
    1104.     * @param  GraphPattern $pattern 
    1105. -
    1106.     * @param  Array        $resmodel 
    1107. -
    1108.     * @return Array 
    1109. -
    1110.     */
    1111. -
    1112.     protected function _buildResultSet($pattern,$resmodel){
    1113. -
    1114.         // determine variables and their corresponding values
    1115. -
    1116.         $result null;
    1117. -
    1118.         if(is_string($pattern->getSubject())){
    1119. -
    1120.             $n 0;
    1121. -
    1122.             foreach($resmodel['trip'as $key => $triple){
    1123. -
    1124.                 if(isset($resmodel['graphvar'][$key]))
    1125. -
    1126.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1127. -
    1128.                 $result[$n++][$pattern->getSubject()$triple->subj;
    1129. -
    1130.             }
    1131. -
    1132.         }
    1133. -
    1134.         if(is_string($pattern->getPredicate())){
    1135. -
    1136.             $n 0;
    1137. -
    1138.             foreach($resmodel['trip'as $key => $triple){
    1139. -
    1140.                 if(isset($resmodel['graphvar'][$key]))
    1141. -
    1142.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1143. -
    1144.                 $result[$n++][$pattern->getPredicate()$triple->pred;
    1145. -
    1146.             }
    1147. -
    1148.         }
    1149. -
    1150.         if(is_string($pattern->getObject())){
    1151. -
    1152.             $n 0;
    1153. -
    1154.             foreach($resmodel['trip'as $key => $triple){
    1155. -
    1156.                 if(isset($resmodel['graphvar'][$key]))
    1157. -
    1158.                 $result[$n][$resmodel['graphvar'][$key]] $resmodel['graph'][$key];
    1159. -
    1160.                 $result[$n++][$pattern->getObject()$triple->obj;
    1161. -
    1162.             }
    1163. -
    1164.         }
    1165. -
    1166.         return $result;
    1167. -
    1168.     }
    1169. -
    1170.  
    1171. -
    1172.     /**
    1173. -
    1174.     * Selects the result variables and builds a result table.
    1175. -
    1176.     *
    1177. -
    1178.     * @param  Array  $table the result table
    1179. -
    1180.     * @param  Array  $vars the result variables
    1181. -
    1182.     * @return Array 
    1183. -
    1184.     */
    1185. -
    1186.     protected function selectVars($table,$vars){
    1187. -
    1188.         if($vars[0]=='*')
    1189. -
    1190.         $vars $this->query->getAllVars();
    1191. -
    1192.         $resTable array();
    1193. -
    1194.         $hits 0;
    1195. -
    1196.         foreach($table as $val){
    1197. -
    1198.             foreach($vars as $var){
    1199. -
    1200.                 if(isset($val[$var])){
    1201. -
    1202.                     $resTable[$hits][$var]=$val[$var];
    1203. -
    1204.                 }else{
    1205. -
    1206.                     $resTable[$hits][$var]="";
    1207. -
    1208.                 }
    1209. -
    1210.             }
    1211. -
    1212.             $hits++;
    1213. -
    1214.         }
    1215. -
    1216.         return $resTable;
    1217. -
    1218.     }
    1219. -
    1220.  
    1221. -
    1222.     /**
    1223. -
    1224.     * Joins the results of the different Graphpatterns.
    1225. -
    1226.     *
    1227. -
    1228.     * @param  Array $patternlist 
    1229. -
    1230.     * @return Array 
    1231. -
    1232.     */
    1233. -
    1234.     protected function joinResults($patternlist){
    1235. -
    1236.         $joined[0]['patternResult'null;
    1237. -
    1238.         $joined[0]['outerFilter'null;
    1239. -
    1240.  
    1241. -
    1242.         while(count($patternlist)>0){
    1243. -
    1244.             foreach($patternlist as $key => $pattern){
    1245. -
    1246.                 if($pattern['hasOptional'== && $pattern['hasUnion'== 0){
    1247. -
    1248.                     if(is_int($pattern['optionalTo'])){
    1249. -
    1250.                         $patternlist[$pattern['optionalTo']]['hasOptional']--;
    1251. -
    1252.                         $patternlist[$pattern['optionalTo']]['patternResult'$this->joinOptionalTuples($pattern['patternResult'],$patternlist[$pattern['optionalTo']]['patternResult']);
    1253. -
    1254.                         unset($patternlist[$key]);
    1255. -
    1256.                         break;
    1257. -
    1258.                     }
    1259. -
    1260.                     else if(is_int($pattern['unionWith'])){
    1261. -
    1262.                         $patternlist[$pattern['unionWith']]['hasUnion']--;
    1263. -
    1264.                         foreach($pattern['patternResult'as $value)
    1265. -
    1266.                         array_push($patternlist[$pattern['unionWith']]['patternResult'],$value);
    1267. -
    1268.                         unset($patternlist[$key]);
    1269. -
    1270.                         break;
    1271. -
    1272.                     }else{
    1273. -
    1274.                         if($joined[0]['patternResult'== null){
    1275. -
    1276.                             $joined[0]['patternResult'$pattern['patternResult'];
    1277. -
    1278.                             if($joined[0]['outerFilter'== null )
    1279. -
    1280.                             $joined[0]['outerFilter']  $pattern['outerFilter'];
    1281. -
    1282.                             unset($patternlist[$key]);
    1283. -
    1284.                             break;
    1285. -
    1286.                         }
    1287. -
    1288.                     //    if($pattern['patternResult'] !=null ){
    1289. -
    1290.                             $joined[0]['patternResult'$this->joinTuples($joined[0]['patternResult'],$pattern['patternResult']);
    1291. -
    1292.                             $joined[0]['outerFilter']   $pattern['outerFilter'];
    1293. -
    1294.                             unset($patternlist[$key]);
    1295. -
    1296.                             break;
    1297. -
    1298.                     //    }
    1299. -
    1300.                     }
    1301. -
    1302.                 }
    1303. -
    1304.             }
    1305. -
    1306.         }
    1307. -
    1308.         return $joined;
    1309. -
    1310.     }
    1311. -
    1312.  
    1313. -
    1314.     /**
    1315. -
    1316.     * Filters the pattern results.
    1317. -
    1318.     *
    1319. -
    1320.     * @param  Array   $patternlist list containing the results of the GraphPatterns
    1321. -
    1322.     * @param  boolean $outer TRUE if its an outer filter FALSE if not
    1323. -
    1324.     * @return Array   the filtered patternlist
    1325. -
    1326.     */
    1327. -
    1328.     protected function filterPatterns($patternlist,$outer){
    1329. -
    1330.         if($outer)
    1331. -
    1332.         $filter 'outerFilter';
    1333. -
    1334.         else
    1335. -
    1336.         $filter 'innerFilter';
    1337. -
    1338.         foreach($patternlist as $patkey => $pattern){
    1339. -
    1340.             // get constraints
    1341. -
    1342.             $constraint $pattern[$filter];
    1343. -
    1344.  
    1345. -
    1346.             if(count($constraint)>0){
    1347. -
    1348.                 foreach($constraint as $constr){
    1349. -
    1350.                     if($constr != null){
    1351. -
    1352.                         // extract Vars and function calls
    1353. -
    1354.                         $evalString $constr->getExpression();
    1355. -
    1356.                         preg_match_all("/\?.[^\s\)\,]*/",$evalString,$vars);
    1357. -
    1358.                         preg_match_all("/bound\((.[^\)]*)\)/i",$evalString,$boundcalls);
    1359. -
    1360.                         preg_match_all("/isuri\((.[^\)]*)\)/i",$evalString,$isUricalls);
    1361. -
    1362.                         preg_match_all("/isblank\((.[^\)]*)\)/i",$evalString,$isBlankcalls);
    1363. -
    1364.                         preg_match_all("/isLiteral\((.[^\)]*)\)/i",$evalString,$isLiteralcalls);
    1365. -
    1366.                         preg_match_all("/lang\((.[^\)]*)\)/i",$evalString,$langcalls);
    1367. -
    1368.                         preg_match_all("/datatype\((.[^\)]*)\)/i",$evalString,$datatypecalls);
    1369. -
    1370.                         preg_match_all("/str\((.[^\)]*)\)/i",$evalString,$stringcalls);
    1371. -
    1372.  
    1373. -
    1374.                         // is Bound
    1375. -
    1376.                         if(count($boundcalls[1])>0)
    1377. -
    1378.                         $function['bound'$boundcalls[1];
    1379. -
    1380.                         else
    1381. -
    1382.                         $function['bound'false;
    1383. -
    1384.  
    1385. -
    1386.                         // is URI
    1387. -
    1388.                         if(count($isUricalls[1])>0)
    1389. -
    1390.                         $function['isUri'$isUricalls[1];
    1391. -
    1392.                         else
    1393. -
    1394.                         $function['isUri'false;
    1395. -
    1396.  
    1397. -
    1398.                         // is Blank
    1399. -
    1400.                         if(count($isBlankcalls[1])>0)
    1401. -
    1402.                         $function['isBlank'$isBlankcalls[1];
    1403. -
    1404.                         else
    1405. -
    1406.                         $function['isBlank'false;
    1407. -
    1408.  
    1409. -
    1410.                         // is Literal
    1411. -
    1412.                         if(count($isLiteralcalls[1])>0)
    1413. -
    1414.                         $function['isLiteral'$isLiteralcalls[1];
    1415. -
    1416.                         else
    1417. -
    1418.                         $function['isLiteral'false;
    1419. -
    1420.  
    1421. -
    1422.                         // lang
    1423. -
    1424.                         if(count($langcalls[1])>0)
    1425. -
    1426.                         $function['lang'$langcalls[1];
    1427. -
    1428.                         else
    1429. -
    1430.                         $function['lang'false;
    1431. -
    1432.  
    1433. -
    1434.                         // datatype
    1435. -
    1436.                         if(count($datatypecalls[1])>0)
    1437. -
    1438.                         $function['datatype'$datatypecalls[1];
    1439. -
    1440.                         else
    1441. -
    1442.                         $function['datatype'false;
    1443. -
    1444.  
    1445. -
    1446.                         // string
    1447. -
    1448.                         if(count($stringcalls[1])>0)
    1449. -
    1450.                         $function['string'$stringcalls[1];
    1451. -
    1452.                         else
    1453. -
    1454.                         $function['string'false;
    1455. -
    1456.  
    1457. -
    1458.  
    1459. -
    1460.                         foreach($pattern['patternResult'as $key => $res){
    1461. -
    1462.                             $result false;
    1463. -
    1464.                             $evalString $this->fillConstraintString($vars,$res,$constr,$function);
    1465. -
    1466.                             $evalString '$result =('.$evalString.');';
    1467. -
    1468.                             // evaluate Constraint
    1469. -
    1470.                             @eval($evalString);
    1471. -
    1472.  
    1473. -
    1474.                             if(!$result)
    1475. -
    1476.                             unset($patternlist[$patkey]['patternResult'][$key]);
    1477. -
    1478.  
    1479. -
    1480.                         }
    1481. -
    1482.                     }
    1483. -
    1484.                 }
    1485. -
    1486.             }
    1487. -
    1488.         }
    1489. -
    1490.         return $patternlist;
    1491. -
    1492.     }
    1493. -
    1494.  
    1495. -
    1496.     /**
    1497. -
    1498.     * Builds an evaluation string to determine wether the result passes
    1499. -
    1500.     * the filter or not. This string is evaluatet by the php buildin eval() function
    1501. -
    1502.     *
    1503. -
    1504.     * @param  Array      $vars a list which contains the used variables
    1505. -
    1506.     * @param  Array      $res  the result part which have to be evaluated
    1507. -
    1508.     * @param  Constraint $constraint the Constrain object
    1509. -
    1510.     * @param  Array      $function an Array which contains the used functions
    1511. -
    1512.     * @return String 
    1513. -
    1514.     */
    1515. -
    1516.  
    1517. -
    1518.     protected function fillConstraintString($vars,$res,$constraint,$function){
    1519. -
    1520.  
    1521. -
    1522.         $boundExpr false;
    1523. -
    1524.         $evalString $constraint->getExpression();
    1525. -
    1526.  
    1527. -
    1528.         // extract Literals
    1529. -
    1530.         $pattern1 "/\".[^\"]*\"[^\^\@]/";
    1531. -
    1532.         $pattern2 "/\'.[^\']*\'[^\^\@]/";
    1533. -
    1534.         preg_match_all($pattern1,$evalString,$hits1);
    1535. -
    1536.         preg_match_all($pattern2,$evalString,$hits2);
    1537. -
    1538.  
    1539. -
    1540.         foreach($hits1[0as $k => $val){
    1541. -
    1542.             $evalString preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED1_'.$k++,$evalString,1);
    1543. -
    1544.         }
    1545. -
    1546.         foreach($hits2[0as $k => $val){
    1547. -
    1548.             $evalString preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED2_'.$k++,$evalString,1);
    1549. -
    1550.         }
    1551. -
    1552.  
    1553. -
    1554.         // replace namespaces
    1555. -
    1556.         $prefs $this->query->getPrefixes();
    1557. -
    1558.         foreach($prefs as $key => $val){
    1559. -
    1560.             if($key == '')
    1561. -
    1562.             $key ' ';
    1563. -
    1564.             $evalString preg_replace("/^(".$key."\:)(.[^\s]*)|([\s\(]?[^\^])(".$key."\:)(.[^\s\)]*)([\s\)]?)/","$3'<".$val."$2$5>'$6",$evalString);
    1565. -
    1566.  
    1567. -
    1568.             $evalString preg_replace("/(\^)(".$key."\:)(.[^\s]*)/","$1<".$val."$3>",$evalString);
    1569. -
    1570.         }
    1571. -
    1572.  
    1573. -
    1574.         $xsd "http\:\/\/www.w3.org\/2001\/XMLSchema\#";
    1575. -
    1576.  
    1577. -
    1578.         // evaluate bound calls
    1579. -
    1580.         if($function['bound']){
    1581. -
    1582.             $boundExpr true;
    1583. -
    1584.             foreach($function['bound'as $var){
    1585. -
    1586.                 if(isset($res[$var]&& $res[$var]!=="")
    1587. -
    1588.                 $replacement 'true';
    1589. -
    1590.                 else
    1591. -
    1592.                 $replacement 'false';
    1593. -
    1594.                 $evalString preg_replace("/bound\(\\".$var."\)/i",$replacement,$evalString);
    1595. -
    1596.             }
    1597. -
    1598.  
    1599. -
    1600.         }
    1601. -
    1602.         // evaluate isBlank calls
    1603. -
    1604.         if($function['isBlank']){
    1605. -
    1606.             foreach($function['isBlank'as $var){
    1607. -
    1608.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof BlankNode )
    1609. -
    1610.                 $replacement 'true';
    1611. -
    1612.                 else
    1613. -
    1614.                 $replacement 'false';
    1615. -
    1616.                 $evalString preg_replace("/isBlank\(\\".$var."\)/i",$replacement,$evalString);
    1617. -
    1618.             }
    1619. -
    1620.  
    1621. -
    1622.         }
    1623. -
    1624.         // evaluate isLiteral calls
    1625. -
    1626.         if($function['isLiteral']){
    1627. -
    1628.             foreach($function['isLiteral'as $var){
    1629. -
    1630.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal  )
    1631. -
    1632.                 $replacement 'true';
    1633. -
    1634.                 else
    1635. -
    1636.                 $replacement 'false';
    1637. -
    1638.                 $evalString preg_replace("/isLiteral\(\\".$var."\)/i",$replacement,$evalString);
    1639. -
    1640.             }
    1641. -
    1642.  
    1643. -
    1644.         }
    1645. -
    1646.         // evaluate isUri calls
    1647. -
    1648.         if($function['isUri']){
    1649. -
    1650.             foreach($function['isUri'as $var){
    1651. -
    1652.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Resource && $res[$var]->getUri(&& !$res[$varinstanceof BlankNode )
    1653. -
    1654.                 $replacement 'true';
    1655. -
    1656.                 else
    1657. -
    1658.                 $replacement 'false';
    1659. -
    1660.                 $evalString preg_replace("/isUri\(\\".$var."\)/i",$replacement,$evalString);
    1661. -
    1662.             }
    1663. -
    1664.         }
    1665. -
    1666.         // evaluate lang calls
    1667. -
    1668.         if($function['lang']){
    1669. -
    1670.             foreach($function['lang'as $var){
    1671. -
    1672.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal && $res[$var]->getLanguage() )
    1673. -
    1674.                 $replacement '"'.$res[$var]->getLanguage().'"';
    1675. -
    1676.                 else
    1677. -
    1678.                 $replacement 'null';
    1679. -
    1680.                 $evalString preg_replace("/lang\(\\".$var."\)/i",$replacement,$evalString);
    1681. -
    1682.             }
    1683. -
    1684.         }
    1685. -
    1686.         // evaluate datatype calls
    1687. -
    1688.         if($function['datatype']){
    1689. -
    1690.             foreach($function['datatype'as $var){
    1691. -
    1692.                 if(isset($res[$var]&& $res[$var]!=="" && $res[$varinstanceof Literal && $res[$var]->getDatatype() )
    1693. -
    1694.                 $replacement '\'<'.$res[$var]->getDatatype().'>\'';
    1695. -
    1696.                 else
    1697. -
    1698.                 $replacement 'false';
    1699. -
    1700.                 $evalString preg_replace("/datatype\(\\".$var."\)/i",$replacement,$evalString);
    1701. -
    1702.             }
    1703. -
    1704.         }
    1705. -
    1706.         // evaluate string calls
    1707. -
    1708.         if($function['string']){
    1709. -
    1710.             foreach($function['string'as $var){
    1711. -
    1712.                 if($var{0}=='?' || $var{0}=='$'){
    1713. -
    1714.                     if(isset($res[$var]&& $res[$var]!==""){
    1715. -
    1716.                         $replacement "'str_".$res[$var]->getLabel()."'";
    1717. -
    1718.                         if($res[$varinstanceof BlankNode)
    1719. -
    1720.                         $replacement "''";
    1721. -
    1722.                     }else{
    1723. -
    1724.                         $replacement 'false';
    1725. -
    1726.                     }
    1727. -
    1728.                     $evalString preg_replace("/str\(\\".$var."\)/i",$replacement,$evalString);
    1729. -
    1730.                 }else{
    1731. -
    1732.                     if($var{0}=='<'){
    1733. -
    1734.                         $evalString preg_replace("/str\(\s*\<(.[^\>]*)\>\s*\)/i","'str_$1'",$evalString);
    1735. -
    1736.                     }
    1737. -
    1738.                     if($var{0}=='"'){
    1739. -
    1740.                         $evalString preg_replace("/str\(\s*\"(.[^\>]*)\"\@[a-z]*\s*\)/i","'str_$1'",$evalString);
    1741. -
    1742.                     }
    1743. -
    1744.                 }
    1745. -
    1746.  
    1747. -
    1748.             }
    1749. -
    1750.         }
    1751. -
    1752.         // evaluate VARS
    1753. -
    1754.         foreach($vars[0as $var){
    1755. -
    1756.             if(isset($res[$var])&&$res[$var]!== ""){
    1757. -
    1758.                 //$replacement = "'".$res[$var]->getLabel()."'";
    1759. -
    1760.                 $replacement '" "';
    1761. -
    1762.                 if($res[$varinstanceof Literal){
    1763. -
    1764.                     if($res[$var]->getDatatype()!= null){
    1765. -
    1766.                         if($res[$var]->getDatatype(== XML_SCHEMA.'boolean')
    1767. -
    1768.                         $replacement $res[$var]->getLabel();
    1769. -
    1770.                         if($res[$var]->getDatatype(== XML_SCHEMA.'double')
    1771. -
    1772.                         $replacement $res[$var]->getLabel();
    1773. -
    1774.                         if($res[$var]->getDatatype(== XML_SCHEMA.'integer')
    1775. -
    1776.                         $replacement $res[$var]->getLabel();
    1777. -
    1778.                         if($res[$var]->getDatatype(== XML_SCHEMA.'dateTime')
    1779. -
    1780.                         $replacement strtotime($res[$var]->getLabel());
    1781. -
    1782.                     }else{
    1783. -
    1784.                         if($res[$var]->getLabel()=="")
    1785. -
    1786.                         $replacement 'false';
    1787. -
    1788.                         else
    1789. -
    1790.                         $replacement "'str_".$res[$var]->getLabel()."'";
    1791. -
    1792.                     }
    1793. -
    1794.                 }else{
    1795. -
    1796.                     if($res[$varinstanceof Resource){
    1797. -
    1798.                         $replacement "'<".$res[$var]->getLabel().">'";
    1799. -
    1800.                     }
    1801. -
    1802.                 }
    1803. -
    1804.                 $evalString preg_replace("/\\".$var."/",$replacement,$evalString);
    1805. -
    1806.             }
    1807. -
    1808.  
    1809. -
    1810.             // problem with PHP: false < 13 is true
    1811. -
    1812.             if(isset($res[$var])){
    1813. -
    1814.                 if($res[$var=== ""){
    1815. -
    1816.                     if($boundExpr)
    1817. -
    1818.                     $evalString preg_replace("/\\".$var."/","false",$evalString);
    1819. -
    1820.                     else
    1821. -
    1822.                     $evalString 'false';
    1823. -
    1824.                 }
    1825. -
    1826.             }else{
    1827. -
    1828.                 $evalString preg_replace("/\\".$var."/","false",$evalString);
    1829. -
    1830.             }
    1831. -
    1832.  
    1833. -
    1834.         }
    1835. -
    1836.  
    1837. -
    1838.         // replace '=' with '=='
    1839. -
    1840.         $evalString preg_replace("/(.[^\=])(\=)(.[^\=])/","$1==$3",$evalString);
    1841. -
    1842.  
    1843. -
    1844.  
    1845. -
    1846.         // rewrite Literals
    1847. -
    1848.         foreach($hits1[0as $k => $val){
    1849. -
    1850.             $pattern '/_REPLACED1_'.$k.'/';
    1851. -
    1852.             $evalString preg_replace($pattern,$hits1[0][$k],$evalString,1);
    1853. -
    1854.         }
    1855. -
    1856.  
    1857. -
    1858.         foreach($hits2[0as $k => $val){
    1859. -
    1860.             $pattern '/_REPLACED2_'.$k.'/';
    1861. -
    1862.             $evalString preg_replace($pattern,$hits2[0][$k],$evalString,1);
    1863. -
    1864.         }
    1865. -
    1866.  
    1867. -
    1868.         // replace xsd:boolean expressions
    1869. -
    1870.         $pattern $pattern '/\"\s?true\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?true\s?\'\^\^xsd:boolean/';
    1871. -
    1872.         $evalString preg_replace($pattern,"true",$evalString);
    1873. -
    1874.  
    1875. -
    1876.         $pattern $pattern '/\"\s?false\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?false\s?\'\^\^xsd:boolean/';
    1877. -
    1878.         $evalString preg_replace($pattern,"false",$evalString);
    1879. -
    1880.  
    1881. -
    1882.         // replace xsd:date expressions
    1883. -
    1884.         $pattern "/\"(.[^\"]*)\"\^\^".$xsd."dateTime/";
    1885. -
    1886.         preg_match_all($pattern,$evalString,$hits);
    1887. -
    1888.  
    1889. -
    1890.         foreach($hits[1as $dummy)
    1891. -
    1892.         $evalString preg_replace("/\".[^\"]*\"\^\^".$xsd."dateTime/",strtotime($dummy),$evalString,1);
    1893. -
    1894.  
    1895. -
    1896.  
    1897. -
    1898.         $evalString preg_replace("/(\'\<".$xsd."dateTime\()(.[^\)]*\))\>\'/","dateTime($2",$evalString);
    1899. -
    1900.  
    1901. -
    1902.         $evalString preg_replace("/(\'\<".$xsd."integer\()(.[^\)]*\))\>\'/","integer($2",$evalString);
    1903. -
    1904.  
    1905. -
    1906.         // tag plain literals
    1907. -
    1908.         $evalString preg_replace("/\"(.[^\"]*)\"([^\^])|\"(.[^\"]*)\"$/","'str_$1$3'$2",$evalString);
    1909. -
    1910.  
    1911. -
    1912.         return $evalString;
    1913. -
    1914.     }
    1915. -
    1916.  
    1917. -
    1918.     /**
    1919. -
    1920.     * Sorts the results.
    1921. -
    1922.     *
    1923. -
    1924.     * @param  Array  $vartable List containing the unsorted result vars
    1925. -
    1926.     * @return Array  List containing the sorted result vars
    1927. -
    1928.     */
    1929. -
    1930.     protected function sortVars($vartable)
    1931. -
    1932.     {
    1933. -
    1934.         $newTable array();
    1935. -
    1936.         $mod $this->query->getSolutionModifier();
    1937. -
    1938.         // if no ORDER BY solution modifier return vartable
    1939. -
    1940.         if($mod['order by']!= null){
    1941. -
    1942.             $order $mod['order by'];
    1943. -
    1944.             $map $this->buildVarmap($order,$vartable);
    1945. -
    1946.             foreach($map as $val){
    1947. -
    1948.                 $newTable[$vartable[$val];
    1949. -
    1950.             }
    1951. -
    1952.         }else{
    1953. -
    1954.             $newTable $vartable;
    1955. -
    1956.         }
    1957. -
    1958.  
    1959. -
    1960.         if($mod['offset'!= null){
    1961. -
    1962.             $newTable array_slice ($newTable$mod['offset']);
    1963. -
    1964.         }
    1965. -
    1966.         if($mod['limit'!= null){
    1967. -
    1968.             $newTable array_slice($newTable,0,$mod['limit']);
    1969. -
    1970.         }
    1971. -
    1972.  
    1973. -
    1974.         return $newTable;
    1975. -
    1976.     }
    1977. -
    1978.  
    1979. -
    1980.     /**
    1981. -
    1982.     * Sorts the result table.
    1983. -
    1984.     *
    1985. -
    1986.     * @param  String $order (ASC/DESC)
    1987. -
    1988.     * @param  Array  $vartable the vartable
    1989. -
    1990.     * @return Array  A map that contains the new order of the result vars
    1991. -
    1992.     */
    1993. -
    1994.     protected function buildVarmap($order$vartable)
    1995. -
    1996.     {
    1997. -
    1998.         $n0;
    1999. -
    2000.         $result array();
    2001. -
    2002.         $num_var array();
    2003. -
    2004.         foreach($order as $variable)
    2005. -
    2006.         $num_var[$variable['val']] 0;
    2007. -
    2008.  
    2009. -
    2010.         foreach($vartable as $k => $x){
    2011. -
    2012.             foreach($order as $value){
    2013. -
    2014.                 // if the value is a typed Literal try to determine if it
    2015. -
    2016.                 // a numeric datatype
    2017. -
    2018.                 if($x[$value['val']] instanceof Literal){
    2019. -
    2020.                     $dtype $x[$value['val']]->getDatatype();
    2021. -
    2022.                     if($dtype){
    2023. -
    2024.                         switch($dtype){
    2025. -
    2026.                             case XML_SCHEMA."integer":
    2027. -
    2028.                             $num_var[$value['val']]++;
    2029. -
    2030.                             break;
    2031. -
    2032.                             case XML_SCHEMA."double":
    2033. -
    2034.                             $num_var[$value['val']]++;
    2035. -
    2036.                             break;
    2037. -
    2038.  
    2039. -
    2040.                         }
    2041. -
    2042.                     }
    2043. -
    2044.                 }
    2045. -
    2046.                 if($x[$value['val']]){
    2047. -
    2048.                     if($x[$value['val']]instanceof Literal){
    2049. -
    2050.                         $pref "2";
    2051. -
    2052.                     }
    2053. -
    2054.                     if($x[$value['val']]instanceof Resource){
    2055. -
    2056.                         $pref "1";
    2057. -
    2058.                     }
    2059. -
    2060.                     if($x[$value['val']]instanceof BlankNode){
    2061. -
    2062.                         $pref "0";
    2063. -
    2064.                     }
    2065. -
    2066.                     $result[$value['val']][$n$pref.$x[$value['val']]->getLabel();
    2067. -
    2068.                 }else{
    2069. -
    2070.                     $result[$value['val']][$n"";
    2071. -
    2072.                 }
    2073. -
    2074.             }
    2075. -
    2076.             $result['oldKey'][$n$k;
    2077. -
    2078.             $n++;
    2079. -
    2080.         }
    2081. -
    2082.         $sortString "";
    2083. -
    2084.         foreach($order as $value){
    2085. -
    2086.             if($num_var[$value['val']] == $n)
    2087. -
    2088.             $sort SORT_NUMERIC;
    2089. -
    2090.             else
    2091. -
    2092.             $sort SORT_STRING;
    2093. -
    2094.  
    2095. -
    2096.             if($value['type'== 'asc')
    2097. -
    2098.             $type SORT_ASC;
    2099. -
    2100.             else
    2101. -
    2102.             $type SORT_DESC;
    2103. -
    2104.  
    2105. -
    2106.             $sortString $sortString.'$result["'.$value['val'].'"],'.$type.','.$sort.',';
    2107. -
    2108.         }
    2109. -
    2110.         $sortString "array_multisort(".$sortString.'$result["oldKey"]);';
    2111. -
    2112.  
    2113. -
    2114.         @eval($sortString);
    2115. -
    2116.         return $result['oldKey'];
    2117. -
    2118.     }
    2119. -
    2120.  
    2121. -
    2122.  
    2123. -
    2124.  
    2125. -
    2126.     /**
    2127. -
    2128.     * Eliminates duplicate results.
    2129. -
    2130.     *
    2131. -
    2132.     * @param  Array  $vartable a table that contains the result vars and their bindings
    2133. -
    2134.     * @return Array the result table without duplicate results
    2135. -
    2136.     */
    2137. -
    2138.     protected function distinct($vartable)
    2139. -
    2140.     {
    2141. -
    2142.         $index array();
    2143. -
    2144.         foreach($vartable as $key => $value){
    2145. -
    2146.             $key_index="";
    2147. -
    2148.             foreach($value as $k => $v)
    2149. -
    2150.             if($v instanceof Object)
    2151. -
    2152.                 $key_index $key_index.$k.$v->toString();
    2153. -
    2154.             if(isset($index[$key_index]))
    2155. -
    2156.             unset($vartable[$key]);
    2157. -
    2158.             else
    2159. -
    2160.             $index[$key_index]1;
    2161. -
    2162.         }
    2163. -
    2164.         return $vartable;
    2165. -
    2166.     }
    2167. -
    2168.  
    2169. -
    2170.  
    2171. -
    2172.     /**
    2173. -
    2174.     * Prints a query result as HTML table.
    2175. -
    2176.     * You can change the colors in the configuration file.
    2177. -
    2178.     *
    2179. -
    2180.     * @param array $queryResult [][?VARNAME] = object Node
    2181. -
    2182.     * @return void 
    2183. -
    2184.     */
    2185. -
    2186.     public function writeQueryResultAsHtmlTable($queryResult{
    2187. -
    2188.         // Import Package Utility
    2189. -
    2190.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    2191. -
    2192.  
    2193. -
    2194.         if $queryResult[0== null{
    2195. -
    2196.             echo 'no match<br>';
    2197. -
    2198.             return;
    2199. -
    2200.         }
    2201. -
    2202.         if $queryResult == 'false'{
    2203. -
    2204.             echo 'boolean: false<br>';
    2205. -
    2206.             return;
    2207. -
    2208.         }
    2209. -
    2210.         if $queryResult == 'true'{
    2211. -
    2212.             echo 'boolean: true<br>';
    2213. -
    2214.             return;
    2215. -
    2216.         }
    2217. -
    2218.  
    2219. -
    2220.  
    2221. -
    2222.         echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
    2223. -
    2224.         foreach ($queryResult[0as $varName => $value)
    2225. -
    2226.         echo "<td align='center'><b>$varName</b></td>";
    2227. -
    2228.         echo '</tr>';
    2229. -
    2230.  
    2231. -
    2232.         foreach ($queryResult as $n => $var{
    2233. -
    2234.  
    2235. -
    2236.  
    2237. -
    2238.             echo '<tr><td width="20" align="right">' .($n 1.'.</td>';
    2239. -
    2240.             foreach ($var as $varName => $value{
    2241. -
    2242.                 if($value !=''){
    2243. -
    2244.                     echo INDENTATION INDENTATION '<td bgcolor="';
    2245. -
    2246.                     echo RDFUtil::chooseColor($value);
    2247. -
    2248.                     echo '">';
    2249. -
    2250.                     echo '<p>';
    2251. -
    2252.  
    2253. -
    2254.                     $lang  NULL;
    2255. -
    2256.                     $dtype NULL;
    2257. -
    2258.                     if (is_a($value'Literal')) {
    2259. -
    2260.                         if ($value->getLanguage(!= NULL)
    2261. -
    2262.                         $lang ' <b>(xml:lang="' $value->getLanguage('") </b> ';
    2263. -
    2264.                         if ($value->getDatatype(!= NULL)
    2265. -
    2266.                         $dtype ' <b>(rdf:datatype="' $value->getDatatype('") </b> ';
    2267. -
    2268.                     }
    2269. -
    2270.                     echo  RDFUtil::getNodeTypeName($value.$value->getLabel($lang $dtype .'</p>';
    2271. -
    2272.                 }else{
    2273. -
    2274.                     echo "<td bgcolor='white'>unbound";
    2275. -
    2276.                 }
    2277. -
    2278.             }
    2279. -
    2280.             echo '</tr>';
    2281. -
    2282.         }
    2283. -
    2284.         echo '</table>';
    2285. -
    2286.     }
    2287. -
    2288.  
    2289. -
    2290.  
    2291. -
    2292.  
    2293. -
    2294.     /*
    2295. -
    2296.     *   Dumb getters
    2297. -
    2298.     */
    2299. -
    2300.  
    2301. -
    2302.  
    2303. -
    2304.  
    2305. -
    2306.     public function getQuery()
    2307. -
    2308.     {
    2309. -
    2310.         return $this->query;
    2311. -
    2312.     }//public function getQuery()
    2313. -
    2314.  
    2315. -
    2316.  
    2317. -
    2318.  
    2319. -
    2320.     public function getDataset()
    2321. -
    2322.     {
    2323. -
    2324.         return $this->dataset;
    2325. -
    2326.     }//public function getDataset()
    2327. -
    2328.  
    2329. -
    2330. // end: Class SparqlEngine
    2331. -
    2332.  
    2333. -
    2334. ?>
    2335. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDb.php.html deleted file mode 100755 index 533c40b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDb.php.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - File Source for SparqlEngineDb.php - - - - - -

    Source for file SparqlEngineDb.php

    -

    Documentation is available at SparqlEngineDb.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Offsetter.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultConverter.php';
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGenerator.php';
    10. -
    11. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlMerger.php';
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. *   SPARQL engine optimized for databases.
    18. -
    19. *   Generates SQL statements to directly query the database,
    20. -
    21. *   letting the database system do all the hard work like
    22. -
    23. *   selecting, joining, filtering and ordering results.
    24. -
    25. *
    26. -
    27. *   @author Christian Weiske <cweiske@cweiske.de>
    28. -
    29. *
    30. -
    31. *   @package sparql
    32. -
    33. */
    34. -
    35. -
    36. {
    37. -
    38.     /**
    39. -
    40.     *   Sparql Query object.
    41. -
    42.     *
    43. -
    44.     *   @var Query 
    45. -
    46.     */
    47. -
    48.     protected $query;
    49. -
    50.  
    51. -
    52.     /**
    53. -
    54.     *   RDF dataset object.
    55. -
    56.     *   @var Dataset 
    57. -
    58.     */
    59. -
    60.     protected $dataset;
    61. -
    62.  
    63. -
    64.     /**
    65. -
    66.     *   Database connection object.
    67. -
    68.     *   @var ADOConnection 
    69. -
    70.     */
    71. -
    72.     protected $dbConn;
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     *   Internal ID for our graph model.
    79. -
    80.     *   Stored in the database along the statements.
    81. -
    82.     *   @var int 
    83. -
    84.     */
    85. -
    86.     protected $modelID;
    87. -
    88.  
    89. -
    90.     /**
    91. -
    92.     *   Prepared SQL statements are stored in here.
    93. -
    94.     *   @var array 
    95. -
    96.     */
    97. -
    98.     protected $arPrepared    = null;
    99. -
    100.  
    101. -
    102.     /**
    103. -
    104.     *   If the prepared statement is really prepared, or if we just emulate it.
    105. -
    106.     *   @var boolean 
    107. -
    108.     */
    109. -
    110.     protected $bRealPrepared = false;
    111. -
    112.  
    113. -
    114.     /**
    115. -
    116.     *   SQL generator instance
    117. -
    118.     *   @var SparqlEngineDb_SqlGenerator 
    119. -
    120.     */
    121. -
    122.     protected $sg = null;
    123. -
    124.  
    125. -
    126.     /**
    127. -
    128.     *   Type sorting instance
    129. -
    130.     *   @var SparqlEngineDb_TypeSorter 
    131. -
    132.     */
    133. -
    134.     protected $ts = null;
    135. -
    136.  
    137. -
    138.     /**
    139. -
    140.     *   Prepared statments preparator instance
    141. -
    142.     *   @var SparqlEngineDb_Preparator 
    143. -
    144.     */
    145. -
    146.     protected $pr = null;
    147. -
    148.  
    149. -
    150.  
    151. -
    152.  
    153. -
    154.     /**
    155. -
    156.     *   Use SparqlEngine::factory() to create the instance
    157. -
    158.     */
    159. -
    160.     public function __construct(DbModel $model)
    161. -
    162.     {
    163. -
    164.         //parent::__construct();
    165. -
    166.         $this->dbConn  = $model->getDbConn();
    167. -
    168.         $this->modelID = $model->getModelID();
    169. -
    170.     }//public function __construct(DbModel $model)
    171. -
    172.  
    173. -
    174.  
    175. -
    176.  
    177. -
    178.     /**
    179. -
    180.     *   Query the database with the given SPARQL query.
    181. -
    182.     *
    183. -
    184.     *
    185. -
    186.     *   @param  Dataset       $dataset    RDF Dataset
    187. -
    188.     *   @param  Query         $query      Parsed SPARQL query
    189. -
    190.     *   @param  string        $resultform Result form. If set to 'xml' the result will be
    191. -
    192.     *                                    SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    193. -
    194.     *
    195. -
    196.     *   @return array/string  array of triple arrays, or XML. Format depends on
    197. -
    198.     *                                    $resultform parameter.
    199. -
    200.     */
    201. -
    202.     public function queryModel(Dataset $datasetQuery $query$resultform false)
    203. -
    204.     {
    205. -
    206.         $this->query   = $query;
    207. -
    208.         $this->dataset = $dataset;
    209. -
    210.         $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query$this->dbConn$this->modelID);
    211. -
    212.         $this->rc new SparqlEngineDb_ResultConverter($this->query$this->sg$this);
    213. -
    214.         $this->ts = new SparqlEngineDb_TypeSorter     ($this->query$this->dbConn);
    215. -
    216.  
    217. -
    218.         if($this->query->isEmpty()){
    219. -
    220.             $vartable[0]['patternResult'null;
    221. -
    222.             return $this->returnResult($vartable$resultform);
    223. -
    224.         }
    225. -
    226.  
    227. -
    228.  
    229. -
    230.         $arSqls $this->sg->createSql();
    231. -
    232.         $this->ts->setData($this->sg);
    233. -
    234.  
    235. -
    236.         return
    237. -
    238. -
    239.                 $this->queryMultiple(
    240. -
    241.                     $this->ts->getOrderifiedSqls(
    242. -
    243.                         $arSqls
    244. -
    245.                     )
    246. -
    247.                 ),
    248. -
    249.                 $this,
    250. -
    251.                 $resultform
    252. -
    253.             );
    254. -
    255.     }//public function queryModel(Dataset $dataset, Query $query, $resultform = false)
    256. -
    257.  
    258. -
    259.  
    260. -
    261.  
    262. -
    263.     /**
    264. -
    265.     *   Create a prepared statement that can be executed later.
    266. -
    267.     *
    268. -
    269.     *   @param  Dataset       $dataset    RDF Dataset
    270. -
    271.     *   @param  Query         $query      Parsed SPARQL query
    272. -
    273.     *
    274. -
    275.     *   @return SparqlEngineDb_PreparedStatement Prepared statment that can
    276. -
    277.     *            be execute()d later.
    278. -
    279.     */
    280. -
    281.     public function prepare(Dataset $datasetQuery $query)
    282. -
    283.     {
    284. -
    285.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/PreparedStatement.php';
    286. -
    287.         require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Preparator.php';
    288. -
    289.  
    290. -
    291.         $this->query   = $query;
    292. -
    293.         $this->dataset = $dataset;
    294. -
    295.         $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query$this->dbConn$this->modelID);
    296. -
    297.         $this->rc new SparqlEngineDb_ResultConverter($this->query$this->sg$this);
    298. -
    299.         $this->ts = new SparqlEngineDb_TypeSorter     ($this->query$this->dbConn);
    300. -
    301.         $this->pr = new SparqlEngineDb_Preparator     ($this->query$this->dbConn);
    302. -
    303.  
    304. -
    305.         $this->arPrepared = $this->sg->createSql();
    306. -
    307.         $this->ts->setData($this->sg);
    308. -
    309.  
    310. -
    311.         if ($this->ts->willBeDataDependent()) {
    312. -
    313.             $this->bRealPrepared = false;
    314. -
    315.         else {
    316. -
    317.             $this->bRealPrepared     = true;
    318. -
    319.             list($strSelect$strFrom$strWhere$this->arPrepared;
    320. -
    321.             $this->arPreparedQueries $this->ts->getOrderifiedSqls(
    322. -
    323.                 $strSelect,
    324. -
    325.                 $strFrom,
    326. -
    327.                 $strWhere
    328. -
    329.             );
    330. -
    331.             $this->arDbStatements    $this->pr->prepareInDb(
    332. -
    333.                 $this->arPreparedQueries,
    334. -
    335.                 $this->sg->getPlaceholders()
    336. -
    337.             );
    338. -
    339.         }
    340. -
    341.  
    342. -
    343.  
    344. -
    345.         return new SparqlEngineDb_PreparedStatement(
    346. -
    347.             $this
    348. -
    349.         );
    350. -
    351.     }//public function prepare(Dataset $dataset, Query $query)
    352. -
    353.  
    354. -
    355.  
    356. -
    357.  
    358. -
    359.     /**
    360. -
    361.     *   Execute a prepared statement by filling it with variables
    362. -
    363.     *
    364. -
    365.     *   @param array $arVariables   Array with (variable name => value) pairs
    366. -
    367.     *   @param string $resultform   Which form the result should have
    368. -
    369.     *
    370. -
    371.     *   @return mixed   Result according to $resultform
    372. -
    373.     */
    374. -
    375.     public function execute($arVariables$resultform false)
    376. -
    377.     {
    378. -
    379.         if ($this->arPrepared === null{
    380. -
    381.             throw new Exception('You need to prepare() the query first.');
    382. -
    383.         }
    384. -
    385.  
    386. -
    387.         if ($this->bRealPrepared{
    388. -
    389.             return
    390. -
    391.                 SparqlEngineDb_ResultConverter::convertFromDbResults(
    392. -
    393.                     $this->pr->execute(
    394. -
    395.                         $this->arDbStatements,
    396. -
    397.                         $arVariables
    398. -
    399.                     ),
    400. -
    401.                     $this,
    402. -
    403.                     $resultform
    404. -
    405.                 );
    406. -
    407.         else {
    408. -
    409.             list($strSelect$strFrom$strWhere$this->arPrepared;
    410. -
    411.  
    412. -
    413.             return SparqlEngineDb_ResultConverter::convertFromDbResults(
    414. -
    415.                 $this->queryMultiple(
    416. -
    417.                     $this->ts->getOrderifiedSqls(
    418. -
    419.                         $strSelect,
    420. -
    421.                         $strFrom,
    422. -
    423.                         $this->pr->replacePlaceholdersWithVariables(
    424. -
    425.                             $strWhere,
    426. -
    427.                             $this->sg->getPlaceholders(),
    428. -
    429.                             $arVariables
    430. -
    431.                         )
    432. -
    433.                     )
    434. -
    435.                 ),
    436. -
    437.                 $this,
    438. -
    439.                 $resultform
    440. -
    441.             );
    442. -
    443.         }
    444. -
    445.     }//public function execute($arVariables, $resultform)
    446. -
    447.  
    448. -
    449.  
    450. -
    451.  
    452. -
    453.     /**
    454. -
    455.     *   Executes multiple SQL queries and returns an array
    456. -
    457.     *   of results.
    458. -
    459.     *
    460. -
    461.     *   @param array $arSqls     Array of SQL queries
    462. -
    463.     *   @return array   Array of query results
    464. -
    465.     */
    466. -
    467.     protected function queryMultiple($arSqls)
    468. -
    469.     {
    470. -
    471.         $arSM $this->query->getSolutionModifier();
    472. -
    473.         if ($arSM['limit'=== null && $arSM['offset'=== null{
    474. -
    475.             $nOffset 0;
    476. -
    477.             $nLimit  null;
    478. -
    479.             $nSql    0;
    480. -
    481.         else {
    482. -
    483.             $offsetter new SparqlEngineDb_Offsetter($this->dbConn$this->query);
    484. -
    485.             list($nSql$nOffset$offsetter->determineOffset($arSqls);
    486. -
    487.             $nLimit    $arSM['limit'];
    488. -
    489.         }
    490. -
    491.  
    492. -
    493.         $nCount    0;
    494. -
    495.         $arResults array();
    496. -
    497.         foreach ($arSqls as $nId => $arSql{
    498. -
    499.             if ($nId $nSqlcontinue}
    500. -
    501.  
    502. -
    503.             if ($nLimit != null{
    504. -
    505.                 $nCurrentLimit $nLimit $nCount;
    506. -
    507.             else {
    508. -
    509.                 $nCurrentLimit null;
    510. -
    511.             }
    512. -
    513.  
    514. -
    515.             $dbResult    $this->queryDb($arSql$nOffset$nCurrentLimit);
    516. -
    517.             $nCount     += $dbResult->RowCount();
    518. -
    519.             $arResults[$dbResult;
    520. -
    521.             $nOffset 0;
    522. -
    523.             if ($nLimit !== null && $nCount >= $nLimit{
    524. -
    525.                 break;
    526. -
    527.             }
    528. -
    529.         }
    530. -
    531.  
    532. -
    533.         return $arResults;
    534. -
    535.         //return array_map(array($this, 'queryDb'), $arSql);
    536. -
    537.     }//protected function queryMultiple($arSql)
    538. -
    539.  
    540. -
    541.  
    542. -
    543.  
    544. -
    545.     /**
    546. -
    547.     *   Sends the sql to the database and returns the results.
    548. -
    549.     *
    550. -
    551.     *   @internal Switches between ADOConnection::Execute() and
    552. -
    553.     *     ADOConnection::SelectLimit() depending on the $query parameter's
    554. -
    555.     *     $solutionModifier "limit" and "offset" settings.
    556. -
    557.     *    Uses $query variable.
    558. -
    559.     *
    560. -
    561.     *   @param array $arSql     Array that gets a SQL query string once imploded
    562. -
    563.     *
    564. -
    565.     *   @return mixed           Anything ADOConnection::Execute() may return
    566. -
    567.     *   @throws Exception       If Database query does not work
    568. -
    569.     */
    570. -
    571.     function queryDb($arSql$nOffset$nLimit)
    572. -
    573.     {
    574. -
    575.         $strSql SparqlEngineDb_SqlMerger::getSelect($this->query$arSql);
    576. -
    577.  
    578. -
    579.         if ($strSql == '()'{
    580. -
    581.             return new ADORecordSet(false);
    582. -
    583.         }
    584. -
    585.  
    586. -
    587.         // I want associative arrays.
    588. -
    589.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    590. -
    591.  
    592. -
    593. //var_dump($strSql);
    594. -
    595.         if ($nLimit === null && $nOffset == 0{
    596. -
    597.             $ret $this->dbConn->execute($strSql);
    598. -
    599.         else if ($nLimit === null{
    600. -
    601.             $ret $this->dbConn->SelectLimit($strSql-1$nOffset);
    602. -
    603.         else {
    604. -
    605.             $ret $this->dbConn->SelectLimit($strSql$nLimit$nOffset);
    606. -
    607.         }
    608. -
    609.  
    610. -
    611.         //... but others maybe not
    612. -
    613.         $this->dbConn->SetFetchMode($oldmode);
    614. -
    615.  
    616. -
    617.         if (!$ret{
    618. -
    619.             //Error occured
    620. -
    621.             throw new Exception(
    622. -
    623.                 'ADOdb error: ' $this->dbConn->ErrorMsg("\n"
    624. -
    625.                 . $strSql
    626. -
    627.             );
    628. -
    629.         }
    630. -
    631.  
    632. -
    633.         return $ret;
    634. -
    635.     }//function queryDb($sql)
    636. -
    637.  
    638. -
    639.  
    640. -
    641.  
    642. -
    643.     /*
    644. -
    645.     *   Dumb getters
    646. -
    647.     */
    648. -
    649.  
    650. -
    651.  
    652. -
    653.  
    654. -
    655.     public function getQuery()
    656. -
    657.     {
    658. -
    659.         return $this->query;
    660. -
    661.     }//public function getQuery()
    662. -
    663.  
    664. -
    665.  
    666. -
    667.  
    668. -
    669.     public function getSqlGenerator()
    670. -
    671.     {
    672. -
    673.         return $this->sg;
    674. -
    675.     }//public function getSqlGenerator()
    676. -
    677.  
    678. -
    679.  
    680. -
    681.  
    682. -
    683.     public function getTypeSorter()
    684. -
    685.     {
    686. -
    687.         return $this->ts;
    688. -
    689.     }//public function getTypeSorter()
    690. -
    691.  
    692. -
    693. }//class SparqlEngineDb
    694. -
    695. ?>
    696. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html deleted file mode 100755 index d2172774..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbFilterGenerator.php.html +++ /dev/null @@ -1,862 +0,0 @@ - - - - - - File Source for FilterGenerator.php - - - - - -

    Source for file FilterGenerator.php

    -

    Documentation is available at FilterGenerator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Generates SQL from Sparql FILTER parts
    8. -
    9. *
    10. -
    11. *   @author Christian Weiske <cweiske@cweiske.de>
    12. -
    13. *
    14. -
    15. *   @package sparql
    16. -
    17. */
    18. -
    19. -
    20. {
    21. -
    22.     /**
    23. -
    24.     *   SQL Generator
    25. -
    26.     *   @var SparqlEngineDb_SqlGenerator 
    27. -
    28.     */
    29. -
    30.     protected $sg = null;
    31. -
    32.  
    33. -
    34.     /**
    35. -
    36.     *   If the filter is in an optional statement
    37. -
    38.     *   @var boolean 
    39. -
    40.     */
    41. -
    42.     protected $bOptional    = false;
    43. -
    44.  
    45. -
    46.     /**
    47. -
    48.     *   Number of parameters for the functions supported.
    49. -
    50.     *   First value is minimum, second is maximum.
    51. -
    52.     *   @var array 
    53. -
    54.     */
    55. -
    56.     protected static $arFuncParamNumbers array(
    57. -
    58.         'bound'         => array(11),
    59. -
    60.         'datatype'      => array(11),
    61. -
    62.         'isblank'       => array(11),
    63. -
    64.         'isiri'         => array(11),
    65. -
    66.         'isliteral'     => array(11),
    67. -
    68.         'isuri'         => array(11),
    69. -
    70.         'lang'          => array(11),
    71. -
    72.         'langmatches'   => array(22),
    73. -
    74.         'regex'         => array(23),
    75. -
    76.         'sameterm'      => array(22),
    77. -
    78.         'str'           => array(11),
    79. -
    80.         'xsd:datetime'  => array(11),
    81. -
    82.     );
    83. -
    84.  
    85. -
    86.     /**
    87. -
    88.     *   List of operators and their counterpart if operands are switched.
    89. -
    90.     *   (a > b) => (b < a)
    91. -
    92.     *   @var array 
    93. -
    94.     */
    95. -
    96.     protected static $arOperatorSwitches array(
    97. -
    98.         '>'     => '<',
    99. -
    100.         '<'     => '>',
    101. -
    102.         '>='    => '<=',
    103. -
    104.         '<='    => '>=',
    105. -
    106.     );
    107. -
    108.  
    109. -
    110.     protected static $arDumbOperators array(
    111. -
    112.         '&&''||'
    113. -
    114.     );
    115. -
    116.  
    117. -
    118.     protected static $typeXsdBoolean  'http://www.w3.org/2001/XMLSchema#boolean';
    119. -
    120.     protected static $typeXsdDateTime 'http://www.w3.org/2001/XMLSchema#dateTime';
    121. -
    122.     protected static $typeXsdDouble   'http://www.w3.org/2001/XMLSchema#double';
    123. -
    124.     protected static $typeXsdInteger  'http://www.w3.org/2001/XMLSchema#integer';
    125. -
    126.     protected static $typeXsdString   'http://www.w3.org/2001/XMLSchema#string';
    127. -
    128.     protected static $typeVariable    'variable';
    129. -
    130.  
    131. -
    132.  
    133. -
    134.  
    135. -
    136.     public function __construct(SparqlEngineDb_SqlGenerator $sg)
    137. -
    138.     {
    139. -
    140.         $this->sg = $sg;
    141. -
    142.     }//public function __construct(SparqlEngineDb_SqlGenerator $sqlgen)
    143. -
    144.  
    145. -
    146.  
    147. -
    148.  
    149. -
    150.     /**
    151. -
    152.     *   Creates the SQL representing a Sparql FILTER.
    153. -
    154.     *
    155. -
    156.     *   @param array $tree  Filter element tree as returned by
    157. -
    158.     *                        SparqlParser::parseConstraintTree()
    159. -
    160.     *   @param boolean $bOptional   If the filter is in an optional statement
    161. -
    162.     *   @return string  SQL WHERE part with prefixed AND
    163. -
    164.     */
    165. -
    166.     public function createFilterSql($tree$bOptional$nUnionCount)
    167. -
    168.     {
    169. -
    170.         if (count($tree== 0{
    171. -
    172.             //empty filter pattern?
    173. -
    174.             return '';
    175. -
    176.         }
    177. -
    178.  
    179. -
    180.         $this->bOptional = $bOptional;
    181. -
    182.         $this->nUnionCount $nUnionCount;
    183. -
    184.  
    185. -
    186.         return ' AND ' $this->createTreeSql($treenull);
    187. -
    188.     }//public function createFilterSql($tree)
    189. -
    190.  
    191. -
    192.  
    193. -
    194.  
    195. -
    196.     /**
    197. -
    198.     *
    199. -
    200.     */
    201. -
    202.     protected function createTreeSql($tree$parent)
    203. -
    204.     {
    205. -
    206.         switch ($tree['type']{
    207. -
    208.             case 'equation':
    209. -
    210.                 $sql $this->createEquation($tree);
    211. -
    212.                 break;
    213. -
    214.             case 'value':
    215. -
    216.                 if ($parent != null{
    217. -
    218.                     $bDumbParent $parent['type'== 'equation'
    219. -
    220.                         && in_array($parent['operator']self::$arDumbOperators);
    221. -
    222.                 else {
    223. -
    224.                     $bDumbParent true;
    225. -
    226.                 }
    227. -
    228.                 $sql $this->createValue($tree$bDumbParent);
    229. -
    230.                 break;
    231. -
    232.             case 'function':
    233. -
    234.                 $sql $this->createFunction($tree);
    235. -
    236.                 break;
    237. -
    238.             default:
    239. -
    240.                 var_dump($tree);
    241. -
    242.                 throw new Exception('Unsupported tree type: ' $tree['type']);
    243. -
    244.                 break;
    245. -
    246.         }
    247. -
    248.  
    249. -
    250.         if (isset($tree['negated'])) {
    251. -
    252.             $sql '!(' $sql ')';
    253. -
    254.         }
    255. -
    256.  
    257. -
    258.         return $sql;
    259. -
    260.     }//protected function createTreeSql($tree, $strParentType)
    261. -
    262.  
    263. -
    264.  
    265. -
    266.  
    267. -
    268.     /**
    269. -
    270.     *   Creates the sql for an element of type "value".
    271. -
    272.     *
    273. -
    274.     *   @param array $tree  Element
    275. -
    276.     *   @param boolean $bDumbParent True if the parent is a boolean equation or null.
    277. -
    278.     */
    279. -
    280.     protected function createValue($tree$bDumbParent)
    281. -
    282.     {
    283. -
    284.         $strValue stripslashes($tree['value']);
    285. -
    286.         if (SparqlEngineDb_SqlGenerator::isVariable($strValue)) {
    287. -
    288.             if (!isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$strValue])) {
    289. -
    290.                 throw new SparqlEngineDb_SqlGeneratorException(
    291. -
    292.                     'Unknown variable in filter: ' $strValue
    293. -
    294.                 );
    295. -
    296.             }
    297. -
    298.  
    299. -
    300.             if ($bDumbParent{
    301. -
    302.                 return $this->createBooleanValue($tree);
    303. -
    304.             else if ($this->isObject($tree)) {
    305. -
    306.                 //convert datetime to datetime if necessary
    307. -
    308.                 return self::mkVal(
    309. -
    310.                     '(CASE'
    311. -
    312.                     . ' WHEN ' $this->getIsCol($tree' = "' self::$typeXsdDateTime '"'
    313. -
    314.                     . ' THEN ' $this->getDateConversionSql($this->getValueCol($tree))
    315. -
    316.                     . ' ELSE ' $this->getValueCol($tree)
    317. -
    318.                     . ' END)',
    319. -
    320.                     self::$typeVariable
    321. -
    322.                 );
    323. -
    324.             else {
    325. -
    326.                 return self::mkVal(
    327. -
    328.                     $this->getValueCol($tree),
    329. -
    330.                     self::$typeVariable
    331. -
    332.                 );
    333. -
    334.             }
    335. -
    336.         }
    337. -
    338.  
    339. -
    340.         if ($this->isNumber($tree)) {
    341. -
    342.             return $strValue;
    343. -
    344.         else if ($tree['quoted'=== false{
    345. -
    346.             $strValueNew $this->sg->query->getFullUri($strValue);
    347. -
    348.             if ($strValueNew === false{
    349. -
    350.                 if ($strValue[0== '<' && substr($strValue-1== '>'{
    351. -
    352.                     $strValue substr($strValue1-1);
    353. -
    354.                 else {
    355. -
    356.                     throw new SparqlEngineDb_SqlGeneratorException(
    357. -
    358.                         'Unexpected value "' $strValueNew '" (expected datatype)'
    359. -
    360.                     );
    361. -
    362.                 }
    363. -
    364.             else {
    365. -
    366.                 $strValue $strValueNew;
    367. -
    368.             }
    369. -
    370.         else if (isset($tree['datatype'])) {
    371. -
    372.             switch ($tree['datatype']{
    373. -
    374.                 case self::$typeXsdBoolean:
    375. -
    376.                     if (strtolower($strValue== 'false'{
    377. -
    378.                         //fix: (bool)"false" === true
    379. -
    380.                         $strValue false;
    381. -
    382.                     }
    383. -
    384.                     return self::mkVal(
    385. -
    386.                         (bool)$strValue 'TRUE' 'FALSE',
    387. -
    388.                         self::$typeXsdBoolean
    389. -
    390.                     );
    391. -
    392.  
    393. -
    394.                 default:
    395. -
    396.                     throw new SparqlEngineDb_SqlGeneratorException(
    397. -
    398.                         'Unsupported datatype "' $tree['datatype']
    399. -
    400.                     );
    401. -
    402.             }
    403. -
    404.         }
    405. -
    406.  
    407. -
    408.         return self::mkVal(
    409. -
    410.             '"' addslashes($strValue'"',
    411. -
    412.             self::$typeXsdString
    413. -
    414.         );
    415. -
    416.     }//protected function createValue($tree)
    417. -
    418.  
    419. -
    420.  
    421. -
    422.  
    423. -
    424.     protected function createBooleanValue($tree)
    425. -
    426.     {
    427. -
    428.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    429. -
    430.         if (!$this->isObject($tree)) {
    431. -
    432.             //Maybe needs a fix
    433. -
    434.             $strSqlCol SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType]['value'];
    435. -
    436.             return self::mkVal(
    437. -
    438.                 $strTable '.' $strSqlCol ' != ""',
    439. -
    440.                 self::$typeXsdBoolean
    441. -
    442.             );
    443. -
    444.         }
    445. -
    446.  
    447. -
    448.         $cType  $strTable '.l_datatype';
    449. -
    450.         $cValue $strTable '.object';
    451. -
    452.         $xsd    'http://www.w3.org/2001/XMLSchema';
    453. -
    454.  
    455. -
    456.         return self::mkVal(
    457. -
    458.             '('
    459. -
    460.             . "(($cType = '' || $cType = '$xsd#string') AND $cValue != '')"
    461. -
    462.             . " OR ($cType = '$xsd#booleanAND $cValue != 'false')"
    463. -
    464.             . " OR (($cType = '$xsd#integer' || $cType = '$xsd#double') AND CAST($cValue AS DECIMAL) != 0)"
    465. -
    466.             //plain check for all unknown datatypes
    467. -
    468.             . " OR ($cType != '' AND $cType != '$xsd#stringAND $cType != '$xsd#booleanAND $cType != '$xsd#integerAND $cType != '$xsd#doubleAND $cValue != '')"
    469. -
    470.             . ')',
    471. -
    472.             self::$typeXsdBoolean
    473. -
    474.         );
    475. -
    476.     }//protected function createBooleanValue($tree)
    477. -
    478.  
    479. -
    480.  
    481. -
    482.  
    483. -
    484.     protected function createFunction($tree)
    485. -
    486.     {
    487. -
    488.         $strFuncName strtolower($tree['name']);
    489. -
    490.         if (!isset(self::$arFuncParamNumbers[$strFuncName])) {
    491. -
    492.             throw new SparqlEngineDb_SqlGeneratorException(
    493. -
    494.                 'Unsupported FILTER function: ' $strFuncName
    495. -
    496.             );
    497. -
    498.         }
    499. -
    500.  
    501. -
    502.         $nParams     count($tree['parameter']);
    503. -
    504.         if ($nParams self::$arFuncParamNumbers[$strFuncName][0]
    505. -
    506.          || $nParams self::$arFuncParamNumbers[$strFuncName][1]
    507. -
    508.         {
    509. -
    510.             throw new SparqlEngineDb_SqlGeneratorException(
    511. -
    512.                 'Wrong parameter count for FILTER function: ' $strFuncName
    513. -
    514.                 . ' (got ' $nParams ', expected '
    515. -
    516.                 . self::$arFuncParamNumbers[$strFuncName][0]
    517. -
    518.                 . '-' self::$arFuncParamNumbers[$strFuncName][1]
    519. -
    520.             );
    521. -
    522.         }
    523. -
    524.  
    525. -
    526.         $strThisFunc 'createFunction_' str_replace(':''_'$strFuncName);
    527. -
    528.         return $this->$strThisFunc($tree);
    529. -
    530.     }//protected function createFunction($tree)
    531. -
    532.  
    533. -
    534.  
    535. -
    536.  
    537. -
    538.     protected function createEquation($tree)
    539. -
    540.     {
    541. -
    542.         $strExtra       '';
    543. -
    544.         $strIsNull      '';
    545. -
    546.         $strIsNullEnd   '';
    547. -
    548.  
    549. -
    550.         if (($this->isNumber($tree['operand1']|| $this->isPlainString($tree['operand1']))
    551. -
    552.             && $this->isObject($tree['operand2'])
    553. -
    554.         {
    555. -
    556.             //switch operands and operator
    557. -
    558.             $tmp $tree['operand1'];
    559. -
    560.             $tree['operand1'$tree['operand2'];
    561. -
    562.             $tree['operand2'$tmp;
    563. -
    564.             $tree['operator'self::switchOperator($tree['operator']);
    565. -
    566.         }
    567. -
    568.  
    569. -
    570.         $val1 $this->createTreeSql($tree['operand1']$tree);
    571. -
    572.         $val2 $this->createTreeSql($tree['operand2']$tree);
    573. -
    574.  
    575. -
    576.         if ($this->isObject($tree['operand1'])) {
    577. -
    578.             if ($this->bOptional{
    579. -
    580.                 $strIsNull    '(';
    581. -
    582.                 $strIsNullEnd ' OR ' $val1 ' IS NULL)';
    583. -
    584.             }
    585. -
    586.             if (isset($tree['operand2']['language'])) {
    587. -
    588.                 $strColLanguage $this->getLangCol($tree['operand1']);
    589. -
    590.                 $strExtra .= ' AND ' $strColLanguage ' = "'
    591. -
    592.                     . addslashes($tree['operand2']['language'])
    593. -
    594.                     . '"';
    595. -
    596.             }
    597. -
    598.  
    599. -
    600.             if ($this->isNumber($tree['operand2'])) {
    601. -
    602.                 $strColDatatype $this->getDatatypeCol($tree['operand1']);
    603. -
    604.                 $strExtra .= ' AND (' $strColDatatype '  = "' self::$typeXsdDouble '"'
    605. -
    606.                     . ' OR ' $strColDatatype '  = "' self::$typeXsdInteger '"'
    607. -
    608.                     . ')';
    609. -
    610.                 return $strIsNull '('
    611. -
    612.                     . 'CAST(' $val1 ' AS DECIMAL)'
    613. -
    614.                     . ' ' $tree['operator'' '
    615. -
    616.                     . $val2
    617. -
    618.                     . $strExtra
    619. -
    620.                     . ')' $strIsNullEnd;
    621. -
    622.             }
    623. -
    624.         }
    625. -
    626.  
    627. -
    628.         //I don't check the operator since it is already checked in the parser
    629. -
    630.         return $strIsNull '('
    631. -
    632.             . '('
    633. -
    634.                 . $val1
    635. -
    636.                 . ' ' $tree['operator'' '
    637. -
    638.                 . $val2
    639. -
    640.                 . $strExtra
    641. -
    642.             . ')'
    643. -
    644.             . $this->createTypeEquation(
    645. -
    646.                 $tree['operator']$val1$val2,
    647. -
    648.                 $tree['operand1']$tree['operand2']
    649. -
    650.             )
    651. -
    652.             . ')' $strIsNullEnd;
    653. -
    654.     }//protected function createEquation($tree)
    655. -
    656.  
    657. -
    658.  
    659. -
    660.  
    661. -
    662.     /**
    663. -
    664.     *   Generates sql code to make sure the datatypes of the two operands match
    665. -
    666.     */
    667. -
    668.     protected function createTypeEquation($operator$val1$val2$tree1$tree2)
    669. -
    670.     {
    671. -
    672.         if (in_array($operatorarray('&&''||'))) {
    673. -
    674.             return '';
    675. -
    676.         }
    677. -
    678.  
    679. -
    680.         if ($val1->type != self::$typeVariable && $val2->type != self::$typeVariable{
    681. -
    682.             //both are not variables -> type needs to be the same
    683. -
    684.             return $val1->type == $val2->type '' ' AND FALSE';
    685. -
    686.         }
    687. -
    688.         $so1 $this->isObjectOrSubject($tree1);
    689. -
    690.         $so2 $this->isObjectOrSubject($tree2);
    691. -
    692.         $o1  $this->isObject($tree1);
    693. -
    694.         $o2  $this->isObject($tree2);
    695. -
    696.  
    697. -
    698.         if ($so1 && $so2{
    699. -
    700.             $sql ' AND ' $this->getIsCol($tree1' = ' $this->getIsCol($tree2);
    701. -
    702.             if ($o1 && $o2{
    703. -
    704.                 //maybe needs string fix
    705. -
    706.                 $sql .= ' AND ' $this->getDatatypeCol($tree1' = '
    707. -
    708.                     . $this->getDatatypeCol($tree2);
    709. -
    710.             }
    711. -
    712.             return $sql;
    713. -
    714.         }
    715. -
    716.  
    717. -
    718.         if ($o1 && $val2->type != self::$typeVariable{
    719. -
    720.             return $this->createSingleTypeCheck($val2$tree1);
    721. -
    722.         else if ($o2 && $val1->type != self::$typeVariable{
    723. -
    724.             return $this->createSingleTypeCheck($val1$tree2);
    725. -
    726.         }
    727. -
    728.  
    729. -
    730.         //fixme
    731. -
    732.         return '';
    733. -
    734.     }//protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2)
    735. -
    736.  
    737. -
    738.  
    739. -
    740.  
    741. -
    742.     /**
    743. -
    744.     *   Creates sql to ensure the type between $val and variable $tree
    745. -
    746.     *   is the same.
    747. -
    748.     */
    749. -
    750.     protected function createSingleTypeCheck($val$tree)
    751. -
    752.     {
    753. -
    754.         if ($val->type == self::$typeXsdString{
    755. -
    756.             //string can be empty type or xsd type
    757. -
    758.             return ' AND ('
    759. -
    760.                 . $this->getDatatypeCol($tree' = "' $val->type '"'
    761. -
    762.                 . ' OR '
    763. -
    764.                 . $this->getDatatypeCol($tree' = ""'
    765. -
    766.                 . ')';
    767. -
    768.         }
    769. -
    770.         return ' AND ' $this->getDatatypeCol($tree' = "' $val->type '"';
    771. -
    772.     }//protected function createSingleTypeCheck($val, $tree)
    773. -
    774.  
    775. -
    776.  
    777. -
    778.  
    779. -
    780.     /*
    781. -
    782.     *   SQL generation functions
    783. -
    784.     */
    785. -
    786.  
    787. -
    788.  
    789. -
    790.  
    791. -
    792.     /**
    793. -
    794.     *   Creates an sql statement that returns if the element is a blank node
    795. -
    796.     */
    797. -
    798.     protected function createFunction_bound($tree)
    799. -
    800.     {
    801. -
    802.         if ($this->isVariable($tree['parameter'][0])) {
    803. -
    804.             return self::mkVal(
    805. -
    806.                 $this->getValueCol($tree['parameter'][0]' IS NOT NULL',
    807. -
    808.                 self::$typeXsdBoolean
    809. -
    810.             );
    811. -
    812.         }
    813. -
    814.  
    815. -
    816.         //We'll see which other cases occur here
    817. -
    818.         return self::mkVal('TRUE'self::$typeXsdBoolean);
    819. -
    820.     }//protected function createFunction_bound($tree)
    821. -
    822.  
    823. -
    824.  
    825. -
    826.  
    827. -
    828.     protected function createFunction_datatype($tree)
    829. -
    830.     {
    831. -
    832.         if (!$this->isObject($tree['parameter'][0])) {
    833. -
    834.             throw new SparqlEngineDb_SqlGeneratorException(
    835. -
    836.                 'datatype\'s first parameter needs to be an object'
    837. -
    838.             );
    839. -
    840.         }
    841. -
    842.  
    843. -
    844.         return self::mkVal(
    845. -
    846.             $this->getDatatypeCol($tree['parameter'][0]),
    847. -
    848.             self::$typeXsdString
    849. -
    850.         );
    851. -
    852.     }//protected function createFunction_datatype($tree)
    853. -
    854.  
    855. -
    856.  
    857. -
    858.  
    859. -
    860.     /**
    861. -
    862.     *   Creates an sql statement that returns if the element is a blank node
    863. -
    864.     */
    865. -
    866.     protected function createFunction_isblank($tree)
    867. -
    868.     {
    869. -
    870.         if (!$this->isObjectOrSubject($tree['parameter'][0])) {
    871. -
    872.             throw new SparqlEngineDb_SqlGeneratorException(
    873. -
    874.                 'isBlank\'s first parameter needs to be an object or subject'
    875. -
    876.             );
    877. -
    878.         }
    879. -
    880.  
    881. -
    882.         return self::mkVal(
    883. -
    884.             $this->getIsCol($tree['parameter'][0]' = "b"',
    885. -
    886.             self::$typeXsdBoolean
    887. -
    888.         );
    889. -
    890.     }//protected function createFunction_isblank($tree)
    891. -
    892.  
    893. -
    894.  
    895. -
    896.  
    897. -
    898.     protected function createFunction_isiri($tree)
    899. -
    900.     {
    901. -
    902.         return $this->createFunction_isuri($tree);
    903. -
    904.     }//protected function createFunction_isiri($tree)
    905. -
    906.  
    907. -
    908.  
    909. -
    910.  
    911. -
    912.     /**
    913. -
    914.     *   Creates an sql statement that returns the language of the object
    915. -
    916.     */
    917. -
    918.     protected function createFunction_isliteral($tree)
    919. -
    920.     {
    921. -
    922.         if ($this->isObjectOrSubject($tree['parameter'][0])) {
    923. -
    924.             return $this->getIsCol($tree['parameter'][0]' = "l"';
    925. -
    926.         }
    927. -
    928.  
    929. -
    930.         //This does not take combined functions into account (subfunctions)
    931. -
    932.         return self::mkVal(
    933. -
    934.             $this->isPlainString($tree'TRUE' 'FALSE',
    935. -
    936.             self::$typeXsdBoolean
    937. -
    938.         );
    939. -
    940.     }//protected function createFunction_isliteral($tree)
    941. -
    942.  
    943. -
    944.  
    945. -
    946.  
    947. -
    948.     protected function createFunction_isuri($tree)
    949. -
    950.     {
    951. -
    952.         if ($this->isObjectOrSubject($tree['parameter'][0])) {
    953. -
    954.             return self::mkVal(
    955. -
    956.                 $this->getIsCol($tree['parameter'][0]' = "r"',
    957. -
    958.                 self::$typeXsdBoolean
    959. -
    960.             );
    961. -
    962.         else {
    963. -
    964.             //predicates are iris
    965. -
    966.             return self::mkVal('TRUE'self::$typeXsdBoolean);
    967. -
    968.         }
    969. -
    970.     }//protected function createFunction_isuri($tree)
    971. -
    972.  
    973. -
    974.  
    975. -
    976.  
    977. -
    978.     /**
    979. -
    980.     *   Creates an sql statement that returns the language of the object
    981. -
    982.     */
    983. -
    984.     protected function createFunction_lang($tree)
    985. -
    986.     {
    987. -
    988.         if (!$this->isObject($tree['parameter'][0])) {
    989. -
    990.             throw new SparqlEngineDb_SqlGeneratorException(
    991. -
    992.                 'lang\'s first parameter needs to be an object'
    993. -
    994.             );
    995. -
    996.         }
    997. -
    998.         return self::mkVal(
    999. -
    1000.             $this->getLangCol($tree['parameter'][0]),
    1001. -
    1002.             self::$typeXsdString
    1003. -
    1004.         );
    1005. -
    1006.     }//protected function createFunction_lang($tree)
    1007. -
    1008.  
    1009. -
    1010.  
    1011. -
    1012.  
    1013. -
    1014.     /**
    1015. -
    1016.     *   Creates an sql statement that checks if the variable
    1017. -
    1018.     *   matches a given language
    1019. -
    1020.     */
    1021. -
    1022.     protected function createFunction_langmatches($tree)
    1023. -
    1024.     {
    1025. -
    1026.         //those two restrictions are needed until we have a mysql-only
    1027. -
    1028.         // langmatches function
    1029. -
    1030.         if ($tree['parameter'][0]['type'!= 'function'
    1031. -
    1032.          || $tree['parameter'][0]['name'!= 'lang'
    1033. -
    1034.         {
    1035. -
    1036.             throw new SparqlEngineDb_SqlGeneratorException(
    1037. -
    1038.                 'langMatches\' first parameter needs to be a lang() function'
    1039. -
    1040.             );
    1041. -
    1042.         }
    1043. -
    1044.  
    1045. -
    1046.         if (!$this->isPlainString($tree['parameter'][1])) {
    1047. -
    1048.             throw new SparqlEngineDb_SqlGeneratorException(
    1049. -
    1050.                 'langMatches\' second parameter needs to be a string'
    1051. -
    1052.             );
    1053. -
    1054.         }
    1055. -
    1056.  
    1057. -
    1058.         $lang  $tree['parameter'][1]['value'];
    1059. -
    1060.         $col   $this->createTreeSql($tree['parameter'][0]$tree);
    1061. -
    1062.  
    1063. -
    1064.         switch ($lang{
    1065. -
    1066.             case '*':
    1067. -
    1068.                 //anything but nothing
    1069. -
    1070.                 $sql $col ' != ""';
    1071. -
    1072.                 break;
    1073. -
    1074.             case '':
    1075. -
    1076.                 //nothing
    1077. -
    1078.                 $sql $col ' = ""';
    1079. -
    1080.                 break;
    1081. -
    1082.             default:
    1083. -
    1084.                 //language, maybe with different subcode
    1085. -
    1086.                 // en -> en, en-US
    1087. -
    1088.                 $sql '(' $col ' = "' addslashes($lang'" OR '
    1089. -
    1090.                     . $col ' LIKE "' addslashes($lang'-%")';
    1091. -
    1092.                 break;
    1093. -
    1094.         }
    1095. -
    1096.  
    1097. -
    1098.         return self::mkVal($sqlself::$typeXsdBoolean);
    1099. -
    1100.     }//protected function createFunction_isuri($tree)
    1101. -
    1102.  
    1103. -
    1104.  
    1105. -
    1106.  
    1107. -
    1108.     /**
    1109. -
    1110.     *   Creates an sql statement that checks if the given part matches
    1111. -
    1112.     *   an regex
    1113. -
    1114.     */
    1115. -
    1116.     protected function createFunction_regex($tree)
    1117. -
    1118.     {
    1119. -
    1120.         $strVar   $this->createTreeSql($tree['parameter'][0]$tree);
    1121. -
    1122.         $strRegex $this->createTreeSql($tree['parameter'][1]$tree);
    1123. -
    1124.  
    1125. -
    1126.         if (isset($tree['parameter'][2])) {
    1127. -
    1128.             //is quoted
    1129. -
    1130.             $strMod $this->createTreeSql($tree['parameter'][2]$tree);
    1131. -
    1132.             switch ($strMod{
    1133. -
    1134.                 case '':
    1135. -
    1136.                 case '""':
    1137. -
    1138.                     $sql $strVar ' REGEXP ' $strRegex;
    1139. -
    1140.                     break;
    1141. -
    1142.  
    1143. -
    1144.                 case '"i"':
    1145. -
    1146.                     $sql 'CAST(' $strVar ' AS CHAR) REGEXP ' $strRegex;
    1147. -
    1148.                     break;
    1149. -
    1150.  
    1151. -
    1152.                 default:
    1153. -
    1154.                     throw new SparqlEngineDb_SqlGeneratorException(
    1155. -
    1156.                         'Unsupported regex modifier "'
    1157. -
    1158.                         . $strMod
    1159. -
    1160.                         . '"'
    1161. -
    1162.                     );
    1163. -
    1164.             }
    1165. -
    1166.         else {
    1167. -
    1168.             $sql $strVar ' REGEXP ' $strRegex;
    1169. -
    1170.         }
    1171. -
    1172.  
    1173. -
    1174.         if ($this->isObject($tree['parameter'][0])) {
    1175. -
    1176.             $col $this->getIsCol($tree['parameter'][0]);
    1177. -
    1178.             $sql "($sql AND $col = 'l')";
    1179. -
    1180.         }
    1181. -
    1182.  
    1183. -
    1184.         return self::mkVal($sqlself::$typeXsdBoolean);
    1185. -
    1186.     }//protected function createFunction_regex($tree)
    1187. -
    1188.  
    1189. -
    1190.  
    1191. -
    1192.  
    1193. -
    1194.     /**
    1195. -
    1196.     *   Creates an sql statement that checks if both terms are the same
    1197. -
    1198.     */
    1199. -
    1200.     protected function createFunction_sameterm($tree)
    1201. -
    1202.     {
    1203. -
    1204.         //FIXME: dead simple implementation that does not cover all cases
    1205. -
    1206.         return self::mkVal(
    1207. -
    1208.             $this->createTreeSql($tree['parameter'][0]$tree)
    1209. -
    1210.                 . ' = '
    1211. -
    1212.                 . $this->createTreeSql($tree['parameter'][1]$tree),
    1213. -
    1214.             self::$typeXsdBoolean
    1215. -
    1216.         );
    1217. -
    1218.     }//protected function createFunction_sameterm($tree)
    1219. -
    1220.  
    1221. -
    1222.  
    1223. -
    1224.  
    1225. -
    1226.     /**
    1227. -
    1228.     *   Creates an sql statement that returns the string representation
    1229. -
    1230.     *   of the given element
    1231. -
    1232.     */
    1233. -
    1234.     protected function createFunction_str($tree)
    1235. -
    1236.     {
    1237. -
    1238.         if ($this->isObject($tree['parameter'][0])) {
    1239. -
    1240.             return self::mkVal(
    1241. -
    1242.                 '(CASE ' $this->getIsCol($tree['parameter'][0])
    1243. -
    1244.                 . ' WHEN "b" THEN ""'
    1245. -
    1246.                 . ' ELSE ' $this->getValueCol($tree['parameter'][0])
    1247. -
    1248.                 . ' END)',
    1249. -
    1250.                 self::$typeXsdString
    1251. -
    1252.             );
    1253. -
    1254.         }
    1255. -
    1256.  
    1257. -
    1258.         return $this->createTreeSql($tree['parameter'][0]$tree);
    1259. -
    1260.     }//protected function createFunction_str($tree)
    1261. -
    1262.  
    1263. -
    1264.  
    1265. -
    1266.  
    1267. -
    1268.     /**
    1269. -
    1270.     *   Creates an sql statement that returns the datetime representation
    1271. -
    1272.     *   of the given element
    1273. -
    1274.     */
    1275. -
    1276.     protected function createFunction_xsd_datetime($tree)
    1277. -
    1278.     {
    1279. -
    1280.         $val $this->createTreeSql($tree['parameter'][0]$tree);
    1281. -
    1282.         if ($val->type == self::$typeXsdDateTime
    1283. -
    1284.          || $val->type == self::$typeVariable{
    1285. -
    1286.             //no need to cast again
    1287. -
    1288.             return $val;
    1289. -
    1290.         }
    1291. -
    1292.         return self::mkVal(
    1293. -
    1294.             $this->getDateConversionSql($val),
    1295. -
    1296.             self::$typeXsdDateTime
    1297. -
    1298.         );
    1299. -
    1300.     }//protected function createFunction_xsd_datetime($tree)
    1301. -
    1302.  
    1303. -
    1304.  
    1305. -
    1306.  
    1307. -
    1308.  
    1309. -
    1310.     /*
    1311. -
    1312.     *   Helper methods
    1313. -
    1314.     */
    1315. -
    1316.  
    1317. -
    1318.  
    1319. -
    1320.  
    1321. -
    1322.     protected static function mkVal($value$type null{
    1323. -
    1324.         return new SparqlEngineDb_FilterGenerator_Value($value$type);
    1325. -
    1326.     }
    1327. -
    1328.  
    1329. -
    1330.  
    1331. -
    1332.  
    1333. -
    1334.     protected function getCol($tree$type)
    1335. -
    1336.     {
    1337. -
    1338.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1339. -
    1340.         if (!isset(SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type])) {
    1341. -
    1342.             return false;
    1343. -
    1344.         }
    1345. -
    1346.         $strSqlCol SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type];
    1347. -
    1348.         return $strTable '.' $strSqlCol;
    1349. -
    1350.     }
    1351. -
    1352.  
    1353. -
    1354.  
    1355. -
    1356.  
    1357. -
    1358.     protected function getDatatypeCol($tree)
    1359. -
    1360.     {
    1361. -
    1362.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1363. -
    1364.         return $strTable '.l_datatype';
    1365. -
    1366.     }
    1367. -
    1368.  
    1369. -
    1370.  
    1371. -
    1372.  
    1373. -
    1374.     protected function getDateConversionSql($strValue)
    1375. -
    1376.     {
    1377. -
    1378.         return 'STR_TO_DATE(' $strValue ', "%Y-%m-%dT%H:%i:%sZ")';
    1379. -
    1380.     }//protected function getDateConversionSql($strValue)
    1381. -
    1382.  
    1383. -
    1384.  
    1385. -
    1386.  
    1387. -
    1388.     protected function getIsCol($tree)
    1389. -
    1390.     {
    1391. -
    1392.         return $this->getCol($tree'is');
    1393. -
    1394.     }
    1395. -
    1396.  
    1397. -
    1398.  
    1399. -
    1400.  
    1401. -
    1402.     protected function getLangCol($tree)
    1403. -
    1404.     {
    1405. -
    1406.         list($strTable$chType$this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
    1407. -
    1408.         return $strTable '.l_language';
    1409. -
    1410.     }
    1411. -
    1412.  
    1413. -
    1414.  
    1415. -
    1416.  
    1417. -
    1418.     protected function getValueCol($tree)
    1419. -
    1420.     {
    1421. -
    1422.         return $this->getCol($tree'value');
    1423. -
    1424.     }
    1425. -
    1426.  
    1427. -
    1428.  
    1429. -
    1430.  
    1431. -
    1432.     protected function isNumber($tree)
    1433. -
    1434.     {
    1435. -
    1436.         return $tree['type'== 'value'
    1437. -
    1438.          && $tree['quoted'=== false
    1439. -
    1440.          && preg_match('#^[0-9.]+$#'$tree['value'])
    1441. -
    1442.          && floatval($tree['value']== $tree['value'];
    1443. -
    1444.     }//protected function isNumber($tree)
    1445. -
    1446.  
    1447. -
    1448.  
    1449. -
    1450.  
    1451. -
    1452.     /**
    1453. -
    1454.     *   Checks if the given tree element is a variable
    1455. -
    1456.     *   and the variable is actually an object in the database.
    1457. -
    1458.     *
    1459. -
    1460.     *   @param array $tree  Tree element
    1461. -
    1462.     *   @return boolean True if the element is an object
    1463. -
    1464.     */
    1465. -
    1466.     protected function isObject($tree)
    1467. -
    1468.     {
    1469. -
    1470.         return $this->isVariable($tree)
    1471. -
    1472.          && $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 'o';
    1473. -
    1474.     }//protected function isVariable($tree)
    1475. -
    1476.  
    1477. -
    1478.  
    1479. -
    1480.  
    1481. -
    1482.     /**
    1483. -
    1484.     *   Checks if the given tree element is a variable
    1485. -
    1486.     *   and the variable is actually an object or a subject in the database.
    1487. -
    1488.     *
    1489. -
    1490.     *   @param array $tree  Tree element
    1491. -
    1492.     *   @return boolean True if the element is an object or an subject
    1493. -
    1494.     */
    1495. -
    1496.     protected function isObjectOrSubject($tree)
    1497. -
    1498.     {
    1499. -
    1500.         return $this->isVariable($tree)
    1501. -
    1502.          && (
    1503. -
    1504.             $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 'o'
    1505. -
    1506.          || $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1== 's'
    1507. -
    1508.         );
    1509. -
    1510.     }//protected function isObjectOrSubject($tree)
    1511. -
    1512.  
    1513. -
    1514.  
    1515. -
    1516.  
    1517. -
    1518.     /**
    1519. -
    1520.     *   Checks if the given tree element is a plain string (no variable)
    1521. -
    1522.     *
    1523. -
    1524.     *   @param array $tree  Tree element
    1525. -
    1526.     *   @return boolean True if the element is a string
    1527. -
    1528.     */
    1529. -
    1530.     protected function isPlainString($tree)
    1531. -
    1532.     {
    1533. -
    1534.         return $tree['type'== 'value'
    1535. -
    1536.          && $tree['quoted'=== true;
    1537. -
    1538.     }//protected function isPlainString($tree)
    1539. -
    1540.  
    1541. -
    1542.  
    1543. -
    1544.  
    1545. -
    1546.     protected function isValueButNotVariableNorString($tree)
    1547. -
    1548.     {
    1549. -
    1550.         return $tree['type'== 'value'
    1551. -
    1552.          && $tree['type']['quoted'=== false
    1553. -
    1554.          && !SparqlEngineDb_SqlGenerator::isVariable($tree['value']);
    1555. -
    1556.     }//protected function isValueButNotVariableNorString($tree)
    1557. -
    1558.  
    1559. -
    1560.  
    1561. -
    1562.  
    1563. -
    1564.     /**
    1565. -
    1566.     *   Checks if the given tree element is a variable
    1567. -
    1568.     *
    1569. -
    1570.     *   @param array $tree  Tree element
    1571. -
    1572.     *   @return boolean True if the element is a variable
    1573. -
    1574.     */
    1575. -
    1576.     protected function isVariable($tree)
    1577. -
    1578.     {
    1579. -
    1580.         return $tree['type'== 'value'
    1581. -
    1582.          && $tree['quoted'=== false
    1583. -
    1584.          && SparqlEngineDb_SqlGenerator::isVariable($tree['value'])
    1585. -
    1586.          && isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]);
    1587. -
    1588.     }//protected function isVariable($tree)
    1589. -
    1590.  
    1591. -
    1592.  
    1593. -
    1594.  
    1595. -
    1596.     protected static function switchOperator($op)
    1597. -
    1598.     {
    1599. -
    1600.         if (!isset(self::$arOperatorSwitches[$op])) {
    1601. -
    1602.             return $op;
    1603. -
    1604.         else {
    1605. -
    1606.             return self::$arOperatorSwitches[$op];
    1607. -
    1608.         }
    1609. -
    1610.     }//protected static function switchOperator($op)
    1611. -
    1612.  
    1613. -
    1614. }//class SparqlEngineDb_FilterGenerator
    1615. -
    1616.  
    1617. -
    1618.  
    1619. -
    1620.  
    1621. -
    1622.  
    1623. -
    1624. /**
    1625. -
    1626. *   Value class that holds some arbitrary value
    1627. -
    1628. *   and a datatype.
    1629. -
    1630. *   Objects of this class can transparently be used in strings since
    1631. -
    1632. *   its __toString() returns the value.
    1633. -
    1634. */
    1635. -
    1636. -
    1637. {
    1638. -
    1639.     public $value = null;
    1640. -
    1641.     public $type  = null;
    1642. -
    1643.  
    1644. -
    1645.  
    1646. -
    1647.  
    1648. -
    1649.     public function __construct($value$type null)
    1650. -
    1651.     {
    1652. -
    1653.         $this->value = $value;
    1654. -
    1655.         $this->type  = $type;
    1656. -
    1657.     }
    1658. -
    1659.  
    1660. -
    1661.  
    1662. -
    1663.  
    1664. -
    1665.     public function __toString()
    1666. -
    1667.     {
    1668. -
    1669.         return $this->value;
    1670. -
    1671.     }
    1672. -
    1673.  
    1674. -
    1675. }//class SparqlEngineDb_FilterGenerator_Value
    1676. -
    1677.  
    1678. -
    1679. ?>
    1680. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html deleted file mode 100755 index 0e7d9693..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbOffsetter.php.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - File Source for Offsetter.php - - - - - -

    Source for file Offsetter.php

    -

    Documentation is available at Offsetter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlMerger.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Determines the offset in a row of sql queries.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. -
    22. {
    23. -
    24.     public function __construct(ADOConnection $dbConnQuery $query)
    25. -
    26.     {
    27. -
    28.         $this->dbConn   $dbConn;
    29. -
    30.         $this->query    $query;
    31. -
    32.     }//public function __construct(ADOConnection $dbConn, Query $query)
    33. -
    34.  
    35. -
    36.  
    37. -
    38.  
    39. -
    40.     /**
    41. -
    42.     *   Determines the offset in the sqls, the position to start form.
    43. -
    44.     *
    45. -
    46.     *   @param array $arSqls    Array of SQL query parts as returned by
    47. -
    48.     *                            SparqlEngine_TypeSorter::getOrderifiedSqls()
    49. -
    50.     *   @return array   Array of two values: The first determines the
    51. -
    52.     *                    index of the sql query to begin with, the second
    53. -
    54.     *                    is the row offset that should be used in the final
    55. -
    56.     *                    SQL query.
    57. -
    58.     */
    59. -
    60.     public function determineOffset($arSqls)
    61. -
    62.     {
    63. -
    64.         $arSM $this->query->getSolutionModifier();
    65. -
    66.         if ($arSM['offset'=== null{
    67. -
    68.             return array(00);
    69. -
    70.         }
    71. -
    72.  
    73. -
    74.         $nCount 0;
    75. -
    76.         foreach ($arSqls as $nId => $arSql{
    77. -
    78.             $nCurrentCount $this->getCount($arSql);
    79. -
    80.             if ($nCurrentCount $nCount $arSM['offset']{
    81. -
    82.                 return array($nId$arSM['offset'$nCount);
    83. -
    84.             }
    85. -
    86.             $nCount += $nCurrentCount;
    87. -
    88.         }
    89. -
    90.         //nothing found - no results for this offset
    91. -
    92.         return array(count($arSqls)0);
    93. -
    94.     }//public function determineOffset($arSql)
    95. -
    96.  
    97. -
    98.  
    99. -
    100.  
    101. -
    102.     /**
    103. -
    104.     *   Returns the number of rows that the given query will return.
    105. -
    106.     *
    107. -
    108.     *   @param array $arSql Array with sql parts and at least keys
    109. -
    110.     *                 'from' and 'where' set.
    111. -
    112.     *   @return int     Number of rows returned.
    113. -
    114.     */
    115. -
    116.     protected function getCount($arSql)
    117. -
    118.     {
    119. -
    120.         $sql SparqlEngineDb_SqlMerger::getCount($this->query$arSql);
    121. -
    122.         $dbResult $this->dbConn->execute($sql);
    123. -
    124.  
    125. -
    126.         $nCount 0;
    127. -
    128.         foreach ($dbResult as $row{
    129. -
    130.             $nCount intval($row[0]);
    131. -
    132.             break;
    133. -
    134.         }
    135. -
    136.         return $nCount;
    137. -
    138.     }//protected function getCount($arSql)
    139. -
    140.  
    141. -
    142.  
    143. -
    144.  
    145. -
    146.     /**
    147. -
    148.     *   Creates a sql LIMIT statement if the sparql query needs one.
    149. -
    150.     *   This method is needed because AdoDb does not support limits with
    151. -
    152.     *   prepared statements. It's a pity.
    153. -
    154.     *
    155. -
    156.     *   @return string  SQL command to be appended to a query, to limit
    157. -
    158.     *                    the number of result rows returned.
    159. -
    160.     */
    161. -
    162.     public static function getLimitSql(Query $queryADOConnection $dbConn)
    163. -
    164.     {
    165. -
    166.         $arSM $query->getSolutionModifier();
    167. -
    168.         if ($arSM['limit'=== null && $arSM['offset'=== null{
    169. -
    170.             return '';
    171. -
    172.         }
    173. -
    174.         //this here is mysql syntax. if anyone has problems, write it
    175. -
    176.         //dependent on $dbConn's type
    177. -
    178.         if ($arSM['offset'=== null{
    179. -
    180.             return ' LIMIT ' $arSM['limit'];
    181. -
    182.         else if ($arSM['limit'=== null{
    183. -
    184.             return ' LIMIT ' $arSM['offset'', 18446744073709551615';
    185. -
    186.         else {
    187. -
    188.             return ' LIMIT ' $arSM['offset'', ' $arSM['limit'];
    189. -
    190.         }
    191. -
    192.     }//public static function getLimitSql(Query $query, ADOConnection $dbConn)
    193. -
    194.  
    195. -
    196. }//class SparqlEngineDb_Offsetter
    197. -
    198.  
    199. -
    200. ?>
    201. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html deleted file mode 100755 index 00d59aea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparator.php.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - File Source for Preparator.php - - - - - -

    Source for file Preparator.php

    -

    Documentation is available at Preparator.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/Offsetter.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   This class takes care of prepared statements:
    10. -
    11. *   Preparing them in the database, replacing
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.  
    27. -
    28.  
    29. -
    30.  
    31. -
    32.     public function __construct(Query $queryADOConnection $dbConn)
    33. -
    34.     {
    35. -
    36.         $this->query        $query;
    37. -
    38.         $this->dbConn       $dbConn;
    39. -
    40.         $this->arPrefixes   $this->query->getPrefixes();
    41. -
    42.     }//public function __construct(Query $query, ADOConnection $dbConn)
    43. -
    44.  
    45. -
    46.  
    47. -
    48.  
    49. -
    50.     /**
    51. -
    52.     *   Converts the given queries into sql prepared statments,
    53. -
    54.     *   calls the prepare command in the database and returns
    55. -
    56.     *   an array consisting of subarrays. They contain
    57. -
    58.     *   the db's prepared statement as first value, and an array
    59. -
    60.     *   of variable positions as second value (key is the position,
    61. -
    62.     *   the sparql variable is the value).
    63. -
    64.     *
    65. -
    66.     *   @param array $arQueries      Array of sql queries part arrays
    67. -
    68.     *   @param array $arPlaceholders Array of sparql (variable name =>
    69. -
    70.     *                                 placeholder name) pairs
    71. -
    72.     *   @return array  Array of (prepared statment, variable positions) pairs
    73. -
    74.     */
    75. -
    76.     public function prepareInDb($arQueries$arPlaceholders)
    77. -
    78.     {
    79. -
    80.         $arDbStatements array();
    81. -
    82.  
    83. -
    84.         foreach ($arQueries as $arQuery{
    85. -
    86.             list($strPrepared$arVariablePositions$this->replacePlaceholders(
    87. -
    88.                 implode(''$arQuery),
    89. -
    90.                 $arPlaceholders
    91. -
    92.             );
    93. -
    94.             if (count($arQueries== 1{
    95. -
    96.                 //I currently haven't seens one case in which the count was > 1
    97. -
    98.                 //if that happens, we will need to add a fix
    99. -
    100.                 $strPrepared .= SparqlEngineDb_Offsetter::getLimitSql(
    101. -
    102.                     $this->query,
    103. -
    104.                     $this->dbConn
    105. -
    106.                 );
    107. -
    108.             }
    109. -
    110.             $stmt $this->dbConn->Prepare($strPrepared);
    111. -
    112.             $arDbStatements[array(
    113. -
    114.                 $stmt,
    115. -
    116.                 $arVariablePositions
    117. -
    118.             );
    119. -
    120.         }
    121. -
    122.  
    123. -
    124.         return $arDbStatements;
    125. -
    126.     }//public function prepareInDb($arQueries, $arPlaceholders)
    127. -
    128.  
    129. -
    130.  
    131. -
    132.  
    133. -
    134.     /**
    135. -
    136.     *   Replaces the placeholders in the given SQL statement with real
    137. -
    138.     *   SQL prepared statements placeholders.
    139. -
    140.     *
    141. -
    142.     *   @param string $strQuery SQL query with placeholders
    143. -
    144.     *   @param array $arPlaceholders Array of sparql (variable name =>
    145. -
    146.     *                                 placeholder name) pairs
    147. -
    148.     *   @return array (prepared sql query string, variable positions) pair
    149. -
    150.     */
    151. -
    152.     protected function replacePlaceholders($strQuery$arPlaceholders)
    153. -
    154.     {
    155. -
    156.         $arVariablePositions array();
    157. -
    158.         $this->arTmpVariablePositions array();
    159. -
    160.         $this->arTmpPlaceholders      $arPlaceholders;
    161. -
    162.         $strQuery preg_replace_callback(
    163. -
    164.             '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
    165. -
    166.             array($this'replacePlaceholdersCb'),
    167. -
    168.             $strQuery
    169. -
    170.         );
    171. -
    172.         return array($strQuery$this->arTmpVariablePositions);
    173. -
    174.     }//protected function replacePlaceholders($strQuery, $arPlaceholders)
    175. -
    176.  
    177. -
    178.  
    179. -
    180.  
    181. -
    182.     /**
    183. -
    184.     *   Callback method internally used by replacePlaceholders() method.
    185. -
    186.     */
    187. -
    188.     protected function replacePlaceholdersCb($matches)
    189. -
    190.     {
    191. -
    192.         $strPlaceholder     $matches[0];
    193. -
    194.         $strSparqlVariable  array_search(
    195. -
    196.             $strPlaceholder,
    197. -
    198.             $this->arTmpPlaceholders
    199. -
    200.         );
    201. -
    202.         $strDbPlaceholder   $this->dbConn->Param($strSparqlVariable);
    203. -
    204.         $this->arTmpVariablePositions[$strSparqlVariable;
    205. -
    206.  
    207. -
    208.         return $strDbPlaceholder;
    209. -
    210.     }//protected function replacePlaceholdersCb($matches)
    211. -
    212.  
    213. -
    214.  
    215. -
    216.  
    217. -
    218.     /**
    219. -
    220.     *   Executes the given prepared statments, filling the placeholders
    221. -
    222.     *   with the given values.
    223. -
    224.     *
    225. -
    226.     *   @param array $arDbStatements    Return value of prepareInDb()
    227. -
    228.     *   @param array $arVariableValues      Array of (variable name, value) pairs
    229. -
    230.     *
    231. -
    232.     *   @return array Array of database results as returned by Execute()
    233. -
    234.     */
    235. -
    236.     public function execute($arDbStatements$arVariableValues)
    237. -
    238.     {
    239. -
    240.         $arResults array();
    241. -
    242.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    243. -
    244.  
    245. -
    246.         foreach ($arDbStatements as $arStatement{
    247. -
    248.             list($stmt$arVariablePositions$arStatement;
    249. -
    250.             $arVariables $this->createVariableArray(
    251. -
    252.                 $arVariablePositions,
    253. -
    254.                 $arVariableValues
    255. -
    256.             );
    257. -
    258.             $arResults[$this->dbConn->Execute($stmt$arVariables);
    259. -
    260.         }
    261. -
    262.  
    263. -
    264.         $this->dbConn->SetFetchMode($oldmode);
    265. -
    266.  
    267. -
    268.         return $arResults;
    269. -
    270.     }//public function execute($arDbStatements, $arVariableValues)
    271. -
    272.  
    273. -
    274.  
    275. -
    276.  
    277. -
    278.     /**
    279. -
    280.     *   Creates an array full of variables to be passed to the Execute() method
    281. -
    282.     *   of the database connection object.
    283. -
    284.     *   Uses the variable positions array to get the positions of the variables
    285. -
    286.     *   in the result array, and the variable value array to get the actual
    287. -
    288.     *   values for the prepared statement.
    289. -
    290.     *
    291. -
    292.     *   @param array $arVariablePositions   Positions of the variables as returned
    293. -
    294.     *                                        by replacePlaceholders().
    295. -
    296.     *   @param array $arVariableValues      Array of (variable name, value) pairs
    297. -
    298.     *
    299. -
    300.     *   @return array Array of variable values
    301. -
    302.     */
    303. -
    304.     protected function createVariableArray($arVariablePositions$arVariableValues)
    305. -
    306.     {
    307. -
    308.         $arVariables array();
    309. -
    310.  
    311. -
    312.         foreach ($arVariablePositions as $nPos => $strVariable{
    313. -
    314.             if (!isset($arVariableValues[$strVariable])) {
    315. -
    316.                 throw new Exception('No value for variable "' $strVariable '" in prepared statement');
    317. -
    318.             }
    319. -
    320.  
    321. -
    322.             $strValue self::replacePrefix(
    323. -
    324.                 $arVariableValues[$strVariable],
    325. -
    326.                 $this->arPrefixes
    327. -
    328.             );
    329. -
    330.  
    331. -
    332.             $arVariables[$nPos$strValue;
    333. -
    334.         }
    335. -
    336.  
    337. -
    338.         return $arVariables;
    339. -
    340.     }//protected function createVariableArray($arVariablePositions, $arVariableValues)
    341. -
    342.  
    343. -
    344.  
    345. -
    346.  
    347. -
    348.     /**
    349. -
    350.     *   Replaces all placeholders with their actual values.
    351. -
    352.     */
    353. -
    354.     public function replacePlaceholdersWithVariables($strQuery$arPlaceholders$arVariableValues)
    355. -
    356.     {
    357. -
    358.         $this->arTmpPlaceholders   $arPlaceholders;
    359. -
    360.         $this->arTmpVariableValues $arVariableValues;
    361. -
    362.  
    363. -
    364.         $strQuery preg_replace_callback(
    365. -
    366.             '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
    367. -
    368.             array($this'replacePlaceholdersWithVariablesCb'),
    369. -
    370.             $strQuery
    371. -
    372.         );
    373. -
    374.  
    375. -
    376.         return $strQuery;
    377. -
    378.     }//public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues)
    379. -
    380.  
    381. -
    382.  
    383. -
    384.  
    385. -
    386.     /**
    387. -
    388.     *   Callback method internally used by
    389. -
    390.     *   replacePlaceholdersWithVariables() method.
    391. -
    392.     */
    393. -
    394.     protected function replacePlaceholdersWithVariablesCb($matches)
    395. -
    396.     {
    397. -
    398.         $strPlaceholder     $matches[0];
    399. -
    400.         $strSparqlVariable  array_search(
    401. -
    402.             $strPlaceholder,
    403. -
    404.             $this->arTmpPlaceholders
    405. -
    406.         );
    407. -
    408.         return $this->dbConn->qstr(
    409. -
    410.             self::replacePrefix(
    411. -
    412.                 $this->arTmpVariableValues[$strSparqlVariable],
    413. -
    414.                 $this->arPrefixes
    415. -
    416.             )
    417. -
    418.         );
    419. -
    420.     }//protected function replacePlaceholdersWithVariablesCb($matches)
    421. -
    422.  
    423. -
    424.  
    425. -
    426.  
    427. -
    428.     protected static function replacePrefix($strValue$arPrefixes)
    429. -
    430.     {
    431. -
    432.         //replace prefixes?
    433. -
    434.         if (count($arParts explode(':'$strValue2)) == 2{
    435. -
    436.             if (isset($arPrefixes[$arParts[0]])) {
    437. -
    438.                 $strValue $arPrefixes[$arParts[0]] $arParts[1];
    439. -
    440.             }
    441. -
    442.         }
    443. -
    444.         return $strValue;
    445. -
    446.     }//protected static function replacePrefix($strValue, $arPrefixes)
    447. -
    448.  
    449. -
    450. }//class SparqlEngineDb_Preparator
    451. -
    452.  
    453. -
    454. ?>
    455. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html deleted file mode 100755 index 7ec27712..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbPreparedStatement.php.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - File Source for PreparedStatement.php - - - - - -

    Source for file PreparedStatement.php

    -

    Documentation is available at PreparedStatement.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/PreparedStatement.php';;
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   A prepared statement that can be execute()d later multiple
    10. -
    11. *   times with different variable values.
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     protected $sparqlEngine = null;
    27. -
    28.  
    29. -
    30.  
    31. -
    32.     public function __construct(SparqlEngineDb $sparqlEngine)
    33. -
    34.     {
    35. -
    36.         $this->sparqlEngine = $sparqlEngine;
    37. -
    38.     }//public function __construct(SparqlEngineDb $sparqlEngine)
    39. -
    40.  
    41. -
    42.  
    43. -
    44.  
    45. -
    46.     /**
    47. -
    48.     *   Execute the prepared statement and returns the result.
    49. -
    50.     *
    51. -
    52.     *   @param array $arVariables   Array of sparql query variables => values
    53. -
    54.     *   @param string $resultform   Which result form you need
    55. -
    56.     *   @return mixed   Anything a sparql query can return
    57. -
    58.     */
    59. -
    60.     public function execute($arVariables$resultform false)
    61. -
    62.     {
    63. -
    64.         return $this->sparqlEngine->execute($arVariables$resultform);
    65. -
    66.     }//public function execute($arVariables, $resultform)
    67. -
    68.  
    69. -
    70. }//class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement
    71. -
    72. ?>
    73. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html deleted file mode 100755 index 6a790fb1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultConverter.php.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - File Source for ResultConverter.php - - - - - -

    Source for file ResultConverter.php

    -

    Documentation is available at ResultConverter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Converts a database result into a proper
    10. -
    11. *   rdf statement triple array
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     /**
    27. -
    28.     *   Determines the correct renderer and calls it.
    29. -
    30.     *
    31. -
    32.     *   The $resultform may be:
    33. -
    34.     *   - false: The default renderer is taken then
    35. -
    36.     *   - an object that implements SparqlEngineDb_ResultRenderer interface
    37. -
    38.     *   - a string like "HTML" or "XML". The appropriate renderer is used then.
    39. -
    40.     *   - a full class name, e.g. SparqlEngineDb_ResultRenderer_XML
    41. -
    42.     *
    43. -
    44.     *   @param array    $arRecordSets   Array of anything ADOConnection::Execute() can return
    45. -
    46.     *   @param SparqlEngineDb $engine   Sparql database engine.
    47. -
    48.     *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
    49. -
    50.     *
    51. -
    52.     *   @return mixed   Most likely an array or a boolean value,
    53. -
    54.     *                    or anything else as determined by $resultform
    55. -
    56.     */
    57. -
    58.     public static function convertFromDbResults($arRecordSetsSparqlEngineDb $engine$resultform false)
    59. -
    60.     {
    61. -
    62.         if (is_object($resultform)) {
    63. -
    64.             if ($resultform instanceof SparqlEngineDb_ResultRenderer{
    65. -
    66.                 return $resultform->convertFromDbResults(
    67. -
    68.                     $arRecordSets,
    69. -
    70.                     $engine->getQuery(),
    71. -
    72.                     $engine
    73. -
    74.                 );
    75. -
    76.             else {
    77. -
    78.                 throw new Exception(
    79. -
    80.                     'Result renderer object needs to implement'
    81. -
    82.                     . ' SparqlEngineDb_ResultRenderer interface'
    83. -
    84.                 );
    85. -
    86.             }
    87. -
    88.         }
    89. -
    90.  
    91. -
    92.         if ($resultform === false{
    93. -
    94.             $resultform 'Default';
    95. -
    96.         else if ($resultform == 'xml'{
    97. -
    98.             //kept for BC reasons
    99. -
    100.             $resultform 'XML';
    101. -
    102.         }
    103. -
    104.  
    105. -
    106.         if ($strClass self::loadClass($resultform)) {
    107. -
    108.             $rrObj new $strClass();
    109. -
    110.             if ($rrObj instanceof SparqlEngineDb_ResultRenderer{
    111. -
    112.                 return $rrObj->convertFromDbResults(
    113. -
    114.                     $arRecordSets,
    115. -
    116.                     $engine->getQuery(),
    117. -
    118.                     $engine
    119. -
    120.                 );
    121. -
    122.             else {
    123. -
    124.                 throw new Exception(
    125. -
    126.                     'Result renderer class "' $strClass '" needs to implement'
    127. -
    128.                     . ' SparqlEngineDb_ResultRenderer interface'
    129. -
    130.                 );
    131. -
    132.             }
    133. -
    134.         else {
    135. -
    136.             throw new Exception(
    137. -
    138.                 'Result renderer class "' $resultform '" could not be loaded.'
    139. -
    140.             );
    141. -
    142.         }
    143. -
    144.     }//public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false)
    145. -
    146.  
    147. -
    148.  
    149. -
    150.  
    151. -
    152.     /**
    153. -
    154.     *   Tries to load a given class if it doesn't exist,
    155. -
    156.     *   and returns true if the class can be used.
    157. -
    158.     *
    159. -
    160.     *   @param string $strClass Classname
    161. -
    162.     *   @return mixed Class name if the class is loaded and can be used, false if not.
    163. -
    164.     */
    165. -
    166.     protected static function loadClass($strClass)
    167. -
    168.     {
    169. -
    170.         if (class_exists($strClass)) {
    171. -
    172.             return $strClass;
    173. -
    174.         }
    175. -
    176.  
    177. -
    178.         //RAP style, shortcut notation
    179. -
    180.         $strFile 'SparqlEngineDb/ResultRenderer/' $strClass '.php';
    181. -
    182.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    183. -
    184.         if (class_exists('SparqlEngineDb_ResultRenderer_' $strClass)) {
    185. -
    186.             return 'SparqlEngineDb_ResultRenderer_' $strClass;
    187. -
    188.         }
    189. -
    190.  
    191. -
    192.         //RAP style
    193. -
    194.         $strFile str_replace('_''/'$strClass'.php';
    195. -
    196.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    197. -
    198.         if (class_exists($strClass)) {
    199. -
    200.             return $strClass;
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         //PEAR style
    207. -
    208.         @include_once $strFile;
    209. -
    210.         if (class_exists($strClass)) {
    211. -
    212.             return $strClass;
    213. -
    214.         }
    215. -
    216.  
    217. -
    218.         return false;
    219. -
    220.     }//protected static function loadClass($strClass)
    221. -
    222.  
    223. -
    224. }//class SparqlEngineDb_ResultConverter
    225. -
    226. ?>
    227. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html deleted file mode 100755 index aa93633b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRenderer.php.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - File Source for ResultRenderer.php - - - - - -

    Source for file ResultRenderer.php

    -

    Documentation is available at ResultRenderer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Result renderer interface that any result renderer needs to implement.
    8. -
    9. *   A result renderer converts the raw database results into a
    10. -
    11. *   - for the user - usable result format, e.g. php arrays, xml, json and
    12. -
    13. *   so on.
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     /**
    29. -
    30.     *   Converts the database results into the desired output format
    31. -
    32.     *   and returns the result.
    33. -
    34.     *
    35. -
    36.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    37. -
    38.     *   @param Query $query     SPARQL query object
    39. -
    40.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    41. -
    42.     *   @return mixed   The result as rendered by the result renderers.
    43. -
    44.     */
    45. -
    46.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine);
    47. -
    48.  
    49. -
    50. }//interface SparqlEngineDb_ResultRenderer
    51. -
    52.  
    53. -
    54. ?>
    55. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html deleted file mode 100755 index 35552c96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererDefault.php.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - File Source for Default.php - - - - - -

    Source for file Default.php

    -

    Documentation is available at Default.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Default RAP result renderer.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
    22. -
    23. {
    24. -
    25.  
    26. -
    27.     /**
    28. -
    29.     *   Defines the methods needed to create the types
    30. -
    31.     *   in $arVarAssignments.
    32. -
    33.     *   Key is the type (e.g. "s" for subject), and
    34. -
    35.     *   value the method's name.
    36. -
    37.     *
    38. -
    39.     *   @see $arVarAssignments
    40. -
    41.     *
    42. -
    43.     *   @var array 
    44. -
    45.     */
    46. -
    47.     protected $arCreationMethods = array(
    48. -
    49.         's' => 'createSubjectFromDbRecordSetPart',
    50. -
    51.         'p' => 'createPredicateFromDbRecordSetPart',
    52. -
    53.         'o' => 'createObjectFromDbRecordSetPart'
    54. -
    55.     );
    56. -
    57.  
    58. -
    59.  
    60. -
    61.  
    62. -
    63.     /**
    64. -
    65.     *   Converts the database results into the desired output format
    66. -
    67.     *   and returns the result.
    68. -
    69.     *
    70. -
    71.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    72. -
    73.     *   @param Query $query     SPARQL query object
    74. -
    75.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    76. -
    77.     *   @return mixed   The result as rendered by the result renderers.
    78. -
    79.     */
    80. -
    81.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    82. -
    83.     {
    84. -
    85.         $this->query    $query;
    86. -
    87.         $this->engine   $engine;
    88. -
    89.         $this->sg       $engine->getSqlGenerator();
    90. -
    91.  
    92. -
    93.         $strResultForm $this->query->getResultForm();
    94. -
    95.         switch ($strResultForm{
    96. -
    97.             case 'construct':
    98. -
    99.             case 'select':
    100. -
    101.             case 'select distinct':
    102. -
    103.                 $arResult $this->getVariableArrayFromRecordSets($arRecordSets$strResultForm);
    104. -
    105.  
    106. -
    107.                 //some result forms need more modification
    108. -
    109.                 switch ($strResultForm{
    110. -
    111.                     case 'construct';
    112. -
    113.                         $arResult $this->constructGraph(
    114. -
    115.                             $arResult,
    116. -
    117.                             $this->query->getConstructPattern()
    118. -
    119.                         );
    120. -
    121.                         break;
    122. -
    123.                     case 'describe';
    124. -
    125.                         $arResult $this->describeGraph($arResult);
    126. -
    127.                         break;
    128. -
    129.                 }
    130. -
    131.  
    132. -
    133.                 return $arResult;
    134. -
    135.                 break;
    136. -
    137.  
    138. -
    139.             case 'count':
    140. -
    141.             case 'ask':
    142. -
    143.                 if (count($arRecordSets1{
    144. -
    145.                     throw new Exception(
    146. -
    147.                         'More than one result set for a '
    148. -
    149.                         . $strResultForm ' query!'
    150. -
    151.                     );
    152. -
    153.                 }
    154. -
    155.  
    156. -
    157.                 $nCount 0;
    158. -
    159.                 $dbRecordSet reset($arRecordSets);
    160. -
    161.                 foreach ($dbRecordSet as $row{
    162. -
    163.                     $nCount intval($row['count']);
    164. -
    165.                     break;
    166. -
    167.                 }
    168. -
    169.  
    170. -
    171.                 if ($strResultForm == 'ask'{
    172. -
    173.                     return $nCount 0;
    174. -
    175.                 else {
    176. -
    177.                     return $nCount;
    178. -
    179.                 }
    180. -
    181.                 break;
    182. -
    183.  
    184. -
    185.             case 'describe':
    186. -
    187.             default:
    188. -
    189.                 throw new Exception('Unsupported result form: ' $strResultForm);
    190. -
    191.         }
    192. -
    193.  
    194. -
    195.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    196. -
    197.  
    198. -
    199.  
    200. -
    201.  
    202. -
    203.  
    204. -
    205.     protected function getVariableArrayFromRecordSets($arRecordSets$strResultForm)
    206. -
    207.     {
    208. -
    209.         $arResult array();
    210. -
    211.         foreach ($arRecordSets as $dbRecordSet{
    212. -
    213.             $arResult array_merge(
    214. -
    215.                 $arResult,
    216. -
    217.                 $this->getVariableArrayFromRecordSet($dbRecordSet$strResultForm)
    218. -
    219.             );
    220. -
    221.         }
    222. -
    223.         return $arResult;
    224. -
    225.     }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
    226. -
    227.  
    228. -
    229.  
    230. -
    231.  
    232. -
    233.     /**
    234. -
    235.     *   Converts a ADORecordSet object into an array of "rows" that
    236. -
    237.     *   are subarrays of variable => value pairs.
    238. -
    239.     *
    240. -
    241.     *   @param ADORecordSet $dbRecordSet    Anything ADOConnection::Execute() can return
    242. -
    243.     *   @return array 
    244. -
    245.     */
    246. -
    247.     protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet$strResultForm)
    248. -
    249.     {
    250. -
    251.         $arResult       array();
    252. -
    253.         switch ($strResultForm{
    254. -
    255.             case 'construct':
    256. -
    257.                 $arResultVars $this->query->getConstructPatternVariables();
    258. -
    259.                 break;
    260. -
    261.             default:
    262. -
    263.                 $arResultVars $this->query->getResultVars();
    264. -
    265.                 break;
    266. -
    267.         }
    268. -
    269.  
    270. -
    271.         if (in_array('*'$arResultVars)) {
    272. -
    273.             $arResultVars   array_keys($this->sg->arVarAssignments);
    274. -
    275.         }
    276. -
    277.  
    278. -
    279.         //work around bug in adodb:
    280. -
    281.         // ADORecordSet_empty does not implement php5 iterators
    282. -
    283.         if ($dbRecordSet->RowCount(<= 0{
    284. -
    285.             return array();
    286. -
    287.         }
    288. -
    289.  
    290. -
    291.         foreach ($dbRecordSet as $row{
    292. -
    293.             $arResultRow array();
    294. -
    295.             foreach ($arResultVars as $strVarName{
    296. -
    297.                 if (!isset($this->sg->arVarAssignments[$strVarName])) {
    298. -
    299.                     //variable is in select, but not in result (test: q-select-2)
    300. -
    301.                     $arResultRow[$strVarName'';
    302. -
    303.                 else {
    304. -
    305.                     $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    306. -
    307.                     $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    308. -
    309.                     $arResultRow[$strVarName$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    310. -
    311.                 }
    312. -
    313.             }
    314. -
    315.             $arResult[$arResultRow;
    316. -
    317.         }
    318. -
    319.         return $arResult;
    320. -
    321.     }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet)
    322. -
    323.  
    324. -
    325.  
    326. -
    327.  
    328. -
    329.     /**
    330. -
    331.     *   Creates an RDF Statement object for one of the variables
    332. -
    333.     *   contained in the given $dbRecordSet object.
    334. -
    335.     *
    336. -
    337.     *   @see convertFromDbResult() to understand $strVarBase necessity
    338. -
    339.     *
    340. -
    341.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    342. -
    343.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    344. -
    345.     *
    346. -
    347.     *   @return Statement   RDF statement object
    348. -
    349.     */
    350. -
    351.     protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase)
    352. -
    353.     {
    354. -
    355.         return new Statement(
    356. -
    357.             $this->createSubjectFromDbRecordSetPart  ($dbRecordSet$strVarBase),
    358. -
    359.             $this->createPredicateFromDbRecordSetPart($dbRecordSet$strVarBase),
    360. -
    361.             $this->createObjectFromDbRecordSetPart   ($dbRecordSet$strVarBase)
    362. -
    363.         );
    364. -
    365.     }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
    366. -
    367.  
    368. -
    369.  
    370. -
    371.  
    372. -
    373.     /**
    374. -
    375.     *   Creates an RDF subject object
    376. -
    377.     *   contained in the given $dbRecordSet object.
    378. -
    379.     *
    380. -
    381.     *   @see convertFromDbResult() to understand $strVarBase necessity
    382. -
    383.     *
    384. -
    385.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    386. -
    387.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    388. -
    389.     *
    390. -
    391.     *   @return Resource   RDF triple subject resource object
    392. -
    393.     */
    394. -
    395.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    396. -
    397.     {
    398. -
    399.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    400. -
    401.             //FIXME: should be NULL, but doesn't pass test
    402. -
    403.             return '';
    404. -
    405.         }
    406. -
    407.  
    408. -
    409.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    410. -
    411.             //null should be predicate which is always a resource
    412. -
    413.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    414. -
    415.         {
    416. -
    417.             $subject    new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    418. -
    419.         else {
    420. -
    421.             $subject    new BlankNode($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    422. -
    423.         }
    424. -
    425.         return $subject;
    426. -
    427.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    428. -
    429.  
    430. -
    431.  
    432. -
    433.  
    434. -
    435.     /**
    436. -
    437.     *   Creates an RDF predicate object
    438. -
    439.     *   contained in the given $dbRecordSet object.
    440. -
    441.     *
    442. -
    443.     *   @see convertFromDbResult() to understand $strVarBase necessity
    444. -
    445.     *
    446. -
    447.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    448. -
    449.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    450. -
    451.     *
    452. -
    453.     *   @return Resource   RDF triple predicate resource object
    454. -
    455.     */
    456. -
    457.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    458. -
    459.     {
    460. -
    461.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    462. -
    463.             //FIXME: should be NULL, but doesn't pass test
    464. -
    465.             return '';
    466. -
    467.         }
    468. -
    469.         $predicate      new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    470. -
    471.         return $predicate;
    472. -
    473.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    474. -
    475.  
    476. -
    477.  
    478. -
    479.  
    480. -
    481.     /**
    482. -
    483.     *   Creates an RDF object object
    484. -
    485.     *   contained in the given $dbRecordSet object.
    486. -
    487.     *
    488. -
    489.     *   @see convertFromDbResult() to understand $strVarBase necessity
    490. -
    491.     *
    492. -
    493.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    494. -
    495.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    496. -
    497.     *
    498. -
    499.     *   @return Resource   RDF triple object resource object
    500. -
    501.     */
    502. -
    503.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    504. -
    505.     {
    506. -
    507.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    508. -
    509.             //FIXME: should be NULL, but doesn't pass test
    510. -
    511.             return '';
    512. -
    513.         }
    514. -
    515.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    516. -
    517.             case 'r':
    518. -
    519.                 $object new Resource ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    520. -
    521.                 break;
    522. -
    523.             case 'b':
    524. -
    525.                 $object new BlankNode($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    526. -
    527.                 break;
    528. -
    529.             default:
    530. -
    531.                 $object new Literal(
    532. -
    533.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    534. -
    535.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']]
    536. -
    537.                 );
    538. -
    539.                 if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]{
    540. -
    541.                     $object->setDatatype($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]);
    542. -
    543.                 }
    544. -
    545.         }
    546. -
    547.         return $object;
    548. -
    549.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    550. -
    551.  
    552. -
    553.  
    554. -
    555.  
    556. -
    557.     /**
    558. -
    559.     * Constructs a result graph.
    560. -
    561.     *
    562. -
    563.     * @param  array         $arVartable       A table containing the result vars and their bindings
    564. -
    565.     * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
    566. -
    567.     * @return MemModel      The result graph which matches the CONSTRUCT pattern
    568. -
    569.     */
    570. -
    571.     protected function constructGraph($arVartable$constructPattern)
    572. -
    573.     {
    574. -
    575.         $resultGraph new MemModel();
    576. -
    577.  
    578. -
    579.         if (!$arVartable{
    580. -
    581.             return $resultGraph;
    582. -
    583.         }
    584. -
    585.  
    586. -
    587.         $tp $constructPattern->getTriplePattern();
    588. -
    589.  
    590. -
    591.         $bnode 0;
    592. -
    593.         foreach ($arVartable as $value{
    594. -
    595.             foreach ($tp as $triple{
    596. -
    597.                 $sub  $triple->getSubject();
    598. -
    599.                 $pred $triple->getPredicate();
    600. -
    601.                 $obj  $triple->getObject();
    602. -
    603.  
    604. -
    605.                 if (is_string($sub)  && $sub{1== '_'{
    606. -
    607.                     $sub  new BlankNode("_bN".$bnode);
    608. -
    609.                 }
    610. -
    611.                 if (is_string($pred&& $pred{1== '_'{
    612. -
    613.                     $pred new BlankNode("_bN".$bnode);
    614. -
    615.                 }
    616. -
    617.                 if (is_string($obj)  && $obj{1== '_'{
    618. -
    619.                     $obj  new BlankNode("_bN".$bnode);
    620. -
    621.                 }
    622. -
    623.  
    624. -
    625.  
    626. -
    627.                 if (is_string($sub)) {
    628. -
    629.                     $sub  $value[$sub];
    630. -
    631.                 }
    632. -
    633.                 if (is_string($pred)) {
    634. -
    635.                     $pred $value[$pred];
    636. -
    637.                 }
    638. -
    639.                 if (is_string($obj)) {
    640. -
    641.                     $obj  $value[$obj];
    642. -
    643.                 }
    644. -
    645.  
    646. -
    647.                 if ($sub !== "" && $pred !== "" && $obj !== ""{
    648. -
    649.                     $resultGraph->add(new Statement($sub,$pred,$obj));
    650. -
    651.                 }
    652. -
    653.             }
    654. -
    655.             $bnode++;
    656. -
    657.         }
    658. -
    659.         return $resultGraph;
    660. -
    661.     }//protected function constructGraph($arVartable, $constructPattern)
    662. -
    663.  
    664. -
    665. }//class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
    666. -
    667. ?>
    668. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:00 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html deleted file mode 100755 index e9cab70d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererHTML.php.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - File Source for HTML.php - - - - - -

    Source for file HTML.php

    -

    Documentation is available at HTML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Sparql DB HTML result renderer.
    10. -
    11. *
    12. -
    13. *   @author Christian Weiske <cweiske@cweiske.de>
    14. -
    15. *
    16. -
    17. *   @package sparql
    18. -
    19. */
    20. -
    21. class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
    22. -
    23. {
    24. -
    25.     /**
    26. -
    27.     *   If the result HTML should be wrapped in a div
    28. -
    29.     *   @var boolean 
    30. -
    31.     */
    32. -
    33.     protected $bWrap = true;
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     *   Defines the methods needed to create the types
    40. -
    41.     *   in $arVarAssignments.
    42. -
    43.     *   Key is the type (e.g. "s" for subject), and
    44. -
    45.     *   value the method's name.
    46. -
    47.     *
    48. -
    49.     *   @see $arVarAssignments
    50. -
    51.     *
    52. -
    53.     *   @var array 
    54. -
    55.     */
    56. -
    57.     protected $arCreationMethods = array(
    58. -
    59.         's' => 'createSubjectFromDbRecordSetPart',
    60. -
    61.         'p' => 'createPredicateFromDbRecordSetPart',
    62. -
    63.         'o' => 'createObjectFromDbRecordSetPart'
    64. -
    65.     );
    66. -
    67.  
    68. -
    69.  
    70. -
    71.  
    72. -
    73.     /**
    74. -
    75.     *   Converts the database results into nice HTML.
    76. -
    77.     *
    78. -
    79.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    80. -
    81.     *   @param Query $query     SPARQL query object
    82. -
    83.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    84. -
    85.     *   @return mixed   HTML code
    86. -
    87.     */
    88. -
    89.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    90. -
    91.     {
    92. -
    93.         $this->query $query;
    94. -
    95.         $this->sg    $engine->getSqlGenerator();
    96. -
    97.         $strCode     '';
    98. -
    99.  
    100. -
    101.         $strResultForm $query->getResultForm();
    102. -
    103.         switch ($strResultForm{
    104. -
    105.             case 'select':
    106. -
    107.             case 'select distinct':
    108. -
    109.                 $strCode $this->createTableFromRecords($arRecordSets);
    110. -
    111.                 break;
    112. -
    113.  
    114. -
    115.             case 'construct':
    116. -
    117.             case 'describe':
    118. -
    119.                 throw new Exception(
    120. -
    121.                     'Construct and describe are currently not supported by the'
    122. -
    123.                     . ' HTML renderer'
    124. -
    125.                 );
    126. -
    127.  
    128. -
    129.             case 'count':
    130. -
    131.             case 'ask':
    132. -
    133.                 if (count($arRecordSets1{
    134. -
    135.                     throw new Exception(
    136. -
    137.                         'More than one result set for a '
    138. -
    139.                         . $strResultForm ' query!'
    140. -
    141.                     );
    142. -
    143.                 }
    144. -
    145.  
    146. -
    147.                 $nCount 0;
    148. -
    149.                 $dbRecordSet reset($arRecordSets);
    150. -
    151.                 foreach ($dbRecordSet as $row{
    152. -
    153.                     $nCount intval($row['count']);
    154. -
    155.                     break;
    156. -
    157.                 }
    158. -
    159.  
    160. -
    161.                 if ($strResultForm == 'ask'{
    162. -
    163.                     $strCode 'There were results.';
    164. -
    165.                 else {
    166. -
    167.                     $strCode 'There are ' $nCount ' results.';
    168. -
    169.                 }
    170. -
    171.                 break;
    172. -
    173.  
    174. -
    175.             default:
    176. -
    177.                 throw new Exception('Unsupported result form: ' $strResultForm);
    178. -
    179.         }
    180. -
    181.  
    182. -
    183.         return $this->wrapCode($strCode);
    184. -
    185.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    186. -
    187.  
    188. -
    189.  
    190. -
    191.  
    192. -
    193.     protected function wrapCode($strCode)
    194. -
    195.     {
    196. -
    197.         if (!$this->bWrap{
    198. -
    199.             return $strCode;
    200. -
    201.         }
    202. -
    203.  
    204. -
    205.         return
    206. -
    207.             '<div class="SparqlEngineDb_ResultRenderer_HTML_result">' "\n"
    208. -
    209.             . $strCode "\n"
    210. -
    211.             . "</div>\n";
    212. -
    213.     }//protected function wrapCode($strCode)
    214. -
    215.  
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     protected function createTableFromRecords($arRecordSets)
    222. -
    223.     {
    224. -
    225.         $arResultVars $this->query->getResultVars();
    226. -
    227.  
    228. -
    229.         if (in_array('*'$arResultVars)) {
    230. -
    231.             $arResultVars   array_keys($this->sg->arVarAssignments);
    232. -
    233.         }
    234. -
    235.  
    236. -
    237.         $arResult array();
    238. -
    239.         foreach ($arRecordSets as $dbRecordSet{
    240. -
    241.             //work around bug in adodb:
    242. -
    243.             // ADORecordSet_empty does not implement php5 iterators
    244. -
    245.             if ($dbRecordSet->RowCount(<= 0{
    246. -
    247.                 return array();
    248. -
    249.             }
    250. -
    251.  
    252. -
    253.             foreach ($dbRecordSet as $row{
    254. -
    255.                 $arResultRow array();
    256. -
    257.                 foreach ($arResultVars as $strVarName{
    258. -
    259.                     if (!isset($this->sg->arVarAssignments[$strVarName])) {
    260. -
    261.                         //variable is in select, but not in result (test: q-select-2)
    262. -
    263.                         $arResultRow[$strVarName'';
    264. -
    265.                     else {
    266. -
    267.                         $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    268. -
    269.                         $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    270. -
    271.                         list($strCode$strColor$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    272. -
    273.                         $arResultRow[$strVarName'<td style="background-color: '
    274. -
    275.                             . $strColor '">' $strCode '</td>';
    276. -
    277.                     }
    278. -
    279.                 }
    280. -
    281.                 $arResult[$arResultRow;
    282. -
    283.             }
    284. -
    285.         }
    286. -
    287.  
    288. -
    289.         //I always wanted to to this :)
    290. -
    291.         return
    292. -
    293.             "<table border='1'>\n"
    294. -
    295.             . " <caption>SPARQL result with " count($arResult" rows</caption>\n"
    296. -
    297.             . " <thead><th>"
    298. -
    299.                 . implode('</th><th>'array_keys(reset($arResult)))
    300. -
    301.             . "</th></thead>\n"
    302. -
    303.             . " <tbody>\n  <tr>"
    304. -
    305.             . implode(
    306. -
    307.                 "</tr>\n  <tr>",
    308. -
    309.                 array_map(
    310. -
    311.                     create_function(
    312. -
    313.                         '$ar',
    314. -
    315.                         'return implode("", $ar);'
    316. -
    317.                     ),
    318. -
    319.                     $arResult
    320. -
    321.                 )
    322. -
    323.               )
    324. -
    325.             . "</tr>\n </tbody>\n"
    326. -
    327.             . "</table>\n";
    328. -
    329.     }//protected function createTableFromRecords($arRecordSets)
    330. -
    331.  
    332. -
    333.  
    334. -
    335.  
    336. -
    337.     /**
    338. -
    339.     *   Creates an RDF subject object
    340. -
    341.     *   contained in the given $dbRecordSet object.
    342. -
    343.     *
    344. -
    345.     *   @see convertFromDbResult() to understand $strVarBase necessity
    346. -
    347.     *
    348. -
    349.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    350. -
    351.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    352. -
    353.     *
    354. -
    355.     *   @return string HTML code
    356. -
    357.     */
    358. -
    359.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    360. -
    361.     {
    362. -
    363.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    364. -
    365.             return $this->getHtmlNull();
    366. -
    367.         }
    368. -
    369.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    370. -
    371.             //null should be predicate which is always a resource
    372. -
    373.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    374. -
    375.         {
    376. -
    377.             return $this->getHtmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    378. -
    379.         else {
    380. -
    381.             return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    382. -
    383.         }
    384. -
    385.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    386. -
    387.  
    388. -
    389.  
    390. -
    391.  
    392. -
    393.     /**
    394. -
    395.     *   Creates an RDF predicate object
    396. -
    397.     *   contained in the given $dbRecordSet object.
    398. -
    399.     *
    400. -
    401.     *   @see convertFromDbResult() to understand $strVarBase necessity
    402. -
    403.     *
    404. -
    405.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    406. -
    407.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    408. -
    409.     *
    410. -
    411.     *   @return string HTML code
    412. -
    413.     */
    414. -
    415.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    416. -
    417.     {
    418. -
    419.         if ($dbRecordSet->fields[$strVarBase .  '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    420. -
    421.             return $this->getHtmlNull();
    422. -
    423.         }
    424. -
    425.  
    426. -
    427.         return $this->getHtmlResource($dbRecordSet->fields[$strVarBase .  '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    428. -
    429.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    430. -
    431.  
    432. -
    433.  
    434. -
    435.  
    436. -
    437.     /**
    438. -
    439.     *   Creates an RDF object object
    440. -
    441.     *   contained in the given $dbRecordSet object.
    442. -
    443.     *
    444. -
    445.     *   @see convertFromDbResult() to understand $strVarBase necessity
    446. -
    447.     *
    448. -
    449.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    450. -
    451.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    452. -
    453.     *
    454. -
    455.     *   @return string HTML code
    456. -
    457.     */
    458. -
    459.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    460. -
    461.     {
    462. -
    463.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    464. -
    465.             return $this->getHtmlNull();
    466. -
    467.         }
    468. -
    469.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    470. -
    471.             case 'r':
    472. -
    473.                 return $this->getHtmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    474. -
    475.                 break;
    476. -
    477.             case 'b':
    478. -
    479.                 return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    480. -
    481.                 break;
    482. -
    483.             default:
    484. -
    485.                 return $this->getHtmlLiteral(
    486. -
    487.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    488. -
    489.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']],
    490. -
    491.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]
    492. -
    493.                 );
    494. -
    495.         }
    496. -
    497.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    498. -
    499.  
    500. -
    501.  
    502. -
    503.  
    504. -
    505.     protected function getHtmlNull()
    506. -
    507.     {
    508. -
    509.         return array('<pre>NULL</pre>''#FFF');
    510. -
    511.     }//protected function getHtmlNull()
    512. -
    513.  
    514. -
    515.  
    516. -
    517.  
    518. -
    519.     protected function getHtmlBlank($value)
    520. -
    521.     {
    522. -
    523.         return array('<i>Blank node</i>'HTML_TABLE_BNODE_COLOR);
    524. -
    525.     }//protected function getHtmlBlank($value)
    526. -
    527.  
    528. -
    529.  
    530. -
    531.  
    532. -
    533.     protected function getHtmlResource($value)
    534. -
    535.     {
    536. -
    537.         return array(
    538. -
    539.             htmlspecialchars($value),
    540. -
    541.             HTML_TABLE_RESOURCE_COLOR
    542. -
    543.         );
    544. -
    545.     }//protected function getHtmlResource($value)
    546. -
    547.  
    548. -
    549.  
    550. -
    551.  
    552. -
    553.     protected function getHtmlLiteral($value$language$datatype)
    554. -
    555.     {
    556. -
    557.         $strCode htmlspecialchars($value);
    558. -
    559.         if ($language{
    560. -
    561.             $strCode ' <i>xml:lang</i>=' $language;
    562. -
    563.         }
    564. -
    565.         if ($datatype{
    566. -
    567.             $strCode ' <i>rdf:type</i>=' $datatype;
    568. -
    569.         }
    570. -
    571.         return array($strCodeHTML_TABLE_LITERAL_COLOR);
    572. -
    573.     }//protected function getHtmlLiteral($value, $language, $datatype)
    574. -
    575.  
    576. -
    577.  
    578. -
    579. }//class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
    580. -
    581.  
    582. -
    583. ?>
    584. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html deleted file mode 100755 index 3fa4db86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbResultRendererXML.php.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - File Source for XML.php - - - - - -

    Source for file XML.php

    -

    Documentation is available at XML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Sparql DB XML result renderer as defined by
    10. -
    11. *   http://www.w3.org/TR/rdf-sparql-XMLres/
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
    24. -
    25. {
    26. -
    27.  
    28. -
    29.     /**
    30. -
    31.     *   Defines the methods needed to create the types
    32. -
    33.     *   in $arVarAssignments.
    34. -
    35.     *   Key is the type (e.g. "s" for subject), and
    36. -
    37.     *   value the method's name.
    38. -
    39.     *
    40. -
    41.     *   @see $arVarAssignments
    42. -
    43.     *
    44. -
    45.     *   @var array 
    46. -
    47.     */
    48. -
    49.     protected $arCreationMethods = array(
    50. -
    51.         's' => 'createSubjectFromDbRecordSetPart',
    52. -
    53.         'p' => 'createPredicateFromDbRecordSetPart',
    54. -
    55.         'o' => 'createObjectFromDbRecordSetPart'
    56. -
    57.     );
    58. -
    59.  
    60. -
    61.  
    62. -
    63.  
    64. -
    65.     /**
    66. -
    67.     *   Converts the database results into nice HTML.
    68. -
    69.     *
    70. -
    71.     *   @param array $arRecordSets  Array of (possibly several) SQL query results.
    72. -
    73.     *   @param Query $query     SPARQL query object
    74. -
    75.     *   @param SparqlEngineDb $engine   Sparql Engine to query the database
    76. -
    77.     *   @return mixed   HTML code
    78. -
    79.     */
    80. -
    81.     public function convertFromDbResults($arRecordSetsQuery $querySparqlEngineDb $engine)
    82. -
    83.     {
    84. -
    85.         $this->query $query;
    86. -
    87.         $this->sg    $engine->getSqlGenerator();
    88. -
    89.         $strCode     '';
    90. -
    91.  
    92. -
    93.         $strResultForm $query->getResultForm();
    94. -
    95.         switch ($strResultForm{
    96. -
    97.             case 'select':
    98. -
    99.             case 'select distinct':
    100. -
    101.                 $strCode $this->createFromRecords($arRecordSets$strResultForm);
    102. -
    103.                 break;
    104. -
    105.  
    106. -
    107.             case 'construct':
    108. -
    109.             case 'describe':
    110. -
    111.                 throw new Exception(
    112. -
    113.                     'Construct and describe are not supported by the'
    114. -
    115.                     . ' XML renderer'
    116. -
    117.                 );
    118. -
    119.  
    120. -
    121.             case 'count':
    122. -
    123.             case 'ask':
    124. -
    125.                 if (count($arRecordSets1{
    126. -
    127.                     throw new Exception(
    128. -
    129.                         'More than one result set for a '
    130. -
    131.                         . $strResultForm ' query!'
    132. -
    133.                     );
    134. -
    135.                 }
    136. -
    137.  
    138. -
    139.                 $nCount 0;
    140. -
    141.                 $dbRecordSet reset($arRecordSets);
    142. -
    143.                 foreach ($dbRecordSet as $row{
    144. -
    145.                     $nCount intval($row['count']);
    146. -
    147.                     break;
    148. -
    149.                 }
    150. -
    151.  
    152. -
    153.                 if ($strResultForm == 'ask'{
    154. -
    155.                     $strCode $this->getHead()
    156. -
    157.                         . '  <boolean>'
    158. -
    159.                         . self::getSpokenBoolean($nCount 0)
    160. -
    161.                         . '</boolean>';
    162. -
    163.                 else {
    164. -
    165.                     $strCode $this->getHead()
    166. -
    167.                         . '  <int>'
    168. -
    169.                         . $nCount
    170. -
    171.                         . '</int>';
    172. -
    173.                 }
    174. -
    175.                 break;
    176. -
    177.  
    178. -
    179.             default:
    180. -
    181.                 throw new Exception('Unsupported result form: ' $strResultForm);
    182. -
    183.         }
    184. -
    185.  
    186. -
    187.         return $this->wrapCode($strCode);
    188. -
    189.     }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
    190. -
    191.  
    192. -
    193.  
    194. -
    195.  
    196. -
    197.     protected function wrapCode($strCode)
    198. -
    199.     {
    200. -
    201.         return <<<EOT
    202. -
    203. <?xml version="1.0"?>
    204. -
    205. <sparql xmlns="http://www.w3.org/2005/sparql-results#">
    206. -
    207.  
    208. -
    209. EOT            . $strCode "\n"
    210. -
    211.             . "</sparql>\n";
    212. -
    213.     }//protected function wrapCode($strCode)
    214. -
    215.  
    216. -
    217.  
    218. -
    219.  
    220. -
    221.     protected function getHead($strXml '')
    222. -
    223.     {
    224. -
    225.         return "  <head>\n"
    226. -
    227.             . $strXml
    228. -
    229.             . "  </head>\n";
    230. -
    231.     }//protected function getHead($strXml = '')
    232. -
    233.  
    234. -
    235.  
    236. -
    237.  
    238. -
    239.     protected function createFromRecords($arRecordSets$strResultForm)
    240. -
    241.     {
    242. -
    243.         $arResultVars $this->query->getResultVars();
    244. -
    245.  
    246. -
    247.         if (in_array('*'$arResultVars)) {
    248. -
    249.             $arResultVars   array_keys($this->sg->arVarAssignments);
    250. -
    251.         }
    252. -
    253.  
    254. -
    255.         $strHeadXml $this->getHead(
    256. -
    257.             "    <variable name=\""
    258. -
    259.             . implode(
    260. -
    261.                 "\"/>\n    <variable name=\"",
    262. -
    263.                 $arResultVars
    264. -
    265.             )
    266. -
    267.             . "\"/>\n"
    268. -
    269.         );
    270. -
    271.  
    272. -
    273.         $arResult array();
    274. -
    275.         foreach ($arRecordSets as $dbRecordSet{
    276. -
    277.             //work around bug in adodb:
    278. -
    279.             // ADORecordSet_empty does not implement php5 iterators
    280. -
    281.             if ($dbRecordSet->RowCount(<= 0{
    282. -
    283.                 return array();
    284. -
    285.             }
    286. -
    287.  
    288. -
    289.             foreach ($dbRecordSet as $row{
    290. -
    291.                 $arResultRow array();
    292. -
    293.                 foreach ($arResultVars as $strVarName{
    294. -
    295.                     if (!isset($this->sg->arVarAssignments[$strVarName])) {
    296. -
    297.                         //variable is in select, but not in result (test: q-select-2)
    298. -
    299.                         $arResultRow[$strVarName'';
    300. -
    301.                     else {
    302. -
    303.                         $arVarSettings  $this->sg->arVarAssignments[$strVarName];
    304. -
    305.                         $strMethod      $this->arCreationMethods[$arVarSettings[1]];
    306. -
    307.                         $arResultRow[$strVarName$this->$strMethod($dbRecordSet$arVarSettings[0]$strVarName);
    308. -
    309.                     }
    310. -
    311.                 }
    312. -
    313.                 $arResult[$arResultRow;
    314. -
    315.             }
    316. -
    317.         }
    318. -
    319.  
    320. -
    321.  
    322. -
    323.         $arSM $this->query->getSolutionModifier();
    324. -
    325.  
    326. -
    327.         return
    328. -
    329.             $strHeadXml
    330. -
    331.             . '  <results ordered="'
    332. -
    333.                 . self::getSpokenBoolean($arSM['order by'!== null)
    334. -
    335.                 . '" distinct="'
    336. -
    337.                 . self::getSpokenBoolean($strResultForm == 'select distinct')
    338. -
    339.                 . '">' "\n"
    340. -
    341.             . $this->getResultXml($arResult)
    342. -
    343.             . "  </results>\n";
    344. -
    345.     }//protected function createFromRecords($arRecordSets)
    346. -
    347.  
    348. -
    349.  
    350. -
    351.  
    352. -
    353.     protected function getResultXml($arResult)
    354. -
    355.     {
    356. -
    357.         $strCode '';
    358. -
    359.         foreach ($arResult as $arSet{
    360. -
    361.             $strCode .= "    <result>\n";
    362. -
    363.             foreach ($arSet as $strVarName => $strValue{
    364. -
    365.                 if ($strValue !== null{
    366. -
    367.                     $strCode .= '      <binding name="' $strVarName '">'
    368. -
    369.                         . $strValue
    370. -
    371.                         . "</binding>\n";
    372. -
    373.                 }
    374. -
    375.             }
    376. -
    377.             $strCode .= "    </result>\n";
    378. -
    379.         }
    380. -
    381.         return $strCode;
    382. -
    383.     }//protected function getResultXml($arResult)
    384. -
    385.  
    386. -
    387.  
    388. -
    389.  
    390. -
    391.     protected static function getSpokenBoolean($b)
    392. -
    393.     {
    394. -
    395.         return $b 'true' 'false';
    396. -
    397.     }//protected static function getSpokenBoolean($b)
    398. -
    399.  
    400. -
    401.  
    402. -
    403.  
    404. -
    405.     /**
    406. -
    407.     *   Creates an RDF subject object
    408. -
    409.     *   contained in the given $dbRecordSet object.
    410. -
    411.     *
    412. -
    413.     *   @see convertFromDbResult() to understand $strVarBase necessity
    414. -
    415.     *
    416. -
    417.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    418. -
    419.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    420. -
    421.     *
    422. -
    423.     *   @return string HTML code
    424. -
    425.     */
    426. -
    427.     protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    428. -
    429.     {
    430. -
    431.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    432. -
    433.             return $this->getXmlNull();
    434. -
    435.         }
    436. -
    437.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
    438. -
    439.             //null should be predicate which is always a resource
    440. -
    441.          || $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
    442. -
    443.         {
    444. -
    445.             return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    446. -
    447.         else {
    448. -
    449.             return $this->getXmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    450. -
    451.         }
    452. -
    453.     }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    454. -
    455.  
    456. -
    457.  
    458. -
    459.  
    460. -
    461.     /**
    462. -
    463.     *   Creates an RDF predicate object
    464. -
    465.     *   contained in the given $dbRecordSet object.
    466. -
    467.     *
    468. -
    469.     *   @see convertFromDbResult() to understand $strVarBase necessity
    470. -
    471.     *
    472. -
    473.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    474. -
    475.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    476. -
    477.     *
    478. -
    479.     *   @return string HTML code
    480. -
    481.     */
    482. -
    483.     protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    484. -
    485.     {
    486. -
    487.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    488. -
    489.             return $this->getXmlNull();
    490. -
    491.         }
    492. -
    493.  
    494. -
    495.         return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    496. -
    497.     }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    498. -
    499.  
    500. -
    501.  
    502. -
    503.  
    504. -
    505.     /**
    506. -
    507.     *   Creates an RDF object object
    508. -
    509.     *   contained in the given $dbRecordSet object.
    510. -
    511.     *
    512. -
    513.     *   @see convertFromDbResult() to understand $strVarBase necessity
    514. -
    515.     *
    516. -
    517.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    518. -
    519.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    520. -
    521.     *
    522. -
    523.     *   @return string HTML code
    524. -
    525.     */
    526. -
    527.     protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet$strVarBase$strVarName)
    528. -
    529.     {
    530. -
    531.         if ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']] === null{
    532. -
    533.             return $this->getXmlNull();
    534. -
    535.         }
    536. -
    537.         switch ($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_is']]{
    538. -
    539.             case 'r':
    540. -
    541.                 return $this->getXmlResource($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    542. -
    543.                 break;
    544. -
    545.             case 'b':
    546. -
    547.                 return $this->getXmlBlank($dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']]);
    548. -
    549.                 break;
    550. -
    551.             default:
    552. -
    553.                 return $this->getXmlLiteral(
    554. -
    555.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_value']],
    556. -
    557.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_lang']],
    558. -
    559.                     $dbRecordSet->fields[$strVarBase '.' $this->sg->arVarAssignments[$strVarName]['sql_type']]
    560. -
    561.                 );
    562. -
    563.         }
    564. -
    565.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    566. -
    567.  
    568. -
    569.  
    570. -
    571.  
    572. -
    573.     protected function getXmlNull()
    574. -
    575.     {
    576. -
    577.         return null;
    578. -
    579.     }//protected function getHtmlNull()
    580. -
    581.  
    582. -
    583.  
    584. -
    585.  
    586. -
    587.     protected function getXmlBlank($value)
    588. -
    589.     {
    590. -
    591.         return '<bnode>' $value '</bnode>';
    592. -
    593.     }//protected function getHtmlBlank($value)
    594. -
    595.  
    596. -
    597.  
    598. -
    599.  
    600. -
    601.     protected function getXmlResource($value)
    602. -
    603.     {
    604. -
    605.         return '<uri>' htmlspecialchars($value'</uri>';
    606. -
    607.     }//protected function getHtmlResource($value)
    608. -
    609.  
    610. -
    611.  
    612. -
    613.  
    614. -
    615.     protected function getXmlLiteral($value$language$datatype)
    616. -
    617.     {
    618. -
    619.         $strCode '<literal';
    620. -
    621.         if ($language{
    622. -
    623.             $strCode ' xml:lang="' $language '"';
    624. -
    625.         }
    626. -
    627.         if ($datatype{
    628. -
    629.             $strCode ' datatype="' $datatype '"';
    630. -
    631.         }
    632. -
    633.         $strCode .= '>' htmlspecialchars($value'</literal>';
    634. -
    635.         return $strCode;
    636. -
    637.     }//protected function getHtmlLiteral($value, $language, $datatype)
    638. -
    639.  
    640. -
    641. }//class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
    642. -
    643.  
    644. -
    645. ?>
    646. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html deleted file mode 100755 index 1b84e630..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGenerator.php.html +++ /dev/null @@ -1,915 +0,0 @@ - - - - - - File Source for SqlGenerator.php - - - - - -

    Source for file SqlGenerator.php

    -

    Documentation is available at SqlGenerator.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/TypeSorter.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/FilterGenerator.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/SqlGeneratorException.php';
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. *   Creates sql statements from a Query object
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     public $query = null;
    29. -
    30.  
    31. -
    32.     /**
    33. -
    34.     *   Determines which variables can be found
    35. -
    36.     *   in which SQL result column.
    37. -
    38.     *   @example
    39. -
    40.     *    array(
    41. -
    42.     *        '?person' => array('t1', 's'),
    43. -
    44.     '       '?p'      => array('t1', 'p'),
    45. -
    46.     *        '?mbox'   => array('t2', 'o')
    47. -
    48.     *    )
    49. -
    50.     *    Would express that variable ?person is the subject
    51. -
    52.     *    in result table t1, and ?mbox is the object in
    53. -
    54.     *    table t2.
    55. -
    56.     *
    57. -
    58.     *   @see $arCreationMethods
    59. -
    60.     *
    61. -
    62.     *   @internal The array is created in createSql()
    63. -
    64.     *    and used in convertFromDbResult().
    65. -
    66.     *
    67. -
    68.     *   @var array 
    69. -
    70.     */
    71. -
    72.     public $arVarAssignments = array();
    73. -
    74.  
    75. -
    76.     /**
    77. -
    78.     *   Array of variable name => table.col assignments
    79. -
    80.     *   for all variables used in the query not only
    81. -
    82.     *   the ones that shall be returned.
    83. -
    84.     *
    85. -
    86.     *   @example
    87. -
    88.     *    array(
    89. -
    90.     *        '?person'   => 't0.subject'
    91. -
    92.     *    )
    93. -
    94.     *
    95. -
    96.     *   @var array 
    97. -
    98.     */
    99. -
    100.     public $arUsedVarAssignments = array();
    101. -
    102.  
    103. -
    104.     /**
    105. -
    106.     *   Array of arrays that contain all variable names
    107. -
    108.     *   which are to be found in the result of
    109. -
    110.     *   an sql statement in a union.
    111. -
    112.     *
    113. -
    114.     *   @example
    115. -
    116.     *    array(
    117. -
    118.     *        0 => array(
    119. -
    120.     *            '?person' => 's',
    121. -
    122.     *            '?p' => 'o'
    123. -
    124.     *        ),
    125. -
    126.     *        1 => array(
    127. -
    128.     *            '?person' => 's',
    129. -
    130.     *            '?mbox' => 'o'
    131. -
    132.     *        )
    133. -
    134.     *    )
    135. -
    136.     *
    137. -
    138.     *   @var array 
    139. -
    140.     */
    141. -
    142.     public $arUnionVarAssignments = array();
    143. -
    144.  
    145. -
    146.     /**
    147. -
    148.     *   Which variables have been used as which type?
    149. -
    150.     *   key is variable name, value is an array of
    151. -
    152.     *   max. three keys (s, p, o)
    153. -
    154.     *
    155. -
    156.     *   @example
    157. -
    158.     *    array(
    159. -
    160.     *        '?person' => array(
    161. -
    162.     *            's' => true
    163. -
    164.     *        ),
    165. -
    166.     *        '?mbox' => array(
    167. -
    168.     *            'o' => true
    169. -
    170.     *        )
    171. -
    172.     *    )
    173. -
    174.     *
    175. -
    176.     *   @var array 
    177. -
    178.     */
    179. -
    180.     protected $arUsedVarTypes = array();
    181. -
    182.  
    183. -
    184.     /**
    185. -
    186.     *   Array with placeholders of prepared statements variables.
    187. -
    188.     *   key is the variable name (without "??"), value is the
    189. -
    190.     *   placeholder.
    191. -
    192.     *   @var array 
    193. -
    194.     */
    195. -
    196.     protected $arPlaceholders = array();
    197. -
    198.  
    199. -
    200.     /**
    201. -
    202.     *   Column names for subjects, predicates and
    203. -
    204.     *   objects for easy access via their character
    205. -
    206.     *   names (spo).
    207. -
    208.     *
    209. -
    210.     *   @var array 
    211. -
    212.     */
    213. -
    214.     public static $arTableColumnNames array(
    215. -
    216.         's' => array(
    217. -
    218.             'value' => 'subject',
    219. -
    220.             'is'    => 'subject_is'
    221. -
    222.         ),
    223. -
    224.         'p' => array(
    225. -
    226.             'value' => 'predicate'
    227. -
    228.         ),
    229. -
    230.         'o' => array(
    231. -
    232.             'value' => 'object',
    233. -
    234.             'is'    => 'object_is'
    235. -
    236.         )
    237. -
    238.     );
    239. -
    240.  
    241. -
    242.     /**
    243. -
    244.     *   Current UNION part number
    245. -
    246.     *   @var int 
    247. -
    248.     */
    249. -
    250.     protected $nUnionCount = 0;
    251. -
    252.  
    253. -
    254.     protected $nSqlVariableNameCount = 0;
    255. -
    256.  
    257. -
    258.  
    259. -
    260.  
    261. -
    262.     public function __construct(Query $queryADOConnection $dbConn$modelID)
    263. -
    264.     {
    265. -
    266.         $this->query   = $query;
    267. -
    268.         $this->dbConn  $dbConn;
    269. -
    270.         $this->modelID $modelID;
    271. -
    272.     }//public function __construct(Query $query, ADOConnection $dbConn, $modelID)
    273. -
    274.  
    275. -
    276.  
    277. -
    278.  
    279. -
    280.     /**
    281. -
    282.     *   Creates an SQL query string from the given Sparql query object.
    283. -
    284.     *
    285. -
    286.     *   @internal uses $query variable
    287. -
    288.     *
    289. -
    290.     *   @return array       Array of arrays of SQL query string parts: select, from and where
    291. -
    292.     *
    293. -
    294.     *   @throws SparqlEngineDb_SqlGeneratorException   If there is no variable in the result set.
    295. -
    296.     */
    297. -
    298.     function createSql()
    299. -
    300.     {
    301. -
    302. //var_dump($this->query);
    303. -
    304.         $arSelect   array();
    305. -
    306.         $arFrom     array();
    307. -
    308.         $arWhere    array();
    309. -
    310.  
    311. -
    312.         $strResultForm $this->query->getResultForm();
    313. -
    314.         $filterGen     new SparqlEngineDb_FilterGenerator($this);
    315. -
    316.         switch ($strResultForm{
    317. -
    318.             case 'construct':
    319. -
    320.                 $arResultVars $this->query->getConstructPatternVariables();
    321. -
    322.                 break;
    323. -
    324.             default:
    325. -
    326.                 $arResultVars $this->query->getResultVars();
    327. -
    328.                 break;
    329. -
    330.         }
    331. -
    332.  
    333. -
    334.         $this->nTableId                 0;
    335. -
    336.         $this->nGraphPatternCount       0;
    337. -
    338.         $this->nUnionCount              = 0;
    339. -
    340.         $this->nUnionTriplePatternCount 0;
    341. -
    342.         $this->arUnionVarAssignments[0array();
    343. -
    344.  
    345. -
    346.         foreach ($this->query->getResultPart(as $graphPattern{
    347. -
    348.             if (self::isEmptyPattern($graphPattern)) {
    349. -
    350.                 continue;
    351. -
    352.             }
    353. -
    354.             if ($graphPattern->getUnion(!== null{
    355. -
    356.                 ++$this->nUnionCount;
    357. -
    358.                 $this->nUnionTriplePatternCount 0;
    359. -
    360.                 $this->nGraphPatternCount 0;
    361. -
    362.                 $this->arUnionVarAssignments[$this->nUnionCountarray();
    363. -
    364.             }
    365. -
    366.             $this->nTriplePatternCount 0;
    367. -
    368.             $arTriplePattern $graphPattern->getTriplePattern();
    369. -
    370.             if ($arTriplePattern != null{
    371. -
    372.                 foreach ($arTriplePattern as $triplePattern{
    373. -
    374.                     list (
    375. -
    376.                         $arSelect[$this->nUnionCount][],
    377. -
    378.                         $arFrom  [$this->nUnionCount][],
    379. -
    380.                         $arWhere [$this->nUnionCount][]
    381. -
    382.                     =
    383. -
    384.                         $this->getTripleSql(
    385. -
    386.                             $triplePattern,
    387. -
    388.                             $graphPattern,
    389. -
    390.                             $arResultVars
    391. -
    392.                         );
    393. -
    394.                     ++$this->nTableId;
    395. -
    396.                     ++$this->nTriplePatternCount;
    397. -
    398.                     ++$this->nUnionTriplePatternCount;
    399. -
    400.                 }
    401. -
    402.             }
    403. -
    404.             ++$this->nGraphPatternCount;
    405. -
    406.  
    407. -
    408.         }
    409. -
    410.  
    411. -
    412.         //constraints extra. needed, since OPTIONAL parts are put after
    413. -
    414.         // the current pattern while the constraint already refers to variables
    415. -
    416.         // defined in there
    417. -
    418.         $this->nGraphPatternCount       0;
    419. -
    420.         $this->nUnionCount              = 0;
    421. -
    422.         foreach ($this->query->getResultPart(as $graphPattern{
    423. -
    424.             if ($graphPattern->getUnion(!== null{
    425. -
    426.                 ++$this->nUnionCount;
    427. -
    428.             }
    429. -
    430.             $arConstraints $graphPattern->getConstraint();
    431. -
    432.             if ($arConstraints != null{
    433. -
    434.                 foreach ($arConstraints as $constraint{
    435. -
    436.                     $arWhere[$this->nUnionCount][count($arWhere[$this->nUnionCount]1]
    437. -
    438.                      .= $filterGen->createFilterSql(
    439. -
    440.                         $constraint->getTree(),
    441. -
    442.                         $graphPattern->getOptional(!== null,
    443. -
    444.                         $this->nUnionCount
    445. -
    446.                     );
    447. -
    448.                 }
    449. -
    450.             }
    451. -
    452.             ++$this->nGraphPatternCount;
    453. -
    454.         }
    455. -
    456.  
    457. -
    458.         $arSelect    $this->createEqualSelects($arSelect);
    459. -
    460.         $arStrSelect array();
    461. -
    462.  
    463. -
    464.         switch ($strResultForm{
    465. -
    466.             case 'construct':
    467. -
    468.             case 'describe':
    469. -
    470.                 $strSelectType 'SELECT';
    471. -
    472.             case 'select':
    473. -
    474.             case 'select distinct':
    475. -
    476.                 if (!isset($strSelectType)) {
    477. -
    478.                     $strSelectType $strResultForm;
    479. -
    480.                 }
    481. -
    482.                 foreach ($arSelect as $nUnionCount => $arSelectPart{
    483. -
    484.                     $arSelectPart self::removeNull($arSelectPart);
    485. -
    486.                     if (count($arSelectPart== 0{
    487. -
    488.                         throw new SparqlEngineDb_SqlGeneratorException('No variable that could be returned.');
    489. -
    490.                     }
    491. -
    492.                     $arStrSelect[$nUnionCountstrtoupper($strSelectType' ' implode(', '   $arSelectPart);
    493. -
    494.                 }
    495. -
    496.                 break;
    497. -
    498.  
    499. -
    500.             case 'ask':
    501. -
    502.             case 'count':
    503. -
    504.                 $strSelect 'SELECT COUNT(*) as count';
    505. -
    506.                 break;
    507. -
    508.  
    509. -
    510.             default:
    511. -
    512.                 throw new SparqlEngineDb_SqlGeneratorException('Unsupported query type "' $strResultForm '"');
    513. -
    514.                 break;
    515. -
    516.         }
    517. -
    518.  
    519. -
    520.         $arSqls array();
    521. -
    522.         foreach ($arSelect as $nUnionCount => $arSelectPart{
    523. -
    524.             $arSqls[array(
    525. -
    526.                 'select'    => $arStrSelect[$nUnionCount],
    527. -
    528.                 'from'      => ' FROM '  implode(' '    self::removeNull($arFrom[$nUnionCount])),
    529. -
    530.                 'where'     => ' WHERE ' self::fixWhere(
    531. -
    532.                             implode(' '  self::removeNull($arWhere[$nUnionCount]))
    533. -
    534.                 )
    535. -
    536.             );
    537. -
    538.         }
    539. -
    540.         return $arSqls;
    541. -
    542.     }//function createSql()
    543. -
    544.  
    545. -
    546.  
    547. -
    548.  
    549. -
    550.     /**
    551. -
    552.     *   Creates some SQL statements from the given triple pattern
    553. -
    554.     *   array.
    555. -
    556.     *
    557. -
    558.     *   @param QueryTriple  $triple                 Array containing subject, predicate and object
    559. -
    560.     *   @param GraphPattern $graphPattern           Graph pattern object
    561. -
    562.     *
    563. -
    564.     *   @return array   Array consisting of on array and two string values:
    565. -
    566.     *                    SELECT, FROM and WHERE part
    567. -
    568.     */
    569. -
    570.     function getTripleSql(QueryTriple $tripleGraphPattern $graphPattern$arResultVars)
    571. -
    572.     {
    573. -
    574.         $arSelect  array();
    575. -
    576.         $strFrom    null;
    577. -
    578.         $strWhere   null;
    579. -
    580.         $strWhereEquality   '';
    581. -
    582.  
    583. -
    584.         $subject    $triple->getSubject();
    585. -
    586.         $predicate  $triple->getPredicate();
    587. -
    588.         $object     $triple->getObject();
    589. -
    590.  
    591. -
    592.         $arRefVars      array();
    593. -
    594.         $strTablePrefix 't' $this->nTableId;
    595. -
    596.  
    597. -
    598.         /**
    599. -
    600.         *   SELECT part
    601. -
    602.         *   We do select only the columns we need for variables
    603. -
    604.         */
    605. -
    606.         if (self::isVariable($subject)) {
    607. -
    608.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$subject])) {
    609. -
    610.                 //already selected -> add equality check
    611. -
    612.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    613. -
    614.                                 array($strTablePrefix's'),
    615. -
    616.                                 $this->arVarAssignments[$subject]
    617. -
    618.                             );
    619. -
    620.                 $this->arUsedVarTypes[$subject]['s'true;
    621. -
    622.             else {
    623. -
    624.                 if (isset($this->arVarAssignments[$subject][0])) {
    625. -
    626.                     $strTablePrefix $this->arVarAssignments[$subject][0];
    627. -
    628.                 }
    629. -
    630.                 $this->arVarAssignments[$subjectarray($strTablePrefix's');
    631. -
    632.                 $this->arUnionVarAssignments[$this->nUnionCount][$subjectarray($strTablePrefix's');
    633. -
    634.                 $this->arUsedVarTypes[$subject]['s'true;
    635. -
    636.                 if (self::isResultVar($subject$arResultVars)) {
    637. -
    638.                     //new variable that needs to be selected
    639. -
    640.                     $arSelect[$subjectarray(
    641. -
    642.                         $strTablePrefix '.subject as "'    $strTablePrefix '.' $this->getSqlVariableNameValue($subject'"',
    643. -
    644.                         $strTablePrefix '.subject_is as "' $strTablePrefix '.' $this->getSqlVariableNameIs($subject'"'
    645. -
    646.                     );
    647. -
    648.                     if (isset($this->arUsedVarAssignments[$subject])) {
    649. -
    650.                         $arRefVars[$subject$strTablePrefix '.subject';
    651. -
    652.                     else {
    653. -
    654.                         $this->arUsedVarAssignments[$subject$strTablePrefix '.subject';
    655. -
    656.                     }
    657. -
    658.                 }
    659. -
    660.             }
    661. -
    662.         }
    663. -
    664.  
    665. -
    666.         if (self::isVariable($predicate)) {
    667. -
    668.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$predicate])) {
    669. -
    670.                 //already selected -> add equality check
    671. -
    672.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    673. -
    674.                                 array($strTablePrefix'p'),
    675. -
    676.                                 $this->arVarAssignments[$predicate]
    677. -
    678.                             );
    679. -
    680.                 $this->arUsedVarTypes[$predicate]['p'true;
    681. -
    682.             else {
    683. -
    684.                 if (isset($this->arVarAssignments[$predicate][0])) {
    685. -
    686.                     $strTablePrefix $this->arVarAssignments[$predicate][0];
    687. -
    688.                 }
    689. -
    690.                 $this->arVarAssignments[$predicatearray($strTablePrefix'p');
    691. -
    692.                 $this->arUnionVarAssignments[$this->nUnionCount][$predicatearray($strTablePrefix'p');
    693. -
    694.                 $this->arUsedVarTypes[$predicate]['p'true;
    695. -
    696.                 if (self::isResultVar($predicate$arResultVars)) {
    697. -
    698.                     $arSelect[$predicatearray(
    699. -
    700.                         $strTablePrefix '.predicate as "' $strTablePrefix '.' $this->getSqlVariableNameValue($predicate'"'
    701. -
    702.                     );
    703. -
    704.                     if (isset($this->arUsedVarAssignments[$predicate])) {
    705. -
    706.                         $arRefVars[$predicate$strTablePrefix '.predicate';
    707. -
    708.                     else {
    709. -
    710.                         $this->arUsedVarAssignments[$predicate$strTablePrefix '.predicate';
    711. -
    712.                     }
    713. -
    714.                 }
    715. -
    716.             }
    717. -
    718.         }
    719. -
    720.  
    721. -
    722.         if (self::isVariable($object)) {
    723. -
    724.             if (isset($this->arUnionVarAssignments[$this->nUnionCount][$object])) {
    725. -
    726.                 //already selected -> add equality check
    727. -
    728.                 $strWhereEquality .= ' AND ' self::getSqlEqualityCondition(
    729. -
    730.                                 array($strTablePrefix'o'),
    731. -
    732.                                 $this->arVarAssignments[$object]
    733. -
    734.                             );
    735. -
    736.                 $this->arUsedVarTypes[$object]['o'true;
    737. -
    738.             else {
    739. -
    740.                 if (isset($this->arVarAssignments[$object][0])) {
    741. -
    742.                     $strTablePrefix $this->arVarAssignments[$object][0];
    743. -
    744.                 }
    745. -
    746.                 $this->arVarAssignments[$objectarray($strTablePrefix'o');
    747. -
    748.                 $this->arUnionVarAssignments[$this->nUnionCount][$objectarray($strTablePrefix'o');
    749. -
    750.                 $this->arUsedVarTypes[$object]['o'true;
    751. -
    752.                 if (self::isResultVar($object$arResultVars)) {
    753. -
    754.                     $arSelect[$objectarray(
    755. -
    756.                         $strTablePrefix '.object as "'     $strTablePrefix '.' $this->getSqlVariableNameValue($object'"',
    757. -
    758.                         $strTablePrefix '.object_is as "'  $strTablePrefix '.' $this->getSqlVariableNameIs($object'"',
    759. -
    760.                         $strTablePrefix '.l_language as "' $strTablePrefix '.' $this->getSqlVariableNameLanguage($object'"',
    761. -
    762.                         $strTablePrefix '.l_datatype as "' $strTablePrefix '.' $this->getSqlVariableNameDatatype($object'"',
    763. -
    764.                     );
    765. -
    766.                     if (isset($this->arUsedVarAssignments[$object])) {
    767. -
    768.                         $arRefVars[$object$strTablePrefix '.object';
    769. -
    770.                     else {
    771. -
    772.                         $this->arUsedVarAssignments[$object$strTablePrefix '.object';
    773. -
    774.                     }
    775. -
    776.                 }
    777. -
    778.                 if (isset($this->query->varLanguages[$object])
    779. -
    780.                  && $this->query->varLanguages[$object!== null
    781. -
    782.                 {
    783. -
    784.                     $strWhereEquality .=
    785. -
    786.                         ' AND ' $strTablePrefix '.l_language = "'
    787. -
    788.                         . addslashes($this->query->varLanguages[$object]'"';
    789. -
    790.                 }
    791. -
    792.                 if (isset($this->query->varDatatypes[$object])
    793. -
    794.                  && $this->query->varDatatypes[$object!== null
    795. -
    796.                 {
    797. -
    798.                     $strWhereEquality .=
    799. -
    800.                         ' AND ' $strTablePrefix '.l_datatype = "'
    801. -
    802.                         . addslashes($this->query->varDatatypes[$object]'"';
    803. -
    804.                 }
    805. -
    806.             }
    807. -
    808.         }
    809. -
    810.  
    811. -
    812.         /**
    813. -
    814.         *   FROM part
    815. -
    816.         */
    817. -
    818.         if ($this->nUnionTriplePatternCount == 0{
    819. -
    820.             //first FROM
    821. -
    822.             $strFrom    'statements as ' $strTablePrefix;
    823. -
    824.         else {
    825. -
    826.             //normal join
    827. -
    828.             $strFrom    'LEFT JOIN statements as ' $strTablePrefix
    829. -
    830.                         . ' ON t0.modelID = ' $strTablePrefix '.modelID';
    831. -
    832.             foreach ($arRefVars as $strRefVar => $strSqlVar{
    833. -
    834.                 $strFrom .= ' AND ' $this->arUsedVarAssignments[$strRefVar' = ' $strSqlVar;
    835. -
    836.             }
    837. -
    838.  
    839. -
    840.             if ($graphPattern->getOptional(!== null{
    841. -
    842.                 $strFrom .=  $this->getSqlCondition($subject  $strTablePrefix'subject')
    843. -
    844.                            . $this->getSqlCondition($predicate$strTablePrefix'predicate')
    845. -
    846.                            . $this->getSqlCondition($object   $strTablePrefix'object')
    847. -
    848.                            . $strWhereEquality;
    849. -
    850.             }
    851. -
    852.         }
    853. -
    854.  
    855. -
    856.  
    857. -
    858.         /**
    859. -
    860.         *   WHERE part
    861. -
    862.         */
    863. -
    864.         if ($this->nUnionTriplePatternCount == 0{
    865. -
    866.             $strWhere  $strTablePrefix '.modelID = ' intval($this->modelID);
    867. -
    868.         }
    869. -
    870.         if ($graphPattern->getOptional(=== null || $this->nGraphPatternCount == 0{
    871. -
    872.             $strWhere .=  $this->getSqlCondition($subject  $strTablePrefix'subject')
    873. -
    874.                         . $this->getSqlCondition($predicate$strTablePrefix'predicate')
    875. -
    876.                         . $this->getSqlCondition($object   $strTablePrefix'object')
    877. -
    878.                         . $strWhereEquality;
    879. -
    880.         }
    881. -
    882.  
    883. -
    884.         return array($arSelect$strFrom$strWhere);
    885. -
    886.     }//function getTripleSql(QueryTriple $triple)
    887. -
    888.  
    889. -
    890.  
    891. -
    892.  
    893. -
    894.     /**
    895. -
    896.     *   Creates SELECT statements that have the same number of columns.
    897. -
    898.     *   Needed for UNIONs.
    899. -
    900.     *
    901. -
    902.     *   @param array $arSelect  Array of arrays.
    903. -
    904.     *        array(
    905. -
    906.     *            //for each union part one
    907. -
    908.     *            0 => array(
    909. -
    910.     *                //foreach triple pattern
    911. -
    912.     *                0 => array(
    913. -
    914.     *                    '?person'   => array(
    915. -
    916.     *                        't0.subject as "t0.subject"'
    917. -
    918.     *                    )
    919. -
    920.     *                )
    921. -
    922.     *            )
    923. -
    924.     *        )
    925. -
    926.     *   @return array Array of SELECT strings
    927. -
    928.     */
    929. -
    930.     protected function createEqualSelects($arSelect)
    931. -
    932.     {
    933. -
    934.         $arNewSelect array();
    935. -
    936.         if (count($arSelect== 1{
    937. -
    938.             foreach ($arSelect[0as $arTripleVars{
    939. -
    940.                 $ar array();
    941. -
    942.                 foreach ($arTripleVars as $arVarParts{
    943. -
    944.                     $ar[implode(', '$arVarParts);
    945. -
    946.                 }
    947. -
    948.                 if (count($ar0{
    949. -
    950.                     $arNewSelect[0][implode(', '$ar);
    951. -
    952.                 }
    953. -
    954.             }
    955. -
    956.             return $arNewSelect;
    957. -
    958.         }
    959. -
    960.  
    961. -
    962.         $arVars array();
    963. -
    964.          foreach ($arSelect as $arUnionVars{
    965. -
    966.             foreach ($arUnionVars as $arTripleVars{
    967. -
    968.                 $arVars array_merge($arVarsarray_keys($arTripleVars));
    969. -
    970.             }
    971. -
    972.         }
    973. -
    974.         $arVars array_unique($arVars);
    975. -
    976.  
    977. -
    978.         foreach ($arSelect as $nUnionCount => $arUnionVars{
    979. -
    980.             $arSelectVars array();
    981. -
    982.             foreach ($arUnionVars as $arTripleVars{
    983. -
    984.                 foreach ($arTripleVars as $strVar => $arVarParts{
    985. -
    986.                     $arSelectVars[$strVar$arVarParts;
    987. -
    988.                 }
    989. -
    990.             }
    991. -
    992.  
    993. -
    994.             $ars array();
    995. -
    996.             foreach ($arVars as $strVar{
    997. -
    998.                 if (isset($arSelectVars[$strVar])) {
    999. -
    1000.                     $ar     $arSelectVars[$strVar];
    1001. -
    1002.                     $nCount count($arSelectVars[$strVar]);
    1003. -
    1004.                 else {
    1005. -
    1006.                     $ar     array();
    1007. -
    1008.                     $nCount 0;
    1009. -
    1010.                 }
    1011. -
    1012.  
    1013. -
    1014.                 if ($nCount == 0{
    1015. -
    1016.                     //nothing of this variable in this union part
    1017. -
    1018.                     $ar['NULL as '
    1019. -
    1020.                         . '"' $this->arVarAssignments[$strVar][0'.' $this->arVarAssignments[$strVar]['sql_value''"';
    1021. -
    1022.                 }
    1023. -
    1024.                 if ((
    1025. -
    1026.                     isset($this->arUsedVarTypes[$strVar]['o'])
    1027. -
    1028.                     || isset($this->arUsedVarTypes[$strVar]['s'])
    1029. -
    1030.                     && $nCount 2
    1031. -
    1032.                 {
    1033. -
    1034.                     //it's a subject or object, but we don't want the type
    1035. -
    1036.                     $ar['NULL as '
    1037. -
    1038.                         . '"' $this->arVarAssignments[$strVar][0'.' $this->arVarAssignments[$strVar]['sql_is''"';
    1039. -
    1040.                 }
    1041. -
    1042.                 if (isset($this->arUsedVarTypes[$strVar]['o']&& $nCount 4{
    1043. -
    1044.                     //it's a subject or object, but we don't want the type
    1045. -
    1046.                     if (isset($this->arVarAssignments[$strVar]['sql_lang'])) {
    1047. -
    1048.                         $strColLanguage $this->arVarAssignments[$strVar]['sql_lang'];
    1049. -
    1050.                     else {
    1051. -
    1052.                         $strColLanguage 'dummyLang';
    1053. -
    1054.                     }
    1055. -
    1056.                     if (isset($this->arVarAssignments[$strVar]['sql_type'])) {
    1057. -
    1058.                         $strColDatatype $this->arVarAssignments[$strVar]['sql_type'];
    1059. -
    1060.                     else {
    1061. -
    1062.                         $strColDatatype 'dummyType';
    1063. -
    1064.                     }
    1065. -
    1066.                     $ar['NULL as '
    1067. -
    1068.                         . '"' $this->arVarAssignments[$strVar][0'.' $strColLanguage '"';
    1069. -
    1070.                     $ar['NULL as '
    1071. -
    1072.                         . '"' $this->arVarAssignments[$strVar][0'.' $strColDatatype '"';
    1073. -
    1074.                 }
    1075. -
    1076.                 $ars[implode(', '$ar);
    1077. -
    1078.             }
    1079. -
    1080.             $arNewSelect[$nUnionCount$ars;
    1081. -
    1082.         }
    1083. -
    1084.  
    1085. -
    1086.         return $arNewSelect;
    1087. -
    1088.     }//protected function createEqualSelects($arSelect)
    1089. -
    1090.  
    1091. -
    1092.  
    1093. -
    1094.  
    1095. -
    1096.     /**
    1097. -
    1098.     *   Creates an SQL statement that checks for the value
    1099. -
    1100.     *   of some subject/predicate/object
    1101. -
    1102.     *
    1103. -
    1104.     *   @param mixed    $bject          subject|predicate|object
    1105. -
    1106.     *   @param string   $strTablePrefix Table prefix (e.g. "t0")
    1107. -
    1108.     *   @param string   $strType        Type of $bject ('subject'|'predicate'|'object')
    1109. -
    1110.     *   @return string  Part of the SQL query (prefixed with AND)
    1111. -
    1112.     */
    1113. -
    1114.     function getSqlCondition($bject$strTablePrefix$strType)
    1115. -
    1116.     {
    1117. -
    1118.         if (is_string($bject)) {
    1119. -
    1120.             if (self::isVariable($bject)) {
    1121. -
    1122.                 //variable?
    1123. -
    1124.                 if (self::isPreparedVariable($bject)) {
    1125. -
    1126.                     //no, not really
    1127. -
    1128.                     $value $this->getPreparedVariablePlaceholder($bject);
    1129. -
    1130.                 else {
    1131. -
    1132.                     //yes
    1133. -
    1134.                     return null;
    1135. -
    1136.                 }
    1137. -
    1138.             else {
    1139. -
    1140.                 $value $this->dbConn->qstr($bject);
    1141. -
    1142.             }
    1143. -
    1144.             //literal
    1145. -
    1146.             return ' AND ' $strTablePrefix '.' $strType ' = ' $value;
    1147. -
    1148.         }
    1149. -
    1150.  
    1151. -
    1152.         if ($bject instanceof BlankNode{
    1153. -
    1154.             //Blank node
    1155. -
    1156.             throw new SparqlEngineDb_SqlGeneratorException(
    1157. -
    1158.                 'FIXME: Querying for blank nodes not supported'
    1159. -
    1160.             );
    1161. -
    1162.  
    1163. -
    1164.         else if ($bject instanceof Resource{
    1165. -
    1166.             //Resource
    1167. -
    1168.             $r ' AND ' $strTablePrefix '.' $strType ' = '
    1169. -
    1170.                 . $this->dbConn->qstr($bject->getURI());
    1171. -
    1172.             if ($strType !== 'predicate'{
    1173. -
    1174.                 $r .= ' AND ' $strTablePrefix '.' $strType '_is ='
    1175. -
    1176.                 . ' "r"';
    1177. -
    1178.             }
    1179. -
    1180.             return $r;
    1181. -
    1182.  
    1183. -
    1184.         else if ($bject instanceof Literal{
    1185. -
    1186.             //Literal
    1187. -
    1188.             //I'm doubling Filter code here, but what the hell
    1189. -
    1190.             $strColDatatype $strTablePrefix '.l_datatype';
    1191. -
    1192.             if ($bject->dtype == 'http://www.w3.org/2001/XMLSchema#integer'
    1193. -
    1194.              || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#double'
    1195. -
    1196.             {
    1197. -
    1198.                 $strVariable 'CAST(' $strTablePrefix '.' $strType ' AS DECIMAL)';
    1199. -
    1200.                 $strValue    $bject->getLabel();
    1201. -
    1202.             else {
    1203. -
    1204.                 $strVariable $strTablePrefix '.' $strType;
    1205. -
    1206.                 $strValue    $this->dbConn->qstr($bject->getLabel());
    1207. -
    1208.             }
    1209. -
    1210.             $r ' AND ' $strVariable ' = ' $strValue;
    1211. -
    1212.             if ($strType !== 'predicate'{
    1213. -
    1214.                 $r .= ' AND ' $strTablePrefix '.' $strType '_is ='
    1215. -
    1216.                 . ' "l"';
    1217. -
    1218.             }
    1219. -
    1220.  
    1221. -
    1222.             if ($strType == 'object'{
    1223. -
    1224.                 if ($bject->dtype == '' || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#string'{
    1225. -
    1226.                     //string
    1227. -
    1228.                     $r .= ' AND ('
    1229. -
    1230.                         . $strColDatatype ' = ""'
    1231. -
    1232.                         . ' OR ' $strColDatatype ' = "http://www.w3.org/2001/XMLSchema#string"'
    1233. -
    1234.                         . ')';
    1235. -
    1236.                 else {
    1237. -
    1238.                     $r .= ' AND ' $strColDatatype ' = "'
    1239. -
    1240.                         . $bject->dtype
    1241. -
    1242.                         . '"';
    1243. -
    1244.                 }
    1245. -
    1246.             }
    1247. -
    1248.  
    1249. -
    1250.             if ($bject->lang != ''{
    1251. -
    1252.                 $strColLanguage $strTablePrefix '.l_language';
    1253. -
    1254.                 $r .= ' AND ' $strColLanguage ' = '
    1255. -
    1256.                    . $this->dbConn->qstr($bject->lang);
    1257. -
    1258.             }
    1259. -
    1260.             return $r;
    1261. -
    1262.  
    1263. -
    1264.         else {
    1265. -
    1266.             throw new SparqlEngineDb_SqlGeneratorException(
    1267. -
    1268.                 'Unsupported sentence part: ' get_class($bject)
    1269. -
    1270.             );
    1271. -
    1272.         }
    1273. -
    1274.     }//function getSqlCondition($bject, $strTablePrefix, $strType)
    1275. -
    1276.  
    1277. -
    1278.  
    1279. -
    1280.  
    1281. -
    1282.     /**
    1283. -
    1284.     *   Checks if the sentence part (subject, predicate or object) in
    1285. -
    1286.     *   $arNew has the same content as $arOld.
    1287. -
    1288.     *   Required for queries like ":x ?a ?a" where predicate and object
    1289. -
    1290.     *   need to have the same value
    1291. -
    1292.     *
    1293. -
    1294.     *   @param array    $arNew  array($strTablePrefix, $strType = s|p|o)
    1295. -
    1296.     *   @param array    $arOld  array($strTablePrefix, $strType = s|p|o)
    1297. -
    1298.     *   @return string 
    1299. -
    1300.     */
    1301. -
    1302.     protected static function getSqlEqualityCondition($arNew$arOld)
    1303. -
    1304.     {
    1305. -
    1306.         $chTypeNew         $arNew[1]$chTypeOld         $arOld[1];
    1307. -
    1308.         $strTablePrefixNew $arNew[0]$strTablePrefixOld $arOld[0];
    1309. -
    1310.  
    1311. -
    1312.         if ($chTypeNew == 'p' || $chTypeOld == 'p'{
    1313. -
    1314.             //just check value
    1315. -
    1316.             //FIXME: it might be I need to check for resource type in object and subject
    1317. -
    1318.             return
    1319. -
    1320.                   $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['value']
    1321. -
    1322.                 . ' = '
    1323. -
    1324.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['value']
    1325. -
    1326.                 ;
    1327. -
    1328.         else if ($chTypeNew == 's' || $chTypeOld == 's'{
    1329. -
    1330.             //check value and type
    1331. -
    1332.             return
    1333. -
    1334.                   $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['value']
    1335. -
    1336.                 . ' = '
    1337. -
    1338.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['value']
    1339. -
    1340.                 . ' AND '
    1341. -
    1342.                 . $strTablePrefixNew '.' self::$arTableColumnNames[$chTypeNew]['is']
    1343. -
    1344.                 . ' = '
    1345. -
    1346.                 . $strTablePrefixOld '.' self::$arTableColumnNames[$chTypeOld]['is']
    1347. -
    1348.                 ;
    1349. -
    1350.         else {
    1351. -
    1352.             //two objects -> check everything
    1353. -
    1354.             return
    1355. -
    1356.                   $strTablePrefixNew '.object = '     $strTablePrefixOld '.object'
    1357. -
    1358.                 . ' AND '
    1359. -
    1360.                 . $strTablePrefixNew '.object_is = '  $strTablePrefixOld '.object_is'
    1361. -
    1362.                 . ' AND '
    1363. -
    1364.                 . $strTablePrefixNew '.l_language = ' $strTablePrefixOld '.l_language'
    1365. -
    1366.                 . ' AND '
    1367. -
    1368.                 . $strTablePrefixNew '.l_datatype = ' $strTablePrefixOld '.l_datatype'
    1369. -
    1370.                 ;
    1371. -
    1372.         }
    1373. -
    1374.     }//protected static function getSqlEqualityCondition($arNew, $arOld)
    1375. -
    1376.  
    1377. -
    1378.  
    1379. -
    1380.  
    1381. -
    1382.     /**
    1383. -
    1384.     *   Checks if the given variable name is part of the result
    1385. -
    1386.     *   variables list.
    1387. -
    1388.     *   Needed since $arResultVars may contain "*" that captures all variables.
    1389. -
    1390.     *
    1391. -
    1392.     *   @param string   $strVar         Variable name (e.g. "?p")
    1393. -
    1394.     *   @param array    $arResultVars   Array with result variables
    1395. -
    1396.     *   @return boolean     true if it is a result variable
    1397. -
    1398.     */
    1399. -
    1400.     protected static function isResultVar($strVar&$arResultVars)
    1401. -
    1402.     {
    1403. -
    1404.         return in_array('*'$arResultVars|| in_array($strVar$arResultVars);
    1405. -
    1406.     }//protected static function isResultVar($strVar, &$arResultVars)
    1407. -
    1408.  
    1409. -
    1410.  
    1411. -
    1412.  
    1413. -
    1414.     /**
    1415. -
    1416.     *   Checks if the given subject/predicate/object
    1417. -
    1418.     *   is a variable name.
    1419. -
    1420.     *
    1421. -
    1422.     *   @return boolean 
    1423. -
    1424.     */
    1425. -
    1426.     public static function isVariable($bject)
    1427. -
    1428.     {
    1429. -
    1430.         return is_string($bject&& strlen($bject>= 2
    1431. -
    1432.              && ($bject[0== '?' || $bject[0== '$');
    1433. -
    1434.     }//public static function isVariable($bject)
    1435. -
    1436.  
    1437. -
    1438.  
    1439. -
    1440.  
    1441. -
    1442.     /**
    1443. -
    1444.     *   Checks if the given variable is a replacement
    1445. -
    1446.     *   for a prepared statement.
    1447. -
    1448.     *
    1449. -
    1450.     *   @return boolean 
    1451. -
    1452.     */
    1453. -
    1454.     public static function isPreparedVariable($bject)
    1455. -
    1456.     {
    1457. -
    1458.         return is_string($bject&& strlen($bject>= 3
    1459. -
    1460.              && ($bject[0== '?' || $bject[0== '$')
    1461. -
    1462.              && ($bject[1== '?' || $bject[1== '$')
    1463. -
    1464.         ;
    1465. -
    1466.     }//public static function isPreparedVariable($bject)
    1467. -
    1468.  
    1469. -
    1470.  
    1471. -
    1472.  
    1473. -
    1474.     /**
    1475. -
    1476.     *   Returns a placeholder to be included in the sql statement.
    1477. -
    1478.     *   It will be replaced with a real prepared statement variable later on.
    1479. -
    1480.     *   Also adds it to the internal placeholder array.
    1481. -
    1482.     *
    1483. -
    1484.     *   @param string $strVariable  The variable to get a placeholder for
    1485. -
    1486.     *   @return string placeholder
    1487. -
    1488.     */
    1489. -
    1490.     protected function getPreparedVariablePlaceholder($strVariable)
    1491. -
    1492.     {
    1493. -
    1494.         $strName substr($strVariable2);
    1495. -
    1496.         if (!isset($this->arPlaceholders[$strName])) {
    1497. -
    1498.             $this->arPlaceholders[$strName'@$%_PLACEHOLDER_'
    1499. -
    1500.                 . count($this->arPlaceholders'_%$@';
    1501. -
    1502.         }
    1503. -
    1504.         return $this->arPlaceholders[$strName];
    1505. -
    1506.     }//protected function getPreparedVariablePlaceholder($strVariable)
    1507. -
    1508.  
    1509. -
    1510.  
    1511. -
    1512.  
    1513. -
    1514.     public function getPlaceholders()
    1515. -
    1516.     {
    1517. -
    1518.         return $this->arPlaceholders;
    1519. -
    1520.     }//public function getPlaceholders()
    1521. -
    1522.  
    1523. -
    1524.  
    1525. -
    1526.  
    1527. -
    1528.     public function getVarAssignments()
    1529. -
    1530.     {
    1531. -
    1532.         return $this->arVarAssignments;
    1533. -
    1534.     }//public function getVarAssignments()
    1535. -
    1536.  
    1537. -
    1538.  
    1539. -
    1540.  
    1541. -
    1542.     public function getUsedVarAssignments()
    1543. -
    1544.     {
    1545. -
    1546.         return $this->arUsedVarAssignments;
    1547. -
    1548.     }//public function getUsedVarAssignments()
    1549. -
    1550.  
    1551. -
    1552.  
    1553. -
    1554.  
    1555. -
    1556.     public function getUsedVarTypes()
    1557. -
    1558.     {
    1559. -
    1560.         return $this->arUsedVarTypes;
    1561. -
    1562.     }//public function getUsedVarTypes()
    1563. -
    1564.  
    1565. -
    1566.  
    1567. -
    1568.  
    1569. -
    1570.     /**
    1571. -
    1572.     *   Checks if the graph pattern is empty (contains no
    1573. -
    1574.     *   usable data).
    1575. -
    1576.     *   Occurs when using "{}" without pre- or suffixes
    1577. -
    1578.     *   WHERE
    1579. -
    1580.     *   {
    1581. -
    1582.     *    { ?person rdf:type foaf:Person } .
    1583. -
    1584.     *   }
    1585. -
    1586.     *
    1587. -
    1588.     *   @param GraphPattern $graphPattern    Graph pattern to check
    1589. -
    1590.     *   @return boolean     True if the pattern is empty.
    1591. -
    1592.     */
    1593. -
    1594.     protected static function isEmptyPattern(GraphPattern $graphPattern)
    1595. -
    1596.     {
    1597. -
    1598.         return
    1599. -
    1600.                $graphPattern->getTriplePattern(=== false
    1601. -
    1602.             && $graphPattern->getGraphname()     === null
    1603. -
    1604.             && $graphPattern->getConstraint()    === false
    1605. -
    1606.             && $graphPattern->getOptional()      === null
    1607. -
    1608.             && $graphPattern->getUnion()         === null
    1609. -
    1610.         ;
    1611. -
    1612.     }//protected static function isEmptyPattern(GraphPattern $graphPattern)
    1613. -
    1614.  
    1615. -
    1616.  
    1617. -
    1618.  
    1619. -
    1620.     /**
    1621. -
    1622.     *   Removes all NULL values from an array and returns it.
    1623. -
    1624.     *
    1625. -
    1626.     *   @param array $array     Some array
    1627. -
    1628.     *   @return array $array without the NULL values.
    1629. -
    1630.     */
    1631. -
    1632.     protected static function removeNull($array)
    1633. -
    1634.     {
    1635. -
    1636.         foreach ($array as $key => &$value{
    1637. -
    1638.             if ($value === null{
    1639. -
    1640.                 unset($array[$key]);
    1641. -
    1642.             }
    1643. -
    1644.         }
    1645. -
    1646.         return $array;
    1647. -
    1648.     }//protected static function removeNull($array)
    1649. -
    1650.  
    1651. -
    1652.  
    1653. -
    1654.  
    1655. -
    1656.     /**
    1657. -
    1658.     *   Removes a leading AND from the where clause which would render
    1659. -
    1660.     *   the sql illegal.
    1661. -
    1662.     */
    1663. -
    1664.     protected function fixWhere($strWhere)
    1665. -
    1666.     {
    1667. -
    1668.         $strWhere ltrim($strWhere);
    1669. -
    1670.         if (substr($strWhere04== 'AND '{
    1671. -
    1672.             $strWhere substr($strWhere4);
    1673. -
    1674.         }
    1675. -
    1676.         return $strWhere;
    1677. -
    1678.     }//protected function fixWhere($strWhere)
    1679. -
    1680.  
    1681. -
    1682.  
    1683. -
    1684.  
    1685. -
    1686.     protected function getSqlVariableName($strSparqlVar)
    1687. -
    1688.     {
    1689. -
    1690.         if (!isset($this->arVarAssignments[$strSparqlVar]['sqlname'])) {
    1691. -
    1692.             if (preg_match('/[a-zA-Z0-9]+/'substr($strSparqlVar1))) {
    1693. -
    1694.                 $strName 'v_' substr($strSparqlVar1);
    1695. -
    1696.             else {
    1697. -
    1698.                 $strName 'va_' $this->nSqlVariableNameCount++;
    1699. -
    1700.             }
    1701. -
    1702.             $this->arVarAssignments[$strSparqlVar]['sqlname'$strName;
    1703. -
    1704.         }
    1705. -
    1706.         return $this->arVarAssignments[$strSparqlVar]['sqlname'];
    1707. -
    1708.     }//protected function getSqlVariableName($strSparqlVar)
    1709. -
    1710.  
    1711. -
    1712.  
    1713. -
    1714.  
    1715. -
    1716.     protected function getSqlVariableNameValue($strSparqlVar)
    1717. -
    1718.     {
    1719. -
    1720.         $this->arVarAssignments[$strSparqlVar]['sql_value'=
    1721. -
    1722.             'value_' $this->getSqlVariableName($strSparqlVar);
    1723. -
    1724.         return $this->arVarAssignments[$strSparqlVar]['sql_value'];
    1725. -
    1726.     }//protected function getSqlVariableNameValue($strSparqlVar)
    1727. -
    1728.  
    1729. -
    1730.  
    1731. -
    1732.  
    1733. -
    1734.     protected function getSqlVariableNameIs($strSparqlVar)
    1735. -
    1736.     {
    1737. -
    1738.         $this->arVarAssignments[$strSparqlVar]['sql_is'=
    1739. -
    1740.             'is_' $this->getSqlVariableName($strSparqlVar);
    1741. -
    1742.         return $this->arVarAssignments[$strSparqlVar]['sql_is'];
    1743. -
    1744.     }//protected function getSqlVariableNameIs($strSparqlVar)
    1745. -
    1746.  
    1747. -
    1748.  
    1749. -
    1750.  
    1751. -
    1752.     protected function getSqlVariableNameLanguage($strSparqlVar)
    1753. -
    1754.     {
    1755. -
    1756.         $this->arVarAssignments[$strSparqlVar]['sql_lang'=
    1757. -
    1758.             'lang_' $this->getSqlVariableName($strSparqlVar);
    1759. -
    1760.         return $this->arVarAssignments[$strSparqlVar]['sql_lang'];
    1761. -
    1762.     }//protected function getSqlVariableNameLanguage($strSparqlVar)
    1763. -
    1764.  
    1765. -
    1766.  
    1767. -
    1768.  
    1769. -
    1770.     protected function getSqlVariableNameDatatype($strSparqlVar)
    1771. -
    1772.     {
    1773. -
    1774.         $this->arVarAssignments[$strSparqlVar]['sql_type'=
    1775. -
    1776.             'type_' $this->getSqlVariableName($strSparqlVar);
    1777. -
    1778.         return $this->arVarAssignments[$strSparqlVar]['sql_type'];
    1779. -
    1780.     }//protected function getSqlVariableNameDatatype($strSparqlVar)
    1781. -
    1782.  
    1783. -
    1784. }//class SparqlEngineDb_SqlGenerator
    1785. -
    1786. ?>
    1787. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:24 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html deleted file mode 100755 index aefef2cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlGeneratorException.php.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - File Source for SqlGeneratorException.php - - - - - -

    Source for file SqlGeneratorException.php

    -

    Documentation is available at SqlGeneratorException.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Exception when generating the SQL statement
    6. -
    7. *
    8. -
    9. *   @author Christian Weiske <cweiske@cweiske.de>
    10. -
    11. *
    12. -
    13. *   @package sparql
    14. -
    15. */
    16. -
    17. class SparqlEngineDb_SqlGeneratorException extends Exception
    18. -
    19. {
    20. -
    21. }
    22. -
    23.  
    24. -
    25. ?>
    26. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html deleted file mode 100755 index 4e820b45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbSqlMerger.php.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - File Source for SqlMerger.php - - - - - -

    Source for file SqlMerger.php

    -

    Documentation is available at SqlMerger.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Creates an sql string from an sql array
    8. -
    9. *
    10. -
    11. *   @author Christian Weiske <cweiske@cweiske.de>
    12. -
    13. *
    14. -
    15. *   @package sparql
    16. -
    17. */
    18. -
    19. -
    20. {
    21. -
    22.     public static function getSelect(Query $query$arSqls$strAdditional '')
    23. -
    24.     {
    25. -
    26.         if (count($arSqls== 1{
    27. -
    28.             return implode(''$arSqls[0]$strAdditional;
    29. -
    30.         }
    31. -
    32.  
    33. -
    34.         //union
    35. -
    36.         $strUnion 'UNION' .
    37. -
    38.             ($query->getResultForm(== 'select distinct' '' ' ALL');
    39. -
    40.         $ar array();
    41. -
    42.         foreach ($arSqls as $arSql{
    43. -
    44.             $ar[implode(''$arSql$strAdditional;
    45. -
    46.         }
    47. -
    48.         return '(' implode(') ' $strUnion ' ('$ar')';
    49. -
    50.     }//public static function getSelect(Query $query, $arSqls, $strAdditional = '')
    51. -
    52.  
    53. -
    54.  
    55. -
    56.  
    57. -
    58.     public static function getCount(Query $query$arSqls$strAdditional '')
    59. -
    60.     {
    61. -
    62.         if (count($arSqls== 1{
    63. -
    64.             return 'SELECT COUNT(*) as count ' $arSqls[0]['from'$arSqls[0]['where'$strAdditional;
    65. -
    66.         }
    67. -
    68.  
    69. -
    70.         $ar array();
    71. -
    72.         foreach ($arSqls as $arSql{
    73. -
    74.             $ar[implode(''$arSql$strAdditional;
    75. -
    76.         }
    77. -
    78.         return 'SELECT (' implode(') + ('$ar') as count';
    79. -
    80.     }//public static function getCount(Query $query, $arSqls, $strAdditional = '')
    81. -
    82.  
    83. -
    84. }//class SparqlEngineDb_SqlMerger
    85. -
    86.  
    87. -
    88. ?>
    89. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html deleted file mode 100755 index 95a761ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineDbTypeSorter.php.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - File Source for TypeSorter.php - - - - - -

    Source for file TypeSorter.php

    -

    Documentation is available at TypeSorter.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Sorts database types as the Sparql specs want it.
    6. -
    7. *
    8. -
    9. *   @author Christian Weiske <cweiske@cweiske.de>
    10. -
    11. *
    12. -
    13. *   @package sparql
    14. -
    15. */
    16. -
    17. -
    18. {
    19. -
    20.     /**
    21. -
    22.     *   Defines the sort order for value types in the database,
    23. -
    24.     *   so that they get sorted correctly as the specs want it.
    25. -
    26.     *   @var array 
    27. -
    28.     */
    29. -
    30.     public static $arTypeNumbers array(
    31. -
    32.         null    => 0,//empty
    33. -
    34.         'b'     => 1,//blank
    35. -
    36.         'r'     => 2,//resource
    37. -
    38.         'l'     => 3,//literal
    39. -
    40.     );
    41. -
    42.  
    43. -
    44.     /**
    45. -
    46.     *   SQL types to cast XSD schema types to, so that they will get
    47. -
    48.     *   sorted correctly.
    49. -
    50.     *   @var array 
    51. -
    52.     */
    53. -
    54.     public static $arCastTypes array(
    55. -
    56.         'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER'
    57. -
    58.     );
    59. -
    60.  
    61. -
    62.  
    63. -
    64.  
    65. -
    66.     public function __construct(Query $queryADOConnection $dbConn)
    67. -
    68.     {
    69. -
    70.         $this->dbConn   $dbConn;
    71. -
    72.         $this->query    $query;
    73. -
    74.     }
    75. -
    76.  
    77. -
    78.  
    79. -
    80.     /**
    81. -
    82.     *   Needs to be executed before getOrderifiedSqls and willBeDataDependent
    83. -
    84.     *
    85. -
    86.     *   @param SparqlEngineDb_SqlGenerator $sg  SQL generator object
    87. -
    88.     */
    89. -
    90.     public function setData(SparqlEngineDb_SqlGenerator $sg)
    91. -
    92.     {
    93. -
    94.         $this->arUsedVarTypes       $sg->getUsedVarTypes();
    95. -
    96.         $this->arUsedVarAssignments $sg->getUsedVarAssignments();
    97. -
    98.         $this->arVarAssignments     $sg->getVarAssignments();
    99. -
    100.     }//public function setData(SparqlEngineDb_SqlGenerator $sg)
    101. -
    102.  
    103. -
    104.  
    105. -
    106.  
    107. -
    108.     /**
    109. -
    110.     *   Returns an array of sql statements that need to be executed
    111. -
    112.     *   and deliver the full result set when combined.
    113. -
    114.     *
    115. -
    116.     *   Execute setData() before this.
    117. -
    118.     *
    119. -
    120.     *   @internal It is not possible (ok, it is - but it would really complicate
    121. -
    122.     *    the queries and the code here) to use UNION to combine the sqls to
    123. -
    124.     *    a single one - UNION merges the results and does not keep the order
    125. -
    126.     *    of the rows. Citing the mysql manual:
    127. -
    128.     *        Use of ORDER BY for individual SELECT statements implies nothing
    129. -
    130.     *        about the order in which the rows appear in the final result because
    131. -
    132.     *        UNION by default produces an unordered set of rows. If ORDER BY
    133. -
    134.     *        appears with LIMIT, it is used to determine the subset of the
    135. -
    136.     *        selected rows to retrieve for the SELECT, but does not necessarily
    137. -
    138.     *        affect the order of those rows in the final UNION result.
    139. -
    140.     *        If ORDER BY appears without LIMIT in a SELECT, it is
    141. -
    142.     *        optimized away because it will have no effect anyway.
    143. -
    144.     *
    145. -
    146.     *   @param string $strSelect    SELECT clause
    147. -
    148.     *   @param string $strFrom      FROM clause
    149. -
    150.     *   @param string $strWhere     WHERE clause
    151. -
    152.     *   @return array   Array of arrays. Imploding an array will give
    153. -
    154.     *                     a complete sql statement. The array will have the keys
    155. -
    156.     *                     select/from/where/order.
    157. -
    158.     */
    159. -
    160.     public function getOrderifiedSqls($arSqls)
    161. -
    162.     {
    163. -
    164.         if (count($arSqls== 0{
    165. -
    166.             return $arSqls;
    167. -
    168.         }
    169. -
    170.  
    171. -
    172.         $strSelect $arSqls[0]['select'];
    173. -
    174.         $strFrom   $arSqls[0]['from'];
    175. -
    176.         $strWhere  $arSqls[0]['where'];
    177. -
    178.  
    179. -
    180.         $strResultForm $this->query->getResultForm();
    181. -
    182.         if ($strResultForm == 'ask' || $strResultForm == 'count'{
    183. -
    184.             return array(
    185. -
    186.                 $arSqls
    187. -
    188.             );
    189. -
    190.         }
    191. -
    192.  
    193. -
    194.         $arSpecial $this->getSpecialOrderVariables();
    195. -
    196.         if (count($arSpecial== 0{
    197. -
    198.             $strOrder $this->getSqlOrderBy();
    199. -
    200.             foreach ($arSqls as &$arSql{
    201. -
    202.                 $arSql['order'$strOrder;
    203. -
    204.             }
    205. -
    206.             return array(
    207. -
    208.                 $arSqls
    209. -
    210.             );
    211. -
    212.         }
    213. -
    214.  
    215. -
    216.         $arTypeSets $this->orderTypeSets(
    217. -
    218.             $this->getTypeSets($arSpecial$strFrom$strWhere)
    219. -
    220.         );
    221. -
    222.  
    223. -
    224.         $arNewSqls array();
    225. -
    226.         foreach ($arTypeSets as $arTypeSet{
    227. -
    228.             $arSqlParts array();
    229. -
    230.             foreach ($arSqls as $arSql{
    231. -
    232.                 $arSql['where'.= $this->getTypesetWhereClause($arTypeSet);
    233. -
    234.                 $arSql['order']  $this->getSqlOrderBy($arTypeSet);
    235. -
    236.                 $arSqlParts[$arSql;
    237. -
    238.             }
    239. -
    240.             $arNewSqls[$arSqlParts;
    241. -
    242.         }
    243. -
    244.  
    245. -
    246.         return $arNewSqls;
    247. -
    248.     }//public function getOrderifiedSqls($arUsedVarAssignments, $strSelect, $strFrom, $strWhere)
    249. -
    250.  
    251. -
    252.  
    253. -
    254.  
    255. -
    256.     /**
    257. -
    258.     *   Returns wether the returned queries will depend on the data or not.
    259. -
    260.     *   If the queries depend on the data, they cannot be prepare()d and
    261. -
    262.     *   thus won't be that fast when executing.
    263. -
    264.     *
    265. -
    266.     *   Execute setData() before this.
    267. -
    268.     *
    269. -
    270.     *   @return boolean 
    271. -
    272.     */
    273. -
    274.     public function willBeDataDependent()
    275. -
    276.     {
    277. -
    278.         $strResultForm $this->query->getResultForm();
    279. -
    280.         return !(
    281. -
    282.             $strResultForm == 'ask' || $strResultForm == 'count'
    283. -
    284.             || count($this->getSpecialOrderVariables()) == 0
    285. -
    286.         );
    287. -
    288.     }//public function willBeDataDependent()
    289. -
    290.  
    291. -
    292.  
    293. -
    294.  
    295. -
    296.     /**
    297. -
    298.     *   Returns an array of variables that the result is going to be
    299. -
    300.     *   ordered by and that need to be sorted multiple times
    301. -
    302.     *   (because they may contain different data types)
    303. -
    304.     *
    305. -
    306.     *   @return array Array of sparql variable names
    307. -
    308.     */
    309. -
    310.     protected function getSpecialOrderVariables()
    311. -
    312.     {
    313. -
    314.         $arSM $this->query->getSolutionModifier();
    315. -
    316.         if ($arSM['order by'=== null{
    317. -
    318.             return array();
    319. -
    320.         }
    321. -
    322.  
    323. -
    324.         $arSpecial array();
    325. -
    326.         foreach ($arSM['order by'as $arVar{
    327. -
    328.             if ($this->isSpecialOrderVariable($arVar['val'])) {
    329. -
    330.                 $arSpecial[$arVar['val'];
    331. -
    332.             }
    333. -
    334.         }
    335. -
    336.         return $arSpecial;
    337. -
    338.     }//protected function getSpecialOrderVariables()
    339. -
    340.  
    341. -
    342.  
    343. -
    344.  
    345. -
    346.     /**
    347. -
    348.     *   Checks if a given variable name is a variable that
    349. -
    350.     *   needs special care when used in ORDER BY statements.
    351. -
    352.     *
    353. -
    354.     *   @param string $strVar SPARQL variable name
    355. -
    356.     *   @return boolean true if the variable needs special care
    357. -
    358.     */
    359. -
    360.     protected function isSpecialOrderVariable($strVar)
    361. -
    362.     {
    363. -
    364.         return !isset($this->arUsedVarTypes[$strVar]['s'])
    365. -
    366.             && !isset($this->arUsedVarTypes[$strVar]['p']);
    367. -
    368.     }//protected function isSpecialOrderVariable($arVar)
    369. -
    370.  
    371. -
    372.  
    373. -
    374.  
    375. -
    376.     /**
    377. -
    378.     *   Determines the type sets in the query results.
    379. -
    380.     *   A type set is a distinct set of variables and their types,
    381. -
    382.     *   e.g. the variable and its type (r/b/l) and its datatype
    383. -
    384.     *   if its an object.
    385. -
    386.     *
    387. -
    388.     *   @param array $arSpecialVars     Special variables as returned by
    389. -
    390.     *                                    getSpecialOrderVariables()
    391. -
    392.     *   @param string $strFrom          FROM part of the sql query
    393. -
    394.     *   @param string $strWhere         WHERE part of the sql query
    395. -
    396.     *
    397. -
    398.     *   @return array   Key is the sparql variable name, value is an
    399. -
    400.     *                    array. This one has one key 'type' with a
    401. -
    402.     *                    value of b/l/r. It might have another key
    403. -
    404.     *                    'datatype' with the resource's datatype.
    405. -
    406.     */
    407. -
    408.     protected function getTypeSets($arSpecialVars$strFrom$strWhere)
    409. -
    410.     {
    411. -
    412.         $arSel array();
    413. -
    414.         foreach ($arSpecialVars as $strSparqlVar{
    415. -
    416.             if ($this->arVarAssignments[$strSparqlVar][1== 'o'{
    417. -
    418.                 $arSel[$this->arVarAssignments[$strSparqlVar][0'.l_datatype'
    419. -
    420.                     . ' as "' $strSparqlVar '-datatype"';
    421. -
    422.             }
    423. -
    424.             $strTypeCol $this->arVarAssignments[$strSparqlVar][1== 'o'
    425. -
    426.                 ? 'object_is' 'subject_is';
    427. -
    428.             $this->arVarAssignments[$strSparqlVar][2$strTypeCol;
    429. -
    430.             $arSel[$this->arVarAssignments[$strSparqlVar][0'.' $strTypeCol
    431. -
    432.                 . ' as "' $strSparqlVar '-type"';
    433. -
    434.         }
    435. -
    436.  
    437. -
    438.         $oldmode $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
    439. -
    440.         $arResult $this->dbConn->execute(
    441. -
    442.             'SELECT DISTINCT ' implode(', '$arSel' ' $strFrom $strWhere
    443. -
    444.         );
    445. -
    446.         $this->dbConn->SetFetchMode($oldmode);
    447. -
    448.  
    449. -
    450.         $arTypes array();
    451. -
    452.         foreach ($arResult as $arRow{
    453. -
    454.             $nLine count($arTypes);
    455. -
    456.             foreach ($arRow as $key => $value{
    457. -
    458.                 list($strSparqlVar$strTypeexplode('-'$key);
    459. -
    460.                 $arTypes[$nLine][$strSparqlVar][$strType$value;
    461. -
    462.             }
    463. -
    464.         }
    465. -
    466.  
    467. -
    468.         return $arTypes;
    469. -
    470.     }//protected function getTypeSets($arSpecialVars, $strFrom, $strWhere)
    471. -
    472.  
    473. -
    474.  
    475. -
    476.  
    477. -
    478.     /**
    479. -
    480.     *   Takes an array of type sets (as returned by getTypeSets()) and
    481. -
    482.     *   sorts the variables according to the SPARQL specs.
    483. -
    484.     *
    485. -
    486.     *   @param array $arTypes Array of type sets
    487. -
    488.     *   @return array Ordered array of type sets
    489. -
    490.     */
    491. -
    492.     protected function orderTypeSets($arTypes)
    493. -
    494.     {
    495. -
    496.         $arSM $this->query->getSolutionModifier();
    497. -
    498.         if ($arSM['order by'!== null{
    499. -
    500.             $this->arDirection array();
    501. -
    502.             foreach ($arSM['order by'as $arVar{
    503. -
    504.                 $this->arDirection[$arVar['val']] =
    505. -
    506.                     (strtoupper($arVar['type']== 'ASC' : -1);
    507. -
    508.             }
    509. -
    510.         }
    511. -
    512.  
    513. -
    514.         usort($arTypesarray($this'compareTypeSet'));
    515. -
    516.  
    517. -
    518.         return $arTypes;
    519. -
    520.     }//protected function orderTypeSets($arTypes)
    521. -
    522.  
    523. -
    524.  
    525. -
    526.  
    527. -
    528.     /**
    529. -
    530.     *   Compares two type sets. Works like a normal comparision
    531. -
    532.     *   method that returns -1/0/1 for use in usort()
    533. -
    534.     *
    535. -
    536.     *   @param array $arTs1     First typeset
    537. -
    538.     *   @param array $arTs2     Second typeset
    539. -
    540.     *   @return int Comparison value
    541. -
    542.     */
    543. -
    544.     public function compareTypeSet($arTs1$arTs2)
    545. -
    546.     {
    547. -
    548.         foreach ($arTs1 as $strSparqlVar => $arType1{
    549. -
    550.             //compare types
    551. -
    552.             $n self::$arTypeNumbers[$arType1['type']]
    553. -
    554.                 - self::$arTypeNumbers[$arTs2[$strSparqlVar]['type']];
    555. -
    556.             if ($n != 0{
    557. -
    558.                 //and take ASC/DESC into account
    559. -
    560.                 return $n $this->arDirection[$strSparqlVar];
    561. -
    562.             }
    563. -
    564.  
    565. -
    566.             //compare the datatypes
    567. -
    568.             $n self::compareXsdType(
    569. -
    570.                 $arType1['datatype'],
    571. -
    572.                 $arTs2[$strSparqlVar]['datatype']
    573. -
    574.             );
    575. -
    576.             //if they are not equal, return the value
    577. -
    578.             if ($n != 0{
    579. -
    580.                 //and take ASC/DESC into account
    581. -
    582.                 return $n $this->arDirection[$strSparqlVar];
    583. -
    584.             }
    585. -
    586.         }
    587. -
    588.  
    589. -
    590.         //they are equal
    591. -
    592.         return 0;
    593. -
    594.     }//public function compareTypeSet($arTs1, $arTs2)
    595. -
    596.  
    597. -
    598.  
    599. -
    600.  
    601. -
    602.     /**
    603. -
    604.     *   Compares two XSD data types and returns the comparison number.
    605. -
    606.     *
    607. -
    608.     *   @param string $strType1     First data type
    609. -
    610.     *   @param string $strType2     Second data type
    611. -
    612.     *   @return int     Comparison number (<0 if $strType1 is less than
    613. -
    614.     *                    $strType2, 0 if equal, >0 if type2 is greater)
    615. -
    616.     */
    617. -
    618.     public static function compareXsdType($strType1$strType2)
    619. -
    620.     {
    621. -
    622.         return self::getXsdTypeNumber($strType1self::getXsdTypeNumber($strType2);
    623. -
    624.     }//public static function compareXsdType($strType1, $strType2)
    625. -
    626.  
    627. -
    628.  
    629. -
    630.  
    631. -
    632.     /**
    633. -
    634.     *   Returns the type number for an xsd data type.
    635. -
    636.     *
    637. -
    638.     *   @param string $strType  XSD data type
    639. -
    640.     *   @return int  Some integer to compare two types.
    641. -
    642.     */
    643. -
    644.     public static function getXsdTypeNumber($strType)
    645. -
    646.     {
    647. -
    648.         if ($strType === null{
    649. -
    650.             return 0;
    651. -
    652.         else if ($strType == ''{
    653. -
    654.             return 1;
    655. -
    656.         else {
    657. -
    658.             return 2;
    659. -
    660.         }
    661. -
    662.     }//public static function getXsdTypeNumber($strType)
    663. -
    664.  
    665. -
    666.  
    667. -
    668.  
    669. -
    670.     /**
    671. -
    672.     *   Returns the ORDER BY sql query string
    673. -
    674.     *   if neccessary for the query. The returned string
    675. -
    676.     *   already has ORDER BY prefixed.
    677. -
    678.     *
    679. -
    680.     *   @internal Also takes care of casting the data if the type
    681. -
    682.     *    is listed in $arCastTypes. See getCastMethod() for more info.
    683. -
    684.     *
    685. -
    686.     *   @param arrray $arTypeSet Single typeset
    687. -
    688.     *   @return string      ORDER BY ... string or empty string
    689. -
    690.     */
    691. -
    692.     function getSqlOrderBy($arTypeSet array())
    693. -
    694.     {
    695. -
    696.         $arSM $this->query->getSolutionModifier();
    697. -
    698.         if ($arSM['order by'=== null{
    699. -
    700.             return '';
    701. -
    702.         }
    703. -
    704.  
    705. -
    706.         $sqlOrder array();
    707. -
    708.         foreach ($arSM['order by'as $arVar{
    709. -
    710.             $strSparqlVar $arVar['val'];
    711. -
    712.             if (isset($this->arUsedVarAssignments[$strSparqlVar])) {
    713. -
    714.                 if (!isset($arTypeSet[$strSparqlVar]['datatype'])
    715. -
    716.                   || $arTypeSet[$strSparqlVar]['datatype'== ''{
    717. -
    718.                     $sqlOrder[$this->arUsedVarAssignments[$strSparqlVar' ' strtoupper($arVar['type']);
    719. -
    720.                 else {
    721. -
    722.                     $sqlOrder[self::getCastMethod(
    723. -
    724.                         $arTypeSet[$strSparqlVar]['datatype'],
    725. -
    726.                         $this->arUsedVarAssignments[$strSparqlVar]
    727. -
    728.                     ' ' strtoupper($arVar['type']);
    729. -
    730.                 }
    731. -
    732.             }
    733. -
    734.         }
    735. -
    736.  
    737. -
    738.         return ' ORDER BY ' implode(', '$sqlOrder);
    739. -
    740.     }//function getSqlOrderBy($arTypeSet = array())
    741. -
    742.  
    743. -
    744.  
    745. -
    746.  
    747. -
    748.     /**
    749. -
    750.     *   Returns the SQL statement needed to case the given variable to
    751. -
    752.     *   the given type.
    753. -
    754.     *
    755. -
    756.     *   @param string $strType      XML data type
    757. -
    758.     *   @param string $strSqlVar    SQL variable name
    759. -
    760.     *   @return string  SQL command to cast the variable
    761. -
    762.     */
    763. -
    764.     protected static function getCastMethod($strType$strSqlVar)
    765. -
    766.     {
    767. -
    768.         if (isset(self::$arCastTypes[$strType])) {
    769. -
    770.             return 'CAST(' $strSqlVar ' as ' self::$arCastTypes[$strType')';
    771. -
    772.         else {
    773. -
    774.             //unsupported type!
    775. -
    776.             throw new Exception('Unsupported cast type in order by: ' $strType);
    777. -
    778.             return $strSqlVar;
    779. -
    780.         }
    781. -
    782.     }//protected static function getCastMethod($strType, $strSqlVar)
    783. -
    784.  
    785. -
    786.  
    787. -
    788.  
    789. -
    790.     /**
    791. -
    792.     *   Creates and returns the SQL WHERE clauses needed to get only
    793. -
    794.     *   data in the given typeset.
    795. -
    796.     *
    797. -
    798.     *   @param array $arTypeSet     Typeset
    799. -
    800.     *   @return string  Clauses for the WHERE part in an SQL query
    801. -
    802.     */
    803. -
    804.     protected function getTypesetWhereClause($arTypeSet)
    805. -
    806.     {
    807. -
    808.         $strWhereTypes '';
    809. -
    810.         foreach ($arTypeSet as $strSparqlVar => $arType{
    811. -
    812.             //check type
    813. -
    814.             $strWhereTypes .= ' AND ' $this->arVarAssignments[$strSparqlVar][0]
    815. -
    816.                 . '.' $this->arVarAssignments[$strSparqlVar][2]
    817. -
    818.                 . $this->getStringNullComparison($arType['type']);
    819. -
    820.             //check datatype
    821. -
    822.             if (isset($arType['datatype'])) {
    823. -
    824.                 $strWhereTypes .= ' AND ' $this->arVarAssignments[$strSparqlVar][0]
    825. -
    826.                     . '.l_datatype '
    827. -
    828.                     . $this->getStringNullComparison($arType['datatype']);
    829. -
    830.             }
    831. -
    832.         }
    833. -
    834.         return $strWhereTypes;
    835. -
    836.     }//protected function getTypesetWhereClause($arTypeSet)
    837. -
    838.  
    839. -
    840.  
    841. -
    842.  
    843. -
    844.     /**
    845. -
    846.     *   Returns the correct sql string comparison method.
    847. -
    848.     *
    849. -
    850.     *   @internal If the string is NULL, an "IS NULL" sql statment
    851. -
    852.     *    will be returned, and a normal "= 'something'" if it is
    853. -
    854.     *    a normal string.
    855. -
    856.     */
    857. -
    858.     protected function getStringNullComparison($str)
    859. -
    860.     {
    861. -
    862.         if ($str === null{
    863. -
    864.             return ' IS NULL';
    865. -
    866.         else {
    867. -
    868.             return ' = ' $this->dbConn->qstr($str'';
    869. -
    870.         }
    871. -
    872.     }//protected function getStringNullComparison($str)
    873. -
    874.  
    875. -
    876. }//class SparqlEngineDb_TypeSorter
    877. -
    878. ?>
    879. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:35 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html deleted file mode 100755 index a87e7e81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEnginePreparedStatement.php.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - File Source for PreparedStatement.php - - - - - -

    Source for file PreparedStatement.php

    -

    Documentation is available at PreparedStatement.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   A prepared statement that can be execute()d later multiple
    6. -
    7. *   times with different variable values.
    8. -
    9. *
    10. -
    11. *   @package sparql
    12. -
    13. */
    14. -
    15. -
    16. {
    17. -
    18.     public function execute($arVariables$resultform)
    19. -
    20.     {
    21. -
    22.         //FIXME
    23. -
    24.     }
    25. -
    26.  
    27. -
    28. }
    29. -
    30. ?>
    31. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultConverter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultConverter.php.html deleted file mode 100755 index 80a8686d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultConverter.php.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - File Source for ResultConverter.php - - - - - -

    Source for file ResultConverter.php

    -

    Documentation is available at ResultConverter.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngine/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Converts a memory result into a proper
    10. -
    11. *   rdf statement triple array
    12. -
    13. *
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. -
    24. {
    25. -
    26.     /**
    27. -
    28.     *   Determines the correct renderer and calls it.
    29. -
    30.     *
    31. -
    32.     *   The $resultform may be:
    33. -
    34.     *   - false: The default renderer is taken then
    35. -
    36.     *   - an object that implements SparqlEngine_ResultRenderer interface
    37. -
    38.     *   - a string like "HTML" or "XML". The appropriate renderer is used then.
    39. -
    40.     *   - a full class name, e.g. SparqlEngine_ResultRenderer_XML
    41. -
    42.     *
    43. -
    44.     *   @param array $arVartable        Variable table
    45. -
    46.     *   @param SparqlEngine $engine   Sparql database engine.
    47. -
    48.     *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
    49. -
    50.     *
    51. -
    52.     *   @return mixed   Most likely an array or a boolean value,
    53. -
    54.     *                    or anything else as determined by $resultform
    55. -
    56.     */
    57. -
    58.     public static function convertFromResult($arVartableSparqlEngine $engine$resultform false)
    59. -
    60.     {
    61. -
    62.         if (is_object($resultform)) {
    63. -
    64.             if ($resultform instanceof SparqlEngine_ResultRenderer{
    65. -
    66.                 return $resultform->convertFromResult(
    67. -
    68.                     $arVartable,
    69. -
    70.                     $engine->getQuery(),
    71. -
    72.                     $engine
    73. -
    74.                 );
    75. -
    76.             else {
    77. -
    78.                 throw new Exception(
    79. -
    80.                     'Result renderer object needs to implement'
    81. -
    82.                     . ' SparqlEngine_ResultRenderer interface'
    83. -
    84.                 );
    85. -
    86.             }
    87. -
    88.         }
    89. -
    90.  
    91. -
    92.         if ($resultform === false{
    93. -
    94.             $resultform 'Default';
    95. -
    96.         else if ($resultform == 'xml'{
    97. -
    98.             //kept for BC reasons
    99. -
    100.             $resultform 'XML';
    101. -
    102.         }
    103. -
    104.  
    105. -
    106.         if ($strClass self::loadClass($resultform)) {
    107. -
    108.             $rrObj new $strClass();
    109. -
    110.             if ($rrObj instanceof SparqlEngine_ResultRenderer{
    111. -
    112.                 return $rrObj->convertFromResult(
    113. -
    114.                     $arVartable,
    115. -
    116.                     $engine->getQuery(),
    117. -
    118.                     $engine
    119. -
    120.                 );
    121. -
    122.             else {
    123. -
    124.                 throw new Exception(
    125. -
    126.                     'Result renderer class "' $strClass '" needs to implement'
    127. -
    128.                     . ' SparqlEngine_ResultRenderer interface'
    129. -
    130.                 );
    131. -
    132.             }
    133. -
    134.         else {
    135. -
    136.             throw new Exception(
    137. -
    138.                 'Result renderer class "' $resultform '" could not be loaded.'
    139. -
    140.             );
    141. -
    142.         }
    143. -
    144.     }//public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false)
    145. -
    146.  
    147. -
    148.  
    149. -
    150.  
    151. -
    152.     /**
    153. -
    154.     *   Tries to load a given class if it doesn't exist,
    155. -
    156.     *   and returns true if the class can be used.
    157. -
    158.     *
    159. -
    160.     *   @param string $strClass Classname
    161. -
    162.     *   @return mixed Class name if the class is loaded and can be used, false if not.
    163. -
    164.     */
    165. -
    166.     protected static function loadClass($strClass)
    167. -
    168.     {
    169. -
    170.         if (class_exists($strClass)) {
    171. -
    172.             return $strClass;
    173. -
    174.         }
    175. -
    176.  
    177. -
    178.         //RAP style, shortcut notation
    179. -
    180.         $strFile 'SparqlEngine/ResultRenderer/' $strClass '.php';
    181. -
    182.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    183. -
    184.         if (class_exists('SparqlEngine_ResultRenderer_' $strClass)) {
    185. -
    186.             return 'SparqlEngine_ResultRenderer_' $strClass;
    187. -
    188.         }
    189. -
    190.  
    191. -
    192.         //RAP style
    193. -
    194.         $strFile str_replace('_''/'$strClass'.php';
    195. -
    196.         @include_once RDFAPI_INCLUDE_DIR 'sparql/' $strFile;
    197. -
    198.         if (class_exists($strClass)) {
    199. -
    200.             return $strClass;
    201. -
    202.         }
    203. -
    204.  
    205. -
    206.         //PEAR style
    207. -
    208.         @include_once $strFile;
    209. -
    210.         if (class_exists($strClass)) {
    211. -
    212.             return $strClass;
    213. -
    214.         }
    215. -
    216.  
    217. -
    218.         return false;
    219. -
    220.     }//protected static function loadClass($strClass)
    221. -
    222.  
    223. -
    224. }//class SparqlEngine_ResultConverter
    225. -
    226. ?>
    227. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html deleted file mode 100755 index 52164841..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRenderer.php.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - File Source for ResultRenderer.php - - - - - -

    Source for file ResultRenderer.php

    -

    Documentation is available at ResultRenderer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. /**
    6. -
    7. *   Result renderer interface that any result renderer needs to implement.
    8. -
    9. *   A result renderer converts results into a
    10. -
    11. *   - for the user - usable result format, e.g. php arrays, xml, json and
    12. -
    13. *   so on.
    14. -
    15. *
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. -
    26. {
    27. -
    28.     /**
    29. -
    30.     *   Converts the database results into the desired output format
    31. -
    32.     *   and returns the result.
    33. -
    34.     *
    35. -
    36.     *   @param array $arVartable    Variable table
    37. -
    38.     *   @param Query $query         SPARQL query object
    39. -
    40.     *   @param SparqlEngine $engine Sparql Engine to query the database
    41. -
    42.     *   @return mixed   The result as rendered by the result renderers.
    43. -
    44.     */
    45. -
    46.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine);
    47. -
    48.  
    49. -
    50. }//interface SparqlEngine_ResultRenderer
    51. -
    52.  
    53. -
    54. ?>
    55. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html deleted file mode 100755 index 9c16adb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererDefault.php.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - File Source for Default.php - - - - - -

    Source for file Default.php

    -

    Documentation is available at Default.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   Default result renderer for SparqlEngine
    10. -
    11. *
    12. -
    13. *   @author Tobias Gauß <tobias.gauss@web.de>
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
    24. -
    25. {
    26. -
    27.     /**
    28. -
    29.     *   Converts the database results into the output format
    30. -
    31.     *   and returns the result.
    32. -
    33.     *
    34. -
    35.     *   @param array $arVartable    Variable table
    36. -
    37.     *   @param Query $query         SPARQL query object
    38. -
    39.     *   @param SparqlEngine $engine Sparql Engine to query the database
    40. -
    41.     *   @return mixed               Most likely an array
    42. -
    43.     */
    44. -
    45.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    46. -
    47.     {
    48. -
    49.         $this->query   $query;
    50. -
    51.         $this->engine  $engine;
    52. -
    53.         $this->dataset $engine->getDataset();
    54. -
    55.  
    56. -
    57.         $result false;
    58. -
    59.         $qrf    $this->query->getResultForm();
    60. -
    61.  
    62. -
    63.         if ($arVartable != null{
    64. -
    65.             switch ($qrf{
    66. -
    67.                 case 'ask':
    68. -
    69.                     if (count($arVartable0{
    70. -
    71.                         $result true;
    72. -
    73.                     else {
    74. -
    75.                         $result false;
    76. -
    77.                     }
    78. -
    79.                     break;
    80. -
    81.                 case 'count':
    82. -
    83.                     $result count($arVartable);
    84. -
    85.                     break;
    86. -
    87.                 case 'construct':
    88. -
    89.                     $result $this->constructGraph(
    90. -
    91.                         $arVartable,
    92. -
    93.                         $this->query->getConstructPattern()
    94. -
    95.                     );
    96. -
    97.                     break;
    98. -
    99.                 case 'describe':
    100. -
    101.                     $result $this->describeGraph($arVartable);
    102. -
    103.                     break;
    104. -
    105.                 default:
    106. -
    107.                     $result $arVartable;
    108. -
    109.                     break;
    110. -
    111.             }
    112. -
    113.         else if ($qrf == 'describe'){
    114. -
    115.             $result $this->describeGraph(null);
    116. -
    117.         else if ($qrf == 'construct'){
    118. -
    119.             $result $this->constructGraph(
    120. -
    121.                 false,
    122. -
    123.                 $this->query->getConstructPattern()
    124. -
    125.             );
    126. -
    127.         }
    128. -
    129.  
    130. -
    131.         return $result;
    132. -
    133.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    134. -
    135.  
    136. -
    137.  
    138. -
    139.  
    140. -
    141.     /**
    142. -
    143.     * Constructs a result graph.
    144. -
    145.     *
    146. -
    147.     * @param  array         $arVartable       A table containing the result vars and their bindings
    148. -
    149.     * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
    150. -
    151.     * @return MemModel      The result graph which matches the CONSTRUCT pattern
    152. -
    153.     */
    154. -
    155.     function constructGraph($arVartable$constructPattern)
    156. -
    157.     {
    158. -
    159.         $resultGraph new MemModel();
    160. -
    161.  
    162. -
    163.         if (!$arVartable{
    164. -
    165.             return $resultGraph;
    166. -
    167.         }
    168. -
    169.  
    170. -
    171.         $tp $constructPattern->getTriplePattern();
    172. -
    173.  
    174. -
    175.         $bnode 0;
    176. -
    177.         foreach ($arVartable as $value{
    178. -
    179.             foreach ($tp as $triple{
    180. -
    181.                 $sub  $triple->getSubject();
    182. -
    183.                 $pred $triple->getPredicate();
    184. -
    185.                 $obj  $triple->getObject();
    186. -
    187.  
    188. -
    189.                 if (is_string($sub)  && $sub{1== '_'{
    190. -
    191.                     $sub  new BlankNode("_bN".$bnode);
    192. -
    193.                 }
    194. -
    195.                 if (is_string($pred&& $pred{1== '_'{
    196. -
    197.                     $pred new BlankNode("_bN".$bnode);
    198. -
    199.                 }
    200. -
    201.                 if (is_string($obj)  && $obj{1== '_'{
    202. -
    203.                     $obj  new BlankNode("_bN".$bnode);
    204. -
    205.                 }
    206. -
    207.  
    208. -
    209.  
    210. -
    211.                 if (is_string($sub)) {
    212. -
    213.                     $sub  $value[$sub];
    214. -
    215.                 }
    216. -
    217.                 if (is_string($pred)) {
    218. -
    219.                     $pred $value[$pred];
    220. -
    221.                 }
    222. -
    223.                 if (is_string($obj)) {
    224. -
    225.                     $obj  $value[$obj];
    226. -
    227.                 }
    228. -
    229.  
    230. -
    231.                 if ($sub !== "" && $pred !== "" && $obj !== ""{
    232. -
    233.                     $resultGraph->add(new Statement($sub,$pred,$obj));
    234. -
    235.                 }
    236. -
    237.             }
    238. -
    239.             $bnode++;
    240. -
    241.         }
    242. -
    243.         return $resultGraph;
    244. -
    245.     }//function constructGraph($arVartable, $constructPattern)
    246. -
    247.  
    248. -
    249.  
    250. -
    251.  
    252. -
    253.     /**
    254. -
    255.     * Builds a describing named graph. To define an attribute list for a
    256. -
    257.     * several rdf:type look at constants.php
    258. -
    259.     *
    260. -
    261.     * @param  array      $arVartable 
    262. -
    263.     * @return MemModel 
    264. -
    265.     */
    266. -
    267.     function describeGraph($arVartable)
    268. -
    269.     {
    270. -
    271.         // build empty named graph
    272. -
    273.         $resultGraph new MemModel();
    274. -
    275.         // if no where clause fill $arVartable
    276. -
    277.         $vars $this->query->getResultVars();
    278. -
    279.         if ($arVartable == null{
    280. -
    281.             if ($vars{
    282. -
    283.                 $arVartable[0array('?x' => new Resource(substr($vars[0],1,-1)));
    284. -
    285.                 $vars[0'?x';
    286. -
    287.             }
    288. -
    289.         }
    290. -
    291.         // fetch attribute list from constants.php
    292. -
    293.         global $sparql_describe;
    294. -
    295.         // for each resultset
    296. -
    297.         foreach ($arVartable as $resultset{
    298. -
    299.             foreach ($vars as $varname{
    300. -
    301.                 $varvalue $resultset[$varname];
    302. -
    303.                 // try to determine rdf:type of the variable
    304. -
    305.                 $type $this->_determineType($varvalue$resultGraph);
    306. -
    307.                 // search attribute list defined in constants.php
    308. -
    309.                 $list null;
    310. -
    311.                 if ($type{
    312. -
    313.                     $strLuri strtolower($type->getUri());
    314. -
    315.                     if (isset($sparql_describe[$strLuri])) {
    316. -
    317.                         $list $sparql_describe[$strLuri;
    318. -
    319.                     }
    320. -
    321.                 }
    322. -
    323.                 // search in dataset
    324. -
    325.                 $this->_getAttributes($list$resultGraph$varvalue);
    326. -
    327.             }
    328. -
    329.         }
    330. -
    331.  
    332. -
    333.         return $resultGraph;
    334. -
    335.     }//function describeGraph($arVartable)
    336. -
    337.  
    338. -
    339.  
    340. -
    341.  
    342. -
    343.     /**
    344. -
    345.     * Tries to determine the rdf:type of the variable.
    346. -
    347.     *
    348. -
    349.     * @param  Node       $var The variable
    350. -
    351.     * @param  MemModel   $resultGraph The result graph which describes the Resource
    352. -
    353.     * @return String     Uri of the rdf:type
    354. -
    355.     */
    356. -
    357.     protected function _determineType($var$resultGraph)
    358. -
    359.     {
    360. -
    361.         $type null;
    362. -
    363.         // find in namedGraphs
    364. -
    365.         if (!$var instanceof Literal{
    366. -
    367.             $iter $this->dataset->findInNamedGraphs(
    368. -
    369.                 null,
    370. -
    371.                 $var,
    372. -
    373.                 new Resource(RDF_NAMESPACE_URI.'type'),
    374. -
    375.                 null,
    376. -
    377.                 true
    378. -
    379.             );
    380. -
    381.             while ($iter->valid()) {
    382. -
    383.                 $statement $iter->current();
    384. -
    385.                 $type $statement->getObject();
    386. -
    387.                 $resultGraph->add($iter->current());
    388. -
    389.                 break;
    390. -
    391.             }
    392. -
    393.         }
    394. -
    395.         // if no type information found find in default graph
    396. -
    397.         if (!$type{
    398. -
    399.             if (!$var instanceof Literal{
    400. -
    401.                 $iter1 $this->dataset->findInDefaultGraph(
    402. -
    403.                     $var,
    404. -
    405.                     new Resource(RDF_NAMESPACE_URI.'type'),
    406. -
    407.                     null
    408. -
    409.                 );
    410. -
    411.                 $type null;
    412. -
    413.                 while ($iter1->valid()) {
    414. -
    415.                     $statement $iter1->current();
    416. -
    417.                     $type      $statement->getObject();
    418. -
    419.                     $resultGraph->add($iter1->current());
    420. -
    421.                     break;
    422. -
    423.                 }
    424. -
    425.             }
    426. -
    427.         }
    428. -
    429.         return $type;
    430. -
    431.     }//protected function _determineType($var, $resultGraph)
    432. -
    433.  
    434. -
    435.  
    436. -
    437.  
    438. -
    439.     /**
    440. -
    441.     * Search the attributes listed in $list in the dataset.
    442. -
    443.     * Modifies $resultGraph
    444. -
    445.     *
    446. -
    447.     * @param Array      $list List containing the attributes
    448. -
    449.     * @param MemModel   $resultGraph The result graph which describes the Resource
    450. -
    451.     * @return void 
    452. -
    453.     */
    454. -
    455.     protected function _getAttributes($list$resultGraph$varvalue)
    456. -
    457.     {
    458. -
    459.         if ($list){
    460. -
    461.             foreach ($list as $attribute{
    462. -
    463.                 if (!$varvalue instanceof Literal{
    464. -
    465.                     $iter2 $this->dataset->findInNamedGraphs(
    466. -
    467.                         null,
    468. -
    469.                         $varvalue,
    470. -
    471.                         new Resource($attribute),
    472. -
    473.                         null,
    474. -
    475.                         true
    476. -
    477.                     );
    478. -
    479.                     while ($iter2->valid()) {
    480. -
    481.                         $resultGraph->add($iter2->current());
    482. -
    483.                         $iter2->next();
    484. -
    485.                     }
    486. -
    487.                     $iter3 $this->dataset->findInDefaultGraph(
    488. -
    489.                         $varvalue,
    490. -
    491.                         new Resource($attribute),
    492. -
    493.                         null
    494. -
    495.                     );
    496. -
    497.                     while ($iter3->valid()) {
    498. -
    499.                         $resultGraph->add($iter3->current());
    500. -
    501.                         $iter3->next();
    502. -
    503.                     }
    504. -
    505.                 }
    506. -
    507.             }
    508. -
    509.         }
    510. -
    511.     }//protected function _getAttributes($list, $resultGraph, $varvalue)
    512. -
    513.  
    514. -
    515.  
    516. -
    517. }//class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
    518. -
    519.  
    520. -
    521. ?>
    522. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html deleted file mode 100755 index 13c94ac3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererHTML.php.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - File Source for HTML.php - - - - - -

    Source for file HTML.php

    -

    Documentation is available at HTML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'util/RdfUtil.php';
    6. -
    7.  
    8. -
    9. /**
    10. -
    11. *   XML result renderer for SparqlEngine
    12. -
    13. *
    14. -
    15. *   @author Tobias Gauß <tobias.gauss@web.de>
    16. -
    17. *   @author Christian Weiske <cweiske@cweiske.de>
    18. -
    19. *
    20. -
    21. *   @package sparql
    22. -
    23. */
    24. -
    25. class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
    26. -
    27. {
    28. -
    29.     /**
    30. -
    31.     *   If the result HTML should be wrapped in a div
    32. -
    33.     *   @var boolean 
    34. -
    35.     */
    36. -
    37.     protected $bWrap = true;
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     *   Converts the database results into the output format
    48. -
    49.     *   and returns the result.
    50. -
    51.     *
    52. -
    53.     *   @param array $arVartable    Variable table
    54. -
    55.     *   @param Query $query         SPARQL query object
    56. -
    57.     *   @param SparqlEngine $engine Sparql Engine to query the database
    58. -
    59.     *   @return string HTML result
    60. -
    61.     */
    62. -
    63.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    64. -
    65.     {
    66. -
    67.         $this->query   $query;
    68. -
    69.         $this->engine  $engine;
    70. -
    71.         $this->dataset $engine->getDataset();
    72. -
    73.  
    74. -
    75.         $strCode     '';
    76. -
    77.  
    78. -
    79.         $strResultForm $query->getResultForm();
    80. -
    81.         switch ($strResultForm{
    82. -
    83.             case 'select':
    84. -
    85.             case 'select distinct':
    86. -
    87.                 $strCode $this->createTableFromRecords($arVartable);
    88. -
    89.                 break;
    90. -
    91.  
    92. -
    93.             case 'construct':
    94. -
    95.             case 'describe':
    96. -
    97.                 throw new Exception(
    98. -
    99.                     'Construct and describe are currently not supported by the'
    100. -
    101.                     . ' HTML renderer'
    102. -
    103.                 );
    104. -
    105.  
    106. -
    107.             case 'count':
    108. -
    109.             case 'ask':
    110. -
    111.                 $nCount count($arVartable);
    112. -
    113.  
    114. -
    115.                 if ($strResultForm == 'ask'{
    116. -
    117.                     $strCode 'There were results.';
    118. -
    119.                 else {
    120. -
    121.                     $strCode 'There are ' $nCount ' results.';
    122. -
    123.                 }
    124. -
    125.                 break;
    126. -
    127.  
    128. -
    129.             default:
    130. -
    131.                 throw new Exception('Unsupported result form: ' $strResultForm);
    132. -
    133.         }
    134. -
    135.  
    136. -
    137.         return $this->wrapCode($strCode);
    138. -
    139.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    140. -
    141.  
    142. -
    143.  
    144. -
    145.  
    146. -
    147.     protected function wrapCode($strCode)
    148. -
    149.     {
    150. -
    151.         if (!$this->bWrap{
    152. -
    153.             return $strCode;
    154. -
    155.         }
    156. -
    157.  
    158. -
    159.         return
    160. -
    161.             '<div class="SparqlEngine_ResultRenderer_HTML_result">' "\n"
    162. -
    163.             . $strCode "\n"
    164. -
    165.             . "</div>\n";
    166. -
    167.     }//protected function wrapCode($strCode)
    168. -
    169.  
    170. -
    171.  
    172. -
    173.  
    174. -
    175.     protected function createTableFromRecords($arVartable)
    176. -
    177.     {
    178. -
    179.         if (count($arVartable== 0{
    180. -
    181.             return 'No result rows.';
    182. -
    183.         }
    184. -
    185.  
    186. -
    187.         $arResult array();
    188. -
    189.         foreach ($arVartable as $row{
    190. -
    191.             $arResultRow array();
    192. -
    193.             foreach ($row as $strVarName => $value{
    194. -
    195.                 $arResultRow[$strVarName$this->createValue($value);
    196. -
    197.             }
    198. -
    199.             $arResult[$arResultRow;
    200. -
    201.         }
    202. -
    203.  
    204. -
    205.         //I always wanted to to this :)
    206. -
    207.         return
    208. -
    209.             "<table border='1'>\n"
    210. -
    211.             . " <caption>SPARQL result with " count($arResult" rows</caption>\n"
    212. -
    213.             . " <thead><th>"
    214. -
    215.                 . implode('</th><th>'array_keys(reset($arResult)))
    216. -
    217.             . "</th></thead>\n"
    218. -
    219.             . " <tbody>\n  <tr>"
    220. -
    221.             . implode(
    222. -
    223.                 "</tr>\n  <tr>",
    224. -
    225.                 array_map(
    226. -
    227.                     create_function(
    228. -
    229.                         '$ar',
    230. -
    231.                         'return implode("", $ar);'
    232. -
    233.                     ),
    234. -
    235.                     $arResult
    236. -
    237.                 )
    238. -
    239.               )
    240. -
    241.             . "</tr>\n </tbody>\n"
    242. -
    243.             . "</table>\n";
    244. -
    245.     }//protected function createTableFromRecords($arRecordSets)
    246. -
    247.  
    248. -
    249.  
    250. -
    251.  
    252. -
    253.     /**
    254. -
    255.     *   Creates an RDF object object
    256. -
    257.     *   contained in the given $dbRecordSet object.
    258. -
    259.     *
    260. -
    261.     *   @see convertFromDbResult() to understand $strVarBase necessity
    262. -
    263.     *
    264. -
    265.     *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
    266. -
    267.     *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
    268. -
    269.     *
    270. -
    271.     *   @return string HTML code
    272. -
    273.     */
    274. -
    275.     protected function createValue($value)
    276. -
    277.     {
    278. -
    279.         if ($value === null{
    280. -
    281.             $strCode $this->getHtmlNull();
    282. -
    283.         }
    284. -
    285.         if ($value instanceof Literal{
    286. -
    287.             $strCode $this->getHtmlLiteral(
    288. -
    289.                 $value->getLabel(),
    290. -
    291.                 $value->getLanguage(),
    292. -
    293.                 $value->getDatatype()
    294. -
    295.             );
    296. -
    297.         else if ($value instanceof Resource{
    298. -
    299.             $strCode $this->getHtmlResource($value->getURI());
    300. -
    301.         else {
    302. -
    303.             $strCode $this->getHtmlBlank();
    304. -
    305.         }
    306. -
    307.  
    308. -
    309.         return '<td style="background-color: '
    310. -
    311.                . RdfUtil::chooseColor($value'">'
    312. -
    313.                . $strCode
    314. -
    315.                . '</td>';
    316. -
    317.     }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
    318. -
    319.  
    320. -
    321.  
    322. -
    323.  
    324. -
    325.     protected function getHtmlNull()
    326. -
    327.     {
    328. -
    329.         return '<pre>NULL</pre>';
    330. -
    331.     }//protected function getHtmlNull()
    332. -
    333.  
    334. -
    335.  
    336. -
    337.  
    338. -
    339.     protected function getHtmlBlank($value)
    340. -
    341.     {
    342. -
    343.         return '<i>Blank node</i>';
    344. -
    345.     }//protected function getHtmlBlank($value)
    346. -
    347.  
    348. -
    349.  
    350. -
    351.  
    352. -
    353.     protected function getHtmlResource($value)
    354. -
    355.     {
    356. -
    357.         return htmlspecialchars($value);
    358. -
    359.     }//protected function getHtmlResource($value)
    360. -
    361.  
    362. -
    363.  
    364. -
    365.  
    366. -
    367.     protected function getHtmlLiteral($value$language$datatype)
    368. -
    369.     {
    370. -
    371.         $strCode htmlspecialchars($value);
    372. -
    373.         if ($language{
    374. -
    375.             $strCode .= '<br/>&nbsp;&nbsp;<i>xml:lang</i>=' $language;
    376. -
    377.         }
    378. -
    379.         if ($datatype{
    380. -
    381.             $strCode .= '<br/>&nbsp;&nbsp;<i>rdf:type</i>=' $datatype;
    382. -
    383.         }
    384. -
    385.         return $strCode;
    386. -
    387.     }//protected function getHtmlLiteral($value, $language, $datatype)
    388. -
    389.  
    390. -
    391. }//class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
    392. -
    393.  
    394. -
    395. ?>
    396. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html deleted file mode 100755 index cee17a53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlEngineResultRendererXML.php.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - File Source for XML.php - - - - - -

    Source for file XML.php

    -

    Documentation is available at XML.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlEngineDb/ResultRenderer.php';
    4. -
    5.  
    6. -
    7. /**
    8. -
    9. *   XML result renderer for SparqlEngine
    10. -
    11. *
    12. -
    13. *   @author Tobias Gauß <tobias.gauss@web.de>
    14. -
    15. *   @author Christian Weiske <cweiske@cweiske.de>
    16. -
    17. *
    18. -
    19. *   @package sparql
    20. -
    21. */
    22. -
    23. class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
    24. -
    25. {
    26. -
    27.     /**
    28. -
    29.     *   Converts the database results into the output format
    30. -
    31.     *   and returns the result.
    32. -
    33.     *
    34. -
    35.     *   @param array $arVartable    Variable table
    36. -
    37.     *   @param Query $query         SPARQL query object
    38. -
    39.     *   @param SparqlEngine $engine Sparql Engine to query the database
    40. -
    41.     *   @return string XML result
    42. -
    43.     */
    44. -
    45.     public function convertFromResult($arVartableQuery $querySparqlEngine $engine)
    46. -
    47.     {
    48. -
    49.         $this->query   $query;
    50. -
    51.         $this->engine  $engine;
    52. -
    53.         $this->dataset $engine->getDataset();
    54. -
    55.  
    56. -
    57.         if ($arVartable instanceof NamedGraphMem{
    58. -
    59.             return $arVartable->writeRdfToString();
    60. -
    61.         }
    62. -
    63.  
    64. -
    65.         $result '<sparql xmlns="http://www.w3.org/2005/sparql-results#">';
    66. -
    67.         $header '<head>';
    68. -
    69.  
    70. -
    71.         // build header
    72. -
    73.         if (is_array($arVartable)) {
    74. -
    75.             $vars $this->query->getResultVars();
    76. -
    77.             $header '<head>';
    78. -
    79.             foreach ($vars as $value{
    80. -
    81.                 $header $header
    82. -
    83.                         . '<variable name="' substr($value1'"/>';
    84. -
    85.             }
    86. -
    87.             $header $header '</head>';
    88. -
    89.  
    90. -
    91.             // build results
    92. -
    93.             $solm $this->query->getSolutionModifier();
    94. -
    95.             $sel  $this->query->getResultForm();
    96. -
    97.  
    98. -
    99.             $distinct 'false';
    100. -
    101.             if ($sel == 'select distinct'{
    102. -
    103.                 $distinct 'true';
    104. -
    105.             }
    106. -
    107.  
    108. -
    109.             $ordered 'false';
    110. -
    111.             if ($solm['order by'!= 0{
    112. -
    113.                 $ordered 'true';
    114. -
    115.             }
    116. -
    117.  
    118. -
    119.             $results '<results ordered="'.$ordered.'" distinct="'.$distinct.'">';
    120. -
    121.             foreach ($arVartable as $value{
    122. -
    123.                 $results $results.'<result>';
    124. -
    125.                 foreach ($value as $varname => $varvalue{
    126. -
    127.                     $results $results
    128. -
    129.                             . $this->_getBindingString(
    130. -
    131.                                 substr($varname1),
    132. -
    133.                                 $varvalue
    134. -
    135.                             );
    136. -
    137.                 }
    138. -
    139.                 $results $results '</result>';
    140. -
    141.             }
    142. -
    143.             $results $results '</results>';
    144. -
    145.         else {
    146. -
    147.             $results '</head><boolean>' $vartable '</boolean>';
    148. -
    149.         }
    150. -
    151.  
    152. -
    153.         $result $result $header $results '</sparql>';
    154. -
    155.         $result simplexml_load_string($result);
    156. -
    157.         return $result->asXML();
    158. -
    159.     }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
    160. -
    161.  
    162. -
    163.  
    164. -
    165.  
    166. -
    167.     /**
    168. -
    169.     * Helper Function for function buildXmlResult($vartable). Generates
    170. -
    171.     * an xml string for a single variable an their corresponding value.
    172. -
    173.     *
    174. -
    175.     * @param  String  $varname The variables name
    176. -
    177.     * @param  Node    $varvalue The value of the variable
    178. -
    179.     * @return String  The xml string
    180. -
    181.     */
    182. -
    183.     protected function _getBindingString($varname$varvalue)
    184. -
    185.     {
    186. -
    187.         $binding '<binding name="'.$varname.'">';
    188. -
    189.         $value '<unbound/>';
    190. -
    191.  
    192. -
    193.         if ($varvalue instanceof BlankNode{
    194. -
    195.             $value '<bnode>' $varvalue->getLabel('</bnode>';
    196. -
    197.         else if ($varvalue instanceof Resource{
    198. -
    199.             $value '<uri>' $varvalue->getUri('</uri>';
    200. -
    201.         else if ($varvalue instanceof Literal{
    202. -
    203.             $label htmlspecialchars($varvalue->getLabel());
    204. -
    205.             $value '<literal>'.$label.'</literal>';
    206. -
    207.             if ($varvalue->getDatatype(!= null{
    208. -
    209.                 $value '<literal datatype="'
    210. -
    211.                         . $varvalue->getDatatype('">'
    212. -
    213.                         . $label
    214. -
    215.                         . '</literal>';
    216. -
    217.             }
    218. -
    219.             if ($varvalue->getLanguage(!= null{
    220. -
    221.                 $value '<literal xml:lang="'
    222. -
    223.                         . $varvalue->getLanguage('">'
    224. -
    225.                         . $label
    226. -
    227.                         . '</literal>';
    228. -
    229.             }
    230. -
    231.         }
    232. -
    233.         $binding $binding $value '</binding>';
    234. -
    235.  
    236. -
    237.         return $binding;
    238. -
    239.     }//protected function _getBindingString($varname, $varvalue)
    240. -
    241.  
    242. -
    243. }//class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
    244. -
    245.  
    246. -
    247. ?>
    248. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParser.php.html deleted file mode 100755 index 2ab66948..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParser.php.html +++ /dev/null @@ -1,1442 +0,0 @@ - - - - - - File Source for SparqlParser.php - - - - - -

    Source for file SparqlParser.php

    -

    Documentation is available at SparqlParser.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // Class: SparqlParser
    6. -
    7. // ---------------------------------------------
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'model/Literal.php';
    10. -
    11. require_once RDFAPI_INCLUDE_DIR 'model/Resource.php';
    12. -
    13. require_once RDFAPI_INCLUDE_DIR 'sparql/Constraint.php';
    14. -
    15. require_once RDFAPI_INCLUDE_DIR 'sparql/Query.php';
    16. -
    17. require_once RDFAPI_INCLUDE_DIR 'sparql/QueryTriple.php';
    18. -
    19. require_once RDFAPI_INCLUDE_DIR 'sparql/SparqlParserException.php';
    20. -
    21.  
    22. -
    23. /**
    24. -
    25. * Parses a SPARQL Query string and returns a Query Object.
    26. -
    27. *
    28. -
    29. @author   Tobias Gauss <tobias.gauss@web.de>
    30. -
    31. @author   Christian Weiske <cweiske@cweiske.de>
    32. -
    33. @version     $Id: fsource_sparql__sparqlSparqlParser.php.html 443 2007-06-01 16:25:38Z cax $
    34. -
    35. *
    36. -
    37. @package sparql
    38. -
    39. */
    40. -
    41. class SparqlParser extends Object
    42. -
    43. {
    44. -
    45.  
    46. -
    47.     /**
    48. -
    49.     * The query Object
    50. -
    51.     * @var Query 
    52. -
    53.     */
    54. -
    55.     protected $query;
    56. -
    57.  
    58. -
    59.     /**
    60. -
    61.     * The Querystring
    62. -
    63.     * @var string 
    64. -
    65.     */
    66. -
    67.     protected $querystring;
    68. -
    69.  
    70. -
    71.     /**
    72. -
    73.     * The tokenized Query
    74. -
    75.     * @var array 
    76. -
    77.     */
    78. -
    79.     protected $tokens = array();
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Last parsed graphPattern
    86. -
    87.     * @var int 
    88. -
    89.     */
    90. -
    91.     protected $tmp;
    92. -
    93.  
    94. -
    95.     /**
    96. -
    97.     * Operators introduced by sparql
    98. -
    99.     * @var array 
    100. -
    101.     */
    102. -
    103.     protected static $sops array(
    104. -
    105.         'regex',
    106. -
    107.         'bound',
    108. -
    109.         'isuri',
    110. -
    111.         'isblank',
    112. -
    113.         'isliteral',
    114. -
    115.         'str',
    116. -
    117.         'lang',
    118. -
    119.         'datatype',
    120. -
    121.         'langmatches'
    122. -
    123.     );
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     *   Which order operators are to be treated.
    130. -
    131.     *   (11.3 Operator Mapping)
    132. -
    133.     *   @var array 
    134. -
    135.     */
    136. -
    137.     protected static $operatorPrecedence array(
    138. -
    139.         '||'    => 0,
    140. -
    141.         '&&'    => 1,
    142. -
    143.         '='     => 2,
    144. -
    145.         '!='    => 3,
    146. -
    147.         '<'     => 4,
    148. -
    149.         '>'     => 5,
    150. -
    151.         '<='    => 6,
    152. -
    153.         '>='    => 7,
    154. -
    155.         '*'     => 0,
    156. -
    157.         '/'     => 0,
    158. -
    159.         '+'     => 0,
    160. -
    161.         '-'     => 0,
    162. -
    163.     );
    164. -
    165.  
    166. -
    167.  
    168. -
    169.  
    170. -
    171.     /**
    172. -
    173.     * Constructor of SparqlParser
    174. -
    175.     */
    176. -
    177.     public function SparqlParser()
    178. -
    179.     {
    180. -
    181.     }
    182. -
    183.  
    184. -
    185.  
    186. -
    187.  
    188. -
    189.     /**
    190. -
    191.     * Main function of SparqlParser. Parses a query string.
    192. -
    193.     *
    194. -
    195.     * @param  String $queryString The SPARQL query
    196. -
    197.     * @return Query  The query object
    198. -
    199.     * @throws SparqlParserException
    200. -
    201.     */
    202. -
    203.     public function parse($queryString false)
    204. -
    205.     {
    206. -
    207.         $this->prepare();
    208. -
    209.  
    210. -
    211.         try {
    212. -
    213.             if ($queryString{
    214. -
    215.                 $uncommentedQuery $this->uncomment($queryString);
    216. -
    217.                 $this->tokenize($uncommentedQuery);
    218. -
    219.                 $this->querystring = $uncommentedQuery;
    220. -
    221.                 $this->parseQuery();
    222. -
    223.             else {
    224. -
    225.                 throw new SparqlParserException(
    226. -
    227.                     "Querystring is empty.",
    228. -
    229.                     null,
    230. -
    231.                     key($this->tokens)
    232. -
    233.                 );
    234. -
    235.                 $this->query->isEmpty = true;
    236. -
    237.             }
    238. -
    239.             return $this->query;
    240. -
    241.         catch (SparqlParserException $e{
    242. -
    243.             $this->error($e);
    244. -
    245.             return false;
    246. -
    247.         }
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.  
    254. -
    255.  
    256. -
    257.     /**
    258. -
    259.     *   Set all internal variables to a clear state
    260. -
    261.     *   before we start parsing.
    262. -
    263.     */
    264. -
    265.     protected function prepare()
    266. -
    267.     {
    268. -
    269.         $this->query          = new Query();
    270. -
    271.         $this->querystring    = null;
    272. -
    273.         $this->tokens         = array();
    274. -
    275.         $this->tmp            = null;
    276. -
    277.         // add the default prefixes defined in constants.php
    278. -
    279.         global $default_prefixes;
    280. -
    281.         $this->query->prefixes = $default_prefixes;
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.  
    288. -
    289.  
    290. -
    291.     /**
    292. -
    293.     * Tokenizes the querystring.
    294. -
    295.     *
    296. -
    297.     * @param  String $queryString 
    298. -
    299.     * @return void 
    300. -
    301.     */
    302. -
    303.     protected function tokenize($queryString)
    304. -
    305.     {
    306. -
    307.         $queryString trim($queryString);
    308. -
    309.         $specialChars array(" ""\t""\r""\n"",""("")","{","}",'"',"'",";","[","]");
    310. -
    311.         $len strlen($queryString);
    312. -
    313.         $this->tokens[0]='';
    314. -
    315.         $n 0;
    316. -
    317.         for ($i=0$i<$len++$i{
    318. -
    319.             if (!in_array($queryString{$i}$specialChars)) {
    320. -
    321.                 $this->tokens[$n.= $queryString{$i};
    322. -
    323.             else {
    324. -
    325.                 if ($this->tokens[$n!= ''{
    326. -
    327.                     ++$n;
    328. -
    329.                 }
    330. -
    331.                 $this->tokens[$n$queryString{$i};
    332. -
    333.                 $this->tokens[++$n'';
    334. -
    335.             }
    336. -
    337.         }
    338. -
    339.     }
    340. -
    341.  
    342. -
    343.  
    344. -
    345.  
    346. -
    347.     /**
    348. -
    349.     * Removes comments in the query string. Comments are
    350. -
    351.     * indicated by '#'.
    352. -
    353.     *
    354. -
    355.     * @param  String $queryString 
    356. -
    357.     * @return String The uncommented query string
    358. -
    359.     */
    360. -
    361.     protected function uncomment($queryString)
    362. -
    363.     {
    364. -
    365.         // php appears to escape quotes, so unescape them
    366. -
    367.           $queryString str_replace('\"',"'",$queryString);
    368. -
    369.           $queryString str_replace("\'",'"',$queryString);
    370. -
    371.  
    372. -
    373.         $regex ="/((\"[^\"]*\")|(\'[^\']*\')|(\<[^\>]*\>))|(#.*)/";
    374. -
    375.         return preg_replace($regex,'\1',$queryString);
    376. -
    377.     }
    378. -
    379.  
    380. -
    381.     /**
    382. -
    383.     * Starts parsing the tokenized SPARQL Query.
    384. -
    385.     *
    386. -
    387.     * @return void 
    388. -
    389.     */
    390. -
    391.     protected function parseQuery()
    392. -
    393.     {
    394. -
    395.         do {
    396. -
    397.             switch (strtolower(current($this->tokens))) {
    398. -
    399.                 case "base":
    400. -
    401.                     $this->parseBase();
    402. -
    403.                     break;
    404. -
    405.                 case "prefix":
    406. -
    407.                     $this->parsePrefix();
    408. -
    409.                     break;
    410. -
    411.                 case "select":
    412. -
    413.                     $this->parseSelect();
    414. -
    415.                     break;
    416. -
    417.                 case "describe":
    418. -
    419.                     $this->parseDescribe();
    420. -
    421.                     break;
    422. -
    423.                 case "ask":
    424. -
    425.                     $this->parseAsk('ask');
    426. -
    427.                     break;
    428. -
    429.                 case "count":
    430. -
    431.                     $this->parseAsk('count');
    432. -
    433.                     break;
    434. -
    435.                 case "from":
    436. -
    437.                     $this->parseFrom();
    438. -
    439.                     break;
    440. -
    441.                 case "construct":
    442. -
    443.                     $this->parseConstruct();
    444. -
    445.                     break;
    446. -
    447.                 case "where":
    448. -
    449.                     $this->parseWhere();
    450. -
    451.                     $this->parseModifier();
    452. -
    453.                     break;
    454. -
    455.                 case "{":
    456. -
    457.                     prev($this->tokens);
    458. -
    459.                     $this->parseWhere();
    460. -
    461.                     $this->parseModifier();
    462. -
    463.                     break;
    464. -
    465.             }
    466. -
    467.         while (next($this->tokens));
    468. -
    469.  
    470. -
    471.     }
    472. -
    473.  
    474. -
    475.  
    476. -
    477.  
    478. -
    479.     /**
    480. -
    481.     * Parses the BASE part of the query.
    482. -
    483.     *
    484. -
    485.     * @return void 
    486. -
    487.     * @throws SparqlParserException
    488. -
    489.     */
    490. -
    491.     protected function parseBase()
    492. -
    493.     {
    494. -
    495.         $this->_fastForward();
    496. -
    497.         if ($this->iriCheck(current($this->tokens))) {
    498. -
    499.             $this->query->setBase(current($this->tokens));
    500. -
    501.         else {
    502. -
    503.             $msg current($this->tokens);
    504. -
    505.             $msg preg_replace('/</''&lt;'$msg);
    506. -
    507.             throw new SparqlParserException(
    508. -
    509.                 "IRI expected",
    510. -
    511.                 null,
    512. -
    513.                 key($this->tokens)
    514. -
    515.             );
    516. -
    517.         }
    518. -
    519.     }
    520. -
    521.  
    522. -
    523.  
    524. -
    525.  
    526. -
    527.     /**
    528. -
    529.     * Adds a new namespace prefix to the query object.
    530. -
    531.     *
    532. -
    533.     * @return void 
    534. -
    535.     * @throws SparqlParserException
    536. -
    537.     */
    538. -
    539.     protected function parsePrefix()
    540. -
    541.     {
    542. -
    543.         $this->_fastForward();
    544. -
    545.         $prefix substr(current($this->tokens)0-1);
    546. -
    547.         $this->_fastForward();
    548. -
    549.         if ($this->iriCheck(current($this->tokens))) {
    550. -
    551.             $uri substr(current($this->tokens)1-1);
    552. -
    553.             $this->query->addPrefix($prefix$uri);
    554. -
    555.         else {
    556. -
    557.             $msg current($this->tokens);
    558. -
    559.             $msg preg_replace('/</''&lt;'$msg);
    560. -
    561.             throw new SparqlParserException(
    562. -
    563.                 "IRI expected",
    564. -
    565.                 null,
    566. -
    567.                 key($this->tokens)
    568. -
    569.             );
    570. -
    571.         }
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.  
    578. -
    579.  
    580. -
    581.     /**
    582. -
    583.     * Parses the SELECT part of a query.
    584. -
    585.     *
    586. -
    587.     * @return void 
    588. -
    589.     * @throws SparqlParserException
    590. -
    591.     */
    592. -
    593.     protected function parseSelect()
    594. -
    595.     {
    596. -
    597.         while (strtolower(current($this->tokens)) != 'from' &
    598. -
    599.                strtolower(current($this->tokens)) != 'where' &
    600. -
    601.                strtolower(current($this->tokens)) != "{"
    602. -
    603.         ){
    604. -
    605.             $this->_fastForward();
    606. -
    607.             if ($this->varCheck(current($this->tokens))
    608. -
    609.                 | strtolower(current($this->tokens)) == '*'
    610. -
    611.             ){
    612. -
    613.                 $this->query->addVariable(current($this->tokens));
    614. -
    615.                 if (!$this->query->getResultForm()) {
    616. -
    617.                     $this->query->setResultForm('select');
    618. -
    619.                 }
    620. -
    621.             else {
    622. -
    623.                 if (strtolower(current($this->tokens))=='distinct'{
    624. -
    625.                     $this->query->setResultForm('select distinct');
    626. -
    627.                     $this->_fastForward();
    628. -
    629.                     if ($this->varCheck(current($this->tokens))
    630. -
    631.                         | strtolower(current($this->tokens))=='*'
    632. -
    633.                     {
    634. -
    635.                         $this->query->addVariable(current($this->tokens));
    636. -
    637.                     else {
    638. -
    639.                         throw new SparqlParserException(
    640. -
    641.                             "Variable or '*' expected.",
    642. -
    643.                             null,
    644. -
    645.                             key($this->tokens)
    646. -
    647.                         );
    648. -
    649.                     }
    650. -
    651.                 }
    652. -
    653.             }
    654. -
    655.  
    656. -
    657.             if (!current($this->tokens)) {
    658. -
    659.                 throw new SparqlParserException(
    660. -
    661.                     "Unexpected end of File.",
    662. -
    663.                     null,
    664. -
    665.                     key($this->tokens)
    666. -
    667.                 );
    668. -
    669.                 break;
    670. -
    671.             }
    672. -
    673.         }
    674. -
    675.         prev($this->tokens);
    676. -
    677.     }
    678. -
    679.  
    680. -
    681.  
    682. -
    683.     /**
    684. -
    685.     * Adds a new variable to the query and sets result form to 'DESCRIBE'.
    686. -
    687.     *
    688. -
    689.     * @return void 
    690. -
    691.     */
    692. -
    693.     protected function parseDescribe()
    694. -
    695.     {
    696. -
    697.         while(strtolower(current($this->tokens))!='from'strtolower(current($this->tokens))!='where'){
    698. -
    699.             $this->_fastForward();
    700. -
    701.             if($this->varCheck(current($this->tokens))|$this->iriCheck(current($this->tokens))){
    702. -
    703.                 $this->query->addVariable(current($this->tokens));
    704. -
    705.                 if(!$this->query->getResultForm())
    706. -
    707.                     $this->query->setResultForm('describe');
    708. -
    709.             }
    710. -
    711.             if(!current($this->tokens))
    712. -
    713.             break;
    714. -
    715.         }
    716. -
    717.         prev($this->tokens);
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     /**
    724. -
    725.     * Sets result form to 'ASK' and 'COUNT'.
    726. -
    727.     *
    728. -
    729.     * @param string $form  if it's an ASK or COUNT query
    730. -
    731.     * @return void 
    732. -
    733.     */
    734. -
    735.     protected function parseAsk($form){
    736. -
    737.         $this->query->setResultForm($form);
    738. -
    739.         $this->_fastForward();
    740. -
    741.         if(current($this->tokens)=="{")
    742. -
    743.             $this->_rewind();
    744. -
    745.         $this->parseWhere();
    746. -
    747.         $this->parseModifier();
    748. -
    749.     }
    750. -
    751.  
    752. -
    753.     /**
    754. -
    755.     * Parses the FROM clause.
    756. -
    757.     *
    758. -
    759.     * @return void 
    760. -
    761.     * @throws SparqlParserException
    762. -
    763.     */
    764. -
    765.     protected function parseFrom(){
    766. -
    767.         $this->_fastForward();
    768. -
    769.         if(strtolower(current($this->tokens))!='named'){
    770. -
    771.             if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
    772. -
    773.                 $this->query->addFrom(new Resource(substr(current($this->tokens),1,-1)));
    774. -
    775.             }else if($this->varCheck(current($this->tokens))){
    776. -
    777.                 $this->query->addFrom(current($this->tokens));
    778. -
    779.             }else{
    780. -
    781.                 throw new SparqlParserException("Variable, Iri or qname expected in FROM ",null,key($this->tokens));
    782. -
    783.             }
    784. -
    785.             $this->query->addFrom(current($this->tokens));
    786. -
    787.         }else{
    788. -
    789.             $this->_fastForward();
    790. -
    791.             if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
    792. -
    793.                 $this->query->addFromNamed(new Resource(substr(current($this->tokens),1,-1)));
    794. -
    795.             }else if($this->varCheck(current($this->tokens))){
    796. -
    797.                 $this->query->addFromNamed(current($this->tokens));
    798. -
    799.             }else{
    800. -
    801.                 throw new SparqlParserException("Variable, Iri or qname expected in FROM NAMED ",null,key($this->tokens));
    802. -
    803.             }
    804. -
    805.         }
    806. -
    807.     }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.     /**
    814. -
    815.     * Parses the CONSTRUCT clause.
    816. -
    817.     *
    818. -
    819.     * @return void 
    820. -
    821.     * @throws SparqlParserException
    822. -
    823.     */
    824. -
    825.     protected function parseConstruct(){
    826. -
    827.         $this->_fastForward();
    828. -
    829.         $this->query->setResultForm('construct');
    830. -
    831.         if(current($this->tokens)=="{"){
    832. -
    833.             $this->parseGraphPattern(false,false,false,true);
    834. -
    835.         }else{
    836. -
    837.             throw new SparqlParserException("Unable to parse CONSTRUCT part. '{' expected. ",null,key($this->tokens));
    838. -
    839.         }
    840. -
    841.         $this->parseWhere();
    842. -
    843.         $this->parseModifier();
    844. -
    845.     }
    846. -
    847.  
    848. -
    849.  
    850. -
    851.     /**
    852. -
    853.     * Parses the WHERE clause.
    854. -
    855.     *
    856. -
    857.     * @return void 
    858. -
    859.     * @throws SparqlParserException
    860. -
    861.     */
    862. -
    863.     protected function parseWhere(){
    864. -
    865.         $this->_fastForward();
    866. -
    867.         if(current($this->tokens)=="{"){
    868. -
    869.             $this->parseGraphPattern();
    870. -
    871.         }else{
    872. -
    873.             throw new SparqlParserException("Unable to parse WHERE part. '{' expected in Query. ",null,key($this->tokens));
    874. -
    875.         }
    876. -
    877.     }
    878. -
    879.  
    880. -
    881.  
    882. -
    883.  
    884. -
    885.     /**
    886. -
    887.     * Checks if $token is a variable.
    888. -
    889.     *
    890. -
    891.     * @param  String  $token The token
    892. -
    893.     * @return boolean TRUE if the token is a variable false if not
    894. -
    895.     */
    896. -
    897.     protected function varCheck($token)
    898. -
    899.     {
    900. -
    901.         if (isset($token[0]&& ($token{0== '$' || $token{0== '?')) {
    902. -
    903.             $this->query->addVar($token);
    904. -
    905.             return true;
    906. -
    907.         }
    908. -
    909.         return false;
    910. -
    911.     }
    912. -
    913.  
    914. -
    915.     /**
    916. -
    917.     * Checks if $token is an IRI.
    918. -
    919.     *
    920. -
    921.     * @param  String  $token The token
    922. -
    923.     * @return boolean TRUE if the token is an IRI false if not
    924. -
    925.     */
    926. -
    927.     protected function iriCheck($token){
    928. -
    929.         $pattern="/^<[^>]*>\.?$/";
    930. -
    931.         if(preg_match($pattern,$token)>0)
    932. -
    933.         return true;
    934. -
    935.         return false;
    936. -
    937.     }
    938. -
    939.  
    940. -
    941.  
    942. -
    943.     /**
    944. -
    945.     * Checks if $token is a Blanknode.
    946. -
    947.     *
    948. -
    949.     * @param  String  $token The token
    950. -
    951.     * @return boolean TRUE if the token is BNode false if not
    952. -
    953.     */
    954. -
    955.     protected function bNodeCheck($token){
    956. -
    957.         if($token{0== "_")
    958. -
    959.         return true;
    960. -
    961.         else
    962. -
    963.         return false;
    964. -
    965.     }
    966. -
    967.  
    968. -
    969.  
    970. -
    971.     /**
    972. -
    973.     * Checks if $token is a qname.
    974. -
    975.     *
    976. -
    977.     * @param  String  $token The token
    978. -
    979.     * @return boolean TRUE if the token is a qname false if not
    980. -
    981.     * @throws SparqlParserException
    982. -
    983.     */
    984. -
    985.     protected function qnameCheck($token)
    986. -
    987.     {
    988. -
    989.         $pattern="/^([^:^\<]*):([^:]*)$/";
    990. -
    991.         if (preg_match($pattern,$token,$hits)>0{
    992. -
    993.             $prefs $this->query->getPrefixes();
    994. -
    995.             if (isset($prefs{$hits{1}})) {
    996. -
    997.                 return true;
    998. -
    999.             }
    1000. -
    1001.             if ($hits{1== "_"{
    1002. -
    1003.                 return true;
    1004. -
    1005.             }
    1006. -
    1007.             throw new SparqlParserException("Unbound Prefix: <i>".$hits{1}."</i>",null,key($this->tokens));
    1008. -
    1009.         else {
    1010. -
    1011.             return false;
    1012. -
    1013.         }
    1014. -
    1015.     }
    1016. -
    1017.  
    1018. -
    1019.  
    1020. -
    1021.     /**
    1022. -
    1023.     * Checks if $token is a Literal.
    1024. -
    1025.     *
    1026. -
    1027.     * @param  String  $token The token
    1028. -
    1029.     * @return boolean TRUE if the token is a Literal false if not
    1030. -
    1031.     */
    1032. -
    1033.     protected function literalCheck($token){
    1034. -
    1035.         $pattern="/^[\"\'].*$/";
    1036. -
    1037.         if(preg_match($pattern,$token)>0)
    1038. -
    1039.         return true;
    1040. -
    1041.         return false;
    1042. -
    1043.     }
    1044. -
    1045.  
    1046. -
    1047.     /**
    1048. -
    1049.     * FastForward until next token which is not blank.
    1050. -
    1051.     *
    1052. -
    1053.     * @return void 
    1054. -
    1055.     */
    1056. -
    1057.     protected function _fastForward(){
    1058. -
    1059.         next($this->tokens);
    1060. -
    1061.         while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
    1062. -
    1063.             next($this->tokens);
    1064. -
    1065.         }
    1066. -
    1067.         return;
    1068. -
    1069.     }
    1070. -
    1071.  
    1072. -
    1073.     /**
    1074. -
    1075.     * Rewind until next token which is not blank.
    1076. -
    1077.     *
    1078. -
    1079.     * @return void 
    1080. -
    1081.     */
    1082. -
    1083.     protected function _rewind(){
    1084. -
    1085.         prev($this->tokens);
    1086. -
    1087.         while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
    1088. -
    1089.             prev($this->tokens);
    1090. -
    1091.         }
    1092. -
    1093.         return;
    1094. -
    1095.     }
    1096. -
    1097.  
    1098. -
    1099.     /**
    1100. -
    1101.     * Parses a graph pattern.
    1102. -
    1103.     *
    1104. -
    1105.     * @param  int     $optional Optional graph pattern
    1106. -
    1107.     * @param  int     $union    Union graph pattern
    1108. -
    1109.     * @param  string  $graph    Graphname
    1110. -
    1111.     * @param  boolean $constr   TRUE if the pattern is a construct pattern
    1112. -
    1113.     * @return void 
    1114. -
    1115.     */
    1116. -
    1117.     protected function parseGraphPattern($optional false$union false$graph false,$constr false$external false){
    1118. -
    1119.         $pattern $this->query->getNewPattern($constr);
    1120. -
    1121.         if(is_int($optional)){
    1122. -
    1123.             $pattern->addOptional($optional);
    1124. -
    1125.         }else{
    1126. -
    1127.             $this->tmp = $pattern->getId();
    1128. -
    1129.         }
    1130. -
    1131.         if(is_int($union)){
    1132. -
    1133.             $pattern->addUnion($union);
    1134. -
    1135.         }
    1136. -
    1137.         if($graph != false){
    1138. -
    1139.             $pattern->setGraphname($graph);
    1140. -
    1141.         }
    1142. -
    1143.  
    1144. -
    1145.         $this->_fastForward();
    1146. -
    1147.  
    1148. -
    1149.         do {
    1150. -
    1151.             switch (strtolower(current($this->tokens))) {
    1152. -
    1153.                 case "graph":
    1154. -
    1155.                     $this->parseGraph();
    1156. -
    1157.                     break;
    1158. -
    1159.                 case "union":
    1160. -
    1161.                     $this->_fastForward();
    1162. -
    1163.                     $this->parseGraphPattern(false,$this->tmp);
    1164. -
    1165.                     break;
    1166. -
    1167.                 case "optional":
    1168. -
    1169.                     $this->_fastForward();
    1170. -
    1171.                     $this->parseGraphPattern($this->tmp,false);
    1172. -
    1173.                     break;
    1174. -
    1175.                 case "filter":
    1176. -
    1177.                     $this->parseConstraint($pattern,true);
    1178. -
    1179.                     $this->_fastForward();
    1180. -
    1181.                     break;
    1182. -
    1183.                 case ".":
    1184. -
    1185.                     $this->_fastForward();
    1186. -
    1187.                     break;
    1188. -
    1189.                 case "{":
    1190. -
    1191.                     $this->parseGraphPattern(false,false);
    1192. -
    1193.                     break;
    1194. -
    1195.                 case "}":
    1196. -
    1197.                     $pattern->open false;
    1198. -
    1199.                     break;
    1200. -
    1201.                 default:
    1202. -
    1203.                     $this->parseTriplePattern($pattern);
    1204. -
    1205.                     break;
    1206. -
    1207.             }
    1208. -
    1209.         while ($pattern->open);
    1210. -
    1211.  
    1212. -
    1213.         if ($external{
    1214. -
    1215.             return $pattern;
    1216. -
    1217.         }
    1218. -
    1219.         $this->_fastForward();
    1220. -
    1221.     }
    1222. -
    1223.  
    1224. -
    1225.     /**
    1226. -
    1227.     * Parses a triple pattern.
    1228. -
    1229.     *
    1230. -
    1231.     * @param  GraphPattern $pattern 
    1232. -
    1233.     * @return void 
    1234. -
    1235.     */
    1236. -
    1237.     protected function parseTriplePattern(&$pattern)
    1238. -
    1239.     {
    1240. -
    1241.         $trp      Array();
    1242. -
    1243.         $prev     false;
    1244. -
    1245.         $prevPred false;
    1246. -
    1247.         $cont     true;
    1248. -
    1249.         $sub      "";
    1250. -
    1251.         $pre      "";
    1252. -
    1253.         $tmp      "";
    1254. -
    1255.         $tmpPred  "";
    1256. -
    1257.         $obj      "";
    1258. -
    1259.         do {
    1260. -
    1261.             switch (strtolower(current($this->tokens))) {
    1262. -
    1263.                 case false:
    1264. -
    1265.                     $cont          false;
    1266. -
    1267.                     $pattern->open false;
    1268. -
    1269.                     break;
    1270. -
    1271.                 case "filter":
    1272. -
    1273.                     $this->parseConstraint($pattern,false);
    1274. -
    1275.                     $this->_fastForward();
    1276. -
    1277.                     break;
    1278. -
    1279.                 case "optional":
    1280. -
    1281.                     $this->_fastForward();
    1282. -
    1283.                     $this->parseGraphPattern($pattern->getId(),false);
    1284. -
    1285.                     $cont false;
    1286. -
    1287.                     break;
    1288. -
    1289.                 case ";":
    1290. -
    1291.                     $prev true;
    1292. -
    1293.                     $this->_fastForward();
    1294. -
    1295.                     break;
    1296. -
    1297.                 case ".":
    1298. -
    1299.                     $prev false;
    1300. -
    1301.                     $this->_fastForward();
    1302. -
    1303.                     break;
    1304. -
    1305.                 case "graph":
    1306. -
    1307.                     $this->parseGraph();
    1308. -
    1309.                     break;
    1310. -
    1311.                 case ",":
    1312. -
    1313.                     $prev     true;
    1314. -
    1315.                     $prevPred true;
    1316. -
    1317.                     $this->_fastForward();
    1318. -
    1319.                     break;
    1320. -
    1321.                 case "}":
    1322. -
    1323.                     $prev false;
    1324. -
    1325.                     $pattern->open false;
    1326. -
    1327.                     $cont false;
    1328. -
    1329.                     break;
    1330. -
    1331.                 case "[":
    1332. -
    1333.                     $prev true;
    1334. -
    1335.                     $tmp  $this->parseNode($this->query->getBlanknodeLabel());
    1336. -
    1337.                     $this->_fastForward();
    1338. -
    1339.                     break;
    1340. -
    1341.                 case "]":
    1342. -
    1343.                     $prev true;
    1344. -
    1345.                     $this->_fastForward();
    1346. -
    1347.                     break;
    1348. -
    1349.                 case "(":
    1350. -
    1351.                     $prev true;
    1352. -
    1353.                     $tmp $this->parseCollection($trp);
    1354. -
    1355.                     $this->_fastForward();
    1356. -
    1357.                     break;
    1358. -
    1359.                 case false:
    1360. -
    1361.                     $cont false;
    1362. -
    1363.                     $pattern->open false;
    1364. -
    1365.                     break;
    1366. -
    1367.                 default:
    1368. -
    1369.                     if ($prev{
    1370. -
    1371.                         $sub $tmp;
    1372. -
    1373.                     else {
    1374. -
    1375.                         $sub $this->parseNode();
    1376. -
    1377.                         $this->_fastForward();
    1378. -
    1379.                         $tmp     $sub;
    1380. -
    1381.                     }
    1382. -
    1383.                     if ($prevPred{
    1384. -
    1385.                         $pre $tmpPred;
    1386. -
    1387.                     else {
    1388. -
    1389.                         $pre $this->parseNode();
    1390. -
    1391.                         $this->_fastForward();
    1392. -
    1393.                         $tmpPred $pre;
    1394. -
    1395.                     }
    1396. -
    1397.                     if (current($this->tokens)=="["{
    1398. -
    1399.                         $tmp  $this->parseNode($this->query->getBlanknodeLabel());
    1400. -
    1401.                         $prev true;
    1402. -
    1403.                         $obj $tmp;
    1404. -
    1405.                     else if (current($this->tokens)=="("{
    1406. -
    1407.                         $obj $this->parseCollection($trp);
    1408. -
    1409.                     else {
    1410. -
    1411.                         $obj $this->parseNode();
    1412. -
    1413.                     }
    1414. -
    1415.                     $trp[new QueryTriple($sub,$pre,$obj);
    1416. -
    1417.                     $this->_fastForward();
    1418. -
    1419.                     break;
    1420. -
    1421.  
    1422. -
    1423.             }
    1424. -
    1425.         while ($cont);
    1426. -
    1427.         if (count($trp0{
    1428. -
    1429.             $pattern->addTriplePattern($trp);
    1430. -
    1431.         }
    1432. -
    1433.     }
    1434. -
    1435.  
    1436. -
    1437.  
    1438. -
    1439.  
    1440. -
    1441.     /**
    1442. -
    1443.     * Parses a value constraint.
    1444. -
    1445.     *
    1446. -
    1447.     * @param GraphPattern $pattern 
    1448. -
    1449.     * @param boolean $outer     If the constraint is an outer one.
    1450. -
    1451.     * @return void 
    1452. -
    1453.     */
    1454. -
    1455.     protected function parseConstraint(&$pattern$outer)
    1456. -
    1457.     {
    1458. -
    1459.         $constraint new Constraint();
    1460. -
    1461.         $constraint->setOuterFilter($outer);
    1462. -
    1463.         $this->_fastForward();
    1464. -
    1465.         $this->_rewind();
    1466. -
    1467.         $nBeginKey key($this->tokens);
    1468. -
    1469.         $constraint->setTree(
    1470. -
    1471.             $t $this->parseConstraintTree()
    1472. -
    1473.         );
    1474. -
    1475.  
    1476. -
    1477.         $nEndKey key($this->tokens);
    1478. -
    1479.         if (current($this->tokens== '}'{
    1480. -
    1481.             prev($this->tokens);
    1482. -
    1483.         }
    1484. -
    1485.  
    1486. -
    1487.         //for backwards compatibility with the normal sparql engine
    1488. -
    1489.         // which does not use the tree array currently
    1490. -
    1491.         $expression trim(implode(
    1492. -
    1493.             '',
    1494. -
    1495.             array_slice(
    1496. -
    1497.                     $this->tokens,
    1498. -
    1499.                     $nBeginKey 1,
    1500. -
    1501.                     $nEndKey $nBeginKey 1
    1502. -
    1503.             )
    1504. -
    1505.         ));
    1506. -
    1507.         if ($expression[0== '(' && substr($expression-1== ')'{
    1508. -
    1509.             $expression trim(substr($expression1-1));
    1510. -
    1511.         }
    1512. -
    1513.         $constraint->addExpression($expression);
    1514. -
    1515.  
    1516. -
    1517.         $pattern->addConstraint($constraint);
    1518. -
    1519.     }//protected function parseConstraint(&$pattern, $outer)
    1520. -
    1521.  
    1522. -
    1523.  
    1524. -
    1525.  
    1526. -
    1527.     /**
    1528. -
    1529.     *   Parses a constraint string recursively.
    1530. -
    1531.     *
    1532. -
    1533.     *   The result array is one "element" which may contain subelements.
    1534. -
    1535.     *   All elements have one key "type" that determines which other
    1536. -
    1537.     *   array keys the element array has. Valid types are:
    1538. -
    1539.     *   - "value":
    1540. -
    1541.     *       Just a plain value with a value key, nothing else
    1542. -
    1543.     *   - "function"
    1544. -
    1545.     *       A function has a name and an array of parameter(s). Each parameter
    1546. -
    1547.     *       is an element.
    1548. -
    1549.     *   - "equation"
    1550. -
    1551.     *       An equation has an operator, and operand1 and operand2 which
    1552. -
    1553.     *       are elements themselves
    1554. -
    1555.     *   Any element may have the "negated" value set to true, which means
    1556. -
    1557.     *   that is is - negated (!).
    1558. -
    1559.     *
    1560. -
    1561.     *   @internal The functionality of this method is being unit-tested
    1562. -
    1563.     *    in testSparqlParserTests::testParseFilter()
    1564. -
    1565.     *    "equation'-elements have another key "level" which is to be used
    1566. -
    1567.     *    internally only.
    1568. -
    1569.     *
    1570. -
    1571.     *   @return array Nested tree array representing the filter
    1572. -
    1573.     */
    1574. -
    1575.     protected function parseConstraintTree($nLevel 0$bParameter false)
    1576. -
    1577.     {
    1578. -
    1579.         $tree       array();
    1580. -
    1581.         $part       array();
    1582. -
    1583.         $chQuotes   null;
    1584. -
    1585.         $strQuoted  '';
    1586. -
    1587.  
    1588. -
    1589.         while ($tok next($this->tokens)) {
    1590. -
    1591.             if ($chQuotes !== null && $tok != $chQuotes{
    1592. -
    1593.                 $strQuoted .= $tok;
    1594. -
    1595.                 continue;
    1596. -
    1597.             else if ($tok == ')' || $tok == '}' || $tok == '.'{
    1598. -
    1599.                 break;
    1600. -
    1601.             }
    1602. -
    1603.  
    1604. -
    1605.             switch ($tok{
    1606. -
    1607.                 case '"':
    1608. -
    1609.                 case '\'':
    1610. -
    1611.                     if ($chQuotes === null{
    1612. -
    1613.                         $chQuotes  $tok;
    1614. -
    1615.                         $strQuoted '';
    1616. -
    1617.                     else {
    1618. -
    1619.                         $chQuotes null;
    1620. -
    1621.                         $part[array(
    1622. -
    1623.                             'type'  => 'value',
    1624. -
    1625.                             'value' => $strQuoted,
    1626. -
    1627.                             'quoted'=> true
    1628. -
    1629.                         );
    1630. -
    1631.                     }
    1632. -
    1633.                     continue 2;
    1634. -
    1635.                     break;
    1636. -
    1637.  
    1638. -
    1639.                 case '(':
    1640. -
    1641.                     $bFunc1 = isset($part[0]['type']&& $part[0]['type'== 'value';
    1642. -
    1643.                     $bFunc2 = isset($tree['type'])    && $tree['type']    == 'equation'
    1644. -
    1645.                            && isset($tree['operand2']&& isset($tree['operand2']['value']);
    1646. -
    1647.                     $part[$this->parseConstraintTree(
    1648. -
    1649.                         $nLevel 1,
    1650. -
    1651.                         $bFunc1 || $bFunc2
    1652. -
    1653.                     );
    1654. -
    1655.  
    1656. -
    1657.                     if ($bFunc1{
    1658. -
    1659.                         $tree['type']       'function';
    1660. -
    1661.                         $tree['name']       $part[0]['value'];
    1662. -
    1663.                         self::fixNegationInFuncName($tree);
    1664. -
    1665.                         if (isset($part[1]['type'])) {
    1666. -
    1667.                             $part[1array($part[1]);
    1668. -
    1669.                         }
    1670. -
    1671.                         $tree['parameter']  $part[1];
    1672. -
    1673.                         $part array();
    1674. -
    1675.                     else if ($bFunc2{
    1676. -
    1677.                         $tree['operand2']['type']       'function';
    1678. -
    1679.                         $tree['operand2']['name']       $tree['operand2']['value'];
    1680. -
    1681.                         self::fixNegationInFuncName($tree['operand2']);
    1682. -
    1683.                         $tree['operand2']['parameter']  $part[0];
    1684. -
    1685.                         unset($tree['operand2']['value']);
    1686. -
    1687.                         unset($tree['operand2']['quoted']);
    1688. -
    1689.                         $part array();
    1690. -
    1691.                     }
    1692. -
    1693.                     continue 2;
    1694. -
    1695.                     break;
    1696. -
    1697.  
    1698. -
    1699.                 case ' ':
    1700. -
    1701.                 case "\t":
    1702. -
    1703.                     continue 2;
    1704. -
    1705.  
    1706. -
    1707.                 case '=':
    1708. -
    1709.                 case '>':
    1710. -
    1711.                 case '<':
    1712. -
    1713.                 case '<=':
    1714. -
    1715.                 case '>=':
    1716. -
    1717.                 case '!=':
    1718. -
    1719.                 case '&&':
    1720. -
    1721.                 case '||':
    1722. -
    1723.                     if (isset($tree['type']&& $tree['type'== 'equation'
    1724. -
    1725.                         && isset($tree['operand2'])) {
    1726. -
    1727.                         //previous equation open
    1728. -
    1729.                         $part array($tree);
    1730. -
    1731.                     else if (isset($tree['type']&& $tree['type'!= 'equation'{
    1732. -
    1733.                         $part array($tree);
    1734. -
    1735.                         $tree array();
    1736. -
    1737.                     }
    1738. -
    1739.                     $tree['type']       'equation';
    1740. -
    1741.                     $tree['level']      $nLevel;
    1742. -
    1743.                     $tree['operator']   $tok;
    1744. -
    1745.                     $tree['operand1']   $part[0];
    1746. -
    1747.                     unset($tree['operand2']);
    1748. -
    1749.                     $part array();
    1750. -
    1751.                     continue 2;
    1752. -
    1753.                     break;
    1754. -
    1755.  
    1756. -
    1757.                 case '!':
    1758. -
    1759.                     if ($tree != array()) {
    1760. -
    1761.                         throw new SparqlParserException(
    1762. -
    1763.                             'Unexpected "!" negation in constraint.'
    1764. -
    1765.                         );
    1766. -
    1767.                     }
    1768. -
    1769.                     $tree['negated'true;
    1770. -
    1771.                     continue 2;
    1772. -
    1773.  
    1774. -
    1775.                 case ',':
    1776. -
    1777.                     //parameter separator
    1778. -
    1779.                     if (count($part== && !isset($tree['type'])) {
    1780. -
    1781.                         throw new SparqlParserException(
    1782. -
    1783.                             'Unexpected comma'
    1784. -
    1785.                         );
    1786. -
    1787.                     }
    1788. -
    1789.                     $bParameter true;
    1790. -
    1791.                     if (count($part== 0{
    1792. -
    1793.                         $part[$tree;
    1794. -
    1795.                         $tree array();
    1796. -
    1797.                     }
    1798. -
    1799.                     continue 2;
    1800. -
    1801.  
    1802. -
    1803.                 default:
    1804. -
    1805.                     break;
    1806. -
    1807.             }
    1808. -
    1809.  
    1810. -
    1811.             if ($this->varCheck($tok)) {
    1812. -
    1813.                 $part[array(
    1814. -
    1815.                     'type'      => 'value',
    1816. -
    1817.                     'value'     => $tok,
    1818. -
    1819.                     'quoted'    => false
    1820. -
    1821.                 );
    1822. -
    1823.             else if (substr($tok02== '^^'{
    1824. -
    1825.                 $part[count($part1]['datatype']
    1826. -
    1827.                     = $this->query->getFullUri(substr($tok2));
    1828. -
    1829.             else if ($tok[0== '@'{
    1830. -
    1831.                 $part[count($part1]['language'substr($tok1);
    1832. -
    1833.             else {
    1834. -
    1835.                 $part[array(
    1836. -
    1837.                     'type'      => 'value',
    1838. -
    1839.                     'value'     => $tok,
    1840. -
    1841.                     'quoted'    => false
    1842. -
    1843.                 );
    1844. -
    1845.             }
    1846. -
    1847.  
    1848. -
    1849.             if (isset($tree['type']&& $tree['type'== 'equation' && isset($part[0])) {
    1850. -
    1851.                 $tree['operand2'$part[0];
    1852. -
    1853.                 self::balanceTree($tree);
    1854. -
    1855.                 $part array();
    1856. -
    1857.             }
    1858. -
    1859.         }
    1860. -
    1861.  
    1862. -
    1863.         if (!isset($tree['type']&& $bParameter{
    1864. -
    1865.             return $part;
    1866. -
    1867.         else if (isset($tree['type']&& $tree['type'== 'equation'
    1868. -
    1869.             && isset($tree['operand1']&& !isset($tree['operand2'])
    1870. -
    1871.             && isset($part[0])) {
    1872. -
    1873.             $tree['operand2'$part[0];
    1874. -
    1875.             self::balanceTree($tree);
    1876. -
    1877.         }
    1878. -
    1879.  
    1880. -
    1881.         if (!isset($tree['type']&& isset($part[0])) {
    1882. -
    1883.             if (isset($tree['negated'])) {
    1884. -
    1885.                 $part[0]['negated'true;
    1886. -
    1887.             }
    1888. -
    1889.             return $part[0];
    1890. -
    1891.         }
    1892. -
    1893.  
    1894. -
    1895.         return $tree;
    1896. -
    1897.     }//protected function parseConstraintTree($nLevel = 0, $bParameter = false)
    1898. -
    1899.  
    1900. -
    1901.  
    1902. -
    1903.  
    1904. -
    1905.     /**
    1906. -
    1907.     *   "Balances" the filter tree in the way that operators on the same
    1908. -
    1909.     *   level are nested according to their precedence defined in
    1910. -
    1911.     *   $operatorPrecedence array.
    1912. -
    1913.     *
    1914. -
    1915.     *   @param array $tree  Tree to be modified
    1916. -
    1917.     */
    1918. -
    1919.     protected static function balanceTree(&$tree)
    1920. -
    1921.     {
    1922. -
    1923.         if (
    1924. -
    1925.             isset($tree['type']&& $tree['type'== 'equation'
    1926. -
    1927.          && isset($tree['operand1']['type']&& $tree['operand1']['type'== 'equation'
    1928. -
    1929.          && $tree['level'== $tree['operand1']['level']
    1930. -
    1931.          && self::$operatorPrecedence[$tree['operator']] self::$operatorPrecedence[$tree['operand1']['operator']]
    1932. -
    1933.         {
    1934. -
    1935.             $op2 array(
    1936. -
    1937.                 'type'      => 'equation',
    1938. -
    1939.                 'level'     => $tree['level'],
    1940. -
    1941.                 'operator'  => $tree['operator'],
    1942. -
    1943.                 'operand1'  => $tree['operand1']['operand2'],
    1944. -
    1945.                 'operand2'  => $tree['operand2']
    1946. -
    1947.             );
    1948. -
    1949.             $tree['operator']   $tree['operand1']['operator'];
    1950. -
    1951.             $tree['operand1']   $tree['operand1']['operand1'];
    1952. -
    1953.             $tree['operand2']   $op2;
    1954. -
    1955.         }
    1956. -
    1957.     }//protected static function balanceTree(&$tree)
    1958. -
    1959.  
    1960. -
    1961.  
    1962. -
    1963.  
    1964. -
    1965.     protected static function fixNegationInFuncName(&$tree)
    1966. -
    1967.     {
    1968. -
    1969.         if ($tree['type'== 'function' && $tree['name'][0== '!'{
    1970. -
    1971.             $tree['name'substr($tree['name']1);
    1972. -
    1973.             if (!isset($tree['negated'])) {
    1974. -
    1975.                 $tree['negated'true;
    1976. -
    1977.             else {
    1978. -
    1979.                 unset($tree['negated']);
    1980. -
    1981.             }
    1982. -
    1983.             //perhaps more !!
    1984. -
    1985.             self::fixNegationInFuncName($tree);
    1986. -
    1987.         }
    1988. -
    1989.     }//protected static function fixNegationInFuncName(&$tree)
    1990. -
    1991.  
    1992. -
    1993.  
    1994. -
    1995.  
    1996. -
    1997.     /**
    1998. -
    1999.     * Parses a bracketted expression.
    2000. -
    2001.     *
    2002. -
    2003.     * @param  Constraint $constraint 
    2004. -
    2005.     * @return void 
    2006. -
    2007.     * @throws SparqlParserException
    2008. -
    2009.     */
    2010. -
    2011.     protected function parseBrackettedExpression(&$constraint)
    2012. -
    2013.     {
    2014. -
    2015.         $open 1;
    2016. -
    2017.         $exp "";
    2018. -
    2019.         $this->_fastForward();
    2020. -
    2021.         while ($open != && current($this->tokens)!= false{
    2022. -
    2023.             switch (current($this->tokens)) {
    2024. -
    2025.                 case "(":
    2026. -
    2027.                     $open++;
    2028. -
    2029.                     $exp $exp current($this->tokens);
    2030. -
    2031.                     break;
    2032. -
    2033.                 case ")":
    2034. -
    2035.                     $open--;
    2036. -
    2037.                     if($open != 0){
    2038. -
    2039.                         $exp $exp current($this->tokens);
    2040. -
    2041.                     }
    2042. -
    2043.                     break;
    2044. -
    2045.                 case false:
    2046. -
    2047.                     throw new SparqlParserException(
    2048. -
    2049.                         "Unexpected end of query.",
    2050. -
    2051.                         null,
    2052. -
    2053.                         key($this->tokens)
    2054. -
    2055.                     );
    2056. -
    2057.                 default:
    2058. -
    2059.                     $exp $exp current($this->tokens);
    2060. -
    2061.                     break;
    2062. -
    2063.             }
    2064. -
    2065.             next($this->tokens);
    2066. -
    2067.         }
    2068. -
    2069.         $constraint->addExpression($exp);
    2070. -
    2071.     }
    2072. -
    2073.  
    2074. -
    2075.  
    2076. -
    2077.     /**
    2078. -
    2079.     * Parses an expression.
    2080. -
    2081.     *
    2082. -
    2083.     * @param  Constraint  $constrain 
    2084. -
    2085.     * @return void 
    2086. -
    2087.     * @throws SparqlParserException
    2088. -
    2089.     */
    2090. -
    2091.     protected function parseExpression(&$constraint)
    2092. -
    2093.     {
    2094. -
    2095.         $exp "";
    2096. -
    2097.         while (current($this->tokens!= false && current($this->tokens!= "}"{
    2098. -
    2099.             switch (current($this->tokens)) {
    2100. -
    2101.                 case false:
    2102. -
    2103.                     throw new SparqlParserException(
    2104. -
    2105.                         "Unexpected end of query.",
    2106. -
    2107.                         null,
    2108. -
    2109.                         key($this->tokens)
    2110. -
    2111.                     );
    2112. -
    2113.                 case ".":
    2114. -
    2115.                     break;
    2116. -
    2117.                     break;
    2118. -
    2119.                 default:
    2120. -
    2121.                     $exp $exp current($this->tokens);
    2122. -
    2123.                     break;
    2124. -
    2125.             }
    2126. -
    2127.             next($this->tokens);
    2128. -
    2129.         }
    2130. -
    2131.         $constraint->addExpression($exp);
    2132. -
    2133.     }
    2134. -
    2135.  
    2136. -
    2137.     /**
    2138. -
    2139.     * Parses a GRAPH clause.
    2140. -
    2141.     *
    2142. -
    2143.     * @param  GraphPattern $pattern 
    2144. -
    2145.     * @return void 
    2146. -
    2147.     * @throws SparqlParserException
    2148. -
    2149.     */
    2150. -
    2151.     protected function parseGraph(){
    2152. -
    2153.         $this->_fastForward();
    2154. -
    2155.         $name current($this->tokens);
    2156. -
    2157.         if(!$this->varCheck($name)&!$this->iriCheck($name)&&!$this->qnameCheck($name)){
    2158. -
    2159.             $msg $name;
    2160. -
    2161.             $msg preg_replace('/</''&lt;'$msg);
    2162. -
    2163.             throw new SparqlParserException(" IRI or Var expected. ",null,key($this->tokens));
    2164. -
    2165.         }
    2166. -
    2167.         $this->_fastForward();
    2168. -
    2169.  
    2170. -
    2171.         if($this->iriCheck($name)){
    2172. -
    2173.             $name new Resource(substr($name,1,-1));
    2174. -
    2175.         }else if($this->qnameCheck($name)){
    2176. -
    2177.             $name new Resource($this->query->getFullUri($name));
    2178. -
    2179.         }
    2180. -
    2181.         $this->parseGraphPattern(false,false,$name);
    2182. -
    2183.         if(current($this->tokens)=='.')
    2184. -
    2185.         $this->_fastForward();
    2186. -
    2187.     }
    2188. -
    2189.  
    2190. -
    2191.     /**
    2192. -
    2193.     * Parses the solution modifiers of a query.
    2194. -
    2195.     *
    2196. -
    2197.     * @return void 
    2198. -
    2199.     * @throws SparqlParserException
    2200. -
    2201.     */
    2202. -
    2203.     protected function parseModifier(){
    2204. -
    2205.         do{
    2206. -
    2207.             switch(strtolower(current($this->tokens))){
    2208. -
    2209.                 case "order":
    2210. -
    2211.                 $this->_fastForward();
    2212. -
    2213.                 if(strtolower(current($this->tokens))=='by'){
    2214. -
    2215.                     $this->_fastForward();
    2216. -
    2217.                     $this->parseOrderCondition();
    2218. -
    2219.                 }else{
    2220. -
    2221.                     throw new SparqlParserException("'BY' expected.",null,key($this->tokens));
    2222. -
    2223.                 }
    2224. -
    2225.                 break;
    2226. -
    2227.                 case "limit":
    2228. -
    2229.                 $this->_fastForward();
    2230. -
    2231.                 $val current($this->tokens);
    2232. -
    2233.                 $this->query->setSolutionModifier('limit',$val);
    2234. -
    2235.                 break;
    2236. -
    2237.                 case "offset":
    2238. -
    2239.                 $this->_fastForward();
    2240. -
    2241.                 $val current($this->tokens);
    2242. -
    2243.                 $this->query->setSolutionModifier('offset',$val);
    2244. -
    2245.                 break;
    2246. -
    2247.                 default:
    2248. -
    2249.                 break;
    2250. -
    2251.             }
    2252. -
    2253.         }while(next($this->tokens));
    2254. -
    2255.     }
    2256. -
    2257.  
    2258. -
    2259.     /**
    2260. -
    2261.     * Parses order conditions of a query.
    2262. -
    2263.     *
    2264. -
    2265.     * @return void 
    2266. -
    2267.     * @throws SparqlParserException
    2268. -
    2269.     */
    2270. -
    2271.     protected function parseOrderCondition(){
    2272. -
    2273.         $valList array();
    2274. -
    2275.         $val array();
    2276. -
    2277.         while(strtolower(current($this->tokens))!='limit'
    2278. -
    2279.         strtolower(current($this->tokens))!= false
    2280. -
    2281.         strtolower(current($this->tokens))!= 'offset'){
    2282. -
    2283.             switch (strtolower(current($this->tokens))){
    2284. -
    2285.                 case "desc":
    2286. -
    2287.                 $this->_fastForward();
    2288. -
    2289.                 $this->_fastForward();
    2290. -
    2291.                 if($this->varCheck(current($this->tokens))){
    2292. -
    2293.                     $val['val'current($this->tokens);
    2294. -
    2295.                 }else{
    2296. -
    2297.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2298. -
    2299.                 }
    2300. -
    2301.                 $this->_fastForward();
    2302. -
    2303.                 if(current($this->tokens)!=')')
    2304. -
    2305.                 throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
    2306. -
    2307.                 $val['type''desc';
    2308. -
    2309.                 $this->_fastForward();
    2310. -
    2311.                 break;
    2312. -
    2313.                 case "asc" :
    2314. -
    2315.                 $this->_fastForward();
    2316. -
    2317.                 $this->_fastForward();
    2318. -
    2319.                 if($this->varCheck(current($this->tokens))){
    2320. -
    2321.                     $val['val'current($this->tokens);
    2322. -
    2323.                 }else{
    2324. -
    2325.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2326. -
    2327.                 }
    2328. -
    2329.                 $this->_fastForward();
    2330. -
    2331.                 if(current($this->tokens)!=')')
    2332. -
    2333.                 throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
    2334. -
    2335.                 $val['type''asc';
    2336. -
    2337.                 $this->_fastForward();
    2338. -
    2339.                 break;
    2340. -
    2341.                 default:
    2342. -
    2343.                 if($this->varCheck(current($this->tokens))){
    2344. -
    2345.                     $val['val'current($this->tokens);
    2346. -
    2347.                     $val['type''asc';
    2348. -
    2349.                 }else{
    2350. -
    2351.                     throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
    2352. -
    2353.                 }
    2354. -
    2355.                 $this->_fastForward();
    2356. -
    2357.                 break;
    2358. -
    2359.             }
    2360. -
    2361.             $valList[$val;
    2362. -
    2363.         }
    2364. -
    2365.         prev($this->tokens);
    2366. -
    2367.         $this->query->setSolutionModifier('order by',$valList);
    2368. -
    2369.     }
    2370. -
    2371.  
    2372. -
    2373.     /**
    2374. -
    2375.     * Parses a String to an RDF node.
    2376. -
    2377.     *
    2378. -
    2379.     * @param  String $node 
    2380. -
    2381.     * @return Node   The parsed RDF node
    2382. -
    2383.     * @throws SparqlParserException
    2384. -
    2385.     */
    2386. -
    2387.     protected function parseNode($node false)
    2388. -
    2389.     {
    2390. -
    2391.         $eon false;
    2392. -
    2393.         if ($node{
    2394. -
    2395.             $node $node;
    2396. -
    2397.         else {
    2398. -
    2399.             $node current($this->tokens);
    2400. -
    2401.         }
    2402. -
    2403.         if ($node{strlen($node)-1== '.'{
    2404. -
    2405.             $node substr($node,0,-1);
    2406. -
    2407.         }
    2408. -
    2409.         if ($this->dtypeCheck($node)) {
    2410. -
    2411.             return $node;
    2412. -
    2413.         }
    2414. -
    2415.         if ($this->bNodeCheck($node)) {
    2416. -
    2417.             $node '?'.$node;
    2418. -
    2419.             $this->query->addVar($node);
    2420. -
    2421.             return $node;
    2422. -
    2423.         }
    2424. -
    2425.         if ($node == '['{
    2426. -
    2427.             $node '?' substr($this->query->getBlanknodeLabel()1);
    2428. -
    2429.             $this->query->addVar($node);
    2430. -
    2431.             $this->_fastForward();
    2432. -
    2433.             if(current($this->tokens)!=']'{
    2434. -
    2435.                 prev($this->tokens);
    2436. -
    2437.             }
    2438. -
    2439.             return $node;
    2440. -
    2441.         }
    2442. -
    2443.         if ($this->iriCheck($node)){
    2444. -
    2445.             $base $this->query->getBase();
    2446. -
    2447.             if ($base!=null{
    2448. -
    2449.                 $node new Resource(substr(substr($base,0,-1).substr($node,1),1,-1));
    2450. -
    2451.             else {
    2452. -
    2453.                 $node new Resource(substr($node,1,-1));
    2454. -
    2455.             }
    2456. -
    2457.             return $node;
    2458. -
    2459.         else if ($this->qnameCheck($node)) {
    2460. -
    2461.             $node $this->query->getFullUri($node);
    2462. -
    2463.             $node new Resource($node);
    2464. -
    2465.             return $node;
    2466. -
    2467.         else if ($this->literalCheck($node)) {
    2468. -
    2469.             do {
    2470. -
    2471.                 switch(substr($node,0,1)){
    2472. -
    2473.                     case '"':
    2474. -
    2475.                         $this->parseLiteral($node,'"');
    2476. -
    2477.                         $eon true;
    2478. -
    2479.                         break;
    2480. -
    2481.                     case "'":
    2482. -
    2483.                         $this->parseLiteral($node,"'");
    2484. -
    2485.                         $eon true;
    2486. -
    2487.                         break;
    2488. -
    2489.                 }
    2490. -
    2491.             while(!$eon);
    2492. -
    2493.  
    2494. -
    2495.         else if ($this->varCheck($node)) {
    2496. -
    2497.             $pos strpos($node,'.');
    2498. -
    2499.             if ($pos{
    2500. -
    2501.                 return substr($node,0,$pos);
    2502. -
    2503.             else {
    2504. -
    2505.                 return $node;
    2506. -
    2507.             }
    2508. -
    2509.         else if ($node[0== '<'{
    2510. -
    2511.             //partial IRI? loop tokens until we find a closing >
    2512. -
    2513.             while (next($this->tokens)) {
    2514. -
    2515.                 $node .= current($this->tokens);
    2516. -
    2517.                 if (substr($node-1== '>'{
    2518. -
    2519.                     break;
    2520. -
    2521.                 }
    2522. -
    2523.             }
    2524. -
    2525.             if (substr($node-1!= '>'{
    2526. -
    2527.                 throw new SparqlParserException(
    2528. -
    2529.                     "Unclosed IRI: " $node,
    2530. -
    2531.                     null,
    2532. -
    2533.                     key($this->tokens)
    2534. -
    2535.                 );
    2536. -
    2537.             }
    2538. -
    2539.             return $this->parseNode($node);
    2540. -
    2541.         else {
    2542. -
    2543.             throw new SparqlParserException(
    2544. -
    2545.                 $node " is neither a valid rdf- node nor a variable.",
    2546. -
    2547.                 null,
    2548. -
    2549.                 key($this->tokens)
    2550. -
    2551.             );
    2552. -
    2553.         }
    2554. -
    2555.         return $node;
    2556. -
    2557.     }
    2558. -
    2559.  
    2560. -
    2561.     /**
    2562. -
    2563.     * Checks if there is a datatype given and appends it to the node.
    2564. -
    2565.     *
    2566. -
    2567.     * @param  String $node 
    2568. -
    2569.     * @return void 
    2570. -
    2571.     */
    2572. -
    2573.     protected function checkDtypeLang(&$node)
    2574. -
    2575.     {
    2576. -
    2577.         $this->_fastForward();
    2578. -
    2579.         switch (substr(current($this->tokens)01)) {
    2580. -
    2581.             case '^':
    2582. -
    2583.                 if (substr(current($this->tokens),0,2)=='^^'{
    2584. -
    2585.                     $node new Literal(substr($node,1,-1));
    2586. -
    2587.                     $node->setDatatype(
    2588. -
    2589.                         $this->query->getFullUri(
    2590. -
    2591.                             substr(current($this->tokens)2)
    2592. -
    2593.                         )
    2594. -
    2595.                     );
    2596. -
    2597.                 }
    2598. -
    2599.                 break;
    2600. -
    2601.             case '@':
    2602. -
    2603.                 $node new Literal(
    2604. -
    2605.                     substr($node1-1),
    2606. -
    2607.                     substr(current($this->tokens)1)
    2608. -
    2609.                 );
    2610. -
    2611.                 break;
    2612. -
    2613.             default:
    2614. -
    2615.                 prev($this->tokens);
    2616. -
    2617.                 $node new Literal(substr($node1-1));
    2618. -
    2619.                 break;
    2620. -
    2621.  
    2622. -
    2623.         }
    2624. -
    2625.  
    2626. -
    2627.     }
    2628. -
    2629.  
    2630. -
    2631.     /**
    2632. -
    2633.     * Parses a literal.
    2634. -
    2635.     *
    2636. -
    2637.     * @param String $node 
    2638. -
    2639.     * @param String $sep used separator " or '
    2640. -
    2641.     * @return void 
    2642. -
    2643.     */
    2644. -
    2645.     protected function parseLiteral(&$node$sep)
    2646. -
    2647.     {
    2648. -
    2649.         do {
    2650. -
    2651.             next($this->tokens);
    2652. -
    2653.             $node $node.current($this->tokens);
    2654. -
    2655.         while (current($this->tokens!= $sep);
    2656. -
    2657.         $this->checkDtypeLang($node);
    2658. -
    2659.     }
    2660. -
    2661.  
    2662. -
    2663.     /**
    2664. -
    2665.     * Checks if the Node is a typed Literal.
    2666. -
    2667.     *
    2668. -
    2669.     * @param String $node 
    2670. -
    2671.     * @return boolean TRUE if typed FALSE if not
    2672. -
    2673.     */
    2674. -
    2675.     protected function dtypeCheck(&$node)
    2676. -
    2677.     {
    2678. -
    2679.         $patternInt "/^-?[0-9]+$/";
    2680. -
    2681.         $match preg_match($patternInt,$node,$hits);
    2682. -
    2683.         if($match>0){
    2684. -
    2685.             $node new Literal($hits[0]);
    2686. -
    2687.             $node->setDatatype(XML_SCHEMA.'integer');
    2688. -
    2689.             return true;
    2690. -
    2691.         }
    2692. -
    2693.         $patternBool "/^(true|false)$/";
    2694. -
    2695.         $match preg_match($patternBool,$node,$hits);
    2696. -
    2697.         if($match>0){
    2698. -
    2699.             $node new Literal($hits[0]);
    2700. -
    2701.             $node->setDatatype(XML_SCHEMA.'boolean');
    2702. -
    2703.             return true;
    2704. -
    2705.         }
    2706. -
    2707.         $patternType "/^a$/";
    2708. -
    2709.         $match preg_match($patternType,$node,$hits);
    2710. -
    2711.         if($match>0){
    2712. -
    2713.             $node new Resource(RDF_NAMESPACE_URI.'type');
    2714. -
    2715.             return true;
    2716. -
    2717.         }
    2718. -
    2719.         $patternDouble "/^-?[0-9]+.[0-9]+[e|E]?-?[0-9]*/";
    2720. -
    2721.         $match preg_match($patternDouble,$node,$hits);
    2722. -
    2723.         if($match>0){
    2724. -
    2725.             $node new Literal($hits[0]);
    2726. -
    2727.             $node->setDatatype(XML_SCHEMA.'double');
    2728. -
    2729.             return true;
    2730. -
    2731.         }
    2732. -
    2733.         return false;
    2734. -
    2735.     }
    2736. -
    2737.  
    2738. -
    2739.     /**
    2740. -
    2741.     * Parses an RDF collection.
    2742. -
    2743.     *
    2744. -
    2745.     * @param  TriplePattern $trp 
    2746. -
    2747.     * @return Node          The first parsed label
    2748. -
    2749.     */
    2750. -
    2751.     protected function parseCollection(&$trp)
    2752. -
    2753.     {
    2754. -
    2755.         $tmpLabel $this->query->getBlanknodeLabel();
    2756. -
    2757.         $firstLabel $this->parseNode($tmpLabel);
    2758. -
    2759.         $this->_fastForward();
    2760. -
    2761.         $i 0;
    2762. -
    2763.         while (current($this->tokens)!=")"{
    2764. -
    2765.             if($i>0)
    2766. -
    2767.             $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),$this->parseNode($tmpLabel $this->query->getBlanknodeLabel()));
    2768. -
    2769.             $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),$this->parseNode());
    2770. -
    2771.             $this->_fastForward();
    2772. -
    2773.             $i++;
    2774. -
    2775.         }
    2776. -
    2777.         $trp[new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));
    2778. -
    2779.         return $firstLabel;
    2780. -
    2781.     }
    2782. -
    2783.  
    2784. -
    2785.     /**
    2786. -
    2787.     * Error reporting.
    2788. -
    2789.     *
    2790. -
    2791.     * @param SparqlException $e 
    2792. -
    2793.     * @return String 
    2794. -
    2795.     */
    2796. -
    2797.     protected function error($e)
    2798. -
    2799.     {
    2800. -
    2801.         echo "<b>SPARQL PARSER ERROR: </b>".$e->getMessage()."<br>
    2802. -
    2803.             In Query: <br><pre>";
    2804. -
    2805.         if($e->getPointer()) {
    2806. -
    2807.             $end $e->getPointer();
    2808. -
    2809.         else {
    2810. -
    2811.             $end count($this->tokens1;
    2812. -
    2813.         }
    2814. -
    2815.  
    2816. -
    2817.         for ($i 0$i $end$i++{
    2818. -
    2819.             $token preg_replace('/&/''&amp;'$this->tokens[$i]);
    2820. -
    2821.             $token preg_replace('/</''&lt;'$token);
    2822. -
    2823.             echo $token;
    2824. -
    2825.         }
    2826. -
    2827.         $token preg_replace('/&/''&amp;'$this->tokens[$end]);
    2828. -
    2829.         $token preg_replace('/</''&lt;'$token);
    2830. -
    2831.         echo "-><b>".$token."</b><-";
    2832. -
    2833.         "</pre><br>";
    2834. -
    2835.     }
    2836. -
    2837. }// end class: SparqlParser.php
    2838. -
    2839.  
    2840. -
    2841. ?>
    2842. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParserException.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParserException.php.html deleted file mode 100755 index 3e2f48b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__sparqlSparqlParserException.php.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - File Source for SparqlParserException.php - - - - - -

    Source for file SparqlParserException.php

    -

    Documentation is available at SparqlParserException.php

    -
    -
    1. <?php
    2. -
    3. // ---------------------------------------------
    4. -
    5. // class: SparqlParserExecption
    6. -
    7. // ---------------------------------------------
    8. -
    9. /**
    10. -
    11. * A SPARQL Parser Execption for better errorhandling.
    12. -
    13. *
    14. -
    15. @author   Tobias Gauss <tobias.gauss@web.de>
    16. -
    17. @version     $Id: fsource_sparql__sparqlSparqlParserException.php.html 443 2007-06-01 16:25:38Z cax $
    18. -
    19. *
    20. -
    21. @package sparql
    22. -
    23. */
    24. -
    25. Class SparqlParserException extends Exception{
    26. -
    27.  
    28. -
    29.     private $tokenPointer;
    30. -
    31.  
    32. -
    33.     public function __construct($message$code 0$pointer){
    34. -
    35.  
    36. -
    37.         $this->tokenPointer $pointer;
    38. -
    39.         parent::__construct($message$code);
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     /**
    46. -
    47.     * Returns a pointer to the token which caused the exception.
    48. -
    49.     * @return int 
    50. -
    51.     */
    52. -
    53.     public function getPointer(){
    54. -
    55.         return $this->tokenPointer;
    56. -
    57.     }
    58. -
    59.  
    60. -
    61. }
    62. -
    63. ?>
    64. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__syntaxSparqlResultParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__syntaxSparqlResultParser.php.html deleted file mode 100755 index 14eefcbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_sparql__syntaxSparqlResultParser.php.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - File Source for SparqlResultParser.php - - - - - -

    Source for file SparqlResultParser.php

    -

    Documentation is available at SparqlResultParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: SparqlResultParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11. /**
    12. -
    13. * Parses an xml document in SPARQL Result XML Format.
    14. -
    15. *
    16. -
    17. @version  $Id: fsource_sparql__syntaxSparqlResultParser.php.html 443 2007-06-01 16:25:38Z cax $
    18. -
    19. @author   Tobias Gau <tobias.gauss@web.de>
    20. -
    21. *
    22. -
    23. @package sparql
    24. -
    25. */
    26. -
    27.  
    28. -
    29. class SparqlResultParser extends Object {
    30. -
    31.  
    32. -
    33.  
    34. -
    35.     var $arrOutput = array();
    36. -
    37.     var $resParser;
    38. -
    39.     var $strXmlData;
    40. -
    41.     var $counter = -1;
    42. -
    43.     var $mode = -1;
    44. -
    45.     var $varname;
    46. -
    47.     var $dtype;
    48. -
    49.     var $lang;
    50. -
    51.     var $varlist;
    52. -
    53.     var $bncounter = 0;
    54. -
    55.     var $current_literal;    
    56. -
    57.     
    58. -
    59.     
    60. -
    61. /**
    62. -
    63. * Main function of SparqlResultParser
    64. -
    65. *
    66. -
    67. @param String  $strInputXML  input document.
    68. -
    69. */
    70. -
    71.     function parse($strInputXML{
    72. -
    73.  
    74. -
    75.         $this->resParser = xml_parser_create ();
    76. -
    77.  
    78. -
    79.         xml_set_object($this->resParser,$this);
    80. -
    81.         xml_set_element_handler($this->resParser"tagOpen""tagClosed");
    82. -
    83.  
    84. -
    85.         xml_set_character_data_handler($this->resParser"tagData");
    86. -
    87.  
    88. -
    89.         $this->strXmlData = xml_parse($this->resParser,$strInputXML );
    90. -
    91.         if(!$this->strXmlData{
    92. -
    93.             echo "unable to parse result<br>".
    94. -
    95.             "server returned: <br>"
    96. -
    97.             .$strInputXML;
    98. -
    99.             
    100. -
    101.             return "false";
    102. -
    103.         
    104. -
    105.         }
    106. -
    107.  
    108. -
    109.         xml_parser_free($this->resParser);
    110. -
    111.  
    112. -
    113.         return $this->arrOutput;
    114. -
    115.     }
    116. -
    117.     
    118. -
    119. // private parser functions from here //    
    120. -
    121.     function tagOpen($parser$name$attrs{
    122. -
    123.         //  $tag=array("name"=>$name,"attrs"=>$attrs);
    124. -
    125.         //  array_push($this->arrOutput,$tag);
    126. -
    127.         if(strtolower($name)=="variable"){
    128. -
    129.             if(isset($attrs['name']))
    130. -
    131.                 $this->varlist[]=$attrs['name'];
    132. -
    133.             if(isset($attrs['NAME']))
    134. -
    135.                 $this->varlist[]=$attrs['NAME'];
    136. -
    137.         }
    138. -
    139.         
    140. -
    141.         if(strtolower($name)=="result"){
    142. -
    143.             $this->counter++;
    144. -
    145.             if($this->counter > -1){
    146. -
    147.                 foreach($this->varlist as $value){
    148. -
    149.                     if(!isset($this->arrOutput[$this->counter][$value]))
    150. -
    151.                         $this->arrOutput[$this->counter]["?".$value]='';
    152. -
    153.                 }    
    154. -
    155.             }
    156. -
    157.             
    158. -
    159.         }
    160. -
    161.         if(strtolower($name)=="boolean"){
    162. -
    163.             $this->counter++;
    164. -
    165.             $this->mode = 3;
    166. -
    167.         }
    168. -
    169.         if(strtolower($name)=="binding"){
    170. -
    171.             $this->varname = null;
    172. -
    173.             $this->dtype   = null;
    174. -
    175.             $this->lang    = null;
    176. -
    177.             
    178. -
    179.             if(isset($attrs['name'])){
    180. -
    181.                 $this->varname = "?".$attrs['name'];
    182. -
    183.             }else{
    184. -
    185.                 $this->varname = "?".$attrs['NAME'];
    186. -
    187.             }
    188. -
    189.         }
    190. -
    191.         if(strtolower($name)=="uri"){
    192. -
    193.             $this->mode = 0;
    194. -
    195.         }
    196. -
    197.         if(strtolower($name)=="literal"){
    198. -
    199.             $this->mode = 1;
    200. -
    201.             $this->current_literal = "";
    202. -
    203.             if(isset($attrs['datatype'])){
    204. -
    205.                 $this->dtype = $attrs['datatype'];
    206. -
    207.             }else if(isset($attrs['DATATYPE'])){
    208. -
    209.                 $this->dtype = $attrs['DATATYPE'];
    210. -
    211.             }
    212. -
    213.             if(isset($attrs['xml:lang'])){
    214. -
    215.                 $this->lang = $attrs['datatype'];
    216. -
    217.             }else if(isset($attrs['XML:lang'])){
    218. -
    219.                 $this->lang = $attrs['XML:lang'];
    220. -
    221.             }else if(isset($attrs['XML:LANG'])){
    222. -
    223.                 $this->lang = $attrs['XML:LANG'];
    224. -
    225.             }else if(isset($attrs['xml:LANG'])){
    226. -
    227.                 $this->lang = $attrs['xml:LANG'];
    228. -
    229.             }
    230. -
    231.         }
    232. -
    233.         if(strtolower($name)=="bnode"){
    234. -
    235.             $this->mode = 2;
    236. -
    237.         }
    238. -
    239.     }
    240. -
    241.  
    242. -
    243.     function tagData($parser$tagData{
    244. -
    245.         switch($this->mode){
    246. -
    247.             case :
    248. -
    249.             $this->arrOutput[$this->counter][$this->varnamenew Resource($tagData);
    250. -
    251.             $this->mode = -1;
    252. -
    253.             break;
    254. -
    255.             case 1:
    256. -
    257.             $this->current_literal .= $tagData;
    258. -
    259.             break;
    260. -
    261.             case 2:
    262. -
    263.             if($tagData=="/"){
    264. -
    265.                 $bn "bNode".$this->bncounter;
    266. -
    267.                 $this->bncounter++;
    268. -
    269.             }else{
    270. -
    271.                 $bn $tagData;
    272. -
    273.             }
    274. -
    275.             $this->arrOutput[$this->counter][$this->varnamenew BlankNode($bn);
    276. -
    277.             $this->mode = -1;
    278. -
    279.             break;
    280. -
    281.             case 3:
    282. -
    283.             $this->arrOutput = $tagData;
    284. -
    285.             $this->mode = -1;
    286. -
    287.             break;
    288. -
    289.  
    290. -
    291.         }
    292. -
    293.         
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function tagClosed($parser$name{
    300. -
    301.         if ($this->mode == 1{
    302. -
    303.             $lit new Literal($this->current_literal);
    304. -
    305.             if($this->lang)
    306. -
    307.                 $lit->setLanguage($this->lang);
    308. -
    309.             if($this->dtype)
    310. -
    311.                 $lit->setDatatype($this->dtype);
    312. -
    313.             $this->arrOutput[$this->counter][$this->varname$lit ;
    314. -
    315.             $this->mode = -1;
    316. -
    317.         }        
    318. -
    319.     }
    320. -
    321. }
    322. -
    323.  
    324. -
    325.  
    326. -
    327. ?>
    328. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxGRDDLParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxGRDDLParser.php.html deleted file mode 100755 index 0b324667..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxGRDDLParser.php.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - File Source for GRDDLParser.php - - - - - -

    Source for file GRDDLParser.php

    -

    Documentation is available at GRDDLParser.php

    -
    -
    1. <?php
    2. -
    3. // ----------------------------------------------------------------------------------
    4. -
    5. // Class: RdfParser
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9.  
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * A GRDDLParser.
    16. -
    17.  * This class extracts rdf data from xhtml documents. It uses the PHP xsltprocessor.
    18. -
    19.  * Gleaning Resource Descriptions from Dialects of Languages (GRDDL):
    20. -
    21.  * (http://www.w3.org/TR/grddl/)
    22. -
    23.  * 
    24. -
    25.  * @version  $Id: fsource_syntax__syntaxGRDDLParser.php.html 443 2007-06-01 16:25:38Z cax $
    26. -
    27.  * @author Tobias Gau <tobias.gauss@web.de>,
    28. -
    29.  *
    30. -
    31.  * @package syntax
    32. -
    33.  * @access    public
    34. -
    35.  *
    36. -
    37.  */   
    38. -
    39. class GRDDLParser extends Object{
    40. -
    41.     
    42. -
    43.     
    44. -
    45.     /**
    46. -
    47.      * Document link
    48. -
    49.      * 
    50. -
    51.      *
    52. -
    53.      * @var     String 
    54. -
    55.      * @access    private
    56. -
    57.      */
    58. -
    59.     var $doclink;
    60. -
    61.     
    62. -
    63.     
    64. -
    65.     /**
    66. -
    67.      * Stylesheet link
    68. -
    69.      * 
    70. -
    71.      *
    72. -
    73.      * @var     String[] 
    74. -
    75.      * @access    private
    76. -
    77.      */
    78. -
    79.     var $stylelinks;
    80. -
    81.     
    82. -
    83.     
    84. -
    85.     /**
    86. -
    87.      * DomDocument
    88. -
    89.      * 
    90. -
    91.      * @var     DomDocument 
    92. -
    93.      * @access    private
    94. -
    95.      */
    96. -
    97.     var $domdoc;
    98. -
    99.     
    100. -
    101.     
    102. -
    103.     /**
    104. -
    105.     * generates a MemModel and creates the DomDocument.
    106. -
    107.     *
    108. -
    109.     * @param String $doc 
    110. -
    111.     * @access public
    112. -
    113.     * @return MemModel $model
    114. -
    115.     */
    116. -
    117.     function generateModel($doc){
    118. -
    119.         $model new MemModel();
    120. -
    121.         $this->doclink=$doc;
    122. -
    123.         $this->domdoc new DomDocument
    124. -
    125.         $this->domdoc->load($doc);
    126. -
    127.         $this->_getStyles();
    128. -
    129.         $model $this->_generateRDF();
    130. -
    131.         return $model;
    132. -
    133.     }
    134. -
    135.     
    136. -
    137.  
    138. -
    139.     /**
    140. -
    141.     * gets the used xsl stylesheets.
    142. -
    143.     *
    144. -
    145.     * @access private
    146. -
    147.     */
    148. -
    149.     function _getStyles(){
    150. -
    151.         $link=$this->domdoc->getElementsByTagName('link');
    152. -
    153.         $i=0;
    154. -
    155.         while($link->item($i)!=''){
    156. -
    157.             $item $link->item($i);
    158. -
    159.             if($item->getAttributeNode('rel')->value=='transformation'){
    160. -
    161.                 $temp $item->getAttributeNode('href')->value;
    162. -
    163.                 if(substr($temp,0,1)=='/'){
    164. -
    165.                     $pos strrpos($this->doclink,'/');
    166. -
    167.                     $part substr($this->doclink,0,$pos);
    168. -
    169.                     $this->stylelink[]=$part.$temp;
    170. -
    171.                 }else{
    172. -
    173.                     $this->stylelink[]=$temp;
    174. -
    175.                 }
    176. -
    177.             }
    178. -
    179.             $i++;
    180. -
    181.         }
    182. -
    183.     }
    184. -
    185.     
    186. -
    187.     /*
    188. -
    189.     * uses the PHP build in xslt processor to
    190. -
    191.     * generate the RDF statements and uses the 
    192. -
    193.     * RDF- Parser to generate the model
    194. -
    195.     *
    196. -
    197.     * @access private
    198. -
    199.     * @return MemModel $model
    200. -
    201.     */
    202. -
    203.     function _generateRDF(){
    204. -
    205.         $model=new MemModel();
    206. -
    207.         $model->setBaseURI($this->doclink);
    208. -
    209.         $proc new xsltprocessor;
    210. -
    211.         include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
    212. -
    213.         $pars=new RdfParser();
    214. -
    215.         foreach($this->stylelink as $key => $value){
    216. -
    217.             $xsl new DomDocument;
    218. -
    219.             $xsl->load($value);
    220. -
    221.             $proc->importStyleSheet($xsl);
    222. -
    223.             $model->addModel($pars->generateModel($proc->transformToXML($this->domdoc),$this->doclink));
    224. -
    225.         }
    226. -
    227.         return $model;
    228. -
    229.     }
    230. -
    231.  
    232. -
    233.     
    234. -
    235.     
    236. -
    237. }
    238. -
    239. ?>
    240. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Parser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Parser.php.html deleted file mode 100755 index 17c34f55..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Parser.php.html +++ /dev/null @@ -1,1078 +0,0 @@ - - - - - - File Source for N3Parser.php - - - - - -

    Source for file N3Parser.php

    -

    Documentation is available at N3Parser.php

    -
    -
    1. <?php
    2. -
    3. require_once RDFAPI_INCLUDE_DIR 'util/Object.php';
    4. -
    5. require_once RDFAPI_INCLUDE_DIR 'model/Resource.php';
    6. -
    7. require_once RDFAPI_INCLUDE_DIR 'model/Literal.php';
    8. -
    9. require_once RDFAPI_INCLUDE_DIR 'model/Statement.php';
    10. -
    11.  
    12. -
    13. // ----------------------------------------------------------------------------------
    14. -
    15. // Class: N3Parser
    16. -
    17. // ----------------------------------------------------------------------------------
    18. -
    19.  
    20. -
    21.  
    22. -
    23. /**
    24. -
    25.  * PHP Notation3 Parser
    26. -
    27.  *
    28. -
    29.  * This parser can parse a subset of n3, reporting triples to a callback function
    30. -
    31.  * or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )
    32. -
    33.  *
    34. -
    35.  * Supported N3 features:
    36. -
    37.  * <ul>
    38. -
    39.  *   <li>Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')</li>
    40. -
    41.  *   <li>@prefix mappings</li>
    42. -
    43.  *   <li>= maps to owl#sameAs</li>
    44. -
    45.  *   <li>a maps to rdf-syntax-ns#type</li>
    46. -
    47.  *   <li>Literal datytype- and xmlLanguageTag support
    48. -
    49.  * </ul>
    50. -
    51.  * Un-supported N3 Features include:
    52. -
    53.  * <ul>
    54. -
    55.  *   <li>Reification using { }</li>
    56. -
    57.  *   <li>. and ^ operators for tree traversal</li>
    58. -
    59.  *   <li>Any log operators, like log:forAll etc.</li>
    60. -
    61.  * </ul>
    62. -
    63.  *
    64. -
    65.  * This parser is based on n3.py from Epp released 2nd March, 2002.
    66. -
    67.  * by Sean B. Palmer
    68. -
    69.  * ( http://infomesh.net/2002/eep/20020302-013802/n3.py )
    70. -
    71.  *
    72. -
    73.  * This parser is released under the GNU GPL license.
    74. -
    75.  * ( http://www.gnu.org/licenses/gpl.txt )
    76. -
    77.  *
    78. -
    79.  *
    80. -
    81.  *
    82. -
    83.  * @author Sean B. Palmer <sean@mysterylights.com>, Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    84. -
    85.  * @version $Id: fsource_syntax__syntaxN3Parser.php.html 443 2007-06-01 16:25:38Z cax $
    86. -
    87.  * @package syntax
    88. -
    89.  * @access public
    90. -
    91.  ***/
    92. -
    93.  
    94. -
    95. class N3Parser extends Object {
    96. -
    97.  
    98. -
    99.  
    100. -
    101.   /* ==================== Variables ==================== */
    102. -
    103.  
    104. -
    105.   var $Tokens;
    106. -
    107.   var $bNode;
    108. -
    109.   var $RDF_NS$DAML_NS$OWL_NS;
    110. -
    111.   var $debug;
    112. -
    113.   var $parseError;
    114. -
    115.   var $parsedNamespaces = array();
    116. -
    117.  
    118. -
    119.   /* ==================== Public Methods ==================== */
    120. -
    121.  
    122. -
    123.   /**
    124. -
    125.    * Constructor
    126. -
    127.    * @access public
    128. -
    129.    ***/
    130. -
    131.   function N3Parser({
    132. -
    133.     //Regular expressions:
    134. -
    135.      $Name '[A-Za-z0-9_@\.]+[^\.,;\[\]\s ]*';
    136. -
    137.      $URI '<[^> ]*>';
    138. -
    139.      $bNode '_:'.$Name;
    140. -
    141.      $Univar '\?'.$Name;
    142. -
    143.      $QName '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name;
    144. -
    145.      $Literal '"(\\\"|[^"])*"'# '"(?:\\"|[^"])*"'
    146. -
    147. //   $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"'
    148. -
    149.      $LangTag '@[A-Za-z\-]*[^ \^\.\;\,]';
    150. -
    151.      $Datatype '(\^\^)[^ ,\.;)]+';
    152. -
    153.      $Datatype_URI '(\^\^)'.$URI;
    154. -
    155.      //     $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""';
    156. -
    157.      $LLiteral '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';
    158. -
    159.      //          '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""'
    160. -
    161.      $Comment '#.*$';
    162. -
    163.      $Prefix '(?:[A-Za-z][A-Za-z0-9_]*)?:';
    164. -
    165.      $PrefixDecl '@prefix';
    166. -
    167.      $WS '[ \t]';
    168. -
    169.      $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'# for 'a' keyword
    170. -
    171.      $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'# for '=' keyword
    172. -
    173.      $this->OWL_NS = 'http://www.w3.org/2002/07/owl#';
    174. -
    175.  
    176. -
    177.      //     $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix,
    178. -
    179.      //        $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment);
    180. -
    181.      $t array$Datatype_URI,$Datatype,$LLiteral$URI$Literal$PrefixDecl$QName$bNode$Prefix$Univar'a','=''{''}''\(''\)''\[''\]'','';''\.'$WS$Comment,$LangTag);
    182. -
    183.      $this->Tokens="/(".join($t,"|").")/m";
    184. -
    185.  
    186. -
    187.      $this->bNode=0;
    188. -
    189.      $this->debug=0;
    190. -
    191.      $this->bNodeMap array();
    192. -
    193.      $this->FixBnodes FIX_BLANKNODES;
    194. -
    195.      $this->parseError=false;
    196. -
    197.   }
    198. -
    199.  
    200. -
    201.  
    202. -
    203.   /**
    204. -
    205.    * Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    206. -
    207.    * default is "false" -> the used label in n3 is parsed to the model
    208. -
    209.    * @param boolean 
    210. -
    211.    * @access public
    212. -
    213.    ***/
    214. -
    215.   function setFixBnodes($set{
    216. -
    217.  
    218. -
    219.       if (($set===trueOR ($set===false)) $this->FixBnodes $set;
    220. -
    221.   }
    222. -
    223.  
    224. -
    225.  
    226. -
    227.   /**
    228. -
    229.    * This parses a N3 string and prints out the triples
    230. -
    231.    * @param string $s 
    232. -
    233.    * @access public
    234. -
    235.    ***/
    236. -
    237.   function parse($s{
    238. -
    239.     //   """Get a string, tokenize, create list, convert to Eep store."""
    240. -
    241.     $stat=$this->n3tolist($s);
    242. -
    243.     foreach $stat as $t{
    244. -
    245.  
    246. -
    247.       if (count($t)>3{
    248. -
    249.         $object=$t[2];
    250. -
    251.  
    252. -
    253.         for ($i 3$i 5$i++){
    254. -
    255.           if ($t[$i][0]=='@')$object.=$t[$i];
    256. -
    257.           if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
    258. -
    259.         };
    260. -
    261.       else {$object=$t[2];};
    262. -
    263.  
    264. -
    265.       print '('.$t[0].', '.$t[1].', '.$object.")\n";
    266. -
    267.  
    268. -
    269.     }
    270. -
    271.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    272. -
    273.     //              for t in n3tolist(s)]
    274. -
    275.   }
    276. -
    277.  
    278. -
    279.  
    280. -
    281.   /**
    282. -
    283.    * This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    284. -
    285.    * @param string $s 
    286. -
    287.    * @param string $func 
    288. -
    289.    * @access public
    290. -
    291.    ***/
    292. -
    293.   function uparse($s,$func{
    294. -
    295.     //   """Get a string, tokenize, create list, convert to Eep store."""
    296. -
    297.     $stat=$this->n3tolist($s);
    298. -
    299.     foreach $stat as $t{
    300. -
    301.  
    302. -
    303.         if (count($t)>3{
    304. -
    305.         $object=$t[2];
    306. -
    307.  
    308. -
    309.         for ($i 3$i 5$i++){
    310. -
    311.           if ($t[$i][0]=='@')$object.=$t[$i];
    312. -
    313.           if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
    314. -
    315.         };
    316. -
    317.       else {$object=$t[2];};
    318. -
    319.         //    print "(".$t[0].", ".$t[1].", ".$t[2].")";
    320. -
    321.  
    322. -
    323.       $func($t[0],$t[1],$object);
    324. -
    325.     }
    326. -
    327.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    328. -
    329.     //              for t in n3tolist(s)]
    330. -
    331.   }
    332. -
    333.  
    334. -
    335.  
    336. -
    337.   /**
    338. -
    339.    * This parses a N3 string and returns a memmodel
    340. -
    341.    * @param string $s 
    342. -
    343.    * @access public
    344. -
    345.    * @return object Model 
    346. -
    347.    ***/
    348. -
    349.  
    350. -
    351.   function parse2model($s,$model false{
    352. -
    353.     if($model == false){
    354. -
    355.         $m=new MemModel();
    356. -
    357.     }else{
    358. -
    359.         $m=$model;
    360. -
    361.     }
    362. -
    363.     //   """Get a string, tokenize, create list, convert to Eep store."""
    364. -
    365.     $stat=$this->n3tolist($s);
    366. -
    367.  
    368. -
    369.     foreach $stat as $t{
    370. -
    371.       $s=$this->toRDFNode($t[0],$t);
    372. -
    373.       $p=$this->toRDFNode($t[1],$t);
    374. -
    375.       $o=$this->toRDFNode($t[2],$t);
    376. -
    377.  
    378. -
    379.        $new_statementnew Statement($s,$p,$o);
    380. -
    381.  
    382. -
    383.       $m->add($new_statement);
    384. -
    385.       //    print "(".$t[0].", ".$t[1].", ".$t[2].")";
    386. -
    387.     }
    388. -
    389.     //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
    390. -
    391.     //              for t in n3tolist(s)]
    392. -
    393.     $m->addParsedNamespaces($this->parsedNamespaces);
    394. -
    395.     return $m;
    396. -
    397.   }
    398. -
    399.  
    400. -
    401. /**
    402. -
    403.  * Generate a new MemModel from an URI or file.
    404. -
    405.  *
    406. -
    407.  * @access    public
    408. -
    409.  * @param $path 
    410. -
    411.  * @throws PhpError
    412. -
    413.  * @return object MemModel 
    414. -
    415.  */
    416. -
    417.   function generateModel($path,$dummy=false,$model=false{
    418. -
    419.  
    420. -
    421.     $handle fopen($path,'r'or die("N3 ParserCould not open File: '$path' - Stopped parsing.");
    422. -
    423.     $done=false;
    424. -
    425.     $input="";
    426. -
    427.     while(!$done)
    428. -
    429.     {
    430. -
    431.       $input .= fread$handle512 );
    432. -
    433.       $done feof($handle);
    434. -
    435.  
    436. -
    437.     };
    438. -
    439.  
    440. -
    441.  
    442. -
    443.     fclose($handle);
    444. -
    445.  
    446. -
    447.     $m $this->parse2model($input,$model);
    448. -
    449.     return $m;
    450. -
    451.   }
    452. -
    453.  
    454. -
    455.  
    456. -
    457.   /* ==================== Private Methods from here ==================== */
    458. -
    459.  
    460. -
    461.   //  General list processing functions
    462. -
    463.  
    464. -
    465. /**
    466. -
    467.  * Returns FALSE if argument is a whitespace character
    468. -
    469.  * @access private
    470. -
    471.  * @param string $s 
    472. -
    473.  ***/
    474. -
    475.   function isWS($s{
    476. -
    477.     return !preg_match('/^(#.*|\s*)$/'$s);
    478. -
    479.   }
    480. -
    481.  
    482. -
    483.  
    484. -
    485.  
    486. -
    487.   /**
    488. -
    489.    * Returns true if the string is not a comment
    490. -
    491.    * @access private
    492. -
    493.    * @param string $s 
    494. -
    495.    * @returns boolean
    496. -
    497.    ***/
    498. -
    499.   function notComment($s{
    500. -
    501.     if ($s==""return false;
    502. -
    503.     $N3Comment '^[ \t]*\#';
    504. -
    505.  
    506. -
    507.     if (ereg($N3Comment,$s)) return false;
    508. -
    509.     else return true;
    510. -
    511.   }
    512. -
    513.  
    514. -
    515.   /**
    516. -
    517.    * Removes all whitespace tokens from list
    518. -
    519.    * @access private
    520. -
    521.    * @param array $list 
    522. -
    523.    ***/
    524. -
    525.   function filterWs($list{
    526. -
    527.     //    var_dump($list);
    528. -
    529.     //  """Filter whitespace from a list."""
    530. -
    531.  
    532. -
    533.     return array_filter($listarray($this,"isWS"));
    534. -
    535.   }
    536. -
    537.  
    538. -
    539. /**
    540. -
    541. * converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
    542. -
    543. *
    544. -
    545. @param String $str 
    546. -
    547. @return String 
    548. -
    549. @access private
    550. -
    551. *
    552. -
    553. */
    554. -
    555. function str2unicode_nfc($str=""){
    556. -
    557.     $result="";
    558. -
    559.     /* try to detect encoding */
    560. -
    561.     $tmp=str_replace("?"""$str);
    562. -
    563.     if(strpos(utf8_decode($tmp)"?")===false){
    564. -
    565.         $str=utf8_decode($str);
    566. -
    567.     }
    568. -
    569.     for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
    570. -
    571.         $nr=0;/* unicode dec nr */
    572. -
    573.         /* char */
    574. -
    575.         $char=$str[$i];
    576. -
    577.         /* utf8 binary */
    578. -
    579.         $utf8_char=utf8_encode($char);
    580. -
    581.         $bytes=strlen($utf8_char);
    582. -
    583.         if($bytes==1){
    584. -
    585.             /* 0####### (0-127) */
    586. -
    587.             $nr=ord($utf8_char);
    588. -
    589.         }
    590. -
    591.         elseif($bytes==2){
    592. -
    593.             /* 110##### 10###### = 192+x 128+x */
    594. -
    595.             $nr=((ord($utf8_char[0])-192)*64(ord($utf8_char[1])-128);
    596. -
    597.         }
    598. -
    599.         elseif($bytes==3){
    600. -
    601.             /* 1110#### 10###### 10###### = 224+x 128+x 128+x */
    602. -
    603.             $nr=((ord($utf8_char[0])-224)*4096((ord($utf8_char[1])-128)*64(ord($utf8_char[2])-128);
    604. -
    605.         }
    606. -
    607.         elseif($bytes==4){
    608. -
    609.             /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
    610. -
    611.             $nr=((ord($utf8_char[0])-240)*262144((ord($utf8_char[1])-128)*4096((ord($utf8_char[2])-128)*64(ord($utf8_char[3])-128);
    612. -
    613.         }
    614. -
    615.         /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
    616. -
    617.         if($nr<9){/* #x0-#x8 (0-8) */
    618. -
    619.             $result.="\\u".sprintf("%04X",$nr);
    620. -
    621.         }
    622. -
    623.         elseif($nr==9){/* #x9 (9) */
    624. -
    625.             $result.='\t';
    626. -
    627.         }
    628. -
    629.         elseif($nr==10){/* #xA (10) */
    630. -
    631.             $result.='\n';
    632. -
    633.         }
    634. -
    635.         elseif($nr<13){/* #xB-#xC (11-12) */
    636. -
    637.             $result.="\\u".sprintf("%04X",$nr);
    638. -
    639.         }
    640. -
    641.         elseif($nr==13){/* #xD (13) */
    642. -
    643.             $result.='\t';
    644. -
    645.         }
    646. -
    647.         elseif($nr<32){/* #xE-#x1F (14-31) */
    648. -
    649.             $result.="\\u".sprintf("%04X",$nr);
    650. -
    651.         }
    652. -
    653.         elseif($nr<34){/* #x20-#x21 (32-33) */
    654. -
    655.             $result.=$char;
    656. -
    657.         }
    658. -
    659.         elseif($nr==34){/* #x22 (34) */
    660. -
    661.             $result.='\"';
    662. -
    663.         }
    664. -
    665.         elseif($nr<92){/* #x23-#x5B (35-91) */
    666. -
    667.             $result.=$char;
    668. -
    669.         }
    670. -
    671.         elseif($nr==92){/* #x5C (92) */
    672. -
    673.             $result.='\\';
    674. -
    675.         }
    676. -
    677.         elseif($nr<127){/* #x5D-#x7E (93-126) */
    678. -
    679.             $result.=$char;
    680. -
    681.         }
    682. -
    683.         elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
    684. -
    685.             $result.="\\u".sprintf("%04X",$nr);
    686. -
    687.         }
    688. -
    689.         elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
    690. -
    691.             $result.="\\U".sprintf("%08X",$nr);
    692. -
    693.         }
    694. -
    695.         else{
    696. -
    697.             /* other chars are not defined => ignore */
    698. -
    699.         }
    700. -
    701.     }
    702. -
    703.     return $result;
    704. -
    705. }
    706. -
    707.  
    708. -
    709.  
    710. -
    711.  
    712. -
    713.   /**
    714. -
    715.    * Gets a slice of an array.
    716. -
    717.    * Returns the wanted slice, as well as the remainder of the array.
    718. -
    719.    * e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r'])
    720. -
    721.    * @return array 
    722. -
    723.    * @access private
    724. -
    725.    * @param array $list 
    726. -
    727.    * @param integer $start 
    728. -
    729.    * @param integer $end 
    730. -
    731.    ***/
    732. -
    733.   function getSpan($list$start$end{
    734. -
    735.  
    736. -
    737.     $pre=array_slice($list0$start);
    738. -
    739.     $post=array_slice($list$end);
    740. -
    741.  
    742. -
    743.     return array(array_slice($list$start,$end-$start),$this->array_concat($pre,$post));
    744. -
    745.   }
    746. -
    747.  
    748. -
    749.  
    750. -
    751.   /**
    752. -
    753.    * Concatenates two arrays
    754. -
    755.    * @param array $a 
    756. -
    757.    * @param array $b 
    758. -
    759.    * @returns array
    760. -
    761.    * @access private
    762. -
    763.    ***/
    764. -
    765.   function array_concat($a$b{
    766. -
    767.     array_splice($a,count($a),0,$b);
    768. -
    769.     return $a;
    770. -
    771.   }
    772. -
    773.  
    774. -
    775.   /**
    776. -
    777.    * Returns an array with all indexes where item appears in list
    778. -
    779.    * @param array $list 
    780. -
    781.    * @param string $item 
    782. -
    783.    * @returns array
    784. -
    785.    * @access private
    786. -
    787.    ***/
    788. -
    789.   function posns($list$item{
    790. -
    791.     $res=array();
    792. -
    793.     $i=0;
    794. -
    795.     foreach $list as $k=>$v{
    796. -
    797.       if ($v === $item $res[]=$i;
    798. -
    799.       $i++;
    800. -
    801.     }
    802. -
    803.     $res[]=$i;
    804. -
    805.     return $res;
    806. -
    807.   }
    808. -
    809.  
    810. -
    811.  
    812. -
    813.   /* More N3 specific functions */
    814. -
    815.  
    816. -
    817.   /**
    818. -
    819.    * Returns a list of tokens
    820. -
    821.    * @param string $s 
    822. -
    823.    * @returns array
    824. -
    825.    * @access private
    826. -
    827.    ***/
    828. -
    829.   function toke($s{
    830. -
    831.  
    832. -
    833.     //    print "$s\n";
    834. -
    835.     //   """Notation3 tokenizer. Takes in a string, returns a raw token list."""
    836. -
    837.     if (strlen($s== 0die('Document has no content!');
    838. -
    839.  
    840. -
    841.     $s=str_replace("\r\n","\n",$s);
    842. -
    843.     $s=str_replace("\r","\n",$s);
    844. -
    845.  
    846. -
    847.  
    848. -
    849.     //$lines=explode("\n",$s);
    850. -
    851.  
    852. -
    853.     //$reallines=array_filter($lines, array($this, "notComment"));
    854. -
    855.     //    print "LINES: ".join($reallines, " ")." :LINES\n";
    856. -
    857.     //array_walk($reallines, array($this, "trimLine"));
    858. -
    859.     //$res=array();
    860. -
    861.  
    862. -
    863.     //    foreach ($reallines as $l) {
    864. -
    865.     //preg_match_all($this->Tokens, $l, $newres);
    866. -
    867.     //$res=$this->array_concat($res,$newres[0]);
    868. -
    869.     //}
    870. -
    871.  
    872. -
    873.     $res=array();
    874. -
    875.     preg_match_all($this->Tokens$s$newres);
    876. -
    877.  
    878. -
    879.     $res=$this->array_concat($resarray_map('trim'$newres[0]));
    880. -
    881.  
    882. -
    883.     return $res;
    884. -
    885.   }
    886. -
    887.  
    888. -
    889.   /**
    890. -
    891.    * Returns a list with the elements between start and end as one quoted string
    892. -
    893.    * e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"]
    894. -
    895.    * @param array $list 
    896. -
    897.    * @param integer $start 
    898. -
    899.    * @param integer $end 
    900. -
    901.    * @returns array
    902. -
    903.    * @access private
    904. -
    905.    ***/
    906. -
    907.   function listify($list$start$end{
    908. -
    909.  
    910. -
    911.     //Re-form a list, merge elements start->end into one quoted element
    912. -
    913.     //Start and end are offsets...
    914. -
    915.  
    916. -
    917.     $l=$end-$start;
    918. -
    919.  
    920. -
    921.     $s=array_slice($list0$start);
    922. -
    923.     $m=array_slice($list$start,$l);
    924. -
    925.     $e=array_slice($list$end);
    926. -
    927.  
    928. -
    929.     //  array_push($s,"\"".join($m," ")."\"");
    930. -
    931.     array_push($s,$m);
    932. -
    933.  
    934. -
    935.     return $this->array_concat($s,$e);
    936. -
    937.   }
    938. -
    939.  
    940. -
    941.   /**
    942. -
    943.    * Returns an array with prefixes=>namespace mappings
    944. -
    945.    * @param array $list 
    946. -
    947.    * @access private
    948. -
    949.    * @returns array
    950. -
    951.    ***/
    952. -
    953.   function getPrefixes($list{
    954. -
    955.  
    956. -
    957.     $prefixes=array();
    958. -
    959.     $ns=1;
    960. -
    961.     $name=2;
    962. -
    963.     foreach ($list as $l{
    964. -
    965.       if ($l=='@prefix'{
    966. -
    967.     //   while '@prefix' in list {
    968. -
    969.  
    970. -
    971.     $pos=current($list);
    972. -
    973.     //pos = list.index('@prefix')
    974. -
    975.     $r $this->getSpan($list$pos($pos+4))# processes the prefix tokens
    976. -
    977.     $binding=$r[0];
    978. -
    979.     $list=$r[1];
    980. -
    981.     $prefixes[$binding[$ns]] substr($binding[$name],1,-1);
    982. -
    983.     $this->parsedNamespaces[substr($binding[$name],1,-1)substr($binding[$ns],0,-1);
    984. -
    985.       }
    986. -
    987.     }
    988. -
    989.  
    990. -
    991.     if (count($prefixes)<1$listarray_slice($list,0);
    992. -
    993.  
    994. -
    995.     return array($prefixes$list);
    996. -
    997.   }
    998. -
    999.  
    1000. -
    1001.   /**
    1002. -
    1003.    * Callback function for replacing "a" elements with the right RDF uri.
    1004. -
    1005.    * @param string $l 
    1006. -
    1007.    * @access private
    1008. -
    1009.    ***/
    1010. -
    1011.   function replace_a_type(&$l,$p{
    1012. -
    1013.     if ($l=='a'$l='<'.$this->RDF_NS.'type>';
    1014. -
    1015.   }
    1016. -
    1017.  
    1018. -
    1019.   /**
    1020. -
    1021.    * Callback function for replacing "=" elements with the right DAML+OIL uri.
    1022. -
    1023.    * @param string $l 
    1024. -
    1025.    * @access private
    1026. -
    1027.    ***/
    1028. -
    1029.   function replace_equal(&$l,$p{
    1030. -
    1031.     if ($l=='='$l='<'.$this->OWL_NS.'sameAs>';
    1032. -
    1033.   }
    1034. -
    1035.  
    1036. -
    1037.   /**
    1038. -
    1039.    * Callback function for replacing "this" elements with the right RDF uri.
    1040. -
    1041.    * @param string $l 
    1042. -
    1043.    * @access private
    1044. -
    1045.    ***/
    1046. -
    1047.   function replace_this($l,$p{
    1048. -
    1049.     if ($l=='this'$l='<urn:urn-n:this>';
    1050. -
    1051.   }
    1052. -
    1053.  
    1054. -
    1055.   /**
    1056. -
    1057.    * Applies stuff :)
    1058. -
    1059.    * Expands namespace prefixes etc.
    1060. -
    1061.    * @param array $prefixes 
    1062. -
    1063.    * @param array $list 
    1064. -
    1065.    * @returns $list
    1066. -
    1067.    * @access private
    1068. -
    1069.    ***/
    1070. -
    1071.   function applyStuff($prefixes$list{
    1072. -
    1073.  
    1074. -
    1075.     array_walk($listarray($this'replace_a_type'));
    1076. -
    1077.     array_walk($listarray($this'replace_equal'));
    1078. -
    1079.     array_walk($listarray($this'replace_this'));
    1080. -
    1081.  
    1082. -
    1083.     for ($i=0;$i<count($list);$i++{
    1084. -
    1085.       //   for i in range(len(list)) {
    1086. -
    1087. //      if (!strstr('<_"?.;,{}[]()',$list[$i]{0})) {
    1088. -
    1089.  
    1090. -
    1091.  
    1092. -
    1093. // if a <> resource occours, change it to the parsed filename or local URI + timestamp
    1094. -
    1095.  
    1096. -
    1097.         if ($list[$i]=='<>'{
    1098. -
    1099.             if (!isset($path)) {
    1100. -
    1101.                 if (!isset($_SERVER['SERVER_ADDR'])) $_SERVER['SERVER_ADDR']='localhost';
    1102. -
    1103.                 if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI']='/rdfapi-php';
    1104. -
    1105.                 $list[$i]='<http://'.$_SERVER['SERVER_ADDR'].$_SERVER['REQUEST_URI'].'#generate_timestamp_'.time().'>';
    1106. -
    1107.  
    1108. -
    1109.           }else {$list[$i]='<'.$path.'>';};
    1110. -
    1111.         };
    1112. -
    1113.  
    1114. -
    1115.  
    1116. -
    1117.         if ((!strstr('<_"?.;,{}[]()@',$list[$i]{0}))AND (substr($list[$i],0,3)!='^^<')) {
    1118. -
    1119.       $_rexplode(":",$list[$i]);
    1120. -
    1121.  
    1122. -
    1123.  
    1124. -
    1125.  
    1126. -
    1127.  
    1128. -
    1129.  
    1130. -
    1131.     $ns=$_r[0].':';
    1132. -
    1133.     $name=$_r[1];
    1134. -
    1135.  
    1136. -
    1137.     if (isset($prefixes[$ns])) $list[$i'<'.$prefixes[$ns].$name.'>';
    1138. -
    1139.     else if (isset($prefixes[substr($ns,2)])) $list[$i'^^'.$prefixes[substr($ns,2)].$name.'';
    1140. -
    1141.   else {
    1142. -
    1143.   #die('Prefix not declared:'.$ns);
    1144. -
    1145.       $this->parseError=true;
    1146. -
    1147.     trigger_error('Prefix not declared: '.$nsE_USER_ERROR);
    1148. -
    1149.     break;
    1150. -
    1151.  
    1152. -
    1153.  
    1154. -
    1155.   }
    1156. -
    1157.  
    1158. -
    1159.       else {
    1160. -
    1161.     if ($list[$i]{0== '"'{  // Congratulations - it's a literal!
    1162. -
    1163.       if (substr($list[$i],0,3== '"""'{
    1164. -
    1165.         if (substr($list[$i],-3,3== '"""'// A big literal...
    1166. -
    1167.           $lit substr($list[$i],3,-3);
    1168. -
    1169.           //          print "++$lit++";
    1170. -
    1171.           $lit=str_replace('\n''\\n',$lit);
    1172. -
    1173.  
    1174. -
    1175.           $lit=ereg_replace("[^\\]\"""\\\""$lit);
    1176. -
    1177.  
    1178. -
    1179.           $list[$i'"'.$lit.'"';
    1180. -
    1181.         }
    1182. -
    1183.         else die ('Incorrect string formatting: '.substr($list[$i],-3,3))}
    1184. -
    1185.       else {
    1186. -
    1187.         if (strstr($list[$i],"\n")) die('Newline in literal: '+$list[$i]);
    1188. -
    1189.       }
    1190. -
    1191.     }
    1192. -
    1193.       }
    1194. -
    1195.  
    1196. -
    1197.       if (substr($list[$i],0,2)=='^^'{
    1198. -
    1199.         if ($list[$i][2]!='<'){$list[$i]='^^<'.substr($list[$i],2).'>';};
    1200. -
    1201.       };
    1202. -
    1203.  
    1204. -
    1205.  
    1206. -
    1207.     }
    1208. -
    1209.  
    1210. -
    1211.  
    1212. -
    1213.     return $list;
    1214. -
    1215.   }
    1216. -
    1217.  
    1218. -
    1219.   /**
    1220. -
    1221.    * Returns an array of triples extracted from the list of n3 tokens
    1222. -
    1223.    * @param array $list 
    1224. -
    1225.    * @returns array
    1226. -
    1227.    * @access private
    1228. -
    1229.    ***/
    1230. -
    1231.   function getStatements($list{
    1232. -
    1233.  
    1234. -
    1235.  
    1236. -
    1237.     $statements array();
    1238. -
    1239.  
    1240. -
    1241.     while (in_array('.'$list)) {
    1242. -
    1243.       //  for($i=0;$i<count($list); $i++) {
    1244. -
    1245.       //    if ($list[$i]==".") {
    1246. -
    1247.       //   while '.' in list {
    1248. -
    1249.       $pos=array_search('.',$list);
    1250. -
    1251.  
    1252. -
    1253.       $r=$this->getSpan($list0$pos+1);
    1254. -
    1255.  
    1256. -
    1257.       $statement=$r[0];
    1258. -
    1259.       $list $r[1];
    1260. -
    1261.  
    1262. -
    1263.       array_pop($statement);
    1264. -
    1265.       $statements[]=$statement;
    1266. -
    1267.     }
    1268. -
    1269.  
    1270. -
    1271.     return $statements;
    1272. -
    1273.   }
    1274. -
    1275.  
    1276. -
    1277.   /**
    1278. -
    1279.    * Gets a list of triples with same subject
    1280. -
    1281.    * e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    1282. -
    1283.    * @param array $list 
    1284. -
    1285.    * @returns array
    1286. -
    1287.    * @acces private
    1288. -
    1289.    ***/
    1290. -
    1291.   function getPovs($list{
    1292. -
    1293.     $povs array();
    1294. -
    1295.     while (in_array(';'$list)) {
    1296. -
    1297.       $r=$this->posns($list,';');
    1298. -
    1299.       $pos=array_slice($r,0,2);
    1300. -
    1301.       $r $this->getSpan($list$pos[0]$pos[1]);
    1302. -
    1303.       $pov=$r[0];
    1304. -
    1305.       $list=$r[1];
    1306. -
    1307.  
    1308. -
    1309.       // skip lone semicolons, e.g. "<a> <b> <c> ; ."
    1310. -
    1311.       if (count($pov== 1continue;
    1312. -
    1313.  
    1314. -
    1315.       $povs[]=array_slice($pov,1);
    1316. -
    1317.     }
    1318. -
    1319.  
    1320. -
    1321.     return array($list$povs);
    1322. -
    1323.   }
    1324. -
    1325.  
    1326. -
    1327.   /**
    1328. -
    1329.    * Gets a list of triples with same predicate
    1330. -
    1331.    * e.g. :Gunnar :likes "Cheese", "Wine".
    1332. -
    1333.    * @access private
    1334. -
    1335.    * @param array $list 
    1336. -
    1337.    * @returns array
    1338. -
    1339.    ***/
    1340. -
    1341.   function getObjs($list{
    1342. -
    1343.  
    1344. -
    1345.  
    1346. -
    1347.     $objs array();
    1348. -
    1349.     while (in_array(",",$list)) {
    1350. -
    1351.       $pos=array_search(",",$list);
    1352. -
    1353.       //  for($i=0;$i<count($list); $i++) {
    1354. -
    1355.       //    if ($list[$i]==",") {
    1356. -
    1357.       //   while ',' in list {
    1358. -
    1359.  
    1360. -
    1361.  
    1362. -
    1363.       $get_array_fields=2;
    1364. -
    1365.       if (isset ($list[$pos+2])) {
    1366. -
    1367.           if (@$list[$pos+2][0]=='@'$get_array_fields++;
    1368. -
    1369.         if (@$list[$pos+2][0]=='^'$get_array_fields++;
    1370. -
    1371.       };
    1372. -
    1373.       if (isset ($list[$pos+3])) if (@$list[$pos+3][0]=='^'$get_array_fields++;};
    1374. -
    1375.  
    1376. -
    1377.  
    1378. -
    1379.       $r=$this->getSpan($list$pos($pos+$get_array_fields));
    1380. -
    1381.  
    1382. -
    1383.       $obj=$r[0];
    1384. -
    1385.       if (!isset($obj[2])) $obj[2]=' ';
    1386. -
    1387.       if (!isset($obj[3])) $obj[3]=' ';
    1388. -
    1389.  
    1390. -
    1391.       $list=$r[1];
    1392. -
    1393.  
    1394. -
    1395.  
    1396. -
    1397.       $objs[]=$obj;
    1398. -
    1399.  
    1400. -
    1401.  
    1402. -
    1403.     }
    1404. -
    1405.  
    1406. -
    1407.     return array($list$objs);
    1408. -
    1409.   }
    1410. -
    1411.  
    1412. -
    1413.   /**
    1414. -
    1415.    * Does the real work, returns a list of subject, predicate, object triples.
    1416. -
    1417.    * @param array $list 
    1418. -
    1419.    * @returns array
    1420. -
    1421.    * @access private
    1422. -
    1423.    ***/
    1424. -
    1425.   function statementize($list{
    1426. -
    1427.  
    1428. -
    1429.     if (count($list== && preg_match("/_".BNODE_PREFIX."[0-9]+_/",$list[0])) {
    1430. -
    1431.     if ($this->debugprint "Ignored bNode exists statement$list\n";
    1432. -
    1433.     return array();
    1434. -
    1435.     }
    1436. -
    1437.  
    1438. -
    1439.  
    1440. -
    1441.  
    1442. -
    1443.     if (count($list== 3return array($list);
    1444. -
    1445.     if (count($list3die("Error: statement too short!");
    1446. -
    1447.  
    1448. -
    1449.     //Get all ;
    1450. -
    1451.     $r=$this->getPovs($list);
    1452. -
    1453.     $spo=$r[0];
    1454. -
    1455.     $po=$r[1];
    1456. -
    1457.     $all=array();
    1458. -
    1459.  
    1460. -
    1461.  
    1462. -
    1463.  
    1464. -
    1465.     //      (spo, po), all = getPovs(list), []
    1466. -
    1467.     $subject $spo[0];
    1468. -
    1469.     foreach ($po as $pop{
    1470. -
    1471.       //  for pop in po {
    1472. -
    1473.       $r=$this->getObjs($pop);
    1474. -
    1475.  
    1476. -
    1477.       $myPo=$r[0];
    1478. -
    1479.       $obj=$r[1];
    1480. -
    1481.       //myPo, obj = getObjs(pop)
    1482. -
    1483.  
    1484. -
    1485.       if (!isset($myPo[2])) $myPo[2]=' ';
    1486. -
    1487.       if (!isset($myPo[3])) $myPo[3]=' ';
    1488. -
    1489.  
    1490. -
    1491.  
    1492. -
    1493.       $predicate $myPo[0];
    1494. -
    1495.       $all[]=array($subject,$predicate,$myPo[1],$myPo[2],$myPo[3]);
    1496. -
    1497.       //    all.append([subject, predicate, myPo[1]])
    1498. -
    1499.  
    1500. -
    1501.  
    1502. -
    1503.  
    1504. -
    1505.       foreach ($obj as $o$all[]=array($subject,$predicate$o[1],$o[2],$o[3]);
    1506. -
    1507.       //         for x in obj: all.append([subject, predicate, x])
    1508. -
    1509.  
    1510. -
    1511.     }
    1512. -
    1513.  
    1514. -
    1515.  
    1516. -
    1517.  
    1518. -
    1519.     $r $this->getObjs($spo);
    1520. -
    1521.     $spo=$r[0];
    1522. -
    1523.  
    1524. -
    1525.     $objs=$r[1];
    1526. -
    1527.  
    1528. -
    1529.     //spo, objs = getObjs(spo)
    1530. -
    1531.     $subject=$spo[0];
    1532. -
    1533.     $predicate=$spo[1];
    1534. -
    1535.  
    1536. -
    1537.  
    1538. -
    1539.     if(!isset($spo[3])) $spo[3]=' ';
    1540. -
    1541.     if(!isset($spo[4])) $spo[4]=' ';
    1542. -
    1543.  
    1544. -
    1545.     $all[]=array($subject$predicate$spo[2],$spo[3],$spo[4]);
    1546. -
    1547.  
    1548. -
    1549.     foreach ($objs as $obj$all[]=array($subject$predicate$obj[1],$obj[2],$obj[3]);
    1550. -
    1551.  
    1552. -
    1553.     return $all;
    1554. -
    1555.   }
    1556. -
    1557.  
    1558. -
    1559.   /**
    1560. -
    1561.    * Makes lists of elements in list into a seperate array element.
    1562. -
    1563.    * e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"]
    1564. -
    1565.    * @param array $list 
    1566. -
    1567.    * @param string $schar 
    1568. -
    1569.    * @param string $echar 
    1570. -
    1571.    * @returns array
    1572. -
    1573.    * @access private
    1574. -
    1575.    ***/
    1576. -
    1577.   function doLists($list$schar$echar{
    1578. -
    1579.  
    1580. -
    1581.     while (in_array($schar$list)) {
    1582. -
    1583.       //   while schar in list {
    1584. -
    1585.       $ndict=array();
    1586. -
    1587.       $nestingLevel=0;
    1588. -
    1589.       $biggest=0;
    1590. -
    1591.       for ($i=0;$i<count($list);$i++{
    1592. -
    1593.     if ($list[$i== $schar{
    1594. -
    1595.       $nestingLevel += 1;
    1596. -
    1597.       if (!in_array($nestingLevelarray_keys($ndict))) {
    1598. -
    1599.         $ndict[$nestingLevelarray(array($i));
    1600. -
    1601.       else {
    1602. -
    1603.         $ndict[$nestingLevel][]=array($i);
    1604. -
    1605.       }
    1606. -
    1607.     }
    1608. -
    1609.     if ($list[$i== $echar{
    1610. -
    1611.       if (!in_array($nestingLevelarray_keys($ndict))) {
    1612. -
    1613.         $ndict[$nestingLevel]=array(array($i));
    1614. -
    1615.       else {
    1616. -
    1617.             $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i;
    1618. -
    1619.             $nestingLevel-= 1;
    1620. -
    1621. # elif type(list[i]) == type([]) {
    1622. -
    1623. #    list[i] = doLists(list[i], schar, echar)
    1624. -
    1625.       }
    1626. -
    1627.     }
    1628. -
    1629.       }
    1630. -
    1631.       foreach (array_keys($ndictas $key)
    1632. -
    1633.     if ($key $biggest)  $biggest $key;
    1634. -
    1635.  
    1636. -
    1637.       $tol $ndict[$biggest][0];
    1638. -
    1639.       $list $this->listify($list$tol[0]($tol[1]+1));
    1640. -
    1641.     }
    1642. -
    1643.     return $list;
    1644. -
    1645.   }
    1646. -
    1647.  
    1648. -
    1649.   /**
    1650. -
    1651.    * Apply doLists for all different types of list.
    1652. -
    1653.    * @param array 
    1654. -
    1655.    * @returns array
    1656. -
    1657.    * @access private
    1658. -
    1659.    ***/
    1660. -
    1661.   function listStuff($list{
    1662. -
    1663. # y, z = zip(['[', ']'], ['{', '}'], ['(', ')'])
    1664. -
    1665. # return map(doLists, [list, list, list], y, z).pop()
    1666. -
    1667.     $list $this->doLists($list'['']');
    1668. -
    1669.     $list $this->doLists($list'{''}');
    1670. -
    1671.     return $this->doLists($list'('')');
    1672. -
    1673.   }
    1674. -
    1675.  
    1676. -
    1677.   /**
    1678. -
    1679.    * Generates a new node id.
    1680. -
    1681.    * @access private
    1682. -
    1683.    * @returns string
    1684. -
    1685.    ***/
    1686. -
    1687.   function bnodeID({
    1688. -
    1689.  
    1690. -
    1691.     $this->bNode++;
    1692. -
    1693.     return "_".BNODE_PREFIX.$this->bNode."_";
    1694. -
    1695.   }
    1696. -
    1697.  
    1698. -
    1699.   /**
    1700. -
    1701.    * This makes bNodes out of variables like _:a etc.
    1702. -
    1703.    * @access private
    1704. -
    1705.    * @param array $list 
    1706. -
    1707.    * @returns array
    1708. -
    1709.    ***/
    1710. -
    1711.   function fixAnon($list{
    1712. -
    1713. //    $map=array();
    1714. -
    1715.     for($i=0;$i<count($list);$i++{
    1716. -
    1717.       $l=$list[$i];
    1718. -
    1719.       if (substr($l,0,2)=="_:"{
    1720. -
    1721.       if (!isset($this->bNodeMap[$l])) {
    1722. -
    1723.       $a=$this->bnodeID();
    1724. -
    1725.       $this->bNodeMap[$l]=$a;
    1726. -
    1727.     else $a=$this->bNodeMap[$l];
    1728. -
    1729.     $list[$i]=$a;
    1730. -
    1731.       }
    1732. -
    1733.     }
    1734. -
    1735.     return $list;
    1736. -
    1737.   }
    1738. -
    1739.  
    1740. -
    1741.   /**
    1742. -
    1743.    * This makes [ ] lists into bnodes.
    1744. -
    1745.    * @access private
    1746. -
    1747.    * @param array $list 
    1748. -
    1749.    * @return array 
    1750. -
    1751.    ***/
    1752. -
    1753.   function expandLists($list{
    1754. -
    1755.  
    1756. -
    1757.     for($i=0;$i<count($list);$i++{
    1758. -
    1759.       if (is_array($list[$i])) {
    1760. -
    1761.     if $list[$i][0]=='[' {
    1762. -
    1763.       $bnode=$this->bnodeID();
    1764. -
    1765.       $prop=$list[$i];
    1766. -
    1767.       $list[$i]=$bnode;
    1768. -
    1769.       $list[]=$bnode;
    1770. -
    1771.       $list=$this->array_concat($listarray_slice($prop,1,-1));
    1772. -
    1773.       $list[]='.';
    1774. -
    1775.     }elseif($list[$i][0]=='('{
    1776. -
    1777.  
    1778. -
    1779.         $rdfNil '<'RDF_NAMESPACE_URI RDF_NIL .'>';
    1780. -
    1781.         $rdfFirst '<'RDF_NAMESPACE_URI RDF_FIRST .'>';
    1782. -
    1783.         $rdfRest '<'RDF_NAMESPACE_URI RDF_REST .'>';
    1784. -
    1785.  
    1786. -
    1787.         // local copy of list without "(" and ")"
    1788. -
    1789.         $t_list array_slice($list[$i]1-1);
    1790. -
    1791.  
    1792. -
    1793.         //prepare bnodes
    1794. -
    1795.         $fromBnode $this->bnodeID();
    1796. -
    1797.         $toBnode $this->bnodeID();
    1798. -
    1799.  
    1800. -
    1801.         //link first bnode into graph
    1802. -
    1803.         $list[$i$fromBnode;
    1804. -
    1805.  
    1806. -
    1807.         $count count($t_list);
    1808. -
    1809.  
    1810. -
    1811.         //loop through list, convert to RDF linked list
    1812. -
    1813.         for ($idx 0$idx $count$idx++){
    1814. -
    1815.  
    1816. -
    1817.             // set rdf:first
    1818. -
    1819.             $list[$fromBnode;
    1820. -
    1821.             $list[$rdfFirst;
    1822. -
    1823.             $list[$t_list[$idx];
    1824. -
    1825.             $list['.';
    1826. -
    1827.  
    1828. -
    1829.             // set rdf:rest (nil or next bnode)
    1830. -
    1831.             if ($idx == $count 1{
    1832. -
    1833.                 $list[$fromBnode;
    1834. -
    1835.                 $list[$rdfRest;
    1836. -
    1837.                 $list[$rdfNil;
    1838. -
    1839.                 $list['.';
    1840. -
    1841.             }
    1842. -
    1843.             else {
    1844. -
    1845.                 $list[$fromBnode;
    1846. -
    1847.                 $list[$rdfRest;
    1848. -
    1849.                 $list[$toBnode;
    1850. -
    1851.                 $list['.';
    1852. -
    1853.  
    1854. -
    1855.                 $fromBnode $toBnode;
    1856. -
    1857.                 $toBnode $this->bnodeID();
    1858. -
    1859.             }
    1860. -
    1861.         }
    1862. -
    1863.     }
    1864. -
    1865.     else {
    1866. -
    1867.         die('Only [ ] and () lists are supported!');
    1868. -
    1869.     }
    1870. -
    1871.     }
    1872. -
    1873.  
    1874. -
    1875.  
    1876. -
    1877.     }
    1878. -
    1879.     return $list;
    1880. -
    1881.   }
    1882. -
    1883.  
    1884. -
    1885.   /**
    1886. -
    1887.    * Main work-horse function. This converts a N3 string to a list of statements
    1888. -
    1889.    * @param string $s 
    1890. -
    1891.    * @returns array
    1892. -
    1893.    * @access private
    1894. -
    1895.    ***/
    1896. -
    1897.   function n3tolist($s{
    1898. -
    1899.  
    1900. -
    1901.     //   """Convert an N3 string into a list of triples as strings."""
    1902. -
    1903.     $result array();
    1904. -
    1905.  
    1906. -
    1907.    $t $this->filterWs($this->toke($s))# tokenize the stream, and filter whitespace tokens
    1908. -
    1909.  
    1910. -
    1911.     if ($this->debug{
    1912. -
    1913.       print "Filter WS:\n";
    1914. -
    1915.       var_dump($t);
    1916. -
    1917.     }
    1918. -
    1919.     $r=$this->getPrefixes($t)# get the prefix directives, and add to a dict
    1920. -
    1921.     $prefixes=$r[0];
    1922. -
    1923.     $t=$r[1];
    1924. -
    1925.     if ($this->debug{
    1926. -
    1927.       print "Prefixes:\n";
    1928. -
    1929.       var_dump($prefixes);
    1930. -
    1931.       print "***\n";
    1932. -
    1933.       var_dump($t);
    1934. -
    1935.     }
    1936. -
    1937.     $t=$this->applyStuff($prefixes$t);#apply prefixes, keywords, and string formatting
    1938. -
    1939.     if ($this->debug{
    1940. -
    1941.       print "Stuff applied:\n";
    1942. -
    1943.       var_dump($t);
    1944. -
    1945.     }
    1946. -
    1947.  
    1948. -
    1949.     $t=$this->fixAnon($t)# fix _:a anons
    1950. -
    1951.     if ($this->debug{
    1952. -
    1953.       print "Fix anon:\n";
    1954. -
    1955.       var_dump($t);
    1956. -
    1957.     }
    1958. -
    1959.  
    1960. -
    1961.     $t $this->listStuff($t)# apply list stuff: todo
    1962. -
    1963.     if ($this->debug{
    1964. -
    1965.       print "Lists done:\n";
    1966. -
    1967.       var_dump($t);
    1968. -
    1969.     }
    1970. -
    1971.     $t=$this->expandLists($t);
    1972. -
    1973.     if ($this->debug{
    1974. -
    1975.       print "Lists applied:\n";
    1976. -
    1977.       var_dump($t);
    1978. -
    1979.     }
    1980. -
    1981.     $t $this->getStatements($t)# get all of the "statements" from the stream
    1982. -
    1983.  
    1984. -
    1985.     foreach ($t as $stat{
    1986. -
    1987.       $stats=$this->statementize($stat);
    1988. -
    1989.  
    1990. -
    1991.       foreach ($stats as $y{
    1992. -
    1993.     $result[]=$y;
    1994. -
    1995.       }
    1996. -
    1997.     }
    1998. -
    1999.     //   for x in [statementize(stat) for stat in t] {
    2000. -
    2001.     //      for y in x: result.append(y)
    2002. -
    2003.     return $result;
    2004. -
    2005.   }
    2006. -
    2007.  
    2008. -
    2009.   /**
    2010. -
    2011.    * Constructs a RAP RDFNode from URI/Literal/Bnode
    2012. -
    2013.    * @access private
    2014. -
    2015.    * @param string $s 
    2016. -
    2017.    * @returns object RDFNode
    2018. -
    2019.    ***/
    2020. -
    2021.   function toRDFNode($s,$state{
    2022. -
    2023.     $ins=substr($s,1,-1);
    2024. -
    2025.     if ($s{0}=="\""{
    2026. -
    2027.       $lang=NULL;
    2028. -
    2029.  
    2030. -
    2031.  
    2032. -
    2033.  
    2034. -
    2035.       if (count($state)>3{
    2036. -
    2037.  
    2038. -
    2039.  
    2040. -
    2041.         for ($i 3$i count($state)$i++){
    2042. -
    2043.           if ($state[$i][0]=='@')$lang=substr($state[3],1);
    2044. -
    2045.           if (substr($state[$i],0,2)=='^^'){
    2046. -
    2047.  
    2048. -
    2049.             $dtype=substr($state[$i],2);
    2050. -
    2051.             if ($dtype[0]=='<'$dtypesubstr($dtype,1,-1);
    2052. -
    2053.  
    2054. -
    2055.           };
    2056. -
    2057.  
    2058. -
    2059.         };
    2060. -
    2061.       };
    2062. -
    2063.  
    2064. -
    2065.  
    2066. -
    2067.      if(UNIC_RDF){
    2068. -
    2069.           $ins=$this->str2unicode_nfc($ins);
    2070. -
    2071.       }
    2072. -
    2073.       $new_Literal=new Literal($ins,$lang);
    2074. -
    2075.       if (isset($dtype)) $new_Literal->setDatatype($dtype);
    2076. -
    2077.       return  $new_Literal;
    2078. -
    2079.     };
    2080. -
    2081.  
    2082. -
    2083.     if (strstr($s,'_'.BNODE_PREFIX)) {
    2084. -
    2085.         if (($this->FixBnodesOR (!array_search($s,$this->bNodeMap))) {
    2086. -
    2087.             return new BlankNode($ins);
    2088. -
    2089.         else {return new BlankNode(trim(substr(array_search($s,$this->bNodeMap),2)));
    2090. -
    2091.         };
    2092. -
    2093.     }
    2094. -
    2095.  
    2096. -
    2097.     return new Resource($ins);
    2098. -
    2099.   }
    2100. -
    2101.  
    2102. -
    2103.  
    2104. -
    2105.  
    2106. -
    2107.  
    2108. -
    2109. //end: N3Parser
    2110. -
    2111.  
    2112. -
    2113. ?>
    2114. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Serializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Serializer.php.html deleted file mode 100755 index a964e0ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxN3Serializer.php.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - File Source for N3Serializer.php - - - - - -

    Source for file N3Serializer.php

    -

    Documentation is available at N3Serializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: N3Serializer
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * PHP Notation3 Serializer
    16. -
    17.  * 
    18. -
    19.  * This class serialises models to N3 Syntax.
    20. -
    21.  * 
    22. -
    23.  * Supported N3 features:
    24. -
    25.  * <ul>
    26. -
    27.  *   <li>Using [ ] for blank nodes, or _: if nescessary</li>
    28. -
    29.  *   <li>Literal datytype- and xmlLanguageTag support</li>
    30. -
    31.  * </ul>
    32. -
    33.  * 
    34. -
    35.  * Un-supported N3 Features include:
    36. -
    37.  * <ul>
    38. -
    39.  *   <li>Reification</li>
    40. -
    41.  * </ul>
    42. -
    43.  *
    44. -
    45.  *
    46. -
    47.  * TODO: * added namespace prefixes are persisent...
    48. -
    49.  *
    50. -
    51.  * @author Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    52. -
    53.  * @version $Id: fsource_syntax__syntaxN3Serializer.php.html 443 2007-06-01 16:25:38Z cax $
    54. -
    55.  * @package syntax
    56. -
    57.  * @access public
    58. -
    59.  ***/
    60. -
    61.  
    62. -
    63. define('MAGIC_STRING''~~~');
    64. -
    65.  
    66. -
    67. class N3Serializer extends Object {
    68. -
    69.  
    70. -
    71.   var $debug
    72. -
    73.  
    74. -
    75.   var $prefixes
    76. -
    77.  
    78. -
    79.   var $done;  // keeps track of already serialized resources
    80. -
    81.   var $resourcetext
    82. -
    83. -
    84.   var $model;
    85. -
    86.   var $res
    87. -
    88.   var $anon;
    89. -
    90.  
    91. -
    92.    /**
    93. -
    94.     * Constructor
    95. -
    96.     *
    97. -
    98.     * @access   public
    99. -
    100.     */
    101. -
    102.   function N3Serializer(
    103. -
    104.     $this->debug=FALSE;
    105. -
    106.   }
    107. -
    108.  
    109. -
    110.  
    111. -
    112.   /** 
    113. -
    114.    * Adds a new namespace prefix to use.
    115. -
    116.    * Unknown namespaces will become ns0, ns1 etc.
    117. -
    118.    * @access public
    119. -
    120.    * @param string $s 
    121. -
    122.    * @returns void
    123. -
    124.    ***/
    125. -
    126.  
    127. -
    128.   function addNSPrefix$ns$prefix
    129. -
    130.     $this->prefixes[$ns]=$prefix
    131. -
    132.   }
    133. -
    134.  
    135. -
    136.   /**
    137. -
    138.    * Serializes a model to N3 syntax.
    139. -
    140.    *
    141. -
    142.    * @param     object Model $model 
    143. -
    144.    * @return    string 
    145. -
    146.    * @access    public
    147. -
    148.    */
    149. -
    150.   function serialize(&$m
    151. -
    152.  
    153. -
    154.     if (is_a($m'DbModel')) 
    155. -
    156.         $m=$m->getMemModel();
    157. -
    158.     
    159. -
    160.     $this->reset();
    161. -
    162.     $this->model=$m;
    163. -
    164.     $this->res=""
    165. -
    166.     
    167. -
    168.     // copy default namespaces
    169. -
    170.     global $default_prefixes;
    171. -
    172.     foreach($default_prefixes as $prefix => $namespace)
    173. -
    174.             $this->addNSPrefix($namespace,$prefix);
    175. -
    176.     
    177. -
    178.     $nps$this->model->getParsedNamespaces()
    179. -
    180.     if($nps!=false){
    181. -
    182.         foreach($nps as $uri => $prefix){
    183. -
    184.             $this->addNSPrefix($uri,$prefix);
    185. -
    186.         }
    187. -
    188.     }
    189. -
    190.     
    191. -
    192.     $namespaces=array();
    193. -
    194.     $count=array();
    195. -
    196.     $resources=array()
    197. -
    198.     foreach ($this->model->triples as $t
    199. -
    200.       $s=$t->getSubject();
    201. -
    202.       if is_a($s'Resource')) 
    203. -
    204.         $namespaces[$s->getNamespace()]=1;
    205. -
    206.  
    207. -
    208.       $p=$t->getPredicate();
    209. -
    210.       if is_a($p'Resource')) 
    211. -
    212.         $namespaces[$p->getNamespace()]=1;
    213. -
    214.  
    215. -
    216.       $o=$t->getObject();
    217. -
    218.       if is_a($o'Resource')) 
    219. -
    220.         $namespaces[$o->getNamespace()]=1;
    221. -
    222.      
    223. -
    224.       $uri=$s->getURI();
    225. -
    226.       
    227. -
    228.       if (isset($count[$uri])) 
    229. -
    230.         $count[$uri]++;
    231. -
    232.       else {     
    233. -
    234.         $count[$uri]=0;
    235. -
    236.         $resources[$uri]=$s;
    237. -
    238.       }
    239. -
    240.     }
    241. -
    242.  
    243. -
    244.     if (!HIDE_ADVERTISE
    245. -
    246.         $this->res .= '# Generated by N3Serializer.php from RDF RAP.'.LINEFEED
    247. -
    248.                      .'# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'
    249. -
    250.                      .LINEFEED.LINEFEED;
    251. -
    252.  
    253. -
    254.     $this->doNamespaces($namespaces)
    255. -
    256.  
    257. -
    258.     $this->res.=LINEFEED.LINEFEED;
    259. -
    260.  
    261. -
    262.     arsort($count);
    263. -
    264.     
    265. -
    266.     foreach $count as $k=>$v
    267. -
    268.       $this->doResource($resources[$k])
    269. -
    270.       //      $this->res.=" .\n";
    271. -
    272.     }
    273. -
    274.  
    275. -
    276.     $c=0;
    277. -
    278.     foreach $this->resourcetext as $r=>$t
    279. -
    280.  
    281. -
    282.       if preg_match_all('/'.MAGIC_STRING.'([^ ]+)'.MAGIC_STRING.'/'$t$msPREG_SET_ORDER)) {
    283. -
    284.  
    285. -
    286.     foreach($ms as $mseach
    287. -
    288.       $rp=$this->resourcetext[$mseach[1]];
    289. -
    290.       $t=preg_replace('/'.MAGIC_STRING.$mseach[1].MAGIC_STRING.'/'$rp$t);
    291. -
    292.     }
    293. -
    294.       }
    295. -
    296.  
    297. -
    298.       if ($this->debug$this->res.=$c.': ';
    299. -
    300.       if !isset($this->resourcetext_taken[$r]&& $this->resourcetext_taken[$r]>0) ) 
    301. -
    302.          $this->res.=$t.' .'.LINEFEED
    303. -
    304.       else if $this->debug 
    305. -
    306.          $this->res.=' Skipping : '.$t.LINEFEED;
    307. -
    308.       $c++;
    309. -
    310.     
    311. -
    312.  
    313. -
    314. //     $max=-1111;
    315. -
    316. //     $maxkey="";
    317. -
    318. //     foreach ($count as $k=>$c) { 
    319. -
    320. //       if ( $c>$max) { $maxkey=$k; $max=$c; }
    321. -
    322. //     }
    323. -
    324.     
    325. -
    326. //     if ($this->debug) { 
    327. -
    328. //       print "$maxkey is subject of most triples! ($max) \n"; 
    329. -
    330. //     }
    331. -
    332.  
    333. -
    334.     return $this->res;
    335. -
    336.   }
    337. -
    338.  
    339. -
    340. /**
    341. -
    342.  * Serializes a model and saves it into a file.
    343. -
    344.  * Returns FALSE if the model couldn't be saved to the file.
    345. -
    346.  *
    347. -
    348.  * @param     object MemModel $model 
    349. -
    350.  * @param     string $filename 
    351. -
    352.  * @return    boolean 
    353. -
    354.  * @access    public
    355. -
    356.  */
    357. -
    358.  function  saveAs(&$model$filename{
    359. -
    360.  
    361. -
    362.    // serialize model
    363. -
    364.    $n3 $this->serialize($model);
    365. -
    366.  
    367. -
    368.    // write serialized model to file
    369. -
    370.    $file_handle @fopen($filename'w');
    371. -
    372.    if ($file_handle{
    373. -
    374.       fwrite($file_handle$n3);
    375. -
    376.       fclose($file_handle);
    377. -
    378.       return TRUE;
    379. -
    380.    }else{
    381. -
    382.       return FALSE;
    383. -
    384.    };
    385. -
    386.  }
    387. -
    388.   
    389. -
    390.  
    391. -
    392.   /* ==================== Private Methods from here ==================== */
    393. -
    394.  
    395. -
    396.  
    397. -
    398. /**
    399. -
    400.  * Readies this object for serializing another model
    401. -
    402.  * @access private
    403. -
    404.  * @param void 
    405. -
    406.  * @returns void
    407. -
    408.  ***/
    409. -
    410.   function reset({
    411. -
    412.     $this->anon=0;
    413. -
    414.     $this->done=array();
    415. -
    416.     $this->resourcetext_taken=array();
    417. -
    418.     $this->resourcetext=array();
    419. -
    420.     $this->res='';
    421. -
    422.     $this->model=NULL;
    423. -
    424.     unset($this->prefixes);
    425. -
    426.   }
    427. -
    428.  
    429. -
    430. /**
    431. -
    432.  * Makes ns0, ns1 etc. prefixes for unknown prefixes.
    433. -
    434.  * Outputs @prefix lines.
    435. -
    436.  * @access private
    437. -
    438.  * @param array $n 
    439. -
    440.  * @returns void
    441. -
    442.  ***/
    443. -
    444.   function doNamespaces(&$n
    445. -
    446.     $c=0;
    447. -
    448.     foreach ($n as $ns => $nonsense
    449. -
    450.       if !$ns continue;  
    451. -
    452.       if isset($this->prefixes[$ns]) ) {
    453. -
    454.     $p=$this->prefixes[$ns];
    455. -
    456.       else 
    457. -
    458.     $p='ns'.$c;
    459. -
    460.     $this->prefixes[$ns]=$p;
    461. -
    462.     $c++;
    463. -
    464.       }
    465. -
    466.       $this->res.="@prefix $p: <".$ns.'> .'.LINEFEED;
    467. -
    468.     }
    469. -
    470.   }
    471. -
    472.  
    473. -
    474. /**
    475. -
    476.  * Fill in $resourcetext for a single resource.
    477. -
    478.  * Will recurse into Objects of triples, but should never look ? (really?)
    479. -
    480.  * @access private
    481. -
    482.  * @param object Resource $r 
    483. -
    484.  * @returns boolean
    485. -
    486.  ***/
    487. -
    488.  
    489. -
    490.   function doResource(&$r
    491. -
    492.     //    print $r->getURI(); 
    493. -
    494.  
    495. -
    496.     $ts=$this->model->find($rnullnull);
    497. -
    498.     if (count($ts->triples)==0return
    499. -
    500.     
    501. -
    502.     $out="";
    503. -
    504.  
    505. -
    506.     if isset($this->done[$r->getURI()]&& $this->done[$r->getURI(){
    507. -
    508.       if is_a($r'BlankNode')) 
    509. -
    510.       
    511. -
    512.           if $this->resourcetext_taken[$r->getURI()== 1
    513. -
    514.               //Oh bother, we must use the _:blah construct. 
    515. -
    516.               $a=$this->resourcetext[$r->getURI()];
    517. -
    518.               $this->resourcetext[$r->getURI()]='_:anon'.$this->anon;
    519. -
    520.               $this->resourcetext['_:anon'.$this->anon]=$this->fixAnon($a'_:anon'.$this->anon);
    521. -
    522.               $this->resourcetext_taken[$r->getURI()]=2
    523. -
    524.               $this->anon++;
    525. -
    526.         }
    527. -
    528.  
    529. -
    530.       }
    531. -
    532.       return false
    533. -
    534.     }
    535. -
    536.  
    537. -
    538.     $this->done[$r->getURI()]=TRUE;
    539. -
    540.  
    541. -
    542.     if is_a($r'Resource') ) {
    543. -
    544.  
    545. -
    546.       if is_a($r'BlankNode') ) 
    547. -
    548.  
    549. -
    550.            //test, if this blanknode is referenced somewhere
    551. -
    552.           $rbn=$this->model->find(nullnull$r);
    553. -
    554.  
    555. -
    556.           if (count($rbn->triples)>!N3SER_BNODE_SHORT{
    557. -
    558.               $out.='_:'.$r->getLabel();
    559. -
    560.           else {
    561. -
    562.               $out.='[ ';
    563. -
    564.           };    
    565. -
    566.       else 
    567. -
    568.  
    569. -
    570.         $this->doURI($r$out);
    571. -
    572.  
    573. -
    574.       };
    575. -
    576.     };
    577. -
    578.   
    579. -
    580.     usort($ts->triples'statementsorter');
    581. -
    582.     $lastp='';
    583. -
    584.  
    585. -
    586.     $out.=' ';
    587. -
    588.  
    589. -
    590.     foreach ($ts->triples as $t
    591. -
    592.       
    593. -
    594.       $p=$t->getPredicate()
    595. -
    596.       
    597. -
    598.       if ($p == $lastp{
    599. -
    600.     $out.=' , '
    601. -
    602.       else 
    603. -
    604.     if ($lastp!=''$out.=' ; '
    605. -
    606.     $this->doURI($p$out);
    607. -
    608.     $lastp=$p;
    609. -
    610.       }
    611. -
    612.  
    613. -
    614.       $out.=' ';
    615. -
    616.       
    617. -
    618.       $o=$t->getObject();
    619. -
    620.       
    621. -
    622.       if is_a($o'Literal')) 
    623. -
    624.     $l=$o->getLabel();
    625. -
    626.     if strpos($lLINEFEED=== FALSE 
    627. -
    628.       $out.="\"$l\"";
    629. -
    630.     else 
    631. -
    632.       $out.="\"\"\"$l\"\"\"";      
    633. -
    634.     }
    635. -
    636.     if $o->getLanguage()!='' 
    637. -
    638.       $out.='@'.$o->getLanguage();
    639. -
    640.     }
    641. -
    642.     if $o->getDatatype()!='' 
    643. -
    644.       $out.='^^<'.$o->getDatatype().'>';
    645. -
    646.     }
    647. -
    648.     
    649. -
    650.       
    651. -
    652.       
    653. -
    654.       if (is_a($o'Resource')) {
    655. -
    656.     if ($this->debugprint 'Doing object: '.$o->getURI().LINEFEED;
    657. -
    658.     if is_a($o,'BlankNode')) {
    659. -
    660.  
    661. -
    662. //    $this->doResource($o);
    663. -
    664. //      $out.=MAGIC_STRING.$o->getURI().MAGIC_STRING; #$this->resourcetext[$o->getURI()];
    665. -
    666. //      $this->resourcetext_taken[$o->getURI()]=1;
    667. -
    668.  
    669. -
    670.     $out .='_:'.$o->getLabel();
    671. -
    672.     else 
    673. -
    674.  
    675. -
    676.       $this->doURI($o$out);
    677. -
    678.     }
    679. -
    680.       }
    681. -
    682.     }
    683. -
    684.  
    685. -
    686.     if (isset($rbn&& !count($rbn->triples)>&& N3SER_BNODE_SHORT{$out.=' ] ';};
    687. -
    688.     $this->resourcetext[$r->getURI()]=$out
    689. -
    690.  
    691. -
    692.     return TRUE;
    693. -
    694.   }
    695. -
    696.  
    697. -
    698.   /** 
    699. -
    700.    * Format a single URI
    701. -
    702.    * @param string $s 
    703. -
    704.    * @access private
    705. -
    706.    * @return void 
    707. -
    708.    ***/
    709. -
    710.   function doURI(&$r&$out
    711. -
    712.     if $r->getURI()=='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'{
    713. -
    714.       $out.='a';
    715. -
    716.       return
    717. -
    718.     }
    719. -
    720.     if ($r->getNamespace()!=''{
    721. -
    722.       $out.=$this->prefixes[$r->getNamespace()].':'.$r->getLocalName();
    723. -
    724.     else 
    725. -
    726.       //Will this ever happen? 
    727. -
    728.       $out.=$r->getURI();
    729. -
    730.     }
    731. -
    732.   }
    733. -
    734.  
    735. -
    736.   
    737. -
    738.   /** 
    739. -
    740.    * Fix the resourcetext for a blanknode where the _: construct was used
    741. -
    742.    * @param string $s 
    743. -
    744.    * @param string $a 
    745. -
    746.    * @access private
    747. -
    748.    * @return void 
    749. -
    750.    ***/
    751. -
    752.   function fixAnon($t,$a
    753. -
    754.     $t=preg_replace("/( \] $|^\[ )/"''$t)
    755. -
    756.  
    757. -
    758.     return $a.$t;
    759. -
    760.   }
    761. -
    762.  
    763. -
    764. }
    765. -
    766.  
    767. -
    768. ?>
    769. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:01 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxNTripleSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxNTripleSerializer.php.html deleted file mode 100755 index 35c678cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxNTripleSerializer.php.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - File Source for NTripleSerializer.php - - - - - -

    Source for file NTripleSerializer.php

    -

    Documentation is available at NTripleSerializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: NTripleSerializer
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * PHP N-Triple Serializer
    18. -
    19.  * 
    20. -
    21.  * This class serialises models to N-Triple Syntax.
    22. -
    23.  * 
    24. -
    25.  *
    26. -
    27.  *
    28. -
    29.  * @author Daniel Westphal <mail@d-westphal.de>
    30. -
    31.  * @version $Id: fsource_syntax__syntaxNTripleSerializer.php.html 443 2007-06-01 16:25:38Z cax $
    32. -
    33.  * @package syntax
    34. -
    35.  * @access public
    36. -
    37.  ***/
    38. -
    39.  
    40. -
    41.  
    42. -
    43.  
    44. -
    45. class NTripleSerializer extends Object {
    46. -
    47.  
    48. -
    49.   var $debug
    50. -
    51.   var $model;
    52. -
    53.   var $res
    54. -
    55.  
    56. -
    57.   
    58. -
    59.   
    60. -
    61.   
    62. -
    63.  
    64. -
    65.    /**
    66. -
    67.     * Constructor
    68. -
    69.     *
    70. -
    71.     * @access   public
    72. -
    73.     */
    74. -
    75.   function NTripleSerializer(
    76. -
    77.     $this->debug=FALSE;
    78. -
    79.   }
    80. -
    81.  
    82. -
    83.   /**
    84. -
    85.    * Serializes a model to N Triple syntax.
    86. -
    87.    *
    88. -
    89.    * @param     object Model $model 
    90. -
    91.    * @return    string 
    92. -
    93.    * @access    public
    94. -
    95.    */
    96. -
    97.   function serialize(&$m
    98. -
    99.  
    100. -
    101.         if (is_a($m'DbModel')) $m $m->getMemModel();
    102. -
    103.     
    104. -
    105.     $this->reset();
    106. -
    107.     if (!HIDE_ADVERTISE{
    108. -
    109.         $this->res .= '# Generated by NTripleSerializer.php from RDF RAP.' .
    110. -
    111.             LINEFEED '# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'.
    112. -
    113.             LINEFEED LINEFEED;
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     foreach ($m->triples as $t
    120. -
    121.  
    122. -
    123.       $s=$t->getSubject();
    124. -
    125.       if (is_a($s'Blanknode')) {
    126. -
    127.           $subject='_:'.$s->getURI();
    128. -
    129.       else {
    130. -
    131.           $subject '<' ereg_replace(' '''$s->getURI()) '>';
    132. -
    133.       }
    134. -
    135.  
    136. -
    137.       $p=$t->getPredicate();  
    138. -
    139.       $predicate='<'.ereg_replace(' '''$p->getURI()).'>';
    140. -
    141.  
    142. -
    143.       $o=$t->getObject();     
    144. -
    145.       if (is_a($o'literal')) {
    146. -
    147.           $object='"'.$o->getLabel().'"';
    148. -
    149.           if ($o->getLanguage()!=''$object.='@'.$o->getLanguage();              
    150. -
    151.           if ($o->getDatatype()!=''$object.='^^<'.$o->getDatatype().">";              
    152. -
    153.       elseif (is_a($o'Blanknode')) {
    154. -
    155.         $object='_:'.$o->getURI();
    156. -
    157.       else {$object='<'.ereg_replace(' '''$o->getURI()).'>';};    
    158. -
    159.         
    160. -
    161.       $this->res.=$subject.' '.$predicate.' '.$object.' .';
    162. -
    163.       $this->res.=LINEFEED.LINEFEED;
    164. -
    165.     }
    166. -
    167.    
    168. -
    169.     return $this->res;
    170. -
    171.   
    172. -
    173.   
    174. -
    175.  
    176. -
    177. /**
    178. -
    179.  * Serializes a model and saves it into a file.
    180. -
    181.  * Returns FALSE if the model couldn't be saved to the file.
    182. -
    183.  *
    184. -
    185.  * @access    public
    186. -
    187.  * @param     object MemModel $model 
    188. -
    189.  * @param     string $filename 
    190. -
    191.  * @return    boolean 
    192. -
    193.  * @access    public
    194. -
    195.  */
    196. -
    197.  function  saveAs(&$model$filename{
    198. -
    199.  
    200. -
    201.    // serialize model
    202. -
    203.    $n3 $this->serialize($model);
    204. -
    205.  
    206. -
    207.    // write serialized model to file
    208. -
    209.    $file_handle @fopen($filename'w');
    210. -
    211.    if ($file_handle{
    212. -
    213.       fwrite($file_handle$n3);
    214. -
    215.       fclose($file_handle);
    216. -
    217.       return TRUE;
    218. -
    219.    }else{
    220. -
    221.       return FALSE;
    222. -
    223.    };
    224. -
    225.  }
    226. -
    227.   
    228. -
    229.  
    230. -
    231.   /* ==================== Private Methods from here ==================== */
    232. -
    233.  
    234. -
    235.  
    236. -
    237. /**
    238. -
    239.  * Readies this object for serializing another model
    240. -
    241.  * @access private
    242. -
    243.  * @param void 
    244. -
    245.  * @returns void
    246. -
    247.  ***/
    248. -
    249.   function reset({
    250. -
    251.     $this->res="";
    252. -
    253.     $this->model=NULL;
    254. -
    255.   }
    256. -
    257.  
    258. -
    259. }
    260. -
    261.  
    262. -
    263.  
    264. -
    265. ?>
    266. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfParser.php.html deleted file mode 100755 index 4181003f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfParser.php.html +++ /dev/null @@ -1,2386 +0,0 @@ - - - - - - File Source for RdfParser.php - - - - - -

    Source for file RdfParser.php

    -

    Documentation is available at RdfParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RdfParser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * An RDF paser.
    18. -
    19.  * This class reads RDF data from files or URIs and generates models out of it. All valid
    20. -
    21.  * RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)
    22. -
    23.  * - W3C Working Draft 10 October 2003
    24. -
    25.  * (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported.
    26. -
    27.  * The parser is based on the PHP version of repat
    28. -
    29.  * (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html)
    30. -
    31.  * by Luis Argerich (lrargerich@yahoo.com).
    32. -
    33.  * 
    34. -
    35.  * @version  $Id: fsource_syntax__syntaxRdfParser.php.html 443 2007-06-01 16:25:38Z cax $
    36. -
    37.  * @author Luis Argerich <lrargerich@yahoo.com>,
    38. -
    39.  *          Chris Bizer <chris@bizer.de>,
    40. -
    41.  *          Radoslaw Oldakowski <radol@gmx.de>
    42. -
    43.  *            Daniel Westphal <mail@d-westphal.de>
    44. -
    45.  * @package syntax
    46. -
    47.  * @access    public
    48. -
    49.  *
    50. -
    51.  */   
    52. -
    53.   
    54. -
    55. class RdfParser extends Object {
    56. -
    57.  
    58. -
    59. -
    60. var $model;
    61. -
    62.  
    63. -
    64. /* Private Methods */
    65. -
    66.  
    67. -
    68.  
    69. -
    70. /**
    71. -
    72. * converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
    73. -
    74. -
    75. @param String $str 
    76. -
    77. @return String 
    78. -
    79. @access private
    80. -
    81. *
    82. -
    83. */
    84. -
    85. function str2unicode_nfc($str=""){
    86. -
    87.     $result="";
    88. -
    89.     /* try to detect encoding */
    90. -
    91.     $tmp=str_replace("?"""$str);
    92. -
    93.     if(strpos(utf8_decode($tmp)"?")===false){
    94. -
    95.         $str=utf8_decode($str);
    96. -
    97.     }
    98. -
    99.     for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
    100. -
    101.         $nr=0;/* unicode dec nr */
    102. -
    103.         /* char */
    104. -
    105.         $char=$str[$i];
    106. -
    107.         /* utf8 binary */
    108. -
    109.         $utf8_char=utf8_encode($char);
    110. -
    111.         $bytes=strlen($utf8_char);
    112. -
    113.         if($bytes==1){
    114. -
    115.             /* 0####### (0-127) */
    116. -
    117.             $nr=ord($utf8_char);
    118. -
    119.         }
    120. -
    121.         elseif($bytes==2){
    122. -
    123.             /* 110##### 10###### = 192+x 128+x */
    124. -
    125.             $nr=((ord($utf8_char[0])-192)*64(ord($utf8_char[1])-128);
    126. -
    127.         }
    128. -
    129.         elseif($bytes==3){
    130. -
    131.             /* 1110#### 10###### 10###### = 224+x 128+x 128+x */
    132. -
    133.             $nr=((ord($utf8_char[0])-224)*4096((ord($utf8_char[1])-128)*64(ord($utf8_char[2])-128);
    134. -
    135.         }
    136. -
    137.         elseif($bytes==4){
    138. -
    139.             /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
    140. -
    141.             $nr=((ord($utf8_char[0])-240)*262144((ord($utf8_char[1])-128)*4096((ord($utf8_char[2])-128)*64(ord($utf8_char[3])-128);
    142. -
    143.         }
    144. -
    145.         /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
    146. -
    147.         if($nr<9){/* #x0-#x8 (0-8) */
    148. -
    149.             $result.="\\u".sprintf("%04X",$nr);
    150. -
    151.         }
    152. -
    153.         elseif($nr==9){/* #x9 (9) */
    154. -
    155.             $result.='\t';
    156. -
    157.         }
    158. -
    159.         elseif($nr==10){/* #xA (10) */
    160. -
    161.             $result.='\n';
    162. -
    163.         }
    164. -
    165.         elseif($nr<13){/* #xB-#xC (11-12) */
    166. -
    167.             $result.="\\u".sprintf("%04X",$nr);
    168. -
    169.         }
    170. -
    171.         elseif($nr==13){/* #xD (13) */
    172. -
    173.             $result.='\t';
    174. -
    175.         }
    176. -
    177.         elseif($nr<32){/* #xE-#x1F (14-31) */
    178. -
    179.             $result.="\\u".sprintf("%04X",$nr);
    180. -
    181.         }
    182. -
    183.         elseif($nr<34){/* #x20-#x21 (32-33) */
    184. -
    185.             $result.=$char;
    186. -
    187.         }
    188. -
    189.         elseif($nr==34){/* #x22 (34) */
    190. -
    191.             $result.='\"';
    192. -
    193.         }
    194. -
    195.         elseif($nr<92){/* #x23-#x5B (35-91) */
    196. -
    197.             $result.=$char;
    198. -
    199.         }
    200. -
    201.         elseif($nr==92){/* #x5C (92) */
    202. -
    203.             $result.='\\';
    204. -
    205.         }
    206. -
    207.         elseif($nr<127){/* #x5D-#x7E (93-126) */
    208. -
    209.             $result.=$char;
    210. -
    211.         }
    212. -
    213.         elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
    214. -
    215.             $result.="\\u".sprintf("%04X",$nr);
    216. -
    217.         }
    218. -
    219.         elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
    220. -
    221.             $result.="\\U".sprintf("%08X",$nr);
    222. -
    223.         }
    224. -
    225.         else{
    226. -
    227.             /* other chars are not defined => ignore */
    228. -
    229.         }
    230. -
    231.     }
    232. -
    233.     return $result;
    234. -
    235. }
    236. -
    237.  
    238. -
    239.  
    240. -
    241.  
    242. -
    243.  
    244. -
    245. /**
    246. -
    247.  * @access    private
    248. -
    249.  */  
    250. -
    251. function _new_element()
    252. -
    253. {
    254. -
    255.     $e['parent']=Array();  // Parent is a blank Array
    256. -
    257.     $e['state']=0;
    258. -
    259.     $e['has_property_atributes']=0;
    260. -
    261.     $e['has_member_attributes']=0;
    262. -
    263.     $e['subject_type']=0;
    264. -
    265.     $e['subject']='';
    266. -
    267.     $e['predicate']='';
    268. -
    269.     $e['ordinal']=0;
    270. -
    271.     $e['members']=0;
    272. -
    273.     $e['data']='';
    274. -
    275.     $e['xml_lang']='';
    276. -
    277.     $e['bag_id']='';
    278. -
    279.     $e['statements']=0;
    280. -
    281.     $e['statement_id']='';
    282. -
    283.     $e['datatype']='';
    284. -
    285.     $e['element_base_uri''';
    286. -
    287.    
    288. -
    289.     return $e;
    290. -
    291. }
    292. -
    293.  
    294. -
    295. /**
    296. -
    297.  
    298. -
    299.  * @param string $source 
    300. -
    301.  * @param string &$destination 
    302. -
    303.  *
    304. -
    305.  * @access    private
    306. -
    307.  */  
    308. -
    309. function _copy_element($source&$destination )
    310. -
    311. {
    312. -
    313.     if$source )
    314. -
    315.     {
    316. -
    317.         $destination['parent'$source;
    318. -
    319.         $destination['state'$source['state'];
    320. -
    321.         $destination['xml_lang'$source['xml_lang'];
    322. -
    323.         $destination['element_base_uri'$source['element_base_uri'];       
    324. -
    325.     }
    326. -
    327. }
    328. -
    329.  
    330. -
    331.   /**
    332. -
    333.    * @param string &$e 
    334. -
    335.    * @access    private
    336. -
    337.    */  
    338. -
    339. function _clear_element(&$e)
    340. -
    341. {
    342. -
    343.         $e['subject']='';
    344. -
    345.         $e['predicate']='';
    346. -
    347.         $e['data']='';
    348. -
    349.         $e['bag_id']='';
    350. -
    351.         $e['statement_id']='';
    352. -
    353.  
    354. -
    355.         if(isset($e['parent'])) {
    356. -
    357.           if$e['parent')
    358. -
    359.           {
    360. -
    361.               if$e['parent']['xml_lang'!= $e['xml_lang')
    362. -
    363.               {
    364. -
    365.                   $e['xml_lang']='';
    366. -
    367.               }
    368. -
    369.           }
    370. -
    371.           else
    372. -
    373.           {
    374. -
    375.               $e['xml_lang']='';
    376. -
    377.           }
    378. -
    379.         else {
    380. -
    381.             $e['xml_lang']='';
    382. -
    383.         }
    384. -
    385.  
    386. -
    387.         $e['parent']=Array();
    388. -
    389.         $e['state']=0;
    390. -
    391.         $e['has_property_attributes']=0;
    392. -
    393.         $e['has_member_attributes']=0;
    394. -
    395.         $e['subject_type']=0;
    396. -
    397.         $e['subject']='';
    398. -
    399.         $e['predicate']='';
    400. -
    401.         $e['ordinal']=0;
    402. -
    403.         $e['members']=0;
    404. -
    405.         $e['data']='';
    406. -
    407.         $e['xml_lang']='';
    408. -
    409.         $e['bag_id']='';
    410. -
    411.         $e['statements']=0;
    412. -
    413.         $e['statement_id']='';
    414. -
    415.         $e['datatype']='';
    416. -
    417.         $e['element_base_uri''';
    418. -
    419. }
    420. -
    421.  
    422. -
    423.   /**
    424. -
    425.    * @access    private
    426. -
    427.    */  
    428. -
    429. function _push_element()
    430. -
    431. {
    432. -
    433.     if(!isset($this->rdf_parser['free'])) {
    434. -
    435.         $this->rdf_parser['free']=Array();
    436. -
    437.     }
    438. -
    439.     if(count($this->rdf_parser['free'])>0)
    440. -
    441.     {
    442. -
    443.         $e $this->rdf_parser['free'];
    444. -
    445.         if(isset($e['parent'])) {
    446. -
    447.           $this->rdf_parser['free'$e['parent'];
    448. -
    449.         else {
    450. -
    451.           $this->rdf_parser['free']=$this->_new_element();
    452. -
    453.         }
    454. -
    455.     }
    456. -
    457.     else
    458. -
    459.     {
    460. -
    461.         $e $this->_new_element();
    462. -
    463.     }
    464. -
    465.     if(!isset($this->rdf_parser['top'])) {
    466. -
    467.       $this->rdf_parser['top']=Array();
    468. -
    469.     }
    470. -
    471.     $this->_copy_element$this->rdf_parser['top']$e );
    472. -
    473.     $this->rdf_parser['top'$e;
    474. -
    475. }
    476. -
    477.  
    478. -
    479.   /**
    480. -
    481.    * @access    private
    482. -
    483.    */  
    484. -
    485. function _pop_element()
    486. -
    487. {
    488. -
    489.     $e $this->rdf_parser['top'];
    490. -
    491.     $this->rdf_parser['top'$e['parent'];
    492. -
    493.     $this->_clear_element$e );
    494. -
    495.     $this->rdf_parser['free'$e;
    496. -
    497. }
    498. -
    499.  
    500. -
    501.   /**
    502. -
    503.    * @param string $local_name 
    504. -
    505.    * @access    private
    506. -
    507.    */  
    508. -
    509. function _is_rdf_property_attribute_resource($local_name )
    510. -
    511. {
    512. -
    513.     return $local_name == RDF_TYPE );    
    514. -
    515. }
    516. -
    517.  
    518. -
    519.   /**
    520. -
    521.    * @param string $local_name 
    522. -
    523.    * @access    private
    524. -
    525.    */  
    526. -
    527. function _is_rdf_property_attribute_literal($local_name )
    528. -
    529. {
    530. -
    531.     return $local_name == RDF_VALUE )           
    532. -
    533.         || $local_name == RDF_BAG )
    534. -
    535.         || $local_name == RDF_SEQ )
    536. -
    537.         || $local_name == RDF_ALT )
    538. -
    539.         || $local_name == RDF_STATEMENT )
    540. -
    541.         || $local_name == RDF_PROPERTY )
    542. -
    543.         || $local_name == RDF_LIST );      
    544. -
    545. }
    546. -
    547.  
    548. -
    549.   /**
    550. -
    551.    * @param string $local_name 
    552. -
    553.    * @access    private
    554. -
    555.    */  
    556. -
    557. function _is_rdf_ordinal$local_name )
    558. -
    559. {
    560. -
    561.     $ordinal = -1;
    562. -
    563.  
    564. -
    565.     if$local_name{0==  '_'  )
    566. -
    567.     {
    568. -
    569.         $ordinal =  substr($local_name,1;
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     return $ordinal $ordinal 0;
    576. -
    577. }
    578. -
    579.  
    580. -
    581.   /**
    582. -
    583.    * @param string $local_name 
    584. -
    585.    * @access    private
    586. -
    587.    */  
    588. -
    589. function _is_rdf_property_attribute$local_name )
    590. -
    591. {
    592. -
    593.     return $this->_is_rdf_property_attribute_resource$local_name )
    594. -
    595.         || $this->_is_rdf_property_attribute_literal$local_name );
    596. -
    597. }
    598. -
    599.  
    600. -
    601. -
    602. {
    603. -
    604.     return $local_name == RDF_RDF )
    605. -
    606.         || $local_name == RDF_DESCRIPTION)
    607. -
    608.         || $local_name == RDF_ID)                 
    609. -
    610.         || $local_name == RDF_ABOUT )
    611. -
    612.         || $local_name == RDF_BAG_ID )
    613. -
    614.         || $local_name == RDF_PARSE_TYPE )
    615. -
    616.         || $local_name == RDF_RESOURCE )        
    617. -
    618.         || $local_name == RDF_NODEID )
    619. -
    620.         || $local_name == RDF_LI )
    621. -
    622.         || $local_name == RDF_ABOUT_EACH )
    623. -
    624.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    625. -
    626.         || $local_name == RDF_DATATYPE );
    627. -
    628. }
    629. -
    630.  
    631. -
    632.   /**
    633. -
    634.    * @param string $local_name 
    635. -
    636.    * @access    private
    637. -
    638.    */  
    639. -
    640. function _is_rdf_property_element$local_name )
    641. -
    642. {
    643. -
    644.     return (  $local_name == RDF_TYPE )
    645. -
    646.         || (  $local_name == RDF_SUBJECT )
    647. -
    648.         || (  $local_name == RDF_PREDICATE )
    649. -
    650.         || (  $local_name == RDF_OBJECT )
    651. -
    652.         || (  $local_name == RDF_VALUE )
    653. -
    654.         || (  $local_name == RDF_LI )
    655. -
    656.         || (  $local_name == RDF_SEEALSO )             
    657. -
    658.         || $local_name == RDF_BAG )
    659. -
    660.         || $local_name == RDF_SEQ )
    661. -
    662.         || $local_name == RDF_ALT )
    663. -
    664.         || $local_name == RDF_STATEMENT )
    665. -
    666.         || $local_name == RDF_PROPERTY )
    667. -
    668.         || $local_name == RDF_LIST )
    669. -
    670.         || $local_name == RDF_FIRST )        
    671. -
    672.         || $local_name == RDF_REST )
    673. -
    674.         || (  $local_name{0== '_'  );
    675. -
    676. }
    677. -
    678.  
    679. -
    680.   /**
    681. -
    682.    * @param string $local_name 
    683. -
    684.    * @access    private
    685. -
    686.    */  
    687. -
    688. function _is_forbidden_rdf_property_element ($local_name)
    689. -
    690. {
    691. -
    692.     return $local_name == RDF_RDF )
    693. -
    694.         || $local_name == RDF_DESCRIPTION)
    695. -
    696.         || $local_name == RDF_ID)                 
    697. -
    698.         || $local_name == RDF_ABOUT )
    699. -
    700.         || $local_name == RDF_BAG_ID )
    701. -
    702.         || $local_name == RDF_PARSE_TYPE )
    703. -
    704.         || $local_name == RDF_RESOURCE )        
    705. -
    706.         || $local_name == RDF_NODEID )
    707. -
    708.         || $local_name == RDF_ABOUT_EACH )
    709. -
    710.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    711. -
    712.         || $local_name == RDF_DATATYPE );
    713. -
    714. }
    715. -
    716.                 
    717. -
    718.  
    719. -
    720.   /**
    721. -
    722.    * @param string $local_name 
    723. -
    724.    * @access    private
    725. -
    726.    */  
    727. -
    728. function _is_rdf_node_element$local_name )
    729. -
    730. {
    731. -
    732.     return $local_name == RDF_DESCRIPTION )                 
    733. -
    734.         || $local_name == RDF_STATEMENT )
    735. -
    736.         || $local_name == RDF_SUBJECT )
    737. -
    738.         || $local_name == RDF_PREDICATE )
    739. -
    740.         || $local_name == RDF_OBJECT )        
    741. -
    742.         || $local_name == RDF_PROPERTY )
    743. -
    744.         || $local_name == RDF_TYPE )
    745. -
    746.         || $local_name == RDF_VALUE )
    747. -
    748.         || $local_name == RDF_BAG )
    749. -
    750.         || $local_name == RDF_SEQ )
    751. -
    752.         || $local_name == RDF_ALT )        
    753. -
    754.         || $local_name == RDF_SEEALSO )        
    755. -
    756.         || $local_name == RDF_LIST )
    757. -
    758.         || $local_name == RDF_FIRST )        
    759. -
    760.         || $local_name == RDF_REST )        
    761. -
    762.         || $local_name == RDF_NIL )                
    763. -
    764.         || $local_name{0== '_'  );
    765. -
    766. }
    767. -
    768.  
    769. -
    770.   /**
    771. -
    772.    * @param string $local_name 
    773. -
    774.    * @access    private
    775. -
    776.    */  
    777. -
    778. function _is_forbidden_rdf_node_element ($local_name)
    779. -
    780. {
    781. -
    782.     return $local_name == RDF_RDF )
    783. -
    784.         || $local_name == RDF_ID)                 
    785. -
    786.         || $local_name == RDF_ABOUT )
    787. -
    788.         || $local_name == RDF_BAG_ID )
    789. -
    790.         || $local_name == RDF_PARSE_TYPE )
    791. -
    792.         || $local_name == RDF_RESOURCE )        
    793. -
    794.         || $local_name == RDF_NODEID )
    795. -
    796.         || $local_name == RDF_LI )
    797. -
    798.         || $local_name == RDF_ABOUT_EACH )
    799. -
    800.         || $local_name == RDF_ABOUT_EACH_PREFIX )
    801. -
    802.         || $local_name == RDF_DATATYPE );
    803. -
    804. }
    805. -
    806.  
    807. -
    808.   /**
    809. -
    810.    * @param string $val 
    811. -
    812.    * @access    private
    813. -
    814.    */  
    815. -
    816. function _istalnum($val{
    817. -
    818.   return ereg("[A-Za-z0-9]",$val);
    819. -
    820. }
    821. -
    822.   /**
    823. -
    824.    * @param string $val 
    825. -
    826.    * @access    private
    827. -
    828.    */  
    829. -
    830. function _istalpha($val{
    831. -
    832.   return ereg("[A-Za-z]",$val);
    833. -
    834. }
    835. -
    836.  
    837. -
    838.   /**
    839. -
    840.    * @param string $uri 
    841. -
    842.    * @access    private
    843. -
    844.    */  
    845. -
    846. function _is_absolute_uri($uri )
    847. -
    848. {
    849. -
    850.     $result false;
    851. -
    852.         $uri_p=0;
    853. -
    854.     if$uri && $this->_istalpha$uri{$uri_p) )
    855. -
    856.     {
    857. -
    858.         ++$uri_p;
    859. -
    860.  
    861. -
    862.         while( ($uri_p<strlen($uri))
    863. -
    864.             && $this->_istalnum$uri{$uri_p)
    865. -
    866.                 || $uri{$uri_p==  '+'  )
    867. -
    868.                 || $uri{$uri_p== '-'  )
    869. -
    870.                 || $uri{$uri_p==  '.'  ) ) )
    871. -
    872.         {
    873. -
    874.                 ++$uri_p;
    875. -
    876.         }
    877. -
    878.  
    879. -
    880.         $result $uri{$uri_p== ':'  );
    881. -
    882.     }
    883. -
    884.     return $result;
    885. -
    886. }
    887. -
    888.  
    889. -
    890.  
    891. -
    892. /*
    893. -
    894.    * This function returns an associative array returning any of the various components of the URL that are present. This includes the
    895. -
    896.    * $arr=parse_url($url)
    897. -
    898.    * scheme - e.g. http
    899. -
    900.    * host
    901. -
    902.    * port
    903. -
    904.    * user
    905. -
    906.    * pass
    907. -
    908.    * path
    909. -
    910.    * query - after the question mark ?
    911. -
    912.    * fragment - after the hashmark #
    913. -
    914.    *
    915. -
    916.    * @param string $uri
    917. -
    918.    * @param string $buffer
    919. -
    920.    * @param string &$scheme
    921. -
    922.    * @param string &$authority
    923. -
    924.    * @param string &$path
    925. -
    926.    * @param string &$query
    927. -
    928.    * @param string &$fragment
    929. -
    930.    * @access    private 
    931. -
    932. */  
    933. -
    934. function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment {
    935. -
    936.     
    937. -
    938.   $parsed=parse_url($uri);
    939. -
    940.   if(isset($parsed['scheme'])) {
    941. -
    942.     $scheme=$parsed['scheme'];
    943. -
    944.   else {
    945. -
    946.     $scheme='';
    947. -
    948.   }
    949. -
    950.   if(isset($parsed['host'])) {
    951. -
    952.     $host=$parsed['host'];
    953. -
    954.   else {
    955. -
    956.     $host='';
    957. -
    958.   }
    959. -
    960.   if(isset($parsed['host'])) {
    961. -
    962.     $authority=$parsed['host'];
    963. -
    964.   else {
    965. -
    966.     $authority='';
    967. -
    968.   }
    969. -
    970.   if(isset($parsed['path'])) {
    971. -
    972.     $path=$parsed['path'];
    973. -
    974.   else {
    975. -
    976.     $path='';
    977. -
    978.   }
    979. -
    980.   if(isset($parsed['query'])) {
    981. -
    982.     $query=$parsed['query'];
    983. -
    984.   else {
    985. -
    986.     $query='';
    987. -
    988.   }
    989. -
    990.   if(isset($parsed['fragment'])) {
    991. -
    992.     $fragment=$parsed['fragment'];
    993. -
    994.   else {
    995. -
    996.     $fragment='';
    997. -
    998.   }
    999. -
    1000.  
    1001. -
    1002. }
    1003. -
    1004.  
    1005. -
    1006. /**
    1007. -
    1008.    * @param string $base_uri 
    1009. -
    1010.    * @param string $reference_uri 
    1011. -
    1012.    * @param string &$buffer 
    1013. -
    1014.    * @access    private
    1015. -
    1016. */ 
    1017. -
    1018. function _resolve_uri_reference($base_uri,$reference_uri,&$buffer )
    1019. -
    1020. {
    1021. -
    1022.     if ($reference_uri == '')
    1023. -
    1024.         return ($buffer preg_replace("/\#[^\/\\\]*$/"''$base_uri));
    1025. -
    1026.             
    1027. -
    1028.     $base_buffer='';
    1029. -
    1030.     $reference_buffer='';
    1031. -
    1032.     $path_buffer='';
    1033. -
    1034.  
    1035. -
    1036.     $buffer '';
    1037. -
    1038.  
    1039. -
    1040.     $this->_parse_uri($reference_uri,
    1041. -
    1042.                       $reference_buffer,
    1043. -
    1044.                       $reference_scheme,
    1045. -
    1046.                       $reference_authority,
    1047. -
    1048.                       $reference_path,
    1049. -
    1050.                       $reference_query,
    1051. -
    1052.                       $reference_fragment );
    1053. -
    1054.                
    1055. -
    1056.     $this->_parse_uri($base_uri,
    1057. -
    1058.                       $base_buffer,
    1059. -
    1060.                       $base_scheme,
    1061. -
    1062.                       $base_authority,
    1063. -
    1064.                       $base_path,
    1065. -
    1066.                       $base_query,
    1067. -
    1068.                       $base_fragment );     
    1069. -
    1070.         
    1071. -
    1072.     if$reference_scheme == ''
    1073. -
    1074.         && $reference_authority == ''
    1075. -
    1076.         && $reference_path == ''
    1077. -
    1078.         && $reference_query == '' )
    1079. -
    1080.     {
    1081. -
    1082.         $buffer=$base_uri;
    1083. -
    1084.  
    1085. -
    1086.         if$reference_fragment != '' )        
    1087. -
    1088.         {
    1089. -
    1090.             if ($base_path == '' || $base_path == '/' || $base_path == "\\"{
    1091. -
    1092.                $buffer $this->rdf_parser['document_base_uri'];    
    1093. -
    1094.             }
    1095. -
    1096.             else 
    1097. -
    1098.             {
    1099. -
    1100.                 $buffer preg_replace("/\#[^\/\\\]*$/"''$base_uri);
    1101. -
    1102.             }
    1103. -
    1104.            
    1105. -
    1106.             // CB: Changed for base URI
    1107. -
    1108.             $c substr($bufferstrlen($buffer)-,1);
    1109. -
    1110.             if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    1111. -
    1112.                    $buffer.= '#' ;
    1113. -
    1114.             $buffer.=$reference_fragment;               
    1115. -
    1116.             
    1117. -
    1118.         }
    1119. -
    1120.     }
    1121. -
    1122.     else if$reference_scheme != '' )
    1123. -
    1124.     {
    1125. -
    1126.         $buffer=$reference_uri;
    1127. -
    1128.     }
    1129. -
    1130.     else
    1131. -
    1132.     {                    
    1133. -
    1134.         $result_scheme $base_scheme;
    1135. -
    1136.         $result_path '';
    1137. -
    1138.         
    1139. -
    1140.         if$reference_authority != '' )
    1141. -
    1142.         {
    1143. -
    1144.             $result_authority $reference_authority;            
    1145. -
    1146.         }
    1147. -
    1148.         else
    1149. -
    1150.         {
    1151. -
    1152.             $result_authority $base_authority;
    1153. -
    1154.            
    1155. -
    1156.             if ($reference_path != '')
    1157. -
    1158.             {
    1159. -
    1160.                 if ($reference_path{0== '/' || $reference_path{0== "\\")
    1161. -
    1162.                 {
    1163. -
    1164.                     if ($reference_path{1== '/' || $reference_path{1== "\\")
    1165. -
    1166.                     {
    1167. -
    1168.                         $result_authority '';
    1169. -
    1170.                         $result_path $reference_path;    
    1171. -
    1172.                     }
    1173. -
    1174.                     else
    1175. -
    1176.                         $result_path $reference_path;
    1177. -
    1178.                 }
    1179. -
    1180.                 elseif (substr($reference_path03== '../' ||
    1181. -
    1182.                         substr($reference_path03== '..\\')
    1183. -
    1184.                 {
    1185. -
    1186.                     $slash $reference_path{2};                        
    1187. -
    1188.                     while($base_path != '' && substr($reference_path03== '../' 
    1189. -
    1190.                                              || substr($reference_path03== '..\\'))
    1191. -
    1192.                     {                        
    1193. -
    1194.                           $base_path preg_replace("/((\/)|(\\\))[^\/\\\]*$/"''$base_path);                                                    
    1195. -
    1196.                           if ($base_path != ''{
    1197. -
    1198.                              $base_path preg_replace("/((\/)|(\\\))[^\/\\\]*$/"''$base_path);                                                       
    1199. -
    1200.                              $reference_path substr($reference_path3);
    1201. -
    1202.                           }
    1203. -
    1204.                     }
    1205. -
    1206.                            
    1207. -
    1208.                     $result_path $base_path .$slash .$reference_path;
    1209. -
    1210.                 }
    1211. -
    1212.                 else 
    1213. -
    1214.                 {   
    1215. -
    1216.                     if ($base_path)
    1217. -
    1218.                         $result_path preg_replace("/[^\/\\\]*$/"$reference_path$base_path1);
    1219. -
    1220.                     else 
    1221. -
    1222.                         $result_path '/' .$reference_path;                        
    1223. -
    1224.                 
    1225. -
    1226.             }
    1227. -
    1228.             
    1229. -
    1230.         }
    1231. -
    1232.                                                 
    1233. -
    1234.         if$result_scheme != '' )
    1235. -
    1236.         {
    1237. -
    1238.             $buffer=$result_scheme;
    1239. -
    1240.             $buffer.=':';
    1241. -
    1242.         }
    1243. -
    1244.  
    1245. -
    1246.         if$result_authority != '' )
    1247. -
    1248.         {
    1249. -
    1250.             $buffer.="//";
    1251. -
    1252.             $buffer.=$result_authority;
    1253. -
    1254.         }
    1255. -
    1256.  
    1257. -
    1258.         if$result_path != '' )
    1259. -
    1260.         {
    1261. -
    1262.             $buffer.=$result_path;
    1263. -
    1264.         }
    1265. -
    1266.  
    1267. -
    1268.         if$reference_query != '' )
    1269. -
    1270.         {
    1271. -
    1272.             $buffer.='?';
    1273. -
    1274.             $buffer.=$reference_query;
    1275. -
    1276.         }
    1277. -
    1278.  
    1279. -
    1280.         if$reference_fragment != '' )
    1281. -
    1282.         {
    1283. -
    1284.             $buffer.='#';
    1285. -
    1286.             $buffer.=$reference_fragment;
    1287. -
    1288.         }
    1289. -
    1290.     }  
    1291. -
    1292. }
    1293. -
    1294.  
    1295. -
    1296.  
    1297. -
    1298. /**
    1299. -
    1300.    * IDs which contain CombiningChars or Extenders
    1301. -
    1302.    * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid.
    1303. -
    1304.    * If you want to use IDs containing these characters you can turn off
    1305. -
    1306.    * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php).
    1307. -
    1308.    *
    1309. -
    1310.    * @param string $id 
    1311. -
    1312.    * @access    private
    1313. -
    1314. */ 
    1315. -
    1316. function is_valid_id($id )
    1317. -
    1318. {
    1319. -
    1320.     if (!VALIDATE_IDS)
    1321. -
    1322.         return TRUE;
    1323. -
    1324.     
    1325. -
    1326.     $result FALSE;
    1327. -
    1328.     
    1329. -
    1330.     if$id )
    1331. -
    1332.     {
    1333. -
    1334.         if$this->_istalpha($id{0}|| $id{0== '_')
    1335. -
    1336.         {
    1337. -
    1338.             $result TRUE;
    1339. -
    1340.             $i=0;
    1341. -
    1342.             $len strlen($id);
    1343. -
    1344.             while$result != FALSE && ++$i $len )
    1345. -
    1346.             {
    1347. -
    1348.                 if!($this->_istalnum$id{$i})
    1349. -
    1350.                       || $id{$i== '.'
    1351. -
    1352.                       || $id{$i== '-'
    1353. -
    1354.                       || $id{$i== '_'))
    1355. -
    1356.                 {
    1357. -
    1358.                    $result FALSE
    1359. -
    1360.                 }
    1361. -
    1362.             }
    1363. -
    1364.         }
    1365. -
    1366.     }
    1367. -
    1368.     
    1369. -
    1370.     if (!$result)
    1371. -
    1372.         $this->_report_error('illegal ID, nodeID or bagID attribute value');
    1373. -
    1374.     else    
    1375. -
    1376.         return TRUE;
    1377. -
    1378. }
    1379. -
    1380.  
    1381. -
    1382. /**
    1383. -
    1384.    * @param string $id 
    1385. -
    1386.    * @param string &$buffer 
    1387. -
    1388.    * @access    private
    1389. -
    1390. */ 
    1391. -
    1392. function _resolve_id($id,&$buffer )
    1393. -
    1394. {
    1395. -
    1396.     $id_buffer='';
    1397. -
    1398.  
    1399. -
    1400.     if$this->is_valid_id($id) )
    1401. -
    1402.     {
    1403. -
    1404.         $id_buffer="#$id";
    1405. -
    1406.     }
    1407. -
    1408.  
    1409. -
    1410.     $this->_resolve_uri_reference$this->rdf_get_base()$id_buffer$buffer );
    1411. -
    1412.        
    1413. -
    1414. }
    1415. -
    1416.  
    1417. -
    1418. /**
    1419. -
    1420.    * @param string $name 
    1421. -
    1422.    * @param string &$buffer 
    1423. -
    1424.    * @param string &$namespace_uri 
    1425. -
    1426.    * @param string &$local_name 
    1427. -
    1428.    * @access    private
    1429. -
    1430. */ 
    1431. -
    1432. function _split_name($name&$buffer&$namespace_uri&$local_name )
    1433. -
    1434. {
    1435. -
    1436.     static $nul 0;
    1437. -
    1438.     $buffer=$name;
    1439. -
    1440.  
    1441. -
    1442.         if(  strstr$bufferNAMESPACE_SEPARATOR_CHAR ) )
    1443. -
    1444.         {
    1445. -
    1446.             $cosas=explode(NAMESPACE_SEPARATOR_CHAR,$buffer);
    1447. -
    1448.             $namespace_uri $cosas[0];
    1449. -
    1450.             $local_name $cosas[1];
    1451. -
    1452.         }
    1453. -
    1454.         else
    1455. -
    1456.         {
    1457. -
    1458.             if( ( $buffer==  'x'  )
    1459. -
    1460.                 && $buffer==  'm'  )
    1461. -
    1462.                 && $buffer==  'l'  )
    1463. -
    1464.                 && $buffer==  ':'  ) )
    1465. -
    1466.             {
    1467. -
    1468.                 $namespace_uri XML_NAMESPACE_URI;
    1469. -
    1470.                 $local_name substr($buffer,4);
    1471. -
    1472.             }
    1473. -
    1474.             else
    1475. -
    1476.             {
    1477. -
    1478.                 $namespace_uri '';
    1479. -
    1480.                 $local_name $buffer;
    1481. -
    1482.             }
    1483. -
    1484.         }
    1485. -
    1486. }
    1487. -
    1488. /**
    1489. -
    1490.    * @param string &$buf 
    1491. -
    1492.    * @access    private
    1493. -
    1494. */ 
    1495. -
    1496. function _generate_anonymous_uri(&$buf )
    1497. -
    1498. {
    1499. -
    1500.     $id='';
    1501. -
    1502.     if(!isset($this->rdf_parser['anonymous_id'])) {
    1503. -
    1504.       $this->rdf_parser['anonymous_id']=0;
    1505. -
    1506.     }
    1507. -
    1508.     $this->rdf_parser['anonymous_id']++;
    1509. -
    1510.  
    1511. -
    1512.     $bufBNODE_PREFIX $this->rdf_parser['anonymous_id'];
    1513. -
    1514.  
    1515. -
    1516. }
    1517. -
    1518. /**
    1519. -
    1520.    * @param string $subject_type 
    1521. -
    1522.    * @param string $subject 
    1523. -
    1524.    * @param string $predicate 
    1525. -
    1526.    * @param string $ordinal 
    1527. -
    1528.    * @param string $object_type 
    1529. -
    1530.    * @param string $object 
    1531. -
    1532.    * @param string $xml_lang 
    1533. -
    1534.    * @param string $bag_id 
    1535. -
    1536.    * @param string $statements 
    1537. -
    1538.    * @param string $statement_id 
    1539. -
    1540.    * @access    private
    1541. -
    1542. */ 
    1543. -
    1544. function _report_statement$subject_type$subject$predicate$ordinal$object_type,  $object$xml_lang$bag_id$statements$statement_id$datatype )
    1545. -
    1546. {
    1547. -
    1548.     $statement_id_type RDF_SUBJECT_TYPE_URI;
    1549. -
    1550.     $statement_id_buffer='';
    1551. -
    1552.     $predicate_buffer='';
    1553. -
    1554.     if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang']))
    1555. -
    1556.         $xml_lang $this->rdf_parser['document_xml_lang'];
    1557. -
    1558.     
    1559. -
    1560.      // call add statement
    1561. -
    1562.      $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang$datatype );
    1563. -
    1564.  
    1565. -
    1566.         if$bag_id )
    1567. -
    1568.         {
    1569. -
    1570.             if$statements == '' )
    1571. -
    1572.             {
    1573. -
    1574.                 $this->_report_statement(RDF_SUBJECT_TYPE_URI,
    1575. -
    1576.                     $bag_id,
    1577. -
    1578.                     RDF_NAMESPACE_URI.RDF_TYPE,
    1579. -
    1580.                     0,
    1581. -
    1582.                     RDF_OBJECT_TYPE_RESOURCE,
    1583. -
    1584.                     RDF_NAMESPACE_URI.RDF_BAG,
    1585. -
    1586.                     '',
    1587. -
    1588.                     '',
    1589. -
    1590.                     '',
    1591. -
    1592.                     '',
    1593. -
    1594.                     $datatype );
    1595. -
    1596.             }
    1597. -
    1598.  
    1599. -
    1600.             if$statement_id )
    1601. -
    1602.             {
    1603. -
    1604.                 $statement_id_type RDF_SUBJECT_TYPE_BNODE;
    1605. -
    1606.                 $this->_generate_anonymous_uri$statement_id_buffer );
    1607. -
    1608.                 $statement_id $statement_id_buffer;
    1609. -
    1610.             }
    1611. -
    1612.             $statements++;
    1613. -
    1614.             $predicate_buffer='RDF_NAMESPACE_URI_'.$statements;
    1615. -
    1616.  
    1617. -
    1618.             $this->_report_statement(
    1619. -
    1620.                 RDF_SUBJECT_TYPE_URI,
    1621. -
    1622.                 $bag_id,
    1623. -
    1624.                 $predicate_buffer,
    1625. -
    1626.                 $statements,
    1627. -
    1628.                 RDF_OBJECT_TYPE_BNODE,
    1629. -
    1630.                 $statement_id,
    1631. -
    1632.                 '',
    1633. -
    1634.                 '',
    1635. -
    1636.                 '',
    1637. -
    1638.                 '',
    1639. -
    1640.                 $datatype );
    1641. -
    1642.         }
    1643. -
    1644.  
    1645. -
    1646.         if$statement_id )
    1647. -
    1648.         {
    1649. -
    1650.             // rdf:type = rdf:Statement
    1651. -
    1652.             $this->_report_statement(
    1653. -
    1654.                 $statement_id_type,
    1655. -
    1656.                 $statement_id,
    1657. -
    1658.                 RDF_NAMESPACE_URI.RDF_TYPE,
    1659. -
    1660.                 0,
    1661. -
    1662.                 RDF_OBJECT_TYPE_RESOURCE,
    1663. -
    1664.                 RDF_NAMESPACE_URI.RDF_STATEMENT,
    1665. -
    1666.                 '',
    1667. -
    1668.                 '',
    1669. -
    1670.                 '',
    1671. -
    1672.                 '',
    1673. -
    1674.                 $datatype );
    1675. -
    1676.         
    1677. -
    1678.             if ($subject_type == RDF_SUBJECT_TYPE_BNODE)
    1679. -
    1680.                $obj_type RDF_OBJECT_TYPE_BNODE;
    1681. -
    1682.             else 
    1683. -
    1684.                $obj_type RDF_OBJECT_TYPE_RESOURCE;                              
    1685. -
    1686.                 
    1687. -
    1688.                 
    1689. -
    1690.             // rdf:subject
    1691. -
    1692.             $this->_report_statement(
    1693. -
    1694.                 $statement_id_type,
    1695. -
    1696.                 $statement_id,
    1697. -
    1698.                 RDF_NAMESPACE_URI.RDF_SUBJECT,
    1699. -
    1700.                 0,               
    1701. -
    1702.                 $obj_type,                              
    1703. -
    1704.                 $subject,
    1705. -
    1706.                 '',
    1707. -
    1708.                 '',
    1709. -
    1710.                 '',
    1711. -
    1712.                 '',
    1713. -
    1714.                 $datatype );
    1715. -
    1716.  
    1717. -
    1718.             // rdf:predicate
    1719. -
    1720.             $this->_report_statement(
    1721. -
    1722.                 $statement_id_type,
    1723. -
    1724.                 $statement_id,
    1725. -
    1726.                 RDF_NAMESPACE_URI.RDF_PREDICATE,
    1727. -
    1728.                 0,
    1729. -
    1730.                 RDF_OBJECT_TYPE_RESOURCE,
    1731. -
    1732.                 $predicate,
    1733. -
    1734.                 '',
    1735. -
    1736.                 '',
    1737. -
    1738.                 '',
    1739. -
    1740.                 '',
    1741. -
    1742.                 $datatype );
    1743. -
    1744.  
    1745. -
    1746.             // rdf:object
    1747. -
    1748.             $this->_report_statement(
    1749. -
    1750.                 $statement_id_type,
    1751. -
    1752.                 $statement_id,
    1753. -
    1754.                 RDF_NAMESPACE_URI.RDF_OBJECT,
    1755. -
    1756.                 0,
    1757. -
    1758.                 $object_type,
    1759. -
    1760.                 $object,
    1761. -
    1762.                 '',
    1763. -
    1764.                 '',
    1765. -
    1766.                 '',
    1767. -
    1768.                 '',
    1769. -
    1770.                 $datatype );
    1771. -
    1772.         }
    1773. -
    1774. }
    1775. -
    1776. /**
    1777. -
    1778.    * @param string $subject_type 
    1779. -
    1780.    * @param string $subject 
    1781. -
    1782.    * @param string $attributes 
    1783. -
    1784.    * @param string $xml_lang 
    1785. -
    1786.    * @param string $bag_id 
    1787. -
    1788.    * @param string $statements 
    1789. -
    1790.  * @access    private
    1791. -
    1792. */ 
    1793. -
    1794. function _handle_property_attributes($subject_type$subject$attributes$xml_lang$bag_id$statements )
    1795. -
    1796. {
    1797. -
    1798.     $i=0;
    1799. -
    1800.  
    1801. -
    1802.     $attribute='';
    1803. -
    1804.     $predicate='';
    1805. -
    1806.  
    1807. -
    1808.     $attribute_namespace_uri='';
    1809. -
    1810.     $attribute_local_name='';
    1811. -
    1812.     $attribute_value='';
    1813. -
    1814.  
    1815. -
    1816.     $ordinal=0;
    1817. -
    1818.  
    1819. -
    1820.     for$i 0isset($attributes$i ])$i += )
    1821. -
    1822.     {
    1823. -
    1824.         $this->_split_name(
    1825. -
    1826.             $attributes$i ],
    1827. -
    1828.             $attribute,
    1829. -
    1830.             $attribute_namespace_uri,
    1831. -
    1832.             $attribute_local_name );
    1833. -
    1834.  
    1835. -
    1836.         $attribute_value $attributes$i ];
    1837. -
    1838.  
    1839. -
    1840.         $predicate=$attribute_namespace_uri;
    1841. -
    1842.         $predicate.=$attribute_local_name;
    1843. -
    1844.  
    1845. -
    1846.         ifRDF_NAMESPACE_URI == $attribute_namespace_uri )
    1847. -
    1848.         {
    1849. -
    1850.             if$this->_is_rdf_property_attribute_literal$attribute_local_name ) )
    1851. -
    1852.             {
    1853. -
    1854.                 $this->_report_statement(
    1855. -
    1856.                     $subject_type,
    1857. -
    1858.                     $subject,
    1859. -
    1860.                     $predicate,
    1861. -
    1862.                     0,
    1863. -
    1864.                     RDF_OBJECT_TYPE_LITERAL,
    1865. -
    1866.                     $attribute_value,
    1867. -
    1868.                     $xml_lang,
    1869. -
    1870.                     $bag_id,
    1871. -
    1872.                     $statements,
    1873. -
    1874.                     '',
    1875. -
    1876.                     '');
    1877. -
    1878.             }
    1879. -
    1880.             else if$this->_is_rdf_property_attribute_resource$attribute_local_name ) )
    1881. -
    1882.             {
    1883. -
    1884.                 $this->_report_statement(
    1885. -
    1886.                     $subject_type,
    1887. -
    1888.                     $subject,
    1889. -
    1890.                     $predicate,
    1891. -
    1892.                     0,
    1893. -
    1894.                     RDF_OBJECT_TYPE_RESOURCE,
    1895. -
    1896.                     $attribute_value,
    1897. -
    1898.                     '',
    1899. -
    1900.                     $bag_id,
    1901. -
    1902.                     $statements,
    1903. -
    1904.                     '',
    1905. -
    1906.                     '');
    1907. -
    1908.             }
    1909. -
    1910.             else if( ( $ordinal $this->_is_rdf_ordinal$attribute_local_name ) ) != )
    1911. -
    1912.             {
    1913. -
    1914.                 $this->_report_statement(
    1915. -
    1916.                     $subject_type,
    1917. -
    1918.                     $subject,
    1919. -
    1920.                     $predicate,
    1921. -
    1922.                     $ordinal,
    1923. -
    1924.                     RDF_OBJECT_TYPE_LITERAL,
    1925. -
    1926.                     $attribute_value,
    1927. -
    1928.                     $xml_lang,
    1929. -
    1930.                     $bag_id,
    1931. -
    1932.                     $statements,
    1933. -
    1934.                     '',
    1935. -
    1936.                     '' );
    1937. -
    1938.             }
    1939. -
    1940.             else if (   ($attribute_local_name != RDF_ABOUT)
    1941. -
    1942.                      && ($attribute_local_name != RDF_RDF)
    1943. -
    1944.                      && ($attribute_local_name != RDF_DESCRIPTION)
    1945. -
    1946.                      && ($attribute_local_name != RDF_ID)
    1947. -
    1948.                      && ($attribute_local_name != RDF_ABOUT_EACH)
    1949. -
    1950.                      && ($attribute_local_name != RDF_ABOUT_EACH_PREFIX)
    1951. -
    1952.                      && ($attribute_local_name != RDF_BAG_ID)
    1953. -
    1954.                      && ($attribute_local_name != RDF_RESOURCE)
    1955. -
    1956.                      && ($attribute_local_name != RDF_PARSE_TYPE)
    1957. -
    1958.                      && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL)   
    1959. -
    1960.                      && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE)
    1961. -
    1962.                      && ($attribute_local_name != RDF_LI)
    1963. -
    1964.                      && ($attribute_local_name != RDF_SUBJECT)
    1965. -
    1966.                      && ($attribute_local_name != RDF_PREDICATE)
    1967. -
    1968.                      && ($attribute_local_name != RDF_OBJECT)
    1969. -
    1970.                      && ($attribute_local_name != RDF_NODEID)
    1971. -
    1972.                      && ($attribute_local_name != RDF_DATATYPE)
    1973. -
    1974.                      && ($attribute_local_name != RDF_SEEALSO)
    1975. -
    1976.                      && ($attribute_local_name != RDF_NIL)
    1977. -
    1978.                      && ($attribute_local_name != RDF_REST)
    1979. -
    1980.                      && ($attribute_local_name != RDF_FIRST)
    1981. -
    1982.                     
    1983. -
    1984.             {
    1985. -
    1986.                 $this->_report_statement(
    1987. -
    1988.                     $subject_type,
    1989. -
    1990.                     $subject,
    1991. -
    1992.                     $predicate,
    1993. -
    1994.                     0,
    1995. -
    1996.                     RDF_OBJECT_TYPE_LITERAL,
    1997. -
    1998.                     $attribute_value,
    1999. -
    2000.                     $xml_lang,
    2001. -
    2002.                     $bag_id,
    2003. -
    2004.                     $statements,
    2005. -
    2006.                     '',
    2007. -
    2008.                     '' );
    2009. -
    2010.             }         
    2011. -
    2012.         }
    2013. -
    2014.         else ifXML_NAMESPACE_URI == $attribute_namespace_uri )
    2015. -
    2016.         {
    2017. -
    2018.             if ($attribute_local_name == 'base')
    2019. -
    2020.             {
    2021. -
    2022.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2023. -
    2024.             }              
    2025. -
    2026.         }
    2027. -
    2028.         else if$attribute_namespace_uri )
    2029. -
    2030.         {
    2031. -
    2032.             // is it required that property attributes be in an explicit namespace?
    2033. -
    2034.  
    2035. -
    2036.             $this->_report_statement(
    2037. -
    2038.                 $subject_type,
    2039. -
    2040.                 $subject,
    2041. -
    2042.                 $predicate,
    2043. -
    2044.                 0,
    2045. -
    2046.                 RDF_OBJECT_TYPE_LITERAL,
    2047. -
    2048.                 $attribute_value,
    2049. -
    2050.                 $xml_lang,
    2051. -
    2052.                 $bag_id,
    2053. -
    2054.                 $statements,
    2055. -
    2056.                 '',
    2057. -
    2058.                 '' );
    2059. -
    2060.         }
    2061. -
    2062.     }
    2063. -
    2064. }
    2065. -
    2066.  
    2067. -
    2068.  
    2069. -
    2070.  
    2071. -
    2072. /**
    2073. -
    2074.    * @param string $warning 
    2075. -
    2076.  * @access    private
    2077. -
    2078. */ 
    2079. -
    2080. function _report_warning($warning)
    2081. -
    2082. {
    2083. -
    2084.     $errmsg RDFAPI_ERROR '(class: parser): ' $warning .'.';
    2085. -
    2086.     trigger_error($errmsgE_USER_WARNING)
    2087. -
    2088. }
    2089. -
    2090.  
    2091. -
    2092.  
    2093. -
    2094. function _report_error($error)
    2095. -
    2096. {
    2097. -
    2098.     $errmsg RDFAPI_ERROR '(class: parser): ' $error .'.';
    2099. -
    2100.     trigger_error($errmsgE_USER_ERROR)
    2101. -
    2102. }
    2103. -
    2104.  
    2105. -
    2106.  
    2107. -
    2108. /**
    2109. -
    2110.    * @param string $namespace_uri 
    2111. -
    2112.    * @param string $local_name 
    2113. -
    2114.    * @param string $attributes 
    2115. -
    2116.    * @param string $parent 
    2117. -
    2118.  * @access    private
    2119. -
    2120. */ 
    2121. -
    2122. function _handle_resource_element$namespace_uri$local_name$attributes$parent )
    2123. -
    2124. {
    2125. -
    2126.     $subjects_found 0;
    2127. -
    2128.     $aux=$attributes;
    2129. -
    2130.     $aux2=Array();
    2131. -
    2132.     foreach($attributes as $atkey=>$atvalue{
    2133. -
    2134.       $aux2[]=$atkey;
    2135. -
    2136.       $aux2[]=$atvalue;
    2137. -
    2138.     }
    2139. -
    2140.     $attributes=$aux2;
    2141. -
    2142.     $id '';
    2143. -
    2144.     $about '';
    2145. -
    2146.  
    2147. -
    2148.     $bag_id '';
    2149. -
    2150.     $node_id '';
    2151. -
    2152.     $datatype '';
    2153. -
    2154.  
    2155. -
    2156.     $i=0;
    2157. -
    2158.  
    2159. -
    2160.     $attribute='';
    2161. -
    2162.  
    2163. -
    2164.     $attribute_namespace_uri='';
    2165. -
    2166.     $attribute_local_name='';
    2167. -
    2168.     $attribute_value='';
    2169. -
    2170.  
    2171. -
    2172.     $id_buffer='';
    2173. -
    2174.  
    2175. -
    2176.     $type='';
    2177. -
    2178.  
    2179. -
    2180.     $this->rdf_parser['top']['has_property_attributes'false;
    2181. -
    2182.     $this->rdf_parser['top']['has_member_attributes'false;
    2183. -
    2184.  
    2185. -
    2186.     
    2187. -
    2188.     if$namespace_uri == RDF_NAMESPACE_URI )
    2189. -
    2190.     {
    2191. -
    2192.        if$this->_is_rdf_node_element$local_name ) )
    2193. -
    2194.        {           
    2195. -
    2196.           $msg 'unknown or out of context rdf node element: '.$local_name;    
    2197. -
    2198.           
    2199. -
    2200.           if ($this->_is_forbidden_rdf_node_element($local_name))
    2201. -
    2202.                $this->_report_error($msg);
    2203. -
    2204.           else 
    2205. -
    2206.                $this->_report_warning($msg);                  
    2207. -
    2208.        }             
    2209. -
    2210.     }
    2211. -
    2212.  
    2213. -
    2214.     // examine each attribute for the standard RDF "keywords"
    2215. -
    2216.     for$i 0isset($attributes[$i])$i += )
    2217. -
    2218.     {
    2219. -
    2220.         $this->_split_name(
    2221. -
    2222.             $attributes$i ],
    2223. -
    2224.             $attribute,
    2225. -
    2226.             $attribute_namespace_uri,
    2227. -
    2228.             $attribute_local_name );
    2229. -
    2230.  
    2231. -
    2232.         $attribute_value $attributes$i ];
    2233. -
    2234.  
    2235. -
    2236.         // if the attribute is not in any namespace
    2237. -
    2238.         //   or the attribute is in the RDF namespace
    2239. -
    2240.         if( ( $attribute_namespace_uri == '' )
    2241. -
    2242.             || (  $attribute_namespace_uri == RDF_NAMESPACE_URI  ))
    2243. -
    2244.         {
    2245. -
    2246.             if$attribute_local_name == RDF_ID )
    2247. -
    2248.             {
    2249. -
    2250.                 $id $attribute_value;
    2251. -
    2252.                 ++$subjects_found;
    2253. -
    2254.             else if$attribute_local_name == RDF_ABOUT {
    2255. -
    2256.                 $about '_'.$attribute_value;            
    2257. -
    2258.                 ++$subjects_found;
    2259. -
    2260.             else if$attribute_local_name == RDF_NODEID{
    2261. -
    2262.                 $node_id $attribute_value;
    2263. -
    2264.                 ++$subjects_found;
    2265. -
    2266.             else if(  $attribute_local_name == RDF_ABOUT_EACH {
    2267. -
    2268.                 $error 'aboutEach has been removed from the RDF specifications';
    2269. -
    2270.                 $this->_report_error($error);               
    2271. -
    2272.             else if$attribute_local_name == RDF_ABOUT_EACH_PREFIX {
    2273. -
    2274.                 $error 'aboutEachPrefix has been removed from the RDF specifications';
    2275. -
    2276.                 $this->_report_error($error);
    2277. -
    2278.             else if$attribute_local_name == RDF_BAG_ID{
    2279. -
    2280.                 $bag_id $attribute_value;
    2281. -
    2282.             else if$attribute_local_name == RDF_DATATYPE{
    2283. -
    2284.                 $datatype $attribute_value;
    2285. -
    2286.             else if$this->_is_rdf_property_attribute$attribute_local_name )) {
    2287. -
    2288.                 $this->rdf_parser['top']['has_property_attributes'true;
    2289. -
    2290.             else if$this->_is_rdf_ordinal$attribute_local_name )) {
    2291. -
    2292.                 $this->rdf_parser['top']['has_property_attributes'true;
    2293. -
    2294.                 $this->rdf_parser['top']['has_member_attributes'true;
    2295. -
    2296.             else {
    2297. -
    2298.                 $this->rdf_parser['top']['has_property_attributes'true;
    2299. -
    2300.                 $msg 'unknown or out of context rdf attribute: '.$attribute_local_name;    
    2301. -
    2302.           
    2303. -
    2304.                   if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name))
    2305. -
    2306.                       $this->_report_error($msg);
    2307. -
    2308.                   else 
    2309. -
    2310.                       $this->_report_warning($msg);            
    2311. -
    2312.             }
    2313. -
    2314.         }
    2315. -
    2316.         else if(  $attribute_namespace_uri == XML_NAMESPACE_URI )
    2317. -
    2318.         {
    2319. -
    2320.             if$attribute_local_name == XML_LANG )
    2321. -
    2322.             {
    2323. -
    2324.                 $this->rdf_parser['top']['xml_lang'$attribute_value;
    2325. -
    2326.             }
    2327. -
    2328.             elseif ($attribute_local_name == 'base')
    2329. -
    2330.             {
    2331. -
    2332.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2333. -
    2334.             }                         
    2335. -
    2336.         }
    2337. -
    2338.         else if$attribute_namespace_uri )
    2339. -
    2340.         {
    2341. -
    2342.             $this->rdf_parser['top']['has_property_attributes'true;
    2343. -
    2344.         }
    2345. -
    2346.     }
    2347. -
    2348.  
    2349. -
    2350.     // if no subjects were found, generate one.
    2351. -
    2352.     if$subjects_found == )
    2353. -
    2354.     {
    2355. -
    2356.         $this->_generate_anonymous_uri$id_buffer );
    2357. -
    2358.         $this->rdf_parser['top']['subject']=$id_buffer;
    2359. -
    2360.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    2361. -
    2362.     }
    2363. -
    2364.     else if$subjects_found )
    2365. -
    2366.     {
    2367. -
    2368.          $this->_report_error('ID, about and nodeID are mutually exclusive');      
    2369. -
    2370.     }
    2371. -
    2372.     else if$id )
    2373. -
    2374.     {
    2375. -
    2376.         $this->_resolve_id$id$id_buffer );
    2377. -
    2378.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_URI;
    2379. -
    2380.         $this->rdf_parser['top']['subject']=$id_buffer;
    2381. -
    2382.     }
    2383. -
    2384.     else if$about )
    2385. -
    2386.     {       
    2387. -
    2388.         $this->_resolve_uri_reference$this->rdf_get_base()substr($about,1)$id_buffer );        
    2389. -
    2390.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_URI;
    2391. -
    2392.         $this->rdf_parser['top']['subject']=$id_buffer;
    2393. -
    2394.     }       
    2395. -
    2396.     else if$node_id )
    2397. -
    2398.     {
    2399. -
    2400.         $this->is_valid_id($node_id);
    2401. -
    2402.         $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    2403. -
    2404.         $this->rdf_parser['top']['subject']=$node_id;
    2405. -
    2406.     }
    2407. -
    2408.     
    2409. -
    2410.     // if the subject is empty, assign it the document uri
    2411. -
    2412.     if$this->rdf_parser['top']['subject'== '' )
    2413. -
    2414.     {
    2415. -
    2416.         $this->rdf_parser['top']['subject']=$this->rdf_get_base();                
    2417. -
    2418.     }
    2419. -
    2420.  
    2421. -
    2422.     if$bag_id )
    2423. -
    2424.     {
    2425. -
    2426.         $this->_resolve_id$bag_id$id_buffer );
    2427. -
    2428.         $this->rdf_parser['top']['bag_id']=$id_buffer;
    2429. -
    2430.     }
    2431. -
    2432.  
    2433. -
    2434.     // only report the type for non-rdf:Description elements.
    2435. -
    2436.     if( ($local_name != RDF_DESCRIPTION )
    2437. -
    2438.         || $namespace_uri != RDF_NAMESPACE_URI ) )
    2439. -
    2440.     {
    2441. -
    2442.         $type=$namespace_uri;
    2443. -
    2444.         $type.=$local_name;
    2445. -
    2446.  
    2447. -
    2448.         $this->_report_statement(
    2449. -
    2450.             $this->rdf_parser['top']['subject_type'],
    2451. -
    2452.             $this->rdf_parser['top']['subject'],
    2453. -
    2454.             RDF_NAMESPACE_URI.RDF_TYPE,
    2455. -
    2456.             0,
    2457. -
    2458.             RDF_OBJECT_TYPE_RESOURCE,
    2459. -
    2460.             $type,
    2461. -
    2462.             '',
    2463. -
    2464.             $this->rdf_parser['top']['bag_id'],
    2465. -
    2466.             $this->rdf_parser['top']['statements'],
    2467. -
    2468.             ''
    2469. -
    2470.             $datatype);
    2471. -
    2472.  
    2473. -
    2474.     }
    2475. -
    2476.  
    2477. -
    2478.     // if this element is the child of some property,
    2479. -
    2480.     //   report the appropriate statement.
    2481. -
    2482.     if$parent )
    2483. -
    2484.     {
    2485. -
    2486.         if ($this->rdf_parser['top']['subject_type'== RDF_SUBJECT_TYPE_BNODE)
    2487. -
    2488.             $objtype RDF_OBJECT_TYPE_BNODE
    2489. -
    2490.         else
    2491. -
    2492.             $objtype RDF_OBJECT_TYPE_RESOURCE;       
    2493. -
    2494.         
    2495. -
    2496.         $this->_report_statement(
    2497. -
    2498.             $parent['parent']['subject_type'],
    2499. -
    2500.             $parent['parent']['subject'],
    2501. -
    2502.             $parent['predicate'],
    2503. -
    2504.             $parent['ordinal'],
    2505. -
    2506.             $objtype,
    2507. -
    2508.             $this->rdf_parser['top']['subject'],
    2509. -
    2510.             '',
    2511. -
    2512.             $parent['parent']['bag_id'],
    2513. -
    2514.             $parent['parent']['statements'],
    2515. -
    2516.             $parent['statement_id']
    2517. -
    2518.             $parent['datatype']);
    2519. -
    2520.  
    2521. -
    2522.     }
    2523. -
    2524.  
    2525. -
    2526.     if$this->rdf_parser['top']['has_property_attributes')
    2527. -
    2528.     {
    2529. -
    2530.         $this->_handle_property_attributes(
    2531. -
    2532.             $this->rdf_parser['top']['subject_type'],
    2533. -
    2534.             $this->rdf_parser['top']['subject'],
    2535. -
    2536.             $attributes,
    2537. -
    2538.             $this->rdf_parser['top']['xml_lang'],
    2539. -
    2540.             $this->rdf_parser['top']['bag_id'],
    2541. -
    2542.             $this->rdf_parser['top']['statements');
    2543. -
    2544.     }
    2545. -
    2546. }
    2547. -
    2548.  
    2549. -
    2550. /**
    2551. -
    2552.    * @param string &$namespace_uri 
    2553. -
    2554.    * @param string &$local_name 
    2555. -
    2556.    * @param string &$attributes 
    2557. -
    2558.  * @access    private
    2559. -
    2560. */ 
    2561. -
    2562. function _handle_property_element&$namespace_uri&$local_name&$attributes )
    2563. -
    2564. {
    2565. -
    2566.     $buffer='';
    2567. -
    2568.  
    2569. -
    2570.     $i=0;
    2571. -
    2572.  
    2573. -
    2574.     $aux=$attributes;
    2575. -
    2576.     $aux2=Array();
    2577. -
    2578.     foreach($attributes as $atkey=>$atvalue{
    2579. -
    2580.       $aux2[]=$atkey;
    2581. -
    2582.       $aux2[]=$atvalue;
    2583. -
    2584.     }
    2585. -
    2586.     $attributes=$aux2;
    2587. -
    2588.  
    2589. -
    2590.     $attribute_namespace_uri='';
    2591. -
    2592.     $attribute_local_name='';
    2593. -
    2594.     $attribute_value '';
    2595. -
    2596.  
    2597. -
    2598.     $resource NULL;
    2599. -
    2600.     $statement_id '';
    2601. -
    2602.     $bag_id '';
    2603. -
    2604.     $parse_type '';
    2605. -
    2606.     $node_id '';
    2607. -
    2608.     $datatype ''
    2609. -
    2610.  
    2611. -
    2612.     $this->rdf_parser['top']['ordinal'0;
    2613. -
    2614.  
    2615. -
    2616.     if$namespace_uri == RDF_NAMESPACE_URI )
    2617. -
    2618.     {
    2619. -
    2620.        if$this->_is_rdf_property_element$local_name ) )
    2621. -
    2622.         {
    2623. -
    2624.             $msg 'unknown or out of context rdf property element: '.$local_name;    
    2625. -
    2626.           
    2627. -
    2628.               if ($this->_is_forbidden_rdf_property_element($local_name))
    2629. -
    2630.                   $this->_report_error($msg);
    2631. -
    2632.               else 
    2633. -
    2634.                   $this->_report_warning($msg);
    2635. -
    2636.         }
    2637. -
    2638.              
    2639. -
    2640.     }
    2641. -
    2642.  
    2643. -
    2644.     $buffer=$namespace_uri;
    2645. -
    2646.  
    2647. -
    2648.     if( ( $namespace_uri == RDF_NAMESPACE_URI )
    2649. -
    2650.         &&  $local_name == RDF_LI ) )
    2651. -
    2652.     {
    2653. -
    2654.         $this->rdf_parser['top']['parent']['members']++;
    2655. -
    2656.         $this->rdf_parser['top']['ordinal'$this->rdf_parser['top']['parent']['members'];
    2657. -
    2658.  
    2659. -
    2660.         $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal'];
    2661. -
    2662.  
    2663. -
    2664.         $buffer.='_'.$this->rdf_parser['top']['ordinal'];
    2665. -
    2666.         
    2667. -
    2668.     }
    2669. -
    2670.     else
    2671. -
    2672.     {
    2673. -
    2674.         $buffer.=$local_name;
    2675. -
    2676.     }
    2677. -
    2678.  
    2679. -
    2680.     $this->rdf_parser['top']['predicate']=$buffer;
    2681. -
    2682.  
    2683. -
    2684.     $this->rdf_parser['top']['has_property_attributes'false;
    2685. -
    2686.     $this->rdf_parser['top']['has_member_attributes'false;
    2687. -
    2688.  
    2689. -
    2690.           
    2691. -
    2692.     for$i 0isset($attributes[$i])$i += )
    2693. -
    2694.     {
    2695. -
    2696.         $this->_split_name(
    2697. -
    2698.             $attributes[$i],
    2699. -
    2700.             $buffer,
    2701. -
    2702.             $attribute_namespace_uri,
    2703. -
    2704.             $attribute_local_name );
    2705. -
    2706.  
    2707. -
    2708.         $attribute_value $attributes[$i 1];
    2709. -
    2710.  
    2711. -
    2712.         // if the attribute is not in any namespace
    2713. -
    2714.         //   or the attribute is in the RDF namespace
    2715. -
    2716.         if( ( $attribute_namespace_uri == '' )
    2717. -
    2718.             || (  $attribute_namespace_uri == RDF_NAMESPACE_URI ) )
    2719. -
    2720.         {
    2721. -
    2722.             if( ( $attribute_local_name == RDF_ID )  )
    2723. -
    2724.             {
    2725. -
    2726.                 $statement_id $attribute_value;                               
    2727. -
    2728.             }
    2729. -
    2730.             else if$attribute_local_name == RDF_PARSE_TYPE )
    2731. -
    2732.             {               
    2733. -
    2734.                 $parse_type $attribute_value;
    2735. -
    2736.             }
    2737. -
    2738.             else if(  $attribute_local_name == RDF_RESOURCE )
    2739. -
    2740.             {
    2741. -
    2742.                 $resource $attribute_value;                                
    2743. -
    2744.             }
    2745. -
    2746.             else if(  $attribute_local_name == RDF_NODEID )
    2747. -
    2748.             {                                
    2749. -
    2750.                 $node_id $attribute_value;        
    2751. -
    2752.             }
    2753. -
    2754.             else if(  $attribute_local_name == RDF_BAG_ID )
    2755. -
    2756.             {
    2757. -
    2758.                 $bag_id $attribute_value;
    2759. -
    2760.             }
    2761. -
    2762.             else if(  $attribute_local_name == RDF_DATATYPE )
    2763. -
    2764.             {
    2765. -
    2766.                 $datatype $attribute_value;
    2767. -
    2768.                 $this->rdf_parser['top']['datatype'$attribute_value;
    2769. -
    2770.             }
    2771. -
    2772.             else if$this->_is_rdf_property_attribute$attribute_local_name ) )
    2773. -
    2774.             {
    2775. -
    2776.                 $this->rdf_parser['top']['has_property_attributes'true;
    2777. -
    2778.             }
    2779. -
    2780.             else
    2781. -
    2782.             {
    2783. -
    2784.                 $this->_report_warning('unknown rdf attribute: '.$attribute_local_name );
    2785. -
    2786.                 return;
    2787. -
    2788.             }            
    2789. -
    2790.         }
    2791. -
    2792.         else if(  $attribute_namespace_uri == XML_NAMESPACE_URI  )
    2793. -
    2794.         {
    2795. -
    2796.             if$attribute_local_name == XML_LANG  )
    2797. -
    2798.             {
    2799. -
    2800.                 $this->rdf_parser['top']['xml_lang'$attribute_value;
    2801. -
    2802.             }
    2803. -
    2804.             elseif ($attribute_local_name == 'base')
    2805. -
    2806.             {
    2807. -
    2808.                 $this->rdf_parser['top']['element_base_uri'$attribute_value;
    2809. -
    2810.             }                         
    2811. -
    2812.         }
    2813. -
    2814.         else if$attribute_namespace_uri )
    2815. -
    2816.         {
    2817. -
    2818.             $this->rdf_parser['top']['has_property_attributes'true;
    2819. -
    2820.         }
    2821. -
    2822.     }    
    2823. -
    2824.  
    2825. -
    2826.     if$statement_id )
    2827. -
    2828.     {
    2829. -
    2830.         $this->_resolve_id($statement_id$buffer );
    2831. -
    2832.         $this->rdf_parser['top']['statement_id']=$buffer;
    2833. -
    2834.     }
    2835. -
    2836.     
    2837. -
    2838.     if ($node_id)
    2839. -
    2840.     {
    2841. -
    2842.         $this->is_valid_id($node_id);
    2843. -
    2844.         
    2845. -
    2846.         if ($resource)
    2847. -
    2848.         {
    2849. -
    2850.             $this->_report_error('nodeID and resource are mutually exclusive');
    2851. -
    2852.         }                
    2853. -
    2854.            if ($statement_id
    2855. -
    2856.            {
    2857. -
    2858.                // reify statement
    2859. -
    2860.                $this->_report_statement(
    2861. -
    2862.                 $this->rdf_parser['top']['parent']['subject_type'],
    2863. -
    2864.                 $this->rdf_parser['top']['parent']['subject'],
    2865. -
    2866.                 $this->rdf_parser['top']['predicate'],
    2867. -
    2868.                 $this->rdf_parser['top']['ordinal'],
    2869. -
    2870.                 RDF_OBJECT_TYPE_BNODE
    2871. -
    2872.                 $node_id
    2873. -
    2874.                 '',
    2875. -
    2876.                 $this->rdf_parser['top']['parent']['bag_id'],
    2877. -
    2878.                 $this->rdf_parser['top']['parent']['statements'],
    2879. -
    2880.                 $this->rdf_parser['top']['statement_id']
    2881. -
    2882.                 '')
    2883. -
    2884.             $statement_id '';         
    2885. -
    2886.            
    2887. -
    2888.            else 
    2889. -
    2890.            {                             
    2891. -
    2892.             $this->_report_statement(
    2893. -
    2894.                $this->rdf_parser['top']['parent']['subject_type'],
    2895. -
    2896.                $this->rdf_parser['top']['parent']['subject'],
    2897. -
    2898.                $this->rdf_parser['top']['predicate'],
    2899. -
    2900.                $this->rdf_parser['top']['ordinal'],
    2901. -
    2902.                RDF_OBJECT_TYPE_BNODE,
    2903. -
    2904.                $node_id,
    2905. -
    2906.                '',
    2907. -
    2908.                $this->rdf_parser['top']['parent']['bag_id'],
    2909. -
    2910.                $this->rdf_parser['top']['parent']['statements'],
    2911. -
    2912.                '',
    2913. -
    2914.                $datatype );    
    2915. -
    2916.            }    
    2917. -
    2918.            
    2919. -
    2920.            $this->rdf_parser['top']['state'IN_PROPERTY_EMPTY_RESOURCE;      
    2921. -
    2922.     }
    2923. -
    2924.     
    2925. -
    2926.     if$parse_type )
    2927. -
    2928.     {
    2929. -
    2930.         if$resource {
    2931. -
    2932.             $this->_report_error('property elements with rdf:parseType do not allow rdf:resource' );
    2933. -
    2934.         }
    2935. -
    2936.  
    2937. -
    2938.         if$bag_id {
    2939. -
    2940.             $this->_report_warning('property elements with rdf:parseType do not allow rdf:bagID' );
    2941. -
    2942.             return;
    2943. -
    2944.         }
    2945. -
    2946.  
    2947. -
    2948.         if$this->rdf_parser['top']['has_property_attributes')
    2949. -
    2950.         {
    2951. -
    2952.                 $this->_report_error('property elements with rdf:parseType do not allow property attributes');
    2953. -
    2954.             return;
    2955. -
    2956.         }
    2957. -
    2958.                 
    2959. -
    2960.         if(  $attribute_value == RDF_PARSE_TYPE_RESOURCE )
    2961. -
    2962.         {
    2963. -
    2964.             $this->_generate_anonymous_uri$buffer );
    2965. -
    2966.             // since we are sure that this is now a resource property we can report it
    2967. -
    2968.             $this->_report_statement(
    2969. -
    2970.                 $this->rdf_parser['top']['parent']['subject_type'],
    2971. -
    2972.                 $this->rdf_parser['top']['parent']['subject'],
    2973. -
    2974.                 $this->rdf_parser['top']['predicate'],
    2975. -
    2976.                 0,
    2977. -
    2978.                 RDF_OBJECT_TYPE_BNODE,
    2979. -
    2980.                 $buffer,
    2981. -
    2982.                 '',
    2983. -
    2984.                 $this->rdf_parser['top']['parent']['bag_id'],
    2985. -
    2986.                 $this->rdf_parser['top']['parent']['statements'],
    2987. -
    2988.                 $this->rdf_parser['top']['statement_id'],
    2989. -
    2990.                 $datatype );
    2991. -
    2992.  
    2993. -
    2994.             $this->_push_element);
    2995. -
    2996.  
    2997. -
    2998.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_RESOURCE;
    2999. -
    3000.             $this->rdf_parser['top']['subject_type'RDF_SUBJECT_TYPE_BNODE;
    3001. -
    3002.             $this->rdf_parser['top']['subject']=$buffer;
    3003. -
    3004.             $this->rdf_parser['top']['bag_id']='';
    3005. -
    3006.             $this->rdf_parser['top']['datatype']$datatype;
    3007. -
    3008.             
    3009. -
    3010.         }     
    3011. -
    3012.            elseif (  $attribute_value == RDF_PARSE_TYPE_LITERAL )
    3013. -
    3014.            {
    3015. -
    3016.                $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_LITERAL;
    3017. -
    3018.                $this->rdf_parser['top']['datatype']RDF_NAMESPACE_URI .RDF_XMLLITERAL;
    3019. -
    3020.                $this->rdf_parser['xml_literal']['buffer''';       
    3021. -
    3022.                $this->rdf_parser['xml_literal']['depth'0;        
    3023. -
    3024.            }
    3025. -
    3026.         elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION)        
    3027. -
    3028.         {
    3029. -
    3030.             $this->_generate_anonymous_uri$buffer );            
    3031. -
    3032.             $this->_report_statement(
    3033. -
    3034.                 $this->rdf_parser['top']['parent']['subject_type'],
    3035. -
    3036.                 $this->rdf_parser['top']['parent']['subject'],
    3037. -
    3038.                 $this->rdf_parser['top']['predicate'],
    3039. -
    3040.                 0,
    3041. -
    3042.                 RDF_OBJECT_TYPE_BNODE,
    3043. -
    3044.                 $buffer,
    3045. -
    3046.                 '',
    3047. -
    3048.                 $this->rdf_parser['top']['parent']['bag_id'],
    3049. -
    3050.                 $this->rdf_parser['top']['parent']['statements'],
    3051. -
    3052.                 $this->rdf_parser['top']['statement_id'],
    3053. -
    3054.                 $datatype );
    3055. -
    3056.                 
    3057. -
    3058.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_COLLECTION;
    3059. -
    3060.             $this->rdf_parser['top']['collection']['first_blank_node_id'$buffer;
    3061. -
    3062.         }      
    3063. -
    3064.        
    3065. -
    3066.         else
    3067. -
    3068.         {
    3069. -
    3070.                    
    3071. -
    3072.             $this->_report_statement(
    3073. -
    3074.                 $this->rdf_parser['top']['parent']['subject_type'],
    3075. -
    3076.                 $this->rdf_parser['top']['parent']['subject'],
    3077. -
    3078.                 $this->rdf_parser['top']['predicate'],
    3079. -
    3080.                 0,
    3081. -
    3082.                 RDF_OBJECT_TYPE_XML,
    3083. -
    3084.                 '',
    3085. -
    3086.                 '',
    3087. -
    3088.                 $this->rdf_parser['top']['parent']['bag_id'],
    3089. -
    3090.                 $this->rdf_parser['top']['parent']['statements'],
    3091. -
    3092.                 $this->rdf_parser['top']['statement_id'],
    3093. -
    3094.                 $datatype );
    3095. -
    3096.  
    3097. -
    3098.             $this->rdf_parser['top']['state'IN_PROPERTY_PARSE_TYPE_LITERAL;
    3099. -
    3100.         }
    3101. -
    3102.     }
    3103. -
    3104.     else if$resource !== NULL || $bag_id || $this->rdf_parser['top']['has_property_attributes')
    3105. -
    3106.         {
    3107. -
    3108.         if$resource !== NULL )
    3109. -
    3110.         {
    3111. -
    3112.             $subject_type RDF_SUBJECT_TYPE_URI;
    3113. -
    3114.             $this->_resolve_uri_reference$this->rdf_get_base()$resource$buffer );
    3115. -
    3116.             $object_type=RDF_OBJECT_TYPE_RESOURCE;
    3117. -
    3118.         }
    3119. -
    3120.         else
    3121. -
    3122.         {
    3123. -
    3124.             $subject_type RDF_SUBJECT_TYPE_BNODE;
    3125. -
    3126.             $this->_generate_anonymous_uri$buffer );
    3127. -
    3128.             $object_type=RDF_OBJECT_TYPE_BNODE;
    3129. -
    3130.         }
    3131. -
    3132.         $this->rdf_parser['top']['state'IN_PROPERTY_EMPTY_RESOURCE;
    3133. -
    3134.  
    3135. -
    3136.         // since we are sure that this is now a resource property we can report it.
    3137. -
    3138.         $this->_report_statement(
    3139. -
    3140.             $this->rdf_parser['top']['parent']['subject_type'],
    3141. -
    3142.             $this->rdf_parser['top']['parent']['subject'],
    3143. -
    3144.             $this->rdf_parser['top']['predicate'],
    3145. -
    3146.             $this->rdf_parser['top']['ordinal'],
    3147. -
    3148.             $object_type,
    3149. -
    3150.             $buffer,
    3151. -
    3152.             '',
    3153. -
    3154.             $this->rdf_parser['top']['parent']['bag_id'],
    3155. -
    3156.             $this->rdf_parser['top']['parent']['statements'],
    3157. -
    3158.             $this->rdf_parser['top']['statement_id'],
    3159. -
    3160.             $datatype )// should we allow IDs?
    3161. -
    3162.             
    3163. -
    3164.         if$bag_id )
    3165. -
    3166.         {
    3167. -
    3168.             $this->_resolve_id$bag_id$buffer );
    3169. -
    3170.             $this->rdf_parser['top']['bag_id']=$buffer;            
    3171. -
    3172.         }
    3173. -
    3174.  
    3175. -
    3176.         if$this->rdf_parser['top']['has_property_attributes')
    3177. -
    3178.         {
    3179. -
    3180.             $this->_handle_property_attributes(
    3181. -
    3182.                 $subject_type,
    3183. -
    3184.                 $buffer,
    3185. -
    3186.                 $attributes,
    3187. -
    3188.                 $this->rdf_parser['top']['xml_lang'],
    3189. -
    3190.                 $this->rdf_parser['top']['bag_id'],
    3191. -
    3192.                 $this->rdf_parser['top']['statements');                
    3193. -
    3194.         }
    3195. -
    3196.     
    3197. -
    3198. }
    3199. -
    3200.        
    3201. -
    3202. /**
    3203. -
    3204.    * @param string &$namespace_uri 
    3205. -
    3206.    * @param string &$local_name 
    3207. -
    3208.    * @param string &$attributes 
    3209. -
    3210.    * @access    private
    3211. -
    3212. */ 
    3213. -
    3214. function _handle_collection_element(&$namespace_uri&$local_name&$attributes)
    3215. -
    3216. {
    3217. -
    3218.     $aux2=Array();
    3219. -
    3220.     foreach($attributes as $atkey=>$atvalue{
    3221. -
    3222.       $aux2[]=$atkey;
    3223. -
    3224.       $aux2[]=$atvalue;
    3225. -
    3226.     }
    3227. -
    3228.     $attributes=$aux2;
    3229. -
    3230. /* collection construction site
    3231. -
    3232. // old:    
    3233. -
    3234.     if (   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
    3235. -
    3236.         && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )
    3237. -
    3238.     {
    3239. -
    3240.         for( $i = 0; isset($attributes[$i]); $i += 2 )
    3241. -
    3242.         {
    3243. -
    3244.             $this->_split_name(
    3245. -
    3246.                 $attributes[ $i ],
    3247. -
    3248.                 $attribute,
    3249. -
    3250.                 $attribute_namespace_uri,
    3251. -
    3252.                 $attribute_local_name );
    3253. -
    3254.  
    3255. -
    3256.             $attribute_value = $attributes[ $i + 1 ];
    3257. -
    3258.             
    3259. -
    3260.             if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
    3261. -
    3262.             {
    3263. -
    3264.                 if( $attribute_local_name == RDF_ABOUT || 
    3265. -
    3266.                     $attribute_local_name == RDF_RESOURCE) 
    3267. -
    3268.                 {
    3269. -
    3270.                     $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE;                    
    3271. -
    3272.                 }
    3273. -
    3274.                 elseif ( $attribute_local_name == RDF_NODEID ) {
    3275. -
    3276.                     $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE;
    3277. -
    3278.                 }
    3279. -
    3280.                 $this->rdf_parser['top']['parent']['collection']['object_label'][] = $attribute_value;
    3281. -
    3282.             }
    3283. -
    3284.         }
    3285. -
    3286.     }
    3287. -
    3288. */
    3289. -
    3290. // new
    3291. -
    3292.  
    3293. -
    3294.         for$i 0isset($attributes[$i])$i += )
    3295. -
    3296.         {
    3297. -
    3298.             $this->_split_name(
    3299. -
    3300.                 $attributes$i ],
    3301. -
    3302.                 $attribute,
    3303. -
    3304.                 $attribute_namespace_uri,
    3305. -
    3306.                 $attribute_local_name );
    3307. -
    3308.  
    3309. -
    3310.             $attribute_value $attributes$i ];
    3311. -
    3312.             
    3313. -
    3314.             if$attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
    3315. -
    3316.             {
    3317. -
    3318.                 $tmp_subject_type RDF_SUBJECT_TYPE_URI;
    3319. -
    3320.                 if$attribute_local_name == RDF_ABOUT || 
    3321. -
    3322.                     $attribute_local_name == RDF_RESOURCE
    3323. -
    3324.                 {
    3325. -
    3326.                     $this->rdf_parser['top']['parent']['collection']['object_type'][RDF_OBJECT_TYPE_RESOURCE;                                        
    3327. -
    3328.                 }
    3329. -
    3330.                 elseif $attribute_local_name == RDF_NODEID {
    3331. -
    3332.                     $this->rdf_parser['top']['parent']['collection']['object_type'][RDF_OBJECT_TYPE_BNODE;
    3333. -
    3334.                     $tmp_subject_type RDF_SUBJECT_TYPE_BNODE;
    3335. -
    3336.                 }
    3337. -
    3338.                 $id_buffer '';
    3339. -
    3340.                 $this->_resolve_uri_reference$this->rdf_get_base()$attribute_value$id_buffer );        
    3341. -
    3342.                 $this->rdf_parser['top']['parent']['collection']['object_label'][$id_buffer;
    3343. -
    3344.                 
    3345. -
    3346.                    if (!(   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
    3347. -
    3348.                        && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ))
    3349. -
    3350.                    {                
    3351. -
    3352.                       $this->_report_statement(
    3353. -
    3354.                             $tmp_subject_type,
    3355. -
    3356.                             $id_buffer,                            
    3357. -
    3358.                             RDF_NAMESPACE_URI.RDF_TYPE,                                                    
    3359. -
    3360.                             '',
    3361. -
    3362.                             RDF_OBJECT_TYPE_RESOURCE,
    3363. -
    3364.                             $namespace_uri.$local_name,
    3365. -
    3366.                             '',
    3367. -
    3368.                             '',
    3369. -
    3370.                             '',
    3371. -
    3372.                             '',
    3373. -
    3374.                             '');
    3375. -
    3376.                    }
    3377. -
    3378.             }
    3379. -
    3380.         }
    3381. -
    3382.  
    3383. -
    3384.  
    3385. -
    3386. // collection construction site    
    3387. -
    3388. }
    3389. -
    3390.  
    3391. -
    3392. /**
    3393. -
    3394.    * @param string &$namespace_uri 
    3395. -
    3396.    * @param string &$local_name 
    3397. -
    3398.    * @param string &$attributes 
    3399. -
    3400.    * @access    private
    3401. -
    3402. */ 
    3403. -
    3404. function _handle_xml_start_element(&$namespace_uri&$local_name&$attributes)
    3405. -
    3406. {
    3407. -
    3408.     $aux2=Array();
    3409. -
    3410.     foreach($attributes as $atkey=>$atvalue{
    3411. -
    3412.       $aux2[]=$atkey;
    3413. -
    3414.       $aux2[]=$atvalue;
    3415. -
    3416.     }
    3417. -
    3418.     $attributes=$aux2;
    3419. -
    3420.     
    3421. -
    3422.     $element '<' .$this->_join_name_and_declare_prefix($namespace_uri$local_name);        
    3423. -
    3424.     
    3425. -
    3426.     for$i 0isset($attributes[$i])$i += )
    3427. -
    3428.         {
    3429. -
    3430.             $this->_split_name(
    3431. -
    3432.                 $attributes$i ],
    3433. -
    3434.                 $attribute,
    3435. -
    3436.                 $attribute_namespace_uri,
    3437. -
    3438.                 $attribute_local_name );
    3439. -
    3440.  
    3441. -
    3442.             $attribute_value $attributes$i ];
    3443. -
    3444.  
    3445. -
    3446.             $element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri$attribute_local_name);
    3447. -
    3448.             $element .= '=\"' .$attribute_value .'\"';     
    3449. -
    3450.         }
    3451. -
    3452.     $element .= '>';
    3453. -
    3454.     
    3455. -
    3456.     $this->rdf_parser['xml_literal']['buffer'.= $element;
    3457. -
    3458. }
    3459. -
    3460.  
    3461. -
    3462. /**
    3463. -
    3464.    * @param string $name 
    3465. -
    3466.    * @access    private
    3467. -
    3468. */ 
    3469. -
    3470. function _handle_xml_end_element($name)
    3471. -
    3472. {
    3473. -
    3474.     $buffer='';
    3475. -
    3476.     $namespace_uri='';
    3477. -
    3478.     $local_name='';
    3479. -
    3480.     
    3481. -
    3482.     $this->_split_name(
    3483. -
    3484.         $name,
    3485. -
    3486.            $buffer,
    3487. -
    3488.            $namespace_uri,
    3489. -
    3490.            $local_name );
    3491. -
    3492.         
    3493. -
    3494.     $element '</';    
    3495. -
    3496.             
    3497. -
    3498.     if ($namespace_uri && isset($this->rdf_parser['default_namespace']
    3499. -
    3500.         &&$namespace_uri != $this->rdf_parser['default_namespace'])
    3501. -
    3502.     {
    3503. -
    3504.          $element .= $this->rdf_parser['namespaces'][$namespace_uri.':';                 
    3505. -
    3506.     }
    3507. -
    3508.         
    3509. -
    3510.     $element .= $local_name .'>';
    3511. -
    3512.         
    3513. -
    3514.     $this->rdf_parser['xml_literal']['buffer'.= $element
    3515. -
    3516.     $depth $this->rdf_parser['xml_literal']['depth']--;
    3517. -
    3518.         
    3519. -
    3520.     if (isset($this->rdf_parser['xml_literal']['declared_ns']))
    3521. -
    3522.           foreach ($this->rdf_parser['xml_literal']['declared_ns'as $prefix => $_depth)
    3523. -
    3524.     {
    3525. -
    3526.         if ($depth == $_depth)
    3527. -
    3528.             unset($this->rdf_parser['xml_literal']['declared_ns'][$prefix]);
    3529. -
    3530.     }
    3531. -
    3532. }
    3533. -
    3534.  
    3535. -
    3536. /**
    3537. -
    3538.    * @param string $namespace_uri 
    3539. -
    3540.    * @param string $local_name 
    3541. -
    3542.    * @access    private
    3543. -
    3544. */ 
    3545. -
    3546. function _join_name_and_declare_prefix($namespace_uri$local_name{
    3547. -
    3548.     
    3549. -
    3550.     $name '';
    3551. -
    3552.     
    3553. -
    3554.     if ($namespace_uri)
    3555. -
    3556.     {                
    3557. -
    3558.         if (isset($this->rdf_parser['default_namespace'])
    3559. -
    3560.             && $namespace_uri == $this->rdf_parser['default_namespace'])
    3561. -
    3562.         {    
    3563. -
    3564.             $name .= $local_name;
    3565. -
    3566.                     
    3567. -
    3568.             if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'])
    3569. -
    3570.                 && $namespace_uri != XML_NAMESPACE_URI)
    3571. -
    3572.             {
    3573. -
    3574.                 $name .= ' xmlns=' '\"' .$namespace_uri .'\"';
    3575. -
    3576.                 
    3577. -
    3578.                 $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'
    3579. -
    3580.                     = $this->rdf_parser['xml_literal']['depth'];
    3581. -
    3582.             }
    3583. -
    3584.         }
    3585. -
    3586.         else
    3587. -
    3588.         {
    3589. -
    3590.             $ns_prefix $this->rdf_parser['namespaces'][$namespace_uri]
    3591. -
    3592.             $name .= $ns_prefix .':' .$local_name;                 
    3593. -
    3594.         
    3595. -
    3596.             if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix])
    3597. -
    3598.                 && $namespace_uri != XML_NAMESPACE_URI)
    3599. -
    3600.             {
    3601. -
    3602.                 $name .= " xmlns:$ns_prefix='\"' .$namespace_uri .'\"';
    3603. -
    3604.                 
    3605. -
    3606.                 $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix
    3607. -
    3608.                     = $this->rdf_parser['xml_literal']['depth'];
    3609. -
    3610.             }
    3611. -
    3612.         }
    3613. -
    3614.             
    3615. -
    3616.     }
    3617. -
    3618.     else
    3619. -
    3620.         $name .= $local_name;
    3621. -
    3622.     
    3623. -
    3624.     return $name;
    3625. -
    3626.     
    3627. -
    3628. }
    3629. -
    3630.  
    3631. -
    3632. /**
    3633. -
    3634.   * @access    private
    3635. -
    3636. */ 
    3637. -
    3638. function _end_collection({
    3639. -
    3640.     
    3641. -
    3642.     if (isset($this->rdf_parser['top']['collection']))
    3643. -
    3644.     {            
    3645. -
    3646.                 
    3647. -
    3648.         $subject $this->rdf_parser['top']['collection']['first_blank_node_id'];
    3649. -
    3650.             
    3651. -
    3652.         for ($i=0isset($this->rdf_parser['top']['collection']['object_label'][$i])$i++
    3653. -
    3654.         {            
    3655. -
    3656.                         
    3657. -
    3658.             $this->_report_statement(
    3659. -
    3660.                 RDF_SUBJECT_TYPE_BNODE
    3661. -
    3662.                 $subject,
    3663. -
    3664.                 RDF_NAMESPACE_URI.RDF_FIRST,
    3665. -
    3666.                 '',
    3667. -
    3668.                 $this->rdf_parser['top']['collection']['object_type'][$i],
    3669. -
    3670.                 $this->rdf_parser['top']['collection']['object_label'][$i],
    3671. -
    3672.                 '',
    3673. -
    3674.                 '',
    3675. -
    3676.                 '',
    3677. -
    3678.                 '',
    3679. -
    3680.                 '');
    3681. -
    3682.  
    3683. -
    3684.             if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1]))
    3685. -
    3686.             {
    3687. -
    3688.                 $obj_type_2 RDF_OBJECT_TYPE_RESOURCE;
    3689. -
    3690.                 $object_2 RDF_NAMESPACE_URI.RDF_NIL;                
    3691. -
    3692.             }
    3693. -
    3694.             else     
    3695. -
    3696.             {
    3697. -
    3698.                 $obj_type_2RDF_OBJECT_TYPE_BNODE;
    3699. -
    3700.                 $this->_generate_anonymous_uri($object_2);
    3701. -
    3702.             }                
    3703. -
    3704.                 
    3705. -
    3706.                 
    3707. -
    3708.             $this->_report_statement(
    3709. -
    3710.                 RDF_SUBJECT_TYPE_BNODE
    3711. -
    3712.                 $subject,
    3713. -
    3714.                 RDF_NAMESPACE_URI.RDF_REST,
    3715. -
    3716.                 '',
    3717. -
    3718.                 $obj_type_2,
    3719. -
    3720.                 $object_2,
    3721. -
    3722.                 '',
    3723. -
    3724.                 '',
    3725. -
    3726.                 '',
    3727. -
    3728.                 '',
    3729. -
    3730.                 '');    
    3731. -
    3732.  
    3733. -
    3734.             $subject $object_2;        
    3735. -
    3736.         }        
    3737. -
    3738.     }
    3739. -
    3740. }
    3741. -
    3742.  
    3743. -
    3744. /**
    3745. -
    3746.    * @param string $parser 
    3747. -
    3748.    * @param string $name 
    3749. -
    3750.    * @param string $attributes 
    3751. -
    3752.    * @access    private
    3753. -
    3754. */ 
    3755. -
    3756. function _start_element_handler($parser$name$attributes )
    3757. -
    3758. {
    3759. -
    3760.     $buffer='';
    3761. -
    3762.  
    3763. -
    3764.     $namespace_uri='';
    3765. -
    3766.     $local_name='';
    3767. -
    3768.  
    3769. -
    3770.     $this->_push_element();
    3771. -
    3772.  
    3773. -
    3774.  
    3775. -
    3776.     $this->_split_name(
    3777. -
    3778.         $name,
    3779. -
    3780.         $buffer,
    3781. -
    3782.         $namespace_uri,
    3783. -
    3784.         $local_name );
    3785. -
    3786.  
    3787. -
    3788.     switch$this->rdf_parser['top']['state')
    3789. -
    3790.     {
    3791. -
    3792.     case IN_TOP_LEVEL:
    3793. -
    3794.         // set base_uri, if possible 
    3795. -
    3796.         foreach ($attributes as $key => $value{
    3797. -
    3798.              if($key == XML_NAMESPACE_URI NAMESPACE_SEPARATOR_CHAR 'base'
    3799. -
    3800.                      $this->rdf_parser['base_uri'$value;
    3801. -
    3802.                     $this->rdf_parser['document_base_uri'$value;                                 
    3803. -
    3804.                     
    3805. -
    3806.                     $c substr($valuestrlen($value)-,1);
    3807. -
    3808.                     if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    3809. -
    3810.                          $this->rdf_parser['normalized_base_uri'$value '#';
    3811. -
    3812.                     else
    3813. -
    3814.                         $this->rdf_parser['normalized_base_uri'$value
    3815. -
    3816.                     
    3817. -
    3818.               }
    3819. -
    3820.               elseif ($key == XML_NAMESPACE_URI NAMESPACE_SEPARATOR_CHAR .'lang')
    3821. -
    3822.                   $this->rdf_parser['document_xml_lang'$value;
    3823. -
    3824. echo "";
    3825. -
    3826.         }
    3827. -
    3828.                       
    3829. -
    3830.             
    3831. -
    3832.         ifRDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name )
    3833. -
    3834.         {            
    3835. -
    3836.             $this->rdf_parser['top']['state'IN_RDF;
    3837. -
    3838.  
    3839. -
    3840.             break;            
    3841. -
    3842.         }        
    3843. -
    3844.     case IN_RDF:
    3845. -
    3846.         $this->rdf_parser['top']['state'IN_DESCRIPTION;
    3847. -
    3848.         $this->_handle_resource_element$namespace_uri$local_name$attributes'' );
    3849. -
    3850.         break;
    3851. -
    3852.     case IN_DESCRIPTION:
    3853. -
    3854. -
    3855.          $this->rdf_parser['top']['state'IN_PROPERTY_UNKNOWN_OBJECT;
    3856. -
    3857.         $this->_handle_property_element$namespace_uri$local_name$attributes );
    3858. -
    3859.         break;
    3860. -
    3861. -
    3862.         $this->_handle_collection_element($namespace_uri$local_name$attributes);
    3863. -
    3864.         break;
    3865. -
    3866. -
    3867.         /* if we're in a property with an unknown object type and we encounter
    3868. -
    3869.            an element, the object must be a resource, */
    3870. -
    3871.         $this->rdf_parser['top']['data']='';
    3872. -
    3873.         $this->rdf_parser['top']['parent']['state'IN_PROPERTY_RESOURCE;
    3874. -
    3875.         $this->rdf_parser['top']['state'IN_DESCRIPTION;
    3876. -
    3877.         $this->_handle_resource_element(
    3878. -
    3879.             $namespace_uri,
    3880. -
    3881.             $local_name,
    3882. -
    3883.             $attributes,
    3884. -
    3885.             $this->rdf_parser['top']['parent');
    3886. -
    3887.         break;
    3888. -
    3889.     case IN_PROPERTY_LITERAL:
    3890. -
    3891.         $this->_report_warning'no markup allowed in literals' );
    3892. -
    3893.         break;
    3894. -
    3895. -
    3896.         $this->rdf_parser['top']['state'IN_XML;
    3897. -
    3898.         /* fall through */
    3899. -
    3900.     case IN_XML:
    3901. -
    3902.         $this->rdf_parser['xml_literal']['depth']++;
    3903. -
    3904.         $this->_handle_xml_start_element($namespace_uri$local_name$attributes);    
    3905. -
    3906.         break;
    3907. -
    3908.     case IN_PROPERTY_RESOURCE:
    3909. -
    3910.         $this->_report_warning(
    3911. -
    3912.                      'only one element allowed inside a property element' );
    3913. -
    3914.         break;
    3915. -
    3916. -
    3917.         $this->_report_warning(
    3918. -
    3919.                     'no content allowed in property with rdf:resource, rdf:bagID, or property attributes' );
    3920. -
    3921.         break;
    3922. -
    3923.     case IN_UNKNOWN:
    3924. -
    3925.         break;
    3926. -
    3927.     }
    3928. -
    3929. }
    3930. -
    3931.  
    3932. -
    3933. /**
    3934. -
    3935.     property elements with text only as content set the state to
    3936. -
    3937.     IN_PROPERTY_LITERAL. as character data is received from expat,
    3938. -
    3939.     it is saved in a buffer and reported when the end tag is
    3940. -
    3941.     received.
    3942. -
    3943.   * @access    private
    3944. -
    3945. */ 
    3946. -
    3947. function _end_literal_property()
    3948. -
    3949. {
    3950. -
    3951.     if(!isset($this->rdf_parser['top']['statement_id'])) {
    3952. -
    3953.       $this->rdf_parser['top']['statement_id']='';
    3954. -
    3955.     }
    3956. -
    3957.     if(!isset($this->rdf_parser['top']['parent']['subject_type'])) {
    3958. -
    3959.       $this->rdf_parser['top']['parent']['subject_type']='';
    3960. -
    3961.     }
    3962. -
    3963.     if(!isset($this->rdf_parser['top']['parent']['subject'])) {
    3964. -
    3965.       $this->rdf_parser['top']['parent']['subject']='';
    3966. -
    3967.     }
    3968. -
    3969.     if(!isset($this->rdf_parser['top']['parent']['bag_id'])) {
    3970. -
    3971.       $this->rdf_parser['top']['parent']['bag_id']='';
    3972. -
    3973.     }
    3974. -
    3975.     if(!isset($this->rdf_parser['top']['parent']['statements'])) {
    3976. -
    3977.       $this->rdf_parser['top']['parent']['statements']=0;
    3978. -
    3979.     }
    3980. -
    3981.     if(!isset($this->rdf_parser['top']['predicate'])) {
    3982. -
    3983.       $this->rdf_parser['top']['predicate']='';
    3984. -
    3985.     }
    3986. -
    3987.     if(!isset($this->rdf_parser['top']['datatype'])) {
    3988. -
    3989.       $this->rdf_parser['top']['datatype']='';
    3990. -
    3991.     }
    3992. -
    3993.     if(!isset($this->rdf_parser['top']['ordinal'])) {
    3994. -
    3995.       $this->rdf_parser['top']['ordinal']=0;
    3996. -
    3997.     }
    3998. -
    3999.     $this->_report_statement(
    4000. -
    4001.         $this->rdf_parser['top']['parent']['subject_type'],
    4002. -
    4003.         $this->rdf_parser['top']['parent']['subject'],
    4004. -
    4005.         $this->rdf_parser['top']['predicate'],
    4006. -
    4007.         $this->rdf_parser['top']['ordinal'],
    4008. -
    4009.         RDF_OBJECT_TYPE_LITERAL,
    4010. -
    4011.         $this->rdf_parser['top']['data'],
    4012. -
    4013.         $this->rdf_parser['top']['xml_lang'],
    4014. -
    4015.         $this->rdf_parser['top']['parent']['bag_id'],
    4016. -
    4017.         $this->rdf_parser['top']['parent']['statements'],
    4018. -
    4019.         $this->rdf_parser['top']['statement_id']
    4020. -
    4021.         $this->rdf_parser['top']['datatype']);
    4022. -
    4023.  
    4024. -
    4025. }
    4026. -
    4027.  
    4028. -
    4029. /**
    4030. -
    4031.    * @param string $parser 
    4032. -
    4033.    * @param string $name 
    4034. -
    4035.    * @access    private
    4036. -
    4037. */ 
    4038. -
    4039. function _end_element_handler$parser$name )
    4040. -
    4041. {
    4042. -
    4043.     switch$this->rdf_parser['top']['state')
    4044. -
    4045.     {
    4046. -
    4047.     case IN_TOP_LEVEL:
    4048. -
    4049.         break;     
    4050. -
    4051.     case IN_XML:
    4052. -
    4053.         $this->_handle_xml_end_element($name);                
    4054. -
    4055.         break;
    4056. -
    4057.     case IN_PROPERTY_UNKNOWN_OBJECT:        
    4058. -
    4059.     case IN_PROPERTY_LITERAL:
    4060. -
    4061.         $this->_end_literal_property);
    4062. -
    4063.         break;
    4064. -
    4065. -
    4066.         $this->_pop_element(  );
    4067. -
    4068.         break;
    4069. -
    4070. -
    4071. //        $search =  array((0) => chr(10), (1) => chr(13), (2) => chr(9));
    4072. -
    4073. //        $replace = array((0) => '\n'   , (1) => '\r'   , (2) => '\t');
    4074. -
    4075. //        $this->rdf_parser["xml_literal"]["buffer"] 
    4076. -
    4077. //            = str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]);
    4078. -
    4079.  
    4080. -
    4081.         $this->rdf_parser['top']['data'$this->rdf_parser['xml_literal']['buffer'];
    4082. -
    4083.         $this->_end_literal_property();     
    4084. -
    4085.         $this->rdf_parser['xml_literal']['buffer''';    
    4086. -
    4087.        
    4088. -
    4089.         break;
    4090. -
    4091. -
    4092.         $this->_end_collection();
    4093. -
    4094.         break;      
    4095. -
    4096.     case IN_RDF:
    4097. -
    4098.     case IN_DESCRIPTION:
    4099. -
    4100.     case IN_PROPERTY_RESOURCE:
    4101. -
    4102. -
    4103.     case IN_UNKNOWN:
    4104. -
    4105.         break;
    4106. -
    4107.     }
    4108. -
    4109.  
    4110. -
    4111.     $this->_pop_element();
    4112. -
    4113. }
    4114. -
    4115.  
    4116. -
    4117. /**
    4118. -
    4119.    * @param string $parser 
    4120. -
    4121.    * @param string $s 
    4122. -
    4123.    * @access    private
    4124. -
    4125. */ 
    4126. -
    4127. function _character_data_handler$parser,$s)
    4128. -
    4129. {
    4130. -
    4131.     $len=strlen($s);
    4132. -
    4133.     switch$this->rdf_parser['top']['state')
    4134. -
    4135.     {
    4136. -
    4137.     case IN_PROPERTY_LITERAL:  
    4138. -
    4139. -
    4140.         ifisset($this->rdf_parser['top']['data']) )
    4141. -
    4142.         {
    4143. -
    4144.             $n strlen$this->rdf_parser['top']['data');
    4145. -
    4146.             $this->rdf_parser['top']['data'].= $s;
    4147. -
    4148.  
    4149. -
    4150.         }
    4151. -
    4152.         else
    4153. -
    4154.         {
    4155. -
    4156.             $this->rdf_parser['top']['data']=$s;
    4157. -
    4158.         }
    4159. -
    4160.  
    4161. -
    4162.         if$this->rdf_parser['top']['state'== IN_PROPERTY_UNKNOWN_OBJECT )
    4163. -
    4164.         {
    4165. -
    4166.             /* look for non-whitespace */
    4167. -
    4168.             for$i 0(( $i $len && (  ereg(" |\n|\t",$s$i }) ))$i++ );            
    4169. -
    4170.             /* if we found non-whitespace, this is a literal */
    4171. -
    4172.             if$i $len )
    4173. -
    4174.             {
    4175. -
    4176.                 $this->rdf_parser['top']['state'IN_PROPERTY_LITERAL;
    4177. -
    4178.             }
    4179. -
    4180.         }
    4181. -
    4182.  
    4183. -
    4184.         break;
    4185. -
    4186.     case IN_TOP_LEVEL:  
    4187. -
    4188.         break;
    4189. -
    4190.     case IN_PROPERTY_PARSE_TYPE_LITERAL:     
    4191. -
    4192.     case IN_XML:                 
    4193. -
    4194.         $this->rdf_parser['xml_literal']['buffer'.= $s;
    4195. -
    4196.         break;           
    4197. -
    4198.     case IN_RDF:
    4199. -
    4200.     case IN_DESCRIPTION:
    4201. -
    4202.     case IN_PROPERTY_RESOURCE:
    4203. -
    4204. -
    4205. -
    4206.     case IN_UNKNOWN:
    4207. -
    4208.         break;
    4209. -
    4210.     }
    4211. -
    4212. }
    4213. -
    4214.  
    4215. -
    4216.  
    4217. -
    4218.   /**
    4219. -
    4220.    * Adds a new statement to the model
    4221. -
    4222.    * This method is called by generateModel().
    4223. -
    4224.    *
    4225. -
    4226.    * @access    private
    4227. -
    4228.    * @param    string    &$user_data 
    4229. -
    4230.    * @param    string    $subject_type 
    4231. -
    4232.    * @param    string    $subject 
    4233. -
    4234.    * @param    string    $predicate 
    4235. -
    4236.    * @param    string    $ordinal 
    4237. -
    4238.    * @param    string    $object_type 
    4239. -
    4240.    * @param    string    $object 
    4241. -
    4242.    * @param    string    $xml_lang )
    4243. -
    4244.    * @return    object MemModel 
    4245. -
    4246.    */  
    4247. -
    4248. function add_statement_to_model(
    4249. -
    4250.     &$user_data,
    4251. -
    4252.     $subject_type,
    4253. -
    4254.     $subject,
    4255. -
    4256.     $predicate,
    4257. -
    4258.     $ordinal,
    4259. -
    4260.     $object_type,
    4261. -
    4262.     $object,
    4263. -
    4264.     $xml_lang,
    4265. -
    4266.     $datatype )
    4267. -
    4268. {
    4269. -
    4270.  
    4271. -
    4272.     // ParseUnicode
    4273. -
    4274.     if(UNIC_RDF){
    4275. -
    4276.         $subject=$this->str2unicode_nfc($subject);
    4277. -
    4278.         $predicate=$this->str2unicode_nfc($predicate);
    4279. -
    4280.         $object=$this->str2unicode_nfc($object);
    4281. -
    4282.     }
    4283. -
    4284.     
    4285. -
    4286.     //create subject
    4287. -
    4288.     if ($subject_type == RDF_SUBJECT_TYPE_BNODE
    4289. -
    4290.             $objsub new BlankNode($subject);
    4291. -
    4292.         else
    4293. -
    4294.             $objsub new Resource($subject);
    4295. -
    4296.          
    4297. -
    4298.     // create predicate    
    4299. -
    4300.     $objpred new Resource($predicate);
    4301. -
    4302.     
    4303. -
    4304.     // create object
    4305. -
    4306.     if (($object_type == RDF_OBJECT_TYPE_RESOURCE|| ($object_type == RDF_OBJECT_TYPE_BNODE)) {
    4307. -
    4308.             if ($object_type == RDF_OBJECT_TYPE_BNODE
    4309. -
    4310.                     $objobj new BlankNode($object);
    4311. -
    4312.                 else
    4313. -
    4314.                     $objobj new Resource($object);        
    4315. -
    4316.     else {
    4317. -
    4318.    
    4319. -
    4320.         $objobj new Literal($object);
    4321. -
    4322.         if ($datatype != ''{
    4323. -
    4324.             $objobj->setDatatype($datatype);
    4325. -
    4326.         }    
    4327. -
    4328.         elseif ($xml_lang !=''{
    4329. -
    4330.             $objobj->setLanguage($xml_lang);
    4331. -
    4332.         }     
    4333. -
    4334.     }
    4335. -
    4336.  
    4337. -
    4338.     // create statement
    4339. -
    4340.     $statement new Statement($objsub$objpred$objobj);
    4341. -
    4342.     
    4343. -
    4344.     // add statement to model
    4345. -
    4346.     if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){
    4347. -
    4348.         $this->model->addWithoutDuplicates($statement);
    4349. -
    4350.     }else 
    4351. -
    4352.         $this->model->add($statement);
    4353. -
    4354.     }
    4355. -
    4356.  
    4357. -
    4358.  
    4359. -
    4360. /* public functions */
    4361. -
    4362.  
    4363. -
    4364.   /**
    4365. -
    4366.    * Generates a new MemModel from a URI, a file or from memory.
    4367. -
    4368.    * If you want to parse an RDF document, pass the URI or location in the filesystem
    4369. -
    4370.    * of the RDF document. You can also pass RDF code direct to the function. If you pass
    4371. -
    4372.    * RDF code directly to the parser and there is no xml:base included, you should set
    4373. -
    4374.    * the base URI manually using the optional second parameter $rdfBaseURI.
    4375. -
    4376.    * Make sure that here are proper namespace declarations in your input document.
    4377. -
    4378.    *
    4379. -
    4380.    * @access    public
    4381. -
    4382.    * @param        string     $base 
    4383. -
    4384.    * @param     boolean  $rdfBaseURI 
    4385. -
    4386.    * @return    object MemModel 
    4387. -
    4388.    */  
    4389. -
    4390. function generateModel($base,$rdfBaseURI false$model false{
    4391. -
    4392.  
    4393. -
    4394.     // Check if $base is a URI or filename or a string containing RDF code.
    4395. -
    4396.     if (substr(ltrim($base),,1!= '<'{
    4397. -
    4398.     
    4399. -
    4400.     // $base is URL or filename
    4401. -
    4402.     $this->model $model?$model:new MemModel($base);
    4403. -
    4404.     
    4405. -
    4406.     $input fopen($base,'r'or die("RDF ParserCould not open File$baseStopped parsing.");
    4407. -
    4408.     $this->rdf_parser_createNULL );
    4409. -
    4410.     $this->rdf_set_base($base);
    4411. -
    4412.     $done=false;
    4413. -
    4414.     while(!$done)
    4415. -
    4416.     {
    4417. -
    4418.       $buf fread$input512 );
    4419. -
    4420.       $done feof($input);
    4421. -
    4422.     
    4423. -
    4424.       if $this->rdf_parse$buffeof($input) ) )
    4425. -
    4426.       {
    4427. -
    4428.         $err_code xml_get_error_code$this->rdf_get_xml_parser());
    4429. -
    4430.         $line xml_get_current_line_number($this->rdf_get_xml_parser() );
    4431. -
    4432.         $errmsg RDFAPI_ERROR '(class: parser; method: generateModel): XML-parser-error ' $err_code .' in Line ' $line .' of input document.';
    4433. -
    4434.         trigger_error($errmsgE_USER_ERROR);
    4435. -
    4436.       }
    4437. -
    4438.     
    4439. -
    4440.     /* close file. */
    4441. -
    4442.     fclose$input );
    4443. -
    4444.     
    4445. -
    4446.     else {
    4447. -
    4448.     // $base is RDF string
    4449. -
    4450.     $this->model $model?$model:new MemModel($base);
    4451. -
    4452.     
    4453. -
    4454.     $this->rdf_parser_createNULL );
    4455. -
    4456.     
    4457. -
    4458.     if ($rdfBaseURI!==false)
    4459. -
    4460.     {
    4461. -
    4462.         $this->rdf_set_base($rdfBaseURI);
    4463. -
    4464.     else
    4465. -
    4466.     {
    4467. -
    4468.         $this->rdf_set_baseNULL );
    4469. -
    4470.     }
    4471. -
    4472.     
    4473. -
    4474.       if $this->rdf_parse$baseTRUE ) )
    4475. -
    4476.       {
    4477. -
    4478.         $err_code xml_get_error_code$this->rdf_get_xml_parser());
    4479. -
    4480.         $line xml_get_current_line_number($this->rdf_get_xml_parser() );
    4481. -
    4482.         $errmsg RDFAPI_ERROR '(class: parser; method: generateModel): XML-parser-error ' $err_code .' in Line ' $line .' of input document.';
    4483. -
    4484.         trigger_error($errmsgE_USER_ERROR)
    4485. -
    4486.       }
    4487. -
    4488.     }
    4489. -
    4490.     // base_uri could have changed while parsing
    4491. -
    4492.     $this->model->setBaseURI($this->rdf_parser['base_uri']);
    4493. -
    4494.  
    4495. -
    4496.     if(isset($this->rdf_parser['namespaces'])){
    4497. -
    4498.         $this->model->addParsedNamespaces($this->rdf_parser['namespaces']);
    4499. -
    4500.     }
    4501. -
    4502.     
    4503. -
    4504.     $this->rdf_parser_free();
    4505. -
    4506.     
    4507. -
    4508.     return $this->model;    
    4509. -
    4510.  
    4511. -
    4512. }
    4513. -
    4514.  
    4515. -
    4516. /**
    4517. -
    4518.  * @param        string     $encoding 
    4519. -
    4520.  
    4521. -
    4522.  * @access    private
    4523. -
    4524. */ 
    4525. -
    4526. function rdf_parser_create$encoding )
    4527. -
    4528. {
    4529. -
    4530.  
    4531. -
    4532.     $parser xml_parser_create_ns$encodingNAMESPACE_SEPARATOR_CHAR );
    4533. -
    4534.  
    4535. -
    4536.     xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0)
    4537. -
    4538.     $this->rdf_parser['xml_parser'$parser;
    4539. -
    4540.  
    4541. -
    4542.     xml_set_object($this->rdf_parser['xml_parser']$this);
    4543. -
    4544.     xml_set_element_handler$this->rdf_parser['xml_parser']'_start_element_handler''_end_element_handler' );
    4545. -
    4546.     xml_set_character_data_handler$this->rdf_parser['xml_parser']'_character_data_handler' );
    4547. -
    4548.     xml_set_start_namespace_decl_handler($this->rdf_parser['xml_parser']'_start_ns_declaration_handler');
    4549. -
    4550.  
    4551. -
    4552.     return $this->rdf_parser;
    4553. -
    4554. }
    4555. -
    4556.  
    4557. -
    4558. /**
    4559. -
    4560.  * @param    resource    &$parser 
    4561. -
    4562.  * @param   string        $ns_prefix 
    4563. -
    4564.  * @param    string        $ns_uri 
    4565. -
    4566.  * @access    private
    4567. -
    4568. */ 
    4569. -
    4570. function _start_ns_declaration_handler(&$parser$ns_prefix$ns_uri)
    4571. -
    4572. {
    4573. -
    4574.     if (!$ns_prefix
    4575. -
    4576.         $this->rdf_parser['default_namespace'$ns_uri;
    4577. -
    4578.     else        
    4579. -
    4580.         $this->rdf_parser['namespaces'][$ns_uri$ns_prefix;
    4581. -
    4582. }
    4583. -
    4584.  
    4585. -
    4586.  
    4587. -
    4588. /**
    4589. -
    4590.  * @access    private
    4591. -
    4592. */ 
    4593. -
    4594. function rdf_parser_free)
    4595. -
    4596. {
    4597. -
    4598.     $z=3;
    4599. -
    4600.  
    4601. -
    4602.     $this->rdf_parser['base_uri']='';
    4603. -
    4604.     $this->rdf_parser['document_base_uri''';                    
    4605. -
    4606.  
    4607. -
    4608.     unset$this->rdf_parser );
    4609. -
    4610. }
    4611. -
    4612.  
    4613. -
    4614. /**
    4615. -
    4616.    * @param        string     $s 
    4617. -
    4618.    * @param        string     $is_final 
    4619. -
    4620.  * @access    private
    4621. -
    4622. */ 
    4623. -
    4624. function rdf_parse$s$is_final )
    4625. -
    4626. {
    4627. -
    4628.     return XML_Parse$this->rdf_parser['xml_parser']$s$is_final );
    4629. -
    4630. }
    4631. -
    4632.  
    4633. -
    4634. /**
    4635. -
    4636.  * @access    private
    4637. -
    4638. */ 
    4639. -
    4640. function rdf_get_xml_parser()
    4641. -
    4642. {
    4643. -
    4644.     return $this->rdf_parser['xml_parser']);
    4645. -
    4646. }
    4647. -
    4648.  
    4649. -
    4650. /**
    4651. -
    4652.    * @param        string     $base 
    4653. -
    4654.  * @access    private
    4655. -
    4656. */ 
    4657. -
    4658. function rdf_set_base($base )
    4659. -
    4660. {
    4661. -
    4662.     
    4663. -
    4664.     $this->rdf_parser['base_uri']=$base;
    4665. -
    4666.     
    4667. -
    4668.     $c substr($basestrlen($base)-,1);
    4669. -
    4670.     if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
    4671. -
    4672.          $this->rdf_parser['normalized_base_uri'$base '#';
    4673. -
    4674.     else
    4675. -
    4676.         $this->rdf_parser['normalized_base_uri'$base
    4677. -
    4678.  
    4679. -
    4680.     return 0;
    4681. -
    4682. }
    4683. -
    4684.  
    4685. -
    4686. /**
    4687. -
    4688.  * @access    private
    4689. -
    4690. */ 
    4691. -
    4692. function rdf_get_base()
    4693. -
    4694. {
    4695. -
    4696.         if ($this->rdf_parser['top']['element_base_uri'])
    4697. -
    4698.             return $this->rdf_parser['top']['element_base_uri'];
    4699. -
    4700.         else 
    4701. -
    4702.             return $this->rdf_parser['base_uri'];                          
    4703. -
    4704. }
    4705. -
    4706.  
    4707. -
    4708.  
    4709. -
    4710. // end: rdf_parser
    4711. -
    4712.  
    4713. -
    4714. ?>
    4715. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfSerializer.php.html deleted file mode 100755 index 3ed5b76e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRdfSerializer.php.html +++ /dev/null @@ -1,740 +0,0 @@ - - - - - - File Source for RdfSerializer.php - - - - - -

    Source for file RdfSerializer.php

    -

    Documentation is available at RdfSerializer.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5.  
    6. -
    7. // ----------------------------------------------------------------------------------
    8. -
    9. // Class: RdfSerializer
    10. -
    11. // ----------------------------------------------------------------------------------
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * An RDF seralizer.
    18. -
    19. * Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and
    20. -
    21. * rdf:nodeID directive.
    22. -
    23. * You can choose between different output syntaxes by using the configuration methods
    24. -
    25. * or changing the configuration default values in constants.php.
    26. -
    27. * This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.
    28. -
    29. *
    30. -
    31. @version  $Id: fsource_syntax__syntaxRdfSerializer.php.html 443 2007-06-01 16:25:38Z cax $
    32. -
    33. @author Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
    34. -
    35. *
    36. -
    37. @package syntax
    38. -
    39. @access  public
    40. -
    41. *
    42. -
    43. */
    44. -
    45. class RdfSerializer extends Object {
    46. -
    47.  
    48. -
    49.     // configuration
    50. -
    51.     var $use_entities;
    52. -
    53.     var $use_attributes;
    54. -
    55.     var $sort_model;
    56. -
    57.     var $rdf_qnames;
    58. -
    59.     var $use_xml_declaration;
    60. -
    61.  
    62. -
    63.     // properties
    64. -
    65.     var  $m_defaultNamespaces  = array();
    66. -
    67.     var  $m_namespaces = array();
    68. -
    69. -
    70.     var  $m_out;
    71. -
    72.     var  $m_baseURI;
    73. -
    74.     var  $m_statements = array();
    75. -
    76.     var  $m_currentSubject;
    77. -
    78.     var  $m_rdfIDElementText;
    79. -
    80.     var  $m_rdfAboutElementText;
    81. -
    82. -
    83.     var  $m_groupTypeStatement;
    84. -
    85.     var  $m_attributeStatements = array();
    86. -
    87.     var  $m_contentStatements = array();
    88. -
    89.     var  $rdf_qname_prefix;
    90. -
    91.  
    92. -
    93.     /**
    94. -
    95.     * Constructor
    96. -
    97.     *
    98. -
    99.     * @access   public
    100. -
    101.     */
    102. -
    103.     function RdfSerializer({
    104. -
    105.  
    106. -
    107.         // default serializer configuration
    108. -
    109.         $this->use_entities = SER_USE_ENTITIES;
    110. -
    111.         $this->use_attributes = SER_USE_ATTRIBUTES;
    112. -
    113.         $this->sort_model = SER_SORT_MODEL;
    114. -
    115.         $this->rdf_qnames = SER_RDF_QNAMES;
    116. -
    117.         $this->use_xml_declaration = SER_XML_DECLARATION;
    118. -
    119.  
    120. -
    121.         global $default_prefixes;
    122. -
    123.         foreach($default_prefixes as $key => $value){
    124. -
    125.             $this->addNamespacePrefix($key,$value);
    126. -
    127.         }
    128. -
    129.  
    130. -
    131.         require_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
    132. -
    133.     }
    134. -
    135.  
    136. -
    137.     /**
    138. -
    139.     * Serializer congiguration: Sort Model
    140. -
    141.     * Flag if the serializer should sort the model by subject before serializing.
    142. -
    143.     * TRUE makes the RDF code more compact.
    144. -
    145.     * TRUE is default. Default can be changed in constants.php.
    146. -
    147.     *
    148. -
    149.     * @param     boolean 
    150. -
    151.     * @access    public
    152. -
    153.     */
    154. -
    155.     function configSortModel($bool{
    156. -
    157.         $this->sort_model = $bool;
    158. -
    159.     }
    160. -
    161.  
    162. -
    163.     /**
    164. -
    165.     * Serializer congiguration: Use Entities
    166. -
    167.     * Flag if the serializer should use entities for URIs.
    168. -
    169.     * TRUE makes the RDF code more compact.
    170. -
    171.     * FALSE is default. Default can be changed in constants.php.
    172. -
    173.     *
    174. -
    175.     * @param     boolean 
    176. -
    177.     * @access    public
    178. -
    179.     */
    180. -
    181.     function configUseEntities($bool{
    182. -
    183.         $this->use_entities = $bool;
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     /**
    190. -
    191.     * Serializer congiguration: Use Attributes
    192. -
    193.     * Flag if the serializer should serialize triples as XML attributes where possible.
    194. -
    195.     * TRUE makes the RDF code more compact.
    196. -
    197.     * FALSE is default. Default can be changed in constants.php.
    198. -
    199.     *
    200. -
    201.     * @param     boolean 
    202. -
    203.     * @access    public
    204. -
    205.     */
    206. -
    207.     function configUseAttributes($bool{
    208. -
    209.         $this->use_attributes = $bool;
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     /**
    216. -
    217.     * Serializer congiguration: Use Qnames
    218. -
    219.     * Flag if the serializer should use qualified names for RDF reserved words.
    220. -
    221.     * TRUE makes the RDF code more compact.
    222. -
    223.     * TRUE is default. Default can be changed in constants.php.
    224. -
    225.     *
    226. -
    227.     * @param     boolean 
    228. -
    229.     * @access    public
    230. -
    231.     */
    232. -
    233.     function configUseQnames($bool{
    234. -
    235.         $this->rdf_qnames = $bool;
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     /**
    242. -
    243.     * Serializer congiguration: Use XML Declaration
    244. -
    245.     * Flag if the serializer should start documents with the xml declaration
    246. -
    247.     * <?xml version="1.0" encoding="UTF-8" ?>.
    248. -
    249.     * TRUE is default. Default can be changed in constants.php.
    250. -
    251.     *
    252. -
    253.     * @param             boolean 
    254. -
    255.     * @access    public
    256. -
    257.     */
    258. -
    259.     function configUseXmlDeclaration($bool{
    260. -
    261.         $this->use_xml_declaration = $bool;
    262. -
    263.     }
    264. -
    265.  
    266. -
    267.  
    268. -
    269.     /**
    270. -
    271.     * Adds a new prefix/namespace combination.
    272. -
    273.     *
    274. -
    275.     * @param     String $prefix 
    276. -
    277.     * @param     String $namespace 
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function addNamespacePrefix($prefix$namespace{
    284. -
    285.         $this->m_defaultNamespaces[$prefix$namespace;
    286. -
    287.     }
    288. -
    289.  
    290. -
    291.     /**
    292. -
    293.     * Serializes a model to RDF syntax.
    294. -
    295.     * RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean),
    296. -
    297.     * config_sort_model($boolean).
    298. -
    299.     * NOTE: There is only one default namespace allowed within an XML document.
    300. -
    301.     *       Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass
    302. -
    303.     *       another $xml_default_namespace as parameter, the model will be serialized
    304. -
    305.     *       as if SER_RDF_QNAMES were set to TRUE.
    306. -
    307.     *
    308. -
    309.     * @param     object MemModel $model 
    310. -
    311.     * @param     String $encoding 
    312. -
    313.     * @return    string 
    314. -
    315.     * @access    public
    316. -
    317.     */
    318. -
    319.     function serialize(&$model$xml_default_namespace NULL$encoding DEFAULT_ENCODING{
    320. -
    321.  
    322. -
    323.         if ($xml_default_namespace{
    324. -
    325.  
    326. -
    327.             if ($xml_default_namespace == RDF_NAMESPACE_URI{
    328. -
    329.                 $this->rdf_qnames = FALSE;
    330. -
    331.                 unset($this->m_defaultNamespaces[RDF_NAMESPACE_PREFIX]);
    332. -
    333.             }
    334. -
    335.             elseif ($xml_default_namespace == RDF_SCHEMA_URI{
    336. -
    337.                 unset($this->m_defaultNamespaces[RDF_SCHEMA_PREFIX]);
    338. -
    339.             }
    340. -
    341.             elseif (!SER_RDF_QNAMES)
    342. -
    343.             $this->rdf_qnames = TRUE;
    344. -
    345.  
    346. -
    347.             $this->addNamespacePrefix(NULL$xml_default_namespace);
    348. -
    349.         }
    350. -
    351.  
    352. -
    353.         //copy parsed namespaces
    354. -
    355.         $nsps array();
    356. -
    357.         $nsps $model->getParsedNamespaces();
    358. -
    359.         foreach($this->m_defaultNamespaces as $prefix => $namespace){
    360. -
    361.             if(!isset ($nsps[$namespace]))
    362. -
    363.             $nsps[$namespace$prefix;
    364. -
    365.         }
    366. -
    367.  
    368. -
    369.         // define rdf prefix (qname or not)
    370. -
    371.         if ($this->rdf_qnames){
    372. -
    373.             if(isset($nsps[RDF_NAMESPACE_URI])){
    374. -
    375.                 $this->rdf_qname_prefix = $nsps[RDF_NAMESPACE_URI].':';
    376. -
    377.             }else{
    378. -
    379.                 $this->rdf_qname_prefix = RDF_NAMESPACE_PREFIX ':';
    380. -
    381.             }
    382. -
    383.  
    384. -
    385.         }else{
    386. -
    387.             $this->rdf_qname_prefix = '';
    388. -
    389.         }
    390. -
    391.         // check if model is empty
    392. -
    393.         if ($model->size(== 0return "<"$this->rdf_qname_prefix . RDF_RDF ." xmlns:rdf='".RDF_NAMESPACE_URI."' />";
    394. -
    395.  
    396. -
    397.         foreach($nsps as $ns => $pre){
    398. -
    399.             $this->m_namespaces[$pre$ns;
    400. -
    401.         }
    402. -
    403.  
    404. -
    405.  
    406. -
    407.         // set base URI
    408. -
    409.         if ($model->getBaseURI()==NULL)
    410. -
    411.         $this->m_baseURI="opaque:uri";
    412. -
    413.         else
    414. -
    415.         $this->m_baseURI=$model->getBaseURI();
    416. -
    417.  
    418. -
    419.  
    420. -
    421.         if ($this->sort_model{
    422. -
    423.             // sort the array of statements
    424. -
    425.  
    426. -
    427.             foreach($model->triples as $key => $statement{
    428. -
    429.                 $stmkey $statement->subj->getURI(.
    430. -
    431.                 $statement->pred->getURI(.
    432. -
    433.                 (is_a($statement->obj,'Literal')?'"'.$statement->obj->getLabel().'"@'.$statement->obj->getLanguage().'^^'.$statement->obj->getDatatype():$statement->obj->getURI());
    434. -
    435.                 $this->m_statements[$stmkey$statement;
    436. -
    437.             }
    438. -
    439.             ksort($this->m_statements);
    440. -
    441.  
    442. -
    443.             /*
    444. -
    445.             // Sort using the PHP usort() function. Slower :-(
    446. -
    447.             $this->m_statements = $model->triples;
    448. -
    449.             usort($this->m_statements, "statementsorter");
    450. -
    451.             */
    452. -
    453.         else {
    454. -
    455.             $this->m_statements = $model->triples;
    456. -
    457.         }
    458. -
    459.         // collects namespaces
    460. -
    461.         $this->m_nextAutomaticPrefixIndex=0;
    462. -
    463.         $this->collectNamespaces($model);
    464. -
    465.  
    466. -
    467.         // start writing the contents
    468. -
    469.         $this->m_out="";
    470. -
    471.         if ($this->use_xml_declaration)
    472. -
    473.         $this->m_out .= '<?xml version="1.0" encoding="' $encoding '" ?>' LINEFEED;
    474. -
    475.         if (!HIDE_ADVERTISE)
    476. -
    477.         $this->m_out.="<!-- Generated by RdfSerializer.php from RDF RAP.".LINEFEED."# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html !-->".LINEFEED.LINEFEED ;
    478. -
    479.  
    480. -
    481.         // write entitie declarations
    482. -
    483.         if($this->use_entities{
    484. -
    485.             $this->m_out .= '<!DOCTYPE ' $this->rdf_qname_prefix .
    486. -
    487.             RDF_RDF.' [' LINEFEED;
    488. -
    489.             $this->writeEntityDeclarations();
    490. -
    491.             $this->m_out .= LINEFEED ']>' LINEFEED;
    492. -
    493.         }
    494. -
    495.  
    496. -
    497.         // start the RDF text
    498. -
    499.         $this->m_out .= '<' $this->rdf_qname_prefix . RDF_RDF;
    500. -
    501.  
    502. -
    503.         // write the xml:base
    504. -
    505.         if ($model->getBaseURI(!= NULL)
    506. -
    507.         $this->m_out .= LINEFEEDINDENTATION .'xml:base="'.$model->getBaseURI().'"';
    508. -
    509.  
    510. -
    511.         // write namespaces declarations
    512. -
    513.         $this->writeNamespaceDeclarations();
    514. -
    515.         $this->m_out .='>'LINEFEED;
    516. -
    517.  
    518. -
    519.         // write triples
    520. -
    521.         $this->writeDescriptions();
    522. -
    523.  
    524. -
    525.         $this->m_out .= LINEFEED;
    526. -
    527.         $this->m_out .='</' $this->rdf_qname_prefix . RDF_RDF .'>';
    528. -
    529.  
    530. -
    531.         $this->m_namespaces=null;
    532. -
    533.         $this->m_statements=null;
    534. -
    535.         $this->m_currentSubject=null;
    536. -
    537.         $this->m_groupTypeStatement=null;
    538. -
    539.         $this->m_attributeStatements=null;
    540. -
    541.         $this->m_contentStatements=null;
    542. -
    543.         $this->m_rdfResourceElementText=null;
    544. -
    545.  
    546. -
    547.         return $this->m_out;
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     /**
    554. -
    555.     * Serializes a model and saves it into a file.
    556. -
    557.     * Returns FALSE if the model couldn't be saved to the file.
    558. -
    559.     *
    560. -
    561.     * @param     object MemModel $model 
    562. -
    563.     * @param     String $encoding 
    564. -
    565.     * @return    boolean 
    566. -
    567.     * @access    public
    568. -
    569.     */
    570. -
    571.     function  saveAs(&$model$filename$encoding DEFAULT_ENCODING{
    572. -
    573.         // serialize model
    574. -
    575.         $RDF $this->serialize($modelNULL$encoding);
    576. -
    577.  
    578. -
    579.         //write serialized model to file
    580. -
    581.         $file_handle @fopen($filename'w');
    582. -
    583.         if ($file_handle{
    584. -
    585.             fwrite($file_handle$RDF);
    586. -
    587.             fclose($file_handle);
    588. -
    589.             return TRUE;
    590. -
    591.         else {
    592. -
    593.             return FALSE;
    594. -
    595.         };
    596. -
    597.     }
    598. -
    599.  
    600. -
    601.     /**
    602. -
    603.     * @access   private
    604. -
    605.     */
    606. -
    607.     function writeEntityDeclarations({
    608. -
    609.         foreach($this->m_namespaces as $prefix => $namespace{
    610. -
    611.             $this->m_out .= INDENTATION '<!ENTITY '$prefix " '" $namespace ."'>".LINEFEED;
    612. -
    613.         }
    614. -
    615.     }
    616. -
    617.  
    618. -
    619.     /**
    620. -
    621.     * @access   private
    622. -
    623.     */
    624. -
    625.     function writeNamespaceDeclarations({
    626. -
    627.         foreach($this->m_namespaces as $prefix => $namespace{
    628. -
    629.  
    630. -
    631.             if ($prefix == RDF_NAMESPACE_PREFIX && !$this->rdf_qnames{
    632. -
    633.  
    634. -
    635.                 if($this->use_entities{
    636. -
    637.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
    638. -
    639.                     '="&' $prefix ';"';
    640. -
    641.                 else {
    642. -
    643.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
    644. -
    645.                     '="' $namespace '"';
    646. -
    647.                 }
    648. -
    649.             else {
    650. -
    651.                 if ($prefix == NULL)
    652. -
    653.                 $colon_prefix $prefix;
    654. -
    655.                 else
    656. -
    657.                 $colon_prefix ":" .$prefix;
    658. -
    659.  
    660. -
    661.                 if($this->use_entities{
    662. -
    663.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
    664. -
    665.                     .$colon_prefix .'="&' $prefix ';"';
    666. -
    667.                 else {
    668. -
    669.                     $this->m_out .= LINEFEED INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
    670. -
    671.                     .$colon_prefix .'="' $namespace '"';
    672. -
    673.                 }
    674. -
    675.             }
    676. -
    677.         }
    678. -
    679.     }
    680. -
    681.  
    682. -
    683.     /**
    684. -
    685.     * @access   private
    686. -
    687.     */
    688. -
    689.     function writeDescriptions()  {
    690. -
    691.  
    692. -
    693.         $this->m_groupTypeStatement = NULL;
    694. -
    695.         $this->m_attributeStatements = array();
    696. -
    697.         $this->m_contentStatements = array();
    698. -
    699.         $this->m_currentSubject = NULL;
    700. -
    701.  
    702. -
    703.         foreach($this->m_statements as $key => $statement{
    704. -
    705.             $subject $statement->getSubject();
    706. -
    707.             $predicate $statement->getPredicate();
    708. -
    709.             $object $statement->getobject();
    710. -
    711.  
    712. -
    713.             // write Group and update current subject if nessesary
    714. -
    715.             if ($this->m_currentSubject==NULL || !$this->m_currentSubject->equals($subject)) {
    716. -
    717.                 $this->writeGroup();
    718. -
    719.                 $this->m_currentSubject=$subject;
    720. -
    721.             }
    722. -
    723.  
    724. -
    725.             // classify the statement
    726. -
    727.             if (($predicate->getURI(== RDF_NAMESPACE_URI.RDF_TYPE&& is_a($object'Resource'&& !$this->m_groupTypeStatement{
    728. -
    729.                 $this->writeGroup();
    730. -
    731.                 $this->m_groupTypeStatement = $statement;
    732. -
    733.             
    734. -
    735.             elseif ($this->canAbbreviateValue($object&&
    736. -
    737.             $this->use_attributes &&
    738. -
    739.             $this->checkForDoubleAttributes($predicate))
    740. -
    741.             {
    742. -
    743.                 if (is_a($object'Literal')) {
    744. -
    745.                     if ($object->getDatatype(== NULL{
    746. -
    747.                         $this->m_attributeStatements[$statement;
    748. -
    749.                     else {
    750. -
    751.                         $this->m_contentStatements[$statement;
    752. -
    753.                     }
    754. -
    755.                 else {
    756. -
    757.                     $this->m_attributeStatements[$statement;
    758. -
    759.                 }
    760. -
    761.             else {
    762. -
    763.                 $this->m_contentStatements[$statement;
    764. -
    765.             }
    766. -
    767.         }
    768. -
    769.         $this->writeGroup();
    770. -
    771.     }
    772. -
    773.  
    774. -
    775.     /**
    776. -
    777.     * @access   private
    778. -
    779.     */
    780. -
    781.     function writeGroup({
    782. -
    783.         if ($this->m_currentSubject==NULL || ($this->m_groupTypeStatement==NULL && (count($this->m_attributeStatements)==0&& (count($this->m_contentStatements)==0)))
    784. -
    785.         return;
    786. -
    787.         if ($this->m_groupTypeStatement!=NULL)
    788. -
    789.         $outerElementName=$this->getElementText($this->m_groupTypeStatement->obj->getURI());
    790. -
    791.         else
    792. -
    793.         $outerElementName $this->rdf_qname_prefix . RDF_DESCRIPTION;
    794. -
    795.         $this->m_out .= LINEFEED '<';
    796. -
    797.         $this->m_out .= $outerElementName;
    798. -
    799.  
    800. -
    801.         $this->m_out .= ' ';
    802. -
    803.  
    804. -
    805.  
    806. -
    807.         $this->writeSubjectURI($this->m_currentSubject);
    808. -
    809.  
    810. -
    811.         // attribute Statements
    812. -
    813.         if ($this->use_attributes)
    814. -
    815.         $this->writeAttributeStatements();
    816. -
    817.  
    818. -
    819.         if (count($this->m_contentStatements)==0)
    820. -
    821.         $this->m_out .= '/>' LINEFEED;
    822. -
    823.         else {
    824. -
    825.             $this->m_out .= '>' LINEFEED;
    826. -
    827.  
    828. -
    829.             // content statements
    830. -
    831.             $this->writeContentStatements();
    832. -
    833.  
    834. -
    835.             $this->m_out .= '</';
    836. -
    837.             $this->m_out .= $outerElementName;
    838. -
    839.             $this->m_out .= '>'LINEFEED;
    840. -
    841.         }
    842. -
    843.         $this->m_groupTypeStatement = NULL;
    844. -
    845.         $this->m_attributeStatements = array();
    846. -
    847.         $this->m_contentStatements = array();
    848. -
    849.     }
    850. -
    851.  
    852. -
    853.     /**
    854. -
    855.     * @param object Node $predicate 
    856. -
    857.     * @access   private
    858. -
    859.     */
    860. -
    861.     function checkForDoubleAttributes($predicate{
    862. -
    863.         foreach($this->m_attributeStatements as $key => $statement{
    864. -
    865.             if ($statement->pred->equals($predicate))
    866. -
    867.             return FALSE;
    868. -
    869.         }
    870. -
    871.         return TRUE;
    872. -
    873.     }
    874. -
    875.  
    876. -
    877.     /**
    878. -
    879.     * @param STRING $uri 
    880. -
    881.     * @access   private
    882. -
    883.     */
    884. -
    885.     function relativizeURI($uri{
    886. -
    887.         $uri_namespace RDFUtil::guessNamespace($uri);
    888. -
    889.         if ($uri_namespace == $this->m_baseURI{
    890. -
    891.             return RDFUtil::guessName($uri);
    892. -
    893.         else {
    894. -
    895.             return $uri;
    896. -
    897.         }
    898. -
    899.     }
    900. -
    901.  
    902. -
    903.     /**
    904. -
    905.     * @param object Node $subject_node 
    906. -
    907.     *
    908. -
    909.     * @access   private
    910. -
    911.     */
    912. -
    913.  
    914. -
    915.     function writeSubjectURI($subject_node{
    916. -
    917.         $currentSubjectURI $subject_node->getURI();
    918. -
    919.         $relativizedURI $this->relativizeURI($currentSubjectURI);
    920. -
    921.  
    922. -
    923.         // if submitted subject ist a blank node, use rdf:nodeID
    924. -
    925.         if (is_a($this->m_currentSubject'BlankNode')) {
    926. -
    927.             $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
    928. -
    929.             $this->m_out .= '="';
    930. -
    931.             $this->m_out .= $relativizedURI;
    932. -
    933.         else {
    934. -
    935.  
    936. -
    937.  
    938. -
    939.             if (!($relativizedURI == $currentSubjectURI)) {
    940. -
    941.                 $this->m_out .= $this->rdf_qname_prefix . RDF_ID;
    942. -
    943.                 $this->m_out .= '="';
    944. -
    945.                 $this->m_out .= $relativizedURI;
    946. -
    947.             else {
    948. -
    949.                 $this->m_out .= $this->rdf_qname_prefix . RDF_ABOUT;
    950. -
    951.                 $this->m_out .= '="';
    952. -
    953.                 $this->writeAbsoluteResourceReference($relativizedURI);
    954. -
    955.             };
    956. -
    957.         };
    958. -
    959.         $this->m_out .= '"';
    960. -
    961.     }
    962. -
    963.  
    964. -
    965.     /**
    966. -
    967.     * @access   private
    968. -
    969.     */
    970. -
    971.     function writeAttributeStatements({
    972. -
    973.         foreach($this->m_attributeStatements as $key => $statement{
    974. -
    975.             $this->m_out .= LINEFEED;
    976. -
    977.             $this->m_out .= INDENTATION;
    978. -
    979.             $this->m_out .= $this->getElementText($statement->pred->getURI());
    980. -
    981.             $this->m_out .= '=';
    982. -
    983.             $value=$statement->obj->getLabel();
    984. -
    985.             $quote=$this->getValueQuoteType($value);
    986. -
    987.             $this->m_out .= $quote;
    988. -
    989.             $this->m_out .= $value;
    990. -
    991.             $this->m_out .= $quote;
    992. -
    993.         }
    994. -
    995.     }
    996. -
    997.  
    998. -
    999.     /**
    1000. -
    1001.     * @access   private
    1002. -
    1003.     */
    1004. -
    1005.     function writeContentStatements()  {
    1006. -
    1007.         foreach($this->m_contentStatements as $key => $statement{
    1008. -
    1009.             $this->m_out .= INDENTATION;
    1010. -
    1011.             $this->m_out .= '<';
    1012. -
    1013.             $predicateElementText=$this->getElementText($statement->pred->getURI());
    1014. -
    1015.             $this->m_out .= $predicateElementText;
    1016. -
    1017.  
    1018. -
    1019.             if (is_a($statement->obj'Resource')) {
    1020. -
    1021.                 $this->writeResourceReference($statement->obj);
    1022. -
    1023.                 $this->m_out .= '/>' LINEFEED;
    1024. -
    1025.             else {
    1026. -
    1027.                 if(is_a($statement->obj'Literal')) {
    1028. -
    1029.                     if ($statement->obj->getDatatype()!= NULL)
    1030. -
    1031.                     if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI RDF_XMLLITERAL{
    1032. -
    1033.                         $this->m_out .= ' ' RDF_NAMESPACE_PREFIX ':' RDF_PARSE_TYPE '="' RDF_PARSE_TYPE_LITERAL '"';
    1034. -
    1035.                     else {
    1036. -
    1037.                         $this->m_out .= ' ' RDF_NAMESPACE_PREFIX ':' RDF_DATATYPE '="' $statement->obj->getDatatype('"';
    1038. -
    1039.                     }
    1040. -
    1041.                     if ($statement->obj->getLanguage()!= NULL)
    1042. -
    1043.                     $this->m_out .= ' ' XML_NAMESPACE_PREFIX ':' XML_LANG '="' $statement->obj->getLanguage('"';
    1044. -
    1045.                 };
    1046. -
    1047.                 $this->m_out .= '>';
    1048. -
    1049.                 if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI RDF_XMLLITERAL{
    1050. -
    1051.                     $this->m_out .= $statement->obj->getLabel();
    1052. -
    1053.                 else {
    1054. -
    1055.                     $this->writeTextValue($statement->obj->getLabel());
    1056. -
    1057.                 }
    1058. -
    1059.                 $this->m_out .= '</';
    1060. -
    1061.                 $this->m_out .= $predicateElementText;
    1062. -
    1063.                 $this->m_out .= '>' LINEFEED;
    1064. -
    1065.             }
    1066. -
    1067.         }
    1068. -
    1069.     }
    1070. -
    1071.  
    1072. -
    1073.     /**
    1074. -
    1075.     * @param Object $object_node 
    1076. -
    1077.     * @access   private
    1078. -
    1079.     */
    1080. -
    1081.     function writeResourceReference($object_node)  {
    1082. -
    1083.         $rebaseURI $object_node->getURI();
    1084. -
    1085.         $this->m_out .= ' ';
    1086. -
    1087.         if (is_a($object_node'BlankNode')) {
    1088. -
    1089.             $this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
    1090. -
    1091.         else {
    1092. -
    1093.             $this->m_out .= $this->rdf_qname_prefix . RDF_RESOURCE;
    1094. -
    1095.         };
    1096. -
    1097.  
    1098. -
    1099.         $this->m_out .= '="';
    1100. -
    1101.         $relativizedURI $this->relativizeURI($rebaseURI);
    1102. -
    1103.         if (!($relativizedURI == $rebaseURI))
    1104. -
    1105.         if (!is_a($object_node'BlankNode'))
    1106. -
    1107.         $this->m_out .= '#' $relativizedURI;
    1108. -
    1109.         else
    1110. -
    1111.         $this->m_out .=  $relativizedURI;
    1112. -
    1113.         else
    1114. -
    1115.         $this->writeAbsoluteResourceReference($rebaseURI);
    1116. -
    1117.         $this->m_out .= '"';
    1118. -
    1119.     }
    1120. -
    1121.  
    1122. -
    1123.  
    1124. -
    1125.     /**
    1126. -
    1127.     * @param String $rebaseURI 
    1128. -
    1129.     * @access   private
    1130. -
    1131.     */
    1132. -
    1133.     function writeAbsoluteResourceReference($rebaseURI{
    1134. -
    1135.         $namespace=RDFUtil::guessNamespace($rebaseURI);
    1136. -
    1137.         $localName=RDFUtil::guessName($rebaseURI);
    1138. -
    1139.         $text=$rebaseURI;
    1140. -
    1141.         if ($namespace!='' and $this->use_entities{
    1142. -
    1143.             $prefixarray_search($namespace$this->m_namespaces);
    1144. -
    1145.             $text='&'.$prefix.';'.$localName;
    1146. -
    1147.         else $text RDFUtil::escapeValue($text);
    1148. -
    1149.         $this->m_out .= $text;
    1150. -
    1151.     }
    1152. -
    1153.  
    1154. -
    1155.     /**
    1156. -
    1157.     * @param STRING $textValue 
    1158. -
    1159.     * @access   private
    1160. -
    1161.     */
    1162. -
    1163.     function writeTextValue($textValue{
    1164. -
    1165.         if ($this->getValueQuoteType($textValue)==USE_CDATA)
    1166. -
    1167.         $this->writeEscapedCDATA($textValue);
    1168. -
    1169.         else
    1170. -
    1171.         $this->m_out .= $textValue;
    1172. -
    1173.     }
    1174. -
    1175.  
    1176. -
    1177.     /**
    1178. -
    1179.     * @param STRING $textValue 
    1180. -
    1181.     * @access   private
    1182. -
    1183.     */
    1184. -
    1185.     function writeEscapedCDATA($textValue{
    1186. -
    1187.         $this->m_out .= '<![CDATA[' $textValue ']]>';
    1188. -
    1189.     }
    1190. -
    1191.  
    1192. -
    1193.     /**
    1194. -
    1195.     * @param STRING $textValue 
    1196. -
    1197.     * @access   private
    1198. -
    1199.     */
    1200. -
    1201.     function getValueQuoteType($textValue{
    1202. -
    1203.         $quote=USE_ANY_QUOTE;
    1204. -
    1205.         $hasBreaks=FALSE;
    1206. -
    1207.         $whiteSpaceOnly=TRUE;
    1208. -
    1209.         for ($i=0$i<strlen($textValue)$i++{
    1210. -
    1211.             $c=$textValue{$i};
    1212. -
    1213.             if ($c=='<' || $c=='>' || $c=='&')
    1214. -
    1215.             return USE_CDATA;
    1216. -
    1217.             if ($c==LINEFEED)
    1218. -
    1219.             $hasBreaks=TRUE;
    1220. -
    1221.             if ($c=='"' || $c=="\'"{
    1222. -
    1223.                 if ($quote==USE_ANY_QUOTE)
    1224. -
    1225.                 $quote=($c=='"'"\'" "\"";
    1226. -
    1227.                 elseif ($c==$quote)
    1228. -
    1229.                 return USE_CDATA;
    1230. -
    1231.             }
    1232. -
    1233.             if (!($c == ' '))
    1234. -
    1235.             $whiteSpaceOnly FALSE;
    1236. -
    1237.         }
    1238. -
    1239.         if ($whiteSpaceOnly || $hasBreaks)
    1240. -
    1241.         return USE_CDATA;
    1242. -
    1243.         return $quote==USE_ANY_QUOTE '"' $quote;
    1244. -
    1245.     }
    1246. -
    1247.  
    1248. -
    1249.     /**
    1250. -
    1251.     * @param object Node $node 
    1252. -
    1253.     * @access   private
    1254. -
    1255.     */
    1256. -
    1257.     function canAbbreviateValue($node{
    1258. -
    1259.         if (is_a($node'Literal')) {
    1260. -
    1261.             $value$node->getLabel();
    1262. -
    1263.             if (strlen($value)<MAX_ALLOWED_ABBREVIATED_LENGTH{
    1264. -
    1265.                 $c=$this->getValueQuoteType($value);
    1266. -
    1267.                 return $c=='"' || $c=='\'';
    1268. -
    1269.             }
    1270. -
    1271.         }
    1272. -
    1273.         return FALSE;
    1274. -
    1275.     }
    1276. -
    1277.  
    1278. -
    1279.     /**
    1280. -
    1281.     * @param STRING $elementName 
    1282. -
    1283.     * @access   private
    1284. -
    1285.     */
    1286. -
    1287.     function getElementText($elementName)  {
    1288. -
    1289.         $namespace=RDFUtil::guessNamespace($elementName);
    1290. -
    1291.         $localName=RDFUtil::guessName($elementName);
    1292. -
    1293.         if ($namespace=="")
    1294. -
    1295.         return $localName;
    1296. -
    1297.         $prefix=array_search($namespace$this->m_namespaces);
    1298. -
    1299.  
    1300. -
    1301.         if ($prefix===FALSE{
    1302. -
    1303.             $errmsg RDFAPI_ERROR "(class: Serializer; method: getElementText): Prefix for element '" $elementName "' cannot be found.";
    1304. -
    1305.             trigger_error($errmsgE_USER_ERROR);
    1306. -
    1307.         }
    1308. -
    1309.         switch ($prefix{
    1310. -
    1311.             case RDF_NAMESPACE_PREFIX:
    1312. -
    1313.             return $this->rdf_qname_prefix . $localName;
    1314. -
    1315.             case NULL:
    1316. -
    1317.             return $localName;
    1318. -
    1319.             default:
    1320. -
    1321.             return $prefix":" .$localName;
    1322. -
    1323.         }
    1324. -
    1325.     }
    1326. -
    1327.  
    1328. -
    1329.     /**
    1330. -
    1331.     * @param object MemModel $model 
    1332. -
    1333.     * @access   private
    1334. -
    1335.     */
    1336. -
    1337.     function collectNamespaces($model)  {
    1338. -
    1339.         foreach($model->triples as $key => $value{
    1340. -
    1341.  
    1342. -
    1343.             if ($this->use_entities{
    1344. -
    1345.                 $this->collectNamespace($value->getSubject());
    1346. -
    1347.                 if(!is_a($value->getObject()'Literal'))
    1348. -
    1349.                 $this->collectNamespace($value->getObject());
    1350. -
    1351.  
    1352. -
    1353.             else {
    1354. -
    1355.  
    1356. -
    1357.                 if  ($value->pred->getURI(== RDF_NAMESPACE_URI.RDF_TYPE)
    1358. -
    1359.                 $this->collectNamespace($value->getObject());
    1360. -
    1361.                 elseif
    1362. -
    1363.                 (($value->pred->getURI(== RDF_NAMESPACE_URI.RDFS_SUBCLASSOF||
    1364. -
    1365.                 ($value->pred->getURI(== RDF_NAMESPACE_URI.RDFS_SUBPROPERTYOF)) {
    1366. -
    1367.                     $this->collectNamespace($value->getSubject());
    1368. -
    1369.                     $this->collectNamespace($value->getObject());
    1370. -
    1371.                 }
    1372. -
    1373.             }
    1374. -
    1375.  
    1376. -
    1377.             $this->collectNamespace($value->getPredicate());
    1378. -
    1379.  
    1380. -
    1381.         }
    1382. -
    1383.     }
    1384. -
    1385.  
    1386. -
    1387.     /**
    1388. -
    1389.     * @param object Resource $resource 
    1390. -
    1391.     * @access   private
    1392. -
    1393.     */
    1394. -
    1395.     function collectNamespace($resource)  {
    1396. -
    1397.  
    1398. -
    1399.         $namespace=RDFUtil::getNamespace($resource);
    1400. -
    1401.         if (!in_array($namespace$this->m_namespaces)&&$namespace!=''{
    1402. -
    1403.             $prefix array_search$namespace$this->m_defaultNamespaces);
    1404. -
    1405.             if ($prefix===FALSE)
    1406. -
    1407.             $prefix=$this->getNextNamespacePrefix();
    1408. -
    1409.             $this->m_namespaces[$prefix$namespace;
    1410. -
    1411.         }
    1412. -
    1413.     }
    1414. -
    1415.  
    1416. -
    1417.     /**
    1418. -
    1419.     * @access   private
    1420. -
    1421.     */
    1422. -
    1423.     function getNextNamespacePrefix({
    1424. -
    1425.         $this->m_nextAutomaticPrefixIndex++;
    1426. -
    1427.         return GENERAL_PREFIX_BASE $this->m_nextAutomaticPrefixIndex;
    1428. -
    1429.     }
    1430. -
    1431.  
    1432. -
    1433. }
    1434. -
    1435. ?>
    1436. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:50 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRssParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRssParser.php.html deleted file mode 100755 index 8807f3b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_syntax__syntaxRssParser.php.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - File Source for RssParser.php - - - - - -

    Source for file RssParser.php

    -

    Documentation is available at RssParser.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RSS/ATOM Parser
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * RSS/ATOM Parser
    18. -
    19.  * 
    20. -
    21.  * This class uses the MagpieRSS Parser by Kellan Elliott-McCrea <kellan@protest.net>. MagpieRSS is
    22. -
    23.  * compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions).
    24. -
    25.  * Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/)
    26. -
    27.  * 
    28. -
    29.  *
    30. -
    31.  *
    32. -
    33.  * @author Tobias Gau <tobias.gauss@web.de>
    34. -
    35.  * @version $Id: fsource_syntax__syntaxRssParser.php.html 443 2007-06-01 16:25:38Z cax $
    36. -
    37.  * @package syntax
    38. -
    39.  * @access public
    40. -
    41.  ***/
    42. -
    43.  
    44. -
    45. class RssParser extends Object {
    46. -
    47.     var $type;
    48. -
    49.     
    50. -
    51.     /**
    52. -
    53.     * Main function
    54. -
    55.     *
    56. -
    57.     * @param $url location of the document
    58. -
    59.     * @return parsed model
    60. -
    61.     */
    62. -
    63.     function generateModel($url){
    64. -
    65.         $rss null;
    66. -
    67.         if(substr($url,0,7)=="http://"){
    68. -
    69.             $rss fetch_rss($url);
    70. -
    71.         }else{
    72. -
    73.                 $string file_get_contents($url);
    74. -
    75.                 $rss new MagpieRSS($string);    
    76. -
    77.         }
    78. -
    79.         
    80. -
    81.         $model ModelFactory::getMemModel();    
    82. -
    83.         $bn new Resource($url);
    84. -
    85.         
    86. -
    87.         $this->type = $rss->feed_type;
    88. -
    89.         $version $rss->feed_version;
    90. -
    91.         
    92. -
    93.         $nmsp null;
    94. -
    95.          if($version == "1.0")
    96. -
    97.                   $nmsp "http://purl.org/rss/1.0/";
    98. -
    99.          if($version == "0.91")
    100. -
    101.                   $nmsp "http://my.netscape.com/publish/formats/rss-spec-0.91.html#";
    102. -
    103.          if($version == "2.0")
    104. -
    105.                   $nmsp "http://purl.org/rss/1.0/";
    106. -
    107.          if($this->type == "Atom")
    108. -
    109.                   $nmsp "http://www.w3.org/2005/Atom";
    110. -
    111.           
    112. -
    113.         if($this->type == "Atom")
    114. -
    115.             $this->channel($model,$rss,$bn,$nmsp,"feed");
    116. -
    117.         else 
    118. -
    119.             $this->channel($model,$rss,$bn,$nmsp,"channel");
    120. -
    121.         $this->image($model,$rss,$bn,$nmsp);
    122. -
    123.         $this->items($model,$rss,$bn,$nmsp);
    124. -
    125.         $model->addNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");
    126. -
    127.         if($nmsp!= null)
    128. -
    129.             $model->addNamespace($this->type,$nmsp);
    130. -
    131.         return $model;
    132. -
    133.     }
    134. -
    135.  
    136. -
    137.     /**
    138. -
    139.     * Parses the image if there is one.
    140. -
    141.     *
    142. -
    143.     * @param $model the model
    144. -
    145.     * @param $rss the magpie parser object
    146. -
    147.     * @param $bnOrg the node which represents the channel
    148. -
    149.     * @param $nmsp the
    150. -
    151.     */
    152. -
    153.     function image(&$model,&$rss,&$bnOrg,&$nmsp){        
    154. -
    155.         if(count($rss->image)>0){
    156. -
    157.             if(isset($rss->image['about'])){
    158. -
    159.                 $bn new Resource($rss->image['about']);
    160. -
    161.             }else if(isset($rss->image['url'])){
    162. -
    163.                 $bn new Resource($rss->image['url']);
    164. -
    165.             }else{
    166. -
    167.                 $bn new BlankNode("image");
    168. -
    169.             }
    170. -
    171.             $model->add(new Statement($bnOrg,new Resource($nmsp."image"),$bn));
    172. -
    173.             $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource($nmsp."image")));
    174. -
    175.         }
    176. -
    177.         foreach($rss->image as $key => $value){
    178. -
    179.         $statement null;    
    180. -
    181.         switch($key){
    182. -
    183.                     case "dc":
    184. -
    185.                         $this->dc($bn,$model,$value);
    186. -
    187.                     break;
    188. -
    189.                     case "sy":
    190. -
    191.                         $this->sy($bn,$model,$value);
    192. -
    193.                     break;
    194. -
    195.                     default :
    196. -
    197.                         $statement new Statement($bn,new Resource($nmsp.$key)new Literal($value));
    198. -
    199.                     break;
    200. -
    201.                 }
    202. -
    203.             if($statement != null){
    204. -
    205.                 $model->add($statement);
    206. -
    207.             }
    208. -
    209.         }
    210. -
    211.     
    212. -
    213.     }
    214. -
    215.     
    216. -
    217.     /**
    218. -
    219.     * Parses the rss items/ atom entries.
    220. -
    221.     *
    222. -
    223.     * @param $model the model
    224. -
    225.     * @param $rss the magpie parser object
    226. -
    227.     * @param $bnOrg the node which represents the channel
    228. -
    229.     * @param $nmsp the
    230. -
    231.     */
    232. -
    233.     function items(&$model,&$rss,&$bnOrg,&$nmsp){        
    234. -
    235.         $items new BlankNode("items");
    236. -
    237.         $model->add(new Statement($bnOrg,new Resource($nmsp."items"),$items));
    238. -
    239.         $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq")));
    240. -
    241.         $i 1;
    242. -
    243.         foreach($rss->items as $outerKey => $outerValue){
    244. -
    245.             if(isset($outerValue['about'])){
    246. -
    247.                 $bn new Resource($outerValue['about']);
    248. -
    249.             }else if(isset($outerValue['guid'])){
    250. -
    251.                 $bn new Resource($outerValue['guid']);
    252. -
    253.             }else if(isset($outerValue['id'])){
    254. -
    255.                 $bn new Resource($outerValue['id']);
    256. -
    257.             }else{
    258. -
    259.                 $bn new Blanknode("item".$i);
    260. -
    261.             }
    262. -
    263.             $model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#_".$i),$bn));
    264. -
    265.             if($this->type == "Atom"){
    266. -
    267.                 $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/2005/Atomentry")));
    268. -
    269.             }else{
    270. -
    271.                 $model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://purl.org/rss/1.0/item")));
    272. -
    273.             }
    274. -
    275.             foreach($outerValue as $key => $value){
    276. -
    277.                 $statement null;
    278. -
    279.                 switch($key){
    280. -
    281.                     case "about":
    282. -
    283.                         break;
    284. -
    285.                     case "guid":
    286. -
    287.                         break;
    288. -
    289.                     case "dc":
    290. -
    291.                         $this->dc($bn,$model,$value);
    292. -
    293.                     break;
    294. -
    295.                     case "sy":
    296. -
    297.                         $this->sy($bn,$model,$value);
    298. -
    299.                     break;
    300. -
    301.                     default :
    302. -
    303.                         if($value != null)
    304. -
    305.                         $statement new Statement($bn,new Resource($nmsp.$key)new Literal($value));
    306. -
    307.                     break;
    308. -
    309.                 }
    310. -
    311.                 if($statement != null){
    312. -
    313.                     $model->add($statement);
    314. -
    315.                 }
    316. -
    317.             }
    318. -
    319.             $i++;
    320. -
    321.         }
    322. -
    323.         
    324. -
    325.     }
    326. -
    327.     
    328. -
    329.     /**
    330. -
    331.     * Adds the dc namespace.
    332. -
    333.     *
    334. -
    335.     * @param $node the node
    336. -
    337.     * @param $model the model
    338. -
    339.     * @param $dc Array which contains the dc objects
    340. -
    341.     */
    342. -
    343.     function dc(&$node,&$model,&$dc){
    344. -
    345.         $model->addNamespace("dc","http://purl.org/dc/elements/1.1/");
    346. -
    347.         foreach($dc as $key => $value){
    348. -
    349.                 $statement null;
    350. -
    351.                 $statement new Statement($node,new Resource("http://purl.org/dc/elements/1.1/".$key)new Literal($value));
    352. -
    353.             if($statement != null){
    354. -
    355.                 $model->add($statement);
    356. -
    357.             }
    358. -
    359.         }
    360. -
    361.     }
    362. -
    363.     
    364. -
    365.     /**
    366. -
    367.     * Adds the sy namespace.
    368. -
    369.     *
    370. -
    371.     * @param $node the node
    372. -
    373.     * @param $model the model
    374. -
    375.     * @param $sy Array which contains the sy objects
    376. -
    377.     */
    378. -
    379.     function sy(&$node,&$model,&$sy){
    380. -
    381.         $model->addNamespace("sy","http://purl.org/rss/1.0/modules/syndication/");
    382. -
    383.         foreach($sy as $key => $value){
    384. -
    385.                 $statement null;
    386. -
    387.                 $statement new Statement($node,new Resource("http://purl.org/rss/1.0/modules/syndication/".$key)new Literal($value));
    388. -
    389.             if($statement != null){
    390. -
    391.                 $model->add($statement);
    392. -
    393.             }
    394. -
    395.         }
    396. -
    397.         
    398. -
    399.     }
    400. -
    401.     
    402. -
    403.     
    404. -
    405.     /**
    406. -
    407.     * Parses the rss channel/ atom feed.
    408. -
    409.     *
    410. -
    411.     * @param $model the model
    412. -
    413.     * @param $rss the magpie parser object
    414. -
    415.     * @param $node the node which represents the channel
    416. -
    417.     * @param $nmsp the
    418. -
    419.     */
    420. -
    421.     function channel(&$model,&$rss,&$node,&$nmsp,$type){
    422. -
    423.          // Channel
    424. -
    425.          $statement new Statement($node,new Resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')new Resource($nmsp.$type));
    426. -
    427.         $model->add($statement);
    428. -
    429.         
    430. -
    431.          foreach($rss->channel as $key => $value){
    432. -
    433.         $statement null;    
    434. -
    435.         switch($key){
    436. -
    437.                     case "dc":
    438. -
    439.                         $this->dc($node,$model,$value);
    440. -
    441.                     break;
    442. -
    443.                     case "sy":
    444. -
    445.                         $this->sy($node,$model,$value);
    446. -
    447.                     break;
    448. -
    449.                     case "items":    
    450. -
    451.                     break;
    452. -
    453.                     case "tagline":    
    454. -
    455.                     break;
    456. -
    457.                     case "items_seq":
    458. -
    459.                     break;
    460. -
    461.                     default :
    462. -
    463.                         $statement new Statement($node,new Resource($nmsp.$key)new Literal($value));
    464. -
    465.                     break;
    466. -
    467.                 }
    468. -
    469.         if($statement != null){
    470. -
    471.             $model->add($statement);
    472. -
    473.         }
    474. -
    475.     }
    476. -
    477. }
    478. -
    479.  
    480. -
    481.   
    482. -
    483.   
    484. -
    485. //end: RssParser
    486. -
    487.  
    488. -
    489. ?>
    490. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilFindIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilFindIterator.php.html deleted file mode 100755 index 094cbe60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilFindIterator.php.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - File Source for FindIterator.php - - - - - -

    Source for file FindIterator.php

    -

    Documentation is available at FindIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: FindIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing statements matching a searchpattern.
    16. -
    17.  * FindIterators are returned by model->findAsIterator()
    18. -
    19.  * Using a find iterator is significantly faster than using model->find() which returns
    20. -
    21.  * a new result model.
    22. -
    23.  * 
    24. -
    25.  * 
    26. -
    27.  * @version  $Id: fsource_utility__utilFindIterator.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29.  * @author Tobias Gau <tobias.gauss@web.de>
    30. -
    31.  *
    32. -
    33.  * @package utility
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  */ 
    40. -
    41.  class FindIterator extends Object {
    42. -
    43.  
    44. -
    45.      /**
    46. -
    47.     * Reference to the MemModel
    48. -
    49.     * @var        object MemModel 
    50. -
    51.     * @access    private
    52. -
    53.     */    
    54. -
    55.     var $model;
    56. -
    57.     
    58. -
    59.  
    60. -
    61.  
    62. -
    63.      /**
    64. -
    65.     * Current position
    66. -
    67.     * FindIterator does not use the build in PHP array iterator,
    68. -
    69.     * so you can use serveral iterators on a single MemModel.
    70. -
    71.     * @var        integer 
    72. -
    73.     * @access    private
    74. -
    75.     */    
    76. -
    77.     var $position;
    78. -
    79.     
    80. -
    81.     
    82. -
    83.     /**
    84. -
    85.     * Searchpattern
    86. -
    87.     * 
    88. -
    89.     * @var        Object Subject,Predicate,Object
    90. -
    91.     * @access    private
    92. -
    93.     */    
    94. -
    95.  
    96. -
    97.     var $subject;
    98. -
    99.     var $predicate;
    100. -
    101.     var $object;
    102. -
    103.    
    104. -
    105.     
    106. -
    107.    /**
    108. -
    109.     * Constructor
    110. -
    111.     *
    112. -
    113.     * @param    object    MemModel 
    114. -
    115.     * @param    object  Subject 
    116. -
    117.     * @param    object  Predicate 
    118. -
    119.     * @param    object  Object 
    120. -
    121.     * @access    public
    122. -
    123.     */
    124. -
    125.     function FindIterator(&$model,$sub,$pred,$obj{
    126. -
    127.         $this->model &$model;
    128. -
    129.         $this->subject=$sub;
    130. -
    131.         $this->predicate=$pred;
    132. -
    133.         $this->object=$obj;
    134. -
    135.         $this->position=-1;
    136. -
    137.     }
    138. -
    139.     
    140. -
    141.     
    142. -
    143.      /**
    144. -
    145.     * Returns TRUE if there are more matching statements.
    146. -
    147.     * @return    boolean 
    148. -
    149.     * @access    public
    150. -
    151.     */
    152. -
    153.     function hasNext({
    154. -
    155.           if($this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1)>-1){
    156. -
    157.               return TRUE;
    158. -
    159.           }else{
    160. -
    161.               return FALSE;
    162. -
    163.           }
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.    
    170. -
    171.     /**
    172. -
    173.     * Returns the next matching statement.
    174. -
    175.     * @return    statement or NULL if there is no next matching statement.
    176. -
    177.     * @access    public
    178. -
    179.     */
    180. -
    181.     function next({
    182. -
    183.               $res=$this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1);    
    184. -
    185.               if($res>-1){
    186. -
    187.                   $this->position=$res;
    188. -
    189.                   return $this->model->triples[$res];
    190. -
    191.               }else{
    192. -
    193.                   return Null;
    194. -
    195.               }        
    196. -
    197.     }
    198. -
    199.    
    200. -
    201.    
    202. -
    203.  
    204. -
    205.  
    206. -
    207.     /**
    208. -
    209.     * Returns the current matching statement.
    210. -
    211.     * @return    statement or NULL if there is no current matching statement.
    212. -
    213.     * @access    public
    214. -
    215.     */
    216. -
    217.     function current({
    218. -
    219.           if (($this->position >= -1)&&(isset($this->model->triples[$this->position]))) {
    220. -
    221.             return $this->model->triples[$this->position];
    222. -
    223.         else {
    224. -
    225.             return NULL;
    226. -
    227.         
    228. -
    229.     }  
    230. -
    231.   
    232. -
    233.  
    234. -
    235.  
    236. -
    237. ?>
    238. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilIterFind.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilIterFind.php.html deleted file mode 100755 index 2b36623d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilIterFind.php.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - File Source for IterFind.php - - - - - -

    Source for file IterFind.php

    -

    Documentation is available at IterFind.php

    -
    -
    1. <?php 
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: IterFind
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17. * Implementation of a find-iterator which delivers statements or quads.
    18. -
    19. *
    20. -
    21. * This Iterator should be used in a for-loop like:
    22. -
    23. * for($iterator = $memmodel->iterFind(null,null,null,null); $iterator->valid(); $iterator->next())
    24. -
    25. * {
    26. -
    27. *    $statement=$iterator->current();
    28. -
    29. * };
    30. -
    31. *
    32. -
    33. @version  $Id: fsource_utility__utilIterFind.php.html 443 2007-06-01 16:25:38Z cax $
    34. -
    35. @author Daniel Westphal (http://www.d-westphal.de)
    36. -
    37. *
    38. -
    39. *
    40. -
    41. @package     utility
    42. -
    43. @access    public
    44. -
    45. ***/
    46. -
    47. class IterFind
    48. -
    49. {
    50. -
    51.     
    52. -
    53.     /**
    54. -
    55.     * The current position
    56. -
    57.     * @var        integer 
    58. -
    59.     * @access    private
    60. -
    61.     */
    62. -
    63.     var $key;
    64. -
    65.     
    66. -
    67.     /**
    68. -
    69.     * boolean value, if the results should be returned as Quads
    70. -
    71.     * @var        boolean 
    72. -
    73.     * @access    private
    74. -
    75.     */
    76. -
    77.     var $returnAsQuads;
    78. -
    79.     
    80. -
    81.     /**
    82. -
    83.     * If the current resource is valid
    84. -
    85.     * @var        boolean 
    86. -
    87.     * @access    private
    88. -
    89.     */
    90. -
    91.     var $valid;
    92. -
    93.     
    94. -
    95.     /**
    96. -
    97.     * The current NamedGraph
    98. -
    99.     * @var obejct NamedGraph
    100. -
    101.     * @access    private
    102. -
    103.     */
    104. -
    105.     var $current;
    106. -
    107.     
    108. -
    109.     /**
    110. -
    111.     * The graph to look in.
    112. -
    113.     * @var string 
    114. -
    115.     * @access    private
    116. -
    117.     */    
    118. -
    119.     var $findGraph;
    120. -
    121.     
    122. -
    123.     /**
    124. -
    125.     * The subject Resource to search for
    126. -
    127.     * @var string 
    128. -
    129.     * @access    private
    130. -
    131.     */    
    132. -
    133.     var $findSubject;
    134. -
    135.     
    136. -
    137.     /**
    138. -
    139.     * The predicate Resource to search for
    140. -
    141.     * @var string 
    142. -
    143.     * @access    private
    144. -
    145.     */    
    146. -
    147.     var $findPredicate;
    148. -
    149.     
    150. -
    151.     /**
    152. -
    153.     * The object Resource to search for
    154. -
    155.     * @var string 
    156. -
    157.     * @access    private
    158. -
    159.     */    
    160. -
    161.     var $findObject;
    162. -
    163.     
    164. -
    165.     
    166. -
    167.     
    168. -
    169.     /**
    170. -
    171.     * Constructor.
    172. -
    173.     *
    174. -
    175.     * $subject, $predicate, and $object are used like find().
    176. -
    177.     * $graph has to be a reference to the graph to search in.
    178. -
    179.     *
    180. -
    181.     * 
    182. -
    183.     *
    184. -
    185.     * @param $graph Resource
    186. -
    187.     * @param $subject Resource
    188. -
    189.     * @param $predicate Resource
    190. -
    191.     * @param $object Resource
    192. -
    193.     * @param $returnAsQuads boolean
    194. -
    195.     * @access    public
    196. -
    197.     */
    198. -
    199.     function IterFind($graph,$subject,$predicate,$object,$returnAsQuads=false)
    200. -
    201.     {
    202. -
    203.         if ($graph==NULL)
    204. -
    205.         {
    206. -
    207.             $this->valid=false;
    208. -
    209.             return;    
    210. -
    211.         }        
    212. -
    213.         $this->findGraph=&$graph;
    214. -
    215.         $this->findSubject=$subject;
    216. -
    217.         $this->findPredicate=$predicate;
    218. -
    219.         $this->findObject=$object;
    220. -
    221.         $this->rewind();
    222. -
    223.         $this->returnAsQuads=$returnAsQuads;
    224. -
    225.     }
    226. -
    227.     
    228. -
    229.     /**
    230. -
    231.     * Resets iterator list to start
    232. -
    233.     *
    234. -
    235.     * @access    public
    236. -
    237.     */
    238. -
    239.     function rewind()
    240. -
    241.     {
    242. -
    243.         $this->key = -1;
    244. -
    245.         $this->next();
    246. -
    247.     }
    248. -
    249.     
    250. -
    251.     /**
    252. -
    253.     * Says if there are additional items left in the list
    254. -
    255.     *
    256. -
    257.     * @return    boolean 
    258. -
    259.     * @access    public
    260. -
    261.     */
    262. -
    263.     function valid()
    264. -
    265.     {
    266. -
    267.         return $this->valid;
    268. -
    269.     }
    270. -
    271.     
    272. -
    273.     /**
    274. -
    275.     * Moves Iterator to the next item in the list
    276. -
    277.     *
    278. -
    279.     * @access    public
    280. -
    281.     */
    282. -
    283.     function next()
    284. -
    285.     {
    286. -
    287.         $this->current $this->findGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->key);
    288. -
    289.         $this->valid=($this->current!=NULL);
    290. -
    291.     }
    292. -
    293.     
    294. -
    295.     /**
    296. -
    297.     * Returns the current item
    298. -
    299.     *
    300. -
    301.     * @return    mixed 
    302. -
    303.     * @access    public
    304. -
    305.     */
    306. -
    307.     function current()
    308. -
    309.     {
    310. -
    311.         if($this->returnAsQuads)
    312. -
    313.         return new Quad(new Resource($this->findGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
    314. -
    315.         //else
    316. -
    317.         return $this->current;
    318. -
    319.     }
    320. -
    321.     
    322. -
    323.     
    324. -
    325.     /**
    326. -
    327.     * Returns the key of the current item
    328. -
    329.     *
    330. -
    331.     * @return    integer 
    332. -
    333.     * @access    public
    334. -
    335.     */
    336. -
    337.     function key()
    338. -
    339.     {
    340. -
    341.         return $this->key;
    342. -
    343.     }
    344. -
    345. }
    346. -
    347. ?>
    348. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilModelComparator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilModelComparator.php.html deleted file mode 100755 index 51d027fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilModelComparator.php.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - File Source for ModelComparator.php - - - - - -

    Source for file ModelComparator.php

    -

    Documentation is available at ModelComparator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: ModelComparator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13.  
    14. -
    15. /**
    16. -
    17.  * This class compares to models. This comparator bases on the labelling algorithm
    18. -
    19.  * described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href>
    20. -
    21.  * by Jeremy J. Carroll.
    22. -
    23.  *
    24. -
    25.  *
    26. -
    27.  * @version  $Id: fsource_utility__utilModelComparator.php.html 443 2007-06-01 16:25:38Z cax $
    28. -
    29.  * @author Tobias Gau <tobias.gauss at web.de>
    30. -
    31.  *
    32. -
    33.  * @package utility
    34. -
    35.  * @access    public
    36. -
    37.  *
    38. -
    39.  ***/ 
    40. -
    41.  class ModelComparator extends Object {
    42. -
    43.      
    44. -
    45.      /**
    46. -
    47.      * Compares two models.
    48. -
    49.      *
    50. -
    51.      * @param $thisModel First Model.
    52. -
    53.      * @param $thatModel Second Model.
    54. -
    55.      *
    56. -
    57.      * @return boolean 
    58. -
    59.      */
    60. -
    61.      function compare($thisModel$thatModel){
    62. -
    63.      
    64. -
    65.      $thisModeltriples null;
    66. -
    67.      $thatModeltriples null;
    68. -
    69.      
    70. -
    71.          if(is_a($thisModel,"DbModel")){
    72. -
    73.              $thisModeltriples =     $thisModel->getMemModel();
    74. -
    75.          }else{
    76. -
    77.              $thisModeltriples =     $thisModel;
    78. -
    79.          }
    80. -
    81.          
    82. -
    83.          if(is_a($thatModel,"DbModel")){
    84. -
    85.              $thatModeltriples =     $thatModel->getMemModel();
    86. -
    87.          }else{
    88. -
    89.              $thatModeltriples =     $thatModel;
    90. -
    91.          }
    92. -
    93.              
    94. -
    95.          $sortArray1 ModelComparator::buildSortArray($thisModeltriples->triples);
    96. -
    97.         $sortArray2 ModelComparator::buildSortArray($thatModeltriples->triples);    
    98. -
    99.         
    100. -
    101.         $renamedArray1 ModelComparator::renameBlanks($sortArray1);
    102. -
    103.         $renamedArray2 ModelComparator::renameBlanks($sortArray2);
    104. -
    105.         
    106. -
    107.         return ModelComparator::compareTriples($renamedArray1,$renamedArray2);
    108. -
    109.      }
    110. -
    111.          
    112. -
    113.      
    114. -
    115.      /**
    116. -
    117.      * Builds a sorted array.
    118. -
    119.      *
    120. -
    121.      * @param $tripleList A List that contains the models triples.
    122. -
    123.      *
    124. -
    125.      * @return Array 
    126. -
    127.      */
    128. -
    129.      function buildSortArray($tripleList){
    130. -
    131.          $sortedArray Array();
    132. -
    133.          
    134. -
    135.          foreach($tripleList as $index => $triple){
    136. -
    137.              $sub null;
    138. -
    139.              $obj null;
    140. -
    141.              $orgSub  $triple->getSubject();
    142. -
    143.              $orgObj  $triple->getObject();
    144. -
    145.              
    146. -
    147.              if(is_a($orgSub,"Blanknode")){
    148. -
    149.                  $sub $orgSub->getID();
    150. -
    151.                  $triple->subj new Blanknode("~");
    152. -
    153.              }
    154. -
    155.              if(is_a($orgObj,"Blanknode")){
    156. -
    157.                  $obj $orgObj->getID();
    158. -
    159.                  $triple->obj new Blanknode("~");
    160. -
    161.              }
    162. -
    163.              $sortedArray[$index]['string']  $triple->toString();
    164. -
    165.              $sortedArray[$index]['index']  $index;
    166. -
    167.              $sortedArray[$index]['triple'$triple;
    168. -
    169.              $sortedArray[$index]['sub']    $sub;
    170. -
    171.              $sortedArray[$index]['obj']    $obj;    
    172. -
    173.          }
    174. -
    175.          sort($sortedArray);
    176. -
    177.          return $sortedArray;
    178. -
    179.      }
    180. -
    181.      
    182. -
    183.      /**
    184. -
    185.      * Renames the models Blanknodes.
    186. -
    187.      *
    188. -
    189.      * @param $sortedArray A List that contains the models triples.
    190. -
    191.      *
    192. -
    193.      * @return Array 
    194. -
    195.      */
    196. -
    197.      function renameBlanks($sortedArray){
    198. -
    199.      $i 0;
    200. -
    201.      $labelmap Array();
    202. -
    203.          
    204. -
    205.          foreach ($sortedArray as $value){    
    206. -
    207.              //new label
    208. -
    209.              if($value['sub']!=null){
    210. -
    211.                  $label null;
    212. -
    213.                  if(isset($labelmap[$value['sub']])){
    214. -
    215.                      $label $labelmap[$value['sub']];
    216. -
    217.                      $value['triple']->subj new BlankNode($labelmap[$value['sub']]);
    218. -
    219.                  }else{
    220. -
    221.                      $label $i."Bnode";
    222. -
    223.                      $labelmap[$value['sub']]=$label;
    224. -
    225.                      $value['triple']->subj new BlankNode($labelmap[$value['sub']]);
    226. -
    227.                      $i++;
    228. -
    229.                  }
    230. -
    231.              }
    232. -
    233.              
    234. -
    235.              if($value['obj']!=null){
    236. -
    237.                  $label null;
    238. -
    239.                  if(isset($labelmap[$value['obj']])){
    240. -
    241.                      $label $labelmap[$value['obj']];
    242. -
    243.                      $value['triple']->obj new BlankNode($labelmap[$value['obj']]);
    244. -
    245.                  }else{
    246. -
    247.                      $label $i."Bnode";
    248. -
    249.                      $labelmap[$value['obj']]=$label;
    250. -
    251.                      $value['triple']->obj new BlankNode($labelmap[$value['obj']]);
    252. -
    253.                      $i++;
    254. -
    255.                  }
    256. -
    257.              }
    258. -
    259.              
    260. -
    261.          }
    262. -
    263.          return $sortedArray;
    264. -
    265.      
    266. -
    267.      }
    268. -
    269.      
    270. -
    271.      /**
    272. -
    273.      * Compares the Triples in the lists.
    274. -
    275.      *
    276. -
    277.      * @param $tripleList A List that contains the models triples.
    278. -
    279.      * @param $tripleList A List that contains the models triples.
    280. -
    281.      *
    282. -
    283.      * @return boolean 
    284. -
    285.      */
    286. -
    287.      function compareTriples($array1$array2){
    288. -
    289.          foreach($array1 as $key => $value){
    290. -
    291.              if(!$value['triple']->equals($array2[$key]['triple']))
    292. -
    293.                  return false;
    294. -
    295.          }
    296. -
    297.          return true;
    298. -
    299.      
    300. -
    301.      }
    302. -
    303.      
    304. -
    305.  
    306. -
    307.  }
    308. -
    309.  
    310. -
    311.  
    312. -
    313.  
    314. -
    315.  ?>
    316. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilObject.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilObject.php.html deleted file mode 100755 index 468fb089..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilObject.php.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - File Source for Object.php - - - - - -

    Source for file Object.php

    -

    Documentation is available at Object.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: Object
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * An abstract object.
    16. -
    17.  * Root object with some general methods, that should be overloaded.
    18. -
    19.  * 
    20. -
    21.  *
    22. -
    23.  * @version  $Id: fsource_utility__utilObject.php.html 443 2007-06-01 16:25:38Z cax $
    24. -
    25.  * @author Chris Bizer <chris@bizer.de>
    26. -
    27.  *
    28. -
    29.  * @abstract
    30. -
    31.  * @package utility
    32. -
    33.  *
    34. -
    35.  ***/
    36. -
    37.  class Object {
    38. -
    39.  
    40. -
    41.   /**
    42. -
    43.    * Serializes a object into a string
    44. -
    45.    *
    46. -
    47.    * @access    public
    48. -
    49.    * @return    string 
    50. -
    51.    */    
    52. -
    53.     function toString({
    54. -
    55.         $objectvars get_object_vars($this);
    56. -
    57.         foreach($objectvars as $key => $value
    58. -
    59.             $content .= $key ."='"$value"'; ";
    60. -
    61.         return "Instance of " get_class($this."; Properties: "$content;
    62. -
    63.     }
    64. -
    65.  
    66. -
    67.  }
    68. -
    69.  
    70. -
    71.  
    72. -
    73. ?>
    74. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilRdfUtil.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilRdfUtil.php.html deleted file mode 100755 index be172c38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilRdfUtil.php.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - File Source for RdfUtil.php - - - - - -

    Source for file RdfUtil.php

    -

    Documentation is available at RdfUtil.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: RDFUtil
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15. * Useful utility methods.
    16. -
    17. * Static class.
    18. -
    19. *
    20. -
    21. @version  $Id: fsource_utility__utilRdfUtil.php.html 443 2007-06-01 16:25:38Z cax $
    22. -
    23. @author Chris Bizer <chris@bizer.de>, Daniel Westphal <dawe@gmx.de>
    24. -
    25. @author   Anton Kstlbacher <anton1@koestlbacher.de>
    26. -
    27. @package utility
    28. -
    29. @access    public
    30. -
    31. ***/
    32. -
    33. class RDFUtil extends Object {
    34. -
    35.  
    36. -
    37.     /**
    38. -
    39.     * Extracts the namespace prefix out of a URI.
    40. -
    41.     *
    42. -
    43.     * @param    String    $uri 
    44. -
    45.     * @return    string 
    46. -
    47.     * @access    public
    48. -
    49.     */
    50. -
    51.     function guessNamespace($uri{
    52. -
    53.         $l RDFUtil::getNamespaceEnd($uri);
    54. -
    55.         return $l substr($uri ,0$l"";
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     /**
    62. -
    63.     * Delivers the name out of the URI (without the namespace prefix).
    64. -
    65.     *
    66. -
    67.     * @param    String    $uri 
    68. -
    69.     * @return    string 
    70. -
    71.     * @access    public
    72. -
    73.     */
    74. -
    75.     function guessName($uri{
    76. -
    77.         return substr($uri,RDFUtil::getNamespaceEnd($uri));
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     /**
    84. -
    85.     * Extracts the namespace prefix out of the URI of a Resource.
    86. -
    87.     *
    88. -
    89.     * @param    Object Resource    $resource
    90. -
    91.     * @return    string 
    92. -
    93.     * @access    public
    94. -
    95.     */
    96. -
    97.     function getNamespace($resource{
    98. -
    99.         return RDFUtil::guessNamespace($resource->getURI());
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     /**
    106. -
    107.     * Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    108. -
    109.     *
    110. -
    111.     * @param    Object Resource    $resource
    112. -
    113.     * @return    string 
    114. -
    115.     * @access    public
    116. -
    117.     */
    118. -
    119.     function getLocalName($resource{
    120. -
    121.         return RDFUtil::guessName($resource->getURI());
    122. -
    123.     }
    124. -
    125.  
    126. -
    127.     /**
    128. -
    129.     * Position of the namespace end
    130. -
    131.     * Method looks for # : and /
    132. -
    133.     * @param    String    $uri 
    134. -
    135.     * @access    private
    136. -
    137.     */
    138. -
    139.     function getNamespaceEnd($uri{
    140. -
    141.         $l strlen($uri)-1;
    142. -
    143.         do {
    144. -
    145.             $c substr($uri$l1);
    146. -
    147.             if($c == '#' || $c == ':' || $c == '/')
    148. -
    149.             break;
    150. -
    151.             $l--;
    152. -
    153.         while ($l >= 0);
    154. -
    155.         $l++;
    156. -
    157.         return $l;
    158. -
    159.     }
    160. -
    161.  
    162. -
    163.         /**
    164. -
    165.     * Short Prefix for known Namespaces by given URI
    166. -
    167.     * @param    String    $uri 
    168. -
    169.     * @access    public
    170. -
    171.     */
    172. -
    173.     function getPrefix($uri{
    174. -
    175.             switch (RDFUtil::guessNamespace($uri))
    176. -
    177.         {
    178. -
    179.                 case RDF_NAMESPACE_URI:
    180. -
    181.                 $prefix RDF_NAMESPACE_PREFIX;
    182. -
    183.                 break;
    184. -
    185.  
    186. -
    187.                 case RDF_SCHEMA_URI:
    188. -
    189.                 $short_p RDF_SCHEMA_PREFIX;
    190. -
    191.                 break;
    192. -
    193.  
    194. -
    195.                 case OWL_URI:
    196. -
    197.                 $short_p OWL_PREFIX;
    198. -
    199.                 break;
    200. -
    201.  
    202. -
    203.                 default:
    204. -
    205.                 $short_p $statement->getLabelPredicate();
    206. -
    207.             }
    208. -
    209.             return $short_p;
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.  
    216. -
    217.     /**
    218. -
    219.     * Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    220. -
    221.     *
    222. -
    223.     * @param    Object Resource    $resource
    224. -
    225.     * @return    boolean 
    226. -
    227.     * @access    public
    228. -
    229.     */
    230. -
    231.     function isRDF($resource{
    232. -
    233.         return ($resource != NULL && RDFUtil::getNamespace($resource== RDF_NAMESPACE_URI);
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     /**
    240. -
    241.     * Escapes < > and &
    242. -
    243.     *
    244. -
    245.     * @param    String    $textValue 
    246. -
    247.     * @return    String 
    248. -
    249.     * @access    public
    250. -
    251.     */
    252. -
    253.     function escapeValue($textValue{
    254. -
    255.  
    256. -
    257.         $textValue str_replace('<''&lt;'$textValue);
    258. -
    259.         $textValue str_replace('>''&gt;'$textValue);
    260. -
    261.         $textValue str_replace('&''&amp;'$textValue);
    262. -
    263.  
    264. -
    265.         return $textValue;
    266. -
    267.     }
    268. -
    269.  
    270. -
    271.     /**
    272. -
    273.     * Converts an ordinal RDF resource to an integer.
    274. -
    275.     * e.g. Resource(RDF:_1) => 1
    276. -
    277.     *
    278. -
    279.     * @param    object Resource    $resource 
    280. -
    281.     * @return    Integer 
    282. -
    283.     * @access    public
    284. -
    285.     */
    286. -
    287.     function getOrd($resource)  {
    288. -
    289.         if($resource == NULL || !is_a($resource'Resource'|| !RDFUtil::isRDF($resource))
    290. -
    291.         return -1;
    292. -
    293.         $name RDFUtil::getLocalName($resource);
    294. -
    295.         echo substr($name1).' '.RDFUtil::getLocalName($resource);
    296. -
    297.         $n substr($name1);
    298. -
    299.         //noch rein : chekcen ob $n Nummer ist !!!!!!!!!!!!!!!!!!!!!!if($n)
    300. -
    301.         return $n;
    302. -
    303.         return -1;
    304. -
    305.     }
    306. -
    307.  
    308. -
    309.     /**
    310. -
    311.     * Creates ordinal RDF resource out of an integer.
    312. -
    313.     *
    314. -
    315.     * @param    Integer    $num 
    316. -
    317.     * @return    object Resource 
    318. -
    319.     * @access    public
    320. -
    321.     */
    322. -
    323.     function createOrd($num)  {
    324. -
    325.         return new Resource(RDF_NAMESPACE_URI '_' $num);
    326. -
    327.     }
    328. -
    329.  
    330. -
    331.     /**
    332. -
    333.     * Prints a MemModel as HTML table.
    334. -
    335.     * You can change the colors in the configuration file.
    336. -
    337.     *
    338. -
    339.     * @param    object MemModel     &$model 
    340. -
    341.     * @access    public
    342. -
    343.     */
    344. -
    345.     function writeHTMLTable(&$model)  {
    346. -
    347.         $nms $model->getParsedNamespaces();
    348. -
    349.         $names '';
    350. -
    351.         $pre '';
    352. -
    353.  
    354. -
    355.  
    356. -
    357.         echo '<table border="1" cellpadding="3" cellspacing="0" width="100%">' LINEFEED;
    358. -
    359.         echo INDENTATION '<tr bgcolor="' HTML_TABLE_HEADER_COLOR '">' LINEFEED INDENTATION INDENTATION '<td td width="68%" colspan="3">';
    360. -
    361.         echo '<p><b>Base URI:</b> ' $model->getBaseURI('</p></td>' LINEFEED;
    362. -
    363.         echo INDENTATION INDENTATION '<td width="32%"><p><b>Size:</b> ' $model->size('</p></td>' LINEFEED INDENTATION '</tr>';
    364. -
    365.  
    366. -
    367.         echo '<tr><td><b>Prefix:</b>'.'<br/></td><td colspan="3"><b>Namespace:</b>'.'<br/></td></tr>';
    368. -
    369.         $i=0;
    370. -
    371.         if($nms != false){
    372. -
    373.             foreach($nms as $namespace => $prefix){
    374. -
    375.                 if($i==0){
    376. -
    377.                     $col HTML_TABLE_NS_ROW_COLOR0;
    378. -
    379.                 }else{
    380. -
    381.                     $col HTML_TABLE_NS_ROW_COLOR1;
    382. -
    383.                 }
    384. -
    385.                 echo '<tr bgcolor="'.$col.'"><td>'.$prefix.'</td><td colspan="3">'.$namespace.'</td></tr>';
    386. -
    387.                 $i++;
    388. -
    389.                 $i%=2;
    390. -
    391.             }
    392. -
    393.         }else{
    394. -
    395.             echo '<tr><td>-</td><td colspan="3">-</td></tr>';
    396. -
    397.         }
    398. -
    399.  
    400. -
    401.  
    402. -
    403.  
    404. -
    405.  
    406. -
    407.         echo INDENTATION '<tr bgcolor="' HTML_TABLE_HEADER_COLOR '">' LINEFEED INDENTATION INDENTATION '<td width="4%"><p align=center><b>No.</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Subject</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Predicate</b></p></td>' LINEFEED INDENTATION INDENTATION '<td width="32%"><p><b>Object</b></p></td>' LINEFEED INDENTATION '</tr>' LINEFEED;
    408. -
    409.  
    410. -
    411.         $i 1;
    412. -
    413.         foreach($model->triples as $key => $statement{
    414. -
    415.             $infered='';
    416. -
    417.             if (is_a($statement,'InfStatement')) $infered='<small>(infered)</small>';
    418. -
    419.             echo INDENTATION '<tr valign="top">' LINEFEED INDENTATION INDENTATION '<td><p align=center>' $i '.<BR>'.$infered.'</p></td>' LINEFEED;
    420. -
    421.             // subject
    422. -
    423.             echo INDENTATION INDENTATION '<td bgcolor="';
    424. -
    425.             echo RDFUtil::chooseColor($statement->getSubject());
    426. -
    427.             echo '">';
    428. -
    429.             echo '<p>' .  RDFUtil::getNodeTypeName($statement->getSubject());
    430. -
    431.             if(is_a($statement->subj,'Resource')){
    432. -
    433.                 $ns $statement->subj->getNamespace();
    434. -
    435.                 if(isset($nms[$ns])){
    436. -
    437.                     echo $nms[$ns].':'.RDFUtil::getLocalName($statement->subj);
    438. -
    439.                 }else{
    440. -
    441.                     echo $statement->subj->getLabel();
    442. -
    443.                 }
    444. -
    445.             }
    446. -
    447.             echo '</p></td>' .  LINEFEED;
    448. -
    449.             // predicate
    450. -
    451.             echo INDENTATION INDENTATION '<td bgcolor="';
    452. -
    453.             echo RDFUtil::chooseColor($statement->getPredicate());
    454. -
    455.             echo '">';
    456. -
    457.             echo '<p>' RDFUtil::getNodeTypeName($statement->getPredicate());
    458. -
    459.             if(is_a($statement->pred,'Resource')){
    460. -
    461.                 $ns $statement->pred->getNamespace();
    462. -
    463.                 if(isset($nms[$ns])){
    464. -
    465.                     echo $nms[$ns].':'.RDFUtil::getLocalName($statement->pred);
    466. -
    467.                 }else{
    468. -
    469.                     echo $statement->pred->getLabel();
    470. -
    471.                 }
    472. -
    473.             }
    474. -
    475.             echo '</p></td>' .  LINEFEED;
    476. -
    477.             // object
    478. -
    479.             echo INDENTATION INDENTATION '<td bgcolor="';
    480. -
    481.             echo RDFUtil::chooseColor($statement->getObject());
    482. -
    483.             echo '">';
    484. -
    485.             echo '<p>';
    486. -
    487.             if (is_a($statement->getObject()'Literal')) {
    488. -
    489.                 if ($statement->obj->getLanguage(!= null{
    490. -
    491.                     $lang ' <b>(xml:lang="' $statement->obj->getLanguage('") </b> ';
    492. -
    493.                 ELSE $lang '';
    494. -
    495.                 if ($statement->obj->getDatatype(!= null{
    496. -
    497.                     $dtype ' <b>(rdf:datatype="' $statement->obj->getDatatype('") </b> ';
    498. -
    499.                 ELSE $dtype '';
    500. -
    501.             else {
    502. -
    503.                 $lang '';
    504. -
    505.                 $dtype '';
    506. -
    507.             }
    508. -
    509.             $label $statement->obj->getLabel();
    510. -
    511.             if(is_a($statement->obj,'Resource')){
    512. -
    513.                 $ns $statement->obj->getNamespace();
    514. -
    515.                 if(isset($nms[$ns])){
    516. -
    517.                     $label $nms[$ns].':'.RDFUtil::getLocalName($statement->obj);
    518. -
    519.                 }else{
    520. -
    521.                     $label $statement->obj->getLabel();
    522. -
    523.                 }
    524. -
    525.             }
    526. -
    527.  
    528. -
    529.             echo  RDFUtil::getNodeTypeName($statement->getObject())
    530. -
    531.             .nl2br(htmlspecialchars($label)) $lang $dtype;
    532. -
    533.  
    534. -
    535.             echo '</p></td>' LINEFEED;
    536. -
    537.             echo INDENTATION '</tr>' LINEFEED;
    538. -
    539.             $i++;
    540. -
    541.         }
    542. -
    543.         echo '</table>' LINEFEED;
    544. -
    545.     }
    546. -
    547.  
    548. -
    549.     /**
    550. -
    551.     * Chooses a node color.
    552. -
    553.     * Used by RDFUtil::writeHTMLTable()
    554. -
    555.     *
    556. -
    557.     * @param    object Node    $node 
    558. -
    559.     * @return    object Resource 
    560. -
    561.     * @access    private
    562. -
    563.     */
    564. -
    565.     function chooseColor($node)  {
    566. -
    567.         if (is_a($node'BlankNode'))
    568. -
    569.         return HTML_TABLE_BNODE_COLOR;
    570. -
    571.         elseif (is_a($node'Literal'))
    572. -
    573.         return HTML_TABLE_LITERAL_COLOR;
    574. -
    575.         else {
    576. -
    577.             if (RDFUtil::getNamespace($node== RDF_NAMESPACE_URI ||
    578. -
    579.             RDFUtil::getNamespace($node== RDF_SCHEMA_URI ||
    580. -
    581.             RDFUtil::getNamespace($node== OWL_URI
    582. -
    583.             )
    584. -
    585.  
    586. -
    587.             return HTML_TABLE_RDF_NS_COLOR;
    588. -
    589.         }
    590. -
    591.         return HTML_TABLE_RESOURCE_COLOR;
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     /**
    600. -
    601.     * Get Node Type.
    602. -
    603.     * Used by RDFUtil::writeHTMLTable()
    604. -
    605.     *
    606. -
    607.     * @param    object Node    $node 
    608. -
    609.     * @return    object Resource 
    610. -
    611.     * @access    private
    612. -
    613.     */
    614. -
    615.     function getNodeTypeName($node)  {
    616. -
    617.         if (is_a($node"BlankNode"))
    618. -
    619.         return 'Blank Node: ';
    620. -
    621.         elseif (is_a($node'Literal'))
    622. -
    623.         return 'Literal: ';
    624. -
    625.         else {
    626. -
    627.             if (RDFUtil::getNamespace($node== RDF_NAMESPACE_URI ||
    628. -
    629.             RDFUtil::getNamespace($node== RDF_SCHEMA_URI ||
    630. -
    631.             RDFUtil::getNamespace($node== OWL_URI)
    632. -
    633.             return 'RDF Node: ';
    634. -
    635.         }
    636. -
    637.         return 'Resource: ';
    638. -
    639.  
    640. -
    641.     }
    642. -
    643.  
    644. -
    645.  
    646. -
    647.  /**
    648. -
    649.  * Short Prefix for known and/or parsed Namespaces by given URI and Model
    650. -
    651.  * Uses $default_prefixes defined in constants.php and getParsedNamespaces()
    652. -
    653.  * Returns FALSE if no matching prefix is found
    654. -
    655.  *
    656. -
    657.  * @author   Anton Kstlbacher <anton1@koestlbacher.de>
    658. -
    659.  * @param    string  $uri 
    660. -
    661.  * @param    object $model 
    662. -
    663.  * @return   string, boolean
    664. -
    665.  * @access   public
    666. -
    667.  * @throws   PhpError
    668. -
    669.  */
    670. -
    671.  
    672. -
    673.  function guessPrefix($uri&$model)
    674. -
    675.  {
    676. -
    677.      global $default_prefixes;
    678. -
    679.      $namespace RDFUtil::guessNamespace($uri);
    680. -
    681.      $par_nms   $model->getParsedNamespaces();
    682. -
    683.      if (isset($par_nms[$namespace]))
    684. -
    685.      {
    686. -
    687.          $prefix $par_nms[$namespace];
    688. -
    689.      }
    690. -
    691.      else
    692. -
    693.      {
    694. -
    695.          $prefix array_search($namespace$default_prefixes);
    696. -
    697.      }
    698. -
    699.      if($prefix !== false)
    700. -
    701.      {
    702. -
    703.         return $prefix;
    704. -
    705.      }
    706. -
    707.      else
    708. -
    709.      {
    710. -
    711.         return false;
    712. -
    713.      }
    714. -
    715.  }
    716. -
    717.  
    718. -
    719.  
    720. -
    721.  /**
    722. -
    723.  * Generates a dot-file for drawing graphical output with the
    724. -
    725.  * graphviz-application which can be downloaded at http://www.graphviz.org
    726. -
    727.  * If the graphviz-application is installed and its path is set to the
    728. -
    729.  * correct value in constants.php we can directly generate any
    730. -
    731.  * file format graphviz supports, e.g. SVG, PNG
    732. -
    733.  * Parameters: model to visualize, output format, use prefixes
    734. -
    735.  *
    736. -
    737.  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    738. -
    739.  * WARNING: Graphviz can be slow with large models.
    740. -
    741.  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    742. -
    743.  *
    744. -
    745.  * @author   Anton Kstlbacher <anton1@koestlbacher.de>
    746. -
    747.  * @param    object  Model 
    748. -
    749.  * @param    string  $format 
    750. -
    751.  * @param    boolean $short_prefix 
    752. -
    753.  * @return   string, binary
    754. -
    755.  * @access   public
    756. -
    757.  * @throws   PhpError
    758. -
    759.  */
    760. -
    761.  
    762. -
    763.  function visualizeGraph(&$model$format "input_dot"$short_prefix TRUE)
    764. -
    765.  {
    766. -
    767.      global $graphviz_param;
    768. -
    769.      $i 0;
    770. -
    771.  
    772. -
    773.      foreach ($model->triples as $key => $statement)
    774. -
    775.      {
    776. -
    777.          $subject   $statement->getLabelSubject();
    778. -
    779.          $predicate $statement->getLabelPredicate();
    780. -
    781.          $object    $statement->getLabelObject();
    782. -
    783.  
    784. -
    785.          // format subject
    786. -
    787.          if (!isset($attrib[$subject]))
    788. -
    789.          {
    790. -
    791.              if (is_a($statement->subject(),'BlankNode'))
    792. -
    793.              {
    794. -
    795.                  $attrib[$subject$graphviz_param['BLANKNODE_STYLE'];
    796. -
    797.              }
    798. -
    799.              else
    800. -
    801.              {
    802. -
    803.                  if ($short_prefix == TRUE && RDFUtil::guessPrefix($subject$model!= FALSE)
    804. -
    805.                  {
    806. -
    807.                      $prefix RDFUtil::guessPrefix($subject$model);
    808. -
    809.                      $subject_label $prefix.":".RDFUtil::guessName($subject);
    810. -
    811.                      $attrib[$subject"label=\"".$subject_label."\" ";
    812. -
    813.                      if(!isset($prefix_array[$prefix]))
    814. -
    815.                      {
    816. -
    817.                          $prefix_array[$prefixRDFUtil::guessNamespace($subject);
    818. -
    819.                      }
    820. -
    821.                  }
    822. -
    823.                  if (GRAPHVIZ_URI == TRUE)
    824. -
    825.                  {
    826. -
    827.                      $attrib[$subject.= "URL=\"".$subject."\"";
    828. -
    829.                  }
    830. -
    831.              }
    832. -
    833.          }
    834. -
    835.  
    836. -
    837.          // format predicate
    838. -
    839.          if ($short_prefix == TRUE && RDFUtil::guessPrefix($predicate$model!= FALSE)
    840. -
    841.          {
    842. -
    843.              $prefix RDFUtil::guessPrefix($predicate$model);
    844. -
    845.              $predicate_label "label=\"".$prefix.":".RDFUtil::guessName($predicate)."\"";
    846. -
    847.              if(!isset($prefix_array[$prefix]))
    848. -
    849.              {
    850. -
    851.                  $prefix_array[$prefixRDFUtil::guessNamespace($predicate);
    852. -
    853.              }
    854. -
    855.          }
    856. -
    857.          else
    858. -
    859.          {
    860. -
    861.              $predicate_label "label=\"".$predicate."\"";
    862. -
    863.          }
    864. -
    865.  
    866. -
    867.     if (is_a($statement,'InfStatement'))
    868. -
    869.          {
    870. -
    871.              $predicate_label .= " ".$graphviz_param['INFERRED_STYLE'];
    872. -
    873.          }
    874. -
    875.          else
    876. -
    877.          {
    878. -
    879.              if (GRAPHVIZ_URI == TRUE)
    880. -
    881.              {
    882. -
    883.                  $predicate_label .= "URL=\"".$predicate."\"";
    884. -
    885.              }
    886. -
    887.          }
    888. -
    889.  
    890. -
    891.          // format object
    892. -
    893.          if (!isset($attrib[$object]))
    894. -
    895.          {
    896. -
    897.              if (is_a($statement->object(),'BlankNode'))
    898. -
    899.              {
    900. -
    901.                  $attrib[$object$graphviz_param['BLANKNODE_STYLE'];
    902. -
    903.              }
    904. -
    905.              elseif (is_a($statement->object(),'Literal'))
    906. -
    907.              {
    908. -
    909.                  $object_label $object;
    910. -
    911.                  $object "literal".$i;
    912. -
    913.                  $i++;
    914. -
    915.                  $attrib[$object"label=\"$object_label\" ".$graphviz_param['LITERAL_STYLE'];
    916. -
    917.              }
    918. -
    919.              else
    920. -
    921.              {
    922. -
    923.                  if ($short_prefix == TRUE && RDFUtil::guessPrefix($object$model!= FALSE)
    924. -
    925.                  {
    926. -
    927.                      $prefix RDFUtil::guessPrefix($object$model);
    928. -
    929.                      $object_label $prefix.":".RDFUtil::guessName($object);
    930. -
    931.                      $attrib[$object"label=\"".$object_label."\" ";
    932. -
    933.                      if(!isset($prefix_array[$prefix]))
    934. -
    935.                      {
    936. -
    937.                          $prefix_array[$prefixRDFUtil::guessNamespace($object);
    938. -
    939.                      }
    940. -
    941.                  }
    942. -
    943.                  if (GRAPHVIZ_URI == TRUE)
    944. -
    945.                  {
    946. -
    947.                      $attrib[$object.= "URL=\"".$object."\"";
    948. -
    949.                  }
    950. -
    951.              }
    952. -
    953.          }
    954. -
    955.  
    956. -
    957.          // fill graph array
    958. -
    959.          $graph["\"".$subject."\" -> \"".$object."\" [".$predicate_label."];";
    960. -
    961.      }
    962. -
    963.  
    964. -
    965.      //generate DOT-file
    966. -
    967.      $dot "digraph G { ".$graphviz_param['GRAPH_STYLE']."\n edge [".$graphviz_param['PREDICATE_STYLE']."]\n node [".$graphviz_param['RESOURCE_STYLE']."]\n";
    968. -
    969.      if (isset($attrib))
    970. -
    971.      {
    972. -
    973.          foreach ($attrib AS $key => $value)
    974. -
    975.          {
    976. -
    977.              $dot .= "\"$key\" [$value];\n";
    978. -
    979.          }
    980. -
    981.      }
    982. -
    983.      if (!isset($graph))
    984. -
    985.      {
    986. -
    987.          $dot .= "error [shape=box,label=\"No Statements found!\"]";
    988. -
    989.      }
    990. -
    991.      else
    992. -
    993.      {
    994. -
    995.          $dot .= implode("\n"$graph);
    996. -
    997.      }
    998. -
    999.  
    1000. -
    1001.  
    1002. -
    1003.      if (GRAPHVIZ_STAT == TRUE)
    1004. -
    1005.      {
    1006. -
    1007.          $stat_label "| ".$model->size()." Statements drawn";
    1008. -
    1009.      }
    1010. -
    1011.      if ((strstr($graphviz_param['GRAPH_STYLE']'rankdir="LR"'=== FALSE&& (strstr($graphviz_param['GRAPH_STYLE']'rankdir=LR'=== FALSE))
    1012. -
    1013.      {
    1014. -
    1015.          $sep1 "}";
    1016. -
    1017.          $sep2 "";
    1018. -
    1019.      }
    1020. -
    1021.      else
    1022. -
    1023.      {
    1024. -
    1025.          $sep1 "";
    1026. -
    1027.          $sep2 "}";
    1028. -
    1029.      }
    1030. -
    1031.  
    1032. -
    1033.      if ($short_prefix == TRUE && isset($prefix_array))
    1034. -
    1035.      {
    1036. -
    1037.          $struct_label "{ { Base URI: ".$model->getBaseURI()." $sep1 | { { ".implode("|"array_keys($prefix_array))." } | { ".implode("|"$prefix_array)." } } $stat_label } $sep2";
    1038. -
    1039.      }
    1040. -
    1041.      else
    1042. -
    1043.      {
    1044. -
    1045.          $struct_label "{ { Base URI: ".$model->getBaseURI()."$sep1 ".$stat_label." } }";
    1046. -
    1047.      }
    1048. -
    1049.  
    1050. -
    1051.      $dot .= "\n struct [shape=Mrecord,label=\"$struct_label\",".$graphviz_param['BOX_STYLE']."];\n";
    1052. -
    1053.      $dot .= " vocabulary [style=invis];\n struct -> vocabulary [style=invis];\n}";
    1054. -
    1055.  
    1056. -
    1057.      // if needed call dot.exe
    1058. -
    1059.      if (($format != "input_dot"&& (defined('GRAPHVIZ_PATH')) && (strstr(GRAPHVIZ_FORMAT$format!== FALSE))
    1060. -
    1061.      {
    1062. -
    1063.          mt_srand((double)microtime()*1000000);
    1064. -
    1065.          $filename=GRAPHVIZ_TEMP.md5(uniqid(mt_rand())).".dot";
    1066. -
    1067.          $file_handle @fopen($filename'w');
    1068. -
    1069.          if ($file_handle)
    1070. -
    1071.          {
    1072. -
    1073.              fwrite($file_handle$dot);
    1074. -
    1075.              fclose($file_handle);
    1076. -
    1077.          }
    1078. -
    1079.          $dotinput " -T".$format." ".$filename;
    1080. -
    1081.  
    1082. -
    1083.          ob_start();
    1084. -
    1085.     passthru(GRAPHVIZ_PATH.$dotinput);
    1086. -
    1087.          $output ob_get_contents();
    1088. -
    1089.     ob_end_clean();
    1090. -
    1091.          unlink($filename);
    1092. -
    1093.          echo $output;
    1094. -
    1095.          return TRUE;
    1096. -
    1097.      }
    1098. -
    1099.      elseif ($format == "input_dot")
    1100. -
    1101.      {
    1102. -
    1103.          echo $dot;
    1104. -
    1105.          return TRUE;
    1106. -
    1107.      }
    1108. -
    1109.      else
    1110. -
    1111.      {
    1112. -
    1113.          return FALSE;
    1114. -
    1115.      }
    1116. -
    1117.  }
    1118. -
    1119.  
    1120. -
    1121. // end: RDfUtil
    1122. -
    1123.  
    1124. -
    1125. ?>
    1126. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilStatementIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilStatementIterator.php.html deleted file mode 100755 index efede8da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_utility__utilStatementIterator.php.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - File Source for StatementIterator.php - - - - - -

    Source for file StatementIterator.php

    -

    Documentation is available at StatementIterator.php

    -
    -
    1. <?php
    2. -
    3.  
    4. -
    5. // ----------------------------------------------------------------------------------
    6. -
    7. // Class: StatementIterator
    8. -
    9. // ----------------------------------------------------------------------------------
    10. -
    11.  
    12. -
    13. /**
    14. -
    15.  * Iterator for traversing models.
    16. -
    17.  * This class can be used for iterating forward and backward trough MemModels.
    18. -
    19.  * It should be instanced using the getIterator() method of a MemModel.
    20. -
    21.  * 
    22. -
    23.  * @version  $Id: fsource_utility__utilStatementIterator.php.html 443 2007-06-01 16:25:38Z cax $
    24. -
    25.  * @author Daniel Westphal <mail at d-westphal dot de>
    26. -
    27.  * @author Chris Bizer <chris@bizer.de>
    28. -
    29.  *
    30. -
    31.  * @package utility
    32. -
    33.  * @access    public
    34. -
    35.  *
    36. -
    37.  */ 
    38. -
    39.  class StatementIterator extends Object {
    40. -
    41.  
    42. -
    43.      /**
    44. -
    45.     * Reference to the MemModel
    46. -
    47.     * @var        object MemModel 
    48. -
    49.     * @access    private
    50. -
    51.     */    
    52. -
    53.     var $model;
    54. -
    55.  
    56. -
    57.      /**
    58. -
    59.     * Current position
    60. -
    61.     * StatementIterator does not use the build in PHP array iterator,
    62. -
    63.     * so you can use serveral iterators on a single MemModel.
    64. -
    65.     * @var        integer 
    66. -
    67.     * @access    private
    68. -
    69.     */    
    70. -
    71.     var $position;
    72. -
    73.    
    74. -
    75.   
    76. -
    77.    /**
    78. -
    79.     * Constructor
    80. -
    81.     *
    82. -
    83.     * @param    object    MemModel 
    84. -
    85.     * @access    public
    86. -
    87.     */
    88. -
    89.     function StatementIterator(&$model{
    90. -
    91.         $this->model $model;
    92. -
    93.         reset($this->model->triples);
    94. -
    95.         $this->position = -1;
    96. -
    97.     }
    98. -
    99.  
    100. -
    101.   /**
    102. -
    103.    * Returns TRUE if there are more statements.
    104. -
    105.    * @return    boolean 
    106. -
    107.    * @access    public
    108. -
    109.    */
    110. -
    111.   function hasNext({
    112. -
    113.           if ($this->position == -1)
    114. -
    115.           
    116. -
    117.               if(current($this->model->triples)!=NULL)
    118. -
    119.               {
    120. -
    121.                   return TRUE;    
    122. -
    123.               else 
    124. -
    125.               {
    126. -
    127.                   return FALSE;
    128. -
    129.               }
    130. -
    131.           };
    132. -
    133.  
    134. -
    135.           if (next($this->model->triples)!=NULL 
    136. -
    137.           {    
    138. -
    139.               prev($this->model->triples);        
    140. -
    141.               return TRUE;
    142. -
    143.         else 
    144. -
    145.         {
    146. -
    147.             end($this->model->triples);
    148. -
    149.             return FALSE;
    150. -
    151.         };
    152. -
    153.    }
    154. -
    155.  
    156. -
    157.   /**
    158. -
    159.    * Returns TRUE if the first statement has not been reached.
    160. -
    161.    * @return    boolean 
    162. -
    163.    * @access    public
    164. -
    165.    */
    166. -
    167.   function hasPrevious({
    168. -
    169.           if (prev($this->model->triples)!=NULL
    170. -
    171.           {
    172. -
    173.               next($this->model->triples);
    174. -
    175.             return TRUE;
    176. -
    177.         else {
    178. -
    179.             reset($this->model->triples);
    180. -
    181.             return FALSE;
    182. -
    183.         };
    184. -
    185.   }     
    186. -
    187.    
    188. -
    189.   /**
    190. -
    191.    * Returns the next statement.
    192. -
    193.    * @return    statement or NULL if there is no next statement.
    194. -
    195.    * @access    public
    196. -
    197.    */
    198. -
    199.   function next({
    200. -
    201.           if ($this->position == -1)
    202. -
    203.           
    204. -
    205.               if($return=current($this->model->triples))
    206. -
    207.               {
    208. -
    209.                   $this->position=key($this->model->triples);
    210. -
    211.                   return $return;    
    212. -
    213.               else 
    214. -
    215.               {
    216. -
    217.                   $this->position=key($this->model->triples);
    218. -
    219.                   return NULL;
    220. -
    221.               };
    222. -
    223.           };
    224. -
    225.           
    226. -
    227.           
    228. -
    229.           if ($return=next($this->model->triples)) {
    230. -
    231.               $this->position=key($this->model->triples);
    232. -
    233.             return $return;
    234. -
    235.         else {
    236. -
    237.             $this->position=key($this->model->triples);
    238. -
    239.             return NULL;
    240. -
    241.         };
    242. -
    243.    }
    244. -
    245.  
    246. -
    247.   /**
    248. -
    249.    * Returns the previous statement.
    250. -
    251.    * @return    statement or NULL if there is no previous statement.
    252. -
    253.    * @access    public
    254. -
    255.    */
    256. -
    257.   function previous({
    258. -
    259.           if ($return=prev($this->model->triples)) {
    260. -
    261.               $this->position=key($this->model->triples);
    262. -
    263.             return $return;
    264. -
    265.         else {
    266. -
    267.             $this->position=key($this->model->triples);
    268. -
    269.             return NULL;
    270. -
    271.         }   
    272. -
    273.   }
    274. -
    275.  
    276. -
    277.   /**
    278. -
    279.    * Returns the current statement.
    280. -
    281.    * @return    statement or NULL if there is no current statement.
    282. -
    283.    * @access    public
    284. -
    285.    */
    286. -
    287.   function current({
    288. -
    289.           if ($this->position==-1return NULL;
    290. -
    291.       
    292. -
    293.           if ($return=current($this->model->triples)) {
    294. -
    295.             return $return;
    296. -
    297.         else {
    298. -
    299.             return NULL;
    300. -
    301.         }
    302. -
    303.    }
    304. -
    305.    
    306. -
    307.   /**
    308. -
    309.    * Moves the pointer to the first statement.
    310. -
    311.    * @return    void 
    312. -
    313.    * @access    public
    314. -
    315.    */
    316. -
    317.   function moveFirst({
    318. -
    319.               reset($this->model->triples);
    320. -
    321.               $this->position=0;
    322. -
    323.    }
    324. -
    325.  
    326. -
    327.   /**
    328. -
    329.    * Moves the pointer to the last statement.
    330. -
    331.    * @return    void 
    332. -
    333.    * @access    public
    334. -
    335.    */
    336. -
    337.   function moveLast({
    338. -
    339.               end($this->model->triples);
    340. -
    341.               $this->position=key($this->model->triples);
    342. -
    343.    }
    344. -
    345.    
    346. -
    347.      /**
    348. -
    349.    * Moves the pointer to a specific statement.
    350. -
    351.    * If you set an off-bounds value, the position will be set to the last element
    352. -
    353.    * @param     integer 
    354. -
    355.    * @return    void 
    356. -
    357.    * @access    public
    358. -
    359.    */
    360. -
    361.   function moveTo($position{
    362. -
    363.       
    364. -
    365.               if ($position count($this->model->triples))
    366. -
    367.               {
    368. -
    369.                   end($this->model->triples);
    370. -
    371.               else 
    372. -
    373.               {
    374. -
    375.                   reset($this->model->triples);
    376. -
    377.                   
    378. -
    379.                 for ($i 1$i $position$i++{
    380. -
    381.                    next($this->model->triples);
    382. -
    383.                 }
    384. -
    385.               };
    386. -
    387.               $this->position=key($this->model->triples);
    388. -
    389.    }
    390. -
    391.    
    392. -
    393.      /**
    394. -
    395.    * Returns the current position of the iterator.
    396. -
    397.    * @return    integer 
    398. -
    399.    * @access    public
    400. -
    401.    */
    402. -
    403.   function getCurrentPosition({
    404. -
    405.                return key($this->model->triples);
    406. -
    407.    }
    408. -
    409.   
    410. -
    411. -
    412.  
    413. -
    414. ?>
    415. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_C.php.html deleted file mode 100755 index 0869ed50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_C.php.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - File Source for ATOM_C.php - - - - - -

    Source for file ATOM_C.php

    -

    Documentation is available at ATOM_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   ATOM Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyATOM_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    ATOM Vocabulary;.
    20. -
    21. *    For details about ATOM see: http://semtext.org/atom/atom.html.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class ATOM{
    32. -
    33.  
    34. -
    35.     function TYPE()
    36. -
    37.     {
    38. -
    39.         return  new Resource(ATOM_NS 'type');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function MODE()
    48. -
    49.     {
    50. -
    51.         return  new Resource(ATOM_NS 'mode');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function NAME()
    60. -
    61.     {
    62. -
    63.         return  new Resource(ATOM_NS 'name');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function URL()
    72. -
    73.     {
    74. -
    75.         return  new Resource(ATOM_NS 'url');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function EMAIL()
    84. -
    85.     {
    86. -
    87.         return  new Resource(ATOM_NS 'email');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function REL()
    96. -
    97.     {
    98. -
    99.         return  new Resource(ATOM_NS 'rel');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function HREF()
    108. -
    109.     {
    110. -
    111.         return  new Resource(ATOM_NS 'href');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function TITLE()
    120. -
    121.     {
    122. -
    123.         return  new Resource(ATOM_NS 'title');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ATOM_CONSTRUCT()
    132. -
    133.     {
    134. -
    135.         return  new Resource(ATOM_NS 'AtomConstruct');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function CONTENT()
    144. -
    145.     {
    146. -
    147.         return  new Resource(ATOM_NS 'Content');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSON()
    156. -
    157.     {
    158. -
    159.         return  new Resource(ATOM_NS 'Person');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function VALUE()
    168. -
    169.     {
    170. -
    171.         return  new Resource(ATOM_NS 'value');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function LINK()
    180. -
    181.     {
    182. -
    183.         return  new Resource(ATOM_NS 'Link');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function FEED()
    192. -
    193.     {
    194. -
    195.         return  new Resource(ATOM_NS 'Feed');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function VERSION()
    204. -
    205.     {
    206. -
    207.         return  new Resource(ATOM_NS 'version');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function LANG()
    216. -
    217.     {
    218. -
    219.         return  new Resource(ATOM_NS 'lang');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function AUTHOR()
    228. -
    229.     {
    230. -
    231.         return  new Resource(ATOM_NS 'author');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function CONTRIBUTOR()
    240. -
    241.     {
    242. -
    243.         return  new Resource(ATOM_NS 'contributor');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function TAGLINE()
    252. -
    253.     {
    254. -
    255.         return  new Resource(ATOM_NS 'tagline');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function GENERATOR()
    264. -
    265.     {
    266. -
    267.         return  new Resource(ATOM_NS 'generator');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function COPYRIGHT()
    276. -
    277.     {
    278. -
    279.         return  new Resource(ATOM_NS 'copyright');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function INFO()
    288. -
    289.     {
    290. -
    291.         return  new Resource(ATOM_NS 'info');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function MODIFIED()
    300. -
    301.     {
    302. -
    303.         return  new Resource(ATOM_NS 'modified');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function ENTRY()
    312. -
    313.     {
    314. -
    315.         return  new Resource(ATOM_NS 'Entry');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function HAS_CHILD()
    324. -
    325.     {
    326. -
    327.         return  new Resource(ATOM_NS 'hasChild');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function HAS_ENTRY()
    336. -
    337.     {
    338. -
    339.         return  new Resource(ATOM_NS 'hasEntry');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HAS_LINK()
    348. -
    349.     {
    350. -
    351.         return  new Resource(ATOM_NS 'hasLink');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_TITLE()
    360. -
    361.     {
    362. -
    363.         return  new Resource(ATOM_NS 'hasTitle');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ISSUED()
    372. -
    373.     {
    374. -
    375.         return  new Resource(ATOM_NS 'issued');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function CREATED()
    384. -
    385.     {
    386. -
    387.         return  new Resource(ATOM_NS 'created');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function SUMMARY()
    396. -
    397.     {
    398. -
    399.         return  new Resource(ATOM_NS 'summary');
    400. -
    401.     }
    402. -
    403. }
    404. -
    405.  
    406. -
    407.  
    408. -
    409.  
    410. -
    411. ?>
    412. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_RES.php.html deleted file mode 100755 index 33509d42..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyATOM_RES.php.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - File Source for ATOM_RES.php - - - - - -

    Source for file ATOM_RES.php

    -

    Documentation is available at ATOM_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   ATOM Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyATOM_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    ATOM Vocabulary;.
    20. -
    21. *    For details about ATOM see: http://semtext.org/atom/atom.html.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class ATOM_RES{
    32. -
    33.  
    34. -
    35.     function TYPE()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(ATOM_NS 'type');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function MODE()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(ATOM_NS 'mode');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function NAME()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(ATOM_NS 'name');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function URL()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(ATOM_NS 'url');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function EMAIL()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(ATOM_NS 'email');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function REL()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(ATOM_NS 'rel');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function HREF()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(ATOM_NS 'href');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function TITLE()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(ATOM_NS 'title');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ATOM_CONSTRUCT()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(ATOM_NS 'AtomConstruct');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function CONTENT()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(ATOM_NS 'Content');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSON()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(ATOM_NS 'Person');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function VALUE()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(ATOM_NS 'value');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function LINK()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(ATOM_NS 'Link');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function FEED()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(ATOM_NS 'Feed');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function VERSION()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(ATOM_NS 'version');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function LANG()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(ATOM_NS 'lang');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function AUTHOR()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(ATOM_NS 'author');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function CONTRIBUTOR()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(ATOM_NS 'contributor');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function TAGLINE()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(ATOM_NS 'tagline');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function GENERATOR()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(ATOM_NS 'generator');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function COPYRIGHT()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(ATOM_NS 'copyright');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function INFO()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(ATOM_NS 'info');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function MODIFIED()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(ATOM_NS 'modified');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function ENTRY()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(ATOM_NS 'Entry');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function HAS_CHILD()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(ATOM_NS 'hasChild');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function HAS_ENTRY()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(ATOM_NS 'hasEntry');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HAS_LINK()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(ATOM_NS 'hasLink');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_TITLE()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(ATOM_NS 'hasTitle');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ISSUED()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(ATOM_NS 'issued');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function CREATED()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(ATOM_NS 'created');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function SUMMARY()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(ATOM_NS 'summary');
    400. -
    401.     }
    402. -
    403. }
    404. -
    405.  
    406. -
    407.  
    408. -
    409.  
    410. -
    411. ?>
    412. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:32 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_C.php.html deleted file mode 100755 index f03dbaad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_C.php.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - File Source for DC_C.php - - - - - -

    Source for file DC_C.php

    -

    Documentation is available at DC_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Dublin Core Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyDC_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Chris Bizer (chris@bizer.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the Dublin
    18. -
    19. *    Core Vocabulary. For details about DC see: http://dublincore.org/
    20. -
    21. *    Using the wrapper allows you to define all aspects of
    22. -
    23. *    the vocabulary in one spot, simplifing implementation and
    24. -
    25. *    maintainence.
    26. -
    27. */
    28. -
    29. class DC{
    30. -
    31.     // DC concepts
    32. -
    33.     function CONTRIBUTOR()
    34. -
    35.     {
    36. -
    37.         return  new Resource(DC_NS 'contributor');
    38. -
    39.  
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     function COVERAGE()
    46. -
    47.     {
    48. -
    49.         return  new Resource(DC_NS 'coverage');
    50. -
    51.  
    52. -
    53.     }
    54. -
    55.  
    56. -
    57.     function CREATOR()
    58. -
    59.     {
    60. -
    61.         return  new Resource(DC_NS 'creator');
    62. -
    63.  
    64. -
    65.     }
    66. -
    67.  
    68. -
    69.     function DATE()
    70. -
    71.     {
    72. -
    73.         return  new Resource(DC_NS 'date');
    74. -
    75.  
    76. -
    77.     }
    78. -
    79.  
    80. -
    81.     function DESCRIPTION()
    82. -
    83.     {
    84. -
    85.         return  new Resource(DC_NS 'description');
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     function FORMAT()
    94. -
    95.     {
    96. -
    97.         return  new Resource(DC_NS 'format');
    98. -
    99.  
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     function IDENTIFIER()
    106. -
    107.     {
    108. -
    109.         return  new Resource(DC_NS 'identifier');
    110. -
    111.  
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     function LANGUAGE()
    118. -
    119.     {
    120. -
    121.         return  new Resource(DC_NS 'language');
    122. -
    123.  
    124. -
    125.     }
    126. -
    127.  
    128. -
    129.     function PUBLISHER()
    130. -
    131.     {
    132. -
    133.         return  new Resource(DC_NS 'publisher');
    134. -
    135.  
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     function RIGHTS()
    142. -
    143.     {
    144. -
    145.         return  new Resource(DC_NS 'rights');
    146. -
    147.  
    148. -
    149.     }
    150. -
    151.  
    152. -
    153.     function SOURCE()
    154. -
    155.     {
    156. -
    157.         return  new Resource(DC_NS 'source');
    158. -
    159.  
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.     function SUBJECT()
    166. -
    167.     {
    168. -
    169.         return  new Resource(DC_NS 'subject');
    170. -
    171.  
    172. -
    173.     }
    174. -
    175.  
    176. -
    177.     function TITLE()
    178. -
    179.     {
    180. -
    181.         return  new Resource(DC_NS 'title');
    182. -
    183.  
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     function TYPE()
    190. -
    191.     {
    192. -
    193.         return  new Resource(DC_NS 'type');
    194. -
    195.     }
    196. -
    197.  
    198. -
    199.  
    200. -
    201.     // Other Elements and Element Refinements
    202. -
    203.     function ABSTRACT_()
    204. -
    205.     {
    206. -
    207.         return  new Resource(DCTERM_NS 'abstract');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function ACCESS_RIGHTS()
    216. -
    217.     {
    218. -
    219.         return  new Resource(DCTERM_NS 'accessRights');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function ALTERNATIVE()
    228. -
    229.     {
    230. -
    231.         return  new Resource(DCTERM_NS 'alternative');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function AUDIENCE()
    240. -
    241.     {
    242. -
    243.         return  new Resource(DCTERM_NS 'audience');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function AVAILABLE()
    252. -
    253.     {
    254. -
    255.         return  new Resource(DCTERM_NS 'available');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function BIBLIOGRAPHIC_CITATION()
    264. -
    265.     {
    266. -
    267.         return  new Resource(DCTERM_NS 'bibliographicCitation');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function CONFORMS_TO()
    276. -
    277.     {
    278. -
    279.         return  new Resource(DCTERM_NS 'conformsTo');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function CREATED()
    288. -
    289.     {
    290. -
    291.         return  new Resource(DCTERM_NS 'created');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function DATE_ACCEPTED()
    300. -
    301.     {
    302. -
    303.         return  new Resource(DCTERM_NS 'dateAccepted');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function DATE_COPYRIGHTED()
    312. -
    313.     {
    314. -
    315.         return  new Resource(DCTERM_NS 'dateCopyrighted');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATE_SUBMITTED()
    324. -
    325.     {
    326. -
    327.         return  new Resource(DCTERM_NS 'dateSubmitted');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function EDUCATION_LEVEL()
    336. -
    337.     {
    338. -
    339.         return  new Resource(DCTERM_NS 'educationLevel');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function EXTENT()
    348. -
    349.     {
    350. -
    351.         return  new Resource(DCTERM_NS 'extent');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_FORMAT()
    360. -
    361.     {
    362. -
    363.         return  new Resource(DCTERM_NS 'hasFormat');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function HAS_PART()
    372. -
    373.     {
    374. -
    375.         return  new Resource(DCTERM_NS 'hasPart');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function HAS_VERSION()
    384. -
    385.     {
    386. -
    387.         return  new Resource(DCTERM_NS 'hasVersion');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function IS_FORMAT_OF()
    396. -
    397.     {
    398. -
    399.         return  new Resource(DCTERM_NS 'isFormatOf');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function IS_PART_OF()
    408. -
    409.     {
    410. -
    411.         return  new Resource(DCTERM_NS 'isPartOf');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function IS_REFERENCED_BY()
    420. -
    421.     {
    422. -
    423.         return  new Resource(DCTERM_NS 'isReferencedBy');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function IS_REPLACED_BY()
    432. -
    433.     {
    434. -
    435.         return  new Resource(DCTERM_NS 'isReplacedBy');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IS_REQUIRED_BY()
    444. -
    445.     {
    446. -
    447.         return  new Resource(DCTERM_NS 'isRequiredBy');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function ISSUED()
    456. -
    457.     {
    458. -
    459.         return  new Resource(DCTERM_NS 'issued');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function IS_VERSION_OF()
    468. -
    469.     {
    470. -
    471.         return  new Resource(DCTERM_NS 'isVersionOf');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function LICENSE()
    480. -
    481.     {
    482. -
    483.         return  new Resource(DCTERM_NS 'license');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEDIATOR()
    492. -
    493.     {
    494. -
    495.         return  new Resource(DCTERM_NS 'mediator');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEDIUM()
    504. -
    505.     {
    506. -
    507.         return  new Resource(DCTERM_NS 'medium');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MODIFIED()
    516. -
    517.     {
    518. -
    519.         return  new Resource(DCTERM_NS 'modified');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function REFERENCES()
    528. -
    529.     {
    530. -
    531.         return  new Resource(DCTERM_NS 'references');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function REPLACES()
    540. -
    541.     {
    542. -
    543.         return  new Resource(DCTERM_NS 'replaces');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function REQUIRES()
    552. -
    553.     {
    554. -
    555.         return  new Resource(DCTERM_NS 'requires');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function RIGHTS_HOLDER()
    564. -
    565.     {
    566. -
    567.         return  new Resource(DCTERM_NS 'rightsHolder');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function SPATIAL()
    576. -
    577.     {
    578. -
    579.         return  new Resource(DCTERM_NS 'spatial');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function TABLE_OF_CONTENTS()
    588. -
    589.     {
    590. -
    591.         return  new Resource(DCTERM_NS 'tableOfContents');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function TEMPORAL()
    600. -
    601.     {
    602. -
    603.         return  new Resource(DCTERM_NS 'temporal');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function VALID()
    612. -
    613.     {
    614. -
    615.         return  new Resource(DCTERM_NS 'valid');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.  
    624. -
    625.     // Encoding schemes
    626. -
    627.     function BOX()
    628. -
    629.     {
    630. -
    631.         return  new Resource(DCTERM_NS 'Box');
    632. -
    633.  
    634. -
    635.     }
    636. -
    637.  
    638. -
    639.     function DCMI_TYPE()
    640. -
    641.     {
    642. -
    643.         return  new Resource(DCTERM_NS 'DCMIType');
    644. -
    645.  
    646. -
    647.     }
    648. -
    649.  
    650. -
    651.     function IMT()
    652. -
    653.     {
    654. -
    655.         return  new Resource(DCTERM_NS 'IMT');
    656. -
    657.  
    658. -
    659.     }
    660. -
    661.  
    662. -
    663.     function ISO3166()
    664. -
    665.     {
    666. -
    667.         return  new Resource(DCTERM_NS 'ISO3166');
    668. -
    669.  
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function ISO639_2()
    676. -
    677.     {
    678. -
    679.         return  new Resource(DCTERM_NS 'ISO639-2');
    680. -
    681.  
    682. -
    683.     }
    684. -
    685.  
    686. -
    687.     function LCC()
    688. -
    689.     {
    690. -
    691.         return  new Resource(DCTERM_NS 'LCC');
    692. -
    693.  
    694. -
    695.     }
    696. -
    697.  
    698. -
    699.     function LCSH()
    700. -
    701.     {
    702. -
    703.         return  new Resource(DCTERM_NS 'LCSH');
    704. -
    705.  
    706. -
    707.     }
    708. -
    709.  
    710. -
    711.     function MESH()
    712. -
    713.     {
    714. -
    715.         return  new Resource(DCTERM_NS 'MESH');
    716. -
    717.  
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     function PERIOD()
    724. -
    725.     {
    726. -
    727.         return  new Resource(DCTERM_NS 'Period');
    728. -
    729.  
    730. -
    731.     }
    732. -
    733.  
    734. -
    735.     function POINT()
    736. -
    737.     {
    738. -
    739.         return  new Resource(DCTERM_NS 'Point');
    740. -
    741.  
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     function RFC1766()
    748. -
    749.     {
    750. -
    751.         return  new Resource(DCTERM_NS 'RFC1766');
    752. -
    753.  
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     function RFC3066()
    760. -
    761.     {
    762. -
    763.         return  new Resource(DCTERM_NS 'RFC3066');
    764. -
    765.  
    766. -
    767.     }
    768. -
    769.  
    770. -
    771.     function TGN()
    772. -
    773.     {
    774. -
    775.         return  new Resource(DCTERM_NS 'TGN');
    776. -
    777.  
    778. -
    779.     }
    780. -
    781.  
    782. -
    783.     function UDC()
    784. -
    785.     {
    786. -
    787.         return  new Resource(DCTERM_NS 'UDC');
    788. -
    789.  
    790. -
    791.     }
    792. -
    793.  
    794. -
    795.     function URI()
    796. -
    797.     {
    798. -
    799.         return  new Resource(DCTERM_NS 'URI');
    800. -
    801.  
    802. -
    803.     }
    804. -
    805.  
    806. -
    807.     function W3CDTF()
    808. -
    809.     {
    810. -
    811.         return  new Resource(DCTERM_NS 'W3CDTF');
    812. -
    813.  
    814. -
    815.     }
    816. -
    817.  
    818. -
    819.  
    820. -
    821.     // DCMI Type Vocabulary
    822. -
    823.     function COLLECTION()
    824. -
    825.     {
    826. -
    827.         return  new Resource(DCMITYPE_NS 'Collection');
    828. -
    829.  
    830. -
    831.     }
    832. -
    833.  
    834. -
    835.     function DATASET()
    836. -
    837.     {
    838. -
    839.         return  new Resource(DCMITYPE_NS 'Dataset');
    840. -
    841.  
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.     function EVENT()
    848. -
    849.     {
    850. -
    851.         return  new Resource(DCMITYPE_NS 'Event');
    852. -
    853.  
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     function IMAGE()
    860. -
    861.     {
    862. -
    863.         return  new Resource(DCMITYPE_NS 'Image');
    864. -
    865.  
    866. -
    867.     }
    868. -
    869.  
    870. -
    871.     function INTERACTIVERESOURCE()
    872. -
    873.     {
    874. -
    875.         return  new Resource(DCMITYPE_NS 'Interactive_Resource');
    876. -
    877.  
    878. -
    879.     }
    880. -
    881.  
    882. -
    883.     function MOVINGIMAGE()
    884. -
    885.     {
    886. -
    887.         return  new Resource(DCMITYPE_NS 'Moving_Image');
    888. -
    889.  
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.     function PHYSICALOBJECT()
    896. -
    897.     {
    898. -
    899.         return  new Resource(DCMITYPE_NS 'Physical_Object');
    900. -
    901.  
    902. -
    903.     }
    904. -
    905.  
    906. -
    907.     function SERVICE()
    908. -
    909.     {
    910. -
    911.         return  new Resource(DCMITYPE_NS 'Service');
    912. -
    913.  
    914. -
    915.     }
    916. -
    917.  
    918. -
    919.     function SOFTWARE()
    920. -
    921.     {
    922. -
    923.         return  new Resource(DCMITYPE_NS 'Software');
    924. -
    925.  
    926. -
    927.     }
    928. -
    929.  
    930. -
    931.     function SOUND()
    932. -
    933.     {
    934. -
    935.         return  new Resource(DCMITYPE_NS 'Sound');
    936. -
    937.  
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     function STILLIMAGE()
    944. -
    945.     {
    946. -
    947.         return  new Resource(DCMITYPE_NS 'Still_Image');
    948. -
    949.  
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.     function TEXT()
    956. -
    957.     {
    958. -
    959.         return  new Resource(DCMITYPE_NS 'Text');
    960. -
    961.     }
    962. -
    963.  
    964. -
    965. }
    966. -
    967.  
    968. -
    969.  
    970. -
    971. ?>
    972. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:55 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_RES.php.html deleted file mode 100755 index bcc9b95e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyDC_RES.php.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - File Source for DC_RES.php - - - - - -

    Source for file DC_RES.php

    -

    Documentation is available at DC_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Dublin Core Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyDC_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Chris Bizer (chris@bizer.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the Dublin
    18. -
    19. *    Core Vocabulary. For details about DC see: http://dublincore.org/
    20. -
    21. *    Using the wrapper allows you to define all aspects of
    22. -
    23. *    the vocabulary in one spot, simplifing implementation and
    24. -
    25. *    maintainence.
    26. -
    27. */
    28. -
    29. class DC_RES{
    30. -
    31.     // DC concepts
    32. -
    33.     function CONTRIBUTOR()
    34. -
    35.     {
    36. -
    37.         return  new ResResource(DC_NS 'contributor');
    38. -
    39.  
    40. -
    41.     }
    42. -
    43.  
    44. -
    45.     function COVERAGE()
    46. -
    47.     {
    48. -
    49.         return  new ResResource(DC_NS 'coverage');
    50. -
    51.  
    52. -
    53.     }
    54. -
    55.  
    56. -
    57.     function CREATOR()
    58. -
    59.     {
    60. -
    61.         return  new ResResource(DC_NS 'creator');
    62. -
    63.  
    64. -
    65.     }
    66. -
    67.  
    68. -
    69.     function DATE()
    70. -
    71.     {
    72. -
    73.         return  new ResResource(DC_NS 'date');
    74. -
    75.  
    76. -
    77.     }
    78. -
    79.  
    80. -
    81.     function DESCRIPTION()
    82. -
    83.     {
    84. -
    85.         return  new ResResource(DC_NS 'description');
    86. -
    87.  
    88. -
    89.     }
    90. -
    91.  
    92. -
    93.     function FORMAT()
    94. -
    95.     {
    96. -
    97.         return  new ResResource(DC_NS 'format');
    98. -
    99.  
    100. -
    101.     }
    102. -
    103.  
    104. -
    105.     function IDENTIFIER()
    106. -
    107.     {
    108. -
    109.         return  new ResResource(DC_NS 'identifier');
    110. -
    111.  
    112. -
    113.     }
    114. -
    115.  
    116. -
    117.     function LANGUAGE()
    118. -
    119.     {
    120. -
    121.         return  new ResResource(DC_NS 'language');
    122. -
    123.  
    124. -
    125.     }
    126. -
    127.  
    128. -
    129.     function PUBLISHER()
    130. -
    131.     {
    132. -
    133.         return  new ResResource(DC_NS 'publisher');
    134. -
    135.  
    136. -
    137.     }
    138. -
    139.  
    140. -
    141.     function RIGHTS()
    142. -
    143.     {
    144. -
    145.         return  new ResResource(DC_NS 'rights');
    146. -
    147.  
    148. -
    149.     }
    150. -
    151.  
    152. -
    153.     function SOURCE()
    154. -
    155.     {
    156. -
    157.         return  new ResResource(DC_NS 'source');
    158. -
    159.  
    160. -
    161.     }
    162. -
    163.  
    164. -
    165.     function SUBJECT()
    166. -
    167.     {
    168. -
    169.         return  new ResResource(DC_NS 'subject');
    170. -
    171.  
    172. -
    173.     }
    174. -
    175.  
    176. -
    177.     function TITLE()
    178. -
    179.     {
    180. -
    181.         return  new ResResource(DC_NS 'title');
    182. -
    183.  
    184. -
    185.     }
    186. -
    187.  
    188. -
    189.     function TYPE()
    190. -
    191.     {
    192. -
    193.         return  new ResResource(DC_NS 'type');
    194. -
    195.     }
    196. -
    197.  
    198. -
    199.  
    200. -
    201.     // Other Elements and Element Refinements
    202. -
    203.     function ABSTRACT_()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(DCTERM_NS 'abstract');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function ACCESS_RIGHTS()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(DCTERM_NS 'accessRights');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function ALTERNATIVE()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(DCTERM_NS 'alternative');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function AUDIENCE()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(DCTERM_NS 'audience');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function AVAILABLE()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(DCTERM_NS 'available');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function BIBLIOGRAPHIC_CITATION()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(DCTERM_NS 'bibliographicCitation');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function CONFORMS_TO()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(DCTERM_NS 'conformsTo');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function CREATED()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(DCTERM_NS 'created');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function DATE_ACCEPTED()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(DCTERM_NS 'dateAccepted');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function DATE_COPYRIGHTED()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(DCTERM_NS 'dateCopyrighted');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function DATE_SUBMITTED()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(DCTERM_NS 'dateSubmitted');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function EDUCATION_LEVEL()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(DCTERM_NS 'educationLevel');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function EXTENT()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(DCTERM_NS 'extent');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HAS_FORMAT()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(DCTERM_NS 'hasFormat');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function HAS_PART()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(DCTERM_NS 'hasPart');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function HAS_VERSION()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(DCTERM_NS 'hasVersion');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function IS_FORMAT_OF()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(DCTERM_NS 'isFormatOf');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function IS_PART_OF()
    408. -
    409.     {
    410. -
    411.         return  new ResResource(DCTERM_NS 'isPartOf');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function IS_REFERENCED_BY()
    420. -
    421.     {
    422. -
    423.         return  new ResResource(DCTERM_NS 'isReferencedBy');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function IS_REPLACED_BY()
    432. -
    433.     {
    434. -
    435.         return  new ResResource(DCTERM_NS 'isReplacedBy');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function IS_REQUIRED_BY()
    444. -
    445.     {
    446. -
    447.         return  new ResResource(DCTERM_NS 'isRequiredBy');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function ISSUED()
    456. -
    457.     {
    458. -
    459.         return  new ResResource(DCTERM_NS 'issued');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function IS_VERSION_OF()
    468. -
    469.     {
    470. -
    471.         return  new ResResource(DCTERM_NS 'isVersionOf');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function LICENSE()
    480. -
    481.     {
    482. -
    483.         return  new ResResource(DCTERM_NS 'license');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEDIATOR()
    492. -
    493.     {
    494. -
    495.         return  new ResResource(DCTERM_NS 'mediator');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEDIUM()
    504. -
    505.     {
    506. -
    507.         return  new ResResource(DCTERM_NS 'medium');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MODIFIED()
    516. -
    517.     {
    518. -
    519.         return  new ResResource(DCTERM_NS 'modified');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function REFERENCES()
    528. -
    529.     {
    530. -
    531.         return  new ResResource(DCTERM_NS 'references');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function REPLACES()
    540. -
    541.     {
    542. -
    543.         return  new ResResource(DCTERM_NS 'replaces');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function REQUIRES()
    552. -
    553.     {
    554. -
    555.         return  new ResResource(DCTERM_NS 'requires');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function RIGHTS_HOLDER()
    564. -
    565.     {
    566. -
    567.         return  new ResResource(DCTERM_NS 'rightsHolder');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function SPATIAL()
    576. -
    577.     {
    578. -
    579.         return  new ResResource(DCTERM_NS 'spatial');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function TABLE_OF_CONTENTS()
    588. -
    589.     {
    590. -
    591.         return  new ResResource(DCTERM_NS 'tableOfContents');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function TEMPORAL()
    600. -
    601.     {
    602. -
    603.         return  new ResResource(DCTERM_NS 'temporal');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function VALID()
    612. -
    613.     {
    614. -
    615.         return  new ResResource(DCTERM_NS 'valid');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.  
    624. -
    625.     // Encoding schemes
    626. -
    627.     function BOX()
    628. -
    629.     {
    630. -
    631.         return  new ResResource(DCTERM_NS 'Box');
    632. -
    633.  
    634. -
    635.     }
    636. -
    637.  
    638. -
    639.     function DCMI_TYPE()
    640. -
    641.     {
    642. -
    643.         return  new ResResource(DCTERM_NS 'DCMIType');
    644. -
    645.  
    646. -
    647.     }
    648. -
    649.  
    650. -
    651.     function IMT()
    652. -
    653.     {
    654. -
    655.         return  new ResResource(DCTERM_NS 'IMT');
    656. -
    657.  
    658. -
    659.     }
    660. -
    661.  
    662. -
    663.     function ISO3166()
    664. -
    665.     {
    666. -
    667.         return  new ResResource(DCTERM_NS 'ISO3166');
    668. -
    669.  
    670. -
    671.     }
    672. -
    673.  
    674. -
    675.     function ISO639_2()
    676. -
    677.     {
    678. -
    679.         return  new ResResource(DCTERM_NS 'ISO639-2');
    680. -
    681.  
    682. -
    683.     }
    684. -
    685.  
    686. -
    687.     function LCC()
    688. -
    689.     {
    690. -
    691.         return  new ResResource(DCTERM_NS 'LCC');
    692. -
    693.  
    694. -
    695.     }
    696. -
    697.  
    698. -
    699.     function LCSH()
    700. -
    701.     {
    702. -
    703.         return  new ResResource(DCTERM_NS 'LCSH');
    704. -
    705.  
    706. -
    707.     }
    708. -
    709.  
    710. -
    711.     function MESH()
    712. -
    713.     {
    714. -
    715.         return  new ResResource(DCTERM_NS 'MESH');
    716. -
    717.  
    718. -
    719.     }
    720. -
    721.  
    722. -
    723.     function PERIOD()
    724. -
    725.     {
    726. -
    727.         return  new ResResource(DCTERM_NS 'Period');
    728. -
    729.  
    730. -
    731.     }
    732. -
    733.  
    734. -
    735.     function POINT()
    736. -
    737.     {
    738. -
    739.         return  new ResResource(DCTERM_NS 'Point');
    740. -
    741.  
    742. -
    743.     }
    744. -
    745.  
    746. -
    747.     function RFC1766()
    748. -
    749.     {
    750. -
    751.         return  new ResResource(DCTERM_NS 'RFC1766');
    752. -
    753.  
    754. -
    755.     }
    756. -
    757.  
    758. -
    759.     function RFC3066()
    760. -
    761.     {
    762. -
    763.         return  new ResResource(DCTERM_NS 'RFC3066');
    764. -
    765.  
    766. -
    767.     }
    768. -
    769.  
    770. -
    771.     function TGN()
    772. -
    773.     {
    774. -
    775.         return  new ResResource(DCTERM_NS 'TGN');
    776. -
    777.  
    778. -
    779.     }
    780. -
    781.  
    782. -
    783.     function UDC()
    784. -
    785.     {
    786. -
    787.         return  new ResResource(DCTERM_NS 'UDC');
    788. -
    789.  
    790. -
    791.     }
    792. -
    793.  
    794. -
    795.     function URI()
    796. -
    797.     {
    798. -
    799.         return  new ResResource(DCTERM_NS 'URI');
    800. -
    801.  
    802. -
    803.     }
    804. -
    805.  
    806. -
    807.     function W3CDTF()
    808. -
    809.     {
    810. -
    811.         return  new ResResource(DCTERM_NS 'W3CDTF');
    812. -
    813.  
    814. -
    815.     }
    816. -
    817.  
    818. -
    819.  
    820. -
    821.     // DCMI Type Vocabulary
    822. -
    823.     function COLLECTION()
    824. -
    825.     {
    826. -
    827.         return  new ResResource(DCMITYPE_NS 'Collection');
    828. -
    829.  
    830. -
    831.     }
    832. -
    833.  
    834. -
    835.     function DATASET()
    836. -
    837.     {
    838. -
    839.         return  new ResResource(DCMITYPE_NS 'Dataset');
    840. -
    841.  
    842. -
    843.     }
    844. -
    845.  
    846. -
    847.     function EVENT()
    848. -
    849.     {
    850. -
    851.         return  new ResResource(DCMITYPE_NS 'Event');
    852. -
    853.  
    854. -
    855.     }
    856. -
    857.  
    858. -
    859.     function IMAGE()
    860. -
    861.     {
    862. -
    863.         return  new ResResource(DCMITYPE_NS 'Image');
    864. -
    865.  
    866. -
    867.     }
    868. -
    869.  
    870. -
    871.     function INTERACTIVE_RESOURCE()
    872. -
    873.     {
    874. -
    875.         return  new ResResource(DCMITYPE_NS 'Interactive_Resource');
    876. -
    877.  
    878. -
    879.     }
    880. -
    881.  
    882. -
    883.     function MOVINGIMAGE()
    884. -
    885.     {
    886. -
    887.         return  new ResResource(DCMITYPE_NS 'Moving_Image');
    888. -
    889.  
    890. -
    891.     }
    892. -
    893.  
    894. -
    895.     function PHYSICALOBJECT()
    896. -
    897.     {
    898. -
    899.         return  new ResResource(DCMITYPE_NS 'Physical_Object');
    900. -
    901.  
    902. -
    903.     }
    904. -
    905.  
    906. -
    907.     function SERVICE()
    908. -
    909.     {
    910. -
    911.         return  new ResResource(DCMITYPE_NS 'Service');
    912. -
    913.  
    914. -
    915.     }
    916. -
    917.  
    918. -
    919.     function SOFTWARE()
    920. -
    921.     {
    922. -
    923.         return  new ResResource(DCMITYPE_NS 'Software');
    924. -
    925.  
    926. -
    927.     }
    928. -
    929.  
    930. -
    931.     function SOUND()
    932. -
    933.     {
    934. -
    935.         return  new Resource(DCMITYPE_NS 'Sound');
    936. -
    937.  
    938. -
    939.     }
    940. -
    941.  
    942. -
    943.     function STILLIMAGE()
    944. -
    945.     {
    946. -
    947.         return  new ResResource(DCMITYPE_NS 'Still_Image');
    948. -
    949.  
    950. -
    951.     }
    952. -
    953.  
    954. -
    955.     function TEXT()
    956. -
    957.     {
    958. -
    959.         return  new ResResource(DCMITYPE_NS 'Text');
    960. -
    961.     }
    962. -
    963. }
    964. -
    965.  
    966. -
    967.  
    968. -
    969.  
    970. -
    971. ?>
    972. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:48:58 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF.php.html deleted file mode 100755 index 7f82ac8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF.php.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - File Source for FOAF.php - - - - - -

    Source for file FOAF.php

    -

    Documentation is available at FOAF.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyFOAF.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33.  
    34. -
    35.  
    36. -
    37. // FOAF concepts
    38. -
    39. $FOAF_Agent new Resource(FOAF_NS 'Agent');
    40. -
    41. $FOAF_Document new Resource(FOAF_NS 'Document');
    42. -
    43. $FOAF_Group new Resource(FOAF_NS 'Group');
    44. -
    45. $FOAF_Image new Resource(FOAF_NS 'Image');
    46. -
    47. $FOAF_OnlineAccount new Resource(FOAF_NS 'OnlineAccount');
    48. -
    49. $FOAF_OnlineChatAccount new Resource(FOAF_NS 'OnlineChatAccount');
    50. -
    51. $FOAF_OnlineEcommerceAccount new Resource(FOAF_NS 'OnlineEcommerceAccount');
    52. -
    53. $FOAF_OnlineGamingAccount new Resource(FOAF_NS 'OnlineGamingAccount');
    54. -
    55. $FOAF_Organization new Resource(FOAF_NS 'Organization');
    56. -
    57. $FOAF_Person new Resource(FOAF_NS 'Person');
    58. -
    59. $FOAF_PersonalProfileDocument new Resource(FOAF_NS 'PersonalProfileDocument');
    60. -
    61. $FOAF_Project new Resource(FOAF_NS 'Project');
    62. -
    63. $FOAF_accountName new Resource(FOAF_NS 'accountName');
    64. -
    65. $FOAF_accountServiceHomepage new Resource(FOAF_NS 'accountServiceHomepage');
    66. -
    67. $FOAF_aimChatID new Resource(FOAF_NS 'aimChatID');
    68. -
    69. $FOAF_based_near new Resource(FOAF_NS 'based_near');
    70. -
    71. $FOAF_currentProject new Resource(FOAF_NS 'currentProject');
    72. -
    73. $FOAF_depiction new Resource(FOAF_NS 'depiction');
    74. -
    75. $FOAF_depicts new Resource(FOAF_NS 'depicts');
    76. -
    77. $FOAF_dnaChecksum new Resource(FOAF_NS 'dnaChecksum');
    78. -
    79. $FOAF_family_name new Resource(FOAF_NS 'family_name');
    80. -
    81. $FOAF_firstName new Resource(FOAF_NS 'firstName');
    82. -
    83. $FOAF_fundedBy new Resource(FOAF_NS 'fundedBy');
    84. -
    85. $FAOF_geekcode new Resource(FOAF_NS 'geekcode');
    86. -
    87. $FOAF_gender new Resource(FOAF_NS 'gender');
    88. -
    89. $FOAF_givenname new Resource(FOAF_NS 'givenname');
    90. -
    91. $FOAF_holdsAccount new Resource(FOAF_NS 'holdsAccount');
    92. -
    93. $FOAF_homepage new Resource(FOAF_NS 'homepage');
    94. -
    95. $FOAF_icqChatID new Resource(FOAF_NS 'icqChatID');
    96. -
    97. $FOAF_img new Resource(FOAF_NS 'img');
    98. -
    99. $FOAF_interest new Resource(FOAF_NS 'interest');
    100. -
    101. $FOAF_jabberID new Resource(FOAF_NS 'jabberID');
    102. -
    103. $FOAF_knows new Resource(FOAF_NS 'knows');
    104. -
    105. $FOAF_logo new Resource(FOAF_NS 'logo');
    106. -
    107. $FOAF_made new Resource(FOAF_NS 'made');
    108. -
    109. $FOAF_maker new Resource(FOAF_NS 'maker');
    110. -
    111. $FOAF_mbox new Resource(FOAF_NS 'mbox');
    112. -
    113. $FOAF_mbox_sha1sum new Resource(FOAF_NS 'mbox_sha1sum');
    114. -
    115. $FOAF_member new Resource(FOAF_NS 'member');
    116. -
    117. $FOAF_membershipClass =new Resource(FOAF_NS 'membershipClass');
    118. -
    119. $FOAF_msnChatID new Resource(FOAF_NS 'msnChatID');
    120. -
    121. $FOAF_myersBriggs new Resource(FOAF_NS 'myersBriggs');
    122. -
    123. $FOAF_name new Resource(FOAF_NS 'name');
    124. -
    125. $FOAF_nick new Resource(FOAF_NS 'nick');
    126. -
    127. $FOAF_page new Resource(FOAF_NS 'page');
    128. -
    129. $FOAF_pastProject new Resource(FOAF_NS 'pastProject');
    130. -
    131. $FOAF_phone new Resource(FOAF_NS 'phone');
    132. -
    133. $FOAF_plan new Resource(FOAF_NS 'plan');
    134. -
    135. $FOAF_primaryTopic new Resource(FOAF_NS 'primaryTopic');
    136. -
    137. $FOAF_publications new Resource(FOAF_NS 'publications');
    138. -
    139. $FOAF_schoolHomepage new Resource (FOAF_NS 'schoolHomepage');
    140. -
    141. $FOAF_sha1 new Resource (FOAF_NS 'sha1');
    142. -
    143. $FOAF_surname new Resource (FOAF_NS 'surname');
    144. -
    145. $FOAF_theme new Resource(FOAF_NS 'theme');
    146. -
    147. $FOAF_thumbnail new Resource(FOAF_NS 'thumbnail');
    148. -
    149. $FOAF_tipjar new Resource(FOAF_NS 'tipjar');
    150. -
    151. $FOAF_title new Resource(FOAF_NS 'title');
    152. -
    153. $FOAF_topic new Resource(FOAF_NS 'topic');
    154. -
    155. $FOAF_topic_interest new Resource(FOAF_NS 'topic_interest');
    156. -
    157. $FOAF_weblog new Resource(FOAF_NS 'weblog');
    158. -
    159. $FOAF_workInfoHomepage new Resource(FOAF_NS 'workInfoHomepage');
    160. -
    161. $FOAF_workplaceHomepage new Resource(FOAF_NS 'workplaceHomepage');
    162. -
    163. $FOAF_yahooChatID new Resource(FOAF_NS 'yahooChatID');
    164. -
    165.  
    166. -
    167.  
    168. -
    169.  
    170. -
    171.  
    172. -
    173. ?>
    174. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:09 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_C.php.html deleted file mode 100755 index eb547f2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_C.php.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - File Source for FOAF_C.php - - - - - -

    Source for file FOAF_C.php

    -

    Documentation is available at FOAF_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyFOAF_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class FOAF{
    32. -
    33.  
    34. -
    35.  
    36. -
    37.     function AGENT()
    38. -
    39.     {
    40. -
    41.         return  new Resource(FOAF_NS 'Agent');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function DOCUMENT()
    50. -
    51.     {
    52. -
    53.         return  new Resource(FOAF_NS 'Document');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function GROUP()
    62. -
    63.     {
    64. -
    65.         return  new Resource(FOAF_NS 'Group');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function IMAGE()
    74. -
    75.     {
    76. -
    77.         return  new Resource(FOAF_NS 'Image');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function ONLINE_ACCOUNT()
    86. -
    87.     {
    88. -
    89.         return  new Resource(FOAF_NS 'OnlineAccount');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function ONLINE_CHAT_ACCOUNT()
    98. -
    99.     {
    100. -
    101.         return  new Resource(FOAF_NS 'OnlineChatAccount');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ONLINE_ECOMMERCE_ACCOUNT()
    110. -
    111.     {
    112. -
    113.         return  new Resource(FOAF_NS 'OnlineEcommerceAccount');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function ONLINE_GAMING_ACCOUNT()
    122. -
    123.     {
    124. -
    125.         return  new Resource(FOAF_NS 'OnlineGamingAccount');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function ORGANIZATION()
    134. -
    135.     {
    136. -
    137.         return  new Resource(FOAF_NS 'Organization');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function PERSON()
    146. -
    147.     {
    148. -
    149.         return  new Resource(FOAF_NS 'Person');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function PERSONAL_PROFILE_DOCUMENT()
    158. -
    159.     {
    160. -
    161.         return  new Resource(FOAF_NS 'PersonalProfileDocument');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PROJECT()
    170. -
    171.     {
    172. -
    173.         return  new Resource(FOAF_NS 'Project');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function ACCOUNT_NAME()
    182. -
    183.     {
    184. -
    185.         return  new Resource(FOAF_NS 'accountName');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function ACCOUNT_SERVICE_HOMEPAGE()
    194. -
    195.     {
    196. -
    197.         return  new Resource(FOAF_NS 'accountServiceHomepage');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function AIM_CHAT_ID()
    206. -
    207.     {
    208. -
    209.         return  new Resource(FOAF_NS 'aimChatID');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function BASED_NEAR()
    218. -
    219.     {
    220. -
    221.         return  new Resource(FOAF_NS 'based_near');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function CURRENT_PROJECT()
    230. -
    231.     {
    232. -
    233.         return  new Resource(FOAF_NS 'currentProject');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function DEPICTION()
    242. -
    243.     {
    244. -
    245.         return  new Resource(FOAF_NS 'depiction');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function DEPICTS()
    254. -
    255.     {
    256. -
    257.         return  new Resource(FOAF_NS 'depicts');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function DNA_CHECKSUM()
    266. -
    267.     {
    268. -
    269.         return  new Resource(FOAF_NS 'dnaChecksum');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FAMILY_NAME()
    278. -
    279.     {
    280. -
    281.         return  new Resource(FOAF_NS 'family_name');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function FIRST_NAME()
    290. -
    291.     {
    292. -
    293.         return  new Resource(FOAF_NS 'firstName');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function FUNDED_BY()
    302. -
    303.     {
    304. -
    305.         return  new Resource(FOAF_NS 'fundedBy');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function GEEKCODE()
    314. -
    315.     {
    316. -
    317.         return  new Resource(FOAF_NS 'geekcode');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function GENDER()
    326. -
    327.     {
    328. -
    329.         return  new Resource(FOAF_NS 'gender');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GIVENNAME()
    338. -
    339.     {
    340. -
    341.         return  new Resource(FOAF_NS 'givenname');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function HOLDS_ACCOUNT()
    350. -
    351.     {
    352. -
    353.         return  new Resource(FOAF_NS 'holdsAccount');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function HOMEPAGE()
    362. -
    363.     {
    364. -
    365.         return  new Resource(FOAF_NS 'homepage');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function ICQ_CHAT_ID()
    374. -
    375.     {
    376. -
    377.         return  new Resource(FOAF_NS 'icqChatID');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function IMG()
    386. -
    387.     {
    388. -
    389.         return  new Resource(FOAF_NS 'img');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function INTEREST()
    398. -
    399.     {
    400. -
    401.         return  new Resource(FOAF_NS 'interest');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function JABBER_ID()
    410. -
    411.     {
    412. -
    413.         return  new Resource(FOAF_NS 'jabberID');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function KNOWS()
    422. -
    423.     {
    424. -
    425.         return  new Resource(FOAF_NS 'knows');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function LOGO()
    434. -
    435.     {
    436. -
    437.         return  new Resource(FOAF_NS 'logo');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function MADE()
    446. -
    447.     {
    448. -
    449.         return  new Resource(FOAF_NS 'made');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function MAKER()
    458. -
    459.     {
    460. -
    461.         return  new Resource(FOAF_NS 'maker');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MBOX()
    470. -
    471.     {
    472. -
    473.         return  new Resource(FOAF_NS 'mbox');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function MBOX_SHA1SUM()
    482. -
    483.     {
    484. -
    485.         return  new Resource(FOAF_NS 'mbox_sha1sum');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function MEMBER()
    494. -
    495.     {
    496. -
    497.         return  new Resource(FOAF_NS 'member');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function MEMBERSHIP_CLASS()
    506. -
    507.     {
    508. -
    509.         return new Resource(FOAF_NS 'membershipClass');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function MSN_CHAT_ID()
    518. -
    519.     {
    520. -
    521.         return  new Resource(FOAF_NS 'msnChatID');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function MYERS_BRIGGS()
    530. -
    531.     {
    532. -
    533.         return  new Resource(FOAF_NS 'myersBriggs');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function NAME()
    542. -
    543.     {
    544. -
    545.         return  new Resource(FOAF_NS 'name');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function NICK()
    554. -
    555.     {
    556. -
    557.         return  new Resource(FOAF_NS 'nick');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function PAGE()
    566. -
    567.     {
    568. -
    569.         return  new Resource(FOAF_NS 'page');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function PAST_PROJECT()
    578. -
    579.     {
    580. -
    581.         return  new Resource(FOAF_NS 'pastProject');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function PHONE()
    590. -
    591.     {
    592. -
    593.         return  new Resource(FOAF_NS 'phone');
    594. -
    595.  
    596. -
    597.     }
    598. -
    599.  
    600. -
    601.     function PLAN()
    602. -
    603.     {
    604. -
    605.         return  new Resource(FOAF_NS 'plan');
    606. -
    607.  
    608. -
    609.     }
    610. -
    611.  
    612. -
    613.     function PRIMARY_TOPIC()
    614. -
    615.     {
    616. -
    617.         return  new Resource(FOAF_NS 'primaryTopic');
    618. -
    619.  
    620. -
    621.     }
    622. -
    623.  
    624. -
    625.     function PUBLICATIONS()
    626. -
    627.     {
    628. -
    629.         return  new Resource(FOAF_NS 'publications');
    630. -
    631.  
    632. -
    633.     }
    634. -
    635.  
    636. -
    637.     function SCHOOL_HOMEPAGE()
    638. -
    639.     {
    640. -
    641.         return  new Resource (FOAF_NS 'schoolHomepage');
    642. -
    643.  
    644. -
    645.     }
    646. -
    647.  
    648. -
    649.     function SHA1()
    650. -
    651.     {
    652. -
    653.         return  new Resource (FOAF_NS 'sha1');
    654. -
    655.  
    656. -
    657.     }
    658. -
    659.  
    660. -
    661.     function SURNAME()
    662. -
    663.     {
    664. -
    665.         return  new Resource (FOAF_NS 'surname');
    666. -
    667.  
    668. -
    669.     }
    670. -
    671.  
    672. -
    673.     function THEME()
    674. -
    675.     {
    676. -
    677.         return  new Resource(FOAF_NS 'theme');
    678. -
    679.  
    680. -
    681.     }
    682. -
    683.  
    684. -
    685.     function THUMBNAIL()
    686. -
    687.     {
    688. -
    689.         return  new Resource(FOAF_NS 'thumbnail');
    690. -
    691.  
    692. -
    693.     }
    694. -
    695.  
    696. -
    697.     function TIPJAR()
    698. -
    699.     {
    700. -
    701.         return  new Resource(FOAF_NS 'tipjar');
    702. -
    703.  
    704. -
    705.     }
    706. -
    707.  
    708. -
    709.     function TITLE()
    710. -
    711.     {
    712. -
    713.         return  new Resource(FOAF_NS 'title');
    714. -
    715.  
    716. -
    717.     }
    718. -
    719.  
    720. -
    721.     function TOPIC()
    722. -
    723.     {
    724. -
    725.         return  new Resource(FOAF_NS 'topic');
    726. -
    727.  
    728. -
    729.     }
    730. -
    731.  
    732. -
    733.     function TOPIC_INTEREST()
    734. -
    735.     {
    736. -
    737.         return  new Resource(FOAF_NS 'topic_interest');
    738. -
    739.  
    740. -
    741.     }
    742. -
    743.  
    744. -
    745.     function WEBLOG()
    746. -
    747.     {
    748. -
    749.         return  new Resource(FOAF_NS 'weblog');
    750. -
    751.  
    752. -
    753.     }
    754. -
    755.  
    756. -
    757.     function WORK_INFO_HOMEPAGE()
    758. -
    759.     {
    760. -
    761.         return  new Resource(FOAF_NS 'workInfoHomepage');
    762. -
    763.  
    764. -
    765.     }
    766. -
    767.  
    768. -
    769.     function WORKPLACE_HOMEPAGE()
    770. -
    771.     {
    772. -
    773.         return  new Resource(FOAF_NS 'workplaceHomepage');
    774. -
    775.  
    776. -
    777.     }
    778. -
    779.  
    780. -
    781.     function YAHOO_CHAT_ID()
    782. -
    783.     {
    784. -
    785.         return  new Resource(FOAF_NS 'yahooChatID');
    786. -
    787.     }
    788. -
    789. }
    790. -
    791.  
    792. -
    793.  
    794. -
    795.  
    796. -
    797.  
    798. -
    799.  
    800. -
    801. ?>
    802. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_RES.php.html deleted file mode 100755 index 5ff70eaa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyFOAF_RES.php.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - File Source for FOAF_RES.php - - - - - -

    Source for file FOAF_RES.php

    -

    Documentation is available at FOAF_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Friend of a Friend (FOAF) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyFOAF_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Friend of a Friend project (FOAF).
    20. -
    21. *    For details about FOAF see: http://xmlns.com/foaf/0.1/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class FOAF_RES{
    32. -
    33.  
    34. -
    35.     function AGENT()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(FOAF_NS 'Agent');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function DOCUMENT()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(FOAF_NS 'Document');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function GROUP()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(FOAF_NS 'Group');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function IMAGE()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(FOAF_NS 'Image');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ONLINE_ACCOUNT()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(FOAF_NS 'OnlineAccount');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function ONLINE_CHAT_ACCOUNT()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(FOAF_NS 'OnlineChatAccount');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function ONLINE_ECOMMERCE_ACCOUNT()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(FOAF_NS 'OnlineEcommerceAccount');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function ONLINE_GAMING_ACCOUNT()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(FOAF_NS 'OnlineGamingAccount');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function ORGANIZATION()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(FOAF_NS 'Organization');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function PERSON()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(FOAF_NS 'Person');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function PERSONAL_PROFILE_DOCUMENT()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(FOAF_NS 'PersonalProfileDocument');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function PROJECT()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(FOAF_NS 'Project');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function ACCOUNT_NAME()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(FOAF_NS 'accountName');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function ACCOUNT_SERVICE_HOMEPAGE()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(FOAF_NS 'accountServiceHomepage');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function AIM_CHAT_ID()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(FOAF_NS 'aimChatID');
    208. -
    209.  
    210. -
    211.     }
    212. -
    213.  
    214. -
    215.     function BASED_NEAR()
    216. -
    217.     {
    218. -
    219.         return  new ResResource(FOAF_NS 'based_near');
    220. -
    221.  
    222. -
    223.     }
    224. -
    225.  
    226. -
    227.     function CURRENT_PROJECT()
    228. -
    229.     {
    230. -
    231.         return  new ResResource(FOAF_NS 'currentProject');
    232. -
    233.  
    234. -
    235.     }
    236. -
    237.  
    238. -
    239.     function DEPICTION()
    240. -
    241.     {
    242. -
    243.         return  new ResResource(FOAF_NS 'depiction');
    244. -
    245.  
    246. -
    247.     }
    248. -
    249.  
    250. -
    251.     function DEPICTS()
    252. -
    253.     {
    254. -
    255.         return  new ResResource(FOAF_NS 'depicts');
    256. -
    257.  
    258. -
    259.     }
    260. -
    261.  
    262. -
    263.     function DNA_CHECKSUM()
    264. -
    265.     {
    266. -
    267.         return  new ResResource(FOAF_NS 'dnaChecksum');
    268. -
    269.  
    270. -
    271.     }
    272. -
    273.  
    274. -
    275.     function FAMILY_NAME()
    276. -
    277.     {
    278. -
    279.         return  new ResResource(FOAF_NS 'family_name');
    280. -
    281.  
    282. -
    283.     }
    284. -
    285.  
    286. -
    287.     function FIRST_NAME()
    288. -
    289.     {
    290. -
    291.         return  new ResResource(FOAF_NS 'firstName');
    292. -
    293.  
    294. -
    295.     }
    296. -
    297.  
    298. -
    299.     function FUNDED_BY()
    300. -
    301.     {
    302. -
    303.         return  new ResResource(FOAF_NS 'fundedBy');
    304. -
    305.  
    306. -
    307.     }
    308. -
    309.  
    310. -
    311.     function GEEKCODE()
    312. -
    313.     {
    314. -
    315.         return  new ResResource(FOAF_NS 'geekcode');
    316. -
    317.  
    318. -
    319.     }
    320. -
    321.  
    322. -
    323.     function GENDER()
    324. -
    325.     {
    326. -
    327.         return  new ResResource(FOAF_NS 'gender');
    328. -
    329.  
    330. -
    331.     }
    332. -
    333.  
    334. -
    335.     function GIVENNAME()
    336. -
    337.     {
    338. -
    339.         return  new ResResource(FOAF_NS 'givenname');
    340. -
    341.  
    342. -
    343.     }
    344. -
    345.  
    346. -
    347.     function HOLDS_ACCOUNT()
    348. -
    349.     {
    350. -
    351.         return  new ResResource(FOAF_NS 'holdsAccount');
    352. -
    353.  
    354. -
    355.     }
    356. -
    357.  
    358. -
    359.     function HOMEPAGE()
    360. -
    361.     {
    362. -
    363.         return  new ResResource(FOAF_NS 'homepage');
    364. -
    365.  
    366. -
    367.     }
    368. -
    369.  
    370. -
    371.     function ICQ_CHAT_ID()
    372. -
    373.     {
    374. -
    375.         return  new ResResource(FOAF_NS 'icqChatID');
    376. -
    377.  
    378. -
    379.     }
    380. -
    381.  
    382. -
    383.     function IMG()
    384. -
    385.     {
    386. -
    387.         return  new ResResource(FOAF_NS 'img');
    388. -
    389.  
    390. -
    391.     }
    392. -
    393.  
    394. -
    395.     function INTEREST()
    396. -
    397.     {
    398. -
    399.         return  new ResResource(FOAF_NS 'interest');
    400. -
    401.  
    402. -
    403.     }
    404. -
    405.  
    406. -
    407.     function JABBER_ID()
    408. -
    409.     {
    410. -
    411.         return  new ResResource(FOAF_NS 'jabberID');
    412. -
    413.  
    414. -
    415.     }
    416. -
    417.  
    418. -
    419.     function KNOWS()
    420. -
    421.     {
    422. -
    423.         return  new ResResource(FOAF_NS 'knows');
    424. -
    425.  
    426. -
    427.     }
    428. -
    429.  
    430. -
    431.     function LOGO()
    432. -
    433.     {
    434. -
    435.         return  new ResResource(FOAF_NS 'logo');
    436. -
    437.  
    438. -
    439.     }
    440. -
    441.  
    442. -
    443.     function MADE()
    444. -
    445.     {
    446. -
    447.         return  new ResResource(FOAF_NS 'made');
    448. -
    449.  
    450. -
    451.     }
    452. -
    453.  
    454. -
    455.     function MAKER()
    456. -
    457.     {
    458. -
    459.         return  new ResResource(FOAF_NS 'maker');
    460. -
    461.  
    462. -
    463.     }
    464. -
    465.  
    466. -
    467.     function MBOX()
    468. -
    469.     {
    470. -
    471.         return  new ResResource(FOAF_NS 'mbox');
    472. -
    473.  
    474. -
    475.     }
    476. -
    477.  
    478. -
    479.     function MBOX_SHA1SUM()
    480. -
    481.     {
    482. -
    483.         return  new ResResource(FOAF_NS 'mbox_sha1sum');
    484. -
    485.  
    486. -
    487.     }
    488. -
    489.  
    490. -
    491.     function MEMBER()
    492. -
    493.     {
    494. -
    495.         return  new ResResource(FOAF_NS 'member');
    496. -
    497.  
    498. -
    499.     }
    500. -
    501.  
    502. -
    503.     function MEMBERSHIP_CLASS()
    504. -
    505.     {
    506. -
    507.         return new ResResource(FOAF_NS 'membershipClass');
    508. -
    509.  
    510. -
    511.     }
    512. -
    513.  
    514. -
    515.     function MSN_CHAT_ID()
    516. -
    517.     {
    518. -
    519.         return  new ResResource(FOAF_NS 'msnChatID');
    520. -
    521.  
    522. -
    523.     }
    524. -
    525.  
    526. -
    527.     function MYERS_BRIGGS()
    528. -
    529.     {
    530. -
    531.         return  new ResResource(FOAF_NS 'myersBriggs');
    532. -
    533.  
    534. -
    535.     }
    536. -
    537.  
    538. -
    539.     function NAME()
    540. -
    541.     {
    542. -
    543.         return  new ResResource(FOAF_NS 'name');
    544. -
    545.  
    546. -
    547.     }
    548. -
    549.  
    550. -
    551.     function NICK()
    552. -
    553.     {
    554. -
    555.         return  new ResResource(FOAF_NS 'nick');
    556. -
    557.  
    558. -
    559.     }
    560. -
    561.  
    562. -
    563.     function PAGE()
    564. -
    565.     {
    566. -
    567.         return  new ResResource(FOAF_NS 'page');
    568. -
    569.  
    570. -
    571.     }
    572. -
    573.  
    574. -
    575.     function PAST_PROJECT()
    576. -
    577.     {
    578. -
    579.         return  new ResResource(FOAF_NS 'pastProject');
    580. -
    581.  
    582. -
    583.     }
    584. -
    585.  
    586. -
    587.     function PHONE()
    588. -
    589.     {
    590. -
    591.         return  new ResResource(FOAF_NS 'phone');
    592. -
    593.  
    594. -
    595.     }
    596. -
    597.  
    598. -
    599.     function PLAN()
    600. -
    601.     {
    602. -
    603.         return  new ResResource(FOAF_NS 'plan');
    604. -
    605.  
    606. -
    607.     }
    608. -
    609.  
    610. -
    611.     function PRIMARY_TOPIC()
    612. -
    613.     {
    614. -
    615.         return  new ResResource(FOAF_NS 'primaryTopic');
    616. -
    617.  
    618. -
    619.     }
    620. -
    621.  
    622. -
    623.     function PUBLICATIONS()
    624. -
    625.     {
    626. -
    627.         return  new ResResource(FOAF_NS 'publications');
    628. -
    629.  
    630. -
    631.     }
    632. -
    633.  
    634. -
    635.     function SCHOOL_HOMEPAGE()
    636. -
    637.     {
    638. -
    639.         return  new ResResource (FOAF_NS 'schoolHomepage');
    640. -
    641.  
    642. -
    643.     }
    644. -
    645.  
    646. -
    647.     function SHA1()
    648. -
    649.     {
    650. -
    651.         return  new ResResource (FOAF_NS 'sha1');
    652. -
    653.  
    654. -
    655.     }
    656. -
    657.  
    658. -
    659.     function SURNAME()
    660. -
    661.     {
    662. -
    663.         return  new ResResource (FOAF_NS 'surname');
    664. -
    665.  
    666. -
    667.     }
    668. -
    669.  
    670. -
    671.     function THEME()
    672. -
    673.     {
    674. -
    675.         return  new ResResource(FOAF_NS 'theme');
    676. -
    677.  
    678. -
    679.     }
    680. -
    681.  
    682. -
    683.     function THUMBNAIL()
    684. -
    685.     {
    686. -
    687.         return  new ResResource(FOAF_NS 'thumbnail');
    688. -
    689.  
    690. -
    691.     }
    692. -
    693.  
    694. -
    695.     function TIPJAR()
    696. -
    697.     {
    698. -
    699.         return  new ResResource(FOAF_NS 'tipjar');
    700. -
    701.  
    702. -
    703.     }
    704. -
    705.  
    706. -
    707.     function TITLE()
    708. -
    709.     {
    710. -
    711.         return  new ResResource(FOAF_NS 'title');
    712. -
    713.  
    714. -
    715.     }
    716. -
    717.  
    718. -
    719.     function TOPIC()
    720. -
    721.     {
    722. -
    723.         return  new ResResource(FOAF_NS 'topic');
    724. -
    725.  
    726. -
    727.     }
    728. -
    729.  
    730. -
    731.     function TOPIC_INTEREST()
    732. -
    733.     {
    734. -
    735.         return  new ResResource(FOAF_NS 'topic_interest');
    736. -
    737.  
    738. -
    739.     }
    740. -
    741.  
    742. -
    743.     function WEBLOG()
    744. -
    745.     {
    746. -
    747.         return  new ResResource(FOAF_NS 'weblog');
    748. -
    749.  
    750. -
    751.     }
    752. -
    753.  
    754. -
    755.     function WORK_INFO_HOMEPAGE()
    756. -
    757.     {
    758. -
    759.         return  new ResResource(FOAF_NS 'workInfoHomepage');
    760. -
    761.  
    762. -
    763.     }
    764. -
    765.  
    766. -
    767.     function WORKPLACE_HOMEPAGE()
    768. -
    769.     {
    770. -
    771.         return  new ResResource(FOAF_NS 'workplaceHomepage');
    772. -
    773.  
    774. -
    775.     }
    776. -
    777.  
    778. -
    779.     function YAHOO_CHAT_ID()
    780. -
    781.     {
    782. -
    783.         return  new ResResource(FOAF_NS 'yahooChatID');
    784. -
    785.     }
    786. -
    787. }
    788. -
    789.  
    790. -
    791.  
    792. -
    793.  
    794. -
    795.  
    796. -
    797. ?>
    798. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL.php.html deleted file mode 100755 index 1a2a80b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL.php.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for OWL.php - - - - - -

    Source for file OWL.php

    -

    Documentation is available at OWL.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyOWL.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33. // OWL concepts
    34. -
    35. $OWL_AnnotationProperty new Resource(OWL_NS 'AnnotationProperty');
    36. -
    37. $OWL_AllDifferent new Resource(OWL_NS 'AllDifferent');
    38. -
    39. $OWL_allValuesFrom new Resource(OWL_NS 'allValuesFrom');
    40. -
    41. $OWL_backwardCompatibleWith new Resource(OWL_NS 'backwardCompatibleWith');
    42. -
    43. $OWL_cardinality new Resource(OWL_NS 'cardinality');
    44. -
    45. $OWL_Class new Resource(OWL_NS 'Class');
    46. -
    47. $OWL_complementOf new Resource(OWL_NS 'complementOf');
    48. -
    49. $OWL_Datatype new Resource(OWL_NS 'Datatype');
    50. -
    51. $OWL_DatatypeProperty new Resource(OWL_NS 'DatatypeProperty');
    52. -
    53. $OWL_DataRange new Resource(OWL_NS 'DataRange');
    54. -
    55. $OWL_DatatypeRestriction new Resource(OWL_NS 'DatatypeRestriction');
    56. -
    57. $OWL_DeprecatedClass new Resource(OWL_NS 'DeprecatedClass');
    58. -
    59. $OWL_DeprecatedProperty new Resource(OWL_NS 'DeprecatedProperty');
    60. -
    61. $OWL_distinctMembers new Resource(OWL_NS 'distinctMembers');
    62. -
    63. $OWL_differentFrom new Resource(OWL_NS 'differentFrom');
    64. -
    65. $OWL_disjointWith new Resource(OWL_NS 'disjointWith');
    66. -
    67. $OWL_equivalentClass new Resource(OWL_NS 'equivalentClass');
    68. -
    69. $OWL_equivalentProperty new Resource(OWL_NS 'equivalentProperty');
    70. -
    71. $OWL_FunctionalProperty new Resource(OWL_NS 'FunctionalProperty');
    72. -
    73. $OWL_hasValue new Resource(OWL_NS 'hasValue');
    74. -
    75. $OWL_incompatibleWith new Resource(OWL_NS 'incompatibleWith');
    76. -
    77. $OWL_imports new Resource(OWL_NS 'imports');
    78. -
    79. $OWL_intersectionOf new Resource(OWL_NS 'intersectionOf');
    80. -
    81. $OWL_InverseFunctionalProperty new Resource(OWL_NS 'InverseFunctionalProperty');
    82. -
    83. $OWL_inverseOf new Resource(OWL_NS 'inverseOf');
    84. -
    85. $OWL_maxCardinality new Resource(OWL_NS 'maxCardinality');
    86. -
    87. $OWL_minCardinality new Resource(OWL_NS 'minCardinality');
    88. -
    89. $OWL_Nothing new Resource(OWL_NS 'Nothing');
    90. -
    91. $OWL_ObjectClass new Resource(OWL_NS 'ObjectClass');
    92. -
    93. $OWL_ObjectProperty new Resource(OWL_NS 'ObjectProperty');
    94. -
    95. $OWL_ObjectRestriction new Resource(OWL_NS 'ObjectRestriction');
    96. -
    97. $OWL_oneOf new Resource(OWL_NS 'oneOf');
    98. -
    99. $OWL_onProperty new Resource(OWL_NS 'onProperty');
    100. -
    101. $OWL_Ontology new Resource(OWL_NS 'Ontology');
    102. -
    103. $OWL_priorVersion new Resource(OWL_NS 'priorVersion');
    104. -
    105. $OWL_Property new Resource(OWL_NS 'Property');
    106. -
    107. $OWL_Restriction new Resource(OWL_NS 'Restriction');
    108. -
    109. $OWL_sameAs new Resource(OWL_NS 'sameAs');
    110. -
    111. $OWL_sameClassAs new Resource(OWL_NS 'sameClassAs');
    112. -
    113. $OWL_sameIndividualAs new Resource(OWL_NS 'sameIndividualAs');
    114. -
    115. $OWL_samePropertyAs new Resource(OWL_NS 'samePropertyAs');
    116. -
    117. $OWL_someValuesFrom new Resource(OWL_NS 'someValuesFrom');
    118. -
    119. $OWL_SymmetricProperty new Resource(OWL_NS 'SymmetricProperty');
    120. -
    121. $OWL_Thing new Resource(OWL_NS 'Thing');
    122. -
    123. $OWL_TransitiveProperty new Resource(OWL_NS 'TransitiveProperty');
    124. -
    125. $OWL_unionOf new Resource(OWL_NS 'unionOf');
    126. -
    127. $OWL_versionInfo new Resource(OWL_NS 'versionInfo');
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:17 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_C.php.html deleted file mode 100755 index 83feb88e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_C.php.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - File Source for OWL_C.php - - - - - -

    Source for file OWL_C.php

    -

    Documentation is available at OWL_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyOWL_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class OWL{
    32. -
    33.  
    34. -
    35.     // OWL concepts
    36. -
    37.     function ANNOTATION_PROPERTY()
    38. -
    39.     {
    40. -
    41.         return  new Resource(OWL_NS 'AnnotationProperty');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ALL_DIFFERENT()
    50. -
    51.     {
    52. -
    53.         return  new Resource(OWL_NS 'AllDifferent');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ALL_VALUES_FROM()
    62. -
    63.     {
    64. -
    65.         return  new Resource(OWL_NS 'allValuesFrom');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function BACKWARD_COMPATIBLE_WITH()
    74. -
    75.     {
    76. -
    77.         return  new Resource(OWL_NS 'backwardCompatibleWith');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function CARDINALITY()
    86. -
    87.     {
    88. -
    89.         return  new Resource(OWL_NS 'cardinality');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function OWL_CLASS()
    98. -
    99.     {
    100. -
    101.         return  new Resource(OWL_NS 'Class');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function COMPLEMENT_OF()
    110. -
    111.     {
    112. -
    113.         return  new Resource(OWL_NS 'complementOf');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function DATATYPE()
    122. -
    123.     {
    124. -
    125.         return  new Resource(OWL_NS 'Datatype');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function DATATYPE_PROPERTY()
    134. -
    135.     {
    136. -
    137.         return  new Resource(OWL_NS 'DatatypeProperty');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function DATA_RANGE()
    146. -
    147.     {
    148. -
    149.         return  new Resource(OWL_NS 'DataRange');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function DATATYPE_RESTRICTION()
    158. -
    159.     {
    160. -
    161.         return  new Resource(OWL_NS 'DatatypeRestriction');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function DEPRECATED_CLASS()
    170. -
    171.     {
    172. -
    173.         return  new Resource(OWL_NS 'DeprecatedClass');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function DEPRECATED_PROPERTY()
    182. -
    183.     {
    184. -
    185.         return  new Resource(OWL_NS 'DeprecatedProperty');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DISTINCT_MEMBERS()
    194. -
    195.     {
    196. -
    197.         return  new Resource(OWL_NS 'distinctMembers');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function DIFFERENT_FROM()
    206. -
    207.     {
    208. -
    209.         return  new Resource(OWL_NS 'differentFrom');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function DISJOINT_WITH()
    218. -
    219.     {
    220. -
    221.         return  new Resource(OWL_NS 'disjointWith');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function EQUIVALENT_CLASS()
    230. -
    231.     {
    232. -
    233.         return  new Resource(OWL_NS 'equivalentClass');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function EQUIVALENT_PROPERTY()
    242. -
    243.     {
    244. -
    245.         return  new Resource(OWL_NS 'equivalentProperty');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function FUNCTIONAL_PROPERTY()
    254. -
    255.     {
    256. -
    257.         return  new Resource(OWL_NS 'FunctionalProperty');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function HAS_VALUE()
    266. -
    267.     {
    268. -
    269.         return  new Resource(OWL_NS 'hasValue');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function INCOMPATIBLE_WITH()
    278. -
    279.     {
    280. -
    281.         return  new Resource(OWL_NS 'incompatibleWith');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function IMPORTS()
    290. -
    291.     {
    292. -
    293.         return  new Resource(OWL_NS 'imports');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function INTERSECTION_OF()
    302. -
    303.     {
    304. -
    305.         return  new Resource(OWL_NS 'intersectionOf');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function INVERSE_FUNCTIONAL_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return  new Resource(OWL_NS 'InverseFunctionalProperty');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function INVERSE_OF()
    326. -
    327.     {
    328. -
    329.         return  new Resource(OWL_NS 'inverseOf');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function MAX_CARDINALITY()
    338. -
    339.     {
    340. -
    341.         return  new Resource(OWL_NS 'maxCardinality');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function MIN_CARDINALITY()
    350. -
    351.     {
    352. -
    353.         return  new Resource(OWL_NS 'minCardinality');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function NOTHING()
    362. -
    363.     {
    364. -
    365.         return  new Resource(OWL_NS 'Nothing');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function OBJECT_CLASS()
    374. -
    375.     {
    376. -
    377.         return  new Resource(OWL_NS 'ObjectClass');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function OBJECT_PROPERTY()
    386. -
    387.     {
    388. -
    389.         return  new Resource(OWL_NS 'ObjectProperty');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function OBJECT_RESTRICTION()
    398. -
    399.     {
    400. -
    401.         return  new Resource(OWL_NS 'ObjectRestriction');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function ONE_OF()
    410. -
    411.     {
    412. -
    413.         return  new Resource(OWL_NS 'oneOf');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ON_PROPERTY()
    422. -
    423.     {
    424. -
    425.         return  new Resource(OWL_NS 'onProperty');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function ONTOLOGY()
    434. -
    435.     {
    436. -
    437.         return  new Resource(OWL_NS 'Ontology');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function PRIOR_VERSION()
    446. -
    447.     {
    448. -
    449.         return  new Resource(OWL_NS 'priorVersion');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function PROPERTY()
    458. -
    459.     {
    460. -
    461.         return  new Resource(OWL_NS 'Property');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function RESTRICTION()
    470. -
    471.     {
    472. -
    473.         return  new Resource(OWL_NS 'Restriction');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function SAME_AS()
    482. -
    483.     {
    484. -
    485.         return  new Resource(OWL_NS 'sameAs');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function SAME_CLASS_AS()
    494. -
    495.     {
    496. -
    497.         return  new Resource(OWL_NS 'sameClassAs');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function SAME_INDIVIDUAL_AS()
    506. -
    507.     {
    508. -
    509.         return  new Resource(OWL_NS 'sameIndividualAs');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function SAME_PROPERTY_AS()
    518. -
    519.     {
    520. -
    521.         return  new Resource(OWL_NS 'samePropertyAs');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function SOME_VALUES_FROM()
    530. -
    531.     {
    532. -
    533.         return  new Resource(OWL_NS 'someValuesFrom');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function SYMMETRIC_PROPERTY()
    542. -
    543.     {
    544. -
    545.         return  new Resource(OWL_NS 'SymmetricProperty');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function THING()
    554. -
    555.     {
    556. -
    557.         return  new Resource(OWL_NS 'Thing');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TRANSITIVE_PROPERTY()
    566. -
    567.     {
    568. -
    569.         return  new Resource(OWL_NS 'TransitiveProperty');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function UNION_OF()
    578. -
    579.     {
    580. -
    581.         return  new Resource(OWL_NS 'unionOf');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function VERSION_INFO()
    590. -
    591.     {
    592. -
    593.         return  new Resource(OWL_NS 'versionInfo');
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. }
    600. -
    601.  
    602. -
    603.  
    604. -
    605. ?>
    606. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_RES.php.html deleted file mode 100755 index c1d7c3ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyOWL_RES.php.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - File Source for OWL_RES.php - - - - - -

    Source for file OWL_RES.php

    -

    Documentation is available at OWL_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   OWL Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyOWL_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of theWeb
    18. -
    19. *    Ontology Language (OWL). For details about OWL see:
    20. -
    21. *    http://www.w3.org/TR/owl-ref/
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class OWL_RES{
    32. -
    33.  
    34. -
    35.     // OWL concepts
    36. -
    37.     function ANNOTATION_PROPERTY()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(OWL_NS 'AnnotationProperty');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ALL_DIFFERENT()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(OWL_NS 'AllDifferent');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ALL_VALUES_FROM()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(OWL_NS 'allValuesFrom');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function BACKWARD_COMPATIBLE_WITH()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(OWL_NS 'backwardCompatibleWith');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function CARDINALITY()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(OWL_NS 'cardinality');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function OWL_CLASS()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(OWL_NS 'Class');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function COMPLEMENT_OF()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(OWL_NS 'complementOf');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function DATATYPE()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(OWL_NS 'Datatype');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function DATATYPE_PROPERTY()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(OWL_NS 'DatatypeProperty');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function DATA_RANGE()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(OWL_NS 'DataRange');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function DATATYPE_RESTRICTION()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(OWL_NS 'DatatypeRestriction');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function DEPRECATED_CLASS()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(OWL_NS 'DeprecatedClass');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function DEPRECATED_PROPERTY()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(OWL_NS 'DeprecatedProperty');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DISTINCT_MEMBERS()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(OWL_NS 'distinctMembers');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function DIFFERENT_FROM()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(OWL_NS 'differentFrom');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function DISJOINT_WITH()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(OWL_NS 'disjointWith');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function EQUIVALENT_CLASS()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(OWL_NS 'equivalentClass');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function EQUIVALENT_PROPERTY()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(OWL_NS 'equivalentProperty');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function FUNCTIONAL_PROPERTY()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(OWL_NS 'FunctionalProperty');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function HAS_VALUE()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(OWL_NS 'hasValue');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function INCOMPATIBLE_WITH()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(OWL_NS 'incompatibleWith');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function IMPORTS()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(OWL_NS 'imports');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function INTERSECTION_OF()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(OWL_NS 'intersectionOf');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function INVERSE_FUNCTIONAL_PROPERTY()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(OWL_NS 'InverseFunctionalProperty');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function INVERSE_OF()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(OWL_NS 'inverseOf');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function MAX_CARDINALITY()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(OWL_NS 'maxCardinality');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function MIN_CARDINALITY()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(OWL_NS 'minCardinality');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function NOTHING()
    362. -
    363.     {
    364. -
    365.         return  new ResResource(OWL_NS 'Nothing');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function OBJECT_CLASS()
    374. -
    375.     {
    376. -
    377.         return  new ResResource(OWL_NS 'ObjectClass');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function OBJECT_PROPERTY()
    386. -
    387.     {
    388. -
    389.         return  new ResResource(OWL_NS 'ObjectProperty');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function OBJECT_RESTRICTION()
    398. -
    399.     {
    400. -
    401.         return  new ResResource(OWL_NS 'ObjectRestriction');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function ONE_OF()
    410. -
    411.     {
    412. -
    413.         return  new ResResource(OWL_NS 'oneOf');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ON_PROPERTY()
    422. -
    423.     {
    424. -
    425.         return  new ResResource(OWL_NS 'onProperty');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function ONTOLOGY()
    434. -
    435.     {
    436. -
    437.         return  new ResResource(OWL_NS 'Ontology');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function PRIOR_VERSION()
    446. -
    447.     {
    448. -
    449.         return  new ResResource(OWL_NS 'priorVersion');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function PROPERTY()
    458. -
    459.     {
    460. -
    461.         return  new ResResource(OWL_NS 'Property');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function RESTRICTION()
    470. -
    471.     {
    472. -
    473.         return  new ResResource(OWL_NS 'Restriction');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function SAME_AS()
    482. -
    483.     {
    484. -
    485.         return  new ResResource(OWL_NS 'sameAs');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function SAME_CLASS_AS()
    494. -
    495.     {
    496. -
    497.         return  new ResResource(OWL_NS 'sameClassAs');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function SAME_INDIVIDUAL_AS()
    506. -
    507.     {
    508. -
    509.         return  new ResResource(OWL_NS 'sameIndividualAs');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function SAME_PROPERTY_AS()
    518. -
    519.     {
    520. -
    521.         return  new ResResource(OWL_NS 'samePropertyAs');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function SOME_VALUES_FROM()
    530. -
    531.     {
    532. -
    533.         return  new ResResource(OWL_NS 'someValuesFrom');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function SYMMETRIC_PROPERTY()
    542. -
    543.     {
    544. -
    545.         return  new ResResource(OWL_NS 'SymmetricProperty');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function THING()
    554. -
    555.     {
    556. -
    557.         return  new ResResource(OWL_NS 'Thing');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TRANSITIVE_PROPERTY()
    566. -
    567.     {
    568. -
    569.         return  new ResResource(OWL_NS 'TransitiveProperty');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function UNION_OF()
    578. -
    579.     {
    580. -
    581.         return  new ResResource(OWL_NS 'unionOf');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function VERSION_INFO()
    590. -
    591.     {
    592. -
    593.         return  new ResResource(OWL_NS 'versionInfo');
    594. -
    595.     }
    596. -
    597. }
    598. -
    599.  
    600. -
    601.  
    602. -
    603.  
    604. -
    605. ?>
    606. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:23 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF.php.html deleted file mode 100755 index 31458694..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF.php.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - File Source for RDF.php - - - - - -

    Source for file RDF.php

    -

    Documentation is available at RDF.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDF.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33.  
    34. -
    35. // RDF concepts (constants are defined in constants.php)
    36. -
    37. $RDF_Alt new Resource(RDF_NAMESPACE_URI RDF_ALT);
    38. -
    39. $RDF_Bag new Resource(RDF_NAMESPACE_URI RDF_BAG);
    40. -
    41. $RDF_Property new Resource(RDF_NAMESPACE_URI RDF_PROPERTY);
    42. -
    43. $RDF_Seq new Resource(RDF_NAMESPACE_URI RDF_SEQ);
    44. -
    45. $RDF_Statement new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    46. -
    47. $RDF_List new Resource(RDF_NAMESPACE_URI RDF_LIST);
    48. -
    49. $RDF_nil new Resource(RDF_NAMESPACE_URI RDF_NIL);
    50. -
    51. $RDF_type new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    52. -
    53. $RDF_rest new Resource(RDF_NAMESPACE_URI RDF_REST);
    54. -
    55. $RDF_first new Resource(RDF_NAMESPACE_URI RDF_FIRST);
    56. -
    57. $RDF_subject new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    58. -
    59. $RDF_predicate new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    60. -
    61. $RDF_object new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    62. -
    63. $RDF_Description new Resource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    64. -
    65. $RDF_ID new Resource(RDF_NAMESPACE_URI RDF_ID);
    66. -
    67. $RDF_about new Resource(RDF_NAMESPACE_URI RDF_ABOUT);
    68. -
    69. $RDF_aboutEach new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    70. -
    71. $RDF_aboutEachPrefix new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    72. -
    73. $RDF_bagID new Resource(RDF_NAMESPACE_URI RDF_BAG_ID);
    74. -
    75. $RDF_resource new Resource(RDF_NAMESPACE_URI RDF_RESOURCE);
    76. -
    77. $RDF_parseType new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    78. -
    79. -
    80. -
    81. $RDF_li new Resource(RDF_NAMESPACE_URI RDF_LI);
    82. -
    83. $RDF_nodeID new Resource(RDF_NAMESPACE_URI RDF_NODEID);
    84. -
    85. $RDF_datatype new Resource(RDF_NAMESPACE_URI RDF_DATATYPE);
    86. -
    87. $RDF_seeAlso new Resource(RDF_NAMESPACE_URI RDF_SEEALSO);
    88. -
    89.  
    90. -
    91.  
    92. -
    93.  
    94. -
    95. ?>
    96. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:30 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS.php.html deleted file mode 100755 index 5a65f854..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS.php.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - File Source for RDFS.php - - - - - -

    Source for file RDFS.php

    -

    Documentation is available at RDFS.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDFS.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. // RDFS concepts
    32. -
    33. $RDFS_Resource new Resource(RDF_SCHEMA_URI 'Resource');
    34. -
    35. $RDFS_Literal new Resource(RDF_SCHEMA_URI 'Literal');
    36. -
    37. $RDFS_Class new Resource(RDF_SCHEMA_URI 'Class');
    38. -
    39. $RDFS_Datatype new Resource(RDF_SCHEMA_URI 'Datatype');
    40. -
    41. $RDFS_Container new Resource(RDF_SCHEMA_URI 'Container');
    42. -
    43. $RDFS_ContainerMembershipProperty new Resource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    44. -
    45. $RDFS_subClassOf new Resource(RDF_SCHEMA_URI 'subClassOf');
    46. -
    47. $RDFS_subPropertyOf new Resource(RDF_SCHEMA_URI 'subPropertyOf');
    48. -
    49. $RDFS_domain new Resource(RDF_SCHEMA_URI 'domain');
    50. -
    51. $RDFS_range new Resource(RDF_SCHEMA_URI 'range');
    52. -
    53. $RDFS_label new Resource(RDF_SCHEMA_URI 'label');
    54. -
    55. $RDFS_comment new Resource(RDF_SCHEMA_URI 'comment');
    56. -
    57. $RDFS_member new Resource(RDF_SCHEMA_URI 'member');
    58. -
    59. $RDFS_seeAlso new Resource(RDF_SCHEMA_URI 'seeAlso');
    60. -
    61. $RDFS_isDefinedBy new Resource(RDF_SCHEMA_URI 'isDefinedBy');
    62. -
    63.  
    64. -
    65.  
    66. -
    67. ?>
    68. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_C.php.html deleted file mode 100755 index 32621045..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_C.php.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - File Source for RDFS_C.php - - - - - -

    Source for file RDFS_C.php

    -

    Documentation is available at RDFS_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDFS_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDFS{
    32. -
    33.  
    34. -
    35.     function RESOURCE()
    36. -
    37.     {
    38. -
    39.         return  new Resource(RDF_SCHEMA_URI 'Resource');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function LITERAL()
    48. -
    49.     {
    50. -
    51.         return  new Resource(RDF_SCHEMA_URI 'Literal');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function RDFS_CLASS()
    60. -
    61.     {
    62. -
    63.         return  new Resource(RDF_SCHEMA_URI 'Class');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function DATATYPE()
    72. -
    73.     {
    74. -
    75.         return  new Resource(RDF_SCHEMA_URI 'Datatype');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function CONTAINER()
    84. -
    85.     {
    86. -
    87.         return  new Resource(RDF_SCHEMA_URI 'Container');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function CONTAINER_MEMBERSHIP_PROPERTY()
    96. -
    97.     {
    98. -
    99.         return  new Resource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function SUB_CLASS_OF()
    108. -
    109.     {
    110. -
    111.         return  new Resource(RDF_SCHEMA_URI 'subClassOf');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function SUB_PROPERTY_OF()
    120. -
    121.     {
    122. -
    123.         return  new Resource(RDF_SCHEMA_URI 'subPropertyOf');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DOMAIN()
    132. -
    133.     {
    134. -
    135.         return  new Resource(RDF_SCHEMA_URI 'domain');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function RANGE()
    144. -
    145.     {
    146. -
    147.         return  new Resource(RDF_SCHEMA_URI 'range');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function LABEL()
    156. -
    157.     {
    158. -
    159.         return  new Resource(RDF_SCHEMA_URI 'label');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function COMMENT()
    168. -
    169.     {
    170. -
    171.         return  new Resource(RDF_SCHEMA_URI 'comment');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function MEMBER()
    180. -
    181.     {
    182. -
    183.         return  new Resource(RDF_SCHEMA_URI 'member');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function SEEALSO()
    192. -
    193.     {
    194. -
    195.         return  new Resource(RDF_SCHEMA_URI 'seeAlso');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function IS_DEFINED_BY()
    204. -
    205.     {
    206. -
    207.         return  new Resource(RDF_SCHEMA_URI 'isDefinedBy');
    208. -
    209.     }
    210. -
    211.  
    212. -
    213. }
    214. -
    215. ?>
    216. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_RES.php.html deleted file mode 100755 index 74d06d8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDFS_RES.php.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - File Source for RDFS_RES.php - - - - - -

    Source for file RDFS_RES.php

    -

    Documentation is available at RDFS_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDFS_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    RDF Schema (RDFS).
    20. -
    21. *    For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDFS_RES{
    32. -
    33.  
    34. -
    35.     function RESOURCE()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(RDF_SCHEMA_URI 'Resource');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function LITERAL()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(RDF_SCHEMA_URI 'Literal');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function RDFS_CLASS()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(RDF_SCHEMA_URI 'Class');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function DATATYPE()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(RDF_SCHEMA_URI 'Datatype');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function CONTAINER()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(RDF_SCHEMA_URI 'Container');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function CONTAINER_MEMBERSHIP_PROPERTY()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(RDF_SCHEMA_URI 'ContainerMembershipProperty');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function SUB_CLASS_OF()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(RDF_SCHEMA_URI 'subClassOf');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function SUB_PROPERTY_OF()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(RDF_SCHEMA_URI 'subPropertyOf');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DOMAIN()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(RDF_SCHEMA_URI 'domain');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function RANGE()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(RDF_SCHEMA_URI 'range');
    148. -
    149.  
    150. -
    151.     }
    152. -
    153.  
    154. -
    155.     function LABEL()
    156. -
    157.     {
    158. -
    159.         return  new ResResource(RDF_SCHEMA_URI 'label');
    160. -
    161.  
    162. -
    163.     }
    164. -
    165.  
    166. -
    167.     function COMMENT()
    168. -
    169.     {
    170. -
    171.         return  new ResResource(RDF_SCHEMA_URI 'comment');
    172. -
    173.  
    174. -
    175.     }
    176. -
    177.  
    178. -
    179.     function MEMBER()
    180. -
    181.     {
    182. -
    183.         return  new ResResource(RDF_SCHEMA_URI 'member');
    184. -
    185.  
    186. -
    187.     }
    188. -
    189.  
    190. -
    191.     function SEEALSO()
    192. -
    193.     {
    194. -
    195.         return  new ResResource(RDF_SCHEMA_URI 'seeAlso');
    196. -
    197.  
    198. -
    199.     }
    200. -
    201.  
    202. -
    203.     function IS_DEFINED_BY()
    204. -
    205.     {
    206. -
    207.         return  new ResResource(RDF_SCHEMA_URI 'isDefinedBy');
    208. -
    209.     }
    210. -
    211. }
    212. -
    213. ?>
    214. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_C.php.html deleted file mode 100755 index 14d31f1a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_C.php.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - File Source for RDF_C.php - - - - - -

    Source for file RDF_C.php

    -

    Documentation is available at RDF_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDF_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDF{
    32. -
    33.  
    34. -
    35.     // RDF concepts (constants are defined in constants.php)
    36. -
    37.     function ALT()
    38. -
    39.     {
    40. -
    41.         return  new Resource(RDF_NAMESPACE_URI RDF_ALT);
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function BAG()
    50. -
    51.     {
    52. -
    53.         return  new Resource(RDF_NAMESPACE_URI RDF_BAG);
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function PROPERTY()
    62. -
    63.     {
    64. -
    65.         return  new Resource(RDF_NAMESPACE_URI RDF_PROPERTY);
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function SEQ()
    74. -
    75.     {
    76. -
    77.         return  new Resource(RDF_NAMESPACE_URI RDF_SEQ);
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function STATEMENT()
    86. -
    87.     {
    88. -
    89.         return  new Resource(RDF_NAMESPACE_URI RDF_STATEMENT);
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function RDF_LIST()
    98. -
    99.     {
    100. -
    101.         return  new Resource(RDF_NAMESPACE_URI RDF_LIST);
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function NIL()
    110. -
    111.     {
    112. -
    113.         return  new Resource(RDF_NAMESPACE_URI RDF_NIL);
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TYPE()
    122. -
    123.     {
    124. -
    125.         return  new Resource(RDF_NAMESPACE_URI RDF_TYPE);
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function REST()
    134. -
    135.     {
    136. -
    137.         return  new Resource(RDF_NAMESPACE_URI RDF_REST);
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function FIRST()
    146. -
    147.     {
    148. -
    149.         return  new Resource(RDF_NAMESPACE_URI RDF_FIRST);
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SUBJECT()
    158. -
    159.     {
    160. -
    161.         return  new Resource(RDF_NAMESPACE_URI RDF_SUBJECT);
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PREDICATE()
    170. -
    171.     {
    172. -
    173.         return  new Resource(RDF_NAMESPACE_URI RDF_PREDICATE);
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function OBJECT()
    182. -
    183.     {
    184. -
    185.         return  new Resource(RDF_NAMESPACE_URI RDF_OBJECT);
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DESCRIPTION()
    194. -
    195.     {
    196. -
    197.         return  new Resource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ID()
    206. -
    207.     {
    208. -
    209.         return  new Resource(RDF_NAMESPACE_URI RDF_ID);
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function ABOUT()
    218. -
    219.     {
    220. -
    221.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT);
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function ABOUT_EACH()
    230. -
    231.     {
    232. -
    233.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function ABOUT_EACH_PREFIX()
    242. -
    243.     {
    244. -
    245.         return  new Resource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function BAG_ID()
    254. -
    255.     {
    256. -
    257.         return  new Resource(RDF_NAMESPACE_URI RDF_BAG_ID);
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function RESOURCE()
    266. -
    267.     {
    268. -
    269.         return  new Resource(RDF_NAMESPACE_URI RDF_RESOURCE);
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function PARSE_TYPE()
    278. -
    279.     {
    280. -
    281.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function LITERAL()
    290. -
    291.     {
    292. -
    293.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_LITERAL);
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function PARSE_TYPE_RESOURCE()
    302. -
    303.     {
    304. -
    305.         return  new Resource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_RESOURCE);
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function LI()
    314. -
    315.     {
    316. -
    317.         return  new Resource(RDF_NAMESPACE_URI RDF_LI);
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function NODE_ID()
    326. -
    327.     {
    328. -
    329.         return  new Resource(RDF_NAMESPACE_URI RDF_NODEID);
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function DATATYPE()
    338. -
    339.     {
    340. -
    341.         return  new Resource(RDF_NAMESPACE_URI RDF_DATATYPE);
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function SEE_ALSO()
    350. -
    351.     {
    352. -
    353.         return  new Resource(RDF_NAMESPACE_URI RDF_SEEALSO);
    354. -
    355.     }
    356. -
    357. }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. ?>
    364. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:50:58 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_RES.php.html deleted file mode 100755 index 2a8bef9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRDF_RES.php.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - File Source for RDF_RES.php - - - - - -

    Source for file RDF_RES.php

    -

    Documentation is available at RDF_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Resource Description Framework (RDF) Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRDF_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    Resource Description Framework (RDF).
    20. -
    21. *    For details about RDF see: http://www.w3.org/RDF/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RDF_RES{
    32. -
    33.  
    34. -
    35.     // RDF concepts (constants are defined in constants.php)
    36. -
    37.     function ALT()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(RDF_NAMESPACE_URI RDF_ALT);
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function BAG()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(RDF_NAMESPACE_URI RDF_BAG);
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function PROPERTY()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(RDF_NAMESPACE_URI RDF_PROPERTY);
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function SEQ()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(RDF_NAMESPACE_URI RDF_SEQ);
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function STATEMENT()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(RDF_NAMESPACE_URI RDF_STATEMENT);
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function RDF_LIST()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(RDF_NAMESPACE_URI RDF_LIST);
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function NIL()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(RDF_NAMESPACE_URI RDF_NIL);
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TYPE()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(RDF_NAMESPACE_URI RDF_TYPE);
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function REST()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(RDF_NAMESPACE_URI RDF_REST);
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function FIRST()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(RDF_NAMESPACE_URI RDF_FIRST);
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SUBJECT()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(RDF_NAMESPACE_URI RDF_SUBJECT);
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function PREDICATE()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(RDF_NAMESPACE_URI RDF_PREDICATE);
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function OBJECT()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(RDF_NAMESPACE_URI RDF_OBJECT);
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function DESCRIPTION()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(RDF_NAMESPACE_URI RDF_DESCRIPTION);
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ID()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(RDF_NAMESPACE_URI RDF_ID);
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function ABOUT()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT);
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function ABOUT_EACH()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT_EACH);
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function ABOUT_EACH_PREFIX()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(RDF_NAMESPACE_URI RDF_ABOUT_EACH_PREFIX);
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function BAG_ID()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(RDF_NAMESPACE_URI RDF_BAG_ID);
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function RESOURCE()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(RDF_NAMESPACE_URI RDF_RESOURCE);
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function PARSE_TYPE()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE);
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function LITERAL()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_LITERAL);
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function PARSE_TYPE_RESOURCE()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(RDF_NAMESPACE_URI RDF_PARSE_TYPE_RESOURCE);
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function LI()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(RDF_NAMESPACE_URI RDF_LI);
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function NODE_ID()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(RDF_NAMESPACE_URI RDF_NODEID);
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function DATATYPE()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(RDF_NAMESPACE_URI RDF_DATATYPE);
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function SEE_ALSO()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(RDF_NAMESPACE_URI RDF_SEEALSO);
    354. -
    355.     }
    356. -
    357. }
    358. -
    359.  
    360. -
    361.  
    362. -
    363. ?>
    364. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:00 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS.php.html deleted file mode 100755 index 8bd6163c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS.php.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - File Source for RSS.php - - - - - -

    Source for file RSS.php

    -

    Documentation is available at RSS.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRSS.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. // RSS concepts
    32. -
    33. $RSS_channel new Resource(RSS_NS 'channel');
    34. -
    35. $RSS_image new Resource(RSS_NS 'image');
    36. -
    37. $RSS_item new Resource(RSS_NS 'item');
    38. -
    39. $RSS_textinput new Resource(RSS_NS 'textinput');
    40. -
    41.  
    42. -
    43. $RSS_items new Resource(RSS_NS 'items');
    44. -
    45. $RSS_title new Resource(RSS_NS 'title');
    46. -
    47. $RSS_link new Resource(RSS_NS 'link');
    48. -
    49. $RSS_url new Resource(RSS_NS 'url');
    50. -
    51. $RSS_description new Resource(RSS_NS 'description');
    52. -
    53. $RSS_name new Resource(RSS_NS 'name');
    54. -
    55.  
    56. -
    57.  
    58. -
    59.  
    60. -
    61.  
    62. -
    63.  
    64. -
    65.  
    66. -
    67. ?>
    68. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_C.php.html deleted file mode 100755 index 16c2eb96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_C.php.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - File Source for RSS_C.php - - - - - -

    Source for file RSS_C.php

    -

    Documentation is available at RSS_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRSS_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RSS{
    32. -
    33.  
    34. -
    35.     function CHANNEL()
    36. -
    37.     {
    38. -
    39.         return  new Resource(RSS_NS 'channel');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function IMAGE()
    48. -
    49.     {
    50. -
    51.         return  new Resource(RSS_NS 'image');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function ITEM()
    60. -
    61.     {
    62. -
    63.         return  new Resource(RSS_NS 'item');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function TEXTINPUT()
    72. -
    73.     {
    74. -
    75.         return  new Resource(RSS_NS 'textinput');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ITEMS()
    84. -
    85.     {
    86. -
    87.         return  new Resource(RSS_NS 'items');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function TITLE()
    96. -
    97.     {
    98. -
    99.         return  new Resource(RSS_NS 'title');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function LINK()
    108. -
    109.     {
    110. -
    111.         return  new Resource(RSS_NS 'link');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function URL()
    120. -
    121.     {
    122. -
    123.         return  new Resource(RSS_NS 'url');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DESCRIPTION()
    132. -
    133.     {
    134. -
    135.         return  new Resource(RSS_NS 'description');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function NAME()
    144. -
    145.     {
    146. -
    147.         return  new Resource(RSS_NS 'name');
    148. -
    149.     }
    150. -
    151. }
    152. -
    153.  
    154. -
    155.  
    156. -
    157.  
    158. -
    159. ?>
    160. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:44 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_RES.php.html deleted file mode 100755 index 9c1b8b58..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyRSS_RES.php.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - File Source for RSS_RES.php - - - - - -

    Source for file RSS_RES.php

    -

    Documentation is available at RSS_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   RSS Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyRSS_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß (tobias.gauss@web.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of
    18. -
    19. *    RSS.
    20. -
    21. *    For details about RSS see: http://purl.org/rss/1.0/.
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class RSS_RES{
    32. -
    33.  
    34. -
    35.     function CHANNEL()
    36. -
    37.     {
    38. -
    39.         return  new ResResource(RSS_NS 'channel');
    40. -
    41.  
    42. -
    43.     }
    44. -
    45.  
    46. -
    47.     function IMAGE()
    48. -
    49.     {
    50. -
    51.         return  new ResResource(RSS_NS 'image');
    52. -
    53.  
    54. -
    55.     }
    56. -
    57.  
    58. -
    59.     function ITEM()
    60. -
    61.     {
    62. -
    63.         return  new ResResource(RSS_NS 'item');
    64. -
    65.  
    66. -
    67.     }
    68. -
    69.  
    70. -
    71.     function TEXTINPUT()
    72. -
    73.     {
    74. -
    75.         return  new ResResource(RSS_NS 'textinput');
    76. -
    77.  
    78. -
    79.     }
    80. -
    81.  
    82. -
    83.     function ITEMS()
    84. -
    85.     {
    86. -
    87.         return  new ResResource(RSS_NS 'items');
    88. -
    89.  
    90. -
    91.     }
    92. -
    93.  
    94. -
    95.     function TITLE()
    96. -
    97.     {
    98. -
    99.         return  new ResResource(RSS_NS 'title');
    100. -
    101.  
    102. -
    103.     }
    104. -
    105.  
    106. -
    107.     function LINK()
    108. -
    109.     {
    110. -
    111.         return  new ResResource(RSS_NS 'link');
    112. -
    113.  
    114. -
    115.     }
    116. -
    117.  
    118. -
    119.     function URL()
    120. -
    121.     {
    122. -
    123.         return  new ResResource(RSS_NS 'url');
    124. -
    125.  
    126. -
    127.     }
    128. -
    129.  
    130. -
    131.     function DESCRIPTION()
    132. -
    133.     {
    134. -
    135.         return  new ResResource(RSS_NS 'description');
    136. -
    137.  
    138. -
    139.     }
    140. -
    141.  
    142. -
    143.     function NAME()
    144. -
    145.     {
    146. -
    147.         return  new ResResource(RSS_NS 'name');
    148. -
    149.     }
    150. -
    151. }
    152. -
    153.  
    154. -
    155.  
    156. -
    157. ?>
    158. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:51:52 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD.php.html deleted file mode 100755 index 7a7bfa7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD.php.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - File Source for VCARD.php - - - - - -

    Source for file VCARD.php

    -

    Documentation is available at VCARD.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVCARD.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31.  
    32. -
    33. // VCARD concepts
    34. -
    35. $VCARD_UID new Resource(VCARD_NS.'UID');
    36. -
    37. $VCARD_ORGPROPERTIES new Resource(VCARD_NS 'ORGPROPERTIES');
    38. -
    39. $VCARD_ADRTYPES new Resource(VCARD_NS 'ADRTYPES');
    40. -
    41. $VCARD_NPROPERTIES new Resource(VCARD_NS 'NPROPERTIES');
    42. -
    43. $VCARD_EMAILTYPES new Resource(VCARD_NS 'EMAILTYPES');
    44. -
    45. $VCARD_TELTYPES new Resource(VCARD_NS 'TELTYPES');
    46. -
    47. $VCARD_ADRPROPERTIES new Resource(VCARD_NS 'ADRPROPERTIES');
    48. -
    49. $VCARD_TZTYPES new Resource(VCARD_NS 'TZTYPES');
    50. -
    51. $VCARD_Street new Resource(VCARD_NS 'Street');
    52. -
    53. $VCARD_AGENT new Resource(VCARD_NS 'AGENT');
    54. -
    55. $VCARD_SOURCE new Resource(VCARD_NS 'SOURCE');
    56. -
    57. $VCARD_BDAY new Resource(VCARD_NS 'BDAY');
    58. -
    59. $VCARD_REV new Resource(VCARD_NS 'REV');
    60. -
    61. $VCARD_SORT_STRING new Resource(VCARD_NS 'SORT_STRING');
    62. -
    63. $VCARD_Orgname new Resource(VCARD_NS 'Orgname');
    64. -
    65. $VCARD_CATEGORIES new Resource(VCARD_NS 'CATEGORIES');
    66. -
    67. $VCARD_N new Resource(VCARD_NS 'N');
    68. -
    69. $VCARD_Pcode new Resource(VCARD_NS 'Pcode');
    70. -
    71. $VCARD_Prefix new Resource(VCARD_NS 'Prefix');
    72. -
    73. $VCARD_PHOTO new Resource(VCARD_NS 'PHOTO');
    74. -
    75. $VCARD_FN new Resource(VCARD_NS 'FN');
    76. -
    77. $VCARD_Suffix new Resource(VCARD_NS 'Suffix');
    78. -
    79. $VCARD_CLASS new Resource(VCARD_NS 'CLASS');
    80. -
    81. $VCARD_ADR new Resource(VCARD_NS 'ADR');
    82. -
    83. $VCARD_Region new Resource(VCARD_NS 'Region');
    84. -
    85. $VCARD_GEO new Resource(VCARD_NS 'GEO');
    86. -
    87. $VCARD_Extadd new Resource(VCARD_NS 'Extadd');
    88. -
    89. $VCARD_GROUP new Resource(VCARD_NS 'GROUP');
    90. -
    91. $VCARD_EMAIL new Resource(VCARD_NS 'EMAIL');
    92. -
    93. $VCARD_Family new Resource(VCARD_NS 'Family');
    94. -
    95. $VCARD_TZ new Resource(VCARD_NS 'TZ');
    96. -
    97. $VCARD_NAME new Resource(VCARD_NS 'NAME');
    98. -
    99. $VCARD_Orgunit new Resource(VCARD_NS 'Orgunit');
    100. -
    101. $VCARD_Country new Resource(VCARD_NS 'Country');
    102. -
    103. $VCARD_SOUND new Resource(VCARD_NS 'SOUND');
    104. -
    105. $VCARD_TITLE new Resource(VCARD_NS 'TITLE');
    106. -
    107. $VCARD_MAILER new Resource(VCARD_NS 'MAILER');
    108. -
    109. $VCARD_Other new Resource(VCARD_NS 'Other');
    110. -
    111. $VCARD_Locality new Resource(VCARD_NS 'Locality');
    112. -
    113. $VCARD_Pobox new Resource(VCARD_NS 'Pobox');
    114. -
    115. $VCARD_KEY new Resource(VCARD_NS 'KEY');
    116. -
    117. $VCARD_PRODID new Resource(VCARD_NS 'PRODID');
    118. -
    119. $VCARD_Given new Resource(VCARD_NS 'Given');
    120. -
    121. $VCARD_LABEL new Resource(VCARD_NS 'LABEL');
    122. -
    123. $VCARD_TEL new Resource(VCARD_NS 'TEL');
    124. -
    125. $VCARD_NICKNAME new Resource(VCARD_NS 'NICKNAME');
    126. -
    127. $VCARD_ROLE new Resource(VCARD_NS 'ROLE');
    128. -
    129.  
    130. -
    131. ?>
    132. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:37 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_C.php.html deleted file mode 100755 index 26204748..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_C.php.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - File Source for VCARD_C.php - - - - - -

    Source for file VCARD_C.php

    -

    Documentation is available at VCARD_C.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary (Resource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVCARD_C.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class VCARD{
    32. -
    33.  
    34. -
    35.     // VCARD concepts
    36. -
    37.     function UID()
    38. -
    39.     {
    40. -
    41.         return  new Resource(VCARD_NS.'UID');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ORGPROPERTIES()
    50. -
    51.     {
    52. -
    53.         return  new Resource(VCARD_NS 'ORGPROPERTIES');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ADRTYPES()
    62. -
    63.     {
    64. -
    65.         return  new Resource(VCARD_NS 'ADRTYPES');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function NPROPERTIES()
    74. -
    75.     {
    76. -
    77.         return  new Resource(VCARD_NS 'NPROPERTIES');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function EMAILTYPES()
    86. -
    87.     {
    88. -
    89.         return  new Resource(VCARD_NS 'EMAILTYPES');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function TELTYPES()
    98. -
    99.     {
    100. -
    101.         return  new Resource(VCARD_NS 'TELTYPES');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ADRPROPERTIES()
    110. -
    111.     {
    112. -
    113.         return  new Resource(VCARD_NS 'ADRPROPERTIES');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TZTYPES()
    122. -
    123.     {
    124. -
    125.         return  new Resource(VCARD_NS 'TZTYPES');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function STREET()
    134. -
    135.     {
    136. -
    137.         return  new Resource(VCARD_NS 'Street');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function AGENT()
    146. -
    147.     {
    148. -
    149.         return  new Resource(VCARD_NS 'AGENT');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SOURCE()
    158. -
    159.     {
    160. -
    161.         return  new Resource(VCARD_NS 'SOURCE');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function BDAY()
    170. -
    171.     {
    172. -
    173.         return  new Resource(VCARD_NS 'BDAY');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function REV()
    182. -
    183.     {
    184. -
    185.         return  new Resource(VCARD_NS 'REV');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function SORT_STRING()
    194. -
    195.     {
    196. -
    197.         return  new Resource(VCARD_NS 'SORT_STRING');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ORGNAME()
    206. -
    207.     {
    208. -
    209.         return  new Resource(VCARD_NS 'Orgname');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function CATEGORIES()
    218. -
    219.     {
    220. -
    221.         return  new Resource(VCARD_NS 'CATEGORIES');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function N()
    230. -
    231.     {
    232. -
    233.         return  new Resource(VCARD_NS 'N');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function PCODE()
    242. -
    243.     {
    244. -
    245.         return  new Resource(VCARD_NS 'Pcode');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function PREFIX()
    254. -
    255.     {
    256. -
    257.         return  new Resource(VCARD_NS 'Prefix');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function PHOTO()
    266. -
    267.     {
    268. -
    269.         return  new Resource(VCARD_NS 'PHOTO');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FN()
    278. -
    279.     {
    280. -
    281.         return  new Resource(VCARD_NS 'FN');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function SUFFIX()
    290. -
    291.     {
    292. -
    293.         return  new Resource(VCARD_NS 'Suffix');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function VCARD_CLASS()
    302. -
    303.     {
    304. -
    305.         return  new Resource(VCARD_NS 'CLASS');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function ADR()
    314. -
    315.     {
    316. -
    317.         return  new Resource(VCARD_NS 'ADR');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function REGION()
    326. -
    327.     {
    328. -
    329.         return  new Resource(VCARD_NS 'Region');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GEO()
    338. -
    339.     {
    340. -
    341.         return  new Resource(VCARD_NS 'GEO');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function EXTADD()
    350. -
    351.     {
    352. -
    353.         return  new Resource(VCARD_NS 'Extadd');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function GROUP()
    362. -
    363.     {
    364. -
    365.         return  new Resource(VCARD_NS 'GROUP');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function EMAIL()
    374. -
    375.     {
    376. -
    377.         return  new Resource(VCARD_NS 'EMAIL');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function FAMILY()
    386. -
    387.     {
    388. -
    389.         return  new Resource(VCARD_NS 'Family');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function TZ()
    398. -
    399.     {
    400. -
    401.         return  new Resource(VCARD_NS 'TZ');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function NAME()
    410. -
    411.     {
    412. -
    413.         return  new Resource(VCARD_NS 'NAME');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ORGUNIT()
    422. -
    423.     {
    424. -
    425.         return  new Resource(VCARD_NS 'Orgunit');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function COUNTRY()
    434. -
    435.     {
    436. -
    437.         return  new Resource(VCARD_NS 'Country');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function SOUND()
    446. -
    447.     {
    448. -
    449.         return  new Resource(VCARD_NS 'SOUND');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function TITLE()
    458. -
    459.     {
    460. -
    461.         return  new Resource(VCARD_NS 'TITLE');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MAILER()
    470. -
    471.     {
    472. -
    473.         return  new Resource(VCARD_NS 'MAILER');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function OTHER()
    482. -
    483.     {
    484. -
    485.         return  new Resource(VCARD_NS 'Other');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function LOCALITY()
    494. -
    495.     {
    496. -
    497.         return  new Resource(VCARD_NS 'Locality');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function POBOX()
    506. -
    507.     {
    508. -
    509.         return  new Resource(VCARD_NS 'Pobox');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function KEY()
    518. -
    519.     {
    520. -
    521.         return  new Resource(VCARD_NS 'KEY');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function PRODID()
    530. -
    531.     {
    532. -
    533.         return  new Resource(VCARD_NS 'PRODID');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function GIVEN()
    542. -
    543.     {
    544. -
    545.         return  new Resource(VCARD_NS 'Given');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function LABEL()
    554. -
    555.     {
    556. -
    557.         return  new Resource(VCARD_NS 'LABEL');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TEL()
    566. -
    567.     {
    568. -
    569.         return  new Resource(VCARD_NS 'TEL');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function NICKNAME()
    578. -
    579.     {
    580. -
    581.         return  new Resource(VCARD_NS 'NICKNAME');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function ROLE()
    590. -
    591.     {
    592. -
    593.         return  new Resource(VCARD_NS 'ROLE');
    594. -
    595.     }
    596. -
    597. }
    598. -
    599.  
    600. -
    601. ?>
    602. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:39 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_RES.php.html deleted file mode 100755 index 3b2ab315..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVCARD_RES.php.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - File Source for VCARD_RES.php - - - - - -

    Source for file VCARD_RES.php

    -

    Documentation is available at VCARD_RES.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVCARD_RES.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Daniel Westphal (dawe@gmx.de)
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. *    Wrapper, defining resources for all terms of the
    18. -
    19. *    vCard Vocabulary.
    20. -
    21. *    For details about vCard see: http://www.w3.org/TR/vcard-rdf .
    22. -
    23. *    Using the wrapper allows you to define all aspects of
    24. -
    25. *    the vocabulary in one spot, simplifing implementation and
    26. -
    27. *    maintainence.
    28. -
    29. */
    30. -
    31. class VCARD_RES{
    32. -
    33.  
    34. -
    35.     // VCARD concepts
    36. -
    37.     function UID()
    38. -
    39.     {
    40. -
    41.         return  new ResResource(VCARD_NS.'UID');
    42. -
    43.  
    44. -
    45.     }
    46. -
    47.  
    48. -
    49.     function ORGPROPERTIES()
    50. -
    51.     {
    52. -
    53.         return  new ResResource(VCARD_NS 'ORGPROPERTIES');
    54. -
    55.  
    56. -
    57.     }
    58. -
    59.  
    60. -
    61.     function ADRTYPES()
    62. -
    63.     {
    64. -
    65.         return  new ResResource(VCARD_NS 'ADRTYPES');
    66. -
    67.  
    68. -
    69.     }
    70. -
    71.  
    72. -
    73.     function NPROPERTIES()
    74. -
    75.     {
    76. -
    77.         return  new ResResource(VCARD_NS 'NPROPERTIES');
    78. -
    79.  
    80. -
    81.     }
    82. -
    83.  
    84. -
    85.     function EMAILTYPES()
    86. -
    87.     {
    88. -
    89.         return  new ResResource(VCARD_NS 'EMAILTYPES');
    90. -
    91.  
    92. -
    93.     }
    94. -
    95.  
    96. -
    97.     function TELTYPES()
    98. -
    99.     {
    100. -
    101.         return  new ResResource(VCARD_NS 'TELTYPES');
    102. -
    103.  
    104. -
    105.     }
    106. -
    107.  
    108. -
    109.     function ADRPROPERTIES()
    110. -
    111.     {
    112. -
    113.         return  new ResResource(VCARD_NS 'ADRPROPERTIES');
    114. -
    115.  
    116. -
    117.     }
    118. -
    119.  
    120. -
    121.     function TZTYPES()
    122. -
    123.     {
    124. -
    125.         return  new ResResource(VCARD_NS 'TZTYPES');
    126. -
    127.  
    128. -
    129.     }
    130. -
    131.  
    132. -
    133.     function STREET()
    134. -
    135.     {
    136. -
    137.         return  new ResResource(VCARD_NS 'Street');
    138. -
    139.  
    140. -
    141.     }
    142. -
    143.  
    144. -
    145.     function AGENT()
    146. -
    147.     {
    148. -
    149.         return  new ResResource(VCARD_NS 'AGENT');
    150. -
    151.  
    152. -
    153.     }
    154. -
    155.  
    156. -
    157.     function SOURCE()
    158. -
    159.     {
    160. -
    161.         return  new ResResource(VCARD_NS 'SOURCE');
    162. -
    163.  
    164. -
    165.     }
    166. -
    167.  
    168. -
    169.     function BDAY()
    170. -
    171.     {
    172. -
    173.         return  new ResResource(VCARD_NS 'BDAY');
    174. -
    175.  
    176. -
    177.     }
    178. -
    179.  
    180. -
    181.     function REV()
    182. -
    183.     {
    184. -
    185.         return  new ResResource(VCARD_NS 'REV');
    186. -
    187.  
    188. -
    189.     }
    190. -
    191.  
    192. -
    193.     function SORT_STRING()
    194. -
    195.     {
    196. -
    197.         return  new ResResource(VCARD_NS 'SORT_STRING');
    198. -
    199.  
    200. -
    201.     }
    202. -
    203.  
    204. -
    205.     function ORGNAME()
    206. -
    207.     {
    208. -
    209.         return  new ResResource(VCARD_NS 'Orgname');
    210. -
    211.  
    212. -
    213.     }
    214. -
    215.  
    216. -
    217.     function CATEGORIES()
    218. -
    219.     {
    220. -
    221.         return  new ResResource(VCARD_NS 'CATEGORIES');
    222. -
    223.  
    224. -
    225.     }
    226. -
    227.  
    228. -
    229.     function N()
    230. -
    231.     {
    232. -
    233.         return  new ResResource(VCARD_NS 'N');
    234. -
    235.  
    236. -
    237.     }
    238. -
    239.  
    240. -
    241.     function PCODE()
    242. -
    243.     {
    244. -
    245.         return  new ResResource(VCARD_NS 'Pcode');
    246. -
    247.  
    248. -
    249.     }
    250. -
    251.  
    252. -
    253.     function PREFIX()
    254. -
    255.     {
    256. -
    257.         return  new ResResource(VCARD_NS 'Prefix');
    258. -
    259.  
    260. -
    261.     }
    262. -
    263.  
    264. -
    265.     function PHOTO()
    266. -
    267.     {
    268. -
    269.         return  new ResResource(VCARD_NS 'PHOTO');
    270. -
    271.  
    272. -
    273.     }
    274. -
    275.  
    276. -
    277.     function FN()
    278. -
    279.     {
    280. -
    281.         return  new ResResource(VCARD_NS 'FN');
    282. -
    283.  
    284. -
    285.     }
    286. -
    287.  
    288. -
    289.     function SUFFIX()
    290. -
    291.     {
    292. -
    293.         return  new ResResource(VCARD_NS 'Suffix');
    294. -
    295.  
    296. -
    297.     }
    298. -
    299.  
    300. -
    301.     function VCARD_CLASS()
    302. -
    303.     {
    304. -
    305.         return  new ResResource(VCARD_NS 'CLASS');
    306. -
    307.  
    308. -
    309.     }
    310. -
    311.  
    312. -
    313.     function ADR()
    314. -
    315.     {
    316. -
    317.         return  new ResResource(VCARD_NS 'ADR');
    318. -
    319.  
    320. -
    321.     }
    322. -
    323.  
    324. -
    325.     function REGION()
    326. -
    327.     {
    328. -
    329.         return  new ResResource(VCARD_NS 'Region');
    330. -
    331.  
    332. -
    333.     }
    334. -
    335.  
    336. -
    337.     function GEO()
    338. -
    339.     {
    340. -
    341.         return  new ResResource(VCARD_NS 'GEO');
    342. -
    343.  
    344. -
    345.     }
    346. -
    347.  
    348. -
    349.     function EXTADD()
    350. -
    351.     {
    352. -
    353.         return  new ResResource(VCARD_NS 'Extadd');
    354. -
    355.  
    356. -
    357.     }
    358. -
    359.  
    360. -
    361.     function GROUP()
    362. -
    363.     {
    364. -
    365.         return  new ResResource(VCARD_NS 'GROUP');
    366. -
    367.  
    368. -
    369.     }
    370. -
    371.  
    372. -
    373.     function EMAIL()
    374. -
    375.     {
    376. -
    377.         return  new ResResource(VCARD_NS 'EMAIL');
    378. -
    379.  
    380. -
    381.     }
    382. -
    383.  
    384. -
    385.     function FAMILY()
    386. -
    387.     {
    388. -
    389.         return  new ResResource(VCARD_NS 'Family');
    390. -
    391.  
    392. -
    393.     }
    394. -
    395.  
    396. -
    397.     function TZ()
    398. -
    399.     {
    400. -
    401.         return  new ResResource(VCARD_NS 'TZ');
    402. -
    403.  
    404. -
    405.     }
    406. -
    407.  
    408. -
    409.     function NAME()
    410. -
    411.     {
    412. -
    413.         return  new ResResource(VCARD_NS 'NAME');
    414. -
    415.  
    416. -
    417.     }
    418. -
    419.  
    420. -
    421.     function ORGUNIT()
    422. -
    423.     {
    424. -
    425.         return  new ResResource(VCARD_NS 'Orgunit');
    426. -
    427.  
    428. -
    429.     }
    430. -
    431.  
    432. -
    433.     function COUNTRY()
    434. -
    435.     {
    436. -
    437.         return  new ResResource(VCARD_NS 'Country');
    438. -
    439.  
    440. -
    441.     }
    442. -
    443.  
    444. -
    445.     function SOUND()
    446. -
    447.     {
    448. -
    449.         return  new ResResource(VCARD_NS 'SOUND');
    450. -
    451.  
    452. -
    453.     }
    454. -
    455.  
    456. -
    457.     function TITLE()
    458. -
    459.     {
    460. -
    461.         return  new ResResource(VCARD_NS 'TITLE');
    462. -
    463.  
    464. -
    465.     }
    466. -
    467.  
    468. -
    469.     function MAILER()
    470. -
    471.     {
    472. -
    473.         return  new ResResource(VCARD_NS 'MAILER');
    474. -
    475.  
    476. -
    477.     }
    478. -
    479.  
    480. -
    481.     function OTHER()
    482. -
    483.     {
    484. -
    485.         return  new ResResource(VCARD_NS 'Other');
    486. -
    487.  
    488. -
    489.     }
    490. -
    491.  
    492. -
    493.     function LOCALITY()
    494. -
    495.     {
    496. -
    497.         return  new ResResource(VCARD_NS 'Locality');
    498. -
    499.  
    500. -
    501.     }
    502. -
    503.  
    504. -
    505.     function POBOX()
    506. -
    507.     {
    508. -
    509.         return  new ResResource(VCARD_NS 'Pobox');
    510. -
    511.  
    512. -
    513.     }
    514. -
    515.  
    516. -
    517.     function KEY()
    518. -
    519.     {
    520. -
    521.         return  new ResResource(VCARD_NS 'KEY');
    522. -
    523.  
    524. -
    525.     }
    526. -
    527.  
    528. -
    529.     function PRODID()
    530. -
    531.     {
    532. -
    533.         return  new ResResource(VCARD_NS 'PRODID');
    534. -
    535.  
    536. -
    537.     }
    538. -
    539.  
    540. -
    541.     function GIVEN()
    542. -
    543.     {
    544. -
    545.         return  new ResResource(VCARD_NS 'Given');
    546. -
    547.  
    548. -
    549.     }
    550. -
    551.  
    552. -
    553.     function LABEL()
    554. -
    555.     {
    556. -
    557.         return  new ResResource(VCARD_NS 'LABEL');
    558. -
    559.  
    560. -
    561.     }
    562. -
    563.  
    564. -
    565.     function TEL()
    566. -
    567.     {
    568. -
    569.         return  new ResResource(VCARD_NS 'TEL');
    570. -
    571.  
    572. -
    573.     }
    574. -
    575.  
    576. -
    577.     function NICKNAME()
    578. -
    579.     {
    580. -
    581.         return  new ResResource(VCARD_NS 'NICKNAME');
    582. -
    583.  
    584. -
    585.     }
    586. -
    587.  
    588. -
    589.     function ROLE()
    590. -
    591.     {
    592. -
    593.         return  new ResResource(VCARD_NS 'ROLE');
    594. -
    595.     }
    596. -
    597.  
    598. -
    599. }
    600. -
    601.  
    602. -
    603. ?>
    604. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:41 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabulary.php.html deleted file mode 100755 index 7cbf9078..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabulary.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - File Source for Vocabulary.php - - - - - -

    Source for file Vocabulary.php

    -

    Documentation is available at Vocabulary.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVocabulary.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF.php';
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS.php';
    36. -
    37. ?>
    38. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:42 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyClass.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyClass.php.html deleted file mode 100755 index 8c3190fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyClass.php.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - File Source for VocabularyClass.php - - - - - -

    Source for file VocabularyClass.php

    -

    Documentation is available at VocabularyClass.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVocabularyClass.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. require_once RDFAPI_INCLUDE_DIR 'vocabulary/ATOM_C.php';
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF_C.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS_C.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL_C.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC_C.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD_C.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF_C.php';
    36. -
    37. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS_C.php';
    38. -
    39. ?>
    40. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyRes.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyRes.php.html deleted file mode 100755 index 7af087a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/__filesource/fsource_vocabulary__vocabularyVocabularyRes.php.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - File Source for VocabularyRes.php - - - - - -

    Source for file VocabularyRes.php

    -

    Documentation is available at VocabularyRes.php

    -
    -
    1. <?php
    2. -
    3. /**
    4. -
    5. *   Vocabulary
    6. -
    7. *
    8. -
    9. *   @version $Id: fsource_vocabulary__vocabularyVocabularyRes.php.html 443 2007-06-01 16:25:38Z cax $
    10. -
    11. *   @author Tobias Gauß <tobias.gauss@web.de>
    12. -
    13. *   @package vocabulary
    14. -
    15. *
    16. -
    17. */
    18. -
    19.  
    20. -
    21. // Include vocabularies
    22. -
    23. include_once RDFAPI_INCLUDE_DIR PACKAGE_RESMODEL);
    24. -
    25. require_once RDFAPI_INCLUDE_DIR 'vocabulary/ATOM_RES.php';
    26. -
    27. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDF_RES.php';
    28. -
    29. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RDFS_RES.php';
    30. -
    31. require_once RDFAPI_INCLUDE_DIR 'vocabulary/OWL_RES.php';
    32. -
    33. require_once RDFAPI_INCLUDE_DIR 'vocabulary/DC_RES.php';
    34. -
    35. require_once RDFAPI_INCLUDE_DIR 'vocabulary/VCARD_RES.php';
    36. -
    37. require_once RDFAPI_INCLUDE_DIR 'vocabulary/FOAF_RES.php';
    38. -
    39. require_once RDFAPI_INCLUDE_DIR 'vocabulary/RSS_RES.php';
    40. -
    41. ?>
    42. -
    -
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/blank.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/blank.html deleted file mode 100755 index ec4daad9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/blank.html +++ /dev/null @@ -1,32 +0,0 @@ - - - RAP - Rdf API for PHP - - - - -

    RAP - Rdf API for PHP

    -

    RAP is a software package for parsing, searching, manipulating, serializing and serving RDF models.
    -

    -

    Its features include:

    - -

    Tutorials can be found here.

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_dataset.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_dataset.html deleted file mode 100755 index 3a44b776..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_dataset.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class Dataset

    - - -

    Root class IteratorAllGraphsDb

    - - -

    Root class IteratorAllGraphsMem

    - - -

    Root class IteratorFindQuadsDb

    - - -

    Root class IteratorFindQuadsMem

    - - -

    Root class NamedGraphDb

    - - -

    Root class NamedGraphMem

    - - -

    Root class Quad

    - - -

    Root class TriXParser

    - - -

    Root class TriXSerializer

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_default.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_default.html deleted file mode 100755 index 537b17da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_default.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - -

    - -

    -

    Root class MagpieRSS

    - - -

    Root class RSSCache

    - - -

    Root class Snoopy

    - - -

    - Documentation generated on Tue, 01 May 2007 16:43:11 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_infModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_infModel.html deleted file mode 100755 index 2811b1e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_infModel.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class InfModel

    - - -

    Root class InfRule

    - - -

    Root class InfStatement

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_model.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_model.html deleted file mode 100755 index 638a061e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_model.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class DbStore

    - - -

    Root class Model

    - - - -

    Root class ModelFactory

    - - -

    Root class Node

    - - - -

    Root class Statement

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_ontModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_ontModel.html deleted file mode 100755 index dc08b9da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_ontModel.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class OntModel

    - - -

    Root class OntResource

    - - -

    Root class OntVocabulary

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_rdql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_rdql.html deleted file mode 100755 index ba39dd77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_rdql.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class RdqlEngine

    - - -

    Root class RdqlParser

    - - -

    Root class RdqlResultIterator

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_resModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_resModel.html deleted file mode 100755 index da0ef734..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_resModel.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class ResIterator

    - - -

    Root class ResLiteral

    - - -

    Root class ResModel

    - - -

    Root class ResResource

    - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql-db.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql-db.html deleted file mode 100755 index 5aa1097d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql-db.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - -

    - -

    -

    Root class SparqlEngineDb_FilterGenerator

    - - -

    Root class SparqlEngineDb_FilterGenerator_Value

    - - -

    Root class SparqlEngineDb_Offsetter

    - - -

    Root class SparqlEngineDb_Preparator

    - - -

    Root class SparqlEngineDb_PreparedStatement

    - - -

    Root class SparqlEngineDb_ResultConverter

    - - -

    Root class SparqlEngineDb_ResultRenderer_Default

    - - -

    Root class SparqlEngineDb_ResultRenderer_HTML

    - - -

    Root class SparqlEngineDb_ResultRenderer_XML

    - - -

    Root class SparqlEngineDb_SqlGenerator

    - - -

    Root class SparqlEngineDb_SqlMerger

    - - -

    Root class SparqlEngineDb_TypeSorter

    - - -

    - Documentation generated on Tue, 01 May 2007 16:18:06 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql.html deleted file mode 100755 index e444cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_sparql.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root interface SparqlEngineDb_ResultRenderer

    - - -

    Root interface SparqlEngine_ResultRenderer

    - - -

    Root class ClientQuery

    - - -

    Root class Constraint

    - - -

    Root class GraphPattern

    - - -

    Root class Query

    - - -

    Root class QueryTriple

    - - -

    Root class SparqlClient

    - - -

    Root class SparqlEngine

    - - -

    Root class SparqlEngineDb

    - - -

    Root class SparqlEngineDb_FilterGenerator

    - - -

    Root class SparqlEngineDb_FilterGenerator_Value

    - - -

    Root class SparqlEngineDb_Offsetter

    - - -

    Root class SparqlEngineDb_Preparator

    - - -

    Root class SparqlEngineDb_ResultConverter

    - - -

    Root class SparqlEngineDb_ResultRenderer_Default

    - - -

    Root class SparqlEngineDb_ResultRenderer_HTML

    - - -

    Root class SparqlEngineDb_ResultRenderer_XML

    - - -

    Root class SparqlEngineDb_SqlGenerator

    - - -

    Root class SparqlEngineDb_SqlMerger

    - - -

    Root class SparqlEngineDb_TypeSorter

    - - -

    Root class SparqlEngine_PreparedStatement

    - - -

    Root class SparqlEngine_ResultConverter

    - - -

    Root class SparqlEngine_ResultRenderer_Default

    - - -

    Root class SparqlEngine_ResultRenderer_HTML

    - - -

    Root class SparqlEngine_ResultRenderer_XML

    - - -

    Root class SparqlParser

    - - -

    Root class SparqlResultParser

    - - -

    Root class Exception

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_syntax.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_syntax.html deleted file mode 100755 index 1c08cff0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_syntax.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class GRDDLParser

    - - -

    Root class N3Parser

    - - -

    Root class N3Serializer

    - - -

    Root class NTripleSerializer

    - - -

    Root class RdfParser

    - - -

    Root class RdfSerializer

    - - -

    Root class RssParser

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_utility.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_utility.html deleted file mode 100755 index b0ed6ddb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_utility.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class IterFind

    - - -

    Root class Object

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_vocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_vocabulary.html deleted file mode 100755 index 2eb52d6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/classtrees_vocabulary.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - -

    - -

    -

    Root class ATOM

    - - -

    Root class ATOM_RES

    - - -

    Root class DC

    - - -

    Root class DC_RES

    - - -

    Root class FOAF

    - - -

    Root class FOAF_RES

    - - -

    Root class OWL

    - - -

    Root class OWL_RES

    - - -

    Root class RDF

    - - -

    Root class RDFS

    - - -

    Root class RDFS_RES

    - - -

    Root class RDF_RES

    - - -

    Root class RSS

    - - -

    Root class RSS_RES

    - - -

    Root class VCARD

    - - -

    Root class VCARD_RES

    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/all-wcprops deleted file mode 100755 index a76fa200..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/all-wcprops +++ /dev/null @@ -1,149 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset -END -NamedGraphDb.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/NamedGraphDb.html -END -_dataset---NamedGraphDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---NamedGraphDb.php.html -END -TriXSerializer.html -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/TriXSerializer.html -END -_syntax---TriXSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_syntax---TriXSerializer.php.html -END -DatasetMem.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/DatasetMem.html -END -Dataset.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/Dataset.html -END -IteratorAllGraphsMem.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/IteratorAllGraphsMem.html -END -_dataset---DatasetMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---DatasetMem.php.html -END -IteratorFindQuadsMem.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/IteratorFindQuadsMem.html -END -_dataset---Dataset.php.html -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---Dataset.php.html -END -_dataset---IteratorAllGraphsMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---IteratorAllGraphsMem.php.html -END -_dataset---IteratorFindQuadsMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---IteratorFindQuadsMem.php.html -END -Quad.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/Quad.html -END -DatasetDb.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/DatasetDb.html -END -_dataset---Quad.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---Quad.php.html -END -_dataset---DatasetDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/310/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---DatasetDb.php.html -END -IteratorAllGraphsDb.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/IteratorAllGraphsDb.html -END -IteratorFindQuadsDb.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/IteratorFindQuadsDb.html -END -_dataset---IteratorAllGraphsDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---IteratorAllGraphsDb.php.html -END -_dataset---IteratorFindQuadsDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---IteratorFindQuadsDb.php.html -END -TriXParser.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/TriXParser.html -END -NamedGraphMem.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/NamedGraphMem.html -END -_syntax---TriXParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_syntax---TriXParser.php.html -END -_dataset---NamedGraphMem.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/dataset/_dataset---NamedGraphMem.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/entries deleted file mode 100755 index 43b8b194..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/entries +++ /dev/null @@ -1,340 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/dataset -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -NamedGraphDb.html -file - - - - -2008-02-29T14:57:31.479521Z -2109802c4475b276b38ff7d062ec1b07 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---NamedGraphDb.php.html -file - - - - -2008-02-29T14:57:31.495141Z -1c49e104c742be55a58560154649823c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -TriXSerializer.html -file - - - - -2008-02-29T14:57:31.495141Z -bf2a9d3812ed1ab0a266a87549298990 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---TriXSerializer.php.html -file - - - - -2008-02-29T14:57:31.510762Z -90d020a12fa8a144a478f3c620a9c6c9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DatasetMem.html -file - - - - -2008-02-29T14:57:31.510762Z -cd1288d771b236e00f3b4090a387fb94 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Dataset.html -file - - - - -2008-02-29T14:57:31.526383Z -16d64ebef66a798011ee36168501095a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -IteratorAllGraphsMem.html -file - - - - -2008-02-29T14:57:31.542003Z -54d6941fa0dc9044103673da84771306 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---DatasetMem.php.html -file - - - - -2008-02-29T14:57:31.542003Z -8bb15cf2d897d94f443ba04b8f93491a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -IteratorFindQuadsMem.html -file - - - - -2008-02-29T14:57:31.557624Z -88025832eb5a0098ba9f6478ef10571a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---Dataset.php.html -file - - - - -2008-02-29T14:57:31.557624Z -4fb4a5afd54f34096809710ca1345370 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---IteratorAllGraphsMem.php.html -file - - - - -2008-02-29T14:57:31.573244Z -1f1c608642ae4848f41beae46b1b4fa2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---IteratorFindQuadsMem.php.html -file - - - - -2008-02-29T14:57:31.573244Z -c6b07ae2f6061ce2d8613a5c716765a0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Quad.html -file - - - - -2008-02-29T14:57:31.588865Z -9116291cf77235f11b98b297e8190e3a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DatasetDb.html -file - - - - -2008-02-29T14:57:31.588865Z -bd235958f57e3df4002d248743deee4a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---Quad.php.html -file - - - - -2008-02-29T14:57:31.604486Z -389333ab848f4049f5c001599e88458e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---DatasetDb.php.html -file - - - - -2008-02-29T14:57:31.854415Z -cd4ecdf1905838a060a2e8ab4a72a4ff -2006-06-26T12:34:22.000000Z -310 -tgauss -has-props - -IteratorAllGraphsDb.html -file - - - - -2008-02-29T14:57:31.885656Z -8992e9a6d5fbef41da0ce4f378930eea -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -IteratorFindQuadsDb.html -file - - - - -2008-02-29T14:57:31.885656Z -f9ea08f84268474ced4f2aa35b8ba2a1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---IteratorAllGraphsDb.php.html -file - - - - -2008-02-29T14:57:31.901277Z -024ee2a4084b2b888caba7b0fe1e6d15 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---IteratorFindQuadsDb.php.html -file - - - - -2008-02-29T14:57:31.901277Z -873a3a79b2bfc0d52c2160888be37e4f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -TriXParser.html -file - - - - -2008-02-29T14:57:31.916898Z -7bce70f57e0026f11ec1e7e8ef067b6c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -NamedGraphMem.html -file - - - - -2008-02-29T14:57:31.916898Z -2ebef7b8426c4c4dbe47c2842d293a84 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---TriXParser.php.html -file - - - - -2008-02-29T14:57:31.932518Z -3d6dce92c691cf995f1b9190654531d2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_dataset---NamedGraphMem.php.html -file - - - - -2008-02-29T14:57:31.932518Z -4f6bd7c1b559f377038c0d325cbe1060 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Dataset.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Dataset.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetDb.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetDb.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetMem.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/DatasetMem.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsDb.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsDb.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsMem.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorAllGraphsMem.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsDb.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsDb.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsMem.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/IteratorFindQuadsMem.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphDb.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphDb.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphMem.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/NamedGraphMem.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Quad.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Quad.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/Quad.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXSerializer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/TriXSerializer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Dataset.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Dataset.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Dataset.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---DatasetMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorAllGraphsMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---IteratorFindQuadsMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphMem.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---NamedGraphMem.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Quad.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Quad.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_dataset---Quad.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/prop-base/_syntax---TriXSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Dataset.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Dataset.html.svn-base deleted file mode 100755 index 41796d5c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Dataset.html.svn-base +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - Docs For Class Dataset - - - - -
    -

    Class Dataset

    - - -
    -
    Description
    - -
    - -

    Dataset implementation.

    -

    Superclass of datasetMem and datasetDb which contains shared functionality.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/Dataset.php (line 18) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    DatasetDb - Dataset implementation. -
    DatasetMem - In-memory implementation of a RDF dataset. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - loadFromFile - (string $file) -
    - -
    - void - loadFromString - (string $string) -
    - -
    - void - serializeToFile - (string $fileName) -
    - -
    - string - serializeToString - () -
    - -
    - String/array - sparqlQuery - (String $query, [String $resultform = false]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - loadFromFile (line 26) -
    - - -

    Load a Dataset from a File

    -
      -
    • access: public
    • -
    - -
    - void - - loadFromFile - - (string $file) -
    - -
      -
    • - string - $file
    • -
    - - -
    - -
    - -
    - loadFromString (line 38) -
    - - -

    Load a Datset from a string

    -
      -
    • access: public
    • -
    - -
    - void - - loadFromString - - (string $string) -
    - -
      -
    • - string - $string
    • -
    - - -
    - -
    - -
    - serializeToFile (line 50) -
    - - -

    Serialize the Dataset to File

    -
      -
    • access: public
    • -
    - -
    - void - - serializeToFile - - (string $fileName) -
    - -
      -
    • - string - $fileName
    • -
    - - -
    - -
    - -
    - serializeToString (line 62) -
    - - -

    Serialize the Dataset to string

    -
      -
    • access: public
    • -
    - -
    - string - - serializeToString - - () -
    - - - -
    - -
    - -
    - sparqlQuery (line 77) -
    - - -

    Performs a SPARQL query against an RDF Dataset.

    -

    The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.

    - -
    - String/array - - sparqlQuery - - (String $query, [String $resultform = false]) -
    - -
      -
    • - String - $query: the sparql query string
    • -
    • - String - $resultform: the result form ('xml' for SPARQL Query Results XML Format)
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetDb.html.svn-base deleted file mode 100755 index e87a7a40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetDb.html.svn-base +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - Docs For Class DatasetDb - - - - -
    -

    Class DatasetDb

    - - -
    -
    Description
    - -
    - -

    Dataset implementation.

    -

    Superclass of datasetMem and datasetDb which contains shared functionality.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /dataset/DatasetDb.php (line 22) -

    - - -
    Dataset
    -   |
    -   --DatasetDb
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DatasetDb - DatasetDb - (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName) -
    - -
    - void - addAll - (Dataset $otherDataset) -
    - -
    - void - addNamedGraph - (NamedGraphDb &$graph) -
    - -
    - void - addQuad - (Quad &$quad) -
    - -
    - void - clear - () -
    - -
    - boolean - containsNamedGraph - (string $graphName) -
    - -
    - boolean - containsQuad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - int - countGraphs - () -
    - -
    - int - countQuads - () -
    - -
    - NamedGraphDb - &createGraph - (string $graphName, [string $baseURI = null]) -
    - -
    - IteratorFindQuadsDb - &findInDefaultGraph - (Resource $subject, Resource $predicate, Resource $object) -
    - -
    - IteratorFindQuadsDb - &findInNamedGraphs - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
    - string - getDatasetName - () -
    - - - -
    - NamedGraphDb - &getNamedGraph - (string $graphName) -
    - -
    - boolean - hasDefaultGraph - () -
    - -
    - boolean - isEmpty - () -
    - -
    - Array - listGraphNames - () -
    - - - -
    - void - removeNamedGraph - (string $graphName) -
    - -
    - void - removeQuad - (Quad $quad) -
    - -
    - void - setDatasetName - (string $datasetName) -
    - -
    - void - setDefaultGraph - (DbModel &$graph) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DatasetDb (line 60) -
    - - -

    Constructor You can supply a Dataset name.

    -
      -
    • access: public
    • -
    - -
    - DatasetDb - - DatasetDb - - (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName) -
    - -
      -
    • - ADODBConnection - &$dbConnection
    • -
    • - DbStore - &$dbStore
    • -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - addAll (line 283) -
    - - -

    Add all named graphs of the other dataset to this dataset.

    - -
    - void - - addAll - - (Dataset $otherDataset) -
    - - - - -
    - -
    - -
    - addNamedGraph (line 123) -
    - - -

    Adds a NamedGraph to the set.

    - -
    - void - - addNamedGraph - - (NamedGraphDb &$graph) -
    - - - - -
    - -
    - -
    - addQuad (line 305) -
    - - -

    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.

    - -
    - void - - addQuad - - (Quad &$quad) -
    - -
      -
    • - Quad - &$quad
    • -
    - - -
    - -
    - -
    - clear (line 241) -
    - - -

    Deletes all NamedGraphs from the set.

    - -
    - void - - clear - - () -
    - - - -
    - -
    - -
    - containsNamedGraph (line 179) -
    - - -

    Tells wether the Dataset contains a NamedGraph.

    - -
    - boolean - - containsNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - containsQuad (line 329) -
    - - -

    Tells wether the Dataset contains a quad or quads matching a pattern.

    - -
    - boolean - - containsQuad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - countGraphs (line 251) -
    - - -

    Returns the number of NamedGraphs in the set. Empty graphs are counted.

    - -
    - int - - countGraphs - - () -
    - - - -
    - -
    - -
    - countQuads (line 375) -
    - - -

    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.

    - -
    - int - - countQuads - - () -
    - - - -
    - -
    - -
    - createGraph (line 230) -
    - - -

    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.

    - -
    - NamedGraphDb - - &createGraph - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - findInDefaultGraph (line 426) -
    - - -

    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.

    - -
    - IteratorFindQuadsDb - - &findInDefaultGraph - - (Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - findInNamedGraphs (line 394) -
    - - -

    Finds Statements that match a quad pattern. The argument may contain wildcards.

    - -
    - IteratorFindQuadsDb - - &findInNamedGraphs - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
      -
    • - Resource - $graphName: or null
    • -
    • - Resource - $subject: or null
    • -
    • - Resource - $predicate: or null
    • -
    • - Resource - $object: or null
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - getDatasetName (line 113) -
    - - -

    Returns the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - string - - getDatasetName - - () -
    - - - -
    - -
    - -
    - getDefaultGraph (line 146) -
    - - -

    Returns a reference to the defaultGraph.

    - -
    - NamedGraphDb - - &getDefaultGraph - - () -
    - - - -
    - -
    - -
    - getNamedGraph (line 192) -
    - - -

    Returns the NamedGraph with a specific name from the Dataset.

    -

    Changes to the graph will be reflected in the set.

    -
      -
    • return: or null
    • -
    - -
    - NamedGraphDb - - &getNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - hasDefaultGraph (line 157) -
    - - -

    Returns true, if a defaultGraph exists. False otherwise.

    - -
    - boolean - - hasDefaultGraph - - () -
    - - - -
    - -
    - -
    - isEmpty (line 273) -
    - - -

    Tells wether the set contains any NamedGraphs.

    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listGraphNames (line 210) -
    - - -

    Returns the names of the namedGraphs in this set as strings in an array.

    - -
    - Array - - listGraphNames - - () -
    - - - -
    - -
    - -
    - listNamedGraphs (line 261) -
    - - -

    Returns an iterator over all NamedGraphs in the set.

    - -
    - IteratorAllGraphsDb - - &listNamedGraphs - - () -
    - - - -
    - -
    - -
    - removeNamedGraph (line 168) -
    - - -

    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.

    - -
    - void - - removeNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - removeQuad (line 352) -
    - - -

    Deletes a Quad from the RDF dataset.

    - -
    - void - - removeQuad - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - setDatasetName (line 93) -
    - - -

    Sets the Dataset name. Return true on success, false otherwise.

    -
      -
    • access: public
    • -
    - -
    - void - - setDatasetName - - (string $datasetName) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - setDefaultGraph (line 136) -
    - - -

    Overwrites the existting default graph.

    - -
    - void - - setDefaultGraph - - (DbModel &$graph) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From Dataset

    -
    - Dataset::loadFromFile()
    - Dataset::loadFromString()
    - Dataset::serializeToFile()
    - Dataset::serializeToString()
    - Dataset::sparqlQuery()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetMem.html.svn-base deleted file mode 100755 index a6145ea0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/DatasetMem.html.svn-base +++ /dev/null @@ -1,826 +0,0 @@ - - - - - - Docs For Class DatasetMem - - - - -
    -

    Class DatasetMem

    - - -
    -
    Description
    - -
    - -

    In-memory implementation of a RDF dataset.

    -

    A RDF dataset set is a collection of named RDF graphs.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/DatasetMem.php (line 21) -

    - - -
    Dataset
    -   |
    -   --DatasetMem
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DatasetMem - DatasetMem - ([string $datasetName = null]) -
    - -
    - void - addAll - (Dataset $otherDataset) -
    - -
    - void - addNamedGraph - (NamedGraphMem &$graph) -
    - -
    - void - addQuad - (Quad &$quad) -
    - -
    - void - clear - () -
    - -
    - boolean - containsNamedGraph - (string $graphName) -
    - -
    - boolean - containsQuad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - int - countGraphs - () -
    - -
    - int - countQuads - () -
    - -
    - NamedGraphMem - &createGraph - (string $graphName, [string $baseURI = null]) -
    - -
    - Iterator - &findInDefaultGraph - (Resource $subject, Resource $predicate, Resource $object) -
    - -
    - Iterator - &findInNamedGraphs - (Resource $graph, Resourceor $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
    - string - getDatasetName - () -
    - -
    - Model - &getDefaultGraph - () -
    - -
    - NamedGraphMem - &getNamedGraph - (string $graphName) -
    - -
    - boolean - hasDefaultGraph - () -
    - -
    - boolean - isEmpty - () -
    - -
    - Array - listGraphNames - () -
    - - - -
    - void - removeNamedGraph - (string $graphName) -
    - -
    - void - removeQuad - (Quad $quad) -
    - -
    - void - setDatasetName - (string $datasetName) -
    - -
    - void - setDefaultGraph - (MemModel &$graph) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DatasetMem (line 56) -
    - - -

    Constructor.

    -

    You can supply a Dataset name.

    -
      -
    • access: public
    • -
    - -
    - DatasetMem - - DatasetMem - - ([string $datasetName = null]) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - addAll (line 251) -
    - - -

    Adds all named graphs of the other dataset to this dataset.

    - -
    - void - - addAll - - (Dataset $otherDataset) -
    - - - - -
    - -
    - -
    - addNamedGraph (line 91) -
    - - -

    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.

    - -
    - void - - addNamedGraph - - (NamedGraphMem &$graph) -
    - - - - -
    - -
    - -
    - addQuad (line 274) -
    - - -

    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.

    - -
    - void - - addQuad - - (Quad &$quad) -
    - -
      -
    • - Quad - &$quad
    • -
    - - -
    - -
    - -
    - clear (line 188) -
    - - -

    Deletes all NamedGraphs from the set.

    - -
    - void - - clear - - () -
    - - - -
    - -
    - -
    - containsNamedGraph (line 143) -
    - - -

    Tells wether the Dataset contains a NamedGraph.

    - -
    - boolean - - containsNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - containsQuad (line 294) -
    - - -

    Tells wether the Dataset contains a quad or quads matching a pattern.

    - -
    - boolean - - containsQuad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - countGraphs (line 199) -
    - - -

    Returns the number of NamedGraphs in the set. Empty graphs are counted.

    - -
    - int - - countGraphs - - () -
    - - - -
    - -
    - -
    - countQuads (line 342) -
    - - -

    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.

    - -
    - int - - countQuads - - () -
    - - - -
    - -
    - -
    - createGraph (line 179) -
    - - -

    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI

    - -
    - NamedGraphMem - - &createGraph - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - findInDefaultGraph (line 389) -
    - - -

    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.

    - -
    - Iterator - - &findInDefaultGraph - - (Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - findInNamedGraphs (line 362) -
    - - -

    Finds Statements that match a quad pattern. The argument may contain wildcards.

    - -
    - Iterator - - &findInNamedGraphs - - (Resource $graph, Resourceor $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
      -
    • - Resource - $graph: or Null
    • -
    • - Resourceor - $subject: Null
    • -
    • - Resource - $predicate: or Null
    • -
    • - Resource - $object: or Null
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - getDatasetName (line 81) -
    - - -

    Returns the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - string - - getDatasetName - - () -
    - - - -
    - -
    - -
    - getDefaultGraph (line 111) -
    - - -

    Returns a reference to the defaultGraph

    - -
    - Model - - &getDefaultGraph - - () -
    - - - -
    - -
    - -
    - getNamedGraph (line 155) -
    - - -

    Returns the NamedGraph with a specific name from the Dataset.

    -

    Changes to the graph will be reflected in the set.

    -
      -
    • return: or NULL
    • -
    - -
    - NamedGraphMem - - &getNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - hasDefaultGraph (line 121) -
    - - -

    Returns true, if an defaultGraph exists. False otherwise .

    - -
    - boolean - - hasDefaultGraph - - () -
    - - - -
    - -
    - -
    - isEmpty (line 241) -
    - - -

    Tells wether the set contains any NamedGraphs.

    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listGraphNames (line 166) -
    - - -

    Returns the names of the namedGraphs in this set as strings in an array.

    - -
    - Array - - listGraphNames - - () -
    - - - -
    - -
    - -
    - listNamedGraphs (line 229) -
    - - -

    Returns an iterator over all NamedGraphs in the set.

    - -
    - IteratorAllGraphsMem - - &listNamedGraphs - - () -
    - - - -
    - -
    - -
    - removeNamedGraph (line 132) -
    - - -

    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.

    - -
    - void - - removeNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - removeQuad (line 318) -
    - - -

    Deletes a Quad from the RDF dataset.

    - -
    - void - - removeQuad - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - setDatasetName (line 70) -
    - - -

    Sets the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - void - - setDatasetName - - (string $datasetName) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - setDefaultGraph (line 102) -
    - - -

    Overwrites the existting default graph.

    - -
    - void - - setDefaultGraph - - (MemModel &$graph) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From Dataset

    -
    - Dataset::loadFromFile()
    - Dataset::loadFromString()
    - Dataset::serializeToFile()
    - Dataset::serializeToString()
    - Dataset::sparqlQuery()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsDb.html.svn-base deleted file mode 100755 index 294d5845..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsDb.html.svn-base +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - Docs For Class IteratorAllGraphsDb - - - - -
    -

    Class IteratorAllGraphsDb

    - - -
    -
    Description
    - -
    - -

    Implementation of a Graph iterator.

    -

    This Iterator should be used in a for-loop like: for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) { $currentResource=$iterator->current(); };

    - -

    - Located in /dataset/IteratorAllGraphsDb.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorAllGraphsDb - IteratorAllGraphsDb - (ADODBResultSet &$dbResultSet, DatasetDb &$datasetDb) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorAllGraphsDb (line 65) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorAllGraphsDb - - IteratorAllGraphsDb - - (ADODBResultSet &$dbResultSet, DatasetDb &$datasetDb) -
    - -
      -
    • - ADODBResultSet - &$dbResultSet
    • -
    • - DatasetDb - &$datasetDb
    • -
    - - -
    - -
    - -
    - current (line 110) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 122) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 98) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 77) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 88) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsMem.html.svn-base deleted file mode 100755 index dfe5613d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorAllGraphsMem.html.svn-base +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - Docs For Class IteratorAllGraphsMem - - - - -
    -

    Class IteratorAllGraphsMem

    - - -
    -
    Description
    - -
    - -

    Implementation of a Graph iterator.

    -

    This Iterator should be used in a for-loop like: for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) { $currentResource=$it->current(); };

    - -

    - Located in /dataset/IteratorAllGraphsMem.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorAllGraphsMem - IteratorAllGraphsMem - (dataset &$namedGraphSet) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorAllGraphsMem (line 64) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorAllGraphsMem - - IteratorAllGraphsMem - - (dataset &$namedGraphSet) -
    - -
      -
    • - dataset - &$namedGraphSet
    • -
    - - -
    - -
    - -
    - current (line 109) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 120) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 97) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 75) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 87) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsDb.html.svn-base deleted file mode 100755 index 073ad7f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsDb.html.svn-base +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - Docs For Class IteratorFindQuadsDb - - - - -
    -

    Class IteratorFindQuadsDb

    - - -
    -
    Description
    - -
    - -

    Implementation of a quad iterator.

    -

    This Iterator should be used like: for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) { $currentQuad=$iterator->current(); };

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/IteratorFindQuadsDb.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorFindQuadsDb - IteratorFindQuadsDb - (dataset &$dbResultSet,  &$datasetDb, [ $returnAsTriples = false]) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorFindQuadsDb (line 56) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorFindQuadsDb - - IteratorFindQuadsDb - - (dataset &$dbResultSet,  &$datasetDb, [ $returnAsTriples = false]) -
    - -
      -
    • - dataset - &$dbResultSet
    • -
    • - - &$datasetDb
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - current (line 104) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 140) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 92) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 68) -
    - - -

    Resets iterator list to start.

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 79) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:35 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsMem.html.svn-base deleted file mode 100755 index 6b67f921..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/IteratorFindQuadsMem.html.svn-base +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - Docs For Class IteratorFindQuadsMem - - - - -
    -

    Class IteratorFindQuadsMem

    - - -
    -
    Description
    - -
    - -

    Implementation of a quad iterator.

    -

    This Iterator should be used like: for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) { $currentQuad=$it->current(); };

    -
      -
    • author: Daniel Westphal (http://d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/IteratorFindQuadsMem.php (line 25) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorFindQuadsMem - IteratorFindQuadsMem - (Resource $subject, Resource $predicate, Resource $object, dataset &$graphIterator, [Boolean $returnAsTriples = false]) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorFindQuadsMem (line 123) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like find(). $getSPO supports the strings 's', 'p', and 'o' to return either the subject, predicate, or object of the result statements.

    -
      -
    • access: public
    • -
    - -
    - IteratorFindQuadsMem - - IteratorFindQuadsMem - - (Resource $subject, Resource $predicate, Resource $object, dataset &$graphIterator, [Boolean $returnAsTriples = false]) -
    - -
      -
    • - Resource - $subject
    • -
    • - Resource - $predicate
    • -
    • - Resource - $object
    • -
    • - dataset - &$graphIterator
    • -
    • - Boolean - $returnAsTriples
    • -
    - - -
    - -
    - -
    - current (line 198) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 212) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 162) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 138) -
    - - -

    Resets iterator list to start.

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 152) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphDb.html.svn-base deleted file mode 100755 index da6ad3f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphDb.html.svn-base +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - Docs For Class NamedGraphDb - - - - -
    -

    Class NamedGraphDb

    - - -
    -
    Description
    - -
    - -

    Persistent NamedGraph implementation that extends a DbModel.

    -

    The graphName is not stored in the database. As soon as the namedGraph is added to a RDF dataset the graphName is saved.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/NamedGraphDb.php (line 17) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --DbModel
    -         |
    -         --NamedGraphDb
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - NamedGraphDb - NamedGraphDb - (ADODBConnection &$dbConnection, string $modelURI, string $modelID, string $graphName, [ $baseURI = NULL]) -
    - -
    - string - getGraphName - () -
    - -
    - void - setGraphName - (string $graphName) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NamedGraphDb (line 39) -
    - - -

    Constructor Do not call this directly.

    -

    Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.

    -
      -
    • access: public
    • -
    - -
    - NamedGraphDb - - NamedGraphDb - - (ADODBConnection &$dbConnection, string $modelURI, string $modelID, string $graphName, [ $baseURI = NULL]) -
    - -
      -
    • - ADODBConnection - &$dbConnection
    • -
    • - string - $modelURI
    • -
    • - string - $modelID
    • -
    • - string - $graphName
    • -
    • - - $baseURI
    • -
    - - -
    - -
    - -
    - getGraphName (line 65) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - string - - getGraphName - - () -
    - - - -
    - -
    - -
    - setGraphName (line 54) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From DbModel

    -
    - DbModel::DbModel()
    - DbModel::add()
    - DbModel::addModel()
    - DbModel::addNamespace()
    - DbModel::addParsedNamespaces()
    - DbModel::addWithoutDuplicates()
    - DbModel::close()
    - DbModel::contains()
    - DbModel::containsAll()
    - DbModel::containsAny()
    - DbModel::delete()
    - DbModel::equals()
    - DbModel::find()
    - DbModel::findCount()
    - DbModel::findFirstMatchingStatement()
    - DbModel::findRegex()
    - DbModel::findVocabulary()
    - DbModel::getDbConn()
    - DbModel::getMemModel()
    - DbModel::getModelID()
    - DbModel::getParsedNamespaces()
    - DbModel::intersect()
    - DbModel::isEmpty()
    - DbModel::iterFind()
    - DbModel::rdqlQuery()
    - DbModel::rdqlQueryAsIterator()
    - DbModel::reify()
    - DbModel::remove()
    - DbModel::removeNamespace()
    - DbModel::replace()
    - DbModel::saveAs()
    - DbModel::setBaseURI()
    - DbModel::size()
    - DbModel::subtract()
    - DbModel::toString()
    - DbModel::toStringIncludingTriples()
    - DbModel::unite()
    - DbModel::writeAsHtml()
    - DbModel::writeAsHtmlTable()
    - DbModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphMem.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphMem.html.svn-base deleted file mode 100755 index 08268c13..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/NamedGraphMem.html.svn-base +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Docs For Class NamedGraphMem - - - - -
    -

    Class NamedGraphMem

    - - -
    -
    Description
    - -
    - -

    NamedGraph implementation that extends a MemModel with a name.

    - -

    - Located in /dataset/NamedGraphMem.php (line 17) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --NamedGraphMem
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - NamedGraphMem - NamedGraphMem - (string $graphName, [string $baseURI = null]) -
    - -
    - string - getGraphName - () -
    - -
    - void - setGraphName - (string $graphName) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NamedGraphMem (line 37) -
    - - -

    Constructor You have to supply a graph name. You can supply a URI.

    -
      -
    • access: public
    • -
    - -
    - NamedGraphMem - - NamedGraphMem - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getGraphName (line 61) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - string - - getGraphName - - () -
    - - - -
    - -
    - -
    - setGraphName (line 50) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Quad.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Quad.html.svn-base deleted file mode 100755 index d2406a20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/Quad.html.svn-base +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - Docs For Class Quad - - - - -
    -

    Class Quad

    - - -
    -
    Description
    - -
    - -

    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /dataset/Quad.php (line 17) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Quad - Quad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - boolean - equals - (Quad $quad) -
    - -
    - Resource - getGraphName - () -
    - -
    - Resource - getObject - () -
    - -
    - Resource - getPredicate - () -
    - -
    - statement - getStatement - () -
    - -
    - Resource - getSubject - () -
    - -
    - void - setGraphName - (Resource $graphName) -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Quad (line 46) -
    - - -

    Constructor Creates a Quad from four Nodes.

    -
      -
    • access: public
    • -
    - -
    - Quad - - Quad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - equals (line 142) -
    - - -

    Checks if two quads are equal.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - getGraphName (line 75) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getGraphName - - () -
    - - - -
    - -
    - -
    - getObject (line 119) -
    - - -

    Returns the object.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 108) -
    - - -

    Returns the predicate.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getPredicate - - () -
    - - - -
    - -
    - -
    - getStatement (line 130) -
    - - -

    Returns the statement(subject,predicate,object).

    -
      -
    • access: public
    • -
    - -
    - statement - - getStatement - - () -
    - - - -
    - -
    - -
    - getSubject (line 97) -
    - - -

    Returns the subject.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getSubject - - () -
    - - - -
    - -
    - -
    - setGraphName (line 64) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (Resource $graphName) -
    - - - - -
    - -
    - -
    - toString (line 86) -
    - - -

    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.

    - -
    - string - - toString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXParser.html.svn-base deleted file mode 100755 index bc6d83e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXParser.html.svn-base +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - Docs For Class TriXParser - - - - -
    -

    Class TriXParser

    - - -
    -
    Description
    - -
    - -

    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.

    -

    So this parser only works with TRIX documents where the default namespace is the TRIX namespace.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /syntax/TriXParser.php (line 17) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - TriXParser - TriXParser - (GraphSet &$graphSet) -
    - -
    - void - parseFile - (string $pathToFile) -
    - -
    - void - parseString - (string $string) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor TriXParser (line 34) -
    - - -

    Constructor Needs a reference to a graphSet

    -
      -
    • access: public
    • -
    - -
    - TriXParser - - TriXParser - - (GraphSet &$graphSet) -
    - -
      -
    • - GraphSet - &$graphSet
    • -
    - - -
    - -
    - -
    - parseFile (line 56) -
    - - -

    Parse from a file

    -
      -
    • access: public
    • -
    - -
    - void - - parseFile - - (string $pathToFile) -
    - -
      -
    • - string - $pathToFile
    • -
    - - -
    - -
    - -
    - parseString (line 45) -
    - - -

    Parse an XML string

    -
      -
    • access: public
    • -
    - -
    - void - - parseString - - (string $string) -
    - -
      -
    • - string - $string
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXSerializer.html.svn-base deleted file mode 100755 index 1270b524..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/TriXSerializer.html.svn-base +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Docs For Class TriXSerializer - - - - -
    -

    Class TriXSerializer

    - - -
    -
    Description
    - -
    - -

    Temporary implementation of a TriX-Serializer

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /syntax/TriXSerializer.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - TriXSerializer - TriXSerializer - (GraphSet &$graphSet) -
    - -
    - void - serializeToFile - (string $fileName) -
    - -
    - string - &serializeToString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor TriXSerializer (line 34) -
    - - -

    Constructor Needs a reference to a graphSet

    -
      -
    • access: public
    • -
    - -
    - TriXSerializer - - TriXSerializer - - (GraphSet &$graphSet) -
    - -
      -
    • - GraphSet - &$graphSet
    • -
    - - -
    - -
    - -
    - serializeToFile (line 56) -
    - - -

    Serialize the dataset to a TriX string and save in file

    -
      -
    • access: public
    • -
    - -
    - void - - serializeToFile - - (string $fileName) -
    - -
      -
    • - string - $fileName
    • -
    - - -
    - -
    - -
    - serializeToString (line 45) -
    - - -

    Serialize the dataset to a TriX string

    -
      -
    • access: public
    • -
    - -
    - string - - &serializeToString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Dataset.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Dataset.php.html.svn-base deleted file mode 100755 index 968e214b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Dataset.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Dataset.php - - - - -
    -

    /dataset/Dataset.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Dataset - - Dataset implementation. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetDb.php.html.svn-base deleted file mode 100755 index 432c7ece..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetDb.php.html.svn-base +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - Docs for page DatasetDb.php - - - - -
    -

    /dataset/DatasetDb.php

    - - -
    -
    Description
    - -
    - -

    Persistent implementation of a Dataset in a database.

    -

    A RDF dataset is a collection of named RDF graphs.

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DatasetDb - - Dataset implementation. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.PACKAGE_DBASE) - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Mon, 26 Jun 2006 14:25:20 +0200 by phpDocumentor 1.3.0RC6 -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetMem.php.html.svn-base deleted file mode 100755 index dfd0b3f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---DatasetMem.php.html.svn-base +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page DatasetMem.php - - - - -
    -

    /dataset/DatasetMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DatasetMem - - In-memory implementation of a RDF dataset. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/Dataset.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/NamedGraphMem.php') - (line 3) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/MemModel.php') - (line 4) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsDb.php.html.svn-base deleted file mode 100755 index bc7e6e93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsDb.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorAllGraphsDb.php - - - - -
    -

    /dataset/IteratorAllGraphsDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorAllGraphsDb - - Implementation of a Graph iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsMem.php.html.svn-base deleted file mode 100755 index 586ea2fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorAllGraphsMem.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorAllGraphsMem.php - - - - -
    -

    /dataset/IteratorAllGraphsMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorAllGraphsMem - - Implementation of a Graph iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsDb.php.html.svn-base deleted file mode 100755 index 3c42dc7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsDb.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorFindQuadsDb.php - - - - -
    -

    /dataset/IteratorFindQuadsDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorFindQuadsDb - - Implementation of a quad iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsMem.php.html.svn-base deleted file mode 100755 index 0b706629..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---IteratorFindQuadsMem.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page IteratorFindQuadsMem.php - - - - -
    -

    /dataset/IteratorFindQuadsMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorFindQuadsMem - - Implementation of a quad iterator. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/Quad.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphDb.php.html.svn-base deleted file mode 100755 index 8ad73c07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphDb.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page NamedGraphDb.php - - - - -
    -

    /dataset/NamedGraphDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NamedGraphDb - - Persistent NamedGraph implementation that extends a DbModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphMem.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphMem.php.html.svn-base deleted file mode 100755 index 25f420ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---NamedGraphMem.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page NamedGraphMem.php - - - - -
    -

    /dataset/NamedGraphMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NamedGraphMem - - NamedGraph implementation that extends a MemModel with a name. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/MemModel.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Quad.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Quad.php.html.svn-base deleted file mode 100755 index 625137e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_dataset---Quad.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Quad.php - - - - -
    -

    /dataset/Quad.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Quad - - A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXParser.php.html.svn-base deleted file mode 100755 index 56a126bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TriXParser.php - - - - -
    -

    /syntax/TriXParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - TriXParser - - Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXSerializer.php.html.svn-base deleted file mode 100755 index 6d044b81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/.svn/text-base/_syntax---TriXSerializer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TriXSerializer.php - - - - -
    -

    /syntax/TriXSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - TriXSerializer - - Temporary implementation of a TriX-Serializer -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Dataset.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Dataset.html deleted file mode 100755 index 65134f88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Dataset.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - Docs For Class Dataset - - - - -
    -

    Class Dataset

    - - -
    -
    Description
    - -
    - -

    Dataset implementation.

    -

    Superclass of datasetMem and datasetDb which contains shared functionality.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: Dataset.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/Dataset.php (line 18) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    DatasetDb - Dataset implementation. -
    DatasetMem - In-memory implementation of a RDF dataset. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - loadFromFile - (string $file) -
    - -
    - void - loadFromString - (string $string) -
    - -
    - void - serializeToFile - (string $fileName) -
    - -
    - string - serializeToString - () -
    - -
    - String/array - sparqlQuery - (String $query, [String $resultform = false]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - loadFromFile (line 26) -
    - - -

    Load a Dataset from a File

    -
      -
    • access: public
    • -
    - -
    - void - - loadFromFile - - (string $file) -
    - -
      -
    • - string - $file
    • -
    - - -
    - -
    - -
    - loadFromString (line 38) -
    - - -

    Load a Datset from a string

    -
      -
    • access: public
    • -
    - -
    - void - - loadFromString - - (string $string) -
    - -
      -
    • - string - $string
    • -
    - - -
    - -
    - -
    - serializeToFile (line 50) -
    - - -

    Serialize the Dataset to File

    -
      -
    • access: public
    • -
    - -
    - void - - serializeToFile - - (string $fileName) -
    - -
      -
    • - string - $fileName
    • -
    - - -
    - -
    - -
    - serializeToString (line 62) -
    - - -

    Serialize the Dataset to string

    -
      -
    • access: public
    • -
    - -
    - string - - serializeToString - - () -
    - - - -
    - -
    - -
    - sparqlQuery (line 77) -
    - - -

    Performs a SPARQL query against an RDF Dataset.

    -

    The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.

    - -
    - String/array - - sparqlQuery - - (String $query, [String $resultform = false]) -
    - -
      -
    • - String - $query: the sparql query string
    • -
    • - String - $resultform: the result form ('xml' for SPARQL Query Results XML Format)
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetDb.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetDb.html deleted file mode 100755 index c13fcf97..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetDb.html +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - Docs For Class DatasetDb - - - - -
    -

    Class DatasetDb

    - - -
    -
    Description
    - -
    - -

    Dataset implementation.

    -

    Superclass of datasetMem and datasetDb which contains shared functionality.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: DatasetDb.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /dataset/DatasetDb.php (line 22) -

    - - -
    Dataset
    -   |
    -   --DatasetDb
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DatasetDb - DatasetDb - (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName) -
    - -
    - void - addAll - (Dataset $otherDataset) -
    - -
    - void - addNamedGraph - (NamedGraphDb &$graph) -
    - -
    - void - addQuad - (Quad &$quad) -
    - -
    - void - clear - () -
    - -
    - boolean - containsNamedGraph - (string $graphName) -
    - -
    - boolean - containsQuad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - int - countGraphs - () -
    - -
    - int - countQuads - () -
    - -
    - NamedGraphDb - &createGraph - (string $graphName, [string $baseURI = null]) -
    - -
    - IteratorFindQuadsDb - &findInDefaultGraph - (Resource $subject, Resource $predicate, Resource $object) -
    - -
    - IteratorFindQuadsDb - &findInNamedGraphs - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
    - string - getDatasetName - () -
    - - - -
    - NamedGraphDb - &getNamedGraph - (string $graphName) -
    - -
    - boolean - hasDefaultGraph - () -
    - -
    - boolean - isEmpty - () -
    - -
    - Array - listGraphNames - () -
    - - - -
    - void - removeNamedGraph - (string $graphName) -
    - -
    - void - removeQuad - (Quad $quad) -
    - -
    - void - setDatasetName - (string $datasetName) -
    - -
    - void - setDefaultGraph - (DbModel &$graph) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DatasetDb (line 60) -
    - - -

    Constructor You can supply a Dataset name.

    -
      -
    • access: public
    • -
    - -
    - DatasetDb - - DatasetDb - - (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName) -
    - -
      -
    • - ADODBConnection - &$dbConnection
    • -
    • - DbStore - &$dbStore
    • -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - addAll (line 283) -
    - - -

    Add all named graphs of the other dataset to this dataset.

    - -
    - void - - addAll - - (Dataset $otherDataset) -
    - - - - -
    - -
    - -
    - addNamedGraph (line 123) -
    - - -

    Adds a NamedGraph to the set.

    - -
    - void - - addNamedGraph - - (NamedGraphDb &$graph) -
    - - - - -
    - -
    - -
    - addQuad (line 305) -
    - - -

    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.

    - -
    - void - - addQuad - - (Quad &$quad) -
    - -
      -
    • - Quad - &$quad
    • -
    - - -
    - -
    - -
    - clear (line 241) -
    - - -

    Deletes all NamedGraphs from the set.

    - -
    - void - - clear - - () -
    - - - -
    - -
    - -
    - containsNamedGraph (line 179) -
    - - -

    Tells wether the Dataset contains a NamedGraph.

    - -
    - boolean - - containsNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - containsQuad (line 329) -
    - - -

    Tells wether the Dataset contains a quad or quads matching a pattern.

    - -
    - boolean - - containsQuad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - countGraphs (line 251) -
    - - -

    Returns the number of NamedGraphs in the set. Empty graphs are counted.

    - -
    - int - - countGraphs - - () -
    - - - -
    - -
    - -
    - countQuads (line 375) -
    - - -

    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.

    - -
    - int - - countQuads - - () -
    - - - -
    - -
    - -
    - createGraph (line 230) -
    - - -

    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.

    - -
    - NamedGraphDb - - &createGraph - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - findInDefaultGraph (line 426) -
    - - -

    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.

    - -
    - IteratorFindQuadsDb - - &findInDefaultGraph - - (Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - findInNamedGraphs (line 394) -
    - - -

    Finds Statements that match a quad pattern. The argument may contain wildcards.

    - -
    - IteratorFindQuadsDb - - &findInNamedGraphs - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
      -
    • - Resource - $graphName: or null
    • -
    • - Resource - $subject: or null
    • -
    • - Resource - $predicate: or null
    • -
    • - Resource - $object: or null
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - getDatasetName (line 113) -
    - - -

    Returns the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - string - - getDatasetName - - () -
    - - - -
    - -
    - -
    - getDefaultGraph (line 146) -
    - - -

    Returns a reference to the defaultGraph.

    - -
    - NamedGraphDb - - &getDefaultGraph - - () -
    - - - -
    - -
    - -
    - getNamedGraph (line 192) -
    - - -

    Returns the NamedGraph with a specific name from the Dataset.

    -

    Changes to the graph will be reflected in the set.

    -
      -
    • return: or null
    • -
    - -
    - NamedGraphDb - - &getNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - hasDefaultGraph (line 157) -
    - - -

    Returns true, if a defaultGraph exists. False otherwise.

    - -
    - boolean - - hasDefaultGraph - - () -
    - - - -
    - -
    - -
    - isEmpty (line 273) -
    - - -

    Tells wether the set contains any NamedGraphs.

    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listGraphNames (line 210) -
    - - -

    Returns the names of the namedGraphs in this set as strings in an array.

    - -
    - Array - - listGraphNames - - () -
    - - - -
    - -
    - -
    - listNamedGraphs (line 261) -
    - - -

    Returns an iterator over all NamedGraphs in the set.

    - -
    - IteratorAllGraphsDb - - &listNamedGraphs - - () -
    - - - -
    - -
    - -
    - removeNamedGraph (line 168) -
    - - -

    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.

    - -
    - void - - removeNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - removeQuad (line 352) -
    - - -

    Deletes a Quad from the RDF dataset.

    - -
    - void - - removeQuad - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - setDatasetName (line 93) -
    - - -

    Sets the Dataset name. Return true on success, false otherwise.

    -
      -
    • access: public
    • -
    - -
    - void - - setDatasetName - - (string $datasetName) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - setDefaultGraph (line 136) -
    - - -

    Overwrites the existting default graph.

    - -
    - void - - setDefaultGraph - - (DbModel &$graph) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From Dataset

    -
    - Dataset::loadFromFile()
    - Dataset::loadFromString()
    - Dataset::serializeToFile()
    - Dataset::serializeToString()
    - Dataset::sparqlQuery()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetMem.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetMem.html deleted file mode 100755 index 1fd25335..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/DatasetMem.html +++ /dev/null @@ -1,826 +0,0 @@ - - - - - - Docs For Class DatasetMem - - - - -
    -

    Class DatasetMem

    - - -
    -
    Description
    - -
    - -

    In-memory implementation of a RDF dataset.

    -

    A RDF dataset set is a collection of named RDF graphs.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: DatasetMem.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/DatasetMem.php (line 21) -

    - - -
    Dataset
    -   |
    -   --DatasetMem
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DatasetMem - DatasetMem - ([string $datasetName = null]) -
    - -
    - void - addAll - (Dataset $otherDataset) -
    - -
    - void - addNamedGraph - (NamedGraphMem &$graph) -
    - -
    - void - addQuad - (Quad &$quad) -
    - -
    - void - clear - () -
    - -
    - boolean - containsNamedGraph - (string $graphName) -
    - -
    - boolean - containsQuad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - int - countGraphs - () -
    - -
    - int - countQuads - () -
    - -
    - NamedGraphMem - &createGraph - (string $graphName, [string $baseURI = null]) -
    - -
    - Iterator - &findInDefaultGraph - (Resource $subject, Resource $predicate, Resource $object) -
    - -
    - Iterator - &findInNamedGraphs - (Resource $graph, Resourceor $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
    - string - getDatasetName - () -
    - -
    - Model - &getDefaultGraph - () -
    - -
    - NamedGraphMem - &getNamedGraph - (string $graphName) -
    - -
    - boolean - hasDefaultGraph - () -
    - -
    - boolean - isEmpty - () -
    - -
    - Array - listGraphNames - () -
    - - - -
    - void - removeNamedGraph - (string $graphName) -
    - -
    - void - removeQuad - (Quad $quad) -
    - -
    - void - setDatasetName - (string $datasetName) -
    - -
    - void - setDefaultGraph - (MemModel &$graph) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DatasetMem (line 56) -
    - - -

    Constructor.

    -

    You can supply a Dataset name.

    -
      -
    • access: public
    • -
    - -
    - DatasetMem - - DatasetMem - - ([string $datasetName = null]) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - addAll (line 251) -
    - - -

    Adds all named graphs of the other dataset to this dataset.

    - -
    - void - - addAll - - (Dataset $otherDataset) -
    - - - - -
    - -
    - -
    - addNamedGraph (line 91) -
    - - -

    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.

    - -
    - void - - addNamedGraph - - (NamedGraphMem &$graph) -
    - - - - -
    - -
    - -
    - addQuad (line 274) -
    - - -

    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.

    - -
    - void - - addQuad - - (Quad &$quad) -
    - -
      -
    • - Quad - &$quad
    • -
    - - -
    - -
    - -
    - clear (line 188) -
    - - -

    Deletes all NamedGraphs from the set.

    - -
    - void - - clear - - () -
    - - - -
    - -
    - -
    - containsNamedGraph (line 143) -
    - - -

    Tells wether the Dataset contains a NamedGraph.

    - -
    - boolean - - containsNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - containsQuad (line 294) -
    - - -

    Tells wether the Dataset contains a quad or quads matching a pattern.

    - -
    - boolean - - containsQuad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - countGraphs (line 199) -
    - - -

    Returns the number of NamedGraphs in the set. Empty graphs are counted.

    - -
    - int - - countGraphs - - () -
    - - - -
    - -
    - -
    - countQuads (line 342) -
    - - -

    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.

    - -
    - int - - countQuads - - () -
    - - - -
    - -
    - -
    - createGraph (line 179) -
    - - -

    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI

    - -
    - NamedGraphMem - - &createGraph - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - findInDefaultGraph (line 389) -
    - - -

    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.

    - -
    - Iterator - - &findInDefaultGraph - - (Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - findInNamedGraphs (line 362) -
    - - -

    Finds Statements that match a quad pattern. The argument may contain wildcards.

    - -
    - Iterator - - &findInNamedGraphs - - (Resource $graph, Resourceor $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false]) -
    - -
      -
    • - Resource - $graph: or Null
    • -
    • - Resourceor - $subject: Null
    • -
    • - Resource - $predicate: or Null
    • -
    • - Resource - $object: or Null
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - getDatasetName (line 81) -
    - - -

    Returns the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - string - - getDatasetName - - () -
    - - - -
    - -
    - -
    - getDefaultGraph (line 111) -
    - - -

    Returns a reference to the defaultGraph

    - -
    - Model - - &getDefaultGraph - - () -
    - - - -
    - -
    - -
    - getNamedGraph (line 155) -
    - - -

    Returns the NamedGraph with a specific name from the Dataset.

    -

    Changes to the graph will be reflected in the set.

    -
      -
    • return: or NULL
    • -
    - -
    - NamedGraphMem - - &getNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - hasDefaultGraph (line 121) -
    - - -

    Returns true, if an defaultGraph exists. False otherwise .

    - -
    - boolean - - hasDefaultGraph - - () -
    - - - -
    - -
    - -
    - isEmpty (line 241) -
    - - -

    Tells wether the set contains any NamedGraphs.

    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listGraphNames (line 166) -
    - - -

    Returns the names of the namedGraphs in this set as strings in an array.

    - -
    - Array - - listGraphNames - - () -
    - - - -
    - -
    - -
    - listNamedGraphs (line 229) -
    - - -

    Returns an iterator over all NamedGraphs in the set.

    - -
    - IteratorAllGraphsMem - - &listNamedGraphs - - () -
    - - - -
    - -
    - -
    - removeNamedGraph (line 132) -
    - - -

    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.

    - -
    - void - - removeNamedGraph - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    - -
    - -
    - removeQuad (line 318) -
    - - -

    Deletes a Quad from the RDF dataset.

    - -
    - void - - removeQuad - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - setDatasetName (line 70) -
    - - -

    Sets the Datasets name.

    -
      -
    • access: public
    • -
    - -
    - void - - setDatasetName - - (string $datasetName) -
    - -
      -
    • - string - $datasetName
    • -
    - - -
    - -
    - -
    - setDefaultGraph (line 102) -
    - - -

    Overwrites the existting default graph.

    - -
    - void - - setDefaultGraph - - (MemModel &$graph) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From Dataset

    -
    - Dataset::loadFromFile()
    - Dataset::loadFromString()
    - Dataset::serializeToFile()
    - Dataset::serializeToString()
    - Dataset::sparqlQuery()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsDb.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsDb.html deleted file mode 100755 index 79ceb072..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsDb.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - Docs For Class IteratorAllGraphsDb - - - - -
    -

    Class IteratorAllGraphsDb

    - - -
    -
    Description
    - -
    - -

    Implementation of a Graph iterator.

    -

    This Iterator should be used in a for-loop like: for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) { $currentResource=$iterator->current(); };

    - -

    - Located in /dataset/IteratorAllGraphsDb.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorAllGraphsDb - IteratorAllGraphsDb - (ADODBResultSet &$dbResultSet, DatasetDb &$datasetDb) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorAllGraphsDb (line 65) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorAllGraphsDb - - IteratorAllGraphsDb - - (ADODBResultSet &$dbResultSet, DatasetDb &$datasetDb) -
    - -
      -
    • - ADODBResultSet - &$dbResultSet
    • -
    • - DatasetDb - &$datasetDb
    • -
    - - -
    - -
    - -
    - current (line 110) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 122) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 98) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 77) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 88) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsMem.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsMem.html deleted file mode 100755 index 2319827d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorAllGraphsMem.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - Docs For Class IteratorAllGraphsMem - - - - -
    -

    Class IteratorAllGraphsMem

    - - -
    -
    Description
    - -
    - -

    Implementation of a Graph iterator.

    -

    This Iterator should be used in a for-loop like: for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) { $currentResource=$it->current(); };

    - -

    - Located in /dataset/IteratorAllGraphsMem.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorAllGraphsMem - IteratorAllGraphsMem - (dataset &$namedGraphSet) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorAllGraphsMem (line 64) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorAllGraphsMem - - IteratorAllGraphsMem - - (dataset &$namedGraphSet) -
    - -
      -
    • - dataset - &$namedGraphSet
    • -
    - - -
    - -
    - -
    - current (line 109) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 120) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 97) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 75) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 87) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsDb.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsDb.html deleted file mode 100755 index 17fed890..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsDb.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - Docs For Class IteratorFindQuadsDb - - - - -
    -

    Class IteratorFindQuadsDb

    - - -
    -
    Description
    - -
    - -

    Implementation of a quad iterator.

    -

    This Iterator should be used like: for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) { $currentQuad=$iterator->current(); };

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: IteratorFindQuadsDb.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/IteratorFindQuadsDb.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorFindQuadsDb - IteratorFindQuadsDb - (dataset &$dbResultSet,  &$datasetDb, [ $returnAsTriples = false]) -
    - -
    - mixed - &current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorFindQuadsDb (line 56) -
    - - -

    Constructor.

    -
      -
    • access: public
    • -
    - -
    - IteratorFindQuadsDb - - IteratorFindQuadsDb - - (dataset &$dbResultSet,  &$datasetDb, [ $returnAsTriples = false]) -
    - -
      -
    • - dataset - &$dbResultSet
    • -
    • - - &$datasetDb
    • -
    • - - $returnAsTriples
    • -
    - - -
    - -
    - -
    - current (line 104) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - &current - - () -
    - - - -
    - -
    - -
    - key (line 140) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 92) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 68) -
    - - -

    Resets iterator list to start.

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 79) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:35 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsMem.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsMem.html deleted file mode 100755 index 98df1c9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/IteratorFindQuadsMem.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - Docs For Class IteratorFindQuadsMem - - - - -
    -

    Class IteratorFindQuadsMem

    - - -
    -
    Description
    - -
    - -

    Implementation of a quad iterator.

    -

    This Iterator should be used like: for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) { $currentQuad=$it->current(); };

    -
      -
    • author: Daniel Westphal (http://d-westphal.de)
    • -
    • version: $Id: IteratorFindQuadsMem.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/IteratorFindQuadsMem.php (line 25) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IteratorFindQuadsMem - IteratorFindQuadsMem - (Resource $subject, Resource $predicate, Resource $object, dataset &$graphIterator, [Boolean $returnAsTriples = false]) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IteratorFindQuadsMem (line 123) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like find(). $getSPO supports the strings 's', 'p', and 'o' to return either the subject, predicate, or object of the result statements.

    -
      -
    • access: public
    • -
    - -
    - IteratorFindQuadsMem - - IteratorFindQuadsMem - - (Resource $subject, Resource $predicate, Resource $object, dataset &$graphIterator, [Boolean $returnAsTriples = false]) -
    - -
      -
    • - Resource - $subject
    • -
    • - Resource - $predicate
    • -
    • - Resource - $object
    • -
    • - dataset - &$graphIterator
    • -
    • - Boolean - $returnAsTriples
    • -
    - - -
    - -
    - -
    - current (line 198) -
    - - -

    Returns the current item.

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 212) -
    - - -

    Returns the key of the current item.

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 162) -
    - - -

    Moves Iterator to the next item in the list.

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 138) -
    - - -

    Resets iterator list to start.

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 152) -
    - - -

    Says if there are additional items left in the list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphDb.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphDb.html deleted file mode 100755 index 7d0fd88b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphDb.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - Docs For Class NamedGraphDb - - - - -
    -

    Class NamedGraphDb

    - - -
    -
    Description
    - -
    - -

    Persistent NamedGraph implementation that extends a DbModel.

    -

    The graphName is not stored in the database. As soon as the namedGraph is added to a RDF dataset the graphName is saved.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: NamedGraphDb.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/NamedGraphDb.php (line 17) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --DbModel
    -         |
    -         --NamedGraphDb
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - NamedGraphDb - NamedGraphDb - (ADODBConnection &$dbConnection, string $modelURI, string $modelID, string $graphName, [ $baseURI = NULL]) -
    - -
    - string - getGraphName - () -
    - -
    - void - setGraphName - (string $graphName) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NamedGraphDb (line 39) -
    - - -

    Constructor Do not call this directly.

    -

    Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.

    -
      -
    • access: public
    • -
    - -
    - NamedGraphDb - - NamedGraphDb - - (ADODBConnection &$dbConnection, string $modelURI, string $modelID, string $graphName, [ $baseURI = NULL]) -
    - -
      -
    • - ADODBConnection - &$dbConnection
    • -
    • - string - $modelURI
    • -
    • - string - $modelID
    • -
    • - string - $graphName
    • -
    • - - $baseURI
    • -
    - - -
    - -
    - -
    - getGraphName (line 65) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - string - - getGraphName - - () -
    - - - -
    - -
    - -
    - setGraphName (line 54) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From DbModel

    -
    - DbModel::DbModel()
    - DbModel::add()
    - DbModel::addModel()
    - DbModel::addNamespace()
    - DbModel::addParsedNamespaces()
    - DbModel::addWithoutDuplicates()
    - DbModel::close()
    - DbModel::contains()
    - DbModel::containsAll()
    - DbModel::containsAny()
    - DbModel::delete()
    - DbModel::equals()
    - DbModel::find()
    - DbModel::findCount()
    - DbModel::findFirstMatchingStatement()
    - DbModel::findRegex()
    - DbModel::findVocabulary()
    - DbModel::getDbConn()
    - DbModel::getMemModel()
    - DbModel::getModelID()
    - DbModel::getParsedNamespaces()
    - DbModel::intersect()
    - DbModel::isEmpty()
    - DbModel::iterFind()
    - DbModel::rdqlQuery()
    - DbModel::rdqlQueryAsIterator()
    - DbModel::reify()
    - DbModel::remove()
    - DbModel::removeNamespace()
    - DbModel::replace()
    - DbModel::saveAs()
    - DbModel::setBaseURI()
    - DbModel::size()
    - DbModel::subtract()
    - DbModel::toString()
    - DbModel::toStringIncludingTriples()
    - DbModel::unite()
    - DbModel::writeAsHtml()
    - DbModel::writeAsHtmlTable()
    - DbModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphMem.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphMem.html deleted file mode 100755 index 4e2d0b36..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/NamedGraphMem.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Docs For Class NamedGraphMem - - - - -
    -

    Class NamedGraphMem

    - - -
    -
    Description
    - -
    - -

    NamedGraph implementation that extends a MemModel with a name.

    -
      -
    • author: Daniel Westphal <http://www.d-westphal.de>
    • -
    • version: $Id: NamedGraphMem.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/NamedGraphMem.php (line 17) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --NamedGraphMem
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - NamedGraphMem - NamedGraphMem - (string $graphName, [string $baseURI = null]) -
    - -
    - string - getGraphName - () -
    - -
    - void - setGraphName - (string $graphName) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NamedGraphMem (line 37) -
    - - -

    Constructor You have to supply a graph name. You can supply a URI.

    -
      -
    • access: public
    • -
    - -
    - NamedGraphMem - - NamedGraphMem - - (string $graphName, [string $baseURI = null]) -
    - -
      -
    • - string - $graphName
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getGraphName (line 61) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - string - - getGraphName - - () -
    - - - -
    - -
    - -
    - setGraphName (line 50) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (string $graphName) -
    - -
      -
    • - string - $graphName
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Quad.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Quad.html deleted file mode 100755 index 02ccfc34..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/Quad.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - Docs For Class Quad - - - - -
    -

    Class Quad

    - - -
    -
    Description
    - -
    - -

    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: Quad.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /dataset/Quad.php (line 17) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Quad - Quad - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - -
    - boolean - equals - (Quad $quad) -
    - -
    - Resource - getGraphName - () -
    - -
    - Resource - getObject - () -
    - -
    - Resource - getPredicate - () -
    - -
    - statement - getStatement - () -
    - -
    - Resource - getSubject - () -
    - -
    - void - setGraphName - (Resource $graphName) -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Quad (line 46) -
    - - -

    Constructor Creates a Quad from four Nodes.

    -
      -
    • access: public
    • -
    - -
    - Quad - - Quad - - (Resource $graphName, Resource $subject, Resource $predicate, Resource $object) -
    - - - - -
    - -
    - -
    - equals (line 142) -
    - - -

    Checks if two quads are equal.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (Quad $quad) -
    - -
      -
    • - Quad - $quad
    • -
    - - -
    - -
    - -
    - getGraphName (line 75) -
    - - -

    Returns the graph name.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getGraphName - - () -
    - - - -
    - -
    - -
    - getObject (line 119) -
    - - -

    Returns the object.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 108) -
    - - -

    Returns the predicate.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getPredicate - - () -
    - - - -
    - -
    - -
    - getStatement (line 130) -
    - - -

    Returns the statement(subject,predicate,object).

    -
      -
    • access: public
    • -
    - -
    - statement - - getStatement - - () -
    - - - -
    - -
    - -
    - getSubject (line 97) -
    - - -

    Returns the subject.

    -
      -
    • access: public
    • -
    - -
    - Resource - - getSubject - - () -
    - - - -
    - -
    - -
    - setGraphName (line 64) -
    - - -

    Sets the graph name.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphName - - (Resource $graphName) -
    - - - - -
    - -
    - -
    - toString (line 86) -
    - - -

    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.

    - -
    - string - - toString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXParser.html deleted file mode 100755 index 0fbf1809..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXParser.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - Docs For Class TriXParser - - - - -
    -

    Class TriXParser

    - - -
    -
    Description
    - -
    - -

    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.

    -

    So this parser only works with TRIX documents where the default namespace is the TRIX namespace.

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: TriXParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/TriXParser.php (line 17) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - TriXParser - TriXParser - (GraphSet &$graphSet) -
    - -
    - void - parseFile - (string $pathToFile) -
    - -
    - void - parseString - (string $string) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor TriXParser (line 34) -
    - - -

    Constructor Needs a reference to a graphSet

    -
      -
    • access: public
    • -
    - -
    - TriXParser - - TriXParser - - (GraphSet &$graphSet) -
    - -
      -
    • - GraphSet - &$graphSet
    • -
    - - -
    - -
    - -
    - parseFile (line 56) -
    - - -

    Parse from a file

    -
      -
    • access: public
    • -
    - -
    - void - - parseFile - - (string $pathToFile) -
    - -
      -
    • - string - $pathToFile
    • -
    - - -
    - -
    - -
    - parseString (line 45) -
    - - -

    Parse an XML string

    -
      -
    • access: public
    • -
    - -
    - void - - parseString - - (string $string) -
    - -
      -
    • - string - $string
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXSerializer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXSerializer.html deleted file mode 100755 index 1e682978..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/TriXSerializer.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Docs For Class TriXSerializer - - - - -
    -

    Class TriXSerializer

    - - -
    -
    Description
    - -
    - -

    Temporary implementation of a TriX-Serializer

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: TriXSerializer.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/TriXSerializer.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - TriXSerializer - TriXSerializer - (GraphSet &$graphSet) -
    - -
    - void - serializeToFile - (string $fileName) -
    - -
    - string - &serializeToString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor TriXSerializer (line 34) -
    - - -

    Constructor Needs a reference to a graphSet

    -
      -
    • access: public
    • -
    - -
    - TriXSerializer - - TriXSerializer - - (GraphSet &$graphSet) -
    - -
      -
    • - GraphSet - &$graphSet
    • -
    - - -
    - -
    - -
    - serializeToFile (line 56) -
    - - -

    Serialize the dataset to a TriX string and save in file

    -
      -
    • access: public
    • -
    - -
    - void - - serializeToFile - - (string $fileName) -
    - -
      -
    • - string - $fileName
    • -
    - - -
    - -
    - -
    - serializeToString (line 45) -
    - - -

    Serialize the dataset to a TriX string

    -
      -
    • access: public
    • -
    - -
    - string - - &serializeToString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Dataset.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Dataset.php.html deleted file mode 100755 index 62dbf74a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Dataset.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Dataset.php - - - - -
    -

    /dataset/Dataset.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Dataset - - Dataset implementation. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetDb.php.html deleted file mode 100755 index 59e85cbb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetDb.php.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - Docs for page DatasetDb.php - - - - -
    -

    /dataset/DatasetDb.php

    - - -
    -
    Description
    - -
    - -

    Persistent implementation of a Dataset in a database.

    -

    A RDF dataset is a collection of named RDF graphs.

    -
      -
    • filesource: Source Code for this file
    • -
    • access: public
    • -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: _dataset---DatasetDb.php.html 310 2006-06-26 12:34:22Z tgauss $
    • -
    - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DatasetDb - - Dataset implementation. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.PACKAGE_DBASE) - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Mon, 26 Jun 2006 14:25:20 +0200 by phpDocumentor 1.3.0RC6 -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetMem.php.html deleted file mode 100755 index cb74f97e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---DatasetMem.php.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page DatasetMem.php - - - - -
    -

    /dataset/DatasetMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DatasetMem - - In-memory implementation of a RDF dataset. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/Dataset.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/NamedGraphMem.php') - (line 3) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/MemModel.php') - (line 4) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsDb.php.html deleted file mode 100755 index c172848a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsDb.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorAllGraphsDb.php - - - - -
    -

    /dataset/IteratorAllGraphsDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorAllGraphsDb - - Implementation of a Graph iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsMem.php.html deleted file mode 100755 index c5aa4a66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorAllGraphsMem.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorAllGraphsMem.php - - - - -
    -

    /dataset/IteratorAllGraphsMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorAllGraphsMem - - Implementation of a Graph iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsDb.php.html deleted file mode 100755 index 571d83ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsDb.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IteratorFindQuadsDb.php - - - - -
    -

    /dataset/IteratorFindQuadsDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorFindQuadsDb - - Implementation of a quad iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsMem.php.html deleted file mode 100755 index 5d7d70b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---IteratorFindQuadsMem.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page IteratorFindQuadsMem.php - - - - -
    -

    /dataset/IteratorFindQuadsMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IteratorFindQuadsMem - - Implementation of a quad iterator. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'dataset/Quad.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphDb.php.html deleted file mode 100755 index 860eecd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphDb.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page NamedGraphDb.php - - - - -
    -

    /dataset/NamedGraphDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NamedGraphDb - - Persistent NamedGraph implementation that extends a DbModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphMem.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphMem.php.html deleted file mode 100755 index f70aa51f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---NamedGraphMem.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page NamedGraphMem.php - - - - -
    -

    /dataset/NamedGraphMem.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NamedGraphMem - - NamedGraph implementation that extends a MemModel with a name. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/MemModel.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Quad.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Quad.php.html deleted file mode 100755 index 744eb99a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_dataset---Quad.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Quad.php - - - - -
    -

    /dataset/Quad.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Quad - - A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXParser.php.html deleted file mode 100755 index b960492f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TriXParser.php - - - - -
    -

    /syntax/TriXParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - TriXParser - - Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXSerializer.php.html deleted file mode 100755 index 4ff546ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/dataset/_syntax---TriXSerializer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TriXSerializer.php - - - - -
    -

    /syntax/TriXSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - TriXSerializer - - Temporary implementation of a TriX-Serializer -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex.html deleted file mode 100755 index 8a720b41..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex.html +++ /dev/null @@ -1,14922 +0,0 @@ - - - - - - - - - - - - -

    Full index

    -

    Package indexes

    - -
    -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - x - y - _ -
    - - -
    -
    a
    - -
    -
    -
    -
    - $accept -
    -
    -
    Snoopy::$accept in Snoopy.class.inc
    -
    -
    - $agent -
    -
    -
    Snoopy::$agent in Snoopy.class.inc
    -
    -
    - $anon -
    -
    -
    N3Serializer::$anon in N3Serializer.php
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arPrepared -
    -
    -
    SparqlEngineDb::$arPrepared in SparqlEngineDb.php
    -
    Prepared SQL statements are stored in here.
    -
    -
    - $arrOutput -
    -
    -
    SparqlResultParser::$arrOutput in SparqlResultParser.php
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - ABOUT -
    -
    -
    RDF_RES::ABOUT() in RDF_RES.php
    -
    -
    - ABOUT -
    -
    -
    RDF::ABOUT() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF::ABOUT_EACH() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF_RES::ABOUT_EACH() in RDF_RES.php
    -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABSTRACT_ -
    -
    -
    DC::ABSTRACT_() in DC_C.php
    -
    -
    - ABSTRACT_ -
    -
    -
    DC_RES::ABSTRACT_() in DC_RES.php
    -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF_RES::ACCOUNT_NAME() in FOAF_RES.php
    -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF::ACCOUNT_NAME() in FOAF_C.php
    -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - add -
    -
    -
    InfModel::add() in InfModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    MemModel::add() in MemModel.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelF::add() in InfModelF.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelB::add() in InfModelB.php
    -
    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    -
    -
    - add -
    -
    -
    ResContainer::add() in ResContainer.php
    -
    Add a new value to a container.
    -
    -
    - add -
    -
    -
    ResList::add() in ResList.php
    -
    Add the given value to the end of the list.
    -
    -
    - add -
    -
    -
    DbModel::add() in DbModel.php
    -
    Add a new triple to this DbModel.
    -
    -
    - add -
    -
    -
    ResModel::add() in ResModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - addAll -
    -
    -
    DatasetMem::addAll() in DatasetMem.php
    -
    Adds all named graphs of the other dataset to this dataset.
    -
    -
    - addAll -
    -
    -
    DatasetDb::addAll() in DatasetDb.php
    -
    Add all named graphs of the other dataset to this dataset.
    -
    -
    - addAtIndex -
    -
    -
    ResSeq::addAtIndex() in ResSeq.php
    -
    Insert a new member into the sequence at the specified position.
    -
    -
    - addComment -
    -
    -
    OntResource::addComment() in OntResource.php
    -
    Add the given comment to this resource.
    -
    -
    - addConstraint -
    -
    -
    GraphPattern::addConstraint() in GraphPattern.php
    -
    Adds a Constraint to the GraphPattern.
    -
    -
    - addConstructGraphPattern -
    -
    - -
    Adds a construct graph pattern to the query.
    -
    -
    - addDefaultGraph -
    -
    - -
    Adds a default graph to the query object.
    -
    -
    - addDomain -
    -
    -
    OntProperty::addDomain() in OntProperty.php
    -
    Add a resource representing the domain of this property.
    -
    -
    - addExpression -
    -
    -
    Constraint::addExpression() in Constraint.php
    -
    Adds an expression string.
    -
    -
    - addFrom -
    -
    -
    Query::addFrom() in Query.php
    -
    Adds a graphuri to the from part.
    -
    -
    - addFromNamed -
    -
    - -
    Adds a graphuri to the from named part.
    -
    -
    - addGraphPattern -
    -
    - -
    Adds a graph pattern to the result part.
    -
    -
    - addIsDefinedBy -
    -
    - -
    Add a resource that is declared to provide a definition of this resource.
    -
    -
    - addLabelProperty -
    -
    - -
    Add the given Label to this resource
    -
    -
    - addModel -
    -
    -
    InfModelF::addModel() in InfModelF.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    ResModel::addModel() in ResModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    MemModel::addModel() in MemModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    DbModel::addModel() in DbModel.php
    -
    Add the given model to this DbModel.
    -
    -
    - addNamedGraph -
    -
    -
    ClientQuery::addNamedGraph() in ClientQuery.php
    -
    Adds a named graph to the query object.
    -
    -
    - addNamedGraph -
    -
    - -
    Adds a NamedGraph to the set.
    -
    -
    - addNamedGraph -
    -
    -
    DatasetMem::addNamedGraph() in DatasetMem.php
    -
    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    -
    -
    - addNamespace -
    -
    -
    ResModel::addNamespace() in ResModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    -
    MemModel::addNamespace() in MemModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    - -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespacePrefix -
    -
    - -
    Adds a new prefix/namespace combination.
    -
    -
    - addNSPrefix -
    -
    -
    N3Serializer::addNSPrefix() in N3Serializer.php
    -
    Adds a new namespace prefix to use.
    -
    -
    - addOptional -
    -
    -
    GraphPattern::addOptional() in GraphPattern.php
    -
    Adds a pointer to an optional graphPattern.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addPrefix -
    -
    -
    Query::addPrefix() in Query.php
    -
    Adds a prefix to the list of prefixes.
    -
    -
    - addProperty -
    -
    -
    OntResource::addProperty() in OntResource.php
    -
    Add a property to this resource.
    -
    -
    - addProperty -
    -
    -
    ResResource::addProperty() in ResResource.php
    -
    Add a property to this resource.
    -
    -
    - addQuad -
    -
    -
    DatasetMem::addQuad() in DatasetMem.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addQuad -
    -
    -
    DatasetDb::addQuad() in DatasetDb.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addRange -
    -
    -
    OntProperty::addRange() in OntProperty.php
    -
    Add a resource representing the range of this property.
    -
    -
    - addRDFType -
    -
    -
    OntResource::addRDFType() in OntResource.php
    -
    Add the given class as one of the rdf:type's for this resource.
    -
    -
    - addSeeAlso -
    -
    -
    OntResource::addSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource.
    -
    -
    - addSubClass -
    -
    -
    OntClass::addSubClass() in OntClass.php
    -
    Add a sub-class of this class.
    -
    -
    - addSubProperty -
    -
    - -
    Add a sub-property of this property.
    -
    -
    - addSuperClass -
    -
    - -
    Add a super-class of this class.
    -
    -
    - addSuperProperty -
    -
    - -
    Add a super-property of this property.
    -
    -
    - addTriplePattern -
    -
    - -
    Adds a List of QueryTriples to the GraphPattern.
    -
    -
    - addUnion -
    -
    -
    GraphPattern::addUnion() in GraphPattern.php
    -
    Adds a pointer to a union graphPattern.
    -
    -
    - addVar -
    -
    -
    Query::addVar() in Query.php
    -
    Adds a new variable to the variable list.
    -
    -
    - addVariable -
    -
    - -
    Adds a variable to the list of result variables.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Alias for the method add().
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    -
    -
    - ADODB_DB_DRIVER -
    -
    -
    ADODB_DB_DRIVER in constants.php
    -
    -
    - ADODB_DB_HOST -
    -
    -
    ADODB_DB_HOST in constants.php
    -
    -
    - ADODB_DB_NAME -
    -
    -
    ADODB_DB_NAME in constants.php
    -
    -
    - ADODB_DB_PASSWORD -
    -
    -
    ADODB_DB_PASSWORD in constants.php
    -
    -
    - ADODB_DB_USER -
    -
    -
    ADODB_DB_USER in constants.php
    -
    -
    - ADODB_DEBUG_MODE -
    -
    -
    ADODB_DEBUG_MODE in constants.php
    -
    -
    - ADR -
    -
    -
    VCARD::ADR() in VCARD_C.php
    -
    -
    - ADR -
    -
    -
    VCARD_RES::ADR() in VCARD_RES.php
    -
    -
    - ADRPROPERTIES -
    -
    -
    VCARD::ADRPROPERTIES() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    - -
    -
    - ADRTYPES -
    -
    -
    VCARD_RES::ADRTYPES() in VCARD_RES.php
    -
    -
    - ADRTYPES -
    -
    -
    VCARD::ADRTYPES() in VCARD_C.php
    -
    -
    - AGENT -
    -
    -
    FOAF::AGENT() in FOAF_C.php
    -
    -
    - AGENT -
    -
    -
    VCARD::AGENT() in VCARD_C.php
    -
    -
    - AGENT -
    -
    -
    FOAF_RES::AGENT() in FOAF_RES.php
    -
    -
    - AGENT -
    -
    -
    VCARD_RES::AGENT() in VCARD_RES.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF::AIM_CHAT_ID() in FOAF_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF_RES::AIM_CHAT_ID() in FOAF_RES.php
    -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    -
    OWLVocabulary::ALL_DIFFERENT() in OWLVocabulary.php
    -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALT -
    -
    -
    RDF::ALT() in RDF_C.php
    -
    -
    - ALT -
    -
    -
    RDF_RES::ALT() in RDF_RES.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC_RES::ALTERNATIVE() in DC_RES.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC::ALTERNATIVE() in DC_C.php
    -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - append -
    -
    -
    ResList::append() in ResList.php
    -
    Answer a new list that is formed by adding each element of
    -
    -
    - append -
    -
    -
    MagpieRSS::append() in rss_parse.inc
    -
    -
    - append_content -
    -
    - -
    -
    - array_change_key_case -
    -
    -
    array_change_key_case() in rss_parse.inc
    -
    -
    - asClass -
    -
    -
    OntResource::asClass() in OntResource.php
    -
    Answer a view of this resource as a class
    -
    -
    - asIndividual -
    -
    -
    OntResource::asIndividual() in OntResource.php
    -
    Answer a view of this resource as an Individual
    -
    -
    - asOntProperty -
    -
    -
    OntResource::asOntProperty() in OntResource.php
    -
    Answer a view of this resource as a property
    -
    -
    - ATOM -
    -
    -
    ATOM in ATOM_C.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - ATOM -
    -
    -
    ATOM in rss_parse.inc
    -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_NS -
    -
    -
    ATOM_NS in constants.php
    -
    -
    - ATOM_RES -
    -
    -
    ATOM_RES in ATOM_RES.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - AUDIENCE -
    -
    -
    DC_RES::AUDIENCE() in DC_RES.php
    -
    -
    - AUDIENCE -
    -
    -
    DC::AUDIENCE() in DC_C.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM_RES::AUTHOR() in ATOM_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM::AUTHOR() in ATOM_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC_RES::AVAILABLE() in DC_RES.php
    -
    -
    - AVAILABLE -
    -
    -
    DC::AVAILABLE() in DC_C.php
    -
    -
    - ATOM_C.php -
    -
    -
    ATOM_C.php in ATOM_C.php
    -
    -
    - ATOM_RES.php -
    -
    -
    ATOM_RES.php in ATOM_RES.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $base -
    -
    -
    Query::$base in Query.php
    -
    The BASE part of the SPARQL query.
    -
    -
    - $BASE_CACHE -
    -
    -
    RSSCache::$BASE_CACHE in rss_cache.inc
    -
    -
    - $bncounter -
    -
    -
    SparqlResultParser::$bncounter in SparqlResultParser.php
    -
    -
    - $bNode -
    -
    -
    N3Parser::$bNode in N3Parser.php
    -
    -
    - $bnodeCounter -
    -
    - -
    Blanknode counter.
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bRealPrepared -
    -
    -
    SparqlEngineDb::$bRealPrepared in SparqlEngineDb.php
    -
    If the prepared statement is really prepared, or if we just emulate it.
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BAG -
    -
    -
    RDF::BAG() in RDF_C.php
    -
    -
    - BAG -
    -
    -
    RDF_RES::BAG() in RDF_RES.php
    -
    -
    - BAG_ID -
    -
    -
    RDF_RES::BAG_ID() in RDF_RES.php
    -
    -
    - BAG_ID -
    -
    -
    RDF::BAG_ID() in RDF_C.php
    -
    -
    - balanceTree -
    -
    -
    SparqlParser::balanceTree() in SparqlParser.php
    -
    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF_RES::BASED_NEAR() in FOAF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF::BASED_NEAR() in FOAF_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD::BDAY() in VCARD_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD_RES::BDAY() in VCARD_RES.php
    -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BlankNode -
    -
    -
    BlankNode::BlankNode() in Blanknode.php
    -
    Constructor You can supply a label or You supply a model and a unique ID is gernerated.
    -
    -
    - BlankNode -
    -
    -
    BlankNode in Blanknode.php
    -
    An RDF blank node.
    -
    -
    - bNodeCheck -
    -
    -
    SparqlParser::bNodeCheck() in SparqlParser.php
    -
    Checks if $token is a Blanknode.
    -
    -
    - BNODE_PREFIX -
    -
    -
    BNODE_PREFIX in constants.php
    -
    -
    - BOX -
    -
    -
    DC_RES::BOX() in DC_RES.php
    -
    -
    - BOX -
    -
    -
    DC::BOX() in DC_C.php
    -
    -
    - buildSortArray -
    -
    -
    ModelComparator::buildSortArray() in ModelComparator.php
    -
    Builds a sorted array.
    -
    -
    - buildVarmap -
    -
    -
    SparqlEngine::buildVarmap() in SparqlEngine.php
    -
    Sorts the result table.
    -
    -
    - Blanknode.php -
    -
    -
    Blanknode.php in Blanknode.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $channel -
    -
    -
    MagpieRSS::$channel in rss_parse.inc
    -
    -
    - $constraint -
    -
    -
    GraphPattern::$constraint in GraphPattern.php
    -
    -
    - $constructPattern -
    -
    - -
    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.
    -
    -
    - $cookies -
    -
    -
    Snoopy::$cookies in Snoopy.class.inc
    -
    -
    - $counter -
    -
    -
    SparqlResultParser::$counter in SparqlResultParser.php
    -
    -
    - $curl_path -
    -
    -
    Snoopy::$curl_path in Snoopy.class.inc
    -
    -
    - $current_item -
    -
    -
    MagpieRSS::$current_item in rss_parse.inc
    -
    -
    - $current_literal -
    -
    -
    SparqlResultParser::$current_literal in SparqlResultParser.php
    -
    -
    - $current_namespace -
    -
    - -
    -
    - cache_age -
    -
    -
    RSSCache::cache_age() in rss_cache.inc
    -
    -
    - CARDINALITY -
    -
    -
    OWL_RES::CARDINALITY() in OWL_RES.php
    -
    -
    - CARDINALITY -
    -
    -
    OWLVocabulary::CARDINALITY() in OWLVocabulary.php
    -
    -
    - CARDINALITY -
    -
    -
    OWL::CARDINALITY() in OWL_C.php
    -
    -
    - CASE_LOWER -
    -
    -
    CASE_LOWER in rss_parse.inc
    -
    -
    - CASE_UPPER -
    -
    -
    CASE_UPPER in rss_parse.inc
    -
    -
    - CATEGORIES -
    -
    -
    VCARD::CATEGORIES() in VCARD_C.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD_RES::CATEGORIES() in VCARD_RES.php
    -
    -
    - channel -
    -
    -
    RssParser::channel() in RssParser.php
    -
    Parses the rss channel/ atom feed.
    -
    -
    - CHANNEL -
    -
    -
    RSS_RES::CHANNEL() in RSS_RES.php
    -
    -
    - CHANNEL -
    -
    -
    RSS::CHANNEL() in RSS_C.php
    -
    -
    - checkDtypeLang -
    -
    -
    SparqlParser::checkDtypeLang() in SparqlParser.php
    -
    Checks if there is a datatype given and appends it to the node.
    -
    -
    - checkEntailment -
    -
    - -
    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.
    -
    -
    - checkIntBindings -
    -
    - -
    Checks it there are internal bindings between variables.
    -
    -
    - checkTrigger -
    -
    - -
    Checks, if the statement satisfies the trigger.
    -
    -
    - check_cache -
    -
    -
    RSSCache::check_cache() in rss_cache.inc
    -
    -
    - clear -
    -
    -
    DatasetMem::clear() in DatasetMem.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - clear -
    -
    -
    DatasetDb::clear() in DatasetDb.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - ClientQuery -
    -
    -
    ClientQuery in ClientQuery.php
    -
    ClientQuery Object to run a SPARQL Query against a SPARQL server.
    -
    -
    - close -
    -
    -
    DbModel::close() in DbModel.php
    -
    Close this DbModel
    -
    -
    - close -
    -
    -
    MemModel::close() in MemModel.php
    -
    Close the MemModel and free up resources held.
    -
    -
    - close -
    -
    -
    DbStore::close() in DbStore.php
    -
    Close the DbStore.
    -
    -
    - COLLECTION -
    -
    -
    DC_RES::COLLECTION() in DC_RES.php
    -
    -
    - COLLECTION -
    -
    -
    DC::COLLECTION() in DC_C.php
    -
    -
    - COMMENT -
    -
    -
    RDFS_RES::COMMENT() in RDFS_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS::COMMENT() in RDFS_C.php
    -
    -
    - COMMENT -
    -
    -
    RdfsVocabulary::COMMENT() in RdfsVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMMENT -
    -
    -
    OWLVocabulary::COMMENT() in OWLVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - compare -
    -
    -
    ModelComparator::compare() in ModelComparator.php
    -
    Compares two models.
    -
    -
    - compare -
    -
    -
    Statement::compare() in Statement.php
    -
    Compares two statements and returns integer less than, equal to, or greater than zero.
    -
    -
    - compareTriples -
    -
    -
    ModelComparator::compareTriples() in ModelComparator.php
    -
    Compares the Triples in the lists.
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    -
    OWLVocabulary::COMPLEMENT_OF() in OWLVocabulary.php
    -
    -
    - concat -
    -
    -
    MagpieRSS::concat() in rss_parse.inc
    -
    -
    - concatenate -
    -
    -
    ResList::concatenate() in ResList.php
    -
    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.
    -
    -
    - configSortModel -
    -
    - -
    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.
    -
    -
    - configUseAttributes -
    -
    - -
    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.
    -
    -
    - configUseEntities -
    -
    - -
    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.
    -
    -
    - configUseQnames -
    -
    - -
    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.
    -
    -
    - configUseXmlDeclaration -
    -
    - -
    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.
    -
    -
    - CONFORMS_TO -
    -
    -
    DC::CONFORMS_TO() in DC_C.php
    -
    -
    - CONFORMS_TO -
    -
    -
    DC_RES::CONFORMS_TO() in DC_RES.php
    -
    -
    - cons -
    -
    -
    ResList::cons() in ResList.php
    -
    Return a reference to a new list cell whose head is value and whose tail is this list.
    -
    -
    - constants.php -
    -
    -
    constants.php in constants.php
    -
    -
    - Constraint -
    -
    -
    Constraint in Constraint.php
    -
    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - CONTAINER -
    -
    -
    RDFS_RES::CONTAINER() in RDFS_RES.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS::CONTAINER() in RDFS_C.php
    -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - contains -
    -
    -
    ResContainer::contains() in ResContainer.php
    -
    Determine whether the container contains a value
    -
    -
    - contains -
    -
    -
    ResModel::contains() in ResModel.php
    -
    Tests if the Model contains the given statement.
    -
    -
    - contains -
    -
    -
    ResList::contains() in ResList.php
    -
    Answer true if the given node appears as the value of a value of any of the cells of this list.
    -
    -
    - contains -
    -
    -
    MemModel::contains() in MemModel.php
    -
    Tests if the MemModel contains the given triple.
    -
    -
    - contains -
    -
    -
    InfModelB::contains() in InfModelB.php
    -
    Tests if the Model contains the given triple.
    -
    -
    - contains -
    -
    -
    DbModel::contains() in DbModel.php
    -
    Check if the DbModel contains the given statement.
    -
    -
    - containsAll -
    -
    -
    ResModel::containsAll() in ResModel.php
    -
    Determine if all of the statements in a model are also contained in this model.
    -
    -
    - containsAll -
    -
    -
    DbModel::containsAll() in DbModel.php
    -
    Determine if all of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAll -
    -
    -
    MemModel::containsAll() in MemModel.php
    -
    Determine if all of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAny -
    -
    -
    DbModel::containsAny() in DbModel.php
    -
    Determine if any of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAny -
    -
    -
    ResModel::containsAny() in ResModel.php
    -
    Determine if any of the statements in a model are also contained in this model.
    -
    -
    - containsAny -
    -
    -
    MemModel::containsAny() in MemModel.php
    -
    Determine if any of the statements in a model are also contained in this MemModel.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsQuad -
    -
    -
    DatasetMem::containsQuad() in DatasetMem.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsQuad -
    -
    -
    DatasetDb::containsQuad() in DatasetDb.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsResource -
    -
    - -
    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    -
    -
    - CONTENT -
    -
    -
    ATOM_RES::CONTENT() in ATOM_RES.php
    -
    -
    - CONTENT -
    -
    -
    ATOM::CONTENT() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM::CONTRIBUTOR() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM_RES::CONTRIBUTOR() in ATOM_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC::CONTRIBUTOR() in DC_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC_RES::CONTRIBUTOR() in DC_RES.php
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - copy -
    -
    -
    ResList::copy() in ResList.php
    -
    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM_RES::COPYRIGHT() in ATOM_RES.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM::COPYRIGHT() in ATOM_C.php
    -
    -
    - countGraphs -
    -
    -
    DatasetDb::countGraphs() in DatasetDb.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countGraphs -
    -
    -
    DatasetMem::countGraphs() in DatasetMem.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countQuads -
    -
    -
    DatasetMem::countQuads() in DatasetMem.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countQuads -
    -
    -
    DatasetDb::countQuads() in DatasetDb.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countResults -
    -
    -
    RdqlResultIterator::countResults() in RdqlResultIterator.php
    -
    Returns the number of results.
    -
    -
    - COUNTRY -
    -
    -
    VCARD_RES::COUNTRY() in VCARD_RES.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD::COUNTRY() in VCARD_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC::COVERAGE() in DC_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC_RES::COVERAGE() in DC_RES.php
    -
    -
    - createAlt -
    -
    -
    ResModel::createAlt() in ResModel.php
    -
    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBag -
    -
    -
    ResModel::createBag() in ResModel.php
    -
    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - CREATED -
    -
    -
    DC_RES::CREATED() in DC_RES.php
    -
    -
    - CREATED -
    -
    -
    DC::CREATED() in DC_C.php
    -
    -
    - CREATED -
    -
    -
    ATOM::CREATED() in ATOM_C.php
    -
    -
    - CREATED -
    -
    -
    ATOM_RES::CREATED() in ATOM_RES.php
    -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createGraph -
    -
    -
    DatasetDb::createGraph() in DatasetDb.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    -
    -
    - createGraph -
    -
    -
    DatasetMem::createGraph() in DatasetMem.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    -
    -
    - createIndividual -
    -
    - -
    Answer a resource that represents an Individual node in this model.
    -
    -
    - createInstance -
    -
    - -
    Answer a resource that represents an instance of this OntClass and Individual node in this model.
    -
    -
    - createList -
    -
    -
    ResModel::createList() in ResModel.php
    -
    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createLiteral -
    -
    - -
    Create an untyped literal from a String value with a specified language.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createOntClass -
    -
    - -
    Answer a resource that represents a class description node in this model.
    -
    -
    - createOntProperty -
    -
    - -
    Answer a resource that represents an OntProperty node in this model.
    -
    -
    - createOrd -
    -
    -
    RDFUtil::createOrd() in RdfUtil.php
    -
    Creates ordinal RDF resource out of an integer.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createProperty -
    -
    - -
    Create a new Property associated with this model.
    -
    -
    - createResource -
    -
    - -
    Create a new resource associated with this model.
    -
    -
    - createSeq -
    -
    -
    ResModel::createSeq() in ResModel.php
    -
    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTables -
    -
    - -
    Create tables and indexes for the given database type.
    -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypedLiteral -
    -
    - -
    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.
    -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createValue -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - CREATE_MODEL_WITHOUT_DUPLICATES -
    -
    - -
    -
    - create_parser -
    -
    - -
    return XML parser, and possibly re-encoded source
    -
    -
    - CREATOR -
    -
    -
    DC::CREATOR() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC_RES::CREATOR() in DC_RES.php
    -
    -
    - current -
    -
    -
    IteratorFindQuadsMem::current() in IteratorFindQuadsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    StatementIterator::current() in StatementIterator.php
    -
    Returns the current statement.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsDb::current() in IteratorAllGraphsDb.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    FindIterator::current() in FindIterator.php
    -
    Returns the current matching statement.
    -
    -
    - current -
    -
    -
    IteratorFindQuadsDb::current() in IteratorFindQuadsDb.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsMem::current() in IteratorAllGraphsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    ResIterator::current() in ResIterator.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    RdqlResultIterator::current() in RdqlResultIterator.php
    -
    Returns the current result.
    -
    -
    - current -
    -
    -
    IterFind::current() in IterFind.php
    -
    Returns the current item
    -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - ClientQuery.php -
    -
    -
    ClientQuery.php in ClientQuery.php
    -
    -
    - Constraint.php -
    -
    -
    Constraint.php in Constraint.php
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $DAML_NS -
    -
    -
    N3Parser::$DAML_NS in N3Parser.php
    -
    -
    - $dataset -
    -
    -
    SparqlEngineDb::$dataset in SparqlEngineDb.php
    -
    RDF dataset object.
    -
    -
    - $dataset -
    -
    -
    SparqlEngine::$dataset in SparqlEngine.php
    -
    The RDF Dataset.
    -
    -
    - $dbConn -
    -
    -
    SparqlEngineDb::$dbConn in SparqlEngineDb.php
    -
    Database connection object.
    -
    -
    - $debug -
    -
    -
    NTripleSerializer::$debug in NTripleSerializer.php
    -
    -
    - $debug -
    -
    -
    N3Parser::$debug in N3Parser.php
    -
    -
    - $debug -
    -
    -
    N3Serializer::$debug in N3Serializer.php
    -
    -
    - $default -
    -
    -
    ClientQuery::$default in ClientQuery.php
    -
    -
    - $done -
    -
    -
    N3Serializer::$done in N3Serializer.php
    -
    -
    - $dtype -
    -
    -
    SparqlResultParser::$dtype in SparqlResultParser.php
    -
    -
    - DATASET -
    -
    -
    DC_RES::DATASET() in DC_RES.php
    -
    -
    - DATASET -
    -
    -
    DC::DATASET() in DC_C.php
    -
    -
    - Dataset -
    -
    -
    Dataset in Dataset.php
    -
    Dataset implementation.
    -
    -
    - Dataset.php -
    -
    -
    Dataset.php in Dataset.php
    -
    -
    - DatasetDb.php -
    -
    -
    DatasetDb.php in DatasetDb.php
    -
    -
    - DatasetMem.php -
    -
    -
    DatasetMem.php in DatasetMem.php
    -
    -
    - DatasetP.php -
    -
    -
    DatasetP.php in DatasetP.php
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb in DatasetDb.php
    -
    Dataset implementation.
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb::DatasetDb() in DatasetDb.php
    -
    Constructor You can supply a Dataset name.
    -
    -
    - datasetExists -
    -
    - -
    Check if the Dataset with the given $datasetName is already stored in the database
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem in DatasetMem.php
    -
    In-memory implementation of a RDF dataset.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem::DatasetMem() in DatasetMem.php
    -
    Constructor.
    -
    -
    - DATATYPE -
    -
    -
    RDF_RES::DATATYPE() in RDF_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDF::DATATYPE() in RDF_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWLVocabulary::DATATYPE() in OWLVocabulary.php
    -
    -
    - DATATYPE -
    -
    -
    OWL_RES::DATATYPE() in OWL_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS::DATATYPE() in RDFS_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWL::DATATYPE() in OWL_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS_RES::DATATYPE() in RDFS_RES.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_SHORTCUT_PREFIX -
    -
    -
    DATATYPE_SHORTCUT_PREFIX in constants.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWLVocabulary::DATA_RANGE() in OWLVocabulary.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL::DATA_RANGE() in OWL_C.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL_RES::DATA_RANGE() in OWL_RES.php
    -
    -
    - DATE -
    -
    -
    DC_RES::DATE() in DC_RES.php
    -
    -
    - DATE -
    -
    -
    DC::DATE() in DC_C.php
    -
    -
    - dateTime -
    -
    -
    dateTime() in FilterFunctions.php
    -
    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.
    -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DBMODEL -
    -
    -
    DBMODEL in constants.php
    -
    -
    - DbModel -
    -
    -
    DbModel::DbModel() in DbModel.php
    -
    Constructor Do not call this directly.
    -
    -
    - DbModel -
    -
    -
    DbModel in DbModel.php
    -
    This class provides methods for manipulating DbModels from DbStore.
    -
    -
    - DbStore -
    -
    -
    DbStore::DbStore() in DbStore.php
    -
    Constructor: Set the database connection with the given parameters.
    -
    -
    - DbStore -
    -
    -
    DbStore in DbStore.php
    -
    DbStore is a persistent store of RDF data using relational database technology.
    -
    -
    - DC -
    -
    -
    DC in DC_C.php
    -
    Dublin Core Vocabulary (Resource)
    -
    -
    - dc -
    -
    -
    RssParser::dc() in RssParser.php
    -
    Adds the dc namespace.
    -
    -
    - DCMITYPE_NS -
    -
    -
    DCMITYPE_NS in constants.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC_RES::DCMI_TYPE() in DC_RES.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC::DCMI_TYPE() in DC_C.php
    -
    -
    - DCTERM_NS -
    -
    -
    DCTERM_NS in constants.php
    -
    -
    - DC_NS -
    -
    -
    DC_NS in constants.php
    -
    -
    - DC_RES -
    -
    -
    DC_RES in DC_RES.php
    -
    Dublin Core Vocabulary (ResResource)
    -
    -
    - debug -
    -
    -
    RSSCache::debug() in rss_cache.inc
    -
    -
    - debug -
    -
    -
    debug() in rss_fetch.inc
    -
    -
    - DEFAULT_ALGORITHM -
    -
    -
    DEFAULT_ALGORITHM in constants.php
    -
    -
    - DEFAULT_ENCODING -
    -
    -
    DEFAULT_ENCODING in constants.php
    -
    -
    - delete -
    -
    -
    DbModel::delete() in DbModel.php
    -
    Remove this DbModel from database and clean up.
    -
    -
    - DEPICTION -
    -
    -
    FOAF::DEPICTION() in FOAF_C.php
    -
    -
    - DEPICTION -
    -
    -
    FOAF_RES::DEPICTION() in FOAF_RES.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF::DEPICTS() in FOAF_C.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF_RES::DEPICTS() in FOAF_RES.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - describeGraph -
    -
    - -
    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC_RES::DESCRIPTION() in DC_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS_RES::DESCRIPTION() in RSS_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC::DESCRIPTION() in DC_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF::DESCRIPTION() in RDF_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF_RES::DESCRIPTION() in RDF_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS::DESCRIPTION() in RSS_C.php
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    -
    OWLVocabulary::DIFFERENT_FROM() in OWLVocabulary.php
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIR_SEP -
    -
    -
    DIR_SEP in rss_fetch.inc
    -
    -
    - DISJOINT_WITH -
    -
    -
    OWLVocabulary::DISJOINT_WITH() in OWLVocabulary.php
    -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - distinct -
    -
    -
    SparqlEngine::distinct() in SparqlEngine.php
    -
    Eliminates duplicate results.
    -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF_RES::DNA_CHECKSUM() in FOAF_RES.php
    -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF::DNA_CHECKSUM() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF_RES::DOCUMENT() in FOAF_RES.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF::DOCUMENT() in FOAF_C.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS_RES::DOMAIN() in RDFS_RES.php
    -
    -
    - DOMAIN -
    -
    -
    OWLVocabulary::DOMAIN() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - DOMAIN -
    -
    -
    RDFS::DOMAIN() in RDFS_C.php
    -
    -
    - DOMAIN -
    -
    -
    RdfsVocabulary::DOMAIN() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - dtypeCheck -
    -
    -
    SparqlParser::dtypeCheck() in SparqlParser.php
    -
    Checks if the Node is a typed Literal.
    -
    -
    - DBase.php -
    -
    -
    DBase.php in DBase.php
    -
    -
    - DbModel.php -
    -
    -
    DbModel.php in DbModel.php
    -
    -
    - DbStore.php -
    -
    -
    DbStore.php in DbStore.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - DC.php -
    -
    -
    DC.php in DC.php
    -
    -
    - DC_C.php -
    -
    -
    DC_C.php in DC_C.php
    -
    -
    - DC_RES.php -
    -
    -
    DC_RES.php in DC_RES.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $encoding -
    -
    -
    MagpieRSS::$encoding in rss_parse.inc
    -
    -
    - $error -
    -
    -
    Snoopy::$error in Snoopy.class.inc
    -
    -
    - $ERROR -
    -
    -
    MagpieRSS::$ERROR in rss_parse.inc
    -
    -
    - $ERROR -
    -
    -
    RSSCache::$ERROR in rss_cache.inc
    -
    -
    - $expandlinks -
    -
    -
    Snoopy::$expandlinks in Snoopy.class.inc
    -
    -
    - $expression -
    -
    -
    Constraint::$expression in Constraint.php
    -
    The expression string.
    -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EMAIL -
    -
    -
    VCARD_RES::EMAIL() in VCARD_RES.php
    -
    -
    - EMAIL -
    -
    -
    VCARD::EMAIL() in VCARD_C.php
    -
    -
    - EMAIL -
    -
    -
    ATOM::EMAIL() in ATOM_C.php
    -
    -
    - EMAIL -
    -
    -
    ATOM_RES::EMAIL() in ATOM_RES.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD::EMAILTYPES() in VCARD_C.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD_RES::EMAILTYPES() in VCARD_RES.php
    -
    -
    - entail -
    -
    -
    InfRule::entail() in InfRule.php
    -
    Returns a infered InfStatement by evaluating the statement with the entailment rule.
    -
    -
    - entailStatement -
    -
    - -
    Entails a statement by recursively using the _entailStatementRec method.
    -
    -
    - ENTRY -
    -
    -
    ATOM_RES::ENTRY() in ATOM_RES.php
    -
    -
    - ENTRY -
    -
    -
    ATOM::ENTRY() in ATOM_C.php
    -
    -
    - equals -
    -
    -
    BlankNode::equals() in Blanknode.php
    -
    Checks if two blank nodes are equal.
    -
    -
    - equals -
    -
    -
    Quad::equals() in Quad.php
    -
    Checks if two quads are equal.
    -
    -
    - equals -
    -
    -
    Resource::equals() in Resource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    ResResource::equals() in ResResource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    Literal::equals() in Literal.php
    -
    Checks if ihe literal equals another literal.
    -
    -
    - equals -
    -
    -
    ResModel::equals() in ResModel.php
    -
    Checks if two models are equal.
    -
    -
    - equals -
    -
    -
    Statement::equals() in Statement.php
    -
    Checks if two statements are equal.
    -
    -
    - equals -
    -
    -
    DbModel::equals() in DbModel.php
    -
    Check if two models are equal.
    -
    -
    - equals -
    -
    -
    MemModel::equals() in MemModel.php
    -
    Checks if two models are equal.
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - error -
    -
    -
    MagpieRSS::error() in rss_parse.inc
    -
    -
    - error -
    -
    -
    error() in rss_fetch.inc
    -
    -
    - error -
    -
    -
    SparqlParser::error() in SparqlParser.php
    -
    Error reporting.
    -
    -
    - error -
    -
    -
    RSSCache::error() in rss_cache.inc
    -
    -
    - escapeValue -
    -
    -
    RDFUtil::escapeValue() in RdfUtil.php
    -
    Escapes < > and &
    -
    -
    - EVENT -
    -
    -
    DC::EVENT() in DC_C.php
    -
    -
    - EVENT -
    -
    -
    DC_RES::EVENT() in DC_RES.php
    -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - execute -
    -
    -
    SparqlEngineDb::execute() in SparqlEngineDb.php
    -
    Execute a prepared statement by filling it with variables
    -
    -
    - execute -
    -
    - -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - EXTADD -
    -
    -
    VCARD_RES::EXTADD() in VCARD_RES.php
    -
    -
    - EXTADD -
    -
    -
    VCARD::EXTADD() in VCARD_C.php
    -
    -
    - EXTENT -
    -
    -
    DC_RES::EXTENT() in DC_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC::EXTENT() in DC_C.php
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $feed_type -
    -
    -
    MagpieRSS::$feed_type in rss_parse.inc
    -
    -
    - $feed_version -
    -
    -
    MagpieRSS::$feed_version in rss_parse.inc
    -
    -
    - $fromNamedPart -
    -
    - -
    Contains the FROM NAMED part of the SPARQL query.
    -
    -
    - $fromPart -
    -
    -
    Query::$fromPart in Query.php
    -
    Contains the FROM part of the SPARQL query.
    -
    -
    - factory -
    -
    -
    SparqlEngine::factory() in SparqlEngine.php
    -
    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.
    -
    -
    - FAMILY -
    -
    -
    VCARD::FAMILY() in VCARD_C.php
    -
    -
    - FAMILY -
    -
    -
    VCARD_RES::FAMILY() in VCARD_RES.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF::FAMILY_NAME() in FOAF_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF_RES::FAMILY_NAME() in FOAF_RES.php
    -
    -
    - FEED -
    -
    -
    ATOM::FEED() in ATOM_C.php
    -
    -
    - FEED -
    -
    -
    ATOM_RES::FEED() in ATOM_RES.php
    -
    -
    - feed_cdata -
    -
    -
    MagpieRSS::feed_cdata() in rss_parse.inc
    -
    -
    - feed_end_element -
    -
    - -
    -
    - feed_start_element -
    -
    - -
    -
    - fetch -
    -
    -
    Snoopy::fetch() in Snoopy.class.inc
    -
    -
    - fetch_rss -
    -
    -
    fetch_rss() in rss_fetch.inc
    -
    -
    - file_name -
    -
    -
    RSSCache::file_name() in rss_cache.inc
    -
    -
    - fillConstraintString -
    -
    - -
    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function
    -
    -
    - filterPatterns -
    -
    -
    SparqlEngine::filterPatterns() in SparqlEngine.php
    -
    Filters the pattern results.
    -
    -
    - find -
    -
    -
    InfModelB::find() in InfModelB.php
    -
    General method to search for triples.
    -
    -
    - find -
    -
    -
    DbModel::find() in DbModel.php
    -
    General method to search for triples in the DbModel.
    -
    -
    - find -
    -
    -
    MemModel::find() in MemModel.php
    -
    General method to search for triples.
    -
    -
    - find -
    -
    -
    ResModel::find() in ResModel.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findCount -
    -
    -
    MemModel::findCount() in MemModel.php
    -
    Searches for triples and returns the number of matches.
    -
    -
    - findCount -
    -
    -
    DbModel::findCount() in DbModel.php
    -
    Search for triples and return the number of matches.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Search for triples and return the first matching statement.
    -
    -
    - findForward -
    -
    - -
    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - FindIterator -
    -
    -
    FindIterator in FindIterator.php
    -
    Iterator for traversing statements matching a searchpattern.
    -
    -
    - FindIterator -
    -
    -
    FindIterator::FindIterator() in FindIterator.php
    -
    Constructor
    -
    -
    - findRegex -
    -
    -
    MemModel::findRegex() in MemModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    DbModel::findRegex() in DbModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    InfModel::findRegex() in InfModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findTuplesMatchingOnePattern -
    -
    - -
    Finds Tuples matching one TriplePattern.
    -
    -
    - findVocabulary -
    -
    - -
    Return all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - FIRST -
    -
    -
    RDF_RES::FIRST() in RDF_RES.php
    -
    -
    - FIRST -
    -
    -
    RDF::FIRST() in RDF_C.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF::FIRST_NAME() in FOAF_C.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF_RES::FIRST_NAME() in FOAF_RES.php
    -
    -
    - fixNegationInFuncName -
    -
    - -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FIX_BLANKNODES -
    -
    -
    FIX_BLANKNODES in constants.php
    -
    -
    - FN -
    -
    -
    VCARD::FN() in VCARD_C.php
    -
    -
    - FN -
    -
    -
    VCARD_RES::FN() in VCARD_RES.php
    -
    -
    - FOAF -
    -
    -
    FOAF in FOAF_C.php
    -
    Friend of a Friend (FOAF) Vocabulary (Resource)
    -
    -
    - FOAF_NS -
    -
    -
    FOAF_NS in constants.php
    -
    -
    - FOAF_RES -
    -
    -
    FOAF_RES in FOAF_RES.php
    -
    Friend of a Friend (FOAF) Vocabulary (ResResource)
    -
    -
    - FORMAT -
    -
    -
    DC::FORMAT() in DC_C.php
    -
    -
    - FORMAT -
    -
    -
    DC_RES::FORMAT() in DC_RES.php
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNDED_BY -
    -
    -
    FOAF_RES::FUNDED_BY() in FOAF_RES.php
    -
    -
    - FUNDED_BY -
    -
    -
    FOAF::FUNDED_BY() in FOAF_C.php
    -
    -
    - FilterFunctions.php -
    -
    -
    FilterFunctions.php in FilterFunctions.php
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - FindIterator.php -
    -
    -
    FindIterator.php in FindIterator.php
    -
    -
    - FOAF.php -
    -
    -
    FOAF.php in FOAF.php
    -
    -
    - FOAF_C.php -
    -
    -
    FOAF_C.php in FOAF_C.php
    -
    -
    - FOAF_RES.php -
    -
    -
    FOAF_RES.php in FOAF_RES.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - $graphname -
    -
    -
    GraphPattern::$graphname in GraphPattern.php
    -
    Graphname. 0 if its in the default graph.
    -
    -
    - $graphPatternCounter -
    -
    - -
    GraphPattern counter.
    -
    -
    - GEEKCODE -
    -
    -
    FOAF::GEEKCODE() in FOAF_C.php
    -
    -
    - GEEKCODE -
    -
    -
    FOAF_RES::GEEKCODE() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF_RES::GENDER() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF::GENDER() in FOAF_C.php
    -
    -
    - GENERAL_PREFIX_BASE -
    -
    -
    GENERAL_PREFIX_BASE in constants.php
    -
    -
    - generateModel -
    -
    - -
    Generates a new MemModel from a URI, a file or from memory.
    -
    -
    - generateModel -
    -
    -
    GRDDLParser::generateModel() in GRDDLParser.php
    -
    generates a MemModel and creates the DomDocument.
    -
    -
    - generateModel -
    -
    - -
    Generate a new MemModel from an URI or file.
    -
    -
    - generateModel -
    -
    - -
    Main function
    -
    -
    - GENERATOR -
    -
    -
    ATOM_RES::GENERATOR() in ATOM_RES.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM::GENERATOR() in ATOM_C.php
    -
    -
    - GEO -
    -
    -
    VCARD::GEO() in VCARD_C.php
    -
    -
    - GEO -
    -
    -
    VCARD_RES::GEO() in VCARD_RES.php
    -
    -
    - get -
    -
    -
    ResList::get() in ResList.php
    -
    Returns the value of the list element at the specified position or null.
    -
    -
    - get -
    -
    -
    RSSCache::get() in rss_cache.inc
    -
    -
    - getAllVars -
    -
    -
    Query::getAllVars() in Query.php
    -
    Returns a list with all used variables.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getBase -
    -
    -
    Query::getBase() in Query.php
    -
    Returns the BASE part of the query.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.
    -
    -
    - getBaseURI -
    -
    -
    Model::getBaseURI() in Model.php
    -
    Return current baseURI.
    -
    -
    - getBaseURI -
    -
    -
    ResModel::getBaseURI() in ResModel.php
    -
    Return current baseURI.
    -
    -
    - getBlanknodeLabel -
    -
    - -
    Returns an unused Bnode label.
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getComment -
    -
    -
    OntResource::getComment() in OntResource.php
    -
    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    -
    -
    - getConstraint -
    -
    -
    GraphPattern::getConstraint() in GraphPattern.php
    -
    Returns a constraint if there is one false if not.
    -
    -
    - getConstructPattern -
    -
    - -
    Returns the construvtGraphPattern of the query if there is one.
    -
    -
    - getConstructPatternVariables -
    -
    - -
    Returns a list of variables used in the construct patterns.
    -
    -
    - getContentInArray -
    -
    - -
    Get all values in the list as an array of ResResources
    -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getDataset -
    -
    -
    SparqlEngine::getDataset() in SparqlEngine.php
    -
    -
    - getDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.
    -
    -
    - getDatasetMem -
    -
    -
    ModelFactory::getDatasetMem() in ModelFactory.php
    -
    Returns a NamedGraphSetMem.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatatype -
    -
    -
    Literal::getDatatype() in Literal.php
    -
    Returns the datatype of the literal.
    -
    -
    - getDatatype -
    -
    - -
    Returns the datatype of a variable if it is set.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getDbConn -
    -
    -
    DbModel::getDbConn() in DbModel.php
    -
    Returns the database connection object
    -
    -
    - getDbModel -
    -
    -
    ModelFactory::getDbModel() in ModelFactory.php
    -
    Returns a new DbModel using the database connection supplied by $dbStore.
    -
    -
    - getDbStore -
    -
    -
    ModelFactory::getDbStore() in ModelFactory.php
    -
    Returns a database connection with the given parameters.
    -
    -
    - getDefault -
    -
    -
    ResAlt::getDefault() in ResAlt.php
    -
    Return the default value for this resource
    -
    -
    - getDefaultDbModel -
    -
    - -
    Returns a DbModel with the database connection defined in constants.php.
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph.
    -
    -
    - getDefaultModel -
    -
    - -
    Returns a MemModel.
    -
    -
    - getDomain -
    -
    -
    OntProperty::getDomain() in OntProperty.php
    -
    Answer a OntClass that represents the domain class of this property.
    -
    -
    - getEntailment -
    -
    - -
    -
    - getExpression -
    -
    -
    Constraint::getExpression() in Constraint.php
    -
    Returns the expression string.
    -
    -
    - getFromNamedPart -
    -
    - -
    Returns the FROM NAMED clause of the query.
    -
    -
    - getFromPart -
    -
    - -
    Returns the FROM clause of the query.
    -
    -
    - getFullUri -
    -
    -
    Query::getFullUri() in Query.php
    -
    Gets the full URI of a qname token.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphDb::getGraphName() in NamedGraphDb.php
    -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    - -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphMem::getGraphName() in NamedGraphMem.php
    -
    Returns the graph name.
    -
    -
    - getGraphname -
    -
    -
    GraphPattern::getGraphname() in GraphPattern.php
    -
    Returns the graphname.
    -
    -
    - getHead -
    -
    - -
    -
    - getHead -
    -
    -
    ResList::getHead() in ResList.php
    -
    Get the value that is associated with the head of the list.
    -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getID -
    -
    -
    BlankNode::getID() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getId -
    -
    -
    GraphPattern::getId() in GraphPattern.php
    -
    Returns the GraphPatterns id.
    -
    -
    - getIndexType -
    -
    -
    MemModel::getIndexType() in MemModel.php
    -
    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),
    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.
    -
    -
    - getInfModelB -
    -
    -
    ModelFactory::getInfModelB() in ModelFactory.php
    -
    Returns a InfModelB.
    -
    -
    - getInfModelF -
    -
    -
    ModelFactory::getInfModelF() in ModelFactory.php
    -
    Returns a InfModelF.
    -
    -
    - getInstanceRdfType -
    -
    - -
    returns the rdf:type, that this distinct resource is instance of.
    -
    -
    - getIsAnon -
    -
    -
    ResResource::getIsAnon() in ResResource.php
    -
    Determine whether this resource is an anonymous resource
    -
    -
    - getIsCol -
    -
    - -
    -
    - getIsDefinedBy -
    -
    - -
    Answer a resource that is declared to provide a definition of this resource.
    -
    -
    - getLabel -
    -
    -
    Resource::getLabel() in Resource.php
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    -
    - getLabel -
    -
    -
    BlankNode::getLabel() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getLabel -
    -
    -
    Literal::getLabel() in Literal.php
    -
    Returns the string value of the literal.
    -
    -
    - getLabelObject -
    -
    - -
    Reurns the URI, text or bNode identifier of the statements's object.
    -
    -
    - getLabelPredicate -
    -
    - -
    Returns the URI of the statements's predicate.
    -
    -
    - getLabelProperty -
    -
    - -
    Answer the label ResLiteral for this object.
    -
    -
    - getLabelSubject -
    -
    - -
    Returns the URI or bNode identifier of the statements's subject.
    -
    -
    - getLangCol -
    -
    - -
    -
    - getLanguage -
    -
    -
    Literal::getLanguage() in Literal.php
    -
    Returns the language of the literal.
    -
    -
    - getLanguageTag -
    -
    - -
    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.
    -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getLocalName -
    -
    - -
    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    -
    -
    - getLocalName -
    -
    -
    Resource::getLocalName() in Resource.php
    -
    Returns the local name of the resource.
    -
    -
    - getMember -
    -
    -
    ResSeq::getMember() in ResSeq.php
    -
    Get the member at a given index
    -
    -
    - getMembers -
    -
    -
    ResContainer::getMembers() in ResContainer.php
    -
    Get an array of all resources that are values of this container
    -
    -
    - getMemModel -
    -
    -
    InfModelB::getMemModel() in InfModelB.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.
    -
    -
    - getMemModel -
    -
    -
    InfModelF::getMemModel() in InfModelF.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.
    -
    -
    - getMemModel -
    -
    -
    ModelFactory::getMemModel() in ModelFactory.php
    -
    Returns a MemModel.
    -
    -
    - getMemModel -
    -
    -
    DbModel::getMemModel() in DbModel.php
    -
    Create a MemModel containing all the triples of the current DbModel.
    -
    -
    - getMemModelByRDQL -
    -
    - -
    Perform an RDQL query on this Model. Should work with all types of models.
    -
    -
    - getModel -
    -
    -
    DbStore::getModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getModel -
    -
    -
    ResModel::getModel() in ResModel.php
    -
    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    -
    -
    - getModelID -
    -
    -
    DbModel::getModelID() in DbModel.php
    -
    Returns the model id
    -
    -
    - getModifiedFind -
    -
    - -
    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.
    -
    -
    - getNamedGraph -
    -
    -
    DatasetMem::getNamedGraph() in DatasetMem.php
    -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraph -
    -
    - -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getNamespace -
    -
    - -
    Extracts the namespace prefix out of the URI of a Resource.
    -
    -
    - getNamespace -
    -
    -
    Resource::getNamespace() in Resource.php
    -
    Returns the namespace of the resource. May return null.
    -
    -
    - getNewDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.
    -
    -
    - getNewModel -
    -
    -
    DbStore::getNewModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.
    -
    -
    - getNewNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).
    -
    -
    - getNewPattern -
    -
    - -
    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.
    -
    -
    - getObject -
    -
    -
    Statement::getObject() in Statement.php
    -
    Returns the object of the triple.
    -
    -
    - getObject -
    -
    -
    QueryTriple::getObject() in QueryTriple.php
    -
    Returns the Triples Object.
    -
    -
    - getObject -
    -
    -
    Quad::getObject() in Quad.php
    -
    Returns the object.
    -
    -
    - getOntModel -
    -
    - -
    Returns an OntModel with this model as baseModel.
    -
    -
    - getOntModel -
    -
    -
    ModelFactory::getOntModel() in ModelFactory.php
    -
    Returns an OntModel.
    -
    -
    - getOntModelForBaseModel -
    -
    - -
    Creates an OntModel that wraps an existing base model.
    -
    -
    - getOptional -
    -
    -
    GraphPattern::getOptional() in GraphPattern.php
    -
    Returns a pointer to an optional graph pattern.
    -
    -
    - getOrd -
    -
    -
    RDFUtil::getOrd() in RdfUtil.php
    -
    Converts an ordinal RDF resource to an integer.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPointer -
    -
    -
    SparqlParserException::getPointer() in SparqlParserException.php
    -
    Returns a pointer to the token which caused the exception.
    -
    -
    - getPovs -
    -
    -
    N3Parser::getPovs() in N3Parser.php
    -
    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    -
    -
    - getPredicate -
    -
    -
    QueryTriple::getPredicate() in QueryTriple.php
    -
    Returns the Triples Predicate.
    -
    -
    - getPredicate -
    -
    - -
    Returns the predicate.
    -
    -
    - getPredicate -
    -
    -
    Statement::getPredicate() in Statement.php
    -
    Returns the predicate of the triple.
    -
    -
    - getPrefix -
    -
    -
    RDFUtil::getPrefix() in RdfUtil.php
    -
    Short Prefix for known Namespaces by given URI
    -
    -
    - getPrefixes -
    -
    - -
    Returns the prefix map of the query.
    -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getProperty -
    -
    -
    ResResource::getProperty() in ResResource.php
    -
    Answer some statement (this, p, O) in the associated model.
    -
    -
    - getProperty -
    -
    -
    ResModel::getProperty() in ResModel.php
    -
    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    -
    -
    - getPropertyValue -
    -
    - -
    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.
    -
    -
    - getQuery -
    -
    -
    SparqlEngineDb::getQuery() in SparqlEngineDb.php
    -
    -
    - getQuery -
    -
    -
    SparqlEngine::getQuery() in SparqlEngine.php
    -
    -
    - getRange -
    -
    -
    OntProperty::getRange() in OntProperty.php
    -
    Answer a OntClass that represents the range class of this property.
    -
    -
    - getRDFType -
    -
    -
    OntResource::getRDFType() in OntResource.php
    -
    Answer the rdf:type (ie the class) of this resource.
    -
    -
    - getResModel -
    -
    - -
    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).
    -
    -
    - getResModel -
    -
    -
    ModelFactory::getResModel() in ModelFactory.php
    -
    Returns a ResModel.
    -
    -
    - getResModelForBaseModel -
    -
    - -
    Creates a ResModel that wraps an existing base model.
    -
    -
    - getResultForm -
    -
    - -
    Returns the type the result shall have.
    -
    -
    - getResultLabels -
    -
    -
    RdqlResultIterator::getResultLabels() in RdqlResultIterator.php
    -
    Returns the labels of the result as array.
    -
    -
    - getResultPart -
    -
    - -
    Returns a list containing the graph patterns of the query.
    -
    -
    - getResultVars -
    -
    - -
    Returns a list containing the result vars.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSchema -
    -
    -
    InfModel::getSchema() in InfModel.php
    -
    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.
    -
    -
    - getSeeAlso -
    -
    -
    OntResource::getSeeAlso() in OntResource.php
    -
    Answer a resource that provides additional information about this resource.
    -
    -
    - getSelect -
    -
    - -
    -
    - getSolutionModifier -
    -
    - -
    Gets the solution modifiers of the query.
    -
    -
    - getSparqlClient -
    -
    - -
    Creates a SparqlClient.
    -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlGenerator -
    -
    -
    SparqlEngineDb::getSqlGenerator() in SparqlEngineDb.php
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStatement -
    -
    - -
    Returns the statement(subject,predicate,object).
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the Model.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the MemModel.
    -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getSubClass -
    -
    -
    OntClass::getSubClass() in OntClass.php
    -
    Answer a class that is the sub-class of this class.
    -
    -
    - getSubject -
    -
    -
    Statement::getSubject() in Statement.php
    -
    Returns the subject of the triple.
    -
    -
    - getSubject -
    -
    -
    Quad::getSubject() in Quad.php
    -
    Returns the subject.
    -
    -
    - getSubject -
    -
    -
    QueryTriple::getSubject() in QueryTriple.php
    -
    Returns the Triples Subject.
    -
    -
    - getSubProperty -
    -
    - -
    Answer a property that is the sub-property of this property.
    -
    -
    - getSuperClass -
    -
    - -
    Answer a class that is the super-class of this class.
    -
    -
    - getSuperProperty -
    -
    - -
    Answer a property that is the super-property of this property.
    -
    -
    - getTail -
    -
    -
    ResList::getTail() in ResList.php
    -
    Get the list that is the tail of this list.
    -
    -
    - getTree -
    -
    -
    Constraint::getTree() in Constraint.php
    -
    -
    - getTrigger -
    -
    -
    InfRule::getTrigger() in InfRule.php
    -
    -
    - getTriplePattern -
    -
    - -
    Returns the triple pattern of the graph pattern.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getTypeSorter -
    -
    -
    SparqlEngineDb::getTypeSorter() in SparqlEngineDb.php
    -
    -
    - getUnion -
    -
    -
    GraphPattern::getUnion() in GraphPattern.php
    -
    Returns a pointer to a union graph pattern.
    -
    -
    - getURI -
    -
    -
    Resource::getURI() in Resource.php
    -
    Returns the URI of the resource.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getVariables -
    -
    -
    QueryTriple::getVariables() in QueryTriple.php
    -
    Returns an array of all variables in this triple.
    -
    -
    - getVariables -
    -
    -
    GraphPattern::getVariables() in GraphPattern.php
    -
    Returns an array of all variables used in this graph pattern.
    -
    -
    - getVocabulary -
    -
    -
    OntResource::getVocabulary() in OntResource.php
    -
    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.
    -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - GIVEN -
    -
    -
    VCARD::GIVEN() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD_RES::GIVEN() in VCARD_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF_RES::GIVENNAME() in FOAF_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF::GIVENNAME() in FOAF_C.php
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern::GraphPattern() in GraphPattern.php
    -
    Constructor
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern in GraphPattern.php
    -
    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.
    -
    -
    - GRAPHVIZ_FORMAT -
    -
    -
    GRAPHVIZ_FORMAT in constants.php
    -
    -
    - GRAPHVIZ_PATH -
    -
    -
    GRAPHVIZ_PATH in constants.php
    -
    -
    - GRAPHVIZ_STAT -
    -
    -
    GRAPHVIZ_STAT in constants.php
    -
    -
    - GRAPHVIZ_TEMP -
    -
    -
    GRAPHVIZ_TEMP in constants.php
    -
    -
    - GRAPHVIZ_URI -
    -
    -
    GRAPHVIZ_URI in constants.php
    -
    -
    - GRDDLParser -
    -
    -
    GRDDLParser in GRDDLParser.php
    -
    A GRDDLParser.
    -
    -
    - GROUP -
    -
    -
    VCARD_RES::GROUP() in VCARD_RES.php
    -
    -
    - GROUP -
    -
    -
    VCARD::GROUP() in VCARD_C.php
    -
    -
    - GROUP -
    -
    -
    FOAF_RES::GROUP() in FOAF_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF::GROUP() in FOAF_C.php
    -
    -
    - guessName -
    -
    -
    RDFUtil::guessName() in RdfUtil.php
    -
    Delivers the name out of the URI (without the namespace prefix).
    -
    -
    - guessNamespace -
    -
    - -
    Extracts the namespace prefix out of a URI.
    -
    -
    - guessPrefix -
    -
    -
    RDFUtil::guessPrefix() in RdfUtil.php
    -
    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found
    -
    -
    - GraphPattern.php -
    -
    -
    GraphPattern.php in GraphPattern.php
    -
    -
    - GRDDLParser.php -
    -
    -
    GRDDLParser.php in GRDDLParser.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - $headers -
    -
    -
    Snoopy::$headers in Snoopy.class.inc
    -
    -
    - $host -
    -
    -
    Snoopy::$host in Snoopy.class.inc
    -
    ** Public variables ***
    -
    -
    - hasComment -
    -
    -
    OntResource::hasComment() in OntResource.php
    -
    Answer true if this resource has the given comment.
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if an defaultGraph exists. False otherwise .
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if a defaultGraph exists. False otherwise.
    -
    -
    - hasDomain -
    -
    -
    OntProperty::hasDomain() in OntProperty.php
    -
    Answer true if the given resource a class specifying the domain of this property.
    -
    -
    - hashCode -
    -
    -
    Statement::hashCode() in Statement.php
    -
    Retruns the hash code of the triple.
    -
    -
    - hasLabelProperty -
    -
    - -
    Answer true if this resource has the given label.
    -
    -
    - hasNext -
    -
    -
    RdqlResultIterator::hasNext() in RdqlResultIterator.php
    -
    Returns TRUE if there are more results.
    -
    -
    - hasNext -
    -
    -
    StatementIterator::hasNext() in StatementIterator.php
    -
    Returns TRUE if there are more statements.
    -
    -
    - hasNext -
    -
    -
    FindIterator::hasNext() in FindIterator.php
    -
    Returns TRUE if there are more matching statements.
    -
    -
    - hasPrevious -
    -
    -
    RdqlResultIterator::hasPrevious() in RdqlResultIterator.php
    -
    Returns TRUE if the first result has not been reached.
    -
    -
    - hasPrevious -
    -
    -
    StatementIterator::hasPrevious() in StatementIterator.php
    -
    Returns TRUE if the first statement has not been reached.
    -
    -
    - hasProperty -
    -
    -
    ResResource::hasProperty() in ResResource.php
    -
    Determine whether this resource has any values for a given property.
    -
    -
    - hasRange -
    -
    -
    OntProperty::hasRange() in OntProperty.php
    -
    Answer true if the given resource a class specifying the range of this property.
    -
    -
    - hasRDFType -
    -
    -
    OntResource::hasRDFType() in OntResource.php
    -
    Answer true if this resource has the given rdf:type.
    -
    -
    - hasSeeAlso -
    -
    -
    OntResource::hasSeeAlso() in OntResource.php
    -
    Answer true if this resource has the given resource as a source of additional information.
    -
    -
    - hasSubclass -
    -
    -
    OntClass::hasSubclass() in OntClass.php
    -
    Answer true if the given class is a sub-class of this class.
    -
    -
    - hasSubProperty -
    -
    - -
    Answer true if the given property is a sub-property of this property.
    -
    -
    - hasSuperClass -
    -
    - -
    Answer true if the given class is a super-class of this class.
    -
    -
    - hasSuperProperty -
    -
    - -
    Answer true if the given property is a super-property of this property.
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM_RES::HAS_CHILD() in ATOM_RES.php
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM::HAS_CHILD() in ATOM_C.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM_RES::HAS_ENTRY() in ATOM_RES.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM::HAS_ENTRY() in ATOM_C.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC_RES::HAS_FORMAT() in DC_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC::HAS_FORMAT() in DC_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM::HAS_LINK() in ATOM_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM_RES::HAS_LINK() in ATOM_RES.php
    -
    -
    - HAS_PART -
    -
    -
    DC::HAS_PART() in DC_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC_RES::HAS_PART() in DC_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM_RES::HAS_TITLE() in ATOM_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM::HAS_TITLE() in ATOM_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL::HAS_VALUE() in OWL_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWLVocabulary::HAS_VALUE() in OWLVocabulary.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL_RES::HAS_VALUE() in OWL_RES.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC::HAS_VERSION() in DC_C.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC_RES::HAS_VERSION() in DC_RES.php
    -
    -
    - HIDE_ADVERTISE -
    -
    -
    HIDE_ADVERTISE in constants.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    -
    FOAF::HOLDS_ACCOUNT() in FOAF_C.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    - -
    -
    - HOMEPAGE -
    -
    -
    FOAF::HOMEPAGE() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF_RES::HOMEPAGE() in FOAF_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM::HREF() in ATOM_C.php
    -
    -
    - HREF -
    -
    -
    ATOM_RES::HREF() in ATOM_RES.php
    -
    -
    - HTML_TABLE_BNODE_COLOR -
    -
    -
    HTML_TABLE_BNODE_COLOR in constants.php
    -
    -
    - HTML_TABLE_HEADER_COLOR -
    -
    -
    HTML_TABLE_HEADER_COLOR in constants.php
    -
    -
    - HTML_TABLE_LITERAL_COLOR -
    -
    -
    HTML_TABLE_LITERAL_COLOR in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR0 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR0 in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR1 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR1 in constants.php
    -
    -
    - HTML_TABLE_RDF_NS_COLOR -
    -
    -
    HTML_TABLE_RDF_NS_COLOR in constants.php
    -
    -
    - HTML_TABLE_RESOURCE_COLOR -
    -
    -
    HTML_TABLE_RESOURCE_COLOR in constants.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $image -
    -
    -
    MagpieRSS::$image in rss_parse.inc
    -
    -
    - $inchannel -
    -
    -
    MagpieRSS::$inchannel in rss_parse.inc
    -
    -
    - $incontent -
    -
    -
    MagpieRSS::$incontent in rss_parse.inc
    -
    -
    - $inimage -
    -
    -
    MagpieRSS::$inimage in rss_parse.inc
    -
    -
    - $initem -
    -
    -
    MagpieRSS::$initem in rss_parse.inc
    -
    -
    - $intextinput -
    -
    -
    MagpieRSS::$intextinput in rss_parse.inc
    -
    -
    - $isConstructPattern -
    -
    - -
    -
    - $isEmpty -
    -
    -
    Query::$isEmpty in Query.php
    -
    TRUE if the query is empty FALSE if not.
    -
    -
    - $items -
    -
    -
    MagpieRSS::$items in rss_parse.inc
    -
    -
    - IteratorAllGraphsDb.php -
    -
    -
    IteratorAllGraphsDb.php in IteratorAllGraphsDb.php
    -
    -
    - IteratorAllGraphsMem.php -
    -
    -
    IteratorAllGraphsMem.php in IteratorAllGraphsMem.php
    -
    -
    - IteratorFindQuadsDb.php -
    -
    -
    IteratorFindQuadsDb.php in IteratorFindQuadsDb.php
    -
    -
    - IteratorFindQuadsMem.php -
    -
    -
    IteratorFindQuadsMem.php in IteratorFindQuadsMem.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF_RES::ICQ_CHAT_ID() in FOAF_RES.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF::ICQ_CHAT_ID() in FOAF_C.php
    -
    -
    - ID -
    -
    -
    RDF_RES::ID() in RDF_RES.php
    -
    -
    - ID -
    -
    -
    RDF::ID() in RDF_C.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC_RES::IDENTIFIER() in DC_RES.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC::IDENTIFIER() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS_RES::IMAGE() in RSS_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC_RES::IMAGE() in DC_RES.php
    -
    -
    - IMAGE -
    -
    -
    FOAF_RES::IMAGE() in FOAF_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC::IMAGE() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    FOAF::IMAGE() in FOAF_C.php
    -
    -
    - image -
    -
    -
    RssParser::image() in RssParser.php
    -
    Parses the image if there is one.
    -
    -
    - IMAGE -
    -
    -
    RSS::IMAGE() in RSS_C.php
    -
    -
    - IMG -
    -
    -
    FOAF_RES::IMG() in FOAF_RES.php
    -
    -
    - IMG -
    -
    -
    FOAF::IMG() in FOAF_C.php
    -
    -
    - IMPORTS -
    -
    -
    OWLVocabulary::IMPORTS() in OWLVocabulary.php
    -
    -
    - IMPORTS -
    -
    -
    OWL_RES::IMPORTS() in OWL_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL::IMPORTS() in OWL_C.php
    -
    -
    - IMT -
    -
    -
    DC_RES::IMT() in DC_RES.php
    -
    -
    - IMT -
    -
    -
    DC::IMT() in DC_C.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INDENTATION -
    -
    -
    INDENTATION in constants.php
    -
    -
    - index -
    -
    -
    MemModel::index() in MemModel.php
    -
    Builds a search index for the statements in the MemModel.
    -
    -
    - indexOf -
    -
    -
    ResList::indexOf() in ResList.php
    -
    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.
    -
    -
    - indexOf -
    -
    -
    ResSeq::indexOf() in ResSeq.php
    -
    Return the index of a given member of the sequence.
    -
    -
    - INDEX_TYPE -
    -
    -
    INDEX_TYPE in constants.php
    -
    -
    - Individual -
    -
    -
    Individual::Individual() in Individual.php
    -
    Constructor You can supply a uri
    -
    -
    - Individual -
    -
    -
    Individual in Individual.php
    -
    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.
    -
    -
    - IND_DEF -
    -
    -
    IND_DEF in constants.php
    -
    -
    - IND_SO -
    -
    -
    IND_SO in constants.php
    -
    -
    - IND_SP -
    -
    -
    IND_SP in constants.php
    -
    -
    - IND_SPO -
    -
    -
    IND_SPO in constants.php
    -
    -
    - InfModel -
    -
    -
    InfModel::InfModel() in InfModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModel -
    -
    -
    InfModel in InfModel.php
    -
    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.
    -
    -
    - InfModel.php -
    -
    -
    InfModel.php in InfModel.php
    -
    -
    - InfModelB.php -
    -
    -
    InfModelB.php in InfModelB.php
    -
    -
    - InfModelF.php -
    -
    -
    InfModelF.php in InfModelF.php
    -
    -
    - InfModelP.php -
    -
    -
    InfModelP.php in InfModelP.php
    -
    -
    - InfRule.php -
    -
    -
    InfRule.php in InfRule.php
    -
    -
    - InfStatement.php -
    -
    -
    InfStatement.php in InfStatement.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB::InfModelB() in InfModelB.php
    -
    Constructor You can supply a base_uri
    -
    -
    - INFMODELB -
    -
    -
    INFMODELB in constants.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB in InfModelB.php
    -
    A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    -
    -
    - InfModelF -
    -
    -
    InfModelF::InfModelF() in InfModelF.php
    -
    Constructor You can supply a base_uri.
    -
    -
    - InfModelF -
    -
    -
    InfModelF in InfModelF.php
    -
    A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    -
    -
    - INFMODELF -
    -
    -
    INFMODELF in constants.php
    -
    -
    - INFO -
    -
    -
    ATOM_RES::INFO() in ATOM_RES.php
    -
    -
    - INFO -
    -
    -
    ATOM::INFO() in ATOM_C.php
    -
    -
    - InfRule -
    -
    -
    InfRule in InfRule.php
    -
    This class represents a single rule in a RDFS inference model.
    -
    -
    - infRule -
    -
    -
    InfRule::infRule() in InfRule.php
    -
    Constructor
    -
    -
    - InfStatement -
    -
    -
    InfStatement in InfStatement.php
    -
    An RDF statement which was entailed by a inference rule.
    -
    -
    - INF_RES_DOMAIN -
    -
    -
    INF_RES_DOMAIN in constants.php
    -
    -
    - INF_RES_OWL_INVERSEOF -
    -
    -
    INF_RES_OWL_INVERSEOF in constants.php
    -
    -
    - INF_RES_OWL_SAMEAS -
    -
    -
    INF_RES_OWL_SAMEAS in constants.php
    -
    -
    - INF_RES_RANGE -
    -
    -
    INF_RES_RANGE in constants.php
    -
    -
    - INF_RES_RULE_RDFS6 -
    -
    -
    INF_RES_RULE_RDFS6 in constants.php
    -
    -
    - INF_RES_RULE_RDFS8 -
    -
    -
    INF_RES_RULE_RDFS8 in constants.php
    -
    -
    - INF_RES_RULE_RDFS10 -
    -
    -
    INF_RES_RULE_RDFS10 in constants.php
    -
    -
    - INF_RES_RULE_RDFS12 -
    -
    -
    INF_RES_RULE_RDFS12 in constants.php
    -
    -
    - INF_RES_RULE_RDFS13 -
    -
    -
    INF_RES_RULE_RDFS13 in constants.php
    -
    -
    - INF_RES_SUBCLASSOF -
    -
    -
    INF_RES_SUBCLASSOF in constants.php
    -
    -
    - INF_RES_SUBPROPERTYOF -
    -
    -
    INF_RES_SUBPROPERTYOF in constants.php
    -
    -
    - init -
    -
    -
    init() in rss_fetch.inc
    -
    -
    - INTERACTIVERESOURCE -
    -
    - -
    -
    - INTERACTIVE_RESOURCE -
    -
    - -
    -
    - INTEREST -
    -
    -
    FOAF::INTEREST() in FOAF_C.php
    -
    -
    - INTEREST -
    -
    -
    FOAF_RES::INTEREST() in FOAF_RES.php
    -
    -
    - intersect -
    -
    -
    ResModel::intersect() in ResModel.php
    -
    Returns a new model containing all the statements which are in both this model and another.
    -
    -
    - intersect -
    -
    -
    MemModel::intersect() in MemModel.php
    -
    Returns a new MemModel containing all the statements which are in both this MemModel and another.
    -
    -
    - intersect -
    -
    -
    DbModel::intersect() in DbModel.php
    -
    Return a new MemModel containing all the statements which are in both this model and the given model.
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWLVocabulary::INVERSE_OF() in OWLVocabulary.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL::INVERSE_OF() in OWL_C.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL_RES::INVERSE_OF() in OWL_RES.php
    -
    -
    - IN_DESCRIPTION -
    -
    -
    IN_DESCRIPTION in constants.php
    -
    -
    - IN_PROPERTY_EMPTY_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_LITERAL -
    -
    -
    IN_PROPERTY_LITERAL in constants.php
    -
    -
    - IN_PROPERTY_PARSE_TYPE_COLLECTION -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_LITERAL -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_RESOURCE -
    -
    -
    IN_PROPERTY_RESOURCE in constants.php
    -
    -
    - IN_PROPERTY_UNKNOWN_OBJECT -
    -
    - -
    -
    - IN_RDF -
    -
    -
    IN_RDF in constants.php
    -
    -
    - IN_TOP_LEVEL -
    -
    -
    IN_TOP_LEVEL in constants.php
    -
    -
    - IN_UNKNOWN -
    -
    -
    IN_UNKNOWN in constants.php
    -
    -
    - IN_XML -
    -
    -
    IN_XML in constants.php
    -
    -
    - iriCheck -
    -
    -
    SparqlParser::iriCheck() in SparqlParser.php
    -
    Checks if $token is an IRI.
    -
    -
    - isAlt -
    -
    -
    ResContainer::isAlt() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Alt
    -
    -
    - isBag -
    -
    -
    ResContainer::isBag() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Bag
    -
    -
    - isDefinedBy -
    -
    -
    OntResource::isDefinedBy() in OntResource.php
    -
    Answer true if this resource is defined by the given resource.
    -
    -
    - isEmpty -
    -
    -
    Query::isEmpty() in Query.php
    -
    Returns $isEmpty variable
    -
    -
    - isEmpty -
    -
    -
    DatasetMem::isEmpty() in DatasetMem.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    DbModel::isEmpty() in DbModel.php
    -
    Check if this DbModel is empty.
    -
    -
    - isEmpty -
    -
    -
    DatasetDb::isEmpty() in DatasetDb.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    MemModel::isEmpty() in MemModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    ResList::isEmpty() in ResList.php
    -
    Returns true, if this list is empty
    -
    -
    - isEmpty -
    -
    -
    ResModel::isEmpty() in ResModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isIndexed -
    -
    -
    MemModel::isIndexed() in MemModel.php
    -
    Returns true if there is an index, false if not.
    -
    -
    - isNumber -
    -
    - -
    -
    - ISO639_2 -
    -
    -
    DC::ISO639_2() in DC_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC_RES::ISO639_2() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC_RES::ISO3166() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC::ISO3166() in DC_C.php
    -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isOuterFilter -
    -
    -
    Constraint::isOuterFilter() in Constraint.php
    -
    Returns true if this constraint is an outer filter- false if not.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isRDF -
    -
    -
    RDFUtil::isRDF() in RdfUtil.php
    -
    Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSeq -
    -
    -
    ResContainer::isSeq() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Seq
    -
    -
    - isSetup -
    -
    -
    DbStore::isSetup() in DbStore.php
    -
    Checks if tables are setup for RAP
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - ISSUED -
    -
    -
    ATOM_RES::ISSUED() in ATOM_RES.php
    -
    -
    - ISSUED -
    -
    -
    ATOM::ISSUED() in ATOM_C.php
    -
    -
    - ISSUED -
    -
    -
    DC_RES::ISSUED() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC::ISSUED() in DC_C.php
    -
    -
    - isValid -
    -
    -
    ResList::isValid() in ResList.php
    -
    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - is_atom -
    -
    -
    MagpieRSS::is_atom() in rss_parse.inc
    -
    -
    - is_client_error -
    -
    -
    is_client_error() in rss_fetch.inc
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RDFS::IS_DEFINED_BY() in RDFS_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    -
    OWLVocabulary::IS_DEFINED_BY() in OWLVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RdfsVocabulary::IS_DEFINED_BY() in RdfsVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    - -
    -
    - is_error -
    -
    -
    is_error() in rss_fetch.inc
    -
    -
    - IS_FORMAT_OF -
    -
    -
    DC::IS_FORMAT_OF() in DC_C.php
    -
    -
    - IS_FORMAT_OF -
    -
    - -
    -
    - is_info -
    -
    -
    is_info() in rss_fetch.inc
    -
    -
    - IS_PART_OF -
    -
    -
    DC::IS_PART_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC_RES::IS_PART_OF() in DC_RES.php
    -
    -
    - is_redirect -
    -
    -
    is_redirect() in rss_fetch.inc
    -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - is_rss -
    -
    -
    MagpieRSS::is_rss() in rss_parse.inc
    -
    -
    - is_server_error -
    -
    -
    is_server_error() in rss_fetch.inc
    -
    -
    - is_success -
    -
    -
    is_success() in rss_fetch.inc
    -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - ITEM -
    -
    -
    RSS::ITEM() in RSS_C.php
    -
    -
    - ITEM -
    -
    -
    RSS_RES::ITEM() in RSS_RES.php
    -
    -
    - items -
    -
    -
    RssParser::items() in RssParser.php
    -
    Parses the rss items/ atom entries.
    -
    -
    - ITEMS -
    -
    -
    RSS::ITEMS() in RSS_C.php
    -
    -
    - ITEMS -
    -
    -
    RSS_RES::ITEMS() in RSS_RES.php
    -
    -
    - IteratorAllGraphsDb -
    -
    -
    IteratorAllGraphsDb in IteratorAllGraphsDb.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    -
    IteratorAllGraphsMem in IteratorAllGraphsMem.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorFindQuadsDb -
    -
    -
    IteratorFindQuadsDb in IteratorFindQuadsDb.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsMem -
    -
    -
    IteratorFindQuadsMem in IteratorFindQuadsMem.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsMem -
    -
    - -
    Constructor.
    -
    -
    - IterFind -
    -
    -
    IterFind in IterFind.php
    -
    Implementation of a find-iterator which delivers statements or quads.
    -
    -
    - iterFind -
    -
    -
    MemModel::iterFind() in MemModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - iterFind -
    -
    -
    DbModel::iterFind() in DbModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - IterFind -
    -
    -
    IterFind::IterFind() in IterFind.php
    -
    Constructor.
    -
    -
    - Individual.php -
    -
    -
    Individual.php in Individual.php
    -
    -
    - IterFind.php -
    -
    -
    IterFind.php in IterFind.php
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - JABBER_ID -
    -
    -
    FOAF_RES::JABBER_ID() in FOAF_RES.php
    -
    -
    - JABBER_ID -
    -
    -
    FOAF::JABBER_ID() in FOAF_C.php
    -
    -
    - joinOptionalTuples -
    -
    - -
    Joins OPTIONAL pattern results.
    -
    -
    - joinResults -
    -
    -
    SparqlEngine::joinResults() in SparqlEngine.php
    -
    Joins the results of the different Graphpatterns.
    -
    -
    - joinTuples -
    -
    -
    SparqlEngine::joinTuples() in SparqlEngine.php
    -
    Perform an SQL-like inner join on two resultSets.
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    ResIterator::key() in ResIterator.php
    -
    Returns the key of the current item
    -
    -
    - KEY -
    -
    -
    VCARD::KEY() in VCARD_C.php
    -
    -
    - KEY -
    -
    -
    VCARD_RES::KEY() in VCARD_RES.php
    -
    -
    - key -
    -
    -
    IterFind::key() in IterFind.php
    -
    Returns the key of the current item
    -
    -
    - key -
    -
    -
    IteratorFindQuadsMem::key() in IteratorFindQuadsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsDb::key() in IteratorAllGraphsDb.php
    -
    Returns the key of the current item
    -
    -
    - key -
    -
    -
    IteratorAllGraphsMem::key() in IteratorAllGraphsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorFindQuadsDb::key() in IteratorFindQuadsDb.php
    -
    Returns the key of the current item.
    -
    -
    - known_encoding -
    -
    - -
    -
    - KNOWS -
    -
    -
    FOAF_RES::KNOWS() in FOAF_RES.php
    -
    -
    - KNOWS -
    -
    -
    FOAF::KNOWS() in FOAF_C.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lang -
    -
    -
    SparqlResultParser::$lang in SparqlResultParser.php
    -
    -
    - $lastredirectaddr -
    -
    -
    Snoopy::$lastredirectaddr in Snoopy.class.inc
    -
    -
    - LABEL -
    -
    -
    VCARD_RES::LABEL() in VCARD_RES.php
    -
    -
    - LABEL -
    -
    -
    VCARD::LABEL() in VCARD_C.php
    -
    -
    - LABEL -
    -
    -
    RDFS_RES::LABEL() in RDFS_RES.php
    -
    -
    - LABEL -
    -
    -
    RdfsVocabulary::LABEL() in RdfsVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LABEL -
    -
    -
    RDFS::LABEL() in RDFS_C.php
    -
    -
    - LABEL -
    -
    -
    OWLVocabulary::LABEL() in OWLVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LANG -
    -
    -
    ATOM::LANG() in ATOM_C.php
    -
    -
    - lang -
    -
    -
    lang() in FilterFunctions.php
    -
    Evaluates the lang() function. Returns lang tag of a Literal.
    -
    -
    - LANG -
    -
    -
    ATOM_RES::LANG() in ATOM_RES.php
    -
    -
    - langMatches -
    -
    -
    langMatches() in FilterFunctions.php
    -
    Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    -
    -
    - LANGUAGE -
    -
    -
    DC_RES::LANGUAGE() in DC_RES.php
    -
    -
    - LANGUAGE -
    -
    -
    DC::LANGUAGE() in DC_C.php
    -
    -
    - LCC -
    -
    -
    DC_RES::LCC() in DC_RES.php
    -
    -
    - LCC -
    -
    -
    DC::LCC() in DC_C.php
    -
    -
    - LCSH -
    -
    -
    DC_RES::LCSH() in DC_RES.php
    -
    -
    - LCSH -
    -
    -
    DC::LCSH() in DC_C.php
    -
    -
    - LI -
    -
    -
    RDF::LI() in RDF_C.php
    -
    -
    - LI -
    -
    -
    RDF_RES::LI() in RDF_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC_RES::LICENSE() in DC_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC::LICENSE() in DC_C.php
    -
    -
    - LINEFEED -
    -
    -
    LINEFEED in constants.php
    -
    -
    - LINK -
    -
    -
    ATOM_RES::LINK() in ATOM_RES.php
    -
    -
    - LINK -
    -
    -
    ATOM::LINK() in ATOM_C.php
    -
    -
    - LINK -
    -
    -
    RSS::LINK() in RSS_C.php
    -
    -
    - LINK -
    -
    -
    RSS_RES::LINK() in RSS_RES.php
    -
    -
    - listClasses -
    -
    -
    OntModel::listClasses() in OntModel.php
    -
    Answer an array that ranges over all of the various forms of class description resource in this model.
    -
    -
    - listComments -
    -
    -
    OntResource::listComments() in OntResource.php
    -
    Answer an array of all of the comment literals for this resource.
    -
    -
    - listDomain -
    -
    -
    OntProperty::listDomain() in OntProperty.php
    -
    Answer an array of all of the declared domain classes of this property.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listInstances -
    -
    - -
    Answer an ResIterator over the individuals in the model that have this class among their types.
    -
    -
    - listIsDefinedBy -
    -
    - -
    Answer an array of all of the resources that are declared to define this resource.
    -
    -
    - listLabelProperties -
    -
    - -
    Answer an array of all of the label literals for this resource, with the given language, if $language is set.
    -
    -
    - listModels -
    -
    -
    DbStore::listModels() in DbStore.php
    -
    List all DbModels stored in the database.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listObjects -
    -
    -
    ResModel::listObjects() in ResModel.php
    -
    Returns a ResIterator with all objects in a model.
    -
    -
    - listObjectsOfProperty -
    -
    - -
    Returns a ResIterator with all objects with a given property and property value.
    -
    -
    - listProperties -
    -
    - -
    List all the values with the property p as statements in an array.
    -
    -
    - listProperty -
    -
    -
    OntResource::listProperty() in OntResource.php
    -
    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.
    -
    -
    - listRange -
    -
    -
    OntProperty::listRange() in OntProperty.php
    -
    Answer an array of all of the declared range classes of this property.
    -
    -
    - listRDFTypes -
    -
    -
    OntResource::listRDFTypes() in OntResource.php
    -
    Answer an array of the RDF classes to which this resource belongs.
    -
    -
    - listSeeAlso -
    -
    -
    OntResource::listSeeAlso() in OntResource.php
    -
    Answer an array of all of the resources that are declared to provide addition information about this resource.
    -
    -
    - listSubClasses -
    -
    - -
    Answer an array over the classes that are declared to be sub-classes of this class.
    -
    -
    - listSubjects -
    -
    -
    ResModel::listSubjects() in ResModel.php
    -
    Returns a ResIterator with all subjects in a model.
    -
    -
    - listSubjectsWithProperty -
    -
    - -
    Returns a ResIterator with all subjects with a given property and property value.
    -
    -
    - listSubProperties -
    -
    - -
    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - listSuperClasses -
    -
    - -
    Answer an array over the classes that are declared to be super-classes of this class.
    -
    -
    - listSuperProperties -
    -
    - -
    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - LITERAL -
    -
    -
    RDFS::LITERAL() in RDFS_C.php
    -
    -
    - LITERAL -
    -
    -
    RDFS_RES::LITERAL() in RDFS_RES.php
    -
    -
    - Literal -
    -
    -
    Literal::Literal() in Literal.php
    -
    Constructor
    -
    -
    - Literal -
    -
    -
    Literal in Literal.php
    -
    An RDF literal.
    -
    -
    - LITERAL -
    -
    -
    RDF::LITERAL() in RDF_C.php
    -
    -
    - LITERAL -
    -
    -
    RDF_RES::LITERAL() in RDF_RES.php
    -
    -
    - literalCheck -
    -
    -
    SparqlParser::literalCheck() in SparqlParser.php
    -
    Checks if $token is a Literal.
    -
    -
    - load -
    -
    -
    Model::load() in Model.php
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    -
    - load -
    -
    -
    InfModelF::load() in InfModelF.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - load -
    -
    -
    ResModel::load() in ResModel.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadFromFile -
    -
    - -
    Load a Dataset from a File
    -
    -
    - loadFromString -
    -
    - -
    Load a Datset from a string
    -
    -
    - LOCALITY -
    -
    -
    VCARD_RES::LOCALITY() in VCARD_RES.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD::LOCALITY() in VCARD_C.php
    -
    -
    - LOGO -
    -
    -
    FOAF::LOGO() in FOAF_C.php
    -
    -
    - LOGO -
    -
    -
    FOAF_RES::LOGO() in FOAF_RES.php
    -
    -
    - Literal.php -
    -
    -
    Literal.php in Literal.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $maxframes -
    -
    -
    Snoopy::$maxframes in Snoopy.class.inc
    -
    -
    - $maxlength -
    -
    -
    Snoopy::$maxlength in Snoopy.class.inc
    -
    -
    - $maxredirs -
    -
    -
    Snoopy::$maxredirs in Snoopy.class.inc
    -
    -
    - $MAX_AGE -
    -
    -
    RSSCache::$MAX_AGE in rss_cache.inc
    -
    -
    - $mode -
    -
    -
    SparqlResultParser::$mode in SparqlResultParser.php
    -
    -
    - $model -
    -
    -
    N3Serializer::$model in N3Serializer.php
    -
    -
    - $model -
    -
    -
    RdfParser::$model in RdfParser.php
    -
    -
    - $model -
    -
    -
    NTripleSerializer::$model in NTripleSerializer.php
    -
    -
    - $modelID -
    -
    -
    SparqlEngineDb::$modelID in SparqlEngineDb.php
    -
    Internal ID for our graph model.
    -
    -
    - $m_attributeStatements -
    -
    - -
    -
    - $m_baseURI -
    -
    -
    RdfSerializer::$m_baseURI in RdfSerializer.php
    -
    -
    - $m_contentStatements -
    -
    - -
    -
    - $m_currentSubject -
    -
    - -
    -
    - $m_defaultNamespaces -
    -
    - -
    -
    - $m_groupTypeStatement -
    -
    - -
    -
    - $m_namespaces -
    -
    -
    RdfSerializer::$m_namespaces in RdfSerializer.php
    -
    -
    - $m_nextAutomaticPrefixIndex -
    -
    - -
    -
    - $m_out -
    -
    -
    RdfSerializer::$m_out in RdfSerializer.php
    -
    -
    - $m_rdfAboutElementText -
    -
    - -
    -
    - $m_rdfIDElementText -
    -
    - -
    -
    - $m_rdfResourceElementText -
    -
    - -
    -
    - $m_statements -
    -
    -
    RdfSerializer::$m_statements in RdfSerializer.php
    -
    -
    - MADE -
    -
    -
    FOAF_RES::MADE() in FOAF_RES.php
    -
    -
    - MADE -
    -
    -
    FOAF::MADE() in FOAF_C.php
    -
    -
    - MAGIC_STRING -
    -
    -
    MAGIC_STRING in N3Serializer.php
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS in rss_parse.inc
    -
    Hybrid parser, and object, takes RSS as a string and returns a simple object.
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS::MagpieRSS() in rss_parse.inc
    -
    Set up XML parser, parse source, and return populated RSS object..
    -
    -
    - MAGPIE_CACHE_AGE -
    -
    -
    MAGPIE_CACHE_AGE in magpie_debug.php
    -
    -
    - MAGPIE_DEBUG -
    -
    -
    MAGPIE_DEBUG in magpie_debug.php
    -
    -
    - MAGPIE_DIR -
    -
    -
    MAGPIE_DIR in rss_fetch.inc
    -
    -
    - magpie_error -
    -
    -
    magpie_error() in rss_fetch.inc
    -
    -
    - MAGPIE_EXTLIB -
    -
    -
    MAGPIE_EXTLIB in rss_fetch.inc
    -
    -
    - MAGPIE_OUTPUT_ENCODING -
    -
    -
    MAGPIE_OUTPUT_ENCODING in magpie_debug.php
    -
    -
    - MAGPIE_VERSION -
    -
    -
    MAGPIE_VERSION in rss_fetch.inc
    -
    -
    - MAILER -
    -
    -
    VCARD::MAILER() in VCARD_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD_RES::MAILER() in VCARD_RES.php
    -
    -
    - MAKER -
    -
    -
    FOAF::MAKER() in FOAF_C.php
    -
    -
    - MAKER -
    -
    -
    FOAF_RES::MAKER() in FOAF_RES.php
    -
    -
    - map_attrs -
    -
    -
    map_attrs() in rss_parse.inc
    -
    -
    - matchPattern -
    -
    -
    SparqlEngine::matchPattern() in SparqlEngine.php
    -
    Finds tuples that match one graph pattern.
    -
    -
    - matchPatterns -
    -
    -
    SparqlEngine::matchPatterns() in SparqlEngine.php
    -
    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.
    -
    -
    - MAX_ALLOWED_ABBREVIATED_LENGTH -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MBOX -
    -
    -
    FOAF_RES::MBOX() in FOAF_RES.php
    -
    -
    - MBOX -
    -
    -
    FOAF::MBOX() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF::MBOX_SHA1SUM() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF_RES::MBOX_SHA1SUM() in FOAF_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC_RES::MEDIATOR() in DC_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC::MEDIATOR() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC_RES::MEDIUM() in DC_RES.php
    -
    -
    - MEDIUM -
    -
    -
    DC::MEDIUM() in DC_C.php
    -
    -
    - MEMBER -
    -
    -
    RDFS::MEMBER() in RDFS_C.php
    -
    -
    - MEMBER -
    -
    -
    FOAF_RES::MEMBER() in FOAF_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS_RES::MEMBER() in RDFS_RES.php
    -
    -
    - MEMBER -
    -
    -
    FOAF::MEMBER() in FOAF_C.php
    -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MemModel -
    -
    -
    MemModel in MemModel.php
    -
    A MemModel is an RDF Model, which is stored in the main memory.
    -
    -
    - MemModel -
    -
    -
    MemModel::MemModel() in MemModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - MEMMODEL -
    -
    -
    MEMMODEL in constants.php
    -
    -
    - MESH -
    -
    -
    DC::MESH() in DC_C.php
    -
    -
    - MESH -
    -
    -
    DC_RES::MESH() in DC_RES.php
    -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - mkVal -
    -
    - -
    -
    - MODE -
    -
    -
    ATOM_RES::MODE() in ATOM_RES.php
    -
    -
    - MODE -
    -
    -
    ATOM::MODE() in ATOM_C.php
    -
    -
    - Model -
    -
    -
    Model::Model() in Model.php
    -
    Notice for people who are used to work with older versions of RAP.
    -
    -
    - Model -
    -
    -
    Model in Model.php
    -
    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    -
    -
    - MemModel.php -
    -
    -
    MemModel.php in MemModel.php
    -
    -
    - Model.php -
    -
    -
    Model.php in Model.php
    -
    -
    - ModelFactory.php -
    -
    -
    ModelFactory.php in ModelFactory.php
    -
    -
    - ModelP.php -
    -
    -
    ModelP.php in ModelP.php
    -
    -
    - ModelComparator -
    -
    -
    ModelComparator in ModelComparator.php
    -
    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.
    -
    -
    - modelExists -
    -
    -
    DbStore::modelExists() in DbStore.php
    -
    Check if the DbModel with the given modelURI is already stored in the database
    -
    -
    - ModelFactory -
    -
    -
    ModelFactory in ModelFactory.php
    -
    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.
    -
    -
    - MODIFIED -
    -
    -
    ATOM::MODIFIED() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    DC::MODIFIED() in DC_C.php
    -
    -
    - MODIFIED -
    -
    -
    DC_RES::MODIFIED() in DC_RES.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM_RES::MODIFIED() in ATOM_RES.php
    -
    -
    - moveFirst -
    -
    -
    RdqlResultIterator::moveFirst() in RdqlResultIterator.php
    -
    Moves the pointer to the first result.
    -
    -
    - moveFirst -
    -
    -
    StatementIterator::moveFirst() in StatementIterator.php
    -
    Moves the pointer to the first statement.
    -
    -
    - moveLast -
    -
    -
    StatementIterator::moveLast() in StatementIterator.php
    -
    Moves the pointer to the last statement.
    -
    -
    - moveLast -
    -
    -
    RdqlResultIterator::moveLast() in RdqlResultIterator.php
    -
    Moves the pointer to the last result.
    -
    -
    - moveTo -
    -
    -
    RdqlResultIterator::moveTo() in RdqlResultIterator.php
    -
    Moves the pointer to a specific result.
    -
    -
    - moveTo -
    -
    -
    StatementIterator::moveTo() in StatementIterator.php
    -
    Moves the pointer to a specific statement.
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC::MOVINGIMAGE() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC_RES::MOVINGIMAGE() in DC_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF::MSN_CHAT_ID() in FOAF_C.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF_RES::MSN_CHAT_ID() in FOAF_RES.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF::MYERS_BRIGGS() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF_RES::MYERS_BRIGGS() in FOAF_RES.php
    -
    -
    - magpie_debug.php -
    -
    -
    magpie_debug.php in magpie_debug.php
    -
    -
    - magpie_simple.php -
    -
    -
    magpie_simple.php in magpie_simple.php
    -
    -
    - magpie_slashbox.php -
    -
    -
    magpie_slashbox.php in magpie_slashbox.php
    -
    -
    - modifier.rss_date_parse.php -
    -
    -
    modifier.rss_date_parse.php in modifier.rss_date_parse.php
    -
    -
    - ModelComparator.php -
    -
    -
    ModelComparator.php in ModelComparator.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $named -
    -
    -
    ClientQuery::$named in ClientQuery.php
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - NamedGraphDb.php -
    -
    -
    NamedGraphDb.php in NamedGraphDb.php
    -
    -
    - NamedGraphMem.php -
    -
    -
    NamedGraphMem.php in NamedGraphMem.php
    -
    -
    - Node.php -
    -
    -
    Node.php in Node.php
    -
    -
    - N -
    -
    -
    VCARD_RES::N() in VCARD_RES.php
    -
    -
    - N -
    -
    -
    VCARD::N() in VCARD_C.php
    -
    -
    - N3Parser -
    -
    -
    N3Parser in N3Parser.php
    -
    PHP Notation3 Parser
    -
    -
    - N3Parser -
    -
    -
    N3Parser::N3Parser() in N3Parser.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer::N3Serializer() in N3Serializer.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer in N3Serializer.php
    -
    An abstract object.
    -
    -
    - N3SER_BNODE_SHORT -
    -
    -
    N3SER_BNODE_SHORT in constants.php
    -
    -
    - NAME -
    -
    -
    VCARD_RES::NAME() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS_RES::NAME() in RSS_RES.php
    -
    -
    - NAME -
    -
    -
    VCARD::NAME() in VCARD_C.php
    -
    -
    - NAME -
    -
    -
    ATOM_RES::NAME() in ATOM_RES.php
    -
    -
    - NAME -
    -
    -
    RSS::NAME() in RSS_C.php
    -
    -
    - NAME -
    -
    -
    ATOM::NAME() in ATOM_C.php
    -
    -
    - NAME -
    -
    -
    FOAF_RES::NAME() in FOAF_RES.php
    -
    -
    - NAME -
    -
    -
    FOAF::NAME() in FOAF_C.php
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb in NamedGraphDb.php
    -
    Persistent NamedGraph implementation that extends a DbModel.
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb::NamedGraphDb() in NamedGraphDb.php
    -
    Constructor Do not call this directly.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem::NamedGraphMem() in NamedGraphMem.php
    -
    Constructor You have to supply a graph name. You can supply a URI.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem in NamedGraphMem.php
    -
    NamedGraph implementation that extends a MemModel with a name.
    -
    -
    - NAMESPACE -
    -
    -
    OWLVocabulary::NAMESPACE() in OWLVocabulary.php
    -
    -
    - NAMESPACE -
    -
    -
    RdfsVocabulary::NAMESPACE() in RdfsVocabulary.php
    -
    Answer the string that is the namespace prefix for this vocabulary
    -
    -
    - NAMESPACE_SEPARATOR_CHAR -
    -
    -
    NAMESPACE_SEPARATOR_CHAR in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_STRING -
    -
    - -
    -
    - next -
    -
    -
    IteratorAllGraphsDb::next() in IteratorAllGraphsDb.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    RdqlResultIterator::next() in RdqlResultIterator.php
    -
    Returns the next result array.
    -
    -
    - next -
    -
    -
    ResIterator::next() in ResIterator.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    StatementIterator::next() in StatementIterator.php
    -
    Returns the next statement.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsMem::next() in IteratorAllGraphsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsMem::next() in IteratorFindQuadsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IterFind::next() in IterFind.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    IteratorFindQuadsDb::next() in IteratorFindQuadsDb.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    FindIterator::next() in FindIterator.php
    -
    Returns the next matching statement.
    -
    -
    - NICK -
    -
    -
    FOAF::NICK() in FOAF_C.php
    -
    -
    - NICK -
    -
    -
    FOAF_RES::NICK() in FOAF_RES.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD::NICKNAME() in VCARD_C.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD_RES::NICKNAME() in VCARD_RES.php
    -
    -
    - NIL -
    -
    -
    RDF::NIL() in RDF_C.php
    -
    -
    - NIL -
    -
    -
    RDF_RES::NIL() in RDF_RES.php
    -
    -
    - Node -
    -
    -
    Node in Node.php
    -
    An abstract RDF node.
    -
    -
    - NODE_ID -
    -
    -
    RDF::NODE_ID() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF_RES::NODE_ID() in RDF_RES.php
    -
    -
    - normalize -
    -
    -
    MagpieRSS::normalize() in rss_parse.inc
    -
    -
    - NOTHING -
    -
    -
    OWL::NOTHING() in OWL_C.php
    -
    -
    - NOTHING -
    -
    -
    OWL_RES::NOTHING() in OWL_RES.php
    -
    -
    - NOTHING -
    -
    -
    OWLVocabulary::NOTHING() in OWLVocabulary.php
    -
    -
    - NO_INDEX -
    -
    -
    NO_INDEX in constants.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD::NPROPERTIES() in VCARD_C.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD_RES::NPROPERTIES() in VCARD_RES.php
    -
    -
    - NTripleSerializer -
    -
    -
    NTripleSerializer in NTripleSerializer.php
    -
    PHP N-Triple Serializer
    -
    -
    - NTripleSerializer -
    -
    - -
    Constructor
    -
    -
    - N3Parser.php -
    -
    -
    N3Parser.php in N3Parser.php
    -
    -
    - N3Serializer.php -
    -
    -
    N3Serializer.php in N3Serializer.php
    -
    -
    - NTripleSerializer.php -
    -
    -
    NTripleSerializer.php in NTripleSerializer.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    QueryTriple::$object in QueryTriple.php
    -
    The QueryTriples Object.
    -
    -
    - $object -
    -
    -
    FindIterator::$object in FindIterator.php
    -
    -
    - $offsiteok -
    -
    -
    Snoopy::$offsiteok in Snoopy.class.inc
    -
    -
    - $open -
    -
    -
    GraphPattern::$open in GraphPattern.php
    -
    -
    - $operatorPrecedence -
    -
    - -
    Which order operators are to be treated.
    -
    -
    - $optional -
    -
    -
    GraphPattern::$optional in GraphPattern.php
    -
    -
    - $outer -
    -
    -
    Constraint::$outer in Constraint.php
    -
    True if it is an outer filter, false if not.
    -
    -
    - $output -
    -
    -
    SparqlClient::$output in SparqlClient.php
    -
    -
    - $OWL_NS -
    -
    -
    N3Parser::$OWL_NS in N3Parser.php
    -
    -
    - Object -
    -
    -
    Object in Object.php
    -
    An abstract object.
    -
    -
    - OBJECT -
    -
    -
    RDF_RES::OBJECT() in RDF_RES.php
    -
    -
    - object -
    -
    -
    Statement::object() in Statement.php
    -
    Alias for getObject()
    -
    -
    - OBJECT -
    -
    -
    RDF::OBJECT() in RDF_C.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWLVocabulary::OBJECT_CLASS() in OWLVocabulary.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWL::OBJECT_CLASS() in OWL_C.php
    -
    -
    - OBJECT_CLASS -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWL_RES::ONE_OF() in OWL_RES.php
    -
    -
    - ONE_OF -
    -
    -
    OWL::ONE_OF() in OWL_C.php
    -
    -
    - ONE_OF -
    -
    -
    OWLVocabulary::ONE_OF() in OWLVocabulary.php
    -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - OntClass -
    -
    -
    OntClass::OntClass() in OntClass.php
    -
    Constructor You can supply a uri
    -
    -
    - ONTCLASS -
    -
    -
    RdfsVocabulary::ONTCLASS() in RdfsVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - ONTCLASS -
    -
    -
    OWLVocabulary::ONTCLASS() in OWLVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass in OntClass.php
    -
    Class that represents an ontology node characterising a class description.
    -
    -
    - ONTMODEL -
    -
    -
    ONTMODEL in constants.php
    -
    -
    - OntModel -
    -
    -
    OntModel::OntModel() in OntModel.php
    -
    Constructor.
    -
    -
    - OntModel -
    -
    -
    OntModel in OntModel.php
    -
    Enhanced view of the model that is known to contain ontology data, under a
    -
    -
    - OntClass.php -
    -
    -
    OntClass.php in OntClass.php
    -
    -
    - OntModel.php -
    -
    -
    OntModel.php in OntModel.php
    -
    -
    - OntModelP.php -
    -
    -
    OntModelP.php in OntModelP.php
    -
    -
    - OntProperty.php -
    -
    -
    OntProperty.php in OntProperty.php
    -
    -
    - OntResource.php -
    -
    -
    OntResource.php in OntResource.php
    -
    -
    - OntVocabulary.php -
    -
    -
    OntVocabulary.php in OntVocabulary.php
    -
    -
    - OWLVocabulary.php -
    -
    -
    OWLVocabulary.php in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL::ONTOLOGY() in OWL_C.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWLVocabulary::ONTOLOGY() in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL_RES::ONTOLOGY() in OWL_RES.php
    -
    -
    - OntProperty -
    -
    -
    OntProperty in OntProperty.php
    -
    Class encapsulating a property in an ontology.
    -
    -
    - OntProperty -
    -
    -
    OntProperty::OntProperty() in OntProperty.php
    -
    Constructor.
    -
    -
    - OntResource -
    -
    -
    OntResource in OntResource.php
    -
    Provides a common super-type for all of the abstractions in this ontology representation package.
    -
    -
    - OntResource -
    -
    -
    OntResource::OntResource() in OntResource.php
    -
    Constructor You can supply a uri
    -
    -
    - OntVocabulary -
    -
    -
    OntVocabulary in OntVocabulary.php
    -
    Base Class that encapsulates the elements of a general vocabulary
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL_RES::ON_PROPERTY() in OWL_RES.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWLVocabulary::ON_PROPERTY() in OWLVocabulary.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL::ON_PROPERTY() in OWL_C.php
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF::ORGANIZATION() in FOAF_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF_RES::ORGANIZATION() in FOAF_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD_RES::ORGNAME() in VCARD_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD::ORGNAME() in VCARD_C.php
    -
    -
    - ORGPROPERTIES -
    -
    - -
    -
    - ORGPROPERTIES -
    -
    -
    VCARD::ORGPROPERTIES() in VCARD_C.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD_RES::ORGUNIT() in VCARD_RES.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD::ORGUNIT() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD::OTHER() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD_RES::OTHER() in VCARD_RES.php
    -
    -
    - OWL -
    -
    -
    OWL in OWL_C.php
    -
    OWL Vocabulary (Resource)
    -
    -
    - OWLVocabulary -
    -
    -
    OWLVocabulary in OWLVocabulary.php
    -
    OWL vocabulary items
    -
    -
    - OWL_CLASS -
    -
    -
    OWL_RES::OWL_CLASS() in OWL_RES.php
    -
    -
    - OWL_CLASS -
    -
    -
    OWL::OWL_CLASS() in OWL_C.php
    -
    -
    - OWL_INVERSE_OF -
    -
    -
    OWL_INVERSE_OF in constants.php
    -
    -
    - OWL_NS -
    -
    -
    OWL_NS in constants.php
    -
    -
    - OWL_PREFIX -
    -
    -
    OWL_PREFIX in constants.php
    -
    -
    - OWL_RES -
    -
    -
    OWL_RES in OWL_RES.php
    -
    OWL Vocabulary (ResResource)
    -
    -
    - OWL_SAME_AS -
    -
    -
    OWL_SAME_AS in constants.php
    -
    -
    - OWL_URI -
    -
    -
    OWL_URI in constants.php
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - Object.php -
    -
    -
    Object.php in Object.php
    -
    -
    - OWL.php -
    -
    -
    OWL.php in OWL.php
    -
    -
    - OWL_C.php -
    -
    -
    OWL_C.php in OWL_C.php
    -
    -
    - OWL_RES.php -
    -
    -
    OWL_RES.php in OWL_RES.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parsedNamespaces -
    -
    - -
    -
    - $parseError -
    -
    -
    N3Parser::$parseError in N3Parser.php
    -
    -
    - $parser -
    -
    -
    MagpieRSS::$parser in rss_parse.inc
    -
    -
    - $pass -
    -
    -
    Snoopy::$pass in Snoopy.class.inc
    -
    -
    - $passcookies -
    -
    -
    Snoopy::$passcookies in Snoopy.class.inc
    -
    -
    - $patternId -
    -
    -
    GraphPattern::$patternId in GraphPattern.php
    -
    -
    - $port -
    -
    -
    Snoopy::$port in Snoopy.class.inc
    -
    -
    - $pr -
    -
    -
    SparqlEngineDb::$pr in SparqlEngineDb.php
    -
    Prepared statments preparator instance
    -
    -
    - $predicate -
    -
    -
    QueryTriple::$predicate in QueryTriple.php
    -
    The QueryTriples Predicate.
    -
    -
    - $predicate -
    -
    -
    FindIterator::$predicate in FindIterator.php
    -
    -
    - $prefixes -
    -
    -
    N3Serializer::$prefixes in N3Serializer.php
    -
    -
    - $prefixes -
    -
    -
    Query::$prefixes in Query.php
    -
    Array that contains used prefixes and namespaces.
    -
    -
    - $prefixes -
    -
    -
    ClientQuery::$prefixes in ClientQuery.php
    -
    -
    - $proxy_host -
    -
    -
    Snoopy::$proxy_host in Snoopy.class.inc
    -
    -
    - $proxy_port -
    -
    -
    Snoopy::$proxy_port in Snoopy.class.inc
    -
    -
    - PACKAGE_DATASET -
    -
    -
    PACKAGE_DATASET in constants.php
    -
    -
    - PACKAGE_DBASE -
    -
    -
    PACKAGE_DBASE in constants.php
    -
    -
    - PACKAGE_INFMODEL -
    -
    -
    PACKAGE_INFMODEL in constants.php
    -
    -
    - PACKAGE_MODEL -
    -
    -
    PACKAGE_MODEL in constants.php
    -
    -
    - PACKAGE_ONTMODEL -
    -
    -
    PACKAGE_ONTMODEL in constants.php
    -
    -
    - PACKAGE_RDQL -
    -
    -
    PACKAGE_RDQL in constants.php
    -
    -
    - PACKAGE_RESMODEL -
    -
    -
    PACKAGE_RESMODEL in constants.php
    -
    -
    - PACKAGE_SPARQL -
    -
    -
    PACKAGE_SPARQL in constants.php
    -
    -
    - PACKAGE_SYNTAX_GRDDL -
    -
    -
    PACKAGE_SYNTAX_GRDDL in constants.php
    -
    -
    - PACKAGE_SYNTAX_N3 -
    -
    -
    PACKAGE_SYNTAX_N3 in constants.php
    -
    -
    - PACKAGE_SYNTAX_RDF -
    -
    -
    PACKAGE_SYNTAX_RDF in constants.php
    -
    -
    - PACKAGE_SYNTAX_RSS -
    -
    -
    PACKAGE_SYNTAX_RSS in constants.php
    -
    -
    - PACKAGE_SYNTAX_SPARQLRES -
    -
    -
    PACKAGE_SYNTAX_SPARQLRES in constants.php
    -
    -
    - PACKAGE_UTILITY -
    -
    -
    PACKAGE_UTILITY in constants.php
    -
    -
    - PACKAGE_VOCABULARY -
    -
    -
    PACKAGE_VOCABULARY in constants.php
    -
    -
    - PAGE -
    -
    -
    FOAF_RES::PAGE() in FOAF_RES.php
    -
    -
    - PAGE -
    -
    -
    FOAF::PAGE() in FOAF_C.php
    -
    -
    - parse -
    -
    -
    SparqlResultParser::parse() in SparqlResultParser.php
    -
    Main function of SparqlResultParser
    -
    -
    - parse -
    -
    -
    SparqlParser::parse() in SparqlParser.php
    -
    Main function of SparqlParser. Parses a query string.
    -
    -
    - parse -
    -
    -
    N3Parser::parse() in N3Parser.php
    -
    This parses a N3 string and prints out the triples
    -
    -
    - parse2model -
    -
    -
    N3Parser::parse2model() in N3Parser.php
    -
    This parses a N3 string and returns a memmodel
    -
    -
    - parseAsk -
    -
    -
    SparqlParser::parseAsk() in SparqlParser.php
    -
    Sets result form to 'ASK' and 'COUNT'.
    -
    -
    - parseBase -
    -
    -
    SparqlParser::parseBase() in SparqlParser.php
    -
    Parses the BASE part of the query.
    -
    -
    - parseBrackettedExpression -
    -
    - -
    Parses a bracketted expression.
    -
    -
    - parseCollection -
    -
    - -
    Parses an RDF collection.
    -
    -
    - parseConstraint -
    -
    - -
    Parses a value constraint.
    -
    -
    - parseConstraintTree -
    -
    - -
    Parses a constraint string recursively.
    -
    -
    - parseConstruct -
    -
    -
    SparqlParser::parseConstruct() in SparqlParser.php
    -
    Parses the CONSTRUCT clause.
    -
    -
    - parseDescribe -
    -
    -
    SparqlParser::parseDescribe() in SparqlParser.php
    -
    Adds a new variable to the query and sets result form to 'DESCRIBE'.
    -
    -
    - parseExpression -
    -
    - -
    Parses an expression.
    -
    -
    - parseFile -
    -
    -
    TriXParser::parseFile() in TriXParser.php
    -
    Parse from a file
    -
    -
    - parseFrom -
    -
    -
    SparqlParser::parseFrom() in SparqlParser.php
    -
    Parses the FROM clause.
    -
    -
    - parseGraph -
    -
    -
    SparqlParser::parseGraph() in SparqlParser.php
    -
    Parses a GRAPH clause.
    -
    -
    - parseGraphPattern -
    -
    - -
    Parses a graph pattern.
    -
    -
    - parseLiteral -
    -
    -
    SparqlParser::parseLiteral() in SparqlParser.php
    -
    Parses a literal.
    -
    -
    - parseModifier -
    -
    -
    SparqlParser::parseModifier() in SparqlParser.php
    -
    Parses the solution modifiers of a query.
    -
    -
    - parseNode -
    -
    -
    SparqlParser::parseNode() in SparqlParser.php
    -
    Parses a String to an RDF node.
    -
    -
    - parseOrderCondition -
    -
    - -
    Parses order conditions of a query.
    -
    -
    - parsePrefix -
    -
    -
    SparqlParser::parsePrefix() in SparqlParser.php
    -
    Adds a new namespace prefix to the query object.
    -
    -
    - parseQuery -
    -
    -
    RdqlParser::parseQuery() in RdqlParser.php
    -
    Parse the given RDQL query string and return an array with query variables and constraints.
    -
    -
    - parseQuery -
    -
    -
    SparqlParser::parseQuery() in SparqlParser.php
    -
    Starts parsing the tokenized SPARQL Query.
    -
    -
    - parseResult -
    -
    -
    SparqlClient::parseResult() in SparqlClient.php
    -
    -
    - parseSelect -
    -
    -
    SparqlParser::parseSelect() in SparqlParser.php
    -
    Parses the SELECT part of a query.
    -
    -
    - parseString -
    -
    -
    TriXParser::parseString() in TriXParser.php
    -
    Parse an XML string
    -
    -
    - parseTriplePattern -
    -
    - -
    Parses a triple pattern.
    -
    -
    - parseWhere -
    -
    -
    SparqlParser::parseWhere() in SparqlParser.php
    -
    Parses the WHERE clause.
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF::PARSE_TYPE() in RDF_C.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF_RES::PARSE_TYPE() in RDF_RES.php
    -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - parse_w3cdtf -
    -
    -
    parse_w3cdtf() in rss_utils.inc
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF_RES::PAST_PROJECT() in FOAF_RES.php
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF::PAST_PROJECT() in FOAF_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD::PCODE() in VCARD_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD_RES::PCODE() in VCARD_RES.php
    -
    -
    - PERIOD -
    -
    -
    DC_RES::PERIOD() in DC_RES.php
    -
    -
    - PERIOD -
    -
    -
    DC::PERIOD() in DC_C.php
    -
    -
    - PERSON -
    -
    -
    ATOM_RES::PERSON() in ATOM_RES.php
    -
    -
    - PERSON -
    -
    -
    ATOM::PERSON() in ATOM_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF::PERSON() in FOAF_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF_RES::PERSON() in FOAF_RES.php
    -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PHONE -
    -
    -
    FOAF_RES::PHONE() in FOAF_RES.php
    -
    -
    - PHONE -
    -
    -
    FOAF::PHONE() in FOAF_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD::PHOTO() in VCARD_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD_RES::PHOTO() in VCARD_RES.php
    -
    -
    - php4_create_parser -
    -
    - -
    Instaniate an XML parser under PHP4
    -
    -
    - php5_create_parser -
    -
    - -
    Instantiate an XML parser under PHP5
    -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PLAN -
    -
    -
    FOAF_RES::PLAN() in FOAF_RES.php
    -
    -
    - PLAN -
    -
    -
    FOAF::PLAN() in FOAF_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD::POBOX() in VCARD_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD_RES::POBOX() in VCARD_RES.php
    -
    -
    - POINT -
    -
    -
    DC::POINT() in DC_C.php
    -
    -
    - POINT -
    -
    -
    DC_RES::POINT() in DC_RES.php
    -
    -
    - PREDICATE -
    -
    -
    RDF::PREDICATE() in RDF_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF_RES::PREDICATE() in RDF_RES.php
    -
    -
    - predicate -
    -
    -
    Statement::predicate() in Statement.php
    -
    Alias for getPredicate()
    -
    -
    - PREFIX -
    -
    -
    VCARD_RES::PREFIX() in VCARD_RES.php
    -
    -
    - PREFIX -
    -
    -
    VCARD::PREFIX() in VCARD_C.php
    -
    -
    - prepare -
    -
    -
    SparqlParser::prepare() in SparqlParser.php
    -
    Set all internal variables to a clear state before we start parsing.
    -
    -
    - prepare -
    -
    -
    SparqlEngineDb::prepare() in SparqlEngineDb.php
    -
    Create a prepared statement that can be executed later.
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - preselectGraphs -
    -
    - -
    Looks in from and from named part of the query and adds the graphs to the graphlist.
    -
    -
    - previous -
    -
    -
    StatementIterator::previous() in StatementIterator.php
    -
    Returns the previous statement.
    -
    -
    - previous -
    -
    -
    RdqlResultIterator::previous() in RdqlResultIterator.php
    -
    Returns the previous result.
    -
    -
    - PRIMARY_TOPIC -
    -
    -
    FOAF::PRIMARY_TOPIC() in FOAF_C.php
    -
    -
    - PRIMARY_TOPIC -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    -
    OWLVocabulary::PRIOR_VERSION() in OWLVocabulary.php
    -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRODID -
    -
    -
    VCARD::PRODID() in VCARD_C.php
    -
    -
    - PRODID -
    -
    -
    VCARD_RES::PRODID() in VCARD_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF_RES::PROJECT() in FOAF_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF::PROJECT() in FOAF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF::PROPERTY() in RDF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF_RES::PROPERTY() in RDF_RES.php
    -
    -
    - PROPERTY -
    -
    -
    OWLVocabulary::PROPERTY() in OWLVocabulary.php
    -
    -
    - PROPERTY -
    -
    -
    OWL::PROPERTY() in OWL_C.php
    -
    -
    - PROPERTY -
    -
    -
    OWL_RES::PROPERTY() in OWL_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF_RES::PUBLICATIONS() in FOAF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF::PUBLICATIONS() in FOAF_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC::PUBLISHER() in DC_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC_RES::PUBLISHER() in DC_RES.php
    -
    -
    - putModel -
    -
    -
    DbStore::putModel() in DbStore.php
    -
    Store a MemModel or another DbModel from a different DbStore in the database.
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    - -
    -
    - $query -
    -
    -
    SparqlEngineDb::$query in SparqlEngineDb.php
    -
    Sparql Query object.
    -
    -
    - $query -
    -
    -
    ClientQuery::$query in ClientQuery.php
    -
    -
    - $query -
    -
    -
    SparqlParser::$query in SparqlParser.php
    -
    The query Object
    -
    -
    - $query -
    -
    -
    SparqlEngine::$query in SparqlEngine.php
    -
    The query object.
    -
    -
    - $queryParser -
    -
    -
    Model::$queryParser in Model.php
    -
    SparqlParser so we can re-use it
    -
    -
    - $querystring -
    -
    -
    SparqlParser::$querystring in SparqlParser.php
    -
    The Querystring
    -
    -
    - Quad.php -
    -
    -
    Quad.php in Quad.php
    -
    -
    - qnameCheck -
    -
    -
    SparqlParser::qnameCheck() in SparqlParser.php
    -
    Checks if $token is a qname.
    -
    -
    - Quad -
    -
    -
    Quad::Quad() in Quad.php
    -
    Constructor Creates a Quad from four Nodes.
    -
    -
    - Quad -
    -
    -
    Quad in Quad.php
    -
    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.
    -
    -
    - query -
    -
    -
    SparqlClient::query() in SparqlClient.php
    -
    Main function of SparqlClient.
    -
    -
    - Query -
    -
    -
    Query::Query() in Query.php
    -
    Constructor
    -
    -
    - query -
    -
    -
    ClientQuery::query() in ClientQuery.php
    -
    Adds the SPARQL query string to the query object.
    -
    -
    - Query -
    -
    -
    Query in Query.php
    -
    The Class Query represents a SPARQL query.
    -
    -
    - queryDb -
    -
    -
    SparqlEngineDb::queryDb() in SparqlEngineDb.php
    -
    Sends the sql to the database and returns the results.
    -
    -
    - queryModel -
    -
    -
    SparqlEngineDb::queryModel() in SparqlEngineDb.php
    -
    Query the database with the given SPARQL query.
    -
    -
    - queryModel -
    -
    -
    RdqlDbEngine::queryModel() in RdqlDbEngine.php
    -
    Perform an RDQL Query on the given DbModel.
    -
    -
    - queryModel -
    -
    -
    SparqlEngine::queryModel() in SparqlEngine.php
    -
    The query engine's main method.
    -
    -
    - queryModel -
    -
    -
    RdqlMemEngine::queryModel() in RdqlMemEngine.php
    -
    Perform an RDQL Query on the given MemModel.
    -
    -
    - queryMultiple -
    -
    -
    SparqlEngineDb::queryMultiple() in SparqlEngineDb.php
    -
    Executes multiple SQL queries and returns an array of results.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple in QueryTriple.php
    -
    Represents a query triple.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple::QueryTriple() in QueryTriple.php
    -
    Constructor
    -
    -
    - Query.php -
    -
    -
    Query.php in Query.php
    -
    -
    - QueryTriple.php -
    -
    -
    QueryTriple.php in QueryTriple.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $rawheaders -
    -
    -
    Snoopy::$rawheaders in Snoopy.class.inc
    -
    -
    - $RDF_NS -
    -
    -
    N3Parser::$RDF_NS in N3Parser.php
    -
    -
    - $rdf_parser -
    -
    -
    RdfParser::$rdf_parser in RdfParser.php
    -
    -
    - $rdf_qnames -
    -
    -
    RdfSerializer::$rdf_qnames in RdfSerializer.php
    -
    -
    - $rdf_qname_prefix -
    -
    - -
    -
    - $read_timeout -
    -
    -
    Snoopy::$read_timeout in Snoopy.class.inc
    -
    -
    - $referer -
    -
    -
    Snoopy::$referer in Snoopy.class.inc
    -
    -
    - $res -
    -
    -
    NTripleSerializer::$res in NTripleSerializer.php
    -
    -
    - $res -
    -
    -
    N3Serializer::$res in N3Serializer.php
    -
    -
    - $resourcetext -
    -
    -
    N3Serializer::$resourcetext in N3Serializer.php
    -
    -
    - $resourcetext_taken -
    -
    - -
    -
    - $resParser -
    -
    -
    SparqlResultParser::$resParser in SparqlResultParser.php
    -
    -
    - $response_code -
    -
    -
    Snoopy::$response_code in Snoopy.class.inc
    -
    -
    - $resultForm -
    -
    -
    Query::$resultForm in Query.php
    -
    What form/type of result should be returned.
    -
    -
    - $resultPart -
    -
    -
    Query::$resultPart in Query.php
    -
    Contains the result part of the SPARQL query.
    -
    -
    - $results -
    -
    -
    Snoopy::$results in Snoopy.class.inc
    -
    -
    - $resultVars -
    -
    -
    Query::$resultVars in Query.php
    -
    Array of result variables that shall be returned.
    -
    -
    - Resource.php -
    -
    -
    Resource.php in Resource.php
    -
    -
    - RdfsVocabulary.php -
    -
    -
    RdfsVocabulary.php in RdfsVocabulary.php
    -
    -
    - RANGE -
    -
    -
    OWLVocabulary::RANGE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RDFS_RES::RANGE() in RDFS_RES.php
    -
    -
    - RANGE -
    -
    -
    RdfsVocabulary::RANGE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RDFS::RANGE() in RDFS_C.php
    -
    -
    - RDF -
    -
    -
    RDF in RDF_C.php
    -
    Resource Description Framework (RDF) Vocabulary (Resource)
    -
    -
    - RdfAPI.php -
    -
    -
    RdfAPI.php in RdfAPI.php
    -
    -
    - RDFAPI_ERROR -
    -
    -
    RDFAPI_ERROR in constants.php
    -
    -
    - RdfParser -
    -
    -
    RdfParser in RdfParser.php
    -
    An RDF paser.
    -
    -
    - RDFS -
    -
    -
    RDFS in RDFS_C.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer::RdfSerializer() in RdfSerializer.php
    -
    Constructor
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer in RdfSerializer.php
    -
    An RDF seralizer.
    -
    -
    - RdfsVocabulary -
    -
    -
    RdfsVocabulary in RdfsVocabulary.php
    -
    RDFS vocabulary items
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_CLASS in constants.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS::RDFS_CLASS() in RDFS_C.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_RES::RDFS_CLASS() in RDFS_RES.php
    -
    -
    - RDFS_COMMENT -
    -
    -
    RDFS_COMMENT in constants.php
    -
    -
    - RDFS_DATATYPE -
    -
    -
    RDFS_DATATYPE in constants.php
    -
    -
    - RDFS_DOMAIN -
    -
    -
    RDFS_DOMAIN in constants.php
    -
    -
    - RDFS_IS_DEFINED_BY -
    -
    -
    RDFS_IS_DEFINED_BY in constants.php
    -
    -
    - RDFS_LABEL -
    -
    -
    RDFS_LABEL in constants.php
    -
    -
    - RDFS_LITERAL -
    -
    -
    RDFS_LITERAL in constants.php
    -
    -
    - RDFS_RANGE -
    -
    -
    RDFS_RANGE in constants.php
    -
    -
    - RDFS_RES -
    -
    -
    RDFS_RES in RDFS_RES.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    -
    -
    - RDFS_RESOURCE -
    -
    -
    RDFS_RESOURCE in constants.php
    -
    -
    - RDFS_SEE_ALSO -
    -
    -
    RDFS_SEE_ALSO in constants.php
    -
    -
    - RDFS_SUBCLASSOF -
    -
    -
    RDFS_SUBCLASSOF in constants.php
    -
    -
    - RDFS_SUBPROPERTYOF -
    -
    -
    RDFS_SUBPROPERTYOF in constants.php
    -
    -
    - RDFS_VOCABULARY -
    -
    -
    RDFS_VOCABULARY in constants.php
    -
    -
    - RDFUtil -
    -
    -
    RDFUtil in RdfUtil.php
    -
    Useful utility methods.
    -
    -
    - RDF_ABOUT -
    -
    -
    RDF_ABOUT in constants.php
    -
    -
    - RDF_ABOUT_EACH -
    -
    -
    RDF_ABOUT_EACH in constants.php
    -
    -
    - RDF_ABOUT_EACH_PREFIX -
    -
    -
    RDF_ABOUT_EACH_PREFIX in constants.php
    -
    -
    - RDF_ALT -
    -
    -
    RDF_ALT in constants.php
    -
    -
    - RDF_BAG -
    -
    -
    RDF_BAG in constants.php
    -
    -
    - RDF_BAG_ID -
    -
    -
    RDF_BAG_ID in constants.php
    -
    -
    - RDF_DATATYPE -
    -
    -
    RDF_DATATYPE in constants.php
    -
    -
    - RDF_DATATYPE_SCHEMA_URI -
    -
    -
    RDF_DATATYPE_SCHEMA_URI in constants.php
    -
    -
    - RDF_DESCRIPTION -
    -
    -
    RDF_DESCRIPTION in constants.php
    -
    -
    - RDF_FIRST -
    -
    -
    RDF_FIRST in constants.php
    -
    -
    - RDF_ID -
    -
    -
    RDF_ID in constants.php
    -
    -
    - RDF_LI -
    -
    -
    RDF_LI in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_RES::RDF_LIST() in RDF_RES.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_LIST in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF::RDF_LIST() in RDF_C.php
    -
    -
    - RDF_NAMESPACE_PREFIX -
    -
    -
    RDF_NAMESPACE_PREFIX in constants.php
    -
    -
    - RDF_NAMESPACE_URI -
    -
    -
    RDF_NAMESPACE_URI in constants.php
    -
    -
    - RDF_NIL -
    -
    -
    RDF_NIL in constants.php
    -
    -
    - RDF_NODEID -
    -
    -
    RDF_NODEID in constants.php
    -
    -
    - RDF_OBJECT -
    -
    -
    RDF_OBJECT in constants.php
    -
    -
    - RDF_OBJECT_TYPE_BNODE -
    -
    -
    RDF_OBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_LITERAL -
    -
    -
    RDF_OBJECT_TYPE_LITERAL in constants.php
    -
    -
    - RDF_OBJECT_TYPE_RESOURCE -
    -
    -
    RDF_OBJECT_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_XML -
    -
    -
    RDF_OBJECT_TYPE_XML in constants.php
    -
    -
    - RDF_PARSE_TYPE -
    -
    -
    RDF_PARSE_TYPE in constants.php
    -
    -
    - RDF_PARSE_TYPE_COLLECTION -
    -
    -
    RDF_PARSE_TYPE_COLLECTION in constants.php
    -
    -
    - RDF_PARSE_TYPE_LITERAL -
    -
    -
    RDF_PARSE_TYPE_LITERAL in constants.php
    -
    -
    - RDF_PARSE_TYPE_RESOURCE -
    -
    -
    RDF_PARSE_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_PREDICATE -
    -
    -
    RDF_PREDICATE in constants.php
    -
    -
    - RDF_PROPERTY -
    -
    -
    RDF_PROPERTY in constants.php
    -
    -
    - RDF_RDF -
    -
    -
    RDF_RDF in constants.php
    -
    -
    - RDF_RES -
    -
    -
    RDF_RES in RDF_RES.php
    -
    Resource Description Framework (RDF) Vocabulary (ResResource)
    -
    -
    - RDF_RESOURCE -
    -
    -
    RDF_RESOURCE in constants.php
    -
    -
    - RDF_REST -
    -
    -
    RDF_REST in constants.php
    -
    -
    - RDF_SCHEMA_PREFIX -
    -
    -
    RDF_SCHEMA_PREFIX in constants.php
    -
    -
    - RDF_SCHEMA_URI -
    -
    -
    RDF_SCHEMA_URI in constants.php
    -
    -
    - RDF_SEEALSO -
    -
    -
    RDF_SEEALSO in constants.php
    -
    -
    - RDF_SEQ -
    -
    -
    RDF_SEQ in constants.php
    -
    -
    - RDF_STATEMENT -
    -
    -
    RDF_STATEMENT in constants.php
    -
    -
    - RDF_SUBJECT -
    -
    -
    RDF_SUBJECT in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_ANONYMOUS -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_BNODE -
    -
    -
    RDF_SUBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_DISTRIBUTED -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_PREFIX -
    -
    -
    RDF_SUBJECT_TYPE_PREFIX in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_URI -
    -
    -
    RDF_SUBJECT_TYPE_URI in constants.php
    -
    -
    - RDF_TYPE -
    -
    -
    RDF_TYPE in constants.php
    -
    -
    - RDF_VALUE -
    -
    -
    RDF_VALUE in constants.php
    -
    -
    - RDF_XMLLITERAL -
    -
    -
    RDF_XMLLITERAL in constants.php
    -
    -
    - RDQL.php -
    -
    -
    RDQL.php in RDQL.php
    -
    -
    - RdqlDbEngine.php -
    -
    -
    RdqlDbEngine.php in RdqlDbEngine.php
    -
    -
    - RdqlEngine.php -
    -
    -
    RdqlEngine.php in RdqlEngine.php
    -
    -
    - RdqlMemEngine.php -
    -
    -
    RdqlMemEngine.php in RdqlMemEngine.php
    -
    -
    - RdqlParser.php -
    -
    -
    RdqlParser.php in RdqlParser.php
    -
    -
    - RdqlResultIterator.php -
    -
    -
    RdqlResultIterator.php in RdqlResultIterator.php
    -
    -
    - RdqlDbEngine -
    -
    -
    RdqlDbEngine in RdqlDbEngine.php
    -
    This class performs as RDQL query on a DbModel.
    -
    -
    - RdqlEngine -
    -
    -
    RdqlEngine in RdqlEngine.php
    -
    Some general methods common for RdqlMemEngine and RdqlDbEngine
    -
    -
    - RdqlMemEngine -
    -
    -
    RdqlMemEngine in RdqlMemEngine.php
    -
    This class performes as RDQL query on a MemModel.
    -
    -
    - RdqlParser -
    -
    -
    RdqlParser in RdqlParser.php
    -
    This class contains methods for parsing an Rdql query string into PHP variables.
    -
    -
    - rdqlQuery -
    -
    -
    MemModel::rdqlQuery() in MemModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    ResModel::rdqlQuery() in ResModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    DbModel::rdqlQuery() in DbModel.php
    -
    Perform an RDQL query on this DbModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this DBModel.
    -
    -
    - RdqlResultIterator -
    -
    - -
    Constructor
    -
    -
    - RdqlResultIterator -
    -
    -
    RdqlResultIterator in RdqlResultIterator.php
    -
    Iterator for traversing Rdql results.
    -
    -
    - RDQL_AND_ERR -
    -
    -
    RDQL_AND_ERR in constants.php
    -
    -
    - RDQL_ERR -
    -
    -
    RDQL_ERR in constants.php
    -
    -
    - RDQL_SEL_ERR -
    -
    -
    RDQL_SEL_ERR in constants.php
    -
    -
    - RDQL_SRC_ERR -
    -
    -
    RDQL_SRC_ERR in constants.php
    -
    -
    - RDQL_SYN_ERR -
    -
    -
    RDQL_SYN_ERR in constants.php
    -
    -
    - RDQL_USG_ERR -
    -
    -
    RDQL_USG_ERR in constants.php
    -
    -
    - RDQL_WHR_ERR -
    -
    -
    RDQL_WHR_ERR in constants.php
    -
    -
    - REFERENCES -
    -
    -
    DC::REFERENCES() in DC_C.php
    -
    -
    - REFERENCES -
    -
    -
    DC_RES::REFERENCES() in DC_RES.php
    -
    -
    - regex -
    -
    -
    regex() in FilterFunctions.php
    -
    Evaluates the regex() function. Returns true if the regex is matched false if not.
    -
    -
    - REGION -
    -
    -
    VCARD::REGION() in VCARD_C.php
    -
    -
    - REGION -
    -
    -
    VCARD_RES::REGION() in VCARD_RES.php
    -
    -
    - reify -
    -
    -
    MemModel::reify() in MemModel.php
    -
    Reifies the MemModel.
    -
    -
    - reify -
    -
    -
    Statement::reify() in Statement.php
    -
    Reifies a statement.
    -
    -
    - reify -
    -
    -
    DbModel::reify() in DbModel.php
    -
    Reify the DbModel.
    -
    -
    - REL -
    -
    -
    ATOM::REL() in ATOM_C.php
    -
    -
    - REL -
    -
    -
    ATOM_RES::REL() in ATOM_RES.php
    -
    -
    - remove -
    -
    -
    ResModel::remove() in ResModel.php
    -
    Removes the statement of ResResources(ResTriples) from the MemModel.
    -
    -
    - remove -
    -
    -
    InfModelF::remove() in InfModelF.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    ResList::remove() in ResList.php
    -
    Remove the given value from this list.
    -
    -
    - remove -
    -
    -
    MemModel::remove() in MemModel.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    DbModel::remove() in DbModel.php
    -
    Remove the given triple from this DbModel.
    -
    -
    - remove -
    -
    -
    ResContainer::remove() in ResContainer.php
    -
    Remove a value from the container.
    -
    -
    - remove -
    -
    -
    InfModelB::remove() in InfModelB.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeAll -
    -
    -
    ResResource::removeAll() in ResResource.php
    -
    Delete all the statements with predicate p for this resource from its associated model.
    -
    -
    - removeAtIndex -
    -
    - -
    Remove the member at the specified index.
    -
    -
    - removeComment -
    -
    -
    OntResource::removeComment() in OntResource.php
    -
    Remove the statement that the given ResLiteral is a comment on this resource.
    -
    -
    - removeDefinedBy -
    -
    - -
    Remove the statement that this resource is defined by the given resource.
    -
    -
    - removeDomain -
    -
    -
    OntProperty::removeDomain() in OntProperty.php
    -
    Remove the given class from the stated domain(s) of this property.
    -
    -
    - removeHead -
    -
    -
    ResList::removeHead() in ResList.php
    -
    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.
    -
    -
    - removeInfered -
    -
    - -
    Removes all infered statements from the model but keeps the infernece rules.
    -
    -
    - removeLabelProperty -
    -
    - -
    Remove the statement that the given ResLiteral is a label on this resource.
    -
    -
    - removeList -
    -
    -
    ResList::removeList() in ResList.php
    -
    Remove all of the components of this list from the model.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraphDb -
    -
    - -
    Removes the graph with all statements from the database.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - removeProperties -
    -
    - -
    Delete all the properties for this resource from the associated model.
    -
    -
    - removeProperty -
    -
    - -
    Remove the specific property-value pair from this resource.
    -
    -
    - removeQuad -
    -
    -
    DatasetMem::removeQuad() in DatasetMem.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeQuad -
    -
    -
    DatasetDb::removeQuad() in DatasetDb.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeRange -
    -
    -
    OntProperty::removeRange() in OntProperty.php
    -
    Remove the given class from the stated range(es) of this property.
    -
    -
    - removeRDFType -
    -
    -
    OntResource::removeRDFType() in OntResource.php
    -
    Remove the statement that this resource is of the given RDF type.
    -
    -
    - removeSeeAlso -
    -
    -
    OntResource::removeSeeAlso() in OntResource.php
    -
    Remove the statement indicating the given resource as a source of additional information about this resource.
    -
    -
    - removeSubClass -
    -
    - -
    Remove the given class from the sub-classes of this class.
    -
    -
    - removeSubProperty -
    -
    - -
    Remove the given property from the sub-properties of this property.
    -
    -
    - removeSuperClass -
    -
    - -
    Remove the given class from the super-classes of this class.
    -
    -
    - removeSuperProperty -
    -
    - -
    Remove the given property from the super-properties of this property.
    -
    -
    - renameBlanks -
    -
    -
    ModelComparator::renameBlanks() in ModelComparator.php
    -
    Renames the models Blanknodes.
    -
    -
    - replace -
    -
    -
    ResList::replace() in ResList.php
    -
    Replace the value at the i'th position in the list with the given value
    -
    -
    - replace -
    -
    -
    DbModel::replace() in DbModel.php
    -
    General method to replace nodes of a DbModel.
    -
    -
    - replace -
    -
    -
    MemModel::replace() in MemModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replace -
    -
    -
    InfModel::replace() in InfModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - REPLACES -
    -
    -
    DC::REPLACES() in DC_C.php
    -
    -
    - REPLACES -
    -
    -
    DC_RES::REPLACES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC::REQUIRES() in DC_C.php
    -
    -
    - REQUIRES -
    -
    -
    DC_RES::REQUIRES() in DC_RES.php
    -
    -
    - ResAlt -
    -
    -
    ResAlt::ResAlt() in ResAlt.php
    -
    Constructor You can supply a URI
    -
    -
    - ResAlt -
    -
    -
    ResAlt in ResAlt.php
    -
    This interface defines methods for accessing RDF Alternative resources.
    -
    -
    - ResBag -
    -
    -
    ResBag::ResBag() in ResBag.php
    -
    Constructor You can supply a URI
    -
    -
    - ResBag -
    -
    -
    ResBag in ResBag.php
    -
    This interface defines methods for accessing RDF Bag resources.
    -
    -
    - ResContainer -
    -
    -
    ResContainer in ResContainer.php
    -
    An RDF Container.
    -
    -
    - ResContainer -
    -
    -
    ResContainer::ResContainer() in ResContainer.php
    -
    Constructor You can supply a URI
    -
    -
    - ResIterator -
    -
    -
    ResIterator::ResIterator() in ResIterator.php
    -
    Constructor.
    -
    -
    - ResIterator -
    -
    -
    ResIterator in ResIterator.php
    -
    Implementation of a resource iterator.
    -
    -
    - ResList -
    -
    -
    ResList in ResList.php
    -
    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.
    -
    -
    - ResList -
    -
    -
    ResList::ResList() in ResList.php
    -
    Constructor You can supply a URI
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral in ResLiteral.php
    -
    An RDF literal.
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral::ResLiteral() in ResLiteral.php
    -
    Constructor You have to supply a string.
    -
    -
    - ResModel -
    -
    -
    ResModel in ResModel.php
    -
    A ResModel provides an resource centric view on an underlying RDF model.
    -
    -
    - ResModel -
    -
    -
    ResModel::ResModel() in ResModel.php
    -
    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.
    -
    -
    - RESMODEL -
    -
    -
    RESMODEL in constants.php
    -
    -
    - ResAlt.php -
    -
    -
    ResAlt.php in ResAlt.php
    -
    -
    - ResBag.php -
    -
    -
    ResBag.php in ResBag.php
    -
    -
    - ResContainer.php -
    -
    -
    ResContainer.php in ResContainer.php
    -
    -
    - ResIterator.php -
    -
    -
    ResIterator.php in ResIterator.php
    -
    -
    - ResList.php -
    -
    -
    ResList.php in ResList.php
    -
    -
    - ResLiteral.php -
    -
    -
    ResLiteral.php in ResLiteral.php
    -
    -
    - ResModel.php -
    -
    -
    ResModel.php in ResModel.php
    -
    -
    - ResModelP.php -
    -
    -
    ResModelP.php in ResModelP.php
    -
    -
    - ResProperty.php -
    -
    -
    ResProperty.php in ResProperty.php
    -
    -
    - ResResource.php -
    -
    -
    ResResource.php in ResResource.php
    -
    -
    - ResSeq.php -
    -
    -
    ResSeq.php in ResSeq.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS::RESOURCE() in RDFS_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF_RES::RESOURCE() in RDF_RES.php
    -
    -
    - RESOURCE -
    -
    -
    RDF::RESOURCE() in RDF_C.php
    -
    -
    - Resource -
    -
    -
    Resource::Resource() in Resource.php
    -
    Constructor Takes an URI or a namespace/localname combination
    -
    -
    - RESOURCE -
    -
    -
    RDFS_RES::RESOURCE() in RDFS_RES.php
    -
    -
    - Resource -
    -
    -
    Resource in Resource.php
    -
    An RDF resource.
    -
    -
    - ResProperty -
    -
    -
    ResProperty::ResProperty() in ResProperty.php
    -
    Constructor You can supply a URI
    -
    -
    - ResProperty -
    -
    -
    ResProperty in ResProperty.php
    -
    An RDF Property.
    -
    -
    - ResResource -
    -
    -
    ResResource in ResResource.php
    -
    An RDF Resource.
    -
    -
    - ResResource -
    -
    -
    ResResource::ResResource() in ResResource.php
    -
    Constructor You can supply a uri
    -
    -
    - ResSeq -
    -
    -
    ResSeq in ResSeq.php
    -
    This interface defines methods for accessing RDF Sequence resources.
    -
    -
    - ResSeq -
    -
    -
    ResSeq::ResSeq() in ResSeq.php
    -
    Constructor You can supply a URI
    -
    -
    - REST -
    -
    -
    RDF_RES::REST() in RDF_RES.php
    -
    -
    - REST -
    -
    -
    RDF::REST() in RDF_C.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL_RES::RESTRICTION() in OWL_RES.php
    -
    -
    - RESTRICTION -
    -
    -
    OWLVocabulary::RESTRICTION() in OWLVocabulary.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL::RESTRICTION() in OWL_C.php
    -
    -
    - returnResult -
    -
    -
    SparqlClient::returnResult() in SparqlClient.php
    -
    Returns the query result.
    -
    -
    - REV -
    -
    -
    VCARD_RES::REV() in VCARD_RES.php
    -
    -
    - REV -
    -
    -
    VCARD::REV() in VCARD_C.php
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsDb::rewind() in IteratorAllGraphsDb.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    ResIterator::rewind() in ResIterator.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsMem::rewind() in IteratorAllGraphsMem.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsDb::rewind() in IteratorFindQuadsDb.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsMem::rewind() in IteratorFindQuadsMem.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IterFind::rewind() in IterFind.php
    -
    Resets iterator list to start
    -
    -
    - RFC1766 -
    -
    -
    DC_RES::RFC1766() in DC_RES.php
    -
    -
    - RFC1766 -
    -
    -
    DC::RFC1766() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC::RFC3066() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC_RES::RFC3066() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC_RES::RIGHTS() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC::RIGHTS() in DC_C.php
    -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - ROLE -
    -
    -
    VCARD::ROLE() in VCARD_C.php
    -
    -
    - ROLE -
    -
    -
    VCARD_RES::ROLE() in VCARD_RES.php
    -
    -
    - RSS -
    -
    -
    RSS in rss_parse.inc
    -
    Project: MagpieRSS: a simple RSS integration tool File: rss_parse.inc - parse an RSS or Atom feed return as a simple object.
    -
    -
    - RSS -
    -
    -
    RSS in RSS_C.php
    -
    RSS Vocabulary (Resource)
    -
    -
    - RSSCache -
    -
    -
    RSSCache::RSSCache() in rss_cache.inc
    -
    -
    - RSSCache -
    -
    -
    RSSCache in rss_cache.inc
    -
    -
    - RssParser -
    -
    -
    RssParser in RssParser.php
    -
    RSS/ATOM Parser
    -
    -
    - RSS_NS -
    -
    -
    RSS_NS in constants.php
    -
    -
    - RSS_RES -
    -
    -
    RSS_RES in RSS_RES.php
    -
    RSS Vocabulary (ResResource)
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - RdfParser.php -
    -
    -
    RdfParser.php in RdfParser.php
    -
    -
    - RdfSerializer.php -
    -
    -
    RdfSerializer.php in RdfSerializer.php
    -
    -
    - RssParser.php -
    -
    -
    RssParser.php in RssParser.php
    -
    -
    - rss_cache.inc -
    -
    -
    rss_cache.inc in rss_cache.inc
    -
    -
    - rss_fetch.inc -
    -
    -
    rss_fetch.inc in rss_fetch.inc
    -
    -
    - rss_parse.inc -
    -
    -
    rss_parse.inc in rss_parse.inc
    -
    -
    - rss_utils.inc -
    -
    -
    rss_utils.inc in rss_utils.inc
    -
    -
    - RdfUtil.php -
    -
    -
    RdfUtil.php in RdfUtil.php
    -
    -
    - RDF.php -
    -
    -
    RDF.php in RDF.php
    -
    -
    - RDFS.php -
    -
    -
    RDFS.php in RDFS.php
    -
    -
    - RDFS_C.php -
    -
    -
    RDFS_C.php in RDFS_C.php
    -
    -
    - RDFS_RES.php -
    -
    -
    RDFS_RES.php in RDFS_RES.php
    -
    -
    - RDF_C.php -
    -
    -
    RDF_C.php in RDF_C.php
    -
    -
    - RDF_RES.php -
    -
    -
    RDF_RES.php in RDF_RES.php
    -
    -
    - RSS.php -
    -
    -
    RSS.php in RSS.php
    -
    -
    - RSS_C.php -
    -
    -
    RSS_C.php in RSS_C.php
    -
    -
    - RSS_RES.php -
    -
    -
    RSS_RES.php in RSS_RES.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $server -
    -
    -
    SparqlClient::$server in SparqlClient.php
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sg -
    -
    -
    SparqlEngineDb::$sg in SparqlEngineDb.php
    -
    SQL generator instance
    -
    -
    - $solutionModifier -
    -
    - -
    Optional solution modifier of the query.
    -
    -
    - $sops -
    -
    -
    SparqlParser::$sops in SparqlParser.php
    -
    Operators introduced by sparql
    -
    -
    - $sort_model -
    -
    -
    RdfSerializer::$sort_model in RdfSerializer.php
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - $stack -
    -
    -
    MagpieRSS::$stack in rss_parse.inc
    -
    -
    - $status -
    -
    -
    Snoopy::$status in Snoopy.class.inc
    -
    -
    - $strXmlData -
    -
    -
    SparqlResultParser::$strXmlData in SparqlResultParser.php
    -
    -
    - $subject -
    -
    -
    QueryTriple::$subject in QueryTriple.php
    -
    The QueryTriples Subject.
    -
    -
    - Statement.php -
    -
    -
    Statement.php in Statement.php
    -
    -
    - sameListAs -
    -
    -
    ResList::sameListAs() in ResList.php
    -
    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.
    -
    -
    - SAME_AS -
    -
    -
    OWL_RES::SAME_AS() in OWL_RES.php
    -
    -
    - SAME_AS -
    -
    -
    OWLVocabulary::SAME_AS() in OWLVocabulary.php
    -
    -
    - SAME_AS -
    -
    -
    OWL::SAME_AS() in OWL_C.php
    -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    -
    OWLVocabulary::SAME_CLASS_AS() in OWLVocabulary.php
    -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - saveAs -
    -
    -
    RdfSerializer::saveAs() in RdfSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    InfModelB::saveAs() in InfModelB.php
    -
    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.
    -
    -
    - saveAs -
    -
    -
    MemModel::saveAs() in MemModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - saveAs -
    -
    -
    NTripleSerializer::saveAs() in NTripleSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    ResModel::saveAs() in ResModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - saveAs -
    -
    -
    DbModel::saveAs() in DbModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    -
    -
    - saveAs -
    -
    -
    N3Serializer::saveAs() in N3Serializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SEEALSO -
    -
    -
    RDFS::SEEALSO() in RDFS_C.php
    -
    -
    - SEEALSO -
    -
    -
    RDFS_RES::SEEALSO() in RDFS_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF::SEE_ALSO() in RDF_C.php
    -
    -
    - SEE_ALSO -
    -
    -
    RdfsVocabulary::SEE_ALSO() in RdfsVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    OWLVocabulary::SEE_ALSO() in OWLVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    RDF_RES::SEE_ALSO() in RDF_RES.php
    -
    -
    - selectVars -
    -
    -
    SparqlEngine::selectVars() in SparqlEngine.php
    -
    Selects the result variables and builds a result table.
    -
    -
    - SEQ -
    -
    -
    RDF_RES::SEQ() in RDF_RES.php
    -
    -
    - SEQ -
    -
    -
    RDF::SEQ() in RDF_C.php
    -
    -
    - serialize -
    -
    -
    NTripleSerializer::serialize() in NTripleSerializer.php
    -
    Serializes a model to N Triple syntax.
    -
    -
    - serialize -
    -
    -
    RSSCache::serialize() in rss_cache.inc
    -
    -
    - serialize -
    -
    -
    N3Serializer::serialize() in N3Serializer.php
    -
    Serializes a model to N3 syntax.
    -
    -
    - serialize -
    -
    -
    RdfSerializer::serialize() in RdfSerializer.php
    -
    Serializes a model to RDF syntax.
    -
    -
    - serializeToFile -
    -
    - -
    Serialize the Dataset to File
    -
    -
    - serializeToFile -
    -
    -
    TriXSerializer::serializeToFile() in TriXSerializer.php
    -
    Serialize the dataset to a TriX string and save in file
    -
    -
    - serializeToString -
    -
    - -
    Serialize the Dataset to string
    -
    -
    - serializeToString -
    -
    - -
    Serialize the dataset to a TriX string
    -
    -
    - SERVICE -
    -
    -
    DC::SERVICE() in DC_C.php
    -
    -
    - SERVICE -
    -
    -
    DC_RES::SERVICE() in DC_RES.php
    -
    -
    - SER_RDF_QNAMES -
    -
    -
    SER_RDF_QNAMES in constants.php
    -
    -
    - SER_SORT_MODEL -
    -
    -
    SER_SORT_MODEL in constants.php
    -
    -
    - SER_USE_ATTRIBUTES -
    -
    -
    SER_USE_ATTRIBUTES in constants.php
    -
    -
    - SER_USE_ENTITIES -
    -
    -
    SER_USE_ENTITIES in constants.php
    -
    -
    - SER_XML_DECLARATION -
    -
    -
    SER_XML_DECLARATION in constants.php
    -
    -
    - set -
    -
    -
    ResSeq::set() in ResSeq.php
    -
    Set the value at a given index in the sequence.
    -
    -
    - set -
    -
    -
    RSSCache::set() in rss_cache.inc
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setBase -
    -
    -
    Query::setBase() in Query.php
    -
    Sets the base part.
    -
    -
    - setBaseURI -
    -
    -
    MemModel::setBaseURI() in MemModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    ResModel::setBaseURI() in ResModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    DbModel::setBaseURI() in DbModel.php
    -
    Set a base URI for the DbModel.
    -
    -
    - setComment -
    -
    -
    OntResource::setComment() in OntResource.php
    -
    Assert that the given string is the comment on this resource.
    -
    -
    - setcookies -
    -
    -
    Snoopy::setcookies() in Snoopy.class.inc
    -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Datasets name.
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Dataset name. Return true on success, false otherwise.
    -
    -
    - setDatatype -
    -
    -
    Literal::setDatatype() in Literal.php
    -
    Sets the datatype of the literal.
    -
    -
    - setDefault -
    -
    -
    ResAlt::setDefault() in ResAlt.php
    -
    Set the default value of this container.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDomain -
    -
    -
    OntProperty::setDomain() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.
    -
    -
    - setEntailment -
    -
    - -
    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setFindLiteralWithLang -
    -
    - -
    Sets that only Literals with the matching language should be returned
    -
    -
    - setFixBnodes -
    -
    -
    N3Parser::setFixBnodes() in N3Parser.php
    -
    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    -
    -
    - setGraphname -
    -
    -
    GraphPattern::setGraphname() in GraphPattern.php
    -
    Sets the graphname.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphMem::setGraphName() in NamedGraphMem.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphDb::setGraphName() in NamedGraphDb.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    - -
    Sets the graph name.
    -
    -
    - setHead -
    -
    -
    ResList::setHead() in ResList.php
    -
    Update the head of the list to have the given value, and return the previous value.
    -
    -
    - setId -
    -
    -
    GraphPattern::setId() in GraphPattern.php
    -
    Sets the GraphPatterns Id.
    -
    -
    - setInstanceRdfType -
    -
    - -
    Sets the rdf:type, that this distinct resource is instance of.
    -
    -
    - setIsAnon -
    -
    -
    ResResource::setIsAnon() in ResResource.php
    -
    Set whether this resource is an anonymous resource
    -
    -
    - setIsDefinedBy -
    -
    - -
    Assert that the given resource provides a source of definitions about this resource.
    -
    -
    - setLabelProperty -
    -
    - -
    Assert that the given string is the label on this resource.
    -
    -
    - setLanguage -
    -
    -
    Literal::setLanguage() in Literal.php
    -
    Sets the language of the literal.
    -
    -
    - setOuterFilter -
    -
    - -
    Sets the filter type to outer or inner filter.
    -
    -
    - setOutputFormat -
    -
    - -
    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.
    -
    -
    - setPropertyValue -
    -
    - -
    Set the value of the given property of this ontology resource to the given value.
    -
    -
    - setRange -
    -
    -
    OntProperty::setRange() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.
    -
    -
    - setRDFType -
    -
    -
    OntResource::setRDFType() in OntResource.php
    -
    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.
    -
    -
    - setResultForm -
    -
    - -
    Sets the result form.
    -
    -
    - setSeeAlso -
    -
    -
    OntResource::setSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource
    -
    -
    - setSolutionModifier -
    -
    - -
    Sets a solution modifier.
    -
    -
    - setSubClass -
    -
    -
    OntClass::setSubClass() in OntClass.php
    -
    Assert that this class is super-class of the given class.
    -
    -
    - setSubProperty -
    -
    - -
    Assert that this property is super-property of the given property.
    -
    -
    - setSuperClass -
    -
    - -
    Assert that this class is sub-class of the given class.
    -
    -
    - setSuperProperty -
    -
    - -
    Assert that this property is sub-property of the given property.
    -
    -
    - setTail -
    -
    -
    ResList::setTail() in ResList.php
    -
    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.
    -
    -
    - setTree -
    -
    -
    Constraint::setTree() in Constraint.php
    -
    -
    - setTrigger -
    -
    -
    InfRule::setTrigger() in InfRule.php
    -
    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setURI -
    -
    -
    ResResource::setURI() in ResResource.php
    -
    Sets the URI of this resource
    -
    -
    - setVocabulary -
    -
    -
    OntResource::setVocabulary() in OntResource.php
    -
    Sets the reference to the assoiated vocabulary
    -
    -
    - SHA1 -
    -
    -
    FOAF::SHA1() in FOAF_C.php
    -
    -
    - SHA1 -
    -
    -
    FOAF_RES::SHA1() in FOAF_RES.php
    -
    -
    - size -
    -
    -
    MemModel::size() in MemModel.php
    -
    Number of triples in the MemModel
    -
    -
    - size -
    -
    -
    DbModel::size() in DbModel.php
    -
    Return the number of statements in this DbModel.
    -
    -
    - size -
    -
    -
    InfModelB::size() in InfModelB.php
    -
    Number of all inferable triples in the Model.
    -
    -
    - size -
    -
    -
    ResModel::size() in ResModel.php
    -
    Number of statements in the MemModel
    -
    -
    - size -
    -
    -
    ResContainer::size() in ResContainer.php
    -
    Returns the number values in the container.
    -
    -
    - slashbox -
    -
    -
    slashbox() in magpie_slashbox.php
    -
    -
    - SMARTY_DIR -
    -
    -
    SMARTY_DIR in simple_smarty.php
    -
    -
    - smarty_modifier_rss_date_parse -
    -
    -
    smarty_modifier_rss_date_parse() in modifier.rss_date_parse.php
    -
    -
    - Snoopy -
    -
    -
    Snoopy in Snoopy.class.inc
    -
    ***********************************************
    -
    -
    - SOFTWARE -
    -
    -
    DC_RES::SOFTWARE() in DC_RES.php
    -
    -
    - SOFTWARE -
    -
    -
    DC::SOFTWARE() in DC_C.php
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - sortVars -
    -
    -
    SparqlEngine::sortVars() in SparqlEngine.php
    -
    Sorts the results.
    -
    -
    - SORT_STRING -
    -
    -
    VCARD::SORT_STRING() in VCARD_C.php
    -
    -
    - SORT_STRING -
    -
    -
    VCARD_RES::SORT_STRING() in VCARD_RES.php
    -
    -
    - SOUND -
    -
    -
    DC::SOUND() in DC_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD::SOUND() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD_RES::SOUND() in VCARD_RES.php
    -
    -
    - SOUND -
    -
    -
    DC_RES::SOUND() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    DC::SOURCE() in DC_C.php
    -
    -
    - SOURCE -
    -
    -
    VCARD::SOURCE() in VCARD_C.php
    -
    -
    - SOURCE -
    -
    -
    DC_RES::SOURCE() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD_RES::SOURCE() in VCARD_RES.php
    -
    -
    - SPARQL.php -
    -
    -
    SPARQL.php in SPARQL.php
    -
    -
    - SparqlClient.php -
    -
    -
    SparqlClient.php in SparqlClient.php
    -
    -
    - SparqlEngine.php -
    -
    -
    SparqlEngine.php in SparqlEngine.php
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlGeneratorException.php -
    -
    -
    SqlGeneratorException.php in SqlGeneratorException.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb.php -
    -
    -
    SparqlEngineDb.php in SparqlEngineDb.php
    -
    -
    - SparqlParser.php -
    -
    -
    SparqlParser.php in SparqlParser.php
    -
    -
    - SparqlParserException.php -
    -
    -
    SparqlParserException.php in SparqlParserException.php
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient::SparqlClient() in SparqlClient.php
    -
    Constructor of SparlClient.
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient in SparqlClient.php
    -
    Client for querying a sparql server.
    -
    -
    - SparqlEngine -
    -
    -
    SparqlEngine in SparqlEngine.php
    -
    This engine executes SPARQL queries against an RDF Datatset.
    -
    -
    - SparqlEngineDb -
    -
    -
    SparqlEngineDb in SparqlEngineDb.php
    -
    SPARQL engine optimized for databases.
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer -
    -
    -
    SparqlEngineDb_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlGeneratorException -
    -
    -
    SparqlEngineDb_SqlGeneratorException in SqlGeneratorException.php
    -
    Exception when generating the SQL statement
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - SparqlEngine_PreparedStatement -
    -
    -
    SparqlEngine_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngine_ResultConverter -
    -
    -
    SparqlEngine_ResultConverter in ResultConverter.php
    -
    Converts a memory result into a proper rdf statement triple array
    -
    -
    - SparqlEngine_ResultRenderer -
    -
    -
    SparqlEngine_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngine_ResultRenderer_Default -
    -
    - -
    Default result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_HTML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_XML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser in SparqlParser.php
    -
    Parses a SPARQL Query string and returns a Query Object.
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser::SparqlParser() in SparqlParser.php
    -
    Constructor of SparqlParser
    -
    -
    - SparqlParserException -
    -
    -
    SparqlParserException in SparqlParserException.php
    -
    A SPARQL Parser Execption for better errorhandling.
    -
    -
    - sparqlPrepare -
    -
    - -
    Prepares a sparql query and returns a prepared statement that can be executed with data later on.
    -
    -
    - sparqlQuery -
    -
    -
    Dataset::sparqlQuery() in Dataset.php
    -
    Performs a SPARQL query against an RDF Dataset.
    -
    -
    - sparqlQuery -
    -
    - -
    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.
    -
    -
    - SparqlResultParser -
    -
    -
    SparqlResultParser in SparqlResultParser.php
    -
    Parses an xml document in SPARQL Result XML Format.
    -
    -
    - SPATIAL -
    -
    -
    DC_RES::SPATIAL() in DC_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC::SPATIAL() in DC_C.php
    -
    -
    - Statement -
    -
    -
    Statement in Statement.php
    -
    An RDF statement.
    -
    -
    - Statement -
    -
    -
    Statement::Statement() in Statement.php
    -
    The parameters to constructor are instances of classes and not just strings
    -
    -
    - STATEMENT -
    -
    -
    RDF_RES::STATEMENT() in RDF_RES.php
    -
    -
    - STATEMENT -
    -
    -
    RDF::STATEMENT() in RDF_C.php
    -
    -
    - StatementIterator -
    -
    -
    StatementIterator in StatementIterator.php
    -
    Iterator for traversing models.
    -
    -
    - StatementIterator -
    -
    - -
    Constructor
    -
    -
    - STILLIMAGE -
    -
    -
    DC_RES::STILLIMAGE() in DC_RES.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC::STILLIMAGE() in DC_C.php
    -
    -
    - str -
    -
    -
    str() in FilterFunctions.php
    -
    Evaluates the str() function. Returns the string representation of a variable or RDF term.
    -
    -
    - STREET -
    -
    -
    VCARD_RES::STREET() in VCARD_RES.php
    -
    -
    - STREET -
    -
    -
    VCARD::STREET() in VCARD_C.php
    -
    -
    - subject -
    -
    -
    Statement::subject() in Statement.php
    -
    Alias for getSubject()
    -
    -
    - SUBJECT -
    -
    -
    DC::SUBJECT() in DC_C.php
    -
    -
    - SUBJECT -
    -
    -
    DC_RES::SUBJECT() in DC_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF_RES::SUBJECT() in RDF_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF::SUBJECT() in RDF_C.php
    -
    -
    - subtract -
    -
    -
    DbModel::subtract() in DbModel.php
    -
    Return a new MemModel that is the subtraction of another model from this DbModel.
    -
    -
    - subtract -
    -
    -
    ResModel::subtract() in ResModel.php
    -
    Returns a new model that is the subtraction of another model from this model.
    -
    -
    - subtract -
    -
    -
    MemModel::subtract() in MemModel.php
    -
    Returns a new MemModel that is the subtraction of another model from this MemModel.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    OWLVocabulary::SUB_CLASS_OF() in OWLVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RdfsVocabulary::SUB_CLASS_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS::SUB_CLASS_OF() in RDFS_C.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS_RES::SUB_CLASS_OF() in RDFS_RES.php
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    -
    RdfsVocabulary::SUB_PROPERTY_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUFFIX -
    -
    -
    VCARD::SUFFIX() in VCARD_C.php
    -
    -
    - SUFFIX -
    -
    -
    VCARD_RES::SUFFIX() in VCARD_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM_RES::SUMMARY() in ATOM_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM::SUMMARY() in ATOM_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF::SURNAME() in FOAF_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF_RES::SURNAME() in FOAF_RES.php
    -
    -
    - switchOperator -
    -
    - -
    -
    - sy -
    -
    -
    RssParser::sy() in RssParser.php
    -
    Adds the sy namespace.
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SparqlResultParser.php -
    -
    -
    SparqlResultParser.php in SparqlResultParser.php
    -
    -
    - SyntaxGRDDL.php -
    -
    -
    SyntaxGRDDL.php in SyntaxGRDDL.php
    -
    -
    - SyntaxN3.php -
    -
    -
    SyntaxN3.php in SyntaxN3.php
    -
    -
    - SyntaxRDF.php -
    -
    -
    SyntaxRDF.php in SyntaxRDF.php
    -
    -
    - SyntaxRSS.php -
    -
    -
    SyntaxRSS.php in SyntaxRSS.php
    -
    -
    - SyntaxSparqlRes.php -
    -
    -
    SyntaxSparqlRes.php in SyntaxSparqlRes.php
    -
    -
    - Snoopy.class.inc -
    -
    -
    Snoopy.class.inc in Snoopy.class.inc
    -
    -
    - simple_smarty.php -
    -
    -
    simple_smarty.php in simple_smarty.php
    -
    -
    - StatementIterator.php -
    -
    -
    StatementIterator.php in StatementIterator.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $textinput -
    -
    -
    MagpieRSS::$textinput in rss_parse.inc
    -
    -
    - $timed_out -
    -
    -
    Snoopy::$timed_out in Snoopy.class.inc
    -
    -
    - $tmp -
    -
    -
    SparqlParser::$tmp in SparqlParser.php
    -
    Last parsed graphPattern
    -
    -
    - $Tokens -
    -
    -
    N3Parser::$Tokens in N3Parser.php
    -
    -
    - $tokens -
    -
    -
    SparqlParser::$tokens in SparqlParser.php
    -
    The tokenized Query
    -
    -
    - $tree -
    -
    -
    Constraint::$tree in Constraint.php
    -
    The expression tree
    -
    -
    - $triplePattern -
    -
    -
    GraphPattern::$triplePattern in GraphPattern.php
    -
    -
    - $ts -
    -
    -
    SparqlEngineDb::$ts in SparqlEngineDb.php
    -
    Type sorting instance
    -
    -
    - $type -
    -
    - -
    -
    - $type -
    -
    -
    RssParser::$type in RssParser.php
    -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - TriXParser.php -
    -
    -
    TriXParser.php in TriXParser.php
    -
    -
    - TriXSerializer.php -
    -
    -
    TriXSerializer.php in TriXSerializer.php
    -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - tagClosed -
    -
    -
    SparqlResultParser::tagClosed() in SparqlResultParser.php
    -
    -
    - tagData -
    -
    -
    SparqlResultParser::tagData() in SparqlResultParser.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM_RES::TAGLINE() in ATOM_RES.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM::TAGLINE() in ATOM_C.php
    -
    -
    - tagOpen -
    -
    -
    SparqlResultParser::tagOpen() in SparqlResultParser.php
    -
    -
    - TEL -
    -
    -
    VCARD_RES::TEL() in VCARD_RES.php
    -
    -
    - TEL -
    -
    -
    VCARD::TEL() in VCARD_C.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD::TELTYPES() in VCARD_C.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD_RES::TELTYPES() in VCARD_RES.php
    -
    -
    - TEMPORAL -
    -
    -
    DC::TEMPORAL() in DC_C.php
    -
    -
    - TEMPORAL -
    -
    -
    DC_RES::TEMPORAL() in DC_RES.php
    -
    -
    - test_library_support -
    -
    -
    test_library_support() in magpie_debug.php
    -
    -
    - TEXT -
    -
    -
    DC_RES::TEXT() in DC_RES.php
    -
    -
    - TEXT -
    -
    -
    DC::TEXT() in DC_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS::TEXTINPUT() in RSS_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS_RES::TEXTINPUT() in RSS_RES.php
    -
    -
    - TGN -
    -
    -
    DC::TGN() in DC_C.php
    -
    -
    - TGN -
    -
    -
    DC_RES::TGN() in DC_RES.php
    -
    -
    - THEME -
    -
    -
    FOAF::THEME() in FOAF_C.php
    -
    -
    - THEME -
    -
    -
    FOAF_RES::THEME() in FOAF_RES.php
    -
    -
    - THING -
    -
    -
    OWL::THING() in OWL_C.php
    -
    -
    - THING -
    -
    -
    OWL_RES::THING() in OWL_RES.php
    -
    -
    - THING -
    -
    -
    OWLVocabulary::THING() in OWLVocabulary.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF_RES::THUMBNAIL() in FOAF_RES.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF::THUMBNAIL() in FOAF_C.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF_RES::TIPJAR() in FOAF_RES.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF::TIPJAR() in FOAF_C.php
    -
    -
    - TITLE -
    -
    -
    RSS_RES::TITLE() in RSS_RES.php
    -
    -
    - TITLE -
    -
    -
    RSS::TITLE() in RSS_C.php
    -
    -
    - TITLE -
    -
    -
    FOAF_RES::TITLE() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    DC::TITLE() in DC_C.php
    -
    -
    - TITLE -
    -
    -
    VCARD_RES::TITLE() in VCARD_RES.php
    -
    -
    - TITLE -
    -
    -
    ATOM::TITLE() in ATOM_C.php
    -
    -
    - TITLE -
    -
    -
    ATOM_RES::TITLE() in ATOM_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD::TITLE() in VCARD_C.php
    -
    -
    - TITLE -
    -
    -
    DC_RES::TITLE() in DC_RES.php
    -
    -
    - TITLE -
    -
    -
    FOAF::TITLE() in FOAF_C.php
    -
    -
    - tokenize -
    -
    -
    SparqlParser::tokenize() in SparqlParser.php
    -
    Tokenizes the querystring.
    -
    -
    - TOPIC -
    -
    -
    FOAF_RES::TOPIC() in FOAF_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF::TOPIC() in FOAF_C.php
    -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - toString -
    -
    -
    DbModel::toString() in DbModel.php
    -
    Short dump of the DbModel.
    -
    -
    - toString -
    -
    -
    BlankNode::toString() in Blanknode.php
    -
    Dumps bNode.
    -
    -
    - toString -
    -
    -
    Quad::toString() in Quad.php
    -
    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.
    -
    -
    - toString -
    -
    -
    MemModel::toString() in MemModel.php
    -
    Short Dump of the MemModel.
    -
    -
    - toString -
    -
    -
    InfModelF::toString() in InfModelF.php
    -
    Short Dump of the InfModelF.
    -
    -
    - toString -
    -
    -
    InfModelB::toString() in InfModelB.php
    -
    Short Dump of the InfModelB.
    -
    -
    - toString -
    -
    -
    Object::toString() in Object.php
    -
    Serializes a object into a string
    -
    -
    - toString -
    -
    -
    Literal::toString() in Literal.php
    -
    Dumps literal.
    -
    -
    - toString -
    -
    -
    Statement::toString() in Statement.php
    -
    Dumps the triple.
    -
    -
    - toString -
    -
    -
    Resource::toString() in Resource.php
    -
    Dumps resource.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the MemModel including all triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the InfModelB including ALL inferable triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dump of the DbModel including all triples.
    -
    -
    - toStringObject -
    -
    - -
    Reurns a toString() serialization of the statements's object.
    -
    -
    - toStringPredicate -
    -
    - -
    Returns a toString() serialization of the statements's predicate.
    -
    -
    - toStringSubject -
    -
    - -
    Returns a toString() serialization of the statements's subject.
    -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TriXParser -
    -
    -
    TriXParser in TriXParser.php
    -
    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.
    -
    -
    - TriXParser -
    -
    -
    TriXParser::TriXParser() in TriXParser.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer::TriXSerializer() in TriXSerializer.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer in TriXSerializer.php
    -
    Temporary implementation of a TriX-Serializer
    -
    -
    - TYPE -
    -
    -
    RDF_RES::TYPE() in RDF_RES.php
    -
    -
    - TYPE -
    -
    -
    RDF::TYPE() in RDF_C.php
    -
    -
    - TYPE -
    -
    -
    ATOM_RES::TYPE() in ATOM_RES.php
    -
    -
    - TYPE -
    -
    -
    ATOM::TYPE() in ATOM_C.php
    -
    -
    - TYPE -
    -
    -
    DC::TYPE() in DC_C.php
    -
    -
    - TYPE -
    -
    -
    RdfsVocabulary::TYPE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TYPE -
    -
    -
    DC_RES::TYPE() in DC_RES.php
    -
    -
    - TYPE -
    -
    -
    OWLVocabulary::TYPE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TZ -
    -
    -
    VCARD_RES::TZ() in VCARD_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD::TZ() in VCARD_C.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD_RES::TZTYPES() in VCARD_RES.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD::TZTYPES() in VCARD_C.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $union -
    -
    -
    GraphPattern::$union in GraphPattern.php
    -
    -
    - $usedVars -
    -
    -
    Query::$usedVars in Query.php
    -
    List of all vars used in the query.
    -
    -
    - $user -
    -
    -
    Snoopy::$user in Snoopy.class.inc
    -
    -
    - $use_attributes -
    -
    -
    RdfSerializer::$use_attributes in RdfSerializer.php
    -
    -
    - $use_entities -
    -
    -
    RdfSerializer::$use_entities in RdfSerializer.php
    -
    -
    - $use_gzip -
    -
    -
    Snoopy::$use_gzip in Snoopy.class.inc
    -
    -
    - $use_xml_declaration -
    -
    - -
    -
    - UDC -
    -
    -
    DC_RES::UDC() in DC_RES.php
    -
    -
    - UDC -
    -
    -
    DC::UDC() in DC_C.php
    -
    -
    - UID -
    -
    -
    VCARD_RES::UID() in VCARD_RES.php
    -
    -
    - UID -
    -
    -
    VCARD::UID() in VCARD_C.php
    -
    -
    - uncomment -
    -
    -
    SparqlParser::uncomment() in SparqlParser.php
    -
    Removes comments in the query string. Comments are indicated by '#'.
    -
    -
    - UNIC_RDF -
    -
    -
    UNIC_RDF in constants.php
    -
    -
    - UNION_OF -
    -
    -
    OWL_RES::UNION_OF() in OWL_RES.php
    -
    -
    - UNION_OF -
    -
    -
    OWL::UNION_OF() in OWL_C.php
    -
    -
    - UNION_OF -
    -
    -
    OWLVocabulary::UNION_OF() in OWLVocabulary.php
    -
    -
    - unite -
    -
    -
    MemModel::unite() in MemModel.php
    -
    Returns a new MemModel that is the set-union of the MemModel with another model.
    -
    -
    - unite -
    -
    -
    DbModel::unite() in DbModel.php
    -
    Return a new MemModel that is the set-union the model with another model.
    -
    -
    - unite -
    -
    -
    ResModel::unite() in ResModel.php
    -
    Returns a new Model that is the set-union of the model with another model.
    -
    -
    - unserialize -
    -
    -
    RSSCache::unserialize() in rss_cache.inc
    -
    -
    - uparse -
    -
    -
    N3Parser::uparse() in N3Parser.php
    -
    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    -
    -
    - URI -
    -
    -
    DC_RES::URI() in DC_RES.php
    -
    -
    - URI -
    -
    -
    DC::URI() in DC_C.php
    -
    -
    - URL -
    -
    -
    ATOM_RES::URL() in ATOM_RES.php
    -
    -
    - URL -
    -
    -
    RSS_RES::URL() in RSS_RES.php
    -
    -
    - URL -
    -
    -
    RSS::URL() in RSS_C.php
    -
    -
    - URL -
    -
    -
    ATOM::URL() in ATOM_C.php
    -
    -
    - USE_ANY_QUOTE -
    -
    -
    USE_ANY_QUOTE in constants.php
    -
    -
    - USE_CDATA -
    -
    -
    USE_CDATA in constants.php
    -
    -
    - Utility.php -
    -
    -
    Utility.php in Utility.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - $varDatatypes -
    -
    - -
    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.
    -
    -
    - $varLanguages -
    -
    - -
    Language of variables. NULL if the variable has no language tag (e.g. @en) set.
    -
    -
    - $varlist -
    -
    -
    SparqlResultParser::$varlist in SparqlResultParser.php
    -
    -
    - $varname -
    -
    -
    SparqlResultParser::$varname in SparqlResultParser.php
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsMem::valid() in IteratorFindQuadsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IterFind::valid() in IterFind.php
    -
    Says if there are additional items left in the list
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsMem::valid() in IteratorAllGraphsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    ResIterator::valid() in ResIterator.php
    -
    Says if there are additional items left in the list
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsDb::valid() in IteratorFindQuadsDb.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsDb::valid() in IteratorAllGraphsDb.php
    -
    Says if there are additional items left in the list
    -
    -
    - VALID -
    -
    -
    DC::VALID() in DC_C.php
    -
    -
    - VALID -
    -
    -
    DC_RES::VALID() in DC_RES.php
    -
    -
    - VALIDATE_IDS -
    -
    -
    VALIDATE_IDS in constants.php
    -
    -
    - VALUE -
    -
    -
    ATOM::VALUE() in ATOM_C.php
    -
    -
    - VALUE -
    -
    -
    ATOM_RES::VALUE() in ATOM_RES.php
    -
    -
    - varCheck -
    -
    -
    SparqlParser::varCheck() in SparqlParser.php
    -
    Checks if $token is a variable.
    -
    -
    - VCARD -
    -
    -
    VCARD in VCARD_C.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (Resource)
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD::VCARD_CLASS() in VCARD_C.php
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD_RES::VCARD_CLASS() in VCARD_RES.php
    -
    -
    - VCARD_NS -
    -
    -
    VCARD_NS in constants.php
    -
    -
    - VCARD_RES -
    -
    -
    VCARD_RES in VCARD_RES.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    -
    -
    - VERSION -
    -
    -
    ATOM::VERSION() in ATOM_C.php
    -
    -
    - VERSION -
    -
    -
    ATOM_RES::VERSION() in ATOM_RES.php
    -
    -
    - VERSION_INFO -
    -
    - -
    -
    - VERSION_INFO -
    -
    -
    OWL::VERSION_INFO() in OWL_C.php
    -
    -
    - VERSION_INFO -
    -
    -
    OWLVocabulary::VERSION_INFO() in OWLVocabulary.php
    -
    -
    - visualize -
    -
    -
    Model::visualize() in Model.php
    -
    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    -
    -
    - visualizeGraph -
    -
    - -
    Generates a dot-file for drawing graphical output with the
    -
    -
    - VCARD.php -
    -
    -
    VCARD.php in VCARD.php
    -
    -
    - VCARD_C.php -
    -
    -
    VCARD_C.php in VCARD_C.php
    -
    -
    - VCARD_RES.php -
    -
    -
    VCARD_RES.php in VCARD_RES.php
    -
    -
    - Vocabulary.php -
    -
    -
    Vocabulary.php in Vocabulary.php
    -
    -
    - VocabularyClass.php -
    -
    -
    VocabularyClass.php in VocabularyClass.php
    -
    -
    - VocabularyRes.php -
    -
    -
    VocabularyRes.php in VocabularyRes.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - $WARNING -
    -
    -
    MagpieRSS::$WARNING in rss_parse.inc
    -
    -
    - W3CDTF -
    -
    -
    DC_RES::W3CDTF() in DC_RES.php
    -
    -
    - W3CDTF -
    -
    -
    DC::W3CDTF() in DC_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF_RES::WEBLOG() in FOAF_RES.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF::WEBLOG() in FOAF_C.php
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - writeAsHtml -
    -
    -
    MemModel::writeAsHtml() in MemModel.php
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    DbModel::writeAsHtml() in DbModel.php
    -
    Write the RDF serialization of the _DbModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    InfModelB::writeAsHtml() in InfModelB.php
    -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML.
    -
    -
    - writeAsHTMLTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Write the RDF serialization of the DbModel as HTML table.
    -
    -
    - writeHTMLTable -
    -
    - -
    Prints a MemModel as HTML table.
    -
    -
    - writeQueryResultAsHtmlTable -
    -
    - -
    Prints a query result as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Write the RDF serialization of the DbModel to string.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML_LANG -
    -
    -
    XML_LANG in constants.php
    -
    -
    - XML_NAMESPACE_DECLARATION_PREFIX -
    -
    - -
    -
    - XML_NAMESPACE_PREFIX -
    -
    -
    XML_NAMESPACE_PREFIX in constants.php
    -
    -
    - XML_NAMESPACE_URI -
    -
    -
    XML_NAMESPACE_URI in constants.php
    -
    -
    - XML_SCHEMA -
    -
    -
    XML_SCHEMA in constants.php
    -
    -
    - -
    -
    y
    - -
    -
    -
    -
    - YAHOO_CHAT_ID -
    -
    - -
    -
    - YAHOO_CHAT_ID -
    -
    -
    FOAF::YAHOO_CHAT_ID() in FOAF_C.php
    -
    -
    - -
    -
    _
    - -
    -
    -
    -
    - $_CONTENT_CONSTRUCTS -
    -
    - -
    -
    - $_fp_timeout -
    -
    -
    Snoopy::$_fp_timeout in Snoopy.class.inc
    -
    -
    - $_framedepth -
    -
    -
    Snoopy::$_framedepth in Snoopy.class.inc
    -
    -
    - $_frameurls -
    -
    -
    Snoopy::$_frameurls in Snoopy.class.inc
    -
    -
    - $_httpmethod -
    -
    -
    Snoopy::$_httpmethod in Snoopy.class.inc
    -
    -
    - $_httpversion -
    -
    -
    Snoopy::$_httpversion in Snoopy.class.inc
    -
    -
    - $_isproxy -
    -
    -
    Snoopy::$_isproxy in Snoopy.class.inc
    -
    -
    - $_KNOWN_ENCODINGS -
    -
    - -
    -
    - $_maxlinelen -
    -
    -
    Snoopy::$_maxlinelen in Snoopy.class.inc
    -
    ** Private variables ***
    -
    -
    - $_mime_boundary -
    -
    -
    Snoopy::$_mime_boundary in Snoopy.class.inc
    -
    -
    - $_redirectaddr -
    -
    -
    Snoopy::$_redirectaddr in Snoopy.class.inc
    -
    -
    - $_redirectdepth -
    -
    -
    Snoopy::$_redirectdepth in Snoopy.class.inc
    -
    -
    - $_source_encoding -
    -
    - -
    -
    - $_submit_method -
    -
    -
    Snoopy::$_submit_method in Snoopy.class.inc
    -
    -
    - $_submit_type -
    -
    -
    Snoopy::$_submit_type in Snoopy.class.inc
    -
    -
    - _buildIntBindings -
    -
    - -
    Marks triples with internal bindings.
    -
    -
    - _buildResultSet -
    -
    - -
    Builds the resultset.
    -
    -
    - _buildurl -
    -
    -
    SparqlClient::_buildurl() in SparqlClient.php
    -
    Helper function that builds the url.
    -
    -
    - _checkGraphs -
    -
    -
    SparqlEngine::_checkGraphs() in SparqlEngine.php
    -
    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.
    -
    -
    - _check_timeout -
    -
    -
    Snoopy::_check_timeout() in Snoopy.class.inc
    -
    -
    - _connect -
    -
    -
    Snoopy::_connect() in Snoopy.class.inc
    -
    -
    - _determineType -
    -
    - -
    Tries to determine the rdf:type of the variable.
    -
    -
    - _disconnect -
    -
    -
    Snoopy::_disconnect() in Snoopy.class.inc
    -
    -
    - _expandlinks -
    -
    -
    Snoopy::_expandlinks() in Snoopy.class.inc
    -
    -
    - _fastForward -
    -
    -
    SparqlParser::_fastForward() in SparqlParser.php
    -
    FastForward until next token which is not blank.
    -
    -
    - _fetch_remote_file -
    -
    -
    _fetch_remote_file() in rss_fetch.inc
    -
    -
    - _generateRDF -
    -
    -
    GRDDLParser::_generateRDF() in GRDDLParser.php
    -
    -
    - _getAttributes -
    -
    - -
    Search the attributes listed in $list in the dataset.
    -
    -
    - _getBindingString -
    -
    - -
    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.
    -
    -
    - _httprequest -
    -
    -
    Snoopy::_httprequest() in Snoopy.class.inc
    -
    -
    - _httpsrequest -
    -
    -
    Snoopy::_httpsrequest() in Snoopy.class.inc
    -
    -
    - _http_get -
    -
    -
    SparqlClient::_http_get() in SparqlClient.php
    -
    Executes the GET Request.
    -
    -
    - _is_forbidden_rdf_property_attribute -
    -
    - -
    -
    - _parseSparqlQuery -
    -
    - -
    Parses an query and returns the parsed form.
    -
    -
    - _parse_uri -
    -
    -
    RdfParser::_parse_uri() in RdfParser.php
    -
    -
    - _prepareSparql -
    -
    - -
    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...
    -
    -
    - _prepare_post_body -
    -
    -
    Snoopy::_prepare_post_body() in Snoopy.class.inc
    -
    -
    - _report_error -
    -
    - -
    -
    - _response_to_rss -
    -
    -
    _response_to_rss() in rss_fetch.inc
    -
    -
    - _rewind -
    -
    -
    SparqlParser::_rewind() in SparqlParser.php
    -
    Rewind until next token which is not blank.
    -
    -
    - _stripform -
    -
    -
    Snoopy::_stripform() in Snoopy.class.inc
    -
    -
    - _striplinks -
    -
    -
    Snoopy::_striplinks() in Snoopy.class.inc
    -
    -
    - _striptext -
    -
    -
    Snoopy::_striptext() in Snoopy.class.inc
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlParserException::__construct() in SparqlParserException.php
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlEngineDb::__construct() in SparqlEngineDb.php
    -
    Use SparqlEngine::factory() to create the instance
    -
    -
    - __construct -
    -
    -
    SparqlEngine::__construct() in SparqlEngine.php
    -
    Use SparqlEngine::factory() instead of this constructor.
    -
    -
    - __toString -
    -
    - -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - x - y - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_dataset.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_dataset.html deleted file mode 100755 index 97c406f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_dataset.html +++ /dev/null @@ -1,1028 +0,0 @@ - - - - - - - - - - - - -

    [dataset] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - d - e - f - g - h - i - k - l - n - p - q - r - s - t - v -
    - - -
    -
    a
    - -
    -
    -
    -
    - addAll -
    -
    -
    DatasetMem::addAll() in DatasetMem.php
    -
    Adds all named graphs of the other dataset to this dataset.
    -
    -
    - addAll -
    -
    -
    DatasetDb::addAll() in DatasetDb.php
    -
    Add all named graphs of the other dataset to this dataset.
    -
    -
    - addNamedGraph -
    -
    -
    DatasetMem::addNamedGraph() in DatasetMem.php
    -
    Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
    -
    -
    - addNamedGraph -
    -
    - -
    Adds a NamedGraph to the set.
    -
    -
    - addQuad -
    -
    -
    DatasetMem::addQuad() in DatasetMem.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - addQuad -
    -
    -
    DatasetDb::addQuad() in DatasetDb.php
    -
    Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - clear -
    -
    -
    DatasetDb::clear() in DatasetDb.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - clear -
    -
    -
    DatasetMem::clear() in DatasetMem.php
    -
    Deletes all NamedGraphs from the set.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsNamedGraph -
    -
    - -
    Tells wether the Dataset contains a NamedGraph.
    -
    -
    - containsQuad -
    -
    -
    DatasetMem::containsQuad() in DatasetMem.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - containsQuad -
    -
    -
    DatasetDb::containsQuad() in DatasetDb.php
    -
    Tells wether the Dataset contains a quad or quads matching a pattern.
    -
    -
    - countGraphs -
    -
    -
    DatasetDb::countGraphs() in DatasetDb.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countGraphs -
    -
    -
    DatasetMem::countGraphs() in DatasetMem.php
    -
    Returns the number of NamedGraphs in the set. Empty graphs are counted.
    -
    -
    - countQuads -
    -
    -
    DatasetMem::countQuads() in DatasetMem.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - countQuads -
    -
    -
    DatasetDb::countQuads() in DatasetDb.php
    -
    Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.
    -
    -
    - createGraph -
    -
    -
    DatasetDb::createGraph() in DatasetDb.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
    -
    -
    - createGraph -
    -
    -
    DatasetMem::createGraph() in DatasetMem.php
    -
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
    -
    -
    - current -
    -
    -
    IteratorFindQuadsMem::current() in IteratorFindQuadsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorFindQuadsDb::current() in IteratorFindQuadsDb.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsMem::current() in IteratorAllGraphsMem.php
    -
    Returns the current item.
    -
    -
    - current -
    -
    -
    IteratorAllGraphsDb::current() in IteratorAllGraphsDb.php
    -
    Returns the current item
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - Dataset -
    -
    -
    Dataset in Dataset.php
    -
    Dataset implementation.
    -
    -
    - Dataset.php -
    -
    -
    Dataset.php in Dataset.php
    -
    -
    - DatasetMem.php -
    -
    -
    DatasetMem.php in DatasetMem.php
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb::DatasetDb() in DatasetDb.php
    -
    Constructor You can supply a Dataset name.
    -
    -
    - DatasetDb -
    -
    -
    DatasetDb in DatasetDb.php
    -
    Dataset implementation.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem::DatasetMem() in DatasetMem.php
    -
    Constructor.
    -
    -
    - DatasetMem -
    -
    -
    DatasetMem in DatasetMem.php
    -
    In-memory implementation of a RDF dataset.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    Quad::equals() in Quad.php
    -
    Checks if two quads are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInDefaultGraph -
    -
    - -
    Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - findInNamedGraphs -
    -
    - -
    Finds Statements that match a quad pattern. The argument may contain wildcards.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDatasetName -
    -
    - -
    Returns the Datasets name.
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph
    -
    -
    - getDefaultGraph -
    -
    - -
    Returns a reference to the defaultGraph.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphMem::getGraphName() in NamedGraphMem.php
    -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    - -
    Returns the graph name.
    -
    -
    - getGraphName -
    -
    -
    NamedGraphDb::getGraphName() in NamedGraphDb.php
    -
    Returns the graph name.
    -
    -
    - getNamedGraph -
    -
    - -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getNamedGraph -
    -
    -
    DatasetMem::getNamedGraph() in DatasetMem.php
    -
    Returns the NamedGraph with a specific name from the Dataset.
    -
    -
    - getObject -
    -
    -
    Quad::getObject() in Quad.php
    -
    Returns the object.
    -
    -
    - getPredicate -
    -
    - -
    Returns the predicate.
    -
    -
    - getStatement -
    -
    - -
    Returns the statement(subject,predicate,object).
    -
    -
    - getSubject -
    -
    -
    Quad::getSubject() in Quad.php
    -
    Returns the subject.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if an defaultGraph exists. False otherwise .
    -
    -
    - hasDefaultGraph -
    -
    - -
    Returns true, if a defaultGraph exists. False otherwise.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - IteratorAllGraphsDb.php -
    -
    -
    IteratorAllGraphsDb.php in IteratorAllGraphsDb.php
    -
    -
    - IteratorAllGraphsMem.php -
    -
    -
    IteratorAllGraphsMem.php in IteratorAllGraphsMem.php
    -
    -
    - IteratorFindQuadsDb.php -
    -
    -
    IteratorFindQuadsDb.php in IteratorFindQuadsDb.php
    -
    -
    - IteratorFindQuadsMem.php -
    -
    -
    IteratorFindQuadsMem.php in IteratorFindQuadsMem.php
    -
    -
    - isEmpty -
    -
    -
    DatasetDb::isEmpty() in DatasetDb.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - isEmpty -
    -
    -
    DatasetMem::isEmpty() in DatasetMem.php
    -
    Tells wether the set contains any NamedGraphs.
    -
    -
    - IteratorAllGraphsDb -
    -
    -
    IteratorAllGraphsDb in IteratorAllGraphsDb.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorAllGraphsMem -
    -
    -
    IteratorAllGraphsMem in IteratorAllGraphsMem.php
    -
    Implementation of a Graph iterator.
    -
    -
    - IteratorAllGraphsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsDb -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsDb -
    -
    -
    IteratorFindQuadsDb in IteratorFindQuadsDb.php
    -
    Implementation of a quad iterator.
    -
    -
    - IteratorFindQuadsMem -
    -
    - -
    Constructor.
    -
    -
    - IteratorFindQuadsMem -
    -
    -
    IteratorFindQuadsMem in IteratorFindQuadsMem.php
    -
    Implementation of a quad iterator.
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    IteratorFindQuadsMem::key() in IteratorFindQuadsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorFindQuadsDb::key() in IteratorFindQuadsDb.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsMem::key() in IteratorAllGraphsMem.php
    -
    Returns the key of the current item.
    -
    -
    - key -
    -
    -
    IteratorAllGraphsDb::key() in IteratorAllGraphsDb.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listGraphNames -
    -
    - -
    Returns the names of the namedGraphs in this set as strings in an array.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - listNamedGraphs -
    -
    - -
    Returns an iterator over all NamedGraphs in the set.
    -
    -
    - loadFromFile -
    -
    - -
    Load a Dataset from a File
    -
    -
    - loadFromString -
    -
    - -
    Load a Datset from a string
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - NamedGraphDb.php -
    -
    -
    NamedGraphDb.php in NamedGraphDb.php
    -
    -
    - NamedGraphMem.php -
    -
    -
    NamedGraphMem.php in NamedGraphMem.php
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb::NamedGraphDb() in NamedGraphDb.php
    -
    Constructor Do not call this directly.
    -
    -
    - NamedGraphDb -
    -
    -
    NamedGraphDb in NamedGraphDb.php
    -
    Persistent NamedGraph implementation that extends a DbModel.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem in NamedGraphMem.php
    -
    NamedGraph implementation that extends a MemModel with a name.
    -
    -
    - NamedGraphMem -
    -
    -
    NamedGraphMem::NamedGraphMem() in NamedGraphMem.php
    -
    Constructor You have to supply a graph name. You can supply a URI.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsDb::next() in IteratorFindQuadsDb.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorFindQuadsMem::next() in IteratorFindQuadsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsMem::next() in IteratorAllGraphsMem.php
    -
    Moves Iterator to the next item in the list.
    -
    -
    - next -
    -
    -
    IteratorAllGraphsDb::next() in IteratorAllGraphsDb.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - parseFile -
    -
    -
    TriXParser::parseFile() in TriXParser.php
    -
    Parse from a file
    -
    -
    - parseString -
    -
    -
    TriXParser::parseString() in TriXParser.php
    -
    Parse an XML string
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - Quad.php -
    -
    -
    Quad.php in Quad.php
    -
    -
    - Quad -
    -
    -
    Quad::Quad() in Quad.php
    -
    Constructor Creates a Quad from four Nodes.
    -
    -
    - Quad -
    -
    -
    Quad in Quad.php
    -
    A Triple in a RDF dataset, consisting of four Jena Nodes: graphName, subject, predicate, and object.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeNamedGraph -
    -
    - -
    Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.
    -
    -
    - removeQuad -
    -
    -
    DatasetMem::removeQuad() in DatasetMem.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - removeQuad -
    -
    -
    DatasetDb::removeQuad() in DatasetDb.php
    -
    Deletes a Quad from the RDF dataset.
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsMem::rewind() in IteratorFindQuadsMem.php
    -
    Resets iterator list to start.
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsDb::rewind() in IteratorAllGraphsDb.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorAllGraphsMem::rewind() in IteratorAllGraphsMem.php
    -
    Resets iterator list to start
    -
    -
    - rewind -
    -
    -
    IteratorFindQuadsDb::rewind() in IteratorFindQuadsDb.php
    -
    Resets iterator list to start.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - serializeToFile -
    -
    - -
    Serialize the Dataset to File
    -
    -
    - serializeToFile -
    -
    -
    TriXSerializer::serializeToFile() in TriXSerializer.php
    -
    Serialize the dataset to a TriX string and save in file
    -
    -
    - serializeToString -
    -
    - -
    Serialize the Dataset to string
    -
    -
    - serializeToString -
    -
    - -
    Serialize the dataset to a TriX string
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Datasets name.
    -
    -
    - setDatasetName -
    -
    - -
    Sets the Dataset name. Return true on success, false otherwise.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setDefaultGraph -
    -
    - -
    Overwrites the existting default graph.
    -
    -
    - setGraphName -
    -
    - -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphMem::setGraphName() in NamedGraphMem.php
    -
    Sets the graph name.
    -
    -
    - setGraphName -
    -
    -
    NamedGraphDb::setGraphName() in NamedGraphDb.php
    -
    Sets the graph name.
    -
    -
    - sparqlQuery -
    -
    -
    Dataset::sparqlQuery() in Dataset.php
    -
    Performs a SPARQL query against an RDF Dataset.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - TriXParser.php -
    -
    -
    TriXParser.php in TriXParser.php
    -
    -
    - TriXSerializer.php -
    -
    -
    TriXSerializer.php in TriXSerializer.php
    -
    -
    - toString -
    -
    -
    Quad::toString() in Quad.php
    -
    Return a human-readable (sort of) string "graphname { s p o . }" describing the quad.
    -
    -
    - TriXParser -
    -
    -
    TriXParser::TriXParser() in TriXParser.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXParser -
    -
    -
    TriXParser in TriXParser.php
    -
    Temporary implementation of a TriX-Parser (Usable only with PHP > V5) Currently, it doesn't support any namespaces and has problems with typed literals.
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer::TriXSerializer() in TriXSerializer.php
    -
    Constructor Needs a reference to a graphSet
    -
    -
    - TriXSerializer -
    -
    -
    TriXSerializer in TriXSerializer.php
    -
    Temporary implementation of a TriX-Serializer
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsMem::valid() in IteratorFindQuadsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorFindQuadsDb::valid() in IteratorFindQuadsDb.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsMem::valid() in IteratorAllGraphsMem.php
    -
    Says if there are additional items left in the list.
    -
    -
    - valid -
    -
    -
    IteratorAllGraphsDb::valid() in IteratorAllGraphsDb.php
    -
    Says if there are additional items left in the list
    -
    -
    - -
    - a - c - d - e - f - g - h - i - k - l - n - p - q - r - s - t - v -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_default.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_default.html deleted file mode 100755 index a96497b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_default.html +++ /dev/null @@ -1,2285 +0,0 @@ - - - - - - - - - - - - -

    [default] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - r - s - t - u - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - $_CONTENT_CONSTRUCTS -
    -
    - -
    -
    - $_fp_timeout -
    -
    -
    Snoopy::$_fp_timeout in Snoopy.class.inc
    -
    -
    - $_framedepth -
    -
    -
    Snoopy::$_framedepth in Snoopy.class.inc
    -
    -
    - $_frameurls -
    -
    -
    Snoopy::$_frameurls in Snoopy.class.inc
    -
    -
    - $_httpmethod -
    -
    -
    Snoopy::$_httpmethod in Snoopy.class.inc
    -
    -
    - $_httpversion -
    -
    -
    Snoopy::$_httpversion in Snoopy.class.inc
    -
    -
    - $_isproxy -
    -
    -
    Snoopy::$_isproxy in Snoopy.class.inc
    -
    -
    - $_KNOWN_ENCODINGS -
    -
    - -
    -
    - $_maxlinelen -
    -
    -
    Snoopy::$_maxlinelen in Snoopy.class.inc
    -
    ** Private variables ***
    -
    -
    - $_mime_boundary -
    -
    -
    Snoopy::$_mime_boundary in Snoopy.class.inc
    -
    -
    - $_redirectaddr -
    -
    -
    Snoopy::$_redirectaddr in Snoopy.class.inc
    -
    -
    - $_redirectdepth -
    -
    -
    Snoopy::$_redirectdepth in Snoopy.class.inc
    -
    -
    - $_source_encoding -
    -
    - -
    -
    - $_submit_method -
    -
    -
    Snoopy::$_submit_method in Snoopy.class.inc
    -
    -
    - $_submit_type -
    -
    -
    Snoopy::$_submit_type in Snoopy.class.inc
    -
    -
    - _check_timeout -
    -
    -
    Snoopy::_check_timeout() in Snoopy.class.inc
    -
    -
    - _connect -
    -
    -
    Snoopy::_connect() in Snoopy.class.inc
    -
    -
    - _disconnect -
    -
    -
    Snoopy::_disconnect() in Snoopy.class.inc
    -
    -
    - _expandlinks -
    -
    -
    Snoopy::_expandlinks() in Snoopy.class.inc
    -
    -
    - _fetch_remote_file -
    -
    -
    _fetch_remote_file() in rss_fetch.inc
    -
    -
    - _httprequest -
    -
    -
    Snoopy::_httprequest() in Snoopy.class.inc
    -
    -
    - _httpsrequest -
    -
    -
    Snoopy::_httpsrequest() in Snoopy.class.inc
    -
    -
    - _prepare_post_body -
    -
    -
    Snoopy::_prepare_post_body() in Snoopy.class.inc
    -
    -
    - _response_to_rss -
    -
    -
    _response_to_rss() in rss_fetch.inc
    -
    -
    - _stripform -
    -
    -
    Snoopy::_stripform() in Snoopy.class.inc
    -
    -
    - _striplinks -
    -
    -
    Snoopy::_striplinks() in Snoopy.class.inc
    -
    -
    - _striptext -
    -
    -
    Snoopy::_striptext() in Snoopy.class.inc
    -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $accept -
    -
    -
    Snoopy::$accept in Snoopy.class.inc
    -
    -
    - $agent -
    -
    -
    Snoopy::$agent in Snoopy.class.inc
    -
    -
    - ADODB_DB_DRIVER -
    -
    -
    ADODB_DB_DRIVER in constants.php
    -
    -
    - ADODB_DB_HOST -
    -
    -
    ADODB_DB_HOST in constants.php
    -
    -
    - ADODB_DB_NAME -
    -
    -
    ADODB_DB_NAME in constants.php
    -
    -
    - ADODB_DB_PASSWORD -
    -
    -
    ADODB_DB_PASSWORD in constants.php
    -
    -
    - ADODB_DB_USER -
    -
    -
    ADODB_DB_USER in constants.php
    -
    -
    - ADODB_DEBUG_MODE -
    -
    -
    ADODB_DEBUG_MODE in constants.php
    -
    -
    - append -
    -
    -
    MagpieRSS::append() in rss_parse.inc
    -
    -
    - append_content -
    -
    - -
    -
    - array_change_key_case -
    -
    -
    array_change_key_case() in rss_parse.inc
    -
    -
    - ATOM -
    -
    -
    ATOM in rss_parse.inc
    -
    -
    - ATOM_NS -
    -
    -
    ATOM_NS in constants.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $BASE_CACHE -
    -
    -
    RSSCache::$BASE_CACHE in rss_cache.inc
    -
    -
    - BNODE_PREFIX -
    -
    -
    BNODE_PREFIX in constants.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $channel -
    -
    -
    MagpieRSS::$channel in rss_parse.inc
    -
    -
    - $cookies -
    -
    -
    Snoopy::$cookies in Snoopy.class.inc
    -
    -
    - $curl_path -
    -
    -
    Snoopy::$curl_path in Snoopy.class.inc
    -
    -
    - $current_item -
    -
    -
    MagpieRSS::$current_item in rss_parse.inc
    -
    -
    - $current_namespace -
    -
    - -
    -
    - cache_age -
    -
    -
    RSSCache::cache_age() in rss_cache.inc
    -
    -
    - CASE_LOWER -
    -
    -
    CASE_LOWER in rss_parse.inc
    -
    -
    - CASE_UPPER -
    -
    -
    CASE_UPPER in rss_parse.inc
    -
    -
    - check_cache -
    -
    -
    RSSCache::check_cache() in rss_cache.inc
    -
    -
    - concat -
    -
    -
    MagpieRSS::concat() in rss_parse.inc
    -
    -
    - constants.php -
    -
    -
    constants.php in constants.php
    -
    -
    - CREATE_MODEL_WITHOUT_DUPLICATES -
    -
    - -
    -
    - create_parser -
    -
    - -
    return XML parser, and possibly re-encoded source
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DatasetDb.php -
    -
    -
    DatasetDb.php in DatasetDb.php
    -
    -
    - DatasetP.php -
    -
    -
    DatasetP.php in DatasetP.php
    -
    -
    - DATATYPE_SHORTCUT_PREFIX -
    -
    -
    DATATYPE_SHORTCUT_PREFIX in constants.php
    -
    -
    - DBMODEL -
    -
    -
    DBMODEL in constants.php
    -
    -
    - DCMITYPE_NS -
    -
    -
    DCMITYPE_NS in constants.php
    -
    -
    - DCTERM_NS -
    -
    -
    DCTERM_NS in constants.php
    -
    -
    - DC_NS -
    -
    -
    DC_NS in constants.php
    -
    -
    - debug -
    -
    -
    debug() in rss_fetch.inc
    -
    -
    - debug -
    -
    -
    RSSCache::debug() in rss_cache.inc
    -
    -
    - DEFAULT_ALGORITHM -
    -
    -
    DEFAULT_ALGORITHM in constants.php
    -
    -
    - DEFAULT_ENCODING -
    -
    -
    DEFAULT_ENCODING in constants.php
    -
    -
    - DIR_SEP -
    -
    -
    DIR_SEP in rss_fetch.inc
    -
    -
    - DBase.php -
    -
    -
    DBase.php in DBase.php
    -
    -
    - DC.php -
    -
    -
    DC.php in DC.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $encoding -
    -
    -
    MagpieRSS::$encoding in rss_parse.inc
    -
    -
    - $error -
    -
    -
    Snoopy::$error in Snoopy.class.inc
    -
    -
    - $ERROR -
    -
    -
    RSSCache::$ERROR in rss_cache.inc
    -
    -
    - $ERROR -
    -
    -
    MagpieRSS::$ERROR in rss_parse.inc
    -
    -
    - $expandlinks -
    -
    -
    Snoopy::$expandlinks in Snoopy.class.inc
    -
    -
    - error -
    -
    -
    error() in rss_fetch.inc
    -
    -
    - error -
    -
    -
    MagpieRSS::error() in rss_parse.inc
    -
    -
    - error -
    -
    -
    RSSCache::error() in rss_cache.inc
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $feed_type -
    -
    -
    MagpieRSS::$feed_type in rss_parse.inc
    -
    -
    - $feed_version -
    -
    -
    MagpieRSS::$feed_version in rss_parse.inc
    -
    -
    - feed_cdata -
    -
    -
    MagpieRSS::feed_cdata() in rss_parse.inc
    -
    -
    - feed_end_element -
    -
    - -
    -
    - feed_start_element -
    -
    - -
    -
    - fetch -
    -
    -
    Snoopy::fetch() in Snoopy.class.inc
    -
    -
    - fetch_rss -
    -
    -
    fetch_rss() in rss_fetch.inc
    -
    -
    - file_name -
    -
    -
    RSSCache::file_name() in rss_cache.inc
    -
    -
    - FIX_BLANKNODES -
    -
    -
    FIX_BLANKNODES in constants.php
    -
    -
    - FOAF_NS -
    -
    -
    FOAF_NS in constants.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - GENERAL_PREFIX_BASE -
    -
    -
    GENERAL_PREFIX_BASE in constants.php
    -
    -
    - get -
    -
    -
    RSSCache::get() in rss_cache.inc
    -
    -
    - GRAPHVIZ_FORMAT -
    -
    -
    GRAPHVIZ_FORMAT in constants.php
    -
    -
    - GRAPHVIZ_PATH -
    -
    -
    GRAPHVIZ_PATH in constants.php
    -
    -
    - GRAPHVIZ_STAT -
    -
    -
    GRAPHVIZ_STAT in constants.php
    -
    -
    - GRAPHVIZ_TEMP -
    -
    -
    GRAPHVIZ_TEMP in constants.php
    -
    -
    - GRAPHVIZ_URI -
    -
    -
    GRAPHVIZ_URI in constants.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - $headers -
    -
    -
    Snoopy::$headers in Snoopy.class.inc
    -
    -
    - $host -
    -
    -
    Snoopy::$host in Snoopy.class.inc
    -
    ** Public variables ***
    -
    -
    - HIDE_ADVERTISE -
    -
    -
    HIDE_ADVERTISE in constants.php
    -
    -
    - HTML_TABLE_BNODE_COLOR -
    -
    -
    HTML_TABLE_BNODE_COLOR in constants.php
    -
    -
    - HTML_TABLE_HEADER_COLOR -
    -
    -
    HTML_TABLE_HEADER_COLOR in constants.php
    -
    -
    - HTML_TABLE_LITERAL_COLOR -
    -
    -
    HTML_TABLE_LITERAL_COLOR in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR0 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR0 in constants.php
    -
    -
    - HTML_TABLE_NS_ROW_COLOR1 -
    -
    -
    HTML_TABLE_NS_ROW_COLOR1 in constants.php
    -
    -
    - HTML_TABLE_RDF_NS_COLOR -
    -
    -
    HTML_TABLE_RDF_NS_COLOR in constants.php
    -
    -
    - HTML_TABLE_RESOURCE_COLOR -
    -
    -
    HTML_TABLE_RESOURCE_COLOR in constants.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $image -
    -
    -
    MagpieRSS::$image in rss_parse.inc
    -
    -
    - $inchannel -
    -
    -
    MagpieRSS::$inchannel in rss_parse.inc
    -
    -
    - $incontent -
    -
    -
    MagpieRSS::$incontent in rss_parse.inc
    -
    -
    - $inimage -
    -
    -
    MagpieRSS::$inimage in rss_parse.inc
    -
    -
    - $initem -
    -
    -
    MagpieRSS::$initem in rss_parse.inc
    -
    -
    - $intextinput -
    -
    -
    MagpieRSS::$intextinput in rss_parse.inc
    -
    -
    - $items -
    -
    -
    MagpieRSS::$items in rss_parse.inc
    -
    -
    - INDENTATION -
    -
    -
    INDENTATION in constants.php
    -
    -
    - INDEX_TYPE -
    -
    -
    INDEX_TYPE in constants.php
    -
    -
    - IND_DEF -
    -
    -
    IND_DEF in constants.php
    -
    -
    - IND_SO -
    -
    -
    IND_SO in constants.php
    -
    -
    - IND_SP -
    -
    -
    IND_SP in constants.php
    -
    -
    - IND_SPO -
    -
    -
    IND_SPO in constants.php
    -
    -
    - InfModelP.php -
    -
    -
    InfModelP.php in InfModelP.php
    -
    -
    - INFMODELB -
    -
    -
    INFMODELB in constants.php
    -
    -
    - INFMODELF -
    -
    -
    INFMODELF in constants.php
    -
    -
    - INF_RES_DOMAIN -
    -
    -
    INF_RES_DOMAIN in constants.php
    -
    -
    - INF_RES_OWL_INVERSEOF -
    -
    -
    INF_RES_OWL_INVERSEOF in constants.php
    -
    -
    - INF_RES_OWL_SAMEAS -
    -
    -
    INF_RES_OWL_SAMEAS in constants.php
    -
    -
    - INF_RES_RANGE -
    -
    -
    INF_RES_RANGE in constants.php
    -
    -
    - INF_RES_RULE_RDFS6 -
    -
    -
    INF_RES_RULE_RDFS6 in constants.php
    -
    -
    - INF_RES_RULE_RDFS8 -
    -
    -
    INF_RES_RULE_RDFS8 in constants.php
    -
    -
    - INF_RES_RULE_RDFS10 -
    -
    -
    INF_RES_RULE_RDFS10 in constants.php
    -
    -
    - INF_RES_RULE_RDFS12 -
    -
    -
    INF_RES_RULE_RDFS12 in constants.php
    -
    -
    - INF_RES_RULE_RDFS13 -
    -
    -
    INF_RES_RULE_RDFS13 in constants.php
    -
    -
    - INF_RES_SUBCLASSOF -
    -
    -
    INF_RES_SUBCLASSOF in constants.php
    -
    -
    - INF_RES_SUBPROPERTYOF -
    -
    -
    INF_RES_SUBPROPERTYOF in constants.php
    -
    -
    - init -
    -
    -
    init() in rss_fetch.inc
    -
    -
    - IN_DESCRIPTION -
    -
    -
    IN_DESCRIPTION in constants.php
    -
    -
    - IN_PROPERTY_EMPTY_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_LITERAL -
    -
    -
    IN_PROPERTY_LITERAL in constants.php
    -
    -
    - IN_PROPERTY_PARSE_TYPE_COLLECTION -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_LITERAL -
    -
    - -
    -
    - IN_PROPERTY_PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - IN_PROPERTY_RESOURCE -
    -
    -
    IN_PROPERTY_RESOURCE in constants.php
    -
    -
    - IN_PROPERTY_UNKNOWN_OBJECT -
    -
    - -
    -
    - IN_RDF -
    -
    -
    IN_RDF in constants.php
    -
    -
    - IN_TOP_LEVEL -
    -
    -
    IN_TOP_LEVEL in constants.php
    -
    -
    - IN_UNKNOWN -
    -
    -
    IN_UNKNOWN in constants.php
    -
    -
    - IN_XML -
    -
    -
    IN_XML in constants.php
    -
    -
    - is_atom -
    -
    -
    MagpieRSS::is_atom() in rss_parse.inc
    -
    -
    - is_client_error -
    -
    -
    is_client_error() in rss_fetch.inc
    -
    -
    - is_error -
    -
    -
    is_error() in rss_fetch.inc
    -
    -
    - is_info -
    -
    -
    is_info() in rss_fetch.inc
    -
    -
    - is_redirect -
    -
    -
    is_redirect() in rss_fetch.inc
    -
    -
    - is_rss -
    -
    -
    MagpieRSS::is_rss() in rss_parse.inc
    -
    -
    - is_server_error -
    -
    -
    is_server_error() in rss_fetch.inc
    -
    -
    - is_success -
    -
    -
    is_success() in rss_fetch.inc
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - known_encoding -
    -
    - -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lastredirectaddr -
    -
    -
    Snoopy::$lastredirectaddr in Snoopy.class.inc
    -
    -
    - LINEFEED -
    -
    -
    LINEFEED in constants.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $maxframes -
    -
    -
    Snoopy::$maxframes in Snoopy.class.inc
    -
    -
    - $maxlength -
    -
    -
    Snoopy::$maxlength in Snoopy.class.inc
    -
    -
    - $maxredirs -
    -
    -
    Snoopy::$maxredirs in Snoopy.class.inc
    -
    -
    - $MAX_AGE -
    -
    -
    RSSCache::$MAX_AGE in rss_cache.inc
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS in rss_parse.inc
    -
    Hybrid parser, and object, takes RSS as a string and returns a simple object.
    -
    -
    - MagpieRSS -
    -
    -
    MagpieRSS::MagpieRSS() in rss_parse.inc
    -
    Set up XML parser, parse source, and return populated RSS object..
    -
    -
    - MAGPIE_CACHE_AGE -
    -
    -
    MAGPIE_CACHE_AGE in magpie_debug.php
    -
    -
    - MAGPIE_DEBUG -
    -
    -
    MAGPIE_DEBUG in magpie_debug.php
    -
    -
    - MAGPIE_DIR -
    -
    -
    MAGPIE_DIR in magpie_slashbox.php
    -
    -
    - magpie_error -
    -
    -
    magpie_error() in rss_fetch.inc
    -
    -
    - MAGPIE_EXTLIB -
    -
    -
    MAGPIE_EXTLIB in rss_fetch.inc
    -
    -
    - MAGPIE_OUTPUT_ENCODING -
    -
    -
    MAGPIE_OUTPUT_ENCODING in magpie_debug.php
    -
    -
    - MAGPIE_VERSION -
    -
    -
    MAGPIE_VERSION in rss_fetch.inc
    -
    -
    - map_attrs -
    -
    -
    map_attrs() in rss_parse.inc
    -
    -
    - MAX_ALLOWED_ABBREVIATED_LENGTH -
    -
    - -
    -
    - MEMMODEL -
    -
    -
    MEMMODEL in constants.php
    -
    -
    - ModelP.php -
    -
    -
    ModelP.php in ModelP.php
    -
    -
    - magpie_debug.php -
    -
    -
    magpie_debug.php in magpie_debug.php
    -
    -
    - magpie_simple.php -
    -
    -
    magpie_simple.php in magpie_simple.php
    -
    -
    - magpie_slashbox.php -
    -
    -
    magpie_slashbox.php in magpie_slashbox.php
    -
    -
    - modifier.rss_date_parse.php -
    -
    -
    modifier.rss_date_parse.php in modifier.rss_date_parse.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N3SER_BNODE_SHORT -
    -
    -
    N3SER_BNODE_SHORT in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_CHAR -
    -
    -
    NAMESPACE_SEPARATOR_CHAR in constants.php
    -
    -
    - NAMESPACE_SEPARATOR_STRING -
    -
    - -
    -
    - normalize -
    -
    -
    MagpieRSS::normalize() in rss_parse.inc
    -
    -
    - NO_INDEX -
    -
    -
    NO_INDEX in constants.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $offsiteok -
    -
    -
    Snoopy::$offsiteok in Snoopy.class.inc
    -
    -
    - ONTMODEL -
    -
    -
    ONTMODEL in constants.php
    -
    -
    - OWL_INVERSE_OF -
    -
    -
    OWL_INVERSE_OF in constants.php
    -
    -
    - OWL_NS -
    -
    -
    OWL_NS in constants.php
    -
    -
    - OWL_PREFIX -
    -
    -
    OWL_PREFIX in constants.php
    -
    -
    - OWL_SAME_AS -
    -
    -
    OWL_SAME_AS in constants.php
    -
    -
    - OWL_URI -
    -
    -
    OWL_URI in constants.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parser -
    -
    -
    MagpieRSS::$parser in rss_parse.inc
    -
    -
    - $pass -
    -
    -
    Snoopy::$pass in Snoopy.class.inc
    -
    -
    - $passcookies -
    -
    -
    Snoopy::$passcookies in Snoopy.class.inc
    -
    -
    - $port -
    -
    -
    Snoopy::$port in Snoopy.class.inc
    -
    -
    - $proxy_host -
    -
    -
    Snoopy::$proxy_host in Snoopy.class.inc
    -
    -
    - $proxy_port -
    -
    -
    Snoopy::$proxy_port in Snoopy.class.inc
    -
    -
    - PACKAGE_DATASET -
    -
    -
    PACKAGE_DATASET in constants.php
    -
    -
    - PACKAGE_DBASE -
    -
    -
    PACKAGE_DBASE in constants.php
    -
    -
    - PACKAGE_INFMODEL -
    -
    -
    PACKAGE_INFMODEL in constants.php
    -
    -
    - PACKAGE_MODEL -
    -
    -
    PACKAGE_MODEL in constants.php
    -
    -
    - PACKAGE_ONTMODEL -
    -
    -
    PACKAGE_ONTMODEL in constants.php
    -
    -
    - PACKAGE_RDQL -
    -
    -
    PACKAGE_RDQL in constants.php
    -
    -
    - PACKAGE_RESMODEL -
    -
    -
    PACKAGE_RESMODEL in constants.php
    -
    -
    - PACKAGE_SPARQL -
    -
    -
    PACKAGE_SPARQL in constants.php
    -
    -
    - PACKAGE_SYNTAX_GRDDL -
    -
    -
    PACKAGE_SYNTAX_GRDDL in constants.php
    -
    -
    - PACKAGE_SYNTAX_N3 -
    -
    -
    PACKAGE_SYNTAX_N3 in constants.php
    -
    -
    - PACKAGE_SYNTAX_RDF -
    -
    -
    PACKAGE_SYNTAX_RDF in constants.php
    -
    -
    - PACKAGE_SYNTAX_RSS -
    -
    -
    PACKAGE_SYNTAX_RSS in constants.php
    -
    -
    - PACKAGE_SYNTAX_SPARQLRES -
    -
    -
    PACKAGE_SYNTAX_SPARQLRES in constants.php
    -
    -
    - PACKAGE_UTILITY -
    -
    -
    PACKAGE_UTILITY in constants.php
    -
    -
    - PACKAGE_VOCABULARY -
    -
    -
    PACKAGE_VOCABULARY in constants.php
    -
    -
    - parse_w3cdtf -
    -
    -
    parse_w3cdtf() in rss_utils.inc
    -
    -
    - php4_create_parser -
    -
    - -
    Instaniate an XML parser under PHP4
    -
    -
    - php5_create_parser -
    -
    - -
    Instantiate an XML parser under PHP5
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $rawheaders -
    -
    -
    Snoopy::$rawheaders in Snoopy.class.inc
    -
    -
    - $read_timeout -
    -
    -
    Snoopy::$read_timeout in Snoopy.class.inc
    -
    -
    - $referer -
    -
    -
    Snoopy::$referer in Snoopy.class.inc
    -
    -
    - $response_code -
    -
    -
    Snoopy::$response_code in Snoopy.class.inc
    -
    -
    - $results -
    -
    -
    Snoopy::$results in Snoopy.class.inc
    -
    -
    - RdfAPI.php -
    -
    -
    RdfAPI.php in RdfAPI.php
    -
    -
    - RDFAPI_ERROR -
    -
    -
    RDFAPI_ERROR in constants.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_CLASS in constants.php
    -
    -
    - RDFS_COMMENT -
    -
    -
    RDFS_COMMENT in constants.php
    -
    -
    - RDFS_DATATYPE -
    -
    -
    RDFS_DATATYPE in constants.php
    -
    -
    - RDFS_DOMAIN -
    -
    -
    RDFS_DOMAIN in constants.php
    -
    -
    - RDFS_IS_DEFINED_BY -
    -
    -
    RDFS_IS_DEFINED_BY in constants.php
    -
    -
    - RDFS_LABEL -
    -
    -
    RDFS_LABEL in constants.php
    -
    -
    - RDFS_LITERAL -
    -
    -
    RDFS_LITERAL in constants.php
    -
    -
    - RDFS_RANGE -
    -
    -
    RDFS_RANGE in constants.php
    -
    -
    - RDFS_RESOURCE -
    -
    -
    RDFS_RESOURCE in constants.php
    -
    -
    - RDFS_SEE_ALSO -
    -
    -
    RDFS_SEE_ALSO in constants.php
    -
    -
    - RDFS_SUBCLASSOF -
    -
    -
    RDFS_SUBCLASSOF in constants.php
    -
    -
    - RDFS_SUBPROPERTYOF -
    -
    -
    RDFS_SUBPROPERTYOF in constants.php
    -
    -
    - RDFS_VOCABULARY -
    -
    -
    RDFS_VOCABULARY in constants.php
    -
    -
    - RDF_ABOUT -
    -
    -
    RDF_ABOUT in constants.php
    -
    -
    - RDF_ABOUT_EACH -
    -
    -
    RDF_ABOUT_EACH in constants.php
    -
    -
    - RDF_ABOUT_EACH_PREFIX -
    -
    -
    RDF_ABOUT_EACH_PREFIX in constants.php
    -
    -
    - RDF_ALT -
    -
    -
    RDF_ALT in constants.php
    -
    -
    - RDF_BAG -
    -
    -
    RDF_BAG in constants.php
    -
    -
    - RDF_BAG_ID -
    -
    -
    RDF_BAG_ID in constants.php
    -
    -
    - RDF_DATATYPE -
    -
    -
    RDF_DATATYPE in constants.php
    -
    -
    - RDF_DATATYPE_SCHEMA_URI -
    -
    -
    RDF_DATATYPE_SCHEMA_URI in constants.php
    -
    -
    - RDF_DESCRIPTION -
    -
    -
    RDF_DESCRIPTION in constants.php
    -
    -
    - RDF_FIRST -
    -
    -
    RDF_FIRST in constants.php
    -
    -
    - RDF_ID -
    -
    -
    RDF_ID in constants.php
    -
    -
    - RDF_LI -
    -
    -
    RDF_LI in constants.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF_LIST in constants.php
    -
    -
    - RDF_NAMESPACE_PREFIX -
    -
    -
    RDF_NAMESPACE_PREFIX in constants.php
    -
    -
    - RDF_NAMESPACE_URI -
    -
    -
    RDF_NAMESPACE_URI in constants.php
    -
    -
    - RDF_NIL -
    -
    -
    RDF_NIL in constants.php
    -
    -
    - RDF_NODEID -
    -
    -
    RDF_NODEID in constants.php
    -
    -
    - RDF_OBJECT -
    -
    -
    RDF_OBJECT in constants.php
    -
    -
    - RDF_OBJECT_TYPE_BNODE -
    -
    -
    RDF_OBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_LITERAL -
    -
    -
    RDF_OBJECT_TYPE_LITERAL in constants.php
    -
    -
    - RDF_OBJECT_TYPE_RESOURCE -
    -
    -
    RDF_OBJECT_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_OBJECT_TYPE_XML -
    -
    -
    RDF_OBJECT_TYPE_XML in constants.php
    -
    -
    - RDF_PARSE_TYPE -
    -
    -
    RDF_PARSE_TYPE in constants.php
    -
    -
    - RDF_PARSE_TYPE_COLLECTION -
    -
    -
    RDF_PARSE_TYPE_COLLECTION in constants.php
    -
    -
    - RDF_PARSE_TYPE_LITERAL -
    -
    -
    RDF_PARSE_TYPE_LITERAL in constants.php
    -
    -
    - RDF_PARSE_TYPE_RESOURCE -
    -
    -
    RDF_PARSE_TYPE_RESOURCE in constants.php
    -
    -
    - RDF_PREDICATE -
    -
    -
    RDF_PREDICATE in constants.php
    -
    -
    - RDF_PROPERTY -
    -
    -
    RDF_PROPERTY in constants.php
    -
    -
    - RDF_RDF -
    -
    -
    RDF_RDF in constants.php
    -
    -
    - RDF_RESOURCE -
    -
    -
    RDF_RESOURCE in constants.php
    -
    -
    - RDF_REST -
    -
    -
    RDF_REST in constants.php
    -
    -
    - RDF_SCHEMA_PREFIX -
    -
    -
    RDF_SCHEMA_PREFIX in constants.php
    -
    -
    - RDF_SCHEMA_URI -
    -
    -
    RDF_SCHEMA_URI in constants.php
    -
    -
    - RDF_SEEALSO -
    -
    -
    RDF_SEEALSO in constants.php
    -
    -
    - RDF_SEQ -
    -
    -
    RDF_SEQ in constants.php
    -
    -
    - RDF_STATEMENT -
    -
    -
    RDF_STATEMENT in constants.php
    -
    -
    - RDF_SUBJECT -
    -
    -
    RDF_SUBJECT in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_ANONYMOUS -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_BNODE -
    -
    -
    RDF_SUBJECT_TYPE_BNODE in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_DISTRIBUTED -
    -
    - -
    -
    - RDF_SUBJECT_TYPE_PREFIX -
    -
    -
    RDF_SUBJECT_TYPE_PREFIX in constants.php
    -
    -
    - RDF_SUBJECT_TYPE_URI -
    -
    -
    RDF_SUBJECT_TYPE_URI in constants.php
    -
    -
    - RDF_TYPE -
    -
    -
    RDF_TYPE in constants.php
    -
    -
    - RDF_VALUE -
    -
    -
    RDF_VALUE in constants.php
    -
    -
    - RDF_XMLLITERAL -
    -
    -
    RDF_XMLLITERAL in constants.php
    -
    -
    - RDQL.php -
    -
    -
    RDQL.php in RDQL.php
    -
    -
    - RDQL_AND_ERR -
    -
    -
    RDQL_AND_ERR in constants.php
    -
    -
    - RDQL_ERR -
    -
    -
    RDQL_ERR in constants.php
    -
    -
    - RDQL_SEL_ERR -
    -
    -
    RDQL_SEL_ERR in constants.php
    -
    -
    - RDQL_SRC_ERR -
    -
    -
    RDQL_SRC_ERR in constants.php
    -
    -
    - RDQL_SYN_ERR -
    -
    -
    RDQL_SYN_ERR in constants.php
    -
    -
    - RDQL_USG_ERR -
    -
    -
    RDQL_USG_ERR in constants.php
    -
    -
    - RDQL_WHR_ERR -
    -
    -
    RDQL_WHR_ERR in constants.php
    -
    -
    - RESMODEL -
    -
    -
    RESMODEL in constants.php
    -
    -
    - ResModelP.php -
    -
    -
    ResModelP.php in ResModelP.php
    -
    -
    - RSS -
    -
    -
    RSS in rss_parse.inc
    -
    Project: MagpieRSS: a simple RSS integration tool File: rss_parse.inc - parse an RSS or Atom feed return as a simple object.
    -
    -
    - RSSCache -
    -
    -
    RSSCache::RSSCache() in rss_cache.inc
    -
    -
    - RSSCache -
    -
    -
    RSSCache in rss_cache.inc
    -
    -
    - RSS_NS -
    -
    -
    RSS_NS in constants.php
    -
    -
    - rss_cache.inc -
    -
    -
    rss_cache.inc in rss_cache.inc
    -
    -
    - rss_fetch.inc -
    -
    -
    rss_fetch.inc in rss_fetch.inc
    -
    -
    - rss_parse.inc -
    -
    -
    rss_parse.inc in rss_parse.inc
    -
    -
    - rss_utils.inc -
    -
    -
    rss_utils.inc in rss_utils.inc
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $stack -
    -
    -
    MagpieRSS::$stack in rss_parse.inc
    -
    -
    - $status -
    -
    -
    Snoopy::$status in Snoopy.class.inc
    -
    -
    - serialize -
    -
    -
    RSSCache::serialize() in rss_cache.inc
    -
    -
    - SER_RDF_QNAMES -
    -
    -
    SER_RDF_QNAMES in constants.php
    -
    -
    - SER_SORT_MODEL -
    -
    -
    SER_SORT_MODEL in constants.php
    -
    -
    - SER_USE_ATTRIBUTES -
    -
    -
    SER_USE_ATTRIBUTES in constants.php
    -
    -
    - SER_USE_ENTITIES -
    -
    -
    SER_USE_ENTITIES in constants.php
    -
    -
    - SER_XML_DECLARATION -
    -
    -
    SER_XML_DECLARATION in constants.php
    -
    -
    - set -
    -
    -
    RSSCache::set() in rss_cache.inc
    -
    -
    - setcookies -
    -
    -
    Snoopy::setcookies() in Snoopy.class.inc
    -
    -
    - slashbox -
    -
    -
    slashbox() in magpie_slashbox.php
    -
    -
    - SMARTY_DIR -
    -
    -
    SMARTY_DIR in simple_smarty.php
    -
    -
    - smarty_modifier_rss_date_parse -
    -
    -
    smarty_modifier_rss_date_parse() in modifier.rss_date_parse.php
    -
    -
    - Snoopy -
    -
    -
    Snoopy in Snoopy.class.inc
    -
    ***********************************************
    -
    -
    - SPARQL.php -
    -
    -
    SPARQL.php in SPARQL.php
    -
    -
    - SyntaxGRDDL.php -
    -
    -
    SyntaxGRDDL.php in SyntaxGRDDL.php
    -
    -
    - SyntaxN3.php -
    -
    -
    SyntaxN3.php in SyntaxN3.php
    -
    -
    - SyntaxRDF.php -
    -
    -
    SyntaxRDF.php in SyntaxRDF.php
    -
    -
    - SyntaxRSS.php -
    -
    -
    SyntaxRSS.php in SyntaxRSS.php
    -
    -
    - SyntaxSparqlRes.php -
    -
    -
    SyntaxSparqlRes.php in SyntaxSparqlRes.php
    -
    -
    - Snoopy.class.inc -
    -
    -
    Snoopy.class.inc in Snoopy.class.inc
    -
    -
    - simple_smarty.php -
    -
    -
    simple_smarty.php in simple_smarty.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $textinput -
    -
    -
    MagpieRSS::$textinput in rss_parse.inc
    -
    -
    - $timed_out -
    -
    -
    Snoopy::$timed_out in Snoopy.class.inc
    -
    -
    - test_library_support -
    -
    -
    test_library_support() in magpie_debug.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $user -
    -
    -
    Snoopy::$user in Snoopy.class.inc
    -
    -
    - $use_gzip -
    -
    -
    Snoopy::$use_gzip in Snoopy.class.inc
    -
    -
    - UNIC_RDF -
    -
    -
    UNIC_RDF in constants.php
    -
    -
    - unserialize -
    -
    -
    RSSCache::unserialize() in rss_cache.inc
    -
    -
    - USE_ANY_QUOTE -
    -
    -
    USE_ANY_QUOTE in constants.php
    -
    -
    - USE_CDATA -
    -
    -
    USE_CDATA in constants.php
    -
    -
    - Utility.php -
    -
    -
    Utility.php in Utility.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VALIDATE_IDS -
    -
    -
    VALIDATE_IDS in constants.php
    -
    -
    - VCARD_NS -
    -
    -
    VCARD_NS in constants.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - $WARNING -
    -
    -
    MagpieRSS::$WARNING in rss_parse.inc
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML_LANG -
    -
    -
    XML_LANG in constants.php
    -
    -
    - XML_NAMESPACE_DECLARATION_PREFIX -
    -
    - -
    -
    - XML_NAMESPACE_PREFIX -
    -
    -
    XML_NAMESPACE_PREFIX in constants.php
    -
    -
    - XML_NAMESPACE_URI -
    -
    -
    XML_NAMESPACE_URI in constants.php
    -
    -
    - XML_SCHEMA -
    -
    -
    XML_SCHEMA in constants.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - r - s - t - u - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_infModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_infModel.html deleted file mode 100755 index 47cc4097..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_infModel.html +++ /dev/null @@ -1,510 +0,0 @@ - - - - - - - - - - - - -

    [infModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - e - f - g - i - l - r - s - t - w -
    - - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    InfModel::add() in InfModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    InfModelF::add() in InfModelF.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    InfModelB::add() in InfModelB.php
    -
    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
    -
    -
    - addModel -
    -
    -
    InfModelF::addModel() in InfModelF.php
    -
    Adds another model to this MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - checkEntailment -
    -
    - -
    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.
    -
    -
    - checkTrigger -
    -
    - -
    Checks, if the statement satisfies the trigger.
    -
    -
    - contains -
    -
    -
    InfModelB::contains() in InfModelB.php
    -
    Tests if the Model contains the given triple.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - entail -
    -
    -
    InfRule::entail() in InfRule.php
    -
    Returns a infered InfStatement by evaluating the statement with the entailment rule.
    -
    -
    - entailStatement -
    -
    - -
    Entails a statement by recursively using the _entailStatementRec method.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    InfModelB::find() in InfModelB.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findRegex -
    -
    -
    InfModel::findRegex() in InfModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.
    -
    -
    - getBaseMemModel -
    -
    - -
    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.
    -
    -
    - getEntailment -
    -
    - -
    -
    - getMemModel -
    -
    -
    InfModelB::getMemModel() in InfModelB.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.
    -
    -
    - getMemModel -
    -
    -
    InfModelF::getMemModel() in InfModelF.php
    -
    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.
    -
    -
    - getModifiedFind -
    -
    - -
    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.
    -
    -
    - getSchema -
    -
    -
    InfModel::getSchema() in InfModel.php
    -
    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the Model.
    -
    -
    - getTrigger -
    -
    -
    InfRule::getTrigger() in InfRule.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - InfModel -
    -
    -
    InfModel::InfModel() in InfModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModel -
    -
    -
    InfModel in InfModel.php
    -
    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.
    -
    -
    - InfModel.php -
    -
    -
    InfModel.php in InfModel.php
    -
    -
    - InfModelB.php -
    -
    -
    InfModelB.php in InfModelB.php
    -
    -
    - InfModelF.php -
    -
    -
    InfModelF.php in InfModelF.php
    -
    -
    - InfRule.php -
    -
    -
    InfRule.php in InfRule.php
    -
    -
    - InfStatement.php -
    -
    -
    InfStatement.php in InfStatement.php
    -
    -
    - InfModelB -
    -
    -
    InfModelB in InfModelB.php
    -
    A InfModelB extends the InfModel Class, with a backward chaining algorithm.
    -
    -
    - InfModelB -
    -
    -
    InfModelB::InfModelB() in InfModelB.php
    -
    Constructor You can supply a base_uri
    -
    -
    - InfModelF -
    -
    -
    InfModelF in InfModelF.php
    -
    A InfModelF extends the InfModel Class, with a forward chaining algorithm.
    -
    -
    - InfModelF -
    -
    -
    InfModelF::InfModelF() in InfModelF.php
    -
    Constructor You can supply a base_uri.
    -
    -
    - infRule -
    -
    -
    InfRule::infRule() in InfRule.php
    -
    Constructor
    -
    -
    - InfRule -
    -
    -
    InfRule in InfRule.php
    -
    This class represents a single rule in a RDFS inference model.
    -
    -
    - InfStatement -
    -
    -
    InfStatement in InfStatement.php
    -
    An RDF statement which was entailed by a inference rule.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - load -
    -
    -
    InfModelF::load() in InfModelF.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - remove -
    -
    -
    InfModelF::remove() in InfModelF.php
    -
    Removes the triple from the MemModel.
    -
    -
    - remove -
    -
    -
    InfModelB::remove() in InfModelB.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeInfered -
    -
    - -
    Removes all infered statements from the model but keeps the infernece rules.
    -
    -
    - replace -
    -
    -
    InfModel::replace() in InfModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - saveAs -
    -
    -
    InfModelB::saveAs() in InfModelB.php
    -
    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.
    -
    -
    - setEntailment -
    -
    - -
    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - setTrigger -
    -
    -
    InfRule::setTrigger() in InfRule.php
    -
    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.
    -
    -
    - size -
    -
    -
    InfModelB::size() in InfModelB.php
    -
    Number of all inferable triples in the Model.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    InfModelB::toString() in InfModelB.php
    -
    Short Dump of the InfModelB.
    -
    -
    - toString -
    -
    -
    InfModelF::toString() in InfModelF.php
    -
    Short Dump of the InfModelF.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the InfModelB including ALL inferable triples.
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHtml -
    -
    -
    InfModelB::writeAsHtml() in InfModelB.php
    -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the Model including ALL inferable triples.
    -
    -
    - -
    - a - c - e - f - g - i - l - r - s - t - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_model.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_model.html deleted file mode 100755 index e25c97a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_model.html +++ /dev/null @@ -1,1506 +0,0 @@ - - - - - - - - - - - - -

    [model] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - u - v - w - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _parseSparqlQuery -
    -
    - -
    Parses an query and returns the parsed form.
    -
    -
    - _prepareSparql -
    -
    - -
    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...
    -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    MemModel::add() in MemModel.php
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    -
    - add -
    -
    -
    DbModel::add() in DbModel.php
    -
    Add a new triple to this DbModel.
    -
    -
    - addModel -
    -
    -
    MemModel::addModel() in MemModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addModel -
    -
    -
    DbModel::addModel() in DbModel.php
    -
    Add the given model to this DbModel.
    -
    -
    - addNamespace -
    -
    -
    MemModel::addNamespace() in MemModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addNamespace -
    -
    - -
    Adds a namespace and prefix to the model.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Alias for the method add().
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BlankNode -
    -
    -
    BlankNode::BlankNode() in Blanknode.php
    -
    Constructor You can supply a label or You supply a model and a unique ID is gernerated.
    -
    -
    - BlankNode -
    -
    -
    BlankNode in Blanknode.php
    -
    An RDF blank node.
    -
    -
    - Blanknode.php -
    -
    -
    Blanknode.php in Blanknode.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - close -
    -
    -
    MemModel::close() in MemModel.php
    -
    Close the MemModel and free up resources held.
    -
    -
    - close -
    -
    -
    DbModel::close() in DbModel.php
    -
    Close this DbModel
    -
    -
    - close -
    -
    -
    DbStore::close() in DbStore.php
    -
    Close the DbStore.
    -
    -
    - compare -
    -
    -
    Statement::compare() in Statement.php
    -
    Compares two statements and returns integer less than, equal to, or greater than zero.
    -
    -
    - contains -
    -
    -
    MemModel::contains() in MemModel.php
    -
    Tests if the MemModel contains the given triple.
    -
    -
    - contains -
    -
    -
    DbModel::contains() in DbModel.php
    -
    Check if the DbModel contains the given statement.
    -
    -
    - containsAll -
    -
    -
    MemModel::containsAll() in MemModel.php
    -
    Determine if all of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAll -
    -
    -
    DbModel::containsAll() in DbModel.php
    -
    Determine if all of the statements in the given model are also contained in this DbModel.
    -
    -
    - containsAny -
    -
    -
    MemModel::containsAny() in MemModel.php
    -
    Determine if any of the statements in a model are also contained in this MemModel.
    -
    -
    - containsAny -
    -
    -
    DbModel::containsAny() in DbModel.php
    -
    Determine if any of the statements in the given model are also contained in this DbModel.
    -
    -
    - createTables -
    -
    - -
    Create tables and indexes for the given database type.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - datasetExists -
    -
    - -
    Check if the Dataset with the given $datasetName is already stored in the database
    -
    -
    - DbModel -
    -
    -
    DbModel::DbModel() in DbModel.php
    -
    Constructor Do not call this directly.
    -
    -
    - DbModel -
    -
    -
    DbModel in DbModel.php
    -
    This class provides methods for manipulating DbModels from DbStore.
    -
    -
    - DbStore -
    -
    -
    DbStore::DbStore() in DbStore.php
    -
    Constructor: Set the database connection with the given parameters.
    -
    -
    - DbStore -
    -
    -
    DbStore in DbStore.php
    -
    DbStore is a persistent store of RDF data using relational database technology.
    -
    -
    - delete -
    -
    -
    DbModel::delete() in DbModel.php
    -
    Remove this DbModel from database and clean up.
    -
    -
    - DbModel.php -
    -
    -
    DbModel.php in DbModel.php
    -
    -
    - DbStore.php -
    -
    -
    DbStore.php in DbStore.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    Resource::equals() in Resource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    Statement::equals() in Statement.php
    -
    Checks if two statements are equal.
    -
    -
    - equals -
    -
    -
    MemModel::equals() in MemModel.php
    -
    Checks if two models are equal.
    -
    -
    - equals -
    -
    -
    Literal::equals() in Literal.php
    -
    Checks if ihe literal equals another literal.
    -
    -
    - equals -
    -
    -
    DbModel::equals() in DbModel.php
    -
    Check if two models are equal.
    -
    -
    - equals -
    -
    -
    BlankNode::equals() in Blanknode.php
    -
    Checks if two blank nodes are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    DbModel::find() in DbModel.php
    -
    General method to search for triples in the DbModel.
    -
    -
    - find -
    -
    -
    MemModel::find() in MemModel.php
    -
    General method to search for triples.
    -
    -
    - findAsIterator -
    -
    - -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - findCount -
    -
    -
    DbModel::findCount() in DbModel.php
    -
    Search for triples and return the number of matches.
    -
    -
    - findCount -
    -
    -
    MemModel::findCount() in MemModel.php
    -
    Searches for triples and returns the number of matches.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Search for triples and return the first matching statement.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - findForward -
    -
    - -
    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.
    -
    -
    - findRegex -
    -
    -
    DbModel::findRegex() in DbModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findRegex -
    -
    -
    MemModel::findRegex() in MemModel.php
    -
    Method to search for triples using Perl-style regular expressions.
    -
    -
    - findVocabulary -
    -
    - -
    Return all tripels of a certain vocabulary.
    -
    -
    - findVocabulary -
    -
    - -
    Returns all tripels of a certain vocabulary.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getBaseURI -
    -
    -
    Model::getBaseURI() in Model.php
    -
    Return current baseURI.
    -
    -
    - getDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.
    -
    -
    - getDatasetMem -
    -
    -
    ModelFactory::getDatasetMem() in ModelFactory.php
    -
    Returns a NamedGraphSetMem.
    -
    -
    - getDatatype -
    -
    -
    Literal::getDatatype() in Literal.php
    -
    Returns the datatype of the literal.
    -
    -
    - getDbConn -
    -
    -
    DbModel::getDbConn() in DbModel.php
    -
    Returns the database connection object
    -
    -
    - getDbModel -
    -
    -
    ModelFactory::getDbModel() in ModelFactory.php
    -
    Returns a new DbModel using the database connection supplied by $dbStore.
    -
    -
    - getDbStore -
    -
    -
    ModelFactory::getDbStore() in ModelFactory.php
    -
    Returns a database connection with the given parameters.
    -
    -
    - getDefaultDbModel -
    -
    - -
    Returns a DbModel with the database connection defined in constants.php.
    -
    -
    - getDefaultModel -
    -
    - -
    Returns a MemModel.
    -
    -
    - getID -
    -
    -
    BlankNode::getID() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getIndexType -
    -
    -
    MemModel::getIndexType() in MemModel.php
    -
    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),
    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.
    -
    -
    - getInfModelB -
    -
    -
    ModelFactory::getInfModelB() in ModelFactory.php
    -
    Returns a InfModelB.
    -
    -
    - getInfModelF -
    -
    -
    ModelFactory::getInfModelF() in ModelFactory.php
    -
    Returns a InfModelF.
    -
    -
    - getLabel -
    -
    -
    BlankNode::getLabel() in Blanknode.php
    -
    Returns the ID of the blank node.
    -
    -
    - getLabel -
    -
    -
    Literal::getLabel() in Literal.php
    -
    Returns the string value of the literal.
    -
    -
    - getLabel -
    -
    -
    Resource::getLabel() in Resource.php
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    -
    - getLabelObject -
    -
    - -
    Reurns the URI, text or bNode identifier of the statements's object.
    -
    -
    - getLabelPredicate -
    -
    - -
    Returns the URI of the statements's predicate.
    -
    -
    - getLabelSubject -
    -
    - -
    Returns the URI or bNode identifier of the statements's subject.
    -
    -
    - getLanguage -
    -
    -
    Literal::getLanguage() in Literal.php
    -
    Returns the language of the literal.
    -
    -
    - getLocalName -
    -
    -
    Resource::getLocalName() in Resource.php
    -
    Returns the local name of the resource.
    -
    -
    - getMemModel -
    -
    -
    ModelFactory::getMemModel() in ModelFactory.php
    -
    Returns a MemModel.
    -
    -
    - getMemModel -
    -
    -
    DbModel::getMemModel() in DbModel.php
    -
    Create a MemModel containing all the triples of the current DbModel.
    -
    -
    - getMemModelByRDQL -
    -
    - -
    Perform an RDQL query on this Model. Should work with all types of models.
    -
    -
    - getModel -
    -
    -
    DbStore::getModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getModelID -
    -
    -
    DbModel::getModelID() in DbModel.php
    -
    Returns the model id
    -
    -
    - getNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.
    -
    -
    - getNamespace -
    -
    -
    Resource::getNamespace() in Resource.php
    -
    Returns the namespace of the resource. May return null.
    -
    -
    - getNewDatasetDb -
    -
    - -
    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.
    -
    -
    - getNewModel -
    -
    -
    DbStore::getNewModel() in DbStore.php
    -
    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.
    -
    -
    - getNewNamedGraphDb -
    -
    - -
    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).
    -
    -
    - getObject -
    -
    -
    Statement::getObject() in Statement.php
    -
    Returns the object of the triple.
    -
    -
    - getOntModel -
    -
    - -
    Returns an OntModel with this model as baseModel.
    -
    -
    - getOntModel -
    -
    -
    ModelFactory::getOntModel() in ModelFactory.php
    -
    Returns an OntModel.
    -
    -
    - getOntModelForBaseModel -
    -
    - -
    Creates an OntModel that wraps an existing base model.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getPredicate -
    -
    -
    Statement::getPredicate() in Statement.php
    -
    Returns the predicate of the triple.
    -
    -
    - getResModel -
    -
    - -
    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).
    -
    -
    - getResModel -
    -
    -
    ModelFactory::getResModel() in ModelFactory.php
    -
    Returns a ResModel.
    -
    -
    - getResModelForBaseModel -
    -
    - -
    Creates a ResModel that wraps an existing base model.
    -
    -
    - getSparqlClient -
    -
    - -
    Creates a SparqlClient.
    -
    -
    - getStatementIterator -
    -
    - -
    Returns a StatementIterator for traversing the MemModel.
    -
    -
    - getSubject -
    -
    -
    Statement::getSubject() in Statement.php
    -
    Returns the subject of the triple.
    -
    -
    - getURI -
    -
    -
    Resource::getURI() in Resource.php
    -
    Returns the URI of the resource.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hashCode -
    -
    -
    Statement::hashCode() in Statement.php
    -
    Retruns the hash code of the triple.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - index -
    -
    -
    MemModel::index() in MemModel.php
    -
    Builds a search index for the statements in the MemModel.
    -
    -
    - intersect -
    -
    -
    MemModel::intersect() in MemModel.php
    -
    Returns a new MemModel containing all the statements which are in both this MemModel and another.
    -
    -
    - intersect -
    -
    -
    DbModel::intersect() in DbModel.php
    -
    Return a new MemModel containing all the statements which are in both this model and the given model.
    -
    -
    - isEmpty -
    -
    -
    MemModel::isEmpty() in MemModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    DbModel::isEmpty() in DbModel.php
    -
    Check if this DbModel is empty.
    -
    -
    - isIndexed -
    -
    -
    MemModel::isIndexed() in MemModel.php
    -
    Returns true if there is an index, false if not.
    -
    -
    - isSetup -
    -
    -
    DbStore::isSetup() in DbStore.php
    -
    Checks if tables are setup for RAP
    -
    -
    - iterFind -
    -
    -
    MemModel::iterFind() in MemModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - iterFind -
    -
    -
    DbModel::iterFind() in DbModel.php
    -
    Returns a FindIterator for traversing the MemModel.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listModels -
    -
    -
    DbStore::listModels() in DbStore.php
    -
    List all DbModels stored in the database.
    -
    -
    - Literal -
    -
    -
    Literal::Literal() in Literal.php
    -
    Constructor
    -
    -
    - Literal -
    -
    -
    Literal in Literal.php
    -
    An RDF literal.
    -
    -
    - load -
    -
    -
    Model::load() in Model.php
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    -
    - Literal.php -
    -
    -
    Literal.php in Literal.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MemModel -
    -
    -
    MemModel::MemModel() in MemModel.php
    -
    Constructor You can supply a base_uri
    -
    -
    - MemModel -
    -
    -
    MemModel in MemModel.php
    -
    A MemModel is an RDF Model, which is stored in the main memory.
    -
    -
    - Model -
    -
    -
    Model in Model.php
    -
    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
    -
    -
    - Model -
    -
    -
    Model::Model() in Model.php
    -
    Notice for people who are used to work with older versions of RAP.
    -
    -
    - MemModel.php -
    -
    -
    MemModel.php in MemModel.php
    -
    -
    - Model.php -
    -
    -
    Model.php in Model.php
    -
    -
    - ModelFactory.php -
    -
    -
    ModelFactory.php in ModelFactory.php
    -
    -
    - modelExists -
    -
    -
    DbStore::modelExists() in DbStore.php
    -
    Check if the DbModel with the given modelURI is already stored in the database
    -
    -
    - ModelFactory -
    -
    -
    ModelFactory in ModelFactory.php
    -
    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - Node.php -
    -
    -
    Node.php in Node.php
    -
    -
    - Node -
    -
    -
    Node in Node.php
    -
    An abstract RDF node.
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - object -
    -
    -
    Statement::object() in Statement.php
    -
    Alias for getObject()
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - predicate -
    -
    -
    Statement::predicate() in Statement.php
    -
    Alias for getPredicate()
    -
    -
    - putModel -
    -
    -
    DbStore::putModel() in DbStore.php
    -
    Store a MemModel or another DbModel from a different DbStore in the database.
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $queryParser -
    -
    -
    Model::$queryParser in Model.php
    -
    SparqlParser so we can re-use it
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - Resource.php -
    -
    -
    Resource.php in Resource.php
    -
    -
    - rdqlQuery -
    -
    -
    MemModel::rdqlQuery() in MemModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQuery -
    -
    -
    DbModel::rdqlQuery() in DbModel.php
    -
    Perform an RDQL query on this DbModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this DBModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - reify -
    -
    -
    Statement::reify() in Statement.php
    -
    Reifies a statement.
    -
    -
    - reify -
    -
    -
    DbModel::reify() in DbModel.php
    -
    Reify the DbModel.
    -
    -
    - reify -
    -
    -
    MemModel::reify() in MemModel.php
    -
    Reifies the MemModel.
    -
    -
    - remove -
    -
    -
    DbModel::remove() in DbModel.php
    -
    Remove the given triple from this DbModel.
    -
    -
    - remove -
    -
    -
    MemModel::remove() in MemModel.php
    -
    Removes the triple from the MemModel.
    -
    -
    - removeNamedGraphDb -
    -
    - -
    Removes the graph with all statements from the database.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - replace -
    -
    -
    MemModel::replace() in MemModel.php
    -
    General method to replace nodes of a MemModel.
    -
    -
    - replace -
    -
    -
    DbModel::replace() in DbModel.php
    -
    General method to replace nodes of a DbModel.
    -
    -
    - Resource -
    -
    -
    Resource::Resource() in Resource.php
    -
    Constructor Takes an URI or a namespace/localname combination
    -
    -
    - Resource -
    -
    -
    Resource in Resource.php
    -
    An RDF resource.
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - Statement.php -
    -
    -
    Statement.php in Statement.php
    -
    -
    - saveAs -
    -
    -
    DbModel::saveAs() in DbModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
    -
    -
    - saveAs -
    -
    -
    MemModel::saveAs() in MemModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - setBaseURI -
    -
    -
    MemModel::setBaseURI() in MemModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setBaseURI -
    -
    -
    DbModel::setBaseURI() in DbModel.php
    -
    Set a base URI for the DbModel.
    -
    -
    - setDatatype -
    -
    -
    Literal::setDatatype() in Literal.php
    -
    Sets the datatype of the literal.
    -
    -
    - setLanguage -
    -
    -
    Literal::setLanguage() in Literal.php
    -
    Sets the language of the literal.
    -
    -
    - size -
    -
    -
    MemModel::size() in MemModel.php
    -
    Number of triples in the MemModel
    -
    -
    - size -
    -
    -
    DbModel::size() in DbModel.php
    -
    Return the number of statements in this DbModel.
    -
    -
    - sparqlPrepare -
    -
    - -
    Prepares a sparql query and returns a prepared statement that can be executed with data later on.
    -
    -
    - sparqlQuery -
    -
    - -
    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.
    -
    -
    - Statement -
    -
    -
    Statement::Statement() in Statement.php
    -
    The parameters to constructor are instances of classes and not just strings
    -
    -
    - Statement -
    -
    -
    Statement in Statement.php
    -
    An RDF statement.
    -
    -
    - subject -
    -
    -
    Statement::subject() in Statement.php
    -
    Alias for getSubject()
    -
    -
    - subtract -
    -
    -
    MemModel::subtract() in MemModel.php
    -
    Returns a new MemModel that is the subtraction of another model from this MemModel.
    -
    -
    - subtract -
    -
    -
    DbModel::subtract() in DbModel.php
    -
    Return a new MemModel that is the subtraction of another model from this DbModel.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    MemModel::toString() in MemModel.php
    -
    Short Dump of the MemModel.
    -
    -
    - toString -
    -
    -
    BlankNode::toString() in Blanknode.php
    -
    Dumps bNode.
    -
    -
    - toString -
    -
    -
    Literal::toString() in Literal.php
    -
    Dumps literal.
    -
    -
    - toString -
    -
    -
    Statement::toString() in Statement.php
    -
    Dumps the triple.
    -
    -
    - toString -
    -
    -
    DbModel::toString() in DbModel.php
    -
    Short dump of the DbModel.
    -
    -
    - toString -
    -
    -
    Resource::toString() in Resource.php
    -
    Dumps resource.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dumps of the MemModel including all triples.
    -
    -
    - toStringIncludingTriples -
    -
    - -
    Dump of the DbModel including all triples.
    -
    -
    - toStringObject -
    -
    - -
    Reurns a toString() serialization of the statements's object.
    -
    -
    - toStringPredicate -
    -
    - -
    Returns a toString() serialization of the statements's predicate.
    -
    -
    - toStringSubject -
    -
    - -
    Returns a toString() serialization of the statements's subject.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - unite -
    -
    -
    MemModel::unite() in MemModel.php
    -
    Returns a new MemModel that is the set-union of the MemModel with another model.
    -
    -
    - unite -
    -
    -
    DbModel::unite() in DbModel.php
    -
    Return a new MemModel that is the set-union the model with another model.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - visualize -
    -
    -
    Model::visualize() in Model.php
    -
    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHtml -
    -
    -
    MemModel::writeAsHtml() in MemModel.php
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    -
    - writeAsHtml -
    -
    -
    DbModel::writeAsHtml() in DbModel.php
    -
    Write the RDF serialization of the _DbModel as HTML.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeAsHtmlTable -
    -
    - -
    Write the RDF serialization of the DbModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Write the RDF serialization of the DbModel to string.
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - u - v - w - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_ontModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_ontModel.html deleted file mode 100755 index 20e130d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_ontModel.html +++ /dev/null @@ -1,1388 +0,0 @@ - - - - - - - - - - - - -

    [ontModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - u - v -
    - - -
    -
    a
    - -
    -
    -
    -
    - addComment -
    -
    -
    OntResource::addComment() in OntResource.php
    -
    Add the given comment to this resource.
    -
    -
    - addDomain -
    -
    -
    OntProperty::addDomain() in OntProperty.php
    -
    Add a resource representing the domain of this property.
    -
    -
    - addIsDefinedBy -
    -
    - -
    Add a resource that is declared to provide a definition of this resource.
    -
    -
    - addLabelProperty -
    -
    - -
    Add the given Label to this resource
    -
    -
    - addProperty -
    -
    -
    OntResource::addProperty() in OntResource.php
    -
    Add a property to this resource.
    -
    -
    - addRange -
    -
    -
    OntProperty::addRange() in OntProperty.php
    -
    Add a resource representing the range of this property.
    -
    -
    - addRDFType -
    -
    -
    OntResource::addRDFType() in OntResource.php
    -
    Add the given class as one of the rdf:type's for this resource.
    -
    -
    - addSeeAlso -
    -
    -
    OntResource::addSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource.
    -
    -
    - addSubClass -
    -
    -
    OntClass::addSubClass() in OntClass.php
    -
    Add a sub-class of this class.
    -
    -
    - addSubProperty -
    -
    - -
    Add a sub-property of this property.
    -
    -
    - addSuperClass -
    -
    - -
    Add a super-class of this class.
    -
    -
    - addSuperProperty -
    -
    - -
    Add a super-property of this property.
    -
    -
    - ALL_DIFFERENT -
    -
    -
    OWLVocabulary::ALL_DIFFERENT() in OWLVocabulary.php
    -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - asClass -
    -
    -
    OntResource::asClass() in OntResource.php
    -
    Answer a view of this resource as a class
    -
    -
    - asIndividual -
    -
    -
    OntResource::asIndividual() in OntResource.php
    -
    Answer a view of this resource as an Individual
    -
    -
    - asOntProperty -
    -
    -
    OntResource::asOntProperty() in OntResource.php
    -
    Answer a view of this resource as a property
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - CARDINALITY -
    -
    -
    OWLVocabulary::CARDINALITY() in OWLVocabulary.php
    -
    -
    - COMMENT -
    -
    -
    OWLVocabulary::COMMENT() in OWLVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMMENT -
    -
    -
    RdfsVocabulary::COMMENT() in RdfsVocabulary.php
    -
    Answer the predicate that denotes comment annotation on an ontology element.
    -
    -
    - COMPLEMENT_OF -
    -
    -
    OWLVocabulary::COMPLEMENT_OF() in OWLVocabulary.php
    -
    -
    - createIndividual -
    -
    - -
    Answer a resource that represents an Individual node in this model.
    -
    -
    - createInstance -
    -
    - -
    Answer a resource that represents an instance of this OntClass and Individual node in this model.
    -
    -
    - createOntClass -
    -
    - -
    Answer a resource that represents a class description node in this model.
    -
    -
    - createOntProperty -
    -
    - -
    Answer a resource that represents an OntProperty node in this model.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DATATYPE -
    -
    -
    OWLVocabulary::DATATYPE() in OWLVocabulary.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATA_RANGE -
    -
    -
    OWLVocabulary::DATA_RANGE() in OWLVocabulary.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    -
    OWLVocabulary::DIFFERENT_FROM() in OWLVocabulary.php
    -
    -
    - DISJOINT_WITH -
    -
    -
    OWLVocabulary::DISJOINT_WITH() in OWLVocabulary.php
    -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DOMAIN -
    -
    -
    RdfsVocabulary::DOMAIN() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - DOMAIN -
    -
    -
    OWLVocabulary::DOMAIN() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getComment -
    -
    -
    OntResource::getComment() in OntResource.php
    -
    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
    -
    -
    - getDomain -
    -
    -
    OntProperty::getDomain() in OntProperty.php
    -
    Answer a OntClass that represents the domain class of this property.
    -
    -
    - getInstanceRdfType -
    -
    - -
    returns the rdf:type, that this distinct resource is instance of.
    -
    -
    - getIsDefinedBy -
    -
    - -
    Answer a resource that is declared to provide a definition of this resource.
    -
    -
    - getLabelProperty -
    -
    - -
    Answer the label ResLiteral for this object.
    -
    -
    - getPropertyValue -
    -
    - -
    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.
    -
    -
    - getRange -
    -
    -
    OntProperty::getRange() in OntProperty.php
    -
    Answer a OntClass that represents the range class of this property.
    -
    -
    - getRDFType -
    -
    -
    OntResource::getRDFType() in OntResource.php
    -
    Answer the rdf:type (ie the class) of this resource.
    -
    -
    - getSeeAlso -
    -
    -
    OntResource::getSeeAlso() in OntResource.php
    -
    Answer a resource that provides additional information about this resource.
    -
    -
    - getSubClass -
    -
    -
    OntClass::getSubClass() in OntClass.php
    -
    Answer a class that is the sub-class of this class.
    -
    -
    - getSubProperty -
    -
    - -
    Answer a property that is the sub-property of this property.
    -
    -
    - getSuperClass -
    -
    - -
    Answer a class that is the super-class of this class.
    -
    -
    - getSuperProperty -
    -
    - -
    Answer a property that is the super-property of this property.
    -
    -
    - getVocabulary -
    -
    -
    OntResource::getVocabulary() in OntResource.php
    -
    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasComment -
    -
    -
    OntResource::hasComment() in OntResource.php
    -
    Answer true if this resource has the given comment.
    -
    -
    - hasDomain -
    -
    -
    OntProperty::hasDomain() in OntProperty.php
    -
    Answer true if the given resource a class specifying the domain of this property.
    -
    -
    - hasLabelProperty -
    -
    - -
    Answer true if this resource has the given label.
    -
    -
    - hasRange -
    -
    -
    OntProperty::hasRange() in OntProperty.php
    -
    Answer true if the given resource a class specifying the range of this property.
    -
    -
    - hasRDFType -
    -
    -
    OntResource::hasRDFType() in OntResource.php
    -
    Answer true if this resource has the given rdf:type.
    -
    -
    - hasSeeAlso -
    -
    -
    OntResource::hasSeeAlso() in OntResource.php
    -
    Answer true if this resource has the given resource as a source of additional information.
    -
    -
    - hasSubclass -
    -
    -
    OntClass::hasSubclass() in OntClass.php
    -
    Answer true if the given class is a sub-class of this class.
    -
    -
    - hasSubProperty -
    -
    - -
    Answer true if the given property is a sub-property of this property.
    -
    -
    - hasSuperClass -
    -
    - -
    Answer true if the given class is a super-class of this class.
    -
    -
    - hasSuperProperty -
    -
    - -
    Answer true if the given property is a super-property of this property.
    -
    -
    - HAS_VALUE -
    -
    -
    OWLVocabulary::HAS_VALUE() in OWLVocabulary.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - IMPORTS -
    -
    -
    OWLVocabulary::IMPORTS() in OWLVocabulary.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - Individual -
    -
    -
    Individual::Individual() in Individual.php
    -
    Constructor You can supply a uri
    -
    -
    - Individual -
    -
    -
    Individual in Individual.php
    -
    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWLVocabulary::INVERSE_OF() in OWLVocabulary.php
    -
    -
    - isDefinedBy -
    -
    -
    OntResource::isDefinedBy() in OntResource.php
    -
    Answer true if this resource is defined by the given resource.
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RdfsVocabulary::IS_DEFINED_BY() in RdfsVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - IS_DEFINED_BY -
    -
    -
    OWLVocabulary::IS_DEFINED_BY() in OWLVocabulary.php
    -
    Answer the predicate that denotes isDefinedBy annotation on an ontology element
    -
    -
    - Individual.php -
    -
    -
    Individual.php in Individual.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - LABEL -
    -
    -
    RdfsVocabulary::LABEL() in RdfsVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - LABEL -
    -
    -
    OWLVocabulary::LABEL() in OWLVocabulary.php
    -
    Answer the predicate that denotes label annotation on an ontology element
    -
    -
    - listClasses -
    -
    -
    OntModel::listClasses() in OntModel.php
    -
    Answer an array that ranges over all of the various forms of class description resource in this model.
    -
    -
    - listComments -
    -
    -
    OntResource::listComments() in OntResource.php
    -
    Answer an array of all of the comment literals for this resource.
    -
    -
    - listDomain -
    -
    -
    OntProperty::listDomain() in OntProperty.php
    -
    Answer an array of all of the declared domain classes of this property.
    -
    -
    - listInstances -
    -
    - -
    Answer an ResIterator over the individuals in the model that have this class among their types.
    -
    -
    - listIsDefinedBy -
    -
    - -
    Answer an array of all of the resources that are declared to define this resource.
    -
    -
    - listLabelProperties -
    -
    - -
    Answer an array of all of the label literals for this resource, with the given language, if $language is set.
    -
    -
    - listProperty -
    -
    -
    OntResource::listProperty() in OntResource.php
    -
    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.
    -
    -
    - listRange -
    -
    -
    OntProperty::listRange() in OntProperty.php
    -
    Answer an array of all of the declared range classes of this property.
    -
    -
    - listRDFTypes -
    -
    -
    OntResource::listRDFTypes() in OntResource.php
    -
    Answer an array of the RDF classes to which this resource belongs.
    -
    -
    - listSeeAlso -
    -
    -
    OntResource::listSeeAlso() in OntResource.php
    -
    Answer an array of all of the resources that are declared to provide addition information about this resource.
    -
    -
    - listSubClasses -
    -
    - -
    Answer an array over the classes that are declared to be sub-classes of this class.
    -
    -
    - listSubProperties -
    -
    - -
    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - listSuperClasses -
    -
    - -
    Answer an array over the classes that are declared to be super-classes of this class.
    -
    -
    - listSuperProperties -
    -
    - -
    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - NAMESPACE -
    -
    -
    OWLVocabulary::NAMESPACE() in OWLVocabulary.php
    -
    -
    - NAMESPACE -
    -
    -
    RdfsVocabulary::NAMESPACE() in RdfsVocabulary.php
    -
    Answer the string that is the namespace prefix for this vocabulary
    -
    -
    - NOTHING -
    -
    -
    OWLVocabulary::NOTHING() in OWLVocabulary.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWLVocabulary::OBJECT_CLASS() in OWLVocabulary.php
    -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWLVocabulary::ONE_OF() in OWLVocabulary.php
    -
    -
    - ONTCLASS -
    -
    -
    RdfsVocabulary::ONTCLASS() in RdfsVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass in OntClass.php
    -
    Class that represents an ontology node characterising a class description.
    -
    -
    - ONTCLASS -
    -
    -
    OWLVocabulary::ONTCLASS() in OWLVocabulary.php
    -
    Answer the resource that represents the class 'class' in this vocabulary.
    -
    -
    - OntClass -
    -
    -
    OntClass::OntClass() in OntClass.php
    -
    Constructor You can supply a uri
    -
    -
    - OntModel -
    -
    -
    OntModel::OntModel() in OntModel.php
    -
    Constructor.
    -
    -
    - OntModel -
    -
    -
    OntModel in OntModel.php
    -
    Enhanced view of the model that is known to contain ontology data, under a
    -
    -
    - OntClass.php -
    -
    -
    OntClass.php in OntClass.php
    -
    -
    - OntModel.php -
    -
    -
    OntModel.php in OntModel.php
    -
    -
    - OntModelP.php -
    -
    -
    OntModelP.php in OntModelP.php
    -
    -
    - OntProperty.php -
    -
    -
    OntProperty.php in OntProperty.php
    -
    -
    - OntResource.php -
    -
    -
    OntResource.php in OntResource.php
    -
    -
    - OntVocabulary.php -
    -
    -
    OntVocabulary.php in OntVocabulary.php
    -
    -
    - OWLVocabulary.php -
    -
    -
    OWLVocabulary.php in OWLVocabulary.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWLVocabulary::ONTOLOGY() in OWLVocabulary.php
    -
    -
    - OntProperty -
    -
    -
    OntProperty::OntProperty() in OntProperty.php
    -
    Constructor.
    -
    -
    - OntProperty -
    -
    -
    OntProperty in OntProperty.php
    -
    Class encapsulating a property in an ontology.
    -
    -
    - OntResource -
    -
    -
    OntResource::OntResource() in OntResource.php
    -
    Constructor You can supply a uri
    -
    -
    - OntResource -
    -
    -
    OntResource in OntResource.php
    -
    Provides a common super-type for all of the abstractions in this ontology representation package.
    -
    -
    - OntVocabulary -
    -
    -
    OntVocabulary in OntVocabulary.php
    -
    Base Class that encapsulates the elements of a general vocabulary
    -
    -
    - ON_PROPERTY -
    -
    -
    OWLVocabulary::ON_PROPERTY() in OWLVocabulary.php
    -
    -
    - OWLVocabulary -
    -
    -
    OWLVocabulary in OWLVocabulary.php
    -
    OWL vocabulary items
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - PRIOR_VERSION -
    -
    -
    OWLVocabulary::PRIOR_VERSION() in OWLVocabulary.php
    -
    -
    - PROPERTY -
    -
    -
    OWLVocabulary::PROPERTY() in OWLVocabulary.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RdfsVocabulary.php -
    -
    -
    RdfsVocabulary.php in RdfsVocabulary.php
    -
    -
    - RANGE -
    -
    -
    OWLVocabulary::RANGE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RANGE -
    -
    -
    RdfsVocabulary::RANGE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the domain of a property.
    -
    -
    - RdfsVocabulary -
    -
    -
    RdfsVocabulary in RdfsVocabulary.php
    -
    RDFS vocabulary items
    -
    -
    - removeComment -
    -
    -
    OntResource::removeComment() in OntResource.php
    -
    Remove the statement that the given ResLiteral is a comment on this resource.
    -
    -
    - removeDefinedBy -
    -
    - -
    Remove the statement that this resource is defined by the given resource.
    -
    -
    - removeDomain -
    -
    -
    OntProperty::removeDomain() in OntProperty.php
    -
    Remove the given class from the stated domain(s) of this property.
    -
    -
    - removeLabelProperty -
    -
    - -
    Remove the statement that the given ResLiteral is a label on this resource.
    -
    -
    - removeProperty -
    -
    - -
    Remove the specific property-value pair from this resource.
    -
    -
    - removeRange -
    -
    -
    OntProperty::removeRange() in OntProperty.php
    -
    Remove the given class from the stated range(es) of this property.
    -
    -
    - removeRDFType -
    -
    -
    OntResource::removeRDFType() in OntResource.php
    -
    Remove the statement that this resource is of the given RDF type.
    -
    -
    - removeSeeAlso -
    -
    -
    OntResource::removeSeeAlso() in OntResource.php
    -
    Remove the statement indicating the given resource as a source of additional information about this resource.
    -
    -
    - removeSubClass -
    -
    - -
    Remove the given class from the sub-classes of this class.
    -
    -
    - removeSubProperty -
    -
    - -
    Remove the given property from the sub-properties of this property.
    -
    -
    - removeSuperClass -
    -
    - -
    Remove the given class from the super-classes of this class.
    -
    -
    - removeSuperProperty -
    -
    - -
    Remove the given property from the super-properties of this property.
    -
    -
    - RESTRICTION -
    -
    -
    OWLVocabulary::RESTRICTION() in OWLVocabulary.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - SAME_AS -
    -
    -
    OWLVocabulary::SAME_AS() in OWLVocabulary.php
    -
    -
    - SAME_CLASS_AS -
    -
    -
    OWLVocabulary::SAME_CLASS_AS() in OWLVocabulary.php
    -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SEE_ALSO -
    -
    -
    OWLVocabulary::SEE_ALSO() in OWLVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - SEE_ALSO -
    -
    -
    RdfsVocabulary::SEE_ALSO() in RdfsVocabulary.php
    -
    Answer the predicate that denotes seeAlso annotation on an ontology element
    -
    -
    - setComment -
    -
    -
    OntResource::setComment() in OntResource.php
    -
    Assert that the given string is the comment on this resource.
    -
    -
    - setDomain -
    -
    -
    OntProperty::setDomain() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.
    -
    -
    - setInstanceRdfType -
    -
    - -
    Sets the rdf:type, that this distinct resource is instance of.
    -
    -
    - setIsDefinedBy -
    -
    - -
    Assert that the given resource provides a source of definitions about this resource.
    -
    -
    - setLabelProperty -
    -
    - -
    Assert that the given string is the label on this resource.
    -
    -
    - setPropertyValue -
    -
    - -
    Set the value of the given property of this ontology resource to the given value.
    -
    -
    - setRange -
    -
    -
    OntProperty::setRange() in OntProperty.php
    -
    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.
    -
    -
    - setRDFType -
    -
    -
    OntResource::setRDFType() in OntResource.php
    -
    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.
    -
    -
    - setSeeAlso -
    -
    -
    OntResource::setSeeAlso() in OntResource.php
    -
    Add a resource that is declared to provided additional information about the definition of this resource
    -
    -
    - setSubClass -
    -
    -
    OntClass::setSubClass() in OntClass.php
    -
    Assert that this class is super-class of the given class.
    -
    -
    - setSubProperty -
    -
    - -
    Assert that this property is super-property of the given property.
    -
    -
    - setSuperClass -
    -
    - -
    Assert that this class is sub-class of the given class.
    -
    -
    - setSuperProperty -
    -
    - -
    Assert that this property is sub-property of the given property.
    -
    -
    - setVocabulary -
    -
    -
    OntResource::setVocabulary() in OntResource.php
    -
    Sets the reference to the assoiated vocabulary
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SUB_CLASS_OF -
    -
    -
    RdfsVocabulary::SUB_CLASS_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_CLASS_OF -
    -
    -
    OWLVocabulary::SUB_CLASS_OF() in OWLVocabulary.php
    -
    Answer the predicate that denotes that one class is a sub-class of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    -
    RdfsVocabulary::SUB_PROPERTY_OF() in RdfsVocabulary.php
    -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    Answer the predicate that denotes that one property is a sub-property of another.
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - THING -
    -
    -
    OWLVocabulary::THING() in OWLVocabulary.php
    -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TYPE -
    -
    -
    RdfsVocabulary::TYPE() in RdfsVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - TYPE -
    -
    -
    OWLVocabulary::TYPE() in OWLVocabulary.php
    -
    Answer the predicate that denotes the rdf:type property.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - UNION_OF -
    -
    -
    OWLVocabulary::UNION_OF() in OWLVocabulary.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VERSION_INFO -
    -
    -
    OWLVocabulary::VERSION_INFO() in OWLVocabulary.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - u - v -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_rdql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_rdql.html deleted file mode 100755 index 32146ad0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_rdql.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - - - - - - -

    [rdql] element index

    -

    Package indexes

    - -All elements -
    -
    - c - g - h - m - n - p - q - r -
    - - -
    -
    c
    - -
    -
    -
    -
    - countResults -
    -
    -
    RdqlResultIterator::countResults() in RdqlResultIterator.php
    -
    Returns the number of results.
    -
    -
    - current -
    -
    -
    RdqlResultIterator::current() in RdqlResultIterator.php
    -
    Returns the current result.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getResultLabels -
    -
    -
    RdqlResultIterator::getResultLabels() in RdqlResultIterator.php
    -
    Returns the labels of the result as array.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasNext -
    -
    -
    RdqlResultIterator::hasNext() in RdqlResultIterator.php
    -
    Returns TRUE if there are more results.
    -
    -
    - hasPrevious -
    -
    -
    RdqlResultIterator::hasPrevious() in RdqlResultIterator.php
    -
    Returns TRUE if the first result has not been reached.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - moveFirst -
    -
    -
    RdqlResultIterator::moveFirst() in RdqlResultIterator.php
    -
    Moves the pointer to the first result.
    -
    -
    - moveLast -
    -
    -
    RdqlResultIterator::moveLast() in RdqlResultIterator.php
    -
    Moves the pointer to the last result.
    -
    -
    - moveTo -
    -
    -
    RdqlResultIterator::moveTo() in RdqlResultIterator.php
    -
    Moves the pointer to a specific result.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    RdqlResultIterator::next() in RdqlResultIterator.php
    -
    Returns the next result array.
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - parseQuery -
    -
    -
    RdqlParser::parseQuery() in RdqlParser.php
    -
    Parse the given RDQL query string and return an array with query variables and constraints.
    -
    -
    - previous -
    -
    -
    RdqlResultIterator::previous() in RdqlResultIterator.php
    -
    Returns the previous result.
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - queryModel -
    -
    -
    RdqlMemEngine::queryModel() in RdqlMemEngine.php
    -
    Perform an RDQL Query on the given MemModel.
    -
    -
    - queryModel -
    -
    -
    RdqlDbEngine::queryModel() in RdqlDbEngine.php
    -
    Perform an RDQL Query on the given DbModel.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RdqlDbEngine.php -
    -
    -
    RdqlDbEngine.php in RdqlDbEngine.php
    -
    -
    - RdqlEngine.php -
    -
    -
    RdqlEngine.php in RdqlEngine.php
    -
    -
    - RdqlMemEngine.php -
    -
    -
    RdqlMemEngine.php in RdqlMemEngine.php
    -
    -
    - RdqlParser.php -
    -
    -
    RdqlParser.php in RdqlParser.php
    -
    -
    - RdqlResultIterator.php -
    -
    -
    RdqlResultIterator.php in RdqlResultIterator.php
    -
    -
    - RdqlDbEngine -
    -
    -
    RdqlDbEngine in RdqlDbEngine.php
    -
    This class performs as RDQL query on a DbModel.
    -
    -
    - RdqlEngine -
    -
    -
    RdqlEngine in RdqlEngine.php
    -
    Some general methods common for RdqlMemEngine and RdqlDbEngine
    -
    -
    - RdqlMemEngine -
    -
    -
    RdqlMemEngine in RdqlMemEngine.php
    -
    This class performes as RDQL query on a MemModel.
    -
    -
    - RdqlParser -
    -
    -
    RdqlParser in RdqlParser.php
    -
    This class contains methods for parsing an Rdql query string into PHP variables.
    -
    -
    - RdqlResultIterator -
    -
    - -
    Constructor
    -
    -
    - RdqlResultIterator -
    -
    -
    RdqlResultIterator in RdqlResultIterator.php
    -
    Iterator for traversing Rdql results.
    -
    -
    - -
    - c - g - h - m - n - p - q - r -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_resModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_resModel.html deleted file mode 100755 index 3c60dbe6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_resModel.html +++ /dev/null @@ -1,1065 +0,0 @@ - - - - - - - - - - - - -

    [resModel] element index

    -

    Package indexes

    - -All elements -
    -
    - a - c - e - f - g - h - i - k - l - n - r - s - u - v - w -
    - - -
    -
    a
    - -
    -
    -
    -
    - add -
    -
    -
    ResModel::add() in ResModel.php
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    -
    - add -
    -
    -
    ResList::add() in ResList.php
    -
    Add the given value to the end of the list.
    -
    -
    - add -
    -
    -
    ResContainer::add() in ResContainer.php
    -
    Add a new value to a container.
    -
    -
    - addAtIndex -
    -
    -
    ResSeq::addAtIndex() in ResSeq.php
    -
    Insert a new member into the sequence at the specified position.
    -
    -
    - addModel -
    -
    -
    ResModel::addModel() in ResModel.php
    -
    Adds another model to this MemModel.
    -
    -
    - addNamespace -
    -
    -
    ResModel::addNamespace() in ResModel.php
    -
    Adds a namespace and prefix to the model.
    -
    -
    - addParsedNamespaces -
    -
    - -
    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!
    -
    -
    - addProperty -
    -
    -
    ResResource::addProperty() in ResResource.php
    -
    Add a property to this resource.
    -
    -
    - addWithoutDuplicates -
    -
    - -
    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
    -
    -
    - append -
    -
    -
    ResList::append() in ResList.php
    -
    Answer a new list that is formed by adding each element of
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - concatenate -
    -
    -
    ResList::concatenate() in ResList.php
    -
    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.
    -
    -
    - cons -
    -
    -
    ResList::cons() in ResList.php
    -
    Return a reference to a new list cell whose head is value and whose tail is this list.
    -
    -
    - contains -
    -
    -
    ResList::contains() in ResList.php
    -
    Answer true if the given node appears as the value of a value of any of the cells of this list.
    -
    -
    - contains -
    -
    -
    ResContainer::contains() in ResContainer.php
    -
    Determine whether the container contains a value
    -
    -
    - contains -
    -
    -
    ResModel::contains() in ResModel.php
    -
    Tests if the Model contains the given statement.
    -
    -
    - containsAll -
    -
    -
    ResModel::containsAll() in ResModel.php
    -
    Determine if all of the statements in a model are also contained in this model.
    -
    -
    - containsAny -
    -
    -
    ResModel::containsAny() in ResModel.php
    -
    Determine if any of the statements in a model are also contained in this model.
    -
    -
    - containsResource -
    -
    - -
    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
    -
    -
    - copy -
    -
    -
    ResList::copy() in ResList.php
    -
    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.
    -
    -
    - createAlt -
    -
    -
    ResModel::createAlt() in ResModel.php
    -
    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createBag -
    -
    -
    ResModel::createBag() in ResModel.php
    -
    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createList -
    -
    -
    ResModel::createList() in ResModel.php
    -
    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createLiteral -
    -
    - -
    Create an untyped literal from a String value with a specified language.
    -
    -
    - createProperty -
    -
    - -
    Create a new Property associated with this model.
    -
    -
    - createResource -
    -
    - -
    Create a new resource associated with this model.
    -
    -
    - createSeq -
    -
    -
    ResModel::createSeq() in ResModel.php
    -
    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.
    -
    -
    - createTypedLiteral -
    -
    - -
    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.
    -
    -
    - current -
    -
    -
    ResIterator::current() in ResIterator.php
    -
    Returns the current item
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - equals -
    -
    -
    ResResource::equals() in ResResource.php
    -
    Checks if the resource equals another resource.
    -
    -
    - equals -
    -
    -
    ResModel::equals() in ResModel.php
    -
    Checks if two models are equal.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - find -
    -
    -
    ResModel::find() in ResModel.php
    -
    General method to search for triples.
    -
    -
    - findFirstMatchingStatement -
    -
    - -
    Searches for triples and returns the first matching statement.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - get -
    -
    -
    ResList::get() in ResList.php
    -
    Returns the value of the list element at the specified position or null.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getAssociatedModel -
    -
    - -
    Get the reference to the assocoated model.
    -
    -
    - getBaseURI -
    -
    -
    ResModel::getBaseURI() in ResModel.php
    -
    Return current baseURI.
    -
    -
    - getContentInArray -
    -
    - -
    Get all values in the list as an array of ResResources
    -
    -
    - getDefault -
    -
    -
    ResAlt::getDefault() in ResAlt.php
    -
    Return the default value for this resource
    -
    -
    - getHead -
    -
    -
    ResList::getHead() in ResList.php
    -
    Get the value that is associated with the head of the list.
    -
    -
    - getIsAnon -
    -
    -
    ResResource::getIsAnon() in ResResource.php
    -
    Determine whether this resource is an anonymous resource
    -
    -
    - getMember -
    -
    -
    ResSeq::getMember() in ResSeq.php
    -
    Get the member at a given index
    -
    -
    - getMembers -
    -
    -
    ResContainer::getMembers() in ResContainer.php
    -
    Get an array of all resources that are values of this container
    -
    -
    - getModel -
    -
    -
    ResModel::getModel() in ResModel.php
    -
    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements
    -
    -
    - getParsedNamespaces -
    -
    - -
    Returns the models namespaces.
    -
    -
    - getProperty -
    -
    -
    ResModel::getProperty() in ResModel.php
    -
    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.
    -
    -
    - getProperty -
    -
    -
    ResResource::getProperty() in ResResource.php
    -
    Answer some statement (this, p, O) in the associated model.
    -
    -
    - getTail -
    -
    -
    ResList::getTail() in ResList.php
    -
    Get the list that is the tail of this list.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasProperty -
    -
    -
    ResResource::hasProperty() in ResResource.php
    -
    Determine whether this resource has any values for a given property.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - indexOf -
    -
    -
    ResList::indexOf() in ResList.php
    -
    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.
    -
    -
    - indexOf -
    -
    -
    ResSeq::indexOf() in ResSeq.php
    -
    Return the index of a given member of the sequence.
    -
    -
    - intersect -
    -
    -
    ResModel::intersect() in ResModel.php
    -
    Returns a new model containing all the statements which are in both this model and another.
    -
    -
    - isAlt -
    -
    -
    ResContainer::isAlt() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Alt
    -
    -
    - isBag -
    -
    -
    ResContainer::isBag() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Bag
    -
    -
    - isEmpty -
    -
    -
    ResModel::isEmpty() in ResModel.php
    -
    Checks if MemModel is empty
    -
    -
    - isEmpty -
    -
    -
    ResList::isEmpty() in ResList.php
    -
    Returns true, if this list is empty
    -
    -
    - isSeq -
    -
    -
    ResContainer::isSeq() in ResContainer.php
    -
    Returns true, if this resource is a container from type rdf:Seq
    -
    -
    - isValid -
    -
    -
    ResList::isValid() in ResList.php
    -
    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    ResIterator::key() in ResIterator.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - listObjects -
    -
    -
    ResModel::listObjects() in ResModel.php
    -
    Returns a ResIterator with all objects in a model.
    -
    -
    - listObjectsOfProperty -
    -
    - -
    Returns a ResIterator with all objects with a given property and property value.
    -
    -
    - listProperties -
    -
    - -
    List all the values with the property p as statements in an array.
    -
    -
    - listSubjects -
    -
    -
    ResModel::listSubjects() in ResModel.php
    -
    Returns a ResIterator with all subjects in a model.
    -
    -
    - listSubjectsWithProperty -
    -
    - -
    Returns a ResIterator with all subjects with a given property and property value.
    -
    -
    - load -
    -
    -
    ResModel::load() in ResModel.php
    -
    Load a model from a file containing RDF, N3 or N-Triples.
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    ResIterator::next() in ResIterator.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - rdqlQuery -
    -
    -
    ResModel::rdqlQuery() in ResModel.php
    -
    Perform an RDQL query on this MemModel.
    -
    -
    - rdqlQueryAsIterator -
    -
    - -
    Perform an RDQL query on this MemModel.
    -
    -
    - remove -
    -
    -
    ResList::remove() in ResList.php
    -
    Remove the given value from this list.
    -
    -
    - remove -
    -
    -
    ResModel::remove() in ResModel.php
    -
    Removes the statement of ResResources(ResTriples) from the MemModel.
    -
    -
    - remove -
    -
    -
    ResContainer::remove() in ResContainer.php
    -
    Remove a value from the container.
    -
    -
    - removeAll -
    -
    -
    ResResource::removeAll() in ResResource.php
    -
    Delete all the statements with predicate p for this resource from its associated model.
    -
    -
    - removeAtIndex -
    -
    - -
    Remove the member at the specified index.
    -
    -
    - removeHead -
    -
    -
    ResList::removeHead() in ResList.php
    -
    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.
    -
    -
    - removeList -
    -
    -
    ResList::removeList() in ResList.php
    -
    Remove all of the components of this list from the model.
    -
    -
    - removeNamespace -
    -
    - -
    removes a single namespace from the model
    -
    -
    - removeProperties -
    -
    - -
    Delete all the properties for this resource from the associated model.
    -
    -
    - replace -
    -
    -
    ResList::replace() in ResList.php
    -
    Replace the value at the i'th position in the list with the given value
    -
    -
    - ResAlt -
    -
    -
    ResAlt::ResAlt() in ResAlt.php
    -
    Constructor You can supply a URI
    -
    -
    - ResAlt -
    -
    -
    ResAlt in ResAlt.php
    -
    This interface defines methods for accessing RDF Alternative resources.
    -
    -
    - ResBag -
    -
    -
    ResBag in ResBag.php
    -
    This interface defines methods for accessing RDF Bag resources.
    -
    -
    - ResBag -
    -
    -
    ResBag::ResBag() in ResBag.php
    -
    Constructor You can supply a URI
    -
    -
    - ResContainer -
    -
    -
    ResContainer in ResContainer.php
    -
    An RDF Container.
    -
    -
    - ResContainer -
    -
    -
    ResContainer::ResContainer() in ResContainer.php
    -
    Constructor You can supply a URI
    -
    -
    - ResIterator -
    -
    -
    ResIterator::ResIterator() in ResIterator.php
    -
    Constructor.
    -
    -
    - ResIterator -
    -
    -
    ResIterator in ResIterator.php
    -
    Implementation of a resource iterator.
    -
    -
    - ResList -
    -
    -
    ResList in ResList.php
    -
    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.
    -
    -
    - ResList -
    -
    -
    ResList::ResList() in ResList.php
    -
    Constructor You can supply a URI
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral::ResLiteral() in ResLiteral.php
    -
    Constructor You have to supply a string.
    -
    -
    - ResLiteral -
    -
    -
    ResLiteral in ResLiteral.php
    -
    An RDF literal.
    -
    -
    - ResModel -
    -
    -
    ResModel::ResModel() in ResModel.php
    -
    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.
    -
    -
    - ResModel -
    -
    -
    ResModel in ResModel.php
    -
    A ResModel provides an resource centric view on an underlying RDF model.
    -
    -
    - ResAlt.php -
    -
    -
    ResAlt.php in ResAlt.php
    -
    -
    - ResBag.php -
    -
    -
    ResBag.php in ResBag.php
    -
    -
    - ResContainer.php -
    -
    -
    ResContainer.php in ResContainer.php
    -
    -
    - ResIterator.php -
    -
    -
    ResIterator.php in ResIterator.php
    -
    -
    - ResList.php -
    -
    -
    ResList.php in ResList.php
    -
    -
    - ResLiteral.php -
    -
    -
    ResLiteral.php in ResLiteral.php
    -
    -
    - ResModel.php -
    -
    -
    ResModel.php in ResModel.php
    -
    -
    - ResProperty.php -
    -
    -
    ResProperty.php in ResProperty.php
    -
    -
    - ResResource.php -
    -
    -
    ResResource.php in ResResource.php
    -
    -
    - ResSeq.php -
    -
    -
    ResSeq.php in ResSeq.php
    -
    -
    - ResProperty -
    -
    -
    ResProperty in ResProperty.php
    -
    An RDF Property.
    -
    -
    - ResProperty -
    -
    -
    ResProperty::ResProperty() in ResProperty.php
    -
    Constructor You can supply a URI
    -
    -
    - ResResource -
    -
    -
    ResResource::ResResource() in ResResource.php
    -
    Constructor You can supply a uri
    -
    -
    - ResResource -
    -
    -
    ResResource in ResResource.php
    -
    An RDF Resource.
    -
    -
    - ResSeq -
    -
    -
    ResSeq::ResSeq() in ResSeq.php
    -
    Constructor You can supply a URI
    -
    -
    - ResSeq -
    -
    -
    ResSeq in ResSeq.php
    -
    This interface defines methods for accessing RDF Sequence resources.
    -
    -
    - rewind -
    -
    -
    ResIterator::rewind() in ResIterator.php
    -
    Resets iterator list to start
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - sameListAs -
    -
    -
    ResList::sameListAs() in ResList.php
    -
    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.
    -
    -
    - saveAs -
    -
    -
    ResModel::saveAs() in ResModel.php
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    -
    - set -
    -
    -
    ResSeq::set() in ResSeq.php
    -
    Set the value at a given index in the sequence.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setAssociatedModel -
    -
    - -
    Sets the reference to the assocoated model.
    -
    -
    - setBaseURI -
    -
    -
    ResModel::setBaseURI() in ResModel.php
    -
    Set a base URI for the MemModel.
    -
    -
    - setDefault -
    -
    -
    ResAlt::setDefault() in ResAlt.php
    -
    Set the default value of this container.
    -
    -
    - setFindLiteralWithLang -
    -
    - -
    Sets that only Literals with the matching language should be returned
    -
    -
    - setHead -
    -
    -
    ResList::setHead() in ResList.php
    -
    Update the head of the list to have the given value, and return the previous value.
    -
    -
    - setIsAnon -
    -
    -
    ResResource::setIsAnon() in ResResource.php
    -
    Set whether this resource is an anonymous resource
    -
    -
    - setTail -
    -
    -
    ResList::setTail() in ResList.php
    -
    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.
    -
    -
    - setURI -
    -
    -
    ResResource::setURI() in ResResource.php
    -
    Sets the URI of this resource
    -
    -
    - size -
    -
    -
    ResModel::size() in ResModel.php
    -
    Number of statements in the MemModel
    -
    -
    - size -
    -
    -
    ResContainer::size() in ResContainer.php
    -
    Returns the number values in the container.
    -
    -
    - subtract -
    -
    -
    ResModel::subtract() in ResModel.php
    -
    Returns a new model that is the subtraction of another model from this model.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - unite -
    -
    -
    ResModel::unite() in ResModel.php
    -
    Returns a new Model that is the set-union of the model with another model.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    ResIterator::valid() in ResIterator.php
    -
    Says if there are additional items left in the list
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeAsHTMLTable -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - writeRdfToString -
    -
    - -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    -
    - -
    - a - c - e - f - g - h - i - k - l - n - r - s - u - v - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql-db.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql-db.html deleted file mode 100755 index df54c616..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql-db.html +++ /dev/null @@ -1,1412 +0,0 @@ - - - - - - - - - - - - -

    [sparql-db] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __toString -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getHead -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getIsCol -
    -
    - -
    -
    - getLangCol -
    -
    - -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSelect -
    -
    - -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isNumber -
    -
    - -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - mkVal -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    - -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - switchOperator -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $type -
    -
    - -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - l - m - n - o - p - q - r - s - t - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql.html deleted file mode 100755 index 2670a517..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_sparql.html +++ /dev/null @@ -1,3237 +0,0 @@ - - - - - - - - - - - - -

    [sparql] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - j - l - m - n - o - p - q - r - s - t - u - v - w - x - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _buildIntBindings -
    -
    - -
    Marks triples with internal bindings.
    -
    -
    - _buildResultSet -
    -
    - -
    Builds the resultset.
    -
    -
    - _buildurl -
    -
    -
    SparqlClient::_buildurl() in SparqlClient.php
    -
    Helper function that builds the url.
    -
    -
    - _checkGraphs -
    -
    -
    SparqlEngine::_checkGraphs() in SparqlEngine.php
    -
    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.
    -
    -
    - _determineType -
    -
    - -
    Tries to determine the rdf:type of the variable.
    -
    -
    - _fastForward -
    -
    -
    SparqlParser::_fastForward() in SparqlParser.php
    -
    FastForward until next token which is not blank.
    -
    -
    - _getAttributes -
    -
    - -
    Search the attributes listed in $list in the dataset.
    -
    -
    - _getBindingString -
    -
    - -
    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.
    -
    -
    - _http_get -
    -
    -
    SparqlClient::_http_get() in SparqlClient.php
    -
    Executes the GET Request.
    -
    -
    - _rewind -
    -
    -
    SparqlParser::_rewind() in SparqlParser.php
    -
    Rewind until next token which is not blank.
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    -
    SparqlParserException::__construct() in SparqlParserException.php
    -
    -
    - __construct -
    -
    -
    SparqlEngineDb::__construct() in SparqlEngineDb.php
    -
    Use SparqlEngine::factory() to create the instance
    -
    -
    - __construct -
    -
    -
    SparqlEngine::__construct() in SparqlEngine.php
    -
    Use SparqlEngine::factory() instead of this constructor.
    -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __construct -
    -
    - -
    -
    - __toString -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $arCastTypes -
    -
    - -
    SQL types to cast XSD schema types to, so that they will get sorted correctly.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arCreationMethods -
    -
    - -
    Defines the methods needed to create the types in $arVarAssignments.
    -
    -
    - $arDumbOperators -
    -
    - -
    -
    - $arFuncParamNumbers -
    -
    - -
    Number of parameters for the functions supported.
    -
    -
    - $arOperatorSwitches -
    -
    - -
    List of operators and their counterpart if operands are switched.
    -
    -
    - $arPlaceholders -
    -
    - -
    Array with placeholders of prepared statements variables.
    -
    -
    - $arPrepared -
    -
    -
    SparqlEngineDb::$arPrepared in SparqlEngineDb.php
    -
    Prepared SQL statements are stored in here.
    -
    -
    - $arrOutput -
    -
    -
    SparqlResultParser::$arrOutput in SparqlResultParser.php
    -
    -
    - $arTableColumnNames -
    -
    - -
    Column names for subjects, predicates and objects for easy access via their character names (spo).
    -
    -
    - $arTypeNumbers -
    -
    - -
    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.
    -
    -
    - $arUnionVarAssignments -
    -
    - -
    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.
    -
    -
    - $arUsedVarAssignments -
    -
    - -
    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.
    -
    -
    - $arUsedVarTypes -
    -
    - -
    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)
    -
    -
    - $arVarAssignments -
    -
    - -
    Determines which variables can be found in which SQL result column.
    -
    -
    - addConstraint -
    -
    -
    GraphPattern::addConstraint() in GraphPattern.php
    -
    Adds a Constraint to the GraphPattern.
    -
    -
    - addConstructGraphPattern -
    -
    - -
    Adds a construct graph pattern to the query.
    -
    -
    - addDefaultGraph -
    -
    - -
    Adds a default graph to the query object.
    -
    -
    - addExpression -
    -
    -
    Constraint::addExpression() in Constraint.php
    -
    Adds an expression string.
    -
    -
    - addFrom -
    -
    -
    Query::addFrom() in Query.php
    -
    Adds a graphuri to the from part.
    -
    -
    - addFromNamed -
    -
    - -
    Adds a graphuri to the from named part.
    -
    -
    - addGraphPattern -
    -
    - -
    Adds a graph pattern to the result part.
    -
    -
    - addNamedGraph -
    -
    -
    ClientQuery::addNamedGraph() in ClientQuery.php
    -
    Adds a named graph to the query object.
    -
    -
    - addOptional -
    -
    -
    GraphPattern::addOptional() in GraphPattern.php
    -
    Adds a pointer to an optional graphPattern.
    -
    -
    - addPrefix -
    -
    -
    Query::addPrefix() in Query.php
    -
    Adds a prefix to the list of prefixes.
    -
    -
    - addTriplePattern -
    -
    - -
    Adds a List of QueryTriples to the GraphPattern.
    -
    -
    - addUnion -
    -
    -
    GraphPattern::addUnion() in GraphPattern.php
    -
    Adds a pointer to a union graphPattern.
    -
    -
    - addVar -
    -
    -
    Query::addVar() in Query.php
    -
    Adds a new variable to the variable list.
    -
    -
    - addVariable -
    -
    - -
    Adds a variable to the list of result variables.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $base -
    -
    -
    Query::$base in Query.php
    -
    The BASE part of the SPARQL query.
    -
    -
    - $bncounter -
    -
    -
    SparqlResultParser::$bncounter in SparqlResultParser.php
    -
    -
    - $bnodeCounter -
    -
    - -
    Blanknode counter.
    -
    -
    - $bOptional -
    -
    - -
    If the filter is in an optional statement
    -
    -
    - $bRealPrepared -
    -
    -
    SparqlEngineDb::$bRealPrepared in SparqlEngineDb.php
    -
    If the prepared statement is really prepared, or if we just emulate it.
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - $bWrap -
    -
    - -
    If the result HTML should be wrapped in a div
    -
    -
    - balanceTree -
    -
    -
    SparqlParser::balanceTree() in SparqlParser.php
    -
    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.
    -
    -
    - bNodeCheck -
    -
    -
    SparqlParser::bNodeCheck() in SparqlParser.php
    -
    Checks if $token is a Blanknode.
    -
    -
    - buildVarmap -
    -
    -
    SparqlEngine::buildVarmap() in SparqlEngine.php
    -
    Sorts the result table.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - $constraint -
    -
    -
    GraphPattern::$constraint in GraphPattern.php
    -
    -
    - $constructPattern -
    -
    - -
    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.
    -
    -
    - $counter -
    -
    -
    SparqlResultParser::$counter in SparqlResultParser.php
    -
    -
    - $current_literal -
    -
    -
    SparqlResultParser::$current_literal in SparqlResultParser.php
    -
    -
    - checkDtypeLang -
    -
    -
    SparqlParser::checkDtypeLang() in SparqlParser.php
    -
    Checks if there is a datatype given and appends it to the node.
    -
    -
    - checkIntBindings -
    -
    - -
    Checks it there are internal bindings between variables.
    -
    -
    - ClientQuery -
    -
    -
    ClientQuery in ClientQuery.php
    -
    ClientQuery Object to run a SPARQL Query against a SPARQL server.
    -
    -
    - compareTypeSet -
    -
    - -
    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()
    -
    -
    - compareXsdType -
    -
    - -
    Compares two XSD data types and returns the comparison number.
    -
    -
    - Constraint -
    -
    -
    Constraint in Constraint.php
    -
    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - constructGraph -
    -
    - -
    Constructs a result graph.
    -
    -
    - convertFromDbResults -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromDbResults -
    -
    - -
    Converts the database results into nice HTML.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Determines the correct renderer and calls it.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the desired output format and returns the result.
    -
    -
    - convertFromResult -
    -
    - -
    Converts the database results into the output format and returns the result.
    -
    -
    - createBooleanValue -
    -
    - -
    -
    - createEqualSelects -
    -
    - -
    Creates SELECT statements that have the same number of columns.
    -
    -
    - createEquation -
    -
    - -
    -
    - createFilterSql -
    -
    - -
    Creates the SQL representing a Sparql FILTER.
    -
    -
    - createFromRecords -
    -
    - -
    -
    - createFunction -
    -
    - -
    -
    - createFunction_bound -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_datatype -
    -
    - -
    -
    - createFunction_isblank -
    -
    - -
    Creates an sql statement that returns if the element is a blank node
    -
    -
    - createFunction_isiri -
    -
    - -
    -
    - createFunction_isliteral -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_isuri -
    -
    - -
    -
    - createFunction_lang -
    -
    - -
    Creates an sql statement that returns the language of the object
    -
    -
    - createFunction_langmatches -
    -
    - -
    Creates an sql statement that checks if the variable
    -
    -
    - createFunction_regex -
    -
    - -
    Creates an sql statement that checks if the given part matches
    -
    -
    - createFunction_sameterm -
    -
    - -
    Creates an sql statement that checks if both terms are the same
    -
    -
    - createFunction_str -
    -
    - -
    Creates an sql statement that returns the string representation
    -
    -
    - createFunction_xsd_datetime -
    -
    - -
    Creates an sql statement that returns the datetime representation
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createObjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createPredicateFromDbRecordSetPart -
    -
    - -
    Creates an RDF predicate object contained in the given $dbRecordSet object.
    -
    -
    - createSingleTypeCheck -
    -
    - -
    Creates sql to ensure the type between $val and variable $tree is the same.
    -
    -
    - createSql -
    -
    - -
    Creates an SQL query string from the given Sparql query object.
    -
    -
    - createStatementFromDbRecordSetPart -
    -
    - -
    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createSubjectFromDbRecordSetPart -
    -
    - -
    Creates an RDF subject object contained in the given $dbRecordSet object.
    -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTableFromRecords -
    -
    - -
    -
    - createTreeSql -
    -
    - -
    -
    - createTypeEquation -
    -
    - -
    Generates sql code to make sure the datatypes of the two operands match
    -
    -
    - createValue -
    -
    - -
    Creates an RDF object object contained in the given $dbRecordSet object.
    -
    -
    - createValue -
    -
    - -
    Creates the sql for an element of type "value".
    -
    -
    - createVariableArray -
    -
    - -
    Creates an array full of variables to be passed to the Execute() method of the database connection object.
    -
    -
    - ClientQuery.php -
    -
    -
    ClientQuery.php in ClientQuery.php
    -
    -
    - Constraint.php -
    -
    -
    Constraint.php in Constraint.php
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $dataset -
    -
    -
    SparqlEngineDb::$dataset in SparqlEngineDb.php
    -
    RDF dataset object.
    -
    -
    - $dataset -
    -
    -
    SparqlEngine::$dataset in SparqlEngine.php
    -
    The RDF Dataset.
    -
    -
    - $dbConn -
    -
    -
    SparqlEngineDb::$dbConn in SparqlEngineDb.php
    -
    Database connection object.
    -
    -
    - $default -
    -
    -
    ClientQuery::$default in ClientQuery.php
    -
    -
    - $dtype -
    -
    -
    SparqlResultParser::$dtype in SparqlResultParser.php
    -
    -
    - dateTime -
    -
    -
    dateTime() in FilterFunctions.php
    -
    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.
    -
    -
    - describeGraph -
    -
    - -
    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php
    -
    -
    - determineOffset -
    -
    - -
    Determines the offset in the sqls, the position to start form.
    -
    -
    - distinct -
    -
    -
    SparqlEngine::distinct() in SparqlEngine.php
    -
    Eliminates duplicate results.
    -
    -
    - dtypeCheck -
    -
    -
    SparqlParser::dtypeCheck() in SparqlParser.php
    -
    Checks if the Node is a typed Literal.
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - Default.php -
    -
    -
    Default.php in Default.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - $expression -
    -
    -
    Constraint::$expression in Constraint.php
    -
    The expression string.
    -
    -
    - error -
    -
    -
    SparqlParser::error() in SparqlParser.php
    -
    Error reporting.
    -
    -
    - execute -
    -
    -
    SparqlEngineDb::execute() in SparqlEngineDb.php
    -
    Execute a prepared statement by filling it with variables
    -
    -
    - execute -
    -
    - -
    -
    - execute -
    -
    - -
    Executes the given prepared statments, filling the placeholders with the given values.
    -
    -
    - execute -
    -
    - -
    Execute the prepared statement and returns the result.
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - $fromNamedPart -
    -
    - -
    Contains the FROM NAMED part of the SPARQL query.
    -
    -
    - $fromPart -
    -
    -
    Query::$fromPart in Query.php
    -
    Contains the FROM part of the SPARQL query.
    -
    -
    - factory -
    -
    -
    SparqlEngine::factory() in SparqlEngine.php
    -
    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.
    -
    -
    - fillConstraintString -
    -
    - -
    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function
    -
    -
    - filterPatterns -
    -
    -
    SparqlEngine::filterPatterns() in SparqlEngine.php
    -
    Filters the pattern results.
    -
    -
    - findTuplesMatchingOnePattern -
    -
    - -
    Finds Tuples matching one TriplePattern.
    -
    -
    - fixNegationInFuncName -
    -
    - -
    -
    - fixWhere -
    -
    - -
    Removes a leading AND from the where clause which would render the sql illegal.
    -
    -
    - FilterFunctions.php -
    -
    -
    FilterFunctions.php in FilterFunctions.php
    -
    -
    - FilterGenerator.php -
    -
    -
    FilterGenerator.php in FilterGenerator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - $graphname -
    -
    -
    GraphPattern::$graphname in GraphPattern.php
    -
    Graphname. 0 if its in the default graph.
    -
    -
    - $graphPatternCounter -
    -
    - -
    GraphPattern counter.
    -
    -
    - getAllVars -
    -
    -
    Query::getAllVars() in Query.php
    -
    Returns a list with all used variables.
    -
    -
    - getBase -
    -
    -
    Query::getBase() in Query.php
    -
    Returns the BASE part of the query.
    -
    -
    - getBlanknodeLabel -
    -
    - -
    Returns an unused Bnode label.
    -
    -
    - getCastMethod -
    -
    - -
    Returns the SQL statement needed to case the given variable to the given type.
    -
    -
    - getCol -
    -
    - -
    -
    - getConstraint -
    -
    -
    GraphPattern::getConstraint() in GraphPattern.php
    -
    Returns a constraint if there is one false if not.
    -
    -
    - getConstructPattern -
    -
    - -
    Returns the construvtGraphPattern of the query if there is one.
    -
    -
    - getConstructPatternVariables -
    -
    - -
    Returns a list of variables used in the construct patterns.
    -
    -
    - getCount -
    -
    - -
    -
    - getCount -
    -
    - -
    Returns the number of rows that the given query will return.
    -
    -
    - getDataset -
    -
    -
    SparqlEngine::getDataset() in SparqlEngine.php
    -
    -
    - getDatatype -
    -
    - -
    Returns the datatype of a variable if it is set.
    -
    -
    - getDatatypeCol -
    -
    - -
    -
    - getDateConversionSql -
    -
    - -
    -
    - getExpression -
    -
    -
    Constraint::getExpression() in Constraint.php
    -
    Returns the expression string.
    -
    -
    - getFromNamedPart -
    -
    - -
    Returns the FROM NAMED clause of the query.
    -
    -
    - getFromPart -
    -
    - -
    Returns the FROM clause of the query.
    -
    -
    - getFullUri -
    -
    -
    Query::getFullUri() in Query.php
    -
    Gets the full URI of a qname token.
    -
    -
    - getGraphname -
    -
    -
    GraphPattern::getGraphname() in GraphPattern.php
    -
    Returns the graphname.
    -
    -
    - getHead -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlBlank -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlLiteral -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlNull -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getHtmlResource -
    -
    - -
    -
    - getId -
    -
    -
    GraphPattern::getId() in GraphPattern.php
    -
    Returns the GraphPatterns id.
    -
    -
    - getIsCol -
    -
    - -
    -
    - getLangCol -
    -
    - -
    -
    - getLanguageTag -
    -
    - -
    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.
    -
    -
    - getLimitSql -
    -
    - -
    Creates a sql LIMIT statement if the sparql query needs one.
    -
    -
    - getNewPattern -
    -
    - -
    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.
    -
    -
    - getObject -
    -
    -
    QueryTriple::getObject() in QueryTriple.php
    -
    Returns the Triples Object.
    -
    -
    - getOptional -
    -
    -
    GraphPattern::getOptional() in GraphPattern.php
    -
    Returns a pointer to an optional graph pattern.
    -
    -
    - getOrderifiedSqls -
    -
    - -
    Returns an array of sql statements that need to be executed and deliver the full result set when combined.
    -
    -
    - getPlaceholders -
    -
    - -
    -
    - getPointer -
    -
    -
    SparqlParserException::getPointer() in SparqlParserException.php
    -
    Returns a pointer to the token which caused the exception.
    -
    -
    - getPredicate -
    -
    -
    QueryTriple::getPredicate() in QueryTriple.php
    -
    Returns the Triples Predicate.
    -
    -
    - getPrefixes -
    -
    - -
    Returns the prefix map of the query.
    -
    -
    - getPreparedVariablePlaceholder -
    -
    - -
    Returns a placeholder to be included in the sql statement.
    -
    -
    - getQuery -
    -
    -
    SparqlEngineDb::getQuery() in SparqlEngineDb.php
    -
    -
    - getQuery -
    -
    -
    SparqlEngine::getQuery() in SparqlEngine.php
    -
    -
    - getResultForm -
    -
    - -
    Returns the type the result shall have.
    -
    -
    - getResultPart -
    -
    - -
    Returns a list containing the graph patterns of the query.
    -
    -
    - getResultVars -
    -
    - -
    Returns a list containing the result vars.
    -
    -
    - getResultXml -
    -
    - -
    -
    - getSelect -
    -
    - -
    -
    - getSolutionModifier -
    -
    - -
    Gets the solution modifiers of the query.
    -
    -
    - getSpecialOrderVariables -
    -
    - -
    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)
    -
    -
    - getSpokenBoolean -
    -
    - -
    -
    - getSqlCondition -
    -
    - -
    Creates an SQL statement that checks for the value of some subject/predicate/object
    -
    -
    - getSqlEqualityCondition -
    -
    - -
    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.
    -
    -
    - getSqlGenerator -
    -
    -
    SparqlEngineDb::getSqlGenerator() in SparqlEngineDb.php
    -
    -
    - getSqlOrderBy -
    -
    - -
    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.
    -
    -
    - getSqlVariableName -
    -
    - -
    -
    - getSqlVariableNameDatatype -
    -
    - -
    -
    - getSqlVariableNameIs -
    -
    - -
    -
    - getSqlVariableNameLanguage -
    -
    - -
    -
    - getSqlVariableNameValue -
    -
    - -
    -
    - getStringNullComparison -
    -
    - -
    Returns the correct sql string comparison method.
    -
    -
    - getSubject -
    -
    -
    QueryTriple::getSubject() in QueryTriple.php
    -
    Returns the Triples Subject.
    -
    -
    - getTree -
    -
    -
    Constraint::getTree() in Constraint.php
    -
    -
    - getTriplePattern -
    -
    - -
    Returns the triple pattern of the graph pattern.
    -
    -
    - getTripleSql -
    -
    - -
    Creates some SQL statements from the given triple pattern array.
    -
    -
    - getTypeSets -
    -
    - -
    Determines the type sets in the query results.
    -
    -
    - getTypesetWhereClause -
    -
    - -
    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.
    -
    -
    - getTypeSorter -
    -
    -
    SparqlEngineDb::getTypeSorter() in SparqlEngineDb.php
    -
    -
    - getUnion -
    -
    -
    GraphPattern::getUnion() in GraphPattern.php
    -
    Returns a pointer to a union graph pattern.
    -
    -
    - getUsedVarAssignments -
    -
    - -
    -
    - getUsedVarTypes -
    -
    - -
    -
    - getValueCol -
    -
    - -
    -
    - getVarAssignments -
    -
    - -
    -
    - getVariableArrayFromRecordSet -
    -
    - -
    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.
    -
    -
    - getVariableArrayFromRecordSets -
    -
    - -
    -
    - getVariables -
    -
    -
    QueryTriple::getVariables() in QueryTriple.php
    -
    Returns an array of all variables in this triple.
    -
    -
    - getVariables -
    -
    -
    GraphPattern::getVariables() in GraphPattern.php
    -
    Returns an array of all variables used in this graph pattern.
    -
    -
    - getXmlBlank -
    -
    - -
    -
    - getXmlLiteral -
    -
    - -
    -
    - getXmlNull -
    -
    - -
    -
    - getXmlResource -
    -
    - -
    -
    - getXsdTypeNumber -
    -
    - -
    Returns the type number for an xsd data type.
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern in GraphPattern.php
    -
    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.
    -
    -
    - GraphPattern -
    -
    -
    GraphPattern::GraphPattern() in GraphPattern.php
    -
    Constructor
    -
    -
    - GraphPattern.php -
    -
    -
    GraphPattern.php in GraphPattern.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - HTML.php -
    -
    -
    HTML.php in HTML.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - $isConstructPattern -
    -
    - -
    -
    - $isEmpty -
    -
    -
    Query::$isEmpty in Query.php
    -
    TRUE if the query is empty FALSE if not.
    -
    -
    - iriCheck -
    -
    -
    SparqlParser::iriCheck() in SparqlParser.php
    -
    Checks if $token is an IRI.
    -
    -
    - isEmpty -
    -
    -
    Query::isEmpty() in Query.php
    -
    Returns $isEmpty variable
    -
    -
    - isEmptyPattern -
    -
    - -
    Checks if the graph pattern is empty (contains no usable data).
    -
    -
    - isNumber -
    -
    - -
    -
    - isObject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object in the database.
    -
    -
    - isObjectOrSubject -
    -
    - -
    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.
    -
    -
    - isOuterFilter -
    -
    -
    Constraint::isOuterFilter() in Constraint.php
    -
    Returns true if this constraint is an outer filter- false if not.
    -
    -
    - isPlainString -
    -
    - -
    Checks if the given tree element is a plain string (no variable)
    -
    -
    - isPreparedVariable -
    -
    - -
    Checks if the given variable is a replacement for a prepared statement.
    -
    -
    - isResultVar -
    -
    - -
    Checks if the given variable name is part of the result variables list.
    -
    -
    - isSpecialOrderVariable -
    -
    - -
    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.
    -
    -
    - isValueButNotVariableNorString -
    -
    - -
    -
    - isVariable -
    -
    - -
    Checks if the given tree element is a variable
    -
    -
    - isVariable -
    -
    - -
    Checks if the given subject/predicate/object is a variable name.
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - joinOptionalTuples -
    -
    - -
    Joins OPTIONAL pattern results.
    -
    -
    - joinResults -
    -
    -
    SparqlEngine::joinResults() in SparqlEngine.php
    -
    Joins the results of the different Graphpatterns.
    -
    -
    - joinTuples -
    -
    -
    SparqlEngine::joinTuples() in SparqlEngine.php
    -
    Perform an SQL-like inner join on two resultSets.
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - $lang -
    -
    -
    SparqlResultParser::$lang in SparqlResultParser.php
    -
    -
    - lang -
    -
    -
    lang() in FilterFunctions.php
    -
    Evaluates the lang() function. Returns lang tag of a Literal.
    -
    -
    - langMatches -
    -
    -
    langMatches() in FilterFunctions.php
    -
    Evaluates the langMatches() function. Return true if the lang tag matches false if not.
    -
    -
    - literalCheck -
    -
    -
    SparqlParser::literalCheck() in SparqlParser.php
    -
    Checks if $token is a Literal.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - loadClass -
    -
    - -
    Tries to load a given class if it doesn't exist, and returns true if the class can be used.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $mode -
    -
    -
    SparqlResultParser::$mode in SparqlResultParser.php
    -
    -
    - $modelID -
    -
    -
    SparqlEngineDb::$modelID in SparqlEngineDb.php
    -
    Internal ID for our graph model.
    -
    -
    - matchPattern -
    -
    -
    SparqlEngine::matchPattern() in SparqlEngine.php
    -
    Finds tuples that match one graph pattern.
    -
    -
    - matchPatterns -
    -
    -
    SparqlEngine::matchPatterns() in SparqlEngine.php
    -
    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.
    -
    -
    - mkVal -
    -
    - -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - $named -
    -
    -
    ClientQuery::$named in ClientQuery.php
    -
    -
    - $nSqlVariableNameCount -
    -
    - -
    -
    - $nUnionCount -
    -
    - -
    Current UNION part number
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    QueryTriple::$object in QueryTriple.php
    -
    The QueryTriples Object.
    -
    -
    - $open -
    -
    -
    GraphPattern::$open in GraphPattern.php
    -
    -
    - $operatorPrecedence -
    -
    - -
    Which order operators are to be treated.
    -
    -
    - $optional -
    -
    -
    GraphPattern::$optional in GraphPattern.php
    -
    -
    - $outer -
    -
    -
    Constraint::$outer in Constraint.php
    -
    True if it is an outer filter, false if not.
    -
    -
    - $output -
    -
    -
    SparqlClient::$output in SparqlClient.php
    -
    -
    - orderTypeSets -
    -
    - -
    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.
    -
    -
    - Offsetter.php -
    -
    -
    Offsetter.php in Offsetter.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $patternId -
    -
    -
    GraphPattern::$patternId in GraphPattern.php
    -
    -
    - $pr -
    -
    -
    SparqlEngineDb::$pr in SparqlEngineDb.php
    -
    Prepared statments preparator instance
    -
    -
    - $predicate -
    -
    -
    QueryTriple::$predicate in QueryTriple.php
    -
    The QueryTriples Predicate.
    -
    -
    - $prefixes -
    -
    -
    ClientQuery::$prefixes in ClientQuery.php
    -
    -
    - $prefixes -
    -
    -
    Query::$prefixes in Query.php
    -
    Array that contains used prefixes and namespaces.
    -
    -
    - parse -
    -
    -
    SparqlParser::parse() in SparqlParser.php
    -
    Main function of SparqlParser. Parses a query string.
    -
    -
    - parse -
    -
    -
    SparqlResultParser::parse() in SparqlResultParser.php
    -
    Main function of SparqlResultParser
    -
    -
    - parseAsk -
    -
    -
    SparqlParser::parseAsk() in SparqlParser.php
    -
    Sets result form to 'ASK' and 'COUNT'.
    -
    -
    - parseBase -
    -
    -
    SparqlParser::parseBase() in SparqlParser.php
    -
    Parses the BASE part of the query.
    -
    -
    - parseBrackettedExpression -
    -
    - -
    Parses a bracketted expression.
    -
    -
    - parseCollection -
    -
    - -
    Parses an RDF collection.
    -
    -
    - parseConstraint -
    -
    - -
    Parses a value constraint.
    -
    -
    - parseConstraintTree -
    -
    - -
    Parses a constraint string recursively.
    -
    -
    - parseConstruct -
    -
    -
    SparqlParser::parseConstruct() in SparqlParser.php
    -
    Parses the CONSTRUCT clause.
    -
    -
    - parseDescribe -
    -
    -
    SparqlParser::parseDescribe() in SparqlParser.php
    -
    Adds a new variable to the query and sets result form to 'DESCRIBE'.
    -
    -
    - parseExpression -
    -
    - -
    Parses an expression.
    -
    -
    - parseFrom -
    -
    -
    SparqlParser::parseFrom() in SparqlParser.php
    -
    Parses the FROM clause.
    -
    -
    - parseGraph -
    -
    -
    SparqlParser::parseGraph() in SparqlParser.php
    -
    Parses a GRAPH clause.
    -
    -
    - parseGraphPattern -
    -
    - -
    Parses a graph pattern.
    -
    -
    - parseLiteral -
    -
    -
    SparqlParser::parseLiteral() in SparqlParser.php
    -
    Parses a literal.
    -
    -
    - parseModifier -
    -
    -
    SparqlParser::parseModifier() in SparqlParser.php
    -
    Parses the solution modifiers of a query.
    -
    -
    - parseNode -
    -
    -
    SparqlParser::parseNode() in SparqlParser.php
    -
    Parses a String to an RDF node.
    -
    -
    - parseOrderCondition -
    -
    - -
    Parses order conditions of a query.
    -
    -
    - parsePrefix -
    -
    -
    SparqlParser::parsePrefix() in SparqlParser.php
    -
    Adds a new namespace prefix to the query object.
    -
    -
    - parseQuery -
    -
    -
    SparqlParser::parseQuery() in SparqlParser.php
    -
    Starts parsing the tokenized SPARQL Query.
    -
    -
    - parseResult -
    -
    -
    SparqlClient::parseResult() in SparqlClient.php
    -
    -
    - parseSelect -
    -
    -
    SparqlParser::parseSelect() in SparqlParser.php
    -
    Parses the SELECT part of a query.
    -
    -
    - parseTriplePattern -
    -
    - -
    Parses a triple pattern.
    -
    -
    - parseWhere -
    -
    -
    SparqlParser::parseWhere() in SparqlParser.php
    -
    Parses the WHERE clause.
    -
    -
    - prepare -
    -
    -
    SparqlParser::prepare() in SparqlParser.php
    -
    Set all internal variables to a clear state before we start parsing.
    -
    -
    - prepare -
    -
    -
    SparqlEngineDb::prepare() in SparqlEngineDb.php
    -
    Create a prepared statement that can be executed later.
    -
    -
    - prepareInDb -
    -
    - -
    Converts the given queries into sql prepared statments,
    -
    -
    - preselectGraphs -
    -
    - -
    Looks in from and from named part of the query and adds the graphs to the graphlist.
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - Preparator.php -
    -
    -
    Preparator.php in Preparator.php
    -
    -
    - PreparedStatement.php -
    -
    -
    PreparedStatement.php in PreparedStatement.php
    -
    -
    - -
    -
    q
    - -
    -
    -
    -
    - $query -
    -
    -
    SparqlEngineDb::$query in SparqlEngineDb.php
    -
    Sparql Query object.
    -
    -
    - $query -
    -
    -
    SparqlParser::$query in SparqlParser.php
    -
    The query Object
    -
    -
    - $query -
    -
    - -
    -
    - $query -
    -
    -
    ClientQuery::$query in ClientQuery.php
    -
    -
    - $query -
    -
    -
    SparqlEngine::$query in SparqlEngine.php
    -
    The query object.
    -
    -
    - $querystring -
    -
    -
    SparqlParser::$querystring in SparqlParser.php
    -
    The Querystring
    -
    -
    - qnameCheck -
    -
    -
    SparqlParser::qnameCheck() in SparqlParser.php
    -
    Checks if $token is a qname.
    -
    -
    - query -
    -
    -
    ClientQuery::query() in ClientQuery.php
    -
    Adds the SPARQL query string to the query object.
    -
    -
    - Query -
    -
    -
    Query::Query() in Query.php
    -
    Constructor
    -
    -
    - Query -
    -
    -
    Query in Query.php
    -
    The Class Query represents a SPARQL query.
    -
    -
    - query -
    -
    -
    SparqlClient::query() in SparqlClient.php
    -
    Main function of SparqlClient.
    -
    -
    - queryDb -
    -
    -
    SparqlEngineDb::queryDb() in SparqlEngineDb.php
    -
    Sends the sql to the database and returns the results.
    -
    -
    - queryModel -
    -
    -
    SparqlEngineDb::queryModel() in SparqlEngineDb.php
    -
    Query the database with the given SPARQL query.
    -
    -
    - queryModel -
    -
    -
    SparqlEngine::queryModel() in SparqlEngine.php
    -
    The query engine's main method.
    -
    -
    - queryMultiple -
    -
    -
    SparqlEngineDb::queryMultiple() in SparqlEngineDb.php
    -
    Executes multiple SQL queries and returns an array of results.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple in QueryTriple.php
    -
    Represents a query triple.
    -
    -
    - QueryTriple -
    -
    -
    QueryTriple::QueryTriple() in QueryTriple.php
    -
    Constructor
    -
    -
    - Query.php -
    -
    -
    Query.php in Query.php
    -
    -
    - QueryTriple.php -
    -
    -
    QueryTriple.php in QueryTriple.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $resParser -
    -
    -
    SparqlResultParser::$resParser in SparqlResultParser.php
    -
    -
    - $resultForm -
    -
    -
    Query::$resultForm in Query.php
    -
    What form/type of result should be returned.
    -
    -
    - $resultPart -
    -
    -
    Query::$resultPart in Query.php
    -
    Contains the result part of the SPARQL query.
    -
    -
    - $resultVars -
    -
    -
    Query::$resultVars in Query.php
    -
    Array of result variables that shall be returned.
    -
    -
    - regex -
    -
    -
    regex() in FilterFunctions.php
    -
    Evaluates the regex() function. Returns true if the regex is matched false if not.
    -
    -
    - removeNull -
    -
    - -
    Removes all NULL values from an array and returns it.
    -
    -
    - replacePlaceholders -
    -
    - -
    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.
    -
    -
    - replacePlaceholdersCb -
    -
    - -
    Callback method internally used by replacePlaceholders() method.
    -
    -
    - replacePlaceholdersWithVariables -
    -
    - -
    Replaces all placeholders with their actual values.
    -
    -
    - replacePlaceholdersWithVariablesCb -
    -
    - -
    Callback method internally used by replacePlaceholdersWithVariables() method.
    -
    -
    - replacePrefix -
    -
    - -
    -
    - returnResult -
    -
    -
    SparqlClient::returnResult() in SparqlClient.php
    -
    Returns the query result.
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - ResultConverter.php -
    -
    -
    ResultConverter.php in ResultConverter.php
    -
    -
    - ResultRenderer.php -
    -
    -
    ResultRenderer.php in ResultRenderer.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $server -
    -
    -
    SparqlClient::$server in SparqlClient.php
    -
    -
    - $sg -
    -
    - -
    SQL Generator
    -
    -
    - $sg -
    -
    -
    SparqlEngineDb::$sg in SparqlEngineDb.php
    -
    SQL generator instance
    -
    -
    - $solutionModifier -
    -
    - -
    Optional solution modifier of the query.
    -
    -
    - $sops -
    -
    -
    SparqlParser::$sops in SparqlParser.php
    -
    Operators introduced by sparql
    -
    -
    - $sparqlEngine -
    -
    - -
    -
    - $strXmlData -
    -
    -
    SparqlResultParser::$strXmlData in SparqlResultParser.php
    -
    -
    - $subject -
    -
    -
    QueryTriple::$subject in QueryTriple.php
    -
    The QueryTriples Subject.
    -
    -
    - selectVars -
    -
    -
    SparqlEngine::selectVars() in SparqlEngine.php
    -
    Selects the result variables and builds a result table.
    -
    -
    - setBase -
    -
    -
    Query::setBase() in Query.php
    -
    Sets the base part.
    -
    -
    - setData -
    -
    - -
    Needs to be executed before getOrderifiedSqls and willBeDataDependent
    -
    -
    - setGraphname -
    -
    -
    GraphPattern::setGraphname() in GraphPattern.php
    -
    Sets the graphname.
    -
    -
    - setId -
    -
    -
    GraphPattern::setId() in GraphPattern.php
    -
    Sets the GraphPatterns Id.
    -
    -
    - setOuterFilter -
    -
    - -
    Sets the filter type to outer or inner filter.
    -
    -
    - setOutputFormat -
    -
    - -
    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.
    -
    -
    - setResultForm -
    -
    - -
    Sets the result form.
    -
    -
    - setSolutionModifier -
    -
    - -
    Sets a solution modifier.
    -
    -
    - setTree -
    -
    -
    Constraint::setTree() in Constraint.php
    -
    -
    - sortVars -
    -
    -
    SparqlEngine::sortVars() in SparqlEngine.php
    -
    Sorts the results.
    -
    -
    - SparqlClient.php -
    -
    -
    SparqlClient.php in SparqlClient.php
    -
    -
    - SparqlEngine.php -
    -
    -
    SparqlEngine.php in SparqlEngine.php
    -
    -
    - SqlGenerator.php -
    -
    -
    SqlGenerator.php in SqlGenerator.php
    -
    -
    - SqlGeneratorException.php -
    -
    -
    SqlGeneratorException.php in SqlGeneratorException.php
    -
    -
    - SqlMerger.php -
    -
    -
    SqlMerger.php in SqlMerger.php
    -
    -
    - SparqlEngineDb.php -
    -
    -
    SparqlEngineDb.php in SparqlEngineDb.php
    -
    -
    - SparqlParser.php -
    -
    -
    SparqlParser.php in SparqlParser.php
    -
    -
    - SparqlParserException.php -
    -
    -
    SparqlParserException.php in SparqlParserException.php
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient::SparqlClient() in SparqlClient.php
    -
    Constructor of SparlClient.
    -
    -
    - SparqlClient -
    -
    -
    SparqlClient in SparqlClient.php
    -
    Client for querying a sparql server.
    -
    -
    - SparqlEngine -
    -
    -
    SparqlEngine in SparqlEngine.php
    -
    This engine executes SPARQL queries against an RDF Datatset.
    -
    -
    - SparqlEngineDb -
    -
    -
    SparqlEngineDb in SparqlEngineDb.php
    -
    SPARQL engine optimized for databases.
    -
    -
    - SparqlEngineDb_FilterGenerator -
    -
    -
    SparqlEngineDb_FilterGenerator in FilterGenerator.php
    -
    Generates SQL from Sparql FILTER parts
    -
    -
    - SparqlEngineDb_FilterGenerator_Value -
    -
    - -
    Value class that holds some arbitrary value and a datatype.
    -
    -
    - SparqlEngineDb_Offsetter -
    -
    -
    SparqlEngineDb_Offsetter in Offsetter.php
    -
    Determines the offset in a row of sql queries.
    -
    -
    - SparqlEngineDb_Preparator -
    -
    -
    SparqlEngineDb_Preparator in Preparator.php
    -
    This class takes care of prepared statements: Preparing them in the database, replacing
    -
    -
    - SparqlEngineDb_PreparedStatement -
    -
    -
    SparqlEngineDb_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngineDb_ResultConverter -
    -
    -
    SparqlEngineDb_ResultConverter in ResultConverter.php
    -
    Converts a database result into a proper rdf statement triple array
    -
    -
    - SparqlEngineDb_ResultRenderer -
    -
    -
    SparqlEngineDb_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngineDb_ResultRenderer_Default -
    -
    - -
    Default RAP result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_HTML -
    -
    - -
    Sparql DB HTML result renderer.
    -
    -
    - SparqlEngineDb_ResultRenderer_XML -
    -
    - -
    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/
    -
    -
    - SparqlEngineDb_SqlGenerator -
    -
    -
    SparqlEngineDb_SqlGenerator in SqlGenerator.php
    -
    Creates sql statements from a Query object
    -
    -
    - SparqlEngineDb_SqlGeneratorException -
    -
    -
    SparqlEngineDb_SqlGeneratorException in SqlGeneratorException.php
    -
    Exception when generating the SQL statement
    -
    -
    - SparqlEngineDb_SqlMerger -
    -
    -
    SparqlEngineDb_SqlMerger in SqlMerger.php
    -
    Creates an sql string from an sql array
    -
    -
    - SparqlEngineDb_TypeSorter -
    -
    -
    SparqlEngineDb_TypeSorter in TypeSorter.php
    -
    Sorts database types as the Sparql specs want it.
    -
    -
    - SparqlEngine_PreparedStatement -
    -
    -
    SparqlEngine_PreparedStatement in PreparedStatement.php
    -
    A prepared statement that can be execute()d later multiple times with different variable values.
    -
    -
    - SparqlEngine_ResultConverter -
    -
    -
    SparqlEngine_ResultConverter in ResultConverter.php
    -
    Converts a memory result into a proper rdf statement triple array
    -
    -
    - SparqlEngine_ResultRenderer -
    -
    -
    SparqlEngine_ResultRenderer in ResultRenderer.php
    -
    Result renderer interface that any result renderer needs to implement.
    -
    -
    - SparqlEngine_ResultRenderer_Default -
    -
    - -
    Default result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_HTML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlEngine_ResultRenderer_XML -
    -
    - -
    XML result renderer for SparqlEngine
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser::SparqlParser() in SparqlParser.php
    -
    Constructor of SparqlParser
    -
    -
    - SparqlParser -
    -
    -
    SparqlParser in SparqlParser.php
    -
    Parses a SPARQL Query string and returns a Query Object.
    -
    -
    - SparqlParserException -
    -
    -
    SparqlParserException in SparqlParserException.php
    -
    A SPARQL Parser Execption for better errorhandling.
    -
    -
    - SparqlResultParser -
    -
    -
    SparqlResultParser in SparqlResultParser.php
    -
    Parses an xml document in SPARQL Result XML Format.
    -
    -
    - str -
    -
    -
    str() in FilterFunctions.php
    -
    Evaluates the str() function. Returns the string representation of a variable or RDF term.
    -
    -
    - switchOperator -
    -
    - -
    -
    - SparqlResultParser.php -
    -
    -
    SparqlResultParser.php in SparqlResultParser.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $tmp -
    -
    -
    SparqlParser::$tmp in SparqlParser.php
    -
    Last parsed graphPattern
    -
    -
    - $tokens -
    -
    -
    SparqlParser::$tokens in SparqlParser.php
    -
    The tokenized Query
    -
    -
    - $tree -
    -
    -
    Constraint::$tree in Constraint.php
    -
    The expression tree
    -
    -
    - $triplePattern -
    -
    -
    GraphPattern::$triplePattern in GraphPattern.php
    -
    -
    - $ts -
    -
    -
    SparqlEngineDb::$ts in SparqlEngineDb.php
    -
    Type sorting instance
    -
    -
    - $type -
    -
    - -
    -
    - $typeVariable -
    -
    - -
    -
    - $typeXsdBoolean -
    -
    - -
    -
    - $typeXsdDateTime -
    -
    - -
    -
    - $typeXsdDouble -
    -
    - -
    -
    - $typeXsdInteger -
    -
    - -
    -
    - $typeXsdString -
    -
    - -
    -
    - TypeSorter.php -
    -
    -
    TypeSorter.php in TypeSorter.php
    -
    -
    - tagClosed -
    -
    -
    SparqlResultParser::tagClosed() in SparqlResultParser.php
    -
    -
    - tagData -
    -
    -
    SparqlResultParser::tagData() in SparqlResultParser.php
    -
    -
    - tagOpen -
    -
    -
    SparqlResultParser::tagOpen() in SparqlResultParser.php
    -
    -
    - tokenize -
    -
    -
    SparqlParser::tokenize() in SparqlParser.php
    -
    Tokenizes the querystring.
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $union -
    -
    -
    GraphPattern::$union in GraphPattern.php
    -
    -
    - $usedVars -
    -
    -
    Query::$usedVars in Query.php
    -
    List of all vars used in the query.
    -
    -
    - uncomment -
    -
    -
    SparqlParser::uncomment() in SparqlParser.php
    -
    Removes comments in the query string. Comments are indicated by '#'.
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - $value -
    -
    - -
    -
    - $varDatatypes -
    -
    - -
    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.
    -
    -
    - $varLanguages -
    -
    - -
    Language of variables. NULL if the variable has no language tag (e.g. @en) set.
    -
    -
    - $varlist -
    -
    -
    SparqlResultParser::$varlist in SparqlResultParser.php
    -
    -
    - $varname -
    -
    -
    SparqlResultParser::$varname in SparqlResultParser.php
    -
    -
    - varCheck -
    -
    -
    SparqlParser::varCheck() in SparqlParser.php
    -
    Checks if $token is a variable.
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - willBeDataDependent -
    -
    - -
    Returns wether the returned queries will depend on the data or not.
    -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - wrapCode -
    -
    - -
    -
    - writeQueryResultAsHtmlTable -
    -
    - -
    Prints a query result as HTML table.
    -
    -
    - -
    -
    x
    - -
    -
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - XML.php -
    -
    -
    XML.php in XML.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - l - m - n - o - p - q - r - s - t - u - v - w - x - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_syntax.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_syntax.html deleted file mode 100755 index 62025b06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_syntax.html +++ /dev/null @@ -1,770 +0,0 @@ - - - - - - - - - - - - -

    [syntax] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - g - i - m - n - o - p - r - s - t - u - _ -
    - - -
    -
    _
    - -
    -
    -
    -
    - _generateRDF -
    -
    -
    GRDDLParser::_generateRDF() in GRDDLParser.php
    -
    -
    - _is_forbidden_rdf_property_attribute -
    -
    - -
    -
    - _parse_uri -
    -
    -
    RdfParser::_parse_uri() in RdfParser.php
    -
    -
    - _report_error -
    -
    - -
    -
    - -
    -
    a
    - -
    -
    -
    -
    - $anon -
    -
    -
    N3Serializer::$anon in N3Serializer.php
    -
    -
    - addNamespacePrefix -
    -
    - -
    Adds a new prefix/namespace combination.
    -
    -
    - addNSPrefix -
    -
    -
    N3Serializer::addNSPrefix() in N3Serializer.php
    -
    Adds a new namespace prefix to use.
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - $bNode -
    -
    -
    N3Parser::$bNode in N3Parser.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - channel -
    -
    -
    RssParser::channel() in RssParser.php
    -
    Parses the rss channel/ atom feed.
    -
    -
    - configSortModel -
    -
    - -
    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.
    -
    -
    - configUseAttributes -
    -
    - -
    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.
    -
    -
    - configUseEntities -
    -
    - -
    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.
    -
    -
    - configUseQnames -
    -
    - -
    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.
    -
    -
    - configUseXmlDeclaration -
    -
    - -
    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.
    -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - $DAML_NS -
    -
    -
    N3Parser::$DAML_NS in N3Parser.php
    -
    -
    - $debug -
    -
    -
    NTripleSerializer::$debug in NTripleSerializer.php
    -
    -
    - $debug -
    -
    -
    N3Serializer::$debug in N3Serializer.php
    -
    -
    - $debug -
    -
    -
    N3Parser::$debug in N3Parser.php
    -
    -
    - $done -
    -
    -
    N3Serializer::$done in N3Serializer.php
    -
    -
    - dc -
    -
    -
    RssParser::dc() in RssParser.php
    -
    Adds the dc namespace.
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - generateModel -
    -
    - -
    Main function
    -
    -
    - generateModel -
    -
    - -
    Generates a new MemModel from a URI, a file or from memory.
    -
    -
    - generateModel -
    -
    - -
    Generate a new MemModel from an URI or file.
    -
    -
    - generateModel -
    -
    -
    GRDDLParser::generateModel() in GRDDLParser.php
    -
    generates a MemModel and creates the DomDocument.
    -
    -
    - getPovs -
    -
    -
    N3Parser::getPovs() in N3Parser.php
    -
    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
    -
    -
    - GRDDLParser -
    -
    -
    GRDDLParser in GRDDLParser.php
    -
    A GRDDLParser.
    -
    -
    - GRDDLParser.php -
    -
    -
    GRDDLParser.php in GRDDLParser.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - image -
    -
    -
    RssParser::image() in RssParser.php
    -
    Parses the image if there is one.
    -
    -
    - items -
    -
    -
    RssParser::items() in RssParser.php
    -
    Parses the rss items/ atom entries.
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - $model -
    -
    -
    NTripleSerializer::$model in NTripleSerializer.php
    -
    -
    - $model -
    -
    -
    RdfParser::$model in RdfParser.php
    -
    -
    - $model -
    -
    -
    N3Serializer::$model in N3Serializer.php
    -
    -
    - $m_attributeStatements -
    -
    - -
    -
    - $m_baseURI -
    -
    -
    RdfSerializer::$m_baseURI in RdfSerializer.php
    -
    -
    - $m_contentStatements -
    -
    - -
    -
    - $m_currentSubject -
    -
    - -
    -
    - $m_defaultNamespaces -
    -
    - -
    -
    - $m_groupTypeStatement -
    -
    - -
    -
    - $m_namespaces -
    -
    -
    RdfSerializer::$m_namespaces in RdfSerializer.php
    -
    -
    - $m_nextAutomaticPrefixIndex -
    -
    - -
    -
    - $m_out -
    -
    -
    RdfSerializer::$m_out in RdfSerializer.php
    -
    -
    - $m_rdfAboutElementText -
    -
    - -
    -
    - $m_rdfIDElementText -
    -
    - -
    -
    - $m_rdfResourceElementText -
    -
    - -
    -
    - $m_statements -
    -
    -
    RdfSerializer::$m_statements in RdfSerializer.php
    -
    -
    - MAGIC_STRING -
    -
    -
    MAGIC_STRING in N3Serializer.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N3Parser -
    -
    -
    N3Parser::N3Parser() in N3Parser.php
    -
    Constructor
    -
    -
    - N3Parser -
    -
    -
    N3Parser in N3Parser.php
    -
    PHP Notation3 Parser
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer::N3Serializer() in N3Serializer.php
    -
    Constructor
    -
    -
    - N3Serializer -
    -
    -
    N3Serializer in N3Serializer.php
    -
    An abstract object.
    -
    -
    - NTripleSerializer -
    -
    -
    NTripleSerializer in NTripleSerializer.php
    -
    PHP N-Triple Serializer
    -
    -
    - NTripleSerializer -
    -
    - -
    Constructor
    -
    -
    - N3Parser.php -
    -
    -
    N3Parser.php in N3Parser.php
    -
    -
    - N3Serializer.php -
    -
    -
    N3Serializer.php in N3Serializer.php
    -
    -
    - NTripleSerializer.php -
    -
    -
    NTripleSerializer.php in NTripleSerializer.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $OWL_NS -
    -
    -
    N3Parser::$OWL_NS in N3Parser.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $parsedNamespaces -
    -
    - -
    -
    - $parseError -
    -
    -
    N3Parser::$parseError in N3Parser.php
    -
    -
    - $prefixes -
    -
    -
    N3Serializer::$prefixes in N3Serializer.php
    -
    -
    - parse -
    -
    -
    N3Parser::parse() in N3Parser.php
    -
    This parses a N3 string and prints out the triples
    -
    -
    - parse2model -
    -
    -
    N3Parser::parse2model() in N3Parser.php
    -
    This parses a N3 string and returns a memmodel
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - $RDF_NS -
    -
    -
    N3Parser::$RDF_NS in N3Parser.php
    -
    -
    - $rdf_parser -
    -
    -
    RdfParser::$rdf_parser in RdfParser.php
    -
    -
    - $rdf_qnames -
    -
    -
    RdfSerializer::$rdf_qnames in RdfSerializer.php
    -
    -
    - $rdf_qname_prefix -
    -
    - -
    -
    - $res -
    -
    -
    NTripleSerializer::$res in NTripleSerializer.php
    -
    -
    - $res -
    -
    -
    N3Serializer::$res in N3Serializer.php
    -
    -
    - $resourcetext -
    -
    -
    N3Serializer::$resourcetext in N3Serializer.php
    -
    -
    - $resourcetext_taken -
    -
    - -
    -
    - RdfParser -
    -
    -
    RdfParser in RdfParser.php
    -
    An RDF paser.
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer::RdfSerializer() in RdfSerializer.php
    -
    Constructor
    -
    -
    - RdfSerializer -
    -
    -
    RdfSerializer in RdfSerializer.php
    -
    An RDF seralizer.
    -
    -
    - RssParser -
    -
    -
    RssParser in RssParser.php
    -
    RSS/ATOM Parser
    -
    -
    - RdfParser.php -
    -
    -
    RdfParser.php in RdfParser.php
    -
    -
    - RdfSerializer.php -
    -
    -
    RdfSerializer.php in RdfSerializer.php
    -
    -
    - RssParser.php -
    -
    -
    RssParser.php in RssParser.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - $sort_model -
    -
    -
    RdfSerializer::$sort_model in RdfSerializer.php
    -
    -
    - saveAs -
    -
    -
    NTripleSerializer::saveAs() in NTripleSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    N3Serializer::saveAs() in N3Serializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - saveAs -
    -
    -
    RdfSerializer::saveAs() in RdfSerializer.php
    -
    Serializes a model and saves it into a file.
    -
    -
    - serialize -
    -
    -
    RdfSerializer::serialize() in RdfSerializer.php
    -
    Serializes a model to RDF syntax.
    -
    -
    - serialize -
    -
    -
    NTripleSerializer::serialize() in NTripleSerializer.php
    -
    Serializes a model to N Triple syntax.
    -
    -
    - serialize -
    -
    -
    N3Serializer::serialize() in N3Serializer.php
    -
    Serializes a model to N3 syntax.
    -
    -
    - setFixBnodes -
    -
    -
    N3Parser::setFixBnodes() in N3Parser.php
    -
    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
    -
    -
    - sy -
    -
    -
    RssParser::sy() in RssParser.php
    -
    Adds the sy namespace.
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - $Tokens -
    -
    -
    N3Parser::$Tokens in N3Parser.php
    -
    -
    - $type -
    -
    -
    RssParser::$type in RssParser.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - $use_attributes -
    -
    -
    RdfSerializer::$use_attributes in RdfSerializer.php
    -
    -
    - $use_entities -
    -
    -
    RdfSerializer::$use_entities in RdfSerializer.php
    -
    -
    - $use_xml_declaration -
    -
    - -
    -
    - uparse -
    -
    -
    N3Parser::uparse() in N3Parser.php
    -
    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
    -
    -
    - -
    - a - b - c - d - g - i - m - n - o - p - r - s - t - u - _ -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_utility.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_utility.html deleted file mode 100755 index e2c62a7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_utility.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - - - - - - -

    [utility] element index

    -

    Package indexes

    - -All elements -
    -
    - b - c - e - f - g - h - i - k - m - n - o - p - r - s - t - v - w -
    - - -
    -
    b
    - -
    -
    -
    -
    - buildSortArray -
    -
    -
    ModelComparator::buildSortArray() in ModelComparator.php
    -
    Builds a sorted array.
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - compare -
    -
    -
    ModelComparator::compare() in ModelComparator.php
    -
    Compares two models.
    -
    -
    - compareTriples -
    -
    -
    ModelComparator::compareTriples() in ModelComparator.php
    -
    Compares the Triples in the lists.
    -
    -
    - createOrd -
    -
    -
    RDFUtil::createOrd() in RdfUtil.php
    -
    Creates ordinal RDF resource out of an integer.
    -
    -
    - current -
    -
    -
    StatementIterator::current() in StatementIterator.php
    -
    Returns the current statement.
    -
    -
    - current -
    -
    -
    IterFind::current() in IterFind.php
    -
    Returns the current item
    -
    -
    - current -
    -
    -
    FindIterator::current() in FindIterator.php
    -
    Returns the current matching statement.
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - escapeValue -
    -
    -
    RDFUtil::escapeValue() in RdfUtil.php
    -
    Escapes < > and &
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FindIterator -
    -
    -
    FindIterator::FindIterator() in FindIterator.php
    -
    Constructor
    -
    -
    - FindIterator -
    -
    -
    FindIterator in FindIterator.php
    -
    Iterator for traversing statements matching a searchpattern.
    -
    -
    - FindIterator.php -
    -
    -
    FindIterator.php in FindIterator.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - getCurrentPosition -
    -
    - -
    Returns the current position of the iterator.
    -
    -
    - getLocalName -
    -
    - -
    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
    -
    -
    - getNamespace -
    -
    - -
    Extracts the namespace prefix out of the URI of a Resource.
    -
    -
    - getOrd -
    -
    -
    RDFUtil::getOrd() in RdfUtil.php
    -
    Converts an ordinal RDF resource to an integer.
    -
    -
    - getPrefix -
    -
    -
    RDFUtil::getPrefix() in RdfUtil.php
    -
    Short Prefix for known Namespaces by given URI
    -
    -
    - guessName -
    -
    -
    RDFUtil::guessName() in RdfUtil.php
    -
    Delivers the name out of the URI (without the namespace prefix).
    -
    -
    - guessNamespace -
    -
    - -
    Extracts the namespace prefix out of a URI.
    -
    -
    - guessPrefix -
    -
    -
    RDFUtil::guessPrefix() in RdfUtil.php
    -
    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - hasNext -
    -
    -
    FindIterator::hasNext() in FindIterator.php
    -
    Returns TRUE if there are more matching statements.
    -
    -
    - hasNext -
    -
    -
    StatementIterator::hasNext() in StatementIterator.php
    -
    Returns TRUE if there are more statements.
    -
    -
    - hasPrevious -
    -
    -
    StatementIterator::hasPrevious() in StatementIterator.php
    -
    Returns TRUE if the first statement has not been reached.
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - isRDF -
    -
    -
    RDFUtil::isRDF() in RdfUtil.php
    -
    Tests if the URI of a resource belongs to the RDF syntax/model namespace.
    -
    -
    - IterFind -
    -
    -
    IterFind::IterFind() in IterFind.php
    -
    Constructor.
    -
    -
    - IterFind -
    -
    -
    IterFind in IterFind.php
    -
    Implementation of a find-iterator which delivers statements or quads.
    -
    -
    - IterFind.php -
    -
    -
    IterFind.php in IterFind.php
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - key -
    -
    -
    IterFind::key() in IterFind.php
    -
    Returns the key of the current item
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - ModelComparator -
    -
    -
    ModelComparator in ModelComparator.php
    -
    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.
    -
    -
    - moveFirst -
    -
    -
    StatementIterator::moveFirst() in StatementIterator.php
    -
    Moves the pointer to the first statement.
    -
    -
    - moveLast -
    -
    -
    StatementIterator::moveLast() in StatementIterator.php
    -
    Moves the pointer to the last statement.
    -
    -
    - moveTo -
    -
    -
    StatementIterator::moveTo() in StatementIterator.php
    -
    Moves the pointer to a specific statement.
    -
    -
    - ModelComparator.php -
    -
    -
    ModelComparator.php in ModelComparator.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - next -
    -
    -
    StatementIterator::next() in StatementIterator.php
    -
    Returns the next statement.
    -
    -
    - next -
    -
    -
    IterFind::next() in IterFind.php
    -
    Moves Iterator to the next item in the list
    -
    -
    - next -
    -
    -
    FindIterator::next() in FindIterator.php
    -
    Returns the next matching statement.
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - $object -
    -
    -
    FindIterator::$object in FindIterator.php
    -
    -
    - Object -
    -
    -
    Object in Object.php
    -
    An abstract object.
    -
    -
    - Object.php -
    -
    -
    Object.php in Object.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - $predicate -
    -
    -
    FindIterator::$predicate in FindIterator.php
    -
    -
    - previous -
    -
    -
    StatementIterator::previous() in StatementIterator.php
    -
    Returns the previous statement.
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RDFUtil -
    -
    -
    RDFUtil in RdfUtil.php
    -
    Useful utility methods.
    -
    -
    - renameBlanks -
    -
    -
    ModelComparator::renameBlanks() in ModelComparator.php
    -
    Renames the models Blanknodes.
    -
    -
    - rewind -
    -
    -
    IterFind::rewind() in IterFind.php
    -
    Resets iterator list to start
    -
    -
    - RdfUtil.php -
    -
    -
    RdfUtil.php in RdfUtil.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - StatementIterator -
    -
    - -
    Constructor
    -
    -
    - StatementIterator -
    -
    -
    StatementIterator in StatementIterator.php
    -
    Iterator for traversing models.
    -
    -
    - StatementIterator.php -
    -
    -
    StatementIterator.php in StatementIterator.php
    -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - toString -
    -
    -
    Object::toString() in Object.php
    -
    Serializes a object into a string
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - valid -
    -
    -
    IterFind::valid() in IterFind.php
    -
    Says if there are additional items left in the list
    -
    -
    - visualizeGraph -
    -
    - -
    Generates a dot-file for drawing graphical output with the
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - writeHTMLTable -
    -
    - -
    Prints a MemModel as HTML table.
    -
    -
    - -
    - b - c - e - f - g - h - i - k - m - n - o - p - r - s - t - v - w -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_vocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_vocabulary.html deleted file mode 100755 index 2b55d848..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/elementindex_vocabulary.html +++ /dev/null @@ -1,4332 +0,0 @@ - - - - - - - - - - - - -

    [vocabulary] element index

    -

    Package indexes

    - -All elements -
    -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - u - v - w - y -
    - - -
    -
    a
    - -
    -
    -
    -
    - ABOUT -
    -
    -
    RDF_RES::ABOUT() in RDF_RES.php
    -
    -
    - ABOUT -
    -
    -
    RDF::ABOUT() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF::ABOUT_EACH() in RDF_C.php
    -
    -
    - ABOUT_EACH -
    -
    -
    RDF_RES::ABOUT_EACH() in RDF_RES.php
    -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABOUT_EACH_PREFIX -
    -
    - -
    -
    - ABSTRACT_ -
    -
    -
    DC::ABSTRACT_() in DC_C.php
    -
    -
    - ABSTRACT_ -
    -
    -
    DC_RES::ABSTRACT_() in DC_RES.php
    -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCESS_RIGHTS -
    -
    - -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF::ACCOUNT_NAME() in FOAF_C.php
    -
    -
    - ACCOUNT_NAME -
    -
    -
    FOAF_RES::ACCOUNT_NAME() in FOAF_RES.php
    -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ACCOUNT_SERVICE_HOMEPAGE -
    -
    - -
    -
    - ADR -
    -
    -
    VCARD_RES::ADR() in VCARD_RES.php
    -
    -
    - ADR -
    -
    -
    VCARD::ADR() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    -
    VCARD::ADRPROPERTIES() in VCARD_C.php
    -
    -
    - ADRPROPERTIES -
    -
    - -
    -
    - ADRTYPES -
    -
    -
    VCARD::ADRTYPES() in VCARD_C.php
    -
    -
    - ADRTYPES -
    -
    -
    VCARD_RES::ADRTYPES() in VCARD_RES.php
    -
    -
    - AGENT -
    -
    -
    FOAF_RES::AGENT() in FOAF_RES.php
    -
    -
    - AGENT -
    -
    -
    FOAF::AGENT() in FOAF_C.php
    -
    -
    - AGENT -
    -
    -
    VCARD_RES::AGENT() in VCARD_RES.php
    -
    -
    - AGENT -
    -
    -
    VCARD::AGENT() in VCARD_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF::AIM_CHAT_ID() in FOAF_C.php
    -
    -
    - AIM_CHAT_ID -
    -
    -
    FOAF_RES::AIM_CHAT_ID() in FOAF_RES.php
    -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_DIFFERENT -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALL_VALUES_FROM -
    -
    - -
    -
    - ALT -
    -
    -
    RDF_RES::ALT() in RDF_RES.php
    -
    -
    - ALT -
    -
    -
    RDF::ALT() in RDF_C.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC::ALTERNATIVE() in DC_C.php
    -
    -
    - ALTERNATIVE -
    -
    -
    DC_RES::ALTERNATIVE() in DC_RES.php
    -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ANNOTATION_PROPERTY -
    -
    - -
    -
    - ATOM -
    -
    -
    ATOM in ATOM_C.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_CONSTRUCT -
    -
    - -
    -
    - ATOM_RES -
    -
    -
    ATOM_RES in ATOM_RES.php
    -
    ATOM Vocabulary (Resource)
    -
    -
    - AUDIENCE -
    -
    -
    DC::AUDIENCE() in DC_C.php
    -
    -
    - AUDIENCE -
    -
    -
    DC_RES::AUDIENCE() in DC_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM_RES::AUTHOR() in ATOM_RES.php
    -
    -
    - AUTHOR -
    -
    -
    ATOM::AUTHOR() in ATOM_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC::AVAILABLE() in DC_C.php
    -
    -
    - AVAILABLE -
    -
    -
    DC_RES::AVAILABLE() in DC_RES.php
    -
    -
    - ATOM_C.php -
    -
    -
    ATOM_C.php in ATOM_C.php
    -
    -
    - ATOM_RES.php -
    -
    -
    ATOM_RES.php in ATOM_RES.php
    -
    -
    - -
    -
    b
    - -
    -
    -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BACKWARD_COMPATIBLE_WITH -
    -
    - -
    -
    - BAG -
    -
    -
    RDF_RES::BAG() in RDF_RES.php
    -
    -
    - BAG -
    -
    -
    RDF::BAG() in RDF_C.php
    -
    -
    - BAG_ID -
    -
    -
    RDF::BAG_ID() in RDF_C.php
    -
    -
    - BAG_ID -
    -
    -
    RDF_RES::BAG_ID() in RDF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF_RES::BASED_NEAR() in FOAF_RES.php
    -
    -
    - BASED_NEAR -
    -
    -
    FOAF::BASED_NEAR() in FOAF_C.php
    -
    -
    - BDAY -
    -
    -
    VCARD_RES::BDAY() in VCARD_RES.php
    -
    -
    - BDAY -
    -
    -
    VCARD::BDAY() in VCARD_C.php
    -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BIBLIOGRAPHIC_CITATION -
    -
    - -
    -
    - BOX -
    -
    -
    DC::BOX() in DC_C.php
    -
    -
    - BOX -
    -
    -
    DC_RES::BOX() in DC_RES.php
    -
    -
    - -
    -
    c
    - -
    -
    -
    -
    - CARDINALITY -
    -
    -
    OWL::CARDINALITY() in OWL_C.php
    -
    -
    - CARDINALITY -
    -
    -
    OWL_RES::CARDINALITY() in OWL_RES.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD_RES::CATEGORIES() in VCARD_RES.php
    -
    -
    - CATEGORIES -
    -
    -
    VCARD::CATEGORIES() in VCARD_C.php
    -
    -
    - CHANNEL -
    -
    -
    RSS::CHANNEL() in RSS_C.php
    -
    -
    - CHANNEL -
    -
    -
    RSS_RES::CHANNEL() in RSS_RES.php
    -
    -
    - COLLECTION -
    -
    -
    DC::COLLECTION() in DC_C.php
    -
    -
    - COLLECTION -
    -
    -
    DC_RES::COLLECTION() in DC_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS_RES::COMMENT() in RDFS_RES.php
    -
    -
    - COMMENT -
    -
    -
    RDFS::COMMENT() in RDFS_C.php
    -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - COMPLEMENT_OF -
    -
    - -
    -
    - CONFORMS_TO -
    -
    -
    DC_RES::CONFORMS_TO() in DC_RES.php
    -
    -
    - CONFORMS_TO -
    -
    -
    DC::CONFORMS_TO() in DC_C.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS_RES::CONTAINER() in RDFS_RES.php
    -
    -
    - CONTAINER -
    -
    -
    RDFS::CONTAINER() in RDFS_C.php
    -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTAINER_MEMBERSHIP_PROPERTY -
    -
    - -
    -
    - CONTENT -
    -
    -
    ATOM_RES::CONTENT() in ATOM_RES.php
    -
    -
    - CONTENT -
    -
    -
    ATOM::CONTENT() in ATOM_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM_RES::CONTRIBUTOR() in ATOM_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC::CONTRIBUTOR() in DC_C.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    DC_RES::CONTRIBUTOR() in DC_RES.php
    -
    -
    - CONTRIBUTOR -
    -
    -
    ATOM::CONTRIBUTOR() in ATOM_C.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM_RES::COPYRIGHT() in ATOM_RES.php
    -
    -
    - COPYRIGHT -
    -
    -
    ATOM::COPYRIGHT() in ATOM_C.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD_RES::COUNTRY() in VCARD_RES.php
    -
    -
    - COUNTRY -
    -
    -
    VCARD::COUNTRY() in VCARD_C.php
    -
    -
    - COVERAGE -
    -
    -
    DC_RES::COVERAGE() in DC_RES.php
    -
    -
    - COVERAGE -
    -
    -
    DC::COVERAGE() in DC_C.php
    -
    -
    - CREATED -
    -
    -
    DC_RES::CREATED() in DC_RES.php
    -
    -
    - CREATED -
    -
    -
    ATOM_RES::CREATED() in ATOM_RES.php
    -
    -
    - CREATED -
    -
    -
    ATOM::CREATED() in ATOM_C.php
    -
    -
    - CREATED -
    -
    -
    DC::CREATED() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC::CREATOR() in DC_C.php
    -
    -
    - CREATOR -
    -
    -
    DC_RES::CREATOR() in DC_RES.php
    -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - CURRENT_PROJECT -
    -
    - -
    -
    - -
    -
    d
    - -
    -
    -
    -
    - DATASET -
    -
    -
    DC_RES::DATASET() in DC_RES.php
    -
    -
    - DATASET -
    -
    -
    DC::DATASET() in DC_C.php
    -
    -
    - DATATYPE -
    -
    -
    OWL_RES::DATATYPE() in OWL_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS::DATATYPE() in RDFS_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDF::DATATYPE() in RDF_C.php
    -
    -
    - DATATYPE -
    -
    -
    RDF_RES::DATATYPE() in RDF_RES.php
    -
    -
    - DATATYPE -
    -
    -
    RDFS_RES::DATATYPE() in RDFS_RES.php
    -
    -
    - DATATYPE -
    -
    -
    OWL::DATATYPE() in OWL_C.php
    -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_PROPERTY -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATATYPE_RESTRICTION -
    -
    - -
    -
    - DATA_RANGE -
    -
    -
    OWL::DATA_RANGE() in OWL_C.php
    -
    -
    - DATA_RANGE -
    -
    -
    OWL_RES::DATA_RANGE() in OWL_RES.php
    -
    -
    - DATE -
    -
    -
    DC::DATE() in DC_C.php
    -
    -
    - DATE -
    -
    -
    DC_RES::DATE() in DC_RES.php
    -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_ACCEPTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_COPYRIGHTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DATE_SUBMITTED -
    -
    - -
    -
    - DC -
    -
    -
    DC in DC_C.php
    -
    Dublin Core Vocabulary (Resource)
    -
    -
    - DCMI_TYPE -
    -
    -
    DC::DCMI_TYPE() in DC_C.php
    -
    -
    - DCMI_TYPE -
    -
    -
    DC_RES::DCMI_TYPE() in DC_RES.php
    -
    -
    - DC_RES -
    -
    -
    DC_RES in DC_RES.php
    -
    Dublin Core Vocabulary (ResResource)
    -
    -
    - DEPICTION -
    -
    -
    FOAF::DEPICTION() in FOAF_C.php
    -
    -
    - DEPICTION -
    -
    -
    FOAF_RES::DEPICTION() in FOAF_RES.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF::DEPICTS() in FOAF_C.php
    -
    -
    - DEPICTS -
    -
    -
    FOAF_RES::DEPICTS() in FOAF_RES.php
    -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_CLASS -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DEPRECATED_PROPERTY -
    -
    - -
    -
    - DESCRIPTION -
    -
    -
    RDF::DESCRIPTION() in RDF_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC_RES::DESCRIPTION() in DC_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RDF_RES::DESCRIPTION() in RDF_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    DC::DESCRIPTION() in DC_C.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS_RES::DESCRIPTION() in RSS_RES.php
    -
    -
    - DESCRIPTION -
    -
    -
    RSS::DESCRIPTION() in RSS_C.php
    -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DIFFERENT_FROM -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISJOINT_WITH -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DISTINCT_MEMBERS -
    -
    - -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF_RES::DNA_CHECKSUM() in FOAF_RES.php
    -
    -
    - DNA_CHECKSUM -
    -
    -
    FOAF::DNA_CHECKSUM() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF::DOCUMENT() in FOAF_C.php
    -
    -
    - DOCUMENT -
    -
    -
    FOAF_RES::DOCUMENT() in FOAF_RES.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS_RES::DOMAIN() in RDFS_RES.php
    -
    -
    - DOMAIN -
    -
    -
    RDFS::DOMAIN() in RDFS_C.php
    -
    -
    - DC_C.php -
    -
    -
    DC_C.php in DC_C.php
    -
    -
    - DC_RES.php -
    -
    -
    DC_RES.php in DC_RES.php
    -
    -
    - -
    -
    e
    - -
    -
    -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EDUCATION_LEVEL -
    -
    - -
    -
    - EMAIL -
    -
    -
    VCARD_RES::EMAIL() in VCARD_RES.php
    -
    -
    - EMAIL -
    -
    -
    ATOM_RES::EMAIL() in ATOM_RES.php
    -
    -
    - EMAIL -
    -
    -
    ATOM::EMAIL() in ATOM_C.php
    -
    -
    - EMAIL -
    -
    -
    VCARD::EMAIL() in VCARD_C.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD_RES::EMAILTYPES() in VCARD_RES.php
    -
    -
    - EMAILTYPES -
    -
    -
    VCARD::EMAILTYPES() in VCARD_C.php
    -
    -
    - ENTRY -
    -
    -
    ATOM_RES::ENTRY() in ATOM_RES.php
    -
    -
    - ENTRY -
    -
    -
    ATOM::ENTRY() in ATOM_C.php
    -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_CLASS -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EQUIVALENT_PROPERTY -
    -
    - -
    -
    - EVENT -
    -
    -
    DC_RES::EVENT() in DC_RES.php
    -
    -
    - EVENT -
    -
    -
    DC::EVENT() in DC_C.php
    -
    -
    - EXTADD -
    -
    -
    VCARD::EXTADD() in VCARD_C.php
    -
    -
    - EXTADD -
    -
    -
    VCARD_RES::EXTADD() in VCARD_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC_RES::EXTENT() in DC_RES.php
    -
    -
    - EXTENT -
    -
    -
    DC::EXTENT() in DC_C.php
    -
    -
    - -
    -
    f
    - -
    -
    -
    -
    - FAMILY -
    -
    -
    VCARD_RES::FAMILY() in VCARD_RES.php
    -
    -
    - FAMILY -
    -
    -
    VCARD::FAMILY() in VCARD_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF::FAMILY_NAME() in FOAF_C.php
    -
    -
    - FAMILY_NAME -
    -
    -
    FOAF_RES::FAMILY_NAME() in FOAF_RES.php
    -
    -
    - FEED -
    -
    -
    ATOM::FEED() in ATOM_C.php
    -
    -
    - FEED -
    -
    -
    ATOM_RES::FEED() in ATOM_RES.php
    -
    -
    - FIRST -
    -
    -
    RDF::FIRST() in RDF_C.php
    -
    -
    - FIRST -
    -
    -
    RDF_RES::FIRST() in RDF_RES.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF_RES::FIRST_NAME() in FOAF_RES.php
    -
    -
    - FIRST_NAME -
    -
    -
    FOAF::FIRST_NAME() in FOAF_C.php
    -
    -
    - FN -
    -
    -
    VCARD::FN() in VCARD_C.php
    -
    -
    - FN -
    -
    -
    VCARD_RES::FN() in VCARD_RES.php
    -
    -
    - FOAF -
    -
    -
    FOAF in FOAF_C.php
    -
    Friend of a Friend (FOAF) Vocabulary (Resource)
    -
    -
    - FOAF_RES -
    -
    -
    FOAF_RES in FOAF_RES.php
    -
    Friend of a Friend (FOAF) Vocabulary (ResResource)
    -
    -
    - FORMAT -
    -
    -
    DC_RES::FORMAT() in DC_RES.php
    -
    -
    - FORMAT -
    -
    -
    DC::FORMAT() in DC_C.php
    -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - FUNDED_BY -
    -
    -
    FOAF::FUNDED_BY() in FOAF_C.php
    -
    -
    - FUNDED_BY -
    -
    -
    FOAF_RES::FUNDED_BY() in FOAF_RES.php
    -
    -
    - FOAF.php -
    -
    -
    FOAF.php in FOAF.php
    -
    -
    - FOAF_C.php -
    -
    -
    FOAF_C.php in FOAF_C.php
    -
    -
    - FOAF_RES.php -
    -
    -
    FOAF_RES.php in FOAF_RES.php
    -
    -
    - -
    -
    g
    - -
    -
    -
    -
    - GEEKCODE -
    -
    -
    FOAF::GEEKCODE() in FOAF_C.php
    -
    -
    - GEEKCODE -
    -
    -
    FOAF_RES::GEEKCODE() in FOAF_RES.php
    -
    -
    - GENDER -
    -
    -
    FOAF::GENDER() in FOAF_C.php
    -
    -
    - GENDER -
    -
    -
    FOAF_RES::GENDER() in FOAF_RES.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM::GENERATOR() in ATOM_C.php
    -
    -
    - GENERATOR -
    -
    -
    ATOM_RES::GENERATOR() in ATOM_RES.php
    -
    -
    - GEO -
    -
    -
    VCARD_RES::GEO() in VCARD_RES.php
    -
    -
    - GEO -
    -
    -
    VCARD::GEO() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD::GIVEN() in VCARD_C.php
    -
    -
    - GIVEN -
    -
    -
    VCARD_RES::GIVEN() in VCARD_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF_RES::GIVENNAME() in FOAF_RES.php
    -
    -
    - GIVENNAME -
    -
    -
    FOAF::GIVENNAME() in FOAF_C.php
    -
    -
    - GROUP -
    -
    -
    VCARD_RES::GROUP() in VCARD_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF_RES::GROUP() in FOAF_RES.php
    -
    -
    - GROUP -
    -
    -
    FOAF::GROUP() in FOAF_C.php
    -
    -
    - GROUP -
    -
    -
    VCARD::GROUP() in VCARD_C.php
    -
    -
    - -
    -
    h
    - -
    -
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM::HAS_CHILD() in ATOM_C.php
    -
    -
    - HAS_CHILD -
    -
    -
    ATOM_RES::HAS_CHILD() in ATOM_RES.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM::HAS_ENTRY() in ATOM_C.php
    -
    -
    - HAS_ENTRY -
    -
    -
    ATOM_RES::HAS_ENTRY() in ATOM_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC_RES::HAS_FORMAT() in DC_RES.php
    -
    -
    - HAS_FORMAT -
    -
    -
    DC::HAS_FORMAT() in DC_C.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM_RES::HAS_LINK() in ATOM_RES.php
    -
    -
    - HAS_LINK -
    -
    -
    ATOM::HAS_LINK() in ATOM_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC::HAS_PART() in DC_C.php
    -
    -
    - HAS_PART -
    -
    -
    DC_RES::HAS_PART() in DC_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM_RES::HAS_TITLE() in ATOM_RES.php
    -
    -
    - HAS_TITLE -
    -
    -
    ATOM::HAS_TITLE() in ATOM_C.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL_RES::HAS_VALUE() in OWL_RES.php
    -
    -
    - HAS_VALUE -
    -
    -
    OWL::HAS_VALUE() in OWL_C.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC_RES::HAS_VERSION() in DC_RES.php
    -
    -
    - HAS_VERSION -
    -
    -
    DC::HAS_VERSION() in DC_C.php
    -
    -
    - HOLDS_ACCOUNT -
    -
    - -
    -
    - HOLDS_ACCOUNT -
    -
    -
    FOAF::HOLDS_ACCOUNT() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF::HOMEPAGE() in FOAF_C.php
    -
    -
    - HOMEPAGE -
    -
    -
    FOAF_RES::HOMEPAGE() in FOAF_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM_RES::HREF() in ATOM_RES.php
    -
    -
    - HREF -
    -
    -
    ATOM::HREF() in ATOM_C.php
    -
    -
    - -
    -
    i
    - -
    -
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF::ICQ_CHAT_ID() in FOAF_C.php
    -
    -
    - ICQ_CHAT_ID -
    -
    -
    FOAF_RES::ICQ_CHAT_ID() in FOAF_RES.php
    -
    -
    - ID -
    -
    -
    RDF_RES::ID() in RDF_RES.php
    -
    -
    - ID -
    -
    -
    RDF::ID() in RDF_C.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC_RES::IDENTIFIER() in DC_RES.php
    -
    -
    - IDENTIFIER -
    -
    -
    DC::IDENTIFIER() in DC_C.php
    -
    -
    - IMAGE -
    -
    -
    FOAF_RES::IMAGE() in FOAF_RES.php
    -
    -
    - IMAGE -
    -
    -
    FOAF::IMAGE() in FOAF_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS::IMAGE() in RSS_C.php
    -
    -
    - IMAGE -
    -
    -
    RSS_RES::IMAGE() in RSS_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC_RES::IMAGE() in DC_RES.php
    -
    -
    - IMAGE -
    -
    -
    DC::IMAGE() in DC_C.php
    -
    -
    - IMG -
    -
    -
    FOAF::IMG() in FOAF_C.php
    -
    -
    - IMG -
    -
    -
    FOAF_RES::IMG() in FOAF_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL_RES::IMPORTS() in OWL_RES.php
    -
    -
    - IMPORTS -
    -
    -
    OWL::IMPORTS() in OWL_C.php
    -
    -
    - IMT -
    -
    -
    DC::IMT() in DC_C.php
    -
    -
    - IMT -
    -
    -
    DC_RES::IMT() in DC_RES.php
    -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INCOMPATIBLE_WITH -
    -
    - -
    -
    - INFO -
    -
    -
    ATOM_RES::INFO() in ATOM_RES.php
    -
    -
    - INFO -
    -
    -
    ATOM::INFO() in ATOM_C.php
    -
    -
    - INTERACTIVERESOURCE -
    -
    - -
    -
    - INTERACTIVE_RESOURCE -
    -
    - -
    -
    - INTEREST -
    -
    -
    FOAF_RES::INTEREST() in FOAF_RES.php
    -
    -
    - INTEREST -
    -
    -
    FOAF::INTEREST() in FOAF_C.php
    -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INTERSECTION_OF -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_FUNCTIONAL_PROPERTY -
    -
    - -
    -
    - INVERSE_OF -
    -
    -
    OWL_RES::INVERSE_OF() in OWL_RES.php
    -
    -
    - INVERSE_OF -
    -
    -
    OWL::INVERSE_OF() in OWL_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC::ISO639_2() in DC_C.php
    -
    -
    - ISO639_2 -
    -
    -
    DC_RES::ISO639_2() in DC_RES.php
    -
    -
    - ISO3166 -
    -
    -
    DC::ISO3166() in DC_C.php
    -
    -
    - ISO3166 -
    -
    -
    DC_RES::ISO3166() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC_RES::ISSUED() in DC_RES.php
    -
    -
    - ISSUED -
    -
    -
    ATOM_RES::ISSUED() in ATOM_RES.php
    -
    -
    - ISSUED -
    -
    -
    DC::ISSUED() in DC_C.php
    -
    -
    - ISSUED -
    -
    -
    ATOM::ISSUED() in ATOM_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    -
    RDFS::IS_DEFINED_BY() in RDFS_C.php
    -
    -
    - IS_DEFINED_BY -
    -
    - -
    -
    - IS_FORMAT_OF -
    -
    - -
    -
    - IS_FORMAT_OF -
    -
    -
    DC::IS_FORMAT_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC::IS_PART_OF() in DC_C.php
    -
    -
    - IS_PART_OF -
    -
    -
    DC_RES::IS_PART_OF() in DC_RES.php
    -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REFERENCED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REPLACED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_REQUIRED_BY -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - IS_VERSION_OF -
    -
    - -
    -
    - ITEM -
    -
    -
    RSS_RES::ITEM() in RSS_RES.php
    -
    -
    - ITEM -
    -
    -
    RSS::ITEM() in RSS_C.php
    -
    -
    - ITEMS -
    -
    -
    RSS_RES::ITEMS() in RSS_RES.php
    -
    -
    - ITEMS -
    -
    -
    RSS::ITEMS() in RSS_C.php
    -
    -
    - -
    -
    j
    - -
    -
    -
    -
    - JABBER_ID -
    -
    -
    FOAF_RES::JABBER_ID() in FOAF_RES.php
    -
    -
    - JABBER_ID -
    -
    -
    FOAF::JABBER_ID() in FOAF_C.php
    -
    -
    - -
    -
    k
    - -
    -
    -
    -
    - KEY -
    -
    -
    VCARD_RES::KEY() in VCARD_RES.php
    -
    -
    - KEY -
    -
    -
    VCARD::KEY() in VCARD_C.php
    -
    -
    - KNOWS -
    -
    -
    FOAF_RES::KNOWS() in FOAF_RES.php
    -
    -
    - KNOWS -
    -
    -
    FOAF::KNOWS() in FOAF_C.php
    -
    -
    - -
    -
    l
    - -
    -
    -
    -
    - LABEL -
    -
    -
    RDFS_RES::LABEL() in RDFS_RES.php
    -
    -
    - LABEL -
    -
    -
    VCARD::LABEL() in VCARD_C.php
    -
    -
    - LABEL -
    -
    -
    RDFS::LABEL() in RDFS_C.php
    -
    -
    - LABEL -
    -
    -
    VCARD_RES::LABEL() in VCARD_RES.php
    -
    -
    - LANG -
    -
    -
    ATOM_RES::LANG() in ATOM_RES.php
    -
    -
    - LANG -
    -
    -
    ATOM::LANG() in ATOM_C.php
    -
    -
    - LANGUAGE -
    -
    -
    DC::LANGUAGE() in DC_C.php
    -
    -
    - LANGUAGE -
    -
    -
    DC_RES::LANGUAGE() in DC_RES.php
    -
    -
    - LCC -
    -
    -
    DC::LCC() in DC_C.php
    -
    -
    - LCC -
    -
    -
    DC_RES::LCC() in DC_RES.php
    -
    -
    - LCSH -
    -
    -
    DC::LCSH() in DC_C.php
    -
    -
    - LCSH -
    -
    -
    DC_RES::LCSH() in DC_RES.php
    -
    -
    - LI -
    -
    -
    RDF::LI() in RDF_C.php
    -
    -
    - LI -
    -
    -
    RDF_RES::LI() in RDF_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC_RES::LICENSE() in DC_RES.php
    -
    -
    - LICENSE -
    -
    -
    DC::LICENSE() in DC_C.php
    -
    -
    - LINK -
    -
    -
    RSS::LINK() in RSS_C.php
    -
    -
    - LINK -
    -
    -
    ATOM::LINK() in ATOM_C.php
    -
    -
    - LINK -
    -
    -
    RSS_RES::LINK() in RSS_RES.php
    -
    -
    - LINK -
    -
    -
    ATOM_RES::LINK() in ATOM_RES.php
    -
    -
    - LITERAL -
    -
    -
    RDFS::LITERAL() in RDFS_C.php
    -
    -
    - LITERAL -
    -
    -
    RDF::LITERAL() in RDF_C.php
    -
    -
    - LITERAL -
    -
    -
    RDFS_RES::LITERAL() in RDFS_RES.php
    -
    -
    - LITERAL -
    -
    -
    RDF_RES::LITERAL() in RDF_RES.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD::LOCALITY() in VCARD_C.php
    -
    -
    - LOCALITY -
    -
    -
    VCARD_RES::LOCALITY() in VCARD_RES.php
    -
    -
    - LOGO -
    -
    -
    FOAF_RES::LOGO() in FOAF_RES.php
    -
    -
    - LOGO -
    -
    -
    FOAF::LOGO() in FOAF_C.php
    -
    -
    - -
    -
    m
    - -
    -
    -
    -
    - MADE -
    -
    -
    FOAF_RES::MADE() in FOAF_RES.php
    -
    -
    - MADE -
    -
    -
    FOAF::MADE() in FOAF_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD::MAILER() in VCARD_C.php
    -
    -
    - MAILER -
    -
    -
    VCARD_RES::MAILER() in VCARD_RES.php
    -
    -
    - MAKER -
    -
    -
    FOAF::MAKER() in FOAF_C.php
    -
    -
    - MAKER -
    -
    -
    FOAF_RES::MAKER() in FOAF_RES.php
    -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MAX_CARDINALITY -
    -
    - -
    -
    - MBOX -
    -
    -
    FOAF_RES::MBOX() in FOAF_RES.php
    -
    -
    - MBOX -
    -
    -
    FOAF::MBOX() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF::MBOX_SHA1SUM() in FOAF_C.php
    -
    -
    - MBOX_SHA1SUM -
    -
    -
    FOAF_RES::MBOX_SHA1SUM() in FOAF_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC_RES::MEDIATOR() in DC_RES.php
    -
    -
    - MEDIATOR -
    -
    -
    DC::MEDIATOR() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC::MEDIUM() in DC_C.php
    -
    -
    - MEDIUM -
    -
    -
    DC_RES::MEDIUM() in DC_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS_RES::MEMBER() in RDFS_RES.php
    -
    -
    - MEMBER -
    -
    -
    RDFS::MEMBER() in RDFS_C.php
    -
    -
    - MEMBER -
    -
    -
    FOAF_RES::MEMBER() in FOAF_RES.php
    -
    -
    - MEMBER -
    -
    -
    FOAF::MEMBER() in FOAF_C.php
    -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MEMBERSHIP_CLASS -
    -
    - -
    -
    - MESH -
    -
    -
    DC::MESH() in DC_C.php
    -
    -
    - MESH -
    -
    -
    DC_RES::MESH() in DC_RES.php
    -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MIN_CARDINALITY -
    -
    - -
    -
    - MODE -
    -
    -
    ATOM_RES::MODE() in ATOM_RES.php
    -
    -
    - MODE -
    -
    -
    ATOM::MODE() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM::MODIFIED() in ATOM_C.php
    -
    -
    - MODIFIED -
    -
    -
    ATOM_RES::MODIFIED() in ATOM_RES.php
    -
    -
    - MODIFIED -
    -
    -
    DC_RES::MODIFIED() in DC_RES.php
    -
    -
    - MODIFIED -
    -
    -
    DC::MODIFIED() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC::MOVINGIMAGE() in DC_C.php
    -
    -
    - MOVINGIMAGE -
    -
    -
    DC_RES::MOVINGIMAGE() in DC_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF_RES::MSN_CHAT_ID() in FOAF_RES.php
    -
    -
    - MSN_CHAT_ID -
    -
    -
    FOAF::MSN_CHAT_ID() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF::MYERS_BRIGGS() in FOAF_C.php
    -
    -
    - MYERS_BRIGGS -
    -
    -
    FOAF_RES::MYERS_BRIGGS() in FOAF_RES.php
    -
    -
    - -
    -
    n
    - -
    -
    -
    -
    - N -
    -
    -
    VCARD::N() in VCARD_C.php
    -
    -
    - N -
    -
    -
    VCARD_RES::N() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS_RES::NAME() in RSS_RES.php
    -
    -
    - NAME -
    -
    -
    VCARD_RES::NAME() in VCARD_RES.php
    -
    -
    - NAME -
    -
    -
    RSS::NAME() in RSS_C.php
    -
    -
    - NAME -
    -
    -
    FOAF_RES::NAME() in FOAF_RES.php
    -
    -
    - NAME -
    -
    -
    ATOM_RES::NAME() in ATOM_RES.php
    -
    -
    - NAME -
    -
    -
    FOAF::NAME() in FOAF_C.php
    -
    -
    - NAME -
    -
    -
    VCARD::NAME() in VCARD_C.php
    -
    -
    - NAME -
    -
    -
    ATOM::NAME() in ATOM_C.php
    -
    -
    - NICK -
    -
    -
    FOAF_RES::NICK() in FOAF_RES.php
    -
    -
    - NICK -
    -
    -
    FOAF::NICK() in FOAF_C.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD_RES::NICKNAME() in VCARD_RES.php
    -
    -
    - NICKNAME -
    -
    -
    VCARD::NICKNAME() in VCARD_C.php
    -
    -
    - NIL -
    -
    -
    RDF_RES::NIL() in RDF_RES.php
    -
    -
    - NIL -
    -
    -
    RDF::NIL() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF::NODE_ID() in RDF_C.php
    -
    -
    - NODE_ID -
    -
    -
    RDF_RES::NODE_ID() in RDF_RES.php
    -
    -
    - NOTHING -
    -
    -
    OWL::NOTHING() in OWL_C.php
    -
    -
    - NOTHING -
    -
    -
    OWL_RES::NOTHING() in OWL_RES.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD_RES::NPROPERTIES() in VCARD_RES.php
    -
    -
    - NPROPERTIES -
    -
    -
    VCARD::NPROPERTIES() in VCARD_C.php
    -
    -
    - -
    -
    o
    - -
    -
    -
    -
    - OBJECT -
    -
    -
    RDF_RES::OBJECT() in RDF_RES.php
    -
    -
    - OBJECT -
    -
    -
    RDF::OBJECT() in RDF_C.php
    -
    -
    - OBJECT_CLASS -
    -
    -
    OWL::OBJECT_CLASS() in OWL_C.php
    -
    -
    - OBJECT_CLASS -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_PROPERTY -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - OBJECT_RESTRICTION -
    -
    - -
    -
    - ONE_OF -
    -
    -
    OWL_RES::ONE_OF() in OWL_RES.php
    -
    -
    - ONE_OF -
    -
    -
    OWL::ONE_OF() in OWL_C.php
    -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_CHAT_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_ECOMMERCE_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONLINE_GAMING_ACCOUNT -
    -
    - -
    -
    - ONTOLOGY -
    -
    -
    OWL_RES::ONTOLOGY() in OWL_RES.php
    -
    -
    - ONTOLOGY -
    -
    -
    OWL::ONTOLOGY() in OWL_C.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL_RES::ON_PROPERTY() in OWL_RES.php
    -
    -
    - ON_PROPERTY -
    -
    -
    OWL::ON_PROPERTY() in OWL_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF::ORGANIZATION() in FOAF_C.php
    -
    -
    - ORGANIZATION -
    -
    -
    FOAF_RES::ORGANIZATION() in FOAF_RES.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD::ORGNAME() in VCARD_C.php
    -
    -
    - ORGNAME -
    -
    -
    VCARD_RES::ORGNAME() in VCARD_RES.php
    -
    -
    - ORGPROPERTIES -
    -
    -
    VCARD::ORGPROPERTIES() in VCARD_C.php
    -
    -
    - ORGPROPERTIES -
    -
    - -
    -
    - ORGUNIT -
    -
    -
    VCARD_RES::ORGUNIT() in VCARD_RES.php
    -
    -
    - ORGUNIT -
    -
    -
    VCARD::ORGUNIT() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD::OTHER() in VCARD_C.php
    -
    -
    - OTHER -
    -
    -
    VCARD_RES::OTHER() in VCARD_RES.php
    -
    -
    - OWL -
    -
    -
    OWL in OWL_C.php
    -
    OWL Vocabulary (Resource)
    -
    -
    - OWL_CLASS -
    -
    -
    OWL::OWL_CLASS() in OWL_C.php
    -
    -
    - OWL_CLASS -
    -
    -
    OWL_RES::OWL_CLASS() in OWL_RES.php
    -
    -
    - OWL_RES -
    -
    -
    OWL_RES in OWL_RES.php
    -
    OWL Vocabulary (ResResource)
    -
    -
    - OWL.php -
    -
    -
    OWL.php in OWL.php
    -
    -
    - OWL_C.php -
    -
    -
    OWL_C.php in OWL_C.php
    -
    -
    - OWL_RES.php -
    -
    -
    OWL_RES.php in OWL_RES.php
    -
    -
    - -
    -
    p
    - -
    -
    -
    -
    - PAGE -
    -
    -
    FOAF::PAGE() in FOAF_C.php
    -
    -
    - PAGE -
    -
    -
    FOAF_RES::PAGE() in FOAF_RES.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF_RES::PARSE_TYPE() in RDF_RES.php
    -
    -
    - PARSE_TYPE -
    -
    -
    RDF::PARSE_TYPE() in RDF_C.php
    -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PARSE_TYPE_RESOURCE -
    -
    - -
    -
    - PAST_PROJECT -
    -
    -
    FOAF_RES::PAST_PROJECT() in FOAF_RES.php
    -
    -
    - PAST_PROJECT -
    -
    -
    FOAF::PAST_PROJECT() in FOAF_C.php
    -
    -
    - PCODE -
    -
    -
    VCARD_RES::PCODE() in VCARD_RES.php
    -
    -
    - PCODE -
    -
    -
    VCARD::PCODE() in VCARD_C.php
    -
    -
    - PERIOD -
    -
    -
    DC::PERIOD() in DC_C.php
    -
    -
    - PERIOD -
    -
    -
    DC_RES::PERIOD() in DC_RES.php
    -
    -
    - PERSON -
    -
    -
    ATOM::PERSON() in ATOM_C.php
    -
    -
    - PERSON -
    -
    -
    FOAF::PERSON() in FOAF_C.php
    -
    -
    - PERSON -
    -
    -
    ATOM_RES::PERSON() in ATOM_RES.php
    -
    -
    - PERSON -
    -
    -
    FOAF_RES::PERSON() in FOAF_RES.php
    -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PERSONAL_PROFILE_DOCUMENT -
    -
    - -
    -
    - PHONE -
    -
    -
    FOAF_RES::PHONE() in FOAF_RES.php
    -
    -
    - PHONE -
    -
    -
    FOAF::PHONE() in FOAF_C.php
    -
    -
    - PHOTO -
    -
    -
    VCARD_RES::PHOTO() in VCARD_RES.php
    -
    -
    - PHOTO -
    -
    -
    VCARD::PHOTO() in VCARD_C.php
    -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PHYSICALOBJECT -
    -
    - -
    -
    - PLAN -
    -
    -
    FOAF_RES::PLAN() in FOAF_RES.php
    -
    -
    - PLAN -
    -
    -
    FOAF::PLAN() in FOAF_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD::POBOX() in VCARD_C.php
    -
    -
    - POBOX -
    -
    -
    VCARD_RES::POBOX() in VCARD_RES.php
    -
    -
    - POINT -
    -
    -
    DC_RES::POINT() in DC_RES.php
    -
    -
    - POINT -
    -
    -
    DC::POINT() in DC_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF::PREDICATE() in RDF_C.php
    -
    -
    - PREDICATE -
    -
    -
    RDF_RES::PREDICATE() in RDF_RES.php
    -
    -
    - PREFIX -
    -
    -
    VCARD::PREFIX() in VCARD_C.php
    -
    -
    - PREFIX -
    -
    -
    VCARD_RES::PREFIX() in VCARD_RES.php
    -
    -
    - PRIMARY_TOPIC -
    -
    -
    FOAF::PRIMARY_TOPIC() in FOAF_C.php
    -
    -
    - PRIMARY_TOPIC -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRIOR_VERSION -
    -
    - -
    -
    - PRODID -
    -
    -
    VCARD::PRODID() in VCARD_C.php
    -
    -
    - PRODID -
    -
    -
    VCARD_RES::PRODID() in VCARD_RES.php
    -
    -
    - PROJECT -
    -
    -
    FOAF::PROJECT() in FOAF_C.php
    -
    -
    - PROJECT -
    -
    -
    FOAF_RES::PROJECT() in FOAF_RES.php
    -
    -
    - PROPERTY -
    -
    -
    OWL::PROPERTY() in OWL_C.php
    -
    -
    - PROPERTY -
    -
    -
    OWL_RES::PROPERTY() in OWL_RES.php
    -
    -
    - PROPERTY -
    -
    -
    RDF::PROPERTY() in RDF_C.php
    -
    -
    - PROPERTY -
    -
    -
    RDF_RES::PROPERTY() in RDF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF_RES::PUBLICATIONS() in FOAF_RES.php
    -
    -
    - PUBLICATIONS -
    -
    -
    FOAF::PUBLICATIONS() in FOAF_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC::PUBLISHER() in DC_C.php
    -
    -
    - PUBLISHER -
    -
    -
    DC_RES::PUBLISHER() in DC_RES.php
    -
    -
    - -
    -
    r
    - -
    -
    -
    -
    - RANGE -
    -
    -
    RDFS_RES::RANGE() in RDFS_RES.php
    -
    -
    - RANGE -
    -
    -
    RDFS::RANGE() in RDFS_C.php
    -
    -
    - RDF -
    -
    -
    RDF in RDF_C.php
    -
    Resource Description Framework (RDF) Vocabulary (Resource)
    -
    -
    - RDFS -
    -
    -
    RDFS in RDFS_C.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS::RDFS_CLASS() in RDFS_C.php
    -
    -
    - RDFS_CLASS -
    -
    -
    RDFS_RES::RDFS_CLASS() in RDFS_RES.php
    -
    -
    - RDFS_RES -
    -
    -
    RDFS_RES in RDFS_RES.php
    -
    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
    -
    -
    - RDF_LIST -
    -
    -
    RDF_RES::RDF_LIST() in RDF_RES.php
    -
    -
    - RDF_LIST -
    -
    -
    RDF::RDF_LIST() in RDF_C.php
    -
    -
    - RDF_RES -
    -
    -
    RDF_RES in RDF_RES.php
    -
    Resource Description Framework (RDF) Vocabulary (ResResource)
    -
    -
    - REFERENCES -
    -
    -
    DC_RES::REFERENCES() in DC_RES.php
    -
    -
    - REFERENCES -
    -
    -
    DC::REFERENCES() in DC_C.php
    -
    -
    - REGION -
    -
    -
    VCARD_RES::REGION() in VCARD_RES.php
    -
    -
    - REGION -
    -
    -
    VCARD::REGION() in VCARD_C.php
    -
    -
    - REL -
    -
    -
    ATOM::REL() in ATOM_C.php
    -
    -
    - REL -
    -
    -
    ATOM_RES::REL() in ATOM_RES.php
    -
    -
    - REPLACES -
    -
    -
    DC::REPLACES() in DC_C.php
    -
    -
    - REPLACES -
    -
    -
    DC_RES::REPLACES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC_RES::REQUIRES() in DC_RES.php
    -
    -
    - REQUIRES -
    -
    -
    DC::REQUIRES() in DC_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF_RES::RESOURCE() in RDF_RES.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS::RESOURCE() in RDFS_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDF::RESOURCE() in RDF_C.php
    -
    -
    - RESOURCE -
    -
    -
    RDFS_RES::RESOURCE() in RDFS_RES.php
    -
    -
    - REST -
    -
    -
    RDF_RES::REST() in RDF_RES.php
    -
    -
    - REST -
    -
    -
    RDF::REST() in RDF_C.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL_RES::RESTRICTION() in OWL_RES.php
    -
    -
    - RESTRICTION -
    -
    -
    OWL::RESTRICTION() in OWL_C.php
    -
    -
    - REV -
    -
    -
    VCARD_RES::REV() in VCARD_RES.php
    -
    -
    - REV -
    -
    -
    VCARD::REV() in VCARD_C.php
    -
    -
    - RFC1766 -
    -
    -
    DC_RES::RFC1766() in DC_RES.php
    -
    -
    - RFC1766 -
    -
    -
    DC::RFC1766() in DC_C.php
    -
    -
    - RFC3066 -
    -
    -
    DC_RES::RFC3066() in DC_RES.php
    -
    -
    - RFC3066 -
    -
    -
    DC::RFC3066() in DC_C.php
    -
    -
    - RIGHTS -
    -
    -
    DC_RES::RIGHTS() in DC_RES.php
    -
    -
    - RIGHTS -
    -
    -
    DC::RIGHTS() in DC_C.php
    -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - RIGHTS_HOLDER -
    -
    - -
    -
    - ROLE -
    -
    -
    VCARD::ROLE() in VCARD_C.php
    -
    -
    - ROLE -
    -
    -
    VCARD_RES::ROLE() in VCARD_RES.php
    -
    -
    - RSS -
    -
    -
    RSS in RSS_C.php
    -
    RSS Vocabulary (Resource)
    -
    -
    - RSS_RES -
    -
    -
    RSS_RES in RSS_RES.php
    -
    RSS Vocabulary (ResResource)
    -
    -
    - RDF.php -
    -
    -
    RDF.php in RDF.php
    -
    -
    - RDFS.php -
    -
    -
    RDFS.php in RDFS.php
    -
    -
    - RDFS_C.php -
    -
    -
    RDFS_C.php in RDFS_C.php
    -
    -
    - RDFS_RES.php -
    -
    -
    RDFS_RES.php in RDFS_RES.php
    -
    -
    - RDF_C.php -
    -
    -
    RDF_C.php in RDF_C.php
    -
    -
    - RDF_RES.php -
    -
    -
    RDF_RES.php in RDF_RES.php
    -
    -
    - RSS.php -
    -
    -
    RSS.php in RSS.php
    -
    -
    - RSS_C.php -
    -
    -
    RSS_C.php in RSS_C.php
    -
    -
    - RSS_RES.php -
    -
    -
    RSS_RES.php in RSS_RES.php
    -
    -
    - -
    -
    s
    - -
    -
    -
    -
    - SAME_AS -
    -
    -
    OWL::SAME_AS() in OWL_C.php
    -
    -
    - SAME_AS -
    -
    -
    OWL_RES::SAME_AS() in OWL_RES.php
    -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_CLASS_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_INDIVIDUAL_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SAME_PROPERTY_AS -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SCHOOL_HOMEPAGE -
    -
    - -
    -
    - SEEALSO -
    -
    -
    RDFS::SEEALSO() in RDFS_C.php
    -
    -
    - SEEALSO -
    -
    -
    RDFS_RES::SEEALSO() in RDFS_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF_RES::SEE_ALSO() in RDF_RES.php
    -
    -
    - SEE_ALSO -
    -
    -
    RDF::SEE_ALSO() in RDF_C.php
    -
    -
    - SEQ -
    -
    -
    RDF::SEQ() in RDF_C.php
    -
    -
    - SEQ -
    -
    -
    RDF_RES::SEQ() in RDF_RES.php
    -
    -
    - SERVICE -
    -
    -
    DC::SERVICE() in DC_C.php
    -
    -
    - SERVICE -
    -
    -
    DC_RES::SERVICE() in DC_RES.php
    -
    -
    - SHA1 -
    -
    -
    FOAF_RES::SHA1() in FOAF_RES.php
    -
    -
    - SHA1 -
    -
    -
    FOAF::SHA1() in FOAF_C.php
    -
    -
    - SOFTWARE -
    -
    -
    DC_RES::SOFTWARE() in DC_RES.php
    -
    -
    - SOFTWARE -
    -
    -
    DC::SOFTWARE() in DC_C.php
    -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SOME_VALUES_FROM -
    -
    - -
    -
    - SORT_STRING -
    -
    -
    VCARD_RES::SORT_STRING() in VCARD_RES.php
    -
    -
    - SORT_STRING -
    -
    -
    VCARD::SORT_STRING() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    DC_RES::SOUND() in DC_RES.php
    -
    -
    - SOUND -
    -
    -
    VCARD::SOUND() in VCARD_C.php
    -
    -
    - SOUND -
    -
    -
    DC::SOUND() in DC_C.php
    -
    -
    - SOUND -
    -
    -
    VCARD_RES::SOUND() in VCARD_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD::SOURCE() in VCARD_C.php
    -
    -
    - SOURCE -
    -
    -
    DC::SOURCE() in DC_C.php
    -
    -
    - SOURCE -
    -
    -
    DC_RES::SOURCE() in DC_RES.php
    -
    -
    - SOURCE -
    -
    -
    VCARD_RES::SOURCE() in VCARD_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC_RES::SPATIAL() in DC_RES.php
    -
    -
    - SPATIAL -
    -
    -
    DC::SPATIAL() in DC_C.php
    -
    -
    - STATEMENT -
    -
    -
    RDF_RES::STATEMENT() in RDF_RES.php
    -
    -
    - STATEMENT -
    -
    -
    RDF::STATEMENT() in RDF_C.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC_RES::STILLIMAGE() in DC_RES.php
    -
    -
    - STILLIMAGE -
    -
    -
    DC::STILLIMAGE() in DC_C.php
    -
    -
    - STREET -
    -
    -
    VCARD::STREET() in VCARD_C.php
    -
    -
    - STREET -
    -
    -
    VCARD_RES::STREET() in VCARD_RES.php
    -
    -
    - SUBJECT -
    -
    -
    RDF_RES::SUBJECT() in RDF_RES.php
    -
    -
    - SUBJECT -
    -
    -
    DC::SUBJECT() in DC_C.php
    -
    -
    - SUBJECT -
    -
    -
    RDF::SUBJECT() in RDF_C.php
    -
    -
    - SUBJECT -
    -
    -
    DC_RES::SUBJECT() in DC_RES.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS::SUB_CLASS_OF() in RDFS_C.php
    -
    -
    - SUB_CLASS_OF -
    -
    -
    RDFS_RES::SUB_CLASS_OF() in RDFS_RES.php
    -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUB_PROPERTY_OF -
    -
    - -
    -
    - SUFFIX -
    -
    -
    VCARD::SUFFIX() in VCARD_C.php
    -
    -
    - SUFFIX -
    -
    -
    VCARD_RES::SUFFIX() in VCARD_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM_RES::SUMMARY() in ATOM_RES.php
    -
    -
    - SUMMARY -
    -
    -
    ATOM::SUMMARY() in ATOM_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF::SURNAME() in FOAF_C.php
    -
    -
    - SURNAME -
    -
    -
    FOAF_RES::SURNAME() in FOAF_RES.php
    -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - SYMMETRIC_PROPERTY -
    -
    - -
    -
    - -
    -
    t
    - -
    -
    -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TABLE_OF_CONTENTS -
    -
    - -
    -
    - TAGLINE -
    -
    -
    ATOM_RES::TAGLINE() in ATOM_RES.php
    -
    -
    - TAGLINE -
    -
    -
    ATOM::TAGLINE() in ATOM_C.php
    -
    -
    - TEL -
    -
    -
    VCARD::TEL() in VCARD_C.php
    -
    -
    - TEL -
    -
    -
    VCARD_RES::TEL() in VCARD_RES.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD_RES::TELTYPES() in VCARD_RES.php
    -
    -
    - TELTYPES -
    -
    -
    VCARD::TELTYPES() in VCARD_C.php
    -
    -
    - TEMPORAL -
    -
    -
    DC_RES::TEMPORAL() in DC_RES.php
    -
    -
    - TEMPORAL -
    -
    -
    DC::TEMPORAL() in DC_C.php
    -
    -
    - TEXT -
    -
    -
    DC_RES::TEXT() in DC_RES.php
    -
    -
    - TEXT -
    -
    -
    DC::TEXT() in DC_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS::TEXTINPUT() in RSS_C.php
    -
    -
    - TEXTINPUT -
    -
    -
    RSS_RES::TEXTINPUT() in RSS_RES.php
    -
    -
    - TGN -
    -
    -
    DC_RES::TGN() in DC_RES.php
    -
    -
    - TGN -
    -
    -
    DC::TGN() in DC_C.php
    -
    -
    - THEME -
    -
    -
    FOAF::THEME() in FOAF_C.php
    -
    -
    - THEME -
    -
    -
    FOAF_RES::THEME() in FOAF_RES.php
    -
    -
    - THING -
    -
    -
    OWL_RES::THING() in OWL_RES.php
    -
    -
    - THING -
    -
    -
    OWL::THING() in OWL_C.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF::THUMBNAIL() in FOAF_C.php
    -
    -
    - THUMBNAIL -
    -
    -
    FOAF_RES::THUMBNAIL() in FOAF_RES.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF::TIPJAR() in FOAF_C.php
    -
    -
    - TIPJAR -
    -
    -
    FOAF_RES::TIPJAR() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD_RES::TITLE() in VCARD_RES.php
    -
    -
    - TITLE -
    -
    -
    ATOM::TITLE() in ATOM_C.php
    -
    -
    - TITLE -
    -
    -
    ATOM_RES::TITLE() in ATOM_RES.php
    -
    -
    - TITLE -
    -
    -
    RSS::TITLE() in RSS_C.php
    -
    -
    - TITLE -
    -
    -
    RSS_RES::TITLE() in RSS_RES.php
    -
    -
    - TITLE -
    -
    -
    VCARD::TITLE() in VCARD_C.php
    -
    -
    - TITLE -
    -
    -
    FOAF_RES::TITLE() in FOAF_RES.php
    -
    -
    - TITLE -
    -
    -
    FOAF::TITLE() in FOAF_C.php
    -
    -
    - TITLE -
    -
    -
    DC::TITLE() in DC_C.php
    -
    -
    - TITLE -
    -
    -
    DC_RES::TITLE() in DC_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF_RES::TOPIC() in FOAF_RES.php
    -
    -
    - TOPIC -
    -
    -
    FOAF::TOPIC() in FOAF_C.php
    -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TOPIC_INTEREST -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TRANSITIVE_PROPERTY -
    -
    - -
    -
    - TYPE -
    -
    -
    ATOM::TYPE() in ATOM_C.php
    -
    -
    - TYPE -
    -
    -
    DC_RES::TYPE() in DC_RES.php
    -
    -
    - TYPE -
    -
    -
    DC::TYPE() in DC_C.php
    -
    -
    - TYPE -
    -
    -
    RDF::TYPE() in RDF_C.php
    -
    -
    - TYPE -
    -
    -
    ATOM_RES::TYPE() in ATOM_RES.php
    -
    -
    - TYPE -
    -
    -
    RDF_RES::TYPE() in RDF_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD_RES::TZ() in VCARD_RES.php
    -
    -
    - TZ -
    -
    -
    VCARD::TZ() in VCARD_C.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD_RES::TZTYPES() in VCARD_RES.php
    -
    -
    - TZTYPES -
    -
    -
    VCARD::TZTYPES() in VCARD_C.php
    -
    -
    - -
    -
    u
    - -
    -
    -
    -
    - UDC -
    -
    -
    DC_RES::UDC() in DC_RES.php
    -
    -
    - UDC -
    -
    -
    DC::UDC() in DC_C.php
    -
    -
    - UID -
    -
    -
    VCARD_RES::UID() in VCARD_RES.php
    -
    -
    - UID -
    -
    -
    VCARD::UID() in VCARD_C.php
    -
    -
    - UNION_OF -
    -
    -
    OWL_RES::UNION_OF() in OWL_RES.php
    -
    -
    - UNION_OF -
    -
    -
    OWL::UNION_OF() in OWL_C.php
    -
    -
    - URI -
    -
    -
    DC_RES::URI() in DC_RES.php
    -
    -
    - URI -
    -
    -
    DC::URI() in DC_C.php
    -
    -
    - URL -
    -
    -
    ATOM_RES::URL() in ATOM_RES.php
    -
    -
    - URL -
    -
    -
    RSS_RES::URL() in RSS_RES.php
    -
    -
    - URL -
    -
    -
    RSS::URL() in RSS_C.php
    -
    -
    - URL -
    -
    -
    ATOM::URL() in ATOM_C.php
    -
    -
    - -
    -
    v
    - -
    -
    -
    -
    - VALID -
    -
    -
    DC::VALID() in DC_C.php
    -
    -
    - VALID -
    -
    -
    DC_RES::VALID() in DC_RES.php
    -
    -
    - VALUE -
    -
    -
    ATOM_RES::VALUE() in ATOM_RES.php
    -
    -
    - VALUE -
    -
    -
    ATOM::VALUE() in ATOM_C.php
    -
    -
    - VCARD -
    -
    -
    VCARD in VCARD_C.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (Resource)
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD_RES::VCARD_CLASS() in VCARD_RES.php
    -
    -
    - VCARD_CLASS -
    -
    -
    VCARD::VCARD_CLASS() in VCARD_C.php
    -
    -
    - VCARD_RES -
    -
    -
    VCARD_RES in VCARD_RES.php
    -
    vCard profile defined by RFC 2426 - Vocabulary (ResResource)
    -
    -
    - VERSION -
    -
    -
    ATOM_RES::VERSION() in ATOM_RES.php
    -
    -
    - VERSION -
    -
    -
    ATOM::VERSION() in ATOM_C.php
    -
    -
    - VERSION_INFO -
    -
    -
    OWL::VERSION_INFO() in OWL_C.php
    -
    -
    - VERSION_INFO -
    -
    - -
    -
    - VCARD.php -
    -
    -
    VCARD.php in VCARD.php
    -
    -
    - VCARD_C.php -
    -
    -
    VCARD_C.php in VCARD_C.php
    -
    -
    - VCARD_RES.php -
    -
    -
    VCARD_RES.php in VCARD_RES.php
    -
    -
    - Vocabulary.php -
    -
    -
    Vocabulary.php in Vocabulary.php
    -
    -
    - VocabularyClass.php -
    -
    -
    VocabularyClass.php in VocabularyClass.php
    -
    -
    - VocabularyRes.php -
    -
    -
    VocabularyRes.php in VocabularyRes.php
    -
    -
    - -
    -
    w
    - -
    -
    -
    -
    - W3CDTF -
    -
    -
    DC_RES::W3CDTF() in DC_RES.php
    -
    -
    - W3CDTF -
    -
    -
    DC::W3CDTF() in DC_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF::WEBLOG() in FOAF_C.php
    -
    -
    - WEBLOG -
    -
    -
    FOAF_RES::WEBLOG() in FOAF_RES.php
    -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORKPLACE_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - WORK_INFO_HOMEPAGE -
    -
    - -
    -
    - -
    -
    y
    - -
    -
    -
    -
    - YAHOO_CHAT_ID -
    -
    - -
    -
    - YAHOO_CHAT_ID -
    -
    -
    FOAF::YAHOO_CHAT_ID() in FOAF_C.php
    -
    -
    - -
    - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - u - v - w - y -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/errors.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/errors.html deleted file mode 100755 index 6308c61b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/errors.html +++ /dev/null @@ -1,747 +0,0 @@ - - - - - - phpDocumentor Parser Errors and Warnings - - - - - -Post-parsing
    -ATOM_RES.php
    -Blanknode.php
    -ClientQuery.php
    -constants.php
    -Constraint.php
    -Dataset.php
    -DatasetDb.php
    -DatasetMem.php
    -DatasetP.php
    -DBase.php
    -DbModel.php
    -DbStore.php
    -DC.php
    -DC_C.php
    -DC_RES.php
    -Default.php
    -FilterGenerator.php
    -FindIterator.php
    -FOAF_C.php
    -FOAF_RES.php
    -GraphPattern.php
    -GRDDLParser.php
    -HTML.php
    -Individual.php
    -InfModel.php
    -InfModelB.php
    -InfModelF.php
    -InfModelP.php
    -InfRule.php
    -InfStatement.php
    -IteratorAllGraphsDb.php
    -IteratorAllGraphsMem.php
    -IteratorFindQuadsDb.php
    -IteratorFindQuadsMem.php
    -IterFind.php
    -Literal.php
    -magpie_debug.php
    -magpie_simple.php
    -magpie_slashbox.php
    -MemModel.php
    -Model.php
    -ModelComparator.php
    -ModelFactory.php
    -ModelP.php
    -modifier.rss_date_parse.php
    -N3Parser.php
    -N3Serializer.php
    -NamedGraphDb.php
    -NamedGraphMem.php
    -Node.php
    -NTripleSerializer.php
    -Object.php
    -Offsetter.php
    -OntClass.php
    -OntModel.php
    -OntModelP.php
    -OntProperty.php
    -OntResource.php
    -OntVocabulary.php
    -OWLVocabulary.php
    -OWL_C.php
    -OWL_RES.php
    -Preparator.php
    -PreparedStatement.php
    -Quad.php
    -Query.php
    -QueryTriple.php
    -RdfAPI.php
    -RdfParser.php
    -RdfSerializer.php
    -RdfsVocabulary.php
    -RDFS_C.php
    -RDFS_RES.php
    -RdfUtil.php
    -RDF_C.php
    -RDF_RES.php
    -RDQL.php
    -RdqlDbEngine.php
    -RdqlEngine.php
    -RdqlMemEngine.php
    -RdqlParser.php
    -RdqlResultIterator.php
    -ResAlt.php
    -ResBag.php
    -ResContainer.php
    -ResList.php
    -ResLiteral.php
    -ResModel.php
    -ResModelP.php
    -Resource.php
    -ResProperty.php
    -ResSeq.php
    -ResultConverter.php
    -ResultRenderer.php
    -RssParser.php
    -RSS_C.php
    -rss_cache.inc
    -rss_fetch.inc
    -rss_parse.inc
    -RSS_RES.php
    -rss_utils.inc
    -simple_smarty.php
    -Snoopy.class.inc
    -SPARQL.php
    -SparqlClient.php
    -SparqlEngine.php
    -SparqlEngineDb.php
    -SparqlParser.php
    -SparqlParserException.php
    -SparqlResultParser.php
    -SqlGenerator.php
    -SqlGeneratorException.php
    -SqlMerger.php
    -Statement.php
    -StatementIterator.php
    -SyntaxGRDDL.php
    -SyntaxN3.php
    -SyntaxRDF.php
    -SyntaxRSS.php
    -SyntaxSparqlRes.php
    -TriXParser.php
    -TriXSerializer.php
    -TypeSorter.php
    -Utility.php
    -VCARD_C.php
    -VCARD_RES.php
    -Vocabulary.php
    -VocabularyClass.php
    -VocabularyRes.php
    -XML.php
    - -

    Post-parsing

    -

    Warnings:


    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\simple_smarty.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_slashbox.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_simple.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - -duplicate define element "MAGPIE_DIR" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_debug.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning - class SparqlParserException in package sparql parent not found in @see parent::__construct()
    -Warning - class SparqlParserException in package sparql parent not found in @see parent::__construct()
    - -

    ATOM_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ATOM", use another DocBlock to document the file
    - -

    ATOM_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ATOM_RES", use another DocBlock to document the file
    - -

    Blanknode.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "BlankNode", use another DocBlock to document the file
    -Warning on line 22 - Unknown tag "@authors" used
    - -

    ClientQuery.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "ClientQuery", use another DocBlock to document the file
    - -

    constants.php

    -

    Warnings:


    -Warning on line 285 - -duplicate define element "ADODB_DB_DRIVER" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 286 - -duplicate define element "ADODB_DB_HOST" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 287 - -duplicate define element "ADODB_DB_NAME" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 288 - -duplicate define element "ADODB_DB_USER" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 289 - -duplicate define element "ADODB_DB_PASSWORD" in file C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php will be ignored. -Use an @ignore tag on the original if you want this case to be documented.
    -Warning on line 415 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\constants.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Constraint.php

    -

    Warnings:


    -Warning on line 93 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\Constraint.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Dataset.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "Dataset", use another DocBlock to document the file
    - -

    DatasetDb.php

    -

    Warnings:


    -Warning on line 22 - no @package tag was used in a DocBlock for class DatasetDb
    -Warning on line 443 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetDb.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -

    Errors:


    -Error on line 19 - require_once include's DocBlock has @package tag, illegal. ignoring tag "@package dataset"
    - -

    DatasetMem.php

    -

    Warnings:


    -Warning on line 393 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DatasetP.php

    -

    Warnings:


    -Warning on line 24 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\DatasetP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DBase.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DBase.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DbModel.php

    -

    Warnings:


    -Warning on line 1301 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DbModel.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DbStore.php

    -

    Warnings:


    -Warning on line 707 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\DbStore.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DC.php

    -

    Warnings:


    -Warning on line 79 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\vocabulary\DC.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    DC_C.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "DC", use another DocBlock to document the file
    - -

    DC_RES.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "DC_RES", use another DocBlock to document the file
    - -

    Default.php

    -

    Warnings:


    -Warning on line 260 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\Default.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 333 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\Default.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    FilterGenerator.php

    -

    Warnings:


    -Warning on line 10 - DocBlock would be page-level, but precedes class "SparqlEngineDb_FilterGenerator", use another DocBlock to document the file
    -Warning on line 819 - no @package tag was used in a DocBlock for class SparqlEngineDb_FilterGenerator_Value
    - -

    FindIterator.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "FindIterator", use another DocBlock to document the file
    - -

    FOAF_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "FOAF", use another DocBlock to document the file
    - -

    FOAF_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "FOAF_RES", use another DocBlock to document the file
    - -

    GraphPattern.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "GraphPattern", use another DocBlock to document the file
    - -

    GRDDLParser.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "GRDDLParser", use another DocBlock to document the file
    - -

    HTML.php

    -

    Warnings:


    -Warning on line 197 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\HTML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 291 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\HTML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Individual.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "Individual", use another DocBlock to document the file
    - -

    InfModel.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "InfModel", use another DocBlock to document the file
    - -

    InfModelB.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "InfModelB", use another DocBlock to document the file
    - -

    InfModelF.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "InfModelF", use another DocBlock to document the file
    - -

    InfModelP.php

    -

    Warnings:


    -Warning on line 18 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\infModel\InfModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    InfRule.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "InfRule", use another DocBlock to document the file
    - -

    InfStatement.php

    -

    Warnings:


    -Warning on line 13 - DocBlock would be page-level, but precedes class "InfStatement", use another DocBlock to document the file
    - -

    IteratorAllGraphsDb.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "IteratorAllGraphsDb", use another DocBlock to document the file
    - -

    IteratorAllGraphsMem.php

    -

    Warnings:


    -Warning on line 23 - DocBlock would be page-level, but precedes class "IteratorAllGraphsMem", use another DocBlock to document the file
    - -

    IteratorFindQuadsDb.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "IteratorFindQuadsDb", use another DocBlock to document the file
    - -

    IteratorFindQuadsMem.php

    -

    Warnings:


    -Warning on line 216 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\IteratorFindQuadsMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    IterFind.php

    -

    Warnings:


    -Warning on line 24 - DocBlock would be page-level, but precedes class "IterFind", use another DocBlock to document the file
    - -

    Literal.php

    -

    Warnings:


    -Warning on line 171 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Literal.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_debug.php

    -

    Warnings:


    -Warning on line 79 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_debug.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_simple.php

    -

    Warnings:


    -Warning on line 28 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_simple.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    magpie_slashbox.php

    -

    Warnings:


    -Warning on line 65 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\magpie_slashbox.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    MemModel.php

    -

    Warnings:


    -Warning on line 1459 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\MemModel.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Model.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "Model", use another DocBlock to document the file
    - -

    ModelComparator.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "ModelComparator", use another DocBlock to document the file
    - -

    ModelFactory.php

    -

    Warnings:


    -Warning on line 287 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\ModelFactory.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ModelP.php

    -

    Warnings:


    -Warning on line 26 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\ModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    modifier.rss_date_parse.php

    -

    Warnings:


    -Warning on line 30 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\smarty_plugin\modifier.rss_date_parse.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    N3Parser.php

    -

    Warnings:


    -Warning on line 645 - Unknown tag "@acces" used
    -Warning on line 1056 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\N3Parser.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    N3Serializer.php

    -

    Warnings:


    -Warning on line 31 - Page-level DocBlock precedes "define MAGIC_STRING", use another DocBlock to document the source element
    -Warning on line 33 - no @package tag was used in a DocBlock for class N3Serializer
    - -

    NamedGraphDb.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "NamedGraphDb", use another DocBlock to document the file
    - -

    NamedGraphMem.php

    -

    Warnings:


    -Warning on line 65 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\dataset\NamedGraphMem.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Node.php

    -

    Warnings:


    -Warning on line 24 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Node.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    NTripleSerializer.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "NTripleSerializer", use another DocBlock to document the file
    -

    Errors:


    -Error on line 98 - DocBlock has multiple @access tags, illegal. ignoring additional tag "@access public"
    - -

    Object.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "Object", use another DocBlock to document the file
    - -

    Offsetter.php

    -

    Warnings:


    -Warning on line 100 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\Offsetter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    OntClass.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "OntClass", use another DocBlock to document the file
    - -

    OntModel.php

    -

    Warnings:


    -Warning on line 32 - DocBlock would be page-level, but precedes class "OntModel", use another DocBlock to document the file
    - -

    OntModelP.php

    -

    Warnings:


    -Warning on line 14 - Page-level DocBlock precedes "include_once RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL", use another DocBlock to document the source element
    - -

    OntProperty.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "OntProperty", use another DocBlock to document the file
    - -

    OntResource.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "OntResource", use another DocBlock to document the file
    - -

    OntVocabulary.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "OntVocabulary", use another DocBlock to document the file
    - -

    OWLVocabulary.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "OWLVocabulary", use another DocBlock to document the file
    - -

    OWL_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "OWL", use another DocBlock to document the file
    - -

    OWL_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "OWL_RES", use another DocBlock to document the file
    - -

    Preparator.php

    -

    Warnings:


    -Warning on line 227 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\Preparator.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    PreparedStatement.php

    -

    Warnings:


    -Warning on line 8 - DocBlock would be page-level, but precedes class "SparqlEngine_PreparedStatement", use another DocBlock to document the file
    -Warning on line 36 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\PreparedStatement.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Quad.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "Quad", use another DocBlock to document the file
    - -

    Query.php

    -

    Warnings:


    -Warning on line 32 - example file "array(8) { - ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#" - ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#" - }" does not exist
    -Warning on line 516 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\Query.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    QueryTriple.php

    -

    Warnings:


    -Warning on line 95 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\QueryTriple.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdfAPI.php

    -

    Warnings:


    -Warning on line 18 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\RdfAPI.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdfParser.php

    -

    Warnings:


    -Warning on line 27 - DocBlock would be page-level, but precedes class "RdfParser", use another DocBlock to document the file
    - -

    RdfSerializer.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RdfSerializer", use another DocBlock to document the file
    - -

    RdfsVocabulary.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "RdfsVocabulary", use another DocBlock to document the file
    - -

    RDFS_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDFS", use another DocBlock to document the file
    - -

    RDFS_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDFS_RES", use another DocBlock to document the file
    - -

    RdfUtil.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "RDFUtil", use another DocBlock to document the file
    - -

    RDF_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDF", use another DocBlock to document the file
    - -

    RDF_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RDF_RES", use another DocBlock to document the file
    - -

    RDQL.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\rdql\RDQL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RdqlDbEngine.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RdqlDbEngine", use another DocBlock to document the file
    - -

    RdqlEngine.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "RdqlEngine", use another DocBlock to document the file
    - -

    RdqlMemEngine.php

    -

    Warnings:


    -Warning on line 21 - DocBlock would be page-level, but precedes class "RdqlMemEngine", use another DocBlock to document the file
    - -

    RdqlParser.php

    -

    Warnings:


    -Warning on line 20 - DocBlock would be page-level, but precedes class "RdqlParser", use another DocBlock to document the file
    - -

    RdqlResultIterator.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "RdqlResultIterator", use another DocBlock to document the file
    - -

    ResAlt.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResAlt", use another DocBlock to document the file
    - -

    ResBag.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResBag", use another DocBlock to document the file
    - -

    ResContainer.php

    -

    Warnings:


    -Warning on line 18 - DocBlock would be page-level, but precedes class "ResContainer", use another DocBlock to document the file
    - -

    ResList.php

    -

    Warnings:


    -Warning on line 28 - DocBlock would be page-level, but precedes class "ResList", use another DocBlock to document the file
    - -

    ResLiteral.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "ResLiteral", use another DocBlock to document the file
    - -

    ResModel.php

    -

    Warnings:


    -Warning on line 26 - DocBlock would be page-level, but precedes class "ResModel", use another DocBlock to document the file
    - -

    ResModelP.php

    -

    Warnings:


    -Warning on line 23 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\resModel\ResModelP.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Resource.php

    -

    Warnings:


    -Warning on line 130 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\model\Resource.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ResProperty.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "ResProperty", use another DocBlock to document the file
    - -

    ResSeq.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "ResSeq", use another DocBlock to document the file
    - -

    ResultConverter.php

    -

    Warnings:


    -Warning on line 113 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultConverter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 113 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultConverter.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    ResultRenderer.php

    -

    Warnings:


    -Warning on line 13 - DocBlock would be page-level, but precedes class "SparqlEngineDb_ResultRenderer", use another DocBlock to document the file
    -Warning on line 13 - DocBlock would be page-level, but precedes class "SparqlEngine_ResultRenderer", use another DocBlock to document the file
    - -

    RssParser.php

    -

    Warnings:


    -Warning on line 22 - DocBlock would be page-level, but precedes class "RssParser", use another DocBlock to document the file
    - -

    RSS_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RSS", use another DocBlock to document the file
    - -

    rss_cache.inc

    -

    Warnings:


    -Warning on line 18 - no @package tag was used in a DocBlock for class RSSCache
    -Warning on line 199 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_cache.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    rss_fetch.inc

    -

    Warnings:


    -Warning on line 457 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_fetch.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    rss_parse.inc

    -

    Warnings:


    -Warning on line 33 - no @package tag was used in a DocBlock for class MagpieRSS
    -Warning on line 604 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_parse.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    RSS_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "RSS_RES", use another DocBlock to document the file
    - -

    rss_utils.inc

    -

    Warnings:


    -Warning on line 66 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\rss_utils.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    simple_smarty.php

    -

    Warnings:


    -Warning on line 57 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\scripts\simple_smarty.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    Snoopy.class.inc

    -

    Warnings:


    -Warning on line 38 - no @package tag was used in a DocBlock for class Snoopy
    -Warning on line 899 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\magpie\extlib\Snoopy.class.inc" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SPARQL.php

    -

    Warnings:


    -Warning on line 19 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SPARQL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlClient.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "SparqlClient", use another DocBlock to document the file
    - -

    SparqlEngine.php

    -

    Warnings:


    -Warning on line 1167 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlEngineDb.php

    -

    Warnings:


    -Warning on line 348 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlParser.php

    -

    Warnings:


    -Warning on line 1420 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlParser.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SparqlParserException.php

    -

    Warnings:


    -Warning on line 12 - DocBlock would be page-level, but precedes class "SparqlParserException", use another DocBlock to document the file
    - -

    SparqlResultParser.php

    -

    Warnings:


    -Warning on line 14 - DocBlock would be page-level, but precedes class "SparqlResultParser", use another DocBlock to document the file
    - -

    SqlGenerator.php

    -

    Warnings:


    -Warning on line 36 - example file " table t2." does not exist
    -Warning on line 50 - example file "array( - '?person' => 't0.subject' - )" does not exist
    -Warning on line 71 - example file "array( - 0 => array( - '?person' => 's', - '?p' => 'o' - ), - 1 => array( - '?person' => 's', - '?mbox' => 'o' - ) - )" does not exist
    -Warning on line 90 - example file "array( - '?person' => array( - 's' => true - ), - '?mbox' => array( - 'o' => true - ) - )" does not exist
    -Warning on line 893 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\SqlGenerator.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SqlGeneratorException.php

    -

    Warnings:


    -Warning on line 9 - DocBlock would be page-level, but precedes class "SparqlEngineDb_SqlGeneratorException", use another DocBlock to document the file
    - -

    SqlMerger.php

    -

    Warnings:


    -Warning on line 10 - DocBlock would be page-level, but precedes class "SparqlEngineDb_SqlMerger", use another DocBlock to document the file
    - -

    Statement.php

    -

    Warnings:


    -Warning on line 16 - DocBlock would be page-level, but precedes class "Statement", use another DocBlock to document the file
    - -

    StatementIterator.php

    -

    Warnings:


    -Warning on line 19 - DocBlock would be page-level, but precedes class "StatementIterator", use another DocBlock to document the file
    - -

    SyntaxGRDDL.php

    -

    Warnings:


    -Warning on line 15 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxGRDDL.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxN3.php

    -

    Warnings:


    -Warning on line 17 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxN3.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxRDF.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxRDF.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxRSS.php

    -

    Warnings:


    -Warning on line 16 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxRSS.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    SyntaxSparqlRes.php

    -

    Warnings:


    -Warning on line 14 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\syntax\SyntaxSparqlRes.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    TriXParser.php

    -

    Warnings:


    -Warning on line 17 - DocBlock would be page-level, but precedes class "TriXParser", use another DocBlock to document the file
    - -

    TriXSerializer.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "TriXSerializer", use another DocBlock to document the file
    - -

    TypeSorter.php

    -

    Warnings:


    -Warning on line 9 - DocBlock would be page-level, but precedes class "SparqlEngineDb_TypeSorter", use another DocBlock to document the file
    - -

    Utility.php

    -

    Warnings:


    -Warning on line 19 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\util\Utility.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    - -

    VCARD_C.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "VCARD", use another DocBlock to document the file
    - -

    VCARD_RES.php

    -

    Warnings:


    -Warning on line 15 - DocBlock would be page-level, but precedes class "VCARD_RES", use another DocBlock to document the file
    - -

    Vocabulary.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "require_once RDFAPI_INCLUDE_DIR.'vocabulary/RDF.php'", use another DocBlock to document the source element
    - -

    VocabularyClass.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "require_once RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_C.php'", use another DocBlock to document the source element
    - -

    VocabularyRes.php

    -

    Warnings:


    -Warning on line 11 - Page-level DocBlock precedes "include_once RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL)", use another DocBlock to document the source element
    - -

    XML.php

    -

    Warnings:


    -Warning on line 123 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngine\ResultRenderer\XML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -Warning on line 321 - File "C:\RAP release\RAP 0.95 - new release\rdfapi-php\api\sparql\SparqlEngineDb\ResultRenderer\XML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
    -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/index.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/index.html deleted file mode 100755 index 164e60d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - RAP - Rdf API for PHP - - - - - - - - - - - <H2>Frame Alert</H2> - <P>This document is designed to be viewed using the frames feature. - If you see this message, you are using a non-frame-capable web client.</P> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/all-wcprops deleted file mode 100755 index fd8b3e69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/all-wcprops +++ /dev/null @@ -1,65 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel -END -InfModel.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/InfModel.html -END -_infModel---InfModelF.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/_infModel---InfModelF.php.html -END -_infModel---InfRule.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/_infModel---InfRule.php.html -END -InfModelB.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/InfModelB.html -END -InfStatement.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/InfStatement.html -END -InfModelF.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/InfModelF.html -END -InfRule.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/InfRule.html -END -_infModel---InfModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/_infModel---InfModel.php.html -END -_infModel---InfModelB.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/_infModel---InfModelB.php.html -END -_infModel---InfStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/infModel/_infModel---InfStatement.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/entries deleted file mode 100755 index b3fb45f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/entries +++ /dev/null @@ -1,158 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/infModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -InfModel.html -file - - - - -2008-02-29T14:57:32.182448Z -9768636dfd0af0730ea9446be35171e4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_infModel---InfModelF.php.html -file - - - - -2008-02-29T14:57:32.198068Z -df166b61b9c3dfe8a2dc62235988e616 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_infModel---InfRule.php.html -file - - - - -2008-02-29T14:57:32.198068Z -3b67dd16d27c0abb717b814dd6bc21ef -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -InfModelB.html -file - - - - -2008-02-29T14:57:32.213689Z -32cce6d9025609d57957c73bfd9fd162 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -InfStatement.html -file - - - - -2008-02-29T14:57:32.213689Z -57260358724fc2f7aa274286ebeba763 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -InfModelF.html -file - - - - -2008-02-29T14:57:32.229310Z -d095a87948e66ae96d0f0f9705e35e34 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -InfRule.html -file - - - - -2008-02-29T14:57:32.229310Z -418a9cb6a32ccc1c029312b88aab5771 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_infModel---InfModel.php.html -file - - - - -2008-02-29T14:57:32.244930Z -f0e93ece9fce0c1efcf2e0498e601cde -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_infModel---InfModelB.php.html -file - - - - -2008-02-29T14:57:32.244930Z -54762c4ecaae46476cae928bdb4a8f72 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_infModel---InfStatement.php.html -file - - - - -2008-02-29T14:57:32.260551Z -5099f9a19a07abe602dfdd4bd56d48e4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelB.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelB.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelB.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelF.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfModelF.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfRule.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfRule.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfRule.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfStatement.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/InfStatement.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelB.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelB.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelB.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfModelF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfRule.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfRule.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfRule.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/prop-base/_infModel---InfStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModel.html.svn-base deleted file mode 100755 index 29b97ee5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModel.html.svn-base +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - Docs For Class InfModel - - - - -
    -

    Class InfModel

    - - -
    -
    Description
    - -
    - -

    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.

    -

    It uses the same interface as MemModel, thus making the infererence process hidden.

    - -

    - Located in /infModel/InfModel.php (line 19) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    InfModelB - A InfModelB extends the InfModel Class, with a backward chaining algorithm. -
    InfModelF - A InfModelF extends the InfModel Class, with a forward chaining algorithm. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModel - InfModel - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - object Model - getSchema - () -
    - -
    - void - replace - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModel (line 78) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - InfModel - - InfModel - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 172) -
    - - -

    Adds a new triple to the Model without checking if the statement is already in the Model.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) If the statement's predicate label is supported by the inference, the matching rules are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::add()
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::add() - : Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) -
    • -
    • - InfModelF::add() - : Adds a new triple to the MemModel without checking if the statement is already in the MemModel. -
    • -
    -
    - -
    - -
    - findRegex (line 446) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Returns an empty MemModel if nothing is found.

    This function is disabled in the Inference Model

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findRegex()
    -
    Method to search for triples using Perl-style regular expressions.
    -
    - -
    - -
    - -
    - findVocabulary (line 468) -
    - - -

    Returns all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Returns an empty MemModel if nothing is found.

    This function is disabled in the Inference Model.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findVocabulary()
    -
    Returns all tripels of a certain vocabulary.
    -
    - -
    - -
    - -
    - getSchema (line 400) -
    - - -

    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.

    -
      -
    • access: public
    • -
    - -
    - object Model - - getSchema - - () -
    - - - -
    - -
    - -
    - replace (line 423) -
    - - -

    General method to replace nodes of a MemModel.

    -

    This function is disabled in the Inference Model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - object Node - $replacement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::replace()
    -
    General method to replace nodes of a MemModel.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelB.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelB.html.svn-base deleted file mode 100755 index 3e659238..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelB.html.svn-base +++ /dev/null @@ -1,867 +0,0 @@ - - - - - - Docs For Class InfModelB - - - - -
    -

    Class InfModelB

    - - -
    -
    Description
    - -
    - -

    A InfModelB extends the InfModel Class, with a backward chaining algorithm.

    -

    Only the loaded or added base-triples are stored. A find-query evaluates the inference rules and recursively tries to find the statements. InfModelB memorises "Dead-Ends" until the next add() command, thus makin a second find much faster. InfModelB is safe for loops in Ontologies, that would cause infinite loops. WARNING: A find(null,null,null) might take very long.

    - -

    - Located in /infModel/InfModelB.php (line 23) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    -            |
    -            --InfModelB
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModelB - InfModelB - ([string $baseURI = null]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - object MemModel - find - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object FindIterator - &findAsIterator - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - object MemModel - &getBaseMemModel - () -
    - -
    - object MemModel - &getMemModel - () -
    - -
    - object StatementIterator - &getStatementIterator - () -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - integer - size - (boolean 0) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModelB (line 43) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - InfModelB - - InfModelB - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 58) -
    - - -

    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    InfModel::add()
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    - -
    - -
    - -
    - contains (line 230) -
    - - -

    Tests if the Model contains the given triple.

    -

    TRUE if the triple belongs to the Model; FALSE otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::contains()
    -
    Tests if the MemModel contains the given triple.
    -
    - -
    - -
    - -
    - find (line 84) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object. Returns an empty MemModel if nothing is found. To improve the search speed with big Models, call index(INDEX_TYPE) before seaching.

    It recursively searches in the statements and rules to find matching statements.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::find()
    -
    General method to search for triples.
    -
    - -
    - -
    - -
    - findAsIterator (line 508) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -

    Disabled in InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &findAsIterator - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findAsIterator()
    -
    Returns a FindIterator for traversing the MemModel.
    -
    - -
    - -
    - -
    - findFirstMatchingStatement (line 265) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement of the MemModel where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search for. Default = 0

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - integer - $offset
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findFirstMatchingStatement()
    -
    Searches for triples and returns the first matching statement.
    -
    - -
    - -
    - -
    - getBaseMemModel (line 336) -
    - - -

    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getBaseMemModel - - () -
    - - - -
    - -
    - -
    - getMemModel (line 320) -
    - - -

    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - getStatementIterator (line 286) -
    - - -

    Returns a StatementIterator for traversing the Model.

    -
      -
    • access: public
    • -
    - -
    - object StatementIterator - - &getStatementIterator - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::getStatementIterator()
    -
    Returns a StatementIterator for traversing the MemModel.
    -
    - -
    - -
    - -
    - remove (line 457) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    Checks, if it touches any statements, that added inference rules to the model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::remove()
    -
    Removes the triple from the MemModel.
    -
    - -
    - -
    - -
    - saveAs (line 390) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the InfModelB couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::saveAs()
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    - -
    - -
    - -
    - size (line 304) -
    - - -

    Number of all inferable triples in the Model.

    -

    WARNING: uses a find(null,null,null) to find all statements! (might take a while)

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - (boolean 0) -
    - -
      -
    • - boolean - 0
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::size()
    -
    Number of triples in the MemModel
    -
    - -
    - -
    - -
    - toString (line 353) -
    - - -

    Short Dump of the InfModelB.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toString()
    -
    Short Dump of the MemModel.
    -
    - -
    - -
    - -
    - toStringIncludingTriples (line 364) -
    - - -

    Dumps of the InfModelB including ALL inferable triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toStringIncludingTriples()
    -
    Dumps of the MemModel including all triples.
    -
    - -
    - -
    - -
    - writeAsHtml (line 403) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeAsHtml()
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    - -
    - -
    - -
    - writeAsHtmlTable (line 420) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeAsHtmlTable()
    -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    - -
    - -
    - -
    - writeRdfToString (line 435) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeRdfToString()
    -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From InfModel

    -
    - InfModel::InfModel()
    - InfModel::add()
    - InfModel::findRegex()
    - InfModel::findVocabulary()
    - InfModel::getSchema()
    - InfModel::replace()
    -
    - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:27 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelF.html.svn-base deleted file mode 100755 index bfcab91d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfModelF.html.svn-base +++ /dev/null @@ -1,616 +0,0 @@ - - - - - - Docs For Class InfModelF - - - - -
    -

    Class InfModelF

    - - -
    -
    Description
    - -
    - -

    A InfModelF extends the InfModel Class, with a forward chaining algorithm.

    -

    If a new statement is added, it is enferd at once and all the entailed statements are added too. When adding or removing a statement, that produced a new inference rule, all entailed statements are discarded and the whole base model is infered again. The InfModelF is safe for loops in Ontologies, that would cause infinite loops.

    - -

    - Located in /infModel/InfModelF.php (line 23) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    -            |
    -            --InfModelF
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModelF - InfModelF - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - boolean - addWithoutDuplicates - ( &$statement, object Statement $statement) -
    - -
    - array - entailStatement - ( &$statement, object Statement $statement) -
    - -
    - object MemModel - getBaseMemModel - () -
    - -
    - object MemModel - &getMemModel - () -
    - -
    - void - load - (string $filename, [string $type = NULL]) -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeInfered - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModelF (line 52) -
    - - -

    Constructor You can supply a base_uri.

    -
      -
    • access: public
    • -
    - -
    - InfModelF - - InfModelF - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 70) -
    - - -

    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) The statement is infered and all entailed statements are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    InfModel::add()
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    - -
    - -
    - -
    - addModel (line 395) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::addModel()
    -
    Adds another model to this MemModel.
    -
    - -
    - -
    - -
    - addWithoutDuplicates (line 107) -
    - - -

    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise. The statement is infered and all entailed statements are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::addWithoutDuplicates()
    -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    - -
    - -
    - -
    - entailStatement (line 168) -
    - - -

    Entails a statement by recursively using the _entailStatementRec method.

    -
      -
    • return: of statements
    • -
    • access: public
    • -
    - -
    - array - - entailStatement - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - - -
    - -
    - -
    - getBaseMemModel (line 305) -
    - - -

    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - getBaseMemModel - - () -
    - - - -
    - -
    - -
    - getMemModel (line 287) -
    - - -

    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - load (line 258) -
    - - -

    Load a model from a file containing RDF, N3 or N-Triples.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    While loading the model, the inference entailing is disabled, but new inference rules are added to increase performance.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - -
    -
    Redefinition of:
    -
    -
    Model::load()
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    - -
    - -
    - -
    - remove (line 330) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    Checks, if it touches any statements, that added inference rules to the model

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::remove()
    -
    Removes the triple from the MemModel.
    -
    - -
    - -
    - -
    - removeInfered (line 230) -
    - - -

    Removes all infered statements from the model but keeps the infernece rules.

    -
      -
    • access: public
    • -
    - -
    - void - - removeInfered - - () -
    - - - -
    - -
    - -
    - toString (line 275) -
    - - -

    Short Dump of the InfModelF.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toString()
    -
    Short Dump of the MemModel.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From InfModel

    -
    - InfModel::InfModel()
    - InfModel::add()
    - InfModel::findRegex()
    - InfModel::findVocabulary()
    - InfModel::getSchema()
    - InfModel::replace()
    -
    - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfRule.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfRule.html.svn-base deleted file mode 100755 index aec4e0bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfRule.html.svn-base +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - Docs For Class InfRule - - - - -
    -

    Class InfRule

    - - -
    -
    Description
    - -
    - -

    This class represents a single rule in a RDFS inference model.

    -

    It primary constists of a trigger and an entailment. In the forward-chaining mode (RDFSFModel) a statement is checked, if it satisfies the trigger. If it does, a new statement is returned. In the backward-chaining mode (RDFSBModel) a find-query is checked with the entailment. If this entailment could satify the find-query, a new find-query is returned, that searches for statements that satisfy the trigger of this rule.

    - -

    - Located in /infModel/InfRule.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - boolean - checkEntailment - (object Statement $subject,  $predicate,  $object) -
    - -
    - boolean - checkTrigger - (object Statement &$statement) -
    - -
    - object InfStatement - entail - (object Statement &$statement) -
    - -
    - void - getEntailment - () -
    - -
    - array - getModifiedFind - (Node $subject, Node $predicate, Node $object) -
    - -
    - void - getTrigger - () -
    - -
    - void - infRule - () -
    - -
    - void - setEntailment - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - void - setTrigger - (object Node $subject, object Node $predicate, object Node $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - checkEntailment (line 170) -
    - - -

    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - checkEntailment - - (object Statement $subject,  $predicate,  $object) -
    - -
      -
    • - object Statement - $subject
    • -
    • - - $predicate
    • -
    • - - $object
    • -
    - - -
    - -
    - -
    - checkTrigger (line 140) -
    - - -

    Checks, if the statement satisfies the trigger.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - checkTrigger - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - - -
    - -
    - -
    - entail (line 203) -
    - - -

    Returns a infered InfStatement by evaluating the statement with the entailment rule.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object InfStatement - - entail - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - - -
    - -
    - -
    - getEntailment (line 335) -
    - - - -
    - void - - getEntailment - - () -
    - - - -
    - -
    - -
    - getModifiedFind (line 277) -
    - - -

    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - array - - getModifiedFind - - (Node $subject, Node $predicate, Node $object) -
    - -
      -
    • - Node - $subject: OR null $subject
    • -
    • - Node - $predicate: OR null $predicate
    • -
    • - Node - $object: OR null $object
    • -
    - - -
    - -
    - -
    - getTrigger (line 327) -
    - - - -
    - void - - getTrigger - - () -
    - - - -
    - -
    - -
    - infRule (line 58) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - void - - infRule - - () -
    - - - -
    - -
    - -
    - setEntailment (line 110) -
    - - -

    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - setEntailment - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject: OR NULL $subject
    • -
    • - object Node - $predicate: OR NULL $predicate
    • -
    • - object Node - $object: OR NULL $object
    • -
    - - -
    - -
    - -
    - setTrigger (line 76) -
    - - -

    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - setTrigger - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject: OR NULL $subject
    • -
    • - object Node - $predicate: OR NULL $predicate
    • -
    • - object Node - $object: OR NULL $object
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfStatement.html.svn-base deleted file mode 100755 index 460cac90..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/InfStatement.html.svn-base +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Docs For Class InfStatement - - - - -
    -

    Class InfStatement

    - - -
    -
    Description
    - -
    - -

    An RDF statement which was entailed by a inference rule.

    -

    See Statement Class for further information.

    - -

    - Located in /infModel/InfStatement.php (line 14) -

    - - -
    Object
    -   |
    -   --Statement
    -      |
    -      --InfStatement
    - -
    -
    - - - - - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModel.php.html.svn-base deleted file mode 100755 index 59cdec89..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModel.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModel.php - - - - -
    -

    /infModel/InfModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModel - - A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelB.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelB.php.html.svn-base deleted file mode 100755 index e71f3c0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelB.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModelB.php - - - - -
    -

    /infModel/InfModelB.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModelB - - A InfModelB extends the InfModel Class, with a backward chaining algorithm. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelF.php.html.svn-base deleted file mode 100755 index dec803f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfModelF.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModelF.php - - - - -
    -

    /infModel/InfModelF.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModelF - - A InfModelF extends the InfModel Class, with a forward chaining algorithm. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfRule.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfRule.php.html.svn-base deleted file mode 100755 index e08c7ff6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfRule.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfRule.php - - - - -
    -

    /infModel/InfRule.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfRule - - This class represents a single rule in a RDFS inference model. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfStatement.php.html.svn-base deleted file mode 100755 index d5fbb976..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/.svn/text-base/_infModel---InfStatement.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfStatement.php - - - - -
    -

    /infModel/InfStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfStatement - - An RDF statement which was entailed by a inference rule. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModel.html deleted file mode 100755 index 74d593ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModel.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - Docs For Class InfModel - - - - -
    -

    Class InfModel

    - - -
    -
    Description
    - -
    - -

    A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.

    -

    It uses the same interface as MemModel, thus making the infererence process hidden.

    - -

    - Located in /infModel/InfModel.php (line 19) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    InfModelB - A InfModelB extends the InfModel Class, with a backward chaining algorithm. -
    InfModelF - A InfModelF extends the InfModel Class, with a forward chaining algorithm. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModel - InfModel - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - object Model - getSchema - () -
    - -
    - void - replace - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModel (line 78) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - InfModel - - InfModel - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 172) -
    - - -

    Adds a new triple to the Model without checking if the statement is already in the Model.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) If the statement's predicate label is supported by the inference, the matching rules are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::add()
    -
    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
    -
    - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::add() - : Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) -
    • -
    • - InfModelF::add() - : Adds a new triple to the MemModel without checking if the statement is already in the MemModel. -
    • -
    -
    - -
    - -
    - findRegex (line 446) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Returns an empty MemModel if nothing is found.

    This function is disabled in the Inference Model

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findRegex()
    -
    Method to search for triples using Perl-style regular expressions.
    -
    - -
    - -
    - -
    - findVocabulary (line 468) -
    - - -

    Returns all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Returns an empty MemModel if nothing is found.

    This function is disabled in the Inference Model.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findVocabulary()
    -
    Returns all tripels of a certain vocabulary.
    -
    - -
    - -
    - -
    - getSchema (line 400) -
    - - -

    Returns a model, containing all Statements, having a Predicate, that is supported by the inference.

    -
      -
    • access: public
    • -
    - -
    - object Model - - getSchema - - () -
    - - - -
    - -
    - -
    - replace (line 423) -
    - - -

    General method to replace nodes of a MemModel.

    -

    This function is disabled in the Inference Model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - object Node - $replacement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::replace()
    -
    General method to replace nodes of a MemModel.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelB.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelB.html deleted file mode 100755 index 2062b2a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelB.html +++ /dev/null @@ -1,867 +0,0 @@ - - - - - - Docs For Class InfModelB - - - - -
    -

    Class InfModelB

    - - -
    -
    Description
    - -
    - -

    A InfModelB extends the InfModel Class, with a backward chaining algorithm.

    -

    Only the loaded or added base-triples are stored. A find-query evaluates the inference rules and recursively tries to find the statements. InfModelB memorises "Dead-Ends" until the next add() command, thus makin a second find much faster. InfModelB is safe for loops in Ontologies, that would cause infinite loops. WARNING: A find(null,null,null) might take very long.

    - -

    - Located in /infModel/InfModelB.php (line 23) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    -            |
    -            --InfModelB
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModelB - InfModelB - ([string $baseURI = null]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - object MemModel - find - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object FindIterator - &findAsIterator - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - object MemModel - &getBaseMemModel - () -
    - -
    - object MemModel - &getMemModel - () -
    - -
    - object StatementIterator - &getStatementIterator - () -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - integer - size - (boolean 0) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModelB (line 43) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - InfModelB - - InfModelB - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 58) -
    - - -

    Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    InfModel::add()
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    - -
    - -
    - -
    - contains (line 230) -
    - - -

    Tests if the Model contains the given triple.

    -

    TRUE if the triple belongs to the Model; FALSE otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::contains()
    -
    Tests if the MemModel contains the given triple.
    -
    - -
    - -
    - -
    - find (line 84) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object. Returns an empty MemModel if nothing is found. To improve the search speed with big Models, call index(INDEX_TYPE) before seaching.

    It recursively searches in the statements and rules to find matching statements.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::find()
    -
    General method to search for triples.
    -
    - -
    - -
    - -
    - findAsIterator (line 508) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -

    Disabled in InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &findAsIterator - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findAsIterator()
    -
    Returns a FindIterator for traversing the MemModel.
    -
    - -
    - -
    - -
    - findFirstMatchingStatement (line 265) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement of the MemModel where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search for. Default = 0

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - integer - $offset
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::findFirstMatchingStatement()
    -
    Searches for triples and returns the first matching statement.
    -
    - -
    - -
    - -
    - getBaseMemModel (line 336) -
    - - -

    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getBaseMemModel - - () -
    - - - -
    - -
    - -
    - getMemModel (line 320) -
    - - -

    Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - getStatementIterator (line 286) -
    - - -

    Returns a StatementIterator for traversing the Model.

    -
      -
    • access: public
    • -
    - -
    - object StatementIterator - - &getStatementIterator - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::getStatementIterator()
    -
    Returns a StatementIterator for traversing the MemModel.
    -
    - -
    - -
    - -
    - remove (line 457) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    Checks, if it touches any statements, that added inference rules to the model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::remove()
    -
    Removes the triple from the MemModel.
    -
    - -
    - -
    - -
    - saveAs (line 390) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the InfModelB couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::saveAs()
    -
    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
    -
    - -
    - -
    - -
    - size (line 304) -
    - - -

    Number of all inferable triples in the Model.

    -

    WARNING: uses a find(null,null,null) to find all statements! (might take a while)

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - (boolean 0) -
    - -
      -
    • - boolean - 0
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::size()
    -
    Number of triples in the MemModel
    -
    - -
    - -
    - -
    - toString (line 353) -
    - - -

    Short Dump of the InfModelB.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toString()
    -
    Short Dump of the MemModel.
    -
    - -
    - -
    - -
    - toStringIncludingTriples (line 364) -
    - - -

    Dumps of the InfModelB including ALL inferable triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toStringIncludingTriples()
    -
    Dumps of the MemModel including all triples.
    -
    - -
    - -
    - -
    - writeAsHtml (line 403) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeAsHtml()
    -
    Writes the RDF serialization of the MemModel as HTML.
    -
    - -
    - -
    - -
    - writeAsHtmlTable (line 420) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeAsHtmlTable()
    -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    - -
    - -
    - -
    - writeRdfToString (line 435) -
    - - -

    Writes the RDF serialization of the Model including ALL inferable triples.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::writeRdfToString()
    -
    Writes the RDF serialization of the MemModel as HTML table.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From InfModel

    -
    - InfModel::InfModel()
    - InfModel::add()
    - InfModel::findRegex()
    - InfModel::findVocabulary()
    - InfModel::getSchema()
    - InfModel::replace()
    -
    - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:27 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelF.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelF.html deleted file mode 100755 index ee623681..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfModelF.html +++ /dev/null @@ -1,616 +0,0 @@ - - - - - - Docs For Class InfModelF - - - - -
    -

    Class InfModelF

    - - -
    -
    Description
    - -
    - -

    A InfModelF extends the InfModel Class, with a forward chaining algorithm.

    -

    If a new statement is added, it is enferd at once and all the entailed statements are added too. When adding or removing a statement, that produced a new inference rule, all entailed statements are discarded and the whole base model is infered again. The InfModelF is safe for loops in Ontologies, that would cause infinite loops.

    - -

    - Located in /infModel/InfModelF.php (line 23) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    -         |
    -         --InfModel
    -            |
    -            --InfModelF
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - InfModelF - InfModelF - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - boolean - addWithoutDuplicates - ( &$statement, object Statement $statement) -
    - -
    - array - entailStatement - ( &$statement, object Statement $statement) -
    - -
    - object MemModel - getBaseMemModel - () -
    - -
    - object MemModel - &getMemModel - () -
    - -
    - void - load - (string $filename, [string $type = NULL]) -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeInfered - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor InfModelF (line 52) -
    - - -

    Constructor You can supply a base_uri.

    -
      -
    • access: public
    • -
    - -
    - InfModelF - - InfModelF - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 70) -
    - - -

    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) The statement is infered and all entailed statements are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    InfModel::add()
    -
    Adds a new triple to the Model without checking if the statement is already in the Model.
    -
    - -
    - -
    - -
    - addModel (line 395) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::addModel()
    -
    Adds another model to this MemModel.
    -
    - -
    - -
    - -
    - addWithoutDuplicates (line 107) -
    - - -

    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise. The statement is infered and all entailed statements are added.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::addWithoutDuplicates()
    -
    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
    -
    - -
    - -
    - -
    - entailStatement (line 168) -
    - - -

    Entails a statement by recursively using the _entailStatementRec method.

    -
      -
    • return: of statements
    • -
    • access: public
    • -
    - -
    - array - - entailStatement - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - - -
    - -
    - -
    - getBaseMemModel (line 305) -
    - - -

    Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - getBaseMemModel - - () -
    - - - -
    - -
    - -
    - getMemModel (line 287) -
    - - -

    Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - load (line 258) -
    - - -

    Load a model from a file containing RDF, N3 or N-Triples.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    While loading the model, the inference entailing is disabled, but new inference rules are added to increase performance.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - -
    -
    Redefinition of:
    -
    -
    Model::load()
    -
    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
    -
    - -
    - -
    - -
    - remove (line 330) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    Checks, if it touches any statements, that added inference rules to the model

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - -
    -
    Redefinition of:
    -
    -
    MemModel::remove()
    -
    Removes the triple from the MemModel.
    -
    - -
    - -
    - -
    - removeInfered (line 230) -
    - - -

    Removes all infered statements from the model but keeps the infernece rules.

    -
      -
    • access: public
    • -
    - -
    - void - - removeInfered - - () -
    - - - -
    - -
    - -
    - toString (line 275) -
    - - -

    Short Dump of the InfModelF.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    MemModel::toString()
    -
    Short Dump of the MemModel.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From InfModel

    -
    - InfModel::InfModel()
    - InfModel::add()
    - InfModel::findRegex()
    - InfModel::findVocabulary()
    - InfModel::getSchema()
    - InfModel::replace()
    -
    - -

    Inherited From MemModel

    -
    - MemModel::MemModel()
    - MemModel::add()
    - MemModel::addModel()
    - MemModel::addNamespace()
    - MemModel::addParsedNamespaces()
    - MemModel::addWithoutDuplicates()
    - MemModel::close()
    - MemModel::contains()
    - MemModel::containsAll()
    - MemModel::containsAny()
    - MemModel::equals()
    - MemModel::find()
    - MemModel::findAsIterator()
    - MemModel::findCount()
    - MemModel::findFirstMatchingStatement()
    - MemModel::findRegex()
    - MemModel::findVocabulary()
    - MemModel::getIndexType()
    - MemModel::getParsedNamespaces()
    - MemModel::getStatementIterator()
    - MemModel::index()
    - MemModel::intersect()
    - MemModel::isEmpty()
    - MemModel::isIndexed()
    - MemModel::iterFind()
    - MemModel::rdqlQuery()
    - MemModel::rdqlQueryAsIterator()
    - MemModel::reify()
    - MemModel::remove()
    - MemModel::removeNamespace()
    - MemModel::replace()
    - MemModel::saveAs()
    - MemModel::setBaseURI()
    - MemModel::size()
    - MemModel::subtract()
    - MemModel::toString()
    - MemModel::toStringIncludingTriples()
    - MemModel::unite()
    - MemModel::writeAsHtml()
    - MemModel::writeAsHtmlTable()
    - MemModel::writeRdfToString()
    -
    - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfRule.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfRule.html deleted file mode 100755 index b28ddbbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfRule.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - Docs For Class InfRule - - - - -
    -

    Class InfRule

    - - -
    -
    Description
    - -
    - -

    This class represents a single rule in a RDFS inference model.

    -

    It primary constists of a trigger and an entailment. In the forward-chaining mode (RDFSFModel) a statement is checked, if it satisfies the trigger. If it does, a new statement is returned. In the backward-chaining mode (RDFSBModel) a find-query is checked with the entailment. If this entailment could satify the find-query, a new find-query is returned, that searches for statements that satisfy the trigger of this rule.

    - -

    - Located in /infModel/InfRule.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - boolean - checkEntailment - (object Statement $subject,  $predicate,  $object) -
    - -
    - boolean - checkTrigger - (object Statement &$statement) -
    - -
    - object InfStatement - entail - (object Statement &$statement) -
    - -
    - void - getEntailment - () -
    - -
    - array - getModifiedFind - (Node $subject, Node $predicate, Node $object) -
    - -
    - void - getTrigger - () -
    - -
    - void - infRule - () -
    - -
    - void - setEntailment - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - void - setTrigger - (object Node $subject, object Node $predicate, object Node $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - checkEntailment (line 170) -
    - - -

    Checks, if this rule could entail a statement that matches a find of $subject,$predicate,$object.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - checkEntailment - - (object Statement $subject,  $predicate,  $object) -
    - -
      -
    • - object Statement - $subject
    • -
    • - - $predicate
    • -
    • - - $object
    • -
    - - -
    - -
    - -
    - checkTrigger (line 140) -
    - - -

    Checks, if the statement satisfies the trigger.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - checkTrigger - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - - -
    - -
    - -
    - entail (line 203) -
    - - -

    Returns a infered InfStatement by evaluating the statement with the entailment rule.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object InfStatement - - entail - - (object Statement &$statement) -
    - -
      -
    • - object Statement - &$statement
    • -
    - - -
    - -
    - -
    - getEntailment (line 335) -
    - - - -
    - void - - getEntailment - - () -
    - - - -
    - -
    - -
    - getModifiedFind (line 277) -
    - - -

    Returns a find-query that matches statements, whose entailed statements would match the supplied find query.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - array - - getModifiedFind - - (Node $subject, Node $predicate, Node $object) -
    - -
      -
    • - Node - $subject: OR null $subject
    • -
    • - Node - $predicate: OR null $predicate
    • -
    • - Node - $object: OR null $object
    • -
    - - -
    - -
    - -
    - getTrigger (line 327) -
    - - - -
    - void - - getTrigger - - () -
    - - - -
    - -
    - -
    - infRule (line 58) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - void - - infRule - - () -
    - - - -
    - -
    - -
    - setEntailment (line 110) -
    - - -

    Sets the entailment of this rule The values can be NULL to match anything or be a node that has to be matched.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - setEntailment - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject: OR NULL $subject
    • -
    • - object Node - $predicate: OR NULL $predicate
    • -
    • - object Node - $object: OR NULL $object
    • -
    - - -
    - -
    - -
    - setTrigger (line 76) -
    - - -

    Sets the trigger of this rule The values can be NULL to match anything or be a node that has to be matched.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - setTrigger - - (object Node $subject, object Node $predicate, object Node $object) -
    - -
      -
    • - object Node - $subject: OR NULL $subject
    • -
    • - object Node - $predicate: OR NULL $predicate
    • -
    • - object Node - $object: OR NULL $object
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfStatement.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfStatement.html deleted file mode 100755 index debda035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/InfStatement.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Docs For Class InfStatement - - - - -
    -

    Class InfStatement

    - - -
    -
    Description
    - -
    - -

    An RDF statement which was entailed by a inference rule.

    -

    See Statement Class for further information.

    - -

    - Located in /infModel/InfStatement.php (line 14) -

    - - -
    Object
    -   |
    -   --Statement
    -      |
    -      --InfStatement
    - -
    -
    - - - - - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModel.php.html deleted file mode 100755 index bb888eda..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModel.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModel.php - - - - -
    -

    /infModel/InfModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModel - - A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelB.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelB.php.html deleted file mode 100755 index 9d998d64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelB.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModelB.php - - - - -
    -

    /infModel/InfModelB.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModelB - - A InfModelB extends the InfModel Class, with a backward chaining algorithm. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelF.php.html deleted file mode 100755 index 3fdd91fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfModelF.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfModelF.php - - - - -
    -

    /infModel/InfModelF.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfModelF - - A InfModelF extends the InfModel Class, with a forward chaining algorithm. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfRule.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfRule.php.html deleted file mode 100755 index 7a9b4806..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfRule.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfRule.php - - - - -
    -

    /infModel/InfRule.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfRule - - This class represents a single rule in a RDFS inference model. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfStatement.php.html deleted file mode 100755 index 175ee5bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/infModel/_infModel---InfStatement.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page InfStatement.php - - - - -
    -

    /infModel/InfStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - InfStatement - - An RDF statement which was entailed by a inference rule. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_dataset.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_dataset.html deleted file mode 100755 index 4ce761e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_dataset.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - -
    dataset
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_default.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_default.html deleted file mode 100755 index 79ce8b67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_default.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - -
    default
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_infModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_infModel.html deleted file mode 100755 index 8ad126f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_infModel.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -
    infModel
    -
    - -
    - -
    Description
    -
    - Class trees
    - Index of elements
    -
    - - - -
    Interfaces
    -
    Classes
    -
    InfModel
    -
    InfModelB
    -
    InfModelF
    -
    InfRule
    -
    InfStatement
    -
    Files
    -
    InfModel.php
    -
    InfModelB.php
    -
    InfModelF.php
    -
    InfRule.php
    -
    InfStatement.php
    - - -
    -
    -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_model.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_model.html deleted file mode 100755 index 4d83c63f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_model.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -
    model
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_ontModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_ontModel.html deleted file mode 100755 index ce624f25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_ontModel.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - -
    ontModel
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_rdql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_rdql.html deleted file mode 100755 index c33cb73e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_rdql.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -
    rdql
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_resModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_resModel.html deleted file mode 100755 index b9001b4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_resModel.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -
    resModel
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql-db.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql-db.html deleted file mode 100755 index 223a09f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql-db.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - -
    sparql-db
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql.html deleted file mode 100755 index 2a13655d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_sparql.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - -
    sparql
    -
    - -
    - -
    Description
    -
    - Class trees
    - Index of elements
    -
    - - - -
    Interfaces
    -
    SparqlEngineDb_ResultRenderer
    -
    SparqlEngine_ResultRenderer
    -
    Classes
    -
    ClientQuery
    -
    Constraint
    -
    GraphPattern
    -
    Query
    -
    QueryTriple
    -
    SparqlClient
    -
    SparqlEngine
    -
    SparqlEngineDb
    -
    SparqlEngineDb_FilterGenerator
    -
    SparqlEngineDb_FilterGenerator_Value
    -
    SparqlEngineDb_Offsetter
    -
    SparqlEngineDb_Preparator
    -
    SparqlEngineDb_PreparedStatement
    -
    SparqlEngineDb_ResultConverter
    -
    SparqlEngineDb_ResultRenderer_Default
    -
    SparqlEngineDb_ResultRenderer_HTML
    -
    SparqlEngineDb_ResultRenderer_XML
    -
    SparqlEngineDb_SqlGenerator
    -
    SparqlEngineDb_SqlGeneratorException
    -
    SparqlEngineDb_SqlMerger
    -
    SparqlEngineDb_TypeSorter
    -
    SparqlEngine_PreparedStatement
    -
    SparqlEngine_ResultConverter
    -
    SparqlEngine_ResultRenderer_Default
    -
    SparqlEngine_ResultRenderer_HTML
    -
    SparqlEngine_ResultRenderer_XML
    -
    SparqlParser
    -
    SparqlParserException
    -
    SparqlResultParser
    -
    Functions
    -
    dateTime
    -
    lang
    -
    langMatches
    -
    regex
    -
    str
    -
    Files
    -
    ClientQuery.php
    -
    Constraint.php
    -
    Default.php
    -
    Default.php
    -
    FilterFunctions.php
    -
    FilterGenerator.php
    -
    GraphPattern.php
    -
    HTML.php
    -
    HTML.php
    -
    Offsetter.php
    -
    Preparator.php
    -
    PreparedStatement.php
    -
    PreparedStatement.php
    -
    Query.php
    -
    QueryTriple.php
    -
    ResultConverter.php
    -
    ResultConverter.php
    -
    ResultRenderer.php
    -
    ResultRenderer.php
    -
    SparqlClient.php
    -
    SparqlEngine.php
    -
    SparqlEngineDb.php
    -
    SparqlParser.php
    -
    SparqlParserException.php
    -
    SparqlResultParser.php
    -
    SqlGenerator.php
    -
    SqlGeneratorException.php
    -
    SqlMerger.php
    -
    TypeSorter.php
    -
    XML.php
    -
    XML.php
    - - -
    -
    -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_syntax.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_syntax.html deleted file mode 100755 index bd5b231b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_syntax.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - -
    syntax
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_utility.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_utility.html deleted file mode 100755 index 47490bc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_utility.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - -
    utility
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_vocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_vocabulary.html deleted file mode 100755 index 047be0e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/li_vocabulary.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - -
    vocabulary
    - -

    phpDocumentor v 1.3.2

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/all-wcprops deleted file mode 100755 index e2f71968..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/media -END -stylesheet.css -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/media/stylesheet.css -END -banner.css -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/media/banner.css -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/entries deleted file mode 100755 index b162e265..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/entries +++ /dev/null @@ -1,54 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/media -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -stylesheet.css -file - - - - -2008-02-29T14:57:30.807835Z -a0fc0b2de7fe5f15c375d7af647b94e8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -banner.css -file - - - - -2008-02-29T14:57:30.823456Z -ecc56c77b1db20dc6e25d0269ea49308 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/banner.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/banner.css.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/banner.css.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/stylesheet.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/stylesheet.css.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/prop-base/stylesheet.css.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/banner.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/banner.css.svn-base deleted file mode 100755 index ba1a7ba5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/banner.css.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -body -{ - background-color: #DDDDDD; - margin: 0px; - padding: 0px; -} - -/* Banner (top bar) classes */ - -.banner { } - -.banner-menu -{ - clear: both; - padding: .5em; - border-top: 2px solid #999999; -} - -.banner-title -{ - text-align: right; - font-size: 20pt; - font-weight: bold; - margin: .2em; -} - -.package-selector -{ - background-color: #CCCCCC; - border: 1px solid black; - color: blue; -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/stylesheet.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/stylesheet.css.svn-base deleted file mode 100755 index 051586b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/.svn/text-base/stylesheet.css.svn-base +++ /dev/null @@ -1,142 +0,0 @@ -a { color: #0000FF; text-decoration: none; } -a:hover { color: #FF0000; text-decoration: underline; } -a:active { color: #FF0000; text-decoration: underline; } - -body { background-color: #EEEEEE; font-family: Verdana, Arial, sans-serif } -body, table { font-size: 10pt } -a img { border: 0px; } -dd { margin-left: 0px; padding-left: 1em; } - -/* Page layout/boxes */ - -.info-box {} -.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #DDDDDD } -.info-box-body { border: 1px solid #999999; padding: .5em; background-color: #F8F8F8; } -.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } - -.oddrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em} -.evenrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em} - -.page-body { max-width: 800px; margin: auto; } -.tree dl { margin: 0px } - -/* Index formatting classes */ - -.index-item-body { margin-top: .5em; margin-bottom: .5em} -.index-item-description { margin-top: .25em } -.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } -.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} -.index-letter-title { font-size: 12pt; font-weight: bold } -.index-letter-menu { text-align: center; margin: 1em } -.index-letter { font-size: 12pt } - -/* Docbook classes */ - -.description {} -.short-description { font-weight: bold; color: #666666; } -.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } -.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } -.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } -.package { } -.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } -.package-details { font-size: 85%; } -.sub-package { font-weight: bold; font-size: 120% } -.tutorial { border-width: thin; border-color: #0066ff } -.tutorial-nav-box { width: 100%; border: 2px solid #999999; background-color: #DDDDDD } -.nav-button-disabled { color: #999999; } -.nav-button:active, -.nav-button:focus, -.nav-button:hover { background-color: #AAAAAA; outline: 1px solid #666666; text-decoration: none } -.folder-title { font-style: italic } - -/* Generic formatting */ - -.field { font-weight: bold; } -.detail { font-size: 8pt; } -.notes { font-style: italic; font-size: 8pt; } -.separator { background-color: #999999; height: 2px; } -.warning { color: #FF6600; } -.disabled { font-style: italic; color: #999999; } - -/* Code elements */ - -.line-number { } - -.class-table { width: 100%; } -.class-table-header { border-bottom: 1px dotted #666666; text-align: left} -.class-name { color: #000000; font-weight: bold; } - -.method-summary { padding-left: 1em; font-size: 8pt } -.method-header { } -.method-definition { margin-bottom: .3em } -.method-title { font-weight: bold; } -.method-name { font-weight: bold; } -.method-signature { font-size: 85%; color: #0066BB; margin: .5em 0em } -.method-result { font-style: italic; } - -.var-summary { padding-left: 1em; font-size: 8pt; } -.var-header { } -.var-title { margin-bottom: .3em } -.var-type { color: red; font-weight: bold } -.var-name { font-weight: bold; } -.var-default {} -.var-description { font-weight: normal; color: #000000; } - -.include-title { } -.include-type { font-style: italic; } -.include-name { font-weight: bold; } - -.const-title { } -.const-name { font-weight: bold; } - -/* Syntax highlighting */ - -.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; - font-family: 'Courier New', Courier, monospace; font-weight: normal; } -.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } - -.src-comm { color: #666666; } -.src-id { } -.src-inc { color: #0000FF; } -.src-key { color: #0000FF; } -.src-num { color: #CC0000; } -.src-str { color: #66cccc; } -.src-sym { font-weight: bold; } -.src-var { } - -.src-php { font-weight: bold; } - -.src-doc { color: #009999 } -.src-doc-close-template { color: #0000FF } -.src-doc-coretag { color: #0099FF; font-weight: bold } -.src-doc-inlinetag { color: #0099FF } -.src-doc-internal { color: #6699cc } -.src-doc-tag { color: #0080CC } -.src-doc-template { color: #0000FF } -.src-doc-type { font-style: italic } -.src-doc-var { font-style: italic } - -.tute-tag { color: #009999 } -.tute-attribute-name { color: #0000FF } -.tute-attribute-value { color: #0099FF } -.tute-entity { font-weight: bold; } -.tute-comment { font-style: italic } -.tute-inline-tag { color: #636311; font-weight: bold } - -/* tutorial */ - -.authors { } -.author { font-style: italic; font-weight: bold } -.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } -.example { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; } -.listing { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; white-space: nowrap; } -.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } -.ref-title-box { } -.ref-title { } -.ref-purpose { font-style: italic; color: #666666 } -.ref-synopsis { } -.title { font-weight: bold; border-bottom: 1px solid #888888; color: #888888; } -.cmd-synopsis { margin: 1em 0em } -.cmd-title { font-weight: bold } -.toc { margin-left: 2em; padding-left: 0em } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/banner.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/banner.css deleted file mode 100755 index cd725a1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/banner.css +++ /dev/null @@ -1,32 +0,0 @@ -body -{ - background-color: #DDDDDD; - margin: 0px; - padding: 0px; -} - -/* Banner (top bar) classes */ - -.banner { } - -.banner-menu -{ - clear: both; - padding: .5em; - border-top: 2px solid #999999; -} - -.banner-title -{ - text-align: right; - font-size: 20pt; - font-weight: bold; - margin: .2em; -} - -.package-selector -{ - background-color: #CCCCCC; - border: 1px solid black; - color: blue; -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/stylesheet.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/stylesheet.css deleted file mode 100755 index eb73d451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/media/stylesheet.css +++ /dev/null @@ -1,142 +0,0 @@ -a { color: #0000FF; text-decoration: none; } -a:hover { color: #FF0000; text-decoration: underline; } -a:active { color: #FF0000; text-decoration: underline; } - -body { background-color: #EEEEEE; font-family: Verdana, Arial, sans-serif } -body, table { font-size: 10pt } -a img { border: 0px; } -dd { margin-left: 0px; padding-left: 1em; } - -/* Page layout/boxes */ - -.info-box {} -.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #DDDDDD } -.info-box-body { border: 1px solid #999999; padding: .5em; background-color: #F8F8F8; } -.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } - -.oddrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em} -.evenrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em} - -.page-body { max-width: 800px; margin: auto; } -.tree dl { margin: 0px } - -/* Index formatting classes */ - -.index-item-body { margin-top: .5em; margin-bottom: .5em} -.index-item-description { margin-top: .25em } -.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } -.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} -.index-letter-title { font-size: 12pt; font-weight: bold } -.index-letter-menu { text-align: center; margin: 1em } -.index-letter { font-size: 12pt } - -/* Docbook classes */ - -.description {} -.short-description { font-weight: bold; color: #666666; } -.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } -.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } -.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } -.package { } -.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } -.package-details { font-size: 85%; } -.sub-package { font-weight: bold; font-size: 120% } -.tutorial { border-width: thin; border-color: #0066ff } -.tutorial-nav-box { width: 100%; border: 2px solid #999999; background-color: #DDDDDD } -.nav-button-disabled { color: #999999; } -.nav-button:active, -.nav-button:focus, -.nav-button:hover { background-color: #AAAAAA; outline: 1px solid #666666; text-decoration: none } -.folder-title { font-style: italic } - -/* Generic formatting */ - -.field { font-weight: bold; } -.detail { font-size: 8pt; } -.notes { font-style: italic; font-size: 8pt; } -.separator { background-color: #999999; height: 2px; } -.warning { color: #FF6600; } -.disabled { font-style: italic; color: #999999; } - -/* Code elements */ - -.line-number { } - -.class-table { width: 100%; } -.class-table-header { border-bottom: 1px dotted #666666; text-align: left} -.class-name { color: #000000; font-weight: bold; } - -.method-summary { padding-left: 1em; font-size: 8pt } -.method-header { } -.method-definition { margin-bottom: .3em } -.method-title { font-weight: bold; } -.method-name { font-weight: bold; } -.method-signature { font-size: 85%; color: #0066BB; margin: .5em 0em } -.method-result { font-style: italic; } - -.var-summary { padding-left: 1em; font-size: 8pt; } -.var-header { } -.var-title { margin-bottom: .3em } -.var-type { color: red; font-weight: bold } -.var-name { font-weight: bold; } -.var-default {} -.var-description { font-weight: normal; color: #000000; } - -.include-title { } -.include-type { font-style: italic; } -.include-name { font-weight: bold; } - -.const-title { } -.const-name { font-weight: bold; } - -/* Syntax highlighting */ - -.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; - font-family: 'Courier New', Courier, monospace; font-weight: normal; } -.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } - -.src-comm { color: #666666; } -.src-id { } -.src-inc { color: #0000FF; } -.src-key { color: #0000FF; } -.src-num { color: #CC0000; } -.src-str { color: #66cccc; } -.src-sym { font-weight: bold; } -.src-var { } - -.src-php { font-weight: bold; } - -.src-doc { color: #009999 } -.src-doc-close-template { color: #0000FF } -.src-doc-coretag { color: #0099FF; font-weight: bold } -.src-doc-inlinetag { color: #0099FF } -.src-doc-internal { color: #6699cc } -.src-doc-tag { color: #0080CC } -.src-doc-template { color: #0000FF } -.src-doc-type { font-style: italic } -.src-doc-var { font-style: italic } - -.tute-tag { color: #009999 } -.tute-attribute-name { color: #0000FF } -.tute-attribute-value { color: #0099FF } -.tute-entity { font-weight: bold; } -.tute-comment { font-style: italic } -.tute-inline-tag { color: #636311; font-weight: bold } - -/* tutorial */ - -.authors { } -.author { font-style: italic; font-weight: bold } -.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } -.example { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; } -.listing { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; white-space: nowrap; } -.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } -.ref-title-box { } -.ref-title { } -.ref-purpose { font-style: italic; color: #666666 } -.ref-synopsis { } -.title { font-weight: bold; border-bottom: 1px solid #888888; color: #888888; } -.cmd-synopsis { margin: 1em 0em } -.cmd-title { font-weight: bold } -.toc { margin-left: 2em; padding-left: 0em } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/all-wcprops deleted file mode 100755 index 95ae4e9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/all-wcprops +++ /dev/null @@ -1,131 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model -END -_model---MemModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---MemModel.php.html -END -_model---Model.php.html -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Model.php.html -END -_model---DbStore.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---DbStore.php.html -END -_sparql---SPARQL.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/310/trunk/rdfapi-php/doc/phpdoc/model/_sparql---SPARQL.php.html -END -_model---Statement.php.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Statement.php.html -END -_model---DbModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---DbModel.php.html -END -Node.html -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/Node.html -END -Resource.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/Resource.html -END -ModelFactory.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/ModelFactory.html -END -Literal.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/Literal.html -END -BlankNode.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/BlankNode.html -END -MemModel.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/MemModel.html -END -Model.html -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/Model.html -END -_model---Node.php.html -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Node.php.html -END -DbStore.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/DbStore.html -END -Statement.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/Statement.html -END -_model---Resource.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Resource.php.html -END -_model---ModelFactory.php.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---ModelFactory.php.html -END -DbModel.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/DbModel.html -END -_model---Literal.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Literal.php.html -END -_model---Blanknode.php.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/model/_model---Blanknode.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/entries deleted file mode 100755 index bc44f26a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/entries +++ /dev/null @@ -1,301 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/model -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -_model---MemModel.php.html -file - - - - -2008-02-29T14:57:32.729169Z -c07afd6f2075d258b6f4a182f6b1ec7b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---Model.php.html -file - - - - -2008-02-29T14:57:32.744789Z -8f0fd0882e1917323c6971bba48bd771 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---DbStore.php.html -file - - - - -2008-02-29T14:57:32.744789Z -829497c1ed542ebe36cace24a8ad0d22 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SPARQL.php.html -file - - - - -2008-02-29T14:57:32.760410Z -f89fcbd119439b20c33b70270a6dc6f1 -2006-06-26T12:34:22.000000Z -310 -tgauss -has-props - -_model---Statement.php.html -file - - - - -2008-02-29T14:57:32.760410Z -cda4acc5c2d00a8fa956fcc0957c2ae8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---DbModel.php.html -file - - - - -2008-02-29T14:57:32.776031Z -6663bf7cd74e88e4401f3dcc3856b152 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Node.html -file - - - - -2008-02-29T14:57:32.776031Z -a1caa5905c193487b78b6f43f55d8a81 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Resource.html -file - - - - -2008-02-29T14:57:32.791651Z -eed5d35a5bd53fa192320a5c4dbbbb8b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ModelFactory.html -file - - - - -2008-02-29T14:57:32.791651Z -9fa9fe4610a8f45aa57c376be5e58a0c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Literal.html -file - - - - -2008-02-29T14:57:32.807272Z -07f6578286f9cc1efab66eda97daff76 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -BlankNode.html -file - - - - -2008-02-29T14:57:32.822892Z -9045d914a82c6f4a08847c5679235b36 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -MemModel.html -file - - - - -2008-02-29T14:57:32.822892Z -c82dc6c8a0d056fdc81025ea5e6983d6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Model.html -file - - - - -2008-02-29T14:57:32.838513Z -30b24c5c14631f988fb138fd2900ff43 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---Node.php.html -file - - - - -2008-02-29T14:57:32.854134Z -c6c42b7276cf6999f16d352e30389bd0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DbStore.html -file - - - - -2008-02-29T14:57:32.854134Z -31d7d483da30e6c889512d661a86a498 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Statement.html -file - - - - -2008-02-29T14:57:32.869754Z -b18af9f9b228f8a64333d83ae2a3a173 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---Resource.php.html -file - - - - -2008-02-29T14:57:32.869754Z -c081de7912e5f177e26a69d99a561dbb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---ModelFactory.php.html -file - - - - -2008-02-29T14:57:32.885375Z -d62dbbe5f6b9534a3b5f807903cb4d8a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DbModel.html -file - - - - -2008-02-29T14:57:32.885375Z -ec9b072657a43547b4507d1358b4adc0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---Literal.php.html -file - - - - -2008-02-29T14:57:32.900995Z -78bf59403eccafab368b74342e61f28c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_model---Blanknode.php.html -file - - - - -2008-02-29T14:57:32.916616Z -4be68a86cdb31e8c9d298dda68deacac -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/BlankNode.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/BlankNode.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/BlankNode.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbStore.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbStore.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/DbStore.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Literal.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Literal.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Literal.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/MemModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/MemModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/MemModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Model.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Model.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/ModelFactory.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/ModelFactory.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/ModelFactory.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Node.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Node.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Node.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Resource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Resource.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Resource.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Statement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Statement.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/Statement.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Blanknode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Blanknode.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Blanknode.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbStore.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbStore.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---DbStore.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Literal.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Literal.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Literal.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---MemModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---MemModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---MemModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Model.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Model.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Model.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---ModelFactory.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---ModelFactory.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---ModelFactory.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Node.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Node.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Node.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Resource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Resource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Resource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Statement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Statement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_model---Statement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_sparql---SPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_sparql---SPARQL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/prop-base/_sparql---SPARQL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/BlankNode.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/BlankNode.html.svn-base deleted file mode 100755 index ba7f9523..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/BlankNode.html.svn-base +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Docs For Class BlankNode - - - - -
    -

    Class BlankNode

    - - -
    -
    Description
    - -
    - -

    An RDF blank node.

    -

    In model theory, blank nodes are considered to be drawn from some set of 'anonymous' entities which have no label but are unique to the graph. For serialization they are labeled with a URI or a _:X identifier.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /model/Blanknode.php (line 23) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --BlankNode
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - BlankNode - BlankNode - (mixed $namespace_or_uri_or_model, [string $localName = NULL]) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - string - getID - () -
    - -
    - string - getLabel - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor BlankNode (line 33) -
    - - -

    Constructor You can supply a label or You supply a model and a unique ID is gernerated.

    -
      -
    • access: public
    • -
    - -
    - BlankNode - - BlankNode - - (mixed $namespace_or_uri_or_model, [string $localName = NULL]) -
    - -
      -
    • - mixed - $namespace_or_uri_or_model
    • -
    • - string - $localName
    • -
    - - -
    - -
    - -
    - equals (line 90) -
    - - -

    Checks if two blank nodes are equal.

    -

    Two blank nodes are equal, if they have the same temporary ID.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - -
    -
    Redefinition of:
    -
    -
    Resource::equals()
    -
    Checks if the resource equals another resource.
    -
    - -
    - -
    - -
    - getID (line 57) -
    - - -

    Returns the ID of the blank node.

    -
      -
    • access: public
    • -
    - -
    - string - - getID - - () -
    - - - -
    - -
    - -
    - getLabel (line 67) -
    - - -

    Returns the ID of the blank node.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Resource::getLabel()
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    - -
    - -
    - -
    - toString (line 77) -
    - - -

    Dumps bNode.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Resource::toString()
    -
    Dumps resource.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbModel.html.svn-base deleted file mode 100755 index 2f76b4c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbModel.html.svn-base +++ /dev/null @@ -1,1628 +0,0 @@ - - - - - - Docs For Class DbModel - - - - -
    -

    Class DbModel

    - - -
    -
    Description
    - -
    - -

    This class provides methods for manipulating DbModels from DbStore.

    -

    A DbModel is an RDF Model, which is persistently stored in a relational database. This Class uses the ADOdb Database Abstraction Library for PHP (http://adodb.sourceforge.net/).

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /model/DbModel.php (line 22) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --DbModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    NamedGraphDb - Persistent NamedGraph implementation that extends a DbModel. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DbModel - DbModel - (object ADOConnection &$dbConnection, string $modelURI, string $modelID, [string $baseURI = NULL]) -
    - -
    - mixed - add - (object Statement &$statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - ( $prefix,  $nmsp, String $prefix,) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - void - addWithoutDuplicates - (object Statement &$statement) -
    - -
    - void - close - () -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - void - delete - () -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - object MemModel - find - (object Resource $subject, object Resource $predicate, object Node $object) -
    - -
    - integer - findCount - (object Resource $subject, object Resource $predicate, object Node $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Resource $subject, object Resource $predicate, object Node $object, [integer $offset = -1]) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - ADOdb - &getDbConn - () -
    - - - -
    - int - getModelID - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - -
    - object FindIterator - &iterFind - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - array - rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object MemModel - &reify - () -
    - -
    - void - remove - (object Statement &$statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - void - replace - (object Resource $subject, object Resource $predicate, object Node $object, object Node $replacement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - &subtract - ( &$model, object Model $model) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DbModel (line 65) -
    - - -

    Constructor Do not call this directly.

    -

    Use the method getModel,getNewModel or putModel of the Class DbStore instead.

    -
      -
    • access: public
    • -
    - -
    - DbModel - - DbModel - - (object ADOConnection &$dbConnection, string $modelURI, string $modelID, [string $baseURI = NULL]) -
    - -
      -
    • - object ADOConnection - &$dbConnection
    • -
    • - string - $modelURI
    • -
    • - string - $modelID
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 131) -
    - - -

    Add a new triple to this DbModel.

    -
      -
    • return: true on success, false if the statement is already in the model, error message (string) on failure
    • -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - mixed - - add - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - addModel (line 881) -
    - - -

    Add the given model to this DbModel.

    -

    This function monitors for SQL errors, and will commit if no errors have occured, otherwise it will rollback. If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - addNamespace (line 1194) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - ( $prefix,  $nmsp, String $prefix,) -
    - -
      -
    • - String - $prefix,: String $nmsp
    • -
    • - - $prefix
    • -
    • - - $nmsp
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 1179) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 183) -
    - - -

    Alias for the method add().

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - addWithoutDuplicates - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - close (line 953) -
    - - -

    Close this DbModel

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - contains (line 345) -
    - - -

    Check if the DbModel contains the given statement.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - containsAll (line 366) -
    - - -

    Determine if all of the statements in the given model are also contained in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - - - - -
    - -
    - -
    - containsAny (line 399) -
    - - -

    Determine if any of the statements in the given model are also contained in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - - - - -
    - -
    - -
    - delete (line 933) -
    - - -

    Remove this DbModel from database and clean up.

    -

    This function monitors for SQL errors, and will commit if no errors have occured, otherwise it will rollback.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - delete - - () -
    - - - -
    - -
    - -
    - equals (line 747) -
    - - -

    Check if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    Warning: This method doesn't work correct with models where the same blank node has different identifiers in the two models. We will correct this in a future version.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 439) -
    - - -

    General method to search for triples in the DbModel.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Resource $subject, object Resource $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findCount (line 588) -
    - - -

    Search for triples and return the number of matches.

    -

    NULL input for any parameter will match anything.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - integer - - findCount - - (object Resource $subject, object Resource $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 542) -
    - - -

    Search for triples and return the first matching statement.

    -

    NULL input for any parameter will match anything. Return an NULL if nothing is found. You can set an search offset with $offset.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Resource $subject, object Resource $predicate, object Node $object, [integer $offset = -1]) -
    - - - - -
    - -
    - -
    - findRegex (line 489) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Return an empty MemModel if nothing is found. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: Mhis method loads a DbModel into memory and performs the search on a MemModel, which can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - - -
    - -
    - -
    - findVocabulary (line 509) -
    - - -

    Return all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Return an empty model if nothing is found.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - - -
    - -
    - -
    - getDbConn (line 273) -
    - - -

    Returns the database connection object

    -
      -
    • return: Database object
    • -
    • access: public
    • -
    - -
    - ADOdb - - &getDbConn - - () -
    - - - -
    - -
    - -
    - getMemModel (line 246) -
    - - -

    Create a MemModel containing all the triples of the current DbModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - getModelID (line 260) -
    - - -

    Returns the model id

    -
      -
    • return: Model id number
    • -
    • access: public
    • -
    - -
    - int - - getModelID - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 1154) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - intersect (line 850) -
    - - -

    Return a new MemModel containing all the statements which are in both this model and the given model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - isEmpty (line 113) -
    - - -

    Check if this DbModel is empty.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - iterFind (line 1244) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &iterFind - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 629) -
    - - -

    Perform an RDQL query on this DbModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 663) -
    - - -

    Perform an RDQL query on this DBModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - reify (line 919) -
    - - -

    Reify the DbModel.

    -

    Return a new MemModel that contains the reifications of all statements of this DbModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &reify - - () -
    - - - -
    - -
    - -
    - remove (line 197) -
    - - -

    Remove the given triple from this DbModel.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - remove - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - removeNamespace (line 1259) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - replace (line 684) -
    - - -

    General method to replace nodes of a DbModel.

    -

    NULL input for any parameter will match nothing. Example: $m->replace($resource, NULL, $node, $replacement); Replaces all $node objects beeing subject or object in any triple of the model with the $replacement node. Throw an error in case of a paramter mismatch.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Resource $subject, object Resource $predicate, object Node $object, object Node $replacement) -
    - - - - -
    - -
    - -
    - saveAs (line 330) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the DbModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    - -
    - -
    - setBaseURI (line 82) -
    - - -

    Set a base URI for the DbModel.

    -

    Affects creating of new resources and serialization syntax.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 99) -
    - - -

    Return the number of statements in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    - -
    - -
    - subtract (line 819) -
    - - -

    Return a new MemModel that is the subtraction of another model from this DbModel.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &subtract - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - toString (line 220) -
    - - -

    Short dump of the DbModel.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    - -
    - -
    - toStringIncludingTriples (line 232) -
    - - -

    Dump of the DbModel including all triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - - -
    - -
    - -
    - unite (line 788) -
    - - -

    Return a new MemModel that is the set-union the model with another model.

    -

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - writeAsHtml (line 285) -
    - - -

    Write the RDF serialization of the _DbModel as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - - -
    - -
    - -
    - writeAsHtmlTable (line 297) -
    - - -

    Write the RDF serialization of the DbModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - - -
    - -
    - -
    - writeRdfToString (line 310) -
    - - -

    Write the RDF serialization of the DbModel to string.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:48 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbStore.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbStore.html.svn-base deleted file mode 100755 index 161e9885..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/DbStore.html.svn-base +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - Docs For Class DbStore - - - - -
    -

    Class DbStore

    - - -
    -
    Description
    - -
    - -

    DbStore is a persistent store of RDF data using relational database technology.

    -

    DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB), which allows to connect to multiple databases in a portable manner. This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server. If you want to use other databases, you will have to create tables by yourself according to the abstract database schema described in the API documentation.

    You can activate debug mode by defining ADODB_DEBUG_MODE to "1".

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /model/DbStore.php (line 29) -

    - - -
    Object
    -   |
    -   --DbStore
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DbStore - DbStore - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
    - void - close - () -
    - -
    - void - createTables - (string $databaseType) -
    - -
    - boolean - datasetExists - ($datasetName $datasetName) -
    - -
    - object DatasetDb - &getDatasetDb - ($datasetId $datasetName) -
    - -
    - object DbModel - getModel - (string $modelURI) -
    - -
    - object NamedGraphMem - getNamedGraphDb - ($modelURI $modelURI, $graphName $graphName) -
    - -
    - object DatasetDB - &getNewDatasetDb - ($datasetName $datasetName) -
    - -
    - object DbModel - getNewModel - (string $modelURI, [string $baseURI = NULL]) -
    - -
    - object namedGraphDb - getNewNamedGraphDb - ($modelURI $modelURI, $graphName $graphName, [$baseURI $baseURI = NULL]) -
    - -
    - void - isSetup - ([string $databaseType = "MySQL"]) -
    - -
    - array - listModels - () -
    - -
    - boolean - modelExists - (string $modelURI) -
    - -
    - boolean - putModel - (object Model &$model, [string $modelURI = NULL]) -
    - -
    - boolean - removeNamedGraphDb - ($modelURI $modelURI) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DbStore (line 51) -
    - - -

    Constructor: Set the database connection with the given parameters.

    -
      -
    • access: public
    • -
    - -
    - DbStore - - DbStore - - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
      -
    • - string - $dbDriver
    • -
    • - string - $host
    • -
    • - string - $dbName
    • -
    • - string - $user
    • -
    • - string - $password
    • -
    - - -
    - -
    - -
    - close (line 247) -
    - - -

    Close the DbStore.

    -

    !!! Warning: If you close the DbStore all active instances of DbModel from this !!! DbStore will lose their database connection !!!

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - createTables (line 87) -
    - - -

    Create tables and indexes for the given database type.

    -

    Currently supported: MsAccess and MySQL. If you want to use other databases, you will have to create tables by yourself according to the abstract <a href="database_schema.html">database schema</a> described in the API documentation.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - createTables - - (string $databaseType) -
    - -
      -
    • - string - $databaseType
    • -
    - - -
    - -
    - -
    - datasetExists (line 591) -
    - - -

    Check if the Dataset with the given $datasetName is already stored in the database

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - datasetExists - - ($datasetName $datasetName) -
    - -
      -
    • - $datasetName - $datasetName: string
    • -
    - - -
    - -
    - -
    - getDatasetDb (line 614) -
    - - -

    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object DatasetDb - - &getDatasetDb - - ($datasetId $datasetName) -
    - -
      -
    • - $datasetId - $datasetName: string
    • -
    - - -
    - -
    - -
    - getModel (line 167) -
    - - -

    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - getModel - - (string $modelURI) -
    - -
      -
    • - string - $modelURI
    • -
    - - -
    - -
    - -
    - getNamedGraphDb (line 635) -
    - - -

    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object NamedGraphMem - - getNamedGraphDb - - ($modelURI $modelURI, $graphName $graphName) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    • - $graphName - $graphName: string
    • -
    - - -
    - -
    - -
    - getNewDatasetDb (line 559) -
    - - -

    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object DatasetDB - - &getNewDatasetDb - - ($datasetName $datasetName) -
    - -
      -
    • - $datasetName - $datasetName: string
    • -
    - - -
    - -
    - -
    - getNewModel (line 193) -
    - - -

    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object DbModel - - getNewModel - - (string $modelURI, [string $baseURI = NULL]) -
    - -
      -
    • - string - $modelURI
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getNewNamedGraphDb (line 664) -
    - - -

    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object namedGraphDb - - getNewNamedGraphDb - - ($modelURI $modelURI, $graphName $graphName, [$baseURI $baseURI = NULL]) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    • - $graphName - $graphName: string
    • -
    • - $baseURI - $baseURI: string
    • -
    - - -
    - -
    - -
    - isSetup (line 472) -
    - - -

    Checks if tables are setup for RAP

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - isSetup - - ([string $databaseType = "MySQL"]) -
    - -
      -
    • - string - $databaseType
    • -
    - - -
    - -
    - -
    - listModels (line 110) -
    - - -

    List all DbModels stored in the database.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - array - - listModels - - () -
    - - - -
    - -
    - -
    - modelExists (line 140) -
    - - -

    Check if the DbModel with the given modelURI is already stored in the database

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - modelExists - - (string $modelURI) -
    - -
      -
    • - string - $modelURI
    • -
    - - -
    - -
    - -
    - putModel (line 223) -
    - - -

    Store a MemModel or another DbModel from a different DbStore in the database.

    -

    Return FALSE if there is already a model with modelURI matching the modelURI of the given model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - putModel - - (object Model &$model, [string $modelURI = NULL]) -
    - - - - -
    - -
    - -
    - removeNamedGraphDb (line 693) -
    - - -

    Removes the graph with all statements from the database.

    -

    Warning: A single namedGraph can be added to several datasets. So it'll be removed from all datasets.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - removeNamedGraphDb - - ($modelURI $modelURI) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Literal.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Literal.html.svn-base deleted file mode 100755 index 96e69ede..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Literal.html.svn-base +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - Docs For Class Literal - - - - -
    -

    Class Literal

    - - -
    -
    Description
    - -
    - -

    An RDF literal.

    -

    The literal supports the xml:lang and rdf:datatype property. For XML datatypes see: http://www.w3.org/TR/xmlschema-2/

    - -

    - Located in /model/Literal.php (line 21) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Literal
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    ResLiteral - An RDF literal. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Literal - Literal - (string $str, [string $language = NULL]) -
    - -
    - boolean - equals - (object literal $that) -
    - -
    - string - getDatatype - () -
    - -
    - string - getLabel - () -
    - -
    - string - getLanguage - () -
    - -
    - void - setDatatype - (string $datatype) -
    - -
    - void - setLanguage - (string $lang) -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Literal (line 51) -
    - - -

    Constructor

    - -
    - Literal - - Literal - - (string $str, [string $language = NULL]) -
    - -
      -
    • - string - $str: label of the literal
    • -
    • - string - $language: optional language identifier
    • -
    - - -
    - -
    - -
    - equals (line 134) -
    - - -

    Checks if ihe literal equals another literal.

    -

    Two literals are equal, if they have the same label and they have the same language/datatype or both have no language/datatype property set.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object literal $that) -
    - -
      -
    • - object literal - $that
    • -
    - - -
    - -
    - -
    - getDatatype (line 103) -
    - - -

    Returns the datatype of the literal.

    -
      -
    • return: datatype of the literal
    • -
    • access: public
    • -
    - -
    - string - - getDatatype - - () -
    - - - -
    - -
    - -
    - getLabel (line 70) -
    - - -

    Returns the string value of the literal.

    -
      -
    • return: value of the literal
    • -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - - -
    - -
    - -
    - getLanguage (line 81) -
    - - -

    Returns the language of the literal.

    -
      -
    • return: language of the literal
    • -
    • access: public
    • -
    - -
    - string - - getLanguage - - () -
    - - - -
    - -
    - -
    - setDatatype (line 117) -
    - - -

    Sets the datatype of the literal.

    -

    Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER. The array $short_datatype with the possible shortcuts is definded in ../constants.php

    -
      -
    • access: public
    • -
    - -
    - void - - setDatatype - - (string $datatype) -
    - -
      -
    • - string - $datatype: URI of XML datatype or datatype shortcut
    • -
    - - -
    - -
    - -
    - setLanguage (line 92) -
    - - -

    Sets the language of the literal.

    -
      -
    • access: public
    • -
    - -
    - void - - setLanguage - - (string $lang) -
    - -
      -
    • - string - $lang
    • -
    - - -
    - -
    - -
    - toString (line 159) -
    - - -

    Dumps literal.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/MemModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/MemModel.html.svn-base deleted file mode 100755 index a698e4f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/MemModel.html.svn-base +++ /dev/null @@ -1,1827 +0,0 @@ - - - - - - Docs For Class MemModel - - - - -
    -

    Class MemModel

    - - -
    -
    Description
    - -
    - -

    A MemModel is an RDF Model, which is stored in the main memory.

    -

    This class provides methods for manipulating MemModels.

    - -

    - Located in /model/MemModel.php (line 24) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    NamedGraphMem - NamedGraph implementation that extends a MemModel with a name. -
    InfModel - A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - MemModel - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - (String $prefix, String $nmsp) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - boolean - addWithoutDuplicates - (object Statement $statement) -
    - -
    - void - close - () -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - object MemModel - find - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object FindIterator - &findAsIterator - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - integer - findCount - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - int - getIndexType - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object StatementIterator - &getStatementIterator - () -
    - -
    - void - index - (int $mode) -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - -
    - boolean - isIndexed - () -
    - -
    - object FindIterator - &iterFind - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - array - rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object MemModel - &reify - () -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - void - replace - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - &subtract - ( &$model, object Model $model) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor MemModel (line 75) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - MemModel - - MemModel - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 131) -
    - - -

    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add())

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModel::add() - : Adds a new triple to the Model without checking if the statement is already in the Model. -
    • -
    • - InfModelB::add() - : Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) -
    • -
    • - InfModelF::add() - : Adds a new triple to the MemModel without checking if the statement is already in the MemModel. -
    • -
    -
    - -
    - -
    - addModel (line 1107) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - addNamespace (line 1235) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - (String $prefix, String $nmsp) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 1221) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 170) -
    - - -

    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - close (line 1262) -
    - - -

    Close the MemModel and free up resources held.

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - contains (line 359) -
    - - -

    Tests if the MemModel contains the given triple.

    -

    TRUE if the triple belongs to the MemModel; FALSE otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - containsAll (line 386) -
    - - -

    Determine if all of the statements in a model are also contained in this MemModel.

    -

    True if all of the statements in $model are also contained in this MemModel and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - - - - -
    - -
    - -
    - containsAny (line 411) -
    - - -

    Determine if any of the statements in a model are also contained in this MemModel.

    -

    True if any of the statements in $model are also contained in this MemModel and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - - - - -
    - -
    - -
    - equals (line 944) -
    - - -

    Checks if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 522) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object. Returns an empty MemModel if nothing is found.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Node $subject, object Node $predicate, object Node $object) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findAsIterator (line 1173) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &findAsIterator - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findCount (line 802) -
    - - -

    Searches for triples and returns the number of matches.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findCount( NULL, NULL, $node ); Finds all triples with $node as object.

    -
      -
    • access: public
    • -
    - -
    - integer - - findCount - - (object Node $subject, object Node $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 682) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement of the MemModel where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search for. Default = 0

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findRegex (line 606) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Returns an empty MemModel if nothing is found.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findVocabulary (line 638) -
    - - -

    Returns all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Returns an empty MemModel if nothing is found.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getIndexType (line 503) -
    - - -

    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),

    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.

    -
      -
    • access: public
    • -
    - -
    - int - - getIndexType - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 1202) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - getStatementIterator (line 1160) -
    - - -

    Returns a StatementIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object StatementIterator - - &getStatementIterator - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - index (line 447) -
    - - -

    Builds a search index for the statements in the MemModel.

    -

    The index is used by the find(),contains(),add() and remove() functions. Performance example using a model with 43000 statements on a Linux machine: Find without index takes 1.7 seconds. Indexing takes 1.8 seconds. Find with index takes 0.001 seconds. So if you want to query a model more then once, build a index first. The defaultindex is indices over subject, predicate, object seperate.

    mode = 0 : indices over subject,predicate,object (default) mode = 1 : index over subject+predicate+object mode = 2 : index over subject+predicate mode = 3 : index over subject+object

    -
      -
    • access: public
    • -
    - -
    - void - - index - - (int $mode) -
    - -
      -
    • - int - $mode
    • -
    - - -
    - -
    - -
    - intersect (line 1063) -
    - - -

    Returns a new MemModel containing all the statements which are in both this MemModel and another.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - isEmpty (line 114) -
    - - -

    Checks if MemModel is empty

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - isIndexed (line 485) -
    - - -

    Returns true if there is an index, false if not.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isIndexed - - () -
    - - - -
    - -
    - -
    - iterFind (line 1186) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &iterFind - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 823) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 858) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - reify (line 1142) -
    - - -

    Reifies the MemModel.

    -

    Returns a new MemModel that contains the reifications of all statements of this MemModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &reify - - () -
    - - - -
    - -
    - -
    - remove (line 195) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - removeNamespace (line 1246) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - replace (line 878) -
    - - -

    General method to replace nodes of a MemModel.

    -

    NULL input for any parameter will match nothing. Example: $m->replace($node, NULL, $node, $replacement); Replaces all $node objects beeing subject or object in any triple of the MemModel with the $needle node.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - saveAs (line 325) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the MemModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::saveAs() - : Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file. -
    • -
    -
    - -
    - -
    - setBaseURI (line 87) -
    - - -

    Set a base URI for the MemModel.

    -

    Affects creating of new resources and serialization syntax. If the URI doesn't end with # : or /, then a # is added to the URI.

    -
      -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 104) -
    - - -

    Number of triples in the MemModel

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - subtract (line 1025) -
    - - -

    Returns a new MemModel that is the subtraction of another model from this MemModel.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &subtract - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - toString (line 249) -
    - - -

    Short Dump of the MemModel.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - toStringIncludingTriples (line 259) -
    - - -

    Dumps of the MemModel including all triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - unite (line 989) -
    - - -

    Returns a new MemModel that is the set-union of the MemModel with another model.

    -

    Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - writeAsHtml (line 275) -
    - - -

    Writes the RDF serialization of the MemModel as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::writeAsHtml() - : Writes the RDF serialization of the Model including ALL inferable triples as HTML. -
    • -
    -
    - -
    - -
    - writeAsHtmlTable (line 290) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - writeRdfToString (line 303) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    -

    Inherited Methods

    - - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:48 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Model.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Model.html.svn-base deleted file mode 100755 index 88ade6e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Model.html.svn-base +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - Docs For Class Model - - - - -
    -

    Class Model

    - - -
    -
    Description
    - -
    - -

    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.

    -

    An RDF graph is a directed labeled graph, as described in http://www.w3.org/TR/rdf-mt/. It can be defined as a set of <S, P, O> triples, where P is a uriref, S is either a uriref or a blank node, and O is either a uriref, a blank node, or a literal.

    - -

    - Located in /model/Model.php (line 21) -

    - - -
    Object
    -   |
    -   --Model
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    DbModel - This class provides methods for manipulating DbModels from DbStore. -
    MemModel - A MemModel is an RDF Model, which is stored in the main memory. -
    -
    -
    - - - -
    -
    Variable Summary
    - -
    -
    -
    - Parser - $queryParser -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - Model - Model - () -
    - -
    - object MemModel - findForward - (object Node $subject, object Node $predicate, object MemModel $object, [ &$newModel = NULL]) -
    - -
    - string - getBaseURI - () -
    - -
    - object MemModel - &getMemModelByRDQL - (string $queryString, [boolean $closure = FALSE]) -
    - -
    - object OntModel - &getOntModel - (constant $vocabulary) -
    - -
    - object ResModel - &getResModel - () -
    - -
    - void - load - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - - - -
    - string/array - sparqlQuery - (string $query, [string $resultform = false]) -
    - -
    - string, - visualize - ([string $format = "dot"], [boolean $short_prefix = TRUE]) -
    - -
    - Query - _parseSparqlQuery - ($query $query) -
    - -
    - array - _prepareSparql - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - Parser - $queryParser - = null (line 44) - -
    - - -

    SparqlParser so we can re-use it

    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Model (line 54) -
    - - -

    Notice for people who are used to work with older versions of RAP.

    -
      -
    • throws: PHPError
    • -
    • access: public
    • -
    - -
    - Model - - Model - - () -
    - - - -
    - -
    - -
    - findForward (line 265) -
    - - -

    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.

    -

    The method calls itself recursivly until the result is complete. NULL input for subject, predicate or object will match anything. Inputparameters are ignored for recursivly found statements. Returns a new MemModel or adds (without checking for duplicates) the found statements to a given MemModel. Returns an empty MemModel, if nothing is found. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: This method can be slow with large models. NOTE: Blank nodes are not renamed, they keep the same nodeIDs as in the queried model! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    - - -
    - object MemModel - - findForward - - (object Node $subject, object Node $predicate, object MemModel $object, [ &$newModel = NULL]) -
    - - - - -
    - -
    - -
    - getBaseURI (line 71) -
    - - -

    Return current baseURI.

    -
      -
    • access: public
    • -
    - -
    - string - - getBaseURI - - () -
    - - - -
    - -
    - -
    - getMemModelByRDQL (line 319) -
    - - -

    Perform an RDQL query on this Model. Should work with all types of models.

    -

    This method returns a MemModel containing the result statements. If $closure is set to TRUE, the result will additionally contain statements found by the findForward-method for blank nodes. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: If called with $closure = TRUE this method can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • author: code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer
    • -
    • author: Anton K�tlbacher <anton1@koestlbacher.de>
    • -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModelByRDQL - - (string $queryString, [boolean $closure = FALSE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $closure
    • -
    - - -
    - -
    - -
    - getOntModel (line 234) -
    - - -

    Returns an OntModel with this model as baseModel.

    -

    $vocabulary has to be one of the following constants (currently only one is supported): RDFS_VOCABULARY to select a RDFS Vocabulary.

    This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary).

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModel - - (constant $vocabulary) -
    - -
      -
    • - constant - $vocabulary
    • -
    - - -
    - -
    - -
    - getResModel (line 216) -
    - - -

    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModel - - () -
    - - - -
    - -
    - -
    - load (line 89) -
    - - -

    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    • - boolean - $stream
    • -
    - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelF::load() - : Load a model from a file containing RDF, N3 or N-Triples. -
    • -
    -
    - -
    - -
    - sparqlPrepare (line 469) -
    - - -

    Prepares a sparql query and returns a prepared statement that can be executed with data later on.

    -
      -
    • return: prepared statement object
    • -
    - -
    - SparqlEngine_PreparedStatement - - sparqlPrepare - - (string $query) -
    - -
      -
    • - string - $query: Sparql query to prepare.
    • -
    - - -
    - -
    - -
    - sparqlQuery (line 450) -
    - - -

    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.

    - -
    - string/array - - sparqlQuery - - (string $query, [string $resultform = false]) -
    - -
      -
    • - string - $query: the sparql query string
    • -
    • - string - $resultform: the result form ('xml' for SPARQL Query Results XML Format)
    • -
    - - -
    - -
    - -
    - visualize (line 435) -
    - - -

    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)

    -

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Note: See RDFUtil for further Information. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • return: binary
    • -
    • author: Anton K�tlbacher <anton1@koestlbacher.de>
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - string, - - visualize - - ([string $format = "dot"], [boolean $short_prefix = TRUE]) -
    - -
      -
    • - string - $format
    • -
    • - boolean - $short_prefix
    • -
    - - -
    - -
    - -
    - _parseSparqlQuery (line 512) -
    - - -

    Parses an query and returns the parsed form.

    -

    If the query is not a string but a Query object, it will just be returned.

    -
      -
    • return: query object
    • -
    • throws: Exception If $query is no string and no Query object
    • -
    - -
    - Query - - _parseSparqlQuery - - ($query $query) -
    - -
      -
    • - $query - $query: mixed String or Query object
    • -
    - - -
    - -
    - -
    - _prepareSparql (line 487) -
    - - -

    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...

    -
      -
    • return: First value is the sparql engine, second the dataset
    • -
    - -
    - array - - _prepareSparql - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/ModelFactory.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/ModelFactory.html.svn-base deleted file mode 100755 index 1af42511..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/ModelFactory.html.svn-base +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - Docs For Class ModelFactory - - - - -
    -

    Class ModelFactory

    - - -
    -
    Description
    - -
    - -

    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.

    - -

    - Located in /model/ModelFactory.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - &getDatasetMem - ([string $graphSetId = null], string $uri) -
    - -
    - object DbModel - &getDbModel - (object DbStore $dbStore, [string $baseURI = null]) -
    - -
    - object DbStore - &getDbStore - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
    - object DbModel - &getDefaultDbModel - ([string $baseURI = null]) -
    - -
    - object MemModel - &getDefaultModel - ([string $baseURI = null]) -
    - -
    - object MemModel - &getInfModelB - ([string $baseURI = null]) -
    - -
    - object MemModel - &getInfModelF - ([string $baseURI = null]) -
    - -
    - object MemModel - &getMemModel - ([string $baseURI = null]) -
    - -
    - object OntModel - &getOntModel - (constant $modelType, constant $vocabulary, [string $baseURI = null]) -
    - -
    - object OntModel - &getOntModelForBaseModel - ( &$baseModel, constant $vocabulary, object Model $baseModel) -
    - -
    - object ResModel - &getResModel - (constant $modelType, [string $baseURI = null]) -
    - -
    - object ResModel - &getResModelForBaseModel - ( &$baseModel, object Model $baseModel) -
    - -
    - SparqlClient - &getSparqlClient - (String $server) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - getDatasetMem (line 46) -
    - - -

    Returns a NamedGraphSetMem.

    -

    You can supply a GraphSet name.

    -
      -
    • access: public
    • -
    - -
    - void - - &getDatasetMem - - ([string $graphSetId = null], string $uri) -
    - -
      -
    • - string - $graphSetId
    • -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getDbModel (line 98) -
    - - -

    Returns a new DbModel using the database connection supplied by $dbStore.

    -

    You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - &getDbModel - - (object DbStore $dbStore, [string $baseURI = null]) -
    - - - - -
    - -
    - -
    - getDbStore (line 119) -
    - - -

    Returns a database connection with the given parameters.

    -

    Paramters, which are not defined are taken from the constants.php

    -
      -
    • access: public
    • -
    - -
    - object DbStore - - &getDbStore - - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
      -
    • - string - $dbDriver
    • -
    • - string - $host
    • -
    • - string - $dbName
    • -
    • - string - $user
    • -
    • - string - $password
    • -
    - - -
    - -
    - -
    - getDefaultDbModel (line 79) -
    - - -

    Returns a DbModel with the database connection defined in constants.php.

    -

    You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - &getDefaultDbModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getDefaultModel (line 33) -
    - - -

    Returns a MemModel.

    -

    You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getDefaultModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getInfModelB (line 153) -
    - - -

    Returns a InfModelB.

    -

    (MemModel with backward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getInfModelB - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getInfModelF (line 136) -
    - - -

    Returns a InfModelF.

    -

    (MemModel with forward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getInfModelF - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getMemModel (line 61) -
    - - -

    Returns a MemModel.

    -

    You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getOntModel (line 221) -
    - - -

    Returns an OntModel.

    -

    $modelType has to be one of the following constants: MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel with a new model from defined type. $vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported. You can supply a model base URI.

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModel - - (constant $modelType, constant $vocabulary, [string $baseURI = null]) -
    - -
      -
    • - constant - $modelType
    • -
    • - constant - $vocabulary
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getOntModelForBaseModel (line 255) -
    - - -

    Creates an OntModel that wraps an existing base model.

    -

    $vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported.

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModelForBaseModel - - ( &$baseModel, constant $vocabulary, object Model $baseModel) -
    - -
      -
    • - object Model - $baseModel
    • -
    • - constant - $vocabulary
    • -
    • - - &$baseModel
    • -
    - - -
    - -
    - -
    - getResModel (line 172) -
    - - -

    Returns a ResModel.

    -

    $modelType has to be one of the following constants: MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new model from defined type. You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModel - - (constant $modelType, [string $baseURI = null]) -
    - -
      -
    • - constant - $modelType
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getResModelForBaseModel (line 201) -
    - - -

    Creates a ResModel that wraps an existing base model.

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModelForBaseModel - - ( &$baseModel, object Model $baseModel) -
    - - - - -
    - -
    - -
    - getSparqlClient (line 283) -
    - - -

    Creates a SparqlClient.

    -
      -
    • return: the SparqlClient object.
    • -
    • access: public
    • -
    - -
    - SparqlClient - - &getSparqlClient - - (String $server) -
    - -
      -
    • - String - $server: Link to a SPARQL endpoint.
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Node.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Node.html.svn-base deleted file mode 100755 index ffe37c97..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Node.html.svn-base +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Docs For Class Node - - - - -
    -

    Class Node

    - - -
    -
    Description
    - -
    - -

    An abstract RDF node.

    -

    Can either be resource, literal or blank node. Node is used in some comparisons like is_a($obj, "Node"), meaning is $obj a resource, blank node or literal.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • abstract:
    • -
    -

    - Located in /model/Node.php (line 21) -

    - - -
    Object
    -   |
    -   --Node
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    Literal - An RDF literal. -
    Resource - An RDF resource. -
    -
    -
    - - - - - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Resource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Resource.html.svn-base deleted file mode 100755 index b45966cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Resource.html.svn-base +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - Docs For Class Resource - - - - -
    -

    Class Resource

    - - -
    -
    Description
    - -
    - -

    An RDF resource.

    -

    Every RDF resource must have a URIref. URIrefs are treated as logical constants, i.e. as names which denote something (the things are called 'resources', but no assumptions are made about the nature of resources.) Many RDF resources are pieces of vocabulary. They typically have a namespace and a local name. In this case, a URI is composed as a concatenation of the namespace and the local name.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /model/Resource.php (line 25) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    BlankNode - An RDF blank node. -
    ResResource - An RDF Resource. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Resource - Resource - (string $namespace_or_uri, [string $localName = NULL]) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - string - getLabel - () -
    - -
    - string - getLocalName - () -
    - -
    - string - getNamespace - () -
    - -
    - string - getURI - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Resource (line 43) -
    - - -

    Constructor Takes an URI or a namespace/localname combination

    -
      -
    • access: public
    • -
    - -
    - Resource - - Resource - - (string $namespace_or_uri, [string $localName = NULL]) -
    - -
      -
    • - string - $namespace_or_uri
    • -
    • - string - $localName
    • -
    - - -
    - -
    - -
    - equals (line 111) -
    - - -

    Checks if the resource equals another resource.

    -

    Two resources are equal, if they have the same URI

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getLabel (line 66) -
    - - -

    Returns the label of the resource, which is the URI of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getLocalName (line 87) -
    - - -

    Returns the local name of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLocalName - - () -
    - - - -
    - -
    - -
    - getNamespace (line 75) -
    - - -

    Returns the namespace of the resource. May return null.

    -
      -
    • access: public
    • -
    - -
    - string - - getNamespace - - () -
    - - - -
    - -
    - -
    - getURI (line 57) -
    - - -

    Returns the URI of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getURI - - () -
    - - - -
    - -
    - -
    - toString (line 99) -
    - - -

    Dumps resource.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -
    Redefined in descendants as:
    - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Statement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Statement.html.svn-base deleted file mode 100755 index 2dd7fdb7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/Statement.html.svn-base +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - Docs For Class Statement - - - - -
    -

    Class Statement

    - - -
    -
    Description
    - -
    - -

    An RDF statement.

    -

    In this implementation, a statement is not itself a resource. If you want to use a a statement as subject or object of other statements, you have to reify it first.

    - -

    - Located in /model/Statement.php (line 17) -

    - - -
    Object
    -   |
    -   --Statement
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    InfStatement - An RDF statement which was entailed by a inference rule. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Statement - Statement - (object node $subj, object node $pred, object node $obj) -
    - -
    - boolean - compare - (object statement &$that) -
    - -
    - boolean - equals - (object statement $that) -
    - -
    - string - getLabelObject - () -
    - -
    - string - getLabelPredicate - () -
    - -
    - string - getLabelSubject - () -
    - -
    - object node - getObject - () -
    - -
    - object node - getPredicate - () -
    - -
    - object node - getSubject - () -
    - -
    - string - hashCode - () -
    - -
    - object node - object - () -
    - -
    - object node - predicate - () -
    - -
    - object model - &reify - (mixed &$model_or_bNodeID) -
    - -
    - object node - subject - () -
    - -
    - string - toString - () -
    - -
    - string - toStringObject - () -
    - -
    - string - toStringPredicate - () -
    - -
    - string - toStringSubject - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Statement (line 51) -
    - - -

    The parameters to constructor are instances of classes and not just strings

    -
      -
    • throws: PhpError
    • -
    - -
    - Statement - - Statement - - (object node $subj, object node $pred, object node $obj) -
    - -
      -
    • - object node - $subj
    • -
    • - object node - $pred
    • -
    • - object node - $obj
    • -
    - - -
    - -
    - -
    - compare (line 241) -
    - - -

    Compares two statements and returns integer less than, equal to, or greater than zero.

    -

    Can be used for writing sorting function for models or with the PHP function usort().

    -
      -
    • access: public
    • -
    - -
    - boolean - - compare - - (object statement &$that) -
    - -
      -
    • - object statement - &$that
    • -
    - - -
    - -
    - -
    - equals (line 217) -
    - - -

    Checks if two statements are equal.

    -

    Two statements are considered to be equal if they have the same subject, predicate and object. A statement can only be equal to another statement object.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object statement $that) -
    - -
      -
    • - object statement - $that
    • -
    - - -
    - -
    - -
    - getLabelObject (line 203) -
    - - -

    Reurns the URI, text or bNode identifier of the statements's object.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelObject - - () -
    - - - -
    - -
    - -
    - getLabelPredicate (line 193) -
    - - -

    Returns the URI of the statements's predicate.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelPredicate - - () -
    - - - -
    - -
    - -
    - getLabelSubject (line 183) -
    - - -

    Returns the URI or bNode identifier of the statements's subject.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelSubject - - () -
    - - - -
    - -
    - -
    - getObject (line 97) -
    - - -

    Returns the object of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 88) -
    - - -

    Returns the predicate of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getPredicate - - () -
    - - - -
    - -
    - -
    - getSubject (line 79) -
    - - -

    Returns the subject of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getSubject - - () -
    - - - -
    - -
    - -
    - hashCode (line 132) -
    - - -

    Retruns the hash code of the triple.

    -
      -
    • access: public
    • -
    - -
    - string - - hashCode - - () -
    - - - -
    - -
    - -
    - object (line 124) -
    - - -

    Alias for getObject()

    -
      -
    • access: public
    • -
    - -
    - object node - - object - - () -
    - - - -
    - -
    - -
    - predicate (line 115) -
    - - -

    Alias for getPredicate()

    -
      -
    • access: public
    • -
    - -
    - object node - - predicate - - () -
    - - - -
    - -
    - -
    - reify (line 257) -
    - - -

    Reifies a statement.

    -

    Returns a new MemModel that is the reification of the statement. For naming the statement's bNode a Model or bNodeID must be passed to the method.

    -
      -
    • access: public
    • -
    - -
    - object model - - &reify - - (mixed &$model_or_bNodeID) -
    - -
      -
    • - mixed - &$model_or_bNodeID
    • -
    - - -
    - -
    - -
    - subject (line 106) -
    - - -

    Alias for getSubject()

    -
      -
    • access: public
    • -
    - -
    - object node - - subject - - () -
    - - - -
    - -
    - -
    - toString (line 142) -
    - - -

    Dumps the triple.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    - -
    - -
    - toStringObject (line 173) -
    - - -

    Reurns a toString() serialization of the statements's object.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringObject - - () -
    - - - -
    - -
    - -
    - toStringPredicate (line 163) -
    - - -

    Returns a toString() serialization of the statements's predicate.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringPredicate - - () -
    - - - -
    - -
    - -
    - toStringSubject (line 153) -
    - - -

    Returns a toString() serialization of the statements's subject.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringSubject - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Blanknode.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Blanknode.php.html.svn-base deleted file mode 100755 index 096c35b5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Blanknode.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Blanknode.php - - - - -
    -

    /model/Blanknode.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - BlankNode - - An RDF blank node. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbModel.php.html.svn-base deleted file mode 100755 index b56379bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbModel.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page DbModel.php - - - - -
    -

    /model/DbModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DbModel - - This class provides methods for manipulating DbModels from DbStore. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Model.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbStore.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbStore.php.html.svn-base deleted file mode 100755 index 5f07a31a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---DbStore.php.html.svn-base +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - Docs for page DbStore.php - - - - -
    -

    /model/DbStore.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DbStore - - DbStore is a persistent store of RDF data using relational database technology. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'constants.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 3) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:49 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Literal.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Literal.php.html.svn-base deleted file mode 100755 index 171335ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Literal.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Literal.php - - - - -
    -

    /model/Literal.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Literal - - An RDF literal. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Node.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---MemModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---MemModel.php.html.svn-base deleted file mode 100755 index 6b03a998..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---MemModel.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page MemModel.php - - - - -
    -

    /model/MemModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - MemModel - - A MemModel is an RDF Model, which is stored in the main memory. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Model.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Model.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Model.php.html.svn-base deleted file mode 100755 index 12838281..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Model.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Model.php - - - - -
    -

    /model/Model.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Model - - Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:49 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---ModelFactory.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---ModelFactory.php.html.svn-base deleted file mode 100755 index ef0f93b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---ModelFactory.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ModelFactory.php - - - - -
    -

    /model/ModelFactory.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ModelFactory - - ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/DbStore.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Node.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Node.php.html.svn-base deleted file mode 100755 index ede2868b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Node.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Node.php - - - - -
    -

    /model/Node.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Node - - An abstract RDF node. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'/util/Object.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Resource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Resource.php.html.svn-base deleted file mode 100755 index c5b25836..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Resource.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Resource.php - - - - -
    -

    /model/Resource.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Resource - - An RDF resource. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Node.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Statement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Statement.php.html.svn-base deleted file mode 100755 index 1c0490a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_model---Statement.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Statement.php - - - - -
    -

    /model/Statement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Statement - - An RDF statement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_sparql---SPARQL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_sparql---SPARQL.php.html.svn-base deleted file mode 100755 index 74f7529b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/.svn/text-base/_sparql---SPARQL.php.html.svn-base +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - Docs for page SPARQL.php - - - - -
    -

    /sparql/SPARQL.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Constraint.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/GraphPattern.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/FilterFunctions.php') - (line 11) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Query.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/QueryTriple.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParser.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlEngine.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParserException.php') - (line 16) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Mon, 26 Jun 2006 14:26:13 +0200 by phpDocumentor 1.3.0RC6 -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/BlankNode.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/BlankNode.html deleted file mode 100755 index 56993c75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/BlankNode.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - Docs For Class BlankNode - - - - -
    -

    Class BlankNode

    - - -
    -
    Description
    - -
    - -

    An RDF blank node.

    -

    In model theory, blank nodes are considered to be drawn from some set of 'anonymous' entities which have no label but are unique to the graph. For serialization they are labeled with a URI or a _:X identifier.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: BlankNode.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/Blanknode.php (line 23) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --BlankNode
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - BlankNode - BlankNode - (mixed $namespace_or_uri_or_model, [string $localName = NULL]) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - string - getID - () -
    - -
    - string - getLabel - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor BlankNode (line 33) -
    - - -

    Constructor You can supply a label or You supply a model and a unique ID is gernerated.

    -
      -
    • access: public
    • -
    - -
    - BlankNode - - BlankNode - - (mixed $namespace_or_uri_or_model, [string $localName = NULL]) -
    - -
      -
    • - mixed - $namespace_or_uri_or_model
    • -
    • - string - $localName
    • -
    - - -
    - -
    - -
    - equals (line 90) -
    - - -

    Checks if two blank nodes are equal.

    -

    Two blank nodes are equal, if they have the same temporary ID.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - -
    -
    Redefinition of:
    -
    -
    Resource::equals()
    -
    Checks if the resource equals another resource.
    -
    - -
    - -
    - -
    - getID (line 57) -
    - - -

    Returns the ID of the blank node.

    -
      -
    • access: public
    • -
    - -
    - string - - getID - - () -
    - - - -
    - -
    - -
    - getLabel (line 67) -
    - - -

    Returns the ID of the blank node.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Resource::getLabel()
    -
    Returns the label of the resource, which is the URI of the resource.
    -
    - -
    - -
    - -
    - toString (line 77) -
    - - -

    Dumps bNode.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Resource::toString()
    -
    Dumps resource.
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbModel.html deleted file mode 100755 index 103b3fdd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbModel.html +++ /dev/null @@ -1,1628 +0,0 @@ - - - - - - Docs For Class DbModel - - - - -
    -

    Class DbModel

    - - -
    -
    Description
    - -
    - -

    This class provides methods for manipulating DbModels from DbStore.

    -

    A DbModel is an RDF Model, which is persistently stored in a relational database. This Class uses the ADOdb Database Abstraction Library for PHP (http://adodb.sourceforge.net/).

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id: DbModel.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/DbModel.php (line 22) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --DbModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    NamedGraphDb - Persistent NamedGraph implementation that extends a DbModel. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DbModel - DbModel - (object ADOConnection &$dbConnection, string $modelURI, string $modelID, [string $baseURI = NULL]) -
    - -
    - mixed - add - (object Statement &$statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - ( $prefix,  $nmsp, String $prefix,) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - void - addWithoutDuplicates - (object Statement &$statement) -
    - -
    - void - close - () -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - void - delete - () -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - object MemModel - find - (object Resource $subject, object Resource $predicate, object Node $object) -
    - -
    - integer - findCount - (object Resource $subject, object Resource $predicate, object Node $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Resource $subject, object Resource $predicate, object Node $object, [integer $offset = -1]) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - ADOdb - &getDbConn - () -
    - - - -
    - int - getModelID - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - -
    - object FindIterator - &iterFind - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - array - rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object MemModel - &reify - () -
    - -
    - void - remove - (object Statement &$statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - void - replace - (object Resource $subject, object Resource $predicate, object Node $object, object Node $replacement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - &subtract - ( &$model, object Model $model) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DbModel (line 65) -
    - - -

    Constructor Do not call this directly.

    -

    Use the method getModel,getNewModel or putModel of the Class DbStore instead.

    -
      -
    • access: public
    • -
    - -
    - DbModel - - DbModel - - (object ADOConnection &$dbConnection, string $modelURI, string $modelID, [string $baseURI = NULL]) -
    - -
      -
    • - object ADOConnection - &$dbConnection
    • -
    • - string - $modelURI
    • -
    • - string - $modelID
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 131) -
    - - -

    Add a new triple to this DbModel.

    -
      -
    • return: true on success, false if the statement is already in the model, error message (string) on failure
    • -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - mixed - - add - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - addModel (line 881) -
    - - -

    Add the given model to this DbModel.

    -

    This function monitors for SQL errors, and will commit if no errors have occured, otherwise it will rollback. If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - addNamespace (line 1194) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - ( $prefix,  $nmsp, String $prefix,) -
    - -
      -
    • - String - $prefix,: String $nmsp
    • -
    • - - $prefix
    • -
    • - - $nmsp
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 1179) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 183) -
    - - -

    Alias for the method add().

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - addWithoutDuplicates - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - close (line 953) -
    - - -

    Close this DbModel

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - contains (line 345) -
    - - -

    Check if the DbModel contains the given statement.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - containsAll (line 366) -
    - - -

    Determine if all of the statements in the given model are also contained in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - - - - -
    - -
    - -
    - containsAny (line 399) -
    - - -

    Determine if any of the statements in the given model are also contained in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - - - - -
    - -
    - -
    - delete (line 933) -
    - - -

    Remove this DbModel from database and clean up.

    -

    This function monitors for SQL errors, and will commit if no errors have occured, otherwise it will rollback.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - delete - - () -
    - - - -
    - -
    - -
    - equals (line 747) -
    - - -

    Check if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    Warning: This method doesn't work correct with models where the same blank node has different identifiers in the two models. We will correct this in a future version.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 439) -
    - - -

    General method to search for triples in the DbModel.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Resource $subject, object Resource $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findCount (line 588) -
    - - -

    Search for triples and return the number of matches.

    -

    NULL input for any parameter will match anything.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - integer - - findCount - - (object Resource $subject, object Resource $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 542) -
    - - -

    Search for triples and return the first matching statement.

    -

    NULL input for any parameter will match anything. Return an NULL if nothing is found. You can set an search offset with $offset.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Resource $subject, object Resource $predicate, object Node $object, [integer $offset = -1]) -
    - - - - -
    - -
    - -
    - findRegex (line 489) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Return an empty MemModel if nothing is found. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: Mhis method loads a DbModel into memory and performs the search on a MemModel, which can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - - -
    - -
    - -
    - findVocabulary (line 509) -
    - - -

    Return all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Return an empty model if nothing is found.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - - -
    - -
    - -
    - getDbConn (line 273) -
    - - -

    Returns the database connection object

    -
      -
    • return: Database object
    • -
    • access: public
    • -
    - -
    - ADOdb - - &getDbConn - - () -
    - - - -
    - -
    - -
    - getMemModel (line 246) -
    - - -

    Create a MemModel containing all the triples of the current DbModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - () -
    - - - -
    - -
    - -
    - getModelID (line 260) -
    - - -

    Returns the model id

    -
      -
    • return: Model id number
    • -
    • access: public
    • -
    - -
    - int - - getModelID - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 1154) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - intersect (line 850) -
    - - -

    Return a new MemModel containing all the statements which are in both this model and the given model.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - isEmpty (line 113) -
    - - -

    Check if this DbModel is empty.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - iterFind (line 1244) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &iterFind - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 629) -
    - - -

    Perform an RDQL query on this DbModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 663) -
    - - -

    Perform an RDQL query on this DBModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - reify (line 919) -
    - - -

    Reify the DbModel.

    -

    Return a new MemModel that contains the reifications of all statements of this DbModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &reify - - () -
    - - - -
    - -
    - -
    - remove (line 197) -
    - - -

    Remove the given triple from this DbModel.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - remove - - (object Statement &$statement) -
    - - - - -
    - -
    - -
    - removeNamespace (line 1259) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - replace (line 684) -
    - - -

    General method to replace nodes of a DbModel.

    -

    NULL input for any parameter will match nothing. Example: $m->replace($resource, NULL, $node, $replacement); Replaces all $node objects beeing subject or object in any triple of the model with the $replacement node. Throw an error in case of a paramter mismatch.

    -
      -
    • throws: SqlError
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Resource $subject, object Resource $predicate, object Node $object, object Node $replacement) -
    - - - - -
    - -
    - -
    - saveAs (line 330) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the DbModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    - -
    - -
    - setBaseURI (line 82) -
    - - -

    Set a base URI for the DbModel.

    -

    Affects creating of new resources and serialization syntax.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 99) -
    - - -

    Return the number of statements in this DbModel.

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    - -
    - -
    - subtract (line 819) -
    - - -

    Return a new MemModel that is the subtraction of another model from this DbModel.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &subtract - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - toString (line 220) -
    - - -

    Short dump of the DbModel.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    - -
    - -
    - toStringIncludingTriples (line 232) -
    - - -

    Dump of the DbModel including all triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - - -
    - -
    - -
    - unite (line 788) -
    - - -

    Return a new MemModel that is the set-union the model with another model.

    -

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - writeAsHtml (line 285) -
    - - -

    Write the RDF serialization of the _DbModel as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - - -
    - -
    - -
    - writeAsHtmlTable (line 297) -
    - - -

    Write the RDF serialization of the DbModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - - -
    - -
    - -
    - writeRdfToString (line 310) -
    - - -

    Write the RDF serialization of the DbModel to string.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:48 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbStore.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbStore.html deleted file mode 100755 index a40c5d3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/DbStore.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - Docs For Class DbStore - - - - -
    -

    Class DbStore

    - - -
    -
    Description
    - -
    - -

    DbStore is a persistent store of RDF data using relational database technology.

    -

    DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB), which allows to connect to multiple databases in a portable manner. This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server. If you want to use other databases, you will have to create tables by yourself according to the abstract database schema described in the API documentation.

    You can activate debug mode by defining ADODB_DEBUG_MODE to "1".

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: DbStore.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/DbStore.php (line 29) -

    - - -
    Object
    -   |
    -   --DbStore
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - DbStore - DbStore - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
    - void - close - () -
    - -
    - void - createTables - (string $databaseType) -
    - -
    - boolean - datasetExists - ($datasetName $datasetName) -
    - -
    - object DatasetDb - &getDatasetDb - ($datasetId $datasetName) -
    - -
    - object DbModel - getModel - (string $modelURI) -
    - -
    - object NamedGraphMem - getNamedGraphDb - ($modelURI $modelURI, $graphName $graphName) -
    - -
    - object DatasetDB - &getNewDatasetDb - ($datasetName $datasetName) -
    - -
    - object DbModel - getNewModel - (string $modelURI, [string $baseURI = NULL]) -
    - -
    - object namedGraphDb - getNewNamedGraphDb - ($modelURI $modelURI, $graphName $graphName, [$baseURI $baseURI = NULL]) -
    - -
    - void - isSetup - ([string $databaseType = "MySQL"]) -
    - -
    - array - listModels - () -
    - -
    - boolean - modelExists - (string $modelURI) -
    - -
    - boolean - putModel - (object Model &$model, [string $modelURI = NULL]) -
    - -
    - boolean - removeNamedGraphDb - ($modelURI $modelURI) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor DbStore (line 51) -
    - - -

    Constructor: Set the database connection with the given parameters.

    -
      -
    • access: public
    • -
    - -
    - DbStore - - DbStore - - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
      -
    • - string - $dbDriver
    • -
    • - string - $host
    • -
    • - string - $dbName
    • -
    • - string - $user
    • -
    • - string - $password
    • -
    - - -
    - -
    - -
    - close (line 247) -
    - - -

    Close the DbStore.

    -

    !!! Warning: If you close the DbStore all active instances of DbModel from this !!! DbStore will lose their database connection !!!

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - createTables (line 87) -
    - - -

    Create tables and indexes for the given database type.

    -

    Currently supported: MsAccess and MySQL. If you want to use other databases, you will have to create tables by yourself according to the abstract <a href="database_schema.html">database schema</a> described in the API documentation.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - createTables - - (string $databaseType) -
    - -
      -
    • - string - $databaseType
    • -
    - - -
    - -
    - -
    - datasetExists (line 591) -
    - - -

    Check if the Dataset with the given $datasetName is already stored in the database

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - datasetExists - - ($datasetName $datasetName) -
    - -
      -
    • - $datasetName - $datasetName: string
    • -
    - - -
    - -
    - -
    - getDatasetDb (line 614) -
    - - -

    Create a new instance of DatasetDb with the given $datasetName and load the corresponding values from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object DatasetDb - - &getDatasetDb - - ($datasetId $datasetName) -
    - -
      -
    • - $datasetId - $datasetName: string
    • -
    - - -
    - -
    - -
    - getModel (line 167) -
    - - -

    Create a new instance of DbModel with the given $modelURI and load the corresponding values of modelID and baseURI from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - getModel - - (string $modelURI) -
    - -
      -
    • - string - $modelURI
    • -
    - - -
    - -
    - -
    - getNamedGraphDb (line 635) -
    - - -

    Create a new instance of namedGraphDb with the given $modelURI and graphName and load the corresponding values of modelID and baseURI from the database.

    -

    Return FALSE if the DbModel does not exist.

    -
      -
    • access: public
    • -
    - -
    - object NamedGraphMem - - getNamedGraphDb - - ($modelURI $modelURI, $graphName $graphName) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    • - $graphName - $graphName: string
    • -
    - - -
    - -
    - -
    - getNewDatasetDb (line 559) -
    - - -

    Create a new instance of DatasetDb with the given $datasetName and insert the DatasetDb variables into the database.

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object DatasetDB - - &getNewDatasetDb - - ($datasetName $datasetName) -
    - -
      -
    • - $datasetName - $datasetName: string
    • -
    - - -
    - -
    - -
    - getNewModel (line 193) -
    - - -

    Create a new instance of DbModel with the given $modelURI and insert the DbModel variables into the database.

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object DbModel - - getNewModel - - (string $modelURI, [string $baseURI = NULL]) -
    - -
      -
    • - string - $modelURI
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getNewNamedGraphDb (line 664) -
    - - -

    Create a new instance of namedGraphDb with the given $modelURI and graphName and insert the DbModel variables into the database (not the graphName. This is only stored persistently, when added to dataset).

    -

    Return FALSE if there is already a model with the given URI.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - object namedGraphDb - - getNewNamedGraphDb - - ($modelURI $modelURI, $graphName $graphName, [$baseURI $baseURI = NULL]) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    • - $graphName - $graphName: string
    • -
    • - $baseURI - $baseURI: string
    • -
    - - -
    - -
    - -
    - isSetup (line 472) -
    - - -

    Checks if tables are setup for RAP

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - void - - isSetup - - ([string $databaseType = "MySQL"]) -
    - -
      -
    • - string - $databaseType
    • -
    - - -
    - -
    - -
    - listModels (line 110) -
    - - -

    List all DbModels stored in the database.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - array - - listModels - - () -
    - - - -
    - -
    - -
    - modelExists (line 140) -
    - - -

    Check if the DbModel with the given modelURI is already stored in the database

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - modelExists - - (string $modelURI) -
    - -
      -
    • - string - $modelURI
    • -
    - - -
    - -
    - -
    - putModel (line 223) -
    - - -

    Store a MemModel or another DbModel from a different DbStore in the database.

    -

    Return FALSE if there is already a model with modelURI matching the modelURI of the given model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - putModel - - (object Model &$model, [string $modelURI = NULL]) -
    - - - - -
    - -
    - -
    - removeNamedGraphDb (line 693) -
    - - -

    Removes the graph with all statements from the database.

    -

    Warning: A single namedGraph can be added to several datasets. So it'll be removed from all datasets.

    -
      -
    • throws: SqlError
    • -
    • access: public
    • -
    - -
    - boolean - - removeNamedGraphDb - - ($modelURI $modelURI) -
    - -
      -
    • - $modelURI - $modelURI: string
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Literal.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Literal.html deleted file mode 100755 index 7fcfcad4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Literal.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - Docs For Class Literal - - - - -
    -

    Class Literal

    - - -
    -
    Description
    - -
    - -

    An RDF literal.

    -

    The literal supports the xml:lang and rdf:datatype property. For XML datatypes see: http://www.w3.org/TR/xmlschema-2/

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • author: Daniel Westphal <dawe@gmx.de>
    • -
    • version: $Id: Literal.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/Literal.php (line 21) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Literal
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    ResLiteral - An RDF literal. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Literal - Literal - (string $str, [string $language = NULL]) -
    - -
    - boolean - equals - (object literal $that) -
    - -
    - string - getDatatype - () -
    - -
    - string - getLabel - () -
    - -
    - string - getLanguage - () -
    - -
    - void - setDatatype - (string $datatype) -
    - -
    - void - setLanguage - (string $lang) -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Literal (line 51) -
    - - -

    Constructor

    - -
    - Literal - - Literal - - (string $str, [string $language = NULL]) -
    - -
      -
    • - string - $str: label of the literal
    • -
    • - string - $language: optional language identifier
    • -
    - - -
    - -
    - -
    - equals (line 134) -
    - - -

    Checks if ihe literal equals another literal.

    -

    Two literals are equal, if they have the same label and they have the same language/datatype or both have no language/datatype property set.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object literal $that) -
    - -
      -
    • - object literal - $that
    • -
    - - -
    - -
    - -
    - getDatatype (line 103) -
    - - -

    Returns the datatype of the literal.

    -
      -
    • return: datatype of the literal
    • -
    • access: public
    • -
    - -
    - string - - getDatatype - - () -
    - - - -
    - -
    - -
    - getLabel (line 70) -
    - - -

    Returns the string value of the literal.

    -
      -
    • return: value of the literal
    • -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - - -
    - -
    - -
    - getLanguage (line 81) -
    - - -

    Returns the language of the literal.

    -
      -
    • return: language of the literal
    • -
    • access: public
    • -
    - -
    - string - - getLanguage - - () -
    - - - -
    - -
    - -
    - setDatatype (line 117) -
    - - -

    Sets the datatype of the literal.

    -

    Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER. The array $short_datatype with the possible shortcuts is definded in ../constants.php

    -
      -
    • access: public
    • -
    - -
    - void - - setDatatype - - (string $datatype) -
    - -
      -
    • - string - $datatype: URI of XML datatype or datatype shortcut
    • -
    - - -
    - -
    - -
    - setLanguage (line 92) -
    - - -

    Sets the language of the literal.

    -
      -
    • access: public
    • -
    - -
    - void - - setLanguage - - (string $lang) -
    - -
      -
    • - string - $lang
    • -
    - - -
    - -
    - -
    - toString (line 159) -
    - - -

    Dumps literal.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/MemModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/MemModel.html deleted file mode 100755 index c1bd34cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/MemModel.html +++ /dev/null @@ -1,1827 +0,0 @@ - - - - - - Docs For Class MemModel - - - - -
    -

    Class MemModel

    - - -
    -
    Description
    - -
    - -

    A MemModel is an RDF Model, which is stored in the main memory.

    -

    This class provides methods for manipulating MemModels.

    - -

    - Located in /model/MemModel.php (line 24) -

    - - -
    Object
    -   |
    -   --Model
    -      |
    -      --MemModel
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    NamedGraphMem - NamedGraph implementation that extends a MemModel with a name. -
    InfModel - A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - MemModel - ([string $baseURI = NULL]) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - (String $prefix, String $nmsp) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - boolean - addWithoutDuplicates - (object Statement $statement) -
    - -
    - void - close - () -
    - -
    - boolean - contains - (object Statement &$statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - object MemModel - find - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object FindIterator - &findAsIterator - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - integer - findCount - (object Node $subject, object Node $predicate, object Node $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - object MemModel - findRegex - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
    - object MemModel - findVocabulary - (string $vocabulary) -
    - -
    - int - getIndexType - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object StatementIterator - &getStatementIterator - () -
    - -
    - void - index - (int $mode) -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - -
    - boolean - isIndexed - () -
    - -
    - object FindIterator - &iterFind - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
    - array - rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object MemModel - &reify - () -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - void - replace - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - &subtract - ( &$model, object Model $model) -
    - -
    - string - toString - () -
    - -
    - string - toStringIncludingTriples - () -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHtml - () -
    - -
    - void - writeAsHtmlTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Model

    -
    - - Model::$queryParser
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor MemModel (line 75) -
    - - -

    Constructor You can supply a base_uri

    -
      -
    • access: public
    • -
    - -
    - MemModel - - MemModel - - ([string $baseURI = NULL]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - add (line 131) -
    - - -

    Adds a new triple to the MemModel without checking if the statement is already in the MemModel.

    -

    So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add())

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModel::add() - : Adds a new triple to the Model without checking if the statement is already in the Model. -
    • -
    • - InfModelB::add() - : Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) -
    • -
    • - InfModelF::add() - : Adds a new triple to the MemModel without checking if the statement is already in the MemModel. -
    • -
    -
    - -
    - -
    - addModel (line 1107) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - addNamespace (line 1235) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - (String $prefix, String $nmsp) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 1221) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 170) -
    - - -

    Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - close (line 1262) -
    - - -

    Close the MemModel and free up resources held.

    -
      -
    • access: public
    • -
    - -
    - void - - close - - () -
    - - - -
    - -
    - -
    - contains (line 359) -
    - - -

    Tests if the MemModel contains the given triple.

    -

    TRUE if the triple belongs to the MemModel; FALSE otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object Statement &$statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - containsAll (line 386) -
    - - -

    Determine if all of the statements in a model are also contained in this MemModel.

    -

    True if all of the statements in $model are also contained in this MemModel and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - - - - -
    - -
    - -
    - containsAny (line 411) -
    - - -

    Determine if any of the statements in a model are also contained in this MemModel.

    -

    True if any of the statements in $model are also contained in this MemModel and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - - - - -
    - -
    - -
    - equals (line 944) -
    - - -

    Checks if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 522) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object. Returns an empty MemModel if nothing is found.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - find - - (object Node $subject, object Node $predicate, object Node $object) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findAsIterator (line 1173) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &findAsIterator - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findCount (line 802) -
    - - -

    Searches for triples and returns the number of matches.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findCount( NULL, NULL, $node ); Finds all triples with $node as object.

    -
      -
    • access: public
    • -
    - -
    - integer - - findCount - - (object Node $subject, object Node $predicate, object Node $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 682) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement of the MemModel where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search for. Default = 0

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findRegex (line 606) -
    - - -

    Method to search for triples using Perl-style regular expressions.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Returns an empty MemModel if nothing is found.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findRegex - - (string $subject_regex, string $predicate_regex, string $object_regex) -
    - -
      -
    • - string - $subject_regex
    • -
    • - string - $predicate_regex
    • -
    • - string - $object_regex
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - findVocabulary (line 638) -
    - - -

    Returns all tripels of a certain vocabulary.

    -

    $vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Returns an empty MemModel if nothing is found.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - findVocabulary - - (string $vocabulary) -
    - -
      -
    • - string - $vocabulary
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getIndexType (line 503) -
    - - -

    Returns the indextype: -1 if there is no index, 0 if there are indices over S,P,O(separate),

    1. if there is an index over SPO, 2 if there is an index over SP and 3 if
    there is an index over SO.

    -
      -
    • access: public
    • -
    - -
    - int - - getIndexType - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 1202) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - getStatementIterator (line 1160) -
    - - -

    Returns a StatementIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object StatementIterator - - &getStatementIterator - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - index (line 447) -
    - - -

    Builds a search index for the statements in the MemModel.

    -

    The index is used by the find(),contains(),add() and remove() functions. Performance example using a model with 43000 statements on a Linux machine: Find without index takes 1.7 seconds. Indexing takes 1.8 seconds. Find with index takes 0.001 seconds. So if you want to query a model more then once, build a index first. The defaultindex is indices over subject, predicate, object seperate.

    mode = 0 : indices over subject,predicate,object (default) mode = 1 : index over subject+predicate+object mode = 2 : index over subject+predicate mode = 3 : index over subject+object

    -
      -
    • access: public
    • -
    - -
    - void - - index - - (int $mode) -
    - -
      -
    • - int - $mode
    • -
    - - -
    - -
    - -
    - intersect (line 1063) -
    - - -

    Returns a new MemModel containing all the statements which are in both this MemModel and another.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - isEmpty (line 114) -
    - - -

    Checks if MemModel is empty

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - isIndexed (line 485) -
    - - -

    Returns true if there is an index, false if not.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isIndexed - - () -
    - - - -
    - -
    - -
    - iterFind (line 1186) -
    - - -

    Returns a FindIterator for traversing the MemModel.

    -
      -
    • access: public
    • -
    - -
    - object FindIterator - - &iterFind - - ([ $sub = null], [ $pred = null], [ $obj = null]) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $obj
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 823) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 858) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - reify (line 1142) -
    - - -

    Reifies the MemModel.

    -

    Returns a new MemModel that contains the reifications of all statements of this MemModel.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &reify - - () -
    - - - -
    - -
    - -
    - remove (line 195) -
    - - -

    Removes the triple from the MemModel.

    -

    TRUE if the triple is removed. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - removeNamespace (line 1246) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - replace (line 878) -
    - - -

    General method to replace nodes of a MemModel.

    -

    NULL input for any parameter will match nothing. Example: $m->replace($node, NULL, $node, $replacement); Replaces all $node objects beeing subject or object in any triple of the MemModel with the $needle node.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - replace - - (object Node $subject, object Node $predicate, object Node $object, object Node $replacement) -
    - - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - saveAs (line 325) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the MemModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::saveAs() - : Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file. -
    • -
    -
    - -
    - -
    - setBaseURI (line 87) -
    - - -

    Set a base URI for the MemModel.

    -

    Affects creating of new resources and serialization syntax. If the URI doesn't end with # : or /, then a # is added to the URI.

    -
      -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 104) -
    - - -

    Number of triples in the MemModel

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - subtract (line 1025) -
    - - -

    Returns a new MemModel that is the subtraction of another model from this MemModel.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &subtract - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - toString (line 249) -
    - - -

    Short Dump of the MemModel.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - toStringIncludingTriples (line 259) -
    - - -

    Dumps of the MemModel including all triples.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringIncludingTriples - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - unite (line 989) -
    - - -

    Returns a new MemModel that is the set-union of the MemModel with another model.

    -

    Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - - - - -
    - -
    - -
    - writeAsHtml (line 275) -
    - - -

    Writes the RDF serialization of the MemModel as HTML.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtml - - () -
    - - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelB::writeAsHtml() - : Writes the RDF serialization of the Model including ALL inferable triples as HTML. -
    • -
    -
    - -
    - -
    - writeAsHtmlTable (line 290) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHtmlTable - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - writeRdfToString (line 303) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    -

    Inherited Methods

    - - -

    Inherited From Model

    -
    - Model::Model()
    - Model::findForward()
    - Model::getBaseURI()
    - Model::getMemModelByRDQL()
    - Model::getOntModel()
    - Model::getResModel()
    - Model::load()
    - Model::sparqlPrepare()
    - Model::sparqlQuery()
    - Model::visualize()
    - Model::_parseSparqlQuery()
    - Model::_prepareSparql()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:48 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Model.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Model.html deleted file mode 100755 index c34ed45d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Model.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - Docs For Class Model - - - - -
    -

    Class Model

    - - -
    -
    Description
    - -
    - -

    Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.

    -

    An RDF graph is a directed labeled graph, as described in http://www.w3.org/TR/rdf-mt/. It can be defined as a set of <S, P, O> triples, where P is a uriref, S is either a uriref or a blank node, and O is either a uriref, a blank node, or a literal.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • author: Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id: Model.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/Model.php (line 21) -

    - - -
    Object
    -   |
    -   --Model
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    DbModel - This class provides methods for manipulating DbModels from DbStore. -
    MemModel - A MemModel is an RDF Model, which is stored in the main memory. -
    -
    -
    - - - -
    -
    Variable Summary
    - -
    -
    -
    - Parser - $queryParser -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - Model - Model - () -
    - -
    - object MemModel - findForward - (object Node $subject, object Node $predicate, object MemModel $object, [ &$newModel = NULL]) -
    - -
    - string - getBaseURI - () -
    - -
    - object MemModel - &getMemModelByRDQL - (string $queryString, [boolean $closure = FALSE]) -
    - -
    - object OntModel - &getOntModel - (constant $vocabulary) -
    - -
    - object ResModel - &getResModel - () -
    - -
    - void - load - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - - - -
    - string/array - sparqlQuery - (string $query, [string $resultform = false]) -
    - -
    - string, - visualize - ([string $format = "dot"], [boolean $short_prefix = TRUE]) -
    - -
    - Query - _parseSparqlQuery - ($query $query) -
    - -
    - array - _prepareSparql - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - Parser - $queryParser - = null (line 44) - -
    - - -

    SparqlParser so we can re-use it

    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Model (line 54) -
    - - -

    Notice for people who are used to work with older versions of RAP.

    -
      -
    • throws: PHPError
    • -
    • access: public
    • -
    - -
    - Model - - Model - - () -
    - - - -
    - -
    - -
    - findForward (line 265) -
    - - -

    Searches for triples using find() and tracks forward blank nodes until the final objects in the retrieved subgraphs are all named resources.

    -

    The method calls itself recursivly until the result is complete. NULL input for subject, predicate or object will match anything. Inputparameters are ignored for recursivly found statements. Returns a new MemModel or adds (without checking for duplicates) the found statements to a given MemModel. Returns an empty MemModel, if nothing is found. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: This method can be slow with large models. NOTE: Blank nodes are not renamed, they keep the same nodeIDs as in the queried model! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    - - -
    - object MemModel - - findForward - - (object Node $subject, object Node $predicate, object MemModel $object, [ &$newModel = NULL]) -
    - - - - -
    - -
    - -
    - getBaseURI (line 71) -
    - - -

    Return current baseURI.

    -
      -
    • access: public
    • -
    - -
    - string - - getBaseURI - - () -
    - - - -
    - -
    - -
    - getMemModelByRDQL (line 319) -
    - - -

    Perform an RDQL query on this Model. Should work with all types of models.

    -

    This method returns a MemModel containing the result statements. If $closure is set to TRUE, the result will additionally contain statements found by the findForward-method for blank nodes. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: If called with $closure = TRUE this method can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • author: code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer
    • -
    • author: Anton K�tlbacher <anton1@koestlbacher.de>
    • -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModelByRDQL - - (string $queryString, [boolean $closure = FALSE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $closure
    • -
    - - -
    - -
    - -
    - getOntModel (line 234) -
    - - -

    Returns an OntModel with this model as baseModel.

    -

    $vocabulary has to be one of the following constants (currently only one is supported): RDFS_VOCABULARY to select a RDFS Vocabulary.

    This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary).

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModel - - (constant $vocabulary) -
    - -
      -
    • - constant - $vocabulary
    • -
    - - -
    - -
    - -
    - getResModel (line 216) -
    - - -

    Returns a ResModel with this model as baseModel. This is the same as ModelFactory::getResModelForBaseModel($this).

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModel - - () -
    - - - -
    - -
    - -
    - load (line 89) -
    - - -

    Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    • - boolean - $stream
    • -
    - - -
    -
    Redefined in descendants as:
    -
      -
    • - InfModelF::load() - : Load a model from a file containing RDF, N3 or N-Triples. -
    • -
    -
    - -
    - -
    - sparqlPrepare (line 469) -
    - - -

    Prepares a sparql query and returns a prepared statement that can be executed with data later on.

    -
      -
    • return: prepared statement object
    • -
    - -
    - SparqlEngine_PreparedStatement - - sparqlPrepare - - (string $query) -
    - -
      -
    • - string - $query: Sparql query to prepare.
    • -
    - - -
    - -
    - -
    - sparqlQuery (line 450) -
    - - -

    Performs a SPARQL query against a model. The model is converted to an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or as an array containing the variables an their bindings.

    - -
    - string/array - - sparqlQuery - - (string $query, [string $resultform = false]) -
    - -
      -
    • - string - $query: the sparql query string
    • -
    • - string - $resultform: the result form ('xml' for SPARQL Query Results XML Format)
    • -
    - - -
    - -
    - -
    - visualize (line 435) -
    - - -

    Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)

    -

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Note: See RDFUtil for further Information. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    -
      -
    • return: binary
    • -
    • author: Anton K�tlbacher <anton1@koestlbacher.de>
    • -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - string, - - visualize - - ([string $format = "dot"], [boolean $short_prefix = TRUE]) -
    - -
      -
    • - string - $format
    • -
    • - boolean - $short_prefix
    • -
    - - -
    - -
    - -
    - _parseSparqlQuery (line 512) -
    - - -

    Parses an query and returns the parsed form.

    -

    If the query is not a string but a Query object, it will just be returned.

    -
      -
    • return: query object
    • -
    • throws: Exception If $query is no string and no Query object
    • -
    - -
    - Query - - _parseSparqlQuery - - ($query $query) -
    - -
      -
    • - $query - $query: mixed String or Query object
    • -
    - - -
    - -
    - -
    - _prepareSparql (line 487) -
    - - -

    Prepares everything for SparqlEngine-usage Loads the files, creates instances for SparqlEngine and Dataset...

    -
      -
    • return: First value is the sparql engine, second the dataset
    • -
    - -
    - array - - _prepareSparql - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/ModelFactory.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/ModelFactory.html deleted file mode 100755 index f508d8bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/ModelFactory.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - Docs For Class ModelFactory - - - - -
    -

    Class ModelFactory

    - - -
    -
    Description
    - -
    - -

    ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.

    - -

    - Located in /model/ModelFactory.php (line 23) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - &getDatasetMem - ([string $graphSetId = null], string $uri) -
    - -
    - object DbModel - &getDbModel - (object DbStore $dbStore, [string $baseURI = null]) -
    - -
    - object DbStore - &getDbStore - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
    - object DbModel - &getDefaultDbModel - ([string $baseURI = null]) -
    - -
    - object MemModel - &getDefaultModel - ([string $baseURI = null]) -
    - -
    - object MemModel - &getInfModelB - ([string $baseURI = null]) -
    - -
    - object MemModel - &getInfModelF - ([string $baseURI = null]) -
    - -
    - object MemModel - &getMemModel - ([string $baseURI = null]) -
    - -
    - object OntModel - &getOntModel - (constant $modelType, constant $vocabulary, [string $baseURI = null]) -
    - -
    - object OntModel - &getOntModelForBaseModel - ( &$baseModel, constant $vocabulary, object Model $baseModel) -
    - -
    - object ResModel - &getResModel - (constant $modelType, [string $baseURI = null]) -
    - -
    - object ResModel - &getResModelForBaseModel - ( &$baseModel, object Model $baseModel) -
    - -
    - SparqlClient - &getSparqlClient - (String $server) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - getDatasetMem (line 46) -
    - - -

    Returns a NamedGraphSetMem.

    -

    You can supply a GraphSet name.

    -
      -
    • access: public
    • -
    - -
    - void - - &getDatasetMem - - ([string $graphSetId = null], string $uri) -
    - -
      -
    • - string - $graphSetId
    • -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getDbModel (line 98) -
    - - -

    Returns a new DbModel using the database connection supplied by $dbStore.

    -

    You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - &getDbModel - - (object DbStore $dbStore, [string $baseURI = null]) -
    - - - - -
    - -
    - -
    - getDbStore (line 119) -
    - - -

    Returns a database connection with the given parameters.

    -

    Paramters, which are not defined are taken from the constants.php

    -
      -
    • access: public
    • -
    - -
    - object DbStore - - &getDbStore - - ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD]) -
    - -
      -
    • - string - $dbDriver
    • -
    • - string - $host
    • -
    • - string - $dbName
    • -
    • - string - $user
    • -
    • - string - $password
    • -
    - - -
    - -
    - -
    - getDefaultDbModel (line 79) -
    - - -

    Returns a DbModel with the database connection defined in constants.php.

    -

    You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

    -
      -
    • access: public
    • -
    - -
    - object DbModel - - &getDefaultDbModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getDefaultModel (line 33) -
    - - -

    Returns a MemModel.

    -

    You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getDefaultModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getInfModelB (line 153) -
    - - -

    Returns a InfModelB.

    -

    (MemModel with backward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getInfModelB - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getInfModelF (line 136) -
    - - -

    Returns a InfModelF.

    -

    (MemModel with forward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getInfModelF - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getMemModel (line 61) -
    - - -

    Returns a MemModel.

    -

    You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &getMemModel - - ([string $baseURI = null]) -
    - -
      -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getOntModel (line 221) -
    - - -

    Returns an OntModel.

    -

    $modelType has to be one of the following constants: MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel with a new model from defined type. $vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported. You can supply a model base URI.

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModel - - (constant $modelType, constant $vocabulary, [string $baseURI = null]) -
    - -
      -
    • - constant - $modelType
    • -
    • - constant - $vocabulary
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getOntModelForBaseModel (line 255) -
    - - -

    Creates an OntModel that wraps an existing base model.

    -

    $vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported.

    -
      -
    • access: public
    • -
    - -
    - object OntModel - - &getOntModelForBaseModel - - ( &$baseModel, constant $vocabulary, object Model $baseModel) -
    - -
      -
    • - object Model - $baseModel
    • -
    • - constant - $vocabulary
    • -
    • - - &$baseModel
    • -
    - - -
    - -
    - -
    - getResModel (line 172) -
    - - -

    Returns a ResModel.

    -

    $modelType has to be one of the following constants: MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new model from defined type. You can supply a base URI

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModel - - (constant $modelType, [string $baseURI = null]) -
    - -
      -
    • - constant - $modelType
    • -
    • - string - $baseURI
    • -
    - - -
    - -
    - -
    - getResModelForBaseModel (line 201) -
    - - -

    Creates a ResModel that wraps an existing base model.

    -
      -
    • access: public
    • -
    - -
    - object ResModel - - &getResModelForBaseModel - - ( &$baseModel, object Model $baseModel) -
    - - - - -
    - -
    - -
    - getSparqlClient (line 283) -
    - - -

    Creates a SparqlClient.

    -
      -
    • return: the SparqlClient object.
    • -
    • access: public
    • -
    - -
    - SparqlClient - - &getSparqlClient - - (String $server) -
    - -
      -
    • - String - $server: Link to a SPARQL endpoint.
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Node.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Node.html deleted file mode 100755 index 0ea1ebed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Node.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Docs For Class Node - - - - -
    -

    Class Node

    - - -
    -
    Description
    - -
    - -

    An abstract RDF node.

    -

    Can either be resource, literal or blank node. Node is used in some comparisons like is_a($obj, "Node"), meaning is $obj a resource, blank node or literal.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: Node.html 443 2007-06-01 16:25:38Z cax $
    • -
    • abstract:
    • -
    -

    - Located in /model/Node.php (line 21) -

    - - -
    Object
    -   |
    -   --Node
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    Literal - An RDF literal. -
    Resource - An RDF resource. -
    -
    -
    - - - - - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Resource.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Resource.html deleted file mode 100755 index 017d749a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Resource.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - Docs For Class Resource - - - - -
    -

    Class Resource

    - - -
    -
    Description
    - -
    - -

    An RDF resource.

    -

    Every RDF resource must have a URIref. URIrefs are treated as logical constants, i.e. as names which denote something (the things are called 'resources', but no assumptions are made about the nature of resources.) Many RDF resources are pieces of vocabulary. They typically have a namespace and a local name. In this case, a URI is composed as a concatenation of the namespace and the local name.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: Resource.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /model/Resource.php (line 25) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    BlankNode - An RDF blank node. -
    ResResource - An RDF Resource. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Resource - Resource - (string $namespace_or_uri, [string $localName = NULL]) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - string - getLabel - () -
    - -
    - string - getLocalName - () -
    - -
    - string - getNamespace - () -
    - -
    - string - getURI - () -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Resource (line 43) -
    - - -

    Constructor Takes an URI or a namespace/localname combination

    -
      -
    • access: public
    • -
    - -
    - Resource - - Resource - - (string $namespace_or_uri, [string $localName = NULL]) -
    - -
      -
    • - string - $namespace_or_uri
    • -
    • - string - $localName
    • -
    - - -
    - -
    - -
    - equals (line 111) -
    - - -

    Checks if the resource equals another resource.

    -

    Two resources are equal, if they have the same URI

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getLabel (line 66) -
    - - -

    Returns the label of the resource, which is the URI of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabel - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - getLocalName (line 87) -
    - - -

    Returns the local name of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLocalName - - () -
    - - - -
    - -
    - -
    - getNamespace (line 75) -
    - - -

    Returns the namespace of the resource. May return null.

    -
      -
    • access: public
    • -
    - -
    - string - - getNamespace - - () -
    - - - -
    - -
    - -
    - getURI (line 57) -
    - - -

    Returns the URI of the resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getURI - - () -
    - - - -
    - -
    - -
    - toString (line 99) -
    - - -

    Dumps resource.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    -
    Redefined in descendants as:
    - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Statement.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Statement.html deleted file mode 100755 index 0d1224b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/Statement.html +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - Docs For Class Statement - - - - -
    -

    Class Statement

    - - -
    -
    Description
    - -
    - -

    An RDF statement.

    -

    In this implementation, a statement is not itself a resource. If you want to use a a statement as subject or object of other statements, you have to reify it first.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: Statement.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /model/Statement.php (line 17) -

    - - -
    Object
    -   |
    -   --Statement
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    InfStatement - An RDF statement which was entailed by a inference rule. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Statement - Statement - (object node $subj, object node $pred, object node $obj) -
    - -
    - boolean - compare - (object statement &$that) -
    - -
    - boolean - equals - (object statement $that) -
    - -
    - string - getLabelObject - () -
    - -
    - string - getLabelPredicate - () -
    - -
    - string - getLabelSubject - () -
    - -
    - object node - getObject - () -
    - -
    - object node - getPredicate - () -
    - -
    - object node - getSubject - () -
    - -
    - string - hashCode - () -
    - -
    - object node - object - () -
    - -
    - object node - predicate - () -
    - -
    - object model - &reify - (mixed &$model_or_bNodeID) -
    - -
    - object node - subject - () -
    - -
    - string - toString - () -
    - -
    - string - toStringObject - () -
    - -
    - string - toStringPredicate - () -
    - -
    - string - toStringSubject - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Statement (line 51) -
    - - -

    The parameters to constructor are instances of classes and not just strings

    -
      -
    • throws: PhpError
    • -
    - -
    - Statement - - Statement - - (object node $subj, object node $pred, object node $obj) -
    - -
      -
    • - object node - $subj
    • -
    • - object node - $pred
    • -
    • - object node - $obj
    • -
    - - -
    - -
    - -
    - compare (line 241) -
    - - -

    Compares two statements and returns integer less than, equal to, or greater than zero.

    -

    Can be used for writing sorting function for models or with the PHP function usort().

    -
      -
    • access: public
    • -
    - -
    - boolean - - compare - - (object statement &$that) -
    - -
      -
    • - object statement - &$that
    • -
    - - -
    - -
    - -
    - equals (line 217) -
    - - -

    Checks if two statements are equal.

    -

    Two statements are considered to be equal if they have the same subject, predicate and object. A statement can only be equal to another statement object.

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object statement $that) -
    - -
      -
    • - object statement - $that
    • -
    - - -
    - -
    - -
    - getLabelObject (line 203) -
    - - -

    Reurns the URI, text or bNode identifier of the statements's object.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelObject - - () -
    - - - -
    - -
    - -
    - getLabelPredicate (line 193) -
    - - -

    Returns the URI of the statements's predicate.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelPredicate - - () -
    - - - -
    - -
    - -
    - getLabelSubject (line 183) -
    - - -

    Returns the URI or bNode identifier of the statements's subject.

    -
      -
    • access: public
    • -
    - -
    - string - - getLabelSubject - - () -
    - - - -
    - -
    - -
    - getObject (line 97) -
    - - -

    Returns the object of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 88) -
    - - -

    Returns the predicate of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getPredicate - - () -
    - - - -
    - -
    - -
    - getSubject (line 79) -
    - - -

    Returns the subject of the triple.

    -
      -
    • access: public
    • -
    - -
    - object node - - getSubject - - () -
    - - - -
    - -
    - -
    - hashCode (line 132) -
    - - -

    Retruns the hash code of the triple.

    -
      -
    • access: public
    • -
    - -
    - string - - hashCode - - () -
    - - - -
    - -
    - -
    - object (line 124) -
    - - -

    Alias for getObject()

    -
      -
    • access: public
    • -
    - -
    - object node - - object - - () -
    - - - -
    - -
    - -
    - predicate (line 115) -
    - - -

    Alias for getPredicate()

    -
      -
    • access: public
    • -
    - -
    - object node - - predicate - - () -
    - - - -
    - -
    - -
    - reify (line 257) -
    - - -

    Reifies a statement.

    -

    Returns a new MemModel that is the reification of the statement. For naming the statement's bNode a Model or bNodeID must be passed to the method.

    -
      -
    • access: public
    • -
    - -
    - object model - - &reify - - (mixed &$model_or_bNodeID) -
    - -
      -
    • - mixed - &$model_or_bNodeID
    • -
    - - -
    - -
    - -
    - subject (line 106) -
    - - -

    Alias for getSubject()

    -
      -
    • access: public
    • -
    - -
    - object node - - subject - - () -
    - - - -
    - -
    - -
    - toString (line 142) -
    - - -

    Dumps the triple.

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - -
    -
    Redefinition of:
    -
    -
    Object::toString()
    -
    Serializes a object into a string
    -
    - -
    - -
    - -
    - toStringObject (line 173) -
    - - -

    Reurns a toString() serialization of the statements's object.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringObject - - () -
    - - - -
    - -
    - -
    - toStringPredicate (line 163) -
    - - -

    Returns a toString() serialization of the statements's predicate.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringPredicate - - () -
    - - - -
    - -
    - -
    - toStringSubject (line 153) -
    - - -

    Returns a toString() serialization of the statements's subject.

    -
      -
    • access: public
    • -
    - -
    - string - - toStringSubject - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Blanknode.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Blanknode.php.html deleted file mode 100755 index a5640cf4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Blanknode.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Blanknode.php - - - - -
    -

    /model/Blanknode.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - BlankNode - - An RDF blank node. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbModel.php.html deleted file mode 100755 index cf92cb69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbModel.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page DbModel.php - - - - -
    -

    /model/DbModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DbModel - - This class provides methods for manipulating DbModels from DbStore. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Model.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbStore.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbStore.php.html deleted file mode 100755 index b360fe92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---DbStore.php.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - Docs for page DbStore.php - - - - -
    -

    /model/DbStore.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DbStore - - DbStore is a persistent store of RDF data using relational database technology. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'constants.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 3) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:49 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Literal.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Literal.php.html deleted file mode 100755 index fb62357b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Literal.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Literal.php - - - - -
    -

    /model/Literal.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Literal - - An RDF literal. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Node.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---MemModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---MemModel.php.html deleted file mode 100755 index 8fb57c91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---MemModel.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page MemModel.php - - - - -
    -

    /model/MemModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - MemModel - - A MemModel is an RDF Model, which is stored in the main memory. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Model.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Model.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Model.php.html deleted file mode 100755 index df64e6c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Model.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Model.php - - - - -
    -

    /model/Model.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Model - - Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:49 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---ModelFactory.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---ModelFactory.php.html deleted file mode 100755 index bd17b150..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---ModelFactory.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ModelFactory.php - - - - -
    -

    /model/ModelFactory.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ModelFactory - - ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/DbStore.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Node.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Node.php.html deleted file mode 100755 index f579e110..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Node.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Node.php - - - - -
    -

    /model/Node.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Node - - An abstract RDF node. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'/util/Object.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Resource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Resource.php.html deleted file mode 100755 index e38d4456..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Resource.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Resource.php - - - - -
    -

    /model/Resource.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Resource - - An RDF resource. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Node.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Statement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Statement.php.html deleted file mode 100755 index d489b698..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_model---Statement.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Statement.php - - - - -
    -

    /model/Statement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Statement - - An RDF statement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_sparql---SPARQL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_sparql---SPARQL.php.html deleted file mode 100755 index 8913532f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/model/_sparql---SPARQL.php.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - Docs for page SPARQL.php - - - - -
    -

    /sparql/SPARQL.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Constraint.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/GraphPattern.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/FilterFunctions.php') - (line 11) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Query.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/QueryTriple.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParser.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlEngine.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParserException.php') - (line 16) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Mon, 26 Jun 2006 14:26:13 +0200 by phpDocumentor 1.3.0RC6 -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/all-wcprops deleted file mode 100755 index 9290bb66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/all-wcprops +++ /dev/null @@ -1,107 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel -END -_ontModel---OntModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntModel.php.html -END -OntModel.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OntModel.html -END -_ontModel---RdfsVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---RdfsVocabulary.php.html -END -_ontModel---OntClass.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntClass.php.html -END -OntClass.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OntClass.html -END -RdfsVocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/RdfsVocabulary.html -END -_ontModel---Individual.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---Individual.php.html -END -_ontModel---OntVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntVocabulary.php.html -END -_ontModel---OWLVocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OWLVocabulary.php.html -END -Individual.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/Individual.html -END -OntVocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OntVocabulary.html -END -OWLVocabulary.html -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OWLVocabulary.html -END -_ontModel---OntModelP.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntModelP.php.html -END -_ontModel---OntProperty.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntProperty.php.html -END -OntProperty.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OntProperty.html -END -_ontModel---OntResource.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/_ontModel---OntResource.php.html -END -OntResource.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/ontModel/OntResource.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/entries deleted file mode 100755 index 5a49d27c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/entries +++ /dev/null @@ -1,249 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/ontModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -_ontModel---OntModel.php.html -file - - - - -2008-02-29T14:57:35.415912Z -de7ae4197b22be77ef82fc273e19f44b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OntModel.html -file - - - - -2008-02-29T14:57:35.431533Z -559e7c0aac6e9689a8a36df7607f0494 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---RdfsVocabulary.php.html -file - - - - -2008-02-29T14:57:35.447153Z -55e91c66210eccdde0ec96a2dc41d292 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OntClass.php.html -file - - - - -2008-02-29T14:57:35.431533Z -377709383fb5d0061b3455e7c16555d7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OntClass.html -file - - - - -2008-02-29T14:57:35.478394Z -ef4b1d89b72d9d72b4b2d2e319825ced -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdfsVocabulary.html -file - - - - -2008-02-29T14:57:35.462774Z -bf62398e0c2dc5c49e46823adf84dffb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---Individual.php.html -file - - - - -2008-02-29T14:57:35.462774Z -d26ba72f6b053c0080266f794acde348 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OntVocabulary.php.html -file - - - - -2008-02-29T14:57:35.447153Z -a8d6d46c2903a1ce22656847654012ce -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OWLVocabulary.php.html -file - - - - -2008-02-29T14:57:35.478394Z -9a759dbe295494c89dd609df92a3200e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Individual.html -file - - - - -2008-02-29T14:57:35.494015Z -d97a84920aa277d7543f63340f9086c5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OntVocabulary.html -file - - - - -2008-02-29T14:57:35.494015Z -56378d379f177d2e5fab253348ea339d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OWLVocabulary.html -file - - - - -2008-02-29T14:57:35.509636Z -27b61e2022b09af8825705b6b830b7c3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OntModelP.php.html -file - - - - -2008-02-29T14:57:35.509636Z -3062e9a0d032ef70f9bce736dbbddbd9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OntProperty.php.html -file - - - - -2008-02-29T14:57:35.525256Z -e6d5add574c3c209056e7678318a1a13 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OntProperty.html -file - - - - -2008-02-29T14:57:35.540877Z -88e122302a023254797e2f15a2a411ed -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_ontModel---OntResource.php.html -file - - - - -2008-02-29T14:57:35.540877Z -fb1d191951d8b1bcc1018b1cdbf72c0e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OntResource.html -file - - - - -2008-02-29T14:57:35.556497Z -71df2c58672bdf4b94536565afff52e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/Individual.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/Individual.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/Individual.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OWLVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OWLVocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OWLVocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntClass.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntClass.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntClass.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntProperty.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntProperty.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntProperty.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntResource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntResource.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntResource.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntVocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/OntVocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/RdfsVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/RdfsVocabulary.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/RdfsVocabulary.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---Individual.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---Individual.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---Individual.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OWLVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OWLVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OWLVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntClass.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntClass.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModelP.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntModelP.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntProperty.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntProperty.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntResource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntResource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---OntVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---RdfsVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---RdfsVocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/prop-base/_ontModel---RdfsVocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/Individual.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/Individual.html.svn-base deleted file mode 100755 index acb9036a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/Individual.html.svn-base +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Docs For Class Individual - - - - -
    -

    Class Individual

    - - -
    -
    Description
    - -
    - -

    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.

    -

    In order to be recognised as an individual, rather than a generic resource, at least one rdf:type statement, referring to a known class, must be present in the model.

    - -

    - Located in /ontModel/Individual.php (line 24) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --Individual
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Individual - Individual - ([string $uri = null]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Individual (line 34) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - Individual - - Individual - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OWLVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OWLVocabulary.html.svn-base deleted file mode 100755 index 5dbb05e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OWLVocabulary.html.svn-base +++ /dev/null @@ -1,1600 +0,0 @@ - - - - - - Docs For Class OWLVocabulary - - - - -
    -

    Class OWLVocabulary

    - - -
    -
    Description
    - -
    - -

    OWL vocabulary items

    - -

    - Located in /ontModel/OWLVocabulary.php (line 17) -

    - - -
    OntVocabulary
    -   |
    -   --OWLVocabulary
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - object ResProperty - COMMENT - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - object ResProperty - DOMAIN - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - object ResProperty - IS_DEFINED_BY - () -
    - -
    - object ResProperty - LABEL - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NAMESPACE - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - object ResResource - ONTCLASS - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - object ResProperty - RANGE - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - object ResProperty - SEE_ALSO - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - object ResProperty - SUB_CLASS_OF - () -
    - -
    - object ResProperty - SUB_PROPERTY_OF - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - object ResProperty - TYPE - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 127) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 132) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 122) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 137) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 142) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMMENT (line 49) -
    - - -

    Answer the predicate that denotes comment annotation on an ontology element.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - COMMENT - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 147) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 152) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 157) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 167) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 162) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 172) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 177) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 187) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 192) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 182) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 37) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - DOMAIN - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 197) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 202) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 207) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 212) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 222) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 217) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 227) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 232) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 237) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 60) -
    - - -

    Answer the predicate that denotes isDefinedBy annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 71) -
    - - -

    Answer the predicate that denotes label annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - LABEL - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 242) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 247) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NAMESPACE (line 353) -
    - - - -
    - void - - NAMESPACE - - () -
    - - - -
    - -
    - -
    - NOTHING (line 252) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 257) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 262) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 267) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 272) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTCLASS (line 26) -
    - - -

    Answer the resource that represents the class 'class' in this vocabulary.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - ONTCLASS - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 282) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 277) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 288) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 293) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RANGE (line 82) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - RANGE - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 298) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 303) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 308) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 313) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 318) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 93) -
    - - -

    Answer the predicate that denotes seeAlso annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 323) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 104) -
    - - -

    Answer the predicate that denotes that one class is a sub-class of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 115) -
    - - -

    Answer the predicate that denotes that one property is a sub-property of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 328) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 333) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 338) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - TYPE (line 364) -
    - - -

    Answer the predicate that denotes the rdf:type property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - TYPE - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 343) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 348) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntClass.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntClass.html.svn-base deleted file mode 100755 index 22be78ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntClass.html.svn-base +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - Docs For Class OntClass - - - - -
    -

    Class OntClass

    - - -
    -
    Description
    - -
    - -

    Class that represents an ontology node characterising a class description.

    - -

    - Located in /ontModel/OntClass.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --OntClass
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntClass - OntClass - ([string $uri = null]) -
    - -
    - boolean - addSubClass - (object ResResource $resResource) -
    - -
    - boolean - addSuperClass - (object ResResource $resResource) -
    - -
    - object Individual - createInstance - ([string $uri = null]) -
    - - - - - -
    - boolean - hasSubclass - (object ResResource $resResource, [boolean $direct = true]) -
    - -
    - boolean - hasSuperClass - (object ResResource $resResource, [boolean $direct = true]) -
    - -
    - object ResIterator - listInstances - () -
    - -
    - array - listSubClasses - ([boolean $direct = true]) -
    - -
    - array - listSuperClasses - ([boolean $direct = true]) -
    - -
    - boolean - removeSubClass - (object ResResource $resResource) -
    - -
    - boolean - removeSuperClass - (object ResResource $resResource) -
    - -
    - void - setSubClass - (object ResResource $resResource) -
    - -
    - void - setSuperClass - (object ResResource $resResource) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntClass (line 27) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - OntClass - - OntClass - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addSubClass (line 39) -
    - - -

    Add a sub-class of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSuperClass (line 51) -
    - - -

    Add a super-class of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - createInstance (line 278) -
    - - -

    Answer a resource that represents an instance of this OntClass and Individual node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object Individual - - createInstance - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getSubClass (line 63) -
    - - -

    Answer a class that is the sub-class of this class.

    -

    If there is more than one such class, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object OntClass - - getSubClass - - () -
    - - - -
    - -
    - -
    - getSuperClass (line 79) -
    - - -

    Answer a class that is the super-class of this class.

    -

    If there is more than one such class, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object OntClass - - getSuperClass - - () -
    - - - -
    - -
    - -
    - hasSubclass (line 94) -
    - - -

    Answer true if the given class is a sub-class of this class.

    -

    $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSubclass - - (object ResResource $resResource, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resResource
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - hasSuperClass (line 113) -
    - - -

    Answer true if the given class is a super-class of this class.

    -

    $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSuperClass - - (object ResResource $resResource, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resResource
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listInstances (line 129) -
    - - -

    Answer an ResIterator over the individuals in the model that have this class among their types.

    -
      -
    • access: public
    • -
    - -
    - object ResIterator - - listInstances - - () -
    - - - -
    - -
    - -
    - listSubClasses (line 160) -
    - - -

    Answer an array over the classes that are declared to be sub-classes of this class.

    -

    Each element of the array will be an OntClass. $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - array - - listSubClasses - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSuperClasses (line 195) -
    - - -

    Answer an array over the classes that are declared to be super-classes of this class.

    -

    Each element of the array will be an OntClass. $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - array - - listSuperClasses - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - removeSubClass (line 223) -
    - - -

    Remove the given class from the sub-classes of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSuperClass (line 235) -
    - - -

    Remove the given class from the super-classes of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSubClass (line 247) -
    - - -

    Assert that this class is super-class of the given class.

    -

    Any existing statements for subClassOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSuperClass (line 263) -
    - - -

    Assert that this class is sub-class of the given class.

    -

    Any existing statements for subClassOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntModel.html.svn-base deleted file mode 100755 index 8fb49ba2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntModel.html.svn-base +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - Docs For Class OntModel - - - - -
    -

    Class OntModel

    - - -
    -
    Description
    - -
    - -

    Enhanced view of the model that is known to contain ontology data, under a

    -

    given ontology vocabulary (such as RDFS). OntModel together with OntClass and OntResource provide ontology specific methods like addSubClass(), listSubClasses(), hasSuperProperty(), addDomain() and listInstances(). This class does not by itself compute the deductive extension of the graph under the semantic rules of the language. Instead, we wrap an underlying model with this ontology interface, that presents a convenience syntax for accessing the language elements. Depending on the inference capability of the underlying model, the OntModel will appear to contain more or less triples. For example, if this class is used to wrap a MemModel or DBModel, only the relationships asserted by the document will be reported through this convenience API. Alternatively, if the OntModel wraps an InfModel (InfModelF / InfModelB), the inferred triples from the extension will be reported as well.

    - -

    - Located in /ontModel/OntModel.php (line 32) -

    - - -
    ResModel
    -   |
    -   --OntModel
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntModel - OntModel - ( &$model,  &$vocabulary, object Model $model) -
    - -
    - object Individual - createIndividual - ([string $uri = null]) -
    - -
    - object OntClass - createOntClass - ([string $uri = null]) -
    - -
    - object OntProperty - createOntProperty - ([string $uri = null]) -
    - -
    - array - listClasses - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntModel (line 49) -
    - - -

    Constructor.

    -

    You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary

    -
      -
    • access: public
    • -
    - -
    - OntModel - - OntModel - - ( &$model,  &$vocabulary, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    • - - &$vocabulary
    • -
    - - -
    - -
    - -
    - createIndividual (line 82) -
    - - -

    Answer a resource that represents an Individual node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object Individual - - createIndividual - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createOntClass (line 64) -
    - - -

    Answer a resource that represents a class description node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - createOntClass - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createOntProperty (line 99) -
    - - -

    Answer a resource that represents an OntProperty node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - createOntProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - listClasses (line 116) -
    - - -

    Answer an array that ranges over all of the various forms of class description resource in this model.

    -

    Class descriptions include domain/range definitions, named classes and subClass constructs.

    -
      -
    • return: of object ResResource
    • -
    • access: public
    • -
    - -
    - array - - listClasses - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResModel

    -
    - ResModel::ResModel()
    - ResModel::add()
    - ResModel::addModel()
    - ResModel::addNamespace()
    - ResModel::addParsedNamespaces()
    - ResModel::addWithoutDuplicates()
    - ResModel::contains()
    - ResModel::containsAll()
    - ResModel::containsAny()
    - ResModel::containsResource()
    - ResModel::createAlt()
    - ResModel::createBag()
    - ResModel::createList()
    - ResModel::createLiteral()
    - ResModel::createProperty()
    - ResModel::createResource()
    - ResModel::createSeq()
    - ResModel::createTypedLiteral()
    - ResModel::equals()
    - ResModel::find()
    - ResModel::findFirstMatchingStatement()
    - ResModel::getBaseURI()
    - ResModel::getModel()
    - ResModel::getParsedNamespaces()
    - ResModel::getProperty()
    - ResModel::intersect()
    - ResModel::isEmpty()
    - ResModel::listObjects()
    - ResModel::listObjectsOfProperty()
    - ResModel::listSubjects()
    - ResModel::listSubjectsWithProperty()
    - ResModel::load()
    - ResModel::rdqlQuery()
    - ResModel::rdqlQueryAsIterator()
    - ResModel::remove()
    - ResModel::removeNamespace()
    - ResModel::saveAs()
    - ResModel::setBaseURI()
    - ResModel::size()
    - ResModel::subtract()
    - ResModel::unite()
    - ResModel::writeAsHTMLTable()
    - ResModel::writeRdfToString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntProperty.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntProperty.html.svn-base deleted file mode 100755 index c70a0266..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntProperty.html.svn-base +++ /dev/null @@ -1,1036 +0,0 @@ - - - - - - Docs For Class OntProperty - - - - -
    -

    Class OntProperty

    - - -
    -
    Description
    - -
    - -

    Class encapsulating a property in an ontology.

    - -

    - Located in /ontModel/OntProperty.php (line 19) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --OntProperty
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntProperty - OntProperty - ([string $uri = null]) -
    - -
    - boolean - addDomain - (object ResResource $resResource) -
    - -
    - boolean - addRange - (object ResResource $resResource) -
    - -
    - boolean - addSubProperty - (object ResProperty $resProperty) -
    - -
    - boolean - addSuperProperty - (object ResProperty $resProperty) -
    - - - - - - - - - -
    - boolean - hasDomain - (object ResResource $resResource) -
    - -
    - boolean - hasRange - (object ResResource $resResource) -
    - -
    - boolean - hasSubProperty - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
    - boolean - hasSuperProperty - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
    - array - listDomain - () -
    - -
    - array - listRange - () -
    - -
    - array - listSubProperties - ([boolean $direct = true]) -
    - -
    - array - listSuperProperties - ([boolean $direct = true]) -
    - -
    - boolean - removeDomain - (object ResResource $resResource) -
    - -
    - boolean - removeRange - (object ResResource $resResource) -
    - -
    - boolean - removeSubProperty - (object ResProperty $resProperty) -
    - -
    - boolean - removeSuperProperty - (object ResProperty $resProperty) -
    - -
    - void - setDomain - (object ResResource $resResource) -
    - -
    - void - setRange - (object ResResource $resResource) -
    - -
    - void - setSubProperty - (object ResProperty $resProperty) -
    - -
    - void - setSuperProperty - (object ResProperty $resProperty) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntProperty (line 28) -
    - - -

    Constructor.

    -

    You can supply a URI.

    -
      -
    • access: public
    • -
    - -
    - OntProperty - - OntProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addDomain (line 40) -
    - - -

    Add a resource representing the domain of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addRange (line 52) -
    - - -

    Add a resource representing the range of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSubProperty (line 64) -
    - - -

    Add a sub-property of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - addSuperProperty (line 76) -
    - - -

    Add a super-property of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - getDomain (line 88) -
    - - -

    Answer a OntClass that represents the domain class of this property.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getDomain - - () -
    - - - -
    - -
    - -
    - getRange (line 100) -
    - - -

    Answer a OntClass that represents the range class of this property.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getRange - - () -
    - - - -
    - -
    - -
    - getSubProperty (line 112) -
    - - -

    Answer a property that is the sub-property of this property.

    -

    If there is more than one such property, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - getSubProperty - - () -
    - - - -
    - -
    - -
    - getSuperProperty (line 128) -
    - - -

    Answer a property that is the super-property of this property.

    -

    If there is more than one such property, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - getSuperProperty - - () -
    - - - -
    - -
    - -
    - hasDomain (line 140) -
    - - -

    Answer true if the given resource a class specifying the domain of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - hasRange (line 152) -
    - - -

    Answer true if the given resource a class specifying the range of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - hasSubProperty (line 167) -
    - - -

    Answer true if the given property is a sub-property of this property.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSubProperty - - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resProperty
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - hasSuperProperty (line 186) -
    - - -

    Answer true if the given property is a super-property of this property.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSuperProperty - - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resProperty
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listDomain (line 202) -
    - - -

    Answer an array of all of the declared domain classes of this property.

    -

    Each element of the iterator will be an OntClass.

    -
      -
    • return: of OntClasses
    • -
    • access: public
    • -
    - -
    - array - - listDomain - - () -
    - - - -
    - -
    - -
    - listRange (line 214) -
    - - -

    Answer an array of all of the declared range classes of this property.

    -

    Each element of the iterator will be an OntClass.

    -
      -
    • return: of OntClasses
    • -
    • access: public
    • -
    - -
    - array - - listRange - - () -
    - - - -
    - -
    - -
    - listSubProperties (line 230) -
    - - -

    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • return: of OntProperties
    • -
    • access: public
    • -
    - -
    - array - - listSubProperties - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSuperProperties (line 266) -
    - - -

    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • return: of OntProperties
    • -
    • access: public
    • -
    - -
    - array - - listSuperProperties - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - removeDomain (line 294) -
    - - -

    Remove the given class from the stated domain(s) of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeRange (line 306) -
    - - -

    Remove the given class from the stated range(es) of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSubProperty (line 318) -
    - - -

    Remove the given property from the sub-properties of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - removeSuperProperty (line 330) -
    - - -

    Remove the given property from the super-properties of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - setDomain (line 343) -
    - - -

    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setRange (line 356) -
    - - -

    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSubProperty (line 368) -
    - - -

    Assert that this property is super-property of the given property.

    -

    Any existing statements for superPropertyOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - setSuperProperty (line 385) -
    - - -

    Assert that this property is sub-property of the given property.

    -

    Any existing statements for subPropertyOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:10 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntResource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntResource.html.svn-base deleted file mode 100755 index 440a2531..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntResource.html.svn-base +++ /dev/null @@ -1,1656 +0,0 @@ - - - - - - Docs For Class OntResource - - - - -
    -

    Class OntResource

    - - -
    -
    Description
    - -
    - -

    Provides a common super-type for all of the abstractions in this ontology representation package.

    - -

    - Located in /ontModel/OntResource.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - -
    ClassDescription
    Individual - Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion. -
    OntClass - Class that represents an ontology node characterising a class description. -
    OntProperty - Class encapsulating a property in an ontology. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntResource - OntResource - ([string $uri = null]) -
    - -
    - boolean - addComment - (object ResLiteral $comment) -
    - -
    - boolean - addIsDefinedBy - (object ResResource $resResource) -
    - -
    - boolean - addLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - object ResResource - addProperty - (ResResource $property, ResResource/ResLiteral $object) -
    - -
    - boolean - addRDFType - (object ResResource $resResource) -
    - -
    - boolean - addSeeAlso - (object ResResource $resResource) -
    - - - - - - - -
    - object ResLiteral - getComment - () -
    - -
    - object ResResource - getInstanceRdfType - () -
    - -
    - object ResResource - getIsDefinedBy - () -
    - -
    - object ResResource - getLabelProperty - (string $uri) -
    - -
    - object OntClass - getPropertyValue - (object ResResource $property, [string $returnType = 'ResResource']) -
    - -
    - object ResResource - getRDFType - () -
    - -
    - object ResResource - getSeeAlso - () -
    - -
    - object OntClass - getVocabulary - (string $uri) -
    - -
    - boolean - hasComment - (object ResLiteral $resLiteral) -
    - -
    - boolean - hasLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - boolean - hasRDFType - (object ResResource $ontClass) -
    - -
    - boolean - hasSeeAlso - (object ResResource $resResource) -
    - -
    - boolean - isDefinedBy - (object ResResource $resResource) -
    - -
    - array - listComments - (string $language) -
    - -
    - array - listIsDefinedBy - () -
    - -
    - array - listLabelProperties - ([ $language = false]) -
    - -
    - array - listProperty - (object ResResource $property, [string $returnType = 'OntResource']) -
    - -
    - array - listRDFTypes - ([boolean $direct = true]) -
    - -
    - array - listSeeAlso - () -
    - -
    - boolean - removeComment - (object ResLiteral $resLiteral) -
    - -
    - boolean - removeDefinedBy - (object ResResource $resResource) -
    - -
    - boolean - removeLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - boolean - removeProperty - (object ResResource $property, object ResResource $value) -
    - -
    - boolean - removeRDFType - (object ResResource $resResource) -
    - -
    - boolean - removeSeeAlso - (object ResResource $resResource) -
    - -
    - void - setComment - (object ResLiteral $resLiteral) -
    - -
    - void - setInstanceRdfType - (object ResResource $resResource) -
    - -
    - void - setIsDefinedBy - (object ResResource $resResource) -
    - -
    - void - setLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - void - setPropertyValue - (object ResResource $property, object ResResource $value) -
    - -
    - void - setRDFType - (object ResResource $resResource) -
    - -
    - void - setSeeAlso - (object ResResource $resResource) -
    - -
    - void - setVocabulary - ( &$vocabulary, object OntVocabulary $vocabulary) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntResource (line 44) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - OntResource - - OntResource - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addComment (line 68) -
    - - -

    Add the given comment to this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addComment - - (object ResLiteral $comment) -
    - -
      -
    • - object ResLiteral - $comment
    • -
    - - -
    - -
    - -
    - addIsDefinedBy (line 91) -
    - - -

    Add a resource that is declared to provide a definition of this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addIsDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addLabelProperty (line 115) -
    - - -

    Add the given Label to this resource

    -
      -
    • access: public
    • -
    - -
    - boolean - - addLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - addProperty (line 706) -
    - - -

    Add a property to this resource.

    -

    A statement with this resource as the subject, p as the predicate and o as the object is added to the model associated with this resource. If $this->rdfType is set, an additional statement about it's type is added.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - addProperty - - (ResResource $property, ResResource/ResLiteral $object) -
    - -
      -
    • - ResResource - $property
    • -
    • - ResResource/ResLiteral - $object
    • -
    - -
    -
    Redefinition of:
    -
    -
    ResResource::addProperty()
    -
    Add a property to this resource.
    -
    - -
    - -
    - -
    - addRDFType (line 140) -
    - - -

    Add the given class as one of the rdf:type's for this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSeeAlso (line 167) -
    - - -

    Add a resource that is declared to provided additional information about the definition of this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - asClass (line 190) -
    - - -

    Answer a view of this resource as a class

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - asClass - - () -
    - - - -
    - -
    - -
    - asIndividual (line 201) -
    - - -

    Answer a view of this resource as an Individual

    -
      -
    • access: public
    • -
    - -
    - object Individual - - asIndividual - - () -
    - - - -
    - -
    - -
    - asOntProperty (line 212) -
    - - -

    Answer a view of this resource as a property

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - asOntProperty - - () -
    - - - -
    - -
    - -
    - getComment (line 79) -
    - - -

    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object ResLiteral - - getComment - - () -
    - - - -
    - -
    - -
    - getInstanceRdfType (line 734) -
    - - -

    returns the rdf:type, that this distinct resource is instance of.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getInstanceRdfType - - () -
    - - - -
    - -
    - -
    - getIsDefinedBy (line 103) -
    - - -

    Answer a resource that is declared to provide a definition of this resource.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getIsDefinedBy - - () -
    - - - -
    - -
    - -
    - getLabelProperty (line 128) -
    - - -

    Answer the label ResLiteral for this object.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getLabelProperty - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getPropertyValue (line 243) -
    - - -

    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.

    -

    The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' Default is 'ResResource'

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getPropertyValue - - (object ResResource $property, [string $returnType = 'ResResource']) -
    - -
      -
    • - object ResResource - $property
    • -
    • - string - $returnType
    • -
    - - -
    - -
    - -
    - getRDFType (line 154) -
    - - -

    Answer the rdf:type (ie the class) of this resource.

    -

    If there is more than one type for this resource, the return value will be one of the values, but it is not specified which one (nor that it will consistently be the same one each time).

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getRDFType - - () -
    - - - -
    - -
    - -
    - getSeeAlso (line 179) -
    - - -

    Answer a resource that provides additional information about this resource.

    -

    If more than one such resource is defined, make an arbitrary choice.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getSeeAlso - - () -
    - - - -
    - -
    - -
    - getVocabulary (line 225) -
    - - -

    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getVocabulary - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - hasComment (line 276) -
    - - -

    Answer true if this resource has the given comment.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - hasLabelProperty (line 288) -
    - - -

    Answer true if this resource has the given label.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - hasRDFType (line 300) -
    - - -

    Answer true if this resource has the given rdf:type.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasRDFType - - (object ResResource $ontClass) -
    - -
      -
    • - object ResResource - $ontClass
    • -
    - - -
    - -
    - -
    - hasSeeAlso (line 313) -
    - - -

    Answer true if this resource has the given resource as a source of additional information.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - isDefinedBy (line 325) -
    - - -

    Answer true if this resource is defined by the given resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - listComments (line 337) -
    - - -

    Answer an array of all of the comment literals for this resource.

    -
      -
    • access: public
    • -
    - -
    - array - - listComments - - (string $language) -
    - -
      -
    • - string - $language
    • -
    - - -
    - -
    - -
    - listIsDefinedBy (line 357) -
    - - -

    Answer an array of all of the resources that are declared to define this resource.

    -
      -
    • access: public
    • -
    - -
    - array - - listIsDefinedBy - - () -
    - - - -
    - -
    - -
    - listLabelProperties (line 369) -
    - - -

    Answer an array of all of the label literals for this resource, with the given language, if $language is set.

    -
      -
    • access: public
    • -
    - -
    - array - - listLabelProperties - - ([ $language = false]) -
    - -
      -
    • - - $language
    • -
    - - -
    - -
    - -
    - listProperty (line 421) -
    - - -

    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.

    -

    The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' Default is 'ResResource'

    -
      -
    • return: of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listProperty - - (object ResResource $property, [string $returnType = 'OntResource']) -
    - -
      -
    • - object ResResource - $property
    • -
    • - string - $returnType
    • -
    - - -
    - -
    - -
    - listRDFTypes (line 393) -
    - - -

    Answer an array of the RDF classes to which this resource belongs.

    -

    If $direct is true, only answer those resources that are direct types of this resource, not the super-classes of the class etc.

    -
      -
    • return: Array of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listRDFTypes - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSeeAlso (line 405) -
    - - -

    Answer an array of all of the resources that are declared to provide addition information about this resource.

    -
      -
    • return: Array of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listSeeAlso - - () -
    - - - -
    - -
    - -
    - removeComment (line 457) -
    - - -

    Remove the statement that the given ResLiteral is a comment on this resource.

    -

    Returns true, if a statement was removed

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - removeDefinedBy (line 469) -
    - - -

    Remove the statement that this resource is defined by the given resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeLabelProperty (line 482) -
    - - -

    Remove the statement that the given ResLiteral is a label on this resource.

    -

    Returns true, if a statement was removed

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - removeProperty (line 495) -
    - - -

    Remove the specific property-value pair from this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeProperty - - (object ResResource $property, object ResResource $value) -
    - -
      -
    • - object ResResource - $property
    • -
    • - object ResResource - $value
    • -
    - - -
    - -
    - -
    - removeRDFType (line 507) -
    - - -

    Remove the statement that this resource is of the given RDF type.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSeeAlso (line 520) -
    - - -

    Remove the statement indicating the given resource as a source of additional information about this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setComment (line 532) -
    - - -

    Assert that the given string is the comment on this resource.

    -

    Any existing statements for comment will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - setInstanceRdfType (line 723) -
    - - -

    Sets the rdf:type, that this distinct resource is instance of.

    -

    If this value is set, the ontModel will add an additional statement about this resource and the fiven rdf:type

    -
      -
    • access: public
    • -
    - -
    - void - - setInstanceRdfType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setIsDefinedBy (line 544) -
    - - -

    Assert that the given resource provides a source of definitions about this resource.

    -

    Any existing statements for isDefinedBy will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setIsDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setLabelProperty (line 556) -
    - - -

    Assert that the given string is the label on this resource.

    -

    Any existing statements for comment will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - setPropertyValue (line 571) -
    - - -

    Set the value of the given property of this ontology resource to the given value.

    -

    Maintains the invariant that there is at most one value of the property for a given resource, so existing property values are first removed. To add multiple properties, use addProperty.

    -
      -
    • access: public
    • -
    - -
    - void - - setPropertyValue - - (object ResResource $property, object ResResource $value) -
    - -
      -
    • - object ResResource - $property
    • -
    • - object ResResource - $value
    • -
    - - -
    - -
    - -
    - setRDFType (line 585) -
    - - -

    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSeeAlso (line 597) -
    - - -

    Add a resource that is declared to provided additional information about the definition of this resource

    -
      -
    • access: public
    • -
    - -
    - void - - setSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setVocabulary (line 56) -
    - - -

    Sets the reference to the assoiated vocabulary

    -
      -
    • access: public
    • -
    - -
    - void - - setVocabulary - - ( &$vocabulary, object OntVocabulary $vocabulary) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntVocabulary.html.svn-base deleted file mode 100755 index 4374352d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/OntVocabulary.html.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Docs For Class OntVocabulary - - - - -
    -

    Class OntVocabulary

    - - -
    -
    Description
    - -
    - -

    Base Class that encapsulates the elements of a general vocabulary

    -

    corresponding to a particular ontology language. The intent is that, using a given vocabulary, a given RDF model can be processed as an ontology description, without binding knowledge of the vocabulary into this Class

    - -

    - Located in /ontModel/OntVocabulary.php (line 21) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    OWLVocabulary - OWL vocabulary items -
    RdfsVocabulary - RDFS vocabulary items -
    -
    -
    - - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/RdfsVocabulary.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/RdfsVocabulary.html.svn-base deleted file mode 100755 index 14b36a3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/RdfsVocabulary.html.svn-base +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - Docs For Class RdfsVocabulary - - - - -
    -

    Class RdfsVocabulary

    - - -
    -
    Description
    - -
    - -

    RDFS vocabulary items

    - -

    - Located in /ontModel/RdfsVocabulary.php (line 18) -

    - - -
    OntVocabulary
    -   |
    -   --RdfsVocabulary
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - object ResProperty - COMMENT - () -
    - -
    - object ResProperty - DOMAIN - () -
    - -
    - object ResProperty - IS_DEFINED_BY - () -
    - -
    - object ResProperty - LABEL - () -
    - -
    - string - NAMESPACE - () -
    - -
    - object ResResource - ONTCLASS - () -
    - -
    - object ResProperty - RANGE - () -
    - -
    - object ResProperty - SEE_ALSO - () -
    - -
    - object ResProperty - SUB_CLASS_OF - () -
    - -
    - object ResProperty - SUB_PROPERTY_OF - () -
    - -
    - object ResProperty - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 50) -
    - - -

    Answer the predicate that denotes comment annotation on an ontology element.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - COMMENT - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 38) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 61) -
    - - -

    Answer the predicate that denotes isDefinedBy annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 72) -
    - - -

    Answer the predicate that denotes label annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - LABEL - - () -
    - - - -
    - -
    - -
    - NAMESPACE (line 127) -
    - - -

    Answer the string that is the namespace prefix for this vocabulary

    -
      -
    • access: public
    • -
    - -
    - string - - NAMESPACE - - () -
    - - - -
    - -
    - -
    - ONTCLASS (line 27) -
    - - -

    Answer the resource that represents the class 'class' in this vocabulary.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - ONTCLASS - - () -
    - - - -
    - -
    - -
    - RANGE (line 83) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - RANGE - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 94) -
    - - -

    Answer the predicate that denotes seeAlso annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 105) -
    - - -

    Answer the predicate that denotes that one class is a sub-class of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 116) -
    - - -

    Answer the predicate that denotes that one property is a sub-property of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    - -
    - TYPE (line 138) -
    - - -

    Answer the predicate that denotes the rdf:type property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---Individual.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---Individual.php.html.svn-base deleted file mode 100755 index 14181ecc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---Individual.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Individual.php - - - - -
    -

    /ontModel/Individual.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Individual - - Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OWLVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OWLVocabulary.php.html.svn-base deleted file mode 100755 index 284491e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OWLVocabulary.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWLVocabulary.php - - - - -
    -

    /ontModel/OWLVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWLVocabulary - - OWL vocabulary items -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntClass.php.html.svn-base deleted file mode 100755 index 33be1d2f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntClass.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntClass.php - - - - -
    -

    /ontModel/OntClass.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntClass - - Class that represents an ontology node characterising a class description. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModel.php.html.svn-base deleted file mode 100755 index 926ff5e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModel.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntModel.php - - - - -
    -

    /ontModel/OntModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntModel - - Enhanced view of the model that is known to contain ontology data, under a -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModelP.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModelP.php.html.svn-base deleted file mode 100755 index cabb6394..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntModelP.php.html.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Docs for page OntModelP.php - - - - -
    -

    /ontModel/OntModelP.php

    - - -
    -
    Description
    - -
    - -

    ---------------------------------------------------------------------------------- OntModel Package ----------------------------------------------------------------------------------

    -

    Description : OntModel package

    Author: Daniel Westphal <mail at d-westphal dot de>

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - include_once - (RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL) - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/RdfsVocabulary.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntResource.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntVocabulary.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntProperty.php') - (line 20) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntClass.php') - (line 21) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/Individual.php') - (line 22) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntModel.php') - (line 18) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntProperty.php.html.svn-base deleted file mode 100755 index f496bd28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntProperty.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntProperty.php - - - - -
    -

    /ontModel/OntProperty.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntProperty - - Class encapsulating a property in an ontology. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntResource.php.html.svn-base deleted file mode 100755 index 8b05faf6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntResource.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntResource.php - - - - -
    -

    /ontModel/OntResource.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntResource - - Provides a common super-type for all of the abstractions in this ontology representation package. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:11 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntVocabulary.php.html.svn-base deleted file mode 100755 index a2079964..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---OntVocabulary.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntVocabulary.php - - - - -
    -

    /ontModel/OntVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntVocabulary - - Base Class that encapsulates the elements of a general vocabulary -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---RdfsVocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---RdfsVocabulary.php.html.svn-base deleted file mode 100755 index 23d8e68a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/.svn/text-base/_ontModel---RdfsVocabulary.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfsVocabulary.php - - - - -
    -

    /ontModel/RdfsVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfsVocabulary - - RDFS vocabulary items -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/Individual.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/Individual.html deleted file mode 100755 index b93ddfbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/Individual.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - Docs For Class Individual - - - - -
    -

    Class Individual

    - - -
    -
    Description
    - -
    - -

    Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion.

    -

    In order to be recognised as an individual, rather than a generic resource, at least one rdf:type statement, referring to a known class, must be present in the model.

    - -

    - Located in /ontModel/Individual.php (line 24) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --Individual
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Individual - Individual - ([string $uri = null]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor Individual (line 34) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - Individual - - Individual - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OWLVocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OWLVocabulary.html deleted file mode 100755 index e3c78697..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OWLVocabulary.html +++ /dev/null @@ -1,1600 +0,0 @@ - - - - - - Docs For Class OWLVocabulary - - - - -
    -

    Class OWLVocabulary

    - - -
    -
    Description
    - -
    - -

    OWL vocabulary items

    - -

    - Located in /ontModel/OWLVocabulary.php (line 17) -

    - - -
    OntVocabulary
    -   |
    -   --OWLVocabulary
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - object ResProperty - COMMENT - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - object ResProperty - DOMAIN - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - object ResProperty - IS_DEFINED_BY - () -
    - -
    - object ResProperty - LABEL - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NAMESPACE - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - object ResResource - ONTCLASS - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - object ResProperty - RANGE - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - object ResProperty - SEE_ALSO - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - object ResProperty - SUB_CLASS_OF - () -
    - -
    - object ResProperty - SUB_PROPERTY_OF - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - object ResProperty - TYPE - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 127) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 132) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 122) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 137) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 142) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMMENT (line 49) -
    - - -

    Answer the predicate that denotes comment annotation on an ontology element.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - COMMENT - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 147) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 152) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 157) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 167) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 162) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 172) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 177) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 187) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 192) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 182) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 37) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - DOMAIN - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 197) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 202) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 207) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 212) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 222) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 217) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 227) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 232) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 237) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 60) -
    - - -

    Answer the predicate that denotes isDefinedBy annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 71) -
    - - -

    Answer the predicate that denotes label annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - LABEL - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 242) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 247) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NAMESPACE (line 353) -
    - - - -
    - void - - NAMESPACE - - () -
    - - - -
    - -
    - -
    - NOTHING (line 252) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 257) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 262) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 267) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 272) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTCLASS (line 26) -
    - - -

    Answer the resource that represents the class 'class' in this vocabulary.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - ONTCLASS - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 282) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 277) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 288) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 293) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RANGE (line 82) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - RANGE - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 298) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 303) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 308) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 313) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 318) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 93) -
    - - -

    Answer the predicate that denotes seeAlso annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 323) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 104) -
    - - -

    Answer the predicate that denotes that one class is a sub-class of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 115) -
    - - -

    Answer the predicate that denotes that one property is a sub-property of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 328) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 333) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 338) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - TYPE (line 364) -
    - - -

    Answer the predicate that denotes the rdf:type property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - TYPE - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 343) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 348) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntClass.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntClass.html deleted file mode 100755 index 8adfc34a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntClass.html +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - Docs For Class OntClass - - - - -
    -

    Class OntClass

    - - -
    -
    Description
    - -
    - -

    Class that represents an ontology node characterising a class description.

    - -

    - Located in /ontModel/OntClass.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --OntClass
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntClass - OntClass - ([string $uri = null]) -
    - -
    - boolean - addSubClass - (object ResResource $resResource) -
    - -
    - boolean - addSuperClass - (object ResResource $resResource) -
    - -
    - object Individual - createInstance - ([string $uri = null]) -
    - - - - - -
    - boolean - hasSubclass - (object ResResource $resResource, [boolean $direct = true]) -
    - -
    - boolean - hasSuperClass - (object ResResource $resResource, [boolean $direct = true]) -
    - -
    - object ResIterator - listInstances - () -
    - -
    - array - listSubClasses - ([boolean $direct = true]) -
    - -
    - array - listSuperClasses - ([boolean $direct = true]) -
    - -
    - boolean - removeSubClass - (object ResResource $resResource) -
    - -
    - boolean - removeSuperClass - (object ResResource $resResource) -
    - -
    - void - setSubClass - (object ResResource $resResource) -
    - -
    - void - setSuperClass - (object ResResource $resResource) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntClass (line 27) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - OntClass - - OntClass - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addSubClass (line 39) -
    - - -

    Add a sub-class of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSuperClass (line 51) -
    - - -

    Add a super-class of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - createInstance (line 278) -
    - - -

    Answer a resource that represents an instance of this OntClass and Individual node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object Individual - - createInstance - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getSubClass (line 63) -
    - - -

    Answer a class that is the sub-class of this class.

    -

    If there is more than one such class, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object OntClass - - getSubClass - - () -
    - - - -
    - -
    - -
    - getSuperClass (line 79) -
    - - -

    Answer a class that is the super-class of this class.

    -

    If there is more than one such class, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object OntClass - - getSuperClass - - () -
    - - - -
    - -
    - -
    - hasSubclass (line 94) -
    - - -

    Answer true if the given class is a sub-class of this class.

    -

    $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSubclass - - (object ResResource $resResource, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resResource
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - hasSuperClass (line 113) -
    - - -

    Answer true if the given class is a super-class of this class.

    -

    $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSuperClass - - (object ResResource $resResource, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resResource
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listInstances (line 129) -
    - - -

    Answer an ResIterator over the individuals in the model that have this class among their types.

    -
      -
    • access: public
    • -
    - -
    - object ResIterator - - listInstances - - () -
    - - - -
    - -
    - -
    - listSubClasses (line 160) -
    - - -

    Answer an array over the classes that are declared to be sub-classes of this class.

    -

    Each element of the array will be an OntClass. $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - array - - listSubClasses - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSuperClasses (line 195) -
    - - -

    Answer an array over the classes that are declared to be super-classes of this class.

    -

    Each element of the array will be an OntClass. $direct - If true, only search the classes that are directly adjacent to this class in the class hierarchy.

    -
      -
    • access: public
    • -
    - -
    - array - - listSuperClasses - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - removeSubClass (line 223) -
    - - -

    Remove the given class from the sub-classes of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSuperClass (line 235) -
    - - -

    Remove the given class from the super-classes of this class.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSubClass (line 247) -
    - - -

    Assert that this class is super-class of the given class.

    -

    Any existing statements for subClassOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSubClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSuperClass (line 263) -
    - - -

    Assert that this class is sub-class of the given class.

    -

    Any existing statements for subClassOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSuperClass - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntModel.html deleted file mode 100755 index 5e443372..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntModel.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - Docs For Class OntModel - - - - -
    -

    Class OntModel

    - - -
    -
    Description
    - -
    - -

    Enhanced view of the model that is known to contain ontology data, under a

    -

    given ontology vocabulary (such as RDFS). OntModel together with OntClass and OntResource provide ontology specific methods like addSubClass(), listSubClasses(), hasSuperProperty(), addDomain() and listInstances(). This class does not by itself compute the deductive extension of the graph under the semantic rules of the language. Instead, we wrap an underlying model with this ontology interface, that presents a convenience syntax for accessing the language elements. Depending on the inference capability of the underlying model, the OntModel will appear to contain more or less triples. For example, if this class is used to wrap a MemModel or DBModel, only the relationships asserted by the document will be reported through this convenience API. Alternatively, if the OntModel wraps an InfModel (InfModelF / InfModelB), the inferred triples from the extension will be reported as well.

    - -

    - Located in /ontModel/OntModel.php (line 32) -

    - - -
    ResModel
    -   |
    -   --OntModel
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntModel - OntModel - ( &$model,  &$vocabulary, object Model $model) -
    - -
    - object Individual - createIndividual - ([string $uri = null]) -
    - -
    - object OntClass - createOntClass - ([string $uri = null]) -
    - -
    - object OntProperty - createOntProperty - ([string $uri = null]) -
    - -
    - array - listClasses - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntModel (line 49) -
    - - -

    Constructor.

    -

    You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary

    -
      -
    • access: public
    • -
    - -
    - OntModel - - OntModel - - ( &$model,  &$vocabulary, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    • - - &$vocabulary
    • -
    - - -
    - -
    - -
    - createIndividual (line 82) -
    - - -

    Answer a resource that represents an Individual node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object Individual - - createIndividual - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createOntClass (line 64) -
    - - -

    Answer a resource that represents a class description node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - createOntClass - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createOntProperty (line 99) -
    - - -

    Answer a resource that represents an OntProperty node in this model.

    -

    If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-model of the ontology model.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - createOntProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - listClasses (line 116) -
    - - -

    Answer an array that ranges over all of the various forms of class description resource in this model.

    -

    Class descriptions include domain/range definitions, named classes and subClass constructs.

    -
      -
    • return: of object ResResource
    • -
    • access: public
    • -
    - -
    - array - - listClasses - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResModel

    -
    - ResModel::ResModel()
    - ResModel::add()
    - ResModel::addModel()
    - ResModel::addNamespace()
    - ResModel::addParsedNamespaces()
    - ResModel::addWithoutDuplicates()
    - ResModel::contains()
    - ResModel::containsAll()
    - ResModel::containsAny()
    - ResModel::containsResource()
    - ResModel::createAlt()
    - ResModel::createBag()
    - ResModel::createList()
    - ResModel::createLiteral()
    - ResModel::createProperty()
    - ResModel::createResource()
    - ResModel::createSeq()
    - ResModel::createTypedLiteral()
    - ResModel::equals()
    - ResModel::find()
    - ResModel::findFirstMatchingStatement()
    - ResModel::getBaseURI()
    - ResModel::getModel()
    - ResModel::getParsedNamespaces()
    - ResModel::getProperty()
    - ResModel::intersect()
    - ResModel::isEmpty()
    - ResModel::listObjects()
    - ResModel::listObjectsOfProperty()
    - ResModel::listSubjects()
    - ResModel::listSubjectsWithProperty()
    - ResModel::load()
    - ResModel::rdqlQuery()
    - ResModel::rdqlQueryAsIterator()
    - ResModel::remove()
    - ResModel::removeNamespace()
    - ResModel::saveAs()
    - ResModel::setBaseURI()
    - ResModel::size()
    - ResModel::subtract()
    - ResModel::unite()
    - ResModel::writeAsHTMLTable()
    - ResModel::writeRdfToString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntProperty.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntProperty.html deleted file mode 100755 index ec1c3fb6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntProperty.html +++ /dev/null @@ -1,1036 +0,0 @@ - - - - - - Docs For Class OntProperty - - - - -
    -

    Class OntProperty

    - - -
    -
    Description
    - -
    - -

    Class encapsulating a property in an ontology.

    - -

    - Located in /ontModel/OntProperty.php (line 19) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    -               |
    -               --OntProperty
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntProperty - OntProperty - ([string $uri = null]) -
    - -
    - boolean - addDomain - (object ResResource $resResource) -
    - -
    - boolean - addRange - (object ResResource $resResource) -
    - -
    - boolean - addSubProperty - (object ResProperty $resProperty) -
    - -
    - boolean - addSuperProperty - (object ResProperty $resProperty) -
    - - - - - - - - - -
    - boolean - hasDomain - (object ResResource $resResource) -
    - -
    - boolean - hasRange - (object ResResource $resResource) -
    - -
    - boolean - hasSubProperty - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
    - boolean - hasSuperProperty - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
    - array - listDomain - () -
    - -
    - array - listRange - () -
    - -
    - array - listSubProperties - ([boolean $direct = true]) -
    - -
    - array - listSuperProperties - ([boolean $direct = true]) -
    - -
    - boolean - removeDomain - (object ResResource $resResource) -
    - -
    - boolean - removeRange - (object ResResource $resResource) -
    - -
    - boolean - removeSubProperty - (object ResProperty $resProperty) -
    - -
    - boolean - removeSuperProperty - (object ResProperty $resProperty) -
    - -
    - void - setDomain - (object ResResource $resResource) -
    - -
    - void - setRange - (object ResResource $resResource) -
    - -
    - void - setSubProperty - (object ResProperty $resProperty) -
    - -
    - void - setSuperProperty - (object ResProperty $resProperty) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntProperty (line 28) -
    - - -

    Constructor.

    -

    You can supply a URI.

    -
      -
    • access: public
    • -
    - -
    - OntProperty - - OntProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addDomain (line 40) -
    - - -

    Add a resource representing the domain of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addRange (line 52) -
    - - -

    Add a resource representing the range of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSubProperty (line 64) -
    - - -

    Add a sub-property of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - addSuperProperty (line 76) -
    - - -

    Add a super-property of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - getDomain (line 88) -
    - - -

    Answer a OntClass that represents the domain class of this property.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getDomain - - () -
    - - - -
    - -
    - -
    - getRange (line 100) -
    - - -

    Answer a OntClass that represents the range class of this property.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getRange - - () -
    - - - -
    - -
    - -
    - getSubProperty (line 112) -
    - - -

    Answer a property that is the sub-property of this property.

    -

    If there is more than one such property, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - getSubProperty - - () -
    - - - -
    - -
    - -
    - getSuperProperty (line 128) -
    - - -

    Answer a property that is the super-property of this property.

    -

    If there is more than one such property, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - getSuperProperty - - () -
    - - - -
    - -
    - -
    - hasDomain (line 140) -
    - - -

    Answer true if the given resource a class specifying the domain of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - hasRange (line 152) -
    - - -

    Answer true if the given resource a class specifying the range of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - hasSubProperty (line 167) -
    - - -

    Answer true if the given property is a sub-property of this property.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSubProperty - - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resProperty
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - hasSuperProperty (line 186) -
    - - -

    Answer true if the given property is a super-property of this property.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSuperProperty - - (object ResResource $resProperty, [boolean $direct = true]) -
    - -
      -
    • - object ResResource - $resProperty
    • -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listDomain (line 202) -
    - - -

    Answer an array of all of the declared domain classes of this property.

    -

    Each element of the iterator will be an OntClass.

    -
      -
    • return: of OntClasses
    • -
    • access: public
    • -
    - -
    - array - - listDomain - - () -
    - - - -
    - -
    - -
    - listRange (line 214) -
    - - -

    Answer an array of all of the declared range classes of this property.

    -

    Each element of the iterator will be an OntClass.

    -
      -
    • return: of OntClasses
    • -
    • access: public
    • -
    - -
    - array - - listRange - - () -
    - - - -
    - -
    - -
    - listSubProperties (line 230) -
    - - -

    Answer an array of all the properties that are declared to be sub-properties of this property. Each element of the iterator will be an OntProperty.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • return: of OntProperties
    • -
    • access: public
    • -
    - -
    - array - - listSubProperties - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSuperProperties (line 266) -
    - - -

    Answer an array of all the properties that are declared to be super-properties of this property. Each element of the iterator will be an OntProperty.

    -

    If $direct is set to true, only consider the direcly adjacent properties in the property hierarchy

    -
      -
    • return: of OntProperties
    • -
    • access: public
    • -
    - -
    - array - - listSuperProperties - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - removeDomain (line 294) -
    - - -

    Remove the given class from the stated domain(s) of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeRange (line 306) -
    - - -

    Remove the given class from the stated range(es) of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSubProperty (line 318) -
    - - -

    Remove the given property from the sub-properties of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - removeSuperProperty (line 330) -
    - - -

    Remove the given property from the super-properties of this property.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - setDomain (line 343) -
    - - -

    Assert that the given resource represents the class of individuals that form the domain of this property. Any existing domain statements for this property are removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setDomain - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setRange (line 356) -
    - - -

    Assert that the given resource represents the class of individuals that form the range of this property. Any existing range statements for this property are removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setRange - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSubProperty (line 368) -
    - - -

    Assert that this property is super-property of the given property.

    -

    Any existing statements for superPropertyOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSubProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    - -
    - -
    - setSuperProperty (line 385) -
    - - -

    Assert that this property is sub-property of the given property.

    -

    Any existing statements for subPropertyOf on prop will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setSuperProperty - - (object ResProperty $resProperty) -
    - -
      -
    • - object ResProperty - $resProperty
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From OntResource

    -
    - OntResource::OntResource()
    - OntResource::addComment()
    - OntResource::addIsDefinedBy()
    - OntResource::addLabelProperty()
    - OntResource::addProperty()
    - OntResource::addRDFType()
    - OntResource::addSeeAlso()
    - OntResource::asClass()
    - OntResource::asIndividual()
    - OntResource::asOntProperty()
    - OntResource::getComment()
    - OntResource::getInstanceRdfType()
    - OntResource::getIsDefinedBy()
    - OntResource::getLabelProperty()
    - OntResource::getPropertyValue()
    - OntResource::getRDFType()
    - OntResource::getSeeAlso()
    - OntResource::getVocabulary()
    - OntResource::hasComment()
    - OntResource::hasLabelProperty()
    - OntResource::hasRDFType()
    - OntResource::hasSeeAlso()
    - OntResource::isDefinedBy()
    - OntResource::listComments()
    - OntResource::listIsDefinedBy()
    - OntResource::listLabelProperties()
    - OntResource::listProperty()
    - OntResource::listRDFTypes()
    - OntResource::listSeeAlso()
    - OntResource::removeComment()
    - OntResource::removeDefinedBy()
    - OntResource::removeLabelProperty()
    - OntResource::removeProperty()
    - OntResource::removeRDFType()
    - OntResource::removeSeeAlso()
    - OntResource::setComment()
    - OntResource::setInstanceRdfType()
    - OntResource::setIsDefinedBy()
    - OntResource::setLabelProperty()
    - OntResource::setPropertyValue()
    - OntResource::setRDFType()
    - OntResource::setSeeAlso()
    - OntResource::setVocabulary()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:10 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntResource.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntResource.html deleted file mode 100755 index bbcd7261..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntResource.html +++ /dev/null @@ -1,1656 +0,0 @@ - - - - - - Docs For Class OntResource - - - - -
    -

    Class OntResource

    - - -
    -
    Description
    - -
    - -

    Provides a common super-type for all of the abstractions in this ontology representation package.

    - -

    - Located in /ontModel/OntResource.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --OntResource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - -
    ClassDescription
    Individual - Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion. -
    OntClass - Class that represents an ontology node characterising a class description. -
    OntProperty - Class encapsulating a property in an ontology. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - OntResource - OntResource - ([string $uri = null]) -
    - -
    - boolean - addComment - (object ResLiteral $comment) -
    - -
    - boolean - addIsDefinedBy - (object ResResource $resResource) -
    - -
    - boolean - addLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - object ResResource - addProperty - (ResResource $property, ResResource/ResLiteral $object) -
    - -
    - boolean - addRDFType - (object ResResource $resResource) -
    - -
    - boolean - addSeeAlso - (object ResResource $resResource) -
    - - - - - - - -
    - object ResLiteral - getComment - () -
    - -
    - object ResResource - getInstanceRdfType - () -
    - -
    - object ResResource - getIsDefinedBy - () -
    - -
    - object ResResource - getLabelProperty - (string $uri) -
    - -
    - object OntClass - getPropertyValue - (object ResResource $property, [string $returnType = 'ResResource']) -
    - -
    - object ResResource - getRDFType - () -
    - -
    - object ResResource - getSeeAlso - () -
    - -
    - object OntClass - getVocabulary - (string $uri) -
    - -
    - boolean - hasComment - (object ResLiteral $resLiteral) -
    - -
    - boolean - hasLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - boolean - hasRDFType - (object ResResource $ontClass) -
    - -
    - boolean - hasSeeAlso - (object ResResource $resResource) -
    - -
    - boolean - isDefinedBy - (object ResResource $resResource) -
    - -
    - array - listComments - (string $language) -
    - -
    - array - listIsDefinedBy - () -
    - -
    - array - listLabelProperties - ([ $language = false]) -
    - -
    - array - listProperty - (object ResResource $property, [string $returnType = 'OntResource']) -
    - -
    - array - listRDFTypes - ([boolean $direct = true]) -
    - -
    - array - listSeeAlso - () -
    - -
    - boolean - removeComment - (object ResLiteral $resLiteral) -
    - -
    - boolean - removeDefinedBy - (object ResResource $resResource) -
    - -
    - boolean - removeLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - boolean - removeProperty - (object ResResource $property, object ResResource $value) -
    - -
    - boolean - removeRDFType - (object ResResource $resResource) -
    - -
    - boolean - removeSeeAlso - (object ResResource $resResource) -
    - -
    - void - setComment - (object ResLiteral $resLiteral) -
    - -
    - void - setInstanceRdfType - (object ResResource $resResource) -
    - -
    - void - setIsDefinedBy - (object ResResource $resResource) -
    - -
    - void - setLabelProperty - (object ResLiteral $resLiteral) -
    - -
    - void - setPropertyValue - (object ResResource $property, object ResResource $value) -
    - -
    - void - setRDFType - (object ResResource $resResource) -
    - -
    - void - setSeeAlso - (object ResResource $resResource) -
    - -
    - void - setVocabulary - ( &$vocabulary, object OntVocabulary $vocabulary) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor OntResource (line 44) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - OntResource - - OntResource - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addComment (line 68) -
    - - -

    Add the given comment to this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addComment - - (object ResLiteral $comment) -
    - -
      -
    • - object ResLiteral - $comment
    • -
    - - -
    - -
    - -
    - addIsDefinedBy (line 91) -
    - - -

    Add a resource that is declared to provide a definition of this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addIsDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addLabelProperty (line 115) -
    - - -

    Add the given Label to this resource

    -
      -
    • access: public
    • -
    - -
    - boolean - - addLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - addProperty (line 706) -
    - - -

    Add a property to this resource.

    -

    A statement with this resource as the subject, p as the predicate and o as the object is added to the model associated with this resource. If $this->rdfType is set, an additional statement about it's type is added.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - addProperty - - (ResResource $property, ResResource/ResLiteral $object) -
    - -
      -
    • - ResResource - $property
    • -
    • - ResResource/ResLiteral - $object
    • -
    - -
    -
    Redefinition of:
    -
    -
    ResResource::addProperty()
    -
    Add a property to this resource.
    -
    - -
    - -
    - -
    - addRDFType (line 140) -
    - - -

    Add the given class as one of the rdf:type's for this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - addSeeAlso (line 167) -
    - - -

    Add a resource that is declared to provided additional information about the definition of this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - asClass (line 190) -
    - - -

    Answer a view of this resource as a class

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - asClass - - () -
    - - - -
    - -
    - -
    - asIndividual (line 201) -
    - - -

    Answer a view of this resource as an Individual

    -
      -
    • access: public
    • -
    - -
    - object Individual - - asIndividual - - () -
    - - - -
    - -
    - -
    - asOntProperty (line 212) -
    - - -

    Answer a view of this resource as a property

    -
      -
    • access: public
    • -
    - -
    - object OntProperty - - asOntProperty - - () -
    - - - -
    - -
    - -
    - getComment (line 79) -
    - - -

    Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • return: or NULL
    • -
    • access: public
    • -
    - -
    - object ResLiteral - - getComment - - () -
    - - - -
    - -
    - -
    - getInstanceRdfType (line 734) -
    - - -

    returns the rdf:type, that this distinct resource is instance of.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getInstanceRdfType - - () -
    - - - -
    - -
    - -
    - getIsDefinedBy (line 103) -
    - - -

    Answer a resource that is declared to provide a definition of this resource.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getIsDefinedBy - - () -
    - - - -
    - -
    - -
    - getLabelProperty (line 128) -
    - - -

    Answer the label ResLiteral for this object.

    -

    If there is more than one such resource, an arbitrary selection is made.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getLabelProperty - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getPropertyValue (line 243) -
    - - -

    Answer the value of a given RDF property for this resource as $returnType, or null if it doesn't have one. If there is more than one RDF statement with the given property for the current value, it is not defined which of the values will be returned.

    -

    The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' Default is 'ResResource'

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getPropertyValue - - (object ResResource $property, [string $returnType = 'ResResource']) -
    - -
      -
    • - object ResResource - $property
    • -
    • - string - $returnType
    • -
    - - -
    - -
    - -
    - getRDFType (line 154) -
    - - -

    Answer the rdf:type (ie the class) of this resource.

    -

    If there is more than one type for this resource, the return value will be one of the values, but it is not specified which one (nor that it will consistently be the same one each time).

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getRDFType - - () -
    - - - -
    - -
    - -
    - getSeeAlso (line 179) -
    - - -

    Answer a resource that provides additional information about this resource.

    -

    If more than one such resource is defined, make an arbitrary choice.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getSeeAlso - - () -
    - - - -
    - -
    - -
    - getVocabulary (line 225) -
    - - -

    Answer a reference to the ontology language profile that governs the ontology model to which this ontology resource is attached.

    -
      -
    • access: public
    • -
    - -
    - object OntClass - - getVocabulary - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - hasComment (line 276) -
    - - -

    Answer true if this resource has the given comment.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - hasLabelProperty (line 288) -
    - - -

    Answer true if this resource has the given label.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - hasRDFType (line 300) -
    - - -

    Answer true if this resource has the given rdf:type.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasRDFType - - (object ResResource $ontClass) -
    - -
      -
    • - object ResResource - $ontClass
    • -
    - - -
    - -
    - -
    - hasSeeAlso (line 313) -
    - - -

    Answer true if this resource has the given resource as a source of additional information.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - isDefinedBy (line 325) -
    - - -

    Answer true if this resource is defined by the given resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - listComments (line 337) -
    - - -

    Answer an array of all of the comment literals for this resource.

    -
      -
    • access: public
    • -
    - -
    - array - - listComments - - (string $language) -
    - -
      -
    • - string - $language
    • -
    - - -
    - -
    - -
    - listIsDefinedBy (line 357) -
    - - -

    Answer an array of all of the resources that are declared to define this resource.

    -
      -
    • access: public
    • -
    - -
    - array - - listIsDefinedBy - - () -
    - - - -
    - -
    - -
    - listLabelProperties (line 369) -
    - - -

    Answer an array of all of the label literals for this resource, with the given language, if $language is set.

    -
      -
    • access: public
    • -
    - -
    - array - - listLabelProperties - - ([ $language = false]) -
    - -
      -
    • - - $language
    • -
    - - -
    - -
    - -
    - listProperty (line 421) -
    - - -

    Answer an array of values of a given RDF property for this resource as $returnType, or null if it doesn't have one.

    -

    The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource' Default is 'ResResource'

    -
      -
    • return: of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listProperty - - (object ResResource $property, [string $returnType = 'OntResource']) -
    - -
      -
    • - object ResResource - $property
    • -
    • - string - $returnType
    • -
    - - -
    - -
    - -
    - listRDFTypes (line 393) -
    - - -

    Answer an array of the RDF classes to which this resource belongs.

    -

    If $direct is true, only answer those resources that are direct types of this resource, not the super-classes of the class etc.

    -
      -
    • return: Array of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listRDFTypes - - ([boolean $direct = true]) -
    - -
      -
    • - boolean - $direct
    • -
    - - -
    - -
    - -
    - listSeeAlso (line 405) -
    - - -

    Answer an array of all of the resources that are declared to provide addition information about this resource.

    -
      -
    • return: Array of ResResources
    • -
    • access: public
    • -
    - -
    - array - - listSeeAlso - - () -
    - - - -
    - -
    - -
    - removeComment (line 457) -
    - - -

    Remove the statement that the given ResLiteral is a comment on this resource.

    -

    Returns true, if a statement was removed

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - removeDefinedBy (line 469) -
    - - -

    Remove the statement that this resource is defined by the given resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeLabelProperty (line 482) -
    - - -

    Remove the statement that the given ResLiteral is a label on this resource.

    -

    Returns true, if a statement was removed

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - removeProperty (line 495) -
    - - -

    Remove the specific property-value pair from this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeProperty - - (object ResResource $property, object ResResource $value) -
    - -
      -
    • - object ResResource - $property
    • -
    • - object ResResource - $value
    • -
    - - -
    - -
    - -
    - removeRDFType (line 507) -
    - - -

    Remove the statement that this resource is of the given RDF type.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - removeSeeAlso (line 520) -
    - - -

    Remove the statement indicating the given resource as a source of additional information about this resource.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setComment (line 532) -
    - - -

    Assert that the given string is the comment on this resource.

    -

    Any existing statements for comment will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setComment - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - setInstanceRdfType (line 723) -
    - - -

    Sets the rdf:type, that this distinct resource is instance of.

    -

    If this value is set, the ontModel will add an additional statement about this resource and the fiven rdf:type

    -
      -
    • access: public
    • -
    - -
    - void - - setInstanceRdfType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setIsDefinedBy (line 544) -
    - - -

    Assert that the given resource provides a source of definitions about this resource.

    -

    Any existing statements for isDefinedBy will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setIsDefinedBy - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setLabelProperty (line 556) -
    - - -

    Assert that the given string is the label on this resource.

    -

    Any existing statements for comment will be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setLabelProperty - - (object ResLiteral $resLiteral) -
    - -
      -
    • - object ResLiteral - $resLiteral
    • -
    - - -
    - -
    - -
    - setPropertyValue (line 571) -
    - - -

    Set the value of the given property of this ontology resource to the given value.

    -

    Maintains the invariant that there is at most one value of the property for a given resource, so existing property values are first removed. To add multiple properties, use addProperty.

    -
      -
    • access: public
    • -
    - -
    - void - - setPropertyValue - - (object ResResource $property, object ResResource $value) -
    - -
      -
    • - object ResResource - $property
    • -
    • - object ResResource - $value
    • -
    - - -
    - -
    - -
    - setRDFType (line 585) -
    - - -

    Set the RDF type (ie the class) for this resource, replacing any existing rdf:type property. Any existing statements for the RDF type will first be removed.

    -
      -
    • access: public
    • -
    - -
    - void - - setRDFType - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setSeeAlso (line 597) -
    - - -

    Add a resource that is declared to provided additional information about the definition of this resource

    -
      -
    • access: public
    • -
    - -
    - void - - setSeeAlso - - (object ResResource $resResource) -
    - -
      -
    • - object ResResource - $resResource
    • -
    - - -
    - -
    - -
    - setVocabulary (line 56) -
    - - -

    Sets the reference to the assoiated vocabulary

    -
      -
    • access: public
    • -
    - -
    - void - - setVocabulary - - ( &$vocabulary, object OntVocabulary $vocabulary) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntVocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntVocabulary.html deleted file mode 100755 index 56c0e188..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/OntVocabulary.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Docs For Class OntVocabulary - - - - -
    -

    Class OntVocabulary

    - - -
    -
    Description
    - -
    - -

    Base Class that encapsulates the elements of a general vocabulary

    -

    corresponding to a particular ontology language. The intent is that, using a given vocabulary, a given RDF model can be processed as an ontology description, without binding knowledge of the vocabulary into this Class

    - -

    - Located in /ontModel/OntVocabulary.php (line 21) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    OWLVocabulary - OWL vocabulary items -
    RdfsVocabulary - RDFS vocabulary items -
    -
    -
    - - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/RdfsVocabulary.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/RdfsVocabulary.html deleted file mode 100755 index 59b1c17f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/RdfsVocabulary.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - Docs For Class RdfsVocabulary - - - - -
    -

    Class RdfsVocabulary

    - - -
    -
    Description
    - -
    - -

    RDFS vocabulary items

    - -

    - Located in /ontModel/RdfsVocabulary.php (line 18) -

    - - -
    OntVocabulary
    -   |
    -   --RdfsVocabulary
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - object ResProperty - COMMENT - () -
    - -
    - object ResProperty - DOMAIN - () -
    - -
    - object ResProperty - IS_DEFINED_BY - () -
    - -
    - object ResProperty - LABEL - () -
    - -
    - string - NAMESPACE - () -
    - -
    - object ResResource - ONTCLASS - () -
    - -
    - object ResProperty - RANGE - () -
    - -
    - object ResProperty - SEE_ALSO - () -
    - -
    - object ResProperty - SUB_CLASS_OF - () -
    - -
    - object ResProperty - SUB_PROPERTY_OF - () -
    - -
    - object ResProperty - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 50) -
    - - -

    Answer the predicate that denotes comment annotation on an ontology element.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - COMMENT - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 38) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 61) -
    - - -

    Answer the predicate that denotes isDefinedBy annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 72) -
    - - -

    Answer the predicate that denotes label annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - LABEL - - () -
    - - - -
    - -
    - -
    - NAMESPACE (line 127) -
    - - -

    Answer the string that is the namespace prefix for this vocabulary

    -
      -
    • access: public
    • -
    - -
    - string - - NAMESPACE - - () -
    - - - -
    - -
    - -
    - ONTCLASS (line 27) -
    - - -

    Answer the resource that represents the class 'class' in this vocabulary.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - ONTCLASS - - () -
    - - - -
    - -
    - -
    - RANGE (line 83) -
    - - -

    Answer the predicate that denotes the domain of a property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - RANGE - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 94) -
    - - -

    Answer the predicate that denotes seeAlso annotation on an ontology element

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 105) -
    - - -

    Answer the predicate that denotes that one class is a sub-class of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 116) -
    - - -

    Answer the predicate that denotes that one property is a sub-property of another.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    - -
    - TYPE (line 138) -
    - - -

    Answer the predicate that denotes the rdf:type property.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---Individual.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---Individual.php.html deleted file mode 100755 index 39a1f02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---Individual.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Individual.php - - - - -
    -

    /ontModel/Individual.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Individual - - Interface that encapsulates an individual in an ontology, sometimes referred to as a fact or assertion. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OWLVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OWLVocabulary.php.html deleted file mode 100755 index a71b68f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OWLVocabulary.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWLVocabulary.php - - - - -
    -

    /ontModel/OWLVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWLVocabulary - - OWL vocabulary items -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntClass.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntClass.php.html deleted file mode 100755 index fbfb27bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntClass.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntClass.php - - - - -
    -

    /ontModel/OntClass.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntClass - - Class that represents an ontology node characterising a class description. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModel.php.html deleted file mode 100755 index 1670cc05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModel.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntModel.php - - - - -
    -

    /ontModel/OntModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntModel - - Enhanced view of the model that is known to contain ontology data, under a -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModelP.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModelP.php.html deleted file mode 100755 index 41c025f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntModelP.php.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Docs for page OntModelP.php - - - - -
    -

    /ontModel/OntModelP.php

    - - -
    -
    Description
    - -
    - -

    ---------------------------------------------------------------------------------- OntModel Package ----------------------------------------------------------------------------------

    -

    Description : OntModel package

    Author: Daniel Westphal <mail at d-westphal dot de>

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - include_once - (RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL) - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/RdfsVocabulary.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntResource.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntVocabulary.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntProperty.php') - (line 20) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntClass.php') - (line 21) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/Individual.php') - (line 22) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'ontModel/OntModel.php') - (line 18) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntProperty.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntProperty.php.html deleted file mode 100755 index 82aa15f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntProperty.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntProperty.php - - - - -
    -

    /ontModel/OntProperty.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntProperty - - Class encapsulating a property in an ontology. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntResource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntResource.php.html deleted file mode 100755 index 80b54dd3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntResource.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntResource.php - - - - -
    -

    /ontModel/OntResource.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntResource - - Provides a common super-type for all of the abstractions in this ontology representation package. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:11 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntVocabulary.php.html deleted file mode 100755 index 0414778a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---OntVocabulary.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OntVocabulary.php - - - - -
    -

    /ontModel/OntVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OntVocabulary - - Base Class that encapsulates the elements of a general vocabulary -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---RdfsVocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---RdfsVocabulary.php.html deleted file mode 100755 index 7407eaea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/ontModel/_ontModel---RdfsVocabulary.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfsVocabulary.php - - - - -
    -

    /ontModel/RdfsVocabulary.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfsVocabulary - - RDFS vocabulary items -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/packages.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/packages.html deleted file mode 100755 index 3f38e986..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/packages.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/all-wcprops deleted file mode 100755 index c83a79bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/all-wcprops +++ /dev/null @@ -1,65 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql -END -_rdql---RdqlDbEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/_rdql---RdqlDbEngine.php.html -END -RdqlDbEngine.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/RdqlDbEngine.html -END -_rdql---RdqlParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/_rdql---RdqlParser.php.html -END -RdqlParser.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/RdqlParser.html -END -_rdql---RdqlMemEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/_rdql---RdqlMemEngine.php.html -END -RdqlMemEngine.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/RdqlMemEngine.html -END -_rdql---RdqlEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/_rdql---RdqlEngine.php.html -END -RdqlEngine.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/RdqlEngine.html -END -_rdql---RdqlResultIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/_rdql---RdqlResultIterator.php.html -END -RdqlResultIterator.html -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/rdql/RdqlResultIterator.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/entries deleted file mode 100755 index 6a741a24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/entries +++ /dev/null @@ -1,158 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/rdql -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -_rdql---RdqlDbEngine.php.html -file - - - - -2008-02-29T14:57:33.119684Z -efd97b44588a0180f6cb48a172f44ba7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdqlDbEngine.html -file - - - - -2008-02-29T14:57:33.119684Z -0768e29a7e01707020d01eee6eef709e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_rdql---RdqlParser.php.html -file - - - - -2008-02-29T14:57:33.135304Z -723a18a2056ab72d32062885ab941723 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdqlParser.html -file - - - - -2008-02-29T14:57:33.150925Z -b03cc8ea166fd2fb6ec0d2f8b4820001 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_rdql---RdqlMemEngine.php.html -file - - - - -2008-02-29T14:57:33.150925Z -fcc601851b60424c4488d100abf7925c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdqlMemEngine.html -file - - - - -2008-02-29T14:57:33.166546Z -4f4890861c52b9ee601774536c81a2ed -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_rdql---RdqlEngine.php.html -file - - - - -2008-02-29T14:57:33.166546Z -0b42b133623a84f152c217ff6cde28ef -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdqlEngine.html -file - - - - -2008-02-29T14:57:33.182166Z -1e45555e2c99e47881bb93630273d7e6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_rdql---RdqlResultIterator.php.html -file - - - - -2008-02-29T14:57:33.182166Z -bd2a4b4f1c1879c871a502f582fb9700 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdqlResultIterator.html -file - - - - -2008-02-29T14:57:33.197787Z -f08b76027d1cb47f0c62d00105e6bed9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlDbEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlDbEngine.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlDbEngine.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlEngine.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlEngine.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlMemEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlMemEngine.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlMemEngine.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlResultIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlResultIterator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/RdqlResultIterator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlDbEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlDbEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlDbEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlMemEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlMemEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlMemEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlResultIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlResultIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/prop-base/_rdql---RdqlResultIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlDbEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlDbEngine.html.svn-base deleted file mode 100755 index 03924065..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlDbEngine.html.svn-base +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Docs For Class RdqlDbEngine - - - - -
    -

    Class RdqlDbEngine

    - - -
    -
    Description
    - -
    - -

    This class performs as RDQL query on a DbModel.

    -

    Provided an rdql query parsed into an array of php variables and constraints at first the engine generates an sql statement and queries the database for tuples matching all patterns from the WHERE clause of the given RDQL query. Subsequently the result set is is filtered with evaluated boolean expressions from the AND clause of the given RDQL query.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlDbEngine.php (line 23) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    -      |
    -      --RdqlDbEngine
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &queryModel - ( &$dbModel, array &$parsedQuery, [boolean $returnNodes = TRUE], object DbModel $dbModel) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - queryModel (line 80) -
    - - -

    Perform an RDQL Query on the given DbModel.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &queryModel - - ( &$dbModel, array &$parsedQuery, [boolean $returnNodes = TRUE], object DbModel $dbModel) -
    - -
      -
    • - object DbModel - $dbModel
    • -
    • - array - &$parsedQuery: (the same format as $this->parsedQuery)
    • -
    • - boolean - $returnNodes
    • -
    • - - &$dbModel
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlEngine.html.svn-base deleted file mode 100755 index e8817b43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlEngine.html.svn-base +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - Docs For Class RdqlEngine - - - - -
    -

    Class RdqlEngine

    - - -
    -
    Description
    - -
    - -

    Some general methods common for RdqlMemEngine and RdqlDbEngine

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlEngine.php (line 17) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    RdqlDbEngine - This class performs as RDQL query on a DbModel. -
    RdqlMemEngine - This class performes as RDQL query on a MemModel. -
    -
    -
    - - - - - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlMemEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlMemEngine.html.svn-base deleted file mode 100755 index 617d238d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlMemEngine.html.svn-base +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Docs For Class RdqlMemEngine - - - - -
    -

    Class RdqlMemEngine

    - - -
    -
    Description
    - -
    - -

    This class performes as RDQL query on a MemModel.

    -

    Provided an rdql query parsed into an array of php variables and constraints at first the engine searches for tuples matching all patterns from the WHERE clause of the given RDQL query. Then the query result set is filtered with evaluated boolean expressions from the AND clause of the given RDQL query.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlMemEngine.php (line 22) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    -      |
    -      --RdqlMemEngine
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &queryModel - (object MemModel &$memModel, array &$parsedQuery, [boolean $returnNodes = TRUE]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - queryModel (line 65) -
    - - -

    Perform an RDQL Query on the given MemModel.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &queryModel - - (object MemModel &$memModel, array &$parsedQuery, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - object MemModel - &$memModel
    • -
    • - array - &$parsedQuery: (the same format as $this->parsedQuery)
    • -
    • - boolean - $returnNodes
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlParser.html.svn-base deleted file mode 100755 index 604714e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlParser.html.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Docs For Class RdqlParser - - - - -
    -

    Class RdqlParser

    - - -
    -
    Description
    - -
    - -

    This class contains methods for parsing an Rdql query string into PHP variables.

    -

    The output of the RdqlParser is an array with variables and constraints of each query clause (Select, From, Where, And, Using). To perform an RDQL query this array has to be passed to the RdqlEngine.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlParser.php (line 21) -

    - - -
    Object
    -   |
    -   --RdqlParser
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &parseQuery - (string $queryString) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - parseQuery (line 78) -
    - - -

    Parse the given RDQL query string and return an array with query variables and constraints.

    -
      -
    • access: public
    • -
    - -
    - array - - &parseQuery - - (string $queryString) -
    - -
      -
    • - string - $queryString
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlResultIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlResultIterator.html.svn-base deleted file mode 100755 index c0da0a63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/RdqlResultIterator.html.svn-base +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - Docs For Class RdqlResultIterator - - - - -
    -

    Class RdqlResultIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing Rdql results.

    -

    This class can be used for iterating forward and backward trough Rdql results. It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.

    -
      -
    • author: Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlResultIterator.php (line 19) -

    - - -
    Object
    -   |
    -   --RdqlResultIterator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - RdqlResultIterator - RdqlResultIterator - (object RdqlResult &$RdqlResult) -
    - -
    - integer - countResults - () -
    - -
    - result - current - ([integer $element = null]) -
    - -
    - integer - getCurrentPosition - () -
    - -
    - array - getResultLabels - () -
    - -
    - boolean - hasNext - () -
    - -
    - boolean - hasPrevious - () -
    - -
    - void - moveFirst - () -
    - -
    - void - moveLast - () -
    - -
    - void - moveTo - ( $position) -
    - -
    - result - next - ([integer $element = null]) -
    - -
    - result - previous - ([integer $element = null]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor RdqlResultIterator (line 44) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - RdqlResultIterator - - RdqlResultIterator - - (object RdqlResult &$RdqlResult) -
    - -
      -
    • - object RdqlResult - &$RdqlResult
    • -
    - - -
    - -
    - -
    - countResults (line 77) -
    - - -

    Returns the number of results.

    -
      -
    • access: public
    • -
    - -
    - integer - - countResults - - () -
    - - - -
    - -
    - -
    - current (line 145) -
    - - -

    Returns the current result.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - current - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    - -
    - -
    - getCurrentPosition (line 187) -
    - - -

    Returns the current position of the iterator.

    -
      -
    • access: public
    • -
    - -
    - integer - - getCurrentPosition - - () -
    - - - -
    - -
    - -
    - getResultLabels (line 66) -
    - - -

    Returns the labels of the result as array.

    -
      -
    • return: of strings with the result labels OR null if there are no results.
    • -
    • access: public
    • -
    - -
    - array - - getResultLabels - - () -
    - - - -
    - -
    - -
    - hasNext (line 87) -
    - - -

    Returns TRUE if there are more results.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - hasPrevious (line 100) -
    - - -

    Returns TRUE if the first result has not been reached.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasPrevious - - () -
    - - - -
    - -
    - -
    - moveFirst (line 159) -
    - - -

    Moves the pointer to the first result.

    -
      -
    • access: public
    • -
    - -
    - void - - moveFirst - - () -
    - - - -
    - -
    - -
    - moveLast (line 168) -
    - - -

    Moves the pointer to the last result.

    -
      -
    • access: public
    • -
    - -
    - void - - moveLast - - () -
    - - - -
    - -
    - -
    - moveTo (line 178) -
    - - -

    Moves the pointer to a specific result.

    -

    If you set an off-bounds value, next(), previous() and current() will return NULL

    -
      -
    • access: public
    • -
    - -
    - void - - moveTo - - ( $position) -
    - -
      -
    • - - $position
    • -
    - - -
    - -
    - -
    - next (line 113) -
    - - -

    Returns the next result array.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - next - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    - -
    - -
    - previous (line 129) -
    - - -

    Returns the previous result.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - previous - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlDbEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlDbEngine.php.html.svn-base deleted file mode 100755 index 7135763a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlDbEngine.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlDbEngine.php - - - - -
    -

    /rdql/RdqlDbEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlDbEngine - - This class performs as RDQL query on a DbModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlEngine.php.html.svn-base deleted file mode 100755 index 35c91a9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlEngine.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlEngine.php - - - - -
    -

    /rdql/RdqlEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlEngine - - Some general methods common for RdqlMemEngine and RdqlDbEngine -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlMemEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlMemEngine.php.html.svn-base deleted file mode 100755 index 602b6893..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlMemEngine.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlMemEngine.php - - - - -
    -

    /rdql/RdqlMemEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlMemEngine - - This class performes as RDQL query on a MemModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlParser.php.html.svn-base deleted file mode 100755 index b1fdd8f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlParser.php - - - - -
    -

    /rdql/RdqlParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlParser - - This class contains methods for parsing an Rdql query string into PHP variables. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlResultIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlResultIterator.php.html.svn-base deleted file mode 100755 index 832e917e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/.svn/text-base/_rdql---RdqlResultIterator.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlResultIterator.php - - - - -
    -

    /rdql/RdqlResultIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlResultIterator - - Iterator for traversing Rdql results. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlDbEngine.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlDbEngine.html deleted file mode 100755 index 7bf29f63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlDbEngine.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Docs For Class RdqlDbEngine - - - - -
    -

    Class RdqlDbEngine

    - - -
    -
    Description
    - -
    - -

    This class performs as RDQL query on a DbModel.

    -

    Provided an rdql query parsed into an array of php variables and constraints at first the engine generates an sql statement and queries the database for tuples matching all patterns from the WHERE clause of the given RDQL query. Subsequently the result set is is filtered with evaluated boolean expressions from the AND clause of the given RDQL query.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id: RdqlDbEngine.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlDbEngine.php (line 23) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    -      |
    -      --RdqlDbEngine
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &queryModel - ( &$dbModel, array &$parsedQuery, [boolean $returnNodes = TRUE], object DbModel $dbModel) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - queryModel (line 80) -
    - - -

    Perform an RDQL Query on the given DbModel.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &queryModel - - ( &$dbModel, array &$parsedQuery, [boolean $returnNodes = TRUE], object DbModel $dbModel) -
    - -
      -
    • - object DbModel - $dbModel
    • -
    • - array - &$parsedQuery: (the same format as $this->parsedQuery)
    • -
    • - boolean - $returnNodes
    • -
    • - - &$dbModel
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlEngine.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlEngine.html deleted file mode 100755 index 704a6f62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlEngine.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - Docs For Class RdqlEngine - - - - -
    -

    Class RdqlEngine

    - - -
    -
    Description
    - -
    - -

    Some general methods common for RdqlMemEngine and RdqlDbEngine

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id: RdqlEngine.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlEngine.php (line 17) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    RdqlDbEngine - This class performs as RDQL query on a DbModel. -
    RdqlMemEngine - This class performes as RDQL query on a MemModel. -
    -
    -
    - - - - - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlMemEngine.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlMemEngine.html deleted file mode 100755 index 3f22c3bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlMemEngine.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Docs For Class RdqlMemEngine - - - - -
    -

    Class RdqlMemEngine

    - - -
    -
    Description
    - -
    - -

    This class performes as RDQL query on a MemModel.

    -

    Provided an rdql query parsed into an array of php variables and constraints at first the engine searches for tuples matching all patterns from the WHERE clause of the given RDQL query. Then the query result set is filtered with evaluated boolean expressions from the AND clause of the given RDQL query.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id: RdqlMemEngine.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlMemEngine.php (line 22) -

    - - -
    Object
    -   |
    -   --RdqlEngine
    -      |
    -      --RdqlMemEngine
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &queryModel - (object MemModel &$memModel, array &$parsedQuery, [boolean $returnNodes = TRUE]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - queryModel (line 65) -
    - - -

    Perform an RDQL Query on the given MemModel.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &queryModel - - (object MemModel &$memModel, array &$parsedQuery, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - object MemModel - &$memModel
    • -
    • - array - &$parsedQuery: (the same format as $this->parsedQuery)
    • -
    • - boolean - $returnNodes
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlParser.html deleted file mode 100755 index 4201ef37..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlParser.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Docs For Class RdqlParser - - - - -
    -

    Class RdqlParser

    - - -
    -
    Description
    - -
    - -

    This class contains methods for parsing an Rdql query string into PHP variables.

    -

    The output of the RdqlParser is an array with variables and constraints of each query clause (Select, From, Where, And, Using). To perform an RDQL query this array has to be passed to the RdqlEngine.

    -
      -
    • author: Radoslaw Oldakowski <radol@gmx.de>
    • -
    • version: $Id: RdqlParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlParser.php (line 21) -

    - - -
    Object
    -   |
    -   --RdqlParser
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - array - &parseQuery - (string $queryString) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - parseQuery (line 78) -
    - - -

    Parse the given RDQL query string and return an array with query variables and constraints.

    -
      -
    • access: public
    • -
    - -
    - array - - &parseQuery - - (string $queryString) -
    - -
      -
    • - string - $queryString
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlResultIterator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlResultIterator.html deleted file mode 100755 index b616ce59..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/RdqlResultIterator.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - Docs For Class RdqlResultIterator - - - - -
    -

    Class RdqlResultIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing Rdql results.

    -

    This class can be used for iterating forward and backward trough Rdql results. It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.

    -
      -
    • author: Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: RdqlResultIterator.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /rdql/RdqlResultIterator.php (line 19) -

    - - -
    Object
    -   |
    -   --RdqlResultIterator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - RdqlResultIterator - RdqlResultIterator - (object RdqlResult &$RdqlResult) -
    - -
    - integer - countResults - () -
    - -
    - result - current - ([integer $element = null]) -
    - -
    - integer - getCurrentPosition - () -
    - -
    - array - getResultLabels - () -
    - -
    - boolean - hasNext - () -
    - -
    - boolean - hasPrevious - () -
    - -
    - void - moveFirst - () -
    - -
    - void - moveLast - () -
    - -
    - void - moveTo - ( $position) -
    - -
    - result - next - ([integer $element = null]) -
    - -
    - result - previous - ([integer $element = null]) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor RdqlResultIterator (line 44) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - RdqlResultIterator - - RdqlResultIterator - - (object RdqlResult &$RdqlResult) -
    - -
      -
    • - object RdqlResult - &$RdqlResult
    • -
    - - -
    - -
    - -
    - countResults (line 77) -
    - - -

    Returns the number of results.

    -
      -
    • access: public
    • -
    - -
    - integer - - countResults - - () -
    - - - -
    - -
    - -
    - current (line 145) -
    - - -

    Returns the current result.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - current - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    - -
    - -
    - getCurrentPosition (line 187) -
    - - -

    Returns the current position of the iterator.

    -
      -
    • access: public
    • -
    - -
    - integer - - getCurrentPosition - - () -
    - - - -
    - -
    - -
    - getResultLabels (line 66) -
    - - -

    Returns the labels of the result as array.

    -
      -
    • return: of strings with the result labels OR null if there are no results.
    • -
    • access: public
    • -
    - -
    - array - - getResultLabels - - () -
    - - - -
    - -
    - -
    - hasNext (line 87) -
    - - -

    Returns TRUE if there are more results.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - hasPrevious (line 100) -
    - - -

    Returns TRUE if the first result has not been reached.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasPrevious - - () -
    - - - -
    - -
    - -
    - moveFirst (line 159) -
    - - -

    Moves the pointer to the first result.

    -
      -
    • access: public
    • -
    - -
    - void - - moveFirst - - () -
    - - - -
    - -
    - -
    - moveLast (line 168) -
    - - -

    Moves the pointer to the last result.

    -
      -
    • access: public
    • -
    - -
    - void - - moveLast - - () -
    - - - -
    - -
    - -
    - moveTo (line 178) -
    - - -

    Moves the pointer to a specific result.

    -

    If you set an off-bounds value, next(), previous() and current() will return NULL

    -
      -
    • access: public
    • -
    - -
    - void - - moveTo - - ( $position) -
    - -
      -
    • - - $position
    • -
    - - -
    - -
    - -
    - next (line 113) -
    - - -

    Returns the next result array.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - next - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    - -
    - -
    - previous (line 129) -
    - - -

    Returns the previous result.

    -
      -
    • return: array OR single result if $element was specified OR NULL if there is no next result.
    • -
    • access: public
    • -
    - -
    - result - - previous - - ([integer $element = null]) -
    - -
      -
    • - integer - $element
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlDbEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlDbEngine.php.html deleted file mode 100755 index a7cbffbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlDbEngine.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlDbEngine.php - - - - -
    -

    /rdql/RdqlDbEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlDbEngine - - This class performs as RDQL query on a DbModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlEngine.php.html deleted file mode 100755 index c29bacde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlEngine.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlEngine.php - - - - -
    -

    /rdql/RdqlEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlEngine - - Some general methods common for RdqlMemEngine and RdqlDbEngine -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlMemEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlMemEngine.php.html deleted file mode 100755 index 3d631a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlMemEngine.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlMemEngine.php - - - - -
    -

    /rdql/RdqlMemEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlMemEngine - - This class performes as RDQL query on a MemModel. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlParser.php.html deleted file mode 100755 index 745c2b3d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlParser.php - - - - -
    -

    /rdql/RdqlParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlParser - - This class contains methods for parsing an Rdql query string into PHP variables. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlResultIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlResultIterator.php.html deleted file mode 100755 index 51a3cec3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/rdql/_rdql---RdqlResultIterator.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdqlResultIterator.php - - - - -
    -

    /rdql/RdqlResultIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdqlResultIterator - - Iterator for traversing Rdql results. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/all-wcprops deleted file mode 100755 index ef1744d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/all-wcprops +++ /dev/null @@ -1,125 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel -END -_resModel---ResList.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResList.php.html -END -_resModel---ResAlt.php.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResAlt.php.html -END -_resModel---ResContainer.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResContainer.php.html -END -_resModel---ResProperty.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResProperty.php.html -END -ResList.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResList.html -END -_resModel---ResResource.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResResource.php.html -END -_resModel---ResSeq.php.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResSeq.php.html -END -ResAlt.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResAlt.html -END -_resModel---ResBag.php.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResBag.php.html -END -_resModel---ResIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResIterator.php.html -END -ResContainer.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResContainer.html -END -_resModel---ResLiteral.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResLiteral.php.html -END -ResProperty.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResProperty.html -END -_resModel---ResModel.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/_resModel---ResModel.php.html -END -ResResource.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResResource.html -END -ResSeq.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResSeq.html -END -ResIterator.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResIterator.html -END -ResBag.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResBag.html -END -ResLiteral.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResLiteral.html -END -ResModel.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/resModel/ResModel.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/entries deleted file mode 100755 index 5ac26560..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/entries +++ /dev/null @@ -1,288 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/resModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -_resModel---ResList.php.html -file - - - - -2008-02-29T14:57:34.791088Z -8ee5b18820913190409070420ec694c3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResAlt.php.html -file - - - - -2008-02-29T14:57:34.791088Z -1d2147a4cd4844005aaef6b691721dab -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResContainer.php.html -file - - - - -2008-02-29T14:57:34.791088Z -5b806f300940353b26c661501888fd03 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResProperty.php.html -file - - - - -2008-02-29T14:57:34.822329Z -e9c4ad6bedc98437698e25f572238b7d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResList.html -file - - - - -2008-02-29T14:57:34.806709Z -e890dc729c3b640a7fa67631a482721d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResResource.php.html -file - - - - -2008-02-29T14:57:34.822329Z -674155866796720ff1008d4bf5ebb2f0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResSeq.php.html -file - - - - -2008-02-29T14:57:34.837950Z -3459bf05ec78359078e7ea6b0089d687 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResAlt.html -file - - - - -2008-02-29T14:57:34.853570Z -dbbe339e917c8c77c875892e9dd9209f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResBag.php.html -file - - - - -2008-02-29T14:57:34.853570Z -cd5012ef6e316f088f8fdca2103f5b38 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResIterator.php.html -file - - - - -2008-02-29T14:57:34.837950Z -a8a0039d34630eda06adc07dc25f6804 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResContainer.html -file - - - - -2008-02-29T14:57:34.962915Z -54b4f1ecda325f2178eab07a62b6c65d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResLiteral.php.html -file - - - - -2008-02-29T14:57:34.978535Z -d0bb557995b1e98b754c54ae0b0ae799 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResProperty.html -file - - - - -2008-02-29T14:57:34.978535Z -6ec149fd1671748589d343b26419f40f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_resModel---ResModel.php.html -file - - - - -2008-02-29T14:57:34.994156Z -326cd700263dfb6d755e6cac7231a655 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResResource.html -file - - - - -2008-02-29T14:57:34.994156Z -f22cfe71b2f112886179dae5c0dc50d8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResSeq.html -file - - - - -2008-02-29T14:57:35.009776Z -c81fd8b9acd832907332d2532252d771 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResIterator.html -file - - - - -2008-02-29T14:57:35.009776Z -4da7c3e3b14d99436c9ba72d66d46832 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResBag.html -file - - - - -2008-02-29T14:57:35.025397Z -97f93e97fe64947d0c22422acd0b63eb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResLiteral.html -file - - - - -2008-02-29T14:57:35.025397Z -fb1e77647dfc8335b2fc9bbe86c15ca5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ResModel.html -file - - - - -2008-02-29T14:57:35.041018Z -75af4cf28402bd186cb1fdfc0c6d8ffb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResAlt.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResAlt.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResAlt.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResBag.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResBag.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResBag.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResContainer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResContainer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResContainer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResIterator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResIterator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResList.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResList.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResList.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResLiteral.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResLiteral.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResLiteral.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResProperty.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResProperty.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResProperty.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResResource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResResource.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResResource.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResSeq.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResSeq.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/ResSeq.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResAlt.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResAlt.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResAlt.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResBag.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResBag.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResBag.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResContainer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResContainer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResContainer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResList.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResList.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResList.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResLiteral.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResLiteral.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResModel.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResModel.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResProperty.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResProperty.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResResource.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResResource.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResSeq.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResSeq.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/prop-base/_resModel---ResSeq.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResAlt.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResAlt.html.svn-base deleted file mode 100755 index c3ff818f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResAlt.html.svn-base +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - Docs For Class ResAlt - - - - -
    -

    Class ResAlt

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Alternative resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResAlt.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResAlt
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResAlt - ResAlt - ([string $uri = null]) -
    - -
    - object ResResource/ResLiteral - getDefault - () -
    - -
    - void - setDefault - (object ResResource/ResLiteral $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResAlt (line 26) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResAlt - - ResAlt - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getDefault (line 38) -
    - - -

    Return the default value for this resource

    -
      -
    • access: public
    • -
    - -
    - object ResResource/ResLiteral - - getDefault - - () -
    - - - -
    - -
    - -
    - setDefault (line 58) -
    - - -

    Set the default value of this container.

    -
      -
    • access: public
    • -
    - -
    - void - - setDefault - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From ResContainer

    -
    - ResContainer::ResContainer()
    - ResContainer::add()
    - ResContainer::contains()
    - ResContainer::getMembers()
    - ResContainer::isAlt()
    - ResContainer::isBag()
    - ResContainer::isSeq()
    - ResContainer::remove()
    - ResContainer::size()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResBag.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResBag.html.svn-base deleted file mode 100755 index f3ff6cae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResBag.html.svn-base +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - Docs For Class ResBag - - - - -
    -

    Class ResBag

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Bag resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResBag.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResBag
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResBag - ResBag - ([string $uri = null]) -
    -
    -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResContainer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResContainer.html.svn-base deleted file mode 100755 index 3856aef3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResContainer.html.svn-base +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - Docs For Class ResContainer - - - - -
    -

    Class ResContainer

    - - -
    -
    Description
    - -
    - -

    An RDF Container.

    -

    This Class defines methods for accessing RDF container resources. These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResContainer.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - -
    ClassDescription
    ResAlt - This interface defines methods for accessing RDF Alternative resources. -
    ResBag - This interface defines methods for accessing RDF Bag resources. -
    ResSeq - This interface defines methods for accessing RDF Sequence resources. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResContainer - ResContainer - ([string $uri = null]) -
    - -
    - void - add - (object ResResource/ResLiteral $object) -
    - -
    - boolean - contains - (obejct $resResource) -
    - -
    - array - getMembers - () -
    - -
    - boolean - isAlt - () -
    - -
    - boolean - isBag - () -
    - -
    - boolean - isSeq - () -
    - -
    - void - remove - (obejct $object) -
    - -
    - integer - size - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResContainer (line 35) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResContainer - - ResContainer - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - add (line 47) -
    - - -

    Add a new value to a container.

    -

    The new value is added as the last element of the container.

    -
      -
    • access: public
    • -
    - -
    - void - - add - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    - -
    - -
    - contains (line 65) -
    - - -

    Determine whether the container contains a value

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (obejct $resResource) -
    - -
      -
    • - obejct - $resResource: ResResource/ResLiteral $resResource
    • -
    - - -
    - -
    - -
    - getMembers (line 120) -
    - - -

    Get an array of all resources that are values of this container

    -
      -
    • access: public
    • -
    - -
    - array - - getMembers - - () -
    - - - -
    - -
    - -
    - isAlt (line 87) -
    - - -

    Returns true, if this resource is a container from type rdf:Alt

    -
      -
    • access: public
    • -
    - -
    - boolean - - isAlt - - () -
    - - - -
    - -
    - -
    - isBag (line 98) -
    - - -

    Returns true, if this resource is a container from type rdf:Bag

    -
      -
    • access: public
    • -
    - -
    - boolean - - isBag - - () -
    - - - -
    - -
    - -
    - isSeq (line 109) -
    - - -

    Returns true, if this resource is a container from type rdf:Seq

    -
      -
    • access: public
    • -
    - -
    - boolean - - isSeq - - () -
    - - - -
    - -
    - -
    - remove (line 143) -
    - - -

    Remove a value from the container.

    -

    Once removed, the values in the container with a higher ordinal value are renumbered. The renumbering algorithm depends on the type of container.

    -
      -
    • access: public
    • -
    - -
    - void - - remove - - (obejct $object) -
    - -
      -
    • - obejct - $object: ResResource/ResLiteral $resResource
    • -
    - - -
    - -
    - -
    - size (line 178) -
    - - -

    Returns the number values in the container.

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResIterator.html.svn-base deleted file mode 100755 index 18e6ea18..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResIterator.html.svn-base +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - Docs For Class ResIterator - - - - -
    -

    Class ResIterator

    - - -
    -
    Description
    - -
    - -

    Implementation of a resource iterator.

    -

    This Iterator should be used in a for-loop like: $it = $ontClass->listInstances(); for ($it->rewind(); $it->valid(); $it->next()) { $currentResource=$it->current(); };

    - -

    - Located in /resModel/ResIterator.php (line 29) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResIterator - ResIterator - (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - void - setFindLiteralWithLang - (string $language) -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResIterator (line 125) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like inf find(). $getSPO supports the strings 's', 'p', and 'o' to return either the subject, predicate, or object of the result statements. $returnType supports the strings 'ResProperty', 'ResLiteral', 'OntProperty', 'OntClass', and 'Individual' and returns the resources as the matching type.

    -
      -
    • access: public
    • -
    - -
    - ResIterator - - ResIterator - - (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel) -
    - - - - -
    - -
    - -
    - current (line 175) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 238) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 163) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 141) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - setFindLiteralWithLang (line 250) -
    - - -

    Sets that only Literals with the matching language should be returned

    -
      -
    • access: public
    • -
    - -
    - void - - setFindLiteralWithLang - - (string $language) -
    - -
      -
    • - string - $language
    • -
    - - -
    - -
    - -
    - valid (line 153) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResList.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResList.html.svn-base deleted file mode 100755 index 9401b16a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResList.html.svn-base +++ /dev/null @@ -1,835 +0,0 @@ - - - - - - Docs For Class ResList - - - - -
    -

    Class ResList

    - - -
    -
    Description
    - -
    - -

    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.

    -

    A well-formed list has cells that are made up of three statements: one denoting the rdf:type of the list cell, one denoting the link to the value of the list at that point, and one pointing to the list tail. If a list cell is not well-formed, list operations may fail in unpredictable ways. However, to explicitly check that the list is well-formed at all times is expensive, but you can call the isValid() method to manually check, if the list is well formed.

    - -

    - Located in /resModel/ResList.php (line 28) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResList
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResList - ResList - ([string $uri = null]) -
    - -
    - boolean - add - (object ResResource $resource) -
    - -
    - object ResList - append - ( $resList, object ResList $ResList) -
    - -
    - void - concatenate - (object ResList $ResList) -
    - - - -
    - boolean - contains - (object ResResource $value) -
    - -
    - object ResList - copy - () -
    - -
    - ResResource - get - (integer $position) -
    - -
    - array - getContentInArray - () -
    - -
    - ResResource - getHead - () -
    - -
    - object ResList - getTail - () -
    - -
    - integer - indexOf - (object ResResource $resource, [integer $offset = 0]) -
    - -
    - integer - isEmpty - (object Statement $statement) -
    - -
    - boolean - isValid - () -
    - - - -
    - ResList - removeHead - () -
    - -
    - boolean - removeList - () -
    - -
    - object ResResource - replace - (integer $index, object ResResource $resource) -
    - -
    - boolean - sameListAs - (object ResList $resList) -
    - -
    - ResResource - setHead - (object ResResource $value) -
    - -
    - object Reslist - setTail - (object ResList $resList) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResList (line 59) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResList - - ResList - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - add (line 99) -
    - - -

    Add the given value to the end of the list.

    -

    it is only defined if this is not the empty list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - add - - (object ResResource $resource) -
    - - - - -
    - -
    - -
    - append (line 377) -
    - - -

    Answer a new list that is formed by adding each element of

    -

    this list to the head of the given list. This is a non side-effecting operation on either this list or the given list, but generates a copy of this list. For a more storage efficient alternative, see concatenate

    -
      -
    • access: public
    • -
    - -
    - object ResList - - append - - ( $resList, object ResList $ResList) -
    - - - - -
    - -
    - -
    - concatenate (line 356) -
    - - -

    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.

    -
      -
    • access: public
    • -
    - -
    - void - - concatenate - - (object ResList $ResList) -
    - - - - -
    - -
    - -
    - cons (line 420) -
    - - -

    Return a reference to a new list cell whose head is value and whose tail is this list.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - cons - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - contains (line 249) -
    - - -

    Answer true if the given node appears as the value of a value of any of the cells of this list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - copy (line 399) -
    - - -

    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - copy - - () -
    - - - -
    - -
    - -
    - get (line 76) -
    - - -

    Returns the value of the list element at the specified position or null.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - get - - (integer $position) -
    - -
      -
    • - integer - $position
    • -
    - - -
    - -
    - -
    - getContentInArray (line 320) -
    - - -

    Get all values in the list as an array of ResResources

    -
      -
    • access: public
    • -
    - -
    - array - - getContentInArray - - () -
    - - - -
    - -
    - -
    - getHead (line 158) -
    - - -

    Get the value that is associated with the head of the list.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - getHead - - () -
    - - - -
    - -
    - -
    - getTail (line 262) -
    - - -

    Get the list that is the tail of this list.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - getTail - - () -
    - - - -
    - -
    - -
    - indexOf (line 197) -
    - - -

    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.

    -

    You can supply an offset to search for values. (First element has offset 0) Default is 0

    -
      -
    • access: public
    • -
    - -
    - integer - - indexOf - - (object ResResource $resource, [integer $offset = 0]) -
    - - - - -
    - -
    - -
    - isEmpty (line 309) -
    - - -

    Returns true, if this list is empty

    -
      -
    • access: public
    • -
    - -
    - integer - - isEmpty - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - isValid (line 541) -
    - - -

    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary

    -
      -
    • access: public
    • -
    - -
    - boolean - - isValid - - () -
    - - - -
    - -
    - -
    - remove (line 502) -
    - - -

    Remove the given value from this list.

    -

    If value does not occur in the list, no action is taken. Since removing the head of the list will invalidate the list head cell, in general the list must return the list that results from this operation. However, in many cases the return value will be the same as the object that this method is invoked on.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - remove - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - removeHead (line 171) -
    - - -

    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.

    -
      -
    • access: public
    • -
    - -
    - ResList - - removeHead - - () -
    - - - -
    - -
    - -
    - removeList (line 280) -
    - - -

    Remove all of the components of this list from the model.

    -

    Note that this is operation is only removing the list cells themselves, not the resources referenced by the list - unless being the object of an rdf:first statement is the only mention of that resource in the model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeList - - () -
    - - - -
    - -
    - -
    - replace (line 227) -
    - - -

    Replace the value at the i'th position in the list with the given value

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - replace - - (integer $index, object ResResource $resource) -
    - - - - -
    - -
    - -
    - sameListAs (line 467) -
    - - -

    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.

    -

    While such a test is sufficient for many purposes, this test provides a broader equality definition, but is correspondingly more expensive to test.

    -
      -
    • access: public
    • -
    - -
    - boolean - - sameListAs - - (object ResList $resList) -
    - - - - -
    - -
    - -
    - setHead (line 138) -
    - - -

    Update the head of the list to have the given value, and return the previous value.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - setHead - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - setTail (line 442) -
    - - -

    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.

    -
      -
    • access: public
    • -
    - -
    - object Reslist - - setTail - - (object ResList $resList) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResLiteral.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResLiteral.html.svn-base deleted file mode 100755 index e38d0922..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResLiteral.html.svn-base +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - Docs For Class ResLiteral - - - - -
    -

    Class ResLiteral

    - - -
    -
    Description
    - -
    - -

    An RDF literal.

    -

    The literal supports the xml:lang and rdf:datatype property. For XML datatypes see: http://www.w3.org/TR/xmlschema-2/

    - -

    - Located in /resModel/ResLiteral.php (line 19) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Literal
    -         |
    -         --ResLiteral
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResLiteral - ResLiteral - (string $str, [string $language = null]) -
    - -
    - object model - &getAssociatedModel - () -
    - -
    - void - setAssociatedModel - ( &$model, object model $model) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResLiteral (line 36) -
    - - -

    Constructor You have to supply a string.

    - -
    - ResLiteral - - ResLiteral - - (string $str, [string $language = null]) -
    - -
      -
    • - string - $str: label of the literal
    • -
    • - string - $language: optional language identifier
    • -
    - - -
    - -
    - -
    - getAssociatedModel (line 59) -
    - - -

    Get the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - object model - - &getAssociatedModel - - () -
    - - - -
    - -
    - -
    - setAssociatedModel (line 48) -
    - - -

    Sets the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - void - - setAssociatedModel - - ( &$model, object model $model) -
    - -
      -
    • - object model - $model
    • -
    • - - &$model
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Literal

    -
    - Literal::Literal()
    - Literal::equals()
    - Literal::getDatatype()
    - Literal::getLabel()
    - Literal::getLanguage()
    - Literal::setDatatype()
    - Literal::setLanguage()
    - Literal::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResModel.html.svn-base deleted file mode 100755 index 5b4dd9e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResModel.html.svn-base +++ /dev/null @@ -1,1674 +0,0 @@ - - - - - - Docs For Class ResModel - - - - -
    -

    Class ResModel

    - - -
    -
    Description
    - -
    - -

    A ResModel provides an resource centric view on an underlying RDF model.

    -

    ResModels show information not as statements but as resources with properties, similar to Jena models. ResModels may create Resources [URI nodes and bnodes]. Creating a Resource does not make the Resource visible to the model; Resources are only "in" Models if Statements about them are added to the Model. Similarly the only way to "remove" a Resource from a Model is to remove all the Statements that mention it.

    When a Resource or Literal is created by a Model, the Model is free to re-use an existing Resource or Literal object with the correct values, or it may create a fresh one.

    - -

    - Located in /resModel/ResModel.php (line 26) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    OntModel - Enhanced view of the model that is known to contain ontology data, under a -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResModel - ResModel - ( &$model, object model $model) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - ( $prefix,  $namespace, String $prefix,) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - boolean - addWithoutDuplicates - (object Statement $statement) -
    - -
    - boolean - contains - ( &$statement, object Statement $statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - boolean - containsResource - (object Node &$node) -
    - -
    - object ResProperty - createAlt - ([string $uri = null]) -
    - -
    - object ResProperty - createBag - ([string $uri = null]) -
    - -
    - object ResProperty - createList - ([string $uri = null]) -
    - -
    - object ResLiteral - createLiteral - (string $label, [string $languageTag = null]) -
    - -
    - object ResProperty - createProperty - ([string $uri = null]) -
    - -
    - object ResResource - createResource - ([string $uri = null]) -
    - -
    - object ResProperty - createSeq - ([string $uri = null]) -
    - -
    - object ResLiteral - createTypedLiteral - (string $value, string $dtype) -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - array - find - (object ResResource $subject, object ResResource $predicate, object ResResource $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - string - getBaseURI - () -
    - -
    - object Model - &getModel - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object Statement - getProperty - (object ResResource $subject, object ResResource $property) -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - - - - - - - - - -
    - void - load - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
    - array - &rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - subtract - (object Model $model) -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHTMLTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResModel (line 44) -
    - - -

    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.

    -
      -
    • access: public
    • -
    - -
    - ResModel - - ResModel - - ( &$model, object model $model) -
    - -
      -
    • - object model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - add (line 197) -
    - - -

    Adds a new triple to the Model without checking if the statement is already in the Model.

    -

    So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) Expects a statements with ResResources(ResLiterals)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - addModel (line 508) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - addNamespace (line 853) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - ( $prefix,  $namespace, String $prefix,) -
    - -
      -
    • - String - $prefix,: String $nmsp
    • -
    • - - $prefix
    • -
    • - - $namespace
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 841) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 216) -
    - - -

    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise. Expects a statements with ResResources(ResLiterals)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - contains (line 234) -
    - - -

    Tests if the Model contains the given statement.

    -

    TRUE if the statement belongs to the model; FALSE otherwise. Expects a statement of ResResources(ResLiterals)

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - - -
    - -
    - -
    - containsAll (line 251) -
    - - -

    Determine if all of the statements in a model are also contained in this model.

    -

    True if all of the statements in $model are also contained in this model and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - -
      -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - containsAny (line 267) -
    - - -

    Determine if any of the statements in a model are also contained in this model.

    -

    True if any of the statements in $model are also contained in this model and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - -
      -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - containsResource (line 281) -
    - - -

    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsResource - - (object Node &$node) -
    - -
      -
    • - object Node - &$node
    • -
    - - -
    - -
    - -
    - createAlt (line 527) -
    - - -

    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createAlt - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createBag (line 547) -
    - - -

    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createBag - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createList (line 587) -
    - - -

    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createList - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createLiteral (line 111) -
    - - -

    Create an untyped literal from a String value with a specified language.

    -

    If you want to type this literal, you have to set a datatype before adding it to the model.

    -
      -
    • access: public
    • -
    - -
    - object ResLiteral - - createLiteral - - (string $label, [string $languageTag = null]) -
    - -
      -
    • - string - $label
    • -
    • - string - $languageTag
    • -
    - - -
    - -
    - -
    - createProperty (line 91) -
    - - -

    Create a new Property associated with this model.

    -

    This method may return an existing property with the correct URI and model, or it may construct a fresh one, as it sees fit.

    Subsequent operations on the returned property may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createResource (line 69) -
    - - -

    Create a new resource associated with this model.

    -

    If the uri string isn't set, this creates a bnode. Otherwise it creates a URI node. A URI resource is .equals() to any other URI Resource with the same URI (even in a different model - be warned).

    This method may return an existing Resource with the correct URI and model, or it may construct a fresh one, as it sees fit.

    Operations on the result Resource may change this model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - createResource - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createSeq (line 567) -
    - - -

    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createSeq - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createTypedLiteral (line 300) -
    - - -

    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.

    -
      -
    • access: public
    • -
    - -
    - object ResLiteral - - createTypedLiteral - - (string $value, string $dtype) -
    - -
      -
    • - string - $value
    • -
    • - string - $dtype
    • -
    - - -
    - -
    - -
    - equals (line 321) -
    - - -

    Checks if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    Warning: This method doesn't work correct with models where the same blank node has different identifiers in the two models. We will correct this in a future version.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 133) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all Statements with $node as object. Returns an array of statements with ResResources.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - array - - find - - (object ResResource $subject, object ResResource $predicate, object ResResource $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 168) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement with ResResources of the Model where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search.

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - integer - $offset
    • -
    - - -
    - -
    - -
    - getBaseURI (line 644) -
    - - -

    Return current baseURI.

    -
      -
    • access: public
    • -
    - -
    - string - - getBaseURI - - () -
    - - - -
    - -
    - -
    - getModel (line 602) -
    - - -

    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements

    -
      -
    • access: public
    • -
    - -
    - object Model - - &getModel - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 826) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - getProperty (line 353) -
    - - -

    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.

    -

    If none exist, return null; if several exist, pick one arbitrarily.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object Statement - - getProperty - - (object ResResource $subject, object ResResource $property) -
    - - - - -
    - -
    - -
    - intersect (line 685) -
    - - -

    Returns a new model containing all the statements which are in both this model and another.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - isEmpty (line 376) -
    - - -

    Checks if MemModel is empty

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listObjects (line 388) -
    - - -

    Returns a ResIterator with all objects in a model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listObjects - - () -
    - - - -
    - -
    - -
    - listObjectsOfProperty (line 401) -
    - - -

    Returns a ResIterator with all objects with a given property and property value.

    -
      -
    • access: public
    • -
    - -
    - object ResIterator - - listObjectsOfProperty - - (object ResResource $property, [object ResResource $value = null]) -
    - - - - -
    - -
    - -
    - listSubjects (line 414) -
    - - -

    Returns a ResIterator with all subjects in a model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listSubjects - - () -
    - - - -
    - -
    - -
    - listSubjectsWithProperty (line 428) -
    - - -

    Returns a ResIterator with all subjects with a given property and property value.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listSubjectsWithProperty - - (object ResResource $property, [object ResResource $value = null]) -
    - - - - -
    - -
    - -
    - load (line 633) -
    - - -

    Load a model from a file containing RDF, N3 or N-Triples.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    • - boolean - $stream
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 795) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 813) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - remove (line 443) -
    - - -

    Removes the statement of ResResources(ResTriples) from the MemModel.

    -

    TRUE if the statement is removed. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - removeNamespace (line 864) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - saveAs (line 662) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the MemModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    - -
    - -
    - setBaseURI (line 766) -
    - - -

    Set a base URI for the MemModel.

    -

    Affects creating of new resources and serialization syntax. If the URI doesn't end with # : or /, then a # is added to the URI.

    -
      -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 457) -
    - - -

    Number of statements in the MemModel

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    - -
    - -
    - subtract (line 336) -
    - - -

    Returns a new model that is the subtraction of another model from this model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - subtract - - (object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    - - -
    - -
    - -
    - unite (line 489) -
    - - -

    Returns a new Model that is the set-union of the model with another model.

    -

    Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - writeAsHTMLTable (line 672) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHTMLTable - - () -
    - - - -
    - -
    - -
    - writeRdfToString (line 777) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:35 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResProperty.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResProperty.html.svn-base deleted file mode 100755 index cfff3142..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResProperty.html.svn-base +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Docs For Class ResProperty - - - - -
    -

    Class ResProperty

    - - -
    -
    Description
    - -
    - -

    An RDF Property.

    - -

    - Located in /resModel/ResProperty.php (line 17) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResProperty
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResProperty - ResProperty - (string $uri) -
    -
    -
    -
    - - - -
    -
    Methods
    - - -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResResource.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResResource.html.svn-base deleted file mode 100755 index fe7faf39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResResource.html.svn-base +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - Docs For Class ResResource - - - - -
    -

    Class ResResource

    - - -
    -
    Description
    - -
    - -

    An RDF Resource.

    -

    Resource instances, when created, are associated with a specific model. They support a range of methods, such as getProperty() and addProperty() which will access or modify that model. This enables the programmer to write code in a compact and easy style.

    - -

    - Located in /resModel/ResResource.php (line 22) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    ClassDescription
    OntResource - Provides a common super-type for all of the abstractions in this ontology representation package. -
    ResContainer - An RDF Container. -
    ResList - Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure. -
    ResProperty - An RDF Property. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResResource - ResResource - (string $uri) -
    - -
    - object ResResource - addProperty - (ResResource $property, ResResource/ResLiteral $object) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - object Model - getAssociatedModel - () -
    - -
    - boolean - getIsAnon - () -
    - - - -
    - object ResResource - hasProperty - (ResResource $property, [ResResource $value = null]) -
    - -
    - ResIterator - listProperties - ([ResResource $property = null]) -
    - -
    - object ResResource - removeAll - ([object resource $property = null]) -
    - - - -
    - void - setAssociatedModel - ( &$model, object Model $model) -
    - -
    - void - setIsAnon - (boolean $isAnon) -
    - -
    - void - setURI - (string $uri) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResResource (line 46) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - ResResource - - ResResource - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addProperty (line 97) -
    - - -

    Add a property to this resource.

    -

    A statement with this resource as the subject, p as the predicate and o as the object is added to the model associated with this resource.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - addProperty - - (ResResource $property, ResResource/ResLiteral $object) -
    - -
      -
    • - ResResource - $property
    • -
    • - ResResource/ResLiteral - $object
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - equals (line 175) -
    - - -

    Checks if the resource equals another resource.

    -

    Two resources are equal, if they have the same URI

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - -
    -
    Redefinition of:
    -
    -
    Resource::equals()
    -
    Checks if the resource equals another resource.
    -
    - -
    - -
    - -
    - getAssociatedModel (line 71) -
    - - -

    Get the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - object Model - - getAssociatedModel - - () -
    - - - -
    - -
    - -
    - getIsAnon (line 151) -
    - - -

    Determine whether this resource is an anonymous resource

    -
      -
    • access: public
    • -
    - -
    - boolean - - getIsAnon - - () -
    - - - -
    - -
    - -
    - getProperty (line 125) -
    - - -

    Answer some statement (this, p, O) in the associated model.

    -

    If there are several such statements, any one of them may be returned. If no such statements exist, null is returned.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getProperty - - (ResResource $property) -
    - - - - -
    - -
    - -
    - hasProperty (line 138) -
    - - -

    Determine whether this resource has any values for a given property.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - hasProperty - - (ResResource $property, [ResResource $value = null]) -
    - - - - -
    - -
    - -
    - listProperties (line 111) -
    - - -

    List all the values with the property p as statements in an array.

    -
      -
    • access: public
    • -
    - -
    - ResIterator - - listProperties - - ([ResResource $property = null]) -
    - - - - -
    - -
    - -
    - removeAll (line 191) -
    - - -

    Delete all the statements with predicate p for this resource from its associated model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - removeAll - - ([object resource $property = null]) -
    - -
      -
    • - object resource - $property
    • -
    - - -
    - -
    - -
    - removeProperties (line 206) -
    - - -

    Delete all the properties for this resource from the associated model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - removeProperties - - () -
    - - - -
    - -
    - -
    - setAssociatedModel (line 58) -
    - - -

    Sets the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - void - - setAssociatedModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - setIsAnon (line 162) -
    - - -

    Set whether this resource is an anonymous resource

    -
      -
    • access: public
    • -
    - -
    - void - - setIsAnon - - (boolean $isAnon) -
    - -
      -
    • - boolean - $isAnon
    • -
    - - -
    - -
    - -
    - setURI (line 82) -
    - - -

    Sets the URI of this resource

    -
      -
    • access: public
    • -
    - -
    - void - - setURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResSeq.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResSeq.html.svn-base deleted file mode 100755 index e76f4fd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/ResSeq.html.svn-base +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - Docs For Class ResSeq - - - - -
    -

    Class ResSeq

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Sequence resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResSeq.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResSeq
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResSeq - ResSeq - ([string $uri = null]) -
    - -
    - boolean - addAtIndex - (integer $index,  $object, object ResResource/ResLiteral $resResource) -
    - -
    - object ResResource/ResLiteral - getMember - (integer $index) -
    - -
    - integer - indexOf - (object ResResource/ResLiteral $object) -
    - -
    - void - removeAtIndex - (integer $index) -
    - -
    - boolean - set - (integer $index,  $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResSeq (line 26) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResSeq - - ResSeq - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addAtIndex (line 42) -
    - - -

    Insert a new member into the sequence at the specified position.

    -

    The existing member at that position, and all others with higher indexes, have their index increased by one.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addAtIndex - - (integer $index,  $object, object ResResource/ResLiteral $resResource) -
    - -
      -
    • - integer - $index
    • -
    • - object ResResource/ResLiteral - $resResource
    • -
    • - - $object
    • -
    - - -
    - -
    - -
    - getMember (line 72) -
    - - -

    Get the member at a given index

    -
      -
    • access: public
    • -
    - -
    - object ResResource/ResLiteral - - getMember - - (integer $index) -
    - -
      -
    • - integer - $index
    • -
    - - -
    - -
    - -
    - indexOf (line 95) -
    - - -

    Return the index of a given member of the sequence.

    -

    If the same value appears more than once in the sequence, it is undefined which of the indexes will be returned. If the member is not found in this sequence, a value of 0 is returned.

    -
      -
    • access: public
    • -
    - -
    - integer - - indexOf - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    - -
    - -
    - removeAtIndex (line 119) -
    - - -

    Remove the member at the specified index.

    -

    All other members with a higher index will have their index reduced by one.

    -
      -
    • access: public
    • -
    - -
    - void - - removeAtIndex - - (integer $index) -
    - -
      -
    • - integer - $index
    • -
    - - -
    - -
    - -
    - set (line 143) -
    - - -

    Set the value at a given index in the sequence.

    -

    If the index is not in the range of the sequence, false is returned

    -
      -
    • access: public
    • -
    - -
    - boolean - - set - - (integer $index,  $object) -
    - -
      -
    • - integer - $index
    • -
    • - - $object
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From ResContainer

    -
    - ResContainer::ResContainer()
    - ResContainer::add()
    - ResContainer::contains()
    - ResContainer::getMembers()
    - ResContainer::isAlt()
    - ResContainer::isBag()
    - ResContainer::isSeq()
    - ResContainer::remove()
    - ResContainer::size()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResAlt.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResAlt.php.html.svn-base deleted file mode 100755 index 6136df32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResAlt.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResAlt.php - - - - -
    -

    /resModel/ResAlt.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResAlt - - This interface defines methods for accessing RDF Alternative resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResBag.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResBag.php.html.svn-base deleted file mode 100755 index 987aaef1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResBag.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResBag.php - - - - -
    -

    /resModel/ResBag.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResBag - - This interface defines methods for accessing RDF Bag resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResContainer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResContainer.php.html.svn-base deleted file mode 100755 index 552c84ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResContainer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResContainer.php - - - - -
    -

    /resModel/ResContainer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResContainer - - An RDF Container. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResIterator.php.html.svn-base deleted file mode 100755 index 1b40bcdb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResIterator.php.html.svn-base +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Docs for page ResIterator.php - - - - -
    -

    /resModel/ResIterator.php

    - - -
    -
    Description
    - -
    - -

    ---------------------------------------------------------------------------------- Class: ResIterator ----------------------------------------------------------------------------------

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResIterator - - Implementation of a resource iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResList.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResList.php.html.svn-base deleted file mode 100755 index 8bdd0b44..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResList.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResList.php - - - - -
    -

    /resModel/ResList.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResList - - Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResLiteral.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResLiteral.php.html.svn-base deleted file mode 100755 index c46d87e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResLiteral.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResLiteral.php - - - - -
    -

    /resModel/ResLiteral.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResLiteral - - An RDF literal. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResModel.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResModel.php.html.svn-base deleted file mode 100755 index b347a613..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResModel.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResModel.php - - - - -
    -

    /resModel/ResModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResModel - - A ResModel provides an resource centric view on an underlying RDF model. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResProperty.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResProperty.php.html.svn-base deleted file mode 100755 index 391323e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResProperty.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResProperty.php - - - - -
    -

    /resModel/ResProperty.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResProperty - - An RDF Property. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResResource.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResResource.php.html.svn-base deleted file mode 100755 index 16470993..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResResource.php.html.svn-base +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Docs for page ResResource.php - - - - -
    -

    /resModel/ResResource.php

    - - -
    -
    Description
    - -
    - -

    ----------------------------------------------------------------------------------

    -

    Class: ResResource ----------------------------------------------------------------------------------

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResResource - - An RDF Resource. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResSeq.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResSeq.php.html.svn-base deleted file mode 100755 index d9e611d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/.svn/text-base/_resModel---ResSeq.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResSeq.php - - - - -
    -

    /resModel/ResSeq.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResSeq - - This interface defines methods for accessing RDF Sequence resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResAlt.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResAlt.html deleted file mode 100755 index e116cd56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResAlt.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - Docs For Class ResAlt - - - - -
    -

    Class ResAlt

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Alternative resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResAlt.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResAlt
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResAlt - ResAlt - ([string $uri = null]) -
    - -
    - object ResResource/ResLiteral - getDefault - () -
    - -
    - void - setDefault - (object ResResource/ResLiteral $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResAlt (line 26) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResAlt - - ResAlt - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - getDefault (line 38) -
    - - -

    Return the default value for this resource

    -
      -
    • access: public
    • -
    - -
    - object ResResource/ResLiteral - - getDefault - - () -
    - - - -
    - -
    - -
    - setDefault (line 58) -
    - - -

    Set the default value of this container.

    -
      -
    • access: public
    • -
    - -
    - void - - setDefault - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From ResContainer

    -
    - ResContainer::ResContainer()
    - ResContainer::add()
    - ResContainer::contains()
    - ResContainer::getMembers()
    - ResContainer::isAlt()
    - ResContainer::isBag()
    - ResContainer::isSeq()
    - ResContainer::remove()
    - ResContainer::size()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResBag.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResBag.html deleted file mode 100755 index 9b2b75ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResBag.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - Docs For Class ResBag - - - - -
    -

    Class ResBag

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Bag resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResBag.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResBag
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResBag - ResBag - ([string $uri = null]) -
    -
    -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResContainer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResContainer.html deleted file mode 100755 index 900305bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResContainer.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - Docs For Class ResContainer - - - - -
    -

    Class ResContainer

    - - -
    -
    Description
    - -
    - -

    An RDF Container.

    -

    This Class defines methods for accessing RDF container resources. These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResContainer.php (line 18) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - -
    ClassDescription
    ResAlt - This interface defines methods for accessing RDF Alternative resources. -
    ResBag - This interface defines methods for accessing RDF Bag resources. -
    ResSeq - This interface defines methods for accessing RDF Sequence resources. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResContainer - ResContainer - ([string $uri = null]) -
    - -
    - void - add - (object ResResource/ResLiteral $object) -
    - -
    - boolean - contains - (obejct $resResource) -
    - -
    - array - getMembers - () -
    - -
    - boolean - isAlt - () -
    - -
    - boolean - isBag - () -
    - -
    - boolean - isSeq - () -
    - -
    - void - remove - (obejct $object) -
    - -
    - integer - size - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResContainer (line 35) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResContainer - - ResContainer - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - add (line 47) -
    - - -

    Add a new value to a container.

    -

    The new value is added as the last element of the container.

    -
      -
    • access: public
    • -
    - -
    - void - - add - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    - -
    - -
    - contains (line 65) -
    - - -

    Determine whether the container contains a value

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (obejct $resResource) -
    - -
      -
    • - obejct - $resResource: ResResource/ResLiteral $resResource
    • -
    - - -
    - -
    - -
    - getMembers (line 120) -
    - - -

    Get an array of all resources that are values of this container

    -
      -
    • access: public
    • -
    - -
    - array - - getMembers - - () -
    - - - -
    - -
    - -
    - isAlt (line 87) -
    - - -

    Returns true, if this resource is a container from type rdf:Alt

    -
      -
    • access: public
    • -
    - -
    - boolean - - isAlt - - () -
    - - - -
    - -
    - -
    - isBag (line 98) -
    - - -

    Returns true, if this resource is a container from type rdf:Bag

    -
      -
    • access: public
    • -
    - -
    - boolean - - isBag - - () -
    - - - -
    - -
    - -
    - isSeq (line 109) -
    - - -

    Returns true, if this resource is a container from type rdf:Seq

    -
      -
    • access: public
    • -
    - -
    - boolean - - isSeq - - () -
    - - - -
    - -
    - -
    - remove (line 143) -
    - - -

    Remove a value from the container.

    -

    Once removed, the values in the container with a higher ordinal value are renumbered. The renumbering algorithm depends on the type of container.

    -
      -
    • access: public
    • -
    - -
    - void - - remove - - (obejct $object) -
    - -
      -
    • - obejct - $object: ResResource/ResLiteral $resResource
    • -
    - - -
    - -
    - -
    - size (line 178) -
    - - -

    Returns the number values in the container.

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResIterator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResIterator.html deleted file mode 100755 index 17d8361b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResIterator.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - Docs For Class ResIterator - - - - -
    -

    Class ResIterator

    - - -
    -
    Description
    - -
    - -

    Implementation of a resource iterator.

    -

    This Iterator should be used in a for-loop like: $it = $ontClass->listInstances(); for ($it->rewind(); $it->valid(); $it->next()) { $currentResource=$it->current(); };

    - -

    - Located in /resModel/ResIterator.php (line 29) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResIterator - ResIterator - (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - void - setFindLiteralWithLang - (string $language) -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResIterator (line 125) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like inf find(). $getSPO supports the strings 's', 'p', and 'o' to return either the subject, predicate, or object of the result statements. $returnType supports the strings 'ResProperty', 'ResLiteral', 'OntProperty', 'OntClass', and 'Individual' and returns the resources as the matching type.

    -
      -
    • access: public
    • -
    - -
    - ResIterator - - ResIterator - - (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel) -
    - - - - -
    - -
    - -
    - current (line 175) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 238) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 163) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 141) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - setFindLiteralWithLang (line 250) -
    - - -

    Sets that only Literals with the matching language should be returned

    -
      -
    • access: public
    • -
    - -
    - void - - setFindLiteralWithLang - - (string $language) -
    - -
      -
    • - string - $language
    • -
    - - -
    - -
    - -
    - valid (line 153) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResList.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResList.html deleted file mode 100755 index c388d5f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResList.html +++ /dev/null @@ -1,835 +0,0 @@ - - - - - - Docs For Class ResList - - - - -
    -

    Class ResList

    - - -
    -
    Description
    - -
    - -

    Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.

    -

    A well-formed list has cells that are made up of three statements: one denoting the rdf:type of the list cell, one denoting the link to the value of the list at that point, and one pointing to the list tail. If a list cell is not well-formed, list operations may fail in unpredictable ways. However, to explicitly check that the list is well-formed at all times is expensive, but you can call the isValid() method to manually check, if the list is well formed.

    - -

    - Located in /resModel/ResList.php (line 28) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResList
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResList - ResList - ([string $uri = null]) -
    - -
    - boolean - add - (object ResResource $resource) -
    - -
    - object ResList - append - ( $resList, object ResList $ResList) -
    - -
    - void - concatenate - (object ResList $ResList) -
    - - - -
    - boolean - contains - (object ResResource $value) -
    - -
    - object ResList - copy - () -
    - -
    - ResResource - get - (integer $position) -
    - -
    - array - getContentInArray - () -
    - -
    - ResResource - getHead - () -
    - -
    - object ResList - getTail - () -
    - -
    - integer - indexOf - (object ResResource $resource, [integer $offset = 0]) -
    - -
    - integer - isEmpty - (object Statement $statement) -
    - -
    - boolean - isValid - () -
    - - - -
    - ResList - removeHead - () -
    - -
    - boolean - removeList - () -
    - -
    - object ResResource - replace - (integer $index, object ResResource $resource) -
    - -
    - boolean - sameListAs - (object ResList $resList) -
    - -
    - ResResource - setHead - (object ResResource $value) -
    - -
    - object Reslist - setTail - (object ResList $resList) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResList (line 59) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResList - - ResList - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - add (line 99) -
    - - -

    Add the given value to the end of the list.

    -

    it is only defined if this is not the empty list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - add - - (object ResResource $resource) -
    - - - - -
    - -
    - -
    - append (line 377) -
    - - -

    Answer a new list that is formed by adding each element of

    -

    this list to the head of the given list. This is a non side-effecting operation on either this list or the given list, but generates a copy of this list. For a more storage efficient alternative, see concatenate

    -
      -
    • access: public
    • -
    - -
    - object ResList - - append - - ( $resList, object ResList $ResList) -
    - - - - -
    - -
    - -
    - concatenate (line 356) -
    - - -

    Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. This is a side-effecting operation on this list; for a non side-effecting alternative, see append.

    -
      -
    • access: public
    • -
    - -
    - void - - concatenate - - (object ResList $ResList) -
    - - - - -
    - -
    - -
    - cons (line 420) -
    - - -

    Return a reference to a new list cell whose head is value and whose tail is this list.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - cons - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - contains (line 249) -
    - - -

    Answer true if the given node appears as the value of a value of any of the cells of this list.

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - copy (line 399) -
    - - -

    Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - copy - - () -
    - - - -
    - -
    - -
    - get (line 76) -
    - - -

    Returns the value of the list element at the specified position or null.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - get - - (integer $position) -
    - -
      -
    • - integer - $position
    • -
    - - -
    - -
    - -
    - getContentInArray (line 320) -
    - - -

    Get all values in the list as an array of ResResources

    -
      -
    • access: public
    • -
    - -
    - array - - getContentInArray - - () -
    - - - -
    - -
    - -
    - getHead (line 158) -
    - - -

    Get the value that is associated with the head of the list.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - getHead - - () -
    - - - -
    - -
    - -
    - getTail (line 262) -
    - - -

    Get the list that is the tail of this list.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - getTail - - () -
    - - - -
    - -
    - -
    - indexOf (line 197) -
    - - -

    Get the Position of the first occurrence of the given value in the list, or -1 if the value is not in the list.

    -

    You can supply an offset to search for values. (First element has offset 0) Default is 0

    -
      -
    • access: public
    • -
    - -
    - integer - - indexOf - - (object ResResource $resource, [integer $offset = 0]) -
    - - - - -
    - -
    - -
    - isEmpty (line 309) -
    - - -

    Returns true, if this list is empty

    -
      -
    • access: public
    • -
    - -
    - integer - - isEmpty - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - isValid (line 541) -
    - - -

    Answer true if the list is well-formed, by checking that each node is correctly typed, and has a head and tail pointer from the correct vocabulary

    -
      -
    • access: public
    • -
    - -
    - boolean - - isValid - - () -
    - - - -
    - -
    - -
    - remove (line 502) -
    - - -

    Remove the given value from this list.

    -

    If value does not occur in the list, no action is taken. Since removing the head of the list will invalidate the list head cell, in general the list must return the list that results from this operation. However, in many cases the return value will be the same as the object that this method is invoked on.

    -
      -
    • access: public
    • -
    - -
    - object ResList - - remove - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - removeHead (line 171) -
    - - -

    Remove the head of the list. The tail of the list remains in the model. Note that no changes are made to list cells that point to this list cell as their tail.

    -
      -
    • access: public
    • -
    - -
    - ResList - - removeHead - - () -
    - - - -
    - -
    - -
    - removeList (line 280) -
    - - -

    Remove all of the components of this list from the model.

    -

    Note that this is operation is only removing the list cells themselves, not the resources referenced by the list - unless being the object of an rdf:first statement is the only mention of that resource in the model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - removeList - - () -
    - - - -
    - -
    - -
    - replace (line 227) -
    - - -

    Replace the value at the i'th position in the list with the given value

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - replace - - (integer $index, object ResResource $resource) -
    - - - - -
    - -
    - -
    - sameListAs (line 467) -
    - - -

    Answer true if this list has the same elements in the same order as the given list. Note that the standard equals test just tests for equality of two given list cells.

    -

    While such a test is sufficient for many purposes, this test provides a broader equality definition, but is correspondingly more expensive to test.

    -
      -
    • access: public
    • -
    - -
    - boolean - - sameListAs - - (object ResList $resList) -
    - - - - -
    - -
    - -
    - setHead (line 138) -
    - - -

    Update the head of the list to have the given value, and return the previous value.

    -
      -
    • access: public
    • -
    - -
    - ResResource - - setHead - - (object ResResource $value) -
    - - - - -
    - -
    - -
    - setTail (line 442) -
    - - -

    Update the list cell at the front of the list to have the given list as tail. The old tail is returned, and remains in the model.

    -
      -
    • access: public
    • -
    - -
    - object Reslist - - setTail - - (object ResList $resList) -
    - - - - -
    -

    Inherited Methods

    - - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResLiteral.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResLiteral.html deleted file mode 100755 index efa5e51d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResLiteral.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - Docs For Class ResLiteral - - - - -
    -

    Class ResLiteral

    - - -
    -
    Description
    - -
    - -

    An RDF literal.

    -

    The literal supports the xml:lang and rdf:datatype property. For XML datatypes see: http://www.w3.org/TR/xmlschema-2/

    - -

    - Located in /resModel/ResLiteral.php (line 19) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Literal
    -         |
    -         --ResLiteral
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResLiteral - ResLiteral - (string $str, [string $language = null]) -
    - -
    - object model - &getAssociatedModel - () -
    - -
    - void - setAssociatedModel - ( &$model, object model $model) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResLiteral (line 36) -
    - - -

    Constructor You have to supply a string.

    - -
    - ResLiteral - - ResLiteral - - (string $str, [string $language = null]) -
    - -
      -
    • - string - $str: label of the literal
    • -
    • - string - $language: optional language identifier
    • -
    - - -
    - -
    - -
    - getAssociatedModel (line 59) -
    - - -

    Get the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - object model - - &getAssociatedModel - - () -
    - - - -
    - -
    - -
    - setAssociatedModel (line 48) -
    - - -

    Sets the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - void - - setAssociatedModel - - ( &$model, object model $model) -
    - -
      -
    • - object model - $model
    • -
    • - - &$model
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Literal

    -
    - Literal::Literal()
    - Literal::equals()
    - Literal::getDatatype()
    - Literal::getLabel()
    - Literal::getLanguage()
    - Literal::setDatatype()
    - Literal::setLanguage()
    - Literal::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResModel.html deleted file mode 100755 index 2b2de629..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResModel.html +++ /dev/null @@ -1,1674 +0,0 @@ - - - - - - Docs For Class ResModel - - - - -
    -

    Class ResModel

    - - -
    -
    Description
    - -
    - -

    A ResModel provides an resource centric view on an underlying RDF model.

    -

    ResModels show information not as statements but as resources with properties, similar to Jena models. ResModels may create Resources [URI nodes and bnodes]. Creating a Resource does not make the Resource visible to the model; Resources are only "in" Models if Statements about them are added to the Model. Similarly the only way to "remove" a Resource from a Model is to remove all the Statements that mention it.

    When a Resource or Literal is created by a Model, the Model is free to re-use an existing Resource or Literal object with the correct values, or it may create a fresh one.

    - -

    - Located in /resModel/ResModel.php (line 26) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    OntModel - Enhanced view of the model that is known to contain ontology data, under a -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResModel - ResModel - ( &$model, object model $model) -
    - -
    - void - add - (object Statement $statement) -
    - -
    - void - addModel - ( &$model, object Model $model) -
    - -
    - void - addNamespace - ( $prefix,  $namespace, String $prefix,) -
    - -
    - void - addParsedNamespaces - (Array $newNs) -
    - -
    - boolean - addWithoutDuplicates - (object Statement $statement) -
    - -
    - boolean - contains - ( &$statement, object Statement $statement) -
    - -
    - boolean - containsAll - (object Model &$model) -
    - -
    - boolean - containsAny - (object Model &$model) -
    - -
    - boolean - containsResource - (object Node &$node) -
    - -
    - object ResProperty - createAlt - ([string $uri = null]) -
    - -
    - object ResProperty - createBag - ([string $uri = null]) -
    - -
    - object ResProperty - createList - ([string $uri = null]) -
    - -
    - object ResLiteral - createLiteral - (string $label, [string $languageTag = null]) -
    - -
    - object ResProperty - createProperty - ([string $uri = null]) -
    - -
    - object ResResource - createResource - ([string $uri = null]) -
    - -
    - object ResProperty - createSeq - ([string $uri = null]) -
    - -
    - object ResLiteral - createTypedLiteral - (string $value, string $dtype) -
    - -
    - boolean - equals - (object model &$that) -
    - -
    - array - find - (object ResResource $subject, object ResResource $predicate, object ResResource $object) -
    - -
    - object Statement - findFirstMatchingStatement - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
    - string - getBaseURI - () -
    - -
    - object Model - &getModel - () -
    - -
    - Array - getParsedNamespaces - () -
    - -
    - object Statement - getProperty - (object ResResource $subject, object ResResource $property) -
    - -
    - object MemModel - &intersect - ( &$model, object Model $model) -
    - -
    - boolean - isEmpty - () -
    - - - - - - - - - -
    - void - load - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
    - array - &rdqlQuery - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - object RdqlResultIterator - rdqlQueryAsIterator - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
    - boolean - remove - (object Statement $statement) -
    - -
    - void - removeNamespace - (String $nmsp) -
    - -
    - boolean - saveAs - (string $filename, [string $type = 'rdf']) -
    - -
    - void - setBaseURI - (string $uri) -
    - -
    - integer - size - () -
    - -
    - object MemModel - subtract - (object Model $model) -
    - -
    - object MemModel - &unite - ( &$model, object Model $model) -
    - -
    - void - writeAsHTMLTable - () -
    - -
    - string - writeRdfToString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResModel (line 44) -
    - - -

    Constructor You have to supply a memmodel/dbmodel/infmodel to save the statements.

    -
      -
    • access: public
    • -
    - -
    - ResModel - - ResModel - - ( &$model, object model $model) -
    - -
      -
    • - object model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - add (line 197) -
    - - -

    Adds a new triple to the Model without checking if the statement is already in the Model.

    -

    So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add()) Expects a statements with ResResources(ResLiterals)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - void - - add - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - addModel (line 508) -
    - - -

    Adds another model to this MemModel.

    -

    Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - void - - addModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - addNamespace (line 853) -
    - - -

    Adds a namespace and prefix to the model.

    - - -
    - void - - addNamespace - - ( $prefix,  $namespace, String $prefix,) -
    - -
      -
    • - String - $prefix,: String $nmsp
    • -
    • - - $prefix
    • -
    • - - $namespace
    • -
    - - -
    - -
    - -
    - addParsedNamespaces (line 841) -
    - - -

    Adds the namespaces to the model. This method is called by the parser. !!!! addParsedNamespaces() not overwrites manual added namespaces in the model !!!!

    - - -
    - void - - addParsedNamespaces - - (Array $newNs) -
    - -
      -
    • - Array - $newNs
    • -
    - - -
    - -
    - -
    - addWithoutDuplicates (line 216) -
    - - -

    Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.

    -

    addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise. Expects a statements with ResResources(ResLiterals)

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - addWithoutDuplicates - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - contains (line 234) -
    - - -

    Tests if the Model contains the given statement.

    -

    TRUE if the statement belongs to the model; FALSE otherwise. Expects a statement of ResResources(ResLiterals)

    -
      -
    • access: public
    • -
    - -
    - boolean - - contains - - ( &$statement, object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    • - - &$statement
    • -
    - - -
    - -
    - -
    - containsAll (line 251) -
    - - -

    Determine if all of the statements in a model are also contained in this model.

    -

    True if all of the statements in $model are also contained in this model and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAll - - (object Model &$model) -
    - -
      -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - containsAny (line 267) -
    - - -

    Determine if any of the statements in a model are also contained in this model.

    -

    True if any of the statements in $model are also contained in this model and false otherwise.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsAny - - (object Model &$model) -
    - -
      -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - containsResource (line 281) -
    - - -

    Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.

    -
      -
    • access: public
    • -
    - -
    - boolean - - containsResource - - (object Node &$node) -
    - -
      -
    • - object Node - &$node
    • -
    - - -
    - -
    - -
    - createAlt (line 527) -
    - - -

    Create a new RDF Container from type rdf:Alt This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createAlt - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createBag (line 547) -
    - - -

    Create a new RDF Container from type rdf:Bag This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createBag - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createList (line 587) -
    - - -

    Create a new RDF Collection from type rdf:List This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createList - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createLiteral (line 111) -
    - - -

    Create an untyped literal from a String value with a specified language.

    -

    If you want to type this literal, you have to set a datatype before adding it to the model.

    -
      -
    • access: public
    • -
    - -
    - object ResLiteral - - createLiteral - - (string $label, [string $languageTag = null]) -
    - -
      -
    • - string - $label
    • -
    • - string - $languageTag
    • -
    - - -
    - -
    - -
    - createProperty (line 91) -
    - - -

    Create a new Property associated with this model.

    -

    This method may return an existing property with the correct URI and model, or it may construct a fresh one, as it sees fit.

    Subsequent operations on the returned property may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createProperty - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createResource (line 69) -
    - - -

    Create a new resource associated with this model.

    -

    If the uri string isn't set, this creates a bnode. Otherwise it creates a URI node. A URI resource is .equals() to any other URI Resource with the same URI (even in a different model - be warned).

    This method may return an existing Resource with the correct URI and model, or it may construct a fresh one, as it sees fit.

    Operations on the result Resource may change this model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - createResource - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createSeq (line 567) -
    - - -

    Create a new RDF Container from type rdf:Seq This method may return an existing container with the correct URI and model, or it may construct a fresh one, as it sees fit.

    -

    Subsequent operations on the returned Container may modify this model.

    -
      -
    • access: public
    • -
    - -
    - object ResProperty - - createSeq - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - createTypedLiteral (line 300) -
    - - -

    Create a literal from a String value with the $dtype Datatype An existing literal of the right value may be returned, or a fresh one created.

    -
      -
    • access: public
    • -
    - -
    - object ResLiteral - - createTypedLiteral - - (string $value, string $dtype) -
    - -
      -
    • - string - $value
    • -
    • - string - $dtype
    • -
    - - -
    - -
    - -
    - equals (line 321) -
    - - -

    Checks if two models are equal.

    -

    Two models are equal if and only if the two RDF graphs they represent are isomorphic.

    Warning: This method doesn't work correct with models where the same blank node has different identifiers in the two models. We will correct this in a future version.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - boolean - - equals - - (object model &$that) -
    - -
      -
    • - object model - &$that
    • -
    - - -
    - -
    - -
    - find (line 133) -
    - - -

    General method to search for triples.

    -

    NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all Statements with $node as object. Returns an array of statements with ResResources.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - array - - find - - (object ResResource $subject, object ResResource $predicate, object ResResource $object) -
    - - - - -
    - -
    - -
    - findFirstMatchingStatement (line 168) -
    - - -

    Searches for triples and returns the first matching statement.

    -

    NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement with ResResources of the Model where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search.

    -
      -
    • access: public
    • -
    - -
    - object Statement - - findFirstMatchingStatement - - (object Node $subject, object Node $predicate, object Node $object, [integer $offset = 0]) -
    - -
      -
    • - object Node - $subject
    • -
    • - object Node - $predicate
    • -
    • - object Node - $object
    • -
    • - integer - $offset
    • -
    - - -
    - -
    - -
    - getBaseURI (line 644) -
    - - -

    Return current baseURI.

    -
      -
    • access: public
    • -
    - -
    - string - - getBaseURI - - () -
    - - - -
    - -
    - -
    - getModel (line 602) -
    - - -

    Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements

    -
      -
    • access: public
    • -
    - -
    - object Model - - &getModel - - () -
    - - - -
    - -
    - -
    - getParsedNamespaces (line 826) -
    - - -

    Returns the models namespaces.

    - - -
    - Array - - getParsedNamespaces - - () -
    - - - -
    - -
    - -
    - getProperty (line 353) -
    - - -

    Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model.

    -

    If none exist, return null; if several exist, pick one arbitrarily.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object Statement - - getProperty - - (object ResResource $subject, object ResResource $property) -
    - - - - -
    - -
    - -
    - intersect (line 685) -
    - - -

    Returns a new model containing all the statements which are in both this model and another.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &intersect - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - isEmpty (line 376) -
    - - -

    Checks if MemModel is empty

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - listObjects (line 388) -
    - - -

    Returns a ResIterator with all objects in a model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listObjects - - () -
    - - - -
    - -
    - -
    - listObjectsOfProperty (line 401) -
    - - -

    Returns a ResIterator with all objects with a given property and property value.

    -
      -
    • access: public
    • -
    - -
    - object ResIterator - - listObjectsOfProperty - - (object ResResource $property, [object ResResource $value = null]) -
    - - - - -
    - -
    - -
    - listSubjects (line 414) -
    - - -

    Returns a ResIterator with all subjects in a model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listSubjects - - () -
    - - - -
    - -
    - -
    - listSubjectsWithProperty (line 428) -
    - - -

    Returns a ResIterator with all subjects with a given property and property value.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object ResIterator - - listSubjectsWithProperty - - (object ResResource $property, [object ResResource $value = null]) -
    - - - - -
    - -
    - -
    - load (line 633) -
    - - -

    Load a model from a file containing RDF, N3 or N-Triples.

    -

    This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.

    -
      -
    • access: public
    • -
    - -
    - void - - load - - (string $filename, [string $type = NULL], [boolean $stream = false]) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    • - boolean - $stream
    • -
    - - -
    - -
    - -
    - rdqlQuery (line 795) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an associative array of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: [][?VARNAME] = object Node (if $returnNodes = TRUE) OR array [][?VARNAME] = string
    • -
    • access: public
    • -
    - -
    - array - - &rdqlQuery - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - rdqlQueryAsIterator (line 813) -
    - - -

    Perform an RDQL query on this MemModel.

    -

    This method returns an RdqlResultIterator of variable bindings. The values of the query variables can either be RAP's objects (instances of Node) if $returnNodes set to TRUE, or their string serialization.

    -
      -
    • return: = with values as object Node (if $returnNodes = TRUE) OR object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
    • -
    • access: public
    • -
    - -
    - object RdqlResultIterator - - rdqlQueryAsIterator - - (string $queryString, [boolean $returnNodes = TRUE]) -
    - -
      -
    • - string - $queryString
    • -
    • - boolean - $returnNodes
    • -
    - - -
    - -
    - -
    - remove (line 443) -
    - - -

    Removes the statement of ResResources(ResTriples) from the MemModel.

    -

    TRUE if the statement is removed. FALSE otherwise.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - remove - - (object Statement $statement) -
    - -
      -
    • - object Statement - $statement
    • -
    - - -
    - -
    - -
    - removeNamespace (line 864) -
    - - -

    removes a single namespace from the model

    - - -
    - void - - removeNamespace - - (String $nmsp) -
    - -
      -
    • - String - $nmsp
    • -
    - - -
    - -
    - -
    - saveAs (line 662) -
    - - -

    Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.

    -

    You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the MemModel couldn't be saved to the file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - boolean - - saveAs - - (string $filename, [string $type = 'rdf']) -
    - -
      -
    • - string - $filename
    • -
    • - string - $type
    • -
    - - -
    - -
    - -
    - setBaseURI (line 766) -
    - - -

    Set a base URI for the MemModel.

    -

    Affects creating of new resources and serialization syntax. If the URI doesn't end with # : or /, then a # is added to the URI.

    -
      -
    • access: public
    • -
    - -
    - void - - setBaseURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - size (line 457) -
    - - -

    Number of statements in the MemModel

    -
      -
    • access: public
    • -
    - -
    - integer - - size - - () -
    - - - -
    - -
    - -
    - subtract (line 336) -
    - - -

    Returns a new model that is the subtraction of another model from this model.

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - subtract - - (object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    - - -
    - -
    - -
    - unite (line 489) -
    - - -

    Returns a new Model that is the set-union of the model with another model.

    -

    Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.

    The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) is another graph, which we will call the merge of the graphs. Each of the original graphs is a subgraph of the merged graph. Notice that when forming a merged graph, two occurrences of a given uriref or literal as nodes in two different graphs become a single node in the union graph (since by definition they are the same uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course never merged. In particular, this means that every blank node in a merged graph can be identified as coming from one particular graph in the original set of graphs.

    Notice that one does not, in general, obtain the merge of a set of graphs by concatenating their corresponding N-triples documents and constructing the graph described by the merged document, since if some of the documents use the same node identifiers, the merged document will describe a graph in which some of the blank nodes have been 'accidentally' merged. To merge Ntriples documents it is necessary to check if the same nodeID is used in two or more documents, and to replace it with a distinct nodeID in each of them, before merging the documents. (Not implemented yet !!!!!!!!!!!)

    -
      -
    • throws: phpErrpr
    • -
    • access: public
    • -
    - -
    - object MemModel - - &unite - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - writeAsHTMLTable (line 672) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - void - - writeAsHTMLTable - - () -
    - - - -
    - -
    - -
    - writeRdfToString (line 777) -
    - - -

    Writes the RDF serialization of the MemModel as HTML table.

    -
      -
    • access: public
    • -
    - -
    - string - - writeRdfToString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:35 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResProperty.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResProperty.html deleted file mode 100755 index eab90be2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResProperty.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Docs For Class ResProperty - - - - -
    -

    Class ResProperty

    - - -
    -
    Description
    - -
    - -

    An RDF Property.

    - -

    - Located in /resModel/ResProperty.php (line 17) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResProperty
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResProperty - ResProperty - (string $uri) -
    -
    -
    -
    - - - -
    -
    Methods
    - - -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResResource.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResResource.html deleted file mode 100755 index de16f31c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResResource.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - Docs For Class ResResource - - - - -
    -

    Class ResResource

    - - -
    -
    Description
    - -
    - -

    An RDF Resource.

    -

    Resource instances, when created, are associated with a specific model. They support a range of methods, such as getProperty() and addProperty() which will access or modify that model. This enables the programmer to write code in a compact and easy style.

    - -

    - Located in /resModel/ResResource.php (line 22) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    - -
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    ClassDescription
    OntResource - Provides a common super-type for all of the abstractions in this ontology representation package. -
    ResContainer - An RDF Container. -
    ResList - Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure. -
    ResProperty - An RDF Property. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResResource - ResResource - (string $uri) -
    - -
    - object ResResource - addProperty - (ResResource $property, ResResource/ResLiteral $object) -
    - -
    - boolean - equals - (object resource $that) -
    - -
    - object Model - getAssociatedModel - () -
    - -
    - boolean - getIsAnon - () -
    - - - -
    - object ResResource - hasProperty - (ResResource $property, [ResResource $value = null]) -
    - -
    - ResIterator - listProperties - ([ResResource $property = null]) -
    - -
    - object ResResource - removeAll - ([object resource $property = null]) -
    - - - -
    - void - setAssociatedModel - ( &$model, object Model $model) -
    - -
    - void - setIsAnon - (boolean $isAnon) -
    - -
    - void - setURI - (string $uri) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResResource (line 46) -
    - - -

    Constructor You can supply a uri

    -
      -
    • access: public
    • -
    - -
    - ResResource - - ResResource - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addProperty (line 97) -
    - - -

    Add a property to this resource.

    -

    A statement with this resource as the subject, p as the predicate and o as the object is added to the model associated with this resource.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - addProperty - - (ResResource $property, ResResource/ResLiteral $object) -
    - -
      -
    • - ResResource - $property
    • -
    • - ResResource/ResLiteral - $object
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    - -
    - equals (line 175) -
    - - -

    Checks if the resource equals another resource.

    -

    Two resources are equal, if they have the same URI

    -
      -
    • access: public
    • -
    - -
    - boolean - - equals - - (object resource $that) -
    - -
      -
    • - object resource - $that
    • -
    - -
    -
    Redefinition of:
    -
    -
    Resource::equals()
    -
    Checks if the resource equals another resource.
    -
    - -
    - -
    - -
    - getAssociatedModel (line 71) -
    - - -

    Get the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - object Model - - getAssociatedModel - - () -
    - - - -
    - -
    - -
    - getIsAnon (line 151) -
    - - -

    Determine whether this resource is an anonymous resource

    -
      -
    • access: public
    • -
    - -
    - boolean - - getIsAnon - - () -
    - - - -
    - -
    - -
    - getProperty (line 125) -
    - - -

    Answer some statement (this, p, O) in the associated model.

    -

    If there are several such statements, any one of them may be returned. If no such statements exist, null is returned.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - getProperty - - (ResResource $property) -
    - - - - -
    - -
    - -
    - hasProperty (line 138) -
    - - -

    Determine whether this resource has any values for a given property.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - hasProperty - - (ResResource $property, [ResResource $value = null]) -
    - - - - -
    - -
    - -
    - listProperties (line 111) -
    - - -

    List all the values with the property p as statements in an array.

    -
      -
    • access: public
    • -
    - -
    - ResIterator - - listProperties - - ([ResResource $property = null]) -
    - - - - -
    - -
    - -
    - removeAll (line 191) -
    - - -

    Delete all the statements with predicate p for this resource from its associated model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - removeAll - - ([object resource $property = null]) -
    - -
      -
    • - object resource - $property
    • -
    - - -
    - -
    - -
    - removeProperties (line 206) -
    - - -

    Delete all the properties for this resource from the associated model.

    -
      -
    • access: public
    • -
    - -
    - object ResResource - - removeProperties - - () -
    - - - -
    - -
    - -
    - setAssociatedModel (line 58) -
    - - -

    Sets the reference to the assocoated model.

    -
      -
    • access: public
    • -
    - -
    - void - - setAssociatedModel - - ( &$model, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - setIsAnon (line 162) -
    - - -

    Set whether this resource is an anonymous resource

    -
      -
    • access: public
    • -
    - -
    - void - - setIsAnon - - (boolean $isAnon) -
    - -
      -
    • - boolean - $isAnon
    • -
    - - -
    - -
    - -
    - setURI (line 82) -
    - - -

    Sets the URI of this resource

    -
      -
    • access: public
    • -
    - -
    - void - - setURI - - (string $uri) -
    - -
      -
    • - string - $uri
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResSeq.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResSeq.html deleted file mode 100755 index e76d093b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/ResSeq.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - Docs For Class ResSeq - - - - -
    -

    Class ResSeq

    - - -
    -
    Description
    - -
    - -

    This interface defines methods for accessing RDF Sequence resources.

    -

    These methods operate on the RDF statements contained in a model.

    - -

    - Located in /resModel/ResSeq.php (line 16) -

    - - -
    Object
    -   |
    -   --Node
    -      |
    -      --Resource
    -         |
    -         --ResResource
    -            |
    -            --ResContainer
    -               |
    -               --ResSeq
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - ResSeq - ResSeq - ([string $uri = null]) -
    - -
    - boolean - addAtIndex - (integer $index,  $object, object ResResource/ResLiteral $resResource) -
    - -
    - object ResResource/ResLiteral - getMember - (integer $index) -
    - -
    - integer - indexOf - (object ResResource/ResLiteral $object) -
    - -
    - void - removeAtIndex - (integer $index) -
    - -
    - boolean - set - (integer $index,  $object) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor ResSeq (line 26) -
    - - -

    Constructor You can supply a URI

    -
      -
    • access: public
    • -
    - -
    - ResSeq - - ResSeq - - ([string $uri = null]) -
    - -
      -
    • - string - $uri
    • -
    - - -
    - -
    - -
    - addAtIndex (line 42) -
    - - -

    Insert a new member into the sequence at the specified position.

    -

    The existing member at that position, and all others with higher indexes, have their index increased by one.

    -
      -
    • access: public
    • -
    - -
    - boolean - - addAtIndex - - (integer $index,  $object, object ResResource/ResLiteral $resResource) -
    - -
      -
    • - integer - $index
    • -
    • - object ResResource/ResLiteral - $resResource
    • -
    • - - $object
    • -
    - - -
    - -
    - -
    - getMember (line 72) -
    - - -

    Get the member at a given index

    -
      -
    • access: public
    • -
    - -
    - object ResResource/ResLiteral - - getMember - - (integer $index) -
    - -
      -
    • - integer - $index
    • -
    - - -
    - -
    - -
    - indexOf (line 95) -
    - - -

    Return the index of a given member of the sequence.

    -

    If the same value appears more than once in the sequence, it is undefined which of the indexes will be returned. If the member is not found in this sequence, a value of 0 is returned.

    -
      -
    • access: public
    • -
    - -
    - integer - - indexOf - - (object ResResource/ResLiteral $object) -
    - -
      -
    • - object ResResource/ResLiteral - $object
    • -
    - - -
    - -
    - -
    - removeAtIndex (line 119) -
    - - -

    Remove the member at the specified index.

    -

    All other members with a higher index will have their index reduced by one.

    -
      -
    • access: public
    • -
    - -
    - void - - removeAtIndex - - (integer $index) -
    - -
      -
    • - integer - $index
    • -
    - - -
    - -
    - -
    - set (line 143) -
    - - -

    Set the value at a given index in the sequence.

    -

    If the index is not in the range of the sequence, false is returned

    -
      -
    • access: public
    • -
    - -
    - boolean - - set - - (integer $index,  $object) -
    - -
      -
    • - integer - $index
    • -
    • - - $object
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From ResContainer

    -
    - ResContainer::ResContainer()
    - ResContainer::add()
    - ResContainer::contains()
    - ResContainer::getMembers()
    - ResContainer::isAlt()
    - ResContainer::isBag()
    - ResContainer::isSeq()
    - ResContainer::remove()
    - ResContainer::size()
    -
    - -

    Inherited From ResResource

    -
    - ResResource::ResResource()
    - ResResource::addProperty()
    - ResResource::equals()
    - ResResource::getAssociatedModel()
    - ResResource::getIsAnon()
    - ResResource::getProperty()
    - ResResource::hasProperty()
    - ResResource::listProperties()
    - ResResource::removeAll()
    - ResResource::removeProperties()
    - ResResource::setAssociatedModel()
    - ResResource::setIsAnon()
    - ResResource::setURI()
    -
    - -

    Inherited From Resource

    -
    - Resource::Resource()
    - Resource::equals()
    - Resource::getLabel()
    - Resource::getLocalName()
    - Resource::getNamespace()
    - Resource::getURI()
    - Resource::toString()
    -
    - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResAlt.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResAlt.php.html deleted file mode 100755 index a4476d4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResAlt.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResAlt.php - - - - -
    -

    /resModel/ResAlt.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResAlt - - This interface defines methods for accessing RDF Alternative resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResBag.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResBag.php.html deleted file mode 100755 index 26b32789..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResBag.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResBag.php - - - - -
    -

    /resModel/ResBag.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResBag - - This interface defines methods for accessing RDF Bag resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:21 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResContainer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResContainer.php.html deleted file mode 100755 index 9d0b822e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResContainer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResContainer.php - - - - -
    -

    /resModel/ResContainer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResContainer - - An RDF Container. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResIterator.php.html deleted file mode 100755 index c0c7954b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResIterator.php.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Docs for page ResIterator.php - - - - -
    -

    /resModel/ResIterator.php

    - - -
    -
    Description
    - -
    - -

    ---------------------------------------------------------------------------------- Class: ResIterator ----------------------------------------------------------------------------------

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResIterator - - Implementation of a resource iterator. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResList.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResList.php.html deleted file mode 100755 index d79a7dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResList.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResList.php - - - - -
    -

    /resModel/ResList.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResList - - Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResLiteral.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResLiteral.php.html deleted file mode 100755 index bdf236e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResLiteral.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResLiteral.php - - - - -
    -

    /resModel/ResLiteral.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResLiteral - - An RDF literal. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResModel.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResModel.php.html deleted file mode 100755 index 108065d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResModel.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResModel.php - - - - -
    -

    /resModel/ResModel.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResModel - - A ResModel provides an resource centric view on an underlying RDF model. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResProperty.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResProperty.php.html deleted file mode 100755 index 99d8b209..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResProperty.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResProperty.php - - - - -
    -

    /resModel/ResProperty.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResProperty - - An RDF Property. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResResource.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResResource.php.html deleted file mode 100755 index 49fd1826..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResResource.php.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Docs for page ResResource.php - - - - -
    -

    /resModel/ResResource.php

    - - -
    -
    Description
    - -
    - -

    ----------------------------------------------------------------------------------

    -

    Class: ResResource ----------------------------------------------------------------------------------

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResResource - - An RDF Resource. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResSeq.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResSeq.php.html deleted file mode 100755 index 18f29a83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/resModel/_resModel---ResSeq.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResSeq.php - - - - -
    -

    /resModel/ResSeq.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ResSeq - - This interface defines methods for accessing RDF Sequence resources. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/all-wcprops deleted file mode 100755 index 736ae9d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/all-wcprops +++ /dev/null @@ -1,377 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql -END -SparqlEngine_ResultRenderer.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_ResultRenderer.html -END -_sparql---SparqlEngineDb.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb.php.html -END -SparqlEngine_ResultConverter.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_ResultConverter.html -END -_sparql---GraphPattern.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---GraphPattern.php.html -END -SparqlEngineDb_SqlMerger.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_SqlMerger.html -END -SparqlEngineDb_Offsetter.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_Offsetter.html -END -_sparql---SparqlClient.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlClient.php.html -END -_sparql---SparqlEngine---ResultRenderer---Default.php.html -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---Default.php.html -END -SparqlEngine_ResultRenderer_Default.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_Default.html -END -_sparql---ClientQuery.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---ClientQuery.php.html -END -Constraint.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/Constraint.html -END -QueryTriple.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/QueryTriple.html -END -_sparql---SparqlEngineDb---TypeSorter.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---TypeSorter.php.html -END -_sparql---SparqlEngine---PreparedStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---PreparedStatement.php.html -END -SparqlEngine.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine.html -END -_sparql---SparqlEngine---ResultRenderer---XML.php.html -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---XML.php.html -END -SparqlEngine_ResultRenderer_XML.html -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_XML.html -END -SparqlEngineDb_TypeSorter.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_TypeSorter.html -END -_sparql---SparqlEngine---ResultRenderer---HTML.php.html -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---HTML.php.html -END -_sparql---Constraint.php.html -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---Constraint.php.html -END -SparqlEngineDb_SqlGeneratorException.html -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_SqlGeneratorException.html -END -ClientQuery.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/ClientQuery.html -END -_sparql---SparqlEngine---ResultConverter.php.html -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultConverter.php.html -END -SparqlEngineDb_PreparedStatement.html -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_PreparedStatement.html -END -_sparql---SparqlEngineDb---SqlMerger.php.html -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlMerger.php.html -END -_sparql---SparqlEngineDb---Offsetter.php.html -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Offsetter.php.html -END -SparqlEngineDb_FilterGenerator_Value.html -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator_Value.html -END -_sparql---SparqlEngine.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine.php.html -END -SparqlEngineDb_ResultRenderer_HTML.html -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_HTML.html -END -_sparql---SparqlEngineDb---ResultRenderer.php.html -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer.php.html -END -SparqlEngineDb_FilterGenerator.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator.html -END -_sparql---SparqlEngineDb---SqlGenerator.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGenerator.php.html -END -_sparql---SparqlParserException.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlParserException.php.html -END -SparqlResultParser.html -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlResultParser.html -END -SparqlParser.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlParser.html -END -_syntax---SparqlResultParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_syntax---SparqlResultParser.php.html -END -SparqlEngineDb_ResultRenderer.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer.html -END -SparqlEngineDb_SqlGenerator.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_SqlGenerator.html -END -SparqlEngineDb_ResultConverter.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_ResultConverter.html -END -_sparql---Query.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---Query.php.html -END -_sparql---SparqlEngineDb---Preparator.php.html -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Preparator.php.html -END -_sparql---SparqlEngineDb---ResultRenderer---Default.php.html -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html -END -SparqlEngineDb_ResultRenderer_Default.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_Default.html -END -_sparql---SparqlEngineDb---SqlGeneratorException.php.html -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGeneratorException.php.html -END -_sparql---SparqlEngineDb---PreparedStatement.php.html -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---PreparedStatement.php.html -END -SparqlEngineDb_Preparator.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_Preparator.html -END -_sparql---FilterFunctions.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---FilterFunctions.php.html -END -SparqlParserException.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlParserException.html -END -SparqlEngineDb.html -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb.html -END -_sparql---SparqlParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlParser.php.html -END -SparqlEngine_PreparedStatement.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_PreparedStatement.html -END -GraphPattern.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/GraphPattern.html -END -SparqlEngine_ResultRenderer_HTML.html -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_HTML.html -END -SparqlClient.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlClient.html -END -_sparql---SparqlEngineDb---FilterGenerator.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---FilterGenerator.php.html -END -_sparql---SparqlEngineDb---ResultRenderer---XML.php.html -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html -END -SparqlEngineDb_ResultRenderer_XML.html -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_XML.html -END -_sparql---QueryTriple.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---QueryTriple.php.html -END -_sparql---SparqlEngine---ResultRenderer.php.html -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer.php.html -END -Query.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/Query.html -END -_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html -END -_sparql---SparqlEngineDb---ResultConverter.php.html -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultConverter.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/entries deleted file mode 100755 index bf6b74f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/entries +++ /dev/null @@ -1,834 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/sparql -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -SparqlEngine_ResultRenderer.html -file - - - - -2008-02-29T14:57:43.179350Z -c303010f006eaa6722d34d3a969947da -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb.php.html -file - - - - -2008-02-29T14:57:43.179350Z -a732069f2b497787125345651817e530 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine_ResultConverter.html -file - - - - -2008-02-29T14:57:43.194971Z -5144d7d11306ac368fce8ba55593f513 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---GraphPattern.php.html -file - - - - -2008-02-29T14:57:43.210591Z -00685b73376406a5956bca7b8dd76700 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_SqlMerger.html -file - - - - -2008-02-29T14:57:43.210591Z -edec35bf0c01d5d0ce913c086166883c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_Offsetter.html -file - - - - -2008-02-29T14:57:43.226212Z -c5cfb98182b8345c3c6b2a54f756cc5d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlClient.php.html -file - - - - -2008-02-29T14:57:43.226212Z -4f9de8892bc6215d3c7fa90d5a1caad5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---ResultRenderer---Default.php.html -file - - - - -2008-02-29T14:57:43.241833Z -0502be8d70341781dc2202d91a4324da -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine_ResultRenderer_Default.html -file - - - - -2008-02-29T14:57:43.241833Z -a7a1e9f6bacbdba3cb72a07735f4788b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---ClientQuery.php.html -file - - - - -2008-02-29T14:57:43.257453Z -0abe5739154ccc700d63d17f8ba13541 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Constraint.html -file - - - - -2008-02-29T14:57:43.257453Z -2c6352cc3427693a3630c146e87d7f7c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -QueryTriple.html -file - - - - -2008-02-29T14:57:43.273074Z -4a6d53627e94e8fb5b39d39bc5d98004 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---TypeSorter.php.html -file - - - - -2008-02-29T14:57:43.273074Z -c964c503b3bb2c52c794ee569ea1be9f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---PreparedStatement.php.html -file - - - - -2008-02-29T14:57:43.288694Z -810cd40e37337a982c9ae50361856787 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine.html -file - - - - -2008-02-29T14:57:43.288694Z -503b401c9d3370c676b5b4f100e9767a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---ResultRenderer---XML.php.html -file - - - - -2008-02-29T14:57:43.304315Z -74b973655495a25a73bc3af4b066f8e0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine_ResultRenderer_XML.html -file - - - - -2008-02-29T14:57:43.319936Z -a9f8e088edd2b25378a4706e1296ea51 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_TypeSorter.html -file - - - - -2008-02-29T14:57:43.444900Z -fb8ddedbfa18376c18f30eb493cfa738 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---ResultRenderer---HTML.php.html -file - - - - -2008-02-29T14:57:43.444900Z -29642cf390de45de2acbd872a9f2e323 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---Constraint.php.html -file - - - - -2008-02-29T14:57:43.476142Z -bc59ddfaff11580d0f5a2aba175c923c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_SqlGeneratorException.html -file - - - - -2008-02-29T14:57:43.460521Z -c829a958b7f12c3b6a894d6e06bf0afb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ClientQuery.html -file - - - - -2008-02-29T14:57:43.476142Z -f25a2aec88a5413f85ab6e4f816588ca -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---ResultConverter.php.html -file - - - - -2008-02-29T14:57:43.491762Z -40f6176254cd3fbe2ae6dfa27846d7be -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_PreparedStatement.html -file - - - - -2008-02-29T14:57:43.491762Z -0148e85a370af63db08fda384871ee39 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---SqlMerger.php.html -file - - - - -2008-02-29T14:57:43.523003Z -3fc9d4998b181305578166eb59e244d9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---Offsetter.php.html -file - - - - -2008-02-29T14:57:43.523003Z -47d21f3a11f1d6cfa813d72616360de9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_FilterGenerator_Value.html -file - - - - -2008-02-29T14:57:43.507383Z -98cca626c5937c6bc5fb89e42a8dd4a2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine.php.html -file - - - - -2008-02-29T14:57:43.538624Z -c0a5fa396a0aba0144cb09514cb74e62 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_ResultRenderer_HTML.html -file - - - - -2008-02-29T14:57:43.538624Z -587835c3bfe029c7de5a363519675313 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---ResultRenderer.php.html -file - - - - -2008-02-29T14:57:43.554245Z -b6f8d1fd379d79988a10d33eb5cf22e5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_FilterGenerator.html -file - - - - -2008-02-29T14:57:43.554245Z -7ef459e3512c9ece22dee65e9d329114 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---SqlGenerator.php.html -file - - - - -2008-02-29T14:57:43.569865Z -524f300497f5acaca87ae20e349b633d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlParserException.php.html -file - - - - -2008-02-29T14:57:43.585486Z -95c15caa023fa850b07bbae02bdec59b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlResultParser.html -file - - - - -2008-02-29T14:57:43.585486Z -8166bcb546ab480e2d4b652bbe912ebd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlParser.html -file - - - - -2008-02-29T14:57:43.601106Z -5d1366cf9cd683f22d072b8b914a54e2 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---SparqlResultParser.php.html -file - - - - -2008-02-29T14:57:43.601106Z -d49a8d95fd41e9164d0e7d129d0224dc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_ResultRenderer.html -file - - - - -2008-02-29T14:57:43.616727Z -7d8fef478bc93b4eae1abb7d0d3aebc7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_SqlGenerator.html -file - - - - -2008-02-29T14:57:43.632348Z -e9af91995804a36ccd8b3cba6092c4ec -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_ResultConverter.html -file - - - - -2008-02-29T14:57:43.632348Z -74bd1294954af2ce23edd1b188075184 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---Query.php.html -file - - - - -2008-02-29T14:57:43.647968Z -a4d26ca9f65ad1d95e1adbcfc6c03bc4 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---Preparator.php.html -file - - - - -2008-02-29T14:57:43.647968Z -0efd1ba4c4be0be0efefb5919a1bd6dc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---ResultRenderer---Default.php.html -file - - - - -2008-02-29T14:57:43.663589Z -3d3e926367744af295007cfe750a1493 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_ResultRenderer_Default.html -file - - - - -2008-02-29T14:57:43.663589Z -d1aeaad36894f2c98d8eaab9465e0ac6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---SqlGeneratorException.php.html -file - - - - -2008-02-29T14:57:43.679209Z -d7f250698c13f27d7acaf3b9520b9270 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---PreparedStatement.php.html -file - - - - -2008-02-29T14:57:43.679209Z -7a4bcd7f0afc8f5040a45bb3b41f497e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_Preparator.html -file - - - - -2008-02-29T14:57:43.694830Z -9cdf14fc1bed13b4ebe0b3539076a528 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---FilterFunctions.php.html -file - - - - -2008-02-29T14:57:43.710451Z -75bd913c7f2ee4e02bf3d361f26be03f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlParserException.html -file - - - - -2008-02-29T14:57:43.710451Z -2fa418ed063497c9ce9a24dae0527605 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb.html -file - - - - -2008-02-29T14:57:43.726071Z -62f865b3919ee990b0ed1754b0da5ff0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlParser.php.html -file - - - - -2008-02-29T14:57:43.726071Z -0ef07838a0228c79a6412de48f657290 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine_PreparedStatement.html -file - - - - -2008-02-29T14:57:43.741692Z -4f119511c9aa7509dde8d1bd17c4e303 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -GraphPattern.html -file - - - - -2008-02-29T14:57:43.757312Z -30f8dab0da3b2bc8dfa44876789e9fbd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngine_ResultRenderer_HTML.html -file - - - - -2008-02-29T14:57:43.757312Z -6516c9fa6dd46996eb5f7404ac013f5b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlClient.html -file - - - - -2008-02-29T14:57:43.772933Z -39b1817ff881c12ac40654fa0d2f0d54 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---FilterGenerator.php.html -file - - - - -2008-02-29T14:57:43.772933Z -977c74b3404b64151a25efb3542578de -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---ResultRenderer---XML.php.html -file - - - - -2008-02-29T14:57:43.788554Z -32bddcadf423d5cffd3a3d8c8b809350 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -SparqlEngineDb_ResultRenderer_XML.html -file - - - - -2008-02-29T14:57:43.788554Z -0e5bc1a520fa2f54e97f976c05bce58d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---QueryTriple.php.html -file - - - - -2008-02-29T14:57:43.804174Z -1aba3b03558db1dd5ffa4f53627420a7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngine---ResultRenderer.php.html -file - - - - -2008-02-29T14:57:43.819795Z -958477a35ebea32d92b239fb9beef5f9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Query.html -file - - - - -2008-02-29T14:57:43.819795Z -c0282f4b842adabcf5bebb2ec5de90e0 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html -file - - - - -2008-02-29T14:57:43.835415Z -76e63ddb2e8eec7d8605349be10439c9 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_sparql---SparqlEngineDb---ResultConverter.php.html -file - - - - -2008-02-29T14:57:43.851036Z -b08a56ddfbb8ba5f1301347fa12ff784 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/ClientQuery.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/ClientQuery.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/ClientQuery.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Constraint.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Constraint.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Constraint.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/GraphPattern.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/GraphPattern.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/GraphPattern.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Query.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Query.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/Query.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/QueryTriple.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/QueryTriple.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/QueryTriple.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlClient.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlClient.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlClient.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Offsetter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Offsetter.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Offsetter.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Preparator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Preparator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_Preparator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_PreparedStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_PreparedStatement.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_PreparedStatement.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultConverter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultConverter.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultConverter.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGenerator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGenerator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGenerator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGeneratorException.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGeneratorException.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlGeneratorException.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlMerger.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlMerger.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_SqlMerger.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_TypeSorter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_TypeSorter.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngineDb_TypeSorter.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_PreparedStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_PreparedStatement.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_PreparedStatement.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultConverter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultConverter.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultConverter.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_Default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_Default.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_Default.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_HTML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_HTML.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_HTML.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_XML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_XML.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlEngine_ResultRenderer_XML.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParserException.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParserException.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlParserException.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlResultParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlResultParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/SparqlResultParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---ClientQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---ClientQuery.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---ClientQuery.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Constraint.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Constraint.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Constraint.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---FilterFunctions.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---FilterFunctions.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---FilterFunctions.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---GraphPattern.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---GraphPattern.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---GraphPattern.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Query.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Query.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---Query.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---QueryTriple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---QueryTriple.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---QueryTriple.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlClient.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlClient.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlClient.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngine.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlEngineDb.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParserException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParserException.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_sparql---SparqlParserException.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_syntax---SparqlResultParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_syntax---SparqlResultParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/prop-base/_syntax---SparqlResultParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/ClientQuery.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/ClientQuery.html.svn-base deleted file mode 100755 index 118119ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/ClientQuery.html.svn-base +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - Docs For Class ClientQuery - - - - -
    -

    Class ClientQuery

    - - -
    -
    Description
    - -
    - -

    ClientQuery Object to run a SPARQL Query against a SPARQL server.

    - -

    - Located in /sparql/ClientQuery.php (line 16) -

    - - -
    Object
    -   |
    -   --ClientQuery
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $default -
    -
    - mixed - $named -
    -
    - mixed - $prefixes -
    -
    - mixed - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - addDefaultGraph - (String $default) -
    - -
    - void - addNamedGraph - ( $named, String $default) -
    - -
    - void - query - (String $query) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $default - = array() (line 18) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $named - = array() (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $prefixes - = array() (line 20) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $query - (line 21) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - addDefaultGraph (line 28) -
    - - -

    Adds a default graph to the query object.

    - -
    - void - - addDefaultGraph - - (String $default) -
    - -
      -
    • - String - $default: default graph name
    • -
    - - -
    - -
    - -
    - addNamedGraph (line 37) -
    - - -

    Adds a named graph to the query object.

    - -
    - void - - addNamedGraph - - ( $named, String $default) -
    - -
      -
    • - String - $default: named graph name
    • -
    • - - $named
    • -
    - - -
    - -
    - -
    - query (line 46) -
    - - -

    Adds the SPARQL query string to the query object.

    - -
    - void - - query - - (String $query) -
    - -
      -
    • - String - $query: the query string
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Constraint.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Constraint.html.svn-base deleted file mode 100755 index 89f00e11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Constraint.html.svn-base +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - Docs For Class Constraint - - - - -
    -

    Class Constraint

    - - -
    -
    Description
    - -
    - -

    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.

    - -

    - Located in /sparql/Constraint.php (line 17) -

    - - -
    Object
    -   |
    -   --Constraint
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - string - $expression -
    -
    - boolean - $outer -
    -
    - array - $tree -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - addExpression - (String $exp) -
    - -
    - String - getExpression - () -
    - -
    - void - getTree - () -
    - -
    - boolean - isOuterFilter - () -
    - -
    - void - setOuterFilter - (boolean $boolean) -
    - -
    - void - setTree - ( $tree) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - string - $expression - (line 23) - -
    - - -

    The expression string.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $outer - (line 29) - -
    - - -

    True if it is an outer filter, false if not.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $tree - = null (line 35) - -
    - - -

    The expression tree

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - addExpression (line 43) -
    - - -

    Adds an expression string.

    -
      -
    • access: public
    • -
    - -
    - void - - addExpression - - (String $exp) -
    - -
      -
    • - String - $exp: the expression String
    • -
    - - -
    - -
    - -
    - getExpression (line 53) -
    - - -

    Returns the expression string.

    -
      -
    • return: the expression String
    • -
    • access: public
    • -
    - -
    - String - - getExpression - - () -
    - - - -
    - -
    - -
    - getTree (line 82) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getTree - - () -
    - - - -
    - -
    - -
    - isOuterFilter (line 76) -
    - - -

    Returns true if this constraint is an outer filter- false if not.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isOuterFilter - - () -
    - - - -
    - -
    - -
    - setOuterFilter (line 66) -
    - - -

    Sets the filter type to outer or inner filter.

    -

    True for outer false for inner.

    -
      -
    • access: public
    • -
    - -
    - void - - setOuterFilter - - (boolean $boolean) -
    - -
      -
    • - boolean - $boolean
    • -
    - - -
    - -
    - -
    - setTree (line 87) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - setTree - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/GraphPattern.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/GraphPattern.html.svn-base deleted file mode 100755 index 541ef062..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/GraphPattern.html.svn-base +++ /dev/null @@ -1,784 +0,0 @@ - - - - - - Docs For Class GraphPattern - - - - -
    -

    Class GraphPattern

    - - -
    -
    Description
    - -
    - -

    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.

    - -

    - Located in /sparql/GraphPattern.php (line 16) -

    - - -
    Object
    -   |
    -   --GraphPattern
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $constraint -
    -
    - mixed - $graphname -
    -
    - boolean - $isConstructPattern -
    -
    - boolean - $open -
    -
    - int - $optional -
    -
    - int - $patternId -
    -
    - array - $triplePattern -
    -
    - int - $union -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - GraphPattern - GraphPattern - () -
    - -
    - void - addConstraint - ( &$cons, Constraint $cons) -
    - -
    - void - addOptional - (integer $pattern) -
    - -
    - void - addTriplePattern - (array $trpP) -
    - -
    - void - addUnion - (integer $pattern) -
    - - - -
    - String - getGraphname - () -
    - -
    - integer - getId - () -
    - -
    - integer - getOptional - () -
    - -
    - Array - getTriplePattern - () -
    - -
    - integer - getUnion - () -
    - -
    - array - getVariables - () -
    - -
    - void - setGraphname - (String $name) -
    - -
    - void - setId - (integer $id) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $constraint - = array() (line 31) - -
    - - -
      -
    • var: A List of Constraints.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $graphname - (line 21) - -
    - - -

    Graphname. 0 if its in the default graph.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $isConstructPattern - (line 51) - -
    - - -
      -
    • var: TRUE if the GraphPattern is a construct pattern.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - boolean - $open - (line 46) - -
    - - -
      -
    • var: TRUE if the pattern is open- FALSE if closed.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - int - $optional - (line 36) - -
    - - -
      -
    • var: Pointer to optional patterns.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $patternId - (line 57) - -
    - - -
      -
    • var: The GraphPatterns id.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $triplePattern - (line 26) - -
    - - -
      -
    • var: The TriplePattern.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $union - (line 41) - -
    - - -
      -
    • var: Pointer to union patterns.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor GraphPattern (line 63) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - GraphPattern - - () -
    - - - -
    - -
    - -
    - addConstraint (line 140) -
    - - -

    Adds a Constraint to the GraphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addConstraint - - ( &$cons, Constraint $cons) -
    - - - - -
    - -
    - -
    - addOptional (line 149) -
    - - -

    Adds a pointer to an optional graphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addOptional - - (integer $pattern) -
    - -
      -
    • - integer - $pattern
    • -
    - - -
    - -
    - -
    - addTriplePattern (line 130) -
    - - -

    Adds a List of QueryTriples to the GraphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addTriplePattern - - (array $trpP) -
    - -
      -
    • - array - $trpP
    • -
    - - -
    - -
    - -
    - addUnion (line 159) -
    - - -

    Adds a pointer to a union graphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addUnion - - (integer $pattern) -
    - -
      -
    • - integer - $pattern
    • -
    - - -
    - -
    - -
    - getConstraint (line 93) -
    - - -

    Returns a constraint if there is one false if not.

    -
      -
    • access: public
    • -
    - -
    - Constraint - - getConstraint - - () -
    - - - -
    - -
    - -
    - getGraphname (line 75) -
    - - -

    Returns the graphname.

    -
      -
    • access: public
    • -
    - -
    - String - - getGraphname - - () -
    - - - -
    - -
    - -
    - getId (line 179) -
    - - -

    Returns the GraphPatterns id.

    -
      -
    • access: public
    • -
    - -
    - integer - - getId - - () -
    - - - -
    - -
    - -
    - getOptional (line 102) -
    - - -

    Returns a pointer to an optional graph pattern.

    -
      -
    • access: public
    • -
    - -
    - integer - - getOptional - - () -
    - - - -
    - -
    - -
    - getTriplePattern (line 84) -
    - - -

    Returns the triple pattern of the graph pattern.

    -
      -
    • access: public
    • -
    - -
    - Array - - getTriplePattern - - () -
    - - - -
    - -
    - -
    - getUnion (line 111) -
    - - -

    Returns a pointer to a union graph pattern.

    -
      -
    • access: public
    • -
    - -
    - integer - - getUnion - - () -
    - - - -
    - -
    - -
    - getVariables (line 192) -
    - - -

    Returns an array of all variables used in this graph pattern.

    -

    All variables are listed only once (unique).

    -
      -
    • return: Array of variable names
    • -
    • access: public
    • -
    - -
    - array - - getVariables - - () -
    - - - -
    - -
    - -
    - setGraphname (line 121) -
    - - -

    Sets the graphname.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphname - - (String $name) -
    - -
      -
    • - String - $name
    • -
    - - -
    - -
    - -
    - setId (line 170) -
    - - -

    Sets the GraphPatterns Id.

    -
      -
    • access: public
    • -
    - -
    - void - - setId - - (integer $id) -
    - -
      -
    • - integer - $id
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Query.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Query.html.svn-base deleted file mode 100755 index c27d5590..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/Query.html.svn-base +++ /dev/null @@ -1,1446 +0,0 @@ - - - - - - Docs For Class Query - - - - -
    -

    Class Query

    - - -
    -
    Description
    - -
    - -

    The Class Query represents a SPARQL query.

    - -

    - Located in /sparql/Query.php (line 13) -

    - - -
    Object
    -   |
    -   --Query
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - string - $base -
    -
    - int - $bnodeCounter -
    -
    - mixed - $constructPattern -
    -
    - array - $fromNamedPart -
    -
    - array - $fromPart -
    - -
    - boolean - $isEmpty -
    -
    - array - $prefixes -
    -
    - string - $resultForm -
    -
    - array - $resultPart -
    -
    - array - $resultVars -
    -
    - array - $solutionModifier -
    -
    - array - $usedVars -
    -
    - array - $varDatatypes -
    -
    - array - $varLanguages -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - getLanguageTag - (string $var) -
    - -
    - Query - Query - () -
    - -
    - void - addConstructGraphPattern - (GraphPattern $pattern) -
    - -
    - void - addFrom - (String $graphURI) -
    - -
    - void - addFromNamed - (String $graphURI) -
    - -
    - void - addGraphPattern - (GraphPattern $pattern) -
    - -
    - void - addPrefix - (String $prefix, String $label) -
    - -
    - void - addVar - (String $var) -
    - -
    - void - addVariable - (String $var) -
    - -
    - Array - getAllVars - () -
    - -
    - String - getBase - () -
    - -
    - String - getBlanknodeLabel - () -
    - - - -
    - array - getConstructPatternVariables - () -
    - -
    - mixed - getDatatype - (string $var) -
    - -
    - Array - getFromNamedPart - () -
    - -
    - String - getFromPart - () -
    - -
    - string - getFullUri - (string $token) -
    - -
    - GraphPattern - getNewPattern - ([boolean $constr = false]) -
    - -
    - Array - getPrefixes - () -
    - -
    - string - getResultForm - () -
    - -
    - Array - getResultPart - () -
    - -
    - Array - getResultVars - () -
    - -
    - Array - getSolutionModifier - () -
    - -
    - boolean - isEmpty - () -
    - -
    - void - setBase - (String $base) -
    - -
    - void - setResultForm - (String $form) -
    - -
    - void - setSolutionModifier - (String $name, Value $value) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - string - $base - (line 19) - -
    - - -

    The BASE part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $bnodeCounter - (line 100) - -
    - - -

    Blanknode counter.

    -

    How many blank nodes are in $resultPart

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $constructPattern - (line 123) - -
    - - -

    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $fromNamedPart - = array() (line 77) - -
    - - -

    Contains the FROM NAMED part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $fromPart - = array() (line 71) - -
    - - -

    Contains the FROM part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $graphPatternCounter - (line 108) - -
    - - -

    GraphPattern counter.

    -

    How many GraphPattern are in $resultPart

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - boolean - $isEmpty - (line 130) - -
    - - -

    TRUE if the query is empty FALSE if not.

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $prefixes - = array() (line 33) - -
    - - -

    Array that contains used prefixes and namespaces.

    -

    Key is the prefix, value the namespace.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - string - $resultForm - (line 57) - -
    - - -

    What form/type of result should be returned.

    -

    One of:

    • "ask"
    • "count"
    • "construct"
    • "describe"
    • "select"
    • "select distinct"

    -
      -
    • see: QueryForms
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $resultPart - (line 65) - -
    - - -

    Contains the result part of the SPARQL query.

    -

    Array of GraphPattern

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $resultVars - = array() (line 41) - -
    - - -

    Array of result variables that shall be returned.

    -

    E.g. "?name", "?mbox"

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $solutionModifier - = array() (line 92) - -
    - - -

    Optional solution modifier of the query.

    -

    Array with three keys: "order by", "limit", "offset" If they are not set, their value is null

    "order by" can be an array with subarrays, each of those subarrays having two keys: "val" and "type". "val" determines the variable ("?mbox"), "type" is "asc" or "desc"

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $usedVars - (line 117) - -
    - - -

    List of all vars used in the query.

    -

    Key is the variable (e.g. "?x"), value is boolean true

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $varDatatypes - = array() (line 146) - -
    - - -

    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.

    -

    $varname => $datatype

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $varLanguages - = array() (line 138) - -
    - - -

    Language of variables. NULL if the variable has no language tag (e.g. @en) set.

    -

    $varname => $language tag

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getLanguageTag (line 439) -
    - - -

    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.

    -
      -
    • return: NULL or language tag
    • -
    • access: public
    • -
    - -
    - static mixed - - getLanguageTag - - (string $var) -
    - -
      -
    • - string - $var: Sparql variable name
    • -
    - - -
    - -
    - -
    - Constructor Query (line 153) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - Query - - Query - - () -
    - - - -
    - -
    - -
    - addConstructGraphPattern (line 310) -
    - - -

    Adds a construct graph pattern to the query.

    -
      -
    • access: public
    • -
    - -
    - void - - addConstructGraphPattern - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - addFrom (line 321) -
    - - -

    Adds a graphuri to the from part.

    -
      -
    • access: public
    • -
    - -
    - void - - addFrom - - (String $graphURI) -
    - -
      -
    • - String - $graphURI
    • -
    - - -
    - -
    - -
    - addFromNamed (line 331) -
    - - -

    Adds a graphuri to the from named part.

    -
      -
    • access: public
    • -
    - -
    - void - - addFromNamed - - (String $graphURI) -
    - -
      -
    • - String - $graphURI
    • -
    - - -
    - -
    - -
    - addGraphPattern (line 298) -
    - - -

    Adds a graph pattern to the result part.

    -
      -
    • access: public
    • -
    - -
    - void - - addGraphPattern - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - addPrefix (line 265) -
    - - -

    Adds a prefix to the list of prefixes.

    -
      -
    • access: public
    • -
    - -
    - void - - addPrefix - - (String $prefix, String $label) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $label
    • -
    - - -
    - -
    - -
    - addVar (line 370) -
    - - -

    Adds a new variable to the variable list.

    -
      -
    • access: public
    • -
    - -
    - void - - addVar - - (String $var) -
    - -
      -
    • - String - $var
    • -
    - - -
    - -
    - -
    - addVariable (line 275) -
    - - -

    Adds a variable to the list of result variables.

    -
      -
    • access: public
    • -
    - -
    - void - - addVariable - - (String $var) -
    - -
      -
    • - String - $var
    • -
    - - -
    - -
    - -
    - getAllVars (line 379) -
    - - -

    Returns a list with all used variables.

    -
      -
    • access: public
    • -
    - -
    - Array - - getAllVars - - () -
    - - - -
    - -
    - -
    - getBase (line 168) -
    - - -

    Returns the BASE part of the query.

    -
      -
    • access: public
    • -
    - -
    - String - - getBase - - () -
    - - - -
    - -
    - -
    - getBlanknodeLabel (line 242) -
    - - -

    Returns an unused Bnode label.

    -
      -
    • access: public
    • -
    - -
    - String - - getBlanknodeLabel - - () -
    - - - -
    - -
    - -
    - getConstructPattern (line 402) -
    - - -

    Returns the construvtGraphPattern of the query if there is one.

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - getConstructPattern - - () -
    - - - -
    - -
    - -
    - getConstructPatternVariables (line 413) -
    - - -

    Returns a list of variables used in the construct patterns.

    -
      -
    • return: Array of variable names, unique.
    • -
    • access: public
    • -
    - -
    - array - - getConstructPatternVariables - - () -
    - - - -
    - -
    - -
    - getDatatype (line 463) -
    - - -

    Returns the datatype of a variable if it is set.

    -
      -
    • return: NULL or datatype
    • -
    • access: public
    • -
    - -
    - mixed - - getDatatype - - (string $var) -
    - -
      -
    • - string - $var: Sparql variable name
    • -
    - - -
    - -
    - -
    - getFromNamedPart (line 225) -
    - - -

    Returns the FROM NAMED clause of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getFromNamedPart - - () -
    - - - -
    - -
    - -
    - getFromPart (line 216) -
    - - -

    Returns the FROM clause of the query.

    -
      -
    • access: public
    • -
    - -
    - String - - getFromPart - - () -
    - - - -
    - -
    - -
    - getFullUri (line 496) -
    - - -

    Gets the full URI of a qname token.

    -
      -
    • return: The complete URI of a given token, false if $token is not a qname or the prefix is not defined
    • -
    • access: public
    • -
    - -
    - string - - getFullUri - - (string $token) -
    - -
      -
    • - string - $token
    • -
    - - -
    - -
    - -
    - getNewPattern (line 354) -
    - - -

    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - getNewPattern - - ([boolean $constr = false]) -
    - -
      -
    • - boolean - $constr
    • -
    - - -
    - -
    - -
    - getPrefixes (line 177) -
    - - -

    Returns the prefix map of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getPrefixes - - () -
    - - - -
    - -
    - -
    - getResultForm (line 198) -
    - - -

    Returns the type the result shall have.

    -

    E.g. "select", "select distinct", "ask", ...

    - - -
    - string - - getResultForm - - () -
    - - - -
    - -
    - -
    - getResultPart (line 207) -
    - - -

    Returns a list containing the graph patterns of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getResultPart - - () -
    - - - -
    - -
    - -
    - getResultVars (line 186) -
    - - -

    Returns a list containing the result vars.

    -
      -
    • access: public
    • -
    - -
    - Array - - getResultVars - - () -
    - - - -
    - -
    - -
    - getSolutionModifier (line 392) -
    - - -

    Gets the solution modifiers of the query.

    -

    $solutionModifier['order by'] = value ['limit'] = vlaue ['offset'] = value

    -
      -
    • access: public
    • -
    - -
    - Array - - getSolutionModifier - - () -
    - - - -
    - -
    - -
    - isEmpty (line 233) -
    - - -

    Returns $isEmpty variable

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - setBase (line 253) -
    - - -

    Sets the base part.

    -
      -
    • access: public
    • -
    - -
    - void - - setBase - - (String $base) -
    - -
      -
    • - String - $base
    • -
    - - -
    - -
    - -
    - setResultForm (line 288) -
    - - -

    Sets the result form.

    -
      -
    • access: public
    • -
    - -
    - void - - setResultForm - - (String $form) -
    - -
      -
    • - String - $form
    • -
    - - -
    - -
    - -
    - setSolutionModifier (line 342) -
    - - -

    Sets a solution modifier.

    -
      -
    • access: public
    • -
    - -
    - void - - setSolutionModifier - - (String $name, Value $value) -
    - -
      -
    • - String - $name
    • -
    • - Value - $value
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:27 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/QueryTriple.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/QueryTriple.html.svn-base deleted file mode 100755 index 5895c370..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/QueryTriple.html.svn-base +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - Docs For Class QueryTriple - - - - -
    -

    Class QueryTriple

    - - -
    -
    Description
    - -
    - -

    Represents a query triple.

    - -

    - Located in /sparql/QueryTriple.php (line 15) -

    - - -
    Object
    -   |
    -   --QueryTriple
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $object -
    -
    - mixed - $predicate -
    -
    - mixed - $subject -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - QueryTriple - QueryTriple - ( $sub,  $pred,  $ob) -
    - -
    - Node - getObject - () -
    - -
    - Node - getPredicate - () -
    - -
    - Node - getSubject - () -
    - -
    - array - getVariables - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $object - (line 30) - -
    - - -

    The QueryTriples Object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $predicate - (line 25) - -
    - - -

    The QueryTriples Predicate.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $subject - (line 20) - -
    - - -

    The QueryTriples Subject.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor QueryTriple (line 36) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - QueryTriple - - QueryTriple - - ( $sub,  $pred,  $ob) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $ob
    • -
    - - -
    - -
    - -
    - getObject (line 68) -
    - - -

    Returns the Triples Object.

    -
      -
    • access: public
    • -
    - -
    - Node - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 58) -
    - - -

    Returns the Triples Predicate.

    -
      -
    • access: public
    • -
    - -
    - Node - - getPredicate - - () -
    - - - -
    - -
    - -
    - getSubject (line 48) -
    - - -

    Returns the Triples Subject.

    -
      -
    • access: public
    • -
    - -
    - Node - - getSubject - - () -
    - - - -
    - -
    - -
    - getVariables (line 80) -
    - - -

    Returns an array of all variables in this triple.

    -
      -
    • return: Array of variable names
    • -
    • access: public
    • -
    - -
    - array - - getVariables - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlClient.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlClient.html.svn-base deleted file mode 100755 index 880a1384..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlClient.html.svn-base +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - Docs For Class SparqlClient - - - - -
    -

    Class SparqlClient

    - - -
    -
    Description
    - -
    - -

    Client for querying a sparql server.

    - -

    - Located in /sparql/SparqlClient.php (line 16) -

    - - -
    Object
    -   |
    -   --SparqlClient
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $output -
    -
    - mixed - $server -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlClient - SparqlClient - (String $server) -
    - -
    - void - parseResult - ( $buffer) -
    - -
    - mixed - query - (ClientQuery $query) -
    - -
    - mixed - returnResult - (String $result) -
    - -
    - void - setOutputFormat - (String $format) -
    - -
    - void - _buildurl - (ClientQuery $query) -
    - -
    - String - _http_get - (String $url) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $output - (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $server - (line 18) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor SparqlClient (line 26) -
    - - -

    Constructor of SparlClient.

    - -
    - SparqlClient - - SparqlClient - - (String $server) -
    - -
      -
    • - String - $server: server address.
    • -
    - - -
    - -
    - -
    - parseResult (line 111) -
    - - - -
    - void - - parseResult - - ( $buffer) -
    - -
      -
    • - - $buffer
    • -
    - - -
    - -
    - -
    - query (line 54) -
    - - -

    Main function of SparqlClient.

    -
      -
    • return: returns an array that contains the variables an their bindings or a MemModel
    • -
    - -
    - mixed - - query - - (ClientQuery $query) -
    - - - - -
    - -
    - -
    - returnResult (line 91) -
    - - -

    Returns the query result.

    - -
    - mixed - - returnResult - - (String $result) -
    - -
      -
    • - String - $result: the result.
    • -
    - - -
    - -
    - -
    - setOutputFormat (line 39) -
    - - -

    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.

    - -
    - void - - setOutputFormat - - (String $format) -
    - -
      -
    • - String - $format: the format.
    • -
    - - -
    - -
    - -
    - _buildurl (line 71) -
    - - -

    Helper function that builds the url.

    - -
    - void - - _buildurl - - (ClientQuery $query) -
    - - - - -
    - -
    - -
    - _http_get (line 124) -
    - - -

    Executes the GET Request.

    -
      -
    • return: result.
    • -
    - -
    - String - - _http_get - - (String $url) -
    - -
      -
    • - String - $url: the url.
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine.html.svn-base deleted file mode 100755 index 5ecb1031..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine.html.svn-base +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - Docs For Class SparqlEngine - - - - -
    -

    Class SparqlEngine

    - - -
    -
    Description
    - -
    - -

    This engine executes SPARQL queries against an RDF Datatset.

    - -

    - Located in /sparql/SparqlEngine.php (line 19) -

    - - -
    Object
    -   |
    -   --SparqlEngine
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    - -
    - Query - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngine - __construct - () -
    - -
    - Array - buildVarmap - (String $order, Array $vartable) -
    - -
    - boolean - checkIntBindings - (Triple $trip, Array $intBindings) -
    - -
    - Array - distinct - (Array $vartable) -
    - -
    - void - factory - ([Model $model = null]) -
    - -
    - String - fillConstraintString - (Array $vars, Array $res, Constraint $constraint, Array $function) -
    - -
    - Array - filterPatterns - (Array $patternlist, boolean $outer) -
    - -
    - Array - findTuplesMatchingOnePattern - (TriplePattern $pattern, Array $graphlist) -
    - -
    - void - getDataset - () -
    - -
    - void - getQuery - () -
    - -
    - Array - joinOptionalTuples - (Array &$finalRes, Array &$res) -
    - -
    - Array - joinResults - (Array $patternlist) -
    - -
    - Array - joinTuples - (Array &$finalRes, Array &$res) -
    - -
    - void - matchPattern - ( &$patternlist, array $graphlist,  &$graphPattern, Array $patternlist, GraphPattern $graphPattern) -
    - -
    - Array - matchPatterns - (Array $graphlist) -
    - -
    - Array - preselectGraphs - () -
    - -
    - Array/String - queryModel - (Dataset $dataset, Query $query, [String $resultform = false]) -
    - -
    - Array - selectVars - (Array $table, Array $vars) -
    - -
    - Array - sortVars - (Array $vartable) -
    - -
    - void - writeQueryResultAsHtmlTable - (array $queryResult) -
    - -
    - Array - _buildIntBindings - (Array $var) -
    - -
    - Array - _buildResultSet - (GraphPattern $pattern, Array $resmodel) -
    - -
    - Array - _checkGraphs - ( &$pattern, Array $graphlist, GraphPattern $pattern) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - Dataset - $dataset - (line 32) - -
    - - -

    The RDF Dataset.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Query - $query - (line 26) - -
    - - -

    The query object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 40) -
    - - -

    Use SparqlEngine::factory() instead of this constructor.

    -
      -
    • access: protected
    • -
    - -
    - SparqlEngine - - __construct - - () -
    - - - -
    - -
    - -
    - buildVarmap (line 998) -
    - - -

    Sorts the result table.

    -
      -
    • return: A map that contains the new order of the result vars
    • -
    • access: protected
    • -
    - -
    - Array - - buildVarmap - - (String $order, Array $vartable) -
    - -
      -
    • - String - $order: (ASC/DESC)
    • -
    • - Array - $vartable: the vartable
    • -
    - - -
    - -
    - -
    - checkIntBindings (line 304) -
    - - -

    Checks it there are internal bindings between variables.

    -
      -
    • access: protected
    • -
    - -
    - boolean - - checkIntBindings - - (Triple $trip, Array $intBindings) -
    - -
      -
    • - Triple - $trip
    • -
    • - Array - $intBindings
    • -
    - - -
    - -
    - -
    - distinct (line 1070) -
    - - -

    Eliminates duplicate results.

    -
      -
    • return: the result table without duplicate results
    • -
    • access: protected
    • -
    - -
    - Array - - distinct - - (Array $vartable) -
    - -
      -
    • - Array - $vartable: a table that contains the result vars and their bindings
    • -
    - - -
    - -
    - -
    - factory (line 53) -
    - - -

    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.

    -
      -
    • access: public
    • -
    - -
    - void - - factory - - ([Model $model = null]) -
    - -
      -
    • - Model - $model: RDF model that uses the engine
    • -
    - - -
    - -
    - -
    - fillConstraintString (line 760) -
    - - -

    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function

    -
      -
    • access: protected
    • -
    - -
    - String - - fillConstraintString - - (Array $vars, Array $res, Constraint $constraint, Array $function) -
    - -
      -
    • - Array - $vars: a list which contains the used variables
    • -
    • - Array - $res: the result part which have to be evaluated
    • -
    • - Constraint - $constraint: the Constrain object
    • -
    • - Array - $function: an Array which contains the used functions
    • -
    - - -
    - -
    - -
    - filterPatterns (line 665) -
    - - -

    Filters the pattern results.

    -
      -
    • return: the filtered patternlist
    • -
    • access: protected
    • -
    - -
    - Array - - filterPatterns - - (Array $patternlist, boolean $outer) -
    - -
      -
    • - Array - $patternlist: list containing the results of the GraphPatterns
    • -
    • - boolean - $outer: TRUE if its an outer filter FALSE if not
    • -
    - - -
    - -
    - -
    - findTuplesMatchingOnePattern (line 216) -
    - - -

    Finds Tuples matching one TriplePattern.

    -
      -
    • access: protected
    • -
    - -
    - Array - - findTuplesMatchingOnePattern - - (TriplePattern $pattern, Array $graphlist) -
    - -
      -
    • - TriplePattern - $pattern
    • -
    • - Array - $graphlist
    • -
    - - -
    - -
    - -
    - getDataset (line 1161) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getDataset - - () -
    - - - -
    - -
    - -
    - getQuery (line 1154) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getQuery - - () -
    - - - -
    - -
    - -
    - joinOptionalTuples (line 406) -
    - - -

    Joins OPTIONAL pattern results.

    -
      -
    • return: the joined Array
    • -
    • access: protected
    • -
    - -
    - Array - - joinOptionalTuples - - (Array &$finalRes, Array &$res) -
    - -
      -
    • - Array - &$finalRes
    • -
    • - Array - &$res
    • -
    - - -
    - -
    - -
    - joinResults (line 618) -
    - - -

    Joins the results of the different Graphpatterns.

    -
      -
    • access: protected
    • -
    - -
    - Array - - joinResults - - (Array $patternlist) -
    - -
      -
    • - Array - $patternlist
    • -
    - - -
    - -
    - -
    - joinTuples (line 343) -
    - - -

    Perform an SQL-like inner join on two resultSets.

    -
      -
    • access: protected
    • -
    - -
    - Array - - joinTuples - - (Array &$finalRes, Array &$res) -
    - -
      -
    • - Array - &$finalRes
    • -
    • - Array - &$res
    • -
    - - -
    - -
    - -
    - matchPattern (line 152) -
    - - -

    Finds tuples that match one graph pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - matchPattern - - ( &$patternlist, array $graphlist,  &$graphPattern, Array $patternlist, GraphPattern $graphPattern) -
    - -
      -
    • - Array - $patternlist: list that contains the graphPatterns
    • -
    • - array - $graphlist: the graphlist
    • -
    • - GraphPattern - $graphPattern: the pattern which has to be matched
    • -
    • - - &$patternlist
    • -
    • - - &$graphPattern
    • -
    - - -
    - -
    - -
    - matchPatterns (line 130) -
    - - -

    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.

    -
      -
    • access: protected
    • -
    - -
    - Array - - matchPatterns - - (Array $graphlist) -
    - -
      -
    • - Array - $graphlist: the graphlist which contains the names of the named graphs which has to be queried.
    • -
    - - -
    - -
    - -
    - preselectGraphs (line 480) -
    - - -

    Looks in from and from named part of the query and adds the graphs to the graphlist.

    -
      -
    • access: protected
    • -
    - -
    - Array - - preselectGraphs - - () -
    - - - -
    - -
    - -
    - queryModel (line 74) -
    - - -

    The query engine's main method.

    -
      -
    • return: Type of the result depends on $resultform.
    • -
    • access: public
    • -
    - -
    - Array/String - - queryModel - - (Dataset $dataset, Query $query, [String $resultform = false]) -
    - -
      -
    • - Dataset - $dataset: the RDF Dataset
    • -
    • - mixed - $query: the parsed SPARQL query
    • -
    • - String - $resultform: the result form. If set to 'xml' the result will be SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    • -
    - - -
    - -
    - -
    - selectVars (line 594) -
    - - -

    Selects the result variables and builds a result table.

    -
      -
    • access: protected
    • -
    - -
    - Array - - selectVars - - (Array $table, Array $vars) -
    - -
      -
    • - Array - $table: the result table
    • -
    • - Array - $vars: the result variables
    • -
    - - -
    - -
    - -
    - sortVars (line 966) -
    - - -

    Sorts the results.

    -
      -
    • return: List containing the sorted result vars
    • -
    • access: protected
    • -
    - -
    - Array - - sortVars - - (Array $vartable) -
    - -
      -
    • - Array - $vartable: List containing the unsorted result vars
    • -
    - - -
    - -
    - -
    - writeQueryResultAsHtmlTable (line 1094) -
    - - -

    Prints a query result as HTML table.

    -

    You can change the colors in the configuration file.

    -
      -
    • access: public
    • -
    - -
    - void - - writeQueryResultAsHtmlTable - - (array $queryResult) -
    - -
      -
    • - array - $queryResult: [][?VARNAME] = object Node
    • -
    - - -
    - -
    - -
    - _buildIntBindings (line 524) -
    - - -

    Marks triples with internal bindings.

    -

    int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _buildIntBindings - - (Array $var) -
    - -
      -
    • - Array - $var
    • -
    - - -
    - -
    - -
    - _buildResultSet (line 557) -
    - - -

    Builds the resultset.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _buildResultSet - - (GraphPattern $pattern, Array $resmodel) -
    - - - - -
    - -
    - -
    - _checkGraphs (line 497) -
    - - -

    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.

    -

    Returns an array which contains the graphs that has to be matched.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _checkGraphs - - ( &$pattern, Array $graphlist, GraphPattern $pattern) -
    - -
      -
    • - GraphPattern - $pattern
    • -
    • - Array - $graphlist
    • -
    • - - &$pattern
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb.html.svn-base deleted file mode 100755 index 6e0b275d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb.html.svn-base +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb - - - - -
    -

    Class SparqlEngineDb

    - - -
    -
    Description
    - -
    - -

    SPARQL engine optimized for databases.

    -

    Generates SQL statements to directly query the database, letting the database system do all the hard work like selecting, joining, filtering and ordering results.

    - -

    - Located in /sparql/SparqlEngineDb.php (line 18) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arPrepared -
    -
    - boolean - $bRealPrepared -
    - -
    - ADOConnection - $dbConn -
    -
    - int - $modelID -
    - -
    - Query - $query -
    - - -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb - __construct - ( $model) -
    - -
    - mixed - execute - (array $arVariables, [string $resultform = false]) -
    - -
    - void - getQuery - () -
    - -
    - void - getSqlGenerator - () -
    - -
    - void - getTypeSorter - () -
    - -
    - SparqlEngineDb_PreparedStatement - prepare - ( $dataset, Query $query) -
    - -
    - mixed - queryDb - (array $arSql,  $nOffset,  $nLimit) -
    - -
    - array/string - queryModel - ( $dataset, Query $query, [string $resultform = false]) -
    - -
    - array - queryMultiple - (array $arSqls) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arPrepared - = null (line 50) - -
    - - -

    Prepared SQL statements are stored in here.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $bRealPrepared - = false (line 56) - -
    - - -

    If the prepared statement is really prepared, or if we just emulate it.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Dataset - $dataset - (line 31) - -
    - - -

    RDF dataset object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - ADOConnection - $dbConn - (line 37) - -
    - - -

    Database connection object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $modelID - (line 44) - -
    - - -

    Internal ID for our graph model.

    -

    Stored in the database along the statements.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_Preparator - $pr - = null (line 74) - -
    - - -

    Prepared statments preparator instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Query - $query - (line 25) - -
    - - -

    Sparql Query object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_SqlGenerator - $sg - = null (line 62) - -
    - - -

    SQL generator instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_TypeSorter - $ts - = null (line 68) - -
    - - -

    Type sorting instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 81) -
    - - -

    Use SparqlEngine::factory() to create the instance

    -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb - - __construct - - ( $model) -
    - - - - -
    - -
    - -
    - execute (line 189) -
    - - -

    Execute a prepared statement by filling it with variables

    -
      -
    • return: Result according to $resultform
    • -
    • access: public
    • -
    - -
    - mixed - - execute - - (array $arVariables, [string $resultform = false]) -
    - -
      -
    • - array - $arVariables: Array with (variable name => value) pairs
    • -
    • - string - $resultform: Which form the result should have
    • -
    - - -
    - -
    - -
    - getQuery (line 329) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getQuery - - () -
    - - - -
    - -
    - -
    - getSqlGenerator (line 336) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getSqlGenerator - - () -
    - - - -
    - -
    - -
    - getTypeSorter (line 343) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getTypeSorter - - () -
    - - - -
    - -
    - -
    - prepare (line 142) -
    - - -

    Create a prepared statement that can be executed later.

    -
      -
    • return: Prepared statment that can be execute()d later.
    • -
    • access: public
    • -
    - -
    - SparqlEngineDb_PreparedStatement - - prepare - - ( $dataset, Query $query) -
    - -
      -
    • - Dataset - $dataset: RDF Dataset
    • -
    • - Query - $query: Parsed SPARQL query
    • -
    - - -
    - -
    - -
    - queryDb (line 287) -
    - - -

    Sends the sql to the database and returns the results.

    -
      -
    • return: Anything ADOConnection::Execute() may return
    • -
    • throws: Exception If Database query does not work
    • -
    - -
    - mixed - - queryDb - - (array $arSql,  $nOffset,  $nLimit) -
    - -
      -
    • - array - $arSql: Array that gets a SQL query string once imploded
    • -
    • - - $nOffset
    • -
    • - - $nLimit
    • -
    - - -
    - -
    - -
    - queryModel (line 102) -
    - - -

    Query the database with the given SPARQL query.

    -
      -
    • return: array of triple arrays, or XML. Format depends on $resultform parameter.
    • -
    • access: public
    • -
    - -
    - array/string - - queryModel - - ( $dataset, Query $query, [string $resultform = false]) -
    - -
      -
    • - Dataset - $dataset: RDF Dataset
    • -
    • - Query - $query: Parsed SPARQL query
    • -
    • - string - $resultform: Result form. If set to 'xml' the result will be SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    • -
    - - -
    - -
    - -
    - queryMultiple (line 235) -
    - - -

    Executes multiple SQL queries and returns an array of results.

    -
      -
    • return: Array of query results
    • -
    • access: protected
    • -
    - -
    - array - - queryMultiple - - (array $arSqls) -
    - -
      -
    • - array - $arSqls: Array of SQL queries
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator.html.svn-base deleted file mode 100755 index 625f37bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator.html.svn-base +++ /dev/null @@ -1,1649 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_FilterGenerator - - - - -
    -

    Class SparqlEngineDb_FilterGenerator

    - - -
    -
    Description
    - -
    - -

    Generates SQL from Sparql FILTER parts

    - -

    - Located in /sparql/SparqlEngineDb/FilterGenerator.php (line 10) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static mixed - $arDumbOperators -
    -
    - static array - $arFuncParamNumbers -
    -
    - static array - $arOperatorSwitches -
    -
    - static mixed - $typeVariable -
    -
    - static mixed - $typeXsdBoolean -
    -
    - static mixed - $typeXsdDateTime -
    -
    - static mixed - $typeXsdDouble -
    -
    - static mixed - $typeXsdInteger -
    -
    - static mixed - $typeXsdString -
    -
    - boolean - $bOptional -
    - -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - mkVal - ( $value, [ $type = null]) -
    - -
    - static void - switchOperator - ( $op) -
    - -
    - SparqlEngineDb_FilterGenerator - __construct - (SparqlEngineDb_SqlGenerator $sg) -
    - -
    - void - createBooleanValue - ( $tree) -
    - -
    - void - createEquation - ( $tree) -
    - -
    - string - createFilterSql - (array $tree, boolean $bOptional,  $nUnionCount) -
    - -
    - void - createFunction - ( $tree) -
    - -
    - void - createFunction_bound - ( $tree) -
    - -
    - void - createFunction_datatype - ( $tree) -
    - -
    - void - createFunction_isblank - ( $tree) -
    - -
    - void - createFunction_isiri - ( $tree) -
    - -
    - void - createFunction_isliteral - ( $tree) -
    - -
    - void - createFunction_isuri - ( $tree) -
    - -
    - void - createFunction_lang - ( $tree) -
    - -
    - void - createFunction_langmatches - ( $tree) -
    - -
    - void - createFunction_regex - ( $tree) -
    - -
    - void - createFunction_sameterm - ( $tree) -
    - -
    - void - createFunction_str - ( $tree) -
    - -
    - void - createFunction_xsd_datetime - ( $tree) -
    - -
    - void - createSingleTypeCheck - ( $val,  $tree) -
    - -
    - void - createTreeSql - ( $tree,  $parent) -
    - -
    - void - createTypeEquation - ( $operator,  $val1,  $val2,  $tree1,  $tree2) -
    - -
    - void - createValue - (array $tree, boolean $bDumbParent) -
    - -
    - void - getCol - ( $tree,  $type) -
    - -
    - void - getDatatypeCol - ( $tree) -
    - -
    - void - getDateConversionSql - ( $strValue) -
    - -
    - void - getIsCol - ( $tree) -
    - -
    - void - getLangCol - ( $tree) -
    - -
    - void - getValueCol - ( $tree) -
    - -
    - void - isNumber - ( $tree) -
    - -
    - boolean - isObject - (array $tree) -
    - -
    - boolean - isObjectOrSubject - (array $tree) -
    - -
    - boolean - isPlainString - (array $tree) -
    - -
    - void - isValueButNotVariableNorString - ( $tree) -
    - -
    - boolean - isVariable - (array $tree) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static mixed - $arDumbOperators - = array( -
    '&&', '||' -
    )
    (line 56) -
    -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $arFuncParamNumbers - = array( -
    'bound' => array(1, 1),'datatype'=>array(1,1),'isblank'=>array(1,1),'isiri'=>array(1,1),'isliteral'=>array(1,1),'isuri'=>array(1,1),'lang'=>array(1,1),'langmatches'=>array(2,2),'regex'=>array(2,3),'sameterm'=>array(2,2),'str'=>array(1,1),'xsd:datetime'=>array(1,1),)
    (line 29) -
    -
    - - -

    Number of parameters for the functions supported.

    -

    First value is minimum, second is maximum.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $arOperatorSwitches - = array( -
    '>' => '<', -
    '<' => '>', -
    '>=' => '<=', -
    '<=' => '>=', -
    )
    (line 49) -
    -
    - - -

    List of operators and their counterpart if operands are switched.

    -

    (a > b) => (b < a)

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeVariable - = 'variable' (line 65) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdBoolean - = 'http://www.w3.org/2001/XMLSchema#boolean' (line 60) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdDateTime - = 'http://www.w3.org/2001/XMLSchema#dateTime' (line 61) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdDouble - = 'http://www.w3.org/2001/XMLSchema#double' (line 62) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdInteger - = 'http://www.w3.org/2001/XMLSchema#integer' (line 63) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdString - = 'http://www.w3.org/2001/XMLSchema#string' (line 64) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - - -
    - -
    - - boolean - $bOptional - = false (line 22) - -
    - - -

    If the filter is in an optional statement

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_SqlGenerator - $sg - = null (line 16) - -
    - - -

    SQL Generator

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static mkVal (line 662) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - mkVal - - ( $value, [ $type = null]) -
    - -
      -
    • - - $value
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - static switchOperator (line 799) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - switchOperator - - ( $op) -
    - -
      -
    • - - $op
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 69) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_FilterGenerator - - __construct - - (SparqlEngineDb_SqlGenerator $sg) -
    - - - - -
    - -
    - -
    - createBooleanValue (line 213) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createBooleanValue - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createEquation (line 270) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createEquation - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFilterSql (line 84) -
    - - -

    Creates the SQL representing a Sparql FILTER.

    -
      -
    • return: SQL WHERE part with prefixed AND
    • -
    • access: public
    • -
    - -
    - string - - createFilterSql - - (array $tree, boolean $bOptional,  $nUnionCount) -
    - -
      -
    • - array - $tree: Filter element tree as returned by SparqlParser::parseConstraintTree()
    • -
    • - boolean - $bOptional: If the filter is in an optional statement
    • -
    • - - $nUnionCount
    • -
    - - -
    - -
    - -
    - createFunction (line 243) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_bound (line 400) -
    - - -

    Creates an sql statement that returns if the element is a blank node

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_bound - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_datatype (line 415) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_datatype - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isblank (line 434) -
    - - -

    Creates an sql statement that returns if the element is a blank node

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isblank - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isiri (line 450) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isiri - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isliteral (line 460) -
    - - -

    Creates an sql statement that returns the language of the object

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isliteral - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isuri (line 475) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isuri - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_lang (line 493) -
    - - -

    Creates an sql statement that returns the language of the object

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_lang - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_langmatches (line 512) -
    - - -

    Creates an sql statement that checks if the variable

    -

    matches a given language

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_langmatches - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_regex (line 559) -
    - - -

    Creates an sql statement that checks if the given part matches

    -

    an regex

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_regex - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_sameterm (line 601) -
    - - -

    Creates an sql statement that checks if both terms are the same

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_sameterm - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_str (line 618) -
    - - -

    Creates an sql statement that returns the string representation

    -

    of the given element

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_str - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_xsd_datetime (line 639) -
    - - -

    Creates an sql statement that returns the datetime representation

    -

    of the given element

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_xsd_datetime - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createSingleTypeCheck (line 376) -
    - - -

    Creates sql to ensure the type between $val and variable $tree is the same.

    -
      -
    • access: protected
    • -
    - -
    - void - - createSingleTypeCheck - - ( $val,  $tree) -
    - -
      -
    • - - $val
    • -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createTreeSql (line 102) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTreeSql - - ( $tree,  $parent) -
    - -
      -
    • - - $tree
    • -
    • - - $parent
    • -
    - - -
    - -
    - -
    - createTypeEquation (line 335) -
    - - -

    Generates sql code to make sure the datatypes of the two operands match

    -
      -
    • access: protected
    • -
    - -
    - void - - createTypeEquation - - ( $operator,  $val1,  $val2,  $tree1,  $tree2) -
    - -
      -
    • - - $operator
    • -
    • - - $val1
    • -
    • - - $val2
    • -
    • - - $tree1
    • -
    • - - $tree2
    • -
    - - -
    - -
    - -
    - createValue (line 141) -
    - - -

    Creates the sql for an element of type "value".

    -
      -
    • access: protected
    • -
    - -
    - void - - createValue - - (array $tree, boolean $bDumbParent) -
    - -
      -
    • - array - $tree: Element
    • -
    • - boolean - $bDumbParent: True if the parent is a boolean equation or null.
    • -
    - - -
    - -
    - -
    - getCol (line 668) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getCol - - ( $tree,  $type) -
    - -
      -
    • - - $tree
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - getDatatypeCol (line 680) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getDatatypeCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getDateConversionSql (line 688) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getDateConversionSql - - ( $strValue) -
    - -
      -
    • - - $strValue
    • -
    - - -
    - -
    - -
    - getIsCol (line 695) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getIsCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getLangCol (line 702) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getLangCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getValueCol (line 710) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getValueCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isNumber (line 717) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - isNumber - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isObject (line 734) -
    - - -

    Checks if the given tree element is a variable and the variable is actually an object in the database.

    -
      -
    • return: True if the element is an object
    • -
    • access: protected
    • -
    - -
    - boolean - - isObject - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isObjectOrSubject (line 749) -
    - - -

    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.

    -
      -
    • return: True if the element is an object or an subject
    • -
    • access: protected
    • -
    - -
    - boolean - - isObjectOrSubject - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isPlainString (line 766) -
    - - -

    Checks if the given tree element is a plain string (no variable)

    -
      -
    • return: True if the element is a string
    • -
    • access: protected
    • -
    - -
    - boolean - - isPlainString - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isValueButNotVariableNorString (line 774) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - isValueButNotVariableNorString - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isVariable (line 789) -
    - - -

    Checks if the given tree element is a variable

    -
      -
    • return: True if the element is a variable
    • -
    • access: protected
    • -
    - -
    - boolean - - isVariable - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base deleted file mode 100755 index d54e16c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_FilterGenerator_Value.html.svn-base +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_FilterGenerator_Value - - - - -
    -

    Class SparqlEngineDb_FilterGenerator_Value

    - - -
    -
    Description
    - -
    - -

    Value class that holds some arbitrary value and a datatype.

    -

    Objects of this class can transparently be used in strings since its __toString() returns the value.

    -

    - Located in /sparql/SparqlEngineDb/FilterGenerator.php (line 819) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $type -
    -
    - mixed - $value -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb_FilterGenerator_Value - __construct - ( $value, [ $type = null]) -
    - -
    - void - __toString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $type - = null (line 822) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - mixed - $value - = null (line 821) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 826) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_FilterGenerator_Value - - __construct - - ( $value, [ $type = null]) -
    - -
      -
    • - - $value
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - __toString (line 834) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - __toString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Offsetter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Offsetter.html.svn-base deleted file mode 100755 index 6b1a24d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Offsetter.html.svn-base +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_Offsetter - - - - -
    -

    Class SparqlEngineDb_Offsetter

    - - -
    -
    Description
    - -
    - -

    Determines the offset in a row of sql queries.

    - -

    - Located in /sparql/SparqlEngineDb/Offsetter.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static string - getLimitSql - (Query $query,  $dbConn) -
    - -
    - SparqlEngineDb_Offsetter - __construct - ( $dbConn, Query $query) -
    - -
    - array - determineOffset - (array $arSqls) -
    - -
    - int - getCount - (array $arSql) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static getLimitSql (line 82) -
    - - -

    Creates a sql LIMIT statement if the sparql query needs one.

    -

    This method is needed because AdoDb does not support limits with prepared statements. It's a pity.

    -
      -
    • return: SQL command to be appended to a query, to limit the number of result rows returned.
    • -
    • access: public
    • -
    - -
    - static string - - getLimitSql - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 13) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_Offsetter - - __construct - - ( $dbConn, Query $query) -
    - -
      -
    • - ADOConnection - $dbConn
    • -
    • - Query - $query
    • -
    - - -
    - -
    - -
    - determineOffset (line 31) -
    - - -

    Determines the offset in the sqls, the position to start form.

    -
      -
    • return: Array of two values: The first determines the index of the sql query to begin with, the second is the row offset that should be used in the final SQL query.
    • -
    • access: public
    • -
    - -
    - array - - determineOffset - - (array $arSqls) -
    - -
      -
    • - array - $arSqls: Array of SQL query parts as returned by SparqlEngine_TypeSorter::getOrderifiedSqls()
    • -
    - - -
    - -
    - -
    - getCount (line 59) -
    - - -

    Returns the number of rows that the given query will return.

    -
      -
    • return: Number of rows returned.
    • -
    • access: protected
    • -
    - -
    - int - - getCount - - (array $arSql) -
    - -
      -
    • - array - $arSql: Array with sql parts and at least keys 'from' and 'where' set.
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Preparator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Preparator.html.svn-base deleted file mode 100755 index 38c6dc76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_Preparator.html.svn-base +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_Preparator - - - - -
    -

    Class SparqlEngineDb_Preparator

    - - -
    -
    Description
    - -
    - -

    This class takes care of prepared statements: Preparing them in the database, replacing

    - -

    - Located in /sparql/SparqlEngineDb/Preparator.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - replacePrefix - ( $strValue,  $arPrefixes) -
    - -
    - SparqlEngineDb_Preparator - __construct - (Query $query,  $dbConn) -
    - -
    - array - createVariableArray - (array $arVariablePositions, array $arVariableValues) -
    - -
    - array - execute - (array $arDbStatements, array $arVariableValues) -
    - -
    - array - prepareInDb - (array $arQueries, array $arPlaceholders) -
    - -
    - array - replacePlaceholders - (string $strQuery, array $arPlaceholders) -
    - -
    - void - replacePlaceholdersCb - ( $matches) -
    - -
    - void - replacePlaceholdersWithVariables - ( $strQuery,  $arPlaceholders,  $arVariableValues) -
    - -
    - void - replacePlaceholdersWithVariablesCb - ( $matches) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static replacePrefix (line 215) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - replacePrefix - - ( $strValue,  $arPrefixes) -
    - -
      -
    • - - $strValue
    • -
    • - - $arPrefixes
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_Preparator - - __construct - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - createVariableArray (line 153) -
    - - -

    Creates an array full of variables to be passed to the Execute() method of the database connection object.

    -

    Uses the variable positions array to get the positions of the variables in the result array, and the variable value array to get the actual values for the prepared statement.

    -
      -
    • return: Array of variable values
    • -
    • access: protected
    • -
    - -
    - array - - createVariableArray - - (array $arVariablePositions, array $arVariableValues) -
    - -
      -
    • - array - $arVariablePositions: Positions of the variables as returned by replacePlaceholders().
    • -
    • - array - $arVariableValues: Array of (variable name, value) pairs
    • -
    - - -
    - -
    - -
    - execute (line 119) -
    - - -

    Executes the given prepared statments, filling the placeholders with the given values.

    -
      -
    • return: Array of database results as returned by Execute()
    • -
    • access: public
    • -
    - -
    - array - - execute - - (array $arDbStatements, array $arVariableValues) -
    - -
      -
    • - array - $arDbStatements: Return value of prepareInDb()
    • -
    • - array - $arVariableValues: Array of (variable name, value) pairs
    • -
    - - -
    - -
    - -
    - prepareInDb (line 39) -
    - - -

    Converts the given queries into sql prepared statments,

    -

    calls the prepare command in the database and returns an array consisting of subarrays. They contain the db's prepared statement as first value, and an array of variable positions as second value (key is the position, the sparql variable is the value).

    -
      -
    • return: Array of (prepared statment, variable positions) pairs
    • -
    • access: public
    • -
    - -
    - array - - prepareInDb - - (array $arQueries, array $arPlaceholders) -
    - -
      -
    • - array - $arQueries: Array of sql queries part arrays
    • -
    • - array - $arPlaceholders: Array of sparql (variable name => placeholder name) pairs
    • -
    - - -
    - -
    - -
    - replacePlaceholders (line 77) -
    - - -

    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.

    -
      -
    • return: (prepared sql query string, variable positions) pair
    • -
    • access: protected
    • -
    - -
    - array - - replacePlaceholders - - (string $strQuery, array $arPlaceholders) -
    - -
      -
    • - string - $strQuery: SQL query with placeholders
    • -
    • - array - $arPlaceholders: Array of sparql (variable name => placeholder name) pairs
    • -
    - - -
    - -
    - -
    - replacePlaceholdersCb (line 95) -
    - - -

    Callback method internally used by replacePlaceholders() method.

    -
      -
    • access: protected
    • -
    - -
    - void - - replacePlaceholdersCb - - ( $matches) -
    - -
      -
    • - - $matches
    • -
    - - -
    - -
    - -
    - replacePlaceholdersWithVariables (line 178) -
    - - -

    Replaces all placeholders with their actual values.

    -
      -
    • access: public
    • -
    - -
    - void - - replacePlaceholdersWithVariables - - ( $strQuery,  $arPlaceholders,  $arVariableValues) -
    - -
      -
    • - - $strQuery
    • -
    • - - $arPlaceholders
    • -
    • - - $arVariableValues
    • -
    - - -
    - -
    - -
    - replacePlaceholdersWithVariablesCb (line 198) -
    - - -

    Callback method internally used by replacePlaceholdersWithVariables() method.

    -
      -
    • access: protected
    • -
    - -
    - void - - replacePlaceholdersWithVariablesCb - - ( $matches) -
    - -
      -
    • - - $matches
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_PreparedStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_PreparedStatement.html.svn-base deleted file mode 100755 index 0cf4da8a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_PreparedStatement.html.svn-base +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_PreparedStatement - - - - -
    -

    Class SparqlEngineDb_PreparedStatement

    - - -
    -
    Description
    - -
    - -

    A prepared statement that can be execute()d later multiple times with different variable values.

    - -

    - Located in /sparql/SparqlEngineDb/PreparedStatement.php (line 12) -

    - - -
    SparqlEngine_PreparedStatement
    -   |
    -   --SparqlEngineDb_PreparedStatement
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $sparqlEngine -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb_PreparedStatement - __construct - (SparqlEngineDb $sparqlEngine) -
    - -
    - mixed - execute - (array $arVariables, [string $resultform = false]) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $sparqlEngine - = null (line 14) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_PreparedStatement - - __construct - - (SparqlEngineDb $sparqlEngine) -
    - - - - -
    - -
    - -
    - execute (line 31) -
    - - -

    Execute the prepared statement and returns the result.

    -
      -
    • return: Anything a sparql query can return
    • -
    • access: public
    • -
    - -
    - mixed - - execute - - (array $arVariables, [string $resultform = false]) -
    - -
      -
    • - array - $arVariables: Array of sparql query variables => values
    • -
    • - string - $resultform: Which result form you need
    • -
    - -
    -
    Redefinition of:
    -
    -
    SparqlEngine_PreparedStatement::execute()
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From SparqlEngine_PreparedStatement

    -
    - SparqlEngine_PreparedStatement::execute()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultConverter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultConverter.html.svn-base deleted file mode 100755 index 51e6837a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultConverter.html.svn-base +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultConverter - - - - -
    -

    Class SparqlEngineDb_ResultConverter

    - - -
    -
    Description
    - -
    - -

    Converts a database result into a proper rdf statement triple array

    - -

    - Located in /sparql/SparqlEngineDb/ResultConverter.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - convertFromDbResults - (array $arRecordSets, SparqlEngineDb $engine, [mixed $resultform = false]) -
    - -
    - static mixed - loadClass - (string $strClass) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static convertFromDbResults (line 30) -
    - - -

    Determines the correct renderer and calls it.

    -

    The $resultform may be:

    • false: The default renderer is taken then
    • an object that implements SparqlEngineDb_ResultRenderer interface
    • a string like "HTML" or "XML". The appropriate renderer is used then.
    • a full class name, e.g. SparqlEngineDb_ResultRenderer_XML

    -
      -
    • return: Most likely an array or a boolean value, or anything else as determined by $resultform
    • -
    • access: public
    • -
    - -
    - static mixed - - convertFromDbResults - - (array $arRecordSets, SparqlEngineDb $engine, [mixed $resultform = false]) -
    - -
      -
    • - array - $arRecordSets: Array of anything ADOConnection::Execute() can return
    • -
    • - SparqlEngineDb - $engine: Sparql database engine.
    • -
    • - mixed - $resultform: Which format the results shall be in (false or "xml")
    • -
    - - -
    - -
    - -
    - static loadClass (line 84) -
    - - -

    Tries to load a given class if it doesn't exist, and returns true if the class can be used.

    -
      -
    • return: Class name if the class is loaded and can be used, false if not.
    • -
    • access: protected
    • -
    - -
    - static mixed - - loadClass - - (string $strClass) -
    - -
      -
    • - string - $strClass: Classname
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer.html.svn-base deleted file mode 100755 index 1eb40a3f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer.html.svn-base +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer - - - - -
    -

    Interface SparqlEngineDb_ResultRenderer

    - - -
    -
    Description
    - -
    - -

    Result renderer interface that any result renderer needs to implement.

    -

    A result renderer converts the raw database results into a

    • for the user - usable result format, e.g. php arrays, xml, json and
    so on.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromDbResults (line 24) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base deleted file mode 100755 index 5bc3bcd9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_Default.html.svn-base +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_Default - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_Default

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Default RAP result renderer.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/Default.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - constructGraph - (array $arVartable, GraphPattern $constructPattern) -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - Resource - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - Resource - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - Statement - createStatementFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase) -
    - -
    - Resource - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - array - getVariableArrayFromRecordSet - ( $dbRecordSet,  $strResultForm) -
    - -
    - void - getVariableArrayFromRecordSets - ( $arRecordSets,  $strResultForm) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 24) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - constructGraph (line 286) -
    - - -

    Constructs a result graph.

    -
      -
    • return: The result graph which matches the CONSTRUCT pattern
    • -
    • access: protected
    • -
    - -
    - MemModel - - constructGraph - - (array $arVartable, GraphPattern $constructPattern) -
    - -
      -
    • - array - $arVartable: A table containing the result vars and their bindings
    • -
    • - GraphPattern - $constructPattern: The CONSTRUCT pattern
    • -
    - - -
    - -
    - -
    - convertFromDbResults (line 41) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 252) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple object resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 229) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple predicate resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createStatementFromDbRecordSetPart (line 176) -
    - - -

    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.

    -
      -
    • return: RDF statement object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Statement - - createStatementFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 198) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple subject resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - getVariableArrayFromRecordSet (line 124) -
    - - -

    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.

    -
      -
    • access: protected
    • -
    - -
    - array - - getVariableArrayFromRecordSet - - ( $dbRecordSet,  $strResultForm) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Anything ADOConnection::Execute() can return
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    - -
    - getVariableArrayFromRecordSets (line 103) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getVariableArrayFromRecordSets - - ( $arRecordSets,  $strResultForm) -
    - -
      -
    • - - $arRecordSets
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base deleted file mode 100755 index 5747d06f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_HTML.html.svn-base +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_HTML - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_HTML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Sparql DB HTML result renderer.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/HTML.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    - boolean - $bWrap -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - string - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - void - createTableFromRecords - ( $arRecordSets) -
    - -
    - void - getHtmlBlank - ( $value) -
    - -
    - void - getHtmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getHtmlNull - () -
    - -
    - void - getHtmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 29) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $bWrap - = true (line 17) - -
    - - -

    If the result HTML should be wrapped in a div

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromDbResults (line 45) -
    - - -

    Converts the database results into nice HTML.

    -
      -
    • return: HTML code
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 230) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 208) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 180) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createTableFromRecords (line 111) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTableFromRecords - - ( $arRecordSets) -
    - -
      -
    • - - $arRecordSets
    • -
    - - -
    - -
    - -
    - getHtmlBlank (line 260) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlLiteral (line 277) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getHtmlNull (line 253) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlNull - - () -
    - - - -
    - -
    - -
    - getHtmlResource (line 267) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 97) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base deleted file mode 100755 index 7be91113..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_ResultRenderer_XML.html.svn-base +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_XML - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_XML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/XML.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - getSpokenBoolean - ( $b) -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - void - createFromRecords - ( $arRecordSets,  $strResultForm) -
    - -
    - string - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - void - getHead - ([ $strXml = '']) -
    - -
    - void - getResultXml - ( $arResult) -
    - -
    - void - getXmlBlank - ( $value) -
    - -
    - void - getXmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getXmlNull - () -
    - -
    - void - getXmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 25) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getSpokenBoolean (line 195) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - getSpokenBoolean - - ( $b) -
    - -
      -
    • - - $b
    • -
    - - -
    - -
    - -
    - convertFromDbResults (line 41) -
    - - -

    Converts the database results into nice HTML.

    -
      -
    • return: HTML code
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createFromRecords (line 119) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFromRecords - - ( $arRecordSets,  $strResultForm) -
    - -
      -
    • - - $arRecordSets
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 263) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 241) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 213) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - getHead (line 110) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHead - - ([ $strXml = '']) -
    - -
      -
    • - - $strXml
    • -
    - - -
    - -
    - -
    - getResultXml (line 176) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getResultXml - - ( $arResult) -
    - -
      -
    • - - $arResult
    • -
    - - -
    - -
    - -
    - getXmlBlank (line 293) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getXmlLiteral (line 307) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getXmlNull (line 286) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlNull - - () -
    - - - -
    - -
    - -
    - getXmlResource (line 300) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 99) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGenerator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGenerator.html.svn-base deleted file mode 100755 index 9c0a6157..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGenerator.html.svn-base +++ /dev/null @@ -1,1132 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlGenerator - - - - -
    -

    Class SparqlEngineDb_SqlGenerator

    - - -
    -
    Description
    - -
    - -

    Creates sql statements from a Query object

    - -

    - Located in /sparql/SparqlEngineDb/SqlGenerator.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $arTableColumnNames -
    -
    - array - $arPlaceholders -
    - -
    - array - $arUsedVarAssignments -
    -
    - array - $arUsedVarTypes -
    -
    - array - $arVarAssignments -
    - -
    - int - $nUnionCount -
    -
    - mixed - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static string - getSqlEqualityCondition - (array $arNew, array $arOld) -
    - -
    - static boolean - isEmptyPattern - (GraphPattern $graphPattern) -
    - -
    - static boolean - isPreparedVariable - ( $bject) -
    - -
    - static boolean - isResultVar - (string $strVar,  &$arResultVars, array $arResultVars) -
    - -
    - static boolean - isVariable - ( $bject) -
    - -
    - static array - removeNull - (array $array) -
    - -
    - SparqlEngineDb_SqlGenerator - __construct - (Query $query,  $dbConn,  $modelID) -
    - -
    - array - createEqualSelects - (array $arSelect) -
    - -
    - array - createSql - () -
    - -
    - void - fixWhere - ( $strWhere) -
    - -
    - void - getPlaceholders - () -
    - -
    - string - getPreparedVariablePlaceholder - (string $strVariable) -
    - -
    - string - getSqlCondition - (mixed $bject, string $strTablePrefix, string $strType) -
    - -
    - void - getSqlVariableName - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameDatatype - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameIs - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameLanguage - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameValue - ( $strSparqlVar) -
    - -
    - array - getTripleSql - (QueryTriple $triple, GraphPattern $graphPattern,  $arResultVars) -
    - -
    - void - getUsedVarAssignments - () -
    - -
    - void - getUsedVarTypes - () -
    - -
    - void - getVarAssignments - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $arTableColumnNames - = array( -
    's' => array( -
    'value' => 'subject', -
    'is' => 'subject_is' -
    ),'p'=>array('value'=>'predicate'),'o'=>array('value'=>'object','is'=>'object_is'))
    (line 108) -
    -
    - - -

    Column names for subjects, predicates and objects for easy access via their character names (spo).

    -
      -
    • access: public
    • -
    - - - - - -
    - - -
    - -
    - - array - $arPlaceholders - = array() (line 99) - -
    - - -

    Array with placeholders of prepared statements variables.

    -

    key is the variable name (without "??"), value is the placeholder.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $arUnionVarAssignments - = array() (line 72) - -
    - - -

    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arUsedVarAssignments - = array() (line 51) - -
    - - -

    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arUsedVarTypes - = array() (line 91) - -
    - - -

    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)

    -
      -
    • access: protected
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arVarAssignments - = array() (line 37) - -
    - - -

    Determines which variables can be found in which SQL result column.

    -
      -
    • see: $arCreationMethods
    • -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - mixed - $nSqlVariableNameCount - = 0 (line 128) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $nUnionCount - = 0 (line 126) - -
    - - -

    Current UNION part number

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $query - = null (line 15) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getSqlEqualityCondition (line 652) -
    - - -

    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.

    -

    Required for queries like ":x ?a ?a" where predicate and object need to have the same value

    -
      -
    • access: protected
    • -
    - -
    - static string - - getSqlEqualityCondition - - (array $arNew, array $arOld) -
    - -
      -
    • - array - $arNew: array($strTablePrefix, $strType = s|p|o)
    • -
    • - array - $arOld: array($strTablePrefix, $strType = s|p|o)
    • -
    - - -
    - -
    - -
    - static isEmptyPattern (line 798) -
    - - -

    Checks if the graph pattern is empty (contains no usable data).

    -

    Occurs when using "{}" without pre- or suffixes WHERE { { ?person rdf:type foaf:Person } . }

    -
      -
    • return: True if the pattern is empty.
    • -
    • access: protected
    • -
    - -
    - static boolean - - isEmptyPattern - - (GraphPattern $graphPattern) -
    - -
      -
    • - GraphPattern - $graphPattern: Graph pattern to check
    • -
    - - -
    - -
    - -
    - static isPreparedVariable (line 728) -
    - - -

    Checks if the given variable is a replacement for a prepared statement.

    -
      -
    • access: public
    • -
    - -
    - static boolean - - isPreparedVariable - - ( $bject) -
    - -
      -
    • - - $bject
    • -
    - - -
    - -
    - -
    - static isResultVar (line 701) -
    - - -

    Checks if the given variable name is part of the result variables list.

    -

    Needed since $arResultVars may contain "*" that captures all variables.

    -
      -
    • return: true if it is a result variable
    • -
    • access: protected
    • -
    - -
    - static boolean - - isResultVar - - (string $strVar,  &$arResultVars, array $arResultVars) -
    - -
      -
    • - string - $strVar: Variable name (e.g. "?p")
    • -
    • - array - $arResultVars: Array with result variables
    • -
    • - - &$arResultVars
    • -
    - - -
    - -
    - -
    - static isVariable (line 714) -
    - - -

    Checks if the given subject/predicate/object is a variable name.

    -
      -
    • access: public
    • -
    - -
    - static boolean - - isVariable - - ( $bject) -
    - -
      -
    • - - $bject
    • -
    - - -
    - -
    - -
    - static removeNull (line 817) -
    - - -

    Removes all NULL values from an array and returns it.

    -
      -
    • return: without the NULL values.
    • -
    • access: protected
    • -
    - -
    - static array - - removeNull - - (array $array) -
    - -
      -
    • - array - $array: Some array
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 132) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_SqlGenerator - - __construct - - (Query $query,  $dbConn,  $modelID) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    • - - $modelID
    • -
    - - -
    - -
    - -
    - createEqualSelects (line 466) -
    - - -

    Creates SELECT statements that have the same number of columns.

    -

    Needed for UNIONs.

    -
      -
    • return: Array of SELECT strings
    • -
    • access: protected
    • -
    - -
    - array - - createEqualSelects - - (array $arSelect) -
    - -
      -
    • - array - $arSelect: Array of arrays. array( //for each union part one
      1. => array( - //foreach triple pattern - 0 => array( - '?person' => array( - 't0.subject as "t0.subject"' - ) - )
      ) )
    • -
    - - -
    - -
    - -
    - createSql (line 150) -
    - - -

    Creates an SQL query string from the given Sparql query object.

    -
      -
    • return: Array of arrays of SQL query string parts: select, from and where
    • -
    • throws: SparqlEngineDb_SqlGeneratorException If there is no variable in the result set.
    • -
    - -
    - array - - createSql - - () -
    - - - -
    - -
    - -
    - fixWhere (line 833) -
    - - -

    Removes a leading AND from the where clause which would render the sql illegal.

    -
      -
    • access: protected
    • -
    - -
    - void - - fixWhere - - ( $strWhere) -
    - -
      -
    • - - $strWhere
    • -
    - - -
    - -
    - -
    - getPlaceholders (line 758) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getPlaceholders - - () -
    - - - -
    - -
    - -
    - getPreparedVariablePlaceholder (line 746) -
    - - -

    Returns a placeholder to be included in the sql statement.

    -

    It will be replaced with a real prepared statement variable later on. Also adds it to the internal placeholder array.

    -
      -
    • return: placeholder
    • -
    • access: protected
    • -
    - -
    - string - - getPreparedVariablePlaceholder - - (string $strVariable) -
    - -
      -
    • - string - $strVariable: The variable to get a placeholder for
    • -
    - - -
    - -
    - -
    - getSqlCondition (line 558) -
    - - -

    Creates an SQL statement that checks for the value of some subject/predicate/object

    -
      -
    • return: Part of the SQL query (prefixed with AND)
    • -
    - -
    - string - - getSqlCondition - - (mixed $bject, string $strTablePrefix, string $strType) -
    - -
      -
    • - mixed - $bject: subject|predicate|object
    • -
    • - string - $strTablePrefix: Table prefix (e.g. "t0")
    • -
    • - string - $strType: Type of $bject ('subject'|'predicate'|'object')
    • -
    - - -
    - -
    - -
    - getSqlVariableName (line 844) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableName - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameDatatype (line 886) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameDatatype - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameIs (line 868) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameIs - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameLanguage (line 877) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameLanguage - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameValue (line 859) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameValue - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getTripleSql (line 286) -
    - - -

    Creates some SQL statements from the given triple pattern array.

    -
      -
    • return: Array consisting of on array and two string values: SELECT, FROM and WHERE part
    • -
    - -
    - array - - getTripleSql - - (QueryTriple $triple, GraphPattern $graphPattern,  $arResultVars) -
    - -
      -
    • - QueryTriple - $triple: Array containing subject, predicate and object
    • -
    • - GraphPattern - $graphPattern: Graph pattern object
    • -
    • - - $arResultVars
    • -
    - - -
    - -
    - -
    - getUsedVarAssignments (line 772) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getUsedVarAssignments - - () -
    - - - -
    - -
    - -
    - getUsedVarTypes (line 779) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getUsedVarTypes - - () -
    - - - -
    - -
    - -
    - getVarAssignments (line 765) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getVarAssignments - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:24 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGeneratorException.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGeneratorException.html.svn-base deleted file mode 100755 index 89d54c59..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlGeneratorException.html.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlGeneratorException - - - - -
    -

    Class SparqlEngineDb_SqlGeneratorException

    - - -
    -
    Description
    - -
    - -

    Exception when generating the SQL statement

    - -

    - Located in /sparql/SparqlEngineDb/SqlGeneratorException.php (line 9) -

    - - -
    Exception
    -   |
    -   --SparqlEngineDb_SqlGeneratorException
    - -
    -
    - - - - - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Exception (Internal Class)

    -
    - - $code
    -
    - - $file
    -
    - - $line
    -
    - - $message
    -
    - - $string
    -
    - - $trace
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Exception (Internal Class)

    -
    - constructor __construct ( )
    - getCode ( )
    - getFile ( )
    - getLine ( )
    - getMessage ( )
    - getTrace ( )
    - getTraceAsString ( )
    - __clone ( )
    - __toString ( )
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlMerger.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlMerger.html.svn-base deleted file mode 100755 index 7624c2bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_SqlMerger.html.svn-base +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlMerger - - - - -
    -

    Class SparqlEngineDb_SqlMerger

    - - -
    -
    Description
    - -
    - -

    Creates an sql string from an sql array

    - -

    - Located in /sparql/SparqlEngineDb/SqlMerger.php (line 10) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - getCount - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
    - static void - getSelect - (Query $query,  $arSqls, [ $strAdditional = '']) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static getCount (line 30) -
    - - -
      -
    • access: public
    • -
    - -
    - static void - - getCount - - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
      -
    • - Query - $query
    • -
    • - - $arSqls
    • -
    • - - $strAdditional
    • -
    - - -
    - -
    - -
    - static getSelect (line 12) -
    - - -
      -
    • access: public
    • -
    - -
    - static void - - getSelect - - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
      -
    • - Query - $query
    • -
    • - - $arSqls
    • -
    • - - $strAdditional
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_TypeSorter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_TypeSorter.html.svn-base deleted file mode 100755 index 5b677cf9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngineDb_TypeSorter.html.svn-base +++ /dev/null @@ -1,724 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_TypeSorter - - - - -
    -

    Class SparqlEngineDb_TypeSorter

    - - -
    -
    Description
    - -
    - -

    Sorts database types as the Sparql specs want it.

    - -

    - Located in /sparql/SparqlEngineDb/TypeSorter.php (line 9) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $arCastTypes -
    -
    - static array - $arTypeNumbers -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static int - compareXsdType - (string $strType1, string $strType2) -
    - -
    - static string - getCastMethod - (string $strType, string $strSqlVar) -
    - -
    - static int - getXsdTypeNumber - (string $strType) -
    - -
    - SparqlEngineDb_TypeSorter - __construct - (Query $query,  $dbConn) -
    - -
    - int - compareTypeSet - (array $arTs1, array $arTs2) -
    - -
    - array - getOrderifiedSqls - ( $arSqls, string $strSelect, string $strFrom, string $strWhere) -
    - -
    - array - getSpecialOrderVariables - () -
    - -
    - string - getSqlOrderBy - ([arrray $arTypeSet = array()]) -
    - -
    - void - getStringNullComparison - ( $str) -
    - -
    - array - getTypeSets - (array $arSpecialVars, string $strFrom, string $strWhere) -
    - -
    - string - getTypesetWhereClause - (array $arTypeSet) -
    - -
    - boolean - isSpecialOrderVariable - (string $strVar) -
    - -
    - array - orderTypeSets - (array $arTypes) -
    - -
    - void - setData - (SparqlEngineDb_SqlGenerator $sg) -
    - -
    - boolean - willBeDataDependent - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $arCastTypes - = array( -
    'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER' -
    )
    (line 28) -
    -
    - - -

    SQL types to cast XSD schema types to, so that they will get sorted correctly.

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - static array - $arTypeNumbers - = array( -
    null => 0,//empty -
    'b' => 1,//blank -
    'r' => 2,//resource -
    'l' => 3,//literal -
    )
    (line 16) -
    -
    - - -

    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.

    -
      -
    • access: public
    • -
    - - - - - -
    - - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static compareXsdType (line 310) -
    - - -

    Compares two XSD data types and returns the comparison number.

    -
      -
    • return: Comparison number (<0 if $strType1 is less than $strType2, 0 if equal, >0 if type2 is greater)
    • -
    • access: public
    • -
    - -
    - static int - - compareXsdType - - (string $strType1, string $strType2) -
    - -
      -
    • - string - $strType1: First data type
    • -
    • - string - $strType2: Second data type
    • -
    - - -
    - -
    - -
    - static getCastMethod (line 383) -
    - - -

    Returns the SQL statement needed to case the given variable to the given type.

    -
      -
    • return: SQL command to cast the variable
    • -
    • access: protected
    • -
    - -
    - static string - - getCastMethod - - (string $strType, string $strSqlVar) -
    - -
      -
    • - string - $strType: XML data type
    • -
    • - string - $strSqlVar: SQL variable name
    • -
    - - -
    - -
    - -
    - static getXsdTypeNumber (line 323) -
    - - -

    Returns the type number for an xsd data type.

    -
      -
    • return: Some integer to compare two types.
    • -
    • access: public
    • -
    - -
    - static int - - getXsdTypeNumber - - (string $strType) -
    - -
      -
    • - string - $strType: XSD data type
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 34) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_TypeSorter - - __construct - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - compareTypeSet (line 273) -
    - - -

    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()

    -
      -
    • return: Comparison value
    • -
    • access: public
    • -
    - -
    - int - - compareTypeSet - - (array $arTs1, array $arTs2) -
    - -
      -
    • - array - $arTs1: First typeset
    • -
    • - array - $arTs2: Second typeset
    • -
    - - -
    - -
    - -
    - getOrderifiedSqls (line 81) -
    - - -

    Returns an array of sql statements that need to be executed and deliver the full result set when combined.

    -

    Execute setData() before this.

    -
      -
    • return: Array of arrays. Imploding an array will give a complete sql statement. The array will have the keys select/from/where/order.
    • -
    • access: public
    • -
    - -
    - array - - getOrderifiedSqls - - ( $arSqls, string $strSelect, string $strFrom, string $strWhere) -
    - -
      -
    • - string - $strSelect: SELECT clause
    • -
    • - string - $strFrom: FROM clause
    • -
    • - string - $strWhere: WHERE clause
    • -
    • - - $arSqls
    • -
    - - -
    - -
    - -
    - getSpecialOrderVariables (line 156) -
    - - -

    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)

    -
      -
    • return: Array of sparql variable names
    • -
    • access: protected
    • -
    - -
    - array - - getSpecialOrderVariables - - () -
    - - - -
    - -
    - -
    - getSqlOrderBy (line 347) -
    - - -

    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.

    -
      -
    • return: ORDER BY ... string or empty string
    • -
    - -
    - string - - getSqlOrderBy - - ([arrray $arTypeSet = array()]) -
    - -
      -
    • - arrray - $arTypeSet: Single typeset
    • -
    - - -
    - -
    - -
    - getStringNullComparison (line 430) -
    - - -

    Returns the correct sql string comparison method.

    -
      -
    • access: protected
    • -
    - -
    - void - - getStringNullComparison - - ( $str) -
    - -
      -
    • - - $str
    • -
    - - -
    - -
    - -
    - getTypeSets (line 205) -
    - - -

    Determines the type sets in the query results.

    -

    A type set is a distinct set of variables and their types, e.g. the variable and its type (r/b/l) and its datatype if its an object.

    -
      -
    • return: Key is the sparql variable name, value is an array. This one has one key 'type' with a value of b/l/r. It might have another key 'datatype' with the resource's datatype.
    • -
    • access: protected
    • -
    - -
    - array - - getTypeSets - - (array $arSpecialVars, string $strFrom, string $strWhere) -
    - -
      -
    • - array - $arSpecialVars: Special variables as returned by getSpecialOrderVariables()
    • -
    • - string - $strFrom: FROM part of the sql query
    • -
    • - string - $strWhere: WHERE part of the sql query
    • -
    - - -
    - -
    - -
    - getTypesetWhereClause (line 403) -
    - - -

    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.

    -
      -
    • return: Clauses for the WHERE part in an SQL query
    • -
    • access: protected
    • -
    - -
    - string - - getTypesetWhereClause - - (array $arTypeSet) -
    - -
      -
    • - array - $arTypeSet: Typeset
    • -
    - - -
    - -
    - -
    - isSpecialOrderVariable (line 181) -
    - - -

    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.

    -
      -
    • return: true if the variable needs special care
    • -
    • access: protected
    • -
    - -
    - boolean - - isSpecialOrderVariable - - (string $strVar) -
    - -
      -
    • - string - $strVar: SPARQL variable name
    • -
    - - -
    - -
    - -
    - orderTypeSets (line 247) -
    - - -

    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.

    -
      -
    • return: Ordered array of type sets
    • -
    • access: protected
    • -
    - -
    - array - - orderTypeSets - - (array $arTypes) -
    - -
      -
    • - array - $arTypes: Array of type sets
    • -
    - - -
    - -
    - -
    - setData (line 46) -
    - - -

    Needs to be executed before getOrderifiedSqls and willBeDataDependent

    -
      -
    • access: public
    • -
    - -
    - void - - setData - - (SparqlEngineDb_SqlGenerator $sg) -
    - - - - -
    - -
    - -
    - willBeDataDependent (line 138) -
    - - -

    Returns wether the returned queries will depend on the data or not.

    -

    If the queries depend on the data, they cannot be prepare()d and thus won't be that fast when executing.

    Execute setData() before this.

    -
      -
    • access: public
    • -
    - -
    - boolean - - willBeDataDependent - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_PreparedStatement.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_PreparedStatement.html.svn-base deleted file mode 100755 index 7d8fdcdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_PreparedStatement.html.svn-base +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - Docs For Class SparqlEngine_PreparedStatement - - - - -
    -

    Class SparqlEngine_PreparedStatement

    - - -
    -
    Description
    - -
    - -

    A prepared statement that can be execute()d later multiple times with different variable values.

    -

    - Located in /sparql/SparqlEngine/PreparedStatement.php (line 8) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    SparqlEngineDb_PreparedStatement - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - execute - ( $arVariables,  $resultform) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - execute (line 10) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - execute - - ( $arVariables,  $resultform) -
    - -
      -
    • - - $arVariables
    • -
    • - - $resultform
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultConverter.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultConverter.html.svn-base deleted file mode 100755 index 82b101bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultConverter.html.svn-base +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultConverter - - - - -
    -

    Class SparqlEngine_ResultConverter

    - - -
    -
    Description
    - -
    - -

    Converts a memory result into a proper rdf statement triple array

    - -

    - Located in /sparql/SparqlEngine/ResultConverter.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - convertFromResult - (array $arVartable, SparqlEngine $engine, [mixed $resultform = false]) -
    - -
    - static mixed - loadClass - (string $strClass) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static convertFromResult (line 30) -
    - - -

    Determines the correct renderer and calls it.

    -

    The $resultform may be:

    • false: The default renderer is taken then
    • an object that implements SparqlEngine_ResultRenderer interface
    • a string like "HTML" or "XML". The appropriate renderer is used then.
    • a full class name, e.g. SparqlEngine_ResultRenderer_XML

    -
      -
    • return: Most likely an array or a boolean value, or anything else as determined by $resultform
    • -
    • access: public
    • -
    - -
    - static mixed - - convertFromResult - - (array $arVartable, SparqlEngine $engine, [mixed $resultform = false]) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - SparqlEngine - $engine: Sparql database engine.
    • -
    • - mixed - $resultform: Which format the results shall be in (false or "xml")
    • -
    - - -
    - -
    - -
    - static loadClass (line 84) -
    - - -

    Tries to load a given class if it doesn't exist, and returns true if the class can be used.

    -
      -
    • return: Class name if the class is loaded and can be used, false if not.
    • -
    • access: protected
    • -
    - -
    - static mixed - - loadClass - - (string $strClass) -
    - -
      -
    • - string - $strClass: Classname
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer.html.svn-base deleted file mode 100755 index 24a52f54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer.html.svn-base +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer - - - - -
    -

    Interface SparqlEngine_ResultRenderer

    - - -
    -
    Description
    - -
    - -

    Result renderer interface that any result renderer needs to implement.

    -

    A result renderer converts results into a

    • for the user - usable result format, e.g. php arrays, xml, json and
    so on.

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 24) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_Default.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_Default.html.svn-base deleted file mode 100755 index 18af0be6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_Default.html.svn-base +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_Default - - - - -
    -

    Class SparqlEngine_ResultRenderer_Default

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Default result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/Default.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - constructGraph - (array $arVartable, GraphPattern $constructPattern) -
    - -
    - mixed - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - MemModel - describeGraph - (array $arVartable) -
    - -
    - String - _determineType - (Node $var, MemModel $resultGraph) -
    - -
    - void - _getAttributes - (Array $list, MemModel $resultGraph,  $varvalue) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - constructGraph (line 78) -
    - - -

    Constructs a result graph.

    -
      -
    • return: The result graph which matches the CONSTRUCT pattern
    • -
    - -
    - MemModel - - constructGraph - - (array $arVartable, GraphPattern $constructPattern) -
    - -
      -
    • - array - $arVartable: A table containing the result vars and their bindings
    • -
    • - GraphPattern - $constructPattern: The CONSTRUCT pattern
    • -
    - - -
    - -
    - -
    - convertFromResult (line 23) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: Most likely an array
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - describeGraph (line 134) -
    - - -

    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php

    - -
    - MemModel - - describeGraph - - (array $arVartable) -
    - -
      -
    • - array - $arVartable
    • -
    - - -
    - -
    - -
    - _determineType (line 179) -
    - - -

    Tries to determine the rdf:type of the variable.

    -
      -
    • return: Uri of the rdf:type
    • -
    • access: protected
    • -
    - -
    - String - - _determineType - - (Node $var, MemModel $resultGraph) -
    - -
      -
    • - Node - $var: The variable
    • -
    • - MemModel - $resultGraph: The result graph which describes the Resource
    • -
    - - -
    - -
    - -
    - _getAttributes (line 228) -
    - - -

    Search the attributes listed in $list in the dataset.

    -

    Modifies $resultGraph

    -
      -
    • access: protected
    • -
    - -
    - void - - _getAttributes - - (Array $list, MemModel $resultGraph,  $varvalue) -
    - -
      -
    • - Array - $list: List containing the attributes
    • -
    • - MemModel - $resultGraph: The result graph which describes the Resource
    • -
    • - - $varvalue
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_HTML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_HTML.html.svn-base deleted file mode 100755 index a228964e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_HTML.html.svn-base +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_HTML - - - - -
    -

    Class SparqlEngine_ResultRenderer_HTML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    XML result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/HTML.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - boolean - $bWrap -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - string - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - void - createTableFromRecords - ( $arVartable) -
    - -
    - string - createValue - ( $value, ADORecordSet $dbRecordSet, string $strVarBase) -
    - -
    - void - getHtmlBlank - ( $value) -
    - -
    - void - getHtmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getHtmlNull - () -
    - -
    - void - getHtmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - boolean - $bWrap - = true (line 19) - -
    - - -

    If the result HTML should be wrapped in a div

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 32) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: HTML result
    • -
    • access: public
    • -
    - -
    - string - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createTableFromRecords (line 88) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTableFromRecords - - ( $arVartable) -
    - -
      -
    • - - $arVartable
    • -
    - - -
    - -
    - -
    - createValue (line 138) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createValue - - ( $value, ADORecordSet $dbRecordSet, string $strVarBase) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlBlank (line 170) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlLiteral (line 184) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getHtmlNull (line 163) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlNull - - () -
    - - - -
    - -
    - -
    - getHtmlResource (line 177) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 74) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_XML.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_XML.html.svn-base deleted file mode 100755 index c489a815..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlEngine_ResultRenderer_XML.html.svn-base +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_XML - - - - -
    -

    Class SparqlEngine_ResultRenderer_XML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    XML result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/XML.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - string - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - String - _getBindingString - (String $varname, Node $varvalue) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 23) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: XML result
    • -
    • access: public
    • -
    - -
    - string - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - _getBindingString (line 92) -
    - - -

    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.

    -
      -
    • return: The xml string
    • -
    • access: protected
    • -
    - -
    - String - - _getBindingString - - (String $varname, Node $varvalue) -
    - -
      -
    • - String - $varname: The variables name
    • -
    • - Node - $varvalue: The value of the variable
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParser.html.svn-base deleted file mode 100755 index fe01bc9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParser.html.svn-base +++ /dev/null @@ -1,1640 +0,0 @@ - - - - - - Docs For Class SparqlParser - - - - -
    -

    Class SparqlParser

    - - -
    -
    Description
    - -
    - -

    Parses a SPARQL Query string and returns a Query Object.

    - -

    - Located in /sparql/SparqlParser.php (line 21) -

    - - -
    Object
    -   |
    -   --SparqlParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $operatorPrecedence -
    -
    - static array - $sops -
    -
    - Query - $query -
    -
    - string - $querystring -
    -
    - int - $tmp -
    -
    - array - $tokens -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - balanceTree - ( &$tree, array $tree) -
    - -
    - static void - fixNegationInFuncName - ( &$tree) -
    - -
    - SparqlParser - SparqlParser - () -
    - -
    - boolean - bNodeCheck - (String $token) -
    - -
    - void - checkDtypeLang - ( &$node, String $node) -
    - -
    - boolean - dtypeCheck - ( &$node, String $node) -
    - -
    - String - error - (SparqlException $e) -
    - -
    - boolean - iriCheck - (String $token) -
    - -
    - boolean - literalCheck - (String $token) -
    - -
    - Query - parse - ([String $queryString = false]) -
    - -
    - void - parseAsk - (string $form) -
    - -
    - void - parseBase - () -
    - -
    - void - parseBrackettedExpression - ( &$constraint, Constraint $constraint) -
    - -
    - Node - parseCollection - ( &$trp, TriplePattern $trp) -
    - -
    - void - parseConstraint - ( &$pattern, boolean $outer, GraphPattern $pattern) -
    - -
    - array - parseConstraintTree - ([ $nLevel = 0], [ $bParameter = false]) -
    - -
    - void - parseConstruct - () -
    - -
    - void - parseDescribe - () -
    - -
    - void - parseExpression - ( &$constraint, Constraint $constrain) -
    - -
    - void - parseFrom - () -
    - -
    - void - parseGraph - (GraphPattern $pattern) -
    - -
    - void - parseGraphPattern - ([int $optional = false], [int $union = false], [string $graph = false], [boolean $constr = false], [ $external = false]) -
    - -
    - void - parseLiteral - ( &$node, String $sep, String $node) -
    - -
    - void - parseModifier - () -
    - -
    - Node - parseNode - ([String $node = false]) -
    - -
    - void - parseOrderCondition - () -
    - -
    - void - parsePrefix - () -
    - -
    - void - parseQuery - () -
    - -
    - void - parseSelect - () -
    - -
    - void - parseTriplePattern - ( &$pattern, GraphPattern $pattern) -
    - -
    - void - parseWhere - () -
    - -
    - void - prepare - () -
    - -
    - boolean - qnameCheck - (String $token) -
    - -
    - void - tokenize - (String $queryString) -
    - -
    - String - uncomment - (String $queryString) -
    - -
    - boolean - varCheck - (String $token) -
    - -
    - void - _fastForward - () -
    - -
    - void - _rewind - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $operatorPrecedence - = array( -
    '||' => 0, -
    '&&' => 1, -
    '=' => 2, -
    '!=' => 3, -
    '<' => 4, -
    '>' => 5, -
    '<=' => 6, -
    '>=' => 7, -
    '*' => 0, -
    '/' => 0, -
    '+' => 0, -
    '-' => 0, -
    )
    (line 69) -
    -
    - - -

    Which order operators are to be treated.

    -

    (11.3 Operator Mapping)

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $sops - = array( -
    'regex', -
    'bound', -
    'isuri', -
    'isblank', -
    'isliteral', -
    'str', -
    'lang', -
    'datatype', -
    'langmatches' -
    )
    (line 52) -
    -
    - - -

    Operators introduced by sparql

    -
      -
    • access: protected
    • -
    - - - - - -
    - - -
    - -
    - - Query - $query - (line 28) - -
    - - -

    The query Object

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - string - $querystring - (line 34) - -
    - - -

    The Querystring

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $tmp - (line 46) - -
    - - -

    Last parsed graphPattern

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $tokens - = array() (line 40) - -
    - - -

    The tokenized Query

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static balanceTree (line 960) -
    - - -

    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.

    -
      -
    • access: protected
    • -
    - -
    - static void - - balanceTree - - ( &$tree, array $tree) -
    - -
      -
    • - array - $tree: Tree to be modified
    • -
    • - - &$tree
    • -
    - - -
    - -
    - -
    - static fixNegationInFuncName (line 983) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - fixNegationInFuncName - - ( &$tree) -
    - -
      -
    • - - &$tree
    • -
    - - -
    - -
    - -
    - Constructor SparqlParser (line 89) -
    - - -

    Constructor of SparqlParser

    -
      -
    • access: public
    • -
    - -
    - SparqlParser - - SparqlParser - - () -
    - - - -
    - -
    - -
    - bNodeCheck (line 478) -
    - - -

    Checks if $token is a Blanknode.

    -
      -
    • return: TRUE if the token is BNode false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - bNodeCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - checkDtypeLang (line 1287) -
    - - -

    Checks if there is a datatype given and appends it to the node.

    -
      -
    • access: protected
    • -
    - -
    - void - - checkDtypeLang - - ( &$node, String $node) -
    - -
      -
    • - String - $node
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - dtypeCheck (line 1338) -
    - - -

    Checks if the Node is a typed Literal.

    -
      -
    • return: TRUE if typed FALSE if not
    • -
    • access: protected
    • -
    - -
    - boolean - - dtypeCheck - - ( &$node, String $node) -
    - -
      -
    • - String - $node
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - error (line 1399) -
    - - -

    Error reporting.

    -
      -
    • access: protected
    • -
    - -
    - String - - error - - (SparqlException $e) -
    - -
      -
    • - SparqlException - $e
    • -
    - - -
    - -
    - -
    - iriCheck (line 464) -
    - - -

    Checks if $token is an IRI.

    -
      -
    • return: TRUE if the token is an IRI false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - iriCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - literalCheck (line 517) -
    - - -

    Checks if $token is a Literal.

    -
      -
    • return: TRUE if the token is a Literal false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - literalCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - parse (line 102) -
    - - -

    Main function of SparqlParser. Parses a query string.

    -
      -
    • return: The query object
    • -
    • throws: SparqlParserException
    • -
    • access: public
    • -
    - -
    - Query - - parse - - ([String $queryString = false]) -
    - -
      -
    • - String - $queryString: The SPARQL query
    • -
    - - -
    - -
    - -
    - parseAsk (line 368) -
    - - -

    Sets result form to 'ASK' and 'COUNT'.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseAsk - - (string $form) -
    - -
      -
    • - string - $form: if it's an ASK or COUNT query
    • -
    - - -
    - -
    - -
    - parseBase (line 246) -
    - - -

    Parses the BASE part of the query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseBase - - () -
    - - - -
    - -
    - -
    - parseBrackettedExpression (line 1006) -
    - - -

    Parses a bracketted expression.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseBrackettedExpression - - ( &$constraint, Constraint $constraint) -
    - -
      -
    • - Constraint - $constraint
    • -
    • - - &$constraint
    • -
    - - -
    - -
    - -
    - parseCollection (line 1376) -
    - - -

    Parses an RDF collection.

    -
      -
    • return: The first parsed label
    • -
    • access: protected
    • -
    - -
    - Node - - parseCollection - - ( &$trp, TriplePattern $trp) -
    - -
      -
    • - TriplePattern - $trp
    • -
    • - - &$trp
    • -
    - - -
    - -
    - -
    - parseConstraint (line 728) -
    - - -

    Parses a value constraint.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseConstraint - - ( &$pattern, boolean $outer, GraphPattern $pattern) -
    - -
      -
    • - GraphPattern - $pattern
    • -
    • - boolean - $outer: If the constraint is an outer one.
    • -
    • - - &$pattern
    • -
    - - -
    - -
    - -
    - parseConstraintTree (line 788) -
    - - -

    Parses a constraint string recursively.

    -

    The result array is one "element" which may contain subelements. All elements have one key "type" that determines which other array keys the element array has. Valid types are:

    • "value": - Just a plain value with a value key, nothing else
    • "function" - A function has a name and an array of parameter(s). Each parameter - is an element.
    • "equation" - An equation has an operator, and operand1 and operand2 which - are elements themselves
    Any element may have the "negated" value set to true, which means that is is - negated (!).

    -
      -
    • return: Nested tree array representing the filter
    • -
    • access: protected
    • -
    - -
    - array - - parseConstraintTree - - ([ $nLevel = 0], [ $bParameter = false]) -
    - -
      -
    • - - $nLevel
    • -
    • - - $bParameter
    • -
    - - -
    - -
    - -
    - parseConstruct (line 413) -
    - - -

    Parses the CONSTRUCT clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseConstruct - - () -
    - - - -
    - -
    - -
    - parseDescribe (line 347) -
    - - -

    Adds a new variable to the query and sets result form to 'DESCRIBE'.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseDescribe - - () -
    - - - -
    - -
    - -
    - parseExpression (line 1046) -
    - - -

    Parses an expression.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseExpression - - ( &$constraint, Constraint $constrain) -
    - -
      -
    • - Constraint - $constrain
    • -
    • - - &$constraint
    • -
    - - -
    - -
    - -
    - parseFrom (line 383) -
    - - -

    Parses the FROM clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseFrom - - () -
    - - - -
    - -
    - -
    - parseGraph (line 1076) -
    - - -

    Parses a GRAPH clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseGraph - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - parseGraphPattern (line 559) -
    - - -

    Parses a graph pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseGraphPattern - - ([int $optional = false], [int $union = false], [string $graph = false], [boolean $constr = false], [ $external = false]) -
    - -
      -
    • - int - $optional: Optional graph pattern
    • -
    • - int - $union: Union graph pattern
    • -
    • - string - $graph: Graphname
    • -
    • - boolean - $constr: TRUE if the pattern is a construct pattern
    • -
    • - - $external
    • -
    - - -
    - -
    - -
    - parseLiteral (line 1323) -
    - - -

    Parses a literal.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseLiteral - - ( &$node, String $sep, String $node) -
    - -
      -
    • - String - $node
    • -
    • - String - $sep: used separator " or '
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - parseModifier (line 1102) -
    - - -

    Parses the solution modifiers of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseModifier - - () -
    - - - -
    - -
    - -
    - parseNode (line 1194) -
    - - -

    Parses a String to an RDF node.

    -
      -
    • return: The parsed RDF node
    • -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - Node - - parseNode - - ([String $node = false]) -
    - -
      -
    • - String - $node
    • -
    - - -
    - -
    - -
    - parseOrderCondition (line 1136) -
    - - -

    Parses order conditions of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseOrderCondition - - () -
    - - - -
    - -
    - -
    - parsePrefix (line 270) -
    - - -

    Adds a new namespace prefix to the query object.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parsePrefix - - () -
    - - - -
    - -
    - -
    - parseQuery (line 196) -
    - - -

    Starts parsing the tokenized SPARQL Query.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseQuery - - () -
    - - - -
    - -
    - -
    - parseSelect (line 297) -
    - - -

    Parses the SELECT part of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseSelect - - () -
    - - - -
    - -
    - -
    - parseTriplePattern (line 619) -
    - - -

    Parses a triple pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseTriplePattern - - ( &$pattern, GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - parseWhere (line 432) -
    - - -

    Parses the WHERE clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseWhere - - () -
    - - - -
    - -
    - -
    - prepare (line 133) -
    - - -

    Set all internal variables to a clear state before we start parsing.

    -
      -
    • access: protected
    • -
    - -
    - void - - prepare - - () -
    - - - -
    - -
    - -
    - qnameCheck (line 493) -
    - - -

    Checks if $token is a qname.

    -
      -
    • return: TRUE if the token is a qname false if not
    • -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - boolean - - qnameCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - tokenize (line 152) -
    - - -

    Tokenizes the querystring.

    -
      -
    • access: protected
    • -
    - -
    - void - - tokenize - - (String $queryString) -
    - -
      -
    • - String - $queryString
    • -
    - - -
    - -
    - -
    - uncomment (line 181) -
    - - -

    Removes comments in the query string. Comments are indicated by '#'.

    -
      -
    • return: The uncommented query string
    • -
    • access: protected
    • -
    - -
    - String - - uncomment - - (String $queryString) -
    - -
      -
    • - String - $queryString
    • -
    - - -
    - -
    - -
    - varCheck (line 449) -
    - - -

    Checks if $token is a variable.

    -
      -
    • return: TRUE if the token is a variable false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - varCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - _fastForward (line 529) -
    - - -

    FastForward until next token which is not blank.

    -
      -
    • access: protected
    • -
    - -
    - void - - _fastForward - - () -
    - - - -
    - -
    - -
    - _rewind (line 542) -
    - - -

    Rewind until next token which is not blank.

    -
      -
    • access: protected
    • -
    - -
    - void - - _rewind - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParserException.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParserException.html.svn-base deleted file mode 100755 index ff68e0eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlParserException.html.svn-base +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Docs For Class SparqlParserException - - - - -
    -

    Class SparqlParserException

    - - -
    -
    Description
    - -
    - -

    A SPARQL Parser Execption for better errorhandling.

    - -

    - Located in /sparql/SparqlParserException.php (line 13) -

    - - -
    Exception
    -   |
    -   --SparqlParserException
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlParserException - __construct - ( $message, [ $code = 0],  $pointer) -
    - -
    - int - getPointer - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Exception (Internal Class)

    -
    - - $code
    -
    - - $file
    -
    - - $line
    -
    - - $message
    -
    - - $string
    -
    - - $trace
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlParserException - - __construct - - ( $message, [ $code = 0],  $pointer) -
    - -
      -
    • - - $message
    • -
    • - - $code
    • -
    • - - $pointer
    • -
    - - -
    - -
    - -
    - getPointer (line 27) -
    - - -

    Returns a pointer to the token which caused the exception.

    -
      -
    • access: public
    • -
    - -
    - int - - getPointer - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Exception (Internal Class)

    -
    - constructor __construct ( )
    - getCode ( )
    - getFile ( )
    - getLine ( )
    - getMessage ( )
    - getTrace ( )
    - getTraceAsString ( )
    - __clone ( )
    - __toString ( )
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlResultParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlResultParser.html.svn-base deleted file mode 100755 index 9dc683b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/SparqlResultParser.html.svn-base +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - Docs For Class SparqlResultParser - - - - -
    -

    Class SparqlResultParser

    - - -
    -
    Description
    - -
    - -

    Parses an xml document in SPARQL Result XML Format.

    - -

    - Located in /syntax/SparqlResultParser.php (line 15) -

    - - -
    Object
    -   |
    -   --SparqlResultParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $arrOutput -
    -
    - mixed - $bncounter -
    -
    - mixed - $counter -
    -
    - mixed - $current_literal -
    -
    - mixed - $dtype -
    -
    - mixed - $lang -
    -
    - mixed - $mode -
    -
    - mixed - $resParser -
    -
    - mixed - $strXmlData -
    -
    - mixed - $varlist -
    -
    - mixed - $varname -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - parse - (String $strInputXML) -
    - -
    - void - tagClosed - ( $parser,  $name) -
    - -
    - void - tagData - ( $parser,  $tagData) -
    - -
    - void - tagOpen - ( $parser,  $name,  $attrs) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $arrOutput - = array() (line 18) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $bncounter - = 0 (line 27) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $counter - = -1 (line 21) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $current_literal - (line 28) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $dtype - (line 24) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $lang - (line 25) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $mode - = -1 (line 22) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resParser - (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $strXmlData - (line 20) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $varlist - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $varname - (line 23) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - parse (line 36) -
    - - -

    Main function of SparqlResultParser

    - -
    - void - - parse - - (String $strInputXML) -
    - -
      -
    • - String - $strInputXML: input document.
    • -
    - - -
    - -
    - -
    - tagClosed (line 150) -
    - - - -
    - void - - tagClosed - - ( $parser,  $name) -
    - -
      -
    • - - $parser
    • -
    • - - $name
    • -
    - - -
    - -
    - -
    - tagData (line 122) -
    - - - -
    - void - - tagData - - ( $parser,  $tagData) -
    - -
      -
    • - - $parser
    • -
    • - - $tagData
    • -
    - - -
    - -
    - -
    - tagOpen (line 61) -
    - - - -
    - void - - tagOpen - - ( $parser,  $name,  $attrs) -
    - -
      -
    • - - $parser
    • -
    • - - $name
    • -
    • - - $attrs
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---ClientQuery.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---ClientQuery.php.html.svn-base deleted file mode 100755 index e157776c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---ClientQuery.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ClientQuery.php - - - - -
    -

    /sparql/ClientQuery.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ClientQuery - - ClientQuery Object to run a SPARQL Query against a SPARQL server. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Constraint.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Constraint.php.html.svn-base deleted file mode 100755 index bd3c2fc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Constraint.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Constraint.php - - - - -
    -

    /sparql/Constraint.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Constraint - - Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---FilterFunctions.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---FilterFunctions.php.html.svn-base deleted file mode 100755 index 5822c3ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---FilterFunctions.php.html.svn-base +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - Docs for page FilterFunctions.php - - - - -
    -

    /sparql/FilterFunctions.php

    - - -
    -
    Description
    - -
    - -

    List of functions used to evaluate the FILTER statements in SPARQL queries.

    - - -
    -
    - - - - - - -
    -
    Functions
    - -
    - -
    - -
    - dateTime (line 46) -
    - - -

    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.

    -
      -
    • return: the corresponding unix timestamp
    • -
    - -
    - integer - - dateTime - - (String $string) -
    - -
      -
    • - String - $string: the date string
    • -
    - - -
    - -
    - -
    - lang (line 122) -
    - - -

    Evaluates the lang() function. Returns lang tag of a Literal.

    -
      -
    • return: the lang tag or false if there is no language tag.
    • -
    - -
    - String - - lang - - (String $string) -
    - -
      -
    • - String - $string: the string.
    • -
    - - -
    - -
    - -
    - langMatches (line 66) -
    - - -

    Evaluates the langMatches() function. Return true if the lang tag matches false if not.

    - -
    - boolean - - langMatches - - (String $lang_range, String $lang_tag) -
    - -
      -
    • - String - $lang_range: the string.
    • -
    • - String - $lang_tag: the regex pattern
    • -
    - - -
    - -
    - -
    - regex (line 23) -
    - - -

    Evaluates the regex() function. Returns true if the regex is matched false if not.

    - -
    - boolean - - regex - - (String $string, String $pattern, [String $flags = '']) -
    - -
      -
    • - String - $string: the string which has to be evaluated
    • -
    • - String - $pattern: the regex pattern
    • -
    • - String - $flags: additional flags like "i"
    • -
    - - -
    - -
    - -
    - str (line 99) -
    - - -

    Evaluates the str() function. Returns the string representation of a variable or RDF term.

    - -
    - boolean - - str - - (String $string) -
    - -
      -
    • - String - $string: the string
    • -
    - - -
    -
    -
    - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---GraphPattern.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---GraphPattern.php.html.svn-base deleted file mode 100755 index c30cbede..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---GraphPattern.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page GraphPattern.php - - - - -
    -

    /sparql/GraphPattern.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - GraphPattern - - A graph pattern which consists of triple patterns, optional or union graph patterns and filters. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Query.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Query.php.html.svn-base deleted file mode 100755 index 6486508b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---Query.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Query.php - - - - -
    -

    /sparql/Query.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Query - - The Class Query represents a SPARQL query. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/GraphPattern.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---QueryTriple.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---QueryTriple.php.html.svn-base deleted file mode 100755 index 2cddd80e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---QueryTriple.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page QueryTriple.php - - - - -
    -

    /sparql/QueryTriple.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - QueryTriple - - Represents a query triple. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlClient.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlClient.php.html.svn-base deleted file mode 100755 index caadd7fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlClient.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlClient.php - - - - -
    -

    /sparql/SparqlClient.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlClient - - Client for querying a sparql server. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base deleted file mode 100755 index 16ac9910..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---PreparedStatement.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page PreparedStatement.php - - - - -
    -

    /sparql/SparqlEngine/PreparedStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_PreparedStatement - - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base deleted file mode 100755 index 82ee667c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultConverter.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ResultConverter.php - - - - -
    -

    /sparql/SparqlEngine/ResultConverter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultConverter - - Converts a memory result into a proper rdf statement triple array -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base deleted file mode 100755 index 1b5e99db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---Default.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Default.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/Default.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_Default - - Default result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base deleted file mode 100755 index 4879d488..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---HTML.php.html.svn-base +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - Docs for page HTML.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/HTML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_HTML - - XML result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/RdfUtil.php') - (line 3) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base deleted file mode 100755 index a8112324..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer---XML.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page XML.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/XML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_XML - - XML result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base deleted file mode 100755 index 4a1cf2f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine---ResultRenderer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResultRenderer.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer - - Result renderer interface that any result renderer needs to implement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine.php.html.svn-base deleted file mode 100755 index d63e55c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngine.php.html.svn-base +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page SparqlEngine.php - - - - -
    -

    /sparql/SparqlEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine - - This engine executes SPARQL queries against an RDF Datatset. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/FilterFunctions.php') - (line 3) - -
    - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base deleted file mode 100755 index 60b16c69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---FilterGenerator.php.html.svn-base +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - Docs for page FilterGenerator.php - - - - -
    -

    /sparql/SparqlEngineDb/FilterGenerator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_FilterGenerator - - Generates SQL from Sparql FILTER parts -
    - SparqlEngineDb_FilterGenerator_Value - - Value class that holds some arbitrary value and a datatype. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base deleted file mode 100755 index 72eb4433..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Offsetter.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Offsetter.php - - - - -
    -

    /sparql/SparqlEngineDb/Offsetter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_Offsetter - - Determines the offset in a row of sql queries. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base deleted file mode 100755 index 125ac545..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---Preparator.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Preparator.php - - - - -
    -

    /sparql/SparqlEngineDb/Preparator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_Preparator - - This class takes care of prepared statements: Preparing them in the database, replacing -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:24 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base deleted file mode 100755 index 5ebf07a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---PreparedStatement.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page PreparedStatement.php - - - - -
    -

    /sparql/SparqlEngineDb/PreparedStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_PreparedStatement - - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base deleted file mode 100755 index 1bf9a6c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultConverter.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ResultConverter.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultConverter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultConverter - - Converts a database result into a proper rdf statement triple array -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base deleted file mode 100755 index 0404e804..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Default.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/Default.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_Default - - Default RAP result renderer. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base deleted file mode 100755 index 4c77fef5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page HTML.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/HTML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_HTML - - Sparql DB HTML result renderer. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base deleted file mode 100755 index 5c46f02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html.svn-base +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page XML.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/XML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_XML - - Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/ -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base deleted file mode 100755 index 755c7606..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---ResultRenderer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResultRenderer.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer - - Result renderer interface that any result renderer needs to implement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base deleted file mode 100755 index bcf55622..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGenerator.php.html.svn-base +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page SqlGenerator.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlGenerator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlGenerator - - Creates sql statements from a Query object -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base deleted file mode 100755 index 6d5d60fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlGeneratorException.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SqlGeneratorException.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlGeneratorException.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlGeneratorException - - Exception when generating the SQL statement -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base deleted file mode 100755 index 62b484a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---SqlMerger.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SqlMerger.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlMerger.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlMerger - - Creates an sql string from an sql array -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base deleted file mode 100755 index c87bd386..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb---TypeSorter.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TypeSorter.php - - - - -
    -

    /sparql/SparqlEngineDb/TypeSorter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_TypeSorter - - Sorts database types as the Sparql specs want it. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb.php.html.svn-base deleted file mode 100755 index aad08857..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlEngineDb.php.html.svn-base +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Docs for page SparqlEngineDb.php - - - - -
    -

    /sparql/SparqlEngineDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb - - SPARQL engine optimized for databases. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlEngine.php') - (line 2) - -
    - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParser.php.html.svn-base deleted file mode 100755 index 0da5d6fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParser.php.html.svn-base +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - Docs for page SparqlParser.php - - - - -
    -

    /sparql/SparqlParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlParser - - Parses a SPARQL Query string and returns a Query Object. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Resource.php') - (line 6) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Literal.php') - (line 5) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Constraint.php') - (line 7) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Query.php') - (line 8) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParserException.php') - (line 10) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/QueryTriple.php') - (line 9) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParserException.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParserException.php.html.svn-base deleted file mode 100755 index dae5588c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_sparql---SparqlParserException.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlParserException.php - - - - -
    -

    /sparql/SparqlParserException.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlParserException - - A SPARQL Parser Execption for better errorhandling. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_syntax---SparqlResultParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_syntax---SparqlResultParser.php.html.svn-base deleted file mode 100755 index e69f1b3a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/.svn/text-base/_syntax---SparqlResultParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlResultParser.php - - - - -
    -

    /syntax/SparqlResultParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlResultParser - - Parses an xml document in SPARQL Result XML Format. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/ClientQuery.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/ClientQuery.html deleted file mode 100755 index 9642c02d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/ClientQuery.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - Docs For Class ClientQuery - - - - -
    -

    Class ClientQuery

    - - -
    -
    Description
    - -
    - -

    ClientQuery Object to run a SPARQL Query against a SPARQL server.

    -
      -
    • author: Tobias Gau <tobias.gauss@web.de>
    • -
    • version: $Id: ClientQuery.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/ClientQuery.php (line 16) -

    - - -
    Object
    -   |
    -   --ClientQuery
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $default -
    -
    - mixed - $named -
    -
    - mixed - $prefixes -
    -
    - mixed - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - addDefaultGraph - (String $default) -
    - -
    - void - addNamedGraph - ( $named, String $default) -
    - -
    - void - query - (String $query) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $default - = array() (line 18) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $named - = array() (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $prefixes - = array() (line 20) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $query - (line 21) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - addDefaultGraph (line 28) -
    - - -

    Adds a default graph to the query object.

    - -
    - void - - addDefaultGraph - - (String $default) -
    - -
      -
    • - String - $default: default graph name
    • -
    - - -
    - -
    - -
    - addNamedGraph (line 37) -
    - - -

    Adds a named graph to the query object.

    - -
    - void - - addNamedGraph - - ( $named, String $default) -
    - -
      -
    • - String - $default: named graph name
    • -
    • - - $named
    • -
    - - -
    - -
    - -
    - query (line 46) -
    - - -

    Adds the SPARQL query string to the query object.

    - -
    - void - - query - - (String $query) -
    - -
      -
    • - String - $query: the query string
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Constraint.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Constraint.html deleted file mode 100755 index 3d11ab19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Constraint.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - Docs For Class Constraint - - - - -
    -

    Class Constraint

    - - -
    -
    Description
    - -
    - -

    Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms.

    -
      -
    • author: Tobias Gauss <tobias.gauss@web.de>
    • -
    • version: $Id: Constraint.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/Constraint.php (line 17) -

    - - -
    Object
    -   |
    -   --Constraint
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - string - $expression -
    -
    - boolean - $outer -
    -
    - array - $tree -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - addExpression - (String $exp) -
    - -
    - String - getExpression - () -
    - -
    - void - getTree - () -
    - -
    - boolean - isOuterFilter - () -
    - -
    - void - setOuterFilter - (boolean $boolean) -
    - -
    - void - setTree - ( $tree) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - string - $expression - (line 23) - -
    - - -

    The expression string.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $outer - (line 29) - -
    - - -

    True if it is an outer filter, false if not.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $tree - = null (line 35) - -
    - - -

    The expression tree

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - addExpression (line 43) -
    - - -

    Adds an expression string.

    -
      -
    • access: public
    • -
    - -
    - void - - addExpression - - (String $exp) -
    - -
      -
    • - String - $exp: the expression String
    • -
    - - -
    - -
    - -
    - getExpression (line 53) -
    - - -

    Returns the expression string.

    -
      -
    • return: the expression String
    • -
    • access: public
    • -
    - -
    - String - - getExpression - - () -
    - - - -
    - -
    - -
    - getTree (line 82) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getTree - - () -
    - - - -
    - -
    - -
    - isOuterFilter (line 76) -
    - - -

    Returns true if this constraint is an outer filter- false if not.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isOuterFilter - - () -
    - - - -
    - -
    - -
    - setOuterFilter (line 66) -
    - - -

    Sets the filter type to outer or inner filter.

    -

    True for outer false for inner.

    -
      -
    • access: public
    • -
    - -
    - void - - setOuterFilter - - (boolean $boolean) -
    - -
      -
    • - boolean - $boolean
    • -
    - - -
    - -
    - -
    - setTree (line 87) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - setTree - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/GraphPattern.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/GraphPattern.html deleted file mode 100755 index 91079f13..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/GraphPattern.html +++ /dev/null @@ -1,784 +0,0 @@ - - - - - - Docs For Class GraphPattern - - - - -
    -

    Class GraphPattern

    - - -
    -
    Description
    - -
    - -

    A graph pattern which consists of triple patterns, optional or union graph patterns and filters.

    -
      -
    • author: Tobias Gauss <tobias.gauss@web.de>
    • -
    • version: $Id: GraphPattern.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/GraphPattern.php (line 16) -

    - - -
    Object
    -   |
    -   --GraphPattern
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $constraint -
    -
    - mixed - $graphname -
    -
    - boolean - $isConstructPattern -
    -
    - boolean - $open -
    -
    - int - $optional -
    -
    - int - $patternId -
    -
    - array - $triplePattern -
    -
    - int - $union -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - GraphPattern - GraphPattern - () -
    - -
    - void - addConstraint - ( &$cons, Constraint $cons) -
    - -
    - void - addOptional - (integer $pattern) -
    - -
    - void - addTriplePattern - (array $trpP) -
    - -
    - void - addUnion - (integer $pattern) -
    - - - -
    - String - getGraphname - () -
    - -
    - integer - getId - () -
    - -
    - integer - getOptional - () -
    - -
    - Array - getTriplePattern - () -
    - -
    - integer - getUnion - () -
    - -
    - array - getVariables - () -
    - -
    - void - setGraphname - (String $name) -
    - -
    - void - setId - (integer $id) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $constraint - = array() (line 31) - -
    - - -
      -
    • var: A List of Constraints.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $graphname - (line 21) - -
    - - -

    Graphname. 0 if its in the default graph.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $isConstructPattern - (line 51) - -
    - - -
      -
    • var: TRUE if the GraphPattern is a construct pattern.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - boolean - $open - (line 46) - -
    - - -
      -
    • var: TRUE if the pattern is open- FALSE if closed.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - int - $optional - (line 36) - -
    - - -
      -
    • var: Pointer to optional patterns.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $patternId - (line 57) - -
    - - -
      -
    • var: The GraphPatterns id.
    • -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $triplePattern - (line 26) - -
    - - -
      -
    • var: The TriplePattern.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $union - (line 41) - -
    - - -
      -
    • var: Pointer to union patterns.
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor GraphPattern (line 63) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - GraphPattern - - () -
    - - - -
    - -
    - -
    - addConstraint (line 140) -
    - - -

    Adds a Constraint to the GraphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addConstraint - - ( &$cons, Constraint $cons) -
    - - - - -
    - -
    - -
    - addOptional (line 149) -
    - - -

    Adds a pointer to an optional graphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addOptional - - (integer $pattern) -
    - -
      -
    • - integer - $pattern
    • -
    - - -
    - -
    - -
    - addTriplePattern (line 130) -
    - - -

    Adds a List of QueryTriples to the GraphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addTriplePattern - - (array $trpP) -
    - -
      -
    • - array - $trpP
    • -
    - - -
    - -
    - -
    - addUnion (line 159) -
    - - -

    Adds a pointer to a union graphPattern.

    -
      -
    • access: public
    • -
    - -
    - void - - addUnion - - (integer $pattern) -
    - -
      -
    • - integer - $pattern
    • -
    - - -
    - -
    - -
    - getConstraint (line 93) -
    - - -

    Returns a constraint if there is one false if not.

    -
      -
    • access: public
    • -
    - -
    - Constraint - - getConstraint - - () -
    - - - -
    - -
    - -
    - getGraphname (line 75) -
    - - -

    Returns the graphname.

    -
      -
    • access: public
    • -
    - -
    - String - - getGraphname - - () -
    - - - -
    - -
    - -
    - getId (line 179) -
    - - -

    Returns the GraphPatterns id.

    -
      -
    • access: public
    • -
    - -
    - integer - - getId - - () -
    - - - -
    - -
    - -
    - getOptional (line 102) -
    - - -

    Returns a pointer to an optional graph pattern.

    -
      -
    • access: public
    • -
    - -
    - integer - - getOptional - - () -
    - - - -
    - -
    - -
    - getTriplePattern (line 84) -
    - - -

    Returns the triple pattern of the graph pattern.

    -
      -
    • access: public
    • -
    - -
    - Array - - getTriplePattern - - () -
    - - - -
    - -
    - -
    - getUnion (line 111) -
    - - -

    Returns a pointer to a union graph pattern.

    -
      -
    • access: public
    • -
    - -
    - integer - - getUnion - - () -
    - - - -
    - -
    - -
    - getVariables (line 192) -
    - - -

    Returns an array of all variables used in this graph pattern.

    -

    All variables are listed only once (unique).

    -
      -
    • return: Array of variable names
    • -
    • access: public
    • -
    - -
    - array - - getVariables - - () -
    - - - -
    - -
    - -
    - setGraphname (line 121) -
    - - -

    Sets the graphname.

    -
      -
    • access: public
    • -
    - -
    - void - - setGraphname - - (String $name) -
    - -
      -
    • - String - $name
    • -
    - - -
    - -
    - -
    - setId (line 170) -
    - - -

    Sets the GraphPatterns Id.

    -
      -
    • access: public
    • -
    - -
    - void - - setId - - (integer $id) -
    - -
      -
    • - integer - $id
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Query.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Query.html deleted file mode 100755 index 0c9a53ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/Query.html +++ /dev/null @@ -1,1446 +0,0 @@ - - - - - - Docs For Class Query - - - - -
    -

    Class Query

    - - -
    -
    Description
    - -
    - -

    The Class Query represents a SPARQL query.

    -
      -
    • author: Tobias Gauss <tobias.gauss@web.de>
    • -
    • version: $Id: Query.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/Query.php (line 13) -

    - - -
    Object
    -   |
    -   --Query
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - string - $base -
    -
    - int - $bnodeCounter -
    -
    - mixed - $constructPattern -
    -
    - array - $fromNamedPart -
    -
    - array - $fromPart -
    - -
    - boolean - $isEmpty -
    -
    - array - $prefixes -
    -
    - string - $resultForm -
    -
    - array - $resultPart -
    -
    - array - $resultVars -
    -
    - array - $solutionModifier -
    -
    - array - $usedVars -
    -
    - array - $varDatatypes -
    -
    - array - $varLanguages -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - getLanguageTag - (string $var) -
    - -
    - Query - Query - () -
    - -
    - void - addConstructGraphPattern - (GraphPattern $pattern) -
    - -
    - void - addFrom - (String $graphURI) -
    - -
    - void - addFromNamed - (String $graphURI) -
    - -
    - void - addGraphPattern - (GraphPattern $pattern) -
    - -
    - void - addPrefix - (String $prefix, String $label) -
    - -
    - void - addVar - (String $var) -
    - -
    - void - addVariable - (String $var) -
    - -
    - Array - getAllVars - () -
    - -
    - String - getBase - () -
    - -
    - String - getBlanknodeLabel - () -
    - - - -
    - array - getConstructPatternVariables - () -
    - -
    - mixed - getDatatype - (string $var) -
    - -
    - Array - getFromNamedPart - () -
    - -
    - String - getFromPart - () -
    - -
    - string - getFullUri - (string $token) -
    - -
    - GraphPattern - getNewPattern - ([boolean $constr = false]) -
    - -
    - Array - getPrefixes - () -
    - -
    - string - getResultForm - () -
    - -
    - Array - getResultPart - () -
    - -
    - Array - getResultVars - () -
    - -
    - Array - getSolutionModifier - () -
    - -
    - boolean - isEmpty - () -
    - -
    - void - setBase - (String $base) -
    - -
    - void - setResultForm - (String $form) -
    - -
    - void - setSolutionModifier - (String $name, Value $value) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - string - $base - (line 19) - -
    - - -

    The BASE part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $bnodeCounter - (line 100) - -
    - - -

    Blanknode counter.

    -

    How many blank nodes are in $resultPart

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $constructPattern - (line 123) - -
    - - -

    If the query type is CONSTRUCT this variable contains the CONSTRUCT graph pattern.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $fromNamedPart - = array() (line 77) - -
    - - -

    Contains the FROM NAMED part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $fromPart - = array() (line 71) - -
    - - -

    Contains the FROM part of the SPARQL query.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $graphPatternCounter - (line 108) - -
    - - -

    GraphPattern counter.

    -

    How many GraphPattern are in $resultPart

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - boolean - $isEmpty - (line 130) - -
    - - -

    TRUE if the query is empty FALSE if not.

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $prefixes - = array() (line 33) - -
    - - -

    Array that contains used prefixes and namespaces.

    -

    Key is the prefix, value the namespace.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - string - $resultForm - (line 57) - -
    - - -

    What form/type of result should be returned.

    -

    One of:

    • "ask"
    • "count"
    • "construct"
    • "describe"
    • "select"
    • "select distinct"

    -
      -
    • see: QueryForms
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $resultPart - (line 65) - -
    - - -

    Contains the result part of the SPARQL query.

    -

    Array of GraphPattern

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $resultVars - = array() (line 41) - -
    - - -

    Array of result variables that shall be returned.

    -

    E.g. "?name", "?mbox"

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $solutionModifier - = array() (line 92) - -
    - - -

    Optional solution modifier of the query.

    -

    Array with three keys: "order by", "limit", "offset" If they are not set, their value is null

    "order by" can be an array with subarrays, each of those subarrays having two keys: "val" and "type". "val" determines the variable ("?mbox"), "type" is "asc" or "desc"

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $usedVars - (line 117) - -
    - - -

    List of all vars used in the query.

    -

    Key is the variable (e.g. "?x"), value is boolean true

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $varDatatypes - = array() (line 146) - -
    - - -

    Datatype of variables. NULL if the variable has no data type (e.g. ^^xsd::integer) set.

    -

    $varname => $datatype

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - array - $varLanguages - = array() (line 138) - -
    - - -

    Language of variables. NULL if the variable has no language tag (e.g. @en) set.

    -

    $varname => $language tag

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getLanguageTag (line 439) -
    - - -

    Returns the language of a variable if the tag is set (e.g. @en) Returns NULL if no language is set.

    -
      -
    • return: NULL or language tag
    • -
    • access: public
    • -
    - -
    - static mixed - - getLanguageTag - - (string $var) -
    - -
      -
    • - string - $var: Sparql variable name
    • -
    - - -
    - -
    - -
    - Constructor Query (line 153) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - Query - - Query - - () -
    - - - -
    - -
    - -
    - addConstructGraphPattern (line 310) -
    - - -

    Adds a construct graph pattern to the query.

    -
      -
    • access: public
    • -
    - -
    - void - - addConstructGraphPattern - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - addFrom (line 321) -
    - - -

    Adds a graphuri to the from part.

    -
      -
    • access: public
    • -
    - -
    - void - - addFrom - - (String $graphURI) -
    - -
      -
    • - String - $graphURI
    • -
    - - -
    - -
    - -
    - addFromNamed (line 331) -
    - - -

    Adds a graphuri to the from named part.

    -
      -
    • access: public
    • -
    - -
    - void - - addFromNamed - - (String $graphURI) -
    - -
      -
    • - String - $graphURI
    • -
    - - -
    - -
    - -
    - addGraphPattern (line 298) -
    - - -

    Adds a graph pattern to the result part.

    -
      -
    • access: public
    • -
    - -
    - void - - addGraphPattern - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - addPrefix (line 265) -
    - - -

    Adds a prefix to the list of prefixes.

    -
      -
    • access: public
    • -
    - -
    - void - - addPrefix - - (String $prefix, String $label) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $label
    • -
    - - -
    - -
    - -
    - addVar (line 370) -
    - - -

    Adds a new variable to the variable list.

    -
      -
    • access: public
    • -
    - -
    - void - - addVar - - (String $var) -
    - -
      -
    • - String - $var
    • -
    - - -
    - -
    - -
    - addVariable (line 275) -
    - - -

    Adds a variable to the list of result variables.

    -
      -
    • access: public
    • -
    - -
    - void - - addVariable - - (String $var) -
    - -
      -
    • - String - $var
    • -
    - - -
    - -
    - -
    - getAllVars (line 379) -
    - - -

    Returns a list with all used variables.

    -
      -
    • access: public
    • -
    - -
    - Array - - getAllVars - - () -
    - - - -
    - -
    - -
    - getBase (line 168) -
    - - -

    Returns the BASE part of the query.

    -
      -
    • access: public
    • -
    - -
    - String - - getBase - - () -
    - - - -
    - -
    - -
    - getBlanknodeLabel (line 242) -
    - - -

    Returns an unused Bnode label.

    -
      -
    • access: public
    • -
    - -
    - String - - getBlanknodeLabel - - () -
    - - - -
    - -
    - -
    - getConstructPattern (line 402) -
    - - -

    Returns the construvtGraphPattern of the query if there is one.

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - getConstructPattern - - () -
    - - - -
    - -
    - -
    - getConstructPatternVariables (line 413) -
    - - -

    Returns a list of variables used in the construct patterns.

    -
      -
    • return: Array of variable names, unique.
    • -
    • access: public
    • -
    - -
    - array - - getConstructPatternVariables - - () -
    - - - -
    - -
    - -
    - getDatatype (line 463) -
    - - -

    Returns the datatype of a variable if it is set.

    -
      -
    • return: NULL or datatype
    • -
    • access: public
    • -
    - -
    - mixed - - getDatatype - - (string $var) -
    - -
      -
    • - string - $var: Sparql variable name
    • -
    - - -
    - -
    - -
    - getFromNamedPart (line 225) -
    - - -

    Returns the FROM NAMED clause of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getFromNamedPart - - () -
    - - - -
    - -
    - -
    - getFromPart (line 216) -
    - - -

    Returns the FROM clause of the query.

    -
      -
    • access: public
    • -
    - -
    - String - - getFromPart - - () -
    - - - -
    - -
    - -
    - getFullUri (line 496) -
    - - -

    Gets the full URI of a qname token.

    -
      -
    • return: The complete URI of a given token, false if $token is not a qname or the prefix is not defined
    • -
    • access: public
    • -
    - -
    - string - - getFullUri - - (string $token) -
    - -
      -
    • - string - $token
    • -
    - - -
    - -
    - -
    - getNewPattern (line 354) -
    - - -

    Generates a new GraphPattern. If it is a CONSTRUCT graph pattern $constr has to set to TRUE, FALSE if not.

    -
      -
    • access: public
    • -
    - -
    - GraphPattern - - getNewPattern - - ([boolean $constr = false]) -
    - -
      -
    • - boolean - $constr
    • -
    - - -
    - -
    - -
    - getPrefixes (line 177) -
    - - -

    Returns the prefix map of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getPrefixes - - () -
    - - - -
    - -
    - -
    - getResultForm (line 198) -
    - - -

    Returns the type the result shall have.

    -

    E.g. "select", "select distinct", "ask", ...

    - - -
    - string - - getResultForm - - () -
    - - - -
    - -
    - -
    - getResultPart (line 207) -
    - - -

    Returns a list containing the graph patterns of the query.

    -
      -
    • access: public
    • -
    - -
    - Array - - getResultPart - - () -
    - - - -
    - -
    - -
    - getResultVars (line 186) -
    - - -

    Returns a list containing the result vars.

    -
      -
    • access: public
    • -
    - -
    - Array - - getResultVars - - () -
    - - - -
    - -
    - -
    - getSolutionModifier (line 392) -
    - - -

    Gets the solution modifiers of the query.

    -

    $solutionModifier['order by'] = value ['limit'] = vlaue ['offset'] = value

    -
      -
    • access: public
    • -
    - -
    - Array - - getSolutionModifier - - () -
    - - - -
    - -
    - -
    - isEmpty (line 233) -
    - - -

    Returns $isEmpty variable

    -
      -
    • access: public
    • -
    - -
    - boolean - - isEmpty - - () -
    - - - -
    - -
    - -
    - setBase (line 253) -
    - - -

    Sets the base part.

    -
      -
    • access: public
    • -
    - -
    - void - - setBase - - (String $base) -
    - -
      -
    • - String - $base
    • -
    - - -
    - -
    - -
    - setResultForm (line 288) -
    - - -

    Sets the result form.

    -
      -
    • access: public
    • -
    - -
    - void - - setResultForm - - (String $form) -
    - -
      -
    • - String - $form
    • -
    - - -
    - -
    - -
    - setSolutionModifier (line 342) -
    - - -

    Sets a solution modifier.

    -
      -
    • access: public
    • -
    - -
    - void - - setSolutionModifier - - (String $name, Value $value) -
    - -
      -
    • - String - $name
    • -
    • - Value - $value
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:27 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/QueryTriple.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/QueryTriple.html deleted file mode 100755 index e7a553d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/QueryTriple.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - Docs For Class QueryTriple - - - - -
    -

    Class QueryTriple

    - - -
    -
    Description
    - -
    - -

    Represents a query triple.

    -
      -
    • author: Tobias Gauss <tobias.gauss@web.de>
    • -
    • version: $Id: QueryTriple.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/QueryTriple.php (line 15) -

    - - -
    Object
    -   |
    -   --QueryTriple
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $object -
    -
    - mixed - $predicate -
    -
    - mixed - $subject -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - QueryTriple - QueryTriple - ( $sub,  $pred,  $ob) -
    - -
    - Node - getObject - () -
    - -
    - Node - getPredicate - () -
    - -
    - Node - getSubject - () -
    - -
    - array - getVariables - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $object - (line 30) - -
    - - -

    The QueryTriples Object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $predicate - (line 25) - -
    - - -

    The QueryTriples Predicate.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $subject - (line 20) - -
    - - -

    The QueryTriples Subject.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor QueryTriple (line 36) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - QueryTriple - - QueryTriple - - ( $sub,  $pred,  $ob) -
    - -
      -
    • - - $sub
    • -
    • - - $pred
    • -
    • - - $ob
    • -
    - - -
    - -
    - -
    - getObject (line 68) -
    - - -

    Returns the Triples Object.

    -
      -
    • access: public
    • -
    - -
    - Node - - getObject - - () -
    - - - -
    - -
    - -
    - getPredicate (line 58) -
    - - -

    Returns the Triples Predicate.

    -
      -
    • access: public
    • -
    - -
    - Node - - getPredicate - - () -
    - - - -
    - -
    - -
    - getSubject (line 48) -
    - - -

    Returns the Triples Subject.

    -
      -
    • access: public
    • -
    - -
    - Node - - getSubject - - () -
    - - - -
    - -
    - -
    - getVariables (line 80) -
    - - -

    Returns an array of all variables in this triple.

    -
      -
    • return: Array of variable names
    • -
    • access: public
    • -
    - -
    - array - - getVariables - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlClient.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlClient.html deleted file mode 100755 index e3d4312f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlClient.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - Docs For Class SparqlClient - - - - -
    -

    Class SparqlClient

    - - -
    -
    Description
    - -
    - -

    Client for querying a sparql server.

    -
      -
    • author: Tobias Gauß <tobias.gauss@web.de>
    • -
    • version: $Id: SparqlClient.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/SparqlClient.php (line 16) -

    - - -
    Object
    -   |
    -   --SparqlClient
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $output -
    -
    - mixed - $server -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlClient - SparqlClient - (String $server) -
    - -
    - void - parseResult - ( $buffer) -
    - -
    - mixed - query - (ClientQuery $query) -
    - -
    - mixed - returnResult - (String $result) -
    - -
    - void - setOutputFormat - (String $format) -
    - -
    - void - _buildurl - (ClientQuery $query) -
    - -
    - String - _http_get - (String $url) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $output - (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $server - (line 18) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor SparqlClient (line 26) -
    - - -

    Constructor of SparlClient.

    - -
    - SparqlClient - - SparqlClient - - (String $server) -
    - -
      -
    • - String - $server: server address.
    • -
    - - -
    - -
    - -
    - parseResult (line 111) -
    - - - -
    - void - - parseResult - - ( $buffer) -
    - -
      -
    • - - $buffer
    • -
    - - -
    - -
    - -
    - query (line 54) -
    - - -

    Main function of SparqlClient.

    -
      -
    • return: returns an array that contains the variables an their bindings or a MemModel
    • -
    - -
    - mixed - - query - - (ClientQuery $query) -
    - - - - -
    - -
    - -
    - returnResult (line 91) -
    - - -

    Returns the query result.

    - -
    - mixed - - returnResult - - (String $result) -
    - -
      -
    • - String - $result: the result.
    • -
    - - -
    - -
    - -
    - setOutputFormat (line 39) -
    - - -

    Sets the output format for a SELECT or ASK query. Possible formats are "xml" for Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array for the format described in our SparqlEngine.

    - -
    - void - - setOutputFormat - - (String $format) -
    - -
      -
    • - String - $format: the format.
    • -
    - - -
    - -
    - -
    - _buildurl (line 71) -
    - - -

    Helper function that builds the url.

    - -
    - void - - _buildurl - - (ClientQuery $query) -
    - - - - -
    - -
    - -
    - _http_get (line 124) -
    - - -

    Executes the GET Request.

    -
      -
    • return: result.
    • -
    - -
    - String - - _http_get - - (String $url) -
    - -
      -
    • - String - $url: the url.
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine.html deleted file mode 100755 index 757e838a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine.html +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - Docs For Class SparqlEngine - - - - -
    -

    Class SparqlEngine

    - - -
    -
    Description
    - -
    - -

    This engine executes SPARQL queries against an RDF Datatset.

    -
      -
    • author: Tobias Gauß <tobias.gauss@web.de>
    • -
    • version: $Id: SparqlEngine.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/SparqlEngine.php (line 19) -

    - - -
    Object
    -   |
    -   --SparqlEngine
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    - -
    - Query - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngine - __construct - () -
    - -
    - Array - buildVarmap - (String $order, Array $vartable) -
    - -
    - boolean - checkIntBindings - (Triple $trip, Array $intBindings) -
    - -
    - Array - distinct - (Array $vartable) -
    - -
    - void - factory - ([Model $model = null]) -
    - -
    - String - fillConstraintString - (Array $vars, Array $res, Constraint $constraint, Array $function) -
    - -
    - Array - filterPatterns - (Array $patternlist, boolean $outer) -
    - -
    - Array - findTuplesMatchingOnePattern - (TriplePattern $pattern, Array $graphlist) -
    - -
    - void - getDataset - () -
    - -
    - void - getQuery - () -
    - -
    - Array - joinOptionalTuples - (Array &$finalRes, Array &$res) -
    - -
    - Array - joinResults - (Array $patternlist) -
    - -
    - Array - joinTuples - (Array &$finalRes, Array &$res) -
    - -
    - void - matchPattern - ( &$patternlist, array $graphlist,  &$graphPattern, Array $patternlist, GraphPattern $graphPattern) -
    - -
    - Array - matchPatterns - (Array $graphlist) -
    - -
    - Array - preselectGraphs - () -
    - -
    - Array/String - queryModel - (Dataset $dataset, Query $query, [String $resultform = false]) -
    - -
    - Array - selectVars - (Array $table, Array $vars) -
    - -
    - Array - sortVars - (Array $vartable) -
    - -
    - void - writeQueryResultAsHtmlTable - (array $queryResult) -
    - -
    - Array - _buildIntBindings - (Array $var) -
    - -
    - Array - _buildResultSet - (GraphPattern $pattern, Array $resmodel) -
    - -
    - Array - _checkGraphs - ( &$pattern, Array $graphlist, GraphPattern $pattern) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - Dataset - $dataset - (line 32) - -
    - - -

    The RDF Dataset.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Query - $query - (line 26) - -
    - - -

    The query object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 40) -
    - - -

    Use SparqlEngine::factory() instead of this constructor.

    -
      -
    • access: protected
    • -
    - -
    - SparqlEngine - - __construct - - () -
    - - - -
    - -
    - -
    - buildVarmap (line 998) -
    - - -

    Sorts the result table.

    -
      -
    • return: A map that contains the new order of the result vars
    • -
    • access: protected
    • -
    - -
    - Array - - buildVarmap - - (String $order, Array $vartable) -
    - -
      -
    • - String - $order: (ASC/DESC)
    • -
    • - Array - $vartable: the vartable
    • -
    - - -
    - -
    - -
    - checkIntBindings (line 304) -
    - - -

    Checks it there are internal bindings between variables.

    -
      -
    • access: protected
    • -
    - -
    - boolean - - checkIntBindings - - (Triple $trip, Array $intBindings) -
    - -
      -
    • - Triple - $trip
    • -
    • - Array - $intBindings
    • -
    - - -
    - -
    - -
    - distinct (line 1070) -
    - - -

    Eliminates duplicate results.

    -
      -
    • return: the result table without duplicate results
    • -
    • access: protected
    • -
    - -
    - Array - - distinct - - (Array $vartable) -
    - -
      -
    • - Array - $vartable: a table that contains the result vars and their bindings
    • -
    - - -
    - -
    - -
    - factory (line 53) -
    - - -

    Creates a new instance of the SparqlEngine, depending on the given model. For example, if you pass a DbModel, you will get a SparqlEngine specialized on databases.

    -
      -
    • access: public
    • -
    - -
    - void - - factory - - ([Model $model = null]) -
    - -
      -
    • - Model - $model: RDF model that uses the engine
    • -
    - - -
    - -
    - -
    - fillConstraintString (line 760) -
    - - -

    Builds an evaluation string to determine wether the result passes the filter or not. This string is evaluatet by the php buildin eval() function

    -
      -
    • access: protected
    • -
    - -
    - String - - fillConstraintString - - (Array $vars, Array $res, Constraint $constraint, Array $function) -
    - -
      -
    • - Array - $vars: a list which contains the used variables
    • -
    • - Array - $res: the result part which have to be evaluated
    • -
    • - Constraint - $constraint: the Constrain object
    • -
    • - Array - $function: an Array which contains the used functions
    • -
    - - -
    - -
    - -
    - filterPatterns (line 665) -
    - - -

    Filters the pattern results.

    -
      -
    • return: the filtered patternlist
    • -
    • access: protected
    • -
    - -
    - Array - - filterPatterns - - (Array $patternlist, boolean $outer) -
    - -
      -
    • - Array - $patternlist: list containing the results of the GraphPatterns
    • -
    • - boolean - $outer: TRUE if its an outer filter FALSE if not
    • -
    - - -
    - -
    - -
    - findTuplesMatchingOnePattern (line 216) -
    - - -

    Finds Tuples matching one TriplePattern.

    -
      -
    • access: protected
    • -
    - -
    - Array - - findTuplesMatchingOnePattern - - (TriplePattern $pattern, Array $graphlist) -
    - -
      -
    • - TriplePattern - $pattern
    • -
    • - Array - $graphlist
    • -
    - - -
    - -
    - -
    - getDataset (line 1161) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getDataset - - () -
    - - - -
    - -
    - -
    - getQuery (line 1154) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getQuery - - () -
    - - - -
    - -
    - -
    - joinOptionalTuples (line 406) -
    - - -

    Joins OPTIONAL pattern results.

    -
      -
    • return: the joined Array
    • -
    • access: protected
    • -
    - -
    - Array - - joinOptionalTuples - - (Array &$finalRes, Array &$res) -
    - -
      -
    • - Array - &$finalRes
    • -
    • - Array - &$res
    • -
    - - -
    - -
    - -
    - joinResults (line 618) -
    - - -

    Joins the results of the different Graphpatterns.

    -
      -
    • access: protected
    • -
    - -
    - Array - - joinResults - - (Array $patternlist) -
    - -
      -
    • - Array - $patternlist
    • -
    - - -
    - -
    - -
    - joinTuples (line 343) -
    - - -

    Perform an SQL-like inner join on two resultSets.

    -
      -
    • access: protected
    • -
    - -
    - Array - - joinTuples - - (Array &$finalRes, Array &$res) -
    - -
      -
    • - Array - &$finalRes
    • -
    • - Array - &$res
    • -
    - - -
    - -
    - -
    - matchPattern (line 152) -
    - - -

    Finds tuples that match one graph pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - matchPattern - - ( &$patternlist, array $graphlist,  &$graphPattern, Array $patternlist, GraphPattern $graphPattern) -
    - -
      -
    • - Array - $patternlist: list that contains the graphPatterns
    • -
    • - array - $graphlist: the graphlist
    • -
    • - GraphPattern - $graphPattern: the pattern which has to be matched
    • -
    • - - &$patternlist
    • -
    • - - &$graphPattern
    • -
    - - -
    - -
    - -
    - matchPatterns (line 130) -
    - - -

    Matches all graph Patterns against the dataset and generates an array which contains the result sets for every given GraphPattern.

    -
      -
    • access: protected
    • -
    - -
    - Array - - matchPatterns - - (Array $graphlist) -
    - -
      -
    • - Array - $graphlist: the graphlist which contains the names of the named graphs which has to be queried.
    • -
    - - -
    - -
    - -
    - preselectGraphs (line 480) -
    - - -

    Looks in from and from named part of the query and adds the graphs to the graphlist.

    -
      -
    • access: protected
    • -
    - -
    - Array - - preselectGraphs - - () -
    - - - -
    - -
    - -
    - queryModel (line 74) -
    - - -

    The query engine's main method.

    -
      -
    • return: Type of the result depends on $resultform.
    • -
    • access: public
    • -
    - -
    - Array/String - - queryModel - - (Dataset $dataset, Query $query, [String $resultform = false]) -
    - -
      -
    • - Dataset - $dataset: the RDF Dataset
    • -
    • - mixed - $query: the parsed SPARQL query
    • -
    • - String - $resultform: the result form. If set to 'xml' the result will be SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    • -
    - - -
    - -
    - -
    - selectVars (line 594) -
    - - -

    Selects the result variables and builds a result table.

    -
      -
    • access: protected
    • -
    - -
    - Array - - selectVars - - (Array $table, Array $vars) -
    - -
      -
    • - Array - $table: the result table
    • -
    • - Array - $vars: the result variables
    • -
    - - -
    - -
    - -
    - sortVars (line 966) -
    - - -

    Sorts the results.

    -
      -
    • return: List containing the sorted result vars
    • -
    • access: protected
    • -
    - -
    - Array - - sortVars - - (Array $vartable) -
    - -
      -
    • - Array - $vartable: List containing the unsorted result vars
    • -
    - - -
    - -
    - -
    - writeQueryResultAsHtmlTable (line 1094) -
    - - -

    Prints a query result as HTML table.

    -

    You can change the colors in the configuration file.

    -
      -
    • access: public
    • -
    - -
    - void - - writeQueryResultAsHtmlTable - - (array $queryResult) -
    - -
      -
    • - array - $queryResult: [][?VARNAME] = object Node
    • -
    - - -
    - -
    - -
    - _buildIntBindings (line 524) -
    - - -

    Marks triples with internal bindings.

    -

    int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _buildIntBindings - - (Array $var) -
    - -
      -
    • - Array - $var
    • -
    - - -
    - -
    - -
    - _buildResultSet (line 557) -
    - - -

    Builds the resultset.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _buildResultSet - - (GraphPattern $pattern, Array $resmodel) -
    - - - - -
    - -
    - -
    - _checkGraphs (line 497) -
    - - -

    Evaluates the GRPAH clause if there is one. Checks if the GRAPH clause contains an IRI, variable or nothing.

    -

    Returns an array which contains the graphs that has to be matched.

    -
      -
    • access: protected
    • -
    - -
    - Array - - _checkGraphs - - ( &$pattern, Array $graphlist, GraphPattern $pattern) -
    - -
      -
    • - GraphPattern - $pattern
    • -
    • - Array - $graphlist
    • -
    • - - &$pattern
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb.html deleted file mode 100755 index b6c3c104..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb.html +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb - - - - -
    -

    Class SparqlEngineDb

    - - -
    -
    Description
    - -
    - -

    SPARQL engine optimized for databases.

    -

    Generates SQL statements to directly query the database, letting the database system do all the hard work like selecting, joining, filtering and ordering results.

    - -

    - Located in /sparql/SparqlEngineDb.php (line 18) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arPrepared -
    -
    - boolean - $bRealPrepared -
    - -
    - ADOConnection - $dbConn -
    -
    - int - $modelID -
    - -
    - Query - $query -
    - - -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb - __construct - ( $model) -
    - -
    - mixed - execute - (array $arVariables, [string $resultform = false]) -
    - -
    - void - getQuery - () -
    - -
    - void - getSqlGenerator - () -
    - -
    - void - getTypeSorter - () -
    - -
    - SparqlEngineDb_PreparedStatement - prepare - ( $dataset, Query $query) -
    - -
    - mixed - queryDb - (array $arSql,  $nOffset,  $nLimit) -
    - -
    - array/string - queryModel - ( $dataset, Query $query, [string $resultform = false]) -
    - -
    - array - queryMultiple - (array $arSqls) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arPrepared - = null (line 50) - -
    - - -

    Prepared SQL statements are stored in here.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $bRealPrepared - = false (line 56) - -
    - - -

    If the prepared statement is really prepared, or if we just emulate it.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Dataset - $dataset - (line 31) - -
    - - -

    RDF dataset object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - ADOConnection - $dbConn - (line 37) - -
    - - -

    Database connection object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $modelID - (line 44) - -
    - - -

    Internal ID for our graph model.

    -

    Stored in the database along the statements.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_Preparator - $pr - = null (line 74) - -
    - - -

    Prepared statments preparator instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - Query - $query - (line 25) - -
    - - -

    Sparql Query object.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_SqlGenerator - $sg - = null (line 62) - -
    - - -

    SQL generator instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_TypeSorter - $ts - = null (line 68) - -
    - - -

    Type sorting instance

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 81) -
    - - -

    Use SparqlEngine::factory() to create the instance

    -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb - - __construct - - ( $model) -
    - - - - -
    - -
    - -
    - execute (line 189) -
    - - -

    Execute a prepared statement by filling it with variables

    -
      -
    • return: Result according to $resultform
    • -
    • access: public
    • -
    - -
    - mixed - - execute - - (array $arVariables, [string $resultform = false]) -
    - -
      -
    • - array - $arVariables: Array with (variable name => value) pairs
    • -
    • - string - $resultform: Which form the result should have
    • -
    - - -
    - -
    - -
    - getQuery (line 329) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getQuery - - () -
    - - - -
    - -
    - -
    - getSqlGenerator (line 336) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getSqlGenerator - - () -
    - - - -
    - -
    - -
    - getTypeSorter (line 343) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getTypeSorter - - () -
    - - - -
    - -
    - -
    - prepare (line 142) -
    - - -

    Create a prepared statement that can be executed later.

    -
      -
    • return: Prepared statment that can be execute()d later.
    • -
    • access: public
    • -
    - -
    - SparqlEngineDb_PreparedStatement - - prepare - - ( $dataset, Query $query) -
    - -
      -
    • - Dataset - $dataset: RDF Dataset
    • -
    • - Query - $query: Parsed SPARQL query
    • -
    - - -
    - -
    - -
    - queryDb (line 287) -
    - - -

    Sends the sql to the database and returns the results.

    -
      -
    • return: Anything ADOConnection::Execute() may return
    • -
    • throws: Exception If Database query does not work
    • -
    - -
    - mixed - - queryDb - - (array $arSql,  $nOffset,  $nLimit) -
    - -
      -
    • - array - $arSql: Array that gets a SQL query string once imploded
    • -
    • - - $nOffset
    • -
    • - - $nLimit
    • -
    - - -
    - -
    - -
    - queryModel (line 102) -
    - - -

    Query the database with the given SPARQL query.

    -
      -
    • return: array of triple arrays, or XML. Format depends on $resultform parameter.
    • -
    • access: public
    • -
    - -
    - array/string - - queryModel - - ( $dataset, Query $query, [string $resultform = false]) -
    - -
      -
    • - Dataset - $dataset: RDF Dataset
    • -
    • - Query - $query: Parsed SPARQL query
    • -
    • - string - $resultform: Result form. If set to 'xml' the result will be SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
    • -
    - - -
    - -
    - -
    - queryMultiple (line 235) -
    - - -

    Executes multiple SQL queries and returns an array of results.

    -
      -
    • return: Array of query results
    • -
    • access: protected
    • -
    - -
    - array - - queryMultiple - - (array $arSqls) -
    - -
      -
    • - array - $arSqls: Array of SQL queries
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator.html deleted file mode 100755 index 3bec1811..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator.html +++ /dev/null @@ -1,1649 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_FilterGenerator - - - - -
    -

    Class SparqlEngineDb_FilterGenerator

    - - -
    -
    Description
    - -
    - -

    Generates SQL from Sparql FILTER parts

    - -

    - Located in /sparql/SparqlEngineDb/FilterGenerator.php (line 10) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static mixed - $arDumbOperators -
    -
    - static array - $arFuncParamNumbers -
    -
    - static array - $arOperatorSwitches -
    -
    - static mixed - $typeVariable -
    -
    - static mixed - $typeXsdBoolean -
    -
    - static mixed - $typeXsdDateTime -
    -
    - static mixed - $typeXsdDouble -
    -
    - static mixed - $typeXsdInteger -
    -
    - static mixed - $typeXsdString -
    -
    - boolean - $bOptional -
    - -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - mkVal - ( $value, [ $type = null]) -
    - -
    - static void - switchOperator - ( $op) -
    - -
    - SparqlEngineDb_FilterGenerator - __construct - (SparqlEngineDb_SqlGenerator $sg) -
    - -
    - void - createBooleanValue - ( $tree) -
    - -
    - void - createEquation - ( $tree) -
    - -
    - string - createFilterSql - (array $tree, boolean $bOptional,  $nUnionCount) -
    - -
    - void - createFunction - ( $tree) -
    - -
    - void - createFunction_bound - ( $tree) -
    - -
    - void - createFunction_datatype - ( $tree) -
    - -
    - void - createFunction_isblank - ( $tree) -
    - -
    - void - createFunction_isiri - ( $tree) -
    - -
    - void - createFunction_isliteral - ( $tree) -
    - -
    - void - createFunction_isuri - ( $tree) -
    - -
    - void - createFunction_lang - ( $tree) -
    - -
    - void - createFunction_langmatches - ( $tree) -
    - -
    - void - createFunction_regex - ( $tree) -
    - -
    - void - createFunction_sameterm - ( $tree) -
    - -
    - void - createFunction_str - ( $tree) -
    - -
    - void - createFunction_xsd_datetime - ( $tree) -
    - -
    - void - createSingleTypeCheck - ( $val,  $tree) -
    - -
    - void - createTreeSql - ( $tree,  $parent) -
    - -
    - void - createTypeEquation - ( $operator,  $val1,  $val2,  $tree1,  $tree2) -
    - -
    - void - createValue - (array $tree, boolean $bDumbParent) -
    - -
    - void - getCol - ( $tree,  $type) -
    - -
    - void - getDatatypeCol - ( $tree) -
    - -
    - void - getDateConversionSql - ( $strValue) -
    - -
    - void - getIsCol - ( $tree) -
    - -
    - void - getLangCol - ( $tree) -
    - -
    - void - getValueCol - ( $tree) -
    - -
    - void - isNumber - ( $tree) -
    - -
    - boolean - isObject - (array $tree) -
    - -
    - boolean - isObjectOrSubject - (array $tree) -
    - -
    - boolean - isPlainString - (array $tree) -
    - -
    - void - isValueButNotVariableNorString - ( $tree) -
    - -
    - boolean - isVariable - (array $tree) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static mixed - $arDumbOperators - = array( -
    '&&', '||' -
    )
    (line 56) -
    -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $arFuncParamNumbers - = array( -
    'bound' => array(1, 1),'datatype'=>array(1,1),'isblank'=>array(1,1),'isiri'=>array(1,1),'isliteral'=>array(1,1),'isuri'=>array(1,1),'lang'=>array(1,1),'langmatches'=>array(2,2),'regex'=>array(2,3),'sameterm'=>array(2,2),'str'=>array(1,1),'xsd:datetime'=>array(1,1),)
    (line 29) -
    -
    - - -

    Number of parameters for the functions supported.

    -

    First value is minimum, second is maximum.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $arOperatorSwitches - = array( -
    '>' => '<', -
    '<' => '>', -
    '>=' => '<=', -
    '<=' => '>=', -
    )
    (line 49) -
    -
    - - -

    List of operators and their counterpart if operands are switched.

    -

    (a > b) => (b < a)

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeVariable - = 'variable' (line 65) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdBoolean - = 'http://www.w3.org/2001/XMLSchema#boolean' (line 60) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdDateTime - = 'http://www.w3.org/2001/XMLSchema#dateTime' (line 61) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdDouble - = 'http://www.w3.org/2001/XMLSchema#double' (line 62) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdInteger - = 'http://www.w3.org/2001/XMLSchema#integer' (line 63) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static mixed - $typeXsdString - = 'http://www.w3.org/2001/XMLSchema#string' (line 64) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - - -
    - -
    - - boolean - $bOptional - = false (line 22) - -
    - - -

    If the filter is in an optional statement

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - SparqlEngineDb_SqlGenerator - $sg - = null (line 16) - -
    - - -

    SQL Generator

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static mkVal (line 662) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - mkVal - - ( $value, [ $type = null]) -
    - -
      -
    • - - $value
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - static switchOperator (line 799) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - switchOperator - - ( $op) -
    - -
      -
    • - - $op
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 69) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_FilterGenerator - - __construct - - (SparqlEngineDb_SqlGenerator $sg) -
    - - - - -
    - -
    - -
    - createBooleanValue (line 213) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createBooleanValue - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createEquation (line 270) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createEquation - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFilterSql (line 84) -
    - - -

    Creates the SQL representing a Sparql FILTER.

    -
      -
    • return: SQL WHERE part with prefixed AND
    • -
    • access: public
    • -
    - -
    - string - - createFilterSql - - (array $tree, boolean $bOptional,  $nUnionCount) -
    - -
      -
    • - array - $tree: Filter element tree as returned by SparqlParser::parseConstraintTree()
    • -
    • - boolean - $bOptional: If the filter is in an optional statement
    • -
    • - - $nUnionCount
    • -
    - - -
    - -
    - -
    - createFunction (line 243) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_bound (line 400) -
    - - -

    Creates an sql statement that returns if the element is a blank node

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_bound - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_datatype (line 415) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_datatype - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isblank (line 434) -
    - - -

    Creates an sql statement that returns if the element is a blank node

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isblank - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isiri (line 450) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isiri - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isliteral (line 460) -
    - - -

    Creates an sql statement that returns the language of the object

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isliteral - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_isuri (line 475) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_isuri - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_lang (line 493) -
    - - -

    Creates an sql statement that returns the language of the object

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_lang - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_langmatches (line 512) -
    - - -

    Creates an sql statement that checks if the variable

    -

    matches a given language

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_langmatches - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_regex (line 559) -
    - - -

    Creates an sql statement that checks if the given part matches

    -

    an regex

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_regex - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_sameterm (line 601) -
    - - -

    Creates an sql statement that checks if both terms are the same

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_sameterm - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_str (line 618) -
    - - -

    Creates an sql statement that returns the string representation

    -

    of the given element

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_str - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createFunction_xsd_datetime (line 639) -
    - - -

    Creates an sql statement that returns the datetime representation

    -

    of the given element

    -
      -
    • access: protected
    • -
    - -
    - void - - createFunction_xsd_datetime - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createSingleTypeCheck (line 376) -
    - - -

    Creates sql to ensure the type between $val and variable $tree is the same.

    -
      -
    • access: protected
    • -
    - -
    - void - - createSingleTypeCheck - - ( $val,  $tree) -
    - -
      -
    • - - $val
    • -
    • - - $tree
    • -
    - - -
    - -
    - -
    - createTreeSql (line 102) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTreeSql - - ( $tree,  $parent) -
    - -
      -
    • - - $tree
    • -
    • - - $parent
    • -
    - - -
    - -
    - -
    - createTypeEquation (line 335) -
    - - -

    Generates sql code to make sure the datatypes of the two operands match

    -
      -
    • access: protected
    • -
    - -
    - void - - createTypeEquation - - ( $operator,  $val1,  $val2,  $tree1,  $tree2) -
    - -
      -
    • - - $operator
    • -
    • - - $val1
    • -
    • - - $val2
    • -
    • - - $tree1
    • -
    • - - $tree2
    • -
    - - -
    - -
    - -
    - createValue (line 141) -
    - - -

    Creates the sql for an element of type "value".

    -
      -
    • access: protected
    • -
    - -
    - void - - createValue - - (array $tree, boolean $bDumbParent) -
    - -
      -
    • - array - $tree: Element
    • -
    • - boolean - $bDumbParent: True if the parent is a boolean equation or null.
    • -
    - - -
    - -
    - -
    - getCol (line 668) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getCol - - ( $tree,  $type) -
    - -
      -
    • - - $tree
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - getDatatypeCol (line 680) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getDatatypeCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getDateConversionSql (line 688) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getDateConversionSql - - ( $strValue) -
    - -
      -
    • - - $strValue
    • -
    - - -
    - -
    - -
    - getIsCol (line 695) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getIsCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getLangCol (line 702) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getLangCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - getValueCol (line 710) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getValueCol - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isNumber (line 717) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - isNumber - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isObject (line 734) -
    - - -

    Checks if the given tree element is a variable and the variable is actually an object in the database.

    -
      -
    • return: True if the element is an object
    • -
    • access: protected
    • -
    - -
    - boolean - - isObject - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isObjectOrSubject (line 749) -
    - - -

    Checks if the given tree element is a variable and the variable is actually an object or a subject in the database.

    -
      -
    • return: True if the element is an object or an subject
    • -
    • access: protected
    • -
    - -
    - boolean - - isObjectOrSubject - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isPlainString (line 766) -
    - - -

    Checks if the given tree element is a plain string (no variable)

    -
      -
    • return: True if the element is a string
    • -
    • access: protected
    • -
    - -
    - boolean - - isPlainString - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    - -
    - isValueButNotVariableNorString (line 774) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - isValueButNotVariableNorString - - ( $tree) -
    - -
      -
    • - - $tree
    • -
    - - -
    - -
    - -
    - isVariable (line 789) -
    - - -

    Checks if the given tree element is a variable

    -
      -
    • return: True if the element is a variable
    • -
    • access: protected
    • -
    - -
    - boolean - - isVariable - - (array $tree) -
    - -
      -
    • - array - $tree: Tree element
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator_Value.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator_Value.html deleted file mode 100755 index 48537eaa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_FilterGenerator_Value.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_FilterGenerator_Value - - - - -
    -

    Class SparqlEngineDb_FilterGenerator_Value

    - - -
    -
    Description
    - -
    - -

    Value class that holds some arbitrary value and a datatype.

    -

    Objects of this class can transparently be used in strings since its __toString() returns the value.

    -

    - Located in /sparql/SparqlEngineDb/FilterGenerator.php (line 819) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $type -
    -
    - mixed - $value -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb_FilterGenerator_Value - __construct - ( $value, [ $type = null]) -
    - -
    - void - __toString - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $type - = null (line 822) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - mixed - $value - = null (line 821) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 826) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_FilterGenerator_Value - - __construct - - ( $value, [ $type = null]) -
    - -
      -
    • - - $value
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - __toString (line 834) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - __toString - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Offsetter.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Offsetter.html deleted file mode 100755 index f3f4e677..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Offsetter.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_Offsetter - - - - -
    -

    Class SparqlEngineDb_Offsetter

    - - -
    -
    Description
    - -
    - -

    Determines the offset in a row of sql queries.

    - -

    - Located in /sparql/SparqlEngineDb/Offsetter.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static string - getLimitSql - (Query $query,  $dbConn) -
    - -
    - SparqlEngineDb_Offsetter - __construct - ( $dbConn, Query $query) -
    - -
    - array - determineOffset - (array $arSqls) -
    - -
    - int - getCount - (array $arSql) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static getLimitSql (line 82) -
    - - -

    Creates a sql LIMIT statement if the sparql query needs one.

    -

    This method is needed because AdoDb does not support limits with prepared statements. It's a pity.

    -
      -
    • return: SQL command to be appended to a query, to limit the number of result rows returned.
    • -
    • access: public
    • -
    - -
    - static string - - getLimitSql - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 13) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_Offsetter - - __construct - - ( $dbConn, Query $query) -
    - -
      -
    • - ADOConnection - $dbConn
    • -
    • - Query - $query
    • -
    - - -
    - -
    - -
    - determineOffset (line 31) -
    - - -

    Determines the offset in the sqls, the position to start form.

    -
      -
    • return: Array of two values: The first determines the index of the sql query to begin with, the second is the row offset that should be used in the final SQL query.
    • -
    • access: public
    • -
    - -
    - array - - determineOffset - - (array $arSqls) -
    - -
      -
    • - array - $arSqls: Array of SQL query parts as returned by SparqlEngine_TypeSorter::getOrderifiedSqls()
    • -
    - - -
    - -
    - -
    - getCount (line 59) -
    - - -

    Returns the number of rows that the given query will return.

    -
      -
    • return: Number of rows returned.
    • -
    • access: protected
    • -
    - -
    - int - - getCount - - (array $arSql) -
    - -
      -
    • - array - $arSql: Array with sql parts and at least keys 'from' and 'where' set.
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:05 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Preparator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Preparator.html deleted file mode 100755 index d04d1d3a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_Preparator.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_Preparator - - - - -
    -

    Class SparqlEngineDb_Preparator

    - - -
    -
    Description
    - -
    - -

    This class takes care of prepared statements: Preparing them in the database, replacing

    - -

    - Located in /sparql/SparqlEngineDb/Preparator.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - replacePrefix - ( $strValue,  $arPrefixes) -
    - -
    - SparqlEngineDb_Preparator - __construct - (Query $query,  $dbConn) -
    - -
    - array - createVariableArray - (array $arVariablePositions, array $arVariableValues) -
    - -
    - array - execute - (array $arDbStatements, array $arVariableValues) -
    - -
    - array - prepareInDb - (array $arQueries, array $arPlaceholders) -
    - -
    - array - replacePlaceholders - (string $strQuery, array $arPlaceholders) -
    - -
    - void - replacePlaceholdersCb - ( $matches) -
    - -
    - void - replacePlaceholdersWithVariables - ( $strQuery,  $arPlaceholders,  $arVariableValues) -
    - -
    - void - replacePlaceholdersWithVariablesCb - ( $matches) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static replacePrefix (line 215) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - replacePrefix - - ( $strValue,  $arPrefixes) -
    - -
      -
    • - - $strValue
    • -
    • - - $arPrefixes
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_Preparator - - __construct - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - createVariableArray (line 153) -
    - - -

    Creates an array full of variables to be passed to the Execute() method of the database connection object.

    -

    Uses the variable positions array to get the positions of the variables in the result array, and the variable value array to get the actual values for the prepared statement.

    -
      -
    • return: Array of variable values
    • -
    • access: protected
    • -
    - -
    - array - - createVariableArray - - (array $arVariablePositions, array $arVariableValues) -
    - -
      -
    • - array - $arVariablePositions: Positions of the variables as returned by replacePlaceholders().
    • -
    • - array - $arVariableValues: Array of (variable name, value) pairs
    • -
    - - -
    - -
    - -
    - execute (line 119) -
    - - -

    Executes the given prepared statments, filling the placeholders with the given values.

    -
      -
    • return: Array of database results as returned by Execute()
    • -
    • access: public
    • -
    - -
    - array - - execute - - (array $arDbStatements, array $arVariableValues) -
    - -
      -
    • - array - $arDbStatements: Return value of prepareInDb()
    • -
    • - array - $arVariableValues: Array of (variable name, value) pairs
    • -
    - - -
    - -
    - -
    - prepareInDb (line 39) -
    - - -

    Converts the given queries into sql prepared statments,

    -

    calls the prepare command in the database and returns an array consisting of subarrays. They contain the db's prepared statement as first value, and an array of variable positions as second value (key is the position, the sparql variable is the value).

    -
      -
    • return: Array of (prepared statment, variable positions) pairs
    • -
    • access: public
    • -
    - -
    - array - - prepareInDb - - (array $arQueries, array $arPlaceholders) -
    - -
      -
    • - array - $arQueries: Array of sql queries part arrays
    • -
    • - array - $arPlaceholders: Array of sparql (variable name => placeholder name) pairs
    • -
    - - -
    - -
    - -
    - replacePlaceholders (line 77) -
    - - -

    Replaces the placeholders in the given SQL statement with real SQL prepared statements placeholders.

    -
      -
    • return: (prepared sql query string, variable positions) pair
    • -
    • access: protected
    • -
    - -
    - array - - replacePlaceholders - - (string $strQuery, array $arPlaceholders) -
    - -
      -
    • - string - $strQuery: SQL query with placeholders
    • -
    • - array - $arPlaceholders: Array of sparql (variable name => placeholder name) pairs
    • -
    - - -
    - -
    - -
    - replacePlaceholdersCb (line 95) -
    - - -

    Callback method internally used by replacePlaceholders() method.

    -
      -
    • access: protected
    • -
    - -
    - void - - replacePlaceholdersCb - - ( $matches) -
    - -
      -
    • - - $matches
    • -
    - - -
    - -
    - -
    - replacePlaceholdersWithVariables (line 178) -
    - - -

    Replaces all placeholders with their actual values.

    -
      -
    • access: public
    • -
    - -
    - void - - replacePlaceholdersWithVariables - - ( $strQuery,  $arPlaceholders,  $arVariableValues) -
    - -
      -
    • - - $strQuery
    • -
    • - - $arPlaceholders
    • -
    • - - $arVariableValues
    • -
    - - -
    - -
    - -
    - replacePlaceholdersWithVariablesCb (line 198) -
    - - -

    Callback method internally used by replacePlaceholdersWithVariables() method.

    -
      -
    • access: protected
    • -
    - -
    - void - - replacePlaceholdersWithVariablesCb - - ( $matches) -
    - -
      -
    • - - $matches
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_PreparedStatement.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_PreparedStatement.html deleted file mode 100755 index 61cb0c20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_PreparedStatement.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_PreparedStatement - - - - -
    -

    Class SparqlEngineDb_PreparedStatement

    - - -
    -
    Description
    - -
    - -

    A prepared statement that can be execute()d later multiple times with different variable values.

    - -

    - Located in /sparql/SparqlEngineDb/PreparedStatement.php (line 12) -

    - - -
    SparqlEngine_PreparedStatement
    -   |
    -   --SparqlEngineDb_PreparedStatement
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $sparqlEngine -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlEngineDb_PreparedStatement - __construct - (SparqlEngineDb $sparqlEngine) -
    - -
    - mixed - execute - (array $arVariables, [string $resultform = false]) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $sparqlEngine - = null (line 14) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_PreparedStatement - - __construct - - (SparqlEngineDb $sparqlEngine) -
    - - - - -
    - -
    - -
    - execute (line 31) -
    - - -

    Execute the prepared statement and returns the result.

    -
      -
    • return: Anything a sparql query can return
    • -
    • access: public
    • -
    - -
    - mixed - - execute - - (array $arVariables, [string $resultform = false]) -
    - -
      -
    • - array - $arVariables: Array of sparql query variables => values
    • -
    • - string - $resultform: Which result form you need
    • -
    - -
    -
    Redefinition of:
    -
    -
    SparqlEngine_PreparedStatement::execute()
    -
    - -
    -

    Inherited Methods

    - - -

    Inherited From SparqlEngine_PreparedStatement

    -
    - SparqlEngine_PreparedStatement::execute()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultConverter.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultConverter.html deleted file mode 100755 index 3d6e604a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultConverter.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultConverter - - - - -
    -

    Class SparqlEngineDb_ResultConverter

    - - -
    -
    Description
    - -
    - -

    Converts a database result into a proper rdf statement triple array

    - -

    - Located in /sparql/SparqlEngineDb/ResultConverter.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - convertFromDbResults - (array $arRecordSets, SparqlEngineDb $engine, [mixed $resultform = false]) -
    - -
    - static mixed - loadClass - (string $strClass) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static convertFromDbResults (line 30) -
    - - -

    Determines the correct renderer and calls it.

    -

    The $resultform may be:

    • false: The default renderer is taken then
    • an object that implements SparqlEngineDb_ResultRenderer interface
    • a string like "HTML" or "XML". The appropriate renderer is used then.
    • a full class name, e.g. SparqlEngineDb_ResultRenderer_XML

    -
      -
    • return: Most likely an array or a boolean value, or anything else as determined by $resultform
    • -
    • access: public
    • -
    - -
    - static mixed - - convertFromDbResults - - (array $arRecordSets, SparqlEngineDb $engine, [mixed $resultform = false]) -
    - -
      -
    • - array - $arRecordSets: Array of anything ADOConnection::Execute() can return
    • -
    • - SparqlEngineDb - $engine: Sparql database engine.
    • -
    • - mixed - $resultform: Which format the results shall be in (false or "xml")
    • -
    - - -
    - -
    - -
    - static loadClass (line 84) -
    - - -

    Tries to load a given class if it doesn't exist, and returns true if the class can be used.

    -
      -
    • return: Class name if the class is loaded and can be used, false if not.
    • -
    • access: protected
    • -
    - -
    - static mixed - - loadClass - - (string $strClass) -
    - -
      -
    • - string - $strClass: Classname
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer.html deleted file mode 100755 index c23ccca3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer - - - - -
    -

    Interface SparqlEngineDb_ResultRenderer

    - - -
    -
    Description
    - -
    - -

    Result renderer interface that any result renderer needs to implement.

    -

    A result renderer converts the raw database results into a

    • for the user - usable result format, e.g. php arrays, xml, json and
    so on.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromDbResults (line 24) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_Default.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_Default.html deleted file mode 100755 index 7ec8e93c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_Default.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_Default - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_Default

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Default RAP result renderer.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/Default.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - constructGraph - (array $arVartable, GraphPattern $constructPattern) -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - Resource - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - Resource - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - Statement - createStatementFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase) -
    - -
    - Resource - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - array - getVariableArrayFromRecordSet - ( $dbRecordSet,  $strResultForm) -
    - -
    - void - getVariableArrayFromRecordSets - ( $arRecordSets,  $strResultForm) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 24) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - constructGraph (line 286) -
    - - -

    Constructs a result graph.

    -
      -
    • return: The result graph which matches the CONSTRUCT pattern
    • -
    • access: protected
    • -
    - -
    - MemModel - - constructGraph - - (array $arVartable, GraphPattern $constructPattern) -
    - -
      -
    • - array - $arVartable: A table containing the result vars and their bindings
    • -
    • - GraphPattern - $constructPattern: The CONSTRUCT pattern
    • -
    - - -
    - -
    - -
    - convertFromDbResults (line 41) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 252) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple object resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 229) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple predicate resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createStatementFromDbRecordSetPart (line 176) -
    - - -

    Creates an RDF Statement object for one of the variables contained in the given $dbRecordSet object.

    -
      -
    • return: RDF statement object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Statement - - createStatementFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 198) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: RDF triple subject resource object
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - Resource - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - getVariableArrayFromRecordSet (line 124) -
    - - -

    Converts a ADORecordSet object into an array of "rows" that are subarrays of variable => value pairs.

    -
      -
    • access: protected
    • -
    - -
    - array - - getVariableArrayFromRecordSet - - ( $dbRecordSet,  $strResultForm) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Anything ADOConnection::Execute() can return
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    - -
    - getVariableArrayFromRecordSets (line 103) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getVariableArrayFromRecordSets - - ( $arRecordSets,  $strResultForm) -
    - -
      -
    • - - $arRecordSets
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_HTML.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_HTML.html deleted file mode 100755 index c34425d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_HTML.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_HTML - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_HTML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Sparql DB HTML result renderer.

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/HTML.php (line 11) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    - boolean - $bWrap -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - string - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - void - createTableFromRecords - ( $arRecordSets) -
    - -
    - void - getHtmlBlank - ( $value) -
    - -
    - void - getHtmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getHtmlNull - () -
    - -
    - void - getHtmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 29) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - boolean - $bWrap - = true (line 17) - -
    - - -

    If the result HTML should be wrapped in a div

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromDbResults (line 45) -
    - - -

    Converts the database results into nice HTML.

    -
      -
    • return: HTML code
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 230) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 208) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 180) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createTableFromRecords (line 111) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTableFromRecords - - ( $arRecordSets) -
    - -
      -
    • - - $arRecordSets
    • -
    - - -
    - -
    - -
    - getHtmlBlank (line 260) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlLiteral (line 277) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getHtmlNull (line 253) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlNull - - () -
    - - - -
    - -
    - -
    - getHtmlResource (line 267) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 97) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_XML.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_XML.html deleted file mode 100755 index 3450b28b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_ResultRenderer_XML.html +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_ResultRenderer_XML - - - - -
    -

    Class SparqlEngineDb_ResultRenderer_XML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/

    - -

    - Located in /sparql/SparqlEngineDb/ResultRenderer/XML.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - array - $arCreationMethods -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - getSpokenBoolean - ( $b) -
    - -
    - mixed - convertFromDbResults - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
    - void - createFromRecords - ( $arRecordSets,  $strResultForm) -
    - -
    - string - createObjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createPredicateFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - string - createSubjectFromDbRecordSetPart - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
    - void - getHead - ([ $strXml = '']) -
    - -
    - void - getResultXml - ( $arResult) -
    - -
    - void - getXmlBlank - ( $value) -
    - -
    - void - getXmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getXmlNull - () -
    - -
    - void - getXmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - array - $arCreationMethods - = array( -
    's' => 'createSubjectFromDbRecordSetPart', -
    'p' => 'createPredicateFromDbRecordSetPart', -
    'o' => 'createObjectFromDbRecordSetPart' -
    )
    (line 25) -
    -
    - - -

    Defines the methods needed to create the types in $arVarAssignments.

    -

    Key is the type (e.g. "s" for subject), and value the method's name.

    -
      -
    • see: $arVarAssignments
    • -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getSpokenBoolean (line 195) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - getSpokenBoolean - - ( $b) -
    - -
      -
    • - - $b
    • -
    - - -
    - -
    - -
    - convertFromDbResults (line 41) -
    - - -

    Converts the database results into nice HTML.

    -
      -
    • return: HTML code
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromDbResults - - (array $arRecordSets, Query $query, SparqlEngineDb $engine) -
    - -
      -
    • - array - $arRecordSets: Array of (possibly several) SQL query results.
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngineDb - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngineDb_ResultRenderer::convertFromDbResults()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createFromRecords (line 119) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createFromRecords - - ( $arRecordSets,  $strResultForm) -
    - -
      -
    • - - $arRecordSets
    • -
    • - - $strResultForm
    • -
    - - -
    - -
    - -
    - createObjectFromDbRecordSetPart (line 263) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createObjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createPredicateFromDbRecordSetPart (line 241) -
    - - -

    Creates an RDF predicate object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createPredicateFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - createSubjectFromDbRecordSetPart (line 213) -
    - - -

    Creates an RDF subject object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createSubjectFromDbRecordSetPart - - ( $dbRecordSet, string $strVarBase,  $strVarName) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $strVarName
    • -
    - - -
    - -
    - -
    - getHead (line 110) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHead - - ([ $strXml = '']) -
    - -
      -
    • - - $strXml
    • -
    - - -
    - -
    - -
    - getResultXml (line 176) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getResultXml - - ( $arResult) -
    - -
      -
    • - - $arResult
    • -
    - - -
    - -
    - -
    - getXmlBlank (line 293) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getXmlLiteral (line 307) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getXmlNull (line 286) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlNull - - () -
    - - - -
    - -
    - -
    - getXmlResource (line 300) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getXmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 99) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGenerator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGenerator.html deleted file mode 100755 index 6c98117c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGenerator.html +++ /dev/null @@ -1,1132 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlGenerator - - - - -
    -

    Class SparqlEngineDb_SqlGenerator

    - - -
    -
    Description
    - -
    - -

    Creates sql statements from a Query object

    - -

    - Located in /sparql/SparqlEngineDb/SqlGenerator.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $arTableColumnNames -
    -
    - array - $arPlaceholders -
    - -
    - array - $arUsedVarAssignments -
    -
    - array - $arUsedVarTypes -
    -
    - array - $arVarAssignments -
    - -
    - int - $nUnionCount -
    -
    - mixed - $query -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static string - getSqlEqualityCondition - (array $arNew, array $arOld) -
    - -
    - static boolean - isEmptyPattern - (GraphPattern $graphPattern) -
    - -
    - static boolean - isPreparedVariable - ( $bject) -
    - -
    - static boolean - isResultVar - (string $strVar,  &$arResultVars, array $arResultVars) -
    - -
    - static boolean - isVariable - ( $bject) -
    - -
    - static array - removeNull - (array $array) -
    - -
    - SparqlEngineDb_SqlGenerator - __construct - (Query $query,  $dbConn,  $modelID) -
    - -
    - array - createEqualSelects - (array $arSelect) -
    - -
    - array - createSql - () -
    - -
    - void - fixWhere - ( $strWhere) -
    - -
    - void - getPlaceholders - () -
    - -
    - string - getPreparedVariablePlaceholder - (string $strVariable) -
    - -
    - string - getSqlCondition - (mixed $bject, string $strTablePrefix, string $strType) -
    - -
    - void - getSqlVariableName - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameDatatype - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameIs - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameLanguage - ( $strSparqlVar) -
    - -
    - void - getSqlVariableNameValue - ( $strSparqlVar) -
    - -
    - array - getTripleSql - (QueryTriple $triple, GraphPattern $graphPattern,  $arResultVars) -
    - -
    - void - getUsedVarAssignments - () -
    - -
    - void - getUsedVarTypes - () -
    - -
    - void - getVarAssignments - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $arTableColumnNames - = array( -
    's' => array( -
    'value' => 'subject', -
    'is' => 'subject_is' -
    ),'p'=>array('value'=>'predicate'),'o'=>array('value'=>'object','is'=>'object_is'))
    (line 108) -
    -
    - - -

    Column names for subjects, predicates and objects for easy access via their character names (spo).

    -
      -
    • access: public
    • -
    - - - - - -
    - - -
    - -
    - - array - $arPlaceholders - = array() (line 99) - -
    - - -

    Array with placeholders of prepared statements variables.

    -

    key is the variable name (without "??"), value is the placeholder.

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $arUnionVarAssignments - = array() (line 72) - -
    - - -

    Array of arrays that contain all variable names which are to be found in the result of an sql statement in a union.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arUsedVarAssignments - = array() (line 51) - -
    - - -

    Array of variable name => table.col assignments for all variables used in the query not only the ones that shall be returned.

    -
      -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arUsedVarTypes - = array() (line 91) - -
    - - -

    Which variables have been used as which type? key is variable name, value is an array of max. three keys (s, p, o)

    -
      -
    • access: protected
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - array - $arVarAssignments - = array() (line 37) - -
    - - -

    Determines which variables can be found in which SQL result column.

    -
      -
    • see: $arCreationMethods
    • -
    • access: public
    • -
    • example: example not found
    • -
    - - - - - -
    - -
    - -
    - - mixed - $nSqlVariableNameCount - = 0 (line 128) - -
    - - -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $nUnionCount - = 0 (line 126) - -
    - - -

    Current UNION part number

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - mixed - $query - = null (line 15) - -
    - - -
      -
    • access: public
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static getSqlEqualityCondition (line 652) -
    - - -

    Checks if the sentence part (subject, predicate or object) in $arNew has the same content as $arOld.

    -

    Required for queries like ":x ?a ?a" where predicate and object need to have the same value

    -
      -
    • access: protected
    • -
    - -
    - static string - - getSqlEqualityCondition - - (array $arNew, array $arOld) -
    - -
      -
    • - array - $arNew: array($strTablePrefix, $strType = s|p|o)
    • -
    • - array - $arOld: array($strTablePrefix, $strType = s|p|o)
    • -
    - - -
    - -
    - -
    - static isEmptyPattern (line 798) -
    - - -

    Checks if the graph pattern is empty (contains no usable data).

    -

    Occurs when using "{}" without pre- or suffixes WHERE { { ?person rdf:type foaf:Person } . }

    -
      -
    • return: True if the pattern is empty.
    • -
    • access: protected
    • -
    - -
    - static boolean - - isEmptyPattern - - (GraphPattern $graphPattern) -
    - -
      -
    • - GraphPattern - $graphPattern: Graph pattern to check
    • -
    - - -
    - -
    - -
    - static isPreparedVariable (line 728) -
    - - -

    Checks if the given variable is a replacement for a prepared statement.

    -
      -
    • access: public
    • -
    - -
    - static boolean - - isPreparedVariable - - ( $bject) -
    - -
      -
    • - - $bject
    • -
    - - -
    - -
    - -
    - static isResultVar (line 701) -
    - - -

    Checks if the given variable name is part of the result variables list.

    -

    Needed since $arResultVars may contain "*" that captures all variables.

    -
      -
    • return: true if it is a result variable
    • -
    • access: protected
    • -
    - -
    - static boolean - - isResultVar - - (string $strVar,  &$arResultVars, array $arResultVars) -
    - -
      -
    • - string - $strVar: Variable name (e.g. "?p")
    • -
    • - array - $arResultVars: Array with result variables
    • -
    • - - &$arResultVars
    • -
    - - -
    - -
    - -
    - static isVariable (line 714) -
    - - -

    Checks if the given subject/predicate/object is a variable name.

    -
      -
    • access: public
    • -
    - -
    - static boolean - - isVariable - - ( $bject) -
    - -
      -
    • - - $bject
    • -
    - - -
    - -
    - -
    - static removeNull (line 817) -
    - - -

    Removes all NULL values from an array and returns it.

    -
      -
    • return: without the NULL values.
    • -
    • access: protected
    • -
    - -
    - static array - - removeNull - - (array $array) -
    - -
      -
    • - array - $array: Some array
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 132) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_SqlGenerator - - __construct - - (Query $query,  $dbConn,  $modelID) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    • - - $modelID
    • -
    - - -
    - -
    - -
    - createEqualSelects (line 466) -
    - - -

    Creates SELECT statements that have the same number of columns.

    -

    Needed for UNIONs.

    -
      -
    • return: Array of SELECT strings
    • -
    • access: protected
    • -
    - -
    - array - - createEqualSelects - - (array $arSelect) -
    - -
      -
    • - array - $arSelect: Array of arrays. array( //for each union part one
      1. => array( - //foreach triple pattern - 0 => array( - '?person' => array( - 't0.subject as "t0.subject"' - ) - )
      ) )
    • -
    - - -
    - -
    - -
    - createSql (line 150) -
    - - -

    Creates an SQL query string from the given Sparql query object.

    -
      -
    • return: Array of arrays of SQL query string parts: select, from and where
    • -
    • throws: SparqlEngineDb_SqlGeneratorException If there is no variable in the result set.
    • -
    - -
    - array - - createSql - - () -
    - - - -
    - -
    - -
    - fixWhere (line 833) -
    - - -

    Removes a leading AND from the where clause which would render the sql illegal.

    -
      -
    • access: protected
    • -
    - -
    - void - - fixWhere - - ( $strWhere) -
    - -
      -
    • - - $strWhere
    • -
    - - -
    - -
    - -
    - getPlaceholders (line 758) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getPlaceholders - - () -
    - - - -
    - -
    - -
    - getPreparedVariablePlaceholder (line 746) -
    - - -

    Returns a placeholder to be included in the sql statement.

    -

    It will be replaced with a real prepared statement variable later on. Also adds it to the internal placeholder array.

    -
      -
    • return: placeholder
    • -
    • access: protected
    • -
    - -
    - string - - getPreparedVariablePlaceholder - - (string $strVariable) -
    - -
      -
    • - string - $strVariable: The variable to get a placeholder for
    • -
    - - -
    - -
    - -
    - getSqlCondition (line 558) -
    - - -

    Creates an SQL statement that checks for the value of some subject/predicate/object

    -
      -
    • return: Part of the SQL query (prefixed with AND)
    • -
    - -
    - string - - getSqlCondition - - (mixed $bject, string $strTablePrefix, string $strType) -
    - -
      -
    • - mixed - $bject: subject|predicate|object
    • -
    • - string - $strTablePrefix: Table prefix (e.g. "t0")
    • -
    • - string - $strType: Type of $bject ('subject'|'predicate'|'object')
    • -
    - - -
    - -
    - -
    - getSqlVariableName (line 844) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableName - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameDatatype (line 886) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameDatatype - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameIs (line 868) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameIs - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameLanguage (line 877) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameLanguage - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getSqlVariableNameValue (line 859) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getSqlVariableNameValue - - ( $strSparqlVar) -
    - -
      -
    • - - $strSparqlVar
    • -
    - - -
    - -
    - -
    - getTripleSql (line 286) -
    - - -

    Creates some SQL statements from the given triple pattern array.

    -
      -
    • return: Array consisting of on array and two string values: SELECT, FROM and WHERE part
    • -
    - -
    - array - - getTripleSql - - (QueryTriple $triple, GraphPattern $graphPattern,  $arResultVars) -
    - -
      -
    • - QueryTriple - $triple: Array containing subject, predicate and object
    • -
    • - GraphPattern - $graphPattern: Graph pattern object
    • -
    • - - $arResultVars
    • -
    - - -
    - -
    - -
    - getUsedVarAssignments (line 772) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getUsedVarAssignments - - () -
    - - - -
    - -
    - -
    - getUsedVarTypes (line 779) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getUsedVarTypes - - () -
    - - - -
    - -
    - -
    - getVarAssignments (line 765) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - getVarAssignments - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:24 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGeneratorException.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGeneratorException.html deleted file mode 100755 index 3b54fc62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlGeneratorException.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlGeneratorException - - - - -
    -

    Class SparqlEngineDb_SqlGeneratorException

    - - -
    -
    Description
    - -
    - -

    Exception when generating the SQL statement

    - -

    - Located in /sparql/SparqlEngineDb/SqlGeneratorException.php (line 9) -

    - - -
    Exception
    -   |
    -   --SparqlEngineDb_SqlGeneratorException
    - -
    -
    - - - - - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Exception (Internal Class)

    -
    - - $code
    -
    - - $file
    -
    - - $line
    -
    - - $message
    -
    - - $string
    -
    - - $trace
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - -

    Inherited Methods

    - - -

    Inherited From Exception (Internal Class)

    -
    - constructor __construct ( )
    - getCode ( )
    - getFile ( )
    - getLine ( )
    - getMessage ( )
    - getTrace ( )
    - getTraceAsString ( )
    - __clone ( )
    - __toString ( )
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlMerger.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlMerger.html deleted file mode 100755 index 7684fc8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_SqlMerger.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_SqlMerger - - - - -
    -

    Class SparqlEngineDb_SqlMerger

    - - -
    -
    Description
    - -
    - -

    Creates an sql string from an sql array

    - -

    - Located in /sparql/SparqlEngineDb/SqlMerger.php (line 10) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - getCount - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
    - static void - getSelect - (Query $query,  $arSqls, [ $strAdditional = '']) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static getCount (line 30) -
    - - -
      -
    • access: public
    • -
    - -
    - static void - - getCount - - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
      -
    • - Query - $query
    • -
    • - - $arSqls
    • -
    • - - $strAdditional
    • -
    - - -
    - -
    - -
    - static getSelect (line 12) -
    - - -
      -
    • access: public
    • -
    - -
    - static void - - getSelect - - (Query $query,  $arSqls, [ $strAdditional = '']) -
    - -
      -
    • - Query - $query
    • -
    • - - $arSqls
    • -
    • - - $strAdditional
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_TypeSorter.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_TypeSorter.html deleted file mode 100755 index 8b22fc85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngineDb_TypeSorter.html +++ /dev/null @@ -1,724 +0,0 @@ - - - - - - Docs For Class SparqlEngineDb_TypeSorter - - - - -
    -

    Class SparqlEngineDb_TypeSorter

    - - -
    -
    Description
    - -
    - -

    Sorts database types as the Sparql specs want it.

    - -

    - Located in /sparql/SparqlEngineDb/TypeSorter.php (line 9) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $arCastTypes -
    -
    - static array - $arTypeNumbers -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static int - compareXsdType - (string $strType1, string $strType2) -
    - -
    - static string - getCastMethod - (string $strType, string $strSqlVar) -
    - -
    - static int - getXsdTypeNumber - (string $strType) -
    - -
    - SparqlEngineDb_TypeSorter - __construct - (Query $query,  $dbConn) -
    - -
    - int - compareTypeSet - (array $arTs1, array $arTs2) -
    - -
    - array - getOrderifiedSqls - ( $arSqls, string $strSelect, string $strFrom, string $strWhere) -
    - -
    - array - getSpecialOrderVariables - () -
    - -
    - string - getSqlOrderBy - ([arrray $arTypeSet = array()]) -
    - -
    - void - getStringNullComparison - ( $str) -
    - -
    - array - getTypeSets - (array $arSpecialVars, string $strFrom, string $strWhere) -
    - -
    - string - getTypesetWhereClause - (array $arTypeSet) -
    - -
    - boolean - isSpecialOrderVariable - (string $strVar) -
    - -
    - array - orderTypeSets - (array $arTypes) -
    - -
    - void - setData - (SparqlEngineDb_SqlGenerator $sg) -
    - -
    - boolean - willBeDataDependent - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $arCastTypes - = array( -
    'http://www.w3.org/2001/XMLSchema#integer' => 'SIGNED INTEGER' -
    )
    (line 28) -
    -
    - - -

    SQL types to cast XSD schema types to, so that they will get sorted correctly.

    -
      -
    • access: public
    • -
    - - - - - -
    - -
    - -
    - - static array - $arTypeNumbers - = array( -
    null => 0,//empty -
    'b' => 1,//blank -
    'r' => 2,//resource -
    'l' => 3,//literal -
    )
    (line 16) -
    -
    - - -

    Defines the sort order for value types in the database, so that they get sorted correctly as the specs want it.

    -
      -
    • access: public
    • -
    - - - - - -
    - - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static compareXsdType (line 310) -
    - - -

    Compares two XSD data types and returns the comparison number.

    -
      -
    • return: Comparison number (<0 if $strType1 is less than $strType2, 0 if equal, >0 if type2 is greater)
    • -
    • access: public
    • -
    - -
    - static int - - compareXsdType - - (string $strType1, string $strType2) -
    - -
      -
    • - string - $strType1: First data type
    • -
    • - string - $strType2: Second data type
    • -
    - - -
    - -
    - -
    - static getCastMethod (line 383) -
    - - -

    Returns the SQL statement needed to case the given variable to the given type.

    -
      -
    • return: SQL command to cast the variable
    • -
    • access: protected
    • -
    - -
    - static string - - getCastMethod - - (string $strType, string $strSqlVar) -
    - -
      -
    • - string - $strType: XML data type
    • -
    • - string - $strSqlVar: SQL variable name
    • -
    - - -
    - -
    - -
    - static getXsdTypeNumber (line 323) -
    - - -

    Returns the type number for an xsd data type.

    -
      -
    • return: Some integer to compare two types.
    • -
    • access: public
    • -
    - -
    - static int - - getXsdTypeNumber - - (string $strType) -
    - -
      -
    • - string - $strType: XSD data type
    • -
    - - -
    - -
    - -
    - Constructor __construct (line 34) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlEngineDb_TypeSorter - - __construct - - (Query $query,  $dbConn) -
    - -
      -
    • - Query - $query
    • -
    • - ADOConnection - $dbConn
    • -
    - - -
    - -
    - -
    - compareTypeSet (line 273) -
    - - -

    Compares two type sets. Works like a normal comparision method that returns -1/0/1 for use in usort()

    -
      -
    • return: Comparison value
    • -
    • access: public
    • -
    - -
    - int - - compareTypeSet - - (array $arTs1, array $arTs2) -
    - -
      -
    • - array - $arTs1: First typeset
    • -
    • - array - $arTs2: Second typeset
    • -
    - - -
    - -
    - -
    - getOrderifiedSqls (line 81) -
    - - -

    Returns an array of sql statements that need to be executed and deliver the full result set when combined.

    -

    Execute setData() before this.

    -
      -
    • return: Array of arrays. Imploding an array will give a complete sql statement. The array will have the keys select/from/where/order.
    • -
    • access: public
    • -
    - -
    - array - - getOrderifiedSqls - - ( $arSqls, string $strSelect, string $strFrom, string $strWhere) -
    - -
      -
    • - string - $strSelect: SELECT clause
    • -
    • - string - $strFrom: FROM clause
    • -
    • - string - $strWhere: WHERE clause
    • -
    • - - $arSqls
    • -
    - - -
    - -
    - -
    - getSpecialOrderVariables (line 156) -
    - - -

    Returns an array of variables that the result is going to be ordered by and that need to be sorted multiple times (because they may contain different data types)

    -
      -
    • return: Array of sparql variable names
    • -
    • access: protected
    • -
    - -
    - array - - getSpecialOrderVariables - - () -
    - - - -
    - -
    - -
    - getSqlOrderBy (line 347) -
    - - -

    Returns the ORDER BY sql query string if neccessary for the query. The returned string already has ORDER BY prefixed.

    -
      -
    • return: ORDER BY ... string or empty string
    • -
    - -
    - string - - getSqlOrderBy - - ([arrray $arTypeSet = array()]) -
    - -
      -
    • - arrray - $arTypeSet: Single typeset
    • -
    - - -
    - -
    - -
    - getStringNullComparison (line 430) -
    - - -

    Returns the correct sql string comparison method.

    -
      -
    • access: protected
    • -
    - -
    - void - - getStringNullComparison - - ( $str) -
    - -
      -
    • - - $str
    • -
    - - -
    - -
    - -
    - getTypeSets (line 205) -
    - - -

    Determines the type sets in the query results.

    -

    A type set is a distinct set of variables and their types, e.g. the variable and its type (r/b/l) and its datatype if its an object.

    -
      -
    • return: Key is the sparql variable name, value is an array. This one has one key 'type' with a value of b/l/r. It might have another key 'datatype' with the resource's datatype.
    • -
    • access: protected
    • -
    - -
    - array - - getTypeSets - - (array $arSpecialVars, string $strFrom, string $strWhere) -
    - -
      -
    • - array - $arSpecialVars: Special variables as returned by getSpecialOrderVariables()
    • -
    • - string - $strFrom: FROM part of the sql query
    • -
    • - string - $strWhere: WHERE part of the sql query
    • -
    - - -
    - -
    - -
    - getTypesetWhereClause (line 403) -
    - - -

    Creates and returns the SQL WHERE clauses needed to get only data in the given typeset.

    -
      -
    • return: Clauses for the WHERE part in an SQL query
    • -
    • access: protected
    • -
    - -
    - string - - getTypesetWhereClause - - (array $arTypeSet) -
    - -
      -
    • - array - $arTypeSet: Typeset
    • -
    - - -
    - -
    - -
    - isSpecialOrderVariable (line 181) -
    - - -

    Checks if a given variable name is a variable that needs special care when used in ORDER BY statements.

    -
      -
    • return: true if the variable needs special care
    • -
    • access: protected
    • -
    - -
    - boolean - - isSpecialOrderVariable - - (string $strVar) -
    - -
      -
    • - string - $strVar: SPARQL variable name
    • -
    - - -
    - -
    - -
    - orderTypeSets (line 247) -
    - - -

    Takes an array of type sets (as returned by getTypeSets()) and sorts the variables according to the SPARQL specs.

    -
      -
    • return: Ordered array of type sets
    • -
    • access: protected
    • -
    - -
    - array - - orderTypeSets - - (array $arTypes) -
    - -
      -
    • - array - $arTypes: Array of type sets
    • -
    - - -
    - -
    - -
    - setData (line 46) -
    - - -

    Needs to be executed before getOrderifiedSqls and willBeDataDependent

    -
      -
    • access: public
    • -
    - -
    - void - - setData - - (SparqlEngineDb_SqlGenerator $sg) -
    - - - - -
    - -
    - -
    - willBeDataDependent (line 138) -
    - - -

    Returns wether the returned queries will depend on the data or not.

    -

    If the queries depend on the data, they cannot be prepare()d and thus won't be that fast when executing.

    Execute setData() before this.

    -
      -
    • access: public
    • -
    - -
    - boolean - - willBeDataDependent - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_PreparedStatement.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_PreparedStatement.html deleted file mode 100755 index 0471a4c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_PreparedStatement.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - Docs For Class SparqlEngine_PreparedStatement - - - - -
    -

    Class SparqlEngine_PreparedStatement

    - - -
    -
    Description
    - -
    - -

    A prepared statement that can be execute()d later multiple times with different variable values.

    -

    - Located in /sparql/SparqlEngine/PreparedStatement.php (line 8) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - -
    ClassDescription
    SparqlEngineDb_PreparedStatement - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - execute - ( $arVariables,  $resultform) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - execute (line 10) -
    - - -
      -
    • access: public
    • -
    - -
    - void - - execute - - ( $arVariables,  $resultform) -
    - -
      -
    • - - $arVariables
    • -
    • - - $resultform
    • -
    - - -
    -
    Redefined in descendants as:
    - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultConverter.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultConverter.html deleted file mode 100755 index 633cec0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultConverter.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultConverter - - - - -
    -

    Class SparqlEngine_ResultConverter

    - - -
    -
    Description
    - -
    - -

    Converts a memory result into a proper rdf statement triple array

    - -

    - Located in /sparql/SparqlEngine/ResultConverter.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - static mixed - convertFromResult - (array $arVartable, SparqlEngine $engine, [mixed $resultform = false]) -
    - -
    - static mixed - loadClass - (string $strClass) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - static convertFromResult (line 30) -
    - - -

    Determines the correct renderer and calls it.

    -

    The $resultform may be:

    • false: The default renderer is taken then
    • an object that implements SparqlEngine_ResultRenderer interface
    • a string like "HTML" or "XML". The appropriate renderer is used then.
    • a full class name, e.g. SparqlEngine_ResultRenderer_XML

    -
      -
    • return: Most likely an array or a boolean value, or anything else as determined by $resultform
    • -
    • access: public
    • -
    - -
    - static mixed - - convertFromResult - - (array $arVartable, SparqlEngine $engine, [mixed $resultform = false]) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - SparqlEngine - $engine: Sparql database engine.
    • -
    • - mixed - $resultform: Which format the results shall be in (false or "xml")
    • -
    - - -
    - -
    - -
    - static loadClass (line 84) -
    - - -

    Tries to load a given class if it doesn't exist, and returns true if the class can be used.

    -
      -
    • return: Class name if the class is loaded and can be used, false if not.
    • -
    • access: protected
    • -
    - -
    - static mixed - - loadClass - - (string $strClass) -
    - -
      -
    • - string - $strClass: Classname
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer.html deleted file mode 100755 index 71b234f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer - - - - -
    -

    Interface SparqlEngine_ResultRenderer

    - - -
    -
    Description
    - -
    - -

    Result renderer interface that any result renderer needs to implement.

    -

    A result renderer converts results into a

    • for the user - usable result format, e.g. php arrays, xml, json and
    so on.

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - mixed - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 24) -
    - - -

    Converts the database results into the desired output format and returns the result.

    -
      -
    • return: The result as rendered by the result renderers.
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_Default.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_Default.html deleted file mode 100755 index b770fc2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_Default.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_Default - - - - -
    -

    Class SparqlEngine_ResultRenderer_Default

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    Default result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/Default.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - constructGraph - (array $arVartable, GraphPattern $constructPattern) -
    - -
    - mixed - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - MemModel - describeGraph - (array $arVartable) -
    - -
    - String - _determineType - (Node $var, MemModel $resultGraph) -
    - -
    - void - _getAttributes - (Array $list, MemModel $resultGraph,  $varvalue) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - constructGraph (line 78) -
    - - -

    Constructs a result graph.

    -
      -
    • return: The result graph which matches the CONSTRUCT pattern
    • -
    - -
    - MemModel - - constructGraph - - (array $arVartable, GraphPattern $constructPattern) -
    - -
      -
    • - array - $arVartable: A table containing the result vars and their bindings
    • -
    • - GraphPattern - $constructPattern: The CONSTRUCT pattern
    • -
    - - -
    - -
    - -
    - convertFromResult (line 23) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: Most likely an array
    • -
    • access: public
    • -
    - -
    - mixed - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - describeGraph (line 134) -
    - - -

    Builds a describing named graph. To define an attribute list for a several rdf:type look at constants.php

    - -
    - MemModel - - describeGraph - - (array $arVartable) -
    - -
      -
    • - array - $arVartable
    • -
    - - -
    - -
    - -
    - _determineType (line 179) -
    - - -

    Tries to determine the rdf:type of the variable.

    -
      -
    • return: Uri of the rdf:type
    • -
    • access: protected
    • -
    - -
    - String - - _determineType - - (Node $var, MemModel $resultGraph) -
    - -
      -
    • - Node - $var: The variable
    • -
    • - MemModel - $resultGraph: The result graph which describes the Resource
    • -
    - - -
    - -
    - -
    - _getAttributes (line 228) -
    - - -

    Search the attributes listed in $list in the dataset.

    -

    Modifies $resultGraph

    -
      -
    • access: protected
    • -
    - -
    - void - - _getAttributes - - (Array $list, MemModel $resultGraph,  $varvalue) -
    - -
      -
    • - Array - $list: List containing the attributes
    • -
    • - MemModel - $resultGraph: The result graph which describes the Resource
    • -
    • - - $varvalue
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_HTML.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_HTML.html deleted file mode 100755 index 2b5c1eb8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_HTML.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_HTML - - - - -
    -

    Class SparqlEngine_ResultRenderer_HTML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    XML result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/HTML.php (line 13) -

    - - -
    
    -	
    -			
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - boolean - $bWrap -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - string - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - void - createTableFromRecords - ( $arVartable) -
    - -
    - string - createValue - ( $value, ADORecordSet $dbRecordSet, string $strVarBase) -
    - -
    - void - getHtmlBlank - ( $value) -
    - -
    - void - getHtmlLiteral - ( $value,  $language,  $datatype) -
    - -
    - void - getHtmlNull - () -
    - -
    - void - getHtmlResource - ( $value) -
    - -
    - void - wrapCode - ( $strCode) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - boolean - $bWrap - = true (line 19) - -
    - - -

    If the result HTML should be wrapped in a div

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 32) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: HTML result
    • -
    • access: public
    • -
    - -
    - string - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - createTableFromRecords (line 88) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - createTableFromRecords - - ( $arVartable) -
    - -
      -
    • - - $arVartable
    • -
    - - -
    - -
    - -
    - createValue (line 138) -
    - - -

    Creates an RDF object object contained in the given $dbRecordSet object.

    -
      -
    • return: HTML code
    • -
    • see: convertFromDbResult() to understand $strVarBase necessity
    • -
    • access: protected
    • -
    - -
    - string - - createValue - - ( $value, ADORecordSet $dbRecordSet, string $strVarBase) -
    - -
      -
    • - ADORecordSet - $dbRecordSet: Record set returned from ADOConnection::Execute()
    • -
    • - string - $strVarBase: Prefix of the columns the recordset fields have.
    • -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlBlank (line 170) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlBlank - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - getHtmlLiteral (line 184) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlLiteral - - ( $value,  $language,  $datatype) -
    - -
      -
    • - - $value
    • -
    • - - $language
    • -
    • - - $datatype
    • -
    - - -
    - -
    - -
    - getHtmlNull (line 163) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlNull - - () -
    - - - -
    - -
    - -
    - getHtmlResource (line 177) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - getHtmlResource - - ( $value) -
    - -
      -
    • - - $value
    • -
    - - -
    - -
    - -
    - wrapCode (line 74) -
    - - -
      -
    • access: protected
    • -
    - -
    - void - - wrapCode - - ( $strCode) -
    - -
      -
    • - - $strCode
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_XML.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_XML.html deleted file mode 100755 index be68a145..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlEngine_ResultRenderer_XML.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - Docs For Class SparqlEngine_ResultRenderer_XML - - - - -
    -

    Class SparqlEngine_ResultRenderer_XML

    - - -
    -
    Description
    - -
    -

    - Implements interfaces: -

    -

    - -

    XML result renderer for SparqlEngine

    - -

    - Located in /sparql/SparqlEngine/ResultRenderer/XML.php (line 12) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - string - convertFromResult - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
    - String - _getBindingString - (String $varname, Node $varvalue) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - convertFromResult (line 23) -
    - - -

    Converts the database results into the output format and returns the result.

    -
      -
    • return: XML result
    • -
    • access: public
    • -
    - -
    - string - - convertFromResult - - (array $arVartable, Query $query, SparqlEngine $engine) -
    - -
      -
    • - array - $arVartable: Variable table
    • -
    • - Query - $query: SPARQL query object
    • -
    • - SparqlEngine - $engine: Sparql Engine to query the database
    • -
    - -
    -
    Implementation of:
    -
    -
    SparqlEngine_ResultRenderer::convertFromResult()
    -
    Converts the database results into the desired output format and returns the result.
    -
    - -
    - -
    - -
    - _getBindingString (line 92) -
    - - -

    Helper Function for function buildXmlResult($vartable). Generates an xml string for a single variable an their corresponding value.

    -
      -
    • return: The xml string
    • -
    • access: protected
    • -
    - -
    - String - - _getBindingString - - (String $varname, Node $varvalue) -
    - -
      -
    • - String - $varname: The variables name
    • -
    • - Node - $varvalue: The value of the variable
    • -
    - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:46 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParser.html deleted file mode 100755 index 79f48ba2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParser.html +++ /dev/null @@ -1,1640 +0,0 @@ - - - - - - Docs For Class SparqlParser - - - - -
    -

    Class SparqlParser

    - - -
    -
    Description
    - -
    - -

    Parses a SPARQL Query string and returns a Query Object.

    - -

    - Located in /sparql/SparqlParser.php (line 21) -

    - - -
    Object
    -   |
    -   --SparqlParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - static array - $operatorPrecedence -
    -
    - static array - $sops -
    -
    - Query - $query -
    -
    - string - $querystring -
    -
    - int - $tmp -
    -
    - array - $tokens -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - static void - balanceTree - ( &$tree, array $tree) -
    - -
    - static void - fixNegationInFuncName - ( &$tree) -
    - -
    - SparqlParser - SparqlParser - () -
    - -
    - boolean - bNodeCheck - (String $token) -
    - -
    - void - checkDtypeLang - ( &$node, String $node) -
    - -
    - boolean - dtypeCheck - ( &$node, String $node) -
    - -
    - String - error - (SparqlException $e) -
    - -
    - boolean - iriCheck - (String $token) -
    - -
    - boolean - literalCheck - (String $token) -
    - -
    - Query - parse - ([String $queryString = false]) -
    - -
    - void - parseAsk - (string $form) -
    - -
    - void - parseBase - () -
    - -
    - void - parseBrackettedExpression - ( &$constraint, Constraint $constraint) -
    - -
    - Node - parseCollection - ( &$trp, TriplePattern $trp) -
    - -
    - void - parseConstraint - ( &$pattern, boolean $outer, GraphPattern $pattern) -
    - -
    - array - parseConstraintTree - ([ $nLevel = 0], [ $bParameter = false]) -
    - -
    - void - parseConstruct - () -
    - -
    - void - parseDescribe - () -
    - -
    - void - parseExpression - ( &$constraint, Constraint $constrain) -
    - -
    - void - parseFrom - () -
    - -
    - void - parseGraph - (GraphPattern $pattern) -
    - -
    - void - parseGraphPattern - ([int $optional = false], [int $union = false], [string $graph = false], [boolean $constr = false], [ $external = false]) -
    - -
    - void - parseLiteral - ( &$node, String $sep, String $node) -
    - -
    - void - parseModifier - () -
    - -
    - Node - parseNode - ([String $node = false]) -
    - -
    - void - parseOrderCondition - () -
    - -
    - void - parsePrefix - () -
    - -
    - void - parseQuery - () -
    - -
    - void - parseSelect - () -
    - -
    - void - parseTriplePattern - ( &$pattern, GraphPattern $pattern) -
    - -
    - void - parseWhere - () -
    - -
    - void - prepare - () -
    - -
    - boolean - qnameCheck - (String $token) -
    - -
    - void - tokenize - (String $queryString) -
    - -
    - String - uncomment - (String $queryString) -
    - -
    - boolean - varCheck - (String $token) -
    - -
    - void - _fastForward - () -
    - -
    - void - _rewind - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -
    - -
    - - static array - $operatorPrecedence - = array( -
    '||' => 0, -
    '&&' => 1, -
    '=' => 2, -
    '!=' => 3, -
    '<' => 4, -
    '>' => 5, -
    '<=' => 6, -
    '>=' => 7, -
    '*' => 0, -
    '/' => 0, -
    '+' => 0, -
    '-' => 0, -
    )
    (line 69) -
    -
    - - -

    Which order operators are to be treated.

    -

    (11.3 Operator Mapping)

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - static array - $sops - = array( -
    'regex', -
    'bound', -
    'isuri', -
    'isblank', -
    'isliteral', -
    'str', -
    'lang', -
    'datatype', -
    'langmatches' -
    )
    (line 52) -
    -
    - - -

    Operators introduced by sparql

    -
      -
    • access: protected
    • -
    - - - - - -
    - - -
    - -
    - - Query - $query - (line 28) - -
    - - -

    The query Object

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - string - $querystring - (line 34) - -
    - - -

    The Querystring

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - int - $tmp - (line 46) - -
    - - -

    Last parsed graphPattern

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    - -
    - - array - $tokens - = array() (line 40) - -
    - - -

    The tokenized Query

    -
      -
    • access: protected
    • -
    - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - static balanceTree (line 960) -
    - - -

    "Balances" the filter tree in the way that operators on the same level are nested according to their precedence defined in $operatorPrecedence array.

    -
      -
    • access: protected
    • -
    - -
    - static void - - balanceTree - - ( &$tree, array $tree) -
    - -
      -
    • - array - $tree: Tree to be modified
    • -
    • - - &$tree
    • -
    - - -
    - -
    - -
    - static fixNegationInFuncName (line 983) -
    - - -
      -
    • access: protected
    • -
    - -
    - static void - - fixNegationInFuncName - - ( &$tree) -
    - -
      -
    • - - &$tree
    • -
    - - -
    - -
    - -
    - Constructor SparqlParser (line 89) -
    - - -

    Constructor of SparqlParser

    -
      -
    • access: public
    • -
    - -
    - SparqlParser - - SparqlParser - - () -
    - - - -
    - -
    - -
    - bNodeCheck (line 478) -
    - - -

    Checks if $token is a Blanknode.

    -
      -
    • return: TRUE if the token is BNode false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - bNodeCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - checkDtypeLang (line 1287) -
    - - -

    Checks if there is a datatype given and appends it to the node.

    -
      -
    • access: protected
    • -
    - -
    - void - - checkDtypeLang - - ( &$node, String $node) -
    - -
      -
    • - String - $node
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - dtypeCheck (line 1338) -
    - - -

    Checks if the Node is a typed Literal.

    -
      -
    • return: TRUE if typed FALSE if not
    • -
    • access: protected
    • -
    - -
    - boolean - - dtypeCheck - - ( &$node, String $node) -
    - -
      -
    • - String - $node
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - error (line 1399) -
    - - -

    Error reporting.

    -
      -
    • access: protected
    • -
    - -
    - String - - error - - (SparqlException $e) -
    - -
      -
    • - SparqlException - $e
    • -
    - - -
    - -
    - -
    - iriCheck (line 464) -
    - - -

    Checks if $token is an IRI.

    -
      -
    • return: TRUE if the token is an IRI false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - iriCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - literalCheck (line 517) -
    - - -

    Checks if $token is a Literal.

    -
      -
    • return: TRUE if the token is a Literal false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - literalCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - parse (line 102) -
    - - -

    Main function of SparqlParser. Parses a query string.

    -
      -
    • return: The query object
    • -
    • throws: SparqlParserException
    • -
    • access: public
    • -
    - -
    - Query - - parse - - ([String $queryString = false]) -
    - -
      -
    • - String - $queryString: The SPARQL query
    • -
    - - -
    - -
    - -
    - parseAsk (line 368) -
    - - -

    Sets result form to 'ASK' and 'COUNT'.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseAsk - - (string $form) -
    - -
      -
    • - string - $form: if it's an ASK or COUNT query
    • -
    - - -
    - -
    - -
    - parseBase (line 246) -
    - - -

    Parses the BASE part of the query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseBase - - () -
    - - - -
    - -
    - -
    - parseBrackettedExpression (line 1006) -
    - - -

    Parses a bracketted expression.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseBrackettedExpression - - ( &$constraint, Constraint $constraint) -
    - -
      -
    • - Constraint - $constraint
    • -
    • - - &$constraint
    • -
    - - -
    - -
    - -
    - parseCollection (line 1376) -
    - - -

    Parses an RDF collection.

    -
      -
    • return: The first parsed label
    • -
    • access: protected
    • -
    - -
    - Node - - parseCollection - - ( &$trp, TriplePattern $trp) -
    - -
      -
    • - TriplePattern - $trp
    • -
    • - - &$trp
    • -
    - - -
    - -
    - -
    - parseConstraint (line 728) -
    - - -

    Parses a value constraint.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseConstraint - - ( &$pattern, boolean $outer, GraphPattern $pattern) -
    - -
      -
    • - GraphPattern - $pattern
    • -
    • - boolean - $outer: If the constraint is an outer one.
    • -
    • - - &$pattern
    • -
    - - -
    - -
    - -
    - parseConstraintTree (line 788) -
    - - -

    Parses a constraint string recursively.

    -

    The result array is one "element" which may contain subelements. All elements have one key "type" that determines which other array keys the element array has. Valid types are:

    • "value": - Just a plain value with a value key, nothing else
    • "function" - A function has a name and an array of parameter(s). Each parameter - is an element.
    • "equation" - An equation has an operator, and operand1 and operand2 which - are elements themselves
    Any element may have the "negated" value set to true, which means that is is - negated (!).

    -
      -
    • return: Nested tree array representing the filter
    • -
    • access: protected
    • -
    - -
    - array - - parseConstraintTree - - ([ $nLevel = 0], [ $bParameter = false]) -
    - -
      -
    • - - $nLevel
    • -
    • - - $bParameter
    • -
    - - -
    - -
    - -
    - parseConstruct (line 413) -
    - - -

    Parses the CONSTRUCT clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseConstruct - - () -
    - - - -
    - -
    - -
    - parseDescribe (line 347) -
    - - -

    Adds a new variable to the query and sets result form to 'DESCRIBE'.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseDescribe - - () -
    - - - -
    - -
    - -
    - parseExpression (line 1046) -
    - - -

    Parses an expression.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseExpression - - ( &$constraint, Constraint $constrain) -
    - -
      -
    • - Constraint - $constrain
    • -
    • - - &$constraint
    • -
    - - -
    - -
    - -
    - parseFrom (line 383) -
    - - -

    Parses the FROM clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseFrom - - () -
    - - - -
    - -
    - -
    - parseGraph (line 1076) -
    - - -

    Parses a GRAPH clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseGraph - - (GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - parseGraphPattern (line 559) -
    - - -

    Parses a graph pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseGraphPattern - - ([int $optional = false], [int $union = false], [string $graph = false], [boolean $constr = false], [ $external = false]) -
    - -
      -
    • - int - $optional: Optional graph pattern
    • -
    • - int - $union: Union graph pattern
    • -
    • - string - $graph: Graphname
    • -
    • - boolean - $constr: TRUE if the pattern is a construct pattern
    • -
    • - - $external
    • -
    - - -
    - -
    - -
    - parseLiteral (line 1323) -
    - - -

    Parses a literal.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseLiteral - - ( &$node, String $sep, String $node) -
    - -
      -
    • - String - $node
    • -
    • - String - $sep: used separator " or '
    • -
    • - - &$node
    • -
    - - -
    - -
    - -
    - parseModifier (line 1102) -
    - - -

    Parses the solution modifiers of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseModifier - - () -
    - - - -
    - -
    - -
    - parseNode (line 1194) -
    - - -

    Parses a String to an RDF node.

    -
      -
    • return: The parsed RDF node
    • -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - Node - - parseNode - - ([String $node = false]) -
    - -
      -
    • - String - $node
    • -
    - - -
    - -
    - -
    - parseOrderCondition (line 1136) -
    - - -

    Parses order conditions of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseOrderCondition - - () -
    - - - -
    - -
    - -
    - parsePrefix (line 270) -
    - - -

    Adds a new namespace prefix to the query object.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parsePrefix - - () -
    - - - -
    - -
    - -
    - parseQuery (line 196) -
    - - -

    Starts parsing the tokenized SPARQL Query.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseQuery - - () -
    - - - -
    - -
    - -
    - parseSelect (line 297) -
    - - -

    Parses the SELECT part of a query.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseSelect - - () -
    - - - -
    - -
    - -
    - parseTriplePattern (line 619) -
    - - -

    Parses a triple pattern.

    -
      -
    • access: protected
    • -
    - -
    - void - - parseTriplePattern - - ( &$pattern, GraphPattern $pattern) -
    - - - - -
    - -
    - -
    - parseWhere (line 432) -
    - - -

    Parses the WHERE clause.

    -
      -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - void - - parseWhere - - () -
    - - - -
    - -
    - -
    - prepare (line 133) -
    - - -

    Set all internal variables to a clear state before we start parsing.

    -
      -
    • access: protected
    • -
    - -
    - void - - prepare - - () -
    - - - -
    - -
    - -
    - qnameCheck (line 493) -
    - - -

    Checks if $token is a qname.

    -
      -
    • return: TRUE if the token is a qname false if not
    • -
    • throws: SparqlParserException
    • -
    • access: protected
    • -
    - -
    - boolean - - qnameCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - tokenize (line 152) -
    - - -

    Tokenizes the querystring.

    -
      -
    • access: protected
    • -
    - -
    - void - - tokenize - - (String $queryString) -
    - -
      -
    • - String - $queryString
    • -
    - - -
    - -
    - -
    - uncomment (line 181) -
    - - -

    Removes comments in the query string. Comments are indicated by '#'.

    -
      -
    • return: The uncommented query string
    • -
    • access: protected
    • -
    - -
    - String - - uncomment - - (String $queryString) -
    - -
      -
    • - String - $queryString
    • -
    - - -
    - -
    - -
    - varCheck (line 449) -
    - - -

    Checks if $token is a variable.

    -
      -
    • return: TRUE if the token is a variable false if not
    • -
    • access: protected
    • -
    - -
    - boolean - - varCheck - - (String $token) -
    - -
      -
    • - String - $token: The token
    • -
    - - -
    - -
    - -
    - _fastForward (line 529) -
    - - -

    FastForward until next token which is not blank.

    -
      -
    • access: protected
    • -
    - -
    - void - - _fastForward - - () -
    - - - -
    - -
    - -
    - _rewind (line 542) -
    - - -

    Rewind until next token which is not blank.

    -
      -
    • access: protected
    • -
    - -
    - void - - _rewind - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:17 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParserException.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParserException.html deleted file mode 100755 index ff07f788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlParserException.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - Docs For Class SparqlParserException - - - - -
    -

    Class SparqlParserException

    - - -
    -
    Description
    - -
    - -

    A SPARQL Parser Execption for better errorhandling.

    -
      -
    • author: Tobias Gauss <tobias.gauss@web.de>
    • -
    • version: $Id: SparqlParserException.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /sparql/SparqlParserException.php (line 13) -

    - - -
    Exception
    -   |
    -   --SparqlParserException
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - SparqlParserException - __construct - ( $message, [ $code = 0],  $pointer) -
    - -
    - int - getPointer - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - -

    Inherited Variables

    - -

    Inherited from Exception (Internal Class)

    -
    - - $code
    -
    - - $file
    -
    - - $line
    -
    - - $message
    -
    - - $string
    -
    - - $trace
    -
    -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor __construct (line 17) -
    - - -
      -
    • access: public
    • -
    - -
    - SparqlParserException - - __construct - - ( $message, [ $code = 0],  $pointer) -
    - -
      -
    • - - $message
    • -
    • - - $code
    • -
    • - - $pointer
    • -
    - - -
    - -
    - -
    - getPointer (line 27) -
    - - -

    Returns a pointer to the token which caused the exception.

    -
      -
    • access: public
    • -
    - -
    - int - - getPointer - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Exception (Internal Class)

    -
    - constructor __construct ( )
    - getCode ( )
    - getFile ( )
    - getLine ( )
    - getMessage ( )
    - getTrace ( )
    - getTraceAsString ( )
    - __clone ( )
    - __toString ( )
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlResultParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlResultParser.html deleted file mode 100755 index 7aa99bc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/SparqlResultParser.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - Docs For Class SparqlResultParser - - - - -
    -

    Class SparqlResultParser

    - - -
    -
    Description
    - -
    - -

    Parses an xml document in SPARQL Result XML Format.

    -
      -
    • author: Tobias Gau <tobias.gauss@web.de>
    • -
    • version: $Id: SparqlResultParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /syntax/SparqlResultParser.php (line 15) -

    - - -
    Object
    -   |
    -   --SparqlResultParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $arrOutput -
    -
    - mixed - $bncounter -
    -
    - mixed - $counter -
    -
    - mixed - $current_literal -
    -
    - mixed - $dtype -
    -
    - mixed - $lang -
    -
    - mixed - $mode -
    -
    - mixed - $resParser -
    -
    - mixed - $strXmlData -
    -
    - mixed - $varlist -
    -
    - mixed - $varname -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - parse - (String $strInputXML) -
    - -
    - void - tagClosed - ( $parser,  $name) -
    - -
    - void - tagData - ( $parser,  $tagData) -
    - -
    - void - tagOpen - ( $parser,  $name,  $attrs) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $arrOutput - = array() (line 18) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $bncounter - = 0 (line 27) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $counter - = -1 (line 21) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $current_literal - (line 28) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $dtype - (line 24) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $lang - (line 25) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $mode - = -1 (line 22) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resParser - (line 19) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $strXmlData - (line 20) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $varlist - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $varname - (line 23) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - parse (line 36) -
    - - -

    Main function of SparqlResultParser

    - -
    - void - - parse - - (String $strInputXML) -
    - -
      -
    • - String - $strInputXML: input document.
    • -
    - - -
    - -
    - -
    - tagClosed (line 150) -
    - - - -
    - void - - tagClosed - - ( $parser,  $name) -
    - -
      -
    • - - $parser
    • -
    • - - $name
    • -
    - - -
    - -
    - -
    - tagData (line 122) -
    - - - -
    - void - - tagData - - ( $parser,  $tagData) -
    - -
      -
    • - - $parser
    • -
    • - - $tagData
    • -
    - - -
    - -
    - -
    - tagOpen (line 61) -
    - - - -
    - void - - tagOpen - - ( $parser,  $name,  $attrs) -
    - -
      -
    • - - $parser
    • -
    • - - $name
    • -
    • - - $attrs
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---ClientQuery.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---ClientQuery.php.html deleted file mode 100755 index 59f0fef7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---ClientQuery.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ClientQuery.php - - - - -
    -

    /sparql/ClientQuery.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ClientQuery - - ClientQuery Object to run a SPARQL Query against a SPARQL server. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:33 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Constraint.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Constraint.php.html deleted file mode 100755 index c1e1aa46..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Constraint.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Constraint.php - - - - -
    -

    /sparql/Constraint.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Constraint - - Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---FilterFunctions.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---FilterFunctions.php.html deleted file mode 100755 index 505d79b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---FilterFunctions.php.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - Docs for page FilterFunctions.php - - - - -
    -

    /sparql/FilterFunctions.php

    - - -
    -
    Description
    - -
    - -

    List of functions used to evaluate the FILTER statements in SPARQL queries.

    - - -
    -
    - - - - - - -
    -
    Functions
    - -
    - -
    - -
    - dateTime (line 46) -
    - - -

    Evaluates the dateTime() function.Tries to convert a date string into a unix timestamp.

    -
      -
    • return: the corresponding unix timestamp
    • -
    - -
    - integer - - dateTime - - (String $string) -
    - -
      -
    • - String - $string: the date string
    • -
    - - -
    - -
    - -
    - lang (line 122) -
    - - -

    Evaluates the lang() function. Returns lang tag of a Literal.

    -
      -
    • return: the lang tag or false if there is no language tag.
    • -
    - -
    - String - - lang - - (String $string) -
    - -
      -
    • - String - $string: the string.
    • -
    - - -
    - -
    - -
    - langMatches (line 66) -
    - - -

    Evaluates the langMatches() function. Return true if the lang tag matches false if not.

    - -
    - boolean - - langMatches - - (String $lang_range, String $lang_tag) -
    - -
      -
    • - String - $lang_range: the string.
    • -
    • - String - $lang_tag: the regex pattern
    • -
    - - -
    - -
    - -
    - regex (line 23) -
    - - -

    Evaluates the regex() function. Returns true if the regex is matched false if not.

    - -
    - boolean - - regex - - (String $string, String $pattern, [String $flags = '']) -
    - -
      -
    • - String - $string: the string which has to be evaluated
    • -
    • - String - $pattern: the regex pattern
    • -
    • - String - $flags: additional flags like "i"
    • -
    - - -
    - -
    - -
    - str (line 99) -
    - - -

    Evaluates the str() function. Returns the string representation of a variable or RDF term.

    - -
    - boolean - - str - - (String $string) -
    - -
      -
    • - String - $string: the string
    • -
    - - -
    -
    -
    - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:02 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---GraphPattern.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---GraphPattern.php.html deleted file mode 100755 index 7df94793..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---GraphPattern.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page GraphPattern.php - - - - -
    -

    /sparql/GraphPattern.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - GraphPattern - - A graph pattern which consists of triple patterns, optional or union graph patterns and filters. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Query.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Query.php.html deleted file mode 100755 index d4c9ce19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---Query.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Query.php - - - - -
    -

    /sparql/Query.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Query - - The Class Query represents a SPARQL query. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/GraphPattern.php') - (line 2) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:26 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---QueryTriple.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---QueryTriple.php.html deleted file mode 100755 index 9659ca1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---QueryTriple.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page QueryTriple.php - - - - -
    -

    /sparql/QueryTriple.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - QueryTriple - - Represents a query triple. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlClient.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlClient.php.html deleted file mode 100755 index 1ef94efd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlClient.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlClient.php - - - - -
    -

    /sparql/SparqlClient.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlClient - - Client for querying a sparql server. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---PreparedStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---PreparedStatement.php.html deleted file mode 100755 index 8ded71af..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---PreparedStatement.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page PreparedStatement.php - - - - -
    -

    /sparql/SparqlEngine/PreparedStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_PreparedStatement - - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultConverter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultConverter.php.html deleted file mode 100755 index 9f761ca2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultConverter.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ResultConverter.php - - - - -
    -

    /sparql/SparqlEngine/ResultConverter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultConverter - - Converts a memory result into a proper rdf statement triple array -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---Default.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---Default.php.html deleted file mode 100755 index 16297363..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---Default.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Default.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/Default.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_Default - - Default result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---HTML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---HTML.php.html deleted file mode 100755 index 2f0ad00b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---HTML.php.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - Docs for page HTML.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/HTML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_HTML - - XML result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/RdfUtil.php') - (line 3) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---XML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---XML.php.html deleted file mode 100755 index ae56c208..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer---XML.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page XML.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer/XML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer_XML - - XML result renderer for SparqlEngine -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer.php.html deleted file mode 100755 index 7bca2dd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine---ResultRenderer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResultRenderer.php - - - - -
    -

    /sparql/SparqlEngine/ResultRenderer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine_ResultRenderer - - Result renderer interface that any result renderer needs to implement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine.php.html deleted file mode 100755 index b7c8d179..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngine.php.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page SparqlEngine.php - - - - -
    -

    /sparql/SparqlEngine.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngine - - This engine executes SPARQL queries against an RDF Datatset. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/FilterFunctions.php') - (line 3) - -
    - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---FilterGenerator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---FilterGenerator.php.html deleted file mode 100755 index cd9a46fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---FilterGenerator.php.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - Docs for page FilterGenerator.php - - - - -
    -

    /sparql/SparqlEngineDb/FilterGenerator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_FilterGenerator - - Generates SQL from Sparql FILTER parts -
    - SparqlEngineDb_FilterGenerator_Value - - Value class that holds some arbitrary value and a datatype. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Offsetter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Offsetter.php.html deleted file mode 100755 index 5b4f79ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Offsetter.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Offsetter.php - - - - -
    -

    /sparql/SparqlEngineDb/Offsetter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_Offsetter - - Determines the offset in a row of sql queries. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Preparator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Preparator.php.html deleted file mode 100755 index a2320414..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---Preparator.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Preparator.php - - - - -
    -

    /sparql/SparqlEngineDb/Preparator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_Preparator - - This class takes care of prepared statements: Preparing them in the database, replacing -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:24 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---PreparedStatement.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---PreparedStatement.php.html deleted file mode 100755 index eacb9730..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---PreparedStatement.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page PreparedStatement.php - - - - -
    -

    /sparql/SparqlEngineDb/PreparedStatement.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_PreparedStatement - - A prepared statement that can be execute()d later multiple times with different variable values. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultConverter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultConverter.php.html deleted file mode 100755 index 0cea7329..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultConverter.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page ResultConverter.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultConverter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultConverter - - Converts a database result into a proper rdf statement triple array -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html deleted file mode 100755 index 73bc87ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---Default.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page Default.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/Default.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_Default - - Default RAP result renderer. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html deleted file mode 100755 index 6b8a14ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---HTML.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page HTML.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/HTML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_HTML - - Sparql DB HTML result renderer. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html deleted file mode 100755 index 50eb380a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer---XML.php.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Docs for page XML.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer/XML.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer_XML - - Sparql DB XML result renderer as defined by http://www.w3.org/TR/rdf-sparql-XMLres/ -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer.php.html deleted file mode 100755 index 850288fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---ResultRenderer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ResultRenderer.php - - - - -
    -

    /sparql/SparqlEngineDb/ResultRenderer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_ResultRenderer - - Result renderer interface that any result renderer needs to implement. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGenerator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGenerator.php.html deleted file mode 100755 index 1873eaae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGenerator.php.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Docs for page SqlGenerator.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlGenerator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlGenerator - - Creates sql statements from a Query object -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGeneratorException.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGeneratorException.php.html deleted file mode 100755 index 2e3d4af0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlGeneratorException.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SqlGeneratorException.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlGeneratorException.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlGeneratorException - - Exception when generating the SQL statement -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlMerger.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlMerger.php.html deleted file mode 100755 index f3ed41a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---SqlMerger.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SqlMerger.php - - - - -
    -

    /sparql/SparqlEngineDb/SqlMerger.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_SqlMerger - - Creates an sql string from an sql array -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:25 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---TypeSorter.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---TypeSorter.php.html deleted file mode 100755 index a3d48fb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb---TypeSorter.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page TypeSorter.php - - - - -
    -

    /sparql/SparqlEngineDb/TypeSorter.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb_TypeSorter - - Sorts database types as the Sparql specs want it. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:34 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb.php.html deleted file mode 100755 index aa41b70b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlEngineDb.php.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Docs for page SparqlEngineDb.php - - - - -
    -

    /sparql/SparqlEngineDb.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlEngineDb - - SPARQL engine optimized for databases. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlEngine.php') - (line 2) - -
    - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:06 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParser.php.html deleted file mode 100755 index 97f8baae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParser.php.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - Docs for page SparqlParser.php - - - - -
    -

    /sparql/SparqlParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlParser - - Parses a SPARQL Query string and returns a Query Object. -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Resource.php') - (line 6) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Literal.php') - (line 5) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Constraint.php') - (line 7) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/Query.php') - (line 8) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/SparqlParserException.php') - (line 10) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'sparql/QueryTriple.php') - (line 9) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParserException.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParserException.php.html deleted file mode 100755 index 28c03867..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_sparql---SparqlParserException.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlParserException.php - - - - -
    -

    /sparql/SparqlParserException.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlParserException - - A SPARQL Parser Execption for better errorhandling. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:18 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_syntax---SparqlResultParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_syntax---SparqlResultParser.php.html deleted file mode 100755 index e8b0ee79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/sparql/_syntax---SparqlResultParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page SparqlResultParser.php - - - - -
    -

    /syntax/SparqlResultParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - SparqlResultParser - - Parses an xml document in SPARQL Result XML Format. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:19 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/all-wcprops deleted file mode 100755 index 32ee6e0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/all-wcprops +++ /dev/null @@ -1,89 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax -END -_syntax---GRDDLParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---GRDDLParser.php.html -END -N3Parser.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/N3Parser.html -END -_syntax---N3Serializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---N3Serializer.php.html -END -_syntax---N3Parser.php.html -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---N3Parser.php.html -END -RssParser.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/RssParser.html -END -RdfSerializer.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/RdfSerializer.html -END -NTripleSerializer.html -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/NTripleSerializer.html -END -_syntax---RssParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---RssParser.php.html -END -RdfParser.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/RdfParser.html -END -_syntax---RdfSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---RdfSerializer.php.html -END -GRDDLParser.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/GRDDLParser.html -END -N3Serializer.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/N3Serializer.html -END -_syntax---NTripleSerializer.php.html -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---NTripleSerializer.php.html -END -_syntax---RdfParser.php.html -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/syntax/_syntax---RdfParser.php.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/entries deleted file mode 100755 index 29f2dfa4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/entries +++ /dev/null @@ -1,210 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/syntax -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -_syntax---GRDDLParser.php.html -file - - - - -2008-02-29T14:57:35.837668Z -4d3b5c4114d59447e75c98ee3659b8da -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -N3Parser.html -file - - - - -2008-02-29T14:57:35.837668Z -02812a7d8117efa398da4d881ece9d58 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---N3Serializer.php.html -file - - - - -2008-02-29T14:57:35.853289Z -c36dab547a60467514dd390541533f8e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---N3Parser.php.html -file - - - - -2008-02-29T14:57:35.868909Z -8f7c9f87c05a3af49ca4f4919461dc03 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RssParser.html -file - - - - -2008-02-29T14:57:35.868909Z -3387024b6f1509faadf255a5ef85d2aa -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdfSerializer.html -file - - - - -2008-02-29T14:57:35.884530Z -33528436e074b8db3fe760eff831bc25 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -NTripleSerializer.html -file - - - - -2008-02-29T14:57:35.884530Z -b0d5447760ac92190f293f7c815f916a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---RssParser.php.html -file - - - - -2008-02-29T14:57:35.900151Z -13240724f5dee5fbf5933b7dc4ee676c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RdfParser.html -file - - - - -2008-02-29T14:57:35.900151Z -d6a308569a33a490055a50649e4e18e5 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---RdfSerializer.php.html -file - - - - -2008-02-29T14:57:35.915771Z -9e9a39b97da2536e81acfe7e800bf85e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -GRDDLParser.html -file - - - - -2008-02-29T14:57:35.915771Z -a57935d394d831ce15544d1a60aedc56 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -N3Serializer.html -file - - - - -2008-02-29T14:57:35.931392Z -1d3f9b0f58ae315b5ea0ffc1cd4af486 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---NTripleSerializer.php.html -file - - - - -2008-02-29T14:57:35.931392Z -909fe8327038a726e578184c3bdf2c9c -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_syntax---RdfParser.php.html -file - - - - -2008-02-29T14:57:35.947012Z -4d07f046f323e0d6db003d20a2d862f3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/GRDDLParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/GRDDLParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/GRDDLParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Parser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Parser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Parser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Serializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Serializer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/N3Serializer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/NTripleSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/NTripleSerializer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/NTripleSerializer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfSerializer.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RdfSerializer.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RssParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RssParser.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/RssParser.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---GRDDLParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---GRDDLParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---GRDDLParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Parser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Parser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Parser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Serializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Serializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---N3Serializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---NTripleSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---NTripleSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---NTripleSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfSerializer.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RdfSerializer.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RssParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RssParser.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/prop-base/_syntax---RssParser.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/GRDDLParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/GRDDLParser.html.svn-base deleted file mode 100755 index 423a40a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/GRDDLParser.html.svn-base +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - Docs For Class GRDDLParser - - - - -
    -

    Class GRDDLParser

    - - -
    -
    Description
    - -
    - -

    A GRDDLParser.

    -

    This class extracts rdf data from xhtml documents. It uses the PHP xsltprocessor. Gleaning Resource Descriptions from Dialects of Languages (GRDDL): (http://www.w3.org/TR/grddl/)

    - -

    - Located in /syntax/GRDDLParser.php (line 20) -

    - - -
    Object
    -   |
    -   --GRDDLParser
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - generateModel - (String $doc) -
    - -
    - void - _generateRDF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - generateModel (line 59) -
    - - -

    generates a MemModel and creates the DomDocument.

    -
      -
    • access: public
    • -
    - -
    - MemModel - - generateModel - - (String $doc) -
    - -
      -
    • - String - $doc
    • -
    - - -
    - -
    - -
    - _generateRDF (line 102) -
    - - - -
    - void - - _generateRDF - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Parser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Parser.html.svn-base deleted file mode 100755 index 16150a4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Parser.html.svn-base +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - Docs For Class N3Parser - - - - -
    -

    Class N3Parser

    - - -
    -
    Description
    - -
    - -

    PHP Notation3 Parser

    -

    This parser can parse a subset of n3, reporting triples to a callback function or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )

    Supported N3 features:

    • Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')
    • @prefix mappings
    • = maps to owl#sameAs
    • a maps to rdf-syntax-ns#type
    • Literal datytype- and xmlLanguageTag support
    Un-supported N3 Features include:
    • Reification using { }
    • . and ^ operators for tree traversal
    • Any log operators, like log:forAll etc.

    This parser is based on n3.py from Epp released 2nd March, 2002. by Sean B. Palmer ( http://infomesh.net/2002/eep/20020302-013802/n3.py )

    This parser is released under the GNU GPL license. ( http://www.gnu.org/licenses/gpl.txt )

    -
      -
    • author: Sean B. Palmer <sean@mysterylights.com>, Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /syntax/N3Parser.php (line 48) -

    - - -
    Object
    -   |
    -   --N3Parser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $bNode -
    -
    - mixed - $DAML_NS -
    -
    - mixed - $debug -
    -
    - mixed - $OWL_NS -
    -
    - mixed - $parsedNamespaces -
    -
    - mixed - $parseError -
    -
    - mixed - $RDF_NS -
    -
    - mixed - $Tokens -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - N3Parser - N3Parser - () -
    - -
    - object MemModel - &generateModel - ($path $path, [ $dummy = false], [ $model = false]) -
    - -
    - array - getPovs - (array $list) -
    - -
    - void - parse - (string $s) -
    - -
    - object Model - parse2model - (string $s, [ $model = false]) -
    - -
    - void - setFixBnodes - (boolean $set) -
    - -
    - void - uparse - (string $s, string $func) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $bNode - (line 54) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $DAML_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $debug - (line 56) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $OWL_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $parsedNamespaces - = array() (line 58) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $parseError - (line 57) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $RDF_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $Tokens - (line 53) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor N3Parser (line 66) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - N3Parser - - N3Parser - - () -
    - - - -
    - -
    - -
    - generateModel (line 209) -
    - - -

    Generate a new MemModel from an URI or file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &generateModel - - ($path $path, [ $dummy = false], [ $model = false]) -
    - -
      -
    • - $path - $path
    • -
    • - - $dummy
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - getPovs (line 646) -
    - - -

    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.

    - -
    - array - - getPovs - - (array $list) -
    - -
      -
    • - array - $list
    • -
    - - -
    - -
    - -
    - parse (line 119) -
    - - -

    This parses a N3 string and prints out the triples

    -
      -
    • access: public
    • -
    - -
    - void - - parse - - (string $s) -
    - -
      -
    • - string - $s
    • -
    - - -
    - -
    - -
    - parse2model (line 176) -
    - - -

    This parses a N3 string and returns a memmodel

    -
      -
    • access: public
    • -
    - -
    - object Model - - parse2model - - (string $s, [ $model = false]) -
    - -
      -
    • - string - $s
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - setFixBnodes (line 108) -
    - - -

    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file

    -

    default is "false" -> the used label in n3 is parsed to the model

    -
      -
    • access: public
    • -
    - -
    - void - - setFixBnodes - - (boolean $set) -
    - -
      -
    • - boolean - $set
    • -
    - - -
    - -
    - -
    - uparse (line 147) -
    - - -

    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke

    -
      -
    • access: public
    • -
    - -
    - void - - uparse - - (string $s, string $func) -
    - -
      -
    • - string - $s
    • -
    • - string - $func
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Serializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Serializer.html.svn-base deleted file mode 100755 index 307343c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/N3Serializer.html.svn-base +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - Docs For Class N3Serializer - - - - -
    -

    Class N3Serializer

    - - -
    -
    Description
    - -
    - -

    An abstract object.

    -

    Root object with some general methods, that should be overloaded.

    - -

    - Located in /syntax/N3Serializer.php (line 34) -

    - - -
    Object
    -   |
    -   --N3Serializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $anon -
    -
    - mixed - $debug -
    -
    - mixed - $done -
    -
    - mixed - $model -
    -
    - mixed - $prefixes -
    -
    - mixed - $res -
    -
    - mixed - $resourcetext -
    -
    - mixed - $resourcetext_taken -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - N3Serializer - N3Serializer - () -
    - -
    - void - addNSPrefix - ( $ns,  $prefix, string $s) -
    - -
    - boolean - saveAs - ( &$model, string $filename, object MemModel $model) -
    - -
    - string - &serialize - ( &$m, object Model $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $anon - (line 45) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $debug - (line 36) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $done - (line 40) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $model - (line 43) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $prefixes - (line 38) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $res - (line 44) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resourcetext - (line 41) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resourcetext_taken - (line 42) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor N3Serializer (line 52) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - N3Serializer - - N3Serializer - - () -
    - - - -
    - -
    - -
    - addNSPrefix (line 65) -
    - - -

    Adds a new namespace prefix to use.

    -

    Unknown namespaces will become ns0, ns1 etc.

    -
      -
    • access: public
    • -
    - -
    - void - - addNSPrefix - - ( $ns,  $prefix, string $s) -
    - -
      -
    • - string - $s
    • -
    • - - $ns
    • -
    • - - $prefix
    • -
    - - -
    - -
    - -
    - saveAs (line 180) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model, string $filename, object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - string - $filename
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - serialize (line 76) -
    - - -

    Serializes a model to N3 syntax.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$m, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$m
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/NTripleSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/NTripleSerializer.html.svn-base deleted file mode 100755 index d5e9b0ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/NTripleSerializer.html.svn-base +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - Docs For Class NTripleSerializer - - - - -
    -

    Class NTripleSerializer

    - - -
    -
    Description
    - -
    - -

    PHP N-Triple Serializer

    -

    This class serialises models to N-Triple Syntax.

    - -

    - Located in /syntax/NTripleSerializer.php (line 23) -

    - - -
    Object
    -   |
    -   --NTripleSerializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $debug -
    -
    - mixed - $model -
    -
    - mixed - $res -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - NTripleSerializer - NTripleSerializer - () -
    - -
    - boolean - saveAs - ( &$model, string $filename, object MemModel $model) -
    - -
    - string - &serialize - ( &$m, object Model $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $debug - (line 25) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $model - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $res - (line 27) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NTripleSerializer (line 38) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - NTripleSerializer - - NTripleSerializer - - () -
    - - - -
    - -
    - -
    - saveAs (line 99) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model, string $filename, object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - string - $filename
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - serialize (line 49) -
    - - -

    Serializes a model to N Triple syntax.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$m, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$m
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfParser.html.svn-base deleted file mode 100755 index ab429dcd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfParser.html.svn-base +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - Docs For Class RdfParser - - - - -
    -

    Class RdfParser

    - - -
    -
    Description
    - -
    - -

    An RDF paser.

    -

    This class reads RDF data from files or URIs and generates models out of it. All valid RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)

    • W3C Working Draft 10 October 2003
    (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported. The parser is based on the PHP version of repat (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html) by Luis Argerich (lrargerich@yahoo.com).

    -
      -
    • author: Luis Argerich <lrargerich@yahoo.com>, Chris Bizer <chris@bizer.de>, Radoslaw Oldakowski <radol@gmx.de> Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /syntax/RdfParser.php (line 28) -

    - - -
    Object
    -   |
    -   --RdfParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $model -
    -
    - mixed - $rdf_parser -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - object MemModel - &generateModel - (string $base, [boolean $rdfBaseURI = false], [ $model = false]) -
    - -
    - void - _is_forbidden_rdf_property_attribute - ( $local_name) -
    - -
    - void - _parse_uri - ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment) -
    - -
    - void - _report_error - ( $error) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $model - (line 31) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_parser - (line 30) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - generateModel (line 2203) -
    - - -

    Generates a new MemModel from a URI, a file or from memory.

    -

    If you want to parse an RDF document, pass the URI or location in the filesystem of the RDF document. You can also pass RDF code direct to the function. If you pass RDF code directly to the parser and there is no xml:base included, you should set the base URI manually using the optional second parameter $rdfBaseURI. Make sure that here are proper namespace declarations in your input document.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &generateModel - - (string $base, [boolean $rdfBaseURI = false], [ $model = false]) -
    - -
      -
    • - string - $base
    • -
    • - boolean - $rdfBaseURI
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - _is_forbidden_rdf_property_attribute (line 302) -
    - - - -
    - void - - _is_forbidden_rdf_property_attribute - - ( $local_name) -
    - -
      -
    • - - $local_name
    • -
    - - -
    - -
    - -
    - _parse_uri (line 469) -
    - - - -
    - void - - _parse_uri - - ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment) -
    - -
      -
    • - - $uri
    • -
    • - - $buffer
    • -
    • - - &$scheme
    • -
    • - - &$authority
    • -
    • - - &$path
    • -
    • - - &$query
    • -
    • - - &$fragment
    • -
    - - -
    - -
    - -
    - _report_error (line 1049) -
    - - - -
    - void - - _report_error - - ( $error) -
    - -
      -
    • - - $error
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfSerializer.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfSerializer.html.svn-base deleted file mode 100755 index f2307d82..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RdfSerializer.html.svn-base +++ /dev/null @@ -1,879 +0,0 @@ - - - - - - Docs For Class RdfSerializer - - - - -
    -

    Class RdfSerializer

    - - -
    -
    Description
    - -
    - -

    An RDF seralizer.

    -

    Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and rdf:nodeID directive. You can choose between different output syntaxes by using the configuration methods or changing the configuration default values in constants.php. This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.

    -
      -
    • author: Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /syntax/RdfSerializer.php (line 23) -

    - - -
    Object
    -   |
    -   --RdfSerializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    - -
    - mixed - $m_baseURI -
    -
    - mixed - $m_contentStatements -
    -
    - mixed - $m_currentSubject -
    -
    - mixed - $m_defaultNamespaces -
    -
    - mixed - $m_groupTypeStatement -
    -
    - mixed - $m_namespaces -
    - -
    - mixed - $m_out -
    - -
    - mixed - $m_rdfIDElementText -
    - -
    - mixed - $m_statements -
    -
    - mixed - $rdf_qnames -
    -
    - mixed - $rdf_qname_prefix -
    -
    - mixed - $sort_model -
    -
    - mixed - $use_attributes -
    -
    - mixed - $use_entities -
    -
    - mixed - $use_xml_declaration -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - RdfSerializer - RdfSerializer - () -
    - -
    - void - addNamespacePrefix - (String $prefix, String $namespace) -
    - -
    - void - configSortModel - (boolean $bool) -
    - -
    - void - configUseAttributes - (boolean $bool) -
    - -
    - void - configUseEntities - (boolean $bool) -
    - -
    - void - configUseQnames - (boolean $bool) -
    - -
    - void - configUseXmlDeclaration - (boolean $bool) -
    - -
    - boolean - saveAs - ( &$model,  $filename, [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
    - string - &serialize - ( &$model, [ $xml_default_namespace = NULL], [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $m_attributeStatements - = array() (line 44) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_baseURI - (line 37) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_contentStatements - = array() (line 45) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_currentSubject - (line 39) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_defaultNamespaces - = array() (line 33) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_groupTypeStatement - (line 43) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_namespaces - = array() (line 34) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_nextAutomaticPrefixIndex - (line 35) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_out - (line 36) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfAboutElementText - (line 41) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfIDElementText - (line 40) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfResourceElementText - (line 42) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_statements - = array() (line 38) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_qnames - (line 29) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_qname_prefix - (line 46) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $sort_model - (line 28) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_attributes - (line 27) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_entities - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_xml_declaration - (line 30) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor RdfSerializer (line 53) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - RdfSerializer - - RdfSerializer - - () -
    - - - -
    - -
    - -
    - addNamespacePrefix (line 143) -
    - - -

    Adds a new prefix/namespace combination.

    -
      -
    • access: public
    • -
    - -
    - void - - addNamespacePrefix - - (String $prefix, String $namespace) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $namespace
    • -
    - - -
    - -
    - -
    - configSortModel (line 79) -
    - - -

    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.

    -

    TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configSortModel - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseAttributes (line 105) -
    - - -

    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.

    -

    TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseAttributes - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseEntities (line 92) -
    - - -

    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.

    -

    TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseEntities - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseQnames (line 118) -
    - - -

    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.

    -

    TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseQnames - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseXmlDeclaration (line 131) -
    - - -

    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.

    -

    TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseXmlDeclaration - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - saveAs (line 287) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model,  $filename, [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - String - $encoding
    • -
    • - - &$model
    • -
    • - - $filename
    • -
    - - -
    - -
    - -
    - serialize (line 161) -
    - - -

    Serializes a model to RDF syntax.

    -

    RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean), config_sort_model($boolean). NOTE: There is only one default namespace allowed within an XML document. Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass another $xml_default_namespace as parameter, the model will be serialized as if SER_RDF_QNAMES were set to TRUE.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$model, [ $xml_default_namespace = NULL], [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - String - $encoding
    • -
    • - - &$model
    • -
    • - - $xml_default_namespace
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:50 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RssParser.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RssParser.html.svn-base deleted file mode 100755 index 9868aea7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/RssParser.html.svn-base +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - Docs For Class RssParser - - - - -
    -

    Class RssParser

    - - -
    -
    Description
    - -
    - -

    RSS/ATOM Parser

    -

    This class uses the MagpieRSS Parser by Kellan Elliott-McCrea <kellan@protest.net>. MagpieRSS is compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions). Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/)

    - -

    - Located in /syntax/RssParser.php (line 23) -

    - - -
    Object
    -   |
    -   --RssParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $type -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - channel - ($model &$model, $rss &$rss, $node &$node, $nmsp &$nmsp,  $type) -
    - -
    - void - dc - ($node &$node, $model &$model, $dc &$dc) -
    - -
    - parsed - generateModel - ($url $url) -
    - -
    - void - image - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
    - void - items - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
    - void - sy - ($node &$node, $model &$model, $sy &$sy) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $type - (line 24) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - channel (line 211) -
    - - -

    Parses the rss channel/ atom feed.

    - -
    - void - - channel - - ($model &$model, $rss &$rss, $node &$node, $nmsp &$nmsp,  $type) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $node - &$node: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - dc (line 172) -
    - - -

    Adds the dc namespace.

    - -
    - void - - dc - - ($node &$node, $model &$model, $dc &$dc) -
    - -
      -
    • - $node - &$node: the node
    • -
    • - $model - &$model: the model
    • -
    • - $dc - &$dc: Array which contains the dc objects
    • -
    - - -
    - -
    - -
    - generateModel (line 32) -
    - - -

    Main function

    -
      -
    • return: model
    • -
    - -
    - parsed - - generateModel - - ($url $url) -
    - -
      -
    • - $url - $url: location of the document
    • -
    - - -
    - -
    - -
    - image (line 77) -
    - - -

    Parses the image if there is one.

    - -
    - void - - image - - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $bnOrg - &$bnOrg: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    - - -
    - -
    - -
    - items (line 117) -
    - - -

    Parses the rss items/ atom entries.

    - -
    - void - - items - - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $bnOrg - &$bnOrg: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    - - -
    - -
    - -
    - sy (line 190) -
    - - -

    Adds the sy namespace.

    - -
    - void - - sy - - ($node &$node, $model &$model, $sy &$sy) -
    - -
      -
    • - $node - &$node: the node
    • -
    • - $model - &$model: the model
    • -
    • - $sy - &$sy: Array which contains the sy objects
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---GRDDLParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---GRDDLParser.php.html.svn-base deleted file mode 100755 index d21d555b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---GRDDLParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page GRDDLParser.php - - - - -
    -

    /syntax/GRDDLParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - GRDDLParser - - A GRDDLParser. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Parser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Parser.php.html.svn-base deleted file mode 100755 index 75370885..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Parser.php.html.svn-base +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - Docs for page N3Parser.php - - - - -
    -

    /syntax/N3Parser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - N3Parser - - PHP Notation3 Parser -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Resource.php') - (line 3) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Literal.php') - (line 4) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Statement.php') - (line 5) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Serializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Serializer.php.html.svn-base deleted file mode 100755 index 8db446eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---N3Serializer.php.html.svn-base +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Docs for page N3Serializer.php - - - - -
    -

    /syntax/N3Serializer.php

    - - -
    -
    Description
    - -
    - -

    PHP Notation3 Serializer

    -

    This class serialises models to N3 Syntax.

    Supported N3 features:

    • Using [ ] for blank nodes, or _: if nescessary
    • Literal datytype- and xmlLanguageTag support

    Un-supported N3 Features include:

    • Reification

    TODO: * added namespace prefixes are persisent...

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - N3Serializer - - An abstract object. -
    -
    -
    - - - -
    -
    Constants
    - -
    - -
    - -
    - - MAGIC_STRING = '~~~' - (line 32) - -
    - - - - -
    -
    -
    - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---NTripleSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---NTripleSerializer.php.html.svn-base deleted file mode 100755 index 92815fba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---NTripleSerializer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page NTripleSerializer.php - - - - -
    -

    /syntax/NTripleSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NTripleSerializer - - PHP N-Triple Serializer -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfParser.php.html.svn-base deleted file mode 100755 index 63ba5e9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfParser.php - - - - -
    -

    /syntax/RdfParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfParser - - An RDF paser. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfSerializer.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfSerializer.php.html.svn-base deleted file mode 100755 index e06b4d47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RdfSerializer.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfSerializer.php - - - - -
    -

    /syntax/RdfSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfSerializer - - An RDF seralizer. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RssParser.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RssParser.php.html.svn-base deleted file mode 100755 index 0f504799..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/.svn/text-base/_syntax---RssParser.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RssParser.php - - - - -
    -

    /syntax/RssParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RssParser - - RSS/ATOM Parser -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/GRDDLParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/GRDDLParser.html deleted file mode 100755 index 65a5a44d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/GRDDLParser.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - Docs For Class GRDDLParser - - - - -
    -

    Class GRDDLParser

    - - -
    -
    Description
    - -
    - -

    A GRDDLParser.

    -

    This class extracts rdf data from xhtml documents. It uses the PHP xsltprocessor. Gleaning Resource Descriptions from Dialects of Languages (GRDDL): (http://www.w3.org/TR/grddl/)

    -
      -
    • author: Tobias Gau <tobias.gauss@web.de>,
    • -
    • version: $Id: GRDDLParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/GRDDLParser.php (line 20) -

    - - -
    Object
    -   |
    -   --GRDDLParser
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - MemModel - generateModel - (String $doc) -
    - -
    - void - _generateRDF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - generateModel (line 59) -
    - - -

    generates a MemModel and creates the DomDocument.

    -
      -
    • access: public
    • -
    - -
    - MemModel - - generateModel - - (String $doc) -
    - -
      -
    • - String - $doc
    • -
    - - -
    - -
    - -
    - _generateRDF (line 102) -
    - - - -
    - void - - _generateRDF - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:16 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Parser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Parser.html deleted file mode 100755 index b8141ce6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Parser.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - Docs For Class N3Parser - - - - -
    -

    Class N3Parser

    - - -
    -
    Description
    - -
    - -

    PHP Notation3 Parser

    -

    This parser can parse a subset of n3, reporting triples to a callback function or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )

    Supported N3 features:

    • Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')
    • @prefix mappings
    • = maps to owl#sameAs
    • a maps to rdf-syntax-ns#type
    • Literal datytype- and xmlLanguageTag support
    Un-supported N3 Features include:
    • Reification using { }
    • . and ^ operators for tree traversal
    • Any log operators, like log:forAll etc.

    This parser is based on n3.py from Epp released 2nd March, 2002. by Sean B. Palmer ( http://infomesh.net/2002/eep/20020302-013802/n3.py )

    This parser is released under the GNU GPL license. ( http://www.gnu.org/licenses/gpl.txt )

    -
      -
    • author: Sean B. Palmer <sean@mysterylights.com>, Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>, Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id: N3Parser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/N3Parser.php (line 48) -

    - - -
    Object
    -   |
    -   --N3Parser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $bNode -
    -
    - mixed - $DAML_NS -
    -
    - mixed - $debug -
    -
    - mixed - $OWL_NS -
    -
    - mixed - $parsedNamespaces -
    -
    - mixed - $parseError -
    -
    - mixed - $RDF_NS -
    -
    - mixed - $Tokens -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - N3Parser - N3Parser - () -
    - -
    - object MemModel - &generateModel - ($path $path, [ $dummy = false], [ $model = false]) -
    - -
    - array - getPovs - (array $list) -
    - -
    - void - parse - (string $s) -
    - -
    - object Model - parse2model - (string $s, [ $model = false]) -
    - -
    - void - setFixBnodes - (boolean $set) -
    - -
    - void - uparse - (string $s, string $func) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $bNode - (line 54) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $DAML_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $debug - (line 56) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $OWL_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $parsedNamespaces - = array() (line 58) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $parseError - (line 57) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $RDF_NS - (line 55) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $Tokens - (line 53) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor N3Parser (line 66) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - N3Parser - - N3Parser - - () -
    - - - -
    - -
    - -
    - generateModel (line 209) -
    - - -

    Generate a new MemModel from an URI or file.

    -
      -
    • throws: PhpError
    • -
    • access: public
    • -
    - -
    - object MemModel - - &generateModel - - ($path $path, [ $dummy = false], [ $model = false]) -
    - -
      -
    • - $path - $path
    • -
    • - - $dummy
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - getPovs (line 646) -
    - - -

    Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.

    - -
    - array - - getPovs - - (array $list) -
    - -
      -
    • - array - $list
    • -
    - - -
    - -
    - -
    - parse (line 119) -
    - - -

    This parses a N3 string and prints out the triples

    -
      -
    • access: public
    • -
    - -
    - void - - parse - - (string $s) -
    - -
      -
    • - string - $s
    • -
    - - -
    - -
    - -
    - parse2model (line 176) -
    - - -

    This parses a N3 string and returns a memmodel

    -
      -
    • access: public
    • -
    - -
    - object Model - - parse2model - - (string $s, [ $model = false]) -
    - -
      -
    • - string - $s
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - setFixBnodes (line 108) -
    - - -

    Sets, if BlankNode labels should be replaced by the generic label from the constants.php file

    -

    default is "false" -> the used label in n3 is parsed to the model

    -
      -
    • access: public
    • -
    - -
    - void - - setFixBnodes - - (boolean $set) -
    - -
      -
    • - boolean - $set
    • -
    - - -
    - -
    - -
    - uparse (line 147) -
    - - -

    This parses a N3 string and calls func($subject, $predicate, $object) with each trioke

    -
      -
    • access: public
    • -
    - -
    - void - - uparse - - (string $s, string $func) -
    - -
      -
    • - string - $s
    • -
    • - string - $func
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Serializer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Serializer.html deleted file mode 100755 index d00711db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/N3Serializer.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - Docs For Class N3Serializer - - - - -
    -

    Class N3Serializer

    - - -
    -
    Description
    - -
    - -

    An abstract object.

    -

    Root object with some general methods, that should be overloaded.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: N3Serializer.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /syntax/N3Serializer.php (line 34) -

    - - -
    Object
    -   |
    -   --N3Serializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $anon -
    -
    - mixed - $debug -
    -
    - mixed - $done -
    -
    - mixed - $model -
    -
    - mixed - $prefixes -
    -
    - mixed - $res -
    -
    - mixed - $resourcetext -
    -
    - mixed - $resourcetext_taken -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - N3Serializer - N3Serializer - () -
    - -
    - void - addNSPrefix - ( $ns,  $prefix, string $s) -
    - -
    - boolean - saveAs - ( &$model, string $filename, object MemModel $model) -
    - -
    - string - &serialize - ( &$m, object Model $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $anon - (line 45) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $debug - (line 36) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $done - (line 40) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $model - (line 43) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $prefixes - (line 38) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $res - (line 44) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resourcetext - (line 41) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $resourcetext_taken - (line 42) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor N3Serializer (line 52) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - N3Serializer - - N3Serializer - - () -
    - - - -
    - -
    - -
    - addNSPrefix (line 65) -
    - - -

    Adds a new namespace prefix to use.

    -

    Unknown namespaces will become ns0, ns1 etc.

    -
      -
    • access: public
    • -
    - -
    - void - - addNSPrefix - - ( $ns,  $prefix, string $s) -
    - -
      -
    • - string - $s
    • -
    • - - $ns
    • -
    • - - $prefix
    • -
    - - -
    - -
    - -
    - saveAs (line 180) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model, string $filename, object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - string - $filename
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - serialize (line 76) -
    - - -

    Serializes a model to N3 syntax.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$m, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$m
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:01 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/NTripleSerializer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/NTripleSerializer.html deleted file mode 100755 index 83b069f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/NTripleSerializer.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - Docs For Class NTripleSerializer - - - - -
    -

    Class NTripleSerializer

    - - -
    -
    Description
    - -
    - -

    PHP N-Triple Serializer

    -

    This class serialises models to N-Triple Syntax.

    -
      -
    • author: Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id: NTripleSerializer.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/NTripleSerializer.php (line 23) -

    - - -
    Object
    -   |
    -   --NTripleSerializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $debug -
    -
    - mixed - $model -
    -
    - mixed - $res -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - NTripleSerializer - NTripleSerializer - () -
    - -
    - boolean - saveAs - ( &$model, string $filename, object MemModel $model) -
    - -
    - string - &serialize - ( &$m, object Model $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $debug - (line 25) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $model - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $res - (line 27) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor NTripleSerializer (line 38) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - NTripleSerializer - - NTripleSerializer - - () -
    - - - -
    - -
    - -
    - saveAs (line 99) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model, string $filename, object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - string - $filename
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - serialize (line 49) -
    - - -

    Serializes a model to N Triple syntax.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$m, object Model $model) -
    - -
      -
    • - object Model - $model
    • -
    • - - &$m
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfParser.html deleted file mode 100755 index 65dce31a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfParser.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - Docs For Class RdfParser - - - - -
    -

    Class RdfParser

    - - -
    -
    Description
    - -
    - -

    An RDF paser.

    -

    This class reads RDF data from files or URIs and generates models out of it. All valid RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)

    • W3C Working Draft 10 October 2003
    (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported. The parser is based on the PHP version of repat (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html) by Luis Argerich (lrargerich@yahoo.com).

    -
      -
    • author: Luis Argerich <lrargerich@yahoo.com>, Chris Bizer <chris@bizer.de>, Radoslaw Oldakowski <radol@gmx.de> Daniel Westphal <mail@d-westphal.de>
    • -
    • version: $Id: RdfParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/RdfParser.php (line 28) -

    - - -
    Object
    -   |
    -   --RdfParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $model -
    -
    - mixed - $rdf_parser -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - object MemModel - &generateModel - (string $base, [boolean $rdfBaseURI = false], [ $model = false]) -
    - -
    - void - _is_forbidden_rdf_property_attribute - ( $local_name) -
    - -
    - void - _parse_uri - ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment) -
    - -
    - void - _report_error - ( $error) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $model - (line 31) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_parser - (line 30) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - generateModel (line 2203) -
    - - -

    Generates a new MemModel from a URI, a file or from memory.

    -

    If you want to parse an RDF document, pass the URI or location in the filesystem of the RDF document. You can also pass RDF code direct to the function. If you pass RDF code directly to the parser and there is no xml:base included, you should set the base URI manually using the optional second parameter $rdfBaseURI. Make sure that here are proper namespace declarations in your input document.

    -
      -
    • access: public
    • -
    - -
    - object MemModel - - &generateModel - - (string $base, [boolean $rdfBaseURI = false], [ $model = false]) -
    - -
      -
    • - string - $base
    • -
    • - boolean - $rdfBaseURI
    • -
    • - - $model
    • -
    - - -
    - -
    - -
    - _is_forbidden_rdf_property_attribute (line 302) -
    - - - -
    - void - - _is_forbidden_rdf_property_attribute - - ( $local_name) -
    - -
      -
    • - - $local_name
    • -
    - - -
    - -
    - -
    - _parse_uri (line 469) -
    - - - -
    - void - - _parse_uri - - ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment) -
    - -
      -
    • - - $uri
    • -
    • - - $buffer
    • -
    • - - &$scheme
    • -
    • - - &$authority
    • -
    • - - &$path
    • -
    • - - &$query
    • -
    • - - &$fragment
    • -
    - - -
    - -
    - -
    - _report_error (line 1049) -
    - - - -
    - void - - _report_error - - ( $error) -
    - -
      -
    • - - $error
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfSerializer.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfSerializer.html deleted file mode 100755 index 2c017725..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RdfSerializer.html +++ /dev/null @@ -1,879 +0,0 @@ - - - - - - Docs For Class RdfSerializer - - - - -
    -

    Class RdfSerializer

    - - -
    -
    Description
    - -
    - -

    An RDF seralizer.

    -

    Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and rdf:nodeID directive. You can choose between different output syntaxes by using the configuration methods or changing the configuration default values in constants.php. This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.

    -
      -
    • author: Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
    • -
    • version: $Id: RdfSerializer.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/RdfSerializer.php (line 23) -

    - - -
    Object
    -   |
    -   --RdfSerializer
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    - -
    - mixed - $m_baseURI -
    -
    - mixed - $m_contentStatements -
    -
    - mixed - $m_currentSubject -
    -
    - mixed - $m_defaultNamespaces -
    -
    - mixed - $m_groupTypeStatement -
    -
    - mixed - $m_namespaces -
    - -
    - mixed - $m_out -
    - -
    - mixed - $m_rdfIDElementText -
    - -
    - mixed - $m_statements -
    -
    - mixed - $rdf_qnames -
    -
    - mixed - $rdf_qname_prefix -
    -
    - mixed - $sort_model -
    -
    - mixed - $use_attributes -
    -
    - mixed - $use_entities -
    -
    - mixed - $use_xml_declaration -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - RdfSerializer - RdfSerializer - () -
    - -
    - void - addNamespacePrefix - (String $prefix, String $namespace) -
    - -
    - void - configSortModel - (boolean $bool) -
    - -
    - void - configUseAttributes - (boolean $bool) -
    - -
    - void - configUseEntities - (boolean $bool) -
    - -
    - void - configUseQnames - (boolean $bool) -
    - -
    - void - configUseXmlDeclaration - (boolean $bool) -
    - -
    - boolean - saveAs - ( &$model,  $filename, [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
    - string - &serialize - ( &$model, [ $xml_default_namespace = NULL], [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $m_attributeStatements - = array() (line 44) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_baseURI - (line 37) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_contentStatements - = array() (line 45) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_currentSubject - (line 39) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_defaultNamespaces - = array() (line 33) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_groupTypeStatement - (line 43) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_namespaces - = array() (line 34) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_nextAutomaticPrefixIndex - (line 35) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_out - (line 36) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfAboutElementText - (line 41) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfIDElementText - (line 40) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_rdfResourceElementText - (line 42) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $m_statements - = array() (line 38) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_qnames - (line 29) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $rdf_qname_prefix - (line 46) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $sort_model - (line 28) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_attributes - (line 27) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_entities - (line 26) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $use_xml_declaration - (line 30) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor RdfSerializer (line 53) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - RdfSerializer - - RdfSerializer - - () -
    - - - -
    - -
    - -
    - addNamespacePrefix (line 143) -
    - - -

    Adds a new prefix/namespace combination.

    -
      -
    • access: public
    • -
    - -
    - void - - addNamespacePrefix - - (String $prefix, String $namespace) -
    - -
      -
    • - String - $prefix
    • -
    • - String - $namespace
    • -
    - - -
    - -
    - -
    - configSortModel (line 79) -
    - - -

    Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.

    -

    TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configSortModel - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseAttributes (line 105) -
    - - -

    Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.

    -

    TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseAttributes - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseEntities (line 92) -
    - - -

    Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.

    -

    TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseEntities - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseQnames (line 118) -
    - - -

    Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.

    -

    TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseQnames - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - configUseXmlDeclaration (line 131) -
    - - -

    Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ?>.

    -

    TRUE is default. Default can be changed in constants.php.

    -
      -
    • access: public
    • -
    - -
    - void - - configUseXmlDeclaration - - (boolean $bool) -
    - -
      -
    • - boolean - $bool
    • -
    - - -
    - -
    - -
    - saveAs (line 287) -
    - - -

    Serializes a model and saves it into a file.

    -

    Returns FALSE if the model couldn't be saved to the file.

    -
      -
    • access: public
    • -
    - -
    - boolean - - saveAs - - ( &$model,  $filename, [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - String - $encoding
    • -
    • - - &$model
    • -
    • - - $filename
    • -
    - - -
    - -
    - -
    - serialize (line 161) -
    - - -

    Serializes a model to RDF syntax.

    -

    RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean), config_sort_model($boolean). NOTE: There is only one default namespace allowed within an XML document. Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass another $xml_default_namespace as parameter, the model will be serialized as if SER_RDF_QNAMES were set to TRUE.

    -
      -
    • access: public
    • -
    - -
    - string - - &serialize - - ( &$model, [ $xml_default_namespace = NULL], [String $encoding = DEFAULT_ENCODING], object MemModel $model) -
    - -
      -
    • - object MemModel - $model
    • -
    • - String - $encoding
    • -
    • - - &$model
    • -
    • - - $xml_default_namespace
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:50 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RssParser.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RssParser.html deleted file mode 100755 index 3fe82aea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/RssParser.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - Docs For Class RssParser - - - - -
    -

    Class RssParser

    - - -
    -
    Description
    - -
    - -

    RSS/ATOM Parser

    -

    This class uses the MagpieRSS Parser by Kellan Elliott-McCrea <kellan@protest.net>. MagpieRSS is compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions). Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/)

    -
      -
    • author: Tobias Gau <tobias.gauss@web.de>
    • -
    • version: $Id: RssParser.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /syntax/RssParser.php (line 23) -

    - - -
    Object
    -   |
    -   --RssParser
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $type -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - void - channel - ($model &$model, $rss &$rss, $node &$node, $nmsp &$nmsp,  $type) -
    - -
    - void - dc - ($node &$node, $model &$model, $dc &$dc) -
    - -
    - parsed - generateModel - ($url $url) -
    - -
    - void - image - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
    - void - items - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
    - void - sy - ($node &$node, $model &$model, $sy &$sy) -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $type - (line 24) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - channel (line 211) -
    - - -

    Parses the rss channel/ atom feed.

    - -
    - void - - channel - - ($model &$model, $rss &$rss, $node &$node, $nmsp &$nmsp,  $type) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $node - &$node: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    • - - $type
    • -
    - - -
    - -
    - -
    - dc (line 172) -
    - - -

    Adds the dc namespace.

    - -
    - void - - dc - - ($node &$node, $model &$model, $dc &$dc) -
    - -
      -
    • - $node - &$node: the node
    • -
    • - $model - &$model: the model
    • -
    • - $dc - &$dc: Array which contains the dc objects
    • -
    - - -
    - -
    - -
    - generateModel (line 32) -
    - - -

    Main function

    -
      -
    • return: model
    • -
    - -
    - parsed - - generateModel - - ($url $url) -
    - -
      -
    • - $url - $url: location of the document
    • -
    - - -
    - -
    - -
    - image (line 77) -
    - - -

    Parses the image if there is one.

    - -
    - void - - image - - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $bnOrg - &$bnOrg: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    - - -
    - -
    - -
    - items (line 117) -
    - - -

    Parses the rss items/ atom entries.

    - -
    - void - - items - - ($model &$model, $rss &$rss, $bnOrg &$bnOrg, $nmsp &$nmsp) -
    - -
      -
    • - $model - &$model: the model
    • -
    • - $rss - &$rss: the magpie parser object
    • -
    • - $bnOrg - &$bnOrg: the node which represents the channel
    • -
    • - $nmsp - &$nmsp: the
    • -
    - - -
    - -
    - -
    - sy (line 190) -
    - - -

    Adds the sy namespace.

    - -
    - void - - sy - - ($node &$node, $model &$model, $sy &$sy) -
    - -
      -
    • - $node - &$node: the node
    • -
    • - $model - &$model: the model
    • -
    • - $sy - &$sy: Array which contains the sy objects
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---GRDDLParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---GRDDLParser.php.html deleted file mode 100755 index 202d3dac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---GRDDLParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page GRDDLParser.php - - - - -
    -

    /syntax/GRDDLParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - GRDDLParser - - A GRDDLParser. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Parser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Parser.php.html deleted file mode 100755 index 37db8657..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Parser.php.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - Docs for page N3Parser.php - - - - -
    -

    /syntax/N3Parser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - N3Parser - - PHP Notation3 Parser -
    -
    -
    - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'util/Object.php') - (line 2) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Resource.php') - (line 3) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Literal.php') - (line 4) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'model/Statement.php') - (line 5) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Serializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Serializer.php.html deleted file mode 100755 index ca5cb1c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---N3Serializer.php.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Docs for page N3Serializer.php - - - - -
    -

    /syntax/N3Serializer.php

    - - -
    -
    Description
    - -
    - -

    PHP Notation3 Serializer

    -

    This class serialises models to N3 Syntax.

    Supported N3 features:

    • Using [ ] for blank nodes, or _: if nescessary
    • Literal datytype- and xmlLanguageTag support

    Un-supported N3 Features include:

    • Reification

    TODO: * added namespace prefixes are persisent...

    - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - N3Serializer - - An abstract object. -
    -
    -
    - - - -
    -
    Constants
    - -
    - -
    - -
    - - MAGIC_STRING = '~~~' - (line 32) - -
    - - - - -
    -
    -
    - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---NTripleSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---NTripleSerializer.php.html deleted file mode 100755 index 24a3dbbb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---NTripleSerializer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page NTripleSerializer.php - - - - -
    -

    /syntax/NTripleSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - NTripleSerializer - - PHP N-Triple Serializer -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:03 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfParser.php.html deleted file mode 100755 index e4f2a119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfParser.php - - - - -
    -

    /syntax/RdfParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfParser - - An RDF paser. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfSerializer.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfSerializer.php.html deleted file mode 100755 index 604f4d6c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RdfSerializer.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfSerializer.php - - - - -
    -

    /syntax/RdfSerializer.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RdfSerializer - - An RDF seralizer. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RssParser.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RssParser.php.html deleted file mode 100755 index 91bdd522..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/syntax/_syntax---RssParser.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RssParser.php - - - - -
    -

    /syntax/RssParser.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RssParser - - RSS/ATOM Parser -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/todolist.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/todolist.html deleted file mode 100755 index 34beefd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/todolist.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Todo List - - - - -

    Todo List

    -

    rdql

    -

    RdqlParser::parseAnd()

    -
      -
    • clear comments
    • -
    -

    - Documentation generated on Mon, 26 Jun 2006 14:26:26 +0200 by phpDocumentor 1.3.0RC6 -

    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/all-wcprops deleted file mode 100755 index 7a060cbb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/all-wcprops +++ /dev/null @@ -1,77 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility -END -StatementIterator.html -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/StatementIterator.html -END -_util---IterFind.php.html -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---IterFind.php.html -END -_util---Object.php.html -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---Object.php.html -END -_util---ModelComparator.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---ModelComparator.php.html -END -_util---RdfUtil.php.html -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---RdfUtil.php.html -END -IterFind.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/IterFind.html -END -_util---FindIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---FindIterator.php.html -END -Object.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/Object.html -END -ModelComparator.html -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/ModelComparator.html -END -_util---StatementIterator.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/_util---StatementIterator.php.html -END -RDFUtil.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/RDFUtil.html -END -FindIterator.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/utility/FindIterator.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/entries deleted file mode 100755 index 78da0287..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/entries +++ /dev/null @@ -1,184 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/utility -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -StatementIterator.html -file - - - - -2008-02-29T14:57:33.385234Z -5d93c1995c35ddc1a2e22e32d5215114 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---IterFind.php.html -file - - - - -2008-02-29T14:57:33.400855Z -3d29783337f07cd9fe6a3eddfce4e2c8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---Object.php.html -file - - - - -2008-02-29T14:57:33.400855Z -5ff1aad0b020fc44e7082e19c4adf509 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---ModelComparator.php.html -file - - - - -2008-02-29T14:57:33.416475Z -838c2650279ee706044bc2c1a670db45 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---RdfUtil.php.html -file - - - - -2008-02-29T14:57:33.416475Z -8056a60e57dac367522a2eff2fb3839d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -IterFind.html -file - - - - -2008-02-29T14:57:33.432096Z -470644257705ad2d2d275263f7d1db60 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---FindIterator.php.html -file - - - - -2008-02-29T14:57:33.432096Z -8a6b5ed9cdc8965027744d58e5e353e1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -Object.html -file - - - - -2008-02-29T14:57:33.447716Z -42154011a742f4d07fbf1fc3f9dd819b -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ModelComparator.html -file - - - - -2008-02-29T14:57:33.447716Z -0c25d99fa908aeed064e0c9dc10983f3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_util---StatementIterator.php.html -file - - - - -2008-02-29T14:57:33.463337Z -84c3810917c773c17403325528b3df8f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RDFUtil.html -file - - - - -2008-02-29T14:57:33.463337Z -1a2512a42df0464326cdd4ad32136263 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -FindIterator.html -file - - - - -2008-02-29T14:57:33.478958Z -a2ce30a0259d91128a9e822285a7b64d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/FindIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/FindIterator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/FindIterator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/IterFind.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/IterFind.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/IterFind.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/ModelComparator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/ModelComparator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/ModelComparator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/Object.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/Object.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/Object.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/RDFUtil.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/RDFUtil.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/RDFUtil.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/StatementIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/StatementIterator.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/StatementIterator.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---FindIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---FindIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---FindIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---IterFind.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---IterFind.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---IterFind.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---ModelComparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---ModelComparator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---ModelComparator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---Object.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---Object.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---Object.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---RdfUtil.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---RdfUtil.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---RdfUtil.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---StatementIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---StatementIterator.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/prop-base/_util---StatementIterator.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/FindIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/FindIterator.html.svn-base deleted file mode 100755 index cfd2ed3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/FindIterator.html.svn-base +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - Docs For Class FindIterator - - - - -
    -

    Class FindIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing statements matching a searchpattern.

    -

    FindIterators are returned by model->findAsIterator() Using a find iterator is significantly faster than using model->find() which returns a new result model.

    - -

    - Located in /util/FindIterator.php (line 21) -

    - - -
    Object
    -   |
    -   --FindIterator
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $object -
    -
    - mixed - $predicate -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - FindIterator - FindIterator - (object MemModel &$model, object Subject $sub, object Predicate $pred, object Object $obj) -
    - -
    - statement - current - () -
    - -
    - boolean - hasNext - () -
    - -
    - statement - next - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $object - (line 51) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $predicate - (line 50) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor FindIterator (line 63) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - FindIterator - - FindIterator - - (object MemModel &$model, object Subject $sub, object Predicate $pred, object Object $obj) -
    - -
      -
    • - object MemModel - &$model
    • -
    • - object Subject - $sub
    • -
    • - object Predicate - $pred
    • -
    • - object Object - $obj
    • -
    - - -
    - -
    - -
    - current (line 109) -
    - - -

    Returns the current matching statement.

    -
      -
    • return: or NULL if there is no current matching statement.
    • -
    • access: public
    • -
    - -
    - statement - - current - - () -
    - - - -
    - -
    - -
    - hasNext (line 77) -
    - - -

    Returns TRUE if there are more matching statements.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - next (line 91) -
    - - -

    Returns the next matching statement.

    -
      -
    • return: or NULL if there is no next matching statement.
    • -
    • access: public
    • -
    - -
    - statement - - next - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/IterFind.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/IterFind.html.svn-base deleted file mode 100755 index 77ec10ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/IterFind.html.svn-base +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - Docs For Class IterFind - - - - -
    -

    Class IterFind

    - - -
    -
    Description
    - -
    - -

    Implementation of a find-iterator which delivers statements or quads.

    -

    This Iterator should be used in a for-loop like: for($iterator = $memmodel->iterFind(null,null,null,null); $iterator->valid(); $iterator->next()) { $statement=$iterator->current(); };

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id$
    • -
    • access: public
    • -
    -

    - Located in /util/IterFind.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IterFind - IterFind - ($graph $graph, $subject $subject, $predicate $predicate, $object $object, [$returnAsQuads $returnAsQuads = false]) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IterFind (line 100) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like find(). $graph has to be a reference to the graph to search in.

    -
      -
    • access: public
    • -
    - -
    - IterFind - - IterFind - - ($graph $graph, $subject $subject, $predicate $predicate, $object $object, [$returnAsQuads $returnAsQuads = false]) -
    - -
      -
    • - $graph - $graph: Resource
    • -
    • - $subject - $subject: Resource
    • -
    • - $predicate - $predicate: Resource
    • -
    • - $object - $object: Resource
    • -
    • - $returnAsQuads - $returnAsQuads: boolean
    • -
    - - -
    - -
    - -
    - current (line 154) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 169) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 142) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 120) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 132) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/ModelComparator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/ModelComparator.html.svn-base deleted file mode 100755 index bada6b01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/ModelComparator.html.svn-base +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - Docs For Class ModelComparator - - - - -
    -

    Class ModelComparator

    - - -
    -
    Description
    - -
    - -

    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.

    - -

    - Located in /util/ModelComparator.php (line 21) -

    - - -
    Object
    -   |
    -   --ModelComparator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Array - buildSortArray - ($tripleList $tripleList) -
    - -
    - boolean - compare - ($thisModel $thisModel, $thatModel $thatModel) -
    - -
    - boolean - compareTriples - ($tripleList $array1, $tripleList $array2) -
    - -
    - Array - renameBlanks - ($sortedArray $sortedArray) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - buildSortArray (line 65) -
    - - -

    Builds a sorted array.

    - -
    - Array - - buildSortArray - - ($tripleList $tripleList) -
    - -
      -
    • - $tripleList - $tripleList: A List that contains the models triples.
    • -
    - - -
    - -
    - -
    - compare (line 31) -
    - - -

    Compares two models.

    - -
    - boolean - - compare - - ($thisModel $thisModel, $thatModel $thatModel) -
    - -
      -
    • - $thisModel - $thisModel: First Model.
    • -
    • - $thatModel - $thatModel: Second Model.
    • -
    - - -
    - -
    - -
    - compareTriples (line 144) -
    - - -

    Compares the Triples in the lists.

    - -
    - boolean - - compareTriples - - ($tripleList $array1, $tripleList $array2) -
    - -
      -
    • - $tripleList - $array1: A List that contains the models triples.
    • -
    • - $tripleList - $array2: A List that contains the models triples.
    • -
    - - -
    - -
    - -
    - renameBlanks (line 99) -
    - - -

    Renames the models Blanknodes.

    - -
    - Array - - renameBlanks - - ($sortedArray $sortedArray) -
    - -
      -
    • - $sortedArray - $sortedArray: A List that contains the models triples.
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/Object.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/Object.html.svn-base deleted file mode 100755 index d976d72f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/Object.html.svn-base +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - Docs For Class Object - - - - -
    -

    Class Object

    - - -
    -
    Description
    - -
    - -

    An abstract object.

    -

    Root object with some general methods, that should be overloaded.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id$
    • -
    • abstract:
    • -
    -

    - Located in /util/Object.php (line 19) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ClassDescription
    DbStore - DbStore is a persistent store of RDF data using relational database technology. -
    Model - Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph. -
    Node - An abstract RDF node. -
    Statement - An RDF statement. -
    RdqlEngine - Some general methods common for RdqlMemEngine and RdqlDbEngine -
    RdqlParser - This class contains methods for parsing an Rdql query string into PHP variables. -
    RdqlResultIterator - Iterator for traversing Rdql results. -
    ClientQuery - ClientQuery Object to run a SPARQL Query against a SPARQL server. -
    Constraint - Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms. -
    GraphPattern - A graph pattern which consists of triple patterns, optional or union graph patterns and filters. -
    Query - The Class Query represents a SPARQL query. -
    QueryTriple - Represents a query triple. -
    SparqlClient - Client for querying a sparql server. -
    SparqlEngine - This engine executes SPARQL queries against an RDF Datatset. -
    SparqlParser - Parses a SPARQL Query string and returns a Query Object. -
    GRDDLParser - A GRDDLParser. -
    N3Parser - PHP Notation3 Parser -
    N3Serializer - An abstract object. -
    NTripleSerializer - PHP N-Triple Serializer -
    RdfParser - An RDF paser. -
    RdfSerializer - An RDF seralizer. -
    RssParser - RSS/ATOM Parser -
    SparqlResultParser - Parses an xml document in SPARQL Result XML Format. -
    FindIterator - Iterator for traversing statements matching a searchpattern. -
    ModelComparator - This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll. -
    RDFUtil - Useful utility methods. -
    StatementIterator - Iterator for traversing models. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - toString (line 27) -
    - - -

    Serializes a object into a string

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/RDFUtil.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/RDFUtil.html.svn-base deleted file mode 100755 index afe9c4e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/RDFUtil.html.svn-base +++ /dev/null @@ -1,528 +0,0 @@ - - - - - - Docs For Class RDFUtil - - - - -
    -

    Class RDFUtil

    - - -
    -
    Description
    - -
    - -

    Useful utility methods.

    -

    Static class.

    - -

    - Located in /util/RdfUtil.php (line 17) -

    - - -
    Object
    -   |
    -   --RDFUtil
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - object Resource - createOrd - (Integer $num) -
    - -
    - String - escapeValue - (String $textValue) -
    - -
    - string - getLocalName - (Object $resource) -
    - -
    - string - getNamespace - (Object $resource) -
    - -
    - Integer - getOrd - (object Resource $resource) -
    - -
    - void - getPrefix - (String $uri) -
    - -
    - string - guessName - (String $uri) -
    - -
    - string - guessNamespace - (String $uri) -
    - -
    - string, - guessPrefix - (string $uri,  &$model, object $model) -
    - -
    - boolean - isRDF - (Object $resource) -
    - -
    - string, - visualizeGraph - (object Model &$model, [string $format = "input_dot"], [boolean $short_prefix = TRUE]) -
    - -
    - void - writeHTMLTable - (object MemModel &$model) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - createOrd (line 162) -
    - - -

    Creates ordinal RDF resource out of an integer.

    -
      -
    • access: public
    • -
    - -
    - object Resource - - createOrd - - (Integer $num) -
    - -
      -
    • - Integer - $num
    • -
    - - -
    - -
    - -
    - escapeValue (line 127) -
    - - -

    Escapes < > and &

    -
      -
    • access: public
    • -
    - -
    - String - - escapeValue - - (String $textValue) -
    - -
      -
    • - String - $textValue
    • -
    - - -
    - -
    - -
    - getLocalName (line 60) -
    - - -

    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLocalName - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - getNamespace (line 49) -
    - - -

    Extracts the namespace prefix out of the URI of a Resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getNamespace - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - getOrd (line 144) -
    - - -

    Converts an ordinal RDF resource to an integer.

    -

    e.g. Resource(RDF:_1) => 1

    -
      -
    • access: public
    • -
    - -
    - Integer - - getOrd - - (object Resource $resource) -
    - -
      -
    • - object Resource - $resource
    • -
    - - -
    - -
    - -
    - getPrefix (line 87) -
    - - -

    Short Prefix for known Namespaces by given URI

    -
      -
    • access: public
    • -
    - -
    - void - - getPrefix - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessName (line 38) -
    - - -

    Delivers the name out of the URI (without the namespace prefix).

    -
      -
    • access: public
    • -
    - -
    - string - - guessName - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessNamespace (line 26) -
    - - -

    Extracts the namespace prefix out of a URI.

    -
      -
    • access: public
    • -
    - -
    - string - - guessNamespace - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessPrefix (line 337) -
    - - -

    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found

    - - -
    - string, - - guessPrefix - - (string $uri,  &$model, object $model) -
    - -
      -
    • - string - $uri
    • -
    • - object - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - isRDF (line 116) -
    - - -

    Tests if the URI of a resource belongs to the RDF syntax/model namespace.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isRDF - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - visualizeGraph (line 382) -
    - - -

    Generates a dot-file for drawing graphical output with the

    -

    graphviz-application which can be downloaded at http://www.graphviz.org If the graphviz-application is installed and its path is set to the correct value in constants.php we can directly generate any file format graphviz supports, e.g. SVG, PNG Parameters: model to visualize, output format, use prefixes

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: Graphviz can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    - - -
    - string, - - visualizeGraph - - (object Model &$model, [string $format = "input_dot"], [boolean $short_prefix = TRUE]) -
    - -
      -
    • - string - $format
    • -
    • - boolean - $short_prefix
    • -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - writeHTMLTable (line 173) -
    - - -

    Prints a MemModel as HTML table.

    -

    You can change the colors in the configuration file.

    -
      -
    • access: public
    • -
    - -
    - void - - writeHTMLTable - - (object MemModel &$model) -
    - -
      -
    • - object MemModel - &$model
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/StatementIterator.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/StatementIterator.html.svn-base deleted file mode 100755 index 79c9d1c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/StatementIterator.html.svn-base +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - Docs For Class StatementIterator - - - - -
    -

    Class StatementIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing models.

    -

    This class can be used for iterating forward and backward trough MemModels. It should be instanced using the getIterator() method of a MemModel.

    - -

    - Located in /util/StatementIterator.php (line 20) -

    - - -
    Object
    -   |
    -   --StatementIterator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - StatementIterator - StatementIterator - (object MemModel &$model) -
    - -
    - statement - current - () -
    - -
    - integer - getCurrentPosition - () -
    - -
    - boolean - hasNext - () -
    - -
    - boolean - hasPrevious - () -
    - -
    - void - moveFirst - () -
    - -
    - void - moveLast - () -
    - -
    - void - moveTo - (integer $position) -
    - -
    - statement - next - () -
    - -
    - statement - previous - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor StatementIterator (line 45) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - StatementIterator - - StatementIterator - - (object MemModel &$model) -
    - -
      -
    • - object MemModel - &$model
    • -
    - - -
    - -
    - -
    - current (line 144) -
    - - -

    Returns the current statement.

    -
      -
    • return: or NULL if there is no current statement.
    • -
    • access: public
    • -
    - -
    - statement - - current - - () -
    - - - -
    - -
    - -
    - getCurrentPosition (line 202) -
    - - -

    Returns the current position of the iterator.

    -
      -
    • access: public
    • -
    - -
    - integer - - getCurrentPosition - - () -
    - - - -
    - -
    - -
    - hasNext (line 56) -
    - - -

    Returns TRUE if there are more statements.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - hasPrevious (line 84) -
    - - -

    Returns TRUE if the first statement has not been reached.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasPrevious - - () -
    - - - -
    - -
    - -
    - moveFirst (line 159) -
    - - -

    Moves the pointer to the first statement.

    -
      -
    • access: public
    • -
    - -
    - void - - moveFirst - - () -
    - - - -
    - -
    - -
    - moveLast (line 169) -
    - - -

    Moves the pointer to the last statement.

    -
      -
    • access: public
    • -
    - -
    - void - - moveLast - - () -
    - - - -
    - -
    - -
    - moveTo (line 181) -
    - - -

    Moves the pointer to a specific statement.

    -

    If you set an off-bounds value, the position will be set to the last element

    -
      -
    • access: public
    • -
    - -
    - void - - moveTo - - (integer $position) -
    - -
      -
    • - integer - $position
    • -
    - - -
    - -
    - -
    - next (line 100) -
    - - -

    Returns the next statement.

    -
      -
    • return: or NULL if there is no next statement.
    • -
    • access: public
    • -
    - -
    - statement - - next - - () -
    - - - -
    - -
    - -
    - previous (line 129) -
    - - -

    Returns the previous statement.

    -
      -
    • return: or NULL if there is no previous statement.
    • -
    • access: public
    • -
    - -
    - statement - - previous - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---FindIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---FindIterator.php.html.svn-base deleted file mode 100755 index 5054e0e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---FindIterator.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FindIterator.php - - - - -
    -

    /util/FindIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FindIterator - - Iterator for traversing statements matching a searchpattern. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---IterFind.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---IterFind.php.html.svn-base deleted file mode 100755 index 4ad50768..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---IterFind.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IterFind.php - - - - -
    -

    /util/IterFind.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IterFind - - Implementation of a find-iterator which delivers statements or quads. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---ModelComparator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---ModelComparator.php.html.svn-base deleted file mode 100755 index cc819bfa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---ModelComparator.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ModelComparator.php - - - - -
    -

    /util/ModelComparator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ModelComparator - - This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---Object.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---Object.php.html.svn-base deleted file mode 100755 index 7fadcc19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---Object.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Object.php - - - - -
    -

    /util/Object.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Object - - An abstract object. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---RdfUtil.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---RdfUtil.php.html.svn-base deleted file mode 100755 index 082c5ab3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---RdfUtil.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfUtil.php - - - - -
    -

    /util/RdfUtil.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFUtil - - Useful utility methods. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---StatementIterator.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---StatementIterator.php.html.svn-base deleted file mode 100755 index 6331088c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/.svn/text-base/_util---StatementIterator.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page StatementIterator.php - - - - -
    -

    /util/StatementIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - StatementIterator - - Iterator for traversing models. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/FindIterator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/FindIterator.html deleted file mode 100755 index 8e174d63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/FindIterator.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - Docs For Class FindIterator - - - - -
    -

    Class FindIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing statements matching a searchpattern.

    -

    FindIterators are returned by model->findAsIterator() Using a find iterator is significantly faster than using model->find() which returns a new result model.

    -
      -
    • author: Tobias Gau <tobias.gauss@web.de>
    • -
    • version: $Id: FindIterator.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /util/FindIterator.php (line 21) -

    - - -
    Object
    -   |
    -   --FindIterator
    - -
    -
    - - - - -
    -
    Variable Summary
    - -
    -
    -
    - mixed - $object -
    -
    - mixed - $predicate -
    -
    -
    -
    - - -
    -
    Method Summary
    - -
    -
    - -
    - FindIterator - FindIterator - (object MemModel &$model, object Subject $sub, object Predicate $pred, object Object $obj) -
    - -
    - statement - current - () -
    - -
    - boolean - hasNext - () -
    - -
    - statement - next - () -
    -
    -
    -
    - - -
    -
    Variables
    - -
    - - -
    - -
    - - mixed - $object - (line 51) - -
    - - - - - - - -
    - -
    - -
    - - mixed - $predicate - (line 50) - -
    - - - - - - - -
    - -
    -
    - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor FindIterator (line 63) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - FindIterator - - FindIterator - - (object MemModel &$model, object Subject $sub, object Predicate $pred, object Object $obj) -
    - -
      -
    • - object MemModel - &$model
    • -
    • - object Subject - $sub
    • -
    • - object Predicate - $pred
    • -
    • - object Object - $obj
    • -
    - - -
    - -
    - -
    - current (line 109) -
    - - -

    Returns the current matching statement.

    -
      -
    • return: or NULL if there is no current matching statement.
    • -
    • access: public
    • -
    - -
    - statement - - current - - () -
    - - - -
    - -
    - -
    - hasNext (line 77) -
    - - -

    Returns TRUE if there are more matching statements.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - next (line 91) -
    - - -

    Returns the next matching statement.

    -
      -
    • return: or NULL if there is no next matching statement.
    • -
    • access: public
    • -
    - -
    - statement - - next - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/IterFind.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/IterFind.html deleted file mode 100755 index 7fecd3cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/IterFind.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - Docs For Class IterFind - - - - -
    -

    Class IterFind

    - - -
    -
    Description
    - -
    - -

    Implementation of a find-iterator which delivers statements or quads.

    -

    This Iterator should be used in a for-loop like: for($iterator = $memmodel->iterFind(null,null,null,null); $iterator->valid(); $iterator->next()) { $statement=$iterator->current(); };

    -
      -
    • author: Daniel Westphal (http://www.d-westphal.de)
    • -
    • version: $Id: IterFind.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /util/IterFind.php (line 24) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - IterFind - IterFind - ($graph $graph, $subject $subject, $predicate $predicate, $object $object, [$returnAsQuads $returnAsQuads = false]) -
    - -
    - mixed - current - () -
    - -
    - integer - key - () -
    - -
    - void - next - () -
    - -
    - void - rewind - () -
    - -
    - boolean - valid - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor IterFind (line 100) -
    - - -

    Constructor.

    -

    $subject, $predicate, and $object are used like find(). $graph has to be a reference to the graph to search in.

    -
      -
    • access: public
    • -
    - -
    - IterFind - - IterFind - - ($graph $graph, $subject $subject, $predicate $predicate, $object $object, [$returnAsQuads $returnAsQuads = false]) -
    - -
      -
    • - $graph - $graph: Resource
    • -
    • - $subject - $subject: Resource
    • -
    • - $predicate - $predicate: Resource
    • -
    • - $object - $object: Resource
    • -
    • - $returnAsQuads - $returnAsQuads: boolean
    • -
    - - -
    - -
    - -
    - current (line 154) -
    - - -

    Returns the current item

    -
      -
    • access: public
    • -
    - -
    - mixed - - current - - () -
    - - - -
    - -
    - -
    - key (line 169) -
    - - -

    Returns the key of the current item

    -
      -
    • access: public
    • -
    - -
    - integer - - key - - () -
    - - - -
    - -
    - -
    - next (line 142) -
    - - -

    Moves Iterator to the next item in the list

    -
      -
    • access: public
    • -
    - -
    - void - - next - - () -
    - - - -
    - -
    - -
    - rewind (line 120) -
    - - -

    Resets iterator list to start

    -
      -
    • access: public
    • -
    - -
    - void - - rewind - - () -
    - - - -
    - -
    - -
    - valid (line 132) -
    - - -

    Says if there are additional items left in the list

    -
      -
    • access: public
    • -
    - -
    - boolean - - valid - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/ModelComparator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/ModelComparator.html deleted file mode 100755 index cdc2a031..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/ModelComparator.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - Docs For Class ModelComparator - - - - -
    -

    Class ModelComparator

    - - -
    -
    Description
    - -
    - -

    This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll.

    - -

    - Located in /util/ModelComparator.php (line 21) -

    - - -
    Object
    -   |
    -   --ModelComparator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - Array - buildSortArray - ($tripleList $tripleList) -
    - -
    - boolean - compare - ($thisModel $thisModel, $thatModel $thatModel) -
    - -
    - boolean - compareTriples - ($tripleList $array1, $tripleList $array2) -
    - -
    - Array - renameBlanks - ($sortedArray $sortedArray) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - buildSortArray (line 65) -
    - - -

    Builds a sorted array.

    - -
    - Array - - buildSortArray - - ($tripleList $tripleList) -
    - -
      -
    • - $tripleList - $tripleList: A List that contains the models triples.
    • -
    - - -
    - -
    - -
    - compare (line 31) -
    - - -

    Compares two models.

    - -
    - boolean - - compare - - ($thisModel $thisModel, $thatModel $thatModel) -
    - -
      -
    • - $thisModel - $thisModel: First Model.
    • -
    • - $thatModel - $thatModel: Second Model.
    • -
    - - -
    - -
    - -
    - compareTriples (line 144) -
    - - -

    Compares the Triples in the lists.

    - -
    - boolean - - compareTriples - - ($tripleList $array1, $tripleList $array2) -
    - -
      -
    • - $tripleList - $array1: A List that contains the models triples.
    • -
    • - $tripleList - $array2: A List that contains the models triples.
    • -
    - - -
    - -
    - -
    - renameBlanks (line 99) -
    - - -

    Renames the models Blanknodes.

    - -
    - Array - - renameBlanks - - ($sortedArray $sortedArray) -
    - -
      -
    • - $sortedArray - $sortedArray: A List that contains the models triples.
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/Object.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/Object.html deleted file mode 100755 index 33b1baa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/Object.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - Docs For Class Object - - - - -
    -

    Class Object

    - - -
    -
    Description
    - -
    - -

    An abstract object.

    -

    Root object with some general methods, that should be overloaded.

    -
      -
    • author: Chris Bizer <chris@bizer.de>
    • -
    • version: $Id: Object.html 443 2007-06-01 16:25:38Z cax $
    • -
    • abstract:
    • -
    -

    - Located in /util/Object.php (line 19) -

    - - -
    
    -	
    -			
    -
    - - -
    -
    Direct descendents
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ClassDescription
    DbStore - DbStore is a persistent store of RDF data using relational database technology. -
    Model - Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph. -
    Node - An abstract RDF node. -
    Statement - An RDF statement. -
    RdqlEngine - Some general methods common for RdqlMemEngine and RdqlDbEngine -
    RdqlParser - This class contains methods for parsing an Rdql query string into PHP variables. -
    RdqlResultIterator - Iterator for traversing Rdql results. -
    ClientQuery - ClientQuery Object to run a SPARQL Query against a SPARQL server. -
    Constraint - Represents a constraint. A value constraint is a boolean- valued expression of variables and RDF Terms. -
    GraphPattern - A graph pattern which consists of triple patterns, optional or union graph patterns and filters. -
    Query - The Class Query represents a SPARQL query. -
    QueryTriple - Represents a query triple. -
    SparqlClient - Client for querying a sparql server. -
    SparqlEngine - This engine executes SPARQL queries against an RDF Datatset. -
    SparqlParser - Parses a SPARQL Query string and returns a Query Object. -
    GRDDLParser - A GRDDLParser. -
    N3Parser - PHP Notation3 Parser -
    N3Serializer - An abstract object. -
    NTripleSerializer - PHP N-Triple Serializer -
    RdfParser - An RDF paser. -
    RdfSerializer - An RDF seralizer. -
    RssParser - RSS/ATOM Parser -
    SparqlResultParser - Parses an xml document in SPARQL Result XML Format. -
    FindIterator - Iterator for traversing statements matching a searchpattern. -
    ModelComparator - This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll. -
    RDFUtil - Useful utility methods. -
    StatementIterator - Iterator for traversing models. -
    -
    -
    - - - - -
    -
    Method Summary
    - -
    -
    - -
    - string - toString - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - toString (line 27) -
    - - -

    Serializes a object into a string

    -
      -
    • access: public
    • -
    - -
    - string - - toString - - () -
    - - - -
    -
    Redefined in descendants as:
    - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/RDFUtil.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/RDFUtil.html deleted file mode 100755 index bde3affd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/RDFUtil.html +++ /dev/null @@ -1,528 +0,0 @@ - - - - - - Docs For Class RDFUtil - - - - -
    -

    Class RDFUtil

    - - -
    -
    Description
    - -
    - -

    Useful utility methods.

    -

    Static class.

    -
      -
    • author: Chris Bizer <chris@bizer.de>, Daniel Westphal <dawe@gmx.de>
    • -
    • author: Anton Kstlbacher <anton1@koestlbacher.de>
    • -
    • version: $Id: RDFUtil.html 443 2007-06-01 16:25:38Z cax $
    • -
    • access: public
    • -
    -

    - Located in /util/RdfUtil.php (line 17) -

    - - -
    Object
    -   |
    -   --RDFUtil
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - object Resource - createOrd - (Integer $num) -
    - -
    - String - escapeValue - (String $textValue) -
    - -
    - string - getLocalName - (Object $resource) -
    - -
    - string - getNamespace - (Object $resource) -
    - -
    - Integer - getOrd - (object Resource $resource) -
    - -
    - void - getPrefix - (String $uri) -
    - -
    - string - guessName - (String $uri) -
    - -
    - string - guessNamespace - (String $uri) -
    - -
    - string, - guessPrefix - (string $uri,  &$model, object $model) -
    - -
    - boolean - isRDF - (Object $resource) -
    - -
    - string, - visualizeGraph - (object Model &$model, [string $format = "input_dot"], [boolean $short_prefix = TRUE]) -
    - -
    - void - writeHTMLTable - (object MemModel &$model) -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - createOrd (line 162) -
    - - -

    Creates ordinal RDF resource out of an integer.

    -
      -
    • access: public
    • -
    - -
    - object Resource - - createOrd - - (Integer $num) -
    - -
      -
    • - Integer - $num
    • -
    - - -
    - -
    - -
    - escapeValue (line 127) -
    - - -

    Escapes < > and &

    -
      -
    • access: public
    • -
    - -
    - String - - escapeValue - - (String $textValue) -
    - -
      -
    • - String - $textValue
    • -
    - - -
    - -
    - -
    - getLocalName (line 60) -
    - - -

    Delivers the Localname (without the namespace prefix) out of the URI of a Resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getLocalName - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - getNamespace (line 49) -
    - - -

    Extracts the namespace prefix out of the URI of a Resource.

    -
      -
    • access: public
    • -
    - -
    - string - - getNamespace - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - getOrd (line 144) -
    - - -

    Converts an ordinal RDF resource to an integer.

    -

    e.g. Resource(RDF:_1) => 1

    -
      -
    • access: public
    • -
    - -
    - Integer - - getOrd - - (object Resource $resource) -
    - -
      -
    • - object Resource - $resource
    • -
    - - -
    - -
    - -
    - getPrefix (line 87) -
    - - -

    Short Prefix for known Namespaces by given URI

    -
      -
    • access: public
    • -
    - -
    - void - - getPrefix - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessName (line 38) -
    - - -

    Delivers the name out of the URI (without the namespace prefix).

    -
      -
    • access: public
    • -
    - -
    - string - - guessName - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessNamespace (line 26) -
    - - -

    Extracts the namespace prefix out of a URI.

    -
      -
    • access: public
    • -
    - -
    - string - - guessNamespace - - (String $uri) -
    - -
      -
    • - String - $uri
    • -
    - - -
    - -
    - -
    - guessPrefix (line 337) -
    - - -

    Short Prefix for known and/or parsed Namespaces by given URI and Model Uses $default_prefixes defined in constants.php and getParsedNamespaces() Returns FALSE if no matching prefix is found

    - - -
    - string, - - guessPrefix - - (string $uri,  &$model, object $model) -
    - -
      -
    • - string - $uri
    • -
    • - object - $model
    • -
    • - - &$model
    • -
    - - -
    - -
    - -
    - isRDF (line 116) -
    - - -

    Tests if the URI of a resource belongs to the RDF syntax/model namespace.

    -
      -
    • access: public
    • -
    - -
    - boolean - - isRDF - - (Object $resource) -
    - -
      -
    • - Object - $resource: Resource $resource
    • -
    - - -
    - -
    - -
    - visualizeGraph (line 382) -
    - - -

    Generates a dot-file for drawing graphical output with the

    -

    graphviz-application which can be downloaded at http://www.graphviz.org If the graphviz-application is installed and its path is set to the correct value in constants.php we can directly generate any file format graphviz supports, e.g. SVG, PNG Parameters: model to visualize, output format, use prefixes

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING: Graphviz can be slow with large models. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    - - -
    - string, - - visualizeGraph - - (object Model &$model, [string $format = "input_dot"], [boolean $short_prefix = TRUE]) -
    - -
      -
    • - string - $format
    • -
    • - boolean - $short_prefix
    • -
    • - object Model - &$model
    • -
    - - -
    - -
    - -
    - writeHTMLTable (line 173) -
    - - -

    Prints a MemModel as HTML table.

    -

    You can change the colors in the configuration file.

    -
      -
    • access: public
    • -
    - -
    - void - - writeHTMLTable - - (object MemModel &$model) -
    - -
      -
    • - object MemModel - &$model
    • -
    - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/StatementIterator.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/StatementIterator.html deleted file mode 100755 index 5ead0645..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/StatementIterator.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - Docs For Class StatementIterator - - - - -
    -

    Class StatementIterator

    - - -
    -
    Description
    - -
    - -

    Iterator for traversing models.

    -

    This class can be used for iterating forward and backward trough MemModels. It should be instanced using the getIterator() method of a MemModel.

    - -

    - Located in /util/StatementIterator.php (line 20) -

    - - -
    Object
    -   |
    -   --StatementIterator
    - -
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - StatementIterator - StatementIterator - (object MemModel &$model) -
    - -
    - statement - current - () -
    - -
    - integer - getCurrentPosition - () -
    - -
    - boolean - hasNext - () -
    - -
    - boolean - hasPrevious - () -
    - -
    - void - moveFirst - () -
    - -
    - void - moveLast - () -
    - -
    - void - moveTo - (integer $position) -
    - -
    - statement - next - () -
    - -
    - statement - previous - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - Constructor StatementIterator (line 45) -
    - - -

    Constructor

    -
      -
    • access: public
    • -
    - -
    - StatementIterator - - StatementIterator - - (object MemModel &$model) -
    - -
      -
    • - object MemModel - &$model
    • -
    - - -
    - -
    - -
    - current (line 144) -
    - - -

    Returns the current statement.

    -
      -
    • return: or NULL if there is no current statement.
    • -
    • access: public
    • -
    - -
    - statement - - current - - () -
    - - - -
    - -
    - -
    - getCurrentPosition (line 202) -
    - - -

    Returns the current position of the iterator.

    -
      -
    • access: public
    • -
    - -
    - integer - - getCurrentPosition - - () -
    - - - -
    - -
    - -
    - hasNext (line 56) -
    - - -

    Returns TRUE if there are more statements.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasNext - - () -
    - - - -
    - -
    - -
    - hasPrevious (line 84) -
    - - -

    Returns TRUE if the first statement has not been reached.

    -
      -
    • access: public
    • -
    - -
    - boolean - - hasPrevious - - () -
    - - - -
    - -
    - -
    - moveFirst (line 159) -
    - - -

    Moves the pointer to the first statement.

    -
      -
    • access: public
    • -
    - -
    - void - - moveFirst - - () -
    - - - -
    - -
    - -
    - moveLast (line 169) -
    - - -

    Moves the pointer to the last statement.

    -
      -
    • access: public
    • -
    - -
    - void - - moveLast - - () -
    - - - -
    - -
    - -
    - moveTo (line 181) -
    - - -

    Moves the pointer to a specific statement.

    -

    If you set an off-bounds value, the position will be set to the last element

    -
      -
    • access: public
    • -
    - -
    - void - - moveTo - - (integer $position) -
    - -
      -
    • - integer - $position
    • -
    - - -
    - -
    - -
    - next (line 100) -
    - - -

    Returns the next statement.

    -
      -
    • return: or NULL if there is no next statement.
    • -
    • access: public
    • -
    - -
    - statement - - next - - () -
    - - - -
    - -
    - -
    - previous (line 129) -
    - - -

    Returns the previous statement.

    -
      -
    • return: or NULL if there is no previous statement.
    • -
    • access: public
    • -
    - -
    - statement - - previous - - () -
    - - - -
    -

    Inherited Methods

    - - -

    Inherited From Object

    -
    - Object::toString()
    -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:30 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---FindIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---FindIterator.php.html deleted file mode 100755 index 83fe96be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---FindIterator.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FindIterator.php - - - - -
    -

    /util/FindIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FindIterator - - Iterator for traversing statements matching a searchpattern. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:07 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---IterFind.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---IterFind.php.html deleted file mode 100755 index 18509197..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---IterFind.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page IterFind.php - - - - -
    -

    /util/IterFind.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - IterFind - - Implementation of a find-iterator which delivers statements or quads. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:37 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---ModelComparator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---ModelComparator.php.html deleted file mode 100755 index c75fc4d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---ModelComparator.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ModelComparator.php - - - - -
    -

    /util/ModelComparator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ModelComparator - - This class compares to models. This comparator bases on the labelling algorithm described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> by Jeremy J. Carroll. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---Object.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---Object.php.html deleted file mode 100755 index f8571a9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---Object.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page Object.php - - - - -
    -

    /util/Object.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - Object - - An abstract object. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:04 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---RdfUtil.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---RdfUtil.php.html deleted file mode 100755 index 980c44d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---RdfUtil.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RdfUtil.php - - - - -
    -

    /util/RdfUtil.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFUtil - - Useful utility methods. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---StatementIterator.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---StatementIterator.php.html deleted file mode 100755 index 969c3378..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/utility/_util---StatementIterator.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page StatementIterator.php - - - - -
    -

    /util/StatementIterator.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - StatementIterator - - Iterator for traversing models. -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:28 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/all-wcprops deleted file mode 100755 index 983b818b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/all-wcprops +++ /dev/null @@ -1,251 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary -END -RSS_RES.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RSS_RES.html -END -_vocabulary---VocabularyClass.php.html -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---VocabularyClass.php.html -END -_vocabulary---RDFS.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDFS.php.html -END -_vocabulary---DC_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---DC_RES.php.html -END -_vocabulary---VCARD.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---VCARD.php.html -END -_vocabulary---RDFS_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDFS_C.php.html -END -RDF_RES.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RDF_RES.html -END -_vocabulary---OWL.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---OWL.php.html -END -_vocabulary---VCARD_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---VCARD_C.php.html -END -_vocabulary---ATOM_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---ATOM_C.php.html -END -_vocabulary---OWL_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---OWL_C.php.html -END -_vocabulary---RSS.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RSS.php.html -END -_vocabulary---RSS_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RSS_C.php.html -END -RDFS.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RDFS.html -END -_vocabulary---RDF.php.html -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDF.php.html -END -DC_RES.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/DC_RES.html -END -VCARD.html -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/VCARD.html -END -ATOM.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/ATOM.html -END -OWL.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/OWL.html -END -_vocabulary---RDF_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDF_C.php.html -END -RSS.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RSS.html -END -_vocabulary---FOAF_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---FOAF_RES.php.html -END -RDF.html -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RDF.html -END -_vocabulary---DC_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---DC_C.php.html -END -FOAF_RES.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/FOAF_RES.html -END -DC.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/DC.html -END -_vocabulary---Vocabulary.php.html -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---Vocabulary.php.html -END -_vocabulary---RDFS_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDFS_RES.php.html -END -_vocabulary---VCARD_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---VCARD_RES.php.html -END -_vocabulary---ATOM_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---ATOM_RES.php.html -END -_vocabulary---OWL_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---OWL_RES.php.html -END -_vocabulary---FOAF.php.html -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---FOAF.php.html -END -_vocabulary---FOAF_C.php.html -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---FOAF_C.php.html -END -_vocabulary---RSS_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RSS_RES.php.html -END -_vocabulary---VocabularyRes.php.html -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---VocabularyRes.php.html -END -RDFS_RES.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/RDFS_RES.html -END -_vocabulary---RDF_RES.php.html -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/_vocabulary---RDF_RES.php.html -END -VCARD_RES.html -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/VCARD_RES.html -END -ATOM_RES.html -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/ATOM_RES.html -END -OWL_RES.html -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/OWL_RES.html -END -FOAF.html -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/443/trunk/rdfapi-php/doc/phpdoc/vocabulary/FOAF.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/entries deleted file mode 100755 index 6f51499e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/entries +++ /dev/null @@ -1,561 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/phpdoc/vocabulary -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:25:38.000000Z -443 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -RSS_RES.html -file - - - - -2008-02-29T14:57:34.119402Z -62e8e2135216f0804cf3f405d71d5049 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---VocabularyClass.php.html -file - - - - -2008-02-29T14:57:34.135023Z -f7c2e65d6ca5816c5202969a39e31dac -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDFS.php.html -file - - - - -2008-02-29T14:57:34.135023Z -f054d9a9698acf311e80e7455fbe8db6 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---DC_RES.php.html -file - - - - -2008-02-29T14:57:34.150643Z -9421beaac254643ba1fe430eb8eb4a92 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---VCARD.php.html -file - - - - -2008-02-29T14:57:34.150643Z -f3498e93fec7cb9393ac3394b0f9ee2a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDFS_C.php.html -file - - - - -2008-02-29T14:57:34.150643Z -58b4555276ab1fcd1ce6af671e88c193 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RDF_RES.html -file - - - - -2008-02-29T14:57:34.166264Z -ce0d77bca7d4d5b65543d126f96dc793 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---OWL.php.html -file - - - - -2008-02-29T14:57:34.181885Z -b2a90ef7b19d82e8d6f763b419803ac8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---VCARD_C.php.html -file - - - - -2008-02-29T14:57:34.181885Z -1b52f6bad4b5b819b7965ff3c6cf61e8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---ATOM_C.php.html -file - - - - -2008-02-29T14:57:34.197505Z -36a81bc0534deb5a358c4c42d0ad2527 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---OWL_C.php.html -file - - - - -2008-02-29T14:57:34.197505Z -01be75df7dd6c82acef593033f143f7d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RSS.php.html -file - - - - -2008-02-29T14:57:34.213126Z -2eda3baa647c5ced740e082f848ccb59 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RSS_C.php.html -file - - - - -2008-02-29T14:57:34.213126Z -abbad46da0e0164b32d539efaea5bc59 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RDFS.html -file - - - - -2008-02-29T14:57:34.213126Z -3c08cf6f4a940f092b2f5dc8c2778f0f -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDF.php.html -file - - - - -2008-02-29T14:57:34.244367Z -ccc18178d6dec38681ffc406ca83720d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -VCARD.html -file - - - - -2008-02-29T14:57:34.244367Z -4aa0449b6f58b77880edb1582a6d0afd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DC_RES.html -file - - - - -2008-02-29T14:57:34.228746Z -1195a518d241aa55daa08473fb4d955e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ATOM.html -file - - - - -2008-02-29T14:57:34.259988Z -c4ed9c535f4bc2d01ffd5acd21089393 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OWL.html -file - - - - -2008-02-29T14:57:34.275608Z -981d97835113f3d08af9353944607e59 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDF_C.php.html -file - - - - -2008-02-29T14:57:34.259988Z -a6adb53d349f8f62572b72c578a40e3d -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RSS.html -file - - - - -2008-02-29T14:57:34.291229Z -3b231e9077b4e9b5ac8b5ba72dff3d41 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---FOAF_RES.php.html -file - - - - -2008-02-29T14:57:34.291229Z -7d6047332c68ec9dbb2bf2b2d59b8d40 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RDF.html -file - - - - -2008-02-29T14:57:34.306849Z -28a684bef57abf78365c28cd24b5f4d3 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---DC_C.php.html -file - - - - -2008-02-29T14:57:34.322470Z -45034c27d88cc301db163f116890a6e7 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -FOAF_RES.html -file - - - - -2008-02-29T14:57:34.322470Z -faa0e94c3c1ced2c4c8461ed4476c764 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -DC.html -file - - - - -2008-02-29T14:57:34.338091Z -6fbc1b4cb25eab75daf1b605de0ea2f1 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---Vocabulary.php.html -file - - - - -2008-02-29T14:57:34.353711Z -9c5f1b7429655cad8805ba8e8bbf4ea8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDFS_RES.php.html -file - - - - -2008-02-29T14:57:34.338091Z -5156444d04d03120b6984917a05e73eb -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---VCARD_RES.php.html -file - - - - -2008-02-29T14:57:34.353711Z -a3c3601ca623cef869e75d1525987552 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---ATOM_RES.php.html -file - - - - -2008-02-29T14:57:34.369332Z -f61464868aae477a9c7e5839fe58f47e -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---OWL_RES.php.html -file - - - - -2008-02-29T14:57:34.369332Z -a90c78e808eda115dccc511c296ef352 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---FOAF.php.html -file - - - - -2008-02-29T14:57:34.384952Z -785ad956108c2c4e73441c157dfda07a -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---FOAF_C.php.html -file - - - - -2008-02-29T14:57:34.384952Z -85e663c1ec435110dd70c2b1ec6df9fd -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RSS_RES.php.html -file - - - - -2008-02-29T14:57:34.400573Z -11e65f60c191dc60c4c41e624154f0cc -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---VocabularyRes.php.html -file - - - - -2008-02-29T14:57:34.400573Z -7ea7d472a2fd85adad932dc9291a2f39 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -RDFS_RES.html -file - - - - -2008-02-29T14:57:34.416194Z -743baf33c636884c619744651111bb68 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -_vocabulary---RDF_RES.php.html -file - - - - -2008-02-29T14:57:34.416194Z -e838b171ea7a93b9d41d4b7db4323168 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -VCARD_RES.html -file - - - - -2008-02-29T14:57:34.431814Z -c793d64616c1cdedf11b6cade0ee8296 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -ATOM_RES.html -file - - - - -2008-02-29T14:57:34.447435Z -f85c7306359594c728014a0ae55393c8 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -OWL_RES.html -file - - - - -2008-02-29T14:57:34.447435Z -442ebfaf456883be3db234abe7ec8e00 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - -FOAF.html -file - - - - -2008-02-29T14:57:34.463055Z -147f0be2fcb85564c27fb0b2c654bb78 -2007-06-01T16:25:38.000000Z -443 -cax -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/ATOM_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/DC_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/FOAF_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/OWL_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDFS_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RDF_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/RSS_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD_RES.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/VCARD_RES.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---ATOM_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---DC_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---FOAF_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---OWL_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDFS_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RDF_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---RSS_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_C.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_C.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_RES.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VCARD_RES.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---Vocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---Vocabulary.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---Vocabulary.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyClass.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyClass.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyRes.php.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/prop-base/_vocabulary---VocabularyRes.php.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM.html.svn-base deleted file mode 100755 index 95385e60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM.html.svn-base +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - Docs For Class ATOM - - - - -
    -

    Class ATOM

    - - -
    -
    Description
    - -
    - -

    ATOM Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/ATOM_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ATOM_CONSTRUCT - () -
    - -
    - void - AUTHOR - () -
    - -
    - void - CONTENT - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COPYRIGHT - () -
    - -
    - void - CREATED - () -
    - -
    - void - EMAIL - () -
    - -
    - void - ENTRY - () -
    - -
    - void - FEED - () -
    - -
    - void - GENERATOR - () -
    - -
    - void - HAS_CHILD - () -
    - -
    - void - HAS_ENTRY - () -
    - -
    - void - HAS_LINK - () -
    - -
    - void - HAS_TITLE - () -
    - -
    - void - HREF - () -
    - -
    - void - INFO - () -
    - -
    - void - ISSUED - () -
    - -
    - void - LANG - () -
    - -
    - void - LINK - () -
    - -
    - void - MODE - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - NAME - () -
    - -
    - void - PERSON - () -
    - -
    - void - REL - () -
    - -
    - void - SUMMARY - () -
    - -
    - void - TAGLINE - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - URL - () -
    - -
    - void - VALUE - () -
    - -
    - void - VERSION - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ATOM_CONSTRUCT (line 66) -
    - - - -
    - void - - ATOM_CONSTRUCT - - () -
    - - - -
    - -
    - -
    - AUTHOR (line 114) -
    - - - -
    - void - - AUTHOR - - () -
    - - - -
    - -
    - -
    - CONTENT (line 72) -
    - - - -
    - void - - CONTENT - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 120) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COPYRIGHT (line 138) -
    - - - -
    - void - - COPYRIGHT - - () -
    - - - -
    - -
    - -
    - CREATED (line 192) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - EMAIL (line 42) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - ENTRY (line 156) -
    - - - -
    - void - - ENTRY - - () -
    - - - -
    - -
    - -
    - FEED (line 96) -
    - - - -
    - void - - FEED - - () -
    - - - -
    - -
    - -
    - GENERATOR (line 132) -
    - - - -
    - void - - GENERATOR - - () -
    - - - -
    - -
    - -
    - HAS_CHILD (line 162) -
    - - - -
    - void - - HAS_CHILD - - () -
    - - - -
    - -
    - -
    - HAS_ENTRY (line 168) -
    - - - -
    - void - - HAS_ENTRY - - () -
    - - - -
    - -
    - -
    - HAS_LINK (line 174) -
    - - - -
    - void - - HAS_LINK - - () -
    - - - -
    - -
    - -
    - HAS_TITLE (line 180) -
    - - - -
    - void - - HAS_TITLE - - () -
    - - - -
    - -
    - -
    - HREF (line 54) -
    - - - -
    - void - - HREF - - () -
    - - - -
    - -
    - -
    - INFO (line 144) -
    - - - -
    - void - - INFO - - () -
    - - - -
    - -
    - -
    - ISSUED (line 186) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - LANG (line 108) -
    - - - -
    - void - - LANG - - () -
    - - - -
    - -
    - -
    - LINK (line 90) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - MODE (line 24) -
    - - - -
    - void - - MODE - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 150) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - NAME (line 30) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - PERSON (line 78) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - REL (line 48) -
    - - - -
    - void - - REL - - () -
    - - - -
    - -
    - -
    - SUMMARY (line 198) -
    - - - -
    - void - - SUMMARY - - () -
    - - - -
    - -
    - -
    - TAGLINE (line 126) -
    - - - -
    - void - - TAGLINE - - () -
    - - - -
    - -
    - -
    - TITLE (line 60) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 18) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - URL (line 36) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    - -
    - VALUE (line 84) -
    - - - -
    - void - - VALUE - - () -
    - - - -
    - -
    - -
    - VERSION (line 102) -
    - - - -
    - void - - VERSION - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM_RES.html.svn-base deleted file mode 100755 index f302af5c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/ATOM_RES.html.svn-base +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - Docs For Class ATOM_RES - - - - -
    -

    Class ATOM_RES

    - - -
    -
    Description
    - -
    - -

    ATOM Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/ATOM_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ATOM_CONSTRUCT - () -
    - -
    - void - AUTHOR - () -
    - -
    - void - CONTENT - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COPYRIGHT - () -
    - -
    - void - CREATED - () -
    - -
    - void - EMAIL - () -
    - -
    - void - ENTRY - () -
    - -
    - void - FEED - () -
    - -
    - void - GENERATOR - () -
    - -
    - void - HAS_CHILD - () -
    - -
    - void - HAS_ENTRY - () -
    - -
    - void - HAS_LINK - () -
    - -
    - void - HAS_TITLE - () -
    - -
    - void - HREF - () -
    - -
    - void - INFO - () -
    - -
    - void - ISSUED - () -
    - -
    - void - LANG - () -
    - -
    - void - LINK - () -
    - -
    - void - MODE - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - NAME - () -
    - -
    - void - PERSON - () -
    - -
    - void - REL - () -
    - -
    - void - SUMMARY - () -
    - -
    - void - TAGLINE - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - URL - () -
    - -
    - void - VALUE - () -
    - -
    - void - VERSION - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ATOM_CONSTRUCT (line 66) -
    - - - -
    - void - - ATOM_CONSTRUCT - - () -
    - - - -
    - -
    - -
    - AUTHOR (line 114) -
    - - - -
    - void - - AUTHOR - - () -
    - - - -
    - -
    - -
    - CONTENT (line 72) -
    - - - -
    - void - - CONTENT - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 120) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COPYRIGHT (line 138) -
    - - - -
    - void - - COPYRIGHT - - () -
    - - - -
    - -
    - -
    - CREATED (line 192) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - EMAIL (line 42) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - ENTRY (line 156) -
    - - - -
    - void - - ENTRY - - () -
    - - - -
    - -
    - -
    - FEED (line 96) -
    - - - -
    - void - - FEED - - () -
    - - - -
    - -
    - -
    - GENERATOR (line 132) -
    - - - -
    - void - - GENERATOR - - () -
    - - - -
    - -
    - -
    - HAS_CHILD (line 162) -
    - - - -
    - void - - HAS_CHILD - - () -
    - - - -
    - -
    - -
    - HAS_ENTRY (line 168) -
    - - - -
    - void - - HAS_ENTRY - - () -
    - - - -
    - -
    - -
    - HAS_LINK (line 174) -
    - - - -
    - void - - HAS_LINK - - () -
    - - - -
    - -
    - -
    - HAS_TITLE (line 180) -
    - - - -
    - void - - HAS_TITLE - - () -
    - - - -
    - -
    - -
    - HREF (line 54) -
    - - - -
    - void - - HREF - - () -
    - - - -
    - -
    - -
    - INFO (line 144) -
    - - - -
    - void - - INFO - - () -
    - - - -
    - -
    - -
    - ISSUED (line 186) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - LANG (line 108) -
    - - - -
    - void - - LANG - - () -
    - - - -
    - -
    - -
    - LINK (line 90) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - MODE (line 24) -
    - - - -
    - void - - MODE - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 150) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - NAME (line 30) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - PERSON (line 78) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - REL (line 48) -
    - - - -
    - void - - REL - - () -
    - - - -
    - -
    - -
    - SUMMARY (line 198) -
    - - - -
    - void - - SUMMARY - - () -
    - - - -
    - -
    - -
    - TAGLINE (line 126) -
    - - - -
    - void - - TAGLINE - - () -
    - - - -
    - -
    - -
    - TITLE (line 60) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 18) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - URL (line 36) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    - -
    - VALUE (line 84) -
    - - - -
    - void - - VALUE - - () -
    - - - -
    - -
    - -
    - VERSION (line 102) -
    - - - -
    - void - - VERSION - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC.html.svn-base deleted file mode 100755 index 7b7842ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC.html.svn-base +++ /dev/null @@ -1,2077 +0,0 @@ - - - - - - Docs For Class DC - - - - -
    -

    Class DC

    - - -
    -
    Description
    - -
    - -

    Dublin Core Vocabulary (Resource)

    -
      -
    • author: Chris Bizer (chris@bizer.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/DC_C.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABSTRACT_ - () -
    - -
    - void - ACCESS_RIGHTS - () -
    - -
    - void - ALTERNATIVE - () -
    - -
    - void - AUDIENCE - () -
    - -
    - void - AVAILABLE - () -
    - -
    - void - BIBLIOGRAPHIC_CITATION - () -
    - -
    - void - BOX - () -
    - -
    - void - COLLECTION - () -
    - -
    - void - CONFORMS_TO - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COVERAGE - () -
    - -
    - void - CREATED - () -
    - -
    - void - CREATOR - () -
    - -
    - void - DATASET - () -
    - -
    - void - DATE - () -
    - -
    - void - DATE_ACCEPTED - () -
    - -
    - void - DATE_COPYRIGHTED - () -
    - -
    - void - DATE_SUBMITTED - () -
    - -
    - void - DCMI_TYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - EDUCATION_LEVEL - () -
    - -
    - void - EVENT - () -
    - -
    - void - EXTENT - () -
    - -
    - void - FORMAT - () -
    - -
    - void - HAS_FORMAT - () -
    - -
    - void - HAS_PART - () -
    - -
    - void - HAS_VERSION - () -
    - -
    - void - IDENTIFIER - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMT - () -
    - -
    - void - INTERACTIVERESOURCE - () -
    - -
    - void - ISO639_2 - () -
    - -
    - void - ISO3166 - () -
    - -
    - void - ISSUED - () -
    - -
    - void - IS_FORMAT_OF - () -
    - -
    - void - IS_PART_OF - () -
    - -
    - void - IS_REFERENCED_BY - () -
    - -
    - void - IS_REPLACED_BY - () -
    - -
    - void - IS_REQUIRED_BY - () -
    - -
    - void - IS_VERSION_OF - () -
    - -
    - void - LANGUAGE - () -
    - -
    - void - LCC - () -
    - -
    - void - LCSH - () -
    - -
    - void - LICENSE - () -
    - -
    - void - MEDIATOR - () -
    - -
    - void - MEDIUM - () -
    - -
    - void - MESH - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - MOVINGIMAGE - () -
    - -
    - void - PERIOD - () -
    - -
    - void - PHYSICALOBJECT - () -
    - -
    - void - POINT - () -
    - -
    - void - PUBLISHER - () -
    - -
    - void - REFERENCES - () -
    - -
    - void - REPLACES - () -
    - -
    - void - REQUIRES - () -
    - -
    - void - RFC1766 - () -
    - -
    - void - RFC3066 - () -
    - -
    - void - RIGHTS - () -
    - -
    - void - RIGHTS_HOLDER - () -
    - -
    - void - SERVICE - () -
    - -
    - void - SOFTWARE - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - SPATIAL - () -
    - -
    - void - STILLIMAGE - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TABLE_OF_CONTENTS - () -
    - -
    - void - TEMPORAL - () -
    - -
    - void - TEXT - () -
    - -
    - void - TGN - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - UDC - () -
    - -
    - void - URI - () -
    - -
    - void - VALID - () -
    - -
    - void - W3CDTF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABSTRACT_ (line 102) -
    - - - -
    - void - - ABSTRACT_ - - () -
    - - - -
    - -
    - -
    - ACCESS_RIGHTS (line 108) -
    - - - -
    - void - - ACCESS_RIGHTS - - () -
    - - - -
    - -
    - -
    - ALTERNATIVE (line 114) -
    - - - -
    - void - - ALTERNATIVE - - () -
    - - - -
    - -
    - -
    - AUDIENCE (line 120) -
    - - - -
    - void - - AUDIENCE - - () -
    - - - -
    - -
    - -
    - AVAILABLE (line 126) -
    - - - -
    - void - - AVAILABLE - - () -
    - - - -
    - -
    - -
    - BIBLIOGRAPHIC_CITATION (line 132) -
    - - - -
    - void - - BIBLIOGRAPHIC_CITATION - - () -
    - - - -
    - -
    - -
    - BOX (line 314) -
    - - - -
    - void - - BOX - - () -
    - - - -
    - -
    - -
    - COLLECTION (line 412) -
    - - - -
    - void - - COLLECTION - - () -
    - - - -
    - -
    - -
    - CONFORMS_TO (line 138) -
    - - - -
    - void - - CONFORMS_TO - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 17) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COVERAGE (line 23) -
    - - - -
    - void - - COVERAGE - - () -
    - - - -
    - -
    - -
    - CREATED (line 144) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - CREATOR (line 29) -
    - - - -
    - void - - CREATOR - - () -
    - - - -
    - -
    - -
    - DATASET (line 418) -
    - - - -
    - void - - DATASET - - () -
    - - - -
    - -
    - -
    - DATE (line 35) -
    - - - -
    - void - - DATE - - () -
    - - - -
    - -
    - -
    - DATE_ACCEPTED (line 150) -
    - - - -
    - void - - DATE_ACCEPTED - - () -
    - - - -
    - -
    - -
    - DATE_COPYRIGHTED (line 156) -
    - - - -
    - void - - DATE_COPYRIGHTED - - () -
    - - - -
    - -
    - -
    - DATE_SUBMITTED (line 162) -
    - - - -
    - void - - DATE_SUBMITTED - - () -
    - - - -
    - -
    - -
    - DCMI_TYPE (line 320) -
    - - - -
    - void - - DCMI_TYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 41) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - EDUCATION_LEVEL (line 168) -
    - - - -
    - void - - EDUCATION_LEVEL - - () -
    - - - -
    - -
    - -
    - EVENT (line 424) -
    - - - -
    - void - - EVENT - - () -
    - - - -
    - -
    - -
    - EXTENT (line 174) -
    - - - -
    - void - - EXTENT - - () -
    - - - -
    - -
    - -
    - FORMAT (line 47) -
    - - - -
    - void - - FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_FORMAT (line 180) -
    - - - -
    - void - - HAS_FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_PART (line 186) -
    - - - -
    - void - - HAS_PART - - () -
    - - - -
    - -
    - -
    - HAS_VERSION (line 192) -
    - - - -
    - void - - HAS_VERSION - - () -
    - - - -
    - -
    - -
    - IDENTIFIER (line 53) -
    - - - -
    - void - - IDENTIFIER - - () -
    - - - -
    - -
    - -
    - IMAGE (line 430) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMT (line 326) -
    - - - -
    - void - - IMT - - () -
    - - - -
    - -
    - -
    - INTERACTIVERESOURCE (line 436) -
    - - - -
    - void - - INTERACTIVERESOURCE - - () -
    - - - -
    - -
    - -
    - ISO639_2 (line 338) -
    - - - -
    - void - - ISO639_2 - - () -
    - - - -
    - -
    - -
    - ISO3166 (line 332) -
    - - - -
    - void - - ISO3166 - - () -
    - - - -
    - -
    - -
    - ISSUED (line 228) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - IS_FORMAT_OF (line 198) -
    - - - -
    - void - - IS_FORMAT_OF - - () -
    - - - -
    - -
    - -
    - IS_PART_OF (line 204) -
    - - - -
    - void - - IS_PART_OF - - () -
    - - - -
    - -
    - -
    - IS_REFERENCED_BY (line 210) -
    - - - -
    - void - - IS_REFERENCED_BY - - () -
    - - - -
    - -
    - -
    - IS_REPLACED_BY (line 216) -
    - - - -
    - void - - IS_REPLACED_BY - - () -
    - - - -
    - -
    - -
    - IS_REQUIRED_BY (line 222) -
    - - - -
    - void - - IS_REQUIRED_BY - - () -
    - - - -
    - -
    - -
    - IS_VERSION_OF (line 234) -
    - - - -
    - void - - IS_VERSION_OF - - () -
    - - - -
    - -
    - -
    - LANGUAGE (line 59) -
    - - - -
    - void - - LANGUAGE - - () -
    - - - -
    - -
    - -
    - LCC (line 344) -
    - - - -
    - void - - LCC - - () -
    - - - -
    - -
    - -
    - LCSH (line 350) -
    - - - -
    - void - - LCSH - - () -
    - - - -
    - -
    - -
    - LICENSE (line 240) -
    - - - -
    - void - - LICENSE - - () -
    - - - -
    - -
    - -
    - MEDIATOR (line 246) -
    - - - -
    - void - - MEDIATOR - - () -
    - - - -
    - -
    - -
    - MEDIUM (line 252) -
    - - - -
    - void - - MEDIUM - - () -
    - - - -
    - -
    - -
    - MESH (line 356) -
    - - - -
    - void - - MESH - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 258) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - MOVINGIMAGE (line 442) -
    - - - -
    - void - - MOVINGIMAGE - - () -
    - - - -
    - -
    - -
    - PERIOD (line 362) -
    - - - -
    - void - - PERIOD - - () -
    - - - -
    - -
    - -
    - PHYSICALOBJECT (line 448) -
    - - - -
    - void - - PHYSICALOBJECT - - () -
    - - - -
    - -
    - -
    - POINT (line 368) -
    - - - -
    - void - - POINT - - () -
    - - - -
    - -
    - -
    - PUBLISHER (line 65) -
    - - - -
    - void - - PUBLISHER - - () -
    - - - -
    - -
    - -
    - REFERENCES (line 264) -
    - - - -
    - void - - REFERENCES - - () -
    - - - -
    - -
    - -
    - REPLACES (line 270) -
    - - - -
    - void - - REPLACES - - () -
    - - - -
    - -
    - -
    - REQUIRES (line 276) -
    - - - -
    - void - - REQUIRES - - () -
    - - - -
    - -
    - -
    - RFC1766 (line 374) -
    - - - -
    - void - - RFC1766 - - () -
    - - - -
    - -
    - -
    - RFC3066 (line 380) -
    - - - -
    - void - - RFC3066 - - () -
    - - - -
    - -
    - -
    - RIGHTS (line 71) -
    - - - -
    - void - - RIGHTS - - () -
    - - - -
    - -
    - -
    - RIGHTS_HOLDER (line 282) -
    - - - -
    - void - - RIGHTS_HOLDER - - () -
    - - - -
    - -
    - -
    - SERVICE (line 454) -
    - - - -
    - void - - SERVICE - - () -
    - - - -
    - -
    - -
    - SOFTWARE (line 460) -
    - - - -
    - void - - SOFTWARE - - () -
    - - - -
    - -
    - -
    - SOUND (line 466) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 77) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - SPATIAL (line 288) -
    - - - -
    - void - - SPATIAL - - () -
    - - - -
    - -
    - -
    - STILLIMAGE (line 472) -
    - - - -
    - void - - STILLIMAGE - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 83) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TABLE_OF_CONTENTS (line 294) -
    - - - -
    - void - - TABLE_OF_CONTENTS - - () -
    - - - -
    - -
    - -
    - TEMPORAL (line 300) -
    - - - -
    - void - - TEMPORAL - - () -
    - - - -
    - -
    - -
    - TEXT (line 478) -
    - - - -
    - void - - TEXT - - () -
    - - - -
    - -
    - -
    - TGN (line 386) -
    - - - -
    - void - - TGN - - () -
    - - - -
    - -
    - -
    - TITLE (line 89) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 95) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - UDC (line 392) -
    - - - -
    - void - - UDC - - () -
    - - - -
    - -
    - -
    - URI (line 398) -
    - - - -
    - void - - URI - - () -
    - - - -
    - -
    - -
    - VALID (line 306) -
    - - - -
    - void - - VALID - - () -
    - - - -
    - -
    - -
    - W3CDTF (line 404) -
    - - - -
    - void - - W3CDTF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:55 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC_RES.html.svn-base deleted file mode 100755 index 91d7ecd5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/DC_RES.html.svn-base +++ /dev/null @@ -1,2077 +0,0 @@ - - - - - - Docs For Class DC_RES - - - - -
    -

    Class DC_RES

    - - -
    -
    Description
    - -
    - -

    Dublin Core Vocabulary (ResResource)

    -
      -
    • author: Chris Bizer (chris@bizer.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/DC_RES.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABSTRACT_ - () -
    - -
    - void - ACCESS_RIGHTS - () -
    - -
    - void - ALTERNATIVE - () -
    - -
    - void - AUDIENCE - () -
    - -
    - void - AVAILABLE - () -
    - -
    - void - BIBLIOGRAPHIC_CITATION - () -
    - -
    - void - BOX - () -
    - -
    - void - COLLECTION - () -
    - -
    - void - CONFORMS_TO - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COVERAGE - () -
    - -
    - void - CREATED - () -
    - -
    - void - CREATOR - () -
    - -
    - void - DATASET - () -
    - -
    - void - DATE - () -
    - -
    - void - DATE_ACCEPTED - () -
    - -
    - void - DATE_COPYRIGHTED - () -
    - -
    - void - DATE_SUBMITTED - () -
    - -
    - void - DCMI_TYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - EDUCATION_LEVEL - () -
    - -
    - void - EVENT - () -
    - -
    - void - EXTENT - () -
    - -
    - void - FORMAT - () -
    - -
    - void - HAS_FORMAT - () -
    - -
    - void - HAS_PART - () -
    - -
    - void - HAS_VERSION - () -
    - -
    - void - IDENTIFIER - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMT - () -
    - -
    - void - INTERACTIVE_RESOURCE - () -
    - -
    - void - ISO639_2 - () -
    - -
    - void - ISO3166 - () -
    - -
    - void - ISSUED - () -
    - -
    - void - IS_FORMAT_OF - () -
    - -
    - void - IS_PART_OF - () -
    - -
    - void - IS_REFERENCED_BY - () -
    - -
    - void - IS_REPLACED_BY - () -
    - -
    - void - IS_REQUIRED_BY - () -
    - -
    - void - IS_VERSION_OF - () -
    - -
    - void - LANGUAGE - () -
    - -
    - void - LCC - () -
    - -
    - void - LCSH - () -
    - -
    - void - LICENSE - () -
    - -
    - void - MEDIATOR - () -
    - -
    - void - MEDIUM - () -
    - -
    - void - MESH - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - MOVINGIMAGE - () -
    - -
    - void - PERIOD - () -
    - -
    - void - PHYSICALOBJECT - () -
    - -
    - void - POINT - () -
    - -
    - void - PUBLISHER - () -
    - -
    - void - REFERENCES - () -
    - -
    - void - REPLACES - () -
    - -
    - void - REQUIRES - () -
    - -
    - void - RFC1766 - () -
    - -
    - void - RFC3066 - () -
    - -
    - void - RIGHTS - () -
    - -
    - void - RIGHTS_HOLDER - () -
    - -
    - void - SERVICE - () -
    - -
    - void - SOFTWARE - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - SPATIAL - () -
    - -
    - void - STILLIMAGE - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TABLE_OF_CONTENTS - () -
    - -
    - void - TEMPORAL - () -
    - -
    - void - TEXT - () -
    - -
    - void - TGN - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - UDC - () -
    - -
    - void - URI - () -
    - -
    - void - VALID - () -
    - -
    - void - W3CDTF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABSTRACT_ (line 102) -
    - - - -
    - void - - ABSTRACT_ - - () -
    - - - -
    - -
    - -
    - ACCESS_RIGHTS (line 108) -
    - - - -
    - void - - ACCESS_RIGHTS - - () -
    - - - -
    - -
    - -
    - ALTERNATIVE (line 114) -
    - - - -
    - void - - ALTERNATIVE - - () -
    - - - -
    - -
    - -
    - AUDIENCE (line 120) -
    - - - -
    - void - - AUDIENCE - - () -
    - - - -
    - -
    - -
    - AVAILABLE (line 126) -
    - - - -
    - void - - AVAILABLE - - () -
    - - - -
    - -
    - -
    - BIBLIOGRAPHIC_CITATION (line 132) -
    - - - -
    - void - - BIBLIOGRAPHIC_CITATION - - () -
    - - - -
    - -
    - -
    - BOX (line 314) -
    - - - -
    - void - - BOX - - () -
    - - - -
    - -
    - -
    - COLLECTION (line 412) -
    - - - -
    - void - - COLLECTION - - () -
    - - - -
    - -
    - -
    - CONFORMS_TO (line 138) -
    - - - -
    - void - - CONFORMS_TO - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 17) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COVERAGE (line 23) -
    - - - -
    - void - - COVERAGE - - () -
    - - - -
    - -
    - -
    - CREATED (line 144) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - CREATOR (line 29) -
    - - - -
    - void - - CREATOR - - () -
    - - - -
    - -
    - -
    - DATASET (line 418) -
    - - - -
    - void - - DATASET - - () -
    - - - -
    - -
    - -
    - DATE (line 35) -
    - - - -
    - void - - DATE - - () -
    - - - -
    - -
    - -
    - DATE_ACCEPTED (line 150) -
    - - - -
    - void - - DATE_ACCEPTED - - () -
    - - - -
    - -
    - -
    - DATE_COPYRIGHTED (line 156) -
    - - - -
    - void - - DATE_COPYRIGHTED - - () -
    - - - -
    - -
    - -
    - DATE_SUBMITTED (line 162) -
    - - - -
    - void - - DATE_SUBMITTED - - () -
    - - - -
    - -
    - -
    - DCMI_TYPE (line 320) -
    - - - -
    - void - - DCMI_TYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 41) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - EDUCATION_LEVEL (line 168) -
    - - - -
    - void - - EDUCATION_LEVEL - - () -
    - - - -
    - -
    - -
    - EVENT (line 424) -
    - - - -
    - void - - EVENT - - () -
    - - - -
    - -
    - -
    - EXTENT (line 174) -
    - - - -
    - void - - EXTENT - - () -
    - - - -
    - -
    - -
    - FORMAT (line 47) -
    - - - -
    - void - - FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_FORMAT (line 180) -
    - - - -
    - void - - HAS_FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_PART (line 186) -
    - - - -
    - void - - HAS_PART - - () -
    - - - -
    - -
    - -
    - HAS_VERSION (line 192) -
    - - - -
    - void - - HAS_VERSION - - () -
    - - - -
    - -
    - -
    - IDENTIFIER (line 53) -
    - - - -
    - void - - IDENTIFIER - - () -
    - - - -
    - -
    - -
    - IMAGE (line 430) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMT (line 326) -
    - - - -
    - void - - IMT - - () -
    - - - -
    - -
    - -
    - INTERACTIVE_RESOURCE (line 436) -
    - - - -
    - void - - INTERACTIVE_RESOURCE - - () -
    - - - -
    - -
    - -
    - ISO639_2 (line 338) -
    - - - -
    - void - - ISO639_2 - - () -
    - - - -
    - -
    - -
    - ISO3166 (line 332) -
    - - - -
    - void - - ISO3166 - - () -
    - - - -
    - -
    - -
    - ISSUED (line 228) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - IS_FORMAT_OF (line 198) -
    - - - -
    - void - - IS_FORMAT_OF - - () -
    - - - -
    - -
    - -
    - IS_PART_OF (line 204) -
    - - - -
    - void - - IS_PART_OF - - () -
    - - - -
    - -
    - -
    - IS_REFERENCED_BY (line 210) -
    - - - -
    - void - - IS_REFERENCED_BY - - () -
    - - - -
    - -
    - -
    - IS_REPLACED_BY (line 216) -
    - - - -
    - void - - IS_REPLACED_BY - - () -
    - - - -
    - -
    - -
    - IS_REQUIRED_BY (line 222) -
    - - - -
    - void - - IS_REQUIRED_BY - - () -
    - - - -
    - -
    - -
    - IS_VERSION_OF (line 234) -
    - - - -
    - void - - IS_VERSION_OF - - () -
    - - - -
    - -
    - -
    - LANGUAGE (line 59) -
    - - - -
    - void - - LANGUAGE - - () -
    - - - -
    - -
    - -
    - LCC (line 344) -
    - - - -
    - void - - LCC - - () -
    - - - -
    - -
    - -
    - LCSH (line 350) -
    - - - -
    - void - - LCSH - - () -
    - - - -
    - -
    - -
    - LICENSE (line 240) -
    - - - -
    - void - - LICENSE - - () -
    - - - -
    - -
    - -
    - MEDIATOR (line 246) -
    - - - -
    - void - - MEDIATOR - - () -
    - - - -
    - -
    - -
    - MEDIUM (line 252) -
    - - - -
    - void - - MEDIUM - - () -
    - - - -
    - -
    - -
    - MESH (line 356) -
    - - - -
    - void - - MESH - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 258) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - MOVINGIMAGE (line 442) -
    - - - -
    - void - - MOVINGIMAGE - - () -
    - - - -
    - -
    - -
    - PERIOD (line 362) -
    - - - -
    - void - - PERIOD - - () -
    - - - -
    - -
    - -
    - PHYSICALOBJECT (line 448) -
    - - - -
    - void - - PHYSICALOBJECT - - () -
    - - - -
    - -
    - -
    - POINT (line 368) -
    - - - -
    - void - - POINT - - () -
    - - - -
    - -
    - -
    - PUBLISHER (line 65) -
    - - - -
    - void - - PUBLISHER - - () -
    - - - -
    - -
    - -
    - REFERENCES (line 264) -
    - - - -
    - void - - REFERENCES - - () -
    - - - -
    - -
    - -
    - REPLACES (line 270) -
    - - - -
    - void - - REPLACES - - () -
    - - - -
    - -
    - -
    - REQUIRES (line 276) -
    - - - -
    - void - - REQUIRES - - () -
    - - - -
    - -
    - -
    - RFC1766 (line 374) -
    - - - -
    - void - - RFC1766 - - () -
    - - - -
    - -
    - -
    - RFC3066 (line 380) -
    - - - -
    - void - - RFC3066 - - () -
    - - - -
    - -
    - -
    - RIGHTS (line 71) -
    - - - -
    - void - - RIGHTS - - () -
    - - - -
    - -
    - -
    - RIGHTS_HOLDER (line 282) -
    - - - -
    - void - - RIGHTS_HOLDER - - () -
    - - - -
    - -
    - -
    - SERVICE (line 454) -
    - - - -
    - void - - SERVICE - - () -
    - - - -
    - -
    - -
    - SOFTWARE (line 460) -
    - - - -
    - void - - SOFTWARE - - () -
    - - - -
    - -
    - -
    - SOUND (line 466) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 77) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - SPATIAL (line 288) -
    - - - -
    - void - - SPATIAL - - () -
    - - - -
    - -
    - -
    - STILLIMAGE (line 472) -
    - - - -
    - void - - STILLIMAGE - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 83) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TABLE_OF_CONTENTS (line 294) -
    - - - -
    - void - - TABLE_OF_CONTENTS - - () -
    - - - -
    - -
    - -
    - TEMPORAL (line 300) -
    - - - -
    - void - - TEMPORAL - - () -
    - - - -
    - -
    - -
    - TEXT (line 478) -
    - - - -
    - void - - TEXT - - () -
    - - - -
    - -
    - -
    - TGN (line 386) -
    - - - -
    - void - - TGN - - () -
    - - - -
    - -
    - -
    - TITLE (line 89) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 95) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - UDC (line 392) -
    - - - -
    - void - - UDC - - () -
    - - - -
    - -
    - -
    - URI (line 398) -
    - - - -
    - void - - URI - - () -
    - - - -
    - -
    - -
    - VALID (line 306) -
    - - - -
    - void - - VALID - - () -
    - - - -
    - -
    - -
    - W3CDTF (line 404) -
    - - - -
    - void - - W3CDTF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF.html.svn-base deleted file mode 100755 index 94bd938f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF.html.svn-base +++ /dev/null @@ -1,1713 +0,0 @@ - - - - - - Docs For Class FOAF - - - - -
    -

    Class FOAF

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/FOAF_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ACCOUNT_NAME - () -
    - -
    - void - ACCOUNT_SERVICE_HOMEPAGE - () -
    - -
    - void - AGENT - () -
    - -
    - void - AIM_CHAT_ID - () -
    - -
    - void - BASED_NEAR - () -
    - -
    - void - CURRENT_PROJECT - () -
    - -
    - void - DEPICTION - () -
    - -
    - void - DEPICTS - () -
    - -
    - void - DNA_CHECKSUM - () -
    - -
    - void - DOCUMENT - () -
    - -
    - void - FAMILY_NAME - () -
    - -
    - void - FIRST_NAME - () -
    - -
    - void - FUNDED_BY - () -
    - -
    - void - GEEKCODE - () -
    - -
    - void - GENDER - () -
    - -
    - void - GIVENNAME - () -
    - -
    - void - GROUP - () -
    - -
    - void - HOLDS_ACCOUNT - () -
    - -
    - void - HOMEPAGE - () -
    - -
    - void - ICQ_CHAT_ID - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMG - () -
    - -
    - void - INTEREST - () -
    - -
    - void - JABBER_ID - () -
    - -
    - void - KNOWS - () -
    - -
    - void - LOGO - () -
    - -
    - void - MADE - () -
    - -
    - void - MAKER - () -
    - -
    - void - MBOX - () -
    - -
    - void - MBOX_SHA1SUM - () -
    - -
    - void - MEMBER - () -
    - -
    - void - MEMBERSHIP_CLASS - () -
    - -
    - void - MSN_CHAT_ID - () -
    - -
    - void - MYERS_BRIGGS - () -
    - -
    - void - NAME - () -
    - -
    - void - NICK - () -
    - -
    - void - ONLINE_ACCOUNT - () -
    - -
    - void - ONLINE_CHAT_ACCOUNT - () -
    - -
    - void - ONLINE_ECOMMERCE_ACCOUNT - () -
    - -
    - void - ONLINE_GAMING_ACCOUNT - () -
    - -
    - void - ORGANIZATION - () -
    - -
    - void - PAGE - () -
    - -
    - void - PAST_PROJECT - () -
    - -
    - void - PERSON - () -
    - -
    - void - PERSONAL_PROFILE_DOCUMENT - () -
    - -
    - void - PHONE - () -
    - -
    - void - PLAN - () -
    - -
    - void - PRIMARY_TOPIC - () -
    - -
    - void - PROJECT - () -
    - -
    - void - PUBLICATIONS - () -
    - -
    - void - SCHOOL_HOMEPAGE - () -
    - -
    - void - SHA1 - () -
    - -
    - void - SURNAME - () -
    - -
    - void - THEME - () -
    - -
    - void - THUMBNAIL - () -
    - -
    - void - TIPJAR - () -
    - -
    - void - TITLE - () -
    - -
    - void - TOPIC - () -
    - -
    - void - TOPIC_INTEREST - () -
    - -
    - void - WEBLOG - () -
    - -
    - void - WORKPLACE_HOMEPAGE - () -
    - -
    - void - WORK_INFO_HOMEPAGE - () -
    - -
    - void - YAHOO_CHAT_ID - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ACCOUNT_NAME (line 91) -
    - - - -
    - void - - ACCOUNT_NAME - - () -
    - - - -
    - -
    - -
    - ACCOUNT_SERVICE_HOMEPAGE (line 97) -
    - - - -
    - void - - ACCOUNT_SERVICE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - AGENT (line 19) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - AIM_CHAT_ID (line 103) -
    - - - -
    - void - - AIM_CHAT_ID - - () -
    - - - -
    - -
    - -
    - BASED_NEAR (line 109) -
    - - - -
    - void - - BASED_NEAR - - () -
    - - - -
    - -
    - -
    - CURRENT_PROJECT (line 115) -
    - - - -
    - void - - CURRENT_PROJECT - - () -
    - - - -
    - -
    - -
    - DEPICTION (line 121) -
    - - - -
    - void - - DEPICTION - - () -
    - - - -
    - -
    - -
    - DEPICTS (line 127) -
    - - - -
    - void - - DEPICTS - - () -
    - - - -
    - -
    - -
    - DNA_CHECKSUM (line 133) -
    - - - -
    - void - - DNA_CHECKSUM - - () -
    - - - -
    - -
    - -
    - DOCUMENT (line 25) -
    - - - -
    - void - - DOCUMENT - - () -
    - - - -
    - -
    - -
    - FAMILY_NAME (line 139) -
    - - - -
    - void - - FAMILY_NAME - - () -
    - - - -
    - -
    - -
    - FIRST_NAME (line 145) -
    - - - -
    - void - - FIRST_NAME - - () -
    - - - -
    - -
    - -
    - FUNDED_BY (line 151) -
    - - - -
    - void - - FUNDED_BY - - () -
    - - - -
    - -
    - -
    - GEEKCODE (line 157) -
    - - - -
    - void - - GEEKCODE - - () -
    - - - -
    - -
    - -
    - GENDER (line 163) -
    - - - -
    - void - - GENDER - - () -
    - - - -
    - -
    - -
    - GIVENNAME (line 169) -
    - - - -
    - void - - GIVENNAME - - () -
    - - - -
    - -
    - -
    - GROUP (line 31) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - HOLDS_ACCOUNT (line 175) -
    - - - -
    - void - - HOLDS_ACCOUNT - - () -
    - - - -
    - -
    - -
    - HOMEPAGE (line 181) -
    - - - -
    - void - - HOMEPAGE - - () -
    - - - -
    - -
    - -
    - ICQ_CHAT_ID (line 187) -
    - - - -
    - void - - ICQ_CHAT_ID - - () -
    - - - -
    - -
    - -
    - IMAGE (line 37) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMG (line 193) -
    - - - -
    - void - - IMG - - () -
    - - - -
    - -
    - -
    - INTEREST (line 199) -
    - - - -
    - void - - INTEREST - - () -
    - - - -
    - -
    - -
    - JABBER_ID (line 205) -
    - - - -
    - void - - JABBER_ID - - () -
    - - - -
    - -
    - -
    - KNOWS (line 211) -
    - - - -
    - void - - KNOWS - - () -
    - - - -
    - -
    - -
    - LOGO (line 217) -
    - - - -
    - void - - LOGO - - () -
    - - - -
    - -
    - -
    - MADE (line 223) -
    - - - -
    - void - - MADE - - () -
    - - - -
    - -
    - -
    - MAKER (line 229) -
    - - - -
    - void - - MAKER - - () -
    - - - -
    - -
    - -
    - MBOX (line 235) -
    - - - -
    - void - - MBOX - - () -
    - - - -
    - -
    - -
    - MBOX_SHA1SUM (line 241) -
    - - - -
    - void - - MBOX_SHA1SUM - - () -
    - - - -
    - -
    - -
    - MEMBER (line 247) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - MEMBERSHIP_CLASS (line 253) -
    - - - -
    - void - - MEMBERSHIP_CLASS - - () -
    - - - -
    - -
    - -
    - MSN_CHAT_ID (line 259) -
    - - - -
    - void - - MSN_CHAT_ID - - () -
    - - - -
    - -
    - -
    - MYERS_BRIGGS (line 265) -
    - - - -
    - void - - MYERS_BRIGGS - - () -
    - - - -
    - -
    - -
    - NAME (line 271) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICK (line 277) -
    - - - -
    - void - - NICK - - () -
    - - - -
    - -
    - -
    - ONLINE_ACCOUNT (line 43) -
    - - - -
    - void - - ONLINE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_CHAT_ACCOUNT (line 49) -
    - - - -
    - void - - ONLINE_CHAT_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_ECOMMERCE_ACCOUNT (line 55) -
    - - - -
    - void - - ONLINE_ECOMMERCE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_GAMING_ACCOUNT (line 61) -
    - - - -
    - void - - ONLINE_GAMING_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ORGANIZATION (line 67) -
    - - - -
    - void - - ORGANIZATION - - () -
    - - - -
    - -
    - -
    - PAGE (line 283) -
    - - - -
    - void - - PAGE - - () -
    - - - -
    - -
    - -
    - PAST_PROJECT (line 289) -
    - - - -
    - void - - PAST_PROJECT - - () -
    - - - -
    - -
    - -
    - PERSON (line 73) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - PERSONAL_PROFILE_DOCUMENT (line 79) -
    - - - -
    - void - - PERSONAL_PROFILE_DOCUMENT - - () -
    - - - -
    - -
    - -
    - PHONE (line 295) -
    - - - -
    - void - - PHONE - - () -
    - - - -
    - -
    - -
    - PLAN (line 301) -
    - - - -
    - void - - PLAN - - () -
    - - - -
    - -
    - -
    - PRIMARY_TOPIC (line 307) -
    - - - -
    - void - - PRIMARY_TOPIC - - () -
    - - - -
    - -
    - -
    - PROJECT (line 85) -
    - - - -
    - void - - PROJECT - - () -
    - - - -
    - -
    - -
    - PUBLICATIONS (line 313) -
    - - - -
    - void - - PUBLICATIONS - - () -
    - - - -
    - -
    - -
    - SCHOOL_HOMEPAGE (line 319) -
    - - - -
    - void - - SCHOOL_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - SHA1 (line 325) -
    - - - -
    - void - - SHA1 - - () -
    - - - -
    - -
    - -
    - SURNAME (line 331) -
    - - - -
    - void - - SURNAME - - () -
    - - - -
    - -
    - -
    - THEME (line 337) -
    - - - -
    - void - - THEME - - () -
    - - - -
    - -
    - -
    - THUMBNAIL (line 343) -
    - - - -
    - void - - THUMBNAIL - - () -
    - - - -
    - -
    - -
    - TIPJAR (line 349) -
    - - - -
    - void - - TIPJAR - - () -
    - - - -
    - -
    - -
    - TITLE (line 355) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TOPIC (line 361) -
    - - - -
    - void - - TOPIC - - () -
    - - - -
    - -
    - -
    - TOPIC_INTEREST (line 367) -
    - - - -
    - void - - TOPIC_INTEREST - - () -
    - - - -
    - -
    - -
    - WEBLOG (line 373) -
    - - - -
    - void - - WEBLOG - - () -
    - - - -
    - -
    - -
    - WORKPLACE_HOMEPAGE (line 385) -
    - - - -
    - void - - WORKPLACE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - WORK_INFO_HOMEPAGE (line 379) -
    - - - -
    - void - - WORK_INFO_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - YAHOO_CHAT_ID (line 391) -
    - - - -
    - void - - YAHOO_CHAT_ID - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF_RES.html.svn-base deleted file mode 100755 index 596723b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/FOAF_RES.html.svn-base +++ /dev/null @@ -1,1713 +0,0 @@ - - - - - - Docs For Class FOAF_RES - - - - -
    -

    Class FOAF_RES

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (ResResource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/FOAF_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ACCOUNT_NAME - () -
    - -
    - void - ACCOUNT_SERVICE_HOMEPAGE - () -
    - -
    - void - AGENT - () -
    - -
    - void - AIM_CHAT_ID - () -
    - -
    - void - BASED_NEAR - () -
    - -
    - void - CURRENT_PROJECT - () -
    - -
    - void - DEPICTION - () -
    - -
    - void - DEPICTS - () -
    - -
    - void - DNA_CHECKSUM - () -
    - -
    - void - DOCUMENT - () -
    - -
    - void - FAMILY_NAME - () -
    - -
    - void - FIRST_NAME - () -
    - -
    - void - FUNDED_BY - () -
    - -
    - void - GEEKCODE - () -
    - -
    - void - GENDER - () -
    - -
    - void - GIVENNAME - () -
    - -
    - void - GROUP - () -
    - -
    - void - HOLDS_ACCOUNT - () -
    - -
    - void - HOMEPAGE - () -
    - -
    - void - ICQ_CHAT_ID - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMG - () -
    - -
    - void - INTEREST - () -
    - -
    - void - JABBER_ID - () -
    - -
    - void - KNOWS - () -
    - -
    - void - LOGO - () -
    - -
    - void - MADE - () -
    - -
    - void - MAKER - () -
    - -
    - void - MBOX - () -
    - -
    - void - MBOX_SHA1SUM - () -
    - -
    - void - MEMBER - () -
    - -
    - void - MEMBERSHIP_CLASS - () -
    - -
    - void - MSN_CHAT_ID - () -
    - -
    - void - MYERS_BRIGGS - () -
    - -
    - void - NAME - () -
    - -
    - void - NICK - () -
    - -
    - void - ONLINE_ACCOUNT - () -
    - -
    - void - ONLINE_CHAT_ACCOUNT - () -
    - -
    - void - ONLINE_ECOMMERCE_ACCOUNT - () -
    - -
    - void - ONLINE_GAMING_ACCOUNT - () -
    - -
    - void - ORGANIZATION - () -
    - -
    - void - PAGE - () -
    - -
    - void - PAST_PROJECT - () -
    - -
    - void - PERSON - () -
    - -
    - void - PERSONAL_PROFILE_DOCUMENT - () -
    - -
    - void - PHONE - () -
    - -
    - void - PLAN - () -
    - -
    - void - PRIMARY_TOPIC - () -
    - -
    - void - PROJECT - () -
    - -
    - void - PUBLICATIONS - () -
    - -
    - void - SCHOOL_HOMEPAGE - () -
    - -
    - void - SHA1 - () -
    - -
    - void - SURNAME - () -
    - -
    - void - THEME - () -
    - -
    - void - THUMBNAIL - () -
    - -
    - void - TIPJAR - () -
    - -
    - void - TITLE - () -
    - -
    - void - TOPIC - () -
    - -
    - void - TOPIC_INTEREST - () -
    - -
    - void - WEBLOG - () -
    - -
    - void - WORKPLACE_HOMEPAGE - () -
    - -
    - void - WORK_INFO_HOMEPAGE - () -
    - -
    - void - YAHOO_CHAT_ID - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ACCOUNT_NAME (line 90) -
    - - - -
    - void - - ACCOUNT_NAME - - () -
    - - - -
    - -
    - -
    - ACCOUNT_SERVICE_HOMEPAGE (line 96) -
    - - - -
    - void - - ACCOUNT_SERVICE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - AGENT (line 18) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - AIM_CHAT_ID (line 102) -
    - - - -
    - void - - AIM_CHAT_ID - - () -
    - - - -
    - -
    - -
    - BASED_NEAR (line 108) -
    - - - -
    - void - - BASED_NEAR - - () -
    - - - -
    - -
    - -
    - CURRENT_PROJECT (line 114) -
    - - - -
    - void - - CURRENT_PROJECT - - () -
    - - - -
    - -
    - -
    - DEPICTION (line 120) -
    - - - -
    - void - - DEPICTION - - () -
    - - - -
    - -
    - -
    - DEPICTS (line 126) -
    - - - -
    - void - - DEPICTS - - () -
    - - - -
    - -
    - -
    - DNA_CHECKSUM (line 132) -
    - - - -
    - void - - DNA_CHECKSUM - - () -
    - - - -
    - -
    - -
    - DOCUMENT (line 24) -
    - - - -
    - void - - DOCUMENT - - () -
    - - - -
    - -
    - -
    - FAMILY_NAME (line 138) -
    - - - -
    - void - - FAMILY_NAME - - () -
    - - - -
    - -
    - -
    - FIRST_NAME (line 144) -
    - - - -
    - void - - FIRST_NAME - - () -
    - - - -
    - -
    - -
    - FUNDED_BY (line 150) -
    - - - -
    - void - - FUNDED_BY - - () -
    - - - -
    - -
    - -
    - GEEKCODE (line 156) -
    - - - -
    - void - - GEEKCODE - - () -
    - - - -
    - -
    - -
    - GENDER (line 162) -
    - - - -
    - void - - GENDER - - () -
    - - - -
    - -
    - -
    - GIVENNAME (line 168) -
    - - - -
    - void - - GIVENNAME - - () -
    - - - -
    - -
    - -
    - GROUP (line 30) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - HOLDS_ACCOUNT (line 174) -
    - - - -
    - void - - HOLDS_ACCOUNT - - () -
    - - - -
    - -
    - -
    - HOMEPAGE (line 180) -
    - - - -
    - void - - HOMEPAGE - - () -
    - - - -
    - -
    - -
    - ICQ_CHAT_ID (line 186) -
    - - - -
    - void - - ICQ_CHAT_ID - - () -
    - - - -
    - -
    - -
    - IMAGE (line 36) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMG (line 192) -
    - - - -
    - void - - IMG - - () -
    - - - -
    - -
    - -
    - INTEREST (line 198) -
    - - - -
    - void - - INTEREST - - () -
    - - - -
    - -
    - -
    - JABBER_ID (line 204) -
    - - - -
    - void - - JABBER_ID - - () -
    - - - -
    - -
    - -
    - KNOWS (line 210) -
    - - - -
    - void - - KNOWS - - () -
    - - - -
    - -
    - -
    - LOGO (line 216) -
    - - - -
    - void - - LOGO - - () -
    - - - -
    - -
    - -
    - MADE (line 222) -
    - - - -
    - void - - MADE - - () -
    - - - -
    - -
    - -
    - MAKER (line 228) -
    - - - -
    - void - - MAKER - - () -
    - - - -
    - -
    - -
    - MBOX (line 234) -
    - - - -
    - void - - MBOX - - () -
    - - - -
    - -
    - -
    - MBOX_SHA1SUM (line 240) -
    - - - -
    - void - - MBOX_SHA1SUM - - () -
    - - - -
    - -
    - -
    - MEMBER (line 246) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - MEMBERSHIP_CLASS (line 252) -
    - - - -
    - void - - MEMBERSHIP_CLASS - - () -
    - - - -
    - -
    - -
    - MSN_CHAT_ID (line 258) -
    - - - -
    - void - - MSN_CHAT_ID - - () -
    - - - -
    - -
    - -
    - MYERS_BRIGGS (line 264) -
    - - - -
    - void - - MYERS_BRIGGS - - () -
    - - - -
    - -
    - -
    - NAME (line 270) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICK (line 276) -
    - - - -
    - void - - NICK - - () -
    - - - -
    - -
    - -
    - ONLINE_ACCOUNT (line 42) -
    - - - -
    - void - - ONLINE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_CHAT_ACCOUNT (line 48) -
    - - - -
    - void - - ONLINE_CHAT_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_ECOMMERCE_ACCOUNT (line 54) -
    - - - -
    - void - - ONLINE_ECOMMERCE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_GAMING_ACCOUNT (line 60) -
    - - - -
    - void - - ONLINE_GAMING_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ORGANIZATION (line 66) -
    - - - -
    - void - - ORGANIZATION - - () -
    - - - -
    - -
    - -
    - PAGE (line 282) -
    - - - -
    - void - - PAGE - - () -
    - - - -
    - -
    - -
    - PAST_PROJECT (line 288) -
    - - - -
    - void - - PAST_PROJECT - - () -
    - - - -
    - -
    - -
    - PERSON (line 72) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - PERSONAL_PROFILE_DOCUMENT (line 78) -
    - - - -
    - void - - PERSONAL_PROFILE_DOCUMENT - - () -
    - - - -
    - -
    - -
    - PHONE (line 294) -
    - - - -
    - void - - PHONE - - () -
    - - - -
    - -
    - -
    - PLAN (line 300) -
    - - - -
    - void - - PLAN - - () -
    - - - -
    - -
    - -
    - PRIMARY_TOPIC (line 306) -
    - - - -
    - void - - PRIMARY_TOPIC - - () -
    - - - -
    - -
    - -
    - PROJECT (line 84) -
    - - - -
    - void - - PROJECT - - () -
    - - - -
    - -
    - -
    - PUBLICATIONS (line 312) -
    - - - -
    - void - - PUBLICATIONS - - () -
    - - - -
    - -
    - -
    - SCHOOL_HOMEPAGE (line 318) -
    - - - -
    - void - - SCHOOL_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - SHA1 (line 324) -
    - - - -
    - void - - SHA1 - - () -
    - - - -
    - -
    - -
    - SURNAME (line 330) -
    - - - -
    - void - - SURNAME - - () -
    - - - -
    - -
    - -
    - THEME (line 336) -
    - - - -
    - void - - THEME - - () -
    - - - -
    - -
    - -
    - THUMBNAIL (line 342) -
    - - - -
    - void - - THUMBNAIL - - () -
    - - - -
    - -
    - -
    - TIPJAR (line 348) -
    - - - -
    - void - - TIPJAR - - () -
    - - - -
    - -
    - -
    - TITLE (line 354) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TOPIC (line 360) -
    - - - -
    - void - - TOPIC - - () -
    - - - -
    - -
    - -
    - TOPIC_INTEREST (line 366) -
    - - - -
    - void - - TOPIC_INTEREST - - () -
    - - - -
    - -
    - -
    - WEBLOG (line 372) -
    - - - -
    - void - - WEBLOG - - () -
    - - - -
    - -
    - -
    - WORKPLACE_HOMEPAGE (line 384) -
    - - - -
    - void - - WORKPLACE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - WORK_INFO_HOMEPAGE (line 378) -
    - - - -
    - void - - WORK_INFO_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - YAHOO_CHAT_ID (line 390) -
    - - - -
    - void - - YAHOO_CHAT_ID - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL.html.svn-base deleted file mode 100755 index 2185ba98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL.html.svn-base +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class OWL - - - - -
    -

    Class OWL

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/OWL_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - OWL_CLASS - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 25) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 31) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 19) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 37) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 43) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 55) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 61) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 67) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 79) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 73) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 85) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 91) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 103) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 109) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 97) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 115) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 121) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 127) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 133) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 145) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 139) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 151) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 157) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 163) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 169) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 175) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NOTHING (line 181) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 187) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 193) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 199) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 205) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 217) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 211) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - OWL_CLASS (line 49) -
    - - - -
    - void - - OWL_CLASS - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 223) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 229) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 235) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 241) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 247) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 253) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 259) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 265) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 271) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 277) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 283) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 289) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 295) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL_RES.html.svn-base deleted file mode 100755 index 1d710289..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/OWL_RES.html.svn-base +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class OWL_RES - - - - -
    -

    Class OWL_RES

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/OWL_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - OWL_CLASS - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 25) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 31) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 19) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 37) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 43) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 55) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 61) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 67) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 79) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 73) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 85) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 91) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 103) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 109) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 97) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 115) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 121) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 127) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 133) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 145) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 139) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 151) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 157) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 163) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 169) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 175) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NOTHING (line 181) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 187) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 193) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 199) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 205) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 217) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 211) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - OWL_CLASS (line 49) -
    - - - -
    - void - - OWL_CLASS - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 223) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 229) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 235) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 241) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 247) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 253) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 259) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 265) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 271) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 277) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 283) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 289) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 295) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF.html.svn-base deleted file mode 100755 index 4f6ab12e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF.html.svn-base +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - Docs For Class RDF - - - - -
    -

    Class RDF

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RDF_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABOUT - () -
    - -
    - void - ABOUT_EACH - () -
    - -
    - void - ABOUT_EACH_PREFIX - () -
    - -
    - void - ALT - () -
    - -
    - void - BAG - () -
    - -
    - void - BAG_ID - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - FIRST - () -
    - -
    - void - ID - () -
    - -
    - void - LI - () -
    - -
    - void - LITERAL - () -
    - -
    - void - NIL - () -
    - -
    - void - NODE_ID - () -
    - -
    - void - OBJECT - () -
    - -
    - void - PARSE_TYPE - () -
    - -
    - void - PARSE_TYPE_RESOURCE - () -
    - -
    - void - PREDICATE - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RDF_LIST - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - REST - () -
    - -
    - void - SEE_ALSO - () -
    - -
    - void - SEQ - () -
    - -
    - void - STATEMENT - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABOUT (line 109) -
    - - - -
    - void - - ABOUT - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH (line 115) -
    - - - -
    - void - - ABOUT_EACH - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH_PREFIX (line 121) -
    - - - -
    - void - - ABOUT_EACH_PREFIX - - () -
    - - - -
    - -
    - -
    - ALT (line 19) -
    - - - -
    - void - - ALT - - () -
    - - - -
    - -
    - -
    - BAG (line 25) -
    - - - -
    - void - - BAG - - () -
    - - - -
    - -
    - -
    - BAG_ID (line 127) -
    - - - -
    - void - - BAG_ID - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 169) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 97) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - FIRST (line 73) -
    - - - -
    - void - - FIRST - - () -
    - - - -
    - -
    - -
    - ID (line 103) -
    - - - -
    - void - - ID - - () -
    - - - -
    - -
    - -
    - LI (line 157) -
    - - - -
    - void - - LI - - () -
    - - - -
    - -
    - -
    - LITERAL (line 145) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - NIL (line 55) -
    - - - -
    - void - - NIL - - () -
    - - - -
    - -
    - -
    - NODE_ID (line 163) -
    - - - -
    - void - - NODE_ID - - () -
    - - - -
    - -
    - -
    - OBJECT (line 91) -
    - - - -
    - void - - OBJECT - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE (line 139) -
    - - - -
    - void - - PARSE_TYPE - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE_RESOURCE (line 151) -
    - - - -
    - void - - PARSE_TYPE_RESOURCE - - () -
    - - - -
    - -
    - -
    - PREDICATE (line 85) -
    - - - -
    - void - - PREDICATE - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 31) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RDF_LIST (line 49) -
    - - - -
    - void - - RDF_LIST - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 133) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - REST (line 67) -
    - - - -
    - void - - REST - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 175) -
    - - - -
    - void - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SEQ (line 37) -
    - - - -
    - void - - SEQ - - () -
    - - - -
    - -
    - -
    - STATEMENT (line 43) -
    - - - -
    - void - - STATEMENT - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 79) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TYPE (line 61) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS.html.svn-base deleted file mode 100755 index 57c790b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS.html.svn-base +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - Docs For Class RDFS - - - - -
    -

    Class RDFS

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RDFS_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - COMMENT - () -
    - -
    - void - CONTAINER - () -
    - - - -
    - void - DATATYPE - () -
    - -
    - void - DOMAIN - () -
    - -
    - void - IS_DEFINED_BY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LITERAL - () -
    - -
    - void - MEMBER - () -
    - -
    - void - RANGE - () -
    - -
    - void - RDFS_CLASS - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - SEEALSO - () -
    - -
    - void - SUB_CLASS_OF - () -
    - -
    - void - SUB_PROPERTY_OF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 84) -
    - - - -
    - void - - COMMENT - - () -
    - - - -
    - -
    - -
    - CONTAINER (line 42) -
    - - - -
    - void - - CONTAINER - - () -
    - - - -
    - -
    - -
    - CONTAINER_MEMBERSHIP_PROPERTY (line 48) -
    - - - -
    - void - - CONTAINER_MEMBERSHIP_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 36) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 66) -
    - - - -
    - void - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 102) -
    - - - -
    - void - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 78) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LITERAL (line 24) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - MEMBER (line 90) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - RANGE (line 72) -
    - - - -
    - void - - RANGE - - () -
    - - - -
    - -
    - -
    - RDFS_CLASS (line 30) -
    - - - -
    - void - - RDFS_CLASS - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 18) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - SEEALSO (line 96) -
    - - - -
    - void - - SEEALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 54) -
    - - - -
    - void - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 60) -
    - - - -
    - void - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS_RES.html.svn-base deleted file mode 100755 index e51041ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDFS_RES.html.svn-base +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - Docs For Class RDFS_RES - - - - -
    -

    Class RDFS_RES

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RDFS_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - COMMENT - () -
    - -
    - void - CONTAINER - () -
    - - - -
    - void - DATATYPE - () -
    - -
    - void - DOMAIN - () -
    - -
    - void - IS_DEFINED_BY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LITERAL - () -
    - -
    - void - MEMBER - () -
    - -
    - void - RANGE - () -
    - -
    - void - RDFS_CLASS - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - SEEALSO - () -
    - -
    - void - SUB_CLASS_OF - () -
    - -
    - void - SUB_PROPERTY_OF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 84) -
    - - - -
    - void - - COMMENT - - () -
    - - - -
    - -
    - -
    - CONTAINER (line 42) -
    - - - -
    - void - - CONTAINER - - () -
    - - - -
    - -
    - -
    - CONTAINER_MEMBERSHIP_PROPERTY (line 48) -
    - - - -
    - void - - CONTAINER_MEMBERSHIP_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 36) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 66) -
    - - - -
    - void - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 102) -
    - - - -
    - void - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 78) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LITERAL (line 24) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - MEMBER (line 90) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - RANGE (line 72) -
    - - - -
    - void - - RANGE - - () -
    - - - -
    - -
    - -
    - RDFS_CLASS (line 30) -
    - - - -
    - void - - RDFS_CLASS - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 18) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - SEEALSO (line 96) -
    - - - -
    - void - - SEEALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 54) -
    - - - -
    - void - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 60) -
    - - - -
    - void - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF_RES.html.svn-base deleted file mode 100755 index c993fc2d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RDF_RES.html.svn-base +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - Docs For Class RDF_RES - - - - -
    -

    Class RDF_RES

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RDF_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABOUT - () -
    - -
    - void - ABOUT_EACH - () -
    - -
    - void - ABOUT_EACH_PREFIX - () -
    - -
    - void - ALT - () -
    - -
    - void - BAG - () -
    - -
    - void - BAG_ID - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - FIRST - () -
    - -
    - void - ID - () -
    - -
    - void - LI - () -
    - -
    - void - LITERAL - () -
    - -
    - void - NIL - () -
    - -
    - void - NODE_ID - () -
    - -
    - void - OBJECT - () -
    - -
    - void - PARSE_TYPE - () -
    - -
    - void - PARSE_TYPE_RESOURCE - () -
    - -
    - void - PREDICATE - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RDF_LIST - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - REST - () -
    - -
    - void - SEE_ALSO - () -
    - -
    - void - SEQ - () -
    - -
    - void - STATEMENT - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABOUT (line 109) -
    - - - -
    - void - - ABOUT - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH (line 115) -
    - - - -
    - void - - ABOUT_EACH - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH_PREFIX (line 121) -
    - - - -
    - void - - ABOUT_EACH_PREFIX - - () -
    - - - -
    - -
    - -
    - ALT (line 19) -
    - - - -
    - void - - ALT - - () -
    - - - -
    - -
    - -
    - BAG (line 25) -
    - - - -
    - void - - BAG - - () -
    - - - -
    - -
    - -
    - BAG_ID (line 127) -
    - - - -
    - void - - BAG_ID - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 169) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 97) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - FIRST (line 73) -
    - - - -
    - void - - FIRST - - () -
    - - - -
    - -
    - -
    - ID (line 103) -
    - - - -
    - void - - ID - - () -
    - - - -
    - -
    - -
    - LI (line 157) -
    - - - -
    - void - - LI - - () -
    - - - -
    - -
    - -
    - LITERAL (line 145) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - NIL (line 55) -
    - - - -
    - void - - NIL - - () -
    - - - -
    - -
    - -
    - NODE_ID (line 163) -
    - - - -
    - void - - NODE_ID - - () -
    - - - -
    - -
    - -
    - OBJECT (line 91) -
    - - - -
    - void - - OBJECT - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE (line 139) -
    - - - -
    - void - - PARSE_TYPE - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE_RESOURCE (line 151) -
    - - - -
    - void - - PARSE_TYPE_RESOURCE - - () -
    - - - -
    - -
    - -
    - PREDICATE (line 85) -
    - - - -
    - void - - PREDICATE - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 31) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RDF_LIST (line 49) -
    - - - -
    - void - - RDF_LIST - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 133) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - REST (line 67) -
    - - - -
    - void - - REST - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 175) -
    - - - -
    - void - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SEQ (line 37) -
    - - - -
    - void - - SEQ - - () -
    - - - -
    - -
    - -
    - STATEMENT (line 43) -
    - - - -
    - void - - STATEMENT - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 79) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TYPE (line 61) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS.html.svn-base deleted file mode 100755 index 4cb63059..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS.html.svn-base +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Docs For Class RSS - - - - -
    -

    Class RSS

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RSS_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - CHANNEL - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - IMAGE - () -
    - -
    - void - ITEM - () -
    - -
    - void - ITEMS - () -
    - -
    - void - LINK - () -
    - -
    - void - NAME - () -
    - -
    - void - TEXTINPUT - () -
    - -
    - void - TITLE - () -
    - -
    - void - URL - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - CHANNEL (line 18) -
    - - - -
    - void - - CHANNEL - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 66) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - IMAGE (line 24) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - ITEM (line 30) -
    - - - -
    - void - - ITEM - - () -
    - - - -
    - -
    - -
    - ITEMS (line 42) -
    - - - -
    - void - - ITEMS - - () -
    - - - -
    - -
    - -
    - LINK (line 54) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - NAME (line 72) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - TEXTINPUT (line 36) -
    - - - -
    - void - - TEXTINPUT - - () -
    - - - -
    - -
    - -
    - TITLE (line 48) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - URL (line 60) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:44 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS_RES.html.svn-base deleted file mode 100755 index e785c864..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/RSS_RES.html.svn-base +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Docs For Class RSS_RES - - - - -
    -

    Class RSS_RES

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary (ResResource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/RSS_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - CHANNEL - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - IMAGE - () -
    - -
    - void - ITEM - () -
    - -
    - void - ITEMS - () -
    - -
    - void - LINK - () -
    - -
    - void - NAME - () -
    - -
    - void - TEXTINPUT - () -
    - -
    - void - TITLE - () -
    - -
    - void - URL - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - CHANNEL (line 18) -
    - - - -
    - void - - CHANNEL - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 66) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - IMAGE (line 24) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - ITEM (line 30) -
    - - - -
    - void - - ITEM - - () -
    - - - -
    - -
    - -
    - ITEMS (line 42) -
    - - - -
    - void - - ITEMS - - () -
    - - - -
    - -
    - -
    - LINK (line 54) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - NAME (line 72) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - TEXTINPUT (line 36) -
    - - - -
    - void - - TEXTINPUT - - () -
    - - - -
    - -
    - -
    - TITLE (line 48) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - URL (line 60) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD.html.svn-base deleted file mode 100755 index b095da2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD.html.svn-base +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class VCARD - - - - -
    -

    Class VCARD

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/VCARD_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ADR - () -
    - -
    - void - ADRPROPERTIES - () -
    - -
    - void - ADRTYPES - () -
    - -
    - void - AGENT - () -
    - -
    - void - BDAY - () -
    - -
    - void - CATEGORIES - () -
    - -
    - void - COUNTRY - () -
    - -
    - void - EMAIL - () -
    - -
    - void - EMAILTYPES - () -
    - -
    - void - EXTADD - () -
    - -
    - void - FAMILY - () -
    - -
    - void - FN - () -
    - -
    - void - GEO - () -
    - -
    - void - GIVEN - () -
    - -
    - void - GROUP - () -
    - -
    - void - KEY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LOCALITY - () -
    - -
    - void - MAILER - () -
    - -
    - void - N - () -
    - -
    - void - NAME - () -
    - -
    - void - NICKNAME - () -
    - -
    - void - NPROPERTIES - () -
    - -
    - void - ORGNAME - () -
    - -
    - void - ORGPROPERTIES - () -
    - -
    - void - ORGUNIT - () -
    - -
    - void - OTHER - () -
    - -
    - void - PCODE - () -
    - -
    - void - PHOTO - () -
    - -
    - void - POBOX - () -
    - -
    - void - PREFIX - () -
    - -
    - void - PRODID - () -
    - -
    - void - REGION - () -
    - -
    - void - REV - () -
    - -
    - void - ROLE - () -
    - -
    - void - SORT_STRING - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - STREET - () -
    - -
    - void - SUFFIX - () -
    - -
    - void - TEL - () -
    - -
    - void - TELTYPES - () -
    - -
    - void - TITLE - () -
    - -
    - void - TZ - () -
    - -
    - void - TZTYPES - () -
    - -
    - void - UID - () -
    - -
    - void - VCARD_CLASS - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ADR (line 157) -
    - - - -
    - void - - ADR - - () -
    - - - -
    - -
    - -
    - ADRPROPERTIES (line 55) -
    - - - -
    - void - - ADRPROPERTIES - - () -
    - - - -
    - -
    - -
    - ADRTYPES (line 31) -
    - - - -
    - void - - ADRTYPES - - () -
    - - - -
    - -
    - -
    - AGENT (line 73) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - BDAY (line 85) -
    - - - -
    - void - - BDAY - - () -
    - - - -
    - -
    - -
    - CATEGORIES (line 109) -
    - - - -
    - void - - CATEGORIES - - () -
    - - - -
    - -
    - -
    - COUNTRY (line 217) -
    - - - -
    - void - - COUNTRY - - () -
    - - - -
    - -
    - -
    - EMAIL (line 187) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - EMAILTYPES (line 43) -
    - - - -
    - void - - EMAILTYPES - - () -
    - - - -
    - -
    - -
    - EXTADD (line 175) -
    - - - -
    - void - - EXTADD - - () -
    - - - -
    - -
    - -
    - FAMILY (line 193) -
    - - - -
    - void - - FAMILY - - () -
    - - - -
    - -
    - -
    - FN (line 139) -
    - - - -
    - void - - FN - - () -
    - - - -
    - -
    - -
    - GEO (line 169) -
    - - - -
    - void - - GEO - - () -
    - - - -
    - -
    - -
    - GIVEN (line 271) -
    - - - -
    - void - - GIVEN - - () -
    - - - -
    - -
    - -
    - GROUP (line 181) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - KEY (line 259) -
    - - - -
    - void - - KEY - - () -
    - - - -
    - -
    - -
    - LABEL (line 277) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LOCALITY (line 247) -
    - - - -
    - void - - LOCALITY - - () -
    - - - -
    - -
    - -
    - MAILER (line 235) -
    - - - -
    - void - - MAILER - - () -
    - - - -
    - -
    - -
    - N (line 115) -
    - - - -
    - void - - N - - () -
    - - - -
    - -
    - -
    - NAME (line 205) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICKNAME (line 289) -
    - - - -
    - void - - NICKNAME - - () -
    - - - -
    - -
    - -
    - NPROPERTIES (line 37) -
    - - - -
    - void - - NPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGNAME (line 103) -
    - - - -
    - void - - ORGNAME - - () -
    - - - -
    - -
    - -
    - ORGPROPERTIES (line 25) -
    - - - -
    - void - - ORGPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGUNIT (line 211) -
    - - - -
    - void - - ORGUNIT - - () -
    - - - -
    - -
    - -
    - OTHER (line 241) -
    - - - -
    - void - - OTHER - - () -
    - - - -
    - -
    - -
    - PCODE (line 121) -
    - - - -
    - void - - PCODE - - () -
    - - - -
    - -
    - -
    - PHOTO (line 133) -
    - - - -
    - void - - PHOTO - - () -
    - - - -
    - -
    - -
    - POBOX (line 253) -
    - - - -
    - void - - POBOX - - () -
    - - - -
    - -
    - -
    - PREFIX (line 127) -
    - - - -
    - void - - PREFIX - - () -
    - - - -
    - -
    - -
    - PRODID (line 265) -
    - - - -
    - void - - PRODID - - () -
    - - - -
    - -
    - -
    - REGION (line 163) -
    - - - -
    - void - - REGION - - () -
    - - - -
    - -
    - -
    - REV (line 91) -
    - - - -
    - void - - REV - - () -
    - - - -
    - -
    - -
    - ROLE (line 295) -
    - - - -
    - void - - ROLE - - () -
    - - - -
    - -
    - -
    - SORT_STRING (line 97) -
    - - - -
    - void - - SORT_STRING - - () -
    - - - -
    - -
    - -
    - SOUND (line 223) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 79) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - STREET (line 67) -
    - - - -
    - void - - STREET - - () -
    - - - -
    - -
    - -
    - SUFFIX (line 145) -
    - - - -
    - void - - SUFFIX - - () -
    - - - -
    - -
    - -
    - TEL (line 283) -
    - - - -
    - void - - TEL - - () -
    - - - -
    - -
    - -
    - TELTYPES (line 49) -
    - - - -
    - void - - TELTYPES - - () -
    - - - -
    - -
    - -
    - TITLE (line 229) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TZ (line 199) -
    - - - -
    - void - - TZ - - () -
    - - - -
    - -
    - -
    - TZTYPES (line 61) -
    - - - -
    - void - - TZTYPES - - () -
    - - - -
    - -
    - -
    - UID (line 19) -
    - - - -
    - void - - UID - - () -
    - - - -
    - -
    - -
    - VCARD_CLASS (line 151) -
    - - - -
    - void - - VCARD_CLASS - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD_RES.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD_RES.html.svn-base deleted file mode 100755 index 197f8131..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/VCARD_RES.html.svn-base +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class VCARD_RES - - - - -
    -

    Class VCARD_RES

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id$
    • -
    -

    - Located in /vocabulary/VCARD_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ADR - () -
    - -
    - void - ADRPROPERTIES - () -
    - -
    - void - ADRTYPES - () -
    - -
    - void - AGENT - () -
    - -
    - void - BDAY - () -
    - -
    - void - CATEGORIES - () -
    - -
    - void - COUNTRY - () -
    - -
    - void - EMAIL - () -
    - -
    - void - EMAILTYPES - () -
    - -
    - void - EXTADD - () -
    - -
    - void - FAMILY - () -
    - -
    - void - FN - () -
    - -
    - void - GEO - () -
    - -
    - void - GIVEN - () -
    - -
    - void - GROUP - () -
    - -
    - void - KEY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LOCALITY - () -
    - -
    - void - MAILER - () -
    - -
    - void - N - () -
    - -
    - void - NAME - () -
    - -
    - void - NICKNAME - () -
    - -
    - void - NPROPERTIES - () -
    - -
    - void - ORGNAME - () -
    - -
    - void - ORGPROPERTIES - () -
    - -
    - void - ORGUNIT - () -
    - -
    - void - OTHER - () -
    - -
    - void - PCODE - () -
    - -
    - void - PHOTO - () -
    - -
    - void - POBOX - () -
    - -
    - void - PREFIX - () -
    - -
    - void - PRODID - () -
    - -
    - void - REGION - () -
    - -
    - void - REV - () -
    - -
    - void - ROLE - () -
    - -
    - void - SORT_STRING - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - STREET - () -
    - -
    - void - SUFFIX - () -
    - -
    - void - TEL - () -
    - -
    - void - TELTYPES - () -
    - -
    - void - TITLE - () -
    - -
    - void - TZ - () -
    - -
    - void - TZTYPES - () -
    - -
    - void - UID - () -
    - -
    - void - VCARD_CLASS - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ADR (line 157) -
    - - - -
    - void - - ADR - - () -
    - - - -
    - -
    - -
    - ADRPROPERTIES (line 55) -
    - - - -
    - void - - ADRPROPERTIES - - () -
    - - - -
    - -
    - -
    - ADRTYPES (line 31) -
    - - - -
    - void - - ADRTYPES - - () -
    - - - -
    - -
    - -
    - AGENT (line 73) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - BDAY (line 85) -
    - - - -
    - void - - BDAY - - () -
    - - - -
    - -
    - -
    - CATEGORIES (line 109) -
    - - - -
    - void - - CATEGORIES - - () -
    - - - -
    - -
    - -
    - COUNTRY (line 217) -
    - - - -
    - void - - COUNTRY - - () -
    - - - -
    - -
    - -
    - EMAIL (line 187) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - EMAILTYPES (line 43) -
    - - - -
    - void - - EMAILTYPES - - () -
    - - - -
    - -
    - -
    - EXTADD (line 175) -
    - - - -
    - void - - EXTADD - - () -
    - - - -
    - -
    - -
    - FAMILY (line 193) -
    - - - -
    - void - - FAMILY - - () -
    - - - -
    - -
    - -
    - FN (line 139) -
    - - - -
    - void - - FN - - () -
    - - - -
    - -
    - -
    - GEO (line 169) -
    - - - -
    - void - - GEO - - () -
    - - - -
    - -
    - -
    - GIVEN (line 271) -
    - - - -
    - void - - GIVEN - - () -
    - - - -
    - -
    - -
    - GROUP (line 181) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - KEY (line 259) -
    - - - -
    - void - - KEY - - () -
    - - - -
    - -
    - -
    - LABEL (line 277) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LOCALITY (line 247) -
    - - - -
    - void - - LOCALITY - - () -
    - - - -
    - -
    - -
    - MAILER (line 235) -
    - - - -
    - void - - MAILER - - () -
    - - - -
    - -
    - -
    - N (line 115) -
    - - - -
    - void - - N - - () -
    - - - -
    - -
    - -
    - NAME (line 205) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICKNAME (line 289) -
    - - - -
    - void - - NICKNAME - - () -
    - - - -
    - -
    - -
    - NPROPERTIES (line 37) -
    - - - -
    - void - - NPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGNAME (line 103) -
    - - - -
    - void - - ORGNAME - - () -
    - - - -
    - -
    - -
    - ORGPROPERTIES (line 25) -
    - - - -
    - void - - ORGPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGUNIT (line 211) -
    - - - -
    - void - - ORGUNIT - - () -
    - - - -
    - -
    - -
    - OTHER (line 241) -
    - - - -
    - void - - OTHER - - () -
    - - - -
    - -
    - -
    - PCODE (line 121) -
    - - - -
    - void - - PCODE - - () -
    - - - -
    - -
    - -
    - PHOTO (line 133) -
    - - - -
    - void - - PHOTO - - () -
    - - - -
    - -
    - -
    - POBOX (line 253) -
    - - - -
    - void - - POBOX - - () -
    - - - -
    - -
    - -
    - PREFIX (line 127) -
    - - - -
    - void - - PREFIX - - () -
    - - - -
    - -
    - -
    - PRODID (line 265) -
    - - - -
    - void - - PRODID - - () -
    - - - -
    - -
    - -
    - REGION (line 163) -
    - - - -
    - void - - REGION - - () -
    - - - -
    - -
    - -
    - REV (line 91) -
    - - - -
    - void - - REV - - () -
    - - - -
    - -
    - -
    - ROLE (line 295) -
    - - - -
    - void - - ROLE - - () -
    - - - -
    - -
    - -
    - SORT_STRING (line 97) -
    - - - -
    - void - - SORT_STRING - - () -
    - - - -
    - -
    - -
    - SOUND (line 223) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 79) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - STREET (line 67) -
    - - - -
    - void - - STREET - - () -
    - - - -
    - -
    - -
    - SUFFIX (line 145) -
    - - - -
    - void - - SUFFIX - - () -
    - - - -
    - -
    - -
    - TEL (line 283) -
    - - - -
    - void - - TEL - - () -
    - - - -
    - -
    - -
    - TELTYPES (line 49) -
    - - - -
    - void - - TELTYPES - - () -
    - - - -
    - -
    - -
    - TITLE (line 229) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TZ (line 199) -
    - - - -
    - void - - TZ - - () -
    - - - -
    - -
    - -
    - TZTYPES (line 61) -
    - - - -
    - void - - TZTYPES - - () -
    - - - -
    - -
    - -
    - UID (line 19) -
    - - - -
    - void - - UID - - () -
    - - - -
    - -
    - -
    - VCARD_CLASS (line 151) -
    - - - -
    - void - - VCARD_CLASS - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_C.php.html.svn-base deleted file mode 100755 index a8e22b0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ATOM_C.php - - - - -
    -

    /vocabulary/ATOM_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ATOM - - ATOM Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_RES.php.html.svn-base deleted file mode 100755 index 06f51d5a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---ATOM_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ATOM_RES.php - - - - -
    -

    /vocabulary/ATOM_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ATOM_RES - - ATOM Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_C.php.html.svn-base deleted file mode 100755 index 1700f7cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page DC_C.php - - - - -
    -

    /vocabulary/DC_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DC - - Dublin Core Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_RES.php.html.svn-base deleted file mode 100755 index 1bc2745c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---DC_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page DC_RES.php - - - - -
    -

    /vocabulary/DC_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DC_RES - - Dublin Core Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:56 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF.php.html.svn-base deleted file mode 100755 index 1cabc7e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page FOAF.php - - - - -
    -

    /vocabulary/FOAF.php

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (Resource)

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_C.php.html.svn-base deleted file mode 100755 index b1ad6a0b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FOAF_C.php - - - - -
    -

    /vocabulary/FOAF_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FOAF - - Friend of a Friend (FOAF) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:10 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_RES.php.html.svn-base deleted file mode 100755 index f789aafe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---FOAF_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FOAF_RES.php - - - - -
    -

    /vocabulary/FOAF_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FOAF_RES - - Friend of a Friend (FOAF) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL.php.html.svn-base deleted file mode 100755 index 3a7e5810..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page OWL.php - - - - -
    -

    /vocabulary/OWL.php

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_C.php.html.svn-base deleted file mode 100755 index eb444083..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWL_C.php - - - - -
    -

    /vocabulary/OWL_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWL - - OWL Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_RES.php.html.svn-base deleted file mode 100755 index 9d3c09fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---OWL_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWL_RES.php - - - - -
    -

    /vocabulary/OWL_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWL_RES - - OWL Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF.php.html.svn-base deleted file mode 100755 index 064140b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RDF.php - - - - -
    -

    /vocabulary/RDF.php

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS.php.html.svn-base deleted file mode 100755 index 16f01d28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RDFS.php - - - - -
    -

    /vocabulary/RDFS.php

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_C.php.html.svn-base deleted file mode 100755 index 4def4765..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDFS_C.php - - - - -
    -

    /vocabulary/RDFS_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFS - - RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_RES.php.html.svn-base deleted file mode 100755 index 8a4e5e5e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDFS_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDFS_RES.php - - - - -
    -

    /vocabulary/RDFS_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFS_RES - - RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_C.php.html.svn-base deleted file mode 100755 index 375ae615..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDF_C.php - - - - -
    -

    /vocabulary/RDF_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDF - - Resource Description Framework (RDF) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_RES.php.html.svn-base deleted file mode 100755 index b5a6a4dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RDF_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDF_RES.php - - - - -
    -

    /vocabulary/RDF_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDF_RES - - Resource Description Framework (RDF) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS.php.html.svn-base deleted file mode 100755 index db8db649..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RSS.php - - - - -
    -

    /vocabulary/RSS.php

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_C.php.html.svn-base deleted file mode 100755 index 27e70c2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RSS_C.php - - - - -
    -

    /vocabulary/RSS_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RSS - - RSS Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_RES.php.html.svn-base deleted file mode 100755 index a0a99e40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---RSS_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RSS_RES.php - - - - -
    -

    /vocabulary/RSS_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RSS_RES - - RSS Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD.php.html.svn-base deleted file mode 100755 index c66bcecf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD.php.html.svn-base +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page VCARD.php - - - - -
    -

    /vocabulary/VCARD.php

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary

    - - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_C.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_C.php.html.svn-base deleted file mode 100755 index 095c439a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_C.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page VCARD_C.php - - - - -
    -

    /vocabulary/VCARD_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - VCARD - - vCard profile defined by RFC 2426 - Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_RES.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_RES.php.html.svn-base deleted file mode 100755 index fe8ba1c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VCARD_RES.php.html.svn-base +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page VCARD_RES.php - - - - -
    -

    /vocabulary/VCARD_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - VCARD_RES - - vCard profile defined by RFC 2426 - Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---Vocabulary.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---Vocabulary.php.html.svn-base deleted file mode 100755 index 0f75c032..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---Vocabulary.php.html.svn-base +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - Docs for page Vocabulary.php - - - - -
    -

    /vocabulary/Vocabulary.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF.php') - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyClass.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyClass.php.html.svn-base deleted file mode 100755 index beb23abc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyClass.php.html.svn-base +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - Docs for page VocabularyClass.php - - - - -
    -

    /vocabulary/VocabularyClass.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF_C.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_C.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_C.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL_C.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC_C.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_C.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS_C.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_C.php') - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyRes.php.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyRes.php.html.svn-base deleted file mode 100755 index 8627fa9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/.svn/text-base/_vocabulary---VocabularyRes.php.html.svn-base +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - Docs for page VocabularyRes.php - - - - -
    -

    /vocabulary/VocabularyRes.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - include_once - (RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL)) - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_RES.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF_RES.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_RES.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL_RES.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC_RES.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_RES.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_RES.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS_RES.php') - (line 20) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM.html deleted file mode 100755 index a0607831..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM.html +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - Docs For Class ATOM - - - - -
    -

    Class ATOM

    - - -
    -
    Description
    - -
    - -

    ATOM Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: ATOM.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/ATOM_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ATOM_CONSTRUCT - () -
    - -
    - void - AUTHOR - () -
    - -
    - void - CONTENT - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COPYRIGHT - () -
    - -
    - void - CREATED - () -
    - -
    - void - EMAIL - () -
    - -
    - void - ENTRY - () -
    - -
    - void - FEED - () -
    - -
    - void - GENERATOR - () -
    - -
    - void - HAS_CHILD - () -
    - -
    - void - HAS_ENTRY - () -
    - -
    - void - HAS_LINK - () -
    - -
    - void - HAS_TITLE - () -
    - -
    - void - HREF - () -
    - -
    - void - INFO - () -
    - -
    - void - ISSUED - () -
    - -
    - void - LANG - () -
    - -
    - void - LINK - () -
    - -
    - void - MODE - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - NAME - () -
    - -
    - void - PERSON - () -
    - -
    - void - REL - () -
    - -
    - void - SUMMARY - () -
    - -
    - void - TAGLINE - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - URL - () -
    - -
    - void - VALUE - () -
    - -
    - void - VERSION - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ATOM_CONSTRUCT (line 66) -
    - - - -
    - void - - ATOM_CONSTRUCT - - () -
    - - - -
    - -
    - -
    - AUTHOR (line 114) -
    - - - -
    - void - - AUTHOR - - () -
    - - - -
    - -
    - -
    - CONTENT (line 72) -
    - - - -
    - void - - CONTENT - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 120) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COPYRIGHT (line 138) -
    - - - -
    - void - - COPYRIGHT - - () -
    - - - -
    - -
    - -
    - CREATED (line 192) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - EMAIL (line 42) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - ENTRY (line 156) -
    - - - -
    - void - - ENTRY - - () -
    - - - -
    - -
    - -
    - FEED (line 96) -
    - - - -
    - void - - FEED - - () -
    - - - -
    - -
    - -
    - GENERATOR (line 132) -
    - - - -
    - void - - GENERATOR - - () -
    - - - -
    - -
    - -
    - HAS_CHILD (line 162) -
    - - - -
    - void - - HAS_CHILD - - () -
    - - - -
    - -
    - -
    - HAS_ENTRY (line 168) -
    - - - -
    - void - - HAS_ENTRY - - () -
    - - - -
    - -
    - -
    - HAS_LINK (line 174) -
    - - - -
    - void - - HAS_LINK - - () -
    - - - -
    - -
    - -
    - HAS_TITLE (line 180) -
    - - - -
    - void - - HAS_TITLE - - () -
    - - - -
    - -
    - -
    - HREF (line 54) -
    - - - -
    - void - - HREF - - () -
    - - - -
    - -
    - -
    - INFO (line 144) -
    - - - -
    - void - - INFO - - () -
    - - - -
    - -
    - -
    - ISSUED (line 186) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - LANG (line 108) -
    - - - -
    - void - - LANG - - () -
    - - - -
    - -
    - -
    - LINK (line 90) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - MODE (line 24) -
    - - - -
    - void - - MODE - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 150) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - NAME (line 30) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - PERSON (line 78) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - REL (line 48) -
    - - - -
    - void - - REL - - () -
    - - - -
    - -
    - -
    - SUMMARY (line 198) -
    - - - -
    - void - - SUMMARY - - () -
    - - - -
    - -
    - -
    - TAGLINE (line 126) -
    - - - -
    - void - - TAGLINE - - () -
    - - - -
    - -
    - -
    - TITLE (line 60) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 18) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - URL (line 36) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    - -
    - VALUE (line 84) -
    - - - -
    - void - - VALUE - - () -
    - - - -
    - -
    - -
    - VERSION (line 102) -
    - - - -
    - void - - VERSION - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM_RES.html deleted file mode 100755 index 3d09cf40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/ATOM_RES.html +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - Docs For Class ATOM_RES - - - - -
    -

    Class ATOM_RES

    - - -
    -
    Description
    - -
    - -

    ATOM Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: ATOM_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/ATOM_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ATOM_CONSTRUCT - () -
    - -
    - void - AUTHOR - () -
    - -
    - void - CONTENT - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COPYRIGHT - () -
    - -
    - void - CREATED - () -
    - -
    - void - EMAIL - () -
    - -
    - void - ENTRY - () -
    - -
    - void - FEED - () -
    - -
    - void - GENERATOR - () -
    - -
    - void - HAS_CHILD - () -
    - -
    - void - HAS_ENTRY - () -
    - -
    - void - HAS_LINK - () -
    - -
    - void - HAS_TITLE - () -
    - -
    - void - HREF - () -
    - -
    - void - INFO - () -
    - -
    - void - ISSUED - () -
    - -
    - void - LANG - () -
    - -
    - void - LINK - () -
    - -
    - void - MODE - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - NAME - () -
    - -
    - void - PERSON - () -
    - -
    - void - REL - () -
    - -
    - void - SUMMARY - () -
    - -
    - void - TAGLINE - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - URL - () -
    - -
    - void - VALUE - () -
    - -
    - void - VERSION - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ATOM_CONSTRUCT (line 66) -
    - - - -
    - void - - ATOM_CONSTRUCT - - () -
    - - - -
    - -
    - -
    - AUTHOR (line 114) -
    - - - -
    - void - - AUTHOR - - () -
    - - - -
    - -
    - -
    - CONTENT (line 72) -
    - - - -
    - void - - CONTENT - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 120) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COPYRIGHT (line 138) -
    - - - -
    - void - - COPYRIGHT - - () -
    - - - -
    - -
    - -
    - CREATED (line 192) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - EMAIL (line 42) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - ENTRY (line 156) -
    - - - -
    - void - - ENTRY - - () -
    - - - -
    - -
    - -
    - FEED (line 96) -
    - - - -
    - void - - FEED - - () -
    - - - -
    - -
    - -
    - GENERATOR (line 132) -
    - - - -
    - void - - GENERATOR - - () -
    - - - -
    - -
    - -
    - HAS_CHILD (line 162) -
    - - - -
    - void - - HAS_CHILD - - () -
    - - - -
    - -
    - -
    - HAS_ENTRY (line 168) -
    - - - -
    - void - - HAS_ENTRY - - () -
    - - - -
    - -
    - -
    - HAS_LINK (line 174) -
    - - - -
    - void - - HAS_LINK - - () -
    - - - -
    - -
    - -
    - HAS_TITLE (line 180) -
    - - - -
    - void - - HAS_TITLE - - () -
    - - - -
    - -
    - -
    - HREF (line 54) -
    - - - -
    - void - - HREF - - () -
    - - - -
    - -
    - -
    - INFO (line 144) -
    - - - -
    - void - - INFO - - () -
    - - - -
    - -
    - -
    - ISSUED (line 186) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - LANG (line 108) -
    - - - -
    - void - - LANG - - () -
    - - - -
    - -
    - -
    - LINK (line 90) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - MODE (line 24) -
    - - - -
    - void - - MODE - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 150) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - NAME (line 30) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - PERSON (line 78) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - REL (line 48) -
    - - - -
    - void - - REL - - () -
    - - - -
    - -
    - -
    - SUMMARY (line 198) -
    - - - -
    - void - - SUMMARY - - () -
    - - - -
    - -
    - -
    - TAGLINE (line 126) -
    - - - -
    - void - - TAGLINE - - () -
    - - - -
    - -
    - -
    - TITLE (line 60) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 18) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - URL (line 36) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    - -
    - VALUE (line 84) -
    - - - -
    - void - - VALUE - - () -
    - - - -
    - -
    - -
    - VERSION (line 102) -
    - - - -
    - void - - VERSION - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:32 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC.html deleted file mode 100755 index dce74b52..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC.html +++ /dev/null @@ -1,2077 +0,0 @@ - - - - - - Docs For Class DC - - - - -
    -

    Class DC

    - - -
    -
    Description
    - -
    - -

    Dublin Core Vocabulary (Resource)

    -
      -
    • author: Chris Bizer (chris@bizer.de)
    • -
    • version: $Id: DC.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/DC_C.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABSTRACT_ - () -
    - -
    - void - ACCESS_RIGHTS - () -
    - -
    - void - ALTERNATIVE - () -
    - -
    - void - AUDIENCE - () -
    - -
    - void - AVAILABLE - () -
    - -
    - void - BIBLIOGRAPHIC_CITATION - () -
    - -
    - void - BOX - () -
    - -
    - void - COLLECTION - () -
    - -
    - void - CONFORMS_TO - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COVERAGE - () -
    - -
    - void - CREATED - () -
    - -
    - void - CREATOR - () -
    - -
    - void - DATASET - () -
    - -
    - void - DATE - () -
    - -
    - void - DATE_ACCEPTED - () -
    - -
    - void - DATE_COPYRIGHTED - () -
    - -
    - void - DATE_SUBMITTED - () -
    - -
    - void - DCMI_TYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - EDUCATION_LEVEL - () -
    - -
    - void - EVENT - () -
    - -
    - void - EXTENT - () -
    - -
    - void - FORMAT - () -
    - -
    - void - HAS_FORMAT - () -
    - -
    - void - HAS_PART - () -
    - -
    - void - HAS_VERSION - () -
    - -
    - void - IDENTIFIER - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMT - () -
    - -
    - void - INTERACTIVERESOURCE - () -
    - -
    - void - ISO639_2 - () -
    - -
    - void - ISO3166 - () -
    - -
    - void - ISSUED - () -
    - -
    - void - IS_FORMAT_OF - () -
    - -
    - void - IS_PART_OF - () -
    - -
    - void - IS_REFERENCED_BY - () -
    - -
    - void - IS_REPLACED_BY - () -
    - -
    - void - IS_REQUIRED_BY - () -
    - -
    - void - IS_VERSION_OF - () -
    - -
    - void - LANGUAGE - () -
    - -
    - void - LCC - () -
    - -
    - void - LCSH - () -
    - -
    - void - LICENSE - () -
    - -
    - void - MEDIATOR - () -
    - -
    - void - MEDIUM - () -
    - -
    - void - MESH - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - MOVINGIMAGE - () -
    - -
    - void - PERIOD - () -
    - -
    - void - PHYSICALOBJECT - () -
    - -
    - void - POINT - () -
    - -
    - void - PUBLISHER - () -
    - -
    - void - REFERENCES - () -
    - -
    - void - REPLACES - () -
    - -
    - void - REQUIRES - () -
    - -
    - void - RFC1766 - () -
    - -
    - void - RFC3066 - () -
    - -
    - void - RIGHTS - () -
    - -
    - void - RIGHTS_HOLDER - () -
    - -
    - void - SERVICE - () -
    - -
    - void - SOFTWARE - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - SPATIAL - () -
    - -
    - void - STILLIMAGE - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TABLE_OF_CONTENTS - () -
    - -
    - void - TEMPORAL - () -
    - -
    - void - TEXT - () -
    - -
    - void - TGN - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - UDC - () -
    - -
    - void - URI - () -
    - -
    - void - VALID - () -
    - -
    - void - W3CDTF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABSTRACT_ (line 102) -
    - - - -
    - void - - ABSTRACT_ - - () -
    - - - -
    - -
    - -
    - ACCESS_RIGHTS (line 108) -
    - - - -
    - void - - ACCESS_RIGHTS - - () -
    - - - -
    - -
    - -
    - ALTERNATIVE (line 114) -
    - - - -
    - void - - ALTERNATIVE - - () -
    - - - -
    - -
    - -
    - AUDIENCE (line 120) -
    - - - -
    - void - - AUDIENCE - - () -
    - - - -
    - -
    - -
    - AVAILABLE (line 126) -
    - - - -
    - void - - AVAILABLE - - () -
    - - - -
    - -
    - -
    - BIBLIOGRAPHIC_CITATION (line 132) -
    - - - -
    - void - - BIBLIOGRAPHIC_CITATION - - () -
    - - - -
    - -
    - -
    - BOX (line 314) -
    - - - -
    - void - - BOX - - () -
    - - - -
    - -
    - -
    - COLLECTION (line 412) -
    - - - -
    - void - - COLLECTION - - () -
    - - - -
    - -
    - -
    - CONFORMS_TO (line 138) -
    - - - -
    - void - - CONFORMS_TO - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 17) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COVERAGE (line 23) -
    - - - -
    - void - - COVERAGE - - () -
    - - - -
    - -
    - -
    - CREATED (line 144) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - CREATOR (line 29) -
    - - - -
    - void - - CREATOR - - () -
    - - - -
    - -
    - -
    - DATASET (line 418) -
    - - - -
    - void - - DATASET - - () -
    - - - -
    - -
    - -
    - DATE (line 35) -
    - - - -
    - void - - DATE - - () -
    - - - -
    - -
    - -
    - DATE_ACCEPTED (line 150) -
    - - - -
    - void - - DATE_ACCEPTED - - () -
    - - - -
    - -
    - -
    - DATE_COPYRIGHTED (line 156) -
    - - - -
    - void - - DATE_COPYRIGHTED - - () -
    - - - -
    - -
    - -
    - DATE_SUBMITTED (line 162) -
    - - - -
    - void - - DATE_SUBMITTED - - () -
    - - - -
    - -
    - -
    - DCMI_TYPE (line 320) -
    - - - -
    - void - - DCMI_TYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 41) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - EDUCATION_LEVEL (line 168) -
    - - - -
    - void - - EDUCATION_LEVEL - - () -
    - - - -
    - -
    - -
    - EVENT (line 424) -
    - - - -
    - void - - EVENT - - () -
    - - - -
    - -
    - -
    - EXTENT (line 174) -
    - - - -
    - void - - EXTENT - - () -
    - - - -
    - -
    - -
    - FORMAT (line 47) -
    - - - -
    - void - - FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_FORMAT (line 180) -
    - - - -
    - void - - HAS_FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_PART (line 186) -
    - - - -
    - void - - HAS_PART - - () -
    - - - -
    - -
    - -
    - HAS_VERSION (line 192) -
    - - - -
    - void - - HAS_VERSION - - () -
    - - - -
    - -
    - -
    - IDENTIFIER (line 53) -
    - - - -
    - void - - IDENTIFIER - - () -
    - - - -
    - -
    - -
    - IMAGE (line 430) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMT (line 326) -
    - - - -
    - void - - IMT - - () -
    - - - -
    - -
    - -
    - INTERACTIVERESOURCE (line 436) -
    - - - -
    - void - - INTERACTIVERESOURCE - - () -
    - - - -
    - -
    - -
    - ISO639_2 (line 338) -
    - - - -
    - void - - ISO639_2 - - () -
    - - - -
    - -
    - -
    - ISO3166 (line 332) -
    - - - -
    - void - - ISO3166 - - () -
    - - - -
    - -
    - -
    - ISSUED (line 228) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - IS_FORMAT_OF (line 198) -
    - - - -
    - void - - IS_FORMAT_OF - - () -
    - - - -
    - -
    - -
    - IS_PART_OF (line 204) -
    - - - -
    - void - - IS_PART_OF - - () -
    - - - -
    - -
    - -
    - IS_REFERENCED_BY (line 210) -
    - - - -
    - void - - IS_REFERENCED_BY - - () -
    - - - -
    - -
    - -
    - IS_REPLACED_BY (line 216) -
    - - - -
    - void - - IS_REPLACED_BY - - () -
    - - - -
    - -
    - -
    - IS_REQUIRED_BY (line 222) -
    - - - -
    - void - - IS_REQUIRED_BY - - () -
    - - - -
    - -
    - -
    - IS_VERSION_OF (line 234) -
    - - - -
    - void - - IS_VERSION_OF - - () -
    - - - -
    - -
    - -
    - LANGUAGE (line 59) -
    - - - -
    - void - - LANGUAGE - - () -
    - - - -
    - -
    - -
    - LCC (line 344) -
    - - - -
    - void - - LCC - - () -
    - - - -
    - -
    - -
    - LCSH (line 350) -
    - - - -
    - void - - LCSH - - () -
    - - - -
    - -
    - -
    - LICENSE (line 240) -
    - - - -
    - void - - LICENSE - - () -
    - - - -
    - -
    - -
    - MEDIATOR (line 246) -
    - - - -
    - void - - MEDIATOR - - () -
    - - - -
    - -
    - -
    - MEDIUM (line 252) -
    - - - -
    - void - - MEDIUM - - () -
    - - - -
    - -
    - -
    - MESH (line 356) -
    - - - -
    - void - - MESH - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 258) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - MOVINGIMAGE (line 442) -
    - - - -
    - void - - MOVINGIMAGE - - () -
    - - - -
    - -
    - -
    - PERIOD (line 362) -
    - - - -
    - void - - PERIOD - - () -
    - - - -
    - -
    - -
    - PHYSICALOBJECT (line 448) -
    - - - -
    - void - - PHYSICALOBJECT - - () -
    - - - -
    - -
    - -
    - POINT (line 368) -
    - - - -
    - void - - POINT - - () -
    - - - -
    - -
    - -
    - PUBLISHER (line 65) -
    - - - -
    - void - - PUBLISHER - - () -
    - - - -
    - -
    - -
    - REFERENCES (line 264) -
    - - - -
    - void - - REFERENCES - - () -
    - - - -
    - -
    - -
    - REPLACES (line 270) -
    - - - -
    - void - - REPLACES - - () -
    - - - -
    - -
    - -
    - REQUIRES (line 276) -
    - - - -
    - void - - REQUIRES - - () -
    - - - -
    - -
    - -
    - RFC1766 (line 374) -
    - - - -
    - void - - RFC1766 - - () -
    - - - -
    - -
    - -
    - RFC3066 (line 380) -
    - - - -
    - void - - RFC3066 - - () -
    - - - -
    - -
    - -
    - RIGHTS (line 71) -
    - - - -
    - void - - RIGHTS - - () -
    - - - -
    - -
    - -
    - RIGHTS_HOLDER (line 282) -
    - - - -
    - void - - RIGHTS_HOLDER - - () -
    - - - -
    - -
    - -
    - SERVICE (line 454) -
    - - - -
    - void - - SERVICE - - () -
    - - - -
    - -
    - -
    - SOFTWARE (line 460) -
    - - - -
    - void - - SOFTWARE - - () -
    - - - -
    - -
    - -
    - SOUND (line 466) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 77) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - SPATIAL (line 288) -
    - - - -
    - void - - SPATIAL - - () -
    - - - -
    - -
    - -
    - STILLIMAGE (line 472) -
    - - - -
    - void - - STILLIMAGE - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 83) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TABLE_OF_CONTENTS (line 294) -
    - - - -
    - void - - TABLE_OF_CONTENTS - - () -
    - - - -
    - -
    - -
    - TEMPORAL (line 300) -
    - - - -
    - void - - TEMPORAL - - () -
    - - - -
    - -
    - -
    - TEXT (line 478) -
    - - - -
    - void - - TEXT - - () -
    - - - -
    - -
    - -
    - TGN (line 386) -
    - - - -
    - void - - TGN - - () -
    - - - -
    - -
    - -
    - TITLE (line 89) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 95) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - UDC (line 392) -
    - - - -
    - void - - UDC - - () -
    - - - -
    - -
    - -
    - URI (line 398) -
    - - - -
    - void - - URI - - () -
    - - - -
    - -
    - -
    - VALID (line 306) -
    - - - -
    - void - - VALID - - () -
    - - - -
    - -
    - -
    - W3CDTF (line 404) -
    - - - -
    - void - - W3CDTF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:55 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC_RES.html deleted file mode 100755 index 285e4c77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/DC_RES.html +++ /dev/null @@ -1,2077 +0,0 @@ - - - - - - Docs For Class DC_RES - - - - -
    -

    Class DC_RES

    - - -
    -
    Description
    - -
    - -

    Dublin Core Vocabulary (ResResource)

    -
      -
    • author: Chris Bizer (chris@bizer.de)
    • -
    • version: $Id: DC_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/DC_RES.php (line 15) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABSTRACT_ - () -
    - -
    - void - ACCESS_RIGHTS - () -
    - -
    - void - ALTERNATIVE - () -
    - -
    - void - AUDIENCE - () -
    - -
    - void - AVAILABLE - () -
    - -
    - void - BIBLIOGRAPHIC_CITATION - () -
    - -
    - void - BOX - () -
    - -
    - void - COLLECTION - () -
    - -
    - void - CONFORMS_TO - () -
    - -
    - void - CONTRIBUTOR - () -
    - -
    - void - COVERAGE - () -
    - -
    - void - CREATED - () -
    - -
    - void - CREATOR - () -
    - -
    - void - DATASET - () -
    - -
    - void - DATE - () -
    - -
    - void - DATE_ACCEPTED - () -
    - -
    - void - DATE_COPYRIGHTED - () -
    - -
    - void - DATE_SUBMITTED - () -
    - -
    - void - DCMI_TYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - EDUCATION_LEVEL - () -
    - -
    - void - EVENT - () -
    - -
    - void - EXTENT - () -
    - -
    - void - FORMAT - () -
    - -
    - void - HAS_FORMAT - () -
    - -
    - void - HAS_PART - () -
    - -
    - void - HAS_VERSION - () -
    - -
    - void - IDENTIFIER - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMT - () -
    - -
    - void - INTERACTIVE_RESOURCE - () -
    - -
    - void - ISO639_2 - () -
    - -
    - void - ISO3166 - () -
    - -
    - void - ISSUED - () -
    - -
    - void - IS_FORMAT_OF - () -
    - -
    - void - IS_PART_OF - () -
    - -
    - void - IS_REFERENCED_BY - () -
    - -
    - void - IS_REPLACED_BY - () -
    - -
    - void - IS_REQUIRED_BY - () -
    - -
    - void - IS_VERSION_OF - () -
    - -
    - void - LANGUAGE - () -
    - -
    - void - LCC - () -
    - -
    - void - LCSH - () -
    - -
    - void - LICENSE - () -
    - -
    - void - MEDIATOR - () -
    - -
    - void - MEDIUM - () -
    - -
    - void - MESH - () -
    - -
    - void - MODIFIED - () -
    - -
    - void - MOVINGIMAGE - () -
    - -
    - void - PERIOD - () -
    - -
    - void - PHYSICALOBJECT - () -
    - -
    - void - POINT - () -
    - -
    - void - PUBLISHER - () -
    - -
    - void - REFERENCES - () -
    - -
    - void - REPLACES - () -
    - -
    - void - REQUIRES - () -
    - -
    - void - RFC1766 - () -
    - -
    - void - RFC3066 - () -
    - -
    - void - RIGHTS - () -
    - -
    - void - RIGHTS_HOLDER - () -
    - -
    - void - SERVICE - () -
    - -
    - void - SOFTWARE - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - SPATIAL - () -
    - -
    - void - STILLIMAGE - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TABLE_OF_CONTENTS - () -
    - -
    - void - TEMPORAL - () -
    - -
    - void - TEXT - () -
    - -
    - void - TGN - () -
    - -
    - void - TITLE - () -
    - -
    - void - TYPE - () -
    - -
    - void - UDC - () -
    - -
    - void - URI - () -
    - -
    - void - VALID - () -
    - -
    - void - W3CDTF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABSTRACT_ (line 102) -
    - - - -
    - void - - ABSTRACT_ - - () -
    - - - -
    - -
    - -
    - ACCESS_RIGHTS (line 108) -
    - - - -
    - void - - ACCESS_RIGHTS - - () -
    - - - -
    - -
    - -
    - ALTERNATIVE (line 114) -
    - - - -
    - void - - ALTERNATIVE - - () -
    - - - -
    - -
    - -
    - AUDIENCE (line 120) -
    - - - -
    - void - - AUDIENCE - - () -
    - - - -
    - -
    - -
    - AVAILABLE (line 126) -
    - - - -
    - void - - AVAILABLE - - () -
    - - - -
    - -
    - -
    - BIBLIOGRAPHIC_CITATION (line 132) -
    - - - -
    - void - - BIBLIOGRAPHIC_CITATION - - () -
    - - - -
    - -
    - -
    - BOX (line 314) -
    - - - -
    - void - - BOX - - () -
    - - - -
    - -
    - -
    - COLLECTION (line 412) -
    - - - -
    - void - - COLLECTION - - () -
    - - - -
    - -
    - -
    - CONFORMS_TO (line 138) -
    - - - -
    - void - - CONFORMS_TO - - () -
    - - - -
    - -
    - -
    - CONTRIBUTOR (line 17) -
    - - - -
    - void - - CONTRIBUTOR - - () -
    - - - -
    - -
    - -
    - COVERAGE (line 23) -
    - - - -
    - void - - COVERAGE - - () -
    - - - -
    - -
    - -
    - CREATED (line 144) -
    - - - -
    - void - - CREATED - - () -
    - - - -
    - -
    - -
    - CREATOR (line 29) -
    - - - -
    - void - - CREATOR - - () -
    - - - -
    - -
    - -
    - DATASET (line 418) -
    - - - -
    - void - - DATASET - - () -
    - - - -
    - -
    - -
    - DATE (line 35) -
    - - - -
    - void - - DATE - - () -
    - - - -
    - -
    - -
    - DATE_ACCEPTED (line 150) -
    - - - -
    - void - - DATE_ACCEPTED - - () -
    - - - -
    - -
    - -
    - DATE_COPYRIGHTED (line 156) -
    - - - -
    - void - - DATE_COPYRIGHTED - - () -
    - - - -
    - -
    - -
    - DATE_SUBMITTED (line 162) -
    - - - -
    - void - - DATE_SUBMITTED - - () -
    - - - -
    - -
    - -
    - DCMI_TYPE (line 320) -
    - - - -
    - void - - DCMI_TYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 41) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - EDUCATION_LEVEL (line 168) -
    - - - -
    - void - - EDUCATION_LEVEL - - () -
    - - - -
    - -
    - -
    - EVENT (line 424) -
    - - - -
    - void - - EVENT - - () -
    - - - -
    - -
    - -
    - EXTENT (line 174) -
    - - - -
    - void - - EXTENT - - () -
    - - - -
    - -
    - -
    - FORMAT (line 47) -
    - - - -
    - void - - FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_FORMAT (line 180) -
    - - - -
    - void - - HAS_FORMAT - - () -
    - - - -
    - -
    - -
    - HAS_PART (line 186) -
    - - - -
    - void - - HAS_PART - - () -
    - - - -
    - -
    - -
    - HAS_VERSION (line 192) -
    - - - -
    - void - - HAS_VERSION - - () -
    - - - -
    - -
    - -
    - IDENTIFIER (line 53) -
    - - - -
    - void - - IDENTIFIER - - () -
    - - - -
    - -
    - -
    - IMAGE (line 430) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMT (line 326) -
    - - - -
    - void - - IMT - - () -
    - - - -
    - -
    - -
    - INTERACTIVE_RESOURCE (line 436) -
    - - - -
    - void - - INTERACTIVE_RESOURCE - - () -
    - - - -
    - -
    - -
    - ISO639_2 (line 338) -
    - - - -
    - void - - ISO639_2 - - () -
    - - - -
    - -
    - -
    - ISO3166 (line 332) -
    - - - -
    - void - - ISO3166 - - () -
    - - - -
    - -
    - -
    - ISSUED (line 228) -
    - - - -
    - void - - ISSUED - - () -
    - - - -
    - -
    - -
    - IS_FORMAT_OF (line 198) -
    - - - -
    - void - - IS_FORMAT_OF - - () -
    - - - -
    - -
    - -
    - IS_PART_OF (line 204) -
    - - - -
    - void - - IS_PART_OF - - () -
    - - - -
    - -
    - -
    - IS_REFERENCED_BY (line 210) -
    - - - -
    - void - - IS_REFERENCED_BY - - () -
    - - - -
    - -
    - -
    - IS_REPLACED_BY (line 216) -
    - - - -
    - void - - IS_REPLACED_BY - - () -
    - - - -
    - -
    - -
    - IS_REQUIRED_BY (line 222) -
    - - - -
    - void - - IS_REQUIRED_BY - - () -
    - - - -
    - -
    - -
    - IS_VERSION_OF (line 234) -
    - - - -
    - void - - IS_VERSION_OF - - () -
    - - - -
    - -
    - -
    - LANGUAGE (line 59) -
    - - - -
    - void - - LANGUAGE - - () -
    - - - -
    - -
    - -
    - LCC (line 344) -
    - - - -
    - void - - LCC - - () -
    - - - -
    - -
    - -
    - LCSH (line 350) -
    - - - -
    - void - - LCSH - - () -
    - - - -
    - -
    - -
    - LICENSE (line 240) -
    - - - -
    - void - - LICENSE - - () -
    - - - -
    - -
    - -
    - MEDIATOR (line 246) -
    - - - -
    - void - - MEDIATOR - - () -
    - - - -
    - -
    - -
    - MEDIUM (line 252) -
    - - - -
    - void - - MEDIUM - - () -
    - - - -
    - -
    - -
    - MESH (line 356) -
    - - - -
    - void - - MESH - - () -
    - - - -
    - -
    - -
    - MODIFIED (line 258) -
    - - - -
    - void - - MODIFIED - - () -
    - - - -
    - -
    - -
    - MOVINGIMAGE (line 442) -
    - - - -
    - void - - MOVINGIMAGE - - () -
    - - - -
    - -
    - -
    - PERIOD (line 362) -
    - - - -
    - void - - PERIOD - - () -
    - - - -
    - -
    - -
    - PHYSICALOBJECT (line 448) -
    - - - -
    - void - - PHYSICALOBJECT - - () -
    - - - -
    - -
    - -
    - POINT (line 368) -
    - - - -
    - void - - POINT - - () -
    - - - -
    - -
    - -
    - PUBLISHER (line 65) -
    - - - -
    - void - - PUBLISHER - - () -
    - - - -
    - -
    - -
    - REFERENCES (line 264) -
    - - - -
    - void - - REFERENCES - - () -
    - - - -
    - -
    - -
    - REPLACES (line 270) -
    - - - -
    - void - - REPLACES - - () -
    - - - -
    - -
    - -
    - REQUIRES (line 276) -
    - - - -
    - void - - REQUIRES - - () -
    - - - -
    - -
    - -
    - RFC1766 (line 374) -
    - - - -
    - void - - RFC1766 - - () -
    - - - -
    - -
    - -
    - RFC3066 (line 380) -
    - - - -
    - void - - RFC3066 - - () -
    - - - -
    - -
    - -
    - RIGHTS (line 71) -
    - - - -
    - void - - RIGHTS - - () -
    - - - -
    - -
    - -
    - RIGHTS_HOLDER (line 282) -
    - - - -
    - void - - RIGHTS_HOLDER - - () -
    - - - -
    - -
    - -
    - SERVICE (line 454) -
    - - - -
    - void - - SERVICE - - () -
    - - - -
    - -
    - -
    - SOFTWARE (line 460) -
    - - - -
    - void - - SOFTWARE - - () -
    - - - -
    - -
    - -
    - SOUND (line 466) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 77) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - SPATIAL (line 288) -
    - - - -
    - void - - SPATIAL - - () -
    - - - -
    - -
    - -
    - STILLIMAGE (line 472) -
    - - - -
    - void - - STILLIMAGE - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 83) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TABLE_OF_CONTENTS (line 294) -
    - - - -
    - void - - TABLE_OF_CONTENTS - - () -
    - - - -
    - -
    - -
    - TEMPORAL (line 300) -
    - - - -
    - void - - TEMPORAL - - () -
    - - - -
    - -
    - -
    - TEXT (line 478) -
    - - - -
    - void - - TEXT - - () -
    - - - -
    - -
    - -
    - TGN (line 386) -
    - - - -
    - void - - TGN - - () -
    - - - -
    - -
    - -
    - TITLE (line 89) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TYPE (line 95) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    - -
    - UDC (line 392) -
    - - - -
    - void - - UDC - - () -
    - - - -
    - -
    - -
    - URI (line 398) -
    - - - -
    - void - - URI - - () -
    - - - -
    - -
    - -
    - VALID (line 306) -
    - - - -
    - void - - VALID - - () -
    - - - -
    - -
    - -
    - W3CDTF (line 404) -
    - - - -
    - void - - W3CDTF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF.html deleted file mode 100755 index e55df2b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF.html +++ /dev/null @@ -1,1713 +0,0 @@ - - - - - - Docs For Class FOAF - - - - -
    -

    Class FOAF

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: FOAF.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/FOAF_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ACCOUNT_NAME - () -
    - -
    - void - ACCOUNT_SERVICE_HOMEPAGE - () -
    - -
    - void - AGENT - () -
    - -
    - void - AIM_CHAT_ID - () -
    - -
    - void - BASED_NEAR - () -
    - -
    - void - CURRENT_PROJECT - () -
    - -
    - void - DEPICTION - () -
    - -
    - void - DEPICTS - () -
    - -
    - void - DNA_CHECKSUM - () -
    - -
    - void - DOCUMENT - () -
    - -
    - void - FAMILY_NAME - () -
    - -
    - void - FIRST_NAME - () -
    - -
    - void - FUNDED_BY - () -
    - -
    - void - GEEKCODE - () -
    - -
    - void - GENDER - () -
    - -
    - void - GIVENNAME - () -
    - -
    - void - GROUP - () -
    - -
    - void - HOLDS_ACCOUNT - () -
    - -
    - void - HOMEPAGE - () -
    - -
    - void - ICQ_CHAT_ID - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMG - () -
    - -
    - void - INTEREST - () -
    - -
    - void - JABBER_ID - () -
    - -
    - void - KNOWS - () -
    - -
    - void - LOGO - () -
    - -
    - void - MADE - () -
    - -
    - void - MAKER - () -
    - -
    - void - MBOX - () -
    - -
    - void - MBOX_SHA1SUM - () -
    - -
    - void - MEMBER - () -
    - -
    - void - MEMBERSHIP_CLASS - () -
    - -
    - void - MSN_CHAT_ID - () -
    - -
    - void - MYERS_BRIGGS - () -
    - -
    - void - NAME - () -
    - -
    - void - NICK - () -
    - -
    - void - ONLINE_ACCOUNT - () -
    - -
    - void - ONLINE_CHAT_ACCOUNT - () -
    - -
    - void - ONLINE_ECOMMERCE_ACCOUNT - () -
    - -
    - void - ONLINE_GAMING_ACCOUNT - () -
    - -
    - void - ORGANIZATION - () -
    - -
    - void - PAGE - () -
    - -
    - void - PAST_PROJECT - () -
    - -
    - void - PERSON - () -
    - -
    - void - PERSONAL_PROFILE_DOCUMENT - () -
    - -
    - void - PHONE - () -
    - -
    - void - PLAN - () -
    - -
    - void - PRIMARY_TOPIC - () -
    - -
    - void - PROJECT - () -
    - -
    - void - PUBLICATIONS - () -
    - -
    - void - SCHOOL_HOMEPAGE - () -
    - -
    - void - SHA1 - () -
    - -
    - void - SURNAME - () -
    - -
    - void - THEME - () -
    - -
    - void - THUMBNAIL - () -
    - -
    - void - TIPJAR - () -
    - -
    - void - TITLE - () -
    - -
    - void - TOPIC - () -
    - -
    - void - TOPIC_INTEREST - () -
    - -
    - void - WEBLOG - () -
    - -
    - void - WORKPLACE_HOMEPAGE - () -
    - -
    - void - WORK_INFO_HOMEPAGE - () -
    - -
    - void - YAHOO_CHAT_ID - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ACCOUNT_NAME (line 91) -
    - - - -
    - void - - ACCOUNT_NAME - - () -
    - - - -
    - -
    - -
    - ACCOUNT_SERVICE_HOMEPAGE (line 97) -
    - - - -
    - void - - ACCOUNT_SERVICE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - AGENT (line 19) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - AIM_CHAT_ID (line 103) -
    - - - -
    - void - - AIM_CHAT_ID - - () -
    - - - -
    - -
    - -
    - BASED_NEAR (line 109) -
    - - - -
    - void - - BASED_NEAR - - () -
    - - - -
    - -
    - -
    - CURRENT_PROJECT (line 115) -
    - - - -
    - void - - CURRENT_PROJECT - - () -
    - - - -
    - -
    - -
    - DEPICTION (line 121) -
    - - - -
    - void - - DEPICTION - - () -
    - - - -
    - -
    - -
    - DEPICTS (line 127) -
    - - - -
    - void - - DEPICTS - - () -
    - - - -
    - -
    - -
    - DNA_CHECKSUM (line 133) -
    - - - -
    - void - - DNA_CHECKSUM - - () -
    - - - -
    - -
    - -
    - DOCUMENT (line 25) -
    - - - -
    - void - - DOCUMENT - - () -
    - - - -
    - -
    - -
    - FAMILY_NAME (line 139) -
    - - - -
    - void - - FAMILY_NAME - - () -
    - - - -
    - -
    - -
    - FIRST_NAME (line 145) -
    - - - -
    - void - - FIRST_NAME - - () -
    - - - -
    - -
    - -
    - FUNDED_BY (line 151) -
    - - - -
    - void - - FUNDED_BY - - () -
    - - - -
    - -
    - -
    - GEEKCODE (line 157) -
    - - - -
    - void - - GEEKCODE - - () -
    - - - -
    - -
    - -
    - GENDER (line 163) -
    - - - -
    - void - - GENDER - - () -
    - - - -
    - -
    - -
    - GIVENNAME (line 169) -
    - - - -
    - void - - GIVENNAME - - () -
    - - - -
    - -
    - -
    - GROUP (line 31) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - HOLDS_ACCOUNT (line 175) -
    - - - -
    - void - - HOLDS_ACCOUNT - - () -
    - - - -
    - -
    - -
    - HOMEPAGE (line 181) -
    - - - -
    - void - - HOMEPAGE - - () -
    - - - -
    - -
    - -
    - ICQ_CHAT_ID (line 187) -
    - - - -
    - void - - ICQ_CHAT_ID - - () -
    - - - -
    - -
    - -
    - IMAGE (line 37) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMG (line 193) -
    - - - -
    - void - - IMG - - () -
    - - - -
    - -
    - -
    - INTEREST (line 199) -
    - - - -
    - void - - INTEREST - - () -
    - - - -
    - -
    - -
    - JABBER_ID (line 205) -
    - - - -
    - void - - JABBER_ID - - () -
    - - - -
    - -
    - -
    - KNOWS (line 211) -
    - - - -
    - void - - KNOWS - - () -
    - - - -
    - -
    - -
    - LOGO (line 217) -
    - - - -
    - void - - LOGO - - () -
    - - - -
    - -
    - -
    - MADE (line 223) -
    - - - -
    - void - - MADE - - () -
    - - - -
    - -
    - -
    - MAKER (line 229) -
    - - - -
    - void - - MAKER - - () -
    - - - -
    - -
    - -
    - MBOX (line 235) -
    - - - -
    - void - - MBOX - - () -
    - - - -
    - -
    - -
    - MBOX_SHA1SUM (line 241) -
    - - - -
    - void - - MBOX_SHA1SUM - - () -
    - - - -
    - -
    - -
    - MEMBER (line 247) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - MEMBERSHIP_CLASS (line 253) -
    - - - -
    - void - - MEMBERSHIP_CLASS - - () -
    - - - -
    - -
    - -
    - MSN_CHAT_ID (line 259) -
    - - - -
    - void - - MSN_CHAT_ID - - () -
    - - - -
    - -
    - -
    - MYERS_BRIGGS (line 265) -
    - - - -
    - void - - MYERS_BRIGGS - - () -
    - - - -
    - -
    - -
    - NAME (line 271) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICK (line 277) -
    - - - -
    - void - - NICK - - () -
    - - - -
    - -
    - -
    - ONLINE_ACCOUNT (line 43) -
    - - - -
    - void - - ONLINE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_CHAT_ACCOUNT (line 49) -
    - - - -
    - void - - ONLINE_CHAT_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_ECOMMERCE_ACCOUNT (line 55) -
    - - - -
    - void - - ONLINE_ECOMMERCE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_GAMING_ACCOUNT (line 61) -
    - - - -
    - void - - ONLINE_GAMING_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ORGANIZATION (line 67) -
    - - - -
    - void - - ORGANIZATION - - () -
    - - - -
    - -
    - -
    - PAGE (line 283) -
    - - - -
    - void - - PAGE - - () -
    - - - -
    - -
    - -
    - PAST_PROJECT (line 289) -
    - - - -
    - void - - PAST_PROJECT - - () -
    - - - -
    - -
    - -
    - PERSON (line 73) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - PERSONAL_PROFILE_DOCUMENT (line 79) -
    - - - -
    - void - - PERSONAL_PROFILE_DOCUMENT - - () -
    - - - -
    - -
    - -
    - PHONE (line 295) -
    - - - -
    - void - - PHONE - - () -
    - - - -
    - -
    - -
    - PLAN (line 301) -
    - - - -
    - void - - PLAN - - () -
    - - - -
    - -
    - -
    - PRIMARY_TOPIC (line 307) -
    - - - -
    - void - - PRIMARY_TOPIC - - () -
    - - - -
    - -
    - -
    - PROJECT (line 85) -
    - - - -
    - void - - PROJECT - - () -
    - - - -
    - -
    - -
    - PUBLICATIONS (line 313) -
    - - - -
    - void - - PUBLICATIONS - - () -
    - - - -
    - -
    - -
    - SCHOOL_HOMEPAGE (line 319) -
    - - - -
    - void - - SCHOOL_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - SHA1 (line 325) -
    - - - -
    - void - - SHA1 - - () -
    - - - -
    - -
    - -
    - SURNAME (line 331) -
    - - - -
    - void - - SURNAME - - () -
    - - - -
    - -
    - -
    - THEME (line 337) -
    - - - -
    - void - - THEME - - () -
    - - - -
    - -
    - -
    - THUMBNAIL (line 343) -
    - - - -
    - void - - THUMBNAIL - - () -
    - - - -
    - -
    - -
    - TIPJAR (line 349) -
    - - - -
    - void - - TIPJAR - - () -
    - - - -
    - -
    - -
    - TITLE (line 355) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TOPIC (line 361) -
    - - - -
    - void - - TOPIC - - () -
    - - - -
    - -
    - -
    - TOPIC_INTEREST (line 367) -
    - - - -
    - void - - TOPIC_INTEREST - - () -
    - - - -
    - -
    - -
    - WEBLOG (line 373) -
    - - - -
    - void - - WEBLOG - - () -
    - - - -
    - -
    - -
    - WORKPLACE_HOMEPAGE (line 385) -
    - - - -
    - void - - WORKPLACE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - WORK_INFO_HOMEPAGE (line 379) -
    - - - -
    - void - - WORK_INFO_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - YAHOO_CHAT_ID (line 391) -
    - - - -
    - void - - YAHOO_CHAT_ID - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF_RES.html deleted file mode 100755 index 39aefda8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/FOAF_RES.html +++ /dev/null @@ -1,1713 +0,0 @@ - - - - - - Docs For Class FOAF_RES - - - - -
    -

    Class FOAF_RES

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (ResResource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: FOAF_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/FOAF_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ACCOUNT_NAME - () -
    - -
    - void - ACCOUNT_SERVICE_HOMEPAGE - () -
    - -
    - void - AGENT - () -
    - -
    - void - AIM_CHAT_ID - () -
    - -
    - void - BASED_NEAR - () -
    - -
    - void - CURRENT_PROJECT - () -
    - -
    - void - DEPICTION - () -
    - -
    - void - DEPICTS - () -
    - -
    - void - DNA_CHECKSUM - () -
    - -
    - void - DOCUMENT - () -
    - -
    - void - FAMILY_NAME - () -
    - -
    - void - FIRST_NAME - () -
    - -
    - void - FUNDED_BY - () -
    - -
    - void - GEEKCODE - () -
    - -
    - void - GENDER - () -
    - -
    - void - GIVENNAME - () -
    - -
    - void - GROUP - () -
    - -
    - void - HOLDS_ACCOUNT - () -
    - -
    - void - HOMEPAGE - () -
    - -
    - void - ICQ_CHAT_ID - () -
    - -
    - void - IMAGE - () -
    - -
    - void - IMG - () -
    - -
    - void - INTEREST - () -
    - -
    - void - JABBER_ID - () -
    - -
    - void - KNOWS - () -
    - -
    - void - LOGO - () -
    - -
    - void - MADE - () -
    - -
    - void - MAKER - () -
    - -
    - void - MBOX - () -
    - -
    - void - MBOX_SHA1SUM - () -
    - -
    - void - MEMBER - () -
    - -
    - void - MEMBERSHIP_CLASS - () -
    - -
    - void - MSN_CHAT_ID - () -
    - -
    - void - MYERS_BRIGGS - () -
    - -
    - void - NAME - () -
    - -
    - void - NICK - () -
    - -
    - void - ONLINE_ACCOUNT - () -
    - -
    - void - ONLINE_CHAT_ACCOUNT - () -
    - -
    - void - ONLINE_ECOMMERCE_ACCOUNT - () -
    - -
    - void - ONLINE_GAMING_ACCOUNT - () -
    - -
    - void - ORGANIZATION - () -
    - -
    - void - PAGE - () -
    - -
    - void - PAST_PROJECT - () -
    - -
    - void - PERSON - () -
    - -
    - void - PERSONAL_PROFILE_DOCUMENT - () -
    - -
    - void - PHONE - () -
    - -
    - void - PLAN - () -
    - -
    - void - PRIMARY_TOPIC - () -
    - -
    - void - PROJECT - () -
    - -
    - void - PUBLICATIONS - () -
    - -
    - void - SCHOOL_HOMEPAGE - () -
    - -
    - void - SHA1 - () -
    - -
    - void - SURNAME - () -
    - -
    - void - THEME - () -
    - -
    - void - THUMBNAIL - () -
    - -
    - void - TIPJAR - () -
    - -
    - void - TITLE - () -
    - -
    - void - TOPIC - () -
    - -
    - void - TOPIC_INTEREST - () -
    - -
    - void - WEBLOG - () -
    - -
    - void - WORKPLACE_HOMEPAGE - () -
    - -
    - void - WORK_INFO_HOMEPAGE - () -
    - -
    - void - YAHOO_CHAT_ID - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ACCOUNT_NAME (line 90) -
    - - - -
    - void - - ACCOUNT_NAME - - () -
    - - - -
    - -
    - -
    - ACCOUNT_SERVICE_HOMEPAGE (line 96) -
    - - - -
    - void - - ACCOUNT_SERVICE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - AGENT (line 18) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - AIM_CHAT_ID (line 102) -
    - - - -
    - void - - AIM_CHAT_ID - - () -
    - - - -
    - -
    - -
    - BASED_NEAR (line 108) -
    - - - -
    - void - - BASED_NEAR - - () -
    - - - -
    - -
    - -
    - CURRENT_PROJECT (line 114) -
    - - - -
    - void - - CURRENT_PROJECT - - () -
    - - - -
    - -
    - -
    - DEPICTION (line 120) -
    - - - -
    - void - - DEPICTION - - () -
    - - - -
    - -
    - -
    - DEPICTS (line 126) -
    - - - -
    - void - - DEPICTS - - () -
    - - - -
    - -
    - -
    - DNA_CHECKSUM (line 132) -
    - - - -
    - void - - DNA_CHECKSUM - - () -
    - - - -
    - -
    - -
    - DOCUMENT (line 24) -
    - - - -
    - void - - DOCUMENT - - () -
    - - - -
    - -
    - -
    - FAMILY_NAME (line 138) -
    - - - -
    - void - - FAMILY_NAME - - () -
    - - - -
    - -
    - -
    - FIRST_NAME (line 144) -
    - - - -
    - void - - FIRST_NAME - - () -
    - - - -
    - -
    - -
    - FUNDED_BY (line 150) -
    - - - -
    - void - - FUNDED_BY - - () -
    - - - -
    - -
    - -
    - GEEKCODE (line 156) -
    - - - -
    - void - - GEEKCODE - - () -
    - - - -
    - -
    - -
    - GENDER (line 162) -
    - - - -
    - void - - GENDER - - () -
    - - - -
    - -
    - -
    - GIVENNAME (line 168) -
    - - - -
    - void - - GIVENNAME - - () -
    - - - -
    - -
    - -
    - GROUP (line 30) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - HOLDS_ACCOUNT (line 174) -
    - - - -
    - void - - HOLDS_ACCOUNT - - () -
    - - - -
    - -
    - -
    - HOMEPAGE (line 180) -
    - - - -
    - void - - HOMEPAGE - - () -
    - - - -
    - -
    - -
    - ICQ_CHAT_ID (line 186) -
    - - - -
    - void - - ICQ_CHAT_ID - - () -
    - - - -
    - -
    - -
    - IMAGE (line 36) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - IMG (line 192) -
    - - - -
    - void - - IMG - - () -
    - - - -
    - -
    - -
    - INTEREST (line 198) -
    - - - -
    - void - - INTEREST - - () -
    - - - -
    - -
    - -
    - JABBER_ID (line 204) -
    - - - -
    - void - - JABBER_ID - - () -
    - - - -
    - -
    - -
    - KNOWS (line 210) -
    - - - -
    - void - - KNOWS - - () -
    - - - -
    - -
    - -
    - LOGO (line 216) -
    - - - -
    - void - - LOGO - - () -
    - - - -
    - -
    - -
    - MADE (line 222) -
    - - - -
    - void - - MADE - - () -
    - - - -
    - -
    - -
    - MAKER (line 228) -
    - - - -
    - void - - MAKER - - () -
    - - - -
    - -
    - -
    - MBOX (line 234) -
    - - - -
    - void - - MBOX - - () -
    - - - -
    - -
    - -
    - MBOX_SHA1SUM (line 240) -
    - - - -
    - void - - MBOX_SHA1SUM - - () -
    - - - -
    - -
    - -
    - MEMBER (line 246) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - MEMBERSHIP_CLASS (line 252) -
    - - - -
    - void - - MEMBERSHIP_CLASS - - () -
    - - - -
    - -
    - -
    - MSN_CHAT_ID (line 258) -
    - - - -
    - void - - MSN_CHAT_ID - - () -
    - - - -
    - -
    - -
    - MYERS_BRIGGS (line 264) -
    - - - -
    - void - - MYERS_BRIGGS - - () -
    - - - -
    - -
    - -
    - NAME (line 270) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICK (line 276) -
    - - - -
    - void - - NICK - - () -
    - - - -
    - -
    - -
    - ONLINE_ACCOUNT (line 42) -
    - - - -
    - void - - ONLINE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_CHAT_ACCOUNT (line 48) -
    - - - -
    - void - - ONLINE_CHAT_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_ECOMMERCE_ACCOUNT (line 54) -
    - - - -
    - void - - ONLINE_ECOMMERCE_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ONLINE_GAMING_ACCOUNT (line 60) -
    - - - -
    - void - - ONLINE_GAMING_ACCOUNT - - () -
    - - - -
    - -
    - -
    - ORGANIZATION (line 66) -
    - - - -
    - void - - ORGANIZATION - - () -
    - - - -
    - -
    - -
    - PAGE (line 282) -
    - - - -
    - void - - PAGE - - () -
    - - - -
    - -
    - -
    - PAST_PROJECT (line 288) -
    - - - -
    - void - - PAST_PROJECT - - () -
    - - - -
    - -
    - -
    - PERSON (line 72) -
    - - - -
    - void - - PERSON - - () -
    - - - -
    - -
    - -
    - PERSONAL_PROFILE_DOCUMENT (line 78) -
    - - - -
    - void - - PERSONAL_PROFILE_DOCUMENT - - () -
    - - - -
    - -
    - -
    - PHONE (line 294) -
    - - - -
    - void - - PHONE - - () -
    - - - -
    - -
    - -
    - PLAN (line 300) -
    - - - -
    - void - - PLAN - - () -
    - - - -
    - -
    - -
    - PRIMARY_TOPIC (line 306) -
    - - - -
    - void - - PRIMARY_TOPIC - - () -
    - - - -
    - -
    - -
    - PROJECT (line 84) -
    - - - -
    - void - - PROJECT - - () -
    - - - -
    - -
    - -
    - PUBLICATIONS (line 312) -
    - - - -
    - void - - PUBLICATIONS - - () -
    - - - -
    - -
    - -
    - SCHOOL_HOMEPAGE (line 318) -
    - - - -
    - void - - SCHOOL_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - SHA1 (line 324) -
    - - - -
    - void - - SHA1 - - () -
    - - - -
    - -
    - -
    - SURNAME (line 330) -
    - - - -
    - void - - SURNAME - - () -
    - - - -
    - -
    - -
    - THEME (line 336) -
    - - - -
    - void - - THEME - - () -
    - - - -
    - -
    - -
    - THUMBNAIL (line 342) -
    - - - -
    - void - - THUMBNAIL - - () -
    - - - -
    - -
    - -
    - TIPJAR (line 348) -
    - - - -
    - void - - TIPJAR - - () -
    - - - -
    - -
    - -
    - TITLE (line 354) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TOPIC (line 360) -
    - - - -
    - void - - TOPIC - - () -
    - - - -
    - -
    - -
    - TOPIC_INTEREST (line 366) -
    - - - -
    - void - - TOPIC_INTEREST - - () -
    - - - -
    - -
    - -
    - WEBLOG (line 372) -
    - - - -
    - void - - WEBLOG - - () -
    - - - -
    - -
    - -
    - WORKPLACE_HOMEPAGE (line 384) -
    - - - -
    - void - - WORKPLACE_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - WORK_INFO_HOMEPAGE (line 378) -
    - - - -
    - void - - WORK_INFO_HOMEPAGE - - () -
    - - - -
    - -
    - -
    - YAHOO_CHAT_ID (line 390) -
    - - - -
    - void - - YAHOO_CHAT_ID - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:14 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL.html deleted file mode 100755 index 226c5cfe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL.html +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class OWL - - - - -
    -

    Class OWL

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: OWL.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/OWL_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - OWL_CLASS - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 25) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 31) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 19) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 37) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 43) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 55) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 61) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 67) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 79) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 73) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 85) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 91) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 103) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 109) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 97) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 115) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 121) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 127) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 133) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 145) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 139) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 151) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 157) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 163) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 169) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 175) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NOTHING (line 181) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 187) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 193) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 199) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 205) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 217) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 211) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - OWL_CLASS (line 49) -
    - - - -
    - void - - OWL_CLASS - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 223) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 229) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 235) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 241) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 247) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 253) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 259) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 265) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 271) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 277) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 283) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 289) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 295) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL_RES.html deleted file mode 100755 index 8fa6ae0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/OWL_RES.html +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class OWL_RES - - - - -
    -

    Class OWL_RES

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: OWL_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/OWL_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ALL_DIFFERENT - () -
    - -
    - void - ALL_VALUES_FROM - () -
    - -
    - void - ANNOTATION_PROPERTY - () -
    - -
    - void - BACKWARD_COMPATIBLE_WITH - () -
    - -
    - void - CARDINALITY - () -
    - -
    - void - COMPLEMENT_OF - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DATATYPE_PROPERTY - () -
    - -
    - void - DATATYPE_RESTRICTION - () -
    - -
    - void - DATA_RANGE - () -
    - -
    - void - DEPRECATED_CLASS - () -
    - -
    - void - DEPRECATED_PROPERTY - () -
    - -
    - void - DIFFERENT_FROM - () -
    - -
    - void - DISJOINT_WITH - () -
    - -
    - void - DISTINCT_MEMBERS - () -
    - -
    - void - EQUIVALENT_CLASS - () -
    - -
    - void - EQUIVALENT_PROPERTY - () -
    - -
    - void - FUNCTIONAL_PROPERTY - () -
    - -
    - void - HAS_VALUE - () -
    - -
    - void - IMPORTS - () -
    - -
    - void - INCOMPATIBLE_WITH - () -
    - -
    - void - INTERSECTION_OF - () -
    - -
    - void - INVERSE_FUNCTIONAL_PROPERTY - () -
    - -
    - void - INVERSE_OF - () -
    - -
    - void - MAX_CARDINALITY - () -
    - -
    - void - MIN_CARDINALITY - () -
    - -
    - void - NOTHING - () -
    - -
    - void - OBJECT_CLASS - () -
    - -
    - void - OBJECT_PROPERTY - () -
    - -
    - void - OBJECT_RESTRICTION - () -
    - -
    - void - ONE_OF - () -
    - -
    - void - ONTOLOGY - () -
    - -
    - void - ON_PROPERTY - () -
    - -
    - void - OWL_CLASS - () -
    - -
    - void - PRIOR_VERSION - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RESTRICTION - () -
    - -
    - void - SAME_AS - () -
    - -
    - void - SAME_CLASS_AS - () -
    - -
    - void - SAME_INDIVIDUAL_AS - () -
    - -
    - void - SAME_PROPERTY_AS - () -
    - -
    - void - SOME_VALUES_FROM - () -
    - -
    - void - SYMMETRIC_PROPERTY - () -
    - -
    - void - THING - () -
    - -
    - void - TRANSITIVE_PROPERTY - () -
    - -
    - void - UNION_OF - () -
    - -
    - void - VERSION_INFO - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ALL_DIFFERENT (line 25) -
    - - - -
    - void - - ALL_DIFFERENT - - () -
    - - - -
    - -
    - -
    - ALL_VALUES_FROM (line 31) -
    - - - -
    - void - - ALL_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - ANNOTATION_PROPERTY (line 19) -
    - - - -
    - void - - ANNOTATION_PROPERTY - - () -
    - - - -
    - -
    - -
    - BACKWARD_COMPATIBLE_WITH (line 37) -
    - - - -
    - void - - BACKWARD_COMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - CARDINALITY (line 43) -
    - - - -
    - void - - CARDINALITY - - () -
    - - - -
    - -
    - -
    - COMPLEMENT_OF (line 55) -
    - - - -
    - void - - COMPLEMENT_OF - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 61) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DATATYPE_PROPERTY (line 67) -
    - - - -
    - void - - DATATYPE_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE_RESTRICTION (line 79) -
    - - - -
    - void - - DATATYPE_RESTRICTION - - () -
    - - - -
    - -
    - -
    - DATA_RANGE (line 73) -
    - - - -
    - void - - DATA_RANGE - - () -
    - - - -
    - -
    - -
    - DEPRECATED_CLASS (line 85) -
    - - - -
    - void - - DEPRECATED_CLASS - - () -
    - - - -
    - -
    - -
    - DEPRECATED_PROPERTY (line 91) -
    - - - -
    - void - - DEPRECATED_PROPERTY - - () -
    - - - -
    - -
    - -
    - DIFFERENT_FROM (line 103) -
    - - - -
    - void - - DIFFERENT_FROM - - () -
    - - - -
    - -
    - -
    - DISJOINT_WITH (line 109) -
    - - - -
    - void - - DISJOINT_WITH - - () -
    - - - -
    - -
    - -
    - DISTINCT_MEMBERS (line 97) -
    - - - -
    - void - - DISTINCT_MEMBERS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_CLASS (line 115) -
    - - - -
    - void - - EQUIVALENT_CLASS - - () -
    - - - -
    - -
    - -
    - EQUIVALENT_PROPERTY (line 121) -
    - - - -
    - void - - EQUIVALENT_PROPERTY - - () -
    - - - -
    - -
    - -
    - FUNCTIONAL_PROPERTY (line 127) -
    - - - -
    - void - - FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - HAS_VALUE (line 133) -
    - - - -
    - void - - HAS_VALUE - - () -
    - - - -
    - -
    - -
    - IMPORTS (line 145) -
    - - - -
    - void - - IMPORTS - - () -
    - - - -
    - -
    - -
    - INCOMPATIBLE_WITH (line 139) -
    - - - -
    - void - - INCOMPATIBLE_WITH - - () -
    - - - -
    - -
    - -
    - INTERSECTION_OF (line 151) -
    - - - -
    - void - - INTERSECTION_OF - - () -
    - - - -
    - -
    - -
    - INVERSE_FUNCTIONAL_PROPERTY (line 157) -
    - - - -
    - void - - INVERSE_FUNCTIONAL_PROPERTY - - () -
    - - - -
    - -
    - -
    - INVERSE_OF (line 163) -
    - - - -
    - void - - INVERSE_OF - - () -
    - - - -
    - -
    - -
    - MAX_CARDINALITY (line 169) -
    - - - -
    - void - - MAX_CARDINALITY - - () -
    - - - -
    - -
    - -
    - MIN_CARDINALITY (line 175) -
    - - - -
    - void - - MIN_CARDINALITY - - () -
    - - - -
    - -
    - -
    - NOTHING (line 181) -
    - - - -
    - void - - NOTHING - - () -
    - - - -
    - -
    - -
    - OBJECT_CLASS (line 187) -
    - - - -
    - void - - OBJECT_CLASS - - () -
    - - - -
    - -
    - -
    - OBJECT_PROPERTY (line 193) -
    - - - -
    - void - - OBJECT_PROPERTY - - () -
    - - - -
    - -
    - -
    - OBJECT_RESTRICTION (line 199) -
    - - - -
    - void - - OBJECT_RESTRICTION - - () -
    - - - -
    - -
    - -
    - ONE_OF (line 205) -
    - - - -
    - void - - ONE_OF - - () -
    - - - -
    - -
    - -
    - ONTOLOGY (line 217) -
    - - - -
    - void - - ONTOLOGY - - () -
    - - - -
    - -
    - -
    - ON_PROPERTY (line 211) -
    - - - -
    - void - - ON_PROPERTY - - () -
    - - - -
    - -
    - -
    - OWL_CLASS (line 49) -
    - - - -
    - void - - OWL_CLASS - - () -
    - - - -
    - -
    - -
    - PRIOR_VERSION (line 223) -
    - - - -
    - void - - PRIOR_VERSION - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 229) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RESTRICTION (line 235) -
    - - - -
    - void - - RESTRICTION - - () -
    - - - -
    - -
    - -
    - SAME_AS (line 241) -
    - - - -
    - void - - SAME_AS - - () -
    - - - -
    - -
    - -
    - SAME_CLASS_AS (line 247) -
    - - - -
    - void - - SAME_CLASS_AS - - () -
    - - - -
    - -
    - -
    - SAME_INDIVIDUAL_AS (line 253) -
    - - - -
    - void - - SAME_INDIVIDUAL_AS - - () -
    - - - -
    - -
    - -
    - SAME_PROPERTY_AS (line 259) -
    - - - -
    - void - - SAME_PROPERTY_AS - - () -
    - - - -
    - -
    - -
    - SOME_VALUES_FROM (line 265) -
    - - - -
    - void - - SOME_VALUES_FROM - - () -
    - - - -
    - -
    - -
    - SYMMETRIC_PROPERTY (line 271) -
    - - - -
    - void - - SYMMETRIC_PROPERTY - - () -
    - - - -
    - -
    - -
    - THING (line 277) -
    - - - -
    - void - - THING - - () -
    - - - -
    - -
    - -
    - TRANSITIVE_PROPERTY (line 283) -
    - - - -
    - void - - TRANSITIVE_PROPERTY - - () -
    - - - -
    - -
    - -
    - UNION_OF (line 289) -
    - - - -
    - void - - UNION_OF - - () -
    - - - -
    - -
    - -
    - VERSION_INFO (line 295) -
    - - - -
    - void - - VERSION_INFO - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:23 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF.html deleted file mode 100755 index 492170e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF.html +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - Docs For Class RDF - - - - -
    -

    Class RDF

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: RDF.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RDF_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABOUT - () -
    - -
    - void - ABOUT_EACH - () -
    - -
    - void - ABOUT_EACH_PREFIX - () -
    - -
    - void - ALT - () -
    - -
    - void - BAG - () -
    - -
    - void - BAG_ID - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - FIRST - () -
    - -
    - void - ID - () -
    - -
    - void - LI - () -
    - -
    - void - LITERAL - () -
    - -
    - void - NIL - () -
    - -
    - void - NODE_ID - () -
    - -
    - void - OBJECT - () -
    - -
    - void - PARSE_TYPE - () -
    - -
    - void - PARSE_TYPE_RESOURCE - () -
    - -
    - void - PREDICATE - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RDF_LIST - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - REST - () -
    - -
    - void - SEE_ALSO - () -
    - -
    - void - SEQ - () -
    - -
    - void - STATEMENT - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABOUT (line 109) -
    - - - -
    - void - - ABOUT - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH (line 115) -
    - - - -
    - void - - ABOUT_EACH - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH_PREFIX (line 121) -
    - - - -
    - void - - ABOUT_EACH_PREFIX - - () -
    - - - -
    - -
    - -
    - ALT (line 19) -
    - - - -
    - void - - ALT - - () -
    - - - -
    - -
    - -
    - BAG (line 25) -
    - - - -
    - void - - BAG - - () -
    - - - -
    - -
    - -
    - BAG_ID (line 127) -
    - - - -
    - void - - BAG_ID - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 169) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 97) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - FIRST (line 73) -
    - - - -
    - void - - FIRST - - () -
    - - - -
    - -
    - -
    - ID (line 103) -
    - - - -
    - void - - ID - - () -
    - - - -
    - -
    - -
    - LI (line 157) -
    - - - -
    - void - - LI - - () -
    - - - -
    - -
    - -
    - LITERAL (line 145) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - NIL (line 55) -
    - - - -
    - void - - NIL - - () -
    - - - -
    - -
    - -
    - NODE_ID (line 163) -
    - - - -
    - void - - NODE_ID - - () -
    - - - -
    - -
    - -
    - OBJECT (line 91) -
    - - - -
    - void - - OBJECT - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE (line 139) -
    - - - -
    - void - - PARSE_TYPE - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE_RESOURCE (line 151) -
    - - - -
    - void - - PARSE_TYPE_RESOURCE - - () -
    - - - -
    - -
    - -
    - PREDICATE (line 85) -
    - - - -
    - void - - PREDICATE - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 31) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RDF_LIST (line 49) -
    - - - -
    - void - - RDF_LIST - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 133) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - REST (line 67) -
    - - - -
    - void - - REST - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 175) -
    - - - -
    - void - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SEQ (line 37) -
    - - - -
    - void - - SEQ - - () -
    - - - -
    - -
    - -
    - STATEMENT (line 43) -
    - - - -
    - void - - STATEMENT - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 79) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TYPE (line 61) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:58 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS.html deleted file mode 100755 index fb5290ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - Docs For Class RDFS - - - - -
    -

    Class RDFS

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: RDFS.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RDFS_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - COMMENT - () -
    - -
    - void - CONTAINER - () -
    - - - -
    - void - DATATYPE - () -
    - -
    - void - DOMAIN - () -
    - -
    - void - IS_DEFINED_BY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LITERAL - () -
    - -
    - void - MEMBER - () -
    - -
    - void - RANGE - () -
    - -
    - void - RDFS_CLASS - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - SEEALSO - () -
    - -
    - void - SUB_CLASS_OF - () -
    - -
    - void - SUB_PROPERTY_OF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 84) -
    - - - -
    - void - - COMMENT - - () -
    - - - -
    - -
    - -
    - CONTAINER (line 42) -
    - - - -
    - void - - CONTAINER - - () -
    - - - -
    - -
    - -
    - CONTAINER_MEMBERSHIP_PROPERTY (line 48) -
    - - - -
    - void - - CONTAINER_MEMBERSHIP_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 36) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 66) -
    - - - -
    - void - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 102) -
    - - - -
    - void - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 78) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LITERAL (line 24) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - MEMBER (line 90) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - RANGE (line 72) -
    - - - -
    - void - - RANGE - - () -
    - - - -
    - -
    - -
    - RDFS_CLASS (line 30) -
    - - - -
    - void - - RDFS_CLASS - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 18) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - SEEALSO (line 96) -
    - - - -
    - void - - SEEALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 54) -
    - - - -
    - void - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 60) -
    - - - -
    - void - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS_RES.html deleted file mode 100755 index 228dd8f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDFS_RES.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - Docs For Class RDFS_RES - - - - -
    -

    Class RDFS_RES

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: RDFS_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RDFS_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - COMMENT - () -
    - -
    - void - CONTAINER - () -
    - - - -
    - void - DATATYPE - () -
    - -
    - void - DOMAIN - () -
    - -
    - void - IS_DEFINED_BY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LITERAL - () -
    - -
    - void - MEMBER - () -
    - -
    - void - RANGE - () -
    - -
    - void - RDFS_CLASS - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - SEEALSO - () -
    - -
    - void - SUB_CLASS_OF - () -
    - -
    - void - SUB_PROPERTY_OF - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - COMMENT (line 84) -
    - - - -
    - void - - COMMENT - - () -
    - - - -
    - -
    - -
    - CONTAINER (line 42) -
    - - - -
    - void - - CONTAINER - - () -
    - - - -
    - -
    - -
    - CONTAINER_MEMBERSHIP_PROPERTY (line 48) -
    - - - -
    - void - - CONTAINER_MEMBERSHIP_PROPERTY - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 36) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DOMAIN (line 66) -
    - - - -
    - void - - DOMAIN - - () -
    - - - -
    - -
    - -
    - IS_DEFINED_BY (line 102) -
    - - - -
    - void - - IS_DEFINED_BY - - () -
    - - - -
    - -
    - -
    - LABEL (line 78) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LITERAL (line 24) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - MEMBER (line 90) -
    - - - -
    - void - - MEMBER - - () -
    - - - -
    - -
    - -
    - RANGE (line 72) -
    - - - -
    - void - - RANGE - - () -
    - - - -
    - -
    - -
    - RDFS_CLASS (line 30) -
    - - - -
    - void - - RDFS_CLASS - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 18) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - SEEALSO (line 96) -
    - - - -
    - void - - SEEALSO - - () -
    - - - -
    - -
    - -
    - SUB_CLASS_OF (line 54) -
    - - - -
    - void - - SUB_CLASS_OF - - () -
    - - - -
    - -
    - -
    - SUB_PROPERTY_OF (line 60) -
    - - - -
    - void - - SUB_PROPERTY_OF - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF_RES.html deleted file mode 100755 index d782f20f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RDF_RES.html +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - Docs For Class RDF_RES - - - - -
    -

    Class RDF_RES

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: RDF_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RDF_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ABOUT - () -
    - -
    - void - ABOUT_EACH - () -
    - -
    - void - ABOUT_EACH_PREFIX - () -
    - -
    - void - ALT - () -
    - -
    - void - BAG - () -
    - -
    - void - BAG_ID - () -
    - -
    - void - DATATYPE - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - FIRST - () -
    - -
    - void - ID - () -
    - -
    - void - LI - () -
    - -
    - void - LITERAL - () -
    - -
    - void - NIL - () -
    - -
    - void - NODE_ID - () -
    - -
    - void - OBJECT - () -
    - -
    - void - PARSE_TYPE - () -
    - -
    - void - PARSE_TYPE_RESOURCE - () -
    - -
    - void - PREDICATE - () -
    - -
    - void - PROPERTY - () -
    - -
    - void - RDF_LIST - () -
    - -
    - void - RESOURCE - () -
    - -
    - void - REST - () -
    - -
    - void - SEE_ALSO - () -
    - -
    - void - SEQ - () -
    - -
    - void - STATEMENT - () -
    - -
    - void - SUBJECT - () -
    - -
    - void - TYPE - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ABOUT (line 109) -
    - - - -
    - void - - ABOUT - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH (line 115) -
    - - - -
    - void - - ABOUT_EACH - - () -
    - - - -
    - -
    - -
    - ABOUT_EACH_PREFIX (line 121) -
    - - - -
    - void - - ABOUT_EACH_PREFIX - - () -
    - - - -
    - -
    - -
    - ALT (line 19) -
    - - - -
    - void - - ALT - - () -
    - - - -
    - -
    - -
    - BAG (line 25) -
    - - - -
    - void - - BAG - - () -
    - - - -
    - -
    - -
    - BAG_ID (line 127) -
    - - - -
    - void - - BAG_ID - - () -
    - - - -
    - -
    - -
    - DATATYPE (line 169) -
    - - - -
    - void - - DATATYPE - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 97) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - FIRST (line 73) -
    - - - -
    - void - - FIRST - - () -
    - - - -
    - -
    - -
    - ID (line 103) -
    - - - -
    - void - - ID - - () -
    - - - -
    - -
    - -
    - LI (line 157) -
    - - - -
    - void - - LI - - () -
    - - - -
    - -
    - -
    - LITERAL (line 145) -
    - - - -
    - void - - LITERAL - - () -
    - - - -
    - -
    - -
    - NIL (line 55) -
    - - - -
    - void - - NIL - - () -
    - - - -
    - -
    - -
    - NODE_ID (line 163) -
    - - - -
    - void - - NODE_ID - - () -
    - - - -
    - -
    - -
    - OBJECT (line 91) -
    - - - -
    - void - - OBJECT - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE (line 139) -
    - - - -
    - void - - PARSE_TYPE - - () -
    - - - -
    - -
    - -
    - PARSE_TYPE_RESOURCE (line 151) -
    - - - -
    - void - - PARSE_TYPE_RESOURCE - - () -
    - - - -
    - -
    - -
    - PREDICATE (line 85) -
    - - - -
    - void - - PREDICATE - - () -
    - - - -
    - -
    - -
    - PROPERTY (line 31) -
    - - - -
    - void - - PROPERTY - - () -
    - - - -
    - -
    - -
    - RDF_LIST (line 49) -
    - - - -
    - void - - RDF_LIST - - () -
    - - - -
    - -
    - -
    - RESOURCE (line 133) -
    - - - -
    - void - - RESOURCE - - () -
    - - - -
    - -
    - -
    - REST (line 67) -
    - - - -
    - void - - REST - - () -
    - - - -
    - -
    - -
    - SEE_ALSO (line 175) -
    - - - -
    - void - - SEE_ALSO - - () -
    - - - -
    - -
    - -
    - SEQ (line 37) -
    - - - -
    - void - - SEQ - - () -
    - - - -
    - -
    - -
    - STATEMENT (line 43) -
    - - - -
    - void - - STATEMENT - - () -
    - - - -
    - -
    - -
    - SUBJECT (line 79) -
    - - - -
    - void - - SUBJECT - - () -
    - - - -
    - -
    - -
    - TYPE (line 61) -
    - - - -
    - void - - TYPE - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:00 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS.html deleted file mode 100755 index 6f4bebbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Docs For Class RSS - - - - -
    -

    Class RSS

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: RSS.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RSS_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - CHANNEL - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - IMAGE - () -
    - -
    - void - ITEM - () -
    - -
    - void - ITEMS - () -
    - -
    - void - LINK - () -
    - -
    - void - NAME - () -
    - -
    - void - TEXTINPUT - () -
    - -
    - void - TITLE - () -
    - -
    - void - URL - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - CHANNEL (line 18) -
    - - - -
    - void - - CHANNEL - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 66) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - IMAGE (line 24) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - ITEM (line 30) -
    - - - -
    - void - - ITEM - - () -
    - - - -
    - -
    - -
    - ITEMS (line 42) -
    - - - -
    - void - - ITEMS - - () -
    - - - -
    - -
    - -
    - LINK (line 54) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - NAME (line 72) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - TEXTINPUT (line 36) -
    - - - -
    - void - - TEXTINPUT - - () -
    - - - -
    - -
    - -
    - TITLE (line 48) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - URL (line 60) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:44 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS_RES.html deleted file mode 100755 index 2593d82a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/RSS_RES.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Docs For Class RSS_RES - - - - -
    -

    Class RSS_RES

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary (ResResource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: RSS_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/RSS_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - CHANNEL - () -
    - -
    - void - DESCRIPTION - () -
    - -
    - void - IMAGE - () -
    - -
    - void - ITEM - () -
    - -
    - void - ITEMS - () -
    - -
    - void - LINK - () -
    - -
    - void - NAME - () -
    - -
    - void - TEXTINPUT - () -
    - -
    - void - TITLE - () -
    - -
    - void - URL - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - CHANNEL (line 18) -
    - - - -
    - void - - CHANNEL - - () -
    - - - -
    - -
    - -
    - DESCRIPTION (line 66) -
    - - - -
    - void - - DESCRIPTION - - () -
    - - - -
    - -
    - -
    - IMAGE (line 24) -
    - - - -
    - void - - IMAGE - - () -
    - - - -
    - -
    - -
    - ITEM (line 30) -
    - - - -
    - void - - ITEM - - () -
    - - - -
    - -
    - -
    - ITEMS (line 42) -
    - - - -
    - void - - ITEMS - - () -
    - - - -
    - -
    - -
    - LINK (line 54) -
    - - - -
    - void - - LINK - - () -
    - - - -
    - -
    - -
    - NAME (line 72) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - TEXTINPUT (line 36) -
    - - - -
    - void - - TEXTINPUT - - () -
    - - - -
    - -
    - -
    - TITLE (line 48) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - URL (line 60) -
    - - - -
    - void - - URL - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD.html deleted file mode 100755 index 9180b9e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD.html +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class VCARD - - - - -
    -

    Class VCARD

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary (Resource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: VCARD.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/VCARD_C.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ADR - () -
    - -
    - void - ADRPROPERTIES - () -
    - -
    - void - ADRTYPES - () -
    - -
    - void - AGENT - () -
    - -
    - void - BDAY - () -
    - -
    - void - CATEGORIES - () -
    - -
    - void - COUNTRY - () -
    - -
    - void - EMAIL - () -
    - -
    - void - EMAILTYPES - () -
    - -
    - void - EXTADD - () -
    - -
    - void - FAMILY - () -
    - -
    - void - FN - () -
    - -
    - void - GEO - () -
    - -
    - void - GIVEN - () -
    - -
    - void - GROUP - () -
    - -
    - void - KEY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LOCALITY - () -
    - -
    - void - MAILER - () -
    - -
    - void - N - () -
    - -
    - void - NAME - () -
    - -
    - void - NICKNAME - () -
    - -
    - void - NPROPERTIES - () -
    - -
    - void - ORGNAME - () -
    - -
    - void - ORGPROPERTIES - () -
    - -
    - void - ORGUNIT - () -
    - -
    - void - OTHER - () -
    - -
    - void - PCODE - () -
    - -
    - void - PHOTO - () -
    - -
    - void - POBOX - () -
    - -
    - void - PREFIX - () -
    - -
    - void - PRODID - () -
    - -
    - void - REGION - () -
    - -
    - void - REV - () -
    - -
    - void - ROLE - () -
    - -
    - void - SORT_STRING - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - STREET - () -
    - -
    - void - SUFFIX - () -
    - -
    - void - TEL - () -
    - -
    - void - TELTYPES - () -
    - -
    - void - TITLE - () -
    - -
    - void - TZ - () -
    - -
    - void - TZTYPES - () -
    - -
    - void - UID - () -
    - -
    - void - VCARD_CLASS - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ADR (line 157) -
    - - - -
    - void - - ADR - - () -
    - - - -
    - -
    - -
    - ADRPROPERTIES (line 55) -
    - - - -
    - void - - ADRPROPERTIES - - () -
    - - - -
    - -
    - -
    - ADRTYPES (line 31) -
    - - - -
    - void - - ADRTYPES - - () -
    - - - -
    - -
    - -
    - AGENT (line 73) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - BDAY (line 85) -
    - - - -
    - void - - BDAY - - () -
    - - - -
    - -
    - -
    - CATEGORIES (line 109) -
    - - - -
    - void - - CATEGORIES - - () -
    - - - -
    - -
    - -
    - COUNTRY (line 217) -
    - - - -
    - void - - COUNTRY - - () -
    - - - -
    - -
    - -
    - EMAIL (line 187) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - EMAILTYPES (line 43) -
    - - - -
    - void - - EMAILTYPES - - () -
    - - - -
    - -
    - -
    - EXTADD (line 175) -
    - - - -
    - void - - EXTADD - - () -
    - - - -
    - -
    - -
    - FAMILY (line 193) -
    - - - -
    - void - - FAMILY - - () -
    - - - -
    - -
    - -
    - FN (line 139) -
    - - - -
    - void - - FN - - () -
    - - - -
    - -
    - -
    - GEO (line 169) -
    - - - -
    - void - - GEO - - () -
    - - - -
    - -
    - -
    - GIVEN (line 271) -
    - - - -
    - void - - GIVEN - - () -
    - - - -
    - -
    - -
    - GROUP (line 181) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - KEY (line 259) -
    - - - -
    - void - - KEY - - () -
    - - - -
    - -
    - -
    - LABEL (line 277) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LOCALITY (line 247) -
    - - - -
    - void - - LOCALITY - - () -
    - - - -
    - -
    - -
    - MAILER (line 235) -
    - - - -
    - void - - MAILER - - () -
    - - - -
    - -
    - -
    - N (line 115) -
    - - - -
    - void - - N - - () -
    - - - -
    - -
    - -
    - NAME (line 205) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICKNAME (line 289) -
    - - - -
    - void - - NICKNAME - - () -
    - - - -
    - -
    - -
    - NPROPERTIES (line 37) -
    - - - -
    - void - - NPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGNAME (line 103) -
    - - - -
    - void - - ORGNAME - - () -
    - - - -
    - -
    - -
    - ORGPROPERTIES (line 25) -
    - - - -
    - void - - ORGPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGUNIT (line 211) -
    - - - -
    - void - - ORGUNIT - - () -
    - - - -
    - -
    - -
    - OTHER (line 241) -
    - - - -
    - void - - OTHER - - () -
    - - - -
    - -
    - -
    - PCODE (line 121) -
    - - - -
    - void - - PCODE - - () -
    - - - -
    - -
    - -
    - PHOTO (line 133) -
    - - - -
    - void - - PHOTO - - () -
    - - - -
    - -
    - -
    - POBOX (line 253) -
    - - - -
    - void - - POBOX - - () -
    - - - -
    - -
    - -
    - PREFIX (line 127) -
    - - - -
    - void - - PREFIX - - () -
    - - - -
    - -
    - -
    - PRODID (line 265) -
    - - - -
    - void - - PRODID - - () -
    - - - -
    - -
    - -
    - REGION (line 163) -
    - - - -
    - void - - REGION - - () -
    - - - -
    - -
    - -
    - REV (line 91) -
    - - - -
    - void - - REV - - () -
    - - - -
    - -
    - -
    - ROLE (line 295) -
    - - - -
    - void - - ROLE - - () -
    - - - -
    - -
    - -
    - SORT_STRING (line 97) -
    - - - -
    - void - - SORT_STRING - - () -
    - - - -
    - -
    - -
    - SOUND (line 223) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 79) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - STREET (line 67) -
    - - - -
    - void - - STREET - - () -
    - - - -
    - -
    - -
    - SUFFIX (line 145) -
    - - - -
    - void - - SUFFIX - - () -
    - - - -
    - -
    - -
    - TEL (line 283) -
    - - - -
    - void - - TEL - - () -
    - - - -
    - -
    - -
    - TELTYPES (line 49) -
    - - - -
    - void - - TELTYPES - - () -
    - - - -
    - -
    - -
    - TITLE (line 229) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TZ (line 199) -
    - - - -
    - void - - TZ - - () -
    - - - -
    - -
    - -
    - TZTYPES (line 61) -
    - - - -
    - void - - TZTYPES - - () -
    - - - -
    - -
    - -
    - UID (line 19) -
    - - - -
    - void - - UID - - () -
    - - - -
    - -
    - -
    - VCARD_CLASS (line 151) -
    - - - -
    - void - - VCARD_CLASS - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:39 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD_RES.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD_RES.html deleted file mode 100755 index 655c0d7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/VCARD_RES.html +++ /dev/null @@ -1,1297 +0,0 @@ - - - - - - Docs For Class VCARD_RES - - - - -
    -

    Class VCARD_RES

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary (ResResource)

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: VCARD_RES.html 443 2007-06-01 16:25:38Z cax $
    • -
    -

    - Located in /vocabulary/VCARD_RES.php (line 16) -

    - - -
    
    -	
    -			
    -
    - - - - - -
    -
    Method Summary
    - -
    -
    - -
    - void - ADR - () -
    - -
    - void - ADRPROPERTIES - () -
    - -
    - void - ADRTYPES - () -
    - -
    - void - AGENT - () -
    - -
    - void - BDAY - () -
    - -
    - void - CATEGORIES - () -
    - -
    - void - COUNTRY - () -
    - -
    - void - EMAIL - () -
    - -
    - void - EMAILTYPES - () -
    - -
    - void - EXTADD - () -
    - -
    - void - FAMILY - () -
    - -
    - void - FN - () -
    - -
    - void - GEO - () -
    - -
    - void - GIVEN - () -
    - -
    - void - GROUP - () -
    - -
    - void - KEY - () -
    - -
    - void - LABEL - () -
    - -
    - void - LOCALITY - () -
    - -
    - void - MAILER - () -
    - -
    - void - N - () -
    - -
    - void - NAME - () -
    - -
    - void - NICKNAME - () -
    - -
    - void - NPROPERTIES - () -
    - -
    - void - ORGNAME - () -
    - -
    - void - ORGPROPERTIES - () -
    - -
    - void - ORGUNIT - () -
    - -
    - void - OTHER - () -
    - -
    - void - PCODE - () -
    - -
    - void - PHOTO - () -
    - -
    - void - POBOX - () -
    - -
    - void - PREFIX - () -
    - -
    - void - PRODID - () -
    - -
    - void - REGION - () -
    - -
    - void - REV - () -
    - -
    - void - ROLE - () -
    - -
    - void - SORT_STRING - () -
    - -
    - void - SOUND - () -
    - -
    - void - SOURCE - () -
    - -
    - void - STREET - () -
    - -
    - void - SUFFIX - () -
    - -
    - void - TEL - () -
    - -
    - void - TELTYPES - () -
    - -
    - void - TITLE - () -
    - -
    - void - TZ - () -
    - -
    - void - TZTYPES - () -
    - -
    - void - UID - () -
    - -
    - void - VCARD_CLASS - () -
    -
    -
    -
    - - - -
    -
    Methods
    - -
    - - -
    - -
    - ADR (line 157) -
    - - - -
    - void - - ADR - - () -
    - - - -
    - -
    - -
    - ADRPROPERTIES (line 55) -
    - - - -
    - void - - ADRPROPERTIES - - () -
    - - - -
    - -
    - -
    - ADRTYPES (line 31) -
    - - - -
    - void - - ADRTYPES - - () -
    - - - -
    - -
    - -
    - AGENT (line 73) -
    - - - -
    - void - - AGENT - - () -
    - - - -
    - -
    - -
    - BDAY (line 85) -
    - - - -
    - void - - BDAY - - () -
    - - - -
    - -
    - -
    - CATEGORIES (line 109) -
    - - - -
    - void - - CATEGORIES - - () -
    - - - -
    - -
    - -
    - COUNTRY (line 217) -
    - - - -
    - void - - COUNTRY - - () -
    - - - -
    - -
    - -
    - EMAIL (line 187) -
    - - - -
    - void - - EMAIL - - () -
    - - - -
    - -
    - -
    - EMAILTYPES (line 43) -
    - - - -
    - void - - EMAILTYPES - - () -
    - - - -
    - -
    - -
    - EXTADD (line 175) -
    - - - -
    - void - - EXTADD - - () -
    - - - -
    - -
    - -
    - FAMILY (line 193) -
    - - - -
    - void - - FAMILY - - () -
    - - - -
    - -
    - -
    - FN (line 139) -
    - - - -
    - void - - FN - - () -
    - - - -
    - -
    - -
    - GEO (line 169) -
    - - - -
    - void - - GEO - - () -
    - - - -
    - -
    - -
    - GIVEN (line 271) -
    - - - -
    - void - - GIVEN - - () -
    - - - -
    - -
    - -
    - GROUP (line 181) -
    - - - -
    - void - - GROUP - - () -
    - - - -
    - -
    - -
    - KEY (line 259) -
    - - - -
    - void - - KEY - - () -
    - - - -
    - -
    - -
    - LABEL (line 277) -
    - - - -
    - void - - LABEL - - () -
    - - - -
    - -
    - -
    - LOCALITY (line 247) -
    - - - -
    - void - - LOCALITY - - () -
    - - - -
    - -
    - -
    - MAILER (line 235) -
    - - - -
    - void - - MAILER - - () -
    - - - -
    - -
    - -
    - N (line 115) -
    - - - -
    - void - - N - - () -
    - - - -
    - -
    - -
    - NAME (line 205) -
    - - - -
    - void - - NAME - - () -
    - - - -
    - -
    - -
    - NICKNAME (line 289) -
    - - - -
    - void - - NICKNAME - - () -
    - - - -
    - -
    - -
    - NPROPERTIES (line 37) -
    - - - -
    - void - - NPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGNAME (line 103) -
    - - - -
    - void - - ORGNAME - - () -
    - - - -
    - -
    - -
    - ORGPROPERTIES (line 25) -
    - - - -
    - void - - ORGPROPERTIES - - () -
    - - - -
    - -
    - -
    - ORGUNIT (line 211) -
    - - - -
    - void - - ORGUNIT - - () -
    - - - -
    - -
    - -
    - OTHER (line 241) -
    - - - -
    - void - - OTHER - - () -
    - - - -
    - -
    - -
    - PCODE (line 121) -
    - - - -
    - void - - PCODE - - () -
    - - - -
    - -
    - -
    - PHOTO (line 133) -
    - - - -
    - void - - PHOTO - - () -
    - - - -
    - -
    - -
    - POBOX (line 253) -
    - - - -
    - void - - POBOX - - () -
    - - - -
    - -
    - -
    - PREFIX (line 127) -
    - - - -
    - void - - PREFIX - - () -
    - - - -
    - -
    - -
    - PRODID (line 265) -
    - - - -
    - void - - PRODID - - () -
    - - - -
    - -
    - -
    - REGION (line 163) -
    - - - -
    - void - - REGION - - () -
    - - - -
    - -
    - -
    - REV (line 91) -
    - - - -
    - void - - REV - - () -
    - - - -
    - -
    - -
    - ROLE (line 295) -
    - - - -
    - void - - ROLE - - () -
    - - - -
    - -
    - -
    - SORT_STRING (line 97) -
    - - - -
    - void - - SORT_STRING - - () -
    - - - -
    - -
    - -
    - SOUND (line 223) -
    - - - -
    - void - - SOUND - - () -
    - - - -
    - -
    - -
    - SOURCE (line 79) -
    - - - -
    - void - - SOURCE - - () -
    - - - -
    - -
    - -
    - STREET (line 67) -
    - - - -
    - void - - STREET - - () -
    - - - -
    - -
    - -
    - SUFFIX (line 145) -
    - - - -
    - void - - SUFFIX - - () -
    - - - -
    - -
    - -
    - TEL (line 283) -
    - - - -
    - void - - TEL - - () -
    - - - -
    - -
    - -
    - TELTYPES (line 49) -
    - - - -
    - void - - TELTYPES - - () -
    - - - -
    - -
    - -
    - TITLE (line 229) -
    - - - -
    - void - - TITLE - - () -
    - - - -
    - -
    - -
    - TZ (line 199) -
    - - - -
    - void - - TZ - - () -
    - - - -
    - -
    - -
    - TZTYPES (line 61) -
    - - - -
    - void - - TZTYPES - - () -
    - - - -
    - -
    - -
    - UID (line 19) -
    - - - -
    - void - - UID - - () -
    - - - -
    - -
    - -
    - VCARD_CLASS (line 151) -
    - - - -
    - void - - VCARD_CLASS - - () -
    - - - -
    - -
    -
    - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_C.php.html deleted file mode 100755 index 3c7d1360..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ATOM_C.php - - - - -
    -

    /vocabulary/ATOM_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ATOM - - ATOM Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_RES.php.html deleted file mode 100755 index 27d90945..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---ATOM_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page ATOM_RES.php - - - - -
    -

    /vocabulary/ATOM_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - ATOM_RES - - ATOM Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:31 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_C.php.html deleted file mode 100755 index 9f469bc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page DC_C.php - - - - -
    -

    /vocabulary/DC_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DC - - Dublin Core Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:53 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_RES.php.html deleted file mode 100755 index 6348d693..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---DC_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page DC_RES.php - - - - -
    -

    /vocabulary/DC_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - DC_RES - - Dublin Core Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:48:56 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF.php.html deleted file mode 100755 index f3a7d83f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page FOAF.php - - - - -
    -

    /vocabulary/FOAF.php

    - - -
    -
    Description
    - -
    - -

    Friend of a Friend (FOAF) Vocabulary (Resource)

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: _vocabulary---FOAF.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:08 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_C.php.html deleted file mode 100755 index de6f2f87..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FOAF_C.php - - - - -
    -

    /vocabulary/FOAF_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FOAF - - Friend of a Friend (FOAF) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:10 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_RES.php.html deleted file mode 100755 index f6603c0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---FOAF_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page FOAF_RES.php - - - - -
    -

    /vocabulary/FOAF_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - FOAF_RES - - Friend of a Friend (FOAF) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:49:12 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL.php.html deleted file mode 100755 index e66779f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page OWL.php - - - - -
    -

    /vocabulary/OWL.php

    - - -
    -
    Description
    - -
    - -

    OWL Vocabulary

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: _vocabulary---OWL.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:15 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_C.php.html deleted file mode 100755 index 00513351..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWL_C.php - - - - -
    -

    /vocabulary/OWL_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWL - - OWL Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:20 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_RES.php.html deleted file mode 100755 index 89aa87cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---OWL_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page OWL_RES.php - - - - -
    -

    /vocabulary/OWL_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - OWL_RES - - OWL Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:22 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF.php.html deleted file mode 100755 index a97c6cfe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RDF.php - - - - -
    -

    /vocabulary/RDF.php

    - - -
    -
    Description
    - -
    - -

    Resource Description Framework (RDF) Vocabulary

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: _vocabulary---RDF.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:29 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS.php.html deleted file mode 100755 index 67921393..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RDFS.php - - - - -
    -

    /vocabulary/RDFS.php

    - - -
    -
    Description
    - -
    - -

    RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: _vocabulary---RDFS.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_C.php.html deleted file mode 100755 index 5b6c2508..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDFS_C.php - - - - -
    -

    /vocabulary/RDFS_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFS - - RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_RES.php.html deleted file mode 100755 index ca3b1b8e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDFS_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDFS_RES.php - - - - -
    -

    /vocabulary/RDFS_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDFS_RES - - RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:52 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_C.php.html deleted file mode 100755 index 3e8c6c39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDF_C.php - - - - -
    -

    /vocabulary/RDF_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDF - - Resource Description Framework (RDF) Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:57 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_RES.php.html deleted file mode 100755 index 5e97b94d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RDF_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RDF_RES.php - - - - -
    -

    /vocabulary/RDF_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RDF_RES - - Resource Description Framework (RDF) Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:50:59 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS.php.html deleted file mode 100755 index 141d1804..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page RSS.php - - - - -
    -

    /vocabulary/RSS.php

    - - -
    -
    Description
    - -
    - -

    RSS Vocabulary

    -
      -
    • author: Tobias Gauß (tobias.gauss@web.de)
    • -
    • version: $Id: _vocabulary---RSS.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:41 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_C.php.html deleted file mode 100755 index f150318b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RSS_C.php - - - - -
    -

    /vocabulary/RSS_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RSS - - RSS Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_RES.php.html deleted file mode 100755 index 9b59bd63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---RSS_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page RSS_RES.php - - - - -
    -

    /vocabulary/RSS_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - RSS_RES - - RSS Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:51:51 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD.php.html deleted file mode 100755 index 26a0cdcb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD.php.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Docs for page VCARD.php - - - - -
    -

    /vocabulary/VCARD.php

    - - -
    -
    Description
    - -
    - -

    vCard profile defined by RFC 2426 - Vocabulary

    -
      -
    • author: Daniel Westphal (dawe@gmx.de)
    • -
    • version: $Id: _vocabulary---VCARD.php.html 443 2007-06-01 16:25:38Z cax $
    • -
    • filesource: Source Code for this file
    • -
    - -
    -
    - - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:36 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_C.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_C.php.html deleted file mode 100755 index dce38d02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_C.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page VCARD_C.php - - - - -
    -

    /vocabulary/VCARD_C.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - VCARD - - vCard profile defined by RFC 2426 - Vocabulary (Resource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:38 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_RES.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_RES.php.html deleted file mode 100755 index 7eb756d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VCARD_RES.php.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Docs for page VCARD_RES.php - - - - -
    -

    /vocabulary/VCARD_RES.php

    - - -
    -
    Description
    - -
    - - - -
    -
    - - -
    -
    Classes
    - -
    - - - - - - - - - -
    ClassDescription
    - VCARD_RES - - vCard profile defined by RFC 2426 - Vocabulary (ResResource) -
    -
    -
    - - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:40 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---Vocabulary.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---Vocabulary.php.html deleted file mode 100755 index caa0fba4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---Vocabulary.php.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - Docs for page Vocabulary.php - - - - -
    -

    /vocabulary/Vocabulary.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF.php') - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:42 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyClass.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyClass.php.html deleted file mode 100755 index 16d22d74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyClass.php.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - Docs for page VocabularyClass.php - - - - -
    -

    /vocabulary/VocabularyClass.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF_C.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_C.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_C.php') - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL_C.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC_C.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_C.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS_C.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_C.php') - (line 17) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyRes.php.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyRes.php.html deleted file mode 100755 index 856050d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/phpdoc/vocabulary/_vocabulary---VocabularyRes.php.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - Docs for page VocabularyRes.php - - - - -
    -

    /vocabulary/VocabularyRes.php

    - - -
    -
    Description
    - -
    - -

    Vocabulary

    - - -
    -
    - - - -
    -
    Includes
    - -
    - -
    - -
    - - include_once - (RDFAPI_INCLUDE_DIR.PACKAGE_RESMODEL)) - (line 12) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_RES.php') - (line 13) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDF_RES.php') - (line 14) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_RES.php') - (line 15) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/OWL_RES.php') - (line 16) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/DC_RES.php') - (line 17) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_RES.php') - (line 18) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_RES.php') - (line 19) - -
    - - - -
    - -
    - -
    - - require_once - (RDFAPI_INCLUDE_DIR.'vocabulary/RSS_RES.php') - (line 20) - -
    - - - -
    -
    -
    - - - - -

    - Documentation generated on Fri, 1 Jun 2007 16:52:43 +0200 by phpDocumentor 1.3.2 -

    -
    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/rdql_grammar.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/rdql_grammar.htm deleted file mode 100755 index 746b231d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/rdql_grammar.htm +++ /dev/null @@ -1,316 +0,0 @@ - -BNF for RAP's RDQL engine - - - - - -

    RDF API for PHP

    -

    BNF for RAPs RDQL engine

    -

    NON-Terminals

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CompilationUnit -
    ::=
    -
    Query
    CommaOpt -
    ::=
    -
    (,)?
    Query -
    ::=
    -
    SelectClause
    - (SourceClause)?
    - TriplePatternClause
    - (ConstraintClause)?
    - (PrefixesClause)?
    SelectClause -
    ::=
    -
    (SELECT Var (CommaOpt - Var)* | SELECT *")
    SourceClause -
    ::=
    -
    (FROM | SOURCE) QuotedURI
    TriplePatternClause -
    ::=
    -
    WHERE TriplePattern (CommaOpt - TriplePattern)*
    TriplePattern -
    ::=
    -
    ( VarOrURI CommaOpt - VarOrURICommaOpt VarOrUriOrLiteral - )
    ConstraintClause -
    ::=
    -
    AND Expression (, Expression)*
    PrefixesClause -
    ::=
    -
    USING PrefixDecl (CommaOpt - PrefixDecl)*
    PrefixDecl -
    ::=
    -
    Identifier FOR QuotedURI
    Expression -
    ::=
    -
    ConditionalOrExpression
    ConditionalOrExpression -
    ::=
    -
    ConditionalXorExpression (|| - ConditionalXorExpression)*
    ConditionalXorExpression -
    ::=
    -
    ConditionalAndExpression
    ConditionalAndExpression -
    ::=
    -
    ValueLogical (&& ValueLogical)*
    ValueLogical -
    ::=
    -
    StringEqualityExpression
    StringEqualityExpression -
    ::=
    -
    EqualityExpression ((StrEqOp - EqualityExpression) | (RegexMatchOp - RegexPattern))
    StrEqOp -
    ::=
    -
    EQ | NE
    RegexMatchOp -
    ::=
    -
    ~~ | =~ | !~
    RegexPattern -
    ::=
    -
    <REGULAR_EXPRESSION>
    EqualityExpression -
    ::=
    -
    RelationalExpression (EqOp - RelationalExpression)?
    EqOp -
    ::=
    -
    == | !=
    RelationalExpression -
    ::=
    -
    AdditiveExpression (RelOp - AdditiveExpression) ?
    RelOp -
    ::=
    -
    < | <= | > | >=
    AdditiveExpression -
    ::=
    -
    MultiplicativeExpression (AddOp - MultiplicativeExpression)*
    AddOp -
    ::=
    -
    + | -
    MultiplicativeExpression -
    ::=
    -
    UnaryExpression (MulOp - UnaryExpression)*
    MulOp -
    ::=
    -
    * | / | %
    UnaryExpression -
    ::=
    -
    PrimaryExpression | + UnaryExpression - | - UnaryExpression | ! - UnaryExpression
    PrimaryExpression -
    ::=
    -
    Var | Literal | ( Expression - )
    VarOrURI -
    ::=
    -
    Var | QuotedURI
    VarOrUriOrLiteral -
    ::=
    -
    Var | QuotedURI | Literal
    Var -
    ::=
    -
    ? Identifier
    Identifier -
    ::=
    -
    <IDENTIFIER>
    URI -
    ::=
    -
    <URI>
    QuotedURI -
    ::=
    -
    < <URI> >
    Literal -
    ::=
    -
    URI | NumericLiteral - | TextLiteral | BooleanLiteral - | NullLiteral
    NumericLiteral -
    ::=
    -
    <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL>
    TextLiteral -
    ::=
    -
    <STRING_LITERAL> (@ Identifier)? - (^^ URI)?
    BooleanLiteral -
    ::=
    -
    <BOOLEAN_LITERAL>
    NullLiteral -
    ::=
    -
    <NULL_LITERAL>
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests.html deleted file mode 100755 index fa664bf2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests.html +++ /dev/null @@ -1,225 +0,0 @@ - - RAP - RDF API for PHP Documentation - - - - - - - - - -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - -
    - -
    -

    Documentation

    - - - - - -
    - - - - - - - - - - - - - - - - - - - -

    Tutorials

      -
    1. Introducion to - RAP
      -
      -
    2. -
    3. Using the statement-centric - Model API
      -

      -
    4. -
    5. Using the resource-centric - ResModel API
      -

      -

    6. -
    7. Using the ontology-centric - OntModel API
      -

    8. -
    9. Using the RDF Dataset API
      -

    10. -
    11. RDQL tutorial
      -

    12. -
    13. Database - Persistence
      -

      -

    14. -
    15. RDF DB Utils tutorial
      -

      -

    16. -
    17. GRDDL Parser

      -

    18. -
    19. Using vocabularies

      -

    20. -
    21. Graph visualization

      -

    22. -
    23. Using the SPARQL Engine

      -

    24. -
    25. SPARQL client

      -

    26. -
    27. RAP_Pubby
    28. -
    -

     

    -

    API Documentation

      -
    1. PHPDoc
    2. -

    Implementation Notes

      -
    1. Database Backend -

    2. -
    3. RDQL Engine
    4. -
    -
    - - - - - - - -
    -

    Usage Examples

    -
      -
    1. Manipulate and Seach MemModel
    2. - -
    3. Traverse MemModel
    4. - -
    5. Using the InfModel
    6. - -
    7. Using the ResModel - -  
    8. -
    9. Using the DatasetMem API - -  
    10. -
    11. Set Operations
    12. - -
    13. Serializer Options
    14. - -
    15. Custom API Test
    16. - -
    17. Set Database Connection
    18. - -
    19. Storing Models in a Database
    20. - -
    21. Manipulate and Seach Database Model
    22. - -
    23. Query a Model using the RDQL Query Language
    24. - -
    25. Custom RDQL Test
    26. - -
    -
    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/all-wcprops deleted file mode 100755 index d4854a3c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/all-wcprops +++ /dev/null @@ -1,149 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests -END -test_TraverseModel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_TraverseModel.php.txt -END -test_ManipulateMemModel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_ManipulateMemModel.php.txt -END -test_ManipulateModel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_ManipulateModel.php.txt -END -Test_Set_Database_Connection.htm -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Set_Database_Connection.htm -END -Test_Set_Operations.htm -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Set_Operations.htm -END -test_SerializerOptions.php.txt -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_SerializerOptions.php.txt -END -test_ManipulateDbModel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_ManipulateDbModel.php.txt -END -test_rdqlQuery.php.txt -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_rdqlQuery.php.txt -END -test_NamedGraphsMem.php.txt -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/241/trunk/rdfapi-php/doc/tests/test_NamedGraphsMem.php.txt -END -test_infmodel.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/test_infmodel.html -END -test_infmodel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_infmodel.php.txt -END -test_setoperations.php.txt -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_setoperations.php.txt -END -Test_TraverseModel.htm -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_TraverseModel.htm -END -test_SetDatabaseConnection.php.txt -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_SetDatabaseConnection.php.txt -END -Test_Storing_Models_in_Database.html -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Storing_Models_in_Database.html -END -phpdoc.CSS -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/phpdoc.CSS -END -Test_Manipulate_MemModel.htm -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Manipulate_MemModel.htm -END -test_StoringModelsInDatabase.php.txt -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_StoringModelsInDatabase.php.txt -END -Test_Serializer_Options.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Serializer_Options.htm -END -Test_Manipulate_DbModel.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_Manipulate_DbModel.htm -END -test_ResModel.html -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/test_ResModel.html -END -test_ResModel.php.txt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tests/test_ResModel.php.txt -END -Test_RDQL_Query.htm -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/Test_RDQL_Query.htm -END -test_NamedGraphsMem.htm -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tests/test_NamedGraphsMem.htm -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/entries deleted file mode 100755 index c8c58ecf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/entries +++ /dev/null @@ -1,340 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/tests -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-01-13T09:54:04.000000Z -248 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -test_TraverseModel.php.txt -file - - - - -2008-02-29T14:57:28.105471Z -ae771e90f1766baa41ec2467dd586fa7 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_ManipulateMemModel.php.txt -file - - - - -2008-02-29T14:57:28.105471Z -4e7f4ab7cd0c8df00ae8cbe77d758145 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_ManipulateModel.php.txt -file - - - - -2008-02-29T14:57:28.121092Z -92b74ea1943926be853ba6a3f3203bce -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Test_Set_Database_Connection.htm -file - - - - -2008-02-29T14:57:28.136712Z -ed20a53f5877f0e64e1f2b88c187b3fa -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -Test_Set_Operations.htm -file - - - - -2008-02-29T14:57:28.121092Z -85bdb49ce6da3be9007618988c5e4229 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_SerializerOptions.php.txt -file - - - - -2008-02-29T14:57:28.152333Z -d118939ddcc4e0473e4ec5a4305c0ee6 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_ManipulateDbModel.php.txt -file - - - - -2008-02-29T14:57:28.152333Z -44ae2feb9cf9f037119c2e0886cba381 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_rdqlQuery.php.txt -file - - - - -2008-02-29T14:57:28.167954Z -602dbc3b8999a4477072b16faac97f91 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_NamedGraphsMem.php.txt -file - - - - -2008-02-29T14:57:28.167954Z -cf277e28db0d579bda322689e7b36ae2 -2005-07-07T18:03:07.000000Z -241 -tgauss -has-props - -test_infmodel.html -file - - - - -2008-02-29T14:57:28.183574Z -8bd2ee425dc1576ef19e983eda904d95 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_infmodel.php.txt -file - - - - -2008-02-29T14:57:28.183574Z -4aca9bc29b2b85bfdc3f8de96baff647 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_setoperations.php.txt -file - - - - -2008-02-29T14:57:28.199195Z -5c58ccf807f85c1795424325fadde68f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Test_TraverseModel.htm -file - - - - -2008-02-29T14:57:28.199195Z -7ee382453bbb4f1c639a326ad93796a0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_SetDatabaseConnection.php.txt -file - - - - -2008-02-29T14:57:28.214815Z -7978b7d28c7c3f03a2930c2ac74dee57 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -phpdoc.CSS -file - - - - -2008-02-29T14:57:28.214815Z -9ba426cf3e0ac703962b272673a63cc3 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Test_Storing_Models_in_Database.html -file - - - - -2008-02-29T14:57:28.230436Z -d5378e8afee374ad39b68ccd39fcf2ad -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -Test_Manipulate_MemModel.htm -file - - - - -2008-02-29T14:57:28.230436Z -fdd782924bb2a66739085dfd8be4099f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_StoringModelsInDatabase.php.txt -file - - - - -2008-02-29T14:57:28.246057Z -59681d9185fe90203ad966d617936930 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Test_Serializer_Options.htm -file - - - - -2008-02-29T14:57:28.261677Z -e6658fb84b61bff9eaa4bc7bf93894f8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -Test_Manipulate_DbModel.htm -file - - - - -2008-02-29T14:57:28.261677Z -8bc671207195c69fd601d12f6cfad57f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_ResModel.html -file - - - - -2008-02-29T14:57:28.277298Z -af8bfa83621ddb0781e9ac7d0af4fa5a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_ResModel.php.txt -file - - - - -2008-02-29T14:57:28.292918Z -c6eb8cfec6cdf2fd5efbaee3ffbc8260 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Test_RDQL_Query.htm -file - - - - -2008-02-29T14:57:28.292918Z -579d4e54ee08431abf54b6890ce35a9a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test_NamedGraphsMem.htm -file - - - - -2008-02-29T14:57:28.308539Z -6bf0782ebb382b654fe69163761175b0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_DbModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_DbModel.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_DbModel.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_MemModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_MemModel.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Manipulate_MemModel.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_RDQL_Query.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_RDQL_Query.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_RDQL_Query.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Serializer_Options.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Serializer_Options.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Serializer_Options.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Database_Connection.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Database_Connection.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Database_Connection.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Operations.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Operations.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Set_Operations.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Storing_Models_in_Database.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Storing_Models_in_Database.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_Storing_Models_in_Database.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_TraverseModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_TraverseModel.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/Test_TraverseModel.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/phpdoc.CSS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/phpdoc.CSS.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/phpdoc.CSS.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateDbModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateDbModel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateDbModel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateMemModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateMemModel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateMemModel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateModel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ManipulateModel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_NamedGraphsMem.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_ResModel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SerializerOptions.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SerializerOptions.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SerializerOptions.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SetDatabaseConnection.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SetDatabaseConnection.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_SetDatabaseConnection.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_StoringModelsInDatabase.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_StoringModelsInDatabase.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_StoringModelsInDatabase.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_TraverseModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_TraverseModel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_TraverseModel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_infmodel.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_rdqlQuery.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_rdqlQuery.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_rdqlQuery.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_setoperations.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_setoperations.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/prop-base/test_setoperations.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_DbModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_DbModel.htm.svn-base deleted file mode 100755 index c7a6bf02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_DbModel.htm.svn-base +++ /dev/null @@ -1,312 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Manipulate DbModel

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Connect to rdf database (e.g. Access via ODBC)

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).
    -

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN)
    - // using connection settings defined in constants.php :
    - $rdf_database = ModelFactory::getDbStore(); -

    -

    Read more about Setting Database Connection.

    -
    -

    2. Load and show a DbModel

    - - - - - - -
    -

    - // Load the model with modelURI "example1.rdf"
    - $dbModel = $rdf_database->getModel("example1.rdf");
    -
    - // Output the model as HTML table
    - $dbModel->writeAsHtmlTable(); -

    -
    -
    - - - - - - -
    Note:  getModel() loads into memory only the modelURI and a database internal - modelID, it also sets a database connection for the DbModel. This saves - main memory and allows to gain advantage of database's indexing capabilities.
    - -

    Output:
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -
    -
    -

    3. Add a statement to the DbModel

    - - - - - - -
    -

    // Ceate a new statement
    - $statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    -              - new Resource("http://description.org/schema/Description"),
    -              - new Literal("Lassilas persönliche Homepage", "de"));
    -
    - // Add the statement to the DbModel
    - $dbModel->add($statement);
    -
    - // Output the string serialization of the DbModel
    - echo $dbModel->toStringIncludingTriples();

    -
    -

    Output:

    -

    MemModel[baseURI=http://www.w3.org/Home/Lassila.rdf#; size=5] Triple(Resource("http://www.w3.org/Home/Lassila"), - Resource("http://description.org/schema/Creator"), bNode("b85740")) - Triple(bNode("b85740"), Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - Resource("http://description.org/schema/Person")) Triple(bNode("b85740"), - Resource("http://example.org/stuff/1.0/Name"), Literal("Ora Lassila", - datatype="http://www.w3.org/TR/xmlschema-2#string")) Triple(bNode("b85740"), - Resource("http://example.org/stuff/1.0/Email"), Literal("lassila@w3.org")) - Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Description"), - Literal("Lassilas persönliche Homepage", lang="de")) -

    -
    -

    4. Search statements

    - - - - - - -
    -

    // Search for statements having object $literal
    - $literal = new Literal("Lassilas persönliche Homepage", - "de");
    - $res = $dbModel->find(NULL, NULL, $literal);
    -
    - // Output the result
    - $res->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 1

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    -

    Literal: Lassilas persönliche Homepage (xml:lang="de")

    -
    -
    -
    -

    5. Replace nodes and serialize the DbModel to XML/RDF

    - - - - - - -
    -

    - // replace a literal
    - $dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"),
    -                               - new Literal ("Lassila's personal Homepage", "en"));
    -
    - // Serialize to RDF
    - $dbModel->writeAsHtml(); -

    -
    - -

    Output:

    -<?xml version='1.0' encoding='UTF-8'?>
    -<rdf:RDF
    -   xml:base="http://www.w3.org/Home/Lassila.rdf#"
    -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    -   xmlns:ns1="http://description.org/schema/"
    -   xmlns:ns2="http://example.org/stuff/1.0/">
    -
    -<ns1:Person rdf:nodeID="b85740">
    -   <ns2:Email>lassila@w3.org</ns2:Email>
    -   <ns2:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora Lassila</ns2:Name>
    -</ns1:Person>
    -
    -<rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    -   <ns1:Creator rdf:nodeID="b85740"/>
    -   <ns1:Description xml:lang="en">Lassila's personal Homepage</ns1:Description>
    -</rdf:Description>
    -
    -</rdf:RDF>
    -

    -

    6. Remove a statement

    - - - - - - -
    -

    $dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"),
    -                                 - new Resource("http://description.org/schema/Description"),
    -                                 new - Literal("Lassila's personal Homepage", "en")));
    -
    - // Output the DbModel
    - $dbModel->writeAsHtmlTable(); -

    -
    - -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -
    -
    -

    7. Generate a MemModel and compare both models

    - - - - - - -
    -

    // Generate a MemModel
    - $memModel = $dbModel->getMemModel();
    -
    - // Compare this DbModel withe the generated MemModel
    - $res = $dbModel->equals($memModel);
    -
    - // Output the result
    - if ($res)
       - echo "models are equal";
    - else
       - echo "models are different"; -

    -
    -

    Output:

    -

    models are equal

    -
    -

    8. Save DbModel to file

    - - - - - - -

    // Save model to file (XML/RDF)
    - $dbModel->saveAs("Output.rdf");
    -
    - // Save model to file (N3)
    - $dbModel->saveAs("Output.n3");
    -
    - // close the DbModel
    - $dbModel->close();

    -
    -
    -

    Output:

    -Files: Output.rdf
    -        Output.n3 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_MemModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_MemModel.htm.svn-base deleted file mode 100755 index 12ecea93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Manipulate_MemModel.htm.svn-base +++ /dev/null @@ -1,324 +0,0 @@ - -Test Manipulate RDF Model - - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Manipulate MemModel

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xml:base="http://www.w3.org/Home/Lassila.rdf#"
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="b85740">
    - <rdf:type rdf:resource="http://description.org/schema/Person"/>
    - <ex:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora - Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>

    -

    -
    -

    -

    1. Parse and show model

    - - - - - - -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    - -

    // Filename of an RDF document
    - $base="example1.rdf";

    - -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Output model as HTML table
    - $model->writeAsHtmlTable();

    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -

    -

    2. Add some statements

    - - - - - - -
    -

    // Ceate new statements and add them to model
    - $statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    - new Resource("http://description.org/schema/Description"),
    - new Literal("Lassila's personal Homepage", "en"));
    -
    - $statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    - new Resource("http://description.org/schema/Description"),
    - new Literal("Lassilas persönliche Homepage ", "de"));

    -

    $model->add($statement1);
    - $model->add($statement2);

    -

    $model->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 6

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    5.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassila's personal Homepage (xml:lang="en")

    6.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassilas persnliche Homepage (xml:lang="de")

    -

    -

    3. Search Statements

    - - - - - - -

    // Build search index to speed up searches.
    - $model->index();

    -

    // Search model 1
    - $homepage = new Resource("http://www.w3.org/Home/Lassila");
    - $res = $model->find($homepage, NULL, NULL);

    -

    $res->writeAsHtmlTable();
    - echo "<P>";

    -

    Output:

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 3

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassila's personal Homepage (xml:lang="en") -

    3.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassilas persnliche Homepage (xml:lang="de") -

    -


    -

    4. Search First Matching Statement

    - - - - - - -

    // Search model 2
    - $description = new Resource("http://description.org/schema/Description");
    - $statement = $model->findFirstMatchingStatement($homepage, $description, - NULL);

    -

    // Check if something was found and output result
    - if ($statement) {
    - echo $statement->toString();
    - } else {
    - echo "Sorry, I didn't find anything.";
    - }
    - echo "<P>";

    -

    Output:

    -

    -

    Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Description"), - Literal("Lassila's personal Homepage", lang="en"))

    - -
    -

    5. Search Vocabulary

    - - - - - - -

    // Search model 3
    - $res3 = $model->findVocabulary("http://example.org/stuff/1.0/");
    - $res3->writeAsHtmlTable();
    - echo "<P>";

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 2

    No.

    Subject

    Predicate

    Object

    1.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    2.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -

    -


    - 5. Serialize MemModel to RDF

    - - - - - - -

    // Write model as RDF
    - $model->writeAsHtml();

    -
    -

    Output:

    -

    -

    <?xml version='1.0' encoding='UTF-8'?>
    - <rdf:RDF
    -    xml:base="http://www.w3.org/Home/Lassila.rdf#"
    -    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    -    xmlns:ns1="http://description.org/schema/"
    -    xmlns:ns2="http://example.org/stuff/1.0/">
    -
    - <ns1:Person rdf:nodeID="b85740">
    -    <ns2:Email>lassila@w3.org</ns2:Email>
    -    <ns2:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora Lassila</ns2:Name>
    - </ns1:Person>
    -
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    -    <ns1:Creator rdf:nodeID="b85740"/>
    -    <ns1:Description xml:lang="en">Lassila's personal Homepage</ns1:Description>
    -    <ns1:Description xml:lang="de">Lassilas persnliche Homepage </ns1:Description>
    - </rdf:Description>
    -
    - </rdf:RDF>

    -


    - 6. Save manipulated MemModel to file

    - - - - - - -

    // Save model to file
    - $model->saveAs("Output.rdf");

    -

    Output:

    -

    - File: Output.rdf -

     

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_RDQL_Query.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_RDQL_Query.htm.svn-base deleted file mode 100755 index 731fa180..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_RDQL_Query.htm.svn-base +++ /dev/null @@ -1,439 +0,0 @@ - -Test RDQL Query - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: RDQL Query

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    1. Load a model to be queried
    -

    - - - - - - -
    -

    // Filename of an RDF document
    - $base="employees.rdf"

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Show input model
    - $model->writeAsHtmlTable();

    -
    -
    -Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: employees.rdf#

    Size: 36

    No.

    Subject

    Predicate

    Object

    1.

    Blank Node: bNode10

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    2.

    Blank Node: bNode10

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: B.Parker@example.com

    3.

    Blank Node: bNode1

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Murphy

    4.

    Blank Node: bNode1

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: Monica

    5.

    Blank Node: bNode2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    6.

    Blank Node: bNode2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 999

    7.

    Blank Node: bNode3

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    8.

    Blank Node: bNode3

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: M.Murphy@example.com

    9.

    Blank Node: bNode4

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Simpson

    10.

    Blank Node: bNode4

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: George

    11.

    Blank Node: bNode5

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    12.

    Blank Node: bNode5

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 101

    13.

    Blank Node: bNode6

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    14.

    Blank Node: bNode6

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: G.Simpson@example.com

    15.

    Blank Node: bNode7

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Parker

    16.

    Blank Node: bNode7

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: Bill

    17.

    Blank Node: bNode8

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    18.

    Blank Node: bNode8

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 668

    19.

    Blank Node: bNode9

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#home

    20.

    Blank Node: bNode9

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2212 431

    21.

    Resource: http://example.com/employees/BillParker/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 33

    22.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode10

    23.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Bill Parker

    24.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode7

    25.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode8

    26.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode9

    27.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 41

    28.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode6

    29.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: George Simpson

    30.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode4

    31.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode5

    32.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 29

    33.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode3

    34.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Monica Murphy

    35.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode1

    36.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode2

    -
    -
    -

    2. Find the age of all employees, use the RdqlResultIterator for traversing - the Result

    -

    Read more about RDQL Syntax.

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?age
    - WHERE (?x, <v:age>, ?age),
    -       (?x, <vcard:N>, ?blank),
    -       (?blank, <vcard:Given>, ?givenName)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    -
    - //query model, get RDQLResultIterator
    - $rdqlIter = $model->rdqlQueryasIterator($rdql_query);
    -
    -
    //get different Result labels as array
    - $result_labels=$rdqlIter->getResultLabels();
    - echo "<BR><b>Result Label Names:</b> ";
    - for ($i=0; $i <count($result_labels); $i++) echo $result_labels[$i]." ";
    -
    - echo "<BR><B>Number of results:</B> ".$rdqlIter->countResults()";
    -
    - //serialize result to string
    -echo "<BR><B>Result objects, serialized to string:</B><BR>";
    - while ($rdqlIter->hasNext()) {
    -  $curren_result=$rdqlIter->next();
    -  echo "<BR>";
    -  for ($j=0; $j <count($result_labels); $j++) echo $curren_result[$result_labels[$j]]->toString()."<BR> ";
    - };

    -
    -
    - - - - - - -
    Note:  The methods rdqlQuery() and rdqlQueryAsIterator() can only query their - own model. If the rdql query string contains a SOURCE clause it will be - ignored - by - the query engine.
    -

    Output:

    -Result Label Names: ?givenName ?age
    -Number of results: 3 -

    Result objects, serialized to string:
    -
    Literal("Monica")
    -Literal("29")

    -

    Literal("George")
    - Literal("41")

    -

    Literal("Bill")
    - Literal("33")

    -

     

    -

    -



    -

    3. Find emails of all employees (using regular expression)

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?familyName, ?email
    - WHERE (?person <vcard:N> ?blank1)
    -       (?blank1 <vcard:Given> ?givenName)
    -       (?blank1 <vcard:Family> ?familyName)
    -       (?person <vcard:EMAIL> ?blank2)
    -       (?blank2 <rdf:value> ?email)
    - AND ?person ~~ "/example.com\/EMPLOYEES\//i"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    -

    Output:

    -
    No.?givenName?familyName?email
    1.

    Literal: Bill

    Literal: Parker

    Literal: B.Parker@example.com

    2.

    Literal: Monica

    Literal: Murphy

    Literal: M.Murphy@example.com

    3.

    Literal: George

    Literal: Simpson

    Literal: G.Simpson@example.com

    - -

    -

    4. Find employees over 30

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?employee
    - WHERE (?x, <vcard:FN>, ?employee),
    -       (?x, <v:age>, ?age)
    - AND ?age > 30
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -

    No.?employee
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    -

    -

    5. Find whose number is it: +1 111 2212 431

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?x, ?type
    - WHERE (?x, <vcard:TEL>, ?tel),
    -       (?tel, <rdf:value>, ?telNumber)
    -       (?tel, <rdf:type>, ?type)
    - AND ?telNumber eq "+1 111 2212 431"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -
    No.?x?type
    1.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#home

    -


    -

    6. Find office telephone number of all employees

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?familyName, ?telNumber
    - WHERE (?person <vcard:N> ?blank1)
    -       (?blank1 <vcard:Given> ?givenName)
    -       (?blank1 <vcard:Family> ?familyName)
    -       (?person <vcard:TEL> ?blank2)
    -       (?blank2 <rdf:value> ?telNumber)
    -       (?blank2 <rdf:type> ?type)
    - AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type - eq <vcard:work>
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -
    No.?givenName?familyName?telNumber
    1.

    Literal: Monica

    Literal: Murphy

    Literal: +1 111 2222 999

    2.

    Literal: George

    Literal: Simpson

    Literal: +1 111 2222 101

    3.

    Literal: Bill

    Literal: Parker

    Literal: +1 111 2222 668

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Serializer_Options.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Serializer_Options.htm.svn-base deleted file mode 100755 index abffffa3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Serializer_Options.htm.svn-base +++ /dev/null @@ -1,210 +0,0 @@ - -Test Serializer Options - - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Serializer Options

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xml:base="http://www.w3.org/Home/Lassila.rdf#"
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="b85740">
    - <rdf:type rdf:resource="http://description.org/schema/Person"/>
    - <ex:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora - Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>

    -
    -

    -

    1. Load and show document

    - - - - - - -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    - include(RDFAPI_INCLUDE_DIR . "PACKAGE_SYNTAX_RDF");

    -

    // Filename of a RDF document
    - $base="example1.rdf";

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Output model as HTML table
    - $model->writeAsHtmlTable();

    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string") -

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    - -

    -

     

    -

    2. Create Serializer and serialize model to RDF with default configuration

    - - - - - - -

    // Create Serializer and serialize model - to RDF with default configuration
    - $ser = new RDFSerializer();
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='20'>" . - $rdf . "</textarea>";

    -

    Output:

    -

    -

     

    -

    3. Serialize model to RDF using attributes

    - - - - - - -

    // Serialize model to RDF using attributes
    - $ser->configUseAttributes(TRUE);
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='20'>" . - $rdf . "</textarea>";
    - $ser->configUseAttributes(FALSE);

    -

    Output:

    -

    -

     

    -

    4. Serialize model to RDF using entities

    - - - - - - -

    // Serialize model to RDF using entities
    - $ser->configUseEntities(TRUE);
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='30'>" . - $rdf . "</textarea>";
    - $ser->configUseEntities(FALSE);

    -

    Output:

    - -

     

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Database_Connection.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Database_Connection.htm.svn-base deleted file mode 100755 index 81dcb4f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Database_Connection.htm.svn-base +++ /dev/null @@ -1,124 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Set Database Connection

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    - - - - - - -
    Note:  RAP uses ADOdb Library for PHP V4.52 (http://adodb.sourceforge.net/), - which allows you to connect to multiple databases in a portable manner. - For a list of supported databases see the ADOdb - documentation.
    -

    -

    1. Connect to MsAccess database (via ODBC) and create tables.

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN) using connection settings
    - // defined in constants.php :
    - // -------------------------------------------------------
    - // Database
    - // -------------------------------------------------------
    - // define("ADODB_DB_DRIVER", "odbc");
    - // define("ADODB_DB_HOST", "rdf_db");
    - // define("ADODB_DB_NAME", "");
    - // define("ADODB_DB_USER", "");
    - // define("ADODB_DB_PASSWORD", "");
    - $rdf_database = ModelFactory::getDbStore();
    -  
    - // Create tables for MsAccess
    - $rdf_database->createTables('MsAccess');

    -
    -
    -

    2. Connect to MySQL database and create tables.

    - - - - - - -
    -

    - - // Connect to MySQL database with user defined connection settings
    - $rdf_database = ModelFactory::getDbStore('MySQL', 'host', 'db_name', 'user_name', 'password');
    -  
    - // Create tables for MySQL
    - $mysql_database->createTables('MySQL');

    -
    -
    -

    3. Connect to other databases

    - - - - - - -
    -

    - - // Example:
    - // Connect to Oracle database with user defined connection settings
    - $oracle_database = ModelFactory::getDbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); -
    -

    -
    - - - - - - -
    Note:  Method createTables() currently supports only MySQL, MS SQL Server, and MsAccess.
    - If you want to use other databases, you will have to create tables by yourself - according to the abstract database schema - provided with the API documentation.
    -
    -
    -

    4. Close the database connection

    - - - - - - -
    -

    - - // Close the connection
    - $rdf_database->close(); -
    -

    -
    -
    - - - - - - -
    Warning:  If you close the rdf database all active instances of DbModel from this - DbStore will lose their database connection !!!
    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Operations.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Operations.htm.svn-base deleted file mode 100755 index 4407f933..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Set_Operations.htm.svn-base +++ /dev/null @@ -1,472 +0,0 @@ - -Test Set Operations - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Set Operations

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Generate and show two models

    - - - - - - -
    -

    define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    -

    echo "<h3>1. Generate and show two MemModels</h3>";

    -

    // Create empty MemModel
    - $model = ModelFactory::getDefaultModel();

    - $model->setbaseURI("http://www.bizer.de");

    -

    $model2 = ModelFactory::getDefaultModel();
    - $model2->setbaseURI("http://www.bizer.de/zwei");

    -

    // Create Nodes and add statements to models
    - $myhomepage = new Resource("http://www.bizer.de/welcome.html");
    - $creator = new Resource("http://purl.org/dc/elements/1.1/creator");
    - $me = new Resource("mailto:chris@bizer.de");
    - $model->add(new Statement($myhomepage, $creator, $me));
    - $model2->add(new Statement($myhomepage, $creator, $me));

    -

    $creation_date = new Resource("http://www.example.org/terms/creation-date");
    - $August16 = new Literal("August 16, 2002");
    - $model->add(new Statement($myhomepage, $creation_date, $August16));
    - $model2->add(new Statement($myhomepage, $creation_date, $August16));

    -

    $language = new Resource("http://www.example.org/terms/language");
    - $deutsch = new Literal("Deutsch", "de");
    - $model->add(new Statement($myhomepage, $language, $deutsch));

    -

    $name = new Resource("http://www.example.org/terms/Name");
    - $chrisbizer = new Literal("Chris Bizer");
    - $model2->add(new Statement($me, $name, $chrisbizer));

    -

    // Output as Table
    - echo "<h5>Model 1</h5>";
    - $model->writeAsHtmlTable();
    - echo "<h5>Model 2</h5>";
    - $model2->writeAsHtmlTable();

    -
    -

    Output:

    -Model 1 - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -
    -Model 2 - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de/zwei#

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: mailto:chris@bizer.de

    -

    Resource: http://www.example.org/terms/N
    ame

    -

    Literal: Chris Bizer

    -


    -

    2. Make some tests

    - - - - - - -
    -

    echo "<h2>2. Make some tests</h2>";
    - echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."<p>"; -
    - echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."<p>"; -
    - echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."<p>"; -
    - echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."<p>"; -
    - echo "Test: Model 1 equals model 2 :".$model->equals($model2)."<p>"; -

    -
    -

    Output:

    -

    Test: Model 2 contains any statements from model 1 :1

    -

    Test: Model 1 contains any statements from model 2 :1 -

    Test: Model 2 contains all statements from model 1 : -

    Test: Model 1 contains all statements from model 2 : -

    Test: Model 1 equals model 2 : -

    -

    -

    3. Unite model 1 and model 2

    - - - - - - -
    -

    echo "<h3>3. Unite model 1 and model 2</h3>";
    - $model3 =& $model->unite($model2);
    - $model3->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 4

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -

    4.

    -

    Resource: mailto:chris@bizer.de

    -

    Resource: http://www.example.org/terms/N
    ame

    -

    Literal: Chris Bizer

    -

     

    4. Intersect model 1 and model 2

    - - - - - - -
    -

    echo "<h3>4. Intersect model 1 and model 2</h3>";
    - $model4 =& $model->intersect($model2);
    - $model4->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 2

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

     

    5. Substract model 2 from model 1

    - - - - - - -
    -

    echo "<h3>5. Substract model 2 from model 1</h3>";
    - $model5 =& $model->subtract($model2);
    - $model5->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 1

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -

     

    6. Reify model 1

    - - - - - - -
    -

    echo "<h3>6. Reify model 1</h3>";
    - $model6 =& $model->reify();
    - $model6->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 12

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    2.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    3.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    4.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Resource: mailto:chris@bizer.de

    -

    5.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    6.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    7.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    8.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Literal: August 16, 2002

    -

    9.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    10.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    11.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    12.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Literal: Deutsch -(xml:lang="de")

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Storing_Models_in_Database.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Storing_Models_in_Database.html.svn-base deleted file mode 100755 index 62c91037..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_Storing_Models_in_Database.html.svn-base +++ /dev/null @@ -1,131 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Storing Models in Database

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Connect to rdf database (e.g. Access via ODBC)

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).
    - If you want to use other databases read: Set - Database Connection.

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN)
    - // using connection settings defined in constants.php :
    - $rdf_database = ModelFactory::getDbStore(); -

    -
    -
    -

    2. Store a memory model in rdf database

    -

    Load an RDF-Documtent into a memory model

    - - - - - - -
    -

    // Filename of an RDF document
    - $base="example1.rdf";
    -
    - // Create a new memory model
    - $memModel = ModelFactory::getDefaultModel();
    -
    - // Load and parse document
    - $memModel->load($base);

    -
    -

    Now store the model in database

    - - - - - - -
    -

    // An unique modelURI will be generated
    - $rdf_database->putModel($memModel);
    -
    - // You can also provide an URI for the model to be stored
    - $modelURI = "example1.rdf";
    -
    - // But then you must check if there already is a model with the same modelURI
    - // otherwise the method putModel() will return FALSE
    - if ($rdf_database->modelExists($modelURI))
    -    echo "Model with the same URI: '$modelURI' already exists"; -
    - else
    -    $rdf_database->putModel($memModel, $modelURI);

    -
    -
    -
    -

    3. Create a new database Model

    - - - - - - -
    -

    $modelURI = "newDbModel";
    -
    - // Base URI of the new model (optional)
    - $baseURI = "baseURIofMyNewDbModel#";
    -
    - // Get a new DbModel
    - if ($rdf_database->modelExists($modelURI))
    -    echo "Model with the same URI: '$modelURI' already exists"; -
    - else
    -    $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); -

    -
    -
    -
    -

    4. List all models stored in rdf database

    - - - - - - -
    -

    // Get an array with modelURI and baseURI of all models stored - in rdf database
    - $list = $rdf_database->listModels();
    -
    - // Show the database contents
    - foreach ($list as $model) {
    -    echo "modelURI: " .$model['modelURI'] ."<BR>";
    -    echo "baseURI : " .$model['baseURI'] ."<BR><BR>";
    - }

    -
    -

    Output:
    -
    -modelURI: DbModel-1
    -baseURI : http://www.w3.org/Home/Lassila.rdf#
    -
    -modelURI: example1.rdf
    -baseURI : http://www.w3.org/Home/Lassila.rdf#
    -
    -modelURI: newDbModel
    -baseURI : baseURIofMyNewDbModel# -

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_TraverseModel.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_TraverseModel.htm.svn-base deleted file mode 100755 index 1e575ead..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/Test_TraverseModel.htm.svn-base +++ /dev/null @@ -1,130 +0,0 @@ - - -Test Manipulate RDF Model - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Traverse RDF Model

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="e85740">
    - <rdf:type resource="http://description.org/schema/Person"/>
    - <ex:Name>Ora Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>
    -

    -
    -

    -

    1. Parse model

    - - - - - - -
    -

    //include RDF API
    - define("RDFAPI_INCLUDE_DIR", "C:/OpenSA/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    -

    // Filename of an RDF document
    - $base="example1.rdf";

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -
    -

     

    -

    2. Get Iterator and traverse the model forward.

    - - - - - - -

    // Get Iterator from model
    - $it = $model->getStatementIterator();

    -

    // Traverse model and output statements
    - while ($it->hasNext()) {
    -    $statement = $it->next();
    -    echo "Statement number: " . $it->getCurrentPosition() - . "<BR>";
    -    echo "Subject: " . $statement->getLabelSubject() - . "<BR>";
    -    echo "Predicate: " . $statement->getLabelPredicate() - . "<BR>";
    -    echo "Object: " . $statement->getLabelObject() - . "<P>";
    - }

    -

    Output:

    -

    Statement number: 0
    - Subject: http://www.w3.org/Home/Lassila
    - Predicate: http://description.org/schema/Creator
    - Object: e85740
    -
    - Statement number: 1
    - Subject: e85740
    - Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type
    - Object: http://description.org/schema/Person

    -

    Statement number: 2
    - Subject: e85740
    - Predicate: http://example.org/stuff/1.0/Name
    - Object: Ora Lassila

    -

    Statement number: 3
    - Subject: e85740
    - Predicate: http://example.org/stuff/1.0/Email
    - Object: lassila@w3.org

    -

     

    -

    3. And now the same backward with a jump to the middle afterwards :-)

    - - - - - - -

    // Move to the last statement and print - it
    - $it->moveLast();
    - $statement = $it->current();

    -

    // Traverse model backward and print statements
    - echo $statement->toString() . "<BR>";
    - while($it->hasPrevious()) {
    -    $statement = $it->previous();
    -    echo $statement->toString() . "<BR>";
    - }

    -

    // Jump to statement 2 and print it
    - $it->moveTo(2);
    - $statement = $it->current();
    - echo $statement->toString() . "<BR>";

    -

    Output:

    -

    Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Email"), - Literal("lassila@w3.org"))
    - Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Name"), - Literal("Ora Lassila"))
    - Triple(bNode("e85740"), Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - Resource("http://description.org/schema/Person"))
    - Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Creator"), - bNode("e85740"))
    - Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Name"), - Literal("Ora Lassila")) -

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/phpdoc.CSS.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/phpdoc.CSS.svn-base deleted file mode 100755 index 1f310dce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/phpdoc.CSS.svn-base +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateDbModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateDbModel.php.txt.svn-base deleted file mode 100755 index 8b9d1979..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateDbModel.php.txt.svn-base +++ /dev/null @@ -1,120 +0,0 @@ - - - - Test Store Models in Database - - - -getModel("example1.rdf"); - -// Output the model as HTML table -$dbModel->writeAsHtmlTable(); - -echo "

    "; - -## 3. Add a statement tho the DbModel -## ---------------------------------- - -// Ceate a new statement -$statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage", "de")); - -// Add the statement to the DbModel -$dbModel->add($statement); - -// Output the string serialization of the DbModel -echo $dbModel->toStringIncludingTriples(); - -echo "

    "; - - -## 4. Search statements -## --------------------- - -// Search for statements having object $literal -$literal = new Literal("Lassilas persnliche Homepage", "de"); -$res = $dbModel->find(NULL, NULL, $literal); - -// Output the result -$res->writeAsHtmlTable(); - -echo "
    "; - - -## 5. 5. Replace nodes and serialize the DbModel to XML/RDF -## -------------------------------------------------------- - -// replace a literal -$dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"), - new Literal ("Lassila's personal Homepage", "en")); - -// Serialize to RDF -$dbModel->writeAsHtml(); - -echo "

    "; - - -## 6. Remove a statement -## --------------------- - -$dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal ("Lassila's personal Homepage", "en"))); - -// Output the DbModel -$dbModel->writeAsHtmlTable(); - -echo "
    "; - - -## 7. Generate a MemModel and compare both models -## ---------------------------------------------- - -// Generate a MemModel -$memModel = $dbModel->getMemModel(); - -// Compare this DbModel withe the generated MemModel -$res = $dbModel->equals($memModel); - -if ($res) - echo "models are equal"; -else - echo "models are different"; - -echo "
    "; - - -## 8. Save DbModel to file -## ---------------------------------------------- - -// Save DbModel to file (XML/RDF) -$dbModel->saveAs("Output.rdf"); - -// Save DbModel to file (N3) -$dbModel->saveAs("Output.n3"); - -// close the DbModel -$dbModel->close(); - -?> - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateMemModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateMemModel.php.txt.svn-base deleted file mode 100755 index 8bd4a299..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateMemModel.php.txt.svn-base +++ /dev/null @@ -1,75 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -$res->writeAsHtmlTable(); -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); -$res3->writeAsHtmlTable(); -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateModel.php.txt.svn-base deleted file mode 100755 index f8276494..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ManipulateModel.php.txt.svn-base +++ /dev/null @@ -1,87 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -// Check if something was found and output result -if ($res) { - $res->writeAsHtmlTable(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); - -// Check if something was found and output result -if ($res3) { - $res3->writeAsHtmlTable(); -} else { - echo "Sorry, I didn't find anything of the spezified vocabulary."; -} -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.htm.svn-base deleted file mode 100755 index 52d56e23..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.htm.svn-base +++ /dev/null @@ -1,96 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the Dataset API

    -
    -This example is part of the RAP - Rdf API for PHP documentation. -

    Working with NamedGraphSets:

    - - - - - - -
    -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //get a GraphSet from the ModelFactory
    - $graphset = ModelFactory::getDatasetMem('Dataset1');

    -

    // Create a new NamedGraphsMem
    - $graph1 = new NamedGraphMem('http://graph1');
    - $graph2 =& $graphset->createGraph('http://graph2');

    -

    //create Quads
    - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1'));
    - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2'));
    - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3'));
    - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5'));

    -

    //add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically
    - $graphset->addQuad($quad1);
    - $graphset->addQuad($quad3);
    - $graphset->addQuad($quad2);

    -

    //add a NamedGraph to the Set
    - $graphset->addNamedGraph($graph1);

    -

    //Is the Graph "http://graph1" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph1" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph1'));
    - echo'<p/>';

    -

    //remove 'http://graph2' from the set
    - $graphset->removeNamedGraph('http://graph2');

    -

    //Is the Graph "http://graph2" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph2" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph2'));
    - echo'<p/>';

    -

    //creat basic statement
    - $statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'));

    -

    //get a Graph from the Set and add a basic statement
    - $graph4=&$graphset->getNamedGraph('http://graph4');
    - $graph4->add($statement);

    -

    //remove Quad5
    - $graphset->removeQuad($quad5);

    -

    //get an iterator over all Quads
    - echo '<p/><b>All Quads:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -   $quad=$iterator->current();
    -   echo $quad->toString().'<BR>';
    - };

    -

    //get an iterator over all Quads in 'http://graph3'
    - echo '<p/><b>All Quads in http://graph3:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next())
    - {
    -   $quad=$iterator->current();
    -   echo $quad->toString().'<BR>';
    - };

    -

    //how many Quads are in the whole GraphSet
    - echo '<p/><b>How many Quads are in the whole GraphSet?</b><BR>';
    - echo $graphset->countQuads();

    -

    //does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - echo '<p/><b>Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?</b><BR>';
    - var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')));
    - ?>

    -

    Output:

    -

    Is the Graph "http://graph1" part of the GraphSet?
    -bool(true)

    -

    Is the Graph "http://graph2" part of the GraphSet?
    -bool(false) -

    All Quads:
    - GraphName(http://graph3) Triple(Resource("http://subject1"), Resource("http://predicate1"), Resource("http://object1"))
    - GraphName(http://graph3) Triple(Resource("http://subject2"), Resource("http://predicate2"), Resource("http://object2"))
    - GraphName(http://graph4) Triple(Resource("http://subject3"), Resource("http://predicate3"), Resource("http://object3"))
    -GraphName(http://graph4) Triple(Resource("http://subject4"), Resource("http://predicate4"), Resource("http://object4")) -

    All Quads in http://graph3:
    - GraphName(http://graph3) Triple(Resource("http://subject1"), Resource("http://predicate1"), Resource("http://object1"))
    -GraphName(http://graph3) Triple(Resource("http://subject2"), Resource("http://predicate2"), Resource("http://object2")) -

    How many Quads are in the whole GraphSet?
    - 4 -

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - bool(true)

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.php.txt.svn-base deleted file mode 100755 index 136c0cb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_NamedGraphsMem.php.txt.svn-base +++ /dev/null @@ -1,73 +0,0 @@ -createGraph('http://graph2'); - -//create Quads -$quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); -$quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); -$quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); -$quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - -//add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically -$graphset->addQuad($quad1); -$graphset->addQuad($quad3); -$graphset->addQuad($quad2); - -//add a NamedGraph to the Set -$graphset->addNamedGraph($graph1); - -//Is the Graph "http://graph1" part of the GraphSet? -echo 'Is the Graph "http://graph1" part of the GraphSet?
    '; -var_dump($graphset->containsNamedGraph('http://graph1')); -echo'

    '; - -//remove 'http://graph2' from the set -$graphset->removeNamedGraph('http://graph2'); - -//Is the Graph "http://graph2" part of the GraphSet? -echo 'Is the Graph "http://graph2" part of the GraphSet?
    '; -var_dump($graphset->containsNamedGraph('http://graph2')); -echo'

    '; - -//creat basic statement -$statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')); - -//get a Graph from the Set and add a basic statement -$graph4=&$graphset->getNamedGraph('http://graph4'); -$graph4->add($statement); - -//remove Quad5 -$graphset->removeQuad($quad5); - -//get an iterator over all Quads -echo '

    All Quads:
    '; -for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//get an iterator over all Quads in 'http://graph3' -echo '

    All Quads in http://graph3:
    '; -for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//how many Quads are in the whole GraphSet -echo '

    How many Quads are in the whole GraphSet?
    '; -echo $graphset->countQuads(); - -//does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ? -echo '

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    '; -var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'))); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.html.svn-base deleted file mode 100755 index c52f4f04..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.html.svn-base +++ /dev/null @@ -1,186 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the ResModel

    -
    -This example is part of the RAP - Rdf API for PHP documentation. -


    -Setting up the model:

    - - - - - - -
    -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    // Some definitions
    - define('VCARD_NS', 'http://www.w3.org/2001/vcard-rdf/3.0#');
    - $personURI = "http://somewhere/JohnSmith";
    - $fullName = "John Smith";

    -

    // Create an empty Model
    - $model = ModelFactory::getResModel(MEMMODEL);

    -

    // Create the resources
    - $fullNameLiteral = $model->createLiteral($fullName);
    - $johnSmith = $model->createResource($personURI);
    - $vcard_FN= $model->createProperty(VCARD_NS.'FN');
    - $vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME');

    -

    // Add the property
    - $johnSmith->addProperty($vcard_FN, $fullNameLiteral);

    -

    // Retrieve the John Smith vcard resource from the model
    - $vCard = $model->createResource($personURI);

    -

    // Retrieve the value of the FN property
    - $statement = $vCard->getProperty($vcard_FN);
    - $value = $statement->getObject();

    -

    // Add two nickname properties to vcard
    - $literal1 = $model->createLiteral("Smithy");
    - $literal2 = $model->createLiteral("Adman");
    - $vCard->addProperty($vcard_NICKNAME, $literal1);
    - $vCard->addProperty($vcard_NICKNAME, $literal2);
    -

    -
    - - - - - - -
    -

    // List the nicknames
    - echo '<b>Known nicknames for '.$fullNameLiteral->getLabel().':</b><BR>';
    - foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource)
    - {
    -    echo $currentResource->getLabelObject().'<BR>';
    -};

    -

    Known nicknames for John Smith:
    - Smithy
    - Adman
    -

    - - - - - - -
    -

    echo '<BR><b>Iterate over all subjects which having FN property:</b><br>';
    - // Iterate over all subjects which having FN property
    - $iter = $model->listSubjectsWithProperty($vcard_FN);
    - for ($iter->rewind(); $iter->valid(); $iter->next())
    - {
    -     $currentResource=$iter->current();
    -    echo $currentResource->getLabel().'<BR>';
    -};

    -

    Iterate over all subjects which having FN property:
    - http://somewhere/JohnSmith
    -
    -

    -

    Create a Bag:

    - - - - - - -
    -

    // Create a bag
    - $bag_smiths = $model->createBag();

    -

    $beckySmith = $model->createResource('http://somewhere/BeckySmith');
    - $beckySmithFN = $model->createLiteral('Becky Smith');
    - $beckySmith->addProperty($vcard_FN,$beckySmithFN );

    -

    // Add persons to bag
    - $bag_smiths->add($beckySmith);
    - $bag_smiths->add($johnSmith);

    -

     

    - - - - - - -
    -

    // Print out the full names of the members of the bag
    - echo '<BR><BR><b>Print out the full names of the members of the bag:</b></BR>';
    - foreach ($bag_smiths->getMembers() as $resResource)
    - {
    -    // Retrieve the value of the FN property
    -    $statement = $resResource->getProperty($vcard_FN);
    -    echo $statement->getLabelObject().'<BR>';
    -};

    -

    Print out the full names of the members of the bag:
    - Becky Smith
    - John Smith
    -
    -

    - - - - - - -
    -

    echo '<BR><BR>All Statements as HTML table';
    - $model->writeAsHTMLTable();

    -

    All Statements as HTML table

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI:

    Size: 7

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: John Smith

    2.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#NICKNAME

    Literal: Smithy

    3.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#NICKNAME

    Literal: Adman

    4.

    Resource: http://somewhere/BeckySmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Becky Smith

    5.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag

    6.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#_1

    Resource: http://somewhere/BeckySmith

    7.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#_2

    Resource: http://somewhere/JohnSmith

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.php.txt.svn-base deleted file mode 100755 index eb7c2734..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_ResModel.php.txt.svn-base +++ /dev/null @@ -1,82 +0,0 @@ -createLiteral($fullName); -$johnSmith = $model->createResource($personURI); -$vcard_FN= $model->createProperty(VCARD_NS.'FN'); -$vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME'); - -// Add the property -$johnSmith->addProperty($vcard_FN, $fullNameLiteral); - -// Retrieve the John Smith vcard resource from the model -$vCard = $model->createResource($personURI); - -// Retrieve the value of the FN property -$statement = $vCard->getProperty($vcard_FN); -$value = $statement->getObject(); - -// Add two nickname properties to vcard -$literal1 = $model->createLiteral("Smithy"); -$literal2 = $model->createLiteral("Adman"); -$vCard->addProperty($vcard_NICKNAME, $literal1); -$vCard->addProperty($vcard_NICKNAME, $literal2); - - -// List the nicknames -echo 'Known nicknames for '.$fullNameLiteral->getLabel().':
    '; -foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource) -{ - echo $currentResource->getLabelObject().'
    '; -}; - - -echo '
    Iterate over all subjects which having FN property:
    '; -// Iterate over all subjects which having FN property -$iter = $model->listSubjectsWithProperty($vcard_FN); -for ($iter->rewind(); $iter->valid(); $iter->next()) -{ -$currentResource=$iter->current(); - echo $currentResource->getLabel().'
    '; -}; - - -// Create a bag -$bag_smiths = $model->createBag(); - -$beckySmith = $model->createResource('http://somewhere/BeckySmith'); -$beckySmithFN = $model->createLiteral('Becky Smith'); -$beckySmith->addProperty($vcard_FN,$beckySmithFN ); - -// Add persons to bag -$bag_smiths->add($beckySmith); -$bag_smiths->add($johnSmith); - - -// Print out the full names of the members of the bag -echo '

    Print out the full names of the members of the bag:
    '; -foreach ($bag_smiths->getMembers() as $resResource) -{ - // Retrieve the value of the FN property - $statement = $resResource->getProperty($vcard_FN); - echo $statement->getLabelObject().'
    '; -}; - - -echo '

    All Statements as HTML table'; -$model->writeAsHTMLTable(); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SerializerOptions.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SerializerOptions.php.txt.svn-base deleted file mode 100755 index 54e90d57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SerializerOptions.php.txt.svn-base +++ /dev/null @@ -1,47 +0,0 @@ - - - - Test Serializer Options - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - - -// Create Serializer and serialize model to RDF with default configuration -include(RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_RDF); -$ser = new RDFSerializer(); -$rdf =& $ser->serialize($model); -echo "

    "; - -// Serialize model to RDF using attributes -$ser->configUseAttributes(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseAttributes(FALSE); - -// Serialize model to RDF using entities -$ser->configUseEntities(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseEntities(FALSE); - -?> - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SetDatabaseConnection.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SetDatabaseConnection.php.txt.svn-base deleted file mode 100755 index de3f8c80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_SetDatabaseConnection.php.txt.svn-base +++ /dev/null @@ -1,67 +0,0 @@ - - - - Test Store Models in Database - - - -createTables('MsAccess'); - - - -## 2. Connect to MySQL database and create tables. - -/* -// Connect to MySQL database with user defined connection settings -$rdf_database = ModelFactory::getDbStore('MySQL', 'localhost', 'db_name', 'user_name', 'password' ); - -// Create tables for MySQL -$rdf_database->createTables('MySQL'); -*/ - - - -## 3. Connect to other databases - -/* -// Example: -// Connect to Oracle database with user defined connection settings -$rdf_database = ModelFactory::getDbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); - -// Note: Method createTables() currently supports only MySQL and MsAccess. -// If you want to use other databases, you will have to create tables by yourself -// according to the abstract database schema described in the API documentation. -*/ - - -## 4. Close the database connection - -// Close the connection -$rdf_database->close(); - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_StoringModelsInDatabase.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_StoringModelsInDatabase.php.txt.svn-base deleted file mode 100755 index e5743f4a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_StoringModelsInDatabase.php.txt.svn-base +++ /dev/null @@ -1,82 +0,0 @@ - - - - Test Store Models in Database - - - -load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_TraverseModel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_TraverseModel.php.txt.svn-base deleted file mode 100755 index 8215f0bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_TraverseModel.php.txt.svn-base +++ /dev/null @@ -1,55 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - - -// Get Iterator from model -$it = $model->getStatementIterator(); - -// Traverse model and output statements -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} - -// Move to the last statement and print it -$it->moveLast(); -$statement = $it->current(); - -// Traverse model backward and print statements -echo $statement->toString() . "
    "; -while($it->hasPrevious()) { - $statement = $it->previous(); - echo $statement->toString() . "
    "; -} - -// Jump to statement 2 and print it -$it->moveTo(2); -$statement = $it->current(); -echo $statement->toString() . "
    "; - -?> - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.html.svn-base deleted file mode 100755 index 03cbd924..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.html.svn-base +++ /dev/null @@ -1,539 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the InfModel

    -
    -This example is part of the RAP - Rdf API for PHP documentation.
    -
    -Setting up the model: - - - - - - -
    -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //create a InfmodelF
    - $infModel= ModelFactory::getInfModelF('http://InfModelF.org');

    -


    - Added the following Triples:

    -<http://example.org/baz1> <http://example.org/bat> <http://example.org/baz2> .
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://example.org/bas> .

    - - - - - - -
    -

    //add new statements
    - $infModel->add(new Statement(new Resource('http://example.org/baz1'),
    -                                           new Resource('http://example.org/bat'),
    -                                           new Resource('http://example.org/baz2')));
    -
    - $infModel->add(new Statement(new Resource('http://example.org/bat'),
    -                                           new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),
    -                                           new Resource('http://example.org/bas')));

    -

    //output the model as HTML table
    - $infModel->writeAsHtmlTable();
    -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 3

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    -


    Added the following Triples:
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.org/Domain1> .
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.org/Range1> . -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 7

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    -


    Added the following Triples :
    -<http://example.org/bas> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.org/Domain2> .
    -<http://example.org/bas> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.org/Range2> . -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 11

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    -


    Added the following Triples (loop in the ontology) :
    -<http://example.org/Domain2> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://example.org/Domain3> .
    -<http://example.org/Domain3> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://example.org/Domain2> . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 14

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    12.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    13.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    14.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    -


    Added the following Triple :
    -<http://example.org/Range3> <http://www.w3.org/2002/07/owl#sameAs> <http://example.org/Range2> .
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 16

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    12.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    13.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    14.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    15.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    16.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range3

    -


    Perform a find(http://example.org/baz1,null,null) :
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 5

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    3.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    4.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    -


    Removed the following Triple :
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://example.org/bas> .
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 11

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    3.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    4.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    5.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    6.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    7.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    8.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    9.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    10.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.php.txt.svn-base deleted file mode 100755 index ffd93e56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_infmodel.php.txt.svn-base +++ /dev/null @@ -1,83 +0,0 @@ -add(new Statement(new Resource('http://example.org/baz1'),new Resource('http://example.org/bat'),new Resource('http://example.org/baz2'))); -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Added the following Triples:
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; - -//output the model as HTML table -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - -echo 'Added the following Triples:
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - - - -$infModel->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$infModel->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triples :
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - -$infModel->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$infModel->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -echo 'Added the following Triples (loop in the ontology) :
    '.htmlentities(' - .').'
    '.htmlentities(' - .'); -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); -$infModel->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triple :
    '.htmlentities(' - .').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$findResult=$infModel->find(new Resource('http://example.org/baz1'),null,null); -echo 'Perform a find(http://example.org/baz1,null,null) :
    '; -$findResult->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Removed the following Triple :
    '.htmlentities(' - .').'
    '; -$infModel->writeAsHtmlTable(); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_rdqlQuery.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_rdqlQuery.php.txt.svn-base deleted file mode 100755 index 295570be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_rdqlQuery.php.txt.svn-base +++ /dev/null @@ -1,131 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - -// Show input model -$model->writeAsHtmlTable(); - - -echo "

    "; - - -echo "
    show the age of all employees ,using the RdqlResultIterator
    "; -$rdql_query = ' -SELECT ?givenName, ?age -WHERE (?x, , ?age), - (?x, , ?blank), - (?blank, , ?givenName) -USING vcard FOR - v FOR '; - -//query model, get RDQLResultIterator -// include(RDFAPI_INLCUDE_DIR.PACKAGE_RDQL); -$rdqlIter = $model->rdqlQueryasIterator($rdql_query); - -//get different Result labels as array -$result_labels=$rdqlIter->getResultLabels(); - -echo "
    Result Label Names: "; -for ($i=0; $i Number of results: ".$rdqlIter->countResults(); -echo "
    Result objects, serialized to string:
    "; -//serialize result to string -while ($rdqlIter->hasNext()) { - $curren_result=$rdqlIter->next(); - echo "
    "; - for ($j=0; $j toString()."
    "; -}; - - - -echo "

    "; - -// show emails of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?email -WHERE (?person ?blank1) - (?blank1 ?givenName) - (?blank1 ?familyName) - (?person ?blank2) - (?blank2 ?email) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" -USING vcard FOR - v FOR '; -$rdqlIter = $model->rdqlQueryAsIterator($rdql_query); - - - - -echo "
    show all employees over 30
    "; - -// show all employees over 30 -$rdql_query = ' -SELECT ?employee, ?age -WHERE (?x, , ?employee), (?x, , ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - -echo "

    "; - - -// find out whose number is it: +1 111 2212 431 -$rdql_query = ' -SELECT ?x, ?type -WHERE (?x, , ?tel), - (?tel, , ?telNumber) - (?tel, , ?type) -AND ?telNumber eq "+1 111 2212 431" -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -echo "

    "; - -// show office telephone numbers of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?telNumber -WHERE (?person ?blank1) - (?blank1 ?givenName) - (?blank1 ?familyName) - (?person ?blank2) - (?blank2 ?telNumber) - (?blank2 ?type) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type eq -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_setoperations.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_setoperations.php.txt.svn-base deleted file mode 100755 index d683c029..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/.svn/text-base/test_setoperations.php.txt.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Test Set Operations - - - - - - -1. Generate and show two MemModels"; - -// Create empty MemModel -$model = ModelFactory::getDefaultModel(); -$model->setbaseURI("http://www.bizer.de"); - -$model2 = ModelFactory::getDefaultModel(); -$model2->setbaseURI("http://www.bizer.de/zwei"); - -// Create nodes and add statements to models -$myhomepage = new Resource("http://www.bizer.de/welcome.html"); -$creator = new Resource("http://purl.org/dc/elements/1.1/creator"); -$me = new Resource("mailto:chris@bizer.de"); -$model->add(new Statement($myhomepage, $creator, $me)); -$model2->add(new Statement($myhomepage, $creator, $me)); - -$creation_date = new Resource("http://www.example.org/terms/creation-date"); -$August16 = new Literal("August 16, 2002"); -$model->add(new Statement($myhomepage, $creation_date, $August16)); -$model2->add(new Statement($myhomepage, $creation_date, $August16)); - -$language = new Resource("http://www.example.org/terms/language"); -$deutsch = new Literal("Deutsch", "de"); -$model->add(new Statement($myhomepage, $language, $deutsch)); - -$name = new Resource("http://www.example.org/terms/Name"); -$chrisbizer = new Literal("Chris Bizer"); -$model2->add(new Statement($me, $name, $chrisbizer)); - -// Output as Table -echo "
    Model 1
    "; -$model->writeAsHtmlTable(); -echo "
    Model 2
    "; -$model2->writeAsHtmlTable(); -echo "

    "; - -echo "

    2. Make some tests

    "; -echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."

    "; -echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."

    "; -echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."

    "; -echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."

    "; -echo "Test: Model 1 equals model 2 :".$model->equals($model2)."

    "; - -echo "

    3. Unite model 1 and model 2

    "; -$model3 =& $model->unite($model2); -$model3->writeAsHtmlTable(); - -echo "

    4. Intersect model 1 and model 2

    "; -$model4 =& $model->intersect($model2); -$model4->writeAsHtmlTable(); - -echo "

    5. Substract model 2 from model 1

    "; -$model5 =& $model->subtract($model2); -$model5->writeAsHtmlTable(); - -echo "

    6. Reify model 1

    "; -$model6 =& $model->reify(); -$model6->writeAsHtmlTable(); - -?> - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_DbModel.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_DbModel.htm deleted file mode 100755 index f98c2bd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_DbModel.htm +++ /dev/null @@ -1,312 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Manipulate DbModel

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Connect to rdf database (e.g. Access via ODBC)

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).
    -

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN)
    - // using connection settings defined in constants.php :
    - $rdf_database = ModelFactory::getDbStore(); -

    -

    Read more about Setting Database Connection.

    -
    -

    2. Load and show a DbModel

    - - - - - - -
    -

    - // Load the model with modelURI "example1.rdf"
    - $dbModel = $rdf_database->getModel("example1.rdf");
    -
    - // Output the model as HTML table
    - $dbModel->writeAsHtmlTable(); -

    -
    -
    - - - - - - -
    Note:  getModel() loads into memory only the modelURI and a database internal - modelID, it also sets a database connection for the DbModel. This saves - main memory and allows to gain advantage of database's indexing capabilities.
    - -

    Output:
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -
    -
    -

    3. Add a statement to the DbModel

    - - - - - - -
    -

    // Ceate a new statement
    - $statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    -              - new Resource("http://description.org/schema/Description"),
    -              - new Literal("Lassilas persönliche Homepage", "de"));
    -
    - // Add the statement to the DbModel
    - $dbModel->add($statement);
    -
    - // Output the string serialization of the DbModel
    - echo $dbModel->toStringIncludingTriples();

    -
    -

    Output:

    -

    MemModel[baseURI=http://www.w3.org/Home/Lassila.rdf#; size=5] Triple(Resource("http://www.w3.org/Home/Lassila"), - Resource("http://description.org/schema/Creator"), bNode("b85740")) - Triple(bNode("b85740"), Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - Resource("http://description.org/schema/Person")) Triple(bNode("b85740"), - Resource("http://example.org/stuff/1.0/Name"), Literal("Ora Lassila", - datatype="http://www.w3.org/TR/xmlschema-2#string")) Triple(bNode("b85740"), - Resource("http://example.org/stuff/1.0/Email"), Literal("lassila@w3.org")) - Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Description"), - Literal("Lassilas persönliche Homepage", lang="de")) -

    -
    -

    4. Search statements

    - - - - - - -
    -

    // Search for statements having object $literal
    - $literal = new Literal("Lassilas persönliche Homepage", - "de");
    - $res = $dbModel->find(NULL, NULL, $literal);
    -
    - // Output the result
    - $res->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 1

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    -

    Literal: Lassilas persönliche Homepage (xml:lang="de")

    -
    -
    -
    -

    5. Replace nodes and serialize the DbModel to XML/RDF

    - - - - - - -
    -

    - // replace a literal
    - $dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"),
    -                               - new Literal ("Lassila's personal Homepage", "en"));
    -
    - // Serialize to RDF
    - $dbModel->writeAsHtml(); -

    -
    - -

    Output:

    -<?xml version='1.0' encoding='UTF-8'?>
    -<rdf:RDF
    -   xml:base="http://www.w3.org/Home/Lassila.rdf#"
    -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    -   xmlns:ns1="http://description.org/schema/"
    -   xmlns:ns2="http://example.org/stuff/1.0/">
    -
    -<ns1:Person rdf:nodeID="b85740">
    -   <ns2:Email>lassila@w3.org</ns2:Email>
    -   <ns2:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora Lassila</ns2:Name>
    -</ns1:Person>
    -
    -<rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    -   <ns1:Creator rdf:nodeID="b85740"/>
    -   <ns1:Description xml:lang="en">Lassila's personal Homepage</ns1:Description>
    -</rdf:Description>
    -
    -</rdf:RDF>
    -

    -

    6. Remove a statement

    - - - - - - -
    -

    $dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"),
    -                                 - new Resource("http://description.org/schema/Description"),
    -                                 new - Literal("Lassila's personal Homepage", "en")));
    -
    - // Output the DbModel
    - $dbModel->writeAsHtmlTable(); -

    -
    - -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -
    -
    -

    7. Generate a MemModel and compare both models

    - - - - - - -
    -

    // Generate a MemModel
    - $memModel = $dbModel->getMemModel();
    -
    - // Compare this DbModel withe the generated MemModel
    - $res = $dbModel->equals($memModel);
    -
    - // Output the result
    - if ($res)
       - echo "models are equal";
    - else
       - echo "models are different"; -

    -
    -

    Output:

    -

    models are equal

    -
    -

    8. Save DbModel to file

    - - - - - - -

    // Save model to file (XML/RDF)
    - $dbModel->saveAs("Output.rdf");
    -
    - // Save model to file (N3)
    - $dbModel->saveAs("Output.n3");
    -
    - // close the DbModel
    - $dbModel->close();

    -
    -
    -

    Output:

    -Files: Output.rdf
    -        Output.n3 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_MemModel.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_MemModel.htm deleted file mode 100755 index 09c3e74d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Manipulate_MemModel.htm +++ /dev/null @@ -1,324 +0,0 @@ - -Test Manipulate RDF Model - - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Manipulate MemModel

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xml:base="http://www.w3.org/Home/Lassila.rdf#"
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="b85740">
    - <rdf:type rdf:resource="http://description.org/schema/Person"/>
    - <ex:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora - Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>

    -

    -
    -

    -

    1. Parse and show model

    - - - - - - -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    - -

    // Filename of an RDF document
    - $base="example1.rdf";

    - -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Output model as HTML table
    - $model->writeAsHtmlTable();

    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -

    -

    2. Add some statements

    - - - - - - -
    -

    // Ceate new statements and add them to model
    - $statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    - new Resource("http://description.org/schema/Description"),
    - new Literal("Lassila's personal Homepage", "en"));
    -
    - $statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"),
    - new Resource("http://description.org/schema/Description"),
    - new Literal("Lassilas persönliche Homepage ", "de"));

    -

    $model->add($statement1);
    - $model->add($statement2);

    -

    $model->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 6

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    5.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassila's personal Homepage (xml:lang="en")

    6.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassilas persnliche Homepage (xml:lang="de")

    -

    -

    3. Search Statements

    - - - - - - -

    // Build search index to speed up searches.
    - $model->index();

    -

    // Search model 1
    - $homepage = new Resource("http://www.w3.org/Home/Lassila");
    - $res = $model->find($homepage, NULL, NULL);

    -

    $res->writeAsHtmlTable();
    - echo "<P>";

    -

    Output:

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 3

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassila's personal Homepage (xml:lang="en") -

    3.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Description

    Literal: Lassilas persnliche Homepage (xml:lang="de") -

    -


    -

    4. Search First Matching Statement

    - - - - - - -

    // Search model 2
    - $description = new Resource("http://description.org/schema/Description");
    - $statement = $model->findFirstMatchingStatement($homepage, $description, - NULL);

    -

    // Check if something was found and output result
    - if ($statement) {
    - echo $statement->toString();
    - } else {
    - echo "Sorry, I didn't find anything.";
    - }
    - echo "<P>";

    -

    Output:

    -

    -

    Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Description"), - Literal("Lassila's personal Homepage", lang="en"))

    - -
    -

    5. Search Vocabulary

    - - - - - - -

    // Search model 3
    - $res3 = $model->findVocabulary("http://example.org/stuff/1.0/");
    - $res3->writeAsHtmlTable();
    - echo "<P>";

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 2

    No.

    Subject

    Predicate

    Object

    1.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string")

    2.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    -

    -


    - 5. Serialize MemModel to RDF

    - - - - - - -

    // Write model as RDF
    - $model->writeAsHtml();

    -
    -

    Output:

    -

    -

    <?xml version='1.0' encoding='UTF-8'?>
    - <rdf:RDF
    -    xml:base="http://www.w3.org/Home/Lassila.rdf#"
    -    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    -    xmlns:ns1="http://description.org/schema/"
    -    xmlns:ns2="http://example.org/stuff/1.0/">
    -
    - <ns1:Person rdf:nodeID="b85740">
    -    <ns2:Email>lassila@w3.org</ns2:Email>
    -    <ns2:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora Lassila</ns2:Name>
    - </ns1:Person>
    -
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    -    <ns1:Creator rdf:nodeID="b85740"/>
    -    <ns1:Description xml:lang="en">Lassila's personal Homepage</ns1:Description>
    -    <ns1:Description xml:lang="de">Lassilas persnliche Homepage </ns1:Description>
    - </rdf:Description>
    -
    - </rdf:RDF>

    -


    - 6. Save manipulated MemModel to file

    - - - - - - -

    // Save model to file
    - $model->saveAs("Output.rdf");

    -

    Output:

    -

    - File: Output.rdf -

     

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_RDQL_Query.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_RDQL_Query.htm deleted file mode 100755 index 7c51417a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_RDQL_Query.htm +++ /dev/null @@ -1,439 +0,0 @@ - -Test RDQL Query - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: RDQL Query

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    1. Load a model to be queried
    -

    - - - - - - -
    -

    // Filename of an RDF document
    - $base="employees.rdf"

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Show input model
    - $model->writeAsHtmlTable();

    -
    -
    -Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: employees.rdf#

    Size: 36

    No.

    Subject

    Predicate

    Object

    1.

    Blank Node: bNode10

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    2.

    Blank Node: bNode10

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: B.Parker@example.com

    3.

    Blank Node: bNode1

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Murphy

    4.

    Blank Node: bNode1

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: Monica

    5.

    Blank Node: bNode2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    6.

    Blank Node: bNode2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 999

    7.

    Blank Node: bNode3

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    8.

    Blank Node: bNode3

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: M.Murphy@example.com

    9.

    Blank Node: bNode4

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Simpson

    10.

    Blank Node: bNode4

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: George

    11.

    Blank Node: bNode5

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    12.

    Blank Node: bNode5

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 101

    13.

    Blank Node: bNode6

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    14.

    Blank Node: bNode6

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: G.Simpson@example.com

    15.

    Blank Node: bNode7

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Family

    Literal: Parker

    16.

    Blank Node: bNode7

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#Given

    Literal: Bill

    17.

    Blank Node: bNode8

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#work

    18.

    Blank Node: bNode8

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2222 668

    19.

    Blank Node: bNode9

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#home

    20.

    Blank Node: bNode9

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#value

    Literal: +1 111 2212 431

    21.

    Resource: http://example.com/employees/BillParker/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 33

    22.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode10

    23.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Bill Parker

    24.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode7

    25.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode8

    26.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode9

    27.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 41

    28.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode6

    29.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: George Simpson

    30.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode4

    31.

    Resource: http://example.com/employees/GeorgeSimpson/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode5

    32.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://sampleVocabulary.org/1.3/People#age

    Literal: 29

    33.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#EMAIL

    Blank Node: bNode3

    34.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Monica Murphy

    35.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#N

    Blank Node: bNode1

    36.

    Resource: http://example.com/employees/MonicaMurphy/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#TEL

    Blank Node: bNode2

    -
    -
    -

    2. Find the age of all employees, use the RdqlResultIterator for traversing - the Result

    -

    Read more about RDQL Syntax.

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?age
    - WHERE (?x, <v:age>, ?age),
    -       (?x, <vcard:N>, ?blank),
    -       (?blank, <vcard:Given>, ?givenName)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    -
    - //query model, get RDQLResultIterator
    - $rdqlIter = $model->rdqlQueryasIterator($rdql_query);
    -
    -
    //get different Result labels as array
    - $result_labels=$rdqlIter->getResultLabels();
    - echo "<BR><b>Result Label Names:</b> ";
    - for ($i=0; $i <count($result_labels); $i++) echo $result_labels[$i]." ";
    -
    - echo "<BR><B>Number of results:</B> ".$rdqlIter->countResults()";
    -
    - //serialize result to string
    -echo "<BR><B>Result objects, serialized to string:</B><BR>";
    - while ($rdqlIter->hasNext()) {
    -  $curren_result=$rdqlIter->next();
    -  echo "<BR>";
    -  for ($j=0; $j <count($result_labels); $j++) echo $curren_result[$result_labels[$j]]->toString()."<BR> ";
    - };

    -
    -
    - - - - - - -
    Note:  The methods rdqlQuery() and rdqlQueryAsIterator() can only query their - own model. If the rdql query string contains a SOURCE clause it will be - ignored - by - the query engine.
    -

    Output:

    -Result Label Names: ?givenName ?age
    -Number of results: 3 -

    Result objects, serialized to string:
    -
    Literal("Monica")
    -Literal("29")

    -

    Literal("George")
    - Literal("41")

    -

    Literal("Bill")
    - Literal("33")

    -

     

    -

    -



    -

    3. Find emails of all employees (using regular expression)

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?familyName, ?email
    - WHERE (?person <vcard:N> ?blank1)
    -       (?blank1 <vcard:Given> ?givenName)
    -       (?blank1 <vcard:Family> ?familyName)
    -       (?person <vcard:EMAIL> ?blank2)
    -       (?blank2 <rdf:value> ?email)
    - AND ?person ~~ "/example.com\/EMPLOYEES\//i"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    -

    Output:

    -
    No.?givenName?familyName?email
    1.

    Literal: Bill

    Literal: Parker

    Literal: B.Parker@example.com

    2.

    Literal: Monica

    Literal: Murphy

    Literal: M.Murphy@example.com

    3.

    Literal: George

    Literal: Simpson

    Literal: G.Simpson@example.com

    - -

    -

    4. Find employees over 30

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?employee
    - WHERE (?x, <vcard:FN>, ?employee),
    -       (?x, <v:age>, ?age)
    - AND ?age > 30
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -

    No.?employee
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    -

    -

    5. Find whose number is it: +1 111 2212 431

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?x, ?type
    - WHERE (?x, <vcard:TEL>, ?tel),
    -       (?tel, <rdf:value>, ?telNumber)
    -       (?tel, <rdf:type>, ?type)
    - AND ?telNumber eq "+1 111 2212 431"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -
    No.?x?type
    1.

    Resource: http://example.com/employees/BillParker/

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#home

    -


    -

    6. Find office telephone number of all employees

    - - - - - - -
    -

    // query string
    - $rdql_query = '
    - SELECT ?givenName, ?familyName, ?telNumber
    - WHERE (?person <vcard:N> ?blank1)
    -       (?blank1 <vcard:Given> ?givenName)
    -       (?blank1 <vcard:Family> ?familyName)
    -       (?person <vcard:TEL> ?blank2)
    -       (?blank2 <rdf:value> ?telNumber)
    -       (?blank2 <rdf:type> ?type)
    - AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type - eq <vcard:work>
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#>';
    -
    - // query the model
    - $res = $model->rdqlQuery($rdql_query);
    -
    - // show result
    - RdqlEngine::writeQueryResultAsHtmlTable($res);

    -
    -

    Output:

    -
    No.?givenName?familyName?telNumber
    1.

    Literal: Monica

    Literal: Murphy

    Literal: +1 111 2222 999

    2.

    Literal: George

    Literal: Simpson

    Literal: +1 111 2222 101

    3.

    Literal: Bill

    Literal: Parker

    Literal: +1 111 2222 668

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Serializer_Options.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Serializer_Options.htm deleted file mode 100755 index f3ed63be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Serializer_Options.htm +++ /dev/null @@ -1,210 +0,0 @@ - -Test Serializer Options - - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Serializer Options

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xml:base="http://www.w3.org/Home/Lassila.rdf#"
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description rdf:about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="b85740">
    - <rdf:type rdf:resource="http://description.org/schema/Person"/>
    - <ex:Name rdf:datatype="http://www.w3.org/TR/xmlschema-2#string">Ora - Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>

    -
    -

    -

    1. Load and show document

    - - - - - - -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    - include(RDFAPI_INCLUDE_DIR . "PACKAGE_SYNTAX_RDF");

    -

    // Filename of a RDF document
    - $base="example1.rdf";

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -

    // Output model as HTML table
    - $model->writeAsHtmlTable();

    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://www.w3.org/Home/Lassila.rdf#

    Size: 4

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://www.w3.org/Home/Lassila

    Resource: http://description.org/schema/Creator

    Blank Node: b85740

    2.

    Blank Node: b85740

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://description.org/schema/Person

    3.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Name

    Literal: Ora Lassila (rdf:datatype="http://www.w3.org/TR/xmlschema-2#string") -

    4.

    Blank Node: b85740

    Resource: http://example.org/stuff/1.0/Email

    Literal: lassila@w3.org

    - -

    -

     

    -

    2. Create Serializer and serialize model to RDF with default configuration

    - - - - - - -

    // Create Serializer and serialize model - to RDF with default configuration
    - $ser = new RDFSerializer();
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='20'>" . - $rdf . "</textarea>";

    -

    Output:

    -

    -

     

    -

    3. Serialize model to RDF using attributes

    - - - - - - -

    // Serialize model to RDF using attributes
    - $ser->configUseAttributes(TRUE);
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='20'>" . - $rdf . "</textarea>";
    - $ser->configUseAttributes(FALSE);

    -

    Output:

    -

    -

     

    -

    4. Serialize model to RDF using entities

    - - - - - - -

    // Serialize model to RDF using entities
    - $ser->configUseEntities(TRUE);
    - $rdf =& $ser->serialize($model);
    - echo "<p><textarea cols='110' rows='30'>" . - $rdf . "</textarea>";
    - $ser->configUseEntities(FALSE);

    -

    Output:

    - -

     

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Database_Connection.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Database_Connection.htm deleted file mode 100755 index 305d5529..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Database_Connection.htm +++ /dev/null @@ -1,124 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Set Database Connection

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    - - - - - - -
    Note:  RAP uses ADOdb Library for PHP V4.52 (http://adodb.sourceforge.net/), - which allows you to connect to multiple databases in a portable manner. - For a list of supported databases see the ADOdb - documentation.
    -

    -

    1. Connect to MsAccess database (via ODBC) and create tables.

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN) using connection settings
    - // defined in constants.php :
    - // -------------------------------------------------------
    - // Database
    - // -------------------------------------------------------
    - // define("ADODB_DB_DRIVER", "odbc");
    - // define("ADODB_DB_HOST", "rdf_db");
    - // define("ADODB_DB_NAME", "");
    - // define("ADODB_DB_USER", "");
    - // define("ADODB_DB_PASSWORD", "");
    - $rdf_database = ModelFactory::getDbStore();
    -  
    - // Create tables for MsAccess
    - $rdf_database->createTables('MsAccess');

    -
    -
    -

    2. Connect to MySQL database and create tables.

    - - - - - - -
    -

    - - // Connect to MySQL database with user defined connection settings
    - $rdf_database = ModelFactory::getDbStore('MySQL', 'host', 'db_name', 'user_name', 'password');
    -  
    - // Create tables for MySQL
    - $mysql_database->createTables('MySQL');

    -
    -
    -

    3. Connect to other databases

    - - - - - - -
    -

    - - // Example:
    - // Connect to Oracle database with user defined connection settings
    - $oracle_database = ModelFactory::getDbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); -
    -

    -
    - - - - - - -
    Note:  Method createTables() currently supports only MySQL, MS SQL Server, and MsAccess.
    - If you want to use other databases, you will have to create tables by yourself - according to the abstract database schema - provided with the API documentation.
    -
    -
    -

    4. Close the database connection

    - - - - - - -
    -

    - - // Close the connection
    - $rdf_database->close(); -
    -

    -
    -
    - - - - - - -
    Warning:  If you close the rdf database all active instances of DbModel from this - DbStore will lose their database connection !!!
    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Operations.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Operations.htm deleted file mode 100755 index 31a74f8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Set_Operations.htm +++ /dev/null @@ -1,472 +0,0 @@ - -Test Set Operations - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Set Operations

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Generate and show two models

    - - - - - - -
    -

    define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    -

    echo "<h3>1. Generate and show two MemModels</h3>";

    -

    // Create empty MemModel
    - $model = ModelFactory::getDefaultModel();

    - $model->setbaseURI("http://www.bizer.de");

    -

    $model2 = ModelFactory::getDefaultModel();
    - $model2->setbaseURI("http://www.bizer.de/zwei");

    -

    // Create Nodes and add statements to models
    - $myhomepage = new Resource("http://www.bizer.de/welcome.html");
    - $creator = new Resource("http://purl.org/dc/elements/1.1/creator");
    - $me = new Resource("mailto:chris@bizer.de");
    - $model->add(new Statement($myhomepage, $creator, $me));
    - $model2->add(new Statement($myhomepage, $creator, $me));

    -

    $creation_date = new Resource("http://www.example.org/terms/creation-date");
    - $August16 = new Literal("August 16, 2002");
    - $model->add(new Statement($myhomepage, $creation_date, $August16));
    - $model2->add(new Statement($myhomepage, $creation_date, $August16));

    -

    $language = new Resource("http://www.example.org/terms/language");
    - $deutsch = new Literal("Deutsch", "de");
    - $model->add(new Statement($myhomepage, $language, $deutsch));

    -

    $name = new Resource("http://www.example.org/terms/Name");
    - $chrisbizer = new Literal("Chris Bizer");
    - $model2->add(new Statement($me, $name, $chrisbizer));

    -

    // Output as Table
    - echo "<h5>Model 1</h5>";
    - $model->writeAsHtmlTable();
    - echo "<h5>Model 2</h5>";
    - $model2->writeAsHtmlTable();

    -
    -

    Output:

    -Model 1 - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -
    -Model 2 - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de/zwei#

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: mailto:chris@bizer.de

    -

    Resource: http://www.example.org/terms/N
    ame

    -

    Literal: Chris Bizer

    -


    -

    2. Make some tests

    - - - - - - -
    -

    echo "<h2>2. Make some tests</h2>";
    - echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."<p>"; -
    - echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."<p>"; -
    - echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."<p>"; -
    - echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."<p>"; -
    - echo "Test: Model 1 equals model 2 :".$model->equals($model2)."<p>"; -

    -
    -

    Output:

    -

    Test: Model 2 contains any statements from model 1 :1

    -

    Test: Model 1 contains any statements from model 2 :1 -

    Test: Model 2 contains all statements from model 1 : -

    Test: Model 1 contains all statements from model 2 : -

    Test: Model 1 equals model 2 : -

    -

    -

    3. Unite model 1 and model 2

    - - - - - - -
    -

    echo "<h3>3. Unite model 1 and model 2</h3>";
    - $model3 =& $model->unite($model2);
    - $model3->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 4

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

    3.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -

    4.

    -

    Resource: mailto:chris@bizer.de

    -

    Resource: http://www.example.org/terms/N
    ame

    -

    Literal: Chris Bizer

    -

     

    4. Intersect model 1 and model 2

    - - - - - - -
    -

    echo "<h3>4. Intersect model 1 and model 2</h3>";
    - $model4 =& $model->intersect($model2);
    - $model4->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 2

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    Resource: mailto:chris@bizer.de

    -

    2.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    Literal: August 16, 2002

    -

     

    5. Substract model 2 from model 1

    - - - - - - -
    -

    echo "<h3>5. Substract model 2 from model 1</h3>";
    - $model5 =& $model->subtract($model2);
    - $model5->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 1

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    Literal: Deutsch (xml:lang="de")

    -

     

    6. Reify model 1

    - - - - - - -
    -

    echo "<h3>6. Reify model 1</h3>";
    - $model6 =& $model->reify();
    - $model6->writeAsHtmlTable();

    -
    -

    Output:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI: http://www.bizer.de#

    -

    Size: 12

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    2.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    3.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://purl.org/dc/elements/1.
    1/creator

    -

    4.

    -

    Blank Node: bNode1

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Resource: mailto:chris@bizer.de

    -

    5.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    6.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    7.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/terms/c
    reation-date

    -

    8.

    -

    Blank Node: bNode2

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Literal: August 16, 2002

    -

    9.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#type

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#Statement

    -

    10.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#subject

    -

    Resource: http://www.bizer.de/welcome.ht
    ml

    -

    11.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/terms/l
    anguage

    -

    12.

    -

    Blank Node: bNode3

    -

    RDF NS Node: - http://www.w3.org/1999/02/2
    2-rdf-syntax-ns#object

    -

    Literal: Deutsch -(xml:lang="de")

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Storing_Models_in_Database.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Storing_Models_in_Database.html deleted file mode 100755 index 6b1ea27e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_Storing_Models_in_Database.html +++ /dev/null @@ -1,131 +0,0 @@ - -Test Set Database Connection - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Storing Models in Database

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -
    -

    1. Connect to rdf database (e.g. Access via ODBC)

    -

    Set the system DSN for the particular database file (control pannel -> administrative - tools -> data sources (odbc) -> system DSN).
    - If you want to use other databases read: Set - Database Connection.

    - - - - - - -
    -

    // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -  
    - // Connect to MsAccess database (rdf_db DSN)
    - // using connection settings defined in constants.php :
    - $rdf_database = ModelFactory::getDbStore(); -

    -
    -
    -

    2. Store a memory model in rdf database

    -

    Load an RDF-Documtent into a memory model

    - - - - - - -
    -

    // Filename of an RDF document
    - $base="example1.rdf";
    -
    - // Create a new memory model
    - $memModel = ModelFactory::getDefaultModel();
    -
    - // Load and parse document
    - $memModel->load($base);

    -
    -

    Now store the model in database

    - - - - - - -
    -

    // An unique modelURI will be generated
    - $rdf_database->putModel($memModel);
    -
    - // You can also provide an URI for the model to be stored
    - $modelURI = "example1.rdf";
    -
    - // But then you must check if there already is a model with the same modelURI
    - // otherwise the method putModel() will return FALSE
    - if ($rdf_database->modelExists($modelURI))
    -    echo "Model with the same URI: '$modelURI' already exists"; -
    - else
    -    $rdf_database->putModel($memModel, $modelURI);

    -
    -
    -
    -

    3. Create a new database Model

    - - - - - - -
    -

    $modelURI = "newDbModel";
    -
    - // Base URI of the new model (optional)
    - $baseURI = "baseURIofMyNewDbModel#";
    -
    - // Get a new DbModel
    - if ($rdf_database->modelExists($modelURI))
    -    echo "Model with the same URI: '$modelURI' already exists"; -
    - else
    -    $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); -

    -
    -
    -
    -

    4. List all models stored in rdf database

    - - - - - - -
    -

    // Get an array with modelURI and baseURI of all models stored - in rdf database
    - $list = $rdf_database->listModels();
    -
    - // Show the database contents
    - foreach ($list as $model) {
    -    echo "modelURI: " .$model['modelURI'] ."<BR>";
    -    echo "baseURI : " .$model['baseURI'] ."<BR><BR>";
    - }

    -
    -

    Output:
    -
    -modelURI: DbModel-1
    -baseURI : http://www.w3.org/Home/Lassila.rdf#
    -
    -modelURI: example1.rdf
    -baseURI : http://www.w3.org/Home/Lassila.rdf#
    -
    -modelURI: newDbModel
    -baseURI : baseURIofMyNewDbModel# -

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_TraverseModel.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_TraverseModel.htm deleted file mode 100755 index 7aa447ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/Test_TraverseModel.htm +++ /dev/null @@ -1,130 +0,0 @@ - - -Test Manipulate RDF Model - - - - - -

    RDF API for PHP V0.9.3

    -

    Test: Traverse RDF Model

    -


    -This example is part of the RAP - Rdf API for PHP documentation.

    -

    Used document: example1.rdf

    - - - - - - -

    <?xml version="1.0"?>
    - <rdf:RDF
    - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    - xmlns:dc="http://purl.org/dc/elements/1.1/"
    - xmlns:ex="http://example.org/stuff/1.0/"
    - xmlns:s="http://description.org/schema/">
    - <rdf:Description about="http://www.w3.org/Home/Lassila">
    - <s:Creator>
    - <rdf:Description rdf:nodeID="e85740">
    - <rdf:type resource="http://description.org/schema/Person"/>
    - <ex:Name>Ora Lassila</ex:Name>
    - <ex:Email>lassila@w3.org</ex:Email>
    - </rdf:Description>
    - </s:Creator>
    - </rdf:Description>
    - </rdf:RDF>
    -

    -
    -

    -

    1. Parse model

    - - - - - - -
    -

    //include RDF API
    - define("RDFAPI_INCLUDE_DIR", "C:/OpenSA/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");

    -

    // Filename of an RDF document
    - $base="example1.rdf";

    -

    // Create a new MemModel
    - $model = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    - $model->load($base);

    -
    -

     

    -

    2. Get Iterator and traverse the model forward.

    - - - - - - -

    // Get Iterator from model
    - $it = $model->getStatementIterator();

    -

    // Traverse model and output statements
    - while ($it->hasNext()) {
    -    $statement = $it->next();
    -    echo "Statement number: " . $it->getCurrentPosition() - . "<BR>";
    -    echo "Subject: " . $statement->getLabelSubject() - . "<BR>";
    -    echo "Predicate: " . $statement->getLabelPredicate() - . "<BR>";
    -    echo "Object: " . $statement->getLabelObject() - . "<P>";
    - }

    -

    Output:

    -

    Statement number: 0
    - Subject: http://www.w3.org/Home/Lassila
    - Predicate: http://description.org/schema/Creator
    - Object: e85740
    -
    - Statement number: 1
    - Subject: e85740
    - Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type
    - Object: http://description.org/schema/Person

    -

    Statement number: 2
    - Subject: e85740
    - Predicate: http://example.org/stuff/1.0/Name
    - Object: Ora Lassila

    -

    Statement number: 3
    - Subject: e85740
    - Predicate: http://example.org/stuff/1.0/Email
    - Object: lassila@w3.org

    -

     

    -

    3. And now the same backward with a jump to the middle afterwards :-)

    - - - - - - -

    // Move to the last statement and print - it
    - $it->moveLast();
    - $statement = $it->current();

    -

    // Traverse model backward and print statements
    - echo $statement->toString() . "<BR>";
    - while($it->hasPrevious()) {
    -    $statement = $it->previous();
    -    echo $statement->toString() . "<BR>";
    - }

    -

    // Jump to statement 2 and print it
    - $it->moveTo(2);
    - $statement = $it->current();
    - echo $statement->toString() . "<BR>";

    -

    Output:

    -

    Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Email"), - Literal("lassila@w3.org"))
    - Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Name"), - Literal("Ora Lassila"))
    - Triple(bNode("e85740"), Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - Resource("http://description.org/schema/Person"))
    - Triple(Resource("http://www.w3.org/Home/Lassila"), Resource("http://description.org/schema/Creator"), - bNode("e85740"))
    - Triple(bNode("e85740"), Resource("http://example.org/stuff/1.0/Name"), - Literal("Ora Lassila")) -

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/phpdoc.CSS b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/phpdoc.CSS deleted file mode 100755 index 004c5a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/phpdoc.CSS +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateDbModel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateDbModel.php.txt deleted file mode 100755 index 9761ba54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateDbModel.php.txt +++ /dev/null @@ -1,120 +0,0 @@ - - - - Test Store Models in Database - - - -getModel("example1.rdf"); - -// Output the model as HTML table -$dbModel->writeAsHtmlTable(); - -echo "

    "; - -## 3. Add a statement tho the DbModel -## ---------------------------------- - -// Ceate a new statement -$statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage", "de")); - -// Add the statement to the DbModel -$dbModel->add($statement); - -// Output the string serialization of the DbModel -echo $dbModel->toStringIncludingTriples(); - -echo "

    "; - - -## 4. Search statements -## --------------------- - -// Search for statements having object $literal -$literal = new Literal("Lassilas persnliche Homepage", "de"); -$res = $dbModel->find(NULL, NULL, $literal); - -// Output the result -$res->writeAsHtmlTable(); - -echo "
    "; - - -## 5. 5. Replace nodes and serialize the DbModel to XML/RDF -## -------------------------------------------------------- - -// replace a literal -$dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"), - new Literal ("Lassila's personal Homepage", "en")); - -// Serialize to RDF -$dbModel->writeAsHtml(); - -echo "

    "; - - -## 6. Remove a statement -## --------------------- - -$dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal ("Lassila's personal Homepage", "en"))); - -// Output the DbModel -$dbModel->writeAsHtmlTable(); - -echo "
    "; - - -## 7. Generate a MemModel and compare both models -## ---------------------------------------------- - -// Generate a MemModel -$memModel = $dbModel->getMemModel(); - -// Compare this DbModel withe the generated MemModel -$res = $dbModel->equals($memModel); - -if ($res) - echo "models are equal"; -else - echo "models are different"; - -echo "
    "; - - -## 8. Save DbModel to file -## ---------------------------------------------- - -// Save DbModel to file (XML/RDF) -$dbModel->saveAs("Output.rdf"); - -// Save DbModel to file (N3) -$dbModel->saveAs("Output.n3"); - -// close the DbModel -$dbModel->close(); - -?> - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateMemModel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateMemModel.php.txt deleted file mode 100755 index 65865897..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateMemModel.php.txt +++ /dev/null @@ -1,75 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -$res->writeAsHtmlTable(); -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); -$res3->writeAsHtmlTable(); -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateModel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateModel.php.txt deleted file mode 100755 index b48a5137..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ManipulateModel.php.txt +++ /dev/null @@ -1,87 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -// Check if something was found and output result -if ($res) { - $res->writeAsHtmlTable(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); - -// Check if something was found and output result -if ($res3) { - $res3->writeAsHtmlTable(); -} else { - echo "Sorry, I didn't find anything of the spezified vocabulary."; -} -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.htm deleted file mode 100755 index d4b28820..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.htm +++ /dev/null @@ -1,96 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the Dataset API

    -
    -This example is part of the RAP - Rdf API for PHP documentation. -

    Working with NamedGraphSets:

    - - - - - - -
    -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //get a GraphSet from the ModelFactory
    - $graphset = ModelFactory::getDatasetMem('Dataset1');

    -

    // Create a new NamedGraphsMem
    - $graph1 = new NamedGraphMem('http://graph1');
    - $graph2 =& $graphset->createGraph('http://graph2');

    -

    //create Quads
    - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1'));
    - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2'));
    - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3'));
    - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5'));

    -

    //add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically
    - $graphset->addQuad($quad1);
    - $graphset->addQuad($quad3);
    - $graphset->addQuad($quad2);

    -

    //add a NamedGraph to the Set
    - $graphset->addNamedGraph($graph1);

    -

    //Is the Graph "http://graph1" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph1" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph1'));
    - echo'<p/>';

    -

    //remove 'http://graph2' from the set
    - $graphset->removeNamedGraph('http://graph2');

    -

    //Is the Graph "http://graph2" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph2" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph2'));
    - echo'<p/>';

    -

    //creat basic statement
    - $statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'));

    -

    //get a Graph from the Set and add a basic statement
    - $graph4=&$graphset->getNamedGraph('http://graph4');
    - $graph4->add($statement);

    -

    //remove Quad5
    - $graphset->removeQuad($quad5);

    -

    //get an iterator over all Quads
    - echo '<p/><b>All Quads:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -   $quad=$iterator->current();
    -   echo $quad->toString().'<BR>';
    - };

    -

    //get an iterator over all Quads in 'http://graph3'
    - echo '<p/><b>All Quads in http://graph3:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next())
    - {
    -   $quad=$iterator->current();
    -   echo $quad->toString().'<BR>';
    - };

    -

    //how many Quads are in the whole GraphSet
    - echo '<p/><b>How many Quads are in the whole GraphSet?</b><BR>';
    - echo $graphset->countQuads();

    -

    //does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - echo '<p/><b>Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?</b><BR>';
    - var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')));
    - ?>

    -

    Output:

    -

    Is the Graph "http://graph1" part of the GraphSet?
    -bool(true)

    -

    Is the Graph "http://graph2" part of the GraphSet?
    -bool(false) -

    All Quads:
    - GraphName(http://graph3) Triple(Resource("http://subject1"), Resource("http://predicate1"), Resource("http://object1"))
    - GraphName(http://graph3) Triple(Resource("http://subject2"), Resource("http://predicate2"), Resource("http://object2"))
    - GraphName(http://graph4) Triple(Resource("http://subject3"), Resource("http://predicate3"), Resource("http://object3"))
    -GraphName(http://graph4) Triple(Resource("http://subject4"), Resource("http://predicate4"), Resource("http://object4")) -

    All Quads in http://graph3:
    - GraphName(http://graph3) Triple(Resource("http://subject1"), Resource("http://predicate1"), Resource("http://object1"))
    -GraphName(http://graph3) Triple(Resource("http://subject2"), Resource("http://predicate2"), Resource("http://object2")) -

    How many Quads are in the whole GraphSet?
    - 4 -

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - bool(true)

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.php.txt deleted file mode 100755 index 61705c77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_NamedGraphsMem.php.txt +++ /dev/null @@ -1,73 +0,0 @@ -createGraph('http://graph2'); - -//create Quads -$quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); -$quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); -$quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); -$quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - -//add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically -$graphset->addQuad($quad1); -$graphset->addQuad($quad3); -$graphset->addQuad($quad2); - -//add a NamedGraph to the Set -$graphset->addNamedGraph($graph1); - -//Is the Graph "http://graph1" part of the GraphSet? -echo 'Is the Graph "http://graph1" part of the GraphSet?
    '; -var_dump($graphset->containsNamedGraph('http://graph1')); -echo'

    '; - -//remove 'http://graph2' from the set -$graphset->removeNamedGraph('http://graph2'); - -//Is the Graph "http://graph2" part of the GraphSet? -echo 'Is the Graph "http://graph2" part of the GraphSet?
    '; -var_dump($graphset->containsNamedGraph('http://graph2')); -echo'

    '; - -//creat basic statement -$statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')); - -//get a Graph from the Set and add a basic statement -$graph4=&$graphset->getNamedGraph('http://graph4'); -$graph4->add($statement); - -//remove Quad5 -$graphset->removeQuad($quad5); - -//get an iterator over all Quads -echo '

    All Quads:
    '; -for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//get an iterator over all Quads in 'http://graph3' -echo '

    All Quads in http://graph3:
    '; -for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//how many Quads are in the whole GraphSet -echo '

    How many Quads are in the whole GraphSet?
    '; -echo $graphset->countQuads(); - -//does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ? -echo '

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    '; -var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'))); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.html deleted file mode 100755 index d03b99fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.html +++ /dev/null @@ -1,186 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the ResModel

    -
    -This example is part of the RAP - Rdf API for PHP documentation. -


    -Setting up the model:

    - - - - - - -
    -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    // Some definitions
    - define('VCARD_NS', 'http://www.w3.org/2001/vcard-rdf/3.0#');
    - $personURI = "http://somewhere/JohnSmith";
    - $fullName = "John Smith";

    -

    // Create an empty Model
    - $model = ModelFactory::getResModel(MEMMODEL);

    -

    // Create the resources
    - $fullNameLiteral = $model->createLiteral($fullName);
    - $johnSmith = $model->createResource($personURI);
    - $vcard_FN= $model->createProperty(VCARD_NS.'FN');
    - $vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME');

    -

    // Add the property
    - $johnSmith->addProperty($vcard_FN, $fullNameLiteral);

    -

    // Retrieve the John Smith vcard resource from the model
    - $vCard = $model->createResource($personURI);

    -

    // Retrieve the value of the FN property
    - $statement = $vCard->getProperty($vcard_FN);
    - $value = $statement->getObject();

    -

    // Add two nickname properties to vcard
    - $literal1 = $model->createLiteral("Smithy");
    - $literal2 = $model->createLiteral("Adman");
    - $vCard->addProperty($vcard_NICKNAME, $literal1);
    - $vCard->addProperty($vcard_NICKNAME, $literal2);
    -

    -
    - - - - - - -
    -

    // List the nicknames
    - echo '<b>Known nicknames for '.$fullNameLiteral->getLabel().':</b><BR>';
    - foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource)
    - {
    -    echo $currentResource->getLabelObject().'<BR>';
    -};

    -

    Known nicknames for John Smith:
    - Smithy
    - Adman
    -

    - - - - - - -
    -

    echo '<BR><b>Iterate over all subjects which having FN property:</b><br>';
    - // Iterate over all subjects which having FN property
    - $iter = $model->listSubjectsWithProperty($vcard_FN);
    - for ($iter->rewind(); $iter->valid(); $iter->next())
    - {
    -     $currentResource=$iter->current();
    -    echo $currentResource->getLabel().'<BR>';
    -};

    -

    Iterate over all subjects which having FN property:
    - http://somewhere/JohnSmith
    -
    -

    -

    Create a Bag:

    - - - - - - -
    -

    // Create a bag
    - $bag_smiths = $model->createBag();

    -

    $beckySmith = $model->createResource('http://somewhere/BeckySmith');
    - $beckySmithFN = $model->createLiteral('Becky Smith');
    - $beckySmith->addProperty($vcard_FN,$beckySmithFN );

    -

    // Add persons to bag
    - $bag_smiths->add($beckySmith);
    - $bag_smiths->add($johnSmith);

    -

     

    - - - - - - -
    -

    // Print out the full names of the members of the bag
    - echo '<BR><BR><b>Print out the full names of the members of the bag:</b></BR>';
    - foreach ($bag_smiths->getMembers() as $resResource)
    - {
    -    // Retrieve the value of the FN property
    -    $statement = $resResource->getProperty($vcard_FN);
    -    echo $statement->getLabelObject().'<BR>';
    -};

    -

    Print out the full names of the members of the bag:
    - Becky Smith
    - John Smith
    -
    -

    - - - - - - -
    -

    echo '<BR><BR>All Statements as HTML table';
    - $model->writeAsHTMLTable();

    -

    All Statements as HTML table

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI:

    Size: 7

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: John Smith

    2.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#NICKNAME

    Literal: Smithy

    3.

    Resource: http://somewhere/JohnSmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#NICKNAME

    Literal: Adman

    4.

    Resource: http://somewhere/BeckySmith

    Resource: http://www.w3.org/2001/vcard-rdf/3.0#FN

    Literal: Becky Smith

    5.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag

    6.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#_1

    Resource: http://somewhere/BeckySmith

    7.

    Blank Node: bNode1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#_2

    Resource: http://somewhere/JohnSmith

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.php.txt deleted file mode 100755 index 7641c24a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_ResModel.php.txt +++ /dev/null @@ -1,82 +0,0 @@ -createLiteral($fullName); -$johnSmith = $model->createResource($personURI); -$vcard_FN= $model->createProperty(VCARD_NS.'FN'); -$vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME'); - -// Add the property -$johnSmith->addProperty($vcard_FN, $fullNameLiteral); - -// Retrieve the John Smith vcard resource from the model -$vCard = $model->createResource($personURI); - -// Retrieve the value of the FN property -$statement = $vCard->getProperty($vcard_FN); -$value = $statement->getObject(); - -// Add two nickname properties to vcard -$literal1 = $model->createLiteral("Smithy"); -$literal2 = $model->createLiteral("Adman"); -$vCard->addProperty($vcard_NICKNAME, $literal1); -$vCard->addProperty($vcard_NICKNAME, $literal2); - - -// List the nicknames -echo 'Known nicknames for '.$fullNameLiteral->getLabel().':
    '; -foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource) -{ - echo $currentResource->getLabelObject().'
    '; -}; - - -echo '
    Iterate over all subjects which having FN property:
    '; -// Iterate over all subjects which having FN property -$iter = $model->listSubjectsWithProperty($vcard_FN); -for ($iter->rewind(); $iter->valid(); $iter->next()) -{ -$currentResource=$iter->current(); - echo $currentResource->getLabel().'
    '; -}; - - -// Create a bag -$bag_smiths = $model->createBag(); - -$beckySmith = $model->createResource('http://somewhere/BeckySmith'); -$beckySmithFN = $model->createLiteral('Becky Smith'); -$beckySmith->addProperty($vcard_FN,$beckySmithFN ); - -// Add persons to bag -$bag_smiths->add($beckySmith); -$bag_smiths->add($johnSmith); - - -// Print out the full names of the members of the bag -echo '

    Print out the full names of the members of the bag:
    '; -foreach ($bag_smiths->getMembers() as $resResource) -{ - // Retrieve the value of the FN property - $statement = $resResource->getProperty($vcard_FN); - echo $statement->getLabelObject().'
    '; -}; - - -echo '

    All Statements as HTML table'; -$model->writeAsHTMLTable(); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SerializerOptions.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SerializerOptions.php.txt deleted file mode 100755 index 597e7979..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SerializerOptions.php.txt +++ /dev/null @@ -1,47 +0,0 @@ - - - - Test Serializer Options - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - - -// Create Serializer and serialize model to RDF with default configuration -include(RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_RDF); -$ser = new RDFSerializer(); -$rdf =& $ser->serialize($model); -echo "

    "; - -// Serialize model to RDF using attributes -$ser->configUseAttributes(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseAttributes(FALSE); - -// Serialize model to RDF using entities -$ser->configUseEntities(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseEntities(FALSE); - -?> - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SetDatabaseConnection.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SetDatabaseConnection.php.txt deleted file mode 100755 index 9bc08827..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_SetDatabaseConnection.php.txt +++ /dev/null @@ -1,67 +0,0 @@ - - - - Test Store Models in Database - - - -createTables('MsAccess'); - - - -## 2. Connect to MySQL database and create tables. - -/* -// Connect to MySQL database with user defined connection settings -$rdf_database = ModelFactory::getDbStore('MySQL', 'localhost', 'db_name', 'user_name', 'password' ); - -// Create tables for MySQL -$rdf_database->createTables('MySQL'); -*/ - - - -## 3. Connect to other databases - -/* -// Example: -// Connect to Oracle database with user defined connection settings -$rdf_database = ModelFactory::getDbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); - -// Note: Method createTables() currently supports only MySQL and MsAccess. -// If you want to use other databases, you will have to create tables by yourself -// according to the abstract database schema described in the API documentation. -*/ - - -## 4. Close the database connection - -// Close the connection -$rdf_database->close(); - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_StoringModelsInDatabase.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_StoringModelsInDatabase.php.txt deleted file mode 100755 index f7d51669..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_StoringModelsInDatabase.php.txt +++ /dev/null @@ -1,82 +0,0 @@ - - - - Test Store Models in Database - - - -load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - -?> - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_TraverseModel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_TraverseModel.php.txt deleted file mode 100755 index d9b605b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_TraverseModel.php.txt +++ /dev/null @@ -1,55 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - - -// Get Iterator from model -$it = $model->getStatementIterator(); - -// Traverse model and output statements -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} - -// Move to the last statement and print it -$it->moveLast(); -$statement = $it->current(); - -// Traverse model backward and print statements -echo $statement->toString() . "
    "; -while($it->hasPrevious()) { - $statement = $it->previous(); - echo $statement->toString() . "
    "; -} - -// Jump to statement 2 and print it -$it->moveTo(2); -$statement = $it->current(); -echo $statement->toString() . "
    "; - -?> - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.html deleted file mode 100755 index 26c637d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.html +++ /dev/null @@ -1,539 +0,0 @@ - - -

    RDF API for PHP V0.9.3

    -

    Test: Using the InfModel

    -
    -This example is part of the RAP - Rdf API for PHP documentation.
    -
    -Setting up the model: - - - - - - -
    -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //create a InfmodelF
    - $infModel= ModelFactory::getInfModelF('http://InfModelF.org');

    -


    - Added the following Triples:

    -<http://example.org/baz1> <http://example.org/bat> <http://example.org/baz2> .
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://example.org/bas> .

    - - - - - - -
    -

    //add new statements
    - $infModel->add(new Statement(new Resource('http://example.org/baz1'),
    -                                           new Resource('http://example.org/bat'),
    -                                           new Resource('http://example.org/baz2')));
    -
    - $infModel->add(new Statement(new Resource('http://example.org/bat'),
    -                                           new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),
    -                                           new Resource('http://example.org/bas')));

    -

    //output the model as HTML table
    - $infModel->writeAsHtmlTable();
    -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 3

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    -


    Added the following Triples:
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.org/Domain1> .
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.org/Range1> . -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 7

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    -


    Added the following Triples :
    -<http://example.org/bas> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.org/Domain2> .
    -<http://example.org/bas> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.org/Range2> . -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 11

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    -


    Added the following Triples (loop in the ontology) :
    -<http://example.org/Domain2> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://example.org/Domain3> .
    -<http://example.org/Domain3> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://example.org/Domain2> . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 14

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    12.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    13.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    14.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    -


    Added the following Triple :
    -<http://example.org/Range3> <http://www.w3.org/2002/07/owl#sameAs> <http://example.org/Range2> .
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 16

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subPropertyOf

    Resource: http://example.org/bas

    3.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    4.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    6.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    7.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    8.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    9.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    10.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range2

    12.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    13.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    14.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    15.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    16.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range3

    -


    Perform a find(http://example.org/baz1,null,null) :
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 5

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.
    (infered)

    Resource: http://example.org/baz1

    Resource: http://example.org/bas

    Resource: http://example.org/baz2

    3.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    4.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain2

    5.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain3

    -


    Removed the following Triple :
    -<http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://example.org/bas> .
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Base URI: http://InfModelF.org#

    Size: 11

    No.

    Subject

    Predicate

    Object

    1.

    Resource: http://example.org/baz1

    Resource: http://example.org/bat

    Resource: http://example.org/baz2

    2.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain1

    3.

    Resource: http://example.org/bat

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range1

    4.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#domain

    Resource: http://example.org/Domain2

    5.

    Resource: http://example.org/bas

    RDF Node: http://www.w3.org/2000/01/rdf-schema#range

    Resource: http://example.org/Range2

    6.

    Resource: http://example.org/Domain2

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain3

    7.

    Resource: http://example.org/Domain3

    RDF Node: http://www.w3.org/2000/01/rdf-schema#subClassOf

    Resource: http://example.org/Domain2

    8.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    9.

    Resource: http://example.org/Range3

    RDF Node: http://www.w3.org/2002/07/owl#sameAs

    Resource: http://example.org/Range2

    10.
    (infered)

    Resource: http://example.org/baz1

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Domain1

    11.
    (infered)

    Resource: http://example.org/baz2

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    Resource: http://example.org/Range1

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.php.txt deleted file mode 100755 index 6b51466a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_infmodel.php.txt +++ /dev/null @@ -1,83 +0,0 @@ -add(new Statement(new Resource('http://example.org/baz1'),new Resource('http://example.org/bat'),new Resource('http://example.org/baz2'))); -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Added the following Triples:
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; - -//output the model as HTML table -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - -echo 'Added the following Triples:
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - - - -$infModel->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$infModel->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triples :
    '.htmlentities(' - .').'
    '.htmlentities(' - . -').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - -$infModel->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$infModel->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -echo 'Added the following Triples (loop in the ontology) :
    '.htmlentities(' - .').'
    '.htmlentities(' - .'); -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); -$infModel->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triple :
    '.htmlentities(' - .').'
    '; -$infModel->writeAsHtmlTable(); -echo '


    '; - - - -$findResult=$infModel->find(new Resource('http://example.org/baz1'),null,null); -echo 'Perform a find(http://example.org/baz1,null,null) :
    '; -$findResult->writeAsHtmlTable(); -echo '


    '; - - - -$infModel->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Removed the following Triple :
    '.htmlentities(' - .').'
    '; -$infModel->writeAsHtmlTable(); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_rdqlQuery.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_rdqlQuery.php.txt deleted file mode 100755 index 23993074..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_rdqlQuery.php.txt +++ /dev/null @@ -1,131 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - -// Show input model -$model->writeAsHtmlTable(); - - -echo "

    "; - - -echo "
    show the age of all employees ,using the RdqlResultIterator
    "; -$rdql_query = ' -SELECT ?givenName, ?age -WHERE (?x, , ?age), - (?x, , ?blank), - (?blank, , ?givenName) -USING vcard FOR - v FOR '; - -//query model, get RDQLResultIterator -// include(RDFAPI_INLCUDE_DIR.PACKAGE_RDQL); -$rdqlIter = $model->rdqlQueryasIterator($rdql_query); - -//get different Result labels as array -$result_labels=$rdqlIter->getResultLabels(); - -echo "
    Result Label Names: "; -for ($i=0; $i Number of results: ".$rdqlIter->countResults(); -echo "
    Result objects, serialized to string:
    "; -//serialize result to string -while ($rdqlIter->hasNext()) { - $curren_result=$rdqlIter->next(); - echo "
    "; - for ($j=0; $j toString()."
    "; -}; - - - -echo "

    "; - -// show emails of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?email -WHERE (?person ?blank1) - (?blank1 ?givenName) - (?blank1 ?familyName) - (?person ?blank2) - (?blank2 ?email) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" -USING vcard FOR - v FOR '; -$rdqlIter = $model->rdqlQueryAsIterator($rdql_query); - - - - -echo "
    show all employees over 30
    "; - -// show all employees over 30 -$rdql_query = ' -SELECT ?employee, ?age -WHERE (?x, , ?employee), (?x, , ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - -echo "

    "; - - -// find out whose number is it: +1 111 2212 431 -$rdql_query = ' -SELECT ?x, ?type -WHERE (?x, , ?tel), - (?tel, , ?telNumber) - (?tel, , ?type) -AND ?telNumber eq "+1 111 2212 431" -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -echo "

    "; - -// show office telephone numbers of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?telNumber -WHERE (?person ?blank1) - (?blank1 ?givenName) - (?blank1 ?familyName) - (?person ?blank2) - (?blank2 ?telNumber) - (?blank2 ?type) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type eq -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_setoperations.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_setoperations.php.txt deleted file mode 100755 index afbd2364..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tests/test_setoperations.php.txt +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Test Set Operations - - - - - - -1. Generate and show two MemModels"; - -// Create empty MemModel -$model = ModelFactory::getDefaultModel(); -$model->setbaseURI("http://www.bizer.de"); - -$model2 = ModelFactory::getDefaultModel(); -$model2->setbaseURI("http://www.bizer.de/zwei"); - -// Create nodes and add statements to models -$myhomepage = new Resource("http://www.bizer.de/welcome.html"); -$creator = new Resource("http://purl.org/dc/elements/1.1/creator"); -$me = new Resource("mailto:chris@bizer.de"); -$model->add(new Statement($myhomepage, $creator, $me)); -$model2->add(new Statement($myhomepage, $creator, $me)); - -$creation_date = new Resource("http://www.example.org/terms/creation-date"); -$August16 = new Literal("August 16, 2002"); -$model->add(new Statement($myhomepage, $creation_date, $August16)); -$model2->add(new Statement($myhomepage, $creation_date, $August16)); - -$language = new Resource("http://www.example.org/terms/language"); -$deutsch = new Literal("Deutsch", "de"); -$model->add(new Statement($myhomepage, $language, $deutsch)); - -$name = new Resource("http://www.example.org/terms/Name"); -$chrisbizer = new Literal("Chris Bizer"); -$model2->add(new Statement($me, $name, $chrisbizer)); - -// Output as Table -echo "
    Model 1
    "; -$model->writeAsHtmlTable(); -echo "
    Model 2
    "; -$model2->writeAsHtmlTable(); -echo "

    "; - -echo "

    2. Make some tests

    "; -echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."

    "; -echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."

    "; -echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."

    "; -echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."

    "; -echo "Test: Model 1 equals model 2 :".$model->equals($model2)."

    "; - -echo "

    3. Unite model 1 and model 2

    "; -$model3 =& $model->unite($model2); -$model3->writeAsHtmlTable(); - -echo "

    4. Intersect model 1 and model 2

    "; -$model4 =& $model->intersect($model2); -$model4->writeAsHtmlTable(); - -echo "

    5. Substract model 2 from model 1

    "; -$model5 =& $model->subtract($model2); -$model5->writeAsHtmlTable(); - -echo "

    6. Reify model 1

    "; -$model6 =& $model->reify(); -$model6->writeAsHtmlTable(); - -?> - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/all-wcprops deleted file mode 100755 index 41841c92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/all-wcprops +++ /dev/null @@ -1,125 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 62 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/tutorial -END -netapi.html -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/netapi.html -END -usingtheSparqlEngine.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/442/trunk/rdfapi-php/doc/tutorial/usingtheSparqlEngine.htm -END -usingNamedGraphs.htm -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/usingNamedGraphs.htm -END -usingtheModelAPI.htm -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/usingtheModelAPI.htm -END -rdql_tutorial.php.txt -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/rdql_tutorial.php.txt -END -model1.rdf -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/model1.rdf -END -db_utils.htm -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/db_utils.htm -END -usingtheSparqlClient.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/322/trunk/rdfapi-php/doc/tutorial/usingtheSparqlClient.htm -END -database_persistence.htm -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/database_persistence.htm -END -grddl_parser.htm -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/grddl_parser.htm -END -model1.n3 -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/model1.n3 -END -usingtheResModelAPI.htm -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/usingtheResModelAPI.htm -END -vocabularies.htm -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/vocabularies.htm -END -sparqlTestcases.htm -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/sparqlTestcases.htm -END -rap_tutorial.php.txt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/rap_tutorial.php.txt -END -usingtheOntModelAPI.htm -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/usingtheOntModelAPI.htm -END -visualization_tutorial.htm -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/visualization_tutorial.htm -END -rdql_tutorial.htm -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/rdql_tutorial.htm -END -employees.rdf -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/doc/tutorial/employees.rdf -END -introductionToRAP.htm -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/290/trunk/rdfapi-php/doc/tutorial/introductionToRAP.htm -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/entries deleted file mode 100755 index 85013b3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/entries +++ /dev/null @@ -1,291 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/tutorial -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-01T16:19:26.000000Z -442 -cax - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -netapi.html -file - - - - -2008-02-29T14:57:30.245493Z -99683f307e5b26d415cbd993e7902d30 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -usingtheSparqlEngine.htm -file - - - - -2008-02-29T14:57:30.261114Z -747e3b19826bcc1b04959bb72d66b78d -2007-06-01T16:19:26.000000Z -442 -cax -has-props - -usingNamedGraphs.htm -file - - - - -2008-02-29T14:57:30.261114Z -a9d40a83551f6e48e0549b5e721d7da6 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -usingtheModelAPI.htm -file - - - - -2008-02-29T14:57:30.276735Z -7b86d1164ff7dc260ef3b9020008a8e4 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -rdql_tutorial.php.txt -file - - - - -2008-02-29T14:57:30.292355Z -d82db4d619d1fe8c11ba67e0b3433015 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -model1.rdf -file - - - - -2008-02-29T14:57:30.292355Z -a46c7d26166da48519bf342a986ac760 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -db_utils.htm -file - - - - -2008-02-29T14:57:30.292355Z -99eb680efddf9a2ea1fc2c2581b24846 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -usingtheSparqlClient.htm -file - - - - -2008-02-29T14:57:30.323596Z -989282efef3743ae8c620257d75e0d49 -2006-11-24T08:55:41.000000Z -322 -tgauss -has-props - -database_persistence.htm -file - - - - -2008-02-29T14:57:30.323596Z -a74f6f0b27548a55397b20710d30846e -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -grddl_parser.htm -file - - - - -2008-02-29T14:57:30.307976Z -113a9eee5ca92a60914d964868e9945d -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -model1.n3 -file - - - - -2008-02-29T14:57:30.339217Z -55dd80bf75fb199e918ad7bd4c01aab8 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -usingtheResModelAPI.htm -file - - - - -2008-02-29T14:57:30.339217Z -2e5aa7e2d3fe14c362f9d8059181b705 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -vocabularies.htm -file - - - - -2008-02-29T14:57:30.354838Z -4d9c6ffa0efbedaa73403be9eb2266ff -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -sparqlTestcases.htm -file - - - - -2008-02-29T14:57:30.370458Z -3c2f2499fc8e664cf7669d0110bc2328 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -usingtheOntModelAPI.htm -file - - - - -2008-02-29T14:57:30.370458Z -f4d2f7dd0cab86b79338154d32d30cfe -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -rap_tutorial.php.txt -file - - - - -2008-02-29T14:57:30.386079Z -b5b90aeba3463b36bdd1e9262e5ea3dd -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -visualization_tutorial.htm -file - - - - -2008-02-29T14:57:30.401699Z -5eba1bb4ef4cd043da4e0de35765547f -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -img -dir - -rdql_tutorial.htm -file - - - - -2008-02-29T14:57:30.401699Z -e17778918c355d3b8846ef7113c188ff -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - -employees.rdf -file - - - - -2008-02-29T14:57:30.417320Z -b89a2954dcbd3f457bcae002b911708e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -introductionToRAP.htm -file - - - - -2008-02-29T14:57:30.417320Z -23db3c1bb4f403d4c112aff05803ff14 -2006-06-22T12:23:24.000000Z -290 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/database_persistence.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/database_persistence.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/database_persistence.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/db_utils.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/db_utils.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/db_utils.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/employees.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/employees.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/grddl_parser.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/grddl_parser.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/grddl_parser.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/introductionToRAP.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/introductionToRAP.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/introductionToRAP.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.n3.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/model1.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/netapi.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/netapi.html.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/netapi.html.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rap_tutorial.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rap_tutorial.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rap_tutorial.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.php.txt.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/rdql_tutorial.php.txt.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/sparqlTestcases.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/sparqlTestcases.htm.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/sparqlTestcases.htm.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingNamedGraphs.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingNamedGraphs.htm.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingNamedGraphs.htm.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheModelAPI.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheModelAPI.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheOntModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheOntModelAPI.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheOntModelAPI.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheResModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheResModelAPI.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheResModelAPI.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlClient.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlClient.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlClient.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlEngine.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlEngine.htm.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/usingtheSparqlEngine.htm.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/visualization_tutorial.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/visualization_tutorial.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/visualization_tutorial.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/vocabularies.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/vocabularies.htm.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/prop-base/vocabularies.htm.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/database_persistence.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/database_persistence.htm.svn-base deleted file mode 100755 index 285a8f54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/database_persistence.htm.svn-base +++ /dev/null @@ -1,280 +0,0 @@ - - - - Tutorial: Database Persistence - - - - -

    RDF API for PHP

    -

    Tutorial: Database Persistence

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski <radol@gmx.de> -
    -October 2004

    -

     

    -

    In this tutorial I will demonstrate how to use the new developed -database backend within RAP by giving some examples of setting the -database connection, as well as creating, retrieving, and manipulating -persistent models.

    -

     

    -

    Introduction

    -

    The database backend for RAP V0.9.1 consists of two classes DbStore -and DbModel. The former is used to set the database -connection as well as create and retrieve persistent models (DbModels). -The latter provides methods for manipulating these models. There is -also a parent class Model with some general functions -common for both MemModel and DbModel.

    -

     

    -

    First Steps - Setting the Database Connection and Creating Tables

    -

    RDF API for PHP V0.9.1 supports a great variety of different databases -(see ADODB supported -databases) . Moreover, RAP allows connecting to multiple databases -at the same time. Every database containing RDF data is represented by -an instance of class DbStore. We can create this object -by simply passing all connection parameters to the constructor -function. For example, if we want to use MySQL, we will set the -connection as shown below:

    - - - - - - -
    -

    $mysql_database = ModelFactory::getDbStore('MySQL', 'host', -'db_name', 'user_name', 'password');

    -

    The parameters to be passed represent the database driver, host -name, database name, user name, and password respectively, reflecting -our own connection settings. Similarly, we can connect to other -databases, for instance Oracle:

    - - - - - - -
    -

    $oracle_database = ModelFactory::getDbStore('Oracle', FALSE, -'db_name', 'username', 'password');

    -

    In case that we are using the same type of database all the time, we -can also define the connection parameters as the default setting in -Section Database of the file constants.php. -For instance, if we use MsAccess via ODBC, with RDF_DB as -system DSN, and we do not need any username or password to connect to -our database, we will define the connection constants as follows:

    -constants.php - - - - - - -
    -

    // -----------------------------------------------------------------------
    -// Database
    -// -----------------------------------------------------------------------
    -define("ADODB_DB_DRIVER", "ODBC");
    -define("ADODB_DB_HOST", "RDF_DB");
    -define("ADODB_DB_NAME", "");
    -define("ADODB_DB_USER", "");
    -define("ADODB_DB_PASSWORD", "");

    -
    -

    Subsequently we can connect to our database using these settings as -default parameters:

    - - - - - - -
    -

    $access_database = ModelFactory::getDbStore();

    -

    When using RAP's database backend for the very first time, we must -additionally create appropriate tables, in order to be able to store -RDF models. RAP provides a very useful method createTable() -which will automatically create all tables and indexes needed. We only -have to specify the type of the database we are using:

    - - - - - - -
    -

    $access_database->createTables('MsAccess');
    -$mysql_database->createTables('MySQL');

    -
    -

    Unfortunately, currently this method only supports MsAccess and -MySQL. Thus, if we want to use other databases (for instance Oracle, we -have connected to in this tutorial) we will have to create all required -tables and indexes manually by ourselves according to the abstract database schema provided with the -API documentation.

    -

     

    -

    Creating and Retrieving DbModels

    -

    In RDF API for PHP V0.9.1 every persistent model (DbModel) is given a -unique URI (modelURI) to differentiate it from other models. -Thus, when creating a new DbModel or retrieving an existing one, we -have to specify its modelURI. For example, we can create a new, empty -DbModel in the Access database from the previous section by calling the -method getNewModel() on the database object and passing -the modelURI as parameter:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel1";
    -$dbModel1 = $access_database->getNewModel($modelURI);

    -
    -

    If we defined the connection parameters in constants.php, we can get an default DbModel without manualy creating an DbStore object before. If the model with the given base URI does exist in the database, it will be opened. If not, it will be created.

    - - - - - - -
    -

    $modelURI = "http://somewhere.edu/rap-v-06/tutorial/DbModel1";
    - $dbModel1 = ModelFactory::getDefaultDbModel($modelURI);

    -

    Note that getNewModel() will return FALSE -if a DbModel with the same modelURI already exists. Therefore, if you -are in doubt, it is highly recommended to use the method modelExists() -to check the URI to be assigned, prior to calling getNewModel(). -Accordingly, we can modify the above code as follows:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel1";

    -

    if ($access_database->modelExists($modelURI))
    -   echo "WARNING! DbModel with the same URI: '$modelURI' -already exists";
    -else
    -   $dbModel1 = -$access_database->getNewModel($modelURI);

    -
    -

    Trying to use an existing modelURI will consequently cause a warning -notice.

    -

    It often happens that we not only need to create a completely new -DbModel but moreover want to store an in-memory model or even a -persistent model from another database. For this purpose we can use the -method putModel(). To demonstrate this we initially -generate a new MemModel from an RDF document (example1.rdf):

    - - - - - - -
    -

    // Create a new memory model
    -$memModel = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    -$memModel->load("example1.rdf");

    -

    and then we pass the object $memModel just created, -together with the modelURI we want to assign it, to the method putModel():

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel2";
    -$access_database->putModel($memModel, $modelURI);

    -
    -

    To list all models persistently stored in the database RAP provides -the method listModels() which returns an array with -modelURI and baseURI of every DbModel. Using this function we can, for -instance, print out the contents of the database created in this -tutorial:

    - - - - - - -
    -

    // get the list with modelURI and baseURI of all -DbModels
    -$list = $access_database->listModels();

    -

    // print out the database contents
    -foreach ($list as $model) {
    -   echo "modelURI: " .$model['modelURI'] ."<BR>";
    -   echo "baseURI : " .$model['baseURI'] -."<BR><BR>";
    -}

    -
    -

    This will result in the following output:

    -Output: - - - - - - -
    modelURI: http://somewhere.edu/rap-v-06/tutorial/DbModel1
    -baseURI : -

    modelURI: http://somewhere.edu/rap-v-06/tutorial/DbModel2
    -baseURI : http://www.w3.org/Home/Lassila.rdf#

    -
    -

    Note that we have not indicated any baseURI for the first model -listed above. We could have done it by passing the baseURI as the -second parameter to the method getNewModel(). In the case -of the next model, the baseURI comes from the original MemModel saved -by using the function putModel().

    -

    Retrieving a persistent RDF model is also very easy. We simply call -the method getModel() on a database object and indicate -the URI of the DbModel to be accessed, as shown below:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel2";
    -$DbModel2 = $access_database->getModel($modelURI);

    -
    -

    getModel() returns an object DbModel or FALSE -if the modelURI was not found.

    -

     

    -

    Manipulating a DbModel

    -

    Once we have created an instance of DbModel, we can manipulate it, -i.e. add, remove, or replace statements, serialize the model into -different formats (plain text, RDF/XML, N3), save it to file or output -in a browser window, compare and combine it with other MemModels or -DbModels, reify, or query it. For this purpose RDF API for PHP allows -us to use the same method names as in the case of manipulating a -MemModel (see tutorial getting started). -Therefore, it is not necessary to repeat them once again. Although the -internal implementation of these methods differs from those of the -class MemModel, all the differences are hidden for the -user. Hence, one can expect the same results while manipulating RDF -models regardless of the storage mechanism chosen.

    -

    Though, there are two methods specific only for DbModels, namely: delete() -removing a persistent model from database and getMemModel() -which loads a DbModel (including all statements) into a memory model. -Remember also that the Statement Iterator (getStatementIterator()) -is not accessible for instances of DbModel, likewise the indexing -method (index()). The latter, because RAP makes use of -database internal indexing capabilities. All the other features -described in the introductory tutorial getting -started are common for both classes MemModel and DbModel.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/db_utils.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/db_utils.htm.svn-base deleted file mode 100755 index 1d516a26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/db_utils.htm.svn-base +++ /dev/null @@ -1,62 +0,0 @@ - -Tutorial: RDF DB Utils - - - - - -

    RDF API for PHP

    -

    Tutorial: RDF DB Utils

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    RDF DB Utils is a new graphical user interface written by Gunnar AAstrand Grimnes for dealing with DbModels.

    -

    -

    Contents:

    - - - - - - - - - - - - - - - - - -
    1.Configuration
    2.Connecting to a Database
    3.Browse through a model
    4.Querying a model
    5.Adding statements/models
    -

    -

    1. Configuration

    -

    The tool can be found in the tools directory under rdfdb-utils. You can specify your database settings in config.inc.php. -Currently we support mysql and MsAccess databases. Example: use the settings

    - - - -

    $i=0;
    - $_DB[$i]["type"]="mysql";
    - $_DB[$i]["host"]="localhost";
    - $_DB[$i]["port"]="";
    - $_DB[$i]["dbName"]="rdf_db";
    - $_DB[$i]["username"]="root";
    - $_DB[$i]["password"]="";

    -

    for the mysql-database rdf_db running on localhost.

    -

    2. Connecting to a Database

    -

    You can create a new database connection or choose a connection that is specified in config.inc.php.

    -

    -

    3. Browse through a model

    -

    You can browse through a selected model to view edit or delete statements.

    -

    -

    4. Querying a model

    -

    To search in a model you can use RDQL or enter parts of the statement directly.

    -

    -

    5. Adding statements/models

    -

    To add statements or models You can insert them manually or upload RDF files.

    -

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/employees.rdf.svn-base deleted file mode 100755 index 0aa93c4c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/employees.rdf.svn-base +++ /dev/null @@ -1,76 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/grddl_parser.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/grddl_parser.htm.svn-base deleted file mode 100755 index bd1a70ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/grddl_parser.htm.svn-base +++ /dev/null @@ -1,94 +0,0 @@ - - -Tutorial: GRDDL Parser - - - - - -

    RDF API for PHP

    -

    Tutorial: GRDDL Parser

    -

    This turorial is part of the RAP - Rdf API for PHP - documentation.

    -

    The RAP GRDDL parser allows you to extract RDF-data from XHTML documents.

    -

    The GRDDL parser requires PHP 5.1 or later, because it uses PHP5's build in - xslt-processor.

    -

    There a several approaches to extract RDF-data from XHTML documents and there - is a W3C - best-practice "RDF in XHTML Taskforce" looking at the issue. RAP - provides an implementation of the GRDDL proposal, currently discussed by the - working group. GRDDL stands for "Gleaning - Resource Description from Dialects of Languages" and uses XSLT to extract - RDF-data from XHTML.

    -

    -

    (http://www.w3.org/TR/grddl/) -

    -

    1. XHTML Input Document

    -

    The Input document has to contain at least one reference to an XSLT stylesheet - which describes how your rdf-data is encoded in the XHTML document. For example, - this document

    - -
    <html xmlns="http://www.w3.org/1999/xhtml">
    -  <head profile="http://www.w3.org/2003/g/data-view">
    -    <title>Some Document</title>
    -
    -    <link rel="transformation"
    -       href="http://www.w3.org/2000/06/dc-extract/dc-extract.xsl" />
    -    <meta name="DC.Subject"
    -       content="ADAM; Simple Search; Index+; prototype" />
    -    ...
    -  </head>
    -  ...
    -</html>
    -

    refers to the dc-extract.xsl stylesheet and contains the following -RDF statements:
    - - -
    -
    -<rdf:RDF
    -  xmlns:dc="http://purl.org/dc/elements/1.1/"
    -  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -  >
    -  <rdf:Description rdf:about="">
    -    <dc:subject>ADAM; Simple Search; Index+; prototype</dc:subject>
    -  </rdf:Description>
    -</rdf:RDF>
    -
    -
    -

    The stylesheet is located at http://www.w3.org/2000/06/dc-extract/dc-extract.xsl
    -  

    -

    2. Using RAP's GRDDL Parser

    -

    To parse an rdf-data containing xhtml document, simply use the load() - function of any RAP model. If the file extension of your XHTML - file is ".html" or".htm" then RAP uses the GRDDL parser - automatically. Otherwise you have to explicitly specifiy the parser in the load - call $model->load('doc.html', "GRDDL");

    - - - -

    define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    $model = new MemModel();
    - $model->load('doc.html');

    -
    -

     

    -

    3. Further Information about GRDDL

    -

    For further information and examples see

    - -

    Some Stylesheets for commonly known vocabularies are:

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/introductionToRAP.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/introductionToRAP.htm.svn-base deleted file mode 100755 index 2b3c107f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/introductionToRAP.htm.svn-base +++ /dev/null @@ -1,266 +0,0 @@ - -Introduction to RAP - - - - - - - - - - - - -

    RDF API for PHP

    -

    Introduction to RAP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    Table of Contents

    -
      -
    1. Overview
    2. -
    3. The MemModel
    4. -
    5. The DbModel
    6. -
    7. The Infmodels (InfModelF, - InfModelB)
    8. -
    9. The ResModel
    10. -
    11. The OntModel
    12. -
    -

     

    -

    Overview

    -

    RAP - RDF API for PHP is a Semantic Web toolkit for PHP developers. RAP started - as an open source project at the Freie Universität Berlin in 2002 and has - been extended with internal and external code contributions since then. Its - latest release includes:

    -
      -
    • a statement-centric API for manipulating RDF graphs as a set of statements
    • -
    • a resource-centric API for manipulating RDF graphs as a set of resources -
    • -
    • integrated RDF/XML, N3 and N-TRIPLE parsers
    • -
    • integrated RDF/XML, N3 and N-TRIPLE serializers
    • -
    • in-memory or database model storage
    • -
    • support for the RDQL query language
    • -
    • an inference engine supporting RDF-Schema reasoning and some OWL entailments -
    • -
    • an RDF server providing similar functionality as the Joseki - RDF server
    • -
    • a graphical user-interface for managing database-backed RDF models
    • -
    • support for common vocabularies
    • -
    -

    RAP can be used under the terms of the GNU - LESSER GENERAL PUBLIC LICENSE (LGPL)
    - and can be downloaded from http://sourceforge.net/projects/rdfapi-php/

    -

    RAP offers two different programming interfaces for manipulating RDF graphs: - The statement-centric Model API which allows you to manipulate - an RDF graph as a set of statements; and the resource-centric ResModel - API for manipulating an RDF graph as a set of resources.

    -

    The Model API supports adding, deleting, and replacing statements inside a - model as well as adding entire models. StatementIterators allow sequential access - to all statements within a model. There are four different implementations of - the Model API:

    - - - - - - - - - - - - - - - - - - - - - - - -

    Model

    Functionality

    MemModel

    Model storing its RDF graph in - memory. MemModel is fast, but doesn't support inference.
    -

    DbModel

    Model storing its RDF graph in - a relational database. No inference support.

    InfModelF

    Forward-chaining inference model - storing its base graph and inferred triples in memory.

    InfModelB

    Backward-chaining inference model - storing its base graph in memory and creating inferred triples on the - fly.

    -

    The resource-centric ResModel API represents RDF graphs as resources having - properties. The ResModel API is very similar to the Jena - Model API allowing programmers, which are used to Jena, to easily write - RAP code. The ResModel API is implemented on top of the Model API. ResModels - are always having a underlying MemModel, DbModel, InfModelF or InfModelB and - are only providing a resource-centric view on this model. There are two implementations - of the ResModel API:

    - - - - - - - - - - - - - - - -

    Model

    Functionality

    ResModel

    Basic implementation of the ResModel - API
    -

    OntModel

    OntModel provides a ResModel implementation - extended with RDF-Schema specific methods like hasSuperProperty(), addDomain() - and listInstances().

    -

    The following sections are explaining the different RAP models in more detail. - Further tutorial and RAP usage examples are found on the RAP Documentation overview page.

    -

     

    -

    The MemModel

    -

    The MemModel implementation stores statements in an array in the system memory. - If a new statement is added to the model, it's appended to the array and added - to a statement index in order to accelerate queries. MemModel is the fastest - of all Model API implementations.

    -


    -

    -

    Further information about using the MemModel can be found in the "Using - RAP's Statement-Centric MemModel API" tutorial and in the MemModel - PHPDoc.

    -

     

    -

    The DbModel

    -

    The DbModel implementation stores statements in an relational database. DbModel - supports a wide range of different databases by using the ADODB database abstraction - layer. The core of RAP's database backend are the classes DbStore and DbModel. - The former represents all models stored in a database, whereas the latter provides - methods for manipulating these models.
    -
    -
    -

    -

    RAP uses a denormalized database schema, where all statements are written into - a single statement table. We compared the performance of this solution with - a normalized layout. Running benchmarks has shown that the denormalized schema - was 2-3 times faster than the normalized one. The trade-off between better performance - and increased database size was acceptable for medium-sized RDF models.

    -

    Further information about using the DbModel can be found in the tutorial about - "Database Persistence" and - in the DbModel PHPDoc.

    -

     

    -

    The InfModels

    -

    InfModel extends MemModel by adding the ability to infer additional statements. - Up to our knowledge, InfModel is the only reasoning engine implemented in PHP. - The performance of InfModel can't compete with the performance of reasoning - engines implemented in Java or C, because PHP still isn't a very fast language. - But for medium sized models and relatively small RDF-S schemata, InfModel works - fine. InfModel supports the following RDF-S and OWL constructs:

    -
      -
    • rdfs:subclass
    • -
    • rdfs:subproperty
    • -
    • rdfs:range
    • -
    • rdfs:domain
    • -
    • owl:sameAs
    • -
    • owl:inverseOf
    • -
    -

    Additionally, the following inference rules from the W3C - RDF Semantics Recommendation are supported:

    -
      -
    • RDFS Rule 6
    • -
    • RDFS Rule 8
    • -
    • RDFS Rule 10
    • -
    • RDFS Rule 12
    • -
    • RDFS Rule 13
    • -
    -

    You can activate and deactivate the different rules separately in constants.php. - Turning off rules that you don't need improves the performance of InfModel.

    -

    The abstract class InfModel is extended by two subclasses:

    -
      -
    • InfModelF, which uses a forward chaining inference algorithm.
    • -
    • InfModelB, which uses a backward chaining inference algorithm.
    • -
    -

    The pros and cons of both algorithms are described below:

    -


    - The InfModelF

    -

    InfModelF uses a forward chaining inference algorithm: If a new statement from - the RDFS or OWL namespace is added to the model, a corresponding InfRule is - added to the model's rule-base. The rule has a trigger and an entailment. If - a new statement, which matches the trigger of an InfRule, is added to the model - then the entailment will be recursively computed until no more rule-triggers - match the statement or statements inferred from it. The base statement and all - inferred statements are added to the model.
    -

    -


    -

    -

    Materializing all possible inferred statements means that adding base statements - to the model is relatively slow. On the other hand find operations are very - fast, because the find method just has to look into the statement index and - return the matching statements (including inferred statements).

    -

    Thus you should use InfModelF

    -
      -
    • if your model doesn't change much and
    • -
    • you are going to query the model a lot.
    • -
    -

    Further information about using the InfModelF can be found in the InfModelF PHPDoc.

    -

     

    -

    The InfModelB

    -

    InfModelB uses a backward chaining inference algorithm, meaning that no inferences - are done when a new statement is added to the model. When a query is executed - against the model later, only the necessary inferences for this query are done: - A find-patter is executed with the supplied parameters first. Afterwards it - is checked against an inference-rules index, if there are any rules that could - produce statements that would match the find-pattern. If there are such rules, - the find-pattern is rewritten an a new search is done. The new statements are - inferred and added to the result. This iterative process will be repeated until - there are no rules left that could produce matching statements.

    -


    -

    -

    InfModelB recognizes subclassing loops in ontologies. It also uses some shortcuts - which speed up the search process: It recognizes branches in the ontology that - don't lead to any additional statements and avoids running into these 'dead - ends' a second time.

    -

    You should use InfModelB:

    -
      -
    • if your model changes a lot,
    • -
    • if you don't want to materialize all inferred statements,
    • -
    • if you are having a lot of RDF-S statements or
    • -
    • if you are not going to execute too many queries against the model.
    • -
    -

    Further information about using the InfModelB can be found in the InfModelB PHPDoc.

    -

     

    -

    The ResModel

    -

    ResModel provides a resource-centric view on an underlying Model. ResModels - represent an RDF graphs as a set of resources having properties, similar to - the Jena Model API. - The ResModel API is implemented on top of the Model API. Thus ResModels are - always having a underlying MemModel, DbModel, InfModelF or InfModelB and are - only providing a resource-centric view on this model.

    -

    -

    Each ResModel method call is translated into a find()-, add()-, or remove()-call - to the underlying model. Thus using ResModel is slightly slower than using the - underlying model directly. The ResModel API also provides support for special - resources like rdf:containers and rdf:collections. There is no caching done - between the layers.

    -

    Further information about using the ResModel can be found in the tutorial about - "Using RAP's Resource-Centric ResModel - API" and in the ResModel PHPDoc.
    -

    -

    The OntModel

    -

    OntModel API provides a ResModel implementation extended with RDF-Schema specific - methods like addSubClass(), listSubClasses(), hasSuperProperty(), addDomain() - and listInstances().

    -

    OntModel just provides a more convenient API for working with RDF-S models, - but doesn't do any inference by itself. If you also need RDF-S inference - you have to combine OntModel with an underlying InfModelF or InfModelB. If you - don't need inference you can combine OntModel with an underlying MemModel - or DbModel.

    -

    -

    Further information about OntModel can be found in the tutorial about "Using - RAP's Ontology-Centric OntModel API" and in the OntModel PHPDoc.

    -


    -

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.n3.svn-base deleted file mode 100755 index 34a939a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Generated by N3Serializer.php from RDF RAP. -# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html - -@prefix ns0: . -@prefix ns1: . -@prefix ns2: . - - -ns0:someDocument.html ns2:language "English" ; ns2:title "RAP tutorial" ; ns1:creator "Radoslaw Oldakowski" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.rdf.svn-base deleted file mode 100755 index be361d77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/model1.rdf.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - English - RAP tutorial - Radoslaw Oldakowski - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/netapi.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/netapi.html.svn-base deleted file mode 100755 index f5142d14..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/netapi.html.svn-base +++ /dev/null @@ -1,382 +0,0 @@ - -RDF Net API - - - - - - -

    RDF API for PHP

    -

    RAP NetAPI - An RDF Server for PHP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Phil Dawes <pdawes@users.sf.net>
    - Chris Bizer <chris@bizer.de>
    - Tobias Gauss <tobias.gauss@web.de>
    - Jan 2006

    -
    - -

    About

    -

    The RAP NetAPI is a server for publishing RDF models on the web. Models have - URLs and they can be accessed by query using HTTP GET.

    -

    The RAP NetAPI provides an subset implementation of the W3C member submission - RDF - NetAPI and of a subset of the SPARQL Protocol. The NetAPI allows you to run an RDF server, with similar functionality as the - Joseki RDF server, on web - servers that provide PHP support. It is a simple alternative to Joseki that - can be used in on cheap public webspace.

    -

    The RAP NetAPI implementation supports:

    -
      -
    • Serving multiple database or file backed RDF models
    • -
    • SPARQL queries using HTTP GET
    • -
    • RDQL queries using HTTP GET
    • -
    • FETCH queries using HTTP GET
    • -
    • SPO queries using HTTP GET
    • -
    • ADD operation using HTTP POST
    • -
    • REMOVE operation using HTTP POST
    • -
    • bNode closure for RDQL, FETCH and SPO
    • -
    • query result content negotiation (RDF/XML, N3 or N-Triples)
    • -
    -

     

    -

    Installing the NetAPI

    - -

    -

      -
    1. The first thing you need to do is get mod-rewrite to redirect model queries - to the netapi.php handler script. To do this you need to make sure that the - rewrite module is enabled in the Apache configuration file "httpd.conf":
      -
      - - - - - - -

      LoadModule rewrite_module modules/mod_rewrite.so

      -
      - And to make sure that output buffering is turned on in the PHP configuration - file "php.ini":
      -
      - - - - - - -

      output_buffering = On

      -
      -
    2. -
    3. You need to edit the .htaccess file in the netapi directory. Change the - 'RewriteBase' bit to reflect the URI base of the netapi directory. E.g.
      -
      - - - - - - -

      RewriteEngine on
      - RewriteBase /path/to/rdfapi-php/netapi/ #<---- Edit this
      - RewriteRule ^[^\.]+$ netapi.php

      -
      -
    4. -
    5. If you want to serve models that are stored in a RAP database, then you - must edit the config.inc file in the netapi directory to reflect your database - connection parameters. More Information about creating a RAP database and - connecting to it is found in the Tutorial: - Database Persistence.
      -
      - - - - - - -

      $DB_DRIVER = 'MySQL';
      - $DB_HOST = 'localhost';
      - $DB_DB = 'testrapdb';
      - $DB_USER = 'myuser';
      - $DB_PASS = 'mypass';

      -
      -
    6. -
    7. Finally, you need to edit the $modelmap array in the netapi/config.inc file. - This array maps model names to model URIs, and is used in order to convert - web URIs to model URIs in the database or local file names. -

      E.g. if you have a model in the RAP database with the following URI: -

      http://example.com/2004/testmodel1
      - and you want to access it via the netapi endpoint at the following web URI: -
      -
      http://myhostedwebspace.net/rdfapi-php/netapi/testmodel
      - You need to change the $modelmap array to contain the following entry:
      -
      - - - - - - -

      $modelmap = array(
      -           "testmodel" - => "db:http://example.com/2004/testmodel1"
      -            );

      -

      The db: prefix indicates that the model is stored in the RAP database.

      -

      If you want to serve a RDF model that is stored in a local file in a netapi - subdirectory: -

      subdirectory/testmodel2.rdf
      - and you want to access it via the netapi endpoint at the following web URI: -
      -
      http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2
      - You need to change the modelmap to contain the following entry:
      -
      - - - - - - -

      $modelmap = array(
      -           "testmodel2" - => "file:subdirectory/testmodel2.rdf"
      -            );

      -

      The file: prefix indicates that the model is stored in a local file.

      -

      -
    8. -
    - -

    Using the NetAPI

    - -

    -

    Querying

    -

    1. Downloading whole models

    -

    The easiest way to get started is to point an html browser at the URI endpoint - for the model. E.g. for the above example, use

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2 - HTTP/1.1

    -
    -

    2. SPARQL Queries

    -

    The default query language of the RAP NetApi is SPARQL. So, if no additional lang parameter is given, the netapi will assume that the query uses the SPARQL query language. See also: RAP SPARQL tutorial.

    - - - - - - - - - - - -
    Parameter NameParameter Type/ValueDescription
    query - (required)The query, as %encoded string -

    The SPARQL query to be executed.  The NetAPI supports SELECT, DESCRIBE, ASK and CONSTRUCT queries.

    -

    Example SPARQL query:

    - - - - - - -
    -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?query=SELECT%20?name%20WHERE{?s%20%3Chttp://xmlns.com/foaf/0.1/name%3E%20?name}
    - HTTP/1.1

    -

    The result of this query is returned in the SPARQL Query Results XML Format if it is a SELECT or an ASK query. If it is a CONSTRUCT or DESCRIBE query, the result is a serialisation of the corresponding graph and content type negotiation is used to determine the desired format..

    -

    3. Fetch Queries

    -

    The fetch query language returns all known information about a URIref. A query - consists of single "r" parameter, whose value is the URIref. The exact extent - of the RDF returned is dependent on the server. The NetAPI searches for all - statements with the resource as subject, then calculates the bNode closure of - all objects of these statements.

    - - - - - - - - - - - - - - - - -

    Parameter Name

    Parameter Value

    Description

    lang
    - (required)
    Id. of query language

    URI: http://jena.hpl.hp.com/2003/07/query/fetch
    - Short forms: "fetch"

    r
    - (required)
    URIref

    URIref of the resource

    -
    -Example fetch query:
    -
    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=fetch&r=http://example.com/employees/BillParker/ - HTTP/1.1

    -

     

    -

    4. RDQL Queries

    -

    See also: The RAP RDQL Tutorial

    - - - - - - - - - - - - - - - - - - - - - -
    Parameter NameParameter Type/ValueDescription
    lang
    - (required)
    Id. of query language

    URI: http://jena.hpl.hp.com/2003/07/query/RDQL
    - Short forms: "RDQL", "rdql"

    query
    - (required)
    The query, as %encoded string

    The RDQL query to be executed.  As with - all parameter values, this must be %-encoded.

    closure
    - (optional)
    "true" or "false"

    For each binding of a variable, which is - bound to a bNode, the graph is augmented with the bNode closure from this - point.

    - -

    Example RDQL query:

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=rdql&
    - query=SELECT%20*%20WHERE%20(?x,<http://www.w3.org/2001/vcard-rdf/3.0/EMAIL>,?y)(?y,?z,"M.Murphy@example.com")
    - &closure=true HTTP/1.1

    -

     

    -

    5. SPO Queries

    -

    SPO (also known as "Triples" or "find(SPO)") is an experimental minimal - query language. An SPO query is a single triple pattern, with optional subject - (parameter "s"), predicate (parameter "p"), and object (parameter "o", if a - URIref, parameter "v" for a string literal). Absence of a parameter implies - "any" for matching that slot of the triple pattern.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Parameter NameParameter ValueDescription
    lang
    -(required)
    Id. of query language -

    URI: http://jena.hpl.hp.com/2003/07/query/SPO
    -Short forms: "SPO", "spo"

    s
    -(optional)
    URIref -URIref of the subject of the triple pattern.
    -Absence implies a wildcard match.
    p
    -(optional)
    URIrefURIref of the predicate of the triple pattern.
    -Absence implies a wildcard match.
    o
    -(optional)
    URIrefURIref of the object of the triple pattern.
    -Only one of "o" and "v" may be given
    v
    -(optional)
    StringLiteral value as a string.
    -Absence or "o" and"v" implies a wildcard match.
    closure
    -(optional)
    "true" or "false"Calculate the bNode closure of the matched subgraph.

    -

    Example SPO query:

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=spo
    -
    & p=http://www.w3.org/2001/vcard-rdf/3.0/Family
    - & v=Parker
    -
    & closure=true HTTP/1.1

    -
    -

     

    -

     

    -

    Serialization Formats and Content Type Negotiation

    -

    The netapi supports content type negotiation to determine the output RDF serialization - format. E.g. to get the results of a fetch query in n3 format, do: -

    -GET /rdfapi-php/netapi/testmodel?lang=fetch&r=http://example.com/myterm HTTP/1.0
    -Accept: application/n3
    -
    -The current implementation supports the following content mime types: -
      -
    • application/rdf+xml
    • -
    • application/n3
    • -
    • application/n-triples
    • -
    • text/xml
    • -
    -

    Note: A SPARQL query retuns an SPARQL Query Results XML Format document if it is a SELECT or ASK query or a serialisiation of the corresponding graph if it is a CONSTRUCT or DESCRIBE query.

    -

     

    -

    Adding and Removing Subgraphs

    -

    -To add and remove subgraphs from the store you need to send POST -requests with an 'op' argument of 'add' or 'remove' and the rdf to -add/remove in the body of the request. E.g.: - -

    -POST /rdfapi-php/netapi/testmodel?op=remove
    -Content-type: application/n-triples
    -Content-length: 353
    -...RDF...
    -
    -

    N.B. most http apis will add the content-length header for you, but you'll - need to set the Content-type to be one of the above mime types.

    -

    Add and remove can be enabled in the config.inc by setting NETAPI_ALLOW_ADD - and NETAPI_ALLOW_REMOVE to true. They are disabled by delault.

    -

     

    - - - -------=e \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rap_tutorial.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rap_tutorial.php.txt.svn-base deleted file mode 100755 index 4613b81a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rap_tutorial.php.txt.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - */ - -echo "

    RAP Tutorial

    "; - -// Include all RAP classes -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!! This should reflect your own installation !!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); -include(RDFAPI_INCLUDE_DIR . PACKAGE_VOCABULARY); - - -// Create subject and predicate of $statement1 -$someDoc = new Resource ("http://www.example.org/someDocument.html"); -$creator = new Resource ("http://www.purl.org/dc/elements/1.1/creator"); - -// Create and instance of object Statement with subject, predicate and object -// passed to the creator function. -$statement1 = new Statement ($someDoc, $creator, new Literal ("Radoslaw Oldakowski")); - -// Create a new MemModel -$model1 = ModelFactory::getDefaultModel(); - -// Add the statement $statement1 to the model $model1 -$model1->add($statement1); - -// Create second MemModel -$model2 = new MemModel(); - -// Add two statements to $model2 -$model2->add(new Statement($someDoc, - new Resource("http://www.example.org/myVocabulary/title"), - new Literal("RAP tutorial"))); -$model2->add(new Statement($someDoc, - new Resource("http://www.example.org/myVocabulary/language"), - new Literal("English"))); - -// Add the second model ($model2) to the first one ($model1) -$model1->addModel($model2); - - -// Check the size of $model1 -echo "

    Section 3, output the size of the MemModel:

    "; -echo "\$model1 contains " .$model1->size() ." statements
    "; -echo "
    "; - - -// Output $model1 as HTML table -echo "


    Section 4, output the MemModel as HTML table:

    "; -$model1->writeAsHtmlTable(); - -// Output the string serialization of $model1 -echo "


    Section 4, output the plain text serialization of the MemModel:

    "; -echo $model1->toStringIncludingTriples(); - -// Output the RDF/XML serialization of $model1 -echo "


    Section 4, output the RDF/XML serialization of the MemModel:

    "; -echo $model1->writeAsHtml(); -echo "

    "; - -// Save the model to file in RDF/XML and N3 -$model1->saveAs("model1.rdf", "rdf"); -$model1->saveAs("model1.n3", "n3"); - -// Replace the Literal for a BlankNode -$bNode = new BlankNode($model1); -$model1->replace(NULL, NULL, new Literal("Radoslaw Oldakowski"), $bNode); - -// Add statements describing the BlankNode using pre-defined vCard vocabulary -$model1->add(new Statement($bNode, $VCARD_FN, new Literal("Radoslaw Oldakowski"))); -$model1->add(new Statement($bNode, $VCARD_EMAIL, new Literal("radol@gmx.de"))); - -// Create a new literal, its datatype and then add it to the MemModel $model1 -$age = new Literal("26"); -$age->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); -$model1->add(new Statement ($bNode, new Resource("http://www.example.org/myVocabulary/age"), $age)); - -// Create a statement iterator for $model1 -$it = $model2->getStatementIterator(); - -// Use the iterator to output the string serialization of all statements -// Traverse model and output statements -echo "


    Section 8, traverse the Model:

    "; -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} -echo "
    "; - -// Find all statements having subject equal $someDoc and print the result as HTML table -echo "


    Section 10, find statements:

    "; -$result = $model1->find($someDoc, NULL, NULL); -$result->writeAsHtmlTable(); -echo "

    "; - -// Reify all statements of $model2 and show the corresponding reified model as HTML table -echo "


    Section 11, output the reified Model:

    "; -$reified = $model2->reify(); -$reified->writeAsHtmlTable(); - - -// Close all MemModels used in this tutorial -$model1->close(); -$model2->close(); -$result->close(); -$reified->close(); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.htm.svn-base deleted file mode 100755 index 5a578dde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.htm.svn-base +++ /dev/null @@ -1,394 +0,0 @@ - -RDQL Tutorial - - - - - -

    RDF API for PHP

    -

    RDQL Tutorial

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski <radol@gmx.de>
    -October 2004

    -
    - -

    In this tutorial I will explain the syntax of the RDQL query language implemented in RDF API for -PHP and show how to query RDF models created within the API. The exact RDQL grammar -for RAP's RDQL Engine, described in Bacus Naur Form (BNF), is provided here.

    - -

    The general form of an RDQL query, shown below, resembles an SQL statement:

    - - -
    -

    SELECT variables listing
    - FROM rdf documents
    - WHERE patterns
    - AND filter expressions
    - USING prefix declaration -

    -
    -

    - -

    SELECT

    -

    Every successful query returns a set of variable bindings. In the SELECT clause we define a list of variables to be returned. - Each variable is introduced by a question mark (?) and can be named using alphanumerical characters combined with an underscore (_). - Multiple variables are separated by a space and/or an optional comma (,), for example:

    - - -
    -

    - SELECT ?name ?email, ?age,?tel_number -

    -
    - -

    In case that we want to specify all query variables, we can use the SQL-like shortcut in form of a star (*):

    - - -
    -

    - SELECT * -

    -
    -

    - -

    FROM

    - -

    In the FROM clause we specify the path or URL of the RDF document - to be queried. However, this tutorial focuses on querying RDF models created - within RAP (MemModels or DbModels) by passing the RDQL query string to the method - rdqlQuery(). In this case the query is performed on a particular - model, thus there is no need to specify it once again. If the passed string - contains a FROM clause, it will then be ignored by the query engine. -

    -
    - -

    WHERE

    -

    In the WHERE clause we indicate a list of triple patterns which - have to be matched by each valid query result set. All patterns representing - an RDF statement have the form (subject, predicate, object) where - the subject, predicate, and object can either be a <URIref> - or a ?variable. The object can moreover be a "Literal", - for example:

    - - -
    -

    - WHERE (?resource, <http://www.w3.org/2001/vcard-rdf/3.0/EMAIL>, "radol@gmx.de") -

    -
    - -

    This will match any statement of an RDF model with a predicate indicated - by the above URIref (vCard's email property) and an object represented by - the literal "radol@gmx.de". Furthermore, we can specify the language - and datatype of a literal: - "literal string"@lang^^<datatypeURI>. Note that the language - tag has no effect when the literal is datatyped, except for rdf:XMLLiterals and - plain literals. Correspondingly to the SELECT clause, using commas - (,) is also optional.

    -
    - -

    AND

    -

    In addition to the triple patterns of the WHERE clause, in the - AND part of an query we can specify Boolean expressions over values - of URIs and literals. RAP's implementation of RDQL shows the real expressive - power of this query language. And so, we can use:

    - -
  • arithmetic conditions (including multiplicative and additive operators), for instance:

  • - - -
    -

    - AND (10 + ?age)*2 <= 60/2, ?weight == 75 -

    -
    - -

    (multiple expressions are separated by commas)

    - -
  • string equality expressions, where EQ stands for "equal" and NE for "not equal":

  • - - -
    -

    - AND ?name EQ "Radoslaw Oldakowski", ?resource NE <http://example.org/> -

    -
    -
    - -
  • Perl-style regular expressions, where "~~" | "=~" stands for "match" - and "!~" for "not match", for example, return only HTML documents:

  • - - -
    -

    - AND ?document ~~ "/\.html$/i" -

    -
    - -

    We can also combine multiple filter expressions using logical operators "&&" (AND), "||" (OR):

    - - -
    -

    - AND ( (10 + ?age)*2 <= 60/2) && (?name EQ "Radoslaw Oldakowski") ) -

    -
    - -

    as well as use negation indicated by the exclamation mark (!):

    - - -
    -

    - AND !( ((10 + ?age)*2 <= 60/2) && (?name1 EQ ?name2) ) -

    -
    -

    - -

    USING

    - -

    To make the query easier to read and write for humans, RDQL provides a way - to shorten the length of URIs (used in the FROM, WHERE - and AND clauses) by defining a string prefix. Every prefix is - defined in the USING clause as demonstrated below:

    - - -
    -

    - WHERE (?resource, vCard:EMAIL, "radol@gmx.de")
    - USING vCard FOR <http://www.w3.org/2001/vcard-rdf/3.0/> -

    -
    - -

    Note that since RAP V0.8 QNames (e.g. vCard:EMAIL) in contrast to full URI's - need not to be surrounded by '<' and '>'. However, the RDQL parser is also - backawrd compatible - with earlier versions of the RDQL grammar (RAP V0.6 - RAP V0.7.1). Moreover, - RAP supports default prefixes (e.g. rdf, rdfs, xsd) - that can be used without an explicit definition.

    -
    - -

    Comments

    -

    While writing very long and complicated RDQL queries, it is often of great benefit to comment the code. For this purpose RAP allows us to use two kinds - of comment syntaxes. The first one is the one-line comment introduced by "//", the second has the form of /* this is a comment */.

    -
    - -

    Query Examples

    - -

    At this point it is time to put together all the pieces explained so far and - present RAP's RDQL Engine in action. In the following part of this section we - will be querying an RDF document describing employees of an example corporation - (employees.rdf). The working code for the examples - that will be demonstrated in this RDQL tutorial is rdql_tutorial.php.

    - -

    We shall start with including all RAP classes needed and loading the document into a MemModel:

    - - -
    -

    - // Include all RAP classes
    - define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - // Create a new MemModel and load the document
    - $employees = ModelFactory::getDefaultModel();
    - $employees->load(RDFAPI_INCLUDE_DIR ."employees.rdf");

    -
    - -

    Once the model has been created, we can perform our first query which will be: "find the full name of all employees". - So, we create a variable $query1 and assign it the corresponding query string:

    - - -
    -

    - $query1 = '
    - SELECT ?fullName
    - WHERE (?x, vcard:FN, ?fullName)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>'; -

    -
    - -

    To execute the query, we simply call the method rdqlQuery() on the MemModel and pass the variable holding the query string as parameter:

    - - -
    -

    - $result1 = $employees->rdqlQuery($query1); -

    -
    - -

    The result returned is an array of variable bindings with the values of these variables being RAP objects (Resource, - Literal or BlankNode). This enables us to use these objects for model update or other API calls. - We can, of course, print out the result on the screen as well. For this purpose, RAP's RDQL engine offers a very convenient method - writeQueryResultAsHtmlTable(). All we have to do is to pass the query result to this method:

    - - -
    -

    - RdqlEngine::writeQueryResultAsHtmlTable($result1); -

    -
    - -

    This will result in the following output in the browser window:

    - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - -

    If we did not want to have objects being returned as variable values but their string serialization instead, - we would call the method rdqlQeury() and pass FALSE as the second parameter:

    - - -
    -

    - $result2 = $employees->rdqlQuery($query1, FALSE); -

    -
    - -

    Note that in this case the resulting array could not be passed to the method writeQueryResultAsHtmlTable() so that we had to iterate it - using PHP's built-in foreach construct.

    - -

    As you can see querying RDF models in RAP is extremely easy. Similarly we also query persisted models by passing the RDQL string to the method - rdqlQuery() called on a DbModel. Hence, from this point on I will only explain how to formulate a query and show its corresponding result.

    - -

    In our next query: "find the given name of all employees over 30" we have to use a filter expression. - Moreover, in order to find out the given name we must specify the corresponding path in the graph leading through a Blank Node (marked bold):

    - - -
    -

    - SELECT ?givenName, ?age
    - // This is an example of an one-line comment
    - WHERE (?x, vcard:N, ?blank),
    -       (?blank, vcard:Given, ?givenName)
    ,
    -       (?x, /* and this is another type - of comments */ v:age, ?age)
    - AND ?age > 30
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#> - v FOR <http://sampleVocabulary.org/1.3/People#> -

    -
    - -

    In the above example, I have also demonstrated a possible way to insert comments. Here, the variable ?blank is only used to link the resource - to the given name. We did not specify ?blank in the SELECT clause, consequently we get:

    - - - - - - - - - - - - - -
    No.?givenName?age
    1.

    Literal: Bill

    -

    Literal: 33 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -
    2.

    Literal: George

    -

    Literal: 41 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -
    - -

    Note that the value of ?age is a datatyped literal. Yet another even more complex example might be: "find the private telephone number - of the person whose office number is '+1 111 2222 668' and additionally return his given name and age". In this query we have to specify several paths in the graph. - Furthermore, we use a string equality expression in the AND clause to filter the office number:

    - - -
    -

    - SELECT ?givenName ?age ?telNumberHome
    - WHERE (?person vcard:N ?blank1)
    -       (?blank1 vcard:Given ?givenName)
    -       (?person v:age ?age)
    -       (?person vcard:TEL ?blank2)
    -       (?blank2 rdf:value ?telNumberHome)
    -       (?blank2 rdf:type vcard:home)
    -       (?person vcard:TEL ?blank3)
    -       (?blank3 rdf:value ?telNumberOffice)
    -       (?blank3 rdf:type vcard:work)
    - AND ?telNumberOffice eq "+1 111 2222 668"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#> -

    -
    - -

    As shown in this example we can leave out commas. Note also that we make use of the default prefix rdf -(e.g. rdf:type) supported by RAP's RDQL engine. This query returns one matching set of variable bindings:

    - - - - - - - - - - - -
    No.?givenName?age?telNumberHome
    1.

    Literal: Bill

    -

    Literal: 33 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -

    Literal: +1 111 2212 431

    -
    - -

    So far, the values of all variables returned were literals. However, we can ask for resources as well. Consider the following query: -"find the resources that represent employees whose family name starts with 'M' and additionally return the corresponding office email address". -This can be written in RDQL as shown below:

    - - -
    -

    - SELECT ?resource, ?email
    - WHERE (?resource, vcard:N, ?blank1)
    -       (?blank1, vcard:Family, ?familyName)
    -       (?resource, vcard:EMAIL, ?blank2)
    -       (?blank2, rdf:value, ?email)
    -       (?blank2, rdf:type, vcard:work)
    - AND ?familyName ~~ "/^M/"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#> -

    -
    - -

    In this case we use a regular expression to indicate the first letter of the family name - and once again apply the default prefix rdf. This results in:

    - - - - - - - - - - -
    No.?resource?email
    1.

    Resource: http://example.com/employees/MonicaMurphy/

    -

    Literal: M.Murphy@example.com

    -
    - -

     

    -

    For more query examples see Documentation - included in RAP documentation. You can additionally visit the website with the - Interactive - RDQL Demonstration allowing you to practice with your own documents and - queries. Furthermore, - RDQL Test Cases give you an even deeper insight into RAP implementation - of RDQL by providing the opportunity to go through 77 queries testing different - aspects of the language implementation, performed in real time on both a memory - and a persisted model.

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.php.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.php.txt.svn-base deleted file mode 100755 index f39521fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/rdql_tutorial.php.txt.svn-base +++ /dev/null @@ -1,113 +0,0 @@ - - */ - -echo "

    RAP Tutorial

    "; - -// Include all RAP classes -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!! This has to reflect your own installation !!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -define("RDFAPI_INCLUDE_DIR", "C:/Apache/rdf_api/api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - -// Create a new MemModel and load the document -$employees = ModelFactory::getDefaultModel(); -$employees->load("employees.rdf"); - -// Show the input model -echo "Show the RDF model to be queried:

    "; -$employees->writeAsHtmlTable(); -echo "

    "; - -// Query string: "find the full name of all employees" -$query1 = ' -SELECT ?fullName -WHERE (?x, vcard:FN, ?fullName) -USING vcard FOR '; - -// Execute the query -$result1 = $employees->rdqlQuery($query1); - -// Display the query result as HTML table -echo "
    Query1: 'find the full name of all employees'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result1); - -// This will return no objects, but their string serialization instead -$result2 = $employees->rdqlQuery($query1, FALSE); - -echo "

    "; - -// Another query: "find the given name and age of all employees over 30" -$query2 = ' -SELECT ?givenName, ?age -WHERE (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName), - (?x, v:age, ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - -// Execute the query -$result3 = $employees->rdqlQuery($query2); - -// Display the query result as HTML table -echo "
    Query2: 'find the given name and age of all employees over 30.' Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result3); - -echo "

    "; - -// Yet another query: "find the private telephone number of the person -// whose office number is '+1 111 2222 668' and return additionally his given name and age" -$query3 = ' -SELECT ?givenName ?age ?telNumberHome -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?person v:age ?age) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumberHome) - (?blank2 rdf:type vcard:home) - (?person vcard:TEL ?blank3) - (?blank3 rdf:value ?telNumberOffice) - (?blank3 rdf:type vcard:work) -AND ?telNumberOffice eq "+1 111 2222 668" -USING vcard FOR - v FOR '; - -// Execute the query -$result4 = $employees->rdqlQuery($query3); - -// Display the query result as HTML table -echo "
    Query3: 'find the private telephone number of the person whose office number is '+1 111 2222 668' and return additionally his given name and age'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result4); - -echo "

    "; - - -// Next query: find the resources which represent employees whose family name starts with 'M' and return additionally the corresponding office email address -$query4 = ' -SELECT ?resource, ?email -WHERE (?resource, vcard:N, ?blank1) - (?blank1, vcard:Family, ?familyName) - (?resource, vcard:EMAIL, ?blank2) - (?blank2, rdf:value, ?email) - (?blank2, rdf:type, vcard:work) -AND ?familyName ~~ "/^M/" -USING vcard FOR '; - -// Execute the query -$result5 = $employees->rdqlQuery($query4); - -// Display the query result as HTML table -echo "
    Query4: 'find the resources which represent employees whose family name starts with \"M\" and return additionally the corresponding office email address'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result5); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/sparqlTestcases.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/sparqlTestcases.htm.svn-base deleted file mode 100755 index 20bb4dca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/sparqlTestcases.htm.svn-base +++ /dev/null @@ -1,471 +0,0 @@ - -SPARQL testcases - - - - - - -

    RDF API for PHP

    -

    SPARQL testcases

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Tobias Gauss <tobias.gauss@web.de>
    -January 2006

    -


    -Our SPARQL Engine passes the following Testcases. The first testcases are the DAWG Testcases. The second part of the testcases have been adopted from ARQ . There are also some custom testcases.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DataTestcaseResult
    dawg-tp-01dawg-tp-01passed
    dawg-tp-02dawg-tp-02passed
    dawg-tp-03dawg-tp-03passed
    dawg-tp-04dawg-tp-04passed
    ex2-1aex2-1apassed
    ex2-2aex2-2apassed
    ex2-3aex2-3apassed
    ex2-4aex2-4apassed
    q-opt-1q-opt-1passed
    q-opt-2q-opt-2passed
    dawg-query-001dawg-query-001passed
    dawg-query-002dawg-query-002passed
    dawg-query-003dawg-query-003passed
    dawg-query-004dawg-query-004passed
    q-select-1q-select-1passed
    q-select-2q-select-2passed
    q-select-3q-select-3passed
    customUnion1customUnion1passed
    customUnion2customUnion2passed
    data-sort-4.n3query-sort-5passed
    data-sort-4.n3query-sort-4passed
    data-sort-3.n3query-sort-3passed
    data-sort-1.n3query-sort-2passed
    data-sort-1.n3query-sort-1passed
    data-sort-6.n3query-sort-6passed
    data-sort-8.n3query-sort-4passed
    data-sort-4.n3limitOff_1passed
    data-sort-4.n3limitOff_2passed
    data-sort-4.n3limitOff_3passed
    data.n3bound1passed
    ex3.n3ex3passed
    ex11.2.3.1_0.n3ex11.2.3.1_0passed
    ex11.2.3.2_0.n3ex11.2.3.2_1passed
    ex11.2.3.3_0.n3ex11.2.3.3_0passed
    ex11.2.3.4_0.n3ex11.2.3.4_0passed
    ex11.2.3.5_0.n3ex11.2.3.5_0passed
    ex11.2.3.7_0.n3ex11.2.3.7_0passed
    data-f1.n3expr-1passed
    data-f1.n3expr-2passed
    data-f1.n3expr-3passed
    data-bool1.n3query-bev-1passed
    data-bool1.n3query-bev-2passed
    data-bool2.n3query-bev-5passed
    data-bool2.n3query-bev-6passed
    data-fil1.n3q-str-1passed
    regex-data-01.n3regex-query-001passed
    regex-data-01.n3regex-query-002passed
    regex-data-01.n3regex-query-003passed
    ex11.2.3.6_0.n3ex11.2.3.6_0passed
    data-bool1.n3query-bev-3passed
    data-bool1.n3query-bev-4passed
    data-fil1.n3q-str-2passed
    data-fil1.n3q-str-3passed
    data-fil1.n3q-str-4passed
    data-fil1.n3q-blank-1passed
    data-fil1_changed.n3q-datatype-1passed
    ex11_0.n3ex11_0failed
    ex11_0.n3ex11_1passed
    ex11.2.3.1_1.n3ex11.2.3.1_1passed
    ex11.2.3.2_0.n3ex11.2.3.2_0passed
    data-fil1.n3q-uri-1passed
    data-langMatches.n3q-langMatches-1passed
    data-langMatches.n3q-langMatches-2passed
    data-langMatches.n3q-langMatches-3passed
    data-langMatches.n3q-langMatches-4failed
    data-eq.n3query-eq-1passed
    data-eq.n3query-eq-2passed
    data-eq.n3query-eq-3passed
    data-eq.n3query-eq-4passed
    data-eq.n3query-eq-5passed
    data-eq.n3query-eq-graph-1passed
    data-eq.n3query-eq-graph-2passed
    data-eq.n3query-eq-graph-3passed
    data-eq.n3query-eq-graph-4passed
    data-arq-basic.n3q-base-prefix-1passed
    data-arq-basic.n3q-base-prefix-2passed
    data-arq-basic.n3q-base-prefix-3passed
    data-arq-basic.n3q-base-prefix-4passed
    data-arq-basic.n3q-base-prefix-5passed
    data-construct1.n3q-construct-1passed
    data-construct1.n3q-construct-2passed
    reif-data-1.n3q-reif-1passed
    reif-data-2.n3q-reif-2passed
    model0.nttest-0-01passed
    model0.nttest-0-02passed
    model0.nttest-0-03passed
    model0.nttest-0-04passed
    model1.nttest-1-01passed
    model1.nttest-1-02passed
    model1.nttest-1-03passed
    model1.nttest-1-04passed
    model1.nttest-1-05passed
    model1.nttest-1-06passed
    model1.nttest-1-07passed
    model1.nttest-1-08passed
    model1.nttest-1-09passed
    model1.nttest-1-10passed
    model1.nttest-2-01passed
    model1.nttest-2-02passed
    model1.nttest-2-03passed
    model1.nttest-2-04passed
    model1.nttest-2-05passed
    model1.nttest-2-06passed
    model1.nttest-2-07passed
    model1.nttest-2-08passed
    model1.nttest-2-09passed
    model1.nttest-2-10passed
    model1.nttest-3-01passed
    model1.nttest-3-02passed
    model1.nttest-3-03passed
    model1.nttest-3-04passed
    model1.nttest-3-05passed
    model1.nttest-3-06passed
    model5.nttest-3-07passed
    model2.nttest-4-01passed
    model2.nttest-4-02passed
    model2.nttest-4-03passed
    model2.nttest-4-04passed
    model3.nttest-4-05passed
    model3.nttest-4-07passed
    model4.nttest-5-01passed
    model4.nttest-5-02passed
    model4.nttest-5-03passed
    model4.nttest-5-04passed
    model4.nttest-6-01passed
    model4.nttest-6-02passed
    model4.nttest-6-03passed
    model6.nttest-7-01passed
    model6.nttest-7-02passed
    model7.nttest-7-03passed
    model7.nttest-7-04passed
    model1.nttest-9-02passed
    model8.n3test-B-01failed
    model8.n3test-B-02passed
    model8.n3test-B-03passed
    model8.n3test-B-04passed
    model8.n3test-B-05passed
    model9.n3test-B-08passed
    model9.n3test-B-09passed
    model9.n3test-B-10passed
    model9.n3test-B-11passed
    model9.n3test-B-12failed
    model9.n3test-B-13passed
    model9.n3test-B-19passed
    - -

     

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingNamedGraphs.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingNamedGraphs.htm.svn-base deleted file mode 100755 index 39d50f1a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingNamedGraphs.htm.svn-base +++ /dev/null @@ -1,252 +0,0 @@ - -Using RAP's Resource-Centric ResModel API - - - - - -

    RDF API for PHP

    -

    Using RAP's RDF Dataset API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -July 2005

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Usage Examples
      -
    4. -
    -

    1. Introduction

    -

    This section gives an introduction into the ideas behind Named Graphs and RAP's RDF datset API.

    -

    1.1 Named Graphs

    -

    The Semantic Web can be seen as a collection of RDF graphs. The RDF recommendation explains the meaning of any one graph, and how to merge a set of graphs into one, but does not provide suitable mechanisms for talking about graphs or relations between graphs. But the ability to express metainformation about graphs is required for:

    -
      -
    • Data syndication systems need to keep track of provenance information, and provenance chains. -
    • Restricting information usage: Information providers might want to attach information about intellectual property rights or their privacy preferences to graphs in order to restrict the usage of published information. -
    • RDF repository housekeeping: Triple stores need mechanisms to replace and update parts of their content. -
    • Access control: A triple store may wish to allow fine-grain access control, which appears as metadata concerning the graphs in the store. -
    • Signing RDF graphs: For signing RDF graphs it is necessary to keep the graph that has been signed distinct from the signature, and other etadata concerning the signing, which may be kept in a second graph. -
    • Expressing propositional attitudes such as modalities and beliefs. -
    • Scoping assertions and logic where logical relationships between graphs have to be captured.
    • -
    -


    - RDF reification has well-known problems in addressing these use cases. To avoid these problems several authors propose quads, consisting of an RDF triple and a further URIref or blank node or ID. The proposals vary widely in the semantic of the fourth element, using it to refer to information sources, to model IDs or statement IDs or more generally to contexts. Named Graphs propose a general and simple variation on RDF, using sets of named RDF graphs.

    -

    A set of Named Graphs is a collection of RDF graphs. Each one is named with a URIref. -

    The name of a graph may occur either in the graph itself, in other graphs, or not at all. Graphs may share URIrefs but not blank nodes. Named Graphs can be seen as a reformulation of quads in which the fourth elements distinct syntactic and semantic properties are clearly distinguished, and the relationship to RDFs triples, abstract syntax and semantics is clearer.

    -

    Named Graphs has been adopted by W3C Data Access Working Group as data model for the SPARQL query language.

    -

    Further details about Named Graphs are found in:

    - -

    -

    1.2 RAP Dataset API

    -

    RAP's quad- and named graph-centric Dataset API is an implementation of DAWG's RDF dataset. It provides methods for parsing, manipulating and serializing RDF datasets and pure sets of Named Graphs. It also provides an implementation of the TriX syntax for exchanging RDF datasets.

    -

    The basic idea of the Dataset API is to have a set of Named Graphs plus one additional unnamed default graph. The dataset can be manipulated by adding and removing entire Named Graphs, or by working with individual Quads.

    -API Overview -

    The tables below give an overview about RAPs main interfaces and their most important methods. See PHPDoc for details about all methods.

    - - - - - - - - - - - - - - - - - - -
    NamedGraph
    A collection of RDF triples which is named by a URI. The NamedGraph object wraps RAP models, meaning that MemModel and DbModel can be reused.
    setGraphName(URI)
    Sets the name of the graph.
    getGraphName(URI)
    Returns the URI of the named graph.
    plus all other methods from statement-centric model API.
    -
    -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Dataset
    An RDF datset is a collection of named RDF graphs plus one additional unnamed default graph. RDF datsets can be accessed and modified by adding and removing NamedGraph instances, by adding, removing and finding Quads (RDF triples with an additional graph name) and by adding triple to the background graph. RDF datasets can be serialized using TriX.
    addNamedGraph(namedgraph) Adds a NamedGraph to the set.
    addQuad(quad) Adds a quad to the set of Named Graphs in the RDF dataset. A new NamedGraph will automatically be created if necessary.
    addDefaultGraph(graph) Adds the default graph to the RDF dataset.
    createGraph(graphName,baseURI)
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.
    getNamedGraph(graphName)Returns the NamedGraph with a specific name from the Dataset.
    getDefaultGraph()Returns a reference to the default graph of the Dataset.
    removeNamedGraph(graphName)Removes a NamedGraph from the set.
    findInNamedGraphs(quad) Finds Quads that match a quad pattern.
    listNamedGraphs()Returns an iterator over all NamedGraphs in the set.
    serializeToFile()Saves RDF datset as TriX file.
    sparqlQuery(query [, resultForm])Executes a SPARQL query against the dataset.
    -
    -

     

    -

    Usage Examples

    -

    2.1 Operations on Datasets and NamedGraphs

    - - - - - - -

     

    - - - - - - - -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //get a GraphSet from the ModelFactory
    - $graphset = ModelFactory::getDatasetMem('Dataset1');

    -

    // Create a new NamedGraphsMem
    - $graph1 = new NamedGraphMem('http://graph1');
    - $graph2 =& $graphset->createGraph('http://graph2');

    -

    //create Quads
    - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1'));
    - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2'));
    - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3'));
    - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5'));

    -

    //add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically
    - $graphset->addQuad($quad1);
    - $graphset->addQuad($quad3);
    - $graphset->addQuad($quad2);

    -

    //add a NamedGraph to the Set
    - $graphset->addNamedGraph('http://graph1',$graph1);

    -

    //Is the Graph "http://graph1" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph1" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph1'));
    - echo'<p/>';

    -

    //remove 'http://graph2' from the set
    - $graphset->removeNamedGraph('http://graph2');

    -

    //Is the Graph "http://graph2" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph2" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph2'));
    - echo'<p/>';

    -

    //creat basic statement
    - $statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'));

    -

    //get a Graph from the Set and add a basic statement
    - $graph4=&$graphset->getNamedGraph('http://graph4');
    - $graph4->add($statement);

    -

    //remove Quad5
    - $graphset->removeQuad($quad5);

    -

    //get an iterator over all Quads
    - echo '<p/><b>All Quads:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $quad=$iterator->current();
    -    echo $quad->toString().'<BR>';
    - };

    -

    //get an iterator over all Quads in 'http://graph3'
    - echo '<p/><b>All Quads in http://graph3:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $quad=$iterator->current();
    -    echo $quad->toString().'<BR>';
    - };

    -

    //how many Quads are in the whole GraphSet
    - echo '<p/><b>How many Quads are in the whole GraphSet?</b><BR>';
    - echo $graphset->countQuads();

    -

    //does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - echo '<p/><b>Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?</b><BR>';
    - var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')));
    -

    -

    // run a sparql query against the dataset wich fetches all statements from <http://graph4>
    - $sparqlQuery = "SELECT * FROM NAMED <http://graph4> WHERE {?s ?p ?o} ";
    - $result = $graphset->sparqlQuery($sparqlQuery);

    -

    // print the results as html table
    - echo '<p/><b>Result of the sparql query: "SELECT * FROM NAMED &lt;http://graph4&gt; WHERE {?s ?p ?o}" </b><BR>';
    - SparqlEngine::writeQueryResultAsHtmlTable($result);

    -

    ?>

     
    -

     

    -

    2.2 - - - Using Database Persistence

    - - - - - - -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - //Get a DbStore from the modelFactory
    - $dbstore=ModelFactory::getDbStore('MySql','localhost','rap','root','');
    -
    - //create the needed tables in the database, if they aren't already set up.
    - if (!$dbstore->isSetup('MySQL'))
    -   $dbstore->createTables('MySql');
    -
    - //create a new dataset, if the dataset was not found
    -$dataset1=& $dbstore->getDatasetDb('Dataset1');
    - if ($dataset1 === false)
    -   $dataset1=& $dbstore->getNewDatasetDb(''Dataset1'');
    -
    - //create a new namedGraph in the dataset.
    -$namedGraph1=& $dataset1->createGraph('http://rap/NamedGraph1');
    -
    - //add a statement to the namedGraph -
    - $namedGraph1->add(new Statement(new Resource('http://rap/ng1_res1'),new Resource('http://rap/ng1_res2'),new Resource('http://rap/ng1_res3')));

    -

    //create a Quad
    - $quad1= new Quad(new Resource('http://rap/NamedGraph2'),new Resource('http://rap/ng2_res1'),new Resource('http://rap/ng2_res2'),new Resource('http://rap/ng2_res3'));

    -

    //add the Quad to the dataset (the needed namedGraph (http://rap/NamedGraph2) is created automatically)
    - $dataset1->addQuad($quad1);

    -

    //print out all saved statements
    - for($iterator = $dataset1->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $currentQuad= $iterator->current();
    -   echo $currentQuad->toString().'<BR>';
    -};
    -?>

    -
    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheModelAPI.htm.svn-base deleted file mode 100755 index 72161313..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheModelAPI.htm.svn-base +++ /dev/null @@ -1,689 +0,0 @@ - -Using RAP's Statement-Centric MemModel API - - - - - - -

    RDF API for PHP

    -

    Using RAP's Statement-Centric MemModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski, Daniel Westphal
    -October 2004

    -
    -

    This tutorial demonstrates how RAP's statement-centric MemModel API is used - for creating and manipulating RDF models.
    - More information about the MemModel API is found in the MemModel PHPdocs. - An overview about RAP's other APIs is given in Introduction - to RAP.

    -

    Contents:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1.Installation
    2.Creating - Statements
    3.Generating - RDF Models
    4.Printing - Out a Model
    5.Saving - a Model Serialization to File
    6.Blank - Nodes
    7.Typed - Literals
    8.Traversing - a Model
    9.Comparing - and Combining Models
    10.Querying - a Model
    11.Reification
    12.Terminating - a Model
    13.Implementation Notes
    -

    -

    1. Installation

    -

    To get started we need to download the most recent version of RDF API for PHP -from http://sourceforge.net/projects/rdfapi-php/ -and unzip the package. Note that RAP requires PHP 4.2 or later.

    -

    Next we can begin with an example script. The first step is to include all -RAP classes. We do it by defining the directory in which the API has been -unzipped and then include the file RdfAPI.php as shown below.

    - - - -
    -

    define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -
    include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); -



    -

    2. Creating Statements

    -

    Creating statements with RAP is extremely easy. Since each statement in RAP -is represented by an object (Statement), we have to create an -instance of this object with subject, property, and value passed as parameters -to the constructor function.

    -

    Consider the following statement written in N-Triple notation: -

    <http://www.example.org/someDocument.html> -<http://www.purl.org/dc/elements/1.1/creator> "Radoslaw -Oldakowski".

    In order to represent this statement in RAP we first -create its components (subject and predicate - both are resources indicated by -URIs), which we will also be using later on in this tutorial:

    - - - -
    -

    $someDoc = new Resource - ("http://www.example.org/someDocument.html");
    $creator = new Resource - ("http://www.purl.org/dc/elements/1.1/creator"); -

    -

    and then pass them together with the third component (object -Literal) to the constructor function:

    - - - -
    -

    $statement1 = new Statement ($someDoc, $creator, new Literal - ("Radoslaw Oldakowski"));

    -

    RDF API for PHP also provides support for common vocabularies like Dublin Core used in this -statement. So instead of creating a new Resource ($creator) -representing the creator property we can also use the pre-defined variable -$DC_creator (see script DC.php).

    -

    In this straightforward way we have created our first object -Statement. Having this object, we could now compare it with other -statements (method compare()), serialize to string -(toString()), reify (reify() - see Section -11), or what we probably would do in most cases add it to a model.


    -

    3. Generating RDF Models

    -

    An overview of the different kinds of RAP models is found in Introduction - to RAP. RDF models can be stored either in main memory - (MemModel) or in a relational database (DbModel). Except for some indexing mechanisms - and Statement Iterator feature in the case of MemModel, all the other methods - are equal for both classes. So we can manipulate RDF models using the same function - names and expect the same output, regardless of the storage mechanism chosen. - In this tutorial I will focus on MemModels, whereas working with DbModels is - described here.
    -The different kinds of models are created using a model factory.

    -

    In order to generate a new MemModel we simply write:

    - - - -
    -

    $model1 = ModelFactory::getDefaultModel();

    -

    To specify a base URI of a MemModel, we can either pass the URI string -as parameter to the constructor function or set it for an existing model using -the method setBaseURI(). In our example we just leave the default -setting and proceed with adding our first statement -($statement1):

    - - - -
    -

    $model1->add($statement1);

    -

    In this simple way we have created a model containing one statement. However, -the method add() does not check if a MemModel already contains the -statement to be added. So if you want to avoid duplicates, use the method -addWithoutDuplicates() instead.

    -

    While generating a model we can add not only single statements but moreover -also entire models. To demonstrate this, we create a new MemModel containing two -statements:

    - - - -
    -

    $model2 = ModelFactory::getDefaultModel()
    $model2->add(new - Statement($someDoc, new - Resource("http://www.example.org/myVocabulary/title"), new Literal("RAP - tutorial")));
    $model2->add(new Statement($someDoc, new - Resource("http://www.example.org/myVocabulary/language"), new - Literal("English")));

    -

    and then add the second MemModel ($model2) just created to the -first one ($model1):

    - - - -
    -

    $model1->addModel($model2);

    -

    The parameter passed to the method addModel() can be an instance -of both classes MemModel and DbModel. If we now check the size of -$model1 using the method size():

    - - - -
    -

    echo "\$model1 contains " .$model1->size() ." statements"; -

    -

    we will see that $model1 contains now three -statements:

    Output: - - - -
    -

    $model1 contains 3 statements



    -

    4. Printing Out a Model

    -

    RDF API for PHP provides some useful methods for displaying the contents of a -MemModel. Using the method writeAsHtmlTable() we can print out the -MemModel as a table containing a set of triples. Methods toString() -and toStringIncludingTriples() create a plain text serialization of -the MemModel, whereas writeRDFtoString() and -writeAsHtml() serialize the model to RDF/XML. The latter converts -special chars to HTML entities, so that the serialization can properly be -displayed in a browser window.

    -

    Accordingly, the following piece of code:

    - - - -
    -

    // Output $model1 as HTML table
    echo "<b>Output the - MemModel as HTML table: </b><p>"; -
    $model1->writeAsHtmlTable();

    // Output the string - serialization of $model1
    echo "<b>Output the plain text - serialization of the MemModel: </b><p>";
    echo - $model1->toStringIncludingTriples();

    // Output the RDF/XML - serialization of $model1
    echo "<b>Output the RDF/XML - serialization of the MemModel: </b><p>";
    echo - $model1->writeAsHtml();

    -

    would render this output in a browser window:

    Output: - - - -
    Output the MemModel as HTML table: -

    - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.purl.org/dc/elements/1.1/creator

    -

    Literal: Radoslaw Oldakowski

    -

    2.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    Literal: RAP tutorial

    -

    3.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    Literal: English



    Output the - plain text serialization of the MemModel: -

    MemModel[baseURI=; size=3] - Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.purl.org/dc/elements/1.1/creator"), Literal("Radoslaw - Oldakowski")) Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.example.org/myVocabulary/title"), Literal("RAP - tutorial")) Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.example.org/myVocabulary/language"), - Literal("English"))


    Output the RDF/XML serialization of the - MemModel: -

    <?xml version='1.0' encoding='UTF-8'?>
    <rdf:RDF
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
       xmlns:ns1="http://www.purl.org/dc/elements/1.1/"
       xmlns:ns2="http://www.example.org/myVocabulary/">

    <rdf:Description rdf:about="http://www.example.org/someDocument.html">
       <ns2:language>English</ns2:language>
       <ns2:title>RAP tutorial</ns2:title>
       <ns1:creator>Radoslaw Oldakowski</ns1:creator>
    </rdf:Description>

    </rdf:RDF> -



    -

    5. Saving a Model Serialization to File

    -

    In addition to displaying a MemModel on the screen, we can save its -serialization to a file. RAP V0.8 supports the RDF/XML, N-Triple, and N3 syntax. -Thus, when we call the method saveAs() and pass the filename as the -first parameter, RAP will use the appropriate serializer according to the flag -('rdf' ,'n3' , or 'nt') provided as the second -parameter:

    - - - -
    -

    $model1->saveAs("model1.rdf", "rdf"); -
    $model1->saveAs("model1.n3", "n3");

    -

    As output of the above code two files with RDF data have been created (model1.rdf -and model1.n3). -In the case that we leave out the second parameter, RAP will use the default -setting and will serialize the MemModel to RDF/XML.

    -

    To load an RDF model from a file we call the method load() -passing the name or a URL of the document containing RDF data and its -serialization syntax as parameters. If the second parameter is not provided, RAP -will decide upon the suffix which parser to use.


    -

    6. Blank Nodes

    -

    Blank Nodes in RDF API for PHP are represented by instances of object -BlankNode. Every B-Node is assigned a unique identifier which can -either be explicitly specified by the user or automatically generated for the -model passed to the constructor method. However, these identifiers have only a -local scope within a particular model. Thus, if two different RDF models use the -same blankNodeID, it does not necessarily mean that the Blank Nodes -identified by this ID must also be the same.

    -

    Consider the following modification of $model1: we replace the -literal "Radoslaw Oldakowski", being an object in the first -statement, with a Blank Node. After that we make additional statements -describing this B-Node. To do this, we first create a new BlankNode allowing the -identifier to be automatically generated for our MemModel -$model1:

    - - - -
    -

    $bNode = new BlankNode($model1);

    -

    Next, using the method replace(), we exchange the objects:

    - - - -
    -

    $model1->replace(NULL, NULL, new Literal("Radoslaw - Oldakowski"), $bNode);

    -

    This will search for all statements having an object equal to the passed -literal and replace this literal with the value of the fourth parameter -($bNode). Subsequently we add new statements describing the Blank -Node using RAP's pre-defined vCard vocabulary ($VCARD_FN, -$VCARD_EMAIL):

    - - - -
    -

    include(RDFAPI_INCLUDE_DIR . "vocabulary/VCARD.php");
    - $model1->add(new Statement($bNode, $VCARD_FN, new - Literal("Radoslaw Oldakowski")));
    $model1->add(new - Statement($bNode, $VCARD_EMAIL, new Literal("radol@gmx.de"))); -



    -

    7. Typed Literals

    -

    The next statement we are about to add to $model1 describes the -age of the person represented by the Blank Node $bNode. After -having created the literal object:

    - - - -
    -

    $age = new Literal("26");

    -

    we can explicitly indicate the datatype of the literal using the method -setDatatype():

    - - - -
    -

    $age->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); -

    -

    and then add the entire statement to the MemModel as usual:

    - - - -
    -

    $model1->add(new Statement ($bNode, new - Resource("http://www.example.org/myVocabulary/age"), $age)) -

    -

    Similarly, we can specify the language of a literal by calling the method -setLanguage() or by passing the language string as second parameter -to the constructor method on an object Literal.


    -

    8. Traversing a Model

    -

    If there is a need to traverse statements of a MemModel one by one, we can -use a Statement Iterator. The Statement Iterator is an object created by calling -the method getStatementIterator() on a MemModel, for instance:

    - - - -
    -

    $it = $model2->getStatementIterator(); -

    -

    Once instanced, the Statement Iterator can be ordered to return the current -(current()), next (next()), or previous -(previous()) statement. It can also move to a desired position -(moveFirst(), moveLast(), moveTo()). In -the following example we will use the iterator to output the label (URI or -literal string) of the subject, predicate and object of each statement in -$model2:

    - - - -
    -

    while ($it->hasNext()) {
          - $statement = $it->next();
          echo - "Statement number: " . $it->getCurrentPosition() . "<BR>"; -
          echo "Subject: " . - $statement->getLabelSubject() . "<BR>"; -
          echo "Predicate: " . - $statement->getLabelPredicate() . "<BR>"; -
          echo "Object: " . - $statement->getLabelObject() . "<P>";
    } -

    -

    This will generate the following output on the browser -screen:

    Output: - - - -
    -

    Statement number: 0
    Subject: - http://www.example.org/someDocument.html
    Predicate: - http://www.example.org/myVocabulary/title
    Object: RAP tutorial -

    Statement number: 1
    Subject: - http://www.example.org/someDocument.html
    Predicate: - http://www.example.org/myVocabulary/language
    Object: English -

    -

    Since the Statement Iterator does not use the PHP's built-in array iterator, -we can independently use several instances of object StatementIterator on the -same model. This feature, however, is only accessible for instances of class -MemModel.


    -

    9. Comparing and Combining Models

    -

    RDF API for PHP provides three methods for comparing models. Using the -function equals() we can find out if two models are the same. -Methods containsAny() and containsAll() return a -corresponding Boolean value about statements shared by two models being -compared.

    -

    Furthermore, we can combine two different models by using either of the -methods unite(), subtract() or -intersect(), which will return a new MemModel respectively. More -details about these functions can be found in RAP -documentation.

    -

    As far as the methods described in this section are concerned, RAP offers a -high degree of flexibility by allowing the passed parameter to be an instance of -either a MemModel or DbModel.


    -

    10. Querying a Model

    -

    One of the probably most frequent activities performed on a model is querying -it. RDF API for PHP V0.9.1 offers various methods helping to find the desired -information. We can, for instance, take our $model1 and search for -statements having subject http://www.example.org/someDocument.html. -For this purpose we use the method find() and pass the object -Resource $someDoc representing this particular subject as -parameter:

    - - - -
    -

    $result = $model1->find($someDoc, NULL, NULL); -
    $result->writeAsHtmlTable();

    -

    NULL will match anything. The value returned by this method is -another MemModel containing triples matching the passed statement pattern. If we -print out the result model as HTML table the following output will -occur:

    Output: - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.purl.org/dc/elements/1.1/creator

    -

    Blank Node: bNode1

    -

    2.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    Literal: RAP tutorial

    -

    3.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    Literal: English

    -

    Besides the method find() which delivers a new MemModel as query result, RAP - also provides a Find Iterator for Traversing statements matching the specified - pattern. The Find Iterator is an object created - by calling the method findAsIterator() on - a MemModel and passing the statement pattern as parameter (similarly - like in the case of find()). Once instanced, the Find - Iterator can be ordered to return the current (current()) - or to find the next (next()) matching statement.

    -

    Methods findFirstMatchingStatement() and - findCount() are very similar to find(). The former returns - a model containing only one statement, whereas the latter merely returns the - number - of statements - -matching the specified pattern.

    -

    If we want to be even more specific in our queries, we will be likely to use -the method findRegex(), which searches the model for triples -matching a Perl-style regular -expression. Furthermore, using the method findVocabulary() we -can filter all statements of a certain vocabulary.

    -

    RAP V0.9.1 also offers another method for querying RDF models using RDQL query -language. However, this method, as well as RDQL itself, is much more -sophisticated than the previously described functions and therefore is presented -separately in the RDQL -tutorial.

    -

    To increase query performance RDF API for PHP builds by default three search - indices over the subject, predicate, and object. Moreover, you can also - manually customize the indices used, according to the search pattern specified - in your query. This will result in much better performance (however, creating - an -index takes time). RAP allows users to build an index over the combined - labels of subject, predicate, and object or just subject and predicate, or - subject and object. To do this you simply have to call the method index() - and pass the appropriate parameter (IND_SPO, IND_SP, IND_SO respectively - or -NO_INDEX if you want to delete all indices).

    - - - - - - -
    -

    $model1 = ModelFactory::getDefaultModel();
    - $model1->index(IND_SPO);

    -

    -

    11. Reification

    -

    To perform a reification in RAP, we simply call the method -reify() on an object Statement. The MemModel returned -will contain four statements according to the RDF -specification.

    -

    Moreover, we can use the method reify() on an instance of -MemModel or DbModel in order to reify all statements -of this particular model. To demonstrate this, we take our $model2: -and reify all its statements:

    - - - -
    -

    $reified = $model2->reify(); -
    $reified->writeAsHtmlTable();

    -

    The corresponding result model $reified consists of 8 triples, -four for each reified statement as the browser output in form of an HTML table -shows:

    Output: - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 8

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Blank Node: bNode1

    -

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement

    -

    2.

    -

    Blank Node: bNode1

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#subject

    -

    Resource: http://www.example.org/someDocument.html

    -

    3.

    -

    Blank Node: bNode1

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    4.

    -

    Blank Node: bNode1

    -

    RDF Node: -http://www.w3.org/1999/02/22-rdf-syntax-ns#object

    -

    Literal: RAP tutorial

    -

    5.

    -

    Blank Node: bNode2

    -

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement

    -

    6.

    -

    Blank Node: bNode2

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#subject

    -

    Resource: http://www.example.org/someDocument.html

    -

    7.

    -

    Blank Node: bNode2

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    8.

    -

    Blank Node: bNode2

    -

    RDF Node: -http://www.w3.org/1999/02/22-rdf-syntax-ns#object

    -

    Literal: -English



    -

    12. Terminating a Model

    -

    If we know that we will no longer use an object MemModel, we -shall terminate it and free up resources held, especially while working with -MemModels containing a great amount of statements. We can do it by simply -calling the method close(). This way we will close all instances of -class MemModel used in this tutorial as follows:

    - - - -
    -

    $model1->close();
    $model2->close(); -
    $result->close();
    $reified->close(); -


    -

    You can find the source code for this tutorial here. -A detailed description of all methods used can be found in the method -reference of class MemModel provided with RAP documentation.

    -

     

    -

    13. Implementation Notes

    -

    The MemModel implementation stores statements in an array in the system memory. - If a new statement is added to the model, it's appended to the array and added - to a statement index in order to accelerate queries. MemModel is the fastest - of all Model API implementations.

    -

    -


    -

    -

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheOntModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheOntModelAPI.htm.svn-base deleted file mode 100755 index 423af6ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheOntModelAPI.htm.svn-base +++ /dev/null @@ -1,496 +0,0 @@ - -Using RAP's Ontology-Centric OntModel API - - - - - - - - - - - - -

    RDF API for PHP

    -

    - Using RAP's Ontology-Centric OntModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    This tutorial is based on the Jena - Ontology API tutorial.

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Running example: the camera ontology
    4. -
    5. Creating ontology models
    6. -
    7. The generic ontology type: OntResource
    8. -
    9. Handling ontology components: basic class expressions -
    10. -
    11. Handling ontology components: properties
    12. -
    13. Instances (individuals)
    14. -
    -

     

    -

    Introduction

    -

    This tutorial describes RAP's ontology API, and covers a range of common tasks. - Not all details of the API are covered here: Please refer to the RAP PHPDoc to get the full details of - the capabilities of the API.

    -

    The ontology model is an extended version of RAP's ResModel API. OntModel extends - ResModel by adding direct support for the kinds of objects expected to be in - an ontology: classes (in a class hierarchy), properties (in a property hierarchy) - and individuals. The properties defined in the ontology language map to accessor - methods. For example, an OntClass has a method to list its super-classes, - which corresponds to the values of the subClassOf property. This - point is worth emphasizing: no information is stored in the OntClass - object itself. When the OntClass listSuperClasses() method is called, - the information is retrieved from the underlying RDF model. Similarly adding - a subclass to an OntClass asserts an additional RDF statement into - the model.

    -

    - image of layering of graphs in model -

    -

    OntModel just provides a more convenient API for working - with ontology models, but doesn't do any inference by itself. If you also - need inference you have to combine OntModel with an underlying InfModelF or - InfModelB. If you don't need inference you can combine OntModel with an underlying - MemModel or DbModel.

    -

     

    -

    - Running example: the camera ontology -

    - -

    To illustrate the principles of using the Ontology API, we use examples drawn - from a Roger Costello's camera ontology. The camera ontology contains a set - of classes describing some aspects of the domain of still-picture cameras, as - shown below:

    -

    - image of class hierarchy -

    -

    We will only use some of the elements from this ontology to - illustrate the ontology API throughout this tutorial.

    -

    Creating Ontology Models

    - -

    RAP's OntModel is an extension of RAP's ResModel that provides extra - capabilities for handling ontology data sources. Ontology models are created - through the RAP ModelFactory. - The simplest way to create an ontology model is as follows:
    -

    - - - - - - -
    -

    $ontModel = ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY);

    -

    It uses RDFS as the ontology language and assumes that all of the ontology - data will be stored in-memory (MemModel). Actually only RDFS vocabulary is supported. An OWL vocabulary will be implemented - - - in the near future

    -

    Note: it is the choice of reasoner, not the choice of language - profile that determines if entailed statements are seen through the ontology - API. The following example creates an ontology model with RDFS entailment in - backward-chaining mode:

    - - - - - - - -
    -

    $ontModel = ModelFactory::getOntModel(INFMODELB,RDFS_VOCABULARY);

    -

    The Generic Ontology Type: OntResource

    - -

    All of the classes in the ontology API that represent ontology values have - OntResource as a common super-class. This makes OntResource - a good place to put shared functionality for all such classes, and makes a handy - common return value for general methods. The OntResource extends - the ResResource class, so any general method that accepts a resource - or an RDFNode will also - accept an OntResource, and consequently, any other ontology value. -

    -

    - Some of the common attributes of ontology resources that are expressed through methods on OntResource are shown below: -

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - comment -
    -
    -
    - A general comment associated with this value -
    -
    -
    - label -
    -
    -
    - A human-readable label -
    -
    -
    - seeAlso -
    -
    -
    - Another web location to consult for more information about this resource -
    -
    -
    - isDefinedBy -
    -
    -
    - A specialization of seeAlso that is intended to supply a definition of this resource -
    -
    -
    - sameAs -
    -
    -
    - Denotes another resource that this resource is equivalent to -
    -
    -

    - For each of these properties, there is a standard pattern of available methods: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Method - - Effect -
    -
    - add<property> -
    -
    -
    - Add an additional value for the given property -
    -
    -
    - set<property> -
    -
    -
    - Remove any existing values for the property, then add the given value -
    -
    -
    - list<property> -
    -
    -
    - Return an iterator ranging over the values of the property -
    -
    -
    - get<property> -
    -
    -
    -Return the value for the given property, if the resource has one. If -not, return null. If it has more than one value, an arbitrary selection -is made.
    -
    -
    - has<property> -
    -
    -
    -Return true if there is at least one value for the given property. -Depending on the name of the property, this is sometimes -is<property>
    -
    -
    - remove<property> -
    -
    -
    -Removes a given value from the values of the property on this resource. -Has no effect if the resource does not have that value.
    -
    -

    Example: addSameAs( $ResResource ), or isSameAs( $ResResource ). -

    -

    For full details of the individual methods, please consult the PHPDoc.

    -

    - OntResource -defines some other general utility methods. To get or set the value -of a given property, use addPropertyValue( $property, $value ) or getPropertyValue( $property ). Similarly the values of a named property can be listed or removed. -

    -

    - Finally, OntResource -provides methods for listing, getting and setting the RDF types of a -resource. The rdf:type property is one for which many entailment rules -are defined in the semantic models of the various ontology languages. -Therefore, the values that listRDFTypes() returns is more -than usually dependent on the actual reasoner bound to the ontology -model. For example, suppose we have class A, class B which is a -subclass of A, and resource x whose asserted rdf:type is -B. With no reasoner, listing x's RDF types will return only B. If the -reasoner is able to calculate the closure of the subclass hierarchy -(InfModelF and InfmodelB can), X's RDF types would also include A.

    -

    -For some tasks, getting a complete list of the RDF types of a resource -is exactly what is needed. For other tasks, this is not the case. An -ontology editor, for example, might want to distinguish in its display -between inferred and asserted types. In the above example, only x rdf:type B -is asserted, everything else is inferred. One way to make this -distinction is to make use of the base model. Getting -the x resource from the base model and listing the type properties -there would return only the asserted values.

    -

    - To list the RDF types of a resource, use: -
    -

    - - - - - - -
    -

    listRDFTypes() // assumes not-direct
    - listRDFTypes( true ) // if true, show only direct relationships

    -

    Related methods allow the rdf:type to be tested, set and returned.

    -

    Handling Ontology Components: Basic Class Expressions

    - -

    Classes are the basic building blocks of an ontology. A simple class is represented - in RAP by an OntClass - object. You can get an OntClass by calling getOntClass() on the ontology - model:

    - - - - - - -
    -

    $camera = $ontModel->createOntClass( "camNS"."Camera" );

    -

    Once we have the ontology class object, we can begin processing it through - the methods defined on OntClass. The attributes of a class are - handled in a similar way to the attributes of OntResource, above, with a collection - of methods to set, add, get, test, list and remove values. Class properties - that are handled in this way are:

    - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - subClass -
    -
    -
    - A subclass of this class, i.e. those classes that are declared subClassOf this class. -
    -
    -
    - superClass -
    -
    -
    - A super-class of this class, i.e. a class that this class is a subClassOf. -
    -
    -

    - Thus, in our example ontology, we can print a list the subclasses of Camera as follows: -
    -

    - - - - - - - -
    -

    $camera = $model->createOntClass( "camNS:" . "Camera" );
    - foreach ($camera->listSubClasses() as $resResource)
    - {
    -   echo $resResource->getLabel();
    -}

    -

    - OntClass has some other commonly used utilities. To show all of the instances that mention this class as their rdf:type (or one of them), use listInstances().

    -

    Handling Ontology Components: Properties

    - -

    OntProperty is an extension of OntResource and allows access to the additional information - that can be asserted about properties in an ontology language Again, using the - pattern of add, set, get, list, has, and remove methods, we can access the following - attributes of an OntProperty:

    - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - subProperty -
    -
    -
    - A sub property of this property; i.e. a property which is declared to be a subPropertyOf this property. If p is a sub property of q, and we know that A p B is true, we can infer that A q B is also true. -
    -
    -
    - superProperty -
    -
    -
    - A super property of this property, i.e. a property that this property is a subPropertyOf -
    -
    -
    - domain -
    -
    -
    -Denotes the class or classes that form the domain of this property. -Multiple domain values are interpreted as a conjunction. The domain -denotes the class of value the property maps from.
    -
    -
    - range -
    -
    -
    -Denotes the class or classes that form the range of this property. -Multiple range values are interpreted as a conjunction. The range -denotes the class of values the property maps to.
    -
    -

    -In the example camera ontology, the property body is a sub-property of -part, and has domain Camera and range Body (that is, it maps from -instances of cameras to instances of camera bodies). We can reconstruct -this definition in an empty ontology model as follows:

    - - - - - - -
    -

    $newM = ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY);
    - $camera = $newM->createOntClass( "camNS:". "Camera" );
    - $body = $newM->createOntClass("camNS:" . "Body" );
    -
    - $part = $newM->createOntProperty("camNS:". "part" );
    - $body = $newM->createOntProperty("camNS:". "body" );
    -
    - $body->addSuperProperty( $part );
    - $body->addDomain( $camera ); $body->addRange( $body );

    -

    Instances (Individuals)

    - -

    RAP supports a simple notion of an Individual, which is essentially - an alias for ResResource.

    - - - - - - -
    -

    $camera = $newM->createOntClass( "camNS:". "Camera" );
    - $instance = $camera->createInstance("camNS:". "CANJI JXP3");

    -

    In the above example, the individual is named, but this is not necessary. - The method call createInstance() creates an anonymous individual - belonging to the given class.

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheResModelAPI.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheResModelAPI.htm.svn-base deleted file mode 100755 index 75e2ffa8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheResModelAPI.htm.svn-base +++ /dev/null @@ -1,243 +0,0 @@ - -Using RAP's Resource-Centric ResModel API - - - - - -

    RDF API for PHP

    -

    Using RAP's Resource-Centric ResModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    This tutorial is based on the Jena - tutorial by Brian McBride, Daniel Boothby and Chris Dollin.

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Navigating a Model
    4. -
    5. Querying a Model
    6. -
    7. Containers
    8. -
    -

     

    -

    Introduction

    -

    RAP offers two different programming interfaces for manipulating RDF graphs: - The statement-centric Model API which allows you to manipulate - an RDF graph as a set of statements; and the resource-centric ResModel - API for manipulating an RDF graph as a set of resources having properties. - The ResModel API is very similar to the Jena - Model API allowing programmers, which are used to Jena, to easily write - RAP code.

    -

    The ResModel API is implemented on top of the Model API. ResModels are always - having a underlying MemModel, DbModel, InfModelF or InfModelB and are only providing - a resource-centric view on this model. Each method call is translated into a - find()-, add()-, or remove()-call to the underlying model. Thus using ResModel - is slightly slower than using the underlying model directly.

    -

    -

    RDF is a W3C standard for describing resources. What is a resource? That is - rather a deep question and the precise definition is still the subject of debate. - For our purposes we can think of it as anything we can identify. You are a resource, - as is your home page, this tutorial, the number one and the great white whale - in Moby Dick.

    -

    Our examples in this tutorial will be about people. They use an RDF representation of VCARDS . RDF is best thought of in the form of node and arc diagrams. A simple vcard might look like this in RDF:

    -

    figure 1

    -

    The resource , John Smith, is shown as - an ellipse and is identified by a Uniform Resource Identifier (URI), in this - case "http://.../JohnSmith".
    - Resources have properties. In these examples - we are interested in the sort of properties that would appear on John Smith's - business card. The figure above shows only one property, John Smith's full name. - A property is represented by an arc, labeled with the name of a property. The - name of a property is also a URI, but as URI's are rather long and cumbersome, - the diagram shows it in XML qname form. Each property has a value. In this case - the value is a literal, which for now we -can think of as a strings of characters. Literals are shown in rectangles.

    -

    In RAP, the classes representing resources, properties and literals are called - ResResource, ResProperty and ResLiteral. The code below creates John's VCard - using the ResModel API::

    -

     

    - - - - - - -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    // Some definitions
    - define('VCARD_NS', 'http://www.w3.org/2001/vcard-rdf/3.0#');
    - $personURI = "http://somewhere/JohnSmith";
    - $fullName = "John Smith";

    -

    // Create an empty Model
    - $model = ModelFactory::getResModel(MEMMODEL);

    -

    // Create the resources
    - $fullNameLiteral = $model->createLiteral($fullName);
    - $johnSmith = $model->createResource($personURI);
    - $vcard_FN= $model->createProperty(VCARD_NS.'FN');
    - $vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME');

    -

    // Add the property
    - $johnSmith->addProperty($vcard_FN, $fullNameLiteral);

    -

    The code begins with some constant definitions and then creates an empty model, - using the ModelFactory method getResModel(MEMMODEL) to create a ResModel - using a underlying MemModel. RAP also contains other implementations of models, - e.g. one which uses a relational database, or models that support RDFS reasoning - mechanisms; these types of Model are also available from the ModelFactory.

    -

    Navigating a Model

    -

    Given the URI of a resource, the resource object can be retrieved from a model - using the $model->createResource($uri) method. This method is defined to - return a ResResource object if one exists in the model, or otherwise to create - a new one. Example: Retrieve the John Smith resource from the model:

    - - - - - - -

    // Retrieve the John Smith vcard resource from the model
    - $vCard = $model->createResource($personURI);

    -

    The ResResource interface defines a number of methods for accessing the properties - of a resource. The $resource->getProperty($property) method accesses a property - of the resource. The type of the object returned is Statement, not the Property - as you might expect. Returning the whole statement allows the application to - access the value of the property using one of its accessor methods which return - the object of the statement. Example: Retrieve the value of the FN property: -

    - - - - - - -

    // Retrieve the value of the FN property
    - $statement = $vCard->getProperty($vcard_FN);
    - $value = $statement->getObject();

    -

    In this example, the vcard resource has only one vcard:FN property. RDF permits - a resource to have several properties of the same name; for example Adam might - have more than one nickname. Let's give him two:

    - - - - - - -

    // Add two nickname properties to vcard
    - $literal1 = $model->createLiteral("Smithy");
    - $literal2 = $model->createLiteral("Adman");
    - $vCard->addProperty($vcard_NICKNAME, $literal1);
    - $vCard->addProperty($vcard_NICKNAME, $literal2);

    -

    Calling $vcard->getProperty(VCARD.NICKNAME) will return one of the values, - but it is indeterminate which one. So if it is possible that a property might - occur more than once, then the $resource->listProperties($property) method - has to be used to get an array containing all statements with this resource and property:

    - - - - - - -

    // List the nicknames
    - echo '<b>Known nicknames for '.$fullNameLiteral->getLabel().':</b><BR>';
    - foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource)
    - {
    -    echo $currentResource->getLabelObject().'<BR>';
    -};

    -

     

    -

    Querying a Model

    -

    The previous section dealt with the case of navigating a model from a resource - with a known URI. This section deals with searching a model. RAP's ResModel - API only supports a limited query primitive. More powerful query facilities - are provided through the RDQL query language which is described in a separate - tutorial.

    -

    $model->listSubjects() returns an iterator over all resources that have - properties, ie are the subject of some statement. $model->listSubjectsWithProperty($property, - $value) will return an iterator over all the resources which have a property - $property with value $value.

    -

    Example: Iterate over all vcards which having FN property:

    - - - - - - -

    // Iterate over all vcards which having FN property
    - $iter = $model->listSubjectsWithProperty(new ResResource(VCARD_NS.'FN')); -
    - for ($iter->rewind(); $iter->valid(); $iter->next())
    - {
    -     $currentResource=$iter->current();
    - };

    -

    Containers

    -

    RDF defines a special kind of resources for representing collections of things. - These resources are called containers. The members of a container can - be either literals or resources. There are three kinds of container:

    -
      -
    • a BAG is an unordered collection
    • -
    • an ALT is an unordered collection intended to represent alternatives
    • -
    • a SEQ is an ordered collection
    • -
    -

    A container is represented by a resource. That resource will have an rdf:type property whose value should be one of rdf:Bag, rdf:Alt or rdf:Seq, or a subclass of one of these, depending on the type of the container. The first member of the container is the value of the container's rdf:_1 property; the second member of the container is the value of the container's rdf:_2 property and so on. The rdf:_nnn properties are known as the ordinal properties .

    -

    For example, the Model for a simple bag containing the vcards of the Smith's might look like this:

    -

    figure 3

    -

    Whilst the members of the bag are represented by the properties rdf:_1, rdf:_2 etc the ordering of the properties is not significant. We could switch the values of the rdf:_1 and rdf:_2 properties and the resulting Model would represent the same information.

    -

    Whilst containers can be handled using the basic machinery of - resources and properties, RAP has explicit implementation classes to handle - them.
    -

    - - - - - - -

    // Create a bag
    - $bag_smiths = $model->createBag();

    -

    $beckySmith = $model->createResource('http://somewhere/BeckySmith');
    - $beckySmithFN = $model->createLiteral('Becky Smith');
    - $beckySmith->addProperty($vcard_FN,$beckySmithFN );

    -

    // Add persons to bag
    - $bag_smiths->add($beckySmith);
    - $bag_smiths->add($johnSmith);

    -

    If we serialize this Model, you'll get something like this:

    -<rdf:Description rdf:nodeID="A3">
    -    <rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
    -    <rdf:_1 rdf:resource='http://somewhere/BeckySmith'/>
    -    <rdf:_2 rdf:resource='http://somewhere/JohnSmith'/>
    -</rdf:Description>
    -

    which represents the Bag resource.

    -

    The container implementation provides a getMembers() method for getting the - content of a container, as an array of ResResources:

    - - - - - - -

    // Print out the full names of the members of the bag
    - echo '<BR><BR><b>Print out the full names of the members of the bag:</b></BR>';
    - foreach ($bag_smiths->getMembers() as $resResource)
    - {
    -    // Retrieve the value of the FN property
    -    $statement = $resResource->getProperty($vcard_FN);
    -    echo $statement->getLabelObject().'<BR>';
    -};

    -

    The RAP ResContainer classes currently ensure that the the list of ordinal - properties starts with rdf:_1 and is contiguous. The RDFCore WG have relaxed - this constrain, so RAPS's container implementation might follow in the future.

    -

    It is not a problem to use a container object and to modify the state underlying - model using lower level methods at the same time, because all container level - operations are directly written into the underlying model.

    -

    Write the model as HTML table:

    - - - - - - - -
    -

    echo '<BR><BR>All Statements as HTML table';
    - $model->writeAsHTMLTable();

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlClient.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlClient.htm.svn-base deleted file mode 100755 index db1626d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlClient.htm.svn-base +++ /dev/null @@ -1,184 +0,0 @@ - -Using the SPARQL Client - - - - - - -

    RDF API for PHP

    -

    Using the SPARQL Client

    -

    This - - - tutorial - -is part of the RAP - Rdf API for PHP documentation.

    -

    Tobias Gauss <tobias.gauss@web.de>, Chris Bizer <chris@bizer.de>
    - June 2006

    -


    -RAP's SPARQL client allows you to execute SPARQL queries against remote SPARQL endpoints using the SPARQL protocol. Query results are returned as array of variable bindings, RAP MemModel or boolean, depending on the type of SPARQL query.

    -

    Using the SPARQL Client

    - -

    The SPARQL client - - - package - -consists of two classes: SparqlClient which represents a connection to a SPARQL endpoint, and ClientQuery which represents a SPARQL query.

    -

    A SparqlClient is created using RAP's ModelFactory:

    - - - - - - -
    -

    $client = ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/example");

    -

    This line creates a new SparqlClient object $client for executing queries against the SPARQL endpoint http://www.exampleSparqlService.net:2020/example.

    -

    Then we create a ClientQuery object:

    - - - - - - -
    -

    $query = new ClientQuery();

    -

    The ClientQuery object has three methods:

    - - - - - - -
    -

    $query->query($queryString);

    -

    sets the query string of the ClientQuery object.

    -

    If the query string doesn't specify the data set to be queried and if the endpoint supports querying custom data sets, you can use following two methods to define the data set to be queried:

    - - - - - - -
    -

    $query->addDefaultGraph($default);

    -

    sets the default graph of the data set to be queried.

    - - - - - - -

    $query->addNamedGraph($named);

    -

    adds a named graph the data set to be queried.

    -

    A query is executed by calling the query() method of the client object:

    - - - - - - -
    -

    $result = $client->query($query);

    -

    The type of the variable $result depends on the SPARQL query. For SELECT queries, the result is an two dimension array of variable bindings ($result[]['?varname'] ). The values of these variables are RAP objects (Resource, Literal or BlankNode) or an empty string if the variable is unbound. The result of a CONSTRUCT query is a RAP MemModel. The result of a ASK query a variable of the type boolean.

    -

    You can also retrieve the query result in the SPARQL Query Results XML Format by calling the method setOutputFormat() before executing a query.

    - - - - - - -
    -

    $client->setOutputFormat("xml");

    -


    -Usage Example

    -

    We start with including the RAP toolkit and creating a SPARQL client linked to a SPARQL endpoint:

    - - -
    -

    - // Include all RAP classes
    - define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - // Create a SPARQL client

    -$client = ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/example"); -

    -
    - -

    Once the client has been created, we can perform our first query which will be: "Find the full name of all employees". -We create a $querystring containing the corresponding SPARQL query:

    - - -

    - $querystring = '
    -
    PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
    - SELECT ?fullName
    - WHERE { ?x vcard:FN ?fullName }';

    -
    - -

    To execute the query, we create a new ClientQuery object and pass it to the SPARQL client:

    - - -
    -

    - $query = new ClientQuery();
    - $query->query($querystring);
    - $result = $client->query($query);

    -
    - -

    The following code loops over the result set and prints out all bindings of the variable ?fullName.

    - - - - - - -
    -

    - foreach($result as $line){
    -  $value = $line['?fullName'];
    -    if($value != "")
    -      echo $value->toString()."<br>";
    -    else
    -      echo "undbound<br>";
    -}

    -

    Another, even more convenient way to display the results of a query is to use the writeQueryResultAsHtmlTable() method of the SPARQL engine. All we have to do is to pass the query result to this method:

    - -
    -

    - SPARQLEngine::writeQueryResultAsHtmlTable($result); -

    -
    - -

    Which will result in the following output in the browser window:

    - - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - -

    For more SPARQL query examples please refer to the W3C SPARQL specification.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlEngine.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlEngine.htm.svn-base deleted file mode 100755 index b63cd028..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/usingtheSparqlEngine.htm.svn-base +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Using the SPARQL Engine - - - - -

    RDF API for PHP

    -

    Using the SPARQL Engine

    -

    This tutorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Tobias Gauss <tobias.gauss@web.de>
    - Chris Bizer <chris@bizer.de>
    - Christian Weiske <cweiske@cweiske.de>
    -April 2007

    -
    -

    SPARQL is a query language for RDF, which is currently being - standardized by the W3C. This part of the RAP documentation describes - RAP's SPARQL engine and its usage. For a detailed description of the - SPARQL query language please refer to W3C SPARQL working draft. RAP's - SPARQL package allows you to execute SPARQL queries against RDF graphs - and RDF datasets which may be stored in memory or in a relational - database. We have also included SPARQL as additional query language into - RAP's NetAPI RDF server, which allows you to query remote RDF - repositories using W3C SPARQL - protocol.

    -

    RAP's SPARQL package requires PHP version 5.1 or higher.

    -

    Preparation

    -

    Before you can use the RAP's SPARQL classes, you need to include - them properly. The best way to do this is adapting the - config.php file in RAP's - test/ directory: Copy - config.php.dist to - config.php and edit it as you need. If - config.php stays in test/, - the directories are already setup properly.

    -

    If you want to use RAP's SPARQL Engine on a DbModel (database - based Model), you need to change the - $GLOBALS['dbConf'] array. RAP uses ADODB - internally, so the type configuration applies to - ADODB's driver naming scheme.

    -

    Creating a model

    - -

    SPARQL queries are run against a Model, let it be a - DbModel or a - MemModel.

    - - Creating a MemModel from a file - -

    Loading a memor model from a file is fairly easy:

    - - - - - - -
    - $employees = ModelFactory::getDefaultModel();
    -$employees->load(RDFAPI_INCLUDE_DIR . '../doc/Tutorial/employees.rdf');
    -
    -
    - Creating a DbModel - -

    To get a database model, you first need to get a database - instance and aquire the model from it:

    - - - - - - -
    - $database = ModelFactory::getDbStore(
    -    $GLOBALS['dbConf']['type'],
    -    $GLOBALS['dbConf']['host'],
    -    $GLOBALS['dbConf']['database'],
    -    $GLOBALS['dbConf']['user'],
    -    $GLOBALS['dbConf']['password']
    - );

    - $strModel = "http://xmlns.com/foaf/0.1/";
    - $dbModel = $database->getModel($strModel);
    -
    - if ($dbModel === false) {
    -    die('Database does not have a model ' . $strModel . "\n");
    - } -
    - -
    -

    Usage

    - -

    The usage of the SPARQL engine is very similar to the RDQL engine. A sparql query can be executed against an RDF dataset, a MemModel or DbModel. The necessary parts of the SPARQL package are loaded automatically when needed.

    -

    The usage is very simple:

    - - - - - - -
    - $result = $datasetOrModel->sparqlQuery($querystring);
    -

    This line executes the SPARQL query $querystring against the Dataset or Model $datasetOrModel. The query returns an array $result witch contains the matching variable bindings for the SELECT variables. If you want the result to be returned in the SPARQL Query Results XML Format, simply add an additional 'xml' parameter to the function call:

    - - - - - - -
    - $result = $datasetOrModel->sparqlQuery($querystring,'xml');
    -
    - -

    Result renderers

    - -

    While the default array-based result is good enought most times, - you may want to get back XML or HTML, or maybe even JSON to forward it - to an AJAX client that queried your server. RAP's SPARQL engine uses - the concept of "Renderers" to make it easy to obtain the results in - the format you need.

    -

    A renderer is a class that implements either - SparqlEngine_ResultRenderer or - SparqlEngineDb_ResultRenderer interface, - depending on which type of query results you want to convert. Since - Renderers operate directly on raw results (e.g. database rows), they - need to be written separately for each SPARQL engine.

    -

    SparqlEngineDb ships with three - renderers: The default array object renderer, an XML, and an HTML - renderer. To use any of them, pass Default, - XML or HTML as second parameter - to sparqlQuery. If you omit the second parameter, - the default renderer is used.

    -

    If you wrote your own renderer, pass either its full class name - as second parameter to sparqlQuery, or an - instance of it.

    - - -

    Example

    - -

    The initialization for MemModel and - DbModel differs a bit, but once you have the - model, both SPARQL engines behave the same.

    - -

    MemModel initialization -

    - - - - - - -
    - require_once 'C:/Apache/htdocs/rdfapi-php/test/config.php';
    - // Create a new MemModel and load the document
    - $employees = ModelFactory::getDefaultModel();
    - $employees->load(RDFAPI_INCLUDE_DIR . '../doc/Tutorial/employees.rdf');
    -
    - //continue below -
    -

    - - DbModel initialization -

    - - - - - - -
    - require_once '/var/www/rap/rdfapi-php/test/config.php';

    - $database = ModelFactory::getDbStore(
    -    $GLOBALS['dbConf']['type'],
    -    $GLOBALS['dbConf']['host'],
    -    $GLOBALS['dbConf']['database'],
    -    $GLOBALS['dbConf']['user'],
    -    $GLOBALS['dbConf']['password']
    - );

    - $strModel = "http://xmlns.com/foaf/0.1/";
    - $dbModel = $database->getModel($strModel);
    -
    - if ($dbModel === false) {
    -    die('Database does not have a model ' . $strModel . "\n");
    - } -
    -
    - - Querying data - -

    Once the model has been created, we can perform our first query which will be: "Find the full name of all employees". So, we create a variable $querystring and assign the corresponding query string:

    - - - - - - -
    - $querystring = '
    - PREFIX vcard <http://www.w3.org/2001/vcard-rdf/3.0#>
    - SELECT ?fullName
    - WHERE { ?x vcard:FN ?fullName }';
    -

    To execute the query, we call the method sparqlQuery() on the MemModel and pass the variable holding the query string as parameter:

    - - - - - - -
    - $result = $employees->sparqlQuery($querystring);
    -

    The result of the query is a two dimension array of variable bindings ($result[]['?varname']). The values of these variables are RAP objects (Resource, Literal, or BlankNode) or an empty string if the variable is unbound . The following code loops over the result set and prints out all bindings of the variable ?fullName.

    - - - - - - -
    - foreach($result as $line){
    -  $value = $line['?fullName'];
    -    if($value != "")
    -      echo $value->toString()."<br/>";
    -    else
    -      echo "undbound<br/>";
    - }
    -

    Another, even more convenient way to display the results of a - query in a browser is to use the HTML result renderer. All we have - to do is to pass 'HTML' as second parameter to - sparqlQuery():

    - - - - - - - -
    - echo $employees->sparqlQuery($querystring, 'HTML');
    - -

    Which will result in the following output in the browser - window:

    - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - - -

    If we want the engine to return the query result in SPARQL Query Results XML Format, we have to add 'xml' as second parameter to the function call:

    - - - - - - -
    - $result2 = $employees->sparqlQuery($querystring, 'xml');
    -

    Now the variable $result2 contains a string which represents the results in SPARQL Query Results XML Format:

    - - - - - - -
    <?xml version="1.0"?>
    -<sparql xmlns="http://www.w3.org/2005/sparql-results#">
    -   <head>
    -      <variable name="fullName"/>
    -   </head>
    -   <results ordered="false" distinct="false">
    -      <result>
    -         <binding name="fullName">
    -            <literal>Bill Parker</literal>
    -         </binding>
    -      </result>
    -      <result>
    -         <binding name="fullName">
    -            <literal>George Simpson</literal>
    -         </binding>
    -      </result>
    -      <result>
    -         <binding name="fullName">
    -            <literal>Monica Murphy</literal>
    -         </binding>
    -      </result>
    -   </results>
    -</sparql>
    -

    The result of an ASK query is a boolean value, COUNT returns an integer.

    -

    The result of a CONSTRUCT query is a MemModel:

    - - - - - - -
    - $querystring = '
    - PREFIX vcard <http://www.w3.org/2001/vcard-rdf/3.0#>
    - PREFIX rdf <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    -
    - CONSTRUCT { ?x vcard:FN ?fullName}
    - WHERE { ?x vcard:FN ?fullName }';

    - echo $employees->sparqlQuery($querystring, 'HTML');
    -
    -

    A DESCRIBE query also returns a MemModel. Which properties are included into the description can be specified in constants.php:

    - - - - - - -
    - $sparql_describe = array(
    -   FOAF_NS.'Person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox')
    - );
    -

    Meaning that descriptions of instances of foaf:Person will contain the person's name, homepage and mailbox.

    -

    For more SPARQL query examples please refer to the W3C SPARQL Working Draft.

    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/visualization_tutorial.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/visualization_tutorial.htm.svn-base deleted file mode 100755 index b852fac6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/visualization_tutorial.htm.svn-base +++ /dev/null @@ -1,166 +0,0 @@ - - - - Graph Visualization - - - -

    RDF API for PHP

    -

    Tutorial: Graph Visualization

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Anton Köstlbacher <ak@semaweb.org> -
    -April 2005

    -

     

    -

    This is a short Tutorial on how to use GraphViz dot within RAP to -easily generate visualizations of models in several file formats like png, svg or jpeg.

    -

     

    - -

    Introduction

    -

    The visualization tool for RAP V0.9.1 mainly consists of the method RDFUtil::visualizeGraph(). It prepares a so called dot-file, which is afterwards processed by the dot-application. -GraphViz dot is freely available under the Common Public License. The (binary or ascii) output of the dot-application is directly passed back to the browser. A working demo can be found in the RAP distribution (/rdfapi-php/test/custom_test_viz.php).

    -

     

    - - -

    Installation

    -

    The graph visualization features will be included as a standard package into the next RAP release. In order to use them now already, you have to download a current CVS snapshot or download this package and unzip it to your RAP directory.

    -

    Before we get started we need to download and install GraphViz dot into a directory on the machine, on which RAP is running. GraphViz dot is available as source code and binaries for several operating systems at http://www.graphviz.org. Additionally we need to set up a directory for temporary files which is read- and writeable by the webserver-software. Take care of security issues, if you are using RAP on a publicly accessible machine!

    -

     

    - -

    Configuration

    -

    At first we have to make sure, that the webserver (which runs RAP) can access the -GraphViz dot-binary, otherwise we can -only generate dot-files and use them for manual input to the Graphviz standalone application. -For immidiate generation of images we need to set the following parameters in -

    -constants.php - - - - - - -
    -

    -// ----------------------------------------------------------------------------------
    -// GRAPHVIZ
    -// ----------------------------------------------------------------------------------
    -
    -// path to the dot binary
    -define('GRAPHVIZ_PATH', 'C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe');
    -
    -// directory for temporary files
    -// Attention: must be write-/readable by the webserver
    -define('GRAPHVIZ_TEMP', 'C:\/');
    -
    -// display statistical data in generated images
    -// currently only number of statements drawn
    -define('GRAPHVIZ_STAT', TRUE);
    -
    -// allowed file formats
    -// for security reasons (to prevent code injection)
    -define('GRAPHVIZ_FORMAT', 'svg, dot, jpg, png, gif, vrml');
    -
    -// enable clickable URIs
    -// only supported by certain formats (e.g. SVG)
    -define('GRAPHVIZ_URI', FALSE);
    -
    -// define parameters for the graphical output
    -// if a paramter is undefined, the default value of graphviz is used
    -// for further information see: http://www.graphviz.org/Documentation.php
    -$graphviz_param = array(
    -   GRAPH_STYLE     => 'rankdir="LR"',
    -   RESOURCE_STYLE  => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"',
    -   LITERAL_STYLE   => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"',
    -   PREDICATE_STYLE => 'fontname="Courier",fontsize="10"',
    -   INFERRED_STYLE  => 'style="dotted",fontname="Courier",fontsize="10"',
    -   BLANKNODE_STYLE => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"',
    -   BOX_STYLE       => 'fontname="Courier",fontsize="8",color="#BBBBBB"'
    -);

    -
    -

    Here you may find detailed explanations about the STYLE-paramters. -Or you simply try to carefully change the above given values.
    -The supported file formats can be found here.

    -

     

    - -

    Visualizing Models

    -

    Now we are keen on generating our first graph visualization and here we go:

    - - - - - - -
    -

    -

    -// Include RAP
    -define("RDFAPI_INCLUDE_DIR", "./../api/");
    -include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -
    -// Filename of an RDF document
    -$base="example1.rdf";
    -
    -// Create a new MemModel
    -$model = ModelFactory::getDefaultModel();
    -
    -// Load and parse document
    -$model->load($base);
    -
    -// Visualize model
    -header('Content-type: image/gif');
    -$model->visualize('gif');
    -
    -

    -
    -

    As you see above, there is an alias for RDFUtil::visualizeGraph() in the model-class, which makes usage really convenient. Note that the code above will instantly return binary data, so we have to set the correct header for the output file: header('Content-type: image/gif');. If you choose to generate, for example svg, which is a xml-based format, you would need to set the header to header('Content-type: image/svg+xml');.
    -Note: Do not send any headers before. Headers are sent automatically, if there are for example whitespaces before: <?php. To prevent problems with headers, turn on output_buffering in your php.ini or use output-buffering manually.

    - - - -

    This is in fact almost everything you need to know to visualize a model. But we should have a short look at the parameters we can pass to the method:

    - - - - - - - -
    -

    -// Visualize model
    -$model->visualize('gif', FALSE);
    -

    -

    Adding FALSE as second argument will disable the detection of Namespaces and you get fully qualified URIs as you see below:

    - - -

     

    -

    Performance and Alternative Visualization Engines

    -

    The implemented Method in RAP itself can handle very large Models, but visualizing large and/or complex models can take a few minutes, because of the dot-application. The duration depends, as you might assume, on factors like the power of your machine, the size and/or complexity of the model and the chosen output format. I recommend to use XML-based formats like SVG for large models and set an additional header, that forces a 'save as...' window:

    - - - - - - -
    -

    -// Visualize model
    -header('Content-type: image/gif');
    -header('Content-Disposition: attachment; filename=example1.gif');
    -$model->visualize('gif');

    -

    You can also get the original dot-file and pass it for example to the gui-version of Graphviz:

    - - - - - - -
    -

    -// Visualize model
    -header('Content-type: text');
    -$model->visualize('input_dot');

    -

    In future versions there will eventually be integrated support for alternative visualization engines like Tulip. At present you can use the dot-file and import it manually to your preferred visualizer. Most of the visualizers support the dot-format. See: http://directory.google.com/Top/Science/Math/Combinatorics/Software/Graph_Drawing/

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/vocabularies.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/vocabularies.htm.svn-base deleted file mode 100755 index 9b977de6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/.svn/text-base/vocabularies.htm.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - -Tutorial: Using Common Vocabularies - - - - - - -

    RDF API for PHP

    -

    Tutorial: Using Common Vocabularies

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    RAP provides build-in support for the terms of a range of commonly known vocabularies. With version 0.9.1, RAP directly supports the following 8 vocabularies:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Vocabulary

    Website

    Specification

    RDF

    http://www.w3.org/RDF/

    http://www.w3.org/RDF/#specs

    RDFS

    http://www.w3.org/TR/rdf-schema/

    http://www.w3.org/TR/rdf-schema/

    OWL

    http://www.w3.org/TR/owl-ref/

    http://www.w3.org/TR/owl-ref/

    Dublin Core (DC)

    http://dublincore.org/

    http://dublincore.org/documents/dcmi-terms/
    - http://dublincore.org/documents/dces/

    -

    Friend of a Friend (FOAF)

    http://www.foaf-project.org/

    http://xmlns.com/foaf/0.1/

    RSS

    http://web.resource.org/rss/1.0/

    http://web.resource.org/rss/1.0/spec

    ATOM

    http://semtext.org/atom/index.html

    http://www.atomenabled.org/developers/syndication/atom-format-spec.php

    VCARD

    http://www.w3.org/TR/vcard-rdf

    http://www.w3.org/TR/vcard-rdf#3

    -

    This tutorial describes the usage of terms from these vocabularies within RAP.

    -

    -

    Contents:

    - - - - - - - - - - -
    1.Including the - - - Necessary - - Vocabulary Package
    2.Using the Vocabulary
    -

    -

    1. Including the - - - Necessary - -Vocabulary Package

    -

    In order to use a vocabulary you have to include the - - - corresponding - -vocabulary package. The name of the file which you have to include depends on whether you are working on the RAP model layer model layer or on the RAP resource layer.

    -

    When you want to use FOAF together with a MemModel you have to include:

    - - - -

    include( RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php');

    -

    In case of working with a ResModel you have to include:

    - - - - - - -

    include( RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_RES.php');

    -

    The following table lists all include packages for the different vocabularies:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Vocabulary

    Together with MemModel

    Together with ResModel

    RDF

    vocabulary/RDF_C.phpvocabulary/RDF_RES.php

    RDFS

    vocabulary/RDFS_C.phpvocabulary/RDFS_RES.php

    OWL

    vocabulary/OWL_C.phpvocabulary/OWL_RES.php

    Dublin Core (DC)

    vocabulary/DC_C.phpvocabulary/DC_RES.php

    Friend of a Friend (FOAF)

    vocabulary/FOAF_C.phpvocabulary/FOAF_RES.php

    RSS

    vocabulary/RSS_C.phpvocabulary/RSS_RES.php

    ATOM

    vocabulary/ATOM_C.phpvocabulary/ATOM_RES.php

    VCARD

    vocabulary/VCARD_C.phpvocabulary/VCARD_RES.php
    -

     

    -

    2. Using the Vocabulary

    -

    Now you are able to create resources for vocabulary terms by calling one simple method instead of generating them with $resouce = new Resource('uri'). To create a RDFS- comment for example you have to call:

    - - - - - - -

    $comment = RDFS::COMMENT();

    -

    instead of:

    - - - - - - -

    $comment = new Resource(http://www.w3.org/2000/01/rdf-schema#comment);

    -

    If you included the PACKAGE_VOCABULARY_CLASS package $comment is a Resource with the URI -http://www.w3.org/2000/01/rdf-schema#comment. If you included the PACKAGE_VOCABULARY_RES package $comment is a ResResource with the same URI.

    -

    Normally the method to create a term is named like the term in the vocabulary using upper case. There are some reserved words in PHP like 'class' or 'list' so the methods to create these resources have other identifiers. To generate an OWL Class (http://www.w3.org/2002/07/owl#Class) for example use the method OWL::OWL_CLASS(). To find out how these methods are named have a look at the corresponding vocabulary file.

    -

     

    -

    3. Backward - - - Compatibility

    -

    For backward - - - compatibility - -reasons, we are still supporting RAP 0.8's PACKAGE_VOCABULARY package. Including this package will create MemModel resources for all terms in all vocabularies. This is very memory consuming and should thus be avoided.

    -

    In order to use the old vocabularies you have to include:

    - - - - - - -

    include( RDFAPI_INCLUDE_DIR . PACKAGE_VOCABULARY);

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/database_persistence.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/database_persistence.htm deleted file mode 100755 index e00b244a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/database_persistence.htm +++ /dev/null @@ -1,280 +0,0 @@ - - - - Tutorial: Database Persistence - - - - -

    RDF API for PHP

    -

    Tutorial: Database Persistence

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski <radol@gmx.de> -
    -October 2004

    -

     

    -

    In this tutorial I will demonstrate how to use the new developed -database backend within RAP by giving some examples of setting the -database connection, as well as creating, retrieving, and manipulating -persistent models.

    -

     

    -

    Introduction

    -

    The database backend for RAP V0.9.1 consists of two classes DbStore -and DbModel. The former is used to set the database -connection as well as create and retrieve persistent models (DbModels). -The latter provides methods for manipulating these models. There is -also a parent class Model with some general functions -common for both MemModel and DbModel.

    -

     

    -

    First Steps - Setting the Database Connection and Creating Tables

    -

    RDF API for PHP V0.9.1 supports a great variety of different databases -(see ADODB supported -databases) . Moreover, RAP allows connecting to multiple databases -at the same time. Every database containing RDF data is represented by -an instance of class DbStore. We can create this object -by simply passing all connection parameters to the constructor -function. For example, if we want to use MySQL, we will set the -connection as shown below:

    - - - - - - -
    -

    $mysql_database = ModelFactory::getDbStore('MySQL', 'host', -'db_name', 'user_name', 'password');

    -

    The parameters to be passed represent the database driver, host -name, database name, user name, and password respectively, reflecting -our own connection settings. Similarly, we can connect to other -databases, for instance Oracle:

    - - - - - - -
    -

    $oracle_database = ModelFactory::getDbStore('Oracle', FALSE, -'db_name', 'username', 'password');

    -

    In case that we are using the same type of database all the time, we -can also define the connection parameters as the default setting in -Section Database of the file constants.php. -For instance, if we use MsAccess via ODBC, with RDF_DB as -system DSN, and we do not need any username or password to connect to -our database, we will define the connection constants as follows:

    -constants.php - - - - - - -
    -

    // -----------------------------------------------------------------------
    -// Database
    -// -----------------------------------------------------------------------
    -define("ADODB_DB_DRIVER", "ODBC");
    -define("ADODB_DB_HOST", "RDF_DB");
    -define("ADODB_DB_NAME", "");
    -define("ADODB_DB_USER", "");
    -define("ADODB_DB_PASSWORD", "");

    -
    -

    Subsequently we can connect to our database using these settings as -default parameters:

    - - - - - - -
    -

    $access_database = ModelFactory::getDbStore();

    -

    When using RAP's database backend for the very first time, we must -additionally create appropriate tables, in order to be able to store -RDF models. RAP provides a very useful method createTable() -which will automatically create all tables and indexes needed. We only -have to specify the type of the database we are using:

    - - - - - - -
    -

    $access_database->createTables('MsAccess');
    -$mysql_database->createTables('MySQL');

    -
    -

    Unfortunately, currently this method only supports MsAccess and -MySQL. Thus, if we want to use other databases (for instance Oracle, we -have connected to in this tutorial) we will have to create all required -tables and indexes manually by ourselves according to the abstract database schema provided with the -API documentation.

    -

     

    -

    Creating and Retrieving DbModels

    -

    In RDF API for PHP V0.9.1 every persistent model (DbModel) is given a -unique URI (modelURI) to differentiate it from other models. -Thus, when creating a new DbModel or retrieving an existing one, we -have to specify its modelURI. For example, we can create a new, empty -DbModel in the Access database from the previous section by calling the -method getNewModel() on the database object and passing -the modelURI as parameter:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel1";
    -$dbModel1 = $access_database->getNewModel($modelURI);

    -
    -

    If we defined the connection parameters in constants.php, we can get an default DbModel without manualy creating an DbStore object before. If the model with the given base URI does exist in the database, it will be opened. If not, it will be created.

    - - - - - - -
    -

    $modelURI = "http://somewhere.edu/rap-v-06/tutorial/DbModel1";
    - $dbModel1 = ModelFactory::getDefaultDbModel($modelURI);

    -

    Note that getNewModel() will return FALSE -if a DbModel with the same modelURI already exists. Therefore, if you -are in doubt, it is highly recommended to use the method modelExists() -to check the URI to be assigned, prior to calling getNewModel(). -Accordingly, we can modify the above code as follows:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel1";

    -

    if ($access_database->modelExists($modelURI))
    -   echo "WARNING! DbModel with the same URI: '$modelURI' -already exists";
    -else
    -   $dbModel1 = -$access_database->getNewModel($modelURI);

    -
    -

    Trying to use an existing modelURI will consequently cause a warning -notice.

    -

    It often happens that we not only need to create a completely new -DbModel but moreover want to store an in-memory model or even a -persistent model from another database. For this purpose we can use the -method putModel(). To demonstrate this we initially -generate a new MemModel from an RDF document (example1.rdf):

    - - - - - - -
    -

    // Create a new memory model
    -$memModel = ModelFactory::getDefaultModel();

    -

    // Load and parse document
    -$memModel->load("example1.rdf");

    -

    and then we pass the object $memModel just created, -together with the modelURI we want to assign it, to the method putModel():

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel2";
    -$access_database->putModel($memModel, $modelURI);

    -
    -

    To list all models persistently stored in the database RAP provides -the method listModels() which returns an array with -modelURI and baseURI of every DbModel. Using this function we can, for -instance, print out the contents of the database created in this -tutorial:

    - - - - - - -
    -

    // get the list with modelURI and baseURI of all -DbModels
    -$list = $access_database->listModels();

    -

    // print out the database contents
    -foreach ($list as $model) {
    -   echo "modelURI: " .$model['modelURI'] ."<BR>";
    -   echo "baseURI : " .$model['baseURI'] -."<BR><BR>";
    -}

    -
    -

    This will result in the following output:

    -Output: - - - - - - -
    modelURI: http://somewhere.edu/rap-v-06/tutorial/DbModel1
    -baseURI : -

    modelURI: http://somewhere.edu/rap-v-06/tutorial/DbModel2
    -baseURI : http://www.w3.org/Home/Lassila.rdf#

    -
    -

    Note that we have not indicated any baseURI for the first model -listed above. We could have done it by passing the baseURI as the -second parameter to the method getNewModel(). In the case -of the next model, the baseURI comes from the original MemModel saved -by using the function putModel().

    -

    Retrieving a persistent RDF model is also very easy. We simply call -the method getModel() on a database object and indicate -the URI of the DbModel to be accessed, as shown below:

    - - - - - - -
    -

    $modelURI = -"http://somewhere.edu/rap-v-06/tutorial/DbModel2";
    -$DbModel2 = $access_database->getModel($modelURI);

    -
    -

    getModel() returns an object DbModel or FALSE -if the modelURI was not found.

    -

     

    -

    Manipulating a DbModel

    -

    Once we have created an instance of DbModel, we can manipulate it, -i.e. add, remove, or replace statements, serialize the model into -different formats (plain text, RDF/XML, N3), save it to file or output -in a browser window, compare and combine it with other MemModels or -DbModels, reify, or query it. For this purpose RDF API for PHP allows -us to use the same method names as in the case of manipulating a -MemModel (see tutorial getting started). -Therefore, it is not necessary to repeat them once again. Although the -internal implementation of these methods differs from those of the -class MemModel, all the differences are hidden for the -user. Hence, one can expect the same results while manipulating RDF -models regardless of the storage mechanism chosen.

    -

    Though, there are two methods specific only for DbModels, namely: delete() -removing a persistent model from database and getMemModel() -which loads a DbModel (including all statements) into a memory model. -Remember also that the Statement Iterator (getStatementIterator()) -is not accessible for instances of DbModel, likewise the indexing -method (index()). The latter, because RAP makes use of -database internal indexing capabilities. All the other features -described in the introductory tutorial getting -started are common for both classes MemModel and DbModel.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/db_utils.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/db_utils.htm deleted file mode 100755 index 041906d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/db_utils.htm +++ /dev/null @@ -1,62 +0,0 @@ - -Tutorial: RDF DB Utils - - - - - -

    RDF API for PHP

    -

    Tutorial: RDF DB Utils

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    RDF DB Utils is a new graphical user interface written by Gunnar AAstrand Grimnes for dealing with DbModels.

    -

    -

    Contents:

    - - - - - - - - - - - - - - - - - -
    1.Configuration
    2.Connecting to a Database
    3.Browse through a model
    4.Querying a model
    5.Adding statements/models
    -

    -

    1. Configuration

    -

    The tool can be found in the tools directory under rdfdb-utils. You can specify your database settings in config.inc.php. -Currently we support mysql and MsAccess databases. Example: use the settings

    - - - -

    $i=0;
    - $_DB[$i]["type"]="mysql";
    - $_DB[$i]["host"]="localhost";
    - $_DB[$i]["port"]="";
    - $_DB[$i]["dbName"]="rdf_db";
    - $_DB[$i]["username"]="root";
    - $_DB[$i]["password"]="";

    -

    for the mysql-database rdf_db running on localhost.

    -

    2. Connecting to a Database

    -

    You can create a new database connection or choose a connection that is specified in config.inc.php.

    -

    -

    3. Browse through a model

    -

    You can browse through a selected model to view edit or delete statements.

    -

    -

    4. Querying a model

    -

    To search in a model you can use RDQL or enter parts of the statement directly.

    -

    -

    5. Adding statements/models

    -

    To add statements or models You can insert them manually or upload RDF files.

    -

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/employees.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/employees.rdf deleted file mode 100755 index a7173c49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/employees.rdf +++ /dev/null @@ -1,76 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/grddl_parser.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/grddl_parser.htm deleted file mode 100755 index 9a8fb5e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/grddl_parser.htm +++ /dev/null @@ -1,94 +0,0 @@ - - -Tutorial: GRDDL Parser - - - - - -

    RDF API for PHP

    -

    Tutorial: GRDDL Parser

    -

    This turorial is part of the RAP - Rdf API for PHP - documentation.

    -

    The RAP GRDDL parser allows you to extract RDF-data from XHTML documents.

    -

    The GRDDL parser requires PHP 5.1 or later, because it uses PHP5's build in - xslt-processor.

    -

    There a several approaches to extract RDF-data from XHTML documents and there - is a W3C - best-practice "RDF in XHTML Taskforce" looking at the issue. RAP - provides an implementation of the GRDDL proposal, currently discussed by the - working group. GRDDL stands for "Gleaning - Resource Description from Dialects of Languages" and uses XSLT to extract - RDF-data from XHTML.

    -

    -

    (http://www.w3.org/TR/grddl/) -

    -

    1. XHTML Input Document

    -

    The Input document has to contain at least one reference to an XSLT stylesheet - which describes how your rdf-data is encoded in the XHTML document. For example, - this document

    - -
    <html xmlns="http://www.w3.org/1999/xhtml">
    -  <head profile="http://www.w3.org/2003/g/data-view">
    -    <title>Some Document</title>
    -
    -    <link rel="transformation"
    -       href="http://www.w3.org/2000/06/dc-extract/dc-extract.xsl" />
    -    <meta name="DC.Subject"
    -       content="ADAM; Simple Search; Index+; prototype" />
    -    ...
    -  </head>
    -  ...
    -</html>
    -

    refers to the dc-extract.xsl stylesheet and contains the following -RDF statements:
    - - -
    -
    -<rdf:RDF
    -  xmlns:dc="http://purl.org/dc/elements/1.1/"
    -  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    -  >
    -  <rdf:Description rdf:about="">
    -    <dc:subject>ADAM; Simple Search; Index+; prototype</dc:subject>
    -  </rdf:Description>
    -</rdf:RDF>
    -
    -
    -

    The stylesheet is located at http://www.w3.org/2000/06/dc-extract/dc-extract.xsl
    -  

    -

    2. Using RAP's GRDDL Parser

    -

    To parse an rdf-data containing xhtml document, simply use the load() - function of any RAP model. If the file extension of your XHTML - file is ".html" or".htm" then RAP uses the GRDDL parser - automatically. Otherwise you have to explicitly specifiy the parser in the load - call $model->load('doc.html', "GRDDL");

    - - - -

    define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    $model = new MemModel();
    - $model->load('doc.html');

    -
    -

     

    -

    3. Further Information about GRDDL

    -

    For further information and examples see

    - -

    Some Stylesheets for commonly known vocabularies are:

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/all-wcprops deleted file mode 100755 index b355b5e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/all-wcprops +++ /dev/null @@ -1,149 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img -END -ScreenShot003.JPG -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/ScreenShot003.JPG -END -ScreenShot004.JPG -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/ScreenShot004.JPG -END -dc-extract.png -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/dc-extract.png -END -memmodel.png -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/memmodel.png -END -infmodelb.png -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/infmodelb.png -END -infmodelf.png -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/infmodelf.png -END -graph1.gif -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/graph1.gif -END -Ont-model-layers-import.png -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Ont-model-layers-import.png -END -Thumbs.db -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Thumbs.db -END -graph2.gif -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/graph2.gif -END -Simple-hierarchy.png -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Simple-hierarchy.png -END -dbmodel.png -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/dbmodel.png -END -resmodel.png -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/resmodel.png -END -ontmodel.png -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/ontmodel.png -END -Camera-classes.png -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Camera-classes.png -END -fig1.png -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/fig1.png -END -Direct-hierarchy.png -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Direct-hierarchy.png -END -fig3.png -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/fig3.png -END -fig4.png -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/fig4.png -END -fig5.png -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/fig5.png -END -ScreenShot001.JPG -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/ScreenShot001.JPG -END -ScreenShot002.JPG -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/ScreenShot002.JPG -END -Ont-model-layers.png -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/Ont-model-layers.png -END -fig6.png -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/doc/tutorial/img/fig6.png -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/entries deleted file mode 100755 index eb70eeb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/entries +++ /dev/null @@ -1,340 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/doc/tutorial/img -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2005-07-07T18:03:06.000000Z -240 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ScreenShot003.JPG -file - - - - -2008-02-29T14:57:30.089287Z -83ef07159c40a6c095e96638a8a752f7 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -ScreenShot004.JPG -file - - - - -2008-02-29T14:57:30.089287Z -069903b477d693ffd5e2eb843d2f3fd2 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -dc-extract.png -file - - - - -2008-02-29T14:57:30.089287Z -9e42d18af6b09ec0817896ee14f0efba -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -memmodel.png -file - - - - -2008-02-29T14:57:30.104908Z -739aa41271d54dde95cbcc8ee2c0eb9f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -infmodelb.png -file - - - - -2008-02-29T14:57:30.104908Z -cf78eeaeac8b0e86323eefa096f8ccfa -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -infmodelf.png -file - - - - -2008-02-29T14:57:30.120529Z -138f872637c3ecedcf7fdac3d054b583 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -graph1.gif -file - - - - -2008-02-29T14:57:30.120529Z -2813af076579b335560a042400a9c95e -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Ont-model-layers-import.png -file - - - - -2008-02-29T14:57:30.120529Z -c3897a2347eeb184a4585bf43948ff61 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Thumbs.db -file - - - - -2008-02-29T14:57:30.104908Z -9643c2761e01fe8c9087dd1e14c56cff -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -graph2.gif -file - - - - -2008-02-29T14:57:30.120529Z -52625209873dcb9291d0c0f7e201fb17 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Simple-hierarchy.png -file - - - - -2008-02-29T14:57:30.136149Z -fa83cea2802eaecda62d10e113279759 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -dbmodel.png -file - - - - -2008-02-29T14:57:30.136149Z -2890ffcfb56d5c14aca1e7516cfb6523 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -resmodel.png -file - - - - -2008-02-29T14:57:30.136149Z -e18edf3d7cc5587bf55c10acf3c6182b -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -ontmodel.png -file - - - - -2008-02-29T14:57:30.151770Z -d1e714ea91371a705792d6c2ddcf376b -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Camera-classes.png -file - - - - -2008-02-29T14:57:30.151770Z -14712017504796d1a2a67a8ebc5d2f3e -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fig1.png -file - - - - -2008-02-29T14:57:30.151770Z -9eef3690cecff775f39b2f86b42fc372 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Direct-hierarchy.png -file - - - - -2008-02-29T14:57:30.151770Z -c78ca72913d6403f3e3ecbfa0d617e57 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fig3.png -file - - - - -2008-02-29T14:57:30.167390Z -c83194c9c8dd5c1101990ae5dc680e65 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fig4.png -file - - - - -2008-02-29T14:57:30.167390Z -2ca6ddaa932b9bbb97c1fa7d2cc9940a -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fig5.png -file - - - - -2008-02-29T14:57:30.167390Z -676f775f19f69f2a3b948591f68c8dec -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -ScreenShot001.JPG -file - - - - -2008-02-29T14:57:30.167390Z -f5060f64402ba6c422e9c3a9a7dcf534 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -ScreenShot002.JPG -file - - - - -2008-02-29T14:57:30.183011Z -89ff9a88bfcc98911e3a4733e7434a9d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Ont-model-layers.png -file - - - - -2008-02-29T14:57:30.183011Z -96c082acdbf068ac9a59a13e1c23712b -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fig6.png -file - - - - -2008-02-29T14:57:30.183011Z -0f54a4bd8684063debfd40e21bbe154f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Camera-classes.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Camera-classes.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Camera-classes.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Direct-hierarchy.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Direct-hierarchy.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Direct-hierarchy.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers-import.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers-import.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers-import.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Ont-model-layers.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot001.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot001.JPG.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot001.JPG.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot002.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot002.JPG.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot002.JPG.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot003.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot003.JPG.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot003.JPG.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot004.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot004.JPG.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ScreenShot004.JPG.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Simple-hierarchy.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Simple-hierarchy.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Simple-hierarchy.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Thumbs.db.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Thumbs.db.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/Thumbs.db.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dbmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dbmodel.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dbmodel.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dc-extract.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dc-extract.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/dc-extract.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig1.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig1.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig1.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig3.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig3.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig3.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig4.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig4.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig4.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig5.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig5.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig5.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig6.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig6.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/fig6.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph1.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph1.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph1.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph2.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph2.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/graph2.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelb.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelb.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelb.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelf.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelf.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/infmodelf.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/memmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/memmodel.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/memmodel.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ontmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ontmodel.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/ontmodel.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/resmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/resmodel.png.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/prop-base/resmodel.png.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Camera-classes.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Camera-classes.png.svn-base deleted file mode 100755 index d98bf2d2..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Camera-classes.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Direct-hierarchy.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Direct-hierarchy.png.svn-base deleted file mode 100755 index 02f0c672..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Direct-hierarchy.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers-import.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers-import.png.svn-base deleted file mode 100755 index a7facc95..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers-import.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers.png.svn-base deleted file mode 100755 index 79e7af9b..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Ont-model-layers.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot001.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot001.JPG.svn-base deleted file mode 100755 index c2303ecb..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot001.JPG.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot002.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot002.JPG.svn-base deleted file mode 100755 index a73c2e00..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot002.JPG.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot003.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot003.JPG.svn-base deleted file mode 100755 index 46702268..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot003.JPG.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot004.JPG.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot004.JPG.svn-base deleted file mode 100755 index 8665d4c6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ScreenShot004.JPG.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Simple-hierarchy.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Simple-hierarchy.png.svn-base deleted file mode 100755 index 7892f78d..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Simple-hierarchy.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Thumbs.db.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Thumbs.db.svn-base deleted file mode 100755 index 655f13e0..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/Thumbs.db.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dbmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dbmodel.png.svn-base deleted file mode 100755 index 7094b170..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dbmodel.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dc-extract.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dc-extract.png.svn-base deleted file mode 100755 index 1e6444c2..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/dc-extract.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig1.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig1.png.svn-base deleted file mode 100755 index 69c5da69..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig1.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig3.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig3.png.svn-base deleted file mode 100755 index b5b57166..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig3.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig4.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig4.png.svn-base deleted file mode 100755 index 17f837e4..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig4.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig5.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig5.png.svn-base deleted file mode 100755 index 6aa08be9..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig5.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig6.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig6.png.svn-base deleted file mode 100755 index 9b0138fd..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/fig6.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph1.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph1.gif.svn-base deleted file mode 100755 index c52f46bd..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph1.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph2.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph2.gif.svn-base deleted file mode 100755 index 7b2b6eaa..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/graph2.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelb.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelb.png.svn-base deleted file mode 100755 index d1e8a8bb..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelb.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelf.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelf.png.svn-base deleted file mode 100755 index 64736891..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/infmodelf.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/memmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/memmodel.png.svn-base deleted file mode 100755 index e14ddc31..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/memmodel.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ontmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ontmodel.png.svn-base deleted file mode 100755 index 4a4cc4f6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/ontmodel.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/resmodel.png.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/resmodel.png.svn-base deleted file mode 100755 index b15901c0..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/.svn/text-base/resmodel.png.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Camera-classes.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Camera-classes.png deleted file mode 100755 index d98bf2d2..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Camera-classes.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Direct-hierarchy.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Direct-hierarchy.png deleted file mode 100755 index 02f0c672..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Direct-hierarchy.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers-import.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers-import.png deleted file mode 100755 index a7facc95..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers-import.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers.png deleted file mode 100755 index 79e7af9b..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Ont-model-layers.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot001.JPG b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot001.JPG deleted file mode 100755 index c2303ecb..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot001.JPG and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot002.JPG b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot002.JPG deleted file mode 100755 index a73c2e00..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot002.JPG and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot003.JPG b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot003.JPG deleted file mode 100755 index 46702268..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot003.JPG and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot004.JPG b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot004.JPG deleted file mode 100755 index 8665d4c6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ScreenShot004.JPG and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Simple-hierarchy.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Simple-hierarchy.png deleted file mode 100755 index 7892f78d..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Simple-hierarchy.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Thumbs.db b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Thumbs.db deleted file mode 100755 index 655f13e0..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/Thumbs.db and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dbmodel.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dbmodel.png deleted file mode 100755 index 7094b170..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dbmodel.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dc-extract.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dc-extract.png deleted file mode 100755 index 1e6444c2..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/dc-extract.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig1.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig1.png deleted file mode 100755 index 69c5da69..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig1.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig3.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig3.png deleted file mode 100755 index b5b57166..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig3.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig4.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig4.png deleted file mode 100755 index 17f837e4..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig4.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig5.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig5.png deleted file mode 100755 index 6aa08be9..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig5.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig6.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig6.png deleted file mode 100755 index 9b0138fd..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/fig6.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph1.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph1.gif deleted file mode 100755 index c52f46bd..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph1.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph2.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph2.gif deleted file mode 100755 index 7b2b6eaa..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/graph2.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelb.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelb.png deleted file mode 100755 index d1e8a8bb..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelb.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelf.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelf.png deleted file mode 100755 index 64736891..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/infmodelf.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/memmodel.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/memmodel.png deleted file mode 100755 index e14ddc31..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/memmodel.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ontmodel.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ontmodel.png deleted file mode 100755 index 4a4cc4f6..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/ontmodel.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/resmodel.png b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/resmodel.png deleted file mode 100755 index b15901c0..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/img/resmodel.png and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/introductionToRAP.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/introductionToRAP.htm deleted file mode 100755 index 386ab413..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/introductionToRAP.htm +++ /dev/null @@ -1,266 +0,0 @@ - -Introduction to RAP - - - - - - - - - - - - -

    RDF API for PHP

    -

    Introduction to RAP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    Table of Contents

    -
      -
    1. Overview
    2. -
    3. The MemModel
    4. -
    5. The DbModel
    6. -
    7. The Infmodels (InfModelF, - InfModelB)
    8. -
    9. The ResModel
    10. -
    11. The OntModel
    12. -
    -

     

    -

    Overview

    -

    RAP - RDF API for PHP is a Semantic Web toolkit for PHP developers. RAP started - as an open source project at the Freie Universität Berlin in 2002 and has - been extended with internal and external code contributions since then. Its - latest release includes:

    -
      -
    • a statement-centric API for manipulating RDF graphs as a set of statements
    • -
    • a resource-centric API for manipulating RDF graphs as a set of resources -
    • -
    • integrated RDF/XML, N3 and N-TRIPLE parsers
    • -
    • integrated RDF/XML, N3 and N-TRIPLE serializers
    • -
    • in-memory or database model storage
    • -
    • support for the RDQL query language
    • -
    • an inference engine supporting RDF-Schema reasoning and some OWL entailments -
    • -
    • an RDF server providing similar functionality as the Joseki - RDF server
    • -
    • a graphical user-interface for managing database-backed RDF models
    • -
    • support for common vocabularies
    • -
    -

    RAP can be used under the terms of the GNU - LESSER GENERAL PUBLIC LICENSE (LGPL)
    - and can be downloaded from http://sourceforge.net/projects/rdfapi-php/

    -

    RAP offers two different programming interfaces for manipulating RDF graphs: - The statement-centric Model API which allows you to manipulate - an RDF graph as a set of statements; and the resource-centric ResModel - API for manipulating an RDF graph as a set of resources.

    -

    The Model API supports adding, deleting, and replacing statements inside a - model as well as adding entire models. StatementIterators allow sequential access - to all statements within a model. There are four different implementations of - the Model API:

    - - - - - - - - - - - - - - - - - - - - - - - -

    Model

    Functionality

    MemModel

    Model storing its RDF graph in - memory. MemModel is fast, but doesn't support inference.
    -

    DbModel

    Model storing its RDF graph in - a relational database. No inference support.

    InfModelF

    Forward-chaining inference model - storing its base graph and inferred triples in memory.

    InfModelB

    Backward-chaining inference model - storing its base graph in memory and creating inferred triples on the - fly.

    -

    The resource-centric ResModel API represents RDF graphs as resources having - properties. The ResModel API is very similar to the Jena - Model API allowing programmers, which are used to Jena, to easily write - RAP code. The ResModel API is implemented on top of the Model API. ResModels - are always having a underlying MemModel, DbModel, InfModelF or InfModelB and - are only providing a resource-centric view on this model. There are two implementations - of the ResModel API:

    - - - - - - - - - - - - - - - -

    Model

    Functionality

    ResModel

    Basic implementation of the ResModel - API
    -

    OntModel

    OntModel provides a ResModel implementation - extended with RDF-Schema specific methods like hasSuperProperty(), addDomain() - and listInstances().

    -

    The following sections are explaining the different RAP models in more detail. - Further tutorial and RAP usage examples are found on the RAP Documentation overview page.

    -

     

    -

    The MemModel

    -

    The MemModel implementation stores statements in an array in the system memory. - If a new statement is added to the model, it's appended to the array and added - to a statement index in order to accelerate queries. MemModel is the fastest - of all Model API implementations.

    -


    -

    -

    Further information about using the MemModel can be found in the "Using - RAP's Statement-Centric MemModel API" tutorial and in the MemModel - PHPDoc.

    -

     

    -

    The DbModel

    -

    The DbModel implementation stores statements in an relational database. DbModel - supports a wide range of different databases by using the ADODB database abstraction - layer. The core of RAP's database backend are the classes DbStore and DbModel. - The former represents all models stored in a database, whereas the latter provides - methods for manipulating these models.
    -
    -
    -

    -

    RAP uses a denormalized database schema, where all statements are written into - a single statement table. We compared the performance of this solution with - a normalized layout. Running benchmarks has shown that the denormalized schema - was 2-3 times faster than the normalized one. The trade-off between better performance - and increased database size was acceptable for medium-sized RDF models.

    -

    Further information about using the DbModel can be found in the tutorial about - "Database Persistence" and - in the DbModel PHPDoc.

    -

     

    -

    The InfModels

    -

    InfModel extends MemModel by adding the ability to infer additional statements. - Up to our knowledge, InfModel is the only reasoning engine implemented in PHP. - The performance of InfModel can't compete with the performance of reasoning - engines implemented in Java or C, because PHP still isn't a very fast language. - But for medium sized models and relatively small RDF-S schemata, InfModel works - fine. InfModel supports the following RDF-S and OWL constructs:

    -
      -
    • rdfs:subclass
    • -
    • rdfs:subproperty
    • -
    • rdfs:range
    • -
    • rdfs:domain
    • -
    • owl:sameAs
    • -
    • owl:inverseOf
    • -
    -

    Additionally, the following inference rules from the W3C - RDF Semantics Recommendation are supported:

    -
      -
    • RDFS Rule 6
    • -
    • RDFS Rule 8
    • -
    • RDFS Rule 10
    • -
    • RDFS Rule 12
    • -
    • RDFS Rule 13
    • -
    -

    You can activate and deactivate the different rules separately in constants.php. - Turning off rules that you don't need improves the performance of InfModel.

    -

    The abstract class InfModel is extended by two subclasses:

    -
      -
    • InfModelF, which uses a forward chaining inference algorithm.
    • -
    • InfModelB, which uses a backward chaining inference algorithm.
    • -
    -

    The pros and cons of both algorithms are described below:

    -


    - The InfModelF

    -

    InfModelF uses a forward chaining inference algorithm: If a new statement from - the RDFS or OWL namespace is added to the model, a corresponding InfRule is - added to the model's rule-base. The rule has a trigger and an entailment. If - a new statement, which matches the trigger of an InfRule, is added to the model - then the entailment will be recursively computed until no more rule-triggers - match the statement or statements inferred from it. The base statement and all - inferred statements are added to the model.
    -

    -


    -

    -

    Materializing all possible inferred statements means that adding base statements - to the model is relatively slow. On the other hand find operations are very - fast, because the find method just has to look into the statement index and - return the matching statements (including inferred statements).

    -

    Thus you should use InfModelF

    -
      -
    • if your model doesn't change much and
    • -
    • you are going to query the model a lot.
    • -
    -

    Further information about using the InfModelF can be found in the InfModelF PHPDoc.

    -

     

    -

    The InfModelB

    -

    InfModelB uses a backward chaining inference algorithm, meaning that no inferences - are done when a new statement is added to the model. When a query is executed - against the model later, only the necessary inferences for this query are done: - A find-patter is executed with the supplied parameters first. Afterwards it - is checked against an inference-rules index, if there are any rules that could - produce statements that would match the find-pattern. If there are such rules, - the find-pattern is rewritten an a new search is done. The new statements are - inferred and added to the result. This iterative process will be repeated until - there are no rules left that could produce matching statements.

    -


    -

    -

    InfModelB recognizes subclassing loops in ontologies. It also uses some shortcuts - which speed up the search process: It recognizes branches in the ontology that - don't lead to any additional statements and avoids running into these 'dead - ends' a second time.

    -

    You should use InfModelB:

    -
      -
    • if your model changes a lot,
    • -
    • if you don't want to materialize all inferred statements,
    • -
    • if you are having a lot of RDF-S statements or
    • -
    • if you are not going to execute too many queries against the model.
    • -
    -

    Further information about using the InfModelB can be found in the InfModelB PHPDoc.

    -

     

    -

    The ResModel

    -

    ResModel provides a resource-centric view on an underlying Model. ResModels - represent an RDF graphs as a set of resources having properties, similar to - the Jena Model API. - The ResModel API is implemented on top of the Model API. Thus ResModels are - always having a underlying MemModel, DbModel, InfModelF or InfModelB and are - only providing a resource-centric view on this model.

    -

    -

    Each ResModel method call is translated into a find()-, add()-, or remove()-call - to the underlying model. Thus using ResModel is slightly slower than using the - underlying model directly. The ResModel API also provides support for special - resources like rdf:containers and rdf:collections. There is no caching done - between the layers.

    -

    Further information about using the ResModel can be found in the tutorial about - "Using RAP's Resource-Centric ResModel - API" and in the ResModel PHPDoc.
    -

    -

    The OntModel

    -

    OntModel API provides a ResModel implementation extended with RDF-Schema specific - methods like addSubClass(), listSubClasses(), hasSuperProperty(), addDomain() - and listInstances().

    -

    OntModel just provides a more convenient API for working with RDF-S models, - but doesn't do any inference by itself. If you also need RDF-S inference - you have to combine OntModel with an underlying InfModelF or InfModelB. If you - don't need inference you can combine OntModel with an underlying MemModel - or DbModel.

    -

    -

    Further information about OntModel can be found in the tutorial about "Using - RAP's Ontology-Centric OntModel API" and in the OntModel PHPDoc.

    -


    -

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.n3 deleted file mode 100755 index e447dd38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.n3 +++ /dev/null @@ -1,9 +0,0 @@ -# Generated by N3Serializer.php from RDF RAP. -# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html - -@prefix ns0: . -@prefix ns1: . -@prefix ns2: . - - -ns0:someDocument.html ns2:language "English" ; ns2:title "RAP tutorial" ; ns1:creator "Radoslaw Oldakowski" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.rdf deleted file mode 100755 index 8d41fa65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/model1.rdf +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - English - RAP tutorial - Radoslaw Oldakowski - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/netapi.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/netapi.html deleted file mode 100755 index 2bcc5cda..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/netapi.html +++ /dev/null @@ -1,382 +0,0 @@ - -RDF Net API - - - - - - -

    RDF API for PHP

    -

    RAP NetAPI - An RDF Server for PHP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Phil Dawes <pdawes@users.sf.net>
    - Chris Bizer <chris@bizer.de>
    - Tobias Gauss <tobias.gauss@web.de>
    - Jan 2006

    -
    - -

    About

    -

    The RAP NetAPI is a server for publishing RDF models on the web. Models have - URLs and they can be accessed by query using HTTP GET.

    -

    The RAP NetAPI provides an subset implementation of the W3C member submission - RDF - NetAPI and of a subset of the SPARQL Protocol. The NetAPI allows you to run an RDF server, with similar functionality as the - Joseki RDF server, on web - servers that provide PHP support. It is a simple alternative to Joseki that - can be used in on cheap public webspace.

    -

    The RAP NetAPI implementation supports:

    -
      -
    • Serving multiple database or file backed RDF models
    • -
    • SPARQL queries using HTTP GET
    • -
    • RDQL queries using HTTP GET
    • -
    • FETCH queries using HTTP GET
    • -
    • SPO queries using HTTP GET
    • -
    • ADD operation using HTTP POST
    • -
    • REMOVE operation using HTTP POST
    • -
    • bNode closure for RDQL, FETCH and SPO
    • -
    • query result content negotiation (RDF/XML, N3 or N-Triples)
    • -
    -

     

    -

    Installing the NetAPI

    - -

    -

      -
    1. The first thing you need to do is get mod-rewrite to redirect model queries - to the netapi.php handler script. To do this you need to make sure that the - rewrite module is enabled in the Apache configuration file "httpd.conf":
      -
      - - - - - - -

      LoadModule rewrite_module modules/mod_rewrite.so

      -
      - And to make sure that output buffering is turned on in the PHP configuration - file "php.ini":
      -
      - - - - - - -

      output_buffering = On

      -
      -
    2. -
    3. You need to edit the .htaccess file in the netapi directory. Change the - 'RewriteBase' bit to reflect the URI base of the netapi directory. E.g.
      -
      - - - - - - -

      RewriteEngine on
      - RewriteBase /path/to/rdfapi-php/netapi/ #<---- Edit this
      - RewriteRule ^[^\.]+$ netapi.php

      -
      -
    4. -
    5. If you want to serve models that are stored in a RAP database, then you - must edit the config.inc file in the netapi directory to reflect your database - connection parameters. More Information about creating a RAP database and - connecting to it is found in the Tutorial: - Database Persistence.
      -
      - - - - - - -

      $DB_DRIVER = 'MySQL';
      - $DB_HOST = 'localhost';
      - $DB_DB = 'testrapdb';
      - $DB_USER = 'myuser';
      - $DB_PASS = 'mypass';

      -
      -
    6. -
    7. Finally, you need to edit the $modelmap array in the netapi/config.inc file. - This array maps model names to model URIs, and is used in order to convert - web URIs to model URIs in the database or local file names. -

      E.g. if you have a model in the RAP database with the following URI: -

      http://example.com/2004/testmodel1
      - and you want to access it via the netapi endpoint at the following web URI: -
      -
      http://myhostedwebspace.net/rdfapi-php/netapi/testmodel
      - You need to change the $modelmap array to contain the following entry:
      -
      - - - - - - -

      $modelmap = array(
      -           "testmodel" - => "db:http://example.com/2004/testmodel1"
      -            );

      -

      The db: prefix indicates that the model is stored in the RAP database.

      -

      If you want to serve a RDF model that is stored in a local file in a netapi - subdirectory: -

      subdirectory/testmodel2.rdf
      - and you want to access it via the netapi endpoint at the following web URI: -
      -
      http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2
      - You need to change the modelmap to contain the following entry:
      -
      - - - - - - -

      $modelmap = array(
      -           "testmodel2" - => "file:subdirectory/testmodel2.rdf"
      -            );

      -

      The file: prefix indicates that the model is stored in a local file.

      -

      -
    8. -
    - -

    Using the NetAPI

    - -

    -

    Querying

    -

    1. Downloading whole models

    -

    The easiest way to get started is to point an html browser at the URI endpoint - for the model. E.g. for the above example, use

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2 - HTTP/1.1

    -
    -

    2. SPARQL Queries

    -

    The default query language of the RAP NetApi is SPARQL. So, if no additional lang parameter is given, the netapi will assume that the query uses the SPARQL query language. See also: RAP SPARQL tutorial.

    - - - - - - - - - - - -
    Parameter NameParameter Type/ValueDescription
    query - (required)The query, as %encoded string -

    The SPARQL query to be executed.  The NetAPI supports SELECT, DESCRIBE, ASK and CONSTRUCT queries.

    -

    Example SPARQL query:

    - - - - - - -
    -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?query=SELECT%20?name%20WHERE{?s%20%3Chttp://xmlns.com/foaf/0.1/name%3E%20?name}
    - HTTP/1.1

    -

    The result of this query is returned in the SPARQL Query Results XML Format if it is a SELECT or an ASK query. If it is a CONSTRUCT or DESCRIBE query, the result is a serialisation of the corresponding graph and content type negotiation is used to determine the desired format..

    -

    3. Fetch Queries

    -

    The fetch query language returns all known information about a URIref. A query - consists of single "r" parameter, whose value is the URIref. The exact extent - of the RDF returned is dependent on the server. The NetAPI searches for all - statements with the resource as subject, then calculates the bNode closure of - all objects of these statements.

    - - - - - - - - - - - - - - - - -

    Parameter Name

    Parameter Value

    Description

    lang
    - (required)
    Id. of query language

    URI: http://jena.hpl.hp.com/2003/07/query/fetch
    - Short forms: "fetch"

    r
    - (required)
    URIref

    URIref of the resource

    -
    -Example fetch query:
    -
    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=fetch&r=http://example.com/employees/BillParker/ - HTTP/1.1

    -

     

    -

    4. RDQL Queries

    -

    See also: The RAP RDQL Tutorial

    - - - - - - - - - - - - - - - - - - - - - -
    Parameter NameParameter Type/ValueDescription
    lang
    - (required)
    Id. of query language

    URI: http://jena.hpl.hp.com/2003/07/query/RDQL
    - Short forms: "RDQL", "rdql"

    query
    - (required)
    The query, as %encoded string

    The RDQL query to be executed.  As with - all parameter values, this must be %-encoded.

    closure
    - (optional)
    "true" or "false"

    For each binding of a variable, which is - bound to a bNode, the graph is augmented with the bNode closure from this - point.

    - -

    Example RDQL query:

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=rdql&
    - query=SELECT%20*%20WHERE%20(?x,<http://www.w3.org/2001/vcard-rdf/3.0/EMAIL>,?y)(?y,?z,"M.Murphy@example.com")
    - &closure=true HTTP/1.1

    -

     

    -

    5. SPO Queries

    -

    SPO (also known as "Triples" or "find(SPO)") is an experimental minimal - query language. An SPO query is a single triple pattern, with optional subject - (parameter "s"), predicate (parameter "p"), and object (parameter "o", if a - URIref, parameter "v" for a string literal). Absence of a parameter implies - "any" for matching that slot of the triple pattern.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Parameter NameParameter ValueDescription
    lang
    -(required)
    Id. of query language -

    URI: http://jena.hpl.hp.com/2003/07/query/SPO
    -Short forms: "SPO", "spo"

    s
    -(optional)
    URIref -URIref of the subject of the triple pattern.
    -Absence implies a wildcard match.
    p
    -(optional)
    URIrefURIref of the predicate of the triple pattern.
    -Absence implies a wildcard match.
    o
    -(optional)
    URIrefURIref of the object of the triple pattern.
    -Only one of "o" and "v" may be given
    v
    -(optional)
    StringLiteral value as a string.
    -Absence or "o" and"v" implies a wildcard match.
    closure
    -(optional)
    "true" or "false"Calculate the bNode closure of the matched subgraph.

    -

    Example SPO query:

    - - - - - - -

    GET http://myhostedwebspace.net/rdfapi-php/netapi/testmodel2?lang=spo
    -
    & p=http://www.w3.org/2001/vcard-rdf/3.0/Family
    - & v=Parker
    -
    & closure=true HTTP/1.1

    -
    -

     

    -

     

    -

    Serialization Formats and Content Type Negotiation

    -

    The netapi supports content type negotiation to determine the output RDF serialization - format. E.g. to get the results of a fetch query in n3 format, do: -

    -GET /rdfapi-php/netapi/testmodel?lang=fetch&r=http://example.com/myterm HTTP/1.0
    -Accept: application/n3
    -
    -The current implementation supports the following content mime types: -
      -
    • application/rdf+xml
    • -
    • application/n3
    • -
    • application/n-triples
    • -
    • text/xml
    • -
    -

    Note: A SPARQL query retuns an SPARQL Query Results XML Format document if it is a SELECT or ASK query or a serialisiation of the corresponding graph if it is a CONSTRUCT or DESCRIBE query.

    -

     

    -

    Adding and Removing Subgraphs

    -

    -To add and remove subgraphs from the store you need to send POST -requests with an 'op' argument of 'add' or 'remove' and the rdf to -add/remove in the body of the request. E.g.: - -

    -POST /rdfapi-php/netapi/testmodel?op=remove
    -Content-type: application/n-triples
    -Content-length: 353
    -...RDF...
    -
    -

    N.B. most http apis will add the content-length header for you, but you'll - need to set the Content-type to be one of the above mime types.

    -

    Add and remove can be enabled in the config.inc by setting NETAPI_ALLOW_ADD - and NETAPI_ALLOW_REMOVE to true. They are disabled by delault.

    -

     

    - - - -------=e \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rap_tutorial.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rap_tutorial.php.txt deleted file mode 100755 index 97dd8865..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rap_tutorial.php.txt +++ /dev/null @@ -1,121 +0,0 @@ - - */ - -echo "

    RAP Tutorial

    "; - -// Include all RAP classes -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!! This should reflect your own installation !!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); -include(RDFAPI_INCLUDE_DIR . PACKAGE_VOCABULARY); - - -// Create subject and predicate of $statement1 -$someDoc = new Resource ("http://www.example.org/someDocument.html"); -$creator = new Resource ("http://www.purl.org/dc/elements/1.1/creator"); - -// Create and instance of object Statement with subject, predicate and object -// passed to the creator function. -$statement1 = new Statement ($someDoc, $creator, new Literal ("Radoslaw Oldakowski")); - -// Create a new MemModel -$model1 = ModelFactory::getDefaultModel(); - -// Add the statement $statement1 to the model $model1 -$model1->add($statement1); - -// Create second MemModel -$model2 = new MemModel(); - -// Add two statements to $model2 -$model2->add(new Statement($someDoc, - new Resource("http://www.example.org/myVocabulary/title"), - new Literal("RAP tutorial"))); -$model2->add(new Statement($someDoc, - new Resource("http://www.example.org/myVocabulary/language"), - new Literal("English"))); - -// Add the second model ($model2) to the first one ($model1) -$model1->addModel($model2); - - -// Check the size of $model1 -echo "

    Section 3, output the size of the MemModel:

    "; -echo "\$model1 contains " .$model1->size() ." statements
    "; -echo "
    "; - - -// Output $model1 as HTML table -echo "


    Section 4, output the MemModel as HTML table:

    "; -$model1->writeAsHtmlTable(); - -// Output the string serialization of $model1 -echo "


    Section 4, output the plain text serialization of the MemModel:

    "; -echo $model1->toStringIncludingTriples(); - -// Output the RDF/XML serialization of $model1 -echo "


    Section 4, output the RDF/XML serialization of the MemModel:

    "; -echo $model1->writeAsHtml(); -echo "

    "; - -// Save the model to file in RDF/XML and N3 -$model1->saveAs("model1.rdf", "rdf"); -$model1->saveAs("model1.n3", "n3"); - -// Replace the Literal for a BlankNode -$bNode = new BlankNode($model1); -$model1->replace(NULL, NULL, new Literal("Radoslaw Oldakowski"), $bNode); - -// Add statements describing the BlankNode using pre-defined vCard vocabulary -$model1->add(new Statement($bNode, $VCARD_FN, new Literal("Radoslaw Oldakowski"))); -$model1->add(new Statement($bNode, $VCARD_EMAIL, new Literal("radol@gmx.de"))); - -// Create a new literal, its datatype and then add it to the MemModel $model1 -$age = new Literal("26"); -$age->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); -$model1->add(new Statement ($bNode, new Resource("http://www.example.org/myVocabulary/age"), $age)); - -// Create a statement iterator for $model1 -$it = $model2->getStatementIterator(); - -// Use the iterator to output the string serialization of all statements -// Traverse model and output statements -echo "


    Section 8, traverse the Model:

    "; -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} -echo "
    "; - -// Find all statements having subject equal $someDoc and print the result as HTML table -echo "


    Section 10, find statements:

    "; -$result = $model1->find($someDoc, NULL, NULL); -$result->writeAsHtmlTable(); -echo "

    "; - -// Reify all statements of $model2 and show the corresponding reified model as HTML table -echo "


    Section 11, output the reified Model:

    "; -$reified = $model2->reify(); -$reified->writeAsHtmlTable(); - - -// Close all MemModels used in this tutorial -$model1->close(); -$model2->close(); -$result->close(); -$reified->close(); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.htm deleted file mode 100755 index a519accc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.htm +++ /dev/null @@ -1,394 +0,0 @@ - -RDQL Tutorial - - - - - -

    RDF API for PHP

    -

    RDQL Tutorial

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski <radol@gmx.de>
    -October 2004

    -
    - -

    In this tutorial I will explain the syntax of the RDQL query language implemented in RDF API for -PHP and show how to query RDF models created within the API. The exact RDQL grammar -for RAP's RDQL Engine, described in Bacus Naur Form (BNF), is provided here.

    - -

    The general form of an RDQL query, shown below, resembles an SQL statement:

    - - -
    -

    SELECT variables listing
    - FROM rdf documents
    - WHERE patterns
    - AND filter expressions
    - USING prefix declaration -

    -
    -

    - -

    SELECT

    -

    Every successful query returns a set of variable bindings. In the SELECT clause we define a list of variables to be returned. - Each variable is introduced by a question mark (?) and can be named using alphanumerical characters combined with an underscore (_). - Multiple variables are separated by a space and/or an optional comma (,), for example:

    - - -
    -

    - SELECT ?name ?email, ?age,?tel_number -

    -
    - -

    In case that we want to specify all query variables, we can use the SQL-like shortcut in form of a star (*):

    - - -
    -

    - SELECT * -

    -
    -

    - -

    FROM

    - -

    In the FROM clause we specify the path or URL of the RDF document - to be queried. However, this tutorial focuses on querying RDF models created - within RAP (MemModels or DbModels) by passing the RDQL query string to the method - rdqlQuery(). In this case the query is performed on a particular - model, thus there is no need to specify it once again. If the passed string - contains a FROM clause, it will then be ignored by the query engine. -

    -
    - -

    WHERE

    -

    In the WHERE clause we indicate a list of triple patterns which - have to be matched by each valid query result set. All patterns representing - an RDF statement have the form (subject, predicate, object) where - the subject, predicate, and object can either be a <URIref> - or a ?variable. The object can moreover be a "Literal", - for example:

    - - -
    -

    - WHERE (?resource, <http://www.w3.org/2001/vcard-rdf/3.0/EMAIL>, "radol@gmx.de") -

    -
    - -

    This will match any statement of an RDF model with a predicate indicated - by the above URIref (vCard's email property) and an object represented by - the literal "radol@gmx.de". Furthermore, we can specify the language - and datatype of a literal: - "literal string"@lang^^<datatypeURI>. Note that the language - tag has no effect when the literal is datatyped, except for rdf:XMLLiterals and - plain literals. Correspondingly to the SELECT clause, using commas - (,) is also optional.

    -
    - -

    AND

    -

    In addition to the triple patterns of the WHERE clause, in the - AND part of an query we can specify Boolean expressions over values - of URIs and literals. RAP's implementation of RDQL shows the real expressive - power of this query language. And so, we can use:

    - -
  • arithmetic conditions (including multiplicative and additive operators), for instance:

  • - - -
    -

    - AND (10 + ?age)*2 <= 60/2, ?weight == 75 -

    -
    - -

    (multiple expressions are separated by commas)

    - -
  • string equality expressions, where EQ stands for "equal" and NE for "not equal":

  • - - -
    -

    - AND ?name EQ "Radoslaw Oldakowski", ?resource NE <http://example.org/> -

    -
    -
    - -
  • Perl-style regular expressions, where "~~" | "=~" stands for "match" - and "!~" for "not match", for example, return only HTML documents:

  • - - -
    -

    - AND ?document ~~ "/\.html$/i" -

    -
    - -

    We can also combine multiple filter expressions using logical operators "&&" (AND), "||" (OR):

    - - -
    -

    - AND ( (10 + ?age)*2 <= 60/2) && (?name EQ "Radoslaw Oldakowski") ) -

    -
    - -

    as well as use negation indicated by the exclamation mark (!):

    - - -
    -

    - AND !( ((10 + ?age)*2 <= 60/2) && (?name1 EQ ?name2) ) -

    -
    -

    - -

    USING

    - -

    To make the query easier to read and write for humans, RDQL provides a way - to shorten the length of URIs (used in the FROM, WHERE - and AND clauses) by defining a string prefix. Every prefix is - defined in the USING clause as demonstrated below:

    - - -
    -

    - WHERE (?resource, vCard:EMAIL, "radol@gmx.de")
    - USING vCard FOR <http://www.w3.org/2001/vcard-rdf/3.0/> -

    -
    - -

    Note that since RAP V0.8 QNames (e.g. vCard:EMAIL) in contrast to full URI's - need not to be surrounded by '<' and '>'. However, the RDQL parser is also - backawrd compatible - with earlier versions of the RDQL grammar (RAP V0.6 - RAP V0.7.1). Moreover, - RAP supports default prefixes (e.g. rdf, rdfs, xsd) - that can be used without an explicit definition.

    -
    - -

    Comments

    -

    While writing very long and complicated RDQL queries, it is often of great benefit to comment the code. For this purpose RAP allows us to use two kinds - of comment syntaxes. The first one is the one-line comment introduced by "//", the second has the form of /* this is a comment */.

    -
    - -

    Query Examples

    - -

    At this point it is time to put together all the pieces explained so far and - present RAP's RDQL Engine in action. In the following part of this section we - will be querying an RDF document describing employees of an example corporation - (employees.rdf). The working code for the examples - that will be demonstrated in this RDQL tutorial is rdql_tutorial.php.

    - -

    We shall start with including all RAP classes needed and loading the document into a MemModel:

    - - -
    -

    - // Include all RAP classes
    - define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - // Create a new MemModel and load the document
    - $employees = ModelFactory::getDefaultModel();
    - $employees->load(RDFAPI_INCLUDE_DIR ."employees.rdf");

    -
    - -

    Once the model has been created, we can perform our first query which will be: "find the full name of all employees". - So, we create a variable $query1 and assign it the corresponding query string:

    - - -
    -

    - $query1 = '
    - SELECT ?fullName
    - WHERE (?x, vcard:FN, ?fullName)
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>'; -

    -
    - -

    To execute the query, we simply call the method rdqlQuery() on the MemModel and pass the variable holding the query string as parameter:

    - - -
    -

    - $result1 = $employees->rdqlQuery($query1); -

    -
    - -

    The result returned is an array of variable bindings with the values of these variables being RAP objects (Resource, - Literal or BlankNode). This enables us to use these objects for model update or other API calls. - We can, of course, print out the result on the screen as well. For this purpose, RAP's RDQL engine offers a very convenient method - writeQueryResultAsHtmlTable(). All we have to do is to pass the query result to this method:

    - - -
    -

    - RdqlEngine::writeQueryResultAsHtmlTable($result1); -

    -
    - -

    This will result in the following output in the browser window:

    - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - -

    If we did not want to have objects being returned as variable values but their string serialization instead, - we would call the method rdqlQeury() and pass FALSE as the second parameter:

    - - -
    -

    - $result2 = $employees->rdqlQuery($query1, FALSE); -

    -
    - -

    Note that in this case the resulting array could not be passed to the method writeQueryResultAsHtmlTable() so that we had to iterate it - using PHP's built-in foreach construct.

    - -

    As you can see querying RDF models in RAP is extremely easy. Similarly we also query persisted models by passing the RDQL string to the method - rdqlQuery() called on a DbModel. Hence, from this point on I will only explain how to formulate a query and show its corresponding result.

    - -

    In our next query: "find the given name of all employees over 30" we have to use a filter expression. - Moreover, in order to find out the given name we must specify the corresponding path in the graph leading through a Blank Node (marked bold):

    - - -
    -

    - SELECT ?givenName, ?age
    - // This is an example of an one-line comment
    - WHERE (?x, vcard:N, ?blank),
    -       (?blank, vcard:Given, ?givenName)
    ,
    -       (?x, /* and this is another type - of comments */ v:age, ?age)
    - AND ?age > 30
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#> - v FOR <http://sampleVocabulary.org/1.3/People#> -

    -
    - -

    In the above example, I have also demonstrated a possible way to insert comments. Here, the variable ?blank is only used to link the resource - to the given name. We did not specify ?blank in the SELECT clause, consequently we get:

    - - - - - - - - - - - - - -
    No.?givenName?age
    1.

    Literal: Bill

    -

    Literal: 33 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -
    2.

    Literal: George

    -

    Literal: 41 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -
    - -

    Note that the value of ?age is a datatyped literal. Yet another even more complex example might be: "find the private telephone number - of the person whose office number is '+1 111 2222 668' and additionally return his given name and age". In this query we have to specify several paths in the graph. - Furthermore, we use a string equality expression in the AND clause to filter the office number:

    - - -
    -

    - SELECT ?givenName ?age ?telNumberHome
    - WHERE (?person vcard:N ?blank1)
    -       (?blank1 vcard:Given ?givenName)
    -       (?person v:age ?age)
    -       (?person vcard:TEL ?blank2)
    -       (?blank2 rdf:value ?telNumberHome)
    -       (?blank2 rdf:type vcard:home)
    -       (?person vcard:TEL ?blank3)
    -       (?blank3 rdf:value ?telNumberOffice)
    -       (?blank3 rdf:type vcard:work)
    - AND ?telNumberOffice eq "+1 111 2222 668"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
    -       v FOR <http://sampleVocabulary.org/1.3/People#> -

    -
    - -

    As shown in this example we can leave out commas. Note also that we make use of the default prefix rdf -(e.g. rdf:type) supported by RAP's RDQL engine. This query returns one matching set of variable bindings:

    - - - - - - - - - - - -
    No.?givenName?age?telNumberHome
    1.

    Literal: Bill

    -

    Literal: 33 (rdf:datatype="http://www.w3.org/TR/xmlschema-2/integer")

    -

    Literal: +1 111 2212 431

    -
    - -

    So far, the values of all variables returned were literals. However, we can ask for resources as well. Consider the following query: -"find the resources that represent employees whose family name starts with 'M' and additionally return the corresponding office email address". -This can be written in RDQL as shown below:

    - - -
    -

    - SELECT ?resource, ?email
    - WHERE (?resource, vcard:N, ?blank1)
    -       (?blank1, vcard:Family, ?familyName)
    -       (?resource, vcard:EMAIL, ?blank2)
    -       (?blank2, rdf:value, ?email)
    -       (?blank2, rdf:type, vcard:work)
    - AND ?familyName ~~ "/^M/"
    - USING vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#> -

    -
    - -

    In this case we use a regular expression to indicate the first letter of the family name - and once again apply the default prefix rdf. This results in:

    - - - - - - - - - - -
    No.?resource?email
    1.

    Resource: http://example.com/employees/MonicaMurphy/

    -

    Literal: M.Murphy@example.com

    -
    - -

     

    -

    For more query examples see Documentation - included in RAP documentation. You can additionally visit the website with the - Interactive - RDQL Demonstration allowing you to practice with your own documents and - queries. Furthermore, - RDQL Test Cases give you an even deeper insight into RAP implementation - of RDQL by providing the opportunity to go through 77 queries testing different - aspects of the language implementation, performed in real time on both a memory - and a persisted model.

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.php.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.php.txt deleted file mode 100755 index 0ea68325..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/rdql_tutorial.php.txt +++ /dev/null @@ -1,113 +0,0 @@ - - */ - -echo "

    RAP Tutorial

    "; - -// Include all RAP classes -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!! This has to reflect your own installation !!!!!!!!!!!!!!!!!!! -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -define("RDFAPI_INCLUDE_DIR", "C:/Apache/rdf_api/api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - -// Create a new MemModel and load the document -$employees = ModelFactory::getDefaultModel(); -$employees->load("employees.rdf"); - -// Show the input model -echo "Show the RDF model to be queried:

    "; -$employees->writeAsHtmlTable(); -echo "

    "; - -// Query string: "find the full name of all employees" -$query1 = ' -SELECT ?fullName -WHERE (?x, vcard:FN, ?fullName) -USING vcard FOR '; - -// Execute the query -$result1 = $employees->rdqlQuery($query1); - -// Display the query result as HTML table -echo "
    Query1: 'find the full name of all employees'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result1); - -// This will return no objects, but their string serialization instead -$result2 = $employees->rdqlQuery($query1, FALSE); - -echo "

    "; - -// Another query: "find the given name and age of all employees over 30" -$query2 = ' -SELECT ?givenName, ?age -WHERE (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName), - (?x, v:age, ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - -// Execute the query -$result3 = $employees->rdqlQuery($query2); - -// Display the query result as HTML table -echo "
    Query2: 'find the given name and age of all employees over 30.' Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result3); - -echo "

    "; - -// Yet another query: "find the private telephone number of the person -// whose office number is '+1 111 2222 668' and return additionally his given name and age" -$query3 = ' -SELECT ?givenName ?age ?telNumberHome -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?person v:age ?age) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumberHome) - (?blank2 rdf:type vcard:home) - (?person vcard:TEL ?blank3) - (?blank3 rdf:value ?telNumberOffice) - (?blank3 rdf:type vcard:work) -AND ?telNumberOffice eq "+1 111 2222 668" -USING vcard FOR - v FOR '; - -// Execute the query -$result4 = $employees->rdqlQuery($query3); - -// Display the query result as HTML table -echo "
    Query3: 'find the private telephone number of the person whose office number is '+1 111 2222 668' and return additionally his given name and age'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result4); - -echo "

    "; - - -// Next query: find the resources which represent employees whose family name starts with 'M' and return additionally the corresponding office email address -$query4 = ' -SELECT ?resource, ?email -WHERE (?resource, vcard:N, ?blank1) - (?blank1, vcard:Family, ?familyName) - (?resource, vcard:EMAIL, ?blank2) - (?blank2, rdf:value, ?email) - (?blank2, rdf:type, vcard:work) -AND ?familyName ~~ "/^M/" -USING vcard FOR '; - -// Execute the query -$result5 = $employees->rdqlQuery($query4); - -// Display the query result as HTML table -echo "
    Query4: 'find the resources which represent employees whose family name starts with \"M\" and return additionally the corresponding office email address'. Output:

    "; -RdqlEngine::writeQueryResultAsHtmlTable($result5); - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/sparqlTestcases.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/sparqlTestcases.htm deleted file mode 100755 index 4091e26f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/sparqlTestcases.htm +++ /dev/null @@ -1,471 +0,0 @@ - -SPARQL testcases - - - - - - -

    RDF API for PHP

    -

    SPARQL testcases

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Tobias Gauss <tobias.gauss@web.de>
    -January 2006

    -


    -Our SPARQL Engine passes the following Testcases. The first testcases are the DAWG Testcases. The second part of the testcases have been adopted from ARQ . There are also some custom testcases.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DataTestcaseResult
    dawg-tp-01dawg-tp-01passed
    dawg-tp-02dawg-tp-02passed
    dawg-tp-03dawg-tp-03passed
    dawg-tp-04dawg-tp-04passed
    ex2-1aex2-1apassed
    ex2-2aex2-2apassed
    ex2-3aex2-3apassed
    ex2-4aex2-4apassed
    q-opt-1q-opt-1passed
    q-opt-2q-opt-2passed
    dawg-query-001dawg-query-001passed
    dawg-query-002dawg-query-002passed
    dawg-query-003dawg-query-003passed
    dawg-query-004dawg-query-004passed
    q-select-1q-select-1passed
    q-select-2q-select-2passed
    q-select-3q-select-3passed
    customUnion1customUnion1passed
    customUnion2customUnion2passed
    data-sort-4.n3query-sort-5passed
    data-sort-4.n3query-sort-4passed
    data-sort-3.n3query-sort-3passed
    data-sort-1.n3query-sort-2passed
    data-sort-1.n3query-sort-1passed
    data-sort-6.n3query-sort-6passed
    data-sort-8.n3query-sort-4passed
    data-sort-4.n3limitOff_1passed
    data-sort-4.n3limitOff_2passed
    data-sort-4.n3limitOff_3passed
    data.n3bound1passed
    ex3.n3ex3passed
    ex11.2.3.1_0.n3ex11.2.3.1_0passed
    ex11.2.3.2_0.n3ex11.2.3.2_1passed
    ex11.2.3.3_0.n3ex11.2.3.3_0passed
    ex11.2.3.4_0.n3ex11.2.3.4_0passed
    ex11.2.3.5_0.n3ex11.2.3.5_0passed
    ex11.2.3.7_0.n3ex11.2.3.7_0passed
    data-f1.n3expr-1passed
    data-f1.n3expr-2passed
    data-f1.n3expr-3passed
    data-bool1.n3query-bev-1passed
    data-bool1.n3query-bev-2passed
    data-bool2.n3query-bev-5passed
    data-bool2.n3query-bev-6passed
    data-fil1.n3q-str-1passed
    regex-data-01.n3regex-query-001passed
    regex-data-01.n3regex-query-002passed
    regex-data-01.n3regex-query-003passed
    ex11.2.3.6_0.n3ex11.2.3.6_0passed
    data-bool1.n3query-bev-3passed
    data-bool1.n3query-bev-4passed
    data-fil1.n3q-str-2passed
    data-fil1.n3q-str-3passed
    data-fil1.n3q-str-4passed
    data-fil1.n3q-blank-1passed
    data-fil1_changed.n3q-datatype-1passed
    ex11_0.n3ex11_0failed
    ex11_0.n3ex11_1passed
    ex11.2.3.1_1.n3ex11.2.3.1_1passed
    ex11.2.3.2_0.n3ex11.2.3.2_0passed
    data-fil1.n3q-uri-1passed
    data-langMatches.n3q-langMatches-1passed
    data-langMatches.n3q-langMatches-2passed
    data-langMatches.n3q-langMatches-3passed
    data-langMatches.n3q-langMatches-4failed
    data-eq.n3query-eq-1passed
    data-eq.n3query-eq-2passed
    data-eq.n3query-eq-3passed
    data-eq.n3query-eq-4passed
    data-eq.n3query-eq-5passed
    data-eq.n3query-eq-graph-1passed
    data-eq.n3query-eq-graph-2passed
    data-eq.n3query-eq-graph-3passed
    data-eq.n3query-eq-graph-4passed
    data-arq-basic.n3q-base-prefix-1passed
    data-arq-basic.n3q-base-prefix-2passed
    data-arq-basic.n3q-base-prefix-3passed
    data-arq-basic.n3q-base-prefix-4passed
    data-arq-basic.n3q-base-prefix-5passed
    data-construct1.n3q-construct-1passed
    data-construct1.n3q-construct-2passed
    reif-data-1.n3q-reif-1passed
    reif-data-2.n3q-reif-2passed
    model0.nttest-0-01passed
    model0.nttest-0-02passed
    model0.nttest-0-03passed
    model0.nttest-0-04passed
    model1.nttest-1-01passed
    model1.nttest-1-02passed
    model1.nttest-1-03passed
    model1.nttest-1-04passed
    model1.nttest-1-05passed
    model1.nttest-1-06passed
    model1.nttest-1-07passed
    model1.nttest-1-08passed
    model1.nttest-1-09passed
    model1.nttest-1-10passed
    model1.nttest-2-01passed
    model1.nttest-2-02passed
    model1.nttest-2-03passed
    model1.nttest-2-04passed
    model1.nttest-2-05passed
    model1.nttest-2-06passed
    model1.nttest-2-07passed
    model1.nttest-2-08passed
    model1.nttest-2-09passed
    model1.nttest-2-10passed
    model1.nttest-3-01passed
    model1.nttest-3-02passed
    model1.nttest-3-03passed
    model1.nttest-3-04passed
    model1.nttest-3-05passed
    model1.nttest-3-06passed
    model5.nttest-3-07passed
    model2.nttest-4-01passed
    model2.nttest-4-02passed
    model2.nttest-4-03passed
    model2.nttest-4-04passed
    model3.nttest-4-05passed
    model3.nttest-4-07passed
    model4.nttest-5-01passed
    model4.nttest-5-02passed
    model4.nttest-5-03passed
    model4.nttest-5-04passed
    model4.nttest-6-01passed
    model4.nttest-6-02passed
    model4.nttest-6-03passed
    model6.nttest-7-01passed
    model6.nttest-7-02passed
    model7.nttest-7-03passed
    model7.nttest-7-04passed
    model1.nttest-9-02passed
    model8.n3test-B-01failed
    model8.n3test-B-02passed
    model8.n3test-B-03passed
    model8.n3test-B-04passed
    model8.n3test-B-05passed
    model9.n3test-B-08passed
    model9.n3test-B-09passed
    model9.n3test-B-10passed
    model9.n3test-B-11passed
    model9.n3test-B-12failed
    model9.n3test-B-13passed
    model9.n3test-B-19passed
    - -

     

    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingNamedGraphs.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingNamedGraphs.htm deleted file mode 100755 index 1a6ba70b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingNamedGraphs.htm +++ /dev/null @@ -1,252 +0,0 @@ - -Using RAP's Resource-Centric ResModel API - - - - - -

    RDF API for PHP

    -

    Using RAP's RDF Dataset API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -July 2005

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Usage Examples
      -
    4. -
    -

    1. Introduction

    -

    This section gives an introduction into the ideas behind Named Graphs and RAP's RDF datset API.

    -

    1.1 Named Graphs

    -

    The Semantic Web can be seen as a collection of RDF graphs. The RDF recommendation explains the meaning of any one graph, and how to merge a set of graphs into one, but does not provide suitable mechanisms for talking about graphs or relations between graphs. But the ability to express metainformation about graphs is required for:

    -
      -
    • Data syndication systems need to keep track of provenance information, and provenance chains. -
    • Restricting information usage: Information providers might want to attach information about intellectual property rights or their privacy preferences to graphs in order to restrict the usage of published information. -
    • RDF repository housekeeping: Triple stores need mechanisms to replace and update parts of their content. -
    • Access control: A triple store may wish to allow fine-grain access control, which appears as metadata concerning the graphs in the store. -
    • Signing RDF graphs: For signing RDF graphs it is necessary to keep the graph that has been signed distinct from the signature, and other etadata concerning the signing, which may be kept in a second graph. -
    • Expressing propositional attitudes such as modalities and beliefs. -
    • Scoping assertions and logic where logical relationships between graphs have to be captured.
    • -
    -


    - RDF reification has well-known problems in addressing these use cases. To avoid these problems several authors propose quads, consisting of an RDF triple and a further URIref or blank node or ID. The proposals vary widely in the semantic of the fourth element, using it to refer to information sources, to model IDs or statement IDs or more generally to contexts. Named Graphs propose a general and simple variation on RDF, using sets of named RDF graphs.

    -

    A set of Named Graphs is a collection of RDF graphs. Each one is named with a URIref. -

    The name of a graph may occur either in the graph itself, in other graphs, or not at all. Graphs may share URIrefs but not blank nodes. Named Graphs can be seen as a reformulation of quads in which the fourth elements distinct syntactic and semantic properties are clearly distinguished, and the relationship to RDFs triples, abstract syntax and semantics is clearer.

    -

    Named Graphs has been adopted by W3C Data Access Working Group as data model for the SPARQL query language.

    -

    Further details about Named Graphs are found in:

    - -

    -

    1.2 RAP Dataset API

    -

    RAP's quad- and named graph-centric Dataset API is an implementation of DAWG's RDF dataset. It provides methods for parsing, manipulating and serializing RDF datasets and pure sets of Named Graphs. It also provides an implementation of the TriX syntax for exchanging RDF datasets.

    -

    The basic idea of the Dataset API is to have a set of Named Graphs plus one additional unnamed default graph. The dataset can be manipulated by adding and removing entire Named Graphs, or by working with individual Quads.

    -API Overview -

    The tables below give an overview about RAPs main interfaces and their most important methods. See PHPDoc for details about all methods.

    - - - - - - - - - - - - - - - - - - -
    NamedGraph
    A collection of RDF triples which is named by a URI. The NamedGraph object wraps RAP models, meaning that MemModel and DbModel can be reused.
    setGraphName(URI)
    Sets the name of the graph.
    getGraphName(URI)
    Returns the URI of the named graph.
    plus all other methods from statement-centric model API.
    -
    -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Dataset
    An RDF datset is a collection of named RDF graphs plus one additional unnamed default graph. RDF datsets can be accessed and modified by adding and removing NamedGraph instances, by adding, removing and finding Quads (RDF triples with an additional graph name) and by adding triple to the background graph. RDF datasets can be serialized using TriX.
    addNamedGraph(namedgraph) Adds a NamedGraph to the set.
    addQuad(quad) Adds a quad to the set of Named Graphs in the RDF dataset. A new NamedGraph will automatically be created if necessary.
    addDefaultGraph(graph) Adds the default graph to the RDF dataset.
    createGraph(graphName,baseURI)
    Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced.
    getNamedGraph(graphName)Returns the NamedGraph with a specific name from the Dataset.
    getDefaultGraph()Returns a reference to the default graph of the Dataset.
    removeNamedGraph(graphName)Removes a NamedGraph from the set.
    findInNamedGraphs(quad) Finds Quads that match a quad pattern.
    listNamedGraphs()Returns an iterator over all NamedGraphs in the set.
    serializeToFile()Saves RDF datset as TriX file.
    sparqlQuery(query [, resultForm])Executes a SPARQL query against the dataset.
    -
    -

     

    -

    Usage Examples

    -

    2.1 Operations on Datasets and NamedGraphs

    - - - - - - -

     

    - - - - - - - -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    //get a GraphSet from the ModelFactory
    - $graphset = ModelFactory::getDatasetMem('Dataset1');

    -

    // Create a new NamedGraphsMem
    - $graph1 = new NamedGraphMem('http://graph1');
    - $graph2 =& $graphset->createGraph('http://graph2');

    -

    //create Quads
    - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1'));
    - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2'));
    - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3'));
    - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5'));

    -

    //add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically
    - $graphset->addQuad($quad1);
    - $graphset->addQuad($quad3);
    - $graphset->addQuad($quad2);

    -

    //add a NamedGraph to the Set
    - $graphset->addNamedGraph('http://graph1',$graph1);

    -

    //Is the Graph "http://graph1" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph1" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph1'));
    - echo'<p/>';

    -

    //remove 'http://graph2' from the set
    - $graphset->removeNamedGraph('http://graph2');

    -

    //Is the Graph "http://graph2" part of the GraphSet?
    - echo '<b>Is the Graph "http://graph2" part of the GraphSet?</b><BR>';
    - var_dump($graphset->containsNamedGraph('http://graph2'));
    - echo'<p/>';

    -

    //creat basic statement
    - $statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'));

    -

    //get a Graph from the Set and add a basic statement
    - $graph4=&$graphset->getNamedGraph('http://graph4');
    - $graph4->add($statement);

    -

    //remove Quad5
    - $graphset->removeQuad($quad5);

    -

    //get an iterator over all Quads
    - echo '<p/><b>All Quads:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $quad=$iterator->current();
    -    echo $quad->toString().'<BR>';
    - };

    -

    //get an iterator over all Quads in 'http://graph3'
    - echo '<p/><b>All Quads in http://graph3:</b><BR>';
    - for($iterator = $graphset->findInNamedGraphs(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $quad=$iterator->current();
    -    echo $quad->toString().'<BR>';
    - };

    -

    //how many Quads are in the whole GraphSet
    - echo '<p/><b>How many Quads are in the whole GraphSet?</b><BR>';
    - echo $graphset->countQuads();

    -

    //does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?
    - echo '<p/><b>Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object4) ?</b><BR>';
    - var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')));
    -

    -

    // run a sparql query against the dataset wich fetches all statements from <http://graph4>
    - $sparqlQuery = "SELECT * FROM NAMED <http://graph4> WHERE {?s ?p ?o} ";
    - $result = $graphset->sparqlQuery($sparqlQuery);

    -

    // print the results as html table
    - echo '<p/><b>Result of the sparql query: "SELECT * FROM NAMED &lt;http://graph4&gt; WHERE {?s ?p ?o}" </b><BR>';
    - SparqlEngine::writeQueryResultAsHtmlTable($result);

    -

    ?>

     
    -

     

    -

    2.2 - - - Using Database Persistence

    - - - - - - -

    <?php
    - // Include RAP
    - define("RDFAPI_INCLUDE_DIR", "./../api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - //Get a DbStore from the modelFactory
    - $dbstore=ModelFactory::getDbStore('MySql','localhost','rap','root','');
    -
    - //create the needed tables in the database, if they aren't already set up.
    - if (!$dbstore->isSetup('MySQL'))
    -   $dbstore->createTables('MySql');
    -
    - //create a new dataset, if the dataset was not found
    -$dataset1=& $dbstore->getDatasetDb('Dataset1');
    - if ($dataset1 === false)
    -   $dataset1=& $dbstore->getNewDatasetDb(''Dataset1'');
    -
    - //create a new namedGraph in the dataset.
    -$namedGraph1=& $dataset1->createGraph('http://rap/NamedGraph1');
    -
    - //add a statement to the namedGraph -
    - $namedGraph1->add(new Statement(new Resource('http://rap/ng1_res1'),new Resource('http://rap/ng1_res2'),new Resource('http://rap/ng1_res3')));

    -

    //create a Quad
    - $quad1= new Quad(new Resource('http://rap/NamedGraph2'),new Resource('http://rap/ng2_res1'),new Resource('http://rap/ng2_res2'),new Resource('http://rap/ng2_res3'));

    -

    //add the Quad to the dataset (the needed namedGraph (http://rap/NamedGraph2) is created automatically)
    - $dataset1->addQuad($quad1);

    -

    //print out all saved statements
    - for($iterator = $dataset1->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
    - {
    -    $currentQuad= $iterator->current();
    -   echo $currentQuad->toString().'<BR>';
    -};
    -?>

    -
    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheModelAPI.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheModelAPI.htm deleted file mode 100755 index 94b7814f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheModelAPI.htm +++ /dev/null @@ -1,689 +0,0 @@ - -Using RAP's Statement-Centric MemModel API - - - - - - -

    RDF API for PHP

    -

    Using RAP's Statement-Centric MemModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Radoslaw Oldakowski, Daniel Westphal
    -October 2004

    -
    -

    This tutorial demonstrates how RAP's statement-centric MemModel API is used - for creating and manipulating RDF models.
    - More information about the MemModel API is found in the MemModel PHPdocs. - An overview about RAP's other APIs is given in Introduction - to RAP.

    -

    Contents:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1.Installation
    2.Creating - Statements
    3.Generating - RDF Models
    4.Printing - Out a Model
    5.Saving - a Model Serialization to File
    6.Blank - Nodes
    7.Typed - Literals
    8.Traversing - a Model
    9.Comparing - and Combining Models
    10.Querying - a Model
    11.Reification
    12.Terminating - a Model
    13.Implementation Notes
    -

    -

    1. Installation

    -

    To get started we need to download the most recent version of RDF API for PHP -from http://sourceforge.net/projects/rdfapi-php/ -and unzip the package. Note that RAP requires PHP 4.2 or later.

    -

    Next we can begin with an example script. The first step is to include all -RAP classes. We do it by defining the directory in which the API has been -unzipped and then include the file RdfAPI.php as shown below.

    - - - -
    -

    define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdf_api/api/"); -
    include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); -



    -

    2. Creating Statements

    -

    Creating statements with RAP is extremely easy. Since each statement in RAP -is represented by an object (Statement), we have to create an -instance of this object with subject, property, and value passed as parameters -to the constructor function.

    -

    Consider the following statement written in N-Triple notation: -

    <http://www.example.org/someDocument.html> -<http://www.purl.org/dc/elements/1.1/creator> "Radoslaw -Oldakowski".

    In order to represent this statement in RAP we first -create its components (subject and predicate - both are resources indicated by -URIs), which we will also be using later on in this tutorial:

    - - - -
    -

    $someDoc = new Resource - ("http://www.example.org/someDocument.html");
    $creator = new Resource - ("http://www.purl.org/dc/elements/1.1/creator"); -

    -

    and then pass them together with the third component (object -Literal) to the constructor function:

    - - - -
    -

    $statement1 = new Statement ($someDoc, $creator, new Literal - ("Radoslaw Oldakowski"));

    -

    RDF API for PHP also provides support for common vocabularies like Dublin Core used in this -statement. So instead of creating a new Resource ($creator) -representing the creator property we can also use the pre-defined variable -$DC_creator (see script DC.php).

    -

    In this straightforward way we have created our first object -Statement. Having this object, we could now compare it with other -statements (method compare()), serialize to string -(toString()), reify (reify() - see Section -11), or what we probably would do in most cases add it to a model.


    -

    3. Generating RDF Models

    -

    An overview of the different kinds of RAP models is found in Introduction - to RAP. RDF models can be stored either in main memory - (MemModel) or in a relational database (DbModel). Except for some indexing mechanisms - and Statement Iterator feature in the case of MemModel, all the other methods - are equal for both classes. So we can manipulate RDF models using the same function - names and expect the same output, regardless of the storage mechanism chosen. - In this tutorial I will focus on MemModels, whereas working with DbModels is - described here.
    -The different kinds of models are created using a model factory.

    -

    In order to generate a new MemModel we simply write:

    - - - -
    -

    $model1 = ModelFactory::getDefaultModel();

    -

    To specify a base URI of a MemModel, we can either pass the URI string -as parameter to the constructor function or set it for an existing model using -the method setBaseURI(). In our example we just leave the default -setting and proceed with adding our first statement -($statement1):

    - - - -
    -

    $model1->add($statement1);

    -

    In this simple way we have created a model containing one statement. However, -the method add() does not check if a MemModel already contains the -statement to be added. So if you want to avoid duplicates, use the method -addWithoutDuplicates() instead.

    -

    While generating a model we can add not only single statements but moreover -also entire models. To demonstrate this, we create a new MemModel containing two -statements:

    - - - -
    -

    $model2 = ModelFactory::getDefaultModel()
    $model2->add(new - Statement($someDoc, new - Resource("http://www.example.org/myVocabulary/title"), new Literal("RAP - tutorial")));
    $model2->add(new Statement($someDoc, new - Resource("http://www.example.org/myVocabulary/language"), new - Literal("English")));

    -

    and then add the second MemModel ($model2) just created to the -first one ($model1):

    - - - -
    -

    $model1->addModel($model2);

    -

    The parameter passed to the method addModel() can be an instance -of both classes MemModel and DbModel. If we now check the size of -$model1 using the method size():

    - - - -
    -

    echo "\$model1 contains " .$model1->size() ." statements"; -

    -

    we will see that $model1 contains now three -statements:

    Output: - - - -
    -

    $model1 contains 3 statements



    -

    4. Printing Out a Model

    -

    RDF API for PHP provides some useful methods for displaying the contents of a -MemModel. Using the method writeAsHtmlTable() we can print out the -MemModel as a table containing a set of triples. Methods toString() -and toStringIncludingTriples() create a plain text serialization of -the MemModel, whereas writeRDFtoString() and -writeAsHtml() serialize the model to RDF/XML. The latter converts -special chars to HTML entities, so that the serialization can properly be -displayed in a browser window.

    -

    Accordingly, the following piece of code:

    - - - -
    -

    // Output $model1 as HTML table
    echo "<b>Output the - MemModel as HTML table: </b><p>"; -
    $model1->writeAsHtmlTable();

    // Output the string - serialization of $model1
    echo "<b>Output the plain text - serialization of the MemModel: </b><p>";
    echo - $model1->toStringIncludingTriples();

    // Output the RDF/XML - serialization of $model1
    echo "<b>Output the RDF/XML - serialization of the MemModel: </b><p>";
    echo - $model1->writeAsHtml();

    -

    would render this output in a browser window:

    Output: - - - -
    Output the MemModel as HTML table: -

    - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.purl.org/dc/elements/1.1/creator

    -

    Literal: Radoslaw Oldakowski

    -

    2.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    Literal: RAP tutorial

    -

    3.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    Literal: English



    Output the - plain text serialization of the MemModel: -

    MemModel[baseURI=; size=3] - Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.purl.org/dc/elements/1.1/creator"), Literal("Radoslaw - Oldakowski")) Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.example.org/myVocabulary/title"), Literal("RAP - tutorial")) Triple(Resource("http://www.example.org/someDocument.html"), - Resource("http://www.example.org/myVocabulary/language"), - Literal("English"))


    Output the RDF/XML serialization of the - MemModel: -

    <?xml version='1.0' encoding='UTF-8'?>
    <rdf:RDF
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
       xmlns:ns1="http://www.purl.org/dc/elements/1.1/"
       xmlns:ns2="http://www.example.org/myVocabulary/">

    <rdf:Description rdf:about="http://www.example.org/someDocument.html">
       <ns2:language>English</ns2:language>
       <ns2:title>RAP tutorial</ns2:title>
       <ns1:creator>Radoslaw Oldakowski</ns1:creator>
    </rdf:Description>

    </rdf:RDF> -



    -

    5. Saving a Model Serialization to File

    -

    In addition to displaying a MemModel on the screen, we can save its -serialization to a file. RAP V0.8 supports the RDF/XML, N-Triple, and N3 syntax. -Thus, when we call the method saveAs() and pass the filename as the -first parameter, RAP will use the appropriate serializer according to the flag -('rdf' ,'n3' , or 'nt') provided as the second -parameter:

    - - - -
    -

    $model1->saveAs("model1.rdf", "rdf"); -
    $model1->saveAs("model1.n3", "n3");

    -

    As output of the above code two files with RDF data have been created (model1.rdf -and model1.n3). -In the case that we leave out the second parameter, RAP will use the default -setting and will serialize the MemModel to RDF/XML.

    -

    To load an RDF model from a file we call the method load() -passing the name or a URL of the document containing RDF data and its -serialization syntax as parameters. If the second parameter is not provided, RAP -will decide upon the suffix which parser to use.


    -

    6. Blank Nodes

    -

    Blank Nodes in RDF API for PHP are represented by instances of object -BlankNode. Every B-Node is assigned a unique identifier which can -either be explicitly specified by the user or automatically generated for the -model passed to the constructor method. However, these identifiers have only a -local scope within a particular model. Thus, if two different RDF models use the -same blankNodeID, it does not necessarily mean that the Blank Nodes -identified by this ID must also be the same.

    -

    Consider the following modification of $model1: we replace the -literal "Radoslaw Oldakowski", being an object in the first -statement, with a Blank Node. After that we make additional statements -describing this B-Node. To do this, we first create a new BlankNode allowing the -identifier to be automatically generated for our MemModel -$model1:

    - - - -
    -

    $bNode = new BlankNode($model1);

    -

    Next, using the method replace(), we exchange the objects:

    - - - -
    -

    $model1->replace(NULL, NULL, new Literal("Radoslaw - Oldakowski"), $bNode);

    -

    This will search for all statements having an object equal to the passed -literal and replace this literal with the value of the fourth parameter -($bNode). Subsequently we add new statements describing the Blank -Node using RAP's pre-defined vCard vocabulary ($VCARD_FN, -$VCARD_EMAIL):

    - - - -
    -

    include(RDFAPI_INCLUDE_DIR . "vocabulary/VCARD.php");
    - $model1->add(new Statement($bNode, $VCARD_FN, new - Literal("Radoslaw Oldakowski")));
    $model1->add(new - Statement($bNode, $VCARD_EMAIL, new Literal("radol@gmx.de"))); -



    -

    7. Typed Literals

    -

    The next statement we are about to add to $model1 describes the -age of the person represented by the Blank Node $bNode. After -having created the literal object:

    - - - -
    -

    $age = new Literal("26");

    -

    we can explicitly indicate the datatype of the literal using the method -setDatatype():

    - - - -
    -

    $age->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); -

    -

    and then add the entire statement to the MemModel as usual:

    - - - -
    -

    $model1->add(new Statement ($bNode, new - Resource("http://www.example.org/myVocabulary/age"), $age)) -

    -

    Similarly, we can specify the language of a literal by calling the method -setLanguage() or by passing the language string as second parameter -to the constructor method on an object Literal.


    -

    8. Traversing a Model

    -

    If there is a need to traverse statements of a MemModel one by one, we can -use a Statement Iterator. The Statement Iterator is an object created by calling -the method getStatementIterator() on a MemModel, for instance:

    - - - -
    -

    $it = $model2->getStatementIterator(); -

    -

    Once instanced, the Statement Iterator can be ordered to return the current -(current()), next (next()), or previous -(previous()) statement. It can also move to a desired position -(moveFirst(), moveLast(), moveTo()). In -the following example we will use the iterator to output the label (URI or -literal string) of the subject, predicate and object of each statement in -$model2:

    - - - -
    -

    while ($it->hasNext()) {
          - $statement = $it->next();
          echo - "Statement number: " . $it->getCurrentPosition() . "<BR>"; -
          echo "Subject: " . - $statement->getLabelSubject() . "<BR>"; -
          echo "Predicate: " . - $statement->getLabelPredicate() . "<BR>"; -
          echo "Object: " . - $statement->getLabelObject() . "<P>";
    } -

    -

    This will generate the following output on the browser -screen:

    Output: - - - -
    -

    Statement number: 0
    Subject: - http://www.example.org/someDocument.html
    Predicate: - http://www.example.org/myVocabulary/title
    Object: RAP tutorial -

    Statement number: 1
    Subject: - http://www.example.org/someDocument.html
    Predicate: - http://www.example.org/myVocabulary/language
    Object: English -

    -

    Since the Statement Iterator does not use the PHP's built-in array iterator, -we can independently use several instances of object StatementIterator on the -same model. This feature, however, is only accessible for instances of class -MemModel.


    -

    9. Comparing and Combining Models

    -

    RDF API for PHP provides three methods for comparing models. Using the -function equals() we can find out if two models are the same. -Methods containsAny() and containsAll() return a -corresponding Boolean value about statements shared by two models being -compared.

    -

    Furthermore, we can combine two different models by using either of the -methods unite(), subtract() or -intersect(), which will return a new MemModel respectively. More -details about these functions can be found in RAP -documentation.

    -

    As far as the methods described in this section are concerned, RAP offers a -high degree of flexibility by allowing the passed parameter to be an instance of -either a MemModel or DbModel.


    -

    10. Querying a Model

    -

    One of the probably most frequent activities performed on a model is querying -it. RDF API for PHP V0.9.1 offers various methods helping to find the desired -information. We can, for instance, take our $model1 and search for -statements having subject http://www.example.org/someDocument.html. -For this purpose we use the method find() and pass the object -Resource $someDoc representing this particular subject as -parameter:

    - - - -
    -

    $result = $model1->find($someDoc, NULL, NULL); -
    $result->writeAsHtmlTable();

    -

    NULL will match anything. The value returned by this method is -another MemModel containing triples matching the passed statement pattern. If we -print out the result model as HTML table the following output will -occur:

    Output: - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 3

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.purl.org/dc/elements/1.1/creator

    -

    Blank Node: bNode1

    -

    2.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    Literal: RAP tutorial

    -

    3.

    -

    Resource: http://www.example.org/someDocument.html

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    Literal: English

    -

    Besides the method find() which delivers a new MemModel as query result, RAP - also provides a Find Iterator for Traversing statements matching the specified - pattern. The Find Iterator is an object created - by calling the method findAsIterator() on - a MemModel and passing the statement pattern as parameter (similarly - like in the case of find()). Once instanced, the Find - Iterator can be ordered to return the current (current()) - or to find the next (next()) matching statement.

    -

    Methods findFirstMatchingStatement() and - findCount() are very similar to find(). The former returns - a model containing only one statement, whereas the latter merely returns the - number - of statements - -matching the specified pattern.

    -

    If we want to be even more specific in our queries, we will be likely to use -the method findRegex(), which searches the model for triples -matching a Perl-style regular -expression. Furthermore, using the method findVocabulary() we -can filter all statements of a certain vocabulary.

    -

    RAP V0.9.1 also offers another method for querying RDF models using RDQL query -language. However, this method, as well as RDQL itself, is much more -sophisticated than the previously described functions and therefore is presented -separately in the RDQL -tutorial.

    -

    To increase query performance RDF API for PHP builds by default three search - indices over the subject, predicate, and object. Moreover, you can also - manually customize the indices used, according to the search pattern specified - in your query. This will result in much better performance (however, creating - an -index takes time). RAP allows users to build an index over the combined - labels of subject, predicate, and object or just subject and predicate, or - subject and object. To do this you simply have to call the method index() - and pass the appropriate parameter (IND_SPO, IND_SP, IND_SO respectively - or -NO_INDEX if you want to delete all indices).

    - - - - - - -
    -

    $model1 = ModelFactory::getDefaultModel();
    - $model1->index(IND_SPO);

    -

    -

    11. Reification

    -

    To perform a reification in RAP, we simply call the method -reify() on an object Statement. The MemModel returned -will contain four statements according to the RDF -specification.

    -

    Moreover, we can use the method reify() on an instance of -MemModel or DbModel in order to reify all statements -of this particular model. To demonstrate this, we take our $model2: -and reify all its statements:

    - - - -
    -

    $reified = $model2->reify(); -
    $reified->writeAsHtmlTable();

    -

    The corresponding result model $reified consists of 8 triples, -four for each reified statement as the browser output in form of an HTML table -shows:

    Output: - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Base URI:

    -

    Size: 8

    -

    No.

    -

    Subject

    -

    Predicate

    -

    Object

    -

    1.

    -

    Blank Node: bNode1

    -

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement

    -

    2.

    -

    Blank Node: bNode1

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#subject

    -

    Resource: http://www.example.org/someDocument.html

    -

    3.

    -

    Blank Node: bNode1

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/myVocabulary/title

    -

    4.

    -

    Blank Node: bNode1

    -

    RDF Node: -http://www.w3.org/1999/02/22-rdf-syntax-ns#object

    -

    Literal: RAP tutorial

    -

    5.

    -

    Blank Node: bNode2

    -

    RDF Node: http://www.w3.org/1999/02/22-rdf-syntax-ns#type

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement

    -

    6.

    -

    Blank Node: bNode2

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#subject

    -

    Resource: http://www.example.org/someDocument.html

    -

    7.

    -

    Blank Node: bNode2

    -

    RDF Node: - http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate

    -

    Resource: http://www.example.org/myVocabulary/language

    -

    8.

    -

    Blank Node: bNode2

    -

    RDF Node: -http://www.w3.org/1999/02/22-rdf-syntax-ns#object

    -

    Literal: -English



    -

    12. Terminating a Model

    -

    If we know that we will no longer use an object MemModel, we -shall terminate it and free up resources held, especially while working with -MemModels containing a great amount of statements. We can do it by simply -calling the method close(). This way we will close all instances of -class MemModel used in this tutorial as follows:

    - - - -
    -

    $model1->close();
    $model2->close(); -
    $result->close();
    $reified->close(); -


    -

    You can find the source code for this tutorial here. -A detailed description of all methods used can be found in the method -reference of class MemModel provided with RAP documentation.

    -

     

    -

    13. Implementation Notes

    -

    The MemModel implementation stores statements in an array in the system memory. - If a new statement is added to the model, it's appended to the array and added - to a statement index in order to accelerate queries. MemModel is the fastest - of all Model API implementations.

    -

    -


    -

    -

    diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheOntModelAPI.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheOntModelAPI.htm deleted file mode 100755 index a86daf67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheOntModelAPI.htm +++ /dev/null @@ -1,496 +0,0 @@ - -Using RAP's Ontology-Centric OntModel API - - - - - - - - - - - - -

    RDF API for PHP

    -

    - Using RAP's Ontology-Centric OntModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    This tutorial is based on the Jena - Ontology API tutorial.

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Running example: the camera ontology
    4. -
    5. Creating ontology models
    6. -
    7. The generic ontology type: OntResource
    8. -
    9. Handling ontology components: basic class expressions -
    10. -
    11. Handling ontology components: properties
    12. -
    13. Instances (individuals)
    14. -
    -

     

    -

    Introduction

    -

    This tutorial describes RAP's ontology API, and covers a range of common tasks. - Not all details of the API are covered here: Please refer to the RAP PHPDoc to get the full details of - the capabilities of the API.

    -

    The ontology model is an extended version of RAP's ResModel API. OntModel extends - ResModel by adding direct support for the kinds of objects expected to be in - an ontology: classes (in a class hierarchy), properties (in a property hierarchy) - and individuals. The properties defined in the ontology language map to accessor - methods. For example, an OntClass has a method to list its super-classes, - which corresponds to the values of the subClassOf property. This - point is worth emphasizing: no information is stored in the OntClass - object itself. When the OntClass listSuperClasses() method is called, - the information is retrieved from the underlying RDF model. Similarly adding - a subclass to an OntClass asserts an additional RDF statement into - the model.

    -

    - image of layering of graphs in model -

    -

    OntModel just provides a more convenient API for working - with ontology models, but doesn't do any inference by itself. If you also - need inference you have to combine OntModel with an underlying InfModelF or - InfModelB. If you don't need inference you can combine OntModel with an underlying - MemModel or DbModel.

    -

     

    -

    - Running example: the camera ontology -

    - -

    To illustrate the principles of using the Ontology API, we use examples drawn - from a Roger Costello's camera ontology. The camera ontology contains a set - of classes describing some aspects of the domain of still-picture cameras, as - shown below:

    -

    - image of class hierarchy -

    -

    We will only use some of the elements from this ontology to - illustrate the ontology API throughout this tutorial.

    -

    Creating Ontology Models

    - -

    RAP's OntModel is an extension of RAP's ResModel that provides extra - capabilities for handling ontology data sources. Ontology models are created - through the RAP ModelFactory. - The simplest way to create an ontology model is as follows:
    -

    - - - - - - -
    -

    $ontModel = ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY);

    -

    It uses RDFS as the ontology language and assumes that all of the ontology - data will be stored in-memory (MemModel). Actually only RDFS vocabulary is supported. An OWL vocabulary will be implemented - - - in the near future

    -

    Note: it is the choice of reasoner, not the choice of language - profile that determines if entailed statements are seen through the ontology - API. The following example creates an ontology model with RDFS entailment in - backward-chaining mode:

    - - - - - - - -
    -

    $ontModel = ModelFactory::getOntModel(INFMODELB,RDFS_VOCABULARY);

    -

    The Generic Ontology Type: OntResource

    - -

    All of the classes in the ontology API that represent ontology values have - OntResource as a common super-class. This makes OntResource - a good place to put shared functionality for all such classes, and makes a handy - common return value for general methods. The OntResource extends - the ResResource class, so any general method that accepts a resource - or an RDFNode will also - accept an OntResource, and consequently, any other ontology value. -

    -

    - Some of the common attributes of ontology resources that are expressed through methods on OntResource are shown below: -

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - comment -
    -
    -
    - A general comment associated with this value -
    -
    -
    - label -
    -
    -
    - A human-readable label -
    -
    -
    - seeAlso -
    -
    -
    - Another web location to consult for more information about this resource -
    -
    -
    - isDefinedBy -
    -
    -
    - A specialization of seeAlso that is intended to supply a definition of this resource -
    -
    -
    - sameAs -
    -
    -
    - Denotes another resource that this resource is equivalent to -
    -
    -

    - For each of these properties, there is a standard pattern of available methods: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Method - - Effect -
    -
    - add<property> -
    -
    -
    - Add an additional value for the given property -
    -
    -
    - set<property> -
    -
    -
    - Remove any existing values for the property, then add the given value -
    -
    -
    - list<property> -
    -
    -
    - Return an iterator ranging over the values of the property -
    -
    -
    - get<property> -
    -
    -
    -Return the value for the given property, if the resource has one. If -not, return null. If it has more than one value, an arbitrary selection -is made.
    -
    -
    - has<property> -
    -
    -
    -Return true if there is at least one value for the given property. -Depending on the name of the property, this is sometimes -is<property>
    -
    -
    - remove<property> -
    -
    -
    -Removes a given value from the values of the property on this resource. -Has no effect if the resource does not have that value.
    -
    -

    Example: addSameAs( $ResResource ), or isSameAs( $ResResource ). -

    -

    For full details of the individual methods, please consult the PHPDoc.

    -

    - OntResource -defines some other general utility methods. To get or set the value -of a given property, use addPropertyValue( $property, $value ) or getPropertyValue( $property ). Similarly the values of a named property can be listed or removed. -

    -

    - Finally, OntResource -provides methods for listing, getting and setting the RDF types of a -resource. The rdf:type property is one for which many entailment rules -are defined in the semantic models of the various ontology languages. -Therefore, the values that listRDFTypes() returns is more -than usually dependent on the actual reasoner bound to the ontology -model. For example, suppose we have class A, class B which is a -subclass of A, and resource x whose asserted rdf:type is -B. With no reasoner, listing x's RDF types will return only B. If the -reasoner is able to calculate the closure of the subclass hierarchy -(InfModelF and InfmodelB can), X's RDF types would also include A.

    -

    -For some tasks, getting a complete list of the RDF types of a resource -is exactly what is needed. For other tasks, this is not the case. An -ontology editor, for example, might want to distinguish in its display -between inferred and asserted types. In the above example, only x rdf:type B -is asserted, everything else is inferred. One way to make this -distinction is to make use of the base model. Getting -the x resource from the base model and listing the type properties -there would return only the asserted values.

    -

    - To list the RDF types of a resource, use: -
    -

    - - - - - - -
    -

    listRDFTypes() // assumes not-direct
    - listRDFTypes( true ) // if true, show only direct relationships

    -

    Related methods allow the rdf:type to be tested, set and returned.

    -

    Handling Ontology Components: Basic Class Expressions

    - -

    Classes are the basic building blocks of an ontology. A simple class is represented - in RAP by an OntClass - object. You can get an OntClass by calling getOntClass() on the ontology - model:

    - - - - - - -
    -

    $camera = $ontModel->createOntClass( "camNS"."Camera" );

    -

    Once we have the ontology class object, we can begin processing it through - the methods defined on OntClass. The attributes of a class are - handled in a similar way to the attributes of OntResource, above, with a collection - of methods to set, add, get, test, list and remove values. Class properties - that are handled in this way are:

    - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - subClass -
    -
    -
    - A subclass of this class, i.e. those classes that are declared subClassOf this class. -
    -
    -
    - superClass -
    -
    -
    - A super-class of this class, i.e. a class that this class is a subClassOf. -
    -
    -

    - Thus, in our example ontology, we can print a list the subclasses of Camera as follows: -
    -

    - - - - - - - -
    -

    $camera = $model->createOntClass( "camNS:" . "Camera" );
    - foreach ($camera->listSubClasses() as $resResource)
    - {
    -   echo $resResource->getLabel();
    -}

    -

    - OntClass has some other commonly used utilities. To show all of the instances that mention this class as their rdf:type (or one of them), use listInstances().

    -

    Handling Ontology Components: Properties

    - -

    OntProperty is an extension of OntResource and allows access to the additional information - that can be asserted about properties in an ontology language Again, using the - pattern of add, set, get, list, has, and remove methods, we can access the following - attributes of an OntProperty:

    - - - - - - - - - - - - - - - - - - - - - -
    - Attribute - - Meaning -
    -
    - subProperty -
    -
    -
    - A sub property of this property; i.e. a property which is declared to be a subPropertyOf this property. If p is a sub property of q, and we know that A p B is true, we can infer that A q B is also true. -
    -
    -
    - superProperty -
    -
    -
    - A super property of this property, i.e. a property that this property is a subPropertyOf -
    -
    -
    - domain -
    -
    -
    -Denotes the class or classes that form the domain of this property. -Multiple domain values are interpreted as a conjunction. The domain -denotes the class of value the property maps from.
    -
    -
    - range -
    -
    -
    -Denotes the class or classes that form the range of this property. -Multiple range values are interpreted as a conjunction. The range -denotes the class of values the property maps to.
    -
    -

    -In the example camera ontology, the property body is a sub-property of -part, and has domain Camera and range Body (that is, it maps from -instances of cameras to instances of camera bodies). We can reconstruct -this definition in an empty ontology model as follows:

    - - - - - - -
    -

    $newM = ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY);
    - $camera = $newM->createOntClass( "camNS:". "Camera" );
    - $body = $newM->createOntClass("camNS:" . "Body" );
    -
    - $part = $newM->createOntProperty("camNS:". "part" );
    - $body = $newM->createOntProperty("camNS:". "body" );
    -
    - $body->addSuperProperty( $part );
    - $body->addDomain( $camera ); $body->addRange( $body );

    -

    Instances (Individuals)

    - -

    RAP supports a simple notion of an Individual, which is essentially - an alias for ResResource.

    - - - - - - -
    -

    $camera = $newM->createOntClass( "camNS:". "Camera" );
    - $instance = $camera->createInstance("camNS:". "CANJI JXP3");

    -

    In the above example, the individual is named, but this is not necessary. - The method call createInstance() creates an anonymous individual - belonging to the given class.

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheResModelAPI.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheResModelAPI.htm deleted file mode 100755 index 3b25e2be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheResModelAPI.htm +++ /dev/null @@ -1,243 +0,0 @@ - -Using RAP's Resource-Centric ResModel API - - - - - -

    RDF API for PHP

    -

    Using RAP's Resource-Centric ResModel API

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    Daniel Westphal, Chris Bizer
    -October 2004

    -

    This tutorial is based on the Jena - tutorial by Brian McBride, Daniel Boothby and Chris Dollin.

    -

    Table of Contents

    -
      -
    1. Introduction
    2. -
    3. Navigating a Model
    4. -
    5. Querying a Model
    6. -
    7. Containers
    8. -
    -

     

    -

    Introduction

    -

    RAP offers two different programming interfaces for manipulating RDF graphs: - The statement-centric Model API which allows you to manipulate - an RDF graph as a set of statements; and the resource-centric ResModel - API for manipulating an RDF graph as a set of resources having properties. - The ResModel API is very similar to the Jena - Model API allowing programmers, which are used to Jena, to easily write - RAP code.

    -

    The ResModel API is implemented on top of the Model API. ResModels are always - having a underlying MemModel, DbModel, InfModelF or InfModelB and are only providing - a resource-centric view on this model. Each method call is translated into a - find()-, add()-, or remove()-call to the underlying model. Thus using ResModel - is slightly slower than using the underlying model directly.

    -

    -

    RDF is a W3C standard for describing resources. What is a resource? That is - rather a deep question and the precise definition is still the subject of debate. - For our purposes we can think of it as anything we can identify. You are a resource, - as is your home page, this tutorial, the number one and the great white whale - in Moby Dick.

    -

    Our examples in this tutorial will be about people. They use an RDF representation of VCARDS . RDF is best thought of in the form of node and arc diagrams. A simple vcard might look like this in RDF:

    -

    figure 1

    -

    The resource , John Smith, is shown as - an ellipse and is identified by a Uniform Resource Identifier (URI), in this - case "http://.../JohnSmith".
    - Resources have properties. In these examples - we are interested in the sort of properties that would appear on John Smith's - business card. The figure above shows only one property, John Smith's full name. - A property is represented by an arc, labeled with the name of a property. The - name of a property is also a URI, but as URI's are rather long and cumbersome, - the diagram shows it in XML qname form. Each property has a value. In this case - the value is a literal, which for now we -can think of as a strings of characters. Literals are shown in rectangles.

    -

    In RAP, the classes representing resources, properties and literals are called - ResResource, ResProperty and ResLiteral. The code below creates John's VCard - using the ResModel API::

    -

     

    - - - - - - -

    //change the RDFAPI_INCLUDE_DIR to your local settings
    - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");

    -

    // Some definitions
    - define('VCARD_NS', 'http://www.w3.org/2001/vcard-rdf/3.0#');
    - $personURI = "http://somewhere/JohnSmith";
    - $fullName = "John Smith";

    -

    // Create an empty Model
    - $model = ModelFactory::getResModel(MEMMODEL);

    -

    // Create the resources
    - $fullNameLiteral = $model->createLiteral($fullName);
    - $johnSmith = $model->createResource($personURI);
    - $vcard_FN= $model->createProperty(VCARD_NS.'FN');
    - $vcard_NICKNAME= $model->createProperty(VCARD_NS.'NICKNAME');

    -

    // Add the property
    - $johnSmith->addProperty($vcard_FN, $fullNameLiteral);

    -

    The code begins with some constant definitions and then creates an empty model, - using the ModelFactory method getResModel(MEMMODEL) to create a ResModel - using a underlying MemModel. RAP also contains other implementations of models, - e.g. one which uses a relational database, or models that support RDFS reasoning - mechanisms; these types of Model are also available from the ModelFactory.

    -

    Navigating a Model

    -

    Given the URI of a resource, the resource object can be retrieved from a model - using the $model->createResource($uri) method. This method is defined to - return a ResResource object if one exists in the model, or otherwise to create - a new one. Example: Retrieve the John Smith resource from the model:

    - - - - - - -

    // Retrieve the John Smith vcard resource from the model
    - $vCard = $model->createResource($personURI);

    -

    The ResResource interface defines a number of methods for accessing the properties - of a resource. The $resource->getProperty($property) method accesses a property - of the resource. The type of the object returned is Statement, not the Property - as you might expect. Returning the whole statement allows the application to - access the value of the property using one of its accessor methods which return - the object of the statement. Example: Retrieve the value of the FN property: -

    - - - - - - -

    // Retrieve the value of the FN property
    - $statement = $vCard->getProperty($vcard_FN);
    - $value = $statement->getObject();

    -

    In this example, the vcard resource has only one vcard:FN property. RDF permits - a resource to have several properties of the same name; for example Adam might - have more than one nickname. Let's give him two:

    - - - - - - -

    // Add two nickname properties to vcard
    - $literal1 = $model->createLiteral("Smithy");
    - $literal2 = $model->createLiteral("Adman");
    - $vCard->addProperty($vcard_NICKNAME, $literal1);
    - $vCard->addProperty($vcard_NICKNAME, $literal2);

    -

    Calling $vcard->getProperty(VCARD.NICKNAME) will return one of the values, - but it is indeterminate which one. So if it is possible that a property might - occur more than once, then the $resource->listProperties($property) method - has to be used to get an array containing all statements with this resource and property:

    - - - - - - -

    // List the nicknames
    - echo '<b>Known nicknames for '.$fullNameLiteral->getLabel().':</b><BR>';
    - foreach ($vCard->listProperties($vcard_NICKNAME) as $currentResource)
    - {
    -    echo $currentResource->getLabelObject().'<BR>';
    -};

    -

     

    -

    Querying a Model

    -

    The previous section dealt with the case of navigating a model from a resource - with a known URI. This section deals with searching a model. RAP's ResModel - API only supports a limited query primitive. More powerful query facilities - are provided through the RDQL query language which is described in a separate - tutorial.

    -

    $model->listSubjects() returns an iterator over all resources that have - properties, ie are the subject of some statement. $model->listSubjectsWithProperty($property, - $value) will return an iterator over all the resources which have a property - $property with value $value.

    -

    Example: Iterate over all vcards which having FN property:

    - - - - - - -

    // Iterate over all vcards which having FN property
    - $iter = $model->listSubjectsWithProperty(new ResResource(VCARD_NS.'FN')); -
    - for ($iter->rewind(); $iter->valid(); $iter->next())
    - {
    -     $currentResource=$iter->current();
    - };

    -

    Containers

    -

    RDF defines a special kind of resources for representing collections of things. - These resources are called containers. The members of a container can - be either literals or resources. There are three kinds of container:

    -
      -
    • a BAG is an unordered collection
    • -
    • an ALT is an unordered collection intended to represent alternatives
    • -
    • a SEQ is an ordered collection
    • -
    -

    A container is represented by a resource. That resource will have an rdf:type property whose value should be one of rdf:Bag, rdf:Alt or rdf:Seq, or a subclass of one of these, depending on the type of the container. The first member of the container is the value of the container's rdf:_1 property; the second member of the container is the value of the container's rdf:_2 property and so on. The rdf:_nnn properties are known as the ordinal properties .

    -

    For example, the Model for a simple bag containing the vcards of the Smith's might look like this:

    -

    figure 3

    -

    Whilst the members of the bag are represented by the properties rdf:_1, rdf:_2 etc the ordering of the properties is not significant. We could switch the values of the rdf:_1 and rdf:_2 properties and the resulting Model would represent the same information.

    -

    Whilst containers can be handled using the basic machinery of - resources and properties, RAP has explicit implementation classes to handle - them.
    -

    - - - - - - -

    // Create a bag
    - $bag_smiths = $model->createBag();

    -

    $beckySmith = $model->createResource('http://somewhere/BeckySmith');
    - $beckySmithFN = $model->createLiteral('Becky Smith');
    - $beckySmith->addProperty($vcard_FN,$beckySmithFN );

    -

    // Add persons to bag
    - $bag_smiths->add($beckySmith);
    - $bag_smiths->add($johnSmith);

    -

    If we serialize this Model, you'll get something like this:

    -<rdf:Description rdf:nodeID="A3">
    -    <rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
    -    <rdf:_1 rdf:resource='http://somewhere/BeckySmith'/>
    -    <rdf:_2 rdf:resource='http://somewhere/JohnSmith'/>
    -</rdf:Description>
    -

    which represents the Bag resource.

    -

    The container implementation provides a getMembers() method for getting the - content of a container, as an array of ResResources:

    - - - - - - -

    // Print out the full names of the members of the bag
    - echo '<BR><BR><b>Print out the full names of the members of the bag:</b></BR>';
    - foreach ($bag_smiths->getMembers() as $resResource)
    - {
    -    // Retrieve the value of the FN property
    -    $statement = $resResource->getProperty($vcard_FN);
    -    echo $statement->getLabelObject().'<BR>';
    -};

    -

    The RAP ResContainer classes currently ensure that the the list of ordinal - properties starts with rdf:_1 and is contiguous. The RDFCore WG have relaxed - this constrain, so RAPS's container implementation might follow in the future.

    -

    It is not a problem to use a container object and to modify the state underlying - model using lower level methods at the same time, because all container level - operations are directly written into the underlying model.

    -

    Write the model as HTML table:

    - - - - - - - -
    -

    echo '<BR><BR>All Statements as HTML table';
    - $model->writeAsHTMLTable();

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlClient.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlClient.htm deleted file mode 100755 index 63ca1c2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlClient.htm +++ /dev/null @@ -1,184 +0,0 @@ - -Using the SPARQL Client - - - - - - -

    RDF API for PHP

    -

    Using the SPARQL Client

    -

    This - - - tutorial - -is part of the RAP - Rdf API for PHP documentation.

    -

    Tobias Gauss <tobias.gauss@web.de>, Chris Bizer <chris@bizer.de>
    - June 2006

    -


    -RAP's SPARQL client allows you to execute SPARQL queries against remote SPARQL endpoints using the SPARQL protocol. Query results are returned as array of variable bindings, RAP MemModel or boolean, depending on the type of SPARQL query.

    -

    Using the SPARQL Client

    - -

    The SPARQL client - - - package - -consists of two classes: SparqlClient which represents a connection to a SPARQL endpoint, and ClientQuery which represents a SPARQL query.

    -

    A SparqlClient is created using RAP's ModelFactory:

    - - - - - - -
    -

    $client = ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/example");

    -

    This line creates a new SparqlClient object $client for executing queries against the SPARQL endpoint http://www.exampleSparqlService.net:2020/example.

    -

    Then we create a ClientQuery object:

    - - - - - - -
    -

    $query = new ClientQuery();

    -

    The ClientQuery object has three methods:

    - - - - - - -
    -

    $query->query($queryString);

    -

    sets the query string of the ClientQuery object.

    -

    If the query string doesn't specify the data set to be queried and if the endpoint supports querying custom data sets, you can use following two methods to define the data set to be queried:

    - - - - - - -
    -

    $query->addDefaultGraph($default);

    -

    sets the default graph of the data set to be queried.

    - - - - - - -

    $query->addNamedGraph($named);

    -

    adds a named graph the data set to be queried.

    -

    A query is executed by calling the query() method of the client object:

    - - - - - - -
    -

    $result = $client->query($query);

    -

    The type of the variable $result depends on the SPARQL query. For SELECT queries, the result is an two dimension array of variable bindings ($result[]['?varname'] ). The values of these variables are RAP objects (Resource, Literal or BlankNode) or an empty string if the variable is unbound. The result of a CONSTRUCT query is a RAP MemModel. The result of a ASK query a variable of the type boolean.

    -

    You can also retrieve the query result in the SPARQL Query Results XML Format by calling the method setOutputFormat() before executing a query.

    - - - - - - -
    -

    $client->setOutputFormat("xml");

    -


    -Usage Example

    -

    We start with including the RAP toolkit and creating a SPARQL client linked to a SPARQL endpoint:

    - - -
    -

    - // Include all RAP classes
    - define("RDFAPI_INCLUDE_DIR", "C:/Apache/htdocs/rdfapi-php/api/");
    - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
    -
    - // Create a SPARQL client

    -$client = ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/example"); -

    -
    - -

    Once the client has been created, we can perform our first query which will be: "Find the full name of all employees". -We create a $querystring containing the corresponding SPARQL query:

    - - -

    - $querystring = '
    -
    PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
    - SELECT ?fullName
    - WHERE { ?x vcard:FN ?fullName }';

    -
    - -

    To execute the query, we create a new ClientQuery object and pass it to the SPARQL client:

    - - -
    -

    - $query = new ClientQuery();
    - $query->query($querystring);
    - $result = $client->query($query);

    -
    - -

    The following code loops over the result set and prints out all bindings of the variable ?fullName.

    - - - - - - -
    -

    - foreach($result as $line){
    -  $value = $line['?fullName'];
    -    if($value != "")
    -      echo $value->toString()."<br>";
    -    else
    -      echo "undbound<br>";
    -}

    -

    Another, even more convenient way to display the results of a query is to use the writeQueryResultAsHtmlTable() method of the SPARQL engine. All we have to do is to pass the query result to this method:

    - -
    -

    - SPARQLEngine::writeQueryResultAsHtmlTable($result); -

    -
    - -

    Which will result in the following output in the browser window:

    - - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - -

    For more SPARQL query examples please refer to the W3C SPARQL specification.

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlEngine.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlEngine.htm deleted file mode 100755 index eec82513..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/usingtheSparqlEngine.htm +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - Using the SPARQL Engine - - - - -

    RDF API for PHP

    -

    Using the SPARQL Engine

    -

    This tutorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Tobias Gauss <tobias.gauss@web.de>
    - Chris Bizer <chris@bizer.de>
    - Christian Weiske <cweiske@cweiske.de>
    -April 2007

    -
    -

    SPARQL is a query language for RDF, which is currently being - standardized by the W3C. This part of the RAP documentation describes - RAP's SPARQL engine and its usage. For a detailed description of the - SPARQL query language please refer to W3C SPARQL working draft. RAP's - SPARQL package allows you to execute SPARQL queries against RDF graphs - and RDF datasets which may be stored in memory or in a relational - database. We have also included SPARQL as additional query language into - RAP's NetAPI RDF server, which allows you to query remote RDF - repositories using W3C SPARQL - protocol.

    -

    RAP's SPARQL package requires PHP version 5.1 or higher.

    -

    Preparation

    -

    Before you can use the RAP's SPARQL classes, you need to include - them properly. The best way to do this is adapting the - config.php file in RAP's - test/ directory: Copy - config.php.dist to - config.php and edit it as you need. If - config.php stays in test/, - the directories are already setup properly.

    -

    If you want to use RAP's SPARQL Engine on a DbModel (database - based Model), you need to change the - $GLOBALS['dbConf'] array. RAP uses ADODB - internally, so the type configuration applies to - ADODB's driver naming scheme.

    -

    Creating a model

    - -

    SPARQL queries are run against a Model, let it be a - DbModel or a - MemModel.

    - - Creating a MemModel from a file - -

    Loading a memor model from a file is fairly easy:

    - - - - - - -
    - $employees = ModelFactory::getDefaultModel();
    -$employees->load(RDFAPI_INCLUDE_DIR . '../doc/Tutorial/employees.rdf');
    -
    -
    - Creating a DbModel - -

    To get a database model, you first need to get a database - instance and aquire the model from it:

    - - - - - - -
    - $database = ModelFactory::getDbStore(
    -    $GLOBALS['dbConf']['type'],
    -    $GLOBALS['dbConf']['host'],
    -    $GLOBALS['dbConf']['database'],
    -    $GLOBALS['dbConf']['user'],
    -    $GLOBALS['dbConf']['password']
    - );

    - $strModel = "http://xmlns.com/foaf/0.1/";
    - $dbModel = $database->getModel($strModel);
    -
    - if ($dbModel === false) {
    -    die('Database does not have a model ' . $strModel . "\n");
    - } -
    - -
    -

    Usage

    - -

    The usage of the SPARQL engine is very similar to the RDQL engine. A sparql query can be executed against an RDF dataset, a MemModel or DbModel. The necessary parts of the SPARQL package are loaded automatically when needed.

    -

    The usage is very simple:

    - - - - - - -
    - $result = $datasetOrModel->sparqlQuery($querystring);
    -

    This line executes the SPARQL query $querystring against the Dataset or Model $datasetOrModel. The query returns an array $result witch contains the matching variable bindings for the SELECT variables. If you want the result to be returned in the SPARQL Query Results XML Format, simply add an additional 'xml' parameter to the function call:

    - - - - - - -
    - $result = $datasetOrModel->sparqlQuery($querystring,'xml');
    -
    - -

    Result renderers

    - -

    While the default array-based result is good enought most times, - you may want to get back XML or HTML, or maybe even JSON to forward it - to an AJAX client that queried your server. RAP's SPARQL engine uses - the concept of "Renderers" to make it easy to obtain the results in - the format you need.

    -

    A renderer is a class that implements either - SparqlEngine_ResultRenderer or - SparqlEngineDb_ResultRenderer interface, - depending on which type of query results you want to convert. Since - Renderers operate directly on raw results (e.g. database rows), they - need to be written separately for each SPARQL engine.

    -

    SparqlEngineDb ships with three - renderers: The default array object renderer, an XML, and an HTML - renderer. To use any of them, pass Default, - XML or HTML as second parameter - to sparqlQuery. If you omit the second parameter, - the default renderer is used.

    -

    If you wrote your own renderer, pass either its full class name - as second parameter to sparqlQuery, or an - instance of it.

    - - -

    Example

    - -

    The initialization for MemModel and - DbModel differs a bit, but once you have the - model, both SPARQL engines behave the same.

    - -

    MemModel initialization -

    - - - - - - -
    - require_once 'C:/Apache/htdocs/rdfapi-php/test/config.php';
    - // Create a new MemModel and load the document
    - $employees = ModelFactory::getDefaultModel();
    - $employees->load(RDFAPI_INCLUDE_DIR . '../doc/Tutorial/employees.rdf');
    -
    - //continue below -
    -

    - - DbModel initialization -

    - - - - - - -
    - require_once '/var/www/rap/rdfapi-php/test/config.php';

    - $database = ModelFactory::getDbStore(
    -    $GLOBALS['dbConf']['type'],
    -    $GLOBALS['dbConf']['host'],
    -    $GLOBALS['dbConf']['database'],
    -    $GLOBALS['dbConf']['user'],
    -    $GLOBALS['dbConf']['password']
    - );

    - $strModel = "http://xmlns.com/foaf/0.1/";
    - $dbModel = $database->getModel($strModel);
    -
    - if ($dbModel === false) {
    -    die('Database does not have a model ' . $strModel . "\n");
    - } -
    -
    - - Querying data - -

    Once the model has been created, we can perform our first query which will be: "Find the full name of all employees". So, we create a variable $querystring and assign the corresponding query string:

    - - - - - - -
    - $querystring = '
    - PREFIX vcard <http://www.w3.org/2001/vcard-rdf/3.0#>
    - SELECT ?fullName
    - WHERE { ?x vcard:FN ?fullName }';
    -

    To execute the query, we call the method sparqlQuery() on the MemModel and pass the variable holding the query string as parameter:

    - - - - - - -
    - $result = $employees->sparqlQuery($querystring);
    -

    The result of the query is a two dimension array of variable bindings ($result[]['?varname']). The values of these variables are RAP objects (Resource, Literal, or BlankNode) or an empty string if the variable is unbound . The following code loops over the result set and prints out all bindings of the variable ?fullName.

    - - - - - - -
    - foreach($result as $line){
    -  $value = $line['?fullName'];
    -    if($value != "")
    -      echo $value->toString()."<br/>";
    -    else
    -      echo "undbound<br/>";
    - }
    -

    Another, even more convenient way to display the results of a - query in a browser is to use the HTML result renderer. All we have - to do is to pass 'HTML' as second parameter to - sparqlQuery():

    - - - - - - - -
    - echo $employees->sparqlQuery($querystring, 'HTML');
    - -

    Which will result in the following output in the browser - window:

    - - - - - - - - - - - - - - - - - - -
    No.?fullName
    1.

    Literal: Bill Parker

    2.

    Literal: George Simpson

    3.

    Literal: Monica Murphy

    - - -

    If we want the engine to return the query result in SPARQL Query Results XML Format, we have to add 'xml' as second parameter to the function call:

    - - - - - - -
    - $result2 = $employees->sparqlQuery($querystring, 'xml');
    -

    Now the variable $result2 contains a string which represents the results in SPARQL Query Results XML Format:

    - - - - - - -
    <?xml version="1.0"?>
    -<sparql xmlns="http://www.w3.org/2005/sparql-results#">
    -   <head>
    -      <variable name="fullName"/>
    -   </head>
    -   <results ordered="false" distinct="false">
    -      <result>
    -         <binding name="fullName">
    -            <literal>Bill Parker</literal>
    -         </binding>
    -      </result>
    -      <result>
    -         <binding name="fullName">
    -            <literal>George Simpson</literal>
    -         </binding>
    -      </result>
    -      <result>
    -         <binding name="fullName">
    -            <literal>Monica Murphy</literal>
    -         </binding>
    -      </result>
    -   </results>
    -</sparql>
    -

    The result of an ASK query is a boolean value, COUNT returns an integer.

    -

    The result of a CONSTRUCT query is a MemModel:

    - - - - - - -
    - $querystring = '
    - PREFIX vcard <http://www.w3.org/2001/vcard-rdf/3.0#>
    - PREFIX rdf <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    -
    - CONSTRUCT { ?x vcard:FN ?fullName}
    - WHERE { ?x vcard:FN ?fullName }';

    - echo $employees->sparqlQuery($querystring, 'HTML');
    -
    -

    A DESCRIBE query also returns a MemModel. Which properties are included into the description can be specified in constants.php:

    - - - - - - -
    - $sparql_describe = array(
    -   FOAF_NS.'Person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox')
    - );
    -

    Meaning that descriptions of instances of foaf:Person will contain the person's name, homepage and mailbox.

    -

    For more SPARQL query examples please refer to the W3C SPARQL Working Draft.

    -
    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/visualization_tutorial.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/visualization_tutorial.htm deleted file mode 100755 index fdae64ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/visualization_tutorial.htm +++ /dev/null @@ -1,166 +0,0 @@ - - - - Graph Visualization - - - -

    RDF API for PHP

    -

    Tutorial: Graph Visualization

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -
    -

    Anton Köstlbacher <ak@semaweb.org> -
    -April 2005

    -

     

    -

    This is a short Tutorial on how to use GraphViz dot within RAP to -easily generate visualizations of models in several file formats like png, svg or jpeg.

    -

     

    - -

    Introduction

    -

    The visualization tool for RAP V0.9.1 mainly consists of the method RDFUtil::visualizeGraph(). It prepares a so called dot-file, which is afterwards processed by the dot-application. -GraphViz dot is freely available under the Common Public License. The (binary or ascii) output of the dot-application is directly passed back to the browser. A working demo can be found in the RAP distribution (/rdfapi-php/test/custom_test_viz.php).

    -

     

    - - -

    Installation

    -

    The graph visualization features will be included as a standard package into the next RAP release. In order to use them now already, you have to download a current CVS snapshot or download this package and unzip it to your RAP directory.

    -

    Before we get started we need to download and install GraphViz dot into a directory on the machine, on which RAP is running. GraphViz dot is available as source code and binaries for several operating systems at http://www.graphviz.org. Additionally we need to set up a directory for temporary files which is read- and writeable by the webserver-software. Take care of security issues, if you are using RAP on a publicly accessible machine!

    -

     

    - -

    Configuration

    -

    At first we have to make sure, that the webserver (which runs RAP) can access the -GraphViz dot-binary, otherwise we can -only generate dot-files and use them for manual input to the Graphviz standalone application. -For immidiate generation of images we need to set the following parameters in -

    -constants.php - - - - - - -
    -

    -// ----------------------------------------------------------------------------------
    -// GRAPHVIZ
    -// ----------------------------------------------------------------------------------
    -
    -// path to the dot binary
    -define('GRAPHVIZ_PATH', 'C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe');
    -
    -// directory for temporary files
    -// Attention: must be write-/readable by the webserver
    -define('GRAPHVIZ_TEMP', 'C:\/');
    -
    -// display statistical data in generated images
    -// currently only number of statements drawn
    -define('GRAPHVIZ_STAT', TRUE);
    -
    -// allowed file formats
    -// for security reasons (to prevent code injection)
    -define('GRAPHVIZ_FORMAT', 'svg, dot, jpg, png, gif, vrml');
    -
    -// enable clickable URIs
    -// only supported by certain formats (e.g. SVG)
    -define('GRAPHVIZ_URI', FALSE);
    -
    -// define parameters for the graphical output
    -// if a paramter is undefined, the default value of graphviz is used
    -// for further information see: http://www.graphviz.org/Documentation.php
    -$graphviz_param = array(
    -   GRAPH_STYLE     => 'rankdir="LR"',
    -   RESOURCE_STYLE  => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"',
    -   LITERAL_STYLE   => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"',
    -   PREDICATE_STYLE => 'fontname="Courier",fontsize="10"',
    -   INFERRED_STYLE  => 'style="dotted",fontname="Courier",fontsize="10"',
    -   BLANKNODE_STYLE => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"',
    -   BOX_STYLE       => 'fontname="Courier",fontsize="8",color="#BBBBBB"'
    -);

    -
    -

    Here you may find detailed explanations about the STYLE-paramters. -Or you simply try to carefully change the above given values.
    -The supported file formats can be found here.

    -

     

    - -

    Visualizing Models

    -

    Now we are keen on generating our first graph visualization and here we go:

    - - - - - - -
    -

    -

    -// Include RAP
    -define("RDFAPI_INCLUDE_DIR", "./../api/");
    -include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
    -
    -// Filename of an RDF document
    -$base="example1.rdf";
    -
    -// Create a new MemModel
    -$model = ModelFactory::getDefaultModel();
    -
    -// Load and parse document
    -$model->load($base);
    -
    -// Visualize model
    -header('Content-type: image/gif');
    -$model->visualize('gif');
    -
    -

    -
    -

    As you see above, there is an alias for RDFUtil::visualizeGraph() in the model-class, which makes usage really convenient. Note that the code above will instantly return binary data, so we have to set the correct header for the output file: header('Content-type: image/gif');. If you choose to generate, for example svg, which is a xml-based format, you would need to set the header to header('Content-type: image/svg+xml');.
    -Note: Do not send any headers before. Headers are sent automatically, if there are for example whitespaces before: <?php. To prevent problems with headers, turn on output_buffering in your php.ini or use output-buffering manually.

    - - - -

    This is in fact almost everything you need to know to visualize a model. But we should have a short look at the parameters we can pass to the method:

    - - - - - - - -
    -

    -// Visualize model
    -$model->visualize('gif', FALSE);
    -

    -

    Adding FALSE as second argument will disable the detection of Namespaces and you get fully qualified URIs as you see below:

    - - -

     

    -

    Performance and Alternative Visualization Engines

    -

    The implemented Method in RAP itself can handle very large Models, but visualizing large and/or complex models can take a few minutes, because of the dot-application. The duration depends, as you might assume, on factors like the power of your machine, the size and/or complexity of the model and the chosen output format. I recommend to use XML-based formats like SVG for large models and set an additional header, that forces a 'save as...' window:

    - - - - - - -
    -

    -// Visualize model
    -header('Content-type: image/gif');
    -header('Content-Disposition: attachment; filename=example1.gif');
    -$model->visualize('gif');

    -

    You can also get the original dot-file and pass it for example to the gui-version of Graphviz:

    - - - - - - -
    -

    -// Visualize model
    -header('Content-type: text');
    -$model->visualize('input_dot');

    -

    In future versions there will eventually be integrated support for alternative visualization engines like Tulip. At present you can use the dot-file and import it manually to your preferred visualizer. Most of the visualizers support the dot-format. See: http://directory.google.com/Top/Science/Math/Combinatorics/Software/Graph_Drawing/

    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/vocabularies.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/vocabularies.htm deleted file mode 100755 index 513127ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/doc/tutorial/vocabularies.htm +++ /dev/null @@ -1,202 +0,0 @@ - - -Tutorial: Using Common Vocabularies - - - - - - -

    RDF API for PHP

    -

    Tutorial: Using Common Vocabularies

    -

    This turorial is part of the RAP - Rdf API for PHP documentation.

    -

    RAP provides build-in support for the terms of a range of commonly known vocabularies. With version 0.9.1, RAP directly supports the following 8 vocabularies:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Vocabulary

    Website

    Specification

    RDF

    http://www.w3.org/RDF/

    http://www.w3.org/RDF/#specs

    RDFS

    http://www.w3.org/TR/rdf-schema/

    http://www.w3.org/TR/rdf-schema/

    OWL

    http://www.w3.org/TR/owl-ref/

    http://www.w3.org/TR/owl-ref/

    Dublin Core (DC)

    http://dublincore.org/

    http://dublincore.org/documents/dcmi-terms/
    - http://dublincore.org/documents/dces/

    -

    Friend of a Friend (FOAF)

    http://www.foaf-project.org/

    http://xmlns.com/foaf/0.1/

    RSS

    http://web.resource.org/rss/1.0/

    http://web.resource.org/rss/1.0/spec

    ATOM

    http://semtext.org/atom/index.html

    http://www.atomenabled.org/developers/syndication/atom-format-spec.php

    VCARD

    http://www.w3.org/TR/vcard-rdf

    http://www.w3.org/TR/vcard-rdf#3

    -

    This tutorial describes the usage of terms from these vocabularies within RAP.

    -

    -

    Contents:

    - - - - - - - - - - -
    1.Including the - - - Necessary - - Vocabulary Package
    2.Using the Vocabulary
    -

    -

    1. Including the - - - Necessary - -Vocabulary Package

    -

    In order to use a vocabulary you have to include the - - - corresponding - -vocabulary package. The name of the file which you have to include depends on whether you are working on the RAP model layer model layer or on the RAP resource layer.

    -

    When you want to use FOAF together with a MemModel you have to include:

    - - - -

    include( RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php');

    -

    In case of working with a ResModel you have to include:

    - - - - - - -

    include( RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_RES.php');

    -

    The following table lists all include packages for the different vocabularies:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Vocabulary

    Together with MemModel

    Together with ResModel

    RDF

    vocabulary/RDF_C.phpvocabulary/RDF_RES.php

    RDFS

    vocabulary/RDFS_C.phpvocabulary/RDFS_RES.php

    OWL

    vocabulary/OWL_C.phpvocabulary/OWL_RES.php

    Dublin Core (DC)

    vocabulary/DC_C.phpvocabulary/DC_RES.php

    Friend of a Friend (FOAF)

    vocabulary/FOAF_C.phpvocabulary/FOAF_RES.php

    RSS

    vocabulary/RSS_C.phpvocabulary/RSS_RES.php

    ATOM

    vocabulary/ATOM_C.phpvocabulary/ATOM_RES.php

    VCARD

    vocabulary/VCARD_C.phpvocabulary/VCARD_RES.php
    -

     

    -

    2. Using the Vocabulary

    -

    Now you are able to create resources for vocabulary terms by calling one simple method instead of generating them with $resouce = new Resource('uri'). To create a RDFS- comment for example you have to call:

    - - - - - - -

    $comment = RDFS::COMMENT();

    -

    instead of:

    - - - - - - -

    $comment = new Resource(http://www.w3.org/2000/01/rdf-schema#comment);

    -

    If you included the PACKAGE_VOCABULARY_CLASS package $comment is a Resource with the URI -http://www.w3.org/2000/01/rdf-schema#comment. If you included the PACKAGE_VOCABULARY_RES package $comment is a ResResource with the same URI.

    -

    Normally the method to create a term is named like the term in the vocabulary using upper case. There are some reserved words in PHP like 'class' or 'list' so the methods to create these resources have other identifiers. To generate an OWL Class (http://www.w3.org/2002/07/owl#Class) for example use the method OWL::OWL_CLASS(). To find out how these methods are named have a look at the corresponding vocabulary file.

    -

     

    -

    3. Backward - - - Compatibility

    -

    For backward - - - compatibility - -reasons, we are still supporting RAP 0.8's PACKAGE_VOCABULARY package. Including this package will create MemModel resources for all terms in all vocabularies. This is very memory consuming and should thus be avoided.

    -

    In order to use the old vocabularies you have to include:

    - - - - - - -

    include( RDFAPI_INCLUDE_DIR . PACKAGE_VOCABULARY);

    -

     

    - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.htaccess b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.htaccess deleted file mode 100755 index 9deb5e8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine on -RewriteBase /rdfapi-php/netapi/ -RewriteRule ^[^\.]+$ netapi.php - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/all-wcprops deleted file mode 100755 index 3315da35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/all-wcprops +++ /dev/null @@ -1,89 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 56 -/svnroot/rdfapi-php/!svn/ver/341/trunk/rdfapi-php/netapi -END -fetch.php -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/fetch.php -END -config.inc.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/341/trunk/rdfapi-php/netapi/config.inc.php -END -remove.php -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/remove.php -END -simple.rdf -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/netapi/simple.rdf -END -netapi.php -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/341/trunk/rdfapi-php/netapi/netapi.php -END -spo.php -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/spo.php -END -rdql.php -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/rdql.php -END -sparql.php -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/284/trunk/rdfapi-php/netapi/sparql.php -END -.htaccess -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/.htaccess -END -model1.rdf -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/netapi/model1.rdf -END -employees.rdf -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/employees.rdf -END -apache.htaccess -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/apache.htaccess -END -config.inc -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/config.inc -END -add.php -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/netapi/add.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/entries deleted file mode 100755 index 96b71860..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/entries +++ /dev/null @@ -1,213 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/netapi -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-01-23T14:53:56.000000Z -341 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -fetch.php -file - - - - -2008-02-29T14:57:26.933926Z -59bf52e13e3247ac17e4a29bef15bfe1 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -remove.php -file - - - - -2008-02-29T14:57:26.949547Z -4998e06e3ef6202924862ead8453a7eb -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -spo.php -file - - - - -2008-02-29T14:57:26.965167Z -8e9b917f93a774b88447e66ab40d17bf -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -sparql.php -file - - - - -2008-02-29T14:57:26.980788Z -8fdecc1b2501918853d4aebc13fcfc36 -2006-06-13T07:52:13.000000Z -284 -tgauss -has-props - -rdql.php -file - - - - -2008-02-29T14:57:26.980788Z -7ed35efb940ad335f36a825b54cb9e2b -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -css -dir - -model1.rdf -file - - - - -2008-02-29T14:57:26.996409Z -115ddca97d6c13457e4962a9b456252b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -simple.rdf -file - - - - -2008-02-29T14:57:26.949547Z -db4b47f0438553992753cb37ba7c6ff7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -config.inc.php -file - - - - -2008-02-29T14:57:26.933926Z -862572d3e5c4927accdde4ccf7f629e4 -2007-01-23T14:53:56.000000Z -341 -cweiske -has-props - -netapi.php -file - - - - -2008-02-29T14:57:26.949547Z -511fc83cfa62e1f832c4c82973cf4e8a -2007-01-23T14:53:56.000000Z -341 -cweiske -has-props - -.htaccess -file - - - - -2008-02-29T14:57:26.996409Z -dc7a958552fd7a44172ccf954c0de28f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -employees.rdf -file - - - - -2008-02-29T14:57:26.996409Z -217f5ba4d6ab4b3f95a70068b4cf20b4 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -config.inc -file - - - - -2008-02-29T14:57:27.012029Z -b64e0f813af9566e52359aa52832a528 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -apache.htaccess -file - - - - -2008-02-29T14:57:27.012029Z -91a3f88916e20f56dbb97b42d87b139f -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -add.php -file - - - - -2008-02-29T14:57:27.027650Z -061e41b44d27f5261e6b5186d33ee54d -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/.htaccess.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/.htaccess.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/add.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/add.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/add.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/apache.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/apache.htaccess.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/apache.htaccess.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/config.inc.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/employees.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/employees.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/fetch.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/fetch.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/fetch.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/model1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/model1.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/model1.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/netapi.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/netapi.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/netapi.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/rdql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/rdql.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/rdql.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/remove.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/remove.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/remove.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/simple.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/simple.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/simple.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/sparql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/sparql.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/sparql.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/spo.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/spo.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/prop-base/spo.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/.htaccess.svn-base deleted file mode 100755 index b1016bb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/.htaccess.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine on -RewriteBase /rdfapi-php/netapi/ -RewriteRule ^[^\.]+$ netapi.php - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/add.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/add.php.svn-base deleted file mode 100755 index e31a920f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/add.php.svn-base +++ /dev/null @@ -1,29 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function addStatementsToModel($model,$contenttype,$postdata){ - $p = getParser($contenttype); - $m = $p->parse2model($postdata); - $it = $m->getStatementIterator(); - while ($it->hasNext()){ - $statement = $it->next(); - $model->add($statement); - } - echo "200 - The data has been added to the model."; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/apache.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/apache.htaccess.svn-base deleted file mode 100755 index a40c4b37..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/apache.htaccess.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine on -RewriteBase /rap-netapi/ -RewriteRule ^[^\.]+$ netapi.php - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.php.svn-base deleted file mode 100755 index ce8fc851..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.php.svn-base +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -// ---------------------------------------------------------------------------------- -// General -// ---------------------------------------------------------------------------------- - -// Defines the RAP include dirs -define("RDFAPI_INCLUDE_DIR", "../api/"); -include_once( RDFAPI_INCLUDE_DIR . 'RdfAPI.php'); - -// Include RDQL Package -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RDQL); -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SPARQL); - -// Allows clients to add data to models. -define('NETAPI_ALLOW_ADD',FALSE); -// Allows clients to remove data from models. -define('NETAPI_ALLOW_REMOVE',TRUE); - -// ---------------------------------------------------------------------------------- -// Model Map -// ---------------------------------------------------------------------------------- - -//$modelmap = array( -// "testmodel" => "db:http://sw.phildawes.net/2004/testmodel1", -// "testmodel2" => "db:http://sw.phildawes.net/2004/testmodel2" -// ); - -$modelmap = array( - "testmodel7" => "db:Manifest", - "testmodel" => "db:testmodel", - "testmodel4" => "db:manifest-extra", - "testmodel1" => "db:test1", - ); - - -// ---------------------------------------------------------------------------------- -// Database Configuration -// ---------------------------------------------------------------------------------- - -$NETAPI_DB_DRIVER = 'MySQL'; -$NETAPI_DB_HOST = 'localhost'; -$NETAPI_DB_DB = 'sparql_db'; -$NETAPI_DB_USER = 'testuser'; -$NETAPI_DB_PASS = ''; - -//$NETAPI_DB_DRIVER = 'ODBC'; -//$NETAPI_DB_HOST = 'RDF_DB'; -//$NETAPI_DB_DB = ''; -//$NETAPI_DB_USER = ''; -//$NETAPI_DB_PASS = ''; - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.svn-base deleted file mode 100755 index 4fdf3823..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/config.inc.svn-base +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -// ---------------------------------------------------------------------------------- -// General -// ---------------------------------------------------------------------------------- - -// Defines the RAP include dirs -define("RDFAPI_INCLUDE_DIR", "../api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - -// Include RDQL Package -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RDQL); -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SPARQL); - -// Allows clients to add data to models. -define('NETAPI_ALLOW_ADD',FALSE); -// Allows clients to remove data from models. -define('NETAPI_ALLOW_REMOVE',TRUE); - -// ---------------------------------------------------------------------------------- -// Model Map -// ---------------------------------------------------------------------------------- - -//$modelmap = array( -// "testmodel" => "db:http://sw.phildawes.net/2004/testmodel1", -// "testmodel2" => "db:http://sw.phildawes.net/2004/testmodel2" -// ); - -$modelmap = array( - "testmodel7" => "db:Manifest", - "testmodel" => "db:testmodel", - "testmodel4" => "db:manifest-extra", - "testmodel1" => "db:test1", - ); - - -// ---------------------------------------------------------------------------------- -// Database Configuration -// ---------------------------------------------------------------------------------- - -$NETAPI_DB_DRIVER = 'MySQL'; -$NETAPI_DB_HOST = 'localhost'; -$NETAPI_DB_DB = 'sparql_db'; -$NETAPI_DB_USER = 'testuser'; -$NETAPI_DB_PASS = ''; - -//$NETAPI_DB_DRIVER = 'ODBC'; -//$NETAPI_DB_HOST = 'RDF_DB'; -//$NETAPI_DB_DB = ''; -//$NETAPI_DB_USER = ''; -//$NETAPI_DB_PASS = ''; - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/employees.rdf.svn-base deleted file mode 100755 index df87ce75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/employees.rdf.svn-base +++ /dev/null @@ -1,76 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/fetch.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/fetch.php.svn-base deleted file mode 100755 index 00e97cbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/fetch.php.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function fetch($model,$serializer){ - $uri = $_REQUEST['r']; - - $urir = new Resource($uri); - - $outm = new MemModel(); - - getBNodeClosure($urir, $model, $outm); - - echo $serializer->Serialize($outm); - - $outm->close(); -} - -function getBNodeClosure($res,$sourcem, &$outm) { - $resourcem = $sourcem->find($res,NULL,NULL); - $it = $resourcem->getStatementIterator(); - while ($it->hasNext()){ - $stmt = $it->next(); - $outm->add(new Statement($res,$stmt->predicate(), $stmt->object())); - if (is_a($stmt->object(),'BlankNode')){ - getBNodeClosure($stmt->object(),$sourcem,$outm); - } - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/model1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/model1.rdf.svn-base deleted file mode 100755 index 27c3777c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/model1.rdf.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - English - RAP tutorial - Radoslaw Oldakowski - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/netapi.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/netapi.php.svn-base deleted file mode 100755 index f95a02f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/netapi.php.svn-base +++ /dev/null @@ -1,278 +0,0 @@ - - * @author Chris Bizer - * - * @package netapi - * @todo nothing - * @access public - */ - -include_once 'config.inc.php'; -include_once 'fetch.php'; -include_once 'rdql.php'; -include_once 'spo.php'; -include_once 'remove.php'; -include_once 'add.php'; -include_once 'sparql.php'; - -// getallheaders replacement -if(!function_exists('getallheaders')) -{ - function getallheaders() - { - if(isset($_SERVER['ALL_HTTP'])) - { - if( $pos = strpos($this->incoming_payload,"\r\n") ){ - $lb = "\r\n"; - } elseif( $pos = strpos($this->incoming_payload,"\n\n") ){ - $lb = "\n"; - } - // detected - if( isset($lb) ){ - $header_array = explode($lb,$_SERVER['ALL_HTTP']); - // clean headers - if(is_array($header_array)){ - foreach($header_array as $header_line){ - $arr = explode(':',$header_line); - if(count($arr) >= 2){ - $headers[trim($arr[0])] = trim($arr[1]); - } - } - } - } - } - // grab what headers we can from $_SERVER - else - { - foreach($_SERVER as $k => $v) - { - if(strstr($k,'HTTP_')) - { - $key = str_replace('_','-',str_replace('HTTP_','',$k)); - $key = ucfirst(strtolower($key)); - for($i = 0; $i < strlen($key); $i++) - { - if($dash) - { - $key[$i] = strtoupper($key[$i]); - } - $dash = ($key[$i] == '-') ? true : false; - } - $headers[$key] = $v; - } - } - } - return isset($headers) ? $headers : array(); - } -} - -/** - * NetAPI Main - * - * 1. Gets the query string from the Webserver. - * 2. Connects to the database or loads the RDF file - * 3. Calls the appropriate query or update function. - */ - -// apache mod_rewrite support -if(isset($_SERVER['REDIRECT_URL'])) -{ - // Extract model name from uri and map it to model URI - preg_match("/\/([^\/]+)$/",$_SERVER['REDIRECT_URL'],$matches); - - $model = $matches[1]; -} -// iis custom 404 support -elseif(strstr($_SERVER['QUERY_STRING'],'404') || strstr($_SERVER['QUERY_STRING'],'405')) -{ - // get all from last slash - $model = substr($_SERVER['QUERY_STRING'], strrpos($_SERVER['QUERY_STRING'],'/')+1, strlen($_SERVER['QUERY_STRING'])); - - // if there are GET params - if(strstr($model,'?')) - { - // strip params of model - $model = substr($model, 0, strpos($model,'?')); - // fix request params - foreach($_GET as $k => $v) - { - if(ereg('^(404|405)',$k)) - { - $k = substr($k, strpos($k,'?')+1); - $_GET[$k] = $v; - $_REQUEST[$k] = $v; - } - } - } - // else, remove IIS redirect query string - else - { - $_SERVER['QUERY_STRING'] = ''; - } -} - -if ($model == NULL){ - // Didn't get modelID from URL rewriting - header('HTTP/1.0 500 Internal Server Error'); - echo "500 - Didn't get modelURI from URL rewriting.\n"; - return; -} - -$modelId = $modelmap[$model]; - -if ($modelId == NULL){ - // Didn't get modelID from URL rewriting - header('HTTP/1.0 404 Not Found'); - echo "404 - Model ".$model." not found"; - return; -} elseif (substr($modelId,0,3)=="db:") { - // Database backed model - $modelURI = substr($modelId,3); - $database = new DbStore($NETAPI_DB_DRIVER, $NETAPI_DB_HOST, $NETAPI_DB_DB, $NETAPI_DB_USER, $NETAPI_DB_PASS); - - - $type = 'model'; - if ($database->modelExists($modelURI) == False) { - $type = 'dataset'; - if($database->datasetExists($modelURI)== False){ - // Model not found in the database - header('HTTP/1.0 404 Not Found'); - echo "404 - Model ".$model." not found\n"; - return; - } - } - if($type == 'model') - $model1 = $database->getModel($modelURI); - else - $model1 = $database->getDatasetDb($modelURI); -} elseif (substr($modelId,0,5)=="file:") { - // File backed model - $modelURI = substr($modelId,5); - $model1 = new MemModel(); - $model1->load($modelURI); -} else { - // Undefined repository type - header('HTTP/1.0 500 Internal Server Error'); - echo "500 - I don't understand ".$modelId; -} - -// Process query or update operation -if ($_SERVER['QUERY_STRING'] != ''){ - - $headers = getallheaders(); - - if (isset($_REQUEST['op'])) { - $op = $_REQUEST['op']; - if ($op == "add"){ - // Add Operation - if (NETAPI_ALLOW_ADD == True) { - addStatementsToModel($model1,$headers['Content-Type'],$HTTP_RAW_POST_DATA); - } else { - // Add not allowed - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The add method is not allowed for model ".$model."\n"; - } - return; - } elseif ($op == "remove"){ - // Remove Operation - if (NETAPI_ALLOW_REMOVE == True) { - removeFromModel($model1,$headers['Content-Type'],$HTTP_RAW_POST_DATA); - } else { - // Remove not allowed - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The remove method is not allowed for model ".$model."\n"; - } - return; - } else { - // Undefined Operation - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The ".$op." method is unknown\n"; - } - } else { - // Query Operation - $lang = 'SPARQL'; - if(isset($_REQUEST['lang'])) - $lang = $_REQUEST['lang']; - if(strtoupper($lang) == "FETCH" or $lang == "http://jena.hpl.hp.com/2003/07/query/fetch"){ - // Fetch Query - $s = getSerializerAndSetContentType(); - fetch($model1,$s); - return; - } elseif (strtoupper($lang) == "RDQL" or $lang == "http://jena.hpl.hp.com/2003/07/query/RDQL"){ - // RDQL Query - $s = getSerializerAndSetContentType(); - rdql($model1,$s); - return; - } elseif (strtoupper($lang) == "SPARQL"){ - // SPARQL Query - $s = getSerializerAndSetContentType(); - sparql($model1,$s); - return; - } elseif (strtoupper($lang) == "SPO" or $lang == "http://jena.hpl.hp.com/2003/07/query/SPO"){ - // SPO Query - $s = getSerializerAndSetContentType(); - spoQuery($model1,$s); - return; - } elseif (strtoupper($lang) == "REMOVESPO"){ - // SPO Query - $modelId = $modelmap[$model]; - spoQuery($model1,$s=false,true,$modelId); - return; - } - } -} else { - // Return the whole model, because no query string or operation ha been given - $s = getSerializerAndSetContentType(); - if (is_a($model1, 'MemModel')) { - echo $s->Serialize($model1); - } else { - echo $s->Serialize($model1->getMemModel()); - } -} - - -/** - * Creates the appropriate RDF serializer depending on the requested content type. - * - * @access private - */ -function getSerializerAndSetContentType() { - if (substr_count($_SERVER['HTTP_ACCEPT'],"application/n-triples") != 0){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new NTripleSerializer(); - header('Content-type: application/n-triples'); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"application/n3")!= 0){ - header('Content-type: application/n3'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new N3Serializer(); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"application/rdf+xml") != 0){ - header('Content-type: application/rdf+xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"text/xml") != 0){ - header('Content-type: text/xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } else { - header('Content-type: text/xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } - return $s; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/rdql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/rdql.php.svn-base deleted file mode 100755 index cc5ff6f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/rdql.php.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function rdql($model,$serializer){ - - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $query = $_REQUEST["query"]; - // php appears to escape quotes, so unescape them - $query = str_replace('\"','"',$query); - $query = str_replace("\'","'",$query); - // decode %xx - $query =rawurldecode($query); - - /// debug - //var_dump($query); - - $r = new RdqlParser(); - $parsedq = $r->parseQuery($query); - addMissingSelectVarsToQuery($parsedq); - - if (is_a($model, 'MemModel')) { - $eng = new RdqlMemEngine(); - } else { - $eng = new RdqlDbEngine(); - } - $rdqlres = $eng->queryModel($model,$parsedq,TRUE); - $rdqlIter = new RdqlResultIterator($rdqlres); - - $outm = new MemModel(); - while ($rdqlIter->hasNext()) { - $result=$rdqlIter->next(); - generateResultStatementsFromVarResult($result,$parsedq,$outm,$closure,$model); - } - - echo $serializer->Serialize($outm); - - $outm->close(); - -} - - -// -// What about bNodes? The bNode closure should also be added. -// - -function generateResultStatementsFromVarResult(&$result,$parsedq, &$outm,$closure, &$model){ - foreach ($parsedq['patterns'] as $n => $pattern) { - - if (substr($pattern['subject']['value'], 0, 1) == '?') - $subj = $result[$pattern['subject']['value']]; - else - $subj = new Resource($pattern['subject']['value']); - - if (substr($pattern['predicate']['value'], 0, 1) == '?') - $pred = $result[$pattern['predicate']['value']]; - else - $pred = new Resource($pattern['predicate']['value']); - - if (substr($pattern['object']['value'], 0, 1) == '?') - $obj = $result[$pattern['object']['value']]; - else { - if ($pattern['object']['is_literal']){ - $obj = new Literal($pattern['object']['value']); - $obj->setDatatype($pattern['object']['l_dtype']); - $obj->setLanguage($pattern['object']['l_lang']); - } else { - $obj = new Resource($pattern['object']['value']); - } - } - - $stmt = new Statement($subj,$pred,$obj); - - // bNode closure - if (is_a($stmt->object(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->object(),$model,$outm); - } - if (is_a($stmt->subject(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->subject(),$model,$outm); - } - // Add statement to model - $outm->add($stmt); - } -} - -// If there are variables used in the pattern but not -// in the select clause, add them to the select clause -function addMissingSelectVarsToQuery(&$parsedq){ - foreach ($parsedq['patterns'] as $n => $pattern) { - foreach ($pattern as $key => $val_1) - if ($val_1['value']{0}=='?') { - if (!in_array($val_1['value'],$parsedq['selectVars'])){ - array_push($parsedq['selectVars'],$val_1['value']); - } - } - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/remove.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/remove.php.svn-base deleted file mode 100755 index ab8b292c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/remove.php.svn-base +++ /dev/null @@ -1,45 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function removeFromModel($model,$contenttype,$postdata){ - $p = getParser($contenttype); - $m = $p->parse2model($postdata); - $it = $m->getStatementIterator(); - while ($it->hasNext()){ - $statement = $it->next(); - $model->remove($statement); - } - echo "200 - The data has been removed from the model."; -} - -function getParser($contenttype){ - if ($contenttype == "application/n-triples"){ - $p = new N3Parser(); - } elseif ($contenttype == "application/n3"){ - $p = new N3Parser(); - } elseif ($contenttype == "application/rdf+xml"){ - $p = new RdfParser(); - } else { - header('HTTP/1.0 415 Unsupported Media Type'); - die("415 - I don't understand content type. Accepted content types are application/n-triples, application/n3, application/rdf+xml."); - } - - return $p; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/simple.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/simple.rdf.svn-base deleted file mode 100755 index de15b596..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/simple.rdf.svn-base +++ /dev/null @@ -1,10 +0,0 @@ - - - - Eric Miller - - Dr. - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/sparql.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/sparql.php.svn-base deleted file mode 100755 index 8b5cf9a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/sparql.php.svn-base +++ /dev/null @@ -1,50 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function sparql($model,$serializer){ - - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $query = $_REQUEST["query"]; - // php appears to escape quotes, so unescape them - $query = str_replace('\"','"',$query); - $query = str_replace("\'","'",$query); - // decode %xx - $query =rawurldecode($query); - - $result = $model->sparqlQuery($query,'xml'); - if($result instanceof MemModel) - echo $serializer->Serialize($result); - else - echo $result; - - -} - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/spo.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/spo.php.svn-base deleted file mode 100755 index 5643d906..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/.svn/text-base/spo.php.svn-base +++ /dev/null @@ -1,93 +0,0 @@ - - * @author Phil Dawes - * - * @package netapi - * @todo Support typed literals. - * @access public - */ - -function spoQuery($model,$serializer,$remove=false,$modelId=false){ - - // Get SPO query from HTTP request - if (isset($_REQUEST['s'])) { - $subject = new Resource($_REQUEST['s']); - } else { - $subject = NULL; - } - if (isset($_REQUEST['p'])) { - $predicate = new Resource($_REQUEST['p']); - } else { - $predicate = NULL; - } - if (isset($_REQUEST['o'])) { - $object = new Resource($_REQUEST['o']); - } else if (isset($_REQUEST['v'])) { - $object = new Literal($_REQUEST['v']); - } else { - $object = NULL; - } - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $outm = new MemModel(); - $resultmodel = $model->find($subject, $predicate, $object); - $it = $resultmodel->getStatementIterator(); - while ($it->hasNext()){ - $stmt = $it->next(); - if($remove) - { - $model->remove($stmt); - - } - else - { - $outm->add(new Statement($stmt->subject(),$stmt->predicate(), $stmt->object())); - if (is_a($stmt->object(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->object(),$model,$outm); - } - if (is_a($stmt->subject(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->subject(),$model,$outm); - } - } - } - if($remove) - { - - if(substr($modelId,0,5)=="file:"){ - $model->saveAs(substr($modelId,5)); - } - if($resultmodel->size()>0){ - header('200 - OK'); - echo "200 - OK"; - }else{ - echo "No matching statements"; - } - } - else - { - echo $serializer->Serialize($outm); - } - $outm->close(); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/add.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/add.php deleted file mode 100755 index ff2ac28c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/add.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function addStatementsToModel($model,$contenttype,$postdata){ - $p = getParser($contenttype); - $m = $p->parse2model($postdata); - $it = $m->getStatementIterator(); - while ($it->hasNext()){ - $statement = $it->next(); - $model->add($statement); - } - echo "200 - The data has been added to the model."; -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/apache.htaccess b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/apache.htaccess deleted file mode 100755 index 25fba611..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/apache.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine on -RewriteBase /rap-netapi/ -RewriteRule ^[^\.]+$ netapi.php - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc deleted file mode 100755 index 955972d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -// ---------------------------------------------------------------------------------- -// General -// ---------------------------------------------------------------------------------- - -// Defines the RAP include dirs -define("RDFAPI_INCLUDE_DIR", "../api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - -// Include RDQL Package -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RDQL); -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SPARQL); - -// Allows clients to add data to models. -define('NETAPI_ALLOW_ADD',FALSE); -// Allows clients to remove data from models. -define('NETAPI_ALLOW_REMOVE',TRUE); - -// ---------------------------------------------------------------------------------- -// Model Map -// ---------------------------------------------------------------------------------- - -//$modelmap = array( -// "testmodel" => "db:http://sw.phildawes.net/2004/testmodel1", -// "testmodel2" => "db:http://sw.phildawes.net/2004/testmodel2" -// ); - -$modelmap = array( - "testmodel7" => "db:Manifest", - "testmodel" => "db:testmodel", - "testmodel4" => "db:manifest-extra", - "testmodel1" => "db:test1", - ); - - -// ---------------------------------------------------------------------------------- -// Database Configuration -// ---------------------------------------------------------------------------------- - -$NETAPI_DB_DRIVER = 'MySQL'; -$NETAPI_DB_HOST = 'localhost'; -$NETAPI_DB_DB = 'sparql_db'; -$NETAPI_DB_USER = 'testuser'; -$NETAPI_DB_PASS = ''; - -//$NETAPI_DB_DRIVER = 'ODBC'; -//$NETAPI_DB_HOST = 'RDF_DB'; -//$NETAPI_DB_DB = ''; -//$NETAPI_DB_USER = ''; -//$NETAPI_DB_PASS = ''; - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc.php deleted file mode 100755 index 467f9325..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/config.inc.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -// ---------------------------------------------------------------------------------- -// General -// ---------------------------------------------------------------------------------- - -// Defines the RAP include dirs -define("RDFAPI_INCLUDE_DIR", "../api/"); -include_once( RDFAPI_INCLUDE_DIR . 'RdfAPI.php'); - -// Include RDQL Package -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RDQL); -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SPARQL); - -// Allows clients to add data to models. -define('NETAPI_ALLOW_ADD',FALSE); -// Allows clients to remove data from models. -define('NETAPI_ALLOW_REMOVE',TRUE); - -// ---------------------------------------------------------------------------------- -// Model Map -// ---------------------------------------------------------------------------------- - -//$modelmap = array( -// "testmodel" => "db:http://sw.phildawes.net/2004/testmodel1", -// "testmodel2" => "db:http://sw.phildawes.net/2004/testmodel2" -// ); - -$modelmap = array( - "testmodel7" => "db:Manifest", - "testmodel" => "db:testmodel", - "testmodel4" => "db:manifest-extra", - "testmodel1" => "db:test1", - ); - - -// ---------------------------------------------------------------------------------- -// Database Configuration -// ---------------------------------------------------------------------------------- - -$NETAPI_DB_DRIVER = 'MySQL'; -$NETAPI_DB_HOST = 'localhost'; -$NETAPI_DB_DB = 'sparql_db'; -$NETAPI_DB_USER = 'testuser'; -$NETAPI_DB_PASS = ''; - -//$NETAPI_DB_DRIVER = 'ODBC'; -//$NETAPI_DB_HOST = 'RDF_DB'; -//$NETAPI_DB_DB = ''; -//$NETAPI_DB_USER = ''; -//$NETAPI_DB_PASS = ''; - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/all-wcprops deleted file mode 100755 index 8952f6a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 60 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/css -END -style_new.css -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/css/style_new.css -END -kb.css -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/netapi/css/kb.css -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/entries deleted file mode 100755 index c3513e67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/entries +++ /dev/null @@ -1,54 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/netapi/css -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2005-07-07T18:03:06.000000Z -240 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -style_new.css -file - - - - -2008-02-29T14:57:26.808961Z -d49a14dfd60ad95347aef5a4750c5030 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -kb.css -file - - - - -2008-02-29T14:57:26.824582Z -d60b2bd31d7836f2250b576d69722302 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/kb.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/kb.css.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/kb.css.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/style_new.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/style_new.css.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/prop-base/style_new.css.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/kb.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/kb.css.svn-base deleted file mode 100755 index c35f1c50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/kb.css.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -#main { - padding-top: 1em; - padding-left: 1em; - width: 80%; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/style_new.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/style_new.css.svn-base deleted file mode 100755 index 8b6f434a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/.svn/text-base/style_new.css.svn-base +++ /dev/null @@ -1,373 +0,0 @@ -BODY { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -INPUT { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -SELECT { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -TD { - - FONT-SIZE: 8pt - -} - -P { - - FONT-SIZE: 8pt - -} - -UL { - - FONT-SIZE: 8pt - -} - -LI { - - FONT-SIZE: 8pt - -} - -H1 { - - FONT-SIZE: 12pt - -} - -H2 { - - FONT-SIZE: 10pt - -} - -H3 { - - FONT-SIZE: 8pt - -} - -H4 { - - FONT-SIZE: 8pt - -} - -INPUT { - - FONT-SIZE: 8pt - -} - -H1 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H2 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H3 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H4 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -UL LI.green { - - LIST-STYLE-IMAGE: url(../i/greenbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI.amber { - - LIST-STYLE-IMAGE: url(../i/amberbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI.red { - - LIST-STYLE-IMAGE: url(../i/redbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI { - - LIST-STYLE-IMAGE: url(../i/orangespot.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -OL LI { - - MARGIN-BOTTOM: 12px; MARGIN-LEFT: -16px - -} - -HR { - - COLOR: #ff9933; HEIGHT: 1px - -} - -form - -{ - - PADDING-RIGHT: 10px; - - PADDING-LEFT: 10px; - - PADDING-BOTTOM: 10px; - - MARGIN: 10px - -} - -INPUT { - - BACKGROUND-COLOR: #f0f0f0 - -} - -A:link { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:visited { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:active { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:hover { - - COLOR: #800000; TEXT-DECORATION: none - -} - -A.nav { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:visited { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:active { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:hover { - - COLOR: #000000; TEXT-DECORATION: underline - -} - -TD.left7px { - - PADDING-LEFT: 7px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0f0 1px solid - -} - -.pseudo-hyperlink { - - PADDING-LEFT: 7px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0f0 1px solid - -} - -.pseudo-hyperlink { - - FONT-WEIGHT: bold; COLOR: #666666 - -} - -TD.box { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -TD.boxcentre { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -.about { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -TD.boxcentre { - - BORDER-BOTTOM: #cccccc 1px solid; TEXT-ALIGN: center - -} - -TD.boxsearch { - - PADDING-BOTTOM: 5px; PADDING-TOP: 5px; BACKGROUND-COLOR: #9c9a9c - -} - -.CCCCCC { - - BACKGROUND-COLOR: #cccccc - -} - -.menutitle { - - BACKGROUND-COLOR: #cccccc - -} - -.f0f0f0 { - - BACKGROUND-COLOR: #f0f0f0 - -} - -.menutitle { - - BORDER-TOP: #666666 1px solid; PADDING-LEFT: 7px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; COLOR: #f0f0f0; PADDING-TOP: 0px; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: #999999 - -} - -.greyline { - - BACKGROUND-COLOR: #999999 - -} - -.spaced { - - PADDING-TOP: 6px - -} - -.righthandmenu { - - BORDER-RIGHT: #9c9c9c 1px solid; BORDER-TOP: #9c9c9c 1px solid; BORDER-LEFT: #9c9c9c 1px solid; BORDER-BOTTOM: #9c9c9c 1px solid; BACKGROUND-COLOR: #f0f0f0 - -} - -.lefthandmenu { - - BORDER-RIGHT: #9c9c9c 1px solid - -} - -.main { - - - -} - -.sectiontitle { - - FONT-WEIGHT: bold; COLOR: #f0f0f0; BACKGROUND-COLOR: #999999 - -} - -TD.odd { - - BACKGROUND-COLOR: #d6d6d6 - -} - -TD.oddborder { - - BACKGROUND-COLOR: #d6d6d6 - -} - -TD.even { - - BACKGROUND-COLOR: #ffffff - -} - -TD.evenborder { - - BACKGROUND-COLOR: #ffffff - -} - -TD.odd { - - PADDING-BOTTOM: 4px; PADDING-TOP: 8px - -} - -TD.even { - - PADDING-BOTTOM: 4px; PADDING-TOP: 8px - -} - -TD.oddborder { - - BORDER-TOP: #666666 1px solid - -} - -TD.evenborder { - - BORDER-TOP: #666666 1px solid - -} - -TD.tableheading { - - BORDER-TOP: #000000 1px solid; FONT-WEIGHT: bold; BACKGROUND-COLOR: #999999 - -} - -.logo { - - background-color: #ffffff; - - line-height: 16px; - - vertical-align: top; - - padding-top: 6px; - -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/kb.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/kb.css deleted file mode 100755 index 3733649c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/kb.css +++ /dev/null @@ -1,5 +0,0 @@ -#main { - padding-top: 1em; - padding-left: 1em; - width: 80%; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/style_new.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/style_new.css deleted file mode 100755 index 9d839c12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/css/style_new.css +++ /dev/null @@ -1,373 +0,0 @@ -BODY { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -INPUT { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -SELECT { - - FONT-FAMILY: Verdana, Helvetica, sans-serif; BACKGROUND-COLOR: #ffffff - -} - -TD { - - FONT-SIZE: 8pt - -} - -P { - - FONT-SIZE: 8pt - -} - -UL { - - FONT-SIZE: 8pt - -} - -LI { - - FONT-SIZE: 8pt - -} - -H1 { - - FONT-SIZE: 12pt - -} - -H2 { - - FONT-SIZE: 10pt - -} - -H3 { - - FONT-SIZE: 8pt - -} - -H4 { - - FONT-SIZE: 8pt - -} - -INPUT { - - FONT-SIZE: 8pt - -} - -H1 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H2 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H3 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -H4 { - - FONT-WEIGHT: bold; COLOR: #000000 - -} - -UL LI.green { - - LIST-STYLE-IMAGE: url(../i/greenbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI.amber { - - LIST-STYLE-IMAGE: url(../i/amberbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI.red { - - LIST-STYLE-IMAGE: url(../i/redbullet.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -UL LI { - - LIST-STYLE-IMAGE: url(../i/orangespot.gif); MARGIN-BOTTOM: 12px; MARGIN-LEFT: -20px - -} - -OL LI { - - MARGIN-BOTTOM: 12px; MARGIN-LEFT: -16px - -} - -HR { - - COLOR: #ff9933; HEIGHT: 1px - -} - -form - -{ - - PADDING-RIGHT: 10px; - - PADDING-LEFT: 10px; - - PADDING-BOTTOM: 10px; - - MARGIN: 10px - -} - -INPUT { - - BACKGROUND-COLOR: #f0f0f0 - -} - -A:link { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:visited { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:active { - - COLOR: #666666; TEXT-DECORATION: none - -} - -A:hover { - - COLOR: #800000; TEXT-DECORATION: none - -} - -A.nav { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:visited { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:active { - - FONT-SIZE: 8pt; COLOR: #ffffff; TEXT-DECORATION: none - -} - -A.nav:hover { - - COLOR: #000000; TEXT-DECORATION: underline - -} - -TD.left7px { - - PADDING-LEFT: 7px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0f0 1px solid - -} - -.pseudo-hyperlink { - - PADDING-LEFT: 7px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0f0 1px solid - -} - -.pseudo-hyperlink { - - FONT-WEIGHT: bold; COLOR: #666666 - -} - -TD.box { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -TD.boxcentre { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -.about { - - PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 7pt; PADDING-BOTTOM: 2px; COLOR: #000000; LINE-HEIGHT: 120%; PADDING-TOP: 2px - -} - -TD.boxcentre { - - BORDER-BOTTOM: #cccccc 1px solid; TEXT-ALIGN: center - -} - -TD.boxsearch { - - PADDING-BOTTOM: 5px; PADDING-TOP: 5px; BACKGROUND-COLOR: #9c9a9c - -} - -.CCCCCC { - - BACKGROUND-COLOR: #cccccc - -} - -.menutitle { - - BACKGROUND-COLOR: #cccccc - -} - -.f0f0f0 { - - BACKGROUND-COLOR: #f0f0f0 - -} - -.menutitle { - - BORDER-TOP: #666666 1px solid; PADDING-LEFT: 7px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; COLOR: #f0f0f0; PADDING-TOP: 0px; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: #999999 - -} - -.greyline { - - BACKGROUND-COLOR: #999999 - -} - -.spaced { - - PADDING-TOP: 6px - -} - -.righthandmenu { - - BORDER-RIGHT: #9c9c9c 1px solid; BORDER-TOP: #9c9c9c 1px solid; BORDER-LEFT: #9c9c9c 1px solid; BORDER-BOTTOM: #9c9c9c 1px solid; BACKGROUND-COLOR: #f0f0f0 - -} - -.lefthandmenu { - - BORDER-RIGHT: #9c9c9c 1px solid - -} - -.main { - - - -} - -.sectiontitle { - - FONT-WEIGHT: bold; COLOR: #f0f0f0; BACKGROUND-COLOR: #999999 - -} - -TD.odd { - - BACKGROUND-COLOR: #d6d6d6 - -} - -TD.oddborder { - - BACKGROUND-COLOR: #d6d6d6 - -} - -TD.even { - - BACKGROUND-COLOR: #ffffff - -} - -TD.evenborder { - - BACKGROUND-COLOR: #ffffff - -} - -TD.odd { - - PADDING-BOTTOM: 4px; PADDING-TOP: 8px - -} - -TD.even { - - PADDING-BOTTOM: 4px; PADDING-TOP: 8px - -} - -TD.oddborder { - - BORDER-TOP: #666666 1px solid - -} - -TD.evenborder { - - BORDER-TOP: #666666 1px solid - -} - -TD.tableheading { - - BORDER-TOP: #000000 1px solid; FONT-WEIGHT: bold; BACKGROUND-COLOR: #999999 - -} - -.logo { - - background-color: #ffffff; - - line-height: 16px; - - vertical-align: top; - - padding-top: 6px; - -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/employees.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/employees.rdf deleted file mode 100755 index aae71a75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/employees.rdf +++ /dev/null @@ -1,76 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/fetch.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/fetch.php deleted file mode 100755 index 510995e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/fetch.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function fetch($model,$serializer){ - $uri = $_REQUEST['r']; - - $urir = new Resource($uri); - - $outm = new MemModel(); - - getBNodeClosure($urir, $model, $outm); - - echo $serializer->Serialize($outm); - - $outm->close(); -} - -function getBNodeClosure($res,$sourcem, &$outm) { - $resourcem = $sourcem->find($res,NULL,NULL); - $it = $resourcem->getStatementIterator(); - while ($it->hasNext()){ - $stmt = $it->next(); - $outm->add(new Statement($res,$stmt->predicate(), $stmt->object())); - if (is_a($stmt->object(),'BlankNode')){ - getBNodeClosure($stmt->object(),$sourcem,$outm); - } - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/model1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/model1.rdf deleted file mode 100755 index 6d70ef2f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/model1.rdf +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - English - RAP tutorial - Radoslaw Oldakowski - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/netapi.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/netapi.php deleted file mode 100755 index e38bb799..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/netapi.php +++ /dev/null @@ -1,278 +0,0 @@ - - * @author Chris Bizer - * - * @package netapi - * @todo nothing - * @access public - */ - -include_once 'config.inc.php'; -include_once 'fetch.php'; -include_once 'rdql.php'; -include_once 'spo.php'; -include_once 'remove.php'; -include_once 'add.php'; -include_once 'sparql.php'; - -// getallheaders replacement -if(!function_exists('getallheaders')) -{ - function getallheaders() - { - if(isset($_SERVER['ALL_HTTP'])) - { - if( $pos = strpos($this->incoming_payload,"\r\n") ){ - $lb = "\r\n"; - } elseif( $pos = strpos($this->incoming_payload,"\n\n") ){ - $lb = "\n"; - } - // detected - if( isset($lb) ){ - $header_array = explode($lb,$_SERVER['ALL_HTTP']); - // clean headers - if(is_array($header_array)){ - foreach($header_array as $header_line){ - $arr = explode(':',$header_line); - if(count($arr) >= 2){ - $headers[trim($arr[0])] = trim($arr[1]); - } - } - } - } - } - // grab what headers we can from $_SERVER - else - { - foreach($_SERVER as $k => $v) - { - if(strstr($k,'HTTP_')) - { - $key = str_replace('_','-',str_replace('HTTP_','',$k)); - $key = ucfirst(strtolower($key)); - for($i = 0; $i < strlen($key); $i++) - { - if($dash) - { - $key[$i] = strtoupper($key[$i]); - } - $dash = ($key[$i] == '-') ? true : false; - } - $headers[$key] = $v; - } - } - } - return isset($headers) ? $headers : array(); - } -} - -/** - * NetAPI Main - * - * 1. Gets the query string from the Webserver. - * 2. Connects to the database or loads the RDF file - * 3. Calls the appropriate query or update function. - */ - -// apache mod_rewrite support -if(isset($_SERVER['REDIRECT_URL'])) -{ - // Extract model name from uri and map it to model URI - preg_match("/\/([^\/]+)$/",$_SERVER['REDIRECT_URL'],$matches); - - $model = $matches[1]; -} -// iis custom 404 support -elseif(strstr($_SERVER['QUERY_STRING'],'404') || strstr($_SERVER['QUERY_STRING'],'405')) -{ - // get all from last slash - $model = substr($_SERVER['QUERY_STRING'], strrpos($_SERVER['QUERY_STRING'],'/')+1, strlen($_SERVER['QUERY_STRING'])); - - // if there are GET params - if(strstr($model,'?')) - { - // strip params of model - $model = substr($model, 0, strpos($model,'?')); - // fix request params - foreach($_GET as $k => $v) - { - if(ereg('^(404|405)',$k)) - { - $k = substr($k, strpos($k,'?')+1); - $_GET[$k] = $v; - $_REQUEST[$k] = $v; - } - } - } - // else, remove IIS redirect query string - else - { - $_SERVER['QUERY_STRING'] = ''; - } -} - -if ($model == NULL){ - // Didn't get modelID from URL rewriting - header('HTTP/1.0 500 Internal Server Error'); - echo "500 - Didn't get modelURI from URL rewriting.\n"; - return; -} - -$modelId = $modelmap[$model]; - -if ($modelId == NULL){ - // Didn't get modelID from URL rewriting - header('HTTP/1.0 404 Not Found'); - echo "404 - Model ".$model." not found"; - return; -} elseif (substr($modelId,0,3)=="db:") { - // Database backed model - $modelURI = substr($modelId,3); - $database = new DbStore($NETAPI_DB_DRIVER, $NETAPI_DB_HOST, $NETAPI_DB_DB, $NETAPI_DB_USER, $NETAPI_DB_PASS); - - - $type = 'model'; - if ($database->modelExists($modelURI) == False) { - $type = 'dataset'; - if($database->datasetExists($modelURI)== False){ - // Model not found in the database - header('HTTP/1.0 404 Not Found'); - echo "404 - Model ".$model." not found\n"; - return; - } - } - if($type == 'model') - $model1 = $database->getModel($modelURI); - else - $model1 = $database->getDatasetDb($modelURI); -} elseif (substr($modelId,0,5)=="file:") { - // File backed model - $modelURI = substr($modelId,5); - $model1 = new MemModel(); - $model1->load($modelURI); -} else { - // Undefined repository type - header('HTTP/1.0 500 Internal Server Error'); - echo "500 - I don't understand ".$modelId; -} - -// Process query or update operation -if ($_SERVER['QUERY_STRING'] != ''){ - - $headers = getallheaders(); - - if (isset($_REQUEST['op'])) { - $op = $_REQUEST['op']; - if ($op == "add"){ - // Add Operation - if (NETAPI_ALLOW_ADD == True) { - addStatementsToModel($model1,$headers['Content-Type'],$HTTP_RAW_POST_DATA); - } else { - // Add not allowed - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The add method is not allowed for model ".$model."\n"; - } - return; - } elseif ($op == "remove"){ - // Remove Operation - if (NETAPI_ALLOW_REMOVE == True) { - removeFromModel($model1,$headers['Content-Type'],$HTTP_RAW_POST_DATA); - } else { - // Remove not allowed - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The remove method is not allowed for model ".$model."\n"; - } - return; - } else { - // Undefined Operation - header('HTTP/1.0 405 Method Not Allowed'); - echo "405 - The ".$op." method is unknown\n"; - } - } else { - // Query Operation - $lang = 'SPARQL'; - if(isset($_REQUEST['lang'])) - $lang = $_REQUEST['lang']; - if(strtoupper($lang) == "FETCH" or $lang == "http://jena.hpl.hp.com/2003/07/query/fetch"){ - // Fetch Query - $s = getSerializerAndSetContentType(); - fetch($model1,$s); - return; - } elseif (strtoupper($lang) == "RDQL" or $lang == "http://jena.hpl.hp.com/2003/07/query/RDQL"){ - // RDQL Query - $s = getSerializerAndSetContentType(); - rdql($model1,$s); - return; - } elseif (strtoupper($lang) == "SPARQL"){ - // SPARQL Query - $s = getSerializerAndSetContentType(); - sparql($model1,$s); - return; - } elseif (strtoupper($lang) == "SPO" or $lang == "http://jena.hpl.hp.com/2003/07/query/SPO"){ - // SPO Query - $s = getSerializerAndSetContentType(); - spoQuery($model1,$s); - return; - } elseif (strtoupper($lang) == "REMOVESPO"){ - // SPO Query - $modelId = $modelmap[$model]; - spoQuery($model1,$s=false,true,$modelId); - return; - } - } -} else { - // Return the whole model, because no query string or operation ha been given - $s = getSerializerAndSetContentType(); - if (is_a($model1, 'MemModel')) { - echo $s->Serialize($model1); - } else { - echo $s->Serialize($model1->getMemModel()); - } -} - - -/** - * Creates the appropriate RDF serializer depending on the requested content type. - * - * @access private - */ -function getSerializerAndSetContentType() { - if (substr_count($_SERVER['HTTP_ACCEPT'],"application/n-triples") != 0){ - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new NTripleSerializer(); - header('Content-type: application/n-triples'); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"application/n3")!= 0){ - header('Content-type: application/n3'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new N3Serializer(); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"application/rdf+xml") != 0){ - header('Content-type: application/rdf+xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } elseif (substr_count($_SERVER['HTTP_ACCEPT'],"text/xml") != 0){ - header('Content-type: text/xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } else { - header('Content-type: text/xml'); - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - } - return $s; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/rdql.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/rdql.php deleted file mode 100755 index f6123d02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/rdql.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function rdql($model,$serializer){ - - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $query = $_REQUEST["query"]; - // php appears to escape quotes, so unescape them - $query = str_replace('\"','"',$query); - $query = str_replace("\'","'",$query); - // decode %xx - $query =rawurldecode($query); - - /// debug - //var_dump($query); - - $r = new RdqlParser(); - $parsedq = $r->parseQuery($query); - addMissingSelectVarsToQuery($parsedq); - - if (is_a($model, 'MemModel')) { - $eng = new RdqlMemEngine(); - } else { - $eng = new RdqlDbEngine(); - } - $rdqlres = $eng->queryModel($model,$parsedq,TRUE); - $rdqlIter = new RdqlResultIterator($rdqlres); - - $outm = new MemModel(); - while ($rdqlIter->hasNext()) { - $result=$rdqlIter->next(); - generateResultStatementsFromVarResult($result,$parsedq,$outm,$closure,$model); - } - - echo $serializer->Serialize($outm); - - $outm->close(); - -} - - -// -// What about bNodes? The bNode closure should also be added. -// - -function generateResultStatementsFromVarResult(&$result,$parsedq, &$outm,$closure, &$model){ - foreach ($parsedq['patterns'] as $n => $pattern) { - - if (substr($pattern['subject']['value'], 0, 1) == '?') - $subj = $result[$pattern['subject']['value']]; - else - $subj = new Resource($pattern['subject']['value']); - - if (substr($pattern['predicate']['value'], 0, 1) == '?') - $pred = $result[$pattern['predicate']['value']]; - else - $pred = new Resource($pattern['predicate']['value']); - - if (substr($pattern['object']['value'], 0, 1) == '?') - $obj = $result[$pattern['object']['value']]; - else { - if ($pattern['object']['is_literal']){ - $obj = new Literal($pattern['object']['value']); - $obj->setDatatype($pattern['object']['l_dtype']); - $obj->setLanguage($pattern['object']['l_lang']); - } else { - $obj = new Resource($pattern['object']['value']); - } - } - - $stmt = new Statement($subj,$pred,$obj); - - // bNode closure - if (is_a($stmt->object(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->object(),$model,$outm); - } - if (is_a($stmt->subject(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->subject(),$model,$outm); - } - // Add statement to model - $outm->add($stmt); - } -} - -// If there are variables used in the pattern but not -// in the select clause, add them to the select clause -function addMissingSelectVarsToQuery(&$parsedq){ - foreach ($parsedq['patterns'] as $n => $pattern) { - foreach ($pattern as $key => $val_1) - if ($val_1['value']{0}=='?') { - if (!in_array($val_1['value'],$parsedq['selectVars'])){ - array_push($parsedq['selectVars'],$val_1['value']); - } - } - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/remove.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/remove.php deleted file mode 100755 index 077b029b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/remove.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function removeFromModel($model,$contenttype,$postdata){ - $p = getParser($contenttype); - $m = $p->parse2model($postdata); - $it = $m->getStatementIterator(); - while ($it->hasNext()){ - $statement = $it->next(); - $model->remove($statement); - } - echo "200 - The data has been removed from the model."; -} - -function getParser($contenttype){ - if ($contenttype == "application/n-triples"){ - $p = new N3Parser(); - } elseif ($contenttype == "application/n3"){ - $p = new N3Parser(); - } elseif ($contenttype == "application/rdf+xml"){ - $p = new RdfParser(); - } else { - header('HTTP/1.0 415 Unsupported Media Type'); - die("415 - I don't understand content type. Accepted content types are application/n-triples, application/n3, application/rdf+xml."); - } - - return $p; -} - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/simple.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/simple.rdf deleted file mode 100755 index 679d5c48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/simple.rdf +++ /dev/null @@ -1,10 +0,0 @@ - - - - Eric Miller - - Dr. - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/sparql.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/sparql.php deleted file mode 100755 index ad90d8b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/sparql.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * @package netapi - * @todo nothing - * @access public - */ - -function sparql($model,$serializer){ - - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $query = $_REQUEST["query"]; - // php appears to escape quotes, so unescape them - $query = str_replace('\"','"',$query); - $query = str_replace("\'","'",$query); - // decode %xx - $query =rawurldecode($query); - - $result = $model->sparqlQuery($query,'xml'); - if($result instanceof MemModel) - echo $serializer->Serialize($result); - else - echo $result; - - -} - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/spo.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/spo.php deleted file mode 100755 index a610ce7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/netapi/spo.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @author Phil Dawes - * - * @package netapi - * @todo Support typed literals. - * @access public - */ - -function spoQuery($model,$serializer,$remove=false,$modelId=false){ - - // Get SPO query from HTTP request - if (isset($_REQUEST['s'])) { - $subject = new Resource($_REQUEST['s']); - } else { - $subject = NULL; - } - if (isset($_REQUEST['p'])) { - $predicate = new Resource($_REQUEST['p']); - } else { - $predicate = NULL; - } - if (isset($_REQUEST['o'])) { - $object = new Resource($_REQUEST['o']); - } else if (isset($_REQUEST['v'])) { - $object = new Literal($_REQUEST['v']); - } else { - $object = NULL; - } - if (isset($_REQUEST['closure'])) { - if (strtoupper($_REQUEST['closure']) == "TRUE" ) { - $closure = True; - } else { - $closure = False; - } - } else { - $closure = False; - } - - $outm = new MemModel(); - $resultmodel = $model->find($subject, $predicate, $object); - $it = $resultmodel->getStatementIterator(); - while ($it->hasNext()){ - $stmt = $it->next(); - if($remove) - { - $model->remove($stmt); - - } - else - { - $outm->add(new Statement($stmt->subject(),$stmt->predicate(), $stmt->object())); - if (is_a($stmt->object(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->object(),$model,$outm); - } - if (is_a($stmt->subject(),'BlankNode') && $closure == True) { - getBNodeClosure($stmt->subject(),$model,$outm); - } - } - } - if($remove) - { - - if(substr($modelId,0,5)=="file:"){ - $model->saveAs(substr($modelId,5)); - } - if($resultmodel->size()>0){ - header('200 - OK'); - echo "200 - OK"; - }else{ - echo "No matching statements"; - } - } - else - { - echo $serializer->Serialize($outm); - } - $outm->close(); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.htaccess b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.htaccess deleted file mode 100755 index 176e4d10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -RewriteEngine on -RewriteBase /rdfapi-php/rap-pubby/ -RewriteRule ^[^\.]*$ rap_pubby.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/all-wcprops deleted file mode 100755 index a5a95f67..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/all-wcprops +++ /dev/null @@ -1,59 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby -END -metadata.n3 -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/metadata.n3 -END -RAPpubbyDataset.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/RAPpubbyDataset.php -END -prefixes.n3 -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/prefixes.n3 -END -RAPpubbyResDescr.php -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/RAPpubbyResDescr.php -END -RAPpubbyHTMLSer.php -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/RAPpubbyHTMLSer.php -END -rap_pubby.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/rap_pubby.php -END -.htaccess -K 25 -svn:wc:ra_dav:version-url -V 69 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/.htaccess -END -config.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/config.php -END -RAPpubbyURIrewriter.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/RAPpubbyURIrewriter.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/entries deleted file mode 100755 index a8acc447..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/entries +++ /dev/null @@ -1,133 +0,0 @@ -8 - -dir -557 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/rap-pubby -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-02-29T15:03:46.371483Z -557 -cax - - -svn:special svn:externals svn:needs-lock - -metadata.n3 -file - - - - -2008-02-29T13:34:46.719287Z -52fcdd022d671b1fb911623d75145fbb -2008-02-29T15:03:46.371483Z -557 -cax - -RAPpubbyDataset.php -file - - - - -2007-12-19T15:30:25.609375Z -fd919f9042175d622b5e7f903bccb880 -2008-02-29T15:03:46.371483Z -557 -cax - -templ -dir - -prefixes.n3 -file - - - - -2008-02-29T14:25:48.358968Z -5bfc6532488b6f5a6a4538ee8da77ca7 -2008-02-29T15:03:46.371483Z -557 -cax - -doc -dir - -RAPpubbyResDescr.php -file - - - - -2007-12-19T15:30:32.593750Z -83703afb23a4967c5ae2c05cbf410fb0 -2008-02-29T15:03:46.371483Z -557 -cax - -rap_pubby.php -file - - - - -2007-12-19T15:30:00.171875Z -780709499ea6389cb94bb6229d22b37b -2008-02-29T15:03:46.371483Z -557 -cax - -RAPpubbyHTMLSer.php -file - - - - -2007-12-19T15:30:45.890625Z -b5cb52db7d145ec68dd23827190d1536 -2008-02-29T15:03:46.371483Z -557 -cax - -.htaccess -file - - - - -2008-02-29T14:24:26.781365Z -2cf37ad1632036e56205591cc0b96edc -2008-02-29T15:03:46.371483Z -557 -cax - -config.php -file - - - - -2008-02-29T14:07:43.756535Z -f1f48aa7e27d6b97a395cc38d8775bf9 -2008-02-29T15:03:46.371483Z -557 -cax - -example -dir - -RAPpubbyURIrewriter.php -file - - - - -2007-12-19T15:30:39.281250Z -ffb7b2d7cdb80e78ba4dcf8112c5b3f4 -2008-02-29T15:03:46.371483Z -557 -cax - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/.htaccess.svn-base deleted file mode 100755 index 176e4d10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/.htaccess.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -RewriteEngine on -RewriteBase /rdfapi-php/rap-pubby/ -RewriteRule ^[^\.]*$ rap_pubby.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyDataset.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyDataset.php.svn-base deleted file mode 100755 index 202e451d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyDataset.php.svn-base +++ /dev/null @@ -1,143 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -// toDo: delete this -include_once('RAPpubbyURIrewriter.php'); - -Class RAPpubbyDataset extends Object { - - var $m; - var $ns = array(); - var $metadata; - - - function RAPpubbyDataset() { - - global $_PUBBY_DATASET; - - $this->loadModel($_PUBBY_DATASET['loadRDF']); - $this->loadNamespaces($_PUBBY_DATASET['usePrefixesFrom']); - $this->loadMetadata($_PUBBY_DATASET['rdfDocumentMetadata']); - - } - - - /** - * - */ - function & getResDescr ($resURI, $attach_metadata = false) { - - global $_PUBBY_DATASET; - - $r = new Resource(RAPpubbyURIrewriter::pubbyURItoDatasetURI($resURI)); - $rd_m = new MemModel(); - - $rd_m = $this->m->find($r, NULL, NULL); - $backlinks = $this->m->find(NULL, NULL, $r); - $rd_m->addModel($backlinks); - - $rew_rd_m = & RAPpubbyURIrewriter::rewriteURIsInResDescrModel($rd_m); - - if (!$rew_rd_m->isEmpty() && $_PUBBY_DATASET['addSameAsStatements']) { - - $rew_rd_m->add(new Statement(new Resource($resURI), new Resource(OWL_NS. "sameAs"), $r)); - } - $rew_rd_m->addParsedNamespaces($this->ns); - - $rd = new RAPpubbyResDescr($resURI, $rew_rd_m); - - if ($attach_metadata && !$rd->isEmpty()) { - $rd->attachMetadata($this->getMetadata($resURI)); - } - return $rd; - } - - - // private ----------------------------------------------------- - - - /** - * @return RAP model with metadata, blank node replaced with resource URI - */ - function & getMetadata ($resURI) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($resURI); - - $metaData = $this->metadata; - $metaData->replace(new BlankNode(BNODE_PREFIX .'1'), NULL, NULL, new Resource($dataURI)); - - return $metaData; - } - - - /** - * - */ - function loadModel($url) { - - // load model from file - if ($url) { - $this->m = new MemModel(); - $this->m->load($url); - } - else { - $db = new DbStore(PUBBY_DB_DRIVER, PUBBY_DB_HOST, PUBBY_DB_DB, PUBBY_DB_USER, PUBBY_DB_PASS); - $this->m = $db->getModel(PUBBY_DBMODEL); - } - } - - - /** - * loads namespaces from file or rewrites from configuration model - */ - function loadNamespaces($url) { - - if ($url) { - - $nmsp_m = new MemModel(); - $nmsp_m->load($url); - $this->ns = $nmsp_m->getParsedNamespaces(); - if (!$this->ns) { - trigger_error("The file:" .$url ."does not contain any namespace declarations." - ."The prefixes from the configuration model will be used instead"); - } - } - else { - - $nmsp = $this->m->getParsedNamespaces(); - if ($nmsp) { - $this->ns = RAPpubbyURIrewriter::rewrNamespaces($nmsp); - } - } - } - - - /** - * - */ - function loadMetadata($url) { - - if ($url) { - $this->metadata = new MemModel(); - $this->metadata->load($url); - } - } - - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyHTMLSer.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyHTMLSer.php.svn-base deleted file mode 100755 index daf67dc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyHTMLSer.php.svn-base +++ /dev/null @@ -1,361 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - -Class RAPpubbyHTMLSer extends Object { - - var $htmlTemplate; - var $htmlTemplate_404; - var $placeholders = array( - '##_templInclDirURL_##' => '', - '##_projetName_##' => '', - '##_projectHomepage_##' => '', - '##_resURI_##' => '', - '##_repURIdata_##' => '', - '##_resourceLabel_##' => '', - '##_shortDescription_##' => '', - '##_imgLink_##' => '', - '##_prop_tableRows_##' => '', - ); - - - /** - * - */ - function RAPpubbyHTMLSer ($template = PUBBY_HTML_SER__TEMPLATE, $template_404 = PUBBY_HTML_SER__TEMPLATE_404) { - - $this->loadTemplates($template, $template_404); - - $this->placeholders['##_templInclDirURL_##'] = PUBBY_WEBBASE .PUBBY_HTML_SER__TEMPL_INCL_DIR; - $this->placeholders['##_projectName_##'] = PUBBY_HTML_SER__PROJECT_NAME; - $this->placeholders['##_projectHomepage_##'] = PUBBY_HTML_SER__PROJECT_HOMEPAGE; - - } - - - /** - * - */ - function serialize (&$rd) { - - - if ($rd->isEmpty()) { - $html = $this->htmlTemplate_404; - } - else { - $html = $this->htmlTemplate; - } - $ph = $this->generatePlaceholderValues($rd); - $html = str_ireplace(array_keys($ph), $ph, $html); - - return $html; - } - - - /** - * - */ - function loadTemplates($t, $t_404) { - - if (file_exists($t)) { - $file = fopen($t, "r"); - if ($file) { - $this->htmlTemplate = fread($file,filesize($t)); - fclose($file); - } - } - else { - trigger_error("Could not find template file: $t, "); - $this->htmlTemplate = $this->getBasicTemplate(); - } - - if (file_exists($t_404)) { - $file = fopen($t_404, "r"); - if ($file) { - $this->htmlTemplate_404 = fread($file,filesize($t_404)); - fclose($file); - } - } - else { - trigger_error("Could not find template file: $t_404, "); - $this->htmlTemplate_404 = $this->getBasicTemplate_404(); - } - - } - - - /** - * - */ - function getBasicTemplate() { - - return '

    ##_resURI_##

    - - - ##_prop_tableRows_## -

    Property

    Value

    '; - } - - function getBasicTemplate_404() { - - return '

    ##_resURI_##

    -

    The requested resource does not exist at this server, or no information about it is available.

    '; - } - - - /** - * - */ - function generatePlaceholderValues (&$rd) { - - $res = & $rd->getResource(); - $m = & $rd->getModel(); - - $ph = $this->placeholders; - $ph['##_resURI_##'] = $res->getURI(); - $ph['##_repURIdata_##'] = $rd->getDataURI(); - $ph['##_resourceLabel_##'] = $this->findLabel($m, $res); - $ph['##_shortDescription_##'] = $this->findComment($m, $res); - $ph['##_imgLink_##'] = $this->findImgLink($m, $res); - $ph['##_prop_tableRows_##'] = $this->renderResourceProperties($m, $res); - - return $ph; - } - - - /** - * find only the first occurance of the label - */ - function findLabel(&$m, &$res) { - - global $_PUBBY_HTML_SER; - return $this->findLiteralValueLang($m, $res, $_PUBBY_HTML_SER['labelProperty']); - } - - - /** - * find only the first occurance of the comment - */ - function findComment(&$m, &$res) { - - global $_PUBBY_HTML_SER; - return $this->findLiteralValueLang($m, $res, $_PUBBY_HTML_SER['commentProperty']); - } - - - /** - * - */ - function findImgLink (&$m, &$res) { - - global $_PUBBY_HTML_SER; - - foreach ($_PUBBY_HTML_SER['imageProperty'] as $prop) { - - $triple = $m->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - return $triple->getObject()->getURI(); - } - } - return ''; - } - - - /** - * find only the first occurance of the Literal from an array of properties - */ - function findLiteralValueLang(&$m, &$res, &$prop_array) { - - $tmp = ''; - - // if no default lang is specified find any literal value - if (PUBBY_HTML_SER__DEFAULT_LANG == '') { - - foreach ($prop_array as $prop) { - - $triple = $m->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - return $triple->getObject()->getLabel(); - } - } - } - else { - foreach ($prop_array as $prop) { - - $result = $m->find($res, $prop, NULL); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - if ($triple->getObject()->getLanguage() == PUBBY_HTML_SER__DEFAULT_LANG) { - return $triple->getObject()->getLabel(); - } - } - // if no label with default lang was found take the first one - // and store it in $tmp because another property could contain the default lang - if (!$result->isEmpty()) { - $triple = $result->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - $tmp = $triple->getObject()->getLabel(); - } - } - } - } - return $tmp; - } - - - /** - * - */ - function renderResourceProperties (&$m, &$res) { - - $prop = array(); - - // find properties - $result = $m->find($res, NULL, NULL); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - $triple = $iter->next(); - $propURI = $triple->getPredicate()->getURI(); - $prop[$propURI][false][] = $triple->getObject(); - } - - // find inverse properteis (backlinks) - $result = $m->find(NULL, NULL, $res); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - $triple = $iter->next(); - $propURI = $triple->getPredicate()->getURI(); - // inverse the property --> get subject instead of object - $prop[$propURI][true][] = $triple->getSubject(); - - } - - // sort properties - uksort($prop, array($this, '_sortURIbyQName')); - - // render table rows with resource properties - $nsPrefix = $m->getParsedNamespaces(); if (!$nsPrefix) $nsPrefix = array(); - $html_tableRows = ''; - $tr_class = array(true => 'odd', false => 'even'); - $odd = true; - - foreach ($prop as $propURI => $propType) { - foreach ($propType as $inverseProp => $valArray) { - - $tr=' - - ' - .$this->renderPropURI($propURI, $nsPrefix, $inverseProp) - .' - -
      '; - foreach ($valArray as $propValue) { - - if (is_a($propValue, "Literal")) { - $tr .=' -
    • ' - .$this->renderLiteral($propValue) - .'
    • '; - } - else { - $tr .=' -
    • ' - .$this->renderURI($propValue->getURI(), $nsPrefix) - .'
    • '; - } - } - $tr .=' -
    - - '; - $odd = !$odd; - $html_tableRows .= $tr; - } - } - - return $html_tableRows; - } - - - /** - * - */ - function renderLiteral ($literal) { - - $html = '' .$literal->getLabel(); - if ($literal->getLanguage()) { - $html .= ' (' .$literal->getLanguage() .')'; - } - return $html .= ''; - - } - - - /** - * - */ - function renderPropURI ($URI, &$nsPrefix, $inverseProp=false) { - - if ($inverseProp) { - return 'is ' .$this->renderURI($URI, $nsPrefix) .' of'; - } - else { - return $this->renderURI($URI, $nsPrefix); - } - - } - - - /** - * - */ - function renderURI($URI, &$nsPrefix) { - - $ns = RDFUtil::guessNamespace($URI); - $qName = RDFUtil::guessName($URI); - - $html = ''; - - if (array_key_exists($ns, $nsPrefix)) { - $html .= '' .$nsPrefix[$ns] .':' .$qName; - } - else { - $html .= $URI; - } - $html .= ''; - - return $html; - - } - - - /** - * Call-back function for uksort() - */ - function _sortURIbyQName ($a, $b) { - - return strcasecmp(RDFUtil::guessName($a), RDFUtil::guessName($b)); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyResDescr.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyResDescr.php.svn-base deleted file mode 100755 index da44be35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyResDescr.php.svn-base +++ /dev/null @@ -1,127 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -Class RAPpubbyResDescr extends Object { - - var $res; - var $m_rd; - var $m_metadata; - - - /** - * - */ - function RAPpubbyResDescr ($resURI, &$m) { - - $this->res = new Resource($resURI); - $this->m_rd = &$m; - $this->m_metadata = new MemModel(); - } - - - /** - * - */ - function isEmpty() { - - return $this->m_rd->isEmpty(); - } - - - /** - * - */ - function & getResource() { - - return $this->res; - } - - - /** - * - */ - function getResURI() { - - return $this->res->getURI(); - } - - - /** - * - */ - function getDataURI() { - - return RAPpubbyURIrewriter::resURItoDataURI($this->res->getURI()); - } - - - /** - * - */ - function getPageURI() { - - return RAPpubbyURIrewriter::resURItoPageURI($this->res->getURI()); - } - - - /** - * - */ - function & getModel() { - - return $this->m_rd; - } - - - /** - * - */ - function attachMetadata(&$m) { - - $this->m_rd->addModel($m); - $this->m_metadata = &$m; - } - - - /** - * - */ - function & getMetadataModel() { - - return $this->m_metadata; - } - - - function serialize ($format) { - - switch ($format) { - case "html": - $s = new RAPpubbyHTMLSer(); - return $s->serialize($this); - case "n3": - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new N3Serializer(); - return $s->serialize($this->m_rd); - case "rdf/xml": - default: - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - return $s->serialize($this->m_rd); - } - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyURIrewriter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyURIrewriter.php.svn-base deleted file mode 100755 index 513db31a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/RAPpubbyURIrewriter.php.svn-base +++ /dev/null @@ -1,181 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -Class RAPpubbyURIrewriter extends Object { - - - /** - * - */ - function datasetURItoPubbyURI($uri) { - - global $_PUBBY_DATASET; - - return str_ireplace($_PUBBY_DATASET['datasetBase'], PUBBY_WEBBASE .$_PUBBY_DATASET['webResourcePrefix'], $uri); - } - - - /** - * - */ - function pubbyURItoDatasetURI($uri) { - - global $_PUBBY_DATASET; - - return str_ireplace(PUBBY_WEBBASE .$_PUBBY_DATASET['webResourcePrefix'], $_PUBBY_DATASET['datasetBase'], $uri); - } - - - /** - * - */ - function resURItoDataURI($resURI, $output='') { - - $dataURI = PUBBY_WEBBASE ."data/" .substr($resURI, strlen(PUBBY_WEBBASE)); - - if ($output) { - return $dataURI ."?output=$output"; - } - return $dataURI; - } - - - /** - * - */ - function resURItoPageURI($resURI) { - - return PUBBY_WEBBASE ."page/" .substr($resURI, strlen(PUBBY_WEBBASE)); - } - - - /** - * - */ - function dataURItoResURI($dataURI, $outputParam='') { - - $resURI = PUBBY_WEBBASE .substr($dataURI, strlen(PUBBY_WEBBASE. 'data/')); - - if ($outputParam) { - return substr($resURI, 0, stripos($resURI, "?$outputParam")); - } - return $resURI; - } - - - /** - * - */ - function pageURItoResURI($pageURI) { - - return PUBBY_WEBBASE .substr($pageURI, strlen(PUBBY_WEBBASE. 'page/')); - } - - - /** - * - */ - function rewrNamespaces($ns) { - - global $_PUBBY_DATASET; - - foreach ($ns as $n => $prefix) { - if (stripos($n, $_PUBBY_DATASET['datasetBase']) !== false) { - unset($ns[$n]); - $ns[RAPpubbyURIrewriter::datasetURItoPubbyURI($n)] = $prefix; - } - } - asort($ns); - return $ns; - } - - - /** - * - */ - function & rewriteURIsInResDescrModel(&$rd_m) { - - global $_PUBBY_DATASET; - global $namespaces; - - $rew_rd_m = new MemModel(); - - // uri rewriting + regex filtering - if ($_PUBBY_DATASET['datasetURIPattern'] != '') { - - $l = strlen($_PUBBY_DATASET['datasetBase']); - - $iter = $rd_m->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - $subj = $triple->getSubject(); - - // if subjURI is a datasetURI & does not match the pattern - if (stripos($subj->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($subj->getURI(), $l))) { - continue; - } - else { - // if predURI is a datasetURI & does not match the pattern - $pred = $triple->getPredicate(); - if (stripos($pred->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($pred->getURI(), $l))) { - continue; - } - else { - // if obj is a Literal & objeURI is a datasetURI & does not match the pattern - $obj = $triple->getObject(); - if (!is_a($obj, "Literal")) { - if (stripos($obj->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($obj->getURI(), $l))) { - continue; - } - else { - $obj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($obj->getURI())); - } - } - $subj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($subj->getURI())); - $pred = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($pred->getURI())); - - $rew_rd_m->add(new Statement($subj, $pred, $obj)); - } - } - } - } - else { - - $iter = $rd_m->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - - $subj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($triple->getSubject()->getURI())); - $pred = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($triple->getPredicate()->getURI())); - $obj = $triple->getObject(); - - if (!is_a($obj, "Literal")) { - $obj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($obj->getURI())); - } - $rew_rd_m->add(new Statement($subj, $pred, $obj)); - } - } - - return $rew_rd_m; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/config.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/config.php.svn-base deleted file mode 100755 index d476ffc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/config.php.svn-base +++ /dev/null @@ -1,146 +0,0 @@ - - * @version 1.0, 29.02.2008 - * @package rap-pubby - */ - -// ---------------------------------------------------------------------------------- -// Include RAP Classes -// ---------------------------------------------------------------------------------- - -// Defines RAP include directories -// NOTE: Modify this if your rap-pubby is not installed in RAP subdirectory -define("RDFAPI_INCLUDE_DIR", "../api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - - -// include RAPpubby classes -include_once('RAPpubbyURIrewriter.php'); -include_once('RAPpubbyDataSet.php'); -include_once('RAPpubbyResDescr.php'); -include_once('RAPpubbyHTMLSer.php'); - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Server Configuration Section -// ---------------------------------------------------------------------------------- - - -// The root URL where the RAP_Pubby web application is installed, e.g. http://myserver/mydataset/. -define('PUBBY_WEBBASE', 'http://localhost/rdfapi-php/rap-pubby/'); - -// The URI of a resource which description will be displayed as the home page of the RAP_Pubby installation. -// Note that you have to specify a dataset URI, not a mapped web URI. -define('PUBBY_INDEX_RESOURCE', 'http://www4.wiwiss.fu-berlin.de/is-group/projects/RAP'); - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Database Configuration -// ---------------------------------------------------------------------------------- - -// Note: in order to serve a DbModel the $_PUBBY_DATASET['loadRDF'] parameter must be set to ''; -define('PUBBY_DB_DRIVER', ''); -define('PUBBY_DB_HOST', ''); -define('PUBBY_DB_DB', ''); -define('PUBBY_DB_USER', ''); -define('PUBBY_DB_PASS', ''); - -define('PUBBY_DBMODEL', ''); - - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Dataset Configuration Section -// ---------------------------------------------------------------------------------- - -$_PUBBY_DATASET = array( - - // Load an RDF document from the Web or the file system and use it as the data source. - // If specified, the database connection configured above will be ignored. - 'loadRDF' => 'example/group.rdf', - - // The common URI prefix of the resource identifiers in the served dataset. - // Note: Only resources with this prefix will be mapped and made available by RAP_Pubby - 'datasetBase' => 'http://www4.wiwiss.fu-berlin.de/is-group/', - - // If present, only dateset URIs matching this regular expression will be mapped and made available by RAP_Pubby. - // The regular expression must match everything after the $_PUBBY_DATASET['datasetBase'] part of the URI. - // For example: datasetBase = 'http://example.org/' and datasetURIPattern = '/(users|documents)\/.*/' - // This will publish the dataset URI http://example.org/users/alice, - // but not http://example.org/invoices/5395842 because the URI part invoices/5395842 does not match the regular expression. - // default value = ''; - 'datasetURIPattern' => '', - - // If present, this string will be prefixed to the mapped web URIs. This is useful if you have to avoid potential name clashes - // with URIs already used by the server itself. For example, if the dataset includes a URI http://mydataset/page, - // and the dataset prefix is http://mydataset/, then there would be a clash after mapping because RAP_Pubby reserves - // the mapped URI http://myserver/mydataset/page for its own use. In this case, you may specify a prefix like "resource/", - // which will result in a mapped URI of http://myserver/mydataset/resource/page. - // NOTE: the prefix must end with "/" - 'webResourcePrefix' => '', - - // Links to an RDF document whose prefix declarations will be used in output. - // e.g. 'usePrefixesFrom' => 'prefixes.n3', You can use the file prefixes.n3 in rap-pubby directory as template. - // Defaults to the empty URL, which means the prefixes from the input RAP model will be used. - 'usePrefixesFrom' => 'prefixes.n3', - - // All statements inside the metadata file will be added as metadata to the RDF documents published - // for this dataset. This feature can be used for instance to add licensing information to your published documents. - // You can use the file metadata.n3 in rap-pubby directory as template. - 'rdfDocumentMetadata' => 'metadata.n3', - - - // If set to true, an owl:sameAs statement of the form owl:sameAs will be present in Linked Data output. - 'addSameAsStatements' => false, -); - - -// ---------------------------------------------------------------------------------- -// Pubby HTML Output Setting -// ---------------------------------------------------------------------------------- - -// URL of the template file used in HTML output -define ('PUBBY_HTML_SER__TEMPLATE', 'templ/template.html'); - -// URL of the template file rendering '404 - Not Found' information used in HTML output -define ('PUBBY_HTML_SER__TEMPLATE_404', 'templ/404_notFound.html'); - -// Link to directory where template includes (css-files, scripts, images) are located -define ('PUBBY_HTML_SER__TEMPL_INCL_DIR' , 'templ/'); - -// The name of the project, for display in page titles -define ('PUBBY_HTML_SER__PROJECT_NAME', 'PubbyExample@Localhost'); - -// A project homepage or similar URL, for linking in page titles -define ('PUBBY_HTML_SER__PROJECT_HOMEPAGE', 'http://localhost/rap-pubby/doc/RAP_Pubby.htm'); - -// For resource label and short description -define ('PUBBY_HTML_SER__DEFAULT_LANG', 'en'); - -// The value of these RDF properties, if present in the dataset, will be used as labels and page titles for resources. -// Note: If multiple properties are present only the first one found (in default language, if specified) will be showed. -$_PUBBY_HTML_SER['labelProperty'] = array ( - new Resource(RDF_SCHEMA_URI ."label"), - new Resource(DC_NS ."title"), - new Resource(FOAF_NS ."name"), -); - -// The value of these RDF properties, if present in the dataset, will be used as short textual description for resources. -// Note: If multiple properties are present only the first one found (in default language, if specified) will be showed. -$_PUBBY_HTML_SER['commentProperty'] = array ( - new Resource(RDF_SCHEMA_URI ."comment"), - new Resource(DC_NS ."description"), -); - -// The value of these RDF properties, if present in the dataset, will be used as an image URL to show a depiction of the item. -// Note: If multiple properties are present only the first one found will be showed. -$_PUBBY_HTML_SER['imageProperty'] = array ( - new Resource(FOAF_NS ."depiction"), -); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/metadata.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/metadata.n3.svn-base deleted file mode 100755 index 5dbb57d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/metadata.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix dc: . -@prefix cc: . - -[ dc:creator ; - cc:license ; -]. \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/prefixes.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/prefixes.n3.svn-base deleted file mode 100755 index 82341a18..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/prefixes.n3.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix xsd: . - -@prefix foaf: . -@prefix vcard: . -@prefix dc: . -@prefix cc: . - - -@prefix swrc: . -@prefix admin: . -@prefix dctype: . -@prefix iswc: . -@prefix d2r: . -@prefix db1: . -@prefix doap: . - -@prefix fu_person: . -@prefix fu_project: . -@prefix fu_publication: . -@prefix fu_position: . -@prefix event: . -@prefix topic: . - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/rap_pubby.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/rap_pubby.php.svn-base deleted file mode 100755 index 708f009e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/.svn/text-base/rap_pubby.php.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -include_once('config.php'); - - -$ds = new RAPpubbyDataset(); - -$http_reqest_URI = "http://" .$_SERVER['SERVER_NAME'] .$_SERVER['REQUEST_URI']; - -// index resource -if ($http_reqest_URI == PUBBY_WEBBASE) { - $http_reqest_URI = RAPpubbyURIrewriter::datasetURItoPubbyURI(PUBBY_INDEX_RESOURCE); -} - -switch (substr($http_reqest_URI, strlen(PUBBY_WEBBASE), 4)) { - - case 'data': - - $resURI = RAPpubbyURIrewriter::dataURItoResURI($http_reqest_URI, $_SERVER['QUERY_STRING']); - - $rd = & $ds->getResDescr($resURI, $_PUBBY_DATASET['rdfDocumentMetadata']); - - if ($rd->isEmpty()) { - header('HTTP/1.1 404 Not Found'); - header('Content-type: text/html;charset=utf-8'); - $c = "Nothing known about <$resURI>"; - header('Content-length: ' .strlen($c)); - echo $c; - break; - } - - // valid query string: 'output='(xml|n3) - if (!strcasecmp($_SERVER['QUERY_STRING'], 'output=n3')) { - - header('Content-type: application/n3'); - $c = $rd->serialize("n3"); - } - elseif (!strcasecmp($_SERVER['QUERY_STRING'], 'output=xml')) { - - header('Content-type: application/rdf+xml'); - $c = $rd->serialize("rdf/xml"); - } - // default output - else { - - header('Content-type: application/rdf+xml'); - - $c = $rd->serialize("rdf/xml"); - } - header('Content-length: ' .strlen($c)); - echo $c; - break; - - case 'page': - - $resURI = RAPpubbyURIrewriter::pageURItoResURI($http_reqest_URI); - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($resURI); - - $rd = & $ds->getResDescr($resURI); - - header('Content-type: text/html;charset=utf-8'); - if ($rd->isEmpty()) { - header('HTTP/1.1 404 Not Found'); - } - $c = $rd->serialize("html"); - header('Content-length: ' .strlen($c)); - echo $c; - break; - - default: - - if (strpos($_SERVER['HTTP_ACCEPT'], "application/rdf+xml") !== false) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$dataURI); - header('Content-type: text/plain'); - $c = "303 See Other: For a description of this item, see <$dataURI>"; - } - // n3 - elseif (strpos($_SERVER['HTTP_ACCEPT'], "application/n3") !== false) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI, 'n3'); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$dataURI); - header('Content-type: text/plain'); - $c = "303 See Other: For a description of this item in n3, see <$dataURI>"; - } - else { - - $pageURI = RAPpubbyURIrewriter::resURItoPageURI($http_reqest_URI); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$pageURI); - header('Content-type: text/plain'); - header('Content-length: 33'); - $c = "303 See Other: For a description of this item see <$pageURI>"; - - } - - header('Content-length: ' .strlen($c)); - echo $c; -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyDataset.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyDataset.php deleted file mode 100755 index 202e451d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyDataset.php +++ /dev/null @@ -1,143 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -// toDo: delete this -include_once('RAPpubbyURIrewriter.php'); - -Class RAPpubbyDataset extends Object { - - var $m; - var $ns = array(); - var $metadata; - - - function RAPpubbyDataset() { - - global $_PUBBY_DATASET; - - $this->loadModel($_PUBBY_DATASET['loadRDF']); - $this->loadNamespaces($_PUBBY_DATASET['usePrefixesFrom']); - $this->loadMetadata($_PUBBY_DATASET['rdfDocumentMetadata']); - - } - - - /** - * - */ - function & getResDescr ($resURI, $attach_metadata = false) { - - global $_PUBBY_DATASET; - - $r = new Resource(RAPpubbyURIrewriter::pubbyURItoDatasetURI($resURI)); - $rd_m = new MemModel(); - - $rd_m = $this->m->find($r, NULL, NULL); - $backlinks = $this->m->find(NULL, NULL, $r); - $rd_m->addModel($backlinks); - - $rew_rd_m = & RAPpubbyURIrewriter::rewriteURIsInResDescrModel($rd_m); - - if (!$rew_rd_m->isEmpty() && $_PUBBY_DATASET['addSameAsStatements']) { - - $rew_rd_m->add(new Statement(new Resource($resURI), new Resource(OWL_NS. "sameAs"), $r)); - } - $rew_rd_m->addParsedNamespaces($this->ns); - - $rd = new RAPpubbyResDescr($resURI, $rew_rd_m); - - if ($attach_metadata && !$rd->isEmpty()) { - $rd->attachMetadata($this->getMetadata($resURI)); - } - return $rd; - } - - - // private ----------------------------------------------------- - - - /** - * @return RAP model with metadata, blank node replaced with resource URI - */ - function & getMetadata ($resURI) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($resURI); - - $metaData = $this->metadata; - $metaData->replace(new BlankNode(BNODE_PREFIX .'1'), NULL, NULL, new Resource($dataURI)); - - return $metaData; - } - - - /** - * - */ - function loadModel($url) { - - // load model from file - if ($url) { - $this->m = new MemModel(); - $this->m->load($url); - } - else { - $db = new DbStore(PUBBY_DB_DRIVER, PUBBY_DB_HOST, PUBBY_DB_DB, PUBBY_DB_USER, PUBBY_DB_PASS); - $this->m = $db->getModel(PUBBY_DBMODEL); - } - } - - - /** - * loads namespaces from file or rewrites from configuration model - */ - function loadNamespaces($url) { - - if ($url) { - - $nmsp_m = new MemModel(); - $nmsp_m->load($url); - $this->ns = $nmsp_m->getParsedNamespaces(); - if (!$this->ns) { - trigger_error("The file:" .$url ."does not contain any namespace declarations." - ."The prefixes from the configuration model will be used instead"); - } - } - else { - - $nmsp = $this->m->getParsedNamespaces(); - if ($nmsp) { - $this->ns = RAPpubbyURIrewriter::rewrNamespaces($nmsp); - } - } - } - - - /** - * - */ - function loadMetadata($url) { - - if ($url) { - $this->metadata = new MemModel(); - $this->metadata->load($url); - } - } - - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyHTMLSer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyHTMLSer.php deleted file mode 100755 index daf67dc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyHTMLSer.php +++ /dev/null @@ -1,361 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); - - -Class RAPpubbyHTMLSer extends Object { - - var $htmlTemplate; - var $htmlTemplate_404; - var $placeholders = array( - '##_templInclDirURL_##' => '', - '##_projetName_##' => '', - '##_projectHomepage_##' => '', - '##_resURI_##' => '', - '##_repURIdata_##' => '', - '##_resourceLabel_##' => '', - '##_shortDescription_##' => '', - '##_imgLink_##' => '', - '##_prop_tableRows_##' => '', - ); - - - /** - * - */ - function RAPpubbyHTMLSer ($template = PUBBY_HTML_SER__TEMPLATE, $template_404 = PUBBY_HTML_SER__TEMPLATE_404) { - - $this->loadTemplates($template, $template_404); - - $this->placeholders['##_templInclDirURL_##'] = PUBBY_WEBBASE .PUBBY_HTML_SER__TEMPL_INCL_DIR; - $this->placeholders['##_projectName_##'] = PUBBY_HTML_SER__PROJECT_NAME; - $this->placeholders['##_projectHomepage_##'] = PUBBY_HTML_SER__PROJECT_HOMEPAGE; - - } - - - /** - * - */ - function serialize (&$rd) { - - - if ($rd->isEmpty()) { - $html = $this->htmlTemplate_404; - } - else { - $html = $this->htmlTemplate; - } - $ph = $this->generatePlaceholderValues($rd); - $html = str_ireplace(array_keys($ph), $ph, $html); - - return $html; - } - - - /** - * - */ - function loadTemplates($t, $t_404) { - - if (file_exists($t)) { - $file = fopen($t, "r"); - if ($file) { - $this->htmlTemplate = fread($file,filesize($t)); - fclose($file); - } - } - else { - trigger_error("Could not find template file: $t, "); - $this->htmlTemplate = $this->getBasicTemplate(); - } - - if (file_exists($t_404)) { - $file = fopen($t_404, "r"); - if ($file) { - $this->htmlTemplate_404 = fread($file,filesize($t_404)); - fclose($file); - } - } - else { - trigger_error("Could not find template file: $t_404, "); - $this->htmlTemplate_404 = $this->getBasicTemplate_404(); - } - - } - - - /** - * - */ - function getBasicTemplate() { - - return '

    ##_resURI_##

    - - - ##_prop_tableRows_## -

    Property

    Value

    '; - } - - function getBasicTemplate_404() { - - return '

    ##_resURI_##

    -

    The requested resource does not exist at this server, or no information about it is available.

    '; - } - - - /** - * - */ - function generatePlaceholderValues (&$rd) { - - $res = & $rd->getResource(); - $m = & $rd->getModel(); - - $ph = $this->placeholders; - $ph['##_resURI_##'] = $res->getURI(); - $ph['##_repURIdata_##'] = $rd->getDataURI(); - $ph['##_resourceLabel_##'] = $this->findLabel($m, $res); - $ph['##_shortDescription_##'] = $this->findComment($m, $res); - $ph['##_imgLink_##'] = $this->findImgLink($m, $res); - $ph['##_prop_tableRows_##'] = $this->renderResourceProperties($m, $res); - - return $ph; - } - - - /** - * find only the first occurance of the label - */ - function findLabel(&$m, &$res) { - - global $_PUBBY_HTML_SER; - return $this->findLiteralValueLang($m, $res, $_PUBBY_HTML_SER['labelProperty']); - } - - - /** - * find only the first occurance of the comment - */ - function findComment(&$m, &$res) { - - global $_PUBBY_HTML_SER; - return $this->findLiteralValueLang($m, $res, $_PUBBY_HTML_SER['commentProperty']); - } - - - /** - * - */ - function findImgLink (&$m, &$res) { - - global $_PUBBY_HTML_SER; - - foreach ($_PUBBY_HTML_SER['imageProperty'] as $prop) { - - $triple = $m->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - return $triple->getObject()->getURI(); - } - } - return ''; - } - - - /** - * find only the first occurance of the Literal from an array of properties - */ - function findLiteralValueLang(&$m, &$res, &$prop_array) { - - $tmp = ''; - - // if no default lang is specified find any literal value - if (PUBBY_HTML_SER__DEFAULT_LANG == '') { - - foreach ($prop_array as $prop) { - - $triple = $m->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - return $triple->getObject()->getLabel(); - } - } - } - else { - foreach ($prop_array as $prop) { - - $result = $m->find($res, $prop, NULL); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - if ($triple->getObject()->getLanguage() == PUBBY_HTML_SER__DEFAULT_LANG) { - return $triple->getObject()->getLabel(); - } - } - // if no label with default lang was found take the first one - // and store it in $tmp because another property could contain the default lang - if (!$result->isEmpty()) { - $triple = $result->findFirstMatchingStatement($res, $prop, NULL); - if ($triple) { - $tmp = $triple->getObject()->getLabel(); - } - } - } - } - return $tmp; - } - - - /** - * - */ - function renderResourceProperties (&$m, &$res) { - - $prop = array(); - - // find properties - $result = $m->find($res, NULL, NULL); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - $triple = $iter->next(); - $propURI = $triple->getPredicate()->getURI(); - $prop[$propURI][false][] = $triple->getObject(); - } - - // find inverse properteis (backlinks) - $result = $m->find(NULL, NULL, $res); - - $iter = $result->getStatementIterator(); - while ($iter->hasNext()) { - $triple = $iter->next(); - $propURI = $triple->getPredicate()->getURI(); - // inverse the property --> get subject instead of object - $prop[$propURI][true][] = $triple->getSubject(); - - } - - // sort properties - uksort($prop, array($this, '_sortURIbyQName')); - - // render table rows with resource properties - $nsPrefix = $m->getParsedNamespaces(); if (!$nsPrefix) $nsPrefix = array(); - $html_tableRows = ''; - $tr_class = array(true => 'odd', false => 'even'); - $odd = true; - - foreach ($prop as $propURI => $propType) { - foreach ($propType as $inverseProp => $valArray) { - - $tr=' - - ' - .$this->renderPropURI($propURI, $nsPrefix, $inverseProp) - .' - -
      '; - foreach ($valArray as $propValue) { - - if (is_a($propValue, "Literal")) { - $tr .=' -
    • ' - .$this->renderLiteral($propValue) - .'
    • '; - } - else { - $tr .=' -
    • ' - .$this->renderURI($propValue->getURI(), $nsPrefix) - .'
    • '; - } - } - $tr .=' -
    - - '; - $odd = !$odd; - $html_tableRows .= $tr; - } - } - - return $html_tableRows; - } - - - /** - * - */ - function renderLiteral ($literal) { - - $html = '' .$literal->getLabel(); - if ($literal->getLanguage()) { - $html .= ' (' .$literal->getLanguage() .')'; - } - return $html .= ''; - - } - - - /** - * - */ - function renderPropURI ($URI, &$nsPrefix, $inverseProp=false) { - - if ($inverseProp) { - return 'is ' .$this->renderURI($URI, $nsPrefix) .' of'; - } - else { - return $this->renderURI($URI, $nsPrefix); - } - - } - - - /** - * - */ - function renderURI($URI, &$nsPrefix) { - - $ns = RDFUtil::guessNamespace($URI); - $qName = RDFUtil::guessName($URI); - - $html = ''; - - if (array_key_exists($ns, $nsPrefix)) { - $html .= '' .$nsPrefix[$ns] .':' .$qName; - } - else { - $html .= $URI; - } - $html .= ''; - - return $html; - - } - - - /** - * Call-back function for uksort() - */ - function _sortURIbyQName ($a, $b) { - - return strcasecmp(RDFUtil::guessName($a), RDFUtil::guessName($b)); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyResDescr.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyResDescr.php deleted file mode 100755 index da44be35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyResDescr.php +++ /dev/null @@ -1,127 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -Class RAPpubbyResDescr extends Object { - - var $res; - var $m_rd; - var $m_metadata; - - - /** - * - */ - function RAPpubbyResDescr ($resURI, &$m) { - - $this->res = new Resource($resURI); - $this->m_rd = &$m; - $this->m_metadata = new MemModel(); - } - - - /** - * - */ - function isEmpty() { - - return $this->m_rd->isEmpty(); - } - - - /** - * - */ - function & getResource() { - - return $this->res; - } - - - /** - * - */ - function getResURI() { - - return $this->res->getURI(); - } - - - /** - * - */ - function getDataURI() { - - return RAPpubbyURIrewriter::resURItoDataURI($this->res->getURI()); - } - - - /** - * - */ - function getPageURI() { - - return RAPpubbyURIrewriter::resURItoPageURI($this->res->getURI()); - } - - - /** - * - */ - function & getModel() { - - return $this->m_rd; - } - - - /** - * - */ - function attachMetadata(&$m) { - - $this->m_rd->addModel($m); - $this->m_metadata = &$m; - } - - - /** - * - */ - function & getMetadataModel() { - - return $this->m_metadata; - } - - - function serialize ($format) { - - switch ($format) { - case "html": - $s = new RAPpubbyHTMLSer(); - return $s->serialize($this); - case "n3": - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $s = new N3Serializer(); - return $s->serialize($this->m_rd); - case "rdf/xml": - default: - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF); - $s = new RdfSerializer(); - return $s->serialize($this->m_rd); - } - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyURIrewriter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyURIrewriter.php deleted file mode 100755 index 513db31a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/RAPpubbyURIrewriter.php +++ /dev/null @@ -1,181 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -Class RAPpubbyURIrewriter extends Object { - - - /** - * - */ - function datasetURItoPubbyURI($uri) { - - global $_PUBBY_DATASET; - - return str_ireplace($_PUBBY_DATASET['datasetBase'], PUBBY_WEBBASE .$_PUBBY_DATASET['webResourcePrefix'], $uri); - } - - - /** - * - */ - function pubbyURItoDatasetURI($uri) { - - global $_PUBBY_DATASET; - - return str_ireplace(PUBBY_WEBBASE .$_PUBBY_DATASET['webResourcePrefix'], $_PUBBY_DATASET['datasetBase'], $uri); - } - - - /** - * - */ - function resURItoDataURI($resURI, $output='') { - - $dataURI = PUBBY_WEBBASE ."data/" .substr($resURI, strlen(PUBBY_WEBBASE)); - - if ($output) { - return $dataURI ."?output=$output"; - } - return $dataURI; - } - - - /** - * - */ - function resURItoPageURI($resURI) { - - return PUBBY_WEBBASE ."page/" .substr($resURI, strlen(PUBBY_WEBBASE)); - } - - - /** - * - */ - function dataURItoResURI($dataURI, $outputParam='') { - - $resURI = PUBBY_WEBBASE .substr($dataURI, strlen(PUBBY_WEBBASE. 'data/')); - - if ($outputParam) { - return substr($resURI, 0, stripos($resURI, "?$outputParam")); - } - return $resURI; - } - - - /** - * - */ - function pageURItoResURI($pageURI) { - - return PUBBY_WEBBASE .substr($pageURI, strlen(PUBBY_WEBBASE. 'page/')); - } - - - /** - * - */ - function rewrNamespaces($ns) { - - global $_PUBBY_DATASET; - - foreach ($ns as $n => $prefix) { - if (stripos($n, $_PUBBY_DATASET['datasetBase']) !== false) { - unset($ns[$n]); - $ns[RAPpubbyURIrewriter::datasetURItoPubbyURI($n)] = $prefix; - } - } - asort($ns); - return $ns; - } - - - /** - * - */ - function & rewriteURIsInResDescrModel(&$rd_m) { - - global $_PUBBY_DATASET; - global $namespaces; - - $rew_rd_m = new MemModel(); - - // uri rewriting + regex filtering - if ($_PUBBY_DATASET['datasetURIPattern'] != '') { - - $l = strlen($_PUBBY_DATASET['datasetBase']); - - $iter = $rd_m->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - $subj = $triple->getSubject(); - - // if subjURI is a datasetURI & does not match the pattern - if (stripos($subj->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($subj->getURI(), $l))) { - continue; - } - else { - // if predURI is a datasetURI & does not match the pattern - $pred = $triple->getPredicate(); - if (stripos($pred->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($pred->getURI(), $l))) { - continue; - } - else { - // if obj is a Literal & objeURI is a datasetURI & does not match the pattern - $obj = $triple->getObject(); - if (!is_a($obj, "Literal")) { - if (stripos($obj->getURI(), $_PUBBY_DATASET['datasetBase']) === 0 && - !preg_match($_PUBBY_DATASET['datasetURIPattern'], substr($obj->getURI(), $l))) { - continue; - } - else { - $obj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($obj->getURI())); - } - } - $subj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($subj->getURI())); - $pred = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($pred->getURI())); - - $rew_rd_m->add(new Statement($subj, $pred, $obj)); - } - } - } - } - else { - - $iter = $rd_m->getStatementIterator(); - while ($iter->hasNext()) { - - $triple = $iter->next(); - - $subj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($triple->getSubject()->getURI())); - $pred = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($triple->getPredicate()->getURI())); - $obj = $triple->getObject(); - - if (!is_a($obj, "Literal")) { - $obj = new Resource(RAPpubbyURIrewriter::datasetURItoPubbyURI($obj->getURI())); - } - $rew_rd_m->add(new Statement($subj, $pred, $obj)); - } - } - - return $rew_rd_m; - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/config.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/config.php deleted file mode 100755 index d476ffc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/config.php +++ /dev/null @@ -1,146 +0,0 @@ - - * @version 1.0, 29.02.2008 - * @package rap-pubby - */ - -// ---------------------------------------------------------------------------------- -// Include RAP Classes -// ---------------------------------------------------------------------------------- - -// Defines RAP include directories -// NOTE: Modify this if your rap-pubby is not installed in RAP subdirectory -define("RDFAPI_INCLUDE_DIR", "../api/"); -include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - - -// include RAPpubby classes -include_once('RAPpubbyURIrewriter.php'); -include_once('RAPpubbyDataSet.php'); -include_once('RAPpubbyResDescr.php'); -include_once('RAPpubbyHTMLSer.php'); - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Server Configuration Section -// ---------------------------------------------------------------------------------- - - -// The root URL where the RAP_Pubby web application is installed, e.g. http://myserver/mydataset/. -define('PUBBY_WEBBASE', 'http://localhost/rdfapi-php/rap-pubby/'); - -// The URI of a resource which description will be displayed as the home page of the RAP_Pubby installation. -// Note that you have to specify a dataset URI, not a mapped web URI. -define('PUBBY_INDEX_RESOURCE', 'http://www4.wiwiss.fu-berlin.de/is-group/projects/RAP'); - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Database Configuration -// ---------------------------------------------------------------------------------- - -// Note: in order to serve a DbModel the $_PUBBY_DATASET['loadRDF'] parameter must be set to ''; -define('PUBBY_DB_DRIVER', ''); -define('PUBBY_DB_HOST', ''); -define('PUBBY_DB_DB', ''); -define('PUBBY_DB_USER', ''); -define('PUBBY_DB_PASS', ''); - -define('PUBBY_DBMODEL', ''); - - -// ---------------------------------------------------------------------------------- -// RAP_Pubby Dataset Configuration Section -// ---------------------------------------------------------------------------------- - -$_PUBBY_DATASET = array( - - // Load an RDF document from the Web or the file system and use it as the data source. - // If specified, the database connection configured above will be ignored. - 'loadRDF' => 'example/group.rdf', - - // The common URI prefix of the resource identifiers in the served dataset. - // Note: Only resources with this prefix will be mapped and made available by RAP_Pubby - 'datasetBase' => 'http://www4.wiwiss.fu-berlin.de/is-group/', - - // If present, only dateset URIs matching this regular expression will be mapped and made available by RAP_Pubby. - // The regular expression must match everything after the $_PUBBY_DATASET['datasetBase'] part of the URI. - // For example: datasetBase = 'http://example.org/' and datasetURIPattern = '/(users|documents)\/.*/' - // This will publish the dataset URI http://example.org/users/alice, - // but not http://example.org/invoices/5395842 because the URI part invoices/5395842 does not match the regular expression. - // default value = ''; - 'datasetURIPattern' => '', - - // If present, this string will be prefixed to the mapped web URIs. This is useful if you have to avoid potential name clashes - // with URIs already used by the server itself. For example, if the dataset includes a URI http://mydataset/page, - // and the dataset prefix is http://mydataset/, then there would be a clash after mapping because RAP_Pubby reserves - // the mapped URI http://myserver/mydataset/page for its own use. In this case, you may specify a prefix like "resource/", - // which will result in a mapped URI of http://myserver/mydataset/resource/page. - // NOTE: the prefix must end with "/" - 'webResourcePrefix' => '', - - // Links to an RDF document whose prefix declarations will be used in output. - // e.g. 'usePrefixesFrom' => 'prefixes.n3', You can use the file prefixes.n3 in rap-pubby directory as template. - // Defaults to the empty URL, which means the prefixes from the input RAP model will be used. - 'usePrefixesFrom' => 'prefixes.n3', - - // All statements inside the metadata file will be added as metadata to the RDF documents published - // for this dataset. This feature can be used for instance to add licensing information to your published documents. - // You can use the file metadata.n3 in rap-pubby directory as template. - 'rdfDocumentMetadata' => 'metadata.n3', - - - // If set to true, an owl:sameAs statement of the form owl:sameAs will be present in Linked Data output. - 'addSameAsStatements' => false, -); - - -// ---------------------------------------------------------------------------------- -// Pubby HTML Output Setting -// ---------------------------------------------------------------------------------- - -// URL of the template file used in HTML output -define ('PUBBY_HTML_SER__TEMPLATE', 'templ/template.html'); - -// URL of the template file rendering '404 - Not Found' information used in HTML output -define ('PUBBY_HTML_SER__TEMPLATE_404', 'templ/404_notFound.html'); - -// Link to directory where template includes (css-files, scripts, images) are located -define ('PUBBY_HTML_SER__TEMPL_INCL_DIR' , 'templ/'); - -// The name of the project, for display in page titles -define ('PUBBY_HTML_SER__PROJECT_NAME', 'PubbyExample@Localhost'); - -// A project homepage or similar URL, for linking in page titles -define ('PUBBY_HTML_SER__PROJECT_HOMEPAGE', 'http://localhost/rap-pubby/doc/RAP_Pubby.htm'); - -// For resource label and short description -define ('PUBBY_HTML_SER__DEFAULT_LANG', 'en'); - -// The value of these RDF properties, if present in the dataset, will be used as labels and page titles for resources. -// Note: If multiple properties are present only the first one found (in default language, if specified) will be showed. -$_PUBBY_HTML_SER['labelProperty'] = array ( - new Resource(RDF_SCHEMA_URI ."label"), - new Resource(DC_NS ."title"), - new Resource(FOAF_NS ."name"), -); - -// The value of these RDF properties, if present in the dataset, will be used as short textual description for resources. -// Note: If multiple properties are present only the first one found (in default language, if specified) will be showed. -$_PUBBY_HTML_SER['commentProperty'] = array ( - new Resource(RDF_SCHEMA_URI ."comment"), - new Resource(DC_NS ."description"), -); - -// The value of these RDF properties, if present in the dataset, will be used as an image URL to show a depiction of the item. -// Note: If multiple properties are present only the first one found will be showed. -$_PUBBY_HTML_SER['imageProperty'] = array ( - new Resource(FOAF_NS ."depiction"), -); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/all-wcprops deleted file mode 100755 index b33a71d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 63 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/doc -END -phpdoc.css -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/doc/phpdoc.css -END -RAP_Pubby.htm -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/doc/RAP_Pubby.htm -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/entries deleted file mode 100755 index 76ed9dca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/entries +++ /dev/null @@ -1,40 +0,0 @@ -8 - -dir -557 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/rap-pubby/doc -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-02-29T15:03:46.371483Z -557 -cax - - -svn:special svn:externals svn:needs-lock - -phpdoc.css -file - - - - -2007-12-19T13:07:45.171875Z -b194358205cefe2dec7b1c73214a5b69 -2008-02-29T15:03:46.371483Z -557 -cax - -RAP_Pubby.htm -file - - - - -2008-02-29T14:21:23.110666Z -d841017103fbbe15039521ae6e1740bb -2008-02-29T15:03:46.371483Z -557 -cax - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/RAP_Pubby.htm.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/RAP_Pubby.htm.svn-base deleted file mode 100755 index aa095918..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/RAP_Pubby.htm.svn-base +++ /dev/null @@ -1,290 +0,0 @@ - -RDF Net API - - - - - - -

    RDF API for PHP

    -

    RAP_Pubby - - - - A Linked Data Frontend for RAP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Radoslaw Oldakowski <radol@gmx.de>
    -Jan 2008

    -
    - -

    About

    -

    RAP_Pubby can be used to add Linked Data interfaces to RAP models.

    -

    Linked Data is a style of publishing data on the Semantic Web that makes it easy to interlink, discover and consume data on the Semantic Web. It allows a wide variety of existing RDF browsers (e.g. Disco , Tabulator , OpenLink Browser ), RDF crawlers (e.g. SWSE , Swoogle ), and query agents (e.g. SemWeb Client Library , SWIC ) to access the data.

    -

    RAP_Pubby was orignially inspired by Pubby - A Linked Data Frontend for SPARQL Endpoints.

    -

    Features:

    -
      -
    • Provides a linked data interface to RAP RDF models (file or database backed)
    • -
    • Provides dereferenceable URIs by rewriting URIs found in the exposed dataset into the RAP_Pubby server's namespace
    • -
    • Provides a simple template-based HTML interface showing the data available about each resource
    • -
    • Takes care of handling 303 redirects and content negotiation
    • -
    -

     

    -

    How It Works

    -

    In RDF, resources are identified by URIs. The URIs used in most RDF datasets are not dereferenceable , meaning they cannot be accessed in a Semantic Web browser, but return 404 Not Found errors instead, or use non-dereferenceable URI schemes, as in the fictional URI tag:dbpedia.org,2007:Berlin .

    -

    When setting up a RAP_Pubby server for your RDF data, you will configure a mapping that translates those URIs to dereferenceable URIs handled by RAP_Pubby. If your server is running at http://myserver.org:8080/rap-pubby/ , then the Berlin URI above might be mapped to http://myserver.org:8080/rap-pubby/Berlin .

    -

    RAP_Pubby will handle requests to the mapped URIs by asking the underlying RAP model for information about the original URI, and passing back the results to the client. It also handles various details of the HTTP interaction , such as the 303 redirect required by Web Architecture, and content negotiation between HTML, RDF/XML and N3 descriptions of the same resource.

    -

     

    -

    Installation

    - -

    -

    1. The first thing you need to do is to get mod-rewrite to redirect requests - to the rap_pubby.php handler script. To do this you need to make sure that the - rewrite module is enabled in the Apache configuration file "httpd.conf":
      -
      - - - - - - -

      LoadModule rewrite_module modules/mod_rewrite.so

      -
      - And to make sure that output buffering is turned on in the PHP configuration - file "php.ini":
      -
      - - - - - - -

      output_buffering = on

      -
      -
    2. -
    3. You need to edit the ".htaccess" file in the rap-pubby directory. Change the - 'RewriteBase' bit to reflect the URI base of the rap-pubbyi directory relative to the htdocs directory of your Apache server. E.g.
      -
      - - - - - - -

      RewriteEngine on
      - RewriteBase /rdfapi-php/rap-pubby/ #<---- Edit this
      - RewriteRule ^[^\.]*$ rap_pubby.php

      -
      - Note: the AllowOverride parameter in "httpd.conf" must be set to allow the use of an .htaccess file in the rap-pubby directory. -
      -
      -
    4. -
    5. Modify the "config.php" file in rap-pubby directory according to your needs (see next section).

      -
    6. -
    -

    Configuration

    -

    Include RAP Classes

    -
      -
    • -
      RDFAPI_INCLUDE_DIR
      -
    • -
    -

    !!! Required !!! Modify this if your rap-pubby is not installed in RAP subdirectory.

    -
    -

    RAP_Pubby Server Configuration

    -
      -
    • -
      PUBBY_WEBBASE
      -
    • -
    -

    !!! Required !!! The root URL where the RAP_Pubby web application is installed, e.g. http://myserver/mydataset/.

    -
      -
    • -
      PUBBY_INDEX_RESOURCE
      -
    • -
    -

    The URI of a resource which description will be displayed as the home page of the RAP_Pubby installation.
    -NOTE: you have to specify a dataset URI, not a mapped web URI.

    -

     

    -

    RAP_Pubby Database Configuration

    -

    Note: in order to serve a DbModel the $_PUBBY_DATASET['loadRDF'] parameter must be set to "".

    -
      -
    • -
      PUBBY_DB_DRIVER, PUBBY_DB_HOST, PUBBY_DB_DB, PUBBY_DB_USER, PUBBY_DB_PASS
      -
    • -
    -

    Database connection setting

    -
      -
    • -
      PUBBY_DBMODEL
      -
    • -
    -

    Name of the RAP DbModel to be served by RAP_Pubby

    -

    RAP_Pubby Dataset Configuration

    -
      -
    • -
      $_PUBBY_DATASET[''loadRDF'']
      -
    • -
    -

    Load an RDF document from the Web or the file system and use it as the data source. If specified, the database connection configured above will be ignored.

    -
      -
    • -
      $_PUBBY_DATASET['datasetBase']
      -
    • -
    -

    !!! Required !!! The common URI prefix of the resource identifiers in the served dataset.
    -NOTE: Only resources with this prefix will be mapped and made available by RAP_Pubby

    -
      -
    • -
      $_PUBBY_DATASET['datasetURIPattern']
      -
    • -
    -

    If present, only dateset URIs matching this regular expression will be mapped and made available by RAP_Pubby. The regular expression must match everything after the $_PUBBY_DATASET['datasetBase'] part of the URI. For example: datasetBase = 'http://example.org/' and datasetURIPattern = '/(users|documents)\/.*/' This will publish the dataset URI http://example.org/users/alice, but not http://example.org/invoices/5395842 because the URI part invoices/5395842 does not match the regular expression. default value = ''.

    -
      -
    • -
      $_PUBBY_DATASET['webResourcePrefix']
      -
    • -
    -

    If present, this string will be prefixed to the mapped web URIs. This is useful if you have to avoid potential name clashes with URIs already used by the server itself. For example, if the dataset includes a URI http://mydataset/page, and the dataset prefix is http://mydataset/, then there would be a clash after mapping because RAP_Pubby reserves the mapped URI http://myserver/mydataset/page for its own use. In this case, you may specify a prefix like "resource/", which will result in a mapped URI of http://myserver/mydataset/resource/page.
    -NOTE: the prefix must end with "/"

    -
      -
    • -
      $_PUBBY_DATASET['usePrefixesFrom']
      -
    • -
    -

    Links to an RDF document whose prefix declarations will be used in output. You can use the file prefixes.n3 in rap-pubby directory as template. If not specified the prefixes from the input RAP model will be used.

    -
      -
    • -
      $_PUBBY_DATASET['rdfDocumentMetadata']
      -
    • -
    -

    All statements inside the metadata file will be added as metadata to the RDF documents published for this dataset. This feature can be used for instance to add licensing information to your published documents. You can use the file metadata.n3 in rap-pubby directory as template.

    -
      -
    • -
      $_PUBBY_DATASET['addSameAsStatements']
      -
    • -
    -

    If set to true, an owl:sameAs statement of the form <web_uri> owl:sameAs <dataset_uri> will be present in Linked Data output.

    -

     

    -

    Pubby HTML Output Setting

    -
      -
    • -
      PUBBY_HTML_SER__TEMPLATE
      -
    • -
    -

    URL of the template file used in HTML output

    -
      -
    • -
      PUBBY_HTML_SER__TEMPLATE_404
      -
    • -
    -

    URL of the template file rendering '404 - Not Found' information used in HTML output

    -
      -
    • -
      PUBBY_HTML_SER__TEMPL_INCL_DIR
      -
    • -
    -

    Link to directory where template includes (css-files, scripts, images) are located

    -
      -
    • -
      PUBBY_HTML_SER__PROJECT_NAME
      -
    • -
    -

    The name of the project, for display in page titles

    -
      -
    • -
      PUBBY_HTML_SER__PROJECT_HOMEPAGE
      -
    • -
    -

    A project homepage or similar URL, for linking in page titles

    -
      -
    • -
      PUBBY_HTML_SER__DEFAULT_LANG
      -
    • -
    -

    Default language for resource label and short description

    -
      -
    • -
      $_PUBBY_HTML_SER['labelProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as labels and page titles for resources.
    - NOTE: If multiple properties are present only the first one found (in default language, if specified) will be showed.

    -
      -
    • -
      $_PUBBY_HTML_SER['commentProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as short textual description for resources.
    -NOTE: If multiple properties are present only the first one found (in default language, if specified) will be showed.

    -
      -
    • -
      $_PUBBY_HTML_SER['imageProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as an image URL to show a depiction of the item.
    -NOTE: If multiple properties are present only the first one found will be showed.


    -

    Using Your Own HTML Templates

    -

    In RAP_Pubby you can use your own HTML templates. RAPpubbyHTMLserializer loads an html template file specified in the config.php and replaces the placeholders inside a template with dynamically generated content. Following placeholders are allowed:

    -
      -
    • -
      ##_templInclDirURL_##
      -
    • -
    -Will be replaced with PUBBY_HTML_SER__TEMPL_INCL_DIR constant from config.php -
      -
    • -
      ##_projetName_##
      -
    • -
    -Will be replaced with PUBBY_HTML_SER__PROJECT_NAME constant from config.php -
      -
    • -
      ##_projectHomepage_##
      -
    • -
    -

    Will be replaced with PUBBY_HTML_SER__PROJECT_HOMEPAGE constant from config.php

    -
      -
    • -
      ##_resURI_##
      -
    • -
    -

    Will be replaced with the URI of the resource beeing described

    -
      -
    • -
      ##_repURIdata_##
      -
    • -
    -

    Will be replaced with the URI of the resource representation in RDF/XML format. (For URIs of the resource representation in n3 place ##_repURIdata_##?output=n3)

    -
      -
    • -
      ##_resourceLabel_##
      -
    • -
    -

    Will be replaced with the value of the label property of the URI beeing described, according to $_PUBBY_HTML_SER['labelProperty'] in config.php -

    -
      -
    • -
      ##_shortDescription_##
      -
    • -
    -

    Will be replaced with the value of the comment property of the URI beeing described, according to $_PUBBY_HTML_SER['commentProperty'] in config.php

    -
      -
    • -
      ##_imgLink_##
      -
    • -
    -

    Will be replaced with the value of the image property of the URI beeing described, according to $_PUBBY_HTML_SER['imageProperty'] in config.php

    -
      -
    • -
      ##_prop_tableRows_##
      -
    • -
    -

    Will be replaced with table rows containing 'property - property value' pairs of the resource beeing described. The styling of odd and even table rows can be altered in your css file by defining 'odd' and 'even' classes respectively.

    -

     

    -

    Use Case Example

    -

    RAP_Pubby distribution contains a small use case example showing information about the Web-based Systems Group @ Freie Universitt Berlin. To run this example: -

  • install RAP_Pubby (see installation section)
  • -
  • open config.php and modify the paramters RDFAPI_INCLUDE_DIR and PUBBY_WEBBASE
  • -
  • type the PUBBY_WEBBASE-URL into the address bar of your web browser
  • -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/phpdoc.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/phpdoc.css.svn-base deleted file mode 100755 index 004c5a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/.svn/text-base/phpdoc.css.svn-base +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/RAP_Pubby.htm b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/RAP_Pubby.htm deleted file mode 100755 index aa095918..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/RAP_Pubby.htm +++ /dev/null @@ -1,290 +0,0 @@ - -RDF Net API - - - - - - -

    RDF API for PHP

    -

    RAP_Pubby - - - - A Linked Data Frontend for RAP

    -

    This document is part of the RAP - Rdf API for PHP documentation.

    -

    Radoslaw Oldakowski <radol@gmx.de>
    -Jan 2008

    -
    - -

    About

    -

    RAP_Pubby can be used to add Linked Data interfaces to RAP models.

    -

    Linked Data is a style of publishing data on the Semantic Web that makes it easy to interlink, discover and consume data on the Semantic Web. It allows a wide variety of existing RDF browsers (e.g. Disco , Tabulator , OpenLink Browser ), RDF crawlers (e.g. SWSE , Swoogle ), and query agents (e.g. SemWeb Client Library , SWIC ) to access the data.

    -

    RAP_Pubby was orignially inspired by Pubby - A Linked Data Frontend for SPARQL Endpoints.

    -

    Features:

    -
      -
    • Provides a linked data interface to RAP RDF models (file or database backed)
    • -
    • Provides dereferenceable URIs by rewriting URIs found in the exposed dataset into the RAP_Pubby server's namespace
    • -
    • Provides a simple template-based HTML interface showing the data available about each resource
    • -
    • Takes care of handling 303 redirects and content negotiation
    • -
    -

     

    -

    How It Works

    -

    In RDF, resources are identified by URIs. The URIs used in most RDF datasets are not dereferenceable , meaning they cannot be accessed in a Semantic Web browser, but return 404 Not Found errors instead, or use non-dereferenceable URI schemes, as in the fictional URI tag:dbpedia.org,2007:Berlin .

    -

    When setting up a RAP_Pubby server for your RDF data, you will configure a mapping that translates those URIs to dereferenceable URIs handled by RAP_Pubby. If your server is running at http://myserver.org:8080/rap-pubby/ , then the Berlin URI above might be mapped to http://myserver.org:8080/rap-pubby/Berlin .

    -

    RAP_Pubby will handle requests to the mapped URIs by asking the underlying RAP model for information about the original URI, and passing back the results to the client. It also handles various details of the HTTP interaction , such as the 303 redirect required by Web Architecture, and content negotiation between HTML, RDF/XML and N3 descriptions of the same resource.

    -

     

    -

    Installation

    - -

    -

    1. The first thing you need to do is to get mod-rewrite to redirect requests - to the rap_pubby.php handler script. To do this you need to make sure that the - rewrite module is enabled in the Apache configuration file "httpd.conf":
      -
      - - - - - - -

      LoadModule rewrite_module modules/mod_rewrite.so

      -
      - And to make sure that output buffering is turned on in the PHP configuration - file "php.ini":
      -
      - - - - - - -

      output_buffering = on

      -
      -
    2. -
    3. You need to edit the ".htaccess" file in the rap-pubby directory. Change the - 'RewriteBase' bit to reflect the URI base of the rap-pubbyi directory relative to the htdocs directory of your Apache server. E.g.
      -
      - - - - - - -

      RewriteEngine on
      - RewriteBase /rdfapi-php/rap-pubby/ #<---- Edit this
      - RewriteRule ^[^\.]*$ rap_pubby.php

      -
      - Note: the AllowOverride parameter in "httpd.conf" must be set to allow the use of an .htaccess file in the rap-pubby directory. -
      -
      -
    4. -
    5. Modify the "config.php" file in rap-pubby directory according to your needs (see next section).

      -
    6. -
    -

    Configuration

    -

    Include RAP Classes

    -
      -
    • -
      RDFAPI_INCLUDE_DIR
      -
    • -
    -

    !!! Required !!! Modify this if your rap-pubby is not installed in RAP subdirectory.

    -
    -

    RAP_Pubby Server Configuration

    -
      -
    • -
      PUBBY_WEBBASE
      -
    • -
    -

    !!! Required !!! The root URL where the RAP_Pubby web application is installed, e.g. http://myserver/mydataset/.

    -
      -
    • -
      PUBBY_INDEX_RESOURCE
      -
    • -
    -

    The URI of a resource which description will be displayed as the home page of the RAP_Pubby installation.
    -NOTE: you have to specify a dataset URI, not a mapped web URI.

    -

     

    -

    RAP_Pubby Database Configuration

    -

    Note: in order to serve a DbModel the $_PUBBY_DATASET['loadRDF'] parameter must be set to "".

    -
      -
    • -
      PUBBY_DB_DRIVER, PUBBY_DB_HOST, PUBBY_DB_DB, PUBBY_DB_USER, PUBBY_DB_PASS
      -
    • -
    -

    Database connection setting

    -
      -
    • -
      PUBBY_DBMODEL
      -
    • -
    -

    Name of the RAP DbModel to be served by RAP_Pubby

    -

    RAP_Pubby Dataset Configuration

    -
      -
    • -
      $_PUBBY_DATASET[''loadRDF'']
      -
    • -
    -

    Load an RDF document from the Web or the file system and use it as the data source. If specified, the database connection configured above will be ignored.

    -
      -
    • -
      $_PUBBY_DATASET['datasetBase']
      -
    • -
    -

    !!! Required !!! The common URI prefix of the resource identifiers in the served dataset.
    -NOTE: Only resources with this prefix will be mapped and made available by RAP_Pubby

    -
      -
    • -
      $_PUBBY_DATASET['datasetURIPattern']
      -
    • -
    -

    If present, only dateset URIs matching this regular expression will be mapped and made available by RAP_Pubby. The regular expression must match everything after the $_PUBBY_DATASET['datasetBase'] part of the URI. For example: datasetBase = 'http://example.org/' and datasetURIPattern = '/(users|documents)\/.*/' This will publish the dataset URI http://example.org/users/alice, but not http://example.org/invoices/5395842 because the URI part invoices/5395842 does not match the regular expression. default value = ''.

    -
      -
    • -
      $_PUBBY_DATASET['webResourcePrefix']
      -
    • -
    -

    If present, this string will be prefixed to the mapped web URIs. This is useful if you have to avoid potential name clashes with URIs already used by the server itself. For example, if the dataset includes a URI http://mydataset/page, and the dataset prefix is http://mydataset/, then there would be a clash after mapping because RAP_Pubby reserves the mapped URI http://myserver/mydataset/page for its own use. In this case, you may specify a prefix like "resource/", which will result in a mapped URI of http://myserver/mydataset/resource/page.
    -NOTE: the prefix must end with "/"

    -
      -
    • -
      $_PUBBY_DATASET['usePrefixesFrom']
      -
    • -
    -

    Links to an RDF document whose prefix declarations will be used in output. You can use the file prefixes.n3 in rap-pubby directory as template. If not specified the prefixes from the input RAP model will be used.

    -
      -
    • -
      $_PUBBY_DATASET['rdfDocumentMetadata']
      -
    • -
    -

    All statements inside the metadata file will be added as metadata to the RDF documents published for this dataset. This feature can be used for instance to add licensing information to your published documents. You can use the file metadata.n3 in rap-pubby directory as template.

    -
      -
    • -
      $_PUBBY_DATASET['addSameAsStatements']
      -
    • -
    -

    If set to true, an owl:sameAs statement of the form <web_uri> owl:sameAs <dataset_uri> will be present in Linked Data output.

    -

     

    -

    Pubby HTML Output Setting

    -
      -
    • -
      PUBBY_HTML_SER__TEMPLATE
      -
    • -
    -

    URL of the template file used in HTML output

    -
      -
    • -
      PUBBY_HTML_SER__TEMPLATE_404
      -
    • -
    -

    URL of the template file rendering '404 - Not Found' information used in HTML output

    -
      -
    • -
      PUBBY_HTML_SER__TEMPL_INCL_DIR
      -
    • -
    -

    Link to directory where template includes (css-files, scripts, images) are located

    -
      -
    • -
      PUBBY_HTML_SER__PROJECT_NAME
      -
    • -
    -

    The name of the project, for display in page titles

    -
      -
    • -
      PUBBY_HTML_SER__PROJECT_HOMEPAGE
      -
    • -
    -

    A project homepage or similar URL, for linking in page titles

    -
      -
    • -
      PUBBY_HTML_SER__DEFAULT_LANG
      -
    • -
    -

    Default language for resource label and short description

    -
      -
    • -
      $_PUBBY_HTML_SER['labelProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as labels and page titles for resources.
    - NOTE: If multiple properties are present only the first one found (in default language, if specified) will be showed.

    -
      -
    • -
      $_PUBBY_HTML_SER['commentProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as short textual description for resources.
    -NOTE: If multiple properties are present only the first one found (in default language, if specified) will be showed.

    -
      -
    • -
      $_PUBBY_HTML_SER['imageProperty']
      -
    • -
    -

    The value of these RDF properties, if present in the dataset, will be used as an image URL to show a depiction of the item.
    -NOTE: If multiple properties are present only the first one found will be showed.


    -

    Using Your Own HTML Templates

    -

    In RAP_Pubby you can use your own HTML templates. RAPpubbyHTMLserializer loads an html template file specified in the config.php and replaces the placeholders inside a template with dynamically generated content. Following placeholders are allowed:

    -
      -
    • -
      ##_templInclDirURL_##
      -
    • -
    -Will be replaced with PUBBY_HTML_SER__TEMPL_INCL_DIR constant from config.php -
      -
    • -
      ##_projetName_##
      -
    • -
    -Will be replaced with PUBBY_HTML_SER__PROJECT_NAME constant from config.php -
      -
    • -
      ##_projectHomepage_##
      -
    • -
    -

    Will be replaced with PUBBY_HTML_SER__PROJECT_HOMEPAGE constant from config.php

    -
      -
    • -
      ##_resURI_##
      -
    • -
    -

    Will be replaced with the URI of the resource beeing described

    -
      -
    • -
      ##_repURIdata_##
      -
    • -
    -

    Will be replaced with the URI of the resource representation in RDF/XML format. (For URIs of the resource representation in n3 place ##_repURIdata_##?output=n3)

    -
      -
    • -
      ##_resourceLabel_##
      -
    • -
    -

    Will be replaced with the value of the label property of the URI beeing described, according to $_PUBBY_HTML_SER['labelProperty'] in config.php -

    -
      -
    • -
      ##_shortDescription_##
      -
    • -
    -

    Will be replaced with the value of the comment property of the URI beeing described, according to $_PUBBY_HTML_SER['commentProperty'] in config.php

    -
      -
    • -
      ##_imgLink_##
      -
    • -
    -

    Will be replaced with the value of the image property of the URI beeing described, according to $_PUBBY_HTML_SER['imageProperty'] in config.php

    -
      -
    • -
      ##_prop_tableRows_##
      -
    • -
    -

    Will be replaced with table rows containing 'property - property value' pairs of the resource beeing described. The styling of odd and even table rows can be altered in your css file by defining 'odd' and 'even' classes respectively.

    -

     

    -

    Use Case Example

    -

    RAP_Pubby distribution contains a small use case example showing information about the Web-based Systems Group @ Freie Universitt Berlin. To run this example: -

  • install RAP_Pubby (see installation section)
  • -
  • open config.php and modify the paramters RDFAPI_INCLUDE_DIR and PUBBY_WEBBASE
  • -
  • type the PUBBY_WEBBASE-URL into the address bar of your web browser
  • -

    -
    - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/phpdoc.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/phpdoc.css deleted file mode 100755 index 004c5a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/doc/phpdoc.css +++ /dev/null @@ -1,288 +0,0 @@ -BODY { - background-color : #FFFFFF; - color : #000000; - font-family : Verdana, Arial, sans-serif; - font-size : smaller; - margin-left : 1em; - margin-right : 1em; -} - -td { - font-size: smaller -} - -A { - -} - -A:LINK, A:VISITED { - color : #000099; - text-decoration : none; -} - -A:HOVER { - background-color : #FFFFFF; - color : #00009F; - text-decoration : underline; -} - -H2 { - color : Black; - font-size : 13pt; - font-weight: 400; - letter-spacing: .2em; - background-color: #CCCCCC; - padding: .4em; -} - -H3 { - color : Navy; - font-size : 12pt; - margin-top :1em; -} - -H4 { - color : Navy; - font-size : 10pt; - background-color : #E6E6FA; - padding-bottom : .5em; - padding-top : .5em; - padding-left : .5em; - -} - -H5 { - color : Navy; - font-size : 10pt; - font-weight : 900; - margin-bottom : -1em; -} - -BLOCKQUOTE { - margin-left : 0; -} - -CAPTION { - font-weight : 800; -} - -TH { - background-color : #CCCCCC; -} - -CODE { - font-size: 9pt; -} - -.MODULE_NAME { - color : Black; - background-color: #D9ECFF; - font-size : 16pt; - margin-bottom : .1em; - padding-top : 5px; - padding-left : 5px; -} - - .PACKAGE_NAME { - padding: .2em; - padding-left: .2em; - color : #000000; - background-color: #D9FBFF; - font-size : 9pt; - font-weight : 800; - margin-bottom : -2em; -} - - .PACKAGE_IN_NAV { - color : #000000; - font-size : 9pt; - -} - - - -.COPYRIGHT { - font-size: 8pt; -} - -.COPYRIGHT, .CLASS_FIELD_CONTENT { - margin-right: 1.5in; - margin-left: 1em; -} - -.FIELD_LABEL { - background-color: #FFCCCC; - padding: .15em; - -} - -.public_CLASS_FUNCTION_TABLE .public_METHOD_FUNCTION_TABLE { - background-color: #DABD89; -} - - - -.private_CLASS_FUNCTION_TABLE, .private_METHOD_FUNCTION_TABLE { - background-color: #FFFFFF; -} - - -.public_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #9999FF; - padding: .2em; -} - -.private_FUNCTION_DETAIL_NAME { - font-weight: bold; - font-size: 11pt; - color: black; - background-color: #CCCCCC; - padding: .2em; -} - -.public_FUNCTION_DETAIL_SPAN, .private_FUNCTION_DETAIL_SPAN { - color: #333333; - margin-left: .5em; - margin-right: .75em; - font-style: bold; -} - -.FUNCTION_DIVIDER, .ELEMENT_LIST_DIVIDER { - width: 20em; - height: .2em; - color: black; -} - -.VARIABLE_DIVIDER { - width: 20em; - height: .2em; - color: red; -} - -.CONSTANTS_DIVIDER { - width: 20em; - height: .2em; - color: blue; -} - -.FUNCTION_DETAILS_LABEL { - Abackground-color: #AACCFF; -} - -.FUNCTION_DETAILS_CONTENT { - Abackground-color: #CCFF99; -} - -.FUNCTION_DETAILS_AUTHOR { - font-size: 11 pt; -} - -.FUNCTION_DETAILS_NAME_CELL { - Abackground-color: green; -} - -.FUNCTION_DETAILS_PARAMETER_CELL { - background-color: #FFFFCC; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_PARAMETER_TOP_CELL { - background-color: #DDDDDD; - padding-left: .5em; - padding-right: .5em; - padding-top: 0em; - padding-bottom: 0em; -} - -.FUNCTION_DETAILS_NAME_CELL { - background-color: purple; - -} - -.TOP_NAV_LINK { - text-align: left; -} - -.TOP_NAV_LINK A:LINK { - color: black; -} - -.TOP_NAV_LINK A:VISTED { - color: black; - background-color: white; -} - -.TOP_NAV_LINK A:HOVER { - color: black; - background-color: orange; - text-decoration: underline; -} - -.TOP_NAV_BAR { - background-color: #99CCFF; - padding: .2em; -} - -.MAIN_TITLE { - font-size: 13pt; - font-weight: bold; - margin-bottom: -1.5em; - margin-top: 0em; -} - -.SUB_TITLE { - font-size: 11pt; - font-weight: bold; - background-color: #E7E8E3; - padding-left: .3em; - margin-bottom: -1em; - margin-top: 2em; -} - -.SECTION_TITLE, .SECTION_TITLE_SPAN { - font-size: 10pt; - margin-left: 0em; - margin-bottom: -1.4em; -} - -.SECTION_TITLE_SPAN { - text-decoration: underline; - background-color: #CFDDEB; - padding-right: 5em; -} -.ELEMENT_NAME { - font-size: 8pt; - margin-bottom: -1.6em; - margin-left: 1.5em; -} - -.APP_NAME { - font-size: 20pt; - font-weight: 600; -} - -.CLASSES_DIV, .MODULES_DIV { - background-color: #CFDDEB; - margin-left: 1em; - padding-left: 1em; -} - -.PACKAGE_DIV { - background-color: BLACK; - margin-left: -.5em; - padding-left: .5em; -} - -.MAJOR_SECTION { - background-color: #FFFFCC; - padding: 1em; -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/all-wcprops deleted file mode 100755 index fdec56d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/example -END -group.rdf -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/example/group.rdf -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/entries deleted file mode 100755 index 780128b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/entries +++ /dev/null @@ -1,28 +0,0 @@ -8 - -dir -557 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/rap-pubby/example -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-02-29T15:03:46.371483Z -557 -cax - - -svn:special svn:externals svn:needs-lock - -group.rdf -file - - - - -2008-02-29T13:25:12.594383Z -11d373fa587ca3a97c81c242c506cd64 -2008-02-29T15:03:46.371483Z -557 -cax - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/text-base/group.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/text-base/group.rdf.svn-base deleted file mode 100755 index 5a46ffb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/.svn/text-base/group.rdf.svn-base +++ /dev/null @@ -1,834 +0,0 @@ - - - - - - Daniel - Daniel Westphal - Westphal - - - - - - - - Disco - Hyperdata Browser - Disco - Hyperdata Browser - Java - The Disco - Hyperdata Browser is a simple browser for navigating the Semantic Web as an unbound set of data sources. The browser renders all information, that it can find on the Semantic Web about a specific resource, as an HTML page. This resource description contains hyperlinks that allow you to navigate between resources. While you move from resource to resource, the browser dynamically retrieves information by dereferencing HTTP URIs and by following rdfs:seeAlso links. - - - platform independent - Disco - - - - - - - Libby - Libby - Libby Miller - Miller - - - - - - - - - - - Workshop on Scripting for the Semantic Web - Workshop on Scripting for the Semantic Web - 2005-05-30 - - - - - - - - - Freie und Hansestadt Hamburg - - - - Knowledge Representation Languages - - - - Chiba - - - - Heraklion - - - - - Department of Business and Economics - Department of Business and Economics - - - - - - Emmanuel - Emmanuel Pietriga - Pietriga - - - - - - - - Rowland - Rowland Watkins - Watkins - - - - World Wide Web - - - - - - ISWC 2005 - 4th International Semantic Web Conference - ISWC 2005 - 4th International Semantic Web Conference - - - - - Greece - - - - - - ISWC 2006 5th International Semantic Web Conference - ISWC 2006 5th International Semantic Web Conference - - - - - Germany - - - - - - Sören - Sören Auer - Auer - - - - - - - - Query Languages - - - - - - - - - - - - - - - Veronika - Veronika Waue - Waue - - - - - - - - - - - - - Named Graphs, Provenance and Trust - en - Named Graphs, Provenance and Trust - The Semantic Web consists of many RDF graphs nameable by -URIs. This paper extends the syntax and semantics of RDF to cover -such Named Graphs..... - - - - XML - - - - - - - - - - - - - - - - - - - - - - - ChrisB - Chris - Chris Bizer - Bizer - - - - - - - - - - Athens - - - - - - - - - - - - - - - - Richard - Richard Cyganiak - Cyganiak - - - - - - - - - - United States - - - - Knowledge Systems - - - - - - - - - - - - - - - - - Sebastian - Sebastian Thimm - Thimm - - - - - - - - - - WIQA - Information Quality Assessment enabled Semantic Web Browser - WIQA - Information Quality Assessment enabled Semantic Web Browser - Java - The WIQA browser is a general purpose RDF browser that supports users in exploring RDF datasets containing information from multiple sources. - plattform independent - WIQA Browser - - - - - - - Freie Universität Berlin - Freie Universität Berlin - - - - - - - - - - - Freie Universität Berlin - Web-based Systems Group - Freie Universität Berlin - Web-based Systems Group - - The Web-based Systems Group explores technical and economic questions concerning the development of global, decentralized information environments. - - - - Ireland - - - - Budva - - - - - - - - Proceedings of the ESWC'06 -Workshop on Scripting for the Semantic Web. - en - Proceedings of the ESWC'06 -Workshop on Scripting for the Semantic Web. - - - - - - - - - - - - - Tobi - Tobias - Tobias Gauß - Gauß - - - - - - - WWW2005 - 14th International World Wide Web Conference 2005 - WWW2005 - 14th International World Wide Web Conference 2005 - 2005-05-10 - - - - - PhDStudent - - - - Conference - - - - Japan - - - - Academic Staff - - - - - - - - - RAP: RDF API for PHP - en - RAP: RDF API for PHP - RAP - RDF API for PHP is a Semantic Web toolkit for PHP developers. It offers features for parsing, manipulating, storing, querying, serving, and serializing RDF graphs..... - - - - Web Services - - - - - SemMF: A Framework for Calculating Semantic Similarity of Objects Represented as RDF Graphs - en - SemMF: A Framework for Calculating Semantic Similarity of Objects Represented as RDF Graphs - In this paper we introduce an easy-to-use, flexible, -open source framework for computing semantic -similarity between objects represented as arbitrary -RDF graphs, based on similarities of specified object -properties..... - - - - - - D2R Server - Publishing Relational Databases on the Semantic Web - D2R Server - Publishing Relational Databases on the Semantic Web - Java - D2R Server is a tool for publishing relational databases on the Semantic Web - plattform independent - D2R Server - - - - - - - Knowledge Management - - - - Montenegro - - - - Workshop - - - - Lecture - - - - Semantic Web - - - - - - - - - - - - - The TriQL.P Browser: Filtering Information using Context-, Content- and Rating-Based Trust Policies. - en - The TriQL.P Browser: Filtering Information using Context-, Content- and Rating-Based Trust Policies. - The TriQL.P browser is a general purpose RDF browser that -supports users in exploring RDF datasets containing information from -multiple information sources. - - - - Text Mining - - - - - - - ESWC 2005 - 2nd Annual European Semantic Web Conference - ESWC 2005 - 2nd Annual European Semantic Web Conference - - - - - - Lehrstuhl für Wirtschaftsinformatik - Lehrstuhl für Wirtschaftsinformatik - - - - - - - NG4J - Named Graphs API for Jena - NG4J - Named Graphs API for Jena - Java - NG4J - Named Graphs API for Jena is a software toolkit for creating, manipulating, persisting, and exchanging sets of Named Graphs . - plattform independent - NG4J - - - - - - - - - - D2R Server - Publishing Releational Databases on the Semantic Web. - en - D2R Server - Publishing Releational Databases on the Semantic Web. - D2R Server is a tool for publishing the content -of relational databases on the Semantic Web..... - - - - - - - - - - ESWC 2006 - 3rd Annual European Semantic Web Conference - ESWC 2006 - 3rd Annual European Semantic Web Conference - - - - - - - - - RAP - RDF API for PHP - RAP - RDF API for PHP - PHP - RDF API for PHP is a software package for parsing, searching, manipulating, serializing and serving RDF models. - plattform independent - RAP - - - - - - - - - - - - - - - - - - - - Radoslaw - Radoslaw Oldakowski - Oldakowski - - - - - - - - E-Business - - - - Semantic Web Infrastructure - - - - - David - David Karger - Karger - - - - - - - Jeremy - Jeremy Carroll - Carroll - - - - - - - - - - NG4J - Named Graphs API for Jena - en - NG4J - Named Graphs API for Jena - Named Graphs are a simple extension to the RDF abstract syntax -and enable statements to be made about RDF graphs.... - - - - - - - - Entscheidungsunterstützende Systeme (EUS) - Entscheidungsunterstützende Systeme (EUS) - - - - - - - SemMF: Semantic Matching Framework - SemMF: Semantic Matching Framework - Java - SemMF is an easy-to-use flexible framework for calculating semantic similarity between objects represented as arbitrary RDF Graphs, based on similarities of specified properties. - plattform independent - SemMF - - - - - - - Artificial Intelligence - - - - - - D2RQ - Treating Non-RDF Databases as Virtual RDF Graphs - D2RQ - Treating Non-RDF Databases as Virtual RDF Graphs - Java - D2RQ is a declarative language to describe mappings between relational database schemata and OWL/RDFS ontologies. The mappings allow RDF applications to access the content of huge, non-RDF databases using Semantic Web query languages like SPARQL. - plattform independent - D2RQ - - - - - - - - Named Graphs meet SPARQL - Named Graphs meet SPARQL - - - - - - - - - - voodoo - Oliver - Oliver Maresch - Maresch - - - - - - - - Ryan - Ryan Lee - Lee - - - - - - - RDF Book Mashup - RDF Book Mashup - PHP - The RDF book mashup demonstrates how Web 2.0 data sources like Amazon, Google or Yahoo can be integrated into the Semantic Web. This mashup assigns dereference-able URIs to books, authors, reviews, online bookstores and purchase offers. Whenever a URI is dereferenced, the mashup queries the Amazon API for information about the book and the Google Base API for purchase offers from different bookstores that sell the book. The query results are returned as an RDF graph to the client. - plattform independent - RDF Book Mashup - - - - - - - - Garystr. 21 - 14195 - - - - - - - - - - - - - - Swantje - Swantje Friedrich - Friedrich - - - - - - - - - - - Nico - Nicolai - Nicolai Endres - Endres - - - - - - - - Galway - - - - Semantic Web Languages - - - - Semantic Annotation - - - - - - WIQA - Information Quality Assessment Framework - WIQA - Information Quality Assessment Framework - Java - The WIQA - Information Quality Assessment Framework is a set of software components that empowers information consumers to employ a wide range of different information quality assessment policies to filter information from the Web. - plattform independent - WIQA Framework - - - - - - - - - - - - - - - - - - Uwe - Uwe Suhl - Suhl - - - - - - - Berlin - - - - Patrick - Patrick Hayes - Hayes - - - - - - - Professor - - - - - Update on Semantic Web Toolkits for Scripting Languages. - en - Update on Semantic Web Toolkits for Scripting Languages. - - - - - - - - Databases - - - - Patrick - Patrick Stickler - Stickler - - - - - - - - - - - Fresnel: A Browser-Independent Presentation -Vocabulary for RDF - en - Fresnel: A Browser-Independent Presentation -Vocabulary for RDF - Abstract. SemanticWeb browsers and other tools aimed at displaying RDF data -to end users are all concerned with the same problem: presenting content primarily -intended for machine consumption in a human-readable way..... - - - - - - - Semantic Web Client Library - Semantic Web Client Library - Java - The Sematic Web Client Library represents the complete Semantic Web as a single RDF graph. The library enables applications to query this global graph using SPARQL- and find(SPO) queries. - plattform independent - Semantic Web Client Library - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/group.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/group.rdf deleted file mode 100755 index 5a46ffb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/example/group.rdf +++ /dev/null @@ -1,834 +0,0 @@ - - - - - - Daniel - Daniel Westphal - Westphal - - - - - - - - Disco - Hyperdata Browser - Disco - Hyperdata Browser - Java - The Disco - Hyperdata Browser is a simple browser for navigating the Semantic Web as an unbound set of data sources. The browser renders all information, that it can find on the Semantic Web about a specific resource, as an HTML page. This resource description contains hyperlinks that allow you to navigate between resources. While you move from resource to resource, the browser dynamically retrieves information by dereferencing HTTP URIs and by following rdfs:seeAlso links. - - - platform independent - Disco - - - - - - - Libby - Libby - Libby Miller - Miller - - - - - - - - - - - Workshop on Scripting for the Semantic Web - Workshop on Scripting for the Semantic Web - 2005-05-30 - - - - - - - - - Freie und Hansestadt Hamburg - - - - Knowledge Representation Languages - - - - Chiba - - - - Heraklion - - - - - Department of Business and Economics - Department of Business and Economics - - - - - - Emmanuel - Emmanuel Pietriga - Pietriga - - - - - - - - Rowland - Rowland Watkins - Watkins - - - - World Wide Web - - - - - - ISWC 2005 - 4th International Semantic Web Conference - ISWC 2005 - 4th International Semantic Web Conference - - - - - Greece - - - - - - ISWC 2006 5th International Semantic Web Conference - ISWC 2006 5th International Semantic Web Conference - - - - - Germany - - - - - - Sören - Sören Auer - Auer - - - - - - - - Query Languages - - - - - - - - - - - - - - - Veronika - Veronika Waue - Waue - - - - - - - - - - - - - Named Graphs, Provenance and Trust - en - Named Graphs, Provenance and Trust - The Semantic Web consists of many RDF graphs nameable by -URIs. This paper extends the syntax and semantics of RDF to cover -such Named Graphs..... - - - - XML - - - - - - - - - - - - - - - - - - - - - - - ChrisB - Chris - Chris Bizer - Bizer - - - - - - - - - - Athens - - - - - - - - - - - - - - - - Richard - Richard Cyganiak - Cyganiak - - - - - - - - - - United States - - - - Knowledge Systems - - - - - - - - - - - - - - - - - Sebastian - Sebastian Thimm - Thimm - - - - - - - - - - WIQA - Information Quality Assessment enabled Semantic Web Browser - WIQA - Information Quality Assessment enabled Semantic Web Browser - Java - The WIQA browser is a general purpose RDF browser that supports users in exploring RDF datasets containing information from multiple sources. - plattform independent - WIQA Browser - - - - - - - Freie Universität Berlin - Freie Universität Berlin - - - - - - - - - - - Freie Universität Berlin - Web-based Systems Group - Freie Universität Berlin - Web-based Systems Group - - The Web-based Systems Group explores technical and economic questions concerning the development of global, decentralized information environments. - - - - Ireland - - - - Budva - - - - - - - - Proceedings of the ESWC'06 -Workshop on Scripting for the Semantic Web. - en - Proceedings of the ESWC'06 -Workshop on Scripting for the Semantic Web. - - - - - - - - - - - - - Tobi - Tobias - Tobias Gauß - Gauß - - - - - - - WWW2005 - 14th International World Wide Web Conference 2005 - WWW2005 - 14th International World Wide Web Conference 2005 - 2005-05-10 - - - - - PhDStudent - - - - Conference - - - - Japan - - - - Academic Staff - - - - - - - - - RAP: RDF API for PHP - en - RAP: RDF API for PHP - RAP - RDF API for PHP is a Semantic Web toolkit for PHP developers. It offers features for parsing, manipulating, storing, querying, serving, and serializing RDF graphs..... - - - - Web Services - - - - - SemMF: A Framework for Calculating Semantic Similarity of Objects Represented as RDF Graphs - en - SemMF: A Framework for Calculating Semantic Similarity of Objects Represented as RDF Graphs - In this paper we introduce an easy-to-use, flexible, -open source framework for computing semantic -similarity between objects represented as arbitrary -RDF graphs, based on similarities of specified object -properties..... - - - - - - D2R Server - Publishing Relational Databases on the Semantic Web - D2R Server - Publishing Relational Databases on the Semantic Web - Java - D2R Server is a tool for publishing relational databases on the Semantic Web - plattform independent - D2R Server - - - - - - - Knowledge Management - - - - Montenegro - - - - Workshop - - - - Lecture - - - - Semantic Web - - - - - - - - - - - - - The TriQL.P Browser: Filtering Information using Context-, Content- and Rating-Based Trust Policies. - en - The TriQL.P Browser: Filtering Information using Context-, Content- and Rating-Based Trust Policies. - The TriQL.P browser is a general purpose RDF browser that -supports users in exploring RDF datasets containing information from -multiple information sources. - - - - Text Mining - - - - - - - ESWC 2005 - 2nd Annual European Semantic Web Conference - ESWC 2005 - 2nd Annual European Semantic Web Conference - - - - - - Lehrstuhl für Wirtschaftsinformatik - Lehrstuhl für Wirtschaftsinformatik - - - - - - - NG4J - Named Graphs API for Jena - NG4J - Named Graphs API for Jena - Java - NG4J - Named Graphs API for Jena is a software toolkit for creating, manipulating, persisting, and exchanging sets of Named Graphs . - plattform independent - NG4J - - - - - - - - - - D2R Server - Publishing Releational Databases on the Semantic Web. - en - D2R Server - Publishing Releational Databases on the Semantic Web. - D2R Server is a tool for publishing the content -of relational databases on the Semantic Web..... - - - - - - - - - - ESWC 2006 - 3rd Annual European Semantic Web Conference - ESWC 2006 - 3rd Annual European Semantic Web Conference - - - - - - - - - RAP - RDF API for PHP - RAP - RDF API for PHP - PHP - RDF API for PHP is a software package for parsing, searching, manipulating, serializing and serving RDF models. - plattform independent - RAP - - - - - - - - - - - - - - - - - - - - Radoslaw - Radoslaw Oldakowski - Oldakowski - - - - - - - - E-Business - - - - Semantic Web Infrastructure - - - - - David - David Karger - Karger - - - - - - - Jeremy - Jeremy Carroll - Carroll - - - - - - - - - - NG4J - Named Graphs API for Jena - en - NG4J - Named Graphs API for Jena - Named Graphs are a simple extension to the RDF abstract syntax -and enable statements to be made about RDF graphs.... - - - - - - - - Entscheidungsunterstützende Systeme (EUS) - Entscheidungsunterstützende Systeme (EUS) - - - - - - - SemMF: Semantic Matching Framework - SemMF: Semantic Matching Framework - Java - SemMF is an easy-to-use flexible framework for calculating semantic similarity between objects represented as arbitrary RDF Graphs, based on similarities of specified properties. - plattform independent - SemMF - - - - - - - Artificial Intelligence - - - - - - D2RQ - Treating Non-RDF Databases as Virtual RDF Graphs - D2RQ - Treating Non-RDF Databases as Virtual RDF Graphs - Java - D2RQ is a declarative language to describe mappings between relational database schemata and OWL/RDFS ontologies. The mappings allow RDF applications to access the content of huge, non-RDF databases using Semantic Web query languages like SPARQL. - plattform independent - D2RQ - - - - - - - - Named Graphs meet SPARQL - Named Graphs meet SPARQL - - - - - - - - - - voodoo - Oliver - Oliver Maresch - Maresch - - - - - - - - Ryan - Ryan Lee - Lee - - - - - - - RDF Book Mashup - RDF Book Mashup - PHP - The RDF book mashup demonstrates how Web 2.0 data sources like Amazon, Google or Yahoo can be integrated into the Semantic Web. This mashup assigns dereference-able URIs to books, authors, reviews, online bookstores and purchase offers. Whenever a URI is dereferenced, the mashup queries the Amazon API for information about the book and the Google Base API for purchase offers from different bookstores that sell the book. The query results are returned as an RDF graph to the client. - plattform independent - RDF Book Mashup - - - - - - - - Garystr. 21 - 14195 - - - - - - - - - - - - - - Swantje - Swantje Friedrich - Friedrich - - - - - - - - - - - Nico - Nicolai - Nicolai Endres - Endres - - - - - - - - Galway - - - - Semantic Web Languages - - - - Semantic Annotation - - - - - - WIQA - Information Quality Assessment Framework - WIQA - Information Quality Assessment Framework - Java - The WIQA - Information Quality Assessment Framework is a set of software components that empowers information consumers to employ a wide range of different information quality assessment policies to filter information from the Web. - plattform independent - WIQA Framework - - - - - - - - - - - - - - - - - - Uwe - Uwe Suhl - Suhl - - - - - - - Berlin - - - - Patrick - Patrick Hayes - Hayes - - - - - - - Professor - - - - - Update on Semantic Web Toolkits for Scripting Languages. - en - Update on Semantic Web Toolkits for Scripting Languages. - - - - - - - - Databases - - - - Patrick - Patrick Stickler - Stickler - - - - - - - - - - - Fresnel: A Browser-Independent Presentation -Vocabulary for RDF - en - Fresnel: A Browser-Independent Presentation -Vocabulary for RDF - Abstract. SemanticWeb browsers and other tools aimed at displaying RDF data -to end users are all concerned with the same problem: presenting content primarily -intended for machine consumption in a human-readable way..... - - - - - - - Semantic Web Client Library - Semantic Web Client Library - Java - The Sematic Web Client Library represents the complete Semantic Web as a single RDF graph. The library enables applications to query this global graph using SPARQL- and find(SPO) queries. - plattform independent - Semantic Web Client Library - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/metadata.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/metadata.n3 deleted file mode 100755 index 5dbb57d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/metadata.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix dc: . -@prefix cc: . - -[ dc:creator ; - cc:license ; -]. \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/prefixes.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/prefixes.n3 deleted file mode 100755 index 82341a18..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/prefixes.n3 +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix xsd: . - -@prefix foaf: . -@prefix vcard: . -@prefix dc: . -@prefix cc: . - - -@prefix swrc: . -@prefix admin: . -@prefix dctype: . -@prefix iswc: . -@prefix d2r: . -@prefix db1: . -@prefix doap: . - -@prefix fu_person: . -@prefix fu_project: . -@prefix fu_publication: . -@prefix fu_position: . -@prefix event: . -@prefix topic: . - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/rap_pubby.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/rap_pubby.php deleted file mode 100755 index 708f009e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/rap_pubby.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @version 1.0, 19.12.2007 - * @package rap-pubby - */ - - -include_once('config.php'); - - -$ds = new RAPpubbyDataset(); - -$http_reqest_URI = "http://" .$_SERVER['SERVER_NAME'] .$_SERVER['REQUEST_URI']; - -// index resource -if ($http_reqest_URI == PUBBY_WEBBASE) { - $http_reqest_URI = RAPpubbyURIrewriter::datasetURItoPubbyURI(PUBBY_INDEX_RESOURCE); -} - -switch (substr($http_reqest_URI, strlen(PUBBY_WEBBASE), 4)) { - - case 'data': - - $resURI = RAPpubbyURIrewriter::dataURItoResURI($http_reqest_URI, $_SERVER['QUERY_STRING']); - - $rd = & $ds->getResDescr($resURI, $_PUBBY_DATASET['rdfDocumentMetadata']); - - if ($rd->isEmpty()) { - header('HTTP/1.1 404 Not Found'); - header('Content-type: text/html;charset=utf-8'); - $c = "Nothing known about <$resURI>"; - header('Content-length: ' .strlen($c)); - echo $c; - break; - } - - // valid query string: 'output='(xml|n3) - if (!strcasecmp($_SERVER['QUERY_STRING'], 'output=n3')) { - - header('Content-type: application/n3'); - $c = $rd->serialize("n3"); - } - elseif (!strcasecmp($_SERVER['QUERY_STRING'], 'output=xml')) { - - header('Content-type: application/rdf+xml'); - $c = $rd->serialize("rdf/xml"); - } - // default output - else { - - header('Content-type: application/rdf+xml'); - - $c = $rd->serialize("rdf/xml"); - } - header('Content-length: ' .strlen($c)); - echo $c; - break; - - case 'page': - - $resURI = RAPpubbyURIrewriter::pageURItoResURI($http_reqest_URI); - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($resURI); - - $rd = & $ds->getResDescr($resURI); - - header('Content-type: text/html;charset=utf-8'); - if ($rd->isEmpty()) { - header('HTTP/1.1 404 Not Found'); - } - $c = $rd->serialize("html"); - header('Content-length: ' .strlen($c)); - echo $c; - break; - - default: - - if (strpos($_SERVER['HTTP_ACCEPT'], "application/rdf+xml") !== false) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$dataURI); - header('Content-type: text/plain'); - $c = "303 See Other: For a description of this item, see <$dataURI>"; - } - // n3 - elseif (strpos($_SERVER['HTTP_ACCEPT'], "application/n3") !== false) { - - $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI, 'n3'); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$dataURI); - header('Content-type: text/plain'); - $c = "303 See Other: For a description of this item in n3, see <$dataURI>"; - } - else { - - $pageURI = RAPpubbyURIrewriter::resURItoPageURI($http_reqest_URI); - - header('HTTP/1.1 303 See Other'); - header('Location: ' .$pageURI); - header('Content-type: text/plain'); - header('Content-length: 33'); - $c = "303 See Other: For a description of this item see <$pageURI>"; - - } - - header('Content-length: ' .strlen($c)); - echo $c; -} - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/all-wcprops deleted file mode 100755 index 7d272673..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ -END -script.js -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ/script.js -END -rdf-icon.gif -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ/rdf-icon.gif -END -404_notFound.html -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ/404_notFound.html -END -style.css -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ/style.css -END -template.html -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/557/trunk/rdfapi-php/rap-pubby/templ/template.html -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/entries deleted file mode 100755 index 118ed2b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/entries +++ /dev/null @@ -1,77 +0,0 @@ -8 - -dir -557 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/rap-pubby/templ -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2008-02-29T15:03:46.371483Z -557 -cax - - -svn:special svn:externals svn:needs-lock - -script.js -file - - - - -2007-12-12T10:43:16.000000Z -69f7211056f0874ce924c038342d18c4 -2008-02-29T15:03:46.371483Z -557 -cax - -rdf-icon.gif -file - - - - -2007-12-12T10:43:16.000000Z -93693591e90e8a3fb93b4597514aa1cb -2008-02-29T15:03:46.371483Z -557 -cax -has-props - -404_notFound.html -file - - - - -2007-12-17T00:02:58.000000Z -e0a875c9cc2970af591d386058bca62b -2008-02-29T15:03:46.371483Z -557 -cax - -style.css -file - - - - -2007-12-19T10:49:17.031250Z -28cb2c4f57cf377205b3fe135bacc051 -2008-02-29T15:03:46.371483Z -557 -cax - -template.html -file - - - - -2007-12-19T16:03:39.406250Z -9d7e8f024986af34395fe38e4493e0af -2008-02-29T15:03:46.371483Z -557 -cax - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/prop-base/rdf-icon.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/prop-base/rdf-icon.gif.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/prop-base/rdf-icon.gif.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/404_notFound.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/404_notFound.html.svn-base deleted file mode 100755 index db90cec4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/404_notFound.html.svn-base +++ /dev/null @@ -1,22 +0,0 @@ - - - 404 Not Found | ##_projectName_## - - - - - -The requested resource does not exist at this server, -or no information about it is available. - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/rdf-icon.gif.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/rdf-icon.gif.svn-base deleted file mode 100755 index 0291161c..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/rdf-icon.gif.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/script.js.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/script.js.svn-base deleted file mode 100755 index 1310ae32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/script.js.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -function init() { - init_long_literals(); -} - -var long_literal_counter = 0; -var long_literal_spans = {}; -var long_literal_texts = {}; -function init_long_literals() { - var spans = document.getElementsByTagName('span'); - for (i = 0; i < spans.length; i++) { - if (spans[i].className != 'literal') continue; - var span = spans[i]; - var textNode = span.firstChild; - var text = textNode.data; - if (text.length < 300) continue; - var match = text.match(/([^\0]{150}[^\0]*? )([^\0]*)/); - if (!match) continue; - span.insertBefore(document.createTextNode(match[1] + ' ... '), span.firstChild); - span.removeChild(textNode); - var link = document.createElement('a'); - link.href = 'javascript:expand(' + long_literal_counter + ');'; - link.appendChild(document.createTextNode('\u00BBmore\u00BB')); - link.className = 'expander'; - span.insertBefore(link, span.firstChild.nextSibling); - long_literal_spans[long_literal_counter] = span; - long_literal_texts[long_literal_counter] = textNode; - long_literal_counter = long_literal_counter + 1; - } -} - -function expand(i) { - var span = long_literal_spans[i]; - span.removeChild(span.firstChild); - span.removeChild(span.firstChild); - span.insertBefore(long_literal_texts[i], span.firstChild); -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/style.css.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/style.css.svn-base deleted file mode 100755 index 0f9b0ccb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/style.css.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -html { margin: 0; padding: 0; } -body { font-family: sans-serif; font-size: 80%; margin: 0; padding: 1.2em 2em; } -#rdficon { float: right; position: relative; top: -28px; } -#header { border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; } -#footer { border-top: 2px solid #696; margin: 1.2em 0 0; padding: 0.3em 0 0; } -#homelink { display: inline; } -#homelink, #homelink a { color: #666; } -#homelink a { font-weight: bold; text-decoration: none; } -#homelink a:hover { color: red; text-decoration: underline; } -h1 { display: inline; font-weight: normal; font-size: 200%; margin: 0; text-align: left; } -h2 { font-weight: normal; font-size: 124%; margin: 1.2em 0 0.2em; } -.page-resource-uri { font-size: 124%; margin: 0.2em 0; } -.page-resource-uri a { color: black; text-decoration: none; } -.page-resource-uri a:hover { color: red; text-decoration: underline; } -a.sparql-uri { color: black; text-decoration: none; } -a.sparql-uri:hover { color: red; text-decoration: underline; } -img { border: none; } -table.description { border-collapse: collapse; clear: left; font-size: 100%; margin: 0 0 1em; width: 100%; } -table.description th { background: white; text-align: left; } -table.description td, table.description th { line-height: 1.2em; padding: 0.2em 0.4em; vertical-align: top; } -table.description ul { margin: 0; padding-left: 0em; } -table.description li { list-style-type: square; } -.uri { white-space: nowrap; } -.uri a, a.uri { text-decoration: none; } -.unbound { color: #888; } -table.description a small { font-size: 100%; color: #55a; } -table.description small { font-size: 100%; color: #666; } -table.description .property { white-space: nowrap; } -h1, h2 { color: #810; } -body { background: #F5ECFF; } -table.description .odd td { background: #F5ECF1; } -table.description .even td { background: #FCF9FF; } -table.description .prop-header th { background: #FFFFDD } -.image { background: white; float: left; margin: 0 1.5em 1.5em 0; padding: 2px; } -a.expander { text-decoration: none; } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/template.html.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/template.html.svn-base deleted file mode 100755 index 5d7f5b8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/.svn/text-base/template.html.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -##_resourceLabel_## | ##_projectName_## - - - - - - - - -
    Depiction of ##_resourceLabel_##
    - -

    ##_shortDescription_##

    - - - - - ##_prop_tableRows_## - -
    PropertyValue
    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/404_notFound.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/404_notFound.html deleted file mode 100755 index db90cec4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/404_notFound.html +++ /dev/null @@ -1,22 +0,0 @@ - - - 404 Not Found | ##_projectName_## - - - - - -The requested resource does not exist at this server, -or no information about it is available. - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/rdf-icon.gif b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/rdf-icon.gif deleted file mode 100755 index 0291161c..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/rdf-icon.gif and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/script.js b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/script.js deleted file mode 100755 index 1310ae32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/script.js +++ /dev/null @@ -1,36 +0,0 @@ -function init() { - init_long_literals(); -} - -var long_literal_counter = 0; -var long_literal_spans = {}; -var long_literal_texts = {}; -function init_long_literals() { - var spans = document.getElementsByTagName('span'); - for (i = 0; i < spans.length; i++) { - if (spans[i].className != 'literal') continue; - var span = spans[i]; - var textNode = span.firstChild; - var text = textNode.data; - if (text.length < 300) continue; - var match = text.match(/([^\0]{150}[^\0]*? )([^\0]*)/); - if (!match) continue; - span.insertBefore(document.createTextNode(match[1] + ' ... '), span.firstChild); - span.removeChild(textNode); - var link = document.createElement('a'); - link.href = 'javascript:expand(' + long_literal_counter + ');'; - link.appendChild(document.createTextNode('\u00BBmore\u00BB')); - link.className = 'expander'; - span.insertBefore(link, span.firstChild.nextSibling); - long_literal_spans[long_literal_counter] = span; - long_literal_texts[long_literal_counter] = textNode; - long_literal_counter = long_literal_counter + 1; - } -} - -function expand(i) { - var span = long_literal_spans[i]; - span.removeChild(span.firstChild); - span.removeChild(span.firstChild); - span.insertBefore(long_literal_texts[i], span.firstChild); -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/style.css b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/style.css deleted file mode 100755 index 0f9b0ccb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/style.css +++ /dev/null @@ -1,35 +0,0 @@ -html { margin: 0; padding: 0; } -body { font-family: sans-serif; font-size: 80%; margin: 0; padding: 1.2em 2em; } -#rdficon { float: right; position: relative; top: -28px; } -#header { border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; } -#footer { border-top: 2px solid #696; margin: 1.2em 0 0; padding: 0.3em 0 0; } -#homelink { display: inline; } -#homelink, #homelink a { color: #666; } -#homelink a { font-weight: bold; text-decoration: none; } -#homelink a:hover { color: red; text-decoration: underline; } -h1 { display: inline; font-weight: normal; font-size: 200%; margin: 0; text-align: left; } -h2 { font-weight: normal; font-size: 124%; margin: 1.2em 0 0.2em; } -.page-resource-uri { font-size: 124%; margin: 0.2em 0; } -.page-resource-uri a { color: black; text-decoration: none; } -.page-resource-uri a:hover { color: red; text-decoration: underline; } -a.sparql-uri { color: black; text-decoration: none; } -a.sparql-uri:hover { color: red; text-decoration: underline; } -img { border: none; } -table.description { border-collapse: collapse; clear: left; font-size: 100%; margin: 0 0 1em; width: 100%; } -table.description th { background: white; text-align: left; } -table.description td, table.description th { line-height: 1.2em; padding: 0.2em 0.4em; vertical-align: top; } -table.description ul { margin: 0; padding-left: 0em; } -table.description li { list-style-type: square; } -.uri { white-space: nowrap; } -.uri a, a.uri { text-decoration: none; } -.unbound { color: #888; } -table.description a small { font-size: 100%; color: #55a; } -table.description small { font-size: 100%; color: #666; } -table.description .property { white-space: nowrap; } -h1, h2 { color: #810; } -body { background: #F5ECFF; } -table.description .odd td { background: #F5ECF1; } -table.description .even td { background: #FCF9FF; } -table.description .prop-header th { background: #FFFFDD } -.image { background: white; float: left; margin: 0 1.5em 1.5em 0; padding: 2px; } -a.expander { text-decoration: none; } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/template.html b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/template.html deleted file mode 100755 index 5d7f5b8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/rap-pubby/templ/template.html +++ /dev/null @@ -1,37 +0,0 @@ -##_resourceLabel_## | ##_projectName_## - - - - - - - - -
    Depiction of ##_resourceLabel_##
    - -

    ##_shortDescription_##

    - - - - - ##_prop_tableRows_## - -
    PropertyValue
    - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.cvsignore b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.cvsignore deleted file mode 100755 index ec4bfc57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -config.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/all-wcprops deleted file mode 100755 index 13ffc8c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/all-wcprops +++ /dev/null @@ -1,167 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 54 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/test -END -Output.n3 -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/Output.n3 -END -custom_rdql_test.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/custom_rdql_test.php -END -custom_test2.php -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/custom_test2.php -END -test_setoperations.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/test_setoperations.php -END -test_SetDatabaseConnection.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/test_SetDatabaseConnection.php -END -example1.rdf -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/example1.rdf -END -setup.php -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/rdfapi-php/!svn/ver/545/trunk/rdfapi-php/test/setup.php -END -custom_test_viz.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/custom_test_viz.php -END -test_StoringModelsInDatabase.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/test_StoringModelsInDatabase.php -END -sparqlDb-prepare.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/375/trunk/rdfapi-php/test/sparqlDb-prepare.php -END -config.php.dist -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/537/trunk/rdfapi-php/test/config.php.dist -END -custom_test.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/custom_test.php -END -custom_test_n3.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/custom_test_n3.php -END -test_TraverseModel.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/test_TraverseModel.php -END -parseN3.php -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/500/trunk/rdfapi-php/test/parseN3.php -END -test_ManipulateMemModel.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/test_ManipulateMemModel.php -END -sparql-test.php -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/537/trunk/rdfapi-php/test/sparql-test.php -END -Output.rdf -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/Output.rdf -END -test_SerializerOptions.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/test_SerializerOptions.php -END -Readme.txt -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/543/trunk/rdfapi-php/test/Readme.txt -END -sparqlDb-test.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/537/trunk/rdfapi-php/test/sparqlDb-test.php -END -test_ManipulateDbModel.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/268/trunk/rdfapi-php/test/test_ManipulateDbModel.php -END -employees.rdf -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/employees.rdf -END -.cvsignore -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/337/trunk/rdfapi-php/test/.cvsignore -END -test_NamedGraphsMem.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/241/trunk/rdfapi-php/test/test_NamedGraphsMem.php -END -test_RdqlQuery.php -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/test_RdqlQuery.php -END -my_testDbStore1.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/425/trunk/rdfapi-php/test/my_testDbStore1.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/dir-prop-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/dir-prop-base deleted file mode 100755 index 39961e3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/dir-prop-base +++ /dev/null @@ -1,6 +0,0 @@ -K 10 -svn:ignore -V 11 -config.php - -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/entries deleted file mode 100755 index 7f94e7de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/entries +++ /dev/null @@ -1,380 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-11T20:27:34.710933Z -555 -p_frischmuth -has-props - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Output.n3 -file - - - - -2008-02-29T14:57:26.465308Z -03919c13ff14f5ed971595200b8d8f5c -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -unit -dir - -custom_rdql_test.php -file - - - - -2008-02-29T14:57:26.480929Z -ff8c5c5909a88a4d793a158aa0c1a8d2 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -custom_test2.php -file - - - - -2008-02-29T14:57:26.465308Z -282a0e2e55b4182041b1a5b9ab78af62 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -test_setoperations.php -file - - - - -2008-02-29T14:57:26.480929Z -f86d84cf7ff8bee0a32b5cc0de1305e8 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_SetDatabaseConnection.php -file - - - - -2008-02-29T14:57:26.496549Z -f7fd9c854ffc5885a2aa47c2d7359bf5 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -example1.rdf -file - - - - -2008-02-29T14:57:26.512170Z -033f3ebdde0e1aea8d342a781e79291d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -setup.php -file - - - - -2008-02-29T14:57:26.496549Z -d3add2f6a8d0ce505b1ee4e009e333ee -2007-10-10T17:41:15.304760Z -545 -cweiske - -custom_test_viz.php -file - - - - -2008-02-29T14:57:26.512170Z -0f5e5fa5c873486f9d9c5a04e042f2ec -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -test_StoringModelsInDatabase.php -file - - - - -2008-02-29T14:57:26.527791Z -92b27de3e36ce89b5120b9f95c1077ec -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -sparqlDb-prepare.php -file - - - - -2008-02-29T14:57:26.527791Z -a4c0195ceea1205d1f6a524707490225 -2007-03-29T16:02:59.000000Z -375 -cweiske -has-props - -config.php.dist -file - - - - -2008-02-29T14:57:26.543411Z -dce8ddfa85eb813709b651658db85b4d -2007-09-18T17:55:11.280870Z -537 -cweiske -has-props - -custom_test.php -file - - - - -2008-02-29T14:57:26.559032Z -a2f7fa91ab2950688ecc9c5e197c5979 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -custom_test_n3.php -file - - - - -2008-02-29T14:57:26.543411Z -67c33b6426bf14172df430a895a86d95 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -parseN3.php -file - - - - -2008-02-29T14:57:26.559032Z -2a7276f878865e00ef9041805a46883f -2007-08-13T06:14:37.759934Z -500 -cweiske - -test_TraverseModel.php -file - - - - -2008-02-29T14:57:26.559032Z -7043b1e7469eaf32dd53d19aa0ba3b0d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_ManipulateMemModel.php -file - - - - -2008-02-29T14:57:26.574652Z -6e53aa8b7af3287e998011b469b4d86a -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -sparql-test.php -file - - - - -2008-02-29T14:57:26.574652Z -3c0c677597de4b56024cd995f2773d09 -2007-09-18T17:55:11.280870Z -537 -cweiske -has-props - -Output.rdf -file - - - - -2008-02-29T14:57:26.590273Z -efd91d725958ded441e9404a88e79d85 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -test_SerializerOptions.php -file - - - - -2008-02-29T14:57:26.590273Z -685ddf229b6179dfe13b3f85695ea2d7 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Readme.txt -file - - - - -2008-02-29T14:57:26.605894Z -4f61bc12ff22ebdd4241e2f4e1b36df3 -2007-10-09T16:01:43.027310Z -543 -cweiske -has-props - -sparqlDb-test.php -file - - - - -2008-02-29T14:57:26.605894Z -4b813f2f4d23b807c117288e4c7634a4 -2007-09-18T17:55:11.280870Z -537 -cweiske -has-props - -test_ManipulateDbModel.php -file - - - - -2008-02-29T14:57:26.621514Z -b263a3d771dee85c9a4e77f16714d1a7 -2006-05-15T05:28:09.000000Z -268 -tgauss -has-props - -employees.rdf -file - - - - -2008-02-29T14:57:26.621514Z -0a63a3ff1f486ef4a9d328aeb32ec9b2 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -.cvsignore -file - - - - -2008-02-29T14:57:26.637135Z -225fc71c562969028f8f6fbddea82e17 -2007-01-22T15:38:38.000000Z -337 -cweiske -has-props - -test_NamedGraphsMem.php -file - - - - -2008-02-29T14:57:26.637135Z -1c6ddab13b3cd91feb37824360ec6706 -2005-07-07T18:03:07.000000Z -241 -tgauss -has-props - -test_RdqlQuery.php -file - - - - -2008-02-29T14:57:26.637135Z -f49852bac673f8a325e737828d2772e3 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -my_testDbStore1.php -file - - - - -2008-02-29T14:57:26.652755Z -4a52405aad37367989368b44d6ce6953 -2007-05-01T12:59:18.000000Z -425 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/.cvsignore.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/.cvsignore.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/.cvsignore.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.n3.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Output.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Readme.txt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/Readme.txt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/config.php.dist.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/config.php.dist.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/config.php.dist.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_rdql_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_rdql_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_rdql_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test2.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test2.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_n3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_n3.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_n3.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_viz.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_viz.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/custom_test_viz.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/employees.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/employees.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/example1.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/example1.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/my_testDbStore1.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/my_testDbStore1.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/my_testDbStore1.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparql-test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparql-test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparql-test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-prepare.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-prepare.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-prepare.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/sparqlDb-test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateDbModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateDbModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateDbModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateMemModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateMemModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_ManipulateMemModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_NamedGraphsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_NamedGraphsMem.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_NamedGraphsMem.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_RdqlQuery.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_RdqlQuery.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_RdqlQuery.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SerializerOptions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SerializerOptions.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SerializerOptions.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SetDatabaseConnection.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SetDatabaseConnection.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_SetDatabaseConnection.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_StoringModelsInDatabase.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_StoringModelsInDatabase.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_StoringModelsInDatabase.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_TraverseModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_TraverseModel.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_TraverseModel.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_setoperations.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_setoperations.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/prop-base/test_setoperations.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/.cvsignore.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/.cvsignore.svn-base deleted file mode 100755 index 4f4773fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/.cvsignore.svn-base +++ /dev/null @@ -1 +0,0 @@ -config.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.n3.svn-base deleted file mode 100755 index 9dc58e1a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.n3.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - lassila@w3.org - Ora Lassila - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.rdf.svn-base deleted file mode 100755 index c0d5cade..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Output.rdf.svn-base +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - lassila@w3.org - Ora Lassila - - - - - - - Lassila's personal Homepage - Lassilas persnliche Homepage - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Readme.txt.svn-base deleted file mode 100755 index 8185f689..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/Readme.txt.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -Welcome to RDF API for PHP - -This directory contains some demo scripts that show you how to use RAP. - -Many scripts require a working config.php file, so make a copy of - "config.php.dist", save it as "config.php" and adjust it. - -Execute "setup.php" on the command line to create all the necessary tables - in the database. - -"unit/" directory contains the unit tests for RAP. They ensure that nothing - breaks during development. See the Readme in there for more information. - -Also remember there is documentation for RAP available at - http://rdfapi-php.sf.net/ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/config.php.dist.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/config.php.dist.svn-base deleted file mode 100755 index 0e137106..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/config.php.dist.svn-base +++ /dev/null @@ -1,37 +0,0 @@ - 'MySQL', - 'host' => 'localhost', - 'database' => '', - 'user' => '', - 'password' => '' -); - -//enable this to get more information about failing unit tests -//$GLOBALS['debugTests'] = true; - -//debug SPARQL engine -//$GLOBALS['debugSparql'] = true; - -//used in W3C earl report serialization -$GLOBALS['earlReport'] = array( - 'reporter' => array( - 'name' => 'John Doe', - 'seeAlso' => 'http://example.org/john/johndoe.rdf', - 'homepage' => 'http://example.org/john/' - ) -); - -define('LOG', false); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_rdql_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_rdql_test.php.svn-base deleted file mode 100755 index 822b1a9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_rdql_test.php.svn-base +++ /dev/null @@ -1,171 +0,0 @@ - - * @version $Id$ - */ -function getmicrotime() -{ - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); -} - - $start = getmicrotime(); - - -?> - - -RAP's RDQL-Engine online demo - - - - - - - - - - -
    -

    -   - - RDF Logo - -   - - PHP Logo - -
    -

    RDF API for PHP V0.8

    -

    RDQL-Engine Online Demo


    -

    This is an online demo of - RAP - RDF API for PHP V0.8.
    -1000)) { - - // Show error message if the rdf is too long - if ((isset($_POST['submit']) AND (strlen($_POST['query_string'])>1000))) { - echo "

    Go back to input form.

    "; - echo "

    We're sorry, but your RDQL query is bigger than the allowed size of 1000 characters

    "; - }; - -?> -
    - Paste an RDQL query string into the text field below. - In the FROM clause you can indicate an URL or a path for local RDF document to be queried. -

    -

    Please paste your RDQL query here:

    -


    -

    -

    Please choose the output format:

    - - - - - - - - - - - -
    - -
    Show the source model (only if it contains - fewer than 100 statements)
      
    -

    -


    - -

    Go back to input form.

    "; - -if (isset($_POST['query_string'])) { - - $queryString=stripslashes($_POST['query_string']); - - // Parse the query - $parser = new RdqlParser(); - $parsed = & $parser->parseQuery($queryString); - - // If more than one source file provided show an error message - if (count($parsed['sources']) > 1) { - echo "

    We're sorry, but this Online Demo allows you to query only one document

    "; - } - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); - -// Load and parse document -$model->load($parsed['sources'][0]); - - - // Process the query - $engine = new RdqlMemEngine(); - $queryResult = $engine->queryModel($model, $parsed, TRUE); - - // Show the query string - echo "

    Your query:

    "; - echo "
    "; - echo "

    " .nl2br(htmlspecialchars(stripslashes($_POST['query_string']))) ."

    "; - echo "

    "; - - // Show query result - echo "

    Query result:

    "; - $engine->writeQueryResultAsHtmlTable($queryResult); - - // Show the input model if option chosen - if (isset($_POST['show_input']) && $_POST['show_input'] == "1") { - echo "

    Source model:

    "; - $model->writeAsHtmlTable(); - } - -} -} -echo "


    "; -?> - -

    - - - -

    Feedback

    -

    -

    Please send bug reports and other comments to Radek Oldakowski.

    - -
    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test.php.svn-base deleted file mode 100755 index f8525464..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test.php.svn-base +++ /dev/null @@ -1,323 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * - */ -function getmicrotime() -{ - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); -} - - $start = getmicrotime(); - -?> - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -
    -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>10000)) {?> - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to parse, serialize, reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - -10000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original RDF input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -//$model = new MemModel(); - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); - -// Load and parse document -$model->load($rdfInput); - - -// Set the base URI of the model -$model->setBaseURI("http://www3.wiwiss.fu-berlin.de".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - RDFUtil::writeHTMLTable($model); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    - - - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test2.php.svn-base deleted file mode 100755 index 9ff6be7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test2.php.svn-base +++ /dev/null @@ -1,311 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * - */ -?> - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>1000000)) {?> - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to parse, serialize, reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - -1000000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original RDF input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -//$model = new MemModel(); - -// Load and parse document -$parser = new RdfParser(); - -// Set the base URI of the model -//$model->setBaseURI("http://www3.wiwiss.fu-berlin.de/DemoModel#"); - - -$rdfBaseURI = 'http://www.wiwiss.fu-berlin.de/suhl/bizer/resource02.rdf'; -$model =& $parser->generateModel($rdfInput,$rdfBaseURI); - - - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - RDFUtil::writeHTMLTable($model); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_n3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_n3.php.svn-base deleted file mode 100755 index b01028ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_n3.php.svn-base +++ /dev/null @@ -1,308 +0,0 @@ - - * @author Daniel Westphal - * - */ -?> - - - RAP - RDF API for PHP - N3 parser online demo - - - - - - -
    -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP

    -

    N3 parser online Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>100000000)) {?> - -
    -

    This is an online demo of RAP - - RDF API for PHP V0.9.1 . You can paste n3 code into the text field below - and choose how the data should be processed. It's possible to parse, serialize, - reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste N3 code here:

    - -10000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original N3 input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); -$n3pars = new n3Parser(); - -// Load and parse document -#$model->load($rdfInput); -$model=$n3pars->parse2model($rdfInput); - -// Set the base URI of the model -$model->setBaseURI("http://www3.wiwiss.fu-berlin.de".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - $model->writeAsHTMLTable(); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_viz.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_viz.php.svn-base deleted file mode 100755 index 6c846b12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/custom_test_viz.php.svn-base +++ /dev/null @@ -1,316 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * @author Anton Kstlbacher - * - */ - -// start outpu buffering -ob_start (); - - -// Show error message if the rdf is too long -if ((isset($_POST['submit']) AND (strlen($_POST['RDF'])>100000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - - - - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>100000)){ - - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> - - - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - - -

    -
    -

    -

    Please choose the output format:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      
    - -
    Force "save as...", useful for large graphs
      
    - -
    Visualize RDF without qnames for RDF tags.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    - - - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - -load($rdfInput); - - -// Set the base URI of the model -$model->setBaseURI("http://www.semaweb.org".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - #echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - #echo "

    Your original model has been refied.


    "; -}; - -if (isset($_POST['prefix']) and $_POST['prefix']=="1") { - $prefix = TRUE; -} -else -{ - $prefix = FALSE; -}; - -if (isset($_POST['saveas']) and $_POST['saveas']=="1") { - $saveas = TRUE; -} -else -{ - $saveas = FALSE; -} - - - -// Output Triples as Visualisation if checked in submitted form - -switch ($_POST['view_type']) -{ - case "png": - header('Content-type: image/png'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.png'); - $model->visualize("png", $prefix); - break; - - case "svg": - header('Content-type: image/svg+xml'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.svg'); - $model->visualize("svg", $prefix); - break; - - case "jpg": - header('Content-type: image/jpg'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.jpg'); - $model->visualize("jpg", $prefix); - break; - - case "gif": - header('Content-type: image/gif'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.gif'); - $model->visualize("gif", $prefix); - break; - - case "vrml": - header('Content-type: model/vrml'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.vrml'); - $model->visualize("vrml", $prefix); - break; - - case "dot": - header('Content-type: text'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.dot'); - $model->visualize("dot", $prefix); - break; - - case "input_dot": - header('Content-type: text'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.dot'); - $model->visualize("input_dot", $prefix); - break; - -} - -} // end of "form submitted" - - -ob_end_flush (); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/employees.rdf.svn-base deleted file mode 100755 index 46ab6c9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/employees.rdf.svn-base +++ /dev/null @@ -1,75 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/example1.rdf.svn-base deleted file mode 100755 index 41ea683f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/example1.rdf.svn-base +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Ora Lassila - lassila@w3.org - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/my_testDbStore1.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/my_testDbStore1.php.svn-base deleted file mode 100755 index 9ad8cfb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/my_testDbStore1.php.svn-base +++ /dev/null @@ -1,99 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -createTables(ADODB_DB_DRIVER); - - -## 2. Store a memory model in database. -## ------------------------------------ - -// Load an RDF-Documtent into a memory model - -// Filename of an RDF document -$base="example1.rdf"; - -// Create a new memory model -$memModel = new MemModel(); - -// Load and parse document -$memModel->load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/parseN3.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/parseN3.php.svn-base deleted file mode 100755 index 8177d1ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/parseN3.php.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - -*/ -if ($argc <= 1) { - echo <<debug = true; -} -$parser->parse( - file_get_contents($file) -); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/setup.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/setup.php.svn-base deleted file mode 100755 index 51c28955..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/setup.php.svn-base +++ /dev/null @@ -1,64 +0,0 @@ -getMessage() . "\n"; - echo "Be sure to write the driver type in the same cAsE\n"; - exit(4); -} - - - -try { - $database = ModelFactory::getDbStore( - $GLOBALS['dbConf']['type'], $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); -} catch (Exception $e) { - echo "Error: " . $e->getMessage() . "\n"; - echo "Maybe the database '" . $GLOBALS['dbConf']['database'] . "' does not exist?\n"; - exit(3); -} - -if ($database->isSetup()) { - echo "Database is already setup.\n"; - exit(0); -} - -try { - $database->createTables(); -} catch (Exception $e) { - //mysql doesn't complete the transaction but is ok - if ($e->getMessage() != '') { - echo "Error: " . $e->getMessage() . "\n"; - echo "Something failed when creating the tables\n"; - exit(2); - } -} - - -if ($database->isSetup()) { - echo "Database has been setup.\n"; - exit(0); -} else { - echo "Database tables have been created, but somehow it still\n" - . " setup is incomplete. File a bug\n"; - exit(1); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparql-test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparql-test.php.svn-base deleted file mode 100755 index ff5548a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparql-test.php.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -load(SPARQL_TESTFILES . 'data/model9.n3'); - -$qs = 'SELECT * WHERE { ?s ?p ?o}'; -$result = $model->sparqlQuery($qs); - -//header('Content-Type: text/html'); -//echo $result . "\n"; -var_dump($result); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-prepare.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-prepare.php.svn-base deleted file mode 100755 index e9852c76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-prepare.php.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -getModel($strModel); - -if ($dbModel === false) { - die('Database does not have a model ' . $strModel . "\n"); -} - -$qs = "PREFIX foaf: -SELECT ?o - { ?s ??type ?o } -LIMIT 3 OFFSET 2"; -$prepared = $dbModel->sparqlPrepare($qs); - - -$result = $prepared->execute(array('type' => 'foaf:name')); -var_dump($result); - -//$result = $prepared->execute(array('type' => 'foaf:mbox')); -//var_dump($result); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-test.php.svn-base deleted file mode 100755 index db370487..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/sparqlDb-test.php.svn-base +++ /dev/null @@ -1,45 +0,0 @@ -getModel($strModel); - -if ($dbModel === false) { - die('Database does not have a model ' . $strModel . "\n"); -} - - -$qs = "PREFIX foaf: -PREFIX xsd: - -SELECT ?o, ?o2 - { ?s foaf:name ?o . FILTER (regex(?o, '^C') && langMatches(lang(?o), 'en')). - ?s1 foaf:name ?o2 . FILTER (! sameTerm(?o, ?o2))} -"; -$qs = << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)) } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT; -$qs = <<sparqlQuery($qs, null)); -//echo $dbModel->sparqlQuery($qs, 'HTML'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateDbModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateDbModel.php.svn-base deleted file mode 100755 index 5f25d618..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateDbModel.php.svn-base +++ /dev/null @@ -1,135 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -getModel("example1.rdf"); - -// Output the model as HTML table -$dbModel->writeAsHtmlTable(); - -echo "

    "; - -## 3. Add a statement tho the DbModel -## ---------------------------------- - -// Ceate a new statement -$statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage", "de")); - -// Add the statement to the DbModel -$dbModel->add($statement); - -// Output the string serialization of the DbModel -echo $dbModel->toStringIncludingTriples(); - -echo "

    "; - - -## 4. Search statements -## --------------------- - -// Search for statements having object $literal -$literal = new Literal("Lassilas persnliche Homepage", "de"); -$res = $dbModel->find(NULL, NULL, $literal); - -// Output the result -$res->writeAsHtmlTable(); - -echo "
    "; - - -## 5. 5. Replace nodes and serialize the DbModel to XML/RDF -## -------------------------------------------------------- - -// replace a literal -$dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"), - new Literal ("Lassila's personal Homepage", "en")); - -// Serialize to RDF -$dbModel->writeAsHtml(); - -echo "

    "; - - -## 6. Remove a statement -## --------------------- - -$dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal ("Lassila's personal Homepage", "en"))); - -// Output the DbModel -$dbModel->writeAsHtmlTable(); - -echo "
    "; - - -## 7. Generate a MemModel and compare both models -## ---------------------------------------------- - -// Generate a MemModel -$memModel = $dbModel->getMemModel(); - -// Compare this DbModel withe the generated MemModel -$res = $dbModel->equals($memModel); - -if ($res) - echo "models are equal"; -else - echo "models are different"; - -echo "
    "; - - -## 8. Save DbModel to file -## ---------------------------------------------- - -// Save DbModel to file (XML/RDF) -$dbModel->saveAs("Output.rdf"); - -// Save DbModel to file (N3) -$dbModel->saveAs("Output.n3"); - -// close the DbModel -$dbModel->close(); - -?> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateMemModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateMemModel.php.svn-base deleted file mode 100755 index 1f2b3773..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_ManipulateMemModel.php.svn-base +++ /dev/null @@ -1,75 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -$res->writeAsHtmlTable(); -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); -$res3->writeAsHtmlTable(); -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_NamedGraphsMem.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_NamedGraphsMem.php.svn-base deleted file mode 100755 index 0ad3f9b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_NamedGraphsMem.php.svn-base +++ /dev/null @@ -1,73 +0,0 @@ -createGraph(new Resource('http://graph2')); - -//create Quads -$quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); -$quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); -$quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); -$quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - -//add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically -$graphset->addQuad($quad1); -$graphset->addQuad($quad3); -$graphset->addQuad($quad2); - -//add a NamedGraph to the Set -$graphset->addGraph($graph1); - -//Is the Graph "http://graph1" part of the GraphSet? -echo 'Is the Graph "http://graph1" part of the GraphSet?
    '; -var_dump($graphset->containsGraph(new Resource('http://graph1'))); -echo'

    '; - -//remove 'http://graph2' from the set -$graphset->removeGraph(new Resource('http://graph2')); - -//Is the Graph "http://graph2" part of the GraphSet? -echo 'Is the Graph "http://graph2" part of the GraphSet?
    '; -var_dump($graphset->containsGraph(new Resource('http://graph2'))); -echo'

    '; - -//creat basic statement -$statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')); - -//get a Graph from the Set and add a basic statement -$graph4=&$graphset->getGraph('http://graph4'); -$graph4->add($statement); - -//remove Quad5 -$graphset->removeQuad($quad5); - -//get an iterator over all Quads -echo '

    All Quads:
    '; -for($iterator = $graphset->findQuads(null,null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//get an iterator over all Quads in 'http://graph3' -echo '

    All Quads in http://graph3:
    '; -for($iterator = $graphset->findQuads(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//how many Quads are in the whole GraphSet -echo '

    How many Quads are in the whole GraphSet?
    '; -echo $graphset->countQuads(); - -//does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object14) ? -echo '

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object14) ?
    '; -var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'))); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_RdqlQuery.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_RdqlQuery.php.svn-base deleted file mode 100755 index 2ba0b6c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_RdqlQuery.php.svn-base +++ /dev/null @@ -1,133 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - -// Show input model -//$model->writeAsHtmlTable(); - - -echo "

    "; - - -echo "
    show the age of all employees ,using the RdqlResultIterator
    "; -$rdql_query = ' -SELECT ?givenName, ?age -WHERE (?x, v:age, ?age), - (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName) -USING vcard FOR - v FOR '; - -//query model, get RDQLResultIterator -$rdqlIter = $model->rdqlQueryasIterator($rdql_query); - -//get different Result labels as array -$result_labels=$rdqlIter->getResultLabels(); - -echo "
    Result Label Names: "; -for ($i=0; $i Number of results: ".$rdqlIter->countResults(); -echo "
    Result objects, serialized to string:
    "; -//serialize result to string -while ($rdqlIter->hasNext()) { - $curren_result=$rdqlIter->next(); - echo "
    "; - for ($j=0; $j toString()."
    "; -}; - - - -echo "

    "; - -// show emails of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?email -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?blank1 vcard:Family ?familyName) - (?person vcard:EMAIL ?blank2) - (?blank2 rdf:value ?email) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" -USING vcard FOR - v FOR '; - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - - -echo "
    show all employees over 30
    "; - -// show all employees over 30 -$rdql_query = ' -SELECT ?employee, ?age -WHERE (?x, vcard:FN, ?employee), (?x, , ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - -echo "

    "; - - -// find out whose number is it: +1 111 2212 431 -$rdql_query = ' -SELECT ?x, ?type -WHERE (?x, vcard:TEL, ?tel), - (?tel, rdf:value, ?telNumber) - (?tel, rdf:type, ?type) -AND ?telNumber eq "+1 111 2212 431" -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -echo "

    "; - -// show office telephone numbers of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?telNumber -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?blank1 vcard:Family ?familyName) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumber) - (?blank2 rdf:type ?type) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type eq vcard:work -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SerializerOptions.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SerializerOptions.php.svn-base deleted file mode 100755 index bfc92066..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SerializerOptions.php.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - Test Serializer Options - - - -load($base); - -// Output model as HTML table -//$model->writeAsHtmlTable(); -echo "

    "; - - -// Create Serializer and serialize model to RDF with default configuration -$ser = new RDFSerializer(); -$rdf =& $ser->serialize($model); -echo "

    "; - -// Serialize model to RDF using attributes -$ser->configUseAttributes(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseAttributes(FALSE); - -// Serialize model to RDF using entities -$ser->configUseEntities(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseEntities(FALSE); - -?> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SetDatabaseConnection.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SetDatabaseConnection.php.svn-base deleted file mode 100755 index a368cad9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_SetDatabaseConnection.php.svn-base +++ /dev/null @@ -1,82 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -createTables('MsAccess'); - - - -## 2. Connect to MySQL database and create tables. - -/* -// Connect to MySQL database with user defined connection settings -$rdf_database = new DbStore('MySQL', 'localhost', 'db_name', 'user_name', 'password' ); - -// Create tables for MySQL -$rdf_database->createTables('MySQL'); -*/ - - - -## 3. Connect to other databases - -/* -// Example: -// Connect to Oracle database with user defined connection settings -$rdf_database = new DbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); - -// Method createTables() currently supports only MySQL and MsAccess. -// If you want to use other databases, you will have to create tables by yourself -// according to the abstract database schema described in the API documentation. -*/ - - -## 4. Close the database connection - -// Close the connection -$rdf_database->close(); - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_StoringModelsInDatabase.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_StoringModelsInDatabase.php.svn-base deleted file mode 100755 index 49ea7543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_StoringModelsInDatabase.php.svn-base +++ /dev/null @@ -1,98 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_TraverseModel.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_TraverseModel.php.svn-base deleted file mode 100755 index a835c671..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_TraverseModel.php.svn-base +++ /dev/null @@ -1,55 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - - -// Get Iterator from model -$it = $model->getStatementIterator(); - -// Traverse model and output statements -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} - -// Move to the last statement and print it -$it->moveLast(); -$statement = $it->current(); - -// Traverse model backward and print statements -echo $statement->toString() . "
    "; -while($it->hasPrevious()) { - $statement = $it->previous(); - echo $statement->toString() . "
    "; -} - -// Jump to statement 2 and print it -$it->moveTo(2); -$statement = $it->current(); -echo $statement->toString() . "
    "; - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_setoperations.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_setoperations.php.svn-base deleted file mode 100755 index be45acf0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/.svn/text-base/test_setoperations.php.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Test Set Operations - - - - - - -1. Generate and show two MemModels"; - -// Create empty MemModel -$model = new MemModel(); -$model->setbaseURI("http://www.bizer.de"); - -$model2 = new MemModel(); -$model2->setbaseURI("http://www.bizer.de/zwei"); - -// Create nodes and add statements to models -$myhomepage = new Resource("http://www.bizer.de/welcome.html"); -$creator = new Resource("http://purl.org/dc/elements/1.1/creator"); -$me = new Resource("mailto:chris@bizer.de"); -$model->add(new Statement($myhomepage, $creator, $me)); -$model2->add(new Statement($myhomepage, $creator, $me)); - -$creation_date = new Resource("http://www.example.org/terms/creation-date"); -$August16 = new Literal("August 16, 2002"); -$model->add(new Statement($myhomepage, $creation_date, $August16)); -$model2->add(new Statement($myhomepage, $creation_date, $August16)); - -$language = new Resource("http://www.example.org/terms/language"); -$deutsch = new Literal("Deutsch", "de"); -$model->add(new Statement($myhomepage, $language, $deutsch)); - -$name = new Resource("http://www.example.org/terms/Name"); -$chrisbizer = new Literal("Chris Bizer"); -$model2->add(new Statement($me, $name, $chrisbizer)); - -// Output as Table -echo "

    Model 1
    "; -$model->writeAsHtmlTable(); -echo "
    Model 2
    "; -$model2->writeAsHtmlTable(); -echo "

    "; - -echo "

    2. Make some tests

    "; -echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."

    "; -echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."

    "; -echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."

    "; -echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."

    "; -echo "Test: Model 1 equals model 2 :".$model->equals($model2)."

    "; - -echo "

    3. Unite model 1 and model 2

    "; -$model3 =& $model->unite($model2); -$model3->writeAsHtmlTable(); - -echo "

    4. Intersect model 1 and model 2

    "; -$model4 =& $model->intersect($model2); -$model4->writeAsHtmlTable(); - -echo "

    5. Substract model 2 from model 1

    "; -$model5 =& $model->subtract($model2); -$model5->writeAsHtmlTable(); - -echo "

    6. Reify model 1

    "; -$model6 =& $model->reify(); -$model6->writeAsHtmlTable(); - -?> - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.n3 deleted file mode 100755 index 458ae212..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.n3 +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - lassila@w3.org - Ora Lassila - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.rdf deleted file mode 100755 index 68ff3512..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Output.rdf +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - lassila@w3.org - Ora Lassila - - - - - - - Lassila's personal Homepage - Lassilas persnliche Homepage - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Readme.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Readme.txt deleted file mode 100755 index 21fb1862..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/Readme.txt +++ /dev/null @@ -1,15 +0,0 @@ -Welcome to RDF API for PHP - -This directory contains some demo scripts that show you how to use RAP. - -Many scripts require a working config.php file, so make a copy of - "config.php.dist", save it as "config.php" and adjust it. - -Execute "setup.php" on the command line to create all the necessary tables - in the database. - -"unit/" directory contains the unit tests for RAP. They ensure that nothing - breaks during development. See the Readme in there for more information. - -Also remember there is documentation for RAP available at - http://rdfapi-php.sf.net/ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/config.php.dist b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/config.php.dist deleted file mode 100755 index e2260647..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/config.php.dist +++ /dev/null @@ -1,37 +0,0 @@ - 'MySQL', - 'host' => 'localhost', - 'database' => '', - 'user' => '', - 'password' => '' -); - -//enable this to get more information about failing unit tests -//$GLOBALS['debugTests'] = true; - -//debug SPARQL engine -//$GLOBALS['debugSparql'] = true; - -//used in W3C earl report serialization -$GLOBALS['earlReport'] = array( - 'reporter' => array( - 'name' => 'John Doe', - 'seeAlso' => 'http://example.org/john/johndoe.rdf', - 'homepage' => 'http://example.org/john/' - ) -); - -define('LOG', false); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_rdql_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_rdql_test.php deleted file mode 100755 index 53924f39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_rdql_test.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @version $Id: custom_rdql_test.php 268 2006-05-15 05:28:09Z tgauss $ - */ -function getmicrotime() -{ - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); -} - - $start = getmicrotime(); - - -?> - - -RAP's RDQL-Engine online demo - - - - - - - - - - -
    -

    -   - - RDF Logo - -   - - PHP Logo - -
    -

    RDF API for PHP V0.8

    -

    RDQL-Engine Online Demo


    -

    This is an online demo of - RAP - RDF API for PHP V0.8.
    -1000)) { - - // Show error message if the rdf is too long - if ((isset($_POST['submit']) AND (strlen($_POST['query_string'])>1000))) { - echo "

    Go back to input form.

    "; - echo "

    We're sorry, but your RDQL query is bigger than the allowed size of 1000 characters

    "; - }; - -?> -
    - Paste an RDQL query string into the text field below. - In the FROM clause you can indicate an URL or a path for local RDF document to be queried. -

    -

    Please paste your RDQL query here:

    -


    -

    -

    Please choose the output format:

    - - - - - - - - - - - -
    - -
    Show the source model (only if it contains - fewer than 100 statements)
      
    -

    -


    - -

    Go back to input form.

    "; - -if (isset($_POST['query_string'])) { - - $queryString=stripslashes($_POST['query_string']); - - // Parse the query - $parser = new RdqlParser(); - $parsed = & $parser->parseQuery($queryString); - - // If more than one source file provided show an error message - if (count($parsed['sources']) > 1) { - echo "

    We're sorry, but this Online Demo allows you to query only one document

    "; - } - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); - -// Load and parse document -$model->load($parsed['sources'][0]); - - - // Process the query - $engine = new RdqlMemEngine(); - $queryResult = $engine->queryModel($model, $parsed, TRUE); - - // Show the query string - echo "

    Your query:

    "; - echo "
    "; - echo "

    " .nl2br(htmlspecialchars(stripslashes($_POST['query_string']))) ."

    "; - echo "

    "; - - // Show query result - echo "

    Query result:

    "; - $engine->writeQueryResultAsHtmlTable($queryResult); - - // Show the input model if option chosen - if (isset($_POST['show_input']) && $_POST['show_input'] == "1") { - echo "

    Source model:

    "; - $model->writeAsHtmlTable(); - } - -} -} -echo "


    "; -?> - -

    - - - -

    Feedback

    -

    -

    Please send bug reports and other comments to Radek Oldakowski.

    - -
    - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test.php deleted file mode 100755 index 60ad582c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test.php +++ /dev/null @@ -1,323 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * - */ -function getmicrotime() -{ - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); -} - - $start = getmicrotime(); - -?> - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -
    -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>10000)) {?> - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to parse, serialize, reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - -10000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original RDF input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -//$model = new MemModel(); - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); - -// Load and parse document -$model->load($rdfInput); - - -// Set the base URI of the model -$model->setBaseURI("http://www3.wiwiss.fu-berlin.de".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - RDFUtil::writeHTMLTable($model); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    - - - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test2.php deleted file mode 100755 index 4936de87..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test2.php +++ /dev/null @@ -1,311 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * - */ -?> - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>1000000)) {?> - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to parse, serialize, reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - -1000000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original RDF input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -//$model = new MemModel(); - -// Load and parse document -$parser = new RdfParser(); - -// Set the base URI of the model -//$model->setBaseURI("http://www3.wiwiss.fu-berlin.de/DemoModel#"); - - -$rdfBaseURI = 'http://www.wiwiss.fu-berlin.de/suhl/bizer/resource02.rdf'; -$model =& $parser->generateModel($rdfInput,$rdfBaseURI); - - - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - RDFUtil::writeHTMLTable($model); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_n3.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_n3.php deleted file mode 100755 index 1a56b573..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_n3.php +++ /dev/null @@ -1,308 +0,0 @@ - - * @author Daniel Westphal - * - */ -?> - - - RAP - RDF API for PHP - N3 parser online demo - - - - - - -
    -

    -  RDF Logo -  PHP Logo
    -

    RDF API for PHP

    -

    N3 parser online Demo


    - -',str_replace('<','<',nl2br($input_string))); - $return=''; - for ($i=0; $i < (count($data_lines)); $i++) { - $return .= ''; - }; - echo $return.'
    '.($i + 1).'.'.$data_lines[$i].'
    '; -}; - - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>100000000)) {?> - -
    -

    This is an online demo of RAP - - RDF API for PHP V0.9.1 . You can paste n3 code into the text field below - and choose how the data should be processed. It's possible to parse, serialize, - reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste N3 code here:

    - -10000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> -

    -
    -

    -

    Please choose the output format(s):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Table with RDF triples.
      
    - -
    Serialize model back to RDF.
    - - - - - - - - - - - - -
    - -
    Serialize to RDF using attributes for RDF properties whereever possible.
    - -
    Serialize to RDF using XML entities for URIs.
    - -
    Serialize to RDF without qnames for RDF tags.
    -
      
    - -
    toSting: Output the model as text.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    -

    Your original N3 input:


    "; -echo_string_with_linenumbers($rdfInput); - -// Create a new MemModel -$model = ModelFactory::getDefaultModel(); -$n3pars = new n3Parser(); - -// Load and parse document -#$model->load($rdfInput); -$model=$n3pars->parse2model($rdfInput); - -// Set the base URI of the model -$model->setBaseURI("http://www3.wiwiss.fu-berlin.de".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - echo "

    Your original model has been refied.


    "; -}; - - -// Output Triples as Table if checked in submitted form -if ($_POST['view_triple']=="1") { - echo "

    View input as HTML table:


    "; - $model->writeAsHTMLTable(); - echo "

    "; -}; - - -//serialize model to RDF with default configuration if checked in submitted form -if ($_POST['serialize']=='1') { - - // Create Serializer - $ser = new RDFSerializer(); - $msg_string = ''; - if (isset($_POST['serial_attributes']) and $_POST['serial_attributes']=='1') { - $ser->configUseAttributes(TRUE); - $msg_string .='Use Attributes ';}; - if (isset($_POST['serial_entities']) and $_POST['serial_entities']=='1') { - $ser->configUseEntities(TRUE); - $msg_string .='Use XML Entities ';}; - if (isset($_POST['serial_wo_qnames']) and $_POST['serial_wo_qnames']=='1') { - $ser->configUseQnames(FALSE); - $msg_string .='Without Qnames ';}; - $rdf =& $ser->serialize($model); - echo "


    Serialization of input model"; - if (isset($msg_string)) echo " (Options: ".$msg_string.")"; - echo ":

    "; - echo_string_with_linenumbers($rdf); -}; - -// Show dump of the model including triples if submitted in form -if (isset($_POST['view_dump']) and $_POST['view_dump']=='1') { - echo "

    Dump of the model including triples

    "; - echo_string_with_linenumbers($model->toStringIncludingTriples()); -}; - -?>

    Go back to input form.

    - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_viz.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_viz.php deleted file mode 100755 index 34917ca6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/custom_test_viz.php +++ /dev/null @@ -1,316 +0,0 @@ - - * @autor Seairth Jacobs - * @author Daniel Westphal - * @author Anton Kstlbacher - * - */ - -// start outpu buffering -ob_start (); - - -// Show error message if the rdf is too long -if ((isset($_POST['submit']) AND (strlen($_POST['RDF'])>100000))) {echo "

    We're sorry, but your RDF is bigger than the allowed size

    ";}; - - - - -// Test if the form is submitted or the code is too long -if (!isset($_POST['submit']) OR (strlen($_POST['RDF'])>100000)){ - - -//////////////////////////////////////////////////////////////////// -// Show input form -//////////////////////////////////////////////////////////////////// -?> - - - - - RAP - RDF API for PHP online demo V0.9.1 - - - - - - -
    -

    RDF API for PHP V0.9.1

    -

    Online API Demo


    - - -
    -

    This is an online demo of RAP - RDF API for PHP V0.9.1 . You can paste RDF code into the text field below and choose how the data should be processed. It's possible to reify and query the data.

    -

    The size of your RDF code is limited to 10.000 characters, due to resource restrictions.

    -

    Please paste RDF code here:

    - - -

    -
    -

    -

    Please choose the output format:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
      
    - -
    Force "save as...", useful for large graphs
      
    - -
    Visualize RDF without qnames for RDF tags.
      
    - -
    Reify the input model before output.
      
    Query model ("blank" will match - anything):
     
    - - - - - - - - - - - - - -
    Subject:
    -
    Predicate:
    Object: - -
    Object datatype: -
    -


    -
    - -

    -
    - - - -

    Feedback

    - -

    -

    Please send bug reports and other comments to Chris Bizer.
    -

    - -load($rdfInput); - - -// Set the base URI of the model -$model->setBaseURI("http://www.semaweb.org".$HTTP_SERVER_VARS['PHP_SELF']."/DemoModel#"); - - -// Execute query on model if submitted -if ($_POST['query_subject']!='' OR $_POST['query_predicate']!='' OR $_POST['query_object']!='') { - - $comment_string="

    The following query has been executed:


    "; - - $query_subj = NULL; - $query_pred = NULL; - $query_obj = NULL; - - if ($_POST['query_subject']!='') { - if($_POST['subject_kind']=='resource'){ - $query_subj = new Resource($_POST['query_subject']); } else { - $query_subj = new BlankNode($_POST['query_subject']); } - $comment_string .= "Subject = ".$_POST['query_subject']."
    "; - }; - - if ($_POST['query_predicate']!='') { - $query_pred = new Resource($_POST['query_predicate']); - $comment_string .= "Predicate = ".$_POST['query_predicate']."
    "; - }; - - if ($_POST['query_object']!='') { - if ($_POST['object_kind']=='resource'){ - $query_obj = new Resource($_POST['query_object']); } - elseif ($_POST['object_kind']=='literal') { - $query_obj = new Literal($_POST['query_object']); - if ($_POST['query_object_datatype']!='') { - $query_obj->setDatatype($_POST['query_object_datatype']); } - } - else { - $query_obj = new BlankNode($_POST['query_object']); }; - $comment_string .= "Object = ".$_POST['query_object']."
    "; - }; - - // Execute query and display what has been done - $model = $model->find($query_subj, $query_pred, $query_obj ); - #echo $comment_string; -} - -// Reify the model if checked in submitted form -if (isset($_POST['reify']) and $_POST['reify']=="1") { - $model =& $model->reify(); - #echo "

    Your original model has been refied.


    "; -}; - -if (isset($_POST['prefix']) and $_POST['prefix']=="1") { - $prefix = TRUE; -} -else -{ - $prefix = FALSE; -}; - -if (isset($_POST['saveas']) and $_POST['saveas']=="1") { - $saveas = TRUE; -} -else -{ - $saveas = FALSE; -} - - - -// Output Triples as Visualisation if checked in submitted form - -switch ($_POST['view_type']) -{ - case "png": - header('Content-type: image/png'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.png'); - $model->visualize("png", $prefix); - break; - - case "svg": - header('Content-type: image/svg+xml'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.svg'); - $model->visualize("svg", $prefix); - break; - - case "jpg": - header('Content-type: image/jpg'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.jpg'); - $model->visualize("jpg", $prefix); - break; - - case "gif": - header('Content-type: image/gif'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.gif'); - $model->visualize("gif", $prefix); - break; - - case "vrml": - header('Content-type: model/vrml'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.vrml'); - $model->visualize("vrml", $prefix); - break; - - case "dot": - header('Content-type: text'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.dot'); - $model->visualize("dot", $prefix); - break; - - case "input_dot": - header('Content-type: text'); - if ($saveas) header('Content-Disposition: attachment; filename=graph.dot'); - $model->visualize("input_dot", $prefix); - break; - -} - -} // end of "form submitted" - - -ob_end_flush (); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/employees.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/employees.rdf deleted file mode 100755 index 7f9a016e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/employees.rdf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/example1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/example1.rdf deleted file mode 100755 index 44d90167..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/example1.rdf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Ora Lassila - lassila@w3.org - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/my_testDbStore1.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/my_testDbStore1.php deleted file mode 100755 index 5f4b7e6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/my_testDbStore1.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -createTables(ADODB_DB_DRIVER); - - -## 2. Store a memory model in database. -## ------------------------------------ - -// Load an RDF-Documtent into a memory model - -// Filename of an RDF document -$base="example1.rdf"; - -// Create a new memory model -$memModel = new MemModel(); - -// Load and parse document -$memModel->load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/parseN3.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/parseN3.php deleted file mode 100755 index 8177d1ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/parseN3.php +++ /dev/null @@ -1,46 +0,0 @@ - -*/ -if ($argc <= 1) { - echo <<debug = true; -} -$parser->parse( - file_get_contents($file) -); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/setup.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/setup.php deleted file mode 100755 index 51c28955..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/setup.php +++ /dev/null @@ -1,64 +0,0 @@ -getMessage() . "\n"; - echo "Be sure to write the driver type in the same cAsE\n"; - exit(4); -} - - - -try { - $database = ModelFactory::getDbStore( - $GLOBALS['dbConf']['type'], $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); -} catch (Exception $e) { - echo "Error: " . $e->getMessage() . "\n"; - echo "Maybe the database '" . $GLOBALS['dbConf']['database'] . "' does not exist?\n"; - exit(3); -} - -if ($database->isSetup()) { - echo "Database is already setup.\n"; - exit(0); -} - -try { - $database->createTables(); -} catch (Exception $e) { - //mysql doesn't complete the transaction but is ok - if ($e->getMessage() != '') { - echo "Error: " . $e->getMessage() . "\n"; - echo "Something failed when creating the tables\n"; - exit(2); - } -} - - -if ($database->isSetup()) { - echo "Database has been setup.\n"; - exit(0); -} else { - echo "Database tables have been created, but somehow it still\n" - . " setup is incomplete. File a bug\n"; - exit(1); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparql-test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparql-test.php deleted file mode 100755 index cb3373d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparql-test.php +++ /dev/null @@ -1,17 +0,0 @@ -load(SPARQL_TESTFILES . 'data/model9.n3'); - -$qs = 'SELECT * WHERE { ?s ?p ?o}'; -$result = $model->sparqlQuery($qs); - -//header('Content-Type: text/html'); -//echo $result . "\n"; -var_dump($result); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-prepare.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-prepare.php deleted file mode 100755 index 104aa07b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-prepare.php +++ /dev/null @@ -1,32 +0,0 @@ -getModel($strModel); - -if ($dbModel === false) { - die('Database does not have a model ' . $strModel . "\n"); -} - -$qs = "PREFIX foaf: -SELECT ?o - { ?s ??type ?o } -LIMIT 3 OFFSET 2"; -$prepared = $dbModel->sparqlPrepare($qs); - - -$result = $prepared->execute(array('type' => 'foaf:name')); -var_dump($result); - -//$result = $prepared->execute(array('type' => 'foaf:mbox')); -//var_dump($result); - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-test.php deleted file mode 100755 index a2537022..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/sparqlDb-test.php +++ /dev/null @@ -1,45 +0,0 @@ -getModel($strModel); - -if ($dbModel === false) { - die('Database does not have a model ' . $strModel . "\n"); -} - - -$qs = "PREFIX foaf: -PREFIX xsd: - -SELECT ?o, ?o2 - { ?s foaf:name ?o . FILTER (regex(?o, '^C') && langMatches(lang(?o), 'en')). - ?s1 foaf:name ?o2 . FILTER (! sameTerm(?o, ?o2))} -"; -$qs = << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)) } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT; -$qs = <<sparqlQuery($qs, null)); -//echo $dbModel->sparqlQuery($qs, 'HTML'); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateDbModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateDbModel.php deleted file mode 100755 index d588e455..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateDbModel.php +++ /dev/null @@ -1,135 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -getModel("example1.rdf"); - -// Output the model as HTML table -$dbModel->writeAsHtmlTable(); - -echo "

    "; - -## 3. Add a statement tho the DbModel -## ---------------------------------- - -// Ceate a new statement -$statement = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage", "de")); - -// Add the statement to the DbModel -$dbModel->add($statement); - -// Output the string serialization of the DbModel -echo $dbModel->toStringIncludingTriples(); - -echo "

    "; - - -## 4. Search statements -## --------------------- - -// Search for statements having object $literal -$literal = new Literal("Lassilas persnliche Homepage", "de"); -$res = $dbModel->find(NULL, NULL, $literal); - -// Output the result -$res->writeAsHtmlTable(); - -echo "
    "; - - -## 5. 5. Replace nodes and serialize the DbModel to XML/RDF -## -------------------------------------------------------- - -// replace a literal -$dbModel->replace(NULL, NULL, new Literal("Lassilas persnliche Homepage", "de"), - new Literal ("Lassila's personal Homepage", "en")); - -// Serialize to RDF -$dbModel->writeAsHtml(); - -echo "

    "; - - -## 6. Remove a statement -## --------------------- - -$dbModel->remove(new Statement (new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal ("Lassila's personal Homepage", "en"))); - -// Output the DbModel -$dbModel->writeAsHtmlTable(); - -echo "
    "; - - -## 7. Generate a MemModel and compare both models -## ---------------------------------------------- - -// Generate a MemModel -$memModel = $dbModel->getMemModel(); - -// Compare this DbModel withe the generated MemModel -$res = $dbModel->equals($memModel); - -if ($res) - echo "models are equal"; -else - echo "models are different"; - -echo "
    "; - - -## 8. Save DbModel to file -## ---------------------------------------------- - -// Save DbModel to file (XML/RDF) -$dbModel->saveAs("Output.rdf"); - -// Save DbModel to file (N3) -$dbModel->saveAs("Output.n3"); - -// close the DbModel -$dbModel->close(); - -?> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateMemModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateMemModel.php deleted file mode 100755 index 085053da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_ManipulateMemModel.php +++ /dev/null @@ -1,75 +0,0 @@ - - - - Test Manipulate and Search RDF Model - - - -load($base); - -// Output model as HTML table -$model->writeAsHtmlTable(); -echo "

    "; - -// Ceate new statements and add them to the model -$statement1 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassila's personal Homepage", "en")); - -$statement2 = new Statement(new Resource("http://www.w3.org/Home/Lassila"), - new Resource("http://description.org/schema/Description"), - new Literal("Lassilas persnliche Homepage ", "de")); - -$model->add($statement1); -$model->add($statement2); - -$model->writeAsHtmlTable(); -echo "

    "; - - -// Search model 1 -$homepage = new Resource("http://www.w3.org/Home/Lassila"); -$res = $model->find($homepage, NULL, NULL); - -$res->writeAsHtmlTable(); -echo "

    "; - -// Search model 2 -$description = new Resource("http://description.org/schema/Description"); -$statement = $model->findFirstMatchingStatement($homepage, $description, NULL); - -// Check if something was found and output result -if ($statement) { - echo $statement->toString(); -} else { - echo "Sorry, I didn't find anything."; -} -echo "

    "; - -// Search model 3 -$res3 = $model->findVocabulary("http://example.org/stuff/1.0/"); -$res3->writeAsHtmlTable(); -echo "

    "; - -// Write model as RDF -$model->writeAsHtml(); - -// Save model to file -$model->saveAs("Output.rdf"); - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_NamedGraphsMem.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_NamedGraphsMem.php deleted file mode 100755 index c2337a96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_NamedGraphsMem.php +++ /dev/null @@ -1,73 +0,0 @@ -createGraph(new Resource('http://graph2')); - -//create Quads -$quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); -$quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); -$quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); -$quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - -//add Quads to the GraphSet. Thee needed NamedGraphs will be created automatically -$graphset->addQuad($quad1); -$graphset->addQuad($quad3); -$graphset->addQuad($quad2); - -//add a NamedGraph to the Set -$graphset->addGraph($graph1); - -//Is the Graph "http://graph1" part of the GraphSet? -echo 'Is the Graph "http://graph1" part of the GraphSet?
    '; -var_dump($graphset->containsGraph(new Resource('http://graph1'))); -echo'

    '; - -//remove 'http://graph2' from the set -$graphset->removeGraph(new Resource('http://graph2')); - -//Is the Graph "http://graph2" part of the GraphSet? -echo 'Is the Graph "http://graph2" part of the GraphSet?
    '; -var_dump($graphset->containsGraph(new Resource('http://graph2'))); -echo'

    '; - -//creat basic statement -$statement=new Statement(new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4')); - -//get a Graph from the Set and add a basic statement -$graph4=&$graphset->getGraph('http://graph4'); -$graph4->add($statement); - -//remove Quad5 -$graphset->removeQuad($quad5); - -//get an iterator over all Quads -echo '

    All Quads:
    '; -for($iterator = $graphset->findQuads(null,null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//get an iterator over all Quads in 'http://graph3' -echo '

    All Quads in http://graph3:
    '; -for($iterator = $graphset->findQuads(new resource('http://graph3'),null,null,null); $iterator->valid(); $iterator->next()) -{ - $quad=$iterator->current(); - echo $quad->toString().'
    '; -}; - -//how many Quads are in the whole GraphSet -echo '

    How many Quads are in the whole GraphSet?
    '; -echo $graphset->countQuads(); - -//does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object14) ? -echo '

    Does the GraphSet contain the Quad (http://graph4, http://subject4, http://predicate4, http://object14) ?
    '; -var_dump($graphset->containsQuad(new Resource('http://graph4'),new Resource('http://subject4'),new Resource('http://predicate4'),new Resource('http://object4'))); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_RdqlQuery.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_RdqlQuery.php deleted file mode 100755 index a275f98d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_RdqlQuery.php +++ /dev/null @@ -1,133 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - -// Show input model -//$model->writeAsHtmlTable(); - - -echo "

    "; - - -echo "
    show the age of all employees ,using the RdqlResultIterator
    "; -$rdql_query = ' -SELECT ?givenName, ?age -WHERE (?x, v:age, ?age), - (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName) -USING vcard FOR - v FOR '; - -//query model, get RDQLResultIterator -$rdqlIter = $model->rdqlQueryasIterator($rdql_query); - -//get different Result labels as array -$result_labels=$rdqlIter->getResultLabels(); - -echo "
    Result Label Names: "; -for ($i=0; $i Number of results: ".$rdqlIter->countResults(); -echo "
    Result objects, serialized to string:
    "; -//serialize result to string -while ($rdqlIter->hasNext()) { - $curren_result=$rdqlIter->next(); - echo "
    "; - for ($j=0; $j toString()."
    "; -}; - - - -echo "

    "; - -// show emails of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?email -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?blank1 vcard:Family ?familyName) - (?person vcard:EMAIL ?blank2) - (?blank2 rdf:value ?email) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" -USING vcard FOR - v FOR '; - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - - -echo "
    show all employees over 30
    "; - -// show all employees over 30 -$rdql_query = ' -SELECT ?employee, ?age -WHERE (?x, vcard:FN, ?employee), (?x, , ?age) -AND ?age > 30 -USING vcard FOR - v FOR '; - - -$res = $model->rdqlQuery($rdql_query); - -RdqlEngine::writeQueryResultAsHtmlTable($res); - - - -echo "

    "; - - -// find out whose number is it: +1 111 2212 431 -$rdql_query = ' -SELECT ?x, ?type -WHERE (?x, vcard:TEL, ?tel), - (?tel, rdf:value, ?telNumber) - (?tel, rdf:type, ?type) -AND ?telNumber eq "+1 111 2212 431" -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -echo "

    "; - -// show office telephone numbers of all employees -$rdql_query = ' -SELECT ?givenName, ?familyName, ?telNumber -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?blank1 vcard:Family ?familyName) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumber) - (?blank2 rdf:type ?type) -AND ?person ~~ "/example.com\/EMPLOYEES\//i" && ?type eq vcard:work -USING vcard FOR - v FOR '; -$res = $model->rdqlQuery($rdql_query); -RdqlEngine::writeQueryResultAsHtmlTable($res); - - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SerializerOptions.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SerializerOptions.php deleted file mode 100755 index 3d5c6227..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SerializerOptions.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - Test Serializer Options - - - -load($base); - -// Output model as HTML table -//$model->writeAsHtmlTable(); -echo "

    "; - - -// Create Serializer and serialize model to RDF with default configuration -$ser = new RDFSerializer(); -$rdf =& $ser->serialize($model); -echo "

    "; - -// Serialize model to RDF using attributes -$ser->configUseAttributes(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseAttributes(FALSE); - -// Serialize model to RDF using entities -$ser->configUseEntities(TRUE); -$rdf =& $ser->serialize($model); -echo "

    "; -$ser->configUseEntities(FALSE); - -?> - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SetDatabaseConnection.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SetDatabaseConnection.php deleted file mode 100755 index f8c86c5a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_SetDatabaseConnection.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -createTables('MsAccess'); - - - -## 2. Connect to MySQL database and create tables. - -/* -// Connect to MySQL database with user defined connection settings -$rdf_database = new DbStore('MySQL', 'localhost', 'db_name', 'user_name', 'password' ); - -// Create tables for MySQL -$rdf_database->createTables('MySQL'); -*/ - - - -## 3. Connect to other databases - -/* -// Example: -// Connect to Oracle database with user defined connection settings -$rdf_database = new DbStore('Oracle', FALSE, 'db_name', 'username', 'password' ); - -// Method createTables() currently supports only MySQL and MsAccess. -// If you want to use other databases, you will have to create tables by yourself -// according to the abstract database schema described in the API documentation. -*/ - - -## 4. Close the database connection - -// Close the connection -$rdf_database->close(); - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_StoringModelsInDatabase.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_StoringModelsInDatabase.php deleted file mode 100755 index f8b42690..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_StoringModelsInDatabase.php +++ /dev/null @@ -1,98 +0,0 @@ - - */ -?> - - - - - - Test Store Models in Database - - - -load($base); - -// Now store the model in database - -// An unique modelURI will be generated -$rdf_database->putModel($memModel); - -// You can also provide an URI for the model to be stored -$modelURI = "example1.rdf"; - -// But then you must check if there already is a model with the same modelURI -// otherwise the method putModel() will return FALSE -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $rdf_database->putModel($memModel, $modelURI); - - -## 3. Create a new database model -## ------------------------------ - -$modelURI = "newDbModel"; - -// Base URI of the new model (optional) -$baseURI = "baseURIofMyNewDbModel#"; - -// get a new DbModel -if ($rdf_database->modelExists($modelURI)) - echo "Model with the same URI: '$modelURI' already exists"; -else - $dbModel = $rdf_database->getNewModel($modelURI, $baseURI); - - -## 4. List all models stored in database -## ------------------------------------- - -// Get an array with modelURI and baseURI of all models stored in rdf database -$list = $rdf_database->listModels(); - -// Show the database contents -foreach ($list as $model) { - echo "modelURI: " .$model['modelURI'] ."
    "; - echo "baseURI : " .$model['baseURI'] ."

    "; -} - - -?> - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_TraverseModel.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_TraverseModel.php deleted file mode 100755 index 2ab6a6ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_TraverseModel.php +++ /dev/null @@ -1,55 +0,0 @@ - - - - Test Traverse MemModel - - - -load($base); - - -// Get Iterator from model -$it = $model->getStatementIterator(); - -// Traverse model and output statements -while ($it->hasNext()) { - $statement = $it->next(); - echo "Statement number: " . $it->getCurrentPosition() . "
    "; - echo "Subject: " . $statement->getLabelSubject() . "
    "; - echo "Predicate: " . $statement->getLabelPredicate() . "
    "; - echo "Object: " . $statement->getLabelObject() . "

    "; -} - -// Move to the last statement and print it -$it->moveLast(); -$statement = $it->current(); - -// Traverse model backward and print statements -echo $statement->toString() . "
    "; -while($it->hasPrevious()) { - $statement = $it->previous(); - echo $statement->toString() . "
    "; -} - -// Jump to statement 2 and print it -$it->moveTo(2); -$statement = $it->current(); -echo $statement->toString() . "
    "; - -?> - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_setoperations.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_setoperations.php deleted file mode 100755 index adb40e0c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/test_setoperations.php +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Test Set Operations - - - - - - -1. Generate and show two MemModels"; - -// Create empty MemModel -$model = new MemModel(); -$model->setbaseURI("http://www.bizer.de"); - -$model2 = new MemModel(); -$model2->setbaseURI("http://www.bizer.de/zwei"); - -// Create nodes and add statements to models -$myhomepage = new Resource("http://www.bizer.de/welcome.html"); -$creator = new Resource("http://purl.org/dc/elements/1.1/creator"); -$me = new Resource("mailto:chris@bizer.de"); -$model->add(new Statement($myhomepage, $creator, $me)); -$model2->add(new Statement($myhomepage, $creator, $me)); - -$creation_date = new Resource("http://www.example.org/terms/creation-date"); -$August16 = new Literal("August 16, 2002"); -$model->add(new Statement($myhomepage, $creation_date, $August16)); -$model2->add(new Statement($myhomepage, $creation_date, $August16)); - -$language = new Resource("http://www.example.org/terms/language"); -$deutsch = new Literal("Deutsch", "de"); -$model->add(new Statement($myhomepage, $language, $deutsch)); - -$name = new Resource("http://www.example.org/terms/Name"); -$chrisbizer = new Literal("Chris Bizer"); -$model2->add(new Statement($me, $name, $chrisbizer)); - -// Output as Table -echo "

    Model 1
    "; -$model->writeAsHtmlTable(); -echo "
    Model 2
    "; -$model2->writeAsHtmlTable(); -echo "

    "; - -echo "

    2. Make some tests

    "; -echo "Test: Model 2 contains any statements from model 1 :".$model2->containsAny($model)."

    "; -echo "Test: Model 1 contains any statements from model 2 :".$model->containsAny($model2)."

    "; -echo "Test: Model 2 contains all statements from model 1 :".$model2->containsAll($model)."

    "; -echo "Test: Model 1 contains all statements from model 2 :".$model->containsAll($model2)."

    "; -echo "Test: Model 1 equals model 2 :".$model->equals($model2)."

    "; - -echo "

    3. Unite model 1 and model 2

    "; -$model3 =& $model->unite($model2); -$model3->writeAsHtmlTable(); - -echo "

    4. Intersect model 1 and model 2

    "; -$model4 =& $model->intersect($model2); -$model4->writeAsHtmlTable(); - -echo "

    5. Substract model 2 from model 1

    "; -$model5 =& $model->subtract($model2); -$model5->writeAsHtmlTable(); - -echo "

    6. Reify model 1

    "; -$model6 =& $model->reify(); -$model6->writeAsHtmlTable(); - -?> - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/all-wcprops deleted file mode 100755 index f9f8b99b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/all-wcprops +++ /dev/null @@ -1,95 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/test/unit -END -emptyResource.rdf -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/emptyResource.rdf -END -sparqldbTests.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/349/trunk/rdfapi-php/test/unit/sparqldbTests.php -END -allTests.php -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/552/trunk/rdfapi-php/test/unit/allTests.php -END -show_passes.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/285/trunk/rdfapi-php/test/unit/show_passes.php -END -example1.rdf -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/example1.rdf -END -sparqlParserTests.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/513/trunk/rdfapi-php/test/unit/sparqlParserTests.php -END -multipleTypes.rdf -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/multipleTypes.rdf -END -emptyResource_serialized.rdf -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/emptyResource_serialized.rdf -END -EarlReporter.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/514/trunk/rdfapi-php/test/unit/EarlReporter.php -END -runAnyTest.php -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/runAnyTest.php -END -InfModelTests.php -K 25 -svn:wc:ra_dav:version-url -V 77 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/InfModelTests.php -END -sparqlTests.php -K 25 -svn:wc:ra_dav:version-url -V 75 -/svnroot/rdfapi-php/!svn/ver/349/trunk/rdfapi-php/test/unit/sparqlTests.php -END -mt1.rdf -K 25 -svn:wc:ra_dav:version-url -V 67 -/svnroot/rdfapi-php/!svn/ver/426/trunk/rdfapi-php/test/unit/mt1.rdf -END -README.txt -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/README.txt -END -employees.rdf -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/employees.rdf -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/entries deleted file mode 100755 index 499db968..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/entries +++ /dev/null @@ -1,253 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-11T20:27:34.710933Z -555 -p_frischmuth - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Namespaces -dir - -emptyResource.rdf -file - - - - -2008-02-29T14:57:26.012311Z -dfe955540f815ddaf311483f7373c727 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -sparqldbTests.php -file - - - - -2008-02-29T14:57:26.027931Z -e11fbd4c204dc651c05c55437fe37eed -2007-03-12T10:08:02.000000Z -349 -cweiske -has-props - -allTests.php -file - - - - -2008-02-29T14:57:26.012311Z -9a0c507683f40c598066c6b6caa018f7 -2007-11-23T09:12:11.140388Z -552 -p_frischmuth -has-props - -OntModel -dir - -show_passes.php -file - - - - -2008-02-29T14:57:26.027931Z -1c6275c2f19619305758dc1fe2366e5d -2006-06-14T13:15:32.000000Z -285 -tgauss -has-props - -Syntax -dir - -example1.rdf -file - - - - -2008-02-29T14:57:26.043552Z -033f3ebdde0e1aea8d342a781e79291d -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -sparqlParserTests.php -file - - - - -2008-02-29T14:57:26.043552Z -4b669be34e4f2bcc57ae352457cb80a4 -2007-08-13T14:12:38.259343Z -513 -cweiske - -Namedgraphs -dir - -multipleTypes.rdf -file - - - - -2008-02-29T14:57:26.059173Z -ed1792ee0464dfde65209faec520173b -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -emptyResource_serialized.rdf -file - - - - -2008-02-29T14:57:26.059173Z -11949050de81a97dd7602247a1387d82 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -EarlReporter.php -file - - - - -2008-02-29T14:57:26.074793Z -2520a74fa466d55e68a25c5513f41478 -2007-08-13T15:17:42.618486Z -514 -cweiske - -InfModel -dir - -Model -dir - -Sparql -dir - -runAnyTest.php -file - - - - -2008-02-29T14:57:26.074793Z -fe4b926ceac4e20530d74ccb5c41ef90 -2007-10-09T16:24:08.620955Z -544 -cweiske - -utility -dir - -InfModelTests.php -file - - - - -2008-02-29T14:57:26.090414Z -6474e895b485aa069be8d7e019953336 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -Vocabulary -dir - -ResModel -dir - -RDF -dir - -README.txt -file - - - - -2008-02-29T14:57:26.090414Z -4de9837e4a154b7260882372eb2e28b6 -2007-10-09T16:24:08.620955Z -544 -cweiske -has-props - -mt1.rdf -file - - - - -2008-02-29T14:57:26.106034Z -d6b9c6d80a86b1524c2d3e342576f7ac -2007-05-01T13:32:10.000000Z -426 -cweiske -has-props - -sparqlTests.php -file - - - - -2008-02-29T14:57:26.106034Z -20dcd1433226059d34cc30b34debadef -2007-03-12T10:08:02.000000Z -349 -cweiske -has-props - -employees.rdf -file - - - - -2008-02-29T14:57:26.121655Z -1cc5bff8927b532de67355a24281b010 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/InfModelTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/InfModelTests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/InfModelTests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/README.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/README.txt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/README.txt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/allTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/allTests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/allTests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/employees.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/employees.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource_serialized.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource_serialized.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/emptyResource_serialized.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/example1.rdf.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/example1.rdf.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/mt1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/mt1.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/mt1.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/multipleTypes.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/multipleTypes.rdf.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/multipleTypes.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/show_passes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/show_passes.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/show_passes.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqlTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqlTests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqlTests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqldbTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqldbTests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/prop-base/sparqldbTests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/EarlReporter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/EarlReporter.php.svn-base deleted file mode 100755 index e06943f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/EarlReporter.php.svn-base +++ /dev/null @@ -1,224 +0,0 @@ - -* @see http://www.w3.org/2001/sw/DataAccess/tests/earl -*/ -require_once SIMPLETEST_INCLUDE_DIR . 'simpletest.php'; -require_once SIMPLETEST_INCLUDE_DIR . 'reporter.php'; -require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php'; -require_once RDFAPI_INCLUDE_DIR . 'syntax/N3Serializer.php'; - - -class EarlReporter extends SimpleReporter -{ - const EARL = 'http://www.w3.org/ns/earl#'; - const FOAF = 'http://xmlns.com/foaf/0.1/'; - const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; - const RDFS = 'http://www.w3.org/2000/01/rdf-schema#'; - const DOAP = 'http://usefulinc.com/ns/doap#'; - - protected $model = null; - protected $serializer = null; - - /** - * Set via $testcase->signal('earl:test', 'mytestname') - */ - protected $currentTestName = null; - - - - public function __construct($serializer = null, $model = null) - { - if ($serializer !== null) { - $this->serializer = $serializer; - } else { - $this->serializer = new N3Serializer(); - } - - if ($model !== null) { - $this->model = model; - } else { - $this->model = new MemModel(); - } - - if (!isset($GLOBALS['earlReport'])) { - die('Please configure $GLOBALS[\'earlReport\'] as shown in config.php.dist' . "\n"); - } - }//public function __construct($serializer = null, $model = null) - - - - function paintHeader($test_name) - { - //add personal information about the asserter - $this->assertingPerson = new Resource($GLOBALS['earlReport']['reporter']['seeAlso'] . '#me'); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::RDF . 'type'), - new Resource(self::FOAF . 'Person') - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::RDFS . 'seeAlso'), - new Resource($GLOBALS['earlReport']['reporter']['seeAlso']) - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::FOAF . 'homepage'), - new Resource($GLOBALS['earlReport']['reporter']['homepage']) - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::FOAF . 'name'), - new Literal($GLOBALS['earlReport']['reporter']['name']) - )); - - - //project information - $this->project = new Resource('http://rdfapi-php.sf.net/'); - $this->model->add(new Statement( - $this->project, - new Resource(self::RDF . 'type'), - new Resource(self::DOAP . 'Project') - )); - $this->model->add(new Statement( - $this->project, - new Resource(self::DOAP . 'name'), - new Literal('RDF API for PHP') - )); - $version = new BlankNode($this->model); - $this->model->add(new Statement( - $this->project, - new Resource(self::DOAP . 'release'), - $version - )); - $this->model->add(new Statement( - $version, - new Resource(self::RDF . 'type'), - new Resource(self::DOAP . 'Version') - )); - $this->model->add(new Statement( - $version, - new Resource(self::DOAP . 'created'), - new Literal(date('Y-m-d H:i'), null, 'http://www.w3.org/2001/XMLSchema#date') - )); - $this->model->add(new Statement( - $version, - new Resource(self::DOAP . 'name'), - new Literal('RAP SVN-' . date('Y-m-d\\TH:i')) - )); - }//function paintHeader($test_name) - - - - function paintFooter($test_name) - { - $this->serializer->addNSPrefix(self::DOAP, 'doap'); - $this->serializer->addNSPrefix(self::EARL, 'earl'); - $this->serializer->addNSPrefix(self::FOAF, 'foaf'); - - $this->serializer->addNoNSPrefix('http://rdfapi-php.sf.net/'); - $this->serializer->addNoNSPrefix($GLOBALS['earlReport']['reporter']['homepage']); - - $this->serializer->setCompress(true); - $this->serializer->setPrettyPrint(true); - $this->serializer->setNest(true); - - echo $this->serializer->serialize( - $this->model - ); - } - - - - /** - * We use this to keep track of test titles - */ - function paintSignal($type, $payload) - { - switch ($type) { - case 'earl:name': - $this->currentTestName = $payload; - break; - default: - echo "Unknown signal type $type\n"; - break; - } - }//function paintSignal($type, $payload) - - - function paintStart($test_name, $size) { - parent::paintStart($test_name, $size); - } - - function paintEnd($test_name, $size) { - parent::paintEnd($test_name, $size); - } - - function paintPass($message) { - $this->addTest(true); -// echo 'pass: ' . $message . "\n"; - parent::paintPass($message); - } - - function paintFail($message) { - $this->addTest(false); -// echo 'fail: ' . $message . "\n"; - parent::paintFail($message); - } - - function addTest($bPass) - { - if ($this->currentTestName === null) { -// echo "No test name set! Ignoring test\n"; - return; - } - - $assertion = new BlankNode($this->model); - $this->model->add(new Statement( - $assertion, - new Resource(self::RDF . 'type'), - new Resource(self::EARL . 'Assertion') - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'assertedBy'), - $this->assertingPerson - )); - - $result = new BlankNode($this->model); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'result'), - $result - )); - $this->model->add(new Statement( - $result, - new Resource(self::RDF . 'type'), - new Resource(self::EARL . 'TestResult') - )); - $this->model->add(new Statement( - $result, - new Resource(self::EARL . 'outcome'), - new Resource(self::EARL . ($bPass ? 'pass' : 'fail')) - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'subject'), - $this->project - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'test'), - new Resource($this->currentTestName) - )); - - - $this->currentTestName = null; - }//function addTest($bPass) - -}//class EarlReporter extends SimpleReporter - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/InfModelTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/InfModelTests.php.svn-base deleted file mode 100755 index 9f4a4d1c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/InfModelTests.php.svn-base +++ /dev/null @@ -1,114 +0,0 @@ -
    History:
      - *
    • 09-15-2004 : Initial version of this class. - * - * For running the tests you have to - * - * 1. Install the "Simple Test" testing framework - * into the document root of your web server. - * Simple test can be downloaded from: - * http://sourceforge.net/projects/simpletest/ - * - * 2. Now copy the "unit" folder to /rdfapi/test/ - * - * 3. Make sure that "simple Test" and RAP is included correctly in - * allTest.php and in - * showPasses.php - * - * 4. To run the tests execute InfTests.php - * - * @version V0.9.1 - * @author Daniel Westphal - * - * @package unittests - * @access public - */ - - - define("SIMPLETEST_INCLUDE_DIR", "C:/!htdocs/simpletest/"); - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/"); - define("RDFAPI_TEST_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/"); - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - require_once( SIMPLETEST_INCLUDE_DIR . 'unit_tester.php'); - require_once( SIMPLETEST_INCLUDE_DIR . 'reporter.php'); - include_once( RDFAPI_INCLUDE_DIR . PACKAGE_INFMODEL); - include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - require_once(RDFAPI_TEST_INCLUDE_DIR.'test/unit/show_passes.php'); - define('RDFS_INF_TESTFILES',RDFAPI_TEST_INCLUDE_DIR.'test/unit/Infmodel/'); - $_SESSION['passes']=0; - $_SESSION['fails']=0; - define('LOG',FALSE); - - if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".'-----'.$time.'-----'."\r\n"); - } - -// ============================================================================= -// *************************** package InfModel *********************************** -// ============================================================================= - - $test1a= &new GroupTest('Model InfModelF Set Operations Test'); - $test1a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_SetOperations_tests.php'); - $test1a->run(new ShowPasses()); - - $test1b= &new GroupTest('Model InfModelB Set Operations Test'); - $test1b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_SetOperations_tests.php'); - $test1b->run(new ShowPasses()); - - $test2a= &new GroupTest('Model InfModelF Basic Operations Test'); - $test2a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_BasicOperations_tests.php'); - $test2a->run(new ShowPasses()); - - $test2b= &new GroupTest('Model InfModelB Basic Operations Test'); - $test2b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelB_BasicOperations_tests.php'); - $test2b->run(new ShowPasses()); - - $test3a= &new GroupTest('Model InfModelF Indextest'); - $test3a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_index_tests.php'); - $test3a->run(new ShowPasses()); - - $test3b= &new GroupTest('Model InfModelB Indextest'); - $test3b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelB_index_tests.php'); - $test3b->run(new ShowPasses()); - - $test4a= &new GroupTest('Model InfModelF Search Test'); - $test4a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_search_tests.php'); - $test4a->run(new ShowPasses()); - - $test4b= &new GroupTest('Model InfModelB Search Test'); - $test4b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_search_tests.php'); - $test4b->run(new ShowPasses()); - - $test5a= &new GroupTest('Model InfModelF : jena RDFS-tests '); - $test5a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_jena_rdfs_test.php'); - $test5a->run(new ShowPasses()); - - $test5b= &new GroupTest('Model InfModelB : jena RDFS-tests '); - $test5b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_jena_rdfs_test.php'); - $test5b->run(new ShowPasses()); - - $test6a= &new GroupTest('InfModelF entailment tests'); - $test6a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_entailment_test.php'); - $test6a->run(new ShowPasses()); - - $test6b= &new GroupTest('InfModelB entailment tests'); - $test6b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_entailment_test.php'); - $test6b->run(new ShowPasses()); - - if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".' Passes: '.$_SESSION['passes'].' Fails: '.$_SESSION['fails']."\r\n"); - fclose($file); - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/README.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/README.txt.svn-base deleted file mode 100755 index 123635be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/README.txt.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - ----------------------------------------------------------- -Using the RAP Unit Tests ----------------------------------------------------------- - -This package contains unit test for testing the RAP classes. -The test use the "Simple Test" testing framework, which is -similar to JUnit. - -For running the tests you have to - -1. Install the "Simple Test" testing framework - into the document root of your web server. - Simple test can be downloaded from: - http://sourceforge.net/projects/simpletest/ - -2. Copy the simpletest folder to the right location so that - your directory layout is the following: - /some/root/path/ - rdfapi-php/ - api/ - doc/ - netapi/ - test/ - tools/ - simpletest/ - simpletest.php - -3. Make sure that "simple Test" and RAP is included correctly in - allTest.php and in - showPasses.php - -4. To run the tests execute allTest.php - -In allTest.php you can also comment out all tests that you do not want to execute. - -To run single test files, use runAnyTest.php: - php runAnyTest.php Syntax/n3Parser_test.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/allTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/allTests.php.svn-base deleted file mode 100755 index 32dc0481..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/allTests.php.svn-base +++ /dev/null @@ -1,221 +0,0 @@ - - * - * @package unittests - * @access public - */ - -//tests take some time -set_time_limit(10*60); - -if (!@include_once(dirname(__FILE__) . '/../config.php')) { - die('Make a copy of test/config.php.dist, change it and save it as test/config.php'); -} - -define('RDFS_INF_TESTFILES', RDFAPI_TEST_INCLUDE_DIR . 'test/unit/InfModel/'); -if (!defined('SPARQL_TESTFILES')) { - define('SPARQL_TESTFILES' , RDFAPI_TEST_INCLUDE_DIR . 'test/unit/Sparql/'); -} -define('MODEL_TESTFILES' , RDFAPI_TEST_INCLUDE_DIR . 'test/unit/Model/'); - - -require_once SIMPLETEST_INCLUDE_DIR . 'unit_tester.php'; -require_once SIMPLETEST_INCLUDE_DIR . 'reporter.php'; -require_once 'show_passes.php'; -require_once RDFAPI_INCLUDE_DIR . "RdfAPI.php"; - -require_once RDFAPI_INCLUDE_DIR . PACKAGE_INFMODEL; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_ONTMODEL; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_RDF; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_VOCABULARY; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_DATASET; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_SPARQL; -include(RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/ATOM_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/DC_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/DC_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/FOAF_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/OWL_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/OWL_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RDF_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RDF_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RDFS_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RSS_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/RSS_RES.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_C.php'); -include(RDFAPI_INCLUDE_DIR.'vocabulary/VCARD_RES.php'); - - -$_SESSION['passes']=0; -$_SESSION['fails']=0; -if (!defined('LOG')) { - define('LOG', true); -} - -if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".'-----'.$time.'-----'."\r\n"); -} - -if (TextReporter::inCli()) { - $runnerClass = 'TextReporter'; -} else { - $runnerClass = 'ShowPasses'; -} - - -// ============================================================================= -// *************************** package Model *********************************** -// ============================================================================= -$test_model = &new GroupTest('Model tests'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/Model/Model_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/Model/mm_SetOperations_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Model/mm_BasicOperations_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Model/mm_index_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Model/literals_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Model/blanknode_test.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Model/dBModel_test.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/Model/mm_search_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/Model/getModelByRDQL_tests.php'); -$test_model->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/Model/modelEquals_test.php'); - -$test_model->run(new $runnerClass()); - -// ============================================================================= -// *************************** package Syntax ********************************** -// ============================================================================= - -$test_syntax = &new GroupTest('Syntax tests'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/n3Parser_test.php'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/n3Serializer_test.php'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/rdf_Parser_tests.php'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/rdf_Serializer_tests.php'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/jsonParser_test.php'); -$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Syntax/jsonSerializer_test.php'); -//$test_syntax->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/rdf/rdf_test_cases.php'); -$test_syntax->run(new $runnerClass()); - -// ============================================================================= -// *************************** package Utility ********************************* -// ============================================================================= - -$test_util = &new GroupTest('Utility tests'); -$test_util->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/utility/ut_FindIterator_tests.php'); -$test_util->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/utility/ut_it_tests.php'); -$test_util->run(new $runnerClass()); - // ============================================================================= -// *************************** package InfModel ******************************** -// ============================================================================= - -$test_inf= &new GroupTest('Model InfModel tests'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_SetOperations_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_SetOperations_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_BasicOperations_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelB_BasicOperations_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_index_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_search_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_search_tests.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_jena_rdfs_test.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_jena_rdfs_test.php'); -$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_entailment_test.php'); -//$test_inf->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_entailment_test.php'); -$test_inf->run(new $runnerClass()); - -// ============================================================================= -// *************************** package ResModel ******************************** -// ============================================================================= -$test_res= &new GroupTest('ResModel basic operations tests'); -$test_res->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/ResModel/ResModel_BasicOperations_tests.php'); -$test_res->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/ResModel/ResModel_Property_tests.php'); -$test_res->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/ResModel/ResModel_search_tests.php'); -$test_res->run(new $runnerClass()); - -// ============================================================================= -// *************************** package OntModel ******************************** -// ============================================================================= -$test_ont= &new GroupTest('OntModel basic operations tests'); -$test_ont->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/OntModel/OntModel_BasicOperations_tests.php'); -$test_ont->run(new $runnerClass()); - - -// ============================================================================= -// *************************** package vocabulary ****************************** -// ============================================================================= - -$test_voc= &new GroupTest('Vocabulary tests'); -//$test_voc->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Vocabulary/voc_tests.php'); -$test_voc->run(new $runnerClass()); - -// ============================================================================= -// *************************** namespace handling ****************************** -// ============================================================================= - - -$test_nms= &new GroupTest('Namespace tests'); -$test_nms->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Namespaces/Namespace_handling_tests.php'); -$test_nms->run(new $runnerClass()); - - -// ============================================================================= -// ************************** named graphs api tests**************************** -// ============================================================================= - -$test_ng= &new GroupTest('Named Graphs api tests'); -$test_ng->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Namedgraphs/Namedgraphs_tests.php'); -$test_ng->run(new $runnerClass()); - -// ============================================================================= -// ******************************* sparql tests ******************************** -// ============================================================================= - -$test_sparql= &new GroupTest('Sparql Testcases'); -$test_sparql->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/ResultParserTests_test.php'); -$test_sparql->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlParserTests_test.php'); -$test_sparql->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlTests_test.php'); -$test_sparql->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlDbTests_test.php'); -$test_sparql->run(new $runnerClass()); - - - - -if (LOG) { - $file = fopen ("testlog.log", "a"); - $time = strftime('%d.%m.%y %H:%M:%S' ); - fputs($file, - "\r\n" - . ' Passes: ' . $_SESSION['passes'] - . ' Fails: ' . $_SESSION['fails'] - . "\r\n" - ); - fclose($file); -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/employees.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/employees.rdf.svn-base deleted file mode 100755 index a02fc431..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/employees.rdf.svn-base +++ /dev/null @@ -1,75 +0,0 @@ - - - - - B.Parker@example.com - - - - Murphy - Monica - - - - +1 111 2222 999 - - - - M.Murphy@example.com - - - - Simpson - George - - - - +1 111 2222 101 - - - - G.Simpson@example.com - - - - Parker - Bill - - - - +1 111 2222 668 - - - - +1 111 2212 431 - - - - 33 - - Bill Parker - - - - - - - 41 - - George Simpson - - - - - - 29 - - Monica Murphy - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource.rdf.svn-base deleted file mode 100755 index 79b9dfad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource.rdf.svn-base +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource_serialized.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource_serialized.rdf.svn-base deleted file mode 100755 index 0c26d2f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/emptyResource_serialized.rdf.svn-base +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/example1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/example1.rdf.svn-base deleted file mode 100755 index 41ea683f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/example1.rdf.svn-base +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - Ora Lassila - lassila@w3.org - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/mt1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/mt1.rdf.svn-base deleted file mode 100755 index 317cbf50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/mt1.rdf.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/multipleTypes.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/multipleTypes.rdf.svn-base deleted file mode 100755 index 34053a5e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/multipleTypes.rdf.svn-base +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/runAnyTest.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/runAnyTest.php.svn-base deleted file mode 100755 index 38bed42d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/runAnyTest.php.svn-base +++ /dev/null @@ -1,65 +0,0 @@ - earl-results-rap-2007-10-09.n3 -* -*/ -if (!@include_once(dirname(__FILE__) . '/../config.php')) { - die('Make a copy of test/config.php.dist, change it and save it as test/config.php'); -} - -if ($argc <= 1 || $argv[1] == '--help') { - echo <<addTestFile($file); -} - -//$test_sparql->run(new ShowPasses()); -$test_sparql->run(new $reportClass()); - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/show_passes.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/show_passes.php.svn-base deleted file mode 100755 index 5a52e1e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/show_passes.php.svn-base +++ /dev/null @@ -1,62 +0,0 @@ - - * - * @package unittests - * @access public - */ - - if (!defined('SIMPLE_TEST')) { - define('SIMPLE_TEST', 'C:/!htdocs/simpletest/'); - } - require_once(SIMPLE_TEST . 'reporter.php'); - - class ShowPasses extends HtmlReporter { - - - function ShowPasses() { - $this->HtmlReporter(); - - } - - function paintPass($message) { - // print "Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - // print implode("->", $breadcrumb); - // print "->$message
      \n"; - // print "

      "; - parent::paintPass($message); - $_SESSION['passes']++; - } - - function paintFail($message) { - $this->paintHeader(" ".$_SESSION['test']); - parent::paintFail($message); - if(isset($_SESSION['mod1'])&&isset($_SESSION['mod2'])){ - $_SESSION['mod1']->writeAsHtmlTable(); - $_SESSION['mod2']->writeAsHtmlTable();} - $this->paintFooter($_SESSION['test']); - print "

      "; - $_SESSION['fails']++; - if(LOG){ - $file = fopen ("testlog.log", "a"); - fputs($file,"\r\n".$_SESSION['test'].' fails'."\r\n"); - fclose($file); - } - } - - function _getCss() { - return parent::_getCss() . ' .pass { color: green; }'; - } - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlParserTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlParserTests.php.svn-base deleted file mode 100755 index ca882b90..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlParserTests.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlParserTests_test.php'); -//$test_sparql->run(new ShowPasses()); -$test_sparql->run(new TextReporter()); -//$test_sparql->run(new EarlReporter()); - - -if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".' Passes: '.$_SESSION['passes'].' Fails: '.$_SESSION['fails']."\r\n"); - fclose($file); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlTests.php.svn-base deleted file mode 100755 index fc3fbe97..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqlTests.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlTests_test.php'); -$test_sparql->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/ResultParserTests_test.php'); -//$test_sparql->run(new ShowPasses()); -$test_sparql->run(new TextReporter()); - - -if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".' Passes: '.$_SESSION['passes'].' Fails: '.$_SESSION['fails']."\r\n"); - fclose($file); -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqldbTests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqldbTests.php.svn-base deleted file mode 100755 index 84e86cb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/.svn/text-base/sparqldbTests.php.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/Sparql/SparqlDbTests_test.php'); -//$test_sparql->run(new ShowPasses()); -$test_sparql->run(new TextReporter()); - - -if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".' Passes: '.$_SESSION['passes'].' Fails: '.$_SESSION['fails']."\r\n"); - fclose($file); -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/EarlReporter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/EarlReporter.php deleted file mode 100755 index e06943f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/EarlReporter.php +++ /dev/null @@ -1,224 +0,0 @@ - -* @see http://www.w3.org/2001/sw/DataAccess/tests/earl -*/ -require_once SIMPLETEST_INCLUDE_DIR . 'simpletest.php'; -require_once SIMPLETEST_INCLUDE_DIR . 'reporter.php'; -require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php'; -require_once RDFAPI_INCLUDE_DIR . 'syntax/N3Serializer.php'; - - -class EarlReporter extends SimpleReporter -{ - const EARL = 'http://www.w3.org/ns/earl#'; - const FOAF = 'http://xmlns.com/foaf/0.1/'; - const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; - const RDFS = 'http://www.w3.org/2000/01/rdf-schema#'; - const DOAP = 'http://usefulinc.com/ns/doap#'; - - protected $model = null; - protected $serializer = null; - - /** - * Set via $testcase->signal('earl:test', 'mytestname') - */ - protected $currentTestName = null; - - - - public function __construct($serializer = null, $model = null) - { - if ($serializer !== null) { - $this->serializer = $serializer; - } else { - $this->serializer = new N3Serializer(); - } - - if ($model !== null) { - $this->model = model; - } else { - $this->model = new MemModel(); - } - - if (!isset($GLOBALS['earlReport'])) { - die('Please configure $GLOBALS[\'earlReport\'] as shown in config.php.dist' . "\n"); - } - }//public function __construct($serializer = null, $model = null) - - - - function paintHeader($test_name) - { - //add personal information about the asserter - $this->assertingPerson = new Resource($GLOBALS['earlReport']['reporter']['seeAlso'] . '#me'); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::RDF . 'type'), - new Resource(self::FOAF . 'Person') - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::RDFS . 'seeAlso'), - new Resource($GLOBALS['earlReport']['reporter']['seeAlso']) - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::FOAF . 'homepage'), - new Resource($GLOBALS['earlReport']['reporter']['homepage']) - )); - $this->model->add(new Statement( - $this->assertingPerson, - new Resource(self::FOAF . 'name'), - new Literal($GLOBALS['earlReport']['reporter']['name']) - )); - - - //project information - $this->project = new Resource('http://rdfapi-php.sf.net/'); - $this->model->add(new Statement( - $this->project, - new Resource(self::RDF . 'type'), - new Resource(self::DOAP . 'Project') - )); - $this->model->add(new Statement( - $this->project, - new Resource(self::DOAP . 'name'), - new Literal('RDF API for PHP') - )); - $version = new BlankNode($this->model); - $this->model->add(new Statement( - $this->project, - new Resource(self::DOAP . 'release'), - $version - )); - $this->model->add(new Statement( - $version, - new Resource(self::RDF . 'type'), - new Resource(self::DOAP . 'Version') - )); - $this->model->add(new Statement( - $version, - new Resource(self::DOAP . 'created'), - new Literal(date('Y-m-d H:i'), null, 'http://www.w3.org/2001/XMLSchema#date') - )); - $this->model->add(new Statement( - $version, - new Resource(self::DOAP . 'name'), - new Literal('RAP SVN-' . date('Y-m-d\\TH:i')) - )); - }//function paintHeader($test_name) - - - - function paintFooter($test_name) - { - $this->serializer->addNSPrefix(self::DOAP, 'doap'); - $this->serializer->addNSPrefix(self::EARL, 'earl'); - $this->serializer->addNSPrefix(self::FOAF, 'foaf'); - - $this->serializer->addNoNSPrefix('http://rdfapi-php.sf.net/'); - $this->serializer->addNoNSPrefix($GLOBALS['earlReport']['reporter']['homepage']); - - $this->serializer->setCompress(true); - $this->serializer->setPrettyPrint(true); - $this->serializer->setNest(true); - - echo $this->serializer->serialize( - $this->model - ); - } - - - - /** - * We use this to keep track of test titles - */ - function paintSignal($type, $payload) - { - switch ($type) { - case 'earl:name': - $this->currentTestName = $payload; - break; - default: - echo "Unknown signal type $type\n"; - break; - } - }//function paintSignal($type, $payload) - - - function paintStart($test_name, $size) { - parent::paintStart($test_name, $size); - } - - function paintEnd($test_name, $size) { - parent::paintEnd($test_name, $size); - } - - function paintPass($message) { - $this->addTest(true); -// echo 'pass: ' . $message . "\n"; - parent::paintPass($message); - } - - function paintFail($message) { - $this->addTest(false); -// echo 'fail: ' . $message . "\n"; - parent::paintFail($message); - } - - function addTest($bPass) - { - if ($this->currentTestName === null) { -// echo "No test name set! Ignoring test\n"; - return; - } - - $assertion = new BlankNode($this->model); - $this->model->add(new Statement( - $assertion, - new Resource(self::RDF . 'type'), - new Resource(self::EARL . 'Assertion') - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'assertedBy'), - $this->assertingPerson - )); - - $result = new BlankNode($this->model); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'result'), - $result - )); - $this->model->add(new Statement( - $result, - new Resource(self::RDF . 'type'), - new Resource(self::EARL . 'TestResult') - )); - $this->model->add(new Statement( - $result, - new Resource(self::EARL . 'outcome'), - new Resource(self::EARL . ($bPass ? 'pass' : 'fail')) - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'subject'), - $this->project - )); - $this->model->add(new Statement( - $assertion, - new Resource(self::EARL . 'test'), - new Resource($this->currentTestName) - )); - - - $this->currentTestName = null; - }//function addTest($bPass) - -}//class EarlReporter extends SimpleReporter - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/all-wcprops deleted file mode 100755 index 524213e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/all-wcprops +++ /dev/null @@ -1,155 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel -END -InfModelF_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_BasicOperations_tests.php -END -RDFSF_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_BasicOperations_tests.php -END -InfModelB_SetOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_SetOperations_tests.php -END -RDFSB_SetOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_SetOperations_tests.php -END -InfModelF_SetOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_SetOperations_tests.php -END -RDFSF_SetOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_SetOperations_tests.php -END -InfModelB_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_search_tests.php -END -RDFSB_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_search_tests.php -END -InfModelB_index_tests.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_index_tests.php -END -InfModelB_jena_rdfs_test.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_jena_rdfs_test.php -END -RDFSB_index_tests.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_index_tests.php -END -RDFSB_jena_rdfs_test.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_jena_rdfs_test.php -END -InfModelF_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_search_tests.php -END -RDFSF_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_search_tests.php -END -InfModelF_index_tests.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_index_tests.php -END -InfModelF_jena_rdfs_test.php -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_jena_rdfs_test.php -END -RDFSF_index_tests.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_index_tests.php -END -RDFS_entailment_test.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFS_entailment_test.php -END -InfModelB_entailment_test.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_entailment_test.php -END -RDFSF_jena_rdfs_test.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_jena_rdfs_test.php -END -RDFSB_entailment_test.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_entailment_test.php -END -InfModelF_entailment_test.php -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelF_entailment_test.php -END -RDFSF_entailment_test.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSF_entailment_test.php -END -InfModelB_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/InfModelB_BasicOperations_tests.php -END -RDFSB_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/RDFSB_BasicOperations_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/entries deleted file mode 100755 index 6c6cb9a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/entries +++ /dev/null @@ -1,356 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/InfModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:58:11.000000Z -321 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -InfModelF_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:03.128132Z -8459874d0aef9ec20bd9e3152bd79d63 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:03.128132Z -5fb6cf4c7b524baad4ed3af47c0f61b6 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelB_SetOperations_tests.php -file - - - - -2008-02-29T14:57:03.143752Z -1420b977585ee9a74a40c755c834d6eb -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_SetOperations_tests.php -file - - - - -2008-02-29T14:57:03.143752Z -2ba22909f911cb078be21fc6869193f7 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelF_SetOperations_tests.php -file - - - - -2008-02-29T14:57:03.159373Z -c028aab5c38f1ccb546602d3a178c6db -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_SetOperations_tests.php -file - - - - -2008-02-29T14:57:03.159373Z -9b0a9325778ff6ef45f4ad384a0c3dfd -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelB_search_tests.php -file - - - - -2008-02-29T14:57:03.174994Z -f8f67ed432c8f6ee38d6679f6f94a4c0 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_search_tests.php -file - - - - -2008-02-29T14:57:03.190614Z -ba335aaa9de1646cf52616b2a0283b72 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelB_index_tests.php -file - - - - -2008-02-29T14:57:03.190614Z -b29a9f3474e75e71afa44f1db452b2b8 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -rdfs -dir - -InfModelB_jena_rdfs_test.php -file - - - - -2008-02-29T14:57:03.206235Z -8502a73e7fbf6f9741dfa66ca7f19d0e -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_index_tests.php -file - - - - -2008-02-29T14:57:03.206235Z -6e0b7906cd0351b31212beeedfab1c60 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_jena_rdfs_test.php -file - - - - -2008-02-29T14:57:03.221855Z -ea1f6138c623d6519b574b4521220624 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelF_search_tests.php -file - - - - -2008-02-29T14:57:03.221855Z -7a8ebf6eac65c1a8b26b8e80abd4b217 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_search_tests.php -file - - - - -2008-02-29T14:57:03.237476Z -5f33d8051c7ea818752dbf8f4dbae778 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelF_index_tests.php -file - - - - -2008-02-29T14:57:03.253097Z -af63cdb1161cbee6837f895d4d97999d -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelF_jena_rdfs_test.php -file - - - - -2008-02-29T14:57:03.253097Z -46d48177101432f2ab27203d5033fd52 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_index_tests.php -file - - - - -2008-02-29T14:57:03.268717Z -3202b52ee9e69ec1ecb870313ba80e91 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFS_entailment_test.php -file - - - - -2008-02-29T14:57:03.268717Z -ae242edc618f2bb9ad862aea573af7c2 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelB_entailment_test.php -file - - - - -2008-02-29T14:57:03.284338Z -a1182c613b209abff44ca4f7fd6ff2ac -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_jena_rdfs_test.php -file - - - - -2008-02-29T14:57:03.284338Z -d9336b0be3b2907263db3800496eb2d4 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_entailment_test.php -file - - - - -2008-02-29T14:57:03.299958Z -d693b6cd132ebc4ce07d67118816eac1 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelF_entailment_test.php -file - - - - -2008-02-29T14:57:03.299958Z -9d2bd8ff9088139c44e1912dc65d29d1 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSF_entailment_test.php -file - - - - -2008-02-29T14:57:03.315579Z -61e5d8a9296b3abbbb42e4963063bdae -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -InfModelB_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:03.315579Z -29a2ca12238eaf1073e32fb51889ad6b -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -RDFSB_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:03.331200Z -40566ab1c81c1277a6905d6f263e1c64 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_SetOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_entailment_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_entailment_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_index_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_index_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_jena_rdfs_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_search_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelB_search_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_SetOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_entailment_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_entailment_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_index_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_index_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_jena_rdfs_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_search_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/InfModelF_search_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_SetOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_entailment_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_entailment_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_index_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_index_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_jena_rdfs_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_search_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSB_search_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_SetOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_entailment_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_entailment_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_index_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_index_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_jena_rdfs_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_search_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFSF_search_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFS_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFS_entailment_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/prop-base/RDFS_entailment_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_BasicOperations_tests.php.svn-base deleted file mode 100755 index ab986f14..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_SetOperations_tests.php.svn-base deleted file mode 100755 index e6338dd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testInfModelB_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_entailment_test.php.svn-base deleted file mode 100755 index 845c0960..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_entailment_test.php.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testInfModelBEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new InfModelB('http://myInfModelB.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_index_tests.php.svn-base deleted file mode 100755 index d8318be8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_index_tests.php.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelB(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelB(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelB(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_jena_rdfs_test.php.svn-base deleted file mode 100755 index 0b174170..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,112 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelBJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new InfModelB(); - #$inf->addModel($rdfsAxioms); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - #$isEqual=$result->equals($query); - $isEqual=$query->containsAll($result); - - if (!$isEqual) - { - $query->writeAsHtmlTable(); - $result->writeAsHtmlTable(); - $subtract=$result->subtract($query); - echo '

      subtracted
      '; - $subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_search_tests.php.svn-base deleted file mode 100755 index 30388dea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelB_search_tests.php.svn-base +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelB(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_BasicOperations_tests.php.svn-base deleted file mode 100755 index c2726f84..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_SetOperations_tests.php.svn-base deleted file mode 100755 index 1f3ecb01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testInfModelF_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_entailment_test.php.svn-base deleted file mode 100755 index 1ee1361c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_entailment_test.php.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testInfModelFEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new InfModelF('http://myInfModelF.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_index_tests.php.svn-base deleted file mode 100755 index e5395fa6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_index_tests.php.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelF(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelF(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelF(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_jena_rdfs_test.php.svn-base deleted file mode 100755 index 0599c72b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,101 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelFJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testInfModelFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new InfModelF(); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$result->equals($query); - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (InfModelF)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_search_tests.php.svn-base deleted file mode 100755 index c7104b43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/InfModelF_search_tests.php.svn-base +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelF(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_BasicOperations_tests.php.svn-base deleted file mode 100755 index bc76719a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSBModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_SetOperations_tests.php.svn-base deleted file mode 100755 index 747fa415..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testRDFSB_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSBModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_entailment_test.php.svn-base deleted file mode 100755 index fe1156b5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_entailment_test.php.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testRDFSBEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new RDFSBModel('http://myRDFSFModel.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_index_tests.php.svn-base deleted file mode 100755 index 9ec9d4cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_index_tests.php.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSBModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSBModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSBModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_jena_rdfs_test.php.svn-base deleted file mode 100755 index 32cab420..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,111 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSBJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new RDFSBModel(); - #$inf->addModel($rdfsAxioms); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$query->containsAll($result); - - if (!$isEqual) - { - $query->writeAsHtmlTable(); - $result->writeAsHtmlTable(); - $subtract=$result->subtract($query); - echo '

      subtracted
      '; - $subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_search_tests.php.svn-base deleted file mode 100755 index fc22dcaf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSB_search_tests.php.svn-base +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSBModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_BasicOperations_tests.php.svn-base deleted file mode 100755 index a8a86477..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSFModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_SetOperations_tests.php.svn-base deleted file mode 100755 index 2d52478f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testRDFSF_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSFModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_entailment_test.php.svn-base deleted file mode 100755 index 87497333..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_entailment_test.php.svn-base +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testRDFSEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new RDFSFModel('http://myRDFSFModel.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_index_tests.php.svn-base deleted file mode 100755 index c6e2abd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_index_tests.php.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSFModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSFModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSFModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_jena_rdfs_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_jena_rdfs_test.php.svn-base deleted file mode 100755 index 37a709bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_jena_rdfs_test.php.svn-base +++ /dev/null @@ -1,111 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new RDFSFModel(); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$result->equals($query); - #$isEqual=$query->containsAll($result); - - #if (!$isEqual) - { - #$query->writeAsHtmlTable(); - #$result->writeAsHtmlTable(); - #$subtract=$query->subtract($result); - #$subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_search_tests.php.svn-base deleted file mode 100755 index f2316600..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFSF_search_tests.php.svn-base +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSFModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFS_entailment_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFS_entailment_test.php.svn-base deleted file mode 100755 index e27323bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/.svn/text-base/RDFS_entailment_test.php.svn-base +++ /dev/null @@ -1,112 +0,0 @@ -addModel($parser->parse2model( -' - . - . -' -)); -$inf2->addModel($parser->parse2model( -' - . - . -' -)); - -echo 'Added the following Triples:
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -#$sub=$inf2->subtract($inf); -#$sub->writeAsHtmlTable(); -#echo '


      '; -echo '


      '; - - -$inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); -$inf2->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$inf2->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - -echo 'Added the following Triples:
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); - -echo '


      '; - - -$inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); -$inf2->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$inf2->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triples :
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -$ser= new N3Serializer(); -echo htmlentities($ser->serialize($inf)); -echo '


      '; - -$inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -$inf2->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$inf2->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -echo 'Added the following Triples (loop in the ontology) :
      '.htmlentities(' - .').'
      '.htmlentities(' - .'); -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -echo '


      '; - - - -$inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); -$inf2->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triple :
      '.htmlentities(' - .').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -echo '


      '; - - -$findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); -echo 'Perform a find(http://example.org/baz2,null,null) :
      '; -$findResult->writeAsHtmlTable(); -$findResult2=$inf2->find(new Resource('http://example.org/baz2'),null,null); -$findResult2->writeAsHtmlTable(); -echo '


      '; - - -$inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); -$inf2->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Removed the following Triple :
      '.htmlentities(' - .').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_BasicOperations_tests.php deleted file mode 100755 index 10963d7d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_BasicOperations_tests.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_SetOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_SetOperations_tests.php deleted file mode 100755 index bcf601ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_SetOperations_tests.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testInfModelB_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_entailment_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_entailment_test.php deleted file mode 100755 index 4ba25ed2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_entailment_test.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testInfModelBEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new InfModelB('http://myInfModelB.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_index_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_index_tests.php deleted file mode 100755 index 4376f371..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_index_tests.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelB(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelB(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelB(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_jena_rdfs_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_jena_rdfs_test.php deleted file mode 100755 index 5e5ac071..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_jena_rdfs_test.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelBJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new InfModelB(); - #$inf->addModel($rdfsAxioms); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - #$isEqual=$result->equals($query); - $isEqual=$query->containsAll($result); - - if (!$isEqual) - { - $query->writeAsHtmlTable(); - $result->writeAsHtmlTable(); - $subtract=$result->subtract($query); - echo '

      subtracted
      '; - $subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_search_tests.php deleted file mode 100755 index df2cbebd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelB_search_tests.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelB_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new InfModelB(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelB(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_BasicOperations_tests.php deleted file mode 100755 index 0ab9f59b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_BasicOperations_tests.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_SetOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_SetOperations_tests.php deleted file mode 100755 index 7d879c30..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_SetOperations_tests.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testInfModelF_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new InfModelF(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_entailment_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_entailment_test.php deleted file mode 100755 index 7e4028b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_entailment_test.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testInfModelFEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new InfModelF('http://myInfModelF.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_index_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_index_tests.php deleted file mode 100755 index 1c057115..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_index_tests.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelF(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new InfModelF(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelF(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_jena_rdfs_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_jena_rdfs_test.php deleted file mode 100755 index 9782cbea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_jena_rdfs_test.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelFJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testInfModelFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new InfModelF(); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$result->equals($query); - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (InfModelF)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_search_tests.php deleted file mode 100755 index 3af4fad0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/InfModelF_search_tests.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testInfModelF_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new InfModelF(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new InfModelF(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_BasicOperations_tests.php deleted file mode 100755 index a7d7ee2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_BasicOperations_tests.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSBModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_SetOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_SetOperations_tests.php deleted file mode 100755 index 9b8f42fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_SetOperations_tests.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testRDFSB_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSBModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_entailment_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_entailment_test.php deleted file mode 100755 index 98d14f01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_entailment_test.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testRDFSBEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new RDFSBModel('http://myRDFSFModel.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_index_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_index_tests.php deleted file mode 100755 index 32aedbcf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_index_tests.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSBModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSBModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSBModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_jena_rdfs_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_jena_rdfs_test.php deleted file mode 100755 index 9419d81e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_jena_rdfs_test.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSBJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new RDFSBModel(); - #$inf->addModel($rdfsAxioms); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$query->containsAll($result); - - if (!$isEqual) - { - $query->writeAsHtmlTable(); - $result->writeAsHtmlTable(); - $subtract=$result->subtract($query); - echo '

      subtracted
      '; - $subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_search_tests.php deleted file mode 100755 index ebcab690..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSB_search_tests.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSB_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new RDFSBModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSBModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_BasicOperations_tests.php deleted file mode 100755 index a4521f0c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_BasicOperations_tests.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSFModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_SetOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_SetOperations_tests.php deleted file mode 100755 index a0da6347..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_SetOperations_tests.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testRDFSF_setOperations_tests extends UnitTestCase { - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new RDFSFModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_entailment_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_entailment_test.php deleted file mode 100755 index a9b601dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_entailment_test.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * @package unittests - * @access public - */ -include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - -class testRDFSEntailmentTests extends UnitTestCase { - - /** - * - */ - function test1() - { - $inf= new RDFSFModel('http://myRDFSFModel.com'); - $result= new MemModel(); - $parser= new N3Parser(); - - $inf->addModel($parser->parse2model( - ' - . - . - ')); - - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 . - ns0:bat rdfs:subPropertyOf ns0:bas . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); - $inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:baz2 a ns0:Range1 . - ')); - - $this->assertTrue($inf->equals($result)); - -// next test - - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); - $inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); - $inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:baz2 a ns0:Range1 , ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix rdf: . - @prefix owl: . - ns0:baz1 ns0:bas ns0:baz2 ; ns0:bat ns0:baz2 ; a ns0:Domain1 , ns0:Domain2 , ns0:Domain3 . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 ; rdfs:subPropertyOf ns0:bas . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ')); - - $this->assertTrue($inf->equals($result)); - -//next test - - $findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdf: . - ns0:baz2 a ns0:Range1 , ns0:Range2 , ns0:Range3 . - ')); - - $this->assertTrue($findResult->equals($result)); - -//text test - - $inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - - $result=new MemModel(); - $result->addModel($parser->parse2model( - ' - @prefix ns0: . - @prefix rdfs: . - @prefix owl: . - @prefix rdf: . - ns0:baz1 ns0:bat ns0:baz2 ; a ns0:Domain1 . - ns0:bas rdfs:domain ns0:Domain2 ; rdfs:range ns0:Range2 . - ns0:bat rdfs:domain ns0:Domain1 ; rdfs:range ns0:Range1 . - ns0:baz2 a ns0:Range1 . - ns0:Range3 owl:sameAs ns0:Range2 . - ns0:Domain2 rdfs:subClassOf ns0:Domain3 . - ns0:Domain3 rdfs:subClassOf ns0:Domain2 . - ')); - - $this->assertTrue($inf->equals($result)); - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_index_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_index_tests.php deleted file mode 100755 index a86cdcd6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_index_tests.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSFModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new RDFSFModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSFModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_jena_rdfs_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_jena_rdfs_test.php deleted file mode 100755 index 827c94aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_jena_rdfs_test.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSJenaInfmodelTests extends UnitTestCase { - - /** - * Loop trough the jena infmodel tests - */ - function testRdfsFModel() - { - $testURI='http://www.hpl.hp.com/semweb/2003/query_tester#'; - $testmodel=new MemModel($testURI); - $testmodel->load(RDFS_INF_TESTFILES.'rdfs/manifest-standard.rdf'); - $i=1; - do - { - $inf= new RDFSFModel(); - $res1=$testmodel->find(new Resource(RDFS_INF_TESTFILES.'rdfs/test'.$i++),null,null); - if ($res1->isEmpty()) - break; - - $findTBOX=$res1->find(null,new Resource($testURI.'tbox'),null); - $inf->load(RDFS_INF_TESTFILES.$findTBOX->triples[0]->getLabelObject()); - - $findDATA=$res1->find(null,new Resource($testURI.'data'),null); - $inf->load(RDFS_INF_TESTFILES.$findDATA->triples[0]->getLabelObject()); - - $findQUERY=$res1->find(null,new Resource($testURI.'query'),null); - $query =$this->_doFindFromFile(RDFS_INF_TESTFILES.$findQUERY->triples[0]->getLabelObject(),$inf); - - $result = new MemModel(); - $findRESULT=$res1->find(null,new Resource($testURI.'result'),null); - $result->load(RDFS_INF_TESTFILES.$findRESULT->triples[0]->getLabelObject()); - - $isEqual=$result->equals($query); - #$isEqual=$query->containsAll($result); - - #if (!$isEqual) - { - #$query->writeAsHtmlTable(); - #$result->writeAsHtmlTable(); - #$subtract=$query->subtract($result); - #$subtract->writeAsHtmlTable(); - - }; - - $findDATA=$res1->find(null,new Resource($testURI.'description'),null); - echo ''.$findDATA->triples[0]->getLabelObject().' (RDFSFModel)
      '; - - $this->assertTrue($isEqual); - - } while (true); - } - - - function _doFindFromFile($file,& $model) - { - $nullVarURIs=array('var:x','var:y','var:z'); - $mod= new MemModel(); - $mod->load($file); - - $return=new MemModel(); - - foreach ($mod->triples as $statement) - { - - - if (in_array($statement->getLabelSubject(),$nullVarURIs)) - { - $findS=null; - } else - { - $findS= $statement->getSubject(); - }; - - if (in_array($statement->getLabelPredicate(),$nullVarURIs)) - { - $findP=null; - } else - { - $findP= $statement->getPredicate(); - }; - - if (in_array($statement->getLabelObject(),$nullVarURIs)) - { - $findO=null; - } else - { - $findO= $statement->getObject(); - }; - $return->addModel($model->find($findS,$findP,$findO)); - }; - - return $return; - } - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_search_tests.php deleted file mode 100755 index a194d9df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFSF_search_tests.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testRDFSF_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new RDFSFModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new RDFSFModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFS_entailment_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFS_entailment_test.php deleted file mode 100755 index 7fe9c185..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/RDFS_entailment_test.php +++ /dev/null @@ -1,112 +0,0 @@ -addModel($parser->parse2model( -' - . - . -' -)); -$inf2->addModel($parser->parse2model( -' - . - . -' -)); - -echo 'Added the following Triples:
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -#$sub=$inf2->subtract($inf); -#$sub->writeAsHtmlTable(); -#echo '


      '; -echo '


      '; - - -$inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$inf->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); -$inf2->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); -$inf2->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); - -echo 'Added the following Triples:
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); - -echo '


      '; - - -$inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$inf->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); -$inf2->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain2'))); -$inf2->add(new Statement(new Resource('http://example.org/bas'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triples :
      '.htmlentities(' - .').'
      '.htmlentities(' - . -').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -$ser= new N3Serializer(); -echo htmlentities($ser->serialize($inf)); -echo '


      '; - -$inf->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$inf->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -$inf2->add(new Statement(new Resource('http://example.org/Domain2'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain3'))); -$inf2->add(new Statement(new Resource('http://example.org/Domain3'),new Resource('http://www.w3.org/2000/01/rdf-schema#subClassOf'),new Resource('http://example.org/Domain2'))); - -echo 'Added the following Triples (loop in the ontology) :
      '.htmlentities(' - .').'
      '.htmlentities(' - .'); -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -echo '


      '; - - - -$inf->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); -$inf2->add(new Statement(new Resource('http://example.org/Range3'),new Resource('http://www.w3.org/2002/07/owl#sameAs'),new Resource('http://example.org/Range2'))); - -echo 'Added the following Triple :
      '.htmlentities(' - .').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); -echo '


      '; - - -$findResult=$inf->find(new Resource('http://example.org/baz2'),null,null); -echo 'Perform a find(http://example.org/baz2,null,null) :
      '; -$findResult->writeAsHtmlTable(); -$findResult2=$inf2->find(new Resource('http://example.org/baz2'),null,null); -$findResult2->writeAsHtmlTable(); -echo '


      '; - - -$inf->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); -$inf2->remove(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); - -echo 'Removed the following Triple :
      '.htmlentities(' - .').'
      '; -$inf->writeAsHtmlTable(); -$inf2->writeAsHtmlTable(); - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/all-wcprops deleted file mode 100755 index bf256206..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/all-wcprops +++ /dev/null @@ -1,119 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs -END -result7.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result7.rdf -END -result8.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result8.rdf -END -result9.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result9.rdf -END -data1.rdf -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/data1.rdf -END -data2.rdf -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/data2.rdf -END -tbox1.rdf -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/tbox1.rdf -END -query2.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query2.nt -END -query3.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query3.nt -END -query4.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query4.nt -END -result1.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result1.rdf -END -query5.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query5.nt -END -result2.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result2.rdf -END -result3.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result3.rdf -END -query-res.nt -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query-res.nt -END -query7.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query7.nt -END -result4.rdf -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/result4.rdf -END -query8.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query8.nt -END -query9.nt -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/query9.nt -END -manifest-standard.rdf -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/InfModel/rdfs/manifest-standard.rdf -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/entries deleted file mode 100755 index ab729e8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/entries +++ /dev/null @@ -1,275 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/InfModel/rdfs -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:58:11.000000Z -321 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -result7.rdf -file - - - - -2008-02-29T14:57:02.753237Z -ce999cd88a06bb96edfdbd236b9d7102 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result8.rdf -file - - - - -2008-02-29T14:57:02.768858Z -23afa8a022e6471f044dfe8a073222bf -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result9.rdf -file - - - - -2008-02-29T14:57:02.768858Z -8ceaee0db8c25ce6f334ab74ac9bfeeb -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -data1.rdf -file - - - - -2008-02-29T14:57:02.784479Z -bc01d5ffd309f812cd35220492754199 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -data2.rdf -file - - - - -2008-02-29T14:57:02.784479Z -cedc5a66664dfe5d0896c76880e22246 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -tbox1.rdf -file - - - - -2008-02-29T14:57:02.800099Z -dda84b9e57397fb8fc40010018c7dc3c -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query2.nt -file - - - - -2008-02-29T14:57:02.800099Z -c0fc1e1206b074e005176328f42707f7 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query3.nt -file - - - - -2008-02-29T14:57:02.815720Z -2fb808ab34b6668a3c4879913cdc9135 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query4.nt -file - - - - -2008-02-29T14:57:02.815720Z -bac54eba4bd80e9dcf9fb2ba46bdc0db -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result1.rdf -file - - - - -2008-02-29T14:57:02.815720Z -952d1f735565f12d17eeb3d18cedd575 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query5.nt -file - - - - -2008-02-29T14:57:02.831340Z -1e8dfa3fcddde8241bff7c372c6f1803 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result2.rdf -file - - - - -2008-02-29T14:57:02.831340Z -5d82c48544d21442101bb78d3cd2661e -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result3.rdf -file - - - - -2008-02-29T14:57:02.831340Z -b9786508f21b66d126194d6bb773fa97 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query7.nt -file - - - - -2008-02-29T14:57:02.846961Z -32e7073810fc02c41f48619e3711a38b -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -result4.rdf -file - - - - -2008-02-29T14:57:02.846961Z -fb42be3c007d306583ab6623b2a90833 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query-res.nt -file - - - - -2008-02-29T14:57:02.862582Z -5b76539e67a85762a502d5b7aa584dee -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query8.nt -file - - - - -2008-02-29T14:57:02.862582Z -88ea778e8422759d8668310e818986e2 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -query9.nt -file - - - - -2008-02-29T14:57:02.878202Z -4185ccb6c7420790c8936b84b2346e22 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - -manifest-standard.rdf -file - - - - -2008-02-29T14:57:02.878202Z -a1808628b030f9e6df6a667904d3630a -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data1.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data1.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data2.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data2.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/data2.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/manifest-standard.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/manifest-standard.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/manifest-standard.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query-res.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query-res.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query-res.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query2.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query3.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query3.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query3.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query4.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query4.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query4.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query5.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query5.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query5.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query7.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query7.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query7.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query8.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query8.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query8.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query9.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query9.nt.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/query9.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result1.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result1.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result2.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result2.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result2.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result3.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result3.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result3.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result4.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result4.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result4.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result7.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result7.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result7.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result8.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result8.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result8.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result9.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result9.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/result9.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/tbox1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/tbox1.rdf.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/prop-base/tbox1.rdf.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data1.rdf.svn-base deleted file mode 100755 index f0fe82a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data1.rdf.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - - - - -]> - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data2.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data2.rdf.svn-base deleted file mode 100755 index fe84c10c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/data2.rdf.svn-base +++ /dev/null @@ -1,19 +0,0 @@ - - - - -]> - - - - -

      - Hello world - - - -

      - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/manifest-standard.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/manifest-standard.rdf.svn-base deleted file mode 100755 index e068c81e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/manifest-standard.rdf.svn-base +++ /dev/null @@ -1,84 +0,0 @@ - - - - -]> - - - - - RDFS reasoner: range test, wildcard - rdfs/tbox1.rdf - rdfs/data1.rdf - rdfs/query-res.nt - rdfs/result1.rdf - - - - RDFS reasoner: range test, ground - rdfs/tbox1.rdf - rdfs/data1.rdf - rdfs/query2.nt - rdfs/result2.rdf - - - - RDFS reasoner: simple subProp case, wildcard - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query3.nt - rdfs/result3.rdf - - - - RDFS reasoner: simple subProp case, ground subject - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query4.nt - rdfs/result4.rdf - - - - RDFS reasoner: simple subProp case, ground object - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query5.nt - rdfs/result4.rdf - - - - RDFS reasoner: range test, ground, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query2.nt - rdfs/result2.rdf - - - - RDFS reasoner: domain test, ground, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query7.nt - rdfs/result7.rdf - - - - RDFS reasoner: domain test, wildcard, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query8.nt - rdfs/result8.rdf - - - - RDFS reasoner: range test, ground, with subProp and subClass - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query9.nt - rdfs/result9.rdf - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query-res.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query-res.nt.svn-base deleted file mode 100755 index 6abdccd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query-res.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Test query for rdfs reasoner -# List (*,type,C1) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query2.nt.svn-base deleted file mode 100755 index b236eaae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query2.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# List (b,type,C1) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query3.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query3.nt.svn-base deleted file mode 100755 index 5133686b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query3.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# List (*, r, *) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query4.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query4.nt.svn-base deleted file mode 100755 index e1f72b8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query4.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# List (a, r, *) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query5.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query5.nt.svn-base deleted file mode 100755 index 3685b5bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query5.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# List (*, r, b) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query7.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query7.nt.svn-base deleted file mode 100755 index 26049afe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query7.nt.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# List (a,type,D) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query8.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query8.nt.svn-base deleted file mode 100755 index 2aa43599..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query8.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# List (*,type,D) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query9.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query9.nt.svn-base deleted file mode 100755 index 46767c46..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/query9.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# List (b,type,C3) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result1.rdf.svn-base deleted file mode 100755 index 01d031c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result1.rdf.svn-base +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -]> - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result2.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result2.rdf.svn-base deleted file mode 100755 index 78a9e8f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result2.rdf.svn-base +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result3.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result3.rdf.svn-base deleted file mode 100755 index 3e38e693..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result3.rdf.svn-base +++ /dev/null @@ -1,19 +0,0 @@ - - - - - -]> - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result4.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result4.rdf.svn-base deleted file mode 100755 index ccf08b63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result4.rdf.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -]> - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result7.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result7.rdf.svn-base deleted file mode 100755 index e5e30d80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result7.rdf.svn-base +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result8.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result8.rdf.svn-base deleted file mode 100755 index a67d2b10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result8.rdf.svn-base +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -]> - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result9.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result9.rdf.svn-base deleted file mode 100755 index c911423b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/result9.rdf.svn-base +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/tbox1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/tbox1.rdf.svn-base deleted file mode 100755 index 5de6cd0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/.svn/text-base/tbox1.rdf.svn-base +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data1.rdf deleted file mode 100755 index f0fe82a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data1.rdf +++ /dev/null @@ -1,18 +0,0 @@ - - - - -]> - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data2.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data2.rdf deleted file mode 100755 index fe84c10c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/data2.rdf +++ /dev/null @@ -1,19 +0,0 @@ - - - - -]> - - - - -

      - Hello world - - - -

      - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/manifest-standard.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/manifest-standard.rdf deleted file mode 100755 index e068c81e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/manifest-standard.rdf +++ /dev/null @@ -1,84 +0,0 @@ - - - - -]> - - - - - RDFS reasoner: range test, wildcard - rdfs/tbox1.rdf - rdfs/data1.rdf - rdfs/query-res.nt - rdfs/result1.rdf - - - - RDFS reasoner: range test, ground - rdfs/tbox1.rdf - rdfs/data1.rdf - rdfs/query2.nt - rdfs/result2.rdf - - - - RDFS reasoner: simple subProp case, wildcard - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query3.nt - rdfs/result3.rdf - - - - RDFS reasoner: simple subProp case, ground subject - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query4.nt - rdfs/result4.rdf - - - - RDFS reasoner: simple subProp case, ground object - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query5.nt - rdfs/result4.rdf - - - - RDFS reasoner: range test, ground, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query2.nt - rdfs/result2.rdf - - - - RDFS reasoner: domain test, ground, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query7.nt - rdfs/result7.rdf - - - - RDFS reasoner: domain test, wildcard, with subProp - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query8.nt - rdfs/result8.rdf - - - - RDFS reasoner: range test, ground, with subProp and subClass - rdfs/tbox1.rdf - rdfs/data2.rdf - rdfs/query9.nt - rdfs/result9.rdf - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query-res.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query-res.nt deleted file mode 100755 index 6abdccd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query-res.nt +++ /dev/null @@ -1,4 +0,0 @@ -# Test query for rdfs reasoner -# List (*,type,C1) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query2.nt deleted file mode 100755 index b236eaae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query2.nt +++ /dev/null @@ -1,4 +0,0 @@ -# List (b,type,C1) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query3.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query3.nt deleted file mode 100755 index 5133686b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query3.nt +++ /dev/null @@ -1,4 +0,0 @@ -# List (*, r, *) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query4.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query4.nt deleted file mode 100755 index e1f72b8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query4.nt +++ /dev/null @@ -1,4 +0,0 @@ -# List (a, r, *) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query5.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query5.nt deleted file mode 100755 index 3685b5bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query5.nt +++ /dev/null @@ -1,4 +0,0 @@ -# List (*, r, b) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query7.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query7.nt deleted file mode 100755 index 26049afe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query7.nt +++ /dev/null @@ -1,4 +0,0 @@ -# List (a,type,D) -#################################### - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query8.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query8.nt deleted file mode 100755 index 2aa43599..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query8.nt +++ /dev/null @@ -1,3 +0,0 @@ -# List (*,type,D) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query9.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query9.nt deleted file mode 100755 index 46767c46..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/query9.nt +++ /dev/null @@ -1,3 +0,0 @@ -# List (b,type,C3) -#################################### - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result1.rdf deleted file mode 100755 index 01d031c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result1.rdf +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -]> - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result2.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result2.rdf deleted file mode 100755 index 78a9e8f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result2.rdf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result3.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result3.rdf deleted file mode 100755 index 3e38e693..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result3.rdf +++ /dev/null @@ -1,19 +0,0 @@ - - - - - -]> - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result4.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result4.rdf deleted file mode 100755 index ccf08b63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result4.rdf +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -]> - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result7.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result7.rdf deleted file mode 100755 index e5e30d80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result7.rdf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result8.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result8.rdf deleted file mode 100755 index a67d2b10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result8.rdf +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -]> - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result9.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result9.rdf deleted file mode 100755 index c911423b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/result9.rdf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -]> - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/tbox1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/tbox1.rdf deleted file mode 100755 index 5de6cd0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModel/rdfs/tbox1.rdf +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModelTests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModelTests.php deleted file mode 100755 index 795123c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/InfModelTests.php +++ /dev/null @@ -1,114 +0,0 @@ -
      History:

        - *
      • 09-15-2004 : Initial version of this class. - * - * For running the tests you have to - * - * 1. Install the "Simple Test" testing framework - * into the document root of your web server. - * Simple test can be downloaded from: - * http://sourceforge.net/projects/simpletest/ - * - * 2. Now copy the "unit" folder to /rdfapi/test/ - * - * 3. Make sure that "simple Test" and RAP is included correctly in - * allTest.php and in - * showPasses.php - * - * 4. To run the tests execute InfTests.php - * - * @version V0.9.1 - * @author Daniel Westphal - * - * @package unittests - * @access public - */ - - - define("SIMPLETEST_INCLUDE_DIR", "C:/!htdocs/simpletest/"); - define("RDFAPI_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/api/"); - define("RDFAPI_TEST_INCLUDE_DIR", "C:/!htdocs/rdfapi-php/"); - include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); - require_once( SIMPLETEST_INCLUDE_DIR . 'unit_tester.php'); - require_once( SIMPLETEST_INCLUDE_DIR . 'reporter.php'); - include_once( RDFAPI_INCLUDE_DIR . PACKAGE_INFMODEL); - include_once( RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_N3); - require_once(RDFAPI_TEST_INCLUDE_DIR.'test/unit/show_passes.php'); - define('RDFS_INF_TESTFILES',RDFAPI_TEST_INCLUDE_DIR.'test/unit/Infmodel/'); - $_SESSION['passes']=0; - $_SESSION['fails']=0; - define('LOG',FALSE); - - if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".'-----'.$time.'-----'."\r\n"); - } - -// ============================================================================= -// *************************** package InfModel *********************************** -// ============================================================================= - - $test1a= &new GroupTest('Model InfModelF Set Operations Test'); - $test1a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_SetOperations_tests.php'); - $test1a->run(new ShowPasses()); - - $test1b= &new GroupTest('Model InfModelB Set Operations Test'); - $test1b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_SetOperations_tests.php'); - $test1b->run(new ShowPasses()); - - $test2a= &new GroupTest('Model InfModelF Basic Operations Test'); - $test2a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_BasicOperations_tests.php'); - $test2a->run(new ShowPasses()); - - $test2b= &new GroupTest('Model InfModelB Basic Operations Test'); - $test2b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelB_BasicOperations_tests.php'); - $test2b->run(new ShowPasses()); - - $test3a= &new GroupTest('Model InfModelF Indextest'); - $test3a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelF_index_tests.php'); - $test3a->run(new ShowPasses()); - - $test3b= &new GroupTest('Model InfModelB Indextest'); - $test3b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. 'test/unit/InfModel/InfModelB_index_tests.php'); - $test3b->run(new ShowPasses()); - - $test4a= &new GroupTest('Model InfModelF Search Test'); - $test4a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_search_tests.php'); - $test4a->run(new ShowPasses()); - - $test4b= &new GroupTest('Model InfModelB Search Test'); - $test4b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_search_tests.php'); - $test4b->run(new ShowPasses()); - - $test5a= &new GroupTest('Model InfModelF : jena RDFS-tests '); - $test5a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_jena_rdfs_test.php'); - $test5a->run(new ShowPasses()); - - $test5b= &new GroupTest('Model InfModelB : jena RDFS-tests '); - $test5b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_jena_rdfs_test.php'); - $test5b->run(new ShowPasses()); - - $test6a= &new GroupTest('InfModelF entailment tests'); - $test6a->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelF_entailment_test.php'); - $test6a->run(new ShowPasses()); - - $test6b= &new GroupTest('InfModelB entailment tests'); - $test6b->addTestFile(RDFAPI_TEST_INCLUDE_DIR. '/test/unit/InfModel/InfModelB_entailment_test.php'); - $test6b->run(new ShowPasses()); - - if(LOG){ - $file = fopen ("testlog.log", "a"); - $time= strftime('%d.%m.%y %H:%M:%S' ); - fputs($file,"\r\n".' Passes: '.$_SESSION['passes'].' Fails: '.$_SESSION['fails']."\r\n"); - fclose($file); - } -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/all-wcprops deleted file mode 100755 index eafc5f74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 65 -/svnroot/rdfapi-php/!svn/ver/533/trunk/rdfapi-php/test/unit/Model -END -ModelFactory_tests.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/522/trunk/rdfapi-php/test/unit/Model/ModelFactory_tests.php -END -mm_SetOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/mm_SetOperations_tests.php -END -modelEquals_test.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/modelEquals_test.php -END -blanknode_test.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/Model/blanknode_test.php -END -getModelByRDQL_tests.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/Model/getModelByRDQL_tests.php -END -mm_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/mm_BasicOperations_tests.php -END -mm_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/mm_search_tests.php -END -literals_tests.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/Model/literals_tests.php -END -Model_tests.php -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/522/trunk/rdfapi-php/test/unit/Model/Model_tests.php -END -mm_index_tests.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/mm_index_tests.php -END -dBModel_test.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/533/trunk/rdfapi-php/test/unit/Model/dBModel_test.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/entries deleted file mode 100755 index 47a30894..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/entries +++ /dev/null @@ -1,174 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Model -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-08-16T09:32:03.808912Z -533 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ModelFactory_tests.php -file - - - - -2008-02-29T14:57:03.987265Z -92b9181bedf175feb9e0da2fad63eed4 -2007-08-14T09:22:22.680195Z -522 -cweiske -has-props - -mm_SetOperations_tests.php -file - - - - -2008-02-29T14:57:03.987265Z -2f7c63261a3ed7b85b3e679943c08d8a -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -modelEquals_test.php -file - - - - -2008-02-29T14:57:04.002885Z -c8d5b24efb3ae4488552613b1ca4ecf9 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -blanknode_test.php -file - - - - -2008-02-29T14:57:04.002885Z -1df5c21fabb3dfcac71ba51150e18bf8 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -getModelByRDQL_tests.php -file - - - - -2008-02-29T14:57:04.018506Z -eb1ad71bf8ec08ba8d86c640d5bf7a69 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -mm_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:04.018506Z -0610471277cb2dcc9b873dd609207f28 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -mm_search_tests.php -file - - - - -2008-02-29T14:57:04.034127Z -9d0b9df1d74fc14c46354323b08dfa85 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -literals_tests.php -file - - - - -2008-02-29T14:57:04.049747Z -dffd213b35ade9fff7945652cfc22236 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -Model_tests.php -file - - - - -2008-02-29T14:57:04.049747Z -c37d864fcd90744d46d902269202c27a -2007-08-14T09:22:22.680195Z -522 -cweiske -has-props - -mm_index_tests.php -file - - - - -2008-02-29T14:57:04.065368Z -5f3a40f607de10db6f00bdb648003501 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -data -dir - -dBModel_test.php -file - - - - -2008-02-29T14:57:04.065368Z -8ff1e10e645d3002bf3da17e9ce66aec -2007-08-16T09:32:03.808912Z -533 -cweiske -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/ModelFactory_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/ModelFactory_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/ModelFactory_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/Model_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/Model_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/Model_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/blanknode_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/blanknode_test.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/blanknode_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/dBModel_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/dBModel_test.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/dBModel_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/getModelByRDQL_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/getModelByRDQL_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/getModelByRDQL_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/literals_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/literals_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/literals_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_BasicOperations_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_SetOperations_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_index_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_index_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_search_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/mm_search_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/modelEquals_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/modelEquals_test.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/prop-base/modelEquals_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/ModelFactory_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/ModelFactory_tests.php.svn-base deleted file mode 100755 index 0c6e42c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/ModelFactory_tests.php.svn-base +++ /dev/null @@ -1,164 +0,0 @@ -This class tests the functions of ModelFactory.

        - * - *

        Currently doesn't include any tests for the methods returning DB models or datasets.

        - * - * @version $Id$ - * @author Richard Cyganiak (richard@cyganiak.de) - * - * @package unittests - * @access public - */ -class ModelFactory_test extends UnitTestCase { - var $base_URI = 'http://example.org/base#'; - - function testGetDefaultModel() { - $this->createAndTestModel('getDefaultModel', 'MemModel'); - } - - function testGetMemModel() { - $this->createAndTestModel('getMemModel', 'MemModel'); - } - - function testGetInfModelB() { - $this->createAndTestModel('getInfModelB', 'InfModelB'); - } - - function testGetInfModelF() { - $this->createAndTestModel('getInfModelF', 'InfModelF'); - } - - /** Confirms that two calls to ModelFactory::getDefaultModel() return two independent models */ - function testCreateFreshDefaultModel() { - $model1 = &ModelFactory::getDefaultModel(); - $this->addAStatement($model1); - $this->assertIdentical(1, $model1->size()); - $model2 = &ModelFactory::getDefaultModel(); - $this->assertIdentical(0, $model2->size()); - } - - function testGetResModel() { - $model = ModelFactory::getResModel(MEMMODEL); - $this->assertIsEmptyResModel($model, 'ResModel'); - $model = ModelFactory::getResModel(MEMMODEL, $this->base_URI); - $this->assertHasExpectedBaseURI($model); - } - - function testGetResModelWithMemBase() { - $model = ModelFactory::getResModel(MEMMODEL); - // This accesses a private property - $this->assertIsA($model->model, 'MemModel'); - } - - function testGetResModelWithInfFBase() { - $model = ModelFactory::getResModel(INFMODELF); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelF'); - } - - function testGetResModelWithInfBBase() { - $model = ModelFactory::getResModel(INFMODELB); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelB'); - } - -// function testGetResModelWithDBBase() { -// $model = ModelFactory::getResModel(DBMODEL); -// // This accesses a private property -// $this->assertIsA($model->model, 'DbModel'); -// } - - function testGetResModelForBaseModel() { - $baseModel = ModelFactory::getDefaultModel(); - $resModel = ModelFactory::getResModelForBaseModel($baseModel); - $this->assertIsEmptyResModel($resModel, 'ResModel'); - $this->addAStatement($baseModel); - $this->assertIdentical(1, $resModel->size()); - } - - function testGetOntModel() { - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY); - $this->assertIsEmptyResModel($model, 'OntModel'); - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY, $this->base_URI); - $this->assertHasExpectedBaseURI($model); - // This accesses a private property - $this->assertIsA($model->vocabulary, 'RdfsVocabulary'); - } - - function testGetOntModelWithMemBase() { - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'MemModel'); - } - - function testGetOntModelWithInfFBase() { - $model = ModelFactory::getOntModel(INFMODELF, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelF'); - } - - function testGetOntModelWithInfBBase() { - $model = ModelFactory::getOntModel(INFMODELB, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelB'); - } - -// function testGetOntModelWithDBBase() { -// $model = ModelFactory::getOntModel(DBMODEL, RDFS_VOCABULARY); -// // This accesses a private property -// $this->assertIsA($model->model, 'DbModel'); -// } - - function testGetOntModelForBaseModel() { - $baseModel = ModelFactory::getDefaultModel(); - $resModel = ModelFactory::getOntModelForBaseModel($baseModel, RDFS_VOCABULARY); - $this->assertIsEmptyResModel($resModel, 'OntModel'); - $this->addAStatement($baseModel); - $this->assertIdentical(1, $resModel->size()); - } - - /** @access private */ - function createAndTestModel($methodName, $expectedClassName) { - $model = ModelFactory::$methodName(); - $this->assertIsEmptyModel($model, $expectedClassName); - $model = ModelFactory::$methodName($this->base_URI); - $this->assertHasExpectedBaseURI($model); - } - - /** @access private */ - function assertIsEmptyModel(&$model, $expectedClass) { - $this->assertIsA($model, 'Model'); - $this->assertIsA($model, $expectedClass); - $this->assertIdentical(0, $model->size()); - $this->assertNull($model->getBaseURI()); - } - - /** @access private */ - function assertIsEmptyResModel(&$model, $expectedClass) { - $this->assertIsA($model, 'ResModel'); - $this->assertIsA($model, $expectedClass); - $this->assertIdentical(0, $model->size()); - $this->assertNull($model->getBaseURI()); - } - - /** @access private */ - function assertHasExpectedBaseURI(&$model) { - $this->assertIdentical($this->base_URI, $model->getBaseURI()); - } - - /** @access private */ - function addAStatement(&$model) { - $model->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/Model_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/Model_tests.php.svn-base deleted file mode 100755 index 269c0cea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/Model_tests.php.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -This class tests functions of the Model base class.

        - * - * @version $Id$ - * @author Richard Cyganiak (richard@cyganiak.de) - * - * @package unittests - * @access public - */ -class Model_test extends UnitTestCase { - - function testGetResModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getResModel(); - $this->assertIsA($ont, 'ResModel'); - } - - function testGetResModelIsBasedOnThisModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getResModel(); - $this->assertIdentical(0, $ont->size()); - $mem->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - $this->assertIdentical(1, $ont->size()); - } - - function testGetOntModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getOntModel(RDFS_VOCABULARY); - $this->assertIsA($ont, 'OntModel'); - $this->assertIdentical(array(), $ont->listClasses()); - } - - function testGetOntModelIsBasedOnThisModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getOntModel(RDFS_VOCABULARY); - $this->assertIdentical(0, $ont->size()); - $mem->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - $this->assertIdentical(1, $ont->size()); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/blanknode_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/blanknode_test.php.svn-base deleted file mode 100755 index 1c6ec9e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/blanknode_test.php.svn-base +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class blanknode_test extends UnitTestCase { - - function testGetID(){ - $_SESSION['test']='bnode getID test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->getId(),'http://www.example.orglocalname'); - } - - function testGetLabel(){ - $_SESSION['test']='bnode getLabel test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->getLabel(),'http://www.example.orglocalname'); - } - - function testToString(){ - $_SESSION['test']='bnode toString test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->toString(),'bNode("http://www.example.orglocalname")'); - } - - function testEquals(){ - $_SESSION['test']='bnode Euqals test'; - $bnode1=$this->_generateBnode(); - $bnode2=$this->_generateBnode(); - $this->assertTrue($bnode1->equals($bnode2)); - } - - function testNotEquals(){ - $_SESSION['test']='bnode NotEuqals test'; - $bnode1=$this->_generateBnode(); - $bnode2=new BlankNode('http://www.example.orglocalname','localname2'); - $bnode3=new BlankNode('http://www.example.orglocalname1','localname'); - $this->assertFalse($bnode1->equals($bnode2)); - $this->assertFalse($bnode1->equals($bnode3)); - - } - - - /** - * generate a Blanknode - * - */ - function _generateBnode(){ - $node=new BlankNode('http://www.example.org','localname'); - return $node; - } - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/dBModel_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/dBModel_test.php.svn-base deleted file mode 100755 index fafa9f48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/dBModel_test.php.svn-base +++ /dev/null @@ -1,231 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class dBModel_test extends UnitTestCase -{ - protected static $strModelUri = 'http://example.org/rap-unittests-dbmodel'; - - function testSize(){ - $mysql_database = $this->createDatabaseConnection(); - //$mysql_database->createTables('MySQL'); - $_SESSION['test']='DbModel size test'; - $mysql_database->putModel($this->_generateModel(), self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $this->assertEqual($dbmodel->size(),1); - $dbmodel->delete(); - } - - - function testAdd(){ - $_SESSION['test']='DbModel add test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $statement=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $dbmodel->add($statement); - $this->assertTrue($dbmodel->contains($statement)); - $this->assertEqual($dbmodel->size(),2); - $dbmodel->delete(); - } - - - function testRemove(){ - $_SESSION['test']='DbModel remove test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $statement=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $dbmodel->remove($statement); - $mod1=$dbmodel->getMemModel(); - $this->assertFalse($dbmodel->contains($statement)); - $dbmodel->delete(); - } - - - function testSetBaseUri(){ - $_SESSION['test']='DbModel setBaseURI test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $this->assertEqual($dbmodel->baseURI,'http://www.example.org#'); - $dbmodel->delete(); - } - - - function testContains(){ - $_SESSION['test']='DbModel testContains test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $stat=new Statement(new Resource('http://www.example.org/subject1'),new Resource('http://www.example.org/predicate1'),new Resource('http://www.example.org/object1')); - $stat2=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $this->assertTrue($dbmodel->contains($stat)); - $this->assertFalse($dbmodel->contains($stat2)); - $dbmodel->delete(); - } - - function testContainsAll(){ - $_SESSION['test']='DbModel testContainsAll test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$this->_generateModel(); - $this->assertTrue($dbmodel->containsAll($memModel)); - $dbmodel->delete(); - } - - function testContainsAny(){ - $_SESSION['test']='DbModel testContainsAny test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$this->_generateModel(); - $this->assertTrue($dbmodel->containsAny($memModel)); - $dbmodel->delete(); - } - - - function testLiteral(){ - $_SESSION['test']='DbModel testContainsAny test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModelLiteral(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$dbmodel->getMemModel(); - $stat=$memModel->triples[0]; - $obj=$stat->getObject(); - $this->assertEqual($obj->getDatatype(),'test'); - $this->assertEqual($obj->getLanguage(),'DE'); - $dbmodel->delete(); - } - - function testNamespaces() - { - $_SESSION['test']='DbModel testNamespaces test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModelLiteral(),self::$strModelUri); - - $dbmodel = $mysql_database->getModel(self::$strModelUri); - - //no namespaces - $this->assertIdentical(false, $dbmodel->getParsedNamespaces()); - - //one namespace - $dbmodel->addNamespace('test', 'http://test.org'); - $this->assertEqual( - array('http://test.org' => 'test'), - $dbmodel->getParsedNamespaces() - ); - - //two namespaces - $dbmodel->addNamespace('test2', 'http://test2.org'); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - ), - $dbmodel->getParsedNamespaces() - ); - - //adding multiple namespaces - $dbmodel->addParsedNamespaces( - array( - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ) - ); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - //adding empty array - $dbmodel->addParsedNamespaces(array()); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - //removing namespace - $dbmodel->removeNamespace('http://test2.org'); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - $dbmodel->delete(); - } - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a simple MemModel - * - */ - - function _generateModel(){ - $model=new MemModel(); - $model->setBaseURI('http://www.example.org'); - $sub=new Resource('http://www.example.org/subject1'); - $pred=new Resource('http://www.example.org/predicate1'); - $obj=new Resource('http://www.example.org/object1'); - $model->add(new Statement($sub,$pred,$obj)); - return $model; - } - - function _generateModelLiteral(){ - $model=new MemModel(); - $model->setBaseURI('http://www.example.org'); - $sub=new Resource('http://www.example.org/subject1'); - $pred=new Resource('http://www.example.org/predicate1'); - $obj=new Literal('http://www.example.org/object1'); - $obj->setDatatype('test'); - $obj->setLanguage('DE'); - $model->add(new Statement($sub,$pred,$obj)); - return $model; - } - - - - function createDatabaseConnection() - { - return new DbStore( - $GLOBALS['dbConf']['type'], - $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], - $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/getModelByRDQL_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/getModelByRDQL_tests.php.svn-base deleted file mode 100755 index 0bf87f54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/getModelByRDQL_tests.php.svn-base +++ /dev/null @@ -1,132 +0,0 @@ - -* -* @package unittests -* @access public -*/ -class getModelByRDQL_tests extends UnitTestCase { - - function testGetModelByRDQL(){ - $_SESSION['test']='simple rdql query'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?fullName - WHERE (?x, vcard:FN, ?fullName) - USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),3); - } - - function testGetModelByRDQL2(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query2'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT * - WHERE (?x, vcard:Given, "Monica") - USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),1); - } - - function testGetModelByRDQL3(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query3'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?x - WHERE (?x,, )'; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),6); - $model3 = $model2->find(null,RDF::TYPE(),new Resource('http://www.w3.org/2001/vcard-rdf/3.0#work')); - $this->assertEqual(6,$model3->size()); - } - - - function testGetModelByRDQL4(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query4'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?givenName, ?age -// This is an example of an one-line comment -WHERE (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName), - (?x, /* and this is another type of comments */ v:age, ?age) -AND ?age > 30 -USING vcard FOR v FOR '; - $model2 = $model->getMemModelByRDQL($query); - $statement1 = new Statement(new BlankNode($model2),VCARD::GIVEN(),new Literal('Bill')); - $statement2 = new Statement(new BlankNode($model2),VCARD::GIVEN(),new Literal('George')); - $this->assertEqual($model2->size(),6); - } - - function testGetModelByRDQL5(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query5'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?givenName ?age ?telNumberHome -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?person v:age ?age) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumberHome) - (?blank2 rdf:type vcard:home) - (?person vcard:TEL ?blank3) - (?blank3 rdf:value ?telNumberOffice) - (?blank3 rdf:type vcard:work) -AND ?telNumberOffice eq "+1 111 2222 668" -USING vcard FOR - v FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),9); - } - - - function testGetModelByRDQL6(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query6'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?resource, ?email -WHERE (?resource, vcard:N, ?blank1) - (?blank1, vcard:Family, ?familyName) - (?resource, vcard:EMAIL, ?blank2) - (?blank2, rdf:value, ?email) - (?blank2, rdf:type, vcard:work) -AND ?familyName ~~ "/^M/" -USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),5); - - } - - - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/literals_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/literals_tests.php.svn-base deleted file mode 100755 index fc00ff57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/literals_tests.php.svn-base +++ /dev/null @@ -1,44 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class Literals_tests extends UnitTestCase { - - /** - * tests if equals() works according to the RDF specifications - * - */ - function testEquals(){ - $_SESSION['test']='Litras Equals test'; - $literal1=new Literal('test'); - $literal2=new Literal('test'); - $this->assertTrue($literal1->equals($literal2)); - $literal2->setLanguage('DE'); - $this->assertFalse($literal1->equals($literal2)); - $literal1->setLanguage('FR'); - $this->assertFalse($literal1->equals($literal2)); - $literal1->setLanguage('DE'); - $this->assertTrue($literal1->equals($literal2)); - $literal1->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); - $this->assertFalse($literal1->equals($literal2)); - $literal2->setDatatype("http://www.w3.org/TR/xmlschema-2/integer1"); - $this->assertFalse($literal1->equals($literal2)); - $literal2->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); - $this->assertTrue($literal1->equals($literal2)); - - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_BasicOperations_tests.php.svn-base deleted file mode 100755 index b8882f08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,312 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModelt($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_SetOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_SetOperations_tests.php.svn-base deleted file mode 100755 index 00250f58..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_SetOperations_tests.php.svn-base +++ /dev/null @@ -1,162 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testMm_setOperations_tests extends UnitTestCase { - - function testUnite(){ - $_SESSION['test']='MemModel unite test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model1->unite($model2); - - $this->assertEqual(3,$res->size()); - $this->assertTrue($res->contains($stat)); - $this->assertTrue($res->contains($stat2)); - $this->assertTrue($res->contains($stat3)); - - } - - - function testIntersect(){ - $_SESSION['test']='MemModel intersect test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model1->intersect($model1); - - $this->assertEqual(2,$res->size()); - $this->assertTrue($res->contains($stat)); - $this->assertTrue($res->contains($stat2)); - - } - - - function testSubtract(){ - $_SESSION['test']='MemModel subtract test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model2->subtract($model1); - - $this->assertEqual(1,$res->size()); - $this->assertTrue($res->contains($stat3)); - - } - - function testReify(){ - $_SESSION['test']='MemModel reify test'; - - $model = new MemModel(); - $model->setbaseURI("http://www.bizer.de"); - - $myhomepage = new Resource("http://www.bizer.de/welcome.html"); - $creator = new Resource("http://purl.org/dc/elements/1.1/creator"); - $me = new Resource("mailto:chris@bizer.de"); - $model->add(new Statement($myhomepage, $creator, $me)); - - $creation_date = new Resource("http://www.example.org/terms/creation-date"); - $August16 = new Literal("August 16, 2002"); - $model->add(new Statement($myhomepage, $creation_date, $August16)); - - $language = new Resource("http://www.example.org/terms/language"); - $deutsch = new Literal("Deutsch", "de"); - $model->add(new Statement($myhomepage, $language, $deutsch)); - - $model2 =& $model->reify(); - - $this->assertEqual(12,$model2->size()); - } - - - - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_index_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_index_tests.php.svn-base deleted file mode 100755 index a153cb72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_index_tests.php.svn-base +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new MemModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new MemModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_search_tests.php.svn-base deleted file mode 100755 index b29dffee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/mm_search_tests.php.svn-base +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/modelEquals_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/modelEquals_test.php.svn-base deleted file mode 100755 index e00968f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/.svn/text-base/modelEquals_test.php.svn-base +++ /dev/null @@ -1,71 +0,0 @@ - - * - * @package unittests - * @access public - */ - - $_SESSION['PositiveModelEqualstests'] = array( - -(1) => "1" , -(2) => "2" , -(3) => "3" , -(4) => "4" , -(5) => "5" , -(6) => "6" , -(7) => "7" , -(8) => "8" -); - - $_SESSION['NegativeModelEqualstests'] = array( - -(1) => "1" , -(2) => "2" , -(3) => "3" , -(4) => "4" , -(5) => "5" -); - class testModelEquals extends UnitTestCase { - - function testMemEqual(){ - - foreach($_SESSION['PositiveModelEqualstests'] as $name){ - $_SESSION['test']='testfile'.$name.' test'; - - $model1 = ModelFactory::getMemModel(); - $model2 = ModelFactory::getMemModel(); - - $model1->load(MODEL_TESTFILES.'data/testfile'.$name.'_1.nt'); - $model2->load(MODEL_TESTFILES.'data/testfile'.$name.'_2.nt'); - - $this->assertTrue($model1->equals($model2)); - } - } - - function testMemUnequal(){ - - foreach($_SESSION['NegativeModelEqualstests'] as $name){ - $_SESSION['test']='testfileNegative'.$name.' test'; - - $model1 = ModelFactory::getMemModel(); - $model2 = ModelFactory::getMemModel(); - - $model1->load(MODEL_TESTFILES.'data/testfileNegative'.$name.'_1.nt'); - $model2->load(MODEL_TESTFILES.'data/testfileNegative'.$name.'_2.nt'); - - $this->assertFalse($model1->equals($model2)); - } - } - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/ModelFactory_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/ModelFactory_tests.php deleted file mode 100755 index e3937788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/ModelFactory_tests.php +++ /dev/null @@ -1,164 +0,0 @@ -This class tests the functions of ModelFactory.

        - * - *

        Currently doesn't include any tests for the methods returning DB models or datasets.

        - * - * @version $Id: ModelFactory_tests.php 522 2007-08-14 09:22:22Z cweiske $ - * @author Richard Cyganiak (richard@cyganiak.de) - * - * @package unittests - * @access public - */ -class ModelFactory_test extends UnitTestCase { - var $base_URI = 'http://example.org/base#'; - - function testGetDefaultModel() { - $this->createAndTestModel('getDefaultModel', 'MemModel'); - } - - function testGetMemModel() { - $this->createAndTestModel('getMemModel', 'MemModel'); - } - - function testGetInfModelB() { - $this->createAndTestModel('getInfModelB', 'InfModelB'); - } - - function testGetInfModelF() { - $this->createAndTestModel('getInfModelF', 'InfModelF'); - } - - /** Confirms that two calls to ModelFactory::getDefaultModel() return two independent models */ - function testCreateFreshDefaultModel() { - $model1 = &ModelFactory::getDefaultModel(); - $this->addAStatement($model1); - $this->assertIdentical(1, $model1->size()); - $model2 = &ModelFactory::getDefaultModel(); - $this->assertIdentical(0, $model2->size()); - } - - function testGetResModel() { - $model = ModelFactory::getResModel(MEMMODEL); - $this->assertIsEmptyResModel($model, 'ResModel'); - $model = ModelFactory::getResModel(MEMMODEL, $this->base_URI); - $this->assertHasExpectedBaseURI($model); - } - - function testGetResModelWithMemBase() { - $model = ModelFactory::getResModel(MEMMODEL); - // This accesses a private property - $this->assertIsA($model->model, 'MemModel'); - } - - function testGetResModelWithInfFBase() { - $model = ModelFactory::getResModel(INFMODELF); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelF'); - } - - function testGetResModelWithInfBBase() { - $model = ModelFactory::getResModel(INFMODELB); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelB'); - } - -// function testGetResModelWithDBBase() { -// $model = ModelFactory::getResModel(DBMODEL); -// // This accesses a private property -// $this->assertIsA($model->model, 'DbModel'); -// } - - function testGetResModelForBaseModel() { - $baseModel = ModelFactory::getDefaultModel(); - $resModel = ModelFactory::getResModelForBaseModel($baseModel); - $this->assertIsEmptyResModel($resModel, 'ResModel'); - $this->addAStatement($baseModel); - $this->assertIdentical(1, $resModel->size()); - } - - function testGetOntModel() { - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY); - $this->assertIsEmptyResModel($model, 'OntModel'); - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY, $this->base_URI); - $this->assertHasExpectedBaseURI($model); - // This accesses a private property - $this->assertIsA($model->vocabulary, 'RdfsVocabulary'); - } - - function testGetOntModelWithMemBase() { - $model = ModelFactory::getOntModel(MEMMODEL, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'MemModel'); - } - - function testGetOntModelWithInfFBase() { - $model = ModelFactory::getOntModel(INFMODELF, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelF'); - } - - function testGetOntModelWithInfBBase() { - $model = ModelFactory::getOntModel(INFMODELB, RDFS_VOCABULARY); - // This accesses a private property - $this->assertIsA($model->model, 'InfModelB'); - } - -// function testGetOntModelWithDBBase() { -// $model = ModelFactory::getOntModel(DBMODEL, RDFS_VOCABULARY); -// // This accesses a private property -// $this->assertIsA($model->model, 'DbModel'); -// } - - function testGetOntModelForBaseModel() { - $baseModel = ModelFactory::getDefaultModel(); - $resModel = ModelFactory::getOntModelForBaseModel($baseModel, RDFS_VOCABULARY); - $this->assertIsEmptyResModel($resModel, 'OntModel'); - $this->addAStatement($baseModel); - $this->assertIdentical(1, $resModel->size()); - } - - /** @access private */ - function createAndTestModel($methodName, $expectedClassName) { - $model = ModelFactory::$methodName(); - $this->assertIsEmptyModel($model, $expectedClassName); - $model = ModelFactory::$methodName($this->base_URI); - $this->assertHasExpectedBaseURI($model); - } - - /** @access private */ - function assertIsEmptyModel(&$model, $expectedClass) { - $this->assertIsA($model, 'Model'); - $this->assertIsA($model, $expectedClass); - $this->assertIdentical(0, $model->size()); - $this->assertNull($model->getBaseURI()); - } - - /** @access private */ - function assertIsEmptyResModel(&$model, $expectedClass) { - $this->assertIsA($model, 'ResModel'); - $this->assertIsA($model, $expectedClass); - $this->assertIdentical(0, $model->size()); - $this->assertNull($model->getBaseURI()); - } - - /** @access private */ - function assertHasExpectedBaseURI(&$model) { - $this->assertIdentical($this->base_URI, $model->getBaseURI()); - } - - /** @access private */ - function addAStatement(&$model) { - $model->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/Model_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/Model_tests.php deleted file mode 100755 index 44e184cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/Model_tests.php +++ /dev/null @@ -1,54 +0,0 @@ -This class tests functions of the Model base class.

        - * - * @version $Id: Model_tests.php 522 2007-08-14 09:22:22Z cweiske $ - * @author Richard Cyganiak (richard@cyganiak.de) - * - * @package unittests - * @access public - */ -class Model_test extends UnitTestCase { - - function testGetResModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getResModel(); - $this->assertIsA($ont, 'ResModel'); - } - - function testGetResModelIsBasedOnThisModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getResModel(); - $this->assertIdentical(0, $ont->size()); - $mem->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - $this->assertIdentical(1, $ont->size()); - } - - function testGetOntModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getOntModel(RDFS_VOCABULARY); - $this->assertIsA($ont, 'OntModel'); - $this->assertIdentical(array(), $ont->listClasses()); - } - - function testGetOntModelIsBasedOnThisModel() { - $mem = &ModelFactory::getDefaultModel(); - $ont = $mem->getOntModel(RDFS_VOCABULARY); - $this->assertIdentical(0, $ont->size()); - $mem->add(new Statement( - new Resource('http://example.org/#Fred'), - new Resource('http://example.org/#name'), - new Literal('Fred'))); - $this->assertIdentical(1, $ont->size()); - } -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/blanknode_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/blanknode_test.php deleted file mode 100755 index dd9cbb2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/blanknode_test.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class blanknode_test extends UnitTestCase { - - function testGetID(){ - $_SESSION['test']='bnode getID test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->getId(),'http://www.example.orglocalname'); - } - - function testGetLabel(){ - $_SESSION['test']='bnode getLabel test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->getLabel(),'http://www.example.orglocalname'); - } - - function testToString(){ - $_SESSION['test']='bnode toString test'; - $bnode=$this->_generateBnode(); - $this->assertEqual($bnode->toString(),'bNode("http://www.example.orglocalname")'); - } - - function testEquals(){ - $_SESSION['test']='bnode Euqals test'; - $bnode1=$this->_generateBnode(); - $bnode2=$this->_generateBnode(); - $this->assertTrue($bnode1->equals($bnode2)); - } - - function testNotEquals(){ - $_SESSION['test']='bnode NotEuqals test'; - $bnode1=$this->_generateBnode(); - $bnode2=new BlankNode('http://www.example.orglocalname','localname2'); - $bnode3=new BlankNode('http://www.example.orglocalname1','localname'); - $this->assertFalse($bnode1->equals($bnode2)); - $this->assertFalse($bnode1->equals($bnode3)); - - } - - - /** - * generate a Blanknode - * - */ - function _generateBnode(){ - $node=new BlankNode('http://www.example.org','localname'); - return $node; - } - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/dBModel_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/dBModel_test.php deleted file mode 100755 index ba77ae24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/dBModel_test.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class dBModel_test extends UnitTestCase -{ - protected static $strModelUri = 'http://example.org/rap-unittests-dbmodel'; - - function testSize(){ - $mysql_database = $this->createDatabaseConnection(); - //$mysql_database->createTables('MySQL'); - $_SESSION['test']='DbModel size test'; - $mysql_database->putModel($this->_generateModel(), self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $this->assertEqual($dbmodel->size(),1); - $dbmodel->delete(); - } - - - function testAdd(){ - $_SESSION['test']='DbModel add test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $statement=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $dbmodel->add($statement); - $this->assertTrue($dbmodel->contains($statement)); - $this->assertEqual($dbmodel->size(),2); - $dbmodel->delete(); - } - - - function testRemove(){ - $_SESSION['test']='DbModel remove test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $statement=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $dbmodel->remove($statement); - $mod1=$dbmodel->getMemModel(); - $this->assertFalse($dbmodel->contains($statement)); - $dbmodel->delete(); - } - - - function testSetBaseUri(){ - $_SESSION['test']='DbModel setBaseURI test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $this->assertEqual($dbmodel->baseURI,'http://www.example.org#'); - $dbmodel->delete(); - } - - - function testContains(){ - $_SESSION['test']='DbModel testContains test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $stat=new Statement(new Resource('http://www.example.org/subject1'),new Resource('http://www.example.org/predicate1'),new Resource('http://www.example.org/object1')); - $stat2=new Statement(new Resource('http://www.example.org/subject2'),new Resource('http://www.example.org/predicate2'),new Resource('http://www.example.org/object2')); - $this->assertTrue($dbmodel->contains($stat)); - $this->assertFalse($dbmodel->contains($stat2)); - $dbmodel->delete(); - } - - function testContainsAll(){ - $_SESSION['test']='DbModel testContainsAll test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$this->_generateModel(); - $this->assertTrue($dbmodel->containsAll($memModel)); - $dbmodel->delete(); - } - - function testContainsAny(){ - $_SESSION['test']='DbModel testContainsAny test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModel(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$this->_generateModel(); - $this->assertTrue($dbmodel->containsAny($memModel)); - $dbmodel->delete(); - } - - - function testLiteral(){ - $_SESSION['test']='DbModel testContainsAny test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModelLiteral(),self::$strModelUri); - $dbmodel=$mysql_database->getModel(self::$strModelUri); - $memModel=$dbmodel->getMemModel(); - $stat=$memModel->triples[0]; - $obj=$stat->getObject(); - $this->assertEqual($obj->getDatatype(),'test'); - $this->assertEqual($obj->getLanguage(),'DE'); - $dbmodel->delete(); - } - - function testNamespaces() - { - $_SESSION['test']='DbModel testNamespaces test'; - $mysql_database = $this->createDatabaseConnection(); - $mysql_database->putModel($this->_generateModelLiteral(),self::$strModelUri); - - $dbmodel = $mysql_database->getModel(self::$strModelUri); - - //no namespaces - $this->assertIdentical(false, $dbmodel->getParsedNamespaces()); - - //one namespace - $dbmodel->addNamespace('test', 'http://test.org'); - $this->assertEqual( - array('http://test.org' => 'test'), - $dbmodel->getParsedNamespaces() - ); - - //two namespaces - $dbmodel->addNamespace('test2', 'http://test2.org'); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - ), - $dbmodel->getParsedNamespaces() - ); - - //adding multiple namespaces - $dbmodel->addParsedNamespaces( - array( - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ) - ); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - //adding empty array - $dbmodel->addParsedNamespaces(array()); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test2.org' => 'test2', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - //removing namespace - $dbmodel->removeNamespace('http://test2.org'); - $this->assertEqual( - array( - 'http://test.org' => 'test', - 'http://test3.org' => 'test3', - 'http://test4.org' => 'test4', - ), - $dbmodel->getParsedNamespaces() - ); - - $dbmodel->delete(); - } - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a simple MemModel - * - */ - - function _generateModel(){ - $model=new MemModel(); - $model->setBaseURI('http://www.example.org'); - $sub=new Resource('http://www.example.org/subject1'); - $pred=new Resource('http://www.example.org/predicate1'); - $obj=new Resource('http://www.example.org/object1'); - $model->add(new Statement($sub,$pred,$obj)); - return $model; - } - - function _generateModelLiteral(){ - $model=new MemModel(); - $model->setBaseURI('http://www.example.org'); - $sub=new Resource('http://www.example.org/subject1'); - $pred=new Resource('http://www.example.org/predicate1'); - $obj=new Literal('http://www.example.org/object1'); - $obj->setDatatype('test'); - $obj->setLanguage('DE'); - $model->add(new Statement($sub,$pred,$obj)); - return $model; - } - - - - function createDatabaseConnection() - { - return new DbStore( - $GLOBALS['dbConf']['type'], - $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], - $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/all-wcprops deleted file mode 100755 index f4b9cb60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/all-wcprops +++ /dev/null @@ -1,161 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data -END -testfileNegative1_1.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative1_1.nt -END -testfileNegative2_1.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative2_1.nt -END -testfileNegative1_2.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative1_2.nt -END -testfileNegative3_1.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative3_1.nt -END -testfileNegative2_2.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative2_2.nt -END -testfileNegative4_1.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative4_1.nt -END -testfileNegative3_2.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative3_2.nt -END -testfileNegative5_1.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative5_1.nt -END -testfileNegative4_2.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative4_2.nt -END -testfileNegative5_2.nt -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfileNegative5_2.nt -END -testfile1_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile1_1.nt -END -testfile1_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile1_2.nt -END -testfile2_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile2_1.nt -END -testfile2_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile2_2.nt -END -testfile3_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile3_1.nt -END -testfile4_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile4_1.nt -END -testfile3_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile3_2.nt -END -testfile5_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile5_1.nt -END -testfile4_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile4_2.nt -END -testfile6_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile6_1.nt -END -testfile5_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile5_2.nt -END -testfile7_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile7_1.nt -END -testfile6_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile6_2.nt -END -testfile8_1.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile8_1.nt -END -testfile7_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile7_2.nt -END -testfile8_2.nt -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Model/data/testfile8_2.nt -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/entries deleted file mode 100755 index f32eee86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/entries +++ /dev/null @@ -1,366 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Model/data -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-17T05:33:15.000000Z -270 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -testfileNegative1_1.nt -file - - - - -2008-02-29T14:57:03.799818Z -be01281ae26519183c0939a52e0df94c -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative2_1.nt -file - - - - -2008-02-29T14:57:03.799818Z -44f5561ad6774478411a0c01aca948ce -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative1_2.nt -file - - - - -2008-02-29T14:57:03.799818Z -e71fe3761692e7d4cdf5131cd23a0d3e -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative3_1.nt -file - - - - -2008-02-29T14:57:03.815438Z -3566886455ef6cc113736764eee90405 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative2_2.nt -file - - - - -2008-02-29T14:57:03.815438Z -dfd4705c71018fa43a6930684acab1c5 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative4_1.nt -file - - - - -2008-02-29T14:57:03.831059Z -bcdd1e54ac82f0d80c327c6371e80acb -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative3_2.nt -file - - - - -2008-02-29T14:57:03.815438Z -74e30e70e99ac974d1c2b88dbccfd440 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative5_1.nt -file - - - - -2008-02-29T14:57:03.846679Z -a49dc6ec5785efd8d4fe9d36e50e3e14 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative4_2.nt -file - - - - -2008-02-29T14:57:03.831059Z -687f9a11eb590f15fc513daeab105301 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfileNegative5_2.nt -file - - - - -2008-02-29T14:57:03.846679Z -687f9a11eb590f15fc513daeab105301 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile1_1.nt -file - - - - -2008-02-29T14:57:03.846679Z -be01281ae26519183c0939a52e0df94c -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile1_2.nt -file - - - - -2008-02-29T14:57:03.862300Z -d0ea4835cd2f129d643fcff8aa5e803d -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile2_1.nt -file - - - - -2008-02-29T14:57:03.862300Z -be01281ae26519183c0939a52e0df94c -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile2_2.nt -file - - - - -2008-02-29T14:57:03.877921Z -b448601425b0f043cd2aac7f0bc00867 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile3_1.nt -file - - - - -2008-02-29T14:57:03.862300Z -fcd625d6fd1451236a8afb1663a27027 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile4_1.nt -file - - - - -2008-02-29T14:57:03.877921Z -4fd3499dd1df50c14391371674deed25 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile3_2.nt -file - - - - -2008-02-29T14:57:03.893541Z -be75511df8aab488e7dd4741eef81a7d -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile5_1.nt -file - - - - -2008-02-29T14:57:03.893541Z -abcaa6183420cda705320c982eaca537 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile4_2.nt -file - - - - -2008-02-29T14:57:03.893541Z -99c050575731894395d00bf97a1665f2 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile6_1.nt -file - - - - -2008-02-29T14:57:03.909162Z -3566886455ef6cc113736764eee90405 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile5_2.nt -file - - - - -2008-02-29T14:57:03.909162Z -1619e9ceff045f15a444ec0e880ef62d -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile7_1.nt -file - - - - -2008-02-29T14:57:03.909162Z -7abd2a9047f77f16fd20f28026665cf2 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile6_2.nt -file - - - - -2008-02-29T14:57:03.924782Z -e66c821e2f1e273d73b7e44c8b4d1bf3 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile8_1.nt -file - - - - -2008-02-29T14:57:03.924782Z -bcdd1e54ac82f0d80c327c6371e80acb -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile7_2.nt -file - - - - -2008-02-29T14:57:03.940403Z -f2181b1688380f01991f9caafcdb237f -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -testfile8_2.nt -file - - - - -2008-02-29T14:57:03.940403Z -97df0c28840eb7576fad085b8e3933d4 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile1_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile2_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile3_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile4_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile5_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile6_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile7_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfile8_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative1_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative2_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative3_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative4_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/prop-base/testfileNegative5_2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_1.nt.svn-base deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_1.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_2.nt.svn-base deleted file mode 100755 index f20acd70..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile1_2.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_1.nt.svn-base deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_1.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_2.nt.svn-base deleted file mode 100755 index 4e052148..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile2_2.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aB "3" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_1.nt.svn-base deleted file mode 100755 index 9cc5eadb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_1.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aBlanknode "5" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_2.nt.svn-base deleted file mode 100755 index ee9049e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile3_2.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aB "3" . -_:aB "5" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_1.nt.svn-base deleted file mode 100755 index f4c7bc1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_1.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode _:b . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_2.nt.svn-base deleted file mode 100755 index c389421f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile4_2.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode _:blank . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_1.nt.svn-base deleted file mode 100755 index 74e2376b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_1.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ - _:bnode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_2.nt.svn-base deleted file mode 100755 index 93e4af5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile5_2.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ - _:blanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_1.nt.svn-base deleted file mode 100755 index 5c26c729..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_1.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:bn "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_2.nt.svn-base deleted file mode 100755 index 244ff44c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile6_2.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn2 . -_:bn2 "5" . -_:bn2 _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_1.nt.svn-base deleted file mode 100755 index 4db2fd91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_1.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -_:aB1 "1" . -_:aB2 "2" . -_:aB3 "3" . -_:aB3 "4" . -_:aB3 "5" . -_:aB4 "6" . -_:aB5 "7" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_2.nt.svn-base deleted file mode 100755 index 65824db2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile7_2.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -_:aB1 "1" . -_:aB2 "2" . -_:aB9 "3" . -_:aB9 "4" . -_:aB9 "5" . -_:aB4 "6" . -_:aB5 "7" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_1.nt.svn-base deleted file mode 100755 index f130e917..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_1.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn1 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_2.nt.svn-base deleted file mode 100755 index 9848989e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfile8_2.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn99 . - _:bn99 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_1.nt.svn-base deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_1.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_2.nt.svn-base deleted file mode 100755 index 04e7218a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative1_2.nt.svn-base +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "4" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_1.nt.svn-base deleted file mode 100755 index b9fdb3d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_1.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aBlanknode "5" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_2.nt.svn-base deleted file mode 100755 index e40df672..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative2_2.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aB "5" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_1.nt.svn-base deleted file mode 100755 index 5c26c729..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_1.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:bn "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_2.nt.svn-base deleted file mode 100755 index 035e29e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative3_2.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:b "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_1.nt.svn-base deleted file mode 100755 index f130e917..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_1.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn1 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_2.nt.svn-base deleted file mode 100755 index 5c76de5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative4_2.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_1.nt.svn-base deleted file mode 100755 index 58f59764..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_1.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn1 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_2.nt.svn-base deleted file mode 100755 index 5c76de5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/.svn/text-base/testfileNegative5_2.nt.svn-base +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_1.nt deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_1.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_2.nt deleted file mode 100755 index 3acfd006..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile1_2.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_1.nt deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_1.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_2.nt deleted file mode 100755 index c2da767d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile2_2.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aB "3" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_1.nt deleted file mode 100755 index ce436012..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_1.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aBlanknode "5" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_2.nt deleted file mode 100755 index 1fc6afbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile3_2.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aB "3" . -_:aB "5" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_1.nt deleted file mode 100755 index f4c7bc1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_1.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode _:b . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_2.nt deleted file mode 100755 index c389421f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile4_2.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode _:blank . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_1.nt deleted file mode 100755 index 74e2376b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_1.nt +++ /dev/null @@ -1 +0,0 @@ - _:bnode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_2.nt deleted file mode 100755 index 93e4af5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile5_2.nt +++ /dev/null @@ -1 +0,0 @@ - _:blanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_1.nt deleted file mode 100755 index d6a4531c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_1.nt +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:bn "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_2.nt deleted file mode 100755 index b422df2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile6_2.nt +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn2 . -_:bn2 "5" . -_:bn2 _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_1.nt deleted file mode 100755 index 2597294c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_1.nt +++ /dev/null @@ -1,7 +0,0 @@ -_:aB1 "1" . -_:aB2 "2" . -_:aB3 "3" . -_:aB3 "4" . -_:aB3 "5" . -_:aB4 "6" . -_:aB5 "7" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_2.nt deleted file mode 100755 index e19fe337..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile7_2.nt +++ /dev/null @@ -1,7 +0,0 @@ -_:aB1 "1" . -_:aB2 "2" . -_:aB9 "3" . -_:aB9 "4" . -_:aB9 "5" . -_:aB4 "6" . -_:aB5 "7" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_1.nt deleted file mode 100755 index 243084c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_1.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn1 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_2.nt deleted file mode 100755 index abe9da9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfile8_2.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn99 . - _:bn99 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_1.nt deleted file mode 100755 index ec19884f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_1.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "3" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_2.nt deleted file mode 100755 index 04e7218a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative1_2.nt +++ /dev/null @@ -1 +0,0 @@ -_:aBlanknode "4" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_1.nt deleted file mode 100755 index bcf244a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_1.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aBlanknode "5" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_2.nt deleted file mode 100755 index 1dd8b001..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative2_2.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:aBlanknode "3" . -_:aB "5" . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_1.nt deleted file mode 100755 index d6a4531c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_1.nt +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:bn "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_2.nt deleted file mode 100755 index febf0a06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative3_2.nt +++ /dev/null @@ -1,3 +0,0 @@ -_:aBlanknode _:bn . -_:b "5" . -_:bn _:aBlanknode . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_1.nt deleted file mode 100755 index 243084c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_1.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn1 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_2.nt deleted file mode 100755 index 6a8267e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative4_2.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_1.nt deleted file mode 100755 index e4bd36b5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_1.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn1 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_2.nt deleted file mode 100755 index 6a8267e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/data/testfileNegative5_2.nt +++ /dev/null @@ -1,7 +0,0 @@ - _:bn1 . - _:bn2 . - _:bn3 . - _:bn4 . - _:bn4 . - _:bn3 . - _:bn5 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/getModelByRDQL_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/getModelByRDQL_tests.php deleted file mode 100755 index 6f749d0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/getModelByRDQL_tests.php +++ /dev/null @@ -1,132 +0,0 @@ - -* -* @package unittests -* @access public -*/ -class getModelByRDQL_tests extends UnitTestCase { - - function testGetModelByRDQL(){ - $_SESSION['test']='simple rdql query'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?fullName - WHERE (?x, vcard:FN, ?fullName) - USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),3); - } - - function testGetModelByRDQL2(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query2'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT * - WHERE (?x, vcard:Given, "Monica") - USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),1); - } - - function testGetModelByRDQL3(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query3'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?x - WHERE (?x,, )'; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),6); - $model3 = $model2->find(null,RDF::TYPE(),new Resource('http://www.w3.org/2001/vcard-rdf/3.0#work')); - $this->assertEqual(6,$model3->size()); - } - - - function testGetModelByRDQL4(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query4'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?givenName, ?age -// This is an example of an one-line comment -WHERE (?x, vcard:N, ?blank), - (?blank, vcard:Given, ?givenName), - (?x, /* and this is another type of comments */ v:age, ?age) -AND ?age > 30 -USING vcard FOR v FOR '; - $model2 = $model->getMemModelByRDQL($query); - $statement1 = new Statement(new BlankNode($model2),VCARD::GIVEN(),new Literal('Bill')); - $statement2 = new Statement(new BlankNode($model2),VCARD::GIVEN(),new Literal('George')); - $this->assertEqual($model2->size(),6); - } - - function testGetModelByRDQL5(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query5'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?givenName ?age ?telNumberHome -WHERE (?person vcard:N ?blank1) - (?blank1 vcard:Given ?givenName) - (?person v:age ?age) - (?person vcard:TEL ?blank2) - (?blank2 rdf:value ?telNumberHome) - (?blank2 rdf:type vcard:home) - (?person vcard:TEL ?blank3) - (?blank3 rdf:value ?telNumberOffice) - (?blank3 rdf:type vcard:work) -AND ?telNumberOffice eq "+1 111 2222 668" -USING vcard FOR - v FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),9); - } - - - function testGetModelByRDQL6(){ - if(isset($model2)); - unset($model2); - - $_SESSION['test']='simple rdql query6'; - $model=new MemModel(); - $model->load('employees.rdf'); - $query=' SELECT ?resource, ?email -WHERE (?resource, vcard:N, ?blank1) - (?blank1, vcard:Family, ?familyName) - (?resource, vcard:EMAIL, ?blank2) - (?blank2, rdf:value, ?email) - (?blank2, rdf:type, vcard:work) -AND ?familyName ~~ "/^M/" -USING vcard FOR '; - $model2 = $model->getMemModelByRDQL($query); - $this->assertEqual($model2->size(),5); - - } - - - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/literals_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/literals_tests.php deleted file mode 100755 index 8da01dca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/literals_tests.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class Literals_tests extends UnitTestCase { - - /** - * tests if equals() works according to the RDF specifications - * - */ - function testEquals(){ - $_SESSION['test']='Litras Equals test'; - $literal1=new Literal('test'); - $literal2=new Literal('test'); - $this->assertTrue($literal1->equals($literal2)); - $literal2->setLanguage('DE'); - $this->assertFalse($literal1->equals($literal2)); - $literal1->setLanguage('FR'); - $this->assertFalse($literal1->equals($literal2)); - $literal1->setLanguage('DE'); - $this->assertTrue($literal1->equals($literal2)); - $literal1->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); - $this->assertFalse($literal1->equals($literal2)); - $literal2->setDatatype("http://www.w3.org/TR/xmlschema-2/integer1"); - $this->assertFalse($literal1->equals($literal2)); - $literal2->setDatatype("http://www.w3.org/TR/xmlschema-2/integer"); - $this->assertTrue($literal1->equals($literal2)); - - } - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_BasicOperations_tests.php deleted file mode 100755 index 02000054..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_BasicOperations_tests.php +++ /dev/null @@ -1,312 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContains(){ - $_SESSION['test']='MemModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - } - } - - - /** - * tests if contains returns true if the given statement is in the MemModel - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='MemModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('test'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertTrue($mod->contains($stat)); - } - } - - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='MemModel contains literal false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new Literal('http://www.example.org/obj2'); - $lit->setDatatype('notTest'); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),$lit); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='MemModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subX'),new Resource('http://www.example.org/predX'),new Resource('http://www.example.org/objX')); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if containsAll returns true if all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAll(){ - $_SESSION['test']='MemModel containsAll test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->add($stat); - $this->assertTrue($mod->containsAll($mod2)); - } - } - - - - /** - * tests if containsAll returns false if not all statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAllFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - /** - * tests if containsAny returns true any statements are in the given MemModel - * using all kinds of indices. - */ - function testContainsAny(){ - $_SESSION['test']='MemModel containsAny test'; - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $this->assertTrue($mod->containsAny($mod2)); - } - } - - /** - * tests if containsAll returns false if no statement is in the given MemModel - * using all kinds of indices. - */ - function testContainsAnyFalse(){ - $_SESSION['test']='MemModel containsAll false test'; - $stat=new Statement(new Resource('http://www.example.org/sub0'),new Resource('http://www.example.org/pred0'),new Resource('http://www.example.org/obj0')); - $stat2=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat3=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $mod2=$this->_generateModel(3,$i); - $mod->remove($stat); - $mod->remove($stat2); - $mod->remove($stat3); - $this->assertFalse($mod->containsAll($mod2)); - } - } - - - - /** - * tests if remove returns FALSE if trying to remove a statement which is not in MemModel - * using all kinds of indices. - */ - function testRemoveFalse(){ - $_SESSION['test']='MemModel remove false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/a'),new Resource('http://www.example.org/b'),new Resource('http://www.example.org/c')); - $this->assertFalse($mod->remove($stat)); - } - } - - /** - * tests if a statement is successfully removed from a MemModel - * using all kinds of indices. - */ - function testRemove(){ - $_SESSION['test']='MemModel remove test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->remove($stat)); - $this->assertFalse($mod->contains($stat)); - } - } - - /** - * tests if a statement is successfully added to a MemModel - * using all kinds of indices - */ - function testAdd(){ - $_SESSION['test']='MemModel add test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub4'),new Resource('http://www.example.org/pred4'),new Resource('http://www.example.org/obj4')); - $this->assertFalse($mod->contains($stat)); - $mod->add($stat); - $this->assertTrue($mod->contains($stat)); - } - } - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicates(){ - $_SESSION['test']='MemModel addWithoutDuplicates test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertTrue($mod->contains($stat)); - $this->assertFalse($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),3); - } - } - - - /** - * tests if addWithoutDuplicates returns false if adding a - * statement which is already in the MemModel - * - */ - function testAddWithoutDuplicatesNegative(){ - $_SESSION['test']='MemModel addWithoutDuplicatesNegative test'; - for($i=-1;$i<4;$i++){ - unset($mod); - $mod=$this->_generateModelt(3,$i); - $stat=new Statement(new Resource('http://www.example.org/subx'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $this->assertFalse($mod->contains($stat)); - $this->assertTrue($mod->addWithoutDuplicates($stat)); - $this->assertTrue($mod->contains($stat)); - $this->assertEqual($mod->size(),4); - } - } - - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9); - $objs[$i]->setDatatype('test'); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModelt($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_SetOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_SetOperations_tests.php deleted file mode 100755 index 58eca483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_SetOperations_tests.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * @package unittests - * @access public - */ - - -class testMm_setOperations_tests extends UnitTestCase { - - function testUnite(){ - $_SESSION['test']='MemModel unite test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model1->unite($model2); - - $this->assertEqual(3,$res->size()); - $this->assertTrue($res->contains($stat)); - $this->assertTrue($res->contains($stat2)); - $this->assertTrue($res->contains($stat3)); - - } - - - function testIntersect(){ - $_SESSION['test']='MemModel intersect test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model1->intersect($model1); - - $this->assertEqual(2,$res->size()); - $this->assertTrue($res->contains($stat)); - $this->assertTrue($res->contains($stat2)); - - } - - - function testSubtract(){ - $_SESSION['test']='MemModel subtract test'; - - $model1=new MemModel(); - $stat=new Statement(new Resource('http://www.example.org/sub1'),new Resource('http://www.example.org/pred1'),new Resource('http://www.example.org/obj1')); - $stat2=new Statement(new Resource('http://www.example.org/sub2'),new Resource('http://www.example.org/pred2'),new Resource('http://www.example.org/obj2')); - $stat3=new Statement(new Resource('http://www.example.org/sub3'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/obj3')); - $model1->add($stat); - $model1->add($stat2); - - $model2=new MemModel(); - $model2->add($stat); - $model2->add($stat2); - $model2->add($stat3); - - $res=new MemModel(); - $res=$model2->subtract($model1); - - $this->assertEqual(1,$res->size()); - $this->assertTrue($res->contains($stat3)); - - } - - function testReify(){ - $_SESSION['test']='MemModel reify test'; - - $model = new MemModel(); - $model->setbaseURI("http://www.bizer.de"); - - $myhomepage = new Resource("http://www.bizer.de/welcome.html"); - $creator = new Resource("http://purl.org/dc/elements/1.1/creator"); - $me = new Resource("mailto:chris@bizer.de"); - $model->add(new Statement($myhomepage, $creator, $me)); - - $creation_date = new Resource("http://www.example.org/terms/creation-date"); - $August16 = new Literal("August 16, 2002"); - $model->add(new Statement($myhomepage, $creation_date, $August16)); - - $language = new Resource("http://www.example.org/terms/language"); - $deutsch = new Literal("Deutsch", "de"); - $model->add(new Statement($myhomepage, $language, $deutsch)); - - $model2 =& $model->reify(); - - $this->assertEqual(12,$model2->size()); - } - - - - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - - $model=new MemModel(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i); - $preds[$i]=new Resource('http://www.example.org/pred'.$i); - $objs[$i]=new Resource('http://www.example.org/obj'.$i); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_index_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_index_tests.php deleted file mode 100755 index 77b7b81a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_index_tests.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_index_test extends UnitTestCase { - - - - // Tests if index is consistent after removing and adding Statements - function testAll_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new MemModel(); - $rem=array(55,532,4,812,813,814,810,900,3,7,9,999,998,997,1,6); - $add=array(13,25,26,27,454,352,88,17,123); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(1000,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - foreach($add as $key =>$value){ - $model1->add($model1->triples[$value]); - } - - - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - - - // Tests if index is consistent after removing Statements - function testEdge_removeTest(){ - $_SESSION['test']='All remove test'; - $model1=new MemModel(); - $rem=array(0,1,2,3,11,12,13); - for($i=0;$i<4;$i++){ - $model1= $this->_generateModel(14,1,$i,null); - foreach($rem as $key =>$value){ - $model1->remove($model1->triples[$value]); - } - if($i==0){ - for($k=4;$k<7;$k++) - { - $this->assertTrue($this->_checkIndex($model1,$k)); - } - }else{ - $pass=$this->_checkIndex($model1,$i); - $this->assertTrue($pass); - } - - - } - - } - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - $pass=TRUE; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - return false; - } - if($stat==null){ - return false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - return false; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - return FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - return FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - return FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - return FALSE; - } - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_search_tests.php deleted file mode 100755 index 346a693c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/mm_search_tests.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testMm_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='search test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),$needle->getPredicate(),$needle->getObject())); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in MemModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find($needle->getSubject(),null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,$needle->getPredicate(),null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $this->assertNotEqual(null,$model1->find(null,null,$needle->getObject())); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in MemModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($needle->getSubject(),null,null); - $this->assertNotEqual(0,$res->size()); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in MemModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org./subX'),new Resource('http://www.example.org./predX'),new Resource('http://www.example.org./objX')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->find($stat->getSubject(),null,null); - $this->assertEqual(0,$res->size()); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in MemModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $stat=new Statement(new Resource('http://www.example.org/Subject0'),new Resource('http://www.example.org/Predicate0'),new Resource('http://www.example.org/Object0')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement($stat->getSubject(),null,null); - $result=$res->getSubject(); - $res2=$stat->getSubject(); - $this->assertEqual($result->getLabel(),$res2->getLabel()); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $res=$model1->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]; - $this->assertEqual($res->toString(),$should->toString()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/modelEquals_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/modelEquals_test.php deleted file mode 100755 index 200e332d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Model/modelEquals_test.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * @package unittests - * @access public - */ - - $_SESSION['PositiveModelEqualstests'] = array( - -(1) => "1" , -(2) => "2" , -(3) => "3" , -(4) => "4" , -(5) => "5" , -(6) => "6" , -(7) => "7" , -(8) => "8" -); - - $_SESSION['NegativeModelEqualstests'] = array( - -(1) => "1" , -(2) => "2" , -(3) => "3" , -(4) => "4" , -(5) => "5" -); - class testModelEquals extends UnitTestCase { - - function testMemEqual(){ - - foreach($_SESSION['PositiveModelEqualstests'] as $name){ - $_SESSION['test']='testfile'.$name.' test'; - - $model1 = ModelFactory::getMemModel(); - $model2 = ModelFactory::getMemModel(); - - $model1->load(MODEL_TESTFILES.'data/testfile'.$name.'_1.nt'); - $model2->load(MODEL_TESTFILES.'data/testfile'.$name.'_2.nt'); - - $this->assertTrue($model1->equals($model2)); - } - } - - function testMemUnequal(){ - - foreach($_SESSION['NegativeModelEqualstests'] as $name){ - $_SESSION['test']='testfileNegative'.$name.' test'; - - $model1 = ModelFactory::getMemModel(); - $model2 = ModelFactory::getMemModel(); - - $model1->load(MODEL_TESTFILES.'data/testfileNegative'.$name.'_1.nt'); - $model2->load(MODEL_TESTFILES.'data/testfileNegative'.$name.'_2.nt'); - - $this->assertFalse($model1->equals($model2)); - } - } - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/all-wcprops deleted file mode 100755 index 3a0102e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Namedgraphs -END -Namedgraphs_tests.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Namedgraphs/Namedgraphs_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/entries deleted file mode 100755 index 11b00294..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Namedgraphs -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-17T05:33:15.000000Z -270 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Namedgraphs_tests.php -file - - - - -2008-02-29T14:57:02.315861Z -bc2b02d566e438762b498ee36eb1a3e6 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/prop-base/Namedgraphs_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/prop-base/Namedgraphs_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/prop-base/Namedgraphs_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/text-base/Namedgraphs_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/text-base/Namedgraphs_tests.php.svn-base deleted file mode 100755 index ccb7472a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/.svn/text-base/Namedgraphs_tests.php.svn-base +++ /dev/null @@ -1,235 +0,0 @@ - -* -* @package unittests -* @access public -*/ - -class testNamedGraphs extends UnitTestCase { - - - /** - * tests functions on dataset level - */ - function testDatatset(){ - - $_SESSION['test']='Dataset operations tests'; - $quad1= new Quad(new Resource('http://graph1'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $quad2= new Quad(new Resource('http://graph2'),new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $quad3= new Quad(new Resource('http://graph3'),new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $dataset = new DatasetMem('Dataset1'); - $dataset2 = new DatasetMem('Dataset2'); - - $dataset2->addQuad($quad1); - $dataset2->addQuad($quad2); - $dataset->addQuad($quad3); - - - $dataset->addAll($dataset2); - - $it = $dataset->findInNamedGraphs(null,null,null,null); - - $i = 0; - while($it->valid()){ - $i++; - $it->next(); - } - $this->assertEqual(3,$i); - $this->assertEqual(3,$dataset->countQuads()); - $this->assertTrue($dataset->containsQuad($quad1->getGraphName(),$quad1->getSubject(),$quad1->getPredicate(),$quad1->getObject())); - $this->assertTrue($dataset->containsQuad($quad2->getGraphName(),$quad2->getSubject(),$quad2->getPredicate(),$quad2->getObject())); - $this->assertTrue($dataset->containsQuad($quad3->getGraphName(),$quad3->getSubject(),$quad3->getPredicate(),$quad3->getObject())); - - - $dataset->removeQuad($quad3); - $this->assertEqual(2,$dataset->countQuads()); - $this->assertTrue($dataset->containsQuad($quad1->getGraphName(),$quad1->getSubject(),$quad1->getPredicate(),$quad1->getObject())); - $this->assertTrue($dataset->containsQuad($quad2->getGraphName(),$quad2->getSubject(),$quad2->getPredicate(),$quad2->getObject())); - $this->assertFalse($dataset->containsQuad($quad3->getGraphName(),$quad3->getSubject(),$quad3->getPredicate(),$quad3->getObject())); - - } - - - - - - /** - * tests functions on graphset level - */ - function testGraphsetOperations(){ - $_SESSION['test']='Graphset operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 =& $graphset->createGraph('http://graph2'); - - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - - $quad6= new Quad(new Resource('http://graph2'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - $quad7= new Quad(new Resource('http://graph2'),new Resource('http://subject7'),new Resource('http://predicate5'),new Resource('http://object5')); - - - $graphset->addQuad($quad1); - $graphset->addQuad($quad3); - $graphset->addQuad($quad2); - $graphset->addQuad($quad6); - $graphset->addQuad($quad7); - $graphset->addQuad($quad5); - - $graphset->addNamedGraph($graph1); - - $this->assertTrue($graphset->containsNamedGraph('http://graph1')); - - - - $this->assertTrue($graphset->containsQuad($quad6->getGraphName(),$quad6->getSubject(),$quad6->getPredicate(),$quad6->getObject())); - $this->assertTrue($graphset->containsQuad($quad7->getGraphName(),$quad7->getSubject(),$quad7->getPredicate(),$quad7->getObject())); - - - $this->assertEqual(6,$graphset->countQuads()); - - $graphset->removeNamedGraph('http://graph2'); - $this->assertFalse($graphset->containsNamedGraph('http://graph2')); - - $this->assertFalse($graphset->containsQuad($quad6->getGraphName(),$quad6->getSubject(),$quad6->getPredicate(),$quad6->getObject())); - $this->assertFalse($graphset->containsQuad($quad7->getGraphName(),$quad7->getSubject(),$quad7->getPredicate(),$quad7->getObject())); - - $this->assertEqual(4,$graphset->countQuads()); - - $this->assertTrue($graphset->containsQuad($quad5->getGraphName(),$quad5->getSubject(),$quad5->getPredicate(),$quad5->getObject())); - $graphset->removeQuad($quad5); - $this->assertEqual(3,$graphset->countQuads()); - $this->assertFalse($graphset->containsQuad($quad5->getGraphName(),$quad5->getSubject(),$quad5->getPredicate(),$quad5->getObject())); - } - - /** - * tests functions on graph level - */ - function testGraphOperations(){ - $_SESSION['test']='Graph operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 = new NamedGraphMem('http://graph2'); - - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $st3= new Statement(new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $graph1->add($st1); - $graph1->add($st2); - $graph1->add($st3); - - $graph2->add($st1); - $graph2->add($st2); - $graph2->add($st3); - - $graphset->addNamedGraph($graph1); - $graphset->addNamedGraph($graph2); - - $this->assertEqual(6,$graphset->countQuads()); - - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st1->getSubject(),$st1->getPredicate(),$st1->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st2->getSubject(),$st2->getPredicate(),$st2->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st3->getSubject(),$st3->getPredicate(),$st3->getObject())); - - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st1->getSubject(),$st1->getPredicate(),$st1->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st2->getSubject(),$st2->getPredicate(),$st2->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st3->getSubject(),$st3->getPredicate(),$st3->getObject())); - - $this->assertEqual(6,$graphset->countQuads()); - $this->assertEqual(6,$graphset->countQuads()); - - - } - - /** - * tests reference functions - */ - function testRefOperations(){ - - $_SESSION['test']='Reference operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 = new NamedGraphMem('http://graph2'); - - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $st3= new Statement(new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $graph1->add($st1); - $graph1->add($st2); - $graph1->add($st3); - - $graph2->add($st1); - $graph2->add($st2); - $graph2->add($st3); - - $graphset->addNamedGraph($graph1); - $graphset->addNamedGraph($graph2); - - $grref = &$graphset->getNamedGraph('http://graph1'); - $this->assertEqual(6,$graphset->countQuads()); - $grref->remove($st1); - $this->assertEqual(5,$graphset->countQuads()); - $grref->add($st1); - $this->assertEqual(6,$graphset->countQuads()); - } - - - - /** - * tests operations on defaultgraph - */ - function testDefOperations(){ - - $_SESSION['test']='Default graph operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - - - $this->assertTrue($graphset->hasDefaultGraph()); - $defaultGraph = &$graphset->getDefaultGraph(); - $this->assertEqual($defaultGraph->size(),0); - $defaultGraph->add($st1); - - - $graph2 = new NamedGraphMem('http://graph2'); - $graph2->add($st2); - $graphset->setDefaultGraph($graph2); - - $defaultGraph2 = &$graphset->getDefaultGraph(); - - $this->assertFalse($defaultGraph2->contains($st1)); - $this->assertTrue($defaultGraph2->contains($st2)); - $this->assertEqual($defaultGraph2->size(),1); - - } - - -} - - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/Namedgraphs_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/Namedgraphs_tests.php deleted file mode 100755 index 70f87f0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namedgraphs/Namedgraphs_tests.php +++ /dev/null @@ -1,235 +0,0 @@ - -* -* @package unittests -* @access public -*/ - -class testNamedGraphs extends UnitTestCase { - - - /** - * tests functions on dataset level - */ - function testDatatset(){ - - $_SESSION['test']='Dataset operations tests'; - $quad1= new Quad(new Resource('http://graph1'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $quad2= new Quad(new Resource('http://graph2'),new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $quad3= new Quad(new Resource('http://graph3'),new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $dataset = new DatasetMem('Dataset1'); - $dataset2 = new DatasetMem('Dataset2'); - - $dataset2->addQuad($quad1); - $dataset2->addQuad($quad2); - $dataset->addQuad($quad3); - - - $dataset->addAll($dataset2); - - $it = $dataset->findInNamedGraphs(null,null,null,null); - - $i = 0; - while($it->valid()){ - $i++; - $it->next(); - } - $this->assertEqual(3,$i); - $this->assertEqual(3,$dataset->countQuads()); - $this->assertTrue($dataset->containsQuad($quad1->getGraphName(),$quad1->getSubject(),$quad1->getPredicate(),$quad1->getObject())); - $this->assertTrue($dataset->containsQuad($quad2->getGraphName(),$quad2->getSubject(),$quad2->getPredicate(),$quad2->getObject())); - $this->assertTrue($dataset->containsQuad($quad3->getGraphName(),$quad3->getSubject(),$quad3->getPredicate(),$quad3->getObject())); - - - $dataset->removeQuad($quad3); - $this->assertEqual(2,$dataset->countQuads()); - $this->assertTrue($dataset->containsQuad($quad1->getGraphName(),$quad1->getSubject(),$quad1->getPredicate(),$quad1->getObject())); - $this->assertTrue($dataset->containsQuad($quad2->getGraphName(),$quad2->getSubject(),$quad2->getPredicate(),$quad2->getObject())); - $this->assertFalse($dataset->containsQuad($quad3->getGraphName(),$quad3->getSubject(),$quad3->getPredicate(),$quad3->getObject())); - - } - - - - - - /** - * tests functions on graphset level - */ - function testGraphsetOperations(){ - $_SESSION['test']='Graphset operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 =& $graphset->createGraph('http://graph2'); - - $quad1= new Quad(new Resource('http://graph3'),new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $quad2= new Quad(new Resource('http://graph3'),new Resource('http://subject2'),new Resource('http://predicate2'),new Resource('http://object2')); - $quad3= new Quad(new Resource('http://graph4'),new Resource('http://subject3'),new Resource('http://predicate3'),new Resource('http://object3')); - $quad5= new Quad(new Resource('http://graph4'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - - $quad6= new Quad(new Resource('http://graph2'),new Resource('http://subject5'),new Resource('http://predicate5'),new Resource('http://object5')); - $quad7= new Quad(new Resource('http://graph2'),new Resource('http://subject7'),new Resource('http://predicate5'),new Resource('http://object5')); - - - $graphset->addQuad($quad1); - $graphset->addQuad($quad3); - $graphset->addQuad($quad2); - $graphset->addQuad($quad6); - $graphset->addQuad($quad7); - $graphset->addQuad($quad5); - - $graphset->addNamedGraph($graph1); - - $this->assertTrue($graphset->containsNamedGraph('http://graph1')); - - - - $this->assertTrue($graphset->containsQuad($quad6->getGraphName(),$quad6->getSubject(),$quad6->getPredicate(),$quad6->getObject())); - $this->assertTrue($graphset->containsQuad($quad7->getGraphName(),$quad7->getSubject(),$quad7->getPredicate(),$quad7->getObject())); - - - $this->assertEqual(6,$graphset->countQuads()); - - $graphset->removeNamedGraph('http://graph2'); - $this->assertFalse($graphset->containsNamedGraph('http://graph2')); - - $this->assertFalse($graphset->containsQuad($quad6->getGraphName(),$quad6->getSubject(),$quad6->getPredicate(),$quad6->getObject())); - $this->assertFalse($graphset->containsQuad($quad7->getGraphName(),$quad7->getSubject(),$quad7->getPredicate(),$quad7->getObject())); - - $this->assertEqual(4,$graphset->countQuads()); - - $this->assertTrue($graphset->containsQuad($quad5->getGraphName(),$quad5->getSubject(),$quad5->getPredicate(),$quad5->getObject())); - $graphset->removeQuad($quad5); - $this->assertEqual(3,$graphset->countQuads()); - $this->assertFalse($graphset->containsQuad($quad5->getGraphName(),$quad5->getSubject(),$quad5->getPredicate(),$quad5->getObject())); - } - - /** - * tests functions on graph level - */ - function testGraphOperations(){ - $_SESSION['test']='Graph operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 = new NamedGraphMem('http://graph2'); - - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $st3= new Statement(new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $graph1->add($st1); - $graph1->add($st2); - $graph1->add($st3); - - $graph2->add($st1); - $graph2->add($st2); - $graph2->add($st3); - - $graphset->addNamedGraph($graph1); - $graphset->addNamedGraph($graph2); - - $this->assertEqual(6,$graphset->countQuads()); - - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st1->getSubject(),$st1->getPredicate(),$st1->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st2->getSubject(),$st2->getPredicate(),$st2->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph1'),$st3->getSubject(),$st3->getPredicate(),$st3->getObject())); - - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st1->getSubject(),$st1->getPredicate(),$st1->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st2->getSubject(),$st2->getPredicate(),$st2->getObject())); - $this->assertTrue($graphset->containsQuad(new Resource('http://graph2'),$st3->getSubject(),$st3->getPredicate(),$st3->getObject())); - - $this->assertEqual(6,$graphset->countQuads()); - $this->assertEqual(6,$graphset->countQuads()); - - - } - - /** - * tests reference functions - */ - function testRefOperations(){ - - $_SESSION['test']='Reference operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - - - $graph1 = new NamedGraphMem('http://graph1'); - $graph2 = new NamedGraphMem('http://graph2'); - - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - $st3= new Statement(new Resource('http://subject3'),new Resource('http://predicate3'),new BlankNode('http://object3')); - - $graph1->add($st1); - $graph1->add($st2); - $graph1->add($st3); - - $graph2->add($st1); - $graph2->add($st2); - $graph2->add($st3); - - $graphset->addNamedGraph($graph1); - $graphset->addNamedGraph($graph2); - - $grref = &$graphset->getNamedGraph('http://graph1'); - $this->assertEqual(6,$graphset->countQuads()); - $grref->remove($st1); - $this->assertEqual(5,$graphset->countQuads()); - $grref->add($st1); - $this->assertEqual(6,$graphset->countQuads()); - } - - - - /** - * tests operations on defaultgraph - */ - function testDefOperations(){ - - $_SESSION['test']='Default graph operations tests'; - $graphset = ModelFactory::getDatasetMem('NGSet1'); - $st1= new Statement(new Resource('http://subject1'),new Resource('http://predicate1'),new Resource('http://object1')); - $st2= new Statement(new Resource('http://subject2'),new Resource('http://predicate2'),new Literal('http://object2')); - - - $this->assertTrue($graphset->hasDefaultGraph()); - $defaultGraph = &$graphset->getDefaultGraph(); - $this->assertEqual($defaultGraph->size(),0); - $defaultGraph->add($st1); - - - $graph2 = new NamedGraphMem('http://graph2'); - $graph2->add($st2); - $graphset->setDefaultGraph($graph2); - - $defaultGraph2 = &$graphset->getDefaultGraph(); - - $this->assertFalse($defaultGraph2->contains($st1)); - $this->assertTrue($defaultGraph2->contains($st2)); - $this->assertEqual($defaultGraph2->size(),1); - - } - - -} - - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/all-wcprops deleted file mode 100755 index 58b84f25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Namespaces -END -Namespace_handling_tests.php -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Namespaces/Namespace_handling_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/entries deleted file mode 100755 index b73a33fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Namespaces -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-05-17T05:33:15.000000Z -270 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -Namespace_handling_tests.php -file - - - - -2008-02-29T14:57:01.753519Z -d965fb3dbd7f00dbd185f386572484da -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/prop-base/Namespace_handling_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/prop-base/Namespace_handling_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/prop-base/Namespace_handling_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/text-base/Namespace_handling_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/text-base/Namespace_handling_tests.php.svn-base deleted file mode 100755 index 9adb57e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/.svn/text-base/Namespace_handling_tests.php.svn-base +++ /dev/null @@ -1,125 +0,0 @@ - -* -* @package unittests -* @access public -*/ - -class testNamespaceHandling extends UnitTestCase { - - /** - * tests if the default_prefixes array is used. - */ - function testUsingDefault(){ - $_SESSION['test']='Using default array test'; - $model = new MemModel(); - $pars = new N3Parser(); - $model = $pars->parse2model($this->_generateModelString()); - // delete default prefixes - global $default_prefixes; - $backup = $default_prefixes; - foreach ($default_prefixes as $name => $pref){ - unset ($default_prefixes[$name]); - } - $default_prefixes=array('xxx' => RDF_NAMESPACE_URI); - // serialize model; - $ser = new RdfSerializer(); - $save = $ser->serialize($model); - $model1 = new MemModel(); - $model1->load($save); - - $this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI],'xxx'); - $model1->removeNamespace(RDF_NAMESPACE_URI); - //$this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI] , null); - $default_prefixes = $backup; - } - - - - - - /** - * tests if the manual set namespaceprefix 'foo' overwrites the prefix 'rdf' defined in - * the default_prefixes array. - */ - function testOverwritingDefaultManual(){ - $_SESSION['test']='Overwriting default manual test'; - $model = new MemModel(); - $pars = new N3Parser(); - $model = $pars->parse2model($this->_generateModelString()); - $ser = new RdfSerializer(); - $string = $ser->serialize($model); - $model2 = new MemModel(); - $model2->load($string); - $this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'rdf'); - $model2->addNamespace('foo',RDF_NAMESPACE_URI); - $this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'foo'); - $model2->removeNamespace(RDF_NAMESPACE_URI); - //$this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI] , null); - } - - - - /** - * parser overwrites the prefixes defined in the default_prefixes array - */ - function testOverwritingDefaultParser(){ - $_SESSION['test']='Overwriting default parser test'; - $string=" - - - August 16, 1999 - - "; - // delete default prefixes - global $default_prefixes; - $backup = $default_prefixes; - foreach ($default_prefixes as $name => $pref){ - unset ($default_prefixes[$name]); - } - $default_prefixes=array('foo' => RDF_NAMESPACE_URI); - $model = new MemModel(); - $model->load($string); - $nmsp = $model->getParsedNamespaces(); - $this->assertEqual($nmsp[RDF_NAMESPACE_URI],'rdf'); - $default_prefixes = $backup; - } - - - - //=================================================================== - // helper functions - //=================================================================== - - function _generateModelString(){ - $string=" - . - . - 'Mammal' ."; - - - return $string; - - } - - - - -} - - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/Namespace_handling_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/Namespace_handling_tests.php deleted file mode 100755 index ca2fd658..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Namespaces/Namespace_handling_tests.php +++ /dev/null @@ -1,125 +0,0 @@ - -* -* @package unittests -* @access public -*/ - -class testNamespaceHandling extends UnitTestCase { - - /** - * tests if the default_prefixes array is used. - */ - function testUsingDefault(){ - $_SESSION['test']='Using default array test'; - $model = new MemModel(); - $pars = new N3Parser(); - $model = $pars->parse2model($this->_generateModelString()); - // delete default prefixes - global $default_prefixes; - $backup = $default_prefixes; - foreach ($default_prefixes as $name => $pref){ - unset ($default_prefixes[$name]); - } - $default_prefixes=array('xxx' => RDF_NAMESPACE_URI); - // serialize model; - $ser = new RdfSerializer(); - $save = $ser->serialize($model); - $model1 = new MemModel(); - $model1->load($save); - - $this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI],'xxx'); - $model1->removeNamespace(RDF_NAMESPACE_URI); - //$this->assertEqual($model1->parsedNamespaces[RDF_NAMESPACE_URI] , null); - $default_prefixes = $backup; - } - - - - - - /** - * tests if the manual set namespaceprefix 'foo' overwrites the prefix 'rdf' defined in - * the default_prefixes array. - */ - function testOverwritingDefaultManual(){ - $_SESSION['test']='Overwriting default manual test'; - $model = new MemModel(); - $pars = new N3Parser(); - $model = $pars->parse2model($this->_generateModelString()); - $ser = new RdfSerializer(); - $string = $ser->serialize($model); - $model2 = new MemModel(); - $model2->load($string); - $this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'rdf'); - $model2->addNamespace('foo',RDF_NAMESPACE_URI); - $this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI],'foo'); - $model2->removeNamespace(RDF_NAMESPACE_URI); - //$this->assertEqual($model2->parsedNamespaces[RDF_NAMESPACE_URI] , null); - } - - - - /** - * parser overwrites the prefixes defined in the default_prefixes array - */ - function testOverwritingDefaultParser(){ - $_SESSION['test']='Overwriting default parser test'; - $string=" - - - August 16, 1999 - - "; - // delete default prefixes - global $default_prefixes; - $backup = $default_prefixes; - foreach ($default_prefixes as $name => $pref){ - unset ($default_prefixes[$name]); - } - $default_prefixes=array('foo' => RDF_NAMESPACE_URI); - $model = new MemModel(); - $model->load($string); - $nmsp = $model->getParsedNamespaces(); - $this->assertEqual($nmsp[RDF_NAMESPACE_URI],'rdf'); - $default_prefixes = $backup; - } - - - - //=================================================================== - // helper functions - //=================================================================== - - function _generateModelString(){ - $string=" - . - . - 'Mammal' ."; - - - return $string; - - } - - - - -} - - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/all-wcprops deleted file mode 100755 index 6530a48d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/OntModel -END -OntModel_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/OntModel/OntModel_BasicOperations_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/entries deleted file mode 100755 index 2553e67e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/entries +++ /dev/null @@ -1,41 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/OntModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:58:11.000000Z -321 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -OntModel_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:01.909725Z -3181f41425603aead5e73edfc5bd77f4 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/prop-base/OntModel_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/prop-base/OntModel_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/prop-base/OntModel_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/text-base/OntModel_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/text-base/OntModel_BasicOperations_tests.php.svn-base deleted file mode 100755 index 435003c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/.svn/text-base/OntModel_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,84 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testOntModel_basicOperations_tests extends UnitTestCase { - - function testOntmodel_Tests(){ - $_SESSION['test']='Ont Model test'; - - $res = ModelFactory::getOntModel(INFMODELB,RDFS_VOCABULARY,'http://www.example.orgURI'); - $ontClass1 = $res->createOntClass('class1'); - $literal1 = $res->createLiteral('ein Label','de'); - $literal2 = $res->createLiteral('a comment','en'); - $resource1 = $res->createResource('http:\\www.example.orgDefinedBy'); - $resource2 = $res->createResource('http:\\www.example.orgRDFType'); - $resource3 = $res->createResource('http:\\www.example.orgSeeAlso'); - $instance1 = $ontClass1->createInstance('testInstance'); - $instance1->addLabelProperty($literal1); - $instance1->addComment($literal2); - $instance1->addIsDefinedBy($resource1); - $instance1->addRDFType($resource2); - $instance1->addSeeAlso($resource3); - - $this->assertEqual($instance1->getLabelProperty(),$literal1); - $this->assertEqual($instance1->getComment(),$literal2); - $this->assertEqual($instance1->getIsDefinedBy(),$resource1); - $list = $instance1->listRDFTypes(); - $this->assertEqual(2,count($list)); - $this->assertEqual($instance1->getSeeAlso(),$resource3); - - $ontClass2 = $res->createOntClass('class2'); - $ontClass1->addSubClass($ontClass2); - $this->assertEqual($res->size(),8); - - $instance2 = $ontClass2->createInstance('testInstance2'); - - $literal3=new ResLiteral('other comment'); - $instance2->addComment($literal3); - $this->assertEqual($res->size(),11); - - $ontClass3 = $res->createOntClass('class3'); - $ontClass1->addSuperClass($ontClass3); - $this->assertEqual($res->size(),15); - $this->assertEqual(count($instance1->listRDFTypes()),3); - $this->assertEqual(count($instance2->listRDFTypes()),3); - - $instance1->removeRDFType($resource2); - $this->assertEqual(count($instance1->listRDFTypes()),2); - $this->assertEqual(count($instance2->listRDFTypes()),3); - - $individual1 = $res->createIndividual('http:\\individual1'); - $individual1->addLabelProperty($literal1); - $this->assertEqual($res->size(),15); - - $instance3 = $ontClass2->createInstance('instance3'); - $instance3->addLabelProperty($literal1); - $this->assertEqual(19,$res->size()); - - $iter = $ontClass2->listInstances(); - $i=0; - for($iter->rewind();$iter->valid();$iter->next()){ - $i++; - } - $this->assertEqual(2,$i); - - } - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/OntModel_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/OntModel_BasicOperations_tests.php deleted file mode 100755 index f3998337..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/OntModel/OntModel_BasicOperations_tests.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testOntModel_basicOperations_tests extends UnitTestCase { - - function testOntmodel_Tests(){ - $_SESSION['test']='Ont Model test'; - - $res = ModelFactory::getOntModel(INFMODELB,RDFS_VOCABULARY,'http://www.example.orgURI'); - $ontClass1 = $res->createOntClass('class1'); - $literal1 = $res->createLiteral('ein Label','de'); - $literal2 = $res->createLiteral('a comment','en'); - $resource1 = $res->createResource('http:\\www.example.orgDefinedBy'); - $resource2 = $res->createResource('http:\\www.example.orgRDFType'); - $resource3 = $res->createResource('http:\\www.example.orgSeeAlso'); - $instance1 = $ontClass1->createInstance('testInstance'); - $instance1->addLabelProperty($literal1); - $instance1->addComment($literal2); - $instance1->addIsDefinedBy($resource1); - $instance1->addRDFType($resource2); - $instance1->addSeeAlso($resource3); - - $this->assertEqual($instance1->getLabelProperty(),$literal1); - $this->assertEqual($instance1->getComment(),$literal2); - $this->assertEqual($instance1->getIsDefinedBy(),$resource1); - $list = $instance1->listRDFTypes(); - $this->assertEqual(2,count($list)); - $this->assertEqual($instance1->getSeeAlso(),$resource3); - - $ontClass2 = $res->createOntClass('class2'); - $ontClass1->addSubClass($ontClass2); - $this->assertEqual($res->size(),8); - - $instance2 = $ontClass2->createInstance('testInstance2'); - - $literal3=new ResLiteral('other comment'); - $instance2->addComment($literal3); - $this->assertEqual($res->size(),11); - - $ontClass3 = $res->createOntClass('class3'); - $ontClass1->addSuperClass($ontClass3); - $this->assertEqual($res->size(),15); - $this->assertEqual(count($instance1->listRDFTypes()),3); - $this->assertEqual(count($instance2->listRDFTypes()),3); - - $instance1->removeRDFType($resource2); - $this->assertEqual(count($instance1->listRDFTypes()),2); - $this->assertEqual(count($instance2->listRDFTypes()),3); - - $individual1 = $res->createIndividual('http:\\individual1'); - $individual1->addLabelProperty($literal1); - $this->assertEqual($res->size(),15); - - $instance3 = $ontClass2->createInstance('instance3'); - $instance3->addLabelProperty($literal1); - $this->assertEqual(19,$res->size()); - - $iter = $ontClass2->listInstances(); - $i=0; - for($iter->rewind();$iter->valid();$iter->next()){ - $i++; - } - $this->assertEqual(2,$i); - - } - - - -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/all-wcprops deleted file mode 100755 index 30a8b017..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 63 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/RDF -END -test_array.php -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/RDF/test_array.php -END -Readme.txt -K 25 -svn:wc:ra_dav:version-url -V 74 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/RDF/Readme.txt -END -rdf_test_cases.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/RDF/rdf_test_cases.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/entries deleted file mode 100755 index e76bafbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/entries +++ /dev/null @@ -1,67 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/RDF -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:38:51.000000Z -320 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -test_array.php -file - - - - -2008-02-29T14:57:25.934208Z -6d65686420a5ef967a3a193db9754598 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -Readme.txt -file - - - - -2008-02-29T14:57:25.949828Z -d9a546ace769abb342ba58b8a4a6a958 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -rdf_test_cases.php -file - - - - -2008-02-29T14:57:25.949828Z -bf5b64bd458185451937eb779d98ea89 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/Readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/Readme.txt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/Readme.txt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/rdf_test_cases.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/rdf_test_cases.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/rdf_test_cases.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/test_array.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/test_array.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/prop-base/test_array.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/Readme.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/Readme.txt.svn-base deleted file mode 100755 index 5f3c2141..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/Readme.txt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ - -In order to run the tests, you have to copy the W3C RDF test cases to a subdirectory -called RdfTestCases. - -Chris, 20/8/2004 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/rdf_test_cases.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/rdf_test_cases.php.svn-base deleted file mode 100755 index 282892b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/rdf_test_cases.php.svn-base +++ /dev/null @@ -1,257 +0,0 @@ - - * - * @package unittests - * @access public - */ - -//define("TESTCASES_DIR", "http://www.w3.org/2000/10/rdf-tests/rdfcore/"); -define("TESTCASES_DIR", "http://localhost/rdfapi-php/test/unit/rdf/RDFtestCases/"); - - - -$_SESSION['rdf_positive_tests'] = array( - -(1) => "amp-in-url/test001" , -(2) => "datatypes/test001" , -(3) => "datatypes/test002" , -(4) => "rdf-element-not-mandatory/test001" , -(5) => "rdfms-reification-required/test001" , -(6) => "rdfms-uri-substructure/test001" , -(7) => "rdfms-xmllang/test001" , -(8) => "rdfms-xmllang/test002" , -(9) => "rdfms-xmllang/test003" , -(10) => "rdfms-xmllang/test004" , -(11) => "rdfms-xmllang/test005" , -(12) => "rdfms-xmllang/test006" , -(13) => "unrecognised-xml-attributes/test001" , -(14) => "unrecognised-xml-attributes/test002" , -(15) => "xml-canon/test001" , -(16) => "rdf-charmod-literals/test001" , -(17) => "rdf-charmod-uris/test001" , -(18) => "rdf-charmod-uris/test002" , -(19) => "rdf-containers-syntax-vs-schema/test001" , -(20) => "rdf-containers-syntax-vs-schema/test002" , -(21) => "rdf-containers-syntax-vs-schema/test003" , -(22) => "rdf-containers-syntax-vs-schema/test004" , -(23) => "rdf-containers-syntax-vs-schema/test006" , -(24) => "rdf-containers-syntax-vs-schema/test007" , -(25) => "rdf-containers-syntax-vs-schema/test008" , -(26) => "rdf-ns-prefix-confusion/test0001" , -(27) => "rdf-ns-prefix-confusion/test0003" , -(28) => "rdf-ns-prefix-confusion/test0004" , -(29) => "rdf-ns-prefix-confusion/test0005" , -(30) => "rdf-ns-prefix-confusion/test0006" , -(31) => "rdf-ns-prefix-confusion/test0009" , -(32) => "rdf-ns-prefix-confusion/test0010" , -(33) => "rdf-ns-prefix-confusion/test0011" , -(34) => "rdf-ns-prefix-confusion/test0012" , -(35) => "rdf-ns-prefix-confusion/test0013" , -(36) => "rdf-ns-prefix-confusion/test0014" , -(37) => "rdfms-difference-between-ID-and-about/test1" , -// --- -//passed (38) => "rdfms-difference-between-ID-and-about/test2" , -// --- -(39) => "rdfms-difference-between-ID-and-about/test3" , -(40) => "rdfms-duplicate-member-props/test001" , -(41) => "rdfms-empty-property-elements/test001" , -(42) => "rdfms-empty-property-elements/test002" , -(43) => "rdfms-empty-property-elements/test003" , -(44) => "rdfms-empty-property-elements/test004" , -(45) => "rdfms-empty-property-elements/test005" , -(46) => "rdfms-empty-property-elements/test006" , -(47) => "rdfms-empty-property-elements/test007" , -(48) => "rdfms-empty-property-elements/test008" , -(49) => "rdfms-empty-property-elements/test009" , -(50) => "rdfms-empty-property-elements/test010" , -(51) => "rdfms-empty-property-elements/test011" , -(52) => "rdfms-empty-property-elements/test012" , -(53) => "rdfms-empty-property-elements/test013" , -(54) => "rdfms-empty-property-elements/test014" , -(55) => "rdfms-empty-property-elements/test015" , -(56) => "rdfms-empty-property-elements/test016" , -(57) => "rdfms-empty-property-elements/test017" , -(58) => "rdfms-identity-anon-resources/test001" , -(59) => "rdfms-identity-anon-resources/test002" , -(60) => "rdfms-identity-anon-resources/test003" , -(61) => "rdfms-identity-anon-resources/test004" , -(62) => "rdfms-identity-anon-resources/test005" , -(63) => "rdfms-not-id-and-resource-attr/test001" , -(64) => "rdfms-not-id-and-resource-attr/test002" , -(65) => "rdfms-not-id-and-resource-attr/test004" , -(66) => "rdfms-not-id-and-resource-attr/test005" , -(67) => "rdfms-para196/test001" , -(68) => "rdfms-rdf-names-use/test-001" , -(69) => "rdfms-rdf-names-use/test-002" , -(70) => "rdfms-rdf-names-use/test-003" , -(71) => "rdfms-rdf-names-use/test-004" , -(72) => "rdfms-rdf-names-use/test-005" , -(73) => "rdfms-rdf-names-use/test-006" , -(74) => "rdfms-rdf-names-use/test-007" , -(75) => "rdfms-rdf-names-use/test-008" , -(76) => "rdfms-rdf-names-use/test-009" , -(77) => "rdfms-rdf-names-use/test-010" , -(78) => "rdfms-rdf-names-use/test-011" , -(79) => "rdfms-rdf-names-use/test-012" , -(80) => "rdfms-rdf-names-use/test-013" , -(81) => "rdfms-rdf-names-use/test-014" , -(82) => "rdfms-rdf-names-use/test-015" , -(83) => "rdfms-rdf-names-use/test-016" , -(84) => "rdfms-rdf-names-use/test-017" , -(85) => "rdfms-rdf-names-use/test-018" , -(86) => "rdfms-rdf-names-use/test-019" , -(87) => "rdfms-rdf-names-use/test-020" , -(88) => "rdfms-rdf-names-use/test-021" , -(89) => "rdfms-rdf-names-use/test-022" , -(90) => "rdfms-rdf-names-use/test-023" , -(91) => "rdfms-rdf-names-use/test-024" , -(92) => "rdfms-rdf-names-use/test-025" , -(93) => "rdfms-rdf-names-use/test-026" , -(94) => "rdfms-rdf-names-use/test-027" , -(95) => "rdfms-rdf-names-use/test-028" , -(96) => "rdfms-rdf-names-use/test-029" , -(97) => "rdfms-rdf-names-use/test-030" , -(98) => "rdfms-rdf-names-use/test-031" , -(99) => "rdfms-rdf-names-use/test-032" , -(100) => "rdfms-rdf-names-use/test-033" , -(101) => "rdfms-rdf-names-use/test-034" , -(102) => "rdfms-rdf-names-use/test-035" , -(103) => "rdfms-rdf-names-use/test-036" , -(104) => "rdfms-rdf-names-use/test-037" , -(105) => "rdfms-rdf-names-use/warn-001" , -(106) => "rdfms-rdf-names-use/warn-002" , -(107) => "rdfms-rdf-names-use/warn-003" , -(108) => "rdfms-seq-representation/test001" , -// --- -//passed, equals() (109) => "rdfms-syntax-incomplete/test001" , -//passed, equals() (110) => "rdfms-syntax-incomplete/test002" , -//passed, equals() (111) => "rdfms-syntax-incomplete/test003" , -//passed, equals() (112) => "rdfms-syntax-incomplete/test004" , -(109) => "rdfms-syntax-incomplete/test001" , -(110) => "rdfms-syntax-incomplete/test002" , -(111) => "rdfms-syntax-incomplete/test003" , -(112) => "rdfms-syntax-incomplete/test004" , - -// --- -(113) => "xmlbase/test001" , -(114) => "xmlbase/test002" , -(115) => "xmlbase/test003" , -(116) => "xmlbase/test004" , -(117) => "xmlbase/test006" , -(118) => "xmlbase/test007" , -(119) => "xmlbase/test008" , -(120) => "xmlbase/test009" , -(121) => "xmlbase/test010" , -(122) => "xmlbase/test011" , -(123) => "xmlbase/test012" , -(124) => "xmlbase/test013" , -(125) => "xmlbase/test014" , -(126) => "rdfms-xml-literal-namespaces/test001" , -(127) => "rdfms-xml-literal-namespaces/test002" , -(128) => "rdfs-domain-and-range/test001" , -(129) => "rdfs-domain-and-range/test002" , -); - - - - -$_SESSION['rdf_negative_tests'] = array( -(1) => "rdfms-abouteach/error001" , -(2) => "rdfms-abouteach/error002" , -(3) => "rdfms-rdf-id/error001" , -(4) => "rdfms-rdf-id/error002" , -(5) => "rdfms-rdf-id/error003" , -(6) => "rdfms-rdf-id/error004" , -(7) => "rdfms-rdf-id/error005" , -(8) => "rdfms-rdf-id/error006" , -(9) => "rdfms-rdf-id/error007" , -(10) => "rdf-charmod-literals/error001" , -(11) => "rdf-charmod-literals/error002" , -(12) => "rdf-containers-syntax-vs-schema/error001" , -(13) => "rdf-containers-syntax-vs-schema/error002" , -(14) => "rdfms-difference-between-ID-and-about/error1" , -(15) => "rdfms-empty-property-elements/error001" , -(16) => "rdfms-empty-property-elements/error002" , -(17) => "rdfms-empty-property-elements/error003" , -(18) => "rdfms-rdf-names-use/error-001" , -(19) => "rdfms-rdf-names-use/error-002" , -(20) => "rdfms-rdf-names-use/error-003" , -(21) => "rdfms-rdf-names-use/error-004" , -(22) => "rdfms-rdf-names-use/error-005" , -(23) => "rdfms-rdf-names-use/error-006" , -(24) => "rdfms-rdf-names-use/error-007" , -(25) => "rdfms-rdf-names-use/error-008" , -(26) => "rdfms-rdf-names-use/error-009" , -(27) => "rdfms-rdf-names-use/error-010" , -(28) => "rdfms-rdf-names-use/error-011" , -(29) => "rdfms-rdf-names-use/error-012" , -(30) => "rdfms-rdf-names-use/error-013" , -(31) => "rdfms-rdf-names-use/error-014" , -(32) => "rdfms-rdf-names-use/error-015" , -(33) => "rdfms-rdf-names-use/error-016" , -(34) => "rdfms-rdf-names-use/error-017" , -(35) => "rdfms-rdf-names-use/error-018" , -(36) => "rdfms-rdf-names-use/error-019" , -(37) => "rdfms-rdf-names-use/error-020" , -(38) => "rdfms-syntax-incomplete/error001" , -(39) => "rdfms-syntax-incomplete/error002" , -(40) => "rdfms-syntax-incomplete/error003" , -(41) => "rdfms-syntax-incomplete/error004" , -(42) => "rdfms-syntax-incomplete/error005" , -(43) => "rdfms-syntax-incomplete/error006" , -); - - - - - -class testRDF_testCases extends UnitTestCase { - function testIsEquals() { - - foreach($_SESSION['rdf_positive_tests'] as $key =>$value){ - $model1=new MemModel(); - $model2=new MemModel(); - $file = $value; - $_SESSION['test']=&$value; - $_SESSION['key']=&$key; - $model1->load(TESTCASES_DIR .$file .".rdf"); - $_SESSION['mod1']=$model1; - $model2->load(TESTCASES_DIR .$file .".nt"); - $_SESSION['mod2']=$model2; - $this->assertTrue($model1->equals($model2)); - } - } - - /** - function testIsNotEquals() { - foreach($_SESSION['rdf_negative_tests'] as $key =>$value){ - $model1=new MemModel(); - $model2=new MemModel(); - $file = $value; - $_SESSION['test']=&$value; - $model1->load(TESTCASES_DIR .$file .".rdf"); - $_SESSION['mod1']=$model1; - $model2->load(TESTCASES_DIR .$file .".nt"); - $_SESSION['mod2']=$model2; - $this->assertTrue($model1->equals($model2)); - - } - } - */ - - -} - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/test_array.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/test_array.php.svn-base deleted file mode 100755 index 9750d6f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/.svn/text-base/test_array.php.svn-base +++ /dev/null @@ -1,200 +0,0 @@ - "amp-in-url/test001" , -(2) => "datatypes/test001" , -(3) => "datatypes/test002" , -(4) => "rdf-element-not-mandatory/test001" , -(5) => "rdfms-reification-required/test001" , -(6) => "rdfms-uri-substructure/test001" , -(7) => "rdfms-xmllang/test001" , -(8) => "rdfms-xmllang/test002" , -(9) => "rdfms-xmllang/test003" , -(10) => "rdfms-xmllang/test004" , -(11) => "rdfms-xmllang/test005" , -(12) => "rdfms-xmllang/test006" , -(13) => "unrecognised-xml-attributes/test001" , -(14) => "unrecognised-xml-attributes/test002" , -(15) => "xml-canon/test001" , -(16) => "rdf-charmod-literals/test001" , -(17) => "rdf-charmod-uris/test001" , -(18) => "rdf-charmod-uris/test002" , -(19) => "rdf-containers-syntax-vs-schema/test001" , -(20) => "rdf-containers-syntax-vs-schema/test002" , -(21) => "rdf-containers-syntax-vs-schema/test003" , -(22) => "rdf-containers-syntax-vs-schema/test004" , -(23) => "rdf-containers-syntax-vs-schema/test006" , -(24) => "rdf-containers-syntax-vs-schema/test007" , -(25) => "rdf-containers-syntax-vs-schema/test008" , -(26) => "rdf-ns-prefix-confusion/test0001" , -(27) => "rdf-ns-prefix-confusion/test0003" , -(28) => "rdf-ns-prefix-confusion/test0004" , -(29) => "rdf-ns-prefix-confusion/test0005" , -(30) => "rdf-ns-prefix-confusion/test0006" , -(31) => "rdf-ns-prefix-confusion/test0009" , -(32) => "rdf-ns-prefix-confusion/test0010" , -(33) => "rdf-ns-prefix-confusion/test0011" , -(34) => "rdf-ns-prefix-confusion/test0012" , -(35) => "rdf-ns-prefix-confusion/test0013" , -(36) => "rdf-ns-prefix-confusion/test0014" , -(37) => "rdfms-difference-between-ID-and-about/test1" , -// --- -//passed (38) => "rdfms-difference-between-ID-and-about/test2" , -// --- -(39) => "rdfms-difference-between-ID-and-about/test3" , -(40) => "rdfms-duplicate-member-props/test001" , -(41) => "rdfms-empty-property-elements/test001" , -(42) => "rdfms-empty-property-elements/test002" , -(43) => "rdfms-empty-property-elements/test003" , -(44) => "rdfms-empty-property-elements/test004" , -(45) => "rdfms-empty-property-elements/test005" , -(46) => "rdfms-empty-property-elements/test006" , -(47) => "rdfms-empty-property-elements/test007" , -(48) => "rdfms-empty-property-elements/test008" , -(49) => "rdfms-empty-property-elements/test009" , -(50) => "rdfms-empty-property-elements/test010" , -(51) => "rdfms-empty-property-elements/test011" , -(52) => "rdfms-empty-property-elements/test012" , -(53) => "rdfms-empty-property-elements/test013" , -(54) => "rdfms-empty-property-elements/test014" , -(55) => "rdfms-empty-property-elements/test015" , -(56) => "rdfms-empty-property-elements/test016" , -(57) => "rdfms-empty-property-elements/test017" , -(58) => "rdfms-identity-anon-resources/test001" , -(59) => "rdfms-identity-anon-resources/test002" , -(60) => "rdfms-identity-anon-resources/test003" , -(61) => "rdfms-identity-anon-resources/test004" , -(62) => "rdfms-identity-anon-resources/test005" , -(63) => "rdfms-not-id-and-resource-attr/test001" , -(64) => "rdfms-not-id-and-resource-attr/test002" , -(65) => "rdfms-not-id-and-resource-attr/test004" , -(66) => "rdfms-not-id-and-resource-attr/test005" , -(67) => "rdfms-para196/test001" , -(68) => "rdfms-rdf-names-use/test-001" , -(69) => "rdfms-rdf-names-use/test-002" , -(70) => "rdfms-rdf-names-use/test-003" , -(71) => "rdfms-rdf-names-use/test-004" , -(72) => "rdfms-rdf-names-use/test-005" , -(73) => "rdfms-rdf-names-use/test-006" , -(74) => "rdfms-rdf-names-use/test-007" , -(75) => "rdfms-rdf-names-use/test-008" , -(76) => "rdfms-rdf-names-use/test-009" , -(77) => "rdfms-rdf-names-use/test-010" , -(78) => "rdfms-rdf-names-use/test-011" , -(79) => "rdfms-rdf-names-use/test-012" , -(80) => "rdfms-rdf-names-use/test-013" , -(81) => "rdfms-rdf-names-use/test-014" , -(82) => "rdfms-rdf-names-use/test-015" , -(83) => "rdfms-rdf-names-use/test-016" , -(84) => "rdfms-rdf-names-use/test-017" , -(85) => "rdfms-rdf-names-use/test-018" , -(86) => "rdfms-rdf-names-use/test-019" , -(87) => "rdfms-rdf-names-use/test-020" , -(88) => "rdfms-rdf-names-use/test-021" , -(89) => "rdfms-rdf-names-use/test-022" , -(90) => "rdfms-rdf-names-use/test-023" , -(91) => "rdfms-rdf-names-use/test-024" , -(92) => "rdfms-rdf-names-use/test-025" , -(93) => "rdfms-rdf-names-use/test-026" , -(94) => "rdfms-rdf-names-use/test-027" , -(95) => "rdfms-rdf-names-use/test-028" , -(96) => "rdfms-rdf-names-use/test-029" , -(97) => "rdfms-rdf-names-use/test-030" , -(98) => "rdfms-rdf-names-use/test-031" , -(99) => "rdfms-rdf-names-use/test-032" , -(100) => "rdfms-rdf-names-use/test-033" , -(101) => "rdfms-rdf-names-use/test-034" , -(102) => "rdfms-rdf-names-use/test-035" , -(103) => "rdfms-rdf-names-use/test-036" , -(104) => "rdfms-rdf-names-use/test-037" , -(105) => "rdfms-rdf-names-use/warn-001" , -(106) => "rdfms-rdf-names-use/warn-002" , -(107) => "rdfms-rdf-names-use/warn-003" , -(108) => "rdfms-seq-representation/test001" , -// --- -//passed, equals() (109) => "rdfms-syntax-incomplete/test001" , -//passed, equals() (110) => "rdfms-syntax-incomplete/test002" , -//passed, equals() (111) => "rdfms-syntax-incomplete/test003" , -//passed, equals() (112) => "rdfms-syntax-incomplete/test004" , -(109) => "rdfms-syntax-incomplete/test001" , -(110) => "rdfms-syntax-incomplete/test002" , -(111) => "rdfms-syntax-incomplete/test003" , -(112) => "rdfms-syntax-incomplete/test004" , - -// --- -(113) => "xmlbase/test001" , -(114) => "xmlbase/test002" , -(115) => "xmlbase/test003" , -(116) => "xmlbase/test004" , -(117) => "xmlbase/test006" , -(118) => "xmlbase/test007" , -(119) => "xmlbase/test008" , -(120) => "xmlbase/test009" , -(121) => "xmlbase/test010" , -(122) => "xmlbase/test011" , -(123) => "xmlbase/test012" , -(124) => "xmlbase/test013" , -(125) => "xmlbase/test014" , -(126) => "rdfms-xml-literal-namespaces/test001" , -(127) => "rdfms-xml-literal-namespaces/test002" , -(128) => "rdfs-domain-and-range/test001" , -(129) => "rdfs-domain-and-range/test002" , - -); - -$rdf_negative_tests = array( -(1) => "rdfms-abouteach/error001" , -(2) => "rdfms-abouteach/error002" , -(3) => "rdfms-rdf-id/error001" , -(4) => "rdfms-rdf-id/error002" , -(5) => "rdfms-rdf-id/error003" , -(6) => "rdfms-rdf-id/error004" , -(7) => "rdfms-rdf-id/error005" , -(8) => "rdfms-rdf-id/error006" , -(9) => "rdfms-rdf-id/error007" , -(10) => "rdf-charmod-literals/error001" , -(11) => "rdf-charmod-literals/error002" , -(12) => "rdf-containers-syntax-vs-schema/error001" , -(13) => "rdf-containers-syntax-vs-schema/error002" , -(14) => "rdfms-difference-between-ID-and-about/error1" , -(15) => "rdfms-empty-property-elements/error001" , -(16) => "rdfms-empty-property-elements/error002" , -(17) => "rdfms-empty-property-elements/error003" , -(18) => "rdfms-rdf-names-use/error-001" , -(19) => "rdfms-rdf-names-use/error-002" , -(20) => "rdfms-rdf-names-use/error-003" , -(21) => "rdfms-rdf-names-use/error-004" , -(22) => "rdfms-rdf-names-use/error-005" , -(23) => "rdfms-rdf-names-use/error-006" , -(24) => "rdfms-rdf-names-use/error-007" , -(25) => "rdfms-rdf-names-use/error-008" , -(26) => "rdfms-rdf-names-use/error-009" , -(27) => "rdfms-rdf-names-use/error-010" , -(28) => "rdfms-rdf-names-use/error-011" , -(29) => "rdfms-rdf-names-use/error-012" , -(30) => "rdfms-rdf-names-use/error-013" , -(31) => "rdfms-rdf-names-use/error-014" , -(32) => "rdfms-rdf-names-use/error-015" , -(33) => "rdfms-rdf-names-use/error-016" , -(34) => "rdfms-rdf-names-use/error-017" , -(35) => "rdfms-rdf-names-use/error-018" , -(36) => "rdfms-rdf-names-use/error-019" , -(37) => "rdfms-rdf-names-use/error-020" , -(38) => "rdfms-syntax-incomplete/error001" , -(39) => "rdfms-syntax-incomplete/error002" , -(40) => "rdfms-syntax-incomplete/error003" , -(41) => "rdfms-syntax-incomplete/error004" , -(42) => "rdfms-syntax-incomplete/error005" , -(43) => "rdfms-syntax-incomplete/error006" , -); - -/* -echo "fixed: " .(count($passed_positive) - count($passed_positive_original)) .",
        "; -echo "still to be fixed: " .(129 - count($passed_positive)); -echo "
        passed positive: " .count($passed_positive)/129*100 ." %"; -*/ -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/Readme.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/Readme.txt deleted file mode 100755 index dd25f3c3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/Readme.txt +++ /dev/null @@ -1,5 +0,0 @@ - -In order to run the tests, you have to copy the W3C RDF test cases to a subdirectory -called RdfTestCases. - -Chris, 20/8/2004 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/rdf_test_cases.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/rdf_test_cases.php deleted file mode 100755 index cff8898e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/rdf_test_cases.php +++ /dev/null @@ -1,257 +0,0 @@ - - * - * @package unittests - * @access public - */ - -//define("TESTCASES_DIR", "http://www.w3.org/2000/10/rdf-tests/rdfcore/"); -define("TESTCASES_DIR", "http://localhost/rdfapi-php/test/unit/rdf/RDFtestCases/"); - - - -$_SESSION['rdf_positive_tests'] = array( - -(1) => "amp-in-url/test001" , -(2) => "datatypes/test001" , -(3) => "datatypes/test002" , -(4) => "rdf-element-not-mandatory/test001" , -(5) => "rdfms-reification-required/test001" , -(6) => "rdfms-uri-substructure/test001" , -(7) => "rdfms-xmllang/test001" , -(8) => "rdfms-xmllang/test002" , -(9) => "rdfms-xmllang/test003" , -(10) => "rdfms-xmllang/test004" , -(11) => "rdfms-xmllang/test005" , -(12) => "rdfms-xmllang/test006" , -(13) => "unrecognised-xml-attributes/test001" , -(14) => "unrecognised-xml-attributes/test002" , -(15) => "xml-canon/test001" , -(16) => "rdf-charmod-literals/test001" , -(17) => "rdf-charmod-uris/test001" , -(18) => "rdf-charmod-uris/test002" , -(19) => "rdf-containers-syntax-vs-schema/test001" , -(20) => "rdf-containers-syntax-vs-schema/test002" , -(21) => "rdf-containers-syntax-vs-schema/test003" , -(22) => "rdf-containers-syntax-vs-schema/test004" , -(23) => "rdf-containers-syntax-vs-schema/test006" , -(24) => "rdf-containers-syntax-vs-schema/test007" , -(25) => "rdf-containers-syntax-vs-schema/test008" , -(26) => "rdf-ns-prefix-confusion/test0001" , -(27) => "rdf-ns-prefix-confusion/test0003" , -(28) => "rdf-ns-prefix-confusion/test0004" , -(29) => "rdf-ns-prefix-confusion/test0005" , -(30) => "rdf-ns-prefix-confusion/test0006" , -(31) => "rdf-ns-prefix-confusion/test0009" , -(32) => "rdf-ns-prefix-confusion/test0010" , -(33) => "rdf-ns-prefix-confusion/test0011" , -(34) => "rdf-ns-prefix-confusion/test0012" , -(35) => "rdf-ns-prefix-confusion/test0013" , -(36) => "rdf-ns-prefix-confusion/test0014" , -(37) => "rdfms-difference-between-ID-and-about/test1" , -// --- -//passed (38) => "rdfms-difference-between-ID-and-about/test2" , -// --- -(39) => "rdfms-difference-between-ID-and-about/test3" , -(40) => "rdfms-duplicate-member-props/test001" , -(41) => "rdfms-empty-property-elements/test001" , -(42) => "rdfms-empty-property-elements/test002" , -(43) => "rdfms-empty-property-elements/test003" , -(44) => "rdfms-empty-property-elements/test004" , -(45) => "rdfms-empty-property-elements/test005" , -(46) => "rdfms-empty-property-elements/test006" , -(47) => "rdfms-empty-property-elements/test007" , -(48) => "rdfms-empty-property-elements/test008" , -(49) => "rdfms-empty-property-elements/test009" , -(50) => "rdfms-empty-property-elements/test010" , -(51) => "rdfms-empty-property-elements/test011" , -(52) => "rdfms-empty-property-elements/test012" , -(53) => "rdfms-empty-property-elements/test013" , -(54) => "rdfms-empty-property-elements/test014" , -(55) => "rdfms-empty-property-elements/test015" , -(56) => "rdfms-empty-property-elements/test016" , -(57) => "rdfms-empty-property-elements/test017" , -(58) => "rdfms-identity-anon-resources/test001" , -(59) => "rdfms-identity-anon-resources/test002" , -(60) => "rdfms-identity-anon-resources/test003" , -(61) => "rdfms-identity-anon-resources/test004" , -(62) => "rdfms-identity-anon-resources/test005" , -(63) => "rdfms-not-id-and-resource-attr/test001" , -(64) => "rdfms-not-id-and-resource-attr/test002" , -(65) => "rdfms-not-id-and-resource-attr/test004" , -(66) => "rdfms-not-id-and-resource-attr/test005" , -(67) => "rdfms-para196/test001" , -(68) => "rdfms-rdf-names-use/test-001" , -(69) => "rdfms-rdf-names-use/test-002" , -(70) => "rdfms-rdf-names-use/test-003" , -(71) => "rdfms-rdf-names-use/test-004" , -(72) => "rdfms-rdf-names-use/test-005" , -(73) => "rdfms-rdf-names-use/test-006" , -(74) => "rdfms-rdf-names-use/test-007" , -(75) => "rdfms-rdf-names-use/test-008" , -(76) => "rdfms-rdf-names-use/test-009" , -(77) => "rdfms-rdf-names-use/test-010" , -(78) => "rdfms-rdf-names-use/test-011" , -(79) => "rdfms-rdf-names-use/test-012" , -(80) => "rdfms-rdf-names-use/test-013" , -(81) => "rdfms-rdf-names-use/test-014" , -(82) => "rdfms-rdf-names-use/test-015" , -(83) => "rdfms-rdf-names-use/test-016" , -(84) => "rdfms-rdf-names-use/test-017" , -(85) => "rdfms-rdf-names-use/test-018" , -(86) => "rdfms-rdf-names-use/test-019" , -(87) => "rdfms-rdf-names-use/test-020" , -(88) => "rdfms-rdf-names-use/test-021" , -(89) => "rdfms-rdf-names-use/test-022" , -(90) => "rdfms-rdf-names-use/test-023" , -(91) => "rdfms-rdf-names-use/test-024" , -(92) => "rdfms-rdf-names-use/test-025" , -(93) => "rdfms-rdf-names-use/test-026" , -(94) => "rdfms-rdf-names-use/test-027" , -(95) => "rdfms-rdf-names-use/test-028" , -(96) => "rdfms-rdf-names-use/test-029" , -(97) => "rdfms-rdf-names-use/test-030" , -(98) => "rdfms-rdf-names-use/test-031" , -(99) => "rdfms-rdf-names-use/test-032" , -(100) => "rdfms-rdf-names-use/test-033" , -(101) => "rdfms-rdf-names-use/test-034" , -(102) => "rdfms-rdf-names-use/test-035" , -(103) => "rdfms-rdf-names-use/test-036" , -(104) => "rdfms-rdf-names-use/test-037" , -(105) => "rdfms-rdf-names-use/warn-001" , -(106) => "rdfms-rdf-names-use/warn-002" , -(107) => "rdfms-rdf-names-use/warn-003" , -(108) => "rdfms-seq-representation/test001" , -// --- -//passed, equals() (109) => "rdfms-syntax-incomplete/test001" , -//passed, equals() (110) => "rdfms-syntax-incomplete/test002" , -//passed, equals() (111) => "rdfms-syntax-incomplete/test003" , -//passed, equals() (112) => "rdfms-syntax-incomplete/test004" , -(109) => "rdfms-syntax-incomplete/test001" , -(110) => "rdfms-syntax-incomplete/test002" , -(111) => "rdfms-syntax-incomplete/test003" , -(112) => "rdfms-syntax-incomplete/test004" , - -// --- -(113) => "xmlbase/test001" , -(114) => "xmlbase/test002" , -(115) => "xmlbase/test003" , -(116) => "xmlbase/test004" , -(117) => "xmlbase/test006" , -(118) => "xmlbase/test007" , -(119) => "xmlbase/test008" , -(120) => "xmlbase/test009" , -(121) => "xmlbase/test010" , -(122) => "xmlbase/test011" , -(123) => "xmlbase/test012" , -(124) => "xmlbase/test013" , -(125) => "xmlbase/test014" , -(126) => "rdfms-xml-literal-namespaces/test001" , -(127) => "rdfms-xml-literal-namespaces/test002" , -(128) => "rdfs-domain-and-range/test001" , -(129) => "rdfs-domain-and-range/test002" , -); - - - - -$_SESSION['rdf_negative_tests'] = array( -(1) => "rdfms-abouteach/error001" , -(2) => "rdfms-abouteach/error002" , -(3) => "rdfms-rdf-id/error001" , -(4) => "rdfms-rdf-id/error002" , -(5) => "rdfms-rdf-id/error003" , -(6) => "rdfms-rdf-id/error004" , -(7) => "rdfms-rdf-id/error005" , -(8) => "rdfms-rdf-id/error006" , -(9) => "rdfms-rdf-id/error007" , -(10) => "rdf-charmod-literals/error001" , -(11) => "rdf-charmod-literals/error002" , -(12) => "rdf-containers-syntax-vs-schema/error001" , -(13) => "rdf-containers-syntax-vs-schema/error002" , -(14) => "rdfms-difference-between-ID-and-about/error1" , -(15) => "rdfms-empty-property-elements/error001" , -(16) => "rdfms-empty-property-elements/error002" , -(17) => "rdfms-empty-property-elements/error003" , -(18) => "rdfms-rdf-names-use/error-001" , -(19) => "rdfms-rdf-names-use/error-002" , -(20) => "rdfms-rdf-names-use/error-003" , -(21) => "rdfms-rdf-names-use/error-004" , -(22) => "rdfms-rdf-names-use/error-005" , -(23) => "rdfms-rdf-names-use/error-006" , -(24) => "rdfms-rdf-names-use/error-007" , -(25) => "rdfms-rdf-names-use/error-008" , -(26) => "rdfms-rdf-names-use/error-009" , -(27) => "rdfms-rdf-names-use/error-010" , -(28) => "rdfms-rdf-names-use/error-011" , -(29) => "rdfms-rdf-names-use/error-012" , -(30) => "rdfms-rdf-names-use/error-013" , -(31) => "rdfms-rdf-names-use/error-014" , -(32) => "rdfms-rdf-names-use/error-015" , -(33) => "rdfms-rdf-names-use/error-016" , -(34) => "rdfms-rdf-names-use/error-017" , -(35) => "rdfms-rdf-names-use/error-018" , -(36) => "rdfms-rdf-names-use/error-019" , -(37) => "rdfms-rdf-names-use/error-020" , -(38) => "rdfms-syntax-incomplete/error001" , -(39) => "rdfms-syntax-incomplete/error002" , -(40) => "rdfms-syntax-incomplete/error003" , -(41) => "rdfms-syntax-incomplete/error004" , -(42) => "rdfms-syntax-incomplete/error005" , -(43) => "rdfms-syntax-incomplete/error006" , -); - - - - - -class testRDF_testCases extends UnitTestCase { - function testIsEquals() { - - foreach($_SESSION['rdf_positive_tests'] as $key =>$value){ - $model1=new MemModel(); - $model2=new MemModel(); - $file = $value; - $_SESSION['test']=&$value; - $_SESSION['key']=&$key; - $model1->load(TESTCASES_DIR .$file .".rdf"); - $_SESSION['mod1']=$model1; - $model2->load(TESTCASES_DIR .$file .".nt"); - $_SESSION['mod2']=$model2; - $this->assertTrue($model1->equals($model2)); - } - } - - /** - function testIsNotEquals() { - foreach($_SESSION['rdf_negative_tests'] as $key =>$value){ - $model1=new MemModel(); - $model2=new MemModel(); - $file = $value; - $_SESSION['test']=&$value; - $model1->load(TESTCASES_DIR .$file .".rdf"); - $_SESSION['mod1']=$model1; - $model2->load(TESTCASES_DIR .$file .".nt"); - $_SESSION['mod2']=$model2; - $this->assertTrue($model1->equals($model2)); - - } - } - */ - - -} - - - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/test_array.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/test_array.php deleted file mode 100755 index d46dc93b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/RDF/test_array.php +++ /dev/null @@ -1,200 +0,0 @@ - "amp-in-url/test001" , -(2) => "datatypes/test001" , -(3) => "datatypes/test002" , -(4) => "rdf-element-not-mandatory/test001" , -(5) => "rdfms-reification-required/test001" , -(6) => "rdfms-uri-substructure/test001" , -(7) => "rdfms-xmllang/test001" , -(8) => "rdfms-xmllang/test002" , -(9) => "rdfms-xmllang/test003" , -(10) => "rdfms-xmllang/test004" , -(11) => "rdfms-xmllang/test005" , -(12) => "rdfms-xmllang/test006" , -(13) => "unrecognised-xml-attributes/test001" , -(14) => "unrecognised-xml-attributes/test002" , -(15) => "xml-canon/test001" , -(16) => "rdf-charmod-literals/test001" , -(17) => "rdf-charmod-uris/test001" , -(18) => "rdf-charmod-uris/test002" , -(19) => "rdf-containers-syntax-vs-schema/test001" , -(20) => "rdf-containers-syntax-vs-schema/test002" , -(21) => "rdf-containers-syntax-vs-schema/test003" , -(22) => "rdf-containers-syntax-vs-schema/test004" , -(23) => "rdf-containers-syntax-vs-schema/test006" , -(24) => "rdf-containers-syntax-vs-schema/test007" , -(25) => "rdf-containers-syntax-vs-schema/test008" , -(26) => "rdf-ns-prefix-confusion/test0001" , -(27) => "rdf-ns-prefix-confusion/test0003" , -(28) => "rdf-ns-prefix-confusion/test0004" , -(29) => "rdf-ns-prefix-confusion/test0005" , -(30) => "rdf-ns-prefix-confusion/test0006" , -(31) => "rdf-ns-prefix-confusion/test0009" , -(32) => "rdf-ns-prefix-confusion/test0010" , -(33) => "rdf-ns-prefix-confusion/test0011" , -(34) => "rdf-ns-prefix-confusion/test0012" , -(35) => "rdf-ns-prefix-confusion/test0013" , -(36) => "rdf-ns-prefix-confusion/test0014" , -(37) => "rdfms-difference-between-ID-and-about/test1" , -// --- -//passed (38) => "rdfms-difference-between-ID-and-about/test2" , -// --- -(39) => "rdfms-difference-between-ID-and-about/test3" , -(40) => "rdfms-duplicate-member-props/test001" , -(41) => "rdfms-empty-property-elements/test001" , -(42) => "rdfms-empty-property-elements/test002" , -(43) => "rdfms-empty-property-elements/test003" , -(44) => "rdfms-empty-property-elements/test004" , -(45) => "rdfms-empty-property-elements/test005" , -(46) => "rdfms-empty-property-elements/test006" , -(47) => "rdfms-empty-property-elements/test007" , -(48) => "rdfms-empty-property-elements/test008" , -(49) => "rdfms-empty-property-elements/test009" , -(50) => "rdfms-empty-property-elements/test010" , -(51) => "rdfms-empty-property-elements/test011" , -(52) => "rdfms-empty-property-elements/test012" , -(53) => "rdfms-empty-property-elements/test013" , -(54) => "rdfms-empty-property-elements/test014" , -(55) => "rdfms-empty-property-elements/test015" , -(56) => "rdfms-empty-property-elements/test016" , -(57) => "rdfms-empty-property-elements/test017" , -(58) => "rdfms-identity-anon-resources/test001" , -(59) => "rdfms-identity-anon-resources/test002" , -(60) => "rdfms-identity-anon-resources/test003" , -(61) => "rdfms-identity-anon-resources/test004" , -(62) => "rdfms-identity-anon-resources/test005" , -(63) => "rdfms-not-id-and-resource-attr/test001" , -(64) => "rdfms-not-id-and-resource-attr/test002" , -(65) => "rdfms-not-id-and-resource-attr/test004" , -(66) => "rdfms-not-id-and-resource-attr/test005" , -(67) => "rdfms-para196/test001" , -(68) => "rdfms-rdf-names-use/test-001" , -(69) => "rdfms-rdf-names-use/test-002" , -(70) => "rdfms-rdf-names-use/test-003" , -(71) => "rdfms-rdf-names-use/test-004" , -(72) => "rdfms-rdf-names-use/test-005" , -(73) => "rdfms-rdf-names-use/test-006" , -(74) => "rdfms-rdf-names-use/test-007" , -(75) => "rdfms-rdf-names-use/test-008" , -(76) => "rdfms-rdf-names-use/test-009" , -(77) => "rdfms-rdf-names-use/test-010" , -(78) => "rdfms-rdf-names-use/test-011" , -(79) => "rdfms-rdf-names-use/test-012" , -(80) => "rdfms-rdf-names-use/test-013" , -(81) => "rdfms-rdf-names-use/test-014" , -(82) => "rdfms-rdf-names-use/test-015" , -(83) => "rdfms-rdf-names-use/test-016" , -(84) => "rdfms-rdf-names-use/test-017" , -(85) => "rdfms-rdf-names-use/test-018" , -(86) => "rdfms-rdf-names-use/test-019" , -(87) => "rdfms-rdf-names-use/test-020" , -(88) => "rdfms-rdf-names-use/test-021" , -(89) => "rdfms-rdf-names-use/test-022" , -(90) => "rdfms-rdf-names-use/test-023" , -(91) => "rdfms-rdf-names-use/test-024" , -(92) => "rdfms-rdf-names-use/test-025" , -(93) => "rdfms-rdf-names-use/test-026" , -(94) => "rdfms-rdf-names-use/test-027" , -(95) => "rdfms-rdf-names-use/test-028" , -(96) => "rdfms-rdf-names-use/test-029" , -(97) => "rdfms-rdf-names-use/test-030" , -(98) => "rdfms-rdf-names-use/test-031" , -(99) => "rdfms-rdf-names-use/test-032" , -(100) => "rdfms-rdf-names-use/test-033" , -(101) => "rdfms-rdf-names-use/test-034" , -(102) => "rdfms-rdf-names-use/test-035" , -(103) => "rdfms-rdf-names-use/test-036" , -(104) => "rdfms-rdf-names-use/test-037" , -(105) => "rdfms-rdf-names-use/warn-001" , -(106) => "rdfms-rdf-names-use/warn-002" , -(107) => "rdfms-rdf-names-use/warn-003" , -(108) => "rdfms-seq-representation/test001" , -// --- -//passed, equals() (109) => "rdfms-syntax-incomplete/test001" , -//passed, equals() (110) => "rdfms-syntax-incomplete/test002" , -//passed, equals() (111) => "rdfms-syntax-incomplete/test003" , -//passed, equals() (112) => "rdfms-syntax-incomplete/test004" , -(109) => "rdfms-syntax-incomplete/test001" , -(110) => "rdfms-syntax-incomplete/test002" , -(111) => "rdfms-syntax-incomplete/test003" , -(112) => "rdfms-syntax-incomplete/test004" , - -// --- -(113) => "xmlbase/test001" , -(114) => "xmlbase/test002" , -(115) => "xmlbase/test003" , -(116) => "xmlbase/test004" , -(117) => "xmlbase/test006" , -(118) => "xmlbase/test007" , -(119) => "xmlbase/test008" , -(120) => "xmlbase/test009" , -(121) => "xmlbase/test010" , -(122) => "xmlbase/test011" , -(123) => "xmlbase/test012" , -(124) => "xmlbase/test013" , -(125) => "xmlbase/test014" , -(126) => "rdfms-xml-literal-namespaces/test001" , -(127) => "rdfms-xml-literal-namespaces/test002" , -(128) => "rdfs-domain-and-range/test001" , -(129) => "rdfs-domain-and-range/test002" , - -); - -$rdf_negative_tests = array( -(1) => "rdfms-abouteach/error001" , -(2) => "rdfms-abouteach/error002" , -(3) => "rdfms-rdf-id/error001" , -(4) => "rdfms-rdf-id/error002" , -(5) => "rdfms-rdf-id/error003" , -(6) => "rdfms-rdf-id/error004" , -(7) => "rdfms-rdf-id/error005" , -(8) => "rdfms-rdf-id/error006" , -(9) => "rdfms-rdf-id/error007" , -(10) => "rdf-charmod-literals/error001" , -(11) => "rdf-charmod-literals/error002" , -(12) => "rdf-containers-syntax-vs-schema/error001" , -(13) => "rdf-containers-syntax-vs-schema/error002" , -(14) => "rdfms-difference-between-ID-and-about/error1" , -(15) => "rdfms-empty-property-elements/error001" , -(16) => "rdfms-empty-property-elements/error002" , -(17) => "rdfms-empty-property-elements/error003" , -(18) => "rdfms-rdf-names-use/error-001" , -(19) => "rdfms-rdf-names-use/error-002" , -(20) => "rdfms-rdf-names-use/error-003" , -(21) => "rdfms-rdf-names-use/error-004" , -(22) => "rdfms-rdf-names-use/error-005" , -(23) => "rdfms-rdf-names-use/error-006" , -(24) => "rdfms-rdf-names-use/error-007" , -(25) => "rdfms-rdf-names-use/error-008" , -(26) => "rdfms-rdf-names-use/error-009" , -(27) => "rdfms-rdf-names-use/error-010" , -(28) => "rdfms-rdf-names-use/error-011" , -(29) => "rdfms-rdf-names-use/error-012" , -(30) => "rdfms-rdf-names-use/error-013" , -(31) => "rdfms-rdf-names-use/error-014" , -(32) => "rdfms-rdf-names-use/error-015" , -(33) => "rdfms-rdf-names-use/error-016" , -(34) => "rdfms-rdf-names-use/error-017" , -(35) => "rdfms-rdf-names-use/error-018" , -(36) => "rdfms-rdf-names-use/error-019" , -(37) => "rdfms-rdf-names-use/error-020" , -(38) => "rdfms-syntax-incomplete/error001" , -(39) => "rdfms-syntax-incomplete/error002" , -(40) => "rdfms-syntax-incomplete/error003" , -(41) => "rdfms-syntax-incomplete/error004" , -(42) => "rdfms-syntax-incomplete/error005" , -(43) => "rdfms-syntax-incomplete/error006" , -); - -/* -echo "fixed: " .(count($passed_positive) - count($passed_positive_original)) .",
        "; -echo "still to be fixed: " .(129 - count($passed_positive)); -echo "
        passed positive: " .count($passed_positive)/129*100 ." %"; -*/ -?> - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/README.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/README.txt deleted file mode 100755 index 8db935af..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/README.txt +++ /dev/null @@ -1,38 +0,0 @@ - ----------------------------------------------------------- -Using the RAP Unit Tests ----------------------------------------------------------- - -This package contains unit test for testing the RAP classes. -The test use the "Simple Test" testing framework, which is -similar to JUnit. - -For running the tests you have to - -1. Install the "Simple Test" testing framework - into the document root of your web server. - Simple test can be downloaded from: - http://sourceforge.net/projects/simpletest/ - -2. Copy the simpletest folder to the right location so that - your directory layout is the following: - /some/root/path/ - rdfapi-php/ - api/ - doc/ - netapi/ - test/ - tools/ - simpletest/ - simpletest.php - -3. Make sure that "simple Test" and RAP is included correctly in - allTest.php and in - showPasses.php - -4. To run the tests execute allTest.php - -In allTest.php you can also comment out all tests that you do not want to execute. - -To run single test files, use runAnyTest.php: - php runAnyTest.php Syntax/n3Parser_test.php diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/all-wcprops deleted file mode 100755 index e75aadad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/ResModel -END -ResModel_Property_tests.php -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/320/trunk/rdfapi-php/test/unit/ResModel/ResModel_Property_tests.php -END -ResModel_BasicOperations_tests.php -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/ResModel/ResModel_BasicOperations_tests.php -END -ResModel_search_tests.php -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/321/trunk/rdfapi-php/test/unit/ResModel/ResModel_search_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/entries deleted file mode 100755 index 1b7b3c16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/entries +++ /dev/null @@ -1,67 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/ResModel -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2006-11-21T09:58:11.000000Z -321 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ResModel_Property_tests.php -file - - - - -2008-02-29T14:57:25.824864Z -3084aa5abc326aa34c5b9cc89eab1ca6 -2006-11-21T09:38:51.000000Z -320 -tgauss -has-props - -ResModel_BasicOperations_tests.php -file - - - - -2008-02-29T14:57:25.840484Z -3c94a55c05792e8acdfe6601dba6fc57 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -ResModel_search_tests.php -file - - - - -2008-02-29T14:57:25.840484Z -5324a8cb0f7b405b61c400e80c3061b6 -2006-11-21T09:58:11.000000Z -321 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_BasicOperations_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_Property_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_Property_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_Property_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_search_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/prop-base/ResModel_search_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_BasicOperations_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_BasicOperations_tests.php.svn-base deleted file mode 100755 index ec8afebf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_BasicOperations_tests.php.svn-base +++ /dev/null @@ -1,142 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testResModel_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given ResStatement belongs to - * the model. - */ - function testContains(){ - $_SESSION['test']='ResModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),new ResResource('http://www.example.org/obj2')); - $this->assertTrue($resmodel->contains($statTest)); - } - } - - /** - * tests if contains returns true if the given statement belongs to the model - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='ResModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new ResLiteral('http://www.example.org/obj2','DE'); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),$lit); - $this->assertTrue($resmodel->contains($statTest)); - } - } - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='ResModel contains literal false test/ wrong language'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new ResLiteral('http://www.example.org/obj2','EN'); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),$lit); - $this->assertFalse($resmodel->contains($statTest)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='ResModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/subX'),new ResResource('http://www.example.org/pred2'),new ResResource('http://www.example.org/obj2')); - $this->assertFalse($resmodel->contains($statTest)); - } - } - - function testContainerIsSeq() { - $model = ModelFactory::getResModel(MEMMODEL); - $seq = $model->createSeq('http://example.org/my_seq'); - $this->assertTrue($seq->isSeq()); - } - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9,'DE'); - - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_Property_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_Property_tests.php.svn-base deleted file mode 100755 index 6f45d41f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_Property_tests.php.svn-base +++ /dev/null @@ -1,132 +0,0 @@ - - * - * @package unittests - * @access public - */ - - - class testResModel_Property_tests extends UnitTestCase { - - /** - * tests getProperty() - */ - function testGetProptertyTest(){ - $_SESSION['test']='ResModel getProperty test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - - $stat=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Literal('Object')); - $model1->add($stat); - - $resmodel=new ResModel($model1); - $subject=new ResResource('http://www.example.org/needle'); - $property=new ResResource('http://www.example.org/pred'); - - $res=$resmodel->getProperty($subject,$property); - $this->assertEqual('Triple(Resource("http://www.example.org/needle"), Resource("http://www.example.org/pred"), Literal("Object"))',$res->toString()); - $model1->close(); - } - - /** - * tests createProperty() and createResource - */ - function testCreateProptertyCreateResourceTest(){ - $_SESSION['test']='ResModel createProperty createResource test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - $resmodel=new ResModel($model1); - $resresource=$resmodel->createResource('http://www.example.org/testresource'); - $prop=$resmodel->createProperty('http://www.example.org/pred'); - $resresource->addProperty($prop,new ResLiteral('Object')); - $subject=new ResResource('http://www.example.org/testresource'); - $property=new ResResource('http://www.example.org/pred'); - $res=$resmodel->getProperty($subject,$property); - $this->assertEqual('Triple(Resource("http://www.example.org/testresource"), Resource("http://www.example.org/pred"), Literal("Object"))',$res->toString()); - $model1->close(); - } - - /** - * tests listSubjectsWithProperty() - */ - function testlistSubjectsWithPropertyTest(){ - $_SESSION['test']='ResModel listSubjectsWithProperty test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - $resmodel=new ResModel($model1); - $resresource=$resmodel->createResource('http://www.example.org/testresource'); - $prop=$resmodel->createProperty('http://www.example.org/pred'); - $resresource->addProperty($prop,new ResLiteral('Object')); - $property=new ResResource('http://www.example.org/pred'); - - $res=$resmodel->listSubjectsWithProperty($property); - - $this->assertEqual(1,count($res)); - - $model1->close(); - } - - /** - * tests _resNode2Node() - */ - function test_resNode2NodeTest(){ - $_SESSION['test']='ResModel _resNode2Node test'; - $model1=new MemModel(); - $resmodel=new ResModel($model1); - $resLit=new ResLiteral('Literal','DE'); - $resLit->setDatatype('type'); - $result=$resmodel->_resNode2Node($resLit); - $this->assertIsA($result, 'Literal'); - $this->assertEqual($result->getLanguage(),'DE'); - $this->assertEqual($result->getDatatype(),'type'); - $model1->close(); - } - - /** - * tests _node2ResNode() - */ - function test_node2ResNodeTest(){ - $_SESSION['test']='ResModel _node2ResNode test'; - $model1=new MemModel(); - $resmodel=new ResModel($model1); - $literal=new Literal('Literal','DE'); - $literal->setDatatype('type'); - $result=$resmodel->_node2ResNode($literal); - $this->assertIsA($result, 'ResLiteral'); - $this->assertEqual($result->getLanguage(),'DE'); - $this->assertEqual($result->getDatatype(),'type'); - $model1->close(); - } - - - - - - - - - - - - - } - - - - - - - - - ?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_search_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_search_tests.php.svn-base deleted file mode 100755 index 1094de03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/.svn/text-base/ResModel_search_tests.php.svn-base +++ /dev/null @@ -1,305 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testResmodel_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='Resmodel search test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - - $resSub=new ResResource('http://www.example.org/needle'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find($resSub,$resPred,$resObj)); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in ResModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject6'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find($resSub,null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find(null,$resPred,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find(null,null,$resObj)); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in ResModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject3'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->find($resSub,null,null); - $this->assertNotEqual(0,count($res)); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in ResModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $resSub=new ResResource('http://www.example.org/SubX'); - $resPred=new ResResource('http://www.example.org/predX'); - $resObj=new ResResource('http://www.example.org/obX'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->find($resSub,null,null); - $this->assertEqual(0,count($res)); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in ResModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject0'); - $resPred=new ResResource('http://www.example.org/Predicate0'); - $resObj=new ResResource('http://www.example.org/Object0'); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->findFirstMatchingStatement($resSub,null,null); - $sub=$res->getSubject(); - $this->assertEqual($sub->uri,'http://www.example.org/Subject0'); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject0'); - $resPred=new ResResource('http://www.example.org/Predicate0'); - $resObj=new ResResource('http://www.example.org/Object0'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]->getSubject(); - $sub=$res->getSubject(); - $this->assertEqual($sub->uri,$should->getLabel()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_BasicOperations_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_BasicOperations_tests.php deleted file mode 100755 index bec062b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_BasicOperations_tests.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testResModel_basicOperations_tests extends UnitTestCase { - - /** - * tests if contains returns true if the given ResStatement belongs to - * the model. - */ - function testContains(){ - $_SESSION['test']='ResModel contains test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),new ResResource('http://www.example.org/obj2')); - $this->assertTrue($resmodel->contains($statTest)); - } - } - - /** - * tests if contains returns true if the given statement belongs to the model - * using all kinds of indices. - */ - function testContainsLiteral(){ - $_SESSION['test']='ResModel contains literal test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new ResLiteral('http://www.example.org/obj2','DE'); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),$lit); - $this->assertTrue($resmodel->contains($statTest)); - } - } - - - /** - * tests if contains returns false if the Literal in the given statement has wrong datatype - * using all kinds of indices. - */ - function testContainsLiteralFalse(){ - $_SESSION['test']='ResModel contains literal false test/ wrong language'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModelLiteral(3,$i); - $lit=new ResLiteral('http://www.example.org/obj2','EN'); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/sub2'),new ResResource('http://www.example.org/pred2'),$lit); - $this->assertFalse($resmodel->contains($statTest)); - } - } - - /** - * tests if contains returns false if the given statement is not in the MemModel - * using all kinds of indices. - */ - function testContainsFalse(){ - $_SESSION['test']='ResModel contains false test'; - for($i=-1;$i<4;$i++){ - $mod=$this->_generateModel(3,$i); - $resmodel=new ResModel($mod); - $statTest=new Statement(new ResResource('http://www.example.org/subX'),new ResResource('http://www.example.org/pred2'),new ResResource('http://www.example.org/obj2')); - $this->assertFalse($resmodel->contains($statTest)); - } - } - - function testContainerIsSeq() { - $model = ModelFactory::getResModel(MEMMODEL); - $seq = $model->createSeq('http://example.org/my_seq'); - $this->assertTrue($seq->isSeq()); - } - - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($stats,$ind){ - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Resource('http://www.example.org/obj'.$i%9); - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - function _generateModelLiteral($stats,$ind){ - - $model=new InfModelB(); - $model->index($ind); - for($i=0;$i<$stats;$i++){ - $subs[$i]= new Resource('http://www.example.org/sub'.$i%3); - $preds[$i]=new Resource('http://www.example.org/pred'.$i%5); - $objs[$i]=new Literal('http://www.example.org/obj'.$i%9,'DE'); - - } - for($i=0;$i<$stats;$i++){ - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - return $model; - } - - - - -} - - - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_Property_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_Property_tests.php deleted file mode 100755 index 29cb4f0b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_Property_tests.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * @package unittests - * @access public - */ - - - class testResModel_Property_tests extends UnitTestCase { - - /** - * tests getProperty() - */ - function testGetProptertyTest(){ - $_SESSION['test']='ResModel getProperty test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - - $stat=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Literal('Object')); - $model1->add($stat); - - $resmodel=new ResModel($model1); - $subject=new ResResource('http://www.example.org/needle'); - $property=new ResResource('http://www.example.org/pred'); - - $res=$resmodel->getProperty($subject,$property); - $this->assertEqual('Triple(Resource("http://www.example.org/needle"), Resource("http://www.example.org/pred"), Literal("Object"))',$res->toString()); - $model1->close(); - } - - /** - * tests createProperty() and createResource - */ - function testCreateProptertyCreateResourceTest(){ - $_SESSION['test']='ResModel createProperty createResource test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred3'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - $resmodel=new ResModel($model1); - $resresource=$resmodel->createResource('http://www.example.org/testresource'); - $prop=$resmodel->createProperty('http://www.example.org/pred'); - $resresource->addProperty($prop,new ResLiteral('Object')); - $subject=new ResResource('http://www.example.org/testresource'); - $property=new ResResource('http://www.example.org/pred'); - $res=$resmodel->getProperty($subject,$property); - $this->assertEqual('Triple(Resource("http://www.example.org/testresource"), Resource("http://www.example.org/pred"), Literal("Object"))',$res->toString()); - $model1->close(); - } - - /** - * tests listSubjectsWithProperty() - */ - function testlistSubjectsWithPropertyTest(){ - $_SESSION['test']='ResModel listSubjectsWithProperty test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $model1->add($needle); - $resmodel=new ResModel($model1); - $resresource=$resmodel->createResource('http://www.example.org/testresource'); - $prop=$resmodel->createProperty('http://www.example.org/pred'); - $resresource->addProperty($prop,new ResLiteral('Object')); - $property=new ResResource('http://www.example.org/pred'); - - $res=$resmodel->listSubjectsWithProperty($property); - - $this->assertEqual(1,count($res)); - - $model1->close(); - } - - /** - * tests _resNode2Node() - */ - function test_resNode2NodeTest(){ - $_SESSION['test']='ResModel _resNode2Node test'; - $model1=new MemModel(); - $resmodel=new ResModel($model1); - $resLit=new ResLiteral('Literal','DE'); - $resLit->setDatatype('type'); - $result=$resmodel->_resNode2Node($resLit); - $this->assertIsA($result, 'Literal'); - $this->assertEqual($result->getLanguage(),'DE'); - $this->assertEqual($result->getDatatype(),'type'); - $model1->close(); - } - - /** - * tests _node2ResNode() - */ - function test_node2ResNodeTest(){ - $_SESSION['test']='ResModel _node2ResNode test'; - $model1=new MemModel(); - $resmodel=new ResModel($model1); - $literal=new Literal('Literal','DE'); - $literal->setDatatype('type'); - $result=$resmodel->_node2ResNode($literal); - $this->assertIsA($result, 'ResLiteral'); - $this->assertEqual($result->getLanguage(),'DE'); - $this->assertEqual($result->getDatatype(),'type'); - $model1->close(); - } - - - - - - - - - - - - - } - - - - - - - - - ?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_search_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_search_tests.php deleted file mode 100755 index 1ab883dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/ResModel/ResModel_search_tests.php +++ /dev/null @@ -1,305 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testResmodel_search_test extends UnitTestCase { - - - /** - * tests if find() finds a complete statement in MemModel - */ - function testFindTest(){ - $_SESSION['test']='Resmodel search test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/needle'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - - $resSub=new ResResource('http://www.example.org/needle'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find($resSub,$resPred,$resObj)); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement with a given subject in ResModel - */ - function testFindSubTest(){ - $_SESSION['test']='search Subject test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject6'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject6'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find($resSub,null,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find(null,$resPred,null)); - } - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $this->assertNotEqual(null,$resmodel->find(null,null,$resObj)); - } - - - $model1->close(); - } - - - - - /** - * tests if find() finds a statement in ResModel - */ - function testFindTestEq(){ - $_SESSION['test']='search Eq test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject3'); - $resPred=new ResResource('http://www.example.org/pred'); - $resObj=new ResResource('http://www.example.org/ob'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->find($resSub,null,null); - $this->assertNotEqual(0,count($res)); - } - - $model1->close(); - } - - /** - * tests if find() finds a statement in ResModel - */ - function testNotFindTest(){ - $_SESSION['test']='no match test'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - $resSub=new ResResource('http://www.example.org/SubX'); - $resPred=new ResResource('http://www.example.org/predX'); - $resObj=new ResResource('http://www.example.org/obX'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->find($resSub,null,null); - $this->assertEqual(0,count($res)); - } - - $model1->close(); - } - - - /** - * tests if findFirstMatchingStatement() finds a statement in ResModel - */ - function testFindFirstTest(){ - $_SESSION['test']='find first match'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject0'); - $resPred=new ResResource('http://www.example.org/Predicate0'); - $resObj=new ResResource('http://www.example.org/Object0'); - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->findFirstMatchingStatement($resSub,null,null); - $sub=$res->getSubject(); - $this->assertEqual($sub->uri,'http://www.example.org/Subject0'); - } - $model1->close(); - } - - function testFindFirstNullTest(){ - $_SESSION['test']='find first match null'; - $model1=new MemModel(); - $needle=new Statement(new Resource('http://www.example.org/Subject3'),new Resource('http://www.example.org/pred'),new Resource('http://www.example.org/ob')); - - $resSub=new ResResource('http://www.example.org/Subject0'); - $resPred=new ResResource('http://www.example.org/Predicate0'); - $resObj=new ResResource('http://www.example.org/Object0'); - - - for($i=-1;$i<4;$i++){ - $model1= $this->_generateModel(100,2,$i,$needle); - $resmodel=new ResModel($model1); - $res=$resmodel->findFirstMatchingStatement(null,null,null); - $should=$model1->triples[0]->getSubject(); - $sub=$res->getSubject(); - $this->assertEqual($sub->uri,$should->getLabel()); - } - $model1->close(); - } - - - - -//=================================================================== -// helper functions -//=================================================================== - - /** - * generates a test model containing given number of statements - * and given indextype. - * - * @return Object MemModel $model - * @param int $num - * @param int $des - * @param int $ind - * @param Object MemModel $needle - */ - - function _generateModel($num,$des,$ind,$needle){ - - $model=new MemModel(); - - // generate Subjects - for($i=0;$i<$num;$i++){ - $subs[$i]=new Resource('http://www.example.org/Subject'.$i%6); - } - // generate Predicates - for($i=0;$i<$num;$i++){ - $preds[$i]=new Resource('http://www.example.org/Predicate'.$i%7); - } - - // generate Objects - for($i=0;$i<$num;$i++){ - $objs[$i]=new Resource('http://www.example.org/Object'.$i%5); - } - for($i=0;$i<$num;$i++){ - if($i==50){ - $model->add($needle); - } - $model->add(new Statement($subs[$i],$preds[$i],$objs[$i])); - } - - - $model->index($ind); - return $model; - } - - - /** - * checks if given models index is consistent - * - * @return boolean $pass - * @param Object MemModel $model1 - * @param int $ind - */ - - function _checkIndex($model1,$ind){ - - $pass=TRUE; - $count=0; - foreach($model1->indexArr[$ind] as $label => $posArr){ - foreach($posArr as $num =>$posInd){ - if(isset($model1->triples[$posInd])){ - $stat=$model1->triples[$posInd]; - }else{ - $pass=false; - } - if($stat==null){ - $pass= false; - }else{ - $s=$stat->getSubject(); - $p=$stat->getPredicate(); - $o=$stat->getObject(); - } - switch($ind){ - case 1: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel().$o->getLabel(); - } - break; - - case 2: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$p->getLabel(); - } - break; - - case 3: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel().$o->getLabel(); - } - break; - - case 4: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$s->getLabel(); - } - break; - - case 5: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$p->getLabel(); - } - break; - - case 6: - if($stat== null){ - $pass= FALSE; - }else{ - $lab=$o->getLabel(); - } - break; - } - if($lab!=$label){ - $pass=FALSE; - } - $count++; - } - } - return $pass; - } - -} - - - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/all-wcprops deleted file mode 100755 index 8084a384..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/Sparql -END -SparqlDbTests_test.php -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php -END -ResultParserTests_test.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/426/trunk/rdfapi-php/test/unit/Sparql/ResultParserTests_test.php -END -cases.php -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/502/trunk/rdfapi-php/test/unit/Sparql/cases.php -END -casesParserNested.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/463/trunk/rdfapi-php/test/unit/Sparql/casesParserNested.php -END -SparqlParserTests_test.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/Sparql/SparqlParserTests_test.php -END -casesParserFilter.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/463/trunk/rdfapi-php/test/unit/Sparql/casesParserFilter.php -END -SparqlTestHelper.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/504/trunk/rdfapi-php/test/unit/Sparql/SparqlTestHelper.php -END -cases_dawg2.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/544/trunk/rdfapi-php/test/unit/Sparql/cases_dawg2.php -END -Dawg2Helper.php -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/514/trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php -END -SparqlTests_test.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/463/trunk/rdfapi-php/test/unit/Sparql/SparqlTests_test.php -END -create-dawg2.php -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/490/trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/entries deleted file mode 100755 index db7d15fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/entries +++ /dev/null @@ -1,179 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-10-09T16:24:08.620955Z -544 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -SparqlDbTests_test.php -file - - - - -2008-02-29T14:57:25.449969Z -0130d8990e06f63218291ca039940f33 -2007-10-09T16:24:08.620955Z -544 -cweiske -has-props - -cases.php -file - - - - -2008-02-29T14:57:25.465590Z -04c11c3056c3337a375d25e1fe2fb52c -2007-08-13T06:52:50.634004Z -502 -cweiske -has-props - -SparqlParserTests_test.php -file - - - - -2008-02-29T14:57:25.496831Z -8e6f2512f16e69b3a3b6d1ed13caccf7 -2007-10-09T16:24:08.620955Z -544 -cweiske -has-props - -SparqlTestHelper.php -file - - - - -2008-02-29T14:57:25.512452Z -14d62c5cd63462c2ca251f5779499121 -2007-08-13T07:44:02.711613Z -504 -cweiske -has-props - -Dawg2Helper.php -file - - - - -2008-02-29T14:57:25.543693Z -9144898c5f56f4d88d6bee291ab59fcf -2007-08-13T15:17:42.618486Z -514 -cweiske - -create-dawg2.php -file - - - - -2008-02-29T14:57:25.559313Z -41d6264240e19c3b78c961d3d76ecad9 -2007-08-12T15:26:47.564631Z -490 -cweiske - -w3c-dawg2 -dir - -ResultParserTests_test.php -file - - - - -2008-02-29T14:57:25.465590Z -5bad527b50574b0d02ace4f35e126787 -2007-05-01T13:32:10.000000Z -426 -cweiske -has-props - -casesParserNested.php -file - - - - -2008-02-29T14:57:25.481210Z -97f0dee57d95b6157ddfc98ec188d88d -2007-06-21T15:52:53.331504Z -463 -cweiske - -query -dir - -casesParserFilter.php -file - - - - -2008-02-29T14:57:25.512452Z -7cf58f1781f4377f7c9291da8f1e5837 -2007-06-21T15:52:53.331504Z -463 -cweiske -has-props - -cases_dawg2.php -file - - - - -2008-02-29T14:57:25.528072Z -07f7f692a8b129e4f9a8606c4579b36b -2007-10-09T16:24:08.620955Z -544 -cweiske - -data -dir - -SparqlTests_test.php -file - - - - -2008-02-29T14:57:25.543693Z -5400519dc963687f348dc145f40ec193 -2007-06-21T15:52:53.331504Z -463 -cweiske -has-props - -result -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/ResultParserTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/ResultParserTests_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/ResultParserTests_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlDbTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlDbTests_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlDbTests_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlParserTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlParserTests_test.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlParserTests_test.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTestHelper.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTestHelper.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTestHelper.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTests_test.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/SparqlTests_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/cases.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/cases.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/cases.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/casesParserFilter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/casesParserFilter.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/prop-base/casesParserFilter.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/Dawg2Helper.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/Dawg2Helper.php.svn-base deleted file mode 100755 index 1010aad0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/Dawg2Helper.php.svn-base +++ /dev/null @@ -1,236 +0,0 @@ - $value) { - if (substr($value, 0, strlen($strip)) == $strip) { - $test[$id] = substr($value, strlen($strip)); - } - } - } - - //activate it in cases.php - $_SESSION['sparql_dawg2_tests'] = $arTests; - $_SESSION['sparqlTestGroups']['dawg2'] = array(//'deact'=>1, - 'title' => 'DAWG2 tests', - 'tests' => 'sparql_dawg2_tests', - 'checkfunc' => 'resultCheck' - ); - - }//public static function loadDawg2Tests() - - - - /** - * Loads all test collections from a test suite manifest file. - * A test suite file is an N3 rdf data file linking to other - * collection manifest files. - * - * @param string $strSuiteFile Test suite file - * - */ - public static function loadSuiteFromManifest($strSuiteFile) - { - //if someone knows a proper way to select all rdf collection - //items with a single query, tell me - $res = self::queryN3($strSuiteFile, - 'PREFIX mf: - SELECT ?title, ?file WHERE { - ?x rdfs:label ?title. - ?y rdf:first ?file. - }' - ); - - $arTests = array(); - $dirname = dirname($strSuiteFile); - foreach ($res as $data) { - $file = $dirname . '/' . $data['?file']->uri; - $arTests = array_merge( - $arTests, - self::loadCollectionFromManifest($file) - ); - } - return $arTests; - }//public static function loadSuiteFromManifest($strSuiteFile) - - - - /** - * Loads tests from a test collection manifest file. - * A collection manifest contains only tests, no links to other - * manifest files. - * - * @param string $strCollectionFile Path of the collection file - * - * @return array Array of test definitions compatible to those in - * cases.php - */ - public static function loadCollectionFromManifest($strCollectionFile) - { - if (!file_exists($strCollectionFile)) { - throw new Exception('Collection file does not exist: ' . $strCollectionFile); - } - - $arTests = self::loadEvaluationTests($strCollectionFile); - $arTests = array_merge($arTests, self::loadSyntaxTests($strCollectionFile)); - return $arTests; - }//public static function loadCollectionFromManifest($strCollectionFile) - - - - public static function loadEvaluationTests($strCollectionFile) - { - $res = self::queryN3($strCollectionFile, - 'PREFIX mf: - PREFIX qt: - PREFIX dawgt: - SELECT ?test ?name ?queryFile ?dataFile ?resultFile WHERE { - ?test rdf:type mf:QueryEvaluationTest. - ?test mf:name ?name. - ?test dawgt:approval dawgt:Approved. - ?test mf:action _:action. - _:action qt:query ?queryFile. - _:action qt:data ?dataFile. - ?test mf:result ?resultFile. - }' - ); - - $dirname = dirname($strCollectionFile) . '/'; - $arTests = array(); - $prefix = self::getPrefix($strCollectionFile); - - //this is a bug in SparqlEngine and should be fixed - if ($res === false) { - return array(); - } - - foreach ($res as $test) { - $name = $test['?test']->uri; - if (substr($name, 0, 7) !== 'http://') { - $name = $prefix . $name; - } - $arTests[] = array( - 'earl:name' => $name, - 'title' => $test['?name']->label, - 'data' => $dirname . $test['?dataFile']->uri, - 'query' => $dirname . $test['?queryFile']->uri, - 'result' => $dirname . $test['?resultFile']->uri, - ); - } - - return $arTests; - }//public static function loadEvaluationTests($strCollectionFile) - - - - public static function loadSyntaxTests($strCollectionFile) - { - $res = self::queryN3($strCollectionFile, - 'PREFIX mf: - PREFIX qt: - PREFIX dawgt: - SELECT ?test ?name ?queryFile ?type WHERE { - ?test rdf:type ?type. - ?test mf:name ?name. - ?test dawgt:approval dawgt:Approved. - ?test mf:action ?queryFile. - FILTER(?type = mf:NegativeSyntaxTest || ?type = mf:PositiveSyntaxTest) - }' - ); - - $dirname = dirname($strCollectionFile) . '/'; - $arTests = array(); - $prefix = self::getPrefix($strCollectionFile); - - //this is a bug in SparqlEngine and should be fixed - if ($res === false) { - return array(); - } - foreach ($res as $test) { - if ($test['?type']->uri == 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest') { - $type = 'syntax-positive'; - } else { - $type = 'syntax-negative'; - } - $name = $test['?test']->uri; - if (substr($name, 0, 7) !== 'http://') { - $name = $prefix . $name; - } - $arTests[] = array( - 'earl:name' => $name, - 'title' => $test['?name']->label, - 'query' => $dirname . $test['?queryFile']->uri, - 'type' => $type - ); - } - - return $arTests; - }//public static function loadEvaluationTests($strCollectionFile) - - - - protected static function getPrefix($strFile) - { - return 'http://www.w3.org/2001/sw/DataAccess/tests/' - . substr( - $strFile, - strpos($strFile, 'w3c-dawg2/') + 10 - ); - }//protected static function getPrefix($strFile) - - - - /** - * Executes a SPARQL query on the data written in an - * file containing N3-formatted RDF data - * - * @param string $strN3File Path to file - * @param string $strSparqlQuery SPARQL query to execute - * - * @return mixed SPARQL engine query results - */ - public static function queryN3($strN3File, $strSparqlQuery) - { - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1 ->load($strN3File, 'n3'); - - $parser = new SparqlParser(); - $q = $parser->parse($strSparqlQuery); - $engine = SparqlEngine::factory(); - return $engine->queryModel($graphset, $q, false); - }//public static function queryN3($strN3File, $strSparqlQuery) -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/ResultParserTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/ResultParserTests_test.php.svn-base deleted file mode 100755 index a87a851c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/ResultParserTests_test.php.svn-base +++ /dev/null @@ -1,49 +0,0 @@ - - * - * @package unittests - * @access public - */ - -require_once RDFAPI_TEST_INCLUDE_DIR . 'test/unit/Sparql/SparqlTestHelper.php'; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_SPARQLRES; - -$_SESSION['sparql_result'] = array( - 1 => "res1" , - 2 => "res2" , - 3 => "res3" , - 4 => "res4" , - 5 => "res5" , - 6 => "res6" -); - - -class testResultParserTests extends UnitTestCase -{ - function testResultParser() - { - echo "ResultParser tests
        \n"; - foreach($_SESSION['sparql_result'] as $name) { - $_SESSION['test'] = $name . ' test'; - $parser = new SparqlResultParser(); - - $qs = file_get_contents(SPARQL_TESTFILES . 'data/' .$name . '.xml', 'r'); - $res = file_get_contents(SPARQL_TESTFILES . 'result/' .$name . '.res', 'r'); - eval($res); - - $q = $parser->parse($qs); - - $this->assertTrue(SparqlTestHelper::resultCheck($q,$result)); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlDbTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlDbTests_test.php.svn-base deleted file mode 100755 index 065ef08b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlDbTests_test.php.svn-base +++ /dev/null @@ -1,242 +0,0 @@ -SparqlDbTests
        \n"; - //prepare - $parser = new SparqlParser(); - $strLastDataFile = null; - - foreach ($_SESSION['sparqlTestGroups'] as $arGroup) { - if (isset($arGroup['deact'])) continue; -//echo count($_SESSION[$arGroup['tests']]) . " tests\n"; - - foreach ($_SESSION[$arGroup['tests']] as $name) { - - if (isset($name['type']) && - ($name['type'] == 'syntax-negative' || $name['type'] == 'syntax-positive') - ) { - //skip syntax tests; they are run in SparqlParserTests - continue; - } - - $checkfunc = $arGroup['checkfunc']; - $fileData = null; - $fileResult = null; - $fileQuery = null; - - if (is_array($name)) { - if (isset($name['data'])) { - if (!file_exists(SPARQL_TESTFILES . $name['data'])) { - $fileData = 'data/' . $name['data']; - } else { - $fileData = $name['data']; - } - } - - if (!file_exists(SPARQL_TESTFILES . $name['query'])) { - $fileQuery = 'query/' . $name['query'] . '.rq'; - } else { - $fileQuery = $name['query']; - } - - if (isset($name['result'])) { - if (!file_exists(SPARQL_TESTFILES . $name['result'])) { - $fileResult = 'result/' . $name['result'] . '.res'; - } else { - $fileResult = $name['result']; - } - } - - if (isset($name['title'])) { - $title = $name['title']; - } else { - $title = $name['query']; - } - } else { - $fileData = 'data/' . $name . '.n3'; - $fileQuery = 'query/' . $name . '.rq'; - $fileResult = 'result/' . $name . '.res'; - $title = $name; - } - - if (in_array($title, $_SESSION['testSparqlDbTestsIgnores'])) { - if (isset($GLOBALS['debugTests'])) { - echo Console_Color::convert('%y'); - echo ' ignoring ' . $title . "\n"; - echo Console_Color::convert('%n'); - } - continue; - } -//echo ' ' . $title . "\n"; - $_SESSION['test'] = $title . ' test'; - $e = null; - - if (isset($name['earl:name'])) { - //fix some weird issue with simpletest - $earlname = $name['earl:name']; - $this->signal('earl:name', $earlname); - } - - if ($fileData != null && $fileData != $strLastDataFile) { - //re-use database if not changed - list($database, $dbModel) = $this->prepareDatabase(); - //import statements into database - $dbModel ->load(SPARQL_TESTFILES . $fileData, 'n3'); - $strLastDataFile = $fileData; - } - - $qs = file_get_contents(SPARQL_TESTFILES . $fileQuery); - - if ($fileResult !== null) { - $res = file_get_contents(SPARQL_TESTFILES . $fileResult); - - if (substr($fileResult, -4) == '.srx') { - //Sparql XML result - $resParser = new SparqlResultParser(); - $result = $resParser->parse($res); - } else if (substr($fileResult, -4) == '.rdf') { - //same format as .ttl, but serialized as xml - //rdf xml sorted - $resModel = new MemModel(); - $resModel->load(SPARQL_TESTFILES . $fileResult, 'rdf'); - $result = SparqlTestHelper::convertModelToResultArray($resModel); - unset($resModel); - $checkfunc = 'resultCheckSort'; - } else if (substr($fileResult, -4) == '.res') { - //our own php code - unset($result); - eval($res); - } else if (substr($fileResult, -4) == '.ttl') { - //N3 - $resModel = new MemModel(); - $resModel->load(SPARQL_TESTFILES . $fileResult, 'n3'); - $result = SparqlTestHelper::convertModelToResultArray($resModel); - unset($resModel); - } else { - throw new Exception('Unknown result format in ' . $fileResult); - } - } - - try { - $q = $parser->parse($qs); - } catch (Exception $e) { - //normal query failed to be parsed - $this->assertTrue(false, 'Query failed to be parsed'); - if (!isset($GLOBALS['debugTests'])) { - //echo ' ' . $title . "\n"; - } else { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if (isset($e)) { - echo $e->getMessage() . "\n"; - //var_dump($e); - } - echo $strQuery . "\n"; - die(); - } - } - - try { - $t = $dbModel->sparqlQuery($qs); - - if ($t instanceof MemModel) { - $bOk = $t->equals($result); - } else { - $bOk = SparqlTestHelper::$checkfunc($t, $result); - } - $this->assertTrue($bOk); - } catch (Exception $e) { - $bOk = false; - $t = null; - //an exception is an error - if (isset($GLOBALS['debugTests'])) { - var_dump($e->getMessage()); - } - $this->assertTrue(false); - } - - if (!$bOk) { - if (!isset($GLOBALS['debugTests'])) { - //echo ' ' . $title . "\n"; - } else { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if ($e != null) { - echo get_class($e) . ': ' . $e->getMessage() . "\n"; - } - echo ' Data: ' . $fileData . "\n"; - echo 'Query string: ' . $qs . "\n"; - echo "Expected:\n"; - echo Console_Color::convert('%p'); - var_dump($result); - echo Console_Color::convert('%n'); - echo "Result:\n"; - echo Console_Color::convert('%r'); - var_dump($t); - echo Console_Color::convert('%n'); - //var_dump($q); - die(); - } - } -/**/ - } -// echo $arGroup['title'] . " done\n"; - } - }//public function testAllTestgroupsNoReload() - - - - /** - * Instantiates the database object and clears - * any existing statements to have a fresh place - * for a unit test. - * - * @return array array($database, $dbModel) - */ - protected function prepareDatabase() - { - $database = ModelFactory::getDbStore( - $GLOBALS['dbConf']['type'], - $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], - $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); - if ($database->modelExists(self::$strModelUri)) { - //need to remove model - $database->removeNamedGraphDb(self::$strModelUri); - } - $dbModel = $database->getNewModel(self::$strModelUri); - - if (!$dbModel instanceof DbModel) { - throw new Exception('Error creating new model for SparqlEngineDb tests: ' . $dbModel); - } - return array($database, $dbModel); - }//protected function prepareDatabase() - -}//class testSparqlDbTests extends UnitTestCase -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlParserTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlParserTests_test.php.svn-base deleted file mode 100755 index c4a6e925..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlParserTests_test.php.svn-base +++ /dev/null @@ -1,241 +0,0 @@ -assertEqual('en', Query::getLanguageTag('?x@en')); - $this->assertEqual('en', Query::getLanguageTag('?x@en^^xsd:integer')); - $this->assertEqual('en', Query::getLanguageTag('?x^^xsd:integer@en')); - $this->assertEqual('en_US', Query::getLanguageTag('?x@en_US')); - }//function testQueryGetLanguageTag() - - - - /** - * Tests if Query::getDatatype() works correctly - */ - function testQueryGetDatatype() - { - $q = new Query(); - $q->addPrefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'); - $q->addPrefix('rdf' , 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); - $q->addPrefix('xsd' , 'http://www.w3.org/2001/XMLSchema#'); - - $this->assertNull($q->getDatatype('?name')); - $this->assertNull($q->getDatatype('?name@en')); - $this->assertEqual( - 'http://www.w3.org/2001/XMLSchema#integer', - $q->getDatatype('?name^^xsd:integer') - ); - $this->assertEqual( - 'http://www.w3.org/2001/XMLSchema#integer', - $q->getDatatype('?name^^') - ); - }//function testQueryGetDatatype() - - - - function testQueryGetFullUri() - { - $q = new Query(); - $q->addPrefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'); - $q->addPrefix('rdf' , 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); - $q->addPrefix('xsd' , 'http://www.w3.org/2001/XMLSchema#'); - - $this->assertEqual('http://www.w3.org/2001/XMLSchema#integer', $q->getFullUri('xsd:integer')); - $this->assertFalse($q->getFullUri('yyy:integer')); - $this->assertFalse($q->getFullUri('integer')); - }//function testQueryGetFullUri() - - - - function testTokenizer() - { - $this->assertEqual( - array('abc', "'", 'hi', "'", "'", 'def', "'''", 'rst', "\'", "'", "'", 'xyz'), - SparqlParser::tokenize("abc'hi''def'''rst\\'''xyz") - ); - }//function testTokenizer() - - - - function testEdgeCases() - { - $query = << -PREFIX ldap: -PREFIX rdfs: -PREFIX foaf: -PREFIX data: -SELECT ?Attr ?Val WHERE { ?Attr ?Val} -EOT; - $p = new SparqlParser(); - $q = $p->parse($query); - - $query = << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)) } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT; - $p = new SparqlParser(); - $q = $p->parse($query); - }//function testEdgeCases() - - - - function testParseFilter() - { - //echo "FilterParser tests
        \n"; - foreach ($GLOBALS['testSparqlParserTestsFilter'] as $arFilterTest) { - list($query, $result) = $arFilterTest; - - $p = new SparqlParser(); - $q = $p->parse($query); - - $res = $q->getResultPart(); - $constraint = $res[0]->getConstraints(); - $tree = $constraint[0]->getTree(); - - self::removeLevel($tree); - $this->assertEqual($result, $tree); - if ($result != $tree) { - var_dump($tree); - echo '----------------------' . "\n" . $query . "\n"; - echo "\n!!!!!!!! " . SparqlTestHelper::renderTree($tree) . "\n\n"; - } - } - }//function testParseFilter() - - - - function testParseNested() - { - //echo "Nested queries tests
        \n"; - foreach ($GLOBALS['testSparqlParserTestsNested'] as $arNestedTest) { - list($query, $strExpected) = $arNestedTest; - - $p = new SparqlParser(); - $q = $p->parse($query); - - $qs = new SparqlEngineDb_QuerySimplifier(); - $qs->simplify($q); - - $strRendResult = SparqlTestHelper::renderResult($q); - $this->assertEqual($strExpected, $strRendResult); - } - }//function testParseNested() - - - - /** - * Runs the DAWG syntax tests - */ - function testDawg2SyntaxTests() - { - $parser = new SparqlParser(); - - foreach ($_SESSION['sparql_dawg2_tests'] as $test) { - if (isset($GLOBALS['debugTests']) && $GLOBALS['debugTests']) { - echo $test['title'] . "\n"; - } - //use syntax tests only - if (!isset($test['type']) || - ($test['type'] != 'syntax-positive' && - $test['type'] != 'syntax-negative') - ) { - continue; - } - if (in_array($test['title'], $_SESSION['testSparqlDbTestsIgnores'])) { - if (isset($GLOBALS['debugTests'])) { - echo Console_Color::convert('%y'); - echo ' ignoring ' . $test['title'] . "\n"; - echo Console_Color::convert('%n'); - } - continue; - } - $this->signal('earl:name', $test['earl:name']); - - $qs = file_get_contents(SPARQL_TESTFILES . $test['query']); - - $this->runQueryParseTest($qs, $parser, $test['type'], $test['title']); - - //++$nCount; if ($nCount > 2) break; - } - }//function testDawg2SyntaxTests() - - - - /** - * Runs a parser test - */ - protected function runQueryParseTest($strQuery, $parser, $strType, $title) - { - $bException = false; - try { - $parser->parse($strQuery); - } catch (Exception $e) { - $bException = true; - } - - if ($strType == 'syntax-negative') { - $this->assertTrue($bException, 'Query should fail to be parsed.'); - $bOk = $bException == true; - } else if ($strType == 'syntax-positive') { - $this->assertFalse($bException, 'Query should get parsed.'); - $bOk = $bException == false; - } - - if (!$bOk) { - if (isset($GLOBALS['debugTests']) && $GLOBALS['debugTests']) { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if (isset($e)) { - echo $e->getMessage() . "\n"; - //var_dump($e); - } - echo $strQuery . "\n"; - die(); - } - } - }//protected function runQueryParseTest($strQuery, $parser, $strType) - - - - /** - * Removes "level" keys from the tree array. - * It is an implementation detail and should not taken into account - */ - static function removeLevel(&$tree) - { - if (isset($tree['level'])) { - unset($tree['level']); - } - if (isset($tree['type']) && $tree['type'] == 'equation') { - self::removeLevel($tree['operand1']); - self::removeLevel($tree['operand2']); - } - }//static function removeLevel(&$tree) - -}//class testSparqlParserTests extends UnitTestCase -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTestHelper.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTestHelper.php.svn-base deleted file mode 100755 index 5b212b1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTestHelper.php.svn-base +++ /dev/null @@ -1,222 +0,0 @@ - $value){ - foreach ($result as $innerKey => $innervalue){ - $match = 0; - foreach ($innervalue as $varname => $varval){ - if (isset($value[$varname])){ - if (gettype($value[$varname]) == gettype($varval) - && $value[$varname] == $varval - ) { - $match++; - } else { - break; - } - } - if ($match == $rowcount){ - $rows++; - unset($result[$innerKey]); - break; - } - } - } - } - - if ($hits == $rows) { - return true; - } else { - return false; - } - }//public static function resultCheck($table, $result) - - - - /** - * Compares calculated with expected result. - * Values need to be in the exact same order. - * - * @param array $table Result calculated by the engine - * @param array $result Expected result - * - * @return boolean True if both arrays contain the same values - */ - public static function resultCheckSort($table, $result) - { - if (count($result) != count($table)) { - return false; - } - - foreach ($result as $key => $value) { - foreach ($value as $varname => $varvalue) { - if ($varvalue != $table[$key][$varname]) { - return false; - } - } - } - return true; - }//public static resultCheckSort($table, $result) - - - - /** - * Helper method that creates a sparql filter string from the - * given filter tree. - */ - static function renderTree($tree) - { - if (!is_array($tree) || !isset($tree['type'])) { - return 'Parser is broken'; - } - $negation = isset($tree['negated']) ? '!' : ''; - switch ($tree['type']) { - case 'equation': - return $negation . '(' . self::renderTree($tree['operand1']) - . ' ' . $tree['operator'] . ' ' - . self::renderTree($tree['operand2']) . ')'; - case 'value': - return $negation . $tree['value']; - case 'function': - return $negation . $tree['name'] . '(' - . implode( - ', ', - array_map( - array('self', 'renderTree'), - $tree['parameter'] - ) - ) . ')'; - default: - var_dump($tree); - throw new Exception('Unsupported tree type: ' . $tree['type']); - break; - } - }//static function renderTree($tree) - - - - /** - * renders the result part of a query object as a string - */ - static function renderResult(Query $query) - { - $s = ''; - foreach ($query->getResultPart() as $gp) { - //dumpGp: - $s .= 'GP #' . $gp->getId(); - if ($gp->getOptional() !== null) $s .= ' optionalTo(' . $gp->getOptional() . ')'; - if ($gp->getUnion() !== null) $s .= ' unionWith(' . $gp->getUnion() . ')'; - if ($gp->getSubpatternOf() !== null) $s .= ' subpatternOf(' . $gp->getSubpatternOf() . ')'; - if (count($gp->getConstraints()) > 0)$s .= ' filter(' . count($gp->getConstraints()) . ')'; - $s .= "\n"; - if ($gp->getTriplePatterns()) { - foreach ($gp->getTriplePatterns() as $tp) { - $s .= ' ' . $tp->getSubject() . ', ' . $tp->getPredicate() - . ', ' . $tp->getObject() . "\n"; - } - } - } - return $s; - }//static function renderResult($query) - - - - /** - * Converts a MemModel into a query result array. - * Required for the DAWG test cases. - * - * @param Model $model Model object to extract data from - * @return array Result array - * - * @see http://www.w3.org/2001/sw/DataAccess/tests/README - * @see http://www.w3.org/2001/sw/DataAccess/tests/result-set.n3 - */ - static function convertModelToResultArray($model) - { - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graphset->setDefaultGraph($model); - $parser = new SparqlParser(); - $engine = SparqlEngine::factory($model); - - $strSparqlQuery = ' - PREFIX rs: - SELECT ?varname WHERE { ?x rs:resultVariable ?varname } - '; - $q = $parser->parse($strSparqlQuery); - $variables = $engine->queryModel($graphset, $q, false); - - $arVars = array(); - $strSparqlQueryPart = ''; - $nCount = 0; - foreach ($variables as $var) { - $varname = '?' . $var['?varname']->label; - $name = substr($varname, 1); - $arVars[] = $varname; - $strSparqlQueryPart .= - ' ?thing rs:binding ?binding' . $nCount . '. - ?binding' . $nCount . ' rs:value ' . $varname . '. - ?binding' . $nCount . ' rs:variable "' . $name . '".'; - ++$nCount; - } - - $strSparqlQuery = ' - PREFIX rs: - SELECT ' . implode($arVars, ' ') . ' - WHERE { - ?some rs:solution ?thing. - ' . $strSparqlQueryPart . ' - } - '; -//echo $strSparqlQuery; - $q = $parser->parse($strSparqlQuery); - $arResult = $engine->queryModel($graphset, $q, false); -//var_dump($arResult); -//die(); - - return $arResult; - }//static function convertModelToResultArray($model) - -}//class SparqlTestHelper -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTests_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTests_test.php.svn-base deleted file mode 100755 index 18a7e6f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/SparqlTests_test.php.svn-base +++ /dev/null @@ -1,260 +0,0 @@ - - * - * @package unittests - * @access public - */ -class testSparqlTests extends UnitTestCase -{ - public function __construct() - { - echo "SparqlTests
        \n"; - } - - function testDAWGTestcases() - { - foreach($_SESSION['sparql_dawg_tests'] as $name) { - $_SESSION['test'] = $name . ' test'; - - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1 ->load(SPARQL_TESTFILES.'data/'.$name.'.n3'); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name.'.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name.'.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q, false); - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - } - - - - function testCustomTestcases() - { - foreach($_SESSION['sparql_custom_tests'] as $name) { - $_SESSION['test']=$name.' test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1->load(SPARQL_TESTFILES.'data/'.$name.'.n3'); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name.'.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name.'.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - } - - - - function testGraphset1Testcase() - { - $_SESSION['test']= ' Graphset1 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset1.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset1.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset2Testcase() - { - $_SESSION['test']= ' Graphset2 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset2.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset2.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset3Testcase() - { - $_SESSION['test']= ' Graphset3 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $default = $graphset->getDefaultGraph(); - $default->load(SPARQL_TESTFILES.'data/graphset3gr1.n3'); - - $graph1 = $graphset->createGraph('urn:x-local:graph1'); - $graph1->load(SPARQL_TESTFILES.'data/graphset3gr2.n3'); - - $graph2 = $graphset->createGraph('urn:x-local:graph2'); - $graph2->load(SPARQL_TESTFILES.'data/graphset3gr3.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset3.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset3.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset4Testcase() - { - $_SESSION['test']= ' Graphset4 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset4.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset4.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testSortTestcase() - { - foreach($_SESSION['sparql_sort_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheckSort($t,$result)); - } - } - - - - function testlimitOffsetTestcase() - { - foreach($_SESSION['sparql_limitOffset_tests'] as $name){ - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheckSort($t,$result)); - } - } - - - - - function testFilterTestcases() - { - foreach($_SESSION['sparql_filter_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def ->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q, false); - $bOk = SparqlTestHelper::resultCheck($t,$result); - $this->assertTrue($bOk); - if (!$bOk) { - echo $name['query'] . "\n"; - } - } - } - - - - function testArqTestcases() - { - foreach($_SESSION['sparql_arq_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - if ($t instanceof MemModel) { - $bOk = $t->equals($result); - } else { - $bOk = SparqlTestHelper::resultCheck($t,$result); - } - $this->assertTrue($bOk); - if (!$bOk) { - echo $name['query'] . "\n"; - } - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases.php.svn-base deleted file mode 100755 index d2277b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases.php.svn-base +++ /dev/null @@ -1,692 +0,0 @@ - array(//'deact'=>1, - 'title' => 'DAWG tests', - 'tests' => 'sparql_dawg_tests', - 'checkfunc' => 'resultCheck' - ), - 'sort' => array(//'deact'=>1, - 'title' => 'sorting tests', - 'tests' => 'sparql_sort_tests', - 'checkfunc' => 'resultCheckSort' - ), - 'limit' => array(//'deact'=>1, - 'title' => 'limit/offset tests', - 'tests' => 'sparql_limitOffset_tests', - 'checkfunc' => 'resultCheckSort' - ), - 'filter' => array(//'deact'=>1, - 'title' => 'filter tests', - 'tests' => 'sparql_filter_tests', - 'checkfunc' => 'resultCheck' - ), - 'union' => array(//'deact'=>1, - 'title' => 'custom tests', - 'tests' => 'sparql_custom_tests', - 'checkfunc' => 'resultCheck' - ), - 'arq' => array(//'deact'=>1, - 'title' => 'arq tests', - 'tests' => 'sparql_arq_tests', - 'checkfunc' => 'resultCheck' - ), - 'ask' => array(//'deact'=> 1, - 'title' => 'ASK and COUNT tests', - 'tests' => 'sparql_ask_tests', - 'checkfunc' => 'resultCheck' - ), - 'dawg2' => array(//'deact'=>1, - 'title' => 'DAWG2 tests', - 'tests' => 'sparql_dawg2_tests', - 'checkfunc' => 'resultCheck' - ), -); - -$_SESSION['testSparqlDbTestsIgnores'] = array( - //hiding optional values that don't match the filter are not possible in sql - 'expr-1', - //different timezones cannot be used - 'ex11.2.3.1_1', - //bound() across union patterns is not possible - 'ex11.2.3.2_0', - //test is broken IMO (cweiske) - 'query-survey-1', - - //fatal error - 'syntax-form-describe01.rq', - 'syntax-form-describe02.rq', - //parse error - 'dawg-construct-identity' -); - - - -$_SESSION['sparql_dawg_tests'] = array( - 1 => "dawg-tp-01" , - 2 => "dawg-tp-02" , - 3 => "dawg-tp-03" , - 4 => "dawg-tp-04" , - 5 => "ex2-1a" , - 6 => "ex2-2a" , - 7 => "ex2-3a" , - 8 => "ex2-4a" , - 9 => "q-opt-1" , - 10 => "q-opt-2" , - 11 => "dawg-query-001" , - 12 => "dawg-query-002" , - 13 => "dawg-query-003" , - 14 => "dawg-query-004" , - 15 => "q-select-1" , - 16 => "q-select-2" , - 17 => "q-select-3" , - 18 => "query-survey-1" -); - - - -$_SESSION['sparql_custom_tests'] = array( - 1 => "customUnion1" , - 2 => "customUnion2" -); - - - -$_SESSION['sparql_sort_tests'] = array( - - 1 => array('data' => 'data-sort-4.n3', - 'query' => "query-sort-5", - 'result' => "sort5") , - - 2 => array('data' => "data-sort-4.n3", - 'query' => "query-sort-4", - 'result' => "sort4") , - - 3 => array('data' => "data-sort-3.n3", - 'query' => "query-sort-3", - 'result' => "sort3") , - - 4 => array('data' => "data-sort-1.n3", - 'query' => "query-sort-2", - 'result' => "sort2") , - - 5 => array('data' => "data-sort-1.n3", - 'query' => "query-sort-1", - 'result' => "sort1") , - - 6 => array('data' => "data-sort-6.n3", - 'query' => "query-sort-6", - 'result' => "sort6") , -//file is missing -// 7 => array('data' => "data-sort-7.n3", -// 'query' => "query-sort-7", -// 'result' => "sort7") , - - 8 => array('data' => "data-sort-8.n3", - 'query' => "query-sort-4", - 'result' => "sort8") , - - 9 => array('data' => "data-sort-datetime.n3", - 'query' => "query-sort-datetime", - 'result' => "sort-datetime") , -); - - - -$_SESSION['sparql_limitOffset_tests'] = array( - 1 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_1", - 'result' => "LimitOff_1") , - - 2 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_2", - 'result' => "LimitOff_2") , - - 3 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_3", - 'result' => "LimitOff_3") , -); - - - -$_SESSION['sparql_filter_tests'] = array( -/**/ - 1 => array('data' => "data.n3", - 'query' => "bound1", - 'result' => "bound1") , - - 2 => array('data' => "ex3.n3", - 'query' => "ex3", - 'result' => "ex3") , - - 3 => array('data' => "ex11.2.3.1_0.n3", - 'query' => "ex11.2.3.1_0", - 'result' => "ex11.2.3.1_0") , - - 4 => array('data' => "ex11.2.3.2_0.n3", - 'query' => "ex11.2.3.2_1", - 'result' => "ex11.2.3.2_1") , - - 5 => array('data' => "ex11.2.3.3_0.n3", - 'query' => "ex11.2.3.3_0", - 'result' => "ex11.2.3.3_0") , - - 6 => array('data' => "ex11.2.3.4_0.n3", - 'query' => "ex11.2.3.4_0", - 'result' => "ex11.2.3.4_0") , - - 7 => array('data' => "ex11.2.3.5_0.n3", - 'query' => "ex11.2.3.5_0", - 'result' => "ex11.2.3.5_0") , - - 8 => array('data' => "ex11.2.3.7_0.n3", - 'query' => "ex11.2.3.7_0", - 'result' => "ex11.2.3.7_0") , - - 9 => array('data' => "data-f1.n3", - 'query' => "expr-1", - 'result' => "expr-1") , - - 10 => array('data' => "data-f1.n3", - 'query' => "expr-2", - 'result' => "expr-2") , - - 11 => array('data' => "data-f1.n3", - 'query' => "expr-3", - 'result' => "expr-3") , - - 12 => array('data' => "data-bool1.n3", - 'query' => "query-bev-1", - 'result' => "query-bev-1") , - - 13 => array('data' => "data-bool1.n3", - 'query' => "query-bev-2", - 'result' => "query-bev-2") , - - 14 => array('data' => "data-bool2.n3", - 'query' => "query-bev-5", - 'result' => "query-bev-5") , - - 15 => array('data' => "data-bool2.n3", - 'query' => "query-bev-6", - 'result' => "query-bev-6") , - - 16 => array('data' => "data-fil1.n3", - 'query' => "q-str-1", - 'result' => "q-str-1") , - - 17 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-001", - 'result' => "regex-query-001") , - - - 18 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-002", - 'result' => "regex-query-002") , - - - 19 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-003", - 'result' => "regex-query-003") , - - 20 => array('data' => "ex11.2.3.6_0.n3", - 'query' => "ex11.2.3.6_0", - 'result' => "ex11.2.3.6_0") , - - 21 => array('data' => "data-bool1.n3", - 'query' => "query-bev-3", - 'result' => "query-bev-3") , - - 22 => array('data' => "data-bool1.n3", - 'query' => "query-bev-4", - 'result' => "query-bev-4") , - - 23 => array('data' => "data-fil1.n3", - 'query' => "q-str-2", - 'result' => "q-str-2") , - - 24 => array('data' => "data-fil1.n3", - 'query' => "q-str-3", - 'result' => "q-str-3") , - - 25 => array('data' => "data-fil1.n3", - 'query' => "q-str-4", - 'result' => "q-str-4") , - - 26 => array('data' => "data-fil1.n3", - 'query' => "q-blank-1", - 'result' => "q-blank-1") , - - // changed because of our N3 Parser - 27 => array('data' => "data-fil1_changed.n3", - 'query' => "q-datatype-1", - 'result' => "q-datatype-1") , - - - // FAILS: because no type error is thrown (compare xsd:date typed with - // untyped Literal) - 29 => array('data' => "ex11_0.n3", - 'query' => "ex11_0", - 'result' => "ex11_0") , - - 30 => array('data' => "ex11_0.n3", - 'query' => "ex11_1", - 'result' => "ex11_1") , - - 31 => array(('data') => "ex11.2.3.1_1.n3", - 'query' => "ex11.2.3.1_1", - 'result' => "ex11.2.3.1_1") , -/**/ - 32 => array(('data') => "ex11.2.3.2_0.n3", - 'query' => "ex11.2.3.2_0", - 'result' => "ex11.2.3.2_0") , - - 33 => array('data' => "data-fil1.n3", - 'query' => "q-uri-1", - 'result' => "q-uri-1") , - - 34 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-1", - 'result' => "q-langMatches-1") , - - 35 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-2", - 'result' => "q-langMatches-2") , - - 36 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-3", - 'result' => "q-langMatches-3") , - - // FAILS: langMatches(String String) returns false if first arg is no Literal -//FIXME: cweiske thinks the test is broken or he does not understand it -// 37 => array('data' => "data-langMatches.n3", -// 'query' => "q-langMatches-4", -// 'result' => "q-langMatches-4") , - - - 38 => array('data' => "data-eq.n3", - 'query' => "query-eq-1", - 'result' => "query-eq-1") , - - 39 => array('data' => "data-eq.n3", - 'query' => "query-eq-2", - 'result' => "query-eq-2") , - - 39 => array('data' => "data-eq.n3", - 'query' => "query-eq-2", - 'result' => "query-eq-2") , - - 40 => array('data' => "data-eq.n3", - 'query' => "query-eq-3", - 'result' => "query-eq-3") , - - 41 => array('data' => "data-eq.n3", - 'query' => "query-eq-4", - 'result' => "query-eq-4") , - - 42 => array('data' => "data-eq.n3", - 'query' => "query-eq-5", - 'result' => "query-eq-5") , -//test is broken - query results and query return variables don't even match -// 43 => array('data' => "data-eq.n3", -// 'query' => "query-eq2-1", -// 'result' => "query-eq2-1") , - -/**/ - - 45 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-1", - 'result' => "query-eq-graph-1") , - - 46 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-2", - 'result' => "query-eq-graph-2") , - - 47 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-3", - 'result' => "query-eq-graph-3") , - - 48 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-4", - 'result' => "query-eq-graph-4") , -/**/ -); - - - -$_SESSION['sparql_arq_tests'] = array( -/**/ - (1) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-1", - 'result' => "q-base-prefix-1") , - - (2) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-2", - 'result' => "q-base-prefix-2") , - - (3) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-3", - 'result' => "q-base-prefix-3") , - - (4) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-4", - 'result' => "q-base-prefix-4") , - - (5) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-5", - 'result' => "q-base-prefix-5") , - - (6) => array('data' => "data-construct1.n3", - 'query' => "q-construct-1", - 'result' => "q-construct-1") , - - - (8) => array('data' => "data-construct1.n3", - 'query' => "q-construct-2", - 'result' => "q-construct-2") , - - (9) => array('data' => "reif-data-1.n3", - 'query' => "q-reif-1", - 'result' => "q-reif-1") , - - (10) => array('data' => "reif-data-2.n3", - 'query' => "q-reif-2", - 'result' => "q-reif-2") , - - (11) => array('data' => "model0.nt", - 'query' => "test-0-01", - 'result' => "test-0-01") , - - (12) => array('data' => "model0.nt", - 'query' => "test-0-02", - 'result' => "test-0-02") , - - (13) => array('data' => "model0.nt", - 'query' => "test-0-03", - 'result' => "test-0-03") , - - (14) => array('data' => "model0.nt", - 'query' => "test-0-04", - 'result' => "test-0-04") , - - (15) => array('data' => "model1.nt", - 'query' => "test-1-01", - 'result' => "test-1-01") , - - (16) => array('data' => "model1.nt", - 'query' => "test-1-02", - 'result' => "test-1-02") , - - (17) => array('data' => "model1.nt", - 'query' => "test-1-03", - 'result' => "test-1-03") , - - (18) => array('data' => "model1.nt", - 'query' => "test-1-04", - 'result' => "test-1-04") , - - (19) => array('data' => "model1.nt", - 'query' => "test-1-05", - 'result' => "test-1-05") , - - - (20) => array('data' => "model1.nt", - 'query' => "test-1-06", - 'result' => "test-1-06") , - - (21) => array('data' => "model1.nt", - 'query' => "test-1-07", - 'result' => "test-1-07") , - - (22) => array('data' => "model1.nt", - 'query' => "test-1-08", - 'result' => "test-1-08") , - - (23) => array('data' => "model1.nt", - 'query' => "test-1-09", - 'result' => "test-1-09") , - - (24) => array('data' => "model1.nt", - 'query' => "test-1-10", - 'result' => "test-1-10") , - - (25) => array('data' => "model1.nt", - 'query' => "test-2-01", - 'result' => "test-2-01") , - - (26) => array('data' => "model1.nt", - 'query' => "test-2-02", - 'result' => "test-2-02") , - - (27) => array('data' => "model1.nt", - 'query' => "test-2-03", - 'result' => "test-2-03") , - - (28) => array('data' => "model1.nt", - 'query' => "test-2-04", - 'result' => "test-2-04") , - - (29) => array('data' => "model1.nt", - 'query' => "test-2-05", - 'result' => "test-2-05") , - - (30) => array('data' => "model1.nt", - 'query' => "test-2-06", - 'result' => "test-2-06") , - - (31) => array('data' => "model1.nt", - 'query' => "test-2-07", - 'result' => "test-2-07") , - - (32) => array('data' => "model1.nt", - 'query' => "test-2-08", - 'result' => "test-2-08") , - - (33) => array('data' => "model1.nt", - 'query' => "test-2-09", - 'result' => "test-2-09") , - - (34) => array('data' => "model1.nt", - 'query' => "test-2-10", - 'result' => "test-2-10") , -/**/ - (35) => array('data' => "model1.nt", - 'query' => "test-3-01", - 'result' => "test-3-01") , - - (36) => array('data' => "model1.nt", - 'query' => "test-3-02", - 'result' => "test-3-02") , - - (37) => array('data' => "model1.nt", - 'query' => "test-3-03", - 'result' => "test-3-03") , - - // mehr als eine CONSTRAINT?? - (38) => array('data' => "model1.nt", - 'query' => "test-3-04", - 'result' => "test-3-04") , - - (39) => array('data' => "model1.nt", - 'query' => "test-3-05", - 'result' => "test-3-05") , - - (40) => array('data' => "model1.nt", - 'query' => "test-3-06", - 'result' => "test-3-06") , - - (41) => array('data' => "model5.nt", - 'query' => "test-3-07", - 'result' => "test-3-07") , - - (42) => array('data' => "model2.nt", - 'query' => "test-4-01", - 'result' => "test-4-01") , - - (43) => array('data' => "model2.nt", - 'query' => "test-4-02", - 'result' => "test-4-02") , - - (44) => array('data' => "model2.nt", - 'query' => "test-4-03", - 'result' => "test-4-03") , - - (45) => array('data' => "model2.nt", - 'query' => "test-4-04", - 'result' => "test-4-04") , - - (46) => array('data' => "model3.nt", - 'query' => "test-4-05", - 'result' => "test-4-05") , - - //ARQ fails - (47) => array('data' => "model3.nt", - 'query' => "test-4-06", - 'result' => "test-4-06") , - - (48) => array('data' => "model3.nt", - 'query' => "test-4-07", - 'result' => "test-4-07") , - - (49) => array('data' => "model4.nt", - 'query' => "test-5-01", - 'result' => "test-5-01") , -/**/ - (50) => array('data' => "model4.nt", - 'query' => "test-5-02", - 'result' => "test-5-02") , - - (51) => array('data' => "model4.nt", - 'query' => "test-5-03", - 'result' => "test-5-03") , - - (52) => array('data' => "model4.nt", - 'query' => "test-5-04", - 'result' => "test-5-04") , - - (53) => array('data' => "model4.nt", - 'query' => "test-6-01", - 'result' => "test-6-01") , - - (54) => array('data' => "model4.nt", - 'query' => "test-6-02", - 'result' => "test-6-02") , - - (55) => array('data' => "model4.nt", - 'query' => "test-6-03", - 'result' => "test-6-03") , - - (56) => array('data' => "model6.nt", - 'query' => "test-7-01", - 'result' => "test-7-01") , - - (57) => array('data' => "model6.nt", - 'query' => "test-7-02", - 'result' => "test-7-02") , - - (58) => array('data' => "model7.nt", - 'query' => "test-7-03", - 'result' => "test-7-03") , - - (59) => array('data' => "model7.nt", - 'query' => "test-7-04", - 'result' => "test-7-04") , - - (60) => array('data' => "model1.nt", - 'query' => "test-9-01", - 'result' => "test-9-01") , - - (60) => array('data' => "model1.nt", - 'query' => "test-9-02", - 'result' => "test-9-02") , - // FAILS: untyped Literal "value" == typed Literal "value"^^xsd:string ? - (61) => array('data' => "model8.n3", - 'query' => "test-B-01", - 'result' => "test-B-01") , - - (62) => array('data' => "model8.n3", - 'query' => "test-B-02", - 'result' => "test-B-02") , - - (63) => array('data' => "model8.n3", - 'query' => "test-B-03", - 'result' => "test-B-03") , - - (64) => array('data' => "model8.n3", - 'query' => "test-B-04", - 'result' => "test-B-04") , - - (65) => array('data' => "model8.n3", - 'query' => "test-B-05", - 'result' => "test-B-05") , -/**/ - ///////////// model9.n3 changed because of N3 Parser - (67) => array('data' => "model9.n3", - 'query' => "test-B-08", - 'result' => "test-B-08") , - - (68) => array('data' => "model9.n3", - 'query' => "test-B-09", - 'result' => "test-B-09") , - - (69) => array('data' => "model9.n3", - 'query' => "test-B-10", - 'result' => "test-B-10") , - - (70) => array('data' => "model9.n3", - 'query' => "test-B-11", - 'result' => "test-B-11") , - // FAILS because of type error - (71) => array('data' => "model9.n3", - 'query' => "test-B-12", - 'result' => "test-B-12") , - - (72) => array('data' => "model9.n3", - 'query' => "test-B-13", - 'result' => "test-B-13") , - - // FAILS because 5==true - (73) => array('data' => "model9.n3", - 'query' => "test-B-15", - 'result' => "test-B-15") , - - // FAILS because of type error - (74) => array('data' => "model9.n3", - 'query' => "test-B-17", - 'result' => "test-B-17") , - - // FAILS because of type error - (75) => array('data' => "model9.n3", - 'query' => "test-B-18", - 'result' => "test-B-18") , - - - (76) => array('data' => "model9.n3", - 'query' => "test-B-19", - 'result' => "test-B-19") , - // FAILS because of type error - (77) => array('data' => "model9.n3", - 'query' => "test-B-20", - 'result' => "test-B-20") , -); - - - -$_SESSION['sparql_ask_tests'] = array( - 1 => array('data' => 'dawg-query-001.n3', - 'query' => "ask-01", - 'result' => "ask-01"), - 2 => array('data' => 'dawg-query-001.n3', - 'query' => "count-02", - 'result' => "count-02"), -); - - -require_once dirname(__FILE__) . '/cases_dawg2.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserFilter.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserFilter.php.svn-base deleted file mode 100755 index 935c8457..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserFilter.php.svn-base +++ /dev/null @@ -1,406 +0,0 @@ - -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER (?s = ?o)} -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?s', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?o', 'quoted' => false) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER (! bound(?s))} -EOT -, - array( - 'negated' => true, - 'type' => 'function', - 'name' => 'bound', - 'parameter' => array( - array('type' => 'value', 'value' => '?s', 'quoted' => false) - ), - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER(?date < xsd:dateTime("2005-01-01T00:00:00Z"))} -EOT -, - array( - 'type' => 'equation', - 'operator' => '<', - 'operand1' => array('type' => 'value', 'value' => '?date', 'quoted' => false), - 'operand2' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '2005-01-01T00:00:00Z', - 'quoted' => true - ) - ) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER ( (?mbox1 = ?mbox2) && (?name1 != ?name2) )} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?mbox1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?mbox2', 'quoted' => false) - ), - 'operand2' => array( - 'type' => 'equation', - 'operator' => '!=', - 'operand1' => array('type' => 'value', 'value' => '?name1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?name2', 'quoted' => false) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER ( ?mbox1 = ?mbox2 && ?name1 != ?name2 )} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?mbox1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?mbox2', 'quoted' => false) - ), - 'operand2' => array( - 'type' => 'equation', - 'operator' => '!=', - 'operand1' => array('type' => 'value', 'value' => '?name1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?name2', 'quoted' => false) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER regex(str(?mbox), "@work.example")} -EOT -, - array( - 'type' => 'function', - 'name' => 'regex', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array('type' => 'value', 'value' => '?mbox', 'quoted' => false) - ) - ), - array( - 'type' => 'value', - 'value' => '@work.example', - 'quoted' => true - ) - ), - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER str(str(str(str(?mbox))))} -EOT -, - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?mbox', - 'quoted' => false - ) - ) - ) - ) - ) - ) - ) - ) - ) - ), - - array( -<< -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = 1.0) - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?v', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '1.0', 'quoted' => false), - ) - ), - - array( -<< -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } -EOT -, - array( - 'type' => 'value', - 'value' => '?v', - 'quoted' => false - ) - ), - - array( -<< -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( xsd:dateTime(?date) < xsd:dateTime("2005-01-01T00:00:00Z") ) - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '<', - 'operand1' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array('type' => 'value', 'value' => '?date', 'quoted' => false), - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '2005-01-01T00:00:00Z', - 'quoted' => true - ) - ) - ) - ) - ), - - array( -<< -PREFIX xsd: - -SELECT ?p, ?o - { ?s ?p ?o . FILTER (!!!isLiteral(?o)). } -EOT -, - array( - 'negated' => true, - 'type' => 'function', - 'name' => 'isLiteral', - 'parameter' => array( - array('type' => 'value', 'value' => '?o', 'quoted' => false) - ), - ) - ), - - array( -<< -PREFIX : -SELECT ?a -WHERE { ?a :p ?v . FILTER ( ! ?v ) . } -EOT -, - array( - 'negated' => true, - 'type' => 'value', - 'value' => '?v', - 'quoted' => false - ) - ), -/**/ - array( -<< -PREFIX : -SELECT ?a -WHERE { ?a :p ?v . FILTER ("true"^^xsd:boolean && ?v) .} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'value', - 'value' => 'true', - 'quoted' => true, - 'datatype' => 'http://www.w3.org/2001/XMLSchema#boolean' - ), - 'operand2' => array('type' => 'value', 'value' => '?v', 'quoted' => false), - ) - ), - array( -<< 'equation', - 'operator' => '=', - 'operand1' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?z', - 'quoted' => false - ) - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => 'value', - 'quoted' => true, - 'language' => 'en' - ) - ) - ) - ) - ), - array( -<<) ) . - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?x', - 'quoted' => false - ) - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '', - 'quoted' => false - ) - ) - ) - ) - ), - array( -<<) -} -ORDER BY ?Res -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?Res', 'quoted' => false), - 'operand2' => array( - 'type' => 'value', - 'value' => '', - 'quoted'=> false - ) - ) - ), -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserNested.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserNested.php.svn-base deleted file mode 100755 index 72db3d02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/casesParserNested.php.svn-base +++ /dev/null @@ -1,146 +0,0 @@ - -*/ -$GLOBALS['testSparqlParserTestsNested'] = array( - array(<< 'asd'} - UNION - {?person3 'three'} - } - } - UNION - {?person2 '2'} - } - ?d ?e ?f -} -EOT - , << -PREFIX rdf: -PREFIX rdfs: -SELECT DISTINCT ?Res ?Attr ?Val -WHERE -{ - { - ?Res rdf:type ?_v1 . - { - ?Res foaf:name ?_v2 FILTER regex(?_v2,"^Alexander Loeser$", "i") - } - UNION - { - ?Res rdfs:label ?_v3 FILTER regex(?_v3,"^Alexander Loeser$", "i") - } - } - ?Res ?Attr ?Val -} -ORDER BY ?Res -EOT - , << -PREFIX rdf: - -SELECT ?name ?mbox -WHERE - { - { ?person rdf:type foaf:Person } . - OPTIONAL { ?person foaf:name ?name } . - OPTIONAL {?person foaf:mbox ?mbox} . - } - UNION - { - { ?person2 rdf:kind foaf:Person } . - OPTIONAL {?person2 ?mbox. ?person2 rdf:laughs ?atyou } . - } -EOT - , << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)). OPTIONAL { ?s ?p ?value} } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT - , << \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases_dawg2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases_dawg2.php.svn-base deleted file mode 100755 index e49e0341..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/cases_dawg2.php.svn-base +++ /dev/null @@ -1,2770 +0,0 @@ - - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#bgp-no-match', - 'title' => 'Non-matching triple pattern', - 'data' => 'w3c-dawg2/data-r2/basic/data-7.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/bgp-no-match.rq', - 'result' => 'w3c-dawg2/data-r2/basic/bgp-no-match.srx', - ), - 1 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#prefix-name-1', - 'title' => 'Prefix name 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-6.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/prefix-name-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/prefix-name-1.srx', - ), - 2 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#spoo-1', - 'title' => 'Basic graph pattern - spoo', - 'data' => 'w3c-dawg2/data-r2/basic/data-6.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/spoo-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/spoo-1.srx', - ), - 3 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-1', - 'title' => 'Basic - Prefix/Base 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-1.srx', - ), - 4 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-2', - 'title' => 'Basic - Prefix/Base 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-2.srx', - ), - 5 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-3', - 'title' => 'Basic - Prefix/Base 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-3.srx', - ), - 6 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-4', - 'title' => 'Basic - Prefix/Base 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-4.srx', - ), - 7 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-5', - 'title' => 'Basic - Prefix/Base 5', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-5.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-5.srx', - ), - 8 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-1', - 'title' => 'Basic - List 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-1.srx', - ), - 9 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-2', - 'title' => 'Basic - List 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-2.srx', - ), - 10 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-3', - 'title' => 'Basic - List 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-3.srx', - ), - 11 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-4', - 'title' => 'Basic - List 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-4.srx', - ), - 12 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-1', - 'title' => 'Basic - Quotes 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-1.srx', - ), - 13 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-2', - 'title' => 'Basic - Quotes 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-2.srx', - ), - 14 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-3', - 'title' => 'Basic - Quotes 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-3.srx', - ), - 15 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-4', - 'title' => 'Basic - Quotes 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-4.srx', - ), - 16 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-1', - 'title' => 'Basic - Term 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-1.srx', - ), - 17 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-2', - 'title' => 'Basic - Term 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-2.srx', - ), - 18 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-3', - 'title' => 'Basic - Term 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-3.srx', - ), - 19 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-4', - 'title' => 'Basic - Term 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-4.srx', - ), - 20 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-5', - 'title' => 'Basic - Term 5', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-5.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-5.srx', - ), - 21 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-6', - 'title' => 'Basic - Term 6', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-6.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-6.srx', - ), - 22 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-7', - 'title' => 'Basic - Term 7', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-7.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-7.srx', - ), - 23 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-8', - 'title' => 'Basic - Term 8', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-8.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-8.srx', - ), - 24 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-9', - 'title' => 'Basic - Term 9', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-9.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-9.srx', - ), - 25 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#var-1', - 'title' => 'Basic - Var 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-5.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/var-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/var-1.srx', - ), - 26 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#var-2', - 'title' => 'Basic - Var 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-5.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/var-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/var-2.srx', - ), - 27 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-001', - 'title' => 'dawg-triple-pattern-001', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-01.ttl', - ), - 28 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-002', - 'title' => 'dawg-triple-pattern-002', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-02.ttl', - ), - 29 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-003', - 'title' => 'dawg-triple-pattern-003', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-02.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-03.ttl', - ), - 30 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-004', - 'title' => 'dawg-triple-pattern-004', - 'data' => 'w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-04.ttl', - ), - 31 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-01', - 'title' => 'open-eq-01', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-01.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-01-result.srx', - ), - 32 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-02', - 'title' => 'open-eq-02', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-02.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-02-result.srx', - ), - 33 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-03', - 'title' => 'open-eq-03', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-03.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-03-result.srx', - ), - 34 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-04', - 'title' => 'open-eq-04', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-04.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-04-result.srx', - ), - 35 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-05', - 'title' => 'open-eq-05', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-05.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-05-result.srx', - ), - 36 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-06', - 'title' => 'open-eq-06', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-06.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-06-result.srx', - ), - 37 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-07', - 'title' => 'open-eq-07', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-07.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-07-result.srx', - ), - 38 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-08', - 'title' => 'open-eq-08', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-08.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-08-result.srx', - ), - 39 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-09', - 'title' => 'open-eq-09', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-09.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-09-result.srx', - ), - 40 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-10', - 'title' => 'open-eq-10', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-10.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-10-result.srx', - ), - 41 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-11', - 'title' => 'open-eq-11', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-11.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-11-result.srx', - ), - 42 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-12', - 'title' => 'open-eq-12', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-12.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-12-result.srx', - ), - 43 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-2', - 'title' => 'date-2', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-2.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-2-result.srx', - ), - 44 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-3', - 'title' => 'date-3', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-3.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-3-result.srx', - ), - 45 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-4', - 'title' => 'date-4', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-4.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-4-result.srx', - ), - 46 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-01', - 'title' => 'open-cmp-01', - 'data' => 'w3c-dawg2/data-r2/open-world/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-cmp-01.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx', - ), - 47 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-02', - 'title' => 'open-cmp-02', - 'data' => 'w3c-dawg2/data-r2/open-world/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-cmp-02.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx', - ), - 48 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-1', - 'title' => 'Join operator with OPTs, BGPs, and UNIONs', - 'data' => 'w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/join-combo-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/join-combo-1.srx', - ), - 49 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-2', - 'title' => 'Join operator with Graph and Union', - 'data' => 'w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/join-combo-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/join-combo-2.srx', - ), - 50 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-1', - 'title' => 'Nested Optionals - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.srx', - ), - 51 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-2', - 'title' => 'Nested Optionals - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx', - ), - 52 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-1', - 'title' => 'Optional-filter - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.srx', - ), - 53 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-2', - 'title' => 'Optional-filter - 2 filters', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.srx', - ), - 54 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-3', - 'title' => 'Optional-filter - scope of variable', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.srx', - ), - 55 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-1', - 'title' => 'Filter-placement - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-1.srx', - ), - 56 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-2', - 'title' => 'Filter-placement - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-2.srx', - ), - 57 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-3', - 'title' => 'Filter-placement - 3', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-3.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-3.srx', - ), - 58 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-nested-1', - 'title' => 'Filter-nested - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-nested-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-nested-1.srx', - ), - 59 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-nested-2', - 'title' => 'Filter-nested - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-nested-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-nested-2.srx', - ), - 60 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-scope-1', - 'title' => 'Filter-scope - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-scope-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-scope-1.srx', - ), - 61 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-scope-1', - 'title' => 'Join scope - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.srx', - ), - 62 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bnode-coreference/manifest#dawg-bnode-coref-001', - 'title' => 'dawg-bnode-coreference', - 'data' => 'w3c-dawg2/data-r2/bnode-coreference/data.ttl', - 'query' => 'w3c-dawg2/data-r2/bnode-coreference/query.rq', - 'result' => 'w3c-dawg2/data-r2/bnode-coreference/result.ttl', - ), - 63 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-1', - 'title' => 'Complex optional semantics: 1', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl', - ), - 64 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-2', - 'title' => 'Complex optional semantics: 2', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl', - ), - 65 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-3', - 'title' => 'Complex optional semantics: 3', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl', - ), - 66 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-4', - 'title' => 'Complex optional semantics: 4', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-4.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl', - ), - 67 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-001', - 'title' => 'One optional clause', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-1.ttl', - ), - 68 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-002', - 'title' => 'Two optional clauses', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-2.ttl', - ), - 69 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-union-001', - 'title' => 'Union is not optional', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-3.ttl', - ), - 70 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-001', - 'title' => 'OPTIONAL-FILTER', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl', - ), - 71 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-002', - 'title' => 'OPTIONAL - Outer FILTER', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl', - ), - 72 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-003', - 'title' => 'OPTIONAL - Outer FILTER with BOUND', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl', - ), - 73 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-01', - 'title' => 'graph-01', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-01.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-01.ttl', - ), - 74 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-04', - 'title' => 'graph-04', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-04.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-04.ttl', - ), - 75 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-05', - 'title' => 'graph-05', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-05.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-05.ttl', - ), - 76 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-06', - 'title' => 'graph-06', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-06.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-06.ttl', - ), - 77 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-07', - 'title' => 'graph-07', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-07.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-07.ttl', - ), - 78 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-08', - 'title' => 'graph-08', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-08.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-08.ttl', - ), - 79 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-09', - 'title' => 'graph-09', - 'data' => 'w3c-dawg2/data-r2/graph/data-g3.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-09.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-09.ttl', - ), - 80 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-10', - 'title' => 'graph-10', - 'data' => 'w3c-dawg2/data-r2/graph/data-g3.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-10.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-10.ttl', - ), - 81 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-11', - 'title' => 'graph-11', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-11.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-11.ttl', - ), - 82 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-str', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-str.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-str.srx', - ), - 83 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-flt', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-flt.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-flt.srx', - ), - 84 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dbl', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dbl.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dbl.srx', - ), - 85 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dec', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dec.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dec.srx', - ), - 86 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-int', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-int.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-int.srx', - ), - 87 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dT', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dT.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dT.srx', - ), - 88 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-bool', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-bool.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-bool.srx', - ), - 89 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-boolean-literal', - 'title' => 'Test literal \'true\'', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl', - ), - 90 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-1', - 'title' => 'Test \'boolean effective value\' - true', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl', - ), - 91 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-2', - 'title' => 'Test \'boolean effective value\' - false', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl', - ), - 92 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-3', - 'title' => 'Test \'boolean effective value\' - &&', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl', - ), - 93 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-4', - 'title' => 'Test \'boolean effective value\' - ||', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl', - ), - 94 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-5', - 'title' => 'Test \'boolean effective value\' - optional', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl', - ), - 95 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-6', - 'title' => 'Test \'boolean effective value\' - unknown types', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl', - ), - 96 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bound/manifest#dawg-bound-query-001', - 'title' => 'dawg-bound-query-001', - 'data' => 'w3c-dawg2/data-r2/bound/data.ttl', - 'query' => 'w3c-dawg2/data-r2/bound/bound1.rq', - 'result' => 'w3c-dawg2/data-r2/bound/bound1-result.ttl', - ), - 97 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isLiteral-1', - 'title' => 'isLiteral', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl', - ), - 98 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-1', - 'title' => 'str-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl', - ), - 99 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-2', - 'title' => 'str-2', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl', - ), - 100 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-3', - 'title' => 'str-3', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl', - ), - 101 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-4', - 'title' => 'str-4', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl', - ), - 102 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isBlank-1', - 'title' => 'isBlank-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl', - ), - 103 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-1', - 'title' => 'datatype-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl', - ), - 104 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-2', - 'title' => 'datatype-2 : Literals with a datatype', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx', - ), - 105 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-3', - 'title' => 'datatype-3 : Literals with a datatype of xsd:string', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx', - ), - 106 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-1', - 'title' => 'lang-1 : Literals with a lang tag of some kind', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx', - ), - 107 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-2', - 'title' => 'lang-2 : Literals with a lang tag of \'\'', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx', - ), - 108 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-3', - 'title' => 'lang-3 : Graph matching with lang tag being a different case', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx', - ), - 109 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isURI-1', - 'title' => 'isURI-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl', - ), - 110 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isIRI-1', - 'title' => 'isIRI-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl', - ), - 111 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-1', - 'title' => 'LangMatches-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl', - ), - 112 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-2', - 'title' => 'LangMatches-2', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl', - ), - 113 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-3', - 'title' => 'LangMatches-3', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl', - ), - 114 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-4', - 'title' => 'LangMatches-4', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl', - ), - 115 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-basic', - 'title' => 'LangMatches-basic', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl', - ), - 116 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#lang-case-insensitive-eq', - 'title' => 'lang-case-insensitive-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx', - ), - 117 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#lang-case-insensitive-ne', - 'title' => 'lang-case-insensitive-ne', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx', - ), - 118 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-simple', - 'title' => 'sameTerm-simple', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl', - ), - 119 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-eq', - 'title' => 'sameTerm-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl', - ), - 120 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-not-eq', - 'title' => 'sameTerm-not-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl', - ), - 121 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#unplus-1', - 'title' => 'Unary Plusn', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx', - ), - 122 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#unminus-1', - 'title' => 'Unary Minus', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx', - ), - 123 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#plus-1', - 'title' => 'Addition', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-plus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-plus-1.srx', - ), - 124 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#minus-1', - 'title' => 'Subtraction', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-minus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-minus-1.srx', - ), - 125 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#mul-1', - 'title' => 'Multiplication', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-mul-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-mul-1.srx', - ), - 126 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#ge-1', - 'title' => 'Greater-than or equals', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-ge-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-ge-1.srx', - ), - 127 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#le-1', - 'title' => 'Less-than or equals', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-le-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-le-1.srx', - ), - 128 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-1', - 'title' => 'Equality 1-1', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl', - ), - 129 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2', - 'title' => 'Equality 1-2', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl', - ), - 130 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-3', - 'title' => 'Equality 1-3', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl', - ), - 131 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-4', - 'title' => 'Equality 1-4', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl', - ), - 132 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-5', - 'title' => 'Equality 1-5', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-5.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl', - ), - 133 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2-1', - 'title' => 'Equality - 2 var - test equals', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl', - ), - 134 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2-2', - 'title' => 'Equality - 2 var - test not equals ', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl', - ), - 135 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-1', - 'title' => 'Equality 1-1 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl', - ), - 136 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-2', - 'title' => 'Equality 1-2 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl', - ), - 137 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-3', - 'title' => 'Equality 1-3 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl', - ), - 138 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-4', - 'title' => 'Equality 1-4 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl', - ), - 139 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-5', - 'title' => 'Equality 1-5 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl', - ), - 140 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-001', - 'title' => 'regex-query-001', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-001.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-001.ttl', - ), - 141 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-002', - 'title' => 'regex-query-002', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-002.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-002.ttl', - ), - 142 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-003', - 'title' => 'regex-query-003', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-003.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-003.ttl', - ), - 143 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-004', - 'title' => 'regex-query-004', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-004.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-004.ttl', - ), - 144 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/construct/manifest#construct-1', - 'title' => 'dawg-construct-identity', - 'data' => 'w3c-dawg2/data-r2/construct/data-ident.ttl', - 'query' => 'w3c-dawg2/data-r2/construct/query-ident.rq', - 'result' => 'w3c-dawg2/data-r2/construct/result-ident.ttl', - ), - 145 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-1', - 'title' => 'ASK-1 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-1.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-1.srx', - ), - 146 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-4', - 'title' => 'ASK-4 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-4.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-4.srx', - ), - 147 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-7', - 'title' => 'ASK-7 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-7.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-7.srx', - ), - 148 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-8', - 'title' => 'ASK-8 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-8.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-8.srx', - ), - 149 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-star-1', - 'title' => 'SELECT DISTINCT *', - 'data' => 'w3c-dawg2/data-r2/distinct/data-star.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-star-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-star-1.srx', - ), - 150 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-1', - 'title' => 'Numbers: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-num.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-num.srx', - ), - 151 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-1', - 'title' => 'Numbers: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-num.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-num.srx', - ), - 152 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-2', - 'title' => 'Strings: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-str.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-str.srx', - ), - 153 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-2', - 'title' => 'Strings: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-str.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-str.srx', - ), - 154 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-3', - 'title' => 'Nodes: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-node.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-node.srx', - ), - 155 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-3', - 'title' => 'Nodes: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-node.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-node.srx', - ), - 156 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-4', - 'title' => 'Opt: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-2.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-opt.srx', - ), - 157 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-4', - 'title' => 'Opt: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-2.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-opt.srx', - ), - 158 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-9', - 'title' => 'All: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-all.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-all.srx', - ), - 159 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-9', - 'title' => 'All: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-all.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-all.srx', - ), - 160 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-1', - 'title' => 'sort-1', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-1.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-1.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-1.rdf', - ), - 161 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-2', - 'title' => 'sort-2', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-1.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-2.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-2.rdf', - ), - 162 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-3', - 'title' => 'sort-3', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-3.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-3.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-3.rdf', - ), - 163 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-4', - 'title' => 'sort-4', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-4.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-4.rdf', - ), - 164 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-5', - 'title' => 'sort-5', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-4.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-5.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-5.rdf', - ), - 165 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-6', - 'title' => 'sort-6', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-6.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-6.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-6.rdf', - ), - 166 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-7', - 'title' => 'sort-7', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-7.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-7.rdf', - ), - 167 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-8', - 'title' => 'sort-8', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-8.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-8.rdf', - ), - 168 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-9', - 'title' => 'sort-9', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-9.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-9.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-9.rdf', - ), - 169 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-10', - 'title' => 'sort-10', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-9.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-10.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-10.rdf', - ), - 170 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-numbers', - 'title' => 'Expression sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-numbers.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-numbers.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-numbers.ttl', - ), - 171 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-builtin', - 'title' => 'Builtin sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-builtin.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-builtin.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-builtin.ttl', - ), - 172 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-function', - 'title' => 'Function sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-function.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-function.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-function.ttl', - ), - 173 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-01', - 'title' => 'syntax-basic-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq', - 'type' => 'syntax-positive', - ), - 174 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-02', - 'title' => 'syntax-basic-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq', - 'type' => 'syntax-positive', - ), - 175 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-03', - 'title' => 'syntax-basic-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq', - 'type' => 'syntax-positive', - ), - 176 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-04', - 'title' => 'syntax-basic-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq', - 'type' => 'syntax-positive', - ), - 177 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-05', - 'title' => 'syntax-basic-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq', - 'type' => 'syntax-positive', - ), - 178 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-06', - 'title' => 'syntax-basic-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq', - 'type' => 'syntax-positive', - ), - 179 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-01', - 'title' => 'syntax-qname-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq', - 'type' => 'syntax-positive', - ), - 180 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-02', - 'title' => 'syntax-qname-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq', - 'type' => 'syntax-positive', - ), - 181 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-03', - 'title' => 'syntax-qname-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq', - 'type' => 'syntax-positive', - ), - 182 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-04', - 'title' => 'syntax-qname-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq', - 'type' => 'syntax-positive', - ), - 183 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-05', - 'title' => 'syntax-qname-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq', - 'type' => 'syntax-positive', - ), - 184 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-06', - 'title' => 'syntax-qname-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq', - 'type' => 'syntax-positive', - ), - 185 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-07', - 'title' => 'syntax-qname-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq', - 'type' => 'syntax-positive', - ), - 186 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-08', - 'title' => 'syntax-qname-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq', - 'type' => 'syntax-positive', - ), - 187 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-01', - 'title' => 'syntax-lit-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq', - 'type' => 'syntax-positive', - ), - 188 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-02', - 'title' => 'syntax-lit-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq', - 'type' => 'syntax-positive', - ), - 189 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-03', - 'title' => 'syntax-lit-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq', - 'type' => 'syntax-positive', - ), - 190 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-04', - 'title' => 'syntax-lit-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq', - 'type' => 'syntax-positive', - ), - 191 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-05', - 'title' => 'syntax-lit-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq', - 'type' => 'syntax-positive', - ), - 192 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-06', - 'title' => 'syntax-lit-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq', - 'type' => 'syntax-positive', - ), - 193 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-07', - 'title' => 'syntax-lit-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq', - 'type' => 'syntax-positive', - ), - 194 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-08', - 'title' => 'syntax-lit-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq', - 'type' => 'syntax-positive', - ), - 195 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-09', - 'title' => 'syntax-lit-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq', - 'type' => 'syntax-positive', - ), - 196 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-10', - 'title' => 'syntax-lit-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq', - 'type' => 'syntax-positive', - ), - 197 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-11', - 'title' => 'syntax-lit-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq', - 'type' => 'syntax-positive', - ), - 198 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-12', - 'title' => 'syntax-lit-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq', - 'type' => 'syntax-positive', - ), - 199 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-13', - 'title' => 'syntax-lit-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq', - 'type' => 'syntax-positive', - ), - 200 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-14', - 'title' => 'syntax-lit-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq', - 'type' => 'syntax-positive', - ), - 201 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-15', - 'title' => 'syntax-lit-15.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq', - 'type' => 'syntax-positive', - ), - 202 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-16', - 'title' => 'syntax-lit-16.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq', - 'type' => 'syntax-positive', - ), - 203 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-17', - 'title' => 'syntax-lit-17.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq', - 'type' => 'syntax-positive', - ), - 204 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-18', - 'title' => 'syntax-lit-18.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq', - 'type' => 'syntax-positive', - ), - 205 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-19', - 'title' => 'syntax-lit-19.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq', - 'type' => 'syntax-positive', - ), - 206 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-20', - 'title' => 'syntax-lit-20.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq', - 'type' => 'syntax-positive', - ), - 207 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-01', - 'title' => 'syntax-struct-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq', - 'type' => 'syntax-positive', - ), - 208 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-02', - 'title' => 'syntax-struct-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq', - 'type' => 'syntax-positive', - ), - 209 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-03', - 'title' => 'syntax-struct-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq', - 'type' => 'syntax-positive', - ), - 210 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-05', - 'title' => 'syntax-struct-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq', - 'type' => 'syntax-positive', - ), - 211 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-06', - 'title' => 'syntax-struct-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq', - 'type' => 'syntax-positive', - ), - 212 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-07', - 'title' => 'syntax-struct-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq', - 'type' => 'syntax-positive', - ), - 213 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-08', - 'title' => 'syntax-struct-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq', - 'type' => 'syntax-positive', - ), - 214 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-09', - 'title' => 'syntax-struct-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq', - 'type' => 'syntax-positive', - ), - 215 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-10', - 'title' => 'syntax-struct-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq', - 'type' => 'syntax-positive', - ), - 216 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-11', - 'title' => 'syntax-struct-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq', - 'type' => 'syntax-positive', - ), - 217 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-12', - 'title' => 'syntax-struct-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq', - 'type' => 'syntax-positive', - ), - 218 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-13', - 'title' => 'syntax-struct-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq', - 'type' => 'syntax-positive', - ), - 219 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-14', - 'title' => 'syntax-struct-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq', - 'type' => 'syntax-positive', - ), - 220 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-01', - 'title' => 'syntax-lists-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq', - 'type' => 'syntax-positive', - ), - 221 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-02', - 'title' => 'syntax-lists-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq', - 'type' => 'syntax-positive', - ), - 222 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-03', - 'title' => 'syntax-lists-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq', - 'type' => 'syntax-positive', - ), - 223 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-04', - 'title' => 'syntax-lists-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq', - 'type' => 'syntax-positive', - ), - 224 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-05', - 'title' => 'syntax-lists-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq', - 'type' => 'syntax-positive', - ), - 225 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-01', - 'title' => 'syntax-bnodes-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq', - 'type' => 'syntax-positive', - ), - 226 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-02', - 'title' => 'syntax-bnodes-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq', - 'type' => 'syntax-positive', - ), - 227 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-03', - 'title' => 'syntax-bnodes-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq', - 'type' => 'syntax-positive', - ), - 228 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-04', - 'title' => 'syntax-bnodes-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq', - 'type' => 'syntax-positive', - ), - 229 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-05', - 'title' => 'syntax-bnodes-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq', - 'type' => 'syntax-positive', - ), - 230 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-forms-01', - 'title' => 'syntax-forms-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq', - 'type' => 'syntax-positive', - ), - 231 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-forms-02', - 'title' => 'syntax-forms-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq', - 'type' => 'syntax-positive', - ), - 232 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-union-01', - 'title' => 'syntax-union-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq', - 'type' => 'syntax-positive', - ), - 233 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-union-02', - 'title' => 'syntax-union-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq', - 'type' => 'syntax-positive', - ), - 234 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-01', - 'title' => 'syntax-expr-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq', - 'type' => 'syntax-positive', - ), - 235 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-02', - 'title' => 'syntax-expr-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq', - 'type' => 'syntax-positive', - ), - 236 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-03', - 'title' => 'syntax-expr-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq', - 'type' => 'syntax-positive', - ), - 237 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-04', - 'title' => 'syntax-expr-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq', - 'type' => 'syntax-positive', - ), - 238 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-05', - 'title' => 'syntax-expr-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq', - 'type' => 'syntax-positive', - ), - 239 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-01', - 'title' => 'syntax-order-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq', - 'type' => 'syntax-positive', - ), - 240 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-02', - 'title' => 'syntax-order-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq', - 'type' => 'syntax-positive', - ), - 241 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-03', - 'title' => 'syntax-order-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq', - 'type' => 'syntax-positive', - ), - 242 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-04', - 'title' => 'syntax-order-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq', - 'type' => 'syntax-positive', - ), - 243 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-05', - 'title' => 'syntax-order-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq', - 'type' => 'syntax-positive', - ), - 244 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-06', - 'title' => 'syntax-order-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq', - 'type' => 'syntax-positive', - ), - 245 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-07', - 'title' => 'syntax-order-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq', - 'type' => 'syntax-positive', - ), - 246 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-01', - 'title' => 'syntax-limit-offset-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq', - 'type' => 'syntax-positive', - ), - 247 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-02', - 'title' => 'syntax-limit-offset-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq', - 'type' => 'syntax-positive', - ), - 248 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-03', - 'title' => 'syntax-limit-offset-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq', - 'type' => 'syntax-positive', - ), - 249 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-04', - 'title' => 'syntax-limit-offset-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq', - 'type' => 'syntax-positive', - ), - 250 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-01', - 'title' => 'syntax-pat-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq', - 'type' => 'syntax-positive', - ), - 251 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-02', - 'title' => 'syntax-pat-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq', - 'type' => 'syntax-positive', - ), - 252 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-03', - 'title' => 'syntax-pat-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq', - 'type' => 'syntax-positive', - ), - 253 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-04', - 'title' => 'syntax-pat-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq', - 'type' => 'syntax-positive', - ), - 254 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-01', - 'title' => 'syntax-general-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq', - 'type' => 'syntax-positive', - ), - 255 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-02', - 'title' => 'syntax-general-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq', - 'type' => 'syntax-positive', - ), - 256 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-03', - 'title' => 'syntax-general-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq', - 'type' => 'syntax-positive', - ), - 257 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-04', - 'title' => 'syntax-general-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq', - 'type' => 'syntax-positive', - ), - 258 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-05', - 'title' => 'syntax-general-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq', - 'type' => 'syntax-positive', - ), - 259 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-06', - 'title' => 'syntax-general-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq', - 'type' => 'syntax-positive', - ), - 260 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-07', - 'title' => 'syntax-general-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq', - 'type' => 'syntax-positive', - ), - 261 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-08', - 'title' => 'syntax-general-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq', - 'type' => 'syntax-positive', - ), - 262 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-09', - 'title' => 'syntax-general-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq', - 'type' => 'syntax-positive', - ), - 263 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-10', - 'title' => 'syntax-general-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq', - 'type' => 'syntax-positive', - ), - 264 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-11', - 'title' => 'syntax-general-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq', - 'type' => 'syntax-positive', - ), - 265 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-12', - 'title' => 'syntax-general-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq', - 'type' => 'syntax-positive', - ), - 266 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-13', - 'title' => 'syntax-general-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq', - 'type' => 'syntax-positive', - ), - 267 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-14', - 'title' => 'syntax-general-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq', - 'type' => 'syntax-positive', - ), - 268 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-01', - 'title' => 'syntax-keywords-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq', - 'type' => 'syntax-positive', - ), - 269 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-02', - 'title' => 'syntax-keywords-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq', - 'type' => 'syntax-positive', - ), - 270 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-03', - 'title' => 'syntax-keywords-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq', - 'type' => 'syntax-positive', - ), - 271 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-01', - 'title' => 'syntax-lists-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq', - 'type' => 'syntax-positive', - ), - 272 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-02', - 'title' => 'syntax-lists-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq', - 'type' => 'syntax-positive', - ), - 273 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-03', - 'title' => 'syntax-lists-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq', - 'type' => 'syntax-positive', - ), - 274 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-04', - 'title' => 'syntax-lists-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq', - 'type' => 'syntax-positive', - ), - 275 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-05', - 'title' => 'syntax-lists-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq', - 'type' => 'syntax-positive', - ), - 276 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-01', - 'title' => 'syntax-bnode-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq', - 'type' => 'syntax-positive', - ), - 277 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-02', - 'title' => 'syntax-bnode-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq', - 'type' => 'syntax-positive', - ), - 278 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-03', - 'title' => 'syntax-bnode-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq', - 'type' => 'syntax-positive', - ), - 279 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-01', - 'title' => 'syntax-function-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq', - 'type' => 'syntax-positive', - ), - 280 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-02', - 'title' => 'syntax-function-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq', - 'type' => 'syntax-positive', - ), - 281 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-03', - 'title' => 'syntax-function-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq', - 'type' => 'syntax-positive', - ), - 282 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-04', - 'title' => 'syntax-function-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq', - 'type' => 'syntax-positive', - ), - 283 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-select-01', - 'title' => 'syntax-form-select-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq', - 'type' => 'syntax-positive', - ), - 284 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-select-02', - 'title' => 'syntax-form-select-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq', - 'type' => 'syntax-positive', - ), - 285 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-ask-02', - 'title' => 'syntax-form-ask-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq', - 'type' => 'syntax-positive', - ), - 286 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct01', - 'title' => 'syntax-form-construct01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq', - 'type' => 'syntax-positive', - ), - 287 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct02', - 'title' => 'syntax-form-construct02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq', - 'type' => 'syntax-positive', - ), - 288 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct03', - 'title' => 'syntax-form-construct03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq', - 'type' => 'syntax-positive', - ), - 289 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct04', - 'title' => 'syntax-form-construct04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq', - 'type' => 'syntax-positive', - ), - 290 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct06', - 'title' => 'syntax-form-construct06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq', - 'type' => 'syntax-positive', - ), - 291 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-describe01', - 'title' => 'syntax-form-describe01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq', - 'type' => 'syntax-positive', - ), - 292 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-describe02', - 'title' => 'syntax-form-describe02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq', - 'type' => 'syntax-positive', - ), - 293 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-01', - 'title' => 'syntax-dataset-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq', - 'type' => 'syntax-positive', - ), - 294 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-02', - 'title' => 'syntax-dataset-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq', - 'type' => 'syntax-positive', - ), - 295 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-03', - 'title' => 'syntax-dataset-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq', - 'type' => 'syntax-positive', - ), - 296 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-04', - 'title' => 'syntax-dataset-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq', - 'type' => 'syntax-positive', - ), - 297 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-01', - 'title' => 'syntax-graph-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq', - 'type' => 'syntax-positive', - ), - 298 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-02', - 'title' => 'syntax-graph-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq', - 'type' => 'syntax-positive', - ), - 299 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-03', - 'title' => 'syntax-graph-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq', - 'type' => 'syntax-positive', - ), - 300 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-04', - 'title' => 'syntax-graph-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq', - 'type' => 'syntax-positive', - ), - 301 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-05', - 'title' => 'syntax-graph-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq', - 'type' => 'syntax-positive', - ), - 302 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-01', - 'title' => 'syntax-esc-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq', - 'type' => 'syntax-positive', - ), - 303 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-02', - 'title' => 'syntax-esc-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq', - 'type' => 'syntax-positive', - ), - 304 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-03', - 'title' => 'syntax-esc-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq', - 'type' => 'syntax-positive', - ), - 305 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-04', - 'title' => 'syntax-esc-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq', - 'type' => 'syntax-positive', - ), - 306 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-05', - 'title' => 'syntax-esc-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq', - 'type' => 'syntax-positive', - ), - 307 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-01', - 'title' => 'syn-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq', - 'type' => 'syntax-positive', - ), - 308 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-02', - 'title' => 'syn-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq', - 'type' => 'syntax-positive', - ), - 309 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-03', - 'title' => 'syn-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq', - 'type' => 'syntax-positive', - ), - 310 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-04', - 'title' => 'syn-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq', - 'type' => 'syntax-positive', - ), - 311 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-05', - 'title' => 'syn-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq', - 'type' => 'syntax-positive', - ), - 312 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-06', - 'title' => 'syn-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq', - 'type' => 'syntax-positive', - ), - 313 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-07', - 'title' => 'syn-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq', - 'type' => 'syntax-positive', - ), - 314 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-08', - 'title' => 'syn-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq', - 'type' => 'syntax-positive', - ), - 315 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-01', - 'title' => 'syn-bad-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq', - 'type' => 'syntax-negative', - ), - 316 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-02', - 'title' => 'syn-bad-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq', - 'type' => 'syntax-negative', - ), - 317 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-03', - 'title' => 'syn-bad-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq', - 'type' => 'syntax-negative', - ), - 318 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-04', - 'title' => 'syn-bad-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq', - 'type' => 'syntax-negative', - ), - 319 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-05', - 'title' => 'syn-bad-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq', - 'type' => 'syntax-negative', - ), - 320 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-06', - 'title' => 'syn-bad-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq', - 'type' => 'syntax-negative', - ), - 321 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-07', - 'title' => 'syn-bad-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq', - 'type' => 'syntax-negative', - ), - 322 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-08', - 'title' => 'syn-bad-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq', - 'type' => 'syntax-negative', - ), - 323 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-09', - 'title' => 'syn-bad-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq', - 'type' => 'syntax-negative', - ), - 324 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-10', - 'title' => 'syn-bad-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq', - 'type' => 'syntax-negative', - ), - 325 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-11', - 'title' => 'syn-bad-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq', - 'type' => 'syntax-negative', - ), - 326 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-12', - 'title' => 'syn-bad-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq', - 'type' => 'syntax-negative', - ), - 327 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-13', - 'title' => 'syn-bad-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq', - 'type' => 'syntax-negative', - ), - 328 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-14', - 'title' => 'syn-bad-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq', - 'type' => 'syntax-negative', - ), - 329 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-15', - 'title' => 'syn-bad-15.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq', - 'type' => 'syntax-negative', - ), - 330 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-16', - 'title' => 'syn-bad-16.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq', - 'type' => 'syntax-negative', - ), - 331 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-17', - 'title' => 'syn-bad-17.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq', - 'type' => 'syntax-negative', - ), - 332 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-18', - 'title' => 'syn-bad-18.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq', - 'type' => 'syntax-negative', - ), - 333 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-19', - 'title' => 'syn-bad-19.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq', - 'type' => 'syntax-negative', - ), - 334 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-20', - 'title' => 'syn-bad-20.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq', - 'type' => 'syntax-negative', - ), - 335 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-21', - 'title' => 'syn-bad-21.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq', - 'type' => 'syntax-negative', - ), - 336 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-22', - 'title' => 'syn-bad-22.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq', - 'type' => 'syntax-negative', - ), - 337 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-23', - 'title' => 'syn-bad-23.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq', - 'type' => 'syntax-negative', - ), - 338 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-24', - 'title' => 'syn-bad-24.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq', - 'type' => 'syntax-negative', - ), - 339 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-25', - 'title' => 'syn-bad-25.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq', - 'type' => 'syntax-negative', - ), - 340 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-26', - 'title' => 'syn-bad-26.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq', - 'type' => 'syntax-negative', - ), - 341 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-27', - 'title' => 'syn-bad-27.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq', - 'type' => 'syntax-negative', - ), - 342 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-28', - 'title' => 'syn-bad-28.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq', - 'type' => 'syntax-negative', - ), - 343 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-29', - 'title' => 'syn-bad-29.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq', - 'type' => 'syntax-negative', - ), - 344 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-30', - 'title' => 'syn-bad-30.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq', - 'type' => 'syntax-negative', - ), - 345 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-31', - 'title' => 'syn-bad-31.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq', - 'type' => 'syntax-negative', - ), - 346 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnode-dot', - 'title' => 'syn-bad-bnode-dot.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq', - 'type' => 'syntax-negative', - ), - 347 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnodes-missing-pvalues-01', - 'title' => 'syn-bad-bnodes-missing-pvalues-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq', - 'type' => 'syntax-negative', - ), - 348 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnodes-missing-pvalues-02', - 'title' => 'syn-bad-bnodes-missing-pvalues-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq', - 'type' => 'syntax-negative', - ), - 349 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#empty-optional-01', - 'title' => 'syn-bad-empty-optional-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq', - 'type' => 'syntax-negative', - ), - 350 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#empty-optional-02', - 'title' => 'syn-bad-empty-optional-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq', - 'type' => 'syntax-negative', - ), - 351 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#filter-missing-parens', - 'title' => 'syn-bad-filter-missing-parens.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq', - 'type' => 'syntax-negative', - ), - 352 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#lone-list', - 'title' => 'syn-bad-lone-list.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq', - 'type' => 'syntax-negative', - ), - 353 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#lone-node', - 'title' => 'syn-bad-lone-node.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq', - 'type' => 'syntax-negative', - ), - 354 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-filter', - 'title' => 'syn-blabel-cross-filter', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq', - 'type' => 'syntax-positive', - ), - 355 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-graph-bad', - 'title' => 'syn-blabel-cross-graph-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq', - 'type' => 'syntax-negative', - ), - 356 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-optional-bad', - 'title' => 'syn-blabel-cross-optional-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq', - 'type' => 'syntax-negative', - ), - 357 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-union-bad', - 'title' => 'syn-blabel-cross-union-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq', - 'type' => 'syntax-negative', - ), - 358 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-09', - 'title' => 'syn-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq', - 'type' => 'syntax-positive', - ), - 359 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-10', - 'title' => 'syn-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq', - 'type' => 'syntax-positive', - ), - 360 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-11', - 'title' => 'syn-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq', - 'type' => 'syntax-positive', - ), - 361 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-leading-digits-in-prefixed-names', - 'title' => 'syn-leading-digits-in-prefixed-names.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq', - 'type' => 'syntax-positive', - ), - 362 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-34', - 'title' => 'syn-bad-34.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq', - 'type' => 'syntax-negative', - ), - 363 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-35', - 'title' => 'syn-bad-35.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq', - 'type' => 'syntax-negative', - ), - 364 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-36', - 'title' => 'syn-bad-36.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq', - 'type' => 'syntax-negative', - ), - 365 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-37', - 'title' => 'syn-bad-37.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq', - 'type' => 'syntax-negative', - ), - 366 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-38', - 'title' => 'syn-bad-38.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq', - 'type' => 'syntax-negative', - ), - 367 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-OPT-breaks-BGP', - 'title' => 'syn-bad-OPT-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), - 368 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-UNION-breaks-BGP', - 'title' => 'syn-bad-UNION-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), - 369 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-GRAPH-breaks-BGP', - 'title' => 'syn-bad-GRAPH-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/create-dawg2.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/create-dawg2.php.svn-base deleted file mode 100755 index 1b6f4fef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/.svn/text-base/create-dawg2.php.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - cases_dawg2.php -*/ -require_once dirname(__FILE__) . '/../../config.php'; -require_once 'Dawg2Helper.php'; - -Dawg2Helper::loadDawg2Tests(); - -echo ""; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/Dawg2Helper.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/Dawg2Helper.php deleted file mode 100755 index 1010aad0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/Dawg2Helper.php +++ /dev/null @@ -1,236 +0,0 @@ - $value) { - if (substr($value, 0, strlen($strip)) == $strip) { - $test[$id] = substr($value, strlen($strip)); - } - } - } - - //activate it in cases.php - $_SESSION['sparql_dawg2_tests'] = $arTests; - $_SESSION['sparqlTestGroups']['dawg2'] = array(//'deact'=>1, - 'title' => 'DAWG2 tests', - 'tests' => 'sparql_dawg2_tests', - 'checkfunc' => 'resultCheck' - ); - - }//public static function loadDawg2Tests() - - - - /** - * Loads all test collections from a test suite manifest file. - * A test suite file is an N3 rdf data file linking to other - * collection manifest files. - * - * @param string $strSuiteFile Test suite file - * - */ - public static function loadSuiteFromManifest($strSuiteFile) - { - //if someone knows a proper way to select all rdf collection - //items with a single query, tell me - $res = self::queryN3($strSuiteFile, - 'PREFIX mf: - SELECT ?title, ?file WHERE { - ?x rdfs:label ?title. - ?y rdf:first ?file. - }' - ); - - $arTests = array(); - $dirname = dirname($strSuiteFile); - foreach ($res as $data) { - $file = $dirname . '/' . $data['?file']->uri; - $arTests = array_merge( - $arTests, - self::loadCollectionFromManifest($file) - ); - } - return $arTests; - }//public static function loadSuiteFromManifest($strSuiteFile) - - - - /** - * Loads tests from a test collection manifest file. - * A collection manifest contains only tests, no links to other - * manifest files. - * - * @param string $strCollectionFile Path of the collection file - * - * @return array Array of test definitions compatible to those in - * cases.php - */ - public static function loadCollectionFromManifest($strCollectionFile) - { - if (!file_exists($strCollectionFile)) { - throw new Exception('Collection file does not exist: ' . $strCollectionFile); - } - - $arTests = self::loadEvaluationTests($strCollectionFile); - $arTests = array_merge($arTests, self::loadSyntaxTests($strCollectionFile)); - return $arTests; - }//public static function loadCollectionFromManifest($strCollectionFile) - - - - public static function loadEvaluationTests($strCollectionFile) - { - $res = self::queryN3($strCollectionFile, - 'PREFIX mf: - PREFIX qt: - PREFIX dawgt: - SELECT ?test ?name ?queryFile ?dataFile ?resultFile WHERE { - ?test rdf:type mf:QueryEvaluationTest. - ?test mf:name ?name. - ?test dawgt:approval dawgt:Approved. - ?test mf:action _:action. - _:action qt:query ?queryFile. - _:action qt:data ?dataFile. - ?test mf:result ?resultFile. - }' - ); - - $dirname = dirname($strCollectionFile) . '/'; - $arTests = array(); - $prefix = self::getPrefix($strCollectionFile); - - //this is a bug in SparqlEngine and should be fixed - if ($res === false) { - return array(); - } - - foreach ($res as $test) { - $name = $test['?test']->uri; - if (substr($name, 0, 7) !== 'http://') { - $name = $prefix . $name; - } - $arTests[] = array( - 'earl:name' => $name, - 'title' => $test['?name']->label, - 'data' => $dirname . $test['?dataFile']->uri, - 'query' => $dirname . $test['?queryFile']->uri, - 'result' => $dirname . $test['?resultFile']->uri, - ); - } - - return $arTests; - }//public static function loadEvaluationTests($strCollectionFile) - - - - public static function loadSyntaxTests($strCollectionFile) - { - $res = self::queryN3($strCollectionFile, - 'PREFIX mf: - PREFIX qt: - PREFIX dawgt: - SELECT ?test ?name ?queryFile ?type WHERE { - ?test rdf:type ?type. - ?test mf:name ?name. - ?test dawgt:approval dawgt:Approved. - ?test mf:action ?queryFile. - FILTER(?type = mf:NegativeSyntaxTest || ?type = mf:PositiveSyntaxTest) - }' - ); - - $dirname = dirname($strCollectionFile) . '/'; - $arTests = array(); - $prefix = self::getPrefix($strCollectionFile); - - //this is a bug in SparqlEngine and should be fixed - if ($res === false) { - return array(); - } - foreach ($res as $test) { - if ($test['?type']->uri == 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest') { - $type = 'syntax-positive'; - } else { - $type = 'syntax-negative'; - } - $name = $test['?test']->uri; - if (substr($name, 0, 7) !== 'http://') { - $name = $prefix . $name; - } - $arTests[] = array( - 'earl:name' => $name, - 'title' => $test['?name']->label, - 'query' => $dirname . $test['?queryFile']->uri, - 'type' => $type - ); - } - - return $arTests; - }//public static function loadEvaluationTests($strCollectionFile) - - - - protected static function getPrefix($strFile) - { - return 'http://www.w3.org/2001/sw/DataAccess/tests/' - . substr( - $strFile, - strpos($strFile, 'w3c-dawg2/') + 10 - ); - }//protected static function getPrefix($strFile) - - - - /** - * Executes a SPARQL query on the data written in an - * file containing N3-formatted RDF data - * - * @param string $strN3File Path to file - * @param string $strSparqlQuery SPARQL query to execute - * - * @return mixed SPARQL engine query results - */ - public static function queryN3($strN3File, $strSparqlQuery) - { - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1 ->load($strN3File, 'n3'); - - $parser = new SparqlParser(); - $q = $parser->parse($strSparqlQuery); - $engine = SparqlEngine::factory(); - return $engine->queryModel($graphset, $q, false); - }//public static function queryN3($strN3File, $strSparqlQuery) -} - -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/ResultParserTests_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/ResultParserTests_test.php deleted file mode 100755 index 2185ec4e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/ResultParserTests_test.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * @package unittests - * @access public - */ - -require_once RDFAPI_TEST_INCLUDE_DIR . 'test/unit/Sparql/SparqlTestHelper.php'; -require_once RDFAPI_INCLUDE_DIR . PACKAGE_SYNTAX_SPARQLRES; - -$_SESSION['sparql_result'] = array( - 1 => "res1" , - 2 => "res2" , - 3 => "res3" , - 4 => "res4" , - 5 => "res5" , - 6 => "res6" -); - - -class testResultParserTests extends UnitTestCase -{ - function testResultParser() - { - echo "ResultParser tests
        \n"; - foreach($_SESSION['sparql_result'] as $name) { - $_SESSION['test'] = $name . ' test'; - $parser = new SparqlResultParser(); - - $qs = file_get_contents(SPARQL_TESTFILES . 'data/' .$name . '.xml', 'r'); - $res = file_get_contents(SPARQL_TESTFILES . 'result/' .$name . '.res', 'r'); - eval($res); - - $q = $parser->parse($qs); - - $this->assertTrue(SparqlTestHelper::resultCheck($q,$result)); - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlDbTests_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlDbTests_test.php deleted file mode 100755 index 911ccd88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlDbTests_test.php +++ /dev/null @@ -1,242 +0,0 @@ -SparqlDbTests
        \n"; - //prepare - $parser = new SparqlParser(); - $strLastDataFile = null; - - foreach ($_SESSION['sparqlTestGroups'] as $arGroup) { - if (isset($arGroup['deact'])) continue; -//echo count($_SESSION[$arGroup['tests']]) . " tests\n"; - - foreach ($_SESSION[$arGroup['tests']] as $name) { - - if (isset($name['type']) && - ($name['type'] == 'syntax-negative' || $name['type'] == 'syntax-positive') - ) { - //skip syntax tests; they are run in SparqlParserTests - continue; - } - - $checkfunc = $arGroup['checkfunc']; - $fileData = null; - $fileResult = null; - $fileQuery = null; - - if (is_array($name)) { - if (isset($name['data'])) { - if (!file_exists(SPARQL_TESTFILES . $name['data'])) { - $fileData = 'data/' . $name['data']; - } else { - $fileData = $name['data']; - } - } - - if (!file_exists(SPARQL_TESTFILES . $name['query'])) { - $fileQuery = 'query/' . $name['query'] . '.rq'; - } else { - $fileQuery = $name['query']; - } - - if (isset($name['result'])) { - if (!file_exists(SPARQL_TESTFILES . $name['result'])) { - $fileResult = 'result/' . $name['result'] . '.res'; - } else { - $fileResult = $name['result']; - } - } - - if (isset($name['title'])) { - $title = $name['title']; - } else { - $title = $name['query']; - } - } else { - $fileData = 'data/' . $name . '.n3'; - $fileQuery = 'query/' . $name . '.rq'; - $fileResult = 'result/' . $name . '.res'; - $title = $name; - } - - if (in_array($title, $_SESSION['testSparqlDbTestsIgnores'])) { - if (isset($GLOBALS['debugTests'])) { - echo Console_Color::convert('%y'); - echo ' ignoring ' . $title . "\n"; - echo Console_Color::convert('%n'); - } - continue; - } -//echo ' ' . $title . "\n"; - $_SESSION['test'] = $title . ' test'; - $e = null; - - if (isset($name['earl:name'])) { - //fix some weird issue with simpletest - $earlname = $name['earl:name']; - $this->signal('earl:name', $earlname); - } - - if ($fileData != null && $fileData != $strLastDataFile) { - //re-use database if not changed - list($database, $dbModel) = $this->prepareDatabase(); - //import statements into database - $dbModel ->load(SPARQL_TESTFILES . $fileData, 'n3'); - $strLastDataFile = $fileData; - } - - $qs = file_get_contents(SPARQL_TESTFILES . $fileQuery); - - if ($fileResult !== null) { - $res = file_get_contents(SPARQL_TESTFILES . $fileResult); - - if (substr($fileResult, -4) == '.srx') { - //Sparql XML result - $resParser = new SparqlResultParser(); - $result = $resParser->parse($res); - } else if (substr($fileResult, -4) == '.rdf') { - //same format as .ttl, but serialized as xml - //rdf xml sorted - $resModel = new MemModel(); - $resModel->load(SPARQL_TESTFILES . $fileResult, 'rdf'); - $result = SparqlTestHelper::convertModelToResultArray($resModel); - unset($resModel); - $checkfunc = 'resultCheckSort'; - } else if (substr($fileResult, -4) == '.res') { - //our own php code - unset($result); - eval($res); - } else if (substr($fileResult, -4) == '.ttl') { - //N3 - $resModel = new MemModel(); - $resModel->load(SPARQL_TESTFILES . $fileResult, 'n3'); - $result = SparqlTestHelper::convertModelToResultArray($resModel); - unset($resModel); - } else { - throw new Exception('Unknown result format in ' . $fileResult); - } - } - - try { - $q = $parser->parse($qs); - } catch (Exception $e) { - //normal query failed to be parsed - $this->assertTrue(false, 'Query failed to be parsed'); - if (!isset($GLOBALS['debugTests'])) { - //echo ' ' . $title . "\n"; - } else { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if (isset($e)) { - echo $e->getMessage() . "\n"; - //var_dump($e); - } - echo $strQuery . "\n"; - die(); - } - } - - try { - $t = $dbModel->sparqlQuery($qs); - - if ($t instanceof MemModel) { - $bOk = $t->equals($result); - } else { - $bOk = SparqlTestHelper::$checkfunc($t, $result); - } - $this->assertTrue($bOk); - } catch (Exception $e) { - $bOk = false; - $t = null; - //an exception is an error - if (isset($GLOBALS['debugTests'])) { - var_dump($e->getMessage()); - } - $this->assertTrue(false); - } - - if (!$bOk) { - if (!isset($GLOBALS['debugTests'])) { - //echo ' ' . $title . "\n"; - } else { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if ($e != null) { - echo get_class($e) . ': ' . $e->getMessage() . "\n"; - } - echo ' Data: ' . $fileData . "\n"; - echo 'Query string: ' . $qs . "\n"; - echo "Expected:\n"; - echo Console_Color::convert('%p'); - var_dump($result); - echo Console_Color::convert('%n'); - echo "Result:\n"; - echo Console_Color::convert('%r'); - var_dump($t); - echo Console_Color::convert('%n'); - //var_dump($q); - die(); - } - } -/**/ - } -// echo $arGroup['title'] . " done\n"; - } - }//public function testAllTestgroupsNoReload() - - - - /** - * Instantiates the database object and clears - * any existing statements to have a fresh place - * for a unit test. - * - * @return array array($database, $dbModel) - */ - protected function prepareDatabase() - { - $database = ModelFactory::getDbStore( - $GLOBALS['dbConf']['type'], - $GLOBALS['dbConf']['host'], - $GLOBALS['dbConf']['database'], - $GLOBALS['dbConf']['user'], - $GLOBALS['dbConf']['password'] - ); - if ($database->modelExists(self::$strModelUri)) { - //need to remove model - $database->removeNamedGraphDb(self::$strModelUri); - } - $dbModel = $database->getNewModel(self::$strModelUri); - - if (!$dbModel instanceof DbModel) { - throw new Exception('Error creating new model for SparqlEngineDb tests: ' . $dbModel); - } - return array($database, $dbModel); - }//protected function prepareDatabase() - -}//class testSparqlDbTests extends UnitTestCase -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlParserTests_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlParserTests_test.php deleted file mode 100755 index e7ac11cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlParserTests_test.php +++ /dev/null @@ -1,241 +0,0 @@ -assertEqual('en', Query::getLanguageTag('?x@en')); - $this->assertEqual('en', Query::getLanguageTag('?x@en^^xsd:integer')); - $this->assertEqual('en', Query::getLanguageTag('?x^^xsd:integer@en')); - $this->assertEqual('en_US', Query::getLanguageTag('?x@en_US')); - }//function testQueryGetLanguageTag() - - - - /** - * Tests if Query::getDatatype() works correctly - */ - function testQueryGetDatatype() - { - $q = new Query(); - $q->addPrefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'); - $q->addPrefix('rdf' , 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); - $q->addPrefix('xsd' , 'http://www.w3.org/2001/XMLSchema#'); - - $this->assertNull($q->getDatatype('?name')); - $this->assertNull($q->getDatatype('?name@en')); - $this->assertEqual( - 'http://www.w3.org/2001/XMLSchema#integer', - $q->getDatatype('?name^^xsd:integer') - ); - $this->assertEqual( - 'http://www.w3.org/2001/XMLSchema#integer', - $q->getDatatype('?name^^') - ); - }//function testQueryGetDatatype() - - - - function testQueryGetFullUri() - { - $q = new Query(); - $q->addPrefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'); - $q->addPrefix('rdf' , 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); - $q->addPrefix('xsd' , 'http://www.w3.org/2001/XMLSchema#'); - - $this->assertEqual('http://www.w3.org/2001/XMLSchema#integer', $q->getFullUri('xsd:integer')); - $this->assertFalse($q->getFullUri('yyy:integer')); - $this->assertFalse($q->getFullUri('integer')); - }//function testQueryGetFullUri() - - - - function testTokenizer() - { - $this->assertEqual( - array('abc', "'", 'hi', "'", "'", 'def', "'''", 'rst', "\'", "'", "'", 'xyz'), - SparqlParser::tokenize("abc'hi''def'''rst\\'''xyz") - ); - }//function testTokenizer() - - - - function testEdgeCases() - { - $query = << -PREFIX ldap: -PREFIX rdfs: -PREFIX foaf: -PREFIX data: -SELECT ?Attr ?Val WHERE { ?Attr ?Val} -EOT; - $p = new SparqlParser(); - $q = $p->parse($query); - - $query = << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)) } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT; - $p = new SparqlParser(); - $q = $p->parse($query); - }//function testEdgeCases() - - - - function testParseFilter() - { - //echo "FilterParser tests
        \n"; - foreach ($GLOBALS['testSparqlParserTestsFilter'] as $arFilterTest) { - list($query, $result) = $arFilterTest; - - $p = new SparqlParser(); - $q = $p->parse($query); - - $res = $q->getResultPart(); - $constraint = $res[0]->getConstraints(); - $tree = $constraint[0]->getTree(); - - self::removeLevel($tree); - $this->assertEqual($result, $tree); - if ($result != $tree) { - var_dump($tree); - echo '----------------------' . "\n" . $query . "\n"; - echo "\n!!!!!!!! " . SparqlTestHelper::renderTree($tree) . "\n\n"; - } - } - }//function testParseFilter() - - - - function testParseNested() - { - //echo "Nested queries tests
        \n"; - foreach ($GLOBALS['testSparqlParserTestsNested'] as $arNestedTest) { - list($query, $strExpected) = $arNestedTest; - - $p = new SparqlParser(); - $q = $p->parse($query); - - $qs = new SparqlEngineDb_QuerySimplifier(); - $qs->simplify($q); - - $strRendResult = SparqlTestHelper::renderResult($q); - $this->assertEqual($strExpected, $strRendResult); - } - }//function testParseNested() - - - - /** - * Runs the DAWG syntax tests - */ - function testDawg2SyntaxTests() - { - $parser = new SparqlParser(); - - foreach ($_SESSION['sparql_dawg2_tests'] as $test) { - if (isset($GLOBALS['debugTests']) && $GLOBALS['debugTests']) { - echo $test['title'] . "\n"; - } - //use syntax tests only - if (!isset($test['type']) || - ($test['type'] != 'syntax-positive' && - $test['type'] != 'syntax-negative') - ) { - continue; - } - if (in_array($test['title'], $_SESSION['testSparqlDbTestsIgnores'])) { - if (isset($GLOBALS['debugTests'])) { - echo Console_Color::convert('%y'); - echo ' ignoring ' . $test['title'] . "\n"; - echo Console_Color::convert('%n'); - } - continue; - } - $this->signal('earl:name', $test['earl:name']); - - $qs = file_get_contents(SPARQL_TESTFILES . $test['query']); - - $this->runQueryParseTest($qs, $parser, $test['type'], $test['title']); - - //++$nCount; if ($nCount > 2) break; - } - }//function testDawg2SyntaxTests() - - - - /** - * Runs a parser test - */ - protected function runQueryParseTest($strQuery, $parser, $strType, $title) - { - $bException = false; - try { - $parser->parse($strQuery); - } catch (Exception $e) { - $bException = true; - } - - if ($strType == 'syntax-negative') { - $this->assertTrue($bException, 'Query should fail to be parsed.'); - $bOk = $bException == true; - } else if ($strType == 'syntax-positive') { - $this->assertFalse($bException, 'Query should get parsed.'); - $bOk = $bException == false; - } - - if (!$bOk) { - if (isset($GLOBALS['debugTests']) && $GLOBALS['debugTests']) { - echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); - if (isset($e)) { - echo $e->getMessage() . "\n"; - //var_dump($e); - } - echo $strQuery . "\n"; - die(); - } - } - }//protected function runQueryParseTest($strQuery, $parser, $strType) - - - - /** - * Removes "level" keys from the tree array. - * It is an implementation detail and should not taken into account - */ - static function removeLevel(&$tree) - { - if (isset($tree['level'])) { - unset($tree['level']); - } - if (isset($tree['type']) && $tree['type'] == 'equation') { - self::removeLevel($tree['operand1']); - self::removeLevel($tree['operand2']); - } - }//static function removeLevel(&$tree) - -}//class testSparqlParserTests extends UnitTestCase -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTestHelper.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTestHelper.php deleted file mode 100755 index 23d7830d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTestHelper.php +++ /dev/null @@ -1,222 +0,0 @@ - $value){ - foreach ($result as $innerKey => $innervalue){ - $match = 0; - foreach ($innervalue as $varname => $varval){ - if (isset($value[$varname])){ - if (gettype($value[$varname]) == gettype($varval) - && $value[$varname] == $varval - ) { - $match++; - } else { - break; - } - } - if ($match == $rowcount){ - $rows++; - unset($result[$innerKey]); - break; - } - } - } - } - - if ($hits == $rows) { - return true; - } else { - return false; - } - }//public static function resultCheck($table, $result) - - - - /** - * Compares calculated with expected result. - * Values need to be in the exact same order. - * - * @param array $table Result calculated by the engine - * @param array $result Expected result - * - * @return boolean True if both arrays contain the same values - */ - public static function resultCheckSort($table, $result) - { - if (count($result) != count($table)) { - return false; - } - - foreach ($result as $key => $value) { - foreach ($value as $varname => $varvalue) { - if ($varvalue != $table[$key][$varname]) { - return false; - } - } - } - return true; - }//public static resultCheckSort($table, $result) - - - - /** - * Helper method that creates a sparql filter string from the - * given filter tree. - */ - static function renderTree($tree) - { - if (!is_array($tree) || !isset($tree['type'])) { - return 'Parser is broken'; - } - $negation = isset($tree['negated']) ? '!' : ''; - switch ($tree['type']) { - case 'equation': - return $negation . '(' . self::renderTree($tree['operand1']) - . ' ' . $tree['operator'] . ' ' - . self::renderTree($tree['operand2']) . ')'; - case 'value': - return $negation . $tree['value']; - case 'function': - return $negation . $tree['name'] . '(' - . implode( - ', ', - array_map( - array('self', 'renderTree'), - $tree['parameter'] - ) - ) . ')'; - default: - var_dump($tree); - throw new Exception('Unsupported tree type: ' . $tree['type']); - break; - } - }//static function renderTree($tree) - - - - /** - * renders the result part of a query object as a string - */ - static function renderResult(Query $query) - { - $s = ''; - foreach ($query->getResultPart() as $gp) { - //dumpGp: - $s .= 'GP #' . $gp->getId(); - if ($gp->getOptional() !== null) $s .= ' optionalTo(' . $gp->getOptional() . ')'; - if ($gp->getUnion() !== null) $s .= ' unionWith(' . $gp->getUnion() . ')'; - if ($gp->getSubpatternOf() !== null) $s .= ' subpatternOf(' . $gp->getSubpatternOf() . ')'; - if (count($gp->getConstraints()) > 0)$s .= ' filter(' . count($gp->getConstraints()) . ')'; - $s .= "\n"; - if ($gp->getTriplePatterns()) { - foreach ($gp->getTriplePatterns() as $tp) { - $s .= ' ' . $tp->getSubject() . ', ' . $tp->getPredicate() - . ', ' . $tp->getObject() . "\n"; - } - } - } - return $s; - }//static function renderResult($query) - - - - /** - * Converts a MemModel into a query result array. - * Required for the DAWG test cases. - * - * @param Model $model Model object to extract data from - * @return array Result array - * - * @see http://www.w3.org/2001/sw/DataAccess/tests/README - * @see http://www.w3.org/2001/sw/DataAccess/tests/result-set.n3 - */ - static function convertModelToResultArray($model) - { - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graphset->setDefaultGraph($model); - $parser = new SparqlParser(); - $engine = SparqlEngine::factory($model); - - $strSparqlQuery = ' - PREFIX rs: - SELECT ?varname WHERE { ?x rs:resultVariable ?varname } - '; - $q = $parser->parse($strSparqlQuery); - $variables = $engine->queryModel($graphset, $q, false); - - $arVars = array(); - $strSparqlQueryPart = ''; - $nCount = 0; - foreach ($variables as $var) { - $varname = '?' . $var['?varname']->label; - $name = substr($varname, 1); - $arVars[] = $varname; - $strSparqlQueryPart .= - ' ?thing rs:binding ?binding' . $nCount . '. - ?binding' . $nCount . ' rs:value ' . $varname . '. - ?binding' . $nCount . ' rs:variable "' . $name . '".'; - ++$nCount; - } - - $strSparqlQuery = ' - PREFIX rs: - SELECT ' . implode($arVars, ' ') . ' - WHERE { - ?some rs:solution ?thing. - ' . $strSparqlQueryPart . ' - } - '; -//echo $strSparqlQuery; - $q = $parser->parse($strSparqlQuery); - $arResult = $engine->queryModel($graphset, $q, false); -//var_dump($arResult); -//die(); - - return $arResult; - }//static function convertModelToResultArray($model) - -}//class SparqlTestHelper -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTests_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTests_test.php deleted file mode 100755 index 741deffe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/SparqlTests_test.php +++ /dev/null @@ -1,260 +0,0 @@ - - * - * @package unittests - * @access public - */ -class testSparqlTests extends UnitTestCase -{ - public function __construct() - { - echo "SparqlTests
        \n"; - } - - function testDAWGTestcases() - { - foreach($_SESSION['sparql_dawg_tests'] as $name) { - $_SESSION['test'] = $name . ' test'; - - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1 ->load(SPARQL_TESTFILES.'data/'.$name.'.n3'); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name.'.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name.'.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q, false); - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - } - - - - function testCustomTestcases() - { - foreach($_SESSION['sparql_custom_tests'] as $name) { - $_SESSION['test']=$name.' test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->getDefaultGraph(); - $graph1->load(SPARQL_TESTFILES.'data/'.$name.'.n3'); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name.'.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name.'.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - } - - - - function testGraphset1Testcase() - { - $_SESSION['test']= ' Graphset1 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset1.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset1.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset2Testcase() - { - $_SESSION['test']= ' Graphset2 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset2.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset2.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset3Testcase() - { - $_SESSION['test']= ' Graphset3 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $default = $graphset->getDefaultGraph(); - $default->load(SPARQL_TESTFILES.'data/graphset3gr1.n3'); - - $graph1 = $graphset->createGraph('urn:x-local:graph1'); - $graph1->load(SPARQL_TESTFILES.'data/graphset3gr2.n3'); - - $graph2 = $graphset->createGraph('urn:x-local:graph2'); - $graph2->load(SPARQL_TESTFILES.'data/graphset3gr3.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset3.rq','r'); - - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset3.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testGraphset4Testcase() - { - $_SESSION['test']= ' Graphset4 test'; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - - $graph1 = $graphset->createGraph('http://example.org/foaf/aliceFoaf'); - $graph1->load(SPARQL_TESTFILES.'data/graphset1gr1.n3'); - - $graph2 = $graphset->createGraph('http://example.org/foaf/bobFoaf'); - $graph2->load(SPARQL_TESTFILES.'data/graphset1gr2.n3'); - - $qs = file_get_contents(SPARQL_TESTFILES.'query/graphset4.rq','r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/graphset4.res','r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheck($t,$result)); - } - - - - function testSortTestcase() - { - foreach($_SESSION['sparql_sort_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheckSort($t,$result)); - } - } - - - - function testlimitOffsetTestcase() - { - foreach($_SESSION['sparql_limitOffset_tests'] as $name){ - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - $this->assertTrue(SparqlTestHelper::resultCheckSort($t,$result)); - } - } - - - - - function testFilterTestcases() - { - foreach($_SESSION['sparql_filter_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def ->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q, false); - $bOk = SparqlTestHelper::resultCheck($t,$result); - $this->assertTrue($bOk); - if (!$bOk) { - echo $name['query'] . "\n"; - } - } - } - - - - function testArqTestcases() - { - foreach($_SESSION['sparql_arq_tests'] as $name) { - $_SESSION['test']= $name['query']." test"; - $parser = new SparqlParser(); - $graphset = ModelFactory::getDatasetMem('Dataset1'); - $def = $graphset->getDefaultGraph(); - $def->load(SPARQL_TESTFILES.'data/'.$name['data']); - $qs = file_get_contents(SPARQL_TESTFILES.'query/'.$name['query'].".rq",'r'); - $res = file_get_contents(SPARQL_TESTFILES.'result/'.$name['result'].".res",'r'); - eval($res); - $q = $parser->parse($qs); - $engine = SparqlEngine::factory(); - $t = $engine->queryModel($graphset, $q,false); - if ($t instanceof MemModel) { - $bOk = $t->equals($result); - } else { - $bOk = SparqlTestHelper::resultCheck($t,$result); - } - $this->assertTrue($bOk); - if (!$bOk) { - echo $name['query'] . "\n"; - } - } - } -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases.php deleted file mode 100755 index a990d282..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases.php +++ /dev/null @@ -1,692 +0,0 @@ - array(//'deact'=>1, - 'title' => 'DAWG tests', - 'tests' => 'sparql_dawg_tests', - 'checkfunc' => 'resultCheck' - ), - 'sort' => array(//'deact'=>1, - 'title' => 'sorting tests', - 'tests' => 'sparql_sort_tests', - 'checkfunc' => 'resultCheckSort' - ), - 'limit' => array(//'deact'=>1, - 'title' => 'limit/offset tests', - 'tests' => 'sparql_limitOffset_tests', - 'checkfunc' => 'resultCheckSort' - ), - 'filter' => array(//'deact'=>1, - 'title' => 'filter tests', - 'tests' => 'sparql_filter_tests', - 'checkfunc' => 'resultCheck' - ), - 'union' => array(//'deact'=>1, - 'title' => 'custom tests', - 'tests' => 'sparql_custom_tests', - 'checkfunc' => 'resultCheck' - ), - 'arq' => array(//'deact'=>1, - 'title' => 'arq tests', - 'tests' => 'sparql_arq_tests', - 'checkfunc' => 'resultCheck' - ), - 'ask' => array(//'deact'=> 1, - 'title' => 'ASK and COUNT tests', - 'tests' => 'sparql_ask_tests', - 'checkfunc' => 'resultCheck' - ), - 'dawg2' => array(//'deact'=>1, - 'title' => 'DAWG2 tests', - 'tests' => 'sparql_dawg2_tests', - 'checkfunc' => 'resultCheck' - ), -); - -$_SESSION['testSparqlDbTestsIgnores'] = array( - //hiding optional values that don't match the filter are not possible in sql - 'expr-1', - //different timezones cannot be used - 'ex11.2.3.1_1', - //bound() across union patterns is not possible - 'ex11.2.3.2_0', - //test is broken IMO (cweiske) - 'query-survey-1', - - //fatal error - 'syntax-form-describe01.rq', - 'syntax-form-describe02.rq', - //parse error - 'dawg-construct-identity' -); - - - -$_SESSION['sparql_dawg_tests'] = array( - 1 => "dawg-tp-01" , - 2 => "dawg-tp-02" , - 3 => "dawg-tp-03" , - 4 => "dawg-tp-04" , - 5 => "ex2-1a" , - 6 => "ex2-2a" , - 7 => "ex2-3a" , - 8 => "ex2-4a" , - 9 => "q-opt-1" , - 10 => "q-opt-2" , - 11 => "dawg-query-001" , - 12 => "dawg-query-002" , - 13 => "dawg-query-003" , - 14 => "dawg-query-004" , - 15 => "q-select-1" , - 16 => "q-select-2" , - 17 => "q-select-3" , - 18 => "query-survey-1" -); - - - -$_SESSION['sparql_custom_tests'] = array( - 1 => "customUnion1" , - 2 => "customUnion2" -); - - - -$_SESSION['sparql_sort_tests'] = array( - - 1 => array('data' => 'data-sort-4.n3', - 'query' => "query-sort-5", - 'result' => "sort5") , - - 2 => array('data' => "data-sort-4.n3", - 'query' => "query-sort-4", - 'result' => "sort4") , - - 3 => array('data' => "data-sort-3.n3", - 'query' => "query-sort-3", - 'result' => "sort3") , - - 4 => array('data' => "data-sort-1.n3", - 'query' => "query-sort-2", - 'result' => "sort2") , - - 5 => array('data' => "data-sort-1.n3", - 'query' => "query-sort-1", - 'result' => "sort1") , - - 6 => array('data' => "data-sort-6.n3", - 'query' => "query-sort-6", - 'result' => "sort6") , -//file is missing -// 7 => array('data' => "data-sort-7.n3", -// 'query' => "query-sort-7", -// 'result' => "sort7") , - - 8 => array('data' => "data-sort-8.n3", - 'query' => "query-sort-4", - 'result' => "sort8") , - - 9 => array('data' => "data-sort-datetime.n3", - 'query' => "query-sort-datetime", - 'result' => "sort-datetime") , -); - - - -$_SESSION['sparql_limitOffset_tests'] = array( - 1 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_1", - 'result' => "LimitOff_1") , - - 2 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_2", - 'result' => "LimitOff_2") , - - 3 => array('data' => "data-sort-4.n3", - 'query' => "LimitOff_3", - 'result' => "LimitOff_3") , -); - - - -$_SESSION['sparql_filter_tests'] = array( -/**/ - 1 => array('data' => "data.n3", - 'query' => "bound1", - 'result' => "bound1") , - - 2 => array('data' => "ex3.n3", - 'query' => "ex3", - 'result' => "ex3") , - - 3 => array('data' => "ex11.2.3.1_0.n3", - 'query' => "ex11.2.3.1_0", - 'result' => "ex11.2.3.1_0") , - - 4 => array('data' => "ex11.2.3.2_0.n3", - 'query' => "ex11.2.3.2_1", - 'result' => "ex11.2.3.2_1") , - - 5 => array('data' => "ex11.2.3.3_0.n3", - 'query' => "ex11.2.3.3_0", - 'result' => "ex11.2.3.3_0") , - - 6 => array('data' => "ex11.2.3.4_0.n3", - 'query' => "ex11.2.3.4_0", - 'result' => "ex11.2.3.4_0") , - - 7 => array('data' => "ex11.2.3.5_0.n3", - 'query' => "ex11.2.3.5_0", - 'result' => "ex11.2.3.5_0") , - - 8 => array('data' => "ex11.2.3.7_0.n3", - 'query' => "ex11.2.3.7_0", - 'result' => "ex11.2.3.7_0") , - - 9 => array('data' => "data-f1.n3", - 'query' => "expr-1", - 'result' => "expr-1") , - - 10 => array('data' => "data-f1.n3", - 'query' => "expr-2", - 'result' => "expr-2") , - - 11 => array('data' => "data-f1.n3", - 'query' => "expr-3", - 'result' => "expr-3") , - - 12 => array('data' => "data-bool1.n3", - 'query' => "query-bev-1", - 'result' => "query-bev-1") , - - 13 => array('data' => "data-bool1.n3", - 'query' => "query-bev-2", - 'result' => "query-bev-2") , - - 14 => array('data' => "data-bool2.n3", - 'query' => "query-bev-5", - 'result' => "query-bev-5") , - - 15 => array('data' => "data-bool2.n3", - 'query' => "query-bev-6", - 'result' => "query-bev-6") , - - 16 => array('data' => "data-fil1.n3", - 'query' => "q-str-1", - 'result' => "q-str-1") , - - 17 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-001", - 'result' => "regex-query-001") , - - - 18 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-002", - 'result' => "regex-query-002") , - - - 19 => array('data' => "regex-data-01.n3", - 'query' => "regex-query-003", - 'result' => "regex-query-003") , - - 20 => array('data' => "ex11.2.3.6_0.n3", - 'query' => "ex11.2.3.6_0", - 'result' => "ex11.2.3.6_0") , - - 21 => array('data' => "data-bool1.n3", - 'query' => "query-bev-3", - 'result' => "query-bev-3") , - - 22 => array('data' => "data-bool1.n3", - 'query' => "query-bev-4", - 'result' => "query-bev-4") , - - 23 => array('data' => "data-fil1.n3", - 'query' => "q-str-2", - 'result' => "q-str-2") , - - 24 => array('data' => "data-fil1.n3", - 'query' => "q-str-3", - 'result' => "q-str-3") , - - 25 => array('data' => "data-fil1.n3", - 'query' => "q-str-4", - 'result' => "q-str-4") , - - 26 => array('data' => "data-fil1.n3", - 'query' => "q-blank-1", - 'result' => "q-blank-1") , - - // changed because of our N3 Parser - 27 => array('data' => "data-fil1_changed.n3", - 'query' => "q-datatype-1", - 'result' => "q-datatype-1") , - - - // FAILS: because no type error is thrown (compare xsd:date typed with - // untyped Literal) - 29 => array('data' => "ex11_0.n3", - 'query' => "ex11_0", - 'result' => "ex11_0") , - - 30 => array('data' => "ex11_0.n3", - 'query' => "ex11_1", - 'result' => "ex11_1") , - - 31 => array(('data') => "ex11.2.3.1_1.n3", - 'query' => "ex11.2.3.1_1", - 'result' => "ex11.2.3.1_1") , -/**/ - 32 => array(('data') => "ex11.2.3.2_0.n3", - 'query' => "ex11.2.3.2_0", - 'result' => "ex11.2.3.2_0") , - - 33 => array('data' => "data-fil1.n3", - 'query' => "q-uri-1", - 'result' => "q-uri-1") , - - 34 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-1", - 'result' => "q-langMatches-1") , - - 35 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-2", - 'result' => "q-langMatches-2") , - - 36 => array('data' => "data-langMatches.n3", - 'query' => "q-langMatches-3", - 'result' => "q-langMatches-3") , - - // FAILS: langMatches(String String) returns false if first arg is no Literal -//FIXME: cweiske thinks the test is broken or he does not understand it -// 37 => array('data' => "data-langMatches.n3", -// 'query' => "q-langMatches-4", -// 'result' => "q-langMatches-4") , - - - 38 => array('data' => "data-eq.n3", - 'query' => "query-eq-1", - 'result' => "query-eq-1") , - - 39 => array('data' => "data-eq.n3", - 'query' => "query-eq-2", - 'result' => "query-eq-2") , - - 39 => array('data' => "data-eq.n3", - 'query' => "query-eq-2", - 'result' => "query-eq-2") , - - 40 => array('data' => "data-eq.n3", - 'query' => "query-eq-3", - 'result' => "query-eq-3") , - - 41 => array('data' => "data-eq.n3", - 'query' => "query-eq-4", - 'result' => "query-eq-4") , - - 42 => array('data' => "data-eq.n3", - 'query' => "query-eq-5", - 'result' => "query-eq-5") , -//test is broken - query results and query return variables don't even match -// 43 => array('data' => "data-eq.n3", -// 'query' => "query-eq2-1", -// 'result' => "query-eq2-1") , - -/**/ - - 45 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-1", - 'result' => "query-eq-graph-1") , - - 46 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-2", - 'result' => "query-eq-graph-2") , - - 47 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-3", - 'result' => "query-eq-graph-3") , - - 48 => array('data' => "data-eq.n3", - 'query' => "query-eq-graph-4", - 'result' => "query-eq-graph-4") , -/**/ -); - - - -$_SESSION['sparql_arq_tests'] = array( -/**/ - (1) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-1", - 'result' => "q-base-prefix-1") , - - (2) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-2", - 'result' => "q-base-prefix-2") , - - (3) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-3", - 'result' => "q-base-prefix-3") , - - (4) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-4", - 'result' => "q-base-prefix-4") , - - (5) => array('data' => "data-arq-basic.n3", - 'query' => "q-base-prefix-5", - 'result' => "q-base-prefix-5") , - - (6) => array('data' => "data-construct1.n3", - 'query' => "q-construct-1", - 'result' => "q-construct-1") , - - - (8) => array('data' => "data-construct1.n3", - 'query' => "q-construct-2", - 'result' => "q-construct-2") , - - (9) => array('data' => "reif-data-1.n3", - 'query' => "q-reif-1", - 'result' => "q-reif-1") , - - (10) => array('data' => "reif-data-2.n3", - 'query' => "q-reif-2", - 'result' => "q-reif-2") , - - (11) => array('data' => "model0.nt", - 'query' => "test-0-01", - 'result' => "test-0-01") , - - (12) => array('data' => "model0.nt", - 'query' => "test-0-02", - 'result' => "test-0-02") , - - (13) => array('data' => "model0.nt", - 'query' => "test-0-03", - 'result' => "test-0-03") , - - (14) => array('data' => "model0.nt", - 'query' => "test-0-04", - 'result' => "test-0-04") , - - (15) => array('data' => "model1.nt", - 'query' => "test-1-01", - 'result' => "test-1-01") , - - (16) => array('data' => "model1.nt", - 'query' => "test-1-02", - 'result' => "test-1-02") , - - (17) => array('data' => "model1.nt", - 'query' => "test-1-03", - 'result' => "test-1-03") , - - (18) => array('data' => "model1.nt", - 'query' => "test-1-04", - 'result' => "test-1-04") , - - (19) => array('data' => "model1.nt", - 'query' => "test-1-05", - 'result' => "test-1-05") , - - - (20) => array('data' => "model1.nt", - 'query' => "test-1-06", - 'result' => "test-1-06") , - - (21) => array('data' => "model1.nt", - 'query' => "test-1-07", - 'result' => "test-1-07") , - - (22) => array('data' => "model1.nt", - 'query' => "test-1-08", - 'result' => "test-1-08") , - - (23) => array('data' => "model1.nt", - 'query' => "test-1-09", - 'result' => "test-1-09") , - - (24) => array('data' => "model1.nt", - 'query' => "test-1-10", - 'result' => "test-1-10") , - - (25) => array('data' => "model1.nt", - 'query' => "test-2-01", - 'result' => "test-2-01") , - - (26) => array('data' => "model1.nt", - 'query' => "test-2-02", - 'result' => "test-2-02") , - - (27) => array('data' => "model1.nt", - 'query' => "test-2-03", - 'result' => "test-2-03") , - - (28) => array('data' => "model1.nt", - 'query' => "test-2-04", - 'result' => "test-2-04") , - - (29) => array('data' => "model1.nt", - 'query' => "test-2-05", - 'result' => "test-2-05") , - - (30) => array('data' => "model1.nt", - 'query' => "test-2-06", - 'result' => "test-2-06") , - - (31) => array('data' => "model1.nt", - 'query' => "test-2-07", - 'result' => "test-2-07") , - - (32) => array('data' => "model1.nt", - 'query' => "test-2-08", - 'result' => "test-2-08") , - - (33) => array('data' => "model1.nt", - 'query' => "test-2-09", - 'result' => "test-2-09") , - - (34) => array('data' => "model1.nt", - 'query' => "test-2-10", - 'result' => "test-2-10") , -/**/ - (35) => array('data' => "model1.nt", - 'query' => "test-3-01", - 'result' => "test-3-01") , - - (36) => array('data' => "model1.nt", - 'query' => "test-3-02", - 'result' => "test-3-02") , - - (37) => array('data' => "model1.nt", - 'query' => "test-3-03", - 'result' => "test-3-03") , - - // mehr als eine CONSTRAINT?? - (38) => array('data' => "model1.nt", - 'query' => "test-3-04", - 'result' => "test-3-04") , - - (39) => array('data' => "model1.nt", - 'query' => "test-3-05", - 'result' => "test-3-05") , - - (40) => array('data' => "model1.nt", - 'query' => "test-3-06", - 'result' => "test-3-06") , - - (41) => array('data' => "model5.nt", - 'query' => "test-3-07", - 'result' => "test-3-07") , - - (42) => array('data' => "model2.nt", - 'query' => "test-4-01", - 'result' => "test-4-01") , - - (43) => array('data' => "model2.nt", - 'query' => "test-4-02", - 'result' => "test-4-02") , - - (44) => array('data' => "model2.nt", - 'query' => "test-4-03", - 'result' => "test-4-03") , - - (45) => array('data' => "model2.nt", - 'query' => "test-4-04", - 'result' => "test-4-04") , - - (46) => array('data' => "model3.nt", - 'query' => "test-4-05", - 'result' => "test-4-05") , - - //ARQ fails - (47) => array('data' => "model3.nt", - 'query' => "test-4-06", - 'result' => "test-4-06") , - - (48) => array('data' => "model3.nt", - 'query' => "test-4-07", - 'result' => "test-4-07") , - - (49) => array('data' => "model4.nt", - 'query' => "test-5-01", - 'result' => "test-5-01") , -/**/ - (50) => array('data' => "model4.nt", - 'query' => "test-5-02", - 'result' => "test-5-02") , - - (51) => array('data' => "model4.nt", - 'query' => "test-5-03", - 'result' => "test-5-03") , - - (52) => array('data' => "model4.nt", - 'query' => "test-5-04", - 'result' => "test-5-04") , - - (53) => array('data' => "model4.nt", - 'query' => "test-6-01", - 'result' => "test-6-01") , - - (54) => array('data' => "model4.nt", - 'query' => "test-6-02", - 'result' => "test-6-02") , - - (55) => array('data' => "model4.nt", - 'query' => "test-6-03", - 'result' => "test-6-03") , - - (56) => array('data' => "model6.nt", - 'query' => "test-7-01", - 'result' => "test-7-01") , - - (57) => array('data' => "model6.nt", - 'query' => "test-7-02", - 'result' => "test-7-02") , - - (58) => array('data' => "model7.nt", - 'query' => "test-7-03", - 'result' => "test-7-03") , - - (59) => array('data' => "model7.nt", - 'query' => "test-7-04", - 'result' => "test-7-04") , - - (60) => array('data' => "model1.nt", - 'query' => "test-9-01", - 'result' => "test-9-01") , - - (60) => array('data' => "model1.nt", - 'query' => "test-9-02", - 'result' => "test-9-02") , - // FAILS: untyped Literal "value" == typed Literal "value"^^xsd:string ? - (61) => array('data' => "model8.n3", - 'query' => "test-B-01", - 'result' => "test-B-01") , - - (62) => array('data' => "model8.n3", - 'query' => "test-B-02", - 'result' => "test-B-02") , - - (63) => array('data' => "model8.n3", - 'query' => "test-B-03", - 'result' => "test-B-03") , - - (64) => array('data' => "model8.n3", - 'query' => "test-B-04", - 'result' => "test-B-04") , - - (65) => array('data' => "model8.n3", - 'query' => "test-B-05", - 'result' => "test-B-05") , -/**/ - ///////////// model9.n3 changed because of N3 Parser - (67) => array('data' => "model9.n3", - 'query' => "test-B-08", - 'result' => "test-B-08") , - - (68) => array('data' => "model9.n3", - 'query' => "test-B-09", - 'result' => "test-B-09") , - - (69) => array('data' => "model9.n3", - 'query' => "test-B-10", - 'result' => "test-B-10") , - - (70) => array('data' => "model9.n3", - 'query' => "test-B-11", - 'result' => "test-B-11") , - // FAILS because of type error - (71) => array('data' => "model9.n3", - 'query' => "test-B-12", - 'result' => "test-B-12") , - - (72) => array('data' => "model9.n3", - 'query' => "test-B-13", - 'result' => "test-B-13") , - - // FAILS because 5==true - (73) => array('data' => "model9.n3", - 'query' => "test-B-15", - 'result' => "test-B-15") , - - // FAILS because of type error - (74) => array('data' => "model9.n3", - 'query' => "test-B-17", - 'result' => "test-B-17") , - - // FAILS because of type error - (75) => array('data' => "model9.n3", - 'query' => "test-B-18", - 'result' => "test-B-18") , - - - (76) => array('data' => "model9.n3", - 'query' => "test-B-19", - 'result' => "test-B-19") , - // FAILS because of type error - (77) => array('data' => "model9.n3", - 'query' => "test-B-20", - 'result' => "test-B-20") , -); - - - -$_SESSION['sparql_ask_tests'] = array( - 1 => array('data' => 'dawg-query-001.n3', - 'query' => "ask-01", - 'result' => "ask-01"), - 2 => array('data' => 'dawg-query-001.n3', - 'query' => "count-02", - 'result' => "count-02"), -); - - -require_once dirname(__FILE__) . '/cases_dawg2.php'; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserFilter.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserFilter.php deleted file mode 100755 index 7401b131..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserFilter.php +++ /dev/null @@ -1,406 +0,0 @@ - -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER (?s = ?o)} -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?s', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?o', 'quoted' => false) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER (! bound(?s))} -EOT -, - array( - 'negated' => true, - 'type' => 'function', - 'name' => 'bound', - 'parameter' => array( - array('type' => 'value', 'value' => '?s', 'quoted' => false) - ), - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?s, ?o -{ ?s foaf:name ?o . FILTER(?date < xsd:dateTime("2005-01-01T00:00:00Z"))} -EOT -, - array( - 'type' => 'equation', - 'operator' => '<', - 'operand1' => array('type' => 'value', 'value' => '?date', 'quoted' => false), - 'operand2' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '2005-01-01T00:00:00Z', - 'quoted' => true - ) - ) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER ( (?mbox1 = ?mbox2) && (?name1 != ?name2) )} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?mbox1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?mbox2', 'quoted' => false) - ), - 'operand2' => array( - 'type' => 'equation', - 'operator' => '!=', - 'operand1' => array('type' => 'value', 'value' => '?name1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?name2', 'quoted' => false) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER ( ?mbox1 = ?mbox2 && ?name1 != ?name2 )} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?mbox1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?mbox2', 'quoted' => false) - ), - 'operand2' => array( - 'type' => 'equation', - 'operator' => '!=', - 'operand1' => array('type' => 'value', 'value' => '?name1', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '?name2', 'quoted' => false) - ) - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER regex(str(?mbox), "@work.example")} -EOT -, - array( - 'type' => 'function', - 'name' => 'regex', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array('type' => 'value', 'value' => '?mbox', 'quoted' => false) - ) - ), - array( - 'type' => 'value', - 'value' => '@work.example', - 'quoted' => true - ) - ), - ) - ), - - array( -<< -PREFIX xsd: -SELECT ?mbox1 -{ ?name1 foaf:mbox ?mbox1 . FILTER str(str(str(str(?mbox))))} -EOT -, - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?mbox', - 'quoted' => false - ) - ) - ) - ) - ) - ) - ) - ) - ) - ), - - array( -<< -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = 1.0) - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?v', 'quoted' => false), - 'operand2' => array('type' => 'value', 'value' => '1.0', 'quoted' => false), - ) - ), - - array( -<< -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } -EOT -, - array( - 'type' => 'value', - 'value' => '?v', - 'quoted' => false - ) - ), - - array( -<< -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( xsd:dateTime(?date) < xsd:dateTime("2005-01-01T00:00:00Z") ) - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '<', - 'operand1' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array('type' => 'value', 'value' => '?date', 'quoted' => false), - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'xsd:dateTime', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '2005-01-01T00:00:00Z', - 'quoted' => true - ) - ) - ) - ) - ), - - array( -<< -PREFIX xsd: - -SELECT ?p, ?o - { ?s ?p ?o . FILTER (!!!isLiteral(?o)). } -EOT -, - array( - 'negated' => true, - 'type' => 'function', - 'name' => 'isLiteral', - 'parameter' => array( - array('type' => 'value', 'value' => '?o', 'quoted' => false) - ), - ) - ), - - array( -<< -PREFIX : -SELECT ?a -WHERE { ?a :p ?v . FILTER ( ! ?v ) . } -EOT -, - array( - 'negated' => true, - 'type' => 'value', - 'value' => '?v', - 'quoted' => false - ) - ), -/**/ - array( -<< -PREFIX : -SELECT ?a -WHERE { ?a :p ?v . FILTER ("true"^^xsd:boolean && ?v) .} -EOT -, - array( - 'type' => 'equation', - 'operator' => '&&', - 'operand1' => array( - 'type' => 'value', - 'value' => 'true', - 'quoted' => true, - 'datatype' => 'http://www.w3.org/2001/XMLSchema#boolean' - ), - 'operand2' => array('type' => 'value', 'value' => '?v', 'quoted' => false), - ) - ), - array( -<< 'equation', - 'operator' => '=', - 'operand1' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?z', - 'quoted' => false - ) - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => 'value', - 'quoted' => true, - 'language' => 'en' - ) - ) - ) - ) - ), - array( -<<) ) . - } -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '?x', - 'quoted' => false - ) - ) - ), - 'operand2' => array( - 'type' => 'function', - 'name' => 'str', - 'parameter' => array( - array( - 'type' => 'value', - 'value' => '', - 'quoted' => false - ) - ) - ) - ) - ), - array( -<<) -} -ORDER BY ?Res -EOT -, - array( - 'type' => 'equation', - 'operator' => '=', - 'operand1' => array('type' => 'value', 'value' => '?Res', 'quoted' => false), - 'operand2' => array( - 'type' => 'value', - 'value' => '', - 'quoted'=> false - ) - ) - ), -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserNested.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserNested.php deleted file mode 100755 index 72db3d02..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/casesParserNested.php +++ /dev/null @@ -1,146 +0,0 @@ - -*/ -$GLOBALS['testSparqlParserTestsNested'] = array( - array(<< 'asd'} - UNION - {?person3 'three'} - } - } - UNION - {?person2 '2'} - } - ?d ?e ?f -} -EOT - , << -PREFIX rdf: -PREFIX rdfs: -SELECT DISTINCT ?Res ?Attr ?Val -WHERE -{ - { - ?Res rdf:type ?_v1 . - { - ?Res foaf:name ?_v2 FILTER regex(?_v2,"^Alexander Loeser$", "i") - } - UNION - { - ?Res rdfs:label ?_v3 FILTER regex(?_v3,"^Alexander Loeser$", "i") - } - } - ?Res ?Attr ?Val -} -ORDER BY ?Res -EOT - , << -PREFIX rdf: - -SELECT ?name ?mbox -WHERE - { - { ?person rdf:type foaf:Person } . - OPTIONAL { ?person foaf:name ?name } . - OPTIONAL {?person foaf:mbox ?mbox} . - } - UNION - { - { ?person2 rdf:kind foaf:Person } . - OPTIONAL {?person2 ?mbox. ?person2 rdf:laughs ?atyou } . - } -EOT - , << -SELECT DISTINCT ?value -WHERE { - {?s ?p ?value . FILTER (isIRI(?value)). OPTIONAL { ?s ?p ?value} } -UNION {?s ?value ?o . FILTER (isIRI(?value)) } -UNION {?value ?p ?o . FILTER (isIRI(?value)) } - } -EOT - , << \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases_dawg2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases_dawg2.php deleted file mode 100755 index e49e0341..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/cases_dawg2.php +++ /dev/null @@ -1,2770 +0,0 @@ - - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#bgp-no-match', - 'title' => 'Non-matching triple pattern', - 'data' => 'w3c-dawg2/data-r2/basic/data-7.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/bgp-no-match.rq', - 'result' => 'w3c-dawg2/data-r2/basic/bgp-no-match.srx', - ), - 1 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#prefix-name-1', - 'title' => 'Prefix name 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-6.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/prefix-name-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/prefix-name-1.srx', - ), - 2 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#spoo-1', - 'title' => 'Basic graph pattern - spoo', - 'data' => 'w3c-dawg2/data-r2/basic/data-6.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/spoo-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/spoo-1.srx', - ), - 3 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-1', - 'title' => 'Basic - Prefix/Base 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-1.srx', - ), - 4 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-2', - 'title' => 'Basic - Prefix/Base 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-2.srx', - ), - 5 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-3', - 'title' => 'Basic - Prefix/Base 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-3.srx', - ), - 6 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-4', - 'title' => 'Basic - Prefix/Base 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-4.srx', - ), - 7 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#base-prefix-5', - 'title' => 'Basic - Prefix/Base 5', - 'data' => 'w3c-dawg2/data-r2/basic/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/base-prefix-5.rq', - 'result' => 'w3c-dawg2/data-r2/basic/base-prefix-5.srx', - ), - 8 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-1', - 'title' => 'Basic - List 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-1.srx', - ), - 9 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-2', - 'title' => 'Basic - List 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-2.srx', - ), - 10 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-3', - 'title' => 'Basic - List 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-3.srx', - ), - 11 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#list-4', - 'title' => 'Basic - List 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/list-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/list-4.srx', - ), - 12 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-1', - 'title' => 'Basic - Quotes 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-1.srx', - ), - 13 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-2', - 'title' => 'Basic - Quotes 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-2.srx', - ), - 14 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-3', - 'title' => 'Basic - Quotes 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-3.srx', - ), - 15 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#quotes-4', - 'title' => 'Basic - Quotes 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/quotes-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/quotes-4.srx', - ), - 16 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-1', - 'title' => 'Basic - Term 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-1.srx', - ), - 17 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-2', - 'title' => 'Basic - Term 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-2.srx', - ), - 18 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-3', - 'title' => 'Basic - Term 3', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-3.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-3.srx', - ), - 19 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-4', - 'title' => 'Basic - Term 4', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-4.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-4.srx', - ), - 20 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-5', - 'title' => 'Basic - Term 5', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-5.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-5.srx', - ), - 21 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-6', - 'title' => 'Basic - Term 6', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-6.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-6.srx', - ), - 22 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-7', - 'title' => 'Basic - Term 7', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-7.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-7.srx', - ), - 23 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-8', - 'title' => 'Basic - Term 8', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-8.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-8.srx', - ), - 24 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#term-9', - 'title' => 'Basic - Term 9', - 'data' => 'w3c-dawg2/data-r2/basic/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/term-9.rq', - 'result' => 'w3c-dawg2/data-r2/basic/term-9.srx', - ), - 25 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#var-1', - 'title' => 'Basic - Var 1', - 'data' => 'w3c-dawg2/data-r2/basic/data-5.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/var-1.rq', - 'result' => 'w3c-dawg2/data-r2/basic/var-1.srx', - ), - 26 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#var-2', - 'title' => 'Basic - Var 2', - 'data' => 'w3c-dawg2/data-r2/basic/data-5.ttl', - 'query' => 'w3c-dawg2/data-r2/basic/var-2.rq', - 'result' => 'w3c-dawg2/data-r2/basic/var-2.srx', - ), - 27 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-001', - 'title' => 'dawg-triple-pattern-001', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-01.ttl', - ), - 28 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-002', - 'title' => 'dawg-triple-pattern-002', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-02.ttl', - ), - 29 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-003', - 'title' => 'dawg-triple-pattern-003', - 'data' => 'w3c-dawg2/data-r2/triple-match/data-02.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-03.ttl', - ), - 30 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/triple-match/manifest#dawg-triple-pattern-004', - 'title' => 'dawg-triple-pattern-004', - 'data' => 'w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq', - 'result' => 'w3c-dawg2/data-r2/triple-match/result-tp-04.ttl', - ), - 31 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-01', - 'title' => 'open-eq-01', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-01.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-01-result.srx', - ), - 32 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-02', - 'title' => 'open-eq-02', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-02.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-02-result.srx', - ), - 33 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-03', - 'title' => 'open-eq-03', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-03.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-03-result.srx', - ), - 34 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-04', - 'title' => 'open-eq-04', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-04.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-04-result.srx', - ), - 35 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-05', - 'title' => 'open-eq-05', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-05.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-05-result.srx', - ), - 36 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-06', - 'title' => 'open-eq-06', - 'data' => 'w3c-dawg2/data-r2/open-world/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-06.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-06-result.srx', - ), - 37 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-07', - 'title' => 'open-eq-07', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-07.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-07-result.srx', - ), - 38 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-08', - 'title' => 'open-eq-08', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-08.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-08-result.srx', - ), - 39 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-09', - 'title' => 'open-eq-09', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-09.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-09-result.srx', - ), - 40 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-10', - 'title' => 'open-eq-10', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-10.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-10-result.srx', - ), - 41 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-11', - 'title' => 'open-eq-11', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-11.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-11-result.srx', - ), - 42 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-12', - 'title' => 'open-eq-12', - 'data' => 'w3c-dawg2/data-r2/open-world/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-eq-12.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-eq-12-result.srx', - ), - 43 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-2', - 'title' => 'date-2', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-2.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-2-result.srx', - ), - 44 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-3', - 'title' => 'date-3', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-3.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-3-result.srx', - ), - 45 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#date-4', - 'title' => 'date-4', - 'data' => 'w3c-dawg2/data-r2/open-world/data-3.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/date-4.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/date-4-result.srx', - ), - 46 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-01', - 'title' => 'open-cmp-01', - 'data' => 'w3c-dawg2/data-r2/open-world/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-cmp-01.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx', - ), - 47 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-02', - 'title' => 'open-cmp-02', - 'data' => 'w3c-dawg2/data-r2/open-world/data-4.ttl', - 'query' => 'w3c-dawg2/data-r2/open-world/open-cmp-02.rq', - 'result' => 'w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx', - ), - 48 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-1', - 'title' => 'Join operator with OPTs, BGPs, and UNIONs', - 'data' => 'w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/join-combo-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/join-combo-1.srx', - ), - 49 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-2', - 'title' => 'Join operator with Graph and Union', - 'data' => 'w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/join-combo-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/join-combo-2.srx', - ), - 50 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-1', - 'title' => 'Nested Optionals - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.srx', - ), - 51 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-2', - 'title' => 'Nested Optionals - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/two-nested-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx', - ), - 52 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-1', - 'title' => 'Optional-filter - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-1.srx', - ), - 53 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-2', - 'title' => 'Optional-filter - 2 filters', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-2.srx', - ), - 54 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-3', - 'title' => 'Optional-filter - scope of variable', - 'data' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/opt-filter-3.srx', - ), - 55 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-1', - 'title' => 'Filter-placement - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-1.srx', - ), - 56 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-2', - 'title' => 'Filter-placement - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-2.srx', - ), - 57 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-place-3', - 'title' => 'Filter-placement - 3', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-placement-3.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-placement-3.srx', - ), - 58 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-nested-1', - 'title' => 'Filter-nested - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-nested-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-nested-1.srx', - ), - 59 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-nested-2', - 'title' => 'Filter-nested - 2', - 'data' => 'w3c-dawg2/data-r2/algebra/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-nested-2.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-nested-2.srx', - ), - 60 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-scope-1', - 'title' => 'Filter-scope - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/filter-scope-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/filter-scope-1.srx', - ), - 61 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-scope-1', - 'title' => 'Join scope - 1', - 'data' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl', - 'query' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.rq', - 'result' => 'w3c-dawg2/data-r2/algebra/var-scope-join-1.srx', - ), - 62 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bnode-coreference/manifest#dawg-bnode-coref-001', - 'title' => 'dawg-bnode-coreference', - 'data' => 'w3c-dawg2/data-r2/bnode-coreference/data.ttl', - 'query' => 'w3c-dawg2/data-r2/bnode-coreference/query.rq', - 'result' => 'w3c-dawg2/data-r2/bnode-coreference/result.ttl', - ), - 63 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-1', - 'title' => 'Complex optional semantics: 1', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl', - ), - 64 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-2', - 'title' => 'Complex optional semantics: 2', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl', - ), - 65 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-3', - 'title' => 'Complex optional semantics: 3', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl', - ), - 66 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-4', - 'title' => 'Complex optional semantics: 4', - 'data' => 'w3c-dawg2/data-r2/optional/complex-data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-complex-4.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl', - ), - 67 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-001', - 'title' => 'One optional clause', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-1.ttl', - ), - 68 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-002', - 'title' => 'Two optional clauses', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-2.ttl', - ), - 69 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-union-001', - 'title' => 'Union is not optional', - 'data' => 'w3c-dawg2/data-r2/optional/data.ttl', - 'query' => 'w3c-dawg2/data-r2/optional/q-opt-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional/result-opt-3.ttl', - ), - 70 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-001', - 'title' => 'OPTIONAL-FILTER', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-1.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl', - ), - 71 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-002', - 'title' => 'OPTIONAL - Outer FILTER', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-2.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl', - ), - 72 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-003', - 'title' => 'OPTIONAL - Outer FILTER with BOUND', - 'data' => 'w3c-dawg2/data-r2/optional-filter/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/optional-filter/expr-3.rq', - 'result' => 'w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl', - ), - 73 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-01', - 'title' => 'graph-01', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-01.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-01.ttl', - ), - 74 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-04', - 'title' => 'graph-04', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-04.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-04.ttl', - ), - 75 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-05', - 'title' => 'graph-05', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-05.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-05.ttl', - ), - 76 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-06', - 'title' => 'graph-06', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-06.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-06.ttl', - ), - 77 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-07', - 'title' => 'graph-07', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-07.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-07.ttl', - ), - 78 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-08', - 'title' => 'graph-08', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-08.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-08.ttl', - ), - 79 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-09', - 'title' => 'graph-09', - 'data' => 'w3c-dawg2/data-r2/graph/data-g3.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-09.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-09.ttl', - ), - 80 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-10', - 'title' => 'graph-10', - 'data' => 'w3c-dawg2/data-r2/graph/data-g3.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-10.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-10.ttl', - ), - 81 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-11', - 'title' => 'graph-11', - 'data' => 'w3c-dawg2/data-r2/graph/data-g1.ttl', - 'query' => 'w3c-dawg2/data-r2/graph/graph-11.rq', - 'result' => 'w3c-dawg2/data-r2/graph/graph-11.ttl', - ), - 82 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-str', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-str.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-str.srx', - ), - 83 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-flt', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-flt.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-flt.srx', - ), - 84 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dbl', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dbl.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dbl.srx', - ), - 85 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dec', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dec.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dec.srx', - ), - 86 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-int', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-int.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-int.srx', - ), - 87 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-dT', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-dT.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-dT.srx', - ), - 88 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/cast/manifest#cast-bool', - 'title' => 'Cast to xsd:string', - 'data' => 'w3c-dawg2/data-r2/cast/data.ttl', - 'query' => 'w3c-dawg2/data-r2/cast/cast-bool.rq', - 'result' => 'w3c-dawg2/data-r2/cast/cast-bool.srx', - ), - 89 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-boolean-literal', - 'title' => 'Test literal \'true\'', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl', - ), - 90 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-1', - 'title' => 'Test \'boolean effective value\' - true', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl', - ), - 91 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-2', - 'title' => 'Test \'boolean effective value\' - false', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl', - ), - 92 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-3', - 'title' => 'Test \'boolean effective value\' - &&', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl', - ), - 93 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-4', - 'title' => 'Test \'boolean effective value\' - ||', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl', - ), - 94 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-5', - 'title' => 'Test \'boolean effective value\' - optional', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl', - ), - 95 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/boolean-effective-value/manifest#dawg-bev-6', - 'title' => 'Test \'boolean effective value\' - unknown types', - 'data' => 'w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl', - 'query' => 'w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq', - 'result' => 'w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl', - ), - 96 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bound/manifest#dawg-bound-query-001', - 'title' => 'dawg-bound-query-001', - 'data' => 'w3c-dawg2/data-r2/bound/data.ttl', - 'query' => 'w3c-dawg2/data-r2/bound/bound1.rq', - 'result' => 'w3c-dawg2/data-r2/bound/bound1-result.ttl', - ), - 97 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isLiteral-1', - 'title' => 'isLiteral', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl', - ), - 98 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-1', - 'title' => 'str-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl', - ), - 99 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-2', - 'title' => 'str-2', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl', - ), - 100 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-3', - 'title' => 'str-3', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl', - ), - 101 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-4', - 'title' => 'str-4', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-str-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl', - ), - 102 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isBlank-1', - 'title' => 'isBlank-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl', - ), - 103 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-1', - 'title' => 'datatype-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl', - ), - 104 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-2', - 'title' => 'datatype-2 : Literals with a datatype', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx', - ), - 105 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-3', - 'title' => 'datatype-3 : Literals with a datatype of xsd:string', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx', - ), - 106 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-1', - 'title' => 'lang-1 : Literals with a lang tag of some kind', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx', - ), - 107 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-2', - 'title' => 'lang-2 : Literals with a lang tag of \'\'', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx', - ), - 108 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-lang-3', - 'title' => 'lang-3 : Graph matching with lang tag being a different case', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx', - ), - 109 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isURI-1', - 'title' => 'isURI-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl', - ), - 110 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-isIRI-1', - 'title' => 'isIRI-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl', - ), - 111 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-1', - 'title' => 'LangMatches-1', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl', - ), - 112 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-2', - 'title' => 'LangMatches-2', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl', - ), - 113 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-3', - 'title' => 'LangMatches-3', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl', - ), - 114 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-4', - 'title' => 'LangMatches-4', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl', - ), - 115 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-langMatches-basic', - 'title' => 'LangMatches-basic', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl', - ), - 116 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#lang-case-insensitive-eq', - 'title' => 'lang-case-insensitive-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx', - ), - 117 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#lang-case-insensitive-ne', - 'title' => 'lang-case-insensitive-ne', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx', - ), - 118 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-simple', - 'title' => 'sameTerm-simple', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl', - ), - 119 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-eq', - 'title' => 'sameTerm-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl', - ), - 120 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-not-eq', - 'title' => 'sameTerm-not-eq', - 'data' => 'w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq', - 'result' => 'w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl', - ), - 121 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#unplus-1', - 'title' => 'Unary Plusn', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx', - ), - 122 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#unminus-1', - 'title' => 'Unary Minus', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx', - ), - 123 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#plus-1', - 'title' => 'Addition', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-plus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-plus-1.srx', - ), - 124 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#minus-1', - 'title' => 'Subtraction', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-minus-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-minus-1.srx', - ), - 125 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#mul-1', - 'title' => 'Multiplication', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-mul-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-mul-1.srx', - ), - 126 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#ge-1', - 'title' => 'Greater-than or equals', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-ge-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-ge-1.srx', - ), - 127 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#le-1', - 'title' => 'Less-than or equals', - 'data' => 'w3c-dawg2/data-r2/expr-ops/data.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-ops/query-le-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-ops/result-le-1.srx', - ), - 128 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-1', - 'title' => 'Equality 1-1', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl', - ), - 129 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2', - 'title' => 'Equality 1-2', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl', - ), - 130 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-3', - 'title' => 'Equality 1-3', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl', - ), - 131 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-4', - 'title' => 'Equality 1-4', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl', - ), - 132 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-5', - 'title' => 'Equality 1-5', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-5.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl', - ), - 133 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2-1', - 'title' => 'Equality - 2 var - test equals', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl', - ), - 134 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-2-2', - 'title' => 'Equality - 2 var - test not equals ', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl', - ), - 135 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-1', - 'title' => 'Equality 1-1 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl', - ), - 136 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-2', - 'title' => 'Equality 1-2 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl', - ), - 137 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-3', - 'title' => 'Equality 1-3 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl', - ), - 138 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-4', - 'title' => 'Equality 1-4 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl', - ), - 139 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-5', - 'title' => 'Equality 1-5 -- graph', - 'data' => 'w3c-dawg2/data-r2/expr-equals/data-eq.ttl', - 'query' => 'w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq', - 'result' => 'w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl', - ), - 140 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-001', - 'title' => 'regex-query-001', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-001.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-001.ttl', - ), - 141 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-002', - 'title' => 'regex-query-002', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-002.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-002.ttl', - ), - 142 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-003', - 'title' => 'regex-query-003', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-003.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-003.ttl', - ), - 143 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/regex/manifest#dawg-regex-004', - 'title' => 'regex-query-004', - 'data' => 'w3c-dawg2/data-r2/regex/regex-data-01.ttl', - 'query' => 'w3c-dawg2/data-r2/regex/regex-query-004.rq', - 'result' => 'w3c-dawg2/data-r2/regex/regex-result-004.ttl', - ), - 144 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/construct/manifest#construct-1', - 'title' => 'dawg-construct-identity', - 'data' => 'w3c-dawg2/data-r2/construct/data-ident.ttl', - 'query' => 'w3c-dawg2/data-r2/construct/query-ident.rq', - 'result' => 'w3c-dawg2/data-r2/construct/result-ident.ttl', - ), - 145 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-1', - 'title' => 'ASK-1 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-1.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-1.srx', - ), - 146 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-4', - 'title' => 'ASK-4 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-4.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-4.srx', - ), - 147 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-7', - 'title' => 'ASK-7 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-7.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-7.srx', - ), - 148 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/ask/manifest#ask-8', - 'title' => 'ASK-8 (SPARQL XML results)', - 'data' => 'w3c-dawg2/data-r2/ask/data.ttl', - 'query' => 'w3c-dawg2/data-r2/ask/ask-8.rq', - 'result' => 'w3c-dawg2/data-r2/ask/ask-8.srx', - ), - 149 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-star-1', - 'title' => 'SELECT DISTINCT *', - 'data' => 'w3c-dawg2/data-r2/distinct/data-star.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-star-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-star-1.srx', - ), - 150 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-1', - 'title' => 'Numbers: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-num.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-num.srx', - ), - 151 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-1', - 'title' => 'Numbers: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-num.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-num.srx', - ), - 152 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-2', - 'title' => 'Strings: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-str.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-str.srx', - ), - 153 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-2', - 'title' => 'Strings: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-str.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-str.srx', - ), - 154 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-3', - 'title' => 'Nodes: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-node.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-node.srx', - ), - 155 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-3', - 'title' => 'Nodes: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-node.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-node.srx', - ), - 156 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-4', - 'title' => 'Opt: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-2.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-opt.srx', - ), - 157 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-4', - 'title' => 'Opt: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-opt.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-2.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-opt.srx', - ), - 158 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#no-distinct-9', - 'title' => 'All: No distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-all.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/no-distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/no-distinct-all.srx', - ), - 159 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-9', - 'title' => 'All: Distinct', - 'data' => 'w3c-dawg2/data-r2/distinct/data-all.ttl', - 'query' => 'w3c-dawg2/data-r2/distinct/distinct-1.rq', - 'result' => 'w3c-dawg2/data-r2/distinct/distinct-all.srx', - ), - 160 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-1', - 'title' => 'sort-1', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-1.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-1.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-1.rdf', - ), - 161 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-2', - 'title' => 'sort-2', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-1.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-2.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-2.rdf', - ), - 162 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-3', - 'title' => 'sort-3', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-3.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-3.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-3.rdf', - ), - 163 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-4', - 'title' => 'sort-4', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-4.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-4.rdf', - ), - 164 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-5', - 'title' => 'sort-5', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-4.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-5.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-5.rdf', - ), - 165 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-6', - 'title' => 'sort-6', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-6.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-6.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-6.rdf', - ), - 166 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-7', - 'title' => 'sort-7', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-7.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-7.rdf', - ), - 167 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-8', - 'title' => 'sort-8', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-8.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-4.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-8.rdf', - ), - 168 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-9', - 'title' => 'sort-9', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-9.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-9.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-9.rdf', - ), - 169 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-10', - 'title' => 'sort-10', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-9.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-10.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-10.rdf', - ), - 170 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-numbers', - 'title' => 'Expression sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-numbers.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-numbers.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-numbers.ttl', - ), - 171 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-builtin', - 'title' => 'Builtin sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-builtin.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-builtin.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-builtin.ttl', - ), - 172 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#dawg-sort-function', - 'title' => 'Function sort', - 'data' => 'w3c-dawg2/data-r2/sort/data-sort-function.ttl', - 'query' => 'w3c-dawg2/data-r2/sort/query-sort-function.rq', - 'result' => 'w3c-dawg2/data-r2/sort/result-sort-function.ttl', - ), - 173 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-01', - 'title' => 'syntax-basic-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq', - 'type' => 'syntax-positive', - ), - 174 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-02', - 'title' => 'syntax-basic-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq', - 'type' => 'syntax-positive', - ), - 175 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-03', - 'title' => 'syntax-basic-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq', - 'type' => 'syntax-positive', - ), - 176 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-04', - 'title' => 'syntax-basic-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq', - 'type' => 'syntax-positive', - ), - 177 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-05', - 'title' => 'syntax-basic-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq', - 'type' => 'syntax-positive', - ), - 178 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-basic-06', - 'title' => 'syntax-basic-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq', - 'type' => 'syntax-positive', - ), - 179 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-01', - 'title' => 'syntax-qname-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq', - 'type' => 'syntax-positive', - ), - 180 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-02', - 'title' => 'syntax-qname-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq', - 'type' => 'syntax-positive', - ), - 181 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-03', - 'title' => 'syntax-qname-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq', - 'type' => 'syntax-positive', - ), - 182 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-04', - 'title' => 'syntax-qname-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq', - 'type' => 'syntax-positive', - ), - 183 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-05', - 'title' => 'syntax-qname-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq', - 'type' => 'syntax-positive', - ), - 184 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-06', - 'title' => 'syntax-qname-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq', - 'type' => 'syntax-positive', - ), - 185 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-07', - 'title' => 'syntax-qname-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq', - 'type' => 'syntax-positive', - ), - 186 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-qname-08', - 'title' => 'syntax-qname-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq', - 'type' => 'syntax-positive', - ), - 187 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-01', - 'title' => 'syntax-lit-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq', - 'type' => 'syntax-positive', - ), - 188 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-02', - 'title' => 'syntax-lit-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq', - 'type' => 'syntax-positive', - ), - 189 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-03', - 'title' => 'syntax-lit-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq', - 'type' => 'syntax-positive', - ), - 190 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-04', - 'title' => 'syntax-lit-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq', - 'type' => 'syntax-positive', - ), - 191 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-05', - 'title' => 'syntax-lit-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq', - 'type' => 'syntax-positive', - ), - 192 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-06', - 'title' => 'syntax-lit-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq', - 'type' => 'syntax-positive', - ), - 193 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-07', - 'title' => 'syntax-lit-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq', - 'type' => 'syntax-positive', - ), - 194 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-08', - 'title' => 'syntax-lit-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq', - 'type' => 'syntax-positive', - ), - 195 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-09', - 'title' => 'syntax-lit-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq', - 'type' => 'syntax-positive', - ), - 196 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-10', - 'title' => 'syntax-lit-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq', - 'type' => 'syntax-positive', - ), - 197 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-11', - 'title' => 'syntax-lit-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq', - 'type' => 'syntax-positive', - ), - 198 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-12', - 'title' => 'syntax-lit-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq', - 'type' => 'syntax-positive', - ), - 199 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-13', - 'title' => 'syntax-lit-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq', - 'type' => 'syntax-positive', - ), - 200 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-14', - 'title' => 'syntax-lit-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq', - 'type' => 'syntax-positive', - ), - 201 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-15', - 'title' => 'syntax-lit-15.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq', - 'type' => 'syntax-positive', - ), - 202 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-16', - 'title' => 'syntax-lit-16.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq', - 'type' => 'syntax-positive', - ), - 203 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-17', - 'title' => 'syntax-lit-17.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq', - 'type' => 'syntax-positive', - ), - 204 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-18', - 'title' => 'syntax-lit-18.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq', - 'type' => 'syntax-positive', - ), - 205 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-19', - 'title' => 'syntax-lit-19.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq', - 'type' => 'syntax-positive', - ), - 206 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lit-20', - 'title' => 'syntax-lit-20.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq', - 'type' => 'syntax-positive', - ), - 207 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-01', - 'title' => 'syntax-struct-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq', - 'type' => 'syntax-positive', - ), - 208 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-02', - 'title' => 'syntax-struct-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq', - 'type' => 'syntax-positive', - ), - 209 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-03', - 'title' => 'syntax-struct-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq', - 'type' => 'syntax-positive', - ), - 210 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-05', - 'title' => 'syntax-struct-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq', - 'type' => 'syntax-positive', - ), - 211 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-06', - 'title' => 'syntax-struct-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq', - 'type' => 'syntax-positive', - ), - 212 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-07', - 'title' => 'syntax-struct-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq', - 'type' => 'syntax-positive', - ), - 213 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-08', - 'title' => 'syntax-struct-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq', - 'type' => 'syntax-positive', - ), - 214 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-09', - 'title' => 'syntax-struct-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq', - 'type' => 'syntax-positive', - ), - 215 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-10', - 'title' => 'syntax-struct-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq', - 'type' => 'syntax-positive', - ), - 216 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-11', - 'title' => 'syntax-struct-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq', - 'type' => 'syntax-positive', - ), - 217 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-12', - 'title' => 'syntax-struct-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq', - 'type' => 'syntax-positive', - ), - 218 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-13', - 'title' => 'syntax-struct-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq', - 'type' => 'syntax-positive', - ), - 219 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-struct-14', - 'title' => 'syntax-struct-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq', - 'type' => 'syntax-positive', - ), - 220 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-01', - 'title' => 'syntax-lists-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq', - 'type' => 'syntax-positive', - ), - 221 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-02', - 'title' => 'syntax-lists-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq', - 'type' => 'syntax-positive', - ), - 222 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-03', - 'title' => 'syntax-lists-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq', - 'type' => 'syntax-positive', - ), - 223 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-04', - 'title' => 'syntax-lists-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq', - 'type' => 'syntax-positive', - ), - 224 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-lists-05', - 'title' => 'syntax-lists-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq', - 'type' => 'syntax-positive', - ), - 225 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-01', - 'title' => 'syntax-bnodes-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq', - 'type' => 'syntax-positive', - ), - 226 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-02', - 'title' => 'syntax-bnodes-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq', - 'type' => 'syntax-positive', - ), - 227 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-03', - 'title' => 'syntax-bnodes-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq', - 'type' => 'syntax-positive', - ), - 228 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-04', - 'title' => 'syntax-bnodes-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq', - 'type' => 'syntax-positive', - ), - 229 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-bnodes-05', - 'title' => 'syntax-bnodes-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq', - 'type' => 'syntax-positive', - ), - 230 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-forms-01', - 'title' => 'syntax-forms-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq', - 'type' => 'syntax-positive', - ), - 231 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-forms-02', - 'title' => 'syntax-forms-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq', - 'type' => 'syntax-positive', - ), - 232 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-union-01', - 'title' => 'syntax-union-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq', - 'type' => 'syntax-positive', - ), - 233 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-union-02', - 'title' => 'syntax-union-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq', - 'type' => 'syntax-positive', - ), - 234 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-01', - 'title' => 'syntax-expr-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq', - 'type' => 'syntax-positive', - ), - 235 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-02', - 'title' => 'syntax-expr-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq', - 'type' => 'syntax-positive', - ), - 236 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-03', - 'title' => 'syntax-expr-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq', - 'type' => 'syntax-positive', - ), - 237 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-04', - 'title' => 'syntax-expr-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq', - 'type' => 'syntax-positive', - ), - 238 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-expr-05', - 'title' => 'syntax-expr-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq', - 'type' => 'syntax-positive', - ), - 239 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-01', - 'title' => 'syntax-order-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq', - 'type' => 'syntax-positive', - ), - 240 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-02', - 'title' => 'syntax-order-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq', - 'type' => 'syntax-positive', - ), - 241 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-03', - 'title' => 'syntax-order-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq', - 'type' => 'syntax-positive', - ), - 242 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-04', - 'title' => 'syntax-order-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq', - 'type' => 'syntax-positive', - ), - 243 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-05', - 'title' => 'syntax-order-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq', - 'type' => 'syntax-positive', - ), - 244 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-06', - 'title' => 'syntax-order-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq', - 'type' => 'syntax-positive', - ), - 245 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-order-07', - 'title' => 'syntax-order-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq', - 'type' => 'syntax-positive', - ), - 246 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-01', - 'title' => 'syntax-limit-offset-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq', - 'type' => 'syntax-positive', - ), - 247 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-02', - 'title' => 'syntax-limit-offset-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq', - 'type' => 'syntax-positive', - ), - 248 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-03', - 'title' => 'syntax-limit-offset-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq', - 'type' => 'syntax-positive', - ), - 249 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-limit-offset-04', - 'title' => 'syntax-limit-offset-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq', - 'type' => 'syntax-positive', - ), - 250 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-01', - 'title' => 'syntax-pat-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq', - 'type' => 'syntax-positive', - ), - 251 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-02', - 'title' => 'syntax-pat-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq', - 'type' => 'syntax-positive', - ), - 252 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-03', - 'title' => 'syntax-pat-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq', - 'type' => 'syntax-positive', - ), - 253 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql1/manifest#syntax-pat-04', - 'title' => 'syntax-pat-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq', - 'type' => 'syntax-positive', - ), - 254 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-01', - 'title' => 'syntax-general-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq', - 'type' => 'syntax-positive', - ), - 255 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-02', - 'title' => 'syntax-general-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq', - 'type' => 'syntax-positive', - ), - 256 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-03', - 'title' => 'syntax-general-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq', - 'type' => 'syntax-positive', - ), - 257 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-04', - 'title' => 'syntax-general-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq', - 'type' => 'syntax-positive', - ), - 258 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-05', - 'title' => 'syntax-general-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq', - 'type' => 'syntax-positive', - ), - 259 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-06', - 'title' => 'syntax-general-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq', - 'type' => 'syntax-positive', - ), - 260 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-07', - 'title' => 'syntax-general-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq', - 'type' => 'syntax-positive', - ), - 261 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-08', - 'title' => 'syntax-general-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq', - 'type' => 'syntax-positive', - ), - 262 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-09', - 'title' => 'syntax-general-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq', - 'type' => 'syntax-positive', - ), - 263 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-10', - 'title' => 'syntax-general-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq', - 'type' => 'syntax-positive', - ), - 264 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-11', - 'title' => 'syntax-general-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq', - 'type' => 'syntax-positive', - ), - 265 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-12', - 'title' => 'syntax-general-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq', - 'type' => 'syntax-positive', - ), - 266 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-13', - 'title' => 'syntax-general-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq', - 'type' => 'syntax-positive', - ), - 267 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-general-14', - 'title' => 'syntax-general-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq', - 'type' => 'syntax-positive', - ), - 268 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-01', - 'title' => 'syntax-keywords-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq', - 'type' => 'syntax-positive', - ), - 269 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-02', - 'title' => 'syntax-keywords-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq', - 'type' => 'syntax-positive', - ), - 270 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-keywords-03', - 'title' => 'syntax-keywords-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq', - 'type' => 'syntax-positive', - ), - 271 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-01', - 'title' => 'syntax-lists-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq', - 'type' => 'syntax-positive', - ), - 272 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-02', - 'title' => 'syntax-lists-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq', - 'type' => 'syntax-positive', - ), - 273 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-03', - 'title' => 'syntax-lists-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq', - 'type' => 'syntax-positive', - ), - 274 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-04', - 'title' => 'syntax-lists-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq', - 'type' => 'syntax-positive', - ), - 275 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-lists-05', - 'title' => 'syntax-lists-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq', - 'type' => 'syntax-positive', - ), - 276 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-01', - 'title' => 'syntax-bnode-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq', - 'type' => 'syntax-positive', - ), - 277 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-02', - 'title' => 'syntax-bnode-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq', - 'type' => 'syntax-positive', - ), - 278 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-bnode-03', - 'title' => 'syntax-bnode-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq', - 'type' => 'syntax-positive', - ), - 279 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-01', - 'title' => 'syntax-function-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq', - 'type' => 'syntax-positive', - ), - 280 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-02', - 'title' => 'syntax-function-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq', - 'type' => 'syntax-positive', - ), - 281 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-03', - 'title' => 'syntax-function-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq', - 'type' => 'syntax-positive', - ), - 282 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-function-04', - 'title' => 'syntax-function-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq', - 'type' => 'syntax-positive', - ), - 283 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-select-01', - 'title' => 'syntax-form-select-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq', - 'type' => 'syntax-positive', - ), - 284 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-select-02', - 'title' => 'syntax-form-select-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq', - 'type' => 'syntax-positive', - ), - 285 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-ask-02', - 'title' => 'syntax-form-ask-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq', - 'type' => 'syntax-positive', - ), - 286 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct01', - 'title' => 'syntax-form-construct01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq', - 'type' => 'syntax-positive', - ), - 287 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct02', - 'title' => 'syntax-form-construct02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq', - 'type' => 'syntax-positive', - ), - 288 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct03', - 'title' => 'syntax-form-construct03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq', - 'type' => 'syntax-positive', - ), - 289 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct04', - 'title' => 'syntax-form-construct04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq', - 'type' => 'syntax-positive', - ), - 290 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-construct06', - 'title' => 'syntax-form-construct06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq', - 'type' => 'syntax-positive', - ), - 291 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-describe01', - 'title' => 'syntax-form-describe01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq', - 'type' => 'syntax-positive', - ), - 292 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-form-describe02', - 'title' => 'syntax-form-describe02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq', - 'type' => 'syntax-positive', - ), - 293 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-01', - 'title' => 'syntax-dataset-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq', - 'type' => 'syntax-positive', - ), - 294 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-02', - 'title' => 'syntax-dataset-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq', - 'type' => 'syntax-positive', - ), - 295 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-03', - 'title' => 'syntax-dataset-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq', - 'type' => 'syntax-positive', - ), - 296 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-dataset-04', - 'title' => 'syntax-dataset-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq', - 'type' => 'syntax-positive', - ), - 297 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-01', - 'title' => 'syntax-graph-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq', - 'type' => 'syntax-positive', - ), - 298 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-02', - 'title' => 'syntax-graph-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq', - 'type' => 'syntax-positive', - ), - 299 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-03', - 'title' => 'syntax-graph-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq', - 'type' => 'syntax-positive', - ), - 300 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-04', - 'title' => 'syntax-graph-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq', - 'type' => 'syntax-positive', - ), - 301 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-graph-05', - 'title' => 'syntax-graph-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq', - 'type' => 'syntax-positive', - ), - 302 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-01', - 'title' => 'syntax-esc-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq', - 'type' => 'syntax-positive', - ), - 303 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-02', - 'title' => 'syntax-esc-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq', - 'type' => 'syntax-positive', - ), - 304 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-03', - 'title' => 'syntax-esc-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq', - 'type' => 'syntax-positive', - ), - 305 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-04', - 'title' => 'syntax-esc-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq', - 'type' => 'syntax-positive', - ), - 306 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql2/manifest#syntax-esc-05', - 'title' => 'syntax-esc-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq', - 'type' => 'syntax-positive', - ), - 307 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-01', - 'title' => 'syn-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq', - 'type' => 'syntax-positive', - ), - 308 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-02', - 'title' => 'syn-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq', - 'type' => 'syntax-positive', - ), - 309 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-03', - 'title' => 'syn-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq', - 'type' => 'syntax-positive', - ), - 310 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-04', - 'title' => 'syn-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq', - 'type' => 'syntax-positive', - ), - 311 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-05', - 'title' => 'syn-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq', - 'type' => 'syntax-positive', - ), - 312 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-06', - 'title' => 'syn-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq', - 'type' => 'syntax-positive', - ), - 313 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-07', - 'title' => 'syn-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq', - 'type' => 'syntax-positive', - ), - 314 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-08', - 'title' => 'syn-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq', - 'type' => 'syntax-positive', - ), - 315 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-01', - 'title' => 'syn-bad-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq', - 'type' => 'syntax-negative', - ), - 316 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-02', - 'title' => 'syn-bad-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq', - 'type' => 'syntax-negative', - ), - 317 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-03', - 'title' => 'syn-bad-03.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq', - 'type' => 'syntax-negative', - ), - 318 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-04', - 'title' => 'syn-bad-04.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq', - 'type' => 'syntax-negative', - ), - 319 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-05', - 'title' => 'syn-bad-05.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq', - 'type' => 'syntax-negative', - ), - 320 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-06', - 'title' => 'syn-bad-06.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq', - 'type' => 'syntax-negative', - ), - 321 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-07', - 'title' => 'syn-bad-07.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq', - 'type' => 'syntax-negative', - ), - 322 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-08', - 'title' => 'syn-bad-08.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq', - 'type' => 'syntax-negative', - ), - 323 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-09', - 'title' => 'syn-bad-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq', - 'type' => 'syntax-negative', - ), - 324 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-10', - 'title' => 'syn-bad-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq', - 'type' => 'syntax-negative', - ), - 325 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-11', - 'title' => 'syn-bad-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq', - 'type' => 'syntax-negative', - ), - 326 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-12', - 'title' => 'syn-bad-12.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq', - 'type' => 'syntax-negative', - ), - 327 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-13', - 'title' => 'syn-bad-13.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq', - 'type' => 'syntax-negative', - ), - 328 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-14', - 'title' => 'syn-bad-14.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq', - 'type' => 'syntax-negative', - ), - 329 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-15', - 'title' => 'syn-bad-15.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq', - 'type' => 'syntax-negative', - ), - 330 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-16', - 'title' => 'syn-bad-16.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq', - 'type' => 'syntax-negative', - ), - 331 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-17', - 'title' => 'syn-bad-17.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq', - 'type' => 'syntax-negative', - ), - 332 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-18', - 'title' => 'syn-bad-18.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq', - 'type' => 'syntax-negative', - ), - 333 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-19', - 'title' => 'syn-bad-19.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq', - 'type' => 'syntax-negative', - ), - 334 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-20', - 'title' => 'syn-bad-20.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq', - 'type' => 'syntax-negative', - ), - 335 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-21', - 'title' => 'syn-bad-21.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq', - 'type' => 'syntax-negative', - ), - 336 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-22', - 'title' => 'syn-bad-22.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq', - 'type' => 'syntax-negative', - ), - 337 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-23', - 'title' => 'syn-bad-23.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq', - 'type' => 'syntax-negative', - ), - 338 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-24', - 'title' => 'syn-bad-24.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq', - 'type' => 'syntax-negative', - ), - 339 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-25', - 'title' => 'syn-bad-25.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq', - 'type' => 'syntax-negative', - ), - 340 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-26', - 'title' => 'syn-bad-26.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq', - 'type' => 'syntax-negative', - ), - 341 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-27', - 'title' => 'syn-bad-27.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq', - 'type' => 'syntax-negative', - ), - 342 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-28', - 'title' => 'syn-bad-28.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq', - 'type' => 'syntax-negative', - ), - 343 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-29', - 'title' => 'syn-bad-29.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq', - 'type' => 'syntax-negative', - ), - 344 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-30', - 'title' => 'syn-bad-30.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq', - 'type' => 'syntax-negative', - ), - 345 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-31', - 'title' => 'syn-bad-31.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq', - 'type' => 'syntax-negative', - ), - 346 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnode-dot', - 'title' => 'syn-bad-bnode-dot.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq', - 'type' => 'syntax-negative', - ), - 347 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnodes-missing-pvalues-01', - 'title' => 'syn-bad-bnodes-missing-pvalues-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq', - 'type' => 'syntax-negative', - ), - 348 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#bnodes-missing-pvalues-02', - 'title' => 'syn-bad-bnodes-missing-pvalues-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq', - 'type' => 'syntax-negative', - ), - 349 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#empty-optional-01', - 'title' => 'syn-bad-empty-optional-01.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq', - 'type' => 'syntax-negative', - ), - 350 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#empty-optional-02', - 'title' => 'syn-bad-empty-optional-02.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq', - 'type' => 'syntax-negative', - ), - 351 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#filter-missing-parens', - 'title' => 'syn-bad-filter-missing-parens.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq', - 'type' => 'syntax-negative', - ), - 352 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#lone-list', - 'title' => 'syn-bad-lone-list.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq', - 'type' => 'syntax-negative', - ), - 353 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#lone-node', - 'title' => 'syn-bad-lone-node.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq', - 'type' => 'syntax-negative', - ), - 354 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-filter', - 'title' => 'syn-blabel-cross-filter', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq', - 'type' => 'syntax-positive', - ), - 355 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-graph-bad', - 'title' => 'syn-blabel-cross-graph-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq', - 'type' => 'syntax-negative', - ), - 356 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-optional-bad', - 'title' => 'syn-blabel-cross-optional-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq', - 'type' => 'syntax-negative', - ), - 357 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#blabel-cross-union-bad', - 'title' => 'syn-blabel-cross-union-bad', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq', - 'type' => 'syntax-negative', - ), - 358 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-09', - 'title' => 'syn-09.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq', - 'type' => 'syntax-positive', - ), - 359 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-10', - 'title' => 'syn-10.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq', - 'type' => 'syntax-positive', - ), - 360 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-11', - 'title' => 'syn-11.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq', - 'type' => 'syntax-positive', - ), - 361 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-leading-digits-in-prefixed-names', - 'title' => 'syn-leading-digits-in-prefixed-names.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq', - 'type' => 'syntax-positive', - ), - 362 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-34', - 'title' => 'syn-bad-34.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq', - 'type' => 'syntax-negative', - ), - 363 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-35', - 'title' => 'syn-bad-35.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq', - 'type' => 'syntax-negative', - ), - 364 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-36', - 'title' => 'syn-bad-36.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq', - 'type' => 'syntax-negative', - ), - 365 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-37', - 'title' => 'syn-bad-37.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq', - 'type' => 'syntax-negative', - ), - 366 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-38', - 'title' => 'syn-bad-38.rq', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq', - 'type' => 'syntax-negative', - ), - 367 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-OPT-breaks-BGP', - 'title' => 'syn-bad-OPT-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), - 368 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-UNION-breaks-BGP', - 'title' => 'syn-bad-UNION-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), - 369 => - array ( - 'earl:name' => 'http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#syn-bad-GRAPH-breaks-BGP', - 'title' => 'syn-bad-GRAPH-breaks-BGP', - 'query' => 'w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq', - 'type' => 'syntax-negative', - ), -); -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/create-dawg2.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/create-dawg2.php deleted file mode 100755 index 1b6f4fef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/create-dawg2.php +++ /dev/null @@ -1,24 +0,0 @@ - cases_dawg2.php -*/ -require_once dirname(__FILE__) . '/../../config.php'; -require_once 'Dawg2Helper.php'; - -Dawg2Helper::loadDawg2Tests(); - -echo ""; -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/all-wcprops deleted file mode 100755 index 576c4992..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/all-wcprops +++ /dev/null @@ -1,437 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 71 -/svnroot/rdfapi-php/!svn/ver/448/trunk/rdfapi-php/test/unit/Sparql/data -END -ex11.2.3.4_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.4_0.n3 -END -data-sort-8.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-8.n3 -END -graphset1gr1.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/graphset1gr1.n3 -END -graphset3gr1.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/graphset3gr1.n3 -END -data-construct1.n3 -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-construct1.n3 -END -q-select-3.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/q-select-3.n3 -END -data-bound.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-bound.n3 -END -dawg-tp-03.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-tp-03.n3 -END -dawg-query-001.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-query-001.n3 -END -model2.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model2.nt -END -data-a.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-a.n3 -END -model6.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model6.nt -END -data-sort-datetime.n3 -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/448/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-datetime.n3 -END -model8.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model8.n3 -END -ex11.2.3.1_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.1_0.n3 -END -query-survey-1.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/query-survey-1.n3 -END -data-sort-3.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-3.n3 -END -ex11.2.3.5_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.5_0.n3 -END -data.n3 -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data.n3 -END -q-select-2.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/q-select-2.n3 -END -data-f1.n3 -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-f1.n3 -END -model1.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model1.nt -END -dawg-tp-02.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-tp-02.n3 -END -model5.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model5.nt -END -dawg-query-004.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-query-004.n3 -END -res1.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/data/res1.xml -END -res2.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/data/res2.xml -END -res3.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/data/res3.xml -END -ex11_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11_0.n3 -END -res4.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/data/res4.xml -END -ex11.2.3.2_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.2_0.n3 -END -res5.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/306/trunk/rdfapi-php/test/unit/Sparql/data/res5.xml -END -res6.xml -K 25 -svn:wc:ra_dav:version-url -V 80 -/svnroot/rdfapi-php/!svn/ver/306/trunk/rdfapi-php/test/unit/Sparql/data/res6.xml -END -data-sort-6.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-6.n3 -END -ex11.2.3.6_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.6_0.n3 -END -customUnion2.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/customUnion2.n3 -END -data-arq-basic.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-arq-basic.n3 -END -q-select-1.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/q-select-1.n3 -END -graphset3gr3.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/graphset3gr3.n3 -END -dawg-tp-01.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-tp-01.n3 -END -model0.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model0.nt -END -data-bool2.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-bool2.n3 -END -dawg-query-003.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-query-003.n3 -END -model4.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model4.nt -END -reif-data-2.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/reif-data-2.n3 -END -data-sort-1.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-1.n3 -END -ex2-1a.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex2-1a.n3 -END -ex2-2a.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex2-2a.n3 -END -ex11.2.3.3_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.3_0.n3 -END -ex2-3a.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex2-3a.n3 -END -ex3.n3 -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex3.n3 -END -q-opt-2.n3 -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/q-opt-2.n3 -END -regex-data-01.n3 -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/regex-data-01.n3 -END -ex2-4a.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex2-4a.n3 -END -data-fil1.n3 -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-fil1.n3 -END -ex11.2.3.7_0.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.7_0.n3 -END -customUnion1.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/customUnion1.n3 -END -graphset1gr2.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/graphset1gr2.n3 -END -data-fil1_changed.n3 -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-fil1_changed.n3 -END -graphset3gr2.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/graphset3gr2.n3 -END -data-eq.n3 -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-eq.n3 -END -data-bool1.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-bool1.n3 -END -dawg-query-002.n3 -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-query-002.n3 -END -model3.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model3.nt -END -dawg-tp-04.n3 -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/dawg-tp-04.n3 -END -model7.nt -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model7.nt -END -model9.n3 -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/model9.n3 -END -reif-data-1.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/reif-data-1.n3 -END -data-langMatches.n3 -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-langMatches.n3 -END -q-opt-1.n3 -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/q-opt-1.n3 -END -ex11.2.3.1_1.n3 -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/ex11.2.3.1_1.n3 -END -data-sort-4.n3 -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/data/data-sort-4.n3 -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/entries deleted file mode 100755 index 23858c6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/entries +++ /dev/null @@ -1,963 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/data -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-19T15:48:52.211340Z -448 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ex11.2.3.4_0.n3 -file - - - - -2008-02-29T14:57:08.095483Z -08669eb8b06374dd2ebafa5a20271fe3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-sort-8.n3 -file - - - - -2008-02-29T14:57:08.111103Z -13428fdb78d6b55346140ff208f61735 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset1gr1.n3 -file - - - - -2008-02-29T14:57:08.111103Z -bb0803b720790377a33af6fb39b6b4ab -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset3gr1.n3 -file - - - - -2008-02-29T14:57:08.126724Z -497b13e6416c8c8bb9a04bbd3fff67c6 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-construct1.n3 -file - - - - -2008-02-29T14:57:08.126724Z -b57ab08b10da0336a0e273449bb8b83b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-3.n3 -file - - - - -2008-02-29T14:57:08.126724Z -e1cf8623c24fc42b9ef78ace77142f5c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-bound.n3 -file - - - - -2008-02-29T14:57:08.142344Z -92f49cb3754746730ccf7a56368e4e9b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-03.n3 -file - - - - -2008-02-29T14:57:08.157965Z -da2b8b513344e7b08d409e9031bbbb92 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-001.n3 -file - - - - -2008-02-29T14:57:08.157965Z -0632d993d6311d2fbae4555a30e65977 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model2.nt -file - - - - -2008-02-29T14:57:08.142344Z -3bab6d0237e4dcad0f6b557f5b14933c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-a.n3 -file - - - - -2008-02-29T14:57:08.173586Z -fd08e162f3fc545821a7bc9e439a53dd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model6.nt -file - - - - -2008-02-29T14:57:08.157965Z -df5cc9fef9b24f7843a70c5e6c38ab5b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-sort-datetime.n3 -file - - - - -2008-02-29T14:57:08.189206Z -3c3ca14001b2aecc75e829a42a0ba755 -2007-06-19T15:48:52.211340Z -448 -cweiske - -model8.n3 -file - - - - -2008-02-29T14:57:08.173586Z -befcd0caf55c7d9d2f7e1648a4b2e9cd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.1_0.n3 -file - - - - -2008-02-29T14:57:08.189206Z -9f8536562d7efdcf082112f5f5f34448 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-survey-1.n3 -file - - - - -2008-02-29T14:57:08.189206Z -1812bdbb330099ef04f50af722beb4bd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-sort-3.n3 -file - - - - -2008-02-29T14:57:08.204827Z -173ec29284872bb753b396e632816ab3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.5_0.n3 -file - - - - -2008-02-29T14:57:08.204827Z -019df61d5f2f1d31749730eab0447142 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data.n3 -file - - - - -2008-02-29T14:57:08.220447Z -92f49cb3754746730ccf7a56368e4e9b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-2.n3 -file - - - - -2008-02-29T14:57:08.220447Z -e1cf8623c24fc42b9ef78ace77142f5c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-f1.n3 -file - - - - -2008-02-29T14:57:08.220447Z -72bc1f70e8e2c6ea87de9d9a0fc5450e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model1.nt -file - - - - -2008-02-29T14:57:08.236068Z -5514c6f94778b0e5457d56adc1b837f1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-02.n3 -file - - - - -2008-02-29T14:57:08.236068Z -c3b4289bc6caf43445bb6cd0b4f462fd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model5.nt -file - - - - -2008-02-29T14:57:08.251689Z -43cfdc47242be75f52f9a0e14b40f6f5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-004.n3 -file - - - - -2008-02-29T14:57:08.251689Z -0632d993d6311d2fbae4555a30e65977 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -res1.xml -file - - - - -2008-02-29T14:57:08.267309Z -1c7cbad2d9bd054a49c34753bbf1e902 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -res2.xml -file - - - - -2008-02-29T14:57:08.267309Z -77809438c08c472f7051da6aad152234 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -res3.xml -file - - - - -2008-02-29T14:57:08.267309Z -6fa88aafdc67822dd6cfe1492d04a9ec -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -ex11_0.n3 -file - - - - -2008-02-29T14:57:08.282930Z -be49d63ef6cf94ab3238b6b9a38beeb5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -res4.xml -file - - - - -2008-02-29T14:57:08.282930Z -a623cfc4846845a7b5d7be53ea210c47 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -res5.xml -file - - - - -2008-02-29T14:57:08.298550Z -cab51c388fba0557e9d3c947310f3126 -2006-06-26T11:22:24.000000Z -306 -tgauss -has-props - -ex11.2.3.2_0.n3 -file - - - - -2008-02-29T14:57:08.298550Z -a1f22c623f5c0fb9df11501138946f8d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -res6.xml -file - - - - -2008-02-29T14:57:08.314171Z -13f6a9c4f34b4716c6baeec9f74a5871 -2006-06-26T11:22:24.000000Z -306 -tgauss -has-props - -data-sort-6.n3 -file - - - - -2008-02-29T14:57:08.314171Z -5acb88f9b76169b92fb2a8634cd462e8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.6_0.n3 -file - - - - -2008-02-29T14:57:08.314171Z -d9a895ffc84e3e14d809a251b4d57bf3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -customUnion2.n3 -file - - - - -2008-02-29T14:57:08.329792Z -1b6fce12ec425f2295e5b6f3fcd07708 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-arq-basic.n3 -file - - - - -2008-02-29T14:57:08.329792Z -30274cb5c0b470c3868096094dc284b8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-1.n3 -file - - - - -2008-02-29T14:57:08.345412Z -e1cf8623c24fc42b9ef78ace77142f5c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset3gr3.n3 -file - - - - -2008-02-29T14:57:08.345412Z -59d99b75e7b458cc9c0eaad0eeb7a5f9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-01.n3 -file - - - - -2008-02-29T14:57:08.361033Z -539fb9cc5d5a7c65c4f0fb63e9d08412 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model0.nt -file - - - - -2008-02-29T14:57:08.345412Z -b8d8fbc1f4464c8f64a097d09211a1a6 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-bool2.n3 -file - - - - -2008-02-29T14:57:08.361033Z -6ecd8238bcc890e403170b65e94c7145 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-003.n3 -file - - - - -2008-02-29T14:57:08.376653Z -0632d993d6311d2fbae4555a30e65977 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model4.nt -file - - - - -2008-02-29T14:57:08.376653Z -b2cfa52d648cc1187dd2c9164f22d6ad -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -reif-data-2.n3 -file - - - - -2008-02-29T14:57:08.376653Z -4ea3670545cfa783b3f6f961c16ffb85 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-sort-1.n3 -file - - - - -2008-02-29T14:57:08.392274Z -b95c780e41d5dbeb2775b62a1ed0f428 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-1a.n3 -file - - - - -2008-02-29T14:57:08.392274Z -439d8eab4e06313406b816505926cb86 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-2a.n3 -file - - - - -2008-02-29T14:57:08.407895Z -a63b6a895fb6eb7d6c0c999ac1044a77 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.3_0.n3 -file - - - - -2008-02-29T14:57:08.423515Z -019df61d5f2f1d31749730eab0447142 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-3a.n3 -file - - - - -2008-02-29T14:57:08.423515Z -59f63fe44893a23b10731d5b57a1a204 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex3.n3 -file - - - - -2008-02-29T14:57:08.423515Z -8ced747312c84bc946cd48f73b457c76 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-opt-2.n3 -file - - - - -2008-02-29T14:57:08.407895Z -df8c98f528c8fb71041752ac7b17688f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -regex-data-01.n3 -file - - - - -2008-02-29T14:57:08.407895Z -6eac13969d596a9844e68cbfd26388f8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-4a.n3 -file - - - - -2008-02-29T14:57:08.439136Z -687fcf3b900145d67234f946d14087c9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-fil1.n3 -file - - - - -2008-02-29T14:57:08.439136Z -e4d19805168b733233b6e320ad2a26ef -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.7_0.n3 -file - - - - -2008-02-29T14:57:08.454756Z -353c91d663ad492609a07ec09b3fae33 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -customUnion1.n3 -file - - - - -2008-02-29T14:57:08.454756Z -841748beeb8340328c1440a3953a5a18 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset1gr2.n3 -file - - - - -2008-02-29T14:57:08.470377Z -ede49959c10e18cc869c34c12c4846cf -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-fil1_changed.n3 -file - - - - -2008-02-29T14:57:08.470377Z -cedb5712fb48dfce8388e9a6d60077d3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset3gr2.n3 -file - - - - -2008-02-29T14:57:08.470377Z -dcf8f64a2d51a356a114f927f56931a6 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-eq.n3 -file - - - - -2008-02-29T14:57:08.485998Z -6a4086ac22e5ebbbdcd809bf2da7cc61 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-bool1.n3 -file - - - - -2008-02-29T14:57:08.485998Z -4754047230b690476ed37a8f2575c7a0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model3.nt -file - - - - -2008-02-29T14:57:08.501618Z -d7d0a3ac8f44290f5c572e29afc8a6a4 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-002.n3 -file - - - - -2008-02-29T14:57:08.501618Z -0632d993d6311d2fbae4555a30e65977 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-04.n3 -file - - - - -2008-02-29T14:57:08.501618Z -45a090c65a76ec6c6fd31d0f3d16253f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model7.nt -file - - - - -2008-02-29T14:57:08.517239Z -861c5a7ccce80664d367a41f8b268f2c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -model9.n3 -file - - - - -2008-02-29T14:57:08.517239Z -5e86aa9daa33dcf33dee13b7b47d6892 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -reif-data-1.n3 -file - - - - -2008-02-29T14:57:08.532859Z -f03aee3b1aef688deabd754d23ae1d16 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-langMatches.n3 -file - - - - -2008-02-29T14:57:08.532859Z -a218c7604ad63e730a2d6cc4aa6c4b91 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-opt-1.n3 -file - - - - -2008-02-29T14:57:08.532859Z -df8c98f528c8fb71041752ac7b17688f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.1_1.n3 -file - - - - -2008-02-29T14:57:08.548480Z -486b7579b607a4d328e0b406e8eb21a9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -data-sort-4.n3 -file - - - - -2008-02-29T14:57:08.564101Z -865fd82a58b4a754b8b1c3259c002a1f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/customUnion2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-a.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-a.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-arq-basic.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-arq-basic.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-arq-basic.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bool2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bound.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bound.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-bound.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-construct1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-construct1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-construct1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-eq.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-eq.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-eq.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-f1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-f1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-f1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1_changed.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1_changed.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-fil1_changed.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-langMatches.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-langMatches.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-langMatches.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-3.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-3.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-4.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-4.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-4.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-6.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-6.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-6.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-8.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-8.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data-sort-8.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/data.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-001.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-001.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-001.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-002.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-002.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-002.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-003.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-003.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-003.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-004.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-004.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-query-004.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-01.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-01.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-01.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-02.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-02.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-02.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-03.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-03.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-03.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-04.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-04.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/dawg-tp-04.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.1_1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.2_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.2_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.2_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.3_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.3_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.3_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.4_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.4_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.4_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.5_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.5_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.5_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.6_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.6_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.6_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.7_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.7_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11.2.3.7_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11_0.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex11_0.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-1a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-1a.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-1a.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-2a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-2a.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-2a.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-3a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-3a.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-3a.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-4a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-4a.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex2-4a.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex3.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/ex3.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset1gr2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr3.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/graphset3gr3.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model0.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model0.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model0.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model1.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model2.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model2.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model3.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model3.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model3.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model4.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model4.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model4.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model5.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model5.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model5.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model6.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model6.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model6.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model7.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model7.nt.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model7.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model8.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model8.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model8.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model9.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model9.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/model9.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-opt-2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-3.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/q-select-3.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/query-survey-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/query-survey-1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/query-survey-1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/regex-data-01.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/regex-data-01.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/regex-data-01.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-1.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-2.n3.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/reif-data-2.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res1.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res1.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res1.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res2.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res2.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res2.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res3.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res3.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res3.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res4.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res4.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res4.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res5.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res5.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res5.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res6.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res6.xml.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/prop-base/res6.xml.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion1.n3.svn-base deleted file mode 100755 index dccbecbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion1.n3.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix dc10: . -@prefix dc11: . -@prefix test: . - - -_:a dc10:title "SPARQL Query Language Tutorial" . - -_:b dc11:title "SPARQL Protocol Tutorial" . - -_:c dc10:title "SPARQL" . -_:c dc11:title "SPARQL (updated)" . - -_:d dc11:title "Test" . -_:d test:title "Test (updated)" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion2.n3.svn-base deleted file mode 100755 index 2cfc7df2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/customUnion2.n3.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a rdf:type foaf:Person . -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b rdf:type foaf:Person . -_:b foaf:name "Bob" . - -_:c rdf:type foaf:Person . -_:c foaf:name "Bert" . -_:c foaf:mbox2 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-a.n3.svn-base deleted file mode 100755 index fc6fcc90..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-a.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix rdfs: . -@prefix rdf: . -@prefix : . - -:C1 rdfs:subClassOf :C2 . -:x rdf:type :C1 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-arq-basic.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-arq-basic.n3.svn-base deleted file mode 100755 index bfe253e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-arq-basic.n3.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix ns: . -@prefix x: . -@prefix z: . - -x:x ns:p "d:x ns:p" . -x:x x:p "x:x x:p" . - -z:x z:p "z:x z:p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool1.n3.svn-base deleted file mode 100755 index aca66708..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool1.n3.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool2.n3.svn-base deleted file mode 100755 index 0aca15f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bool2.n3.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . - -# Optionals -:x1 :q "true"^^xsd:boolean . -:x2 :q "false"^^xsd:boolean . -:x3 :q "foo"^^:unknown . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bound.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bound.n3.svn-base deleted file mode 100755 index 50eb82b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-bound.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-construct1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-construct1.n3.svn-base deleted file mode 100755 index 866af335..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-construct1.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix ns: . -@prefix : . - -:bill ns:loves _:who . -:joe ns:loves _:who . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-eq.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-eq.n3.svn-base deleted file mode 100755 index d013c58a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-eq.n3.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - -:xu :p :z . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-f1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-f1.n3.svn-base deleted file mode 100755 index b462d7d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-f1.n3.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix x: . -@prefix : . -@prefix dc: . -@prefix xsd: . - -:book1 dc:title "TITLE 1" . -:book1 x:price "10"^^xsd:integer . - -:book2 dc:title "TITLE 2" . -:book2 x:price "20"^^xsd:integer . - -:book3 dc:title "TITLE 3" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1.n3.svn-base deleted file mode 100755 index 832089bf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1.n3.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1" . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0" . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1_changed.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1_changed.n3.svn-base deleted file mode 100755 index 427016ac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-fil1_changed.n3.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1" . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-langMatches.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-langMatches.n3.svn-base deleted file mode 100755 index 646c866c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-langMatches.n3.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - -:x :p1 "abc" . -:x :p2 . -:x :p3 "abc"@en . -:x :p4 "abc"@en-gb . -:x :p5 "abc"@fr . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-1.n3.svn-base deleted file mode 100755 index 3ecf1786..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-1.n3.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-3.n3.svn-base deleted file mode 100755 index 8cc6a092..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-3.n3.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:mbox . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox . - -_:c rdf:type foaf:Person ; - foaf:mbox ; - foaf:name "Fred" . - -_:e foaf:name "Bob" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-4.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-4.n3.svn-base deleted file mode 100755 index b5529b8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-4.n3.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer . - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-6.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-6.n3.svn-base deleted file mode 100755 index 5900c01c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-6.n3.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:address . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:address "Fascination Street 11" . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:address "fred@work.example" . - -_:e foaf:name "Bob" ; - ex:address . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-8.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-8.n3.svn-base deleted file mode 100755 index f68f0bd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-8.n3.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:f foaf:name "John" ; - ex:empId [ ex:number "29"^^xsd:integer ] . - -_:g foaf:name "Dirk" ; - ex:empId . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-datetime.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-datetime.n3.svn-base deleted file mode 100755 index 94cf9124..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data-sort-datetime.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix dc: . - -_:a dc:created "2004-12-31T18:01:00-05:00"^^ . -_:b dc:created "2004-01-31T18:01:00-05:00"^^ . -_:c dc:created "2007-03-12T17:02:00-05:00"^^ . -_:d dc:created "2007-03-12T17:01:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data.n3.svn-base deleted file mode 100755 index 50eb82b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/data.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-001.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-001.n3.svn-base deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-001.n3.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-002.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-002.n3.svn-base deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-002.n3.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-003.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-003.n3.svn-base deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-003.n3.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-004.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-004.n3.svn-base deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-query-004.n3.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-01.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-01.n3.svn-base deleted file mode 100755 index 4c2575a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-01.n3.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-02.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-02.n3.svn-base deleted file mode 100755 index 1fd6d1fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-02.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-03.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-03.n3.svn-base deleted file mode 100755 index 584d3d8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-03.n3.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - - -:y :y :x . -:x :y :y . -:y :x :y . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-04.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-04.n3.svn-base deleted file mode 100755 index d79c242a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/dawg-tp-04.n3.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_0.n3.svn-base deleted file mode 100755 index d502279c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_0.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Ms A.". -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_1.n3.svn-base deleted file mode 100755 index e766359e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.1_1.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix a: . -@prefix dc: . - -_:b a:annotates . -_:b dc:created "2004-12-31T19:00:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.2_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.2_0.n3.svn-base deleted file mode 100755 index d3026fde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.2_0.n3.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix foaf: . -@prefix dc: . -@prefix xs: . - -_:a foaf:name "Alice". - -_:b foaf:givenName "Bob" . -_:b dc:created "2005-04-04T04:04:04Z"^^xs:dateTime . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.3_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.3_0.n3.svn-base deleted file mode 100755 index 61e1a793..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.3_0.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox "bob@work.example" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.4_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.4_0.n3.svn-base deleted file mode 100755 index 8b18f8ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.4_0.n3.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix a: . -@prefix dc: . -@prefix foaf: . - -_:a a:annotates . -_:a dc:creator "Alice B. Toeclips" . - -_:b a:annotates . -_:b dc:creator _:c . -_:c foaf:given "Bob". -_:c foaf:family "Smith". diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.5_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.5_0.n3.svn-base deleted file mode 100755 index 61e1a793..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.5_0.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox "bob@work.example" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.6_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.6_0.n3.svn-base deleted file mode 100755 index 5257a3ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.6_0.n3.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.7_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.7_0.n3.svn-base deleted file mode 100755 index 8ed81367..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11.2.3.7_0.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:a foaf:name "Robert"@EN. -_:a foaf:name "Roberto"@ES. -_:a foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11_0.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11_0.n3.svn-base deleted file mode 100755 index a021b9d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex11_0.n3.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix a: . -@prefix dc: . - -_:a a:annotates . -_:a dc:created "2004-12-31T18:00:00-05:00" . - -_:b a:annotates . -_:b dc:created "2004-12-31T18:01:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-1a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-1a.n3.svn-base deleted file mode 100755 index b357b4a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-1a.n3.svn-base +++ /dev/null @@ -1 +0,0 @@ - "SPARQL Tutorial" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-2a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-2a.n3.svn-base deleted file mode 100755 index 9e262ba0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-2a.n3.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -@prefix rdf: . -rdf:type rdf:type rdf:Property . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-3a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-3a.n3.svn-base deleted file mode 100755 index c9080a30..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-3a.n3.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix foaf: . - -_:a foaf:name "Johnny Lee Outlaw" . -_:a foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-4a.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-4a.n3.svn-base deleted file mode 100755 index be053b85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex2-4a.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . - -_:a foaf:name "Johnny Lee Outlaw" . -_:a foaf:mbox . -_:b foaf:name "Peter Goodguy" . -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex3.n3.svn-base deleted file mode 100755 index 4b4ac3b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/ex3.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix dc: . -@prefix : . -@prefix ns: . -@prefix xsd: . - -:book1 dc:title "SPARQL Tutorial" . -:book1 ns:price "42"^^xsd:integer . -:book2 dc:title "The Semantic Web" . -:book2 ns:price "23"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr1.n3.svn-base deleted file mode 100755 index ababe38d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr1.n3.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . -_:a foaf:knows _:b . - -_:b foaf:name "Bob" . -_:b foaf:mbox . -_:b foaf:nick "Bobby" . -_:b rdfs:seeAlso . - - - rdf:type foaf:PersonalProfileDocument . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr2.n3.svn-base deleted file mode 100755 index 7e649fd8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset1gr2.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:z foaf:mbox . -_:z rdfs:seeAlso . -_:z foaf:nick "Robert" . - - rdf:type foaf:PersonalProfileDocument . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr1.n3.svn-base deleted file mode 100755 index 10f2f4a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr1.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Default graph -@prefix dc: . -@prefix xsd: . - - dc:publisher "Bob" . - dc:date "2004-12-06"^^xsd:date . - - dc:publisher "Bob" . - dc:date "2005-01-10"^^xsd:date . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr2.n3.svn-base deleted file mode 100755 index 36a9408b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr2.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Graph: locally allocated IRI: tag:example.org,2005-06-06:graph1 -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr3.n3.svn-base deleted file mode 100755 index b74c7cf1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/graphset3gr3.n3.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Graph: locally allocated IRI: tag:example.org,2005-06-06:graph2 -@prefix foaf: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model0.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model0.nt.svn-base deleted file mode 100755 index 457a4d70..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model0.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# Model 0 : one statement - "RDQL//RDQL" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model1.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model1.nt.svn-base deleted file mode 100755 index 57faf505..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model1.nt.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -# Model 1 : Two resources ; two properties ; values encode the statement - "v-1-1" . - "v-1-2" . - "v-2-1" . - "v-2-2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model2.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model2.nt.svn-base deleted file mode 100755 index 824ccaf4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model2.nt.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -# Model 2 : Paths - -# A path - - . - "Value" . - - -# A loop /one node - - . - -# A loop : two nodes - - . - . - -# Two dangling arcs, same property - . - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model3.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model3.nt.svn-base deleted file mode 100755 index 9ae4db5c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model3.nt.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -# Anonymous nodes - -_:a "v-a-1". -_:a "v-a-2". - -_:b _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model4.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model4.nt.svn-base deleted file mode 100755 index 243341ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model4.nt.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -# Model 4 : Strange shapes - -# Resource and property the same URI - "R==P" . - -# Property and value - . - -# Resource and value has been done in model2. - -# All the same! - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model5.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model5.nt.svn-base deleted file mode 100755 index c134a19e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model5.nt.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -# Produced by ARP : see model5.rdf -# This has two bags (one anon) in it. -_:j1 "11" . -_:j1 "12" . -_:j1 . - _:j1 . - "21" . - "22" . - . - . - "Other Stuff" . - "metadata" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model6.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model6.nt.svn-base deleted file mode 100755 index 25e02c41..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model6.nt.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Predicate URI also in subject slot - "r-1-2" . - "r-2-1" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model7.nt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model7.nt.svn-base deleted file mode 100755 index 319a69d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model7.nt.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -_:a "p" . - "p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model8.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model8.n3.svn-base deleted file mode 100755 index c8a965bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model8.n3.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix ns: . - -:r :p1 "value"^^xsd:string . -:r :p2 "value"^^ns:someType . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model9.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model9.n3.svn-base deleted file mode 100755 index 119821db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/model9.n3.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix ns: . -@prefix rdf: . - -:r :p1 "value"^^ns:someType . -:r :p2 "value"@en . -:r :p2 "value"@zz . -:r :p3 "value" . -:r :p4 "5"^^xsd:integer . # Same as "5"^^xsd:integer - -# Turtle does not have doubles. -:r :p5 "5.7"^^xsd:double . # Same as 5.7 in N3 -:r :p6 "true"^^xsd:boolean . -:r :p7 "true" . -:r :p8 "value"^^rdf:XMLLiteral . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-1.n3.svn-base deleted file mode 100755 index 19c0854f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-1.n3.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-2.n3.svn-base deleted file mode 100755 index 19c0854f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-opt-2.n3.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-1.n3.svn-base deleted file mode 100755 index 15e780eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-1.n3.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-2.n3.svn-base deleted file mode 100755 index 15e780eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-2.n3.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-3.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-3.n3.svn-base deleted file mode 100755 index 15e780eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/q-select-3.n3.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/query-survey-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/query-survey-1.n3.svn-base deleted file mode 100755 index 6acb8da5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/query-survey-1.n3.svn-base +++ /dev/null @@ -1,78 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix ex: . -@prefix : . -@prefix dc: . -@prefix acm: . - -:person01 a ex:Person ; - ex:name "John" . -ex:name a rdf:Property ; - rdfs:domain ex:Person ; - rdfs:range . -:person02 a ex:Person , ex:Human ; - ex:name "Bob" . -ex:author a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range rdf:Seq . -ex:Person a rdfs:Class ; - rdfs:subClassOf ex:Human . -ex:reified_triple a rdf:Statement ; - rdf:subject ex:Paper ; - rdf:predicate ex:isAbout ; - rdf:object ; - dc:creator :person01. -:person03 ex:email "mary@example.org" ; - ex:name "Mary" . -ex:year a rdf:Property ; - rdfs:domain ex:Publication . - -:Paper a ex:InProceedings ; - ex:isAbout ; - ex:year "2004" ; - ex:pages "08" ; - ex:title "An Overview of RDF Query Languages" ; - ex:author [ a rdf:Seq ; - rdf:_1 :person01 ; - rdf:_2 :person02 ; - rdf:_3 :person03 ; - rdf:_4 :person04 - ] . - -ex:email a rdf:Property ; - rdfs:domain ex:Person ; - rdfs:range . - - a acm:Topic ; - acm:SubTopic ; - rdfs:label "Informationsysteme"@de , "Information Systems"@en . - - a acm:Topic ; - rdfs:label "Anfragesprachen"@de , "Query Languages"@en . - - acm:SubTopic ; - a acm:Topic ; - rdfs:label "Sprachen"@de , "Languages"@en . -ex:title a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range . -ex:InProceedings a rdfs:Class ; - rdfs:subClassOf ex:Publication . -ex:isAbout a rdf:Property ; - rdfs:range ex:Topic . - -ex:Topic a rdfs:Class . - - a acm:Topic ; - acm:SubTopic ; - rdfs:label "Datenbankmanagement"@de , "Database Management"@en . -:person04 a ex:Human ; - ex:name "Willy" . - -ex:Human a rdfs:Class ; - rdfs:subClassOf ex:Person . - -ex:Publication a rdfs:Class . -ex:pages a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/regex-data-01.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/regex-data-01.n3.svn-base deleted file mode 100755 index 930f1b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/regex-data-01.n3.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix rdf: . -@prefix ex: . - -ex:foo rdf:value "abcDEFghiJKL" , "ABCdefGHIjkl", "0123456789", - , "http://example.com/literal" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-1.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-1.n3.svn-base deleted file mode 100755 index 4312d6e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-1.n3.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix data: . -@prefix ns: . -@prefix rdf: . - -data:x ns:p "1" . -data:x ns:p "2" . - -data:y ns:q data:x . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-2.n3.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-2.n3.svn-base deleted file mode 100755 index bd0de1a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/reif-data-2.n3.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -@prefix data: . -@prefix ns: . -@prefix rdf: . - -[] rdf:object "2" ; - rdf:predicate ns:p ; - rdf:subject data:x . - -[] rdf:object "1"; - rdf:predicate ns:p ; - rdf:subject data:x . - -#Not complete -[] rdf:object data:x ; - rdf:subject data:y . - -# Something different -data:x ns:p data:z . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res1.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res1.xml.svn-base deleted file mode 100755 index 5287f98f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res1.xml.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - r2 - - - http://work.example.org/bob/ - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res2.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res2.xml.svn-base deleted file mode 100755 index 46874752..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res2.xml.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - r2 - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res3.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res3.xml.svn-base deleted file mode 100755 index ecc306d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res3.xml.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - / - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res4.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res4.xml.svn-base deleted file mode 100755 index b116666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res4.xml.svn-base +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - / - - - - - / - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res5.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res5.xml.svn-base deleted file mode 100755 index 92d53d99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res5.xml.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - / - - - - - / - - - 30 - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res6.xml.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res6.xml.svn-base deleted file mode 100755 index f48f0193..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/.svn/text-base/res6.xml.svn-base +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - Bob - - - 30 - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion1.n3 deleted file mode 100755 index 85ff4591..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion1.n3 +++ /dev/null @@ -1,15 +0,0 @@ -@prefix dc10: . -@prefix dc11: . -@prefix test: . - - -_:a dc10:title "SPARQL Query Language Tutorial" . - -_:b dc11:title "SPARQL Protocol Tutorial" . - -_:c dc10:title "SPARQL" . -_:c dc11:title "SPARQL (updated)" . - -_:d dc11:title "Test" . -_:d test:title "Test (updated)" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion2.n3 deleted file mode 100755 index a108f591..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/customUnion2.n3 +++ /dev/null @@ -1,14 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a rdf:type foaf:Person . -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b rdf:type foaf:Person . -_:b foaf:name "Bob" . - -_:c rdf:type foaf:Person . -_:c foaf:name "Bert" . -_:c foaf:mbox2 . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-a.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-a.n3 deleted file mode 100755 index 51c7bb69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-a.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix rdfs: . -@prefix rdf: . -@prefix : . - -:C1 rdfs:subClassOf :C2 . -:x rdf:type :C1 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-arq-basic.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-arq-basic.n3 deleted file mode 100755 index 8112af83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-arq-basic.n3 +++ /dev/null @@ -1,8 +0,0 @@ -@prefix ns: . -@prefix x: . -@prefix z: . - -x:x ns:p "d:x ns:p" . -x:x x:p "x:x x:p" . - -z:x z:p "z:x z:p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool1.n3 deleted file mode 100755 index b71aea3d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool1.n3 +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool2.n3 deleted file mode 100755 index e5d56f65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bool2.n3 +++ /dev/null @@ -1,19 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . - -# Optionals -:x1 :q "true"^^xsd:boolean . -:x2 :q "false"^^xsd:boolean . -:x3 :q "foo"^^:unknown . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bound.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bound.n3 deleted file mode 100755 index b69a4f6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-bound.n3 +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-construct1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-construct1.n3 deleted file mode 100755 index b3928ac3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-construct1.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix ns: . -@prefix : . - -:bill ns:loves _:who . -:joe ns:loves _:who . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-eq.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-eq.n3 deleted file mode 100755 index 6da5a036..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-eq.n3 +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - -:xu :p :z . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-f1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-f1.n3 deleted file mode 100755 index 71103560..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-f1.n3 +++ /dev/null @@ -1,12 +0,0 @@ -@prefix x: . -@prefix : . -@prefix dc: . -@prefix xsd: . - -:book1 dc:title "TITLE 1" . -:book1 x:price "10"^^xsd:integer . - -:book2 dc:title "TITLE 2" . -:book2 x:price "20"^^xsd:integer . - -:book3 dc:title "TITLE 3" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1.n3 deleted file mode 100755 index 6c46ea81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1.n3 +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1" . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0" . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1_changed.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1_changed.n3 deleted file mode 100755 index 7fd796cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-fil1_changed.n3 +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1" . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-langMatches.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-langMatches.n3 deleted file mode 100755 index 9cf5e4d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-langMatches.n3 +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - -:x :p1 "abc" . -:x :p2 . -:x :p3 "abc"@en . -:x :p4 "abc"@en-gb . -:x :p5 "abc"@fr . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-1.n3 deleted file mode 100755 index 055c9f3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-1.n3 +++ /dev/null @@ -1,7 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-3.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-3.n3 deleted file mode 100755 index dc870570..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-3.n3 +++ /dev/null @@ -1,17 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:mbox . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox . - -_:c rdf:type foaf:Person ; - foaf:mbox ; - foaf:name "Fred" . - -_:e foaf:name "Bob" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-4.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-4.n3 deleted file mode 100755 index 14965e08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-4.n3 +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer . - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-6.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-6.n3 deleted file mode 100755 index 3641ae54..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-6.n3 +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:address . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:address "Fascination Street 11" . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:address "fred@work.example" . - -_:e foaf:name "Bob" ; - ex:address . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-8.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-8.n3 deleted file mode 100755 index c68d4b0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-8.n3 +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:f foaf:name "John" ; - ex:empId [ ex:number "29"^^xsd:integer ] . - -_:g foaf:name "Dirk" ; - ex:empId . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-datetime.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-datetime.n3 deleted file mode 100755 index 94cf9124..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data-sort-datetime.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix dc: . - -_:a dc:created "2004-12-31T18:01:00-05:00"^^ . -_:b dc:created "2004-01-31T18:01:00-05:00"^^ . -_:c dc:created "2007-03-12T17:02:00-05:00"^^ . -_:d dc:created "2007-03-12T17:01:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data.n3 deleted file mode 100755 index b69a4f6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/data.n3 +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-001.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-001.n3 deleted file mode 100755 index 1eaf4174..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-001.n3 +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-002.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-002.n3 deleted file mode 100755 index 1eaf4174..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-002.n3 +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-003.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-003.n3 deleted file mode 100755 index 1eaf4174..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-003.n3 +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-004.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-004.n3 deleted file mode 100755 index 1eaf4174..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-query-004.n3 +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-01.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-01.n3 deleted file mode 100755 index f58a52b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-01.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-02.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-02.n3 deleted file mode 100755 index 5bbdc9a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-02.n3 +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-03.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-03.n3 deleted file mode 100755 index 1e590f69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-03.n3 +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - - -:y :y :x . -:x :y :y . -:y :x :y . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-04.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-04.n3 deleted file mode 100755 index 8d4fd0fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/dawg-tp-04.n3 +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_0.n3 deleted file mode 100755 index 397916bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_0.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Ms A.". -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_1.n3 deleted file mode 100755 index 6d4ae4fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.1_1.n3 +++ /dev/null @@ -1,5 +0,0 @@ -@prefix a: . -@prefix dc: . - -_:b a:annotates . -_:b dc:created "2004-12-31T19:00:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.2_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.2_0.n3 deleted file mode 100755 index 3b0e01f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.2_0.n3 +++ /dev/null @@ -1,8 +0,0 @@ -@prefix foaf: . -@prefix dc: . -@prefix xs: . - -_:a foaf:name "Alice". - -_:b foaf:givenName "Bob" . -_:b dc:created "2005-04-04T04:04:04Z"^^xs:dateTime . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.3_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.3_0.n3 deleted file mode 100755 index ae8df033..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.3_0.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox "bob@work.example" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.4_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.4_0.n3 deleted file mode 100755 index a772e518..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.4_0.n3 +++ /dev/null @@ -1,11 +0,0 @@ -@prefix a: . -@prefix dc: . -@prefix foaf: . - -_:a a:annotates . -_:a dc:creator "Alice B. Toeclips" . - -_:b a:annotates . -_:b dc:creator _:c . -_:c foaf:given "Bob". -_:c foaf:family "Smith". diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.5_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.5_0.n3 deleted file mode 100755 index ae8df033..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.5_0.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox "bob@work.example" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.6_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.6_0.n3 deleted file mode 100755 index f46fd73a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.6_0.n3 +++ /dev/null @@ -1,8 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:a foaf:name "Alice". -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.7_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.7_0.n3 deleted file mode 100755 index 86135a0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11.2.3.7_0.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:a foaf:name "Robert"@EN. -_:a foaf:name "Roberto"@ES. -_:a foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11_0.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11_0.n3 deleted file mode 100755 index e02523d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex11_0.n3 +++ /dev/null @@ -1,8 +0,0 @@ -@prefix a: . -@prefix dc: . - -_:a a:annotates . -_:a dc:created "2004-12-31T18:00:00-05:00" . - -_:b a:annotates . -_:b dc:created "2004-12-31T18:01:00-05:00"^^ . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-1a.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-1a.n3 deleted file mode 100755 index 29883d53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-1a.n3 +++ /dev/null @@ -1 +0,0 @@ - "SPARQL Tutorial" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-2a.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-2a.n3 deleted file mode 100755 index 9b3b0a03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-2a.n3 +++ /dev/null @@ -1,2 +0,0 @@ -@prefix rdf: . -rdf:type rdf:type rdf:Property . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-3a.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-3a.n3 deleted file mode 100755 index 7f888b01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-3a.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix foaf: . - -_:a foaf:name "Johnny Lee Outlaw" . -_:a foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-4a.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-4a.n3 deleted file mode 100755 index d3f4d11f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex2-4a.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . - -_:a foaf:name "Johnny Lee Outlaw" . -_:a foaf:mbox . -_:b foaf:name "Peter Goodguy" . -_:b foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex3.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex3.n3 deleted file mode 100755 index 9df12d16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/ex3.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix dc: . -@prefix : . -@prefix ns: . -@prefix xsd: . - -:book1 dc:title "SPARQL Tutorial" . -:book1 ns:price "42"^^xsd:integer . -:book2 dc:title "The Semantic Web" . -:book2 ns:price "23"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr1.n3 deleted file mode 100755 index 42cc1ac6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr1.n3 +++ /dev/null @@ -1,15 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . -_:a foaf:knows _:b . - -_:b foaf:name "Bob" . -_:b foaf:mbox . -_:b foaf:nick "Bobby" . -_:b rdfs:seeAlso . - - - rdf:type foaf:PersonalProfileDocument . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr2.n3 deleted file mode 100755 index 4651075e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset1gr2.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:z foaf:mbox . -_:z rdfs:seeAlso . -_:z foaf:nick "Robert" . - - rdf:type foaf:PersonalProfileDocument . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr1.n3 deleted file mode 100755 index b59cd6be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr1.n3 +++ /dev/null @@ -1,9 +0,0 @@ -# Default graph -@prefix dc: . -@prefix xsd: . - - dc:publisher "Bob" . - dc:date "2004-12-06"^^xsd:date . - - dc:publisher "Bob" . - dc:date "2005-01-10"^^xsd:date . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr2.n3 deleted file mode 100755 index 27551e47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr2.n3 +++ /dev/null @@ -1,9 +0,0 @@ -# Graph: locally allocated IRI: tag:example.org,2005-06-06:graph1 -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr3.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr3.n3 deleted file mode 100755 index 2b5f5a52..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/graphset3gr3.n3 +++ /dev/null @@ -1,8 +0,0 @@ -# Graph: locally allocated IRI: tag:example.org,2005-06-06:graph2 -@prefix foaf: . - -_:a foaf:name "Alice" . -_:a foaf:mbox . - -_:b foaf:name "Bob" . -_:b foaf:mbox . \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model0.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model0.nt deleted file mode 100755 index 852adff6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model0.nt +++ /dev/null @@ -1,2 +0,0 @@ -# Model 0 : one statement - "RDQL//RDQL" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model1.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model1.nt deleted file mode 100755 index 5561fbee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model1.nt +++ /dev/null @@ -1,5 +0,0 @@ -# Model 1 : Two resources ; two properties ; values encode the statement - "v-1-1" . - "v-1-2" . - "v-2-1" . - "v-2-2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model2.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model2.nt deleted file mode 100755 index 5f47987d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model2.nt +++ /dev/null @@ -1,20 +0,0 @@ -# Model 2 : Paths - -# A path - - . - "Value" . - - -# A loop /one node - - . - -# A loop : two nodes - - . - . - -# Two dangling arcs, same property - . - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model3.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model3.nt deleted file mode 100755 index 6474cafc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model3.nt +++ /dev/null @@ -1,6 +0,0 @@ -# Anonymous nodes - -_:a "v-a-1". -_:a "v-a-2". - -_:b _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model4.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model4.nt deleted file mode 100755 index 8e084b50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model4.nt +++ /dev/null @@ -1,12 +0,0 @@ -# Model 4 : Strange shapes - -# Resource and property the same URI - "R==P" . - -# Property and value - . - -# Resource and value has been done in model2. - -# All the same! - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model5.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model5.nt deleted file mode 100755 index 97b91ec1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model5.nt +++ /dev/null @@ -1,12 +0,0 @@ -# Produced by ARP : see model5.rdf -# This has two bags (one anon) in it. -_:j1 "11" . -_:j1 "12" . -_:j1 . - _:j1 . - "21" . - "22" . - . - . - "Other Stuff" . - "metadata" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model6.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model6.nt deleted file mode 100755 index ca0e82f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model6.nt +++ /dev/null @@ -1,3 +0,0 @@ -# Predicate URI also in subject slot - "r-1-2" . - "r-2-1" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model7.nt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model7.nt deleted file mode 100755 index c1776e46..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model7.nt +++ /dev/null @@ -1,2 +0,0 @@ -_:a "p" . - "p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model8.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model8.n3 deleted file mode 100755 index a6742192..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model8.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix ns: . - -:r :p1 "value"^^xsd:string . -:r :p2 "value"^^ns:someType . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model9.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model9.n3 deleted file mode 100755 index 00ea0a1b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/model9.n3 +++ /dev/null @@ -1,17 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix ns: . -@prefix rdf: . - -:r :p1 "value"^^ns:someType . -:r :p2 "value"@en . -:r :p2 "value"@zz . -:r :p3 "value" . -:r :p4 "5"^^xsd:integer . # Same as "5"^^xsd:integer - -# Turtle does not have doubles. -:r :p5 "5.7"^^xsd:double . # Same as 5.7 in N3 -:r :p6 "true"^^xsd:boolean . -:r :p7 "true" . -:r :p8 "value"^^rdf:XMLLiteral . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-1.n3 deleted file mode 100755 index c01ce15f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-1.n3 +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-2.n3 deleted file mode 100755 index c01ce15f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-opt-2.n3 +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-1.n3 deleted file mode 100755 index d28a36ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-1.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-2.n3 deleted file mode 100755 index d28a36ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-2.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-3.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-3.n3 deleted file mode 100755 index d28a36ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/q-select-3.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p "1" . -:x :q "2" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/query-survey-1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/query-survey-1.n3 deleted file mode 100755 index db842489..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/query-survey-1.n3 +++ /dev/null @@ -1,78 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix ex: . -@prefix : . -@prefix dc: . -@prefix acm: . - -:person01 a ex:Person ; - ex:name "John" . -ex:name a rdf:Property ; - rdfs:domain ex:Person ; - rdfs:range . -:person02 a ex:Person , ex:Human ; - ex:name "Bob" . -ex:author a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range rdf:Seq . -ex:Person a rdfs:Class ; - rdfs:subClassOf ex:Human . -ex:reified_triple a rdf:Statement ; - rdf:subject ex:Paper ; - rdf:predicate ex:isAbout ; - rdf:object ; - dc:creator :person01. -:person03 ex:email "mary@example.org" ; - ex:name "Mary" . -ex:year a rdf:Property ; - rdfs:domain ex:Publication . - -:Paper a ex:InProceedings ; - ex:isAbout ; - ex:year "2004" ; - ex:pages "08" ; - ex:title "An Overview of RDF Query Languages" ; - ex:author [ a rdf:Seq ; - rdf:_1 :person01 ; - rdf:_2 :person02 ; - rdf:_3 :person03 ; - rdf:_4 :person04 - ] . - -ex:email a rdf:Property ; - rdfs:domain ex:Person ; - rdfs:range . - - a acm:Topic ; - acm:SubTopic ; - rdfs:label "Informationsysteme"@de , "Information Systems"@en . - - a acm:Topic ; - rdfs:label "Anfragesprachen"@de , "Query Languages"@en . - - acm:SubTopic ; - a acm:Topic ; - rdfs:label "Sprachen"@de , "Languages"@en . -ex:title a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range . -ex:InProceedings a rdfs:Class ; - rdfs:subClassOf ex:Publication . -ex:isAbout a rdf:Property ; - rdfs:range ex:Topic . - -ex:Topic a rdfs:Class . - - a acm:Topic ; - acm:SubTopic ; - rdfs:label "Datenbankmanagement"@de , "Database Management"@en . -:person04 a ex:Human ; - ex:name "Willy" . - -ex:Human a rdfs:Class ; - rdfs:subClassOf ex:Person . - -ex:Publication a rdfs:Class . -ex:pages a rdf:Property ; - rdfs:domain ex:Publication ; - rdfs:range . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/regex-data-01.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/regex-data-01.n3 deleted file mode 100755 index 50fcdbeb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/regex-data-01.n3 +++ /dev/null @@ -1,5 +0,0 @@ -@prefix rdf: . -@prefix ex: . - -ex:foo rdf:value "abcDEFghiJKL" , "ABCdefGHIjkl", "0123456789", - , "http://example.com/literal" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-1.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-1.n3 deleted file mode 100755 index 30c6b692..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-1.n3 +++ /dev/null @@ -1,9 +0,0 @@ -@prefix data: . -@prefix ns: . -@prefix rdf: . - -data:x ns:p "1" . -data:x ns:p "2" . - -data:y ns:q data:x . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-2.n3 b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-2.n3 deleted file mode 100755 index 5d199bed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/reif-data-2.n3 +++ /dev/null @@ -1,19 +0,0 @@ -@prefix data: . -@prefix ns: . -@prefix rdf: . - -[] rdf:object "2" ; - rdf:predicate ns:p ; - rdf:subject data:x . - -[] rdf:object "1"; - rdf:predicate ns:p ; - rdf:subject data:x . - -#Not complete -[] rdf:object data:x ; - rdf:subject data:y . - -# Something different -data:x ns:p data:z . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res1.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res1.xml deleted file mode 100755 index 74e97faa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res1.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - r2 - - - http://work.example.org/bob/ - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res2.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res2.xml deleted file mode 100755 index 651ec374..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res2.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - r2 - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res3.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res3.xml deleted file mode 100755 index f985592b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res3.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - / - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res4.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res4.xml deleted file mode 100755 index 1f32b3af..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res4.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - / - - - - - / - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res5.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res5.xml deleted file mode 100755 index d1fdbee1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res5.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - / - - - - - / - - - 30 - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res6.xml b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res6.xml deleted file mode 100755 index 2dd14446..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/data/res6.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - Bob - - - 30 - - - - - - - - \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/all-wcprops deleted file mode 100755 index e7fa957b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/all-wcprops +++ /dev/null @@ -1,995 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/svnroot/rdfapi-php/!svn/ver/448/trunk/rdfapi-php/test/unit/Sparql/query -END -ex11.2.3.2_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.2_0.rq -END -test-6-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-6-01.rq -END -test-5-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-5-03.rq -END -test-4-05.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-05.rq -END -test-3-07.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-07.rq -END -test-2-09.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-09.rq -END -q-str-1.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-str-1.rq -END -query-eq-graph-4.rq -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-graph-4.rq -END -query-eq-4.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-4.rq -END -q-select-1.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-select-1.rq -END -expr-1.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/expr-1.rq -END -test-B-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-01.rq -END -query-bev-5.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-5.rq -END -dawg-tp-01.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-tp-01.rq -END -q-reif-1.rq -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/query/q-reif-1.rq -END -test-B-15.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-15.rq -END -test-B-09.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-09.rq -END -q-langMatches-4.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-langMatches-4.rq -END -bound1.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/bound1.rq -END -query-sort-3.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-3.rq -END -test-2-10.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-10.rq -END -ex2-1a.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex2-1a.rq -END -test-3-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-02.rq -END -q-opt-2.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-opt-2.rq -END -ex3.rq -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex3.rq -END -ex2-3a.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex2-3a.rq -END -test-2-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-04.rq -END -graphset3.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/graphset3.rq -END -test-1-06.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-06.rq -END -q-base-prefix-1.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-base-prefix-1.rq -END -test-7-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-7-02.rq -END -ex11.2.3.7_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.7_0.rq -END -test-6-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-6-04.rq -END -customUnion1.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/customUnion1.rq -END -q-str-4.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-str-4.rq -END -test-B-10.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-10.rq -END -test-B-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-04.rq -END -q-construct-1.rq -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-construct-1.rq -END -dawg-tp-04.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/335/trunk/rdfapi-php/test/unit/Sparql/query/dawg-tp-04.rq -END -dawg-query-002.rq -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-query-002.rq -END -test-B-18.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-18.rq -END -test-1-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-01.rq -END -LimitOff_3.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/LimitOff_3.rq -END -test-0-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-0-03.rq -END -query-sort-6.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-6.rq -END -test-5-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-5-01.rq -END -test-4-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-03.rq -END -ex11.2.3.4_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.4_0.rq -END -test-3-05.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-05.rq -END -test-2-07.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-07.rq -END -test-1-09.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-09.rq -END -test-9-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-9-01.rq -END -q-base-prefix-4.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-base-prefix-4.rq -END -query-eq-graph-2.rq -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-graph-2.rq -END -query-eq-2.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-2.rq -END -count-02.rq -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/query/count-02.rq -END -regex-query-002.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/regex-query-002.rq -END -query-bev-3.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-3.rq -END -test-B-13.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-13.rq -END -test-B-07.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-07.rq -END -q-langMatches-2.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-langMatches-2.rq -END -query-sort-1.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-1.rq -END -test-1-10.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-10.rq -END -ask-02.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/query/ask-02.rq -END -ex11.2.3.1_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.1_0.rq -END -test-2-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-02.rq -END -graphset1.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/graphset1.rq -END -test-1-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-04.rq -END -ex11.2.3.2_1.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.2_1.rq -END -test-6-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-6-02.rq -END -test-5-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-5-04.rq -END -test-4-06.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-06.rq -END -q-str-2.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-str-2.rq -END -q-datatype-1.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-datatype-1.rq -END -query-eq-5.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-5.rq -END -q-select-2.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-select-2.rq -END -test-B-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-02.rq -END -expr-2.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/expr-2.rq -END -test-B-16.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-16.rq -END -q-reif-2.rq -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-reif-2.rq -END -dawg-tp-02.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-tp-02.rq -END -query-bev-6.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-6.rq -END -query-01.rq -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-01.rq -END -query-eq2-1.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq2-1.rq -END -LimitOff_1.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/342/trunk/rdfapi-php/test/unit/Sparql/query/LimitOff_1.rq -END -test-0-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-0-01.rq -END -query-sort-4.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-4.rq -END -ex11_0.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11_0.rq -END -test-4-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-01.rq -END -test-3-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-03.rq -END -test-2-05.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-05.rq -END -graphset4.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/graphset4.rq -END -test-1-07.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-07.rq -END -q-base-prefix-2.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-base-prefix-2.rq -END -ex11.2.3.6_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.6_0.rq -END -test-7-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-7-03.rq -END -customUnion2.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/customUnion2.rq -END -test-B-11.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-11.rq -END -query-bev-1.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-1.rq -END -test-B-05.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-05.rq -END -q-construct-2.rq -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-construct-2.rq -END -query-sort-datetime.rq -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/448/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-datetime.rq -END -test-B-19.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-19.rq -END -dawg-query-003.rq -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-query-003.rq -END -q-uri-1.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-uri-1.rq -END -test-1-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-02.rq -END -test-0-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-0-04.rq -END -ex2-2a.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex2-2a.rq -END -ex11.2.3.3_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.3_0.rq -END -test-5-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-5-02.rq -END -ex2-4a.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex2-4a.rq -END -test-4-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-04.rq -END -test-3-06.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-06.rq -END -test-2-08.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-08.rq -END -test-9-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-9-02.rq -END -q-base-prefix-5.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-base-prefix-5.rq -END -query-eq-graph-3.rq -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-graph-3.rq -END -query-eq-3.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-3.rq -END -test-B-20.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-20.rq -END -regex-query-003.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/regex-query-003.rq -END -query-bev-4.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-4.rq -END -test-B-08.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-08.rq -END -q-langMatches-3.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-langMatches-3.rq -END -query-sort-2.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-2.rq -END -test-3-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-01.rq -END -q-opt-1.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-opt-1.rq -END -ex11.2.3.1_1.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.1_1.rq -END -test-2-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-03.rq -END -test-1-05.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-05.rq -END -graphset2.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/graphset2.rq -END -test-7-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-7-01.rq -END -test-6-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-6-03.rq -END -test-4-07.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-07.rq -END -q-str-3.rq -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-str-3.rq -END -q-select-3.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-select-3.rq -END -expr-3.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/expr-3.rq -END -test-B-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-03.rq -END -dawg-tp-03.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-tp-03.rq -END -dawg-query-001.rq -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-query-001.rq -END -q-blank-1.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-blank-1.rq -END -test-B-17.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-17.rq -END -LimitOff_2.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/LimitOff_2.rq -END -test-0-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-0-02.rq -END -query-sort-5.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-sort-5.rq -END -query-survey-1.rq -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-survey-1.rq -END -ex11_1.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11_1.rq -END -test-4-02.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-4-02.rq -END -test-3-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-3-04.rq -END -test-2-06.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-06.rq -END -ex11.2.3.5_0.rq -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/ex11.2.3.5_0.rq -END -test-1-08.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-08.rq -END -q-base-prefix-3.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-base-prefix-3.rq -END -test-7-04.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-7-04.rq -END -query-eq-graph-1.rq -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-graph-1.rq -END -query-eq-1.rq -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-eq-1.rq -END -count-01.rq -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/query/count-01.rq -END -regex-query-001.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/regex-query-001.rq -END -query-bev-2.rq -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/query-bev-2.rq -END -test-B-12.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-12.rq -END -test-B-06.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-B-06.rq -END -q-langMatches-1.rq -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/q-langMatches-1.rq -END -dawg-query-004.rq -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/dawg-query-004.rq -END -test-2-01.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-2-01.rq -END -ask-01.rq -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/query/ask-01.rq -END -test-1-03.rq -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/query/test-1-03.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/entries deleted file mode 100755 index 6f151c93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/entries +++ /dev/null @@ -1,2172 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/query -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-06-19T15:48:52.211340Z -448 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ex11.2.3.2_0.rq -file - - - - -2008-02-29T14:57:06.049184Z -5a1d3748a38c5d35fd7fd6645f7c0d36 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-01.rq -file - - - - -2008-02-29T14:57:06.049184Z -eee98187124818a05bf5d202ff4efae1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-03.rq -file - - - - -2008-02-29T14:57:06.064805Z -6c05db5537343fde6e84cede1fc1acc5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-05.rq -file - - - - -2008-02-29T14:57:06.064805Z -ed651a5aa7406cc46cc34eea433c97fa -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-07.rq -file - - - - -2008-02-29T14:57:06.080425Z -ff43a9a2704db0b5af5ec188c007373c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-09.rq -file - - - - -2008-02-29T14:57:06.080425Z -809edfeb25324f14b5d5b188c0c526ca -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-str-1.rq -file - - - - -2008-02-29T14:57:06.080425Z -e83653f7418802bef8559518ee346254 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-graph-4.rq -file - - - - -2008-02-29T14:57:06.096046Z -94c541e2bf21d297e25ff962618bdbf5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-4.rq -file - - - - -2008-02-29T14:57:06.096046Z -7620beab366f2d86f4193a9125599f98 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-1.rq -file - - - - -2008-02-29T14:57:06.096046Z -365744d16fa85f496a6490f1b2f9633f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-1.rq -file - - - - -2008-02-29T14:57:06.111666Z -a810a2c65ed0b9d5b198e2866b96039c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-01.rq -file - - - - -2008-02-29T14:57:06.111666Z -b0d0b989f735caade26635cb151d15ac -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-15.rq -file - - - - -2008-02-29T14:57:06.142908Z -421f276a61ca7877f4999a57882e88d3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-5.rq -file - - - - -2008-02-29T14:57:06.127287Z -84feea687b4bef594e0df8299a6d90b7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-01.rq -file - - - - -2008-02-29T14:57:06.127287Z -bddda2938085414d4df3f5c621a9ceb7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-reif-1.rq -file - - - - -2008-02-29T14:57:06.127287Z -18d79f5ace484ead68038d08d14561ca -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-B-09.rq -file - - - - -2008-02-29T14:57:06.142908Z -90d36f80f941c99d8d08825ffa722ca7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-4.rq -file - - - - -2008-02-29T14:57:06.158528Z -7828b4fe0b42cfa157e10df74175bc5f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -bound1.rq -file - - - - -2008-02-29T14:57:06.158528Z -06cbdccf02efdeb84a1b2330079e56b3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-3.rq -file - - - - -2008-02-29T14:57:06.158528Z -7c2dbd6f653aa46d71784056a1056393 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-10.rq -file - - - - -2008-02-29T14:57:06.174149Z -2569d75b3c295df2e352170923e924ae -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-1a.rq -file - - - - -2008-02-29T14:57:06.174149Z -10c05a10f30b112fa19d78e66bcb19a1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-02.rq -file - - - - -2008-02-29T14:57:06.174149Z -6d1133c138046dcc0718a74bd4d73380 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-opt-2.rq -file - - - - -2008-02-29T14:57:06.205390Z -3df1f041160bce7f5e5f5386dcd1e762 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex3.rq -file - - - - -2008-02-29T14:57:06.205390Z -14f4eb49bf6bfc3ed2290e254eee4f94 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-3a.rq -file - - - - -2008-02-29T14:57:06.189769Z -b45053a887a9f1cd1ae1620fa0ade642 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-04.rq -file - - - - -2008-02-29T14:57:06.189769Z -28fdf6af33cea675481dd763fbaabbae -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset3.rq -file - - - - -2008-02-29T14:57:06.221011Z -9f3d1aa579178e9e018c6d844b77607a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-06.rq -file - - - - -2008-02-29T14:57:06.205390Z -92b7fa9520a99d899cf9be01f928f175 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-1.rq -file - - - - -2008-02-29T14:57:06.221011Z -4a820365b5a31bb32c9ff073239a2683 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-7-02.rq -file - - - - -2008-02-29T14:57:06.221011Z -09a22466382f96bceb6bab1653b318fd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.7_0.rq -file - - - - -2008-02-29T14:57:06.236631Z -317e62eb939822af2c1e5d9fc025093a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-04.rq -file - - - - -2008-02-29T14:57:06.236631Z -03349c4d89e1a7f05a861b662b815de8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -customUnion1.rq -file - - - - -2008-02-29T14:57:06.252252Z -e674b87e9b6377e28818fe6c138b19f1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-str-4.rq -file - - - - -2008-02-29T14:57:06.252252Z -0c7995603b3803dd3613d87863818543 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-10.rq -file - - - - -2008-02-29T14:57:06.252252Z -cd97488213ead178a4ab28ba74998e6d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-04.rq -file - - - - -2008-02-29T14:57:06.267872Z -f9d6388b15380da1bd48c6d9f2d16643 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-construct-1.rq -file - - - - -2008-02-29T14:57:06.267872Z -4d27b67b1f82c427a7e829d3b7cc346d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-04.rq -file - - - - -2008-02-29T14:57:06.283493Z -439a5778334eb044a149def7987520f7 -2007-01-22T07:49:02.000000Z -335 -cweiske -has-props - -dawg-query-002.rq -file - - - - -2008-02-29T14:57:06.283493Z -0e88bf57a8857e81d39637abb6ee7138 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-18.rq -file - - - - -2008-02-29T14:57:06.283493Z -de5c6e01592a31734fdb7689f0f6ab64 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-01.rq -file - - - - -2008-02-29T14:57:06.299114Z -52f18b71458416f0dbea628f46a138c2 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -LimitOff_3.rq -file - - - - -2008-02-29T14:57:06.299114Z -736b382ee6871530bd10b9e5330567c0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-0-03.rq -file - - - - -2008-02-29T14:57:06.314734Z -84e673554114de032724d583fec84d1d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-6.rq -file - - - - -2008-02-29T14:57:06.314734Z -7406f770e13cb02031677d7af9ac0391 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-01.rq -file - - - - -2008-02-29T14:57:06.314734Z -eee98187124818a05bf5d202ff4efae1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-03.rq -file - - - - -2008-02-29T14:57:06.330355Z -c11d4c8cdf2d3c1bafe259b51199662f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.4_0.rq -file - - - - -2008-02-29T14:57:06.330355Z -04d2cda536676de7780abef9d45dda09 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-05.rq -file - - - - -2008-02-29T14:57:06.330355Z -72fbec7aab4e310a8b4239894a51a19c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-07.rq -file - - - - -2008-02-29T14:57:06.345975Z -8b412ea348f40956b019b1b5591d8584 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-09.rq -file - - - - -2008-02-29T14:57:06.345975Z -2b7b651d6fba0d3575f21203f4e1bcdc -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-9-01.rq -file - - - - -2008-02-29T14:57:06.361596Z -4ca844f8c8887917c4ac429ff368e7cc -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-4.rq -file - - - - -2008-02-29T14:57:06.361596Z -b468a0945c451aa7a652a6ac69eb5e46 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-graph-2.rq -file - - - - -2008-02-29T14:57:06.377217Z -5b2017025375b5189083d56ce642a7ed -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-2.rq -file - - - - -2008-02-29T14:57:06.377217Z -c9e1d0b3c7a015f3eb32bced656cdbfd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -count-02.rq -file - - - - -2008-02-29T14:57:06.377217Z -57cd0411d2cd0a0b3bd1ec575357a2f2 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -regex-query-002.rq -file - - - - -2008-02-29T14:57:06.392837Z -983bd0b288ea850acd50069aebff7257 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-3.rq -file - - - - -2008-02-29T14:57:06.392837Z -14eaed3c752ced149cc7fa99c4c915f1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-13.rq -file - - - - -2008-02-29T14:57:06.408458Z -b8315847873dfbedb6c097c4db8bade5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-07.rq -file - - - - -2008-02-29T14:57:06.408458Z -caade07615d991189ac1c19a893b845c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-2.rq -file - - - - -2008-02-29T14:57:06.408458Z -a8776287e262ec482e8d5152dd416ae8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-1.rq -file - - - - -2008-02-29T14:57:06.424078Z -4d16688072f2e2a01503b5f5c456342c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-10.rq -file - - - - -2008-02-29T14:57:06.424078Z -9506b7fa143ceee904eae555c89239a3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ask-02.rq -file - - - - -2008-02-29T14:57:06.439699Z -2ced17c84a96e4f4face4af3f1148406 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -ex11.2.3.1_0.rq -file - - - - -2008-02-29T14:57:06.439699Z -a34c8209c77a9bf71610054b22dd5775 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-02.rq -file - - - - -2008-02-29T14:57:06.439699Z -d7f85201ce71b3c10b5369785e3819a8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset1.rq -file - - - - -2008-02-29T14:57:06.455320Z -05bac67c371448522f9d7bcf30173606 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-04.rq -file - - - - -2008-02-29T14:57:06.455320Z -3151f727f3ca65d827514a9360764c4f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.2_1.rq -file - - - - -2008-02-29T14:57:06.470940Z -16f4da50d323f3551913a3a5fbd7745d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-02.rq -file - - - - -2008-02-29T14:57:06.470940Z -b9af408b3642bdbfbbff00ffc20f54f5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-04.rq -file - - - - -2008-02-29T14:57:06.486561Z -03349c4d89e1a7f05a861b662b815de8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-06.rq -file - - - - -2008-02-29T14:57:06.486561Z -f20ddb50b2db05b426735f3b74528c5f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-str-2.rq -file - - - - -2008-02-29T14:57:06.486561Z -acc88816df96b28d2d9a3a1d7972132b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-datatype-1.rq -file - - - - -2008-02-29T14:57:06.502181Z -2b0806415246f635c3e1634da5734b5b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-5.rq -file - - - - -2008-02-29T14:57:06.502181Z -d9ababacaf89216fd647873f6d26e677 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-2.rq -file - - - - -2008-02-29T14:57:06.517802Z -14a06063985847dc62627379ebcd2242 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-02.rq -file - - - - -2008-02-29T14:57:06.517802Z -8be2ab1148dfe1113c348603fc521968 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-2.rq -file - - - - -2008-02-29T14:57:06.517802Z -f01f78f8810f0406c7de76b9fe274c30 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-16.rq -file - - - - -2008-02-29T14:57:06.549043Z -421f276a61ca7877f4999a57882e88d3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-reif-2.rq -file - - - - -2008-02-29T14:57:06.549043Z -dc85373895db898cb59c1213f660dadf -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-02.rq -file - - - - -2008-02-29T14:57:06.533423Z -ac63c1033974070edaff89db242605f6 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-6.rq -file - - - - -2008-02-29T14:57:06.533423Z -251a5522599739cd9b2ef41a1a60cfb1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-01.rq -file - - - - -2008-02-29T14:57:06.549043Z -6afde2e866f7579ff2ea790034f18cca -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq2-1.rq -file - - - - -2008-02-29T14:57:06.564664Z -4ea85e4e74fcda8e870cdd4bc41049ed -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -LimitOff_1.rq -file - - - - -2008-02-29T14:57:06.564664Z -e4e1e0de6c147952879ec54ebb64ef09 -2007-01-24T21:13:48.000000Z -342 -cweiske -has-props - -test-0-01.rq -file - - - - -2008-02-29T14:57:06.564664Z -caade07615d991189ac1c19a893b845c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-4.rq -file - - - - -2008-02-29T14:57:06.580284Z -f4b9b395d3d34bc35747e6f7dd78b3bd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11_0.rq -file - - - - -2008-02-29T14:57:06.580284Z -8e7e4d0b0cd8ad9d9a4593f487f1ec1f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-01.rq -file - - - - -2008-02-29T14:57:06.595905Z -c4e042eca93d1e2069f5b2b1cacad29d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-03.rq -file - - - - -2008-02-29T14:57:06.595905Z -195199ebac624c96c513436166e67637 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-05.rq -file - - - - -2008-02-29T14:57:06.595905Z -f603be964f6808fa43486debb2d952f9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset4.rq -file - - - - -2008-02-29T14:57:06.611526Z -2dd20aca56d553c15f10ad816e7306e0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-07.rq -file - - - - -2008-02-29T14:57:06.611526Z -a49083b09bc2d71c1087b2ef4bdf616c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-2.rq -file - - - - -2008-02-29T14:57:06.627146Z -62ab98091084d6f92a32d9b0be4249e5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.6_0.rq -file - - - - -2008-02-29T14:57:06.611526Z -441425cb3d68ded68c48290b2cbf6e0c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-7-03.rq -file - - - - -2008-02-29T14:57:06.627146Z -762004043ce9eb503dc810ab10d8745d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -customUnion2.rq -file - - - - -2008-02-29T14:57:06.642767Z -1568db87d2608c8bab6f1bff33677763 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-11.rq -file - - - - -2008-02-29T14:57:06.658387Z -d3c149ec8b105a4310b107fbfc02c054 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-1.rq -file - - - - -2008-02-29T14:57:06.642767Z -aa460a26118565fb2b6091f2cafd5018 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-05.rq -file - - - - -2008-02-29T14:57:06.658387Z -ebd3398f9f74856e5b690cca63ec101a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-construct-2.rq -file - - - - -2008-02-29T14:57:06.658387Z -44b40f939ad1960d11a40474b5a4aaf7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-datetime.rq -file - - - - -2008-02-29T14:57:06.674008Z -eb9ecda4b9598be34126d1605890bfff -2007-06-19T15:48:52.211340Z -448 -cweiske - -test-B-19.rq -file - - - - -2008-02-29T14:57:06.674008Z -b45cdbed257fdf27306ed313a50849cb -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-003.rq -file - - - - -2008-02-29T14:57:06.674008Z -e68f2b9f2e3a34f6281b3b2aa0c47d13 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-uri-1.rq -file - - - - -2008-02-29T14:57:06.689629Z -5bdf6abaea47e057730fe94187754492 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-02.rq -file - - - - -2008-02-29T14:57:06.689629Z -3db9f1fa25caff0ff1b94c3e036db6ae -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-0-04.rq -file - - - - -2008-02-29T14:57:06.705249Z -caade07615d991189ac1c19a893b845c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-2a.rq -file - - - - -2008-02-29T14:57:06.705249Z -956274642857e4c3ed9a5e77ceb29e8b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.3_0.rq -file - - - - -2008-02-29T14:57:06.705249Z -842216e17e2d16fa79970413358aa3fe -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-02.rq -file - - - - -2008-02-29T14:57:06.720870Z -b9af408b3642bdbfbbff00ffc20f54f5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-4a.rq -file - - - - -2008-02-29T14:57:06.720870Z -27eb6eac0272068ce3bc0e7482a0bdbd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-04.rq -file - - - - -2008-02-29T14:57:06.736490Z -2b2c8ec2a2716e701473f92163ed51d7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-06.rq -file - - - - -2008-02-29T14:57:06.736490Z -b3a55a3bc2559b8fee4b8bbdcad6843c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-08.rq -file - - - - -2008-02-29T14:57:06.752111Z -fe6fa26b7a6de2cdb0432bb464bce37c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-9-02.rq -file - - - - -2008-02-29T14:57:06.752111Z -4ca844f8c8887917c4ac429ff368e7cc -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-5.rq -file - - - - -2008-02-29T14:57:06.752111Z -51a268803484f11ed9cee9556cae582f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-graph-3.rq -file - - - - -2008-02-29T14:57:06.767732Z -b4aa48bb58e1aabfd65436abe357e4d7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-3.rq -file - - - - -2008-02-29T14:57:06.767732Z -775c67f74d032d1a66e16dde4acca483 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-20.rq -file - - - - -2008-02-29T14:57:06.783352Z -a44193b91eeedae36e35e41507d233d8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -regex-query-003.rq -file - - - - -2008-02-29T14:57:06.783352Z -9dae5dfdb0ee28e14a5ab36627aeb482 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-4.rq -file - - - - -2008-02-29T14:57:06.783352Z -a0778ea86313d650dcca8ffc43e1c2b2 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-08.rq -file - - - - -2008-02-29T14:57:06.798973Z -0ff294a26b4321ed8190d887fc2bbc75 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-3.rq -file - - - - -2008-02-29T14:57:06.798973Z -914b77a288e55e580fdb7e99eb91bf11 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-2.rq -file - - - - -2008-02-29T14:57:06.814593Z -ce77eeecfd1c0580468095070666d84e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-01.rq -file - - - - -2008-02-29T14:57:06.814593Z -0cd0d91756959c79612dc3ca6c792a07 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.1_1.rq -file - - - - -2008-02-29T14:57:06.830214Z -ec49a08102ebf8736f55a9733d5c7291 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-03.rq -file - - - - -2008-02-29T14:57:06.814593Z -1a2c6cec95396d246c61bbe498c96b28 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-opt-1.rq -file - - - - -2008-02-29T14:57:06.830214Z -955de74f8e51b849003ea9fecea04663 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-05.rq -file - - - - -2008-02-29T14:57:06.845835Z -29d6eff565a33de7827223f1714e7ecc -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset2.rq -file - - - - -2008-02-29T14:57:06.845835Z -79420d10fa3581ede935f12cda175a13 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-7-01.rq -file - - - - -2008-02-29T14:57:06.845835Z -762004043ce9eb503dc810ab10d8745d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-03.rq -file - - - - -2008-02-29T14:57:06.861455Z -6c05db5537343fde6e84cede1fc1acc5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-07.rq -file - - - - -2008-02-29T14:57:06.861455Z -74c4dc34368d7eeb4e6c27eaa7eb48eb -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-str-3.rq -file - - - - -2008-02-29T14:57:06.861455Z -f0ec2cd6b872cb7e1344a292ee3dcc4d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-3.rq -file - - - - -2008-02-29T14:57:06.877076Z -5c05fec34538f5a750996f1c9b4cba60 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-3.rq -file - - - - -2008-02-29T14:57:06.877076Z -e678d2baa36219fd9cb089bf3a747de7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-03.rq -file - - - - -2008-02-29T14:57:06.892696Z -86cefafc1acb99a74356eb690d2fb052 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-03.rq -file - - - - -2008-02-29T14:57:06.892696Z -0d39778f0faff80da7ca5b57e362caf2 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-001.rq -file - - - - -2008-02-29T14:57:06.892696Z -f754f67879390ae1c87e5e1bcdc792cd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-blank-1.rq -file - - - - -2008-02-29T14:57:06.908317Z -d19f827392c519b58e6cb76250d2cf31 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-17.rq -file - - - - -2008-02-29T14:57:06.908317Z -4339bd99c15cab5141f827e45097ee7e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -LimitOff_2.rq -file - - - - -2008-02-29T14:57:06.923938Z -40475ef7279460bc132cec2813d8cb09 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-0-02.rq -file - - - - -2008-02-29T14:57:06.923938Z -a3449d5f0337642b0132ea3ad2730857 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-sort-5.rq -file - - - - -2008-02-29T14:57:06.923938Z -7ee6cacf68ddd57711c86bf42155d260 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-survey-1.rq -file - - - - -2008-02-29T14:57:06.939558Z -88e3f6b6a4124878c7fd709e30faddec -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11_1.rq -file - - - - -2008-02-29T14:57:06.939558Z -b7f8b22f46cf2115f5d31ba2954ceb0a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-02.rq -file - - - - -2008-02-29T14:57:06.955179Z -82805bcc32be80b2aa4cd2ae856273e5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-3-04.rq -file - - - - -2008-02-29T14:57:06.955179Z -56ce91cda6fc787d361c883966f8ec17 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-06.rq -file - - - - -2008-02-29T14:57:06.955179Z -f30537147d6875d19da2e925de27490c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.5_0.rq -file - - - - -2008-02-29T14:57:06.970799Z -748390f48e5004749f6a0b29ed3f2a90 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-08.rq -file - - - - -2008-02-29T14:57:06.970799Z -fe256648b64e07ae563147e4a4cfc2a9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-3.rq -file - - - - -2008-02-29T14:57:06.986420Z -9e02299da14dd5c6721c3115676d6780 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-7-04.rq -file - - - - -2008-02-29T14:57:06.986420Z -c474c1a697ae340f59c56d2d001ecff8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-graph-1.rq -file - - - - -2008-02-29T14:57:07.002041Z -2224068bc73ec90a28c5a5dc391b12c2 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-1.rq -file - - - - -2008-02-29T14:57:07.017661Z -788a7b4a70d3d802749b746132654e23 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -count-01.rq -file - - - - -2008-02-29T14:57:07.017661Z -f7afcb564f245e9d085afd16ede408aa -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -regex-query-001.rq -file - - - - -2008-02-29T14:57:07.017661Z -8456373eeabbd31d2c70d8a3ea88b916 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-2.rq -file - - - - -2008-02-29T14:57:07.033282Z -ad684a973ec8d8f5e8df41bb94bfe469 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-12.rq -file - - - - -2008-02-29T14:57:07.033282Z -337d29b72e4e40e45c219e84687693c9 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-06.rq -file - - - - -2008-02-29T14:57:07.048902Z -0ae9634b6de4fcc36c794a747289151a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-1.rq -file - - - - -2008-02-29T14:57:07.048902Z -3717ea44f27dd9f9f2599500fc9c98f8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-004.rq -file - - - - -2008-02-29T14:57:07.142626Z -807542a0b05777c86f01224c04582eac -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-01.rq -file - - - - -2008-02-29T14:57:07.158247Z -c7baea1ff0f19f5d5a5de653f44a49c7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ask-01.rq -file - - - - -2008-02-29T14:57:07.158247Z -f8e8abe9a25df0503ec9c00a5c667432 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -test-1-03.rq -file - - - - -2008-02-29T14:57:07.173867Z -056000eaa97a41b1e49d1637997270ba -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/LimitOff_3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-01.rq.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-01.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-02.rq.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ask-02.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/bound1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/bound1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/bound1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-01.rq.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-01.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-02.rq.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/count-02.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/customUnion2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-001.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-001.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-001.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-002.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-002.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-002.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-003.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-003.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-003.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-004.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-004.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-query-004.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/dawg-tp-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.1_1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.2_1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.3_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.3_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.3_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.4_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.4_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.4_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.5_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.5_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.5_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.6_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.6_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.6_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.7_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.7_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11.2.3.7_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_0.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex11_1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-1a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-1a.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-1a.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-2a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-2a.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-2a.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-3a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-3a.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-3a.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-4a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-4a.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex2-4a.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/ex3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/expr-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/graphset4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-5.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-base-prefix-5.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-blank-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-blank-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-blank-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-construct-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-datatype-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-datatype-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-datatype-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-langMatches-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-opt-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-reif-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-select-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-str-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-uri-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-uri-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/q-uri-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-5.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-5.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-6.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-bev-6.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-5.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-5.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq-graph-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq2-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq2-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-eq2-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-2.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-3.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-4.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-5.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-5.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-6.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-sort-6.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-survey-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-survey-1.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/query-survey-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-001.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-001.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-001.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-002.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-002.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-002.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-003.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-003.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/regex-query-003.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-0-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-05.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-06.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-07.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-08.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-08.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-09.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-09.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-10.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-1-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-05.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-06.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-07.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-08.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-08.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-09.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-09.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-10.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-2-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-05.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-06.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-07.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-3-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-05.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-06.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-07.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-4-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-5-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-6-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-7-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-9-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-01.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-02.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-03.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-04.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-05.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-06.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-07.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-08.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-08.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-09.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-09.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-10.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-11.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-11.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-12.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-12.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-13.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-13.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-15.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-15.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-15.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-16.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-16.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-16.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-17.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-17.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-17.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-18.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-18.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-18.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-19.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-19.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-19.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-20.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-20.rq.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/prop-base/test-B-20.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_1.rq.svn-base deleted file mode 100755 index c8ee42bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -LIMIT 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_2.rq.svn-base deleted file mode 100755 index ff1b474b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -OFFSET 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_3.rq.svn-base deleted file mode 100755 index d3cd2941..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/LimitOff_3.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -OFFSET 2 -LIMIT 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-01.rq.svn-base deleted file mode 100755 index e7d9dc41..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -ASK { ?person foaf:name ?name . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-02.rq.svn-base deleted file mode 100755 index cd81f78f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ask-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -ASK { ?person foaf:name "alice" . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/bound1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/bound1.rq.svn-base deleted file mode 100755 index b3d7f985..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/bound1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -SELECT ?a ?c -WHERE - { ?a :b ?c . - OPTIONAL - { ?c :d ?e } . - FILTER (! bound(?e)) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-01.rq.svn-base deleted file mode 100755 index 0bf22824..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -COUNT { ?person foaf:name ?name . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-02.rq.svn-base deleted file mode 100755 index b98a53ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/count-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -COUNT { ?person foaf:name "alice" . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion1.rq.svn-base deleted file mode 100755 index 9af07278..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX dc10: -PREFIX dc11: -PREFIX test: - -SELECT ?title -WHERE { { ?book dc10:title ?title } UNION { ?book dc11:title ?title } UNION {?book test:title ?title}} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion2.rq.svn-base deleted file mode 100755 index 94f2e22b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/customUnion2.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE {{ ?x foaf:name ?name . ?x foaf:mbox ?mbox } UNION { ?x foaf:mbox2 ?mbox} } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-001.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-001.rq.svn-base deleted file mode 100755 index df1ed919..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-001.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Get name, and optionally the mbox, of each person - -PREFIX foaf: - -SELECT ?name ?mbox -WHERE - { ?person foaf:name ?name . - OPTIONAL { ?person foaf:mbox ?mbox} - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-002.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-002.rq.svn-base deleted file mode 100755 index 5cb0916f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-002.rq.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -# Get names of people, together with the names of people they know. - -PREFIX foaf: - -SELECT ?name ?name2 -WHERE - { ?person foaf:name ?name . - OPTIONAL { - ?person foaf:knows ?p2 . - ?p2 foaf:name ?name2 . - } - } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-003.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-003.rq.svn-base deleted file mode 100755 index c4c92719..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-003.rq.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -# Get names and mboxes, each of which may be optional. - -PREFIX foaf: -PREFIX rdf: - -SELECT ?name ?mbox -WHERE - { - { ?person rdf:type foaf:Person } . - OPTIONAL { ?person foaf:name ?name } . - OPTIONAL {?person foaf:mbox ?mbox} . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-004.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-004.rq.svn-base deleted file mode 100755 index 5c42109d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-query-004.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -# Get optional get the mbox, of each person - -PREFIX foaf: -SELECT ?name -WHERE - { OPTIONAL { ?person foaf:name ?name } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-01.rq.svn-base deleted file mode 100755 index d4bc1d8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -WHERE { :x ?p ?q . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-02.rq.svn-base deleted file mode 100755 index 0b71cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-03.rq.svn-base deleted file mode 100755 index 6e31cf27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?a ?a ?b . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-04.rq.svn-base deleted file mode 100755 index 8fb78f75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/dawg-tp-04.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?name -WHERE { - ?x rdf:type foaf:Person . - ?x foaf:name ?name . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_0.rq.svn-base deleted file mode 100755 index 0de1f245..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_0.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -SELECT ?name1 ?name2 - WHERE { ?x foaf:name ?name1 ; - foaf:mbox ?mbox1 . - ?y foaf:name ?name2 ; - foaf:mbox ?mbox2 . - FILTER ( ?mbox1 = ?mbox2 && ?name1 != ?name2 ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_1.rq.svn-base deleted file mode 100755 index 51164282..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.1_1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annotates -WHERE { ?annot a:annotates ?annotates . - ?annot dc:created ?date . - FILTER ( ?date = xsd:dateTime("2004-01-01T00:00:00Z") || ?date = xsd:dateTime("2005-01-01T00:00:00Z") ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_0.rq.svn-base deleted file mode 100755 index 20b5d5af..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -PREFIX dc: -SELECT ?name ?givenName - WHERE { { ?x foaf:name ?name } UNION { ?x foaf:givenName ?givenName; dc:created ?created } . - FILTER ( bound(?name) || ?created < "2005-01-01T00:00:00Z" ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_1.rq.svn-base deleted file mode 100755 index 1100b0e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.2_1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -PREFIX dc: -SELECT ?name - WHERE { ?x foaf:name ?name . - OPTIONAL { ?x dc:created ?created } . - FILTER ( !bound(?created)) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.3_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.3_0.rq.svn-base deleted file mode 100755 index 9a09c526..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.3_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER isUri(?mbox) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.4_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.4_0.rq.svn-base deleted file mode 100755 index 7f535917..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.4_0.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX foaf: - -SELECT ?given ?family - WHERE { ?annot a:annotates . - ?annot dc:creator ?c . - OPTIONAL { ?c foaf:given ?given ; foaf:family ?family } . - FILTER isBlank(?c) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.5_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.5_0.rq.svn-base deleted file mode 100755 index 76ecd9f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.5_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER isLiteral(?mbox) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.6_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.6_0.rq.svn-base deleted file mode 100755 index 48962a14..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.6_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER regex(str(?mbox), "@work.example") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.7_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.7_0.rq.svn-base deleted file mode 100755 index 48f716d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11.2.3.7_0.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER ( lang(?name) = "ES" ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_0.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_0.rq.svn-base deleted file mode 100755 index f0211dc3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_0.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( ?date < xsd:dateTime("2005-01-01T00:00:00Z") ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_1.rq.svn-base deleted file mode 100755 index 5fbfb1a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex11_1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( xsd:dateTime(?date) < xsd:dateTime("2005-01-01T00:00:00Z") ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-1a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-1a.rq.svn-base deleted file mode 100755 index 23166d2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-1a.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?title -WHERE - { ?title } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-2a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-2a.rq.svn-base deleted file mode 100755 index eb81be77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-2a.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-3a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-3a.rq.svn-base deleted file mode 100755 index 797ec632..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-3a.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?mbox -WHERE - { ?x foaf:name "Johnny Lee Outlaw" . - ?x foaf:mbox ?mbox . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-4a.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-4a.rq.svn-base deleted file mode 100755 index 7bc3eae9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex2-4a.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE - { ?x foaf:name ?name . - ?x foaf:mbox ?mbox . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex3.rq.svn-base deleted file mode 100755 index d5bc27c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/ex3.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX dc: -PREFIX ns: -SELECT ?title ?price -WHERE - { ?x ns:price ?price . - FILTER ( ?price < 30 ) . - ?x dc:title ?title . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-1.rq.svn-base deleted file mode 100755 index 5ea50fda..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-1.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price . - FILTER (?price < 15) . - } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-2.rq.svn-base deleted file mode 100755 index 80fd3fae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER (?price < 15) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-3.rq.svn-base deleted file mode 100755 index 0e33c6cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/expr-3.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER ( ( ! bound(?price) ) || ( ?price < 15 ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset1.rq.svn-base deleted file mode 100755 index a62623db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset1.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: - -SELECT ?src ?bobNick -WHERE - { - GRAPH ?src - { ?x foaf:mbox . - ?x foaf:nick ?bobNick - } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset2.rq.svn-base deleted file mode 100755 index 3c0e9c3c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset2.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX data: - -SELECT ?nick -WHERE - { - GRAPH data:bobFoaf { - ?x foaf:mbox . - ?x foaf:nick ?nick } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset3.rq.svn-base deleted file mode 100755 index 9594387b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset3.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX dc: - -SELECT ?name ?mbox ?date -WHERE - { ?g dc:publisher ?name ; - dc:date ?date . - GRAPH ?g - { ?person foaf:name ?name ; foaf:mbox ?mbox } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset4.rq.svn-base deleted file mode 100755 index 39b9aeb7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/graphset4.rq.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -PREFIX data: -PREFIX foaf: -PREFIX rdf: -PREFIX rdfs: - -SELECT ?mbox ?nick ?ppd -WHERE -{ - GRAPH data:aliceFoaf - { - ?alice foaf:mbox ; - foaf:knows ?whom . - ?whom foaf:mbox ?mbox ; - rdfs:seeAlso ?ppd . - ?ppd a foaf:PersonalProfileDocument . - } . - GRAPH ?ppd - { - ?w foaf:mbox ?mbox ; - foaf:nick ?nick - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-1.rq.svn-base deleted file mode 100755 index 4adf184f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-2.rq.svn-base deleted file mode 100755 index 824f2cb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-3.rq.svn-base deleted file mode 100755 index 73e134d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -PREFIX x: - -SELECT * WHERE { x:x ns:p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-4.rq.svn-base deleted file mode 100755 index 76305994..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-4.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE {

        ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-5.rq.svn-base deleted file mode 100755 index 010e7556..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-base-prefix-5.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE { <#x> <#p> ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-blank-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-blank-1.rq.svn-base deleted file mode 100755 index 3f508880..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-blank-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (isBlank(?v)) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-1.rq.svn-base deleted file mode 100755 index fea33f65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX ns: -PREFIX : - -CONSTRUCT - { ?x ns:knows ?y } -WHERE - { ?x ns:loves ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-2.rq.svn-base deleted file mode 100755 index 18052adc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-construct-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ns: -PREFIX : - -# No match => empty graph -CONSTRUCT - { ?x ns:knows ?y } -WHERE - { ?x ns:sameTown ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-datatype-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-datatype-1.rq.svn-base deleted file mode 100755 index 13a59e3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-datatype-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( datatype(?v) = xsd:double ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-1.rq.svn-base deleted file mode 100755 index 04e9c981..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en-GB") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-2.rq.svn-base deleted file mode 100755 index 8c98dd3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-3.rq.svn-base deleted file mode 100755 index 5aa69035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "*") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-4.rq.svn-base deleted file mode 100755 index e62eae4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-langMatches-4.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER (! langMatches(lang(?v), "*")) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-1.rq.svn-base deleted file mode 100755 index a171bedd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-2.rq.svn-base deleted file mode 100755 index a0f9998a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-opt-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name ?nick - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - OPTIONAL { ?x foaf:nick ?nick } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-1.rq.svn-base deleted file mode 100755 index 3d4a6ebb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -CONSTRUCT - { _:b0 rdf:subject ?s . - _:b0 rdf:predicate ?p . - _:b0 rdf:object ?o . - } -WHERE - { ?s ?p ?o . } -ORDER BY ?s ?o \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-2.rq.svn-base deleted file mode 100755 index 2c4eed9f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-reif-2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -CONSTRUCT - { ?s ?p ?o . - } -WHERE - { _:b0 rdf:subject ?s . - _:b0 rdf:predicate ?p . - _:b0 rdf:object ?o . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-1.rq.svn-base deleted file mode 100755 index 0dea4416..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x - { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-2.rq.svn-base deleted file mode 100755 index db3b5bc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x ?y - { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-3.rq.svn-base deleted file mode 100755 index 334119cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-select-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x - { :x :p ?x . :x :q ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-1.rq.svn-base deleted file mode 100755 index 0acd1f59..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "1") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-2.rq.svn-base deleted file mode 100755 index 660d7caa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "01") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-3.rq.svn-base deleted file mode 100755 index 895911cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "zzz") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-4.rq.svn-base deleted file mode 100755 index e81ecfd9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-str-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-uri-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-uri-1.rq.svn-base deleted file mode 100755 index d8de720e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/q-uri-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isURI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-01.rq.svn-base deleted file mode 100755 index 8584ff48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT ?c WHERE (:x rdf:type ?c) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-1.rq.svn-base deleted file mode 100755 index 5d95b4a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-2.rq.svn-base deleted file mode 100755 index a111b2b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ( ! ?v ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-3.rq.svn-base deleted file mode 100755 index 28b34ec5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("true"^^xsd:boolean && ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-4.rq.svn-base deleted file mode 100755 index a8cd28f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("false"^^xsd:boolean || ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-5.rq.svn-base deleted file mode 100755 index 2597ba50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-5.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-6.rq.svn-base deleted file mode 100755 index 58ee1dcd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-bev-6.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a ?w -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (! ?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-1.rq.svn-base deleted file mode 100755 index 655e91a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1 ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-2.rq.svn-base deleted file mode 100755 index 4d6dbcbb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = 1.0) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-3.rq.svn-base deleted file mode 100755 index 248e3ef1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = "1") - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-4.rq.svn-base deleted file mode 100755 index fc16f988..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = "zzz" ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-5.rq.svn-base deleted file mode 100755 index 35bafb9a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-5.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = :z) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-1.rq.svn-base deleted file mode 100755 index 19d7fc80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-2.rq.svn-base deleted file mode 100755 index 3f5d1060..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-2.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1.0 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-3.rq.svn-base deleted file mode 100755 index c0088ffe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-4.rq.svn-base deleted file mode 100755 index 7c137883..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq-graph-4.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "zzz" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq2-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq2-1.rq.svn-base deleted file mode 100755 index a9407a19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-eq2-1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER (?v1 = ?v2) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-1.rq.svn-base deleted file mode 100755 index 28a46543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-2.rq.svn-base deleted file mode 100755 index 096f9399..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-3.rq.svn-base deleted file mode 100755 index 6c6a45da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-3.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE { ?x foaf:name ?name . - OPTIONAL { ?x foaf:mbox ?mbox } - } -ORDER BY ASC(?mbox) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-4.rq.svn-base deleted file mode 100755 index 3f8b3ee6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-4.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-5.rq.svn-base deleted file mode 100755 index 71bfb00b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-5.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ?name DESC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-6.rq.svn-base deleted file mode 100755 index 085b9d7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-6.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX ex: - -SELECT ?address -WHERE { ?x ex:address ?address } -ORDER BY ASC(?address) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-datetime.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-datetime.rq.svn-base deleted file mode 100755 index 9ac13d4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-sort-datetime.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX dc: - -SELECT ?created -WHERE { ?x dc:created ?created } -ORDER BY ASC(?created) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-survey-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-survey-1.rq.svn-base deleted file mode 100755 index f40902e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/query-survey-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -prefix ex: -SELECT ?n -WHERE - { ?x ex:author _:a . _:a ?li _:b . _:b ex:name ?n . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-001.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-001.rq.svn-base deleted file mode 100755 index 3c8f6613..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-001.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "GHI") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-002.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-002.rq.svn-base deleted file mode 100755 index b0bb7fde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-002.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ex: -PREFIX rdf: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "DeFghI", "i") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-003.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-003.rq.svn-base deleted file mode 100755 index 384da9b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/regex-query-003.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-01.rq.svn-base deleted file mode 100755 index 65cdf257..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-02.rq.svn-base deleted file mode 100755 index a052c94d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-03.rq.svn-base deleted file mode 100755 index 316611eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?select -WHERE - { ?x ?select } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-04.rq.svn-base deleted file mode 100755 index 65cdf257..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-0-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-01.rq.svn-base deleted file mode 100755 index 2194aa1b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-02.rq.svn-base deleted file mode 100755 index 1d667483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-03.rq.svn-base deleted file mode 100755 index 45319062..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-04.rq.svn-base deleted file mode 100755 index 5b94372e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-05.rq.svn-base deleted file mode 100755 index 2246d500..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-06.rq.svn-base deleted file mode 100755 index 5a365e56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-07.rq.svn-base deleted file mode 100755 index 22c350e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-07.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-08.rq.svn-base deleted file mode 100755 index 4bfc5913..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-08.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y "v-2-2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-09.rq.svn-base deleted file mode 100755 index 67aa1a78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-09.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX prefix: -SELECT * -WHERE -# ILLEGAL -{ prefix:/r-1 ?y "v-1-2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-10.rq.svn-base deleted file mode 100755 index d86ae9a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-1-10.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x ?v -WHERE - { ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-01.rq.svn-base deleted file mode 100755 index e1cebaed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?z -WHERE - { ?x ?y ?z . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-02.rq.svn-base deleted file mode 100755 index a3320e95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?a -WHERE - { ?x ?y ?z . - ?x ?y ?a . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-03.rq.svn-base deleted file mode 100755 index de7d56a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-04.rq.svn-base deleted file mode 100755 index 092b970f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?a ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-05.rq.svn-base deleted file mode 100755 index 75e73c0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y "v-1-1" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-06.rq.svn-base deleted file mode 100755 index a6b2a9e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y "v-1-2" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-07.rq.svn-base deleted file mode 100755 index f6f4fabb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-07.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z1 . - ?x ?y ?z2 . - FILTER ( ?z1 = ?z2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-08.rq.svn-base deleted file mode 100755 index a366a76d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-08.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?y "v-1-1" . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-09.rq.svn-base deleted file mode 100755 index e918e6fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-09.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?y ?z . - ?x ?y ?a . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-10.rq.svn-base deleted file mode 100755 index 2f0e0e5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-2-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-01.rq.svn-base deleted file mode 100755 index fd33a7cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-02.rq.svn-base deleted file mode 100755 index e1378730..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?y) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-03.rq.svn-base deleted file mode 100755 index 734e40e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?z) = "v-2-2" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-04.rq.svn-base deleted file mode 100755 index 5be07b2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-04.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-05.rq.svn-base deleted file mode 100755 index f95b0c27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-05.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - FILTER ( str(?z) = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-06.rq.svn-base deleted file mode 100755 index c88d6a66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-06.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - FILTER ( str(?z) = str("v-2-1") ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-07.rq.svn-base deleted file mode 100755 index e6b9ed5c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-3-07.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rsyn: -SELECT ?b ?y -WHERE - { ?b rsyn:type rsyn:Bag . - ?b ?x ?y . - FILTER ( ! ( ( str(?x) = str(rsyn:type) ) && ( str(?y) = str(rsyn:Bag) ) ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-01.rq.svn-base deleted file mode 100755 index ee39337d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?a ?b ?z . - ?z ?c ?d . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-02.rq.svn-base deleted file mode 100755 index 0b0360f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?a ?z . - ?z ?d . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-03.rq.svn-base deleted file mode 100755 index d63c7184..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?a ?b } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-04.rq.svn-base deleted file mode 100755 index 64b3e17f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?a ?b "http://rdf.hp.com/s2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-05.rq.svn-base deleted file mode 100755 index df49933b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?y ?a ?b -WHERE - { ?x ?y ?z . - ?z ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-06.rq.svn-base deleted file mode 100755 index 632c163d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-06.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?p1 ?v1 . - ?y ?p2 ?v2 . - FILTER str(?x) = str(?y) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-07.rq.svn-base deleted file mode 100755 index 32bfbb5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-4-07.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y -WHERE - { ?x ?p1 "v-a-1" . - ?y ?p2 "v-a-2" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-01.rq.svn-base deleted file mode 100755 index f5140ad2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-02.rq.svn-base deleted file mode 100755 index 61c11c64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-03.rq.svn-base deleted file mode 100755 index 60331abc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-04.rq.svn-base deleted file mode 100755 index df253355..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-5-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-01.rq.svn-base deleted file mode 100755 index f5140ad2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-02.rq.svn-base deleted file mode 100755 index 61c11c64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-03.rq.svn-base deleted file mode 100755 index 60331abc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-04.rq.svn-base deleted file mode 100755 index df253355..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-6-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-01.rq.svn-base deleted file mode 100755 index f4c00788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?x ?y ?z . - ?y ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-02.rq.svn-base deleted file mode 100755 index b29105cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?y ?a ?b . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-03.rq.svn-base deleted file mode 100755 index f4c00788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?x ?y ?z . - ?y ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-04.rq.svn-base deleted file mode 100755 index d819fec8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-7-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?y ?a ?b . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-01.rq.svn-base deleted file mode 100755 index a37fe742..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-02.rq.svn-base deleted file mode 100755 index a37fe742..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-9-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-01.rq.svn-base deleted file mode 100755 index 8ec88c92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x ?y -WHERE - { ?x ?y "value" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-02.rq.svn-base deleted file mode 100755 index dd9dfa8e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -SELECT ?x ?y -WHERE - { ?x ?y "value"^^ns:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-03.rq.svn-base deleted file mode 100755 index c1ff8983..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ex: -SELECT ?x ?y -WHERE - { ?x ?y "value"^^ex:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-04.rq.svn-base deleted file mode 100755 index 394ba904..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX xsd: - -SELECT ?x ?y -WHERE - { ?x ?y "value"^^xsd:string } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-05.rq.svn-base deleted file mode 100755 index f2bbd826..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?z -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-06.rq.svn-base deleted file mode 100755 index 981c4ebc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-06.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX ns: -SELECT ?z -WHERE - { ?x ?y ?z . - FILTER ( ( str(?z) = "value" ) && ( datatype(?z) = ns:someType ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-07.rq.svn-base deleted file mode 100755 index 65cdf257..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-07.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-08.rq.svn-base deleted file mode 100755 index e2647961..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-08.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "value"@en } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-09.rq.svn-base deleted file mode 100755 index 4bd8fad1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-09.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -SELECT * -WHERE - { ?x ?y "value"^^ns:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-10.rq.svn-base deleted file mode 100755 index 6e456fbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: - -SELECT * -WHERE - { ?x ?y "value"^^rdf:XMLLiteral } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-11.rq.svn-base deleted file mode 100755 index c77db2f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-11.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?z) = str("value"@en) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-12.rq.svn-base deleted file mode 100755 index ed6cd3d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-12.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "value"@en ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-13.rq.svn-base deleted file mode 100755 index 3c7cb7e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-13.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y 5 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-15.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-15.rq.svn-base deleted file mode 100755 index d8c2e3b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-15.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-16.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-16.rq.svn-base deleted file mode 100755 index d8c2e3b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-16.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-17.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-17.rq.svn-base deleted file mode 100755 index b4a0c0b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-17.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "true" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-18.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-18.rq.svn-base deleted file mode 100755 index 7a766466..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-18.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE -{ - ?x ?y ?v . - FILTER ( ?v = true ) -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-19.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-19.rq.svn-base deleted file mode 100755 index 27f3351d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-19.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y 5.7 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-20.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-20.rq.svn-base deleted file mode 100755 index 3d4d31e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/.svn/text-base/test-B-20.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5.7 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_1.rq deleted file mode 100755 index 1b25701c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_1.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -LIMIT 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_2.rq deleted file mode 100755 index 68baea03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_2.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -OFFSET 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_3.rq deleted file mode 100755 index ba96b4b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/LimitOff_3.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) -OFFSET 2 -LIMIT 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-01.rq deleted file mode 100755 index e7600c1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -ASK { ?person foaf:name ?name . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-02.rq deleted file mode 100755 index 0fbd33eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ask-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -ASK { ?person foaf:name "alice" . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/bound1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/bound1.rq deleted file mode 100755 index df90f768..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/bound1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -SELECT ?a ?c -WHERE - { ?a :b ?c . - OPTIONAL - { ?c :d ?e } . - FILTER (! bound(?e)) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-01.rq deleted file mode 100755 index 2680560d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -COUNT { ?person foaf:name ?name . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-02.rq deleted file mode 100755 index 9887f64e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/count-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX foaf: -COUNT { ?person foaf:name "alice" . } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion1.rq deleted file mode 100755 index 5c1ea67c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX dc10: -PREFIX dc11: -PREFIX test: - -SELECT ?title -WHERE { { ?book dc10:title ?title } UNION { ?book dc11:title ?title } UNION {?book test:title ?title}} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion2.rq deleted file mode 100755 index c1f38b48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/customUnion2.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE {{ ?x foaf:name ?name . ?x foaf:mbox ?mbox } UNION { ?x foaf:mbox2 ?mbox} } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-001.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-001.rq deleted file mode 100755 index e61886a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-001.rq +++ /dev/null @@ -1,9 +0,0 @@ -# Get name, and optionally the mbox, of each person - -PREFIX foaf: - -SELECT ?name ?mbox -WHERE - { ?person foaf:name ?name . - OPTIONAL { ?person foaf:mbox ?mbox} - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-002.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-002.rq deleted file mode 100755 index d4d1d4cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-002.rq +++ /dev/null @@ -1,14 +0,0 @@ -# Get names of people, together with the names of people they know. - -PREFIX foaf: - -SELECT ?name ?name2 -WHERE - { ?person foaf:name ?name . - OPTIONAL { - ?person foaf:knows ?p2 . - ?p2 foaf:name ?name2 . - } - } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-003.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-003.rq deleted file mode 100755 index c3489fc0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-003.rq +++ /dev/null @@ -1,12 +0,0 @@ -# Get names and mboxes, each of which may be optional. - -PREFIX foaf: -PREFIX rdf: - -SELECT ?name ?mbox -WHERE - { - { ?person rdf:type foaf:Person } . - OPTIONAL { ?person foaf:name ?name } . - OPTIONAL {?person foaf:mbox ?mbox} . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-004.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-004.rq deleted file mode 100755 index 33e63e35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-query-004.rq +++ /dev/null @@ -1,6 +0,0 @@ -# Get optional get the mbox, of each person - -PREFIX foaf: -SELECT ?name -WHERE - { OPTIONAL { ?person foaf:name ?name } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-01.rq deleted file mode 100755 index 71935344..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -WHERE { :x ?p ?q . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-02.rq deleted file mode 100755 index 5375d71b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-03.rq deleted file mode 100755 index 65336ec0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?a ?a ?b . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-04.rq deleted file mode 100755 index 1ac5c3f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/dawg-tp-04.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?name -WHERE { - ?x rdf:type foaf:Person . - ?x foaf:name ?name . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_0.rq deleted file mode 100755 index 729f93b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_0.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -SELECT ?name1 ?name2 - WHERE { ?x foaf:name ?name1 ; - foaf:mbox ?mbox1 . - ?y foaf:name ?name2 ; - foaf:mbox ?mbox2 . - FILTER ( ?mbox1 = ?mbox2 && ?name1 != ?name2 ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_1.rq deleted file mode 100755 index a68947d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.1_1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annotates -WHERE { ?annot a:annotates ?annotates . - ?annot dc:created ?date . - FILTER ( ?date = xsd:dateTime("2004-01-01T00:00:00Z") || ?date = xsd:dateTime("2005-01-01T00:00:00Z") ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_0.rq deleted file mode 100755 index 7aabbee4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_0.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -PREFIX dc: -SELECT ?name ?givenName - WHERE { { ?x foaf:name ?name } UNION { ?x foaf:givenName ?givenName; dc:created ?created } . - FILTER ( bound(?name) || ?created < "2005-01-01T00:00:00Z" ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_1.rq deleted file mode 100755 index 792c5500..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.2_1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -PREFIX dc: -SELECT ?name - WHERE { ?x foaf:name ?name . - OPTIONAL { ?x dc:created ?created } . - FILTER ( !bound(?created)) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.3_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.3_0.rq deleted file mode 100755 index e37a628e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.3_0.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER isUri(?mbox) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.4_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.4_0.rq deleted file mode 100755 index ba95ede4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.4_0.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX foaf: - -SELECT ?given ?family - WHERE { ?annot a:annotates . - ?annot dc:creator ?c . - OPTIONAL { ?c foaf:given ?given ; foaf:family ?family } . - FILTER isBlank(?c) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.5_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.5_0.rq deleted file mode 100755 index 0db938e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.5_0.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER isLiteral(?mbox) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.6_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.6_0.rq deleted file mode 100755 index ae18fce6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.6_0.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER regex(str(?mbox), "@work.example") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.7_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.7_0.rq deleted file mode 100755 index b85141fe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11.2.3.7_0.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox - WHERE { ?x foaf:name ?name ; - foaf:mbox ?mbox . - FILTER ( lang(?name) = "ES" ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_0.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_0.rq deleted file mode 100755 index 08140cf7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_0.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( ?date < xsd:dateTime("2005-01-01T00:00:00Z") ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_1.rq deleted file mode 100755 index 3c849b23..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex11_1.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX a: -PREFIX dc: -PREFIX xsd: - -SELECT ?annot -WHERE { ?annot a:annotates . - ?annot dc:created ?date . - FILTER ( xsd:dateTime(?date) < xsd:dateTime("2005-01-01T00:00:00Z") ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-1a.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-1a.rq deleted file mode 100755 index 18376c2a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-1a.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?title -WHERE - { ?title } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-2a.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-2a.rq deleted file mode 100755 index 5ecb28b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-2a.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-3a.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-3a.rq deleted file mode 100755 index c735733e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-3a.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?mbox -WHERE - { ?x foaf:name "Johnny Lee Outlaw" . - ?x foaf:mbox ?mbox . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-4a.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-4a.rq deleted file mode 100755 index 098be425..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex2-4a.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE - { ?x foaf:name ?name . - ?x foaf:mbox ?mbox . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex3.rq deleted file mode 100755 index 747e97dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/ex3.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX dc: -PREFIX ns: -SELECT ?title ?price -WHERE - { ?x ns:price ?price . - FILTER ( ?price < 30 ) . - ?x dc:title ?title . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-1.rq deleted file mode 100755 index 5bd32b08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-1.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price . - FILTER (?price < 15) . - } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-2.rq deleted file mode 100755 index 3d3e158c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-2.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER (?price < 15) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-3.rq deleted file mode 100755 index f80472f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/expr-3.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER ( ( ! bound(?price) ) || ( ?price < 15 ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset1.rq deleted file mode 100755 index 40279109..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset1.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: - -SELECT ?src ?bobNick -WHERE - { - GRAPH ?src - { ?x foaf:mbox . - ?x foaf:nick ?bobNick - } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset2.rq deleted file mode 100755 index 777c75b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset2.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX data: - -SELECT ?nick -WHERE - { - GRAPH data:bobFoaf { - ?x foaf:mbox . - ?x foaf:nick ?nick } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset3.rq deleted file mode 100755 index 3e33db50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset3.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX foaf: -PREFIX dc: - -SELECT ?name ?mbox ?date -WHERE - { ?g dc:publisher ?name ; - dc:date ?date . - GRAPH ?g - { ?person foaf:name ?name ; foaf:mbox ?mbox } - } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset4.rq deleted file mode 100755 index d20f1bdb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/graphset4.rq +++ /dev/null @@ -1,22 +0,0 @@ -PREFIX data: -PREFIX foaf: -PREFIX rdf: -PREFIX rdfs: - -SELECT ?mbox ?nick ?ppd -WHERE -{ - GRAPH data:aliceFoaf - { - ?alice foaf:mbox ; - foaf:knows ?whom . - ?whom foaf:mbox ?mbox ; - rdfs:seeAlso ?ppd . - ?ppd a foaf:PersonalProfileDocument . - } . - GRAPH ?ppd - { - ?w foaf:mbox ?mbox ; - foaf:nick ?nick - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-1.rq deleted file mode 100755 index 36077b83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-2.rq deleted file mode 100755 index 93965102..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-3.rq deleted file mode 100755 index 1355b8a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -PREFIX x: - -SELECT * WHERE { x:x ns:p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-4.rq deleted file mode 100755 index 1d2bfd3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-4.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE {

        ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-5.rq deleted file mode 100755 index bccc0f86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-base-prefix-5.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE { <#x> <#p> ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-blank-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-blank-1.rq deleted file mode 100755 index 128c0b78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-blank-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (isBlank(?v)) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-1.rq deleted file mode 100755 index bc6793a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX ns: -PREFIX : - -CONSTRUCT - { ?x ns:knows ?y } -WHERE - { ?x ns:loves ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-2.rq deleted file mode 100755 index e81561e0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-construct-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ns: -PREFIX : - -# No match => empty graph -CONSTRUCT - { ?x ns:knows ?y } -WHERE - { ?x ns:sameTown ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-datatype-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-datatype-1.rq deleted file mode 100755 index e491c28f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-datatype-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( datatype(?v) = xsd:double ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-1.rq deleted file mode 100755 index 3fa0c18b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en-GB") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-2.rq deleted file mode 100755 index bbd17033..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-3.rq deleted file mode 100755 index e0ddbd3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "*") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-4.rq deleted file mode 100755 index e342db3b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-langMatches-4.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER (! langMatches(lang(?v), "*")) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-1.rq deleted file mode 100755 index 35ac7001..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-2.rq deleted file mode 100755 index 5018abc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-opt-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name ?nick - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - OPTIONAL { ?x foaf:nick ?nick } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-1.rq deleted file mode 100755 index cdcdf682..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-1.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -CONSTRUCT - { _:b0 rdf:subject ?s . - _:b0 rdf:predicate ?p . - _:b0 rdf:object ?o . - } -WHERE - { ?s ?p ?o . } -ORDER BY ?s ?o \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-2.rq deleted file mode 100755 index 0947106d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-reif-2.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -CONSTRUCT - { ?s ?p ?o . - } -WHERE - { _:b0 rdf:subject ?s . - _:b0 rdf:predicate ?p . - _:b0 rdf:object ?o . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-1.rq deleted file mode 100755 index 73974bce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x - { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-2.rq deleted file mode 100755 index 841fd5a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x ?y - { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-3.rq deleted file mode 100755 index 76b061b5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-select-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?x - { :x :p ?x . :x :q ?y } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-1.rq deleted file mode 100755 index 7552b827..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "1") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-2.rq deleted file mode 100755 index 2dabab36..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "01") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-3.rq deleted file mode 100755 index cf6334c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "zzz") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-4.rq deleted file mode 100755 index da2d0c75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-str-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER (str(?v) = "") . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-uri-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-uri-1.rq deleted file mode 100755 index 0e8fc69a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/q-uri-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isURI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-01.rq deleted file mode 100755 index d9ca8d0b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT ?c WHERE (:x rdf:type ?c) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-1.rq deleted file mode 100755 index 0ca460e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-2.rq deleted file mode 100755 index 5fef18f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ( ! ?v ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-3.rq deleted file mode 100755 index f631482f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("true"^^xsd:boolean && ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-4.rq deleted file mode 100755 index 542bbe20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("false"^^xsd:boolean || ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-5.rq deleted file mode 100755 index 8cf6cba8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-5.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-6.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-6.rq deleted file mode 100755 index 2b86e6aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-bev-6.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a ?w -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (! ?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-1.rq deleted file mode 100755 index 964637bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1 ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-2.rq deleted file mode 100755 index 6c53c502..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = 1.0) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-3.rq deleted file mode 100755 index d8618a8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = "1") - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-4.rq deleted file mode 100755 index 37180c75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = "zzz" ) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-5.rq deleted file mode 100755 index 46c145e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-5.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER (?v = :z) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-1.rq deleted file mode 100755 index ba4e083e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-2.rq deleted file mode 100755 index aa6cee01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-2.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1.0 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-3.rq deleted file mode 100755 index 4fbd81f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-4.rq deleted file mode 100755 index 0f0fce01..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq-graph-4.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "zzz" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq2-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq2-1.rq deleted file mode 100755 index e5d59fe1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-eq2-1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER (?v1 = ?v2) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-1.rq deleted file mode 100755 index 590f14e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-2.rq deleted file mode 100755 index 6ed67314..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-3.rq deleted file mode 100755 index 57c56f20..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-3.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE { ?x foaf:name ?name . - OPTIONAL { ?x foaf:mbox ?mbox } - } -ORDER BY ASC(?mbox) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-4.rq deleted file mode 100755 index d8fd9723..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-4.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-5.rq deleted file mode 100755 index e2875474..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-5.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ?name DESC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-6.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-6.rq deleted file mode 100755 index 7106cb25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-6.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX ex: - -SELECT ?address -WHERE { ?x ex:address ?address } -ORDER BY ASC(?address) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-datetime.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-datetime.rq deleted file mode 100755 index 9ac13d4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-sort-datetime.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX dc: - -SELECT ?created -WHERE { ?x dc:created ?created } -ORDER BY ASC(?created) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-survey-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-survey-1.rq deleted file mode 100755 index 1bb314c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/query-survey-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -prefix ex: -SELECT ?n -WHERE - { ?x ex:author _:a . _:a ?li _:b . _:b ex:name ?n . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-001.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-001.rq deleted file mode 100755 index cd1d2d79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-001.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "GHI") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-002.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-002.rq deleted file mode 100755 index a3c19b79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-002.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ex: -PREFIX rdf: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "DeFghI", "i") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-003.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-003.rq deleted file mode 100755 index 530d5f2d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/regex-query-003.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-01.rq deleted file mode 100755 index 35617aef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-02.rq deleted file mode 100755 index 970ce524..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-03.rq deleted file mode 100755 index 67e0d325..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?select -WHERE - { ?x ?select } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-04.rq deleted file mode 100755 index 35617aef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-0-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-01.rq deleted file mode 100755 index e8317950..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-02.rq deleted file mode 100755 index 86174b83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-03.rq deleted file mode 100755 index 64c5c5bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-04.rq deleted file mode 100755 index dd0cfef1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-05.rq deleted file mode 100755 index 51ddc822..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-06.rq deleted file mode 100755 index 5a50e394..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-07.rq deleted file mode 100755 index 63d83abb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-07.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { "v-1-1" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-08.rq deleted file mode 100755 index 44c4be31..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-08.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?y "v-2-2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-09.rq deleted file mode 100755 index 1bea5679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-09.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX prefix: -SELECT * -WHERE -# ILLEGAL -{ prefix:/r-1 ?y "v-1-2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-10.rq deleted file mode 100755 index fc527971..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-1-10.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x ?v -WHERE - { ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-01.rq deleted file mode 100755 index 4c256929..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?z -WHERE - { ?x ?y ?z . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-02.rq deleted file mode 100755 index 2df10435..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?a -WHERE - { ?x ?y ?z . - ?x ?y ?a . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-03.rq deleted file mode 100755 index 164ff656..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-03.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-04.rq deleted file mode 100755 index 42b94da0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-04.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?a ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-05.rq deleted file mode 100755 index 55c27ccd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-05.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y "v-1-1" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-06.rq deleted file mode 100755 index bf8dd0de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-06.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y "v-1-2" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-07.rq deleted file mode 100755 index 40ae2447..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-07.rq +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z1 . - ?x ?y ?z2 . - FILTER ( ?z1 = ?z2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-08.rq deleted file mode 100755 index e7452b1b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-08.rq +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?y "v-1-1" . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-09.rq deleted file mode 100755 index f7b520b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-09.rq +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - ?x ?y ?z . - ?x ?y ?a . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-10.rq deleted file mode 100755 index ff0c0b69..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-2-10.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y "v-1-1" . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-01.rq deleted file mode 100755 index 6ea850fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-02.rq deleted file mode 100755 index d4d84e93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?y) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-03.rq deleted file mode 100755 index dd363b05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-03.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?z) = "v-2-2" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-04.rq deleted file mode 100755 index 52893b17..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-04.rq +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-05.rq deleted file mode 100755 index d8e81e81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-05.rq +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - FILTER ( str(?z) = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-06.rq deleted file mode 100755 index b4103184..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-06.rq +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?x) = str() ) . - FILTER ( str(?y) = str() ) . - FILTER ( str(?z) = str("v-2-1") ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-07.rq deleted file mode 100755 index 7f8db95e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-3-07.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rsyn: -SELECT ?b ?y -WHERE - { ?b rsyn:type rsyn:Bag . - ?b ?x ?y . - FILTER ( ! ( ( str(?x) = str(rsyn:type) ) && ( str(?y) = str(rsyn:Bag) ) ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-01.rq deleted file mode 100755 index 0cf71ad3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?a ?b ?z . - ?z ?c ?d . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-02.rq deleted file mode 100755 index 9ae7e959..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?a ?z . - ?z ?d . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-03.rq deleted file mode 100755 index 1d261855..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?a ?b } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-04.rq deleted file mode 100755 index c1a96a43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?a ?b "http://rdf.hp.com/s2" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-05.rq deleted file mode 100755 index 6fa7ecc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-05.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?y ?a ?b -WHERE - { ?x ?y ?z . - ?z ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-06.rq deleted file mode 100755 index 390ee91b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-06.rq +++ /dev/null @@ -1,6 +0,0 @@ -SELECT * -WHERE - { ?x ?p1 ?v1 . - ?y ?p2 ?v2 . - FILTER str(?x) = str(?y) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-07.rq deleted file mode 100755 index 67b24008..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-4-07.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y -WHERE - { ?x ?p1 "v-a-1" . - ?y ?p2 "v-a-2" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-01.rq deleted file mode 100755 index 13618b1c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-02.rq deleted file mode 100755 index dcf94a7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-03.rq deleted file mode 100755 index 36aeae4a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-04.rq deleted file mode 100755 index 85dcbaa2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-5-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-01.rq deleted file mode 100755 index 13618b1c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-02.rq deleted file mode 100755 index dcf94a7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-03.rq deleted file mode 100755 index 36aeae4a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?z ?x ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-04.rq deleted file mode 100755 index 85dcbaa2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-6-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?z ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-01.rq deleted file mode 100755 index b20bd191..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?x ?y ?z . - ?y ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-02.rq deleted file mode 100755 index 7d52969e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?y ?a ?b . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-03.rq deleted file mode 100755 index b20bd191..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-03.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?x ?y ?z . - ?y ?a ?b . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-04.rq deleted file mode 100755 index 5384e95a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-7-04.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ?x ?y ?a -WHERE - { ?y ?a ?b . - ?x ?y ?z . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-01.rq deleted file mode 100755 index 9a08a225..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-02.rq deleted file mode 100755 index 9a08a225..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-9-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "v-1-1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-01.rq deleted file mode 100755 index 6e1993e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?x ?y -WHERE - { ?x ?y "value" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-02.rq deleted file mode 100755 index 65c5d9ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -SELECT ?x ?y -WHERE - { ?x ?y "value"^^ns:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-03.rq deleted file mode 100755 index 59bbc2d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ex: -SELECT ?x ?y -WHERE - { ?x ?y "value"^^ex:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-04.rq deleted file mode 100755 index e04efeb0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-04.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX xsd: - -SELECT ?x ?y -WHERE - { ?x ?y "value"^^xsd:string } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-05.rq deleted file mode 100755 index a641ed8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT ?z -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-06.rq deleted file mode 100755 index 7e50b970..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-06.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX ns: -SELECT ?z -WHERE - { ?x ?y ?z . - FILTER ( ( str(?z) = "value" ) && ( datatype(?z) = ns:someType ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-07.rq deleted file mode 100755 index 35617aef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-07.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-08.rq deleted file mode 100755 index fd1f507a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-08.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "value"@en } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-09.rq deleted file mode 100755 index 0216bbe2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-09.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -SELECT * -WHERE - { ?x ?y "value"^^ns:someType } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-10.rq deleted file mode 100755 index d73d4a25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-10.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: - -SELECT * -WHERE - { ?x ?y "value"^^rdf:XMLLiteral } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-11.rq deleted file mode 100755 index 23c54bfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-11.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( str(?z) = str("value"@en) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-12.rq deleted file mode 100755 index 45152e99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-12.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?z . - FILTER ( ?z = "value"@en ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-13.rq deleted file mode 100755 index 5125781e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-13.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y 5 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-15.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-15.rq deleted file mode 100755 index 3e18917b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-15.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-16.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-16.rq deleted file mode 100755 index 3e18917b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-16.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-17.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-17.rq deleted file mode 100755 index f44c19df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-17.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y "true" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-18.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-18.rq deleted file mode 100755 index f96b2f03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-18.rq +++ /dev/null @@ -1,7 +0,0 @@ -SELECT * -WHERE -{ - ?x ?y ?v . - FILTER ( ?v = true ) -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-19.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-19.rq deleted file mode 100755 index 45e46b6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-19.rq +++ /dev/null @@ -1,3 +0,0 @@ -SELECT * -WHERE - { ?x ?y 5.7 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-20.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-20.rq deleted file mode 100755 index 94ae2ecd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/query/test-B-20.rq +++ /dev/null @@ -1,5 +0,0 @@ -SELECT * -WHERE - { ?x ?y ?v . - FILTER ( ?v = 5.7 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/all-wcprops deleted file mode 100755 index 8399acdc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/all-wcprops +++ /dev/null @@ -1,1025 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/svnroot/rdfapi-php/!svn/ver/478/trunk/rdfapi-php/test/unit/Sparql/result -END -test-3-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-02.res -END -test-3-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-04.res -END -test-7-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-7-01.res -END -test-3-06.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-06.res -END -test-7-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-7-03.res -END -q-select-2.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-select-2.res -END -q-uri-1.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-uri-1.res -END -test-2-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-02.res -END -ex11.2.3.1_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.1_0.res -END -ask-02.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/result/ask-02.res -END -test-2-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-04.res -END -ex2-3a.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex2-3a.res -END -ex3.res -K 25 -svn:wc:ra_dav:version-url -V 81 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex3.res -END -q-opt-2.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-opt-2.res -END -test-6-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-6-01.res -END -ex11.2.3.5_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.5_0.res -END -test-2-06.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-06.res -END -test-6-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-6-03.res -END -test-2-08.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-08.res -END -q-str-2.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/q-str-2.res -END -query-eq-graph-2.res -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-graph-2.res -END -q-str-4.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/q-str-4.res -END -query-eq-graph-4.res -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-graph-4.res -END -res1.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/result/res1.res -END -res3.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/result/res3.res -END -test-B-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-02.res -END -expr-2.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/expr-2.res -END -res5.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/306/trunk/rdfapi-php/test/unit/Sparql/result/res5.res -END -test-B-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-04.res -END -test-B-08.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-08.res -END -bound1.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/bound1.res -END -LimitOff_2.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/LimitOff_2.res -END -test-1-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-02.res -END -ex11_0.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/ex11_0.res -END -test-1-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-04.res -END -graphset1.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/graphset1.res -END -test-5-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-5-01.res -END -test-1-06.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-06.res -END -graphset3.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/graphset3.res -END -test-5-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-5-03.res -END -test-1-08.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-1-08.res -END -test-9-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-9-02.res -END -customUnion2.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/customUnion2.res -END -query-eq-2.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-2.res -END -count-02.res -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/result/count-02.res -END -query-eq-4.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-4.res -END -query-bev-1.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-1.res -END -test-B-11.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-11.res -END -query-bev-3.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-3.res -END -test-B-13.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-13.res -END -q-construct-1.res -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-construct-1.res -END -query-bev-5.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-5.res -END -dawg-tp-01.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-tp-01.res -END -q-reif-1.res -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-reif-1.res -END -test-B-15.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-15.res -END -q-langMatches-1.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-langMatches-1.res -END -dawg-tp-03.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-tp-03.res -END -dawg-query-001.res -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-query-001.res -END -q-blank-1.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-blank-1.res -END -test-B-17.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/474/trunk/rdfapi-php/test/unit/Sparql/result/test-B-17.res -END -q-langMatches-3.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-langMatches-3.res -END -dawg-query-003.res -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-query-003.res -END -test-B-19.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-19.res -END -test-0-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-0-02.res -END -test-0-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-0-04.res -END -test-4-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-01.res -END -ex11.2.3.2_1.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.2_1.res -END -test-4-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-03.res -END -ex11.2.3.4_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.4_0.res -END -q-base-prefix-1.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-base-prefix-1.res -END -test-4-05.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-05.res -END -q-base-prefix-3.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-base-prefix-3.res -END -test-4-07.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-07.res -END -q-base-prefix-5.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-base-prefix-5.res -END -q-datatype-1.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-datatype-1.res -END -sort1.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/sort1.res -END -sort3.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/sort3.res -END -regex-query-001.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/347/trunk/rdfapi-php/test/unit/Sparql/result/regex-query-001.res -END -sort5.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/sort5.res -END -test-B-20.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-20.res -END -regex-query-003.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/347/trunk/rdfapi-php/test/unit/Sparql/result/regex-query-003.res -END -test-3-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-01.res -END -ex2-2a.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex2-2a.res -END -test-3-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-03.res -END -test-3-05.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-05.res -END -test-7-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-7-02.res -END -test-3-07.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-3-07.res -END -test-7-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-7-04.res -END -q-select-1.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-select-1.res -END -q-select-3.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-select-3.res -END -query-eq2-1.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq2-1.res -END -ask-01.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/result/ask-01.res -END -test-2-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-01.res -END -q-opt-1.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-opt-1.res -END -ex11.2.3.1_1.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.1_1.res -END -test-2-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-03.res -END -ex11.2.3.3_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.3_0.res -END -test-2-05.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-2-05.res -END -test-6-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-6-02.res -END -test-2-07.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-07.res -END -test-6-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-6-04.res -END -ex11.2.3.7_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.7_0.res -END -q-str-1.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/q-str-1.res -END -test-2-09.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-09.res -END -query-eq-graph-1.res -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-graph-1.res -END -q-str-3.res -K 25 -svn:wc:ra_dav:version-url -V 85 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/q-str-3.res -END -query-eq-graph-3.res -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-graph-3.res -END -res2.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/result/res2.res -END -test-B-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-01.res -END -expr-1.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/expr-1.res -END -res4.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/298/trunk/rdfapi-php/test/unit/Sparql/result/res4.res -END -test-B-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-03.res -END -expr-3.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/expr-3.res -END -res6.res -K 25 -svn:wc:ra_dav:version-url -V 82 -/svnroot/rdfapi-php/!svn/ver/306/trunk/rdfapi-php/test/unit/Sparql/result/res6.res -END -test-B-05.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-05.res -END -test-B-09.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-09.res -END -LimitOff_1.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/LimitOff_1.res -END -LimitOff1.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/LimitOff1.res -END -LimitOff_3.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/LimitOff_3.res -END -test-1-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-01.res -END -test-2-10.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-2-10.res -END -test-1-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-03.res -END -ex11_1.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/ex11_1.res -END -query-survey-1.res -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/478/trunk/rdfapi-php/test/unit/Sparql/result/query-survey-1.res -END -graphset2.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/graphset2.res -END -test-1-05.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-1-05.res -END -test-5-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-5-02.res -END -ex2-4a.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex2-4a.res -END -test-1-07.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-1-07.res -END -graphset4.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/graphset4.res -END -test-5-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-5-04.res -END -test-1-09.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-09.res -END -test-9-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-9-01.res -END -customUnion1.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/customUnion1.res -END -query-eq-1.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-1.res -END -count-01.res -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/438/trunk/rdfapi-php/test/unit/Sparql/result/count-01.res -END -query-eq-3.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-3.res -END -query-eq-5.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-eq-5.res -END -test-B-10.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-10.res -END -query-bev-2.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-2.res -END -test-B-12.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-B-12.res -END -query-bev-4.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-4.res -END -sort-datetime.res -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/448/trunk/rdfapi-php/test/unit/Sparql/result/sort-datetime.res -END -q-construct-2.res -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-construct-2.res -END -query-bev-6.res -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/403/trunk/rdfapi-php/test/unit/Sparql/result/query-bev-6.res -END -dawg-tp-02.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-tp-02.res -END -q-reif-2.res -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-reif-2.res -END -q-langMatches-2.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-langMatches-2.res -END -dawg-tp-04.res -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-tp-04.res -END -dawg-query-002.res -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-query-002.res -END -test-B-18.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/475/trunk/rdfapi-php/test/unit/Sparql/result/test-B-18.res -END -q-langMatches-4.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-langMatches-4.res -END -dawg-query-004.res -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/dawg-query-004.res -END -test-0-01.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-0-01.res -END -test-1-10.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-1-10.res -END -test-0-03.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-0-03.res -END -ex2-1a.res -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex2-1a.res -END -ex11.2.3.2_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.2_0.res -END -test-4-02.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-02.res -END -test-4-04.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/test-4-04.res -END -ex11.2.3.6_0.res -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/401/trunk/rdfapi-php/test/unit/Sparql/result/ex11.2.3.6_0.res -END -q-base-prefix-2.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-base-prefix-2.res -END -test-4-06.res -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/419/trunk/rdfapi-php/test/unit/Sparql/result/test-4-06.res -END -q-base-prefix-4.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/q-base-prefix-4.res -END -sort2.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/sort2.res -END -sort4.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/sort4.res -END -regex-query-002.res -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/410/trunk/rdfapi-php/test/unit/Sparql/result/regex-query-002.res -END -sort6.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/sort6.res -END -sort8.res -K 25 -svn:wc:ra_dav:version-url -V 83 -/svnroot/rdfapi-php/!svn/ver/383/trunk/rdfapi-php/test/unit/Sparql/result/sort8.res -END -query-01.res -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/248/trunk/rdfapi-php/test/unit/Sparql/result/query-01.res -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/entries deleted file mode 100755 index 3cb8c8d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/entries +++ /dev/null @@ -1,2237 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/result -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-08-08T16:21:15.071384Z -478 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -test-3-02.res -file - - - - -2008-02-29T14:57:10.688502Z -43123bfcd675e21656ab2531c5c83393 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-3-04.res -file - - - - -2008-02-29T14:57:10.688502Z -a3da10949190b279325a20244ca4d575 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-7-01.res -file - - - - -2008-02-29T14:57:10.704123Z -cc92cdaee96ae1c8fab0d05883134858 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-3-06.res -file - - - - -2008-02-29T14:57:10.704123Z -cc6f6c9c07e9fbf1f1027616671d6879 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-7-03.res -file - - - - -2008-02-29T14:57:10.719743Z -8c4f6ac53864a7e183e1f062fca4aa74 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-select-2.res -file - - - - -2008-02-29T14:57:10.719743Z -3d1689ac7675d94fdf14122ccc46e865 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-uri-1.res -file - - - - -2008-02-29T14:57:10.719743Z -4f071398c3d1f1db3e02e6378bada1ca -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-2-02.res -file - - - - -2008-02-29T14:57:10.735364Z -7a48504fa0a8a448ce4a093ef3f23e39 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.1_0.res -file - - - - -2008-02-29T14:57:10.735364Z -fb4a188e7e4dcf2aaa8abf07ac1d4688 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -ask-02.res -file - - - - -2008-02-29T14:57:10.750985Z -15dc0d53e4ca432a3d621fc51c58ad68 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -test-2-04.res -file - - - - -2008-02-29T14:57:10.750985Z -c85ba1f3eef7e53df4c08da0125aa6cf -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex2-3a.res -file - - - - -2008-02-29T14:57:10.750985Z -bcf1e15962426cea6c362941bd01c31f -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -ex3.res -file - - - - -2008-02-29T14:57:10.766605Z -99e6bf21374a35c9b0ead320f38c87a5 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -q-opt-2.res -file - - - - -2008-02-29T14:57:10.766605Z -3c64775c5e6799ee53714f458d9bcd23 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-01.res -file - - - - -2008-02-29T14:57:10.782226Z -0b629324357617dd1779166215702f1f -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.5_0.res -file - - - - -2008-02-29T14:57:10.782226Z -9a92cb3c16e602829e61c4622021d138 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-2-06.res -file - - - - -2008-02-29T14:57:10.782226Z -ce49cbfe279559ec5c3595ff5479db6d -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-6-03.res -file - - - - -2008-02-29T14:57:10.797846Z -e5e05c6d09a8c36306340485d9109087 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-2-08.res -file - - - - -2008-02-29T14:57:10.797846Z -0390f43023f46d747df11cde1f1ced2a -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-str-2.res -file - - - - -2008-02-29T14:57:10.813467Z -0d52102d403bbcf2ce3403fbe4c34505 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -query-eq-graph-2.res -file - - - - -2008-02-29T14:57:10.813467Z -e293b73136daf1cbc417128bda629c1d -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -q-str-4.res -file - - - - -2008-02-29T14:57:10.813467Z -04fa7ed815d9b8b7c1b28ed81b6f447c -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -query-eq-graph-4.res -file - - - - -2008-02-29T14:57:10.829088Z -7d2910d9150f0914564c6c38d80e45e1 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -res1.res -file - - - - -2008-02-29T14:57:10.829088Z -e7cc668938b9f36889ffaafd7cee5255 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -res3.res -file - - - - -2008-02-29T14:57:10.844708Z -5ca9e8963f78e563b79801115c5ea6b7 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -test-B-02.res -file - - - - -2008-02-29T14:57:10.844708Z -b13d8703ff6e0c8bb19fc19b6cb9383f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-2.res -file - - - - -2008-02-29T14:57:10.844708Z -788dbf905abd0f6efdc619832fb23d99 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -res5.res -file - - - - -2008-02-29T14:57:10.860329Z -92d3dffa04c53ba9cf10940061c95b70 -2006-06-26T11:22:24.000000Z -306 -tgauss -has-props - -test-B-04.res -file - - - - -2008-02-29T14:57:10.860329Z -a9f22f3f97ac0b6bc21c0eb20a133b1c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-08.res -file - - - - -2008-02-29T14:57:10.875949Z -2deb78414250e794df1a5a39b2f94558 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -bound1.res -file - - - - -2008-02-29T14:57:10.875949Z -c7bc9d3aa9e0826392b8ec78f06f7400 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -LimitOff_2.res -file - - - - -2008-02-29T14:57:10.891570Z -3186ea05966184172bcd46e40205c5af -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -test-1-02.res -file - - - - -2008-02-29T14:57:10.891570Z -4ce4d19e691d4d764fa222017d9630ff -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11_0.res -file - - - - -2008-02-29T14:57:10.891570Z -059e73b7537f266e6d32336c8e6d9741 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -test-1-04.res -file - - - - -2008-02-29T14:57:10.907191Z -95eb472a84d1a613d51ccb02f0e86996 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -graphset1.res -file - - - - -2008-02-29T14:57:10.907191Z -303ab01683a5d73121b6ee2356804a7f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-01.res -file - - - - -2008-02-29T14:57:10.922811Z -0b629324357617dd1779166215702f1f -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-06.res -file - - - - -2008-02-29T14:57:10.922811Z -96ef6b6e32c2e2fe566b192860aef09b -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -graphset3.res -file - - - - -2008-02-29T14:57:10.922811Z -2493340698910eb942624621dd5c6612 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-03.res -file - - - - -2008-02-29T14:57:10.938432Z -e5e05c6d09a8c36306340485d9109087 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-08.res -file - - - - -2008-02-29T14:57:10.938432Z -22cf6dd0ad5bc9a93f9a5d26017aaa31 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-9-02.res -file - - - - -2008-02-29T14:57:10.954052Z -3479011389b4afb2730665a677b04db9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -customUnion2.res -file - - - - -2008-02-29T14:57:10.954052Z -15de51f7c42ef8e55db471e406871705 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-2.res -file - - - - -2008-02-29T14:57:10.954052Z -2535051510a4e438c546ed52ed64ab50 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -count-02.res -file - - - - -2008-02-29T14:57:10.969673Z -1b1fe8faca10a0b03816a5a28ec0df01 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -query-eq-4.res -file - - - - -2008-02-29T14:57:10.969673Z -d603e4df8c0efd6f96016cee3175d4c7 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -query-bev-1.res -file - - - - -2008-02-29T14:57:10.985294Z -34ce5f119ed6320b0c35a1a54838b7f1 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -test-B-11.res -file - - - - -2008-02-29T14:57:10.985294Z -85f40aa95895e46615054a68712ec47c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-3.res -file - - - - -2008-02-29T14:57:10.985294Z -9306d45a86983249de04a26285297a77 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -test-B-13.res -file - - - - -2008-02-29T14:57:11.000914Z -c654715516d391640565ac7861e48a3a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-construct-1.res -file - - - - -2008-02-29T14:57:11.000914Z -1d7ca6fd3e693b58d7baba0dcf0a240b -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-5.res -file - - - - -2008-02-29T14:57:11.016535Z -05cd0b6584fc5fba75670a28f0e07873 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -dawg-tp-01.res -file - - - - -2008-02-29T14:57:11.016535Z -f765445682b7cb0c4e473040e677b7fe -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-reif-1.res -file - - - - -2008-02-29T14:57:11.032155Z -7e6b9f967290940b53b2dd8b57412dff -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-15.res -file - - - - -2008-02-29T14:57:11.032155Z -5b6fa1e6bf6e1b581a3a311b473a1c07 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-1.res -file - - - - -2008-02-29T14:57:11.047776Z -53f6182b1274fb95cf0e15183eb2f0bf -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-03.res -file - - - - -2008-02-29T14:57:11.047776Z -31e0ff2a7a2f35fcd97f718821166767 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-001.res -file - - - - -2008-02-29T14:57:11.063397Z -2ba140c640fb3342ac51c21f82b121ad -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-blank-1.res -file - - - - -2008-02-29T14:57:11.063397Z -b4f65dfd5ae94474116eff802aa0dd0f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-17.res -file - - - - -2008-02-29T14:57:11.063397Z -acf5dc0ab331eb7d99e65b631e91fa6a -2007-08-08T12:56:38.123461Z -474 -cweiske -has-props - -q-langMatches-3.res -file - - - - -2008-02-29T14:57:11.079017Z -a43a4ea002594d0bb50dd7a6e1249d3d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-003.res -file - - - - -2008-02-29T14:57:11.079017Z -d9d417bef573ce41381ada2ecdbcb718 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-19.res -file - - - - -2008-02-29T14:57:11.094638Z -10eb56e0925e2ad91463da3d8adecfb1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-0-02.res -file - - - - -2008-02-29T14:57:11.094638Z -dde52192566d268132af9a9e351e19ce -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-0-04.res -file - - - - -2008-02-29T14:57:11.110258Z -673f5fa2c7a66ae668adcf7235030cd0 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-4-01.res -file - - - - -2008-02-29T14:57:11.110258Z -59012bc0ddd642fe02d80fca6511548b -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.2_1.res -file - - - - -2008-02-29T14:57:11.125879Z -602e6295b37247a94589feec51526967 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-4-03.res -file - - - - -2008-02-29T14:57:11.141500Z -d6199943a54acd7f9a821a3f0c87db3c -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.4_0.res -file - - - - -2008-02-29T14:57:11.125879Z -328f77f343f6c4ebf43dc3d6a822f981 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-base-prefix-1.res -file - - - - -2008-02-29T14:57:11.141500Z -a2ad7790c6d6c0c9c1cd598c46ba92c3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-05.res -file - - - - -2008-02-29T14:57:11.141500Z -efbc054229ec9d20e985f2e89df4756b -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-base-prefix-3.res -file - - - - -2008-02-29T14:57:11.157120Z -7cc2c710bf9508b0a1b3dd2c33799167 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-07.res -file - - - - -2008-02-29T14:57:11.157120Z -e1c2a912f6269a1658acb1f2860fcd03 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-base-prefix-5.res -file - - - - -2008-02-29T14:57:11.172741Z -9e5232b67a1369ab1c50ff413156724e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-datatype-1.res -file - - - - -2008-02-29T14:57:11.172741Z -cb7528892315b953c649cfbf2b0a9252 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -sort1.res -file - - - - -2008-02-29T14:57:11.172741Z -95a844b6ec00073e89f806c36fa9f6aa -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -sort3.res -file - - - - -2008-02-29T14:57:11.188361Z -15581998fbda260da82ba812c163a951 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -regex-query-001.res -file - - - - -2008-02-29T14:57:11.188361Z -cbaefd68d4e4068f6d1a133d81adceec -2007-03-12T09:31:31.000000Z -347 -cweiske -has-props - -sort5.res -file - - - - -2008-02-29T14:57:11.203982Z -321d8178a435439ea283b27c36d9e312 -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -test-B-20.res -file - - - - -2008-02-29T14:57:11.219603Z -3fac0a2b94232cb87b2d93b0b8b42103 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -regex-query-003.res -file - - - - -2008-02-29T14:57:11.203982Z -2f1cb7dcd94de494f4b7dc90c644d126 -2007-03-12T09:31:31.000000Z -347 -cweiske -has-props - -test-3-01.res -file - - - - -2008-02-29T14:57:11.219603Z -8db6c14438f7acf61c30c442a1e7f9bb -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex2-2a.res -file - - - - -2008-02-29T14:57:11.219603Z -be57dae08415924fc86f26f640a5f243 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-3-03.res -file - - - - -2008-02-29T14:57:11.235223Z -2cdf2a98d7cd565061165e7964718da9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-3-05.res -file - - - - -2008-02-29T14:57:11.235223Z -a3da10949190b279325a20244ca4d575 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-7-02.res -file - - - - -2008-02-29T14:57:11.250844Z -a583eacd89fe9033133b63ec002907fb -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-3-07.res -file - - - - -2008-02-29T14:57:11.250844Z -72d461fd3e304ec3cf1af4d54e30d77f -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-7-04.res -file - - - - -2008-02-29T14:57:11.266464Z -8c4f6ac53864a7e183e1f062fca4aa74 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-select-1.res -file - - - - -2008-02-29T14:57:11.266464Z -720b4dddc89942be7a0026f172e25423 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-select-3.res -file - - - - -2008-02-29T14:57:11.266464Z -7ce8a3fad0582682862ccc3ed02061fd -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq2-1.res -file - - - - -2008-02-29T14:57:11.282085Z -d2eafc793a43b89929bc170ebfdef306 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -ask-01.res -file - - - - -2008-02-29T14:57:11.297706Z -71414f0d477a529ab90b48979165f5c8 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -test-2-01.res -file - - - - -2008-02-29T14:57:11.282085Z -129e30e2df61c2f7cfa3f89b46d5e79c -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-opt-1.res -file - - - - -2008-02-29T14:57:11.313326Z -6386284cc601634b40e7b077eda40049 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.1_1.res -file - - - - -2008-02-29T14:57:11.297706Z -b686b4f34cad90fbad8655b527b82a51 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-2-03.res -file - - - - -2008-02-29T14:57:11.297706Z -f5db045533660bff379479ecb4e2edd7 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.3_0.res -file - - - - -2008-02-29T14:57:11.313326Z -4dfd0fa80e73163fd96916fa24709882 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-2-05.res -file - - - - -2008-02-29T14:57:11.328947Z -023312d0601f26153669bbfb25f09592 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-6-02.res -file - - - - -2008-02-29T14:57:11.328947Z -93b12c08d4f695ea4a96e9f22d450cbe -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-2-07.res -file - - - - -2008-02-29T14:57:11.328947Z -0c188f4f2c725b2096ee965b15485fe1 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-6-04.res -file - - - - -2008-02-29T14:57:11.344567Z -98e8380b96ea0a4f314d3760bc98bdc9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11.2.3.7_0.res -file - - - - -2008-02-29T14:57:11.344567Z -3aacaccc1f1ad4b35e06d29ab72835ab -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -q-str-1.res -file - - - - -2008-02-29T14:57:11.360188Z -a6d7d78e465927dacbef94464c336892 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -test-2-09.res -file - - - - -2008-02-29T14:57:11.360188Z -0abeb0683aeb1d33b187cb8d878b0731 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -query-eq-graph-1.res -file - - - - -2008-02-29T14:57:11.375809Z -b2b7684e6006a20828d91cab620f4eed -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -q-str-3.res -file - - - - -2008-02-29T14:57:11.375809Z -4c7570236923f0d23639029be446cf69 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -query-eq-graph-3.res -file - - - - -2008-02-29T14:57:11.391429Z -c78000d0fba106c06683126e1fb212b1 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -res2.res -file - - - - -2008-02-29T14:57:11.391429Z -11063a37da4d54b8076ed10d5942c02a -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -test-B-01.res -file - - - - -2008-02-29T14:57:11.407050Z -a9f22f3f97ac0b6bc21c0eb20a133b1c -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-1.res -file - - - - -2008-02-29T14:57:11.391429Z -9cd49469b363b336b0d13321016be0ec -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -res4.res -file - - - - -2008-02-29T14:57:11.407050Z -0d4aec6c04b017831bc22d7ce1a58607 -2006-06-23T14:14:13.000000Z -298 -tgauss -has-props - -test-B-03.res -file - - - - -2008-02-29T14:57:11.422670Z -66788ada97e4d04e014b6e4f71fa5f61 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -expr-3.res -file - - - - -2008-02-29T14:57:11.422670Z -1d2afa6e3ef0fe4562da1d577551b260 -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -res6.res -file - - - - -2008-02-29T14:57:11.422670Z -78a721adaefad7bead1c4811044c6c5c -2006-06-26T11:22:24.000000Z -306 -tgauss -has-props - -test-B-05.res -file - - - - -2008-02-29T14:57:11.438291Z -254ddfd79315ff590614d7a7a39ad97d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-09.res -file - - - - -2008-02-29T14:57:11.438291Z -04bf892680bad5645437e27c4040a24e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -LimitOff_1.res -file - - - - -2008-02-29T14:57:11.453912Z -12725386324497e57fdae5ed691e7ee6 -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -LimitOff1.res -file - - - - -2008-02-29T14:57:11.453912Z -dbcd551cafc22f6ba6c18680339f50b1 -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -LimitOff_3.res -file - - - - -2008-02-29T14:57:11.469532Z -0592f1e1d27df5676ea68809261aa5bd -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -test-1-01.res -file - - - - -2008-02-29T14:57:11.469532Z -9900e2588d28593f744f236e59bfed91 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-2-10.res -file - - - - -2008-02-29T14:57:11.469532Z -8f889a7ab2d2dfe8bad56ebd3ff4bdc3 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-03.res -file - - - - -2008-02-29T14:57:11.485153Z -7740f689b63b9c2b009771ddacc892ab -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex11_1.res -file - - - - -2008-02-29T14:57:11.500773Z -d5f54099c01b02dd38606fefcf7e39d6 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -query-survey-1.res -file - - - - -2008-02-29T14:57:11.485153Z -1359fe564e70576178092d214f7f0afb -2007-08-08T16:21:15.071384Z -478 -cweiske -has-props - -graphset2.res -file - - - - -2008-02-29T14:57:11.516394Z -aaf5cf0ebd2187708b2f4d5eb4ede949 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-1-05.res -file - - - - -2008-02-29T14:57:11.500773Z -71575506d65605bafbe206b4a60d0bed -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex2-4a.res -file - - - - -2008-02-29T14:57:11.516394Z -a9fb7cd605e1926b062faf8eb14cadfc -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -test-5-02.res -file - - - - -2008-02-29T14:57:11.516394Z -49df07a30d2eadde233d23d354cabab6 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-07.res -file - - - - -2008-02-29T14:57:11.532015Z -22cf6dd0ad5bc9a93f9a5d26017aaa31 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -graphset4.res -file - - - - -2008-02-29T14:57:11.532015Z -8bd2c891b842f7fa61f8ec0ac95acab5 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-5-04.res -file - - - - -2008-02-29T14:57:11.547635Z -98e8380b96ea0a4f314d3760bc98bdc9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-09.res -file - - - - -2008-02-29T14:57:11.547635Z -d8e936848fbc32335083fc0f5b02cef9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-9-01.res -file - - - - -2008-02-29T14:57:11.563256Z -3479011389b4afb2730665a677b04db9 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -customUnion1.res -file - - - - -2008-02-29T14:57:11.563256Z -9df4dfebf418f29b74153224e42264f8 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-eq-1.res -file - - - - -2008-02-29T14:57:11.563256Z -2535051510a4e438c546ed52ed64ab50 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -count-01.res -file - - - - -2008-02-29T14:57:11.578876Z -ac3448c1c838608146bd8991f393d959 -2007-05-21T16:57:59.000000Z -438 -cweiske -has-props - -query-eq-3.res -file - - - - -2008-02-29T14:57:11.578876Z -c7fad3f7c3c1cb5bce48ea87920610d3 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -query-eq-5.res -file - - - - -2008-02-29T14:57:11.594497Z -81c49bfd21f6dc46d117deb8f0830aa9 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -test-B-10.res -file - - - - -2008-02-29T14:57:11.594497Z -d124516f742fdf2d809024d46900432e -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-2.res -file - - - - -2008-02-29T14:57:11.610118Z -63bd0eb000bde1289ca05edc9fbb2713 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -test-B-12.res -file - - - - -2008-02-29T14:57:11.610118Z -bd38d176a4fd2611c59c97e083dbfcbf -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-4.res -file - - - - -2008-02-29T14:57:11.610118Z -9306d45a86983249de04a26285297a77 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -sort-datetime.res -file - - - - -2008-02-29T14:57:11.625738Z -195eaa6130a547b52e529aa503718e88 -2007-06-19T15:48:52.211340Z -448 -cweiske - -q-construct-2.res -file - - - - -2008-02-29T14:57:11.625738Z -42a294985a83ac23cbd2558a32ef624f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -query-bev-6.res -file - - - - -2008-02-29T14:57:11.641359Z -cdf8969c26274a3ad038c19ce69de470 -2007-04-14T11:51:17.000000Z -403 -cweiske -has-props - -dawg-tp-02.res -file - - - - -2008-02-29T14:57:11.641359Z -e7d5ba8412e2d4759904293fe58955a7 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-reif-2.res -file - - - - -2008-02-29T14:57:11.641359Z -0e8a34d62b166a78d1a2662fb74b22ef -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -q-langMatches-2.res -file - - - - -2008-02-29T14:57:11.656979Z -4c0eb413b2be28b0f9ef5e5d2f399ba1 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-tp-04.res -file - - - - -2008-02-29T14:57:11.656979Z -7c82a5b18da4f08cf4e5e166a14ec12d -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-002.res -file - - - - -2008-02-29T14:57:11.672600Z -8c387176dd31329396ed8f8b199e7510 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-B-18.res -file - - - - -2008-02-29T14:57:11.672600Z -ed0ddf4521548a1765ff615084614d07 -2007-08-08T13:47:51.597168Z -475 -cweiske -has-props - -q-langMatches-4.res -file - - - - -2008-02-29T14:57:11.688221Z -a89ed0781fc2d940f463254f73a914fb -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -dawg-query-004.res -file - - - - -2008-02-29T14:57:11.688221Z -bcedb15eb6457848f705c57a935844da -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-0-01.res -file - - - - -2008-02-29T14:57:11.688221Z -673f5fa2c7a66ae668adcf7235030cd0 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-1-10.res -file - - - - -2008-02-29T14:57:11.703841Z -f608052dbcb80913a4922d13600bd9ba -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-0-03.res -file - - - - -2008-02-29T14:57:11.703841Z -83de6c0a9e47f96a98b5e7718475e874 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -ex2-1a.res -file - - - - -2008-02-29T14:57:11.719462Z -311bcabf253387a8addb10d7a1376dca -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -ex11.2.3.2_0.res -file - - - - -2008-02-29T14:57:11.719462Z -f4c41bb67fd46e167567bcd77315a5f8 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -test-4-02.res -file - - - - -2008-02-29T14:57:11.719462Z -c6d673dff81ba7c1dfc7150862b616be -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -test-4-04.res -file - - - - -2008-02-29T14:57:11.735082Z -4b937870a5ca46f15e507e183151c04f -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -ex11.2.3.6_0.res -file - - - - -2008-02-29T14:57:11.735082Z -5d749cb1007ea9054fe0e21c11fc3e1d -2007-04-14T09:49:34.000000Z -401 -cweiske -has-props - -q-base-prefix-2.res -file - - - - -2008-02-29T14:57:11.750703Z -4ddde7189550b112440e895ef718c8a0 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -test-4-06.res -file - - - - -2008-02-29T14:57:11.750703Z -68750c416408ccf1d88e3ccba66e3893 -2007-04-28T09:02:01.000000Z -419 -cweiske -has-props - -q-base-prefix-4.res -file - - - - -2008-02-29T14:57:11.766324Z -67946cbb7e8f12a86d56eefeeb8c76f3 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -sort2.res -file - - - - -2008-02-29T14:57:11.766324Z -0cb7b64881cc51937e1f2fa2619bbb5a -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - -sort4.res -file - - - - -2008-02-29T14:57:11.766324Z -01825d3adbd72499c37395c652a9dbaf -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -regex-query-002.res -file - - - - -2008-02-29T14:57:11.781944Z -9e680a410caca2dc68db021a230f4738 -2007-04-18T13:46:28.000000Z -410 -cweiske -has-props - -sort6.res -file - - - - -2008-02-29T14:57:11.781944Z -6d943e269f5ac09ba3e7cb820289a04d -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -sort8.res -file - - - - -2008-02-29T14:57:11.797565Z -a68fbeb82cc9b7ee7a0c93e79f820c00 -2007-04-03T09:19:32.000000Z -383 -cweiske -has-props - -query-01.res -file - - - - -2008-02-29T14:57:11.813185Z -2a5ad3711dac4516cc37420136535c60 -2006-01-13T09:54:04.000000Z -248 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/LimitOff_3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-01.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-01.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-02.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ask-02.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/bound1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/bound1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/bound1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-01.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-01.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-02.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/count-02.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/customUnion2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-001.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-001.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-001.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-002.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-002.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-002.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-003.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-003.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-003.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-004.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-004.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-query-004.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/dawg-tp-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.1_1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.2_1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.3_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.3_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.3_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.4_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.4_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.4_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.5_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.5_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.5_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.6_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.6_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.6_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.7_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.7_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11.2.3.7_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_0.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_0.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex11_1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-1a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-1a.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-1a.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-2a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-2a.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-2a.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-3a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-3a.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-3a.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-4a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-4a.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex2-4a.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/ex3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/expr-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/graphset4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-5.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-base-prefix-5.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-blank-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-blank-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-blank-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-construct-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-datatype-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-datatype-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-datatype-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-langMatches-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-opt-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-reif-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-select-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-str-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-uri-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-uri-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/q-uri-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-5.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-5.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-6.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-bev-6.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-5.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-5.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq-graph-4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq2-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq2-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-eq2-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-survey-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-survey-1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/query-survey-1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-001.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-001.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-001.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-002.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-002.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-002.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-003.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-003.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/regex-query-003.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res1.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res1.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res2.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res2.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res3.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res3.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res4.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res4.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res5.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res5.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res6.res.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/res6.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort1.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort1.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort2.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort2.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort3.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort3.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort4.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort4.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort5.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort5.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort6.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort6.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort8.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort8.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/sort8.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-0-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-05.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-05.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-06.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-06.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-07.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-07.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-08.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-08.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-09.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-09.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-10.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-1-10.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-05.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-05.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-06.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-06.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-07.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-07.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-08.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-08.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-09.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-09.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-10.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-2-10.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-05.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-05.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-06.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-06.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-07.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-3-07.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-05.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-05.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-06.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-06.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-07.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-4-07.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-5-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-6-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-7-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-9-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-01.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-01.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-02.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-02.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-03.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-03.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-04.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-04.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-05.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-05.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-08.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-08.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-09.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-09.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-10.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-10.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-11.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-11.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-11.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-12.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-12.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-12.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-13.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-13.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-13.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-15.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-15.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-15.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-17.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-17.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-17.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-18.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-18.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-18.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-19.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-19.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-19.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-20.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-20.res.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/prop-base/test-B-20.res.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff1.res.svn-base deleted file mode 100755 index f2dbea31..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff1.res.svn-base +++ /dev/null @@ -1,57 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - -$result[]=$arr4; -$result[]=$arr5; -$result[]=$arr1; -$result[]=$arr3; -$result[]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_1.res.svn-base deleted file mode 100755 index 824ae158..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_1.res.svn-base +++ /dev/null @@ -1,55 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - -$result[]=$arr2; -$result[]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_2.res.svn-base deleted file mode 100755 index fe623488..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_2.res.svn-base +++ /dev/null @@ -1,56 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - - -$result[]=$arr1; -$result[]=$arr5; -$result[]=$arr4; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_3.res.svn-base deleted file mode 100755 index 2ad57b6a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/LimitOff_3.res.svn-base +++ /dev/null @@ -1,56 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - - - -$result[]=$arr1; -$result[]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-01.res.svn-base deleted file mode 100755 index 5a5f4ccd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-01.res.svn-base +++ /dev/null @@ -1 +0,0 @@ -$result = true; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-02.res.svn-base deleted file mode 100755 index 7bae5725..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ask-02.res.svn-base +++ /dev/null @@ -1 +0,0 @@ -$result = false; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/bound1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/bound1.res.svn-base deleted file mode 100755 index 7c7d6427..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/bound1.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/ns#a2"); -$res2 = new Resource("http://example.org/ns#c2"); -$res3 = new Resource("http://example.org/ns#f"); - -$arr["?a"]=$res1; -$arr["?c"]=$res2; -$arr1["?a"]=$res2; -$arr1["?c"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-01.res.svn-base deleted file mode 100755 index 16e2e1eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-01.res.svn-base +++ /dev/null @@ -1 +0,0 @@ -$result = 4; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-02.res.svn-base deleted file mode 100755 index c12a8b73..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/count-02.res.svn-base +++ /dev/null @@ -1 +0,0 @@ -$result = 0; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion1.res.svn-base deleted file mode 100755 index 77cc8738..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion1.res.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Literal("SPARQL Query Language Tutorial"); -$res2 = new Literal("SPARQL"); -$res3 = new Literal("SPARQL Protocol Tutorial"); -$res4 = new Literal("SPARQL (updated)"); -$res5 = new Literal("Test"); -$res6 = new Literal("Test (updated)"); - - - -$arr["?title"]=$res1; -$arr1["?title"]=$res2; -$arr2["?title"]=$res3; -$arr3["?title"]=$res4; -$arr4["?title"]=$res5; -$arr5["?title"]=$res6; - - - - -$result["rowcount"]=1; -$result["hits"]=6; - -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion2.res.svn-base deleted file mode 100755 index 4644a5c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/customUnion2.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); -$res3 = new Resource("mailto:bert@work.example"); - - - -$arr["?name"]=$res1; -$arr["?mbox"]=$res2; -$arr1["?name"]=""; -$arr1["?mbox"]=$res3; - - - -$result["rowcount"]=2; -$result["hits"]=2; - -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-001.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-001.res.svn-base deleted file mode 100755 index a21c710f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-001.res.svn-base +++ /dev/null @@ -1,33 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); - - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res6; -$arr["?mbox"]=""; - - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; - - -$arr2["?name"]=$res7; -$arr2["?mbox"]=$res1; - -$arr3["?name"]=$res7; -$arr3["?mbox"]=$res8; - - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-002.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-002.res.svn-base deleted file mode 100755 index 29856814..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-002.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res6; -$arr["?name2"]=""; - - -$arr1["?name"]=$res5; -$arr1["?name2"]=$res7; - - -$arr2["?name"]=$res7; -$arr2["?name2"]=$res5; - - - - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-003.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-003.res.svn-base deleted file mode 100755 index efc04bc1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-003.res.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); -$res9 = new Resource("mailto:fred@edu"); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res7; -$arr["?mbox"]=$res8; - - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; - - -$arr2["?name"]=$res6; -$arr2["?mbox"]=""; - -$arr3["?name"]=""; -$arr3["?mbox"]=$res9; - -$arr4["?name"]=$res7; -$arr4["?mbox"]=$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=5; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-004.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-004.res.svn-base deleted file mode 100755 index b3db1150..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-query-004.res.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); -$res9 = new Resource("mailto:fred@edu"); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res7; - - - -$arr1["?name"]=$res5; - - - -$arr2["?name"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-01.res.svn-base deleted file mode 100755 index 7dd4e7d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-01.res.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/p"); -$res2 = new Resource("http://example.org/data/v1"); -$res3 = new Resource("http://example.org/data/v2"); - -$arr["?p"]=$res1; -$arr["?q"]=$res2; -$arr1["?p"]=$res1; -$arr1["?q"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-02.res.svn-base deleted file mode 100755 index dc8f457d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-02.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/x"); -$res2 = new Resource("http://example.org/data/v1"); -$res3 = new Resource("http://example.org/data/v2"); - -$arr["?x"]=$res1; -$arr["?q"]=$res2; -$arr1["?x"]=$res1; -$arr1["?q"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-03.res.svn-base deleted file mode 100755 index c375d326..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-03.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/x"); -$res2 = new Resource("http://example.org/data/y"); - - -$arr["?b"]=$res1; -$arr["?a"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-04.res.svn-base deleted file mode 100755 index af2acbf9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/dawg-tp-04.res.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Literal("Eve"); -$res2 = new Literal("Alice"); -$res3 = new Literal("Bob"); - - -$arr1["?name"]=$res1; -$arr2["?name"]=$res2; -$arr3["?name"]=$res3; - - -$result["rowcount"]=1; -$result["hits"]=3; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_0.res.svn-base deleted file mode 100755 index c808dfab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_0.res.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$res1 = new Literal("Alice"); -$res2 = new Literal("Ms A."); - - - -$arr = array(); -$arr["?name1"]=$res1; -$arr["?name2"]=$res2; - -$arr1["?name1"]=$res2; -$arr1["?name2"]=$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_1.res.svn-base deleted file mode 100755 index 0cb36357..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.1_1.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("http://www.w3.org/TR/rdf-sparql-query/"); - - - - - -$arr["?annotates"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_0.res.svn-base deleted file mode 100755 index 1a40d028..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_0.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); - - - - - - -$arr["?name"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_1.res.svn-base deleted file mode 100755 index 8a269fcb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.2_1.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); - - - - -$arr["?name"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.3_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.3_0.res.svn-base deleted file mode 100755 index 797f4d99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.3_0.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); - - -$arr = array(); -$arr["?name"]=$res1; -$arr["?mbox"]=$res2; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.4_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.4_0.res.svn-base deleted file mode 100755 index f917376e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.4_0.res.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$res1 = new Literal("Bob"); -$res2 = new Literal("Smith"); - - - - -$arr["?family"]=$res2; -$arr["?given"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.5_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.5_0.res.svn-base deleted file mode 100755 index fbf0c8b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.5_0.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Bob"); -$res2 = new Literal("bob@work.example"); - - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.6_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.6_0.res.svn-base deleted file mode 100755 index 0e3e067d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.6_0.res.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.7_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.7_0.res.svn-base deleted file mode 100755 index 26c6dff3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11.2.3.7_0.res.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Roberto"); -$res1->setLanguage("ES"); -$res2 = new Resource("mailto:bob@work.example"); - - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_0.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_0.res.svn-base deleted file mode 100755 index c6cfc9f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_0.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Blanknode("bNode2"); - - - -$arr["?annot"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_1.res.svn-base deleted file mode 100755 index 57c9cd92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex11_1.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$res1 = new Blanknode("bNode2"); -$res2 = new Blanknode("bNode1"); - - - -$arr["?annot"]=$res1; -$arr1["?annot"]=$res2; - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-1a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-1a.res.svn-base deleted file mode 100755 index 2eacfbad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-1a.res.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("SPARQL Tutorial"); - - - -$arr["?title"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-2a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-2a.res.svn-base deleted file mode 100755 index f5f8faed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-2a.res.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"); -$res2 = new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); - -$arr["?v"]=$res1; -$arr["?x"]=$res2; - - -$result = array(); - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-3a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-3a.res.svn-base deleted file mode 100755 index f8eaf8c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-3a.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("mailto:jlow@example.com"); - -$arr["?mbox"]=$res1; - - -$result = array(); - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-4a.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-4a.res.svn-base deleted file mode 100755 index c88dbb06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex2-4a.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$res1 = new Resource("mailto:peter@example.org"); -$res2 = new Resource("mailto:jlow@example.com"); -$res3 = new Literal("Peter Goodguy"); -$res4 = new Literal("Johnny Lee Outlaw"); - -$arr["?mbox"]=$res1; -$arr["?name"]=$res3; -$arr1["?mbox"]=$res2; -$arr1["?name"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex3.res.svn-base deleted file mode 100755 index f4ecdce8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/ex3.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("23"); -$res2 = new Literal("The Semantic Web"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$arr["?price"]=$res1; -$arr["?title"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-1.res.svn-base deleted file mode 100755 index 2fb5febe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-1.res.svn-base +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$res1 = new Literal("TITLE 3"); -$res2 = new Literal("TITLE 2"); -$res3 = new Literal("TITLE 1"); - -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - - - - - -$arr["?title"]=$res1; -$arr["?price"]=""; - - -$arr1["?title"]=$res2; -$arr1["?price"]=""; - - -$arr2["?title"]=$res3; -$arr2["?price"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-2.res.svn-base deleted file mode 100755 index 656a2af0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-2.res.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -$result = array(); -$arr = array(); - -$res3 = new Literal("TITLE 1"); -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?title"]=$res3; -$arr["?price"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-3.res.svn-base deleted file mode 100755 index 499eb8cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/expr-3.res.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); - -$res3 = new Literal("TITLE 1"); -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res5 = new Literal("TITLE 3"); - - -$arr["?title"]=$res3; -$arr["?price"]=$res4; - -$arr1["?title"]=$res5; -$arr1["?price"]=""; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset1.res.svn-base deleted file mode 100755 index c12260ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset1.res.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$res1 = new Literal("Bobby"); -$res2 = new Literal("Robert"); - -$res3 = new Resource("http://example.org/foaf/aliceFoaf"); -$res4 = new Resource("http://example.org/foaf/bobFoaf"); - - -$arr["?bobNick"]=$res1; -$arr["?src"]=$res3; - - -$arr2["?bobNick"]=$res2; -$arr2["?src"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset2.res.svn-base deleted file mode 100755 index 4e686d79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset2.res.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -$result = array(); -$res2 = new Literal("Robert"); - - -$arr["?nick"]=$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset3.res.svn-base deleted file mode 100755 index e463a13c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset3.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$res1 = new Literal("Bob"); - -$res2 = new Literal("2004-12-06"); -$res5 = new Literal("2005-01-10"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#date"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#date"); - -$res3 = new Resource("mailto:bob@oldcorp.example.org"); -$res4 = new Resource("mailto:bob@newcorp.example.org"); - - -$arr["?name"]=$res1; -$arr["?mbox"]=$res3; -$arr["?date"]=$res2; - -$arr1["?name"]=$res1; -$arr1["?mbox"]=$res4; -$arr1["?date"]=$res5; - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset4.res.svn-base deleted file mode 100755 index 8e08bfd8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/graphset4.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res1 = new Literal("Robert"); - -$res2 = new Resource("http://example.org/foaf/bobFoaf"); - -$res3 = new Resource("mailto:bob@work.example"); - - - -$arr["?mbox"]=$res3; -$arr["?nick"]=$res1; -$arr["?ppd"]=$res2; - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-1.res.svn-base deleted file mode 100755 index 661d4ae9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-1.res.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("x:x x:p"); -$res2 = new Resource("http://example.org/ns#p"); -$res3 = new Resource("http://example.org/x/p"); -$res4 = new Literal("d:x ns:p"); - - - - -$arr1["?v"]=$res1; -$arr1["?p"]=$res3; - -$arr2["?v"]=$res4; -$arr2["?p"]=$res2; - - - -$result["rowcount"]=2; -$result["hits"]=2; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-2.res.svn-base deleted file mode 100755 index 14e08999..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-2.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("z:x z:p"); -$res3 = new Resource("http://example.org/x/#p"); - - - - - -$arr1["?v"]=$res1; -$arr1["?p"]=$res3; - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-3.res.svn-base deleted file mode 100755 index c086aff2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-3.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("d:x ns:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-4.res.svn-base deleted file mode 100755 index 5b795a17..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-4.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("x:x x:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-5.res.svn-base deleted file mode 100755 index cb9c18ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-base-prefix-5.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("z:x z:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-blank-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-blank-1.res.svn-base deleted file mode 100755 index b4d829e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-blank-1.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://example.org/things#xb"); - - - - - -$arr["?x"]=$res2; -$arr["?v"]=$res1; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-1.res.svn-base deleted file mode 100755 index 679f2c39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-1.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Resource("http://example.org/bill"),new Resource("http://example.org/ns#knows"),new Blanknode("bNode1")); -$statement2 = new Statement(new Resource("http://example.org/joe"),new Resource("http://example.org/ns#knows"),new Blanknode("bNode1")); - - - -$result->add($statement1); -$result->add($statement2); \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-2.res.svn-base deleted file mode 100755 index 9a241736..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-construct-2.res.svn-base +++ /dev/null @@ -1 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-datatype-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-datatype-1.res.svn-base deleted file mode 100755 index 90bf3be4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-datatype-1.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://example.org/things#xd3"); -$res2 = new Resource("http://example.org/things#xd1"); -$res3 = new Resource("http://example.org/things#xd2"); - -$res4 = new Literal("1"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res5 = new Literal("1.0"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res6 = new Literal("1.0"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$arr["?x"]=$res1; -$arr["?v"]=$res4; - -$arr1["?x"]=$res2; -$arr1["?v"]=$res5; - -$arr2["?x"]=$res3; -$arr2["?v"]=$res6; - - - - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-1.res.svn-base deleted file mode 100755 index 05289349..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-1.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); - - -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-2.res.svn-base deleted file mode 100755 index 3e7fd4dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-2.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - -$res3 = new Resource("http://example.org/#p3"); -$res4 = new Literal("abc"); -$res4->setLanguage("en"); - - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$arr1["?v"]=$res4; -$arr1["?p"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-3.res.svn-base deleted file mode 100755 index e1eee62d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-3.res.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - -$res3 = new Resource("http://example.org/#p3"); -$res4 = new Literal("abc"); -$res4->setLanguage("en"); - -$res5 = new Resource("http://example.org/#p5"); -$res6 = new Literal("abc"); -$res6->setLanguage("fr"); - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$arr1["?v"]=$res4; -$arr1["?p"]=$res3; - -$arr2["?v"]=$res6; -$arr2["?p"]=$res5; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-4.res.svn-base deleted file mode 100755 index 486cccdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-langMatches-4.res.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -$result = array(); - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=""; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-1.res.svn-base deleted file mode 100755 index 5a0274a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-1.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bert@example.net"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@example.net"); - -$res4 = new Literal("Bert"); -$res5 = new Literal("Alice"); - - -$arr["?name"]=$res4; -$arr["?mbox"]=$res1; -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; -$arr2["?name"]=""; -$arr2["?mbox"]=$res2; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-2.res.svn-base deleted file mode 100755 index 6042d33f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-opt-2.res.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bert@example.net"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@example.net"); - -$res4 = new Literal("Bert"); -$res5 = new Literal("Alice"); - -$res6 = new Literal("WhoMe?"); -$res7 = new Literal("DuckSoup"); - - -$arr["?name"]=$res4; -$arr["?mbox"]=$res1; -$arr["?nick"]=""; - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; -$arr1["?nick"]=$res6; - -$arr2["?name"]=""; -$arr2["?mbox"]=$res2; -$arr2["?nick"]=$res7; - -$result["rowcount"]=3; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-1.res.svn-base deleted file mode 100755 index 1a56e85a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-1.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/x")); -$statement2 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#p")); -$statement3 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Literal("1")); - -$statement4 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/y")); -$statement5 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#q")); -$statement6 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Resource("http://example.org/data/x")); - -$statement7 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/x")); -$statement8 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#p")); -$statement9 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Literal("2")); - - - -$result->add($statement1); -$result->add($statement2); -$result->add($statement3); -$result->add($statement4); -$result->add($statement5); -$result->add($statement6); -$result->add($statement7); -$result->add($statement8); -$result->add($statement9); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-2.res.svn-base deleted file mode 100755 index 07f0c3e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-reif-2.res.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Resource("http://example.org/data/x"),new Resource("http://example.org/ns#p"),new Literal("2")); -$statement2 = new Statement(new Resource("http://example.org/data/x"),new Resource("http://example.org/ns#p"),new Literal("1")); - - - - -$result->add($statement1); -$result->add($statement2); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-1.res.svn-base deleted file mode 100755 index 83e7a5c4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-1.res.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); - - - -$res5 = new Literal("1"); - - - -$arr["?x"]=$res5; - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-2.res.svn-base deleted file mode 100755 index 71121000..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-2.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); - - -$res5 = new Literal("1"); - - - -$arr["?x"]=$res5; -$arr["?y"]=""; - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-3.res.svn-base deleted file mode 100755 index 79b6e767..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-select-3.res.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -$result = array(); -$res5 = new Literal("1"); - -$arr["?x"]=$res5; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-1.res.svn-base deleted file mode 100755 index 41247d5a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-1.res.svn-base +++ /dev/null @@ -1,44 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://example.org/things#xp2"); -$res2 = new Resource("http://example.org/things#xd3"); -$res3 = new Resource("http://example.org/things#xi2"); -$res4 = new Resource("http://example.org/things#xi1"); - -$res5 = new Literal("1"); - -$res6 = new Literal("1"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res7 = new Literal("1"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res8 = new Literal("1"); - - - - -$arr["?x"]=$res1; -$arr["?v"]=$res5; - -$arr1["?x"]=$res2; -$arr1["?v"]=$res6; - -$arr2["?x"]=$res3; -$arr2["?v"]=$res7; - -$arr3["?x"]=$res4; -$arr3["?v"]=$res8; - - - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-2.res.svn-base deleted file mode 100755 index 5022b1de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-2.res.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res3 = new Resource("http://example.org/things#xi3"); - - -$res5 = new Literal("1"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - - -$arr["?x"]=$res3; -$arr["?v"]=$res5; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-3.res.svn-base deleted file mode 100755 index b7a68ca2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-3.res.svn-base +++ /dev/null @@ -1,31 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/things#xp1"); -$res2 = new Resource("http://example.org/things#xt1"); - - -$res3 = new Literal("zzz"); -$res4 = new Literal("zzz"); -$res4->setDatatype("http://example.org/things#myType"); - - - -$arr["?x"]=$res1; -$arr["?v"]=$res3; - -$arr2["?x"]=$res2; -$arr2["?v"]=$res4; - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-4.res.svn-base deleted file mode 100755 index 1b57d453..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-str-4.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://example.org/things#xb"); - - - - - -$arr["?x"]=$res2; -$arr["?v"]=$res1; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-uri-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-uri-1.res.svn-base deleted file mode 100755 index abb5e21a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/q-uri-1.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Resource("http://example.org/things#z"); -$res2 = new Resource("http://example.org/things#xu"); - - - - - -$arr["?v"]=$res1; -$arr["?x"]=$res2; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-01.res.svn-base deleted file mode 100755 index 9df9ac3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-01.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Resource("http://example.com/#C1"); - - - - - - -$arr["?c"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-1.res.svn-base deleted file mode 100755 index 3e171c91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-1.res.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-2.res.svn-base deleted file mode 100755 index 1be9d22e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-2.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#y1"); -$res2 = new Resource("http://example.org/ns#y2"); -$res3 = new Resource("http://example.org/ns#y3"); -$res4 = new Resource("http://example.org/ns#y4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-3.res.svn-base deleted file mode 100755 index 8f2275c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-3.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-4.res.svn-base deleted file mode 100755 index 8f2275c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-4.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-5.res.svn-base deleted file mode 100755 index ca7e9159..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-5.res.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x3"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-6.res.svn-base deleted file mode 100755 index 8a0b8656..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-bev-6.res.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://example.org/ns#x2"); -$res2 = new Literal("false"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - - - -$arr["?a"]=$res1; -$arr["?w"]=$res2; - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-1.res.svn-base deleted file mode 100755 index 521528a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-1.res.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); -$res4 = new Resource("http://example.org/things#xd1"); -$res5 = new Resource("http://example.org/things#xd2"); -$res6 = new Resource("http://example.org/things#xd3"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res3; -$arr3["?x"]=$res4; -$arr4["?x"]=$res5; -$arr5["?x"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-2.res.svn-base deleted file mode 100755 index 521528a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-2.res.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); -$res4 = new Resource("http://example.org/things#xd1"); -$res5 = new Resource("http://example.org/things#xd2"); -$res6 = new Resource("http://example.org/things#xd3"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res3; -$arr3["?x"]=$res4; -$arr4["?x"]=$res5; -$arr5["?x"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-3.res.svn-base deleted file mode 100755 index 159c88d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-3.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp2"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-4.res.svn-base deleted file mode 100755 index dbe29781..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-4.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp1"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-5.res.svn-base deleted file mode 100755 index e923ba3d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-5.res.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -$result = array(); -$arr = array(); - - - - - -$res1 = new Resource("http://example.org/things#xu"); - - - - - -$arr["?x"] = $res1; - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-1.res.svn-base deleted file mode 100755 index 12236bad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-1.res.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); - - - - - -$arr1["?x"]=$res1; -$arr2["?x"]=$res2; -$arr3["?x"]=$res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-2.res.svn-base deleted file mode 100755 index a3ef21a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-2.res.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://example.org/things#xd1"); -$res2 = new Resource("http://example.org/things#xd2"); -$res3 = new Resource("http://example.org/things#xd3"); - - - - - -$arr1["?x"]=$res1; -$arr2["?x"]=$res2; -$arr3["?x"]=$res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-3.res.svn-base deleted file mode 100755 index 99b5340d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-3.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://example.org/things#xp2"); - - - - - - -$arr1["?x"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-4.res.svn-base deleted file mode 100755 index 1b58d4aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq-graph-4.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://example.org/things#xp1"); - - - - - - -$arr1["?x"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq2-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq2-1.res.svn-base deleted file mode 100755 index f06327fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-eq2-1.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp1"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=99999; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-survey-1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-survey-1.res.svn-base deleted file mode 100755 index 3573936a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/query-survey-1.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res5 = new Literal("Willy"); -$res5 = new Literal("Mary"); -$res5 = new Literal("Bob"); -$res5 = new Literal("John"); - -$arr =array(); -$arr["?n"]=$res5; -$arr["?n"]=$res5; -$arr["?n"]=$res5; -$arr["?n"]=$res5; - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-001.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-001.res.svn-base deleted file mode 100755 index e38eb2f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-001.res.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Literal("ABCdefGHIjkl"); - -$arr["?val"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-002.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-002.res.svn-base deleted file mode 100755 index fbc05c38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-002.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$arr2 = array(); - -$res1 = new Literal("abcDEFghiJKL"); -$res2 = new Literal("ABCdefGHIjkl"); - -$arr["?val"]=$res1; -$arr2["?val"]=$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-003.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-003.res.svn-base deleted file mode 100755 index 39fd678d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/regex-query-003.res.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Literal("http://example.com/literal"); - -$arr["?val"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res1.res.svn-base deleted file mode 100755 index 431a5027..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res1.res.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("r2"); - - -$arr["?x"]=$res2; -$arr["?hpage"]=$res1; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res2.res.svn-base deleted file mode 100755 index 1ede9ad7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res2.res.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("r2"); - - -$arr["?x"]=$res2; -$arr["?hpage"]=""; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res3.res.svn-base deleted file mode 100755 index 554bd1d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res3.res.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("bNode0"); - - -$arr["?x"]=""; -$arr["?hpage"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res4.res.svn-base deleted file mode 100755 index 411a987c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res4.res.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$res1 = new Blanknode("bNode1"); -$res2 = new Blanknode("bNode0"); - - -$arr["?x"]=""; -$arr["?hpage"]=$res2; - -$arr1["?hpage"]=""; -$arr1["?x"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res5.res.svn-base deleted file mode 100755 index 64bb03ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res5.res.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$res1 = new Blanknode("bNode1"); -$res2 = new Blanknode("bNode0"); -$res3 = new Literal("30"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?x"]=$res2; -$arr["?age"]=""; - -$arr1["?age"]=$res3; -$arr1["?x"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res6.res.svn-base deleted file mode 100755 index 5d2b2280..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/res6.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res2 = new Literal("Bob"); -$res2->setLanguage("en"); -$res3 = new Literal("30"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?name"]=$res2; -$arr["?age"]=$res3; - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort-datetime.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort-datetime.res.svn-base deleted file mode 100755 index bf44f5c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort-datetime.res.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res1 = new Literal("2004-12-31T18:01:00-05:00"); -$res2 = new Literal("2004-01-31T18:01:00-05:00"); -$res3 = new Literal("2007-03-12T17:02:00-05:00"); -$res4 = new Literal("2007-03-12T17:01:00-05:00"); - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); - - - -$result = array( - array('?created' => $res2), - array('?created' => $res1), - array('?created' => $res4), - array('?created' => $res3), -); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort1.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort1.res.svn-base deleted file mode 100755 index 65a7da8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort1.res.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$arr1["?name"]=$res2; - - -$arr2["?name"]=$res3; - - -$arr3["?name"]=$res4; - - -$arr4["?name"]=$res1; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort2.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort2.res.svn-base deleted file mode 100755 index fff52f49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort2.res.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$arr1["?name"]=$res1; - - -$arr2["?name"]=$res4; - - -$arr3["?name"]=$res3; - - -$arr4["?name"]=$res2; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort3.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort3.res.svn-base deleted file mode 100755 index b7b8a69d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort3.res.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Resource("mailto:fred@work.example"); -$res6 = new Resource("mailto:eve@work.example"); -$res7 = new Resource("mailto:alice@work.example"); - -$arr1["?name"]=$res2; -$arr1["?mbox"]=$res5; - -$arr2["?name"]=$res3; -$arr2["?mbox"]=$res6; - -$arr3["?name"]=$res1; -$arr3["?mbox"]=$res7; - -$arr4["?name"]=$res4; -$arr4["?mbox"]=""; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort4.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort4.res.svn-base deleted file mode 100755 index 97956f95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort4.res.svn-base +++ /dev/null @@ -1,58 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - -$result[]=$arr2; -$result[]=$arr3; -$result[]=$arr1; -$result[]=$arr5; -$result[]=$arr4; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort5.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort5.res.svn-base deleted file mode 100755 index 74f7b4fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort5.res.svn-base +++ /dev/null @@ -1,58 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - -$result[]=$arr5; -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort6.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort6.res.svn-base deleted file mode 100755 index ddb5219b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort6.res.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - -$result = array(); - -$res1 = new Literal("fred@work.example"); -$res2 = new Literal("Fascination Street 11"); -$res3 = new Resource("mailto:bob@work.example"); -$res4 = new Resource("http://example.org/eve"); - -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); - - -$arr1["?address"]=$res1; - -$arr2["?address"]=$res2; - -$arr3["?address"]=$res3; - -$arr4["?address"]=$res4; - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort8.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort8.res.svn-base deleted file mode 100755 index 365ceee1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/sort8.res.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); - -$result = array(); - -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Literal("9"); -$res2 = new Literal("Eve"); -$res3 = new Resource("http://example.org/dirk01"); -$res4 = new Blanknode("bNode4"); -$res5 = new Literal("Dirk"); -$res6 = new Literal("John"); - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$arr1["?emp"]=$res1; -$arr1["?name"]=$res2; - -$arr2["?emp"]=$res3; -$arr2["?name"]=$res5; - -$arr3["?emp"]=$res4; -$arr3["?name"]=$res6; - - -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-01.res.svn-base deleted file mode 100755 index 4005a829..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-01.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-02.res.svn-base deleted file mode 100755 index c87480cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-02.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - - -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-03.res.svn-base deleted file mode 100755 index 48703ae6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-03.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - - - -$arr["?select"]=$res3; - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-04.res.svn-base deleted file mode 100755 index 4005a829..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-0-04.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-01.res.svn-base deleted file mode 100755 index b0d939f1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-01.res.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/r-1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res2; -$arr3["?x"]=$res1; - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-02.res.svn-base deleted file mode 100755 index 3b113d60..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-02.res.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - -$res1 = new Resource("http://rdf.hp.com/p-1"); -$res2 = new Resource("http://rdf.hp.com/p-2"); -$res3 = new Literal("v-1-2"); -$res4 = new Literal("v-1-1"); - - - - - - -$arr["?y"]=$res1; -$arr["?z"]=$res4; - -$arr1["?y"]=$res2; -$arr1["?z"]=$res3; - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-03.res.svn-base deleted file mode 100755 index b750cc8e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-03.res.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Literal("v-1-1"); -$res4 = new Literal("v-2-1"); - - - - - - -$arr["?x"]=$res1; -$arr["?z"]=$res3; - -$arr1["?x"]=$res2; -$arr1["?z"]=$res4; - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-04.res.svn-base deleted file mode 100755 index daf881a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-04.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); - - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-05.res.svn-base deleted file mode 100755 index ad3139d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-05.res.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -$result = array(); - - -$res1 = new Literal("v-1-1"); - - - - - - - -$arr["?z"]=$res1; - - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-06.res.svn-base deleted file mode 100755 index 7817067e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-06.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/p-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); - - - - - - - -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-07.res.svn-base deleted file mode 100755 index 3abb5928..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-07.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - - - - - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"]=false; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-08.res.svn-base deleted file mode 100755 index 3abb5928..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-08.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - - - - - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"]=false; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-09.res.svn-base deleted file mode 100755 index a4f6e18f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-09.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res2 = new Resource("http://rdf.hp.com/p-2"); - - - - - - - -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-10.res.svn-base deleted file mode 100755 index 27e759ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-1-10.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res2 = new Literal("v-1-1"); - - - - - - - -$arr["?v"]=$res2; -$arr["?x"]=""; - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-01.res.svn-base deleted file mode 100755 index 0a60a294..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-01.res.svn-base +++ /dev/null @@ -1,59 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Resource("http://rdf.hp.com/r-1"); -$res8 = new Resource("http://rdf.hp.com/p-2"); - - -$res4 = new Literal("v-2-1"); -$res5 = new Literal("v-1-2"); -$res6 = new Literal("v-1-1"); -$res7 = new Literal("v-2-2"); - - - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res4; - - -$arr1["?x"]=$res3; -$arr1["?y"]=$res8; -$arr1["?z"]=$res5; - - -$arr2["?x"]=$res3; -$arr2["?y"]=$res2; -$arr2["?z"]=$res6; - -$arr3["?x"]=$res1; -$arr3["?y"]=$res8; -$arr3["?z"]=$res7; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-02.res.svn-base deleted file mode 100755 index 7628d94c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-02.res.svn-base +++ /dev/null @@ -1,49 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Resource("http://rdf.hp.com/r-1"); -$res8 = new Resource("http://rdf.hp.com/p-2"); - - -$res4 = new Literal("v-2-1"); -$res5 = new Literal("v-1-2"); -$res6 = new Literal("v-1-1"); -$res7 = new Literal("v-2-2"); - - - - - - - -$arr["?a"]=$res4; - -$arr1["?a"]=$res5; - -$arr2["?a"]=$res6; - -$arr3["?a"]=$res7; - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-03.res.svn-base deleted file mode 100755 index c217f31c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-03.res.svn-base +++ /dev/null @@ -1,96 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); -$arr6 = array(); -$arr7 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res3; -$arr["?b"]=$res7; - - -$arr1["?x"]=$res2; -$arr1["?y"]=$res3; -$arr1["?z"]=$res7; -$arr1["?a"]=$res4; -$arr1["?b"]=$res8; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res4; -$arr2["?z"]=$res6; -$arr2["?a"]=$res3; -$arr2["?b"]=$res5; - -$arr3["?x"]=$res1; -$arr3["?y"]=$res4; -$arr3["?z"]=$res6; -$arr3["?a"]=$res4; -$arr3["?b"]=$res6; - -$arr4["?x"]=$res1; -$arr4["?y"]=$res3; -$arr4["?z"]=$res5; -$arr4["?a"]=$res3; -$arr4["?b"]=$res5; - -$arr5["?x"]=$res1; -$arr5["?y"]=$res3; -$arr5["?z"]=$res5; -$arr5["?a"]=$res4; -$arr5["?b"]=$res6; - -$arr6["?x"]=$res2; -$arr6["?y"]=$res4; -$arr6["?z"]=$res8; -$arr6["?a"]=$res3; -$arr6["?b"]=$res7; - -$arr7["?x"]=$res2; -$arr7["?y"]=$res4; -$arr7["?z"]=$res8; -$arr7["?a"]=$res4; -$arr7["?b"]=$res8; - - - - - - - - - -$result["rowcount"]=5; -$result["hits"]=8; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; -$result["part"][]=$arr6; -$result["part"][]=$arr7; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-04.res.svn-base deleted file mode 100755 index 92c1224c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-04.res.svn-base +++ /dev/null @@ -1,62 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res3; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res4; -$arr1["?z"]=$res6; -$arr1["?a"]=$res4; - - -$arr2["?x"]=$res1; -$arr2["?y"]=$res3; -$arr2["?z"]=$res5; -$arr2["?a"]=$res3; - - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z"]=$res8; -$arr3["?a"]=$res4; - - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-05.res.svn-base deleted file mode 100755 index c1171cd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-05.res.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-06.res.svn-base deleted file mode 100755 index a9ae43e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-06.res.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-07.res.svn-base deleted file mode 100755 index 4444de0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-07.res.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z1"]=$res7; -$arr["?z2"]=$res7; - -$arr1["?x"]=$res1; -$arr1["?y"]=$res4; -$arr1["?z1"]=$res6; -$arr1["?z2"]=$res6; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res3; -$arr2["?z1"]=$res5; -$arr2["?z2"]=$res5; - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z1"]=$res8; -$arr3["?z2"]=$res8; - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-08.res.svn-base deleted file mode 100755 index 3cf7eda9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-08.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-09.res.svn-base deleted file mode 100755 index 2022c236..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-09.res.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res7; - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; -$arr1["?a"]=$res5; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res4; -$arr2["?z"]=$res6; -$arr2["?a"]=$res6; - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z"]=$res8; -$arr3["?a"]=$res8; - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-10.res.svn-base deleted file mode 100755 index f767891a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-2-10.res.svn-base +++ /dev/null @@ -1,33 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-01.res.svn-base deleted file mode 100755 index 80f8d9f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-01.res.svn-base +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res4; -$arr["?z"]=$res6; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-02.res.svn-base deleted file mode 100755 index edec22dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-02.res.svn-base +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-03.res.svn-base deleted file mode 100755 index 859a9320..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-03.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res4; -$arr["?z"]=$res8; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-04.res.svn-base deleted file mode 100755 index 810cf448..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-04.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-05.res.svn-base deleted file mode 100755 index 810cf448..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-05.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-06.res.svn-base deleted file mode 100755 index 128a9be2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-06.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=""; -$arr["?y"]=""; -$arr["?z"]=""; - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-07.res.svn-base deleted file mode 100755 index d66238d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-3-07.res.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://never/bag"); -$res3 = new Literal("11"); -$res4 = new Literal("12"); -$res5 = new Literal("21"); -$res6 = new Literal("22"); - - - -$arr["?b"]=$res1; -$arr["?y"]=$res3; - -$arr1["?b"]=$res1; -$arr1["?y"]=$res4; - -$arr2["?b"]=$res2; -$arr2["?y"]=$res5; - -$arr3["?b"]=$res2; -$arr3["?y"]=$res6; - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-01.res.svn-base deleted file mode 100755 index b4d91d41..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-01.res.svn-base +++ /dev/null @@ -1,83 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?b"]=$res2; -$arr["?z"]=$res3; -$arr["?c"]=$res4; -$arr["?d"]=$res5; - - -$arr1["?a"]=$res9; -$arr1["?b"]=$res2; -$arr1["?z"]=$res9; -$arr1["?c"]=$res2; -$arr1["?d"]=$res9; - - - -$arr2["?a"]=$res10; -$arr2["?b"]=$res11; -$arr2["?z"]=$res12; -$arr2["?c"]=$res13; -$arr2["?d"]=$res10; - - -$arr3["?a"]=$res12; -$arr3["?b"]=$res13; -$arr3["?z"]=$res10; -$arr3["?c"]=$res11; -$arr3["?d"]=$res12; - - -$arr4["?a"]=$res12; -$arr4["?b"]=$res13; -$arr4["?z"]=$res10; -$arr4["?c"]=$res14; -$arr4["?d"]=$res15; - -$arr5["?a"]=$res12; -$arr5["?b"]=$res13; -$arr5["?z"]=$res10; -$arr5["?c"]=$res14; -$arr5["?d"]=$res16; - - - -$result["rowcount"]=5; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-02.res.svn-base deleted file mode 100755 index 1418d797..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-02.res.svn-base +++ /dev/null @@ -1,48 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?z"]=$res3; -$arr["?d"]=$res5; - - -$arr1["?a"]=$res9; -$arr1["?z"]=$res9; -$arr1["?d"]=$res9; - - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-03.res.svn-base deleted file mode 100755 index aafdda64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-03.res.svn-base +++ /dev/null @@ -1,42 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?b"]=$res2; - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-04.res.svn-base deleted file mode 100755 index 08d3b58d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-04.res.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-05.res.svn-base deleted file mode 100755 index fd329a28..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-05.res.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); - - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?y"]=$res2; -$arr["?a"]=$res1; -$arr["?b"]=$res5; - - -$arr1["?y"]=$res2; -$arr1["?a"]=$res3; -$arr1["?b"]=$res9; - - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-06.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-06.res.svn-base deleted file mode 100755 index 7cb8da63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-06.res.svn-base +++ /dev/null @@ -1,68 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); -$res4 = new Blanknode("bNode1"); -$res6 = new Blanknode("bNode2"); - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?x"] =$res4; -$arr["?p1"]=$res3; -$arr["?v1"]=$res9; -$arr["?y"] =$res4; -$arr["?p2"]=$res3; -$arr["?v2"]=$res9; - - -$arr1["?x"] =$res4; -$arr1["?p1"]=$res3; -$arr1["?v1"]=$res9; -$arr1["?y"] =$res4; -$arr1["?p2"]=$res1; -$arr1["?v2"]=$res5; - -$arr2["?x"] =$res4; -$arr2["?p1"]=$res1; -$arr2["?v1"]=$res5; -$arr2["?y"] =$res4; -$arr2["?p2"]=$res3; -$arr2["?v2"]=$res9; - - -$arr3["?x"] =$res4; -$arr3["?p1"]=$res1; -$arr3["?v1"]=$res5; -$arr3["?y"] =$res4; -$arr3["?p2"]=$res1; -$arr3["?v2"]=$res5; - -$arr4["?x"] =$res6; -$arr4["?p1"]=$res2; -$arr4["?v1"]=$res4; -$arr4["?y"] =$res6; -$arr4["?p2"]=$res2; -$arr4["?v2"]=$res4; - -$result["rowcount"]=6; -$result["hits"]=5; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-07.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-07.res.svn-base deleted file mode 100755 index ff0fd433..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-4-07.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); -$res4 = new Blanknode("bNode1"); -$res6 = new Blanknode("bNode2"); - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?x"] =$res4; -$arr["?y"] =$res4; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-01.res.svn-base deleted file mode 100755 index 225177c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-01.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; -$arr["?z"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?z"] =$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-02.res.svn-base deleted file mode 100755 index 3bf19114..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-02.res.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-03.res.svn-base deleted file mode 100755 index 5d0ca3b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-03.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Resource("http://rdf.hp.com/uri-r"); -$res3 = new Resource("http://rdf.hp.com/uri-p"); - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - -$arr1["?z"] =$res2; -$arr1["?x"] =$res3; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-04.res.svn-base deleted file mode 100755 index 5f9e9e79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-5-04.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); - - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-01.res.svn-base deleted file mode 100755 index 225177c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-01.res.svn-base +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; -$arr["?z"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?z"] =$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-02.res.svn-base deleted file mode 100755 index f7a52c2d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-02.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-03.res.svn-base deleted file mode 100755 index 5d0ca3b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-03.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Resource("http://rdf.hp.com/uri-r"); -$res3 = new Resource("http://rdf.hp.com/uri-p"); - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - -$arr1["?z"] =$res2; -$arr1["?x"] =$res3; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-04.res.svn-base deleted file mode 100755 index 5f9e9e79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-6-04.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); - - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-01.res.svn-base deleted file mode 100755 index 65386d00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-01.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r1"); -$res2 = new Resource("http://rdf.hp.com/r2"); - - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res1; -$arr["?a"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res2; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-02.res.svn-base deleted file mode 100755 index e8391257..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-02.res.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r1"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Literal("r-2-1"); -$res4 = new Literal("r-1-2"); - - - - -$arr["?y"] =$res2; -$arr["?a"] =$res1; -$arr["?b"] =$res3; -$arr["?x"] =$res1; -$arr["?z"] =$res4; - -$arr1["?y"] =$res1; -$arr1["?a"] =$res2; -$arr1["?b"] =$res4; -$arr1["?x"] =$res2; -$arr1["?z"] =$res3; - - -$result["rowcount"]=5; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-03.res.svn-base deleted file mode 100755 index 566fae16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-03.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Blanknode("bNode1"); -$res4 = new Literal("r-1-2"); - - - -$arr["?x"] =$res3; -$arr["?y"] =$res1; -$arr["?a"] =$res1; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res1; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-04.res.svn-base deleted file mode 100755 index 566fae16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-7-04.res.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Blanknode("bNode1"); -$res4 = new Literal("r-1-2"); - - - -$arr["?x"] =$res3; -$arr["?y"] =$res1; -$arr["?a"] =$res1; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res1; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-01.res.svn-base deleted file mode 100755 index 2a001009..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-01.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Literal("v-1-1"); - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; -$arr["?z"] =$res3; - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-02.res.svn-base deleted file mode 100755 index 2a001009..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-9-02.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Literal("v-1-1"); - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; -$arr["?z"] =$res3; - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-01.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-01.res.svn-base deleted file mode 100755 index 61edb684..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-01.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-02.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-02.res.svn-base deleted file mode 100755 index 3b4bd500..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-02.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-03.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-03.res.svn-base deleted file mode 100755 index e1318bbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-03.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-04.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-04.res.svn-base deleted file mode 100755 index 61edb684..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-04.res.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-05.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-05.res.svn-base deleted file mode 100755 index 39fc9c81..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-05.res.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res2 = new Literal("value"); - - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#string"); -$res2->setDatatype("http://rdf.hp.com/ns#someType"); - - -$arr["?z"] =$res1; - -$arr1["?z"] =$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-08.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-08.res.svn-base deleted file mode 100755 index 85a10fd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-08.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-09.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-09.res.svn-base deleted file mode 100755 index cba63fcb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-09.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-10.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-10.res.svn-base deleted file mode 100755 index c4bbb4c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-10.res.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p8"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-11.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-11.res.svn-base deleted file mode 100755 index 4364dfb7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-11.res.svn-base +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?z"] =$res1; -$arr["?x"] =$res2; -$arr["?y"] =$res3; - -$arr1["?z"] =$res8; -$arr1["?x"] =$res2; -$arr1["?y"] =$res7; - -$arr2["?z"] =$res4; -$arr2["?x"] =$res2; -$arr2["?y"] =$res9; - -$arr3["?z"] =$res6; -$arr3["?x"] =$res2; -$arr3["?y"] =$res3; - -$arr4["?z"] =$res5; -$arr4["?x"] =$res2; -$arr4["?y"] =$res10; - -$result["rowcount"]=3; -$result["hits"]=5; - -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-12.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-12.res.svn-base deleted file mode 100755 index 63ed609c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-12.res.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?y"] =$res3; -$arr["?z"] =$res1; -$arr["?x"] =$res2; - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-13.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-13.res.svn-base deleted file mode 100755 index 6a084e2b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-13.res.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p4"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-15.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-15.res.svn-base deleted file mode 100755 index f99622ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-15.res.svn-base +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p4"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?v"] =$res1; -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-17.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-17.res.svn-base deleted file mode 100755 index fc8187ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-17.res.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p7"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr = array(); -$arr["?x"] = $res2; -$arr["?y"] = $res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-18.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-18.res.svn-base deleted file mode 100755 index 6fdbb3bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-18.res.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("true"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p6"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr = array(); -$arr["?v"] = $res1; -$arr["?y"] = $res3; -$arr["?x"] = $res2; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-19.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-19.res.svn-base deleted file mode 100755 index 577c7fd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-19.res.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("true"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p5"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - - -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-20.res.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-20.res.svn-base deleted file mode 100755 index f01d7c93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/.svn/text-base/test-B-20.res.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5.7"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p5"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?v"] =$res1; -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff1.res deleted file mode 100755 index ad958f16..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff1.res +++ /dev/null @@ -1,57 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - -$result[]=$arr4; -$result[]=$arr5; -$result[]=$arr1; -$result[]=$arr3; -$result[]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_1.res deleted file mode 100755 index 2f7c84f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_1.res +++ /dev/null @@ -1,55 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - -$result[]=$arr2; -$result[]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_2.res deleted file mode 100755 index 0402371c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_2.res +++ /dev/null @@ -1,56 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - - -$result[]=$arr1; -$result[]=$arr5; -$result[]=$arr4; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_3.res deleted file mode 100755 index 29da3723..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/LimitOff_3.res +++ /dev/null @@ -1,56 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - - - - - - -$result[]=$arr1; -$result[]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-01.res deleted file mode 100755 index 5a5f4ccd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-01.res +++ /dev/null @@ -1 +0,0 @@ -$result = true; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-02.res deleted file mode 100755 index 7bae5725..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ask-02.res +++ /dev/null @@ -1 +0,0 @@ -$result = false; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/bound1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/bound1.res deleted file mode 100755 index dfc3debe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/bound1.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/ns#a2"); -$res2 = new Resource("http://example.org/ns#c2"); -$res3 = new Resource("http://example.org/ns#f"); - -$arr["?a"]=$res1; -$arr["?c"]=$res2; -$arr1["?a"]=$res2; -$arr1["?c"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-01.res deleted file mode 100755 index 16e2e1eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-01.res +++ /dev/null @@ -1 +0,0 @@ -$result = 4; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-02.res deleted file mode 100755 index c12a8b73..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/count-02.res +++ /dev/null @@ -1 +0,0 @@ -$result = 0; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion1.res deleted file mode 100755 index c3a7a215..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion1.res +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Literal("SPARQL Query Language Tutorial"); -$res2 = new Literal("SPARQL"); -$res3 = new Literal("SPARQL Protocol Tutorial"); -$res4 = new Literal("SPARQL (updated)"); -$res5 = new Literal("Test"); -$res6 = new Literal("Test (updated)"); - - - -$arr["?title"]=$res1; -$arr1["?title"]=$res2; -$arr2["?title"]=$res3; -$arr3["?title"]=$res4; -$arr4["?title"]=$res5; -$arr5["?title"]=$res6; - - - - -$result["rowcount"]=1; -$result["hits"]=6; - -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion2.res deleted file mode 100755 index 9e4fe4f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/customUnion2.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); -$res3 = new Resource("mailto:bert@work.example"); - - - -$arr["?name"]=$res1; -$arr["?mbox"]=$res2; -$arr1["?name"]=""; -$arr1["?mbox"]=$res3; - - - -$result["rowcount"]=2; -$result["hits"]=2; - -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-001.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-001.res deleted file mode 100755 index 85db6e08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-001.res +++ /dev/null @@ -1,33 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); - - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res6; -$arr["?mbox"]=""; - - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; - - -$arr2["?name"]=$res7; -$arr2["?mbox"]=$res1; - -$arr3["?name"]=$res7; -$arr3["?mbox"]=$res8; - - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-002.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-002.res deleted file mode 100755 index cbb666e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-002.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res6; -$arr["?name2"]=""; - - -$arr1["?name"]=$res5; -$arr1["?name2"]=$res7; - - -$arr2["?name"]=$res7; -$arr2["?name2"]=$res5; - - - - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-003.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-003.res deleted file mode 100755 index ca7538f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-003.res +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); -$res9 = new Resource("mailto:fred@edu"); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res7; -$arr["?mbox"]=$res8; - - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; - - -$arr2["?name"]=$res6; -$arr2["?mbox"]=""; - -$arr3["?name"]=""; -$arr3["?mbox"]=$res9; - -$arr4["?name"]=$res7; -$arr4["?mbox"]=$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=5; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-004.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-004.res deleted file mode 100755 index bb6f64e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-query-004.res +++ /dev/null @@ -1,34 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@work"); -$res8 = new Resource("mailto:bob@work"); -$res9 = new Resource("mailto:fred@edu"); - -$res5 = new Literal("Alice"); -$res6 = new Literal("Eve"); -$res7 = new Literal("Bob"); - - -$arr["?name"]=$res7; - - - -$arr1["?name"]=$res5; - - - -$arr2["?name"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-01.res deleted file mode 100755 index ec70aa10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-01.res +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/p"); -$res2 = new Resource("http://example.org/data/v1"); -$res3 = new Resource("http://example.org/data/v2"); - -$arr["?p"]=$res1; -$arr["?q"]=$res2; -$arr1["?p"]=$res1; -$arr1["?q"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-02.res deleted file mode 100755 index c9c50607..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-02.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/x"); -$res2 = new Resource("http://example.org/data/v1"); -$res3 = new Resource("http://example.org/data/v2"); - -$arr["?x"]=$res1; -$arr["?q"]=$res2; -$arr1["?x"]=$res1; -$arr1["?q"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-03.res deleted file mode 100755 index c4d7c993..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-03.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/data/x"); -$res2 = new Resource("http://example.org/data/y"); - - -$arr["?b"]=$res1; -$arr["?a"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-04.res deleted file mode 100755 index 873ab1dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/dawg-tp-04.res +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Literal("Eve"); -$res2 = new Literal("Alice"); -$res3 = new Literal("Bob"); - - -$arr1["?name"]=$res1; -$arr2["?name"]=$res2; -$arr3["?name"]=$res3; - - -$result["rowcount"]=1; -$result["hits"]=3; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_0.res deleted file mode 100755 index f7d46a3c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_0.res +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$res1 = new Literal("Alice"); -$res2 = new Literal("Ms A."); - - - -$arr = array(); -$arr["?name1"]=$res1; -$arr["?name2"]=$res2; - -$arr1["?name1"]=$res2; -$arr1["?name2"]=$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_1.res deleted file mode 100755 index 81785e5a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.1_1.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("http://www.w3.org/TR/rdf-sparql-query/"); - - - - - -$arr["?annotates"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_0.res deleted file mode 100755 index fb891b6a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_0.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); - - - - - - -$arr["?name"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_1.res deleted file mode 100755 index cc738de4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.2_1.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); - - - - -$arr["?name"]=$res1; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.3_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.3_0.res deleted file mode 100755 index cd3505f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.3_0.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); - - -$arr = array(); -$arr["?name"]=$res1; -$arr["?mbox"]=$res2; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.4_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.4_0.res deleted file mode 100755 index 6e3061b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.4_0.res +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$res1 = new Literal("Bob"); -$res2 = new Literal("Smith"); - - - - -$arr["?family"]=$res2; -$arr["?given"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.5_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.5_0.res deleted file mode 100755 index 401e33ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.5_0.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Bob"); -$res2 = new Literal("bob@work.example"); - - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.6_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.6_0.res deleted file mode 100755 index bc2fdcad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.6_0.res +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Alice"); -$res2 = new Resource("mailto:alice@work.example"); - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.7_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.7_0.res deleted file mode 100755 index a5697c77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11.2.3.7_0.res +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("Roberto"); -$res1->setLanguage("ES"); -$res2 = new Resource("mailto:bob@work.example"); - - - - -$arr["?mbox"]=$res2; -$arr["?name"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_0.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_0.res deleted file mode 100755 index 57438d07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_0.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Blanknode("bNode2"); - - - -$arr["?annot"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_1.res deleted file mode 100755 index 503fd5d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex11_1.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$res1 = new Blanknode("bNode2"); -$res2 = new Blanknode("bNode1"); - - - -$arr["?annot"]=$res1; -$arr1["?annot"]=$res2; - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-1a.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-1a.res deleted file mode 100755 index 7c0e0c38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-1a.res +++ /dev/null @@ -1,13 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("SPARQL Tutorial"); - - - -$arr["?title"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-2a.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-2a.res deleted file mode 100755 index edf1ac50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-2a.res +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"); -$res2 = new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); - -$arr["?v"]=$res1; -$arr["?x"]=$res2; - - -$result = array(); - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-3a.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-3a.res deleted file mode 100755 index cac11dbd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-3a.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Resource("mailto:jlow@example.com"); - -$arr["?mbox"]=$res1; - - -$result = array(); - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-4a.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-4a.res deleted file mode 100755 index cb8a18b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex2-4a.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$res1 = new Resource("mailto:peter@example.org"); -$res2 = new Resource("mailto:jlow@example.com"); -$res3 = new Literal("Peter Goodguy"); -$res4 = new Literal("Johnny Lee Outlaw"); - -$arr["?mbox"]=$res1; -$arr["?name"]=$res3; -$arr1["?mbox"]=$res2; -$arr1["?name"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex3.res deleted file mode 100755 index 6a4ce9a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/ex3.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$res1 = new Literal("23"); -$res2 = new Literal("The Semantic Web"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$arr["?price"]=$res1; -$arr["?title"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-1.res deleted file mode 100755 index ceaff484..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-1.res +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$res1 = new Literal("TITLE 3"); -$res2 = new Literal("TITLE 2"); -$res3 = new Literal("TITLE 1"); - -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - - - - - -$arr["?title"]=$res1; -$arr["?price"]=""; - - -$arr1["?title"]=$res2; -$arr1["?price"]=""; - - -$arr2["?title"]=$res3; -$arr2["?price"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-2.res deleted file mode 100755 index 2f534588..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-2.res +++ /dev/null @@ -1,14 +0,0 @@ -$result = array(); -$arr = array(); - -$res3 = new Literal("TITLE 1"); -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?title"]=$res3; -$arr["?price"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-3.res deleted file mode 100755 index 1b60069b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/expr-3.res +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); - -$res3 = new Literal("TITLE 1"); -$res4 = new Literal("10"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res5 = new Literal("TITLE 3"); - - -$arr["?title"]=$res3; -$arr["?price"]=$res4; - -$arr1["?title"]=$res5; -$arr1["?price"]=""; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset1.res deleted file mode 100755 index bd34c28a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset1.res +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$res1 = new Literal("Bobby"); -$res2 = new Literal("Robert"); - -$res3 = new Resource("http://example.org/foaf/aliceFoaf"); -$res4 = new Resource("http://example.org/foaf/bobFoaf"); - - -$arr["?bobNick"]=$res1; -$arr["?src"]=$res3; - - -$arr2["?bobNick"]=$res2; -$arr2["?src"]=$res4; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset2.res deleted file mode 100755 index da064a7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset2.res +++ /dev/null @@ -1,14 +0,0 @@ -$result = array(); -$res2 = new Literal("Robert"); - - -$arr["?nick"]=$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset3.res deleted file mode 100755 index bb90a9f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset3.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$res1 = new Literal("Bob"); - -$res2 = new Literal("2004-12-06"); -$res5 = new Literal("2005-01-10"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#date"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#date"); - -$res3 = new Resource("mailto:bob@oldcorp.example.org"); -$res4 = new Resource("mailto:bob@newcorp.example.org"); - - -$arr["?name"]=$res1; -$arr["?mbox"]=$res3; -$arr["?date"]=$res2; - -$arr1["?name"]=$res1; -$arr1["?mbox"]=$res4; -$arr1["?date"]=$res5; - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset4.res deleted file mode 100755 index 1d57e28d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/graphset4.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res1 = new Literal("Robert"); - -$res2 = new Resource("http://example.org/foaf/bobFoaf"); - -$res3 = new Resource("mailto:bob@work.example"); - - - -$arr["?mbox"]=$res3; -$arr["?nick"]=$res1; -$arr["?ppd"]=$res2; - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-1.res deleted file mode 100755 index 0d576029..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-1.res +++ /dev/null @@ -1,29 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("x:x x:p"); -$res2 = new Resource("http://example.org/ns#p"); -$res3 = new Resource("http://example.org/x/p"); -$res4 = new Literal("d:x ns:p"); - - - - -$arr1["?v"]=$res1; -$arr1["?p"]=$res3; - -$arr2["?v"]=$res4; -$arr2["?p"]=$res2; - - - -$result["rowcount"]=2; -$result["hits"]=2; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-2.res deleted file mode 100755 index 2a3da373..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-2.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("z:x z:p"); -$res3 = new Resource("http://example.org/x/#p"); - - - - - -$arr1["?v"]=$res1; -$arr1["?p"]=$res3; - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-3.res deleted file mode 100755 index 887c4d64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-3.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("d:x ns:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-4.res deleted file mode 100755 index 57174e09..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-4.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("x:x x:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-5.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-5.res deleted file mode 100755 index d026b75f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-base-prefix-5.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("z:x z:p"); - - - - - - -$arr1["?v"]=$res1; - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-blank-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-blank-1.res deleted file mode 100755 index fd1fcd4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-blank-1.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://example.org/things#xb"); - - - - - -$arr["?x"]=$res2; -$arr["?v"]=$res1; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-1.res deleted file mode 100755 index 6acd3b77..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-1.res +++ /dev/null @@ -1,9 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Resource("http://example.org/bill"),new Resource("http://example.org/ns#knows"),new Blanknode("bNode1")); -$statement2 = new Statement(new Resource("http://example.org/joe"),new Resource("http://example.org/ns#knows"),new Blanknode("bNode1")); - - - -$result->add($statement1); -$result->add($statement2); \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-2.res deleted file mode 100755 index 9a241736..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-construct-2.res +++ /dev/null @@ -1 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-datatype-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-datatype-1.res deleted file mode 100755 index ee6ada36..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-datatype-1.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://example.org/things#xd3"); -$res2 = new Resource("http://example.org/things#xd1"); -$res3 = new Resource("http://example.org/things#xd2"); - -$res4 = new Literal("1"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res5 = new Literal("1.0"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res6 = new Literal("1.0"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$arr["?x"]=$res1; -$arr["?v"]=$res4; - -$arr1["?x"]=$res2; -$arr1["?v"]=$res5; - -$arr2["?x"]=$res3; -$arr2["?v"]=$res6; - - - - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-1.res deleted file mode 100755 index 38d9fcf9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-1.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); - - -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-2.res deleted file mode 100755 index 9d63dab2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-2.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - -$res3 = new Resource("http://example.org/#p3"); -$res4 = new Literal("abc"); -$res4->setLanguage("en"); - - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$arr1["?v"]=$res4; -$arr1["?p"]=$res3; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-3.res deleted file mode 100755 index a6a18705..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-3.res +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Resource("http://example.org/#p4"); -$res2 = new Literal("abc"); -$res2->setLanguage("en-gb"); - -$res3 = new Resource("http://example.org/#p3"); -$res4 = new Literal("abc"); -$res4->setLanguage("en"); - -$res5 = new Resource("http://example.org/#p5"); -$res6 = new Literal("abc"); -$res6->setLanguage("fr"); - - -$arr["?v"]=$res2; -$arr["?p"]=$res1; - -$arr1["?v"]=$res4; -$arr1["?p"]=$res3; - -$arr2["?v"]=$res6; -$arr2["?p"]=$res5; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-4.res deleted file mode 100755 index ed181985..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-langMatches-4.res +++ /dev/null @@ -1,9 +0,0 @@ -$result = array(); - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=""; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-1.res deleted file mode 100755 index 35195538..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-1.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bert@example.net"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@example.net"); - -$res4 = new Literal("Bert"); -$res5 = new Literal("Alice"); - - -$arr["?name"]=$res4; -$arr["?mbox"]=$res1; -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; -$arr2["?name"]=""; -$arr2["?mbox"]=$res2; - -$result["rowcount"]=2; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-2.res deleted file mode 100755 index 052f52e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-opt-2.res +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bert@example.net"); -$res2 = new Resource("mailto:eve@example.net"); -$res3 = new Resource("mailto:alice@example.net"); - -$res4 = new Literal("Bert"); -$res5 = new Literal("Alice"); - -$res6 = new Literal("WhoMe?"); -$res7 = new Literal("DuckSoup"); - - -$arr["?name"]=$res4; -$arr["?mbox"]=$res1; -$arr["?nick"]=""; - -$arr1["?name"]=$res5; -$arr1["?mbox"]=$res3; -$arr1["?nick"]=$res6; - -$arr2["?name"]=""; -$arr2["?mbox"]=$res2; -$arr2["?nick"]=$res7; - -$result["rowcount"]=3; -$result["hits"]=3; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-1.res deleted file mode 100755 index 8dc9bd19..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-1.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/x")); -$statement2 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#p")); -$statement3 = new Statement(new Blanknode("_bN0"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Literal("1")); - -$statement4 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/y")); -$statement5 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#q")); -$statement6 = new Statement(new Blanknode("_bN2"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Resource("http://example.org/data/x")); - -$statement7 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"),new Resource("http://example.org/data/x")); -$statement8 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"),new Resource("http://example.org/ns#p")); -$statement9 = new Statement(new Blanknode("_bN1"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#object"),new Literal("2")); - - - -$result->add($statement1); -$result->add($statement2); -$result->add($statement3); -$result->add($statement4); -$result->add($statement5); -$result->add($statement6); -$result->add($statement7); -$result->add($statement8); -$result->add($statement9); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-2.res deleted file mode 100755 index 7472040b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-reif-2.res +++ /dev/null @@ -1,10 +0,0 @@ -$result = new NamedGraphMem("resultGraph"); - -$statement1 = new Statement(new Resource("http://example.org/data/x"),new Resource("http://example.org/ns#p"),new Literal("2")); -$statement2 = new Statement(new Resource("http://example.org/data/x"),new Resource("http://example.org/ns#p"),new Literal("1")); - - - - -$result->add($statement1); -$result->add($statement2); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-1.res deleted file mode 100755 index a6543b12..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-1.res +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); - - - -$res5 = new Literal("1"); - - - -$arr["?x"]=$res5; - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-2.res deleted file mode 100755 index caa8186a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-2.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$res1 = new Resource("mailto:bob@home"); -$res2 = new Resource("mailto:eve@example.net"); - - -$res5 = new Literal("1"); - - - -$arr["?x"]=$res5; -$arr["?y"]=""; - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-3.res deleted file mode 100755 index 4a15f828..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-select-3.res +++ /dev/null @@ -1,8 +0,0 @@ -$result = array(); -$res5 = new Literal("1"); - -$arr["?x"]=$res5; - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-1.res deleted file mode 100755 index 67a3dbd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-1.res +++ /dev/null @@ -1,44 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://example.org/things#xp2"); -$res2 = new Resource("http://example.org/things#xd3"); -$res3 = new Resource("http://example.org/things#xi2"); -$res4 = new Resource("http://example.org/things#xi1"); - -$res5 = new Literal("1"); - -$res6 = new Literal("1"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res7 = new Literal("1"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res8 = new Literal("1"); - - - - -$arr["?x"]=$res1; -$arr["?v"]=$res5; - -$arr1["?x"]=$res2; -$arr1["?v"]=$res6; - -$arr2["?x"]=$res3; -$arr2["?v"]=$res7; - -$arr3["?x"]=$res4; -$arr3["?v"]=$res8; - - - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-2.res deleted file mode 100755 index b365bc91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-2.res +++ /dev/null @@ -1,22 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res3 = new Resource("http://example.org/things#xi3"); - - -$res5 = new Literal("1"); -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - - -$arr["?x"]=$res3; -$arr["?v"]=$res5; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-3.res deleted file mode 100755 index 576a9fc8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-3.res +++ /dev/null @@ -1,31 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/things#xp1"); -$res2 = new Resource("http://example.org/things#xt1"); - - -$res3 = new Literal("zzz"); -$res4 = new Literal("zzz"); -$res4->setDatatype("http://example.org/things#myType"); - - - -$arr["?x"]=$res1; -$arr["?v"]=$res3; - -$arr2["?x"]=$res2; -$arr2["?v"]=$res4; - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-4.res deleted file mode 100755 index baa470db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-str-4.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://example.org/things#xb"); - - - - - -$arr["?x"]=$res2; -$arr["?v"]=$res1; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-uri-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-uri-1.res deleted file mode 100755 index 00e91c0b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/q-uri-1.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Resource("http://example.org/things#z"); -$res2 = new Resource("http://example.org/things#xu"); - - - - - -$arr["?v"]=$res1; -$arr["?x"]=$res2; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-01.res deleted file mode 100755 index 0b9d0455..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-01.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - -$res1 = new Resource("http://example.com/#C1"); - - - - - - -$arr["?c"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-1.res deleted file mode 100755 index 0e7e3fcb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-1.res +++ /dev/null @@ -1,25 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-2.res deleted file mode 100755 index 4f68009f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-2.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#y1"); -$res2 = new Resource("http://example.org/ns#y2"); -$res3 = new Resource("http://example.org/ns#y3"); -$res4 = new Resource("http://example.org/ns#y4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-3.res deleted file mode 100755 index e5a44272..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-3.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-4.res deleted file mode 100755 index e5a44272..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-4.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x2"); -$res3 = new Resource("http://example.org/ns#x3"); -$res4 = new Resource("http://example.org/ns#x4"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; -$arr2["?a"]=$res3; -$arr3["?a"]=$res4; - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-5.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-5.res deleted file mode 100755 index 853c855d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-5.res +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - -$res1 = new Resource("http://example.org/ns#x1"); -$res2 = new Resource("http://example.org/ns#x3"); - - - - -$arr["?a"]=$res1; -$arr1["?a"]=$res2; - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-6.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-6.res deleted file mode 100755 index 7ea8935b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-bev-6.res +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://example.org/ns#x2"); -$res2 = new Literal("false"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - - - -$arr["?a"]=$res1; -$arr["?w"]=$res2; - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-1.res deleted file mode 100755 index 48f765d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-1.res +++ /dev/null @@ -1,43 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); -$res4 = new Resource("http://example.org/things#xd1"); -$res5 = new Resource("http://example.org/things#xd2"); -$res6 = new Resource("http://example.org/things#xd3"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res3; -$arr3["?x"]=$res4; -$arr4["?x"]=$res5; -$arr5["?x"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-2.res deleted file mode 100755 index 48f765d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-2.res +++ /dev/null @@ -1,43 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); -$res4 = new Resource("http://example.org/things#xd1"); -$res5 = new Resource("http://example.org/things#xd2"); -$res6 = new Resource("http://example.org/things#xd3"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res3; -$arr3["?x"]=$res4; -$arr4["?x"]=$res5; -$arr5["?x"]=$res6; - - - - - - - -$result["rowcount"]=1; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-3.res deleted file mode 100755 index a85ff70e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-3.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp2"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-4.res deleted file mode 100755 index f3ce1624..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-4.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp1"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-5.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-5.res deleted file mode 100755 index 70266db8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-5.res +++ /dev/null @@ -1,28 +0,0 @@ -$result = array(); -$arr = array(); - - - - - -$res1 = new Resource("http://example.org/things#xu"); - - - - - -$arr["?x"] = $res1; - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-1.res deleted file mode 100755 index 0455a2c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-1.res +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://example.org/things#xi1"); -$res2 = new Resource("http://example.org/things#xi2"); -$res3 = new Resource("http://example.org/things#xi3"); - - - - - -$arr1["?x"]=$res1; -$arr2["?x"]=$res2; -$arr3["?x"]=$res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-2.res deleted file mode 100755 index ad56279a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-2.res +++ /dev/null @@ -1,30 +0,0 @@ -$result = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://example.org/things#xd1"); -$res2 = new Resource("http://example.org/things#xd2"); -$res3 = new Resource("http://example.org/things#xd3"); - - - - - -$arr1["?x"]=$res1; -$arr2["?x"]=$res2; -$arr3["?x"]=$res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=3; - -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-3.res deleted file mode 100755 index 9871095f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-3.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://example.org/things#xp2"); - - - - - - -$arr1["?x"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-4.res deleted file mode 100755 index 00387aa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq-graph-4.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://example.org/things#xp1"); - - - - - - -$arr1["?x"]=$res1; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq2-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq2-1.res deleted file mode 100755 index 111cd7cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-eq2-1.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res7 = new Resource("http://example.org/things#xp1"); - - - - - -$arr["?x"]=$res7; - - - - - - -$result["rowcount"]=99999; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-survey-1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-survey-1.res deleted file mode 100755 index c4361746..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/query-survey-1.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$res5 = new Literal("Willy"); -$res5 = new Literal("Mary"); -$res5 = new Literal("Bob"); -$res5 = new Literal("John"); - -$arr =array(); -$arr["?n"]=$res5; -$arr["?n"]=$res5; -$arr["?n"]=$res5; -$arr["?n"]=$res5; - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-001.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-001.res deleted file mode 100755 index eed9dfe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-001.res +++ /dev/null @@ -1,12 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Literal("ABCdefGHIjkl"); - -$arr["?val"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-002.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-002.res deleted file mode 100755 index 26e54aaa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-002.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); -$arr = array(); -$arr2 = array(); - -$res1 = new Literal("abcDEFghiJKL"); -$res2 = new Literal("ABCdefGHIjkl"); - -$arr["?val"]=$res1; -$arr2["?val"]=$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr2; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-003.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-003.res deleted file mode 100755 index ddfb428d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/regex-query-003.res +++ /dev/null @@ -1,12 +0,0 @@ -$result = array(); -$arr = array(); - -$res1 = new Literal("http://example.com/literal"); - -$arr["?val"]=$res1; - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res1.res deleted file mode 100755 index 2e3ac8f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res1.res +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("r2"); - - -$arr["?x"]=$res2; -$arr["?hpage"]=$res1; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res2.res deleted file mode 100755 index 48191544..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res2.res +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("r2"); - - -$arr["?x"]=$res2; -$arr["?hpage"]=""; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res3.res deleted file mode 100755 index 5a0c4308..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res3.res +++ /dev/null @@ -1,16 +0,0 @@ -$result = array(); -$res1 = new Resource("http://work.example.org/bob/"); -$res2 = new Blanknode("bNode0"); - - -$arr["?x"]=""; -$arr["?hpage"]=$res2; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res4.res deleted file mode 100755 index e875f8b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res4.res +++ /dev/null @@ -1,18 +0,0 @@ -$result = array(); -$res1 = new Blanknode("bNode1"); -$res2 = new Blanknode("bNode0"); - - -$arr["?x"]=""; -$arr["?hpage"]=$res2; - -$arr1["?hpage"]=""; -$arr1["?x"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res5.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res5.res deleted file mode 100755 index f7a9f219..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res5.res +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$res1 = new Blanknode("bNode1"); -$res2 = new Blanknode("bNode0"); -$res3 = new Literal("30"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?x"]=$res2; -$arr["?age"]=""; - -$arr1["?age"]=$res3; -$arr1["?x"]=$res1; - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res6.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res6.res deleted file mode 100755 index c00fd0c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/res6.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res2 = new Literal("Bob"); -$res2->setLanguage("en"); -$res3 = new Literal("30"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr["?name"]=$res2; -$arr["?age"]=$res3; - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort-datetime.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort-datetime.res deleted file mode 100755 index bf44f5c0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort-datetime.res +++ /dev/null @@ -1,19 +0,0 @@ -$result = array(); -$res1 = new Literal("2004-12-31T18:01:00-05:00"); -$res2 = new Literal("2004-01-31T18:01:00-05:00"); -$res3 = new Literal("2007-03-12T17:02:00-05:00"); -$res4 = new Literal("2007-03-12T17:01:00-05:00"); - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res2->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res3->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); -$res4->setDatatype("http://www.w3.org/2001/XMLSchema#dateTime"); - - - -$result = array( - array('?created' => $res2), - array('?created' => $res1), - array('?created' => $res4), - array('?created' => $res3), -); diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort1.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort1.res deleted file mode 100755 index 28fbaa32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort1.res +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$arr1["?name"]=$res2; - - -$arr2["?name"]=$res3; - - -$arr3["?name"]=$res4; - - -$arr4["?name"]=$res1; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort2.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort2.res deleted file mode 100755 index 7dfd00b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort2.res +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$arr1["?name"]=$res1; - - -$arr2["?name"]=$res4; - - -$arr3["?name"]=$res3; - - -$arr4["?name"]=$res2; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort3.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort3.res deleted file mode 100755 index c63c3a88..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort3.res +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - - - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Resource("mailto:fred@work.example"); -$res6 = new Resource("mailto:eve@work.example"); -$res7 = new Resource("mailto:alice@work.example"); - -$arr1["?name"]=$res2; -$arr1["?mbox"]=$res5; - -$arr2["?name"]=$res3; -$arr2["?mbox"]=$res6; - -$arr3["?name"]=$res1; -$arr3["?mbox"]=$res7; - -$arr4["?name"]=$res4; -$arr4["?mbox"]=""; - - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort4.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort4.res deleted file mode 100755 index b917343b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort4.res +++ /dev/null @@ -1,58 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - - -$result[]=$arr2; -$result[]=$arr3; -$result[]=$arr1; -$result[]=$arr5; -$result[]=$arr4; - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort5.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort5.res deleted file mode 100755 index a35a9512..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort5.res +++ /dev/null @@ -1,58 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); -unset($arr5); - -$result = array(); - -$res1 = new Literal("Alice"); -$res2 = new Literal("Fred"); -$res3 = new Literal("Eve"); -$res4 = new Literal("Bob"); - - -$res5 = new Literal("9"); -$res6 = new Literal("29"); -$res7 = new Literal("30"); -$res8 = new Literal("23"); -$res9 = new Literal("27"); - - - - -$res5->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res6->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res7->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res8->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); -$res9->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - - -$arr1["?name"]=$res2; -$arr1["?emp"]=$res9; - -$arr2["?name"]=$res3; -$arr2["?emp"]=$res5; - -$arr3["?name"]=$res4; -$arr3["?emp"]=$res8; - -$arr4["?name"]=$res4; -$arr4["?emp"]=$res7; - -$arr5["?name"]=$res1; -$arr5["?emp"]=$res6; - - -$result[]=$arr5; -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort6.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort6.res deleted file mode 100755 index c1a4bde0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort6.res +++ /dev/null @@ -1,32 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); -unset($arr4); - -$result = array(); - -$res1 = new Literal("fred@work.example"); -$res2 = new Literal("Fascination Street 11"); -$res3 = new Resource("mailto:bob@work.example"); -$res4 = new Resource("http://example.org/eve"); - -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); - - -$arr1["?address"]=$res1; - -$arr2["?address"]=$res2; - -$arr3["?address"]=$res3; - -$arr4["?address"]=$res4; - - - -$result[]=$arr4; -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort8.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort8.res deleted file mode 100755 index d2a73953..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/sort8.res +++ /dev/null @@ -1,34 +0,0 @@ -unset($arr1); -unset($arr2); -unset($arr3); - -$result = array(); - -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Literal("9"); -$res2 = new Literal("Eve"); -$res3 = new Resource("http://example.org/dirk01"); -$res4 = new Blanknode("bNode4"); -$res5 = new Literal("Dirk"); -$res6 = new Literal("John"); - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$arr1["?emp"]=$res1; -$arr1["?name"]=$res2; - -$arr2["?emp"]=$res3; -$arr2["?name"]=$res5; - -$arr3["?emp"]=$res4; -$arr3["?name"]=$res6; - - -$result[]=$arr3; -$result[]=$arr2; -$result[]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-01.res deleted file mode 100755 index 6608dd74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-01.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-02.res deleted file mode 100755 index e50a71b3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-02.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - - -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-03.res deleted file mode 100755 index 9055187f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-03.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - - - -$arr["?select"]=$res3; - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-04.res deleted file mode 100755 index 6608dd74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-0-04.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("urn:/*not_a_comment*/"); -$res2 = new Resource("http://localhost/p1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res3; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-01.res deleted file mode 100755 index efe6b5d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-01.res +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/r-1"); -$res3 = new Literal("RDQL//RDQL"); - - - - - -$arr["?x"]=$res1; -$arr1["?x"]=$res2; -$arr2["?x"]=$res2; -$arr3["?x"]=$res1; - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-02.res deleted file mode 100755 index 96947462..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-02.res +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - -$res1 = new Resource("http://rdf.hp.com/p-1"); -$res2 = new Resource("http://rdf.hp.com/p-2"); -$res3 = new Literal("v-1-2"); -$res4 = new Literal("v-1-1"); - - - - - - -$arr["?y"]=$res1; -$arr["?z"]=$res4; - -$arr1["?y"]=$res2; -$arr1["?z"]=$res3; - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-03.res deleted file mode 100755 index 2173eb7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-03.res +++ /dev/null @@ -1,40 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Literal("v-1-1"); -$res4 = new Literal("v-2-1"); - - - - - - -$arr["?x"]=$res1; -$arr["?z"]=$res3; - -$arr1["?x"]=$res2; -$arr1["?z"]=$res4; - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-04.res deleted file mode 100755 index 701dae58..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-04.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); - - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-05.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-05.res deleted file mode 100755 index e012b49b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-05.res +++ /dev/null @@ -1,34 +0,0 @@ -$result = array(); - - -$res1 = new Literal("v-1-1"); - - - - - - - -$arr["?z"]=$res1; - - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-06.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-06.res deleted file mode 100755 index 10f36651..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-06.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/p-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); - - - - - - - -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-07.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-07.res deleted file mode 100755 index 942c4e29..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-07.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - - - - - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"]=false; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-08.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-08.res deleted file mode 100755 index 942c4e29..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-08.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - - - - - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"]=false; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-09.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-09.res deleted file mode 100755 index c8bbac79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-09.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res2 = new Resource("http://rdf.hp.com/p-2"); - - - - - - - -$arr["?y"]=$res2; - - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-10.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-10.res deleted file mode 100755 index 2253210b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-1-10.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res2 = new Literal("v-1-1"); - - - - - - - -$arr["?v"]=$res2; -$arr["?x"]=""; - - - - - - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-01.res deleted file mode 100755 index 083b9fd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-01.res +++ /dev/null @@ -1,59 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Resource("http://rdf.hp.com/r-1"); -$res8 = new Resource("http://rdf.hp.com/p-2"); - - -$res4 = new Literal("v-2-1"); -$res5 = new Literal("v-1-2"); -$res6 = new Literal("v-1-1"); -$res7 = new Literal("v-2-2"); - - - - - - - -$arr["?x"]=$res1; -$arr["?y"]=$res2; -$arr["?z"]=$res4; - - -$arr1["?x"]=$res3; -$arr1["?y"]=$res8; -$arr1["?z"]=$res5; - - -$arr2["?x"]=$res3; -$arr2["?y"]=$res2; -$arr2["?z"]=$res6; - -$arr3["?x"]=$res1; -$arr3["?y"]=$res8; -$arr3["?z"]=$res7; - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-02.res deleted file mode 100755 index d9d4f46d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-02.res +++ /dev/null @@ -1,49 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-2"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Resource("http://rdf.hp.com/r-1"); -$res8 = new Resource("http://rdf.hp.com/p-2"); - - -$res4 = new Literal("v-2-1"); -$res5 = new Literal("v-1-2"); -$res6 = new Literal("v-1-1"); -$res7 = new Literal("v-2-2"); - - - - - - - -$arr["?a"]=$res4; - -$arr1["?a"]=$res5; - -$arr2["?a"]=$res6; - -$arr3["?a"]=$res7; - - - - - - - - -$result["rowcount"]=1; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-03.res deleted file mode 100755 index 4e2a40d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-03.res +++ /dev/null @@ -1,96 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); -$arr6 = array(); -$arr7 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res3; -$arr["?b"]=$res7; - - -$arr1["?x"]=$res2; -$arr1["?y"]=$res3; -$arr1["?z"]=$res7; -$arr1["?a"]=$res4; -$arr1["?b"]=$res8; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res4; -$arr2["?z"]=$res6; -$arr2["?a"]=$res3; -$arr2["?b"]=$res5; - -$arr3["?x"]=$res1; -$arr3["?y"]=$res4; -$arr3["?z"]=$res6; -$arr3["?a"]=$res4; -$arr3["?b"]=$res6; - -$arr4["?x"]=$res1; -$arr4["?y"]=$res3; -$arr4["?z"]=$res5; -$arr4["?a"]=$res3; -$arr4["?b"]=$res5; - -$arr5["?x"]=$res1; -$arr5["?y"]=$res3; -$arr5["?z"]=$res5; -$arr5["?a"]=$res4; -$arr5["?b"]=$res6; - -$arr6["?x"]=$res2; -$arr6["?y"]=$res4; -$arr6["?z"]=$res8; -$arr6["?a"]=$res3; -$arr6["?b"]=$res7; - -$arr7["?x"]=$res2; -$arr7["?y"]=$res4; -$arr7["?z"]=$res8; -$arr7["?a"]=$res4; -$arr7["?b"]=$res8; - - - - - - - - - -$result["rowcount"]=5; -$result["hits"]=8; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; -$result["part"][]=$arr6; -$result["part"][]=$arr7; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-04.res deleted file mode 100755 index d2b763b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-04.res +++ /dev/null @@ -1,62 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res3; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res4; -$arr1["?z"]=$res6; -$arr1["?a"]=$res4; - - -$arr2["?x"]=$res1; -$arr2["?y"]=$res3; -$arr2["?z"]=$res5; -$arr2["?a"]=$res3; - - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z"]=$res8; -$arr3["?a"]=$res4; - - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-05.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-05.res deleted file mode 100755 index effdf830..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-05.res +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-06.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-06.res deleted file mode 100755 index 23d0f2fb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-06.res +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-07.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-07.res deleted file mode 100755 index 88eb62d4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-07.res +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z1"]=$res7; -$arr["?z2"]=$res7; - -$arr1["?x"]=$res1; -$arr1["?y"]=$res4; -$arr1["?z1"]=$res6; -$arr1["?z2"]=$res6; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res3; -$arr2["?z1"]=$res5; -$arr2["?z2"]=$res5; - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z1"]=$res8; -$arr3["?z2"]=$res8; - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-08.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-08.res deleted file mode 100755 index 4749cb86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-08.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-09.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-09.res deleted file mode 100755 index a6f58122..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-09.res +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; -$arr["?a"]=$res7; - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; -$arr1["?a"]=$res5; - -$arr2["?x"]=$res1; -$arr2["?y"]=$res4; -$arr2["?z"]=$res6; -$arr2["?a"]=$res6; - -$arr3["?x"]=$res2; -$arr3["?y"]=$res4; -$arr3["?z"]=$res8; -$arr3["?a"]=$res8; - - - - - - -$result["rowcount"]=4; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-10.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-10.res deleted file mode 100755 index 520d96f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-2-10.res +++ /dev/null @@ -1,33 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-01.res deleted file mode 100755 index bc060485..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-01.res +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res4; -$arr["?z"]=$res6; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-02.res deleted file mode 100755 index c2714381..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-02.res +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res3; -$arr["?z"]=$res7; - - - -$arr1["?x"]=$res1; -$arr1["?y"]=$res3; -$arr1["?z"]=$res5; - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-03.res deleted file mode 100755 index 60c473b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-03.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res2; -$arr["?y"]=$res4; -$arr["?z"]=$res8; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-04.res deleted file mode 100755 index 3ba6edf8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-04.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-05.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-05.res deleted file mode 100755 index 3ba6edf8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-05.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=$res1; -$arr["?y"]=$res3; -$arr["?z"]=$res5; - - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-06.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-06.res deleted file mode 100755 index 54ac456d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-06.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/r-2"); -$res3 = new Resource("http://rdf.hp.com/p-1"); -$res4 = new Resource("http://rdf.hp.com/p-2"); - - -$res5 = new Literal("v-1-1"); -$res6 = new Literal("v-1-2"); -$res7 = new Literal("v-2-1"); -$res8 = new Literal("v-2-2"); - - - -$arr["?x"]=""; -$arr["?y"]=""; -$arr["?z"]=""; - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-07.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-07.res deleted file mode 100755 index 4f4d9df5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-3-07.res +++ /dev/null @@ -1,35 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); - - - -$res1 = new Blanknode("bNode1"); -$res2 = new Resource("http://never/bag"); -$res3 = new Literal("11"); -$res4 = new Literal("12"); -$res5 = new Literal("21"); -$res6 = new Literal("22"); - - - -$arr["?b"]=$res1; -$arr["?y"]=$res3; - -$arr1["?b"]=$res1; -$arr1["?y"]=$res4; - -$arr2["?b"]=$res2; -$arr2["?y"]=$res5; - -$arr3["?b"]=$res2; -$arr3["?y"]=$res6; - -$result["rowcount"]=2; -$result["hits"]=4; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-01.res deleted file mode 100755 index 141389f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-01.res +++ /dev/null @@ -1,83 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); -$arr5 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?b"]=$res2; -$arr["?z"]=$res3; -$arr["?c"]=$res4; -$arr["?d"]=$res5; - - -$arr1["?a"]=$res9; -$arr1["?b"]=$res2; -$arr1["?z"]=$res9; -$arr1["?c"]=$res2; -$arr1["?d"]=$res9; - - - -$arr2["?a"]=$res10; -$arr2["?b"]=$res11; -$arr2["?z"]=$res12; -$arr2["?c"]=$res13; -$arr2["?d"]=$res10; - - -$arr3["?a"]=$res12; -$arr3["?b"]=$res13; -$arr3["?z"]=$res10; -$arr3["?c"]=$res11; -$arr3["?d"]=$res12; - - -$arr4["?a"]=$res12; -$arr4["?b"]=$res13; -$arr4["?z"]=$res10; -$arr4["?c"]=$res14; -$arr4["?d"]=$res15; - -$arr5["?a"]=$res12; -$arr5["?b"]=$res13; -$arr5["?z"]=$res10; -$arr5["?c"]=$res14; -$arr5["?d"]=$res16; - - - -$result["rowcount"]=5; -$result["hits"]=6; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; -$result["part"][]=$arr5; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-02.res deleted file mode 100755 index 8bdc5cb0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-02.res +++ /dev/null @@ -1,48 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?z"]=$res3; -$arr["?d"]=$res5; - - -$arr1["?a"]=$res9; -$arr1["?z"]=$res9; -$arr1["?d"]=$res9; - - - - - - - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-03.res deleted file mode 100755 index ace4ea03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-03.res +++ /dev/null @@ -1,42 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/s1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/s2"); -$res4 = new Resource("http://rdf.hp.com/p"); - - -$res5 = new Literal("Value"); - - -$res9 = new Resource("http://rdf.hp.com/r"); -$res10 = new Resource("http://rdf.hp.com/r-2"); -$res11 = new Resource("http://rdf.hp.com/p-r-2-1"); -$res12 = new Resource("http://rdf.hp.com/r-1"); -$res13 = new Resource("http://rdf.hp.com/p-r-1-2"); -$res14 = new Resource("http://rdf.hp.com/p-r-2-3"); -$res15 = new Resource("http://rdf.hp.com/r-3a"); -$res16 = new Resource("http://rdf.hp.com/r-3b"); - - -$arr["?a"]=$res1; -$arr["?b"]=$res2; - - - - - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-04.res deleted file mode 100755 index 19a23e72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-04.res +++ /dev/null @@ -1,17 +0,0 @@ -$result = array(); - - - - - - - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-05.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-05.res deleted file mode 100755 index 1564b417..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-05.res +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); - - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?y"]=$res2; -$arr["?a"]=$res1; -$arr["?b"]=$res5; - - -$arr1["?y"]=$res2; -$arr1["?a"]=$res3; -$arr1["?b"]=$res9; - - - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-06.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-06.res deleted file mode 100755 index e0eadce1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-06.res +++ /dev/null @@ -1,68 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); -$arr2 = array(); -$arr3 = array(); -$arr4 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); -$res4 = new Blanknode("bNode1"); -$res6 = new Blanknode("bNode2"); - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?x"] =$res4; -$arr["?p1"]=$res3; -$arr["?v1"]=$res9; -$arr["?y"] =$res4; -$arr["?p2"]=$res3; -$arr["?v2"]=$res9; - - -$arr1["?x"] =$res4; -$arr1["?p1"]=$res3; -$arr1["?v1"]=$res9; -$arr1["?y"] =$res4; -$arr1["?p2"]=$res1; -$arr1["?v2"]=$res5; - -$arr2["?x"] =$res4; -$arr2["?p1"]=$res1; -$arr2["?v1"]=$res5; -$arr2["?y"] =$res4; -$arr2["?p2"]=$res3; -$arr2["?v2"]=$res9; - - -$arr3["?x"] =$res4; -$arr3["?p1"]=$res1; -$arr3["?v1"]=$res5; -$arr3["?y"] =$res4; -$arr3["?p2"]=$res1; -$arr3["?v2"]=$res5; - -$arr4["?x"] =$res6; -$arr4["?p1"]=$res2; -$arr4["?v1"]=$res4; -$arr4["?y"] =$res6; -$arr4["?p2"]=$res2; -$arr4["?v2"]=$res4; - -$result["rowcount"]=6; -$result["hits"]=5; -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-07.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-07.res deleted file mode 100755 index 0784cbea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-4-07.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p1"); -$res2 = new Resource("http://rdf.hp.com/p"); -$res3 = new Resource("http://rdf.hp.com/p2"); -$res4 = new Blanknode("bNode1"); -$res6 = new Blanknode("bNode2"); - - -$res5 = new Literal("v-a-1"); - - -$res9 = new Literal("v-a-2"); - -$arr["?x"] =$res4; -$arr["?y"] =$res4; - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-01.res deleted file mode 100755 index 714712c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-01.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; -$arr["?z"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?z"] =$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-02.res deleted file mode 100755 index 93f480e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-02.res +++ /dev/null @@ -1,20 +0,0 @@ -$result = array(); -$arr = array(); - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-03.res deleted file mode 100755 index 952f0363..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-03.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Resource("http://rdf.hp.com/uri-r"); -$res3 = new Resource("http://rdf.hp.com/uri-p"); - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - -$arr1["?z"] =$res2; -$arr1["?x"] =$res3; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-04.res deleted file mode 100755 index 23c85c0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-5-04.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); - - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-01.res deleted file mode 100755 index 714712c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-01.res +++ /dev/null @@ -1,26 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; -$arr["?z"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?z"] =$res1; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-02.res deleted file mode 100755 index 27409d4a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-02.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Literal("R==P"); - - - - - - -$arr["?x"] =$res1; - - -$result["rowcount"]=1; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-03.res deleted file mode 100755 index 952f0363..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-03.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); -$res2 = new Resource("http://rdf.hp.com/uri-r"); -$res3 = new Resource("http://rdf.hp.com/uri-p"); - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - -$arr1["?z"] =$res2; -$arr1["?x"] =$res3; - - -$result["rowcount"]=2; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-04.res deleted file mode 100755 index 23c85c0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-6-04.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/uri1"); - - - - - - - -$arr["?z"] =$res1; -$arr["?x"] =$res1; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-01.res deleted file mode 100755 index 8d07985a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-01.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r1"); -$res2 = new Resource("http://rdf.hp.com/r2"); - - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res1; -$arr["?a"] =$res2; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res2; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-02.res deleted file mode 100755 index 1745d719..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-02.res +++ /dev/null @@ -1,32 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r1"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Literal("r-2-1"); -$res4 = new Literal("r-1-2"); - - - - -$arr["?y"] =$res2; -$arr["?a"] =$res1; -$arr["?b"] =$res3; -$arr["?x"] =$res1; -$arr["?z"] =$res4; - -$arr1["?y"] =$res1; -$arr1["?a"] =$res2; -$arr1["?b"] =$res4; -$arr1["?x"] =$res2; -$arr1["?z"] =$res3; - - -$result["rowcount"]=5; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-03.res deleted file mode 100755 index 5e331618..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-03.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Blanknode("bNode1"); -$res4 = new Literal("r-1-2"); - - - -$arr["?x"] =$res3; -$arr["?y"] =$res1; -$arr["?a"] =$res1; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res1; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-04.res deleted file mode 100755 index 5e331618..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-7-04.res +++ /dev/null @@ -1,27 +0,0 @@ -$result = array(); -$arr = array(); -$arr1 = array(); - - - -$res1 = new Resource("http://rdf.hp.com/p"); -$res2 = new Resource("http://rdf.hp.com/r2"); -$res3 = new Blanknode("bNode1"); -$res4 = new Literal("r-1-2"); - - - -$arr["?x"] =$res3; -$arr["?y"] =$res1; -$arr["?a"] =$res1; - -$arr1["?x"] =$res1; -$arr1["?y"] =$res1; -$arr1["?a"] =$res1; - - -$result["rowcount"]=3; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-01.res deleted file mode 100755 index afcb702c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-01.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Literal("v-1-1"); - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; -$arr["?z"] =$res3; - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-02.res deleted file mode 100755 index afcb702c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-9-02.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); -$arr = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r-1"); -$res2 = new Resource("http://rdf.hp.com/p-1"); -$res3 = new Literal("v-1-1"); - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; -$arr["?z"] =$res3; - - - - -$result["rowcount"]=3; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-01.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-01.res deleted file mode 100755 index 72ea27a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-01.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-02.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-02.res deleted file mode 100755 index 7425c2de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-02.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-03.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-03.res deleted file mode 100755 index 802e22df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-03.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=0; -$result["hits"]=0; -$result["part"][]=null; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-04.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-04.res deleted file mode 100755 index 72ea27a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-04.res +++ /dev/null @@ -1,21 +0,0 @@ -$result = array(); - - - -$res1 = new Resource("http://rdf.hp.com/r"); -$res2 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res1; -$arr["?y"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; -$result["part"][]=$arr; - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-05.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-05.res deleted file mode 100755 index 9b7ca1d5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-05.res +++ /dev/null @@ -1,24 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res2 = new Literal("value"); - - -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#string"); -$res2->setDatatype("http://rdf.hp.com/ns#someType"); - - -$arr["?z"] =$res1; - -$arr1["?z"] =$res2; - - - - -$result["rowcount"]=1; -$result["hits"]=2; -$result["part"][]=$arr; -$result["part"][]=$arr1; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-08.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-08.res deleted file mode 100755 index d33920a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-08.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-09.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-09.res deleted file mode 100755 index cd7a2b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-09.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p1"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-10.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-10.res deleted file mode 100755 index ee671d9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-10.res +++ /dev/null @@ -1,23 +0,0 @@ -$result = array(); - - - - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p8"); - - - - -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-11.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-11.res deleted file mode 100755 index df81e1ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-11.res +++ /dev/null @@ -1,54 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?z"] =$res1; -$arr["?x"] =$res2; -$arr["?y"] =$res3; - -$arr1["?z"] =$res8; -$arr1["?x"] =$res2; -$arr1["?y"] =$res7; - -$arr2["?z"] =$res4; -$arr2["?x"] =$res2; -$arr2["?y"] =$res9; - -$arr3["?z"] =$res6; -$arr3["?x"] =$res2; -$arr3["?y"] =$res3; - -$arr4["?z"] =$res5; -$arr4["?x"] =$res2; -$arr4["?y"] =$res10; - -$result["rowcount"]=3; -$result["hits"]=5; - -$result["part"][]=$arr; -$result["part"][]=$arr1; -$result["part"][]=$arr2; -$result["part"][]=$arr3; -$result["part"][]=$arr4; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-12.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-12.res deleted file mode 100755 index eeaf10e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-12.res +++ /dev/null @@ -1,37 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p2"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?y"] =$res3; -$arr["?z"] =$res1; -$arr["?x"] =$res2; - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-13.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-13.res deleted file mode 100755 index f46fdedf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-13.res +++ /dev/null @@ -1,36 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("value"); -$res1->setLanguage("en"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p4"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-15.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-15.res deleted file mode 100755 index e5e7ad79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-15.res +++ /dev/null @@ -1,38 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p4"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?v"] =$res1; -$arr["?x"] =$res2; -$arr["?y"] =$res3; - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-17.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-17.res deleted file mode 100755 index 6be60023..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-17.res +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#integer"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p7"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr = array(); -$arr["?x"] = $res2; -$arr["?y"] = $res3; - - - - - - -$result["rowcount"]=1; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-18.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-18.res deleted file mode 100755 index 31f6abf3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-18.res +++ /dev/null @@ -1,40 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("true"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p6"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr = array(); -$arr["?v"] = $res1; -$arr["?y"] = $res3; -$arr["?x"] = $res2; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-19.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-19.res deleted file mode 100755 index 25808c7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-19.res +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("true"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#boolean"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p5"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - - -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - - - -$result["rowcount"]=2; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-20.res b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-20.res deleted file mode 100755 index 35fe5fce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/result/test-B-20.res +++ /dev/null @@ -1,39 +0,0 @@ -$result = array(); - - - -$res1 = new Literal("5.7"); -$res1->setDatatype("http://www.w3.org/2001/XMLSchema#double"); - -$res2 = new Resource("http://rdf.hp.com/r"); -$res3 = new Resource("http://rdf.hp.com/p5"); - -$res4 = new Literal("value"); -$res4->setDatatype("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"); - -$res5 = new Literal("value"); -$res5->setDatatype("http://rdf.hp.com/ns#someType"); - -$res6 = new Literal("value"); -$res6->setLanguage("zz"); - -$res7 = new Resource("http://rdf.hp.com/p3"); -$res8 = new Literal("value"); - -$res9 = new Resource("http://rdf.hp.com/p8"); - -$res10 = new Resource("http://rdf.hp.com/p1"); - -$arr["?v"] =$res1; -$arr["?y"] =$res3; -$arr["?x"] =$res2; - - - - - - -$result["rowcount"]=3; -$result["hits"]=1; - -$result["part"][]=$arr; diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/all-wcprops deleted file mode 100755 index 40c57b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 76 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2 -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/entries deleted file mode 100755 index c5e9866e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/entries +++ /dev/null @@ -1,31 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -data-r2 -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/all-wcprops deleted file mode 100755 index 340555e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/all-wcprops +++ /dev/null @@ -1,53 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2 -END -LICENSE -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/LICENSE -END -foo -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/foo -END -files-to-fix -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/files-to-fix -END -algebra-expressions.txt -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra-expressions.txt -END -extended-manifest-evaluation.ttl -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/extended-manifest-evaluation.ttl -END -manifest-syntax.ttl -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/manifest-syntax.ttl -END -manifest-evaluation.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/manifest-evaluation.ttl -END -README -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/README -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/entries deleted file mode 100755 index b7c0a84e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/entries +++ /dev/null @@ -1,211 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -basic -dir - -distinct -dir - -construct -dir - -optional -dir - -dataset -dir - -open-world -dir - -triple-match -dir - -algebra-expressions.txt -file - - - - -2008-02-29T14:57:25.371866Z -d1f2ba15d0a29cb9acfa2127893a260a -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest-syntax.ttl -file - - - - -2008-02-29T14:57:25.387487Z -5b34ebc439a2767942afdc9020e3cbb4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph -dir - -optional-filter -dir - -regex -dir - -manifest-evaluation.ttl -file - - - - -2008-02-29T14:57:25.387487Z -7bb4bb26478697065018b6b7981ccf32 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask -dir - -i18n -dir - -expr-builtin -dir - -LICENSE -file - - - - -2008-02-29T14:57:25.387487Z -306f4f74832408db0935c6eec0f6fe1b -2007-09-20T07:35:41.061956Z -540 -cweiske - -foo -file - - - - -2008-02-29T14:57:25.403107Z -5c44c9e90b9f5f0a3bf61d5d7e2381cd -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax -dir - -boolean-effective-value -dir - -sort -dir - -cast -dir - -algebra -dir - -README -file - - - - -2008-02-29T14:57:25.403107Z -1788396506bfbb9165b4a1b9c919288c -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice -dir - -solution-seq -dir - -type-promotion -dir - -bnode-coreference -dir - -expr-equals -dir - -files-to-fix -file - - - - -2008-02-29T14:57:25.403107Z -958363aa072419754f8c2e7bc365ffd1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -bound -dir - -syntax-sparql1 -dir - -syntax-sparql2 -dir - -syntax-sparql3 -dir - -syntax-sparql4 -dir - -extended-manifest-evaluation.ttl -file - - - - -2008-02-29T14:57:25.418728Z -d17513f60581ef3ceee5cb5ca5e55747 -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-ops -dir - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/LICENSE.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/LICENSE.svn-base deleted file mode 100755 index eaa1cbaa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/LICENSE.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -All tests materials are licensed under the W3C Software Notice and License, as follows: -____________________________________ -W3C SOFTWARE NOTICE AND LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - -This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications: - - 1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. - 2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code. - 3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. - -The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. - -____________________________________ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/README.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/README.svn-base deleted file mode 100755 index 94f9013d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/README.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -Data Access Working Group SPARQL Query Language test suite reorganization - -This directory contains restructured copies of tests from -the DAWG test suite (available at -http://www.w3.org/2001/sw/DataAccess/tests/data/). The purpose of this -restructuring is to enhance usability, clear away obsolete tests and -provide an up-to-date, consistent and easy to use suite of test cases -that SPARQL query language implementors can use to evaluate their -implementation. - - -The Working Group decided -(http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html#item05) -on 21 Aug 2007 that the tests as-is constitute a test suite that the group will -use to generate an implementation report for the SPARQL Query Language for -RDF. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/algebra-expressions.txt.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/algebra-expressions.txt.svn-base deleted file mode 100755 index 896cb0df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/algebra-expressions.txt.svn-base +++ /dev/null @@ -1,112 +0,0 @@ - I. LeftJoin(BGP(..),{..}) - II. Join(BGP(..),Graph(varOrIRI,{..})) - III. Join(BGP(..),Union(..,..)) - IV. Graph(varOrIRI,{..}) - V. LeftJoin({},{..}) - VI. Union(..,..) - VII. BGP(..) - Join(I.,I.) => Join(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) - Union(I.,I.) => Union(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) -LeftJoin(I.,I.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) - Join(I.,II.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) - Union(I.,II.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(I.,II.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(I.,III.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) - Union(I.,III.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) -LeftJoin(I.,III.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) - Join(I.,IV.) => Join(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) - Union(I.,IV.) => Union(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) -LeftJoin(I.,IV.) => LeftJoin(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) - Join(I.,V.) => Join(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) - Union(I.,V.) => Union(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) -LeftJoin(I.,V.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) - Join(I.,VI.) => Join(LeftJoin(BGP(..),{..}),Union(..,..)) - Union(I.,VI.) => Union(LeftJoin(BGP(..),{..}),Union(..,..)) -LeftJoin(I.,VI.) => LeftJoin(LeftJoin(BGP(..),{..}),Union(..,..)) - Join(I.,VII.) => Join(LeftJoin(BGP(..),{..}),BGP(..)) - Union(I.,VII.) => Union(LeftJoin(BGP(..),{..}),BGP(..)) -LeftJoin(I.,VII.) => LeftJoin(LeftJoin(BGP(..),{..}),BGP(..)) -LeftJoin(II.,I.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin(BGP(..),{..})) - Join(II.,II.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) - Union(II.,II.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(II.,II.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(II.,III.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) - Union(II.,III.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) -LeftJoin(II.,III.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) - Join(II.,IV.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) - Union(II.,IV.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) -LeftJoin(II.,IV.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) - Join(II.,V.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) - Union(II.,V.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) -LeftJoin(II.,V.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) - Join(II.,VI.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) - Union(II.,VI.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) -LeftJoin(II.,VI.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) - Join(II.,VII.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) - Union(II.,VII.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) -LeftJoin(II.,VII.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) -LeftJoin(III.,I.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin(BGP(..),{..})) -LeftJoin(III.,II.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(III.,III.) => Join(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) - Union(III.,III.) => Union(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) -LeftJoin(III.,III.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) - Join(III.,IV.) => Join(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) - Union(III.,IV.) => Union(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) -LeftJoin(III.,IV.) => LeftJoin(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) - Join(III.,V.) => Join(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) - Union(III.,V.) => Union(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) -LeftJoin(III.,V.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) - Join(III.,VI.) => Join(Join(BGP(..),Union(..,..)),Union(..,..)) - Union(III.,VI.) => Union(Join(BGP(..),Union(..,..)),Union(..,..)) -LeftJoin(III.,VI.) => LeftJoin(Join(BGP(..),Union(..,..)),Union(..,..)) - Join(III.,VII.) => Join(Join(BGP(..),Union(..,..)),BGP(..)) - Union(III.,VII.) => Union(Join(BGP(..),Union(..,..)),BGP(..)) -LeftJoin(III.,VII.) => LeftJoin(Join(BGP(..),Union(..,..)),BGP(..)) -LeftJoin(IV.,I.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin(BGP(..),{..})) -LeftJoin(IV.,II.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(IV.,III.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Union(..,..))) - Join(IV.,IV.) => Join(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) - Union(IV.,IV.) => Union(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) -LeftJoin(IV.,IV.) => LeftJoin(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) - Join(IV.,V.) => Join(Graph(varOrIRI,{..}),LeftJoin({},{..})) - Union(IV.,V.) => Union(Graph(varOrIRI,{..}),LeftJoin({},{..})) -LeftJoin(IV.,V.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin({},{..})) - Join(IV.,VI.) => Join(Graph(varOrIRI,{..}),Union(..,..)) - Union(IV.,VI.) => Union(Graph(varOrIRI,{..}),Union(..,..)) -LeftJoin(IV.,VI.) => LeftJoin(Graph(varOrIRI,{..}),Union(..,..)) - Join(IV.,VII.) => Join(Graph(varOrIRI,{..}),BGP(..)) - Union(IV.,VII.) => Union(Graph(varOrIRI,{..}),BGP(..)) -LeftJoin(IV.,VII.) => LeftJoin(Graph(varOrIRI,{..}),BGP(..)) -LeftJoin(V.,I.) => LeftJoin(LeftJoin({},{..}),LeftJoin(BGP(..),{..})) -LeftJoin(V.,II.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(V.,III.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Union(..,..))) -LeftJoin(V.,IV.) => LeftJoin(LeftJoin({},{..}),Graph(varOrIRI,{..})) - Join(V.,V.) => Join(LeftJoin({},{..}),LeftJoin({},{..})) - Union(V.,V.) => Union(LeftJoin({},{..}),LeftJoin({},{..})) -LeftJoin(V.,V.) => LeftJoin(LeftJoin({},{..}),LeftJoin({},{..})) - Join(V.,VI.) => Join(LeftJoin({},{..}),Union(..,..)) - Union(V.,VI.) => Union(LeftJoin({},{..}),Union(..,..)) -LeftJoin(V.,VI.) => LeftJoin(LeftJoin({},{..}),Union(..,..)) - Join(V.,VII.) => Join(LeftJoin({},{..}),BGP(..)) - Union(V.,VII.) => Union(LeftJoin({},{..}),BGP(..)) -LeftJoin(V.,VII.) => LeftJoin(LeftJoin({},{..}),BGP(..)) -LeftJoin(VI.,I.) => LeftJoin(Union(..,..),LeftJoin(BGP(..),{..})) -LeftJoin(VI.,II.) => LeftJoin(Union(..,..),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(VI.,III.) => LeftJoin(Union(..,..),Join(BGP(..),Union(..,..))) -LeftJoin(VI.,IV.) => LeftJoin(Union(..,..),Graph(varOrIRI,{..})) -LeftJoin(VI.,V.) => LeftJoin(Union(..,..),LeftJoin({},{..})) - Join(VI.,VI.) => Join(Union(..,..),Union(..,..)) - Union(VI.,VI.) => Union(Union(..,..),Union(..,..)) -LeftJoin(VI.,VI.) => LeftJoin(Union(..,..),Union(..,..)) - Join(VI.,VII.) => Join(Union(..,..),BGP(..)) - Union(VI.,VII.) => Union(Union(..,..),BGP(..)) -LeftJoin(VI.,VII.) => LeftJoin(Union(..,..),BGP(..)) -LeftJoin(VII.,I.) => LeftJoin(BGP(..),LeftJoin(BGP(..),{..})) -LeftJoin(VII.,II.) => LeftJoin(BGP(..),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(VII.,III.) => LeftJoin(BGP(..),Join(BGP(..),Union(..,..))) -LeftJoin(VII.,IV.) => LeftJoin(BGP(..),Graph(varOrIRI,{..})) -LeftJoin(VII.,V.) => LeftJoin(BGP(..),LeftJoin({},{..})) -LeftJoin(VII.,VI.) => LeftJoin(BGP(..),Union(..,..)) - Join(VII.,VII.) => Join(BGP(..),BGP(..)) - Union(VII.,VII.) => Union(BGP(..),BGP(..)) -LeftJoin(VII.,VII.) => LeftJoin(BGP(..),BGP(..)) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/extended-manifest-evaluation.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/extended-manifest-evaluation.ttl.svn-base deleted file mode 100755 index c3da1c07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/extended-manifest-evaluation.ttl.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: extended-manifest-evaluation.ttl,v 1.2 2007/08/12 15:32:34 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Extended SPARQL Query Evaluation tests" ; - mf:include ( - - ). - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/files-to-fix.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/files-to-fix.svn-base deleted file mode 100755 index 90502f05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/files-to-fix.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -construct/result-construct-optional.ttl -dataset/dataset-01.ttl -dataset/dataset-03.ttl -dataset/dataset-05.ttl -dataset/dataset-06.ttl -dataset/dataset-07.ttl -dataset/dataset-08.ttl -dataset/dataset-11.ttl -dataset/dataset-12.ttl -expr-builtin/result-str-1.ttl -expr-builtin/result-str-2.ttl -expr-equals/result-eq2-1.ttl -expr-equals/result-eq2-graph-1.ttl -graph/graph-01.ttl -graph/graph-03.ttl -graph/graph-05.ttl -graph/graph-06.ttl -graph/graph-07.ttl -graph/graph-08.ttl -graph/graph-11.ttl -i18n/kanji.ttl -i18n/normalization-01.ttl -optional-filter/data-1.ttl -optional-filter/expr-1-result.ttl -optional-filter/expr-2-result.ttl -optional-filter/expr-3-result.ttl -solution-seq/slice-results-01.ttl -solution-seq/slice-results-02.ttl -solution-seq/slice-results-04.ttl -solution-seq/slice-results-10.ttl -solution-seq/slice-results-11.ttl -solution-seq/slice-results-13.ttl -solution-seq/slice-results-20.ttl -solution-seq/slice-results-21.ttl -solution-seq/slice-results-23.ttl -solution-seq/slice-results-24.ttl -sort/data-sort-6.ttl diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/foo.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/foo.svn-base deleted file mode 100755 index 31ae8e31..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/foo.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -feoiwf - 4 - -121 fjewofowsss diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-evaluation.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-evaluation.ttl.svn-base deleted file mode 100755 index 60f391d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-evaluation.ttl.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "SPARQL Query Evaluation tests" ; - mf:include ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - ). - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-syntax.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-syntax.ttl.svn-base deleted file mode 100755 index 094e27e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/.svn/text-base/manifest-syntax.ttl.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "SPARQL Syntax Tests" ; - mf:include ( - - - - - ) . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/LICENSE b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/LICENSE deleted file mode 100755 index eaa1cbaa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -All tests materials are licensed under the W3C Software Notice and License, as follows: -____________________________________ -W3C SOFTWARE NOTICE AND LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - -This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications: - - 1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. - 2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code. - 3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. - -The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. - -____________________________________ - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/README b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/README deleted file mode 100755 index 94f9013d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/README +++ /dev/null @@ -1,16 +0,0 @@ -Data Access Working Group SPARQL Query Language test suite reorganization - -This directory contains restructured copies of tests from -the DAWG test suite (available at -http://www.w3.org/2001/sw/DataAccess/tests/data/). The purpose of this -restructuring is to enhance usability, clear away obsolete tests and -provide an up-to-date, consistent and easy to use suite of test cases -that SPARQL query language implementors can use to evaluate their -implementation. - - -The Working Group decided -(http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html#item05) -on 21 Aug 2007 that the tests as-is constitute a test suite that the group will -use to generate an implementation report for the SPARQL Query Language for -RDF. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra-expressions.txt b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra-expressions.txt deleted file mode 100755 index 896cb0df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra-expressions.txt +++ /dev/null @@ -1,112 +0,0 @@ - I. LeftJoin(BGP(..),{..}) - II. Join(BGP(..),Graph(varOrIRI,{..})) - III. Join(BGP(..),Union(..,..)) - IV. Graph(varOrIRI,{..}) - V. LeftJoin({},{..}) - VI. Union(..,..) - VII. BGP(..) - Join(I.,I.) => Join(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) - Union(I.,I.) => Union(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) -LeftJoin(I.,I.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..})) - Join(I.,II.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) - Union(I.,II.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(I.,II.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(I.,III.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) - Union(I.,III.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) -LeftJoin(I.,III.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) - Join(I.,IV.) => Join(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) - Union(I.,IV.) => Union(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) -LeftJoin(I.,IV.) => LeftJoin(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..})) - Join(I.,V.) => Join(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) - Union(I.,V.) => Union(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) -LeftJoin(I.,V.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin({},{..})) - Join(I.,VI.) => Join(LeftJoin(BGP(..),{..}),Union(..,..)) - Union(I.,VI.) => Union(LeftJoin(BGP(..),{..}),Union(..,..)) -LeftJoin(I.,VI.) => LeftJoin(LeftJoin(BGP(..),{..}),Union(..,..)) - Join(I.,VII.) => Join(LeftJoin(BGP(..),{..}),BGP(..)) - Union(I.,VII.) => Union(LeftJoin(BGP(..),{..}),BGP(..)) -LeftJoin(I.,VII.) => LeftJoin(LeftJoin(BGP(..),{..}),BGP(..)) -LeftJoin(II.,I.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin(BGP(..),{..})) - Join(II.,II.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) - Union(II.,II.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(II.,II.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(II.,III.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) - Union(II.,III.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) -LeftJoin(II.,III.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..))) - Join(II.,IV.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) - Union(II.,IV.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) -LeftJoin(II.,IV.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..})) - Join(II.,V.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) - Union(II.,V.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) -LeftJoin(II.,V.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..})) - Join(II.,VI.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) - Union(II.,VI.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) -LeftJoin(II.,VI.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..)) - Join(II.,VII.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) - Union(II.,VII.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) -LeftJoin(II.,VII.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..)) -LeftJoin(III.,I.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin(BGP(..),{..})) -LeftJoin(III.,II.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..}))) - Join(III.,III.) => Join(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) - Union(III.,III.) => Union(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) -LeftJoin(III.,III.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..))) - Join(III.,IV.) => Join(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) - Union(III.,IV.) => Union(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) -LeftJoin(III.,IV.) => LeftJoin(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..})) - Join(III.,V.) => Join(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) - Union(III.,V.) => Union(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) -LeftJoin(III.,V.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin({},{..})) - Join(III.,VI.) => Join(Join(BGP(..),Union(..,..)),Union(..,..)) - Union(III.,VI.) => Union(Join(BGP(..),Union(..,..)),Union(..,..)) -LeftJoin(III.,VI.) => LeftJoin(Join(BGP(..),Union(..,..)),Union(..,..)) - Join(III.,VII.) => Join(Join(BGP(..),Union(..,..)),BGP(..)) - Union(III.,VII.) => Union(Join(BGP(..),Union(..,..)),BGP(..)) -LeftJoin(III.,VII.) => LeftJoin(Join(BGP(..),Union(..,..)),BGP(..)) -LeftJoin(IV.,I.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin(BGP(..),{..})) -LeftJoin(IV.,II.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(IV.,III.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Union(..,..))) - Join(IV.,IV.) => Join(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) - Union(IV.,IV.) => Union(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) -LeftJoin(IV.,IV.) => LeftJoin(Graph(varOrIRI,{..}),Graph(varOrIRI,{..})) - Join(IV.,V.) => Join(Graph(varOrIRI,{..}),LeftJoin({},{..})) - Union(IV.,V.) => Union(Graph(varOrIRI,{..}),LeftJoin({},{..})) -LeftJoin(IV.,V.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin({},{..})) - Join(IV.,VI.) => Join(Graph(varOrIRI,{..}),Union(..,..)) - Union(IV.,VI.) => Union(Graph(varOrIRI,{..}),Union(..,..)) -LeftJoin(IV.,VI.) => LeftJoin(Graph(varOrIRI,{..}),Union(..,..)) - Join(IV.,VII.) => Join(Graph(varOrIRI,{..}),BGP(..)) - Union(IV.,VII.) => Union(Graph(varOrIRI,{..}),BGP(..)) -LeftJoin(IV.,VII.) => LeftJoin(Graph(varOrIRI,{..}),BGP(..)) -LeftJoin(V.,I.) => LeftJoin(LeftJoin({},{..}),LeftJoin(BGP(..),{..})) -LeftJoin(V.,II.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(V.,III.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Union(..,..))) -LeftJoin(V.,IV.) => LeftJoin(LeftJoin({},{..}),Graph(varOrIRI,{..})) - Join(V.,V.) => Join(LeftJoin({},{..}),LeftJoin({},{..})) - Union(V.,V.) => Union(LeftJoin({},{..}),LeftJoin({},{..})) -LeftJoin(V.,V.) => LeftJoin(LeftJoin({},{..}),LeftJoin({},{..})) - Join(V.,VI.) => Join(LeftJoin({},{..}),Union(..,..)) - Union(V.,VI.) => Union(LeftJoin({},{..}),Union(..,..)) -LeftJoin(V.,VI.) => LeftJoin(LeftJoin({},{..}),Union(..,..)) - Join(V.,VII.) => Join(LeftJoin({},{..}),BGP(..)) - Union(V.,VII.) => Union(LeftJoin({},{..}),BGP(..)) -LeftJoin(V.,VII.) => LeftJoin(LeftJoin({},{..}),BGP(..)) -LeftJoin(VI.,I.) => LeftJoin(Union(..,..),LeftJoin(BGP(..),{..})) -LeftJoin(VI.,II.) => LeftJoin(Union(..,..),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(VI.,III.) => LeftJoin(Union(..,..),Join(BGP(..),Union(..,..))) -LeftJoin(VI.,IV.) => LeftJoin(Union(..,..),Graph(varOrIRI,{..})) -LeftJoin(VI.,V.) => LeftJoin(Union(..,..),LeftJoin({},{..})) - Join(VI.,VI.) => Join(Union(..,..),Union(..,..)) - Union(VI.,VI.) => Union(Union(..,..),Union(..,..)) -LeftJoin(VI.,VI.) => LeftJoin(Union(..,..),Union(..,..)) - Join(VI.,VII.) => Join(Union(..,..),BGP(..)) - Union(VI.,VII.) => Union(Union(..,..),BGP(..)) -LeftJoin(VI.,VII.) => LeftJoin(Union(..,..),BGP(..)) -LeftJoin(VII.,I.) => LeftJoin(BGP(..),LeftJoin(BGP(..),{..})) -LeftJoin(VII.,II.) => LeftJoin(BGP(..),Join(BGP(..),Graph(varOrIRI,{..}))) -LeftJoin(VII.,III.) => LeftJoin(BGP(..),Join(BGP(..),Union(..,..))) -LeftJoin(VII.,IV.) => LeftJoin(BGP(..),Graph(varOrIRI,{..})) -LeftJoin(VII.,V.) => LeftJoin(BGP(..),LeftJoin({},{..})) -LeftJoin(VII.,VI.) => LeftJoin(BGP(..),Union(..,..)) - Join(VII.,VII.) => Join(BGP(..),BGP(..)) - Union(VII.,VII.) => Union(BGP(..),BGP(..)) -LeftJoin(VII.,VII.) => LeftJoin(BGP(..),BGP(..)) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/all-wcprops deleted file mode 100755 index b7c8745c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/all-wcprops +++ /dev/null @@ -1,239 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra -END -opt-filter-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.ttl -END -filter-nested-2.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.rq -END -opt-filter-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.ttl -END -opt-filter-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.ttl -END -two-nested-opt.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.ttl -END -opt-filter-1.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.srx -END -opt-filter-2.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.srx -END -opt-filter-3.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.srx -END -opt-filter-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl.bak -END -two-nested-opt.srx -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.srx -END -join-combo-1.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.srx -END -opt-filter-3.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.rq -END -join-combo-2.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.srx -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl -END -data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-1.ttl -END -two-nested-opt.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.rq -END -data-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-2.ttl -END -var-scope-join-1.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.rq -END -filter-scope-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.rq -END -filter-placement-2.rq -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.rq -END -join-combo-2.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.rq -END -filter-nested-1.srx -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.srx -END -filter-nested-2.srx -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.srx -END -two-nested-opt-alt.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx -END -filter-nested-1.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.rq -END -two-nested-opt-alt.rq -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq -END -join-combo-graph-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-1.ttl -END -var-scope-join-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl -END -join-combo-graph-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl -END -filter-placement-1.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.srx -END -opt-filter-2.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.rq -END -filter-placement-2.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.srx -END -filter-scope-1.srx -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.srx -END -var-scope-join-1.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.srx -END -filter-placement-3.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.srx -END -filter-placement-1.rq -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.rq -END -join-combo-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.rq -END -filter-placement-3.rq -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/entries deleted file mode 100755 index bacdab86..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/entries +++ /dev/null @@ -1,496 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -opt-filter-1.ttl -file - - - - -2008-02-29T14:57:19.607865Z -ddf9e2e265cf68b4c9cab575b4f2b112 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-nested-2.rq -file - - - - -2008-02-29T14:57:19.607865Z -cf9b31bdc579ef666e488ec4f4a232de -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-2.ttl -file - - - - -2008-02-29T14:57:19.623485Z -ddf9e2e265cf68b4c9cab575b4f2b112 -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-3.ttl -file - - - - -2008-02-29T14:57:19.639106Z -ddf9e2e265cf68b4c9cab575b4f2b112 -2007-09-20T07:35:41.061956Z -540 -cweiske - -two-nested-opt.ttl -file - - - - -2008-02-29T14:57:19.639106Z -581ea1c9237e8e365984dc1d3e6ea4c7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-1.srx -file - - - - -2008-02-29T14:57:19.654727Z -6a461631b22c005b2eec93e2b8534404 -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-2.srx -file - - - - -2008-02-29T14:57:19.654727Z -6e59f01c1e55ed7a5ecf3b7a5e37b105 -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-3.srx -file - - - - -2008-02-29T14:57:19.654727Z -3bdf84032f485f1dbefe8b2c3e0374fa -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-1.rq -file - - - - -2008-02-29T14:57:19.670347Z -756ce3440251fcb898951c15d2024434 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:19.670347Z -b470a433498674b8fe50c2619549def6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -two-nested-opt.srx -file - - - - -2008-02-29T14:57:19.670347Z -ef8717f9a272758f703c4c30f1bf2e61 -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-1.srx -file - - - - -2008-02-29T14:57:19.685968Z -6a8fa1da77706a9ac3dc53f921d96e0e -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-3.rq -file - - - - -2008-02-29T14:57:19.685968Z -595e7393f8a3f517bbe4cba874712e0e -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-2.srx -file - - - - -2008-02-29T14:57:19.701588Z -c8ee76d93c57bb0222db36fc16d3e7f9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:19.701588Z -5243c49406e4966e3ee2b3071caf73f2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-1.ttl -file - - - - -2008-02-29T14:57:19.717209Z -69b13071a508708fb9dbd667bad13fb7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -two-nested-opt.rq -file - - - - -2008-02-29T14:57:19.717209Z -a2e89fc2230429a097651c491e5f8cef -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-2.ttl -file - - - - -2008-02-29T14:57:19.717209Z -b55887e88611e1e7f9acbf567999510c -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-scope-join-1.rq -file - - - - -2008-02-29T14:57:19.732830Z -2c2b1104bb29dac2a28e34e0c3751a3a -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-scope-1.rq -file - - - - -2008-02-29T14:57:19.732830Z -fcbb89706dc6f081eda1d3a6d529a50f -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-2.rq -file - - - - -2008-02-29T14:57:19.732830Z -6897b5853130289bfaa359a427a61c94 -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-2.rq -file - - - - -2008-02-29T14:57:19.748450Z -c4fdb028d19c0f3d7595192f424b8e91 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-nested-1.srx -file - - - - -2008-02-29T14:57:19.748450Z -b0d7cb4403d6ef8234fb3ca7bde80938 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-nested-2.srx -file - - - - -2008-02-29T14:57:19.748450Z -11c748716334a38bf0b2ed1bb446cc59 -2007-09-20T07:35:41.061956Z -540 -cweiske - -two-nested-opt-alt.srx -file - - - - -2008-02-29T14:57:19.764071Z -114d1d91f1764429d994c3c8d2ce96cd -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-nested-1.rq -file - - - - -2008-02-29T14:57:19.935897Z -ea3e7e32d74ed099db34adaaf77de970 -2007-09-20T07:35:41.061956Z -540 -cweiske - -two-nested-opt-alt.rq -file - - - - -2008-02-29T14:57:19.935897Z -484e7f85f84cf39fe1d410bb3b3be8a6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-graph-1.ttl -file - - - - -2008-02-29T14:57:19.951518Z -26f197766960278ae342f23ff2717dd4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-scope-join-1.ttl -file - - - - -2008-02-29T14:57:19.967139Z -e90c2f32e2f949a5162dc0113543d4be -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-graph-2.ttl -file - - - - -2008-02-29T14:57:19.951518Z -d6c322da52d3008a90b04b7ff8ef4431 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-1.srx -file - - - - -2008-02-29T14:57:19.967139Z -671cef8287a0647812d887ce7bf300d2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -opt-filter-2.rq -file - - - - -2008-02-29T14:57:19.967139Z -d8e892b4f7201f7f84a1a6828be67c50 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-2.srx -file - - - - -2008-02-29T14:57:19.982759Z -671cef8287a0647812d887ce7bf300d2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-scope-1.srx -file - - - - -2008-02-29T14:57:19.982759Z -b02ab4dd07dde52593bdcb34858955de -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-scope-join-1.srx -file - - - - -2008-02-29T14:57:19.982759Z -a5bd9f0bcf9f1682b09df48e1b30a292 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-3.srx -file - - - - -2008-02-29T14:57:19.998380Z -2d6e3ab7a6f5906aca6c1fc08c4cdc86 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-1.rq -file - - - - -2008-02-29T14:57:19.998380Z -dcffd0cc5464c6779eeb68f6273c45bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -join-combo-1.rq -file - - - - -2008-02-29T14:57:20.014000Z -5b1c643c51207c23681e4ffd9f1f4bb2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -filter-placement-3.rq -file - - - - -2008-02-29T14:57:20.014000Z -be6cb4b7b4b0abc472fa7a2b53d14212 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-1.ttl.svn-base deleted file mode 100755 index aa2efdc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-1.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-2.ttl.svn-base deleted file mode 100755 index 1bbf6e4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/data-2.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:x :p "2"^^xsd:integer . -:x :p "3"^^xsd:integer . -:x :p "4"^^xsd:integer . - -:x :q "1"^^xsd:integer . -:x :q "2"^^xsd:integer . -:x :q "3"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.rq.svn-base deleted file mode 100755 index 78f28533..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?v -{ :x :p ?v . FILTER(?v = 1) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.srx.svn-base deleted file mode 100755 index 3a0f024a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.rq.svn-base deleted file mode 100755 index 8430cef6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?v -{ :x :p ?v . { FILTER(?v = 1) } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.srx.svn-base deleted file mode 100755 index 8ac7e1c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-nested-2.srx.svn-base +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.rq.svn-base deleted file mode 100755 index cdabba47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -{ - ?s :p ?v . - FILTER (?v = 2) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.srx.svn-base deleted file mode 100755 index 7f4d9900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.rq.svn-base deleted file mode 100755 index 0f4e1a3a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -{ - FILTER (?v = 2) - ?s :p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.srx.svn-base deleted file mode 100755 index 7f4d9900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-2.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.rq.svn-base deleted file mode 100755 index f3be6d27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT ?v ?w -{ - FILTER (?v = 2) - FILTER (?w = 3) - ?s :p ?v . - ?s :q ?w . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.srx.svn-base deleted file mode 100755 index dc55af4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-placement-3.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - 2 - - - 3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.rq.svn-base deleted file mode 100755 index 917a67ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -{ - :x :p ?v . - { :x :q ?w - OPTIONAL { :x :p ?v2 FILTER(?v = 1) } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.srx.svn-base deleted file mode 100755 index 34c182d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/filter-scope-1.srx.svn-base +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - 4 - - - 3 - - - - - 4 - - - 2 - - - - - 4 - - - 1 - - - - - 3 - - - 3 - - - - - 3 - - - 2 - - - - - 3 - - - 1 - - - - - 2 - - - 3 - - - - - 2 - - - 2 - - - - - 2 - - - 1 - - - - - 1 - - - 3 - - - - - 1 - - - 2 - - - - - 1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.rq.svn-base deleted file mode 100755 index 60b2992e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?a ?y ?d ?z -{ - ?a :p ?c OPTIONAL { ?a :r ?d }. - ?a ?p 1 { ?p a ?y } UNION { ?a ?z ?p } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.srx.svn-base deleted file mode 100755 index 84e94f2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-1.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - http://www.w3.org/1999/02/22-rdf-syntax-ns#Property - - - 4 - - - - - http://example/x1 - - - http://example/z - - - 4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.rq.svn-base deleted file mode 100755 index 36cfd3cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x ?y ?z -{ - GRAPH ?g { ?x ?p 1 } { ?x :p ?y } UNION { ?p a ?z } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.srx.svn-base deleted file mode 100755 index 817a717b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-2.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - http://example/b - - - http://www.w3.org/1999/02/22-rdf-syntax-ns#Property - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-1.ttl.svn-base deleted file mode 100755 index 15b720a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-1.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - - :b :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-2.ttl.svn-base deleted file mode 100755 index ac7d3b7d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/join-combo-graph-2.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix rdf: . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x1 :r "4"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x2 :r "10"^^xsd:integer . -:x2 :x "1"^^xsd:integer . -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . -:x3 :s "1"^^xsd:integer . -:x3 :t :s . -:p a rdf:Property . -:x1 :z :p . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 7a770e1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,152 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Algebra" ; - mf:entries - ( <#nested-opt-1> - <#nested-opt-2> - <#opt-filter-1> - <#opt-filter-2> - <#opt-filter-3> - <#filter-place-1> - <#filter-place-2> - <#filter-place-3> - <#filter-nested-1> - <#filter-nested-2> - <#filter-scope-1> - <#join-scope-1> - ) . - - -<#nested-opt-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment """Nested-optionals with a shared variable that does not appear in the middle pattern (a not well-formed query pattern as per "Semantics and Complexity" of SPARQL""" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#nested-opt-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 2" ; - rdfs:comment "OPTIONALs parse in a left-associative manner" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#opt-filter-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 1" ; - rdfs:comment "A FILTER inside an OPTIONAL can reference a variable bound in the required part of the OPTIONAL" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#opt-filter-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 2 filters" ; - rdfs:comment "FILTERs inside an OPTIONAL can refer to variables from both the required and optional parts of the construct." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#opt-filter-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - scope of variable" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 1" ; - rdfs:comment "FILTER placed after the triple pattern that contains the variable tested" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 2" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 3" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-nested-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 1" ; - rdfs:comment "A FILTER is in scope for variables bound at the same level of the query tree" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-nested-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 2" ; - rdfs:comment "A FILTER in a group { ... } cannot see variables bound outside that group" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-scope-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-scope - 1" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#join-scope-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Join scope - 1" ; - rdfs:comment "Variables have query scope." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 73595a25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,175 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Algebra" ; - mf:entries - ( :nested-opt-1 - :nested-opt-2 - :opt-filter-1 - :opt-filter-2 - :opt-filter-3 - :filter-place-1 - :filter-place-2 - :filter-place-3 - :filter-nested-1 - :filter-nested-2 - :filter-scope-1 - :join-scope-1 - :join-combo-1 - :join-combo-2 - ) . - -:join-combo-1 a mf:QueryEvaluationTest ; - mf:name "Join operator with OPTs, BGPs, and UNIONs" ; - rdfs:comment """Tests nested combination of Join with a BGP / OPT and a BGP / UNION""" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:join-combo-2 a mf:QueryEvaluationTest ; - mf:name "Join operator with Graph and Union" ; - rdfs:comment """Tests combination of Join operator with Graph on LHS and Union on RHS""" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:nested-opt-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment """Nested-optionals with a shared variable that does not appear in the middle pattern (a not well-formed query pattern as per "Semantics and Complexity" of SPARQL""" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:nested-opt-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 2" ; - rdfs:comment "OPTIONALs parse in a left-associative manner" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:opt-filter-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 1" ; - rdfs:comment "A FILTER inside an OPTIONAL can reference a variable bound in the required part of the OPTIONAL" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:opt-filter-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 2 filters" ; - rdfs:comment "FILTERs inside an OPTIONAL can refer to variables from both the required and optional parts of the construct." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:opt-filter-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - scope of variable" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 1" ; - rdfs:comment "FILTER placed after the triple pattern that contains the variable tested" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 2" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 3" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-nested-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 1" ; - rdfs:comment "A FILTER is in scope for variables bound at the same level of the query tree" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-nested-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 2" ; - rdfs:comment "A FILTER in a group { ... } cannot see variables bound outside that group" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-scope-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-scope - 1" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:join-scope-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Join scope - 1" ; - rdfs:comment "Variables have query scope." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.rq.svn-base deleted file mode 100755 index 4622dafe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX : - -SELECT * -{ - ?x :p ?v . - OPTIONAL - { - ?y :q ?w . - FILTER(?v=2) - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.srx.svn-base deleted file mode 100755 index 60f05bca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.srx.svn-base +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 4 - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 3 - - - - - http://example/x1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.ttl.svn-base deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-1.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.rq.svn-base deleted file mode 100755 index 82b136c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.rq.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX : - -SELECT * -{ - ?x :p ?v . - OPTIONAL - { - ?y :q ?w . - FILTER(?v=2) - FILTER(?w=3) - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.srx.svn-base deleted file mode 100755 index 42e9b6e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 3 - - - - - http://example/x1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.ttl.svn-base deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-2.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.rq.svn-base deleted file mode 100755 index 9031586f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -SELECT * -{ - :x :p ?v . - { :x :q ?w - # ?v is not in scope so ?v2 never set - OPTIONAL { :x :p ?v2 FILTER(?v = 1) } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.srx.svn-base deleted file mode 100755 index e0d780f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.srx.svn-base +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.ttl.svn-base deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/opt-filter-3.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.rq.svn-base deleted file mode 100755 index 3c6820de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -## The nested optional example, rewritten to a form that is the same -## for the SPARQL algebra and the declarative semantics. -SELECT * -{ - :x1 :p ?v . - OPTIONAL { :x3 :q ?w } - OPTIONAL { :x3 :q ?w . :x2 :p ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.srx.svn-base deleted file mode 100755 index 0644ba5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt-alt.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - 1 - - - 4 - - - - - 1 - - - 3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.rq.svn-base deleted file mode 100755 index 71b40469..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX : - -SELECT * -{ - :x1 :p ?v . - OPTIONAL - { - :x3 :q ?w . - OPTIONAL { :x2 :p ?v } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.srx.svn-base deleted file mode 100755 index 5b948dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.srx.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.ttl.svn-base deleted file mode 100755 index 78ba93c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/two-nested-opt.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.rq.svn-base deleted file mode 100755 index fa856a4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - ?X :name "paul" - {?Y :name "george" . OPTIONAL { ?X :email ?Z } } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.srx.svn-base deleted file mode 100755 index 81d07170..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.srx.svn-base +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.ttl.svn-base deleted file mode 100755 index b6ee6e5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/.svn/text-base/var-scope-join-1.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . - -_:B1 :name "paul" . -_:B1 :phone "777-3426". - -_:B2 :name "john" . -_:B2 :email . - -_:B3 :name "george". -_:B3 :webPage . - -_:B4 :name "ringo". -_:B4 :email . -_:B4 :webPage . -_:B4 :phone "888-4537". diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-1.ttl deleted file mode 100755 index aa2efdc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-1.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-2.ttl deleted file mode 100755 index 1bbf6e4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-2.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:x :p "2"^^xsd:integer . -:x :p "3"^^xsd:integer . -:x :p "4"^^xsd:integer . - -:x :q "1"^^xsd:integer . -:x :q "2"^^xsd:integer . -:x :q "3"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.rq deleted file mode 100755 index 78f28533..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?v -{ :x :p ?v . FILTER(?v = 1) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.srx deleted file mode 100755 index 3a0f024a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.rq deleted file mode 100755 index 8430cef6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT ?v -{ :x :p ?v . { FILTER(?v = 1) } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.srx deleted file mode 100755 index 8ac7e1c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.srx +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.rq deleted file mode 100755 index cdabba47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -{ - ?s :p ?v . - FILTER (?v = 2) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.srx deleted file mode 100755 index 7f4d9900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.rq deleted file mode 100755 index 0f4e1a3a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -{ - FILTER (?v = 2) - ?s :p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.srx deleted file mode 100755 index 7f4d9900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.rq deleted file mode 100755 index f3be6d27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT ?v ?w -{ - FILTER (?v = 2) - FILTER (?w = 3) - ?s :p ?v . - ?s :q ?w . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.srx deleted file mode 100755 index dc55af4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - 2 - - - 3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.rq deleted file mode 100755 index 917a67ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -{ - :x :p ?v . - { :x :q ?w - OPTIONAL { :x :p ?v2 FILTER(?v = 1) } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.srx deleted file mode 100755 index 34c182d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.srx +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - 4 - - - 3 - - - - - 4 - - - 2 - - - - - 4 - - - 1 - - - - - 3 - - - 3 - - - - - 3 - - - 2 - - - - - 3 - - - 1 - - - - - 2 - - - 3 - - - - - 2 - - - 2 - - - - - 2 - - - 1 - - - - - 1 - - - 3 - - - - - 1 - - - 2 - - - - - 1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.rq deleted file mode 100755 index 60b2992e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?a ?y ?d ?z -{ - ?a :p ?c OPTIONAL { ?a :r ?d }. - ?a ?p 1 { ?p a ?y } UNION { ?a ?z ?p } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.srx deleted file mode 100755 index 84e94f2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-1.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - http://www.w3.org/1999/02/22-rdf-syntax-ns#Property - - - 4 - - - - - http://example/x1 - - - http://example/z - - - 4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.rq deleted file mode 100755 index 36cfd3cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x ?y ?z -{ - GRAPH ?g { ?x ?p 1 } { ?x :p ?y } UNION { ?p a ?z } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.srx deleted file mode 100755 index 817a717b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-2.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - http://example/b - - - http://www.w3.org/1999/02/22-rdf-syntax-ns#Property - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-1.ttl deleted file mode 100755 index 15b720a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-1.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - - :b :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl deleted file mode 100755 index ac7d3b7d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/join-combo-graph-2.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix rdf: . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x1 :r "4"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x2 :r "10"^^xsd:integer . -:x2 :x "1"^^xsd:integer . -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . -:x3 :s "1"^^xsd:integer . -:x3 :t :s . -:p a rdf:Property . -:x1 :z :p . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl deleted file mode 100755 index 73595a25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl +++ /dev/null @@ -1,175 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Algebra" ; - mf:entries - ( :nested-opt-1 - :nested-opt-2 - :opt-filter-1 - :opt-filter-2 - :opt-filter-3 - :filter-place-1 - :filter-place-2 - :filter-place-3 - :filter-nested-1 - :filter-nested-2 - :filter-scope-1 - :join-scope-1 - :join-combo-1 - :join-combo-2 - ) . - -:join-combo-1 a mf:QueryEvaluationTest ; - mf:name "Join operator with OPTs, BGPs, and UNIONs" ; - rdfs:comment """Tests nested combination of Join with a BGP / OPT and a BGP / UNION""" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:join-combo-2 a mf:QueryEvaluationTest ; - mf:name "Join operator with Graph and Union" ; - rdfs:comment """Tests combination of Join operator with Graph on LHS and Union on RHS""" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:nested-opt-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment """Nested-optionals with a shared variable that does not appear in the middle pattern (a not well-formed query pattern as per "Semantics and Complexity" of SPARQL""" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:nested-opt-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 2" ; - rdfs:comment "OPTIONALs parse in a left-associative manner" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:opt-filter-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 1" ; - rdfs:comment "A FILTER inside an OPTIONAL can reference a variable bound in the required part of the OPTIONAL" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:opt-filter-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 2 filters" ; - rdfs:comment "FILTERs inside an OPTIONAL can refer to variables from both the required and optional parts of the construct." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:opt-filter-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - scope of variable" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 1" ; - rdfs:comment "FILTER placed after the triple pattern that contains the variable tested" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 2" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-place-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 3" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-nested-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 1" ; - rdfs:comment "A FILTER is in scope for variables bound at the same level of the query tree" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-nested-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 2" ; - rdfs:comment "A FILTER in a group { ... } cannot see variables bound outside that group" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:filter-scope-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-scope - 1" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:join-scope-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Join scope - 1" ; - rdfs:comment "Variables have query scope." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl.bak deleted file mode 100755 index 7a770e1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl.bak +++ /dev/null @@ -1,152 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Algebra" ; - mf:entries - ( <#nested-opt-1> - <#nested-opt-2> - <#opt-filter-1> - <#opt-filter-2> - <#opt-filter-3> - <#filter-place-1> - <#filter-place-2> - <#filter-place-3> - <#filter-nested-1> - <#filter-nested-2> - <#filter-scope-1> - <#join-scope-1> - ) . - - -<#nested-opt-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment """Nested-optionals with a shared variable that does not appear in the middle pattern (a not well-formed query pattern as per "Semantics and Complexity" of SPARQL""" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#nested-opt-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Nested Optionals - 2" ; - rdfs:comment "OPTIONALs parse in a left-associative manner" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#opt-filter-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 1" ; - rdfs:comment "A FILTER inside an OPTIONAL can reference a variable bound in the required part of the OPTIONAL" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#opt-filter-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - 2 filters" ; - rdfs:comment "FILTERs inside an OPTIONAL can refer to variables from both the required and optional parts of the construct." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#opt-filter-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Optional-filter - scope of variable" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 1" ; - rdfs:comment "FILTER placed after the triple pattern that contains the variable tested" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 2" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-place-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-placement - 3" ; - rdfs:comment "FILTERs are scoped to the nearest enclosing group - placement within that group does not matter" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-nested-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 1" ; - rdfs:comment "A FILTER is in scope for variables bound at the same level of the query tree" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-nested-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-nested - 2" ; - rdfs:comment "A FILTER in a group { ... } cannot see variables bound outside that group" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#filter-scope-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Filter-scope - 1" ; - rdfs:comment "FILTERs in an OPTIONAL do not extend to variables bound outside of the LeftJoin(...) operation" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -<#join-scope-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Join scope - 1" ; - rdfs:comment "Variables have query scope." ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.rq deleted file mode 100755 index 4622dafe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.rq +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX : - -SELECT * -{ - ?x :p ?v . - OPTIONAL - { - ?y :q ?w . - FILTER(?v=2) - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.srx deleted file mode 100755 index 60f05bca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.srx +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 4 - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 3 - - - - - http://example/x1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.ttl deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.rq deleted file mode 100755 index 82b136c8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.rq +++ /dev/null @@ -1,12 +0,0 @@ -PREFIX : - -SELECT * -{ - ?x :p ?v . - OPTIONAL - { - ?y :q ?w . - FILTER(?v=2) - FILTER(?w=3) - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.srx deleted file mode 100755 index 42e9b6e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - http://example/x2 - - - 2 - - - http://example/x3 - - - 3 - - - - - http://example/x1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.ttl deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.rq deleted file mode 100755 index 9031586f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -SELECT * -{ - :x :p ?v . - { :x :q ?w - # ?v is not in scope so ?v2 never set - OPTIONAL { :x :p ?v2 FILTER(?v = 1) } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.srx deleted file mode 100755 index e0d780f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.srx +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.ttl deleted file mode 100755 index 78e2ec7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . - -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq deleted file mode 100755 index 3c6820de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -## The nested optional example, rewritten to a form that is the same -## for the SPARQL algebra and the declarative semantics. -SELECT * -{ - :x1 :p ?v . - OPTIONAL { :x3 :q ?w } - OPTIONAL { :x3 :q ?w . :x2 :p ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx deleted file mode 100755 index 0644ba5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - 1 - - - 4 - - - - - 1 - - - 3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.rq deleted file mode 100755 index 71b40469..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.rq +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX : - -SELECT * -{ - :x1 :p ?v . - OPTIONAL - { - :x3 :q ?w . - OPTIONAL { :x2 :p ?v } - } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.srx deleted file mode 100755 index 5b948dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.srx +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.ttl deleted file mode 100755 index 78ba93c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x3 :q "3"^^xsd:integer . -:x3 :q "4"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.rq deleted file mode 100755 index fa856a4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - ?X :name "paul" - {?Y :name "george" . OPTIONAL { ?X :email ?Z } } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.srx deleted file mode 100755 index 81d07170..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.srx +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl deleted file mode 100755 index b6ee6e5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . - -_:B1 :name "paul" . -_:B1 :phone "777-3426". - -_:B2 :name "john" . -_:B2 :email . - -_:B3 :name "george". -_:B3 :webPage . - -_:B4 :name "ringo". -_:B4 :email . -_:B4 :webPage . -_:B4 :phone "888-4537". diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/all-wcprops deleted file mode 100755 index 9249a490..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask -END -ask-4.rq -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.rq -END -ask-7.rq -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.rq -END -ask-8.rq -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl.bak -END -ask-1.srx -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.srx -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl -END -ask-4.srx -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.srx -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/data.ttl -END -ask-1.rq -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.rq -END -ask-7.srx -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.srx -END -ask-8.srx -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.srx -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/entries deleted file mode 100755 index 6911b64a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/entries +++ /dev/null @@ -1,160 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -ask-4.rq -file - - - - -2008-02-29T14:57:16.561848Z -aac346ec3933e5930a1d006cbf930426 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-7.rq -file - - - - -2008-02-29T14:57:16.561848Z -ae461aa321a2c686d0c5bf51e4ee66b4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-8.rq -file - - - - -2008-02-29T14:57:16.561848Z -ee1118f5836ec1abfcf2872b0a8afaa2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:16.577468Z -01a51190710b9ff9add3ceb0ce5d0992 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-1.srx -file - - - - -2008-02-29T14:57:16.577468Z -a2c7d60fea3d926224e1cabacf208e28 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:16.593089Z -6d3a8cb280b84bc283e83893278157b8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-4.srx -file - - - - -2008-02-29T14:57:16.593089Z -ced0dc379a1569ebe95ebd370c7d0ae2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:16.608710Z -9bbb6fe2d5b1683c26b2a8b47731f215 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-1.rq -file - - - - -2008-02-29T14:57:16.608710Z -17cde05e724e9dafab40959965824628 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-7.srx -file - - - - -2008-02-29T14:57:16.608710Z -a2c7d60fea3d926224e1cabacf208e28 -2007-09-20T07:35:41.061956Z -540 -cweiske - -ask-8.srx -file - - - - -2008-02-29T14:57:16.624330Z -ced0dc379a1569ebe95ebd370c7d0ae2 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.rq.svn-base deleted file mode 100755 index 25f63cbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.srx.svn-base deleted file mode 100755 index 35d0d119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-1.srx.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - - - - - true - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.rq.svn-base deleted file mode 100755 index 3b56286c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p 99 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.srx.svn-base deleted file mode 100755 index 8eea9e39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-4.srx.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - - - - - false - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.rq.svn-base deleted file mode 100755 index 4bb6df2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.srx.svn-base deleted file mode 100755 index 35d0d119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-7.srx.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - - - - - true - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.rq.svn-base deleted file mode 100755 index c8ac10ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p ?x . FILTER(?x = 99) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.srx.svn-base deleted file mode 100755 index 8eea9e39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/ask-8.srx.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - - - - - false - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 039b3fd3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:x :p "2"^^xsd:integer . -:x :p "3"^^xsd:integer . - -:y :p :a . -:a :q :r . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 925a1834..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,55 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "ASK" ; - mf:entries - ( - <#ask-1> - <#ask-4> - <#ask-7> - <#ask-8> - ) . - - -<#ask-1> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-1 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-4> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-4 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-7> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-7 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-8> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-8 (SPARQL XML results)" ; - dawgt:approval dawgt:NotApproved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 044b04b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,61 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "ASK" ; - mf:entries - ( - :ask-1 - :ask-4 - :ask-7 - :ask-8 - ) . - - -:ask-1 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-1 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-4 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-4 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-7 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-7 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-8 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-8 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.rq deleted file mode 100755 index 25f63cbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.srx deleted file mode 100755 index 35d0d119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.srx +++ /dev/null @@ -1,6 +0,0 @@ - - - - - true - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.rq deleted file mode 100755 index 3b56286c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p 99 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.srx deleted file mode 100755 index 8eea9e39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.srx +++ /dev/null @@ -1,6 +0,0 @@ - - - - - false - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.rq deleted file mode 100755 index 4bb6df2e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.srx deleted file mode 100755 index 35d0d119..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.srx +++ /dev/null @@ -1,6 +0,0 @@ - - - - - true - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.rq deleted file mode 100755 index c8ac10ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -ASK { :x :p ?x . FILTER(?x = 99) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.srx deleted file mode 100755 index 8eea9e39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.srx +++ /dev/null @@ -1,6 +0,0 @@ - - - - - false - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/data.ttl deleted file mode 100755 index 039b3fd3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/data.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:x :p "2"^^xsd:integer . -:x :p "3"^^xsd:integer . - -:y :p :a . -:a :q :r . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl deleted file mode 100755 index 044b04b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl +++ /dev/null @@ -1,61 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "ASK" ; - mf:entries - ( - :ask-1 - :ask-4 - :ask-7 - :ask-8 - ) . - - -:ask-1 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-1 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-4 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-4 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-7 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-7 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ask-8 rdf:type mf:QueryEvaluationTest ; - qt:queryForm qt:QueryAsk ; - mf:name "ASK-8 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl.bak deleted file mode 100755 index 925a1834..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl.bak +++ /dev/null @@ -1,55 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "ASK" ; - mf:entries - ( - <#ask-1> - <#ask-4> - <#ask-7> - <#ask-8> - ) . - - -<#ask-1> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-1 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-4> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-4 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-7> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-7 (SPARQL XML results)" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ask-8> rdf:type mf:QueryEvaluationTest ; - mf:name "ASK-8 (SPARQL XML results)" ; - dawgt:approval dawgt:NotApproved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/all-wcprops deleted file mode 100755 index 34559dd2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/all-wcprops +++ /dev/null @@ -1,383 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic -END -term-1.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.srx -END -term-2.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.srx -END -term-3.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.srx -END -term-4.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.srx -END -term-5.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.srx -END -prefix-name-1.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.srx -END -term-6.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.srx -END -term-7.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.srx -END -term-8.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.srx -END -base-prefix-4.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.rq -END -term-9.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.srx -END -term-3.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.rq -END -quotes-1.srx -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.srx -END -quotes-2.srx -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.srx -END -quotes-3.srx -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.srx -END -quotes-4.srx -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.srx -END -term-7.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.rq -END -list-4.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.rq -END -bgp-no-match.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.rq -END -quotes-2.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl.bak -END -var-1.rq -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.rq -END -data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-1.ttl -END -data-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-2.ttl -END -data-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-3.ttl -END -data-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-4.ttl -END -data-5.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-5.ttl -END -data-6.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-6.ttl -END -data-7.ttl -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-7.ttl -END -list-1.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.srx -END -list-2.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.srx -END -base-prefix-3.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.rq -END -list-3.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.srx -END -term-2.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.rq -END -bgp-no-match.srx -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.srx -END -list-4.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.srx -END -term-6.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.rq -END -list-3.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.rq -END -quotes-1.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.rq -END -base-prefix-2.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.rq -END -term-1.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.rq -END -spoo-1.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.srx -END -prefix-name-1.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.rq -END -term-5.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.rq -END -list-2.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.rq -END -term-9.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.rq -END -quotes-4.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl -END -base-prefix-1.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.srx -END -base-prefix-2.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.srx -END -base-prefix-3.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.srx -END -base-prefix-4.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.srx -END -base-prefix-5.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.srx -END -base-prefix-1.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.rq -END -base-prefix-5.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.rq -END -term-4.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.rq -END -list-1.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.rq -END -term-8.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.rq -END -spoo-1.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.rq -END -var-1.srx -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.srx -END -quotes-3.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.rq -END -var-2.srx -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.srx -END -var-2.rq -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/entries deleted file mode 100755 index f247772d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/entries +++ /dev/null @@ -1,784 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -term-1.srx -file - - - - -2008-02-29T14:57:12.594215Z -4e18fe5739e070abfe8478a48ab266df -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-2.srx -file - - - - -2008-02-29T14:57:12.594215Z -03fcc6419b92997ef0016e7413039a75 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-3.srx -file - - - - -2008-02-29T14:57:12.609836Z -f24192e1b46a50d47db3945f2bb9682e -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-4.srx -file - - - - -2008-02-29T14:57:12.609836Z -0efbfa551727086514e686589d16f6ac -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-5.srx -file - - - - -2008-02-29T14:57:12.625457Z -0efbfa551727086514e686589d16f6ac -2007-09-20T07:35:41.061956Z -540 -cweiske - -prefix-name-1.srx -file - - - - -2008-02-29T14:57:12.625457Z -4e18fe5739e070abfe8478a48ab266df -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-6.srx -file - - - - -2008-02-29T14:57:12.641077Z -9ff130ba1988dab631c081a397665338 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-7.srx -file - - - - -2008-02-29T14:57:12.641077Z -9ff130ba1988dab631c081a397665338 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-8.srx -file - - - - -2008-02-29T14:57:12.656698Z -a684745ca1e99083a8571281c77141b2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-4.rq -file - - - - -2008-02-29T14:57:12.656698Z -b468a0945c451aa7a652a6ac69eb5e46 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-9.srx -file - - - - -2008-02-29T14:57:12.672318Z -e24a989c19e85562ef4307222aab6dd0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-3.rq -file - - - - -2008-02-29T14:57:12.656698Z -2761525725532c4169efb4fd4ab56041 -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-1.srx -file - - - - -2008-02-29T14:57:12.672318Z -750d55ed9658d7447ce49ddb8b8db6dd -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-2.srx -file - - - - -2008-02-29T14:57:12.687939Z -750d55ed9658d7447ce49ddb8b8db6dd -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-3.srx -file - - - - -2008-02-29T14:57:12.703560Z -5b1009758bc85da0532a601db3498ea2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-4.srx -file - - - - -2008-02-29T14:57:12.719180Z -7692770d640bc7c9f74625f84a185c39 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-7.rq -file - - - - -2008-02-29T14:57:12.719180Z -ffdc1abd5f96998e9a1fe9e8eb94ca6e -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-4.rq -file - - - - -2008-02-29T14:57:12.719180Z -9dd553bf33b5f4a99db06ebc7110904d -2007-09-20T07:35:41.061956Z -540 -cweiske - -bgp-no-match.rq -file - - - - -2008-02-29T14:57:12.734801Z -29f4b88840e130afed4bc0ea20bb1e78 -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-2.rq -file - - - - -2008-02-29T14:57:12.734801Z -e3db6808e54a533e66552718cad05da5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:12.750421Z -8bf3cf176cb0ee395d74df3d65b3eb25 -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-1.rq -file - - - - -2008-02-29T14:57:12.750421Z -fdec44b5908bd0cd86f3a9ec0239b274 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-1.ttl -file - - - - -2008-02-29T14:57:12.766042Z -30274cb5c0b470c3868096094dc284b8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-2.ttl -file - - - - -2008-02-29T14:57:12.781663Z -c222ba0d8740fc1592e64a65dd964604 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-3.ttl -file - - - - -2008-02-29T14:57:12.781663Z -7dc4ea0fe965ac45b11bacfd85fb1c63 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-4.ttl -file - - - - -2008-02-29T14:57:12.781663Z -5705d5fcc4b6dd2c33f327bd2e698b1e -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-5.ttl -file - - - - -2008-02-29T14:57:12.797283Z -1f5d8300694829579e2269707a37c824 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-6.ttl -file - - - - -2008-02-29T14:57:12.797283Z -f34a7f7f580709ce55d0e7794a36f13a -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-7.ttl -file - - - - -2008-02-29T14:57:12.812904Z -44f08d4a92b1b35595a1a78e302d727d -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-1.srx -file - - - - -2008-02-29T14:57:12.844145Z -a1e4d9838f4fd21f31aa78d7df3999d6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-2.srx -file - - - - -2008-02-29T14:57:12.844145Z -4b82daa1570b6328c0d2d4995642d8f9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-3.rq -file - - - - -2008-02-29T14:57:12.859766Z -9e02299da14dd5c6721c3115676d6780 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-3.srx -file - - - - -2008-02-29T14:57:12.859766Z -89e1782c48f72aa608642f91280160d9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-2.rq -file - - - - -2008-02-29T14:57:12.875386Z -f7ec9c5ee644d0d4e665b75006cf1a08 -2007-09-20T07:35:41.061956Z -540 -cweiske - -bgp-no-match.srx -file - - - - -2008-02-29T14:57:12.875386Z -079b5fed45317e5c47d5ca5cc468d6b9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-4.srx -file - - - - -2008-02-29T14:57:12.859766Z -190879f107a21e714491540e7a2ac83d -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-6.rq -file - - - - -2008-02-29T14:57:12.906627Z -bf6bd1a812a2ffc1d0fa511ac1fc0d47 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-3.rq -file - - - - -2008-02-29T14:57:12.906627Z -adbac2623751ab404b9e8d895056cb9a -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-1.rq -file - - - - -2008-02-29T14:57:12.922248Z -3cd62c4f021f31225637a09b2de87170 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-2.rq -file - - - - -2008-02-29T14:57:12.625457Z -62ab98091084d6f92a32d9b0be4249e5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-1.rq -file - - - - -2008-02-29T14:57:12.641077Z -ae39c2f6e502c535009542a75c9d6daf -2007-09-20T07:35:41.061956Z -540 -cweiske - -spoo-1.srx -file - - - - -2008-02-29T14:57:12.672318Z -a24459842df2bcfe30919da7958f7cf7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -prefix-name-1.rq -file - - - - -2008-02-29T14:57:12.687939Z -e1ed640dc2cfe8e89c9cd1eb6dd84986 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-5.rq -file - - - - -2008-02-29T14:57:12.687939Z -97d59283e5247fa16cf303152662d8a3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-2.rq -file - - - - -2008-02-29T14:57:12.703560Z -c60e37ac3273ea85505db3147f58f6e7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-9.rq -file - - - - -2008-02-29T14:57:12.734801Z -a86200028374fc746a5ae1603c9ecbaf -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-4.rq -file - - - - -2008-02-29T14:57:12.750421Z -66dd143da7f89f57876f5975448dc47a -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:12.766042Z -e7e252c2a37240acdda59e1b99aeda2c -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-1.srx -file - - - - -2008-02-29T14:57:12.797283Z -b768dba173a08483dce7ca271e5ad4d2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-2.srx -file - - - - -2008-02-29T14:57:12.812904Z -b617d8698d753ab1b5da540a57f77437 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-3.srx -file - - - - -2008-02-29T14:57:12.812904Z -7a654c3831a026736a64242e80a320e4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-4.srx -file - - - - -2008-02-29T14:57:12.828524Z -9710d8e341148a2416b7741af33ee7fb -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-5.srx -file - - - - -2008-02-29T14:57:12.828524Z -6a2b376521729e22d3017e741f365dc7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-1.rq -file - - - - -2008-02-29T14:57:12.844145Z -4a820365b5a31bb32c9ff073239a2683 -2007-09-20T07:35:41.061956Z -540 -cweiske - -base-prefix-5.rq -file - - - - -2008-02-29T14:57:12.875386Z -51a268803484f11ed9cee9556cae582f -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-4.rq -file - - - - -2008-02-29T14:57:12.891007Z -355ee8bdc20eec56b7962bf669b02893 -2007-09-20T07:35:41.061956Z -540 -cweiske - -list-1.rq -file - - - - -2008-02-29T14:57:12.891007Z -43aa67b7d3881d4c03a7a3c58491604d -2007-09-20T07:35:41.061956Z -540 -cweiske - -term-8.rq -file - - - - -2008-02-29T14:57:12.906627Z -f1f6a737a09d45b33c89c4924b513eec -2007-09-20T07:35:41.061956Z -540 -cweiske - -spoo-1.rq -file - - - - -2008-02-29T14:57:12.922248Z -8b273ca171f7781a702a13f44d0a7934 -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-1.srx -file - - - - -2008-02-29T14:57:12.937869Z -fa77aab597f32c6d4749ff6ca837e4ea -2007-09-20T07:35:41.061956Z -540 -cweiske - -quotes-3.rq -file - - - - -2008-02-29T14:57:12.922248Z -e0f77987da96e2e13261d3fb20a420b4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-2.srx -file - - - - -2008-02-29T14:57:12.937869Z -fa77aab597f32c6d4749ff6ca837e4ea -2007-09-20T07:35:41.061956Z -540 -cweiske - -var-2.rq -file - - - - -2008-02-29T14:57:12.937869Z -5239a50501826c5dc2a98c185f6a362e -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.rq.svn-base deleted file mode 100755 index 4adf184f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.srx.svn-base deleted file mode 100755 index 8083e599..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-1.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - d:x ns:p - - - http://example.org/ns#p - - - - - x:x x:p - - - http://example.org/x/p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.rq.svn-base deleted file mode 100755 index 824f2cb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.srx.svn-base deleted file mode 100755 index 1b900e50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-2.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - z:x z:p - - - http://example.org/x/#p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.rq.svn-base deleted file mode 100755 index 73e134d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -PREFIX x: - -SELECT * WHERE { x:x ns:p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.srx.svn-base deleted file mode 100755 index 7901e3dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-3.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - d:x ns:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.rq.svn-base deleted file mode 100755 index 76305994..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE {

        ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.srx.svn-base deleted file mode 100755 index f5bbac4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-4.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - x:x x:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.rq.svn-base deleted file mode 100755 index 010e7556..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE { <#x> <#p> ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.srx.svn-base deleted file mode 100755 index 058fc97a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/base-prefix-5.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - z:x z:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.rq.svn-base deleted file mode 100755 index b72ccca4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX foaf: -SELECT ?x -WHERE { - ?x foaf:name "John Smith" ; - a foaf:Womble . -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.srx.svn-base deleted file mode 100755 index 43e69cc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/bgp-no-match.srx.svn-base +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-1.ttl.svn-base deleted file mode 100755 index bfe253e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-1.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix ns: . -@prefix x: . -@prefix z: . - -x:x ns:p "d:x ns:p" . -x:x x:p "x:x x:p" . - -z:x z:p "z:x z:p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-2.ttl.svn-base deleted file mode 100755 index 26721861..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-2.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix xsd: . - - -:x :list0 () . -:x :list1 ("1"^^xsd:integer) . -:x :list2 ("11"^^xsd:integer "22"^^xsd:integer) . -:x :list3 ("111"^^xsd:integer "222"^^xsd:integer "333"^^xsd:integer) . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-3.ttl.svn-base deleted file mode 100755 index 598afc94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-3.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . - -# This file uses UNIX line end conventions. - -:x1 :p1 "x" . -:x2 :p2 """x -y""" . - -:x3 :p3 """x -y"""^^:someType . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-4.ttl.svn-base deleted file mode 100755 index 5598d40b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-4.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix rdf: . - -:x :p1 "true"^^xsd:boolean . -:x :p2 "false"^^xsd:boolean . - -:x rdf:type :C . - -:x :n1 "123.0"^^xsd:decimal . -:x :n2 "456."^^xsd:decimal . - -:x :n3 "+5"^^xsd:integer . -:x :n4 "-18"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-5.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-5.ttl.svn-base deleted file mode 100755 index 282eb584..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-5.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p1 "1"^^xsd:integer . -:x :p2 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-6.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-6.ttl.svn-base deleted file mode 100755 index 8df49a4c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-6.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p1 "1"^^xsd:integer . -:x :p1 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-7.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-7.ttl.svn-base deleted file mode 100755 index 441143c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/data-7.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix foaf: . - -:john a foaf:Person ; - foaf:name "John Smith" . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.rq.svn-base deleted file mode 100755 index 15d6ecb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p -{ :x ?p () . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.srx.svn-base deleted file mode 100755 index 842088a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#list0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.rq.svn-base deleted file mode 100755 index d0fef0b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p -{ :x ?p (1) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.srx.svn-base deleted file mode 100755 index 94ef9001..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-2.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#list1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.rq.svn-base deleted file mode 100755 index c28d2d79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p ?v -{ :x ?p (?v) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.srx.svn-base deleted file mode 100755 index 849b8323..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-3.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example.org/ns#list1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.rq.svn-base deleted file mode 100755 index a96249d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p ?v ?w -{ :x ?p (?v ?w) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.srx.svn-base deleted file mode 100755 index ca2e3544..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/list-4.srx.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - http://example.org/ns#list2 - - - 11 - - - 22 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index e675911d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,311 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Basic test cases" ; - mf:entries - ( - <#base-prefix-1> - <#base-prefix-2> - <#base-prefix-3> - <#base-prefix-4> - <#base-prefix-5> - - <#list-1> - <#list-2> - <#list-3> - <#list-4> - - <#quotes-1> - <#quotes-2> - <#quotes-3> - <#quotes-4> - - <#term-1> - <#term-2> - <#term-3> - <#term-4> - <#term-5> - <#term-6> - <#term-7> - <#term-8> - <#term-9> - - <#var-1> - <#var-2> - - <#bgp-no-match> - <#spoo-1> - - <#prefix-name-1> - ) . - - -<#bgp-no-match> rdf:type mf:QueryEvaluationTest ; - mf:name "Non-matching triple pattern" ; - rdfs:comment "Patterns not in data don't match" ; - dawgt:approval dawgt:NotApproved ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . -<#prefix-name-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Prefix name 1" ; - rdfs:comment "No local name - foo:" ; - dawgt:approval dawgt:NotApproved ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - -<#spoo-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic graph pattern - spoo" ; - rdfs:comment "Test the :x :y :o1, :o2 construct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - - -<#base-prefix-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#base-prefix-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-5> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-5> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-6> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 6" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-7> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 7" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-8> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 8" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-9> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 9" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#var-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#var-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 43063194..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,314 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Basic test cases" ; - mf:entries - ( - :base-prefix-1 - :base-prefix-2 - :base-prefix-3 - :base-prefix-4 - :base-prefix-5 - - :list-1 - :list-2 - :list-3 - :list-4 - - :quotes-1 - :quotes-2 - :quotes-3 - :quotes-4 - - :term-1 - :term-2 - :term-3 - :term-4 - :term-5 - :term-6 - :term-7 - :term-8 - :term-9 - - :var-1 - :var-2 - - :bgp-no-match - :spoo-1 - - :prefix-name-1 - ) . - - -:bgp-no-match rdf:type mf:QueryEvaluationTest ; - mf:name "Non-matching triple pattern" ; - rdfs:comment "Patterns not in data don't match" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . -:prefix-name-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Prefix name 1" ; - rdfs:comment "No local name - foo:" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - -:spoo-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic graph pattern - spoo" ; - rdfs:comment "Test the :x :y :o1, :o2 construct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - - -:base-prefix-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:base-prefix-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-5 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-5 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-6 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 6" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-7 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 7" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-8 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 8" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-9 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 9" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:var-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:var-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.rq.svn-base deleted file mode 100755 index 5b7d7736..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ex: -SELECT ?p { - ex: ?p 1 . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.srx.svn-base deleted file mode 100755 index 16a3e536..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/prefix-name-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.rq.svn-base deleted file mode 100755 index 5cf63e25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x -{ ?x ?p '''x''' } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.srx.svn-base deleted file mode 100755 index d609ea5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.rq.svn-base deleted file mode 100755 index 7c6ff606..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x -{ ?x ?p """x""" } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.srx.svn-base deleted file mode 100755 index d609ea5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-2.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.rq.svn-base deleted file mode 100755 index 0ceff5b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# This query uses UNIX line end conventions. -# It is in CVS in binary. -PREFIX : - -SELECT ?x -{ ?x ?p '''x -y''' -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.srx.svn-base deleted file mode 100755 index 8d717e74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-3.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.rq.svn-base deleted file mode 100755 index e14c9520..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# This query uses UNIX line end conventions. -# It is in CVS in binary. -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x ?p """x -y"""^^:someType -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.srx.svn-base deleted file mode 100755 index 04decc5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/quotes-4.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.rq.svn-base deleted file mode 100755 index 364bd6d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?s WHERE { - ?s :p1 1, 2 . -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.srx.svn-base deleted file mode 100755 index 1dffd09d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/spoo-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.rq.svn-base deleted file mode 100755 index 36a4dad9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p true . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.srx.svn-base deleted file mode 100755 index 16a3e536..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.rq.svn-base deleted file mode 100755 index a1a9f87b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p false } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.srx.svn-base deleted file mode 100755 index 0d2e38cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-2.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.rq.svn-base deleted file mode 100755 index 7d2e2193..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x a ?C . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.srx.svn-base deleted file mode 100755 index 5e7265b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-3.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#C - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.rq.svn-base deleted file mode 100755 index 7ba3f97e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p 123.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.srx.svn-base deleted file mode 100755 index 026311f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-4.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.rq.svn-base deleted file mode 100755 index d931af05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p 123.0. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.srx.svn-base deleted file mode 100755 index 026311f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-5.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.rq.svn-base deleted file mode 100755 index 617c296c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p 456. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.srx.svn-base deleted file mode 100755 index a26298cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-6.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.rq.svn-base deleted file mode 100755 index 61d1d031..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p 456. . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.srx.svn-base deleted file mode 100755 index a26298cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-7.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.rq.svn-base deleted file mode 100755 index 4e545bbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p +5 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.srx.svn-base deleted file mode 100755 index ed965393..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-8.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.rq.svn-base deleted file mode 100755 index b337b2da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p -18 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.srx.svn-base deleted file mode 100755 index 1d09d855..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/term-9.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.rq.svn-base deleted file mode 100755 index cf4f6e93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p $v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.srx.svn-base deleted file mode 100755 index 8579a530..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-1.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example.org/ns#p2 - - - 2 - - - - - http://example.org/ns#p1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.rq.svn-base deleted file mode 100755 index 24ad05ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p $v . :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.srx.svn-base deleted file mode 100755 index 8579a530..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/.svn/text-base/var-2.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example.org/ns#p2 - - - 2 - - - - - http://example.org/ns#p1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.rq deleted file mode 100755 index 4adf184f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.srx deleted file mode 100755 index 8083e599..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - d:x ns:p - - - http://example.org/ns#p - - - - - x:x x:p - - - http://example.org/x/p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.rq deleted file mode 100755 index 824f2cb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> - -SELECT * WHERE { :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.srx deleted file mode 100755 index 1b900e50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - z:x z:p - - - http://example.org/x/#p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.rq deleted file mode 100755 index 73e134d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ns: -PREFIX x: - -SELECT * WHERE { x:x ns:p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.srx deleted file mode 100755 index 7901e3dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - d:x ns:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.rq deleted file mode 100755 index 76305994..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE {

        ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.srx deleted file mode 100755 index f5bbac4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - x:x x:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.rq deleted file mode 100755 index 010e7556..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE - -SELECT * WHERE { <#x> <#p> ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.srx deleted file mode 100755 index 058fc97a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - z:x z:p - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.rq deleted file mode 100755 index b72ccca4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX foaf: -SELECT ?x -WHERE { - ?x foaf:name "John Smith" ; - a foaf:Womble . -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.srx deleted file mode 100755 index 43e69cc9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.srx +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-1.ttl deleted file mode 100755 index bfe253e1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-1.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix ns: . -@prefix x: . -@prefix z: . - -x:x ns:p "d:x ns:p" . -x:x x:p "x:x x:p" . - -z:x z:p "z:x z:p" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-2.ttl deleted file mode 100755 index 26721861..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-2.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix xsd: . - - -:x :list0 () . -:x :list1 ("1"^^xsd:integer) . -:x :list2 ("11"^^xsd:integer "22"^^xsd:integer) . -:x :list3 ("111"^^xsd:integer "222"^^xsd:integer "333"^^xsd:integer) . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-3.ttl deleted file mode 100755 index 598afc94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-3.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . - -# This file uses UNIX line end conventions. - -:x1 :p1 "x" . -:x2 :p2 """x -y""" . - -:x3 :p3 """x -y"""^^:someType . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-4.ttl deleted file mode 100755 index 5598d40b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-4.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . -@prefix rdf: . - -:x :p1 "true"^^xsd:boolean . -:x :p2 "false"^^xsd:boolean . - -:x rdf:type :C . - -:x :n1 "123.0"^^xsd:decimal . -:x :n2 "456."^^xsd:decimal . - -:x :n3 "+5"^^xsd:integer . -:x :n4 "-18"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-5.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-5.ttl deleted file mode 100755 index 282eb584..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-5.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p1 "1"^^xsd:integer . -:x :p2 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-6.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-6.ttl deleted file mode 100755 index 8df49a4c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-6.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p1 "1"^^xsd:integer . -:x :p1 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-7.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-7.ttl deleted file mode 100755 index 441143c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-7.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix foaf: . - -:john a foaf:Person ; - foaf:name "John Smith" . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.rq deleted file mode 100755 index 15d6ecb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p -{ :x ?p () . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.srx deleted file mode 100755 index 842088a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#list0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.rq deleted file mode 100755 index d0fef0b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p -{ :x ?p (1) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.srx deleted file mode 100755 index 94ef9001..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#list1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.rq deleted file mode 100755 index c28d2d79..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p ?v -{ :x ?p (?v) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.srx deleted file mode 100755 index 849b8323..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example.org/ns#list1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.rq deleted file mode 100755 index a96249d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT ?p ?v ?w -{ :x ?p (?v ?w) . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.srx deleted file mode 100755 index ca2e3544..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.srx +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - http://example.org/ns#list2 - - - 11 - - - 22 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl deleted file mode 100755 index 43063194..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl +++ /dev/null @@ -1,314 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Basic test cases" ; - mf:entries - ( - :base-prefix-1 - :base-prefix-2 - :base-prefix-3 - :base-prefix-4 - :base-prefix-5 - - :list-1 - :list-2 - :list-3 - :list-4 - - :quotes-1 - :quotes-2 - :quotes-3 - :quotes-4 - - :term-1 - :term-2 - :term-3 - :term-4 - :term-5 - :term-6 - :term-7 - :term-8 - :term-9 - - :var-1 - :var-2 - - :bgp-no-match - :spoo-1 - - :prefix-name-1 - ) . - - -:bgp-no-match rdf:type mf:QueryEvaluationTest ; - mf:name "Non-matching triple pattern" ; - rdfs:comment "Patterns not in data don't match" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . -:prefix-name-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Prefix name 1" ; - rdfs:comment "No local name - foo:" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - -:spoo-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic graph pattern - spoo" ; - rdfs:comment "Test the :x :y :o1, :o2 construct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - - -:base-prefix-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:base-prefix-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:base-prefix-5 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:list-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:quotes-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-5 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-6 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 6" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-7 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 7" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-8 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 8" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:term-9 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 9" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:var-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:var-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl.bak deleted file mode 100755 index e675911d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl.bak +++ /dev/null @@ -1,311 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Basic test cases" ; - mf:entries - ( - <#base-prefix-1> - <#base-prefix-2> - <#base-prefix-3> - <#base-prefix-4> - <#base-prefix-5> - - <#list-1> - <#list-2> - <#list-3> - <#list-4> - - <#quotes-1> - <#quotes-2> - <#quotes-3> - <#quotes-4> - - <#term-1> - <#term-2> - <#term-3> - <#term-4> - <#term-5> - <#term-6> - <#term-7> - <#term-8> - <#term-9> - - <#var-1> - <#var-2> - - <#bgp-no-match> - <#spoo-1> - - <#prefix-name-1> - ) . - - -<#bgp-no-match> rdf:type mf:QueryEvaluationTest ; - mf:name "Non-matching triple pattern" ; - rdfs:comment "Patterns not in data don't match" ; - dawgt:approval dawgt:NotApproved ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . -<#prefix-name-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Prefix name 1" ; - rdfs:comment "No local name - foo:" ; - dawgt:approval dawgt:NotApproved ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - -<#spoo-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic graph pattern - spoo" ; - rdfs:comment "Test the :x :y :o1, :o2 construct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result ; - . - - -<#base-prefix-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#base-prefix-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#base-prefix-5> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Prefix/Base 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#list-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - List 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#quotes-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Quotes 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-5> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-6> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 6" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-7> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 7" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-8> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 8" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#term-9> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Term 9" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#var-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#var-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Basic - Var 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.rq deleted file mode 100755 index 5b7d7736..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX ex: -SELECT ?p { - ex: ?p 1 . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.srx deleted file mode 100755 index 16a3e536..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.rq deleted file mode 100755 index 5cf63e25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x -{ ?x ?p '''x''' } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.srx deleted file mode 100755 index d609ea5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.rq deleted file mode 100755 index 7c6ff606..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?x -{ ?x ?p """x""" } - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.srx deleted file mode 100755 index d609ea5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.rq deleted file mode 100755 index 0ceff5b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.rq +++ /dev/null @@ -1,8 +0,0 @@ -# This query uses UNIX line end conventions. -# It is in CVS in binary. -PREFIX : - -SELECT ?x -{ ?x ?p '''x -y''' -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.srx deleted file mode 100755 index 8d717e74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.rq deleted file mode 100755 index e14c9520..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.rq +++ /dev/null @@ -1,9 +0,0 @@ -# This query uses UNIX line end conventions. -# It is in CVS in binary. -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x ?p """x -y"""^^:someType -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.srx deleted file mode 100755 index 04decc5d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.rq deleted file mode 100755 index 364bd6d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?s WHERE { - ?s :p1 1, 2 . -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.srx deleted file mode 100755 index 1dffd09d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#x - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.rq deleted file mode 100755 index 36a4dad9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p true . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.srx deleted file mode 100755 index 16a3e536..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.rq deleted file mode 100755 index a1a9f87b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p false } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.srx deleted file mode 100755 index 0d2e38cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#p2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.rq deleted file mode 100755 index 7d2e2193..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x a ?C . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.srx deleted file mode 100755 index 5e7265b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#C - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.rq deleted file mode 100755 index 7ba3f97e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p 123.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.srx deleted file mode 100755 index 026311f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.rq deleted file mode 100755 index d931af05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p 123.0. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.srx deleted file mode 100755 index 026311f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.rq deleted file mode 100755 index 617c296c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p 456. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.srx deleted file mode 100755 index a26298cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.rq deleted file mode 100755 index 61d1d031..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p 456. . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.srx deleted file mode 100755 index a26298cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.rq deleted file mode 100755 index 4e545bbe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p +5 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.srx deleted file mode 100755 index ed965393..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.rq deleted file mode 100755 index b337b2da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: - -# DOT is part of the decimal. -SELECT * { :x ?p -18 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.srx deleted file mode 100755 index 1d09d855..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/ns#n4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.rq deleted file mode 100755 index cf4f6e93..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p $v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.srx deleted file mode 100755 index 8579a530..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example.org/ns#p2 - - - 2 - - - - - http://example.org/ns#p1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.rq deleted file mode 100755 index 24ad05ca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * { :x ?p $v . :x ?p ?v } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.srx deleted file mode 100755 index 8579a530..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example.org/ns#p2 - - - 2 - - - - - http://example.org/ns#p1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/all-wcprops deleted file mode 100755 index 6f02a3c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference -END -result.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/result.ttl -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl.bak -END -query.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/query.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/data.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/entries deleted file mode 100755 index c0348c4f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/entries +++ /dev/null @@ -1,88 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -result.ttl -file - - - - -2008-02-29T14:57:20.591963Z -a872dde81acdddbfea08b042c196883c -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:20.591963Z -2b1bfc54d36c63cd698bd215361c7247 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query.rq -file - - - - -2008-02-29T14:57:20.607583Z -42acbf677c8ea9615a49f33e02b11ac4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:20.607583Z -8a78465ad41cf987fb0381efc0f3989e -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:20.607583Z -0632d993d6311d2fbae4555a30e65977 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 3eae5a91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "DAWG test cases on bnode co-reference" ; - mf:entries - ( <#dawg-bnode-coref-001>). - -<#dawg-bnode-coref-001> a mf:QueryEvaluationTest ; - mf:name "dawg-bnode-coreference" ; - rdfs:comment - "Query results must maintain bnode co-references in the dataset" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index d5c681c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "DAWG test cases on bnode co-reference" ; - mf:entries - ( :dawg-bnode-coref-001). - -:dawg-bnode-coref-001 a mf:QueryEvaluationTest ; - mf:name "dawg-bnode-coreference" ; - rdfs:comment - "Query results must maintain bnode co-references in the dataset" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/query.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/query.rq.svn-base deleted file mode 100755 index 271d845b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/query.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?x ?y -WHERE { - ?x foaf:knows ?y . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/result.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/result.ttl.svn-base deleted file mode 100755 index 9b9a0cca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/.svn/text-base/result.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "x" , "y" ; - rs:solution [ rs:binding [ rs:value _:b10 ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b1f ; - rs:variable "y" - ] - ] ; - rs:solution [ rs:binding [ rs:value _:b1f ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b10 ; - rs:variable "y" - ] - ] ; - rs:solution [ rs:binding [ rs:value _:b20 ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b21 ; - rs:variable "y" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/data.ttl deleted file mode 100755 index 7bae6256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/data.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl deleted file mode 100755 index d5c681c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "DAWG test cases on bnode co-reference" ; - mf:entries - ( :dawg-bnode-coref-001). - -:dawg-bnode-coref-001 a mf:QueryEvaluationTest ; - mf:name "dawg-bnode-coreference" ; - rdfs:comment - "Query results must maintain bnode co-references in the dataset" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl.bak deleted file mode 100755 index 3eae5a91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl.bak +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "DAWG test cases on bnode co-reference" ; - mf:entries - ( <#dawg-bnode-coref-001>). - -<#dawg-bnode-coref-001> a mf:QueryEvaluationTest ; - mf:name "dawg-bnode-coreference" ; - rdfs:comment - "Query results must maintain bnode co-references in the dataset" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/query.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/query.rq deleted file mode 100755 index 271d845b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/query.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?x ?y -WHERE { - ?x foaf:knows ?y . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/result.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/result.ttl deleted file mode 100755 index 9b9a0cca..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/result.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "x" , "y" ; - rs:solution [ rs:binding [ rs:value _:b10 ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b1f ; - rs:variable "y" - ] - ] ; - rs:solution [ rs:binding [ rs:value _:b1f ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b10 ; - rs:variable "y" - ] - ] ; - rs:solution [ rs:binding [ rs:value _:b20 ; - rs:variable "x" - ] ; - rs:binding [ rs:value _:b21 ; - rs:variable "y" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/all-wcprops deleted file mode 100755 index 006aa233..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/all-wcprops +++ /dev/null @@ -1,113 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value -END -result-boolean-literal.ttl -K 25 -svn:wc:ra_dav:version-url -V 135 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl -END -result-bev-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl -END -result-bev-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl -END -result-bev-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl -END -result-bev-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl -END -result-bev-5.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl -END -result-bev-6.ttl -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl -END -query-boolean-literal.rq -K 25 -svn:wc:ra_dav:version-url -V 133 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq -END -query-bev-1.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq -END -query-bev-2.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq -END -query-bev-3.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq -END -query-bev-4.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq -END -query-bev-5.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq -END -query-bev-6.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl.bak -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl -END -data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl -END -data-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/entries deleted file mode 100755 index bbaa2d34..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/entries +++ /dev/null @@ -1,244 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -result-boolean-literal.ttl -file - - - - -2008-02-29T14:57:18.858076Z -46090ace1c7aa61105c72a763595fdbb -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-1.ttl -file - - - - -2008-02-29T14:57:18.858076Z -3138500f9bd93738bd26228604de8dc9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-2.ttl -file - - - - -2008-02-29T14:57:18.873697Z -06f1ab0f60e855c190c47ccd927bb17d -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-3.ttl -file - - - - -2008-02-29T14:57:18.873697Z -3138500f9bd93738bd26228604de8dc9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-4.ttl -file - - - - -2008-02-29T14:57:18.873697Z -32be10a3e26193b010d43e7cb4c92d0b -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-5.ttl -file - - - - -2008-02-29T14:57:18.889317Z -2ce487768aa94ac00546c8d36cc8ce56 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-bev-6.ttl -file - - - - -2008-02-29T14:57:18.889317Z -d31d03524ba42f29d87a6723df5b9a1f -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-boolean-literal.rq -file - - - - -2008-02-29T14:57:18.889317Z -ce16d4fcd0a1e021ab7a448e7ec3d52e -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-1.rq -file - - - - -2008-02-29T14:57:18.904938Z -aa460a26118565fb2b6091f2cafd5018 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-2.rq -file - - - - -2008-02-29T14:57:18.904938Z -ad684a973ec8d8f5e8df41bb94bfe469 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-3.rq -file - - - - -2008-02-29T14:57:18.904938Z -14eaed3c752ced149cc7fa99c4c915f1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-4.rq -file - - - - -2008-02-29T14:57:18.920558Z -a0778ea86313d650dcca8ffc43e1c2b2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-5.rq -file - - - - -2008-02-29T14:57:18.920558Z -84feea687b4bef594e0df8299a6d90b7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-bev-6.rq -file - - - - -2008-02-29T14:57:18.920558Z -8be4a501b9e711c9bc6b882bc4244963 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:18.936179Z -502fa7278955fba774c695f62f15e07f -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:18.936179Z -a800c1988d91fc18aff4425d93412b02 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-1.ttl -file - - - - -2008-02-29T14:57:18.951800Z -4754047230b690476ed37a8f2575c7a0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-2.ttl -file - - - - -2008-02-29T14:57:18.951800Z -6ecd8238bcc890e403170b65e94c7145 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-1.ttl.svn-base deleted file mode 100755 index aca66708..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-1.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-2.ttl.svn-base deleted file mode 100755 index 0aca15f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/data-2.ttl.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . - -# Optionals -:x1 :q "true"^^xsd:boolean . -:x2 :q "false"^^xsd:boolean . -:x3 :q "foo"^^:unknown . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index f3c5400d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,71 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Test of boolean expressions" ; - mf:entries - ( <#dawg-bev-1> <#dawg-bev-2> <#dawg-bev-3> <#dawg-bev-4> <#dawg-bev-5> <#dawg-bev-6> ) . - -<#dawg-bev-1> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - true" ; - rdfs:comment "Non-zero numerics, non-empty strings, and the true boolean have an EBV of true" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-2> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - false" ; - rdfs:comment "Zero-valued numerics, the empty string, and the false boolean have an EBV of false" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#dawg-bev-3> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - &&" ; - rdfs:comment "The && operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-4> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - ||" ; - rdfs:comment "The || operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-5> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - optional" ; - rdfs:comment "The EBV of an unbound value or a literal with an unknown datatype is a type error, which eliminates the solution in question" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-6> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - unknown types" ; - rdfs:comment "Negating a type error is still a type error" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index a263db91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,81 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Test of boolean expressions" ; - mf:entries - ( :dawg-boolean-literal :dawg-bev-1 :dawg-bev-2 :dawg-bev-3 :dawg-bev-4 :dawg-bev-5 :dawg-bev-6 ) . - -:dawg-boolean-literal a mf:QueryEvaluationTest ; - mf:name "Test literal 'true'" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-1 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - true" ; - rdfs:comment "Non-zero numerics, non-empty strings, and the true boolean have an EBV of true" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-2 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - false" ; - rdfs:comment "Zero-valued numerics, the empty string, and the false boolean have an EBV of false" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:dawg-bev-3 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - &&" ; - rdfs:comment "The && operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-4 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - ||" ; - rdfs:comment "The || operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-5 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - optional" ; - rdfs:comment "The EBV of an unbound value or a literal with an unknown datatype is a type error, which eliminates the solution in question" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-6 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - unknown types" ; - rdfs:comment "Negating a type error is still a type error" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-1.rq.svn-base deleted file mode 100755 index 5d95b4a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-2.rq.svn-base deleted file mode 100755 index a111b2b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ( ! ?v ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-3.rq.svn-base deleted file mode 100755 index 28b34ec5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("true"^^xsd:boolean && ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-4.rq.svn-base deleted file mode 100755 index a8cd28f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("false"^^xsd:boolean || ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-5.rq.svn-base deleted file mode 100755 index 2597ba50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-5.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-6.rq.svn-base deleted file mode 100755 index 912b62fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-bev-6.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a ?w -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER ( ! ?w ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-boolean-literal.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-boolean-literal.rq.svn-base deleted file mode 100755 index 51abe18b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/query-boolean-literal.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -prefix : -select ?x where { - ?x :p "foo" . - FILTER (true) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-1.ttl.svn-base deleted file mode 100755 index 3d340cea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-1.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-2.ttl.svn-base deleted file mode 100755 index 2d0857f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-2.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :y2 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y1 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-3.ttl.svn-base deleted file mode 100755 index 3d340cea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-3.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-4.ttl.svn-base deleted file mode 100755 index ca06331e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-4.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-5.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-5.ttl.svn-base deleted file mode 100755 index 86420ed3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-5.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-6.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-6.ttl.svn-base deleted file mode 100755 index b4b58a72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-bev-6.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "w" ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] ; - rs:binding [ rs:value "false"^^xsd:boolean ; - rs:variable "w" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-boolean-literal.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-boolean-literal.ttl.svn-base deleted file mode 100755 index 59441672..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/.svn/text-base/result-boolean-literal.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "x" - ] - ]. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl deleted file mode 100755 index aca66708..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl deleted file mode 100755 index 0aca15f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl +++ /dev/null @@ -1,19 +0,0 @@ -@prefix : . -@prefix xsd: . - -# These object values are true by the boolean effective value rule. -:x1 :p "1"^^xsd:integer . -:x2 :p "foo" . -:x3 :p "0.01"^^xsd:double . -:x4 :p "true"^^xsd:boolean . - -# These are false -:y1 :p "0"^^xsd:integer . -:y2 :p "0.0"^^xsd:double . -:y3 :p "" . -:y4 :p "false"^^xsd:boolean . - -# Optionals -:x1 :q "true"^^xsd:boolean . -:x2 :q "false"^^xsd:boolean . -:x3 :q "foo"^^:unknown . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl deleted file mode 100755 index a263db91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl +++ /dev/null @@ -1,81 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Test of boolean expressions" ; - mf:entries - ( :dawg-boolean-literal :dawg-bev-1 :dawg-bev-2 :dawg-bev-3 :dawg-bev-4 :dawg-bev-5 :dawg-bev-6 ) . - -:dawg-boolean-literal a mf:QueryEvaluationTest ; - mf:name "Test literal 'true'" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-1 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - true" ; - rdfs:comment "Non-zero numerics, non-empty strings, and the true boolean have an EBV of true" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-2 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - false" ; - rdfs:comment "Zero-valued numerics, the empty string, and the false boolean have an EBV of false" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:dawg-bev-3 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - &&" ; - rdfs:comment "The && operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-4 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - ||" ; - rdfs:comment "The || operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-5 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - optional" ; - rdfs:comment "The EBV of an unbound value or a literal with an unknown datatype is a type error, which eliminates the solution in question" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-bev-6 a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - unknown types" ; - rdfs:comment "Negating a type error is still a type error" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl.bak deleted file mode 100755 index f3c5400d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl.bak +++ /dev/null @@ -1,71 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Test of boolean expressions" ; - mf:entries - ( <#dawg-bev-1> <#dawg-bev-2> <#dawg-bev-3> <#dawg-bev-4> <#dawg-bev-5> <#dawg-bev-6> ) . - -<#dawg-bev-1> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - true" ; - rdfs:comment "Non-zero numerics, non-empty strings, and the true boolean have an EBV of true" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-2> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - false" ; - rdfs:comment "Zero-valued numerics, the empty string, and the false boolean have an EBV of false" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#dawg-bev-3> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - &&" ; - rdfs:comment "The && operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-4> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - ||" ; - rdfs:comment "The || operator takes the EBV of its operands" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-5> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - optional" ; - rdfs:comment "The EBV of an unbound value or a literal with an unknown datatype is a type error, which eliminates the solution in question" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-bev-6> a mf:QueryEvaluationTest ; - mf:name "Test 'boolean effective value' - unknown types" ; - rdfs:comment "Negating a type error is still a type error" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq deleted file mode 100755 index 5d95b4a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER (?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq deleted file mode 100755 index a111b2b2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ( ! ?v ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq deleted file mode 100755 index 28b34ec5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("true"^^xsd:boolean && ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq deleted file mode 100755 index a8cd28f7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - FILTER ("false"^^xsd:boolean || ?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq deleted file mode 100755 index 2597ba50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER (?w) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq deleted file mode 100755 index 912b62fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?a ?w -WHERE - { ?a :p ?v . - OPTIONAL - { ?a :q ?w } . - FILTER ( ! ?w ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq deleted file mode 100755 index 51abe18b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-boolean-literal.rq +++ /dev/null @@ -1,5 +0,0 @@ -prefix : -select ?x where { - ?x :p "foo" . - FILTER (true) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl deleted file mode 100755 index 3d340cea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl deleted file mode 100755 index 2d0857f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :y2 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :y1 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl deleted file mode 100755 index 3d340cea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl deleted file mode 100755 index ca06331e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x4 ; - rs:variable "a" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :x3 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl deleted file mode 100755 index 86420ed3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "a" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl deleted file mode 100755 index b4b58a72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "w" ; - rs:resultVariable "a" ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "a" - ] ; - rs:binding [ rs:value "false"^^xsd:boolean ; - rs:variable "w" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl deleted file mode 100755 index 59441672..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-boolean-literal.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :x2 ; - rs:variable "x" - ] - ]. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/all-wcprops deleted file mode 100755 index c94c7ea6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl.bak -END -bound1-result.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1-result.ttl -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl -END -bound1.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1.rq -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/data.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/entries deleted file mode 100755 index c99dc49e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/entries +++ /dev/null @@ -1,88 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:23.075638Z -16195e881dc4dd6594e6ce1af739c20b -2007-09-20T07:35:41.061956Z -540 -cweiske - -bound1-result.ttl -file - - - - -2008-02-29T14:57:23.091259Z -009406be3eb3b7d402a721cec3d765fc -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:23.091259Z -d70c80411eb275b204965a2d0c788a42 -2007-09-20T07:35:41.061956Z -540 -cweiske - -bound1.rq -file - - - - -2008-02-29T14:57:23.106879Z -06cbdccf02efdeb84a1b2330079e56b3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:23.106879Z -92f49cb3754746730ccf7a56368e4e9b -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1-result.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1-result.ttl.svn-base deleted file mode 100755 index 1ffd834c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1-result.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "a" , "c" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "c" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "c" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1.rq.svn-base deleted file mode 100755 index b3d7f985..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/bound1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -SELECT ?a ?c -WHERE - { ?a :b ?c . - OPTIONAL - { ?c :d ?e } . - FILTER (! bound(?e)) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 50eb82b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index be6aacc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG bound test cases" ; - mf:entries - (<#dawg-bound-query-001>) . - -<#dawg-bound-query-001> a mf:QueryEvaluationTest ; - mf:name "dawg-bound-query-001" ; - rdfs:comment - "BOUND test case." ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 12ab943b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG bound test cases" ; - mf:entries - (:dawg-bound-query-001) . - -:dawg-bound-query-001 a mf:QueryEvaluationTest ; - mf:name "dawg-bound-query-001" ; - rdfs:comment - "BOUND test case." ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1-result.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1-result.ttl deleted file mode 100755 index 1ffd834c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1-result.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "a" , "c" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "c" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "c" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1.rq deleted file mode 100755 index b3d7f985..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -SELECT ?a ?c -WHERE - { ?a :b ?c . - OPTIONAL - { ?c :d ?e } . - FILTER (! bound(?e)) - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/data.ttl deleted file mode 100755 index 50eb82b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/data.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -:a1 :b :c1 . -:c1 :d :e . -:a2 :b :c2 . -:c2 :b :f . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl deleted file mode 100755 index 12ab943b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG bound test cases" ; - mf:entries - (:dawg-bound-query-001) . - -:dawg-bound-query-001 a mf:QueryEvaluationTest ; - mf:name "dawg-bound-query-001" ; - rdfs:comment - "BOUND test case." ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl.bak deleted file mode 100755 index be6aacc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl.bak +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG bound test cases" ; - mf:entries - (<#dawg-bound-query-001>) . - -<#dawg-bound-query-001> a mf:QueryEvaluationTest ; - mf:name "dawg-bound-query-001" ; - rdfs:comment - "BOUND test case." ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/all-wcprops deleted file mode 100755 index e8ff4671..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/all-wcprops +++ /dev/null @@ -1,101 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast -END -cast-dT.rq -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.rq -END -cast-str.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.rq -END -cast-flt.srx -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.srx -END -cast-int.srx -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.srx -END -cast-bool.srx -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.srx -END -cast-dec.srx -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.srx -END -cast-flt.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.rq -END -cast-int.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.rq -END -cast-bool.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.rq -END -cast-dbl.srx -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.srx -END -cast-dec.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/manifest.ttl -END -cast-dT.srx -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.srx -END -cast-dbl.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.rq -END -cast-str.srx -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.srx -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 98 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast/data.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/entries deleted file mode 100755 index c1a1a33a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/entries +++ /dev/null @@ -1,220 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/cast -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -cast-dT.rq -file - - - - -2008-02-29T14:57:19.139247Z -6de04a5b1cf8582c42ab6f51ea2938c4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-str.rq -file - - - - -2008-02-29T14:57:19.139247Z -df2311ccd3191c571247e439a5f7ab36 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-flt.srx -file - - - - -2008-02-29T14:57:19.139247Z -e468aae3076c45e6ab7c91ea64d43fec -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-int.srx -file - - - - -2008-02-29T14:57:19.154867Z -1d0c20a332803fba7f31617c8b4f737e -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-bool.srx -file - - - - -2008-02-29T14:57:19.170488Z -c73e18f956e0314fddd59b386dfc8e5e -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-dec.srx -file - - - - -2008-02-29T14:57:19.154867Z -c741457f75f501e31ab9b65809310f53 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-flt.rq -file - - - - -2008-02-29T14:57:19.154867Z -645d00c5c5a8d246a1ef6b75a2320712 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-int.rq -file - - - - -2008-02-29T14:57:19.170488Z -69dc9b26bb0c258d42c8226a6a6fba27 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-bool.rq -file - - - - -2008-02-29T14:57:19.186109Z -1e2757b3c60327747546035f4cde3c18 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-dbl.srx -file - - - - -2008-02-29T14:57:19.186109Z -e468aae3076c45e6ab7c91ea64d43fec -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-dec.rq -file - - - - -2008-02-29T14:57:19.170488Z -e82b3a11eabd31e137afd1b2d46103dd -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:19.186109Z -5b7798d6ae768878f782f07d35b233d3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-dT.srx -file - - - - -2008-02-29T14:57:19.201729Z -5f9fc343cec38563118fa2d57a462948 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-dbl.rq -file - - - - -2008-02-29T14:57:19.201729Z -c0c6c342abc4cb08dfe8fb3111df2c56 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:19.217350Z -4bba6e0856c13790246d1e3ac6b677e4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -cast-str.srx -file - - - - -2008-02-29T14:57:19.217350Z -e24af4b4e2b0116d3faddda256f80a41 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.rq.svn-base deleted file mode 100755 index 6ad31a13..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:boolean(?v)) = xsd:boolean) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.srx.svn-base deleted file mode 100755 index e0e437b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-bool.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/bool - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.rq.svn-base deleted file mode 100755 index 0282fb4e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:dateTime(?v)) = xsd:dateTime) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.srx.svn-base deleted file mode 100755 index 024c6e0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dT.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/dT - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.rq.svn-base deleted file mode 100755 index 9bc66b7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:double(?v)) = xsd:double) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.srx.svn-base deleted file mode 100755 index 366c18e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dbl.srx.svn-base +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.rq.svn-base deleted file mode 100755 index 5e8f7df6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:decimal(?v)) = xsd:decimal) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.srx.svn-base deleted file mode 100755 index cae1dad4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-dec.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.rq.svn-base deleted file mode 100755 index def3a8ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:float(?v)) = xsd:float) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.srx.svn-base deleted file mode 100755 index 366c18e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-flt.srx.svn-base +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.rq.svn-base deleted file mode 100755 index 02b51389..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:integer(?v)) = xsd:integer) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.srx.svn-base deleted file mode 100755 index 8faa5876..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-int.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.rq.svn-base deleted file mode 100755 index b387ed99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:string(?v)) = xsd:string) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.srx.svn-base deleted file mode 100755 index abdc4a08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/cast-str.srx.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - http://example.org/iri - - - - - http://example.org/str - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - - http://example.org/dT - - - - - http://example.org/bool - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 9aad5483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . - -:iri :p :z . -:str :p "string" . -:fltdbl :p "-10.2E3" . -:decimal :p "+33.3300" . -:int :p "13" . -:dT :p "2002-10-10T17:00:00Z" . -:bool :p "true" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index c6260fbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,83 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Casting" ; - mf:entries - ( - :cast-str - :cast-flt - :cast-dbl - :cast-dec - :cast-int - :cast-dT - :cast-bool - ) . - -:cast-str rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-flt rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dbl rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dec rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-int rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dT rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-bool rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.rq deleted file mode 100755 index 6ad31a13..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:boolean(?v)) = xsd:boolean) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.srx deleted file mode 100755 index e0e437b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-bool.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/bool - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.rq deleted file mode 100755 index 0282fb4e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:dateTime(?v)) = xsd:dateTime) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.srx deleted file mode 100755 index 024c6e0d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dT.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/dT - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.rq deleted file mode 100755 index 9bc66b7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:double(?v)) = xsd:double) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.srx deleted file mode 100755 index 366c18e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dbl.srx +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.rq deleted file mode 100755 index 5e8f7df6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:decimal(?v)) = xsd:decimal) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.srx deleted file mode 100755 index cae1dad4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-dec.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.rq deleted file mode 100755 index def3a8ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:float(?v)) = xsd:float) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.srx deleted file mode 100755 index 366c18e3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-flt.srx +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.rq deleted file mode 100755 index 02b51389..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:integer(?v)) = xsd:integer) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.srx deleted file mode 100755 index 8faa5876..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-int.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/int - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.rq deleted file mode 100755 index b387ed99..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX rdf: -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?v . - FILTER(datatype(xsd:string(?v)) = xsd:string) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.srx deleted file mode 100755 index abdc4a08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/cast-str.srx +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - http://example.org/iri - - - - - http://example.org/str - - - - - http://example.org/fltdbl - - - - - http://example.org/decimal - - - - - http://example.org/int - - - - - http://example.org/dT - - - - - http://example.org/bool - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/data.ttl deleted file mode 100755 index 9aad5483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/data.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . - -:iri :p :z . -:str :p "string" . -:fltdbl :p "-10.2E3" . -:decimal :p "+33.3300" . -:int :p "13" . -:dT :p "2002-10-10T17:00:00Z" . -:bool :p "true" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/manifest.ttl deleted file mode 100755 index c6260fbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/cast/manifest.ttl +++ /dev/null @@ -1,83 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Casting" ; - mf:entries - ( - :cast-str - :cast-flt - :cast-dbl - :cast-dec - :cast-int - :cast-dT - :cast-bool - ) . - -:cast-str rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-flt rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dbl rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dec rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-int rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-dT rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:cast-bool rdf:type mf:QueryEvaluationTest ; - mf:name "Cast to xsd:string" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/all-wcprops deleted file mode 100755 index 949e8af9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/all-wcprops +++ /dev/null @@ -1,89 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 94 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct -END -query-subgraph.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-subgraph.rq -END -result-ident.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-ident.ttl -END -result-reif.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-reif.ttl -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl.bak -END -result-construct-optional.ttl -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-construct-optional.ttl -END -query-ident.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-ident.rq -END -query-reif-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-1.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl -END -query-reif-2.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-2.rq -END -result-subgraph.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-subgraph.ttl -END -data-opt.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-opt.ttl -END -query-construct-optional.rq -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-construct-optional.rq -END -data-ident.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-ident.ttl -END -data-reif.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-reif.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/entries deleted file mode 100755 index df6eea6c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/entries +++ /dev/null @@ -1,196 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -query-subgraph.rq -file - - - - -2008-02-29T14:57:13.547072Z -e121f7bcd9db472a61da259bf39e6795 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-ident.ttl -file - - - - -2008-02-29T14:57:13.547072Z -5a201331c2662776571b53993d4e9c94 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-reif.ttl -file - - - - -2008-02-29T14:57:13.562693Z -faff0baaeccdc72a3886804171b2b270 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:13.562693Z -1e98ef33bb053a9572ad639c415fc109 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-construct-optional.ttl -file - - - - -2008-02-29T14:57:13.562693Z -e801a33d8e9b2092f938b01bc18e1fc9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-ident.rq -file - - - - -2008-02-29T14:57:13.578313Z -65fb270d43bcbd40f2796ddd8ca7cdcb -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-reif-1.rq -file - - - - -2008-02-29T14:57:13.578313Z -88dfec268d584edf558f4c864db063e9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:13.593934Z -ed8824cbb18dfd723a1453e481b1e977 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-reif-2.rq -file - - - - -2008-02-29T14:57:13.593934Z -840948bd522cc1cc37f215f6391ff58b -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-subgraph.ttl -file - - - - -2008-02-29T14:57:13.593934Z -1aa08d6415de7821843123d5f923bb3d -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-opt.ttl -file - - - - -2008-02-29T14:57:13.609554Z -e612aac4e53d01f2a9907d2d93373278 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-construct-optional.rq -file - - - - -2008-02-29T14:57:13.609554Z -d6fb20de3fa74860be86cbe6eb6943c0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-ident.ttl -file - - - - -2008-02-29T14:57:13.609554Z -35920ca1c18b489cc6791ca07677f978 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-reif.ttl -file - - - - -2008-02-29T14:57:13.625175Z -dc1d648d8dfd257e00fada5d82b8d697 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-ident.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-ident.ttl.svn-base deleted file mode 100755 index 4b408e4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-ident.ttl.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-opt.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-opt.ttl.svn-base deleted file mode 100755 index f3f86dc3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-opt.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p :a . -:x :p :b . -:x :p :c . -:x :p "1"^^xsd:integer . - -:a :q "2"^^xsd:integer . -:a :r "2"^^xsd:integer . - -:b :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-reif.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-reif.ttl.svn-base deleted file mode 100755 index 185c5e7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/data-reif.ttl.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index fba88eb1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,71 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "Some DAWG test cases on the CONSTRUCT result form" ; - mf:entries - ( - <#construct-1> - <#construct-2> - <#construct-3> - <#construct-4> - <#construct-5> - ) . - -<#construct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "dawg-construct-identity" ; - rdfs:comment "Graph equivalent result graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-2> - mf:name "dawg-construct-subgraph" ; - rdfs:comment "Result subgraph of original graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-3> - mf:name "dawg-construct-reification-1" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-4> - mf:name "dawg-construct-reification-2" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-5> - mf:name "dawg-construct-optional" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 77686eb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "Some DAWG test cases on the CONSTRUCT result form" ; - mf:entries - ( - :construct-1 - :construct-2 - :construct-3 - :construct-4 - :construct-5 - ) . - -:construct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "dawg-construct-identity" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Graph equivalent result graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-2 - mf:name "dawg-construct-subgraph" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Result subgraph of original graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-3 - mf:name "dawg-construct-reification-1" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-4 - mf:name "dawg-construct-reification-2" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-5 - mf:name "dawg-construct-optional" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-construct-optional.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-construct-optional.rq.svn-base deleted file mode 100755 index 038c28c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-construct-optional.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -CONSTRUCT { ?x :p2 ?v } - -WHERE -{ - ?x :p ?o . - OPTIONAL {?o :q ?v } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-ident.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-ident.rq.svn-base deleted file mode 100755 index f44f0637..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-ident.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { ?s ?p ?o . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-1.rq.svn-base deleted file mode 100755 index 2d4d9f00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { [ rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o ] . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-2.rq.svn-base deleted file mode 100755 index 959e1595..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-reif-2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { _:a rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-subgraph.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-subgraph.rq.svn-base deleted file mode 100755 index f6177f08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/query-subgraph.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { ?s foaf:name ?o . } -WHERE { - ?s foaf:name ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-construct-optional.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-construct-optional.ttl.svn-base deleted file mode 100755 index 85e3fcbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-construct-optional.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p2 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-ident.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-ident.ttl.svn-base deleted file mode 100755 index 35ece1db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-ident.ttl.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:gff - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:g2a ; - . - -_:g2a - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:gff ; - foaf:mbox ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-reif.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-reif.ttl.svn-base deleted file mode 100755 index 1b7eb7de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-reif.ttl.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:subject _:gff ; - rdf:predicate rdf:type ; - rdf:object foaf:Person . - -[] rdf:subject _:gff ; - rdf:predicate foaf:name ; - rdf:object "Alice" . - -[] rdf:subject _:gff ; - rdf:predicate foaf:mbox ; - rdf:object . - -[] rdf:subject _:gff ; - rdf:predicate foaf:knows ; - rdf:object _:g2a . - -[] rdf:subject _:g2a ; - rdf:predicate rdf:type ; - rdf:object foaf:Person . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:name ; - rdf:object "Bob" . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:knows ; - rdf:object _:gff . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:mbox ; - rdf:object . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-subgraph.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-subgraph.ttl.svn-base deleted file mode 100755 index 3e226a85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/.svn/text-base/result-subgraph.ttl.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:gff foaf:name "Alice" . - -_:g2a foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-ident.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-ident.ttl deleted file mode 100755 index 4b408e4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-ident.ttl +++ /dev/null @@ -1,18 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-opt.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-opt.ttl deleted file mode 100755 index f3f86dc3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-opt.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p :a . -:x :p :b . -:x :p :c . -:x :p "1"^^xsd:integer . - -:a :q "2"^^xsd:integer . -:a :r "2"^^xsd:integer . - -:b :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-reif.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-reif.ttl deleted file mode 100755 index 185c5e7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-reif.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl deleted file mode 100755 index 77686eb3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl +++ /dev/null @@ -1,77 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "Some DAWG test cases on the CONSTRUCT result form" ; - mf:entries - ( - :construct-1 - :construct-2 - :construct-3 - :construct-4 - :construct-5 - ) . - -:construct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "dawg-construct-identity" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Graph equivalent result graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-2 - mf:name "dawg-construct-subgraph" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Result subgraph of original graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-3 - mf:name "dawg-construct-reification-1" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-4 - mf:name "dawg-construct-reification-2" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -:construct-5 - mf:name "dawg-construct-optional" ; - qt:queryForm qt:QueryConstruct ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl.bak deleted file mode 100755 index fba88eb1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl.bak +++ /dev/null @@ -1,71 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -[] rdf:type mf:Manifest ; - rdfs:comment "Some DAWG test cases on the CONSTRUCT result form" ; - mf:entries - ( - <#construct-1> - <#construct-2> - <#construct-3> - <#construct-4> - <#construct-5> - ) . - -<#construct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "dawg-construct-identity" ; - rdfs:comment "Graph equivalent result graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-2> - mf:name "dawg-construct-subgraph" ; - rdfs:comment "Result subgraph of original graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-3> - mf:name "dawg-construct-reification-1" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-4> - mf:name "dawg-construct-reification-2" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . - -<#construct-5> - mf:name "dawg-construct-optional" ; - rdfs:comment "Reification of the default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-construct-optional.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-construct-optional.rq deleted file mode 100755 index 038c28c7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-construct-optional.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -CONSTRUCT { ?x :p2 ?v } - -WHERE -{ - ?x :p ?o . - OPTIONAL {?o :q ?v } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-ident.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-ident.rq deleted file mode 100755 index f44f0637..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-ident.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { ?s ?p ?o . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-1.rq deleted file mode 100755 index 2d4d9f00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-1.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { [ rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o ] . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-2.rq deleted file mode 100755 index 959e1595..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-2.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { _:a rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o . } -WHERE { - ?s ?p ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-subgraph.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-subgraph.rq deleted file mode 100755 index f6177f08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-subgraph.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -CONSTRUCT { ?s foaf:name ?o . } -WHERE { - ?s foaf:name ?o . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-construct-optional.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-construct-optional.ttl deleted file mode 100755 index 85e3fcbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-construct-optional.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p2 "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-ident.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-ident.ttl deleted file mode 100755 index 35ece1db..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-ident.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:gff - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:g2a ; - . - -_:g2a - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:gff ; - foaf:mbox ; - foaf:mbox ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-reif.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-reif.ttl deleted file mode 100755 index 1b7eb7de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-reif.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:subject _:gff ; - rdf:predicate rdf:type ; - rdf:object foaf:Person . - -[] rdf:subject _:gff ; - rdf:predicate foaf:name ; - rdf:object "Alice" . - -[] rdf:subject _:gff ; - rdf:predicate foaf:mbox ; - rdf:object . - -[] rdf:subject _:gff ; - rdf:predicate foaf:knows ; - rdf:object _:g2a . - -[] rdf:subject _:g2a ; - rdf:predicate rdf:type ; - rdf:object foaf:Person . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:name ; - rdf:object "Bob" . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:knows ; - rdf:object _:gff . - -[] rdf:subject _:g2a ; - rdf:predicate foaf:mbox ; - rdf:object . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-subgraph.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-subgraph.ttl deleted file mode 100755 index 3e226a85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-subgraph.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -_:gff foaf:name "Alice" . - -_:g2a foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/all-wcprops deleted file mode 100755 index d457a836..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/all-wcprops +++ /dev/null @@ -1,185 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 92 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset -END -data-g1.ttl -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g1.ttl -END -data-g2.ttl -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g2.ttl -END -data-g3.ttl -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g3.ttl -END -data-g4.ttl -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g4.ttl -END -dataset-10.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.rq -END -dataset-01.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.rq -END -dataset-11.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.rq -END -dataset-02.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.rq -END -dataset-12.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.rq -END -dataset-03.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.rq -END -dataset-04.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.rq -END -dataset-05.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.rq -END -dataset-06.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.rq -END -dataset-07.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.rq -END -dataset-08.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.rq -END -dataset-09.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl.bak -END -dataset-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.ttl -END -dataset-10.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.ttl -END -dataset-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.ttl -END -dataset-11.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.ttl -END -dataset-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.ttl -END -dataset-12.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.ttl -END -dataset-04.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.ttl -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl -END -dataset-05.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.ttl -END -dataset-06.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.ttl -END -dataset-07.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.ttl -END -dataset-08.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.ttl -END -dataset-09.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/entries deleted file mode 100755 index c706d9ba..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/entries +++ /dev/null @@ -1,388 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -data-g1.ttl -file - - - - -2008-02-29T14:57:14.249999Z -0bc91782b3e4ca3bd14a3803910b96cf -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g2.ttl -file - - - - -2008-02-29T14:57:14.249999Z -841aeffc35fbf8873feac4fd62398918 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g3.ttl -file - - - - -2008-02-29T14:57:14.249999Z -4c288303f6f235ac895d43f063c038c9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g4.ttl -file - - - - -2008-02-29T14:57:14.265620Z -56428a99bd98d63a8734b7f3d59cdae8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-10.rq -file - - - - -2008-02-29T14:57:14.265620Z -f38581373d47705ef3c406b5997977d2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-01.rq -file - - - - -2008-02-29T14:57:14.265620Z -740c1886bde178eb2a57d5cab0eeaed3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-11.rq -file - - - - -2008-02-29T14:57:14.281240Z -34d8cee79e0ac4bb034ed419c30964c1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-02.rq -file - - - - -2008-02-29T14:57:14.281240Z -f3bb5c4fcb710a5042b2de446f9bb04c -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-12.rq -file - - - - -2008-02-29T14:57:14.296861Z -0a56620325f4e694cf731d9ea6519b2d -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-03.rq -file - - - - -2008-02-29T14:57:14.281240Z -e693ff98ab32b6bbc617606a4e4f1b92 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-04.rq -file - - - - -2008-02-29T14:57:14.296861Z -e2bad20db8b933e646d0bdcf0156c610 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-05.rq -file - - - - -2008-02-29T14:57:14.296861Z -0dbdf9aad53712be11f3833dffaee83a -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-06.rq -file - - - - -2008-02-29T14:57:14.312481Z -97b3f65151694bef984a3a4857695288 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-07.rq -file - - - - -2008-02-29T14:57:14.312481Z -a21945dd0b2335364f53dab33117f095 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-08.rq -file - - - - -2008-02-29T14:57:14.312481Z -81a817703c8b8372d9ee2787a518e876 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-09.rq -file - - - - -2008-02-29T14:57:14.328102Z -a85461639a848fdb6f2646e424647e30 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:14.328102Z -38bd5c77db8c07759442d77a9749fa92 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-01.ttl -file - - - - -2008-02-29T14:57:14.328102Z -bcee59598ce485052e4dbe87d1e1ad97 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-10.ttl -file - - - - -2008-02-29T14:57:14.343723Z -a2f9dd52f172e7ca9967dbc316162780 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-02.ttl -file - - - - -2008-02-29T14:57:14.343723Z -a58126467b8472bfb43ad6d2f28c1d16 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-11.ttl -file - - - - -2008-02-29T14:57:14.359343Z -9f2c3f9531d2051e4db103e464585f16 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-03.ttl -file - - - - -2008-02-29T14:57:14.359343Z -629ef7b45ac8d4327e6b897e8acf3f45 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-12.ttl -file - - - - -2008-02-29T14:57:14.359343Z -8f139cf27c35b832cfd607b406789efb -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-04.ttl -file - - - - -2008-02-29T14:57:14.374964Z -81ba86ade586e7ef99588fc0b9fc84cc -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:14.374964Z -7cbc4a8648437d51a8c5cb3383536760 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-05.ttl -file - - - - -2008-02-29T14:57:14.390584Z -79f389f096af1d33e5f67673196577fc -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-06.ttl -file - - - - -2008-02-29T14:57:14.390584Z -6e25281c171353366cd3d9f9be11a2c0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-07.ttl -file - - - - -2008-02-29T14:57:14.406205Z -8a9c3c0200458538a5c01c66ae88e162 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-08.ttl -file - - - - -2008-02-29T14:57:14.406205Z -07ed7c514b5080994319ff5e1e32c169 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dataset-09.ttl -file - - - - -2008-02-29T14:57:14.421826Z -a2f9dd52f172e7ca9967dbc316162780 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g1.ttl.svn-base deleted file mode 100755 index 363d37aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g1.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g2.ttl.svn-base deleted file mode 100755 index dbe42fe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g2.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g3.ttl.svn-base deleted file mode 100755 index c82fcb98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g3.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g4.ttl.svn-base deleted file mode 100755 index f3f826a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/data-g4.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.rq.svn-base deleted file mode 100755 index 99b34961..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -FROM -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.ttl.svn-base deleted file mode 100755 index 8e4d2587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-01.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.rq.svn-base deleted file mode 100755 index 2baaae15..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -FROM NAMED -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.ttl.svn-base deleted file mode 100755 index 4472d7a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-02.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.rq.svn-base deleted file mode 100755 index a92db837..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM NAMED -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.ttl.svn-base deleted file mode 100755 index cb59bc8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-03.ttl.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.rq.svn-base deleted file mode 100755 index 5bfb8b48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.ttl.svn-base deleted file mode 100755 index 0c556901..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-04.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.rq.svn-base deleted file mode 100755 index 26199c94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.ttl.svn-base deleted file mode 100755 index d6ca97f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-05.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.rq.svn-base deleted file mode 100755 index abc05d57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.ttl.svn-base deleted file mode 100755 index b06d28de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-06.ttl.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.rq.svn-base deleted file mode 100755 index 81064143..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.ttl.svn-base deleted file mode 100755 index dd1f7922..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-07.ttl.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.rq.svn-base deleted file mode 100755 index 7153bd9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.ttl.svn-base deleted file mode 100755 index 58c376fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-08.ttl.svn-base +++ /dev/null @@ -1,31 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "q" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.rq.svn-base deleted file mode 100755 index 1ac303b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED { - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.ttl.svn-base deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-09.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.rq.svn-base deleted file mode 100755 index b6ac7a1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.ttl.svn-base deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-10.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.rq.svn-base deleted file mode 100755 index d7ec5925..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.rq.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -FROM NAMED -FROM NAMED -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.ttl.svn-base deleted file mode 100755 index 5dac03f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-11.ttl.svn-base +++ /dev/null @@ -1,108 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.rq.svn-base deleted file mode 100755 index 54c1b8cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.rq.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM -FROM -FROM -FROM NAMED -FROM NAMED -FROM NAMED -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.ttl.svn-base deleted file mode 100755 index 72c4c762..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/dataset-12.ttl.svn-base +++ /dev/null @@ -1,148 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index f00873cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - <#dawg-dataset-01> - <#dawg-dataset-02> - <#dawg-dataset-03> - <#dawg-dataset-04> - <#dawg-dataset-05> - <#dawg-dataset-06> - <#dawg-dataset-07> - <#dawg-dataset-08> - <#dawg-dataset-09> - <#dawg-dataset-10> - <#dawg-dataset-11> - <#dawg-dataset-12> - ). - -<#dawg-dataset-01> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-01" ; - rdfs:comment "Data: default dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-02> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-02" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-03> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-03" ; - rdfs:comment "Data: named dataset / Query: named dataset dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-04> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-04" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-05> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-05" ; - rdfs:comment "Data: default and named / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-06> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-06" ; - rdfs:comment "Data: default and named / Query: named dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-07> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-08> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-09> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-10> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-11> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-12> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-12" ; - rdfs:comment "Data: default (several) and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 31ef8529..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,144 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - :dawg-dataset-01 - :dawg-dataset-02 - :dawg-dataset-03 - :dawg-dataset-04 - :dawg-dataset-05 - :dawg-dataset-06 - :dawg-dataset-07 - :dawg-dataset-08 - :dawg-dataset-09 - :dawg-dataset-10 - :dawg-dataset-11 - :dawg-dataset-12 - ). - -:dawg-dataset-01 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-01" ; - rdfs:comment "Data: default dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-02 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-02" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-03 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-03" ; - rdfs:comment "Data: named dataset / Query: named dataset dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-04 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-04" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-05 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-05" ; - rdfs:comment "Data: default and named / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-06 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-06" ; - rdfs:comment "Data: default and named / Query: named dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-07 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-08 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-09 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-10 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-11 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-12 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-12" ; - rdfs:comment "Data: default (several) and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g1.ttl deleted file mode 100755 index 363d37aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g1.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g2.ttl deleted file mode 100755 index dbe42fe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g2.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g3.ttl deleted file mode 100755 index c82fcb98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g3.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g4.ttl deleted file mode 100755 index f3f826a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g4.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.rq deleted file mode 100755 index 99b34961..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -FROM -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.ttl deleted file mode 100755 index 8e4d2587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.rq deleted file mode 100755 index 2baaae15..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -FROM NAMED -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.ttl deleted file mode 100755 index 4472d7a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.rq deleted file mode 100755 index a92db837..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM NAMED -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.ttl deleted file mode 100755 index cb59bc8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.rq deleted file mode 100755 index 5bfb8b48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.ttl deleted file mode 100755 index 0c556901..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.rq deleted file mode 100755 index 26199c94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.ttl deleted file mode 100755 index d6ca97f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.rq deleted file mode 100755 index abc05d57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.ttl deleted file mode 100755 index b06d28de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.rq deleted file mode 100755 index 81064143..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.ttl deleted file mode 100755 index dd1f7922..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.rq deleted file mode 100755 index 7153bd9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.ttl deleted file mode 100755 index 58c376fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "q" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.rq deleted file mode 100755 index 1ac303b6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED { - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.ttl deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.rq deleted file mode 100755 index b6ac7a1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.ttl deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.rq deleted file mode 100755 index d7ec5925..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.rq +++ /dev/null @@ -1,13 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM NAMED -FROM NAMED -FROM NAMED -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.ttl deleted file mode 100755 index 5dac03f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.ttl +++ /dev/null @@ -1,108 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.rq deleted file mode 100755 index 54c1b8cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.rq +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX : - -SELECT * -FROM -FROM -FROM -FROM -FROM NAMED -FROM NAMED -FROM NAMED -FROM NAMED -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.ttl deleted file mode 100755 index 72c4c762..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.ttl +++ /dev/null @@ -1,148 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl deleted file mode 100755 index 31ef8529..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl +++ /dev/null @@ -1,144 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - :dawg-dataset-01 - :dawg-dataset-02 - :dawg-dataset-03 - :dawg-dataset-04 - :dawg-dataset-05 - :dawg-dataset-06 - :dawg-dataset-07 - :dawg-dataset-08 - :dawg-dataset-09 - :dawg-dataset-10 - :dawg-dataset-11 - :dawg-dataset-12 - ). - -:dawg-dataset-01 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-01" ; - rdfs:comment "Data: default dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-02 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-02" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-03 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-03" ; - rdfs:comment "Data: named dataset / Query: named dataset dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-04 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-04" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-05 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-05" ; - rdfs:comment "Data: default and named / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-06 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-06" ; - rdfs:comment "Data: default and named / Query: named dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-07 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-08 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-09 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-10 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-11 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -:dawg-dataset-12 rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-12" ; - rdfs:comment "Data: default (several) and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl.bak deleted file mode 100755 index f00873cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl.bak +++ /dev/null @@ -1,143 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - <#dawg-dataset-01> - <#dawg-dataset-02> - <#dawg-dataset-03> - <#dawg-dataset-04> - <#dawg-dataset-05> - <#dawg-dataset-06> - <#dawg-dataset-07> - <#dawg-dataset-08> - <#dawg-dataset-09> - <#dawg-dataset-10> - <#dawg-dataset-11> - <#dawg-dataset-12> - ). - -<#dawg-dataset-01> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-01" ; - rdfs:comment "Data: default dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-02> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-02" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-03> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-03" ; - rdfs:comment "Data: named dataset / Query: named dataset dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-04> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-04" ; - rdfs:comment "Data: named dataset / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-05> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-05" ; - rdfs:comment "Data: default and named / Query: default dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-06> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-06" ; - rdfs:comment "Data: default and named / Query: named dataset" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-07> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-08> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-09> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-10> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-11> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . - -<#dawg-dataset-12> rdf:type mf:QueryEvaluationTest ; - mf:name "dataset-12" ; - rdfs:comment "Data: default (several) and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/all-wcprops deleted file mode 100755 index 73213be8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/all-wcprops +++ /dev/null @@ -1,155 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct -END -distinct-node.srx -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-node.srx -END -data-all.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-all.ttl -END -data-str.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-str.ttl -END -data-star.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-star.ttl -END -no-distinct-node.srx -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-node.srx -END -distinct-1-results.srx -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1-results.srx -END -distinct-num.srx -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-num.srx -END -distinct-opt.srx -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-opt.srx -END -data-node.ttl -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-node.ttl -END -distinct-1.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1.rq -END -distinct-2.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-2.rq -END -distinct-star-1.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.srx -END -distinct-all.srx -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-all.srx -END -distinct-str.srx -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-str.srx -END -no-distinct-num.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-num.srx -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl.bak -END -no-distinct-opt.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-opt.srx -END -distinct-star-1.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.rq -END -data-num.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-num.ttl -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl -END -no-distinct-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-1.rq -END -data-opt.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-opt.ttl -END -no-distinct-2.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-2.rq -END -no-distinct-all.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-all.srx -END -no-distinct-str.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-str.srx -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/entries deleted file mode 100755 index 12cf9e1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/entries +++ /dev/null @@ -1,328 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -distinct-node.srx -file - - - - -2008-02-29T14:57:13.234660Z -652509b33c3adb0140db365a0ad96996 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-all.ttl -file - - - - -2008-02-29T14:57:13.250281Z -dcc3233acd5e844b2c15d3e66186ce03 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-str.ttl -file - - - - -2008-02-29T14:57:13.234660Z -f4723d00ea0e2975bc5499c14429c171 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-star.ttl -file - - - - -2008-02-29T14:57:13.250281Z -2ad5d4d595d629bab3dbbba510d91267 -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-node.srx -file - - - - -2008-02-29T14:57:13.265901Z -174410017d325f022279057bff2ec500 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-1-results.srx -file - - - - -2008-02-29T14:57:13.265901Z -5332555b08b6595228269cc954c3e497 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-num.srx -file - - - - -2008-02-29T14:57:13.265901Z -eb1887df52e4670c285a4433dfad3aa3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-opt.srx -file - - - - -2008-02-29T14:57:13.281522Z -07520511f124d1117fabfdef3414095a -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-node.ttl -file - - - - -2008-02-29T14:57:13.281522Z -96934fabbf81f5f14338fbb9992b1d74 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-1.rq -file - - - - -2008-02-29T14:57:13.281522Z -200b279e3d214be00b189be61b45fb69 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-2.rq -file - - - - -2008-02-29T14:57:13.297142Z -d25fa055cba71e4a5ac372e0b80c4955 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-star-1.srx -file - - - - -2008-02-29T14:57:13.297142Z -af14399a305ad73d307e0e23c1c261f2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-all.srx -file - - - - -2008-02-29T14:57:13.312763Z -38a270ce49c2069f4dfa8bda7dbd36af -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-str.srx -file - - - - -2008-02-29T14:57:13.312763Z -f4e19b29735a179343fd8a04d5382544 -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-num.srx -file - - - - -2008-02-29T14:57:13.312763Z -edbd2322585b182e873abfaee0d8b28e -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:13.328384Z -7de67e0a71b7b454d9f897af29d7e24d -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-opt.srx -file - - - - -2008-02-29T14:57:13.328384Z -b65eb73a105a27a114c4e084d7205df9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -distinct-star-1.rq -file - - - - -2008-02-29T14:57:13.344004Z -702577eab771dfc66bab6a1c74585c35 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-num.ttl -file - - - - -2008-02-29T14:57:13.344004Z -03d44f25412206e3b75257807e051930 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:13.344004Z -14a37ae26b844ee1707d4a3966ca8f83 -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-1.rq -file - - - - -2008-02-29T14:57:13.359625Z -c152f640b073919a35f03cbe4fc61c5f -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-opt.ttl -file - - - - -2008-02-29T14:57:13.359625Z -142e10c4e81a2301b70a167ea765d56f -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-2.rq -file - - - - -2008-02-29T14:57:13.359625Z -dd6db53d256c249d1b351890d9b5650c -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-all.srx -file - - - - -2008-02-29T14:57:13.375245Z -17e64e113cb06a1e23de50f7a03f4967 -2007-09-20T07:35:41.061956Z -540 -cweiske - -no-distinct-str.srx -file - - - - -2008-02-29T14:57:13.375245Z -ca40e03ceb6b0ec3688540638a56668a -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-all.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-all.ttl.svn-base deleted file mode 100755 index a5a0f22a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-all.ttl.svn-base +++ /dev/null @@ -1,74 +0,0 @@ -## data-num.ttl -@prefix : . -@prefix xsd: . - -:x1 :p1 "1"^^xsd:integer . -:x1 :p2 "1"^^xsd:integer . - -:x2 :p1 "1"^^xsd:integer . -:x2 :p2 "1"^^xsd:integer . - -:x3 :p1 "01"^^xsd:integer . -:x3 :p2 "01"^^xsd:integer . - -:x4 :p1 "+1"^^xsd:integer . -:x4 :p2 "+1"^^xsd:integer . - -:y1 :p1 "1.0"^^xsd:decimal . -:y1 :p2 "1.0"^^xsd:decimal . - -:y2 :p1 "+1.0"^^xsd:decimal . -:y2 :p2 "+1.0"^^xsd:decimal . - -:y3 :p1 "01.0"^^xsd:decimal . -:y3 :p2 "01.0"^^xsd:decimal . - -:z1 :p1 "1.0e0"^^xsd:double . -:z1 :p2 "1.0e0"^^xsd:double . - -:z2 :p1 "1.0e0"^^xsd:double . -:z2 :p2 "1.0e0"^^xsd:double . - -:z3 :p1 "1.3e0"^^xsd:double . -:z3 :p2 "1.3e0"^^xsd:double . - -:z4 :p1 "1.3e0"^^xsd:double . -:z5 :p1 "1.3e0"^^xsd:float . - -## data-str.ttl - -:x1 :p "abc" . -:x1 :q "abc" . - -:x2 :p "abc"@en . -:x2 :q "abc"@en . - -:x3 :p "ABC" . -:x3 :q "ABC" . - -:x4 :p "ABC"@en . -:x4 :q "ABC"@en . - - -:x5 :p "abc"^^xsd:string . -:x5 :q "abc"^^xsd:string . -:x6 :p "ABC"^^xsd:string . -:x6 :q "ABC"^^xsd:string . - -:x7 :p "" . -:x7 :q "" . - -:x8 :p ""@en . -:x8 :q ""@en . - -:x9 :p ""^^xsd:string . -:x9 :q ""^^xsd:string . - -## data-node.ttl - -:x1 :p1 :z1 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 _:a . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-node.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-node.ttl.svn-base deleted file mode 100755 index 0166e4cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-node.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 :z1 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 _:a . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-num.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-num.ttl.svn-base deleted file mode 100755 index b5e4e037..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-num.ttl.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 "1"^^xsd:integer . -:x1 :p2 "1"^^xsd:integer . - -:x2 :p1 "1"^^xsd:integer . -:x2 :p2 "1"^^xsd:integer . - -:x3 :p1 "01"^^xsd:integer . -:x3 :p2 "01"^^xsd:integer . - -:x4 :p1 "+1"^^xsd:integer . -:x4 :p2 "+1"^^xsd:integer . - -:y1 :p1 "1.0"^^xsd:decimal . -:y1 :p2 "1.0"^^xsd:decimal . - -:y2 :p1 "+1.0"^^xsd:decimal . -:y2 :p2 "+1.0"^^xsd:decimal . - -:y3 :p1 "01.0"^^xsd:decimal . -:y3 :p2 "01.0"^^xsd:decimal . - -:z1 :p1 "1.0e0"^^xsd:double . -:z1 :p2 "1.0e0"^^xsd:double . - -:z2 :p1 "1.0e0"^^xsd:double . -:z2 :p2 "1.0e0"^^xsd:double . - -:z3 :p1 "1.3e0"^^xsd:double . -:z3 :p2 "1.3e0"^^xsd:double . - -:z4 :p1 "1.3e0"^^xsd:double . -:z5 :p1 "1.3e0"^^xsd:float . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-opt.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-opt.ttl.svn-base deleted file mode 100755 index 1326d212..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-opt.ttl.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 :z1 . -:x1 :p1 :z2 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 :z2 . -:x1 :p2 _:a . - -:z1 :q :r . -_:a :q :s . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-star.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-star.ttl.svn-base deleted file mode 100755 index 5aed9bb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-star.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "abc" . -:x1 :q "abc" . -:x2 :p "abc" . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-str.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-str.ttl.svn-base deleted file mode 100755 index 6c0dbb24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/data-str.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "abc" . -:x1 :q "abc" . - -:x2 :p "abc"@en . -:x2 :q "abc"@en . - -:x3 :p "ABC" . -:x3 :q "ABC" . - -:x4 :p "ABC"@en . -:x4 :q "ABC"@en . - - -:x5 :p "abc"^^xsd:string . -:x5 :q "abc"^^xsd:string . -:x6 :p "ABC"^^xsd:string . -:x6 :q "ABC"^^xsd:string . - -:x7 :p "" . -:x7 :q "" . - -:x8 :p ""@en . -:x8 :q ""@en . - -:x9 :p ""^^xsd:string . -:x9 :q ""^^xsd:string . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1-results.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1-results.srx.svn-base deleted file mode 100755 index 96cc0ff9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1-results.srx.svn-base +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - 1 - - - - - 1.0 - - - - - 1.3 - - - - - +1 - - - - - +1.0 - - - - - 1.3e0 - - - - - 01 - - - - - 01.0 - - - - - +1.3e0 - - - - - 1.3e0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1.rq.svn-base deleted file mode 100755 index 3b182219..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT DISTINCT ?v -{ - ?x ?p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-2.rq.svn-base deleted file mode 100755 index f423c602..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT DISTINCT ?v -{ - :x1 ?p ?o - OPTIONAL { ?o :q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-all.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-all.srx.svn-base deleted file mode 100755 index 963d208e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-all.srx.svn-base +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - ABC - - - - - 1.3e0 - - - - - abc - - - - - 1.3e0 - - - - - ABC - - - - - +1 - - - - - 01.0 - - - - - ABC - - - - - 01 - - - - - - - - - - 1.0e0 - - - - - +1.0 - - - - - abc - - - - - 1 - - - - - - - - - - 1.0 - - - - - b0 - - - - - http://example/z1 - - - - - abc - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-node.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-node.srx.svn-base deleted file mode 100755 index 7f88f2b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-node.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - b0 - - - - - http://example/z1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-num.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-num.srx.svn-base deleted file mode 100755 index 71b81a62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-num.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - 1.3e0 - - - - - 1.3e0 - - - - - +1 - - - - - 01.0 - - - - - 01 - - - - - 1.0e0 - - - - - +1.0 - - - - - 1 - - - - - 1.0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-opt.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-opt.srx.svn-base deleted file mode 100755 index daf6272d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-opt.srx.svn-base +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - http://example/s - - - - - - - http://example/r - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.rq.svn-base deleted file mode 100755 index 3b13dbf4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT DISTINCT * -WHERE { - { ?s :p ?o } UNION { ?s :q ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.srx.svn-base deleted file mode 100755 index 7a1172eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-star-1.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - http://example/x1 - abc - - - http://example/x2 - abc - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-str.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-str.srx.svn-base deleted file mode 100755 index a8367542..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/distinct-str.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - ABC - - - - - abc - - - - - ABC - - - - - ABC - - - - - - - - - - abc - - - - - - - - - - abc - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index a1262aa0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,127 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "DISTINCT" ; - mf:entries - ( - <#no-distinct-1> - <#distinct-1> - <#no-distinct-2> - <#distinct-2> - <#no-distinct-3> - <#distinct-3> - <#no-distinct-4> - <#distinct-4> - <#no-distinct-9> - <#distinct-9> - <#distinct-star-1> - ) . - -<#distinct-star-1> rdf:type mf:QueryEvaluationTest ; - mf:name "SELECT DISTINCT *" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - - -<#no-distinct-9> rdf:type mf:QueryEvaluationTest ; - mf:name "All: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . - -<#distinct-9> rdf:type mf:QueryEvaluationTest ; - mf:name "All: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 96bd4bd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,128 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "DISTINCT" ; - mf:entries - ( - :no-distinct-1 - :distinct-1 - :no-distinct-2 - :distinct-2 - :no-distinct-3 - :distinct-3 - :no-distinct-4 - :distinct-4 - :no-distinct-9 - :distinct-9 - :distinct-star-1 - ) . - -:distinct-star-1 rdf:type mf:QueryEvaluationTest ; - mf:name "SELECT DISTINCT *" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - - -:no-distinct-9 rdf:type mf:QueryEvaluationTest ; - mf:name "All: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . - -:distinct-9 rdf:type mf:QueryEvaluationTest ; - mf:name "All: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-1.rq.svn-base deleted file mode 100755 index e5724cef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -SELECT ?v -{ - ?x ?p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-2.rq.svn-base deleted file mode 100755 index 9fb8303e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?v -{ - :x1 ?p ?o - OPTIONAL { ?o :q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-all.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-all.srx.svn-base deleted file mode 100755 index 7b8d1136..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-all.srx.svn-base +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - ABC - - - - - ABC - - - - - 1.3e0 - - - - - abc - - - - - abc - - - - - 1.3e0 - - - - - ABC - - - - - ABC - - - - - +1 - - - - - +1 - - - - - 1.3e0 - - - - - 1.3e0 - - - - - 01.0 - - - - - 01.0 - - - - - ABC - - - - - ABC - - - - - 01 - - - - - 01 - - - - - - - - - - - - - - - 1.0e0 - - - - - 1.0e0 - - - - - +1.0 - - - - - +1.0 - - - - - abc - - - - - abc - - - - - 1 - - - - - 1 - - - - - - - - - - - - - - - 1.0e0 - - - - - 1.0e0 - - - - - 1.0 - - - - - 1.0 - - - - - b0 - - - - - http://example/z1 - - - - - b0 - - - - - http://example/z1 - - - - - abc - - - - - abc - - - - - 1 - - - - - 1 - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-node.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-node.srx.svn-base deleted file mode 100755 index 36726297..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-node.srx.svn-base +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - b0 - - - - - b0 - - - - - http://example/z1 - - - - - http://example/z1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-num.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-num.srx.svn-base deleted file mode 100755 index 052f74ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-num.srx.svn-base +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - 1.3e0 - - - - - 1.3e0 - - - - - +1 - - - - - +1 - - - - - 1.3e0 - - - - - 1.3e0 - - - - - 01.0 - - - - - 01.0 - - - - - 01 - - - - - 01 - - - - - 1.0e0 - - - - - 1.0e0 - - - - - +1.0 - - - - - +1.0 - - - - - 1 - - - - - 1 - - - - - 1.0e0 - - - - - 1.0e0 - - - - - 1.0 - - - - - 1.0 - - - - - 1 - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-opt.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-opt.srx.svn-base deleted file mode 100755 index 1a88d336..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-opt.srx.svn-base +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - http://example/s - - - - - - - http://example/r - - - - - http://example/s - - - - - - - http://example/r - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-str.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-str.srx.svn-base deleted file mode 100755 index da0974bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/.svn/text-base/no-distinct-str.srx.svn-base +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - ABC - - - - - ABC - - - - - abc - - - - - abc - - - - - ABC - - - - - ABC - - - - - ABC - - - - - ABC - - - - - - - - - - - - - - - abc - - - - - abc - - - - - - - - - - - - - - - abc - - - - - abc - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-all.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-all.ttl deleted file mode 100755 index a5a0f22a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-all.ttl +++ /dev/null @@ -1,74 +0,0 @@ -## data-num.ttl -@prefix : . -@prefix xsd: . - -:x1 :p1 "1"^^xsd:integer . -:x1 :p2 "1"^^xsd:integer . - -:x2 :p1 "1"^^xsd:integer . -:x2 :p2 "1"^^xsd:integer . - -:x3 :p1 "01"^^xsd:integer . -:x3 :p2 "01"^^xsd:integer . - -:x4 :p1 "+1"^^xsd:integer . -:x4 :p2 "+1"^^xsd:integer . - -:y1 :p1 "1.0"^^xsd:decimal . -:y1 :p2 "1.0"^^xsd:decimal . - -:y2 :p1 "+1.0"^^xsd:decimal . -:y2 :p2 "+1.0"^^xsd:decimal . - -:y3 :p1 "01.0"^^xsd:decimal . -:y3 :p2 "01.0"^^xsd:decimal . - -:z1 :p1 "1.0e0"^^xsd:double . -:z1 :p2 "1.0e0"^^xsd:double . - -:z2 :p1 "1.0e0"^^xsd:double . -:z2 :p2 "1.0e0"^^xsd:double . - -:z3 :p1 "1.3e0"^^xsd:double . -:z3 :p2 "1.3e0"^^xsd:double . - -:z4 :p1 "1.3e0"^^xsd:double . -:z5 :p1 "1.3e0"^^xsd:float . - -## data-str.ttl - -:x1 :p "abc" . -:x1 :q "abc" . - -:x2 :p "abc"@en . -:x2 :q "abc"@en . - -:x3 :p "ABC" . -:x3 :q "ABC" . - -:x4 :p "ABC"@en . -:x4 :q "ABC"@en . - - -:x5 :p "abc"^^xsd:string . -:x5 :q "abc"^^xsd:string . -:x6 :p "ABC"^^xsd:string . -:x6 :q "ABC"^^xsd:string . - -:x7 :p "" . -:x7 :q "" . - -:x8 :p ""@en . -:x8 :q ""@en . - -:x9 :p ""^^xsd:string . -:x9 :q ""^^xsd:string . - -## data-node.ttl - -:x1 :p1 :z1 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 _:a . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-node.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-node.ttl deleted file mode 100755 index 0166e4cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-node.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 :z1 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 _:a . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-num.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-num.ttl deleted file mode 100755 index b5e4e037..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-num.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 "1"^^xsd:integer . -:x1 :p2 "1"^^xsd:integer . - -:x2 :p1 "1"^^xsd:integer . -:x2 :p2 "1"^^xsd:integer . - -:x3 :p1 "01"^^xsd:integer . -:x3 :p2 "01"^^xsd:integer . - -:x4 :p1 "+1"^^xsd:integer . -:x4 :p2 "+1"^^xsd:integer . - -:y1 :p1 "1.0"^^xsd:decimal . -:y1 :p2 "1.0"^^xsd:decimal . - -:y2 :p1 "+1.0"^^xsd:decimal . -:y2 :p2 "+1.0"^^xsd:decimal . - -:y3 :p1 "01.0"^^xsd:decimal . -:y3 :p2 "01.0"^^xsd:decimal . - -:z1 :p1 "1.0e0"^^xsd:double . -:z1 :p2 "1.0e0"^^xsd:double . - -:z2 :p1 "1.0e0"^^xsd:double . -:z2 :p2 "1.0e0"^^xsd:double . - -:z3 :p1 "1.3e0"^^xsd:double . -:z3 :p2 "1.3e0"^^xsd:double . - -:z4 :p1 "1.3e0"^^xsd:double . -:z5 :p1 "1.3e0"^^xsd:float . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-opt.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-opt.ttl deleted file mode 100755 index 1326d212..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-opt.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p1 :z1 . -:x1 :p1 :z2 . -:x1 :p1 _:a . - -:x1 :p2 :z1 . -:x1 :p2 :z2 . -:x1 :p2 _:a . - -:z1 :q :r . -_:a :q :s . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-star.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-star.ttl deleted file mode 100755 index 5aed9bb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-star.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "abc" . -:x1 :q "abc" . -:x2 :p "abc" . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-str.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-str.ttl deleted file mode 100755 index 6c0dbb24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-str.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "abc" . -:x1 :q "abc" . - -:x2 :p "abc"@en . -:x2 :q "abc"@en . - -:x3 :p "ABC" . -:x3 :q "ABC" . - -:x4 :p "ABC"@en . -:x4 :q "ABC"@en . - - -:x5 :p "abc"^^xsd:string . -:x5 :q "abc"^^xsd:string . -:x6 :p "ABC"^^xsd:string . -:x6 :q "ABC"^^xsd:string . - -:x7 :p "" . -:x7 :q "" . - -:x8 :p ""@en . -:x8 :q ""@en . - -:x9 :p ""^^xsd:string . -:x9 :q ""^^xsd:string . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1-results.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1-results.srx deleted file mode 100755 index 96cc0ff9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1-results.srx +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - 1 - - - - - 1.0 - - - - - 1.3 - - - - - +1 - - - - - +1.0 - - - - - 1.3e0 - - - - - 01 - - - - - 01.0 - - - - - +1.3e0 - - - - - 1.3e0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1.rq deleted file mode 100755 index 3b182219..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT DISTINCT ?v -{ - ?x ?p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-2.rq deleted file mode 100755 index f423c602..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT DISTINCT ?v -{ - :x1 ?p ?o - OPTIONAL { ?o :q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-all.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-all.srx deleted file mode 100755 index 963d208e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-all.srx +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - ABC - - - - - 1.3e0 - - - - - abc - - - - - 1.3e0 - - - - - ABC - - - - - +1 - - - - - 01.0 - - - - - ABC - - - - - 01 - - - - - - - - - - 1.0e0 - - - - - +1.0 - - - - - abc - - - - - 1 - - - - - - - - - - 1.0 - - - - - b0 - - - - - http://example/z1 - - - - - abc - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-node.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-node.srx deleted file mode 100755 index 7f88f2b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-node.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - b0 - - - - - http://example/z1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-num.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-num.srx deleted file mode 100755 index 71b81a62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-num.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - 1.3e0 - - - - - 1.3e0 - - - - - +1 - - - - - 01.0 - - - - - 01 - - - - - 1.0e0 - - - - - +1.0 - - - - - 1 - - - - - 1.0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-opt.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-opt.srx deleted file mode 100755 index daf6272d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-opt.srx +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - http://example/s - - - - - - - http://example/r - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.rq deleted file mode 100755 index 3b13dbf4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT DISTINCT * -WHERE { - { ?s :p ?o } UNION { ?s :q ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.srx deleted file mode 100755 index 7a1172eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - http://example/x1 - abc - - - http://example/x2 - abc - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-str.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-str.srx deleted file mode 100755 index a8367542..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-str.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - ABC - - - - - abc - - - - - ABC - - - - - ABC - - - - - - - - - - abc - - - - - - - - - - abc - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl deleted file mode 100755 index 96bd4bd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl +++ /dev/null @@ -1,128 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "DISTINCT" ; - mf:entries - ( - :no-distinct-1 - :distinct-1 - :no-distinct-2 - :distinct-2 - :no-distinct-3 - :distinct-3 - :no-distinct-4 - :distinct-4 - :no-distinct-9 - :distinct-9 - :distinct-star-1 - ) . - -:distinct-star-1 rdf:type mf:QueryEvaluationTest ; - mf:name "SELECT DISTINCT *" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-1 rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-2 rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-3 rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:no-distinct-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:distinct-4 rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - - -:no-distinct-9 rdf:type mf:QueryEvaluationTest ; - mf:name "All: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . - -:distinct-9 rdf:type mf:QueryEvaluationTest ; - mf:name "All: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl.bak deleted file mode 100755 index a1262aa0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl.bak +++ /dev/null @@ -1,127 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "DISTINCT" ; - mf:entries - ( - <#no-distinct-1> - <#distinct-1> - <#no-distinct-2> - <#distinct-2> - <#no-distinct-3> - <#distinct-3> - <#no-distinct-4> - <#distinct-4> - <#no-distinct-9> - <#distinct-9> - <#distinct-star-1> - ) . - -<#distinct-star-1> rdf:type mf:QueryEvaluationTest ; - mf:name "SELECT DISTINCT *" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-1> rdf:type mf:QueryEvaluationTest ; - mf:name "Numbers: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-2> rdf:type mf:QueryEvaluationTest ; - mf:name "Strings: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-3> rdf:type mf:QueryEvaluationTest ; - mf:name "Nodes: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#no-distinct-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#distinct-4> rdf:type mf:QueryEvaluationTest ; - mf:name "Opt: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - - -<#no-distinct-9> rdf:type mf:QueryEvaluationTest ; - mf:name "All: No distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . - -<#distinct-9> rdf:type mf:QueryEvaluationTest ; - mf:name "All: Distinct" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - ##qt:data , , - qt:data - ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-1.rq deleted file mode 100755 index e5724cef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -SELECT ?v -{ - ?x ?p ?v . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-2.rq deleted file mode 100755 index 9fb8303e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?v -{ - :x1 ?p ?o - OPTIONAL { ?o :q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-all.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-all.srx deleted file mode 100755 index 7b8d1136..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-all.srx +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - ABC - - - - - ABC - - - - - 1.3e0 - - - - - abc - - - - - abc - - - - - 1.3e0 - - - - - ABC - - - - - ABC - - - - - +1 - - - - - +1 - - - - - 1.3e0 - - - - - 1.3e0 - - - - - 01.0 - - - - - 01.0 - - - - - ABC - - - - - ABC - - - - - 01 - - - - - 01 - - - - - - - - - - - - - - - 1.0e0 - - - - - 1.0e0 - - - - - +1.0 - - - - - +1.0 - - - - - abc - - - - - abc - - - - - 1 - - - - - 1 - - - - - - - - - - - - - - - 1.0e0 - - - - - 1.0e0 - - - - - 1.0 - - - - - 1.0 - - - - - b0 - - - - - http://example/z1 - - - - - b0 - - - - - http://example/z1 - - - - - abc - - - - - abc - - - - - 1 - - - - - 1 - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-node.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-node.srx deleted file mode 100755 index 36726297..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-node.srx +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - b0 - - - - - b0 - - - - - http://example/z1 - - - - - http://example/z1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-num.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-num.srx deleted file mode 100755 index 052f74ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-num.srx +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - 1.3e0 - - - - - 1.3e0 - - - - - +1 - - - - - +1 - - - - - 1.3e0 - - - - - 1.3e0 - - - - - 01.0 - - - - - 01.0 - - - - - 01 - - - - - 01 - - - - - 1.0e0 - - - - - 1.0e0 - - - - - +1.0 - - - - - +1.0 - - - - - 1 - - - - - 1 - - - - - 1.0e0 - - - - - 1.0e0 - - - - - 1.0 - - - - - 1.0 - - - - - 1 - - - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-opt.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-opt.srx deleted file mode 100755 index 1a88d336..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-opt.srx +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - http://example/s - - - - - - - http://example/r - - - - - http://example/s - - - - - - - http://example/r - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-str.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-str.srx deleted file mode 100755 index da0974bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-str.srx +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - ABC - - - - - ABC - - - - - abc - - - - - abc - - - - - ABC - - - - - ABC - - - - - ABC - - - - - ABC - - - - - - - - - - - - - - - abc - - - - - abc - - - - - - - - - - - - - - - abc - - - - - abc - - - - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/all-wcprops deleted file mode 100755 index 352e23d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/all-wcprops +++ /dev/null @@ -1,335 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin -END -lang-case-sensitivity.ttl -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl -END -q-str-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-1.rq -END -q-str-3.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-3.rq -END -q-datatype-2.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq -END -result-sameTerm.ttl -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl -END -sameTerm.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm.rq -END -q-lang-2.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq -END -result-iri-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl -END -sameTerm-not-eq.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq -END -q-iri-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq -END -sameTerm-eq.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq -END -result-langMatches-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl -END -result-blank-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl -END -lang-case-insensitive-ne.srx -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx -END -lang-case-sensitivity-ne.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq -END -result-langMatches-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl -END -result-langMatches-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl -END -result-isliteral-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl -END -q-blank-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl.bak -END -q-langMatches-2.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq -END -result-langMatches-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl -END -lang-case-sensitivity-eq.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq -END -q-langMatches-4.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl -END -result-uri-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl -END -q-uri-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq -END -data-builtin-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl -END -data-builtin-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl -END -q-langMatches-de-de.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq -END -result-str-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl -END -data-langMatches-de.ttl -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl -END -result-str-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl -END -q-str-2.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-2.rq -END -result-str-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl -END -result-datatype-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl -END -result-str-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl -END -q-str-4.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-4.rq -END -q-datatype-1.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq -END -q-datatype-3.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq -END -result-langMatches-de.ttl -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl -END -result-sameTerm-not-eq.ttl -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl -END -q-lang-1.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq -END -result-sameTerm-eq.ttl -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl -END -data-langMatches.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl -END -q-lang-3.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq -END -result-datatype-2.srx -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx -END -result-datatype-3.srx -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx -END -q-langMatches-1.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq -END -q-langMatches-3.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq -END -q-isliteral-1.rq -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq -END -lang-case-insensitive-eq.srx -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx -END -result-lang-1.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx -END -result-lang-2.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx -END -result-lang-3.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/entries deleted file mode 100755 index b62d9dff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/entries +++ /dev/null @@ -1,688 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -lang-case-sensitivity.ttl -file - - - - -2008-02-29T14:57:17.577187Z -f1be14d142e72445612ac60651ed76b8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-str-1.rq -file - - - - -2008-02-29T14:57:17.577187Z -aada668cc49c81dee6387843fd210359 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-str-3.rq -file - - - - -2008-02-29T14:57:17.592807Z -bda499f96a66d3761e05f2afc1adf49d -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-datatype-2.rq -file - - - - -2008-02-29T14:57:17.592807Z -310b18cb416b4588a5b584759e2842d4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sameTerm.ttl -file - - - - -2008-02-29T14:57:17.592807Z -346604a531fdb8e8024625257b3b123c -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm.rq -file - - - - -2008-02-29T14:57:17.608428Z -121909f81cef29292d1de8a694cc6443 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-lang-2.rq -file - - - - -2008-02-29T14:57:17.608428Z -677b8062a7dbe5fe31793302c8ae3486 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-iri-1.ttl -file - - - - -2008-02-29T14:57:17.624049Z -ca1ed26de2dea4f898c40fb1ec9baef1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-not-eq.rq -file - - - - -2008-02-29T14:57:17.624049Z -74ad04dd7a6a4abdff0423c9b97ce6f3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-iri-1.rq -file - - - - -2008-02-29T14:57:17.624049Z -c73dac379f94edc43675de75891315dc -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-eq.rq -file - - - - -2008-02-29T14:57:17.639669Z -b877d1b5645ee1fe1765a60c6445723b -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-langMatches-1.ttl -file - - - - -2008-02-29T14:57:17.639669Z -646149257742d9ea93165bc44e3d4de1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-langMatches-2.ttl -file - - - - -2008-02-29T14:57:17.670910Z -b720d7e9cba37967aeab1301dde84c7d -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-blank-1.ttl -file - - - - -2008-02-29T14:57:17.639669Z -f167f7f3ea06cf37386fb509d81c12c2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -lang-case-insensitive-ne.srx -file - - - - -2008-02-29T14:57:17.655290Z -4ee6df9daff592e444e6ebda98afcad2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -lang-case-sensitivity-ne.rq -file - - - - -2008-02-29T14:57:17.655290Z -ed9824f57bd6c8bd39151062568150a1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-langMatches-3.ttl -file - - - - -2008-02-29T14:57:17.702152Z -0fcfbf0fd193e2f3ebc7f391e9da9f96 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-isliteral-1.ttl -file - - - - -2008-02-29T14:57:17.686531Z -db24a549ed21ef7e4f829bf5e70174b3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-blank-1.rq -file - - - - -2008-02-29T14:57:17.686531Z -1c40713136db9eea979f3b40e0d37a2b -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:17.670910Z -66b8f1169be674dfe1713629a0816fcf -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-langMatches-2.rq -file - - - - -2008-02-29T14:57:17.670910Z -a8776287e262ec482e8d5152dd416ae8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-langMatches-4.ttl -file - - - - -2008-02-29T14:57:17.702152Z -c4a3bf8041ddd2688d2f71db660e326e -2007-09-20T07:35:41.061956Z -540 -cweiske - -lang-case-sensitivity-eq.rq -file - - - - -2008-02-29T14:57:17.717772Z -ddf47bb5737ee0597bd5b9b937babc40 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-langMatches-4.rq -file - - - - -2008-02-29T14:57:17.717772Z -7828b4fe0b42cfa157e10df74175bc5f -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:17.717772Z -2ae2b694a934b1a9a7f06c7eafc59c55 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-uri-1.ttl -file - - - - -2008-02-29T14:57:17.733393Z -ca1ed26de2dea4f898c40fb1ec9baef1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-uri-1.rq -file - - - - -2008-02-29T14:57:17.733393Z -5bdf6abaea47e057730fe94187754492 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-builtin-1.ttl -file - - - - -2008-02-29T14:57:17.749013Z -309e1c01682b6019122a03626b4869c8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-builtin-2.ttl -file - - - - -2008-02-29T14:57:17.749013Z -a79a4c165cfecebaaef7c79c7b04a21f -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-langMatches-de-de.rq -file - - - - -2008-02-29T14:57:17.749013Z -082bcd3042774ff5a6ad24ae6d14aa06 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-str-1.ttl -file - - - - -2008-02-29T14:57:17.764634Z -d5b4018e12793ea5feef56cf1fffbd37 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-langMatches-de.ttl -file - - - - -2008-02-29T14:57:17.764634Z -60b32c4bd518e65fcfeb79b72725a6e3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-str-2.ttl -file - - - - -2008-02-29T14:57:17.764634Z -03b5da288138837adce2c799a58e22f8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-str-2.rq -file - - - - -2008-02-29T14:57:17.780255Z -ab57818022f1cad7f7439b5bfc783aa1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-str-3.ttl -file - - - - -2008-02-29T14:57:17.780255Z -c7284591778b3f29ab915dbd1c7e1208 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-datatype-1.ttl -file - - - - -2008-02-29T14:57:17.780255Z -fd1edb79e13a10691f453adcc3bcd415 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-str-4.ttl -file - - - - -2008-02-29T14:57:17.795875Z -4d0db86ae62082eca66a0c805633a368 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-str-4.rq -file - - - - -2008-02-29T14:57:17.795875Z -820c0629f8f834755f34718a2262ae77 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-datatype-1.rq -file - - - - -2008-02-29T14:57:17.811496Z -2b0806415246f635c3e1634da5734b5b -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-datatype-3.rq -file - - - - -2008-02-29T14:57:17.811496Z -7abf2a23c232265b8b8080150e6fdc4f -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-langMatches-de.ttl -file - - - - -2008-02-29T14:57:17.811496Z -dd53eae0b0d85a4da4c30e58356e333a -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sameTerm-not-eq.ttl -file - - - - -2008-02-29T14:57:17.827116Z -af9072174ac2fac8002cea5a09b35519 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-lang-1.rq -file - - - - -2008-02-29T14:57:17.827116Z -83b0c771b0feff041e99ef841b8475d2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sameTerm-eq.ttl -file - - - - -2008-02-29T14:57:17.842737Z -a5c1a2661bef04448a0542f60de90452 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-langMatches.ttl -file - - - - -2008-02-29T14:57:17.842737Z -a218c7604ad63e730a2d6cc4aa6c4b91 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-lang-3.rq -file - - - - -2008-02-29T14:57:17.858358Z -59f3656b6c0a01e73cd182ff321a3f59 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-datatype-2.srx -file - - - - -2008-02-29T14:57:17.858358Z -79d3a75640024f0b0638d3baf26f2bf6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-datatype-3.srx -file - - - - -2008-02-29T14:57:17.858358Z -81b2edc2e16467a4b2525ad4f94ff10b -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-langMatches-1.rq -file - - - - -2008-02-29T14:57:17.873978Z -3717ea44f27dd9f9f2599500fc9c98f8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-langMatches-3.rq -file - - - - -2008-02-29T14:57:17.873978Z -914b77a288e55e580fdb7e99eb91bf11 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-isliteral-1.rq -file - - - - -2008-02-29T14:57:17.889599Z -4579d1f979dd628b787f6b01a431bb42 -2007-09-20T07:35:41.061956Z -540 -cweiske - -lang-case-insensitive-eq.srx -file - - - - -2008-02-29T14:57:17.889599Z -94eff6c656fd1873e190c77457697520 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-lang-1.srx -file - - - - -2008-02-29T14:57:17.889599Z -e99c25e47727cbb82d5ed7750f306fd8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-lang-2.srx -file - - - - -2008-02-29T14:57:17.905219Z -79d3a75640024f0b0638d3baf26f2bf6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-lang-3.srx -file - - - - -2008-02-29T14:57:17.905219Z -d465dc1da9bbac870ca34ac35951450e -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-1.ttl.svn-base deleted file mode 100755 index b8bc8765..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-1.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0e0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . -:xp2 :p "" . - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-2.ttl.svn-base deleted file mode 100755 index 0067750e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-builtin-2.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "string" . -:x2 :p "string"^^xsd:string . -:x3 :p "string"@en . -:x4 :p "lex"^^:unknownType . -:x5 :p "1234"^^xsd:integer . -:x6 :p . -:x7 :p _:bNode . - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches-de.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches-de.ttl.svn-base deleted file mode 100755 index a0365dfc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches-de.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# data-langMatches-de.ttl -# $Id: data-langMatches-de.ttl,v 1.2 2007/08/11 18:30:56 eric Exp $ - -@prefix : . - -:x :p3 "abc"@de . -:x :p4 "abc"@de-de . -:x :p5 "abc"@de-latn-de . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches.ttl.svn-base deleted file mode 100755 index 646c866c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/data-langMatches.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - -:x :p1 "abc" . -:x :p2 . -:x :p3 "abc"@en . -:x :p4 "abc"@en-gb . -:x :p5 "abc"@fr . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-eq.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-eq.srx.svn-base deleted file mode 100755 index 6669f5f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-eq.srx.svn-base +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - http://example/x2 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x3 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-ne.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-ne.srx.svn-base deleted file mode 100755 index cc2ee171..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-insensitive-ne.srx.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-eq.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-eq.rq.svn-base deleted file mode 100755 index f611e5c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-eq.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# Test: 'xyz'@en = 'xyz'@EN -# $Id: lang-case-sensitivity-eq.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-ne.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-ne.rq.svn-base deleted file mode 100755 index ae5a4844..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity-ne.rq.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -# Test: 'xyz'@en != 'xyz'@EN -# $Id: lang-case-sensitivity-ne.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity.ttl.svn-base deleted file mode 100755 index 062b5d64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/lang-case-sensitivity.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# Data: minimal test of plain literal language sensitivity -# $Id: lang-case-sensitivity.ttl,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -@prefix : . - -:x2 :p "xyz"@en . -:x3 :p "xyz"@EN . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index a73fd5aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,234 +0,0 @@ -# $Id: manifest.ttl,v 1.9 2007/08/11 18:32:41 eric Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG Expression tests: Built-ins" ; - mf:entries - ( <#dawg-str-1> <#dawg-str-2> <#dawg-str-3> <#dawg-str-4> - <#dawg-isBlank-1> <#dawg-isLiteral-1> <#dawg-datatype-1> <#dawg-datatype-2> <#dawg-datatype-3> - <#dawg-lang-1> <#dawg-lang-2> <#dawg-lang-3> <#dawg-isURI-1> - <#dawg-isIRI-1> <#dawg-langMatches-1> <#dawg-langMatches-2> - <#dawg-langMatches-3> <#dawg-langMatches-4> <#dawg-langMatches-basic> - <#lang-case-insensitive-eq> - <#lang-case-insensitive-ne> - ). - -<#dawg-isLiteral-1> a mf:QueryEvaluationTest ; - mf:name "isLiteral" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:NotApproved . - -<#dawg-str-1> a mf:QueryEvaluationTest ; - mf:name "str-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-str-2> a mf:QueryEvaluationTest ; - mf:name "str-2" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-str-3> a mf:QueryEvaluationTest ; - mf:name "str-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-str-4> a mf:QueryEvaluationTest ; - mf:name "str-4" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isBlank-1> a mf:QueryEvaluationTest ; - mf:name "isBlank-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-1> a mf:QueryEvaluationTest ; - mf:name "datatype-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-2> a mf:QueryEvaluationTest ; - mf:name "datatype-2 : Literals with a datatype" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-3> a mf:QueryEvaluationTest ; - mf:name "datatype-3 : Literals with a datatype of xsd:string" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-1> a mf:QueryEvaluationTest ; - mf:name "lang-1 : Literals with a lang tag of some kind" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-2> a mf:QueryEvaluationTest ; - mf:name "lang-2 : Literals with a lang tag of ''" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-3> a mf:QueryEvaluationTest ; - mf:name "lang-3 : Graph matching with lang tag being a different case" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isURI-1> a mf:QueryEvaluationTest ; - mf:name "isURI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isIRI-1> a mf:QueryEvaluationTest ; - mf:name "isIRI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - # NB same result as before. - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:NotApproved . - - -<#dawg-langMatches-1> a mf:QueryEvaluationTest ; - mf:name "LangMatches-1" ; - rdfs:comment "langMatches(lang(?v), 'en-GB') matches 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-2> a mf:QueryEvaluationTest ; - mf:name "LangMatches-2" ; - rdfs:comment "langMatches(lang(?v), 'en') matches 'abc'@en, 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-3> a mf:QueryEvaluationTest ; - mf:name "LangMatches-3" ; - rdfs:comment "langMatches(lang(?v), '*') matches 'abc'@en, 'abc'@en-gb, 'abc'@fr" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-4> a mf:QueryEvaluationTest ; - mf:name "LangMatches-4" ; - rdfs:comment "! langMatches(lang(?v), '*') matches 'abc'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-langMatches-basic> a mf:QueryEvaluationTest ; - mf:name "LangMatches-basic" ; - rdfs:comment "the basic range 'de-de' does not match 'de-Latn-de'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#lang-case-insensitive-eq> a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-eq" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en = 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#lang-case-insensitive-ne> a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-ne" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en != 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 1bd646d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,273 +0,0 @@ -# $Id: manifest.ttl,v 1.13 2007/09/05 17:32:28 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG Expression tests: Built-ins" ; - mf:entries - ( :dawg-str-1 :dawg-str-2 :dawg-str-3 :dawg-str-4 - :dawg-isBlank-1 :dawg-isLiteral-1 :dawg-datatype-1 :dawg-datatype-2 :dawg-datatype-3 - :dawg-lang-1 :dawg-lang-2 :dawg-lang-3 :dawg-isURI-1 - :dawg-isIRI-1 :dawg-langMatches-1 :dawg-langMatches-2 - :dawg-langMatches-3 :dawg-langMatches-4 :dawg-langMatches-basic - :lang-case-insensitive-eq - :lang-case-insensitive-ne - :sameTerm-simple :sameTerm-eq :sameTerm-not-eq - ). - -:dawg-isLiteral-1 a mf:QueryEvaluationTest ; - mf:name "isLiteral" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:dawg-str-1 a mf:QueryEvaluationTest ; - mf:name "str-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-str-2 a mf:QueryEvaluationTest ; - mf:name "str-2" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-str-3 a mf:QueryEvaluationTest ; - mf:name "str-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-str-4 a mf:QueryEvaluationTest ; - mf:name "str-4" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isBlank-1 a mf:QueryEvaluationTest ; - mf:name "isBlank-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-1 a mf:QueryEvaluationTest ; - mf:name "datatype-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-2 a mf:QueryEvaluationTest ; - mf:name "datatype-2 : Literals with a datatype" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-3 a mf:QueryEvaluationTest ; - mf:name "datatype-3 : Literals with a datatype of xsd:string" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-1 a mf:QueryEvaluationTest ; - mf:name "lang-1 : Literals with a lang tag of some kind" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-2 a mf:QueryEvaluationTest ; - mf:name "lang-2 : Literals with a lang tag of ''" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-3 a mf:QueryEvaluationTest ; - mf:name "lang-3 : Graph matching with lang tag being a different case" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isURI-1 a mf:QueryEvaluationTest ; - mf:name "isURI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isIRI-1 a mf:QueryEvaluationTest ; - mf:name "isIRI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - # NB same result as before. - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - -:dawg-langMatches-1 a mf:QueryEvaluationTest ; - mf:name "LangMatches-1" ; - rdfs:comment "langMatches(lang(?v), 'en-GB') matches 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-2 a mf:QueryEvaluationTest ; - mf:name "LangMatches-2" ; - rdfs:comment "langMatches(lang(?v), 'en') matches 'abc'@en, 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-3 a mf:QueryEvaluationTest ; - mf:name "LangMatches-3" ; - rdfs:comment "langMatches(lang(?v), '*') matches 'abc'@en, 'abc'@en-gb, 'abc'@fr" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-4 a mf:QueryEvaluationTest ; - mf:name "LangMatches-4" ; - rdfs:comment "! langMatches(lang(?v), '*') matches 'abc'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-langMatches-basic a mf:QueryEvaluationTest ; - mf:name "LangMatches-basic" ; - rdfs:comment "the basic range 'de-de' does not match 'de-Latn-de'" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - -:lang-case-insensitive-eq a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-eq" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en = 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:lang-case-insensitive-ne a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-ne" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en != 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:sameTerm-simple a mf:QueryEvaluationTest ; - mf:name "sameTerm-simple" ; - rdfs:comment "sameTerm(?v1, ?v2)" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - -:sameTerm-eq a mf:QueryEvaluationTest ; - mf:name "sameTerm-eq" ; - rdfs:comment "sameTerm(?v1, ?v2) && ?v1 = ?v2" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - -:sameTerm-not-eq a mf:QueryEvaluationTest ; - mf:name "sameTerm-not-eq" ; - rdfs:comment "!sameTerm(?v1, ?v2) && ?v1 = ?v2" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-blank-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-blank-1.rq.svn-base deleted file mode 100755 index 49f1556c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-blank-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isBlank(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-1.rq.svn-base deleted file mode 100755 index 13a59e3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( datatype(?v) = xsd:double ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-2.rq.svn-base deleted file mode 100755 index a6d9bab3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Which literals have a datatype and which are errors. - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER( datatype(?v) != ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-3.rq.svn-base deleted file mode 100755 index 308f7c50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-datatype-3.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Whichliterals have xsd:string as a datatype - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER( datatype(?v) = xsd:string ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-iri-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-iri-1.rq.svn-base deleted file mode 100755 index dd33f028..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-iri-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isIRI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-isliteral-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-isliteral-1.rq.svn-base deleted file mode 100755 index 52997343..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-isliteral-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER isLiteral(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-1.rq.svn-base deleted file mode 100755 index a7ee383f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-1.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Test which things have a lang tag of some form. - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER ( lang(?v) != '@NotALangTag@' ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-2.rq.svn-base deleted file mode 100755 index ce970647..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER ( lang(?v) = '' ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-3.rq.svn-base deleted file mode 100755 index ecb703d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-lang-3.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p "string"@EN -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-1.rq.svn-base deleted file mode 100755 index 04e9c981..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en-GB") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-2.rq.svn-base deleted file mode 100755 index 8c98dd3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-3.rq.svn-base deleted file mode 100755 index 5aa69035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-3.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "*") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-4.rq.svn-base deleted file mode 100755 index e62eae4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-4.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER (! langMatches(lang(?v), "*")) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-de-de.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-de-de.rq.svn-base deleted file mode 100755 index 0815bee8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-langMatches-de-de.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# q-langMatches-de-de.rq -# $Id: q-langMatches-de-de.rq,v 1.1 2007/08/11 18:32:04 eric Exp $ - -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "de-de") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-1.rq.svn-base deleted file mode 100755 index a00b57da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-2.rq.svn-base deleted file mode 100755 index e66ae02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "01" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-3.rq.svn-base deleted file mode 100755 index 8f9a2900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "zzz" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-4.rq.svn-base deleted file mode 100755 index bdb2ff32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-str-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-uri-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-uri-1.rq.svn-base deleted file mode 100755 index d8de720e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/q-uri-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isURI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-blank-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-blank-1.ttl.svn-base deleted file mode 100755 index b6f81427..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-blank-1.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :xb ; - rs:variable "x" - ] ; - rs:binding [ rs:value [] ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-1.ttl.svn-base deleted file mode 100755 index 48bb340b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-1.ttl.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-2.srx.svn-base deleted file mode 100755 index 33ffbe8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-2.srx.svn-base +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-3.srx.svn-base deleted file mode 100755 index e0b1d3c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-datatype-3.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-iri-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-iri-1.ttl.svn-base deleted file mode 100755 index 1a224e1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-iri-1.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-isliteral-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-isliteral-1.ttl.svn-base deleted file mode 100755 index 27ebb991..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-isliteral-1.ttl.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x2 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x3 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x4 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x5 ; - rs:variable "x" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-1.srx.svn-base deleted file mode 100755 index 2155be0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-1.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x3 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-2.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-2.srx.svn-base deleted file mode 100755 index 33ffbe8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-2.srx.svn-base +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-3.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-3.srx.svn-base deleted file mode 100755 index 7267c63a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-lang-3.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example/x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-1.ttl.svn-base deleted file mode 100755 index e05e6584..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-1.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p4 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-2.ttl.svn-base deleted file mode 100755 index 29adb9a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-2.ttl.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value :p3 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@en ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p4 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-3.ttl.svn-base deleted file mode 100755 index 5c7db0ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-3.ttl.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:resultVariable "p" ; - rs:solution [ rs:binding [ rs:value "abc"@en ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p3 ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p4 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p5 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@fr ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-4.ttl.svn-base deleted file mode 100755 index 5931a313..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-4.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:resultVariable "p" ; - rs:solution [ rs:binding [ rs:value "abc" ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p1 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-de.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-de.ttl.svn-base deleted file mode 100755 index 59087ec8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-langMatches-de.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -# result-langMatches-de.ttl -# $Id: result-langMatches-de.ttl,v 1.2 2007/08/11 18:29:27 eric Exp $ - -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "p", "v" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "p" - ] , - [ rs:value "abc"@de-de ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-eq.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-eq.ttl.svn-base deleted file mode 100755 index 0a0d9a37..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-eq.ttl.svn-base +++ /dev/null @@ -1,188 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value _:b ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value _:b ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-not-eq.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-not-eq.ttl.svn-base deleted file mode 100755 index ff545255..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm-not-eq.ttl.svn-base +++ /dev/null @@ -1,370 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm.ttl.svn-base deleted file mode 100755 index bf5fa118..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-sameTerm.ttl.svn-base +++ /dev/null @@ -1,188 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value _:a ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value _:a ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-1.ttl.svn-base deleted file mode 100755 index 3af700d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-1.ttl.svn-base +++ /dev/null @@ -1,40 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-2.ttl.svn-base deleted file mode 100755 index 3cba8653..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-2.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-3.ttl.svn-base deleted file mode 100755 index 9d5af30a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-3.ttl.svn-base +++ /dev/null @@ -1,24 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xt1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-4.ttl.svn-base deleted file mode 100755 index 809888f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-str-4.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "" ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-uri-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-uri-1.ttl.svn-base deleted file mode 100755 index 1a224e1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/result-uri-1.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-eq.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-eq.rq.svn-base deleted file mode 100755 index 45147b1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-eq.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# Test: sameTerm and eq -# $Id: sameTerm-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( sameTerm(?v1, ?v2) && ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-not-eq.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-not-eq.rq.svn-base deleted file mode 100755 index 00a98ba9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm-not-eq.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# Test: !sameTerm and eq -# $Id: sameTerm-not-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( !sameTerm(?v1, ?v2) && ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm.rq.svn-base deleted file mode 100755 index b7527621..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/.svn/text-base/sameTerm.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# Test: sameTerm -# $Id: sameTerm.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER sameTerm(?v1, ?v2) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl deleted file mode 100755 index b8bc8765..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0e0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . -:xp2 :p "" . - -:xu :p :z . - -:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl deleted file mode 100755 index 0067750e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "string" . -:x2 :p "string"^^xsd:string . -:x3 :p "string"@en . -:x4 :p "lex"^^:unknownType . -:x5 :p "1234"^^xsd:integer . -:x6 :p . -:x7 :p _:bNode . - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl deleted file mode 100755 index a0365dfc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl +++ /dev/null @@ -1,8 +0,0 @@ -# data-langMatches-de.ttl -# $Id: data-langMatches-de.ttl,v 1.2 2007/08/11 18:30:56 eric Exp $ - -@prefix : . - -:x :p3 "abc"@de . -:x :p4 "abc"@de-de . -:x :p5 "abc"@de-latn-de . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl deleted file mode 100755 index 646c866c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - -:x :p1 "abc" . -:x :p2 . -:x :p3 "abc"@en . -:x :p4 "abc"@en-gb . -:x :p5 "abc"@fr . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx deleted file mode 100755 index 6669f5f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - http://example/x2 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x3 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx deleted file mode 100755 index cc2ee171..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq deleted file mode 100755 index f611e5c9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq +++ /dev/null @@ -1,11 +0,0 @@ -# Test: 'xyz'@en = 'xyz'@EN -# $Id: lang-case-sensitivity-eq.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq deleted file mode 100755 index ae5a4844..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq +++ /dev/null @@ -1,12 +0,0 @@ -# Test: 'xyz'@en != 'xyz'@EN -# $Id: lang-case-sensitivity-ne.rq,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl deleted file mode 100755 index 062b5d64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl +++ /dev/null @@ -1,7 +0,0 @@ -# Data: minimal test of plain literal language sensitivity -# $Id: lang-case-sensitivity.ttl,v 1.1 2007/06/24 23:15:38 lfeigenb Exp $ - -@prefix : . - -:x2 :p "xyz"@en . -:x3 :p "xyz"@EN . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl deleted file mode 100755 index 1bd646d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl +++ /dev/null @@ -1,273 +0,0 @@ -# $Id: manifest.ttl,v 1.13 2007/09/05 17:32:28 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG Expression tests: Built-ins" ; - mf:entries - ( :dawg-str-1 :dawg-str-2 :dawg-str-3 :dawg-str-4 - :dawg-isBlank-1 :dawg-isLiteral-1 :dawg-datatype-1 :dawg-datatype-2 :dawg-datatype-3 - :dawg-lang-1 :dawg-lang-2 :dawg-lang-3 :dawg-isURI-1 - :dawg-isIRI-1 :dawg-langMatches-1 :dawg-langMatches-2 - :dawg-langMatches-3 :dawg-langMatches-4 :dawg-langMatches-basic - :lang-case-insensitive-eq - :lang-case-insensitive-ne - :sameTerm-simple :sameTerm-eq :sameTerm-not-eq - ). - -:dawg-isLiteral-1 a mf:QueryEvaluationTest ; - mf:name "isLiteral" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:dawg-str-1 a mf:QueryEvaluationTest ; - mf:name "str-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-str-2 a mf:QueryEvaluationTest ; - mf:name "str-2" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-str-3 a mf:QueryEvaluationTest ; - mf:name "str-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-str-4 a mf:QueryEvaluationTest ; - mf:name "str-4" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isBlank-1 a mf:QueryEvaluationTest ; - mf:name "isBlank-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-1 a mf:QueryEvaluationTest ; - mf:name "datatype-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-2 a mf:QueryEvaluationTest ; - mf:name "datatype-2 : Literals with a datatype" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-datatype-3 a mf:QueryEvaluationTest ; - mf:name "datatype-3 : Literals with a datatype of xsd:string" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-1 a mf:QueryEvaluationTest ; - mf:name "lang-1 : Literals with a lang tag of some kind" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-2 a mf:QueryEvaluationTest ; - mf:name "lang-2 : Literals with a lang tag of ''" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-lang-3 a mf:QueryEvaluationTest ; - mf:name "lang-3 : Graph matching with lang tag being a different case" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isURI-1 a mf:QueryEvaluationTest ; - mf:name "isURI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-isIRI-1 a mf:QueryEvaluationTest ; - mf:name "isIRI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - # NB same result as before. - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - -:dawg-langMatches-1 a mf:QueryEvaluationTest ; - mf:name "LangMatches-1" ; - rdfs:comment "langMatches(lang(?v), 'en-GB') matches 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-2 a mf:QueryEvaluationTest ; - mf:name "LangMatches-2" ; - rdfs:comment "langMatches(lang(?v), 'en') matches 'abc'@en, 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-3 a mf:QueryEvaluationTest ; - mf:name "LangMatches-3" ; - rdfs:comment "langMatches(lang(?v), '*') matches 'abc'@en, 'abc'@en-gb, 'abc'@fr" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-langMatches-4 a mf:QueryEvaluationTest ; - mf:name "LangMatches-4" ; - rdfs:comment "! langMatches(lang(?v), '*') matches 'abc'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-langMatches-basic a mf:QueryEvaluationTest ; - mf:name "LangMatches-basic" ; - rdfs:comment "the basic range 'de-de' does not match 'de-Latn-de'" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - -:lang-case-insensitive-eq a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-eq" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en = 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:lang-case-insensitive-ne a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-ne" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en != 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - - -:sameTerm-simple a mf:QueryEvaluationTest ; - mf:name "sameTerm-simple" ; - rdfs:comment "sameTerm(?v1, ?v2)" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - -:sameTerm-eq a mf:QueryEvaluationTest ; - mf:name "sameTerm-eq" ; - rdfs:comment "sameTerm(?v1, ?v2) && ?v1 = ?v2" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - -:sameTerm-not-eq a mf:QueryEvaluationTest ; - mf:name "sameTerm-not-eq" ; - rdfs:comment "!sameTerm(?v1, ?v2) && ?v1 = ?v2" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:result . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl.bak deleted file mode 100755 index a73fd5aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl.bak +++ /dev/null @@ -1,234 +0,0 @@ -# $Id: manifest.ttl,v 1.9 2007/08/11 18:32:41 eric Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "DAWG Expression tests: Built-ins" ; - mf:entries - ( <#dawg-str-1> <#dawg-str-2> <#dawg-str-3> <#dawg-str-4> - <#dawg-isBlank-1> <#dawg-isLiteral-1> <#dawg-datatype-1> <#dawg-datatype-2> <#dawg-datatype-3> - <#dawg-lang-1> <#dawg-lang-2> <#dawg-lang-3> <#dawg-isURI-1> - <#dawg-isIRI-1> <#dawg-langMatches-1> <#dawg-langMatches-2> - <#dawg-langMatches-3> <#dawg-langMatches-4> <#dawg-langMatches-basic> - <#lang-case-insensitive-eq> - <#lang-case-insensitive-ne> - ). - -<#dawg-isLiteral-1> a mf:QueryEvaluationTest ; - mf:name "isLiteral" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:NotApproved . - -<#dawg-str-1> a mf:QueryEvaluationTest ; - mf:name "str-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-str-2> a mf:QueryEvaluationTest ; - mf:name "str-2" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-str-3> a mf:QueryEvaluationTest ; - mf:name "str-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-str-4> a mf:QueryEvaluationTest ; - mf:name "str-4" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isBlank-1> a mf:QueryEvaluationTest ; - mf:name "isBlank-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-1> a mf:QueryEvaluationTest ; - mf:name "datatype-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-2> a mf:QueryEvaluationTest ; - mf:name "datatype-2 : Literals with a datatype" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-datatype-3> a mf:QueryEvaluationTest ; - mf:name "datatype-3 : Literals with a datatype of xsd:string" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-1> a mf:QueryEvaluationTest ; - mf:name "lang-1 : Literals with a lang tag of some kind" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-2> a mf:QueryEvaluationTest ; - mf:name "lang-2 : Literals with a lang tag of ''" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-lang-3> a mf:QueryEvaluationTest ; - mf:name "lang-3 : Graph matching with lang tag being a different case" ; - rdfs:comment "updated from original test case: eliminated ordering from test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isURI-1> a mf:QueryEvaluationTest ; - mf:name "isURI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-isIRI-1> a mf:QueryEvaluationTest ; - mf:name "isIRI-1" ; - mf:action - [ qt:query ; - qt:data ] ; - # NB same result as before. - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:NotApproved . - - -<#dawg-langMatches-1> a mf:QueryEvaluationTest ; - mf:name "LangMatches-1" ; - rdfs:comment "langMatches(lang(?v), 'en-GB') matches 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-2> a mf:QueryEvaluationTest ; - mf:name "LangMatches-2" ; - rdfs:comment "langMatches(lang(?v), 'en') matches 'abc'@en, 'abc'@en-gb" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-3> a mf:QueryEvaluationTest ; - mf:name "LangMatches-3" ; - rdfs:comment "langMatches(lang(?v), '*') matches 'abc'@en, 'abc'@en-gb, 'abc'@fr" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-langMatches-4> a mf:QueryEvaluationTest ; - mf:name "LangMatches-4" ; - rdfs:comment "! langMatches(lang(?v), '*') matches 'abc'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-langMatches-basic> a mf:QueryEvaluationTest ; - mf:name "LangMatches-basic" ; - rdfs:comment "the basic range 'de-de' does not match 'de-Latn-de'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#lang-case-insensitive-eq> a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-eq" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en = 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#lang-case-insensitive-ne> a mf:QueryEvaluationTest ; - mf:name "lang-case-insensitive-ne" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "'xyz'@en != 'xyz'@EN" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq deleted file mode 100755 index 49f1556c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isBlank(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq deleted file mode 100755 index 13a59e3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( datatype(?v) = xsd:double ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq deleted file mode 100755 index a6d9bab3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq +++ /dev/null @@ -1,9 +0,0 @@ -# Which literals have a datatype and which are errors. - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER( datatype(?v) != ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq deleted file mode 100755 index 308f7c50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq +++ /dev/null @@ -1,9 +0,0 @@ -# Whichliterals have xsd:string as a datatype - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER( datatype(?v) = xsd:string ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq deleted file mode 100755 index dd33f028..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isIRI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq deleted file mode 100755 index 52997343..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER isLiteral(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq deleted file mode 100755 index a7ee383f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq +++ /dev/null @@ -1,9 +0,0 @@ -# Test which things have a lang tag of some form. - -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER ( lang(?v) != '@NotALangTag@' ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq deleted file mode 100755 index ce970647..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p ?v . - FILTER ( lang(?v) = '' ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq deleted file mode 100755 index ecb703d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x -{ ?x :p "string"@EN -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq deleted file mode 100755 index 04e9c981..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en-GB") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq deleted file mode 100755 index 8c98dd3e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "en") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq deleted file mode 100755 index 5aa69035..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "*") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq deleted file mode 100755 index e62eae4b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER (! langMatches(lang(?v), "*")) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq deleted file mode 100755 index 0815bee8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq +++ /dev/null @@ -1,7 +0,0 @@ -# q-langMatches-de-de.rq -# $Id: q-langMatches-de-de.rq,v 1.1 2007/08/11 18:32:04 eric Exp $ - -PREFIX : - -SELECT * -{ :x ?p ?v . FILTER langMatches(lang(?v), "de-de") . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-1.rq deleted file mode 100755 index a00b57da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-2.rq deleted file mode 100755 index e66ae02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "01" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-3.rq deleted file mode 100755 index 8f9a2900..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "zzz" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-4.rq deleted file mode 100755 index bdb2ff32..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER ( str(?v) = "" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq deleted file mode 100755 index d8de720e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x ?v -WHERE - { ?x :p ?v . - FILTER isURI(?v) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl deleted file mode 100755 index b6f81427..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :xb ; - rs:variable "x" - ] ; - rs:binding [ rs:value [] ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl deleted file mode 100755 index 48bb340b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx deleted file mode 100755 index 33ffbe8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx deleted file mode 100755 index e0b1d3c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl deleted file mode 100755 index 1a224e1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl deleted file mode 100755 index 27ebb991..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :x1 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x2 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x3 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x4 ; - rs:variable "x" - ] ; - ], - [ rs:binding [ rs:value :x5 ; - rs:variable "x" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx deleted file mode 100755 index 2155be0f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x3 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx deleted file mode 100755 index 33ffbe8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - http://example/x1 - - - - - http://example/x2 - - - - - http://example/x4 - - - - - http://example/x5 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx deleted file mode 100755 index 7267c63a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example/x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl deleted file mode 100755 index e05e6584..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p4 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl deleted file mode 100755 index 29adb9a1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value :p3 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@en ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p4 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl deleted file mode 100755 index 5c7db0ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:resultVariable "p" ; - rs:solution [ rs:binding [ rs:value "abc"@en ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p3 ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p4 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@en-gb ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p5 ; - rs:variable "p" - ] ; - rs:binding [ rs:value "abc"@fr ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl deleted file mode 100755 index 5931a313..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:resultVariable "p" ; - rs:solution [ rs:binding [ rs:value "abc" ; - rs:variable "v" - ] ; - rs:binding [ rs:value :p1 ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl deleted file mode 100755 index 59087ec8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl +++ /dev/null @@ -1,16 +0,0 @@ -# result-langMatches-de.ttl -# $Id: result-langMatches-de.ttl,v 1.2 2007/08/11 18:29:27 eric Exp $ - -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "p", "v" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "p" - ] , - [ rs:value "abc"@de-de ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl deleted file mode 100755 index 0a0d9a37..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-eq.ttl +++ /dev/null @@ -1,188 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value _:b ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value _:b ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl deleted file mode 100755 index ff545255..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm-not-eq.ttl +++ /dev/null @@ -1,370 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl deleted file mode 100755 index bf5fa118..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-sameTerm.ttl +++ /dev/null @@ -1,188 +0,0 @@ -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "x1", "v1", "x2", "v2" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "" ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "" ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1.0e0"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "01"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "01"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "zzz"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value "1"^^ ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value "1"^^ ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "x1" - ] , - [ rs:value _:a ; - rs:variable "v1" - ] , - [ rs:value ; - rs:variable "x2" - ] , - [ rs:value _:a ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl deleted file mode 100755 index 3af700d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl deleted file mode 100755 index 3cba8653..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl deleted file mode 100755 index 9d5af30a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xt1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl deleted file mode 100755 index 809888f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "" ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl deleted file mode 100755 index 1a224e1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:resultVariable "v" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq deleted file mode 100755 index 45147b1e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-eq.rq +++ /dev/null @@ -1,11 +0,0 @@ -# Test: sameTerm and eq -# $Id: sameTerm-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( sameTerm(?v1, ?v2) && ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq deleted file mode 100755 index 00a98ba9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm-not-eq.rq +++ /dev/null @@ -1,11 +0,0 @@ -# Test: !sameTerm and eq -# $Id: sameTerm-not-eq.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( !sameTerm(?v1, ?v2) && ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm.rq deleted file mode 100755 index b7527621..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/sameTerm.rq +++ /dev/null @@ -1,11 +0,0 @@ -# Test: sameTerm -# $Id: sameTerm.rq,v 1.1 2007/08/31 14:01:57 eric Exp $ - -PREFIX : - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER sameTerm(?v1, ?v2) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/all-wcprops deleted file mode 100755 index 75c98095..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/all-wcprops +++ /dev/null @@ -1,179 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 96 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals -END -result-eq-graph-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl -END -result-eq-graph-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl -END -result-eq-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl -END -result-eq-graph-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl -END -result-eq-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl -END -result-eq-graph-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl -END -result-eq-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl -END -result-eq-graph-5.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl -END -result-eq-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl -END -result-eq-5.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl -END -query-eq-graph-1.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq -END -query-eq-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-1.rq -END -query-eq-graph-2.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq -END -query-eq-2.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-2.rq -END -query-eq-graph-3.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq -END -query-eq-graph-4.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq -END -query-eq-3.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-3.rq -END -query-eq-graph-5.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq -END -query-eq-4.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-4.rq -END -query-eq-5.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-5.rq -END -result-eq2-graph-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-graph-1.ttl -END -result-eq2-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl.bak -END -result-eq2-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-2.ttl -END -query-eq2-graph-1.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-graph-1.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl -END -query-eq2-1.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq -END -query-eq2-2.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-2.rq -END -data-eq.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/data-eq.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/entries deleted file mode 100755 index 1c15f6ce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/entries +++ /dev/null @@ -1,376 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -result-eq-graph-1.ttl -file - - - - -2008-02-29T14:57:21.466716Z -6ce113b11e5f4182410bf8ab5bf8153c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-graph-2.ttl -file - - - - -2008-02-29T14:57:21.482337Z -7f2d183f42c29c5fa4338676dcc90a56 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-1.ttl -file - - - - -2008-02-29T14:57:21.482337Z -3b3a094ebb209fff767b5a0289eb514f -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-graph-3.ttl -file - - - - -2008-02-29T14:57:21.497957Z -22ecad2abd25b605ace258140f6bd8b3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-2.ttl -file - - - - -2008-02-29T14:57:21.497957Z -d2ae25f4f39ffb1535b3cbd74dc80ef0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-graph-4.ttl -file - - - - -2008-02-29T14:57:21.513578Z -2310872a53c2e86789af5d5dd727afb3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-3.ttl -file - - - - -2008-02-29T14:57:21.497957Z -0b764c096ec73b3834c2b5b91f29af73 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-graph-5.ttl -file - - - - -2008-02-29T14:57:21.513578Z -91a15ac9faea80309d6da2b6ae955189 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-4.ttl -file - - - - -2008-02-29T14:57:21.513578Z -9094b2a0d788361ef344f153f6a1fc9e -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq-5.ttl -file - - - - -2008-02-29T14:57:21.529199Z -75880c3c99dd88bca701e8c495b9c216 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-graph-1.rq -file - - - - -2008-02-29T14:57:21.529199Z -2224068bc73ec90a28c5a5dc391b12c2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-1.rq -file - - - - -2008-02-29T14:57:21.544819Z -daf534f0a7fe803acdb722c85131b1c4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-graph-2.rq -file - - - - -2008-02-29T14:57:21.544819Z -417cbd3d168ed738c444d830bbfa7685 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-2.rq -file - - - - -2008-02-29T14:57:21.560440Z -4c2da57fb6bd0058323d54fba5775cae -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-graph-3.rq -file - - - - -2008-02-29T14:57:21.544819Z -0d6f5fd417960396889700dac432c9fe -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-graph-4.rq -file - - - - -2008-02-29T14:57:21.560440Z -94c541e2bf21d297e25ff962618bdbf5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-3.rq -file - - - - -2008-02-29T14:57:21.560440Z -b4aa48bb58e1aabfd65436abe357e4d7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-graph-5.rq -file - - - - -2008-02-29T14:57:21.576060Z -fbce5a3ae998428786972672417a988f -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-4.rq -file - - - - -2008-02-29T14:57:21.576060Z -d21ead9dae0d2891e76b3551be5fa38b -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq-5.rq -file - - - - -2008-02-29T14:57:21.576060Z -fbce5a3ae998428786972672417a988f -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq2-graph-1.ttl -file - - - - -2008-02-29T14:57:21.591681Z -880fff11562a96223dda57cf2cc44e41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq2-1.ttl -file - - - - -2008-02-29T14:57:21.591681Z -f2a9c0aaa391f28e99aaebda694684f9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:21.607302Z -b3d84dc4ca9a8dc622a49b331f649c91 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-eq2-2.ttl -file - - - - -2008-02-29T14:57:21.607302Z -116b895444f17a20856ad8c04bbeb646 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq2-graph-1.rq -file - - - - -2008-02-29T14:57:21.622922Z -5ec7d5745eb4d2c518a038da11a003a7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:21.622922Z -e67c0e5ac3d69ed7f6d4ef4a58fe1676 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq2-1.rq -file - - - - -2008-02-29T14:57:21.638543Z -a1c8a31885a537e2ca95d1fd75dd08b7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-eq2-2.rq -file - - - - -2008-02-29T14:57:21.638543Z -ee6a90dc258a18b83de055596234fe98 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-eq.ttl -file - - - - -2008-02-29T14:57:21.638543Z -3aa12ebd7e2523a6dd35cc03b799b16e -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/data-eq.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/data-eq.ttl.svn-base deleted file mode 100755 index e0f1933d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/data-eq.ttl.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0e0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -## :xdec1 :p "1.0"^^xsd:decimal . -## :xdec2 :p "1"^^xsd:decimal . -## :xdec3 :p "01"^^xsd:decimal . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - -:xu :p :z . - -#:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 8b2cb095..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,142 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some SPARQL test cases - equality of values" ; - mf:entries - ( - <#eq-1> <#eq-2> <#eq-3> <#eq-4> <#eq-5> <#eq-2-1> <#eq-2-2> - <#eq-graph-1> <#eq-graph-2> <#eq-graph-3> <#eq-graph-4> <#eq-graph-5> - ). - -<#eq-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-3> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "Numerics are not value-equivalent to plain literals" ; - mf:name "Equality 1-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-4> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4" ; - rdfs:comment "= compares plain literals and unknown types with the same lexical form as false" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-5> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "= on IRI terms" ; - mf:name "Equality 1-5" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-2-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality - 2 var - test equals" ; - rdfs:comment "= in FILTER is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#eq-2-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "!= in FILTER is value inequality" ; - mf:name "Equality - 2 var - test not equals " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - # Graph versions of the equality tests - - # DAWG tests are graph-equivalence, not value equivalent. -<#eq-graph-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - # DAWG tests are graph-equivalence, not value equivalent. -<#eq-graph-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-3> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-3 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-4> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-5> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-5 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 86d89c96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some SPARQL test cases - equality of values" ; - mf:entries - ( - :eq-1 :eq-2 :eq-3 :eq-4 :eq-5 :eq-2-1 :eq-2-2 - :eq-graph-1 :eq-graph-2 :eq-graph-3 :eq-graph-4 :eq-graph-5 - ). - -:eq-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-3 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "Numerics are not value-equivalent to plain literals" ; - mf:name "Equality 1-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-4 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4" ; - rdfs:comment "= compares plain literals and unknown types with the same lexical form as false" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-5 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "= on IRI terms" ; - mf:name "Equality 1-5" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-2-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality - 2 var - test equals" ; - rdfs:comment "= in FILTER is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:eq-2-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "!= in FILTER is value inequality" ; - mf:name "Equality - 2 var - test not equals " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - # Graph versions of the equality tests - - # DAWG tests are graph-equivalence, not value equivalent. -:eq-graph-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - # DAWG tests are graph-equivalence, not value equivalent. -:eq-graph-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-3 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-3 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-4 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-5 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-5 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-1.rq.svn-base deleted file mode 100755 index 50db013a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-2.rq.svn-base deleted file mode 100755 index 2e41d83f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-2.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1.0e0 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-3.rq.svn-base deleted file mode 100755 index c0088ffe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-3.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-4.rq.svn-base deleted file mode 100755 index 5f81e575..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-4.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "zzz" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-5.rq.svn-base deleted file mode 100755 index 660c6748..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-5.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = :z ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-1.rq.svn-base deleted file mode 100755 index 19d7fc80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-2.rq.svn-base deleted file mode 100755 index 1ac9e4a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-2.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1.0e0 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-3.rq.svn-base deleted file mode 100755 index 1ef2ad65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-3.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "1" - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-4.rq.svn-base deleted file mode 100755 index 7c137883..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-4.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "zzz" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-5.rq.svn-base deleted file mode 100755 index 660c6748..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq-graph-5.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = :z ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-1.rq.svn-base deleted file mode 100755 index 6c6bd4f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-2.rq.svn-base deleted file mode 100755 index cfb1663e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-graph-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-graph-1.rq.svn-base deleted file mode 100755 index c4b6f3dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/query-eq2-graph-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x1 ?x2 ?v -WHERE - { ?x1 :p ?v . - ?x2 :p ?v . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-1.ttl.svn-base deleted file mode 100755 index 36d954de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-1.ttl.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-2.ttl.svn-base deleted file mode 100755 index a66f577b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-2.ttl.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-3.ttl.svn-base deleted file mode 100755 index 696ddeac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-3.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-4.ttl.svn-base deleted file mode 100755 index 86450a08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-4.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-5.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-5.ttl.svn-base deleted file mode 100755 index 9be6a8e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-5.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-1.ttl.svn-base deleted file mode 100755 index a7b522ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-1.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; -# "1" not same term as "01" -# rs:solution [ rs:binding [ rs:value :xi3 ; -# rs:variable "x" -# ] -# ] ; - rs:solution [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-2.ttl.svn-base deleted file mode 100755 index d6b6e835..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-2.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; -# "1.0" not same term as "1.0e0" -# rs:solution [ rs:binding [ rs:value :xd2 ; -# rs:variable "x" -# ] -# ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; -# "1" not same term as "1.0e0" -# rs:solution [ rs:binding [ rs:value :xd3 ; -# rs:variable "x" -# ] -# ] - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-3.ttl.svn-base deleted file mode 100755 index 24b6aaa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-3.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-4.ttl.svn-base deleted file mode 100755 index f36f4f66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-4.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-5.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-5.ttl.svn-base deleted file mode 100755 index 2b1ca8d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq-graph-5.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-1.ttl.svn-base deleted file mode 100755 index f18bc568..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-1.ttl.svn-base +++ /dev/null @@ -1,288 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v2" ; - rs:resultVariable "v1" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-2.ttl.svn-base deleted file mode 100755 index adeb7f5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-2.ttl.svn-base +++ /dev/null @@ -1,104 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v1" ; - rs:resultVariable "v2" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-graph-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-graph-1.ttl.svn-base deleted file mode 100755 index 06747dc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/.svn/text-base/result-eq2-graph-1.ttl.svn-base +++ /dev/null @@ -1,229 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x2" ; - rs:resultVariable "v" ; - rs:resultVariable "x1" ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xp2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xp2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xu ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xt1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xt1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xp1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xp1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/data-eq.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/data-eq.ttl deleted file mode 100755 index e0f1933d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/data-eq.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix xsd: . - -:xi1 :p "1"^^xsd:integer . -:xi2 :p "1"^^xsd:integer . -:xi3 :p "01"^^xsd:integer . - -:xd1 :p "1.0e0"^^xsd:double . -:xd2 :p "1.0"^^xsd:double . -:xd3 :p "1"^^xsd:double . - -## :xdec1 :p "1.0"^^xsd:decimal . -## :xdec2 :p "1"^^xsd:decimal . -## :xdec3 :p "01"^^xsd:decimal . - -:xt1 :p "zzz"^^:myType . - -:xp1 :p "zzz" . -:xp2 :p "1" . - -:xu :p :z . - -#:xb :p _:a . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl deleted file mode 100755 index 86d89c96..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl +++ /dev/null @@ -1,143 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some SPARQL test cases - equality of values" ; - mf:entries - ( - :eq-1 :eq-2 :eq-3 :eq-4 :eq-5 :eq-2-1 :eq-2-2 - :eq-graph-1 :eq-graph-2 :eq-graph-3 :eq-graph-4 :eq-graph-5 - ). - -:eq-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-3 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "Numerics are not value-equivalent to plain literals" ; - mf:name "Equality 1-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-4 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4" ; - rdfs:comment "= compares plain literals and unknown types with the same lexical form as false" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-5 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "= on IRI terms" ; - mf:name "Equality 1-5" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-2-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality - 2 var - test equals" ; - rdfs:comment "= in FILTER is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:eq-2-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "!= in FILTER is value inequality" ; - mf:name "Equality - 2 var - test not equals " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - # Graph versions of the equality tests - - # DAWG tests are graph-equivalence, not value equivalent. -:eq-graph-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - # DAWG tests are graph-equivalence, not value equivalent. -:eq-graph-2 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-3 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-3 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-4 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:eq-graph-5 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-5 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl.bak deleted file mode 100755 index 8b2cb095..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl.bak +++ /dev/null @@ -1,142 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some SPARQL test cases - equality of values" ; - mf:entries - ( - <#eq-1> <#eq-2> <#eq-3> <#eq-4> <#eq-5> <#eq-2-1> <#eq-2-2> - <#eq-graph-1> <#eq-graph-2> <#eq-graph-3> <#eq-graph-4> <#eq-graph-5> - ). - -<#eq-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2" ; - rdfs:comment "= in FILTER expressions is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-3> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "Numerics are not value-equivalent to plain literals" ; - mf:name "Equality 1-3" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-4> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4" ; - rdfs:comment "= compares plain literals and unknown types with the same lexical form as false" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-5> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "= on IRI terms" ; - mf:name "Equality 1-5" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-2-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality - 2 var - test equals" ; - rdfs:comment "= in FILTER is value equality" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#eq-2-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment "!= in FILTER is value inequality" ; - mf:name "Equality - 2 var - test not equals " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - # Graph versions of the equality tests - - # DAWG tests are graph-equivalence, not value equivalent. -<#eq-graph-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-1 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - # DAWG tests are graph-equivalence, not value equivalent. -<#eq-graph-2> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-2 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-3> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-3 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-4> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-4 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#eq-graph-5> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Equality 1-5 -- graph" ; - rdfs:comment "Graph pattern matching matches exact terms, not values" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-1.rq deleted file mode 100755 index 50db013a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-2.rq deleted file mode 100755 index 2e41d83f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-2.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = 1.0e0 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-3.rq deleted file mode 100755 index c0088ffe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-3.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "1" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-4.rq deleted file mode 100755 index 5f81e575..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-4.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = "zzz" ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-5.rq deleted file mode 100755 index 660c6748..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-5.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = :z ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq deleted file mode 100755 index 19d7fc80..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq deleted file mode 100755 index 1ac9e4a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p 1.0e0 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq deleted file mode 100755 index 1ef2ad65..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "1" - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq deleted file mode 100755 index 7c137883..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p "zzz" . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq deleted file mode 100755 index 660c6748..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x -WHERE - { ?x :p ?v . - FILTER ( ?v = :z ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq deleted file mode 100755 index 6c6bd4f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-2.rq deleted file mode 100755 index cfb1663e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?v1 ?v2 -WHERE - { ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-graph-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-graph-1.rq deleted file mode 100755 index c4b6f3dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-graph-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX xsd: -PREFIX : -SELECT ?x1 ?x2 ?v -WHERE - { ?x1 :p ?v . - ?x2 :p ?v . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl deleted file mode 100755 index 36d954de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl +++ /dev/null @@ -1,37 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl deleted file mode 100755 index a66f577b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl +++ /dev/null @@ -1,37 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xi3 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd2 ; - rs:variable "x" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :xd3 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl deleted file mode 100755 index 696ddeac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl deleted file mode 100755 index 86450a08..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl deleted file mode 100755 index 9be6a8e9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution - [ rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl deleted file mode 100755 index a7b522ec..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; -# "1" not same term as "01" -# rs:solution [ rs:binding [ rs:value :xi3 ; -# rs:variable "x" -# ] -# ] ; - rs:solution [ rs:binding [ rs:value :xi2 ; - rs:variable "x" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl deleted file mode 100755 index d6b6e835..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; -# "1.0" not same term as "1.0e0" -# rs:solution [ rs:binding [ rs:value :xd2 ; -# rs:variable "x" -# ] -# ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x" - ] - ] ; -# "1" not same term as "1.0e0" -# rs:solution [ rs:binding [ rs:value :xd3 ; -# rs:variable "x" -# ] -# ] - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl deleted file mode 100755 index 24b6aaa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xp2 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl deleted file mode 100755 index f36f4f66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xp1 ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl deleted file mode 100755 index 2b1ca8d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x" ; - rs:solution [ rs:binding [ rs:value :xu ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl deleted file mode 100755 index f18bc568..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl +++ /dev/null @@ -1,288 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v2" ; - rs:resultVariable "v1" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v2" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-2.ttl deleted file mode 100755 index adeb7f5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-2.ttl +++ /dev/null @@ -1,104 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v1" ; - rs:resultVariable "v2" ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "zzz" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v1" - ] - ] ; - rs:solution - [ rs:binding [ rs:value :z ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v2" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "1" ; - rs:variable "v1" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v2" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-graph-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-graph-1.ttl deleted file mode 100755 index 06747dc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-graph-1.ttl +++ /dev/null @@ -1,229 +0,0 @@ -@prefix xsd: . -@prefix rs: . -@prefix rdf: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "x2" ; - rs:resultVariable "v" ; - rs:resultVariable "x1" ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xp2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xp2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1" ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xu ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :z ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xu ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "01"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xt1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "zzz"^^:myType ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xt1 ; - rs:variable "x1" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd3 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd2 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1.0e0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd1 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xd2 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "1.0"^^xsd:double ; - rs:variable "v" - ] ; - rs:binding [ rs:value :xd3 ; - rs:variable "x2" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xp1 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value :xp1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value "zzz" ; - rs:variable "v" - ] - ] ; - rs:solution [ rs:binding [ rs:value :xi1 ; - rs:variable "x1" - ] ; - rs:binding [ rs:value :xi2 ; - rs:variable "x2" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/all-wcprops deleted file mode 100755 index 7620bc91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/all-wcprops +++ /dev/null @@ -1,107 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops -END -query-mul-1.rq -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-mul-1.rq -END -query-unminus-1.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq -END -result-ge-1.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-ge-1.srx -END -result-minus-1.srx -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-minus-1.srx -END -query-le-1.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-le-1.rq -END -result-mul-1.srx -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-mul-1.srx -END -result-unminus-1.srx -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx -END -result-le-1.srx -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-le-1.srx -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl.bak -END -query-plus-1.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-plus-1.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl -END -query-unplus-1.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq -END -result-plus-1.srx -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-plus-1.srx -END -result-unplus-1.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/data.ttl -END -query-minus-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-minus-1.rq -END -query-ge-1.rq -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-ge-1.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/entries deleted file mode 100755 index 24892f78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/entries +++ /dev/null @@ -1,232 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -query-mul-1.rq -file - - - - -2008-02-29T14:57:25.246901Z -9af38f33a42b5f173d0ed077bb00cdae -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-unminus-1.rq -file - - - - -2008-02-29T14:57:25.262522Z -52d2bb1ee548b3079e3c5fa61f4018a9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-ge-1.srx -file - - - - -2008-02-29T14:57:25.262522Z -24c4ae9f5fffa5a616d6dbc5bed90ecc -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-minus-1.srx -file - - - - -2008-02-29T14:57:25.246901Z -0a3599731f4f9597e19ed203d7a113f2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-le-1.rq -file - - - - -2008-02-29T14:57:25.278143Z -0ec25a83b6622ddac185d15c573119f1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-mul-1.srx -file - - - - -2008-02-29T14:57:25.278143Z -245bff942120899a716495bfadd85dac -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-unminus-1.srx -file - - - - -2008-02-29T14:57:25.278143Z -994bb22c6aee8d730ee5ebc965c23f0c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-le-1.srx -file - - - - -2008-02-29T14:57:25.293763Z -dbba6792a9951e58661f96c99671f2be -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:25.293763Z -ae8d4e65bc0732c77ee0a80b2d17529b -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-plus-1.rq -file - - - - -2008-02-29T14:57:25.293763Z -c7d2228862a8d202ecdf664f86a898e8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:25.309384Z -8742dd53766e852686f5c7c1c08e2fbb -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-unplus-1.rq -file - - - - -2008-02-29T14:57:25.309384Z -76c62ad5dcadf330a725398131973b91 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-plus-1.srx -file - - - - -2008-02-29T14:57:25.309384Z -dbba6792a9951e58661f96c99671f2be -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-unplus-1.srx -file - - - - -2008-02-29T14:57:25.325004Z -f04d8907bfa35639b3df317918296727 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:25.325004Z -891d2c627706208d28eb45e9f2d53824 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-minus-1.rq -file - - - - -2008-02-29T14:57:25.340625Z -da2a0dddac7b3095e9b840c019e531e3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-ge-1.rq -file - - - - -2008-02-29T14:57:25.340625Z -475173ba6775508349116d6a6083be70 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index ff443527..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x3 :p "3"^^xsd:integer . -:x4 :p "4"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index ad84ad92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,79 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL tests - XPath operators in FILTERs" ; - mf:entries - ( - <#ge-1> <#le-1> <#mul-1> <#plus-1> <#minus-1> <#unplus-1> <#unminus-1> - ). - - -<#unplus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Unary Plusn" ; - rdfs:comment "+A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#unminus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Unary Minus" ; - rdfs:comment "-A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#plus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Addition" ; - rdfs:comment "A + B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#minus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Subtraction" ; - rdfs:comment "A - B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#mul-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Multiplication" ; - rdfs:comment "A * B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ge-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Greater-than or equals" ; - rdfs:comment ">= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#le-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Less-than or equals" ; - rdfs:comment "<= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 10f060e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,87 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL tests - XPath operators in FILTERs" ; - mf:entries - ( - :ge-1 :le-1 :mul-1 :plus-1 :minus-1 :unplus-1 :unminus-1 - ). - - -:unplus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Unary Plusn" ; - rdfs:comment "+A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:unminus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Unary Minus" ; - rdfs:comment "-A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:plus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Addition" ; - rdfs:comment "A + B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:minus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Subtraction" ; - rdfs:comment "A - B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:mul-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Multiplication" ; - rdfs:comment "A * B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ge-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Greater-than or equals" ; - rdfs:comment ">= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:le-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Less-than or equals" ; - rdfs:comment "<= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-ge-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-ge-1.rq.svn-base deleted file mode 100755 index 9e5c52de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-ge-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o >= 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-le-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-le-1.rq.svn-base deleted file mode 100755 index a99b7d3f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-le-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o <= 2) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-minus-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-minus-1.rq.svn-base deleted file mode 100755 index 802b4386..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-minus-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o - ?o2 = 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-mul-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-mul-1.rq.svn-base deleted file mode 100755 index 41773f50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-mul-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o * ?o2 = 4) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-plus-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-plus-1.rq.svn-base deleted file mode 100755 index 150793a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-plus-1.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o + ?o2 = 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unminus-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unminus-1.rq.svn-base deleted file mode 100755 index f3086281..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unminus-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(-?o = -2) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unplus-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unplus-1.rq.svn-base deleted file mode 100755 index b9ca53cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/query-unplus-1.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o = +3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-ge-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-ge-1.srx.svn-base deleted file mode 100755 index dd299682..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-ge-1.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x3 - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-le-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-le-1.srx.svn-base deleted file mode 100755 index cdce3572..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-le-1.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-minus-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-minus-1.srx.svn-base deleted file mode 100755 index f7773e8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-minus-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-mul-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-mul-1.srx.svn-base deleted file mode 100755 index c0e7ebc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-mul-1.srx.svn-base +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-plus-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-plus-1.srx.svn-base deleted file mode 100755 index cdce3572..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-plus-1.srx.svn-base +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unminus-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unminus-1.srx.svn-base deleted file mode 100755 index cb6e83a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unminus-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unplus-1.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unplus-1.srx.svn-base deleted file mode 100755 index b355d14d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/.svn/text-base/result-unplus-1.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/data.ttl deleted file mode 100755 index ff443527..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/data.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "1"^^xsd:integer . -:x2 :p "2"^^xsd:integer . -:x3 :p "3"^^xsd:integer . -:x4 :p "4"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl deleted file mode 100755 index 10f060e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl +++ /dev/null @@ -1,87 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL tests - XPath operators in FILTERs" ; - mf:entries - ( - :ge-1 :le-1 :mul-1 :plus-1 :minus-1 :unplus-1 :unminus-1 - ). - - -:unplus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Unary Plusn" ; - rdfs:comment "+A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:unminus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Unary Minus" ; - rdfs:comment "-A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:plus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Addition" ; - rdfs:comment "A + B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:minus-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Subtraction" ; - rdfs:comment "A - B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -:mul-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Multiplication" ; - rdfs:comment "A * B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:ge-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Greater-than or equals" ; - rdfs:comment ">= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -:le-1 a mf:QueryEvaluationTest ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:name "Less-than or equals" ; - rdfs:comment "<= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl.bak deleted file mode 100755 index ad84ad92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl.bak +++ /dev/null @@ -1,79 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL tests - XPath operators in FILTERs" ; - mf:entries - ( - <#ge-1> <#le-1> <#mul-1> <#plus-1> <#minus-1> <#unplus-1> <#unminus-1> - ). - - -<#unplus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Unary Plusn" ; - rdfs:comment "+A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#unminus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Unary Minus" ; - rdfs:comment "-A in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#plus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Addition" ; - rdfs:comment "A + B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#minus-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Subtraction" ; - rdfs:comment "A - B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . -<#mul-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Multiplication" ; - rdfs:comment "A * B in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#ge-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Greater-than or equals" ; - rdfs:comment ">= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . - -<#le-1> a mf:QueryEvaluationTest ; - dawgt:approval dawgt:NotApproved ; - mf:name "Less-than or equals" ; - rdfs:comment "<= in FILTER expressions" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-ge-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-ge-1.rq deleted file mode 100755 index 9e5c52de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-ge-1.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o >= 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-le-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-le-1.rq deleted file mode 100755 index a99b7d3f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-le-1.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o <= 2) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-minus-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-minus-1.rq deleted file mode 100755 index 802b4386..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-minus-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o - ?o2 = 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-mul-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-mul-1.rq deleted file mode 100755 index 41773f50..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-mul-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o * ?o2 = 4) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-plus-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-plus-1.rq deleted file mode 100755 index 150793a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-plus-1.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - ?s2 :p ?o2 . - FILTER(?o + ?o2 = 3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq deleted file mode 100755 index f3086281..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(-?o = -2) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq deleted file mode 100755 index b9ca53cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . - FILTER(?o = +3) . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-ge-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-ge-1.srx deleted file mode 100755 index dd299682..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-ge-1.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x3 - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-le-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-le-1.srx deleted file mode 100755 index cdce3572..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-le-1.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-minus-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-minus-1.srx deleted file mode 100755 index f7773e8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-minus-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-mul-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-mul-1.srx deleted file mode 100755 index c0e7ebc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-mul-1.srx +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - - http://example.org/x4 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-plus-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-plus-1.srx deleted file mode 100755 index cdce3572..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-plus-1.srx +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - http://example.org/x1 - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx deleted file mode 100755 index cb6e83a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx deleted file mode 100755 index b355d14d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example.org/x3 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/extended-manifest-evaluation.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/extended-manifest-evaluation.ttl deleted file mode 100755 index c3da1c07..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/extended-manifest-evaluation.ttl +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: extended-manifest-evaluation.ttl,v 1.2 2007/08/12 15:32:34 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Extended SPARQL Query Evaluation tests" ; - mf:include ( - - ). - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/files-to-fix b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/files-to-fix deleted file mode 100755 index 90502f05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/files-to-fix +++ /dev/null @@ -1,37 +0,0 @@ -construct/result-construct-optional.ttl -dataset/dataset-01.ttl -dataset/dataset-03.ttl -dataset/dataset-05.ttl -dataset/dataset-06.ttl -dataset/dataset-07.ttl -dataset/dataset-08.ttl -dataset/dataset-11.ttl -dataset/dataset-12.ttl -expr-builtin/result-str-1.ttl -expr-builtin/result-str-2.ttl -expr-equals/result-eq2-1.ttl -expr-equals/result-eq2-graph-1.ttl -graph/graph-01.ttl -graph/graph-03.ttl -graph/graph-05.ttl -graph/graph-06.ttl -graph/graph-07.ttl -graph/graph-08.ttl -graph/graph-11.ttl -i18n/kanji.ttl -i18n/normalization-01.ttl -optional-filter/data-1.ttl -optional-filter/expr-1-result.ttl -optional-filter/expr-2-result.ttl -optional-filter/expr-3-result.ttl -solution-seq/slice-results-01.ttl -solution-seq/slice-results-02.ttl -solution-seq/slice-results-04.ttl -solution-seq/slice-results-10.ttl -solution-seq/slice-results-11.ttl -solution-seq/slice-results-13.ttl -solution-seq/slice-results-20.ttl -solution-seq/slice-results-21.ttl -solution-seq/slice-results-23.ttl -solution-seq/slice-results-24.ttl -sort/data-sort-6.ttl diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/foo b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/foo deleted file mode 100755 index 31ae8e31..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/foo +++ /dev/null @@ -1,4 +0,0 @@ -feoiwf - 4 - -121 fjewofowsss diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/all-wcprops deleted file mode 100755 index fa4034f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/all-wcprops +++ /dev/null @@ -1,173 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph -END -data-g1.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g1.ttl -END -graph-10.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.ttl -END -data-g2.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g2.ttl -END -graph-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.ttl -END -graph-11.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.ttl -END -data-g3.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g3.ttl -END -graph-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.ttl -END -data-g4.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g4.ttl -END -graph-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.ttl -END -graph-04.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.ttl -END -graph-05.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.ttl -END -graph-06.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.ttl -END -graph-07.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.ttl -END -graph-08.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.ttl -END -graph-09.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.ttl -END -graph-01.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.rq -END -graph-10.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.rq -END -graph-02.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.rq -END -graph-11.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.rq -END -graph-03.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.rq -END -graph-04.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.rq -END -graph-05.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl.bak -END -graph-06.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.rq -END -graph-07.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.rq -END -graph-08.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.rq -END -graph-09.rq -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/entries deleted file mode 100755 index f2993b03..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/entries +++ /dev/null @@ -1,364 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -data-g1.ttl -file - - - - -2008-02-29T14:57:15.890162Z -0bc91782b3e4ca3bd14a3803910b96cf -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-10.ttl -file - - - - -2008-02-29T14:57:15.905783Z -a2f9dd52f172e7ca9967dbc316162780 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g2.ttl -file - - - - -2008-02-29T14:57:15.890162Z -841aeffc35fbf8873feac4fd62398918 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-01.ttl -file - - - - -2008-02-29T14:57:15.890162Z -bcee59598ce485052e4dbe87d1e1ad97 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-11.ttl -file - - - - -2008-02-29T14:57:15.921403Z -9f2c3f9531d2051e4db103e464585f16 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g3.ttl -file - - - - -2008-02-29T14:57:15.905783Z -4c288303f6f235ac895d43f063c038c9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-02.ttl -file - - - - -2008-02-29T14:57:15.905783Z -a58126467b8472bfb43ad6d2f28c1d16 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-g4.ttl -file - - - - -2008-02-29T14:57:15.937024Z -56428a99bd98d63a8734b7f3d59cdae8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-03.ttl -file - - - - -2008-02-29T14:57:15.921403Z -629ef7b45ac8d4327e6b897e8acf3f45 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-04.ttl -file - - - - -2008-02-29T14:57:15.937024Z -81ba86ade586e7ef99588fc0b9fc84cc -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-05.ttl -file - - - - -2008-02-29T14:57:15.937024Z -79f389f096af1d33e5f67673196577fc -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-06.ttl -file - - - - -2008-02-29T14:57:15.952644Z -6e25281c171353366cd3d9f9be11a2c0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-07.ttl -file - - - - -2008-02-29T14:57:15.952644Z -8a9c3c0200458538a5c01c66ae88e162 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-08.ttl -file - - - - -2008-02-29T14:57:15.968265Z -07ed7c514b5080994319ff5e1e32c169 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-09.ttl -file - - - - -2008-02-29T14:57:15.968265Z -a2f9dd52f172e7ca9967dbc316162780 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-01.rq -file - - - - -2008-02-29T14:57:15.968265Z -f4dadd02f061720cf165d4c8f554f3ce -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-10.rq -file - - - - -2008-02-29T14:57:15.983886Z -22484379c652b54da79db918b868fd71 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-02.rq -file - - - - -2008-02-29T14:57:15.983886Z -f4dadd02f061720cf165d4c8f554f3ce -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-11.rq -file - - - - -2008-02-29T14:57:15.983886Z -5bb710a4d07bbe73adfb32b3f4e07f9a -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-03.rq -file - - - - -2008-02-29T14:57:15.999506Z -b352f74090946d0e14986754dd5369bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-04.rq -file - - - - -2008-02-29T14:57:15.999506Z -b352f74090946d0e14986754dd5369bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-05.rq -file - - - - -2008-02-29T14:57:15.999506Z -f4dadd02f061720cf165d4c8f554f3ce -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:16.015127Z -71155d4edd72f2c7374d6dd239366bcf -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-06.rq -file - - - - -2008-02-29T14:57:16.015127Z -b352f74090946d0e14986754dd5369bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-07.rq -file - - - - -2008-02-29T14:57:16.015127Z -5bb710a4d07bbe73adfb32b3f4e07f9a -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-08.rq -file - - - - -2008-02-29T14:57:16.030747Z -22484379c652b54da79db918b868fd71 -2007-09-20T07:35:41.061956Z -540 -cweiske - -graph-09.rq -file - - - - -2008-02-29T14:57:16.030747Z -22484379c652b54da79db918b868fd71 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:16.030747Z -bd2019d28661ae0109471317cfc5f8b1 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g1.ttl.svn-base deleted file mode 100755 index 363d37aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g1.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g2.ttl.svn-base deleted file mode 100755 index dbe42fe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g2.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g3.ttl.svn-base deleted file mode 100755 index c82fcb98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g3.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g4.ttl.svn-base deleted file mode 100755 index f3f826a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/data-g4.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.rq.svn-base deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.ttl.svn-base deleted file mode 100755 index 8e4d2587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-01.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.rq.svn-base deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.ttl.svn-base deleted file mode 100755 index 4472d7a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-02.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.rq.svn-base deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.ttl.svn-base deleted file mode 100755 index cb59bc8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-03.ttl.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.rq.svn-base deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.ttl.svn-base deleted file mode 100755 index 0c556901..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-04.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.rq.svn-base deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.ttl.svn-base deleted file mode 100755 index d6ca97f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-05.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.rq.svn-base deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.ttl.svn-base deleted file mode 100755 index b06d28de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-06.ttl.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.rq.svn-base deleted file mode 100755 index 299eecc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.ttl.svn-base deleted file mode 100755 index dd1f7922..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-07.ttl.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.rq.svn-base deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.ttl.svn-base deleted file mode 100755 index 58c376fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-08.ttl.svn-base +++ /dev/null @@ -1,31 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "q" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.rq.svn-base deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.ttl.svn-base deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-09.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.rq.svn-base deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.ttl.svn-base deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-10.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.rq.svn-base deleted file mode 100755 index 299eecc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.ttl.svn-base deleted file mode 100755 index 5dac03f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/graph-11.ttl.svn-base +++ /dev/null @@ -1,108 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 1562b562..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,165 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - <#dawg-graph-01> - <#dawg-graph-02> - <#dawg-graph-03> - <#dawg-graph-04> - <#dawg-graph-05> - <#dawg-graph-06> - <#dawg-graph-07> - <#dawg-graph-08> - <#dawg-graph-09> - <#dawg-graph-10> - <#dawg-graph-11> - ). - -<#dawg-graph-01> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-01" ; - rdfs:comment "Data: default graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -<#dawg-graph-02> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-02" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-03> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-03" ; - rdfs:comment "Data: named graph / Query: named graph graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-04> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-04" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -<#dawg-graph-05> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-05" ; - rdfs:comment "Data: default and named / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-06> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-06" ; - rdfs:comment "Data: default and named / Query: named graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-07> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-08> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-09> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-10> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-11> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - ] ; - mf:result ; - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 481f14b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,166 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - :dawg-graph-01 - :dawg-graph-02 - :dawg-graph-03 - :dawg-graph-04 - :dawg-graph-05 - :dawg-graph-06 - :dawg-graph-07 - :dawg-graph-08 - :dawg-graph-09 - :dawg-graph-10 - :dawg-graph-11 - ). - -:dawg-graph-01 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-01" ; - rdfs:comment "Data: default graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -:dawg-graph-02 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-02" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-03 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-03" ; - rdfs:comment "Data: named graph / Query: named graph graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-04 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-04" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -:dawg-graph-05 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-05" ; - rdfs:comment "Data: default and named / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-06 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-06" ; - rdfs:comment "Data: default and named / Query: named graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-07 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-08 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-09 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-10 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-11 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - ] ; - mf:result ; - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g1.ttl deleted file mode 100755 index 363d37aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g1.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :p "1"^^xsd:integer . -:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g2.ttl deleted file mode 100755 index dbe42fe5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g2.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g3.ttl deleted file mode 100755 index c82fcb98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g3.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :p "1"^^xsd:integer . -_:a :p "9"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g4.ttl deleted file mode 100755 index f3f826a5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g4.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -_:x :q "2"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.rq deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.ttl deleted file mode 100755 index 8e4d2587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.rq deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.ttl deleted file mode 100755 index 4472d7a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.rq deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.ttl deleted file mode 100755 index cb59bc8d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.rq deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.ttl deleted file mode 100755 index 0c556901..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.rq deleted file mode 100755 index f201be94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : - -SELECT * { ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.ttl deleted file mode 100755 index d6ca97f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.rq deleted file mode 100755 index 4fa8077d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT * { - GRAPH ?g { ?s ?p ?o } -} - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.ttl deleted file mode 100755 index b06d28de..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.rq deleted file mode 100755 index 299eecc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.ttl deleted file mode 100755 index dd1f7922..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.rq deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.ttl deleted file mode 100755 index 58c376fc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "q" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.rq deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.ttl deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.rq deleted file mode 100755 index 6718ed66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT * -{ - ?s ?p ?o - GRAPH ?g { ?s ?q ?v } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.ttl deleted file mode 100755 index efea5c6d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "v" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:resultVariable "q" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.rq deleted file mode 100755 index 299eecc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT * -{ - { ?s ?p ?o } - UNION - { GRAPH ?g { ?s ?p ?o } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.ttl deleted file mode 100755 index 5dac03f8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.ttl +++ /dev/null @@ -1,108 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "p" ; - rs:resultVariable "g" ; - rs:resultVariable "s" ; - rs:resultVariable "o" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :x ; - rs:variable "s" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] - ] ; - rs:solution [ rs:binding [ rs:value :x ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "o" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value :q ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value [] ; - rs:variable "s" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] ; - rs:binding [ rs:value ; - rs:variable "g" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value :a ; - rs:variable "s" - ] ; - rs:binding [ rs:value :p ; - rs:variable "p" - ] ; - rs:binding [ rs:value "9"^^xsd:integer ; - rs:variable "o" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl deleted file mode 100755 index 481f14b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl +++ /dev/null @@ -1,166 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - :dawg-graph-01 - :dawg-graph-02 - :dawg-graph-03 - :dawg-graph-04 - :dawg-graph-05 - :dawg-graph-06 - :dawg-graph-07 - :dawg-graph-08 - :dawg-graph-09 - :dawg-graph-10 - :dawg-graph-11 - ). - -:dawg-graph-01 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-01" ; - rdfs:comment "Data: default graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -:dawg-graph-02 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-02" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-03 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-03" ; - rdfs:comment "Data: named graph / Query: named graph graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-04 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-04" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -:dawg-graph-05 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-05" ; - rdfs:comment "Data: default and named / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-06 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-06" ; - rdfs:comment "Data: default and named / Query: named graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-07 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-08 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-09 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-10 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -:dawg-graph-11 rdf:type mf:QueryEvaluationTest ; - mf:name "graph-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - ] ; - mf:result ; - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl.bak deleted file mode 100755 index 1562b562..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl.bak +++ /dev/null @@ -1,165 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Tests for GRAPH" ; - mf:entries - ( - <#dawg-graph-01> - <#dawg-graph-02> - <#dawg-graph-03> - <#dawg-graph-04> - <#dawg-graph-05> - <#dawg-graph-06> - <#dawg-graph-07> - <#dawg-graph-08> - <#dawg-graph-09> - <#dawg-graph-10> - <#dawg-graph-11> - ). - -<#dawg-graph-01> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-01" ; - rdfs:comment "Data: default graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -<#dawg-graph-02> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-02" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-03> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-03" ; - rdfs:comment "Data: named graph / Query: named graph graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-04> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-04" ; - rdfs:comment "Data: named graph / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - ] ; - mf:result ; - . - -<#dawg-graph-05> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-05" ; - rdfs:comment "Data: default and named / Query: default graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-06> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-06" ; - rdfs:comment "Data: default and named / Query: named graph" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-07> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-07" ; - rdfs:comment "Data: default and named / Query: all data by UNION" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-08> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-08" ; - rdfs:comment "Data: default and named / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-09> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-09" ; - rdfs:comment "Data: default and named (bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-10> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-10" ; - rdfs:comment "Data: default and named (same data, with bnodes) / Query: common subjects" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - ] ; - mf:result ; - . - -<#dawg-graph-11> rdf:type mf:QueryEvaluationTest ; - mf:name "graph-11" ; - rdfs:comment "Data: default and named (several) / Query: get everything" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - qt:graphData ; - ] ; - mf:result ; - . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.htaccess b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.htaccess deleted file mode 100755 index 045199ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.htaccess +++ /dev/null @@ -1,6 +0,0 @@ - -ForceType "text/plain; charset=utf-8" - - -ForceType "application/sparql-query; charset=utf-8" - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/all-wcprops deleted file mode 100755 index 23d0a679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/all-wcprops +++ /dev/null @@ -1,107 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n -END -normalization-01.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.rq -END -normalization-02.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.rq -END -normalization-03.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.rq -END -kanji-01.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01.rq -END -kanji-02.rq -K 25 -svn:wc:ra_dav:version-url -V 101 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02.rq -END -kanji.ttl -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji.ttl -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl.bak -END -normalization-01-results.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01-results.ttl -END -normalization-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.ttl -END -normalization-02-results.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02-results.ttl -END -normalization-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.ttl -END -normalization-03-results.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03-results.ttl -END -normalization-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.ttl -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl -END -.htaccess -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.htaccess -END -kanji-01-results.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01-results.ttl -END -kanji-02-results.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02-results.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/entries deleted file mode 100755 index fa9b45bd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/entries +++ /dev/null @@ -1,232 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -normalization-01.rq -file - - - - -2008-02-29T14:57:16.811777Z -9ece46e959667a6df8004bf85de20796 -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-02.rq -file - - - - -2008-02-29T14:57:16.811777Z -b55255a4a326f97e42e6856a344305b1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-03.rq -file - - - - -2008-02-29T14:57:16.827398Z -f625200ca95f7d1b2c4181001497528c -2007-09-20T07:35:41.061956Z -540 -cweiske - -kanji-01.rq -file - - - - -2008-02-29T14:57:16.827398Z -b868ad9d6eddfeef7a1b8a3e3c7cf10f -2007-09-20T07:35:41.061956Z -540 -cweiske - -kanji-02.rq -file - - - - -2008-02-29T14:57:16.843019Z -721a160e3bbee7b8e0bf20dd943a17a0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -kanji.ttl -file - - - - -2008-02-29T14:57:16.843019Z -8bc9c487b14d421e713bfb2e67747717 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:16.843019Z -542b7e9c0901051f8703b675043c581f -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-01-results.ttl -file - - - - -2008-02-29T14:57:16.858639Z -5fe620f772b498dad435b79cfb1bf73f -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-01.ttl -file - - - - -2008-02-29T14:57:16.858639Z -a717f23514c18a227ec32ac93f4431ae -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-02-results.ttl -file - - - - -2008-02-29T14:57:16.858639Z -f6455326c84bae59e58f08669dbbbd74 -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-02.ttl -file - - - - -2008-02-29T14:57:16.874260Z -54186e8818fbe116601fad3dcecded59 -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-03-results.ttl -file - - - - -2008-02-29T14:57:16.874260Z -333ec242d35b1b7c7cadf7bb3bd2882a -2007-09-20T07:35:41.061956Z -540 -cweiske - -normalization-03.ttl -file - - - - -2008-02-29T14:57:16.889880Z -f57d65c20a7b55fbee343e0a189f0b24 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:16.889880Z -58e288c52c9f3bf9e8efdb81d210ddcb -2007-09-20T07:35:41.061956Z -540 -cweiske - -kanji-01-results.ttl -file - - - - -2008-02-29T14:57:16.889880Z -e24d84021150e076e793e25ecddc9e44 -2007-09-20T07:35:41.061956Z -540 -cweiske - -.htaccess -file - - - - -2008-02-29T14:57:16.905501Z -edfc93b65f642f68ef0b86468b093e4c -2007-09-20T07:35:41.061956Z -540 -cweiske - -kanji-02-results.ttl -file - - - - -2008-02-29T14:57:16.905501Z -e2543df90a0d656e32ae9122e06f4c38 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/.htaccess.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/.htaccess.svn-base deleted file mode 100755 index 045199ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/.htaccess.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - -ForceType "text/plain; charset=utf-8" - - -ForceType "application/sparql-query; charset=utf-8" - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01-results.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01-results.ttl.svn-base deleted file mode 100755 index 703288f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01-results.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix 食: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "food" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] ; - rs:binding [ rs:value 食:海老 ; - rs:variable "food" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value 食:納豆 ; - rs:variable "food" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01.rq.svn-base deleted file mode 100755 index 5a312256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-01.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: kanji-01.rq,v 1.3 2005/11/06 08:27:50 eric Exp $ -# test kanji QNames -PREFIX foaf: -PREFIX 食: -SELECT ?name ?food WHERE { - [ foaf:name ?name ; - 食:食べる ?food ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02-results.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02-results.ttl.svn-base deleted file mode 100755 index cabae50e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02-results.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix 食: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02.rq.svn-base deleted file mode 100755 index 30ffaf78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji-02.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: kanji-02.rq,v 1.4 2005/11/06 08:27:50 eric Exp $ -# test wide spaces -PREFIX foaf: -PREFIX 食: -SELECT ?name WHERE { - [ foaf:name ?name ; - 食:食べる 食:海老 ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji.ttl.svn-base deleted file mode 100755 index b95923cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/kanji.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -# $Id: kanji.ttl,v 1.5 2005/11/06 08:27:50 eric Exp $ -# See DOCUMENT INFO below. - -# NAMESPACES -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix 食: . - -# DOCUMENT INFO -<> rdfs:comment "test kanji IRIs (composed from QNames)" ; - owl:versionInfo "$Id: kanji.ttl,v 1.5 2005/11/06 08:27:50 eric Exp $". - -# DOCUMENT -_:alice foaf:name "Alice" ; - 食:食べる 食:納豆 . - -_:bob foaf:name "Bob" ; - 食:食べる 食:海老 . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index eeb8e8ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2005/10/25 09:38:08 aseaborne Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "I18N" ; - mf:entries - ( - <#kanji-1> - <#kanji-2> - <#normalization-1> - <#normalization-2> - <#normalization-3> - ) . - - - - -<#kanji-1> - mf:name "kanji-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -<#kanji-2> - mf:name "kanji-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -<#normalization-1> - mf:name "normalization-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -<#normalization-2> - mf:name "normalization-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 1 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - . - -<#normalization-3> - mf:name "normalization-03" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 2 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index edcd9e24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,78 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2005/10/25 09:38:08 aseaborne Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "I18N" ; - mf:entries - ( - :kanji-1 - :kanji-2 - :normalization-1 - :normalization-2 - :normalization-3 - ) . - - - - -:kanji-1 - mf:name "kanji-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -:kanji-2 - mf:name "kanji-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -:normalization-1 - mf:name "normalization-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -:normalization-2 - mf:name "normalization-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 1 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -:normalization-3 - mf:name "normalization-03" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 2 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01-results.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01-results.ttl.svn-base deleted file mode 100755 index c346d303..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01-results.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix HR: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.rq.svn-base deleted file mode 100755 index eb52a85e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -# Figure out what happens with normalization form C. -PREFIX foaf: -PREFIX HR: -SELECT ?name - WHERE { [ foaf:name ?name; - HR:resumé ?resume ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.ttl.svn-base deleted file mode 100755 index 3734c1e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-01.ttl.svn-base +++ /dev/null @@ -1,23 +0,0 @@ -# $Id: normalization-01.ttl,v 1.1 2005/10/25 09:38:08 aseaborne Exp $ -# See DOCUMENT INFO below. - -# NAMESPACES -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix HR: . - -# DOCUMENT INFO -<> rdfs:comment "Normalized and non-normalized IRIs" ; - owl:versionInfo "$Id: normalization-01.ttl,v 1.1 2005/10/25 09:38:08 aseaborne Exp $". - -# DOCUMENT -[] foaf:name "Alice" ; - HR:resumé "Alice's normalized resumé" . - -[] foaf:name "Bob" ; - HR:resumé "Bob's non-normalized resumé" . - -[] foaf:name "Eve" ; - HR:resumé "Eve's normalized resumé" ; - HR:resumé "Eve's non-normalized resumé" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02-results.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02-results.ttl.svn-base deleted file mode 100755 index 20ac5202..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02-results.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02-results.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix rdf: . -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "S" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "S" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.rq.svn-base deleted file mode 100755 index cf85f111..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02.rq,v 1.1 2005/08/09 14:35:26 eric Exp $ -PREFIX : -PREFIX p1: - -SELECT ?S WHERE { ?S :p p1:xyz } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.ttl.svn-base deleted file mode 100755 index b20cb71a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-02.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix : . - -:s1 :p . -:s2 :p . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03-results.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03-results.ttl.svn-base deleted file mode 100755 index 89452d71..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03-results.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03-results.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix rdf: . -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "S" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "S" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.rq.svn-base deleted file mode 100755 index 90daaaf6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Example 2 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03.rq,v 1.1 2005/08/09 14:35:26 eric Exp $ -PREFIX : -PREFIX p2: - -SELECT ?S WHERE { ?S :p p2:abc } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.ttl.svn-base deleted file mode 100755 index 54a90091..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/.svn/text-base/normalization-03.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix : . - -:s3 :p . -:s4 :p . -:s5 :p . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01-results.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01-results.ttl deleted file mode 100755 index 703288f5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01-results.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix 食: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "food" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] ; - rs:binding [ rs:value 食:海老 ; - rs:variable "food" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value 食:納豆 ; - rs:variable "food" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01.rq deleted file mode 100755 index 5a312256..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01.rq +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: kanji-01.rq,v 1.3 2005/11/06 08:27:50 eric Exp $ -# test kanji QNames -PREFIX foaf: -PREFIX 食: -SELECT ?name ?food WHERE { - [ foaf:name ?name ; - 食:食べる ?food ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02-results.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02-results.ttl deleted file mode 100755 index cabae50e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02-results.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix 食: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02.rq deleted file mode 100755 index 30ffaf78..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02.rq +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: kanji-02.rq,v 1.4 2005/11/06 08:27:50 eric Exp $ -# test wide spaces -PREFIX foaf: -PREFIX 食: -SELECT ?name WHERE { - [ foaf:name ?name ; - 食:食べる 食:海老 ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji.ttl deleted file mode 100755 index b95923cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji.ttl +++ /dev/null @@ -1,20 +0,0 @@ -# $Id: kanji.ttl,v 1.5 2005/11/06 08:27:50 eric Exp $ -# See DOCUMENT INFO below. - -# NAMESPACES -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix 食: . - -# DOCUMENT INFO -<> rdfs:comment "test kanji IRIs (composed from QNames)" ; - owl:versionInfo "$Id: kanji.ttl,v 1.5 2005/11/06 08:27:50 eric Exp $". - -# DOCUMENT -_:alice foaf:name "Alice" ; - 食:食べる 食:納豆 . - -_:bob foaf:name "Bob" ; - 食:食べる 食:海老 . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl deleted file mode 100755 index edcd9e24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl +++ /dev/null @@ -1,78 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2005/10/25 09:38:08 aseaborne Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "I18N" ; - mf:entries - ( - :kanji-1 - :kanji-2 - :normalization-1 - :normalization-2 - :normalization-3 - ) . - - - - -:kanji-1 - mf:name "kanji-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -:kanji-2 - mf:name "kanji-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -:normalization-1 - mf:name "normalization-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -:normalization-2 - mf:name "normalization-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 1 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -:normalization-3 - mf:name "normalization-03" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 2 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl.bak deleted file mode 100755 index eeb8e8ae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl.bak +++ /dev/null @@ -1,77 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2005/10/25 09:38:08 aseaborne Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "I18N" ; - mf:entries - ( - <#kanji-1> - <#kanji-2> - <#normalization-1> - <#normalization-2> - <#normalization-3> - ) . - - - - -<#kanji-1> - mf:name "kanji-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -<#kanji-2> - mf:name "kanji-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - - -<#normalization-1> - mf:name "normalization-01" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . - -<#normalization-2> - mf:name "normalization-02" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 1 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - . - -<#normalization-3> - mf:name "normalization-03" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Example 2 from http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096" ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01-results.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01-results.ttl deleted file mode 100755 index c346d303..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01-results.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix HR: . -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.rq deleted file mode 100755 index eb52a85e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.rq +++ /dev/null @@ -1,6 +0,0 @@ -# Figure out what happens with normalization form C. -PREFIX foaf: -PREFIX HR: -SELECT ?name - WHERE { [ foaf:name ?name; - HR:resumé ?resume ] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.ttl deleted file mode 100755 index 3734c1e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.ttl +++ /dev/null @@ -1,23 +0,0 @@ -# $Id: normalization-01.ttl,v 1.1 2005/10/25 09:38:08 aseaborne Exp $ -# See DOCUMENT INFO below. - -# NAMESPACES -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix HR: . - -# DOCUMENT INFO -<> rdfs:comment "Normalized and non-normalized IRIs" ; - owl:versionInfo "$Id: normalization-01.ttl,v 1.1 2005/10/25 09:38:08 aseaborne Exp $". - -# DOCUMENT -[] foaf:name "Alice" ; - HR:resumé "Alice's normalized resumé" . - -[] foaf:name "Bob" ; - HR:resumé "Bob's non-normalized resumé" . - -[] foaf:name "Eve" ; - HR:resumé "Eve's normalized resumé" ; - HR:resumé "Eve's non-normalized resumé" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02-results.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02-results.ttl deleted file mode 100755 index 20ac5202..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02-results.ttl +++ /dev/null @@ -1,14 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02-results.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix rdf: . -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "S" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "S" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.rq deleted file mode 100755 index cf85f111..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.rq +++ /dev/null @@ -1,8 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02.rq,v 1.1 2005/08/09 14:35:26 eric Exp $ -PREFIX : -PREFIX p1: - -SELECT ?S WHERE { ?S :p p1:xyz } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.ttl deleted file mode 100755 index b20cb71a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.ttl +++ /dev/null @@ -1,8 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-02.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix : . - -:s1 :p . -:s2 :p . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03-results.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03-results.ttl deleted file mode 100755 index 89452d71..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03-results.ttl +++ /dev/null @@ -1,14 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03-results.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix rdf: . -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "S" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "S" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.rq deleted file mode 100755 index 90daaaf6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.rq +++ /dev/null @@ -1,8 +0,0 @@ -# Example 2 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03.rq,v 1.1 2005/08/09 14:35:26 eric Exp $ -PREFIX : -PREFIX p2: - -SELECT ?S WHERE { ?S :p p2:abc } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.ttl deleted file mode 100755 index 54a90091..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.ttl +++ /dev/null @@ -1,9 +0,0 @@ -# Example 1 from -# http://lists.w3.org/Archives/Public/public-rdf-dawg/2005JulSep/0096 -# $Id: normalization-03.ttl,v 1.1 2005/08/09 14:35:26 eric Exp $ -@prefix : . - -:s3 :p . -:s4 :p . -:s5 :p . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-evaluation.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-evaluation.ttl deleted file mode 100755 index 60f391d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-evaluation.ttl +++ /dev/null @@ -1,37 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "SPARQL Query Evaluation tests" ; - mf:include ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - ). - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-syntax.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-syntax.ttl deleted file mode 100755 index 094e27e4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/manifest-syntax.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "SPARQL Syntax Tests" ; - mf:include ( - - - - - ) . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/all-wcprops deleted file mode 100755 index d0b7e8e2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/all-wcprops +++ /dev/null @@ -1,305 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 95 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world -END -sameTerm.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.ttl -END -open-eq-08-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08-result.srx -END -sameTerm-StringSimpleLiteralCmp.srx -K 25 -svn:wc:ra_dav:version-url -V 131 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-StringSimpleLiteralCmp.srx -END -sameTerm-manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-manifest.ttl -END -open-cmp-02-result.srx -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx -END -sameTerm-not-eq-StringSimpleLiteralCmp.srx -K 25 -svn:wc:ra_dav:version-url -V 138 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx -END -sameTerm-eq-StringSimpleLiteralCmp.srx -K 25 -svn:wc:ra_dav:version-url -V 134 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx -END -sameTerm.srx -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.srx -END -date-2.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2.rq -END -date-4.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4.rq -END -date-1-result.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1-result.srx -END -open-eq-10.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10.rq -END -open-eq-02.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02.rq -END -date-3-result.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3-result.srx -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl.bak -END -open-eq-12.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12.rq -END -open-eq-04.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl -END -open-eq-06.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06.rq -END -data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-1.ttl -END -open-eq-01-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01-result.srx -END -open-eq-11-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11-result.srx -END -open-eq-08.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08.rq -END -data-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-2.ttl -END -data-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-3.ttl -END -open-eq-03-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03-result.srx -END -data-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-4.ttl -END -open-eq-05-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05-result.srx -END -open-cmp-02.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02.rq -END -open-eq-07-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07-result.srx -END -open-eq-09-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09-result.srx -END -open-cmp-01-result.srx -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx -END -sameTerm-not-eq.srx -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.srx -END -sameTerm-eq.srx -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.srx -END -date-1.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1.rq -END -date-3.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3.rq -END -open-eq-01.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01.rq -END -date-2-result.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2-result.srx -END -open-eq-11.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11.rq -END -open-eq-03.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03.rq -END -date-4-result.srx -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4-result.srx -END -open-eq-05.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05.rq -END -open-eq-07.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07.rq -END -open-eq-10-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10-result.srx -END -open-eq-02-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02-result.srx -END -open-eq-09.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09.rq -END -open-eq-12-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12-result.srx -END -open-eq-04-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04-result.srx -END -open-cmp-01.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01.rq -END -open-eq-06-result.srx -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06-result.srx -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/entries deleted file mode 100755 index c54be366..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/entries +++ /dev/null @@ -1,628 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -sameTerm.ttl -file - - - - -2008-02-29T14:57:14.999788Z -8f62263c45ece2e407864c5bdd5fa394 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-08-result.srx -file - - - - -2008-02-29T14:57:15.015408Z -aff27c5a8b3f8af7d8b27deeecbb45a9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-StringSimpleLiteralCmp.srx -file - - - - -2008-02-29T14:57:15.015408Z -0157c5ecdcc2bb0f6edccd544755f677 -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-manifest.ttl -file - - - - -2008-02-29T14:57:15.031029Z -e1b9a097eb601fd625756c91c5a24053 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-cmp-02-result.srx -file - - - - -2008-02-29T14:57:15.031029Z -6f66b81378627df928d03ac8f2b898bf -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-not-eq-StringSimpleLiteralCmp.srx -file - - - - -2008-02-29T14:57:15.046650Z -4079ea87b6e82a5c60d9fd9e2d4820fa -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-eq-StringSimpleLiteralCmp.srx -file - - - - -2008-02-29T14:57:15.046650Z -0157c5ecdcc2bb0f6edccd544755f677 -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm.srx -file - - - - -2008-02-29T14:57:15.046650Z -0157c5ecdcc2bb0f6edccd544755f677 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-2.rq -file - - - - -2008-02-29T14:57:15.062270Z -729d60820b428b95be6f1de0668299b0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-4.rq -file - - - - -2008-02-29T14:57:15.062270Z -51c6cb9268de4711551745cd2da927b9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-1-result.srx -file - - - - -2008-02-29T14:57:15.077891Z -2e2eb6684d34db269007c0a448130676 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-10.rq -file - - - - -2008-02-29T14:57:15.077891Z -fda3559ebc600673befcb3cec16911eb -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-02.rq -file - - - - -2008-02-29T14:57:15.077891Z -beb56018a19c555fa57af96e84b88ca9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-3-result.srx -file - - - - -2008-02-29T14:57:15.093511Z -0fadff56df5d0a3c70e2be5437af1a10 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:15.093511Z -6adba4afa47ff5cfe78cdff3b53537c2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-12.rq -file - - - - -2008-02-29T14:57:15.109132Z -f212a3a0e9dcc8517a1a73a279c3d7f1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-04.rq -file - - - - -2008-02-29T14:57:15.109132Z -a4d627c3d8b9ba24af4d8db4bc5128c4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:15.124753Z -21b2e69bb99ad67c16e1382a21735d31 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-06.rq -file - - - - -2008-02-29T14:57:15.109132Z -66707d28551dbb68c9f1d571c2af69be -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-1.ttl -file - - - - -2008-02-29T14:57:15.140373Z -5d332236b18f1e4dc7e88ba124f18fee -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-01-result.srx -file - - - - -2008-02-29T14:57:15.124753Z -5ff5a056a24c74404d6ed4e1b6e77e9c -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-11-result.srx -file - - - - -2008-02-29T14:57:15.155994Z -0fa4f48d30f0bfd532bc04b3d8fb6bf1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-08.rq -file - - - - -2008-02-29T14:57:15.155994Z -0375c561f8c7ecfe17b8bdfe2c2512c6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-2.ttl -file - - - - -2008-02-29T14:57:15.140373Z -180dc516ba13c8ab61ff89688edee2e5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-3.ttl -file - - - - -2008-02-29T14:57:15.171614Z -78c17032c381de713adab8c0e740cd77 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-03-result.srx -file - - - - -2008-02-29T14:57:15.155994Z -e822f3d4778e064d3ecfe515af16573c -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-4.ttl -file - - - - -2008-02-29T14:57:15.171614Z -26ba3c0a187789eaa6e526574c1d863c -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-05-result.srx -file - - - - -2008-02-29T14:57:15.187235Z -c580b9a4093972f25b6d5deb9eeaec10 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-cmp-02.rq -file - - - - -2008-02-29T14:57:15.187235Z -ae646b48cf69e3723bfa482928a27de1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-07-result.srx -file - - - - -2008-02-29T14:57:15.187235Z -73552af61e7741224d4ea3b8026d4ebf -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-09-result.srx -file - - - - -2008-02-29T14:57:15.202856Z -3ebe21513425fc3ed991dba1dc5aadc2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-cmp-01-result.srx -file - - - - -2008-02-29T14:57:15.202856Z -04fd1d7a01bf07310f490980b99c6f7d -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-not-eq.srx -file - - - - -2008-02-29T14:57:15.202856Z -4ee6df9daff592e444e6ebda98afcad2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -sameTerm-eq.srx -file - - - - -2008-02-29T14:57:15.218476Z -0157c5ecdcc2bb0f6edccd544755f677 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-1.rq -file - - - - -2008-02-29T14:57:15.218476Z -d59a2f2179098bbd17dec0b42ce65ddc -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-3.rq -file - - - - -2008-02-29T14:57:15.234097Z -8d0bea78111584497eef87a73170be69 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-01.rq -file - - - - -2008-02-29T14:57:15.234097Z -80a94919cb0e380f5ea94326b45385d9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-2-result.srx -file - - - - -2008-02-29T14:57:15.234097Z -6d26632efc7998f4f0655d3ee5470929 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-11.rq -file - - - - -2008-02-29T14:57:15.249717Z -d9ed844c9901d799315751d494af78ed -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-03.rq -file - - - - -2008-02-29T14:57:15.249717Z -c81a6a19393f867ce192a957aba71d8d -2007-09-20T07:35:41.061956Z -540 -cweiske - -date-4-result.srx -file - - - - -2008-02-29T14:57:15.249717Z -32c39d7d968f25c1337d127736cd182a -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-05.rq -file - - - - -2008-02-29T14:57:15.265338Z -ab473ff4ccb843861b744cfe7fa93ec0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-07.rq -file - - - - -2008-02-29T14:57:15.265338Z -39a245ec67a365c1e61af63e4861b4c7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-10-result.srx -file - - - - -2008-02-29T14:57:15.265338Z -0fa4f48d30f0bfd532bc04b3d8fb6bf1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-02-result.srx -file - - - - -2008-02-29T14:57:15.280959Z -afc2dc3f3787cf0f6477e16eaa26b20e -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-09.rq -file - - - - -2008-02-29T14:57:15.280959Z -e2107d081576604d9bfa574f8d829a75 -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-12-result.srx -file - - - - -2008-02-29T14:57:15.296579Z -907ca60af63679981c92c019e89ec72a -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-04-result.srx -file - - - - -2008-02-29T14:57:15.296579Z -06a42e5456045b80d10ee5ba99c70ceb -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-cmp-01.rq -file - - - - -2008-02-29T14:57:15.312200Z -43b317dbc8ae5c3aee51b6a0a5ae04cb -2007-09-20T07:35:41.061956Z -540 -cweiske - -open-eq-06-result.srx -file - - - - -2008-02-29T14:57:15.312200Z -b4200d565aee7e0a6900e42a0e57276c -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-1.ttl.svn-base deleted file mode 100755 index 7155898a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-1.ttl.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix t: . -@prefix : . -@prefix xsd: . - -:x1 :p "a"^^t:type1 . -:x2 :p "b"^^t:type1 . - -:y1 :p "a"^^t:type2 . -:y2 :p "b"^^t:type2 . - -:z1 :p "1"^^xsd:integer . -:z2 :p "01"^^xsd:integer . -:z3 :p "2"^^xsd:integer . -:z4 :p "02"^^xsd:integer . - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-2.ttl.svn-base deleted file mode 100755 index f55287dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-2.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "xyz" . -:x2 :p "xyz"@en . -:x3 :p "xyz"@EN . -:x4 :p "xyz"^^xsd:string . -:x5 :p "xyz"^^xsd:integer . -:x6 :p "xyz"^^:unknown . -:x7 :p _:xyz . -:x8 :p :xyz . - -:y1 :q "abc" . -:y2 :q "abc"@en . -:y3 :q "abc"@EN . -:y4 :q "abc"^^xsd:string . -:y5 :q "abc"^^xsd:integer . -:y6 :q "abc"^^:unknown . -:y7 :q _:abc . -:y8 :q :abc . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-3.ttl.svn-base deleted file mode 100755 index 4cd4f3ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-3.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix xsd: . - -:dt1 :r "2006-08-23T09:00:00+01:00"^^xsd:dateTime . - -:d1 :r "2006-08-23"^^xsd:date . -:d2 :r "2006-08-23Z"^^xsd:date . -:d3 :r "2006-08-23+00:00"^^xsd:date . - -:d4 :r "2001-01-01"^^xsd:date . -:d5 :r "2001-01-01Z"^^xsd:date . - -:d6 :s "2006-08-23"^^xsd:date . -:d7 :s "2006-08-24Z"^^xsd:date . -:d8 :s "2000-01-01"^^xsd:date . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-4.ttl.svn-base deleted file mode 100755 index 4b003b1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/data-4.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix xsd: . - - - -:x1 :p [ :v1 "v1" ; :v2 "v2" ] . - -:x2 :p [ :v1 "1"^^xsd:integer ; :v2 "v2" ] . - -:x3 :p [ :v1 "x"^^:unknown ; :v2 "x"^^:unknown ] . - -:x4 :p [ :v1 ; :v2 ] . - -:x5 :p [ :v1 "2006-08-23T09:00:00+01:00"^^xsd:dateTime ; - :v2 "2006-08-22"^^xsd:date ]. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1-result.srx.svn-base deleted file mode 100755 index 9c26dc64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1-result.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example/d1 - - - 2006-08-23 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1.rq.svn-base deleted file mode 100755 index 1b7ac46f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-1.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v = "2006-08-23"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2-result.srx.svn-base deleted file mode 100755 index 9e783c48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2-result.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d5 - - - 2001-01-01Z - - - - - http://example/d4 - - - 2001-01-01 - - - - - http://example/dt1 - - - 2006-08-23T09:00:00+01:00 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2.rq.svn-base deleted file mode 100755 index 5efde54a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v != "2006-08-23"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3-result.srx.svn-base deleted file mode 100755 index 27340a72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3-result.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d3 - - - 2006-08-23+00:00 - - - - - http://example/d2 - - - 2006-08-23Z - - - - - http://example/d1 - - - 2006-08-23 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3.rq.svn-base deleted file mode 100755 index bcb3744a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-3.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v > "2006-08-22"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4-result.srx.svn-base deleted file mode 100755 index c3bfc439..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4-result.srx.svn-base +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d8 - - - 2000-01-01 - - - - - http://example/d6 - - - 2006-08-23 - - - - - http://example/d7 - - - 2006-08-24Z - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4.rq.svn-base deleted file mode 100755 index 408fef5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/date-4.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?date -{ - ?x :s ?date . - FILTER ( datatype(?date) = xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index f5da86d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,219 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2007/06/25 09:10:44 jbroekst Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "open world value testing tests" ; - mf:entries - ( - <#open-eq-01> <#open-eq-02> <#open-eq-03> <#open-eq-04> <#open-eq-05> <#open-eq-06> - <#open-eq-07> <#open-eq-08> <#open-eq-09> <#open-eq-10> <#open-eq-11> <#open-eq-12> - <#date-1> <#date-2> <#date-3> <#date-4> - <#open-cmp-01> <#open-cmp-02> - ) . - -<#open-eq-01> a mf:QueryEvaluationTest ; - mf:name "open-eq-01" ; - rdfs:comment "graph match - no lexical form in data (assumes no value matching)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-02> a mf:QueryEvaluationTest ; - mf:name "open-eq-02" ; - rdfs:comment "graph match - unknown type" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-03> a mf:QueryEvaluationTest ; - mf:name "open-eq-03" ; - rdfs:comment "Filter(?v=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-04> a mf:QueryEvaluationTest ; - mf:name "open-eq-04" ; - rdfs:comment "Filter(?v!=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-05> a mf:QueryEvaluationTest ; - mf:name "open-eq-05" ; - rdfs:comment "FILTER(?v = unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-06> a mf:QueryEvaluationTest ; - mf:name "open-eq-06" ; - rdfs:comment "FILTER(?v != unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-07> a mf:QueryEvaluationTest ; - mf:name "open-eq-07" ; - rdfs:comment "Test of '=' " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-08> a mf:QueryEvaluationTest ; - mf:name "open-eq-08" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-09> a mf:QueryEvaluationTest ; - mf:name "open-eq-09" ; - rdfs:comment "Test of '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-10> a mf:QueryEvaluationTest ; - mf:name "open-eq-10" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-11> a mf:QueryEvaluationTest ; - mf:name "open-eq-11" ; - rdfs:comment "test of '=' || '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-12> a mf:QueryEvaluationTest ; - mf:name "open-eq-12" ; - rdfs:comment "find pairs that don't value-compare" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-1> a mf:QueryEvaluationTest ; - # xsd:date - # xsd:date - mf:name "date-1" ; - rdfs:comment "Added type : xsd:date '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-2> a mf:QueryEvaluationTest ; - mf:name "date-2" ; - rdfs:comment "Added type : xsd:date '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - mf:requires mf:xsd-date-eq-xsd-dateTime ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-3> a mf:QueryEvaluationTest ; - mf:name "date-3" ; - rdfs:comment "Added type : xsd:date '>'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-4> a mf:QueryEvaluationTest ; - mf:name "date-4" ; - rdfs:comment "xsd:date ORDER BY" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-cmp-01> a mf:QueryEvaluationTest ; - mf:name "open-cmp-01" ; - rdfs:comment "Find things that compare with < or >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-cmp-02> a mf:QueryEvaluationTest ; - mf:name "open-cmp-02" ; - rdfs:comment "Find things that compare with <= and >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 4c0eea45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,225 +0,0 @@ -# $Id: manifest.ttl,v 1.9 2007/09/11 22:44:05 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "open world value testing tests" ; - mf:entries - ( - :open-eq-01 :open-eq-02 :open-eq-03 :open-eq-04 :open-eq-05 :open-eq-06 - :open-eq-07 :open-eq-08 :open-eq-09 :open-eq-10 :open-eq-11 :open-eq-12 - :date-1 :date-2 :date-3 :date-4 - :open-cmp-01 :open-cmp-02 - ) . - -:open-eq-01 a mf:QueryEvaluationTest ; - mf:name "open-eq-01" ; - rdfs:comment "graph match - no lexical form in data (assumes no value matching)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-02 a mf:QueryEvaluationTest ; - mf:name "open-eq-02" ; - rdfs:comment "graph match - unknown type" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-03 a mf:QueryEvaluationTest ; - mf:name "open-eq-03" ; - rdfs:comment "Filter(?v=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-04 a mf:QueryEvaluationTest ; - mf:name "open-eq-04" ; - rdfs:comment "Filter(?v!=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-05 a mf:QueryEvaluationTest ; - mf:name "open-eq-05" ; - rdfs:comment "FILTER(?v = unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-06 a mf:QueryEvaluationTest ; - mf:name "open-eq-06" ; - rdfs:comment "FILTER(?v != unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-07 a mf:QueryEvaluationTest ; - mf:name "open-eq-07" ; - rdfs:comment "Test of '=' " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-08 a mf:QueryEvaluationTest ; - mf:name "open-eq-08" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-09 a mf:QueryEvaluationTest ; - mf:name "open-eq-09" ; - rdfs:comment "Test of '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-10 a mf:QueryEvaluationTest ; - mf:name "open-eq-10" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-11 a mf:QueryEvaluationTest ; - mf:name "open-eq-11" ; - rdfs:comment "test of '=' || '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-12 a mf:QueryEvaluationTest ; - mf:name "open-eq-12" ; - rdfs:comment "find pairs that don't value-compare" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:LangTagAwareness ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-1 a mf:QueryEvaluationTest ; - # xsd:date - # xsd:date - mf:name "date-1" ; - rdfs:comment "Added type : xsd:date '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - . - - # Fixed test (was wrong) - needs reapproving - # Decision at http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0118/04-dawg-minutes.html to leave test not approved -## dawgt:approval dawgt:Approved ; -## dawgt:approvedBy . - -:date-2 a mf:QueryEvaluationTest ; - mf:name "date-2" ; - rdfs:comment "Added type : xsd:date '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - mf:requires mf:xsd-date-eq-xsd-dateTime ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-3 a mf:QueryEvaluationTest ; - mf:name "date-3" ; - rdfs:comment "Added type : xsd:date '>'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-4 a mf:QueryEvaluationTest ; - mf:name "date-4" ; - rdfs:comment "xsd:date ORDER BY" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-cmp-01 a mf:QueryEvaluationTest ; - mf:name "open-cmp-01" ; - rdfs:comment "Find things that compare with < or >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-cmp-02 a mf:QueryEvaluationTest ; - mf:name "open-cmp-02" ; - rdfs:comment "Find things that compare with <= and >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01-result.srx.svn-base deleted file mode 100755 index c7e812df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01-result.srx.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - v1 - - - v2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01.rq.svn-base deleted file mode 100755 index d3f8318f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-01.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?v2 -{ - ?x :p [ :v1 ?v1 ; :v2 ?v2 ] . - FILTER ( ?v1 < ?v2 || ?v1 > ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02-result.srx.svn-base deleted file mode 100755 index 45de25a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02-result.srx.svn-base +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - http://example/x4 - - - test:abc - - - test:abc - - - - - http://example/x3 - - - x - - - x - - - - - http://example/x1 - - - v1 - - - v2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02.rq.svn-base deleted file mode 100755 index 42f94ef0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-cmp-02.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?v2 -{ - ?x :p [ :v1 ?v1 ; :v2 ?v2 ] . - FILTER ( ?v1 < ?v2 || ?v1 = ?v2 || ?v1 > ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01-result.srx.svn-base deleted file mode 100755 index d800fd26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01-result.srx.svn-base +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01.rq.svn-base deleted file mode 100755 index 4d0c448b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-01.rq.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -# SPARQL is defined over simple entailment so -# only syntactic matches show. -# (Some systems may match because they do -# value-based matching in the graph (D-entailment)) - -# Does not strictly match "1"^xsd:integer - -PREFIX : -PREFIX t: -PREFIX xsd: - -SELECT * -{ ?x :p "001"^^xsd:integer } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02-result.srx.svn-base deleted file mode 100755 index cf0d0eef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02-result.srx.svn-base +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02.rq.svn-base deleted file mode 100755 index 9760eb27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-02.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Test matching in a graph pattern -# Unknown type - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p "a"^^t:type1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03-result.srx.svn-base deleted file mode 100755 index 3850f058..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03-result.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example/ns#z2 - - - 01 - - - - - http://example/ns#z1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03.rq.svn-base deleted file mode 100755 index 119774f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-03.rq.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -# SPARQL FILTER test by value. -# A processor knows about XSD integer -# so 1 and 01 pass the filter - -PREFIX : -PREFIX t: -PREFIX rdf: -PREFIX rdfs: -PREFIX xsd: - -SELECT * -{ ?x :p ?v - FILTER ( ?v = 1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04-result.srx.svn-base deleted file mode 100755 index 5919d12f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04-result.srx.svn-base +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example/ns#z4 - - - 02 - - - - - http://example/ns#z3 - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04.rq.svn-base deleted file mode 100755 index cc6b58dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-04.rq.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -# SPARQL FILTER test by value. -# A processor knows about XSD integer -# so 1 and 01 are excluded by the filter - -PREFIX : -PREFIX t: -PREFIX rdf: -PREFIX rdfs: -PREFIX xsd: - -SELECT * -{ ?x :p ?v - FILTER ( ?v != 1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05-result.srx.svn-base deleted file mode 100755 index 66acd892..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05-result.srx.svn-base +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example/ns#x1 - - - a - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05.rq.svn-base deleted file mode 100755 index 88b34fff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-05.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# SPARQL FILTER test by value. -# Only one valus is known to be "a"^^t:type1 -# (others maybe but the processor does not positively know this) - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p ?v - FILTER ( ?v = "a"^^t:type1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06-result.srx.svn-base deleted file mode 100755 index 41065789..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06-result.srx.svn-base +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06.rq.svn-base deleted file mode 100755 index 5395a1b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-06.rq.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -# SPARQL FILTER test by value for known types. -# Nothing is known to be not the same value as "a"^^t:type1 -# "b"^^t:type1 might be a different lexical form for the same value -# "a"^^t:type2 might have overlapping value spaces for this lexicial form. - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p ?v - FILTER ( ?v != "a"^^t:type1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07-result.srx.svn-base deleted file mode 100755 index 39a9d982..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07-result.srx.svn-base +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x8 - - - http://example/xyz - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07.rq.svn-base deleted file mode 100755 index e693349f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-07.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08-result.srx.svn-base deleted file mode 100755 index ee251dfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08-result.srx.svn-base +++ /dev/null @@ -1,602 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x2 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x3 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x4 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x5 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x6 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x7 - - - b0 - - - http://example/x1 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x2 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x3 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x4 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x5 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x6 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x1 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x2 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x3 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x4 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x5 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x6 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x7 - - - b0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08.rq.svn-base deleted file mode 100755 index cd00e2cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-08.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09-result.srx.svn-base deleted file mode 100755 index a0a1cc00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09-result.srx.svn-base +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09.rq.svn-base deleted file mode 100755 index 15e4658a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-09.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10-result.srx.svn-base deleted file mode 100755 index 6bda1679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10-result.srx.svn-base +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x2 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x3 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x4 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x5 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x6 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x7 - - - b1 - - - http://example/y1 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y2 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y3 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y4 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y5 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y6 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y7 - - - b0 - - - - - http://example/x7 - - - b1 - - - http://example/y8 - - - http://example/abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y1 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y2 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y3 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y4 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y5 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y6 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y8 - - - http://example/abc - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10.rq.svn-base deleted file mode 100755 index b623706e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-10.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11-result.srx.svn-base deleted file mode 100755 index 6bda1679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11-result.srx.svn-base +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x2 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x3 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x4 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x5 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x6 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x7 - - - b1 - - - http://example/y1 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y2 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y3 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y4 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y5 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y6 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y7 - - - b0 - - - - - http://example/x7 - - - b1 - - - http://example/y8 - - - http://example/abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y1 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y2 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y3 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y4 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y5 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y6 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y8 - - - http://example/abc - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11.rq.svn-base deleted file mode 100755 index 8f160e83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-11.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 != ?v2 || ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12-result.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12-result.srx.svn-base deleted file mode 100755 index a018f541..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12-result.srx.svn-base +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x5 - - - xyz - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12.rq.svn-base deleted file mode 100755 index aca56535..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/open-eq-12.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?y ?v2 -{ - ?x :p ?v1 . - ?y :p ?v2 . - OPTIONAL { ?y :p ?v3 . FILTER( ?v1 != ?v3 || ?v1 = ?v3 )} - FILTER (!bound(?v3)) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-StringSimpleLiteralCmp.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-StringSimpleLiteralCmp.srx.svn-base deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-StringSimpleLiteralCmp.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq-StringSimpleLiteralCmp.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq-StringSimpleLiteralCmp.srx.svn-base deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq-StringSimpleLiteralCmp.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq.srx.svn-base deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-eq.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-manifest.ttl.svn-base deleted file mode 100755 index ea8827ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-manifest.ttl.svn-base +++ /dev/null @@ -1,61 +0,0 @@ -# Tests: sameTerm and mfx:StringSimpleLiteralCmp . -# $Id: sameTerm-manifest.ttl,v 1.1 2007/06/18 20:07:56 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix mfx: . -@prefix qt: . -@prefix xsd: . - -<> rdf:type mf:Manifest ; - rdfs:label "sameTerm and mfx:StringSimpleLiteralCmp" ; - mf:entries - ( - [ mf:name "sameTerm" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-StringSimpleLiteralCmp" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - [ mf:name "sameTerm-eq" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-eq-StringSimpleLiteralCmp" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - [ mf:name "sameTerm-not-eq" ; - rdfs:comment "!sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-not-eq-StringSimpleLiteralCmp" ; - rdfs:comment "!sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - ). diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq-StringSimpleLiteralCmp.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq-StringSimpleLiteralCmp.srx.svn-base deleted file mode 100755 index eb2a896c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq-StringSimpleLiteralCmp.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x1 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq.srx.svn-base deleted file mode 100755 index cc2ee171..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm-not-eq.srx.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.srx.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.srx.svn-base deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.srx.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.ttl.svn-base deleted file mode 100755 index 80814ee2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/.svn/text-base/sameTerm.ttl.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# Data: sameTerm tests -# $Id: sameTerm.ttl,v 1.1 2007/06/18 20:07:56 lfeigenb Exp $ - -@prefix : . -@prefix xsd: . - -:x1 :p "xyz" . -:x4 :p "xyz"^^xsd:string . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-1.ttl deleted file mode 100755 index 7155898a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-1.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix t: . -@prefix : . -@prefix xsd: . - -:x1 :p "a"^^t:type1 . -:x2 :p "b"^^t:type1 . - -:y1 :p "a"^^t:type2 . -:y2 :p "b"^^t:type2 . - -:z1 :p "1"^^xsd:integer . -:z2 :p "01"^^xsd:integer . -:z3 :p "2"^^xsd:integer . -:z4 :p "02"^^xsd:integer . - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-2.ttl deleted file mode 100755 index f55287dd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-2.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x1 :p "xyz" . -:x2 :p "xyz"@en . -:x3 :p "xyz"@EN . -:x4 :p "xyz"^^xsd:string . -:x5 :p "xyz"^^xsd:integer . -:x6 :p "xyz"^^:unknown . -:x7 :p _:xyz . -:x8 :p :xyz . - -:y1 :q "abc" . -:y2 :q "abc"@en . -:y3 :q "abc"@EN . -:y4 :q "abc"^^xsd:string . -:y5 :q "abc"^^xsd:integer . -:y6 :q "abc"^^:unknown . -:y7 :q _:abc . -:y8 :q :abc . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-3.ttl deleted file mode 100755 index 4cd4f3ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-3.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix xsd: . - -:dt1 :r "2006-08-23T09:00:00+01:00"^^xsd:dateTime . - -:d1 :r "2006-08-23"^^xsd:date . -:d2 :r "2006-08-23Z"^^xsd:date . -:d3 :r "2006-08-23+00:00"^^xsd:date . - -:d4 :r "2001-01-01"^^xsd:date . -:d5 :r "2001-01-01Z"^^xsd:date . - -:d6 :s "2006-08-23"^^xsd:date . -:d7 :s "2006-08-24Z"^^xsd:date . -:d8 :s "2000-01-01"^^xsd:date . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-4.ttl deleted file mode 100755 index 4b003b1d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-4.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix : . -@prefix xsd: . - - - -:x1 :p [ :v1 "v1" ; :v2 "v2" ] . - -:x2 :p [ :v1 "1"^^xsd:integer ; :v2 "v2" ] . - -:x3 :p [ :v1 "x"^^:unknown ; :v2 "x"^^:unknown ] . - -:x4 :p [ :v1 ; :v2 ] . - -:x5 :p [ :v1 "2006-08-23T09:00:00+01:00"^^xsd:dateTime ; - :v2 "2006-08-22"^^xsd:date ]. diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1-result.srx deleted file mode 100755 index 9c26dc64..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1-result.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example/d1 - - - 2006-08-23 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1.rq deleted file mode 100755 index 1b7ac46f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v = "2006-08-23"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2-result.srx deleted file mode 100755 index 9e783c48..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2-result.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d5 - - - 2001-01-01Z - - - - - http://example/d4 - - - 2001-01-01 - - - - - http://example/dt1 - - - 2006-08-23T09:00:00+01:00 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2.rq deleted file mode 100755 index 5efde54a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v != "2006-08-23"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3-result.srx deleted file mode 100755 index 27340a72..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3-result.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d3 - - - 2006-08-23+00:00 - - - - - http://example/d2 - - - 2006-08-23Z - - - - - http://example/d1 - - - 2006-08-23 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3.rq deleted file mode 100755 index bcb3744a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :r ?v . - FILTER ( ?v > "2006-08-22"^^xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4-result.srx deleted file mode 100755 index c3bfc439..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4-result.srx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - http://example/d8 - - - 2000-01-01 - - - - - http://example/d6 - - - 2006-08-23 - - - - - http://example/d7 - - - 2006-08-24Z - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4.rq deleted file mode 100755 index 408fef5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?date -{ - ?x :s ?date . - FILTER ( datatype(?date) = xsd:date ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl deleted file mode 100755 index 4c0eea45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl +++ /dev/null @@ -1,225 +0,0 @@ -# $Id: manifest.ttl,v 1.9 2007/09/11 22:44:05 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "open world value testing tests" ; - mf:entries - ( - :open-eq-01 :open-eq-02 :open-eq-03 :open-eq-04 :open-eq-05 :open-eq-06 - :open-eq-07 :open-eq-08 :open-eq-09 :open-eq-10 :open-eq-11 :open-eq-12 - :date-1 :date-2 :date-3 :date-4 - :open-cmp-01 :open-cmp-02 - ) . - -:open-eq-01 a mf:QueryEvaluationTest ; - mf:name "open-eq-01" ; - rdfs:comment "graph match - no lexical form in data (assumes no value matching)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-02 a mf:QueryEvaluationTest ; - mf:name "open-eq-02" ; - rdfs:comment "graph match - unknown type" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-03 a mf:QueryEvaluationTest ; - mf:name "open-eq-03" ; - rdfs:comment "Filter(?v=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-04 a mf:QueryEvaluationTest ; - mf:name "open-eq-04" ; - rdfs:comment "Filter(?v!=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-05 a mf:QueryEvaluationTest ; - mf:name "open-eq-05" ; - rdfs:comment "FILTER(?v = unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-06 a mf:QueryEvaluationTest ; - mf:name "open-eq-06" ; - rdfs:comment "FILTER(?v != unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-07 a mf:QueryEvaluationTest ; - mf:name "open-eq-07" ; - rdfs:comment "Test of '=' " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-08 a mf:QueryEvaluationTest ; - mf:name "open-eq-08" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-09 a mf:QueryEvaluationTest ; - mf:name "open-eq-09" ; - rdfs:comment "Test of '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-10 a mf:QueryEvaluationTest ; - mf:name "open-eq-10" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-11 a mf:QueryEvaluationTest ; - mf:name "open-eq-11" ; - rdfs:comment "test of '=' || '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-eq-12 a mf:QueryEvaluationTest ; - mf:name "open-eq-12" ; - rdfs:comment "find pairs that don't value-compare" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:LangTagAwareness ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-1 a mf:QueryEvaluationTest ; - # xsd:date - # xsd:date - mf:name "date-1" ; - rdfs:comment "Added type : xsd:date '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - . - - # Fixed test (was wrong) - needs reapproving - # Decision at http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0118/04-dawg-minutes.html to leave test not approved -## dawgt:approval dawgt:Approved ; -## dawgt:approvedBy . - -:date-2 a mf:QueryEvaluationTest ; - mf:name "date-2" ; - rdfs:comment "Added type : xsd:date '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - mf:requires mf:xsd-date-eq-xsd-dateTime ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-3 a mf:QueryEvaluationTest ; - mf:name "date-3" ; - rdfs:comment "Added type : xsd:date '>'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:date-4 a mf:QueryEvaluationTest ; - mf:name "date-4" ; - rdfs:comment "xsd:date ORDER BY" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-cmp-01 a mf:QueryEvaluationTest ; - mf:name "open-cmp-01" ; - rdfs:comment "Find things that compare with < or >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -:open-cmp-02 a mf:QueryEvaluationTest ; - mf:name "open-cmp-02" ; - rdfs:comment "Find things that compare with <= and >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl.bak deleted file mode 100755 index f5da86d2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl.bak +++ /dev/null @@ -1,219 +0,0 @@ -# $Id: manifest.ttl,v 1.3 2007/06/25 09:10:44 jbroekst Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "open world value testing tests" ; - mf:entries - ( - <#open-eq-01> <#open-eq-02> <#open-eq-03> <#open-eq-04> <#open-eq-05> <#open-eq-06> - <#open-eq-07> <#open-eq-08> <#open-eq-09> <#open-eq-10> <#open-eq-11> <#open-eq-12> - <#date-1> <#date-2> <#date-3> <#date-4> - <#open-cmp-01> <#open-cmp-02> - ) . - -<#open-eq-01> a mf:QueryEvaluationTest ; - mf:name "open-eq-01" ; - rdfs:comment "graph match - no lexical form in data (assumes no value matching)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-02> a mf:QueryEvaluationTest ; - mf:name "open-eq-02" ; - rdfs:comment "graph match - unknown type" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-03> a mf:QueryEvaluationTest ; - mf:name "open-eq-03" ; - rdfs:comment "Filter(?v=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-04> a mf:QueryEvaluationTest ; - mf:name "open-eq-04" ; - rdfs:comment "Filter(?v!=1)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-05> a mf:QueryEvaluationTest ; - mf:name "open-eq-05" ; - rdfs:comment "FILTER(?v = unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-06> a mf:QueryEvaluationTest ; - mf:name "open-eq-06" ; - rdfs:comment "FILTER(?v != unknown type)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-07> a mf:QueryEvaluationTest ; - mf:name "open-eq-07" ; - rdfs:comment "Test of '=' " ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-08> a mf:QueryEvaluationTest ; - mf:name "open-eq-08" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:StringSimpleLiteralCmp ; - mf:requires mf:LangCaseInsensitivity ; - mf:requires mf:KnownTypesDefault2Neq ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-09> a mf:QueryEvaluationTest ; - mf:name "open-eq-09" ; - rdfs:comment "Test of '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-10> a mf:QueryEvaluationTest ; - mf:name "open-eq-10" ; - rdfs:comment "Test of '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-11> a mf:QueryEvaluationTest ; - mf:name "open-eq-11" ; - rdfs:comment "test of '=' || '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-eq-12> a mf:QueryEvaluationTest ; - mf:name "open-eq-12" ; - rdfs:comment "find pairs that don't value-compare" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mf:IllFormedLiteral ; - mf:requires mf:KnownTypesDefault2Neq ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-1> a mf:QueryEvaluationTest ; - # xsd:date - # xsd:date - mf:name "date-1" ; - rdfs:comment "Added type : xsd:date '='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-2> a mf:QueryEvaluationTest ; - mf:name "date-2" ; - rdfs:comment "Added type : xsd:date '!='" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - mf:requires mf:xsd-date-eq-xsd-dateTime ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-3> a mf:QueryEvaluationTest ; - mf:name "date-3" ; - rdfs:comment "Added type : xsd:date '>'" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#date-4> a mf:QueryEvaluationTest ; - mf:name "date-4" ; - rdfs:comment "xsd:date ORDER BY" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-cmp-01> a mf:QueryEvaluationTest ; - mf:name "open-cmp-01" ; - rdfs:comment "Find things that compare with < or >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - -<#open-cmp-02> a mf:QueryEvaluationTest ; - mf:name "open-cmp-02" ; - rdfs:comment "Find things that compare with <= and >" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx deleted file mode 100755 index c7e812df..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - v1 - - - v2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01.rq deleted file mode 100755 index d3f8318f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?v2 -{ - ?x :p [ :v1 ?v1 ; :v2 ?v2 ] . - FILTER ( ?v1 < ?v2 || ?v1 > ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx deleted file mode 100755 index 45de25a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - http://example/x4 - - - test:abc - - - test:abc - - - - - http://example/x3 - - - x - - - x - - - - - http://example/x1 - - - v1 - - - v2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02.rq deleted file mode 100755 index 42f94ef0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?v2 -{ - ?x :p [ :v1 ?v1 ; :v2 ?v2 ] . - FILTER ( ?v1 < ?v2 || ?v1 = ?v2 || ?v1 > ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01-result.srx deleted file mode 100755 index d800fd26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01-result.srx +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01.rq deleted file mode 100755 index 4d0c448b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01.rq +++ /dev/null @@ -1,13 +0,0 @@ -# SPARQL is defined over simple entailment so -# only syntactic matches show. -# (Some systems may match because they do -# value-based matching in the graph (D-entailment)) - -# Does not strictly match "1"^xsd:integer - -PREFIX : -PREFIX t: -PREFIX xsd: - -SELECT * -{ ?x :p "001"^^xsd:integer } \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02-result.srx deleted file mode 100755 index cf0d0eef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02-result.srx +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - http://example/ns#x1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02.rq deleted file mode 100755 index 9760eb27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02.rq +++ /dev/null @@ -1,8 +0,0 @@ -# Test matching in a graph pattern -# Unknown type - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p "a"^^t:type1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03-result.srx deleted file mode 100755 index 3850f058..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03-result.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example/ns#z2 - - - 01 - - - - - http://example/ns#z1 - - - 1 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03.rq deleted file mode 100755 index 119774f9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03.rq +++ /dev/null @@ -1,14 +0,0 @@ -# SPARQL FILTER test by value. -# A processor knows about XSD integer -# so 1 and 01 pass the filter - -PREFIX : -PREFIX t: -PREFIX rdf: -PREFIX rdfs: -PREFIX xsd: - -SELECT * -{ ?x :p ?v - FILTER ( ?v = 1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04-result.srx deleted file mode 100755 index 5919d12f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04-result.srx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - http://example/ns#z4 - - - 02 - - - - - http://example/ns#z3 - - - 2 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04.rq deleted file mode 100755 index cc6b58dc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04.rq +++ /dev/null @@ -1,14 +0,0 @@ -# SPARQL FILTER test by value. -# A processor knows about XSD integer -# so 1 and 01 are excluded by the filter - -PREFIX : -PREFIX t: -PREFIX rdf: -PREFIX rdfs: -PREFIX xsd: - -SELECT * -{ ?x :p ?v - FILTER ( ?v != 1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05-result.srx deleted file mode 100755 index 66acd892..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05-result.srx +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - http://example/ns#x1 - - - a - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05.rq deleted file mode 100755 index 88b34fff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05.rq +++ /dev/null @@ -1,11 +0,0 @@ -# SPARQL FILTER test by value. -# Only one valus is known to be "a"^^t:type1 -# (others maybe but the processor does not positively know this) - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p ?v - FILTER ( ?v = "a"^^t:type1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06-result.srx deleted file mode 100755 index 41065789..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06-result.srx +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06.rq deleted file mode 100755 index 5395a1b8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06.rq +++ /dev/null @@ -1,12 +0,0 @@ -# SPARQL FILTER test by value for known types. -# Nothing is known to be not the same value as "a"^^t:type1 -# "b"^^t:type1 might be a different lexical form for the same value -# "a"^^t:type2 might have overlapping value spaces for this lexicial form. - -PREFIX : -PREFIX t: - -SELECT * -{ ?x :p ?v - FILTER ( ?v != "a"^^t:type1 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07-result.srx deleted file mode 100755 index 39a9d982..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07-result.srx +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x8 - - - http://example/xyz - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07.rq deleted file mode 100755 index e693349f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08-result.srx deleted file mode 100755 index ee251dfb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08-result.srx +++ /dev/null @@ -1,602 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x2 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x2 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x3 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x3 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x4 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x5 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x6 - - - xyz - - - http://example/x2 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x3 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x7 - - - b0 - - - http://example/x1 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x2 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x3 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x4 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x5 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x6 - - - xyz - - - - - http://example/x7 - - - b0 - - - http://example/x8 - - - http://example/xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x1 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x2 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x3 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x4 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x5 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x6 - - - xyz - - - - - http://example/x8 - - - http://example/xyz - - - http://example/x7 - - - b0 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08.rq deleted file mode 100755 index cd00e2cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x1 :p ?v1 . - ?x2 :p ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09-result.srx deleted file mode 100755 index a0a1cc00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09-result.srx +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09.rq deleted file mode 100755 index 15e4658a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10-result.srx deleted file mode 100755 index 6bda1679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10-result.srx +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x2 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x3 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x4 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x5 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x6 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x7 - - - b1 - - - http://example/y1 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y2 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y3 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y4 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y5 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y6 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y7 - - - b0 - - - - - http://example/x7 - - - b1 - - - http://example/y8 - - - http://example/abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y1 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y2 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y3 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y4 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y5 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y6 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y8 - - - http://example/abc - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10.rq deleted file mode 100755 index b623706e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 != ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11-result.srx deleted file mode 100755 index 6bda1679..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11-result.srx +++ /dev/null @@ -1,742 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x1 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x1 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x2 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x2 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x2 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x3 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y5 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y6 - - - abc - - - - - http://example/x3 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x3 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x4 - - - xyz - - - http://example/y1 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y4 - - - abc - - - - - http://example/x4 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x4 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x5 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x5 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x5 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x6 - - - xyz - - - http://example/y2 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y3 - - - abc - - - - - http://example/x6 - - - xyz - - - http://example/y7 - - - b0 - - - - - http://example/x6 - - - xyz - - - http://example/y8 - - - http://example/abc - - - - - http://example/x7 - - - b1 - - - http://example/y1 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y2 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y3 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y4 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y5 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y6 - - - abc - - - - - http://example/x7 - - - b1 - - - http://example/y7 - - - b0 - - - - - http://example/x7 - - - b1 - - - http://example/y8 - - - http://example/abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y1 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y2 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y3 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y4 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y5 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y6 - - - abc - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y7 - - - b0 - - - - - http://example/x8 - - - http://example/xyz - - - http://example/y8 - - - http://example/abc - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11.rq deleted file mode 100755 index 8f160e83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT * -{ - ?x :p ?v1 . - ?y :q ?v2 . - FILTER ( ?v1 != ?v2 || ?v1 = ?v2 ) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12-result.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12-result.srx deleted file mode 100755 index a018f541..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12-result.srx +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x1 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x5 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x5 - - - xyz - - - http://example/x6 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x6 - - - xyz - - - http://example/x5 - - - xyz - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12.rq deleted file mode 100755 index aca56535..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX : -PREFIX xsd: - -SELECT ?x ?v1 ?y ?v2 -{ - ?x :p ?v1 . - ?y :p ?v2 . - OPTIONAL { ?y :p ?v3 . FILTER( ?v1 != ?v3 || ?v1 = ?v3 )} - FILTER (!bound(?v3)) -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-StringSimpleLiteralCmp.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-StringSimpleLiteralCmp.srx deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-StringSimpleLiteralCmp.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.srx deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-manifest.ttl deleted file mode 100755 index ea8827ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-manifest.ttl +++ /dev/null @@ -1,61 +0,0 @@ -# Tests: sameTerm and mfx:StringSimpleLiteralCmp . -# $Id: sameTerm-manifest.ttl,v 1.1 2007/06/18 20:07:56 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix mfx: . -@prefix qt: . -@prefix xsd: . - -<> rdf:type mf:Manifest ; - rdfs:label "sameTerm and mfx:StringSimpleLiteralCmp" ; - mf:entries - ( - [ mf:name "sameTerm" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string)" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-StringSimpleLiteralCmp" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - [ mf:name "sameTerm-eq" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-eq-StringSimpleLiteralCmp" ; - rdfs:comment "sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - [ mf:name "sameTerm-not-eq" ; - rdfs:comment "!sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result - ] - [ mf:name "sameTerm-not-eq-StringSimpleLiteralCmp" ; - rdfs:comment "!sameTerm('xyz', 'xyz'^^xsd:string) and 'xyz'='xyz'^^xsd:string with mfx:StringSimpleLiteralCmp" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - mf:requires mfx:StringSimpleLiteralCmp - ] - ). diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx deleted file mode 100755 index eb2a896c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x4 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x1 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.srx deleted file mode 100755 index cc2ee171..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.srx +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.srx b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.srx deleted file mode 100755 index 0efe6a05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.srx +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - http://example/x1 - - - xyz - - - http://example/x1 - - - xyz - - - - - http://example/x4 - - - xyz - - - http://example/x4 - - - xyz - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.ttl deleted file mode 100755 index 80814ee2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.ttl +++ /dev/null @@ -1,8 +0,0 @@ -# Data: sameTerm tests -# $Id: sameTerm.ttl,v 1.1 2007/06/18 20:07:56 lfeigenb Exp $ - -@prefix : . -@prefix xsd: . - -:x1 :p "xyz" . -:x4 :p "xyz"^^xsd:string . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/all-wcprops deleted file mode 100755 index 1bc9018b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/all-wcprops +++ /dev/null @@ -1,59 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 100 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter -END -expr-3.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl.bak -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl -END -data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/data-1.ttl -END -expr-1-result.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl -END -expr-2-result.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl -END -expr-3-result.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl -END -expr-1.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1.rq -END -expr-2.rq -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/entries deleted file mode 100755 index 6a5ee2ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/entries +++ /dev/null @@ -1,136 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -expr-3.rq -file - - - - -2008-02-29T14:57:16.171333Z -e678d2baa36219fd9cb089bf3a747de7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:16.186953Z -a50930a96b2234dcb96f4baf8f5bb236 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:16.186953Z -d33079a3246e4ed8e02444695faa223e -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-1.ttl -file - - - - -2008-02-29T14:57:16.202574Z -aa166d1fd5d0aa918e1cfd36efe6baad -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-1-result.ttl -file - - - - -2008-02-29T14:57:16.202574Z -d3d1c17ccce52c2483ee8f821f816e0d -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-2-result.ttl -file - - - - -2008-02-29T14:57:16.202574Z -842d9ec8b296d92a9c775aaf728c5339 -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-3-result.ttl -file - - - - -2008-02-29T14:57:16.218195Z -d45bba9fd11e3eb120fdd6af19ea79f9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-1.rq -file - - - - -2008-02-29T14:57:16.218195Z -a810a2c65ed0b9d5b198e2866b96039c -2007-09-20T07:35:41.061956Z -540 -cweiske - -expr-2.rq -file - - - - -2008-02-29T14:57:16.233815Z -f01f78f8810f0406c7de76b9fe274c30 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/data-1.ttl.svn-base deleted file mode 100755 index b79212ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/data-1.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix x: . -@prefix : . -@prefix dc: . -@prefix xsd: . - -:book1 dc:title "TITLE 1" . -:book1 x:price "10"^^xsd:integer . - -:book2 dc:title "TITLE 2" . -:book2 x:price "20"^^xsd:integer . - -:book3 dc:title "TITLE 3" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1-result.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1-result.ttl.svn-base deleted file mode 100755 index 1bf6da9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1-result.ttl.svn-base +++ /dev/null @@ -1,27 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 3" ; - rs:variable "title" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 2" ; - rs:variable "title" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1.rq.svn-base deleted file mode 100755 index 5ea50fda..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-1.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price . - FILTER (?price < 15) . - } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2-result.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2-result.ttl.svn-base deleted file mode 100755 index caa3a451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2-result.ttl.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2.rq.svn-base deleted file mode 100755 index 80fd3fae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-2.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER (?price < 15) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3-result.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3-result.ttl.svn-base deleted file mode 100755 index a3cf2a5e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3-result.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 3" ; - rs:variable "title" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3.rq.svn-base deleted file mode 100755 index 0e33c6cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/expr-3.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER ( ( ! bound(?price) ) || ( ?price < 15 ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index fa737b38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL with inner and outer FILTERs" ; - mf:entries - (<#dawg-optional-filter-001> <#dawg-optional-filter-002> <#dawg-optional-filter-003> ). - -<#dawg-optional-filter-001> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL-FILTER" ; - rdfs:comment "FILTER inside an OPTIONAL does not block an entire solution" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-optional-filter-002> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER" ; - rdfs:comment "FILTER outside an OPTIONAL tests bound and unbound variables" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-optional-filter-003> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER with BOUND" ; - rdfs:comment "Use !bound to only run outer FILTERs against variables bound in an OPTIONAL" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 705ee148..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL with inner and outer FILTERs" ; - mf:entries - (:dawg-optional-filter-001 :dawg-optional-filter-002 :dawg-optional-filter-003 ). - -:dawg-optional-filter-001 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL-FILTER" ; - rdfs:comment "FILTER inside an OPTIONAL does not block an entire solution" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-optional-filter-002 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER" ; - rdfs:comment "FILTER outside an OPTIONAL tests bound and unbound variables" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-optional-filter-003 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER with BOUND" ; - rdfs:comment "Use !bound to only run outer FILTERs against variables bound in an OPTIONAL" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/data-1.ttl deleted file mode 100755 index b79212ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/data-1.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix x: . -@prefix : . -@prefix dc: . -@prefix xsd: . - -:book1 dc:title "TITLE 1" . -:book1 x:price "10"^^xsd:integer . - -:book2 dc:title "TITLE 2" . -:book2 x:price "20"^^xsd:integer . - -:book3 dc:title "TITLE 3" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl deleted file mode 100755 index 1bf6da9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 3" ; - rs:variable "title" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 2" ; - rs:variable "title" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1.rq deleted file mode 100755 index 5ea50fda..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1.rq +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price . - FILTER (?price < 15) . - } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl deleted file mode 100755 index caa3a451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2.rq deleted file mode 100755 index 80fd3fae..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER (?price < 15) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl deleted file mode 100755 index a3cf2a5e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix dc: . -@prefix rs: . -@prefix x: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "title" ; - rs:resultVariable "price" ; - rs:solution - [ rs:binding [ rs:value "TITLE 3" ; - rs:variable "title" - ] - ] ; - rs:solution - [ rs:binding [ rs:value "TITLE 1" ; - rs:variable "title" - ] ; - rs:binding [ rs:value "10"^^xsd:integer ; - rs:variable "price" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3.rq deleted file mode 100755 index 0e33c6cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3.rq +++ /dev/null @@ -1,9 +0,0 @@ -PREFIX dc: -PREFIX x: -SELECT ?title ?price -WHERE - { ?book dc:title ?title . - OPTIONAL - { ?book x:price ?price } . - FILTER ( ( ! bound(?price) ) || ( ?price < 15 ) ) . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl deleted file mode 100755 index 705ee148..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL with inner and outer FILTERs" ; - mf:entries - (:dawg-optional-filter-001 :dawg-optional-filter-002 :dawg-optional-filter-003 ). - -:dawg-optional-filter-001 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL-FILTER" ; - rdfs:comment "FILTER inside an OPTIONAL does not block an entire solution" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-optional-filter-002 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER" ; - rdfs:comment "FILTER outside an OPTIONAL tests bound and unbound variables" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-optional-filter-003 a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER with BOUND" ; - rdfs:comment "Use !bound to only run outer FILTERs against variables bound in an OPTIONAL" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl.bak deleted file mode 100755 index fa737b38..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl.bak +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL with inner and outer FILTERs" ; - mf:entries - (<#dawg-optional-filter-001> <#dawg-optional-filter-002> <#dawg-optional-filter-003> ). - -<#dawg-optional-filter-001> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL-FILTER" ; - rdfs:comment "FILTER inside an OPTIONAL does not block an entire solution" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-optional-filter-002> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER" ; - rdfs:comment "FILTER outside an OPTIONAL tests bound and unbound variables" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-optional-filter-003> a mf:QueryEvaluationTest ; - mf:name "OPTIONAL - Outer FILTER with BOUND" ; - rdfs:comment "Use !bound to only run outer FILTERs against variables bound in an OPTIONAL" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/all-wcprops deleted file mode 100755 index 8dd5edb6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/all-wcprops +++ /dev/null @@ -1,119 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 93 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional -END -complex-data-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-2.ttl -END -q-opt-1.rq -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-1.rq -END -result-opt-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-2.ttl -END -q-opt-2.rq -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-2.rq -END -result-opt-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-3.ttl -END -q-opt-3.rq -K 25 -svn:wc:ra_dav:version-url -V 104 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-3.rq -END -result-opt-complex-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl -END -result-opt-complex-2.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl -END -q-opt-complex-1.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-1.rq -END -result-opt-complex-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl -END -q-opt-complex-2.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-2.rq -END -result-opt-complex-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl -END -q-opt-complex-3.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-3.rq -END -q-opt-complex-4.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-4.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl.bak -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/data.ttl -END -result-opt-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-1.ttl -END -complex-data-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-1.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/entries deleted file mode 100755 index ca0ec78b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/entries +++ /dev/null @@ -1,256 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -complex-data-2.ttl -file - - - - -2008-02-29T14:57:13.843863Z -05117c999cb4ffdd5e30244ebd2b22aa -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-1.rq -file - - - - -2008-02-29T14:57:13.828243Z -955de74f8e51b849003ea9fecea04663 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-2.ttl -file - - - - -2008-02-29T14:57:13.828243Z -48e4d9487af0a2b702e7dc4d2b246247 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-2.rq -file - - - - -2008-02-29T14:57:13.843863Z -3df1f041160bce7f5e5f5386dcd1e762 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-3.ttl -file - - - - -2008-02-29T14:57:13.843863Z -b38331ced9f96c775934ce6a3a8459de -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-3.rq -file - - - - -2008-02-29T14:57:13.859484Z -3e0a7e88bf001b0c34038245720c24fe -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-complex-1.ttl -file - - - - -2008-02-29T14:57:13.859484Z -bc1200161496a05140f829f6fbe939c3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-complex-2.ttl -file - - - - -2008-02-29T14:57:13.875105Z -4bd994a6548ae39df4c177779c8404e9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-complex-1.rq -file - - - - -2008-02-29T14:57:13.859484Z -eee9c095c390062b04f9d4b0bc63b1b0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-complex-3.ttl -file - - - - -2008-02-29T14:57:13.890725Z -e8b5f113785d6e6e2e46f3c99cf0510d -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-complex-2.rq -file - - - - -2008-02-29T14:57:13.875105Z -50a89f176dceba21a29cd1c9ace5e631 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-complex-4.ttl -file - - - - -2008-02-29T14:57:13.890725Z -730ffe26f7e3f26badf436ebe2cd7c9d -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-complex-3.rq -file - - - - -2008-02-29T14:57:13.890725Z -1258659d35bc3ce9ca7dc79f2aac9b5c -2007-09-20T07:35:41.061956Z -540 -cweiske - -q-opt-complex-4.rq -file - - - - -2008-02-29T14:57:13.906346Z -f83d98eb2be113baaa717ec522945d7e -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:13.906346Z -4d3e3a518e82f252e7306234c4cbe628 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:13.906346Z -1f0566c9487e8100a534068c8bbc8471 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:13.921966Z -df8c98f528c8fb71041752ac7b17688f -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-opt-1.ttl -file - - - - -2008-02-29T14:57:13.921966Z -cebee37fb3ac811fabc4547c6f9002e9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -complex-data-1.ttl -file - - - - -2008-02-29T14:57:13.937587Z -5fa8031863628bc6dc1c9049b849f0c5 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-1.ttl.svn-base deleted file mode 100755 index 0c3b1f66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-1.ttl.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . - - - foaf:mbox ; - foaf:name "Alice"; - foaf:nick "WhoMe?"; - foaf:depiction . - - - foaf:mbox ; - foaf:nick "BigB" ; - foaf:name "Bert" . - - - foaf:mbox ; - foaf:firstName "Eve" . - - - foaf:mbox ; - foaf:nick "jDoe"; - foaf:isPrimaryTopicOf . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-2.ttl.svn-base deleted file mode 100755 index 7521627b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/complex-data-2.ttl.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer ; - ex:healthplan ex:HealthPlanD. - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer ; - ex:healthplan ex:HealthPlanC. - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer; - ex:healthplan ex:HealthPlanB. - -_:g rdf:type foaf:Person; - ex:ssn "000000000"; - foaf:name "Bert"; - ex:department "DeptA" ; - ex:healthplan ex:HealthPlanA. - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 19c0854f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 0eee7f0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL test cases" ; - mf:entries - (<#dawg-optional-001> <#dawg-optional-002> <#dawg-union-001> ). - -<#dawg-optional-001> a mf:QueryEvaluationTest ; - mf:name "One optional clause" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-optional-002> a mf:QueryEvaluationTest ; - mf:name "Two optional clauses" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-union-001> a mf:QueryEvaluationTest ; - mf:name "Union is not optional" ; - rdfs:comment "Union is not optional" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index ae76b45a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,99 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL test cases" ; - mf:entries - (:dawg-optional-001 - :dawg-optional-002 - :dawg-union-001 - :dawg-optional-complex-1 - :dawg-optional-complex-2 - :dawg-optional-complex-3 - :dawg-optional-complex-4 ). - -:dawg-optional-complex-1 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 1" ; - rdfs:comment - "Complex optional: LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-2 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 2" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Graph(var,{..})),Union(..,..))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-3 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 3" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Graph(var,{..})),LeftJoin(BGP(..),{..}))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-4 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 4" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..})))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-001 a mf:QueryEvaluationTest ; - mf:name "One optional clause" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-optional-002 a mf:QueryEvaluationTest ; - mf:name "Two optional clauses" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-union-001 a mf:QueryEvaluationTest ; - mf:name "Union is not optional" ; - rdfs:comment "Union is not optional" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-1.rq.svn-base deleted file mode 100755 index a171bedd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-1.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-2.rq.svn-base deleted file mode 100755 index a0f9998a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-2.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name ?nick - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - OPTIONAL { ?x foaf:nick ?nick } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-3.rq.svn-base deleted file mode 100755 index a500712f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-3.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - { ?x foaf:mbox ?mbox } - UNION - { ?x foaf:mbox ?mbox . ?x foaf:name ?name } - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-1.rq.svn-base deleted file mode 100755 index 1b91d97c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-1.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX foaf: -SELECT ?person ?nick ?page ?img ?name ?firstN -{ - ?person foaf:nick ?nick - OPTIONAL { ?person foaf:isPrimaryTopicOf ?page } - OPTIONAL { - ?person foaf:name ?name - { ?person foaf:depiction ?img } UNION - { ?person foaf:firstName ?firstN } - } FILTER ( bound(?page) || bound(?img) || bound(?firstN) ) -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-2.rq.svn-base deleted file mode 100755 index 4a84cd63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-2.rq.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?id ?ssn -WHERE -{ - ?person - a foaf:Person; - foaf:name ?name . - GRAPH ?x { - [] foaf:name ?name; - foaf:nick ?nick - } - OPTIONAL { - { ?person ex:empId ?id } UNION { ?person ex:ssn ?ssn } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-3.rq.svn-base deleted file mode 100755 index 3b9d5106..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-3.rq.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?name ?nick ?plan ?dept -WHERE -{ - ?person - a foaf:Person; - foaf:name ?name . - GRAPH ?x { - [] foaf:name ?name; - foaf:nick ?nick - } - OPTIONAL { - ?person ex:healthplan ?plan - OPTIONAL { ?person ex:department ?dept } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-4.rq.svn-base deleted file mode 100755 index c843a079..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/q-opt-complex-4.rq.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?name ?plan ?dept ?img -WHERE -{ - ?person foaf:name ?name - { ?person ex:healthplan ?plan } UNION { ?person ex:department ?dept } - OPTIONAL { - ?person a foaf:Person - GRAPH ?g { - [] foaf:name ?name; - foaf:depiction ?img - } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-1.ttl.svn-base deleted file mode 100755 index 6f3d5822..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-1.ttl.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-2.ttl.svn-base deleted file mode 100755 index 5f645738..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-2.ttl.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "nick" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "DuckSoup" ; - rs:variable "nick" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-3.ttl.svn-base deleted file mode 100755 index 211bbe06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-3.ttl.svn-base +++ /dev/null @@ -1,33 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-1.ttl.svn-base deleted file mode 100755 index 51c80cb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-1.ttl.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "person" ; - rs:resultVariable "nick" ; - rs:resultVariable "page" ; - rs:resultVariable "img" ; - rs:resultVariable "name" ; - rs:resultVariable "firstN" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "person" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ; - rs:variable "img" - ]; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "person" - ] ; - rs:binding [ rs:value "jDoe" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ; - rs:variable "page" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-2.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-2.ttl.svn-base deleted file mode 100755 index 36e3f26b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-2.ttl.svn-base +++ /dev/null @@ -1,16 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "id" ; - rs:resultVariable "ssn" ; - rs:solution [ rs:binding [ rs:value "29"^^xsd:integer ; - rs:variable "id" - ] - ] ; - rs:solution [ rs:binding [ rs:value "000000000" ; - rs:variable "ssn" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-3.ttl.svn-base deleted file mode 100755 index 03d2f666..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-3.ttl.svn-base +++ /dev/null @@ -1,33 +0,0 @@ -@prefix ex: . -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:resultVariable "nick" ; - rs:resultVariable "plan" ; - rs:resultVariable "dept" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ex:HealthPlanD ; - rs:variable "plan" - ] - ] ; - rs:solution _:a . _:a rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "BigB" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ex:HealthPlanA ; - rs:variable "plan" - ]; - rs:binding [ rs:value "DeptA" ; - rs:variable "dept" - ] - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-4.ttl.svn-base deleted file mode 100755 index 141d855b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/.svn/text-base/result-opt-complex-4.ttl.svn-base +++ /dev/null @@ -1,48 +0,0 @@ -@prefix ex: . -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "img" ; - rs:resultVariable "name" ; - rs:resultVariable "plan" ; - rs:resultVariable "dept" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "img" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanD; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanC; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanB; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ]; - rs:binding [ rs:value "DeptA" ; - rs:variable "dept" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanA ; - rs:variable "plan" - ]; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-1.ttl deleted file mode 100755 index 0c3b1f66..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-1.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . - - - foaf:mbox ; - foaf:name "Alice"; - foaf:nick "WhoMe?"; - foaf:depiction . - - - foaf:mbox ; - foaf:nick "BigB" ; - foaf:name "Bert" . - - - foaf:mbox ; - foaf:firstName "Eve" . - - - foaf:mbox ; - foaf:nick "jDoe"; - foaf:isPrimaryTopicOf . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-2.ttl deleted file mode 100755 index 7521627b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/complex-data-2.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer ; - ex:healthplan ex:HealthPlanD. - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer ; - ex:healthplan ex:HealthPlanC. - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer; - ex:healthplan ex:HealthPlanB. - -_:g rdf:type foaf:Person; - ex:ssn "000000000"; - foaf:name "Bert"; - ex:department "DeptA" ; - ex:healthplan ex:HealthPlanA. - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/data.ttl deleted file mode 100755 index 19c0854f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/data.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix foaf: . - -_:a foaf:mbox . -_:a foaf:name "Alice" . -_:a foaf:nick "WhoMe?" . - -_:b foaf:mbox . -_:b foaf:name "Bert" . - -_:e foaf:mbox . -_:e foaf:nick "DuckSoup" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl deleted file mode 100755 index ae76b45a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl +++ /dev/null @@ -1,99 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL test cases" ; - mf:entries - (:dawg-optional-001 - :dawg-optional-002 - :dawg-union-001 - :dawg-optional-complex-1 - :dawg-optional-complex-2 - :dawg-optional-complex-3 - :dawg-optional-complex-4 ). - -:dawg-optional-complex-1 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 1" ; - rdfs:comment - "Complex optional: LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-2 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 2" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Graph(var,{..})),Union(..,..))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-3 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 3" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Graph(var,{..})),LeftJoin(BGP(..),{..}))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-complex-4 a mf:QueryEvaluationTest ; - mf:name "Complex optional semantics: 4" ; - rdfs:comment - "Complex optional: LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..})))" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action - [ qt:query ; - qt:graphData ; - qt:data ] ; - mf:result . - -:dawg-optional-001 a mf:QueryEvaluationTest ; - mf:name "One optional clause" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-optional-002 a mf:QueryEvaluationTest ; - mf:name "Two optional clauses" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -:dawg-union-001 a mf:QueryEvaluationTest ; - mf:name "Union is not optional" ; - rdfs:comment "Union is not optional" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl.bak deleted file mode 100755 index 0eee7f0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl.bak +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "OPTIONAL test cases" ; - mf:entries - (<#dawg-optional-001> <#dawg-optional-002> <#dawg-union-001> ). - -<#dawg-optional-001> a mf:QueryEvaluationTest ; - mf:name "One optional clause" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-optional-002> a mf:QueryEvaluationTest ; - mf:name "Two optional clauses" ; - rdfs:comment - "One optional clause" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - -<#dawg-union-001> a mf:QueryEvaluationTest ; - mf:name "Union is not optional" ; - rdfs:comment "Union is not optional" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-1.rq deleted file mode 100755 index a171bedd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-1.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-2.rq deleted file mode 100755 index a0f9998a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-2.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name ?nick - { - ?x foaf:mbox ?mbox . - OPTIONAL { ?x foaf:name ?name } . - OPTIONAL { ?x foaf:nick ?nick } . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-3.rq deleted file mode 100755 index a500712f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-3.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: - -SELECT ?mbox ?name - { - { ?x foaf:mbox ?mbox } - UNION - { ?x foaf:mbox ?mbox . ?x foaf:name ?name } - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-1.rq deleted file mode 100755 index 1b91d97c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-1.rq +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX foaf: -SELECT ?person ?nick ?page ?img ?name ?firstN -{ - ?person foaf:nick ?nick - OPTIONAL { ?person foaf:isPrimaryTopicOf ?page } - OPTIONAL { - ?person foaf:name ?name - { ?person foaf:depiction ?img } UNION - { ?person foaf:firstName ?firstN } - } FILTER ( bound(?page) || bound(?img) || bound(?firstN) ) -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-2.rq deleted file mode 100755 index 4a84cd63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-2.rq +++ /dev/null @@ -1,16 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?id ?ssn -WHERE -{ - ?person - a foaf:Person; - foaf:name ?name . - GRAPH ?x { - [] foaf:name ?name; - foaf:nick ?nick - } - OPTIONAL { - { ?person ex:empId ?id } UNION { ?person ex:ssn ?ssn } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-3.rq deleted file mode 100755 index 3b9d5106..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-3.rq +++ /dev/null @@ -1,17 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?name ?nick ?plan ?dept -WHERE -{ - ?person - a foaf:Person; - foaf:name ?name . - GRAPH ?x { - [] foaf:name ?name; - foaf:nick ?nick - } - OPTIONAL { - ?person ex:healthplan ?plan - OPTIONAL { ?person ex:department ?dept } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-4.rq deleted file mode 100755 index c843a079..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-complex-4.rq +++ /dev/null @@ -1,15 +0,0 @@ -PREFIX foaf: -PREFIX ex: -SELECT ?name ?plan ?dept ?img -WHERE -{ - ?person foaf:name ?name - { ?person ex:healthplan ?plan } UNION { ?person ex:department ?dept } - OPTIONAL { - ?person a foaf:Person - GRAPH ?g { - [] foaf:name ?name; - foaf:depiction ?img - } - } -} \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-1.ttl deleted file mode 100755 index 6f3d5822..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-1.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-2.ttl deleted file mode 100755 index 5f645738..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-2.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "nick" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "DuckSoup" ; - rs:variable "nick" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-3.ttl deleted file mode 100755 index 211bbe06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-3.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix rs: . -@prefix rdf: . -@prefix foaf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "mbox" ; - rs:resultVariable "name" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "mbox" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl deleted file mode 100755 index 51c80cb5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-1.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "person" ; - rs:resultVariable "nick" ; - rs:resultVariable "page" ; - rs:resultVariable "img" ; - rs:resultVariable "name" ; - rs:resultVariable "firstN" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "person" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ; - rs:variable "img" - ]; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "person" - ] ; - rs:binding [ rs:value "jDoe" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ; - rs:variable "page" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl deleted file mode 100755 index 36e3f26b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-2.ttl +++ /dev/null @@ -1,16 +0,0 @@ -@prefix rs: . -@prefix foaf: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "id" ; - rs:resultVariable "ssn" ; - rs:solution [ rs:binding [ rs:value "29"^^xsd:integer ; - rs:variable "id" - ] - ] ; - rs:solution [ rs:binding [ rs:value "000000000" ; - rs:variable "ssn" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl deleted file mode 100755 index 03d2f666..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-3.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix ex: . -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "name" ; - rs:resultVariable "nick" ; - rs:resultVariable "plan" ; - rs:resultVariable "dept" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "WhoMe?" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ex:HealthPlanD ; - rs:variable "plan" - ] - ] ; - rs:solution _:a . _:a rs:binding [ rs:value "Bert" ; - rs:variable "name" - ] ; - rs:binding [ rs:value "BigB" ; - rs:variable "nick" - ]; - rs:binding [ rs:value ex:HealthPlanA ; - rs:variable "plan" - ]; - rs:binding [ rs:value "DeptA" ; - rs:variable "dept" - ] - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl deleted file mode 100755 index 141d855b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-complex-4.ttl +++ /dev/null @@ -1,48 +0,0 @@ -@prefix ex: . -@prefix rs: . -@prefix foaf: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "img" ; - rs:resultVariable "name" ; - rs:resultVariable "plan" ; - rs:resultVariable "dept" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "img" - ] ; - rs:binding [ rs:value "Alice" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanD; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanC; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanB; - rs:variable "plan" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ]; - rs:binding [ rs:value "DeptA" ; - rs:variable "dept" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Bert" ; - rs:variable "name" - ]; - rs:binding [ rs:value ex:HealthPlanA ; - rs:variable "plan" - ]; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/all-wcprops deleted file mode 100755 index 0ce355ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/all-wcprops +++ /dev/null @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex -END -regex-query-004.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-004.rq -END -regex-data-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-data-01.ttl -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl.bak -END -regex-result-001.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-001.ttl -END -regex-result-002.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-002.ttl -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 103 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl -END -regex-result-003.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-003.ttl -END -regex-result-004.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-004.ttl -END -regex-query-001.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-001.rq -END -regex-query-002.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-002.rq -END -regex-query-003.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-003.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/entries deleted file mode 100755 index 6ca4b211..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/entries +++ /dev/null @@ -1,160 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -regex-query-004.rq -file - - - - -2008-02-29T14:57:16.358780Z -f8eba301120435c602dff1edd5404a03 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-data-01.ttl -file - - - - -2008-02-29T14:57:16.358780Z -6eac13969d596a9844e68cbfd26388f8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:16.374401Z -b962adb856571449c381abe7345f6064 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-result-001.ttl -file - - - - -2008-02-29T14:57:16.374401Z -bce7c0da9de88c33d6ec810082933793 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-result-002.ttl -file - - - - -2008-02-29T14:57:16.390021Z -5a3a168ecf563b6c9d47935c7fe62c90 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:16.390021Z -73c7fd7fa3c13e31eb64f726a4ebbd8a -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-result-003.ttl -file - - - - -2008-02-29T14:57:16.390021Z -ad14d3efb5186011dfb09ee25ff66851 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-result-004.ttl -file - - - - -2008-02-29T14:57:16.405642Z -251dc3a1abd1e88c8b81b312cff1f1f8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-query-001.rq -file - - - - -2008-02-29T14:57:16.405642Z -8456373eeabbd31d2c70d8a3ea88b916 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-query-002.rq -file - - - - -2008-02-29T14:57:16.405642Z -983bd0b288ea850acd50069aebff7257 -2007-09-20T07:35:41.061956Z -540 -cweiske - -regex-query-003.rq -file - - - - -2008-02-29T14:57:16.421262Z -9dae5dfdb0ee28e14a5ab36627aeb482 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 17ce2e5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,56 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL regex test cases" ; - mf:entries ( - <#dawg-regex-001> <#dawg-regex-002> <#dawg-regex-003> <#dawg-regex-004> - ). - -<#dawg-regex-001> a mf:QueryEvaluationTest ; - mf:name "regex-query-001" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Simple unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-002> a mf:QueryEvaluationTest ; - mf:name "regex-query-002" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Case insensitive unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-003> a mf:QueryEvaluationTest ; - mf:name "regex-query-003" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Use/mention test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-004> a mf:QueryEvaluationTest ; - mf:name "regex-query-004" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "str()+URI test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index d3519081..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL regex test cases" ; - mf:entries ( - :dawg-regex-001 :dawg-regex-002 :dawg-regex-003 :dawg-regex-004 - ). - -:dawg-regex-001 a mf:QueryEvaluationTest ; - mf:name "regex-query-001" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Simple unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-002 a mf:QueryEvaluationTest ; - mf:name "regex-query-002" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Case insensitive unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-003 a mf:QueryEvaluationTest ; - mf:name "regex-query-003" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Use/mention test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-004 a mf:QueryEvaluationTest ; - mf:name "regex-query-004" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "str()+URI test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-data-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-data-01.ttl.svn-base deleted file mode 100755 index 930f1b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-data-01.ttl.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -@prefix rdf: . -@prefix ex: . - -ex:foo rdf:value "abcDEFghiJKL" , "ABCdefGHIjkl", "0123456789", - , "http://example.com/literal" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-001.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-001.rq.svn-base deleted file mode 100755 index 3c8f6613..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-001.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "GHI") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-002.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-002.rq.svn-base deleted file mode 100755 index b0bb7fde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-002.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ex: -PREFIX rdf: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "DeFghI", "i") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-003.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-003.rq.svn-base deleted file mode 100755 index 384da9b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-003.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-004.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-004.rq.svn-base deleted file mode 100755 index 1635291f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-query-004.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX ex: -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(str(?val), "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-001.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-001.ttl.svn-base deleted file mode 100755 index fe8ad33b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-001.ttl.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "ABCdefGHIjkl" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-002.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-002.ttl.svn-base deleted file mode 100755 index afe3844f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-002.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "ABCdefGHIjkl" ; - rs:variable "val" - ] ; - ] ; - rs:solution [ rs:binding [ rs:value "abcDEFghiJKL" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-003.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-003.ttl.svn-base deleted file mode 100755 index 8db39583..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-003.ttl.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "http://example.com/literal" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-004.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-004.ttl.svn-base deleted file mode 100755 index 18b66bd5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/.svn/text-base/regex-result-004.ttl.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "http://example.com/literal" ; - rs:variable "val" - ] ; - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl deleted file mode 100755 index d3519081..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL regex test cases" ; - mf:entries ( - :dawg-regex-001 :dawg-regex-002 :dawg-regex-003 :dawg-regex-004 - ). - -:dawg-regex-001 a mf:QueryEvaluationTest ; - mf:name "regex-query-001" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Simple unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-002 a mf:QueryEvaluationTest ; - mf:name "regex-query-002" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Case insensitive unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-003 a mf:QueryEvaluationTest ; - mf:name "regex-query-003" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Use/mention test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-regex-004 a mf:QueryEvaluationTest ; - mf:name "regex-query-004" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "str()+URI test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl.bak deleted file mode 100755 index 17ce2e5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl.bak +++ /dev/null @@ -1,56 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "SPARQL regex test cases" ; - mf:entries ( - <#dawg-regex-001> <#dawg-regex-002> <#dawg-regex-003> <#dawg-regex-004> - ). - -<#dawg-regex-001> a mf:QueryEvaluationTest ; - mf:name "regex-query-001" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Simple unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-002> a mf:QueryEvaluationTest ; - mf:name "regex-query-002" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Case insensitive unanchored match test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-003> a mf:QueryEvaluationTest ; - mf:name "regex-query-003" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Use/mention test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-regex-004> a mf:QueryEvaluationTest ; - mf:name "regex-query-004" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "str()+URI test" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-data-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-data-01.ttl deleted file mode 100755 index 930f1b7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-data-01.ttl +++ /dev/null @@ -1,5 +0,0 @@ -@prefix rdf: . -@prefix ex: . - -ex:foo rdf:value "abcDEFghiJKL" , "ABCdefGHIjkl", "0123456789", - , "http://example.com/literal" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-001.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-001.rq deleted file mode 100755 index 3c8f6613..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-001.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "GHI") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-002.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-002.rq deleted file mode 100755 index b0bb7fde..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-002.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX ex: -PREFIX rdf: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "DeFghI", "i") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-003.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-003.rq deleted file mode 100755 index 384da9b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-003.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX ex: - -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(?val, "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-004.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-004.rq deleted file mode 100755 index 1635291f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-004.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX rdf: -PREFIX ex: -SELECT ?val -WHERE { - ex:foo rdf:value ?val . - FILTER regex(str(?val), "example\\.com") -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-001.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-001.ttl deleted file mode 100755 index fe8ad33b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-001.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "ABCdefGHIjkl" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-002.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-002.ttl deleted file mode 100755 index afe3844f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-002.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "ABCdefGHIjkl" ; - rs:variable "val" - ] ; - ] ; - rs:solution [ rs:binding [ rs:value "abcDEFghiJKL" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-003.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-003.ttl deleted file mode 100755 index 8db39583..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-003.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "http://example.com/literal" ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-004.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-004.ttl deleted file mode 100755 index 18b66bd5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-004.ttl +++ /dev/null @@ -1,14 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "val" ; - rs:solution [ rs:binding [ rs:value "http://example.com/literal" ; - rs:variable "val" - ] ; - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "val" - ] ; - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/all-wcprops deleted file mode 100755 index 3e409e26..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/slice -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/entries deleted file mode 100755 index 420100cc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/entries +++ /dev/null @@ -1,28 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/slice -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/slice/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/all-wcprops deleted file mode 100755 index 1d8d0e9b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/all-wcprops +++ /dev/null @@ -1,179 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq -END -slice-results-20.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-20.ttl -END -slice-results-11.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-11.ttl -END -slice-results-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-02.ttl -END -slice-results-21.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-21.ttl -END -slice-results-12.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-12.ttl -END -slice-results-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-03.ttl -END -slice-results-22.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-22.ttl -END -slice-results-13.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-13.ttl -END -slice-results-04.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-04.ttl -END -slice-results-23.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-23.ttl -END -slice-results-24.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-24.ttl -END -slice-01.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-01.rq -END -slice-10.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-10.rq -END -slice-02.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-02.rq -END -slice-11.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-11.rq -END -slice-20.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-20.rq -END -slice-21.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-21.rq -END -slice-12.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-12.rq -END -slice-03.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-03.rq -END -slice-22.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-22.rq -END -slice-13.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-13.rq -END -slice-04.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-04.rq -END -slice-23.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-23.rq -END -slice-24.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-24.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl.bak -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl -END -data.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/data.ttl -END -slice-results-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-01.ttl -END -slice-results-10.ttl -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-10.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/entries deleted file mode 100755 index ea946b95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/entries +++ /dev/null @@ -1,376 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -slice-results-20.ttl -file - - - - -2008-02-29T14:57:20.342033Z -2a3c84a59b0ef3753d957efd87b313b8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-11.ttl -file - - - - -2008-02-29T14:57:20.342033Z -ad490493019048fd11065d1d91c52020 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-02.ttl -file - - - - -2008-02-29T14:57:20.342033Z -d8ab50744f972dff83df231af2493b66 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-21.ttl -file - - - - -2008-02-29T14:57:20.373274Z -fad507046852bc9c08907e027c20682b -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-12.ttl -file - - - - -2008-02-29T14:57:20.357654Z -c4710f5d9fed0f23148672ef86087583 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-03.ttl -file - - - - -2008-02-29T14:57:20.357654Z -c4710f5d9fed0f23148672ef86087583 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-22.ttl -file - - - - -2008-02-29T14:57:20.388895Z -c4710f5d9fed0f23148672ef86087583 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-13.ttl -file - - - - -2008-02-29T14:57:20.373274Z -76cebeffcc71a3f1ddf0b100b2017a62 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-04.ttl -file - - - - -2008-02-29T14:57:20.373274Z -62e42189ff3c4a0292b718f9e582e1ee -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-23.ttl -file - - - - -2008-02-29T14:57:20.388895Z -3f48a5f34e40290840d0229ff05275eb -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-24.ttl -file - - - - -2008-02-29T14:57:20.388895Z -76cebeffcc71a3f1ddf0b100b2017a62 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-01.rq -file - - - - -2008-02-29T14:57:20.404515Z -bf09c0bac85fb0db8061928bd4ebb13b -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-10.rq -file - - - - -2008-02-29T14:57:20.404515Z -3825550fee355b75d75396df1441c379 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-11.rq -file - - - - -2008-02-29T14:57:20.420136Z -aa3fdc625e75ef50e76681fee8ee8830 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-20.rq -file - - - - -2008-02-29T14:57:20.420136Z -becee71ca275ca3df82d53005e7406bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-02.rq -file - - - - -2008-02-29T14:57:20.420136Z -b58c3a91ed261a96158b5b7fb9eb2b71 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-21.rq -file - - - - -2008-02-29T14:57:20.435757Z -f9be59d3bfd7512b3796940b101edb69 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-12.rq -file - - - - -2008-02-29T14:57:20.435757Z -f02428336dfc47985b1f5531cada6d38 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-03.rq -file - - - - -2008-02-29T14:57:20.435757Z -e46a52aa545cec2d5ca742a9c6f1d37e -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-22.rq -file - - - - -2008-02-29T14:57:20.451377Z -dd6ae7d862a72f8426e65eb21917dcaa -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-13.rq -file - - - - -2008-02-29T14:57:20.451377Z -efce29aee91a7eb2988b35c9c079be2e -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-04.rq -file - - - - -2008-02-29T14:57:20.451377Z -3274eb3ea8ae4e2d23fca115e6384903 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-23.rq -file - - - - -2008-02-29T14:57:20.466998Z -102a470a9386b79ab7a13056f3f8c510 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-24.rq -file - - - - -2008-02-29T14:57:20.466998Z -f4dfc998364f8ff606c24a13a9f0d8e7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:20.466998Z -4a29f570e0135f0b37c75357c4fb7e28 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:20.482618Z -332bf54bb8f72d69fe4d26b762e38548 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data.ttl -file - - - - -2008-02-29T14:57:20.482618Z -2298a4365c7ea3a193137aa03f5eefda -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-01.ttl -file - - - - -2008-02-29T14:57:20.482618Z -2a3c84a59b0ef3753d957efd87b313b8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -slice-results-10.ttl -file - - - - -2008-02-29T14:57:20.498239Z -77ded7f33bc10b7e3efb89807251a2ac -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/data.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/data.ttl.svn-base deleted file mode 100755 index 5718aa0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/data.ttl.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :num "1"^^xsd:integer . -:x :num "2"^^xsd:integer . -:x :num "3"^^xsd:integer . -:x :num "4"^^xsd:integer . -:x :num "1.5"^^xsd:decimal . - -:y :num "1"^^xsd:integer . -:y :num "2"^^xsd:integer . -:y :num "3"^^xsd:integer . - -:x :str "aaa" . -:x :str "002" . -:x :str "1" . -:x :str "AAA" . -:x :str "" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 935e174d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,89 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Solution Sequence" ; - mf:entries - ( - <#limit-1> - <#limit-2> - <#limit-3> - <#limit-4> - <#offset-1> - <#offset-2> - <#offset-3> - <#offset-4> - <#slice-1> - <#slice-2> - <#slice-3> - <#slice-4> - <#slice-5> - ) . - - -<#limit-1> - mf:name "Limit 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-2> - mf:name "Limit 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-3> - mf:name "Limit 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-4> - mf:name "Limit 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-1> - mf:name "Offset 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-2> - mf:name "Offset 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-3> - mf:name "Offset 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-4> - mf:name "Offset 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-1> - mf:name "Slice 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-2> - mf:name "Slice 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-3> - mf:name "Slice 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-4> - mf:name "Slice 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-5> - mf:name "Slice 5" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 291e1bb1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,117 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Solution Sequence" ; - mf:entries - ( - :limit-1 - :limit-2 - :limit-3 - :limit-4 - :offset-1 - :offset-2 - :offset-3 - :offset-4 - :slice-1 - :slice-2 - :slice-3 - :slice-4 - :slice-5 - ) . - - -:limit-1 - mf:name "Limit 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-2 - mf:name "Limit 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-3 - mf:name "Limit 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-4 - mf:name "Limit 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-1 - mf:name "Offset 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-2 - mf:name "Offset 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-3 - mf:name "Offset 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-4 - mf:name "Offset 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-1 - mf:name "Slice 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-2 - mf:name "Slice 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-3 - mf:name "Slice 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-4 - mf:name "Slice 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-5 - mf:name "Slice 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-01.rq.svn-base deleted file mode 100755 index d9ec37a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-01.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 1 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-02.rq.svn-base deleted file mode 100755 index a438f451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-02.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 100 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-03.rq.svn-base deleted file mode 100755 index 3ed7eb22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-03.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 0 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-04.rq.svn-base deleted file mode 100755 index 8ded67d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-04.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 100 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-10.rq.svn-base deleted file mode 100755 index 212e98f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-10.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 1 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-11.rq.svn-base deleted file mode 100755 index b40c5e7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-11.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 0 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-12.rq.svn-base deleted file mode 100755 index 25a3a38b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-12.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 100 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-13.rq.svn-base deleted file mode 100755 index afab880a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-13.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-20.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-20.rq.svn-base deleted file mode 100755 index c01e3fe0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-20.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 1 -OFFSET 1 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-21.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-21.rq.svn-base deleted file mode 100755 index 2e996f63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-21.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 1 -LIMIT 2 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-22.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-22.rq.svn-base deleted file mode 100755 index d0728f04..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-22.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] ?p ?v } -ORDER BY ?v -OFFSET 100 -LIMIT 1 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-23.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-23.rq.svn-base deleted file mode 100755 index c4b9e80b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-23.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 -LIMIT 5 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-24.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-24.rq.svn-base deleted file mode 100755 index ccf659ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-24.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-01.ttl.svn-base deleted file mode 100755 index 7f9f318c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-01.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-02.ttl.svn-base deleted file mode 100755 index fd6beafc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-02.ttl.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 8 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-03.ttl.svn-base deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-03.ttl.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-04.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-04.ttl.svn-base deleted file mode 100755 index 1d82eb18..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-04.ttl.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-10.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-10.ttl.svn-base deleted file mode 100755 index 91bd5386..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-10.ttl.svn-base +++ /dev/null @@ -1,42 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-11.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-11.ttl.svn-base deleted file mode 100755 index 3aa57675..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-11.ttl.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 8 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-12.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-12.ttl.svn-base deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-12.ttl.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-13.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-13.ttl.svn-base deleted file mode 100755 index 2b29162a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-13.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-20.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-20.ttl.svn-base deleted file mode 100755 index 7f9f318c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-20.ttl.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-21.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-21.ttl.svn-base deleted file mode 100755 index d2ee444d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-21.ttl.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-22.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-22.ttl.svn-base deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-22.ttl.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-23.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-23.ttl.svn-base deleted file mode 100755 index fe33c3c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-23.ttl.svn-base +++ /dev/null @@ -1,32 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-24.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-24.ttl.svn-base deleted file mode 100755 index 2b29162a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/.svn/text-base/slice-results-24.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/data.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/data.ttl deleted file mode 100755 index 5718aa0e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/data.ttl +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix xsd: . - -:x :num "1"^^xsd:integer . -:x :num "2"^^xsd:integer . -:x :num "3"^^xsd:integer . -:x :num "4"^^xsd:integer . -:x :num "1.5"^^xsd:decimal . - -:y :num "1"^^xsd:integer . -:y :num "2"^^xsd:integer . -:y :num "3"^^xsd:integer . - -:x :str "aaa" . -:x :str "002" . -:x :str "1" . -:x :str "AAA" . -:x :str "" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl deleted file mode 100755 index 291e1bb1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl +++ /dev/null @@ -1,117 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Solution Sequence" ; - mf:entries - ( - :limit-1 - :limit-2 - :limit-3 - :limit-4 - :offset-1 - :offset-2 - :offset-3 - :offset-4 - :slice-1 - :slice-2 - :slice-3 - :slice-4 - :slice-5 - ) . - - -:limit-1 - mf:name "Limit 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-2 - mf:name "Limit 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-3 - mf:name "Limit 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:limit-4 - mf:name "Limit 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-1 - mf:name "Offset 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-2 - mf:name "Offset 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-3 - mf:name "Offset 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:offset-4 - mf:name "Offset 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-1 - mf:name "Slice 1" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-2 - mf:name "Slice 2" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-3 - mf:name "Slice 3" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-4 - mf:name "Slice 4" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -:slice-5 - mf:name "Slice 5" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - mf:action [ qt:query ; qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl.bak deleted file mode 100755 index 935e174d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl.bak +++ /dev/null @@ -1,89 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:label "Solution Sequence" ; - mf:entries - ( - <#limit-1> - <#limit-2> - <#limit-3> - <#limit-4> - <#offset-1> - <#offset-2> - <#offset-3> - <#offset-4> - <#slice-1> - <#slice-2> - <#slice-3> - <#slice-4> - <#slice-5> - ) . - - -<#limit-1> - mf:name "Limit 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-2> - mf:name "Limit 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-3> - mf:name "Limit 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#limit-4> - mf:name "Limit 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-1> - mf:name "Offset 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-2> - mf:name "Offset 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-3> - mf:name "Offset 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#offset-4> - mf:name "Offset 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-1> - mf:name "Slice 1" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-2> - mf:name "Slice 2" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-3> - mf:name "Slice 3" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-4> - mf:name "Slice 4" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . - -<#slice-5> - mf:name "Slice 5" ; - mf:action [ qt:query ; qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-01.rq deleted file mode 100755 index d9ec37a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-01.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 1 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-02.rq deleted file mode 100755 index a438f451..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-02.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 100 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-03.rq deleted file mode 100755 index 3ed7eb22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-03.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 0 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-04.rq deleted file mode 100755 index 8ded67d7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-04.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 100 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-10.rq deleted file mode 100755 index 212e98f0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-10.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 1 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-11.rq deleted file mode 100755 index b40c5e7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-11.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 0 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-12.rq deleted file mode 100755 index 25a3a38b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-12.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 100 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-13.rq deleted file mode 100755 index afab880a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-13.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-20.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-20.rq deleted file mode 100755 index c01e3fe0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-20.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -LIMIT 1 -OFFSET 1 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-21.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-21.rq deleted file mode 100755 index 2e996f63..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-21.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 1 -LIMIT 2 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-22.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-22.rq deleted file mode 100755 index d0728f04..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-22.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] ?p ?v } -ORDER BY ?v -OFFSET 100 -LIMIT 1 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-23.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-23.rq deleted file mode 100755 index c4b9e80b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-23.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 -LIMIT 5 \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-24.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-24.rq deleted file mode 100755 index ccf659ab..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-24.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : - -SELECT DISTINCT ?v -WHERE { [] :num ?v } -ORDER BY ?v -OFFSET 2 -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-01.ttl deleted file mode 100755 index 7f9f318c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-01.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-02.ttl deleted file mode 100755 index fd6beafc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-02.ttl +++ /dev/null @@ -1,47 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 8 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-03.ttl deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-03.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-04.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-04.ttl deleted file mode 100755 index 1d82eb18..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-04.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-10.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-10.ttl deleted file mode 100755 index 91bd5386..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-10.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-11.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-11.ttl deleted file mode 100755 index 3aa57675..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-11.ttl +++ /dev/null @@ -1,47 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 8 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 7 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-12.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-12.ttl deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-12.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-13.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-13.ttl deleted file mode 100755 index 2b29162a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-13.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-20.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-20.ttl deleted file mode 100755 index 7f9f318c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-20.ttl +++ /dev/null @@ -1,12 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-21.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-21.ttl deleted file mode 100755 index d2ee444d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-21.ttl +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "1"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-22.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-22.ttl deleted file mode 100755 index 9809666f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-22.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-23.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-23.ttl deleted file mode 100755 index fe33c3c2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-23.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "1.5"^^xsd:decimal ; - rs:variable "v" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 5 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-24.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-24.ttl deleted file mode 100755 index 2b29162a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-24.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix : . -@prefix rs: . -@prefix rdf: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable "v" ; - rs:solution [ rs:binding [ rs:value "4"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "3"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "2"^^xsd:integer ; - rs:variable "v" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.manifest.ttl.swp b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.manifest.ttl.swp deleted file mode 100755 index 9a14952b..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.manifest.ttl.swp and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/all-wcprops deleted file mode 100755 index 8d7eaa4e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/all-wcprops +++ /dev/null @@ -1,245 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 89 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort -END -data-sort-11.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-11.ttl -END -data-sort-function.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-function.ttl -END -result-sort-10.rdf -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-10.rdf -END -query-sort-function.rq -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-function.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl.bak -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 102 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl -END -data-sort-numbers.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-numbers.ttl -END -query-sort-1.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-1.rq -END -result-sort-1.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-1.rdf -END -query-sort-3.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-3.rq -END -result-sort-2.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-2.rdf -END -result-sort-3.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-3.rdf -END -query-sort-5.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-5.rq -END -result-sort-4.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-4.rdf -END -result-sort-numbers.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-numbers.ttl -END -result-sort-5.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-5.rdf -END -query-sort-builtin.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-builtin.rq -END -result-sort-6.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-6.rdf -END -result-sort-7.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-7.rdf -END -query-sort-9.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-9.rq -END -result-sort-8.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-8.rdf -END -result-sort-9.rdf -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-9.rdf -END -query-sort-numbers.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-numbers.rq -END -result-sort-11.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-11.ttl -END -result-sort-function.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-function.ttl -END -query-sort-10.rq -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-10.rq -END -data-sort-1.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-1.ttl -END -.manifest.ttl.swp -K 25 -svn:wc:ra_dav:version-url -V 107 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/.manifest.ttl.swp -END -data-sort-3.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-3.ttl -END -data-sort-4.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-4.ttl -END -data-sort-6.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-6.ttl -END -data-sort-7.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-7.ttl -END -data-sort-builtin.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-builtin.ttl -END -data-sort-8.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-8.ttl -END -data-sort-9.ttl -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-9.ttl -END -extended-manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/extended-manifest.ttl -END -result-sort-builtin.ttl -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-builtin.ttl -END -query-sort-2.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-2.rq -END -query-sort-4.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-4.rq -END -query-sort-6.rq -K 25 -svn:wc:ra_dav:version-url -V 105 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-6.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/entries deleted file mode 100755 index dd078ce6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/entries +++ /dev/null @@ -1,509 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -data-sort-11.ttl -file - - - - -2008-02-29T14:57:18.358217Z -695cdffe671bd894c7914df08ee5030f -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-function.ttl -file - - - - -2008-02-29T14:57:18.373837Z -1a9e4c810e369831062967dcb6dc2891 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-10.rdf -file - - - - -2008-02-29T14:57:18.373837Z -5ebff57a9738ac7061c7ae3d89a612a1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-function.rq -file - - - - -2008-02-29T14:57:18.389458Z -51a9a75e39f52f5e8a448ebc4f9b21ef -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:18.389458Z -93951412b2eb9defc4ba7e0424f98e86 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:18.389458Z -823ccba1a801226bb0ddb7e1785b81cd -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-numbers.ttl -file - - - - -2008-02-29T14:57:18.405079Z -453157789b8aa393141b8058f60bdf41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-1.rq -file - - - - -2008-02-29T14:57:18.405079Z -4d16688072f2e2a01503b5f5c456342c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-1.rdf -file - - - - -2008-02-29T14:57:18.405079Z -26a8e52906fd6c662e5f86bafa771ad7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-3.rq -file - - - - -2008-02-29T14:57:18.420699Z -7c2dbd6f653aa46d71784056a1056393 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-2.rdf -file - - - - -2008-02-29T14:57:18.420699Z -eb348c35dc3ac2a53ba88a6e79d77f68 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-3.rdf -file - - - - -2008-02-29T14:57:18.436320Z -888b6dd4180615254ab0c8e33f042f3a -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-5.rq -file - - - - -2008-02-29T14:57:18.436320Z -7ee6cacf68ddd57711c86bf42155d260 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-4.rdf -file - - - - -2008-02-29T14:57:18.436320Z -5b86780457415366fa06e34236a12eca -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-numbers.ttl -file - - - - -2008-02-29T14:57:18.451940Z -c30858cc6e2f67913a0e9fa4a2996a4c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-5.rdf -file - - - - -2008-02-29T14:57:18.467561Z -f57bdccd6b1a3f7a26d996a0be65cfce -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-builtin.rq -file - - - - -2008-02-29T14:57:18.451940Z -14617498043534a5b2a770ebf599454c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-6.rdf -file - - - - -2008-02-29T14:57:18.467561Z -ef2835aac2e1ebee18d3c1cb40acfad0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-7.rdf -file - - - - -2008-02-29T14:57:18.483182Z -4792661b2a7ad6685fd92d0279e95d73 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-9.rq -file - - - - -2008-02-29T14:57:18.483182Z -4d16688072f2e2a01503b5f5c456342c -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-8.rdf -file - - - - -2008-02-29T14:57:18.498802Z -c8d75f1c0a7e1e8645f35592d2b6d708 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-9.rdf -file - - - - -2008-02-29T14:57:18.498802Z -2c21dec0e8ed58fa12dcf173c6cc62ec -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-numbers.rq -file - - - - -2008-02-29T14:57:18.514423Z -61276b11d4e4939039b33cb979bee491 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-11.ttl -file - - - - -2008-02-29T14:57:18.498802Z -6e27d5f354c3fa1314263926ae2eddde -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-function.ttl -file - - - - -2008-02-29T14:57:18.514423Z -3d6153c942180f9d06152f8ede1c8225 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-10.rq -file - - - - -2008-02-29T14:57:18.530043Z -ce77eeecfd1c0580468095070666d84e -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-1.ttl -file - - - - -2008-02-29T14:57:18.545664Z -b95c780e41d5dbeb2775b62a1ed0f428 -2007-09-20T07:35:41.061956Z -540 -cweiske - -.manifest.ttl.swp -file - - - - -2008-02-29T14:57:18.530043Z -f8023ed9d074ca188cc03dedfb420f13 -2007-09-20T07:35:41.061956Z -540 -cweiske -has-props - -data-sort-3.ttl -file - - - - -2008-02-29T14:57:18.545664Z -173ec29284872bb753b396e632816ab3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-4.ttl -file - - - - -2008-02-29T14:57:18.545664Z -865fd82a58b4a754b8b1c3259c002a1f -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-6.ttl -file - - - - -2008-02-29T14:57:18.561285Z -5acb88f9b76169b92fb2a8634cd462e8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-7.ttl -file - - - - -2008-02-29T14:57:18.561285Z -26a50d7ca3f465ff3093501750dcfaa4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-builtin.ttl -file - - - - -2008-02-29T14:57:18.561285Z -275f6bd1d16f2df84aa930b93adadadf -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-8.ttl -file - - - - -2008-02-29T14:57:18.576905Z -13428fdb78d6b55346140ff208f61735 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-sort-9.ttl -file - - - - -2008-02-29T14:57:18.576905Z -e5454ece2b91c257c3213a89eea8f5ad -2007-09-20T07:35:41.061956Z -540 -cweiske - -extended-manifest.ttl -file - - - - -2008-02-29T14:57:18.592526Z -b8f4a016370ed7d1e34edd4f9cac0507 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-sort-builtin.ttl -file - - - - -2008-02-29T14:57:18.592526Z -4349348d4a2a47464decedcbaf6bac56 -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-2.rq -file - - - - -2008-02-29T14:57:18.608146Z -ce77eeecfd1c0580468095070666d84e -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-4.rq -file - - - - -2008-02-29T14:57:18.608146Z -f4b9b395d3d34bc35747e6f7dd78b3bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -query-sort-6.rq -file - - - - -2008-02-29T14:57:18.608146Z -7406f770e13cb02031677d7af9ac0391 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/prop-base/.manifest.ttl.swp.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/prop-base/.manifest.ttl.swp.svn-base deleted file mode 100755 index 5e9587e6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/prop-base/.manifest.ttl.swp.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/.manifest.ttl.swp.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/.manifest.ttl.swp.svn-base deleted file mode 100755 index 9a14952b..00000000 Binary files a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/.manifest.ttl.swp.svn-base and /dev/null differ diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-1.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-1.ttl.svn-base deleted file mode 100755 index 3ecf1786..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-1.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-11.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-11.ttl.svn-base deleted file mode 100755 index 76f1900f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-11.ttl.svn-base +++ /dev/null @@ -1,15 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: data-sort-11.ttl,v 1.1 2007/06/25 11:10:32 jbroekst Exp $ - -@prefix rdf: . -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:f foaf:name "Eve"^^xsd:string . -_:g foaf:name "Alice"^^xsd:string . -_:h foaf:name "Fred"^^xsd:string . -_:j foaf:name "Bob"^^xsd:string . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-3.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-3.ttl.svn-base deleted file mode 100755 index 8cc6a092..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-3.ttl.svn-base +++ /dev/null @@ -1,17 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:mbox . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox . - -_:c rdf:type foaf:Person ; - foaf:mbox ; - foaf:name "Fred" . - -_:e foaf:name "Bob" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-4.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-4.ttl.svn-base deleted file mode 100755 index b5529b8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-4.ttl.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer . - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-6.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-6.ttl.svn-base deleted file mode 100755 index 5900c01c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-6.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:address . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:address "Fascination Street 11" . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:address "fred@work.example" . - -_:e foaf:name "Bob" ; - ex:address . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-7.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-7.ttl.svn-base deleted file mode 100755 index d36dbc05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-7.ttl.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23.0"^^xsd:float . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-8.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-8.ttl.svn-base deleted file mode 100755 index f68f0bd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-8.ttl.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:f foaf:name "John" ; - ex:empId [ ex:number "29"^^xsd:integer ] . - -_:g foaf:name "Dirk" ; - ex:empId . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-9.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-9.ttl.svn-base deleted file mode 100755 index 044f997b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-9.ttl.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Eve"^^xsd:string . -_:b foaf:name "Alice"^^xsd:string . -_:c foaf:name "Fred"^^xsd:string . -_:e foaf:name "Bob"^^xsd:string . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-builtin.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-builtin.ttl.svn-base deleted file mode 100755 index 23712e95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-builtin.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:s1 :p "2"^^xsd:integer . -:s2 :p "300"^^xsd:integer . -:s3 :p "10"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-function.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-function.ttl.svn-base deleted file mode 100755 index efeeb566..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-function.ttl.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . - -:s1 :p "2" . -:s2 :p "300" . -:s3 :p "10" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-numbers.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-numbers.ttl.svn-base deleted file mode 100755 index 0f0f2a4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/data-sort-numbers.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:s1 :p "1"^^xsd:integer; :q "2"^^xsd:integer . -:s2 :p "10"^^xsd:integer; :q "20"^^xsd:integer . -:s3 :p "100"^^xsd:integer; :q "200"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/extended-manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/extended-manifest.ttl.svn-base deleted file mode 100755 index e443cdb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/extended-manifest.ttl.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( <#dawg-sort-11> - ). - -<#dawg-sort-11> a mf:QueryEvaluationTest; - mf:name "sort-11" ; - rdfs:comment "test relative order of plain literals and xsd:strings" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index ce86780e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,114 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( <#dawg-sort-1> <#dawg-sort-2> <#dawg-sort-3> <#dawg-sort-4> - <#dawg-sort-5> <#dawg-sort-6> <#dawg-sort-7> <#dawg-sort-8> - <#dawg-sort-9> <#dawg-sort-10> - ). - -<#dawg-sort-1> a mf:QueryEvaluationTest; - mf:name "sort-1" ; - rdfs:comment "Alphabetic sort (ascending) on untyped literals" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -<#dawg-sort-2> a mf:QueryEvaluationTest; - mf:name "sort-2" ; - rdfs:comment "Alphabetic sort (descending) on untyped literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-3> a mf:QueryEvaluationTest; - mf:name "sort-3" ; - rdfs:comment "Sort on (possibly unbound) URIs" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-4> a mf:QueryEvaluationTest; - mf:name "sort-4" ; - rdfs:comment "Sort on datatyped (integer) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-5> a mf:QueryEvaluationTest; - mf:name "sort-5" ; - rdfs:comment "Sort first on untyped literals (ascending), then on datatyped (integer) literals (descending" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-6> a mf:QueryEvaluationTest; - mf:name "sort-6" ; - rdfs:comment "Sort on mixed result of uris and literals." ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-7> a mf:QueryEvaluationTest; - mf:name "sort-7" ; - rdfs:comment "Sort on comparable mixed typed literals (integer and float)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-8> a mf:QueryEvaluationTest; - mf:name "sort-8" ; - rdfs:comment "Sort on several mixed values (bnode, uri, literal)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-9> a mf:QueryEvaluationTest; - mf:name "sort-9" ; - rdfs:comment "Alphabetic sort (ascending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-10> a mf:QueryEvaluationTest; - mf:name "sort-10" ; - rdfs:comment "Alphabetic sort (descending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index aff08ec7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,148 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( :dawg-sort-1 :dawg-sort-2 :dawg-sort-3 :dawg-sort-4 - :dawg-sort-5 :dawg-sort-6 :dawg-sort-7 :dawg-sort-8 - :dawg-sort-9 :dawg-sort-10 - :dawg-sort-numbers - :dawg-sort-builtin - :dawg-sort-function - ). - -:dawg-sort-1 a mf:QueryEvaluationTest; - mf:name "sort-1" ; - rdfs:comment "Alphabetic sort (ascending) on untyped literals" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-2 a mf:QueryEvaluationTest; - mf:name "sort-2" ; - rdfs:comment "Alphabetic sort (descending) on untyped literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-3 a mf:QueryEvaluationTest; - mf:name "sort-3" ; - rdfs:comment "Sort on (possibly unbound) URIs" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-4 a mf:QueryEvaluationTest; - mf:name "sort-4" ; - rdfs:comment "Sort on datatyped (integer) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-5 a mf:QueryEvaluationTest; - mf:name "sort-5" ; - rdfs:comment "Sort first on untyped literals (ascending), then on datatyped (integer) literals (descending" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-6 a mf:QueryEvaluationTest; - mf:name "sort-6" ; - rdfs:comment "Sort on mixed result of uris and literals." ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-7 a mf:QueryEvaluationTest; - mf:name "sort-7" ; - rdfs:comment "Sort on comparable mixed typed literals (integer and float)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-8 a mf:QueryEvaluationTest; - mf:name "sort-8" ; - rdfs:comment "Sort on several mixed values (bnode, uri, literal)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-9 a mf:QueryEvaluationTest; - mf:name "sort-9" ; - rdfs:comment "Alphabetic sort (ascending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-10 a mf:QueryEvaluationTest; - mf:name "sort-10" ; - rdfs:comment "Alphabetic sort (descending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-numbers a mf:QueryEvaluationTest; - mf:name "Expression sort" ; - rdfs:comment "Sort by a bracketted expression" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-builtin a mf:QueryEvaluationTest; - mf:name "Builtin sort" ; - rdfs:comment "Sort by a builtin operator" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-function a mf:QueryEvaluationTest; - mf:name "Function sort" ; - rdfs:comment "Sort by function invocation" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-1.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-1.rq.svn-base deleted file mode 100755 index 28a46543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-1.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-10.rq.svn-base deleted file mode 100755 index 096f9399..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-10.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-2.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-2.rq.svn-base deleted file mode 100755 index 096f9399..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-2.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-3.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-3.rq.svn-base deleted file mode 100755 index 6c6a45da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-3.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE { ?x foaf:name ?name . - OPTIONAL { ?x foaf:mbox ?mbox } - } -ORDER BY ASC(?mbox) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-4.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-4.rq.svn-base deleted file mode 100755 index 3f8b3ee6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-4.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-5.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-5.rq.svn-base deleted file mode 100755 index 71bfb00b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-5.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ?name DESC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-6.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-6.rq.svn-base deleted file mode 100755 index 085b9d7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-6.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX ex: - -SELECT ?address -WHERE { ?x ex:address ?address } -ORDER BY ASC(?address) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-9.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-9.rq.svn-base deleted file mode 100755 index 28a46543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-9.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-builtin.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-builtin.rq.svn-base deleted file mode 100755 index 2f193579..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-builtin.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . -} ORDER BY str(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-function.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-function.rq.svn-base deleted file mode 100755 index 46735b6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-function.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?o . -} ORDER BY xsd:integer(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-numbers.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-numbers.rq.svn-base deleted file mode 100755 index 36546f25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/query-sort-numbers.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o1 ; :q ?o2 . -} ORDER BY (?o1 + ?o2) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-1.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-1.rdf.svn-base deleted file mode 100755 index b127d321..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-1.rdf.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Alice - - - - 2 - - name - Bob - - - - 3 - - name - Eve - - - - 4 - - name - Fred - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-10.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-10.rdf.svn-base deleted file mode 100755 index 4d5eb721..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-10.rdf.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Fred - - - - 2 - - name - Eve - - - - 3 - - name - Bob - - - - 4 - - name - Alice - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-11.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-11.ttl.svn-base deleted file mode 100755 index ebab77fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-11.ttl.svn-base +++ /dev/null @@ -1,49 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-11.ttl,v 1.1 2007/06/25 11:10:40 jbroekst Exp $ - -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "name" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "Fred" ; - rs:variable "name" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "Alice"^^ ; - rs:variable "name" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "Bob"^^ ; - rs:variable "name" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "Eve"^^ ; - rs:variable "name" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "Fred"^^ ; - rs:variable "name" - ] ; - rs:index 8 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-2.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-2.rdf.svn-base deleted file mode 100755 index 6319919f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-2.rdf.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Fred - - - - 2 - - name - Eve - - - - 3 - - name - Bob - - - - 4 - - name - Alice - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-3.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-3.rdf.svn-base deleted file mode 100755 index 4b8ce394..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-3.rdf.svn-base +++ /dev/null @@ -1,56 +0,0 @@ - - - - - name - mbox - - - 1 - - name - Bob - - - - - - 2 - - name - Alice - - - mbox - - - - - - 3 - - name - Eve - - - mbox - - - - - - 4 - - name - Fred - - - mbox - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-4.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-4.rdf.svn-base deleted file mode 100755 index 088cdcf3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-4.rdf.svn-base +++ /dev/null @@ -1,71 +0,0 @@ - - - - - name - emp - - - 1 - - name - Eve - - - emp - 9 - - - - - 2 - - name - Bob - - - emp - 23 - - - - - 3 - - name - Fred - - - emp - 27 - - - - - 4 - - name - Alice - - - emp - 29 - - - - - 5 - - name - Bob - - - emp - 30 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-5.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-5.rdf.svn-base deleted file mode 100755 index 4206cb56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-5.rdf.svn-base +++ /dev/null @@ -1,72 +0,0 @@ - - - - - name - emp - - - 1 - - name - Alice - - - emp - 29 - - - - - 2 - - name - Bob - - - emp - 30 - - - - - 3 - - name - Bob - - - emp - 23 - - - - - 4 - - name - Eve - - - emp - 9 - - - - - 5 - - name - Fred - - - emp - 27 - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-6.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-6.rdf.svn-base deleted file mode 100755 index 4acdc81a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-6.rdf.svn-base +++ /dev/null @@ -1,42 +0,0 @@ - - - - - address - - - 1 - - address - - - - - - 2 - - address - - - - - - 3 - - address - Fascination Street 11 - - - - - 4 - - address - fred@work.example - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-7.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-7.rdf.svn-base deleted file mode 100755 index f5b975aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-7.rdf.svn-base +++ /dev/null @@ -1,59 +0,0 @@ - - - - - name - emp - - - 1 - - name - Eve - - - emp - 9 - - - - - 2 - - name - Bob - - - emp - 23.0 - - - - - 3 - - name - Fred - - - emp - 27 - - - - - 4 - - name - Alice - - - emp - 29 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-8.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-8.rdf.svn-base deleted file mode 100755 index c3da0404..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-8.rdf.svn-base +++ /dev/null @@ -1,48 +0,0 @@ - - - - - name - emp - - - 1 - - name - John - - - emp - - - - - - 2 - - name - Dirk - - - emp - - - - - - 3 - - name - Eve - - - emp - 9 - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-9.rdf.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-9.rdf.svn-base deleted file mode 100755 index 14affa57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-9.rdf.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Alice - - - - 2 - - name - Bob - - - - 3 - - name - Eve - - - - 4 - - name - Fred - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-builtin.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-builtin.ttl.svn-base deleted file mode 100755 index 1c4b73b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-builtin.ttl.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-builtin.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-function.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-function.ttl.svn-base deleted file mode 100755 index da60f08d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-function.ttl.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-function.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 2 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-numbers.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-numbers.ttl.svn-base deleted file mode 100755 index 3cb29899..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/.svn/text-base/result-sort-numbers.ttl.svn-base +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-numbers.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 3 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-1.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-1.ttl deleted file mode 100755 index 3ecf1786..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-1.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-11.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-11.ttl deleted file mode 100755 index 76f1900f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-11.ttl +++ /dev/null @@ -1,15 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: data-sort-11.ttl,v 1.1 2007/06/25 11:10:32 jbroekst Exp $ - -@prefix rdf: . -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Eve". -_:b foaf:name "Alice" . -_:f foaf:name "Eve"^^xsd:string . -_:g foaf:name "Alice"^^xsd:string . -_:h foaf:name "Fred"^^xsd:string . -_:j foaf:name "Bob"^^xsd:string . -_:c foaf:name "Fred" . -_:e foaf:name "Bob" . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-3.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-3.ttl deleted file mode 100755 index 8cc6a092..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-3.ttl +++ /dev/null @@ -1,17 +0,0 @@ -@prefix rdf: . -@prefix foaf: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:mbox . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox . - -_:c rdf:type foaf:Person ; - foaf:mbox ; - foaf:name "Fred" . - -_:e foaf:name "Bob" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-4.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-4.ttl deleted file mode 100755 index b5529b8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-4.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23"^^xsd:integer . - -_:f foaf:name "Bob" ; - ex:empId "30"^^xsd:integer . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-6.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-6.ttl deleted file mode 100755 index 5900c01c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-6.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:address . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:address "Fascination Street 11" . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:address "fred@work.example" . - -_:e foaf:name "Bob" ; - ex:address . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-7.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-7.ttl deleted file mode 100755 index d36dbc05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-7.ttl +++ /dev/null @@ -1,19 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a rdf:type foaf:Person ; - foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:b rdf:type foaf:Person ; - foaf:name "Alice" ; - ex:empId "29"^^xsd:integer . - -_:c rdf:type foaf:Person ; - foaf:name "Fred" ; - ex:empId "27"^^xsd:integer . - -_:e foaf:name "Bob" ; - ex:empId "23.0"^^xsd:float . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-8.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-8.ttl deleted file mode 100755 index f68f0bd0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-8.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix ex: . -@prefix xsd: . - -_:a foaf:name "Eve" ; - ex:empId "9"^^xsd:integer . - -_:f foaf:name "John" ; - ex:empId [ ex:number "29"^^xsd:integer ] . - -_:g foaf:name "Dirk" ; - ex:empId . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-9.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-9.ttl deleted file mode 100755 index 044f997b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-9.ttl +++ /dev/null @@ -1,10 +0,0 @@ -@prefix rdf: . -@prefix foaf: . -@prefix xsd: . - -_:a foaf:name "Eve"^^xsd:string . -_:b foaf:name "Alice"^^xsd:string . -_:c foaf:name "Fred"^^xsd:string . -_:e foaf:name "Bob"^^xsd:string . - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-builtin.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-builtin.ttl deleted file mode 100755 index 23712e95..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-builtin.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:s1 :p "2"^^xsd:integer . -:s2 :p "300"^^xsd:integer . -:s3 :p "10"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-function.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-function.ttl deleted file mode 100755 index efeeb566..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-function.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . - -:s1 :p "2" . -:s2 :p "300" . -:s3 :p "10" . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-numbers.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-numbers.ttl deleted file mode 100755 index 0f0f2a4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-numbers.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix xsd: . - -:s1 :p "1"^^xsd:integer; :q "2"^^xsd:integer . -:s2 :p "10"^^xsd:integer; :q "20"^^xsd:integer . -:s3 :p "100"^^xsd:integer; :q "200"^^xsd:integer . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/extended-manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/extended-manifest.ttl deleted file mode 100755 index e443cdb2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/extended-manifest.ttl +++ /dev/null @@ -1,19 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( <#dawg-sort-11> - ). - -<#dawg-sort-11> a mf:QueryEvaluationTest; - mf:name "sort-11" ; - rdfs:comment "test relative order of plain literals and xsd:strings" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl deleted file mode 100755 index aff08ec7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl +++ /dev/null @@ -1,148 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( :dawg-sort-1 :dawg-sort-2 :dawg-sort-3 :dawg-sort-4 - :dawg-sort-5 :dawg-sort-6 :dawg-sort-7 :dawg-sort-8 - :dawg-sort-9 :dawg-sort-10 - :dawg-sort-numbers - :dawg-sort-builtin - :dawg-sort-function - ). - -:dawg-sort-1 a mf:QueryEvaluationTest; - mf:name "sort-1" ; - rdfs:comment "Alphabetic sort (ascending) on untyped literals" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-2 a mf:QueryEvaluationTest; - mf:name "sort-2" ; - rdfs:comment "Alphabetic sort (descending) on untyped literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-3 a mf:QueryEvaluationTest; - mf:name "sort-3" ; - rdfs:comment "Sort on (possibly unbound) URIs" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-4 a mf:QueryEvaluationTest; - mf:name "sort-4" ; - rdfs:comment "Sort on datatyped (integer) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-5 a mf:QueryEvaluationTest; - mf:name "sort-5" ; - rdfs:comment "Sort first on untyped literals (ascending), then on datatyped (integer) literals (descending" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-6 a mf:QueryEvaluationTest; - mf:name "sort-6" ; - rdfs:comment "Sort on mixed result of uris and literals." ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-7 a mf:QueryEvaluationTest; - mf:name "sort-7" ; - rdfs:comment "Sort on comparable mixed typed literals (integer and float)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-8 a mf:QueryEvaluationTest; - mf:name "sort-8" ; - rdfs:comment "Sort on several mixed values (bnode, uri, literal)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-9 a mf:QueryEvaluationTest; - mf:name "sort-9" ; - rdfs:comment "Alphabetic sort (ascending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-10 a mf:QueryEvaluationTest; - mf:name "sort-10" ; - rdfs:comment "Alphabetic sort (descending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -:dawg-sort-numbers a mf:QueryEvaluationTest; - mf:name "Expression sort" ; - rdfs:comment "Sort by a bracketted expression" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-builtin a mf:QueryEvaluationTest; - mf:name "Builtin sort" ; - rdfs:comment "Sort by a builtin operator" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -:dawg-sort-function a mf:QueryEvaluationTest; - mf:name "Function sort" ; - rdfs:comment "Sort by function invocation" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl.bak deleted file mode 100755 index ce86780e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl.bak +++ /dev/null @@ -1,114 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Sorting test cases." ; - mf:entries - ( <#dawg-sort-1> <#dawg-sort-2> <#dawg-sort-3> <#dawg-sort-4> - <#dawg-sort-5> <#dawg-sort-6> <#dawg-sort-7> <#dawg-sort-8> - <#dawg-sort-9> <#dawg-sort-10> - ). - -<#dawg-sort-1> a mf:QueryEvaluationTest; - mf:name "sort-1" ; - rdfs:comment "Alphabetic sort (ascending) on untyped literals" ; - mf:action - [ qt:query ; - qt:data ] ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:result . - -<#dawg-sort-2> a mf:QueryEvaluationTest; - mf:name "sort-2" ; - rdfs:comment "Alphabetic sort (descending) on untyped literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-3> a mf:QueryEvaluationTest; - mf:name "sort-3" ; - rdfs:comment "Sort on (possibly unbound) URIs" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-4> a mf:QueryEvaluationTest; - mf:name "sort-4" ; - rdfs:comment "Sort on datatyped (integer) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-5> a mf:QueryEvaluationTest; - mf:name "sort-5" ; - rdfs:comment "Sort first on untyped literals (ascending), then on datatyped (integer) literals (descending" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-6> a mf:QueryEvaluationTest; - mf:name "sort-6" ; - rdfs:comment "Sort on mixed result of uris and literals." ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-7> a mf:QueryEvaluationTest; - mf:name "sort-7" ; - rdfs:comment "Sort on comparable mixed typed literals (integer and float)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-8> a mf:QueryEvaluationTest; - mf:name "sort-8" ; - rdfs:comment "Sort on several mixed values (bnode, uri, literal)" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-9> a mf:QueryEvaluationTest; - mf:name "sort-9" ; - rdfs:comment "Alphabetic sort (ascending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - -<#dawg-sort-10> a mf:QueryEvaluationTest; - mf:name "sort-10" ; - rdfs:comment "Alphabetic sort (descending) on datatyped (string) literals" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-1.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-1.rq deleted file mode 100755 index 28a46543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-1.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-10.rq deleted file mode 100755 index 096f9399..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-10.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-2.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-2.rq deleted file mode 100755 index 096f9399..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-2.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY DESC(?name) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-3.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-3.rq deleted file mode 100755 index 6c6a45da..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-3.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX foaf: -SELECT ?name ?mbox -WHERE { ?x foaf:name ?name . - OPTIONAL { ?x foaf:mbox ?mbox } - } -ORDER BY ASC(?mbox) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-4.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-4.rq deleted file mode 100755 index 3f8b3ee6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-4.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ASC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-5.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-5.rq deleted file mode 100755 index 71bfb00b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-5.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -PREFIX ex: - -SELECT ?name ?emp -WHERE { ?x foaf:name ?name ; - ex:empId ?emp - } -ORDER BY ?name DESC(?emp) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-6.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-6.rq deleted file mode 100755 index 085b9d7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-6.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX ex: - -SELECT ?address -WHERE { ?x ex:address ?address } -ORDER BY ASC(?address) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-9.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-9.rq deleted file mode 100755 index 28a46543..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-9.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX foaf: -SELECT ?name -WHERE { ?x foaf:name ?name } -ORDER BY ?name diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-builtin.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-builtin.rq deleted file mode 100755 index 2f193579..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-builtin.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o . -} ORDER BY str(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-function.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-function.rq deleted file mode 100755 index 46735b6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-function.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT ?s WHERE { - ?s :p ?o . -} ORDER BY xsd:integer(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-numbers.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-numbers.rq deleted file mode 100755 index 36546f25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-numbers.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?s WHERE { - ?s :p ?o1 ; :q ?o2 . -} ORDER BY (?o1 + ?o2) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-1.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-1.rdf deleted file mode 100755 index b127d321..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-1.rdf +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Alice - - - - 2 - - name - Bob - - - - 3 - - name - Eve - - - - 4 - - name - Fred - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-10.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-10.rdf deleted file mode 100755 index 4d5eb721..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-10.rdf +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Fred - - - - 2 - - name - Eve - - - - 3 - - name - Bob - - - - 4 - - name - Alice - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-11.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-11.ttl deleted file mode 100755 index ebab77fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-11.ttl +++ /dev/null @@ -1,49 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-11.ttl,v 1.1 2007/06/25 11:10:40 jbroekst Exp $ - -@prefix rdf: . -@prefix rs: . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "name" ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value "Fred" ; - rs:variable "name" - ] ; - rs:index 4 - ] ; - rs:solution [ rs:binding [ rs:value "Alice"^^ ; - rs:variable "name" - ] ; - rs:index 5 - ] ; - rs:solution [ rs:binding [ rs:value "Bob"^^ ; - rs:variable "name" - ] ; - rs:index 6 - ] ; - rs:solution [ rs:binding [ rs:value "Eve"^^ ; - rs:variable "name" - ] ; - rs:index 7 - ] ; - rs:solution [ rs:binding [ rs:value "Fred"^^ ; - rs:variable "name" - ] ; - rs:index 8 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-2.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-2.rdf deleted file mode 100755 index 6319919f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-2.rdf +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Fred - - - - 2 - - name - Eve - - - - 3 - - name - Bob - - - - 4 - - name - Alice - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-3.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-3.rdf deleted file mode 100755 index 4b8ce394..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-3.rdf +++ /dev/null @@ -1,56 +0,0 @@ - - - - - name - mbox - - - 1 - - name - Bob - - - - - - 2 - - name - Alice - - - mbox - - - - - - 3 - - name - Eve - - - mbox - - - - - - 4 - - name - Fred - - - mbox - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-4.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-4.rdf deleted file mode 100755 index 088cdcf3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-4.rdf +++ /dev/null @@ -1,71 +0,0 @@ - - - - - name - emp - - - 1 - - name - Eve - - - emp - 9 - - - - - 2 - - name - Bob - - - emp - 23 - - - - - 3 - - name - Fred - - - emp - 27 - - - - - 4 - - name - Alice - - - emp - 29 - - - - - 5 - - name - Bob - - - emp - 30 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-5.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-5.rdf deleted file mode 100755 index 4206cb56..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-5.rdf +++ /dev/null @@ -1,72 +0,0 @@ - - - - - name - emp - - - 1 - - name - Alice - - - emp - 29 - - - - - 2 - - name - Bob - - - emp - 30 - - - - - 3 - - name - Bob - - - emp - 23 - - - - - 4 - - name - Eve - - - emp - 9 - - - - - 5 - - name - Fred - - - emp - 27 - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-6.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-6.rdf deleted file mode 100755 index 4acdc81a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-6.rdf +++ /dev/null @@ -1,42 +0,0 @@ - - - - - address - - - 1 - - address - - - - - - 2 - - address - - - - - - 3 - - address - Fascination Street 11 - - - - - 4 - - address - fred@work.example - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-7.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-7.rdf deleted file mode 100755 index f5b975aa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-7.rdf +++ /dev/null @@ -1,59 +0,0 @@ - - - - - name - emp - - - 1 - - name - Eve - - - emp - 9 - - - - - 2 - - name - Bob - - - emp - 23.0 - - - - - 3 - - name - Fred - - - emp - 27 - - - - - 4 - - name - Alice - - - emp - 29 - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-8.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-8.rdf deleted file mode 100755 index c3da0404..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-8.rdf +++ /dev/null @@ -1,48 +0,0 @@ - - - - - name - emp - - - 1 - - name - John - - - emp - - - - - - 2 - - name - Dirk - - - emp - - - - - - 3 - - name - Eve - - - emp - 9 - - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-9.rdf b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-9.rdf deleted file mode 100755 index 14affa57..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-9.rdf +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - - 1 - - name - Alice - - - - 2 - - name - Bob - - - - 3 - - name - Eve - - - - 4 - - name - Fred - - - - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-builtin.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-builtin.ttl deleted file mode 100755 index 1c4b73b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-builtin.ttl +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-builtin.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 1 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-function.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-function.ttl deleted file mode 100755 index da60f08d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-function.ttl +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-function.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 3 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 2 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-numbers.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-numbers.ttl deleted file mode 100755 index 3cb29899..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-numbers.ttl +++ /dev/null @@ -1,25 +0,0 @@ -# sort-11 -- test relative order of plain literals and xsd:strings -# $Id: result-sort-numbers.ttl,v 1.1 2007/08/17 23:40:16 lfeigenb Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix : . - -[] rdf:type rs:ResultSet ; - rs:resultVariable - "s" ; - rs:solution [ rs:binding [ rs:value :s1 ; - rs:variable "s" - ] ; - rs:index 1 - ] ; - rs:solution [ rs:binding [ rs:value :s2 ; - rs:variable "s" - ] ; - rs:index 2 - ] ; - rs:solution [ rs:binding [ rs:value :s3 ; - rs:variable "s" - ] ; - rs:index 3 - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/all-wcprops deleted file mode 100755 index 7ea28dfd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/all-wcprops +++ /dev/null @@ -1,503 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1 -END -syntax-struct-09.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq -END -syntax-lit-05.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq -END -syntax-lit-15.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq -END -syntax-lit-09.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq -END -syntax-lists-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq -END -syntax-lit-19.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq -END -syntax-qname-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq -END -syntax-limit-offset-01.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq -END -syntax-qname-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq -END -syntax-bnodes-01.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq -END -syntax-order-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq -END -syntax-bnodes-05.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq -END -syntax-expr-02.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl.bak -END -syntax-basic-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq -END -syntax-order-07.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq -END -syntax-struct-10.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq -END -syntax-basic-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq -END -syntax-pat-04.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq -END -syntax-lit-10.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq -END -syntax-struct-14.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq -END -syntax-union-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq -END -syntax-lit-20.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq -END -syntax-lit-04.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq -END -syntax-struct-08.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq -END -syntax-lit-14.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq -END -syntax-lit-08.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq -END -syntax-lit-18.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq -END -syntax-lists-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq -END -syntax-qname-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq -END -syntax-limit-offset-04.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq -END -syntax-qname-08.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq -END -syntax-order-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq -END -syntax-bnodes-04.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq -END -syntax-expr-01.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq -END -syntax-order-06.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq -END -syntax-expr-05.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq -END -syntax-basic-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq -END -syntax-struct-03.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq -END -syntax-pat-03.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq -END -syntax-struct-13.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq -END -syntax-struct-07.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq -END -syntax-lit-03.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq -END -syntax-lit-13.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq -END -syntax-lit-07.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq -END -syntax-lists-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq -END -syntax-lit-17.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq -END -syntax-qname-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq -END -syntax-limit-offset-03.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq -END -syntax-qname-07.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq -END -syntax-order-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq -END -syntax-bnodes-03.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq -END -syntax-order-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq -END -syntax-expr-04.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq -END -syntax-basic-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq -END -syntax-struct-02.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl -END -syntax-pat-02.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq -END -syntax-struct-12.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq -END -syntax-forms-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq -END -syntax-struct-06.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq -END -syntax-lit-02.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq -END -syntax-lit-12.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq -END -syntax-lit-06.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq -END -syntax-lit-16.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq -END -syntax-lists-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq -END -syntax-qname-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq -END -syntax-lists-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq -END -syntax-limit-offset-02.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq -END -syntax-qname-06.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq -END -syntax-bnodes-02.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq -END -syntax-order-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq -END -syntax-expr-03.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq -END -syntax-basic-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq -END -syntax-pat-01.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq -END -syntax-struct-01.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq -END -syntax-struct-11.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq -END -syntax-basic-06.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq -END -syntax-forms-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq -END -syntax-lit-01.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq -END -syntax-struct-05.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq -END -syntax-lit-11.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq -END -syntax-union-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/entries deleted file mode 100755 index d0105711..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/entries +++ /dev/null @@ -1,1024 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -syntax-struct-09.rq -file - - - - -2008-02-29T14:57:22.372711Z -371db68c2adcde5b7be1f3f6bc89d822 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-05.rq -file - - - - -2008-02-29T14:57:22.372711Z -1261ced6a6ff9909270acd20fbd54d31 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-15.rq -file - - - - -2008-02-29T14:57:22.372711Z -54c3f876eaeca77f85db68a2f835415f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-09.rq -file - - - - -2008-02-29T14:57:22.388332Z -782fe4c4df37e5037d16412d8065d376 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-04.rq -file - - - - -2008-02-29T14:57:22.403952Z -bc750eb498f728f469be99d59361e50d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-19.rq -file - - - - -2008-02-29T14:57:22.388332Z -7dbad83c41fd1320768ec0bb1c2ff7ab -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-01.rq -file - - - - -2008-02-29T14:57:22.388332Z -0bd8ab9201a50e3f0c4911bcdfc38343 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-limit-offset-01.rq -file - - - - -2008-02-29T14:57:22.403952Z -2f13a71a783f2aacbab6b6924ed8caa1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-05.rq -file - - - - -2008-02-29T14:57:22.419573Z -eeb8d4972bb2c1a111a983efcee70ce7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnodes-01.rq -file - - - - -2008-02-29T14:57:22.419573Z -446a32bb279a282366b141c5c4281137 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-03.rq -file - - - - -2008-02-29T14:57:22.419573Z -71daef2f09bcd116c0b391bcccdf33c5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnodes-05.rq -file - - - - -2008-02-29T14:57:22.435193Z -678727c9df7b633a034e330ede5f49cd -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-expr-02.rq -file - - - - -2008-02-29T14:57:22.435193Z -47d16269002765ac7597e4fc94131e57 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-01.rq -file - - - - -2008-02-29T14:57:22.450814Z -a8fc5d5f10c076007fccc3b5aa0cdf86 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-07.rq -file - - - - -2008-02-29T14:57:22.435193Z -47ef1038c01b7e1a0b0e3b963968e63d -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:22.450814Z -dd5aebf93fee255c13a7be7b277e6159 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-10.rq -file - - - - -2008-02-29T14:57:22.450814Z -f1321f60656514c07454779c17fcb2a1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-05.rq -file - - - - -2008-02-29T14:57:22.466435Z -0201511ee37feb99bf4d0a8a2d07b8d9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-pat-04.rq -file - - - - -2008-02-29T14:57:22.466435Z -9bed66117d9a5a1cf2b882c837b5db86 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-10.rq -file - - - - -2008-02-29T14:57:22.482055Z -6e10729722f608b3b863601a01b61422 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-14.rq -file - - - - -2008-02-29T14:57:22.482055Z -b6f19b7c200b8e25f2900c61f9e810f7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-union-01.rq -file - - - - -2008-02-29T14:57:22.482055Z -29a28203aee69096b1ef6058ebc315f2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-20.rq -file - - - - -2008-02-29T14:57:22.497676Z -55f08473af1630475a70ed7537ab7443 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-04.rq -file - - - - -2008-02-29T14:57:22.497676Z -af965518e9d373f39e0bfc8d29b98e72 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-08.rq -file - - - - -2008-02-29T14:57:22.497676Z -d349e9ee320e0b4fa8908d0f8017aea5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-14.rq -file - - - - -2008-02-29T14:57:22.513296Z -3b1c5e898c60f4e3e46e993e33dfc7c8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-08.rq -file - - - - -2008-02-29T14:57:22.513296Z -5a6b53cbf5803344633c51a247638f2a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-18.rq -file - - - - -2008-02-29T14:57:22.653882Z -279c51fbb21b62d34d765fca915550fd -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-03.rq -file - - - - -2008-02-29T14:57:22.669502Z -33848a18395a20c48988fc2c67334332 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-04.rq -file - - - - -2008-02-29T14:57:22.669502Z -a9f494d548c570c7921d0102ad32d3d4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-limit-offset-04.rq -file - - - - -2008-02-29T14:57:22.669502Z -83b7414cc3e9f57ede2b72d5705df875 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-08.rq -file - - - - -2008-02-29T14:57:22.685123Z -ed04292eba38cfccd5930930f966d588 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-02.rq -file - - - - -2008-02-29T14:57:22.685123Z -72fc497999e2d243c505f1562783a29e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnodes-04.rq -file - - - - -2008-02-29T14:57:22.700744Z -aa91257792b228f36ab3fb0d63a33813 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-expr-01.rq -file - - - - -2008-02-29T14:57:22.700744Z -bcc661e41fefdc463749144a3d459b09 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-06.rq -file - - - - -2008-02-29T14:57:22.700744Z -7cd020c36d9b6f90e90670f7dee573e3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-expr-05.rq -file - - - - -2008-02-29T14:57:22.716364Z -1c195fca9fdc147483c1b57ca84e374d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-04.rq -file - - - - -2008-02-29T14:57:22.716364Z -179a16b2567e4967a947b68c13e6b449 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-03.rq -file - - - - -2008-02-29T14:57:22.731985Z -eb11402e93fbb65c72b64f5760dee6b0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-pat-03.rq -file - - - - -2008-02-29T14:57:22.731985Z -61ab848c477f4f53815c8ff4060debbb -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-13.rq -file - - - - -2008-02-29T14:57:22.731985Z -d730c513bdc6cf80adec6d185db4f6a6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-07.rq -file - - - - -2008-02-29T14:57:22.747605Z -9e04108f7f159382d94d192f72bcf521 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-03.rq -file - - - - -2008-02-29T14:57:22.747605Z -503eabb302a6239bf1304fb0aaf80dbb -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-13.rq -file - - - - -2008-02-29T14:57:22.747605Z -58ce66c9a816e5456e16d0a7dde68fb8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-07.rq -file - - - - -2008-02-29T14:57:22.763226Z -35a23cf9fe0b6dd2063402e1990b58ae -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-02.rq -file - - - - -2008-02-29T14:57:22.763226Z -3b050137b5ddbd96de4c13d281a0a805 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-17.rq -file - - - - -2008-02-29T14:57:22.763226Z -6010d1d020fe8cccdd84459c76b221e9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-03.rq -file - - - - -2008-02-29T14:57:22.778847Z -7ab3b6bc9495728e651176322d3b3f42 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-limit-offset-03.rq -file - - - - -2008-02-29T14:57:22.778847Z -75e2f2bdcdd1ad4a3165d88699d65012 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-07.rq -file - - - - -2008-02-29T14:57:22.778847Z -6634ee84b67807548af1370e5f5505db -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-01.rq -file - - - - -2008-02-29T14:57:22.794467Z -8495a5a3b1533cffaccd427f256a27de -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnodes-03.rq -file - - - - -2008-02-29T14:57:22.794467Z -776ea83cddc718aa018ce0e4b9345baa -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-05.rq -file - - - - -2008-02-29T14:57:22.794467Z -9ed1610c0ed33f242ee8b5ece76841f4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-expr-04.rq -file - - - - -2008-02-29T14:57:22.810088Z -e2728ca0612e038173cf40edcb320072 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-03.rq -file - - - - -2008-02-29T14:57:22.810088Z -25f67ebef904991659bebb48798f40e8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-02.rq -file - - - - -2008-02-29T14:57:22.825708Z -11826948671c7728eb33105108c18cf7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:22.825708Z -b788f2ecb910f1176f8f7c2525894187 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-pat-02.rq -file - - - - -2008-02-29T14:57:22.825708Z -46a0c2c576c0dbfe1d081396a1c8aab2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-12.rq -file - - - - -2008-02-29T14:57:22.841329Z -bbf976fc3e2451e3b8e5c61773896eec -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-forms-02.rq -file - - - - -2008-02-29T14:57:22.841329Z -39ef1611d9c1c97fed59946886bddd0e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-06.rq -file - - - - -2008-02-29T14:57:22.856950Z -60abe506d2f0a5431d9ca4da673fcf85 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-02.rq -file - - - - -2008-02-29T14:57:22.841329Z -4e22792fce6dc60a5993f5690f006bc3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-12.rq -file - - - - -2008-02-29T14:57:22.856950Z -6141f1360ab74248303d27b9d825f0e1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-06.rq -file - - - - -2008-02-29T14:57:22.872570Z -bea2631efe9649380f0031a6be597b1f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-16.rq -file - - - - -2008-02-29T14:57:22.872570Z -08b744f0849f37552a1d11742aa08aba -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-01.rq -file - - - - -2008-02-29T14:57:22.872570Z -483dcea6cafbcc25e9d58b4a7d9a6a8f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-02.rq -file - - - - -2008-02-29T14:57:22.888191Z -17c1510ff08dd583505f48707398b5b5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-05.rq -file - - - - -2008-02-29T14:57:22.888191Z -a17a3fbf72b97ef4c33756f678500006 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-limit-offset-02.rq -file - - - - -2008-02-29T14:57:22.888191Z -47a31b16f0de83dc196d86d988666609 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-qname-06.rq -file - - - - -2008-02-29T14:57:22.903811Z -cc00d475f3721f326543d3accc67685e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnodes-02.rq -file - - - - -2008-02-29T14:57:22.903811Z -33404168dffc4fbea539745107d6eb31 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-order-04.rq -file - - - - -2008-02-29T14:57:22.903811Z -cb7d22d3992712dc931b7da2e2d46ef5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-expr-03.rq -file - - - - -2008-02-29T14:57:22.919432Z -3438b22b41a2fb048236d47c14576bd8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-02.rq -file - - - - -2008-02-29T14:57:22.919432Z -23f34a8fa09a4482d6cf423d67667a47 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-pat-01.rq -file - - - - -2008-02-29T14:57:22.919432Z -2f8e4210c36c429a9bfb1de4a3296c4f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-01.rq -file - - - - -2008-02-29T14:57:22.935053Z -55a7c4d2ef2cd7568ca01958c91c4d82 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-11.rq -file - - - - -2008-02-29T14:57:22.935053Z -927778fbfb24c27849ef4d1e9b127b22 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-basic-06.rq -file - - - - -2008-02-29T14:57:22.935053Z -98d36c2992048291b3b26d762e30232f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-forms-01.rq -file - - - - -2008-02-29T14:57:22.950673Z -60522c44abe98e0d22bf3756c853b4fb -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-01.rq -file - - - - -2008-02-29T14:57:22.950673Z -3e884154be14562ccfe825991bbda7b6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-struct-05.rq -file - - - - -2008-02-29T14:57:22.950673Z -7fcdf4d6c313327d655e25b21eafb9e2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lit-11.rq -file - - - - -2008-02-29T14:57:22.966294Z -6dfbf8ed2009ce41e27cb3112da9b9be -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-union-02.rq -file - - - - -2008-02-29T14:57:22.966294Z -a933949075b7ddb01cc34374114f2690 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 58b358b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,523 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql1" ; - mf:entries - ( <#syntax-basic-01> <#syntax-basic-02> <#syntax-basic-03> - <#syntax-basic-04> <#syntax-basic-05> <#syntax-basic-06> - <#syntax-qname-01> <#syntax-qname-02> <#syntax-qname-03> - <#syntax-qname-04> <#syntax-qname-05> <#syntax-qname-06> - <#syntax-qname-07> <#syntax-qname-08> <#syntax-lit-01> - <#syntax-lit-02> <#syntax-lit-03> <#syntax-lit-04> <#syntax-lit-05> - <#syntax-lit-06> <#syntax-lit-07> <#syntax-lit-08> <#syntax-lit-09> - <#syntax-lit-10> <#syntax-lit-11> <#syntax-lit-12> <#syntax-lit-13> - <#syntax-lit-14> <#syntax-lit-15> <#syntax-lit-16> <#syntax-lit-17> - <#syntax-lit-18> <#syntax-lit-19> <#syntax-lit-20> <#syntax-struct-01> - <#syntax-struct-02> <#syntax-struct-03> <#syntax-struct-05> - <#syntax-struct-06> <#syntax-struct-07> <#syntax-struct-08> - <#syntax-struct-09> <#syntax-struct-10> <#syntax-struct-11> - <#syntax-struct-12> <#syntax-struct-13> <#syntax-struct-14> - <#syntax-lists-01> <#syntax-lists-02> <#syntax-lists-03> - <#syntax-lists-04> <#syntax-lists-05> <#syntax-bnodes-01> - <#syntax-bnodes-02> <#syntax-bnodes-03> <#syntax-bnodes-04> - <#syntax-bnodes-05> <#syntax-forms-01> <#syntax-forms-02> - <#syntax-union-01> <#syntax-union-02> <#syntax-expr-01> - <#syntax-expr-02> <#syntax-expr-03> <#syntax-expr-04> - <#syntax-expr-05> <#syntax-order-01> <#syntax-order-02> - <#syntax-order-03> <#syntax-order-04> <#syntax-order-05> - <#syntax-order-06> <#syntax-order-07> <#syntax-limit-offset-01> - <#syntax-limit-offset-02> <#syntax-limit-offset-03> - <#syntax-limit-offset-04> <#syntax-pat-01> <#syntax-pat-02> - <#syntax-pat-03> <#syntax-pat-04> - ). - -<#syntax-basic-01> mf:name "syntax-basic-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-02> mf:name "syntax-basic-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-03> mf:name "syntax-basic-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-04> mf:name "syntax-basic-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-05> mf:name "syntax-basic-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-06> mf:name "syntax-basic-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-01> mf:name "syntax-qname-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-02> mf:name "syntax-qname-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-03> mf:name "syntax-qname-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-04> mf:name "syntax-qname-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-05> mf:name "syntax-qname-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-06> mf:name "syntax-qname-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-07> mf:name "syntax-qname-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-08> mf:name "syntax-qname-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-01> mf:name "syntax-lit-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-02> mf:name "syntax-lit-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-03> mf:name "syntax-lit-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-04> mf:name "syntax-lit-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-05> mf:name "syntax-lit-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-06> mf:name "syntax-lit-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-07> mf:name "syntax-lit-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-08> mf:name "syntax-lit-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-09> mf:name "syntax-lit-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-10> mf:name "syntax-lit-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-11> mf:name "syntax-lit-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-12> mf:name "syntax-lit-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-13> mf:name "syntax-lit-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-14> mf:name "syntax-lit-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-15> mf:name "syntax-lit-15.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-16> mf:name "syntax-lit-16.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-17> mf:name "syntax-lit-17.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-18> mf:name "syntax-lit-18.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-19> mf:name "syntax-lit-19.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-20> mf:name "syntax-lit-20.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-01> mf:name "syntax-struct-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-02> mf:name "syntax-struct-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-03> mf:name "syntax-struct-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-05> mf:name "syntax-struct-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-06> mf:name "syntax-struct-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-07> mf:name "syntax-struct-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-08> mf:name "syntax-struct-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-09> mf:name "syntax-struct-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-10> mf:name "syntax-struct-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-11> mf:name "syntax-struct-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-12> mf:name "syntax-struct-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-13> mf:name "syntax-struct-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-14> mf:name "syntax-struct-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-01> mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-02> mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-03> mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-04> mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-05> mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-01> mf:name "syntax-bnodes-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-02> mf:name "syntax-bnodes-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-03> mf:name "syntax-bnodes-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-04> mf:name "syntax-bnodes-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-05> mf:name "syntax-bnodes-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-forms-01> mf:name "syntax-forms-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-forms-02> mf:name "syntax-forms-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-union-01> mf:name "syntax-union-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-union-02> mf:name "syntax-union-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-01> mf:name "syntax-expr-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-02> mf:name "syntax-expr-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-03> mf:name "syntax-expr-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-04> mf:name "syntax-expr-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-05> mf:name "syntax-expr-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-01> mf:name "syntax-order-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-02> mf:name "syntax-order-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-03> mf:name "syntax-order-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-04> mf:name "syntax-order-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-05> mf:name "syntax-order-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-06> mf:name "syntax-order-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-07> mf:name "syntax-order-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-01> mf:name "syntax-limit-offset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-02> mf:name "syntax-limit-offset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-03> mf:name "syntax-limit-offset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-04> mf:name "syntax-limit-offset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-01> mf:name "syntax-pat-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-02> mf:name "syntax-pat-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-03> mf:name "syntax-pat-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-04> mf:name "syntax-pat-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index b06bc537..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,524 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql1" ; - mf:entries - ( :syntax-basic-01 :syntax-basic-02 :syntax-basic-03 - :syntax-basic-04 :syntax-basic-05 :syntax-basic-06 - :syntax-qname-01 :syntax-qname-02 :syntax-qname-03 - :syntax-qname-04 :syntax-qname-05 :syntax-qname-06 - :syntax-qname-07 :syntax-qname-08 :syntax-lit-01 - :syntax-lit-02 :syntax-lit-03 :syntax-lit-04 :syntax-lit-05 - :syntax-lit-06 :syntax-lit-07 :syntax-lit-08 :syntax-lit-09 - :syntax-lit-10 :syntax-lit-11 :syntax-lit-12 :syntax-lit-13 - :syntax-lit-14 :syntax-lit-15 :syntax-lit-16 :syntax-lit-17 - :syntax-lit-18 :syntax-lit-19 :syntax-lit-20 :syntax-struct-01 - :syntax-struct-02 :syntax-struct-03 :syntax-struct-05 - :syntax-struct-06 :syntax-struct-07 :syntax-struct-08 - :syntax-struct-09 :syntax-struct-10 :syntax-struct-11 - :syntax-struct-12 :syntax-struct-13 :syntax-struct-14 - :syntax-lists-01 :syntax-lists-02 :syntax-lists-03 - :syntax-lists-04 :syntax-lists-05 :syntax-bnodes-01 - :syntax-bnodes-02 :syntax-bnodes-03 :syntax-bnodes-04 - :syntax-bnodes-05 :syntax-forms-01 :syntax-forms-02 - :syntax-union-01 :syntax-union-02 :syntax-expr-01 - :syntax-expr-02 :syntax-expr-03 :syntax-expr-04 - :syntax-expr-05 :syntax-order-01 :syntax-order-02 - :syntax-order-03 :syntax-order-04 :syntax-order-05 - :syntax-order-06 :syntax-order-07 :syntax-limit-offset-01 - :syntax-limit-offset-02 :syntax-limit-offset-03 - :syntax-limit-offset-04 :syntax-pat-01 :syntax-pat-02 - :syntax-pat-03 :syntax-pat-04 - ). - -:syntax-basic-01 mf:name "syntax-basic-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-02 mf:name "syntax-basic-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-03 mf:name "syntax-basic-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-04 mf:name "syntax-basic-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-05 mf:name "syntax-basic-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-06 mf:name "syntax-basic-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-01 mf:name "syntax-qname-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-02 mf:name "syntax-qname-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-03 mf:name "syntax-qname-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-04 mf:name "syntax-qname-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-05 mf:name "syntax-qname-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-06 mf:name "syntax-qname-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-07 mf:name "syntax-qname-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-08 mf:name "syntax-qname-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-01 mf:name "syntax-lit-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-02 mf:name "syntax-lit-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-03 mf:name "syntax-lit-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-04 mf:name "syntax-lit-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-05 mf:name "syntax-lit-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-06 mf:name "syntax-lit-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-07 mf:name "syntax-lit-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-08 mf:name "syntax-lit-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-09 mf:name "syntax-lit-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-10 mf:name "syntax-lit-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-11 mf:name "syntax-lit-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-12 mf:name "syntax-lit-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-13 mf:name "syntax-lit-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-14 mf:name "syntax-lit-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-15 mf:name "syntax-lit-15.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-16 mf:name "syntax-lit-16.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-17 mf:name "syntax-lit-17.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-18 mf:name "syntax-lit-18.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-19 mf:name "syntax-lit-19.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-20 mf:name "syntax-lit-20.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-01 mf:name "syntax-struct-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-02 mf:name "syntax-struct-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-03 mf:name "syntax-struct-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-05 mf:name "syntax-struct-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-06 mf:name "syntax-struct-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-07 mf:name "syntax-struct-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-08 mf:name "syntax-struct-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-09 mf:name "syntax-struct-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-10 mf:name "syntax-struct-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-11 mf:name "syntax-struct-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-12 mf:name "syntax-struct-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-13 mf:name "syntax-struct-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-14 mf:name "syntax-struct-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-01 mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-02 mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-03 mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-04 mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-05 mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-01 mf:name "syntax-bnodes-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-02 mf:name "syntax-bnodes-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-03 mf:name "syntax-bnodes-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-04 mf:name "syntax-bnodes-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-05 mf:name "syntax-bnodes-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-forms-01 mf:name "syntax-forms-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-forms-02 mf:name "syntax-forms-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-union-01 mf:name "syntax-union-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-union-02 mf:name "syntax-union-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-01 mf:name "syntax-expr-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-02 mf:name "syntax-expr-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-03 mf:name "syntax-expr-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-04 mf:name "syntax-expr-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-05 mf:name "syntax-expr-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-01 mf:name "syntax-order-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-02 mf:name "syntax-order-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-03 mf:name "syntax-order-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-04 mf:name "syntax-order-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-05 mf:name "syntax-order-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-06 mf:name "syntax-order-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-07 mf:name "syntax-order-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-01 mf:name "syntax-limit-offset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-02 mf:name "syntax-limit-offset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-03 mf:name "syntax-limit-offset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-04 mf:name "syntax-limit-offset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-01 mf:name "syntax-pat-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-02 mf:name "syntax-pat-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-03 mf:name "syntax-pat-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-04 mf:name "syntax-pat-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-01.rq.svn-base deleted file mode 100755 index 9bb639b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-02.rq.svn-base deleted file mode 100755 index 8ab5230b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-03.rq.svn-base deleted file mode 100755 index b096d7bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# No trailing dot -PREFIX : -SELECT * -WHERE { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-04.rq.svn-base deleted file mode 100755 index f3001bc4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# With trailing dot -SELECT * -WHERE { ?x ?y ?z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-05.rq.svn-base deleted file mode 100755 index 8a8f4dd4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Two triples : no trailing dot -SELECT * -WHERE { ?x ?y ?z . ?a ?b ?c } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-06.rq.svn-base deleted file mode 100755 index d0fb4026..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-basic-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Two triples : with trailing dot -SELECT * -WHERE { ?x ?y ?z . ?a ?b ?c . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-01.rq.svn-base deleted file mode 100755 index 1431943d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [:p :q ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-02.rq.svn-base deleted file mode 100755 index 053e5d35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [] :p :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-03.rq.svn-base deleted file mode 100755 index bc892ef7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [ ?x ?y ] :p [ ?pa ?b ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-04.rq.svn-base deleted file mode 100755 index d7fe19e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { [ :p :q ; ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-05.rq.svn-base deleted file mode 100755 index e3b94640..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-bnodes-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -WHERE { _:a :p1 :q1 . - _:a :p2 :q2 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-01.rq.svn-base deleted file mode 100755 index 6bccf7f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER (?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-02.rq.svn-base deleted file mode 100755 index 8b4f160e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-03.rq.svn-base deleted file mode 100755 index 74a04839..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo", "i") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-04.rq.svn-base deleted file mode 100755 index 77602d39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX xsd: -SELECT * -WHERE { ?s ?p ?o . FILTER xsd:integer(?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-05.rq.svn-base deleted file mode 100755 index 529b5b61..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-expr-05.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT * -WHERE { ?s ?p ?o . FILTER :myFunc(?s,?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-01.rq.svn-base deleted file mode 100755 index 251b0e17..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( [ ?x ?y ] ) :p ( [ ?pa ?b ] 57 ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-02.rq.svn-base deleted file mode 100755 index 97b9bbb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-forms-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( [] [] ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-01.rq.svn-base deleted file mode 100755 index 0634eb5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-02.rq.svn-base deleted file mode 100755 index 4882aa7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-02.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# LIMIT and OFFSET can be in either order -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -LIMIT 5 -OFFSET 3 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-03.rq.svn-base deleted file mode 100755 index 246b8afe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-03.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# LIMIT and OFFSET can be in either order -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -OFFSET 3 -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-04.rq.svn-base deleted file mode 100755 index 699edcd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-limit-offset-04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -OFFSET 3 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-01.rq.svn-base deleted file mode 100755 index 6e69d63b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( ?x ) :p ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-02.rq.svn-base deleted file mode 100755 index 52016f24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ?x :p ( ?z ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-03.rq.svn-base deleted file mode 100755 index 30d74b06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-03.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ?z ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-04.rq.svn-base deleted file mode 100755 index 74aae6bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-04.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ( ?z ) ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-05.rq.svn-base deleted file mode 100755 index 234ae64c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lists-05.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ( ) ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-01.rq.svn-base deleted file mode 100755 index 286ce6ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-02.rq.svn-base deleted file mode 100755 index d77473fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-03.rq.svn-base deleted file mode 100755 index e3806ed2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x\"y'z" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-04.rq.svn-base deleted file mode 100755 index 689cb087..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x"y\'z' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-05.rq.svn-base deleted file mode 100755 index 77420247..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x\"" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-06.rq.svn-base deleted file mode 100755 index 3979ecbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x\'' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-07.rq.svn-base deleted file mode 100755 index 87b188be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-07.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 123 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-08.rq.svn-base deleted file mode 100755 index 04fd35e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-08.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 123. . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-09.rq.svn-base deleted file mode 100755 index af6b37fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-09.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long -"" -Literal -""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-10.rq.svn-base deleted file mode 100755 index 5d47db10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-10.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long -'' """ -Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-11.rq.svn-base deleted file mode 100755 index dcef246f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-11.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long""\"Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-12.rq.svn-base deleted file mode 100755 index 9ff4663f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-12.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long''\'Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-13.rq.svn-base deleted file mode 100755 index f8512232..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-13.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long\"""Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-14.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-14.rq.svn-base deleted file mode 100755 index e48d0ef1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-14.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long\'''Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-15.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-15.rq.svn-base deleted file mode 100755 index ecb55e1c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-15.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long '' Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-16.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-16.rq.svn-base deleted file mode 100755 index 5c00eb9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-16.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long ' Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-17.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-17.rq.svn-base deleted file mode 100755 index 73db5159..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-17.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long''\\Literal with '\\ single quotes ''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-18.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-18.rq.svn-base deleted file mode 100755 index d62f63bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-18.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long "" Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-19.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-19.rq.svn-base deleted file mode 100755 index dd8cdd43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-19.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long " Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-20.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-20.rq.svn-base deleted file mode 100755 index 289bc39f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-lit-20.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long""\\Literal with "\\ single quotes""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-01.rq.svn-base deleted file mode 100755 index 395ee9eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-02.rq.svn-base deleted file mode 100755 index 683b5d27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY (?o+5) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-03.rq.svn-base deleted file mode 100755 index 6b40f05f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ASC(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-04.rq.svn-base deleted file mode 100755 index 7ab1e1ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-04.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY DESC(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-05.rq.svn-base deleted file mode 100755 index a84dba1f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-05.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY DESC(:func(?s, ?o)) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-06.rq.svn-base deleted file mode 100755 index 062c66b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-06.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY - DESC(?o+57) :func2(?o) ASC(?s) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-07.rq.svn-base deleted file mode 100755 index 48c4aed1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-order-07.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY str(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-01.rq.svn-base deleted file mode 100755 index 77218788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -{ } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-02.rq.svn-base deleted file mode 100755 index 05823a22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# No DOT after optional -PREFIX : -SELECT * -{ ?a :b :c OPTIONAL{:x :y :z} :x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-03.rq.svn-base deleted file mode 100755 index b526d7ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-03.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# No DOT between non-triples patterns -PREFIX : -SELECT * -{ ?a :b :c - OPTIONAL{:x :y :z} - { :x1 :y1 :z1 } UNION { :x2 :y2 :z2 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-04.rq.svn-base deleted file mode 100755 index 30078201..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-pat-04.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -# No DOT between non-triples patterns -PREFIX : -SELECT * -{ - OPTIONAL{:x :y :z} - ?a :b :c - { :x1 :y1 :z1 } UNION { :x2 :y2 :z2 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-01.rq.svn-base deleted file mode 100755 index b4a31e05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -{ ?x :p ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-02.rq.svn-base deleted file mode 100755 index 8cfedbb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { :x :p :z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-03.rq.svn-base deleted file mode 100755 index a49e9e6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { :_1 :p.rdf :z.z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-04.rq.svn-base deleted file mode 100755 index ebc3d045..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-04.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX a: -SELECT * -WHERE { : a: :a . : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-05.rq.svn-base deleted file mode 100755 index 792cf1c1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : <> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-06.rq.svn-base deleted file mode 100755 index 8cbd783a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : <#> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-07.rq.svn-base deleted file mode 100755 index 3f0bb649..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-07.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-08.rq.svn-base deleted file mode 100755 index 14709ab9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-qname-08.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -BASE -PREFIX : <#> -PREFIX x.y: -SELECT * -WHERE { :a.b x.y: : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-01.rq.svn-base deleted file mode 100755 index 0c08d8ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator -PREFIX : -SELECT * -{ OPTIONAL { } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-02.rq.svn-base deleted file mode 100755 index 094dd25a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-03.rq.svn-base deleted file mode 100755 index 3f7812e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, no DOT, operator -PREFIX : -SELECT * -{ :p :q :r OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-05.rq.svn-base deleted file mode 100755 index 7eaf0768..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-05.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, DOT, operator -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-06.rq.svn-base deleted file mode 100755 index 47d27d24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-06.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, DOT, operator, DOT -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-07.rq.svn-base deleted file mode 100755 index 6b1ff7a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-07.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, no DOT -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-08.rq.svn-base deleted file mode 100755 index 8eef3e55..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-08.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, DOT -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-09.rq.svn-base deleted file mode 100755 index e5b1ee6a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-09.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, triple -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-10.rq.svn-base deleted file mode 100755 index 11b401fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-10.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, DOT triple -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } . ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-11.rq.svn-base deleted file mode 100755 index 2932d38e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-11.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, semi, operator -PREFIX : -SELECT * -{ :p :q :r ; OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-12.rq.svn-base deleted file mode 100755 index 7623a111..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-12.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, semi, DOT, operator -PREFIX : -SELECT * -{ :p :q :r ; . OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-13.rq.svn-base deleted file mode 100755 index c16e79a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-13.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -# Two elements in the group -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } - :p :q :r . OPTIONAL { :a :b :c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-14.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-14.rq.svn-base deleted file mode 100755 index 88f7992d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-struct-14.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -# Two elements in the group -PREFIX : -SELECT * -{ :p :q :r OPTIONAL { :a :b :c } - :p :q :r OPTIONAL { :a :b :c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-01.rq.svn-base deleted file mode 100755 index bd65cc53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-01.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ - { ?s ?p ?o } UNION { ?a ?b ?c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-02.rq.svn-base deleted file mode 100755 index 564d2057..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/.svn/text-base/syntax-union-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ - { ?s ?p ?o } UNION { ?a ?b ?c } UNION { ?r ?s ?t } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl deleted file mode 100755 index b06bc537..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl +++ /dev/null @@ -1,524 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql1" ; - mf:entries - ( :syntax-basic-01 :syntax-basic-02 :syntax-basic-03 - :syntax-basic-04 :syntax-basic-05 :syntax-basic-06 - :syntax-qname-01 :syntax-qname-02 :syntax-qname-03 - :syntax-qname-04 :syntax-qname-05 :syntax-qname-06 - :syntax-qname-07 :syntax-qname-08 :syntax-lit-01 - :syntax-lit-02 :syntax-lit-03 :syntax-lit-04 :syntax-lit-05 - :syntax-lit-06 :syntax-lit-07 :syntax-lit-08 :syntax-lit-09 - :syntax-lit-10 :syntax-lit-11 :syntax-lit-12 :syntax-lit-13 - :syntax-lit-14 :syntax-lit-15 :syntax-lit-16 :syntax-lit-17 - :syntax-lit-18 :syntax-lit-19 :syntax-lit-20 :syntax-struct-01 - :syntax-struct-02 :syntax-struct-03 :syntax-struct-05 - :syntax-struct-06 :syntax-struct-07 :syntax-struct-08 - :syntax-struct-09 :syntax-struct-10 :syntax-struct-11 - :syntax-struct-12 :syntax-struct-13 :syntax-struct-14 - :syntax-lists-01 :syntax-lists-02 :syntax-lists-03 - :syntax-lists-04 :syntax-lists-05 :syntax-bnodes-01 - :syntax-bnodes-02 :syntax-bnodes-03 :syntax-bnodes-04 - :syntax-bnodes-05 :syntax-forms-01 :syntax-forms-02 - :syntax-union-01 :syntax-union-02 :syntax-expr-01 - :syntax-expr-02 :syntax-expr-03 :syntax-expr-04 - :syntax-expr-05 :syntax-order-01 :syntax-order-02 - :syntax-order-03 :syntax-order-04 :syntax-order-05 - :syntax-order-06 :syntax-order-07 :syntax-limit-offset-01 - :syntax-limit-offset-02 :syntax-limit-offset-03 - :syntax-limit-offset-04 :syntax-pat-01 :syntax-pat-02 - :syntax-pat-03 :syntax-pat-04 - ). - -:syntax-basic-01 mf:name "syntax-basic-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-02 mf:name "syntax-basic-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-03 mf:name "syntax-basic-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-04 mf:name "syntax-basic-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-05 mf:name "syntax-basic-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-basic-06 mf:name "syntax-basic-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-01 mf:name "syntax-qname-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-02 mf:name "syntax-qname-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-03 mf:name "syntax-qname-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-04 mf:name "syntax-qname-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-05 mf:name "syntax-qname-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-06 mf:name "syntax-qname-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-07 mf:name "syntax-qname-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-qname-08 mf:name "syntax-qname-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-01 mf:name "syntax-lit-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-02 mf:name "syntax-lit-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-03 mf:name "syntax-lit-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-04 mf:name "syntax-lit-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-05 mf:name "syntax-lit-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-06 mf:name "syntax-lit-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-07 mf:name "syntax-lit-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-08 mf:name "syntax-lit-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-09 mf:name "syntax-lit-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-10 mf:name "syntax-lit-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-11 mf:name "syntax-lit-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-12 mf:name "syntax-lit-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-13 mf:name "syntax-lit-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-14 mf:name "syntax-lit-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-15 mf:name "syntax-lit-15.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-16 mf:name "syntax-lit-16.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-17 mf:name "syntax-lit-17.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-18 mf:name "syntax-lit-18.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-19 mf:name "syntax-lit-19.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lit-20 mf:name "syntax-lit-20.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-01 mf:name "syntax-struct-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-02 mf:name "syntax-struct-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-03 mf:name "syntax-struct-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-05 mf:name "syntax-struct-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-06 mf:name "syntax-struct-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-07 mf:name "syntax-struct-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-08 mf:name "syntax-struct-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-09 mf:name "syntax-struct-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-10 mf:name "syntax-struct-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-11 mf:name "syntax-struct-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-12 mf:name "syntax-struct-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-13 mf:name "syntax-struct-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-struct-14 mf:name "syntax-struct-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-01 mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-02 mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-03 mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-04 mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-05 mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-01 mf:name "syntax-bnodes-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-02 mf:name "syntax-bnodes-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-03 mf:name "syntax-bnodes-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-04 mf:name "syntax-bnodes-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnodes-05 mf:name "syntax-bnodes-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-forms-01 mf:name "syntax-forms-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-forms-02 mf:name "syntax-forms-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-union-01 mf:name "syntax-union-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-union-02 mf:name "syntax-union-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-01 mf:name "syntax-expr-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-02 mf:name "syntax-expr-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-03 mf:name "syntax-expr-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-04 mf:name "syntax-expr-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-expr-05 mf:name "syntax-expr-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-01 mf:name "syntax-order-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-02 mf:name "syntax-order-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-03 mf:name "syntax-order-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-04 mf:name "syntax-order-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-05 mf:name "syntax-order-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-06 mf:name "syntax-order-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-order-07 mf:name "syntax-order-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-01 mf:name "syntax-limit-offset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-02 mf:name "syntax-limit-offset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-03 mf:name "syntax-limit-offset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-limit-offset-04 mf:name "syntax-limit-offset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-01 mf:name "syntax-pat-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-02 mf:name "syntax-pat-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-03 mf:name "syntax-pat-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-pat-04 mf:name "syntax-pat-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl.bak deleted file mode 100755 index 58b358b4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl.bak +++ /dev/null @@ -1,523 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql1" ; - mf:entries - ( <#syntax-basic-01> <#syntax-basic-02> <#syntax-basic-03> - <#syntax-basic-04> <#syntax-basic-05> <#syntax-basic-06> - <#syntax-qname-01> <#syntax-qname-02> <#syntax-qname-03> - <#syntax-qname-04> <#syntax-qname-05> <#syntax-qname-06> - <#syntax-qname-07> <#syntax-qname-08> <#syntax-lit-01> - <#syntax-lit-02> <#syntax-lit-03> <#syntax-lit-04> <#syntax-lit-05> - <#syntax-lit-06> <#syntax-lit-07> <#syntax-lit-08> <#syntax-lit-09> - <#syntax-lit-10> <#syntax-lit-11> <#syntax-lit-12> <#syntax-lit-13> - <#syntax-lit-14> <#syntax-lit-15> <#syntax-lit-16> <#syntax-lit-17> - <#syntax-lit-18> <#syntax-lit-19> <#syntax-lit-20> <#syntax-struct-01> - <#syntax-struct-02> <#syntax-struct-03> <#syntax-struct-05> - <#syntax-struct-06> <#syntax-struct-07> <#syntax-struct-08> - <#syntax-struct-09> <#syntax-struct-10> <#syntax-struct-11> - <#syntax-struct-12> <#syntax-struct-13> <#syntax-struct-14> - <#syntax-lists-01> <#syntax-lists-02> <#syntax-lists-03> - <#syntax-lists-04> <#syntax-lists-05> <#syntax-bnodes-01> - <#syntax-bnodes-02> <#syntax-bnodes-03> <#syntax-bnodes-04> - <#syntax-bnodes-05> <#syntax-forms-01> <#syntax-forms-02> - <#syntax-union-01> <#syntax-union-02> <#syntax-expr-01> - <#syntax-expr-02> <#syntax-expr-03> <#syntax-expr-04> - <#syntax-expr-05> <#syntax-order-01> <#syntax-order-02> - <#syntax-order-03> <#syntax-order-04> <#syntax-order-05> - <#syntax-order-06> <#syntax-order-07> <#syntax-limit-offset-01> - <#syntax-limit-offset-02> <#syntax-limit-offset-03> - <#syntax-limit-offset-04> <#syntax-pat-01> <#syntax-pat-02> - <#syntax-pat-03> <#syntax-pat-04> - ). - -<#syntax-basic-01> mf:name "syntax-basic-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-02> mf:name "syntax-basic-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-03> mf:name "syntax-basic-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-04> mf:name "syntax-basic-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-05> mf:name "syntax-basic-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-basic-06> mf:name "syntax-basic-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-01> mf:name "syntax-qname-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-02> mf:name "syntax-qname-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-03> mf:name "syntax-qname-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-04> mf:name "syntax-qname-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-05> mf:name "syntax-qname-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-06> mf:name "syntax-qname-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-07> mf:name "syntax-qname-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-qname-08> mf:name "syntax-qname-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-01> mf:name "syntax-lit-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-02> mf:name "syntax-lit-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-03> mf:name "syntax-lit-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-04> mf:name "syntax-lit-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-05> mf:name "syntax-lit-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-06> mf:name "syntax-lit-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-07> mf:name "syntax-lit-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-08> mf:name "syntax-lit-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-09> mf:name "syntax-lit-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-10> mf:name "syntax-lit-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-11> mf:name "syntax-lit-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-12> mf:name "syntax-lit-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-13> mf:name "syntax-lit-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-14> mf:name "syntax-lit-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-15> mf:name "syntax-lit-15.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-16> mf:name "syntax-lit-16.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-17> mf:name "syntax-lit-17.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-18> mf:name "syntax-lit-18.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-19> mf:name "syntax-lit-19.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lit-20> mf:name "syntax-lit-20.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-01> mf:name "syntax-struct-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-02> mf:name "syntax-struct-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-03> mf:name "syntax-struct-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-05> mf:name "syntax-struct-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-06> mf:name "syntax-struct-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-07> mf:name "syntax-struct-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-08> mf:name "syntax-struct-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-09> mf:name "syntax-struct-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-10> mf:name "syntax-struct-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-11> mf:name "syntax-struct-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-12> mf:name "syntax-struct-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-13> mf:name "syntax-struct-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-struct-14> mf:name "syntax-struct-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-01> mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-02> mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-03> mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-04> mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-05> mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-01> mf:name "syntax-bnodes-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-02> mf:name "syntax-bnodes-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-03> mf:name "syntax-bnodes-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-04> mf:name "syntax-bnodes-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnodes-05> mf:name "syntax-bnodes-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-forms-01> mf:name "syntax-forms-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-forms-02> mf:name "syntax-forms-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-union-01> mf:name "syntax-union-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-union-02> mf:name "syntax-union-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-01> mf:name "syntax-expr-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-02> mf:name "syntax-expr-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-03> mf:name "syntax-expr-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-04> mf:name "syntax-expr-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-expr-05> mf:name "syntax-expr-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-01> mf:name "syntax-order-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-02> mf:name "syntax-order-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-03> mf:name "syntax-order-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-04> mf:name "syntax-order-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-05> mf:name "syntax-order-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-06> mf:name "syntax-order-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-order-07> mf:name "syntax-order-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-01> mf:name "syntax-limit-offset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-02> mf:name "syntax-limit-offset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-03> mf:name "syntax-limit-offset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-limit-offset-04> mf:name "syntax-limit-offset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-01> mf:name "syntax-pat-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-02> mf:name "syntax-pat-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-03> mf:name "syntax-pat-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-pat-04> mf:name "syntax-pat-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq deleted file mode 100755 index 9bb639b1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq deleted file mode 100755 index 8ab5230b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq deleted file mode 100755 index b096d7bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -# No trailing dot -PREFIX : -SELECT * -WHERE { ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq deleted file mode 100755 index f3001bc4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -# With trailing dot -SELECT * -WHERE { ?x ?y ?z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq deleted file mode 100755 index 8a8f4dd4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Two triples : no trailing dot -SELECT * -WHERE { ?x ?y ?z . ?a ?b ?c } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq deleted file mode 100755 index d0fb4026..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Two triples : with trailing dot -SELECT * -WHERE { ?x ?y ?z . ?a ?b ?c . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq deleted file mode 100755 index 1431943d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [:p :q ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq deleted file mode 100755 index 053e5d35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [] :p :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq deleted file mode 100755 index bc892ef7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [ ?x ?y ] :p [ ?pa ?b ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq deleted file mode 100755 index d7fe19e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { [ :p :q ; ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq deleted file mode 100755 index e3b94640..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -WHERE { _:a :p1 :q1 . - _:a :p2 :q2 . - } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq deleted file mode 100755 index 6bccf7f3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER (?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq deleted file mode 100755 index 8b4f160e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq deleted file mode 100755 index 74a04839..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?s ?p ?o . FILTER REGEX(?o, "foo", "i") } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq deleted file mode 100755 index 77602d39..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX xsd: -SELECT * -WHERE { ?s ?p ?o . FILTER xsd:integer(?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq deleted file mode 100755 index 529b5b61..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX xsd: -SELECT * -WHERE { ?s ?p ?o . FILTER :myFunc(?s,?o) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq deleted file mode 100755 index 251b0e17..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( [ ?x ?y ] ) :p ( [ ?pa ?b ] 57 ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq deleted file mode 100755 index 97b9bbb9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( [] [] ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq deleted file mode 100755 index 0634eb5f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq deleted file mode 100755 index 4882aa7c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq +++ /dev/null @@ -1,7 +0,0 @@ -# LIMIT and OFFSET can be in either order -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -LIMIT 5 -OFFSET 3 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq deleted file mode 100755 index 246b8afe..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq +++ /dev/null @@ -1,7 +0,0 @@ -# LIMIT and OFFSET can be in either order -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -OFFSET 3 -LIMIT 5 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq deleted file mode 100755 index 699edcd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o -OFFSET 3 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq deleted file mode 100755 index 6e69d63b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( ?x ) :p ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq deleted file mode 100755 index 52016f24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ?x :p ( ?z ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq deleted file mode 100755 index 30d74b06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ?z ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq deleted file mode 100755 index 74aae6bb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ( ?z ) ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq deleted file mode 100755 index 234ae64c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { ( ( ) ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq deleted file mode 100755 index 286ce6ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq deleted file mode 100755 index d77473fd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq deleted file mode 100755 index e3806ed2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x\"y'z" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq deleted file mode 100755 index 689cb087..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x"y\'z' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq deleted file mode 100755 index 77420247..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p "x\"" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq deleted file mode 100755 index 3979ecbc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 'x\'' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq deleted file mode 100755 index 87b188be..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 123 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq deleted file mode 100755 index 04fd35e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p 123. . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq deleted file mode 100755 index af6b37fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq +++ /dev/null @@ -1,6 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long -"" -Literal -""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq deleted file mode 100755 index 5d47db10..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq +++ /dev/null @@ -1,5 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long -'' """ -Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq deleted file mode 100755 index dcef246f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long""\"Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq deleted file mode 100755 index 9ff4663f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long''\'Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq deleted file mode 100755 index f8512232..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long\"""Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq deleted file mode 100755 index e48d0ef1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long\'''Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq deleted file mode 100755 index ecb55e1c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long '' Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq deleted file mode 100755 index 5c00eb9d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long ' Literal''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq deleted file mode 100755 index 73db5159..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p '''Long''\\Literal with '\\ single quotes ''' } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq deleted file mode 100755 index d62f63bc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long "" Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq deleted file mode 100755 index dd8cdd43..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long " Literal""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq deleted file mode 100755 index 289bc39f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq +++ /dev/null @@ -1,3 +0,0 @@ -BASE -PREFIX : <#> -SELECT * WHERE { :x :p """Long""\\Literal with "\\ single quotes""" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq deleted file mode 100755 index 395ee9eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ?o diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq deleted file mode 100755 index 683b5d27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY (?o+5) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq deleted file mode 100755 index 6b40f05f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY ASC(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq deleted file mode 100755 index 7ab1e1ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY DESC(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq deleted file mode 100755 index a84dba1f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY DESC(:func(?s, ?o)) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq deleted file mode 100755 index 062c66b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY - DESC(?o+57) :func2(?o) ASC(?s) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq deleted file mode 100755 index 48c4aed1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT * -{ ?s ?p ?o } -ORDER BY str(?o) diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq deleted file mode 100755 index 77218788..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -{ } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq deleted file mode 100755 index 05823a22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -# No DOT after optional -PREFIX : -SELECT * -{ ?a :b :c OPTIONAL{:x :y :z} :x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq deleted file mode 100755 index b526d7ee..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq +++ /dev/null @@ -1,7 +0,0 @@ -# No DOT between non-triples patterns -PREFIX : -SELECT * -{ ?a :b :c - OPTIONAL{:x :y :z} - { :x1 :y1 :z1 } UNION { :x2 :y2 :z2 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq deleted file mode 100755 index 30078201..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq +++ /dev/null @@ -1,8 +0,0 @@ -# No DOT between non-triples patterns -PREFIX : -SELECT * -{ - OPTIONAL{:x :y :z} - ?a :b :c - { :x1 :y1 :z1 } UNION { :x2 :y2 :z2 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq deleted file mode 100755 index b4a31e05..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -{ ?x :p ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq deleted file mode 100755 index 8cfedbb4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { :x :p :z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq deleted file mode 100755 index a49e9e6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { :_1 :p.rdf :z.z . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq deleted file mode 100755 index ebc3d045..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -PREFIX a: -SELECT * -WHERE { : a: :a . : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq deleted file mode 100755 index 792cf1c1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : <> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq deleted file mode 100755 index 8cbd783a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : <#> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq deleted file mode 100755 index 3f0bb649..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq +++ /dev/null @@ -1,4 +0,0 @@ -BASE -PREFIX : <#> -SELECT * -WHERE { : : : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq deleted file mode 100755 index 14709ab9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq +++ /dev/null @@ -1,5 +0,0 @@ -BASE -PREFIX : <#> -PREFIX x.y: -SELECT * -WHERE { :a.b x.y: : . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq deleted file mode 100755 index 0c08d8ef..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator -PREFIX : -SELECT * -{ OPTIONAL { } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq deleted file mode 100755 index 094dd25a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq deleted file mode 100755 index 3f7812e5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, no DOT, operator -PREFIX : -SELECT * -{ :p :q :r OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq deleted file mode 100755 index 7eaf0768..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, DOT, operator -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq deleted file mode 100755 index 47d27d24..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, DOT, operator, DOT -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq deleted file mode 100755 index 6b1ff7a2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, no DOT -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq deleted file mode 100755 index 8eef3e55..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, DOT -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq deleted file mode 100755 index e5b1ee6a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, triple -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq deleted file mode 100755 index 11b401fa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Operator, DOT triple -PREFIX : -SELECT * -{ OPTIONAL { :a :b :c } . ?x ?y ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq deleted file mode 100755 index 2932d38e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, semi, operator -PREFIX : -SELECT * -{ :p :q :r ; OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq deleted file mode 100755 index 7623a111..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Triple, semi, DOT, operator -PREFIX : -SELECT * -{ :p :q :r ; . OPTIONAL { :a :b :c } } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq deleted file mode 100755 index c16e79a6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq +++ /dev/null @@ -1,6 +0,0 @@ -# Two elements in the group -PREFIX : -SELECT * -{ :p :q :r . OPTIONAL { :a :b :c } - :p :q :r . OPTIONAL { :a :b :c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq deleted file mode 100755 index 88f7992d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq +++ /dev/null @@ -1,6 +0,0 @@ -# Two elements in the group -PREFIX : -SELECT * -{ :p :q :r OPTIONAL { :a :b :c } - :p :q :r OPTIONAL { :a :b :c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq deleted file mode 100755 index bd65cc53..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ - { ?s ?p ?o } UNION { ?a ?b ?c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq deleted file mode 100755 index 564d2057..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -{ - { ?s ?p ?o } UNION { ?a ?b ?c } UNION { ?r ?s ?t } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/all-wcprops deleted file mode 100755 index 9ef8dcc1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/all-wcprops +++ /dev/null @@ -1,335 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2 -END -syntax-lists-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq -END -syntax-lists-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq -END -syntax-graph-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq -END -syntax-form-describe01.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq -END -syntax-graph-04.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq -END -syntax-form-construct01.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq -END -syntax-keywords-02.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq -END -syntax-form-construct03.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq -END -syntax-esc-02.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq -END -syntax-general-01.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq -END -syntax-esc-04.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq -END -syntax-general-11.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq -END -syntax-general-03.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq -END -syntax-form-ask-02.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq -END -syntax-general-13.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq -END -syntax-general-05.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl.bak -END -syntax-form-select-02.rq -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq -END -syntax-general-07.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq -END -syntax-general-09.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq -END -syntax-dataset-01.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl -END -syntax-function-01.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq -END -syntax-dataset-03.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq -END -syntax-bnode-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq -END -syntax-function-03.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq -END -syntax-bnode-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq -END -syntax-lists-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq -END -syntax-lists-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq -END -syntax-graph-01.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq -END -syntax-lists-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq -END -syntax-graph-03.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq -END -syntax-form-describe02.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq -END -syntax-graph-05.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq -END -syntax-keywords-01.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq -END -syntax-form-construct02.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq -END -syntax-keywords-03.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq -END -syntax-esc-01.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq -END -syntax-form-construct04.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq -END -syntax-esc-03.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq -END -syntax-form-construct06.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq -END -syntax-general-10.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq -END -syntax-general-02.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq -END -syntax-esc-05.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq -END -syntax-general-12.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq -END -syntax-general-04.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq -END -syntax-form-select-01.rq -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq -END -syntax-general-14.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq -END -syntax-general-06.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq -END -syntax-general-08.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq -END -syntax-function-02.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq -END -syntax-dataset-02.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq -END -syntax-function-04.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq -END -syntax-bnode-02.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq -END -syntax-dataset-04.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/entries deleted file mode 100755 index 661a7c22..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/entries +++ /dev/null @@ -1,688 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -syntax-lists-02.rq -file - - - - -2008-02-29T14:57:23.591118Z -60270cd45ea69b0f53a39be4e0fc893b -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-04.rq -file - - - - -2008-02-29T14:57:23.591118Z -b93c55a2eaa912c13c228158b9e95c87 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-graph-02.rq -file - - - - -2008-02-29T14:57:23.591118Z -03812dbece780dbc44fd1bdafc54ae9b -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-describe01.rq -file - - - - -2008-02-29T14:57:23.606738Z -3d2e30776b191e48496a0380f12f8378 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-graph-04.rq -file - - - - -2008-02-29T14:57:23.606738Z -ff026eddd5ebeacfde89cb766f22044c -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-construct01.rq -file - - - - -2008-02-29T14:57:23.606738Z -5930f44f2cbc5676f059f53e0506541b -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-keywords-02.rq -file - - - - -2008-02-29T14:57:23.622359Z -bebc91463ba47291d491b49d94e57658 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-construct03.rq -file - - - - -2008-02-29T14:57:23.622359Z -6c9b77c5286627b966621b45bdcce41a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-esc-02.rq -file - - - - -2008-02-29T14:57:23.622359Z -f0e9235c4749ab997c1e8b237f62f6dc -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-01.rq -file - - - - -2008-02-29T14:57:23.637980Z -8b505cfc128dd6f0a4e44570498671f6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-esc-04.rq -file - - - - -2008-02-29T14:57:23.637980Z -7eff4ecf30f8df901c1cce8edcede12f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-11.rq -file - - - - -2008-02-29T14:57:23.637980Z -4138b2fa5b0075df453c5541714beabf -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-03.rq -file - - - - -2008-02-29T14:57:23.653600Z -7f6999ee5f9504efe0906c7c5129604e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-ask-02.rq -file - - - - -2008-02-29T14:57:23.653600Z -0be1ef69d8cd62907eecd764eba0a8a6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-13.rq -file - - - - -2008-02-29T14:57:23.653600Z -b7659c382faae94ef2fb27d22c2aa850 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-05.rq -file - - - - -2008-02-29T14:57:23.684841Z -f51e36fb72b2d90d1a9881a48e1e9ad1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:23.669221Z -f7c026974c6e557d4e8efa480beb74e1 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-select-02.rq -file - - - - -2008-02-29T14:57:23.669221Z -9635de705e164a983b3bb491dd11a911 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-07.rq -file - - - - -2008-02-29T14:57:23.684841Z -65883fcf2de8dcc05a4f525f0c637c75 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-09.rq -file - - - - -2008-02-29T14:57:23.716083Z -e931e8d67798a6046cf40f6ee3f5f226 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-dataset-01.rq -file - - - - -2008-02-29T14:57:23.700462Z -2c0fcc99788df0429663a9ac8d8a319d -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:23.700462Z -a1bc9c546168aa6e3a2a51632e84e950 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-function-01.rq -file - - - - -2008-02-29T14:57:23.684841Z -c7b1362d88b6c6ea28e7b2c5b22c6608 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-dataset-03.rq -file - - - - -2008-02-29T14:57:23.731703Z -2b3b4f27bc79a79931e9e1d615da0283 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnode-01.rq -file - - - - -2008-02-29T14:57:23.716083Z -d343a10ce242e4b854de1d159c8c3491 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-function-03.rq -file - - - - -2008-02-29T14:57:23.716083Z -9351ab6b11c0503ca3ca7bce884e5673 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnode-03.rq -file - - - - -2008-02-29T14:57:23.731703Z -544b71fb945307cc27c4163a8422a60e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-01.rq -file - - - - -2008-02-29T14:57:23.731703Z -9c6dce404c339b6a2daffedb345797a2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-03.rq -file - - - - -2008-02-29T14:57:23.747324Z -58b7a08619fb3b5ad92ed734fbfd9851 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-graph-01.rq -file - - - - -2008-02-29T14:57:23.747324Z -6aad900a050b6086da5ac621fc479be7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-lists-05.rq -file - - - - -2008-02-29T14:57:23.747324Z -64ac7ab9928625990c9c3f9bf9f3e06a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-graph-03.rq -file - - - - -2008-02-29T14:57:23.762944Z -4f7ef002b11c02f508788f14a5c63d01 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-describe02.rq -file - - - - -2008-02-29T14:57:23.762944Z -40034576a1199c497b8bebc3aadce25b -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-graph-05.rq -file - - - - -2008-02-29T14:57:23.762944Z -b10b67652d1e260b9053562e93ca00ce -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-keywords-01.rq -file - - - - -2008-02-29T14:57:23.778565Z -1d3415fa5ded18ab236bf5c10ff3074c -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-construct02.rq -file - - - - -2008-02-29T14:57:23.778565Z -b953caf2c6fd28233aa43da32dd402c3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-keywords-03.rq -file - - - - -2008-02-29T14:57:23.778565Z -6764a10253f52d48fcf760bc6f10fbfe -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-esc-01.rq -file - - - - -2008-02-29T14:57:23.794186Z -607b2f5acd5d9311b8ddbdd91b3a88be -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-construct04.rq -file - - - - -2008-02-29T14:57:23.794186Z -5b08436f97ad0106173ae96e2edb8d1d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-esc-03.rq -file - - - - -2008-02-29T14:57:23.794186Z -f8dec6d61cc72c5830e3bed708bbf96a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-construct06.rq -file - - - - -2008-02-29T14:57:23.809806Z -6dd8a3577b4f48275b53f4e179e418e3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-10.rq -file - - - - -2008-02-29T14:57:23.809806Z -b5856cf49809958bad450463151b2062 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-02.rq -file - - - - -2008-02-29T14:57:23.809806Z -04ea7ffd2313547574dfb2471b1e9df0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-esc-05.rq -file - - - - -2008-02-29T14:57:23.825427Z -482962bfb79974f547f6ee0a14f679d7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-12.rq -file - - - - -2008-02-29T14:57:23.825427Z -4623fa46c9425c7c2ee7a919bde16f90 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-04.rq -file - - - - -2008-02-29T14:57:23.841047Z -a2298ca9c309839d7eb28d3adcb42bcf -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-form-select-01.rq -file - - - - -2008-02-29T14:57:23.841047Z -ebdad1b6a897c52a052d59bf5ad7f13d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-14.rq -file - - - - -2008-02-29T14:57:23.841047Z -cccbed70e714b160c37f9fad28f68fdb -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-06.rq -file - - - - -2008-02-29T14:57:23.856668Z -bdfae6802db3fcc8e4ab4028ac085895 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-general-08.rq -file - - - - -2008-02-29T14:57:23.856668Z -cf7d5229de31d7925be823387d8b3b25 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-function-02.rq -file - - - - -2008-02-29T14:57:23.856668Z -d90941c1e4bdc21409e8634286f534d9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-dataset-02.rq -file - - - - -2008-02-29T14:57:23.872289Z -870aa5f19819f27215474f2033bd6e9d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-function-04.rq -file - - - - -2008-02-29T14:57:23.872289Z -9fcdc3f6bc291862bc1d3a7a856e6107 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-bnode-02.rq -file - - - - -2008-02-29T14:57:23.872289Z -a24124b2c30e51f5bc0fb39b880d099d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syntax-dataset-04.rq -file - - - - -2008-02-29T14:57:23.887909Z -dc554d4f29d592858bb9b6b62f5cbd21 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index bb16afc4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,347 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql2" ; - mf:entries - ( <#syntax-general-01> <#syntax-general-02> <#syntax-general-03> - <#syntax-general-04> <#syntax-general-05> <#syntax-general-06> - <#syntax-general-07> <#syntax-general-08> <#syntax-general-09> - <#syntax-general-10> <#syntax-general-11> <#syntax-general-12> - <#syntax-general-13> <#syntax-general-14> <#syntax-keywords-01> - <#syntax-keywords-02> <#syntax-keywords-03> <#syntax-lists-01> - <#syntax-lists-02> <#syntax-lists-03> <#syntax-lists-04> - <#syntax-lists-05> <#syntax-bnode-01> <#syntax-bnode-02> - <#syntax-bnode-03> <#syntax-function-01> <#syntax-function-02> - <#syntax-function-03> <#syntax-function-04> <#syntax-form-select-01> - <#syntax-form-select-02> <#syntax-form-ask-02> - <#syntax-form-construct01> <#syntax-form-construct02> - <#syntax-form-construct03> <#syntax-form-construct04> - <#syntax-form-construct06> <#syntax-form-describe01> - <#syntax-form-describe02> <#syntax-dataset-01> <#syntax-dataset-02> - <#syntax-dataset-03> <#syntax-dataset-04> <#syntax-graph-01> - <#syntax-graph-02> <#syntax-graph-03> <#syntax-graph-04> - <#syntax-graph-05> <#syntax-esc-01> <#syntax-esc-02> <#syntax-esc-03> - <#syntax-esc-04> <#syntax-esc-05> ) . - -<#syntax-general-01> mf:name "syntax-general-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-02> mf:name "syntax-general-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-03> mf:name "syntax-general-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-04> mf:name "syntax-general-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-05> mf:name "syntax-general-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-06> mf:name "syntax-general-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-07> mf:name "syntax-general-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-08> mf:name "syntax-general-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-09> mf:name "syntax-general-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-10> mf:name "syntax-general-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-11> mf:name "syntax-general-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-12> mf:name "syntax-general-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-13> mf:name "syntax-general-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-14> mf:name "syntax-general-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-01> mf:name "syntax-keywords-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-02> mf:name "syntax-keywords-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-03> mf:name "syntax-keywords-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-01> mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-02> mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-03> mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-04> mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-05> mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-01> mf:name "syntax-bnode-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-02> mf:name "syntax-bnode-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-03> mf:name "syntax-bnode-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-01> mf:name "syntax-function-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-02> mf:name "syntax-function-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-03> mf:name "syntax-function-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-04> mf:name "syntax-function-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-select-01> mf:name "syntax-form-select-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-select-02> mf:name "syntax-form-select-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-ask-02> mf:name "syntax-form-ask-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct01> mf:name "syntax-form-construct01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct02> mf:name "syntax-form-construct02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct03> mf:name "syntax-form-construct03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct04> mf:name "syntax-form-construct04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct06> mf:name "syntax-form-construct06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-describe01> mf:name "syntax-form-describe01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-describe02> mf:name "syntax-form-describe02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-01> mf:name "syntax-dataset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-02> mf:name "syntax-dataset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-03> mf:name "syntax-dataset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-04> mf:name "syntax-dataset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-01> mf:name "syntax-graph-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-02> mf:name "syntax-graph-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-03> mf:name "syntax-graph-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-04> mf:name "syntax-graph-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-05> mf:name "syntax-graph-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-01> mf:name "syntax-esc-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-02> mf:name "syntax-esc-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-03> mf:name "syntax-esc-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-04> mf:name "syntax-esc-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-05> mf:name "syntax-esc-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 0b09f309..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,348 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql2" ; - mf:entries - ( :syntax-general-01 :syntax-general-02 :syntax-general-03 - :syntax-general-04 :syntax-general-05 :syntax-general-06 - :syntax-general-07 :syntax-general-08 :syntax-general-09 - :syntax-general-10 :syntax-general-11 :syntax-general-12 - :syntax-general-13 :syntax-general-14 :syntax-keywords-01 - :syntax-keywords-02 :syntax-keywords-03 :syntax-lists-01 - :syntax-lists-02 :syntax-lists-03 :syntax-lists-04 - :syntax-lists-05 :syntax-bnode-01 :syntax-bnode-02 - :syntax-bnode-03 :syntax-function-01 :syntax-function-02 - :syntax-function-03 :syntax-function-04 :syntax-form-select-01 - :syntax-form-select-02 :syntax-form-ask-02 - :syntax-form-construct01 :syntax-form-construct02 - :syntax-form-construct03 :syntax-form-construct04 - :syntax-form-construct06 :syntax-form-describe01 - :syntax-form-describe02 :syntax-dataset-01 :syntax-dataset-02 - :syntax-dataset-03 :syntax-dataset-04 :syntax-graph-01 - :syntax-graph-02 :syntax-graph-03 :syntax-graph-04 - :syntax-graph-05 :syntax-esc-01 :syntax-esc-02 :syntax-esc-03 - :syntax-esc-04 :syntax-esc-05 ) . - -:syntax-general-01 mf:name "syntax-general-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-02 mf:name "syntax-general-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-03 mf:name "syntax-general-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-04 mf:name "syntax-general-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-05 mf:name "syntax-general-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-06 mf:name "syntax-general-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-07 mf:name "syntax-general-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-08 mf:name "syntax-general-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-09 mf:name "syntax-general-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-10 mf:name "syntax-general-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-11 mf:name "syntax-general-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-12 mf:name "syntax-general-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-13 mf:name "syntax-general-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-14 mf:name "syntax-general-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-01 mf:name "syntax-keywords-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-02 mf:name "syntax-keywords-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-03 mf:name "syntax-keywords-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-01 mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-02 mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-03 mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-04 mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-05 mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-01 mf:name "syntax-bnode-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-02 mf:name "syntax-bnode-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-03 mf:name "syntax-bnode-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-01 mf:name "syntax-function-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-02 mf:name "syntax-function-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-03 mf:name "syntax-function-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-04 mf:name "syntax-function-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-select-01 mf:name "syntax-form-select-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-select-02 mf:name "syntax-form-select-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-ask-02 mf:name "syntax-form-ask-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct01 mf:name "syntax-form-construct01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct02 mf:name "syntax-form-construct02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct03 mf:name "syntax-form-construct03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct04 mf:name "syntax-form-construct04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct06 mf:name "syntax-form-construct06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-describe01 mf:name "syntax-form-describe01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-describe02 mf:name "syntax-form-describe02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-01 mf:name "syntax-dataset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-02 mf:name "syntax-dataset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-03 mf:name "syntax-dataset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-04 mf:name "syntax-dataset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-01 mf:name "syntax-graph-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-02 mf:name "syntax-graph-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-03 mf:name "syntax-graph-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-04 mf:name "syntax-graph-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-05 mf:name "syntax-graph-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-01 mf:name "syntax-esc-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-02 mf:name "syntax-esc-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-03 mf:name "syntax-esc-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-04 mf:name "syntax-esc-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-05 mf:name "syntax-esc-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-01.rq.svn-base deleted file mode 100755 index f786b0a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [] :p [] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-02.rq.svn-base deleted file mode 100755 index 8f97e54e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -# Tab -SELECT * WHERE { [ ] :p [ - ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-03.rq.svn-base deleted file mode 100755 index d58c260f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-bnode-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { [ :p :q - ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-01.rq.svn-base deleted file mode 100755 index 9b913019..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?x -FROM -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-02.rq.svn-base deleted file mode 100755 index 93a05db7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?x -FROM NAMED -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-03.rq.svn-base deleted file mode 100755 index 01f39b40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?x -FROM NAMED :graph1 -FROM NAMED :graph2 -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-04.rq.svn-base deleted file mode 100755 index 92e3250b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-dataset-04.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT ?x -FROM :g1 -FROM :g2 -FROM NAMED :graph1 -FROM NAMED :graph2 -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-01.rq.svn-base deleted file mode 100755 index 30101040..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "\t" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-02.rq.svn-base deleted file mode 100755 index f795ca45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "x\t" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-03.rq.svn-base deleted file mode 100755 index 67c66c6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "\tx" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-04.rq.svn-base deleted file mode 100755 index b08151cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { <\u0078> :\u0070 ?xx\u0078 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-05.rq.svn-base deleted file mode 100755 index 9a88ba2a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-esc-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -# Comments can contain \ u -# <\u0078> :\u0070 ?xx\u0078 -WHERE { <\u0078> :\u0070 ?xx\u0078 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-ask-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-ask-02.rq.svn-base deleted file mode 100755 index e875654c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-ask-02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -ASK {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct01.rq.svn-base deleted file mode 100755 index b18358a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct01.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT { ?s . ?s ?o } WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct02.rq.svn-base deleted file mode 100755 index 69e76335..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT { ?s . ?s ?o .} WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct03.rq.svn-base deleted file mode 100755 index c566010c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct03.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: -CONSTRUCT { [] rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o } -WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct04.rq.svn-base deleted file mode 100755 index 97410945..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct04.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: -CONSTRUCT { [] rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o . } -WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct06.rq.svn-base deleted file mode 100755 index af808a3c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-construct06.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT {} WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe01.rq.svn-base deleted file mode 100755 index bc5b13d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe01.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -DESCRIBE diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe02.rq.svn-base deleted file mode 100755 index 2132ac7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-describe02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -DESCRIBE ?u WHERE { ?u . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-01.rq.svn-base deleted file mode 100755 index 56d7118e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-01.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-02.rq.svn-base deleted file mode 100755 index 87047520..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-form-select-02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-01.rq.svn-base deleted file mode 100755 index 0de4fff4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name()) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-02.rq.svn-base deleted file mode 100755 index 6b7aa198..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name( )) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-03.rq.svn-base deleted file mode 100755 index faaa0858..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name( -)) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-04.rq.svn-base deleted file mode 100755 index bb242207..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-function-04.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name(1 -)) . FILTER (q:name(1,2)) . FILTER (q:name(1 -,2))} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-01.rq.svn-base deleted file mode 100755 index 9b51d2cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-01.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-02.rq.svn-base deleted file mode 100755 index f0b82f8e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-02.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { _:x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-03.rq.svn-base deleted file mode 100755 index eb77be85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-03.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-04.rq.svn-base deleted file mode 100755 index e1d47430..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-04.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +11 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-05.rq.svn-base deleted file mode 100755 index a5c2c0d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-05.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-06.rq.svn-base deleted file mode 100755 index dc5ff8b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-06.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-07.rq.svn-base deleted file mode 100755 index 5d316d5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-07.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-08.rq.svn-base deleted file mode 100755 index c0654dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-08.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-09.rq.svn-base deleted file mode 100755 index 6e6e6f11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-09.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1.0e0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-10.rq.svn-base deleted file mode 100755 index 788bf114..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-10.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +1.0e+1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-11.rq.svn-base deleted file mode 100755 index 771acb6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-11.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1.0e-1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-12.rq.svn-base deleted file mode 100755 index 171b4f4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-12.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# Legal, if unusual, IRIs -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-13.rq.svn-base deleted file mode 100755 index 02378692..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-13.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Legal, if unusual, IRIs -BASE -SELECT * WHERE { <#x> } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-14.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-14.rq.svn-base deleted file mode 100755 index 188507d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-general-14.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Legal, if unusual, IRIs -BASE -SELECT * WHERE { <¶m=value> } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-01.rq.svn-base deleted file mode 100755 index 611e663b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-01.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH ?g { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-02.rq.svn-base deleted file mode 100755 index 51573644..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-02.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH :a { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-03.rq.svn-base deleted file mode 100755 index 526803f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-03.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH ?g { :x :b ?a } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-04.rq.svn-base deleted file mode 100755 index 08fac9cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-04.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - :x :p :z - GRAPH ?g { :x :b ?a } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-05.rq.svn-base deleted file mode 100755 index 0b27ef06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-graph-05.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - :x :p :z - GRAPH ?g { :x :b ?a . GRAPH ?g2 { :x :p ?x } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-01.rq.svn-base deleted file mode 100755 index afe0b58b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword FILTER as a namespace prefix -PREFIX FILTER: -SELECT * -WHERE { ?x FILTER:foo ?z FILTER (?z) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-02.rq.svn-base deleted file mode 100755 index e5f77902..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword FILTER as a local name -PREFIX : -SELECT * -WHERE { ?x :FILTER ?z FILTER (?z) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-03.rq.svn-base deleted file mode 100755 index 982cb8c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-keywords-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword UNION as a namespace prefix -PREFIX UNION: -SELECT * -WHERE { ?x UNION:foo ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-01.rq.svn-base deleted file mode 100755 index 8042d5a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { () :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-02.rq.svn-base deleted file mode 100755 index 549f917b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( ) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-03.rq.svn-base deleted file mode 100755 index 56ea7978..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-03.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( -) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-04.rq.svn-base deleted file mode 100755 index c9e7a916..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( 1 2 -) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-05.rq.svn-base deleted file mode 100755 index 1faee450..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/.svn/text-base/syntax-lists-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( 1 2 -) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl deleted file mode 100755 index 0b09f309..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl +++ /dev/null @@ -1,348 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql2" ; - mf:entries - ( :syntax-general-01 :syntax-general-02 :syntax-general-03 - :syntax-general-04 :syntax-general-05 :syntax-general-06 - :syntax-general-07 :syntax-general-08 :syntax-general-09 - :syntax-general-10 :syntax-general-11 :syntax-general-12 - :syntax-general-13 :syntax-general-14 :syntax-keywords-01 - :syntax-keywords-02 :syntax-keywords-03 :syntax-lists-01 - :syntax-lists-02 :syntax-lists-03 :syntax-lists-04 - :syntax-lists-05 :syntax-bnode-01 :syntax-bnode-02 - :syntax-bnode-03 :syntax-function-01 :syntax-function-02 - :syntax-function-03 :syntax-function-04 :syntax-form-select-01 - :syntax-form-select-02 :syntax-form-ask-02 - :syntax-form-construct01 :syntax-form-construct02 - :syntax-form-construct03 :syntax-form-construct04 - :syntax-form-construct06 :syntax-form-describe01 - :syntax-form-describe02 :syntax-dataset-01 :syntax-dataset-02 - :syntax-dataset-03 :syntax-dataset-04 :syntax-graph-01 - :syntax-graph-02 :syntax-graph-03 :syntax-graph-04 - :syntax-graph-05 :syntax-esc-01 :syntax-esc-02 :syntax-esc-03 - :syntax-esc-04 :syntax-esc-05 ) . - -:syntax-general-01 mf:name "syntax-general-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-02 mf:name "syntax-general-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-03 mf:name "syntax-general-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-04 mf:name "syntax-general-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-05 mf:name "syntax-general-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-06 mf:name "syntax-general-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-07 mf:name "syntax-general-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-08 mf:name "syntax-general-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-09 mf:name "syntax-general-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-10 mf:name "syntax-general-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-11 mf:name "syntax-general-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-12 mf:name "syntax-general-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-13 mf:name "syntax-general-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-general-14 mf:name "syntax-general-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-01 mf:name "syntax-keywords-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-02 mf:name "syntax-keywords-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-keywords-03 mf:name "syntax-keywords-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-01 mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-02 mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-03 mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-04 mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-lists-05 mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-01 mf:name "syntax-bnode-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-02 mf:name "syntax-bnode-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-bnode-03 mf:name "syntax-bnode-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-01 mf:name "syntax-function-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-02 mf:name "syntax-function-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-03 mf:name "syntax-function-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-function-04 mf:name "syntax-function-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-select-01 mf:name "syntax-form-select-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-select-02 mf:name "syntax-form-select-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-ask-02 mf:name "syntax-form-ask-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct01 mf:name "syntax-form-construct01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct02 mf:name "syntax-form-construct02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct03 mf:name "syntax-form-construct03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct04 mf:name "syntax-form-construct04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-construct06 mf:name "syntax-form-construct06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-describe01 mf:name "syntax-form-describe01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-form-describe02 mf:name "syntax-form-describe02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-01 mf:name "syntax-dataset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-02 mf:name "syntax-dataset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-03 mf:name "syntax-dataset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-dataset-04 mf:name "syntax-dataset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-01 mf:name "syntax-graph-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-02 mf:name "syntax-graph-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-03 mf:name "syntax-graph-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-04 mf:name "syntax-graph-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-graph-05 mf:name "syntax-graph-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-01 mf:name "syntax-esc-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-02 mf:name "syntax-esc-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-03 mf:name "syntax-esc-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-04 mf:name "syntax-esc-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syntax-esc-05 mf:name "syntax-esc-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl.bak deleted file mode 100755 index bb16afc4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl.bak +++ /dev/null @@ -1,347 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql2" ; - mf:entries - ( <#syntax-general-01> <#syntax-general-02> <#syntax-general-03> - <#syntax-general-04> <#syntax-general-05> <#syntax-general-06> - <#syntax-general-07> <#syntax-general-08> <#syntax-general-09> - <#syntax-general-10> <#syntax-general-11> <#syntax-general-12> - <#syntax-general-13> <#syntax-general-14> <#syntax-keywords-01> - <#syntax-keywords-02> <#syntax-keywords-03> <#syntax-lists-01> - <#syntax-lists-02> <#syntax-lists-03> <#syntax-lists-04> - <#syntax-lists-05> <#syntax-bnode-01> <#syntax-bnode-02> - <#syntax-bnode-03> <#syntax-function-01> <#syntax-function-02> - <#syntax-function-03> <#syntax-function-04> <#syntax-form-select-01> - <#syntax-form-select-02> <#syntax-form-ask-02> - <#syntax-form-construct01> <#syntax-form-construct02> - <#syntax-form-construct03> <#syntax-form-construct04> - <#syntax-form-construct06> <#syntax-form-describe01> - <#syntax-form-describe02> <#syntax-dataset-01> <#syntax-dataset-02> - <#syntax-dataset-03> <#syntax-dataset-04> <#syntax-graph-01> - <#syntax-graph-02> <#syntax-graph-03> <#syntax-graph-04> - <#syntax-graph-05> <#syntax-esc-01> <#syntax-esc-02> <#syntax-esc-03> - <#syntax-esc-04> <#syntax-esc-05> ) . - -<#syntax-general-01> mf:name "syntax-general-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-02> mf:name "syntax-general-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-03> mf:name "syntax-general-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-04> mf:name "syntax-general-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-05> mf:name "syntax-general-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-06> mf:name "syntax-general-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-07> mf:name "syntax-general-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-08> mf:name "syntax-general-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-09> mf:name "syntax-general-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-10> mf:name "syntax-general-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-11> mf:name "syntax-general-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-12> mf:name "syntax-general-12.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-13> mf:name "syntax-general-13.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-general-14> mf:name "syntax-general-14.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-01> mf:name "syntax-keywords-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-02> mf:name "syntax-keywords-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-keywords-03> mf:name "syntax-keywords-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-01> mf:name "syntax-lists-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-02> mf:name "syntax-lists-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-03> mf:name "syntax-lists-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-04> mf:name "syntax-lists-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-lists-05> mf:name "syntax-lists-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-01> mf:name "syntax-bnode-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-02> mf:name "syntax-bnode-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-bnode-03> mf:name "syntax-bnode-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-01> mf:name "syntax-function-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-02> mf:name "syntax-function-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-03> mf:name "syntax-function-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-function-04> mf:name "syntax-function-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-select-01> mf:name "syntax-form-select-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-select-02> mf:name "syntax-form-select-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-ask-02> mf:name "syntax-form-ask-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct01> mf:name "syntax-form-construct01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct02> mf:name "syntax-form-construct02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct03> mf:name "syntax-form-construct03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct04> mf:name "syntax-form-construct04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-construct06> mf:name "syntax-form-construct06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-describe01> mf:name "syntax-form-describe01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-form-describe02> mf:name "syntax-form-describe02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-01> mf:name "syntax-dataset-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-02> mf:name "syntax-dataset-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-03> mf:name "syntax-dataset-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-dataset-04> mf:name "syntax-dataset-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-01> mf:name "syntax-graph-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-02> mf:name "syntax-graph-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-03> mf:name "syntax-graph-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-04> mf:name "syntax-graph-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-graph-05> mf:name "syntax-graph-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-01> mf:name "syntax-esc-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-02> mf:name "syntax-esc-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-03> mf:name "syntax-esc-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-04> mf:name "syntax-esc-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syntax-esc-05> mf:name "syntax-esc-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq deleted file mode 100755 index f786b0a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { [] :p [] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq deleted file mode 100755 index 8f97e54e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -# Tab -SELECT * WHERE { [ ] :p [ - ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq deleted file mode 100755 index d58c260f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { [ :p :q - ] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq deleted file mode 100755 index 9b913019..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?x -FROM -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq deleted file mode 100755 index 93a05db7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : -SELECT ?x -FROM NAMED -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq deleted file mode 100755 index 01f39b40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT ?x -FROM NAMED :graph1 -FROM NAMED :graph2 -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq deleted file mode 100755 index 92e3250b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT ?x -FROM :g1 -FROM :g2 -FROM NAMED :graph1 -FROM NAMED :graph2 -WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq deleted file mode 100755 index 30101040..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "\t" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq deleted file mode 100755 index f795ca45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "x\t" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq deleted file mode 100755 index 67c66c6b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE {

        "\tx" } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq deleted file mode 100755 index b08151cb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * -WHERE { <\u0078> :\u0070 ?xx\u0078 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq deleted file mode 100755 index 9a88ba2a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : -SELECT * -# Comments can contain \ u -# <\u0078> :\u0070 ?xx\u0078 -WHERE { <\u0078> :\u0070 ?xx\u0078 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq deleted file mode 100755 index e875654c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq +++ /dev/null @@ -1 +0,0 @@ -ASK {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq deleted file mode 100755 index b18358a3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT { ?s . ?s ?o } WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq deleted file mode 100755 index 69e76335..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT { ?s . ?s ?o .} WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq deleted file mode 100755 index c566010c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: -CONSTRUCT { [] rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o } -WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq deleted file mode 100755 index 97410945..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX rdf: -CONSTRUCT { [] rdf:subject ?s ; - rdf:predicate ?p ; - rdf:object ?o . } -WHERE {?s ?p ?o} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq deleted file mode 100755 index af808a3c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT {} WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq deleted file mode 100755 index bc5b13d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq +++ /dev/null @@ -1 +0,0 @@ -DESCRIBE diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq deleted file mode 100755 index 2132ac7e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq +++ /dev/null @@ -1 +0,0 @@ -DESCRIBE ?u WHERE { ?u . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq deleted file mode 100755 index 56d7118e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq deleted file mode 100755 index 87047520..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq deleted file mode 100755 index 0de4fff4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name()) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq deleted file mode 100755 index 6b7aa198..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name( )) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq deleted file mode 100755 index faaa0858..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name( -)) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq deleted file mode 100755 index bb242207..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX q: -SELECT * WHERE { FILTER (q:name(1 -)) . FILTER (q:name(1,2)) . FILTER (q:name(1 -,2))} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq deleted file mode 100755 index 9b51d2cd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq deleted file mode 100755 index f0b82f8e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { _:x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq deleted file mode 100755 index eb77be85..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq deleted file mode 100755 index e1d47430..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +11 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq deleted file mode 100755 index a5c2c0d0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq deleted file mode 100755 index dc5ff8b9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq deleted file mode 100755 index 5d316d5b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq deleted file mode 100755 index c0654dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1.0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq deleted file mode 100755 index 6e6e6f11..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { 1.0e0 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq deleted file mode 100755 index 788bf114..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { +1.0e+1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq deleted file mode 100755 index 771acb6f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq +++ /dev/null @@ -1 +0,0 @@ -SELECT * WHERE { -1.0e-1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq deleted file mode 100755 index 171b4f4d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq +++ /dev/null @@ -1,2 +0,0 @@ -# Legal, if unusual, IRIs -SELECT * WHERE { } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq deleted file mode 100755 index 02378692..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Legal, if unusual, IRIs -BASE -SELECT * WHERE { <#x> } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq deleted file mode 100755 index 188507d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Legal, if unusual, IRIs -BASE -SELECT * WHERE { <¶m=value> } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq deleted file mode 100755 index 611e663b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH ?g { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq deleted file mode 100755 index 51573644..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH :a { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq deleted file mode 100755 index 526803f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH ?g { :x :b ?a } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq deleted file mode 100755 index 08fac9cf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - :x :p :z - GRAPH ?g { :x :b ?a } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq deleted file mode 100755 index 0b27ef06..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - :x :p :z - GRAPH ?g { :x :b ?a . GRAPH ?g2 { :x :p ?x } } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq deleted file mode 100755 index afe0b58b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword FILTER as a namespace prefix -PREFIX FILTER: -SELECT * -WHERE { ?x FILTER:foo ?z FILTER (?z) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq deleted file mode 100755 index e5f77902..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword FILTER as a local name -PREFIX : -SELECT * -WHERE { ?x :FILTER ?z FILTER (?z) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq deleted file mode 100755 index 982cb8c6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -# use keyword UNION as a namespace prefix -PREFIX UNION: -SELECT * -WHERE { ?x UNION:foo ?z } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq deleted file mode 100755 index 8042d5a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { () :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq deleted file mode 100755 index 549f917b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { ( ) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq deleted file mode 100755 index 56ea7978..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( -) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq deleted file mode 100755 index c9e7a916..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( 1 2 -) :p 1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq deleted file mode 100755 index 1faee450..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -PREFIX : -SELECT * WHERE { ( 1 2 -) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/all-wcprops deleted file mode 100755 index 2fa67de3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/all-wcprops +++ /dev/null @@ -1,323 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3 -END -syn-08.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq -END -syn-blabel-cross-graph-bad.rq -K 25 -svn:wc:ra_dav:version-url -V 129 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq -END -syn-bad-bnode-dot.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq -END -syn-bad-bnodes-missing-pvalues-01.rq -K 25 -svn:wc:ra_dav:version-url -V 136 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq -END -syn-bad-10.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq -END -syn-bad-20.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq -END -syn-bad-02.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq -END -syn-bad-12.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq -END -syn-bad-30.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq -END -syn-bad-22.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq -END -syn-bad-04.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq -END -syn-bad-14.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq -END -syn-bad-06.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq -END -syn-bad-24.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq -END -syn-bad-16.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq -END -syn-bad-26.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq -END -syn-bad-08.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl.bak -END -syn-bad-18.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq -END -syn-bad-28.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq -END -syn-blabel-cross-optional-bad.rq -K 25 -svn:wc:ra_dav:version-url -V 132 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq -END -syn-01.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl -END -syn-blabel-cross-union-bad.rq -K 25 -svn:wc:ra_dav:version-url -V 129 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq -END -syn-03.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq -END -syn-bad-empty-optional-02.rq -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq -END -syn-05.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq -END -syn-07.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq -END -syn-bad-lone-list.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq -END -syn-blabel-cross-filter.rq -K 25 -svn:wc:ra_dav:version-url -V 126 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq -END -syn-bad-bnodes-missing-pvalues-02.rq -K 25 -svn:wc:ra_dav:version-url -V 136 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq -END -syn-bad-01.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq -END -syn-bad-lone-node.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq -END -syn-bad-11.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq -END -syn-bad-21.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq -END -syn-bad-03.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq -END -syn-bad-filter-missing-parens.rq -K 25 -svn:wc:ra_dav:version-url -V 132 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq -END -syn-bad-13.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq -END -syn-bad-31.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq -END -syn-bad-05.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq -END -syn-bad-23.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq -END -syn-bad-15.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq -END -syn-bad-07.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq -END -syn-bad-25.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq -END -syn-bad-17.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq -END -syn-bad-09.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq -END -syn-bad-27.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq -END -syn-bad-19.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq -END -syn-bad-29.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq -END -syn-02.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq -END -syn-04.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq -END -syn-bad-empty-optional-01.rq -K 25 -svn:wc:ra_dav:version-url -V 128 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq -END -syn-06.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/entries deleted file mode 100755 index 45e75cc2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/entries +++ /dev/null @@ -1,664 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -syn-08.rq -file - - - - -2008-02-29T14:57:24.387768Z -11aaeb66fb8185379fbb367d9531a195 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-blabel-cross-graph-bad.rq -file - - - - -2008-02-29T14:57:24.387768Z -29af711540625a3b34b2ba080f649e41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-bnode-dot.rq -file - - - - -2008-02-29T14:57:24.403389Z -560fc6342e803e774e4e3f2a1324c456 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-bnodes-missing-pvalues-01.rq -file - - - - -2008-02-29T14:57:24.403389Z -a64fa5bed78153bb79b2c48933516461 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-10.rq -file - - - - -2008-02-29T14:57:24.403389Z -a4074c98957d03710af153e7b166fe41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-20.rq -file - - - - -2008-02-29T14:57:24.419010Z -e6e4d04d80b6bbf17d464a1e5e8e3ab3 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-02.rq -file - - - - -2008-02-29T14:57:24.419010Z -fcf20eba100fa98da68574cace956b7f -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-12.rq -file - - - - -2008-02-29T14:57:24.434630Z -a4074c98957d03710af153e7b166fe41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-30.rq -file - - - - -2008-02-29T14:57:24.434630Z -09e26860981cf7137d321192f3c57b60 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-22.rq -file - - - - -2008-02-29T14:57:24.434630Z -877a2ce1f839cc58cc8c8ae7ea51e4d8 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-04.rq -file - - - - -2008-02-29T14:57:24.450251Z -e477c5bb281b050b934706a72c1d3078 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-14.rq -file - - - - -2008-02-29T14:57:24.450251Z -40afb21e695b172d097b4a116baeaaca -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-06.rq -file - - - - -2008-02-29T14:57:24.450251Z -84349e475692db68db27bed822a1daf0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-24.rq -file - - - - -2008-02-29T14:57:24.465871Z -0cdce58b07b2030a7118a14e25d52fcf -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-16.rq -file - - - - -2008-02-29T14:57:24.465871Z -51c9d2b472c547aec04a84f35f413c75 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-26.rq -file - - - - -2008-02-29T14:57:24.481492Z -468e7954e37e70c6ac9def29f49ffa17 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-08.rq -file - - - - -2008-02-29T14:57:24.465871Z -102aa08432478c5e2e66248b2abea578 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:24.481492Z -7f66f631eb6864bc4307ac5e50e011d4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-18.rq -file - - - - -2008-02-29T14:57:24.481492Z -fb86f82aa94b47dde04fc2c914305f71 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-28.rq -file - - - - -2008-02-29T14:57:24.497113Z -8bf16364b5a837b842bd0d584239a099 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-blabel-cross-optional-bad.rq -file - - - - -2008-02-29T14:57:24.497113Z -157d60ec9d9cb42c9d4a0a75b43f6390 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-01.rq -file - - - - -2008-02-29T14:57:24.512733Z -c2c1c8c989f891de94bd2dca7ba84bc2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:24.512733Z -55e1d86bc0b2699bb3b0cfc08bfeed24 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-blabel-cross-union-bad.rq -file - - - - -2008-02-29T14:57:24.528354Z -576208187b1c01742250e7ad79d3b7c6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-03.rq -file - - - - -2008-02-29T14:57:24.512733Z -c7cb45bac0110c91b05e725bc8352070 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-empty-optional-02.rq -file - - - - -2008-02-29T14:57:24.528354Z -62b515351b765c1d05729afda2422201 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-05.rq -file - - - - -2008-02-29T14:57:24.528354Z -802ec12985a982e53b118a9290153f82 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-07.rq -file - - - - -2008-02-29T14:57:24.543974Z -ea7499ac87ba7e4180d7bab57412f770 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-lone-list.rq -file - - - - -2008-02-29T14:57:24.543974Z -39889a6993677f8f922beb84eb5357ff -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-blabel-cross-filter.rq -file - - - - -2008-02-29T14:57:24.559595Z -0a99e1da9468ee8e720ca81f225991a2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-bnodes-missing-pvalues-02.rq -file - - - - -2008-02-29T14:57:24.559595Z -2b2bc88f953efbf656f54fa7adf4dc69 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-01.rq -file - - - - -2008-02-29T14:57:24.559595Z -e6511e7a4ed80225faa32627b8583c4a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-lone-node.rq -file - - - - -2008-02-29T14:57:24.575216Z -5978c02d4fd8230ace43264480aa0941 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-11.rq -file - - - - -2008-02-29T14:57:24.575216Z -bbc2be2d9bc2c4e17d70fae9453acf34 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-21.rq -file - - - - -2008-02-29T14:57:24.575216Z -0d85ddcf6d8c2b04d6c783d221803fa5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-03.rq -file - - - - -2008-02-29T14:57:24.590836Z -df5fb0296d223b073f53cfe15bfa0a22 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-filter-missing-parens.rq -file - - - - -2008-02-29T14:57:24.590836Z -cd706b5a71d2b77b321cb222f51a4e76 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-13.rq -file - - - - -2008-02-29T14:57:24.590836Z -f1e92ff5d026975d00c2d5b7a6569555 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-31.rq -file - - - - -2008-02-29T14:57:24.606457Z -69ad7bcd355ac551ac41180a93177b40 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-05.rq -file - - - - -2008-02-29T14:57:24.606457Z -7b79baf1e2b6a040f8535b66c532c649 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-23.rq -file - - - - -2008-02-29T14:57:24.622077Z -d775f423de01126730fdc9c08e6793ab -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-15.rq -file - - - - -2008-02-29T14:57:24.622077Z -388f1462f93ebd9367f2028d277faa03 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-07.rq -file - - - - -2008-02-29T14:57:24.637698Z -69c90a49cb2e88e16d88ab72948369ad -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-25.rq -file - - - - -2008-02-29T14:57:24.637698Z -28dc87261be23f96a9a9a2014f58851d -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-17.rq -file - - - - -2008-02-29T14:57:24.637698Z -5948641cf60105bc171105cf9e886e18 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-09.rq -file - - - - -2008-02-29T14:57:24.653319Z -900ff6dd3bc035d3b62b7cd8f35ecd59 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-27.rq -file - - - - -2008-02-29T14:57:24.653319Z -8320dbc44f0a8dee576b81f49523dfca -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-19.rq -file - - - - -2008-02-29T14:57:24.653319Z -fe41347d2271d0f08e854d787de90d40 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-29.rq -file - - - - -2008-02-29T14:57:24.668939Z -1ccf770ae1e3317c6ea5f00f5207ee75 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-02.rq -file - - - - -2008-02-29T14:57:24.668939Z -9f5abe12221f3ad4a06bedd7998303e4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-04.rq -file - - - - -2008-02-29T14:57:24.668939Z -c0035f7288f6771a3ee795a0626697bd -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-empty-optional-01.rq -file - - - - -2008-02-29T14:57:24.684560Z -e15998b1e1cc112962b7dc0cceb89c60 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-06.rq -file - - - - -2008-02-29T14:57:24.684560Z -5791c37e0b328259e2b7085ca107f48c -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 5411f2d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,328 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql3" ; - mf:entries - ( <#syn-01> <#syn-02> <#syn-03> <#syn-04> <#syn-05> <#syn-06> - <#syn-07> <#syn-08> <#syn-bad-01> <#syn-bad-02> <#syn-bad-03> - <#syn-bad-04> <#syn-bad-05> <#syn-bad-06> <#syn-bad-07> <#syn-bad-08> - <#syn-bad-09> <#syn-bad-10> <#syn-bad-11> <#syn-bad-12> <#syn-bad-13> - <#syn-bad-14> <#syn-bad-15> <#syn-bad-16> <#syn-bad-17> <#syn-bad-18> - <#syn-bad-19> <#syn-bad-20> <#syn-bad-21> <#syn-bad-22> <#syn-bad-23> - <#syn-bad-24> <#syn-bad-25> <#syn-bad-26> <#syn-bad-27> <#syn-bad-28> - <#syn-bad-29> <#syn-bad-30> <#syn-bad-31> <#bnode-dot> - <#bnodes-missing-pvalues-01> <#bnodes-missing-pvalues-02> - <#empty-optional-01> <#empty-optional-02> <#filter-missing-parens> - <#lone-list> <#lone-node> - <#blabel-cross-filter> <#blabel-cross-graph-bad> - <#blabel-cross-optional-bad> <#blabel-cross-union-bad> ) . - -<#syn-01> mf:name "syn-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-02> mf:name "syn-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-03> mf:name "syn-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-04> mf:name "syn-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-05> mf:name "syn-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-06> mf:name "syn-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-07> mf:name "syn-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-08> mf:name "syn-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-01> mf:name "syn-bad-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-02> mf:name "syn-bad-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-03> mf:name "syn-bad-03.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-04> mf:name "syn-bad-04.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-05> mf:name "syn-bad-05.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-06> mf:name "syn-bad-06.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-07> mf:name "syn-bad-07.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-08> mf:name "syn-bad-08.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-09> mf:name "syn-bad-09.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-10> mf:name "syn-bad-10.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-11> mf:name "syn-bad-11.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-12> mf:name "syn-bad-12.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-13> mf:name "syn-bad-13.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-14> mf:name "syn-bad-14.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-15> mf:name "syn-bad-15.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-16> mf:name "syn-bad-16.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-17> mf:name "syn-bad-17.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-18> mf:name "syn-bad-18.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-19> mf:name "syn-bad-19.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-20> mf:name "syn-bad-20.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-21> mf:name "syn-bad-21.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-22> mf:name "syn-bad-22.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-23> mf:name "syn-bad-23.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-24> mf:name "syn-bad-24.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-25> mf:name "syn-bad-25.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-26> mf:name "syn-bad-26.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-27> mf:name "syn-bad-27.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-28> mf:name "syn-bad-28.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-29> mf:name "syn-bad-29.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-30> mf:name "syn-bad-30.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-31> mf:name "syn-bad-31.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnode-dot> mf:name "syn-bad-bnode-dot.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnodes-missing-pvalues-01> mf:name "syn-bad-bnodes-missing-pvalues-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnodes-missing-pvalues-02> mf:name "syn-bad-bnodes-missing-pvalues-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#empty-optional-01> mf:name "syn-bad-empty-optional-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#empty-optional-02> mf:name "syn-bad-empty-optional-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#filter-missing-parens> mf:name "syn-bad-filter-missing-parens.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#lone-list> mf:name "syn-bad-lone-list.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#lone-node> mf:name "syn-bad-lone-node.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-filter> mf:name "syn-blabel-cross-filter" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-graph-bad> mf:name "syn-blabel-cross-graph-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-optional-bad> mf:name "syn-blabel-cross-optional-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-union-bad> mf:name "syn-blabel-cross-union-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 099afbac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,329 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql3" ; - mf:entries - ( :syn-01 :syn-02 :syn-03 :syn-04 :syn-05 :syn-06 - :syn-07 :syn-08 :syn-bad-01 :syn-bad-02 :syn-bad-03 - :syn-bad-04 :syn-bad-05 :syn-bad-06 :syn-bad-07 :syn-bad-08 - :syn-bad-09 :syn-bad-10 :syn-bad-11 :syn-bad-12 :syn-bad-13 - :syn-bad-14 :syn-bad-15 :syn-bad-16 :syn-bad-17 :syn-bad-18 - :syn-bad-19 :syn-bad-20 :syn-bad-21 :syn-bad-22 :syn-bad-23 - :syn-bad-24 :syn-bad-25 :syn-bad-26 :syn-bad-27 :syn-bad-28 - :syn-bad-29 :syn-bad-30 :syn-bad-31 :bnode-dot - :bnodes-missing-pvalues-01 :bnodes-missing-pvalues-02 - :empty-optional-01 :empty-optional-02 :filter-missing-parens - :lone-list :lone-node - :blabel-cross-filter :blabel-cross-graph-bad - :blabel-cross-optional-bad :blabel-cross-union-bad ) . - -:syn-01 mf:name "syn-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-02 mf:name "syn-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-03 mf:name "syn-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-04 mf:name "syn-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-05 mf:name "syn-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-06 mf:name "syn-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-07 mf:name "syn-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-08 mf:name "syn-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-01 mf:name "syn-bad-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-02 mf:name "syn-bad-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-03 mf:name "syn-bad-03.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-04 mf:name "syn-bad-04.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-05 mf:name "syn-bad-05.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-06 mf:name "syn-bad-06.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-07 mf:name "syn-bad-07.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-08 mf:name "syn-bad-08.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-09 mf:name "syn-bad-09.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-10 mf:name "syn-bad-10.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-11 mf:name "syn-bad-11.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-12 mf:name "syn-bad-12.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-13 mf:name "syn-bad-13.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-14 mf:name "syn-bad-14.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-15 mf:name "syn-bad-15.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-16 mf:name "syn-bad-16.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-17 mf:name "syn-bad-17.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-18 mf:name "syn-bad-18.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-19 mf:name "syn-bad-19.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-20 mf:name "syn-bad-20.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-21 mf:name "syn-bad-21.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-22 mf:name "syn-bad-22.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-23 mf:name "syn-bad-23.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-24 mf:name "syn-bad-24.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-25 mf:name "syn-bad-25.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-26 mf:name "syn-bad-26.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-27 mf:name "syn-bad-27.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-28 mf:name "syn-bad-28.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-29 mf:name "syn-bad-29.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-30 mf:name "syn-bad-30.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-31 mf:name "syn-bad-31.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnode-dot mf:name "syn-bad-bnode-dot.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnodes-missing-pvalues-01 mf:name "syn-bad-bnodes-missing-pvalues-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnodes-missing-pvalues-02 mf:name "syn-bad-bnodes-missing-pvalues-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:empty-optional-01 mf:name "syn-bad-empty-optional-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:empty-optional-02 mf:name "syn-bad-empty-optional-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:filter-missing-parens mf:name "syn-bad-filter-missing-parens.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:lone-list mf:name "syn-bad-lone-list.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:lone-node mf:name "syn-bad-lone-node.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-filter mf:name "syn-blabel-cross-filter" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-graph-bad mf:name "syn-blabel-cross-graph-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-optional-bad mf:name "syn-blabel-cross-optional-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-union-bad mf:name "syn-blabel-cross-union-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-01.rq.svn-base deleted file mode 100755 index 409b73b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Dot after triple -SELECT * WHERE -{ ?s ?p ?o . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-02.rq.svn-base deleted file mode 100755 index 32591587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-02.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# No dot after triple -SELECT * WHERE -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-03.rq.svn-base deleted file mode 100755 index 841ec79c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * WHERE -{ ?s ?p ?o . ?s ?p ?o . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-04.rq.svn-base deleted file mode 100755 index 90e77f9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-04.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# No dot -SELECT * WHERE -{ ?s ?p ?o . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-05.rq.svn-base deleted file mode 100755 index 37451f9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT after non-triples -SELECT * WHERE -{ FILTER (?o>5) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-06.rq.svn-base deleted file mode 100755 index 20d9ea7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT after non-triples -SELECT * WHERE -{ FILTER (?o>5) . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-07.rq.svn-base deleted file mode 100755 index 35282df8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-07.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Trailing ; -PREFIX : -SELECT * WHERE -{ :s :p :o ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-08.rq.svn-base deleted file mode 100755 index 51e5ac92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-08.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p :o ; . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-01.rq.svn-base deleted file mode 100755 index d8198a87..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# More a test that bad syntax tests work! -PREFIX ex: -SELECT * diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-02.rq.svn-base deleted file mode 100755 index 1e97167f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-02.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT, 2 triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-03.rq.svn-base deleted file mode 100755 index 4670f187..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-03.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT between triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-04.rq.svn-base deleted file mode 100755 index 137a2fc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-04.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT after ; between triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 ; :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-05.rq.svn-base deleted file mode 100755 index fe7091c3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-05.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-06.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-06.rq.svn-base deleted file mode 100755 index 6fa446b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-06.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-07.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-07.rq.svn-base deleted file mode 100755 index 043be02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-07.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, then triples -SELECT * WHERE -{ . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-08.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-08.rq.svn-base deleted file mode 100755 index c58afed2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-08.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-09.rq.svn-base deleted file mode 100755 index a7775a00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-09.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o .. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-10.rq.svn-base deleted file mode 100755 index f7570f0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-10.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-11.rq.svn-base deleted file mode 100755 index 3a326be0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-11.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o .. ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-12.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-12.rq.svn-base deleted file mode 100755 index f7570f0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-12.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-13.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-13.rq.svn-base deleted file mode 100755 index f7fb35e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-13.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . ?s1 ?p1 ?o1 .. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-14.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-14.rq.svn-base deleted file mode 100755 index efaeec7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-14.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-15.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-15.rq.svn-base deleted file mode 100755 index 082511ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-15.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# Broken ; -SELECT * WHERE -{ ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-16.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-16.rq.svn-base deleted file mode 100755 index 96a27526..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-16.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s ; :p :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-17.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-17.rq.svn-base deleted file mode 100755 index 6374665c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-17.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p ; } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-18.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-18.rq.svn-base deleted file mode 100755 index 37648a97..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-18.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-19.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-19.rq.svn-base deleted file mode 100755 index 921c6102..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-19.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p :o . ; } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-20.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-20.rq.svn-base deleted file mode 100755 index e893b483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-20.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s , :p :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-21.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-21.rq.svn-base deleted file mode 100755 index c6c07345..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-21.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s :p , :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-22.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-22.rq.svn-base deleted file mode 100755 index 7dba6821..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-22.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s :p , } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-23.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-23.rq.svn-base deleted file mode 100755 index 9384ce94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-23.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , can't trail -PREFIX : -SELECT * WHERE -{ :s :p :o , } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-24.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-24.rq.svn-base deleted file mode 100755 index 869717d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-24.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , (should be ;) -PREFIX : -SELECT * WHERE -{ :s :p1 :o1 , :p2 :o2} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-25.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-25.rq.svn-base deleted file mode 100755 index 0bffa187..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-25.rq.svn-base +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-26.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-26.rq.svn-base deleted file mode 100755 index 7da3acf3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-26.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -# Tokenizing matters. -# "longest token rule" means this isn't a "<" and "&&" -PREFIX : -SELECT * WHERE -{ FILTER (?x?y) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-27.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-27.rq.svn-base deleted file mode 100755 index ded4f37b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-27.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { :x [] :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-28.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-28.rq.svn-base deleted file mode 100755 index d7d656e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-28.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { :x _:a :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-29.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-29.rq.svn-base deleted file mode 100755 index f7d0f871..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-29.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# Syntactic blank node in a filter. -SELECT * WHERE { _:x FILTER(_:x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-30.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-30.rq.svn-base deleted file mode 100755 index c737cb61..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-30.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# Syntactic blank node in a filter. -SELECT * WHERE { _:x FILTER(_:x < 3) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-31.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-31.rq.svn-base deleted file mode 100755 index 523ea4eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-31.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH [] { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnode-dot.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnode-dot.rq.svn-base deleted file mode 100755 index 68ea752c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnode-dot.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/bnode-dot.rq -SELECT * WHERE {[] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-01.rq.svn-base deleted file mode 100755 index 01bd5a76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-01.rq.svn-base +++ /dev/null @@ -1,3 +0,0 @@ -# NegativeSyntax/bnodes-missing-pvalues.rq -PREFIX : -SELECT * WHERE { [,] :p [;] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-02.rq.svn-base deleted file mode 100755 index f8377445..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-bnodes-missing-pvalues-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/bnodes-missing-pvalues-02.rq -SELECT * WHERE {() . [,] . [,;] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-01.rq.svn-base deleted file mode 100755 index ace43aa9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-01.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/empty-optional.rq -SELECT * { OPTIONAL FILTER (?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-02.rq.svn-base deleted file mode 100755 index f79caafa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-empty-optional-02.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/empty-optional-02.rq -SELECT * { OPTIONAL GRAPH ?v OPTIONAL FILTER (?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-filter-missing-parens.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-filter-missing-parens.rq.svn-base deleted file mode 100755 index 0ec1c39f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-filter-missing-parens.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/filter-missing-parens.rq -SELECT * { ?s ?p ?o FILTER ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-list.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-list.rq.svn-base deleted file mode 100755 index 03dd3e45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-list.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/lone-list.rq -SELECT * WHERE { () } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-node.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-node.rq.svn-base deleted file mode 100755 index 38baf1f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-bad-lone-node.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/lone-node.rq -SELECT * WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-filter.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-filter.rq.svn-base deleted file mode 100755 index d018580c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-filter.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: syn-blabel-cross-filter.rq,v 1.2 2007/04/09 21:40:22 eric Exp $ -# BNode label used across a FILTER. -PREFIX : - -ASK { _:who :homepage ?homepage - FILTER REGEX(?homepage, "^http://example.org/") - _:who :schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-graph-bad.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-graph-bad.rq.svn-base deleted file mode 100755 index 5b99c916..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-graph-bad.rq.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: syn-blabel-cross-graph-bad.rq,v 1.2 2007/04/18 23:11:57 eric Exp $ -# BNode label used across a GRAPH. -PREFIX : - -ASK { _:who :homepage ?homepage - GRAPH ?g { ?someone :made ?homepage } - _:who :schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-optional-bad.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-optional-bad.rq.svn-base deleted file mode 100755 index 778edd3f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-optional-bad.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# $Id: syn-blabel-cross-optional-bad.rq,v 1.5 2007/09/04 15:04:22 eric Exp $ -# BNode label used across an OPTIONAL. -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. -PREFIX foaf: - -ASK { _:who foaf:homepage ?homepage - OPTIONAL { ?someone foaf:made ?homepage } - _:who foaf:schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-union-bad.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-union-bad.rq.svn-base deleted file mode 100755 index 2a7e273d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/.svn/text-base/syn-blabel-cross-union-bad.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# $Id: syn-blabel-cross-union-bad.rq,v 1.4 2007/09/04 15:04:09 eric Exp $ -# BNode label used across a UNION. -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. -PREFIX foaf: - -ASK { _:who foaf:homepage ?homepage - { ?someone foaf:made ?homepage } - UNION - { ?homepage foaf:maker ?someone } - _:who foaf:schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl deleted file mode 100755 index 099afbac..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl +++ /dev/null @@ -1,329 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql3" ; - mf:entries - ( :syn-01 :syn-02 :syn-03 :syn-04 :syn-05 :syn-06 - :syn-07 :syn-08 :syn-bad-01 :syn-bad-02 :syn-bad-03 - :syn-bad-04 :syn-bad-05 :syn-bad-06 :syn-bad-07 :syn-bad-08 - :syn-bad-09 :syn-bad-10 :syn-bad-11 :syn-bad-12 :syn-bad-13 - :syn-bad-14 :syn-bad-15 :syn-bad-16 :syn-bad-17 :syn-bad-18 - :syn-bad-19 :syn-bad-20 :syn-bad-21 :syn-bad-22 :syn-bad-23 - :syn-bad-24 :syn-bad-25 :syn-bad-26 :syn-bad-27 :syn-bad-28 - :syn-bad-29 :syn-bad-30 :syn-bad-31 :bnode-dot - :bnodes-missing-pvalues-01 :bnodes-missing-pvalues-02 - :empty-optional-01 :empty-optional-02 :filter-missing-parens - :lone-list :lone-node - :blabel-cross-filter :blabel-cross-graph-bad - :blabel-cross-optional-bad :blabel-cross-union-bad ) . - -:syn-01 mf:name "syn-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-02 mf:name "syn-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-03 mf:name "syn-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-04 mf:name "syn-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-05 mf:name "syn-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-06 mf:name "syn-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-07 mf:name "syn-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-08 mf:name "syn-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-01 mf:name "syn-bad-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-02 mf:name "syn-bad-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-03 mf:name "syn-bad-03.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-04 mf:name "syn-bad-04.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-05 mf:name "syn-bad-05.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-06 mf:name "syn-bad-06.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-07 mf:name "syn-bad-07.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-08 mf:name "syn-bad-08.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-09 mf:name "syn-bad-09.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-10 mf:name "syn-bad-10.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-11 mf:name "syn-bad-11.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-12 mf:name "syn-bad-12.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-13 mf:name "syn-bad-13.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-14 mf:name "syn-bad-14.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-15 mf:name "syn-bad-15.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-16 mf:name "syn-bad-16.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-17 mf:name "syn-bad-17.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-18 mf:name "syn-bad-18.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-19 mf:name "syn-bad-19.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-20 mf:name "syn-bad-20.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-21 mf:name "syn-bad-21.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-22 mf:name "syn-bad-22.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-23 mf:name "syn-bad-23.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-24 mf:name "syn-bad-24.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-25 mf:name "syn-bad-25.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-26 mf:name "syn-bad-26.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-27 mf:name "syn-bad-27.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-28 mf:name "syn-bad-28.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-29 mf:name "syn-bad-29.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-30 mf:name "syn-bad-30.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-31 mf:name "syn-bad-31.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnode-dot mf:name "syn-bad-bnode-dot.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnodes-missing-pvalues-01 mf:name "syn-bad-bnodes-missing-pvalues-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:bnodes-missing-pvalues-02 mf:name "syn-bad-bnodes-missing-pvalues-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:empty-optional-01 mf:name "syn-bad-empty-optional-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:empty-optional-02 mf:name "syn-bad-empty-optional-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:filter-missing-parens mf:name "syn-bad-filter-missing-parens.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:lone-list mf:name "syn-bad-lone-list.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:lone-node mf:name "syn-bad-lone-node.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-filter mf:name "syn-blabel-cross-filter" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-graph-bad mf:name "syn-blabel-cross-graph-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-optional-bad mf:name "syn-blabel-cross-optional-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:blabel-cross-union-bad mf:name "syn-blabel-cross-union-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl.bak deleted file mode 100755 index 5411f2d8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl.bak +++ /dev/null @@ -1,328 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql3" ; - mf:entries - ( <#syn-01> <#syn-02> <#syn-03> <#syn-04> <#syn-05> <#syn-06> - <#syn-07> <#syn-08> <#syn-bad-01> <#syn-bad-02> <#syn-bad-03> - <#syn-bad-04> <#syn-bad-05> <#syn-bad-06> <#syn-bad-07> <#syn-bad-08> - <#syn-bad-09> <#syn-bad-10> <#syn-bad-11> <#syn-bad-12> <#syn-bad-13> - <#syn-bad-14> <#syn-bad-15> <#syn-bad-16> <#syn-bad-17> <#syn-bad-18> - <#syn-bad-19> <#syn-bad-20> <#syn-bad-21> <#syn-bad-22> <#syn-bad-23> - <#syn-bad-24> <#syn-bad-25> <#syn-bad-26> <#syn-bad-27> <#syn-bad-28> - <#syn-bad-29> <#syn-bad-30> <#syn-bad-31> <#bnode-dot> - <#bnodes-missing-pvalues-01> <#bnodes-missing-pvalues-02> - <#empty-optional-01> <#empty-optional-02> <#filter-missing-parens> - <#lone-list> <#lone-node> - <#blabel-cross-filter> <#blabel-cross-graph-bad> - <#blabel-cross-optional-bad> <#blabel-cross-union-bad> ) . - -<#syn-01> mf:name "syn-01.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-02> mf:name "syn-02.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-03> mf:name "syn-03.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-04> mf:name "syn-04.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-05> mf:name "syn-05.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-06> mf:name "syn-06.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-07> mf:name "syn-07.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-08> mf:name "syn-08.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-01> mf:name "syn-bad-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-02> mf:name "syn-bad-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-03> mf:name "syn-bad-03.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-04> mf:name "syn-bad-04.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-05> mf:name "syn-bad-05.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-06> mf:name "syn-bad-06.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-07> mf:name "syn-bad-07.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-08> mf:name "syn-bad-08.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-09> mf:name "syn-bad-09.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-10> mf:name "syn-bad-10.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-11> mf:name "syn-bad-11.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-12> mf:name "syn-bad-12.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-13> mf:name "syn-bad-13.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-14> mf:name "syn-bad-14.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-15> mf:name "syn-bad-15.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-16> mf:name "syn-bad-16.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-17> mf:name "syn-bad-17.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-18> mf:name "syn-bad-18.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-19> mf:name "syn-bad-19.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-20> mf:name "syn-bad-20.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-21> mf:name "syn-bad-21.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-22> mf:name "syn-bad-22.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-23> mf:name "syn-bad-23.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-24> mf:name "syn-bad-24.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-25> mf:name "syn-bad-25.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-26> mf:name "syn-bad-26.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-27> mf:name "syn-bad-27.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-28> mf:name "syn-bad-28.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-29> mf:name "syn-bad-29.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-30> mf:name "syn-bad-30.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-31> mf:name "syn-bad-31.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnode-dot> mf:name "syn-bad-bnode-dot.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnodes-missing-pvalues-01> mf:name "syn-bad-bnodes-missing-pvalues-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#bnodes-missing-pvalues-02> mf:name "syn-bad-bnodes-missing-pvalues-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#empty-optional-01> mf:name "syn-bad-empty-optional-01.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#empty-optional-02> mf:name "syn-bad-empty-optional-02.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#filter-missing-parens> mf:name "syn-bad-filter-missing-parens.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#lone-list> mf:name "syn-bad-lone-list.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#lone-node> mf:name "syn-bad-lone-node.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-filter> mf:name "syn-blabel-cross-filter" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-graph-bad> mf:name "syn-blabel-cross-graph-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-optional-bad> mf:name "syn-blabel-cross-optional-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#blabel-cross-union-bad> mf:name "syn-blabel-cross-union-bad" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq deleted file mode 100755 index 409b73b0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Dot after triple -SELECT * WHERE -{ ?s ?p ?o . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq deleted file mode 100755 index 32591587..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq +++ /dev/null @@ -1,3 +0,0 @@ -# No dot after triple -SELECT * WHERE -{ ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq deleted file mode 100755 index 841ec79c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * WHERE -{ ?s ?p ?o . ?s ?p ?o . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq deleted file mode 100755 index 90e77f9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq +++ /dev/null @@ -1,3 +0,0 @@ -# No dot -SELECT * WHERE -{ ?s ?p ?o . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq deleted file mode 100755 index 37451f9e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT after non-triples -SELECT * WHERE -{ FILTER (?o>5) . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq deleted file mode 100755 index 20d9ea7f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT after non-triples -SELECT * WHERE -{ FILTER (?o>5) . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq deleted file mode 100755 index 35282df8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Trailing ; -PREFIX : -SELECT * WHERE -{ :s :p :o ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq deleted file mode 100755 index 51e5ac92..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p :o ; . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq deleted file mode 100755 index d8198a87..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -# More a test that bad syntax tests work! -PREFIX ex: -SELECT * diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq deleted file mode 100755 index 1e97167f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT, 2 triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq deleted file mode 100755 index 4670f187..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT between triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq deleted file mode 100755 index 137a2fc5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Missing DOT after ; between triples -PREFIX : -SELECT * -{ :s1 :p1 :o1 ; :s2 :p2 :o2 . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq deleted file mode 100755 index fe7091c3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq deleted file mode 100755 index 6fa446b7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq deleted file mode 100755 index 043be02e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, then triples -SELECT * WHERE -{ . ?s ?p ?o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq deleted file mode 100755 index c58afed2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq deleted file mode 100755 index a7775a00..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o .. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq deleted file mode 100755 index f7570f0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq deleted file mode 100755 index 3a326be0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o .. ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq deleted file mode 100755 index f7570f0a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . . ?s1 ?p1 ?o1 } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq deleted file mode 100755 index f7fb35e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple DOTs -SELECT * WHERE -{ ?s ?p ?o . ?s1 ?p1 ?o1 .. } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq deleted file mode 100755 index efaeec7a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq +++ /dev/null @@ -1,3 +0,0 @@ -# DOT, no triples -SELECT * WHERE -{ . FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq deleted file mode 100755 index 082511ff..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq +++ /dev/null @@ -1,3 +0,0 @@ -# Broken ; -SELECT * WHERE -{ ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq deleted file mode 100755 index 96a27526..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s ; :p :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq deleted file mode 100755 index 6374665c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p ; } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq deleted file mode 100755 index 37648a97..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p ; FILTER(?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq deleted file mode 100755 index 921c6102..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken ; -PREFIX : -SELECT * WHERE -{ :s :p :o . ; } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq deleted file mode 100755 index e893b483..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s , :p :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq deleted file mode 100755 index c6c07345..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s :p , :o } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq deleted file mode 100755 index 7dba6821..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , -PREFIX : -SELECT * WHERE -{ :s :p , } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq deleted file mode 100755 index 9384ce94..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , can't trail -PREFIX : -SELECT * WHERE -{ :s :p :o , } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq deleted file mode 100755 index 869717d6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq +++ /dev/null @@ -1,4 +0,0 @@ -# Broken , (should be ;) -PREFIX : -SELECT * WHERE -{ :s :p1 :o1 , :p2 :o2} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq deleted file mode 100755 index 0bffa187..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq +++ /dev/null @@ -1 +0,0 @@ -CONSTRUCT diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq deleted file mode 100755 index 7da3acf3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq +++ /dev/null @@ -1,5 +0,0 @@ -# Tokenizing matters. -# "longest token rule" means this isn't a "<" and "&&" -PREFIX : -SELECT * WHERE -{ FILTER (?x?y) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq deleted file mode 100755 index ded4f37b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { :x [] :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq deleted file mode 100755 index d7d656e7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : -SELECT * WHERE { :x _:a :q } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq deleted file mode 100755 index f7d0f871..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq +++ /dev/null @@ -1,2 +0,0 @@ -# Syntactic blank node in a filter. -SELECT * WHERE { _:x FILTER(_:x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq deleted file mode 100755 index c737cb61..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq +++ /dev/null @@ -1,2 +0,0 @@ -# Syntactic blank node in a filter. -SELECT * WHERE { _:x FILTER(_:x < 3) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq deleted file mode 100755 index 523ea4eb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - GRAPH [] { } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq deleted file mode 100755 index 68ea752c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/bnode-dot.rq -SELECT * WHERE {[] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq deleted file mode 100755 index 01bd5a76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq +++ /dev/null @@ -1,3 +0,0 @@ -# NegativeSyntax/bnodes-missing-pvalues.rq -PREFIX : -SELECT * WHERE { [,] :p [;] . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq deleted file mode 100755 index f8377445..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/bnodes-missing-pvalues-02.rq -SELECT * WHERE {() . [,] . [,;] } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq deleted file mode 100755 index ace43aa9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/empty-optional.rq -SELECT * { OPTIONAL FILTER (?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq deleted file mode 100755 index f79caafa..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/empty-optional-02.rq -SELECT * { OPTIONAL GRAPH ?v OPTIONAL FILTER (?x) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq deleted file mode 100755 index 0ec1c39f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/filter-missing-parens.rq -SELECT * { ?s ?p ?o FILTER ?x } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq deleted file mode 100755 index 03dd3e45..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/lone-list.rq -SELECT * WHERE { () } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq deleted file mode 100755 index 38baf1f4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq +++ /dev/null @@ -1,2 +0,0 @@ -# NegativeSyntax/lone-node.rq -SELECT * WHERE {} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq deleted file mode 100755 index d018580c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: syn-blabel-cross-filter.rq,v 1.2 2007/04/09 21:40:22 eric Exp $ -# BNode label used across a FILTER. -PREFIX : - -ASK { _:who :homepage ?homepage - FILTER REGEX(?homepage, "^http://example.org/") - _:who :schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq deleted file mode 100755 index 5b99c916..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: syn-blabel-cross-graph-bad.rq,v 1.2 2007/04/18 23:11:57 eric Exp $ -# BNode label used across a GRAPH. -PREFIX : - -ASK { _:who :homepage ?homepage - GRAPH ?g { ?someone :made ?homepage } - _:who :schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq deleted file mode 100755 index 778edd3f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq +++ /dev/null @@ -1,9 +0,0 @@ -# $Id: syn-blabel-cross-optional-bad.rq,v 1.5 2007/09/04 15:04:22 eric Exp $ -# BNode label used across an OPTIONAL. -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. -PREFIX foaf: - -ASK { _:who foaf:homepage ?homepage - OPTIONAL { ?someone foaf:made ?homepage } - _:who foaf:schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq deleted file mode 100755 index 2a7e273d..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq +++ /dev/null @@ -1,11 +0,0 @@ -# $Id: syn-blabel-cross-union-bad.rq,v 1.4 2007/09/04 15:04:09 eric Exp $ -# BNode label used across a UNION. -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. -PREFIX foaf: - -ASK { _:who foaf:homepage ?homepage - { ?someone foaf:made ?homepage } - UNION - { ?homepage foaf:maker ?someone } - _:who foaf:schoolHomepage ?schoolPage } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/all-wcprops deleted file mode 100755 index 8332c6ed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/all-wcprops +++ /dev/null @@ -1,89 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4 -END -syn-bad-UNION-breaks-BGP.rq -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq -END -syn-09.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq -END -syn-bad-34.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq -END -syn-bad-35.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl.bak -END -syn-bad-36.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq -END -syn-bad-37.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq -END -syn-leading-digits-in-prefixed-names.rq -K 25 -svn:wc:ra_dav:version-url -V 139 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq -END -syn-bad-38.rq -K 25 -svn:wc:ra_dav:version-url -V 113 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl -END -syn-10.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq -END -syn-bad-GRAPH-breaks-BGP.rq -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq -END -syn-11.rq -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq -END -syn-bad-OPT-breaks-BGP.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/entries deleted file mode 100755 index bf67f72c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/entries +++ /dev/null @@ -1,196 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -syn-bad-UNION-breaks-BGP.rq -file - - - - -2008-02-29T14:57:24.981351Z -a6bdb63a3bc4b3fd7abde39cb3257c41 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-09.rq -file - - - - -2008-02-29T14:57:24.996972Z -239e46d65c55ce942640b0ce35d14d91 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-34.rq -file - - - - -2008-02-29T14:57:24.996972Z -82047ae9d96a884a9e9bbc1a6186bd45 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-35.rq -file - - - - -2008-02-29T14:57:24.996972Z -6517fb90f86a7373be312ea16dc6d203 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:25.012592Z -36144d4b7676d4f94c835920c45eed56 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-36.rq -file - - - - -2008-02-29T14:57:25.012592Z -33221c3387d92992e2c18cf27bdf9988 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-37.rq -file - - - - -2008-02-29T14:57:25.012592Z -6517fb90f86a7373be312ea16dc6d203 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-leading-digits-in-prefixed-names.rq -file - - - - -2008-02-29T14:57:25.028213Z -0f8e8bb4d84ff7283898081be43ffa5a -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-38.rq -file - - - - -2008-02-29T14:57:25.028213Z -035d54428873593a701d5ad0c2dff242 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:25.028213Z -09ede6aa824284738dfb9371b309043e -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-10.rq -file - - - - -2008-02-29T14:57:25.043834Z -0e8572b9189085cb311a4c20381eff62 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-GRAPH-breaks-BGP.rq -file - - - - -2008-02-29T14:57:25.043834Z -3f36858a550c3d3e7ac0defc976dbfba -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-11.rq -file - - - - -2008-02-29T14:57:25.059454Z -e380d4dcfe39c04244a4cd3c83617bc6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -syn-bad-OPT-breaks-BGP.rq -file - - - - -2008-02-29T14:57:25.059454Z -1a6d8d75f8905b6d89de704b26db6433 -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index 3991ed62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,90 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql4" ; - mf:entries - ( <#syn-09> <#syn-10> <#syn-11> - <#syn-bad-34> <#syn-bad-35> <#syn-bad-36> <#syn-bad-37> <#syn-bad-38> - <#syn-bad-OPT-breaks-BGP> <#syn-bad-UNION-breaks-BGP> <#syn-bad-GRAPH-breaks-BGP> - <#syn-leading-digits-in-prefixed-names>) . - -<#syn-09> mf:name "syn-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-10> mf:name "syn-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-11> mf:name "syn-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-leading-digits-in-prefixed-names> mf:name "syn-leading-digits-in-prefixed-names.rq" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:PositiveSyntaxTest ; - mf:action . - - -<#syn-bad-34> mf:name "syn-bad-34.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-35> mf:name "syn-bad-35.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-36> mf:name "syn-bad-36.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-37> mf:name "syn-bad-37.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-38> mf:name "syn-bad-38.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - <#syn-bad-OPT-breaks-BGP> mf:name "syn-bad-OPT-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after OPTIONAL" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - <#syn-bad-UNION-breaks-BGP> mf:name "syn-bad-UNION-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after UNION" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - <#syn-bad-GRAPH-breaks-BGP> mf:name "syn-bad-GRAPH-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after GRAPH" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index ab4e1e35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,91 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql4" ; - mf:entries - ( :syn-09 :syn-10 :syn-11 - :syn-bad-34 :syn-bad-35 :syn-bad-36 :syn-bad-37 :syn-bad-38 - :syn-bad-OPT-breaks-BGP :syn-bad-UNION-breaks-BGP :syn-bad-GRAPH-breaks-BGP - :syn-leading-digits-in-prefixed-names) . - -:syn-09 mf:name "syn-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-10 mf:name "syn-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-11 mf:name "syn-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-leading-digits-in-prefixed-names mf:name "syn-leading-digits-in-prefixed-names.rq" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:PositiveSyntaxTest ; - mf:action . - - -:syn-bad-34 mf:name "syn-bad-34.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-35 mf:name "syn-bad-35.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-36 mf:name "syn-bad-36.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-37 mf:name "syn-bad-37.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-38 mf:name "syn-bad-38.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - :syn-bad-OPT-breaks-BGP mf:name "syn-bad-OPT-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after OPTIONAL" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - :syn-bad-UNION-breaks-BGP mf:name "syn-bad-UNION-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after UNION" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - :syn-bad-GRAPH-breaks-BGP mf:name "syn-bad-GRAPH-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after GRAPH" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-09.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-09.rq.svn-base deleted file mode 100755 index 6768cacc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-09.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-10.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-10.rq.svn-base deleted file mode 100755 index e3882e8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-10.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . _:a ?q _:a } UNION { _:b ?q _:c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-11.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-11.rq.svn-base deleted file mode 100755 index a50db930..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-11.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . FILTER(true) . [] ?q _:a -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-34.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-34.rq.svn-base deleted file mode 100755 index f4230648..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-34.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . { _:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-35.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-35.rq.svn-base deleted file mode 100755 index 4cae4b76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-35.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-36.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-36.rq.svn-base deleted file mode 100755 index c282a60b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-36.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } UNION { _:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-37.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-37.rq.svn-base deleted file mode 100755 index 4cae4b76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-37.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-38.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-38.rq.svn-base deleted file mode 100755 index 5e5769f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-38.rq.svn-base +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . OPTIONAL {_:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-GRAPH-breaks-BGP.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-GRAPH-breaks-BGP.rq.svn-base deleted file mode 100755 index a0591c49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-GRAPH-breaks-BGP.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# bad: re-used BNode label after GRAPH -# $Id: syn-bad-GRAPH-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $ - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . GRAPH ?g { ?s ?p ?v } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-OPT-breaks-BGP.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-OPT-breaks-BGP.rq.svn-base deleted file mode 100755 index 77ad9eed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-OPT-breaks-BGP.rq.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# bad: re-used BNode label after OPTIONAL -# $Id: syn-bad-OPT-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $ - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . OPTIONAL { ?s ?p ?v } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-UNION-breaks-BGP.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-UNION-breaks-BGP.rq.svn-base deleted file mode 100755 index 756d9bf0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-bad-UNION-breaks-BGP.rq.svn-base +++ /dev/null @@ -1,11 +0,0 @@ -# bad: re-used BNode label after UNION -# $Id: syn-bad-UNION-breaks-BGP.rq,v 1.3 2007/09/04 15:03:54 eric Exp $ -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v1 { ?s ?o } UNION { ?s ?o } _:a ?p ?v2 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-leading-digits-in-prefixed-names.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-leading-digits-in-prefixed-names.rq.svn-base deleted file mode 100755 index 9c063403..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/.svn/text-base/syn-leading-digits-in-prefixed-names.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX dob: -PREFIX time: -PREFIX dc: -SELECT ?desc -WHERE { - dob:1D a time:ProperInterval; - dc:description ?desc. -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl deleted file mode 100755 index ab4e1e35..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl +++ /dev/null @@ -1,91 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql4" ; - mf:entries - ( :syn-09 :syn-10 :syn-11 - :syn-bad-34 :syn-bad-35 :syn-bad-36 :syn-bad-37 :syn-bad-38 - :syn-bad-OPT-breaks-BGP :syn-bad-UNION-breaks-BGP :syn-bad-GRAPH-breaks-BGP - :syn-leading-digits-in-prefixed-names) . - -:syn-09 mf:name "syn-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-10 mf:name "syn-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-11 mf:name "syn-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-leading-digits-in-prefixed-names mf:name "syn-leading-digits-in-prefixed-names.rq" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:PositiveSyntaxTest ; - mf:action . - - -:syn-bad-34 mf:name "syn-bad-34.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-35 mf:name "syn-bad-35.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-36 mf:name "syn-bad-36.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-37 mf:name "syn-bad-37.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:syn-bad-38 mf:name "syn-bad-38.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - :syn-bad-OPT-breaks-BGP mf:name "syn-bad-OPT-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after OPTIONAL" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - :syn-bad-UNION-breaks-BGP mf:name "syn-bad-UNION-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after UNION" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - :syn-bad-GRAPH-breaks-BGP mf:name "syn-bad-GRAPH-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after GRAPH" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl.bak deleted file mode 100755 index 3991ed62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl.bak +++ /dev/null @@ -1,90 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix mf: . -@prefix qt: . -@prefix dawgt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Syntax tests syntax-sparql4" ; - mf:entries - ( <#syn-09> <#syn-10> <#syn-11> - <#syn-bad-34> <#syn-bad-35> <#syn-bad-36> <#syn-bad-37> <#syn-bad-38> - <#syn-bad-OPT-breaks-BGP> <#syn-bad-UNION-breaks-BGP> <#syn-bad-GRAPH-breaks-BGP> - <#syn-leading-digits-in-prefixed-names>) . - -<#syn-09> mf:name "syn-09.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-10> mf:name "syn-10.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-11> mf:name "syn-11.rq" ; - rdf:type mf:PositiveSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-leading-digits-in-prefixed-names> mf:name "syn-leading-digits-in-prefixed-names.rq" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:PositiveSyntaxTest ; - mf:action . - - -<#syn-bad-34> mf:name "syn-bad-34.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-35> mf:name "syn-bad-35.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-36> mf:name "syn-bad-36.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-37> mf:name "syn-bad-37.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#syn-bad-38> mf:name "syn-bad-38.rq" ; - rdf:type mf:NegativeSyntaxTest ; - mf:action ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - - <#syn-bad-OPT-breaks-BGP> mf:name "syn-bad-OPT-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after OPTIONAL" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - <#syn-bad-UNION-breaks-BGP> mf:name "syn-bad-UNION-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after UNION" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - - <#syn-bad-GRAPH-breaks-BGP> mf:name "syn-bad-GRAPH-breaks-BGP" ; - rdfs:comment "bad: re-used BNode label after GRAPH" ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved ; - rdf:type mf:NegativeSyntaxTest ; - mf:action . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq deleted file mode 100755 index 6768cacc..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq deleted file mode 100755 index e3882e8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . _:a ?q _:a } UNION { _:b ?q _:c } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq deleted file mode 100755 index a50db930..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . FILTER(true) . [] ?q _:a -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq deleted file mode 100755 index f4230648..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . { _:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq deleted file mode 100755 index 4cae4b76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq deleted file mode 100755 index c282a60b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } UNION { _:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq deleted file mode 100755 index 4cae4b76..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - { _:a ?p ?v . } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq deleted file mode 100755 index 5e5769f2..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq +++ /dev/null @@ -1,6 +0,0 @@ -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . OPTIONAL {_:a ?q 1 } -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq deleted file mode 100755 index a0591c49..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq +++ /dev/null @@ -1,9 +0,0 @@ -# bad: re-used BNode label after GRAPH -# $Id: syn-bad-GRAPH-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $ - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . GRAPH ?g { ?s ?p ?v } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq deleted file mode 100755 index 77ad9eed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq +++ /dev/null @@ -1,9 +0,0 @@ -# bad: re-used BNode label after OPTIONAL -# $Id: syn-bad-OPT-breaks-BGP.rq,v 1.1 2007/02/15 15:14:31 eric Exp $ - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v . OPTIONAL { ?s ?p ?v } _:a ?q 1 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq deleted file mode 100755 index 756d9bf0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq +++ /dev/null @@ -1,11 +0,0 @@ -# bad: re-used BNode label after UNION -# $Id: syn-bad-UNION-breaks-BGP.rq,v 1.3 2007/09/04 15:03:54 eric Exp $ -# This isn't necessarily a *syntax* test, but references to bnode labels -# may not span basic graph patterns. - -PREFIX : -SELECT * -WHERE -{ - _:a ?p ?v1 { ?s ?o } UNION { ?s ?o } _:a ?p ?v2 -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq deleted file mode 100755 index 9c063403..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX dob: -PREFIX time: -PREFIX dc: -SELECT ?desc -WHERE { - dob:1D a time:ProperInterval; - dc:description ?desc. -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/all-wcprops deleted file mode 100755 index 819b3588..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/entries deleted file mode 100755 index 7744d9ad..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/entries +++ /dev/null @@ -1,28 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/syntax/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/all-wcprops deleted file mode 100755 index 054d1ecd..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/all-wcprops +++ /dev/null @@ -1,95 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 97 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match -END -result-tp-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-01.ttl -END -result-tp-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-02.ttl -END -result-tp-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-03.ttl -END -result-tp-04.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-04.ttl -END -data-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-01.ttl -END -data-02.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-02.ttl -END -data-03.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-03.ttl -END -dawg-tp-01.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq -END -dawg-tp-02.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl.bak -END -dawg-tp-03.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq -END -dawg-tp-04.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq -END -dawg-tp-05.rq -K 25 -svn:wc:ra_dav:version-url -V 111 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-05.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 110 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl -END -dawg-data-01.ttl -K 25 -svn:wc:ra_dav:version-url -V 114 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/entries deleted file mode 100755 index fb83d8d9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/entries +++ /dev/null @@ -1,208 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -result-tp-01.ttl -file - - - - -2008-02-29T14:57:15.499647Z -b08e7eafbc323a46128baf42785735fb -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-tp-02.ttl -file - - - - -2008-02-29T14:57:15.515268Z -4512575cc2816743c5046c5be1d43810 -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-tp-03.ttl -file - - - - -2008-02-29T14:57:15.515268Z -c2bca043b69c05416ad9ccb7dd48f21a -2007-09-20T07:35:41.061956Z -540 -cweiske - -result-tp-04.ttl -file - - - - -2008-02-29T14:57:15.530888Z -1347b901e1d5ba532a67a78f5ef96e35 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-01.ttl -file - - - - -2008-02-29T14:57:15.562129Z -539fb9cc5d5a7c65c4f0fb63e9d08412 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-02.ttl -file - - - - -2008-02-29T14:57:15.577750Z -da2b8b513344e7b08d409e9031bbbb92 -2007-09-20T07:35:41.061956Z -540 -cweiske - -data-03.ttl -file - - - - -2008-02-29T14:57:15.577750Z -adc82105047e03dfb1e982573c572e9a -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-tp-01.rq -file - - - - -2008-02-29T14:57:15.530888Z -bddda2938085414d4df3f5c621a9ceb7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-tp-02.rq -file - - - - -2008-02-29T14:57:15.530888Z -ac63c1033974070edaff89db242605f6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:15.546509Z -d141d288a0c6c96aea00994a1416aa51 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-tp-03.rq -file - - - - -2008-02-29T14:57:15.546509Z -0d39778f0faff80da7ca5b57e362caf2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-tp-04.rq -file - - - - -2008-02-29T14:57:15.546509Z -192bcd3306bf95cc2419d54c1770b36f -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-tp-05.rq -file - - - - -2008-02-29T14:57:15.562129Z -ac63c1033974070edaff89db242605f6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:15.562129Z -eb04770e12161cb799781d0310808aff -2007-09-20T07:35:41.061956Z -540 -cweiske - -dawg-data-01.ttl -file - - - - -2008-02-29T14:57:15.577750Z -45a090c65a76ec6c6fd31d0f3d16253f -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-01.ttl.svn-base deleted file mode 100755 index 4c2575a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-01.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-02.ttl.svn-base deleted file mode 100755 index 584d3d8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-02.ttl.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - - -:y :y :x . -:x :y :y . -:y :x :y . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-03.ttl.svn-base deleted file mode 100755 index 8fe3e138..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/data-03.ttl.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1.1 . -:x :p :v2.1 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-data-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-data-01.ttl.svn-base deleted file mode 100755 index d79c242a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-data-01.ttl.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-01.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-01.rq.svn-base deleted file mode 100755 index d4bc1d8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-01.rq.svn-base +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -WHERE { :x ?p ?q . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-02.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-02.rq.svn-base deleted file mode 100755 index 0b71cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-02.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-03.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-03.rq.svn-base deleted file mode 100755 index 6e31cf27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-03.rq.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?a ?a ?b . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-04.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-04.rq.svn-base deleted file mode 100755 index 00a4b3d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-04.rq.svn-base +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?name -WHERE { - ?x rdf:type foaf:Person . - ?x foaf:name ?name . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-05.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-05.rq.svn-base deleted file mode 100755 index 0b71cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/dawg-tp-05.rq.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index b4f42970..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,59 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some simple DAWG query evaluation test cases" ; - mf:entries - ( - <#dawg-triple-pattern-001> - <#dawg-triple-pattern-002> - <#dawg-triple-pattern-003> - <#dawg-triple-pattern-004> - ). - -<#dawg-triple-pattern-001> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-001" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-002> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-002" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-003> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-003" ; - rdfs:comment - "Simple triple match - repeated variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-004> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-004" ; - rdfs:comment - "Simple triple match - two triples, common variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 29997974..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,60 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some simple DAWG query evaluation test cases" ; - mf:entries - ( - :dawg-triple-pattern-001 - :dawg-triple-pattern-002 - :dawg-triple-pattern-003 - :dawg-triple-pattern-004 - ). - -:dawg-triple-pattern-001 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-001" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-002 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-002" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-003 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-003" ; - rdfs:comment - "Simple triple match - repeated variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-004 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-004" ; - rdfs:comment - "Simple triple match - two triples, common variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-01.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-01.ttl.svn-base deleted file mode 100755 index 5f7c2a25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-01.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "p" , "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-02.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-02.ttl.svn-base deleted file mode 100755 index 4fcb9c40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-02.ttl.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "q" , "x" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "x" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-03.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-03.ttl.svn-base deleted file mode 100755 index 99192e7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-03.ttl.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "a" , "b" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "b" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-04.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-04.ttl.svn-base deleted file mode 100755 index 9c188aa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/.svn/text-base/result-tp-04.ttl.svn-base +++ /dev/null @@ -1,18 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-01.ttl deleted file mode 100755 index 4c2575a8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-01.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1 . -:x :p :v2 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-02.ttl deleted file mode 100755 index 584d3d8c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-02.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . - - -:y :y :x . -:x :y :y . -:y :x :y . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-03.ttl deleted file mode 100755 index 8fe3e138..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-03.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:x :p :v1.1 . -:x :p :v2.1 . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl deleted file mode 100755 index d79c242a..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rdfs: . - -_:alice - rdf:type foaf:Person ; - foaf:name "Alice" ; - foaf:mbox ; - foaf:knows _:bob ; - . - -_:bob - rdf:type foaf:Person ; - foaf:name "Bob" ; - foaf:knows _:alice ; - foaf:mbox ; - foaf:mbox ; - . - - -_:eve - rdf:type foaf:Person ; - foaf:name "Eve" ; - foaf:knows _:fred ; - . - -_:fred - rdf:type foaf:Person ; - foaf:mbox . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq deleted file mode 100755 index d4bc1d8f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq +++ /dev/null @@ -1,4 +0,0 @@ -PREFIX : - -SELECT * -WHERE { :x ?p ?q . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq deleted file mode 100755 index 0b71cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq deleted file mode 100755 index 6e31cf27..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq +++ /dev/null @@ -1,2 +0,0 @@ -SELECT * -WHERE { ?a ?a ?b . } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq deleted file mode 100755 index 00a4b3d1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX rdf: -PREFIX foaf: - -SELECT ?name -WHERE { - ?x rdf:type foaf:Person . - ?x foaf:name ?name . -} diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-05.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-05.rq deleted file mode 100755 index 0b71cf91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-05.rq +++ /dev/null @@ -1,5 +0,0 @@ -PREFIX : - -SELECT * -WHERE { ?x :p ?q . } - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl deleted file mode 100755 index 29997974..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl +++ /dev/null @@ -1,60 +0,0 @@ -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some simple DAWG query evaluation test cases" ; - mf:entries - ( - :dawg-triple-pattern-001 - :dawg-triple-pattern-002 - :dawg-triple-pattern-003 - :dawg-triple-pattern-004 - ). - -:dawg-triple-pattern-001 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-001" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-002 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-002" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-003 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-003" ; - rdfs:comment - "Simple triple match - repeated variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -:dawg-triple-pattern-004 a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-004" ; - rdfs:comment - "Simple triple match - two triples, common variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl.bak deleted file mode 100755 index b4f42970..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl.bak +++ /dev/null @@ -1,59 +0,0 @@ -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Some simple DAWG query evaluation test cases" ; - mf:entries - ( - <#dawg-triple-pattern-001> - <#dawg-triple-pattern-002> - <#dawg-triple-pattern-003> - <#dawg-triple-pattern-004> - ). - -<#dawg-triple-pattern-001> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-001" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-002> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-002" ; - rdfs:comment - "Simple triple match" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-003> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-003" ; - rdfs:comment - "Simple triple match - repeated variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . - -<#dawg-triple-pattern-004> a mf:QueryEvaluationTest ; - mf:name "dawg-triple-pattern-004" ; - rdfs:comment - "Simple triple match - two triples, common variable" ; - mf:action - [ qt:query ; - qt:data ] ; - mf:result ; - dawgt:approvedBy ; - dawgt:approval dawgt:Approved . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-01.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-01.ttl deleted file mode 100755 index 5f7c2a25..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-01.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "p" , "q" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "p" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "p" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-02.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-02.ttl deleted file mode 100755 index 4fcb9c40..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-02.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "q" , "x" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "x" - ] - ] ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "q" - ] ; - rs:binding [ rs:value ; - rs:variable "x" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-03.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-03.ttl deleted file mode 100755 index 99192e7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-03.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "a" , "b" ; - rs:solution [ rs:binding [ rs:value ; - rs:variable "a" - ] ; - rs:binding [ rs:value ; - rs:variable "b" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-04.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-04.ttl deleted file mode 100755 index 9c188aa1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-04.ttl +++ /dev/null @@ -1,18 +0,0 @@ -@prefix rs: . - -[] - rs:ResultSet ; - rs:resultVariable - "name" ; - rs:solution [ rs:binding [ rs:value "Bob" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Alice" ; - rs:variable "name" - ] - ] ; - rs:solution [ rs:binding [ rs:value "Eve" ; - rs:variable "name" - ] - ] . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/all-wcprops deleted file mode 100755 index a937a74f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/all-wcprops +++ /dev/null @@ -1,215 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion -END -tP-positiveInteger-short.rq -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-positiveInteger-short.rq -END -tP-double-float.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float.rq -END -tP.ttl -K 25 -svn:wc:ra_dav:version-url -V 106 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP.ttl -END -tP-unsignedInt-short.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedInt-short.rq -END -tP-int-short.rq -K 25 -svn:wc:ra_dav:version-url -V 115 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-int-short.rq -END -tP-nonNegativeInteger-short.rq -K 25 -svn:wc:ra_dav:version-url -V 130 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonNegativeInteger-short.rq -END -tP-unsignedLong-short.rq -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedLong-short.rq -END -tP-unsignedShort-short.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedShort-short.rq -END -false.ttl -K 25 -svn:wc:ra_dav:version-url -V 109 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/false.ttl -END -tP-decimal-decimal.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-decimal-decimal.rq -END -tP-integer-short.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-integer-short.rq -END -tP-short-short.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short.rq -END -tP-unsignedByte-short.rq -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedByte-short.rq -END -tP-short-float.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-float.rq -END -manifest.ttl.bak -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl.bak -END -tP-short-long-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-long-fail.rq -END -tP-short-short-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 122 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short-fail.rq -END -tP-double-decimal.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal.rq -END -manifest.ttl -K 25 -svn:wc:ra_dav:version-url -V 112 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl -END -tP-short-double.rq -K 25 -svn:wc:ra_dav:version-url -V 118 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-double.rq -END -tP-float-float.rq -K 25 -svn:wc:ra_dav:version-url -V 117 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-float.rq -END -tP-short-byte-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-byte-fail.rq -END -tP-float-decimal-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 124 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal-fail.rq -END -tP-negativeInteger-short.rq -K 25 -svn:wc:ra_dav:version-url -V 127 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-negativeInteger-short.rq -END -true.ttl -K 25 -svn:wc:ra_dav:version-url -V 108 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/true.ttl -END -tP-double-decimal-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 125 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal-fail.rq -END -tP-double-double.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-double.rq -END -tP-double-float-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 123 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float-fail.rq -END -tP-nonPositiveInteger-short.rq -K 25 -svn:wc:ra_dav:version-url -V 130 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonPositiveInteger-short.rq -END -tP-short-decimal.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-decimal.rq -END -tP-long-short.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-long-short.rq -END -tP-short-int-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 120 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-int-fail.rq -END -tP-byte-short.rq -K 25 -svn:wc:ra_dav:version-url -V 116 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short.rq -END -tP-float-decimal.rq -K 25 -svn:wc:ra_dav:version-url -V 119 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal.rq -END -tP-byte-short-fail.rq -K 25 -svn:wc:ra_dav:version-url -V 121 -/svnroot/rdfapi-php/!svn/ver/540/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short-fail.rq -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/entries deleted file mode 100755 index 280bdc98..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/entries +++ /dev/null @@ -1,448 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-09-20T07:35:41.061956Z -540 -cweiske - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -tP-positiveInteger-short.rq -file - - - - -2008-02-29T14:57:20.951236Z -d0f606728065bdfb9d0235b754a557c4 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-double-float.rq -file - - - - -2008-02-29T14:57:20.966857Z -16555fd3c74fb66af6570bbb658f6de0 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP.ttl -file - - - - -2008-02-29T14:57:20.966857Z -22c5b720a3360ea2732c9741e9c5574f -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-unsignedInt-short.rq -file - - - - -2008-02-29T14:57:20.966857Z -47cae44517588f30845e73471cb489dc -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-int-short.rq -file - - - - -2008-02-29T14:57:20.982478Z -ae1d77d2153c1f59ae13de2ecf356040 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-nonNegativeInteger-short.rq -file - - - - -2008-02-29T14:57:20.982478Z -42eb9345a77232354bb7ba97940971f9 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-unsignedLong-short.rq -file - - - - -2008-02-29T14:57:20.982478Z -0b6b7e2d6d927d5c6882524e4b660140 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-unsignedShort-short.rq -file - - - - -2008-02-29T14:57:20.998098Z -0dfdd22a789947f58e327d95576ccd24 -2007-09-20T07:35:41.061956Z -540 -cweiske - -false.ttl -file - - - - -2008-02-29T14:57:20.998098Z -75ce66141bb18ac0ea5b0d70c1ddd3bb -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-decimal-decimal.rq -file - - - - -2008-02-29T14:57:21.013719Z -478d530d6d15fd60813434b908bae7ad -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-integer-short.rq -file - - - - -2008-02-29T14:57:21.013719Z -4fd6a37542d23d16ed8d4ea3fc8f905e -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-short.rq -file - - - - -2008-02-29T14:57:21.013719Z -2374be4fc3bcf0beef51155f88c952b6 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-unsignedByte-short.rq -file - - - - -2008-02-29T14:57:21.029339Z -307df4fdb4019bb226ff597825d43058 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-float.rq -file - - - - -2008-02-29T14:57:21.029339Z -ad1352faf4b0b1d91d88245f8bdea526 -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl.bak -file - - - - -2008-02-29T14:57:21.029339Z -dd90cc44cfa605ef23bc3d7a335da41e -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-long-fail.rq -file - - - - -2008-02-29T14:57:21.044960Z -d4d241dc263cf501265edd1f3e6d3eba -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-short-fail.rq -file - - - - -2008-02-29T14:57:21.044960Z -c398df47a4b54ca3130e01c02e30aeb5 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-double-decimal.rq -file - - - - -2008-02-29T14:57:21.060581Z -2654ed1e163ce070efe2f75d082ee0fb -2007-09-20T07:35:41.061956Z -540 -cweiske - -manifest.ttl -file - - - - -2008-02-29T14:57:21.060581Z -c2e7961f47143affbf9abff23e3b9b37 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-double.rq -file - - - - -2008-02-29T14:57:21.076201Z -835141925d2ef99a59acd7b6dabc952f -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-float-float.rq -file - - - - -2008-02-29T14:57:21.076201Z -0f82005d9cf067a3c37b12a7fce28626 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-byte-fail.rq -file - - - - -2008-02-29T14:57:21.076201Z -659c9ce1b9a726c032fd91f525e665e2 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-float-decimal-fail.rq -file - - - - -2008-02-29T14:57:21.091822Z -68c431d576860c28a81e225e92f8f0d7 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-negativeInteger-short.rq -file - - - - -2008-02-29T14:57:21.091822Z -3edff4619ccb40997108bb9dc67bf51b -2007-09-20T07:35:41.061956Z -540 -cweiske - -true.ttl -file - - - - -2008-02-29T14:57:21.107442Z -26cc9fa12d3f70b33c868f0c48924f93 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-double-decimal-fail.rq -file - - - - -2008-02-29T14:57:21.091822Z -1809aab10312b8c329569ae24913b083 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-double-double.rq -file - - - - -2008-02-29T14:57:21.107442Z -bccb0d02855f1f6c8773ca0964e8e690 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-double-float-fail.rq -file - - - - -2008-02-29T14:57:21.123063Z -71bcfd621faca7c14777de917703bbee -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-nonPositiveInteger-short.rq -file - - - - -2008-02-29T14:57:21.123063Z -e252fcb5471c37194b0d7721bd0fe804 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-decimal.rq -file - - - - -2008-02-29T14:57:21.123063Z -54994642c545e09d3e639a284af90855 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-long-short.rq -file - - - - -2008-02-29T14:57:21.138684Z -41bd680457f0564363a75043af0c9d83 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-short-int-fail.rq -file - - - - -2008-02-29T14:57:21.138684Z -e850afed7dd750059956976800b0e9bc -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-byte-short.rq -file - - - - -2008-02-29T14:57:21.138684Z -535e0930205e38311b32d1d3121c2238 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-float-decimal.rq -file - - - - -2008-02-29T14:57:21.154304Z -fbf56947a27f0977784ee9a5259d1050 -2007-09-20T07:35:41.061956Z -540 -cweiske - -tP-byte-short-fail.rq -file - - - - -2008-02-29T14:57:21.154304Z -30ae74f6e89109f91de3a2732626f39e -2007-09-20T07:35:41.061956Z -540 -cweiske - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/false.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/false.ttl.svn-base deleted file mode 100755 index 5c58bebf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/false.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Simple false result to an ASK query. -# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:boolean "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.bak.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.bak.svn-base deleted file mode 100755 index fe73690f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.bak.svn-base +++ /dev/null @@ -1,405 +0,0 @@ -# $Id: manifest.ttl,v 1.2 2007/07/25 20:07:27 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Type Promotion Tests" ; - mf:entries - ( - <#type-promotion-01> - <#type-promotion-02> - <#type-promotion-03> - <#type-promotion-04> - <#type-promotion-05> - <#type-promotion-06> - <#type-promotion-07> - <#type-promotion-08> - <#type-promotion-09> - <#type-promotion-10> - <#type-promotion-11> - <#type-promotion-12> - <#type-promotion-13> - <#type-promotion-14> - <#type-promotion-15> - <#type-promotion-16> - <#type-promotion-17> - <#type-promotion-18> - <#type-promotion-19> - <#type-promotion-20> - <#type-promotion-21> - <#type-promotion-22> - <#type-promotion-23> - <#type-promotion-24> - <#type-promotion-25> - <#type-promotion-26> - <#type-promotion-27> - <#type-promotion-28> - <#type-promotion-29> - <#type-promotion-30> - ) . - - -<#type-promotion-01> - mf:name "tP-double-double" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-02> - mf:name "tP-double-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-03> - mf:name "tP-double-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-04> - mf:name "tP-float-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-05> - mf:name "tP-float-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-06> - mf:name "tP-decimal-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-07> - mf:name "tP-integer-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-08> - mf:name "tP-nonPositiveInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-09> - mf:name "tP-negativeInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-10> - mf:name "tP-long-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-11> - mf:name "tP-int-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-12> - mf:name "tP-short-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-13> - mf:name "tP-byte-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-14> - mf:name "tP-nonNegativeInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-15> - mf:name "tP-unsignedLong-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-16> - mf:name "tP-unsignedInt-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-17> - mf:name "tP-unsignedShort-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-18> - mf:name "tP-unsignedByte-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-19> - mf:name "tP-positiveInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-20> - mf:name "tP-short-double" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-21> - mf:name "tP-short-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-22> - mf:name "tP-short-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-23> - mf:name "tP-short-short-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-24> - mf:name "tP-byte-short-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-25> - mf:name "tP-short-long-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-26> - mf:name "tP-short-int-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-27> - mf:name "tP-short-byte-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-28> - mf:name "tP-double-float-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-29> - mf:name "tP-double-decimal-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-30> - mf:name "tP-float-decimal-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.svn-base deleted file mode 100755 index 916d327b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/manifest.ttl.svn-base +++ /dev/null @@ -1,406 +0,0 @@ -# $Id: manifest.ttl,v 1.5 2007/08/21 18:27:49 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Type Promotion Tests" ; - mf:entries - ( - :type-promotion-01 - :type-promotion-02 - :type-promotion-03 - :type-promotion-04 - :type-promotion-05 - :type-promotion-06 - :type-promotion-07 - :type-promotion-08 - :type-promotion-09 - :type-promotion-10 - :type-promotion-11 - :type-promotion-12 - :type-promotion-13 - :type-promotion-14 - :type-promotion-15 - :type-promotion-16 - :type-promotion-17 - :type-promotion-18 - :type-promotion-19 - :type-promotion-20 - :type-promotion-21 - :type-promotion-22 - :type-promotion-23 - :type-promotion-24 - :type-promotion-25 - :type-promotion-26 - :type-promotion-27 - :type-promotion-28 - :type-promotion-29 - :type-promotion-30 - ) . - - -:type-promotion-01 - mf:name "tP-double-double" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-02 - mf:name "tP-double-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-03 - mf:name "tP-double-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-04 - mf:name "tP-float-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-05 - mf:name "tP-float-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-06 - mf:name "tP-decimal-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-07 - mf:name "tP-integer-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-08 - mf:name "tP-nonPositiveInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-09 - mf:name "tP-negativeInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-10 - mf:name "tP-long-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-11 - mf:name "tP-int-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-12 - mf:name "tP-short-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-13 - mf:name "tP-byte-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-14 - mf:name "tP-nonNegativeInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-15 - mf:name "tP-unsignedLong-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-16 - mf:name "tP-unsignedInt-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-17 - mf:name "tP-unsignedShort-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-18 - mf:name "tP-unsignedByte-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-19 - mf:name "tP-positiveInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-20 - mf:name "tP-short-double" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-21 - mf:name "tP-short-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-22 - mf:name "tP-short-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-23 - mf:name "tP-short-short-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-24 - mf:name "tP-byte-short-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-25 - mf:name "tP-short-long-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-26 - mf:name "tP-short-int-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-27 - mf:name "tP-short-byte-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-28 - mf:name "tP-double-float-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-29 - mf:name "tP-double-decimal-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-30 - mf:name "tP-float-decimal-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short-fail.rq.svn-base deleted file mode 100755 index 061e86f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-byte-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:byte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:short ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short.rq.svn-base deleted file mode 100755 index 14173a7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-byte-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-byte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:byte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-decimal-decimal.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-decimal-decimal.rq.svn-base deleted file mode 100755 index 7e04a904..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-decimal-decimal.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-decimal-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:decimal1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal-fail.rq.svn-base deleted file mode 100755 index 3aa45f47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal.rq.svn-base deleted file mode 100755 index b6b2a34e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-decimal.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-double.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-double.rq.svn-base deleted file mode 100755 index cc2648e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-double.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:double1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float-fail.rq.svn-base deleted file mode 100755 index d38b074c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-float-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float.rq.svn-base deleted file mode 100755 index a8a64875..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-double-float.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal-fail.rq.svn-base deleted file mode 100755 index fcabccd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal.rq.svn-base deleted file mode 100755 index 474b5b62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-decimal.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-float.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-float.rq.svn-base deleted file mode 100755 index 9fb3a060..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-float-float.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-int-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-int-short.rq.svn-base deleted file mode 100755 index 409d02a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-int-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-int-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:int1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-integer-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-integer-short.rq.svn-base deleted file mode 100755 index 89a98bdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-integer-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-integer-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:integer1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-long-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-long-short.rq.svn-base deleted file mode 100755 index 20b1958c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-long-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-long-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:long1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-negativeInteger-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-negativeInteger-short.rq.svn-base deleted file mode 100755 index 00d9cbce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-negativeInteger-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-negativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:negativeIntegerN1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonNegativeInteger-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonNegativeInteger-short.rq.svn-base deleted file mode 100755 index b01aa96b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonNegativeInteger-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-nonNegativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:nonNegativeInteger1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonPositiveInteger-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonPositiveInteger-short.rq.svn-base deleted file mode 100755 index cd50d952..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-nonPositiveInteger-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-nonPositiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:nonPositiveIntegerN1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-positiveInteger-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-positiveInteger-short.rq.svn-base deleted file mode 100755 index fc845fd9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-positiveInteger-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-positiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:positiveInteger1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-byte-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-byte-fail.rq.svn-base deleted file mode 100755 index 3e50fbeb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-byte-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-byte-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:byte1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-decimal.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-decimal.rq.svn-base deleted file mode 100755 index 79bd366e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-decimal.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-double.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-double.rq.svn-base deleted file mode 100755 index 9a9585a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-double.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:double1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-float.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-float.rq.svn-base deleted file mode 100755 index ce6776a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-float.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-int-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-int-fail.rq.svn-base deleted file mode 100755 index 5faf072f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-int-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-int-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:int1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-long-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-long-fail.rq.svn-base deleted file mode 100755 index 0428b57e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-long-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-long-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:long1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short-fail.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short-fail.rq.svn-base deleted file mode 100755 index 33dea194..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short-fail.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:short ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short.rq.svn-base deleted file mode 100755 index 20f87175..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-short-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedByte-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedByte-short.rq.svn-base deleted file mode 100755 index 18c60312..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedByte-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedByte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedByte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedInt-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedInt-short.rq.svn-base deleted file mode 100755 index 87ac6a8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedInt-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedInt-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedInt1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedLong-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedLong-short.rq.svn-base deleted file mode 100755 index fb16fb83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedLong-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedLong-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedLong1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedShort-short.rq.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedShort-short.rq.svn-base deleted file mode 100755 index 4c64c327..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP-unsignedShort-short.rq.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedShort-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedShort1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP.ttl.svn-base deleted file mode 100755 index 1072f785..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/tP.ttl.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -# $Id: tP.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix xsd: . -@prefix t: . - -t:decimal1 rdf:value "1"^^xsd:decimal . -t:float1 rdf:value "1"^^xsd:float . -t:double1 rdf:value "1"^^xsd:double . -t:booleanT rdf:value "true"^^xsd:boolean . -t:dateTime1 rdf:value "2005-01-14T12:34:56"^^xsd:dateTime . - -# types derived from xsd:decimal: - - t:integer1 rdf:value "1"^^xsd:integer . - t:nonPositiveIntegerN1 rdf:value "-1"^^xsd:nonPositiveInteger . - t:negativeIntegerN1 rdf:value "-1"^^xsd:negativeInteger . - t:long1 rdf:value "1"^^xsd:long . - t:int1 rdf:value "1"^^xsd:int . - t:short1 rdf:value "1"^^xsd:short . - t:byte1 rdf:value "1"^^xsd:byte . - t:nonNegativeInteger1 rdf:value "1"^^xsd:nonNegativeInteger . - t:unsignedLong1 rdf:value "1"^^xsd:unsignedLong . - t:unsignedInt1 rdf:value "1"^^xsd:unsignedInt . - t:unsignedShort1 rdf:value "1"^^xsd:unsignedShort . - t:unsignedByte1 rdf:value "1"^^xsd:unsignedByte . - t:positiveInteger1 rdf:value "1"^^xsd:positiveInteger . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/true.ttl.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/true.ttl.svn-base deleted file mode 100755 index 6cfa8fc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/.svn/text-base/true.ttl.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -# Simple true result to an ASK query. -# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:boolean "true"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/false.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/false.ttl deleted file mode 100755 index 5c58bebf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/false.ttl +++ /dev/null @@ -1,9 +0,0 @@ -# Simple false result to an ASK query. -# $Id: false.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:boolean "false"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl deleted file mode 100755 index 916d327b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl +++ /dev/null @@ -1,406 +0,0 @@ -# $Id: manifest.ttl,v 1.5 2007/08/21 18:27:49 lfeigenb Exp $ - -@prefix rdf: . -@prefix : . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Type Promotion Tests" ; - mf:entries - ( - :type-promotion-01 - :type-promotion-02 - :type-promotion-03 - :type-promotion-04 - :type-promotion-05 - :type-promotion-06 - :type-promotion-07 - :type-promotion-08 - :type-promotion-09 - :type-promotion-10 - :type-promotion-11 - :type-promotion-12 - :type-promotion-13 - :type-promotion-14 - :type-promotion-15 - :type-promotion-16 - :type-promotion-17 - :type-promotion-18 - :type-promotion-19 - :type-promotion-20 - :type-promotion-21 - :type-promotion-22 - :type-promotion-23 - :type-promotion-24 - :type-promotion-25 - :type-promotion-26 - :type-promotion-27 - :type-promotion-28 - :type-promotion-29 - :type-promotion-30 - ) . - - -:type-promotion-01 - mf:name "tP-double-double" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-02 - mf:name "tP-double-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-03 - mf:name "tP-double-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-04 - mf:name "tP-float-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-05 - mf:name "tP-float-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-06 - mf:name "tP-decimal-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-07 - mf:name "tP-integer-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-08 - mf:name "tP-nonPositiveInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-09 - mf:name "tP-negativeInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-10 - mf:name "tP-long-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-11 - mf:name "tP-int-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-12 - mf:name "tP-short-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-13 - mf:name "tP-byte-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-14 - mf:name "tP-nonNegativeInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-15 - mf:name "tP-unsignedLong-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-16 - mf:name "tP-unsignedInt-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-17 - mf:name "tP-unsignedShort-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-18 - mf:name "tP-unsignedByte-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-19 - mf:name "tP-positiveInteger-short" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-20 - mf:name "tP-short-double" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-21 - mf:name "tP-short-float" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-22 - mf:name "tP-short-decimal" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-23 - mf:name "tP-short-short-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-24 - mf:name "tP-byte-short-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-25 - mf:name "tP-short-long-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-26 - mf:name "tP-short-int-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-27 - mf:name "tP-short-byte-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-28 - mf:name "tP-double-float-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-29 - mf:name "tP-double-decimal-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . -:type-promotion-30 - mf:name "tP-float-decimal-fail" ; - qt:queryForm qt:QueryAsk ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl.bak b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl.bak deleted file mode 100755 index fe73690f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl.bak +++ /dev/null @@ -1,405 +0,0 @@ -# $Id: manifest.ttl,v 1.2 2007/07/25 20:07:27 lfeigenb Exp $ - -@prefix rdf: . -@prefix rdfs: . -@prefix dawgt: . -@prefix mf: . -@prefix qt: . - -<> rdf:type mf:Manifest ; - rdfs:comment "Type Promotion Tests" ; - mf:entries - ( - <#type-promotion-01> - <#type-promotion-02> - <#type-promotion-03> - <#type-promotion-04> - <#type-promotion-05> - <#type-promotion-06> - <#type-promotion-07> - <#type-promotion-08> - <#type-promotion-09> - <#type-promotion-10> - <#type-promotion-11> - <#type-promotion-12> - <#type-promotion-13> - <#type-promotion-14> - <#type-promotion-15> - <#type-promotion-16> - <#type-promotion-17> - <#type-promotion-18> - <#type-promotion-19> - <#type-promotion-20> - <#type-promotion-21> - <#type-promotion-22> - <#type-promotion-23> - <#type-promotion-24> - <#type-promotion-25> - <#type-promotion-26> - <#type-promotion-27> - <#type-promotion-28> - <#type-promotion-29> - <#type-promotion-30> - ) . - - -<#type-promotion-01> - mf:name "tP-double-double" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-02> - mf:name "tP-double-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-03> - mf:name "tP-double-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-04> - mf:name "tP-float-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-05> - mf:name "tP-float-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-06> - mf:name "tP-decimal-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-07> - mf:name "tP-integer-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-08> - mf:name "tP-nonPositiveInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-09> - mf:name "tP-negativeInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-10> - mf:name "tP-long-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-11> - mf:name "tP-int-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-12> - mf:name "tP-short-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-13> - mf:name "tP-byte-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-14> - mf:name "tP-nonNegativeInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-15> - mf:name "tP-unsignedLong-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-16> - mf:name "tP-unsignedInt-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-17> - mf:name "tP-unsignedShort-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-18> - mf:name "tP-unsignedByte-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-19> - mf:name "tP-positiveInteger-short" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-20> - mf:name "tP-short-double" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-21> - mf:name "tP-short-float" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-22> - mf:name "tP-short-decimal" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-23> - mf:name "tP-short-short-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-24> - mf:name "tP-byte-short-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-25> - mf:name "tP-short-long-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-26> - mf:name "tP-short-int-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-27> - mf:name "tP-short-byte-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-28> - mf:name "tP-double-float-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-29> - mf:name "tP-double-decimal-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . -<#type-promotion-30> - mf:name "tP-float-decimal-fail" ; - dawgt:approval dawgt:Approved ; - dawgt:approvedBy ; - rdfs:comment - "Positive test: product of type promotion within the xsd:decimal type tree." ; - mf:action - [ qt:data ; - qt:query ] ; - mf:result ; - dawgt:approval dawgt:NotApproved - . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short-fail.rq deleted file mode 100755 index 061e86f6..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-byte-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:byte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:short ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short.rq deleted file mode 100755 index 14173a7b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-byte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:byte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-decimal-decimal.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-decimal-decimal.rq deleted file mode 100755 index 7e04a904..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-decimal-decimal.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-decimal-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:decimal1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal-fail.rq deleted file mode 100755 index 3aa45f47..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal.rq deleted file mode 100755 index b6b2a34e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-double.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-double.rq deleted file mode 100755 index cc2648e8..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-double.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:double1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float-fail.rq deleted file mode 100755 index d38b074c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-float-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float.rq deleted file mode 100755 index a8a64875..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-double-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:double1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal-fail.rq deleted file mode 100755 index fcabccd1..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-decimal-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal.rq deleted file mode 100755 index 474b5b62..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-float.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-float.rq deleted file mode 100755 index 9fb3a060..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-float.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-float-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:float1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-int-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-int-short.rq deleted file mode 100755 index 409d02a4..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-int-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-int-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:int1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-integer-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-integer-short.rq deleted file mode 100755 index 89a98bdf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-integer-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-integer-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:integer1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-long-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-long-short.rq deleted file mode 100755 index 20b1958c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-long-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-long-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:long1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-negativeInteger-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-negativeInteger-short.rq deleted file mode 100755 index 00d9cbce..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-negativeInteger-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-negativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:negativeIntegerN1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonNegativeInteger-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonNegativeInteger-short.rq deleted file mode 100755 index b01aa96b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonNegativeInteger-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-nonNegativeInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:nonNegativeInteger1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonPositiveInteger-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonPositiveInteger-short.rq deleted file mode 100755 index cd50d952..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-nonPositiveInteger-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-nonPositiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:nonPositiveIntegerN1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-positiveInteger-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-positiveInteger-short.rq deleted file mode 100755 index fc845fd9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-positiveInteger-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-positiveInteger-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:positiveInteger1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-byte-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-byte-fail.rq deleted file mode 100755 index 3e50fbeb..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-byte-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-byte-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:byte1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-decimal.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-decimal.rq deleted file mode 100755 index 79bd366e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-decimal.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-decimal.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:decimal1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-double.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-double.rq deleted file mode 100755 index 9a9585a0..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-double.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-double.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:double1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:double ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-float.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-float.rq deleted file mode 100755 index ce6776a7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-float.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-float.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:float1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-int-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-int-fail.rq deleted file mode 100755 index 5faf072f..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-int-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-int-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:int1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:float ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-long-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-long-fail.rq deleted file mode 100755 index 0428b57e..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-long-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-long-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:long1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:decimal ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short-fail.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short-fail.rq deleted file mode 100755 index 33dea194..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short-fail.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-short-fail.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:short ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short.rq deleted file mode 100755 index 20f87175..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-short-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-short-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:short1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedByte-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedByte-short.rq deleted file mode 100755 index 18c60312..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedByte-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedByte-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedByte1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedInt-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedInt-short.rq deleted file mode 100755 index 87ac6a8b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedInt-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedInt-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedInt1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedLong-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedLong-short.rq deleted file mode 100755 index fb16fb83..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedLong-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedLong-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedLong1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedShort-short.rq b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedShort-short.rq deleted file mode 100755 index 4c64c327..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-unsignedShort-short.rq +++ /dev/null @@ -1,10 +0,0 @@ -# Positive test: product of type promotion within the xsd:decimal type tree. -# $Id: tP-unsignedShort-short.rq,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -PREFIX t: -PREFIX rdf: -PREFIX xsd: -ASK - WHERE { t:unsignedShort1 rdf:value ?l . - t:short1 rdf:value ?r . - FILTER ( datatype(?l + ?r) = xsd:integer ) } diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP.ttl deleted file mode 100755 index 1072f785..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP.ttl +++ /dev/null @@ -1,28 +0,0 @@ -# $Id: tP.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix xsd: . -@prefix t: . - -t:decimal1 rdf:value "1"^^xsd:decimal . -t:float1 rdf:value "1"^^xsd:float . -t:double1 rdf:value "1"^^xsd:double . -t:booleanT rdf:value "true"^^xsd:boolean . -t:dateTime1 rdf:value "2005-01-14T12:34:56"^^xsd:dateTime . - -# types derived from xsd:decimal: - - t:integer1 rdf:value "1"^^xsd:integer . - t:nonPositiveIntegerN1 rdf:value "-1"^^xsd:nonPositiveInteger . - t:negativeIntegerN1 rdf:value "-1"^^xsd:negativeInteger . - t:long1 rdf:value "1"^^xsd:long . - t:int1 rdf:value "1"^^xsd:int . - t:short1 rdf:value "1"^^xsd:short . - t:byte1 rdf:value "1"^^xsd:byte . - t:nonNegativeInteger1 rdf:value "1"^^xsd:nonNegativeInteger . - t:unsignedLong1 rdf:value "1"^^xsd:unsignedLong . - t:unsignedInt1 rdf:value "1"^^xsd:unsignedInt . - t:unsignedShort1 rdf:value "1"^^xsd:unsignedShort . - t:unsignedByte1 rdf:value "1"^^xsd:unsignedByte . - t:positiveInteger1 rdf:value "1"^^xsd:positiveInteger . - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/true.ttl b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/true.ttl deleted file mode 100755 index 6cfa8fc7..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/true.ttl +++ /dev/null @@ -1,9 +0,0 @@ -# Simple true result to an ASK query. -# $Id: true.ttl,v 1.1 2007/06/29 14:24:48 aseaborne Exp $ - -@prefix rdf: . -@prefix rs: . -@prefix xsd: . - -[] rdf:type rs:ResultSet ; - rs:boolean "true"^^xsd:boolean . diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/all-wcprops deleted file mode 100755 index 9be3396b..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/all-wcprops +++ /dev/null @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 66 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/test/unit/Syntax -END -n3Serializer_test.php -K 25 -svn:wc:ra_dav:version-url -V 88 -/svnroot/rdfapi-php/!svn/ver/535/trunk/rdfapi-php/test/unit/Syntax/n3Serializer_test.php -END -rdf_Parser_tests.php -K 25 -svn:wc:ra_dav:version-url -V 87 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Syntax/rdf_Parser_tests.php -END -n3Parser_test.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/501/trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php -END -jsonSerializer_test.php -K 25 -svn:wc:ra_dav:version-url -V 90 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/test/unit/Syntax/jsonSerializer_test.php -END -jsonParser_test.php -K 25 -svn:wc:ra_dav:version-url -V 86 -/svnroot/rdfapi-php/!svn/ver/555/trunk/rdfapi-php/test/unit/Syntax/jsonParser_test.php -END -rdf_Serializer_tests.php -K 25 -svn:wc:ra_dav:version-url -V 91 -/svnroot/rdfapi-php/!svn/ver/270/trunk/rdfapi-php/test/unit/Syntax/rdf_Serializer_tests.php -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/entries deleted file mode 100755 index bb0542ea..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/entries +++ /dev/null @@ -1,105 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Syntax -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2007-12-11T20:27:34.710933Z -555 -p_frischmuth - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -n3Serializer_test.php -file - - - - -2008-02-29T14:57:02.175275Z -23d60dbb69ba793b2e3937cf814d3b5c -2007-08-16T09:55:00.366393Z -535 -cweiske - -rdf_Parser_tests.php -file - - - - -2008-02-29T14:57:02.190896Z -f94960d164b943957211630fa8b6006a -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - -n3Parser_test.php -file - - - - -2008-02-29T14:57:02.190896Z -7f89ec50ce6e1190274101542138fffe -2007-08-13T06:44:36.880593Z -501 -cweiske -has-props - -jsonSerializer_test.php -file - - - - -2008-02-29T14:57:02.206516Z -530821a5e908d438493cadf96ebb9d36 -2007-12-11T20:27:34.710933Z -555 -p_frischmuth -has-props - -jsonParser_test.php -file - - - - -2008-02-29T14:57:02.222137Z -a5ecb5ff52bf15f7df01041ed74e2653 -2007-12-11T20:27:34.710933Z -555 -p_frischmuth -has-props - -rdf_Serializer_tests.php -file - - - - -2008-02-29T14:57:02.222137Z -e81910513487455601259241398caa00 -2006-05-17T05:33:15.000000Z -270 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonParser_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonParser_test.php.svn-base deleted file mode 100755 index 92c8ad74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonParser_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonSerializer_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonSerializer_test.php.svn-base deleted file mode 100755 index 92c8ad74..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/jsonSerializer_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/n3Parser_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/n3Parser_test.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/n3Parser_test.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Parser_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Parser_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Parser_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Serializer_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Serializer_tests.php.svn-base deleted file mode 100755 index bdbd3051..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/prop-base/rdf_Serializer_tests.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonParser_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonParser_test.php.svn-base deleted file mode 100755 index f78d6527..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonParser_test.php.svn-base +++ /dev/null @@ -1,91 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testJsonParser extends UnitTestCase -{ - var $modelString; - - function testJsonParser() { - $this->UnitTestCase(); - - GLOBAL $short_datatype; - - $this->modelString = '{"http://example.org/about":{"http://purl.org/dc/elements/1.1/creator":[{"value":"Anna Wilder","type":"literal"}],"http://purl.org/dc/elements/1.1/title":[{"value":"Annas Homepage","type":"literal","lang":"en"}],"http://xmlns.com/foaf/0.1/maker":[{"value":"_:person","type":"bnode"}],"http://purl.org/dc/elements/1.1/title2":[{"value":"Anns HP","type":"literal","lang":"en","datatype":"' . $short_datatype['STRING'] . '"}]},"_:person":{"http://xmlns.com/foaf/0.1/homepage":[{"value":"http://example.org/about","type":"uri"}],"http://example.com/testProp1":[{"value":"\\"double quote\\nnewline\\ttab\\rcarriage return\\\\reverse solidus"}]}}'; - } - - function testGenerateModelFromString() { - - $parser = new JsonParser(); - $model = new MemModel('http://example.com/'); - - try { - $parser->generateModelFromString($this->modelString, $model); - } catch (Exception $e) { - $this->fail($e->getMessage()); - } - - #echo "

        ";
        -		#print_r($model);
        -		
        -		GLOBAL $short_datatype;
        -		$model2 = new MemModel('http://example.com/');
        -
        -        // Ceate new statements and add them to the model
        -        $statement1 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource('http://purl.org/dc/elements/1.1/creator'),
        -                                    new Literal('Anna Wilder'));
        -
        -        $statement2 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource("http://purl.org/dc/elements/1.1/title"),
        -                                    new Literal('Annas Homepage', 'en'));
        -
        -        $statement3 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource('http://xmlns.com/foaf/0.1/maker'),
        -                                    new BlankNode('person'));
        -
        -        $statement4 = new Statement(new BlankNode('person'),
        -                                    new Resource("http://xmlns.com/foaf/0.1/homepage"),
        -                                    new Resource('http://example.org/about'));
        -
        -		$statement5 = new Statement(new Resource('http://example.org/about'),
        -		                            new Resource("http://purl.org/dc/elements/1.1/title2"),
        -		                            new Literal('Anns HP', 'en', $short_datatype['STRING']));
        -		
        -		$statement6 = new Statement(new Resource('http://example.org/about'),
        -		              				new Resource("http://purl.org/dc/elements/1.1/title2"),
        -		              				new Literal('Anns HP', 'en', $short_datatype['INTEGER']));
        -		
        -		$statement7= new Statement(new BlankNode('person'),
        -					 new Resource("http://example.com/testProp1"),
        -					 new Literal("\"double quote\nnewline\ttab\rcarriage return\\reverse solidus"));
        -
        -
        -        $model2->add($statement1);
        -        $model2->add($statement2);
        -        $model2->add($statement3);
        -        $model2->add($statement4);
        -		$model2->add($statement5);
        -		$model2->add($statement7);
        -		
        -		$this->assertTrue($model->containsAll($model2));
        -		
        -		$model2->remove($statement5);
        -		$model2->add($statement6);
        -		
        -		$this->assertFalse($model->containsAll($model2));
        -
        -#echo "
        ";
        -#print_r($model2);
        -#echo "
        "; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonSerializer_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonSerializer_test.php.svn-base deleted file mode 100755 index d1619904..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/jsonSerializer_test.php.svn-base +++ /dev/null @@ -1,62 +0,0 @@ - - * - * @package unittests - * @access public - */ -class testJsonSerializer extends UnitTestCase { - - var $model; - - function testJsonSerializer() { - - $this->model = new MemModel(); - - $res1 = new Resource('http://example.com/res1'); - $res2 = new Resource('http://example.com/res2'); - $res3 = new Resource('http://example.com/res3'); - - $bn1 = new BlankNode('test1'); - $bn2 = new BlankNode('test2'); - - $literal1 = new Literal('test literal'); - $literal2 = new Literal('test literal', 'en'); - $literal3 = new Literal('test literal', null, 'http://www.w3.org/2001/XMLSchema#string'); - - // test literals with tabs and newlines and double quotes - $literal4 = new Literal("test literal\ttab\nnewline\"double quote\rcarriage return\fformfeed\bbackspace\\reverse solidus", null, 'http://www.w3.org/2001/XMLSchema#string'); - - $stm1 = new Statement($res1, $res2, $res3); - $stm2 = new Statement($res1, $res2, $bn1); - $stm3 = new Statement($res1, $res2, $literal1); - $stm4 = new Statement($res1, $res2, $literal2); - $stm5 = new Statement($res1, $res2, $literal3); - $stm6 = new Statement($bn1, $res2, $bn2); - $stm7 = new Statement($res2, $res1, $literal4); - - $this->model->add($stm1); - $this->model->add($stm2); - $this->model->add($stm3); - $this->model->add($stm4); - $this->model->add($stm5); - $this->model->add($stm6); - $this->model->add($stm7); - } - - function testSerialize() { - - $ser = new JsonSerializer(); - - $jsonString = $ser->serialize($this->model); - $memModel = new MemModel(); - $memModel->loadFromString($jsonString, 'json'); - - $this->assertTrue($this->model->equals($memModel)); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Parser_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Parser_test.php.svn-base deleted file mode 100755 index 647e08c5..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Parser_test.php.svn-base +++ /dev/null @@ -1,306 +0,0 @@ - - * @author Christian Weiske UnitTestCase(); - - $_SESSION['n3TestInput']=' - @prefix p: . - @prefix m: . - - - p:GivenName "Fred"; - p:hasEmail ; - m:attending . - - - m:homePage . - '; - - - } - - - - function testIsMemmodel() - { - // Import Package - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - $this->assertIsA($model, 'memmodel'); - } - - - - function testParsing() - { - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - - - $model2 = new MemModel(); - - // Ceate new statements and add them to the model - $statement1 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#hasEmail"), - new Resource("mailto:fred@example.com")); - $statement2 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/meeting_organization#attending"), - new Resource("http://meetings.example.com/cal#m1")); - $statement3 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#GivenName"), - new Literal("Fred")); - $statement4 = new Statement(new Resource("http://meetings.example.com/cal#m1"), - new Resource("http://www.example.org/meeting_organization#homePage"), - new Resource("http://meetings.example.com/m1/hp")); - - - $model2->add($statement1); - $model2->add($statement2); - $model2->add($statement3); - $model2->add($statement4); - - - $this->assertTrue($model->containsAll($model2)); - } - - - - /** - * Test different string quotation methods - */ - function testQuotes() - { - $n3 = << . - -# This file uses UNIX line end conventions. - -:x1 :p1 'x' . -:x2 :p2 '''x -y''' . - -:x3 :p3 """x -y"""^^:someType . - - -EOT; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#x1"), - new Resource("http://example.org/#p1"), - new Literal('x') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#x2"), - new Resource("http://example.org/#p2"), - new Literal("x\ny") - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#x3"), - new Resource("http://example.org/#p3"), - new Literal("x\ny", null, 'http://example.org/#someType') - ) - ); - - //var_dump($model->triples, $model2->triples); - $this->assertEqual(3, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testQuotes() - - - - function testPrefixNotDeclared() - { - $rdfInput=' - @prefix m: . - - - p:GivenName "Fred"; - p:hasEmail ; - m:attending . - '; - - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($rdfInput,false); - //var_dump($model); - $this->assertErrorPattern('[Prefix not declared: p:]'); - } - - - - function testLoneSemicolon() - { - $n3 = '
        ; .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - $this->assertEqual(1, $model->size()); - $this->assertNoErrors(); - } - - - - function testTightClosingList() - { - $n3 = '@prefix : . - @prefix mf: . - <> mf:entries ( mf:syn-09) .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - //if bug occured, the parser would be in an endless loop - } - - - - /** - * Check number parsing - * @see http://www.w3.org/2000/10/swap/grammar/n3-report.html#node - */ - function testNumbers() - { - $n3 = '@prefix : . - :foo :bar 0.7 . - :foo :bar 42 . - :foo :bar 10e6 . - - :foo :bar -0.7 . - :foo :bar -42 . - :foo :bar -12E-6 . - '; - $parser = &new N3Parser(); - - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(0.7, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(42, null, XML_SCHEMA . 'integer') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(10e6, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-0.7, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-42, null, XML_SCHEMA . 'integer') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-12E-6, null, XML_SCHEMA . 'double') - ) - ); - - $this->assertEqual(6, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testNumbers() - - - - function testBooleans() - { - $n3 = '@prefix : . - :foo :bar @true . - :foo :bar @false . - '; - $parser = &new N3Parser(); - //$parser->debug = true; - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(true, null, XML_SCHEMA . 'boolean') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(false, null, XML_SCHEMA . 'boolean') - ) - ); - - //var_dump($model->triples); - $this->assertEqual(2, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testBooleans() - - - - function testA() - { - $n3 = '@prefix : . - :foo a :bar . - '; - $parser = &new N3Parser(); - //$parser->debug = true; - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - new Resource("http://example.org/#bar") - ) - ); - - //var_dump($model->triples); - $this->assertEqual(1, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testA() -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Serializer_test.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Serializer_test.php.svn-base deleted file mode 100755 index c3f8af91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/n3Serializer_test.php.svn-base +++ /dev/null @@ -1,450 +0,0 @@ - - * - * @package unittests - */ -class testN3SerializerTests extends UnitTestCase -{ - function testSimple() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '@prefix') !== false); - $this->assertTrue(strpos($str, ':foo') > 0); - $this->assertTrue(strpos($str, ':bar') > 0); - $this->assertTrue(strpos($str, 'fred@example.com') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - }//function testSimple() - - - - function testStringsSimple() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal('testliteral') - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test''literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\"\"literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\nliteral") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\"\nliteral") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\nliteral") - )); - - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, 'testliteral') > 0); - $this->assertTrue(strpos($str, "test''literal") > 0); - $this->assertTrue(strpos($str, 'test""literal') > 0); - $this->assertTrue(strpos($str, "test\nliteral") > 0); - $this->assertTrue(strpos($str, "'''test\"\nliteral'''") > 0); - $this->assertTrue(strpos($str, '"""test\'' . "\n" . 'literal"""') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - function testStringsAdvanced() - { - $mod = new MemModel(); - //up to now, we didn't trick the serializer - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\"literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\"\nliteral") - )); - - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, 'test\\\'\\"literal') > 0); - $this->assertTrue(strpos($str, 'test\\\'\\"' . "\n" . 'literal') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testNoNSPrefix() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $ser->addNoNSPrefix('mailto:'); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '@prefix') !== false); - $this->assertTrue(strpos($str, ':foo') > 0); - $this->assertTrue(strpos($str, ':bar') > 0); - $this->assertTrue(strpos($str, '') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testNoNSPrefix2() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $ser->addNoNSPrefix('http://example.org/'); - $ser->addNoNSPrefix('mailto:'); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '@prefix') === false); - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testCompressOneBlank() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar1"), - new Literal('baz') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - //var_dump($str);//, $mod2->triples); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testCompressTwoBlanks() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $b2 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar1"), - new Literal('baz1') - )); - $mod->add(new Statement( - $b2, - new Resource("http://example.org/bar2"), - new Literal('baz2') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testCompressBlankAtEnd() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestSimple() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - $mod->add(new Statement( - $b3, - new Resource("http://example.org/bar2"), - new Literal('hohoho') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestSimpleBlankStart() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar2"), - $b3 - )); - $mod->add(new Statement( - $b3, - new Resource("http://example.org/bar2"), - new Literal('hohoho') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str);//, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestDeeply() - { - $mod = new MemModel(); - $b100 = new BlankNode($mod); - $b110 = new BlankNode($mod); - $b120 = new BlankNode($mod); - $b111 = new BlankNode($mod); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - $b100 - )); - $mod->add(new Statement( - $b100, - new Resource("http://example.org/bar2"), - $b110 - )); - $mod->add(new Statement( - $b110, - new Resource("http://example.org/bar4"), - $b111 - )); - $mod->add(new Statement( - $b100, - new Resource("http://example.org/bar3"), - $b120 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestBlankAtEnd() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - - - - - - - function compareModelsIgnoringBlankNodes($mod1, $mod2) - { - $this->assertEqual($mod1->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - - foreach ($mod1->triples as &$triple) { - $s = $p = $o = null; - if (!$triple->subj instanceof BlankNode) { - $s = $triple->subj; - } - if (!$triple->pred instanceof BlankNode) { - $p = $triple->pred; - } - if (!$triple->obj instanceof BlankNode) { - $o = $triple->obj; - } - $res = $mod2->find($s, $p, $o); - $this->assertTrue($res->size() > 0); - } - - foreach ($mod2->triples as &$triple) { - $s = $p = $o = null; - if (!$triple->subj instanceof BlankNode) { - $s = $triple->subj; - } - if (!$triple->pred instanceof BlankNode) { - $p = $triple->pred; - } - if (!$triple->obj instanceof BlankNode) { - $o = $triple->obj; - } - $res = $mod1->find($s, $p, $o); - $this->assertTrue($res->size() > 0); - } - }//function compareModelsIgnoringBlankNodes($mod1, $mod2) - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Parser_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Parser_tests.php.svn-base deleted file mode 100755 index 23631dbf..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Parser_tests.php.svn-base +++ /dev/null @@ -1,38 +0,0 @@ - - * - * @package unittests - * @access public - */ - - class rdfParser_test extends UnitTestCase { - - function testRdfParser(){ - $_SESSION['test']='Rdf- Parser Empty Resource test'; - $mod1= new MemModel(); - $mod2= new MemModel(); - - $mod1->load('emptyResource.rdf'); - $mod2->load('emptyResource_serialized.rdf'); - - if($mod1->equals($mod2)){ - $pass=true; - }else{ - $pass=false; - }; - $this->assertTrue($pass); - } - - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Serializer_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Serializer_tests.php.svn-base deleted file mode 100755 index ead4c82c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/.svn/text-base/rdf_Serializer_tests.php.svn-base +++ /dev/null @@ -1,45 +0,0 @@ - - * - * @package unittests - * @access public - */ - - class rdfSerializer_test extends UnitTestCase { - - function testRdfSerializer(){ - $_SESSION['test']='Rdf- Parser Empty Resource test'; - $mod1= new MemModel(); - $mod2= new MemModel(); - $mod3=new MemModel(); - - $mod1->load('multipleTypes.rdf'); - $mod1->saveAs('mt1.rdf','rdf'); - - $mod3->load('mt1.rdf'); - $mod2->load('multipleTypes.rdf'); - - $_SESSION['mod1']=$mod3; - $_SESSIOn['mod2']=$mod2; - - if($mod3->equals($mod2)){ - $pass=true; - }else{ - $pass=false; - }; - $this->assertTrue($pass); - - } - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonParser_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonParser_test.php deleted file mode 100755 index f78d6527..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonParser_test.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * @package unittests - * @access public - */ - -class testJsonParser extends UnitTestCase -{ - var $modelString; - - function testJsonParser() { - $this->UnitTestCase(); - - GLOBAL $short_datatype; - - $this->modelString = '{"http://example.org/about":{"http://purl.org/dc/elements/1.1/creator":[{"value":"Anna Wilder","type":"literal"}],"http://purl.org/dc/elements/1.1/title":[{"value":"Annas Homepage","type":"literal","lang":"en"}],"http://xmlns.com/foaf/0.1/maker":[{"value":"_:person","type":"bnode"}],"http://purl.org/dc/elements/1.1/title2":[{"value":"Anns HP","type":"literal","lang":"en","datatype":"' . $short_datatype['STRING'] . '"}]},"_:person":{"http://xmlns.com/foaf/0.1/homepage":[{"value":"http://example.org/about","type":"uri"}],"http://example.com/testProp1":[{"value":"\\"double quote\\nnewline\\ttab\\rcarriage return\\\\reverse solidus"}]}}'; - } - - function testGenerateModelFromString() { - - $parser = new JsonParser(); - $model = new MemModel('http://example.com/'); - - try { - $parser->generateModelFromString($this->modelString, $model); - } catch (Exception $e) { - $this->fail($e->getMessage()); - } - - #echo "
        ";
        -		#print_r($model);
        -		
        -		GLOBAL $short_datatype;
        -		$model2 = new MemModel('http://example.com/');
        -
        -        // Ceate new statements and add them to the model
        -        $statement1 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource('http://purl.org/dc/elements/1.1/creator'),
        -                                    new Literal('Anna Wilder'));
        -
        -        $statement2 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource("http://purl.org/dc/elements/1.1/title"),
        -                                    new Literal('Annas Homepage', 'en'));
        -
        -        $statement3 = new Statement(new Resource('http://example.org/about'),
        -                                    new Resource('http://xmlns.com/foaf/0.1/maker'),
        -                                    new BlankNode('person'));
        -
        -        $statement4 = new Statement(new BlankNode('person'),
        -                                    new Resource("http://xmlns.com/foaf/0.1/homepage"),
        -                                    new Resource('http://example.org/about'));
        -
        -		$statement5 = new Statement(new Resource('http://example.org/about'),
        -		                            new Resource("http://purl.org/dc/elements/1.1/title2"),
        -		                            new Literal('Anns HP', 'en', $short_datatype['STRING']));
        -		
        -		$statement6 = new Statement(new Resource('http://example.org/about'),
        -		              				new Resource("http://purl.org/dc/elements/1.1/title2"),
        -		              				new Literal('Anns HP', 'en', $short_datatype['INTEGER']));
        -		
        -		$statement7= new Statement(new BlankNode('person'),
        -					 new Resource("http://example.com/testProp1"),
        -					 new Literal("\"double quote\nnewline\ttab\rcarriage return\\reverse solidus"));
        -
        -
        -        $model2->add($statement1);
        -        $model2->add($statement2);
        -        $model2->add($statement3);
        -        $model2->add($statement4);
        -		$model2->add($statement5);
        -		$model2->add($statement7);
        -		
        -		$this->assertTrue($model->containsAll($model2));
        -		
        -		$model2->remove($statement5);
        -		$model2->add($statement6);
        -		
        -		$this->assertFalse($model->containsAll($model2));
        -
        -#echo "
        ";
        -#print_r($model2);
        -#echo "
        "; - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonSerializer_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonSerializer_test.php deleted file mode 100755 index d1619904..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/jsonSerializer_test.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * @package unittests - * @access public - */ -class testJsonSerializer extends UnitTestCase { - - var $model; - - function testJsonSerializer() { - - $this->model = new MemModel(); - - $res1 = new Resource('http://example.com/res1'); - $res2 = new Resource('http://example.com/res2'); - $res3 = new Resource('http://example.com/res3'); - - $bn1 = new BlankNode('test1'); - $bn2 = new BlankNode('test2'); - - $literal1 = new Literal('test literal'); - $literal2 = new Literal('test literal', 'en'); - $literal3 = new Literal('test literal', null, 'http://www.w3.org/2001/XMLSchema#string'); - - // test literals with tabs and newlines and double quotes - $literal4 = new Literal("test literal\ttab\nnewline\"double quote\rcarriage return\fformfeed\bbackspace\\reverse solidus", null, 'http://www.w3.org/2001/XMLSchema#string'); - - $stm1 = new Statement($res1, $res2, $res3); - $stm2 = new Statement($res1, $res2, $bn1); - $stm3 = new Statement($res1, $res2, $literal1); - $stm4 = new Statement($res1, $res2, $literal2); - $stm5 = new Statement($res1, $res2, $literal3); - $stm6 = new Statement($bn1, $res2, $bn2); - $stm7 = new Statement($res2, $res1, $literal4); - - $this->model->add($stm1); - $this->model->add($stm2); - $this->model->add($stm3); - $this->model->add($stm4); - $this->model->add($stm5); - $this->model->add($stm6); - $this->model->add($stm7); - } - - function testSerialize() { - - $ser = new JsonSerializer(); - - $jsonString = $ser->serialize($this->model); - $memModel = new MemModel(); - $memModel->loadFromString($jsonString, 'json'); - - $this->assertTrue($this->model->equals($memModel)); - } -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Parser_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Parser_test.php deleted file mode 100755 index ffc7e616..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Parser_test.php +++ /dev/null @@ -1,306 +0,0 @@ - - * @author Christian Weiske UnitTestCase(); - - $_SESSION['n3TestInput']=' - @prefix p: . - @prefix m: . - - - p:GivenName "Fred"; - p:hasEmail ; - m:attending . - - - m:homePage . - '; - - - } - - - - function testIsMemmodel() - { - // Import Package - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - $this->assertIsA($model, 'memmodel'); - } - - - - function testParsing() - { - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - - - $model2 = new MemModel(); - - // Ceate new statements and add them to the model - $statement1 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#hasEmail"), - new Resource("mailto:fred@example.com")); - $statement2 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/meeting_organization#attending"), - new Resource("http://meetings.example.com/cal#m1")); - $statement3 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#GivenName"), - new Literal("Fred")); - $statement4 = new Statement(new Resource("http://meetings.example.com/cal#m1"), - new Resource("http://www.example.org/meeting_organization#homePage"), - new Resource("http://meetings.example.com/m1/hp")); - - - $model2->add($statement1); - $model2->add($statement2); - $model2->add($statement3); - $model2->add($statement4); - - - $this->assertTrue($model->containsAll($model2)); - } - - - - /** - * Test different string quotation methods - */ - function testQuotes() - { - $n3 = << . - -# This file uses UNIX line end conventions. - -:x1 :p1 'x' . -:x2 :p2 '''x -y''' . - -:x3 :p3 """x -y"""^^:someType . - - -EOT; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#x1"), - new Resource("http://example.org/#p1"), - new Literal('x') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#x2"), - new Resource("http://example.org/#p2"), - new Literal("x\ny") - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#x3"), - new Resource("http://example.org/#p3"), - new Literal("x\ny", null, 'http://example.org/#someType') - ) - ); - - //var_dump($model->triples, $model2->triples); - $this->assertEqual(3, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testQuotes() - - - - function testPrefixNotDeclared() - { - $rdfInput=' - @prefix m: . - - - p:GivenName "Fred"; - p:hasEmail ; - m:attending . - '; - - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($rdfInput,false); - //var_dump($model); - $this->assertErrorPattern('[Prefix not declared: p:]'); - } - - - - function testLoneSemicolon() - { - $n3 = '
        ; .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - $this->assertEqual(1, $model->size()); - $this->assertNoErrors(); - } - - - - function testTightClosingList() - { - $n3 = '@prefix : . - @prefix mf: . - <> mf:entries ( mf:syn-09) .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - //if bug occured, the parser would be in an endless loop - } - - - - /** - * Check number parsing - * @see http://www.w3.org/2000/10/swap/grammar/n3-report.html#node - */ - function testNumbers() - { - $n3 = '@prefix : . - :foo :bar 0.7 . - :foo :bar 42 . - :foo :bar 10e6 . - - :foo :bar -0.7 . - :foo :bar -42 . - :foo :bar -12E-6 . - '; - $parser = &new N3Parser(); - - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(0.7, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(42, null, XML_SCHEMA . 'integer') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(10e6, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-0.7, null, XML_SCHEMA . 'double') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-42, null, XML_SCHEMA . 'integer') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(-12E-6, null, XML_SCHEMA . 'double') - ) - ); - - $this->assertEqual(6, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testNumbers() - - - - function testBooleans() - { - $n3 = '@prefix : . - :foo :bar @true . - :foo :bar @false . - '; - $parser = &new N3Parser(); - //$parser->debug = true; - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(true, null, XML_SCHEMA . 'boolean') - ) - ); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://example.org/#bar"), - new Literal(false, null, XML_SCHEMA . 'boolean') - ) - ); - - //var_dump($model->triples); - $this->assertEqual(2, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testBooleans() - - - - function testA() - { - $n3 = '@prefix : . - :foo a :bar . - '; - $parser = &new N3Parser(); - //$parser->debug = true; - $model = &$parser->parse2model($n3, false); - - $model2 = new MemModel(); - $model2->add( - new Statement( - new Resource("http://example.org/#foo"), - new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), - new Resource("http://example.org/#bar") - ) - ); - - //var_dump($model->triples); - $this->assertEqual(1, $model->size()); - $this->assertTrue($model->containsAll($model2)); - }//function testA() -} -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Serializer_test.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Serializer_test.php deleted file mode 100755 index c3f8af91..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/n3Serializer_test.php +++ /dev/null @@ -1,450 +0,0 @@ - - * - * @package unittests - */ -class testN3SerializerTests extends UnitTestCase -{ - function testSimple() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '@prefix') !== false); - $this->assertTrue(strpos($str, ':foo') > 0); - $this->assertTrue(strpos($str, ':bar') > 0); - $this->assertTrue(strpos($str, 'fred@example.com') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - }//function testSimple() - - - - function testStringsSimple() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal('testliteral') - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test''literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\"\"literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\nliteral") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test\"\nliteral") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\nliteral") - )); - - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, 'testliteral') > 0); - $this->assertTrue(strpos($str, "test''literal") > 0); - $this->assertTrue(strpos($str, 'test""literal') > 0); - $this->assertTrue(strpos($str, "test\nliteral") > 0); - $this->assertTrue(strpos($str, "'''test\"\nliteral'''") > 0); - $this->assertTrue(strpos($str, '"""test\'' . "\n" . 'literal"""') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - function testStringsAdvanced() - { - $mod = new MemModel(); - //up to now, we didn't trick the serializer - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\"literal") - )); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Literal("test'\"\nliteral") - )); - - - $ser = new N3Serializer(); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, 'test\\\'\\"literal') > 0); - $this->assertTrue(strpos($str, 'test\\\'\\"' . "\n" . 'literal') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testNoNSPrefix() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $ser->addNoNSPrefix('mailto:'); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '@prefix') !== false); - $this->assertTrue(strpos($str, ':foo') > 0); - $this->assertTrue(strpos($str, ':bar') > 0); - $this->assertTrue(strpos($str, '') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testNoNSPrefix2() - { - $mod = new MemModel(); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - new Resource("mailto:fred@example.com") - )); - - $ser = new N3Serializer(); - $ser->addNoNSPrefix('http://example.org/'); - $ser->addNoNSPrefix('mailto:'); - $str = $ser->serialize($mod); - - $this->assertTrue(strpos($str, '@prefix') === false); - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '') > 0); - $this->assertTrue(strpos($str, '') > 0); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->assertTrue($mod->containsAll($mod2), 'Original model should contain all triples of loaded model'); - $this->assertTrue($mod2->containsAll($mod), 'Loaded model should contain all triples of original model'); - } - - - - function testCompressOneBlank() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar1"), - new Literal('baz') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - //var_dump($str);//, $mod2->triples); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - - $this->assertEqual($mod->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testCompressTwoBlanks() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $b2 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar1"), - new Literal('baz1') - )); - $mod->add(new Statement( - $b2, - new Resource("http://example.org/bar2"), - new Literal('baz2') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testCompressBlankAtEnd() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestSimple() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - $mod->add(new Statement( - $b3, - new Resource("http://example.org/bar2"), - new Literal('hohoho') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestSimpleBlankStart() - { - $mod = new MemModel(); - $b1 = new BlankNode($mod); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - $b1, - new Resource("http://example.org/bar2"), - $b3 - )); - $mod->add(new Statement( - $b3, - new Resource("http://example.org/bar2"), - new Literal('hohoho') - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str);//, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestDeeply() - { - $mod = new MemModel(); - $b100 = new BlankNode($mod); - $b110 = new BlankNode($mod); - $b120 = new BlankNode($mod); - $b111 = new BlankNode($mod); - $mod->add(new Statement( - new Resource("http://example.org/foo"), - new Resource("http://example.org/bar"), - $b100 - )); - $mod->add(new Statement( - $b100, - new Resource("http://example.org/bar2"), - $b110 - )); - $mod->add(new Statement( - $b110, - new Resource("http://example.org/bar4"), - $b111 - )); - $mod->add(new Statement( - $b100, - new Resource("http://example.org/bar3"), - $b120 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - function testNestBlankAtEnd() - { - $mod = new MemModel(); - $b3 = new BlankNode($mod); - $mod->add(new Statement( - new Resource('http://example.org/foo'), - new Resource("http://example.org/bar2"), - $b3 - )); - - $ser = new N3Serializer(); - $ser->setCompress(true); - $ser->setNest(true); - $str = $ser->serialize($mod); - - //test if it can be loaded - $par = new N3Parser(); - $mod2 = $par->parse2model($str, false); - //var_dump($str, $mod2->triples); - - $this->compareModelsIgnoringBlankNodes($mod, $mod2); - } - - - - - - - - - - function compareModelsIgnoringBlankNodes($mod1, $mod2) - { - $this->assertEqual($mod1->size(), $mod2->size(), 'Original model size and loaded model size should equal'); - - foreach ($mod1->triples as &$triple) { - $s = $p = $o = null; - if (!$triple->subj instanceof BlankNode) { - $s = $triple->subj; - } - if (!$triple->pred instanceof BlankNode) { - $p = $triple->pred; - } - if (!$triple->obj instanceof BlankNode) { - $o = $triple->obj; - } - $res = $mod2->find($s, $p, $o); - $this->assertTrue($res->size() > 0); - } - - foreach ($mod2->triples as &$triple) { - $s = $p = $o = null; - if (!$triple->subj instanceof BlankNode) { - $s = $triple->subj; - } - if (!$triple->pred instanceof BlankNode) { - $p = $triple->pred; - } - if (!$triple->obj instanceof BlankNode) { - $o = $triple->obj; - } - $res = $mod1->find($s, $p, $o); - $this->assertTrue($res->size() > 0); - } - }//function compareModelsIgnoringBlankNodes($mod1, $mod2) - -} -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Parser_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Parser_tests.php deleted file mode 100755 index c5ee69a9..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Parser_tests.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * @package unittests - * @access public - */ - - class rdfParser_test extends UnitTestCase { - - function testRdfParser(){ - $_SESSION['test']='Rdf- Parser Empty Resource test'; - $mod1= new MemModel(); - $mod2= new MemModel(); - - $mod1->load('emptyResource.rdf'); - $mod2->load('emptyResource_serialized.rdf'); - - if($mod1->equals($mod2)){ - $pass=true; - }else{ - $pass=false; - }; - $this->assertTrue($pass); - } - - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Serializer_tests.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Serializer_tests.php deleted file mode 100755 index ddedb347..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Syntax/rdf_Serializer_tests.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * @package unittests - * @access public - */ - - class rdfSerializer_test extends UnitTestCase { - - function testRdfSerializer(){ - $_SESSION['test']='Rdf- Parser Empty Resource test'; - $mod1= new MemModel(); - $mod2= new MemModel(); - $mod3=new MemModel(); - - $mod1->load('multipleTypes.rdf'); - $mod1->saveAs('mt1.rdf','rdf'); - - $mod3->load('mt1.rdf'); - $mod2->load('multipleTypes.rdf'); - - $_SESSION['mod1']=$mod3; - $_SESSIOn['mod2']=$mod2; - - if($mod3->equals($mod2)){ - $pass=true; - }else{ - $pass=false; - }; - $this->assertTrue($pass); - - } - - - } -?> \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/all-wcprops b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/all-wcprops deleted file mode 100755 index 44675372..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 70 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/Vocabulary -END -voc_tests.php -K 25 -svn:wc:ra_dav:version-url -V 84 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/Vocabulary/voc_tests.php -END -vocs.dat -K 25 -svn:wc:ra_dav:version-url -V 79 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/Vocabulary/vocs.dat -END -fks.dat -K 25 -svn:wc:ra_dav:version-url -V 78 -/svnroot/rdfapi-php/!svn/ver/240/trunk/rdfapi-php/test/unit/Vocabulary/fks.dat -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/entries b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/entries deleted file mode 100755 index 8e006559..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/entries +++ /dev/null @@ -1,67 +0,0 @@ -8 - -dir -556 -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php/trunk/rdfapi-php/test/unit/Vocabulary -https://rdfapi-php.svn.sourceforge.net/svnroot/rdfapi-php - - - -2005-07-07T18:03:06.000000Z -240 -tgauss - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b2ee660e-c932-0410-bdee-d8da4d8102f4 - -voc_tests.php -file - - - - -2008-02-29T14:57:25.731140Z -b600d37dd62788f32bec085263e1e914 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -vocs.dat -file - - - - -2008-02-29T14:57:25.731140Z -76d13239f78f89d7d3f82aae02d16e83 -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - -fks.dat -file - - - - -2008-02-29T14:57:25.746761Z -34c2c548af3c11b3a3281c9e7f45121b -2005-07-07T18:03:06.000000Z -240 -tgauss -has-props - diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/format b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/format deleted file mode 100755 index 45a4fb75..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/fks.dat.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/fks.dat.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/fks.dat.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/voc_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/voc_tests.php.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/voc_tests.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/vocs.dat.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/vocs.dat.svn-base deleted file mode 100755 index 7b57b302..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/prop-base/vocs.dat.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 13 -svn:eol-style -V 6 -native -K 12 -svn:keywords -V 23 -Author Date Id Revision -END diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/fks.dat.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/fks.dat.svn-base deleted file mode 100755 index 91726eed..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/fks.dat.svn-base +++ /dev/null @@ -1,238 +0,0 @@ -TYPE -MODE -NAME -URL -EMAIL -REL -HREF -TITLE -ATOM_CONSTRUCT -CONTENT -PERSON -VALUE -LINK -FEED -VERSION -LANG -AUTHOR -CONTRIBUTOR -TAGLINE -GENERATOR -COPYRIGHT -INFO -MODIFIED -ENTRY -HAS_CHILD -HAS_ENTRY -HAS_LINK -HAS_TITLE -ISSUED -CREATED -SUMMARY -AGENT -DOCUMENT -GROUP -IMAGE -ONLINE_ACCOUNT -ONLINE_CHAT_ACCOUNT -ONLINE_ECOMMERCE_ACCOUNT -ONLINE_GAMING_ACCOUNT -ORGANIZATION -PERSON -PERSONAL_PROFILE_DOCUMENT -PROJECT -ACCOUNT_NAME -ACCOUNT_SERVICE_HOMEPAGE -AIM_CHAT_ID -BASED_NEAR -CURRENT_PROJECT -DEPICTION -DEPICTS -DNA_CHECKSUM -FAMILY_NAME -FIRST_NAME -FUNDED_BY -GEEKCODE -GENDER -GIVENNAME -HOLDS_ACCOUNT -HOMEPAGE -ICQ_CHAT_ID -JABBER_ID -KNOWS -LOGO -MADE -MAKER -MBOX -MBOX_SHA1SUM -MEMBER -MEMBERSHIP_CLASS -MSN_CHAT_ID -MYERS_BRIGGS -NAME -NICK -PAGE -PAST_PROJECT -PHONE -PLAN -PRIMARY_TOPIC -PUBLICATIONS -SCHOOL_HOMEPAGE -SHA1 -SURNAME -THEME -THUMBNAIL -TIPJAR -TITLE -TOPIC -TOPIC_INTEREST -WEBLOG -WORK_INFO_HOMEPAGE -WORKPLACE_HOMEPAGE -YAHOO_CHAT_ID -ANNOTATION_PROPERTY -ALL_DIFFERENT -ALL_VALUES_FROM -BACKWARD_COMPATIBLE_WITH -CARDINALITY -OWL_CLASS -COMPLEMENT_OF -DATATYPE -DATATYPE_PROPERTY -DATA_RANGE -DATATYPE_RESTRICTION -DEPRECATED_CLASS -DEPRECATED_PROPERTY -DISTINCT_MEMBERS -DIFFERENT_FROM -DISJOINT_WITH -EQUIVALENT_CLASS -EQUIVALENT_PROPERTY -FUNCTIONAL_PROPERTY -HAS_VALUE -INCOMPATIBLE_WITH -IMPORTS -INTERSECTION_OF -INVERSE_FUNCTIONAL_PROPERTY -INVERSE_OF -MAX_CARDINALITY -MIN_CARDINALITY -NOTHING -OBJECT_CLASS -OBJECT_PROPERTY -OBJECT_RESTRICTION -ONE_OF -ON_PROPERTY -ONTOLOGY -PRIOR_VERSION -PROPERTY -RESTRICTION -SAME_AS -SAME_CLASS_AS -SAME_INDIVIDUAL_AS -SAME_PROPERTY_AS -SOME_VALUES_FROM -SYMMETRIC_PROPERTY -THING -TRANSITIVE_PROPERTY -UNION_OF -VERSION_INFO -ALT -BAG -PROPERTY -SEQ -STATEMENT -RDF_LIST -NIL -TYPE -REST -FIRST -SUBJECT -PREDICATE -OBJECT -DESCRIPTION -ID -ABOUT -ABOUT_EACH -ABOUT_EACH_PREFIX -BAG_ID -RESOURCE -PARSE_TYPE -LITERAL -PARSE_TYPE_RESOURCE -LI -NODE_ID -DATATYPE -SEE_ALSO -RESOURCE -LITERAL -RDFS_CLASS -DATATYPE -CONTAINER -CONTAINER_MEMBERSHIP_PROPERTY -SUB_CLASS_OF -SUB_PROPERTY_OF -DOMAIN -RANGE -LABEL -COMMENT -MEMBER -SEEALSO -IS_DEFINED_BY -CHANNEL -IMAGE -ITEM -TEXTINPUT -ITEMS -TITLE -LINK -URL -DESCRIPTION -NAME -UID -ORGPROPERTIES -ADRTYPES -NPROPERTIES -EMAILTYPES -TELTYPES -ADRPROPERTIES -TZTYPES -STREET -AGENT -SOURCE -BDAY -REV -SORT_STRING -ORGNAME -CATEGORIES -N -PCODE -PREFIX -PHOTO -FN -SUFFIX -VCARD_CLASS -ADR -REGION -GEO -EXTADD -GROUP -EMAIL -FAMILY -TZ -NAME -ORGUNIT -COUNTRY -SOUND -TITLE -MAILER -OTHER -LOCALITY -POBOX -KEY -PRODID -GIVEN -LABEL -TEL -NICKNAME -ROLE \ No newline at end of file diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/voc_tests.php.svn-base b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/voc_tests.php.svn-base deleted file mode 100755 index ed5fa5d3..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/test/unit/Vocabulary/.svn/text-base/voc_tests.php.svn-base +++ /dev/null @@ -1,112 +0,0 @@ -
        History:
  • Literal datytype- and xmlLanguageTag support - * - * Un-supported N3 Features include: - *
      - *
    • Reification using { }
    • - *
    • . and ^ operators for tree traversal
    • - *
    • Any log operators, like log:forAll etc.
    • - *
    - * - * This parser is based on n3.py from Epp released 2nd March, 2002. - * by Sean B. Palmer - * ( http://infomesh.net/2002/eep/20020302-013802/n3.py ) - * - * This parser is released under the GNU GPL license. - * ( http://www.gnu.org/licenses/gpl.txt ) - * - * - * - * @author Sean B. Palmer - * @author Gunnar AA. Grimnes - * @author Daniel Westphal - * @version $Id: N3Parser.php 517 2007-08-13 16:14:17Z cweiske $ - * @license GPL http://www.gnu.org/licenses/gpl.txt - * @package syntax - * @access public - **/ - -class N3Parser extends Object { - - - /* ==================== Variables ==================== */ - - var $Tokens; - var $bNode; - var $RDF_NS, $DAML_NS, $OWL_NS; - var $debug; - var $parseError; - var $parsedNamespaces = array(); - - /* ==================== Public Methods ==================== */ - - /** - * Constructor - * @access public - **/ - function N3Parser() { - //Regular expressions: - $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*'; - $URI = '<[^> ]*>'; - $bNode = '_:'.$Name; - $Univar = '\?'.$Name; - $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; - $Literal = '(?:' - . '"(\\\"|[^"])*"' - . '|' - . "'(\\\'|[^'])*'" - . ')'; - # '"(?:\\"|[^"])*"' - $Number = '[-+]?[0-9]+(\\.[0-9]+)?([eE][-+]?[0-9]+)?'; - $Boolean = '@(?:true|false)'; -// $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' - $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; - $Datatype = '(\^\^)[^ ,\.;)]+'; - $Datatype_URI = '(\^\^)'.$URI; - // $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""'; - $LLiteral = '(?:' - . '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""' - . '|' - . "'''[^'\\\\]*(?:(?:\\\\.|'(?!''))[^\"\\\\]*)*'''" - . ')'; - // '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' - $Comment = '#.*$'; - $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; - $PrefixDecl = '@prefix'; - $WS = '[ \t]'; - $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword - $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'; # for '=' keyword - $this->OWL_NS = 'http://www.w3.org/2002/07/owl#'; - - // $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, - // $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment); - $t = array( - $Datatype_URI, $Datatype, $LLiteral, $URI, $Literal, - $PrefixDecl, $QName, $Number, $Boolean, $bNode, - $Prefix, $Univar, 'a','=', - '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', - $WS, $Comment,$LangTag - ); - $this->Tokens = "/(".join($t,"|").")/m"; - - $this->bNode = 0; - $this->debug = 0; - $this->bNodeMap = array(); - $this->FixBnodes = FIX_BLANKNODES; - $this->parseError =false; - } - - - /** - * Sets, if BlankNode labels should be replaced by the generic label from the constants.php file - * default is "false" -> the used label in n3 is parsed to the model - * @param boolean - * @access public - **/ - function setFixBnodes($set) { - - if (($set===true) OR ($set===false)) $this->FixBnodes = $set; - } - - - /** - * This parses a N3 string and prints out the triples - * @param string $s - * @access public - **/ - function parse($s) { - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - foreach ( $stat as $t) { - - if (count($t)>3) { - $object=$t[2]; - - for ($i = 3; $i < 5; $i++){ - if ($t[$i][0]=='@')$object.=$t[$i]; - if (substr($t[$i],0,2)=='^^')$object.=$t[$i]; - }; - } else {$object=$t[2];}; - - print '('.$t[0].', '.$t[1].', '.$object.")\n"; - - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - } - - - /** - * This parses a N3 string and calls func($subject, $predicate, $object) with each triple - * @param string $s - * @param string $func - * @access public - **/ - function uparse($s,$func) { - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - foreach ( $stat as $t) { - - if (count($t)>3) { - $object=$t[2]; - - for ($i = 3; $i < 5; $i++){ - if ($t[$i][0]=='@')$object.=$t[$i]; - if (substr($t[$i],0,2)=='^^')$object.=$t[$i]; - }; - } else {$object=$t[2];}; - // print "(".$t[0].", ".$t[1].", ".$t[2].")"; - - $func($t[0],$t[1],$object); - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - } - - - /** - * This parses a N3 string and returns a memmodel - * @param string $s - * @access public - * @return object Model - **/ - - function parse2model($s,$model = false) { - if($model == false){ - $m=new MemModel(); - }else{ - $m=$model; - } - // """Get a string, tokenize, create list, convert to Eep store.""" - $stat=$this->n3tolist($s); - - foreach ( $stat as $t) { - $s=$this->toRDFNode($t[0],$t); - $p=$this->toRDFNode($t[1],$t); - $o=$this->toRDFNode($t[2],$t); - - $new_statement= new Statement($s,$p,$o); - - $m->add($new_statement); - // print "(".$t[0].", ".$t[1].", ".$t[2].")"; - } - // return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])] - // for t in n3tolist(s)] - $m->addParsedNamespaces($this->parsedNamespaces); - return $m; - } - -/** - * Generate a new MemModel from an URI or file. - * - * @access public - * @param $path - * @throws PhpError - * @return object MemModel - */ - function & generateModel($path,$dummy=false,$model=false) { - - $handle = fopen($path,'r') or die("N3 Parser: Could not open File: '$path' - Stopped parsing."); - $done=false; - $input=""; - while(!$done) - { - $input .= fread( $handle, 512 ); - $done = feof($handle); - - }; - - - fclose($handle); - - $m = $this->parse2model($input,$model); - return $m; - } - - - /* ==================== Private Methods from here ==================== */ - - // General list processing functions - -/** - * Returns FALSE if argument is a whitespace character - * @access private - * @param string $s - **/ - function isWS($s) { - return !preg_match('/^(#.*|\s*)$/', $s); - } - - - - /** - * Returns true if the string is not a comment - * @access private - * @param string $s - * @returns boolean - **/ - function notComment($s) { - if ($s=="") return false; - $N3Comment = '^[ \t]*\#'; - - if (ereg($N3Comment,$s)) return false; - else return true; - } - - /** - * Removes all whitespace tokens from list - * @access private - * @param array $list - **/ - function filterWs($list) { - // var_dump($list); - // """Filter whitespace from a list.""" - - return array_filter($list, array($this,"isWS")); - } - -/** -* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH). -* -* @param String $str -* @return String -* @access private -* -*/ -function str2unicode_nfc($str=""){ - $result=""; - /* try to detect encoding */ - $tmp=str_replace("?", "", $str); - if(strpos(utf8_decode($tmp), "?")===false){ - $str=utf8_decode($str); - } - for($i=0,$i_max=strlen($str);$i<$i_max;$i++){ - $nr=0;/* unicode dec nr */ - /* char */ - $char=$str[$i]; - /* utf8 binary */ - $utf8_char=utf8_encode($char); - $bytes=strlen($utf8_char); - if($bytes==1){ - /* 0####### (0-127) */ - $nr=ord($utf8_char); - } - elseif($bytes==2){ - /* 110##### 10###### = 192+x 128+x */ - $nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128); - } - elseif($bytes==3){ - /* 1110#### 10###### 10###### = 224+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128); - } - elseif($bytes==4){ - /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */ - $nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128); - } - /* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */ - if($nr<9){/* #x0-#x8 (0-8) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==9){/* #x9 (9) */ - $result.='\t'; - } - elseif($nr==10){/* #xA (10) */ - $result.='\n'; - } - elseif($nr<13){/* #xB-#xC (11-12) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr==13){/* #xD (13) */ - $result.='\t'; - } - elseif($nr<32){/* #xE-#x1F (14-31) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<34){/* #x20-#x21 (32-33) */ - $result.=$char; - } - elseif($nr==34){/* #x22 (34) */ - $result.='\"'; - } - elseif($nr<92){/* #x23-#x5B (35-91) */ - $result.=$char; - } - elseif($nr==92){/* #x5C (92) */ - $result.='\\'; - } - elseif($nr<127){/* #x5D-#x7E (93-126) */ - $result.=$char; - } - elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */ - $result.="\\u".sprintf("%04X",$nr); - } - elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */ - $result.="\\U".sprintf("%08X",$nr); - } - else{ - /* other chars are not defined => ignore */ - } - } - return $result; -} - - - - /** - * Gets a slice of an array. - * Returns the wanted slice, as well as the remainder of the array. - * e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r']) - * @return array - * @access private - * @param array $list - * @param integer $start - * @param integer $end - **/ - function getSpan($list, $start, $end) { - - $pre=array_slice($list, 0, $start); - $post=array_slice($list, $end); - - return array(array_slice($list, $start,$end-$start),$this->array_concat($pre,$post)); - } - - - /** - * Concatenates two arrays - * @param array $a - * @param array $b - * @returns array - * @access private - **/ - function array_concat($a, $b) { - array_splice($a,count($a),0,$b); - return $a; - } - - /** - * Returns an array with all indexes where item appears in list - * @param array $list - * @param string $item - * @returns array - * @access private - **/ - function posns($list, $item) { - $res=array(); - $i=0; - foreach ( $list as $k=>$v) { - if ($v === $item ) $res[]=$i; - $i++; - } - $res[]=$i; - return $res; - } - - - /* More N3 specific functions */ - - /** - * Returns a list of tokens - * @param string $s - * @returns array - * @access private - **/ - function toke($s) { - - // print "$s\n"; - // """Notation3 tokenizer. Takes in a string, returns a raw token list.""" - if (strlen($s) == 0) die('Document has no content!'); - - $s=str_replace("\r\n","\n",$s); - $s=str_replace("\r","\n",$s); - - - //$lines=explode("\n",$s); - - //$reallines=array_filter($lines, array($this, "notComment")); - // print "LINES: ".join($reallines, " ")." :LINES\n"; - //array_walk($reallines, array($this, "trimLine")); - //$res=array(); - - // foreach ($reallines as $l) { - //preg_match_all($this->Tokens, $l, $newres); - //$res=$this->array_concat($res,$newres[0]); - //} - - $res=array(); - preg_match_all($this->Tokens, $s, $newres); - $res=$this->array_concat($res, array_map('trim', $newres[0])); -//var_dump($newres[0]); - return $res; - } - - /** - * Returns a list with the elements between start and end as one quoted string - * e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"] - * @param array $list - * @param integer $start - * @param integer $end - * @returns array - * @access private - **/ - function listify($list, $start, $end) { - - //Re-form a list, merge elements start->end into one quoted element - //Start and end are offsets... - - $l=$end-$start; - - $s=array_slice($list, 0, $start); - $m=array_slice($list, $start,$l); - $e=array_slice($list, $end); - - // array_push($s,"\"".join($m," ")."\""); - array_push($s,$m); - - return $this->array_concat($s,$e); - } - - /** - * Returns an array with prefixes=>namespace mappings - * @param array $list - * @access private - * @returns array - **/ - function getPrefixes($list) { - - $prefixes=array(); - $ns=1; - $name=2; - foreach ($list as $l) { - if ($l=='@prefix') { - // while '@prefix' in list { - - $pos=current($list); - //pos = list.index('@prefix') - $r = $this->getSpan($list, $pos, ($pos+4)); # processes the prefix tokens - $binding=$r[0]; - $list=$r[1]; - $prefixes[$binding[$ns]] = substr($binding[$name],1,-1); - $this->parsedNamespaces[substr($binding[$name],1,-1)] = substr($binding[$ns],0,-1); - } - } - - if (count($prefixes)<1) $list= array_slice($list,0); - - return array($prefixes, $list); - } - - /** - * Callback function for replacing "a" elements with the right RDF uri. - * @param string $l - * @access private - **/ - function replace_a_type(&$l,$p) { - if ($l=='a') $l='<'.$this->RDF_NS.'type>'; - } - - /** - * Callback function for replacing "=" elements with the right DAML+OIL uri. - * @param string $l - * @access private - **/ - function replace_equal(&$l,$p) { - if ($l=='=') $l='<'.$this->OWL_NS.'sameAs>'; - } - - /** - * Callback function for replacing "this" elements with the right RDF uri. - * @param string $l - * @access private - **/ - function replace_this($l,$p) { - if ($l=='this') $l=''; - } - - /** - * Applies stuff :) - * Expands namespace prefixes etc. - * @param array $prefixes - * @param array $list - * @returns $list - * @access private - **/ - function applyStuff($prefixes, $list) - { - array_walk($list, array($this, 'replace_a_type')); - array_walk($list, array($this, 'replace_equal')); - array_walk($list, array($this, 'replace_this')); - - for ($i = 0; $i < count($list); $i++) { - - if ($list[$i]=='<>') { - if (!isset($path)) { - if (!isset($_SERVER['SERVER_ADDR'])) { - $_SERVER['SERVER_ADDR'] = 'localhost'; - } - if (!isset($_SERVER['REQUEST_URI'])) { - $_SERVER['REQUEST_URI'] = '/rdfapi-php'; - } - $list[$i] = ''; - } else { - $list[$i] = '<'.$path.'>'; - }; - }; - - - if (preg_match('/^[-+]?[0-9]+$/', $list[$i])) { - //integer - $list[$i] = intval($list[$i]); - } else if (is_numeric($list[$i])) { - //float or decimal - // After conversion we cannot distinguish between both - $list[$i] = floatval($list[$i]); - } else if ((!strstr('<_"\'?.;,{}[]()@', $list[$i]{0})) - && (substr($list[$i],0,3) != '^^<') - ) { - //prefix or unknown - $_r = explode(':', $list[$i]); - $ns = $_r[0] . ':'; - $name = $_r[1]; - - if (isset($prefixes[$ns])) { - $list[$i] = '<'.$prefixes[$ns].$name.'>'; - } else if (isset($prefixes[substr($ns, 2)])) { - $list[$i] = '^^' . $prefixes[substr($ns, 2)] . $name . ''; - } else { - //die('Prefix not declared:'.$ns); - $this->parseError = true; - trigger_error('Prefix not declared: '.$ns, E_USER_ERROR); - break; - } - - } else { - if ($list[$i]{0} == '"') { - $bLiteral = true; - $chBase = '"'; - } else if ($list[$i]{0} == '\'') { - $bLiteral = true; - $chBase = '\''; - } else { - $bLiteral = false; - } - if ($bLiteral) { - $tripleBase = $chBase . $chBase . $chBase; - // Congratulations - it's a literal! - if (substr($list[$i], 0, 3) == $tripleBase) { - if (substr($list[$i],-3,3) == $tripleBase) { - // A big literal... - $lit = substr($list[$i],3,-3); - // print "++$lit++"; - $lit=str_replace('\n', '\\n',$lit); - - //$lit=ereg_replace("[^\\]" . $chBase, "\\" . $chBase, $lit); - $lit = stripslashes($lit); - - $list[$i] = $chBase . $lit . $chBase; - } else { - die ('Incorrect string formatting: '.substr($list[$i],-3,3)); - } - } else { - if (strstr($list[$i],"\n")) { - die('Newline in literal: ' . $list[$i]); - } - $list[$i] = stripslashes($list[$i]); - } - } - } - - if (substr($list[$i],0,2)=='^^') { - if ($list[$i][2]!='<') { - $list[$i] = '^^<' . substr($list[$i], 2) . '>'; - } - }; - - }//foreach list item - - return $list; - }//function applyStuff($prefixes, $list) - - - - /** - * Returns an array of triples extracted from the list of n3 tokens - * @param array $list - * @returns array - * @access private - **/ - function getStatements($list) { - - - $statements = array(); - - while (in_array('.', $list)) { - // for($i=0;$igetSpan($list, 0, $pos+1); - - $statement=$r[0]; - $list = $r[1]; - - array_pop($statement); - $statements[]=$statement; - } - - return $statements; - } - - /** - * Gets a list of triples with same subject - * e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes. - * @param array $list - * @returns array - * @acces private - **/ - function getPovs($list) { - $povs = array(); - while (in_array(';', $list)) { - $r=$this->posns($list,';'); - $pos=array_slice($r,0,2); - $r = $this->getSpan($list, $pos[0], $pos[1]); - $pov=$r[0]; - $list=$r[1]; - - // skip lone semicolons, e.g. "
    ; ." - if (count($pov) == 1) continue; - - $povs[]=array_slice($pov,1); - } - - return array($list, $povs); - } - - /** - * Gets a list of triples with same predicate - * e.g. :Gunnar :likes "Cheese", "Wine". - * @access private - * @param array $list - * @returns array - **/ - function getObjs($list) { - - - $objs = array(); - while (in_array(",",$list)) { - $pos=array_search(",",$list); - // for($i=0;$igetSpan($list, $pos, ($pos+$get_array_fields)); - - $obj=$r[0]; - if (!isset($obj[2])) $obj[2]=' '; - if (!isset($obj[3])) $obj[3]=' '; - - $list=$r[1]; - - - $objs[]=$obj; - - - } - - return array($list, $objs); - } - - /** - * Does the real work, returns a list of subject, predicate, object triples. - * @param array $list - * @returns array - * @access private - **/ - function statementize($list) { - - if (count($list) == 1 && preg_match("/_".BNODE_PREFIX."[0-9]+_/",$list[0])) { - if ($this->debug) print "Ignored bNode exists statement. $list\n"; - return array(); - } - - - - if (count($list) == 3) return array($list); - if (count($list) < 3) { - throw new Exception( - 'N3 statement too short,' - . ' only ' . count($list) . ' elements instead of 3:' . "\n" - . implode("\n", $list) - ); - } - - //Get all ; - $r=$this->getPovs($list); - $spo=$r[0]; - $po=$r[1]; - $all=array(); - - - - // (spo, po), all = getPovs(list), [] - $subject = $spo[0]; - foreach ($po as $pop) { - // for pop in po { - $r=$this->getObjs($pop); - - $myPo=$r[0]; - $obj=$r[1]; - //myPo, obj = getObjs(pop) - - if (!isset($myPo[2])) $myPo[2]=' '; - if (!isset($myPo[3])) $myPo[3]=' '; - - - $predicate = $myPo[0]; - $all[]=array($subject,$predicate,$myPo[1],$myPo[2],$myPo[3]); - // all.append([subject, predicate, myPo[1]]) - - - - foreach ($obj as $o) $all[]=array($subject,$predicate, $o[1],$o[2],$o[3]); - // for x in obj: all.append([subject, predicate, x]) - - } - - - - $r = $this->getObjs($spo); - $spo=$r[0]; - - $objs=$r[1]; - - //spo, objs = getObjs(spo) - $subject=$spo[0]; - $predicate=$spo[1]; - - - if(!isset($spo[3])) $spo[3]=' '; - if(!isset($spo[4])) $spo[4]=' '; - - $all[]=array($subject, $predicate, $spo[2],$spo[3],$spo[4]); - - foreach ($objs as $obj) $all[]=array($subject, $predicate, $obj[1],$obj[2],$obj[3]); - - return $all; - } - - /** - * Makes lists of elements in list into a seperate array element. - * e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"] - * @param array $list - * @param string $schar - * @param string $echar - * @returns array - * @access private - **/ - function doLists($list, $schar, $echar) { - - while (in_array($schar, $list)) { - // while schar in list { - $ndict = array(); - $nestingLevel = 0; - $biggest = 0; - for ($i = 0; $i < count($list); $i++) { - if ($list[$i] == $schar) { - $nestingLevel += 1; - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel] = array(array($i)); - } else { - $ndict[$nestingLevel][]=array($i); - } - } - if ($list[$i] == $echar) { - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel]=array(array($i)); - } else { - $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i; - $nestingLevel-= 1; -# elif type(list[i]) == type([]) { -# list[i] = doLists(list[i], schar, echar) - } - } - } - foreach (array_keys($ndict) as $key) { - if ($key > $biggest) $biggest = $key; - } - - $tol = $ndict[$biggest][0]; - $list = $this->listify($list, $tol[0], ($tol[1]+1)); - } - return $list; - } - - /** - * Apply doLists for all different types of list. - * @param array - * @returns array - * @access private - **/ - function listStuff($list) { -# y, z = zip(['[', ']'], ['{', '}'], ['(', ')']) -# return map(doLists, [list, list, list], y, z).pop() - $list = $this->doLists($list, '[', ']'); - $list = $this->doLists($list, '{', '}'); - return $this->doLists($list, '(', ')'); - } - - /** - * Generates a new node id. - * @access private - * @returns string - **/ - function bnodeID() { - - $this->bNode++; - return "_".BNODE_PREFIX.$this->bNode."_"; - } - - /** - * This makes bNodes out of variables like _:a etc. - * @access private - * @param array $list - * @returns array - **/ - function fixAnon($list) { -// $map=array(); - for($i=0;$ibNodeMap[$l])) { - $a=$this->bnodeID(); - $this->bNodeMap[$l]=$a; - } else $a=$this->bNodeMap[$l]; - $list[$i]=$a; - } - } - return $list; - } - - /** - * This makes [ ] lists into bnodes. - * @access private - * @param array $list - * @return array - **/ - function expandLists($list) { - - for($i=0;$ibnodeID(); - $prop=$list[$i]; - $list[$i]=$bnode; - $list[]=$bnode; - $list=$this->array_concat($list, array_slice($prop,1,-1)); - $list[]='.'; - }elseif($list[$i][0]=='(') { - - $rdfNil = '<'. RDF_NAMESPACE_URI . RDF_NIL .'>'; - $rdfFirst = '<'. RDF_NAMESPACE_URI . RDF_FIRST .'>'; - $rdfRest = '<'. RDF_NAMESPACE_URI . RDF_REST .'>'; - - // local copy of list without "(" and ")" - $t_list = array_slice($list[$i], 1, -1); - - //prepare bnodes - $fromBnode = $this->bnodeID(); - $toBnode = $this->bnodeID(); - - //link first bnode into graph - $list[$i] = $fromBnode; - - $count = count($t_list); - - //loop through list, convert to RDF linked list - for ($idx = 0; $idx < $count; $idx++){ - - // set rdf:first - $list[] = $fromBnode; - $list[] = $rdfFirst; - $list[] = $t_list[$idx]; - $list[] = '.'; - - // set rdf:rest (nil or next bnode) - if ($idx == $count - 1) { - $list[] = $fromBnode; - $list[] = $rdfRest; - $list[] = $rdfNil; - $list[] = '.'; - } - else { - $list[] = $fromBnode; - $list[] = $rdfRest; - $list[] = $toBnode; - $list[] = '.'; - - $fromBnode = $toBnode; - $toBnode = $this->bnodeID(); - } - } - } - else { - die('Only [ ] and () lists are supported!'); - } - } - - - } - return $list; - } - - /** - * Main work-horse function. This converts a N3 string to a list of statements - * @param string $s - * @returns array - * @access private - **/ - function n3tolist($s) { - - // """Convert an N3 string into a list of triples as strings.""" - $result = array(); - - $t = $this->filterWs($this->toke($s)); # tokenize the stream, and filter whitespace tokens - - if ($this->debug) { - print "Filter WS:\n"; - var_dump($t); - } - $r=$this->getPrefixes($t); # get the prefix directives, and add to a dict - $prefixes=$r[0]; - $t=$r[1]; - if ($this->debug) { - print "Prefixes:\n"; - var_dump($prefixes); - print "***\n"; - var_dump($t); - } - $t=$this->applyStuff($prefixes, $t);#apply prefixes, keywords, and string formatting - if ($this->debug) { - print "Stuff applied:\n"; - var_dump($t); - } - - $t=$this->fixAnon($t); # fix _:a anons - if ($this->debug) { - print "Fix anon:\n"; - var_dump($t); - } - - $t = $this->listStuff($t); # apply list stuff: todo - if ($this->debug) { - print "Lists done:\n"; - var_dump($t); - } - $t=$this->expandLists($t); - if ($this->debug) { - print "Lists applied:\n"; - var_dump($t); - } - $t = $this->getStatements($t); # get all of the "statements" from the stream - - foreach ($t as $stat) { - $stats = $this->statementize($stat); - - foreach ($stats as $y) { - $result[]=$y; - } - } - - // for x in [statementize(stat) for stat in t] { - // for y in x: result.append(y) - return $result; - } - - - - /** - * Constructs a RAP RDFNode from URI/Literal/Bnode - * @access private - * @param string $s - * @returns object RDFNode - **/ - function toRDFNode($s, $state) - { - $ins = substr($s, 1, -1); - if ($s{0} == '"' || $s{0} == '\'') { - $lang = NULL; - - if (count($state)>3) { - for ($i = 3; $i < count($state); $i++) { - if ($state[$i][0]=='@') { - $lang = substr($state[3], 1); - } - if (substr($state[$i],0,2) == '^^') { - $dtype = substr($state[$i],2); - if ($dtype[0]=='<') { - $dtype = substr($dtype,1,-1); - } - } - } - } - - - if (UNIC_RDF) { - $ins = $this->str2unicode_nfc($ins); - } - $new_Literal = new Literal($ins, $lang); - if (isset($dtype)) { - $new_Literal->setDatatype($dtype); - } - return $new_Literal; - } else if (is_int($s)) { - $value = new Literal($s); - $value->setDatatype(XML_SCHEMA . 'integer'); - return $value; - } else if (is_float($s)) { - $value = new Literal($s); - $value->setDatatype(XML_SCHEMA . 'double'); - return $value; - } else if ($s == '@true') { - $value = new Literal(true); - $value->setDatatype(XML_SCHEMA . 'boolean'); - return $value; - } else if ($s == '@false') { - $value = new Literal(false); - $value->setDatatype(XML_SCHEMA . 'boolean'); - return $value; - } - - if (strstr($s, '_' . BNODE_PREFIX)) { - if (($this->FixBnodes) || (!array_search($s,$this->bNodeMap))) { - return new BlankNode($ins); - } else { - return new BlankNode( - trim( - substr( - array_search($s, $this->bNodeMap), - 2 - ) - ) - ); - }; - } - - return new Resource($ins); - }//function toRDFNode($s, $state) - - - - -} //end: N3Parser - -?> diff --git a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Serializer.php b/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Serializer.php deleted file mode 100755 index f28b5d2c..00000000 --- a/ws2011/Semantic Web/Uebungen/1. Bonus Aufgabe/solution/rdfAPI/api/syntax/N3Serializer.php +++ /dev/null @@ -1,526 +0,0 @@ - - *